Version 1.16.0

Merge commit '515dd47e58fb883c77bdfc114c88fc27884d7c9e'  into stable
diff --git a/.gitignore b/.gitignore
index eaa131d..e66367d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,6 +75,7 @@
 *.rej
 
 # Generated files.
+tools/dartium/out
 tools/out
 tools/xcodebuild
 editor/util/testing/mac/CodeLab.suite/Results
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0251c0d..27d3383 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,134 @@
+## 1.16.0 - 2016-04-26
+
+### Core library changes
+
+* `dart:convert`
+  * Added `BASE64URL` codec and corresponding `Base64Codec.urlSafe` constructor.
+
+  * Introduce `ChunkedConverter` and deprecate chunked methods on `Converter`.
+
+* `dart:html`
+
+  There have been a number of **BREAKING** changes to align APIs with recent
+  changes in Chrome. These include:
+
+  * Chrome's `ShadowRoot` interface no longer has the methods `getElementById`,
+    `getElementsByClassName`, and `getElementsByTagName`, e.g.,
+
+    ```dart
+    elem.shadowRoot.getElementsByClassName('clazz')
+    ```
+
+    should become:
+
+    ```dart
+    elem.shadowRoot.querySelectorAll('.clazz')
+    ```
+
+  * The `clipboardData` property has been removed from `KeyEvent`
+    and `Event`. It has been moved to the new `ClipboardEvent` class, which is
+    now used by `copy`, `cut`, and `paste` events.
+
+  * The `layer` property has been removed from `KeyEvent` and
+    `UIEvent`. It has been moved to `MouseEvent`.
+
+  * The `Point get page` property has been removed from `UIEvent`.
+    It still exists on `MouseEvent` and `Touch`.
+
+  There have also been a number of other additions and removals to `dart:html`,
+  `dart:indexed_db`, `dart:svg`, `dart:web_audio`, and `dart:web_gl` that
+  correspond to changes to Chrome APIs between v39 and v45. Many of the breaking
+  changes represent APIs that would have caused runtime exceptions when compiled
+  to Javascript and run on recent Chrome releases.
+
+* `dart:io`
+  * Added `SecurityContext.alpnSupported`, which is true if a platform
+    supports ALPN, and false otherwise.
+
+### JavaScript interop
+
+For performance reasons, a potentially **BREAKING** change was added for
+libraries that use JS interop.
+Any Dart file that uses `@JS` annotations on declarations (top-level functions,
+classes or class members) to interop with JavaScript code will require that the
+file have the annotation `@JS()` on a library directive.
+
+```dart
+@JS()
+library my_library;
+```
+
+The analyzer will enforce this by generating the error:
+
+The `@JS()` annotation can only be used if it is also declared on the library
+directive.
+
+If part file uses the `@JS()` annotation, the library that uses the part should
+have the `@JS()` annotation e.g.,
+
+```dart
+// library_1.dart
+@JS()
+library library_1;
+
+import 'package:js/js.dart';
+
+part 'part_1.dart';
+```
+
+```dart
+// part_1.dart
+part of library_1;
+
+@JS("frameworkStabilizers")
+external List<FrameworkStabilizer> get frameworkStabilizers;
+```
+
+If your library already has a JS module e.g.,
+
+```dart
+@JS('array.utils')
+library my_library;
+```
+
+Then your library will work without any additional changes.
+
+### Analyzer
+
+*   Static checking of `for in` statements. These will now produce static
+    warnings:
+
+    ```dart
+    // Not Iterable.
+    for (var i in 1234) { ... }
+
+    // String cannot be assigned to int.
+    for (int n in <String>["a", "b"]) { ... }
+    ```
+
+### Tool Changes
+
+* Pub
+  * `pub serve` now provides caching headers that should improve the performance
+    of requesting large files multiple times.
+
+  * Both `pub get` and `pub upgrade` now have a `--no-precompile` flag that
+    disables precompilation of executables and transformed dependencies.
+
+  * `pub publish` now resolves symlinks when publishing from a Git repository.
+    This matches the behavior it always had when publishing a package that
+    wasn't in a Git repository.
+
+* Dart Dev Compiler
+  * The **experimental** `dartdevc` executable has been added to the SDK.
+
+  * It will help early adopters validate the implementation and provide
+    feedback. `dartdevc` **is not** yet ready for production usage.
+
+  * Read more about the Dart Dev Compiler [here][dartdevc].
+
+[dartdevc]: https://github.com/dart-lang/dev_compiler
+
 ## 1.15.0 - 2016-03-09
 
 ### Core library changes
@@ -23,17 +154,28 @@
     `SecurityContext.usePrivateKeyBytes`, for use as the password for PKCS12
     data.
 
-### Dartium
+### Tool changes
 
+* Dartium and content shell
   * The Chrome-based tools that ship as part of the Dart SDK – Dartium and
     content shell – are now based on Chrome version 45 (instead of Chrome 39).
-  * Dart browser libraries (`dart:html`, `dart:svg`, etc) have not been updated.
+  * Dart browser libraries (`dart:html`, `dart:svg`, etc) *have not* been
+    updated.
     * These are still based on Chrome 39.
     * These APIs will be updated in a future release.
   * Note that there are experimental APIs which have changed in the underlying
     browser, and will not work with the older libraries.
     For example, `Element.animate`.
 
+* `dartfmt` - upgraded to v0.2.4
+  * Better handling for long collections with comments.
+  * Always put member metadata annotations on their own line.
+  * Indent functions in named argument lists with non-functions.
+  * Force the parameter list to split if a split occurs inside a function-typed
+    parameter.
+  * Don't force a split for before a single named argument if the argument
+    itself splits.
+
 ### Service protocol changes
 
 * Fixed a documentation bug where the field `extensionRPCs` in `Isolate`
@@ -58,13 +200,13 @@
 
 Patch release, resolves three issues:
 
-* VM: Fixes a code generation bug on x64.
+* VM: Fixed a code generation bug on x64.
   (SDK commit [834b3f02](https://github.com/dart-lang/sdk/commit/834b3f02b6ab740a213fd808e6c6f3269bed80e5))
 
-* `dart:io`: Fix EOF detection when reading some special device files.
+* `dart:io`: Fixed EOF detection when reading some special device files.
   (SDK issue [25596](https://github.com/dart-lang/sdk/issues/25596))
 
-* Pub: Fix an error using hosted dependencies in SDK version 1.14.
+* Pub: Fixed an error using hosted dependencies in SDK version 1.14.
   (Pub issue [1386](https://github.com/dart-lang/pub/issues/1386))
 
 ## 1.14.1 - 2016-02-04
diff --git a/DEPS b/DEPS
index 38ccb51..1f50fd4 100644
--- a/DEPS
+++ b/DEPS
@@ -21,14 +21,18 @@
   "github_mirror":
       "https://chromium.googlesource.com/external/github.com/dart-lang/%s.git",
 
+  # Only use this temporarily while waiting for a mirror for a new package.
+  "github_dartlang": "https://github.com/dart-lang/%s.git",
+
   "gyp_rev": "@6ee91ad8659871916f9aa840d42e1513befdf638",
   "co19_rev": "@3ed795ea02e022ef19c77cf1b6095b7c8f5584d0",
   "chromium_git": "https://chromium.googlesource.com",
 
   # Revisions of /third_party/* dependencies.
-  "args_tag": "@0.13.0",
-  "async_tag": "@1.4.0",
+  "args_tag": "@0.13.4",
+  "async_tag": "@1.9.0",
   "barback_tag" : "@0.15.2+7",
+  "boolean_selector_tag" : "@1.0.0",
   "boringssl_rev" : "@daeafc22c66ad48f6b32fc8d3362eb9ba31b774e",
   "charcode_tag": "@1.1.0",
   "chrome_rev" : "@19997",
@@ -41,18 +45,18 @@
   "dartdoc_tag" : "@v0.9.0",
   "dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
   "dart_style_tag": "@0.2.4",
-  "dev_compiler_rev": "@0.1.9",
+  "dev_compiler_rev": "@0c5dd2d1e999c421d978a478e267aac6279e087a",
   "glob_rev": "@704cf75e4f26b417505c5c611bdaacd8808467dd",
   "html_tag" : "@0.12.1+1",
   "http_tag" : "@0.11.3+3",
   "http_multi_server_tag" : "@2.0.0",
   "http_parser_tag" : "@1.1.0",
   "http_throttle_rev" : "@a81f08be942cdd608883c7b67795c12226abc235",
-  "idl_parser_rev": "@6316d5982dc24b34d09dd8b10fbeaaff28d83a48",
+  "idl_parser_rev": "@7fbe68cab90c38147dee4f48c30ad0d496c17915",
   "intl_rev": "@a8b480b9c436f6c0ec16730804c914bdb4e30d53",
   "jinja2_rev": "@2222b31554f03e62600cd7e383376a7c187967a1",
-  "json_rpc_2_tag": "@1.1.1",
-  "linter_rev": "@ce7aa0ec03ee738f4d314138228e0b4742845810",
+  "json_rpc_2_tag": "@2.0.0",
+  "linter_rev": "@bcd4cf615665a80edf3f9a924388e59644a667cd",
   "logging_rev": "@85d83e002670545e9039ad3985f0018ab640e597",
   "markdown_rev": "@4aaadf3d940bb172e1f6285af4d2b1710d309982",
   "matcher_tag": "@0.12.0",
@@ -67,32 +71,36 @@
   "ply_rev": "@604b32590ffad5cbb82e4afef1d305512d06ae93",
   "plugin_tag": "@0.1.0",
   "pool_tag": "@1.2.1",
-  "pub_rev": "@bd5c77abcb609d95340632b96344b59035e70376",
+  "protobuf_tag": "@0.5.0+1",
+  "pub_rev": "@04ff0cc2cb6a3b698159b1aeef14cd3d7c90e287",
   "pub_cache_tag": "@v0.1.0",
   "pub_semver_tag": "@1.2.1",
   "quiver_tag": "@0.21.4",
   "resource_rev":"@a49101ba2deb29c728acba6fb86000a8f730f4b1",
-  "root_certificates_rev": "@c3a41df63afacec62fcb8135196177e35fe72f71",
-  "scheduled_test_tag": "@0.12.4+2",
-  "shelf_tag": "@0.6.4+3",
+  "root_certificates_rev": "@aed07942ce98507d2be28cbd29e879525410c7fc",
+  "scheduled_test_tag": "@0.12.5+2",
+  "shelf_tag": "@0.6.5",
   "smoke_rev" : "@f3361191cc2a85ebc1e4d4c33aec672d7915aba9",
   "source_maps_tag": "@0.10.1",
   "shelf_static_tag": "@0.2.3+1",
-  "shelf_web_socket_tag": "@0.0.1+4",
+  "shelf_web_socket_tag": "@0.2.0",
   "source_map_stack_trace_tag": "@1.0.4",
   "source_span_tag": "@1.2.0",
   "stack_trace_tag": "@1.4.2",
+  "stream_channel_tag": "@1.3.1",
   "string_scanner_tag": "@0.1.4",
   "sunflower_rev": "@879b704933413414679396b129f5dfa96f7a0b1e",
-  "test_tag": "@0.12.6+1",
+  "test_tag": "@0.12.12",
   "test_reflective_loader_tag": "@0.0.3",
+  "typed_data_tag": "@1.1.2",
   "utf_rev": "@1f55027068759e2d52f2c12de6a57cce5f3c5ee6",
   "usage_rev": "@b5080dac0d26a5609b266f8fdb0d053bc4c1c638",
   "watcher_tag": "@0.9.7",
   "when_tag": "@0.2.0+2",
   "which_tag": "@0.1.3+1",
-  "web_components_rev": "@0e636b534d9b12c9e96f841e6679398e91a986ec",
-  "WebCore_rev": "@5ecb723fd9ffcc0d108f5e0e24d12b8b3df7b200",
+  "web_components_rev": "@6349e09f9118dce7ae1b309af5763745e25a9d61",
+  "web_socket_channel_tag": "@1.0.0",
+  "WebCore_rev": "@a86fe28efadcfc781f836037a80f27e22a5dad17",
   "yaml_tag": "@2.1.5",
   "zlib_rev": "@c3d0a6190f2f8c924a05ab6cc97b8f975bddd33f",
   "barback-0.13.0_rev": "@34853",
@@ -129,7 +137,7 @@
       Var("chromium_git") + "/chromium/src/third_party/ply.git" +
       Var("ply_rev"),
 
-  Var("dart_root") + "/third_party/idl_parser":
+  Var("dart_root") + "/tools/idl_parser":
       Var("chromium_git") + "/chromium/src/tools/idl_parser.git" +
       Var("idl_parser_rev"),
 
@@ -142,6 +150,9 @@
       (Var("github_mirror") % "async") + Var("async_tag"),
   Var("dart_root") + "/third_party/pkg/barback":
       (Var("github_mirror") % "barback") + Var("barback_tag"),
+  Var("dart_root") + "/third_party/pkg/boolean_selector":
+      (Var("github_dartlang") % "boolean_selector") +
+      Var("boolean_selector_tag"),
   Var("dart_root") + "/third_party/pkg/charcode":
       (Var("github_mirror") % "charcode") + Var("charcode_tag"),
   Var("dart_root") + "/third_party/pkg/cli_util":
@@ -215,6 +226,8 @@
       (Var("github_mirror") % "plugin") + Var("plugin_tag"),
   Var("dart_root") + "/third_party/pkg/pool":
       (Var("github_mirror") % "pool") + Var("pool_tag"),
+  Var("dart_root") + "/third_party/pkg/protobuf":
+      (Var("github_dartlang") % "dart-protobuf") + Var("protobuf_tag"),
   Var("dart_root") + "/third_party/pkg/pub_semver":
       (Var("github_mirror") % "pub_semver") + Var("pub_semver_tag"),
   Var("dart_root") + "/third_party/pkg/pub":
@@ -247,6 +260,9 @@
       Var("source_map_stack_trace_tag"),
   Var("dart_root") + "/third_party/pkg/stack_trace":
       (Var("github_mirror") % "stack_trace") + Var("stack_trace_tag"),
+  Var("dart_root") + "/third_party/pkg/stream_channel":
+      (Var("github_dartlang") % "stream_channel") +
+      Var("stream_channel_tag"),
   Var("dart_root") + "/third_party/pkg/string_scanner":
       (Var("github_mirror") % "string_scanner") +
       Var("string_scanner_tag"),
@@ -258,6 +274,8 @@
   Var("dart_root") + "/third_party/pkg/test_reflective_loader":
       (Var("github_mirror") % "test_reflective_loader") +
       Var("test_reflective_loader_tag"),
+  Var("dart_root") + "/third_party/pkg/typed_data":
+      (Var("github_dartlang") % "typed_data") + Var("typed_data_tag"),
   Var("dart_root") + "/third_party/pkg/usage":
       (Var("github_mirror") % "usage") + Var("usage_rev"),
   Var("dart_root") + "/third_party/pkg/utf":
@@ -267,6 +285,9 @@
   Var("dart_root") + "/third_party/pkg/web_components":
       (Var("github_mirror") % "web-components") +
       Var("web_components_rev"),
+  Var("dart_root") + "/third_party/pkg/web_socket_channel":
+      (Var("github_dartlang") % "web_socket_channel") +
+      Var("web_socket_channel_tag"),
   Var("dart_root") + "/third_party/pkg/when":
       (Var("github_mirror") % "when") + Var("when_tag"),
   Var("dart_root") + "/third_party/pkg/which":
diff --git a/create_sdk.gyp b/create_sdk.gyp
index b13adda..83ddc47 100644
--- a/create_sdk.gyp
+++ b/create_sdk.gyp
@@ -15,6 +15,7 @@
         'utils/dartdoc/dartdoc.gyp:dartdoc',
         'utils/analysis_server/analysis_server.gyp:analysis_server',
         'utils/dartanalyzer/dartanalyzer.gyp:dartanalyzer',
+        'utils/dartdevc/dartdevc.gyp:dartdevc',
       ],
       'actions': [
         {
@@ -38,6 +39,7 @@
             '<(SHARED_INTERMEDIATE_DIR)/utils_wrapper.dart.snapshot',
             '<(SHARED_INTERMEDIATE_DIR)/pub.dart.snapshot',
             '<(SHARED_INTERMEDIATE_DIR)/dartanalyzer.dart.snapshot',
+            '<(SHARED_INTERMEDIATE_DIR)/dartdevc.dart.snapshot',
             '<(SHARED_INTERMEDIATE_DIR)/dartfmt.dart.snapshot',
             '<(SHARED_INTERMEDIATE_DIR)/analysis_server.dart.snapshot',
             '<(SHARED_INTERMEDIATE_DIR)/dartdoc.dart.snapshot',
diff --git a/dart.gyp b/dart.gyp
index 918e5d6..b8d3e43f 100644
--- a/dart.gyp
+++ b/dart.gyp
@@ -12,6 +12,7 @@
         'create_sdk',
         'dart2js',
         'dartanalyzer',
+        'dartdevc',
         'packages',
         'runtime',
         'samples',
@@ -28,7 +29,7 @@
         'runtime/dart-runtime.gyp:dart_noopt',
         'runtime/dart-runtime.gyp:dart_precompiled_runtime',
         'runtime/dart-runtime.gyp:dart_product',
-        'runtime/dart-runtime.gyp:dart_no_snapshot',
+        'runtime/dart-runtime.gyp:dart_bootstrap#host',
         'runtime/dart-runtime.gyp:run_vm_tests',
         'runtime/dart-runtime.gyp:process_test',
         'packages',
@@ -58,6 +59,13 @@
       ],
     },
     {
+      'target_name': 'dartdevc',
+      'type': 'none',
+      'dependencies': [
+        'utils/dartdevc/dartdevc.gyp:dartdevc',
+      ],
+    },
+    {
       'target_name': 'dartfmt',
       'type': 'none',
       'dependencies': [
diff --git a/pkg/analysis_server/benchmark/integration/input_converter.dart b/pkg/analysis_server/benchmark/integration/input_converter.dart
index 2e941ff..d743d6c 100644
--- a/pkg/analysis_server/benchmark/integration/input_converter.dart
+++ b/pkg/analysis_server/benchmark/integration/input_converter.dart
@@ -72,6 +72,8 @@
 
   CommonInputConverter(this.tmpSrcDirPath, this.srcPathMap);
 
+  Map<String, dynamic> asMap(dynamic value) => value as Map<String, dynamic>;
+
   /**
    * Return an operation for the notification or `null` if none.
    */
@@ -79,9 +81,9 @@
     String event = json['event'];
     if (event == SERVER_STATUS) {
       // {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
-      Map<String, dynamic> params = json['params'];
+      Map<String, dynamic> params = asMap(json['params']);
       if (params != null) {
-        Map<String, dynamic> analysis = params['analysis'];
+        Map<String, dynamic> analysis = asMap(params['analysis']);
         if (analysis != null && analysis['isAnalyzing'] == false) {
           return new WaitForAnalysisCompleteOperation();
         }
@@ -101,7 +103,7 @@
    * Return an operation for the request or `null` if none.
    */
   Operation convertRequest(Map<String, dynamic> origJson) {
-    Map<String, dynamic> json = translateSrcPaths(origJson);
+    Map<String, dynamic> json = asMap(translateSrcPaths(origJson));
     requestMap[json['id']] = json;
     String method = json['method'];
     // Sanity check operations that modify source
@@ -172,8 +174,8 @@
    * Return an operation for the recorded/expected response.
    */
   Operation convertResponse(Map<String, dynamic> json) {
-    return new ResponseOperation(
-        this, requestMap.remove(json['id']), translateSrcPaths(json));
+    return new ResponseOperation(this, asMap(requestMap.remove(json['id'])),
+        asMap(translateSrcPaths(json)));
   }
 
   void logOverlayContent() {
@@ -269,7 +271,9 @@
  * into a series of operations to be sent to the analysis server.
  * The input stream can be either an instrumenation or log file.
  */
-class InputConverter extends Converter<String, Operation> {
+class InputConverter
+    extends ChunkedConverter<String, Operation, String, Operation> {
+
   final Logger logger = new Logger('InputConverter');
 
   /**
diff --git a/pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart b/pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart
index a43d4b4..bcfca4e 100644
--- a/pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart
+++ b/pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart
@@ -6,8 +6,8 @@
 
 import 'dart:convert';
 
-import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
+import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:logging/logging.dart';
 
 import 'input_converter.dart';
@@ -96,7 +96,7 @@
 
   Map<String, dynamic> decodeJson(String line, String text) {
     try {
-      return JSON.decode(text);
+      return asMap(JSON.decode(text));
     } catch (e, s) {
       throw new AnalysisException(
           'Failed to decode JSON: $text\n$line', new CaughtException(e, s));
diff --git a/pkg/analysis_server/benchmark/integration/local_runner.dart b/pkg/analysis_server/benchmark/integration/local_runner.dart
index bd0ff6b..c355ed8 100644
--- a/pkg/analysis_server/benchmark/integration/local_runner.dart
+++ b/pkg/analysis_server/benchmark/integration/local_runner.dart
@@ -3,7 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:io';
+
 import 'package:path/path.dart';
+
 import 'main.dart' as performance;
 
 // Local driver for performance measurement
@@ -15,8 +17,8 @@
   if (args.length < 3) printHelp('Expected 3 arguments');
   var gitDir = new Directory(args[0]);
   if (!gitDir.existsSync()) printHelp('${gitDir.path} does not exist');
-  if (!new Directory(join(gitDir.path, '.git')).existsSync()) printHelp(
-      '${gitDir.path} does not appear to be a local git repository');
+  if (!new Directory(join(gitDir.path, '.git')).existsSync())
+    printHelp('${gitDir.path} does not appear to be a local git repository');
   var branch = args[1];
   var inputFile = new File(args[2]);
   if (!inputFile.existsSync()) printHelp('${inputFile.path} does not exist');
diff --git a/pkg/analysis_server/benchmark/integration/log_file_input_converter.dart b/pkg/analysis_server/benchmark/integration/log_file_input_converter.dart
index 0781bae..3490860 100644
--- a/pkg/analysis_server/benchmark/integration/log_file_input_converter.dart
+++ b/pkg/analysis_server/benchmark/integration/log_file_input_converter.dart
@@ -13,9 +13,9 @@
 import 'operation.dart';
 
 const CONNECTED_MSG_FRAGMENT = ' <= {"event":"server.connected"';
-final int NINE = '9'.codeUnitAt(0);
 const RECEIVED_FRAGMENT = ' <= {';
 const SENT_FRAGMENT = ' => {';
+final int NINE = '9'.codeUnitAt(0);
 final int ZERO = '0'.codeUnitAt(0);
 
 /**
@@ -32,14 +32,14 @@
       String timeStampString = _parseTimeStamp(line);
       String data = line.substring(timeStampString.length);
       if (data.startsWith(RECEIVED_FRAGMENT)) {
-        Map<String, dynamic> json = JSON.decode(data.substring(4));
+        Map<String, dynamic> json = asMap(JSON.decode(data.substring(4)));
         if (json.containsKey('event')) {
           return convertNotification(json);
         } else {
           return convertResponse(json);
         }
       } else if (data.startsWith(SENT_FRAGMENT)) {
-        Map<String, dynamic> json = JSON.decode(data.substring(4));
+        Map<String, dynamic> json = asMap(JSON.decode(data.substring(4)));
         if (json.containsKey('method')) {
           return convertRequest(json);
         }
diff --git a/pkg/analysis_server/benchmark/integration/operation.dart b/pkg/analysis_server/benchmark/integration/operation.dart
index 0033d1f..eec7d45 100644
--- a/pkg/analysis_server/benchmark/integration/operation.dart
+++ b/pkg/analysis_server/benchmark/integration/operation.dart
@@ -91,7 +91,9 @@
           .log(Level.FINE, 'Response received: $method : $elapsed\n  $result');
     }
 
-    driver.send(method, json['params']).then((Map<String, dynamic> result) {
+    driver
+        .send(method, converter.asMap(json['params']))
+        .then((Map<String, dynamic> result) {
       recordResult(true, result);
       processResult(originalId, result, stopwatch);
     }).catchError((exception) {
diff --git a/pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart b/pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart
index 3d18865..3e3af14 100644
--- a/pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart
@@ -30,7 +30,10 @@
   }
   source = args[SOURCE_OPTION];
   priorityFile = args[PRIORITY_FILE_OPTION];
-  metricNames.addAll(args[METRIC_NAME_OPTION]);
+  List names = args[METRIC_NAME_OPTION] as List;
+  for (var name in names) {
+    metricNames.add(name as String);
+  }
   unittestConfiguration.timeout = new Duration(minutes: 20);
 
   var test;
diff --git a/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart b/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
index a36a54a..7b9829a 100644
--- a/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
@@ -33,13 +33,13 @@
   Future.wait([new CompletionTimingTest().test_timing()]);
 }
 
+const COMPLETION_OFFSET = 'offset';
 const PRIORITY_FILE_OPTION = 'priority';
 const SOURCE_OPTION = 'source';
-const COMPLETION_OFFSET = 'offset';
 
+int offset;
 String priorityFile;
 String source;
-int offset;
 
 ArgParser _createArgParser() => new ArgParser()
   ..addOption(SOURCE_OPTION, help: 'full path to source directory for analysis')
diff --git a/pkg/analysis_server/benchmark/perf/performance_tests.dart b/pkg/analysis_server/benchmark/perf/performance_tests.dart
index 62a752c..b784c0c 100644
--- a/pkg/analysis_server/benchmark/perf/performance_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/performance_tests.dart
@@ -56,6 +56,11 @@
   }
 
   /**
+   * After every test, the server is stopped.
+   */
+  Future shutdown() async => await shutdownIfNeeded();
+
+  /**
    * Enable [SERVER_STATUS] notifications so that [analysisFinished]
    * can be used.
    */
@@ -64,11 +69,6 @@
     futures.add(sendServerSetSubscriptions([ServerService.STATUS]));
     return Future.wait(futures);
   }
-
-  /**
-   * After every test, the server is stopped.
-   */
-  Future shutdown() async => await shutdownIfNeeded();
 }
 
 class AbstractTimingTest extends AbstractAnalysisServerPerformanceTest {
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index fd1e1ef..0c6b2dd 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -61,7 +61,7 @@
 </style></head>
   <body>
     <h1>Analysis Server API Specification</h1>
-    <h1 style="color:#999999">Version 1.14.0</h1>
+    <h1 style="color:#999999">Version 1.15.0</h1>
     <p>
       This document contains a specification of the API provided by the
       analysis server.  The API in this document is currently under
@@ -2454,6 +2454,11 @@
               the error. The field is omitted if there is no correction
               message associated with the error code.
             </p>
+          </dd><dt class="field"><b><i>code ( String )</i></b></dt><dd>
+            
+            <p>
+              The name, as a string, of the error code associated with this error.
+            </p>
           </dd><dt class="field"><b><i>hasFix ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
             
             <p>
diff --git a/pkg/analysis_server/lib/plugin/analysis/analysis_domain.dart b/pkg/analysis_server/lib/plugin/analysis/analysis_domain.dart
index 821a81e..5040087 100644
--- a/pkg/analysis_server/lib/plugin/analysis/analysis_domain.dart
+++ b/pkg/analysis_server/lib/plugin/analysis/analysis_domain.dart
@@ -33,7 +33,7 @@
     show AnalysisService;
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisContext, ComputedResult;
+    show AnalysisContext, ResultChangedEvent;
 import 'package:analyzer/src/generated/source.dart' show Source;
 import 'package:analyzer/task/model.dart' show ResultDescriptor;
 import 'package:plugin/plugin.dart';
@@ -62,14 +62,14 @@
 abstract class AnalysisDomain {
   /**
    * Return the stream that is notified when a new value for the given
-   * [result] is computed.
+   * [result] is computed or invalidated.
    *
    * This method should be used by plugins that need to perform some additional
    * processing after analysis has completed. One example would be a plugin that
    * needed to send a notification to the client because some data was now
    * invalidated.
    */
-  Stream<ComputedResult> onResultComputed(ResultDescriptor result);
+  Stream<ResultChangedEvent> onResultChanged(ResultDescriptor result);
 
   /**
    * Schedule sending the given [service] notifications for the given [source]
diff --git a/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart b/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
index 14bdcb3..c216260 100644
--- a/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
+++ b/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
@@ -26,9 +26,9 @@
    * A comparator that can be used to sort assists by their relevance. The most
    * relevant assists will be sorted before assists with a lower relevance.
    */
-  static final Comparator<Assist> SORT_BY_RELEVANCE = (Assist firstAssist,
-          Assist secondAssist) =>
-      firstAssist.kind.relevance - secondAssist.kind.relevance;
+  static final Comparator<Assist> SORT_BY_RELEVANCE =
+      (Assist firstAssist, Assist secondAssist) =>
+          firstAssist.kind.relevance - secondAssist.kind.relevance;
 
   /**
    * A description of the assist being proposed.
diff --git a/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart b/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
index 863ced0..5d288e3 100644
--- a/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
+++ b/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 
 import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 
diff --git a/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
index 0ff626f..aaf2c00 100644
--- a/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
@@ -27,9 +27,9 @@
    * A comparator that can be used to sort fixes by their relevance. The most
    * relevant fixes will be sorted before fixes with a lower relevance.
    */
-  static final Comparator<Fix> SORT_BY_RELEVANCE = (Fix firstFix,
-          Fix secondFix) =>
-      firstFix.kind.relevance - secondFix.kind.relevance;
+  static final Comparator<Fix> SORT_BY_RELEVANCE =
+      (Fix firstFix, Fix secondFix) =>
+          firstFix.kind.relevance - secondFix.kind.relevance;
 
   /**
    * A description of the fix being proposed.
diff --git a/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
index 6ef1bed..a0527d6 100644
--- a/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
@@ -9,7 +9,7 @@
 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart'
     show DartFixContextImpl;
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 
diff --git a/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
index eab48cd..c547af5 100644
--- a/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
@@ -7795,6 +7795,7 @@
  *   "location": Location
  *   "message": String
  *   "correction": optional String
+ *   "code": String
  *   "hasFix": optional bool
  * }
  *
@@ -7811,6 +7812,8 @@
 
   String _correction;
 
+  String _code;
+
   bool _hasFix;
 
   /**
@@ -7884,6 +7887,19 @@
   }
 
   /**
+   * The name, as a string, of the error code associated with this error.
+   */
+  String get code => _code;
+
+  /**
+   * The name, as a string, of the error code associated with this error.
+   */
+  void set code(String value) {
+    assert(value != null);
+    this._code = 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
@@ -7909,12 +7925,13 @@
     this._hasFix = value;
   }
 
-  AnalysisError(AnalysisErrorSeverity severity, AnalysisErrorType type, Location location, String message, {String correction, bool hasFix}) {
+  AnalysisError(AnalysisErrorSeverity severity, AnalysisErrorType type, Location location, String message, String code, {String correction, bool hasFix}) {
     this.severity = severity;
     this.type = type;
     this.location = location;
     this.message = message;
     this.correction = correction;
+    this.code = code;
     this.hasFix = hasFix;
   }
 
@@ -7951,11 +7968,17 @@
       if (json.containsKey("correction")) {
         correction = jsonDecoder.decodeString(jsonPath + ".correction", json["correction"]);
       }
+      String code;
+      if (json.containsKey("code")) {
+        code = jsonDecoder.decodeString(jsonPath + ".code", json["code"]);
+      } else {
+        throw jsonDecoder.missingKey(jsonPath, "code");
+      }
       bool hasFix;
       if (json.containsKey("hasFix")) {
         hasFix = jsonDecoder.decodeBool(jsonPath + ".hasFix", json["hasFix"]);
       }
-      return new AnalysisError(severity, type, location, message, correction: correction, hasFix: hasFix);
+      return new AnalysisError(severity, type, location, message, code, correction: correction, hasFix: hasFix);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "AnalysisError", json);
     }
@@ -7970,6 +7993,7 @@
     if (correction != null) {
       result["correction"] = correction;
     }
+    result["code"] = code;
     if (hasFix != null) {
       result["hasFix"] = hasFix;
     }
@@ -7987,6 +8011,7 @@
           location == other.location &&
           message == other.message &&
           correction == other.correction &&
+          code == other.code &&
           hasFix == other.hasFix;
     }
     return false;
@@ -8000,6 +8025,7 @@
     hash = JenkinsSmiHash.combine(hash, location.hashCode);
     hash = JenkinsSmiHash.combine(hash, message.hashCode);
     hash = JenkinsSmiHash.combine(hash, correction.hashCode);
+    hash = JenkinsSmiHash.combine(hash, code.hashCode);
     hash = JenkinsSmiHash.combine(hash, hasFix.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
diff --git a/pkg/analysis_server/lib/plugin/protocol/protocol.dart b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
index 9daa9f0..032e4f9 100644
--- a/pkg/analysis_server/lib/plugin/protocol/protocol.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
@@ -86,9 +86,9 @@
   /**
    * Initialize a newly created instance based on the given JSON data.
    */
-  factory Notification.fromJson(Map<String, Object> json) {
-    return new Notification(
-        json[Notification.EVENT], json[Notification.PARAMS]);
+  factory Notification.fromJson(Map json) {
+    return new Notification(json[Notification.EVENT],
+        json[Notification.PARAMS] as Map<String, Object>);
   }
 
   /**
@@ -194,7 +194,7 @@
     }
     var params = result[Request.PARAMS];
     if (params is Map || params == null) {
-      return new Request(id, method, params, time);
+      return new Request(id, method, params as Map<String, Object>, time);
     } else {
       return null;
     }
@@ -224,7 +224,7 @@
     try {
       var result = JSON.decode(data);
       if (result is Map) {
-        return new Request.fromJson(result);
+        return new Request.fromJson(result as Map<String, dynamic>);
       }
       return null;
     } catch (exception) {
@@ -368,7 +368,7 @@
   /**
    * Initialize a newly created instance based on the given JSON data.
    */
-  factory Response.fromJson(Map<String, Object> json) {
+  factory Response.fromJson(Map json) {
     try {
       Object id = json[Response.ID];
       if (id is! String) {
@@ -383,7 +383,7 @@
       Object result = json[Response.RESULT];
       Map<String, Object> decodedResult;
       if (result is Map) {
-        decodedResult = result;
+        decodedResult = result as Map<String, Object>;
       }
       return new Response(id, error: decodedError, result: decodedResult);
     } catch (exception) {
diff --git a/pkg/analysis_server/lib/src/analysis_manager.dart b/pkg/analysis_server/lib/src/analysis_manager.dart
index fd9bfcd..2e9924c 100644
--- a/pkg/analysis_server/lib/src/analysis_manager.dart
+++ b/pkg/analysis_server/lib/src/analysis_manager.dart
@@ -60,19 +60,22 @@
   /**
    * Launch an analysis server and open a connection to that server.
    */
-  Future<AnalysisManager> _launchServer(String pathToServer) {
-    // TODO dynamically allocate port and/or allow client to specify port
-    List<String> serverArgs = [pathToServer, '--port', PORT.toString()];
-    return Process.start(Platform.executable, serverArgs).catchError((error) {
+  Future<AnalysisManager> _launchServer(String pathToServer) async {
+    try {
+      // TODO dynamically allocate port and/or allow client to specify port
+      List<String> serverArgs = [pathToServer, '--port', PORT.toString()];
+      Process process = await Process.start(Platform.executable, serverArgs);
+      return _listenForPort(process);
+    } catch (error) {
       exitCode = 1;
       throw 'Failed to launch analysis server: $error';
-    }).then(_listenForPort);
+    }
   }
 
   /**
    * Listen for a port from the given analysis server process.
    */
-  Future<AnalysisManager> _listenForPort(Process process) {
+  Future<AnalysisManager> _listenForPort(Process process) async {
     this.process = process;
 
     // Echo stdout and stderr
@@ -82,18 +85,18 @@
 
     // Listen for port from server
     const String pattern = 'Listening on port ';
-    return out
-        .firstWhere((String line) => line.startsWith(pattern))
-        .timeout(new Duration(seconds: 10))
-        .catchError((error) {
-      exitCode = 1;
-      process.kill();
-      throw 'Expected port from analysis server';
-    }).then((String line) {
+    try {
+      String line = await out
+          .firstWhere((String line) => line.startsWith(pattern))
+          .timeout(new Duration(seconds: 10));
       String port = line.substring(pattern.length).trim();
       String url = 'ws://${InternetAddress.LOOPBACK_IP_V4.address}:$port/';
       return _openConnection(url);
-    });
+    } catch (error) {
+      exitCode = 1;
+      process.kill();
+      throw 'Expected port from analysis server';
+    }
   }
 
   /**
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 887c34b..6bda5f9 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -21,6 +21,8 @@
 import 'package:analysis_server/src/services/correction/namespace.dart';
 import 'package:analysis_server/src/services/index/index.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analysis_server/src/services/search/search_engine_internal.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
@@ -28,7 +30,7 @@
 import 'package:analyzer/plugin/resolver_provider.dart';
 import 'package:analyzer/source/embedder.dart';
 import 'package:analyzer/source/pub_package_map_provider.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/java_io.dart';
@@ -38,6 +40,7 @@
 import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/task/dart.dart';
 import 'package:analyzer/src/util/glob.dart';
+import 'package:analyzer/task/dart.dart';
 import 'package:plugin/plugin.dart';
 
 typedef void OptionUpdater(AnalysisOptionsImpl options);
@@ -75,14 +78,14 @@
    * The version of the analysis server. The value should be replaced
    * automatically during the build.
    */
-  static final String VERSION = '1.14.0';
+  static final String VERSION = '1.15.0';
 
   /**
    * The number of milliseconds to perform operations before inserting
    * a 1 millisecond delay so that the VM and dart:io can deliver content
    * to stdin. This should be removed once the underlying problem is fixed.
    */
-  static int performOperationDelayFreqency = 25;
+  static int performOperationDelayFrequency = 25;
 
   /**
    * The options of this server instance.
@@ -313,7 +316,7 @@
       EmbeddedResolverProvider embeddedResolverProvider: null,
       this.rethrowExceptions: true})
       : index = _index,
-        searchEngine = _index != null ? createSearchEngine(_index) : null {
+        searchEngine = _index != null ? new SearchEngineImpl(_index) : null {
     _performance = performanceDuringStartup;
     defaultContextOptions.incremental = true;
     defaultContextOptions.incrementalApi =
@@ -322,8 +325,10 @@
         options.enableIncrementalResolutionValidation;
     defaultContextOptions.generateImplicitErrors = false;
     operationQueue = new ServerOperationQueue();
+    sdkManager = new DartSdkManager(defaultSdkCreator);
     contextManager = new ContextManagerImpl(
         resourceProvider,
+        sdkManager,
         packageResolverProvider,
         embeddedResolverProvider,
         packageMapProvider,
@@ -346,12 +351,12 @@
         _performance = performanceAfterStartup;
       });
     });
+    _setupIndexInvalidation();
     Notification notification =
         new ServerConnectedParams(VERSION).toNotification();
     channel.sendNotification(notification);
     channel.listen(handleRequest, onDone: done, onError: error);
     handlers = serverPlugin.createDomains(this);
-    sdkManager = new DartSdkManager(defaultSdkCreator);
   }
 
   /**
@@ -667,23 +672,6 @@
     return context.getErrors(source);
   }
 
-// TODO(brianwilkerson) Add the following method after 'prioritySources' has
-// been added to InternalAnalysisContext.
-//  /**
-//   * Return a list containing the full names of all of the sources that are
-//   * priority sources.
-//   */
-//  List<String> getPriorityFiles() {
-//    List<String> priorityFiles = new List<String>();
-//    folderMap.values.forEach((ContextDirectory directory) {
-//      InternalAnalysisContext context = directory.context;
-//      context.prioritySources.forEach((Source source) {
-//        priorityFiles.add(source.fullName);
-//      });
-//    });
-//    return priorityFiles;
-//  }
-
   /**
    * Returns resolved [AstNode]s at the given [offset] of the given [file].
    *
@@ -701,6 +689,23 @@
     return nodes;
   }
 
+// TODO(brianwilkerson) Add the following method after 'prioritySources' has
+// been added to InternalAnalysisContext.
+//  /**
+//   * Return a list containing the full names of all of the sources that are
+//   * priority sources.
+//   */
+//  List<String> getPriorityFiles() {
+//    List<String> priorityFiles = new List<String>();
+//    folderMap.values.forEach((ContextDirectory directory) {
+//      InternalAnalysisContext context = directory.context;
+//      context.prioritySources.forEach((Source source) {
+//        priorityFiles.add(source.fullName);
+//      });
+//    });
+//    return priorityFiles;
+//  }
+
   /**
    * Returns resolved [CompilationUnit]s of the Dart file with the given [path].
    *
@@ -1201,7 +1206,6 @@
   void shutdown() {
     running = false;
     if (index != null) {
-      index.clear();
       index.stop();
     }
     // Defer closing the channel and shutting down the instrumentation server so
@@ -1270,6 +1274,14 @@
         // Protocol parsing should have ensured that we never get here.
         throw new AnalysisException('Illegal change type');
       }
+
+      AnalysisContext containingContext = getContainingContext(file);
+
+      // Check for an implicitly added but missing source.
+      // (For example, the target of an import might not exist yet.)
+      // We need to do this before setContents, which changes the stamp.
+      bool wasMissing = containingContext?.getModificationStamp(source) == -1;
+
       overlayState.setContents(source, newContents);
       // If the source does not exist, then it was an overlay-only one.
       // Remove it from contexts.
@@ -1289,6 +1301,11 @@
         List<Source> sources = context.getSourcesWithFullName(file);
         sources.forEach((Source source) {
           anyContextUpdated = true;
+          if (context == containingContext && wasMissing) {
+            // Promote missing source to an explicitly added Source.
+            context.applyChanges(new ChangeSet()..addedSource(source));
+            schedulePerformAnalysisOperation(context);
+          }
           if (context.handleContentsChanged(
               source, oldContents, newContents, true)) {
             schedulePerformAnalysisOperation(context);
@@ -1413,7 +1430,7 @@
   }
 
   /**
-   * Schedules [performOperation] exection.
+   * Schedules [performOperation] execution.
    */
   void _schedulePerformOperation() {
     if (performOperationPending) {
@@ -1427,18 +1444,56 @@
      * every 25 milliseconds.
      *
      * To disable this workaround and see the underlying problem,
-     * set performOperationDelayFreqency to zero
+     * set performOperationDelayFrequency to zero
      */
     int now = new DateTime.now().millisecondsSinceEpoch;
     if (now > _nextPerformOperationDelayTime &&
-        performOperationDelayFreqency > 0) {
-      _nextPerformOperationDelayTime = now + performOperationDelayFreqency;
+        performOperationDelayFrequency > 0) {
+      _nextPerformOperationDelayTime = now + performOperationDelayFrequency;
       new Future.delayed(new Duration(milliseconds: 1), performOperation);
     } else {
       new Future(performOperation);
     }
     performOperationPending = true;
   }
+
+  /**
+   * Listen for context events and invalidate index.
+   *
+   * It is possible that this method will do more in the future, e.g. listening
+   * for summary information and linking pre-indexed packages into the index,
+   * but for now we only invalidate project specific index information.
+   */
+  void _setupIndexInvalidation() {
+    if (index == null) {
+      return;
+    }
+    onContextsChanged.listen((ContextsChangedEvent event) {
+      for (AnalysisContext context in event.added) {
+        context
+            .onResultChanged(RESOLVED_UNIT3)
+            .listen((ResultChangedEvent event) {
+          if (event.wasComputed) {
+            Object value = event.value;
+            if (value is CompilationUnit) {
+              index.indexDeclarations(value);
+            }
+          }
+        });
+        context
+            .onResultChanged(RESOLVED_UNIT)
+            .listen((ResultChangedEvent event) {
+          if (event.wasInvalidated) {
+            LibrarySpecificUnit target = event.target;
+            index.removeUnit(event.context, target.library, target.unit);
+          }
+        });
+      }
+      for (AnalysisContext context in event.removed) {
+        index.removeContext(context);
+      }
+    });
+  }
 }
 
 class AnalysisServerOptions {
@@ -1532,9 +1587,6 @@
     AnalysisContext context = analysisServer.folderMap.remove(folder);
     sendAnalysisNotificationFlushResults(analysisServer, flushedFiles);
 
-    if (analysisServer.index != null) {
-      analysisServer.index.removeContext(context);
-    }
     analysisServer.operationQueue.contextRemoved(context);
     analysisServer._onContextsChangedController
         .add(new ContextsChangedEvent(removed: [context]));
@@ -1544,11 +1596,7 @@
   }
 
   @override
-  void updateContextPackageUriResolver(
-      Folder contextFolder, FolderDisposition disposition) {
-    AnalysisContext context = analysisServer.folderMap[contextFolder];
-    context.sourceFactory = _createSourceFactory(
-        context, context.analysisOptions, disposition, contextFolder);
+  void updateContextPackageUriResolver(AnalysisContext context) {
     analysisServer._onContextsChangedController
         .add(new ContextsChangedEvent(changed: [context]));
     analysisServer.schedulePerformAnalysisOperation(context);
@@ -1641,7 +1689,7 @@
   int slowRequestCount = 0;
 
   /**
-   * Log performation information about the given request.
+   * Log performance information about the given request.
    */
   void logRequest(Request request) {
     ++requestCount;
@@ -1696,7 +1744,7 @@
   static PerformanceTag pub = new PerformanceTag('pub');
 
   /**
-   * The [PerformanceTag] for time spent in server comminication channels.
+   * The [PerformanceTag] for time spent in server communication channels.
    */
   static PerformanceTag serverChannel = new PerformanceTag('serverChannel');
 
diff --git a/pkg/analysis_server/lib/src/channel/channel.dart b/pkg/analysis_server/lib/src/channel/channel.dart
index f3e473d..bee6f35 100644
--- a/pkg/analysis_server/lib/src/channel/channel.dart
+++ b/pkg/analysis_server/lib/src/channel/channel.dart
@@ -85,12 +85,13 @@
  * Instances of the class [JsonStreamDecoder] convert JSON strings to JSON
  * maps.
  */
-class JsonStreamDecoder extends Converter<String, Map> {
+class JsonStreamDecoder extends
+    ChunkedConverter<String, Map, String, Map> {
   @override
   Map convert(String text) => JSON.decode(text);
 
   @override
-  ChunkedConversionSink startChunkedConversion(Sink sink) =>
+  ChunkedConversionSink<String> startChunkedConversion(Sink<Map> sink) =>
       new ChannelChunkSink<String, Map>(this, sink);
 }
 
@@ -98,24 +99,26 @@
  * Instances of the class [NotificationConverter] convert JSON maps to
  * [Notification]s.
  */
-class NotificationConverter extends Converter<Map, Notification> {
+class NotificationConverter extends
+    ChunkedConverter<Map, Notification, Map, Notification> {
   @override
   Notification convert(Map json) => new Notification.fromJson(json);
 
   @override
-  ChunkedConversionSink startChunkedConversion(Sink sink) =>
+  ChunkedConversionSink<Map> startChunkedConversion(Sink<Notification> sink) =>
       new ChannelChunkSink<Map, Notification>(this, sink);
 }
 
 /**
  * Instances of the class [ResponseConverter] convert JSON maps to [Response]s.
  */
-class ResponseConverter extends Converter<Map, Response> {
+class ResponseConverter extends
+    ChunkedConverter<Map, Response, Map, Response> {
   @override
   Response convert(Map json) => new Response.fromJson(json);
 
   @override
-  ChunkedConversionSink startChunkedConversion(Sink sink) =>
+  ChunkedConversionSink<Map> startChunkedConversion(Sink<Response> sink) =>
       new ChannelChunkSink<Map, Response>(this, sink);
 }
 
diff --git a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
index 961bee6..0368eb6 100644
--- a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
@@ -90,7 +90,7 @@
 
   @override
   void listen(void onRequest(Request request),
-      {void onError(), void onDone()}) {
+      {Function onError, void onDone()}) {
     socket.listen((data) => readRequest(data, onRequest),
         onError: onError, onDone: onDone);
   }
diff --git a/pkg/analysis_server/lib/src/collections.dart b/pkg/analysis_server/lib/src/collections.dart
index 1a1ba38..f8ae2e4 100644
--- a/pkg/analysis_server/lib/src/collections.dart
+++ b/pkg/analysis_server/lib/src/collections.dart
@@ -5,21 +5,23 @@
 library collections;
 
 /**
- * Returns the concatentation of the input iterables.
+ * Returns the concatenation of the input [iterables].
  *
  * The returned iterable is a lazily-evaluated view on the input iterables.
  */
-Iterable concat(Iterable<Iterable> iterables) => iterables.expand((x) => x);
+Iterable/*<E>*/ concat/*<E>*/(Iterable<Iterable/*<E>*/ > iterables) =>
+    iterables.expand((x) => x);
 
 /**
- * Returns the concatentation of the input iterables as a [List].
+ * Returns the concatenation of the input [iterables] as a [List].
  */
-List concatToList(Iterable<Iterable> iterables) => concat(iterables).toList();
+List/*<E>*/ concatToList/*<E>*/(Iterable<Iterable/*<E>*/ > iterables) =>
+    concat(iterables).toList();
 
 /**
  * Returns the given [list] if it is not empty, or `null` otherwise.
  */
-List nullIfEmpty(List list) {
+List/*<E>*/ nullIfEmpty/*<E>*/(List/*<E>*/ list) {
   if (list == null) {
     return null;
   }
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index ed5e8e9..1214ea4 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -5,10 +5,11 @@
 library computer.highlights;
 
 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
+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/generated/ast.dart';
 
 /**
  * A computer for [HighlightRegion]s in a Dart [CompilationUnit].
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
index 5665d49..bfc9d66 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
@@ -5,10 +5,11 @@
 library computer.highlights2;
 
 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
+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/generated/ast.dart';
 
 /**
  * A computer for [HighlightRegion]s in a Dart [CompilationUnit].
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index 02c4f70..33b5941 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -8,9 +8,10 @@
     show HoverInformation;
 import 'package:analysis_server/src/computer/computer_overrides.dart';
 import 'package:analysis_server/src/utilities/documentation.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 
 /**
  * A computer for the hover at the specified offset of a Dart [CompilationUnit].
@@ -76,10 +77,26 @@
       // parameter
       hover.parameter = _safeToString(expression.bestParameterElement);
       // types
-      if (element == null || element is VariableElement) {
-        hover.staticType = _safeToString(expression.staticType);
+      {
+        AstNode parent = expression.parent;
+        DartType staticType = null;
+        DartType propagatedType = expression.propagatedType;
+        if (element == null || element is VariableElement) {
+          staticType = expression.staticType;
+        }
+        if (parent is MethodInvocation && parent.methodName == expression) {
+          staticType = parent.staticInvokeType;
+          propagatedType = parent.propagatedInvokeType;
+          if (staticType != null && staticType.isDynamic) {
+            staticType = null;
+          }
+          if (propagatedType != null && propagatedType.isDynamic) {
+            propagatedType = null;
+          }
+        }
+        hover.staticType = _safeToString(staticType);
+        hover.propagatedType = _safeToString(propagatedType);
       }
-      hover.propagatedType = _safeToString(expression.propagatedType);
       // done
       return hover;
     }
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index 55c6560..8603884 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -6,9 +6,10 @@
 
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/collections.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/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/computer/computer_overrides.dart b/pkg/analysis_server/lib/src/computer/computer_overrides.dart
index 4eb93d1..018999a 100644
--- a/pkg/analysis_server/lib/src/computer/computer_overrides.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_overrides.dart
@@ -6,9 +6,9 @@
 
 import 'package:analysis_server/src/collections.dart';
 import 'package:analysis_server/src/protocol_server.dart' as proto;
+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/ast.dart';
 
 /**
  * Return the elements that the given [element] overrides.
@@ -138,6 +138,14 @@
   _OverriddenElementsFinder(Element seed) {
     _seed = seed;
     _class = seed.enclosingElement;
+    if (_class == null) {
+      // TODO(brianwilkerson) Remove this code when the issue has been fixed
+      // (https://github.com/dart-lang/sdk/issues/25884)
+      Type type = seed.runtimeType;
+      String name = seed.name;
+      throw new ArgumentError(
+          'The $type named $name does not have an enclosing element');
+    }
     _library = _class.library;
     _name = seed.displayName;
     if (seed is MethodElement) {
diff --git a/pkg/analysis_server/lib/src/constants.dart b/pkg/analysis_server/lib/src/constants.dart
index 0d90251..5054f7b 100644
--- a/pkg/analysis_server/lib/src/constants.dart
+++ b/pkg/analysis_server/lib/src/constants.dart
@@ -7,137 +7,124 @@
 //
 // Server methods
 //
-const String SERVER_GET_VERSION = 'server.getVersion';
-const String SERVER_SHUTDOWN = 'server.shutdown';
-const String SERVER_SET_SUBSCRIPTIONS = 'server.setSubscriptions';
+const String ADD = 'add';
+const String ADDED = 'added';
+const String ANALYSIS_ANALYZED_FILES = 'analysis.analyzedFiles';
 
 //
 // Server notifications
 //
-const String SERVER_CONNECTED = 'server.connected';
-const String SERVER_ERROR = 'server.error';
-const String SERVER_STATUS = 'server.status';
+const String ANALYSIS_ERRORS = 'analysis.errors';
+const String ANALYSIS_GET_ERRORS = 'analysis.getErrors';
+const String ANALYSIS_GET_HOVER = 'analysis.getHover';
 
 //
 // Analysis methods
 //
-const String ANALYSIS_GET_ERRORS = 'analysis.getErrors';
-const String ANALYSIS_GET_HOVER = 'analysis.getHover';
 const String ANALYSIS_GET_LIBRARY_DEPENDENCIES =
     'analysis.getLibraryDependencies';
 const String ANALYSIS_GET_NAVIGATION = 'analysis.getNavigation';
 const String ANALYSIS_GET_REACHABLE_SOURCES = 'analysis.getReachableSources';
-const String ANALYSIS_REANALYZE = 'analysis.reanalyze';
-const String ANALYSIS_SET_ANALYSIS_ROOTS = 'analysis.setAnalysisRoots';
-const String ANALYSIS_SET_GENERAL_SUBSCRIPTIONS =
-    'analysis.setGeneralSubscriptions';
-const String ANALYSIS_SET_PRIORITY_FILES = 'analysis.setPriorityFiles';
-const String ANALYSIS_SET_SUBSCRIPTIONS = 'analysis.setSubscriptions';
-const String ANALYSIS_UPDATE_CONTENT = 'analysis.updateContent';
-const String ANALYSIS_UPDATE_OPTIONS = 'analysis.updateOptions';
-
-//
-// Analysis notifications
-//
-const String ANALYSIS_ANALYZED_FILES = 'analysis.analyzedFiles';
-const String ANALYSIS_ERRORS = 'analysis.errors';
 const String ANALYSIS_HIGHLIGHTS = 'analysis.highlights';
 const String ANALYSIS_IMPLEMENTED = 'analysis.implemented';
 const String ANALYSIS_NAVIGATION = 'analysis.navigation';
 const String ANALYSIS_OCCURRENCES = 'analysis.occurrences';
 const String ANALYSIS_OUTLINE = 'analysis.outline';
 const String ANALYSIS_OVERRIDES = 'analysis.overrides';
+const String ANALYSIS_REANALYZE = 'analysis.reanalyze';
+const String ANALYSIS_SET_ANALYSIS_ROOTS = 'analysis.setAnalysisRoots';
+const String ANALYSIS_SET_GENERAL_SUBSCRIPTIONS =
+    'analysis.setGeneralSubscriptions';
+
+//
+// Analysis notifications
+//
+const String ANALYSIS_SET_PRIORITY_FILES = 'analysis.setPriorityFiles';
+const String ANALYSIS_SET_SUBSCRIPTIONS = 'analysis.setSubscriptions';
+const String ANALYSIS_UPDATE_CONTENT = 'analysis.updateContent';
+const String ANALYSIS_UPDATE_OPTIONS = 'analysis.updateOptions';
+const String ASSISTS = 'assists';
+const String CHANGE = 'change';
+const String CHILDREN = 'children';
+const String CLASS_ELEMENT = 'classElement';
 
 //
 // Code Completion methods
 //
-const String COMPLETION_GET_SUGGESTIONS = 'completion.getSuggestions';
+const String CLASS_NAME = 'className';
 
 //
 // Code Completion notifications
 //
-const String COMPLETION_RESULTS = 'completion.results';
+const String CODE = 'code';
 
 //
 // Search methods
 //
-const String SEARCH_FIND_ELEMENT_REFERENCES = 'search.findElementReferences';
-const String SEARCH_FIND_MEMBER_DECLARATIONS = 'search.findMemberDeclarations';
-const String SEARCH_FIND_MEMBER_REFERENCES = 'search.findMemberReferences';
-const String SEARCH_FIND_TOP_LEVEL_DECLARATIONS =
-    'search.findTopLevelDeclarations';
-const String SEARCH_GET_TYPE_HIERARCHY = 'search.getTypeHierarchy';
+const String COMPLETION = 'completion';
+const String COMPLETION_GET_SUGGESTIONS = 'completion.getSuggestions';
+const String COMPLETION_RESULTS = 'completion.results';
+const String CONTAINING_LIBRARY_NAME = 'containingLibraryName';
+const String CONTAINING_LIBRARY_PATH = 'containingLibraryPath';
 
 //
 // Search notifications
 //
-const String SEARCH_RESULTS = 'search.results';
+const String CONTENT = 'content';
 
 //
 // Edit methods
 //
+const String CORRECTION = 'correction';
+const String DART_DOC = 'dartdoc';
+const String DEFAULT = 'default';
+const String DISPLAY_NAME = 'displayName';
 const String EDIT_FORMAT = 'edit.format';
 const String EDIT_GET_ASSISTS = 'edit.getAssists';
 const String EDIT_GET_AVAILABLE_REFACTORINGS = 'edit.getAvailableRefactorings';
+
+//
+// Execution methods
+//
 const String EDIT_GET_FIXES = 'edit.getFixes';
 const String EDIT_GET_REFACTORING = 'edit.getRefactoring';
 const String EDIT_ORGANIZE_DIRECTIVES = 'edit.organizeDirectives';
 const String EDIT_SORT_MEMBERS = 'edit.sortMembers';
 
 //
-// Execution methods
-//
-const String EXECUTION_CREATE_CONTEXT = 'execution.createContext';
-const String EXECUTION_DELETE_CONTEXT = 'execution.deleteContext';
-const String EXECUTION_MAP_URI = 'execution.mapUri';
-const String EXECUTION_SET_SUBSCRIPTIONS = 'execution.setSubscriptions';
-
-//
 // Execution notifications
 //
-const String EXECUTION_LAUNCH_DATA = 'execution.launchData';
+const String EDITS = 'edits';
 
 //
 // Analysis option names
 //
+const String ELEMENT = 'element'; // boolean
+const String ELEMENT_DESCRIPTION = 'elementDescription'; // boolean
+const String ELEMENT_KIND = 'elementKind'; // boolean
 const String ENABLE_ASYNC = 'enableAsync'; // boolean
 const String ENABLE_DEFERRED_LOADING = 'enableDeferredLoading'; // boolean
-const String ENABLE_ENUMS = 'enableEnums'; // boolean
-const String GENERATE_DART2JS_HINTS = 'generateDart2jsHints'; // boolean
-const String GENERATE_HINTS = 'generateHints'; // boolean
 
 //
 // Property names
 //
-const String ADD = 'add';
-const String ADDED = 'added';
-const String ASSISTS = 'assists';
-const String CHANGE = 'change';
-const String CHILDREN = 'children';
-const String CLASS_ELEMENT = 'classElement';
-const String CLASS_NAME = 'className';
-const String CODE = 'code';
-const String COMPLETION = 'completion';
-const String CONTAINING_LIBRARY_NAME = 'containingLibraryName';
-const String CONTAINING_LIBRARY_PATH = 'containingLibraryPath';
-const String CONTENT = 'content';
-const String CORRECTION = 'correction';
-const String DART_DOC = 'dartdoc';
-const String DEFAULT = 'default';
-const String DISPLAY_NAME = 'displayName';
-const String EDITS = 'edits';
-const String ELEMENT = 'element';
-const String ELEMENT_DESCRIPTION = 'elementDescription';
-const String ELEMENT_KIND = 'elementKind';
-const String EXCLUDED = 'excluded';
+const String ENABLE_ENUMS = 'enableEnums';
 const String ERROR = 'error';
 const String ERRORS = 'errors';
+const String EXCLUDED = 'excluded';
+const String EXECUTION_CREATE_CONTEXT = 'execution.createContext';
+const String EXECUTION_DELETE_CONTEXT = 'execution.deleteContext';
+const String EXECUTION_LAUNCH_DATA = 'execution.launchData';
+const String EXECUTION_MAP_URI = 'execution.mapUri';
+const String EXECUTION_SET_SUBSCRIPTIONS = 'execution.setSubscriptions';
 const String FATAL = 'fatal';
 const String FILE = 'file';
 const String FILE_STAMP = 'fileStamp';
 const String FILES = 'files';
 const String FIXES = 'fixes';
 const String FLAGS = 'flags';
+const String GENERATE_DART2JS_HINTS = 'generateDart2jsHints';
+const String GENERATE_HINTS = 'generateHints';
 const String HAS_FIX = 'hasFix';
 const String HIERARCHY_ITEMS = 'hierarchyItems';
 const String HOVERS = 'hovers';
@@ -178,14 +165,27 @@
 const String REMOVE = 'remove';
 const String REMOVED = 'removed';
 const String REPLACEMENT = 'replacement';
-const String REPLACEMENT_OFFSET = 'replacementOffset';
 const String REPLACEMENT_LENGTH = 'replacementLength';
-const String RETURN_TYPE = 'returnType';
+const String REPLACEMENT_OFFSET = 'replacementOffset';
 const String RESULTS = 'results';
+const String RETURN_TYPE = 'returnType';
+const String SEARCH_FIND_ELEMENT_REFERENCES = 'search.findElementReferences';
+const String SEARCH_FIND_MEMBER_DECLARATIONS = 'search.findMemberDeclarations';
+const String SEARCH_FIND_MEMBER_REFERENCES = 'search.findMemberReferences';
+const String SEARCH_FIND_TOP_LEVEL_DECLARATIONS =
+    'search.findTopLevelDeclarations';
+const String SEARCH_GET_TYPE_HIERARCHY = 'search.getTypeHierarchy';
+const String SEARCH_RESULTS = 'search.results';
 const String SELECTION = 'selection';
-const String SEVERITY = 'severity';
 const String SELECTION_LENGTH = 'selectionLength';
 const String SELECTION_OFFSET = 'selectionOffset';
+const String SERVER_CONNECTED = 'server.connected';
+const String SERVER_ERROR = 'server.error';
+const String SERVER_GET_VERSION = 'server.getVersion';
+const String SERVER_SET_SUBSCRIPTIONS = 'server.setSubscriptions';
+const String SERVER_SHUTDOWN = 'server.shutdown';
+const String SERVER_STATUS = 'server.status';
+const String SEVERITY = 'severity';
 const String STACK_TRACE = 'stackTrace';
 const String START_COLUMN = 'startColumn';
 const String START_LINE = 'startLine';
@@ -193,8 +193,8 @@
 const String SUBCLASSES = 'subclasses';
 const String SUBSCRIPTIONS = 'subscriptions';
 const String SUGGESTIONS = 'suggestions';
-const String SUPERCLASS = 'superclass';
 const String SUPER_CLASS_MEMBER = 'superclassMember';
+const String SUPERCLASS = 'superclass';
 const String TARGETS = 'targets';
 const String TYPE = 'type';
 const String VALUE = 'value';
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index c81ce7f..3afe0f2 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -27,6 +27,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/java_io.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/task/options.dart';
@@ -45,11 +46,6 @@
  */
 class ContextInfo {
   /**
-   * The [ContextManager] which is tracking this information.
-   */
-  final ContextManagerImpl contextManager;
-
-  /**
    * The [Folder] for which this information object is created.
    */
   final Folder folder;
@@ -101,8 +97,7 @@
 
   ContextInfo(ContextManagerImpl contextManager, this.parent, Folder folder,
       File packagespecFile, this.packageRoot)
-      : contextManager = contextManager,
-        folder = folder,
+      : folder = folder,
         pathFilter = new PathFilter(
             folder.path, null, contextManager.resourceProvider.pathContext) {
     packageDescriptionPath = packagespecFile.path;
@@ -114,8 +109,7 @@
    * [ContextInfo]s.
    */
   ContextInfo._root()
-      : contextManager = null,
-        folder = null,
+      : folder = null,
         pathFilter = null;
 
   /**
@@ -348,10 +342,9 @@
   void removeContext(Folder folder, List<String> flushedFiles);
 
   /**
-   * Called when the disposition for a context has changed.
+   * Called when the package resolution for the given [context] has changed.
    */
-  void updateContextPackageUriResolver(
-      Folder contextFolder, FolderDisposition disposition);
+  void updateContextPackageUriResolver(AnalysisContext context);
 }
 
 /**
@@ -390,6 +383,12 @@
   final ResourceProvider resourceProvider;
 
   /**
+   * The manager used to access the SDK that should be associated with a
+   * particular context.
+   */
+  final DartSdkManager sdkManager;
+
+  /**
    * The context used to work with absolute file system paths.
    *
    * TODO(scheglov) remove [pathContext].
@@ -488,6 +487,7 @@
 
   ContextManagerImpl(
       this.resourceProvider,
+      this.sdkManager,
       this.packageResolverProvider,
       this.embeddedUriResolverProvider,
       this._packageMapProvider,
@@ -585,7 +585,7 @@
       info.context.analysisOptions = new AnalysisOptionsImpl();
 
       // Apply inherited options.
-      options = _getEmbeddedOptions(info.context);
+      options = _toStringMap(_getEmbeddedOptions(info.context));
       if (options != null) {
         configureContextOptions(info.context, options);
       }
@@ -593,7 +593,7 @@
       // Check for embedded options.
       YamlMap embeddedOptions = _getEmbeddedOptions(info.context);
       if (embeddedOptions != null) {
-        options = new Merger().merge(embeddedOptions, options);
+        options = _toStringMap(new Merger().merge(embeddedOptions, options));
       }
     }
 
@@ -617,26 +617,24 @@
     }
 
     var analyzer = options[AnalyzerOptions.analyzer];
-    if (analyzer is! Map) {
-      // Done.
-      return;
-    }
-
-    // Set ignore patterns.
-    YamlList exclude = analyzer[AnalyzerOptions.exclude];
-    if (exclude != null) {
-      setIgnorePatternsForContext(info, exclude);
+    if (analyzer is Map) {
+      // Set ignore patterns.
+      YamlList exclude = analyzer[AnalyzerOptions.exclude];
+      List<String> excludeList = _toStringList(exclude);
+      if (excludeList != null) {
+        setIgnorePatternsForContext(info, excludeList);
+      }
     }
   }
 
   /**
-   * Return the options from the analysis options file in the given [folder], or
-   * `null` if there is no file in the folder or if the contents of the file are
-   * not valid YAML.
+   * Return the options from the analysis options file in the given [folder]
+   * if exists, or in one of the parent folders, or `null` if no analysis
+   * options file is found or if the contents of the file are not valid YAML.
    */
   Map<String, Object> readOptions(Folder folder) {
     try {
-      return analysisOptionsProvider.getOptions(folder);
+      return analysisOptionsProvider.getOptions(folder, crawlUp: true);
     } catch (_) {
       // Parse errors are reported by GenerateOptionsErrorsTask.
     }
@@ -928,7 +926,7 @@
         if (info.isPathToPackageDescription(path)) {
           Packages packages = _readPackagespec(packagespec);
           if (packages != null) {
-            callbacks.updateContextPackageUriResolver(
+            _updateContextPackageUriResolver(
                 folder, new PackagesFileDisposition(packages));
           }
         }
@@ -1065,6 +1063,7 @@
 
     info.setDependencies(dependencies);
     info.context = callbacks.addContext(folder, options, disposition);
+    folderMap[folder] = info.context;
     info.context.name = folder.path;
 
     processOptionsForContext(info, optionMap);
@@ -1130,6 +1129,41 @@
   }
 
   /**
+   * Set up a [SourceFactory] that resolves packages as appropriate for the
+   * given [disposition].
+   */
+  SourceFactory _createSourceFactory(InternalAnalysisContext context,
+      AnalysisOptions options, FolderDisposition disposition, Folder folder) {
+    List<UriResolver> resolvers = [];
+    List<UriResolver> packageUriResolvers =
+        disposition.createPackageUriResolvers(resourceProvider);
+
+    EmbedderUriResolver embedderUriResolver;
+
+    // First check for a resolver provider.
+    if (embeddedUriResolverProvider != null) {
+      embedderUriResolver = embeddedUriResolverProvider(folder);
+    }
+
+    // If no embedded URI resolver was provided, defer to a locator-backed one.
+    embedderUriResolver ??=
+        new EmbedderUriResolver(context.embedderYamlLocator.embedderYamls);
+    if (embedderUriResolver.length == 0) {
+      // The embedder uri resolver has no mappings. Use the default Dart SDK
+      // uri resolver.
+      resolvers.add(new DartUriResolver(sdkManager.getSdkForOptions(options)));
+    } else {
+      // The embedder uri resolver has mappings, use it instead of the default
+      // Dart SDK uri resolver.
+      resolvers.add(embedderUriResolver);
+    }
+
+    resolvers.addAll(packageUriResolvers);
+    resolvers.add(new ResourceUriResolver(resourceProvider));
+    return new SourceFactory(resolvers, disposition.packages);
+  }
+
+  /**
    * Clean up and destroy the context associated with the given folder.
    */
   void _destroyContext(ContextInfo info) {
@@ -1499,7 +1533,7 @@
     FolderDisposition disposition = _computeFolderDisposition(
         info.folder, dependencies.add, _findPackageSpecFile(info.folder));
     info.setDependencies(dependencies);
-    callbacks.updateContextPackageUriResolver(info.folder, disposition);
+    _updateContextPackageUriResolver(info.folder, disposition);
   }
 
   /**
@@ -1521,6 +1555,52 @@
   }
 
   /**
+   * If all of the elements of [list] are strings, return a list of strings
+   * containing the same elements. Otherwise, return `null`.
+   */
+  List<String> _toStringList(YamlList list) {
+    if (list == null) {
+      return null;
+    }
+    List<String> stringList = <String>[];
+    for (var element in list) {
+      if (element is String) {
+        stringList.add(element);
+      } else {
+        return null;
+      }
+    }
+    return stringList;
+  }
+
+  /**
+   * If the given [object] is a map, and all of the keys in the map are strings,
+   * return a map containing the same mappings. Otherwise, return `null`.
+   */
+  Map<String, Object> _toStringMap(Object object) {
+    if (object is Map) {
+      Map<String, Object> stringMap = new HashMap<String, Object>();
+      for (var key in object.keys) {
+        if (key is String) {
+          stringMap[key] = object[key];
+        } else {
+          return null;
+        }
+      }
+      return stringMap;
+    }
+    return null;
+  }
+
+  void _updateContextPackageUriResolver(
+      Folder contextFolder, FolderDisposition disposition) {
+    AnalysisContext context = folderMap[contextFolder];
+    context.sourceFactory = _createSourceFactory(
+        context, context.analysisOptions, disposition, contextFolder);
+    callbacks.updateContextPackageUriResolver(context);
+  }
+
+  /**
    * Create and return a source representing the given [file] within the given
    * [context].
    */
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index 7bfb354..df307fb 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -22,9 +22,9 @@
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/services/dependencies/library_dependencies.dart';
 import 'package:analysis_server/src/services/dependencies/reachable_source_collector.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart' as engine;
 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException;
 import 'package:analyzer/src/generated/source.dart';
@@ -362,9 +362,9 @@
 class AnalysisDomainImpl implements AnalysisDomain {
   final AnalysisServer server;
 
-  final Map<ResultDescriptor, StreamController<engine.ComputedResult>>
+  final Map<ResultDescriptor, StreamController<engine.ResultChangedEvent>>
       controllers =
-      <ResultDescriptor, StreamController<engine.ComputedResult>>{};
+      <ResultDescriptor, StreamController<engine.ResultChangedEvent>>{};
 
   AnalysisDomainImpl(this.server) {
     server.onContextsChanged.listen((ContextsChangedEvent event) {
@@ -373,11 +373,12 @@
   }
 
   @override
-  Stream<engine.ComputedResult> onResultComputed(ResultDescriptor descriptor) {
-    Stream<engine.ComputedResult> stream = controllers
-        .putIfAbsent(descriptor,
-            () => new StreamController<engine.ComputedResult>.broadcast())
-        .stream;
+  Stream<engine.ResultChangedEvent> onResultChanged(
+      ResultDescriptor descriptor) {
+    Stream<engine.ResultChangedEvent> stream =
+        controllers.putIfAbsent(descriptor, () {
+      return new StreamController<engine.ResultChangedEvent>.broadcast();
+    }).stream;
     server.analysisContexts.forEach(_subscribeForContext);
     return stream;
   }
@@ -398,8 +399,8 @@
 
   void _subscribeForContext(engine.AnalysisContext context) {
     for (ResultDescriptor descriptor in controllers.keys) {
-      context.onResultComputed(descriptor).listen((result) {
-        StreamController<engine.ComputedResult> controller =
+      context.onResultChanged(descriptor).listen((result) {
+        StreamController<engine.ResultChangedEvent> controller =
             controllers[result.descriptor];
         if (controller != null) {
           controller.add(result);
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 20ddb4f..7a7a870 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
@@ -6,10 +6,12 @@
 
 import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 
@@ -125,21 +127,21 @@
     }
     computer._addRegionForNode(node.constructorName, element);
     // arguments
-    _safelyVisit(node.arguments);
+    node.arguments?.accept(this);
   }
 
   @override
   visitAssignmentExpression(AssignmentExpression node) {
-    _safelyVisit(node.leftHandSide);
+    node.leftHandSide?.accept(this);
     computer._addRegionForToken(node.operator, node.bestElement);
-    _safelyVisit(node.rightHandSide);
+    node.rightHandSide?.accept(this);
   }
 
   @override
   visitBinaryExpression(BinaryExpression node) {
-    _safelyVisit(node.leftOperand);
+    node.leftOperand?.accept(this);
     computer._addRegionForToken(node.operator, node.bestElement);
-    _safelyVisit(node.rightOperand);
+    node.rightOperand?.accept(this);
   }
 
   @override
@@ -253,7 +255,7 @@
     computer._addRegionForToken(node.thisKeyword, element);
     computer._addRegionForNode(node.constructorName, element);
     // process arguments
-    _safelyVisit(node.argumentList);
+    node.argumentList?.accept(this);
   }
 
   @override
@@ -275,7 +277,7 @@
     computer._addRegionForToken(node.superKeyword, element);
     computer._addRegionForNode(node.constructorName, element);
     // process arguments
-    _safelyVisit(node.argumentList);
+    node.argumentList?.accept(this);
   }
 
   void _addConstructorName(AstNode parent, ConstructorName node) {
@@ -322,10 +324,4 @@
       }
     }
   }
-
-  void _safelyVisit(AstNode node) {
-    if (node != null) {
-      node.accept(this);
-    }
-  }
 }
diff --git a/pkg/analysis_server/lib/src/domains/analysis/occurrences_dart.dart b/pkg/analysis_server/lib/src/domains/analysis/occurrences_dart.dart
index 7eea646..9434d19 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/occurrences_dart.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/occurrences_dart.dart
@@ -6,10 +6,11 @@
 
 import 'package:analysis_server/plugin/analysis/occurrences/occurrences_core.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
+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/member.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index 4197555..260f67f 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -19,9 +19,9 @@
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart' as engine;
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart' as engine;
 import 'package:analyzer/src/generated/error.dart' as engine;
 import 'package:analyzer/src/generated/parser.dart' as engine;
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index 3b2c724..6f71721 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -15,10 +15,9 @@
 import 'package:analysis_server/src/operation/operation.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
 import 'package:analysis_server/src/services/dependencies/library_dependencies.dart';
-import 'package:analysis_server/src/services/index/index.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -251,10 +250,12 @@
  * Sets the cache size in the given [context] to the given value.
  */
 void setCacheSize(AnalysisContext context, int cacheSize) {
-  AnalysisOptionsImpl options =
-      new AnalysisOptionsImpl.from(context.analysisOptions);
-  options.cacheSize = cacheSize;
-  context.analysisOptions = options;
+  // TODO(scheglov) The cache size cannot be changed with task model.
+  // TODO(scheglov) Consider removing this function.
+//  AnalysisOptionsImpl options =
+//      new AnalysisOptionsImpl.from(context.analysisOptions);
+//  options.cacheSize = cacheSize;
+//  context.analysisOptions = options;
 }
 
 String _computeLibraryName(CompilationUnit unit) {
@@ -456,9 +457,7 @@
   void perform(AnalysisServer server) {
     ServerPerformanceStatistics.indexOperation.makeCurrentWhile(() {
       try {
-        Index index = server.index;
-        AnalysisContext context = unit.element.context;
-        index.index(context, unit);
+        server.index?.indexUnit(unit);
       } catch (exception, stackTrace) {
         server.sendServerErrorNotification(
             'Failed to index: $file', exception, stackTrace);
diff --git a/pkg/analysis_server/lib/src/plugin/server_plugin.dart b/pkg/analysis_server/lib/src/plugin/server_plugin.dart
index b35d5bd..91ecb32 100644
--- a/pkg/analysis_server/lib/src/plugin/server_plugin.dart
+++ b/pkg/analysis_server/lib/src/plugin/server_plugin.dart
@@ -25,12 +25,9 @@
 import 'package:analysis_server/src/domains/analysis/occurrences_dart.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart';
-import 'package:analysis_server/src/provisional/index/index.dart';
-import 'package:analysis_server/src/provisional/index/index_core.dart';
 import 'package:analysis_server/src/search/search_domain.dart';
 import 'package:analysis_server/src/services/correction/assist_internal.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart';
-import 'package:analysis_server/src/services/index/index_contributor.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:plugin/plugin.dart';
 
@@ -138,11 +135,6 @@
   ExtensionPoint fixContributorExtensionPoint;
 
   /**
-   * The extension point that allows plugins to register index contributors.
-   */
-  ExtensionPoint indexContributorExtensionPoint;
-
-  /**
    * The extension point that allows plugins to register navigation
    * contributors.
    */
@@ -200,13 +192,6 @@
       fixContributorExtensionPoint.extensions;
 
   /**
-   * Return a list containing all of the index contributors that were
-   * contributed.
-   */
-  List<IndexContributor> get indexContributors =>
-      indexContributorExtensionPoint.extensions;
-
-  /**
    * Return a list containing all of the navigation contributors that were
    * contributed.
    */
@@ -261,8 +246,6 @@
         DOMAIN_EXTENSION_POINT, _validateDomainExtension);
     fixContributorExtensionPoint = registerExtensionPoint(
         FIX_CONTRIBUTOR_EXTENSION_POINT, _validateFixContributorExtension);
-    indexContributorExtensionPoint = registerExtensionPoint(
-        INDEX_CONTRIBUTOR_EXTENSION_POINT, _validateIndexContributorExtension);
     navigationContributorExtensionPoint = registerExtensionPoint(
         NAVIGATION_CONTRIBUTOR_EXTENSION_POINT,
         _validateNavigationContributorExtension);
@@ -323,11 +306,6 @@
     //
     registerExtension(
         FIX_CONTRIBUTOR_EXTENSION_POINT_ID, new DefaultFixContributor());
-    //
-    // Register index contributors.
-    //
-    registerExtension(
-        INDEX_CONTRIBUTOR_EXTENSION_POINT_ID, new DartIndexContributor());
   }
 
   /**
@@ -403,17 +381,6 @@
 
   /**
    * Validate the given extension by throwing an [ExtensionError] if it is not a
-   * valid index contributor.
-   */
-  void _validateIndexContributorExtension(Object extension) {
-    if (extension is! IndexContributor) {
-      String id = indexContributorExtensionPoint.uniqueIdentifier;
-      throw new ExtensionError('Extensions to $id must be an IndexContributor');
-    }
-  }
-
-  /**
-   * Validate the given extension by throwing an [ExtensionError] if it is not a
    * valid navigation contributor.
    */
   void _validateNavigationContributorExtension(Object extension) {
diff --git a/pkg/analysis_server/lib/src/protocol/protocol_internal.dart b/pkg/analysis_server/lib/src/protocol/protocol_internal.dart
index 256523a..e2697f3 100644
--- a/pkg/analysis_server/lib/src/protocol/protocol_internal.dart
+++ b/pkg/analysis_server/lib/src/protocol/protocol_internal.dart
@@ -131,16 +131,24 @@
  * Translate the input [map], applying [keyCallback] to all its keys, and
  * [valueCallback] to all its values.
  */
-mapMap(Map map, {dynamic keyCallback(key), dynamic valueCallback(value)}) {
-  Map result = {};
+Map/*<KR, VR>*/ mapMap/*<KP, VP, KR, VR>*/(Map/*<KP, VP>*/ map,
+    {dynamic/*=KR*/ keyCallback(/*<KP>*/ key),
+    dynamic/*=VR*/ valueCallback(/*<VP>*/ value)}) {
+  Map/*<KR, VR>*/ result = new HashMap/*<KR, VR>*/();
   map.forEach((key, value) {
+    Object/*=KR*/ resultKey;
+    Object/*=VR*/ resultValue;
     if (keyCallback != null) {
-      key = keyCallback(key);
+      resultKey = keyCallback(key);
+    } else {
+      resultKey = key as Object/*=KR*/;
     }
     if (valueCallback != null) {
-      value = valueCallback(value);
+      resultValue = valueCallback(value);
+    } else {
+      resultValue = value as Object/*=VR*/;
     }
-    result[key] = value;
+    result[resultKey] = resultValue;
   });
   return result;
 }
@@ -222,7 +230,7 @@
  * string describing the part of the JSON object being decoded, and [value] is
  * the part to decode.
  */
-typedef Object JsonDecoderCallback(String jsonPath, Object value);
+typedef E JsonDecoderCallback<E>(String jsonPath, Object value);
 
 /**
  * Instances of the class [HasToJson] implement [toJson] method that returns
@@ -303,14 +311,17 @@
   }
 
   /**
-   * Decode a JSON object that is expected to be a List.  [decoder] is used to
-   * decode the items in the list.
+   * Decode a JSON object that is expected to be a List. The [decoder] is used
+   * to decode the items in the list.
+   *
+   * The type parameter [E] is the expected type of the elements in the list.
    */
-  List decodeList(String jsonPath, Object json, [JsonDecoderCallback decoder]) {
+  List/*<E>*/ decodeList/*<E>*/(String jsonPath, Object json,
+      [JsonDecoderCallback/*<E>*/ decoder]) {
     if (json == null) {
-      return [];
+      return/*<E>*/ [];
     } else if (json is List) {
-      List result = [];
+      List/*<E>*/ result = /*<E>*/ [];
       for (int i = 0; i < json.length; i++) {
         result.add(decoder('$jsonPath[$i]', json[i]));
       }
@@ -324,23 +335,24 @@
    * Decode a JSON object that is expected to be a Map.  [keyDecoder] is used
    * to decode the keys, and [valueDecoder] is used to decode the values.
    */
-  Map decodeMap(String jsonPath, Object json,
-      {JsonDecoderCallback keyDecoder, JsonDecoderCallback valueDecoder}) {
+  Map/*<K, V>*/ decodeMap/*<K, V>*/(String jsonPath, Object json,
+      {JsonDecoderCallback/*<K>*/ keyDecoder,
+      JsonDecoderCallback/*<V>*/ valueDecoder}) {
     if (json == null) {
       return {};
     } else if (json is Map) {
-      Map result = {};
+      Map/*<K, V>*/ result = /*<K, V>*/ {};
       json.forEach((String key, value) {
-        Object decodedKey;
+        Object/*=K*/ decodedKey;
         if (keyDecoder != null) {
           decodedKey = keyDecoder('$jsonPath.key', key);
         } else {
-          decodedKey = key;
+          decodedKey = key as Object/*=K*/;
         }
         if (valueDecoder != null) {
           value = valueDecoder('$jsonPath[${JSON.encode(key)}]', value);
         }
-        result[decodedKey] = value;
+        result[decodedKey] = value as Object/*=V*/;
       });
       return result;
     } else {
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index 822727c..5c86115 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -9,10 +9,12 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart'
     as engine;
+import 'package:analyzer/dart/ast/ast.dart' as engine;
+import 'package:analyzer/dart/ast/visitor.dart' as engine;
 import 'package:analyzer/dart/element/element.dart' as engine;
 import 'package:analyzer/dart/element/type.dart' as engine;
 import 'package:analyzer/source/error_processor.dart';
-import 'package:analyzer/src/generated/ast.dart' as engine;
+import 'package:analyzer/src/dart/ast/utilities.dart' as engine;
 import 'package:analyzer/src/generated/engine.dart' as engine;
 import 'package:analyzer/src/generated/error.dart' as engine;
 import 'package:analyzer/src/generated/source.dart' as engine;
@@ -41,7 +43,14 @@
             .add(newAnalysisError_fromEngine(lineInfo, error, severity));
       }
     } else {
-      serverErrors.add(newAnalysisError_fromEngine(lineInfo, error));
+      AnalysisError error2 = newAnalysisError_fromEngine(lineInfo, error);
+      bool isStrongMode = context.analysisOptions.strongMode;
+      if (isStrongMode &&
+          error is engine.StaticWarningCode &&
+          (error as engine.StaticWarningCode).isStrongModeError) {
+        error2.severity = AnalysisErrorSeverity.ERROR;
+      }
+      serverErrors.add(error2);
     }
   }
   return serverErrors;
@@ -111,16 +120,17 @@
     location = new Location(file, offset, length, startLine, startColumn);
   }
 
-  // Deafult to the error's severity if none is specified.
+  // Default to the error's severity if none is specified.
   errorSeverity ??= errorCode.errorSeverity;
 
   // done
   var severity = new AnalysisErrorSeverity(errorSeverity.name);
   var type = new AnalysisErrorType(errorCode.type.name);
   String message = error.message;
+  String code = errorCode.name.toLowerCase();
   String correction = error.correction;
   bool fix = hasFix(error.errorCode);
-  return new AnalysisError(severity, type, location, message,
+  return new AnalysisError(severity, type, location, message, code,
       correction: correction, hasFix: fix);
 }
 
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 434ae63..6bdf510 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
@@ -9,9 +9,9 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_target.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/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 export 'package:analysis_server/src/provisional/completion/completion_core.dart'
diff --git a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart
index f1a8a05..ea6b489 100644
--- a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart
+++ b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart
@@ -51,15 +51,15 @@
    */
   ExtensionPoint _contributorExtensionPoint;
 
-  @override
-  String get uniqueIdentifier => UNIQUE_IDENTIFIER;
-
   /**
    * Return a list containing all of the Dart specific completion contributors.
    */
-  Iterable<DartCompletionContributorFactory> get contributors =>
-      _contributorExtensionPoint.extensions
-          .map((DartCompletionContributorFactory factory) => factory());
+  Iterable<DartCompletionContributor> get contributors =>
+      _contributorExtensionPoint.extensions.map(
+          (Object factory) => (factory as DartCompletionContributorFactory)());
+
+  @override
+  String get uniqueIdentifier => UNIQUE_IDENTIFIER;
 
   @override
   void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {
diff --git a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart
index 9a03a1e..bbf9cb5 100644
--- a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart
+++ b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart
@@ -4,10 +4,10 @@
 
 library analysis_server.src.provisional.completion.dart.completion_target;
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
 int _computeArgIndex(AstNode containingNode, Object entity) {
diff --git a/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_dart.dart b/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_dart.dart
index bdc0931..2ab9d6c 100644
--- a/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_dart.dart
+++ b/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_dart.dart
@@ -6,9 +6,9 @@
 
 import 'package:analysis_server/src/provisional/edit/utilities/change_builder_core.dart';
 import 'package:analysis_server/src/utilities/change_builder_dart.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/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/provisional/index/index.dart b/pkg/analysis_server/lib/src/provisional/index/index.dart
deleted file mode 100644
index c67feb2..0000000
--- a/pkg/analysis_server/lib/src/provisional/index/index.dart
+++ /dev/null
@@ -1,43 +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.
-
-/**
- * Support for client code that extends the analysis server by adding new index
- * contributors.
- *
- * Plugins can register index contributors. The registered contributors will be
- * used to contribute relationships to the index when the analysis of a file has
- * been completed.
- *
- * Typical relationships include things like "this variable is referenced here"
- * or "this method is invoked here". The index is used to improve the
- * performance of operations such as search or building a type hierarchy by
- * pre-computing some of the information needed by those operations.
- *
- * If a plugin wants to contribute information to the index, it should implement
- * the class [IndexContributor] and then register the contributor by including
- * code like the following in the plugin's registerExtensions method:
- *
- *     @override
- *     void registerExtensions(RegisterExtension registerExtension) {
- *       ...
- *       registerExtension(
- *           INDEX_CONTRIBUTOR_EXTENSION_POINT_ID,
- *           new MyIndexContributor());
- *       ...
- *     }
- */
-library analysis_server.plugin.index.index;
-
-import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:plugin/plugin.dart';
-
-/**
- * The identifier of the extension point that allows plugins to register index
- * contributors. The object used as an extension must be an [IndexContributor].
- */
-final String INDEX_CONTRIBUTOR_EXTENSION_POINT_ID = Plugin.join(
-    ServerPlugin.UNIQUE_IDENTIFIER,
-    ServerPlugin.INDEX_CONTRIBUTOR_EXTENSION_POINT);
diff --git a/pkg/analysis_server/lib/src/provisional/index/index_core.dart b/pkg/analysis_server/lib/src/provisional/index/index_core.dart
deleted file mode 100644
index 6e927a5..0000000
--- a/pkg/analysis_server/lib/src/provisional/index/index_core.dart
+++ /dev/null
@@ -1,280 +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 analysis_server.plugin.index.index_core;
-
-import 'dart:async';
-import 'dart:collection';
-
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-
-/**
- * Return the integer value that corresponds to the given [string]. The value of
- * [string] may be `null`.
- *
- * Clients are not expected to implement this signature. A function of this type
- * is provided by the framework to clients in order to implement the method
- * [IndexableObjectKind.encodeHash].
- */
-typedef int StringToInt(String string);
-
-/**
- * An object that can have a [Relationship] with various [Location]s in a code
- * base. The object is abstractly represented by a [kind] and an [offset] within
- * a file with the [filePath].
- *
- * Clients must ensure that two distinct objects in the same source cannot have
- * the same kind and offset. Failure to do so will make it impossible for
- * clients to identify the model element corresponding to the indexable object.
- *
- * Clients may implement this class when implementing plugins.
- */
-abstract class IndexableObject {
-  /**
-   * Return the absolute path of the file containing the indexable object.
-   */
-  String get filePath;
-
-  /**
-   * Return the kind of this object.
-   */
-  IndexableObjectKind get kind;
-
-  /**
-   * Return the offset of the indexable object within its file.
-   */
-  int get offset;
-}
-
-/**
- * The kind associated with an [IndexableObject].
- *
- * Clients may implement this class when implementing plugins.
- */
-abstract class IndexableObjectKind<T extends IndexableObject> {
-  /**
-   * The next available index for a newly created kind of indexable object.
-   */
-  static int _nextIndex = 0;
-
-  /**
-   * A table mapping indexes to object kinds.
-   */
-  static Map<int, IndexableObjectKind> _registry =
-      new HashMap<int, IndexableObjectKind>();
-
-  /**
-   * Return the next available index for a newly created kind of indexable
-   * object.
-   */
-  static int get nextIndex => _nextIndex++;
-
-  /**
-   * Return the unique index for this kind of indexable object. Implementations
-   * should invoke [nextIndex] to allocate an index that cannot be used by any
-   * other object kind.
-   */
-  int get index;
-
-  /**
-   * Return the indexable object of this kind that exists in the given
-   * [context], in the source with the given [filePath], and at the given
-   * [offset].
-   */
-  T decode(AnalysisContext context, String filePath, int offset);
-
-  /**
-   * Returns the hash value that corresponds to the given [indexable].
-   *
-   * This hash is used to remember buckets with relations of the given
-   * [indexable]. Usually the name of the indexable object is encoded
-   * using [stringToInt] and mixed with other information to produce the final
-   * result.
-   *
-   * Clients must ensure that the same value is returned for the same object.
-   *
-   * Returned values must have good selectivity, e.g. if it is possible that
-   * there are many different objects with the same name, then additional
-   * information should be mixed in, for example the hash of the source that
-   * declares the given [indexable].
-   *
-   * Clients don't have to use name to compute this result, so if an indexable
-   * object does not have a name, some other value may be returned, but it still
-   * must be always the same for the same object and have good selectivity.
-   */
-  int encodeHash(StringToInt stringToInt, T indexable);
-
-  /**
-   * Return the object kind with the given [index].
-   */
-  static IndexableObjectKind getKind(int index) {
-    return _registry[index];
-  }
-
-  /**
-   * Register the given object [kind] so that it can be found by it's unique
-   * index. The index of the [kind] must not be changed after it is passed to
-   * this method.
-   */
-  static void register(IndexableObjectKind kind) {
-    int index = kind.index;
-    if (_registry.containsKey(index)) {
-      throw new ArgumentError('duplicate index for kind: $index');
-    }
-    _registry[index] = kind;
-  }
-}
-
-/**
- * An object used to add relationships to the index.
- *
- * Clients may implement this class when implementing plugins.
- */
-abstract class IndexContributor {
-  /**
-   * Contribute relationships existing in the given [object] to the given
-   * index [store] in the given [context].
-   */
-  void contributeTo(IndexStore store, AnalysisContext context, Object object);
-}
-
-/**
- * An object that stores information about the relationships between locations
- * in a code base.
- *
- * Clients may not extend, implement or mix-in this class.
- */
-abstract class IndexStore {
-  /**
-   * Remove all of the information from the index.
-   */
-  void clear();
-
-  /**
-   * Return a future that completes with the locations that have the given
-   * [relationship] with the given [indexable] object.
-   *
-   * For example, if the [indexable] object represents a function and the
-   * relationship is the `is-invoked-by` relationship, then the returned
-   * locations will be all of the places where the function is invoked.
-   */
-  Future<List<Location>> getRelationships(
-      IndexableObject indexable, Relationship relationship);
-
-  /**
-   * Record that the given [indexable] object and [location] have the given
-   * [relationship].
-   *
-   * For example, if the [relationship] is the `is-invoked-by` relationship,
-   * then the [indexable] object would be the function being invoked and
-   * [location] would be the point at which it is invoked. Each indexable object
-   * can have the same relationship with multiple locations. In other words, if
-   * the following code were executed
-   *
-   *     recordRelationship(indexable, isReferencedBy, location1);
-   *     recordRelationship(indexable, isReferencedBy, location2);
-   *
-   * (where `location1 != location2`) then both relationships would be
-   * maintained in the index and the result of executing
-   *
-   *     getRelationship(indexable, isReferencedBy);
-   *
-   * would be a list containing both `location1` and `location2`.
-   */
-  void recordRelationship(
-      IndexableObject indexable, Relationship relationship, Location location);
-
-  /**
-   * Remove from the index all of the information associated with the given
-   * [context].
-   *
-   * This method should be invoked when the [context] is disposed.
-   */
-  void removeContext(AnalysisContext context);
-
-  /**
-   * Remove from the index all of the information associated with indexable
-   * objects or locations in the given [source]. This includes relationships
-   * between an indexable object in [source] and any other locations, as well as
-   * relationships between any other indexable objects and locations within
-   * the [source].
-   *
-   * This method should be invoked when [source] is no longer part of the given
-   * [context].
-   */
-  void removeSource(AnalysisContext context, Source source);
-
-  /**
-   * Remove from the index all of the information associated with indexable
-   * objects or locations in the given sources. This includes relationships
-   * between an indexable object in the given sources and any other locations,
-   * as well as relationships between any other indexable objects and a location
-   * within the given sources.
-   *
-   * This method should be invoked when the sources described by the given
-   * [container] are no longer part of the given [context].
-   */
-  void removeSources(AnalysisContext context, SourceContainer container);
-}
-
-/**
- * Instances of the class [Location] represent a location related to an
- * indexable object.
- *
- * The location is expressed as an offset and length, but the offset is relative
- * to the source containing the indexable object rather than the start of the
- * indexable object within that source.
- *
- * Clients may not extend, implement or mix-in this class.
- */
-abstract class Location {
-  /**
-   * An empty list of locations.
-   */
-  static const List<Location> EMPTY_LIST = const <Location>[];
-
-  /**
-   * Return the indexable object containing this location.
-   */
-  IndexableObject get indexable;
-
-  /**
-   * Return `true` if this location is a qualified reference.
-   */
-  bool get isQualified;
-
-  /**
-   * Return `true` if this location is a resolved reference.
-   */
-  bool get isResolved;
-
-  /**
-   * Return the length of this location.
-   */
-  int get length;
-
-  /**
-   * Return the offset of this location within the source containing the
-   * indexable object.
-   */
-  int get offset;
-}
-
-/**
- * A relationship between an indexable object and a location. Relationships are
- * identified by a globally unique identifier.
- *
- * Clients may not extend, implement or mix-in this class.
- */
-abstract class Relationship {
-  /**
-   * Return a relationship that has the given [identifier]. If the relationship
-   * has already been created, then it will be returned, otherwise a new
-   * relationship will be created
-   */
-  factory Relationship(String identifier) =>
-      RelationshipImpl.getRelationship(identifier);
-}
diff --git a/pkg/analysis_server/lib/src/search/element_references.dart b/pkg/analysis_server/lib/src/search/element_references.dart
index 112db5d..74c72ef 100644
--- a/pkg/analysis_server/lib/src/search/element_references.dart
+++ b/pkg/analysis_server/lib/src/search/element_references.dart
@@ -46,20 +46,19 @@
    * Returns a [Future] completing with a [List] of references to [element] or
    * to the corresponding hierarchy [Element]s.
    */
-  Future<List<SearchResult>> _findElementsReferences(Element element) {
-    return _getRefElements(element).then((Iterable<Element> refElements) {
-      var futureGroup = new _ConcatFutureGroup<SearchResult>();
-      for (Element refElement in refElements) {
-        // add declaration
-        if (_isDeclarationInteresting(refElement)) {
-          SearchResult searchResult = _newDeclarationResult(refElement);
-          futureGroup.add(searchResult);
-        }
-        // do search
-        futureGroup.add(_findSingleElementReferences(refElement));
+  Future<List<SearchResult>> _findElementsReferences(Element element) async {
+    Iterable<Element> refElements = await _getRefElements(element);
+    var futureGroup = new _ConcatFutureGroup<SearchResult>();
+    for (Element refElement in refElements) {
+      // add declaration
+      if (_isDeclarationInteresting(refElement)) {
+        SearchResult searchResult = _newDeclarationResult(refElement);
+        futureGroup.add(searchResult);
       }
-      return futureGroup.future;
-    });
+      // do search
+      futureGroup.add(_findSingleElementReferences(refElement));
+    }
+    return futureGroup.future;
   }
 
   /**
@@ -91,8 +90,14 @@
   SearchResult _newDeclarationResult(Element refElement) {
     int nameOffset = refElement.nameOffset;
     int nameLength = refElement.nameLength;
-    SearchMatch searchMatch = new SearchMatch(MatchKind.DECLARATION, refElement,
-        new SourceRange(nameOffset, nameLength), true, false);
+    SearchMatch searchMatch = new SearchMatch(
+        refElement.context,
+        refElement.library.source.uri.toString(),
+        refElement.source.uri.toString(),
+        MatchKind.DECLARATION,
+        new SourceRange(nameOffset, nameLength),
+        true,
+        false);
     return newSearchResult_fromMatch(searchMatch);
   }
 
@@ -143,9 +148,9 @@
    */
   void add(value) {
     if (value is Future) {
-      _futures.add(value);
+      _futures.add(value as Future<List<E>>);
     } else {
-      _futures.add(new Future.value(<E>[value]));
+      _futures.add(new Future.value(<E>[value as E]));
     }
   }
 }
diff --git a/pkg/analysis_server/lib/src/search/search_domain.dart b/pkg/analysis_server/lib/src/search/search_domain.dart
index c60d4a5..4a0e1b7 100644
--- a/pkg/analysis_server/lib/src/search/search_domain.dart
+++ b/pkg/analysis_server/lib/src/search/search_domain.dart
@@ -9,14 +9,11 @@
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
-import 'package:analysis_server/src/provisional/index/index_core.dart';
 import 'package:analysis_server/src/search/element_references.dart';
 import 'package:analysis_server/src/search/type_hierarchy.dart';
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/indexable_file.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 
 /**
  * Instances of the class [SearchDomainHandler] implement a [RequestHandler]
@@ -72,36 +69,14 @@
     }).where((Element element) {
       return element != null;
     }).toList();
-    // prepare referenced file
-    String referencedFile = _getFileReferencedAt(params.file, params.offset);
     // respond
     String searchId = (_nextSearchId++).toString();
     var result = new protocol.SearchFindElementReferencesResult();
     if (elements.isNotEmpty) {
       result.id = searchId;
       result.element = protocol.convertElement(elements.first);
-    } else if (referencedFile != null) {
-      result.id = searchId;
-      result.element =
-          new protocol.Element(protocol.ElementKind.FILE, referencedFile, 0);
     }
     _sendSearchResult(request, result);
-    // search for file
-    if (referencedFile != null) {
-      List<Location> locations = await index.getRelationships(
-          new IndexableFile(referencedFile), IndexConstants.IS_REFERENCED_BY);
-      List<protocol.SearchResult> results = <protocol.SearchResult>[];
-      for (Location location in locations) {
-        IndexableFile locationFile = location.indexable;
-        results.add(new protocol.SearchResult(
-            new protocol.Location(
-                locationFile.path, location.offset, location.length, -1, -1),
-            protocol.SearchResultKind.REFERENCE,
-            false,
-            []));
-      }
-      _sendSearchNotification(searchId, elements.isEmpty, results);
-    }
     // search elements
     elements.forEach((Element element) async {
       var computer = new ElementReferencesComputer(searchEngine);
@@ -223,31 +198,6 @@
     return null;
   }
 
-  /**
-   * Return the full path of the file referenced in the given [file] at the
-   * given [offset], maybe `null`.
-   */
-  String _getFileReferencedAt(String file, int offset) {
-    List<AstNode> nodes = server.getNodesAtOffset(file, offset);
-    if (nodes.length == 1) {
-      AstNode node = nodes.single;
-      if (node is SimpleIdentifier &&
-          node.parent is LibraryIdentifier &&
-          node.parent.parent is LibraryDirective) {
-        LibraryDirective libraryDirective = node.parent.parent;
-        return libraryDirective?.element?.source?.fullName;
-      }
-      if (node is StringLiteral && node.parent is UriBasedDirective) {
-        UriBasedDirective uriBasedDirective = node.parent;
-        return uriBasedDirective.source?.fullName;
-      }
-      if (node is UriBasedDirective) {
-        return node.source?.fullName;
-      }
-    }
-    return null;
-  }
-
   void _sendSearchNotification(
       String searchId, bool isLast, Iterable<protocol.SearchResult> results) {
     server.sendNotification(
diff --git a/pkg/analysis_server/lib/src/search/type_hierarchy.dart b/pkg/analysis_server/lib/src/search/type_hierarchy.dart
index e723722..29af16e 100644
--- a/pkg/analysis_server/lib/src/search/type_hierarchy.dart
+++ b/pkg/analysis_server/lib/src/search/type_hierarchy.dart
@@ -53,15 +53,14 @@
   /**
    * Returns the computed type hierarchy, maybe `null`.
    */
-  Future<List<TypeHierarchyItem>> compute() {
+  Future<List<TypeHierarchyItem>> compute() async {
     if (_pivotClass != null) {
       InterfaceType type = _pivotClass.type;
       _createSuperItem(type);
-      return _createSubclasses(_items[0], 0, type).then((_) {
-        return new Future.value(_items);
-      });
+      await _createSubclasses(_items[0], 0, type);
+      return _items;
     }
-    return new Future.value(null);
+    return null;
   }
 
   /**
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 4f9e472..f04824f 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -343,7 +343,7 @@
     // TODO (danrubel) Remove this workaround
     // once the underlying VM and dart:io issue has been fixed.
     if (results[INTERNAL_DELAY_FREQUENCY] != null) {
-      AnalysisServer.performOperationDelayFreqency =
+      AnalysisServer.performOperationDelayFrequency =
           int.parse(results[INTERNAL_DELAY_FREQUENCY], onError: (_) => 0);
     }
 
@@ -375,6 +375,22 @@
 
     _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]);
 
+    //
+    // Process all of the plugins so that extensions are registered.
+    //
+    ServerPlugin serverPlugin = new ServerPlugin();
+    List<Plugin> plugins = <Plugin>[];
+    plugins.addAll(AnalysisEngine.instance.requiredPlugins);
+    plugins.add(AnalysisEngine.instance.commandLinePlugin);
+    plugins.add(AnalysisEngine.instance.optionsPlugin);
+    plugins.add(serverPlugin);
+    plugins.add(linterPlugin);
+    plugins.add(linterServerPlugin);
+    plugins.add(dartCompletionPlugin);
+    plugins.addAll(_userDefinedPlugins);
+    ExtensionManager manager = new ExtensionManager();
+    manager.processPlugins(plugins);
+
     JavaFile defaultSdkDirectory;
     if (results[SDK_OPTION] != null) {
       defaultSdkDirectory = new JavaFile(results[SDK_OPTION]);
@@ -383,12 +399,16 @@
       // Use DirectoryBasedDartSdk.defaultSdkDirectory, which will make a guess.
       defaultSdkDirectory = DirectoryBasedDartSdk.defaultSdkDirectory;
     }
-    SdkCreator defaultSdkCreator =
-        () => new DirectoryBasedDartSdk(defaultSdkDirectory);
+    SdkCreator defaultSdkCreator = (AnalysisOptions options) {
+      DirectoryBasedDartSdk sdk =
+          new DirectoryBasedDartSdk(defaultSdkDirectory);
+      sdk.analysisOptions = options;
+      return sdk;
+    };
     // TODO(brianwilkerson) It would be nice to avoid creating an SDK that
     // cannot be re-used, but the SDK is needed to create a package map provider
     // in the case where we need to run `pub` in order to get the package map.
-    DirectoryBasedDartSdk defaultSdk = defaultSdkCreator();
+    DirectoryBasedDartSdk defaultSdk = defaultSdkCreator(null);
     //
     // Initialize the instrumentation service.
     //
@@ -408,22 +428,6 @@
         results[CLIENT_VERSION], AnalysisServer.VERSION, defaultSdk.sdkVersion);
     AnalysisEngine.instance.instrumentationService = service;
     //
-    // Process all of the plugins so that extensions are registered.
-    //
-    ServerPlugin serverPlugin = new ServerPlugin();
-    List<Plugin> plugins = <Plugin>[];
-    plugins.addAll(AnalysisEngine.instance.requiredPlugins);
-    plugins.add(AnalysisEngine.instance.commandLinePlugin);
-    plugins.add(AnalysisEngine.instance.optionsPlugin);
-    plugins.add(serverPlugin);
-    plugins.add(linterPlugin);
-    plugins.add(linterServerPlugin);
-    plugins.add(dartCompletionPlugin);
-    plugins.addAll(_userDefinedPlugins);
-
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(plugins);
-    //
     // Create the sockets and start listening for requests.
     //
     socketServer = new SocketServer(
@@ -463,7 +467,7 @@
    */
   dynamic _captureExceptions(InstrumentationService service, dynamic callback(),
       {void print(String line)}) {
-    Function errorFunction = (Zone self, ZoneDelegate parent, Zone zone,
+    var errorFunction = (Zone self, ZoneDelegate parent, Zone zone,
         dynamic exception, StackTrace stackTrace) {
       service.logPriorityException(exception, stackTrace);
       AnalysisServer analysisServer = socketServer.analysisServer;
@@ -471,11 +475,11 @@
           'Captured exception', exception, stackTrace);
       throw exception;
     };
-    Function printFunction = print == null
+    var printFunction = print == null
         ? null
         : (Zone self, ZoneDelegate parent, Zone zone, String line) {
-            // Note: we don't pass the line on to stdout, because that is reserved
-            // for communication to the client.
+            // Note: we don't pass the line on to stdout, because that is
+            // reserved for communication to the client.
             print(line);
           };
     ZoneSpecification zoneSpecification = new ZoneSpecification(
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 5036e08..54529b8 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
@@ -9,8 +9,8 @@
 import 'package:analysis_server/src/protocol_server.dart'
     hide Element, ElementKind;
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
 /**
@@ -87,7 +87,7 @@
     var entity = request.target.entity;
     if (entity is NamedExpression) {
       int offset = request.offset;
-      if (entity.offset <= offset && offset < entity.end) {
+      if (entity.offset < offset && offset < entity.end) {
         return true;
       }
     }
@@ -105,6 +105,44 @@
 }
 
 /**
+ * Determine if the completion target is in the middle or beginning of the list
+ * of named parameters and is not preceded by a comma. This method assumes that
+ * _isAppendingToArgList has been called and is false.
+ */
+bool _isInsertingToArgListWithNoSynthetic(DartCompletionRequest request) {
+  AstNode node = request.target.containingNode;
+  if (node is ArgumentList) {
+    var entity = request.target.entity;
+    return entity is NamedExpression;
+  }
+  return false;
+}
+
+/**
+ * Determine if the completion target is in the middle or beginning of the list
+ * of named parameters and is preceded by a comma. This method assumes that
+ * _isAppendingToArgList and _isInsertingToArgListWithNoSynthetic have been
+ * called and both return false.
+ */
+bool _isInsertingToArgListWithSynthetic(DartCompletionRequest request) {
+  AstNode node = request.target.containingNode;
+  if (node is ArgumentList) {
+    var entity = request.target.entity;
+    if (entity is SimpleIdentifier) {
+      int argIndex = request.target.argIndex;
+      // if the next argument is a NamedExpression, then we are in the named
+      // parameter list, guard first against end of list
+      if (node.arguments.length == argIndex + 1 ||
+          node.arguments.getRange(argIndex + 1, argIndex + 2).first
+          is NamedExpression) {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+/**
  * Return a collection of currently specified named arguments
  */
 Iterable<String> _namedArgs(DartCompletionRequest request) {
@@ -219,26 +257,34 @@
     // suggestions.add(suggestion);
   }
 
-  void _addDefaultParamSuggestions(Iterable<ParameterElement> parameters) {
+  void _addDefaultParamSuggestions(Iterable<ParameterElement> parameters,
+      [bool appendComma = false]) {
     Iterable<String> namedArgs = _namedArgs(request);
     for (ParameterElement param in parameters) {
       if (param.parameterKind == ParameterKind.NAMED) {
-        _addNamedParameterSuggestion(request, namedArgs, param.name);
+        _addNamedParameterSuggestion(request, namedArgs, param.name,
+            param.type?.displayName, appendComma);
       }
     }
   }
 
-  void _addNamedParameterSuggestion(
-      DartCompletionRequest request, List<String> namedArgs, String name) {
+  void _addNamedParameterSuggestion(DartCompletionRequest request,
+      List<String> namedArgs, String name, String paramType, bool appendComma) {
     if (name != null && name.length > 0 && !namedArgs.contains(name)) {
+      String completion = '$name: ';
+      if (appendComma) {
+        completion += ',';
+      }
       suggestions.add(new CompletionSuggestion(
           CompletionSuggestionKind.NAMED_ARGUMENT,
           DART_RELEVANCE_NAMED_PARAMETER,
-          '$name: ',
-          name.length + 2,
+          completion,
+          completion.length,
           0,
           false,
-          false));
+          false,
+          parameterName: name,
+          parameterType: paramType));
     }
   }
 
@@ -253,10 +299,19 @@
       _addArgListSuggestion(requiredParam);
       return;
     }
+    // TODO (jwren) _isAppendingToArgList can be split into two cases (with and
+    // without preceded), then _isAppendingToArgList,
+    // _isInsertingToArgListWithNoSynthetic and
+    // _isInsertingToArgListWithSynthetic could be formatted into a single
+    // method which returns some enum with 5+ cases.
     if (_isEditingNamedArgLabel(request) || _isAppendingToArgList(request)) {
       if (requiredCount == 0 || requiredCount < _argCount(request)) {
         _addDefaultParamSuggestions(parameters);
       }
+    } else if (_isInsertingToArgListWithNoSynthetic(request)) {
+      _addDefaultParamSuggestions(parameters, true);
+    } else if (_isInsertingToArgListWithSynthetic(request)) {
+      _addDefaultParamSuggestions(parameters);
     }
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart
index 26437e2..4010ece 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart
@@ -10,8 +10,8 @@
     hide Element, ElementKind;
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 
 /**
  * A contributor for calculating `completion.getSuggestions` request results
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/common_usage_sorter.dart b/pkg/analysis_server/lib/src/services/completion/dart/common_usage_sorter.dart
index 6e8049b..8f27b86 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/common_usage_sorter.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/common_usage_sorter.dart
@@ -13,9 +13,10 @@
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
 import 'package:analysis_server/src/services/completion/dart/contribution_sorter.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/ast.dart';
 import 'package:analyzer/src/task/dart.dart';
 import 'package:analyzer/task/dart.dart';
 
@@ -54,7 +55,7 @@
     if (libElem is LibraryElement) {
       var unit = request.context.getResult(
           new LibrarySpecificUnit(libElem.source, request.source),
-          RESOLVED_UNIT3);
+          RESOLVED_UNIT4);
       if (unit is CompilationUnit) {
         return new CompletionTarget.forOffset(unit, request.offset);
       }
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 b56bd9f..21ba3c7 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
@@ -18,6 +18,7 @@
 import 'package:analysis_server/src/services/completion/dart/contribution_sorter.dart';
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
@@ -25,7 +26,6 @@
 import 'package:analyzer/src/context/context.dart'
     show AnalysisFutureHelper, AnalysisContextImpl;
 import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart' hide AnalysisContextImpl;
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -299,7 +299,7 @@
       CompilationUnit unit = await _computeAsync(
           this,
           new LibrarySpecificUnit(libElem.source, unresolvedUnit.source),
-          RESOLVED_UNIT3,
+          RESOLVED_UNIT4,
           performance,
           'resolve library unit');
       checkAborted();
@@ -376,7 +376,7 @@
       unit = await _computeAsync(
           request,
           new LibrarySpecificUnit(libSource, source),
-          resultDescriptor ?? RESOLVED_UNIT3,
+          resultDescriptor ?? RESOLVED_UNIT4,
           performance,
           'resolve declarations');
     }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
index 3c16a7d..43514fb 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
@@ -10,7 +10,7 @@
     hide Element, ElementKind;
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 
 /**
  * A contributor for calculating invocation / access suggestions
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/imported_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/imported_reference_contributor.dart
index abed735..4651491 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/imported_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/imported_reference_contributor.dart
@@ -10,12 +10,31 @@
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
 import 'package:analysis_server/src/services/completion/dart/local_library_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
-import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 
 import '../../../protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind;
 
+List<String> hiddenNamesIn(ImportElement importElem) {
+  for (NamespaceCombinator combinator in importElem.combinators) {
+    if (combinator is HideElementCombinator) {
+      return combinator.hiddenNames;
+    }
+  }
+  return null;
+}
+
+List<String> showNamesIn(ImportElement importElem) {
+  for (NamespaceCombinator combinator in importElem.combinators) {
+    if (combinator is ShowElementCombinator) {
+      return combinator.shownNames;
+    }
+  }
+  return null;
+}
+
 /**
  * A contributor for calculating suggestions for imported top level members.
  */
@@ -35,6 +54,20 @@
       return EMPTY_LIST;
     }
 
+    // If the target is in an expression
+    // then resolve the outermost/entire expression
+    AstNode node = request.target.containingNode;
+    if (node is Expression) {
+      while (node.parent is Expression) {
+        node = node.parent;
+      }
+      await request.resolveExpression(node);
+
+      // Discard any cached target information
+      // because it may have changed as a result of the resolution
+      node = request.target.containingNode;
+    }
+
     this.request = request;
     this.optype = (request as DartCompletionRequestImpl).opType;
     List<CompletionSuggestion> suggestions = <CompletionSuggestion>[];
@@ -69,21 +102,3 @@
     return visitor.suggestions;
   }
 }
-
-List<String> showNamesIn(ImportElement importElem) {
-  for (NamespaceCombinator combinator in importElem.combinators) {
-    if (combinator is ShowElementCombinator) {
-      return combinator.shownNames;
-    }
-  }
-  return null;
-}
-
-List<String> hiddenNamesIn(ImportElement importElem) {
-  for (NamespaceCombinator combinator in importElem.combinators) {
-    if (combinator is HideElementCombinator) {
-      return combinator.hiddenNames;
-    }
-  }
-  return null;
-}
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 bf1633e..fed6a7b 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
@@ -11,13 +11,40 @@
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
 
 import '../../../protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind;
 
 /**
+ * Return the class containing the target
+ * or `null` if the target is in a static method or field
+ * or not in a class.
+ */
+ClassDeclaration _enclosingClass(CompletionTarget target) {
+  AstNode node = target.containingNode;
+  while (node != null) {
+    if (node is ClassDeclaration) {
+      return node;
+    }
+    if (node is MethodDeclaration) {
+      if (node.isStatic) {
+        return null;
+      }
+    }
+    if (node is FieldDeclaration) {
+      if (node.isStatic) {
+        return null;
+      }
+    }
+    node = node.parent;
+  }
+  return null;
+}
+
+/**
  * A contributor for calculating suggestions for inherited references.
  */
 class InheritedReferenceContributor extends DartCompletionContributor
@@ -76,29 +103,3 @@
     return suggestions;
   }
 }
-
-/**
- * Return the class containing the target
- * or `null` if the target is in a static method or field
- * or not in a class.
- */
-ClassDeclaration _enclosingClass(CompletionTarget target) {
-  AstNode node = target.containingNode;
-  while (node != null) {
-    if (node is ClassDeclaration) {
-      return node;
-    }
-    if (node is MethodDeclaration) {
-      if (node.isStatic) {
-        return null;
-      }
-    }
-    if (node is FieldDeclaration) {
-      if (node.isStatic) {
-        return null;
-      }
-    }
-    node = node.parent;
-  }
-  return null;
-}
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 6008fe7..5ba7fa1 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,9 +9,12 @@
 
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.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/src/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
+import 'package:analysis_server/src/services/completion/dart/optype.dart';
 
 const ASYNC = 'async';
 const ASYNC_STAR = 'async*';
@@ -49,6 +52,13 @@
 
   @override
   visitArgumentList(ArgumentList node) {
+    if (request is DartCompletionRequestImpl) {
+      //TODO(danrubel) consider adding opType to the API then remove this cast
+      OpType opType = (request as DartCompletionRequestImpl).opType;
+      if (opType.includeOnlyNamedArgumentSuggestions) {
+        return;
+      }
+    }
     if (entity == node.rightParenthesis) {
       _addExpressionKeywords(node);
       Token previous = (entity as Token).previous;
@@ -80,7 +90,8 @@
         if (next.isSynthetic) {
           next = next.next;
         }
-        if (previous.lexeme == ')' && next.lexeme == '{') {
+        if (previous.type == TokenType.CLOSE_PAREN &&
+            next.type == TokenType.OPEN_CURLY_BRACKET) {
           _addSuggestion2(ASYNC);
           _addSuggestion2(ASYNC_STAR);
           _addSuggestion2(SYNC_STAR);
@@ -147,8 +158,12 @@
           !node.directives.any((d) => d is LibraryDirective)) {
         _addSuggestions([Keyword.LIBRARY], DART_RELEVANCE_HIGH);
       }
-      _addSuggestions(
-          [Keyword.IMPORT, Keyword.EXPORT, Keyword.PART], DART_RELEVANCE_HIGH);
+      _addSuggestion2('${Keyword.IMPORT.syntax} \'\';',
+          offset: 8, relevance: DART_RELEVANCE_HIGH);
+      _addSuggestion2('${Keyword.EXPORT.syntax} \'\';',
+          offset: 8, relevance: DART_RELEVANCE_HIGH);
+      _addSuggestion2('${Keyword.PART.syntax} \'\';',
+          offset: 6, relevance: DART_RELEVANCE_HIGH);
     }
     if (entity == null || entity is Declaration) {
       if (previousMember is FunctionDeclaration &&
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 b5bae6c..8600be2 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
@@ -14,9 +14,9 @@
 import 'package:analysis_server/src/services/completion/dart/local_declaration_visitor.dart'
     show LocalDeclarationVisitor;
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 import '../../../protocol_server.dart'
@@ -191,8 +191,8 @@
 
   _LabelVisitor(DartCompletionRequest request, this.includeStatementLabels,
       this.includeCaseLabels, this.suggestions)
-      : super(request.offset),
-        request = request;
+      : request = request,
+        super(request.offset);
 
   @override
   void declaredClass(ClassDeclaration declaration) {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/library_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/library_member_contributor.dart
index 118103f..4587864 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/library_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/library_member_contributor.dart
@@ -8,8 +8,8 @@
 
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 
 import '../../../protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
index c05a215..eb527a4 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
@@ -15,10 +15,10 @@
     show LocalDeclarationVisitor;
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 import '../../../protocol_server.dart'
@@ -181,8 +181,8 @@
   final List<CompletionSuggestion> suggestions;
 
   _Visitor(DartCompletionRequest request, this.suggestions)
-      : super(request.offset),
-        request = request;
+      : request = request,
+        super(request.offset);
 
   @override
   void declaredClass(ClassDeclaration declaration) {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart
index 586eac2..e46b7e5 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart
@@ -4,9 +4,10 @@
 
 library services.completion.dart.local.declaration.visitor;
 
+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/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
 
 /**
  * `LocalDeclarationCollector` visits an [AstNode] and its parent recursively
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart
index 9b36935..68beb6a 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart
@@ -11,42 +11,14 @@
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart'
     show createSuggestion, ElementSuggestionBuilder;
-import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/dart/element/visitor.dart';
 
 import '../../../protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind;
 
 /**
- * A contributor for calculating suggestions for top level members
- * in the library in which the completion is requested
- * but outside the file in which the completion is requested.
- */
-class LocalLibraryContributor extends DartCompletionContributor {
-  @override
-  Future<List<CompletionSuggestion>> computeSuggestions(
-      DartCompletionRequest request) async {
-    if (!request.includeIdentifiers) {
-      return EMPTY_LIST;
-    }
-
-    List<CompilationUnitElement> libraryUnits = await request.resolveUnits();
-    if (libraryUnits == null) {
-      return EMPTY_LIST;
-    }
-
-    OpType optype = (request as DartCompletionRequestImpl).opType;
-    LibraryElementSuggestionBuilder visitor =
-        new LibraryElementSuggestionBuilder(request, optype);
-    for (CompilationUnitElement unit in libraryUnits) {
-      if (unit != null && unit.source != request.source) {
-        unit.accept(visitor);
-      }
-    }
-    return visitor.suggestions;
-  }
-}
-
-/**
  * A visitor for building suggestions based upon the elements defined by
  * a source file contained in the same library but not the same as
  * the source in which the completions are being requested.
@@ -72,7 +44,11 @@
   @override
   void visitClassElement(ClassElement element) {
     if (optype.includeTypeNameSuggestions) {
-      addSuggestion(element, prefix: prefix, relevance: DART_RELEVANCE_DEFAULT);
+      // if includeTypeNameSuggestions, then use the filter
+      if (optype.typeNameSuggestionsFilter(element.type)) {
+        addSuggestion(element,
+            prefix: prefix, relevance: DART_RELEVANCE_DEFAULT);
+      }
     }
     if (optype.includeConstructorSuggestions) {
       _addConstructorSuggestions(element, DART_RELEVANCE_DEFAULT);
@@ -176,3 +152,33 @@
     }
   }
 }
+
+/**
+ * A contributor for calculating suggestions for top level members
+ * in the library in which the completion is requested
+ * but outside the file in which the completion is requested.
+ */
+class LocalLibraryContributor extends DartCompletionContributor {
+  @override
+  Future<List<CompletionSuggestion>> computeSuggestions(
+      DartCompletionRequest request) async {
+    if (!request.includeIdentifiers) {
+      return EMPTY_LIST;
+    }
+
+    List<CompilationUnitElement> libraryUnits = await request.resolveUnits();
+    if (libraryUnits == null) {
+      return EMPTY_LIST;
+    }
+
+    OpType optype = (request as DartCompletionRequestImpl).opType;
+    LibraryElementSuggestionBuilder visitor =
+        new LibraryElementSuggestionBuilder(request, optype);
+    for (CompilationUnitElement unit in libraryUnits) {
+      if (unit != null && unit.source != request.source) {
+        unit.accept(visitor);
+      }
+    }
+    return visitor.suggestions;
+  }
+}
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 661f89a..8d613ce 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
@@ -15,9 +15,11 @@
     show LocalDeclarationVisitor;
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
 import 'package:analysis_server/src/services/correction/strings.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart' show ParameterKind;
 
@@ -155,9 +157,19 @@
       if (optype.includeReturnValueSuggestions ||
           optype.includeTypeNameSuggestions ||
           optype.includeVoidReturnSuggestions) {
-        _LocalVisitor visitor =
-            new _LocalVisitor(request, request.offset, optype);
+        // If the target is in an expression
+        // then resolve the outermost/entire expression
         AstNode node = request.target.containingNode;
+        if (node is Expression) {
+          while (node.parent is Expression) {
+            node = node.parent;
+          }
+          await request.resolveExpression(node);
+
+          // Discard any cached target information
+          // because it may have changed as a result of the resolution
+          node = request.target.containingNode;
+        }
 
         // Do not suggest local vars within the current expression
         while (node is Expression) {
@@ -170,6 +182,8 @@
           node = node.parent;
         }
 
+        _LocalVisitor visitor =
+            new _LocalVisitor(request, request.offset, optype);
         visitor.visit(node);
         return visitor.suggestions;
       }
@@ -388,7 +402,14 @@
           suggestion.completion.startsWith('_')) {
         suggestion.relevance = privateMemberRelevance;
       }
-      suggestionMap.putIfAbsent(suggestion.completion, () => suggestion);
+      // if includeTypeNameSuggestions, then use the filter
+      if (optype.includeTypeNameSuggestions) {
+        if (optype.typeNameSuggestionsFilter(_staticTypeOfIdentifier(id))) {
+          suggestionMap.putIfAbsent(suggestion.completion, () => suggestion);
+        }
+      } else {
+        suggestionMap.putIfAbsent(suggestion.completion, () => suggestion);
+      }
       suggestion.element = _createLocalElement(request.source, elemKind, id,
           isAbstract: isAbstract,
           isDeprecated: isDeprecated,
@@ -448,4 +469,12 @@
     }
     return false;
   }
+
+  DartType _staticTypeOfIdentifier(Identifier id) {
+    if (id.staticElement is ClassElement) {
+      return (id.staticElement as ClassElement).type;
+    } else {
+      return id.staticType;
+    }
+  }
 }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/named_constructor_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/named_constructor_contributor.dart
index 760274e..3314403 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/named_constructor_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/named_constructor_contributor.dart
@@ -9,9 +9,9 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.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/ast.dart';
 
 /**
  * A contributor for calculating named constructor suggestions
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
index 71c1bfd..d5f206c 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
@@ -4,11 +4,15 @@
 
 library services.completion.dart.optype;
 
-import 'package:analysis_server/src/protocol_server.dart';
+import 'package:analysis_server/src/protocol_server.dart' hide Element;
 import 'package:analysis_server/src/provisional/completion/dart/completion_target.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/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
 
 /**
  * An [AstVisitor] for determining whether top level suggestions or invocation
@@ -27,6 +31,13 @@
   bool includeTypeNameSuggestions = false;
 
   /**
+   * If [includeTypeNameSuggestions] is set to true, then this function may be
+   * set to the non-default function to filter out potential suggestions based
+   * on their static [DartType].
+   */
+  Function typeNameSuggestionsFilter = (DartType _) => true;
+
+  /**
    * Indicates whether setters along with methods and functions that
    * have a [void] return type should be suggested.
    */
@@ -39,6 +50,11 @@
   bool includeReturnValueSuggestions = false;
 
   /**
+   * Indicates whether named arguments should be suggested.
+   */
+  bool includeNamedArgumentSuggestions = false;
+
+  /**
    * Indicates whether statement labels should be suggested.
    */
   bool includeStatementLabelSuggestions = false;
@@ -83,7 +99,18 @@
   /**
    * Indicate whether only type names should be suggested
    */
-  bool get includeOnlyTypeNameSuggestions => includeTypeNameSuggestions &&
+  bool get includeOnlyTypeNameSuggestions =>
+      includeTypeNameSuggestions &&
+      !includeNamedArgumentSuggestions &&
+      !includeReturnValueSuggestions &&
+      !includeVoidReturnSuggestions;
+
+  /**
+   * Indicate whether only type names should be suggested
+   */
+  bool get includeOnlyNamedArgumentSuggestions =>
+      includeNamedArgumentSuggestions &&
+      !includeTypeNameSuggestions &&
       !includeReturnValueSuggestions &&
       !includeVoidReturnSuggestions;
 }
@@ -121,6 +148,31 @@
 
   @override
   void visitArgumentList(ArgumentList node) {
+    AstNode parent = node.parent;
+    if (parent is InvocationExpression) {
+      Expression function = parent.function;
+      if (function is SimpleIdentifier) {
+        var elem = function.bestElement;
+        if (elem is FunctionTypedElement) {
+          List<ParameterElement> parameters = elem.parameters;
+          if (parameters != null) {
+            int index =
+                node.arguments.isEmpty ? 0 : node.arguments.indexOf(entity);
+            if (0 <= index && index < parameters.length) {
+              ParameterElement param = parameters[index];
+              if (param?.parameterKind == ParameterKind.NAMED) {
+                optype.includeNamedArgumentSuggestions = true;
+                return;
+              }
+            }
+          }
+        } else if (elem == null) {
+          // If unresolved, then include named arguments
+          optype.includeNamedArgumentSuggestions = true;
+          // fall through to include others as well
+        }
+      }
+    }
     optype.includeReturnValueSuggestions = true;
     optype.includeTypeNameSuggestions = true;
   }
@@ -129,14 +181,15 @@
   void visitAsExpression(AsExpression node) {
     if (identical(entity, node.type)) {
       optype.includeTypeNameSuggestions = true;
-      // TODO (danrubel) Possible future improvement:
-      // on the RHS of an "is" or "as" expression, don't suggest types that are
-      // guaranteed to pass or guaranteed to fail the cast.
-      // See dartbug.com/18860
+      optype.typeNameSuggestionsFilter = (DartType dartType) {
+        DartType staticType = node.expression.staticType;
+        return staticType.isDynamic ||
+            (dartType.isSubtypeOf(staticType) && dartType != staticType);
+      };
     }
   }
 
-@override
+  @override
   void visitAssertStatement(AssertStatement node) {
     if (identical(entity, node.condition)) {
       optype.includeReturnValueSuggestions = true;
@@ -450,10 +503,11 @@
   void visitIsExpression(IsExpression node) {
     if (identical(entity, node.type)) {
       optype.includeTypeNameSuggestions = true;
-      // TODO (danrubel) Possible future improvement:
-      // on the RHS of an "is" or "as" expression, don't suggest types that are
-      // guaranteed to pass or guaranteed to fail the cast.
-      // See dartbug.com/18860
+      optype.typeNameSuggestionsFilter = (DartType dartType) {
+        DartType staticType = node.expression.staticType;
+        return staticType.isDynamic ||
+            (dartType.isSubtypeOf(staticType) && dartType != staticType);
+      };
     }
   }
 
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 e61ebbe..d950448 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
@@ -13,8 +13,8 @@
 import 'package:analysis_server/src/provisional/completion/completion_core.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/static_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/static_member_contributor.dart
index 3ed05b3..d7687f9 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/static_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/static_member_contributor.dart
@@ -8,9 +8,9 @@
 
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/visitor.dart';
-import 'package:analyzer/src/generated/ast.dart';
 
 import '../../../protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind;
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 7a0f760..cd9dfc0 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
@@ -10,9 +10,9 @@
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/local_declaration_visitor.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.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/ast.dart';
 
 import '../../../protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
index 7e849b1..949ec9c 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
@@ -8,8 +8,9 @@
 import 'dart:core' hide Resource;
 
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:path/path.dart' show posix;
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index f4c51be..2024b75 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -4,12 +4,13 @@
 
 library services.correction.assist;
 
+import 'dart:async';
+
 import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'dart:async';
 
 /**
  * Compute and return the assists available at the given selection (described by
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 b5a7ea2..fbbd9a8 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -17,11 +17,13 @@
 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: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/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart';
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 dc66c45..6c3a1e6 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -24,15 +24,16 @@
 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:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/java_core.dart';
@@ -428,7 +429,11 @@
             .takeWhile((p) => p.parameterKind == ParameterKind.REQUIRED);
         Iterable<ParameterElement> optionalParameters = parameters
             .skipWhile((p) => p.parameterKind == ParameterKind.REQUIRED);
+        // prepare the argument to add a new parameter for
         int numRequired = requiredParameters.length;
+        if (numRequired >= arguments.length) {
+          return;
+        }
         Expression argument = arguments[numRequired];
         // prepare target
         int targetOffset;
@@ -700,10 +705,14 @@
       return;
     }
     ClassElement targetElement = constructorElement.enclosingElement;
-    String targetFile = targetElement.source.fullName;
-    ClassDeclaration targetClass = getParsedClassElementNode(targetElement);
+    // prepare location for a new constructor
+    AstNode targetTypeNode = getParsedClassElementNode(targetElement);
+    if (targetTypeNode is! ClassDeclaration) {
+      return;
+    }
     _ConstructorLocation targetLocation =
-        _prepareNewConstructorLocation(targetClass);
+        _prepareNewConstructorLocation(targetTypeNode);
+    String targetFile = targetElement.source.fullName;
     // build method source
     SourceBuilder sb = new SourceBuilder(targetFile, targetLocation.offset);
     {
@@ -753,11 +762,15 @@
     if (targetType is! InterfaceType) {
       return;
     }
+    // prepare location for a new constructor
     ClassElement targetElement = targetType.element as ClassElement;
-    String targetFile = targetElement.source.fullName;
-    ClassDeclaration targetClass = getParsedClassElementNode(targetElement);
+    AstNode targetTypeNode = getParsedClassElementNode(targetElement);
+    if (targetTypeNode is! ClassDeclaration) {
+      return;
+    }
     _ConstructorLocation targetLocation =
-        _prepareNewConstructorLocation(targetClass);
+        _prepareNewConstructorLocation(targetTypeNode);
+    String targetFile = targetElement.source.fullName;
     // build method source
     SourceBuilder sb = new SourceBuilder(targetFile, targetLocation.offset);
     {
@@ -958,7 +971,7 @@
       // maybe static
       if (target is Identifier) {
         Identifier targetIdentifier = target;
-        Element targetElement = targetIdentifier.staticElement;
+        Element targetElement = targetIdentifier.bestElement;
         if (targetElement == null) {
           return;
         }
@@ -1094,7 +1107,7 @@
       // maybe static
       if (target is Identifier) {
         Identifier targetIdentifier = target;
-        Element targetElement = targetIdentifier.staticElement;
+        Element targetElement = targetIdentifier.bestElement;
         staticModifier = targetElement.kind == ElementKind.CLASS;
       }
     } else {
@@ -1481,6 +1494,10 @@
         String libraryUri = sdkLibrary.shortName;
         Source librarySource =
             sdkSourceFactory.resolveUri(unitSource, libraryUri);
+        // maybe already imported
+        if (alreadyImportedWithPrefix.contains(librarySource)) {
+          continue;
+        }
         // prepare LibraryElement
         LibraryElement libraryElement =
             context.getResult(librarySource, LIBRARY_ELEMENT1);
@@ -1510,13 +1527,13 @@
         if (librarySource.isInSystemLibrary) {
           continue;
         }
-        // maybe already imported with a prefix
+        // maybe already imported
         if (alreadyImportedWithPrefix.contains(librarySource)) {
           continue;
         }
         // prepare LibraryElement
         LibraryElement libraryElement =
-            context.getResult(librarySource, LIBRARY_ELEMENT8);
+            context.getResult(librarySource, LIBRARY_ELEMENT4);
         if (libraryElement == null) {
           continue;
         }
@@ -1990,13 +2007,17 @@
         }
         ClassElement targetClassElement = targetType.element as ClassElement;
         targetElement = targetClassElement;
-        // may be static
+        // prepare target ClassDeclaration
+        AstNode targetTypeNode = getParsedClassElementNode(targetClassElement);
+        if (targetTypeNode is! ClassDeclaration) {
+          return;
+        }
+        ClassDeclaration targetClassNode = targetTypeNode;
+        // maybe static
         if (target is Identifier) {
           staticModifier = target.bestElement.kind == ElementKind.CLASS;
         }
         // prepare insert offset
-        ClassDeclaration targetClassNode =
-            getParsedClassElementNode(targetClassElement);
         prefix = '  ';
         insertOffset = targetClassNode.end - 1;
         if (targetClassNode.members.isEmpty) {
diff --git a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
index 1c80559..c28dae5 100644
--- a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
+++ b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
@@ -5,9 +5,9 @@
 library services.src.correction.name_suggestion;
 
 import 'package:analysis_server/src/services/correction/strings.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/ast.dart';
 
 List<String> _KNOWN_METHOD_NAME_PREFIXES = ['get', 'is', 'to'];
 
diff --git a/pkg/analysis_server/lib/src/services/correction/namespace.dart b/pkg/analysis_server/lib/src/services/correction/namespace.dart
index f1086fc..9a83cb2 100644
--- a/pkg/analysis_server/lib/src/services/correction/namespace.dart
+++ b/pkg/analysis_server/lib/src/services/correction/namespace.dart
@@ -4,8 +4,8 @@
 
 library services.src.correction.namespace;
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 
 /**
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 9d9faa1..0d35566 100644
--- a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
+++ b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
@@ -7,8 +7,8 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart'
     hide AnalysisError, Element;
 import 'package:analysis_server/src/services/correction/strings.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/error.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart b/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
index 42addf6..a4cc1a9 100644
--- a/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
@@ -5,7 +5,8 @@
 library services.src.correction.selection_analyzer;
 
 import 'package:analysis_server/src/services/correction/source_range.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/correction/sort_members.dart b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
index 49f104b..4592367 100644
--- a/pkg/analysis_server/lib/src/services/correction/sort_members.dart
+++ b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
@@ -6,8 +6,7 @@
 
 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/services/correction/strings.dart';
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 
 /**
  * Sorter for unit/class members.
@@ -63,16 +62,9 @@
     // prepare edits
     List<SourceEdit> edits = <SourceEdit>[];
     if (code != initialCode) {
-      int prefixLength = findCommonPrefix(initialCode, code);
-      int suffixLength = findCommonSuffix(initialCode, code);
-      String prefix = code.substring(0, prefixLength);
-      String suffix = code.substring(code.length - suffixLength, code.length);
-      int commonLength = findCommonOverlap(prefix, suffix);
-      suffixLength -= commonLength;
-      SourceEdit edit = new SourceEdit(
-          prefixLength,
-          initialCode.length - suffixLength - prefixLength,
-          code.substring(prefixLength, code.length - suffixLength));
+      SimpleDiff diff = computeSimpleDiff(initialCode, code);
+      SourceEdit edit =
+          new SourceEdit(diff.offset, diff.length, diff.replacement);
       edits.add(edit);
     }
     return edits;
@@ -161,8 +153,12 @@
    * Sorts all [Directive]s.
    */
   void _sortUnitDirectives() {
+    bool hasLibraryDirective = false;
     List<_DirectiveInfo> directives = [];
     for (Directive directive in unit.directives) {
+      if (directive is LibraryDirective) {
+        hasLibraryDirective = true;
+      }
       if (directive is! UriBasedDirective) {
         continue;
       }
@@ -195,10 +191,17 @@
         kind = _DirectivePriority.PART;
       }
       if (kind != null) {
-        int offset = directive.offset;
-        int length = directive.length;
+        String documentationText;
+        if (directive.documentationComment != null) {
+          documentationText = code.substring(
+              directive.documentationComment.offset,
+              directive.documentationComment.end);
+        }
+        int offset = directive.firstTokenAfterCommentAndMetadata.offset;
+        int length = directive.end - offset;
         String text = code.substring(offset, offset + length);
-        directives.add(new _DirectiveInfo(directive, kind, uriContent, text));
+        directives.add(new _DirectiveInfo(
+            directive, kind, uriContent, documentationText, text));
       }
     }
     // nothing to do
@@ -207,6 +210,12 @@
     }
     int firstDirectiveOffset = directives[0].directive.offset;
     int lastDirectiveEnd = directives[directives.length - 1].directive.end;
+    // Without a library directive, the library comment is the comment of the
+    // first directive.
+    _DirectiveInfo libraryDocumentationDirective;
+    if (!hasLibraryDirective && directives.isNotEmpty) {
+      libraryDocumentationDirective = directives.first;
+    }
     // do sort
     directives.sort();
     // append directives with grouping
@@ -215,6 +224,7 @@
       StringBuffer sb = new StringBuffer();
       String endOfLine = this.endOfLine;
       _DirectivePriority currentPriority = null;
+      bool firstOutputDirective = true;
       for (_DirectiveInfo directive in directives) {
         if (currentPriority != directive.priority) {
           if (sb.length != 0) {
@@ -222,35 +232,25 @@
           }
           currentPriority = directive.priority;
         }
+        if (directive != libraryDocumentationDirective &&
+            directive.documentationText != null) {
+          sb.write(directive.documentationText);
+          sb.write(endOfLine);
+        }
+        if (firstOutputDirective) {
+          firstOutputDirective = false;
+          if (libraryDocumentationDirective != null &&
+              libraryDocumentationDirective.documentationText != null) {
+            sb.write(libraryDocumentationDirective.documentationText);
+            sb.write(endOfLine);
+          }
+        }
         sb.write(directive.text);
         sb.write(endOfLine);
       }
       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);
@@ -368,9 +368,11 @@
   final Directive directive;
   final _DirectivePriority priority;
   final String uri;
+  final String documentationText;
   final String text;
 
-  _DirectiveInfo(this.directive, this.priority, this.uri, this.text);
+  _DirectiveInfo(this.directive, this.priority, this.uri,
+      this.documentationText, this.text);
 
   @override
   int compareTo(_DirectiveInfo other) {
diff --git a/pkg/analysis_server/lib/src/services/correction/source_range.dart b/pkg/analysis_server/lib/src/services/correction/source_range.dart
index 32c98b9..4440a5c 100644
--- a/pkg/analysis_server/lib/src/services/correction/source_range.dart
+++ b/pkg/analysis_server/lib/src/services/correction/source_range.dart
@@ -4,9 +4,9 @@
 
 library services.src.correction.source_range_factory;
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/source.dart';
 
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 2ec69eb..974f9db 100644
--- a/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
@@ -9,11 +9,11 @@
 import 'package:analysis_server/src/services/correction/source_range.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/correction/util.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/correction/strings.dart b/pkg/analysis_server/lib/src/services/correction/strings.dart
index 4a0ff76..1c38cbf6 100644
--- a/pkg/analysis_server/lib/src/services/correction/strings.dart
+++ b/pkg/analysis_server/lib/src/services/correction/strings.dart
@@ -41,6 +41,24 @@
   return a.compareTo(b);
 }
 
+/**
+ * Return a simple difference between the given [oldStr] and [newStr].
+ */
+SimpleDiff computeSimpleDiff(String oldStr, String newStr) {
+  int prefixLength = findCommonPrefix(oldStr, newStr);
+  int suffixLength = findCommonSuffix(oldStr, newStr);
+  while (prefixLength >= 0) {
+    int oldReplaceLength = oldStr.length - prefixLength - suffixLength;
+    int newReplaceLength = newStr.length - prefixLength - suffixLength;
+    if (oldReplaceLength >= 0 && newReplaceLength >= 0) {
+      return new SimpleDiff(prefixLength, oldReplaceLength,
+          newStr.substring(prefixLength, newStr.length - suffixLength));
+    }
+    prefixLength--;
+  }
+  return new SimpleDiff(0, oldStr.length, newStr);
+}
+
 int countLeadingWhitespaces(String str) {
   int i = 0;
   for (; i < str.length; i++) {
@@ -279,3 +297,15 @@
   }
   return str.substring(pos + separator.length);
 }
+
+/**
+ * Information about a single replacement that should be made to convert the
+ * "old" string to the "new" one.
+ */
+class SimpleDiff {
+  final int offset;
+  final int length;
+  final String replacement;
+
+  SimpleDiff(this.offset, this.length, this.replacement);
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index 65c12c6..1603ef3 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -12,13 +12,15 @@
     show doSourceChange_addElementEdit;
 import 'package:analysis_server/src/services/correction/source_range.dart';
 import 'package:analysis_server/src/services/correction/strings.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/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/lib/src/services/dependencies/reachable_source_collector.dart b/pkg/analysis_server/lib/src/services/dependencies/reachable_source_collector.dart
index a0273ce..d0160d8 100644
--- a/pkg/analysis_server/lib/src/services/dependencies/reachable_source_collector.dart
+++ b/pkg/analysis_server/lib/src/services/dependencies/reachable_source_collector.dart
@@ -33,7 +33,6 @@
   }
 
   void _addDependencies(Source source) {
-
     String sourceUri = source.uri.toString();
 
     // Careful not to revisit.
diff --git a/pkg/analysis_server/lib/src/services/index/index.dart b/pkg/analysis_server/lib/src/services/index/index.dart
index d86b322..bf5e47d 100644
--- a/pkg/analysis_server/lib/src/services/index/index.dart
+++ b/pkg/analysis_server/lib/src/services/index/index.dart
@@ -1,255 +1,178 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library services.index;
-
 import 'dart:async';
 
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/indexable_element.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/index_unit.dart';
+import 'package:collection/collection.dart';
 
 /**
- * A filter for [Element] names.
+ * Return a new [Index] instance that keeps information in memory.
  */
-typedef bool ElementNameFilter(String name);
-
-/**
- * The interface [Index] defines the behavior of objects that maintain an index
- * storing relations between indexable objects.
- *
- * Any modification operations are executed before any read operation.
- * There is no guarantee about the order in which the [Future]s for read
- * operations will complete.
- */
-abstract class Index implements IndexStore {
-  /**
-   * Set the index contributors used by this index to the given list of
-   * [contributors].
-   */
-  void set contributors(List<IndexContributor> contributors);
-
-  /**
-   * Answers index statistics.
-   */
-  String get statistics;
-
-  /**
-   * Returns top-level [Element]s whose names satisfy to [nameFilter].
-   */
-  List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter);
-
-  /**
-   * Processes the given [object] in order to record the relationships.
-   *
-   * [context] - the [AnalysisContext] in which the [object] being indexed.
-   * [object] - the object being indexed.
-   */
-  void index(AnalysisContext context, Object object);
-
-  /**
-   * Starts the index.
-   * Should be called before any other method.
-   */
-  void run();
-
-  /**
-   * Stops the index.
-   * After calling this method operations may not be executed.
-   */
-  void stop();
+Index createMemoryIndex() {
+  return new Index._();
 }
 
 /**
- * An [Element] which is used to index references to the name without specifying
- * a concrete kind of this name - field, method or something else.
+ * Return the index of the first occurrence of the [value] in the [sortedList],
+ * or `-1` if the [value] is not in the list.
  */
-class IndexableName implements IndexableObject {
-  /**
-   * The name to be indexed.
-   */
-  final String name;
-
-  /**
-   * Initialize a newly created indexable name to represent the given [name].
-   */
-  IndexableName(this.name);
-
-  @override
-  String get filePath => null;
-
-  @override
-  IndexableNameKind get kind => IndexableNameKind.INSTANCE;
-
-  @override
-  int get offset {
+int _findFirstOccurrence(List<int> sortedList, int value) {
+  // Find an occurrence.
+  int i = binarySearch(sortedList, value);
+  if (i == -1) {
     return -1;
   }
-
-  @override
-  bool operator ==(Object object) =>
-      object is IndexableName && object.name == name;
-
-  @override
-  String toString() => name;
+  // Find the first occurrence.
+  while (i > 0 && sortedList[i - 1] == value) {
+    i--;
+  }
+  return i;
 }
 
 /**
- * The kind of an indexable name.
+ * Interface for storing and requesting relations.
  */
-class IndexableNameKind implements IndexableObjectKind<IndexableName> {
-  /**
-   * The unique instance of this class.
-   */
-  static final IndexableNameKind INSTANCE =
-      new IndexableNameKind._(IndexableObjectKind.nextIndex);
+class Index {
+  final Map<AnalysisContext, _ContextIndex> _contextIndexMap =
+      <AnalysisContext, _ContextIndex>{};
+
+  Index._();
 
   /**
-   * The index uniquely identifying this kind.
+   * Complete with a list of locations where elements of the given [kind] with
+   * names satisfying the given [regExp] are defined.
    */
-  final int index;
-
-  /**
-   * Initialize a newly created kind to have the given [index].
-   */
-  IndexableNameKind._(this.index) {
-    IndexableObjectKind.register(this);
+  Future<List<Location>> getDefinedNames(RegExp regExp, IndexNameKind kind) {
+    return _mergeLocations((_ContextIndex index) {
+      return index.getDefinedNames(regExp, kind);
+    });
   }
 
-  @override
-  IndexableName decode(AnalysisContext context, String filePath, int offset) {
-    throw new UnsupportedError(
-        'Indexable names cannot be decoded through their kind');
+  /**
+   * Complete with a list of locations where the given [element] has relation
+   * of the given [kind].
+   */
+  Future<List<Location>> getRelations(Element element, IndexRelationKind kind) {
+    return _mergeLocations((_ContextIndex index) {
+      return index.getRelations(element, kind);
+    });
   }
 
-  @override
-  int encodeHash(StringToInt stringToInt, IndexableName indexable) {
-    String name = indexable.name;
-    return stringToInt(name);
+  /**
+   * Complete with a list of locations where a class members with the given
+   * [name] is referenced with a qualifier, but is not resolved.
+   */
+  Future<List<Location>> getUnresolvedMemberReferences(String name) {
+    return _mergeLocations((_ContextIndex index) {
+      return index.getUnresolvedMemberReferences(name);
+    });
+  }
+
+  /**
+   * Index declarations in the given partially resolved [unit].
+   */
+  void indexDeclarations(CompilationUnit unit) {
+    if (unit?.element?.library == null) {
+      return;
+    }
+    AnalysisContext context = unit.element.context;
+    _getContextIndex(context).indexDeclarations(unit);
+  }
+
+  /**
+   * Index the given fully resolved [unit].
+   */
+  void indexUnit(CompilationUnit unit) {
+    if (unit?.element?.library == null) {
+      return;
+    }
+    AnalysisContext context = unit.element.context;
+    _getContextIndex(context).indexUnit(unit);
+  }
+
+  /**
+   * Remove all index information for the given [context].
+   */
+  void removeContext(AnalysisContext context) {
+    _contextIndexMap.remove(context);
+  }
+
+  /**
+   * Remove index information about the unit in the given [context].
+   */
+  void removeUnit(
+      AnalysisContext context, Source librarySource, Source unitSource) {
+    _contextIndexMap[context]?.removeUnit(librarySource, unitSource);
+  }
+
+  /**
+   * Notify the index that the client is going to stop using it.
+   */
+  void stop() {}
+
+  /**
+   * Return the [_ContextIndex] instance for the given [context].
+   */
+  _ContextIndex _getContextIndex(AnalysisContext context) {
+    return _contextIndexMap.putIfAbsent(context, () {
+      return new _ContextIndex(context);
+    });
+  }
+
+  /**
+   * Complete with a list of all results returned by the [callback] for every
+   * context specific index.
+   */
+  Future<List<Location>> _mergeLocations(
+      Future<List<Location>> callback(_ContextIndex index)) async {
+    List<Location> locations = <Location>[];
+    for (_ContextIndex index in _contextIndexMap.values) {
+      List<Location> contextLocations = await callback(index);
+      locations.addAll(contextLocations);
+    }
+    return locations;
   }
 }
 
 /**
- * Constants used when populating and accessing the index.
- */
-class IndexConstants {
-  /**
-   * Left: the Universe or a Library.
-   *   Defines an Element.
-   * Right: an Element declaration.
-   */
-  static final RelationshipImpl DEFINES =
-      RelationshipImpl.getRelationship("defines");
-
-  /**
-   * Left: class.
-   *   Has ancestor (extended or implemented, directly or indirectly).
-   * Right: other class declaration.
-   */
-  static final RelationshipImpl HAS_ANCESTOR =
-      RelationshipImpl.getRelationship("has-ancestor");
-
-  /**
-   * Left: class.
-   *   Is extended by.
-   * Right: other class declaration.
-   */
-  static final RelationshipImpl IS_EXTENDED_BY =
-      RelationshipImpl.getRelationship("is-extended-by");
-
-  /**
-   * Left: class.
-   *   Is implemented by.
-   * Right: other class declaration.
-   */
-  static final RelationshipImpl IS_IMPLEMENTED_BY =
-      RelationshipImpl.getRelationship("is-implemented-by");
-
-  /**
-   * Left: class.
-   *   Is mixed into.
-   * Right: other class declaration.
-   */
-  static final RelationshipImpl IS_MIXED_IN_BY =
-      RelationshipImpl.getRelationship("is-mixed-in-by");
-
-  /**
-   * Left: local variable, parameter.
-   *   Is read at.
-   * Right: location.
-   */
-  static final RelationshipImpl IS_READ_BY =
-      RelationshipImpl.getRelationship("is-read-by");
-
-  /**
-   * Left: local variable, parameter.
-   *   Is both read and written at.
-   * Right: location.
-   */
-  static final RelationshipImpl IS_READ_WRITTEN_BY =
-      RelationshipImpl.getRelationship("is-read-written-by");
-
-  /**
-   * Left: local variable, parameter.
-   *   Is written at.
-   * Right: location.
-   */
-  static final RelationshipImpl IS_WRITTEN_BY =
-      RelationshipImpl.getRelationship("is-written-by");
-
-  /**
-   * Left: function, method, variable, getter.
-   *   Is invoked at.
-   * Right: location.
-   */
-  static final RelationshipImpl IS_INVOKED_BY =
-      RelationshipImpl.getRelationship("is-invoked-by");
-
-  /**
-   * Left: function, function type, class, field, method.
-   *   Is referenced (and not invoked, read/written) at.
-   * Right: location.
-   */
-  static final RelationshipImpl IS_REFERENCED_BY =
-      RelationshipImpl.getRelationship("is-referenced-by");
-
-  /**
-   * Left: name element.
-   *   Is defined by.
-   * Right: concrete element declaration.
-   */
-  static final RelationshipImpl NAME_IS_DEFINED_BY =
-      RelationshipImpl.getRelationship("name-is-defined-by");
-
-  IndexConstants._();
-}
-
-/**
- * Instances of the class [LocationImpl] represent a location related to an
- * element.
+ * Information about location of a single relation in the index.
  *
- * The location is expressed as an offset and length, but the offset is relative
- * to the resource containing the element rather than the start of the element
- * within that resource.
+ * The location is expressed as a library specific unit containing the index
+ * relation, offset within this [Source] and  length.
+ *
+ * Clients may not extend, implement or mix-in this class.
  */
-class LocationImpl implements Location {
-  static const int _FLAG_QUALIFIED = 1 << 0;
-  static const int _FLAG_RESOLVED = 1 << 1;
-
+class Location {
   /**
-   * An empty array of locations.
+   * The [AnalysisContext] containing this location.
    */
-  static const List<LocationImpl> EMPTY_LIST = const <LocationImpl>[];
+  final AnalysisContext context;
 
   /**
-   * The indexable object containing this location.
+   * The URI of the source of the library containing this location.
    */
-  final IndexableObject indexable;
+  final String libraryUri;
 
   /**
-   * The offset of this location within the resource containing the element.
+   * The URI of the source of the unit containing this location.
+   */
+  final String unitUri;
+
+  /**
+   * The kind of usage at this location.
+   */
+  final IndexRelationKind kind;
+
+  /**
+   * The offset of this location within the [unitUri].
    */
   final int offset;
 
@@ -259,113 +182,402 @@
   final int length;
 
   /**
-   * The flags of this location.
+   * Is `true` if this location is qualified.
    */
-  int _flags;
+  final bool isQualified;
 
   /**
-   * Initializes a newly created location to be relative to the given
-   * [indexable] object at the given [offset] with the given [length].
+   * Is `true` if this location is resolved.
    */
-  LocationImpl(this.indexable, this.offset, this.length,
-      {bool isQualified: false, bool isResolved: true}) {
-    if (indexable == null) {
-      throw new ArgumentError("indexable object cannot be null");
-    }
-    _flags = 0;
-    if (isQualified) {
-      _flags |= _FLAG_QUALIFIED;
-    }
-    if (isResolved) {
-      _flags |= _FLAG_RESOLVED;
-    }
+  final bool isResolved;
+
+  Location(this.context, this.libraryUri, this.unitUri, this.kind, this.offset,
+      this.length, this.isQualified, this.isResolved);
+
+  @override
+  String toString() => 'Location{librarySourceUri: $libraryUri, '
+      'unitSourceUri: $unitUri, offset: $offset, length: $length, '
+      'isQualified: $isQualified}, isResolved: $isResolved}';
+}
+
+/**
+ * Opaque identifier of a [PackageIndex].
+ */
+abstract class PackageIndexId {}
+
+/**
+ * Storage of [PackageIndex] objects.
+ */
+abstract class PackageIndexStore {
+  /**
+   * Complete with identifiers of all [PackageIndex] objects.
+   */
+  Future<Iterable<PackageIndexId>> getIds();
+
+  /**
+   * Complete with the [PackageIndex] with the given [id].
+   */
+  Future<PackageIndex> getIndex(PackageIndexId id);
+
+  /**
+   * Put the given [indexBuilder] into the store.
+   */
+  void putIndex(String unitLibraryUri, String unitUnitUri,
+      PackageIndexBuilder indexBuilder);
+}
+
+/**
+ * The [AnalysisContext] specific index.
+ */
+class _ContextIndex {
+  final AnalysisContext context;
+  final Map<String, PackageIndex> indexMap = <String, PackageIndex>{};
+
+  _ContextIndex(this.context);
+
+  /**
+   * Complete with a list of locations where elements of the given [kind] with
+   * names satisfying the given [regExp] are defined.
+   */
+  Future<List<Location>> getDefinedNames(
+      RegExp regExp, IndexNameKind kind) async {
+    return _mergeLocations((_PackageIndexRequester requester) {
+      return requester.getDefinedNames(context, regExp, kind);
+    });
   }
 
   /**
-   * The element containing this location.
+   * Complete with a list of locations where the given [element] has relation
+   * of the given [kind].
    */
-  @deprecated
-  Element get element {
-    if (indexable is IndexableElement) {
-      return (indexable as IndexableElement).element;
-    }
-    return null;
+  Future<List<Location>> getRelations(Element element, IndexRelationKind kind) {
+    return _mergeLocations((_PackageIndexRequester requester) {
+      return requester.getRelations(context, element, kind);
+    });
   }
 
-  @override
-  bool get isQualified => (_flags & _FLAG_QUALIFIED) != 0;
+  /**
+   * Complete with a list of locations where a class members with the given
+   * [name] is referenced with a qualifier, but is not resolved.
+   */
+  Future<List<Location>> getUnresolvedMemberReferences(String name) async {
+    return _mergeLocations((_PackageIndexRequester requester) {
+      return requester.getUnresolvedMemberReferences(context, name);
+    });
+  }
 
-  @override
-  bool get isResolved => (_flags & _FLAG_RESOLVED) != 0;
+  /**
+   * Index declarations in the given partially resolved [unit].
+   */
+  void indexDeclarations(CompilationUnit unit) {
+    PackageIndexAssembler assembler = new PackageIndexAssembler();
+    assembler.indexDeclarations(unit);
+    _putUnitIndexBuilder(unit, assembler);
+  }
 
-  @override
-  String toString() {
-    String flagsStr = '';
-    if (isQualified) {
-      flagsStr += ' qualified';
+  /**
+   * Index the given fully resolved [unit].
+   */
+  void indexUnit(CompilationUnit unit) {
+    PackageIndexAssembler assembler = new PackageIndexAssembler();
+    assembler.indexUnit(unit);
+    _putUnitIndexBuilder(unit, assembler);
+  }
+
+  /**
+   * Remove index information about the unit.
+   */
+  void removeUnit(Source librarySource, Source unitSource) {
+    String key = _getUnitKeyForSource(librarySource, unitSource);
+    indexMap.remove(key);
+  }
+
+  String _getUnitKeyForElement(CompilationUnitElement unitElement) {
+    Source librarySource = unitElement.library.source;
+    Source unitSource = unitElement.source;
+    return _getUnitKeyForSource(librarySource, unitSource);
+  }
+
+  String _getUnitKeyForSource(Source librarySource, Source unitSource) {
+    String unitLibraryUri = librarySource.uri.toString();
+    String unitUnitUri = unitSource.uri.toString();
+    return '$unitLibraryUri;$unitUnitUri';
+  }
+
+  Future<List<Location>> _mergeLocations(
+      List<Location> callback(_PackageIndexRequester requester)) async {
+    List<Location> locations = <Location>[];
+    for (PackageIndex index in indexMap.values) {
+      _PackageIndexRequester requester = new _PackageIndexRequester(index);
+      List<Location> indexLocations = callback(requester);
+      locations.addAll(indexLocations);
     }
-    if (isResolved) {
-      flagsStr += ' resolved';
-    }
-    return '[$offset - ${offset + length}) $flagsStr in $indexable';
+    return locations;
+  }
+
+  void _putUnitIndexBuilder(
+      CompilationUnit unit, PackageIndexAssembler assembler) {
+    PackageIndexBuilder indexBuilder = assembler.assemble();
+    // Put the index into the map.
+    List<int> indexBytes = indexBuilder.toBuffer();
+    PackageIndex index = new PackageIndex.fromBuffer(indexBytes);
+    String key = _getUnitKeyForElement(unit.element);
+    indexMap[key] = index;
   }
 }
 
 /**
- * A [LocationImpl] with attached data.
+ * Helper for requesting information from a single [PackageIndex].
  */
-class LocationWithData<D> extends LocationImpl {
-  final D data;
+class _PackageIndexRequester {
+  final PackageIndex index;
 
-  LocationWithData(LocationImpl location, this.data)
-      : super(location.indexable, location.offset, location.length);
+  _PackageIndexRequester(this.index);
+
+  /**
+   * Return the [element]'s identifier in the [index] or `-1` if the
+   * [element] is not referenced in the [index].
+   */
+  int findElementId(Element element) {
+    // Find the id of the element's unit.
+    int unitId = getUnitId(element);
+    if (unitId == -1) {
+      return -1;
+    }
+    // Prepare information about the element.
+    ElementInfo info = PackageIndexAssembler.newElementInfo(unitId, element);
+    // Find the first occurrence of an element with the same offset.
+    int elementId = _findFirstOccurrence(index.elementOffsets, info.offset);
+    if (elementId == -1) {
+      return -1;
+    }
+    // Try to find the element id using offset, unit and kind.
+    for (;
+        elementId < index.elementOffsets.length &&
+            index.elementOffsets[elementId] == info.offset;
+        elementId++) {
+      if (index.elementUnits[elementId] == unitId &&
+          index.elementKinds[elementId] == info.kind) {
+        return elementId;
+      }
+    }
+    return -1;
+  }
+
+  /**
+   * Complete with a list of locations where elements of the given [kind] with
+   * names satisfying the given [regExp] are defined.
+   */
+  List<Location> getDefinedNames(
+      AnalysisContext context, RegExp regExp, IndexNameKind kind) {
+    List<Location> locations = <Location>[];
+    for (UnitIndex unitIndex in index.units) {
+      _UnitIndexRequester requester = new _UnitIndexRequester(this, unitIndex);
+      List<Location> unitLocations =
+          requester.getDefinedNames(context, regExp, kind);
+      locations.addAll(unitLocations);
+    }
+    return locations;
+  }
+
+  /**
+   * Complete with a list of locations where the given [element] has relation
+   * of the given [kind].
+   */
+  List<Location> getRelations(
+      AnalysisContext context, Element element, IndexRelationKind kind) {
+    int elementId = findElementId(element);
+    if (elementId == -1) {
+      return const <Location>[];
+    }
+    List<Location> locations = <Location>[];
+    for (UnitIndex unitIndex in index.units) {
+      _UnitIndexRequester requester = new _UnitIndexRequester(this, unitIndex);
+      List<Location> unitLocations =
+          requester.getRelations(context, elementId, kind);
+      locations.addAll(unitLocations);
+    }
+    return locations;
+  }
+
+  /**
+   * Return the identifier of [str] in the [index] or `-1` if [str] is not used
+   * in the [index].
+   */
+  int getStringId(String str) {
+    return binarySearch(index.strings, str);
+  }
+
+  /**
+   * Return the identifier of the [CompilationUnitElement] containing the
+   * [element] in the [index] or `-1` if not found.
+   */
+  int getUnitId(Element element) {
+    CompilationUnitElement unitElement =
+        PackageIndexAssembler.getUnitElement(element);
+    int libraryUriId = getUriId(unitElement.library.source.uri);
+    if (libraryUriId == -1) {
+      return -1;
+    }
+    int unitUriId = getUriId(unitElement.source.uri);
+    if (unitUriId == -1) {
+      return -1;
+    }
+    for (int i = 0; i < index.unitLibraryUris.length; i++) {
+      if (index.unitLibraryUris[i] == libraryUriId &&
+          index.unitUnitUris[i] == unitUriId) {
+        return i;
+      }
+    }
+    return -1;
+  }
+
+  /**
+   * Return the URI of the library source of the library specific [unit].
+   */
+  String getUnitLibraryUri(int unit) {
+    int id = index.unitLibraryUris[unit];
+    return index.strings[id];
+  }
+
+  /**
+   * Return the URI of the unit source of the library specific [unit].
+   */
+  String getUnitUnitUri(int unit) {
+    int id = index.unitUnitUris[unit];
+    return index.strings[id];
+  }
+
+  /**
+   * Complete with a list of locations where a class members with the given
+   * [name] is referenced with a qualifier, but is not resolved.
+   */
+  List<Location> getUnresolvedMemberReferences(
+      AnalysisContext context, String name) {
+    List<Location> locations = <Location>[];
+    for (UnitIndex unitIndex in index.units) {
+      _UnitIndexRequester requester = new _UnitIndexRequester(this, unitIndex);
+      List<Location> unitLocations =
+          requester.getUnresolvedMemberReferences(context, name);
+      locations.addAll(unitLocations);
+    }
+    return locations;
+  }
+
+  /**
+   * Return the identifier of the [uri] in the [index] or `-1` if the [uri] is
+   * not used in the [index].
+   */
+  int getUriId(Uri uri) {
+    String str = uri.toString();
+    return getStringId(str);
+  }
 }
 
 /**
- * Relationship between an element and a location. Relationships are identified
- * by a globally unique identifier.
+ * Helper for requesting information from a single [UnitIndex].
  */
-class RelationshipImpl implements Relationship {
-  /**
-   * A table mapping relationship identifiers to relationships.
-   */
-  static Map<String, RelationshipImpl> _RELATIONSHIP_MAP = {};
+class _UnitIndexRequester {
+  final _PackageIndexRequester packageRequester;
+  final UnitIndex unitIndex;
+
+  _UnitIndexRequester(this.packageRequester, this.unitIndex);
 
   /**
-   * The next artificial hash code.
+   * Complete with a list of locations where elements of the given [kind] with
+   * names satisfying the given [regExp] are defined.
    */
-  static int _NEXT_HASH_CODE = 0;
-
-  /**
-   * The artificial hash code for this object.
-   */
-  final int _hashCode = _NEXT_HASH_CODE++;
-
-  /**
-   * The unique identifier for this relationship.
-   */
-  final String identifier;
-
-  /**
-   * Initialize a newly created relationship with the given unique identifier.
-   */
-  RelationshipImpl(this.identifier);
-
-  @override
-  int get hashCode => _hashCode;
-
-  @override
-  String toString() => identifier;
-
-  /**
-   * Returns the relationship with the given unique [identifier].
-   */
-  static RelationshipImpl getRelationship(String identifier) {
-    RelationshipImpl relationship = _RELATIONSHIP_MAP[identifier];
-    if (relationship == null) {
-      relationship = new RelationshipImpl(identifier);
-      _RELATIONSHIP_MAP[identifier] = relationship;
+  List<Location> getDefinedNames(
+      AnalysisContext context, RegExp regExp, IndexNameKind kind) {
+    List<Location> locations = <Location>[];
+    String unitLibraryUri = null;
+    String unitUnitUri = null;
+    for (int i = 0; i < unitIndex.definedNames.length; i++) {
+      if (unitIndex.definedNameKinds[i] == kind) {
+        int nameIndex = unitIndex.definedNames[i];
+        String name = packageRequester.index.strings[nameIndex];
+        if (regExp.matchAsPrefix(name) != null) {
+          unitLibraryUri ??= packageRequester.getUnitLibraryUri(unitIndex.unit);
+          unitUnitUri ??= packageRequester.getUnitUnitUri(unitIndex.unit);
+          locations.add(new Location(context, unitLibraryUri, unitUnitUri, null,
+              unitIndex.definedNameOffsets[i], name.length, false, true));
+        }
+      }
     }
-    return relationship;
+    return locations;
+  }
+
+  /**
+   * Return a list of locations where an element with the given [elementId] has
+   * relation of the given [kind].
+   */
+  List<Location> getRelations(
+      AnalysisContext context, int elementId, IndexRelationKind kind) {
+    // Find the first usage of the element.
+    int i = _findFirstOccurrence(unitIndex.usedElements, elementId);
+    if (i == -1) {
+      return const <Location>[];
+    }
+    // Create locations for every usage of the element.
+    List<Location> locations = <Location>[];
+    String unitLibraryUri = null;
+    String unitUnitUri = null;
+    for (;
+        i < unitIndex.usedElements.length &&
+            unitIndex.usedElements[i] == elementId;
+        i++) {
+      if (unitIndex.usedElementKinds[i] == kind) {
+        unitLibraryUri ??= packageRequester.getUnitLibraryUri(unitIndex.unit);
+        unitUnitUri ??= packageRequester.getUnitUnitUri(unitIndex.unit);
+        locations.add(new Location(
+            context,
+            unitLibraryUri,
+            unitUnitUri,
+            kind,
+            unitIndex.usedElementOffsets[i],
+            unitIndex.usedElementLengths[i],
+            unitIndex.usedElementIsQualifiedFlags[i],
+            true));
+      }
+    }
+    return locations;
+  }
+
+  /**
+   * Complete with a list of locations where a class members with the given
+   * [name] is referenced with a qualifier, but is not resolved.
+   */
+  List<Location> getUnresolvedMemberReferences(
+      AnalysisContext context, String name) {
+    // Find the name ID in the package index.
+    int nameId = packageRequester.getStringId(name);
+    if (nameId == -1) {
+      return const <Location>[];
+    }
+    // Find the first usage of the name.
+    int i = _findFirstOccurrence(unitIndex.usedNames, nameId);
+    if (i == -1) {
+      return const <Location>[];
+    }
+    // Create locations for every usage of the name.
+    List<Location> locations = <Location>[];
+    String unitLibraryUri = null;
+    String unitUnitUri = null;
+    for (;
+        i < unitIndex.usedNames.length && unitIndex.usedNames[i] == nameId;
+        i++) {
+      unitLibraryUri ??= packageRequester.getUnitLibraryUri(unitIndex.unit);
+      unitUnitUri ??= packageRequester.getUnitUnitUri(unitIndex.unit);
+      locations.add(new Location(
+          context,
+          unitLibraryUri,
+          unitUnitUri,
+          unitIndex.usedNameKinds[i],
+          unitIndex.usedNameOffsets[i],
+          name.length,
+          unitIndex.usedNameIsQualifiedFlags[i],
+          false));
+    }
+    return locations;
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/index/index_contributor.dart b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
deleted file mode 100644
index ebac4d6..0000000
--- a/pkg/analysis_server/lib/src/services/index/index_contributor.dart
+++ /dev/null
@@ -1,840 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.src.index.index_contributor;
-
-import 'dart:collection' show Queue;
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/correction/namespace.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/index_store.dart';
-import 'package:analysis_server/src/services/index/indexable_element.dart';
-import 'package:analysis_server/src/services/index/indexable_file.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/generated/ast.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-
-/**
- * An [IndexContributor] that contributes relationships for Dart files.
- */
-class DartIndexContributor extends IndexContributor {
-  @override
-  void contributeTo(IndexStore store, AnalysisContext context, Object object) {
-    if (store is InternalIndexStore && object is CompilationUnit) {
-      _IndexContributor contributor = new _IndexContributor(store);
-      object.accept(contributor);
-    }
-  }
-}
-
-/**
- * Visits a resolved AST and adds relationships into [InternalIndexStore].
- */
-class _IndexContributor extends GeneralizingAstVisitor {
-  final InternalIndexStore _store;
-
-  CompilationUnitElement _unitElement;
-  LibraryElement _libraryElement;
-
-  Map<ImportElement, Set<Element>> _importElementsMap = {};
-
-  /**
-   * A stack whose top element (the element with the largest index) is an
-   * element representing the inner-most enclosing scope.
-   */
-  Queue<Element> _elementStack = new Queue();
-
-  _IndexContributor(this._store);
-
-  /**
-   * Enter a new scope represented by the given [Element].
-   */
-  void enterScope(Element element) {
-    _elementStack.addFirst(element);
-  }
-
-  /**
-   * Return the inner-most enclosing [Element], wrapped as an indexable object,
-   * or `null` if there is no enclosing element.
-   */
-  IndexableElement peekElement() {
-    for (Element element in _elementStack) {
-      if (element != null) {
-        return new IndexableElement(element);
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Record the given relationship between the given [Element] and
-   * [LocationImpl].
-   */
-  void recordRelationshipElement(
-      Element element, RelationshipImpl relationship, LocationImpl location) {
-    if (element != null && location != null) {
-      _store.recordRelationship(
-          new IndexableElement(element), relationship, location);
-    }
-  }
-
-  /**
-   * Record the given relationship between the given [IndexableObject] and
-   * [LocationImpl].
-   */
-  void recordRelationshipIndexable(IndexableObject indexable,
-      RelationshipImpl relationship, LocationImpl location) {
-    if (indexable != null && location != null) {
-      _store.recordRelationship(indexable, relationship, location);
-    }
-  }
-
-  @override
-  visitAssignmentExpression(AssignmentExpression node) {
-    _recordOperatorReference(node.operator, node.bestElement);
-    super.visitAssignmentExpression(node);
-  }
-
-  @override
-  visitBinaryExpression(BinaryExpression node) {
-    _recordOperatorReference(node.operator, node.bestElement);
-    super.visitBinaryExpression(node);
-  }
-
-  @override
-  visitClassDeclaration(ClassDeclaration node) {
-    ClassElement element = node.element;
-    enterScope(element);
-    try {
-      _recordTopLevelElementDefinition(element);
-      _recordHasAncestor(element);
-      {
-        ExtendsClause extendsClause = node.extendsClause;
-        if (extendsClause != null) {
-          TypeName superclassNode = extendsClause.superclass;
-          _recordSuperType(superclassNode, IndexConstants.IS_EXTENDED_BY);
-        } else {
-          InterfaceType superType = element.supertype;
-          if (superType != null) {
-            ClassElement objectElement = superType.element;
-            recordRelationshipElement(
-                objectElement,
-                IndexConstants.IS_EXTENDED_BY,
-                _createLocationForOffset(node.name.offset, 0));
-          }
-        }
-      }
-      {
-        WithClause withClause = node.withClause;
-        if (withClause != null) {
-          for (TypeName mixinNode in withClause.mixinTypes) {
-            _recordSuperType(mixinNode, IndexConstants.IS_MIXED_IN_BY);
-          }
-        }
-      }
-      {
-        ImplementsClause implementsClause = node.implementsClause;
-        if (implementsClause != null) {
-          for (TypeName interfaceNode in implementsClause.interfaces) {
-            _recordSuperType(interfaceNode, IndexConstants.IS_IMPLEMENTED_BY);
-          }
-        }
-      }
-      super.visitClassDeclaration(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitClassTypeAlias(ClassTypeAlias node) {
-    ClassElement element = node.element;
-    enterScope(element);
-    try {
-      _recordTopLevelElementDefinition(element);
-      _recordHasAncestor(element);
-      {
-        TypeName superclassNode = node.superclass;
-        if (superclassNode != null) {
-          _recordSuperType(superclassNode, IndexConstants.IS_EXTENDED_BY);
-        }
-      }
-      {
-        WithClause withClause = node.withClause;
-        if (withClause != null) {
-          for (TypeName mixinNode in withClause.mixinTypes) {
-            _recordSuperType(mixinNode, IndexConstants.IS_MIXED_IN_BY);
-          }
-        }
-      }
-      {
-        ImplementsClause implementsClause = node.implementsClause;
-        if (implementsClause != null) {
-          for (TypeName interfaceNode in implementsClause.interfaces) {
-            _recordSuperType(interfaceNode, IndexConstants.IS_IMPLEMENTED_BY);
-          }
-        }
-      }
-      super.visitClassTypeAlias(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitCompilationUnit(CompilationUnit node) {
-    _unitElement = node.element;
-    if (_unitElement != null) {
-      _elementStack.add(_unitElement);
-      _libraryElement = _unitElement.enclosingElement;
-      if (_libraryElement != null) {
-        super.visitCompilationUnit(node);
-      }
-    }
-  }
-
-  @override
-  visitConstructorDeclaration(ConstructorDeclaration node) {
-    ConstructorElement element = node.element;
-    enterScope(element);
-    try {
-      super.visitConstructorDeclaration(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
-    SimpleIdentifier fieldName = node.fieldName;
-    Expression expression = node.expression;
-    // field reference is write here
-    if (fieldName != null) {
-      Element element = fieldName.staticElement;
-      LocationImpl location = _createLocationForNode(fieldName);
-      recordRelationshipElement(
-          element, IndexConstants.IS_WRITTEN_BY, location);
-    }
-    // index expression
-    if (expression != null) {
-      expression.accept(this);
-    }
-  }
-
-  @override
-  visitConstructorName(ConstructorName node) {
-    ConstructorElement element = node.staticElement;
-    // in 'class B = A;' actually A constructors are invoked
-    if (element != null &&
-        element.isSynthetic &&
-        element.redirectedConstructor != null) {
-      element = element.redirectedConstructor;
-    }
-    // prepare location
-    LocationImpl location;
-    if (node.name != null) {
-      int start = node.period.offset;
-      int end = node.name.end;
-      location = _createLocationForOffset(start, end - start);
-    } else {
-      int start = node.type.end;
-      location = _createLocationForOffset(start, 0);
-    }
-    // record relationship
-    recordRelationshipElement(
-        element, IndexConstants.IS_REFERENCED_BY, location);
-    super.visitConstructorName(node);
-  }
-
-  @override
-  visitDeclaredIdentifier(DeclaredIdentifier node) {
-    LocalVariableElement element = node.element;
-    enterScope(element);
-    try {
-      super.visitDeclaredIdentifier(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitEnumDeclaration(EnumDeclaration node) {
-    ClassElement element = node.element;
-    enterScope(element);
-    try {
-      _recordTopLevelElementDefinition(element);
-      super.visitEnumDeclaration(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitExportDirective(ExportDirective node) {
-    ExportElement element = node.element;
-    if (element != null) {
-      LibraryElement expLibrary = element.exportedLibrary;
-      _recordLibraryReference(node, expLibrary);
-    }
-    _recordUriFileReference(node);
-    super.visitExportDirective(node);
-  }
-
-  @override
-  visitFormalParameter(FormalParameter node) {
-    ParameterElement element = node.element;
-    enterScope(element);
-    try {
-      super.visitFormalParameter(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitFunctionDeclaration(FunctionDeclaration node) {
-    Element element = node.element;
-    _recordTopLevelElementDefinition(element);
-    enterScope(element);
-    try {
-      super.visitFunctionDeclaration(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitFunctionTypeAlias(FunctionTypeAlias node) {
-    Element element = node.element;
-    _recordTopLevelElementDefinition(element);
-    super.visitFunctionTypeAlias(node);
-  }
-
-  @override
-  visitImportDirective(ImportDirective node) {
-    ImportElement element = node.element;
-    if (element != null) {
-      LibraryElement impLibrary = element.importedLibrary;
-      _recordLibraryReference(node, impLibrary);
-    }
-    _recordUriFileReference(node);
-    super.visitImportDirective(node);
-  }
-
-  @override
-  visitIndexExpression(IndexExpression node) {
-    MethodElement element = node.bestElement;
-    if (element is MethodElement) {
-      Token operator = node.leftBracket;
-      LocationImpl location =
-          _createLocationForToken(operator, element != null);
-      recordRelationshipElement(
-          element, IndexConstants.IS_INVOKED_BY, location);
-    }
-    super.visitIndexExpression(node);
-  }
-
-  @override
-  visitMethodDeclaration(MethodDeclaration node) {
-    ExecutableElement element = node.element;
-    enterScope(element);
-    try {
-      super.visitMethodDeclaration(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitMethodInvocation(MethodInvocation node) {
-    SimpleIdentifier name = node.methodName;
-    LocationImpl location = _createLocationForNode(name);
-    // name invocation
-    recordRelationshipIndexable(
-        new IndexableName(name.name), IndexConstants.IS_INVOKED_BY, location);
-    // element invocation
-    Element element = name.bestElement;
-    if (element is MethodElement ||
-        element is PropertyAccessorElement ||
-        element is FunctionElement ||
-        element is VariableElement) {
-      recordRelationshipElement(
-          element, IndexConstants.IS_INVOKED_BY, location);
-    } else if (element is ClassElement) {
-      recordRelationshipElement(
-          element, IndexConstants.IS_REFERENCED_BY, location);
-    }
-    _recordImportElementReferenceWithoutPrefix(name);
-    super.visitMethodInvocation(node);
-  }
-
-  @override
-  visitPartDirective(PartDirective node) {
-    Element element = node.element;
-    LocationImpl location = _createLocationForNode(node.uri);
-    recordRelationshipElement(
-        element, IndexConstants.IS_REFERENCED_BY, location);
-    _recordUriFileReference(node);
-    super.visitPartDirective(node);
-  }
-
-  @override
-  visitPartOfDirective(PartOfDirective node) {
-    LocationImpl location = _createLocationForNode(node.libraryName);
-    recordRelationshipElement(
-        node.element, IndexConstants.IS_REFERENCED_BY, location);
-  }
-
-  @override
-  visitPostfixExpression(PostfixExpression node) {
-    _recordOperatorReference(node.operator, node.bestElement);
-    super.visitPostfixExpression(node);
-  }
-
-  @override
-  visitPrefixExpression(PrefixExpression node) {
-    _recordOperatorReference(node.operator, node.bestElement);
-    super.visitPrefixExpression(node);
-  }
-
-  @override
-  visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
-    ConstructorElement element = node.staticElement;
-    LocationImpl location;
-    if (node.constructorName != null) {
-      int start = node.period.offset;
-      int end = node.constructorName.end;
-      location = _createLocationForOffset(start, end - start);
-    } else {
-      int start = node.thisKeyword.end;
-      location = _createLocationForOffset(start, 0);
-    }
-    recordRelationshipElement(
-        element, IndexConstants.IS_REFERENCED_BY, location);
-    super.visitRedirectingConstructorInvocation(node);
-  }
-
-  @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
-    IndexableName indexableName = new IndexableName(node.name);
-    LocationImpl location = _createLocationForNode(node);
-    if (location == null) {
-      return;
-    }
-    // name in declaration
-    if (node.inDeclarationContext()) {
-      recordRelationshipIndexable(
-          indexableName, IndexConstants.NAME_IS_DEFINED_BY, location);
-      return;
-    }
-    // prepare information
-    Element element = node.bestElement;
-    // stop if already handled
-    if (_isAlreadyHandledName(node)) {
-      return;
-    }
-    // record name read/write
-    if (element != null && element.enclosingElement is ClassElement ||
-        element == null && location.isQualified) {
-      bool inGetterContext = node.inGetterContext();
-      bool inSetterContext = node.inSetterContext();
-      if (inGetterContext && inSetterContext) {
-        recordRelationshipIndexable(
-            indexableName, IndexConstants.IS_READ_WRITTEN_BY, location);
-      } else if (inGetterContext) {
-        recordRelationshipIndexable(
-            indexableName, IndexConstants.IS_READ_BY, location);
-      } else if (inSetterContext) {
-        recordRelationshipIndexable(
-            indexableName, IndexConstants.IS_WRITTEN_BY, location);
-      }
-    }
-    // this.field parameter
-    if (element is FieldFormalParameterElement) {
-      RelationshipImpl relationship = peekElement().element == element
-          ? IndexConstants.IS_WRITTEN_BY
-          : IndexConstants.IS_REFERENCED_BY;
-      recordRelationshipElement(element.field, relationship, location);
-      return;
-    }
-    // record specific relations
-    if (element is ClassElement ||
-        element is FunctionElement ||
-        element is FunctionTypeAliasElement ||
-        element is LabelElement ||
-        element is MethodElement ||
-        element is PropertyAccessorElement ||
-        element is PropertyInducingElement ||
-        element is TypeParameterElement) {
-      recordRelationshipElement(
-          element, IndexConstants.IS_REFERENCED_BY, location);
-    } else if (element is PrefixElement) {
-      recordRelationshipElement(
-          element, IndexConstants.IS_REFERENCED_BY, location);
-      _recordImportElementReferenceWithPrefix(node);
-    } else if (element is ParameterElement || element is LocalVariableElement) {
-      bool inGetterContext = node.inGetterContext();
-      bool inSetterContext = node.inSetterContext();
-      if (inGetterContext && inSetterContext) {
-        recordRelationshipElement(
-            element, IndexConstants.IS_READ_WRITTEN_BY, location);
-      } else if (inGetterContext) {
-        recordRelationshipElement(element, IndexConstants.IS_READ_BY, location);
-      } else if (inSetterContext) {
-        recordRelationshipElement(
-            element, IndexConstants.IS_WRITTEN_BY, location);
-      } else {
-        recordRelationshipElement(
-            element, IndexConstants.IS_REFERENCED_BY, location);
-      }
-    }
-    _recordImportElementReferenceWithoutPrefix(node);
-    super.visitSimpleIdentifier(node);
-  }
-
-  @override
-  visitSuperConstructorInvocation(SuperConstructorInvocation node) {
-    ConstructorElement element = node.staticElement;
-    LocationImpl location;
-    if (node.constructorName != null) {
-      int start = node.period.offset;
-      int end = node.constructorName.end;
-      location = _createLocationForOffset(start, end - start);
-    } else {
-      int start = node.superKeyword.end;
-      location = _createLocationForOffset(start, 0);
-    }
-    recordRelationshipElement(
-        element, IndexConstants.IS_REFERENCED_BY, location);
-    super.visitSuperConstructorInvocation(node);
-  }
-
-  @override
-  visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
-    VariableDeclarationList variables = node.variables;
-    for (VariableDeclaration variableDeclaration in variables.variables) {
-      Element element = variableDeclaration.element;
-      _recordTopLevelElementDefinition(element);
-    }
-    super.visitTopLevelVariableDeclaration(node);
-  }
-
-  @override
-  visitTypeParameter(TypeParameter node) {
-    TypeParameterElement element = node.element;
-    enterScope(element);
-    try {
-      super.visitTypeParameter(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitVariableDeclaration(VariableDeclaration node) {
-    VariableElement element = node.element;
-    // record declaration
-    {
-      SimpleIdentifier name = node.name;
-      LocationImpl location = _createLocationForNode(name);
-      location = _getLocationWithExpressionType(location, node.initializer);
-      recordRelationshipElement(
-          element, IndexConstants.NAME_IS_DEFINED_BY, location);
-    }
-    // visit
-    enterScope(element);
-    try {
-      super.visitVariableDeclaration(node);
-    } finally {
-      _exitScope();
-    }
-  }
-
-  @override
-  visitVariableDeclarationList(VariableDeclarationList node) {
-    NodeList<VariableDeclaration> variables = node.variables;
-    if (variables != null) {
-      // use first VariableDeclaration as Element for Location(s) in type
-      {
-        TypeName type = node.type;
-        if (type != null) {
-          for (VariableDeclaration variableDeclaration in variables) {
-            enterScope(variableDeclaration.element);
-            try {
-              type.accept(this);
-            } finally {
-              _exitScope();
-            }
-            // only one iteration
-            break;
-          }
-        }
-      }
-      // visit variables
-      variables.accept(this);
-    }
-  }
-
-  /**
-   * @return the [LocationImpl] representing location of the [AstNode].
-   */
-  LocationImpl _createLocationForNode(AstNode node) {
-    bool isQualified = _isQualifiedClassMemberAccess(node);
-    bool isResolved = true;
-    if (node is SimpleIdentifier) {
-      isResolved = node.bestElement != null;
-    }
-    IndexableObject indexable = peekElement();
-    return new LocationImpl(indexable, node.offset, node.length,
-        isQualified: isQualified, isResolved: isResolved);
-  }
-
-  /**
-   * [offset] - the offset of the location within [Source].
-   * [length] - the length of the location.
-   *
-   * Returns the [LocationImpl] representing the given offset and length within the
-   * inner-most [Element].
-   */
-  LocationImpl _createLocationForOffset(int offset, int length) {
-    IndexableObject element = peekElement();
-    return new LocationImpl(element, offset, length);
-  }
-
-  /**
-   * @return the [LocationImpl] representing location of the [Token].
-   */
-  LocationImpl _createLocationForToken(Token token, bool isResolved) {
-    IndexableObject element = peekElement();
-    return new LocationImpl(element, token.offset, token.length,
-        isQualified: true, isResolved: isResolved);
-  }
-
-  /**
-   * Exit the current scope.
-   */
-  void _exitScope() {
-    _elementStack.removeFirst();
-  }
-
-  /**
-   * @return `true` if given node already indexed as more interesting reference, so it should
-   *         not be indexed again.
-   */
-  bool _isAlreadyHandledName(SimpleIdentifier node) {
-    AstNode parent = node.parent;
-    if (parent is MethodInvocation) {
-      return parent.methodName == node;
-    }
-    return false;
-  }
-
-  bool _isQualifiedClassMemberAccess(AstNode node) {
-    if (node is SimpleIdentifier) {
-      AstNode parent = node.parent;
-      if (parent is PrefixedIdentifier && parent.identifier == node) {
-        return parent.prefix.staticElement is! PrefixElement;
-      }
-      if (parent is PropertyAccess && parent.propertyName == node) {
-        return parent.realTarget != null;
-      }
-      if (parent is MethodInvocation && parent.methodName == node) {
-        Expression target = parent.realTarget;
-        if (target is SimpleIdentifier &&
-            target.staticElement is PrefixElement) {
-          return false;
-        }
-        return target != null;
-      }
-    }
-    return false;
-  }
-
-  void _recordHasAncestor(ClassElement element) {
-    int offset = element.nameOffset;
-    int length = element.nameLength;
-    LocationImpl location = _createLocationForOffset(offset, length);
-    _recordHasAncestor0(location, element, false, <ClassElement>[]);
-  }
-
-  void _recordHasAncestor0(LocationImpl location, ClassElement element,
-      bool includeThis, List<ClassElement> visitedElements) {
-    if (element == null) {
-      return;
-    }
-    if (visitedElements.contains(element)) {
-      return;
-    }
-    visitedElements.add(element);
-    if (includeThis) {
-      recordRelationshipElement(element, IndexConstants.HAS_ANCESTOR, location);
-    }
-    {
-      InterfaceType superType = element.supertype;
-      if (superType != null) {
-        _recordHasAncestor0(location, superType.element, true, visitedElements);
-      }
-    }
-    for (InterfaceType mixinType in element.mixins) {
-      _recordHasAncestor0(location, mixinType.element, true, visitedElements);
-    }
-    for (InterfaceType implementedType in element.interfaces) {
-      _recordHasAncestor0(
-          location, implementedType.element, true, visitedElements);
-    }
-  }
-
-  /**
-   * Records [ImportElement] reference if given [SimpleIdentifier] references some
-   * top-level element and not qualified with import prefix.
-   */
-  void _recordImportElementReferenceWithoutPrefix(SimpleIdentifier node) {
-    if (_isIdentifierInImportCombinator(node)) {
-      return;
-    }
-    if (_isIdentifierInPrefixedIdentifier(node)) {
-      return;
-    }
-    Element element = node.staticElement;
-    ImportElement importElement = internal_getImportElement(
-        _libraryElement, null, element, _importElementsMap);
-    if (importElement != null) {
-      LocationImpl location = _createLocationForOffset(node.offset, 0);
-      recordRelationshipElement(
-          importElement, IndexConstants.IS_REFERENCED_BY, location);
-    }
-  }
-
-  /**
-   * Records [ImportElement] that declares given prefix and imports library with element used
-   * with given prefix node.
-   */
-  void _recordImportElementReferenceWithPrefix(SimpleIdentifier prefixNode) {
-    ImportElementInfo info = internal_getImportElementInfo(prefixNode);
-    if (info != null) {
-      int offset = prefixNode.offset;
-      int length = info.periodEnd - offset;
-      LocationImpl location = _createLocationForOffset(offset, length);
-      recordRelationshipElement(
-          info.element, IndexConstants.IS_REFERENCED_BY, location);
-    }
-  }
-
-  /**
-   * Records reference to defining [CompilationUnitElement] of the given
-   * [LibraryElement].
-   */
-  void _recordLibraryReference(UriBasedDirective node, LibraryElement library) {
-    if (library != null) {
-      LocationImpl location = _createLocationForNode(node.uri);
-      recordRelationshipElement(library.definingCompilationUnit,
-          IndexConstants.IS_REFERENCED_BY, location);
-    }
-  }
-
-  /**
-   * Record reference to the given operator [Element] and name.
-   */
-  void _recordOperatorReference(Token operator, Element element) {
-    // prepare location
-    LocationImpl location = _createLocationForToken(operator, element != null);
-    // record name reference
-    {
-      String name = operator.lexeme;
-      if (name == "++") {
-        name = "+";
-      }
-      if (name == "--") {
-        name = "-";
-      }
-      if (StringUtilities.endsWithChar(name, 0x3D) && name != "==") {
-        name = name.substring(0, name.length - 1);
-      }
-      IndexableName indexableName = new IndexableName(name);
-      recordRelationshipIndexable(
-          indexableName, IndexConstants.IS_INVOKED_BY, location);
-    }
-    // record element reference
-    if (element != null) {
-      recordRelationshipElement(
-          element, IndexConstants.IS_INVOKED_BY, location);
-    }
-  }
-
-  /**
-   * Records a relation between [superNode] and its [Element].
-   */
-  void _recordSuperType(TypeName superNode, RelationshipImpl relationship) {
-    if (superNode != null) {
-      Identifier superName = superNode.name;
-      if (superName != null) {
-        Element superElement = superName.staticElement;
-        recordRelationshipElement(
-            superElement, relationship, _createLocationForNode(superNode));
-      }
-    }
-  }
-
-  /**
-   * Records the [Element] definition in the library and universe.
-   */
-  void _recordTopLevelElementDefinition(Element element) {
-    if (element != null) {
-      IndexableElement indexable = new IndexableElement(element);
-      int offset = element.nameOffset;
-      int length = element.nameLength;
-      LocationImpl location = new LocationImpl(indexable, offset, length);
-      recordRelationshipElement(
-          _libraryElement, IndexConstants.DEFINES, location);
-      _store.recordTopLevelDeclaration(element);
-    }
-  }
-
-  void _recordUriFileReference(UriBasedDirective directive) {
-    Source source = directive.source;
-    if (source != null) {
-      LocationImpl location = new LocationImpl(
-          new IndexableFile(_unitElement.source.fullName),
-          directive.uri.offset,
-          directive.uri.length);
-      _store.recordRelationship(new IndexableFile(source.fullName),
-          IndexConstants.IS_REFERENCED_BY, location);
-    }
-  }
-
-  /**
-   * If the given expression has resolved type, returns the new location with this type.
-   *
-   * [location] - the base location
-   * [expression] - the expression assigned at the given location
-   */
-  static LocationImpl _getLocationWithExpressionType(
-      LocationImpl location, Expression expression) {
-    if (expression != null) {
-      return new LocationWithData<DartType>(location, expression.bestType);
-    }
-    return location;
-  }
-
-  /**
-   * @return `true` if given "node" is part of an import [Combinator].
-   */
-  static bool _isIdentifierInImportCombinator(SimpleIdentifier node) {
-    AstNode parent = node.parent;
-    return parent is Combinator;
-  }
-
-  /**
-   * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node".
-   */
-  static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) {
-    AstNode parent = node.parent;
-    return parent is PrefixedIdentifier && parent.identifier == node;
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/index/index_store.dart b/pkg/analysis_server/lib/src/services/index/index_store.dart
deleted file mode 100644
index f5bebe1..0000000
--- a/pkg/analysis_server/lib/src/services/index/index_store.dart
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.index_store;
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
-
-/**
- * A container with information computed by an index - relations between
- * elements.
- */
-abstract class InternalIndexStore extends IndexStore {
-  /**
-   * Answers index statistics.
-   */
-  String get statistics;
-
-  /**
-   * Notifies the index store that we are going to index the given [object].
-   *
-   * [context] - the [AnalysisContext] in which the [object] being indexed.
-   * [object] - the object being indexed.
-   *
-   * Returns `true` if the given [object] may be indexed, or `false` if
-   * belongs to a disposed [AnalysisContext], is not resolved completely, etc.
-   */
-  bool aboutToIndex(AnalysisContext context, Object object);
-
-  /**
-   * Notifies the index store that there was an error during the current
-   * indexing, and all the information recorded after the last
-   * [aboutToIndex] invocation must be discarded.
-   */
-  void cancelIndex();
-
-  /**
-   * Notifies the index store that the current object indexing is done.
-   *
-   * If this method is not invoked after corresponding [aboutToIndex]
-   * invocation, all recorded information may be lost.
-   */
-  void doneIndex();
-
-  /**
-   * Returns top-level [Element]s whose names satisfy to [nameFilter].
-   */
-  List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter);
-
-  /**
-   * Records the declaration of the given top-level [element].
-   */
-  void recordTopLevelDeclaration(Element element);
-}
diff --git a/pkg/analysis_server/lib/src/services/index/indexable_element.dart b/pkg/analysis_server/lib/src/services/index/indexable_element.dart
deleted file mode 100644
index 916a099..0000000
--- a/pkg/analysis_server/lib/src/services/index/indexable_element.dart
+++ /dev/null
@@ -1,174 +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 src.services.index;
-
-import 'dart:collection';
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
-
-/**
- * A wrapper around an [Element] that implements the [IndexableObject] interface.
- */
-class IndexableElement implements IndexableObject {
-  /**
-   * The element being wrapped.
-   */
-  final Element element;
-
-  /**
-   * Initialize a newly created wrapper to wrap the given [element].
-   */
-  IndexableElement(this.element) {
-    if (element == null) {
-      throw new ArgumentError.notNull('element');
-    }
-  }
-
-  @override
-  String get filePath {
-    return element.source?.fullName;
-  }
-
-  @override
-  int get hashCode => element.hashCode;
-
-  @override
-  IndexableElementKind get kind => IndexableElementKind.forElement(element);
-
-  @override
-  int get offset {
-    if (element is ConstructorElement) {
-      return element.enclosingElement.nameOffset;
-    }
-    return element.nameOffset;
-  }
-
-  @override
-  bool operator ==(Object object) =>
-      object is IndexableElement && element == object.element;
-
-  @override
-  String toString() => element.toString();
-}
-
-/**
- * The kind associated with an [IndexableElement].
- */
-class IndexableElementKind implements IndexableObjectKind<IndexableElement> {
-  /**
-   * A table mapping element kinds to the corresponding indexable element kind.
-   */
-  static final Map<ElementKind, IndexableElementKind> _kindMap =
-      new HashMap<ElementKind, IndexableElementKind>();
-
-  /**
-   * A table mapping the index of a constructor (in the lexically-ordered list
-   * of constructors associated with a class) to the indexable element kind used
-   * to represent it.
-   */
-  static final Map<int, IndexableElementKind> _constructorKinds =
-      new HashMap<int, IndexableElementKind>();
-
-  @override
-  final int index = IndexableObjectKind.nextIndex;
-
-  /**
-   * The element kind represented by this index element kind.
-   */
-  final ElementKind elementKind;
-
-  /**
-   * Initialize a newly created kind to have the given [index] and be associated
-   * with the given [elementKind].
-   */
-  IndexableElementKind._(this.elementKind) {
-    IndexableObjectKind.register(this);
-  }
-
-  /**
-   * Return the index of the constructor with this indexable element kind.
-   */
-  int get constructorIndex {
-    for (int index in _constructorKinds.keys) {
-      if (_constructorKinds[index] == this) {
-        return index;
-      }
-    }
-    return -1;
-  }
-
-  @override
-  IndexableElement decode(
-      AnalysisContext context, String filePath, int offset) {
-    List<Source> unitSources = context.getSourcesWithFullName(filePath);
-    for (Source unitSource in unitSources) {
-      List<Source> libSources = context.getLibrariesContaining(unitSource);
-      for (Source libSource in libSources) {
-        CompilationUnitElement unitElement =
-            context.getCompilationUnitElement(unitSource, libSource);
-        if (unitElement == null) {
-          return null;
-        }
-        if (elementKind == ElementKind.LIBRARY) {
-          return new IndexableElement(unitElement.library);
-        } else if (elementKind == ElementKind.COMPILATION_UNIT) {
-          return new IndexableElement(unitElement);
-        } else {
-          Element element = unitElement.getElementAt(offset);
-          if (element == null) {
-            return null;
-          }
-          if (element is ClassElement &&
-              elementKind == ElementKind.CONSTRUCTOR) {
-            return new IndexableElement(element.constructors[constructorIndex]);
-          }
-          if (element is PropertyInducingElement) {
-            if (elementKind == ElementKind.GETTER) {
-              return new IndexableElement(element.getter);
-            }
-            if (elementKind == ElementKind.SETTER) {
-              return new IndexableElement(element.setter);
-            }
-          }
-          return new IndexableElement(element);
-        }
-      }
-    }
-    return null;
-  }
-
-  @override
-  int encodeHash(StringToInt stringToInt, IndexableElement indexable) {
-    Element element = indexable.element;
-    String elementName = element.displayName;
-    int elementNameId = stringToInt(elementName);
-    LibraryElement libraryElement = element.library;
-    if (libraryElement != null) {
-      String libraryPath = libraryElement.source.fullName;
-      int libraryPathId = stringToInt(libraryPath);
-      return JenkinsSmiHash.combine(libraryPathId, elementNameId);
-    }
-    return elementNameId;
-  }
-
-  /**
-   * Return the indexable element kind representing the given [element].
-   */
-  static IndexableElementKind forElement(Element element) {
-    if (element is ConstructorElement) {
-      ClassElement classElement = element.enclosingElement;
-      int constructorIndex = classElement.constructors.indexOf(element);
-      return _constructorKinds.putIfAbsent(constructorIndex,
-          () => new IndexableElementKind._(ElementKind.CONSTRUCTOR));
-    }
-    ElementKind elementKind = element.kind;
-    return _kindMap.putIfAbsent(
-        elementKind, () => new IndexableElementKind._(elementKind));
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/index/indexable_file.dart b/pkg/analysis_server/lib/src/services/index/indexable_file.dart
deleted file mode 100644
index 4e1c873..0000000
--- a/pkg/analysis_server/lib/src/services/index/indexable_file.dart
+++ /dev/null
@@ -1,74 +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 services.index.indexable_file;
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analyzer/src/generated/engine.dart';
-
-/**
- * An [IndexableObject] which is used to index references to a file.
- */
-class IndexableFile implements IndexableObject {
-  /**
-   * The path of the file to be indexed.
-   */
-  @override
-  final String path;
-
-  /**
-   * Initialize a newly created indexable file to represent the given [path].
-   */
-  IndexableFile(this.path);
-
-  @override
-  String get filePath => path;
-
-  @override
-  IndexableObjectKind get kind => IndexableFileKind.INSTANCE;
-
-  @override
-  int get offset => -1;
-
-  @override
-  bool operator ==(Object object) =>
-      object is IndexableFile && object.path == path;
-
-  @override
-  String toString() => path;
-}
-
-/**
- * The kind of an indexable file.
- */
-class IndexableFileKind implements IndexableObjectKind<IndexableFile> {
-  /**
-   * The unique instance of this class.
-   */
-  static final IndexableFileKind INSTANCE =
-      new IndexableFileKind._(IndexableObjectKind.nextIndex);
-
-  /**
-   * The index uniquely identifying this kind.
-   */
-  final int index;
-
-  /**
-   * Initialize a newly created kind to have the given [index].
-   */
-  IndexableFileKind._(this.index) {
-    IndexableObjectKind.register(this);
-  }
-
-  @override
-  IndexableFile decode(AnalysisContext context, String filePath, int offset) {
-    return new IndexableFile(filePath);
-  }
-
-  @override
-  int encodeHash(StringToInt stringToInt, IndexableFile indexable) {
-    String path = indexable.path;
-    return stringToInt(path);
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/index/local_file_index.dart b/pkg/analysis_server/lib/src/services/index/local_file_index.dart
deleted file mode 100644
index 022fa1b..0000000
--- a/pkg/analysis_server/lib/src/services/index/local_file_index.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.index.local_file_index;
-
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_index.dart';
-import 'package:analysis_server/src/services/index/store/codec.dart';
-import 'package:analysis_server/src/services/index/store/split_store.dart';
-import 'package:analysis_server/src/services/index/store/temporary_folder_file_manager.dart';
-import 'package:analyzer/src/generated/engine.dart';
-
-Index createLocalFileIndex() {
-  var fileManager = new TemporaryFolderFileManager();
-  var stringCodec = new StringCodec();
-  var nodeManager = new FileNodeManager(
-      fileManager,
-      AnalysisEngine.instance.logger,
-      stringCodec,
-      new ContextCodec(),
-      new ElementCodec(stringCodec),
-      new RelationshipCodec(stringCodec));
-  return new LocalIndex(nodeManager);
-}
diff --git a/pkg/analysis_server/lib/src/services/index/local_index.dart b/pkg/analysis_server/lib/src/services/index/local_index.dart
deleted file mode 100644
index 34c0e76..0000000
--- a/pkg/analysis_server/lib/src/services/index/local_index.dart
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.src.index.local_index;
-
-import 'dart:async';
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/store/split_store.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-
-/**
- * A local implementation of [Index].
- */
-class LocalIndex extends Index {
-  /**
-   * The index contributors used by this index.
-   */
-  List<IndexContributor> contributors = <IndexContributor>[];
-
-  SplitIndexStore _store;
-
-  LocalIndex(NodeManager nodeManager) {
-    // TODO(scheglov) get IndexObjectManager(s) as a parameter
-    _store = new SplitIndexStore(
-        nodeManager, <IndexObjectManager>[new DartUnitIndexObjectManager()]);
-  }
-
-  @override
-  String get statistics => _store.statistics;
-
-  @override
-  void clear() {
-    _store.clear();
-  }
-
-  /**
-   * Returns all relations with [Element]s with the given [name].
-   */
-  Future<Map<List<String>, List<InspectLocation>>> findElementsByName(
-      String name) {
-    return _store.inspect_getElementRelations(name);
-  }
-
-  /**
-   * Returns a `Future<List<Location>>` that completes with the list of
-   * [LocationImpl]s of the given [relationship] with the given [indexable].
-   *
-   * For example, if the [indexable] represents a function element and the
-   * [relationship] is the `is-invoked-by` relationship, then the locations
-   * will be all of the places where the function is invoked.
-   */
-  @override
-  Future<List<LocationImpl>> getRelationships(
-      IndexableObject indexable, RelationshipImpl relationship) {
-    return _store.getRelationships(indexable, relationship);
-  }
-
-  @override
-  List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter) {
-    return _store.getTopLevelDeclarations(nameFilter);
-  }
-
-  @override
-  void index(AnalysisContext context, Object object) {
-    // about to index
-    bool mayIndex = _store.aboutToIndex(context, object);
-    if (!mayIndex) {
-      return;
-    }
-    // do index
-    try {
-      for (IndexContributor contributor in contributors) {
-        contributor.contributeTo(_store, context, object);
-      }
-      _store.doneIndex();
-    } catch (e) {
-      _store.cancelIndex();
-      rethrow;
-    }
-  }
-
-  @override
-  void recordRelationship(
-      IndexableObject indexable, Relationship relationship, Location location) {
-    _store.recordRelationship(indexable, relationship, location);
-  }
-
-  @override
-  void removeContext(AnalysisContext context) {
-    _store.removeContext(context);
-  }
-
-  @override
-  void removeSource(AnalysisContext context, Source source) {
-    _store.removeSource(context, source);
-  }
-
-  @override
-  void removeSources(AnalysisContext context, SourceContainer container) {
-    _store.removeSources(context, container);
-  }
-
-  @override
-  void run() {
-    // NO-OP for the local index
-  }
-
-  @override
-  void stop() {
-    // NO-OP for the local index
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/index/local_memory_index.dart b/pkg/analysis_server/lib/src/services/index/local_memory_index.dart
deleted file mode 100644
index ec69627..0000000
--- a/pkg/analysis_server/lib/src/services/index/local_memory_index.dart
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.index.memory_file_index;
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/index_contributor.dart';
-import 'package:analysis_server/src/services/index/local_index.dart';
-import 'package:analysis_server/src/services/index/store/memory_node_manager.dart';
-
-Index createLocalMemoryIndex() {
-  MemoryNodeManager nodeManager = new MemoryNodeManager();
-  LocalIndex index = new LocalIndex(nodeManager);
-  index.contributors = <IndexContributor>[new DartIndexContributor()];
-  return index;
-}
diff --git a/pkg/analysis_server/lib/src/services/index/store/codec.dart b/pkg/analysis_server/lib/src/services/index/store/codec.dart
deleted file mode 100644
index 9771f56..0000000
--- a/pkg/analysis_server/lib/src/services/index/store/codec.dart
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.src.index.store.codec;
-
-import 'dart:collection';
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analyzer/src/generated/engine.dart';
-
-/**
- * A helper that encodes/decodes [AnalysisContext]s from/to integers.
- */
-class ContextCodec {
-  /**
-   * A table mapping contexts to their unique indices.
-   */
-  Map<AnalysisContext, int> _contextToIndex =
-      new HashMap<AnalysisContext, int>();
-
-  /**
-   * A table mapping indices to the corresponding contexts.
-   */
-  Map<int, AnalysisContext> _indexToContext =
-      new HashMap<int, AnalysisContext>();
-
-  /**
-   * The next id to assign.
-   */
-  int _nextId = 0;
-
-  /**
-   * Returns the [AnalysisContext] that corresponds to the given index.
-   */
-  AnalysisContext decode(int index) => _indexToContext[index];
-
-  /**
-   * Returns an unique index for the given [AnalysisContext].
-   */
-  int encode(AnalysisContext context) {
-    int index = _contextToIndex[context];
-    if (index == null) {
-      index = _nextId++;
-      _contextToIndex[context] = index;
-      _indexToContext[index] = context;
-    }
-    return index;
-  }
-
-  /**
-   * Removes the given [context].
-   */
-  void remove(AnalysisContext context) {
-    int id = _contextToIndex.remove(context);
-    if (id != null) {
-      _indexToContext.remove(id);
-    }
-  }
-}
-
-/**
- * A helper that encodes/decodes [IndexableObject]s to/from integers.
- */
-class ElementCodec {
-  // TODO(brianwilkerson) Rename this class now that if encodes indexable
-  // objects rather than elements.
-  final StringCodec _stringCodec;
-
-  ElementCodec(this._stringCodec);
-
-  /**
-   * Returns an [IndexableObject] that corresponds to the given identifiers.
-   */
-  IndexableObject decode(
-      AnalysisContext context, int fileId, int offset, int kindId) {
-    IndexableObjectKind kind = IndexableObjectKind.getKind(kindId);
-    if (kind == null) {
-      return null;
-    } else if (kind is IndexableNameKind) {
-      String name = _stringCodec.decode(offset);
-      return new IndexableName(name);
-    }
-    String filePath = _stringCodec.decode(fileId);
-    return kind.decode(context, filePath, offset);
-  }
-
-  /**
-   * Returns the first component of the [indexable] id.
-   * In the most cases it is an encoding of the [indexable]'s file path.
-   * If the given [indexable] is not defined in a file, returns `-1`.
-   */
-  int encode1(IndexableObject indexable) {
-    String filePath = indexable.filePath;
-    if (filePath == null) {
-      return -1;
-    }
-    return _stringCodec.encode(filePath);
-  }
-
-  /**
-   * Returns the second component of the [indexable] id.
-   * In the most cases it is the [indexable]'s name offset.
-   */
-  int encode2(IndexableObject indexable) {
-    if (indexable is IndexableName) {
-      String name = indexable.name;
-      return _stringCodec.encode(name);
-    }
-    return indexable.offset;
-  }
-
-  /**
-   * Returns the third component of the [indexable] id.
-   * In the most cases it is the [indexable]'s kind.
-   */
-  int encode3(IndexableObject indexable) {
-    return indexable.kind.index;
-  }
-
-  /**
-   * Returns an integer that corresponds to the name of [indexable].
-   */
-  int encodeHash(IndexableObject indexable) {
-    return indexable.kind.encodeHash(_stringCodec.encode, indexable);
-  }
-}
-
-/**
- * A helper that encodes/decodes [Relationship]s to/from integers.
- */
-class RelationshipCodec {
-  final StringCodec _stringCodec;
-
-  RelationshipCodec(this._stringCodec);
-
-  RelationshipImpl decode(int idIndex) {
-    String id = _stringCodec.decode(idIndex);
-    return RelationshipImpl.getRelationship(id);
-  }
-
-  int encode(RelationshipImpl relationship) {
-    String id = relationship.identifier;
-    return _stringCodec.encode(id);
-  }
-}
-
-/**
- * A helper that encodes/decodes [String]s from/to integers.
- */
-class StringCodec {
-  /**
-   * A table mapping names to their unique indices.
-   */
-  final Map<String, int> nameToIndex = new HashMap<String, int>();
-
-  /**
-   * A table mapping indices to the corresponding strings.
-   */
-  final List<String> _indexToName = <String>[];
-
-  /**
-   * Returns the [String] that corresponds to the given index.
-   */
-  String decode(int index) => _indexToName[index];
-
-  /**
-   * Returns an unique index for the given [String].
-   */
-  int encode(String name) {
-    int index = nameToIndex[name];
-    if (index == null) {
-      index = _indexToName.length;
-      nameToIndex[name] = index;
-      _indexToName.add(name);
-    }
-    return index;
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/index/store/collection.dart b/pkg/analysis_server/lib/src/services/index/store/collection.dart
deleted file mode 100644
index de2d390..0000000
--- a/pkg/analysis_server/lib/src/services/index/store/collection.dart
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.src.index.store.collection;
-
-import 'dart:collection';
-import 'dart:typed_data' show Uint32List;
-
-import 'package:analyzer/src/generated/utilities_general.dart';
-
-/**
- * A hash map with `List<int>` keys and [int] values.
- */
-class IntArrayToIntMap {
-  final Map<Uint32List, int> map = new HashMap<Uint32List, int>(
-      equals: _intArrayEquals, hashCode: _intArrayHashCode);
-
-  /**
-   * Returns the value for the given [key] or null if [key] is not in the map.
-   */
-  int operator [](List<int> key) {
-    Uint32List typedKey = _getTypedKey(key);
-    return map[typedKey];
-  }
-
-  /**
-   * Associates the [key] with the given [value].
-   *
-   * If the key was already in the map, its associated value is changed.
-   * Otherwise the key-value pair is added to the map.
-   */
-  void operator []=(List<int> key, int value) {
-    Uint32List typedKey = _getTypedKey(key);
-    map[typedKey] = value;
-  }
-
-  /**
-   * Returns an [Uint32List] version of the given `List<int>` key.
-   */
-  static Uint32List _getTypedKey(List<int> key) {
-    if (key is Uint32List) {
-      return key;
-    }
-    return new Uint32List.fromList(key);
-  }
-
-  static bool _intArrayEquals(List<int> a, List<int> b) {
-    int length = a.length;
-    if (length != b.length) {
-      return false;
-    }
-    for (int i = 0; i < length; i++) {
-      if (a[i] != b[i]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  static int _intArrayHashCode(List<int> key) {
-    return key.fold(0, JenkinsSmiHash.combine);
-  }
-}
-
-/**
- * A table mapping [int] keys to sets of [int]s.
- */
-class IntToIntSetMap {
-  final Map<int, Uint32List> _map = new HashMap<int, Uint32List>();
-
-  /**
-   * The number of key-value pairs in the map.
-   */
-  int get length => _map.length;
-
-  /**
-   * Adds the [value] to the set associated with the given [value].
-   */
-  void add(int key, int value) {
-    Uint32List values = _map[key];
-    if (values == null) {
-      values = new Uint32List(1);
-      values[0] = value;
-      _map[key] = values;
-    }
-    if (values.indexOf(value) == -1) {
-      int length = values.length;
-      Uint32List newSet = new Uint32List(length + 1);
-      newSet.setRange(0, length, values);
-      newSet[length] = value;
-      _map[key] = newSet;
-    }
-  }
-
-  /**
-   * Removes all pairs from the map.
-   */
-  void clear() {
-    _map.clear();
-  }
-
-  /**
-   * Returns the set of [int]s for the given [key] or an empty list if [key] is
-   * not in the map.
-   */
-  List<int> get(int key) {
-    List<int> values = _map[key];
-    if (values == null) {
-      values = <int>[];
-    }
-    return values;
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/index/store/memory_node_manager.dart b/pkg/analysis_server/lib/src/services/index/store/memory_node_manager.dart
deleted file mode 100644
index 500626b..0000000
--- a/pkg/analysis_server/lib/src/services/index/store/memory_node_manager.dart
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.src.index.store.store_memory_node_manager;
-
-import 'dart:async';
-import 'dart:collection';
-
-import 'package:analysis_server/src/services/index/store/codec.dart';
-import 'package:analysis_server/src/services/index/store/split_store.dart';
-import 'package:analyzer/src/generated/engine.dart';
-
-class MemoryNodeManager implements NodeManager {
-  @override
-  StringCodec stringCodec = new StringCodec();
-
-  @override
-  ContextCodec contextCodec = new ContextCodec();
-
-  @override
-  ElementCodec elementCodec;
-
-  RelationshipCodec _relationshipCodec;
-
-  int _locationCount = 0;
-  final Map<String, int> _nodeLocationCounts = new HashMap<String, int>();
-  final Map<String, IndexNode> _nodes = new HashMap<String, IndexNode>();
-
-  MemoryNodeManager() {
-    elementCodec = new ElementCodec(stringCodec);
-    _relationshipCodec = new RelationshipCodec(stringCodec);
-  }
-
-  @override
-  int get locationCount {
-    return _locationCount;
-  }
-
-  @override
-  void clear() {
-    _nodes.clear();
-  }
-
-  int getLocationCount(String name) {
-    int locationCount = _nodeLocationCounts[name];
-    return locationCount != null ? locationCount : 0;
-  }
-
-  @override
-  Future<IndexNode> getNode(String name) {
-    return new Future.value(_nodes[name]);
-  }
-
-  bool isEmpty() {
-    for (IndexNode node in _nodes.values) {
-      Map<RelationKeyData, List<LocationData>> relations = node.relations;
-      if (!relations.isEmpty) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  @override
-  IndexNode newNode(AnalysisContext context) {
-    return new IndexNode(context, elementCodec, _relationshipCodec);
-  }
-
-  @override
-  void putNode(String name, IndexNode node) {
-    // update location count
-    {
-      _locationCount -= getLocationCount(name);
-      int nodeLocationCount = node.locationCount;
-      _nodeLocationCounts[name] = nodeLocationCount;
-      _locationCount += nodeLocationCount;
-    }
-    // remember the node
-    _nodes[name] = node;
-  }
-
-  @override
-  void removeNode(String name) {
-    _nodes.remove(name);
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/index/store/split_store.dart b/pkg/analysis_server/lib/src/services/index/store/split_store.dart
deleted file mode 100644
index 86e463b..0000000
--- a/pkg/analysis_server/lib/src/services/index/store/split_store.dart
+++ /dev/null
@@ -1,1168 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.src.index.store.split_store;
-
-import 'dart:async';
-import 'dart:collection';
-import 'dart:typed_data';
-
-import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/index_store.dart';
-import 'package:analysis_server/src/services/index/indexable_element.dart';
-import 'package:analysis_server/src/services/index/store/codec.dart';
-import 'package:analysis_server/src/services/index/store/collection.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart' show CompilationUnit;
-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/generated/utilities_general.dart';
-
-/**
- * The implementation of [IndexObjectManager] for indexing
- * [CompilationUnitElement]s.
- */
-class DartUnitIndexObjectManager extends IndexObjectManager {
-  /**
-   * The mapping of library [Source] to the [Source]s of part units.
-   */
-  Map<AnalysisContext, Map<Source, Set<Source>>> _contextToLibraryToUnits =
-      new HashMap<AnalysisContext, Map<Source, Set<Source>>>();
-
-  /**
-   * The mapping of unit [Source] to the [Source]s of libraries it is used in.
-   */
-  Map<AnalysisContext, Map<Source, Set<Source>>> _contextToUnitToLibraries =
-      new HashMap<AnalysisContext, Map<Source, Set<Source>>>();
-
-  @override
-  String aboutToIndex(AnalysisContext context, Object object) {
-    CompilationUnitElement unitElement;
-    if (object is CompilationUnit) {
-      unitElement = object.element;
-    } else if (object is CompilationUnitElement) {
-      unitElement = object;
-    }
-    // validate unit
-    if (unitElement == null) {
-      return null;
-    }
-    LibraryElement libraryElement = unitElement.library;
-    if (libraryElement == null) {
-      return null;
-    }
-    CompilationUnitElement definingUnitElement =
-        libraryElement.definingCompilationUnit;
-    if (definingUnitElement == null) {
-      return null;
-    }
-    // prepare sources
-    Source library = definingUnitElement.source;
-    Source unit = unitElement.source;
-    // special handling for the defining library unit
-    if (unit == library) {
-      // prepare new parts
-      HashSet<Source> newParts = new HashSet<Source>();
-      for (CompilationUnitElement part in libraryElement.parts) {
-        newParts.add(part.source);
-      }
-      // prepare old parts
-      Map<Source, Set<Source>> libraryToUnits =
-          _contextToLibraryToUnits[context];
-      if (libraryToUnits == null) {
-        libraryToUnits = new HashMap<Source, Set<Source>>();
-        _contextToLibraryToUnits[context] = libraryToUnits;
-      }
-      Set<Source> oldParts = libraryToUnits[library];
-      // check if some parts are not in the library now
-      if (oldParts != null) {
-        Set<Source> noParts = oldParts.difference(newParts);
-        for (Source noPart in noParts) {
-          String nodeName = _getNodeName(library, noPart);
-          site.removeNodeByName(context, nodeName);
-          site.removeSource(library);
-          site.removeSource(noPart);
-        }
-      }
-      // remember new parts
-      libraryToUnits[library] = newParts;
-    }
-    // remember library/unit relations
-    _recordUnitInLibrary(context, library, unit);
-    _recordLibraryWithUnit(context, library, unit);
-    site.addSource(library);
-    site.addSource(unit);
-    // prepare node
-    String nodeName = _getNodeName(library, unit);
-    return nodeName;
-  }
-
-  @override
-  void removeContext(AnalysisContext context) {
-    _contextToLibraryToUnits.remove(context);
-    _contextToUnitToLibraries.remove(context);
-  }
-
-  @override
-  void removeSource(AnalysisContext context, Source source) {
-    // remove nodes for unit/library pairs
-    Map<Source, Set<Source>> unitToLibraries =
-        _contextToUnitToLibraries[context];
-    if (unitToLibraries != null) {
-      Set<Source> libraries = unitToLibraries.remove(source);
-      if (libraries != null) {
-        for (Source library in libraries) {
-          String nodeName = _getNodeName(library, source);
-          site.removeNodeByName(context, nodeName);
-          site.removeSource(library);
-          site.removeSource(source);
-        }
-      }
-    }
-    // remove nodes for library/unit pairs
-    Map<Source, Set<Source>> libraryToUnits = _contextToLibraryToUnits[context];
-    if (libraryToUnits != null) {
-      Set<Source> units = libraryToUnits.remove(source);
-      if (units != null) {
-        for (Source unit in units) {
-          String nodeName = _getNodeName(source, unit);
-          site.removeNodeByName(context, nodeName);
-          site.removeSource(source);
-          site.removeSource(unit);
-        }
-      }
-    }
-  }
-
-  @override
-  void removeSources(AnalysisContext context, SourceContainer container) {
-    // remove nodes for unit/library pairs
-    Map<Source, Set<Source>> unitToLibraries =
-        _contextToUnitToLibraries[context];
-    if (unitToLibraries != null) {
-      List<Source> units = unitToLibraries.keys.toList();
-      for (Source source in units) {
-        if (container == null || container.contains(source)) {
-          removeSource(context, source);
-        }
-      }
-    }
-    // remove nodes for library/unit pairs
-    Map<Source, Set<Source>> libraryToUnits = _contextToLibraryToUnits[context];
-    if (libraryToUnits != null) {
-      List<Source> libraries = libraryToUnits.keys.toList();
-      for (Source source in libraries) {
-        if (container == null || container.contains(source)) {
-          removeSource(context, source);
-        }
-      }
-    }
-  }
-
-  String _getNodeName(Source library, Source unit) {
-    String libraryName = library != null ? library.fullName : null;
-    String unitName = unit.fullName;
-    int libraryNameIndex = site.encodeString(libraryName);
-    int unitNameIndex = site.encodeString(unitName);
-    return 'DartUnitElement_${libraryNameIndex}_$unitNameIndex.index';
-  }
-
-  void _recordLibraryWithUnit(
-      AnalysisContext context, Source library, Source unit) {
-    Map<Source, Set<Source>> libraryToUnits = _contextToLibraryToUnits[context];
-    if (libraryToUnits == null) {
-      libraryToUnits = new HashMap<Source, Set<Source>>();
-      _contextToLibraryToUnits[context] = libraryToUnits;
-    }
-    Set<Source> units = libraryToUnits[library];
-    if (units == null) {
-      units = new HashSet<Source>();
-      libraryToUnits[library] = units;
-    }
-    units.add(unit);
-  }
-
-  void _recordUnitInLibrary(
-      AnalysisContext context, Source library, Source unit) {
-    Map<Source, Set<Source>> unitToLibraries =
-        _contextToUnitToLibraries[context];
-    if (unitToLibraries == null) {
-      unitToLibraries = new HashMap<Source, Set<Source>>();
-      _contextToUnitToLibraries[context] = unitToLibraries;
-    }
-    Set<Source> libraries = unitToLibraries[unit];
-    if (libraries == null) {
-      libraries = new HashSet<Source>();
-      unitToLibraries[unit] = libraries;
-    }
-    libraries.add(library);
-  }
-}
-
-/**
- * A manager for files content.
- */
-abstract class FileManager {
-  /**
-   * Removes all files.
-   */
-  void clear();
-
-  /**
-   * Deletes the file with the given name.
-   */
-  void delete(String name);
-
-  /**
-   * Returns names of all known nodes.
-   */
-  List<String> inspect_getAllNodeNames();
-
-  /**
-   * Read the entire file contents as a list of bytes.
-   */
-  Future<List<int>> read(String name);
-
-  /**
-   * Write a list of bytes to a file.
-   */
-  Future write(String name, List<int> bytes);
-}
-
-/**
- * A [FileManager] based [NodeManager].
- */
-class FileNodeManager implements NodeManager {
-  static int _VERSION = 1;
-
-  final FileManager _fileManager;
-  final Logger _logger;
-
-  final ContextCodec contextCodec;
-  final ElementCodec elementCodec;
-  final StringCodec stringCodec;
-  final RelationshipCodec _relationshipCodec;
-
-  int _locationCount = 0;
-
-  Map<String, int> _nodeLocationCounts = new HashMap<String, int>();
-
-  FileNodeManager(this._fileManager, this._logger, this.stringCodec,
-      this.contextCodec, this.elementCodec, this._relationshipCodec);
-
-  @override
-  int get locationCount => _locationCount;
-
-  @override
-  void clear() {
-    _fileManager.clear();
-  }
-
-  @override
-  Future<IndexNode> getNode(String name) {
-    return _fileManager.read(name).then((List<int> bytes) {
-      if (bytes == null) {
-        return null;
-      }
-      _DataInputStream stream = new _DataInputStream(bytes);
-      return _readNode(stream);
-    }).catchError((exception, stackTrace) {
-      _logger.logError('Exception during reading index file $name',
-          new CaughtException(exception, stackTrace));
-    });
-  }
-
-  /**
-   * Returns names of all known nodes.
-   */
-  List<String> inspect_getAllNodeNames() {
-    return _fileManager.inspect_getAllNodeNames();
-  }
-
-  @override
-  IndexNode newNode(AnalysisContext context) =>
-      new IndexNode(context, elementCodec, _relationshipCodec);
-
-  @override
-  Future putNode(String name, IndexNode node) {
-    // update location count
-    {
-      _locationCount -= _getLocationCount(name);
-      int nodeLocationCount = node.locationCount;
-      _nodeLocationCounts[name] = nodeLocationCount;
-      _locationCount += nodeLocationCount;
-    }
-    // write the node
-    return new Future.microtask(() {
-      return ServerPerformanceStatistics.splitStore.makeCurrentWhile(() {
-        _DataOutputStream stream = new _DataOutputStream();
-        _writeNode(node, stream);
-        var bytes = stream.getBytes();
-        return _fileManager.write(name, bytes);
-      });
-    }).catchError((exception, stackTrace) {
-      _logger.logError('Exception during reading index file $name',
-          new CaughtException(exception, stackTrace));
-    });
-  }
-
-  @override
-  void removeNode(String name) {
-    // update location count
-    _locationCount -= _getLocationCount(name);
-    _nodeLocationCounts.remove(name);
-    // remove node
-    _fileManager.delete(name);
-  }
-
-  int _getLocationCount(String name) {
-    int locationCount = _nodeLocationCounts[name];
-    return locationCount != null ? locationCount : 0;
-  }
-
-  RelationKeyData _readElementRelationKey(_DataInputStream stream) {
-    int elementId1 = stream.readInt();
-    int elementId2 = stream.readInt();
-    int elementId3 = stream.readInt();
-    int relationshipId = stream.readInt();
-    return new RelationKeyData.forData(
-        elementId1, elementId2, elementId3, relationshipId);
-  }
-
-  LocationData _readLocationData(_DataInputStream stream) {
-    int elementId1 = stream.readInt();
-    int elementId2 = stream.readInt();
-    int elementId3 = stream.readInt();
-    int offset = stream.readInt();
-    int length = stream.readInt();
-    int flags = stream.readInt();
-    return new LocationData.forData(
-        elementId1, elementId2, elementId3, offset, length, flags);
-  }
-
-  IndexNode _readNode(_DataInputStream stream) {
-    // check version
-    {
-      int version = stream.readInt();
-      if (version != _VERSION) {
-        throw new StateError('Version $_VERSION expected, but $version found.');
-      }
-    }
-    // context
-    int contextId = stream.readInt();
-    AnalysisContext context = contextCodec.decode(contextId);
-    if (context == null) {
-      return null;
-    }
-    // relations
-    Map<RelationKeyData, List<LocationData>> relations =
-        new HashMap<RelationKeyData, List<LocationData>>();
-    int numRelations = stream.readInt();
-    for (int i = 0; i < numRelations; i++) {
-      RelationKeyData key = _readElementRelationKey(stream);
-      int numLocations = stream.readInt();
-      List<LocationData> locations = new List<LocationData>();
-      for (int j = 0; j < numLocations; j++) {
-        locations.add(_readLocationData(stream));
-      }
-      relations[key] = locations;
-    }
-    // create IndexNode
-    IndexNode node = new IndexNode(context, elementCodec, _relationshipCodec);
-    node.relations = relations;
-    return node;
-  }
-
-  void _writeElementRelationKey(_DataOutputStream stream, RelationKeyData key) {
-    stream.writeInt(key.elementId1);
-    stream.writeInt(key.elementId2);
-    stream.writeInt(key.elementId3);
-    stream.writeInt(key.relationshipId);
-  }
-
-  void _writeNode(IndexNode node, _DataOutputStream stream) {
-    // version
-    stream.writeInt(_VERSION);
-    // context
-    {
-      AnalysisContext context = node.context;
-      int contextId = contextCodec.encode(context);
-      stream.writeInt(contextId);
-    }
-    // relations
-    Map<RelationKeyData, List<LocationData>> relations = node.relations;
-    stream.writeInt(relations.length);
-    relations.forEach((key, locations) {
-      _writeElementRelationKey(stream, key);
-      stream.writeInt(locations.length);
-      for (LocationData location in locations) {
-        stream.writeInt(location.elementId1);
-        stream.writeInt(location.elementId2);
-        stream.writeInt(location.elementId3);
-        stream.writeInt(location.offset);
-        stream.writeInt(location.length);
-        stream.writeInt(location.flags);
-      }
-    });
-  }
-}
-
-/**
- * A single index file in-memory presentation.
- */
-class IndexNode {
-  final AnalysisContext context;
-
-  final ElementCodec _elementCodec;
-  final RelationshipCodec _relationshipCodec;
-
-  Map<RelationKeyData, List<LocationData>> _relations =
-      new HashMap<RelationKeyData, List<LocationData>>();
-
-  IndexNode(this.context, this._elementCodec, this._relationshipCodec);
-
-  /**
-   * Returns number of locations in this node.
-   */
-  int get locationCount {
-    int locationCount = 0;
-    for (List<LocationData> locations in _relations.values) {
-      locationCount += locations.length;
-    }
-    return locationCount;
-  }
-
-  /**
-   * Returns the recorded relations.
-   */
-  Map<RelationKeyData, List<LocationData>> get relations => _relations;
-
-  /**
-   * Sets relations data.
-   * This method is used during loading data from a storage.
-   */
-  void set relations(Map<RelationKeyData, List<LocationData>> relations) {
-    _relations = relations;
-  }
-
-  /**
-   * Returns the locations of the elements that have the given relationship with
-   * the given element.
-   *
-   * [element] - the the element that has the relationship with the locations to
-   *    be returned.
-   * [relationship] - the [RelationshipImpl] between the given [element] and the
-   *    locations to be returned
-   */
-  List<LocationImpl> getRelationships(
-      IndexableObject indexable, RelationshipImpl relationship) {
-    // prepare key
-    RelationKeyData key = new RelationKeyData.forObject(
-        _elementCodec, _relationshipCodec, indexable, relationship);
-    // find LocationData(s)
-    List<LocationData> locationDatas = _relations[key];
-    if (locationDatas == null) {
-      return LocationImpl.EMPTY_LIST;
-    }
-    // convert to Location(s)
-    List<LocationImpl> locations = <LocationImpl>[];
-    for (LocationData locationData in locationDatas) {
-      LocationImpl location = locationData.getLocation(context, _elementCodec);
-      if (location != null) {
-        locations.add(location);
-      }
-    }
-    return locations;
-  }
-
-  /**
-   * Returns [InspectLocation]s for the element with the given ID.
-   */
-  List<InspectLocation> inspect_getRelations(String name, int elementId) {
-    List<InspectLocation> result = <InspectLocation>[];
-    // TODO(scheglov) restore index inspections?
-//    _relations.forEach((RelationKeyData key, locations) {
-//      if (key.elementId == elementId) {
-//        for (LocationData location in locations) {
-//          Relationship relationship =
-//              _relationshipCodec.decode(key.relationshipId);
-//          List<String> path =
-//              _elementCodec.inspect_decodePath(location.elementId);
-//          result.add(new InspectLocation(name, relationship, path,
-//              location.offset, location.length, location.flags));
-//        }
-//      }
-//    });
-    return result;
-  }
-
-  /**
-   * Records that the given [element] and [location] have the given [relationship].
-   *
-   * [element] - the [Element] that is related to the location.
-   * [relationship] - the [RelationshipImpl] between [element] and [location].
-   * [location] - the [LocationImpl] where relationship happens.
-   */
-  void recordRelationship(IndexableObject indexable,
-      RelationshipImpl relationship, LocationImpl location) {
-    RelationKeyData key = new RelationKeyData.forObject(
-        _elementCodec, _relationshipCodec, indexable, relationship);
-    // prepare LocationData(s)
-    List<LocationData> locationDatas = _relations[key];
-    if (locationDatas == null) {
-      locationDatas = <LocationData>[];
-      _relations[key] = locationDatas;
-    }
-    // add new LocationData
-    locationDatas.add(new LocationData.forObject(_elementCodec, location));
-  }
-}
-
-/**
- * [SplitIndexStore] uses instances of this class to manager index nodes.
- */
-abstract class IndexObjectManager {
-  SplitIndexStoreSite site;
-
-  /**
-   * Notifies the manager that the given [object] is to be indexed.
-   * Returns the name of the index node to put information into.
-   */
-  String aboutToIndex(AnalysisContext context, Object object);
-
-  /**
-   * Notifies the manager that the given [context] is disposed.
-   */
-  void removeContext(AnalysisContext context);
-
-  /**
-   * Notifies the manager that the given [source] is no longer part of
-   * the given [context].
-   */
-  void removeSource(AnalysisContext context, Source source);
-
-  /**
-   * Notifies the manager that the sources described by the given [container]
-   * are no longer part of the given [context].
-   */
-  void removeSources(AnalysisContext context, SourceContainer container);
-}
-
-class InspectLocation {
-  final String nodeName;
-  final RelationshipImpl relationship;
-  final List<String> path;
-  final int offset;
-  final int length;
-  final int flags;
-
-  InspectLocation(this.nodeName, this.relationship, this.path, this.offset,
-      this.length, this.flags);
-}
-
-/**
- * A container with information about a [LocationImpl].
- */
-class LocationData {
-  static const int _FLAG_QUALIFIED = 1 << 0;
-  static const int _FLAG_RESOLVED = 1 << 1;
-
-  final int elementId1;
-  final int elementId2;
-  final int elementId3;
-  final int offset;
-  final int length;
-  final int flags;
-
-  LocationData.forData(this.elementId1, this.elementId2, this.elementId3,
-      this.offset, this.length, this.flags);
-
-  LocationData.forObject(ElementCodec elementCodec, LocationImpl location)
-      : elementId1 = elementCodec.encode1(location.indexable),
-        elementId2 = elementCodec.encode2(location.indexable),
-        elementId3 = elementCodec.encode3(location.indexable),
-        offset = location.offset,
-        length = location.length,
-        flags = (location.isQualified ? _FLAG_QUALIFIED : 0) |
-            (location.isResolved ? _FLAG_RESOLVED : 0);
-
-  @override
-  int get hashCode {
-    int hash = 0;
-    hash = JenkinsSmiHash.combine(hash, elementId1);
-    hash = JenkinsSmiHash.combine(hash, elementId2);
-    hash = JenkinsSmiHash.combine(hash, elementId3);
-    hash = JenkinsSmiHash.combine(hash, offset);
-    hash = JenkinsSmiHash.combine(hash, length);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  bool operator ==(Object obj) {
-    if (obj is! LocationData) {
-      return false;
-    }
-    LocationData other = obj;
-    return other.elementId1 == elementId1 &&
-        other.elementId2 == elementId2 &&
-        other.elementId3 == elementId3 &&
-        other.offset == offset &&
-        other.length == length &&
-        other.flags == flags;
-  }
-
-  /**
-   * Returns a {@link Location} that is represented by this {@link LocationData}.
-   */
-  LocationImpl getLocation(AnalysisContext context, ElementCodec elementCodec) {
-    IndexableObject indexable =
-        elementCodec.decode(context, elementId1, elementId2, elementId3);
-    if (indexable == null) {
-      return null;
-    }
-    bool isQualified = (flags & _FLAG_QUALIFIED) != 0;
-    bool isResovled = (flags & _FLAG_RESOLVED) != 0;
-    return new LocationImpl(indexable, offset, length,
-        isQualified: isQualified, isResolved: isResovled);
-  }
-}
-
-/**
- * A manager for [IndexNode]s.
- */
-abstract class NodeManager {
-  /**
-   * The shared {@link ContextCodec} instance.
-   */
-  ContextCodec get contextCodec;
-
-  /**
-   * The shared {@link ElementCodec} instance.
-   */
-  ElementCodec get elementCodec;
-
-  /**
-   * A number of locations in all nodes.
-   */
-  int get locationCount;
-
-  /**
-   * The shared {@link StringCodec} instance.
-   */
-  StringCodec get stringCodec;
-
-  /**
-   * Removes all nodes.
-   */
-  void clear();
-
-  /**
-   * Returns the {@link IndexNode} with the given name, {@code null} if not found.
-   */
-  Future<IndexNode> getNode(String name);
-
-  /**
-   * Returns a new {@link IndexNode}.
-   */
-  IndexNode newNode(AnalysisContext context);
-
-  /**
-   * Associates the given {@link IndexNode} with the given name.
-   */
-  void putNode(String name, IndexNode node);
-
-  /**
-   * Removes the {@link IndexNode} with the given name.
-   */
-  void removeNode(String name);
-}
-
-/**
- * An [Element] to [LocationImpl] relation key.
- */
-class RelationKeyData {
-  final int elementId1;
-  final int elementId2;
-  final int elementId3;
-  final int relationshipId;
-
-  RelationKeyData.forData(
-      this.elementId1, this.elementId2, this.elementId3, this.relationshipId);
-
-  RelationKeyData.forObject(
-      ElementCodec elementCodec,
-      RelationshipCodec relationshipCodec,
-      IndexableObject indexable,
-      RelationshipImpl relationship)
-      : elementId1 = elementCodec.encode1(indexable),
-        elementId2 = elementCodec.encode2(indexable),
-        elementId3 = elementCodec.encode3(indexable),
-        relationshipId = relationshipCodec.encode(relationship);
-
-  @override
-  int get hashCode {
-    int hash = 0;
-    hash = JenkinsSmiHash.combine(hash, elementId1);
-    hash = JenkinsSmiHash.combine(hash, elementId2);
-    hash = JenkinsSmiHash.combine(hash, elementId3);
-    hash = JenkinsSmiHash.combine(hash, relationshipId);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  bool operator ==(Object obj) {
-    if (obj is! RelationKeyData) {
-      return false;
-    }
-    RelationKeyData other = obj;
-    return other.elementId1 == elementId1 &&
-        other.elementId2 == elementId2 &&
-        other.elementId3 == elementId3 &&
-        other.relationshipId == relationshipId;
-  }
-
-  @override
-  String toString() {
-    return 'Key($elementId2, $elementId2, $elementId3, $relationshipId)';
-  }
-}
-
-/**
- * An [InternalIndexStore] which keeps index information in separate nodes for
- * each unit.
- */
-class SplitIndexStore implements InternalIndexStore {
-  /**
-   * The [NodeManager] to get/put [IndexNode]s.
-   */
-  final NodeManager _nodeManager;
-
-  final List<IndexObjectManager> _objectManagers;
-
-  /**
-   * The [ContextCodec] to encode/decode [AnalysisContext]s.
-   */
-  final ContextCodec _contextCodec;
-
-  /**
-   * The [ElementCodec] to encode/decode [Element]s.
-   */
-  final ElementCodec _elementCodec;
-
-  /**
-   * The [StringCodec] to encode/decode [String]s.
-   */
-  final StringCodec _stringCodec;
-
-  /**
-   * Information about top-level elements.
-   * We need to keep them together to avoid loading of all index nodes.
-   *
-   * Order of keys: contextId, nodeId.
-   */
-  final Map<int, Map<int, List<_TopElementData>>> _topDeclarations =
-      new Map<int, Map<int, List<_TopElementData>>>();
-
-  int _currentContextId;
-  String _currentNodeName;
-  int _currentNodeNameId;
-  IndexNode _currentNode;
-
-  /**
-   * A table mapping element names to the node names that may have relations with elements with
-   * these names.
-   */
-  final Map<RelationshipImpl, IntToIntSetMap> _relToNameMap =
-      new HashMap<RelationshipImpl, IntToIntSetMap>();
-
-  /**
-   * The set of known [Source]s.
-   */
-  final Set<Source> _sources = new HashSet<Source>();
-
-  SplitIndexStore(NodeManager _nodeManager, this._objectManagers)
-      : _nodeManager = _nodeManager,
-        _contextCodec = _nodeManager.contextCodec,
-        _elementCodec = _nodeManager.elementCodec,
-        _stringCodec = _nodeManager.stringCodec {
-    SplitIndexStoreSiteImpl site = new SplitIndexStoreSiteImpl(this);
-    for (IndexObjectManager manager in _objectManagers) {
-      manager.site = site;
-    }
-  }
-
-  @override
-  String get statistics {
-    StringBuffer buf = new StringBuffer();
-    buf.write('[');
-    buf.write(_nodeManager.locationCount);
-    buf.write(' locations, ');
-    buf.write(_sources.length);
-    buf.write(' sources, ');
-    int namesCount = _relToNameMap.values.fold(0, (c, m) => c + m.length);
-    buf.write(namesCount);
-    buf.write(' names');
-    buf.write(']');
-    return buf.toString();
-  }
-
-  @override
-  bool aboutToIndex(AnalysisContext context, Object object) {
-    if (context == null || context.isDisposed) {
-      return false;
-    }
-    // try to find a node name
-    _currentNodeName = null;
-    for (IndexObjectManager manager in _objectManagers) {
-      _currentNodeName = manager.aboutToIndex(context, object);
-      if (_currentNodeName != null) {
-        break;
-      }
-    }
-    if (_currentNodeName == null) {
-      return false;
-    }
-    // prepare node
-    _currentNodeNameId = _stringCodec.encode(_currentNodeName);
-    _currentNode = _nodeManager.newNode(context);
-    _currentContextId = _contextCodec.encode(context);
-    // remove top-level information for the current node
-    for (Map<int, dynamic> nodeRelations in _topDeclarations.values) {
-      nodeRelations.remove(_currentNodeNameId);
-    }
-    // done
-    return true;
-  }
-
-  @override
-  void cancelIndex() {
-    if (_currentNode != null) {
-      // remove top-level information for the current node
-      for (Map<int, dynamic> nodeRelations in _topDeclarations.values) {
-        nodeRelations.remove(_currentNodeNameId);
-      }
-      // clear fields
-      _currentNodeName = null;
-      _currentNodeNameId = -1;
-      _currentNode = null;
-      _currentContextId = -1;
-    }
-  }
-
-  @override
-  void clear() {
-    _topDeclarations.clear();
-    _nodeManager.clear();
-    _relToNameMap.clear();
-  }
-
-  @override
-  void doneIndex() {
-    if (_currentNode != null) {
-      _nodeManager.putNode(_currentNodeName, _currentNode);
-      _currentNodeName = null;
-      _currentNodeNameId = -1;
-      _currentNode = null;
-      _currentContextId = -1;
-    }
-  }
-
-  Future<List<LocationImpl>> getRelationships(
-      IndexableObject indexable, RelationshipImpl relationship) {
-    // prepare node names
-    List<int> nodeNameIds;
-    {
-      int nameId = _elementCodec.encodeHash(indexable);
-      IntToIntSetMap nameToNodeNames = _relToNameMap[relationship];
-      if (nameToNodeNames != null) {
-        nodeNameIds = nameToNodeNames.get(nameId);
-      } else {
-        nodeNameIds = <int>[];
-      }
-    }
-    // prepare Future(s) for reading each IndexNode
-    List<Future<List<LocationImpl>>> nodeFutures =
-        <Future<List<LocationImpl>>>[];
-    for (int nodeNameId in nodeNameIds) {
-      String nodeName = _stringCodec.decode(nodeNameId);
-      Future<IndexNode> nodeFuture = _nodeManager.getNode(nodeName);
-      Future<List<LocationImpl>> locationsFuture = nodeFuture.then((node) {
-        if (node == null) {
-          // TODO(scheglov) remove node
-          return LocationImpl.EMPTY_LIST;
-        }
-        return node.getRelationships(indexable, relationship);
-      });
-      nodeFutures.add(locationsFuture);
-    }
-    // return Future that merges separate IndexNode Location(s)
-    return Future
-        .wait(nodeFutures)
-        .then((List<List<LocationImpl>> locationsList) {
-      List<LocationImpl> allLocations = <LocationImpl>[];
-      for (List<LocationImpl> locations in locationsList) {
-        allLocations.addAll(locations);
-      }
-      return allLocations;
-    });
-  }
-
-  List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter) {
-    List<Element> elements = <Element>[];
-    _topDeclarations.forEach((contextId, contextLocations) {
-      AnalysisContext context = _contextCodec.decode(contextId);
-      if (context != null) {
-        for (List<_TopElementData> topDataList in contextLocations.values) {
-          for (_TopElementData topData in topDataList) {
-            if (nameFilter(topData.name)) {
-              IndexableObject indexable =
-                  topData.getElement(context, _elementCodec);
-              if (indexable is IndexableElement) {
-                elements.add(indexable.element);
-              }
-            }
-          }
-        }
-      }
-    });
-    return elements;
-  }
-
-  /**
-   * Returns all relations with [Element]s with the given [name].
-   */
-  Future<Map<List<String>, List<InspectLocation>>> inspect_getElementRelations(
-      String name) {
-    Map<List<String>, List<InspectLocation>> result =
-        <List<String>, List<InspectLocation>>{};
-    // TODO(scheglov) restore index inspections?
-    return new Future.value(result);
-//    // prepare elements
-//    Map<int, List<String>> elementMap = _elementCodec.inspect_getElements(name);
-//    // prepare relations with each element
-//    List<Future> futures = <Future>[];
-//    if (_nodeManager is FileNodeManager) {
-//      List<String> nodeNames =
-//          (_nodeManager as FileNodeManager).inspect_getAllNodeNames();
-//      nodeNames.forEach((nodeName) {
-//        Future<IndexNode> nodeFuture = _nodeManager.getNode(nodeName);
-//        Future relationsFuture = nodeFuture.then((node) {
-//          if (node != null) {
-//            elementMap.forEach((int elementId, List<String> elementPath) {
-//              List<InspectLocation> relations =
-//                  node.inspect_getRelations(nodeName, elementId);
-//              List<InspectLocation> resultLocations = result[elementPath];
-//              if (resultLocations == null) {
-//                resultLocations = <InspectLocation>[];
-//                result[elementPath] = resultLocations;
-//              }
-//              resultLocations.addAll(relations);
-//            });
-//          }
-//        });
-//        futures.add(relationsFuture);
-//      });
-//    }
-//    // wait for all nodex
-//    return Future.wait(futures).then((_) {
-//      return result;
-//    });
-  }
-
-  @override
-  void recordRelationship(IndexableObject indexable,
-      RelationshipImpl relationship, LocationImpl location) {
-    if (indexable == null ||
-        (indexable is IndexableElement &&
-            indexable.element is MultiplyDefinedElement)) {
-      return;
-    }
-    if (location == null) {
-      return;
-    }
-    // other elements
-    _recordNodeNameForElement(indexable, relationship);
-    _currentNode.recordRelationship(indexable, relationship, location);
-  }
-
-  void recordTopLevelDeclaration(Element element) {
-    // in current context
-    Map<int, List<_TopElementData>> nodeDeclarations =
-        _topDeclarations[_currentContextId];
-    if (nodeDeclarations == null) {
-      nodeDeclarations = new Map<int, List<_TopElementData>>();
-      _topDeclarations[_currentContextId] = nodeDeclarations;
-    }
-    // in current node
-    List<_TopElementData> declarations = nodeDeclarations[_currentNodeNameId];
-    if (declarations == null) {
-      declarations = <_TopElementData>[];
-      nodeDeclarations[_currentNodeNameId] = declarations;
-    }
-    // record LocationData
-    declarations.add(new _TopElementData(
-        _elementCodec, element.displayName, new IndexableElement(element)));
-  }
-
-  @override
-  void removeContext(AnalysisContext context) {
-    if (context == null) {
-      return;
-    }
-    // remove sources
-    removeSources(context, null);
-    // remove context information
-    for (IndexObjectManager manager in _objectManagers) {
-      manager.removeContext(context);
-    }
-    _topDeclarations.remove(_contextCodec.encode(context));
-    // remove context from codec
-    _contextCodec.remove(context);
-  }
-
-  @override
-  void removeSource(AnalysisContext context, Source source) {
-    if (context == null) {
-      return;
-    }
-    for (IndexObjectManager manager in _objectManagers) {
-      manager.removeSource(context, source);
-    }
-  }
-
-  @override
-  void removeSources(AnalysisContext context, SourceContainer container) {
-    if (context == null) {
-      return;
-    }
-    for (IndexObjectManager manager in _objectManagers) {
-      manager.removeSources(context, container);
-    }
-  }
-
-  void _recordNodeNameForElement(
-      IndexableObject indexable, RelationshipImpl relationship) {
-    IntToIntSetMap nameToNodeNames = _relToNameMap[relationship];
-    if (nameToNodeNames == null) {
-      nameToNodeNames = new IntToIntSetMap();
-      _relToNameMap[relationship] = nameToNodeNames;
-    }
-    int nameId = _elementCodec.encodeHash(indexable);
-    nameToNodeNames.add(nameId, _currentNodeNameId);
-  }
-
-  void _removeNodeByName(AnalysisContext context, String nodeName) {
-    int nodeNameId = _stringCodec.encode(nodeName);
-    _nodeManager.removeNode(nodeName);
-    // remove top-level relations
-    {
-      int contextId = _contextCodec.encode(context);
-      Map<int, dynamic> nodeRelations = _topDeclarations[contextId];
-      if (nodeRelations != null) {
-        nodeRelations.remove(nodeNameId);
-      }
-    }
-  }
-}
-
-/**
- * Interface to [SplitIndexStore] for [IndexObjectManager] implementations.
- */
-abstract class SplitIndexStoreSite {
-  void addSource(Source source);
-  int encodeString(String str);
-  void removeNodeByName(AnalysisContext context, String nodeName);
-  void removeSource(Source source);
-}
-
-/**
- * The implementaiton of [SplitIndexStoreSite].
- */
-class SplitIndexStoreSiteImpl implements SplitIndexStoreSite {
-  final SplitIndexStore store;
-
-  SplitIndexStoreSiteImpl(this.store);
-
-  @override
-  void addSource(Source source) {
-    store._sources.add(source);
-  }
-
-  @override
-  int encodeString(String str) {
-    return store._stringCodec.encode(str);
-  }
-
-  @override
-  void removeNodeByName(AnalysisContext context, String nodeName) {
-    store._removeNodeByName(context, nodeName);
-  }
-
-  @override
-  void removeSource(Source source) {
-    store._sources.remove(source);
-  }
-}
-
-class _DataInputStream {
-  ByteData _byteData;
-  int _byteOffset = 0;
-
-  _DataInputStream(List<int> bytes) {
-    ByteBuffer buffer = new Uint8List.fromList(bytes).buffer;
-    _byteData = new ByteData.view(buffer);
-  }
-
-  int readInt() {
-    int result = _byteData.getInt32(_byteOffset, Endianness.HOST_ENDIAN);
-    _byteOffset += 4;
-    return result;
-  }
-}
-
-class _DataOutputStream {
-  static const LIST_SIZE = 1024;
-  int _size = LIST_SIZE;
-  Uint32List _buf = new Uint32List(LIST_SIZE);
-  int _pos = 0;
-
-  Uint8List getBytes() {
-    return new Uint8List.view(_buf.buffer, 0, _size << 2);
-  }
-
-  void writeInt(int value) {
-    if (_pos == _size) {
-      int newSize = _size << 1;
-      Uint32List newBuf = new Uint32List(newSize);
-      newBuf.setRange(0, _size, _buf);
-      _size = newSize;
-      _buf = newBuf;
-    }
-    _buf[_pos++] = value;
-  }
-}
-
-class _TopElementData {
-  final String name;
-  final int elementId1;
-  final int elementId2;
-  final int elementId3;
-
-  factory _TopElementData(
-      ElementCodec elementCodec, String name, IndexableObject indexable) {
-    return new _TopElementData._(name, elementCodec.encode1(indexable),
-        elementCodec.encode2(indexable), elementCodec.encode3(indexable));
-  }
-
-  _TopElementData._(
-      this.name, this.elementId1, this.elementId2, this.elementId3);
-
-  IndexableObject getElement(
-      AnalysisContext context, ElementCodec elementCodec) {
-    return elementCodec.decode(context, elementId1, elementId2, elementId3);
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/index/store/temporary_folder_file_manager.dart b/pkg/analysis_server/lib/src/services/index/store/temporary_folder_file_manager.dart
deleted file mode 100644
index 9ba9473..0000000
--- a/pkg/analysis_server/lib/src/services/index/store/temporary_folder_file_manager.dart
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.src.index.store.temporary_folder_file_mananer;
-
-import 'dart:async';
-import 'dart:io';
-
-import 'package:analysis_server/src/services/index/store/split_store.dart';
-import 'package:path/path.dart' as pathos;
-
-/**
- * An implementation of [FileManager] that keeps each file in a separate file
- * in a temporary folder.
- */
-class TemporaryFolderFileManager implements FileManager {
-  Directory _directory;
-
-  Directory get test_directory => _directory;
-
-  @override
-  void clear() {
-    if (_directory != null) {
-      try {
-        _directory.deleteSync(recursive: true);
-      } on FileSystemException {
-        // For some reason, on Windows this sometimes results in the error:
-        // "FileSystemException: Deletion failed, path = '...' (OS Error: The
-        // process cannot access the file because it is being used by another
-        // process., errno = 32).  (Speculation: perhaps createTempSync is not
-        // successfully creating a unique name, so multiple processes are
-        // trying to access the same file?)
-        //
-        // For now, work around the problem by ignoring the exception.
-        // TODO(paulberry): fix the actual root cause of this bug.
-      }
-      _directory = null;
-    }
-  }
-
-  @override
-  void delete(String name) {
-    if (_directory == null) {
-      return;
-    }
-    File file = _getFile(name);
-    try {
-      file.deleteSync();
-    } catch (e) {}
-  }
-
-  @override
-  List<String> inspect_getAllNodeNames() {
-    List<String> names = <String>[];
-    List<FileSystemEntity> filePathList = _directory.listSync();
-    for (FileSystemEntity file in filePathList) {
-      String filePath = file.path;
-      String name = pathos.basename(filePath);
-      names.add(name);
-    }
-    return names;
-  }
-
-  @override
-  Future<List<int>> read(String name) {
-    if (_directory == null) {
-      return new Future.value(null);
-    }
-    File file = _getFile(name);
-    return file.readAsBytes().catchError((e) {
-      return null;
-    });
-  }
-
-  @override
-  Future write(String name, List<int> bytes) {
-    _ensureDirectory();
-    return _getFile(name).writeAsBytes(bytes);
-  }
-
-  void _ensureDirectory() {
-    if (_directory == null) {
-      Directory temp = Directory.systemTemp;
-      _directory = temp.createTempSync('AnalysisServices_Index');
-    }
-  }
-
-  File _getFile(String name) {
-    String path = pathos.join(_directory.path, name);
-    return new File(path);
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/linter/linter.dart b/pkg/analysis_server/lib/src/services/linter/linter.dart
index 675836ce..964c238 100644
--- a/pkg/analysis_server/lib/src/services/linter/linter.dart
+++ b/pkg/analysis_server/lib/src/services/linter/linter.dart
@@ -40,9 +40,10 @@
       //TODO(pq): migrate this to a proper API once there is one.
       Iterable<String> registeredLints = ruleRegistry.map((r) => r.name);
       rules.nodes.forEach((YamlNode ruleNode) {
-        if (!registeredLints.contains(ruleNode.value)) {
+        Object value = ruleNode.value;
+        if (value != null && !registeredLints.contains(value)) {
           reporter.reportErrorForSpan(
-              UNDEFINED_LINT_WARNING, ruleNode.span, [ruleNode.value]);
+              UNDEFINED_LINT_WARNING, ruleNode.span, [value]);
         }
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/convert_getter_to_method.dart b/pkg/analysis_server/lib/src/services/refactoring/convert_getter_to_method.dart
index d91306c..de6e761 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/convert_getter_to_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/convert_getter_to_method.dart
@@ -13,9 +13,9 @@
 import 'package:analysis_server/src/services/refactoring/refactoring_internal.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/refactoring/convert_method_to_getter.dart b/pkg/analysis_server/lib/src/services/refactoring/convert_method_to_getter.dart
index 59803be..b742612 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/convert_method_to_getter.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/convert_method_to_getter.dart
@@ -13,8 +13,9 @@
 import 'package:analysis_server/src/services/refactoring/refactoring_internal.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
index bb513ba..c7c5776 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
@@ -17,9 +17,11 @@
 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring_internal.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/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart';
 
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 1cb713a..106684a 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -20,10 +20,12 @@
 import 'package:analysis_server/src/services/refactoring/rename_unit_member.dart';
 import 'package:analysis_server/src/services/search/element_visitors.dart';
 import 'package:analysis_server/src/services/search/search_engine.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/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/resolver.dart' show ExitDetector;
@@ -53,9 +55,9 @@
 /**
  * Returns the [Map] which maps [map] values to their keys.
  */
-Map<String, String> _inverseMap(Map map) {
-  Map result = {};
-  map.forEach((key, value) {
+Map<String, String> _inverseMap(Map<String, String> map) {
+  Map<String, String> result = <String, String>{};
+  map.forEach((String key, String value) {
     result[value] = key;
   });
   return result;
@@ -418,7 +420,7 @@
       return validateCreateMethod(searchEngine, classElement, name);
     }
     // OK
-    return new Future.value(result);
+    return new Future<RefactoringStatus>.value(result);
   }
 
   /**
@@ -667,7 +669,7 @@
       variableType = _getTypeCode(_returnType);
       if (_hasAwait) {
         if (_returnType.element != futureType.element) {
-          returnType = _getTypeCode(futureType.substitute4([_returnType]));
+          returnType = _getTypeCode(futureType.instantiate([_returnType]));
         }
       } else {
         returnType = variableType;
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 d5c6894..141eb8a 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
@@ -13,9 +13,10 @@
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring_internal.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart';
 
@@ -83,7 +84,7 @@
       result = new RefactoringStatus.fatal(
           'Local variable declaration or reference must be selected '
           'to activate this refactoring.');
-      return new Future.value(result);
+      return new Future<RefactoringStatus>.value(result);
     }
     // should have initializer at declaration
     if (_variableNode.initializer == null) {
@@ -92,7 +93,7 @@
           _variableElement.displayName);
       result = new RefactoringStatus.fatal(
           message, newLocation_fromNode(_variableNode));
-      return new Future.value(result);
+      return new Future<RefactoringStatus>.value(result);
     }
     // prepare references
     _references = await searchEngine.searchReferences(_variableElement);
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 125c7ba..ca243c4 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
@@ -16,8 +16,10 @@
 import 'package:analysis_server/src/services/search/element_visitors.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
@@ -278,12 +280,12 @@
     // prepare method information
     result.addStatus(_prepareMethod());
     if (result.hasFatalError) {
-      return new Future.value(result);
+      return new Future<RefactoringStatus>.value(result);
     }
     // maybe operator
     if (_methodElement.isOperator) {
       result = new RefactoringStatus.fatal('Cannot inline operator.');
-      return new Future.value(result);
+      return new Future<RefactoringStatus>.value(result);
     }
     // analyze method body
     result.addStatus(_prepareMethodParts());
diff --git a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
index 5bf3194..b4abf87 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
@@ -24,9 +24,9 @@
 import 'package:analysis_server/src/services/refactoring/rename_local.dart';
 import 'package:analysis_server/src/services/refactoring/rename_unit_member.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 
diff --git a/pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart b/pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart
index f435ff9..17fdb68 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart
@@ -12,9 +12,17 @@
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/source.dart';
 
 /**
+ * Return a new [SourceReference] instance for the given [match].
+ */
+SourceReference getSourceReference(SearchMatch match) {
+  return new SourceReference(match);
+}
+
+/**
  * When a [Source] (a file) is used in more than one context, [SearchEngine]
  * will return separate [SearchMatch]s for each context. But in rename
  * refactorings we want to update each [Source] only once.
@@ -22,11 +30,7 @@
 List<SourceReference> getSourceReferences(List<SearchMatch> matches) {
   var uniqueReferences = new HashMap<SourceReference, SourceReference>();
   for (SearchMatch match in matches) {
-    Element element = match.element;
-    String file = element.source.fullName;
-    SourceRange range = match.sourceRange;
-    SourceReference newReference = new SourceReference(
-        file, range, element, match.isResolved, match.isQualified);
+    SourceReference newReference = getSourceReference(match);
     SourceReference oldReference = uniqueReferences[newReference];
     if (oldReference == null) {
       uniqueReferences[newReference] = newReference;
@@ -56,16 +60,22 @@
 
 /**
  * The [SourceRange] in some [Source].
+ *
+ * TODO(scheglov) inline this class as SearchMatch
  */
 class SourceReference {
-  final String file;
-  final SourceRange range;
-  final Element element;
-  final bool isResolved;
-  final bool isQualified;
+  final SearchMatch _match;
 
-  SourceReference(
-      this.file, this.range, this.element, this.isResolved, this.isQualified);
+  SourceReference(this._match);
+
+  AnalysisContext get context => _match.context;
+
+  Element get element => _match.element;
+
+  /**
+   * The full path of the file containing the match.
+   */
+  String get file => _match.file;
 
   @override
   int get hashCode {
@@ -74,6 +84,12 @@
     return hash;
   }
 
+  bool get isResolved => _match.isResolved;
+
+  SourceRange get range => _match.sourceRange;
+
+  Source get unitSource => _match.unitSource;
+
   @override
   bool operator ==(Object other) {
     if (identical(other, this)) {
@@ -90,7 +106,7 @@
    */
   void addEdit(SourceChange change, String newText, {String id}) {
     SourceEdit edit = createEdit(newText, id: id);
-    doSourceChange_addElementEdit(change, element, edit);
+    doSourceChange_addSourceEdit(change, context, unitSource, edit);
   }
 
   /**
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename.dart b/pkg/analysis_server/lib/src/services/refactoring/rename.dart
index ec36d00..df0bf60 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename.dart
@@ -98,7 +98,7 @@
     return false;
   }
   Source localSource = localElement.source;
-  Source referenceSource = reference.element.source;
+  Source referenceSource = reference.unitSource;
   SourceRange localRange = localElement.visibleRange;
   SourceRange referenceRange = reference.sourceRange;
   return referenceSource == localSource &&
@@ -128,10 +128,11 @@
 abstract class RenameRefactoringImpl extends RefactoringImpl
     implements RenameRefactoring {
   final SearchEngine searchEngine;
-  final Element element;
+  final Element _element;
   final AnalysisContext context;
   final String elementKindName;
   final String oldName;
+  Element get element => _element;
 
   SourceChange change;
 
@@ -139,7 +140,7 @@
 
   RenameRefactoringImpl(SearchEngine searchEngine, Element element)
       : searchEngine = searchEngine,
-        element = element,
+        _element = element,
         context = element.context,
         elementKindName = element.kind.displayName,
         oldName = _getDisplayName(element);
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart
index 6080479..5c9e12f 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart
@@ -16,8 +16,8 @@
 import 'package:analysis_server/src/services/refactoring/rename.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart' show Identifier;
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart' show Identifier;
 import 'package:analyzer/src/generated/java_core.dart';
 
 /**
@@ -63,7 +63,7 @@
     if (element is MethodElement && (element as MethodElement).isOperator) {
       result.addFatalError('Cannot rename operator.');
     }
-    return new Future.value(result);
+    return new Future<RefactoringStatus>.value(result);
   }
 
   @override
@@ -96,10 +96,6 @@
         await searchEngine.searchMemberReferences(oldName);
     List<SourceReference> nameRefs = getSourceReferences(nameMatches);
     for (SourceReference reference in nameRefs) {
-      // ignore resolved reference, we have already updated it
-      if (reference.isResolved) {
-        continue;
-      }
       // ignore references from SDK and pub cache
       if (isElementInSdkOrPubCache(reference.element)) {
         continue;
@@ -192,13 +188,27 @@
             newLocation_fromElement(elementClass));
       }
     }
-    // check shadowing in hierarchy
+    // usage of the renamed Element is shadowed by a local element
+    {
+      _MatchShadowedByLocal conflict = _getShadowingLocalElement();
+      if (conflict != null) {
+        LocalElement localElement = conflict.localElement;
+        result.addError(
+            format(
+                "Usage of renamed {0} will be shadowed by {1} '{2}'.",
+                elementKind.displayName,
+                getElementKindName(localElement),
+                localElement.displayName),
+            newLocation_fromMatch(conflict.match));
+      }
+    }
+    // check shadowing in the hierarchy
     List<SearchMatch> declarations =
-        await searchEngine.searchElementDeclarations(name);
+        await searchEngine.searchMemberDeclarations(name);
     for (SearchMatch declaration in declarations) {
       Element nameElement = getSyntheticAccessorVariable(declaration.element);
       Element nameClass = nameElement.enclosingElement;
-      // renamed Element shadows member of superclass
+      // the renamed Element shadows a member of a superclass
       if (superClasses.contains(nameClass)) {
         result.addError(
             format(
@@ -210,7 +220,7 @@
                 getElementQualifiedName(nameElement)),
             newLocation_fromElement(nameElement));
       }
-      // renamed Element is shadowed by member of subclass
+      // the renamed Element is shadowed by a member of a subclass
       if (isRename && subClasses.contains(nameClass)) {
         result.addError(
             format(
@@ -220,26 +230,6 @@
                 getElementQualifiedName(nameElement)),
             newLocation_fromElement(nameElement));
       }
-      // renamed Element is shadowed by local
-      if (nameElement is LocalElement) {
-        LocalElement localElement = nameElement;
-        ClassElement enclosingClass =
-            nameElement.getAncestor((element) => element is ClassElement);
-        if (enclosingClass == elementClass ||
-            subClasses.contains(enclosingClass)) {
-          for (SearchMatch reference in references) {
-            if (isReferenceInLocalRange(localElement, reference)) {
-              result.addError(
-                  format(
-                      "Usage of renamed {0} will be shadowed by {1} '{2}'.",
-                      elementKind.displayName,
-                      getElementKindName(localElement),
-                      localElement.displayName),
-                  newLocation_fromMatch(reference));
-            }
-          }
-        }
-      }
     }
     // visibility
     if (isRename) {
@@ -249,6 +239,31 @@
     return result;
   }
 
+  _MatchShadowedByLocal _getShadowingLocalElement() {
+    for (SearchMatch match in references) {
+      // qualified reference cannot be shadowed by a local element
+      if (match.isQualified) {
+        continue;
+      }
+      // check local elements of the enclosing executable
+      Element containingElement = match.element;
+      if (containingElement is ExecutableElement) {
+        Iterable<LocalElement> localElements = <Iterable<LocalElement>>[
+          containingElement.functions,
+          containingElement.localVariables,
+          containingElement.parameters
+        ].expand((Iterable<LocalElement> x) => x);
+        for (LocalElement localElement in localElements) {
+          if (localElement.displayName == name &&
+              localElement.visibleRange.intersects(match.sourceRange)) {
+            return new _MatchShadowedByLocal(match, localElement);
+          }
+        }
+      }
+    }
+    return null;
+  }
+
   /**
    * Fills [elements] with [Element]s to rename.
    */
@@ -293,3 +308,10 @@
     }
   }
 }
+
+class _MatchShadowedByLocal {
+  final SearchMatch match;
+  final LocalElement localElement;
+
+  _MatchShadowedByLocal(this.match, this.localElement);
+}
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
index 460896e..23e0342 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
@@ -86,7 +86,13 @@
     } else {
       sourceRange = rangeStartLength(element.nameEnd, 0);
     }
-    String file = element.source.fullName;
-    return new SourceReference(file, sourceRange, element, true, true);
+    return new SourceReference(new SearchMatch(
+        element.context,
+        element.library.source.uri.toString(),
+        element.source.uri.toString(),
+        MatchKind.DECLARATION,
+        sourceRange,
+        true,
+        true));
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_import.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_import.dart
index d82a56d..fa4b8bc 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_import.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_import.dart
@@ -14,8 +14,9 @@
 import 'package:analysis_server/src/services/refactoring/refactoring_internal.dart';
 import 'package:analysis_server/src/services/refactoring/rename.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_library.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_library.dart
index 831fadb..11500fc 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_library.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_library.dart
@@ -6,7 +6,6 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
@@ -44,7 +43,7 @@
   }
 
   @override
-  Future<SourceChange> fillChange() {
+  Future fillChange() {
     addDeclarationEdit(element);
     return searchEngine.searchReferences(element).then(addReferenceEdits);
   }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart
index 4f1f150..5d8597f 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart
@@ -14,8 +14,9 @@
 import 'package:analysis_server/src/services/refactoring/rename.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
@@ -150,7 +151,8 @@
         return;
       }
       // shadowing referenced element
-      if (elementRange.contains(node.offset) &&
+      if (elementRange != null &&
+          elementRange.contains(node.offset) &&
           !node.isQualified &&
           !_isNamedExpressionName(node)) {
         nodeElement = getSyntheticAccessorVariable(nodeElement);
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 4f59af7..0bea805 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
@@ -15,8 +15,8 @@
 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:analyzer/dart/ast/ast.dart' show Identifier;
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart' show Identifier;
 import 'package:analyzer/src/generated/java_core.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/search/hierarchy.dart b/pkg/analysis_server/lib/src/services/search/hierarchy.dart
index f3ad992..c6b552f 100644
--- a/pkg/analysis_server/lib/src/services/search/hierarchy.dart
+++ b/pkg/analysis_server/lib/src/services/search/hierarchy.dart
@@ -35,13 +35,13 @@
   List<Element> members = <Element>[];
   visitChildren(clazz, (Element element) {
     if (element.isSynthetic) {
-      return;
+      return false;
     }
     if (element is ConstructorElement) {
-      return;
+      return false;
     }
     if (name != null && element.displayName != name) {
-      return;
+      return false;
     }
     if (element is ExecutableElement) {
       members.add(element);
@@ -49,6 +49,7 @@
     if (element is FieldElement) {
       members.add(element);
     }
+    return false;
   });
   return members;
 }
diff --git a/pkg/analysis_server/lib/src/services/search/search_engine.dart b/pkg/analysis_server/lib/src/services/search/search_engine.dart
index dbae817..e6d2738 100644
--- a/pkg/analysis_server/lib/src/services/search/search_engine.dart
+++ b/pkg/analysis_server/lib/src/services/search/search_engine.dart
@@ -6,20 +6,14 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/search/search_engine_internal.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/visitor.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
- * Returns a new [SearchEngine] instance based on the given [Index].
- */
-SearchEngine createSearchEngine(Index index) {
-  return new SearchEngineImpl(index);
-}
-
-/**
  * Instances of the enum [MatchKind] represent the kind of reference that was
  * found when a match represents a reference to an element.
  */
@@ -75,13 +69,6 @@
   Future<List<SearchMatch>> searchAllSubtypes(ClassElement type);
 
   /**
-   * Returns declarations of elements with the given name.
-   *
-   * [name] - the name being declared by the found matches.
-   */
-  Future<List<SearchMatch>> searchElementDeclarations(String name);
-
-  /**
    * Returns declarations of class members with the given name.
    *
    * [name] - the name being declared by the found matches.
@@ -125,16 +112,26 @@
  */
 class SearchMatch {
   /**
+   * The [AnalysisContext] containing the match.
+   */
+  final AnalysisContext context;
+
+  /**
+   * The URI of the source of the library containing the match.
+   */
+  final String libraryUri;
+
+  /**
+   * The URI of the source of the unit containing the match.
+   */
+  final String unitUri;
+
+  /**
    * The kind of the match.
    */
   final MatchKind kind;
 
   /**
-   * The element containing the source range that was matched.
-   */
-  final Element element;
-
-  /**
    * The source range that was matched.
    */
   final SourceRange sourceRange;
@@ -149,11 +146,61 @@
    */
   final bool isQualified;
 
-  SearchMatch(this.kind, this.element, this.sourceRange, this.isResolved,
-      this.isQualified);
+  Source _librarySource;
+  Source _unitSource;
+  LibraryElement _libraryElement;
+  Element _element;
+
+  SearchMatch(this.context, this.libraryUri, this.unitUri, this.kind,
+      this.sourceRange, this.isResolved, this.isQualified);
+
+  /**
+   * Return the [Element] containing the match.
+   */
+  Element get element {
+    if (_element == null) {
+      CompilationUnitElement unitElement =
+          context.getCompilationUnitElement(unitSource, librarySource);
+      _ContainingElementFinder finder =
+          new _ContainingElementFinder(sourceRange.offset);
+      unitElement.accept(finder);
+      _element = finder.containingElement;
+    }
+    return _element;
+  }
+
+  /**
+   * The absolute path of the file containing the match.
+   */
+  String get file => unitSource.fullName;
 
   @override
-  int get hashCode => JavaArrays.makeHashCode([element, sourceRange, kind]);
+  int get hashCode =>
+      JavaArrays.makeHashCode([libraryUri, unitUri, kind, sourceRange]);
+
+  /**
+   * Return the [LibraryElement] for the [libraryUri] in the [context].
+   */
+  LibraryElement get libraryElement {
+    _libraryElement ??= context.getLibraryElement(librarySource);
+    return _libraryElement;
+  }
+
+  /**
+   * The library [Source] of the reference.
+   */
+  Source get librarySource {
+    _librarySource ??= context.sourceFactory.forUri(libraryUri);
+    return _librarySource;
+  }
+
+  /**
+   * The unit [Source] of the reference.
+   */
+  Source get unitSource {
+    _unitSource ??= context.sourceFactory.forUri(unitUri);
+    return _unitSource;
+  }
 
   @override
   bool operator ==(Object object) {
@@ -162,10 +209,11 @@
     }
     if (object is SearchMatch) {
       return kind == object.kind &&
+          libraryUri == object.libraryUri &&
+          unitUri == object.unitUri &&
           isResolved == object.isResolved &&
           isQualified == object.isQualified &&
-          sourceRange == object.sourceRange &&
-          element == object.element;
+          sourceRange == object.sourceRange;
     }
     return false;
   }
@@ -175,8 +223,10 @@
     StringBuffer buffer = new StringBuffer();
     buffer.write("SearchMatch(kind=");
     buffer.write(kind);
-    buffer.write(", element=");
-    buffer.write(element.displayName);
+    buffer.write(", libraryUri=");
+    buffer.write(libraryUri);
+    buffer.write(", unitUri=");
+    buffer.write(unitUri);
     buffer.write(", range=");
     buffer.write(sourceRange);
     buffer.write(", isResolved=");
@@ -187,3 +237,24 @@
     return buffer.toString();
   }
 }
+
+/**
+ * A visitor that finds the deep-most [Element] that contains the [offset].
+ */
+class _ContainingElementFinder extends GeneralizingElementVisitor {
+  final int offset;
+  Element containingElement;
+
+  _ContainingElementFinder(this.offset);
+
+  visitElement(Element element) {
+    if (element is ElementImpl) {
+      if (element.codeOffset != null &&
+          element.codeOffset <= offset &&
+          offset <= element.codeOffset + element.codeLength) {
+        containingElement = element;
+        super.visitElement(element);
+      }
+    }
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart b/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
index 12681f7..2d6f815 100644
--- a/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
+++ b/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
@@ -1,19 +1,22 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library services.src.search.search_engine;
+library analysis_server.src.services.search.search_engine_internal;
 
 import 'dart:async';
 
-import 'package:analysis_server/src/provisional/index/index_core.dart';
 import 'package:analysis_server/src/services/correction/source_range.dart';
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/indexable_element.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
-import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
+import 'package:analyzer/src/generated/resolver.dart' show NamespaceBuilder;
+import 'package:analyzer/src/generated/source.dart' show Source, SourceRange;
+import 'package:analyzer/src/summary/idl.dart';
 
 /**
  * A [SearchEngine] implementation.
@@ -24,234 +27,388 @@
   SearchEngineImpl(this._index);
 
   @override
-  Future<List<SearchMatch>> searchAllSubtypes(ClassElement type) {
-    _Requestor requestor = new _Requestor(_index);
-    requestor.addElement(
-        type, IndexConstants.HAS_ANCESTOR, MatchKind.DECLARATION);
-    return requestor.merge();
+  Future<List<SearchMatch>> searchAllSubtypes(ClassElement type) async {
+    List<SearchMatch> matches = <SearchMatch>[];
+    await _addMatches(
+        matches, type, IndexRelationKind.IS_ANCESTOR_OF, MatchKind.DECLARATION);
+    return matches;
   }
 
   @override
-  Future<List<SearchMatch>> searchElementDeclarations(String name) {
-    IndexableName indexableName = new IndexableName(name);
-    _Requestor requestor = new _Requestor(_index);
-    requestor.add(indexableName, IndexConstants.NAME_IS_DEFINED_BY,
-        MatchKind.DECLARATION);
-    return requestor.merge();
+  Future<List<SearchMatch>> searchMemberDeclarations(String pattern) {
+    return _searchDefinedNames(pattern, IndexNameKind.classMember);
   }
 
   @override
-  Future<List<SearchMatch>> searchMemberDeclarations(String name) {
-    return searchElementDeclarations(name).then((matches) {
-      return matches.where((match) {
-        return match.element.enclosingElement is ClassElement;
-      }).toList();
-    });
-  }
-
-  @override
-  Future<List<SearchMatch>> searchMemberReferences(String name) {
-    IndexableName indexableName = new IndexableName(name);
-    _Requestor requestor = new _Requestor(_index);
-    requestor.add(
-        indexableName, IndexConstants.IS_INVOKED_BY, MatchKind.INVOCATION);
-    requestor.add(indexableName, IndexConstants.IS_READ_BY, MatchKind.READ);
-    requestor.add(
-        indexableName, IndexConstants.IS_READ_WRITTEN_BY, MatchKind.READ_WRITE);
-    requestor.add(indexableName, IndexConstants.IS_WRITTEN_BY, MatchKind.WRITE);
-    return requestor.merge();
+  Future<List<SearchMatch>> searchMemberReferences(String name) async {
+    List<Location> locations = await _index.getUnresolvedMemberReferences(name);
+    return locations.map((location) {
+      return _newMatchForLocation(location, null);
+    }).toList();
   }
 
   @override
   Future<List<SearchMatch>> searchReferences(Element element) {
-    if (element.kind == ElementKind.CLASS) {
+    ElementKind kind = element.kind;
+    if (kind == ElementKind.CLASS ||
+        kind == ElementKind.COMPILATION_UNIT ||
+        kind == ElementKind.CONSTRUCTOR ||
+        kind == ElementKind.FUNCTION_TYPE_ALIAS ||
+        kind == ElementKind.SETTER) {
       return _searchReferences(element);
-    } else if (element.kind == ElementKind.COMPILATION_UNIT) {
-      return _searchReferences(element);
-    } else if (element.kind == ElementKind.CONSTRUCTOR) {
-      return _searchReferences_Constructor(element as ConstructorElement);
-    } else if (element.kind == ElementKind.FIELD ||
-        element.kind == ElementKind.TOP_LEVEL_VARIABLE) {
-      return _searchReferences_Field(element as PropertyInducingElement);
-    } else if (element.kind == ElementKind.FUNCTION) {
-      return _searchReferences_Function(element as FunctionElement);
-    } else if (element.kind == ElementKind.GETTER ||
-        element.kind == ElementKind.SETTER) {
-      return _searchReferences(element);
-    } else if (element.kind == ElementKind.IMPORT) {
-      return _searchReferences(element);
-    } else if (element.kind == ElementKind.LABEL) {
-      return _searchReferences(element);
-    } else if (element.kind == ElementKind.LIBRARY) {
-      return _searchReferences(element);
-    } else if (element.kind == ElementKind.LOCAL_VARIABLE) {
-      return _searchReferences_LocalVariable(element as LocalVariableElement);
-    } else if (element.kind == ElementKind.METHOD) {
-      return _searchReferences_Method(element as MethodElement);
-    } else if (element.kind == ElementKind.PARAMETER) {
-      return _searchReferences_Parameter(element as ParameterElement);
-    } else if (element.kind == ElementKind.PREFIX) {
-      return _searchReferences(element);
-    } else if (element.kind == ElementKind.FUNCTION_TYPE_ALIAS) {
-      return _searchReferences(element);
-    } else if (element.kind == ElementKind.TYPE_PARAMETER) {
-      return _searchReferences(element);
+    } else if (kind == ElementKind.GETTER) {
+      return _searchReferences_Getter(element);
+    } else if (kind == ElementKind.FIELD ||
+        kind == ElementKind.TOP_LEVEL_VARIABLE) {
+      return _searchReferences_Field(element);
+    } else if (kind == ElementKind.FUNCTION || kind == ElementKind.METHOD) {
+      if (element.enclosingElement is ExecutableElement) {
+        return _searchReferences_Local(element, (n) => n is Block);
+      }
+      return _searchReferences_Function(element);
+    } else if (kind == ElementKind.IMPORT) {
+      return _searchReferences_Import(element);
+    } else if (kind == ElementKind.LABEL ||
+        kind == ElementKind.LOCAL_VARIABLE) {
+      return _searchReferences_Local(element, (n) => n is Block);
+    } else if (kind == ElementKind.LIBRARY) {
+      return _searchReferences_Library(element);
+    } else if (kind == ElementKind.PARAMETER) {
+      return _searchReferences_Parameter(element);
+    } else if (kind == ElementKind.PREFIX) {
+      return _searchReferences_Prefix(element);
+    } else if (kind == ElementKind.TYPE_PARAMETER) {
+      return _searchReferences_Local(element, (n) => n is ClassDeclaration);
     }
     return new Future.value(<SearchMatch>[]);
   }
 
   @override
-  Future<List<SearchMatch>> searchSubtypes(ClassElement type) {
-    _Requestor requestor = new _Requestor(_index);
-    requestor.addElement(
-        type, IndexConstants.IS_EXTENDED_BY, MatchKind.REFERENCE);
-    requestor.addElement(
-        type, IndexConstants.IS_MIXED_IN_BY, MatchKind.REFERENCE);
-    requestor.addElement(
-        type, IndexConstants.IS_IMPLEMENTED_BY, MatchKind.REFERENCE);
-    return requestor.merge();
+  Future<List<SearchMatch>> searchSubtypes(ClassElement type) async {
+    List<SearchMatch> matches = <SearchMatch>[];
+    await _addMatches(
+        matches, type, IndexRelationKind.IS_EXTENDED_BY, MatchKind.REFERENCE);
+    await _addMatches(
+        matches, type, IndexRelationKind.IS_MIXED_IN_BY, MatchKind.REFERENCE);
+    await _addMatches(matches, type, IndexRelationKind.IS_IMPLEMENTED_BY,
+        MatchKind.REFERENCE);
+    return matches;
   }
 
   @override
   Future<List<SearchMatch>> searchTopLevelDeclarations(String pattern) {
-    RegExp regExp = new RegExp(pattern);
-    List<Element> elements =
-        _index.getTopLevelDeclarations((String name) => regExp.hasMatch(name));
-    List<SearchMatch> matches = <SearchMatch>[];
-    for (Element element in elements) {
-      matches.add(new SearchMatch(MatchKind.DECLARATION, element,
-          rangeElementName(element), true, false));
+    return _searchDefinedNames(pattern, IndexNameKind.topLevel);
+  }
+
+  _addMatches(List<SearchMatch> matches, Element element,
+      IndexRelationKind relationKind, MatchKind kind) async {
+    List<Location> locations = await _index.getRelations(element, relationKind);
+    for (Location location in locations) {
+      SearchMatch match = _newMatchForLocation(location, kind);
+      matches.add(match);
     }
-    return new Future.value(matches);
   }
 
-  Future<List<SearchMatch>> _searchReferences(Element element) {
-    _Requestor requestor = new _Requestor(_index);
-    requestor.addElement(
-        element, IndexConstants.IS_REFERENCED_BY, MatchKind.REFERENCE);
-    return requestor.merge();
+  SearchMatch _newMatchForLocation(Location location, MatchKind kind) {
+    if (kind == null) {
+      IndexRelationKind relationKind = location.kind;
+      if (relationKind == IndexRelationKind.IS_INVOKED_BY) {
+        kind = MatchKind.INVOCATION;
+      } else if (relationKind == IndexRelationKind.IS_REFERENCED_BY) {
+        kind = MatchKind.REFERENCE;
+      } else if (relationKind == IndexRelationKind.IS_READ_BY) {
+        kind = MatchKind.READ;
+      } else if (relationKind == IndexRelationKind.IS_READ_WRITTEN_BY) {
+        kind = MatchKind.READ_WRITE;
+      } else if (relationKind == IndexRelationKind.IS_WRITTEN_BY) {
+        kind = MatchKind.WRITE;
+      } else {
+        throw new ArgumentError('Unsupported relation kind $relationKind');
+      }
+    }
+    return new SearchMatch(
+        location.context,
+        location.libraryUri,
+        location.unitUri,
+        kind,
+        new SourceRange(location.offset, location.length),
+        location.isResolved,
+        location.isQualified);
   }
 
-  Future<List<SearchMatch>> _searchReferences_Constructor(
-      ConstructorElement constructor) {
-    _Requestor requestor = new _Requestor(_index);
-    requestor.addElement(
-        constructor, IndexConstants.IS_REFERENCED_BY, MatchKind.REFERENCE);
-    return requestor.merge();
+  Future<List<SearchMatch>> _searchDefinedNames(
+      String pattern, IndexNameKind nameKind) async {
+    RegExp regExp = new RegExp(pattern);
+    List<Location> locations = await _index.getDefinedNames(regExp, nameKind);
+    return locations.map((location) {
+      return _newMatchForLocation(location, MatchKind.DECLARATION);
+    }).toList();
+  }
+
+  Future<List<SearchMatch>> _searchReferences(Element element) async {
+    List<SearchMatch> matches = <SearchMatch>[];
+    await _addMatches(matches, element, IndexRelationKind.IS_REFERENCED_BY,
+        MatchKind.REFERENCE);
+    return matches;
   }
 
   Future<List<SearchMatch>> _searchReferences_Field(
-      PropertyInducingElement field) {
+      PropertyInducingElement field) async {
+    List<SearchMatch> matches = <SearchMatch>[];
     PropertyAccessorElement getter = field.getter;
     PropertyAccessorElement setter = field.setter;
-    _Requestor requestor = new _Requestor(_index);
     // field itself
-    requestor.addElement(
-        field, IndexConstants.IS_REFERENCED_BY, MatchKind.REFERENCE);
-    requestor.addElement(field, IndexConstants.IS_WRITTEN_BY, MatchKind.WRITE);
+    if (!field.isSynthetic) {
+      await _addMatches(
+          matches, field, IndexRelationKind.IS_WRITTEN_BY, MatchKind.WRITE);
+      await _addMatches(matches, field, IndexRelationKind.IS_REFERENCED_BY,
+          MatchKind.REFERENCE);
+    }
     // getter
     if (getter != null) {
-      requestor.addElement(
-          getter, IndexConstants.IS_REFERENCED_BY, MatchKind.READ);
-      requestor.addElement(
-          getter, IndexConstants.IS_INVOKED_BY, MatchKind.INVOCATION);
+      await _addMatches(
+          matches, getter, IndexRelationKind.IS_REFERENCED_BY, MatchKind.READ);
+      await _addMatches(matches, getter, IndexRelationKind.IS_INVOKED_BY,
+          MatchKind.INVOCATION);
     }
     // setter
     if (setter != null) {
-      requestor.addElement(
-          setter, IndexConstants.IS_REFERENCED_BY, MatchKind.WRITE);
+      await _addMatches(
+          matches, setter, IndexRelationKind.IS_REFERENCED_BY, MatchKind.WRITE);
     }
     // done
-    return requestor.merge();
+    return matches;
   }
 
-  Future<List<SearchMatch>> _searchReferences_Function(
-      FunctionElement function) {
-    _Requestor requestor = new _Requestor(_index);
-    requestor.addElement(
-        function, IndexConstants.IS_REFERENCED_BY, MatchKind.REFERENCE);
-    requestor.addElement(
-        function, IndexConstants.IS_INVOKED_BY, MatchKind.INVOCATION);
-    return requestor.merge();
-  }
-
-  Future<List<SearchMatch>> _searchReferences_LocalVariable(
-      LocalVariableElement variable) {
-    _Requestor requestor = new _Requestor(_index);
-    requestor.addElement(variable, IndexConstants.IS_READ_BY, MatchKind.READ);
-    requestor.addElement(
-        variable, IndexConstants.IS_READ_WRITTEN_BY, MatchKind.READ_WRITE);
-    requestor.addElement(
-        variable, IndexConstants.IS_WRITTEN_BY, MatchKind.WRITE);
-    requestor.addElement(
-        variable, IndexConstants.IS_INVOKED_BY, MatchKind.INVOCATION);
-    return requestor.merge();
-  }
-
-  Future<List<SearchMatch>> _searchReferences_Method(MethodElement method) {
-    _Requestor requestor = new _Requestor(_index);
-    if (method is MethodMember) {
-      method = (method as MethodMember).baseElement;
+  Future<List<SearchMatch>> _searchReferences_Function(Element element) async {
+    if (element is Member) {
+      element = (element as Member).baseElement;
     }
-    requestor.addElement(
-        method, IndexConstants.IS_REFERENCED_BY, MatchKind.REFERENCE);
-    requestor.addElement(
-        method, IndexConstants.IS_INVOKED_BY, MatchKind.INVOCATION);
-    return requestor.merge();
+    List<SearchMatch> matches = <SearchMatch>[];
+    await _addMatches(matches, element, IndexRelationKind.IS_REFERENCED_BY,
+        MatchKind.REFERENCE);
+    await _addMatches(matches, element, IndexRelationKind.IS_INVOKED_BY,
+        MatchKind.INVOCATION);
+    return matches;
+  }
+
+  Future<List<SearchMatch>> _searchReferences_Getter(
+      PropertyAccessorElement getter) async {
+    List<SearchMatch> matches = <SearchMatch>[];
+    await _addMatches(matches, getter, IndexRelationKind.IS_REFERENCED_BY,
+        MatchKind.REFERENCE);
+    await _addMatches(
+        matches, getter, IndexRelationKind.IS_INVOKED_BY, MatchKind.INVOCATION);
+    return matches;
+  }
+
+  Future<List<SearchMatch>> _searchReferences_Import(
+      ImportElement element) async {
+    List<SearchMatch> matches = <SearchMatch>[];
+    LibraryElement libraryElement = element.library;
+    Source librarySource = libraryElement.source;
+    AnalysisContext context = libraryElement.context;
+    for (CompilationUnitElement unitElement in libraryElement.units) {
+      Source unitSource = unitElement.source;
+      CompilationUnit unit =
+          context.resolveCompilationUnit2(unitSource, librarySource);
+      _ImportElementReferencesVisitor visitor =
+          new _ImportElementReferencesVisitor(
+              element, unitSource.uri.toString());
+      unit.accept(visitor);
+      matches.addAll(visitor.matches);
+    }
+    return matches;
+  }
+
+  Future<List<SearchMatch>> _searchReferences_Library(Element element) async {
+    List<SearchMatch> matches = <SearchMatch>[];
+    LibraryElement libraryElement = element.library;
+    Source librarySource = libraryElement.source;
+    AnalysisContext context = libraryElement.context;
+    for (CompilationUnitElement unitElement in libraryElement.parts) {
+      Source unitSource = unitElement.source;
+      CompilationUnit unit =
+          context.resolveCompilationUnit2(unitSource, librarySource);
+      for (Directive directive in unit.directives) {
+        if (directive is PartOfDirective &&
+            directive.element == libraryElement) {
+          matches.add(new SearchMatch(
+              context,
+              librarySource.uri.toString(),
+              unitSource.uri.toString(),
+              MatchKind.REFERENCE,
+              rangeNode(directive.libraryName),
+              true,
+              false));
+        }
+      }
+    }
+    return matches;
+  }
+
+  Future<List<SearchMatch>> _searchReferences_Local(
+      Element element, bool isRootNode(AstNode n)) async {
+    _LocalReferencesVisitor visitor = new _LocalReferencesVisitor(element);
+    AstNode node = element.computeNode();
+    AstNode enclosingNode = node?.getAncestor(isRootNode);
+    enclosingNode?.accept(visitor);
+    return visitor.matches;
   }
 
   Future<List<SearchMatch>> _searchReferences_Parameter(
-      ParameterElement parameter) {
-    _Requestor requestor = new _Requestor(_index);
-    requestor.addElement(parameter, IndexConstants.IS_READ_BY, MatchKind.READ);
-    requestor.addElement(
-        parameter, IndexConstants.IS_READ_WRITTEN_BY, MatchKind.READ_WRITE);
-    requestor.addElement(
-        parameter, IndexConstants.IS_WRITTEN_BY, MatchKind.WRITE);
-    requestor.addElement(
-        parameter, IndexConstants.IS_REFERENCED_BY, MatchKind.REFERENCE);
-    requestor.addElement(
-        parameter, IndexConstants.IS_INVOKED_BY, MatchKind.INVOCATION);
-    return requestor.merge();
+      ParameterElement parameter) async {
+    List<SearchMatch> matches = <SearchMatch>[];
+    matches.addAll(await _searchReferences(parameter));
+    matches.addAll(await _searchReferences_Local(
+        parameter,
+        (n) =>
+            n is ConstructorDeclaration ||
+            n is MethodDeclaration ||
+            n is FunctionExpression));
+    return matches;
+  }
+
+  Future<List<SearchMatch>> _searchReferences_Prefix(
+      PrefixElement element) async {
+    List<SearchMatch> matches = <SearchMatch>[];
+    LibraryElement libraryElement = element.library;
+    Source librarySource = libraryElement.source;
+    AnalysisContext context = libraryElement.context;
+    for (CompilationUnitElement unitElement in libraryElement.units) {
+      Source unitSource = unitElement.source;
+      CompilationUnit unit =
+          context.resolveCompilationUnit2(unitSource, librarySource);
+      _LocalReferencesVisitor visitor =
+          new _LocalReferencesVisitor(element, unitSource.uri.toString());
+      unit.accept(visitor);
+      matches.addAll(visitor.matches);
+    }
+    return matches;
   }
 }
 
-class _Requestor {
-  final List<Future<List<SearchMatch>>> futures = <Future<List<SearchMatch>>>[];
-  final Index index;
+/**
+ * Visitor that adds [SearchMatch]es for [importElement], both with an explicit
+ * prefix or an implicit one.
+ */
+class _ImportElementReferencesVisitor extends RecursiveAstVisitor {
+  final List<SearchMatch> matches = <SearchMatch>[];
 
-  _Requestor(this.index);
+  final ImportElement importElement;
+  final AnalysisContext context;
+  final String libraryUri;
+  final String unitUri;
+  Set<Element> importedElements;
 
-  void add(IndexableObject indexable, RelationshipImpl relationship,
-      MatchKind kind) {
-    Future relationsFuture = index.getRelationships(indexable, relationship);
-    Future matchesFuture = relationsFuture.then((List<LocationImpl> locations) {
-      List<SearchMatch> matches = <SearchMatch>[];
-      for (LocationImpl location in locations) {
-        IndexableObject indexable = location.indexable;
-        if (indexable is IndexableElement) {
-          matches.add(new SearchMatch(
-              kind,
-              indexable.element,
-              new SourceRange(location.offset, location.length),
-              location.isResolved,
-              location.isQualified));
+  _ImportElementReferencesVisitor(ImportElement element, this.unitUri)
+      : importElement = element,
+        context = element.context,
+        libraryUri = element.library.source.uri.toString() {
+    importedElements = new NamespaceBuilder()
+        .createImportNamespaceForDirective(element)
+        .definedNames
+        .values
+        .toSet();
+  }
+
+  @override
+  visitExportDirective(ExportDirective node) {}
+
+  @override
+  visitImportDirective(ImportDirective node) {}
+
+  @override
+  visitSimpleIdentifier(SimpleIdentifier node) {
+    if (node.inDeclarationContext()) {
+      return;
+    }
+    if (importElement.prefix != null) {
+      if (node.staticElement == importElement.prefix) {
+        AstNode parent = node.parent;
+        if (parent is PrefixedIdentifier && parent.prefix == node) {
+          if (importedElements.contains(parent.staticElement)) {
+            _addMatchForPrefix(node, parent.identifier);
+          }
+        }
+        if (parent is MethodInvocation && parent.target == node) {
+          if (importedElements.contains(parent.methodName.staticElement)) {
+            _addMatchForPrefix(node, parent.methodName);
+          }
         }
       }
-      return matches;
-    });
-    futures.add(matchesFuture);
+    } else {
+      if (importedElements.contains(node.staticElement)) {
+        SourceRange range = rangeStartLength(node, 0);
+        _addMatchForRange(range);
+      }
+    }
   }
 
-  void addElement(
-      Element element, RelationshipImpl relationship, MatchKind kind) {
-    IndexableElement indexable = new IndexableElement(element);
-    add(indexable, relationship, kind);
+  void _addMatchForPrefix(SimpleIdentifier prefixNode, AstNode nextNode) {
+    SourceRange range = rangeStartStart(prefixNode, nextNode);
+    _addMatchForRange(range);
   }
 
-  Future<List<SearchMatch>> merge() {
-    return Future.wait(futures).then((List<List<SearchMatch>> matchesList) {
-      return matchesList.expand((matches) => matches).toList();
-    });
+  void _addMatchForRange(SourceRange range) {
+    matches.add(new SearchMatch(
+        context, libraryUri, unitUri, MatchKind.REFERENCE, range, true, false));
+  }
+}
+
+/**
+ * Visitor that adds [SearchMatch]es for local elements of a block, method,
+ * class or a library - labels, local functions, local variables and parameters,
+ * type parameters, import prefixes.
+ */
+class _LocalReferencesVisitor extends RecursiveAstVisitor {
+  final List<SearchMatch> matches = <SearchMatch>[];
+
+  final Element element;
+  final AnalysisContext context;
+  final String libraryUri;
+  final String unitUri;
+
+  _LocalReferencesVisitor(Element element, [String unitUri])
+      : element = element,
+        context = element.context,
+        libraryUri = element.library.source.uri.toString(),
+        unitUri = unitUri ?? element.source.uri.toString();
+
+  @override
+  visitSimpleIdentifier(SimpleIdentifier node) {
+    if (node.inDeclarationContext()) {
+      return;
+    }
+    if (node.bestElement == element) {
+      AstNode parent = node.parent;
+      MatchKind kind = MatchKind.REFERENCE;
+      if (element is FunctionElement) {
+        if (parent is MethodInvocation && parent.methodName == node) {
+          kind = MatchKind.INVOCATION;
+        }
+      } else if (element is VariableElement) {
+        bool isGet = node.inGetterContext();
+        bool isSet = node.inSetterContext();
+        if (isGet && isSet) {
+          kind = MatchKind.READ_WRITE;
+        } else if (isGet) {
+          if (parent is MethodInvocation && parent.methodName == node) {
+            kind = MatchKind.INVOCATION;
+          } else {
+            kind = MatchKind.READ;
+          }
+        } else if (isSet) {
+          kind = MatchKind.WRITE;
+        }
+      }
+      _addMatch(node, kind);
+    }
+  }
+
+  void _addMatch(AstNode node, MatchKind kind) {
+    bool isQualified = node is SimpleIdentifier && node.isQualified;
+    matches.add(new SearchMatch(context, libraryUri, unitUri, kind,
+        rangeNode(node), true, isQualified));
   }
 }
diff --git a/pkg/analysis_server/lib/src/socket_server.dart b/pkg/analysis_server/lib/src/socket_server.dart
index ad1baaa..c3f3fac 100644
--- a/pkg/analysis_server/lib/src/socket_server.dart
+++ b/pkg/analysis_server/lib/src/socket_server.dart
@@ -9,7 +9,6 @@
 import 'package:analysis_server/src/channel/channel.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_file_index.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/plugin/embedded_resolver_provider.dart';
@@ -87,9 +86,7 @@
 
     Index index = null;
     if (!analysisServerOptions.noIndex) {
-      index = createLocalFileIndex();
-      index.contributors = serverPlugin.indexContributors;
-      index.run();
+      index = createMemoryIndex();
     }
 
     analysisServer = new AnalysisServer(
diff --git a/pkg/analysis_server/lib/src/status/ast_writer.dart b/pkg/analysis_server/lib/src/status/ast_writer.dart
index 5488a59..7303f69 100644
--- a/pkg/analysis_server/lib/src/status/ast_writer.dart
+++ b/pkg/analysis_server/lib/src/status/ast_writer.dart
@@ -7,7 +7,8 @@
 import 'dart:collection';
 
 import 'package:analysis_server/src/status/tree_writer.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 
 /**
  * A visitor that will produce an HTML representation of an AST structure.
diff --git a/pkg/analysis_server/lib/src/status/element_writer.dart b/pkg/analysis_server/lib/src/status/element_writer.dart
index aa6a406..c3e4bc2 100644
--- a/pkg/analysis_server/lib/src/status/element_writer.dart
+++ b/pkg/analysis_server/lib/src/status/element_writer.dart
@@ -7,7 +7,6 @@
 import 'dart:collection';
 import 'dart:convert';
 
-import 'package:analysis_server/src/status/get_handler.dart';
 import 'package:analysis_server/src/status/tree_writer.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/visitor.dart';
@@ -165,15 +164,6 @@
     buffer.write(' <span style="color:gray">(');
     buffer.write(element.runtimeType);
     buffer.write(')</span>');
-    if (element is! LibraryElement) {
-      String name = element.name;
-      if (name != null) {
-        buffer.write('&nbsp;&nbsp;[');
-        buffer.write(GetHandler.makeLink(
-            GetHandler.INDEX_ELEMENT_BY_NAME, {'name': name}, 'search index'));
-        buffer.write(']');
-      }
-    }
     buffer.write('<br>');
   }
 }
diff --git a/pkg/analysis_server/lib/src/status/get_handler.dart b/pkg/analysis_server/lib/src/status/get_handler.dart
index 835488e..a2cc48f 100644
--- a/pkg/analysis_server/lib/src/status/get_handler.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler.dart
@@ -4,7 +4,6 @@
 
 library analysis_server.src.status.get_handler;
 
-import 'dart:async';
 import 'dart:collection';
 import 'dart:convert';
 import 'dart:io';
@@ -19,14 +18,12 @@
 import 'package:analysis_server/src/operation/operation_analysis.dart';
 import 'package:analysis_server/src/operation/operation_queue.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_index.dart';
-import 'package:analysis_server/src/services/index/store/split_store.dart';
 import 'package:analysis_server/src/socket_server.dart';
 import 'package:analysis_server/src/status/ast_writer.dart';
 import 'package:analysis_server/src/status/element_writer.dart';
 import 'package:analysis_server/src/status/validator.dart';
 import 'package:analysis_server/src/utilities/average.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/visitor.dart';
 import 'package:analyzer/file_system/file_system.dart';
@@ -34,7 +31,6 @@
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl;
 import 'package:analyzer/src/context/source.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
@@ -258,11 +254,6 @@
   static const String ELEMENT_PATH = '/element';
 
   /**
-   * The path used to request information about elements with the given name.
-   */
-  static const String INDEX_ELEMENT_BY_NAME = '/index/element-by-name';
-
-  /**
    * The path used to request an overlay contents.
    */
   static const String OVERLAY_PATH = '/overlay';
@@ -395,8 +386,6 @@
       _returnDiagnosticInfo(request);
     } else if (path == ELEMENT_PATH) {
       _returnElement(request);
-    } else if (path == INDEX_ELEMENT_BY_NAME) {
-      _returnIndexElementByName(request);
     } else if (path == OVERLAY_PATH) {
       _returnOverlayContents(request);
     } else if (path == OVERLAYS_PATH) {
@@ -468,6 +457,10 @@
     if (unit != null) {
       return unit;
     }
+    unit = entry.getValue(RESOLVED_UNIT12);
+    if (unit != null) {
+      return unit;
+    }
     return entry.getValue(RESOLVED_UNIT);
   }
 
@@ -537,6 +530,7 @@
       results.add(RESOLVED_UNIT9);
       results.add(RESOLVED_UNIT10);
       results.add(RESOLVED_UNIT11);
+      results.add(RESOLVED_UNIT12);
       results.add(RESOLVED_UNIT);
       results.add(STRONG_MODE_ERRORS);
       results.add(USED_IMPORTED_ELEMENTS);
@@ -897,12 +891,11 @@
     Map<Folder, List<CacheEntry>> entryMap =
         new HashMap<Folder, List<CacheEntry>>();
     StringBuffer invalidKeysBuffer = new StringBuffer();
-    analysisServer.folderMap
-        .forEach((Folder folder, InternalAnalysisContext context) {
+    analysisServer.folderMap.forEach((Folder folder, AnalysisContext context) {
       Source source = context.sourceFactory.forUri(sourceUri);
       if (source != null) {
         MapIterator<AnalysisTarget, CacheEntry> iterator =
-            context.analysisCache.iterator();
+            (context as InternalAnalysisContext).analysisCache.iterator();
         while (iterator.moveNext()) {
           if (source == iterator.key.source) {
             if (!allContexts.contains(folder)) {
@@ -1234,15 +1227,15 @@
       return _returnFailure(request, 'Invalid context: $contextFilter');
     }
 
-    List<String> priorityNames;
+    List<String> priorityNames = <String>[];
     List<String> explicitNames = <String>[];
     List<String> implicitNames = <String>[];
     Map<String, String> links = new HashMap<String, String>();
     List<CaughtException> exceptions = <CaughtException>[];
     InternalAnalysisContext context = analysisServer.folderMap[folder];
-    priorityNames = context.prioritySources
-        .map((Source source) => source.fullName)
-        .toList();
+    context.prioritySources.forEach((Source source) {
+      priorityNames.add(source.fullName);
+    });
     MapIterator<AnalysisTarget, CacheEntry> iterator =
         context.analysisCache.iterator(context: context);
     while (iterator.moveNext()) {
@@ -1300,6 +1293,36 @@
         buffer.write('</table></p>');
       }
     }
+    void writeOptions(StringBuffer buffer, AnalysisOptionsImpl options) {
+      if (options == null) {
+        buffer.write('<p>No option information available.</p>');
+        return;
+      }
+      buffer.write('<p>');
+      _writeOption(
+          buffer, 'Analyze functon bodies', options.analyzeFunctionBodies);
+      _writeOption(buffer, 'Cache size', options.cacheSize);
+      _writeOption(buffer, 'Enable async support', options.enableAsync);
+      _writeOption(
+          buffer, 'Enable generic methods', options.enableGenericMethods);
+      _writeOption(
+          buffer, 'Enable strict call checks', options.enableStrictCallChecks);
+      _writeOption(buffer, 'Enable super mixins', options.enableSuperMixins);
+      _writeOption(buffer, 'Generate dart2js hints', options.dart2jsHint);
+      _writeOption(buffer, 'Generate errors in implicit files',
+          options.generateImplicitErrors);
+      _writeOption(
+          buffer, 'Generate errors in SDK files', options.generateSdkErrors);
+      _writeOption(buffer, 'Generate hints', options.hint);
+      _writeOption(buffer, 'Incremental resolution', options.incremental);
+      _writeOption(buffer, 'Incremental resolution with API changes',
+          options.incrementalApi);
+      _writeOption(buffer, 'Preserve comments', options.preserveComments);
+      _writeOption(buffer, 'Strong mode', options.strongMode);
+      _writeOption(buffer, 'Strong mode hints', options.strongModeHints,
+          last: true);
+      buffer.write('</p>');
+    }
 
     _writeResponse(request, (StringBuffer buffer) {
       _writePage(
@@ -1307,53 +1330,37 @@
           (StringBuffer buffer) {
         buffer.write('<h3>Configuration</h3>');
 
-        _writeTwoColumns(buffer, (StringBuffer buffer) {
-          AnalysisOptionsImpl options = context.analysisOptions;
-          buffer.write('<p><b>Options</b></p>');
-          buffer.write('<p>');
-          _writeOption(
-              buffer, 'Analyze functon bodies', options.analyzeFunctionBodies);
-          _writeOption(buffer, 'Cache size', options.cacheSize);
-          _writeOption(buffer, 'Enable async support', options.enableAsync);
-          _writeOption(
-              buffer, 'Enable generic methods', options.enableGenericMethods);
-          _writeOption(buffer, 'Enable strict call checks',
-              options.enableStrictCallChecks);
-          _writeOption(
-              buffer, 'Enable super mixins', options.enableSuperMixins);
-          _writeOption(buffer, 'Generate dart2js hints', options.dart2jsHint);
-          _writeOption(buffer, 'Generate errors in implicit files',
-              options.generateImplicitErrors);
-          _writeOption(buffer, 'Generate errors in SDK files',
-              options.generateSdkErrors);
-          _writeOption(buffer, 'Generate hints', options.hint);
-          _writeOption(buffer, 'Incremental resolution', options.incremental);
-          _writeOption(buffer, 'Incremental resolution with API changes',
-              options.incrementalApi);
-          _writeOption(buffer, 'Preserve comments', options.preserveComments);
-          _writeOption(buffer, 'Strong mode', options.strongMode);
-          _writeOption(buffer, 'Strong mode hints', options.strongModeHints,
-              last: true);
-          buffer.write('</p>');
-        }, (StringBuffer buffer) {
-          List<Linter> lints =
-              context.getConfigurationData(CONFIGURED_LINTS_KEY);
-          buffer.write('<p><b>Lints</b></p>');
-          if (lints.isEmpty) {
-            buffer.write('<p>none</p>');
-          } else {
-            for (Linter lint in lints) {
-              buffer.write('<p>');
-              buffer.write(lint.runtimeType);
-              buffer.write('</p>');
+        _writeColumns(buffer, <HtmlGenerator>[
+          (StringBuffer buffer) {
+            buffer.write('<p><b>Context Options</b></p>');
+            writeOptions(buffer, context.analysisOptions);
+          },
+          (StringBuffer buffer) {
+            buffer.write('<p><b>SDK Context Options</b></p>');
+            writeOptions(buffer,
+                context?.sourceFactory?.dartSdk?.context?.analysisOptions);
+          },
+          (StringBuffer buffer) {
+            List<Linter> lints =
+                context.getConfigurationData(CONFIGURED_LINTS_KEY);
+            buffer.write('<p><b>Lints</b></p>');
+            if (lints.isEmpty) {
+              buffer.write('<p>none</p>');
+            } else {
+              for (Linter lint in lints) {
+                buffer.write('<p>');
+                buffer.write(lint.runtimeType);
+                buffer.write('</p>');
+              }
             }
-          }
 
-          List<ErrorProcessor> errorProcessors =
-              context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
-          int processorCount = errorProcessors?.length ?? 0;
-          buffer.write('<p><b>Error Processor count</b>: $processorCount</p>');
-        });
+            List<ErrorProcessor> errorProcessors =
+                context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
+            int processorCount = errorProcessors?.length ?? 0;
+            buffer
+                .write('<p><b>Error Processor count</b>: $processorCount</p>');
+          }
+        ]);
 
         SourceFactory sourceFactory = context.sourceFactory;
         if (sourceFactory is SourceFactoryImpl) {
@@ -1506,51 +1513,6 @@
     });
   }
 
-  /**
-   * Return a response containing information about elements with the given
-   * name.
-   */
-  Future _returnIndexElementByName(HttpRequest request) async {
-    AnalysisServer analysisServer = _server.analysisServer;
-    if (analysisServer == null) {
-      return _returnFailure(request, 'Analysis server not running');
-    }
-    Index index = analysisServer.index;
-    if (index == null) {
-      return _returnFailure(request, 'Indexing is disabled');
-    }
-    String name = request.uri.queryParameters[INDEX_ELEMENT_NAME];
-    if (name == null) {
-      return _returnFailure(
-          request, 'Query parameter $INDEX_ELEMENT_NAME required');
-    }
-    if (index is LocalIndex) {
-      Map<List<String>, List<InspectLocation>> relations =
-          await index.findElementsByName(name);
-      _writeResponse(request, (StringBuffer buffer) {
-        _writePage(buffer, 'Analysis Server - Index Elements', ['Name: $name'],
-            (StringBuffer buffer) {
-          buffer.write('<table border="1">');
-          _writeRow(buffer, ['Element', 'Relationship', 'Location'],
-              header: true);
-          relations.forEach(
-              (List<String> elementPath, List<InspectLocation> relations) {
-            String elementLocation = elementPath.join(' ');
-            relations.forEach((InspectLocation location) {
-              var relString = location.relationship.identifier;
-              var locString = '${location.path} offset=${location.offset} '
-                  'length=${location.length} flags=${location.flags}';
-              _writeRow(buffer, [elementLocation, relString, locString]);
-            });
-          });
-          buffer.write('</table>');
-        });
-      });
-    } else {
-      return _returnFailure(request, 'LocalIndex expected, but $index found.');
-    }
-  }
-
   void _returnOverlayContents(HttpRequest request) {
     String path = request.requestedUri.queryParameters[PATH_PARAM];
     if (path == null) {
@@ -1707,7 +1669,7 @@
       // TODO(brianwilkerson) Add items for the SDK contexts (currently only one).
       buffer.write('</p>');
 
-      int freq = AnalysisServer.performOperationDelayFreqency;
+      int freq = AnalysisServer.performOperationDelayFrequency;
       String delay = freq > 0 ? '1 ms every $freq ms' : 'off';
 
       buffer.write('<p><b>Performance Data</b></p>');
@@ -1722,6 +1684,23 @@
   }
 
   /**
+   * Write multiple columns of information to the given [buffer], where the list
+   * of [columns] functions are used to generate the content of those columns.
+   */
+  void _writeColumns(StringBuffer buffer, List<HtmlGenerator> columns) {
+    buffer
+        .write('<table class="column"><tr class="column"><td class="column">');
+    int count = columns.length;
+    for (int i = 0; i < count; i++) {
+      if (i > 0) {
+        buffer.write('</td><td class="column">');
+      }
+      columns[i](buffer);
+    }
+    buffer.write('</td></tr></table>');
+  }
+
+  /**
    * Write performance information about a specific completion request
    * to the given [buffer] object.
    */
@@ -1910,7 +1889,7 @@
     buffer.write(_diagnosticCallAverage.value);
     buffer.write(' (ms)</p>&nbsp;');
 
-    var json = response.toJson()[Response.RESULT];
+    Map json = response.toJson()[Response.RESULT];
     List contexts = json['contexts'];
     contexts.sort((first, second) => first['name'].compareTo(second['name']));
 
@@ -2257,7 +2236,7 @@
     _writeTwoColumns(buffer, (StringBuffer buffer) {
       if (analysisServer == null) {
         buffer.write('Status: <span style="color:red">Not running</span>');
-        return false;
+        return;
       }
       buffer.write('<p>');
       buffer.write('Status: Running<br>');
@@ -2286,7 +2265,7 @@
     }, (StringBuffer buffer) {
       _writeSubscriptionList(buffer, ServerService.VALUES, services);
     });
-    return true;
+    return analysisServer != null;
   }
 
   /**
diff --git a/pkg/analysis_server/lib/src/status/tree_writer.dart b/pkg/analysis_server/lib/src/status/tree_writer.dart
index d50a78e..daa7966 100644
--- a/pkg/analysis_server/lib/src/status/tree_writer.dart
+++ b/pkg/analysis_server/lib/src/status/tree_writer.dart
@@ -6,8 +6,6 @@
 
 import 'dart:convert';
 
-import 'package:analysis_server/src/status/get_handler.dart';
-import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
@@ -121,15 +119,6 @@
         buffer.write('</span>');
       } else {
         buffer.write(HTML_ESCAPE.convert(valueString));
-        if (value is Element && value is! LibraryElement) {
-          String name = value.name;
-          if (name != null) {
-            buffer.write('&nbsp;&nbsp;[');
-            buffer.write(GetHandler.makeLink(GetHandler.INDEX_ELEMENT_BY_NAME,
-                {'name': name}, 'search index'));
-            buffer.write(']');
-          }
-        }
       }
     }
   }
diff --git a/pkg/analysis_server/lib/src/status/validator.dart b/pkg/analysis_server/lib/src/status/validator.dart
index 5651b8e..7c995ea 100644
--- a/pkg/analysis_server/lib/src/status/validator.dart
+++ b/pkg/analysis_server/lib/src/status/validator.dart
@@ -6,13 +6,14 @@
 
 import 'dart:collection';
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisEngine, AnalysisResult, CacheState, ChangeSet;
 import 'package:analyzer/src/generated/error.dart';
@@ -63,12 +64,12 @@
   void compareElements(Element expected, Element actual) {
     if (expected == null) {
       if (actual != null) {
-        _writeMismatch(expected, actual, (Element element) {
+        _writeMismatch(expected, actual, (Object element) {
           return element == null ? 'null' : 'non null ${element.runtimeType}';
         });
       }
     } else if (actual == null) {
-      _writeMismatch(expected, actual, (Element element) {
+      _writeMismatch(expected, actual, (Object element) {
         return element == null ? 'null' : 'non null ${element.runtimeType}';
       });
     } else if (expected is ClassElement && actual is ClassElement) {
@@ -134,7 +135,7 @@
       _writeMismatch(
           expected,
           actual,
-          (ClassElement element) => element.hasReferenceToSuper
+          (Object element) => (element as ClassElement).hasReferenceToSuper
               ? 'a class that references super'
               : 'a class that does not reference super');
     }
@@ -142,25 +143,26 @@
       _writeMismatch(
           expected,
           actual,
-          (ClassElement element) =>
-              element.isAbstract ? 'an abstract class' : 'a concrete class');
+          (Object element) => (element as ClassElement).isAbstract
+              ? 'an abstract class'
+              : 'a concrete class');
     }
     if (expected.isEnum != actual.isEnum ||
         expected.isMixinApplication != actual.isMixinApplication) {
-      _writeMismatch(
-          expected,
-          actual,
-          (ClassElement element) => element.isEnum
-              ? 'an enum'
-              : (element.isMixinApplication
-                  ? 'a mixin application'
-                  : 'a class'));
+      _writeMismatch(expected, actual, (Object element) {
+        ClassElement classElement = element as ClassElement;
+        return classElement.isEnum
+            ? 'an enum'
+            : (classElement.isMixinApplication
+                ? 'a mixin application'
+                : 'a class');
+      });
     }
     if (expected.isOrInheritsProxy != actual.isOrInheritsProxy) {
       _writeMismatch(
           expected,
           actual,
-          (ClassElement element) => element.isOrInheritsProxy
+          (Object element) => (element as ClassElement).isOrInheritsProxy
               ? 'a class that is marked as a proxy'
               : 'a class that is not marked as a proxy');
     }
@@ -168,8 +170,9 @@
       _writeMismatch(
           expected,
           actual,
-          (ClassElement element) =>
-              element.isValidMixin ? 'a valid mixin' : 'an invalid mixin');
+          (Object element) => (element as ClassElement).isValidMixin
+              ? 'a valid mixin'
+              : 'an invalid mixin');
     }
     _compareTypes('supertype', expected.supertype, actual.supertype);
     _compareTypeLists('mixin', expected.mixins, actual.mixins);
@@ -209,7 +212,7 @@
       _writeMismatch(
           expected,
           actual,
-          (ConstructorElement element) => element.isConst
+          (Object element) => (element as ConstructorElement).isConst
               ? 'a const constructor'
               : 'a non-const constructor');
     }
@@ -217,7 +220,7 @@
       _writeMismatch(
           expected,
           actual,
-          (ConstructorElement element) => element.isFactory
+          (Object element) => (element as ConstructorElement).isFactory
               ? 'a factory constructor'
               : 'a non-factory constructor');
     }
@@ -232,9 +235,10 @@
       _writeMismatch(
           expected,
           actual,
-          (ConstructorElement element) => element.redirectedConstructor == null
-              ? 'a redirecting constructor'
-              : 'a non-redirecting constructor');
+          (Object element) =>
+              (element as ConstructorElement).redirectedConstructor == null
+                  ? 'a redirecting constructor'
+                  : 'a non-redirecting constructor');
     }
   }
 
@@ -291,22 +295,24 @@
       _writeMismatch(
           expected,
           actual,
-          (ExecutableElement element) => element.hasImplicitReturnType
-              ? 'an implicit return type'
-              : 'an explicit return type');
+          (Object element) =>
+              (element as ExecutableElement).hasImplicitReturnType
+                  ? 'an implicit return type'
+                  : 'an explicit return type');
     }
     if (expected.isAbstract != actual.isAbstract) {
       _writeMismatch(
           expected,
           actual,
-          (ExecutableElement element) =>
-              element.isAbstract ? 'an abstract $kind' : 'a concrete $kind');
+          (Object element) => (element as ExecutableElement).isAbstract
+              ? 'an abstract $kind'
+              : 'a concrete $kind');
     }
     if (expected.isAsynchronous != actual.isAsynchronous) {
       _writeMismatch(
           expected,
           actual,
-          (ExecutableElement element) => element.isAsynchronous
+          (Object element) => (element as ExecutableElement).isAsynchronous
               ? 'an asynchronous $kind'
               : 'a synchronous $kind');
     }
@@ -314,7 +320,7 @@
       _writeMismatch(
           expected,
           actual,
-          (ExecutableElement element) => element.isExternal
+          (Object element) => (element as ExecutableElement).isExternal
               ? 'an external $kind'
               : 'a non-external $kind');
     }
@@ -322,7 +328,7 @@
       _writeMismatch(
           expected,
           actual,
-          (ExecutableElement element) => element.isGenerator
+          (Object element) => (element as ExecutableElement).isGenerator
               ? 'a generator $kind'
               : 'a non-generator $kind');
     }
@@ -330,21 +336,23 @@
       _writeMismatch(
           expected,
           actual,
-          (ExecutableElement element) =>
-              element.isOperator ? 'an operator' : 'a non-operator $kind');
+          (Object element) => (element as ExecutableElement).isOperator
+              ? 'an operator'
+              : 'a non-operator $kind');
     }
     if (expected.isStatic != actual.isStatic) {
       _writeMismatch(
           expected,
           actual,
-          (ExecutableElement element) =>
-              element.isStatic ? 'a static $kind' : 'an instance $kind');
+          (Object element) => (element as ExecutableElement).isStatic
+              ? 'a static $kind'
+              : 'an instance $kind');
     }
     if ((expected.returnType == null) != (actual.returnType == null)) {
       _writeMismatch(
           expected,
           actual,
-          (ExecutableElement element) => element.returnType == null
+          (Object element) => (element as ExecutableElement).returnType == null
               ? 'a $kind with no return type'
               : 'a $kind with a return type');
     } else {
@@ -368,12 +376,12 @@
     if ((expected.exportedLibrary == null) !=
         (actual.exportedLibrary == null)) {
       // TODO(brianwilkerson) Check for more than existence?
-      _writeMismatch(
-          expected,
-          actual,
-          (ExportElement element) => element.exportedLibrary == null
-              ? 'unresolved uri'
-              : 'uri resolved to ${element.exportedLibrary.source.fullName}');
+      _writeMismatch(expected, actual, (Object element) {
+        ExportElement exportElement = element as ExportElement;
+        return exportElement.exportedLibrary == null
+            ? 'unresolved uri'
+            : 'uri resolved to ${exportElement.exportedLibrary.source.fullName}';
+      });
     }
     //
     // Compare children.
@@ -390,8 +398,9 @@
       _writeMismatch(
           expected,
           actual,
-          (FieldElement element) =>
-              element.isEnumConstant ? 'an enum constant' : 'a normal field');
+          (Object element) => (element as FieldElement).isEnumConstant
+              ? 'an enum constant'
+              : 'a normal field');
     }
   }
 
@@ -422,14 +431,14 @@
       _write('; found ');
       _writeln(actual.nameOffset);
     }
-    SourceRange expectedRange = expected.docRange;
-    SourceRange actualRange = actual.docRange;
-    if (expectedRange.offset != actualRange.offset ||
-        expectedRange.length != actualRange.length) {
-      _write('Expected documentation range of ');
-      _write(expectedRange);
-      _write('; found ');
-      _writeln(actualRange);
+    String expectedComment = expected.documentationComment;
+    String actualComment = actual.documentationComment;
+    if (expectedComment != actualComment) {
+      _write('Expected documentation comment of "');
+      _write(expectedComment);
+      _write('"; found "');
+      _write(actualComment);
+      _writeln('"');
     }
   }
 
@@ -442,26 +451,26 @@
       _writeMismatch(
           expected,
           actual,
-          (ImportElement element) => element.isDeferred
+          (Object element) => (element as ImportElement).isDeferred
               ? 'a deferred import'
               : 'a non-deferred import');
     }
     if ((expected.importedLibrary == null) !=
         (actual.importedLibrary == null)) {
-      _writeMismatch(
-          expected,
-          actual,
-          (ImportElement element) => element.importedLibrary == null
-              ? 'unresolved uri'
-              : 'uri resolved to ${element.importedLibrary.source.fullName}');
+      _writeMismatch(expected, actual, (Object element) {
+        ImportElement importElement = element as ImportElement;
+        return importElement.importedLibrary == null
+            ? 'unresolved uri'
+            : 'uri resolved to ${importElement.importedLibrary.source.fullName}';
+      });
     }
     if ((expected.prefix == null) != (actual.prefix == null)) {
-      _writeMismatch(
-          expected,
-          actual,
-          (ImportElement element) => element.prefix == null
-              ? 'no prefix'
-              : 'a prefix named ${element.prefix.name}');
+      _writeMismatch(expected, actual, (Object element) {
+        ImportElement importElement = element as ImportElement;
+        return importElement.prefix == null
+            ? 'no prefix'
+            : 'a prefix named ${importElement.prefix.name}';
+      });
     }
     if (expected.prefixOffset != actual.prefixOffset) {
       _write('Expected a prefix offset of ');
@@ -518,8 +527,9 @@
       _writeMismatch(
           expected,
           actual,
-          (FieldElement element) =>
-              element.isStatic ? 'a static field' : 'an instance field');
+          (Object element) => (element as FieldElement).isStatic
+              ? 'a static field'
+              : 'an instance field');
     }
   }
 
@@ -682,7 +692,7 @@
       _writeMismatch(
           expected,
           actual,
-          (VariableElement element) => element.constantValue == null
+          (Object element) => (element as VariableElement).constantValue == null
               ? 'a $kind with no constant value'
               : 'a $kind with a constant value');
     }
@@ -690,7 +700,7 @@
       _writeMismatch(
           expected,
           actual,
-          (VariableElement element) => element.hasImplicitType
+          (Object element) => (element as VariableElement).hasImplicitType
               ? 'a $kind with an implicit type'
               : 'a $kind with an explicit type');
     }
@@ -698,22 +708,25 @@
       _writeMismatch(
           expected,
           actual,
-          (VariableElement element) =>
-              element.isConst ? 'a const $kind' : 'a non-const $kind');
+          (Object element) => (element as VariableElement).isConst
+              ? 'a const $kind'
+              : 'a non-const $kind');
     }
     if (expected.isFinal != actual.isFinal) {
       _writeMismatch(
           expected,
           actual,
-          (VariableElement element) =>
-              element.isFinal ? 'a final $kind' : 'a non-final $kind');
+          (Object element) => (element as VariableElement).isFinal
+              ? 'a final $kind'
+              : 'a non-final $kind');
     }
     if (expected.isStatic != actual.isStatic) {
       _writeMismatch(
           expected,
           actual,
-          (VariableElement element) =>
-              element.isStatic ? 'a static $kind' : 'an instance $kind');
+          (Object element) => (element as VariableElement).isStatic
+              ? 'a static $kind'
+              : 'an instance $kind');
     }
     //
     // Compare children.
diff --git a/pkg/analysis_server/lib/src/utilities/change_builder_core.dart b/pkg/analysis_server/lib/src/utilities/change_builder_core.dart
index cb103f8..199fa90 100644
--- a/pkg/analysis_server/lib/src/utilities/change_builder_core.dart
+++ b/pkg/analysis_server/lib/src/utilities/change_builder_core.dart
@@ -235,7 +235,7 @@
   }
 
   @override
-  void addSuggestions(LinkedEditSuggestionKind kind, List<String> values) {
+  void addSuggestions(LinkedEditSuggestionKind kind, Iterable<String> values) {
     values.forEach((value) => addSuggestion(kind, value));
   }
 
diff --git a/pkg/analysis_server/lib/src/utilities/change_builder_dart.dart b/pkg/analysis_server/lib/src/utilities/change_builder_dart.dart
index 51131dc..94853ad 100644
--- a/pkg/analysis_server/lib/src/utilities/change_builder_dart.dart
+++ b/pkg/analysis_server/lib/src/utilities/change_builder_dart.dart
@@ -10,10 +10,10 @@
 import 'package:analysis_server/src/services/correction/name_suggestion.dart';
 import 'package:analysis_server/src/services/correction/util.dart';
 import 'package:analysis_server/src/utilities/change_builder_core.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index eded4062..c0d22f1 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -4,12 +4,12 @@
 
 library testing.abstract_context;
 
+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/file_system/memory_file_system.dart';
 import 'package:analyzer/source/package_map_resolver.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException;
 import 'package:analyzer/src/generated/sdk.dart';
diff --git a/pkg/analysis_server/test/abstract_single_unit.dart b/pkg/analysis_server/test/abstract_single_unit.dart
index 4b0be0e..6a73d1c 100644
--- a/pkg/analysis_server/test/abstract_single_unit.dart
+++ b/pkg/analysis_server/test/abstract_single_unit.dart
@@ -4,8 +4,9 @@
 
 library test.services.src.index.abstract_single_file;
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart
index 672e9f2..9d5436b 100644
--- a/pkg/analysis_server/test/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/analysis/get_hover_test.dart
@@ -259,7 +259,7 @@
     expect(hover.elementDescription, 'mmm(int a, String b) → List<String>');
     expect(hover.elementKind, 'method');
     // types
-    expect(hover.staticType, isNull);
+    expect(hover.staticType, '(int, String) → List<String>');
     expect(hover.propagatedType, isNull);
     // no parameter
     expect(hover.parameter, isNull);
diff --git a/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart b/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
index a24b811..e8cf7c4 100644
--- a/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
@@ -296,13 +296,9 @@
     expect(testContext.analysisOptions.strongMode, enabled);
 
     if (enabled) {
-      // Should produce a warning and an error.
-      expect(
-          errors.map((error) => error.type),
-          unorderedEquals([
-            AnalysisErrorType.STATIC_TYPE_WARNING,
-            AnalysisErrorType.COMPILE_TIME_ERROR
-          ]));
+      // Should produce a type warning.
+      expect(errors.map((error) => error.type),
+          unorderedEquals([AnalysisErrorType.STATIC_TYPE_WARNING]));
     } else {
       // Should only produce a hint.
       expect(errors.map((error) => error.type),
diff --git a/pkg/analysis_server/test/analysis/notification_implemented_test.dart b/pkg/analysis_server/test/analysis/notification_implemented_test.dart
index ab0e0c1..ee3959a 100644
--- a/pkg/analysis_server/test/analysis/notification_implemented_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_implemented_test.dart
@@ -9,7 +9,6 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
@@ -96,7 +95,7 @@
 
   @override
   Index createIndex() {
-    return createLocalMemoryIndex();
+    return createMemoryIndex();
   }
 
   /**
diff --git a/pkg/analysis_server/test/analysis/update_content_test.dart b/pkg/analysis_server/test/analysis/update_content_test.dart
index 3e09632..6ab4706 100644
--- a/pkg/analysis_server/test/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/analysis/update_content_test.dart
@@ -8,8 +8,8 @@
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/services/index/index.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -30,7 +30,7 @@
 
 @reflectiveTest
 class UpdateContentTest extends AbstractAnalysisTest {
-  Map<String, List<AnalysisError>> filesErrors = {};
+  Map<String, List<String>> filesErrors = {};
   int serverErrorCount = 0;
   int navigationCount = 0;
 
@@ -42,7 +42,9 @@
   void processNotification(Notification notification) {
     if (notification.event == ANALYSIS_ERRORS) {
       var decoded = new AnalysisErrorsParams.fromNotification(notification);
-      filesErrors[decoded.file] = decoded.errors;
+      String _format(AnalysisError e) =>
+          "${e.location.startLine}: ${e.message}";
+      filesErrors[decoded.file] = decoded.errors.map(_format).toList();
     }
     if (notification.event == ANALYSIS_NAVIGATION) {
       navigationCount++;
@@ -95,7 +97,7 @@
     createProject();
     addTestFile('main() { print(1); }');
     await server.onAnalysisComplete;
-    verify(server.index.index(anyObject, testUnitMatcher)).times(1);
+    verify(server.index.indexUnit(testUnitMatcher)).times(1);
     // add an overlay
     server.updateContent(
         '1', {testFile: new AddContentOverlay('main() { print(2); }')});
@@ -107,7 +109,7 @@
     server.updateContent('2', {testFile: new RemoveContentOverlay()});
     // Validate that at the end the unit was indexed.
     await server.onAnalysisComplete;
-    verify(server.index.index(anyObject, testUnitMatcher)).times(3);
+    verify(server.index.indexUnit(testUnitMatcher)).times(3);
   }
 
   test_multiple_contexts() async {
@@ -159,6 +161,29 @@
     }
   }
 
+  test_overlay_addPreviouslyImported() async {
+    Folder project = resourceProvider.newFolder('/project');
+    handleSuccessfulRequest(
+        new AnalysisSetAnalysisRootsParams([project.path], []).toRequest('0'));
+
+    server.updateContent('1',
+        {'/project/main.dart': new AddContentOverlay('import "target.dart";')});
+    await server.onAnalysisComplete;
+    expect(filesErrors, {
+      '/project/main.dart': ["1: Target of URI does not exist: 'target.dart'"],
+      '/project/target.dart': []
+    });
+
+    server.updateContent('1',
+        {'/project/target.dart': new AddContentOverlay('import "none.dart";')});
+    await server.onAnalysisComplete;
+    expect(filesErrors, {
+      '/project/main.dart': ["1: Unused import"],
+      '/project/target.dart': ["1: Target of URI does not exist: 'none.dart'"],
+      '/project/none.dart': []
+    });
+  }
+
   test_overlayOnly() async {
     String filePath = '/User/project1/test.dart';
     Folder folder1 = resourceProvider.newFolder('/User/project1');
diff --git a/pkg/analysis_server/test/analysis_abstract.dart b/pkg/analysis_server/test/analysis_abstract.dart
index 3541d91..cf8aed1 100644
--- a/pkg/analysis_server/test/analysis_abstract.dart
+++ b/pkg/analysis_server/test/analysis_abstract.dart
@@ -63,6 +63,9 @@
 
   AbstractAnalysisTest();
 
+  AnalysisDomainHandler get analysisHandler => server.handlers
+      .singleWhere((handler) => handler is AnalysisDomainHandler);
+
   void addAnalysisSubscription(AnalysisService service, String file) {
     // add file to subscription
     var files = analysisSubscriptions[service];
@@ -126,7 +129,7 @@
         index,
         serverPlugin,
         new AnalysisServerOptions(),
-        () => new MockSdk(),
+        (_) => new MockSdk(),
         InstrumentationService.NULL_SERVICE);
   }
 
@@ -141,7 +144,7 @@
     resourceProvider.newFolder(projectPath);
     Request request =
         new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0');
-    handleSuccessfulRequest(request);
+    handleSuccessfulRequest(request, handler: analysisHandler);
   }
 
   /**
@@ -169,7 +172,8 @@
   /**
    * Validates that the given [request] is handled successfully.
    */
-  Response handleSuccessfulRequest(Request request) {
+  Response handleSuccessfulRequest(Request request, {RequestHandler handler}) {
+    handler ??= this.handler;
     Response response = handler.handleRequest(request);
     expect(response, isResponseSuccess(request.id));
     return response;
@@ -201,8 +205,7 @@
     packageMapProvider = new MockPackageMapProvider();
     Index index = createIndex();
     server = createAnalysisServer(index);
-    handler = server.handlers
-        .singleWhere((handler) => handler is AnalysisDomainHandler);
+    handler = analysisHandler;
     // listen for notifications
     Stream<Notification> notificationStream =
         serverChannel.notificationController.stream;
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 85a6bbc..8527528e 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -144,7 +144,7 @@
         null,
         plugin,
         new AnalysisServerOptions(),
-        () => new MockSdk(),
+        (_) => new MockSdk(),
         InstrumentationService.NULL_SERVICE,
         rethrowExceptions: true);
     processRequiredPlugins();
diff --git a/pkg/analysis_server/test/channel/web_socket_channel_test.dart b/pkg/analysis_server/test/channel/web_socket_channel_test.dart
index a9d42ed..77c47bc 100644
--- a/pkg/analysis_server/test/channel/web_socket_channel_test.dart
+++ b/pkg/analysis_server/test/channel/web_socket_channel_test.dart
@@ -35,9 +35,9 @@
   static WebSocketClientChannel client;
   static WebSocketServerChannel server;
 
-  static List requestsReceived;
-  static List responsesReceived;
-  static List notificationsReceived;
+  static List<Request> requestsReceived;
+  static List<Response> responsesReceived;
+  static List<Notification> notificationsReceived;
 
   static Future close() {
     var timeout = new Duration(seconds: 1);
@@ -144,9 +144,9 @@
     server = new WebSocketServerChannel(
         socket.twin, InstrumentationService.NULL_SERVICE);
 
-    requestsReceived = [];
-    responsesReceived = [];
-    notificationsReceived = [];
+    requestsReceived = <Request>[];
+    responsesReceived = <Response>[];
+    notificationsReceived = <Notification>[];
 
     // Allow multiple listeners on server side for testing.
     socket.twin.allowMultipleListeners();
diff --git a/pkg/analysis_server/test/completion_test.dart b/pkg/analysis_server/test/completion_test.dart
index 86defe8..2a453eb 100644
--- a/pkg/analysis_server/test/completion_test.dart
+++ b/pkg/analysis_server/test/completion_test.dart
@@ -365,14 +365,14 @@
 class JsonDecoderX{}
 f1() {var x=new !2j!1s!3}''',
         <String>[
-      "1+json",
-      "1+jxx",
-      "2+json",
-      "2+jxx",
-      "2-JsonDecoder",
-      "3+json",
-      "3-jxx"
-    ]);
+          "1+json",
+          "1+jxx",
+          "2+json",
+          "2+jxx",
+          "2-JsonDecoder",
+          "3+json",
+          "3-jxx"
+        ]);
 
     buildTests(
         'testCommentSnippets050',
@@ -389,17 +389,17 @@
   const x!2dr.!3a(1, 2, 3);
 }''',
         <String>[
-      "1+xdr",
-      "1+xa",
-      "1+xdr.a",
-      "1+xdr.b",
-      "2+xa", // suggest default constructor
-      "2+xdr", // suggest normal constructor
-      "2+xdr.a",
-      "2+xdr.b", // suggest named constructor
-      "3+b", // suggest named constructor
-      "3+a"
-    ]);
+          "1+xdr",
+          "1+xa",
+          "1+xdr.a",
+          "1+xdr.b",
+          "2+xa", // suggest default constructor
+          "2+xdr", // suggest normal constructor
+          "2+xdr.a",
+          "2+xdr.b", // suggest named constructor
+          "3+b", // suggest named constructor
+          "3+a"
+        ]);
 
     // Type propagation.
     buildTests(
@@ -569,18 +569,18 @@
   }
 }''',
         <String>[
-      "1+a",
-      "2+b",
-      "1-g",
-      "2-h",
-      "3+b",
-      "4+c",
-      "5+a",
-      "6+c",
-      "7+g",
-      "8+j",
-      "9+h"
-    ]);
+          "1+a",
+          "2+b",
+          "1-g",
+          "2-h",
+          "3+b",
+          "4+c",
+          "5+a",
+          "6+c",
+          "7+g",
+          "8+j",
+          "9+h"
+        ]);
 
     buildTests(
         'testCommentSnippets065',
@@ -818,12 +818,12 @@
 }
 f() => new Fil!1''',
         <String>[
-      "1+File",
-      "1+File.fromPath",
-      "1+FileMode",
-      "1+FileMode._internal1",
-      "1+FileMode._internal"
-    ]);
+          "1+File",
+          "1+File.fromPath",
+          "1+FileMode",
+          "1+FileMode._internal1",
+          "1+FileMode._internal"
+        ]);
 
     buildTests(
         'testCommentSnippets078',
@@ -1265,14 +1265,14 @@
   methodB() {}
 }''',
         <String>[
-      "1+aaa",
-      "1-bbb",
-      "2+int",
-      "2-double",
-      "3+methodA",
-      "3+methodB",
-      "3-int"
-    ]);
+          "1+aaa",
+          "1-bbb",
+          "2+int",
+          "2-double",
+          "3+methodA",
+          "3+methodB",
+          "3-int"
+        ]);
 
     buildTests(
         'testCompletion_dartDoc_reference_incomplete',
@@ -1292,13 +1292,13 @@
  */
 class C {}''',
         <String>[
-      "1+double",
-      "1-int",
-      "2+int",
-      "2+String",
-      "3+int",
-      "3+String"
-    ]);
+          "1+double",
+          "1-int",
+          "2+int",
+          "2+String",
+          "3+int",
+          "3+String"
+        ]);
 
     buildTests(
         'testCompletion_double_inFractionPart',
@@ -1328,14 +1328,14 @@
   Str!3;
 }''',
         <String>[
-      "1+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 1)*/,
-      "1+STR" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/,
-      "2+STR" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 1)*/,
-      "2+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/,
-      "3+String" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 1)*/,
-      "3+STR" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/,
-      "3+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/
-    ]);
+          "1+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 1)*/,
+          "1+STR" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/,
+          "2+STR" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 1)*/,
+          "2+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/,
+          "3+String" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 1)*/,
+          "3+STR" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/,
+          "3+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/
+        ]);
 
     buildTests(
         'testCompletion_export_dart',
@@ -1594,13 +1594,13 @@
   var v2 = p is!4;
 }''',
         <String>[
-      "1+MyClass",
-      "2+MyClass",
-      "3+MyClass",
-      "3-v1",
-      "4+is",
-      "4-isVariable"
-    ]);
+          "1+MyClass",
+          "2+MyClass",
+          "3+MyClass",
+          "3-v1",
+          "4+is",
+          "4-isVariable"
+        ]);
 
     buildTests(
         'testCompletion_is_asIdentifierStart',
@@ -1719,9 +1719,9 @@
   foo(Functions.!1);
 }''',
         <String>[
-      "1+myFunc" /*":" + ProposalKind.METHOD*/,
-      "1+myFunc" /*":" + ProposalKind.METHOD_NAME*/
-    ]);
+          "1+myFunc" /*":" + ProposalKind.METHOD*/,
+          "1+myFunc" /*":" + ProposalKind.METHOD_NAME*/
+        ]);
 
     buildTests(
         'testCompletion_namedArgument_alreadyUsed',
@@ -2209,13 +2209,13 @@
             f2() {var x=new json.JsonDe!2}
             f3() {var x=new json.JsonDecoder!3}''',
         <String>[
-      "1+JsonDecoder",
-      "1-JsonDecoderX",
-      "2+JsonDecoder",
-      "2-JsonDecoderX",
-      "3+JsonDecoder",
-      "3-JsonDecoderX"
-    ]);
+          "1+JsonDecoder",
+          "1-JsonDecoderX",
+          "2+JsonDecoder",
+          "2-JsonDecoderX",
+          "3+JsonDecoder",
+          "3-JsonDecoderX"
+        ]);
 
     // TODO Enable after type propagation is implemented. Not yet.
     // TODO Include corelib analysis
@@ -2357,14 +2357,14 @@
   v.!1toString!2().!3hash!4Code
 }''',
         <String>[
-      "1+toString",
-      "1-==",
-      "2+toString",
-      "3+hashCode",
-      "3+toString",
-      "4+hashCode",
-      "4-toString"
-    ]);
+          "1+toString",
+          "1-==",
+          "2+toString",
+          "3+hashCode",
+          "3+toString",
+          "4+hashCode",
+          "4-toString"
+        ]);
 
     buildTests(
         'test002',
@@ -2655,19 +2655,20 @@
 !4part 'x';''',
         <String>[
           "1+library",
-          "2+import",
-          "3+export",
-          "4+part",
+          "2+import \'\';",
+          "3+export \'\';",
+          "4+part \'\';",
           "5+as",
           "6+hide",
           "7+show",
           "8-null"
         ],
-        failingTests: '567');
+        failingTests: '234567'); //TODO(jwren) 234 failing as correct selection
+        // offset assertions can't be passed into buildTests(..)
 
     // keywords
     buildTests('test018', '''!1part !2of foo;''', <String>["1+part", "2+of"],
-        failingTests: '2');
+        failingTests: '12');
 
     buildTests(
         'test019',
@@ -2748,22 +2749,22 @@
   }
 }''',
         <String>[
-      "1+m",
-      "2+_m",
-      "3+g",
-      "4+m",
-      "5+_m",
-      "6+g",
-      "7-g",
-      "8-m",
-      "9-_m",
-      "A+_m",
-      "B+m",
-      "C+g",
-      "D+_m",
-      "E+m",
-      "F+g"
-    ]);
+          "1+m",
+          "2+_m",
+          "3+g",
+          "4+m",
+          "5+_m",
+          "6+g",
+          "7-g",
+          "8-m",
+          "9-_m",
+          "A+_m",
+          "B+m",
+          "C+g",
+          "D+_m",
+          "E+m",
+          "F+g"
+        ]);
 
     buildTests('test026', '''var aBcD; var x=ab!1''', <String>["1+aBcD"]);
 
@@ -2799,15 +2800,15 @@
   }
 }''',
         <String>[
-      "1+ONE",
-      "1-UKSI",
-      "2+EIN",
-      "2-ICHI",
-      "3+ICHI",
-      "3+UKSI",
-      "3+EIN",
-      "3+ONE"
-    ]);
+          "1+ONE",
+          "1-UKSI",
+          "2+EIN",
+          "2-ICHI",
+          "3+ICHI",
+          "3+UKSI",
+          "3+EIN",
+          "3+ONE"
+        ]);
 
     buildTests(
         'test033',
@@ -2905,7 +2906,7 @@
 
     // test analysis of untyped fields and top-level vars
     buildTests('test039', '''class X{}var x = null as !1X;''',
-        <String>["1+X", "1-void"]);
+        <String>["1-void"]);
 
     // test arg lists with named params
     buildTests('test040', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1)!2;}''',
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 1472027..123cabe 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -15,19 +15,20 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/java_io.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/services/lint.dart';
 import 'package:analyzer/src/util/glob.dart';
 import 'package:linter/src/plugin/linter_plugin.dart';
 import 'package:linter/src/rules/avoid_as.dart';
-import 'package:package_config/packages.dart';
 import 'package:path/path.dart';
 import 'package:plugin/manager.dart';
 import 'package:plugin/plugin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import 'mock_sdk.dart';
 import 'mocks.dart';
 import 'utils.dart';
 
@@ -112,6 +113,8 @@
 
   AnalysisOptions get options => callbacks.currentContext.analysisOptions;
 
+  Map<String, List<Folder>> get _currentPackageMap => _packageMap(projPath);
+
   void deleteFile(List<String> pathComponents) {
     String filePath = posix.joinAll(pathComponents);
     resourceProvider.deleteFile(filePath);
@@ -142,7 +145,8 @@
     manager.processPlugins(plugins);
   }
 
-  UriResolver provideEmbeddedUriResolver(Folder folder) => embeddedUriResolver;
+  EmbedderUriResolver provideEmbeddedUriResolver(Folder folder) =>
+      embeddedUriResolver;
 
   UriResolver providePackageResolver(Folder folder) => packageResolver;
 
@@ -150,8 +154,12 @@
     processRequiredPlugins();
     resourceProvider = new MemoryResourceProvider();
     packageMapProvider = new MockPackageMapProvider();
+    DartSdkManager sdkManager = new DartSdkManager((_) {
+      return new MockSdk();
+    });
     manager = new ContextManagerImpl(
         resourceProvider,
+        sdkManager,
         providePackageResolver,
         provideEmbeddedUriResolver,
         packageMapProvider,
@@ -417,6 +425,7 @@
     expect(context.analysisOptions.enableAsync, isFalse);
     // * from `.analysis_options`:
     expect(context.analysisOptions.enableGenericMethods, isTrue);
+
     // * verify tests are excluded
     expect(
         callbacks.currentContextFilePaths[projPath].keys,
@@ -1070,8 +1079,7 @@
         <String, String>{projPath: packageRootPath});
     expect(callbacks.currentContextPaths, hasLength(1));
     expect(callbacks.currentContextPaths, contains(projPath));
-    expect(callbacks.currentContextDispositions[projPath].packageRoot,
-        packageRootPath);
+    _checkPackageRoot(projPath, packageRootPath);
   }
 
   void test_setRoots_addFolderWithPubspec() {
@@ -1182,11 +1190,11 @@
     callbacks.assertContextFiles(subProjectA, [subProjectA_file]);
     callbacks.assertContextFiles(subProjectB, [subProjectB_file]);
     // verify package maps
-    _checkPackageMap(root, isNull);
-    _checkPackageMap(
-        subProjectA, equals(packageMapProvider.packageMaps[subProjectA]));
-    _checkPackageMap(
-        subProjectB, equals(packageMapProvider.packageMaps[subProjectB]));
+    expect(_packageMap(root), isNull);
+    expect(_packageMap(subProjectA),
+        equals(packageMapProvider.packageMaps[subProjectA]));
+    expect(_packageMap(subProjectB),
+        equals(packageMapProvider.packageMaps[subProjectB]));
   }
 
   void test_setRoots_addPackageRoot() {
@@ -1199,7 +1207,7 @@
     List<String> includedPaths = <String>[projPath];
     List<String> excludedPaths = <String>[];
     manager.setRoots(includedPaths, excludedPaths, <String, String>{});
-    _checkPackageMap(projPath, equals(packageMapProvider.packageMap));
+    expect(_currentPackageMap, equals(packageMapProvider.packageMap));
     manager.setRoots(includedPaths, excludedPaths,
         <String, String>{projPath: packageRootPath});
     _checkPackageRoot(projPath, equals(packageRootPath));
@@ -1521,7 +1529,7 @@
       'foo': [packageFolder]
     };
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
-    _checkPackageMap(projPath, equals(packageMapProvider.packageMap));
+    expect(_currentPackageMap, equals(packageMapProvider.packageMap));
   }
 
   void test_setRoots_noContext_excludedFolder() {
@@ -1709,7 +1717,7 @@
         <String, String>{projPath: packageRootPath});
     _checkPackageRoot(projPath, equals(packageRootPath));
     manager.setRoots(includedPaths, excludedPaths, <String, String>{});
-    _checkPackageMap(projPath, equals(packageMapProvider.packageMap));
+    expect(_currentPackageMap, equals(packageMapProvider.packageMap));
   }
 
   void test_setRoots_rootPathContainsDotFile() {
@@ -2247,20 +2255,22 @@
     resourceProvider.newFile(dartFilePath, 'contents');
     // the created context has the expected empty package map
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
-    _checkPackageMap(projPath, isEmpty);
+    expect(_currentPackageMap, isEmpty);
     // configure package map
     String packagePath = '/package/foo';
     resourceProvider.newFolder(packagePath);
-    packageMapProvider.packageMap = {'foo': projPath};
+    packageMapProvider.packageMap = {
+      'foo': [resourceProvider.newFolder(projPath)]
+    };
     // Changing a .dart file in the project shouldn't cause a new
     // package map to be picked up.
     resourceProvider.modifyFile(dartFilePath, 'new contents');
     return pumpEventQueue().then((_) {
-      _checkPackageMap(projPath, isEmpty);
+      expect(_currentPackageMap, isEmpty);
       // However, changing the package map dependency should.
       resourceProvider.modifyFile(dependencyPath, 'new contents');
       return pumpEventQueue().then((_) {
-        _checkPackageMap(projPath, equals(packageMapProvider.packageMap));
+        expect(_currentPackageMap, equals(packageMapProvider.packageMap));
       });
     });
   }
@@ -2275,14 +2285,14 @@
     resourceProvider.newFile(dartFilePath, 'contents');
     // the created context has the expected empty package map
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
-    _checkPackageMap(projPath, isEmpty);
+    expect(_currentPackageMap, isEmpty);
     // Change the package map dependency so that the packageMapProvider is
     // re-run, and arrange for it to return null from computePackageMap().
     packageMapProvider.packageMap = null;
     resourceProvider.modifyFile(dependencyPath, 'new contents');
     return pumpEventQueue().then((_) {
       // The package map should have been changed to null.
-      _checkPackageMap(projPath, isNull);
+      expect(_currentPackageMap, isNull);
     });
   }
 
@@ -2298,40 +2308,35 @@
     Map<String, int> filePaths = callbacks.currentContextFilePaths[projPath];
     expect(filePaths, hasLength(1));
     expect(filePaths, contains(filePath));
-    Packages packages = callbacks.currentContextDispositions[projPath].packages;
-    expect(packages.packages, isEmpty);
+    expect(_currentPackageMap, isEmpty);
 
     // update .packages
     callbacks.now++;
     resourceProvider.modifyFile(packagesPath, 'main:./lib/');
     return pumpEventQueue().then((_) {
       // verify new package info
-      packages = callbacks.currentContextDispositions[projPath].packages;
-      expect(packages.packages, unorderedEquals(['main']));
+      expect(_currentPackageMap.keys, unorderedEquals(['main']));
     });
   }
 
   /**
    * Verify that package URI's for source files in [path] will be resolved
-   * using a package map matching [expectation].
-   */
-  void _checkPackageMap(String path, expectation) {
-    FolderDisposition disposition = callbacks.currentContextDispositions[path];
-    Map<String, List<Folder>> packageMap =
-        disposition is PackageMapDisposition ? disposition.packageMap : null;
-    expect(packageMap, expectation);
-  }
-
-  /**
-   * Verify that package URI's for source files in [path] will be resolved
-   * using a package root maching [expectation].
+   * using a package root matching [expectation].
    */
   void _checkPackageRoot(String path, expectation) {
-    FolderDisposition disposition = callbacks.currentContextDispositions[path];
-    expect(disposition.packageRoot, expectation);
+    // TODO(brianwilkerson) Figure out how to test this. Possibly by comparing
+    // the contents of the package map (although that approach doesn't work at
+    // the moment).
+//    FolderDisposition disposition = callbacks.currentContextDispositions[path];
+//    expect(disposition.packageRoot, expectation);
     // TODO(paulberry): we should also verify that the package map itself is
     // correct.  See dartbug.com/23909.
   }
+
+  Map<String, List<Folder>> _packageMap(String contextPath) {
+    Folder folder = resourceProvider.getFolder(contextPath);
+    return manager.folderMap[folder]?.sourceFactory?.packageMap;
+  }
 }
 
 class TestContextManagerCallbacks extends ContextManagerCallbacks {
@@ -2364,12 +2369,6 @@
       <String, Set<Source>>{};
 
   /**
-   * Map from context to folder disposition.
-   */
-  final Map<String, FolderDisposition> currentContextDispositions =
-      <String, FolderDisposition>{};
-
-  /**
    * Resource provider used for this test.
    */
   final ResourceProvider resourceProvider;
@@ -2389,7 +2388,6 @@
     currentContextTimestamps[path] = now;
     currentContextFilePaths[path] = <String, int>{};
     currentContextSources[path] = new HashSet<Source>();
-    currentContextDispositions[path] = disposition;
     currentContext = AnalysisEngine.instance.createAnalysisContext();
     _locateEmbedderYamls(currentContext, disposition);
     List<UriResolver> resolvers = [];
@@ -2456,13 +2454,11 @@
     currentContextTimestamps.remove(path);
     currentContextFilePaths.remove(path);
     currentContextSources.remove(path);
-    currentContextDispositions.remove(path);
   }
 
   @override
-  void updateContextPackageUriResolver(
-      Folder contextFolder, FolderDisposition disposition) {
-    currentContextDispositions[contextFolder.path] = disposition;
+  void updateContextPackageUriResolver(AnalysisContext context) {
+    // Nothing to do.
   }
 
   /// If [disposition] has a package map, attempt to locate `_embedder.yaml`
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index f8c0afd..ad5319e 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -47,7 +47,7 @@
         null,
         serverPlugin,
         new AnalysisServerOptions(),
-        () => new MockSdk(),
+        (_) => new MockSdk(),
         InstrumentationService.NULL_SERVICE);
     handler = new AnalysisDomainHandler(server);
   });
@@ -70,7 +70,7 @@
             new AnalysisGetReachableSourcesParams(fileA).toRequest('0');
         var response = handler.handleRequest(request);
 
-        var json = response.toJson()[Response.RESULT];
+        Map json = response.toJson()[Response.RESULT];
 
         // Sanity checks.
         expect(json['sources'], hasLength(6));
@@ -474,7 +474,7 @@
         null,
         serverPlugin,
         new AnalysisServerOptions(),
-        () => new MockSdk(),
+        (_) => new MockSdk(),
         InstrumentationService.NULL_SERVICE);
     handler = new AnalysisDomainHandler(server);
     // listen for notifications
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index 61734b6..ec7c520 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -28,6 +28,55 @@
 
 @reflectiveTest
 class CompletionDomainHandlerTest extends AbstractCompletionDomainTest {
+  test_ArgumentList_imported_function_named_param() async {
+    addTestFile('main() { int.parse("16", ^);}');
+    await getSuggestions();
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'radix: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'onError: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    expect(suggestions, hasLength(2));
+  }
+
+  test_ArgumentList_imported_function_named_param1() async {
+    addTestFile('main() { foo(o^);} foo({one, two}) {}');
+    await getSuggestions();
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'one: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'two: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    expect(suggestions, hasLength(2));
+  }
+
+  test_ArgumentList_imported_function_named_param_label1() async {
+    addTestFile('main() { int.parse("16", r^: 16);}');
+    await getSuggestions();
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'radix: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'onError: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    expect(suggestions, hasLength(2));
+  }
+
+  test_ArgumentList_imported_function_named_param_label3() async {
+    addTestFile('main() { int.parse("16", ^: 16);}');
+    await getSuggestions();
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'radix: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'onError: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    expect(suggestions, hasLength(2));
+  }
+
+  test_ArgumentList_imported_function_named_param2() async {
+    addTestFile('mainx() {A a = new A(); a.foo(one: 7, ^);}'
+        'class A { foo({one, two}) {} }');
+    await getSuggestions();
+    assertHasResult(CompletionSuggestionKind.NAMED_ARGUMENT, 'two: ',
+        relevance: DART_RELEVANCE_NAMED_PARAMETER);
+    expect(suggestions, hasLength(1));
+  }
+
   test_html() {
     testFile = '/project/web/test.html';
     addTestFile('''
@@ -140,10 +189,10 @@
     await getSuggestions();
     expect(replacementOffset, completionOffset - 3);
     expect(replacementLength, 3);
-    assertHasResult(CompletionSuggestionKind.KEYWORD, 'export',
-        relevance: DART_RELEVANCE_HIGH);
-    assertHasResult(CompletionSuggestionKind.KEYWORD, 'import',
-        relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'export \'\';',
+        selectionOffset: 8, relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'import \'\';',
+        selectionOffset: 8, relevance: DART_RELEVANCE_HIGH);
     assertNoResult('extends');
     assertNoResult('library');
   }
@@ -174,12 +223,12 @@
     expect(replacementLength, 1);
     assertHasResult(CompletionSuggestionKind.KEYWORD, 'library',
         relevance: DART_RELEVANCE_HIGH);
-    assertHasResult(CompletionSuggestionKind.KEYWORD, 'import',
-        relevance: DART_RELEVANCE_HIGH);
-    assertHasResult(CompletionSuggestionKind.KEYWORD, 'export',
-        relevance: DART_RELEVANCE_HIGH);
-    assertHasResult(CompletionSuggestionKind.KEYWORD, 'part',
-        relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'import \'\';',
+        selectionOffset: 8, relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'export \'\';',
+        selectionOffset: 8, relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'part \'\';',
+        selectionOffset: 6, relevance: DART_RELEVANCE_HIGH);
     assertNoResult('extends');
   }
 
@@ -211,47 +260,6 @@
     });
   }
 
-  test_invocation() {
-    addTestFile('class A {b() {}} main() {A a; a.^}');
-    return getSuggestions().then((_) {
-      expect(replacementOffset, equals(completionOffset));
-      expect(replacementLength, equals(0));
-      assertHasResult(CompletionSuggestionKind.INVOCATION, 'b');
-    });
-  }
-
-  test_invocation_sdk_relevancy_off() {
-    var originalSorter = DartCompletionManager.contributionSorter;
-    var mockSorter = new MockRelevancySorter();
-    DartCompletionManager.contributionSorter = mockSorter;
-    addTestFile('main() {Map m; m.^}');
-    return getSuggestions().then((_) {
-      // Assert that the CommonUsageComputer has been replaced
-      expect(suggestions.any((s) => s.relevance == DART_RELEVANCE_COMMON_USAGE),
-          isFalse);
-      DartCompletionManager.contributionSorter = originalSorter;
-      mockSorter.enabled = false;
-    });
-  }
-
-  test_invocation_sdk_relevancy_on() {
-    addTestFile('main() {Map m; m.^}');
-    return getSuggestions().then((_) {
-      // Assert that the CommonUsageComputer is working
-      expect(suggestions.any((s) => s.relevance == DART_RELEVANCE_COMMON_USAGE),
-          isTrue);
-    });
-  }
-
-  test_invocation_withTrailingStmt() {
-    addTestFile('class A {b() {}} main() {A a; a.^ int x = 7;}');
-    return getSuggestions().then((_) {
-      expect(replacementOffset, equals(completionOffset));
-      expect(replacementLength, equals(0));
-      assertHasResult(CompletionSuggestionKind.INVOCATION, 'b');
-    });
-  }
-
   test_inComment_block_beforeNode() async {
     addTestFile('''
   main(aaa, bbb) {
@@ -348,13 +356,54 @@
     });
   }
 
+  test_invocation() {
+    addTestFile('class A {b() {}} main() {A a; a.^}');
+    return getSuggestions().then((_) {
+      expect(replacementOffset, equals(completionOffset));
+      expect(replacementLength, equals(0));
+      assertHasResult(CompletionSuggestionKind.INVOCATION, 'b');
+    });
+  }
+
+  test_invocation_sdk_relevancy_off() {
+    var originalSorter = DartCompletionManager.contributionSorter;
+    var mockSorter = new MockRelevancySorter();
+    DartCompletionManager.contributionSorter = mockSorter;
+    addTestFile('main() {Map m; m.^}');
+    return getSuggestions().then((_) {
+      // Assert that the CommonUsageComputer has been replaced
+      expect(suggestions.any((s) => s.relevance == DART_RELEVANCE_COMMON_USAGE),
+          isFalse);
+      DartCompletionManager.contributionSorter = originalSorter;
+      mockSorter.enabled = false;
+    });
+  }
+
+  test_invocation_sdk_relevancy_on() {
+    addTestFile('main() {Map m; m.^}');
+    return getSuggestions().then((_) {
+      // Assert that the CommonUsageComputer is working
+      expect(suggestions.any((s) => s.relevance == DART_RELEVANCE_COMMON_USAGE),
+          isTrue);
+    });
+  }
+
+  test_invocation_withTrailingStmt() {
+    addTestFile('class A {b() {}} main() {A a; a.^ int x = 7;}');
+    return getSuggestions().then((_) {
+      expect(replacementOffset, equals(completionOffset));
+      expect(replacementLength, equals(0));
+      assertHasResult(CompletionSuggestionKind.INVOCATION, 'b');
+    });
+  }
+
   test_keyword() {
     addTestFile('library A; cl^');
     return getSuggestions().then((_) {
       expect(replacementOffset, equals(completionOffset - 2));
       expect(replacementLength, equals(2));
-      assertHasResult(CompletionSuggestionKind.KEYWORD, 'export',
-          relevance: DART_RELEVANCE_HIGH);
+      assertHasResult(CompletionSuggestionKind.KEYWORD, 'export \'\';',
+          selectionOffset: 8, relevance: DART_RELEVANCE_HIGH);
       assertHasResult(CompletionSuggestionKind.KEYWORD, 'class',
           relevance: DART_RELEVANCE_HIGH);
     });
@@ -512,6 +561,20 @@
       assertNoResult('HtmlElement');
     });
   }
+
+  test_import_uri_with_trailing() {
+    addFile('/project/bin/testA.dart', 'library libA;');
+    addTestFile('''
+      import '/project/bin/t^.dart';
+      main() {}''');
+    return getSuggestions().then((_) {
+      expect(replacementOffset, equals(completionOffset - 14));
+      expect(replacementLength, equals(5 + 14));
+      assertHasResult(
+          CompletionSuggestionKind.IMPORT, '/project/bin/testA.dart');
+      assertNoResult('test');
+    });
+  }
 }
 
 class MockRelevancySorter implements DartContributionSorter {
diff --git a/pkg/analysis_server/test/domain_completion_util.dart b/pkg/analysis_server/test/domain_completion_util.dart
index 7c4ed6c..6045aee 100644
--- a/pkg/analysis_server/test/domain_completion_util.dart
+++ b/pkg/analysis_server/test/domain_completion_util.dart
@@ -10,8 +10,7 @@
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/domain_completion.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
-import 'package:analysis_server/src/services/index/index.dart' show Index;
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
+import 'package:analysis_server/src/services/index/index.dart';
 import 'package:unittest/unittest.dart';
 
 import 'analysis_abstract.dart';
@@ -24,7 +23,7 @@
   int replacementLength;
   List<CompletionSuggestion> suggestions = [];
   bool suggestionsDone = false;
-  Map<String,List<CompletionSuggestion>> allSuggestions = {};
+  Map<String, List<CompletionSuggestion>> allSuggestions = {};
 
   String addTestFile(String content, {int offset}) {
     completionOffset = content.indexOf('^');
@@ -80,7 +79,7 @@
 
   @override
   Index createIndex() {
-    return createLocalMemoryIndex();
+    return createMemoryIndex();
   }
 
   Future getSuggestions() {
diff --git a/pkg/analysis_server/test/domain_diagnostic_test.dart b/pkg/analysis_server/test/domain_diagnostic_test.dart
index 277279a..d2288ae 100644
--- a/pkg/analysis_server/test/domain_diagnostic_test.dart
+++ b/pkg/analysis_server/test/domain_diagnostic_test.dart
@@ -53,7 +53,7 @@
         null,
         serverPlugin,
         new AnalysisServerOptions(),
-        () => new MockSdk(),
+        (_) => new MockSdk(),
         InstrumentationService.NULL_SERVICE);
     handler = new DiagnosticDomainHandler(server);
   });
@@ -73,7 +73,7 @@
 
       int fileCount = 1 /* test.dart */;
 
-      var json = response.toJson()[Response.RESULT];
+      Map json = response.toJson()[Response.RESULT];
       expect(json['contexts'], hasLength(1));
       var context = json['contexts'][0];
       expect(context['name'], '/project');
@@ -86,7 +86,7 @@
     test('getDiagnostics - (no root)', () async {
       var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
       var response = handler.handleRequest(request);
-      var json = response.toJson()[Response.RESULT];
+      Map json = response.toJson()[Response.RESULT];
       expect(json['contexts'], hasLength(0));
     });
   });
diff --git a/pkg/analysis_server/test/domain_execution_test.dart b/pkg/analysis_server/test/domain_execution_test.dart
index e6d1dfb..7824a1b 100644
--- a/pkg/analysis_server/test/domain_execution_test.dart
+++ b/pkg/analysis_server/test/domain_execution_test.dart
@@ -48,7 +48,7 @@
           null,
           serverPlugin,
           new AnalysisServerOptions(),
-          () => new MockSdk(),
+          (_) => new MockSdk(),
           InstrumentationService.NULL_SERVICE);
       handler = new ExecutionDomainHandler(server);
     });
diff --git a/pkg/analysis_server/test/domain_server_test.dart b/pkg/analysis_server/test/domain_server_test.dart
index 6dc24d1..5c3d75e 100644
--- a/pkg/analysis_server/test/domain_server_test.dart
+++ b/pkg/analysis_server/test/domain_server_test.dart
@@ -37,7 +37,7 @@
         null,
         serverPlugin,
         new AnalysisServerOptions(),
-        () => new MockSdk(),
+        (_) => new MockSdk(),
         InstrumentationService.NULL_SERVICE);
     handler = new ServerDomainHandler(server);
   });
diff --git a/pkg/analysis_server/test/edit/fixes_test.dart b/pkg/analysis_server/test/edit/fixes_test.dart
index fb2ee76..1b5cd87 100644
--- a/pkg/analysis_server/test/edit/fixes_test.dart
+++ b/pkg/analysis_server/test/edit/fixes_test.dart
@@ -7,14 +7,12 @@
 import 'dart:async';
 
 import 'package:analysis_server/plugin/protocol/protocol.dart';
-import 'package:analysis_server/src/domain_analysis.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
 import 'package:plugin/manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart' hide ERROR;
 
 import '../analysis_abstract.dart';
-import '../mocks.dart';
 import '../utils.dart';
 
 main() {
@@ -27,13 +25,13 @@
   @override
   void setUp() {
     super.setUp();
-    createProject();
     ExtensionManager manager = new ExtensionManager();
     manager.processPlugins([server.serverPlugin]);
     handler = new EditDomainHandler(server);
   }
 
   test_fixUndefinedClass() async {
+    createProject();
     addTestFile('''
 main() {
   Future<String> x = null;
@@ -52,6 +50,7 @@
   }
 
   test_hasFixes() async {
+    createProject();
     addTestFile('''
 foo() {
   print(1)
@@ -77,19 +76,13 @@
   }
 
   test_overlayOnlyFile() async {
-    // add an overlay-only file
-    {
-      testCode = '''
+    createProject();
+    testCode = '''
 main() {
-  print(1)
+print(1)
 }
 ''';
-      Request request = new AnalysisUpdateContentParams(
-          {testFile: new AddContentOverlay(testCode)}).toRequest('0');
-      Response response =
-          new AnalysisDomainHandler(server).handleRequest(request);
-      expect(response, isResponseSuccess('0'));
-    }
+    _addOverlay(testFile, testCode);
     // ask for fixes
     await waitForTasksFinished();
     List<AnalysisErrorFixes> errorFixes = await _getFixesAt('print(1)');
@@ -97,6 +90,40 @@
     _isSyntacticErrorWithSingleFix(errorFixes[0]);
   }
 
+  test_suggestImportFromDifferentAnalysisRoot() async {
+    // Set up two projects.
+    resourceProvider..newFolder("/project1")..newFolder("/project2");
+    handleSuccessfulRequest(
+        new AnalysisSetAnalysisRootsParams(["/project1", "/project2"], [])
+            .toRequest('0'),
+        handler: analysisHandler);
+
+    // Set up files.
+    testFile = "/project1/main.dart";
+    testCode = "main() { print(new Foo()); }";
+    _addOverlay(testFile, testCode);
+    // Add another file in the same project that imports the target file.
+    // This ensures it will be analyzed as an implicit Source.
+    _addOverlay("/project1/another.dart", 'import "../project2/target.dart";');
+    _addOverlay("/project2/target.dart", "class Foo() {}");
+
+    await waitForTasksFinished();
+
+    List<String> fixes = (await _getFixesAt('Foo()'))
+        .single
+        .fixes
+        .map((f) => f.message)
+        .toList();
+    expect(fixes, contains("Import library '../project2/target.dart'"));
+  }
+
+  void _addOverlay(String name, String contents) {
+    Request request =
+        new AnalysisUpdateContentParams({name: new AddContentOverlay(contents)})
+            .toRequest('0');
+    handleSuccessfulRequest(request, handler: analysisHandler);
+  }
+
   Future<List<AnalysisErrorFixes>> _getFixes(int offset) async {
     Request request = new EditGetFixesParams(testFile, offset).toRequest('0');
     Response response = await waitResponse(request);
diff --git a/pkg/analysis_server/test/edit/format_test.dart b/pkg/analysis_server/test/edit/format_test.dart
index e04ccf1..d864ef9 100644
--- a/pkg/analysis_server/test/edit/format_test.dart
+++ b/pkg/analysis_server/test/edit/format_test.dart
@@ -107,7 +107,7 @@
 
   Future test_format_withErrors() {
     addTestFile('''
-main() { int x = 
+main() { int x =
 ''');
     return waitForTasksFinished().then((_) {
       Request request = new EditFormatParams(testFile, 0, 3).toRequest('0');
@@ -119,8 +119,9 @@
   EditFormatResult _formatAt(int selectionOffset, int selectionLength,
       {int lineLength}) {
     Request request = new EditFormatParams(
-        testFile, selectionOffset, selectionLength,
-        lineLength: lineLength).toRequest('0');
+            testFile, selectionOffset, selectionLength,
+            lineLength: lineLength)
+        .toRequest('0');
     Response response = handleSuccessfulRequest(request);
     return new EditFormatResult.fromResponse(response);
   }
diff --git a/pkg/analysis_server/test/edit/refactoring_test.dart b/pkg/analysis_server/test/edit/refactoring_test.dart
index fcb0568..7c9223a 100644
--- a/pkg/analysis_server/test/edit/refactoring_test.dart
+++ b/pkg/analysis_server/test/edit/refactoring_test.dart
@@ -9,7 +9,6 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
 import 'package:plugin/manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart' hide ERROR;
@@ -119,11 +118,12 @@
 
   Future<Response> _sendConvertRequest(String search) {
     Request request = new EditGetRefactoringParams(
-        RefactoringKind.CONVERT_GETTER_TO_METHOD,
-        testFile,
-        findOffset(search),
-        0,
-        false).toRequest('0');
+            RefactoringKind.CONVERT_GETTER_TO_METHOD,
+            testFile,
+            findOffset(search),
+            0,
+            false)
+        .toRequest('0');
     return serverChannel.sendRequest(request);
   }
 }
@@ -232,11 +232,12 @@
 
   Future<Response> _sendConvertRequest(String search) {
     Request request = new EditGetRefactoringParams(
-        RefactoringKind.CONVERT_METHOD_TO_GETTER,
-        testFile,
-        findOffset(search),
-        0,
-        false).toRequest('0');
+            RefactoringKind.CONVERT_METHOD_TO_GETTER,
+            testFile,
+            findOffset(search),
+            0,
+            false)
+        .toRequest('0');
     return serverChannel.sendRequest(request);
   }
 }
@@ -652,11 +653,10 @@
 ''');
   }
 
-  Future<Response> _computeChange() {
-    return _prepareOptions().then((_) {
-      // send request with the options
-      return _sendExtractRequest();
-    });
+  Future<Response> _computeChange() async {
+    await _prepareOptions();
+    // send request with the options
+    return _sendExtractRequest();
   }
 
   Future<ExtractMethodFeedback> _computeInitialFeedback() {
@@ -729,7 +729,7 @@
 
   @override
   Index createIndex() {
-    return createLocalMemoryIndex();
+    return createMemoryIndex();
   }
 
   /**
@@ -737,8 +737,9 @@
    * [length].
    */
   Future getRefactorings(int offset, int length) async {
-    Request request = new EditGetAvailableRefactoringsParams(
-        testFile, offset, length).toRequest('0');
+    Request request =
+        new EditGetAvailableRefactoringsParams(testFile, offset, length)
+            .toRequest('0');
     serverChannel.sendRequest(request);
     var response = await serverChannel.waitForResponse(request);
     var result = new EditGetAvailableRefactoringsResult.fromResponse(response);
@@ -981,11 +982,12 @@
 
   Future<Response> _sendInlineRequest(String search) {
     Request request = new EditGetRefactoringParams(
-        RefactoringKind.INLINE_LOCAL_VARIABLE,
-        testFile,
-        findOffset(search),
-        0,
-        false).toRequest('0');
+            RefactoringKind.INLINE_LOCAL_VARIABLE,
+            testFile,
+            findOffset(search),
+            0,
+            false)
+        .toRequest('0');
     return serverChannel.sendRequest(request);
   }
 }
@@ -1108,8 +1110,13 @@
 
   Future<Response> _sendInlineRequest(String search) {
     Request request = new EditGetRefactoringParams(
-        RefactoringKind.INLINE_METHOD, testFile, findOffset(search), 0, false,
-        options: options).toRequest('0');
+            RefactoringKind.INLINE_METHOD,
+            testFile,
+            findOffset(search),
+            0,
+            false,
+            options: options)
+        .toRequest('0');
     return serverChannel.sendRequest(request);
   }
 }
@@ -1136,8 +1143,9 @@
 
   Future<Response> _sendMoveRequest() {
     Request request = new EditGetRefactoringParams(
-        RefactoringKind.MOVE_FILE, testFile, 0, 0, false,
-        options: options).toRequest('0');
+            RefactoringKind.MOVE_FILE, testFile, 0, 0, false,
+            options: options)
+        .toRequest('0');
     return serverChannel.sendRequest(request);
   }
 
@@ -1151,9 +1159,10 @@
   Future<Response> sendRenameRequest(String search, String newName,
       {String id: '0', bool validateOnly: false}) {
     RenameOptions options = newName != null ? new RenameOptions(newName) : null;
-    Request request = new EditGetRefactoringParams(
-        RefactoringKind.RENAME, testFile, findOffset(search), 0, validateOnly,
-        options: options).toRequest(id);
+    Request request = new EditGetRefactoringParams(RefactoringKind.RENAME,
+            testFile, findOffset(search), 0, validateOnly,
+            options: options)
+        .toRequest(id);
     return serverChannel.sendRequest(request);
   }
 
@@ -1853,24 +1862,23 @@
 
   @override
   Index createIndex() {
-    return createLocalMemoryIndex();
+    return createMemoryIndex();
   }
 
   Future<EditGetRefactoringResult> getRefactoringResult(
-      Future<Response> requestSender()) {
-    return waitForTasksFinished().then((_) {
-      return requestSender().then((Response response) {
-        return new EditGetRefactoringResult.fromResponse(response);
-      });
-    });
+      Future<Response> requestSender()) async {
+    await waitForTasksFinished();
+    Response response = await requestSender();
+    return new EditGetRefactoringResult.fromResponse(response);
   }
 
   Future<Response> sendRequest(
       RefactoringKind kind, int offset, int length, RefactoringOptions options,
       [bool validateOnly = false]) {
     Request request = new EditGetRefactoringParams(
-        kind, testFile, offset, length, validateOnly,
-        options: options).toRequest('0');
+            kind, testFile, offset, length, validateOnly,
+            options: options)
+        .toRequest('0');
     return serverChannel.sendRequest(request);
   }
 
diff --git a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
index 076ae9d..7ed2989 100644
--- a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
@@ -173,13 +173,14 @@
           isLocal: true,
           docRegexp: 'Documentation for func',
           parameterRegexps: ['.*']));
-      tests.add(checkHover('add(', 3, ['List', 'add'], 'method', null,
+      tests.add(checkHover(
+          'add(', 3, ['List', 'add'], 'method', ['dynamic', 'void'],
           isCore: true, docRegexp: '.*'));
       tests.add(checkHover(
           'localVar)', 8, ['num', 'localVar'], 'local variable', ['num'],
           isLocal: true, parameterRegexps: ['.*'], propagatedType: 'int'));
       tests.add(checkHover(
-          'func(35', 4, ['func', 'int', 'param'], 'function', null,
+          'func(35', 4, ['func', 'int', 'param'], 'function', ['int', 'void'],
           docRegexp: 'Documentation for func'));
       tests.add(checkHover('35', 2, null, null, ['int'],
           isLiteral: true, parameterRegexps: ['int', 'param']));
diff --git a/pkg/analysis_server/test/integration/analysis/update_content_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
index 6ea46cf..b451396 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
@@ -27,36 +27,44 @@
     String badText = goodText.replaceAll(';', '');
     writeFile(pathname, badText);
     standardAnalysisSetup();
-    return analysisFinished.then((_) {
-      // The contents on disk (badText) are missing a semicolon.
-      expect(currentAnalysisErrors[pathname], isNotEmpty);
-    })
+    return analysisFinished
+        .then((_) {
+          // The contents on disk (badText) are missing a semicolon.
+          expect(currentAnalysisErrors[pathname], isNotEmpty);
+        })
         .then((_) => sendAnalysisUpdateContent(
             {pathname: new AddContentOverlay(goodText)}))
         .then((result) => analysisFinished)
         .then((_) {
-      // There should be no errors now because the contents on disk have been
-      // overriden with goodText.
-      expect(currentAnalysisErrors[pathname], isEmpty);
-      return sendAnalysisUpdateContent({
-        pathname: new ChangeContentOverlay(
-            [new SourceEdit(goodText.indexOf(';'), 1, '')])
-      });
-    }).then((result) => analysisFinished).then((_) {
-      // There should be errors now because we've removed the semicolon.
-      expect(currentAnalysisErrors[pathname], isNotEmpty);
-      return sendAnalysisUpdateContent({
-        pathname: new ChangeContentOverlay(
-            [new SourceEdit(goodText.indexOf(';'), 0, ';')])
-      });
-    }).then((result) => analysisFinished).then((_) {
-      // There should be no errors now because we've added the semicolon back.
-      expect(currentAnalysisErrors[pathname], isEmpty);
-      return sendAnalysisUpdateContent({pathname: new RemoveContentOverlay()});
-    }).then((result) => analysisFinished).then((_) {
-      // Now there should be errors again, because the contents on disk are no
-      // longer overridden.
-      expect(currentAnalysisErrors[pathname], isNotEmpty);
-    });
+          // There should be no errors now because the contents on disk have been
+          // overriden with goodText.
+          expect(currentAnalysisErrors[pathname], isEmpty);
+          return sendAnalysisUpdateContent({
+            pathname: new ChangeContentOverlay(
+                [new SourceEdit(goodText.indexOf(';'), 1, '')])
+          });
+        })
+        .then((result) => analysisFinished)
+        .then((_) {
+          // There should be errors now because we've removed the semicolon.
+          expect(currentAnalysisErrors[pathname], isNotEmpty);
+          return sendAnalysisUpdateContent({
+            pathname: new ChangeContentOverlay(
+                [new SourceEdit(goodText.indexOf(';'), 0, ';')])
+          });
+        })
+        .then((result) => analysisFinished)
+        .then((_) {
+          // There should be no errors now because we've added the semicolon back.
+          expect(currentAnalysisErrors[pathname], isEmpty);
+          return sendAnalysisUpdateContent(
+              {pathname: new RemoveContentOverlay()});
+        })
+        .then((result) => analysisFinished)
+        .then((_) {
+          // Now there should be errors again, because the contents on disk are no
+          // longer overridden.
+          expect(currentAnalysisErrors[pathname], isNotEmpty);
+        });
   }
 }
diff --git a/pkg/analysis_server/test/integration/integration_tests.dart b/pkg/analysis_server/test/integration/integration_tests.dart
index 5361816..9b58405 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -404,7 +404,7 @@
    * the [Completer] objects which should be completed when acknowledgement is
    * received.
    */
-  final HashMap<String, Completer> _pendingCommands = <String, Completer>{};
+  final Map<String, Completer> _pendingCommands = <String, Completer>{};
 
   /**
    * Number which should be used to compute the 'id' to send in the next command
@@ -844,7 +844,8 @@
   @override
   Description describeMismatch(
       item, Description mismatchDescription, Map matchState, bool verbose) {
-    List<MismatchDescriber> mismatches = matchState['mismatches'];
+    List<MismatchDescriber> mismatches =
+        matchState['mismatches'] as List<MismatchDescriber>;
     if (mismatches != null) {
       for (int i = 0; i < mismatches.length; i++) {
         MismatchDescriber mismatch = mismatches[i];
diff --git a/pkg/analysis_server/test/integration/protocol_matchers.dart b/pkg/analysis_server/test/integration/protocol_matchers.dart
index 6266cb9..487d6a7 100644
--- a/pkg/analysis_server/test/integration/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/protocol_matchers.dart
@@ -1070,6 +1070,7 @@
  *   "location": Location
  *   "message": String
  *   "correction": optional String
+ *   "code": String
  *   "hasFix": optional bool
  * }
  */
@@ -1078,7 +1079,8 @@
     "severity": isAnalysisErrorSeverity,
     "type": isAnalysisErrorType,
     "location": isLocation,
-    "message": isString
+    "message": isString,
+    "code": isString
   }, optionalFields: {
     "correction": isString,
     "hasFix": isBool
diff --git a/pkg/analysis_server/test/mock_sdk.dart b/pkg/analysis_server/test/mock_sdk.dart
index c43ef63..335a9b3 100644
--- a/pkg/analysis_server/test/mock_sdk.dart
+++ b/pkg/analysis_server/test/mock_sdk.dart
@@ -211,15 +211,15 @@
   InternalAnalysisContext _analysisContext;
 
   MockSdk() {
-    LIBRARIES.forEach((_MockSdkLibrary library) {
-      provider.newFile(library.path, library.content);
+    LIBRARIES.forEach((SdkLibrary library) {
+      provider.newFile(library.path, (library as _MockSdkLibrary).content);
     });
   }
 
   @override
   AnalysisContext get context {
     if (_analysisContext == null) {
-      _analysisContext = new SdkAnalysisContext();
+      _analysisContext = new SdkAnalysisContext(null);
       SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
       _analysisContext.sourceFactory = factory;
     }
diff --git a/pkg/analysis_server/test/plugin/protocol_dart_test.dart b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
index 2d0eddd..8920e92 100644
--- a/pkg/analysis_server/test/plugin/protocol_dart_test.dart
+++ b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
@@ -6,10 +6,12 @@
 
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/plugin/protocol/protocol_dart.dart';
+import 'package:analyzer/dart/ast/ast.dart' as engine;
+import 'package:analyzer/dart/ast/visitor.dart' as engine;
 import 'package:analyzer/dart/element/element.dart' as engine;
 import 'package:analyzer/dart/element/type.dart' as engine;
+import 'package:analyzer/src/dart/ast/utilities.dart' as engine;
 import 'package:analyzer/src/dart/element/element.dart' as engine;
-import 'package:analyzer/src/generated/ast.dart' as engine;
 import 'package:analyzer/src/generated/error.dart' as engine;
 import 'package:analyzer/src/generated/source.dart' as engine;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/plugin/set_analysis_domain_test.dart b/pkg/analysis_server/test/plugin/set_analysis_domain_test.dart
index a92c943..36e1522 100644
--- a/pkg/analysis_server/test/plugin/set_analysis_domain_test.dart
+++ b/pkg/analysis_server/test/plugin/set_analysis_domain_test.dart
@@ -149,7 +149,7 @@
   }
 
   void _setAnalysisDomain(AnalysisDomain domain) {
-    domain.onResultComputed(PARSED_UNIT).listen((result) {
+    domain.onResultChanged(PARSED_UNIT).listen((result) {
       expect(result.context, isNotNull);
       expect(result.target, isNotNull);
       expect(result.value, isNotNull);
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index 24d03a3..4a667bb 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -9,9 +9,9 @@
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart' as engine;
 import 'package:analyzer/dart/element/element.dart' as engine;
 import 'package:analyzer/dart/element/type.dart' as engine;
-import 'package:analyzer/src/generated/ast.dart' as engine;
 import 'package:analyzer/src/generated/error.dart' as engine;
 import 'package:analyzer/src/generated/source.dart' as engine;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -69,6 +69,7 @@
       },
       MESSAGE: 'my message',
       CORRECTION: 'my correction',
+      CODE: 'ambiguous_export',
       HAS_FIX: false
     });
   }
@@ -87,6 +88,7 @@
         START_COLUMN: 2
       },
       MESSAGE: 'my message',
+      CODE: 'ambiguous_export',
       HAS_FIX: false
     });
   }
@@ -105,6 +107,7 @@
         START_COLUMN: -1
       },
       MESSAGE: 'my message',
+      CODE: 'ambiguous_export',
       HAS_FIX: false
     });
   }
@@ -170,7 +173,8 @@
         return;
       }
       String enumName = MirrorSystem.getName(symbol);
-      EngineEnum engineValue = engineClass.getField(symbol).reflectee;
+      EngineEnum engineValue =
+          engineClass.getField(symbol).reflectee as EngineEnum;
       expect(engineValue, new isInstanceOf<EngineEnum>());
       if (exceptions.containsKey(engineValue)) {
         ApiEnum expectedResult = exceptions[engineValue];
diff --git a/pkg/analysis_server/test/protocol_test.dart b/pkg/analysis_server/test/protocol_test.dart
index 93dde63..6428c62 100644
--- a/pkg/analysis_server/test/protocol_test.dart
+++ b/pkg/analysis_server/test/protocol_test.dart
@@ -266,7 +266,8 @@
     Response original = new Response('myId', result: {'foo': 'bar'});
     Response response = new Response.fromJson(original.toJson());
     expect(response.id, equals('myId'));
-    Map<String, Object> result = response.toJson()['result'];
+    Map<String, Object> result =
+        response.toJson()['result'] as Map<String, Object>;
     expect(result.length, equals(1));
     expect(result['foo'], equals('bar'));
   }
diff --git a/pkg/analysis_server/test/search/abstract_search_domain.dart b/pkg/analysis_server/test/search/abstract_search_domain.dart
index e88af42..9851d92 100644
--- a/pkg/analysis_server/test/search/abstract_search_domain.dart
+++ b/pkg/analysis_server/test/search/abstract_search_domain.dart
@@ -9,8 +9,8 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/search/search_domain.dart';
-import 'package:analysis_server/src/services/index/index.dart' show Index;
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
+import 'package:analysis_server/src/services/index/index.dart'
+    show Index, createMemoryIndex;
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
@@ -39,7 +39,7 @@
 
   @override
   Index createIndex() {
-    return createLocalMemoryIndex();
+    return createMemoryIndex();
   }
 
   void findResult(SearchResultKind kind, String file, int offset, int length,
@@ -94,8 +94,8 @@
   @override
   void setUp() {
     super.setUp();
-    server.handlers = [new SearchDomainHandler(server),];
     createProject();
+    server.handlers = [new SearchDomainHandler(server),];
   }
 
   Future waitForSearchResults() {
diff --git a/pkg/analysis_server/test/search/element_references_test.dart b/pkg/analysis_server/test/search/element_references_test.dart
index 0ef1ccf..809a962 100644
--- a/pkg/analysis_server/test/search/element_references_test.dart
+++ b/pkg/analysis_server/test/search/element_references_test.dart
@@ -33,7 +33,8 @@
     int offset = findOffset(search);
     await waitForTasksFinished();
     Request request = new SearchFindElementReferencesParams(
-        testFile, offset, includePotential).toRequest('0');
+            testFile, offset, includePotential)
+        .toRequest('0');
     Response response = await waitResponse(request);
     var result = new SearchFindElementReferencesResult.fromResponse(response);
     searchId = result.id;
@@ -222,178 +223,6 @@
     assertHasResult(SearchResultKind.READ, 'fff); // in m()');
   }
 
-  test_file_libraryUnit_atImportDirective() async {
-    String fileLib = '$testFolder/my_lib.dart';
-    String fileUser = '$testFolder/userA.dart';
-    String codeUser = "import 'my_lib.dart'; // U";
-    addFile(fileLib, 'library my.lib;');
-    addFile(fileUser, codeUser);
-    addTestFile('''
-import 'my_lib.dart'; // T
-''');
-    await findElementReferences('import ', false);
-    expect(searchElement.kind, ElementKind.FILE);
-    expect(results, hasLength(2));
-    // in U
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == fileUser;
-      });
-      expect(result.location.offset, codeUser.indexOf("'my_lib.dart'; // U"));
-      expect(result.location.length, "'my_lib.dart'".length);
-    }
-    // in T
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == testFile;
-      });
-      expect(result.location.offset, testCode.indexOf("'my_lib.dart'; // T"));
-      expect(result.location.length, "'my_lib.dart'".length);
-    }
-  }
-
-  test_file_libraryUnit_atImportDirectiveUri() async {
-    String fileLib = '$testFolder/my_lib.dart';
-    String fileA = '$testFolder/userA.dart';
-    String fileB = '$testFolder/userB.dart';
-    String codeA = "import 'my_lib.dart'; // A";
-    String codeB = "export 'my_lib.dart'; // B";
-    addFile(fileLib, 'library my.lib;');
-    addFile(fileA, codeA);
-    addFile(fileB, codeB);
-    addTestFile('''
-import 'my_lib.dart'; // T
-''');
-    await findElementReferences('my_', false);
-    expect(searchElement.kind, ElementKind.FILE);
-    expect(results, hasLength(3));
-    // in A
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == fileA;
-      });
-      expect(result.location.offset, codeA.indexOf("'my_lib.dart'; // A"));
-      expect(result.location.length, "'my_lib.dart'".length);
-    }
-    // in B
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == fileB;
-      });
-      expect(result.location.offset, codeB.indexOf("'my_lib.dart'; // B"));
-      expect(result.location.length, "'my_lib.dart'".length);
-    }
-    // in T
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == testFile;
-      });
-      expect(result.location.offset, testCode.indexOf("'my_lib.dart'; // T"));
-      expect(result.location.length, "'my_lib.dart'".length);
-    }
-  }
-
-  test_file_libraryUnit_atLibraryDirectiveIdentifier() async {
-    String fileA = '$testFolder/userA.dart';
-    String fileB = '$testFolder/userB.dart';
-    String codeA = "import 'test.dart'; // A";
-    String codeB = "export 'test.dart'; // B";
-    addFile(fileA, codeA);
-    addFile(fileB, codeB);
-    addTestFile('''
-library my.test.lib;
-''');
-    await findElementReferences('test.', false);
-    expect(searchElement.kind, ElementKind.LIBRARY);
-    expect(results, hasLength(2));
-    // in A
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == fileA;
-      });
-      expect(result.location.offset, codeA.indexOf("'test.dart'; // A"));
-      expect(result.location.length, "'test.dart'".length);
-    }
-    // in B
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == fileB;
-      });
-      expect(result.location.offset, codeB.indexOf("'test.dart'; // B"));
-      expect(result.location.length, "'test.dart'".length);
-    }
-  }
-
-  test_file_partUnit_atPartDirective() async {
-    String filePart = '$testFolder/my_part.dart';
-    String fileOther = '$testFolder/userOther.dart';
-    String codeOther = '''
-library lib;
-part 'my_part.dart'; // O
-''';
-    addFile(filePart, 'part of lib;');
-    addFile(fileOther, codeOther);
-    addTestFile('''
-library lib;
-part 'my_part.dart'; // T
-''');
-    await findElementReferences('part ', false);
-    expect(searchElement.kind, ElementKind.FILE);
-    expect(searchElement.name, filePart);
-    expect(results, hasLength(2));
-    // in O
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == fileOther;
-      });
-      expect(result.location.offset, codeOther.indexOf("'my_part.dart'; // O"));
-      expect(result.location.length, "'my_part.dart'".length);
-    }
-    // in T
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == testFile;
-      });
-      expect(result.location.offset, testCode.indexOf("'my_part.dart'; // T"));
-      expect(result.location.length, "'my_part.dart'".length);
-    }
-  }
-
-  test_file_partUnit_atPartDirectiveUri() async {
-    String filePart = '$testFolder/my_part.dart';
-    String fileOther = '$testFolder/userOther.dart';
-    String codeOther = '''
-library lib;
-part 'my_part.dart'; // O
-''';
-    addFile(filePart, 'part of lib;');
-    addFile(fileOther, codeOther);
-    addTestFile('''
-library lib;
-part 'my_part.dart'; // T
-''');
-    await findElementReferences('my_', false);
-    expect(searchElement.kind, ElementKind.FILE);
-    expect(searchElement.name, filePart);
-    expect(results, hasLength(2));
-    // in O
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == fileOther;
-      });
-      expect(result.location.offset, codeOther.indexOf("'my_part.dart'; // O"));
-      expect(result.location.length, "'my_part.dart'".length);
-    }
-    // in T
-    {
-      SearchResult result = results.singleWhere((result) {
-        return result.location.file == testFile;
-      });
-      expect(result.location.offset, testCode.indexOf("'my_part.dart'; // T"));
-      expect(result.location.length, "'my_part.dart'".length);
-    }
-  }
-
   test_function() async {
     addTestFile('''
 fff(p) {}
diff --git a/pkg/analysis_server/test/search/member_references_test.dart b/pkg/analysis_server/test/search/member_references_test.dart
index ba65bcc..23ea1c7 100644
--- a/pkg/analysis_server/test/search/member_references_test.dart
+++ b/pkg/analysis_server/test/search/member_references_test.dart
@@ -55,10 +55,10 @@
 }
 ''');
     await findMemberReferences('foo');
-    assertHasRef(SearchResultKind.WRITE, 'foo = 1;', false);
-    assertHasRef(SearchResultKind.WRITE, 'foo = 2;', false);
-    assertHasRef(SearchResultKind.READ, 'foo); // resolved A', false);
-    assertHasRef(SearchResultKind.READ, 'foo); // resolved B', false);
+    assertNoResult(SearchResultKind.WRITE, 'foo = 1;');
+    assertNoResult(SearchResultKind.WRITE, 'foo = 2;');
+    assertNoResult(SearchResultKind.READ, 'foo); // resolved A');
+    assertNoResult(SearchResultKind.READ, 'foo); // resolved B');
     assertHasRef(SearchResultKind.WRITE, 'foo = 10;', true);
     assertHasRef(SearchResultKind.WRITE, 'foo = 20;', true);
     assertHasRef(SearchResultKind.READ, 'foo); // unresolved A', true);
@@ -83,8 +83,8 @@
 }
 ''');
     await findMemberReferences('foo');
-    assertHasRef(SearchResultKind.READ, 'foo); // resolved A', false);
-    assertHasRef(SearchResultKind.READ, 'foo); // resolved B', false);
+    assertNoResult(SearchResultKind.READ, 'foo); // resolved A');
+    assertNoResult(SearchResultKind.READ, 'foo); // resolved B');
     assertHasRef(SearchResultKind.READ, 'foo); // unresolved A', true);
     assertHasRef(SearchResultKind.READ, 'foo); // unresolved B', true);
   }
@@ -107,8 +107,8 @@
 }
 ''');
     await findMemberReferences('foo');
-    assertHasRef(SearchResultKind.INVOCATION, 'foo(1)', false);
-    assertHasRef(SearchResultKind.INVOCATION, 'foo(2)', false);
+    assertNoResult(SearchResultKind.INVOCATION, 'foo(1)');
+    assertNoResult(SearchResultKind.INVOCATION, 'foo(2)');
     assertHasRef(SearchResultKind.INVOCATION, 'foo(10)', true);
     assertHasRef(SearchResultKind.INVOCATION, 'foo(20)', true);
   }
diff --git a/pkg/analysis_server/test/search/type_hierarchy_test.dart b/pkg/analysis_server/test/search/type_hierarchy_test.dart
index c8b62dd..6f9c273 100644
--- a/pkg/analysis_server/test/search/type_hierarchy_test.dart
+++ b/pkg/analysis_server/test/search/type_hierarchy_test.dart
@@ -9,7 +9,6 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/search/search_domain.dart';
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
@@ -27,14 +26,14 @@
 
   @override
   Index createIndex() {
-    return createLocalMemoryIndex();
+    return createMemoryIndex();
   }
 
   @override
   void setUp() {
     super.setUp();
-    server.handlers = [new SearchDomainHandler(server),];
     createProject();
+    server.handlers = [new SearchDomainHandler(server),];
   }
 
   test_bad_function() async {
diff --git a/pkg/analysis_server/test/services/completion/completion_target_test.dart b/pkg/analysis_server/test/services/completion/completion_target_test.dart
index 169874b..569610c 100644
--- a/pkg/analysis_server/test/services/completion/completion_target_test.dart
+++ b/pkg/analysis_server/test/services/completion/completion_target_test.dart
@@ -5,7 +5,7 @@
 library test.services.completion.target;
 
 import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
@@ -201,7 +201,7 @@
   test_FunctionDeclaration_inLineComment4() {
     // Comment  CompilationUnit
     addTestSource('''
-      // normal comment 
+      // normal comment
       // normal comment 2^
       zoo(z) { } String name;''');
     assertTarget('// normal comment 2', 'zoo(z) {} String name;');
@@ -386,7 +386,7 @@
     // Comment  ClassDeclaration  CompilationUnit
     addTestSource('''
       class C2 {
-        // normal comment 
+        // normal comment
         // normal comment 2^
         zoo(z) { } String name; }''');
     assertTarget('// normal comment 2', 'class C2 {zoo(z) {} String name;}');
diff --git a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
index 0a14ef1..db17859 100644
--- a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
@@ -77,12 +77,29 @@
   }
 
   /**
+   * Assert that the specified named argument suggestions with their types are
+   * the only suggestions.
+   */
+  void assertSuggestArgumentsAndTypes(
+      {Map<String, String> namedArgumentsWithTypes}) {
+    List<CompletionSuggestion> expected = new List<CompletionSuggestion>();
+    namedArgumentsWithTypes.forEach((String name, String type) {
+      expected.add(assertSuggest('$name: ',
+          csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
+          relevance: DART_RELEVANCE_NAMED_PARAMETER,
+          paramName: name,
+          paramType: type));
+    });
+    assertNoOtherSuggestions(expected);
+  }
+
+  /**
    * Assert that the specified suggestions are the only suggestions.
    */
-  void assertSuggestArguments({List<String> namedArguments}) {
+  void assertSuggestions(List<String> suggestions) {
     List<CompletionSuggestion> expected = new List<CompletionSuggestion>();
-    for (String name in namedArguments) {
-      expected.add(assertSuggest('$name: ',
+    for (String suggestion in suggestions) {
+      expected.add(assertSuggest('$suggestion',
           csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
           relevance: DART_RELEVANCE_NAMED_PARAMETER));
     }
@@ -94,22 +111,113 @@
     return new ArgListContributor();
   }
 
-  test_Annotation_local_constructor_named_param() async {
+  fail_test_Annotation_local_constructor_named_param_10() async {
     addTestSource('''
-class A { A({int one, String two: 'defaultValue'}) { } }
-@A(^) main() { }''');
+class A { const A({int one, String two: 'defaultValue'}); }
+@A(two: '2' ^) main() { }''');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['one', 'two']);
+    assertSuggestions([', one: ']);
+  }
+
+  fail_test_Annotation_local_constructor_named_param_9() async {
+    addTestSource('''
+class A { const A({int one, String two: 'defaultValue'}); }
+@A(two: '2'^) main() { }''');
+    await computeSuggestions();
+    assertSuggestions([', one: ']);
   }
 
   test_Annotation_imported_constructor_named_param() async {
     addSource(
         '/libA.dart',
         '''
-library libA; class A { A({int one, String two: 'defaultValue'}) { } }''');
+library libA; class A { const A({int one, String two: 'defaultValue'}); }''');
     addTestSource('import "/libA.dart"; @A(^) main() { }');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['one', 'two']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'one': 'int', 'two': 'String'});
+  }
+
+  test_Annotation_local_constructor_named_param() async {
+    addTestSource('''
+class A { const A({int one, String two: 'defaultValue'}); }
+@A(^) main() { }''');
+    await computeSuggestions();
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'one': 'int', 'two': 'String'});
+  }
+
+  test_Annotation_local_constructor_named_param_11() async {
+    addTestSource('''
+class A { const A({int one, String two: 'defaultValue'}); }
+@A(two: '2', ^) main() { }''');
+    await computeSuggestions();
+    assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
+  }
+
+  test_Annotation_local_constructor_named_param_2() async {
+    addTestSource('''
+class A { const A({int one, String two: 'defaultValue'}); }
+@A(^ two: '2') main() { }''');
+    await computeSuggestions();
+    assertSuggestions(['one: ,']);
+  }
+
+  test_Annotation_local_constructor_named_param_3() async {
+    addTestSource('''
+class A { const A({int one, String two: 'defaultValue'}); }
+@A(^two: '2') main() { }''');
+    await computeSuggestions();
+    assertSuggestions(['one: ,']);
+  }
+
+  test_Annotation_local_constructor_named_param_4() async {
+    addTestSource('''
+class A { const A({int one, String two: 'defaultValue'}); }
+@A(^, two: '2') main() { }''');
+    await computeSuggestions();
+    assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
+  }
+
+  test_Annotation_local_constructor_named_param_5() async {
+    addTestSource('''
+class A { const A({int one, String two: 'defaultValue'}); }
+@A(^ , two: '2') main() { }''');
+    await computeSuggestions();
+    assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
+  }
+
+  test_Annotation_local_constructor_named_param_6() async {
+    addTestSource('''
+class A { const A(int zero, {int one, String two: 'defaultValue'}); }
+@A(0, ^, two: '2') main() { }''');
+    await computeSuggestions();
+    assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
+  }
+
+  test_Annotation_local_constructor_named_param_7() async {
+    addTestSource('''
+class A { const A(int zero, {int one, String two: 'defaultValue'}); }
+@A(0, ^ two: '2') main() { }''');
+    await computeSuggestions();
+    assertSuggestions(['one: ,']);
+  }
+
+  test_Annotation_local_constructor_named_param_8() async {
+    addTestSource('''
+class A { const A(int zero, {int one, String two: 'defaultValue'}); }
+@A(0, ^two: '2') main() { }''');
+    await computeSuggestions();
+    assertSuggestions(['one: ,']);
+  }
+
+  test_Annotation_local_constructor_named_param_negative() async {
+    addTestSource('''
+class A { const A(int one, int two, int three, {int four, String five:
+  'defaultValue'}); }
+@A(1, ^, 3) main() { }''');
+    await computeSuggestions();
+    assertNoSuggestions();
   }
 
   test_ArgumentList_getter() async {
@@ -120,18 +228,28 @@
 
   test_ArgumentList_imported_constructor_named_param() async {
     //
-    addSource('/libA.dart', 'library libA; class A{A({int one}){}}');
+    addSource('/libA.dart', 'library libA; class A{A({int one}); }');
     addTestSource('import "/libA.dart"; main() { new A(^);}');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['one']);
+    assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
   }
 
   test_ArgumentList_imported_constructor_named_param2() async {
     //
-    addSource('/libA.dart', 'library libA; class A{A.foo({int one}){}}');
+    addSource('/libA.dart', 'library libA; class A{A.foo({int one}); }');
     addTestSource('import "/libA.dart"; main() { new A.foo(^);}');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['one']);
+    assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
+  }
+
+  test_ArgumentList_imported_constructor_named_typed_param() async {
+    //
+    addSource(
+        '/libA.dart', 'library libA; class A { A({int i, String s, d}) {} }}');
+    addTestSource('import "/libA.dart"; main() { var a = new A(^);}');
+    await computeSuggestions();
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'i': 'int', 's': 'String', 'd': 'dynamic'});
   }
 
   test_ArgumentList_imported_function_0() async {
@@ -282,21 +400,24 @@
     //
     addTestSource('main() { int.parse("16", ^);}');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['radix', 'onError']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'});
   }
 
   test_ArgumentList_imported_function_named_param1() async {
     //
     addTestSource('main() { int.parse("16", r^);}');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['radix', 'onError']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'});
   }
 
   test_ArgumentList_imported_function_named_param2() async {
     //
     addTestSource('main() { int.parse("16", radix: 7, ^);}');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['onError']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'onError': '(String) → int'});
   }
 
   test_ArgumentList_imported_function_named_param2a() async {
@@ -310,21 +431,23 @@
     //
     addTestSource('main() { int.parse("16", r^: 16);}');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['radix', 'onError']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'});
   }
 
   test_ArgumentList_imported_function_named_param_label2() async {
     //
     addTestSource('main() { int.parse("16", ^r: 16);}');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['radix', 'onError']);
+    assertSuggestions(['radix: ,', 'onError: ,']);
   }
 
   test_ArgumentList_imported_function_named_param_label3() async {
     //
     addTestSource('main() { int.parse("16", ^: 16);}');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['radix', 'onError']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'});
   }
 
   test_ArgumentList_local_constructor_named_param() async {
@@ -333,7 +456,8 @@
 class A { A({int one, String two: 'defaultValue'}) { } }
 main() { new A(^);}''');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['one', 'two']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'one': 'int', 'two': 'String'});
   }
 
   test_ArgumentList_local_constructor_named_param2() async {
@@ -342,7 +466,8 @@
 class A { A.foo({int one, String two: 'defaultValue'}) { } }
 main() { new A.foo(^);}''');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['one', 'two']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'one': 'int', 'two': 'String'});
   }
 
   test_ArgumentList_local_function_1() async {
@@ -435,7 +560,8 @@
 f(v,{int radix, int onError(String s)}){}
 main() { f("16", ^);}''');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['radix', 'onError']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'});
   }
 
   test_ArgumentList_local_function_named_param1() async {
@@ -444,7 +570,8 @@
 f(v,{int radix, int onError(String s)}){}
 main() { f("16", r^);}''');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['radix', 'onError']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'});
   }
 
   test_ArgumentList_local_function_named_param2() async {
@@ -453,7 +580,8 @@
 f(v,{int radix, int onError(String s)}){}
 main() { f("16", radix: 7, ^);}''');
     await computeSuggestions();
-    assertSuggestArguments(namedArguments: ['onError']);
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'onError': '(String) → int'});
   }
 
   test_ArgumentList_local_function_named_param2a() async {
diff --git a/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
index 921525b..90856f7 100644
--- a/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
@@ -7,11 +7,11 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/combinator_contributor.dart';
+import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../utils.dart';
 import 'completion_contributor_util.dart';
-import 'package:analyzer/src/generated/source.dart';
 
 main() {
   initializeTestEnvironment();
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 8ecfc8f..72a57c7 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
@@ -13,17 +13,16 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/completion_core.dart';
+import 'package:analysis_server/src/services/completion/completion_performance.dart';
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart'
     show DartCompletionRequestImpl, ReplacementRange;
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
 import 'package:analysis_server/src/services/search/search_engine_internal.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/task/dart.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../../abstract_context.dart';
-import 'package:analysis_server/src/services/completion/completion_performance.dart';
 
 int suggestionComparator(CompletionSuggestion s1, CompletionSuggestion s2) {
   String c1 = s1.completion.toLowerCase();
@@ -111,7 +110,9 @@
       bool isDeprecated: false,
       bool isPotential: false,
       String elemFile,
-      int elemOffset}) {
+      int elemOffset,
+      String paramName,
+      String paramType}) {
     CompletionSuggestion cs =
         getSuggest(completion: completion, csKind: csKind, elemKind: elemKind);
     if (cs == null) {
@@ -142,6 +143,12 @@
     if (elemOffset != null) {
       expect(cs.element.location.offset, elemOffset);
     }
+    if(paramName != null) {
+      expect(cs.parameterName, paramName);
+    }
+    if(paramType != null) {
+      expect(cs.parameterType, paramType);
+    }
     return cs;
   }
 
@@ -520,9 +527,13 @@
     return cs;
   }
 
-  Future performAnalysis(int times, Completer completer) {
-    if (completer.isCompleted) return completer.future;
-    if (times == 0 || context == null) return new Future.value();
+  Future/*<E>*/ performAnalysis/*<E>*/(int times, Completer/*<E>*/ completer) {
+    if (completer.isCompleted) {
+      return completer.future;
+    }
+    if (times == 0 || context == null) {
+      return new Future.value();
+    }
     context.performAnalysisTask();
     // We use a delayed future to allow microtask events to finish. The
     // Future.value or Future() constructors use scheduleMicrotask themselves and
@@ -541,7 +552,7 @@
   @override
   void setUp() {
     super.setUp();
-    index = createLocalMemoryIndex();
+    index = createMemoryIndex();
     searchEngine = new SearchEngineImpl(index);
     contributor = createContributor();
   }
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
index fa43aa1..3505da6 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
@@ -12,14 +12,13 @@
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
 import 'package:analysis_server/src/services/completion/dart/imported_reference_contributor.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/task/dart.dart';
 import 'package:analyzer/src/task/dart.dart';
+import 'package:analyzer/task/dart.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../../utils.dart';
 import 'completion_contributor_util.dart';
-import 'package:analyzer/src/generated/source.dart';
 
 main() {
   initializeTestEnvironment();
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 00d80df..6b63ce0 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
@@ -9,7 +9,7 @@
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/imported_reference_contributor.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -45,536 +45,6 @@
     assertNotSuggested('two');
   }
 
-  test_doc_class() async {
-    addSource(
-        '/libA.dart',
-        r'''
-library A;
-/// My class.
-/// Short description.
-///
-/// Longer description.
-class A {}
-''');
-    addTestSource('import "/libA.dart"; main() {^}');
-
-    await computeSuggestions();
-
-    CompletionSuggestion suggestion = assertSuggestClass('A');
-    expect(suggestion.docSummary, 'My class.\nShort description.');
-    expect(suggestion.docComplete,
-        'My class.\nShort description.\n\nLonger description.');
-  }
-
-  test_doc_function() async {
-    resolveSource(
-        '/libA.dart',
-        r'''
-library A;
-/// My function.
-/// Short description.
-///
-/// Longer description.
-int myFunc() {}
-''');
-    addTestSource('import "/libA.dart"; main() {^}');
-
-    await computeSuggestions();
-
-    CompletionSuggestion suggestion = assertSuggestFunction('myFunc', 'int');
-    expect(suggestion.docSummary, 'My function.\nShort description.');
-    expect(suggestion.docComplete,
-        'My function.\nShort description.\n\nLonger description.');
-  }
-
-  test_doc_function_c_style() async {
-    resolveSource(
-        '/libA.dart',
-        r'''
-library A;
-/**
- * My function.
- * Short description.
- *
- * Longer description.
- */
-int myFunc() {}
-''');
-    addTestSource('import "/libA.dart"; main() {^}');
-
-    await computeSuggestions();
-
-    CompletionSuggestion suggestion = assertSuggestFunction('myFunc', 'int');
-    expect(suggestion.docSummary, 'My function.\nShort description.');
-    expect(suggestion.docComplete,
-        'My function.\nShort description.\n\nLonger description.');
-  }
-  
-  test_enum() async {
-    addSource('/libA.dart', 'library A; enum E { one, two }');
-    addTestSource('import "/libA.dart"; main() {^}');
-    await computeSuggestions();
-    assertSuggestEnum('E');
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-  }
-
-  test_function_parameters_mixed_required_and_named() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-int m(x, {int y}) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'int');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_function_parameters_mixed_required_and_positional() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m(x, [int y]) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_function_parameters_named() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m({x, int y}) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_function_parameters_none() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m() {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, isEmpty);
-    expect(suggestion.parameterTypes, isEmpty);
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_function_parameters_positional() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m([x, int y]) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_function_parameters_required() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m(x, int y) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 2);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_InstanceCreationExpression() async {
-    resolveSource(
-        '/testA.dart',
-        '''
-class A {foo(){var f; {var x;}}}
-class B {B(this.x, [String boo]) { } int x;}
-class C {C.bar({boo: 'hoo', int z: 0}) { } }''');
-    addTestSource('''
-import "/testA.dart";
-import "dart:math" as math;
-main() {new ^ String x = "hello";}''');
-
-    await computeSuggestions();
-    CompletionSuggestion suggestion;
-
-    suggestion = assertSuggestConstructor('Object');
-    expect(suggestion.element.parameters, '()');
-    expect(suggestion.parameterNames, hasLength(0));
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-
-    suggestion = assertSuggestConstructor('A');
-    expect(suggestion.element.parameters, '()');
-    expect(suggestion.parameterNames, hasLength(0));
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-
-    suggestion = assertSuggestConstructor('B');
-    expect(suggestion.element.parameters, '(int x, [String boo])');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'int');
-    expect(suggestion.parameterNames[1], 'boo');
-    expect(suggestion.parameterTypes[1], 'String');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, false);
-
-    suggestion = assertSuggestConstructor('C.bar');
-    expect(suggestion.element.parameters, "({dynamic boo: 'hoo', int z: 0})");
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'boo');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'z');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, true);
-
-    // Suggested by LibraryPrefixContributor
-    assertNotSuggested('math');
-  }
-
-  test_internal_sdk_libs() async {
-    addTestSource('main() {p^}');
-
-    await computeSuggestions();
-    assertSuggest('print');
-    // Not imported, so not suggested
-    assertNotSuggested('pow');
-    // Do not suggest completions from internal SDK library
-    assertNotSuggested('printToConsole');
-  }
-
-  test_method_parameters_mixed_required_and_named() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m(x, {int y}) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_method_parameters_mixed_required_and_positional() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m(x, [int y]) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_method_parameters_named() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m({x, int y}) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_method_parameters_none() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m() {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, isEmpty);
-    expect(suggestion.parameterTypes, isEmpty);
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_method_parameters_positional() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m([x, int y]) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_method_parameters_required() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-void m(x, int y) {}
-''');
-    addTestSource('''
-import '/libA.dart';
-class B {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 2);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_mixin_ordering() async {
-    addSource(
-        '/libA.dart',
-        '''
-class B {}
-class M1 {
-  void m() {}
-}
-class M2 {
-  void m() {}
-}
-''');
-    addTestSource('''
-import '/libA.dart';
-class C extends B with M1, M2 {
-  void f() {
-    ^
-  }
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  /**
-   * Ensure that completions in one context don't appear in another
-   */
-  test_multiple_contexts() async {
-    // Create a 2nd context with source
-    var context2 = AnalysisEngine.instance.createAnalysisContext();
-    context2.sourceFactory =
-        new SourceFactory([AbstractContextTest.SDK_RESOLVER, resourceResolver]);
-    String content2 = 'class ClassFromAnotherContext { }';
-    Source source2 =
-        provider.newFile('/context2/foo.dart', content2).createSource();
-    ChangeSet changeSet = new ChangeSet();
-    changeSet.addedSource(source2);
-    context2.applyChanges(changeSet);
-    context2.setContents(source2, content2);
-
-    // Resolve the source in the 2nd context and update the index
-    var result = context2.performAnalysisTask();
-    while (result.hasMoreWork) {
-      result.changeNotices.forEach((ChangeNotice notice) {
-        CompilationUnit unit = notice.resolvedDartUnit;
-        if (unit != null) {
-          index.index(context2, unit);
-        }
-      });
-      result = context2.performAnalysisTask();
-    }
-
-    // Check that source in 2nd context does not appear in completion in 1st
-    addSource(
-        '/context1/libA.dart',
-        '''
-      library libA;
-      class ClassInLocalContext {int x;}''');
-    testFile = '/context1/completionTest.dart';
-    addTestSource('''
-      import "/context1/libA.dart";
-      import "/foo.dart";
-      main() {C^}
-      ''');
-
-    await computeSuggestions();
-    assertSuggestClass('ClassInLocalContext');
-    // Assert contributor does not include results from 2nd context.
-    assertNotSuggested('ClassFromAnotherContext');
-  }
-
-  test_no_parameters_field() async {
-    addSource(
-        '/libA.dart',
-        '''
-int x;
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestTopLevelVar('x', null);
-    assertHasNoParameterInfo(suggestion);
-  }
-
-  test_no_parameters_getter() async {
-    resolveSource(
-        '/libA.dart',
-        '''
-int get x => null;
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestGetter('x', 'int');
-    assertHasNoParameterInfo(suggestion);
-  }
-
-  test_no_parameters_setter() async {
-    addSource(
-        '/libA.dart',
-        '''
-set x(int value) {};
-''');
-    addTestSource('''
-import '/libA.dart';
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestSetter('x');
-    assertHasNoParameterInfo(suggestion);
-  }
-
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
     resolveSource(
@@ -840,7 +310,10 @@
     assertNotSuggested('bar');
     // An unresolved imported library will produce suggestions
     // with a null returnType
-    assertSuggestFunction('hasLength', null);
+    // The current DartCompletionRequest#resolveExpression resolves
+    // the world (which it should not) and causes the imported library
+    // to be resolved.
+    assertSuggestFunction('hasLength',  /* null */ 'bool');
     assertNotSuggested('main');
   }
 
@@ -859,6 +332,54 @@
     assertNotSuggested('==');
   }
 
+  test_AsExpression_type_subtype_extends_filter() async {
+    // SimpleIdentifier  TypeName  AsExpression  IfStatement
+    addSource(
+        '/testB.dart',
+        '''
+          foo() { }
+          class A {} class B extends A {} class C extends B {}
+          class X {X.c(); X._d(); z() {}}''');
+    addTestSource('''
+          import "/testB.dart";
+         main(){A a; if (a as ^)}''');
+
+    await computeSuggestions();
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestClass('B');
+    assertSuggestClass('C');
+    assertNotSuggested('A');
+    assertNotSuggested('X');
+    assertNotSuggested('Object');
+    assertNotSuggested('a');
+    assertNotSuggested('main');
+  }
+
+  test_AsExpression_type_subtype_implements_filter() async {
+    // SimpleIdentifier  TypeName  AsExpression  IfStatement
+    addSource(
+        '/testB.dart',
+        '''
+          foo() { }
+          class A {} class B implements A {} class C implements B {}
+          class X {X.c(); X._d(); z() {}}''');
+    addTestSource('''
+          import "/testB.dart";
+          main(){A a; if (a as ^)}''');
+
+    await computeSuggestions();
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestClass('B');
+    assertSuggestClass('C');
+    assertNotSuggested('A');
+    assertNotSuggested('X');
+    assertNotSuggested('Object');
+    assertNotSuggested('a');
+    assertNotSuggested('main');
+  }
+
   test_AssignmentExpression_name() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement  Block
@@ -2373,6 +1894,80 @@
     assertNotSuggested('bar');
   }
 
+  test_doc_class() async {
+    addSource(
+        '/libA.dart',
+        r'''
+library A;
+/// My class.
+/// Short description.
+///
+/// Longer description.
+class A {}
+''');
+    addTestSource('import "/libA.dart"; main() {^}');
+
+    await computeSuggestions();
+
+    CompletionSuggestion suggestion = assertSuggestClass('A');
+    expect(suggestion.docSummary, 'My class.\nShort description.');
+    expect(suggestion.docComplete,
+        'My class.\nShort description.\n\nLonger description.');
+  }
+
+  test_doc_function() async {
+    resolveSource(
+        '/libA.dart',
+        r'''
+library A;
+/// My function.
+/// Short description.
+///
+/// Longer description.
+int myFunc() {}
+''');
+    addTestSource('import "/libA.dart"; main() {^}');
+
+    await computeSuggestions();
+
+    CompletionSuggestion suggestion = assertSuggestFunction('myFunc', 'int');
+    expect(suggestion.docSummary, 'My function.\nShort description.');
+    expect(suggestion.docComplete,
+        'My function.\nShort description.\n\nLonger description.');
+  }
+
+  test_doc_function_c_style() async {
+    resolveSource(
+        '/libA.dart',
+        r'''
+library A;
+/**
+ * My function.
+ * Short description.
+ *
+ * Longer description.
+ */
+int myFunc() {}
+''');
+    addTestSource('import "/libA.dart"; main() {^}');
+
+    await computeSuggestions();
+
+    CompletionSuggestion suggestion = assertSuggestFunction('myFunc', 'int');
+    expect(suggestion.docSummary, 'My function.\nShort description.');
+    expect(suggestion.docComplete,
+        'My function.\nShort description.\n\nLonger description.');
+  }
+
+  test_enum() async {
+    addSource('/libA.dart', 'library A; enum E { one, two }');
+    addTestSource('import "/libA.dart"; main() {^}');
+    await computeSuggestions();
+    assertSuggestEnum('E');
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+  }
+
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
     resolveSource(
@@ -2595,6 +2190,142 @@
     assertNotSuggested('bar');
   }
 
+  test_function_parameters_mixed_required_and_named() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+int m(x, {int y}) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'int');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
+  test_function_parameters_mixed_required_and_positional() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m(x, [int y]) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_function_parameters_named() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m({x, int y}) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
+  test_function_parameters_none() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m() {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, isEmpty);
+    expect(suggestion.parameterTypes, isEmpty);
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_function_parameters_positional() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m([x, int y]) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_function_parameters_required() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m(x, int y) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 2);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
   test_FunctionDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
     resolveSource(
@@ -2827,6 +2558,57 @@
     //assertSuggestImportedTopLevelVar('T1', 'int');
   }
 
+  test_InstanceCreationExpression() async {
+    resolveSource(
+        '/testA.dart',
+        '''
+class A {foo(){var f; {var x;}}}
+class B {B(this.x, [String boo]) { } int x;}
+class C {C.bar({boo: 'hoo', int z: 0}) { } }''');
+    addTestSource('''
+import "/testA.dart";
+import "dart:math" as math;
+main() {new ^ String x = "hello";}''');
+
+    await computeSuggestions();
+    CompletionSuggestion suggestion;
+
+    suggestion = assertSuggestConstructor('Object');
+    expect(suggestion.element.parameters, '()');
+    expect(suggestion.parameterNames, hasLength(0));
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+
+    suggestion = assertSuggestConstructor('A');
+    expect(suggestion.element.parameters, '()');
+    expect(suggestion.parameterNames, hasLength(0));
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+
+    suggestion = assertSuggestConstructor('B');
+    expect(suggestion.element.parameters, '(int x, [String boo])');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'int');
+    expect(suggestion.parameterNames[1], 'boo');
+    expect(suggestion.parameterTypes[1], 'String');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, false);
+
+    suggestion = assertSuggestConstructor('C.bar');
+    expect(suggestion.element.parameters, "({dynamic boo: 'hoo', int z: 0})");
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'boo');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'z');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, true);
+
+    // Suggested by LibraryPrefixContributor
+    assertNotSuggested('math');
+  }
+
   test_InstanceCreationExpression_imported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
     addSource(
@@ -2857,7 +2639,12 @@
     assertNotSuggested('foo');
     assertNotSuggested('F1');
     assertNotSuggested('F2');
-    assertSuggestTopLevelVar('T1', null);
+    // An unresolved imported library will produce suggestions
+    // with a null returnType
+    // The current DartCompletionRequest#resolveExpression resolves
+    // the world (which it should not) and causes the imported library
+    // to be resolved.
+    assertSuggestTopLevelVar('T1', /* null */ 'int');
     assertNotSuggested('T2');
   }
 
@@ -2874,6 +2661,17 @@
     assertNotSuggested('Foo');
   }
 
+  test_internal_sdk_libs() async {
+    addTestSource('main() {p^}');
+
+    await computeSuggestions();
+    assertSuggest('print');
+    // Not imported, so not suggested
+    assertNotSuggested('pow');
+    // Do not suggest completions from internal SDK library
+    assertNotSuggested('printToConsole');
+  }
+
   test_InterpolationExpression() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
     addSource(
@@ -3054,6 +2852,54 @@
     assertSuggestClass('Object');
   }
 
+  test_IsExpression_type_subtype_extends_filter() async {
+    // SimpleIdentifier  TypeName  IsExpression  IfStatement
+    addSource(
+        '/testB.dart',
+        '''
+        foo() { }
+        class A {} class B extends A {} class C extends B {}
+        class X {X.c(); X._d(); z() {}}''');
+    addTestSource('''
+        import "/testB.dart";
+        main(){A a; if (a is ^)}''');
+
+    await computeSuggestions();
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestClass('B');
+    assertSuggestClass('C');
+    assertNotSuggested('A');
+    assertNotSuggested('X');
+    assertNotSuggested('Object');
+    assertNotSuggested('a');
+    assertNotSuggested('main');
+  }
+
+  test_IsExpression_type_subtype_implements_filter() async {
+    // SimpleIdentifier  TypeName  IsExpression  IfStatement
+    addSource(
+        '/testB.dart',
+        '''
+        foo() { }
+        class A {} class B implements A {} class C implements B {}
+        class X {X.c(); X._d(); z() {}}''');
+    addTestSource('''
+        import "/testB.dart";
+        main(){A a; if (a is ^)}''');
+
+    await computeSuggestions();
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestClass('B');
+    assertSuggestClass('C');
+    assertNotSuggested('A');
+    assertNotSuggested('X');
+    assertNotSuggested('Object');
+    assertNotSuggested('a');
+    assertNotSuggested('main');
+  }
+
   test_keyword() async {
     resolveSource(
         '/testB.dart',
@@ -3137,9 +2983,14 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertSuggestClass('Object');
-    assertSuggestTopLevelVar('T1', null);
-    assertSuggestFunction('F1', null);
-    assertSuggestFunctionTypeAlias('D1', 'null');
+    // Simulate unresolved imported library,
+    // in which case suggestions will have null return types (unresolved)
+    // The current DartCompletionRequest#resolveExpression resolves
+    // the world (which it should not) and causes the imported library
+    // to be resolved.
+    assertSuggestTopLevelVar('T1', /* null */ 'int');
+    assertSuggestFunction('F1', /* null */ 'dynamic');
+    assertSuggestFunctionTypeAlias('D1', /* null */ 'dynamic');
     assertSuggestClass('C1');
     assertNotSuggested('T2');
     assertNotSuggested('F2');
@@ -3169,7 +3020,10 @@
     expect(replacementLength, 1);
     // Simulate unresolved imported library,
     // in which case suggestions will have null return types (unresolved)
-    assertSuggestTopLevelVar('T1', null);
+    // The current DartCompletionRequest#resolveExpression resolves
+    // the world (which it should not) and causes the imported library
+    // to be resolved.
+    assertSuggestTopLevelVar('T1', /* null */ 'int');
     assertNotSuggested('T2');
   }
 
@@ -3197,6 +3051,142 @@
     assertNotSuggested('T2');
   }
 
+  test_method_parameters_mixed_required_and_named() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m(x, {int y}) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
+  test_method_parameters_mixed_required_and_positional() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m(x, [int y]) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_method_parameters_named() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m({x, int y}) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
+  test_method_parameters_none() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m() {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, isEmpty);
+    expect(suggestion.parameterTypes, isEmpty);
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_method_parameters_positional() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m([x, int y]) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_method_parameters_required() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+void m(x, int y) {}
+''');
+    addTestSource('''
+import '/libA.dart';
+class B {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 2);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
   test_MethodDeclaration_body_getters() async {
     // Block  BlockFunctionBody  MethodDeclaration
     addTestSource('class A {@deprecated X get f => 0; Z a() {^} get _g => 1;}');
@@ -3453,6 +3443,77 @@
     assertNotSuggested('==');
   }
 
+  test_mixin_ordering() async {
+    addSource(
+        '/libA.dart',
+        '''
+class B {}
+class M1 {
+  void m() {}
+}
+class M2 {
+  void m() {}
+}
+''');
+    addTestSource('''
+import '/libA.dart';
+class C extends B with M1, M2 {
+  void f() {
+    ^
+  }
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  /**
+   * Ensure that completions in one context don't appear in another
+   */
+  test_multiple_contexts() async {
+    // Create a 2nd context with source
+    var context2 = AnalysisEngine.instance.createAnalysisContext();
+    context2.sourceFactory =
+        new SourceFactory([AbstractContextTest.SDK_RESOLVER, resourceResolver]);
+    String content2 = 'class ClassFromAnotherContext { }';
+    Source source2 =
+        provider.newFile('/context2/foo.dart', content2).createSource();
+    ChangeSet changeSet = new ChangeSet();
+    changeSet.addedSource(source2);
+    context2.applyChanges(changeSet);
+    context2.setContents(source2, content2);
+
+    // Resolve the source in the 2nd context and update the index
+    var result = context2.performAnalysisTask();
+    while (result.hasMoreWork) {
+      result.changeNotices.forEach((ChangeNotice notice) {
+        CompilationUnit unit = notice.resolvedDartUnit;
+        if (unit != null) {
+          index.indexUnit(unit);
+        }
+      });
+      result = context2.performAnalysisTask();
+    }
+
+    // Check that source in 2nd context does not appear in completion in 1st
+    addSource(
+        '/context1/libA.dart',
+        '''
+      library libA;
+      class ClassInLocalContext {int x;}''');
+    testFile = '/context1/completionTest.dart';
+    addTestSource('''
+      import "/context1/libA.dart";
+      import "/foo.dart";
+      main() {C^}
+      ''');
+
+    await computeSuggestions();
+    assertSuggestClass('ClassInLocalContext');
+    // Assert contributor does not include results from 2nd context.
+    assertNotSuggested('ClassFromAnotherContext');
+  }
+
   test_new_instance() async {
     addTestSource('import "dart:math"; class A {x() {new Random().^}}');
 
@@ -3465,6 +3526,57 @@
     assertNotSuggested('A');
   }
 
+  test_no_parameters_field() async {
+    addSource(
+        '/libA.dart',
+        '''
+int x;
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestTopLevelVar('x', null);
+    assertHasNoParameterInfo(suggestion);
+  }
+
+  test_no_parameters_getter() async {
+    resolveSource(
+        '/libA.dart',
+        '''
+int get x => null;
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestGetter('x', 'int');
+    assertHasNoParameterInfo(suggestion);
+  }
+
+  test_no_parameters_setter() async {
+    addSource(
+        '/libA.dart',
+        '''
+set x(int value) {};
+''');
+    addTestSource('''
+import '/libA.dart';
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestSetter('x');
+    assertHasNoParameterInfo(suggestion);
+  }
+
   test_parameterName_excludeTypes() async {
     addTestSource('m(int ^) {}');
     await computeSuggestions();
diff --git a/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
index a864b34..568d796 100644
--- a/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
@@ -4,6 +4,7 @@
 
 library test.services.completion.contributor.dart.inherited_ref;
 
+import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/inherited_reference_contributor.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -11,7 +12,6 @@
 
 import '../../../utils.dart';
 import 'completion_contributor_util.dart';
-import 'package:analysis_server/src/protocol_server.dart';
 
 main() {
   initializeTestEnvironment();
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 73642ea..2e7e48b 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
@@ -220,6 +220,13 @@
     Map<String, int> expectedOffsets = <String, int>{};
     Set<String> actualCompletions = new Set<String>();
     expectedCompletions.addAll(expectedKeywords.map((k) => k.syntax));
+    ['import', 'export', 'part'].forEach((s) {
+      if (expectedCompletions.contains(s)) {
+        expectedCompletions.remove(s);
+        expectedCompletions.add('$s \'\';');
+      }
+    });
+
     expectedCompletions.addAll(pseudoKeywords);
     for (CompletionSuggestion s in suggestions) {
       if (s.kind == CompletionSuggestionKind.KEYWORD) {
@@ -245,10 +252,6 @@
       if (s.kind == CompletionSuggestionKind.KEYWORD) {
         if (s.completion.startsWith(Keyword.IMPORT.syntax)) {
           int importRelevance = relevance;
-          if (importRelevance == DART_RELEVANCE_HIGH &&
-              s.completion == "import '';") {
-            ++importRelevance;
-          }
           expect(s.relevance, equals(importRelevance), reason: s.completion);
         } else {
           if (s.completion == Keyword.RETHROW.syntax) {
@@ -261,7 +264,11 @@
         if (expectedOffset == null) {
           expectedOffset = s.completion.length;
         }
-        expect(s.selectionOffset, equals(expectedOffset));
+        expect(
+            s.selectionOffset,
+            equals(s.completion.endsWith('\'\';')
+                ? expectedOffset - 2
+                : expectedOffset));
         expect(s.selectionLength, equals(0));
         expect(s.isDeprecated, equals(false));
         expect(s.isPotential, equals(false));
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 fd218a0..ddb0211 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
@@ -32,6 +32,21 @@
     assertNotSuggested('loadLibrary');
   }
 
+  test_libraryPrefix2() async {
+    // SimpleIdentifier  MethodInvocation  ExpressionStatement
+    addTestSource('import "dart:async" as bar; foo() {bar.^ print("f")}');
+    await computeSuggestions();
+    assertSuggestClass('Future');
+  }
+
+  test_libraryPrefix3() async {
+    // SimpleIdentifier  MethodInvocation  ExpressionStatement
+    addTestSource('import "dart:async" as bar; foo() {new bar.F^ print("f")}');
+    await computeSuggestions();
+    assertSuggestConstructor('Future');
+    assertSuggestConstructor('Future.delayed');
+  }
+
   test_libraryPrefix_cascade() async {
     addTestSource('''
     import "dart:math" as math;
@@ -64,21 +79,6 @@
     assertSuggestFunction('min', 'num');
   }
 
-  test_libraryPrefix2() async {
-    // SimpleIdentifier  MethodInvocation  ExpressionStatement
-    addTestSource('import "dart:async" as bar; foo() {bar.^ print("f")}');
-    await computeSuggestions();
-    assertSuggestClass('Future');
-  }
-
-  test_libraryPrefix3() async {
-    // SimpleIdentifier  MethodInvocation  ExpressionStatement
-    addTestSource('import "dart:async" as bar; foo() {new bar.F^ print("f")}');
-    await computeSuggestions();
-    assertSuggestConstructor('Future');
-    assertSuggestConstructor('Future.delayed');
-  }
-
   test_libraryPrefix_deferred() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
     addTestSource('import "dart:async" deferred as bar; foo() {bar.^}');
diff --git a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
index 64773f4..172d767 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
@@ -61,333 +61,6 @@
     return new LocalConstructorContributor();
   }
 
-  test_constructor_parameters_mixed_required_and_named() async {
-    addTestSource('class A {A(x, {int y}) {^}}');
-    await computeSuggestions();
-    assertNotSuggested('x');
-    assertNotSuggested('y');
-  }
-
-  test_constructor_parameters_mixed_required_and_positional() async {
-    addTestSource('class A {A(x, [int y]) {^}}');
-    await computeSuggestions();
-    assertNotSuggested('x');
-    assertNotSuggested('y');
-  }
-
-  test_constructor_parameters_named() async {
-    addTestSource('class A {A({x, int y}) {^}}');
-    await computeSuggestions();
-    assertNotSuggested('x');
-    assertNotSuggested('y');
-  }
-
-  test_constructor_parameters_positional() async {
-    addTestSource('class A {A([x, int y]) {^}}');
-    await computeSuggestions();
-    assertNotSuggested('x');
-    assertNotSuggested('y');
-  }
-
-  test_constructor_parameters_required() async {
-    addTestSource('class A {A(x, int y) {^}}');
-    await computeSuggestions();
-    assertNotSuggested('x');
-    assertNotSuggested('y');
-  }
-
-  test_enum() async {
-    addTestSource('enum E { one, two } main() {^}');
-    await computeSuggestions();
-    assertNotSuggested('E');
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-  }
-
-  test_enum_deprecated() async {
-    addTestSource('@deprecated enum E { one, two } main() {^}');
-    await computeSuggestions();
-    assertNotSuggested('E');
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-  }
-
-  test_function_parameters_mixed_required_and_named() async {
-    addTestSource('''
-void m(x, {int y}) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_function_parameters_mixed_required_and_positional() async {
-    addTestSource('''
-void m(x, [int y]) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_function_parameters_named() async {
-    addTestSource('''
-void m({x, int y}) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_function_parameters_none() async {
-    addTestSource('''
-void m() {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_function_parameters_positional() async {
-    addTestSource('''
-void m([x, int y]) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_function_parameters_required() async {
-    addTestSource('''
-void m(x, int y) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_ignore_symbol_being_completed() async {
-    addTestSource('class MyClass { } main(MC^) { }');
-    await computeSuggestions();
-    assertNotSuggested('MyClass');
-    assertNotSuggested('MC');
-  }
-
-  test_inDartDoc_reference1() async {
-    addTestSource('''
-/// The [^
-main(aaa, bbb) {}''');
-    await computeSuggestions();
-    assertNotSuggested('main');
-  }
-
-  test_inDartDoc_reference2() async {
-    addTestSource('''
-/// The [m^
-main(aaa, bbb) {}''');
-    await computeSuggestions();
-    assertNotSuggested('main');
-  }
-
-  test_inDartDoc_reference3() async {
-    addTestSource('''
-/// The [^]
-main(aaa, bbb) {}''');
-    await computeSuggestions();
-    assertNotSuggested('main');
-  }
-
-  test_inDartDoc_reference4() async {
-    addTestSource('''
-/// The [m^]
-main(aaa, bbb) {}''');
-    await computeSuggestions();
-    assertNotSuggested('main');
-  }
-
-  test_InstanceCreationExpression() async {
-    addTestSource('''
-class A {foo(){var f; {var x;}}}
-class B {B(this.x, [String boo]) { } int x;}
-class C {C.bar({boo: 'hoo', int z: 0}) { } }
-main() {new ^ String x = "hello";}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion;
-
-    suggestion = assertSuggestConstructor('A', elemOffset: -1);
-    expect(suggestion.element.parameters, '()');
-    expect(suggestion.element.returnType, 'A');
-    expect(suggestion.declaringType, 'A');
-    expect(suggestion.parameterNames, hasLength(0));
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-
-    suggestion = assertSuggestConstructor('B');
-    expect(suggestion.element.parameters, '(int x, [String boo])');
-    expect(suggestion.element.returnType, 'B');
-    expect(suggestion.declaringType, 'B');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'int');
-    expect(suggestion.parameterNames[1], 'boo');
-    expect(suggestion.parameterTypes[1], 'String');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, false);
-
-    suggestion = assertSuggestConstructor('C.bar');
-    expect(suggestion.element.parameters, '({dynamic boo: \'hoo\', int z: 0})');
-    expect(suggestion.element.returnType, 'C');
-    expect(suggestion.declaringType, 'C');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'boo');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'z');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_method_parameters_mixed_required_and_named() async {
-    addTestSource('''
-class A {
-  void m(x, {int y}) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_mixed_required_and_positional() async {
-    addTestSource('''
-class A {
-  void m(x, [int y]) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_named() async {
-    addTestSource('''
-class A {
-  void m({x, int y}) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_none() async {
-    addTestSource('''
-class A {
-  void m() {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_positional() async {
-    addTestSource('''
-class A {
-  void m([x, int y]) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_required() async {
-    addTestSource('''
-class A {
-  void m(x, int y) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_missing_params_constructor() async {
-    addTestSource('class C1{C1{} main(){C^}}');
-    await computeSuggestions();
-  }
-
-  test_missing_params_function() async {
-    addTestSource('int f1{} main(){f^}');
-    await computeSuggestions();
-  }
-
-  test_missing_params_method() async {
-    addTestSource('class C1{int f1{} main(){f^}}');
-    await computeSuggestions();
-  }
-
-  test_overrides() async {
-    addTestSource('''
-class A {m() {}}
-class B extends A {m() {^}}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_prioritization() async {
-    addTestSource('main() {var ab; var _ab; ^}');
-    await computeSuggestions();
-    assertNotSuggested('ab');
-    assertNotSuggested('_ab');
-  }
-
-  test_prioritization_private() async {
-    addTestSource('main() {var ab; var _ab; _^}');
-    await computeSuggestions();
-    assertNotSuggested('ab');
-    assertNotSuggested('_ab');
-  }
-
-  test_prioritization_public() async {
-    addTestSource('main() {var ab; var _ab; a^}');
-    await computeSuggestions();
-    assertNotSuggested('ab');
-    assertNotSuggested('_ab');
-  }
-
-  test_shadowed_name() async {
-    addTestSource('var a; class A { var a; m() { ^ } }');
-    await computeSuggestions();
-    assertNotSuggested('a');
-  }
-
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
     addSource(
@@ -1946,6 +1619,41 @@
     //assertNotSuggested('T1');
   }
 
+  test_constructor_parameters_mixed_required_and_named() async {
+    addTestSource('class A {A(x, {int y}) {^}}');
+    await computeSuggestions();
+    assertNotSuggested('x');
+    assertNotSuggested('y');
+  }
+
+  test_constructor_parameters_mixed_required_and_positional() async {
+    addTestSource('class A {A(x, [int y]) {^}}');
+    await computeSuggestions();
+    assertNotSuggested('x');
+    assertNotSuggested('y');
+  }
+
+  test_constructor_parameters_named() async {
+    addTestSource('class A {A({x, int y}) {^}}');
+    await computeSuggestions();
+    assertNotSuggested('x');
+    assertNotSuggested('y');
+  }
+
+  test_constructor_parameters_positional() async {
+    addTestSource('class A {A([x, int y]) {^}}');
+    await computeSuggestions();
+    assertNotSuggested('x');
+    assertNotSuggested('y');
+  }
+
+  test_constructor_parameters_required() async {
+    addTestSource('class A {A(x, int y) {^}}');
+    await computeSuggestions();
+    assertNotSuggested('x');
+    assertNotSuggested('y');
+  }
+
   test_ConstructorName_importedClass() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
@@ -2078,6 +1786,22 @@
     assertNotSuggested('bar');
   }
 
+  test_enum() async {
+    addTestSource('enum E { one, two } main() {^}');
+    await computeSuggestions();
+    assertNotSuggested('E');
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+  }
+
+  test_enum_deprecated() async {
+    addTestSource('@deprecated enum E { one, two } main() {^}');
+    await computeSuggestions();
+    assertNotSuggested('E');
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+  }
+
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
     addSource(
@@ -2301,6 +2025,72 @@
     assertNotSuggested('bar');
   }
 
+  test_function_parameters_mixed_required_and_named() async {
+    addTestSource('''
+void m(x, {int y}) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_function_parameters_mixed_required_and_positional() async {
+    addTestSource('''
+void m(x, [int y]) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_function_parameters_named() async {
+    addTestSource('''
+void m({x, int y}) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_function_parameters_none() async {
+    addTestSource('''
+void m() {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_function_parameters_positional() async {
+    addTestSource('''
+void m([x, int y]) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_function_parameters_required() async {
+    addTestSource('''
+void m(x, int y) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
   test_FunctionDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
     addSource(
@@ -2473,6 +2263,13 @@
     assertNotSuggested('==');
   }
 
+  test_ignore_symbol_being_completed() async {
+    addTestSource('class MyClass { } main(MC^) { }');
+    await computeSuggestions();
+    assertNotSuggested('MyClass');
+    assertNotSuggested('MC');
+  }
+
   test_ImportDirective_dart() async {
     // SimpleStringLiteral  ImportDirective
     addTestSource('''
@@ -2483,6 +2280,38 @@
     assertNoSuggestions();
   }
 
+  test_inDartDoc_reference1() async {
+    addTestSource('''
+/// The [^
+main(aaa, bbb) {}''');
+    await computeSuggestions();
+    assertNotSuggested('main');
+  }
+
+  test_inDartDoc_reference2() async {
+    addTestSource('''
+/// The [m^
+main(aaa, bbb) {}''');
+    await computeSuggestions();
+    assertNotSuggested('main');
+  }
+
+  test_inDartDoc_reference3() async {
+    addTestSource('''
+/// The [^]
+main(aaa, bbb) {}''');
+    await computeSuggestions();
+    assertNotSuggested('main');
+  }
+
+  test_inDartDoc_reference4() async {
+    addTestSource('''
+/// The [m^]
+main(aaa, bbb) {}''');
+    await computeSuggestions();
+    assertNotSuggested('main');
+  }
+
   test_IndexExpression() async {
     // ExpressionStatement  Block
     addSource(
@@ -2533,6 +2362,48 @@
     //assertNotSuggested('T1');
   }
 
+  test_InstanceCreationExpression() async {
+    addTestSource('''
+class A {foo(){var f; {var x;}}}
+class B {B(this.x, [String boo]) { } int x;}
+class C {C.bar({boo: 'hoo', int z: 0}) { } }
+main() {new ^ String x = "hello";}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion;
+
+    suggestion = assertSuggestConstructor('A', elemOffset: -1);
+    expect(suggestion.element.parameters, '()');
+    expect(suggestion.element.returnType, 'A');
+    expect(suggestion.declaringType, 'A');
+    expect(suggestion.parameterNames, hasLength(0));
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+
+    suggestion = assertSuggestConstructor('B');
+    expect(suggestion.element.parameters, '(int x, [String boo])');
+    expect(suggestion.element.returnType, 'B');
+    expect(suggestion.declaringType, 'B');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'int');
+    expect(suggestion.parameterNames[1], 'boo');
+    expect(suggestion.parameterTypes[1], 'String');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, false);
+
+    suggestion = assertSuggestConstructor('C.bar');
+    expect(suggestion.element.parameters, '({dynamic boo: \'hoo\', int z: 0})');
+    expect(suggestion.element.returnType, 'C');
+    expect(suggestion.declaringType, 'C');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'boo');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'z');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
   test_InstanceCreationExpression_imported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
     addSource(
@@ -2811,6 +2682,14 @@
     assertNoSuggestions();
   }
 
+  test_localVariableDeclarationName() async {
+    addTestSource('main() {String m^}');
+    await computeSuggestions();
+
+    assertNotSuggested('main');
+    assertNotSuggested('min');
+  }
+
   test_MapLiteralEntry() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
     addSource(
@@ -2890,6 +2769,84 @@
     assertNotSuggested('T2');
   }
 
+  test_method_parameters_mixed_required_and_named() async {
+    addTestSource('''
+class A {
+  void m(x, {int y}) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_mixed_required_and_positional() async {
+    addTestSource('''
+class A {
+  void m(x, [int y]) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_named() async {
+    addTestSource('''
+class A {
+  void m({x, int y}) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_none() async {
+    addTestSource('''
+class A {
+  void m() {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_positional() async {
+    addTestSource('''
+class A {
+  void m([x, int y]) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_required() async {
+    addTestSource('''
+class A {
+  void m(x, int y) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
   test_MethodDeclaration_body_getters() async {
     // Block  BlockFunctionBody  MethodDeclaration
     addTestSource('class A {@deprecated X get f => 0; Z a() {^} get _g => 1;}');
@@ -3147,6 +3104,21 @@
     assertNotSuggested('==');
   }
 
+  test_missing_params_constructor() async {
+    addTestSource('class C1{C1{} main(){C^}}');
+    await computeSuggestions();
+  }
+
+  test_missing_params_function() async {
+    addTestSource('int f1{} main(){f^}');
+    await computeSuggestions();
+  }
+
+  test_missing_params_method() async {
+    addTestSource('class C1{int f1{} main(){f^}}');
+    await computeSuggestions();
+  }
+
   test_new_instance() async {
     addTestSource('import "dart:math"; class A {x() {new Random().^}}');
     await computeSuggestions();
@@ -3159,6 +3131,15 @@
     assertNotSuggested('A');
   }
 
+  test_overrides() async {
+    addTestSource('''
+class A {m() {}}
+class B extends A {m() {^}}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
   test_parameterName_excludeTypes() async {
     addTestSource('m(int ^) {}');
     await computeSuggestions();
@@ -3595,14 +3576,6 @@
     assertNotSuggested('length');
   }
 
-  test_localVariableDeclarationName() async {
-    addTestSource('main() {String m^}');
-    await computeSuggestions();
-
-    assertNotSuggested('main');
-    assertNotSuggested('min');
-  }
-
   test_PrefixedIdentifier_trailingStmt_param2() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
     addTestSource('f(String g) {g.^ int y = 0;}');
@@ -3619,6 +3592,27 @@
     assertNotSuggested('length');
   }
 
+  test_prioritization() async {
+    addTestSource('main() {var ab; var _ab; ^}');
+    await computeSuggestions();
+    assertNotSuggested('ab');
+    assertNotSuggested('_ab');
+  }
+
+  test_prioritization_private() async {
+    addTestSource('main() {var ab; var _ab; _^}');
+    await computeSuggestions();
+    assertNotSuggested('ab');
+    assertNotSuggested('_ab');
+  }
+
+  test_prioritization_public() async {
+    addTestSource('main() {var ab; var _ab; a^}');
+    await computeSuggestions();
+    assertNotSuggested('ab');
+    assertNotSuggested('_ab');
+  }
+
   test_PropertyAccess_expression() async {
     // SimpleIdentifier  MethodInvocation  PropertyAccess  ExpressionStatement
     addTestSource('class A {a() {"hello".to^String().length}}');
@@ -3665,6 +3659,12 @@
     assertNotSuggested('==');
   }
 
+  test_shadowed_name() async {
+    addTestSource('var a; class A { var a; m() { ^ } }');
+    await computeSuggestions();
+    assertNotSuggested('a');
+  }
+
   test_SwitchStatement_c() async {
     // SwitchStatement  Block  BlockFunctionBody  MethodDeclaration
     addTestSource('class A {String g(int x) {switch(x) {c^}}}');
diff --git a/pkg/analysis_server/test/services/completion/dart/local_declaration_visitor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_declaration_visitor_test.dart
index 5765c68..aa878d5 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_declaration_visitor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_declaration_visitor_test.dart
@@ -5,10 +5,10 @@
 library test.services.completion.local_declaration_visitor_test;
 
 import 'package:analysis_server/src/services/completion/dart/local_declaration_visitor.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
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 fc707f9..eeab8d7 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
@@ -64,6 +64,45 @@
         relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
   }
 
+  test_partFile_Constructor2() async {
+    // SimpleIdentifier  TypeName  ConstructorName
+    addSource(
+        '/testB.dart',
+        '''
+        lib B;
+        int T1;
+        F1() { }
+        class X {X.c(); X._d(); z() {}}''');
+    addSource(
+        '/testA.dart',
+        '''
+        part of libA;
+        class B { }''');
+    addTestSource('''
+        library libA;
+        import "/testB.dart";
+        part "/testA.dart";
+        class A { A({String boo: 'hoo'}) { } }
+        main() {new ^}
+        var m;''');
+    await computeLibrariesContaining();
+    await computeSuggestions();
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestConstructor('B');
+    // Suggested by ConstructorContributor
+    assertNotSuggested('A');
+    // Suggested by ImportedReferenceContributor
+    assertNotSuggested('Object');
+    assertNotSuggested('X.c');
+    assertNotSuggested('X._d');
+    assertNotSuggested('F1');
+    assertNotSuggested('T1');
+    assertNotSuggested('_d');
+    assertNotSuggested('z');
+    assertNotSuggested('m');
+  }
+
   test_partFile_TypeName() async {
     addSource(
         '/testB.dart',
@@ -111,45 +150,6 @@
     assertNotSuggested('z');
   }
 
-  test_partFile_Constructor2() async {
-    // SimpleIdentifier  TypeName  ConstructorName
-    addSource(
-        '/testB.dart',
-        '''
-        lib B;
-        int T1;
-        F1() { }
-        class X {X.c(); X._d(); z() {}}''');
-    addSource(
-        '/testA.dart',
-        '''
-        part of libA;
-        class B { }''');
-    addTestSource('''
-        library libA;
-        import "/testB.dart";
-        part "/testA.dart";
-        class A { A({String boo: 'hoo'}) { } }
-        main() {new ^}
-        var m;''');
-    await computeLibrariesContaining();
-    await computeSuggestions();
-    expect(replacementOffset, completionOffset);
-    expect(replacementLength, 0);
-    assertSuggestConstructor('B');
-    // Suggested by ConstructorContributor
-    assertNotSuggested('A');
-    // Suggested by ImportedReferenceContributor
-    assertNotSuggested('Object');
-    assertNotSuggested('X.c');
-    assertNotSuggested('X._d');
-    assertNotSuggested('F1');
-    assertNotSuggested('T1');
-    assertNotSuggested('_d');
-    assertNotSuggested('z');
-    assertNotSuggested('m');
-  }
-
   test_partFile_TypeName2() async {
     addSource(
         '/testB.dart',
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 e5d854d..e617931 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
@@ -61,335 +61,6 @@
     return new LocalReferenceContributor();
   }
 
-  test_constructor_parameters_mixed_required_and_named() async {
-    addTestSource('class A {A(x, {int y}) {^}}');
-    await computeSuggestions();
-    assertSuggestParameter('x', null);
-    assertSuggestParameter('y', 'int');
-  }
-
-  test_constructor_parameters_mixed_required_and_positional() async {
-    addTestSource('class A {A(x, [int y]) {^}}');
-    await computeSuggestions();
-    assertSuggestParameter('x', null);
-    assertSuggestParameter('y', 'int');
-  }
-
-  test_constructor_parameters_named() async {
-    addTestSource('class A {A({x, int y}) {^}}');
-    await computeSuggestions();
-    assertSuggestParameter('x', null);
-    assertSuggestParameter('y', 'int');
-  }
-
-  test_constructor_parameters_positional() async {
-    addTestSource('class A {A([x, int y]) {^}}');
-    await computeSuggestions();
-    assertSuggestParameter('x', null);
-    assertSuggestParameter('y', 'int');
-  }
-
-  test_constructor_parameters_required() async {
-    addTestSource('class A {A(x, int y) {^}}');
-    await computeSuggestions();
-    assertSuggestParameter('x', null);
-    assertSuggestParameter('y', 'int');
-  }
-
-  test_enum() async {
-    addTestSource('enum E { one, two } main() {^}');
-    await computeSuggestions();
-    assertSuggestEnum('E');
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-  }
-
-  test_enum_deprecated() async {
-    addTestSource('@deprecated enum E { one, two } main() {^}');
-    await computeSuggestions();
-    assertSuggestEnum('E', isDeprecated: true);
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-  }
-
-  test_function_parameters_mixed_required_and_named() async {
-    addTestSource('''
-void m(x, {int y}) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_function_parameters_mixed_required_and_positional() async {
-    addTestSource('''
-void m(x, [int y]) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_function_parameters_named() async {
-    addTestSource('''
-void m({x, int y}) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_function_parameters_none() async {
-    addTestSource('''
-void m() {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    expect(suggestion.parameterNames, isEmpty);
-    expect(suggestion.parameterTypes, isEmpty);
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_function_parameters_positional() async {
-    addTestSource('''
-void m([x, int y]) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_function_parameters_required() async {
-    addTestSource('''
-void m(x, int y) {}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 2);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_ignore_symbol_being_completed() async {
-    addTestSource('class MyClass { } main(MC^) { }');
-    await computeSuggestions();
-    assertSuggestClass('MyClass');
-    assertNotSuggested('MC');
-  }
-
-  test_inDartDoc_reference3() async {
-    addTestSource('''
-/// The [^]
-main(aaa, bbb) {}''');
-    await computeSuggestions();
-    assertSuggestFunction('main', null,
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-  }
-
-  test_inDartDoc_reference4() async {
-    addTestSource('''
-/// The [m^]
-main(aaa, bbb) {}''');
-    await computeSuggestions();
-    assertSuggestFunction('main', null,
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-  }
-
-  test_InstanceCreationExpression() async {
-    addTestSource('''
-class A {foo(){var f; {var x;}}}
-class B {B(this.x, [String boo]) { } int x;}
-class C {C.bar({boo: 'hoo', int z: 0}) { } }
-main() {new ^ String x = "hello";}''');
-    await computeSuggestions();
-    // Suggested by LocalConstructorContributor
-    assertNoSuggestions();
-  }
-
-  test_method_parameters_mixed_required_and_named() async {
-    addTestSource('''
-class A {
-  void m(x, {int y}) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_mixed_required_and_positional() async {
-    addTestSource('''
-class A {
-  void m(x, [int y]) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_named() async {
-    addTestSource('''
-class A {
-  void m({x, int y}) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_none() async {
-    addTestSource('''
-class A {
-  void m() {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_positional() async {
-    addTestSource('''
-class A {
-  void m([x, int y]) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_method_parameters_required() async {
-    addTestSource('''
-class A {
-  void m(x, int y) {}
-}
-class B extends A {
-  main() {^}
-}
-''');
-    await computeSuggestions();
-    assertNotSuggested('m');
-  }
-
-  test_missing_params_constructor() async {
-    addTestSource('class C1{C1{} main(){C^}}');
-    await computeSuggestions();
-  }
-
-  test_missing_params_function() async {
-    addTestSource('int f1{} main(){f^}');
-    await computeSuggestions();
-  }
-
-  test_missing_params_method() async {
-    addTestSource('class C1{int f1{} main(){f^}}');
-    await computeSuggestions();
-  }
-
-  test_overrides() async {
-    addTestSource('''
-class A {m() {}}
-class B extends A {m() {^}}
-''');
-    await computeSuggestions();
-    assertSuggestMethod('m', 'B', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
-  }
-
-  test_prioritization() async {
-    addTestSource('main() {var ab; var _ab; ^}');
-    await computeSuggestions();
-    assertSuggestLocalVariable('ab', null);
-    assertSuggestLocalVariable('_ab', null, relevance: DART_RELEVANCE_DEFAULT);
-  }
-
-  test_prioritization_private() async {
-    addTestSource('main() {var ab; var _ab; _^}');
-    await computeSuggestions();
-    assertSuggestLocalVariable('ab', null);
-    assertSuggestLocalVariable('_ab', null);
-  }
-
-  test_prioritization_public() async {
-    addTestSource('main() {var ab; var _ab; a^}');
-    await computeSuggestions();
-    assertSuggestLocalVariable('ab', null);
-    assertSuggestLocalVariable('_ab', null, relevance: DART_RELEVANCE_DEFAULT);
-  }
-
-  test_shadowed_name() async {
-    addTestSource('var a; class A { var a; m() { ^ } }');
-    await computeSuggestions();
-    assertSuggestField('a', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
-  }
-
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
     addSource(
@@ -660,7 +331,7 @@
     assertNotSuggested('main');
   }
 
-  test_AsExpression() async {
+  test_AsExpression_type() async {
     // SimpleIdentifier  TypeName  AsExpression
     addTestSource('''
         class A {var b; X _c; foo() {var a; (a as ^).foo();}''');
@@ -675,6 +346,38 @@
     assertNotSuggested('==');
   }
 
+  test_AsExpression_type_filter_extends() async {
+    // SimpleIdentifier  TypeName  AsExpression
+    addTestSource('''
+class A {} class B extends A {} class C extends A {} class D {}
+f(A a){ (a as ^) }''');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestClass('B');
+    assertSuggestClass('C');
+    assertNotSuggested('A');
+    assertNotSuggested('D');
+    assertNotSuggested('Object');
+  }
+
+  test_IsExpression_type_filter_implements() async {
+    // SimpleIdentifier  TypeName  AsExpression
+    addTestSource('''
+class A {} class B implements A {} class C implements A {} class D {}
+f(A a){ (a as ^) }''');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestClass('B');
+    assertSuggestClass('C');
+    assertNotSuggested('A');
+    assertNotSuggested('D');
+    assertNotSuggested('Object');
+  }
+
   test_AssignmentExpression_name() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement  Block
@@ -2003,6 +1706,41 @@
     //assertNotSuggested('T1');
   }
 
+  test_constructor_parameters_mixed_required_and_named() async {
+    addTestSource('class A {A(x, {int y}) {^}}');
+    await computeSuggestions();
+    assertSuggestParameter('x', null);
+    assertSuggestParameter('y', 'int');
+  }
+
+  test_constructor_parameters_mixed_required_and_positional() async {
+    addTestSource('class A {A(x, [int y]) {^}}');
+    await computeSuggestions();
+    assertSuggestParameter('x', null);
+    assertSuggestParameter('y', 'int');
+  }
+
+  test_constructor_parameters_named() async {
+    addTestSource('class A {A({x, int y}) {^}}');
+    await computeSuggestions();
+    assertSuggestParameter('x', null);
+    assertSuggestParameter('y', 'int');
+  }
+
+  test_constructor_parameters_positional() async {
+    addTestSource('class A {A([x, int y]) {^}}');
+    await computeSuggestions();
+    assertSuggestParameter('x', null);
+    assertSuggestParameter('y', 'int');
+  }
+
+  test_constructor_parameters_required() async {
+    addTestSource('class A {A(x, int y) {^}}');
+    await computeSuggestions();
+    assertSuggestParameter('x', null);
+    assertSuggestParameter('y', 'int');
+  }
+
   test_ConstructorName_importedClass() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
@@ -2136,6 +1874,22 @@
     assertNotSuggested('bar');
   }
 
+  test_enum() async {
+    addTestSource('enum E { one, two } main() {^}');
+    await computeSuggestions();
+    assertSuggestEnum('E');
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+  }
+
+  test_enum_deprecated() async {
+    addTestSource('@deprecated enum E { one, two } main() {^}');
+    await computeSuggestions();
+    assertSuggestEnum('E', isDeprecated: true);
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+  }
+
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
     addSource(
@@ -2216,6 +1970,39 @@
     assertNoSuggestions();
   }
 
+  test_ForEachStatement() async {
+    // SimpleIdentifier  ForEachStatement
+    addTestSource('main() {List<int> values; for (int index in ^)}');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestLocalVariable('values', 'List');
+    assertNotSuggested('index');
+  }
+
+  test_ForEachStatement2() async {
+    // SimpleIdentifier  ForEachStatement
+    addTestSource('main() {List<int> values; for (int index in i^)}');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset - 1);
+    expect(replacementLength, 1);
+    assertSuggestLocalVariable('values', 'List');
+    assertNotSuggested('index');
+  }
+
+  test_ForEachStatement3() async {
+    // SimpleIdentifier ParenthesizedExpression  ForEachStatement
+    addTestSource('main() {List<int> values; for (int index in (i^))}');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset - 1);
+    expect(replacementLength, 1);
+    assertSuggestLocalVariable('values', 'List');
+    assertNotSuggested('index');
+  }
+
   test_ForEachStatement_body_typed() async {
     // Block  ForEachStatement
     addTestSource('main(args) {for (int foo in bar) {^}}');
@@ -2304,39 +2091,6 @@
     assertNotSuggested('bar');
   }
 
-  test_ForEachStatement() async {
-    // SimpleIdentifier  ForEachStatement
-    addTestSource('main() {List<int> values; for (int index in ^)}');
-    await computeSuggestions();
-
-    expect(replacementOffset, completionOffset);
-    expect(replacementLength, 0);
-    assertSuggestLocalVariable('values', 'List');
-    assertNotSuggested('index');
-  }
-
-  test_ForEachStatement2() async {
-    // SimpleIdentifier  ForEachStatement
-    addTestSource('main() {List<int> values; for (int index in i^)}');
-    await computeSuggestions();
-
-    expect(replacementOffset, completionOffset - 1);
-    expect(replacementLength, 1);
-    assertSuggestLocalVariable('values', 'List');
-    assertNotSuggested('index');
-  }
-
-  test_ForEachStatement3() async {
-    // SimpleIdentifier ParenthesizedExpression  ForEachStatement
-    addTestSource('main() {List<int> values; for (int index in (i^))}');
-    await computeSuggestions();
-
-    expect(replacementOffset, completionOffset - 1);
-    expect(replacementLength, 1);
-    assertSuggestLocalVariable('values', 'List');
-    assertNotSuggested('index');
-  }
-
   test_ForStatement_body() async {
     // Block  ForStatement
     addTestSource('main(args) {for (int i; i < 10; ++i) {^}}');
@@ -2395,6 +2149,117 @@
     assertNotSuggested('bar');
   }
 
+  test_function_parameters_mixed_required_and_named() async {
+    addTestSource('''
+void m(x, {int y}) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
+        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
+  test_function_parameters_mixed_required_and_positional() async {
+    addTestSource('''
+void m(x, [int y]) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
+        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_function_parameters_named() async {
+    addTestSource('''
+void m({x, int y}) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
+        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
+  test_function_parameters_none() async {
+    addTestSource('''
+void m() {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
+        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    expect(suggestion.parameterNames, isEmpty);
+    expect(suggestion.parameterTypes, isEmpty);
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_function_parameters_positional() async {
+    addTestSource('''
+void m([x, int y]) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
+        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_function_parameters_required() async {
+    addTestSource('''
+void m(x, int y) {}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestFunction('m', 'void',
+        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 2);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
   test_FunctionDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
     addSource(
@@ -2588,6 +2453,13 @@
     assertNotSuggested('==');
   }
 
+  test_ignore_symbol_being_completed() async {
+    addTestSource('class MyClass { } main(MC^) { }');
+    await computeSuggestions();
+    assertSuggestClass('MyClass');
+    assertNotSuggested('MC');
+  }
+
   test_ImportDirective_dart() async {
     // SimpleStringLiteral  ImportDirective
     addTestSource('''
@@ -2598,6 +2470,26 @@
     assertNoSuggestions();
   }
 
+  test_inDartDoc_reference3() async {
+    addTestSource('''
+/// The [^]
+main(aaa, bbb) {}''');
+    await computeSuggestions();
+    assertSuggestFunction('main', null,
+        kind: CompletionSuggestionKind.IDENTIFIER,
+        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+  }
+
+  test_inDartDoc_reference4() async {
+    addTestSource('''
+/// The [m^]
+main(aaa, bbb) {}''');
+    await computeSuggestions();
+    assertSuggestFunction('main', null,
+        kind: CompletionSuggestionKind.IDENTIFIER,
+        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+  }
+
   test_IndexExpression() async {
     // ExpressionStatement  Block
     addSource(
@@ -2651,6 +2543,17 @@
     //assertNotSuggested('T1');
   }
 
+  test_InstanceCreationExpression() async {
+    addTestSource('''
+class A {foo(){var f; {var x;}}}
+class B {B(this.x, [String boo]) { } int x;}
+class C {C.bar({boo: 'hoo', int z: 0}) { } }
+main() {new ^ String x = "hello";}''');
+    await computeSuggestions();
+    // Suggested by LocalConstructorContributor
+    assertNoSuggestions();
+  }
+
   test_InstanceCreationExpression_imported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
     addSource(
@@ -2879,6 +2782,38 @@
     assertNotSuggested('Object');
   }
 
+  test_IsExpression_type_filter_extends() async {
+    // SimpleIdentifier  TypeName  IsExpression  IfStatement
+    addTestSource('''
+class A {} class B extends A {} class C extends A {} class D {}
+f(A a){ if (a is ^) {}}''');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestClass('B');
+    assertSuggestClass('C');
+    assertNotSuggested('A');
+    assertNotSuggested('D');
+    assertNotSuggested('Object');
+  }
+
+  test_IsExpression_type_subtype_implements_filter() async {
+    // SimpleIdentifier  TypeName  IsExpression  IfStatement
+    addTestSource('''
+class A {} class B extends A {} class C implements A {} class D {}
+f(A a){ if (a is ^) {}}''');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestClass('B');
+    assertSuggestClass('C');
+    assertNotSuggested('A');
+    assertNotSuggested('D');
+    assertNotSuggested('Object');
+  }
+
   test_keyword() async {
     addSource(
         '/testB.dart',
@@ -2936,6 +2871,14 @@
     assertNoSuggestions();
   }
 
+  test_localVariableDeclarationName() async {
+    addTestSource('main() {String m^}');
+    await computeSuggestions();
+
+    assertNotSuggested('main');
+    assertNotSuggested('min');
+  }
+
   test_MapLiteralEntry() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
     addSource(
@@ -3018,6 +2961,84 @@
         relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
   }
 
+  test_method_parameters_mixed_required_and_named() async {
+    addTestSource('''
+class A {
+  void m(x, {int y}) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_mixed_required_and_positional() async {
+    addTestSource('''
+class A {
+  void m(x, [int y]) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_named() async {
+    addTestSource('''
+class A {
+  void m({x, int y}) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_none() async {
+    addTestSource('''
+class A {
+  void m() {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_positional() async {
+    addTestSource('''
+class A {
+  void m([x, int y]) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
+  test_method_parameters_required() async {
+    addTestSource('''
+class A {
+  void m(x, int y) {}
+}
+class B extends A {
+  main() {^}
+}
+''');
+    await computeSuggestions();
+    assertNotSuggested('m');
+  }
+
   test_MethodDeclaration_body_getters() async {
     // Block  BlockFunctionBody  MethodDeclaration
     addTestSource('class A {@deprecated X get f => 0; Z a() {^} get _g => 1;}');
@@ -3347,6 +3368,21 @@
     assertNotSuggested('==');
   }
 
+  test_missing_params_constructor() async {
+    addTestSource('class C1{C1{} main(){C^}}');
+    await computeSuggestions();
+  }
+
+  test_missing_params_function() async {
+    addTestSource('int f1{} main(){f^}');
+    await computeSuggestions();
+  }
+
+  test_missing_params_method() async {
+    addTestSource('class C1{int f1{} main(){f^}}');
+    await computeSuggestions();
+  }
+
   test_new_instance() async {
     addTestSource('import "dart:math"; class A {x() {new Random().^}}');
     await computeSuggestions();
@@ -3359,6 +3395,15 @@
     assertNotSuggested('A');
   }
 
+  test_overrides() async {
+    addTestSource('''
+class A {m() {}}
+class B extends A {m() {^}}
+''');
+    await computeSuggestions();
+    assertSuggestMethod('m', 'B', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
+  }
+
   test_parameterName_excludeTypes() async {
     addTestSource('m(int ^) {}');
     await computeSuggestions();
@@ -3798,14 +3843,6 @@
     assertNotSuggested('length');
   }
 
-  test_localVariableDeclarationName() async {
-    addTestSource('main() {String m^}');
-    await computeSuggestions();
-
-    assertNotSuggested('main');
-    assertNotSuggested('min');
-  }
-
   test_PrefixedIdentifier_trailingStmt_param2() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
     addTestSource('f(String g) {g.^ int y = 0;}');
@@ -3822,6 +3859,27 @@
     assertNotSuggested('length');
   }
 
+  test_prioritization() async {
+    addTestSource('main() {var ab; var _ab; ^}');
+    await computeSuggestions();
+    assertSuggestLocalVariable('ab', null);
+    assertSuggestLocalVariable('_ab', null, relevance: DART_RELEVANCE_DEFAULT);
+  }
+
+  test_prioritization_private() async {
+    addTestSource('main() {var ab; var _ab; _^}');
+    await computeSuggestions();
+    assertSuggestLocalVariable('ab', null);
+    assertSuggestLocalVariable('_ab', null);
+  }
+
+  test_prioritization_public() async {
+    addTestSource('main() {var ab; var _ab; a^}');
+    await computeSuggestions();
+    assertSuggestLocalVariable('ab', null);
+    assertSuggestLocalVariable('_ab', null, relevance: DART_RELEVANCE_DEFAULT);
+  }
+
   test_PropertyAccess_expression() async {
     // SimpleIdentifier  MethodInvocation  PropertyAccess  ExpressionStatement
     addTestSource('class A {a() {"hello".to^String().length}}');
@@ -3868,6 +3926,12 @@
     assertNotSuggested('==');
   }
 
+  test_shadowed_name() async {
+    addTestSource('var a; class A { var a; m() { ^ } }');
+    await computeSuggestions();
+    assertSuggestField('a', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
+  }
+
   test_SwitchStatement_c() async {
     // SwitchStatement  Block  BlockFunctionBody  MethodDeclaration
     addTestSource('class A {String g(int x) {switch(x) {c^}}}');
diff --git a/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
index 0ac517b..b633efd 100644
--- a/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
@@ -7,12 +7,12 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/named_constructor_contributor.dart';
+import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../../utils.dart';
 import 'completion_contributor_util.dart';
-import 'package:analyzer/src/generated/source.dart';
 
 main() {
   initializeTestEnvironment();
diff --git a/pkg/analysis_server/test/services/completion/dart/optype_test.dart b/pkg/analysis_server/test/services/completion/dart/optype_test.dart
index bc7da40..455495c 100644
--- a/pkg/analysis_server/test/services/completion/dart/optype_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/optype_test.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:plugin/manager.dart';
@@ -48,6 +48,7 @@
   void assertOpType(
       {bool caseLabel: false,
       bool constructors: false,
+      bool namedArgs: false,
       bool prefixed: false,
       bool returnValue: false,
       bool statementLabel: false,
@@ -58,6 +59,8 @@
     expect(visitor.includeCaseLabelSuggestions, caseLabel, reason: 'caseLabel');
     expect(visitor.includeConstructorSuggestions, constructors,
         reason: 'constructors');
+    expect(visitor.includeNamedArgumentSuggestions, namedArgs,
+        reason: 'namedArgs');
     expect(visitor.includeReturnValueSuggestions, returnValue,
         reason: 'returnValue');
     expect(visitor.includeStatementLabelSuggestions, statementLabel,
@@ -88,10 +91,36 @@
 
   test_ArgumentList() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addTestSource('void main() {expect(^)}');
+    addTestSource('void main() {expect(^)}', resolved: false);
+    // If "expect()" were resolved, then either namedArgs would be true
+    // or returnValue and typeNames would be true.
+    assertOpType(namedArgs: true, returnValue: true, typeNames: true);
+  }
+
+  test_ArgumentList_resolved() {
+    // ArgumentList  MethodInvocation  ExpressionStatement  Block
+    addTestSource('void main() {int.parse(^)}', resolved: true);
     assertOpType(returnValue: true, typeNames: true);
   }
 
+  test_ArgumentList_resolved_1_0() {
+    // ArgumentList  MethodInvocation  ExpressionStatement  Block
+    addTestSource('main() { foo(^);} foo({one, two}) {}', resolved: true);
+    assertOpType(namedArgs: true);
+  }
+
+  test_ArgumentList_resolved_1_1() {
+    // ArgumentList  MethodInvocation  ExpressionStatement  Block
+    addTestSource('main() { foo(o^);} foo({one, two}) {}', resolved: true);
+    assertOpType(namedArgs: true);
+  }
+
+  test_ArgumentList_resolved_2_0() {
+    // ArgumentList  MethodInvocation  ExpressionStatement  Block
+    addTestSource('void main() {int.parse("16", ^)}', resolved: true);
+    assertOpType(namedArgs: true);
+  }
+
   test_ArgumentList_namedParam() {
     // SimpleIdentifier  NamedExpression  ArgumentList  MethodInvocation
     // ExpressionStatement
diff --git a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
index 6efd8ab..878fbdb7 100644
--- a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
@@ -36,53 +36,6 @@
     assertSuggestField('values', 'List<E>', isDeprecated: true);
   }
 
-  test_PrefixedIdentifier_class_const() async {
-    // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
-    addSource(
-        '/testB.dart',
-        '''
-        lib B;
-        class I {
-          static const scI = 'boo';
-          X get f => new A();
-          get _g => new A();}
-        class B implements I {
-          static const int scB = 12;
-          var b; X _c;
-          X get d => new A();get _e => new A();
-          set s1(I x) {} set _s2(I x) {}
-          m(X x) {} I _n(X x) {}}
-        class X{}''');
-    addTestSource('''
-        import "/testB.dart";
-        class A extends B {
-          static const String scA = 'foo';
-          w() { }}
-        main() {A.^}''');
-    await computeSuggestions();
-    expect(replacementOffset, completionOffset);
-    expect(replacementLength, 0);
-    assertSuggestField('scA', 'String');
-    assertNotSuggested('scB');
-    assertNotSuggested('scI');
-    assertNotSuggested('b');
-    assertNotSuggested('_c');
-    assertNotSuggested('d');
-    assertNotSuggested('_e');
-    assertNotSuggested('f');
-    assertNotSuggested('_g');
-    assertNotSuggested('s1');
-    assertNotSuggested('_s2');
-    assertNotSuggested('m');
-    assertNotSuggested('_n');
-    assertNotSuggested('a');
-    assertNotSuggested('A');
-    assertNotSuggested('X');
-    assertNotSuggested('w');
-    assertNotSuggested('Object');
-    assertNotSuggested('==');
-  }
-
   test_enumConst() async {
     addTestSource('enum E { one, two } main() {E.^}');
     await computeSuggestions();
@@ -286,4 +239,51 @@
     await computeSuggestions();
     assertSuggestMethod('wait', 'Future', 'Future<dynamic>');
   }
+
+  test_PrefixedIdentifier_class_const() async {
+    // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
+    addSource(
+        '/testB.dart',
+        '''
+        lib B;
+        class I {
+          static const scI = 'boo';
+          X get f => new A();
+          get _g => new A();}
+        class B implements I {
+          static const int scB = 12;
+          var b; X _c;
+          X get d => new A();get _e => new A();
+          set s1(I x) {} set _s2(I x) {}
+          m(X x) {} I _n(X x) {}}
+        class X{}''');
+    addTestSource('''
+        import "/testB.dart";
+        class A extends B {
+          static const String scA = 'foo';
+          w() { }}
+        main() {A.^}''');
+    await computeSuggestions();
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestField('scA', 'String');
+    assertNotSuggested('scB');
+    assertNotSuggested('scI');
+    assertNotSuggested('b');
+    assertNotSuggested('_c');
+    assertNotSuggested('d');
+    assertNotSuggested('_e');
+    assertNotSuggested('f');
+    assertNotSuggested('_g');
+    assertNotSuggested('s1');
+    assertNotSuggested('_s2');
+    assertNotSuggested('m');
+    assertNotSuggested('_n');
+    assertNotSuggested('a');
+    assertNotSuggested('A');
+    assertNotSuggested('X');
+    assertNotSuggested('w');
+    assertNotSuggested('Object');
+    assertNotSuggested('==');
+  }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/test_all.dart b/pkg/analysis_server/test/services/completion/dart/test_all.dart
index b936392..1d395ac 100644
--- a/pkg/analysis_server/test/services/completion/dart/test_all.dart
+++ b/pkg/analysis_server/test/services/completion/dart/test_all.dart
@@ -9,8 +9,8 @@
 import '../../../utils.dart';
 import 'arglist_contributor_test.dart' as arglist_test;
 import 'combinator_contributor_test.dart' as combinator_test;
-import 'completion_manager_test.dart' as completion_manager;
 import 'common_usage_sorter_test.dart' as common_usage_test;
+import 'completion_manager_test.dart' as completion_manager;
 import 'field_formal_contributor_test.dart' as field_formal_contributor_test;
 import 'imported_reference_contributor_test.dart' as imported_ref_test;
 import 'inherited_reference_contributor_test.dart' as inherited_ref_test;
@@ -35,8 +35,8 @@
   group('dart/completion', () {
     arglist_test.main();
     combinator_test.main();
-    completion_manager.main();
     common_usage_test.main();
+    completion_manager.main();
     field_formal_contributor_test.main();
     imported_ref_test.main();
     inherited_ref_test.main();
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 8d176b8..1a74e78 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
@@ -53,573 +53,18 @@
     }
   }
 
-  fail_test_PrefixedIdentifier_trailingStmt_const_untyped() async {
-    // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addTestSource('const g = "hello"; f() {g.^ int y = 0;}');
-    await computeSuggestions();
-    assertSuggestGetter('length', 'int');
-  }
-
   @override
   DartCompletionContributor createContributor() {
     return new TypeMemberContributor();
   }
 
-  test_enumConst() async {
-    addTestSource('enum E { one, two } main() {E.^}');
-    await computeSuggestions();
-    assertNotSuggested('E');
-    // Suggested by StaticMemberContributor
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-    assertNotSuggested('index');
-    assertNotSuggested('values');
-  }
-
-  test_enumConst2() async {
-    addTestSource('enum E { one, two } main() {E.o^}');
-    await computeSuggestions();
-    assertNotSuggested('E');
-    // Suggested by StaticMemberContributor
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-    assertNotSuggested('index');
-    assertNotSuggested('values');
-  }
-
-  test_enumConst3() async {
-    addTestSource('enum E { one, two } main() {E.^ int g;}');
-    await computeSuggestions();
-    assertNotSuggested('E');
-    // Suggested by StaticMemberContributor
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-    assertNotSuggested('index');
-    assertNotSuggested('values');
-  }
-
-  test_enumConst_index() async {
-    addTestSource('enum E { one, two } main() {E.one.^}');
-    await computeSuggestions();
-    assertNotSuggested('E');
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-    assertSuggestField('index', 'int');
-    assertNotSuggested('values');
-  }
-
-  test_enumConst_index2() async {
-    addTestSource('enum E { one, two } main() {E.one.i^}');
-    await computeSuggestions();
-    assertNotSuggested('E');
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-    assertSuggestField('index', 'int');
-    assertNotSuggested('values');
-  }
-
-  test_enumConst_index3() async {
-    addTestSource('enum E { one, two } main() {E.one.^ int g;}');
-    await computeSuggestions();
-    assertNotSuggested('E');
-    assertNotSuggested('one');
-    assertNotSuggested('two');
-    assertSuggestField('index', 'int');
-    assertNotSuggested('values');
-  }
-
-  test_generic_field() async {
-    addTestSource('''
-class C<T> {
-  T t;
-}
-void f(C<int> c) {
-  c.^
-}
-''');
-    await computeSuggestions();
-    assertSuggestField('t', 'int');
-  }
-
-  test_generic_getter() async {
-    addTestSource('''
-class C<T> {
-  T get t => null;
-}
-void f(C<int> c) {
-  c.^
-}
-''');
-    await computeSuggestions();
-    assertSuggestGetter('t', 'int');
-  }
-
-  test_generic_method() async {
-    addTestSource('''
-class C<T> {
-  T m(T t) {}
-}
-void f(C<int> c) {
-  c.^
-}
-''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'int');
-    expect(suggestion.parameterTypes[0], 'int');
-    expect(suggestion.element.returnType, 'int');
-    expect(suggestion.element.parameters, '(int t)');
-  }
-
-  test_generic_setter() async {
-    addTestSource('''
-class C<T> {
-  set t(T value) {}
-}
-void f(C<int> c) {
-  c.^
-}
-''');
-    await computeSuggestions();
-    // TODO(paulberry): modify assertSuggestSetter so that we can pass 'int'
-    // as a parmeter to it, and it will check the appropriate field in
-    // the suggestion object.
-    CompletionSuggestion suggestion = assertSuggestSetter('t');
-    expect(suggestion.element.parameters, '(int value)');
-  }
-
-  test_keyword() async {
-    addTestSource('class C { static C get instance => null; } main() {C.in^}');
-    await computeSuggestions();
-    // Suggested by StaticMemberContributor
-    assertNotSuggested('instance');
-  }
-
-  test_libraryPrefix() async {
+  fail_test_PrefixedIdentifier_trailingStmt_const_untyped() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addTestSource('import "dart:async" as bar; foo() {bar.^}');
-    await computeSuggestions();
-    // Suggested by LibraryMemberContributor
-    assertNotSuggested('Future');
-    assertNotSuggested('loadLibrary');
-  }
-
-  test_libraryPrefix2() async {
-    // SimpleIdentifier  MethodInvocation  ExpressionStatement
-    addTestSource('import "dart:async" as bar; foo() {bar.^ print("f")}');
-    await computeSuggestions();
-    // Suggested by LibraryMemberContributor
-    assertNotSuggested('Future');
-  }
-
-  test_libraryPrefix3() async {
-    // SimpleIdentifier  MethodInvocation  ExpressionStatement
-    addTestSource('import "dart:async" as bar; foo() {new bar.F^ print("f")}');
-    await computeSuggestions();
-    // Suggested by LibraryMemberContributor
-    assertNotSuggested('Future');
-    assertNotSuggested('Future.delayed');
-  }
-
-  test_libraryPrefix_deferred() async {
-    // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addTestSource('import "dart:async" deferred as bar; foo() {bar.^}');
-    await computeSuggestions();
-    // Suggested by LibraryMemberContributor
-    assertNotSuggested('Future');
-    assertNotSuggested('loadLibrary');
-  }
-
-  test_libraryPrefix_with_exports() async {
-    addSource('/libA.dart', 'library libA; class A { }');
-    addSource('/libB.dart', 'library libB; export "/libA.dart"; class B { }');
-    addTestSource('import "/libB.dart" as foo; main() {foo.^} class C { }');
-    await computeSuggestions();
-    // Suggested by LibraryMemberContributor
-    assertNotSuggested('B');
-    assertNotSuggested('A');
-  }
-
-  test_local() async {
-    addTestSource('foo() {String x = "bar"; x.^}');
+    addTestSource('const g = "hello"; f() {g.^ int y = 0;}');
     await computeSuggestions();
     assertSuggestGetter('length', 'int');
   }
 
-  test_local_is() async {
-    addTestSource('foo() {var x; if (x is String) x.^}');
-    await computeSuggestions();
-    assertSuggestGetter('length', 'int');
-  }
-
-  test_local_propogatedType() async {
-    addTestSource('foo() {var x = "bar"; x.^}');
-    await computeSuggestions();
-    assertSuggestGetter('length', 'int');
-  }
-
-  test_method_parameters_mixed_required_and_named() async {
-    addTestSource('''
-class C {
-  void m(x, {int y}) {}
-}
-void main() {new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_method_parameters_mixed_required_and_positional() async {
-    addTestSource('''
-class C {
-  void m(x, [int y]) {}
-}
-void main() {new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_method_parameters_named() async {
-    addTestSource('''
-class C {
-  void m({x, int y}) {}
-}
-void main() {new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, true);
-  }
-
-  test_method_parameters_none() async {
-    addTestSource('''
-class C {
-  void m() {}
-}
-void main() {new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
-    expect(suggestion.parameterNames, isEmpty);
-    expect(suggestion.parameterTypes, isEmpty);
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_method_parameters_positional() async {
-    addTestSource('''
-class C {
-  void m([x, int y]) {}
-}
-void main() {new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 0);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_method_parameters_required() async {
-    addTestSource('''
-class C {
-  void m(x, int y) {}
-}
-void main() {new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
-    expect(suggestion.parameterNames, hasLength(2));
-    expect(suggestion.parameterNames[0], 'x');
-    expect(suggestion.parameterTypes[0], 'dynamic');
-    expect(suggestion.parameterNames[1], 'y');
-    expect(suggestion.parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 2);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  test_no_parameters_field() async {
-    addTestSource('''
-class C {
-  int x;
-}
-void main() {new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestField('x', 'int');
-    assertHasNoParameterInfo(suggestion);
-  }
-
-  test_no_parameters_getter() async {
-    addTestSource('''
-class C {
-  int get x => null;
-}
-void main() {int y = new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestGetter('x', 'int');
-    assertHasNoParameterInfo(suggestion);
-  }
-
-  test_no_parameters_setter() async {
-    addTestSource('''
-class C {
-  set x(int value) {};
-}
-void main() {int y = new C().^}''');
-    await computeSuggestions();
-    CompletionSuggestion suggestion = assertSuggestSetter('x');
-    assertHasNoParameterInfo(suggestion);
-  }
-
-  test_only_instance() async {
-    // SimpleIdentifier  PropertyAccess  ExpressionStatement
-    addTestSource('''
-class C {
-  int f1;
-  static int f2;
-  m1() {}
-  static m2() {}
-}
-void main() {new C().^}''');
-    await computeSuggestions();
-    assertSuggestField('f1', 'int');
-    assertNotSuggested('f2');
-    assertSuggestMethod('m1', 'C', null);
-    assertNotSuggested('m2');
-  }
-
-  test_only_instance2() async {
-    // SimpleIdentifier  MethodInvocation  ExpressionStatement
-    addTestSource('''
-class C {
-  int f1;
-  static int f2;
-  m1() {}
-  static m2() {}
-}
-void main() {new C().^ print("something");}''');
-    await computeSuggestions();
-    assertSuggestField('f1', 'int');
-    assertNotSuggested('f2');
-    assertSuggestMethod('m1', 'C', null);
-    assertNotSuggested('m2');
-  }
-
-  test_only_static() async {
-    // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addTestSource('''
-class C {
-  int f1;
-  static int f2;
-  m1() {}
-  static m2() {}
-}
-void main() {C.^}''');
-    await computeSuggestions();
-    assertNotSuggested('f1');
-    // Suggested by StaticMemberContributor
-    assertNotSuggested('f2');
-    assertNotSuggested('m1');
-    assertNotSuggested('m2');
-  }
-
-  test_only_static2() async {
-    // SimpleIdentifier  MethodInvocation  ExpressionStatement
-    addTestSource('''
-class C {
-  int f1;
-  static int f2;
-  m1() {}
-  static m2() {}
-}
-void main() {C.^ print("something");}''');
-    await computeSuggestions();
-    assertNotSuggested('f1');
-    // Suggested by StaticMemberContributor
-    assertNotSuggested('f2');
-    assertNotSuggested('m1');
-    assertNotSuggested('m2');
-  }
-
-  test_param() async {
-    addTestSource('foo(String x) {x.^}');
-    await computeSuggestions();
-    assertSuggestGetter('length', 'int');
-  }
-
-  test_param_is() async {
-    addTestSource('foo(x) {if (x is String) x.^}');
-    await computeSuggestions();
-    assertSuggestGetter('length', 'int');
-  }
-
-  test_shadowing_field_over_field() =>
-      check_shadowing('int x;', 'int x;', true);
-
-  test_shadowing_field_over_getter() =>
-      check_shadowing('int x;', 'int get x => null;', true);
-
-  test_shadowing_field_over_method() =>
-      check_shadowing('int x;', 'void x() {}', true);
-
-  test_shadowing_field_over_setter() =>
-      check_shadowing('int x;', 'set x(int value) {}', true);
-
-  test_shadowing_getter_over_field() =>
-      check_shadowing('int get x => null;', 'int x;', false);
-
-  test_shadowing_getter_over_getter() =>
-      check_shadowing('int get x => null;', 'int get x => null;', true);
-
-  test_shadowing_getter_over_method() =>
-      check_shadowing('int get x => null;', 'void x() {}', true);
-
-  test_shadowing_getter_over_setter() =>
-      check_shadowing('int get x => null;', 'set x(int value) {}', false);
-
-  test_shadowing_method_over_field() =>
-      check_shadowing('void x() {}', 'int x;', true);
-
-  test_shadowing_method_over_getter() =>
-      check_shadowing('void x() {}', 'int get x => null;', true);
-
-  test_shadowing_method_over_method() =>
-      check_shadowing('void x() {}', 'void x() {}', true);
-
-  test_shadowing_method_over_setter() =>
-      check_shadowing('void x() {}', 'set x(int value) {}', true);
-
-  test_shadowing_mixin_order() async {
-    addTestSource('''
-class Base {
-}
-class Mixin1 {
-  void f() {}
-}
-class Mixin2 {
-  void f() {}
-}
-class Derived extends Base with Mixin1, Mixin2 {
-}
-void test(Derived d) {
-  d.^
-}
-''');
-    await computeSuggestions();
-    // Note: due to dartbug.com/22069, analyzer currently analyzes mixins in
-    // reverse order.  The correct order is that Derived inherits from
-    // "Base with Mixin1, Mixin2", which inherits from "Base with Mixin1",
-    // which inherits from "Base".  So the definition of f in Mixin2 should
-    // shadow the definition in Mixin1.
-    assertSuggestMethod('f', 'Mixin2', 'void');
-  }
-
-  test_shadowing_mixin_over_superclass() async {
-    addTestSource('''
-class Base {
-  void f() {}
-}
-class Mixin {
-  void f() {}
-}
-class Derived extends Base with Mixin {
-}
-void test(Derived d) {
-  d.^
-}
-''');
-    await computeSuggestions();
-    assertSuggestMethod('f', 'Mixin', 'void');
-  }
-
-  test_shadowing_setter_over_field() =>
-      check_shadowing('set x(int value) {}', 'int x;', false);
-
-  test_shadowing_setter_over_getter() =>
-      check_shadowing('set x(int value) {}', 'int get x => null;', false);
-
-  test_shadowing_setter_over_method() =>
-      check_shadowing('set x(int value) {}', 'void x() {}', true);
-
-  test_shadowing_setter_over_setter() =>
-      check_shadowing('set x(int value) {}', 'set x(int value) {}', true);
-
-  test_shadowing_superclass_over_interface() async {
-    addTestSource('''
-class Base {
-  void f() {}
-}
-class Interface {
-  void f() {}
-}
-class Derived extends Base implements Interface {
-}
-void test(Derived d) {
-  d.^
-}
-''');
-    await computeSuggestions();
-    assertSuggestMethod('f', 'Base', 'void');
-  }
-
-  test_super() async {
-    // SimpleIdentifier  MethodInvocation  ExpressionStatement
-    addTestSource('''
-class C3 {
-  int fi3;
-  static int fs3;
-  m() {}
-  mi3() {}
-  static ms3() {}
-}
-class C2 {
-  int fi2;
-  static int fs2;
-  m() {}
-  mi2() {}
-  static ms2() {}
-}
-class C1 extends C2 implements C3 {
-  int fi1;
-  static int fs1;
-  m() {super.^}
-  mi1() {}
-  static ms1() {}
-}''');
-    await computeSuggestions();
-    assertNotSuggested('fi1');
-    assertNotSuggested('fs1');
-    assertNotSuggested('mi1');
-    assertNotSuggested('ms1');
-    assertSuggestField('fi2', 'int');
-    assertNotSuggested('fs2');
-    assertSuggestMethod('mi2', 'C2', null);
-    assertNotSuggested('ms2');
-    assertSuggestMethod('m', 'C2', null, relevance: DART_RELEVANCE_HIGH);
-    assertNotSuggested('fi3');
-    assertNotSuggested('fs3');
-    assertNotSuggested('mi3');
-    assertNotSuggested('ms3');
-  }
-
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
     addSource(
@@ -2272,6 +1717,69 @@
     assertNotSuggested('bar');
   }
 
+  test_enumConst() async {
+    addTestSource('enum E { one, two } main() {E.^}');
+    await computeSuggestions();
+    assertNotSuggested('E');
+    // Suggested by StaticMemberContributor
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+    assertNotSuggested('index');
+    assertNotSuggested('values');
+  }
+
+  test_enumConst2() async {
+    addTestSource('enum E { one, two } main() {E.o^}');
+    await computeSuggestions();
+    assertNotSuggested('E');
+    // Suggested by StaticMemberContributor
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+    assertNotSuggested('index');
+    assertNotSuggested('values');
+  }
+
+  test_enumConst3() async {
+    addTestSource('enum E { one, two } main() {E.^ int g;}');
+    await computeSuggestions();
+    assertNotSuggested('E');
+    // Suggested by StaticMemberContributor
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+    assertNotSuggested('index');
+    assertNotSuggested('values');
+  }
+
+  test_enumConst_index() async {
+    addTestSource('enum E { one, two } main() {E.one.^}');
+    await computeSuggestions();
+    assertNotSuggested('E');
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+    assertSuggestField('index', 'int');
+    assertNotSuggested('values');
+  }
+
+  test_enumConst_index2() async {
+    addTestSource('enum E { one, two } main() {E.one.i^}');
+    await computeSuggestions();
+    assertNotSuggested('E');
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+    assertSuggestField('index', 'int');
+    assertNotSuggested('values');
+  }
+
+  test_enumConst_index3() async {
+    addTestSource('enum E { one, two } main() {E.one.^ int g;}');
+    await computeSuggestions();
+    assertNotSuggested('E');
+    assertNotSuggested('one');
+    assertNotSuggested('two');
+    assertSuggestField('index', 'int');
+    assertNotSuggested('values');
+  }
+
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
     addSource(
@@ -2588,6 +2096,65 @@
     assertNotSuggested('Object');
   }
 
+  test_generic_field() async {
+    addTestSource('''
+class C<T> {
+  T t;
+}
+void f(C<int> c) {
+  c.^
+}
+''');
+    await computeSuggestions();
+    assertSuggestField('t', 'int');
+  }
+
+  test_generic_getter() async {
+    addTestSource('''
+class C<T> {
+  T get t => null;
+}
+void f(C<int> c) {
+  c.^
+}
+''');
+    await computeSuggestions();
+    assertSuggestGetter('t', 'int');
+  }
+
+  test_generic_method() async {
+    addTestSource('''
+class C<T> {
+  T m(T t) {}
+}
+void f(C<int> c) {
+  c.^
+}
+''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'int');
+    expect(suggestion.parameterTypes[0], 'int');
+    expect(suggestion.element.returnType, 'int');
+    expect(suggestion.element.parameters, '(int t)');
+  }
+
+  test_generic_setter() async {
+    addTestSource('''
+class C<T> {
+  set t(T value) {}
+}
+void f(C<int> c) {
+  c.^
+}
+''');
+    await computeSuggestions();
+    // TODO(paulberry): modify assertSuggestSetter so that we can pass 'int'
+    // as a parmeter to it, and it will check the appropriate field in
+    // the suggestion object.
+    CompletionSuggestion suggestion = assertSuggestSetter('t');
+    expect(suggestion.element.parameters, '(int value)');
+  }
+
   test_IfStatement() async {
     // SimpleIdentifier  IfStatement
     addTestSource('''
@@ -2910,6 +2477,13 @@
     assertNotSuggested('Object');
   }
 
+  test_keyword() async {
+    addTestSource('class C { static C get instance => null; } main() {C.in^}');
+    await computeSuggestions();
+    // Suggested by StaticMemberContributor
+    assertNotSuggested('instance');
+  }
+
   test_keyword2() async {
     addSource(
         '/testB.dart',
@@ -2937,6 +2511,51 @@
     assertNotSuggested('newer');
   }
 
+  test_libraryPrefix() async {
+    // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
+    addTestSource('import "dart:async" as bar; foo() {bar.^}');
+    await computeSuggestions();
+    // Suggested by LibraryMemberContributor
+    assertNotSuggested('Future');
+    assertNotSuggested('loadLibrary');
+  }
+
+  test_libraryPrefix2() async {
+    // SimpleIdentifier  MethodInvocation  ExpressionStatement
+    addTestSource('import "dart:async" as bar; foo() {bar.^ print("f")}');
+    await computeSuggestions();
+    // Suggested by LibraryMemberContributor
+    assertNotSuggested('Future');
+  }
+
+  test_libraryPrefix3() async {
+    // SimpleIdentifier  MethodInvocation  ExpressionStatement
+    addTestSource('import "dart:async" as bar; foo() {new bar.F^ print("f")}');
+    await computeSuggestions();
+    // Suggested by LibraryMemberContributor
+    assertNotSuggested('Future');
+    assertNotSuggested('Future.delayed');
+  }
+
+  test_libraryPrefix_deferred() async {
+    // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
+    addTestSource('import "dart:async" deferred as bar; foo() {bar.^}');
+    await computeSuggestions();
+    // Suggested by LibraryMemberContributor
+    assertNotSuggested('Future');
+    assertNotSuggested('loadLibrary');
+  }
+
+  test_libraryPrefix_with_exports() async {
+    addSource('/libA.dart', 'library libA; class A { }');
+    addSource('/libB.dart', 'library libB; export "/libA.dart"; class B { }');
+    addTestSource('import "/libB.dart" as foo; main() {foo.^} class C { }');
+    await computeSuggestions();
+    // Suggested by LibraryMemberContributor
+    assertNotSuggested('B');
+    assertNotSuggested('A');
+  }
+
   test_Literal_list() async {
     // ']'  ListLiteral  ArgumentList  MethodInvocation
     addTestSource('main() {var Some; print([^]);}');
@@ -2960,6 +2579,31 @@
     assertNoSuggestions();
   }
 
+  test_local() async {
+    addTestSource('foo() {String x = "bar"; x.^}');
+    await computeSuggestions();
+    assertSuggestGetter('length', 'int');
+  }
+
+  test_local_is() async {
+    addTestSource('foo() {var x; if (x is String) x.^}');
+    await computeSuggestions();
+    assertSuggestGetter('length', 'int');
+  }
+
+  test_local_propogatedType() async {
+    addTestSource('foo() {var x = "bar"; x.^}');
+    await computeSuggestions();
+    assertSuggestGetter('length', 'int');
+  }
+
+  test_localVariableDeclarationName() async {
+    addTestSource('main() {String m^}');
+    await computeSuggestions();
+    assertNotSuggested('main');
+    assertNotSuggested('min');
+  }
+
   test_MapLiteralEntry() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
     addSource(
@@ -3033,6 +2677,105 @@
     assertNotSuggested('T2');
   }
 
+  test_method_parameters_mixed_required_and_named() async {
+    addTestSource('''
+class C {
+  void m(x, {int y}) {}
+}
+void main() {new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
+  test_method_parameters_mixed_required_and_positional() async {
+    addTestSource('''
+class C {
+  void m(x, [int y]) {}
+}
+void main() {new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_method_parameters_named() async {
+    addTestSource('''
+class C {
+  void m({x, int y}) {}
+}
+void main() {new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, true);
+  }
+
+  test_method_parameters_none() async {
+    addTestSource('''
+class C {
+  void m() {}
+}
+void main() {new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
+    expect(suggestion.parameterNames, isEmpty);
+    expect(suggestion.parameterTypes, isEmpty);
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_method_parameters_positional() async {
+    addTestSource('''
+class C {
+  void m([x, int y]) {}
+}
+void main() {new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 0);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  test_method_parameters_required() async {
+    addTestSource('''
+class C {
+  void m(x, int y) {}
+}
+void main() {new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestMethod('m', 'C', 'void');
+    expect(suggestion.parameterNames, hasLength(2));
+    expect(suggestion.parameterNames[0], 'x');
+    expect(suggestion.parameterTypes[0], 'dynamic');
+    expect(suggestion.parameterNames[1], 'y');
+    expect(suggestion.parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 2);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
   test_MethodDeclaration_body_getters() async {
     // Block  BlockFunctionBody  MethodDeclaration
     addTestSource('class A {@deprecated X get f => 0; Z a() {^} get _g => 1;}');
@@ -3290,6 +3033,121 @@
     assertNotSuggested('A');
   }
 
+  test_no_parameters_field() async {
+    addTestSource('''
+class C {
+  int x;
+}
+void main() {new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestField('x', 'int');
+    assertHasNoParameterInfo(suggestion);
+  }
+
+  test_no_parameters_getter() async {
+    addTestSource('''
+class C {
+  int get x => null;
+}
+void main() {int y = new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestGetter('x', 'int');
+    assertHasNoParameterInfo(suggestion);
+  }
+
+  test_no_parameters_setter() async {
+    addTestSource('''
+class C {
+  set x(int value) {};
+}
+void main() {int y = new C().^}''');
+    await computeSuggestions();
+    CompletionSuggestion suggestion = assertSuggestSetter('x');
+    assertHasNoParameterInfo(suggestion);
+  }
+
+  test_only_instance() async {
+    // SimpleIdentifier  PropertyAccess  ExpressionStatement
+    addTestSource('''
+class C {
+  int f1;
+  static int f2;
+  m1() {}
+  static m2() {}
+}
+void main() {new C().^}''');
+    await computeSuggestions();
+    assertSuggestField('f1', 'int');
+    assertNotSuggested('f2');
+    assertSuggestMethod('m1', 'C', null);
+    assertNotSuggested('m2');
+  }
+
+  test_only_instance2() async {
+    // SimpleIdentifier  MethodInvocation  ExpressionStatement
+    addTestSource('''
+class C {
+  int f1;
+  static int f2;
+  m1() {}
+  static m2() {}
+}
+void main() {new C().^ print("something");}''');
+    await computeSuggestions();
+    assertSuggestField('f1', 'int');
+    assertNotSuggested('f2');
+    assertSuggestMethod('m1', 'C', null);
+    assertNotSuggested('m2');
+  }
+
+  test_only_static() async {
+    // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
+    addTestSource('''
+class C {
+  int f1;
+  static int f2;
+  m1() {}
+  static m2() {}
+}
+void main() {C.^}''');
+    await computeSuggestions();
+    assertNotSuggested('f1');
+    // Suggested by StaticMemberContributor
+    assertNotSuggested('f2');
+    assertNotSuggested('m1');
+    assertNotSuggested('m2');
+  }
+
+  test_only_static2() async {
+    // SimpleIdentifier  MethodInvocation  ExpressionStatement
+    addTestSource('''
+class C {
+  int f1;
+  static int f2;
+  m1() {}
+  static m2() {}
+}
+void main() {C.^ print("something");}''');
+    await computeSuggestions();
+    assertNotSuggested('f1');
+    // Suggested by StaticMemberContributor
+    assertNotSuggested('f2');
+    assertNotSuggested('m1');
+    assertNotSuggested('m2');
+  }
+
+  test_param() async {
+    addTestSource('foo(String x) {x.^}');
+    await computeSuggestions();
+    assertSuggestGetter('length', 'int');
+  }
+
+  test_param_is() async {
+    addTestSource('foo(x) {if (x is String) x.^}');
+    await computeSuggestions();
+    assertSuggestGetter('length', 'int');
+  }
+
   test_parameterName_excludeTypes() async {
     addTestSource('m(int ^) {}');
     await computeSuggestions();
@@ -3702,13 +3560,6 @@
     assertSuggestGetter('length', 'int');
   }
 
-  test_localVariableDeclarationName() async {
-    addTestSource('main() {String m^}');
-    await computeSuggestions();
-    assertNotSuggested('main');
-    assertNotSuggested('min');
-  }
-
   test_PrefixedIdentifier_trailingStmt_param2() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
     addTestSource('f(String g) {g.^ int y = 0;}');
@@ -3765,6 +3616,155 @@
     assertNotSuggested('==');
   }
 
+  test_shadowing_field_over_field() =>
+      check_shadowing('int x;', 'int x;', true);
+
+  test_shadowing_field_over_getter() =>
+      check_shadowing('int x;', 'int get x => null;', true);
+
+  test_shadowing_field_over_method() =>
+      check_shadowing('int x;', 'void x() {}', true);
+
+  test_shadowing_field_over_setter() =>
+      check_shadowing('int x;', 'set x(int value) {}', true);
+
+  test_shadowing_getter_over_field() =>
+      check_shadowing('int get x => null;', 'int x;', false);
+
+  test_shadowing_getter_over_getter() =>
+      check_shadowing('int get x => null;', 'int get x => null;', true);
+
+  test_shadowing_getter_over_method() =>
+      check_shadowing('int get x => null;', 'void x() {}', true);
+
+  test_shadowing_getter_over_setter() =>
+      check_shadowing('int get x => null;', 'set x(int value) {}', false);
+
+  test_shadowing_method_over_field() =>
+      check_shadowing('void x() {}', 'int x;', true);
+
+  test_shadowing_method_over_getter() =>
+      check_shadowing('void x() {}', 'int get x => null;', true);
+
+  test_shadowing_method_over_method() =>
+      check_shadowing('void x() {}', 'void x() {}', true);
+
+  test_shadowing_method_over_setter() =>
+      check_shadowing('void x() {}', 'set x(int value) {}', true);
+
+  test_shadowing_mixin_order() async {
+    addTestSource('''
+class Base {
+}
+class Mixin1 {
+  void f() {}
+}
+class Mixin2 {
+  void f() {}
+}
+class Derived extends Base with Mixin1, Mixin2 {
+}
+void test(Derived d) {
+  d.^
+}
+''');
+    await computeSuggestions();
+    // Note: due to dartbug.com/22069, analyzer currently analyzes mixins in
+    // reverse order.  The correct order is that Derived inherits from
+    // "Base with Mixin1, Mixin2", which inherits from "Base with Mixin1",
+    // which inherits from "Base".  So the definition of f in Mixin2 should
+    // shadow the definition in Mixin1.
+    assertSuggestMethod('f', 'Mixin2', 'void');
+  }
+
+  test_shadowing_mixin_over_superclass() async {
+    addTestSource('''
+class Base {
+  void f() {}
+}
+class Mixin {
+  void f() {}
+}
+class Derived extends Base with Mixin {
+}
+void test(Derived d) {
+  d.^
+}
+''');
+    await computeSuggestions();
+    assertSuggestMethod('f', 'Mixin', 'void');
+  }
+
+  test_shadowing_setter_over_field() =>
+      check_shadowing('set x(int value) {}', 'int x;', false);
+
+  test_shadowing_setter_over_getter() =>
+      check_shadowing('set x(int value) {}', 'int get x => null;', false);
+
+  test_shadowing_setter_over_method() =>
+      check_shadowing('set x(int value) {}', 'void x() {}', true);
+
+  test_shadowing_setter_over_setter() =>
+      check_shadowing('set x(int value) {}', 'set x(int value) {}', true);
+
+  test_shadowing_superclass_over_interface() async {
+    addTestSource('''
+class Base {
+  void f() {}
+}
+class Interface {
+  void f() {}
+}
+class Derived extends Base implements Interface {
+}
+void test(Derived d) {
+  d.^
+}
+''');
+    await computeSuggestions();
+    assertSuggestMethod('f', 'Base', 'void');
+  }
+
+  test_super() async {
+    // SimpleIdentifier  MethodInvocation  ExpressionStatement
+    addTestSource('''
+class C3 {
+  int fi3;
+  static int fs3;
+  m() {}
+  mi3() {}
+  static ms3() {}
+}
+class C2 {
+  int fi2;
+  static int fs2;
+  m() {}
+  mi2() {}
+  static ms2() {}
+}
+class C1 extends C2 implements C3 {
+  int fi1;
+  static int fs1;
+  m() {super.^}
+  mi1() {}
+  static ms1() {}
+}''');
+    await computeSuggestions();
+    assertNotSuggested('fi1');
+    assertNotSuggested('fs1');
+    assertNotSuggested('mi1');
+    assertNotSuggested('ms1');
+    assertSuggestField('fi2', 'int');
+    assertNotSuggested('fs2');
+    assertSuggestMethod('mi2', 'C2', null);
+    assertNotSuggested('ms2');
+    assertSuggestMethod('m', 'C2', null, relevance: DART_RELEVANCE_HIGH);
+    assertNotSuggested('fi3');
+    assertNotSuggested('fs3');
+    assertNotSuggested('mi3');
+    assertNotSuggested('ms3');
+  }
+
   test_SwitchStatement_c() async {
     // SwitchStatement  Block  BlockFunctionBody  MethodDeclaration
     addTestSource('class A {String g(int x) {switch(x) {c^}}}');
diff --git a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
index f120744..8bd4e6b 100644
--- a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
@@ -258,6 +258,18 @@
         csKind: CompletionSuggestionKind.IMPORT);
   }
 
+  test_import_package2_with_trailing() async {
+    addPackageSource('foo', 'foo.dart', 'library foo;');
+    addPackageSource('foo', 'baz/too.dart', 'library too;');
+    addPackageSource('bar', 'bar.dart', 'library bar;');
+    addTestSource('import "package:foo/baz/^.dart" import');
+    await computeSuggestions();
+    assertSuggest('package:foo/baz/too.dart',
+        csKind: CompletionSuggestionKind.IMPORT);
+    expect(replacementOffset, completionOffset - 16);
+    expect(replacementLength, 5 + 16);
+  }
+
   test_import_package2_raw() async {
     addPackageSource('foo', 'foo.dart', 'library foo;');
     addPackageSource('foo', 'baz/too.dart', 'library too;');
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index da08e99..d793539 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -1404,6 +1404,31 @@
 ''');
   }
 
+  test_createField_getter_qualified_propagatedType() async {
+    resolveTestUnit('''
+class A {
+  A get self => this;
+}
+main() {
+  var a = new A();
+  int v = a.self.test;
+}
+''');
+    await assertHasFix(
+        DartFixKind.CREATE_FIELD,
+        '''
+class A {
+  int test;
+
+  A get self => this;
+}
+main() {
+  var a = new A();
+  int v = a.self.test;
+}
+''');
+  }
+
   test_createField_getter_unqualified_instance_asInvocationArgument() async {
     resolveTestUnit('''
 class A {
@@ -1983,6 +2008,31 @@
 ''');
   }
 
+  test_createGetter_qualified_propagatedType() async {
+    resolveTestUnit('''
+class A {
+  A get self => this;
+}
+main() {
+  var a = new A();
+  int v = a.self.test;
+}
+''');
+    await assertHasFix(
+        DartFixKind.CREATE_GETTER,
+        '''
+class A {
+  A get self => this;
+
+  int get test => null;
+}
+main() {
+  var a = new A();
+  int v = a.self.test;
+}
+''');
+  }
+
   test_createGetter_setterContext() async {
     resolveTestUnit('''
 class A {
@@ -3410,7 +3460,35 @@
 ''');
   }
 
-  test_importLibraryShow() async {
+  test_importLibraryShow_project() async {
+    testFile = '/project/bin/test.dart';
+    addSource(
+        '/project/bin/lib.dart',
+        '''
+class A {}
+class B {}
+''');
+    resolveTestUnit('''
+import 'lib.dart' show A;
+main() {
+  A a;
+  B b;
+}
+''');
+    performAllAnalysisTasks();
+    await assertNoFix(DartFixKind.IMPORT_LIBRARY_PROJECT);
+    await assertHasFix(
+        DartFixKind.IMPORT_LIBRARY_SHOW,
+        '''
+import 'lib.dart' show A, B;
+main() {
+  A a;
+  B b;
+}
+''');
+  }
+
+  test_importLibraryShow_sdk() async {
     resolveTestUnit('''
 import 'dart:async' show Stream;
 main() {
@@ -3418,6 +3496,7 @@
   Future f = null;
 }
 ''');
+    await assertNoFix(DartFixKind.IMPORT_LIBRARY_SDK);
     await assertHasFix(
         DartFixKind.IMPORT_LIBRARY_SHOW,
         '''
@@ -4341,6 +4420,16 @@
     await assertNoFix(DartFixKind.CREATE_METHOD);
   }
 
+  test_undefinedMethod_create_BAD_targetIsEnum() async {
+    resolveTestUnit('''
+enum MyEnum {A, B}
+main() {
+  MyEnum.foo();
+}
+''');
+    await assertNoFix(DartFixKind.CREATE_METHOD);
+  }
+
   test_undefinedMethod_create_generic_BAD_argumentType() async {
     resolveTestUnit('''
 class A<T> {
diff --git a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
index 1c2a964..76b7409 100644
--- a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
+++ b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
@@ -5,9 +5,9 @@
 library test.services.correction.name_suggestion;
 
 import 'package:analysis_server/src/services/correction/name_suggestion.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/ast.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
@@ -28,7 +28,7 @@
   var res = sortedNodes as String;
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     var expr = findNodeAtString('as String', (node) => node is AsExpression);
     expect(getVariableNameSuggestionsForExpression(null, expr, excluded),
         unorderedEquals(['sortedNodes', 'nodes']));
@@ -41,7 +41,7 @@
   TreeNode node = null;
 }
 ''');
-    Set excluded = new Set.from([]);
+    Set<String> excluded = new Set<String>.from([]);
     DartType expectedType = (findElement('node') as LocalVariableElement).type;
     Expression assignedExpression =
         findNodeAtString('null;', (node) => node is NullLiteral);
@@ -115,7 +115,7 @@
   new NoSuchClass.named();
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     expect(
         getVariableNameSuggestionsForExpression(
             null, findNodeAtString('new NoSuchClass()'), excluded),
@@ -141,7 +141,7 @@
   foo(a: 111, c: 333, b: 222);
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     {
       var expr = findNodeAtString('111');
       expect(getVariableNameSuggestionsForExpression(null, expr, excluded),
@@ -166,7 +166,7 @@
   foo(111, 222, 333);
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     {
       var expr = findNodeAtString('111');
       expect(getVariableNameSuggestionsForExpression(null, expr, excluded),
@@ -191,7 +191,7 @@
   foo(111, 222);
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     {
       var expr = findNodeAtString('111');
       expect(getVariableNameSuggestionsForExpression(null, expr, excluded),
@@ -210,7 +210,7 @@
   var res = p.getSortedNodes();
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     var expr = findNodeAtString('p.get', (node) => node is MethodInvocation);
     expect(getVariableNameSuggestionsForExpression(null, expr, excluded),
         unorderedEquals(['sortedNodes', 'nodes']));
@@ -222,7 +222,7 @@
   var res = p.sortedNodes();
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     var expr = findNodeAtString('p.sorted', (node) => node is MethodInvocation);
     expect(getVariableNameSuggestionsForExpression(null, expr, excluded),
         unorderedEquals(['sortedNodes', 'nodes']));
@@ -234,7 +234,7 @@
   var res = p.get();
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     var expr = findNodeAtString('p.get', (node) => node is MethodInvocation);
     expect(getVariableNameSuggestionsForExpression(null, expr, excluded),
         unorderedEquals([]));
@@ -246,7 +246,7 @@
   var res = p.sortedNodes;
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     expect(
         getVariableNameSuggestionsForExpression(
             null,
@@ -262,7 +262,7 @@
   p._computeSuffix();
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     expect(
         getVariableNameSuggestionsForExpression(
             null,
@@ -283,7 +283,7 @@
   var res = p.q.sortedNodes;
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     PropertyAccess expression =
         findNodeAtString('p.q.sorted', (node) => node is PropertyAccess);
     expect(getVariableNameSuggestionsForExpression(null, expression, excluded),
@@ -297,7 +297,7 @@
   var res = sortedNodes;
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     var expr = findNodeAtString('sortedNodes;');
     expect(getVariableNameSuggestionsForExpression(null, expr, excluded),
         unorderedEquals(['sortedNodes', 'nodes']));
@@ -310,7 +310,7 @@
   var res = getSortedNodes();
 }
 ''');
-    var excluded = new Set.from([]);
+    var excluded = new Set<String>.from([]);
     expect(
         getVariableNameSuggestionsForExpression(
             null,
@@ -322,14 +322,14 @@
 
   void test_forText() {
     {
-      Set excluded = new Set.from([]);
+      Set<String> excluded = new Set<String>.from([]);
       List<String> suggestions =
           getVariableNameSuggestionsForText('Goodbye, cruel world!', excluded);
       expect(suggestions,
           unorderedEquals(['goodbyeCruelWorld', 'cruelWorld', 'world']));
     }
     {
-      Set excluded = new Set.from(['world']);
+      Set<String> excluded = new Set<String>.from(['world']);
       List<String> suggestions =
           getVariableNameSuggestionsForText('Goodbye, cruel world!', excluded);
       expect(suggestions,
diff --git a/pkg/analysis_server/test/services/correction/sort_members_test.dart b/pkg/analysis_server/test/services/correction/sort_members_test.dart
index b32f502..d3f6950 100644
--- a/pkg/analysis_server/test/services/correction/sort_members_test.dart
+++ b/pkg/analysis_server/test/services/correction/sort_members_test.dart
@@ -83,6 +83,22 @@
 ''');
   }
 
+  void test_classMembers_external_constructorMethod() {
+    _parseTestUnit(r'''
+class Chart {
+  external Pie();
+  external Chart();
+}
+''');
+    // validate change
+    _assertSort(r'''
+class Chart {
+  external Chart();
+  external Pie();
+}
+''');
+  }
+
   void test_classMembers_field() {
     _parseTestUnit(r'''
 class A {
@@ -355,34 +371,119 @@
 ''');
   }
 
-  void test_directives_comments() {
+  void test_directives_docComment_hasLibrary_lines() {
     _parseTestUnit(r'''
-// header
-library lib;
+/// Library documentation comment A.
+/// Library documentation comment B.
+library foo.bar;
 
-import 'c.dart';// c
-import 'a.dart';// aa
-import 'b.dart';// bbb
-
-/** doc */
-main() {
-}
+/// bbb1
+/// bbb2
+/// bbb3
+import 'b.dart';
+/// aaa1
+/// aaa2
+import 'a.dart';
 ''');
     // validate change
     _assertSort(r'''
-// header
-library lib;
+/// Library documentation comment A.
+/// Library documentation comment B.
+library foo.bar;
 
+/// aaa1
+/// aaa2
+import 'a.dart';
+/// bbb1
+/// bbb2
+/// bbb3
+import 'b.dart';
+''');
+  }
+
+  void test_directives_docComment_hasLibrary_stars() {
+    _parseTestUnit(r'''
+/**
+ * Library documentation comment A.
+ * Library documentation comment B.
+ */
+library foo.bar;
+
+/**
+ * bbb
+ */
+import 'b.dart';
+/**
+ * aaa
+ * aaa
+ */
+import 'a.dart';
+''');
+    // validate change
+    _assertSort(r'''
+/**
+ * Library documentation comment A.
+ * Library documentation comment B.
+ */
+library foo.bar;
+
+/**
+ * aaa
+ * aaa
+ */
+import 'a.dart';
+/**
+ * bbb
+ */
+import 'b.dart';
+''');
+  }
+
+  void test_directives_docComment_noLibrary_lines() {
+    _parseTestUnit(r'''
+/// Library documentation comment A
+/// Library documentation comment B
+import 'b.dart';
+/// aaa1
+/// aaa2
+import 'a.dart';
+''');
+    // validate change
+    _assertSort(r'''
+/// aaa1
+/// aaa2
+/// Library documentation comment A
+/// Library documentation comment B
 import 'a.dart';
 import 'b.dart';
-import 'c.dart';
-// c
-// aa
-// bbb
+''');
+  }
 
-/** doc */
-main() {
-}
+  void test_directives_docComment_noLibrary_stars() {
+    _parseTestUnit(r'''
+/**
+ * Library documentation comment A.
+ * Library documentation comment B.
+ */
+import 'b.dart';
+/**
+ * aaa
+ * aaa
+ */
+import 'a.dart';
+''');
+    // validate change
+    _assertSort(r'''
+/**
+ * aaa
+ * aaa
+ */
+/**
+ * Library documentation comment A.
+ * Library documentation comment B.
+ */
+import 'a.dart';
+import 'b.dart';
 ''');
   }
 
diff --git a/pkg/analysis_server/test/services/correction/source_range_test.dart b/pkg/analysis_server/test/services/correction/source_range_test.dart
index 43d080b..dfc6544 100644
--- a/pkg/analysis_server/test/services/correction/source_range_test.dart
+++ b/pkg/analysis_server/test/services/correction/source_range_test.dart
@@ -5,8 +5,8 @@
 library test.services.correction.source_range;
 
 import 'package:analysis_server/src/services/correction/source_range.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/test/services/correction/status_test.dart b/pkg/analysis_server/test/services/correction/status_test.dart
index 555b5824..0de1517 100644
--- a/pkg/analysis_server/test/services/correction/status_test.dart
+++ b/pkg/analysis_server/test/services/correction/status_test.dart
@@ -8,8 +8,8 @@
 import 'package:analysis_server/src/services/correction/source_range.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
@@ -41,7 +41,14 @@
     resolveTestUnit('class MyClass {}');
     Element element = findElement('MyClass');
     SourceRange range = rangeElementName(element);
-    SearchMatch match = new SearchMatch(null, element, range, true, false);
+    SearchMatch match = new SearchMatch(
+        context,
+        element.library.source.uri.toString(),
+        element.source.uri.toString(),
+        null,
+        range,
+        true,
+        false);
     // check
     Location location = newLocation_fromMatch(match);
     expect(location.file, '/test.dart');
diff --git a/pkg/analysis_server/test/services/correction/strings_test.dart b/pkg/analysis_server/test/services/correction/strings_test.dart
index 3fb37fb..a5b4779 100644
--- a/pkg/analysis_server/test/services/correction/strings_test.dart
+++ b/pkg/analysis_server/test/services/correction/strings_test.dart
@@ -33,6 +33,27 @@
     expect(compareStrings('b', 'a'), 1);
   }
 
+  void test_computeSimpleDiff() {
+    assertDiff(String oldStr, String newStr) {
+      SimpleDiff diff = computeSimpleDiff(oldStr, newStr);
+      expect(diff.offset, isNonNegative);
+      expect(diff.length, isNonNegative);
+      String applied = oldStr.substring(0, diff.offset) +
+          diff.replacement +
+          oldStr.substring(diff.offset + diff.length);
+      expect(applied, newStr);
+    }
+    assertDiff('', '');
+    assertDiff('', 'a');
+    assertDiff('abc', '');
+    assertDiff('abcd', 'acd');
+    assertDiff('a', 'b');
+    assertDiff('12345xyz', '12345abcxyz');
+    assertDiff('12345xyz', '12345xyzabc');
+    assertDiff('abbc', 'abbbc');
+    assertDiff('abbbbc', 'abbbbbbc');
+  }
+
   void test_countMatches() {
     expect(countMatches(null, null), 0);
     expect(countMatches('abc', null), 0);
@@ -42,15 +63,6 @@
     expect(countMatches('aaabaa', 'aa'), 2);
   }
 
-  void test_findCommonOverlap() {
-    expect(findCommonOverlap('', 'abcd'), 0);
-    expect(findCommonOverlap('abc', 'abcd'), 3);
-    expect(findCommonOverlap('123456', 'abcd'), 0);
-    expect(findCommonOverlap('123456xxx', 'xxxabcd'), 3);
-    expect(findCommonOverlap('123456', '56'), 2);
-    expect(findCommonOverlap('56', '56789'), 2);
-  }
-
   void test_findCommonPrefix() {
     expect(findCommonPrefix('abc', 'xyz'), 0);
     expect(findCommonPrefix('1234abcdef', '1234xyz'), 4);
diff --git a/pkg/analysis_server/test/services/dependencies/reachable_source_collector_test.dart b/pkg/analysis_server/test/services/dependencies/reachable_source_collector_test.dart
index b040926..89369cd 100644
--- a/pkg/analysis_server/test/services/dependencies/reachable_source_collector_test.dart
+++ b/pkg/analysis_server/test/services/dependencies/reachable_source_collector_test.dart
@@ -5,7 +5,7 @@
 library test.services.dependencies.import_collector;
 
 import 'package:analysis_server/src/services/dependencies/reachable_source_collector.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
diff --git a/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart b/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart
deleted file mode 100644
index a33bd47..0000000
--- a/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart
+++ /dev/null
@@ -1,1803 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.dart_index_contributor;
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/index_contributor.dart';
-import 'package:analysis_server/src/services/index/index_store.dart';
-import 'package:analysis_server/src/services/index/indexable_element.dart';
-import 'package:analysis_server/src/services/index/indexable_file.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:typed_mock/typed_mock.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../abstract_single_unit.dart';
-import '../../utils.dart';
-
-main() {
-  initializeTestEnvironment();
-  defineReflectiveTests(DartUnitContributorTest);
-}
-
-void indexDartUnit(
-    InternalIndexStore store, AnalysisContext context, CompilationUnit unit) {
-  new DartIndexContributor().contributeTo(store, context, unit);
-}
-
-/**
- * Returns `true` if the [actual] location the same properties as [expected].
- */
-bool _equalsLocation(LocationImpl actual, ExpectedLocation expected) {
-  return _equalsLocationProperties(actual, expected.indexable, expected.offset,
-      expected.length, expected.isQualified, expected.isResolved);
-}
-
-/**
- * Returns `true` if the [actual] location the expected properties.
- */
-bool _equalsLocationProperties(
-    LocationImpl actual,
-    IndexableObject expectedIndexable,
-    int expectedOffset,
-    int expectedLength,
-    bool isQualified,
-    bool isResolved) {
-  return (expectedIndexable == null || expectedIndexable == actual.indexable) &&
-      expectedOffset == actual.offset &&
-      expectedLength == actual.length &&
-      isQualified == actual.isQualified &&
-      isResolved == actual.isResolved;
-}
-
-bool _equalsRecordedRelation(
-    RecordedRelation recordedRelation,
-    IndexableObject expectedIndexable,
-    RelationshipImpl expectedRelationship,
-    ExpectedLocation expectedLocation) {
-  return expectedIndexable == recordedRelation.indexable &&
-      (expectedRelationship == null ||
-          expectedRelationship == recordedRelation.relationship) &&
-      (expectedLocation == null ||
-          _equalsLocation(recordedRelation.location, expectedLocation));
-}
-
-@reflectiveTest
-class DartUnitContributorTest extends AbstractSingleUnitTest {
-  InternalIndexStore store = new MockIndexStore();
-  List<RecordedRelation> recordedRelations = <RecordedRelation>[];
-  List<Element> recordedTopElements = <Element>[];
-
-  CompilationUnitElement importedUnit({int index: 0}) {
-    List<ImportElement> imports = testLibraryElement.imports;
-    return imports[index].importedLibrary.definingCompilationUnit;
-  }
-
-  void setUp() {
-    super.setUp();
-    when(store.aboutToIndex(context, anyObject)).thenReturn(true);
-    when(store.recordRelationship(anyObject, anyObject, anyObject)).thenInvoke(
-        (IndexableObject indexable, RelationshipImpl relationship,
-            LocationImpl location) {
-      recordedRelations
-          .add(new RecordedRelation(indexable, relationship, location));
-    });
-    when(store.recordTopLevelDeclaration(anyObject))
-        .thenInvoke((Element element) {
-      recordedTopElements.add(element);
-    });
-  }
-
-  void test_bad_unresolvedFieldFormalParameter() {
-    verifyNoTestUnitErrors = false;
-    _indexTestUnit('''
-class Test {
-  final field;
-  Test(this.fie);
-}''');
-  }
-
-  void test_definesClass() {
-    _indexTestUnit('class A {}');
-    // prepare elements
-    ClassElement classElement = findElement("A");
-    // verify
-    _assertDefinesTopLevelElement(classElement);
-  }
-
-  void test_definesClassAlias() {
-    _indexTestUnit('''
-class Mix {}
-class MyClass = Object with Mix;''');
-    // prepare elements
-    Element classElement = findElement("MyClass");
-    // verify
-    _assertDefinesTopLevelElement(classElement);
-  }
-
-  void test_definesClassEnum() {
-    _indexTestUnit('enum MyEnum {A, B, c}');
-    // prepare elements
-    ClassElement classElement = findElement("MyEnum");
-    // verify
-    _assertDefinesTopLevelElement(classElement);
-  }
-
-  void test_definesFunction() {
-    _indexTestUnit('myFunction() {}');
-    // prepare elements
-    FunctionElement functionElement = findElement("myFunction");
-    // verify
-    _assertDefinesTopLevelElement(functionElement);
-  }
-
-  void test_definesFunctionType() {
-    _indexTestUnit('typedef MyFunction(int p);');
-    // prepare elements
-    FunctionTypeAliasElement typeAliasElement = findElement("MyFunction");
-    // verify
-    _assertDefinesTopLevelElement(typeAliasElement);
-  }
-
-  void test_definesVariable() {
-    _indexTestUnit('var myVar = 42;');
-    // prepare elements
-    VariableElement varElement = findElement("myVar");
-    // verify
-    _assertDefinesTopLevelElement(varElement);
-  }
-
-  void test_forIn() {
-    _indexTestUnit('''
-main() {
-  for (var v in []) {
-  }
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    VariableElement variableElement = findElement("v");
-    // verify
-    _assertNoRecordedRelationForElement(variableElement,
-        IndexConstants.IS_READ_BY, _expectedLocation(mainElement, 'v in []'));
-  }
-
-  void test_hasAncestor_ClassDeclaration() {
-    _indexTestUnit('''
-class A {}
-class B1 extends A {}
-class B2 implements A {}
-class C1 extends B1 {}
-class C2 extends B2 {}
-class C3 implements B1 {}
-class C4 implements B2 {}
-class M extends Object with A {}
-''');
-    // prepare elements
-    ClassElement classElementA = findElement("A");
-    ClassElement classElementB1 = findElement("B1");
-    ClassElement classElementB2 = findElement("B2");
-    ClassElement classElementC1 = findElement("C1");
-    ClassElement classElementC2 = findElement("C2");
-    ClassElement classElementC3 = findElement("C3");
-    ClassElement classElementC4 = findElement("C4");
-    ClassElement classElementM = findElement("M");
-    // verify
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementB1, 'B1 extends A'));
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementB2, 'B2 implements A'));
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementC1, 'C1 extends B1'));
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementC2, 'C2 extends B2'));
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementC3, 'C3 implements B1'));
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementC4, 'C4 implements B2'));
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementM, 'M extends Object with A'));
-  }
-
-  void test_hasAncestor_ClassTypeAlias() {
-    _indexTestUnit('''
-class A {}
-class B extends A {}
-class C1 = Object with A;
-class C2 = Object with B;
-''');
-    // prepare elements
-    ClassElement classElementA = findElement("A");
-    ClassElement classElementB = findElement("B");
-    ClassElement classElementC1 = findElement("C1");
-    ClassElement classElementC2 = findElement("C2");
-    // verify
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementC1, 'C1 = Object with A'));
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementC2, 'C2 = Object with B'));
-    _assertRecordedRelationForElement(
-        classElementB,
-        IndexConstants.HAS_ANCESTOR,
-        _expectedLocation(classElementC2, 'C2 = Object with B'));
-  }
-
-  void test_IndexableName_field() {
-    _indexTestUnit('''
-class A {
-  int field;
-}
-main(A a, p) {
-  print(a.field); // r
-  print(p.field); // ur
-  {
-    var field = 42;
-    print(field); // not a member
-  }
-}
-''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    FieldElement fieldElement = findElement('field');
-    IndexableName indexable = new IndexableName('field');
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.NAME_IS_DEFINED_BY,
-        _expectedLocation(fieldElement, 'field;'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_READ_BY,
-        _expectedLocationQ(mainElement, 'field); // r'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_READ_BY,
-        _expectedLocationQU(mainElement, 'field); // ur'));
-    _assertNoRecordedRelation(indexable, IndexConstants.IS_READ_BY,
-        _expectedLocation(mainElement, 'field); // not a member'));
-  }
-
-  void test_IndexableName_isDefinedBy_localVariable_inForEach() {
-    _indexTestUnit('''
-class A {
-  main() {
-    for (int test in []) {
-    }
-  }
-}
-''');
-    // prepare elements
-    LocalVariableElement testElement = findElement('test');
-    IndexableName indexable = new IndexableName('test');
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.NAME_IS_DEFINED_BY,
-        _expectedLocation(testElement, 'test in []'));
-  }
-
-  void test_IndexableName_method() {
-    _indexTestUnit('''
-class A {
-  method() {}
-}
-main(A a, p) {
-  a.method(); // r
-  p.method(); // ur
-}
-''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    MethodElement methodElement = findElement('method');
-    IndexableName indexable = new IndexableName('method');
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.NAME_IS_DEFINED_BY,
-        _expectedLocation(methodElement, 'method() {}'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, 'method(); // r'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, 'method(); // ur'));
-  }
-
-  void test_IndexableName_operator_resolved() {
-    _indexTestUnit('''
-class A {
-  operator +(o) {}
-  operator -(o) {}
-  operator ~() {}
-  operator ==(o) {}
-}
-main(A a) {
-  a + 5;
-  a += 5;
-  a == 5;
-  ++a;
-  --a;
-  ~a;
-  a++;
-  a--;
-}
-''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    // binary
-    _assertRecordedRelationForName('+', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '+ 5', length: 1));
-    _assertRecordedRelationForName('+', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '+= 5', length: 2));
-    _assertRecordedRelationForName('==', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '== 5', length: 2));
-    // prefix
-    _assertRecordedRelationForName('+', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '++a', length: 2));
-    _assertRecordedRelationForName('-', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '--a', length: 2));
-    _assertRecordedRelationForName('~', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '~a', length: 1));
-    // postfix
-    _assertRecordedRelationForName('+', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '++;', length: 2));
-    _assertRecordedRelationForName('-', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '--;', length: 2));
-  }
-
-  void test_IndexableName_operator_unresolved() {
-    _indexTestUnit('''
-class A {
-  operator +(o) {}
-  operator -(o) {}
-  operator ~() {}
-  operator ==(o) {}
-}
-main(a) {
-  a + 5;
-  a += 5;
-  a == 5;
-  ++a;
-  --a;
-  ~a;
-  a++;
-  a--;
-}
-''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    // binary
-    _assertRecordedRelationForName('+', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, '+ 5', length: 1));
-    _assertRecordedRelationForName('+', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, '+= 5', length: 2));
-    _assertRecordedRelationForName('==', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, '== 5', length: 2));
-    // prefix
-    _assertRecordedRelationForName('+', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, '++a', length: 2));
-    _assertRecordedRelationForName('-', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, '--a', length: 2));
-    _assertRecordedRelationForName('~', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, '~a', length: 1));
-    // postfix
-    _assertRecordedRelationForName('+', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, '++;', length: 2));
-    _assertRecordedRelationForName('-', IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, '--;', length: 2));
-  }
-
-  void test_isDefinedBy_IndexableName_method() {
-    _indexTestUnit('''
-class A {
-  m() {}
-}''');
-    // prepare elements
-    Element methodElement = findElement("m");
-    IndexableName nameIndexable = new IndexableName("m");
-    // verify
-    _assertRecordedRelationForIndexable(
-        nameIndexable,
-        IndexConstants.NAME_IS_DEFINED_BY,
-        _expectedLocation(methodElement, 'm() {}'));
-  }
-
-  void test_isDefinedBy_IndexableName_operator() {
-    _indexTestUnit('''
-class A {
-  operator +(o) {}
-}''');
-    // prepare elements
-    Element methodElement = findElement("+");
-    IndexableName nameIndexable = new IndexableName("+");
-    // verify
-    _assertRecordedRelationForIndexable(
-        nameIndexable,
-        IndexConstants.NAME_IS_DEFINED_BY,
-        _expectedLocation(methodElement, '+(o) {}', length: 1));
-  }
-
-  void test_isExtendedBy_ClassDeclaration() {
-    _indexTestUnit('''
-class A {} // 1
-class B extends A {} // 2
-''');
-    // prepare elements
-    ClassElement classElementA = findElement("A");
-    ClassElement classElementB = findElement("B");
-    // verify
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.IS_EXTENDED_BY,
-        _expectedLocation(classElementB, 'A {} // 2'));
-  }
-
-  void test_isExtendedBy_ClassDeclaration_Object() {
-    _indexTestUnit('''
-class A {} // 1
-''');
-    // prepare elements
-    ClassElement classElementA = findElement("A");
-    ClassElement classElementObject = classElementA.supertype.element;
-    // verify
-    _assertRecordedRelationForElement(
-        classElementObject,
-        IndexConstants.IS_EXTENDED_BY,
-        _expectedLocation(classElementA, 'A {}', length: 0));
-  }
-
-  void test_isExtendedBy_ClassTypeAlias() {
-    _indexTestUnit('''
-class A {} // 1
-class B {} // 2
-class C = A with B; // 3
-''');
-    // prepare elements
-    ClassElement classElementA = findElement("A");
-    ClassElement classElementC = findElement("C");
-    // verify
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.IS_EXTENDED_BY,
-        _expectedLocation(classElementC, 'A with'));
-  }
-
-  void test_isImplementedBy_ClassDeclaration() {
-    _indexTestUnit('''
-class A {} // 1
-class B implements A {} // 2
-''');
-    // prepare elements
-    ClassElement classElementA = findElement("A");
-    ClassElement classElementB = findElement("B");
-    // verify
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.IS_IMPLEMENTED_BY,
-        _expectedLocation(classElementB, 'A {} // 2'));
-  }
-
-  void test_isImplementedBy_ClassTypeAlias() {
-    _indexTestUnit('''
-class A {} // 1
-class B {} // 2
-class C = Object with A implements B; // 3
-''');
-    // prepare elements
-    ClassElement classElementB = findElement("B");
-    ClassElement classElementC = findElement("C");
-    // verify
-    _assertRecordedRelationForElement(
-        classElementB,
-        IndexConstants.IS_IMPLEMENTED_BY,
-        _expectedLocation(classElementC, 'B; // 3'));
-  }
-
-  void test_isInvokedBy_FieldElement() {
-    _indexTestUnit('''
-class A {
-  var field;
-  main() {
-    this.field(); // q
-    field(); // nq
-  }
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    FieldElement fieldElement = findElement("field");
-    PropertyAccessorElement getterElement = fieldElement.getter;
-    IndexableElement indexable = new IndexableElement(getterElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, 'field(); // q'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocation(mainElement, 'field(); // nq'));
-  }
-
-  void test_isInvokedBy_FunctionElement() {
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-foo() {}
-''');
-    _indexTestUnit('''
-import 'lib.dart';
-import 'lib.dart' as pref;
-main() {
-  pref.foo(); // q
-  foo(); // nq
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    FunctionElement functionElement = importedUnit().functions[0];
-    IndexableElement indexable = new IndexableElement(functionElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocation(mainElement, 'foo(); // q'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocation(mainElement, 'foo(); // nq'));
-  }
-
-  void test_isInvokedBy_LocalVariableElement() {
-    _indexTestUnit('''
-main() {
-  var v;
-  v();
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    Element element = findElement("v");
-    // verify
-    _assertRecordedRelationForElement(element, IndexConstants.IS_INVOKED_BY,
-        _expectedLocation(mainElement, 'v();'));
-  }
-
-  void test_isInvokedBy_MethodElement() {
-    _indexTestUnit('''
-class A {
-  foo() {}
-  main() {
-    this.foo(); // q
-    foo(); // nq
-  }
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    Element methodElement = findElement("foo");
-    IndexableElement indexable = new IndexableElement(methodElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, 'foo(); // q'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocation(mainElement, 'foo(); // nq'));
-  }
-
-  void test_isInvokedBy_MethodElement_propagatedType() {
-    _indexTestUnit('''
-class A {
-  foo() {}
-}
-main() {
-  var a = new A();
-  a.foo();
-}
-''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    Element methodElement = findElement("foo");
-    // verify
-    _assertRecordedRelationForElement(
-        methodElement,
-        IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, 'foo();'));
-  }
-
-  void test_isInvokedBy_operator_binary() {
-    _indexTestUnit('''
-class A {
-  operator +(other) => this;
-}
-main(A a) {
-  print(a + 1);
-  a += 2;
-  ++a;
-  a++;
-}
-''');
-    // prepare elements
-    MethodElement element = findElement('+');
-    Element mainElement = findElement('main');
-    IndexableElement indexable = new IndexableElement(element);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '+ 1', length: 1));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '+= 2', length: 2));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '++a;', length: 2));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '++;', length: 2));
-  }
-
-  void test_isInvokedBy_operator_index() {
-    _indexTestUnit('''
-class A {
-  operator [](i) => null;
-  operator []=(i, v) {}
-}
-main(A a) {
-  print(a[0]);
-  a[1] = 42;
-}
-''');
-    // prepare elements
-    MethodElement readElement = findElement("[]");
-    MethodElement writeElement = findElement("[]=");
-    Element mainElement = findElement('main');
-    // verify
-    _assertRecordedRelationForElement(readElement, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '[0]', length: 1));
-    _assertRecordedRelationForElement(
-        writeElement,
-        IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '[1] =', length: 1));
-  }
-
-  void test_isInvokedBy_operator_prefix() {
-    _indexTestUnit('''
-class A {
-  A operator ~() => this;
-}
-main(A a) {
-  print(~a);
-}
-''');
-    // prepare elements
-    MethodElement element = findElement("~");
-    Element mainElement = findElement('main');
-    // verify
-    _assertRecordedRelationForElement(element, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, '~a', length: 1));
-  }
-
-  void test_isInvokedBy_ParameterElement() {
-    _indexTestUnit('''
-main(p()) {
-  p();
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    Element element = findElement("p");
-    // verify
-    _assertRecordedRelationForElement(element, IndexConstants.IS_INVOKED_BY,
-        _expectedLocation(mainElement, 'p();'));
-  }
-
-  void test_isMixedInBy_ClassDeclaration() {
-    _indexTestUnit('''
-class A {} // 1
-class B extends Object with A {} // 2
-''');
-    // prepare elements
-    ClassElement classElementA = findElement("A");
-    ClassElement classElementB = findElement("B");
-    // verify
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.IS_MIXED_IN_BY,
-        _expectedLocation(classElementB, 'A {} // 2'));
-  }
-
-  void test_isMixedInBy_ClassTypeAlias() {
-    _indexTestUnit('''
-class A {} // 1
-class B = Object with A; // 2
-''');
-    // prepare elements
-    ClassElement classElementA = findElement("A");
-    ClassElement classElementB = findElement("B");
-    // verify
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.IS_MIXED_IN_BY,
-        _expectedLocation(classElementB, 'A; // 2'));
-  }
-
-  void test_isReadBy_ParameterElement() {
-    _indexTestUnit('''
-main(var p) {
-  print(p);
-}
-''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    Element parameterElement = findElement("p");
-    // verify
-    _assertRecordedRelationForElement(parameterElement,
-        IndexConstants.IS_READ_BY, _expectedLocation(mainElement, 'p);'));
-  }
-
-  void test_isReadBy_VariableElement() {
-    _indexTestUnit('''
-main() {
-  var v = 0;
-  print(v);
-}
-''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    Element variableElement = findElement("v");
-    // verify
-    _assertRecordedRelationForElement(variableElement,
-        IndexConstants.IS_READ_BY, _expectedLocation(mainElement, 'v);'));
-  }
-
-  void test_isReadWrittenBy_ParameterElement() {
-    _indexTestUnit('''
-main(int p) {
-  p += 1;
-}
-''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    Element parameterElement = findElement("p");
-    // verify
-    _assertRecordedRelationForElement(
-        parameterElement,
-        IndexConstants.IS_READ_WRITTEN_BY,
-        _expectedLocation(mainElement, 'p += 1'));
-  }
-
-  void test_isReadWrittenBy_VariableElement() {
-    _indexTestUnit('''
-main() {
-  var v = 0;
-  v += 1;
-}
-''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    Element variableElement = findElement("v");
-    // verify
-    _assertRecordedRelationForElement(
-        variableElement,
-        IndexConstants.IS_READ_WRITTEN_BY,
-        _expectedLocation(mainElement, 'v += 1'));
-  }
-
-  void test_isReferencedBy_ClassElement() {
-    _indexTestUnit('''
-class A {
-  static var field;
-}
-main(A p) {
-  A v;
-  new A(); // 2
-  A.field = 1;
-  print(A.field); // 3
-}
-''');
-    // prepare elements
-    ClassElement aElement = findElement("A");
-    Element mainElement = findElement("main");
-    ParameterElement pElement = findElement("p");
-    VariableElement vElement = findElement("v");
-    IndexableElement indexable = new IndexableElement(aElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(pElement, 'A p) {'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(vElement, 'A v;'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'A(); // 2'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'A.field = 1;'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'A.field); // 3'));
-  }
-
-  void test_isReferencedBy_ClassElement_invocation() {
-    verifyNoTestUnitErrors = false;
-    _indexTestUnit('''
-class A {}
-main() {
-  A(); // invalid code, but still a reference
-}''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    Element classElement = findElement('A');
-    IndexableElement indexable = new IndexableElement(classElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'A();'));
-  }
-
-  void test_isReferencedBy_ClassTypeAlias() {
-    _indexTestUnit('''
-class A {}
-class B = Object with A;
-main(B p) {
-  B v;
-}
-''');
-    // prepare elements
-    ClassElement bElement = findElement("B");
-    ParameterElement pElement = findElement("p");
-    VariableElement vElement = findElement("v");
-    IndexableElement indexable = new IndexableElement(bElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(pElement, 'B p) {'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(vElement, 'B v;'));
-  }
-
-  void test_isReferencedBy_CompilationUnitElement_export() {
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-''');
-    _indexTestUnit('''
-export 'lib.dart';
-''');
-    // prepare elements
-    LibraryElement libElement = testLibraryElement.exportedLibraries[0];
-    CompilationUnitElement libUnitElement = libElement.definingCompilationUnit;
-    // verify
-    _assertRecordedRelationForElement(
-        libUnitElement,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, "'lib.dart'", length: 10));
-  }
-
-  void test_isReferencedBy_CompilationUnitElement_import() {
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-''');
-    _indexTestUnit('''
-import 'lib.dart';
-''');
-    // prepare elements
-    LibraryElement libElement = testLibraryElement.imports[0].importedLibrary;
-    CompilationUnitElement libUnitElement = libElement.definingCompilationUnit;
-    // verify
-    _assertRecordedRelationForElement(
-        libUnitElement,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, "'lib.dart'", length: 10));
-  }
-
-  void test_isReferencedBy_CompilationUnitElement_part() {
-    addSource('/my_unit.dart', 'part of my_lib;');
-    _indexTestUnit('''
-library my_lib;
-part 'my_unit.dart';
-''');
-    // prepare elements
-    CompilationUnitElement myUnitElement = testLibraryElement.parts[0];
-    // verify
-    _assertRecordedRelationForElement(
-        myUnitElement,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, "'my_unit.dart';", length: 14));
-  }
-
-  void test_isReferencedBy_ConstructorElement() {
-    _indexTestUnit('''
-class A implements B {
-  A() {}
-  A.foo() {}
-}
-class B extends A {
-  B() : super(); // marker-1
-  B.foo() : super.foo(); // marker-2
-  factory B.bar() = A.foo; // marker-3
-}
-main() {
-  new A(); // marker-main-1
-  new A.foo(); // marker-main-2
-}
-''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    var isConstructor = (node) => node is ConstructorDeclaration;
-    ConstructorElement consA = findNodeElementAtString("A()", isConstructor);
-    ConstructorElement consA_foo =
-        findNodeElementAtString("A.foo()", isConstructor);
-    ConstructorElement consB = findNodeElementAtString("B()", isConstructor);
-    ConstructorElement consB_foo =
-        findNodeElementAtString("B.foo()", isConstructor);
-    ConstructorElement consB_bar =
-        findNodeElementAtString("B.bar()", isConstructor);
-    IndexableElement indexableA = new IndexableElement(consA);
-    IndexableElement indexableA_foo = new IndexableElement(consA_foo);
-    // A()
-    _assertRecordedRelation(indexableA, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(consB, '(); // marker-1', length: 0));
-    _assertRecordedRelation(indexableA, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, '(); // marker-main-1', length: 0));
-    // A.foo()
-    _assertRecordedRelation(indexableA_foo, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(consB_foo, '.foo(); // marker-2', length: 4));
-    _assertRecordedRelation(indexableA_foo, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(consB_bar, '.foo; // marker-3', length: 4));
-    _assertRecordedRelation(indexableA_foo, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, '.foo(); // marker-main-2', length: 4));
-  }
-
-  void test_isReferencedBy_ConstructorElement_classTypeAlias() {
-    _indexTestUnit('''
-class M {}
-class A implements B {
-  A() {}
-  A.named() {}
-}
-class B = A with M;
-main() {
-  new B(); // marker-main-1
-  new B.named(); // marker-main-2
-}
-''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    var isConstructor = (node) => node is ConstructorDeclaration;
-    ConstructorElement consA = findNodeElementAtString("A()", isConstructor);
-    ConstructorElement consA_named =
-        findNodeElementAtString("A.named()", isConstructor);
-    // verify
-    _assertRecordedRelationForElement(consA, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, '(); // marker-main-1', length: 0));
-    _assertRecordedRelationForElement(
-        consA_named,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, '.named(); // marker-main-2',
-            length: 6));
-  }
-
-  void test_isReferencedBy_ConstructorElement_redirection() {
-    _indexTestUnit('''
-class A {
-  A() : this.bar();
-  A.foo() : this(); // marker
-  A.bar();
-}
-''');
-    // prepare elements
-    var isConstructor = (node) => node is ConstructorDeclaration;
-    ConstructorElement constructorA =
-        findNodeElementAtString("A()", isConstructor);
-    ConstructorElement constructorA_foo =
-        findNodeElementAtString("A.foo()", isConstructor);
-    ConstructorElement constructorA_bar =
-        findNodeElementAtString("A.bar()", isConstructor);
-    // A()
-    _assertRecordedRelationForElement(
-        constructorA,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(constructorA_foo, '(); // marker', length: 0));
-    // A.foo()
-    _assertRecordedRelationForElement(
-        constructorA_bar,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(constructorA, '.bar();', length: 4));
-  }
-
-  void test_isReferencedBy_FieldElement() {
-    _indexTestUnit('''
-class A {
-  var field;
-  A({this.field});
-  m() {
-    field = 1; // nq
-    print(field); // nq
-  }
-}
-main(A a) {
-  a.field = 2; // q
-  print(a.field); // q
-  new A(field: 3);
-}
-''');
-    // prepare elements
-    Element mElement = findElement("m");
-    Element mainElement = findElement("main");
-    FieldElement fieldElement = findElement("field");
-    PropertyAccessorElement getter = fieldElement.getter;
-    PropertyAccessorElement setter = fieldElement.setter;
-    IndexableElement indexableGetter = new IndexableElement(getter);
-    IndexableElement indexableSetter = new IndexableElement(setter);
-    // m()
-    _assertRecordedRelation(indexableSetter, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mElement, 'field = 1; // nq'));
-    _assertRecordedRelation(indexableGetter, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mElement, 'field); // nq'));
-    // main()
-    _assertRecordedRelation(indexableSetter, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocationQ(mainElement, 'field = 2; // q'));
-    _assertRecordedRelation(indexableGetter, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocationQ(mainElement, 'field); // q'));
-    _assertRecordedRelationForElement(
-        fieldElement,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'field: 3'));
-  }
-
-  void test_isReferencedBy_fileOfLibrary_byImportingExportingFile() {
-    addSource('/lib.dart', '');
-    _indexTestUnit('''
-import 'lib.dart'; // 1
-export 'lib.dart'; // 2
-''');
-    // verify
-    IndexableFile libIndexableFile = new IndexableFile('/lib.dart');
-    IndexableFile testIndexableFile = new IndexableFile(testFile);
-    _assertRecordedRelationForIndexable(
-        libIndexableFile,
-        IndexConstants.IS_REFERENCED_BY,
-        new ExpectedLocation(
-            testIndexableFile,
-            testCode.indexOf("'lib.dart'; // 1"),
-            "'lib.dart'".length,
-            false,
-            true));
-    _assertRecordedRelationForIndexable(
-        libIndexableFile,
-        IndexConstants.IS_REFERENCED_BY,
-        new ExpectedLocation(
-            testIndexableFile,
-            testCode.indexOf("'lib.dart'; // 2"),
-            "'lib.dart'".length,
-            false,
-            true));
-  }
-
-  void test_isReferencedBy_fileOfPart_bySourcingFile() {
-    addSource('/part.dart', 'part of my.lib;');
-    _indexTestUnit('''
-library my.lib;
-part 'part.dart';
-''');
-    // verify
-    IndexableFile partIndexableFile = new IndexableFile('/part.dart');
-    IndexableFile testIndexableFile = new IndexableFile(testFile);
-    _assertRecordedRelationForIndexable(
-        partIndexableFile,
-        IndexConstants.IS_REFERENCED_BY,
-        new ExpectedLocation(testIndexableFile, testCode.indexOf("'part.dart'"),
-            "'part.dart'".length, false, true));
-  }
-
-  void test_isReferencedBy_FunctionElement() {
-    _indexTestUnit('''
-foo() {}
-main() {
-  print(foo);
-  print(foo());
-}
-''');
-    // prepare elements
-    FunctionElement element = findElement("foo");
-    Element mainElement = findElement("main");
-    IndexableElement indexable = new IndexableElement(element);
-    // "referenced" here
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'foo);'));
-    // only "invoked", but not "referenced"
-    {
-      _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-          _expectedLocation(mainElement, 'foo());'));
-      _assertNoRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-          _expectedLocation(mainElement, 'foo());'));
-    }
-  }
-
-  void test_isReferencedBy_FunctionTypeAliasElement() {
-    _indexTestUnit('''
-typedef A();
-main(A p) {
-}
-''');
-    // prepare elements
-    Element aElement = findElement('A');
-    Element pElement = findElement('p');
-    // verify
-    _assertRecordedRelationForElement(aElement, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(pElement, 'A p) {'));
-  }
-
-  /**
-   * There was a bug in the AST structure, when single [Comment] was cloned and
-   * assigned to both [FieldDeclaration] and [VariableDeclaration].
-   *
-   * This caused duplicate indexing.
-   * Here we test that the problem is fixed one way or another.
-   */
-  void test_isReferencedBy_identifierInComment() {
-    _indexTestUnit('''
-class A {}
-/// [A] text
-var myVariable = null;
-''');
-    // prepare elements
-    Element aElement = findElement('A');
-    Element variableElement = findElement('myVariable');
-    IndexableElement indexable = new IndexableElement(aElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, 'A] text'));
-    _assertNoRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(variableElement, 'A] text'));
-  }
-
-  void test_isReferencedBy_ImportElement_noPrefix() {
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-var myVar;
-myFunction() {}
-myToHide() {}
-''');
-    _indexTestUnit('''
-import 'lib.dart' show myVar, myFunction hide myToHide;
-main() {
-  myVar = 1;
-  myFunction();
-  print(0);
-}
-''');
-    // prepare elements
-    ImportElement importElement = testLibraryElement.imports[0];
-    Element mainElement = findElement('main');
-    IndexableElement indexable = new IndexableElement(importElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'myVar = 1;', length: 0));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'myFunction();', length: 0));
-    _assertNoRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'print(0);', length: 0));
-    // no references from import combinators
-    _assertNoRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, 'myVar, ', length: 0));
-    _assertNoRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, 'myFunction hide', length: 0));
-    _assertNoRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, 'myToHide;', length: 0));
-  }
-
-  void test_isReferencedBy_ImportElement_withPrefix() {
-    addSource(
-        '/libA.dart',
-        '''
-library libA;
-var myVar;
-''');
-    addSource(
-        '/libB.dart',
-        '''
-library libB;
-class MyClass {}
-''');
-    _indexTestUnit('''
-import 'libA.dart' as pref;
-import 'libB.dart' as pref;
-main() {
-  pref.myVar = 1;
-  new pref.MyClass();
-}
-''');
-    // prepare elements
-    ImportElement importElementA = testLibraryElement.imports[0];
-    ImportElement importElementB = testLibraryElement.imports[1];
-    Element mainElement = findElement('main');
-    // verify
-    _assertRecordedRelationForElement(
-        importElementA,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'pref.myVar = 1;', length: 5));
-    _assertRecordedRelationForElement(
-        importElementB,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'pref.MyClass();', length: 5));
-  }
-
-  void test_isReferencedBy_ImportElement_withPrefix_combinators() {
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-class A {}
-class B {}
-''');
-    _indexTestUnit('''
-import 'lib.dart' as pref show A;
-import 'lib.dart' as pref show B;
-import 'lib.dart';
-import 'lib.dart' as otherPrefix;
-main() {
-  new pref.A();
-  new pref.B();
-}
-''');
-    // prepare elements
-    ImportElement importElementA = testLibraryElement.imports[0];
-    ImportElement importElementB = testLibraryElement.imports[1];
-    Element mainElement = findElement('main');
-    // verify
-    _assertRecordedRelationForElement(
-        importElementA,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'pref.A();', length: 5));
-    _assertRecordedRelationForElement(
-        importElementB,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'pref.B();', length: 5));
-  }
-
-  void test_isReferencedBy_ImportElement_withPrefix_invocation() {
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-myFunc() {}
-''');
-    _indexTestUnit('''
-import 'lib.dart' as pref;
-main() {
-  pref.myFunc();
-}
-''');
-    // prepare elements
-    ImportElement importElement = testLibraryElement.imports[0];
-    Element mainElement = findElement('main');
-    // verify
-    _assertRecordedRelationForElement(
-        importElement,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'pref.myFunc();', length: 5));
-  }
-
-  void test_isReferencedBy_ImportElement_withPrefix_oneCandidate() {
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-class A {}
-class B {}
-''');
-    _indexTestUnit('''
-import 'lib.dart' as pref show A;
-main() {
-  new pref.A();
-}
-''');
-    // prepare elements
-    ImportElement importElement = testLibraryElement.imports[0];
-    Element mainElement = findElement('main');
-    // verify
-    _assertRecordedRelationForElement(
-        importElement,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'pref.A();', length: 5));
-  }
-
-  void test_isReferencedBy_ImportElement_withPrefix_unresolvedElement() {
-    verifyNoTestUnitErrors = false;
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-''');
-    _indexTestUnit('''
-import 'lib.dart' as pref;
-main() {
-  pref.myVar = 1;
-}
-''');
-  }
-
-  void test_isReferencedBy_ImportElement_withPrefix_wrongInvocation() {
-    verifyNoTestUnitErrors = false;
-    _indexTestUnit('''
-import 'dart:math' as m;
-main() {
-  m();
-}''');
-  }
-
-  void test_isReferencedBy_ImportElement_withPrefix_wrongPrefixedIdentifier() {
-    verifyNoTestUnitErrors = false;
-    _indexTestUnit('''
-import 'dart:math' as m;
-main() {
-  x.m;
-}
-''');
-  }
-
-  void test_isReferencedBy_LabelElement() {
-    _indexTestUnit('''
-main() {
-  L: while (true) {
-    break L;
-  }
-}
-''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    Element element = findElement('L');
-    // verify
-    _assertRecordedRelationForElement(element, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'L;'));
-  }
-
-  void test_isReferencedBy_libraryName_byPartOf() {
-    Source libSource = addSource(
-        '/lib.dart',
-        '''
-library lib;
-part 'test.dart';
-''');
-    testCode = 'part of lib;';
-    testSource = addSource('/test.dart', testCode);
-    testUnit = resolveDartUnit(testSource, libSource);
-    testUnitElement = testUnit.element;
-    testLibraryElement = testUnitElement.library;
-    indexDartUnit(store, context, testUnit);
-    // verify
-    _assertRecordedRelationForElement(
-        testLibraryElement,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, "lib;"));
-  }
-
-  void test_isReferencedBy_MethodElement() {
-    _indexTestUnit('''
-class A {
-  method() {}
-  main() {
-    print(this.method); // q
-    print(method); // nq
-  }
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    MethodElement methodElement = findElement("method");
-    IndexableElement indexable = new IndexableElement(methodElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocationQ(mainElement, 'method); // q'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'method); // nq'));
-  }
-
-  void test_isReferencedBy_ParameterElement() {
-    _indexTestUnit('''
-foo({var p}) {}
-main() {
-  foo(p: 1);
-}
-''');
-    // prepare elements
-    Element mainElement = findElement('main');
-    Element element = findElement('p');
-    // verify
-    _assertRecordedRelationForElement(element, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'p: 1'));
-  }
-
-  void test_isReferencedBy_PrefixElement() {
-    _indexTestUnit('''
-import 'dart:async' as ppp;
-main() {
-  ppp.Future a;
-  ppp.Stream b;
-}
-''');
-    // prepare elements
-    PrefixElement element = findNodeElementAtString('ppp;');
-    Element elementA = findElement('a');
-    Element elementB = findElement('b');
-    IndexableElement indexable = new IndexableElement(element);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(elementA, 'ppp.Future'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(elementB, 'ppp.Stream'));
-    _assertNoRecordedRelation(indexable, null, _expectedLocation(null, 'ppp;'));
-  }
-
-  void test_isReferencedBy_TopLevelVariableElement() {
-    addSource(
-        '/lib.dart',
-        '''
-library lib;
-var V;
-''');
-    _indexTestUnit('''
-import 'lib.dart' show V; // imp
-import 'lib.dart' as pref;
-main() {
-  pref.V = 5; // q
-  print(pref.V); // q
-  V = 5; // nq
-  print(V); // nq
-}''');
-    // prepare elements
-    TopLevelVariableElement variable = importedUnit().topLevelVariables[0];
-    Element mainElement = findElement("main");
-    IndexableElement indexableGetter = new IndexableElement(variable.getter);
-    IndexableElement indexableSetter = new IndexableElement(variable.setter);
-    // verify
-    _assertRecordedRelationForElement(variable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(testUnitElement, 'V; // imp'));
-    _assertRecordedRelation(indexableSetter, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'V = 5; // q'));
-    _assertRecordedRelation(indexableGetter, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'V); // q'));
-    _assertRecordedRelation(indexableSetter, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'V = 5; // nq'));
-    _assertRecordedRelation(indexableGetter, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(mainElement, 'V); // nq'));
-  }
-
-  void test_isReferencedBy_typeInVariableList() {
-    _indexTestUnit('''
-class A {}
-A myVariable = null;
-''');
-    // prepare elements
-    Element classElementA = findElement('A');
-    Element variableElement = findElement('myVariable');
-    // verify
-    _assertRecordedRelationForElement(
-        classElementA,
-        IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(variableElement, 'A myVariable'));
-  }
-
-  void test_isReferencedBy_TypeParameterElement() {
-    _indexTestUnit('''
-class A<T> {
-  T f;
-  foo(T p) {
-    T v;
-  }
-}
-''');
-    // prepare elements
-    Element typeParameterElement = findElement('T');
-    Element fieldElement = findElement('f');
-    Element parameterElement = findElement('p');
-    Element variableElement = findElement('v');
-    IndexableElement indexable = new IndexableElement(typeParameterElement);
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(fieldElement, 'T f'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(parameterElement, 'T p'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_REFERENCED_BY,
-        _expectedLocation(variableElement, 'T v'));
-  }
-
-  void test_isWrittenBy_ConstructorFieldInitializer() {
-    _indexTestUnit('''
-class A {
-  int field;
-  A() : field = 5;
-}
-''');
-    // prepare elements
-    ClassElement classElement = findElement('A');
-    ConstructorElement constructorElement = classElement.constructors[0];
-    FieldElement fieldElement = findElement("field");
-    // verify
-    _assertRecordedRelationForElement(
-        fieldElement,
-        IndexConstants.IS_WRITTEN_BY,
-        _expectedLocation(constructorElement, 'field = 5'));
-  }
-
-  void test_isWrittenBy_FieldElement_fieldFormalParameter() {
-    _indexTestUnit('''
-class A {
-  int field;
-  A(this.field);
-}
-''');
-    // prepare elements
-    FieldElement fieldElement = findElement("field");
-    Element fieldParameterElement = findNodeElementAtString("field);");
-    // verify
-    _assertRecordedRelationForElement(
-        fieldElement,
-        IndexConstants.IS_WRITTEN_BY,
-        _expectedLocation(fieldParameterElement, 'field);'));
-  }
-
-  void test_isWrittenBy_ParameterElement() {
-    _indexTestUnit('''
-main(var p) {
-  p = 1;
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    ParameterElement pElement = findElement("p");
-    // verify
-    _assertRecordedRelationForElement(pElement, IndexConstants.IS_WRITTEN_BY,
-        _expectedLocation(mainElement, 'p = 1'));
-  }
-
-  void test_isWrittenBy_VariableElement() {
-    _indexTestUnit('''
-main() {
-  var v = 0;
-  v = 1;
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    LocalVariableElement vElement = findElement("v");
-    // verify
-    _assertRecordedRelationForElement(vElement, IndexConstants.IS_WRITTEN_BY,
-        _expectedLocation(mainElement, 'v = 1'));
-  }
-
-  void test_nameIsInvokedBy() {
-    _indexTestUnit('''
-class A {
-  test(x) {}
-}
-main(A a, p) {
-  a.test(1);
-  p.test(2);
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    IndexableName indexable = new IndexableName('test');
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQ(mainElement, 'test(1)'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_INVOKED_BY,
-        _expectedLocationQU(mainElement, 'test(2)'));
-    _assertNoRecordedRelation(indexable, IndexConstants.IS_READ_BY,
-        _expectedLocationQU(mainElement, 'test(2)'));
-  }
-
-  void test_nameIsReadBy() {
-    _indexTestUnit('''
-class A {
-  var test;
-}
-main(A a, p) {
-  print(a.test); // a
-  print(p.test); // p
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    IndexableName indexable = new IndexableName('test');
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_READ_BY,
-        _expectedLocationQ(mainElement, 'test); // a'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_READ_BY,
-        _expectedLocationQU(mainElement, 'test); // p'));
-  }
-
-  void test_nameIsReadWrittenBy() {
-    _indexTestUnit('''
-class A {
-  var test;
-}
-main(A a, p) {
-  a.test += 1;
-  p.test += 2;
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    IndexableName indexable = new IndexableName('test');
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_READ_WRITTEN_BY,
-        _expectedLocationQ(mainElement, 'test += 1'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_READ_WRITTEN_BY,
-        _expectedLocationQU(mainElement, 'test += 2'));
-  }
-
-  void test_nameIsWrittenBy() {
-    _indexTestUnit('''
-class A {
-  var test;
-}
-main(A a, p) {
-  a.test = 1;
-  p.test = 2;
-}''');
-    // prepare elements
-    Element mainElement = findElement("main");
-    IndexableName indexable = new IndexableName('test');
-    // verify
-    _assertRecordedRelation(indexable, IndexConstants.IS_WRITTEN_BY,
-        _expectedLocationQ(mainElement, 'test = 1'));
-    _assertRecordedRelation(indexable, IndexConstants.IS_WRITTEN_BY,
-        _expectedLocationQU(mainElement, 'test = 2'));
-  }
-
-  void test_nullUnit() {
-    indexDartUnit(store, context, null);
-  }
-
-  void test_nullUnitElement() {
-    CompilationUnit unit = new CompilationUnit(null, null, [], [], null);
-    indexDartUnit(store, context, unit);
-  }
-
-  void _assertDefinesTopLevelElement(Element element) {
-    ExpectedLocation location = new ExpectedLocation(
-        new IndexableElement(element),
-        element.nameOffset,
-        element.nameLength,
-        false,
-        true);
-    _assertRecordedRelationForElement(
-        testLibraryElement, IndexConstants.DEFINES, location);
-    expect(recordedTopElements, contains(element));
-  }
-
-  /**
-   * Asserts that [recordedRelations] has no item with the specified properties.
-   */
-  void _assertNoRecordedRelation(IndexableObject expectedIndexable,
-      RelationshipImpl relationship, ExpectedLocation location) {
-    for (RecordedRelation recordedRelation in recordedRelations) {
-      if (_equalsRecordedRelation(
-          recordedRelation, expectedIndexable, relationship, location)) {
-        fail('not expected: $recordedRelation in\n' +
-            recordedRelations.join('\n'));
-      }
-    }
-  }
-
-  /**
-   * Asserts that [recordedRelations] has no item with the specified properties.
-   */
-  void _assertNoRecordedRelationForElement(Element expectedElement,
-      RelationshipImpl relationship, ExpectedLocation location) {
-    _assertNoRecordedRelation(
-        new IndexableElement(expectedElement), relationship, location);
-  }
-
-  /**
-   * Asserts that [recordedRelations] has an item with the expected properties.
-   */
-  LocationImpl _assertRecordedRelation(
-      IndexableObject expectedIndexable,
-      RelationshipImpl expectedRelationship,
-      ExpectedLocation expectedLocation) {
-    for (RecordedRelation recordedRelation in recordedRelations) {
-      if (_equalsRecordedRelation(recordedRelation, expectedIndexable,
-          expectedRelationship, expectedLocation)) {
-        return recordedRelation.location;
-      }
-    }
-    fail("not found\n$expectedIndexable $expectedRelationship "
-        "in $expectedLocation in\n" +
-        recordedRelations.join('\n'));
-    return null;
-  }
-
-  /**
-   * Asserts that [recordedRelations] has an item with the expected properties.
-   */
-  LocationImpl _assertRecordedRelationForElement(
-      Element expectedElement,
-      RelationshipImpl expectedRelationship,
-      ExpectedLocation expectedLocation) {
-    return _assertRecordedRelationForIndexable(
-        new IndexableElement(expectedElement),
-        expectedRelationship,
-        expectedLocation);
-  }
-
-  /**
-   * Asserts that [recordedRelations] has an item with the expected properties.
-   */
-  LocationImpl _assertRecordedRelationForIndexable(
-      IndexableObject expectedIndexable,
-      RelationshipImpl expectedRelationship,
-      ExpectedLocation expectedLocation) {
-    return _assertRecordedRelation(
-        expectedIndexable, expectedRelationship, expectedLocation);
-  }
-
-  /**
-   * Asserts that [recordedRelations] has an item with the expected properties.
-   */
-  LocationImpl _assertRecordedRelationForName(
-      String expectedName,
-      RelationshipImpl expectedRelationship,
-      ExpectedLocation expectedLocation) {
-    return _assertRecordedRelationForIndexable(new IndexableName(expectedName),
-        expectedRelationship, expectedLocation);
-  }
-
-  ExpectedLocation _expectedLocation(Element element, String search,
-      {int length: -1, bool isQualified: false, bool isResolved: true}) {
-    int offset = findOffset(search);
-    if (length == -1) {
-      length = getLeadingIdentifierLength(search);
-    }
-    IndexableObject indexable =
-        element != null ? new IndexableElement(element) : null;
-    return new ExpectedLocation(
-        indexable, offset, length, isQualified, isResolved);
-  }
-
-  ExpectedLocation _expectedLocationQ(Element element, String search,
-      {int length: -1}) {
-    return _expectedLocation(element, search,
-        length: length, isQualified: true);
-  }
-
-  ExpectedLocation _expectedLocationQU(Element element, String search,
-      {int length: -1}) {
-    return _expectedLocation(element, search,
-        length: length, isQualified: true, isResolved: false);
-  }
-
-  void _indexTestUnit(String code) {
-    resolveTestUnit(code);
-    indexDartUnit(store, context, testUnit);
-  }
-}
-
-class ExpectedLocation {
-  IndexableObject indexable;
-  int offset;
-  int length;
-  bool isQualified;
-  bool isResolved;
-
-  ExpectedLocation(this.indexable, this.offset, this.length, this.isQualified,
-      this.isResolved);
-
-  @override
-  String toString() {
-    return 'ExpectedLocation(indexable=$indexable; offset=$offset; length=$length;'
-        ' isQualified=$isQualified isResolved=$isResolved)';
-  }
-}
-
-class MockIndexStore extends TypedMock implements InternalIndexStore {}
-
-/**
- * Information about a relation recorded into {@link IndexStore}.
- */
-class RecordedRelation {
-  final IndexableObject indexable;
-  final RelationshipImpl relationship;
-  final LocationImpl location;
-
-  RecordedRelation(this.indexable, this.relationship, this.location);
-
-  @override
-  String toString() {
-    return 'RecordedRelation(indexable=$indexable; relationship=$relationship; '
-        'location=$location; flags='
-        '${location.isQualified ? "Q" : ""}'
-        '${location.isResolved ? "R" : ""})';
-  }
-}
diff --git a/pkg/analysis_server/test/services/index/index_test.dart b/pkg/analysis_server/test/services/index/index_test.dart
new file mode 100644
index 0000000..a99d34a
--- /dev/null
+++ b/pkg/analysis_server/test/services/index/index_test.dart
@@ -0,0 +1,355 @@
+// 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:analysis_server/src/services/index/index.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+import 'package:typed_mock/typed_mock.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../abstract_single_unit.dart';
+import '../../utils.dart';
+
+main() {
+  initializeTestEnvironment();
+  defineReflectiveTests(IndexTest);
+}
+
+@reflectiveTest
+class IndexTest extends AbstractSingleUnitTest {
+  Index index = createMemoryIndex();
+
+  /**
+   * Return the [Location] with given properties, or fail.
+   */
+  Location findLocation(List<Location> locations, String libraryUri,
+      String unitUri, int offset, int length, bool isQualified) {
+    for (Location location in locations) {
+      if (location.libraryUri == libraryUri &&
+          location.unitUri == unitUri &&
+          location.offset == offset &&
+          location.length == length &&
+          location.isQualified == isQualified) {
+        return location;
+      }
+    }
+    fail('No at $offset with length $length qualified=$isQualified in\n'
+        '${locations.join('\n')}');
+    return null;
+  }
+
+  /**
+   * Return the [Location] with given properties, or fail.
+   */
+  Location findLocationSource(
+      List<Location> locations, Source source, String search, bool isQualified,
+      {int length}) {
+    String code = source.contents.data;
+    int offset = code.indexOf(search);
+    expect(offset, isNonNegative, reason: 'Not found "$search" in\n$code');
+    length ??= getLeadingIdentifierLength(search);
+    String uri = source.uri.toString();
+    return findLocation(locations, uri, uri, offset, length, isQualified);
+  }
+
+  /**
+   * Return the [Location] with given properties, or fail.
+   */
+  Location findLocationTest(
+      List<Location> locations, String search, bool isQualified,
+      {int length}) {
+    int offset = findOffset(search);
+    length ??= getLeadingIdentifierLength(search);
+    String testUri = testSource.uri.toString();
+    return findLocation(
+        locations, testUri, testUri, offset, length, isQualified);
+  }
+
+  void setUp() {
+    super.setUp();
+  }
+
+  void tearDown() {
+    super.tearDown();
+    index = null;
+  }
+
+  test_getDefinedNames_classMember() async {
+    _indexTestUnit('''
+class A {
+  test() {}
+}
+class B {
+  int test = 1;
+  main() {
+    int test = 2;
+  }
+}
+''');
+    ClassElement classA = findElement('A');
+    ClassElement classB = findElement('B');
+    List<Location> locations = await index.getDefinedNames(
+        new RegExp(r'^test$'), IndexNameKind.classMember);
+    expect(locations, hasLength(2));
+    _assertHasDefinedName(locations, classA.methods[0]);
+    _assertHasDefinedName(locations, classB.fields[0]);
+  }
+
+  test_getDefinedNames_topLevel() async {
+    _indexTestUnit('''
+class A {} // A
+class B = Object with A;
+typedef C();
+D() {}
+var E = null;
+class NoMatchABCDE {}
+''');
+    Element topA = findElement('A');
+    Element topB = findElement('B');
+    Element topC = findElement('C');
+    Element topD = findElement('D');
+    Element topE = findElement('E');
+    List<Location> locations = await index.getDefinedNames(
+        new RegExp(r'^[A-E]$'), IndexNameKind.topLevel);
+    expect(locations, hasLength(5));
+    _assertHasDefinedName(locations, topA);
+    _assertHasDefinedName(locations, topB);
+    _assertHasDefinedName(locations, topC);
+    _assertHasDefinedName(locations, topD);
+    _assertHasDefinedName(locations, topE);
+  }
+
+  test_getDefinedNames_topLevel2() async {
+    _indexTestUnit(
+        '''
+class A {} // A
+class B = Object with A;
+class NoMatchABCDE {}
+''',
+        declOnly: true);
+    Element topA = findElement('A');
+    Element topB = findElement('B');
+    List<Location> locations = await index.getDefinedNames(
+        new RegExp(r'^[A-E]$'), IndexNameKind.topLevel);
+    expect(locations, hasLength(2));
+    _assertHasDefinedName(locations, topA);
+    _assertHasDefinedName(locations, topB);
+  }
+
+  test_getRelations_isExtendedBy() async {
+    _indexTestUnit(r'''
+class A {}
+class B extends A {} // B
+''');
+    Source source2 = _indexUnit(
+        '/test2.dart',
+        r'''
+import 'test.dart';
+class C extends A {} // C
+''');
+    ClassElement elementA = testUnitElement.getType('A');
+    List<Location> locations =
+        await index.getRelations(elementA, IndexRelationKind.IS_EXTENDED_BY);
+    findLocationTest(locations, 'A {} // B', false);
+    findLocationSource(locations, source2, 'A {} // C', false);
+  }
+
+  test_getRelations_isReferencedBy() async {
+    _indexTestUnit(r'''
+main(int a, int b) {
+}
+''');
+    ClassElement intElement = context.typeProvider.intType.element;
+    List<Location> locations = await index.getRelations(
+        intElement, IndexRelationKind.IS_REFERENCED_BY);
+    findLocationTest(locations, 'int a', false);
+    findLocationTest(locations, 'int b', false);
+  }
+
+  test_getUnresolvedMemberReferences_qualified_resolved() async {
+    _indexTestUnit('''
+class A {
+  var test; // A
+}
+main(A a) {
+  print(a.test);
+  a.test = 1;
+  a.test += 2;
+  a.test();
+}
+''');
+    List<Location> locations =
+        await index.getUnresolvedMemberReferences('test');
+    expect(locations, isEmpty);
+  }
+
+  test_getUnresolvedMemberReferences_qualified_unresolved() async {
+    _indexTestUnit('''
+class A {
+  var test; // A
+}
+main(p) {
+  print(p.test);
+  p.test = 1;
+  p.test += 2;
+  p.test();
+  print(p.test2); // not requested
+}
+''');
+    List<Location> locations =
+        await index.getUnresolvedMemberReferences('test');
+    expect(locations, hasLength(4));
+    findLocationTest(locations, 'test);', true);
+    findLocationTest(locations, 'test = 1;', true);
+    findLocationTest(locations, 'test += 2;', true);
+    findLocationTest(locations, 'test();', true);
+  }
+
+  test_getUnresolvedMemberReferences_unqualified_resolved() async {
+    _indexTestUnit('''
+class A {
+  var test;
+  m() {
+    print(test);
+    test = 1;
+    test += 2;
+    test();
+  }
+}
+''');
+    List<Location> locations =
+        await index.getUnresolvedMemberReferences('test');
+    expect(locations, isEmpty);
+  }
+
+  test_getUnresolvedMemberReferences_unqualified_unresolved() async {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+class A {
+  m() {
+    print(test);
+    test = 1;
+    test += 2;
+    test();
+    print(test2); // not requested
+  }
+}
+''');
+    List<Location> locations =
+        await index.getUnresolvedMemberReferences('test');
+    expect(locations, hasLength(4));
+    findLocationTest(locations, 'test);', false);
+    findLocationTest(locations, 'test = 1;', false);
+    findLocationTest(locations, 'test += 2;', false);
+    findLocationTest(locations, 'test();', false);
+  }
+
+  test_indexDeclarations_nullUnit() async {
+    index.indexDeclarations(null);
+  }
+
+  test_indexDeclarations_nullUnitElement() async {
+    resolveTestUnit('');
+    testUnit.element = null;
+    index.indexDeclarations(testUnit);
+  }
+
+  test_indexUnit_nullLibraryElement() async {
+    resolveTestUnit('');
+    CompilationUnitElement unitElement = new _CompilationUnitElementMock();
+    expect(unitElement.library, isNull);
+    testUnit.element = unitElement;
+    index.indexUnit(testUnit);
+  }
+
+  test_indexUnit_nullUnit() async {
+    index.indexUnit(null);
+  }
+
+  test_indexUnit_nullUnitElement() async {
+    resolveTestUnit('');
+    testUnit.element = null;
+    index.indexUnit(testUnit);
+  }
+
+  test_removeContext() async {
+    _indexTestUnit('''
+class A {}
+''');
+    RegExp regExp = new RegExp(r'^A$');
+    expect(await index.getDefinedNames(regExp, IndexNameKind.topLevel),
+        hasLength(1));
+    // remove the context - no top-level declarations
+    index.removeContext(context);
+    expect(
+        await index.getDefinedNames(regExp, IndexNameKind.topLevel), isEmpty);
+  }
+
+  test_removeUnit() async {
+    RegExp regExp = new RegExp(r'^[AB]$');
+    Source sourceA = addSource('/a.dart', 'class A {}');
+    Source sourceB = addSource('/b.dart', 'class B {}');
+    CompilationUnit unitA = resolveLibraryUnit(sourceA);
+    CompilationUnit unitB = resolveLibraryUnit(sourceB);
+    index.indexUnit(unitA);
+    index.indexUnit(unitB);
+    {
+      List<Location> locations =
+          await index.getDefinedNames(regExp, IndexNameKind.topLevel);
+      expect(locations, hasLength(2));
+      expect(locations.map((l) => l.libraryUri),
+          unorderedEquals([sourceA.uri.toString(), sourceB.uri.toString()]));
+    }
+    // remove a.dart - no a.dart location
+    index.removeUnit(context, sourceA, sourceA);
+    {
+      List<Location> locations =
+          await index.getDefinedNames(regExp, IndexNameKind.topLevel);
+      expect(locations, hasLength(1));
+      expect(locations.map((l) => l.libraryUri),
+          unorderedEquals([sourceB.uri.toString()]));
+    }
+  }
+
+  /**
+   * Assert that the given list of [locations] has a [Location] corresponding
+   * to the [element].
+   */
+  void _assertHasDefinedName(List<Location> locations, Element element) {
+    String libraryUri = element.library.source.uri.toString();
+    String unitUri = element.source.uri.toString();
+    for (Location location in locations) {
+      if (location.libraryUri == libraryUri &&
+          location.unitUri == unitUri &&
+          location.offset == element.nameOffset &&
+          location.length == element.nameLength) {
+        return;
+      }
+    }
+    fail('No declaration of $element at ${element.nameOffset} in\n'
+        '${locations.join('\n')}');
+  }
+
+  void _indexTestUnit(String code, {bool declOnly: false}) {
+    resolveTestUnit(code);
+    if (declOnly) {
+      index.indexDeclarations(testUnit);
+    } else {
+      index.indexUnit(testUnit);
+    }
+  }
+
+  Source _indexUnit(String path, String code) {
+    Source source = addSource(path, code);
+    CompilationUnit unit = resolveLibraryUnit(source);
+    index.indexUnit(unit);
+    return source;
+  }
+}
+
+class _CompilationUnitElementMock extends TypedMock
+    implements CompilationUnitElement {}
diff --git a/pkg/analysis_server/test/services/index/indexable_file_test.dart b/pkg/analysis_server/test/services/index/indexable_file_test.dart
deleted file mode 100644
index e790b84..0000000
--- a/pkg/analysis_server/test/services/index/indexable_file_test.dart
+++ /dev/null
@@ -1,58 +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 test.services.index.indexable_file;
-
-import 'package:analysis_server/src/services/index/indexable_file.dart';
-import 'package:analysis_server/src/services/index/store/codec.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../utils.dart';
-
-main() {
-  initializeTestEnvironment();
-  defineReflectiveTests(IndexableFileKindTest);
-  defineReflectiveTests(IndexableFileTest);
-}
-
-@reflectiveTest
-class IndexableFileKindTest {
-  void test_decode() {
-    IndexableFile object =
-        IndexableFileKind.INSTANCE.decode(null, '/a.dart', -1);
-    expect(object.path, '/a.dart');
-  }
-
-  void test_encodeHash() {
-    StringCodec stringCodec = new StringCodec();
-    String path = '/a/bb/ccc.dart';
-    int hash1 = IndexableFileKind.INSTANCE
-        .encodeHash(stringCodec.encode, new IndexableFile(path));
-    int hash2 = IndexableFileKind.INSTANCE
-        .encodeHash(stringCodec.encode, new IndexableFile(path));
-    expect(hash2, hash1);
-  }
-}
-
-@reflectiveTest
-class IndexableFileTest {
-  void test_equals() {
-    IndexableFile a = new IndexableFile('/a.dart');
-    IndexableFile a2 = new IndexableFile('/a.dart');
-    IndexableFile b = new IndexableFile('/b.dart');
-    expect(a == a, isTrue);
-    expect(a == a2, isTrue);
-    expect(a == b, isFalse);
-  }
-
-  void test_getters() {
-    String path = '/a/bb/ccc.dart';
-    IndexableFile indexable = new IndexableFile(path);
-    expect(indexable.kind, IndexableFileKind.INSTANCE);
-    expect(indexable.filePath, path);
-    expect(indexable.offset, -1);
-    expect(indexable.toString(), path);
-  }
-}
diff --git a/pkg/analysis_server/test/services/index/local_file_index_test.dart b/pkg/analysis_server/test/services/index/local_file_index_test.dart
deleted file mode 100644
index a92a22f..0000000
--- a/pkg/analysis_server/test/services/index/local_file_index_test.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.local_file_index;
-
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_file_index.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../utils.dart';
-
-main() {
-  initializeTestEnvironment();
-  test('createLocalFileIndex', () {
-    Index index = createLocalFileIndex();
-    expect(index, isNotNull);
-    index.clear();
-  });
-}
diff --git a/pkg/analysis_server/test/services/index/local_index_test.dart b/pkg/analysis_server/test/services/index/local_index_test.dart
deleted file mode 100644
index 5f318ad..0000000
--- a/pkg/analysis_server/test/services/index/local_index_test.dart
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.local_index;
-
-import 'package:analysis_server/src/services/index/index_contributor.dart';
-import 'package:analysis_server/src/services/index/local_index.dart';
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../abstract_context.dart';
-import '../../utils.dart';
-import 'store/single_source_container.dart';
-
-main() {
-  initializeTestEnvironment();
-  defineReflectiveTests(LocalIndexTest);
-}
-
-void _assertElementNames(List<Element> elements, List expected) {
-  expect(_toElementNames(elements), unorderedEquals(expected));
-}
-
-Iterable<String> _toElementNames(List<Element> elements) {
-  return elements.map((element) => element.name);
-}
-
-@reflectiveTest
-class LocalIndexTest extends AbstractContextTest {
-  LocalIndex index;
-
-  void setUp() {
-    super.setUp();
-    index = createLocalMemoryIndex();
-    index.contributors = [new DartIndexContributor()];
-  }
-
-  void tearDown() {
-    super.tearDown();
-    index = null;
-  }
-
-  void test_clear() {
-    _indexTest('main() {}');
-    _assertElementNames(_getTopElements(), ['main']);
-    // clear
-    index.clear();
-    expect(_getTopElements(), isEmpty);
-  }
-
-  void test_index() {
-    _indexTest('main() {}');
-    _assertElementNames(_getTopElements(), ['main']);
-  }
-
-  void test_index_nullObject() {
-    index.index(context, null);
-  }
-
-  void test_index_nullUnitElement() {
-    CompilationUnit unit = new CompilationUnit(null, null, [], [], null);
-    index.index(context, unit);
-  }
-
-  void test_removeContext() {
-    _indexTest('main() {}');
-    // OK, there is an element
-    _assertElementNames(_getTopElements(), ['main']);
-    // remove context
-    index.removeContext(context);
-    expect(_getTopElements(), isEmpty);
-  }
-
-  void test_removeSource() {
-    Source sourceA = _indexLibraryUnit('/testA.dart', 'fa() {}');
-    _indexLibraryUnit('/testB.dart', 'fb() {}');
-    // OK, there are 2 functions
-    _assertElementNames(_getTopElements(), ['fa', 'fb']);
-    // remove source
-    index.removeSource(context, sourceA);
-    _assertElementNames(_getTopElements(), ['fb']);
-  }
-
-  void test_removeSources() {
-    Source sourceA = _indexLibraryUnit('/testA.dart', 'fa() {}');
-    _indexLibraryUnit('/testB.dart', 'fb() {}');
-    // OK, there are 2 functions
-    _assertElementNames(_getTopElements(), ['fa', 'fb']);
-    // remove source(s)
-    index.removeSources(context, new SingleSourceContainer(sourceA));
-    _assertElementNames(_getTopElements(), ['fb']);
-  }
-
-  void test_statistics() {
-    expect(index.statistics, '[0 locations, 0 sources, 0 names]');
-  }
-
-  List<Element> _getTopElements() {
-    return index.getTopLevelDeclarations((_) => true);
-  }
-
-  Source _indexLibraryUnit(String path, String content) {
-    Source source = addSource(path, content);
-    CompilationUnit dartUnit = resolveLibraryUnit(source);
-    index.index(context, dartUnit);
-    return source;
-  }
-
-  void _indexTest(String content) {
-    _indexLibraryUnit('/test.dart', content);
-  }
-}
diff --git a/pkg/analysis_server/test/services/index/store/codec_test.dart b/pkg/analysis_server/test/services/index/store/codec_test.dart
deleted file mode 100644
index e7914b8..0000000
--- a/pkg/analysis_server/test/services/index/store/codec_test.dart
+++ /dev/null
@@ -1,408 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.store.codec;
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/indexable_element.dart';
-import 'package:analysis_server/src/services/index/store/codec.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../../abstract_single_unit.dart';
-import '../../../mocks.dart';
-import '../../../utils.dart';
-
-main() {
-  initializeTestEnvironment();
-  defineReflectiveTests(_ContextCodecTest);
-  defineReflectiveTests(_ElementCodecTest);
-  defineReflectiveTests(_RelationshipCodecTest);
-  defineReflectiveTests(_StringCodecTest);
-}
-
-@reflectiveTest
-class _ContextCodecTest {
-  ContextCodec codec = new ContextCodec();
-
-  void test_encode_decode() {
-    AnalysisContext contextA = new MockAnalysisContext('contextA');
-    AnalysisContext contextB = new MockAnalysisContext('contextB');
-    int idA = codec.encode(contextA);
-    int idB = codec.encode(contextB);
-    expect(idA, codec.encode(contextA));
-    expect(idB, codec.encode(contextB));
-    expect(codec.decode(idA), contextA);
-    expect(codec.decode(idB), contextB);
-  }
-
-  void test_remove() {
-    // encode
-    {
-      AnalysisContext context = new MockAnalysisContext('context');
-      // encode
-      int id = codec.encode(context);
-      expect(id, 0);
-      expect(codec.decode(id), context);
-      // remove
-      codec.remove(context);
-      expect(codec.decode(id), isNull);
-    }
-    // encode again
-    {
-      AnalysisContext context = new MockAnalysisContext('context');
-      // encode
-      int id = codec.encode(context);
-      expect(id, 1);
-      expect(codec.decode(id), context);
-    }
-  }
-}
-
-@reflectiveTest
-class _ElementCodecTest extends AbstractSingleUnitTest {
-  ElementCodec codec;
-  AnalysisContext context = new MockAnalysisContext('context');
-  StringCodec stringCodec = new StringCodec();
-
-  void setUp() {
-    super.setUp();
-    codec = new ElementCodec(stringCodec);
-  }
-
-  void test_encode_CompilationUnitElement() {
-    addSource(
-        '/my_part.dart',
-        '''
-part of my_lib;
-''');
-    resolveTestUnit('''
-library my_lib;
-part 'my_part.dart';
-''');
-    // defining unit
-    {
-      Element element = testLibraryElement.definingCompilationUnit;
-      expect(element.source.fullName, '/test.dart');
-      IndexableObject indexable = new IndexableElement(element);
-      int id1 = codec.encode1(indexable);
-      int id2 = codec.encode2(indexable);
-      int id3 = codec.encode3(indexable);
-      expect(id1, isNonNegative);
-      expect(id2, -1);
-      expect(id3, IndexableElementKind.forElement(element).index);
-      validateDecode(id1, id2, id3, element);
-    }
-    // part
-    {
-      Element element = testLibraryElement.parts[0];
-      expect(element.source.fullName, '/my_part.dart');
-      IndexableObject indexable = new IndexableElement(element);
-      int id1 = codec.encode1(indexable);
-      int id2 = codec.encode2(indexable);
-      int id3 = codec.encode3(indexable);
-      expect(id1, isNonNegative);
-      expect(id2, -1);
-      expect(id3, IndexableElementKind.forElement(element).index);
-      validateDecode(id1, id2, id3, element);
-    }
-  }
-
-  void test_encode_ConstructorElement_default_real() {
-    resolveTestUnit('''
-class A {
-  A();
-}
-''');
-    ClassElement classA = findElement('A');
-    ConstructorElement element = classA.constructors[0];
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, isNonNegative);
-    expect(id2, classA.nameOffset);
-    expect(id3, IndexableElementKind.forElement(element).index);
-    validateDecode(id1, id2, id3, element);
-  }
-
-  void test_encode_ConstructorElement_default_synthetic() {
-    resolveTestUnit('''
-class A {
-}
-''');
-    ClassElement classA = findElement('A');
-    ConstructorElement element = classA.constructors[0];
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, isNonNegative);
-    expect(id2, classA.nameOffset);
-    expect(id3, IndexableElementKind.forElement(element).index);
-    validateDecode(id1, id2, id3, element);
-  }
-
-  void test_encode_ConstructorElement_named_real() {
-    resolveTestUnit('''
-class A {
-  A.aaa();
-  A.bbb();
-}
-''');
-    ClassElement classA = findElement('A');
-    // A.aaa()
-    {
-      ConstructorElement element = classA.getNamedConstructor('aaa');
-      IndexableObject indexable = new IndexableElement(element);
-      int id1 = codec.encode1(indexable);
-      int id2 = codec.encode2(indexable);
-      int id3 = codec.encode3(indexable);
-      expect(id1, isNonNegative);
-      expect(id2, classA.nameOffset);
-      expect(id3, IndexableElementKind.forElement(element).index);
-      validateDecode(id1, id2, id3, element);
-    }
-    // A.bbb()
-    {
-      ConstructorElement element = classA.getNamedConstructor('bbb');
-      IndexableObject indexable = new IndexableElement(element);
-      int id1 = codec.encode1(indexable);
-      int id2 = codec.encode2(indexable);
-      int id3 = codec.encode3(indexable);
-      expect(id1, isNonNegative);
-      expect(id2, classA.nameOffset);
-      expect(id3, IndexableElementKind.forElement(element).index);
-      validateDecode(id1, id2, id3, element);
-    }
-  }
-
-  void test_encode_ConstructorElement_named_synthetic() {
-    resolveTestUnit('''
-class A {
-  A.aaa();
-  A.bbb();
-}
-class M {}
-class X = A with M;
-''');
-    ClassElement classX = findElement('X');
-    // X.aaa()
-    {
-      ConstructorElement element = classX.getNamedConstructor('aaa');
-      IndexableObject indexable = new IndexableElement(element);
-      int id1 = codec.encode1(indexable);
-      int id2 = codec.encode2(indexable);
-      int id3 = codec.encode3(indexable);
-      expect(id1, isNonNegative);
-      expect(id2, classX.nameOffset);
-      expect(id3, IndexableElementKind.forElement(element).index);
-      validateDecode(id1, id2, id3, element);
-    }
-    // X.bbb()
-    {
-      ConstructorElement element = classX.getNamedConstructor('bbb');
-      IndexableObject indexable = new IndexableElement(element);
-      int id1 = codec.encode1(indexable);
-      int id2 = codec.encode2(indexable);
-      int id3 = codec.encode3(indexable);
-      expect(id1, isNonNegative);
-      expect(id2, classX.nameOffset);
-      expect(id3, IndexableElementKind.forElement(element).index);
-      validateDecode(id1, id2, id3, element);
-    }
-  }
-
-  void test_encode_getter_real() {
-    resolveTestUnit('''
-class A {
-  int get test => 42;
-}
-''');
-    PropertyAccessorElement element = findElement('test', ElementKind.GETTER);
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, isNonNegative);
-    expect(id2, element.nameOffset);
-    expect(id3, IndexableElementKind.forElement(element).index);
-    validateDecode(id1, id2, id3, element);
-  }
-
-  void test_encode_getter_synthetic() {
-    resolveTestUnit('''
-class A {
-  int test;
-}
-''');
-    FieldElement field = findElement('test', ElementKind.FIELD);
-    PropertyAccessorElement element = field.getter;
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, isNonNegative);
-    expect(id2, element.nameOffset);
-    expect(id3, IndexableElementKind.forElement(element).index);
-    validateDecode(id1, id2, id3, element);
-  }
-
-  void test_encode_IndexableName() {
-    IndexableName indexable = new IndexableName('test');
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, -1);
-    expect(id2, isNonNegative);
-    expect(id3, IndexableNameKind.INSTANCE.index);
-    expect(codec.decode(context, id1, id2, id3), indexable);
-  }
-
-  void test_encode_LibraryElement() {
-    resolveTestUnit('''
-class A {
-  test() {}
-}
-''');
-    Element element = testLibraryElement;
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, isNonNegative);
-    expect(id2, -1);
-    expect(id3, IndexableElementKind.forElement(element).index);
-    validateDecode(id1, id2, id3, element);
-  }
-
-  void test_encode_MethodElement() {
-    resolveTestUnit('''
-class A {
-  test() {}
-}
-''');
-    Element element = findElement('test');
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, isNonNegative);
-    expect(id2, element.nameOffset);
-    expect(id3, IndexableElementKind.forElement(element).index);
-    validateDecode(id1, id2, id3, element);
-  }
-
-  void test_encode_nullLibraryElement() {
-    resolveTestUnit('''
-test() {}
-''');
-    Element element = findElement('test');
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    context.setContents(testSource, '');
-    IndexableObject object2 = codec.decode(context, id1, id2, id3);
-    expect(object2, isNull);
-  }
-
-  void test_encode_setter_real() {
-    resolveTestUnit('''
-class A {
-  void set test(x) {}
-}
-''');
-    PropertyAccessorElement element = findElement('test=', ElementKind.SETTER);
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, isNonNegative);
-    expect(id2, element.nameOffset);
-    expect(id3, IndexableElementKind.forElement(element).index);
-    validateDecode(id1, id2, id3, element);
-  }
-
-  void test_encode_setter_synthetic() {
-    resolveTestUnit('''
-class A {
-  int test;
-}
-''');
-    FieldElement field = findElement('test', ElementKind.FIELD);
-    PropertyAccessorElement element = field.setter;
-    IndexableObject indexable = new IndexableElement(element);
-    int id1 = codec.encode1(indexable);
-    int id2 = codec.encode2(indexable);
-    int id3 = codec.encode3(indexable);
-    expect(id1, isNonNegative);
-    expect(id2, element.nameOffset);
-    expect(id3, IndexableElementKind.forElement(element).index);
-    validateDecode(id1, id2, id3, element);
-  }
-
-  void test_encodeHash_notLocal() {
-    resolveTestUnit('''
-class A {
-  void mainA() {
-    int foo; // A
-  }
-  void mainB() {
-    int foo; // B
-    int bar;
-  }
-}
-''');
-    MethodElement mainA = findElement('mainA');
-    MethodElement mainB = findElement('mainB');
-    Element fooA = mainA.localVariables[0];
-    Element fooB = mainB.localVariables[0];
-    Element bar = mainB.localVariables[1];
-    int id_fooA = codec.encodeHash(new IndexableElement(fooA));
-    int id_fooB = codec.encodeHash(new IndexableElement(fooB));
-    int id_bar = codec.encodeHash(new IndexableElement(bar));
-    expect(id_fooA == id_fooB, isTrue);
-    expect(id_fooA == id_bar, isFalse);
-  }
-
-  void validateDecode(int id1, int id2, int id3, Element element) {
-    IndexableObject object2 = codec.decode(context, id1, id2, id3);
-    expect(object2, new isInstanceOf<IndexableElement>());
-    Element element2 = (object2 as IndexableElement).element;
-    expect(element2, element);
-  }
-}
-
-@reflectiveTest
-class _RelationshipCodecTest {
-  StringCodec stringCodec = new StringCodec();
-  RelationshipCodec codec;
-
-  void setUp() {
-    codec = new RelationshipCodec(stringCodec);
-  }
-
-  void test_all() {
-    RelationshipImpl relationship =
-        RelationshipImpl.getRelationship('my-relationship');
-    int id = codec.encode(relationship);
-    expect(codec.decode(id), relationship);
-  }
-}
-
-@reflectiveTest
-class _StringCodecTest {
-  StringCodec codec = new StringCodec();
-
-  void test_all() {
-    int idA = codec.encode('aaa');
-    int idB = codec.encode('bbb');
-    expect(codec.decode(idA), 'aaa');
-    expect(codec.decode(idB), 'bbb');
-  }
-}
diff --git a/pkg/analysis_server/test/services/index/store/collection_test.dart b/pkg/analysis_server/test/services/index/store/collection_test.dart
deleted file mode 100644
index 77e6bb7..0000000
--- a/pkg/analysis_server/test/services/index/store/collection_test.dart
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.store.collection;
-
-import 'package:analysis_server/src/services/index/store/collection.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../../utils.dart';
-
-main() {
-  initializeTestEnvironment();
-  defineReflectiveTests(_IntArrayToIntMapTest);
-  defineReflectiveTests(_IntToIntSetMapTest);
-}
-
-@reflectiveTest
-class _IntArrayToIntMapTest {
-  IntArrayToIntMap map = new IntArrayToIntMap();
-
-  void test_put_get() {
-    map[<int>[1, 2, 3]] = 1;
-    map[<int>[2, 3, 4, 5]] = 2;
-    expect(map[<int>[0]], isNull);
-    expect(map[<int>[1, 2, 3]], 1);
-    expect(map[<int>[2, 3, 4, 5]], 2);
-  }
-}
-
-@reflectiveTest
-class _IntToIntSetMapTest {
-  IntToIntSetMap map = new IntToIntSetMap();
-
-  void test_add_duplicate() {
-    map.add(1, 0);
-    map.add(1, 0);
-    List<int> set = map.get(1);
-    expect(set, hasLength(1));
-  }
-
-  void test_clear() {
-    map.add(1, 10);
-    map.add(2, 20);
-    expect(map.length, 2);
-    map.clear();
-    expect(map.length, 0);
-  }
-
-  void test_get() {
-    map.add(1, 10);
-    map.add(1, 11);
-    map.add(1, 12);
-    map.add(2, 20);
-    map.add(2, 21);
-    expect(map.get(1), unorderedEquals([10, 11, 12]));
-    expect(map.get(2), unorderedEquals([20, 21]));
-  }
-
-  void test_get_no() {
-    expect(map.get(3), []);
-  }
-
-  void test_length() {
-    expect(map.length, 0);
-    map.add(1, 10);
-    expect(map.length, 1);
-    map.add(1, 11);
-    map.add(1, 12);
-    expect(map.length, 1);
-    map.add(2, 20);
-    expect(map.length, 2);
-    map.add(2, 21);
-    expect(map.length, 2);
-  }
-}
diff --git a/pkg/analysis_server/test/services/index/store/mocks.dart b/pkg/analysis_server/test/services/index/store/mocks.dart
deleted file mode 100644
index a197342..0000000
--- a/pkg/analysis_server/test/services/index/store/mocks.dart
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.index.store.mocks;
-
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/store/codec.dart';
-import 'package:typed_mock/typed_mock.dart';
-
-class MockContextCodec extends TypedMock implements ContextCodec {}
-
-class MockElementCodec extends TypedMock implements ElementCodec {}
-
-class MockLocation extends TypedMock implements LocationImpl {}
-
-class MockRelationshipCodec extends TypedMock implements RelationshipCodec {}
diff --git a/pkg/analysis_server/test/services/index/store/single_source_container.dart b/pkg/analysis_server/test/services/index/store/single_source_container.dart
deleted file mode 100644
index 780e3c8..0000000
--- a/pkg/analysis_server/test/services/index/store/single_source_container.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.store.single_source_container;
-
-import 'package:analyzer/src/generated/source.dart';
-
-/**
- * A [SourceContainer] with a single [Source].
- */
-class SingleSourceContainer implements SourceContainer {
-  final Source _source;
-
-  SingleSourceContainer(this._source);
-
-  @override
-  bool contains(Source source) => source == _source;
-}
diff --git a/pkg/analysis_server/test/services/index/store/split_store_test.dart b/pkg/analysis_server/test/services/index/store/split_store_test.dart
deleted file mode 100644
index fbe43d7..0000000
--- a/pkg/analysis_server/test/services/index/store/split_store_test.dart
+++ /dev/null
@@ -1,1108 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.store.split_store;
-
-import 'dart:async';
-
-import 'package:analysis_server/src/provisional/index/index_core.dart';
-import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/indexable_element.dart';
-import 'package:analysis_server/src/services/index/store/codec.dart';
-import 'package:analysis_server/src/services/index/store/memory_node_manager.dart';
-import 'package:analysis_server/src/services/index/store/split_store.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:typed_mock/typed_mock.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../../mocks.dart';
-import '../../../utils.dart';
-import 'mocks.dart';
-import 'single_source_container.dart';
-
-main() {
-  initializeTestEnvironment();
-  defineReflectiveTests(_FileNodeManagerTest);
-  defineReflectiveTests(_IndexNodeTest);
-  defineReflectiveTests(_LocationDataTest);
-  defineReflectiveTests(_RelationKeyDataTest);
-  defineReflectiveTests(_SplitIndexStoreTest);
-}
-
-void _assertHasLocation(List<LocationImpl> locations, IndexableElement element,
-    int offset, int length,
-    {bool isQualified: false, bool isResolved: true}) {
-  for (LocationImpl location in locations) {
-    if ((element == null || location.indexable == element) &&
-        location.offset == offset &&
-        location.length == length &&
-        location.isQualified == isQualified &&
-        location.isResolved == isResolved) {
-      return;
-    }
-  }
-  fail('Expected to find Location'
-      '(element=$element, offset=$offset, length=$length)');
-}
-
-void _assertHasLocationQ(List<LocationImpl> locations, IndexableElement element,
-    int offset, int length) {
-  _assertHasLocation(locations, element, offset, length, isQualified: true);
-}
-
-@reflectiveTest
-class _FileNodeManagerTest {
-  MockLogger logger = new MockLogger();
-  StringCodec stringCodec = new StringCodec();
-  RelationshipCodec relationshipCodec;
-
-  AnalysisContext context = new MockAnalysisContext('context');
-  ContextCodec contextCodec = new MockContextCodec();
-  int contextId = 13;
-
-  ElementCodec elementCodec = new MockElementCodec();
-  int nextElementId = 0;
-
-  FileNodeManager nodeManager;
-  FileManager fileManager = new _MockFileManager();
-
-  void setUp() {
-    relationshipCodec = new RelationshipCodec(stringCodec);
-    nodeManager = new FileNodeManager(fileManager, logger, stringCodec,
-        contextCodec, elementCodec, relationshipCodec);
-    when(contextCodec.encode(context)).thenReturn(contextId);
-    when(contextCodec.decode(contextId)).thenReturn(context);
-  }
-
-  void test_clear() {
-    nodeManager.clear();
-    verify(fileManager.clear()).once();
-  }
-
-  void test_getLocationCount_empty() {
-    expect(nodeManager.locationCount, 0);
-  }
-
-  void test_getNode_contextNull() {
-    String name = '42.index';
-    // record bytes
-    List<int> bytes;
-    when(fileManager.write(name, anyObject)).thenInvoke((name, bs) {
-      bytes = bs;
-    });
-    // put Node
-    Future putFuture;
-    {
-      IndexNode node = new IndexNode(context, elementCodec, relationshipCodec);
-      putFuture = nodeManager.putNode(name, node);
-    }
-    // do in the "put" Future
-    putFuture.then((_) {
-      // force "null" context
-      when(contextCodec.decode(contextId)).thenReturn(null);
-      // prepare input bytes
-      when(fileManager.read(name)).thenReturn(new Future.value(bytes));
-      // get Node
-      return nodeManager.getNode(name).then((IndexNode node) {
-        expect(node, isNull);
-        // no exceptions
-        verifyZeroInteractions(logger);
-      });
-    });
-  }
-
-  test_getNode_invalidVersion() {
-    String name = '42.index';
-    // prepare a stream with an invalid version
-    when(fileManager.read(name))
-        .thenReturn(new Future.value([0x01, 0x02, 0x03, 0x04]));
-    // do in the Future
-    return nodeManager.getNode(name).then((IndexNode node) {
-      // no IndexNode
-      expect(node, isNull);
-      // failed
-      verify(logger.logError(anyObject, anyObject)).once();
-    });
-  }
-
-  test_getNode_streamException() {
-    String name = '42.index';
-    when(fileManager.read(name)).thenReturn(new Future(() {
-      return throw new Exception();
-    }));
-    // do in the Future
-    return nodeManager.getNode(name).then((IndexNode node) {
-      expect(node, isNull);
-      // failed
-      verify(logger.logError(anyString, anyObject)).once();
-    });
-  }
-
-  test_getNode_streamNull() {
-    String name = '42.index';
-    when(fileManager.read(name)).thenReturn(new Future.value(null));
-    // do in the Future
-    return nodeManager.getNode(name).then((IndexNode node) {
-      expect(node, isNull);
-      // OK
-      verifyZeroInteractions(logger);
-    });
-  }
-
-  void test_newNode() {
-    IndexNode node = nodeManager.newNode(context);
-    expect(node.context, context);
-    expect(node.locationCount, 0);
-  }
-
-  test_putNode_getNode() {
-    String name = '42.index';
-    // record bytes
-    List<int> bytes;
-    when(fileManager.write(name, anyObject)).thenInvoke((name, bs) {
-      bytes = bs;
-    });
-    // prepare elements
-    IndexableElement elementA = _mockElement();
-    IndexableElement elementB = _mockElement();
-    IndexableElement elementC = _mockElement();
-    RelationshipImpl relationship =
-        RelationshipImpl.getRelationship('my-relationship');
-    // put Node
-    Future putFuture;
-    {
-      // prepare relations
-      int relationshipId = relationshipCodec.encode(relationship);
-      RelationKeyData key =
-          new RelationKeyData.forData(0, 1, 2, relationshipId);
-      List<LocationData> locations = [
-        new LocationData.forData(3, 4, 5, 1, 10, 2),
-        new LocationData.forData(6, 7, 8, 2, 20, 3)
-      ];
-      Map<RelationKeyData, List<LocationData>> relations = {key: locations};
-      // prepare Node
-      IndexNode node = new _MockIndexNode();
-      when(node.context).thenReturn(context);
-      when(node.relations).thenReturn(relations);
-      when(node.locationCount).thenReturn(2);
-      // put Node
-      putFuture = nodeManager.putNode(name, node);
-    }
-    // do in the Future
-    putFuture.then((_) {
-      // has locations
-      expect(nodeManager.locationCount, 2);
-      // prepare input bytes
-      when(fileManager.read(name)).thenReturn(new Future.value(bytes));
-      // get Node
-      return nodeManager.getNode(name).then((IndexNode node) {
-        expect(2, node.locationCount);
-        {
-          List<LocationImpl> locations =
-              node.getRelationships(elementA, relationship);
-          expect(locations, hasLength(2));
-          _assertHasLocation(locations, elementB, 1, 10);
-          _assertHasLocationQ(locations, elementC, 2, 20);
-        }
-      });
-    });
-  }
-
-  test_putNode_streamException() {
-    String name = '42.index';
-    Exception exception = new Exception();
-    when(fileManager.write(name, anyObject)).thenReturn(new Future(() {
-      return throw exception;
-    }));
-    // prepare IndexNode
-    IndexNode node = new _MockIndexNode();
-    when(node.context).thenReturn(context);
-    when(node.locationCount).thenReturn(0);
-    when(node.relations).thenReturn({});
-    // try to put
-    return nodeManager.putNode(name, node).then((_) {
-      // failed
-      verify(logger.logError(anyString, anyObject)).once();
-    });
-  }
-
-  void test_removeNode() {
-    String name = '42.index';
-    nodeManager.removeNode(name);
-    verify(fileManager.delete(name)).once();
-  }
-
-  IndexableElement _mockElement() {
-    int id1 = nextElementId++;
-    int id2 = nextElementId++;
-    int id3 = nextElementId++;
-    Element element = new MockElement();
-    IndexableObject indexable = new IndexableElement(element);
-    when(elementCodec.encode1(indexable)).thenReturn(id1);
-    when(elementCodec.encode2(indexable)).thenReturn(id2);
-    when(elementCodec.encode3(indexable)).thenReturn(id3);
-    when(elementCodec.decode(context, id1, id2, id3)).thenReturn(indexable);
-    return indexable;
-  }
-}
-
-@reflectiveTest
-class _IndexNodeTest {
-  AnalysisContext context = new MockAnalysisContext('context');
-  ElementCodec elementCodec = new MockElementCodec();
-  int nextElementId = 0;
-  IndexNode node;
-  RelationshipCodec relationshipCodec;
-  StringCodec stringCodec = new StringCodec();
-
-  void setUp() {
-    relationshipCodec = new RelationshipCodec(stringCodec);
-    node = new IndexNode(context, elementCodec, relationshipCodec);
-  }
-
-  void test_getContext() {
-    expect(node.context, context);
-  }
-
-  void test_recordRelationship() {
-    IndexableElement elementA = _mockElement();
-    IndexableElement elementB = _mockElement();
-    IndexableElement elementC = _mockElement();
-    RelationshipImpl relationship =
-        RelationshipImpl.getRelationship('my-relationship');
-    LocationImpl locationA = new LocationImpl(elementB, 1, 2);
-    LocationImpl locationB = new LocationImpl(elementC, 10, 20);
-    // empty initially
-    expect(node.locationCount, 0);
-    // record
-    node.recordRelationship(elementA, relationship, locationA);
-    expect(node.locationCount, 1);
-    node.recordRelationship(elementA, relationship, locationB);
-    expect(node.locationCount, 2);
-    // get relations
-    expect(node.getRelationships(elementB, relationship), isEmpty);
-    {
-      List<LocationImpl> locations =
-          node.getRelationships(elementA, relationship);
-      expect(locations, hasLength(2));
-      _assertHasLocation(locations, null, 1, 2);
-      _assertHasLocation(locations, null, 10, 20);
-    }
-    // verify relations map
-    {
-      Map<RelationKeyData, List<LocationData>> relations = node.relations;
-      expect(relations, hasLength(1));
-      List<LocationData> locations = relations.values.first;
-      expect(locations, hasLength(2));
-    }
-  }
-
-  void test_setRelations() {
-    IndexableElement elementA = _mockElement();
-    IndexableElement elementB = _mockElement();
-    IndexableElement elementC = _mockElement();
-    RelationshipImpl relationship =
-        RelationshipImpl.getRelationship('my-relationship');
-    // record
-    {
-      int relationshipId = relationshipCodec.encode(relationship);
-      RelationKeyData key =
-          new RelationKeyData.forData(0, 1, 2, relationshipId);
-      List<LocationData> locations = [
-        new LocationData.forData(3, 4, 5, 1, 10, 2),
-        new LocationData.forData(6, 7, 8, 2, 20, 3)
-      ];
-      node.relations = {key: locations};
-    }
-    // request
-    List<LocationImpl> locations =
-        node.getRelationships(elementA, relationship);
-    expect(locations, hasLength(2));
-    _assertHasLocation(locations, elementB, 1, 10);
-    _assertHasLocationQ(locations, elementC, 2, 20);
-  }
-
-  IndexableElement _mockElement() {
-    int id1 = nextElementId++;
-    int id2 = nextElementId++;
-    int id3 = nextElementId++;
-    Element element = new MockElement();
-    IndexableElement indexable = new IndexableElement(element);
-    when(elementCodec.encode1(indexable)).thenReturn(id1);
-    when(elementCodec.encode2(indexable)).thenReturn(id2);
-    when(elementCodec.encode3(indexable)).thenReturn(id3);
-    when(elementCodec.decode(context, id1, id2, id3)).thenReturn(indexable);
-    return indexable;
-  }
-}
-
-@reflectiveTest
-class _LocationDataTest {
-  AnalysisContext context = new MockAnalysisContext('context');
-  ElementCodec elementCodec = new MockElementCodec();
-  StringCodec stringCodec = new StringCodec();
-
-  void test_newForData() {
-    Element element = new MockElement();
-    IndexableElement indexable = new IndexableElement(element);
-    when(elementCodec.decode(context, 11, 12, 13)).thenReturn(indexable);
-    LocationData locationData = new LocationData.forData(11, 12, 13, 1, 2, 0);
-    LocationImpl location = locationData.getLocation(context, elementCodec);
-    expect(location.indexable, indexable);
-    expect(location.offset, 1);
-    expect(location.length, 2);
-    expect(location.isQualified, isFalse);
-    expect(location.isResolved, isFalse);
-  }
-
-  void test_newForObject() {
-    // prepare Element
-    Element element = new MockElement();
-    IndexableElement indexable = new IndexableElement(element);
-    when(elementCodec.encode1(indexable)).thenReturn(11);
-    when(elementCodec.encode2(indexable)).thenReturn(12);
-    when(elementCodec.encode3(indexable)).thenReturn(13);
-    when(elementCodec.decode(context, 11, 12, 13)).thenReturn(indexable);
-    // create
-    LocationImpl location = new LocationImpl(indexable, 1, 2);
-    LocationData locationData =
-        new LocationData.forObject(elementCodec, location);
-    // touch 'hashCode'
-    locationData.hashCode;
-    // ==
-    expect(
-        locationData == new LocationData.forData(11, 12, 13, 1, 2, 2), isTrue);
-    // getLocation()
-    {
-      LocationImpl newLocation =
-          locationData.getLocation(context, elementCodec);
-      expect(newLocation.indexable, indexable);
-      expect(newLocation.offset, 1);
-      expect(newLocation.length, 2);
-    }
-    // no Element - no Location
-    {
-      when(elementCodec.decode(context, 11, 12, 13)).thenReturn(null);
-      LocationImpl newLocation =
-          locationData.getLocation(context, elementCodec);
-      expect(newLocation, isNull);
-    }
-  }
-}
-
-/**
- * [LocationImpl] has no [==] and [hashCode], so to compare locations by value we
- * need to wrap them into such object.
- */
-class _LocationEqualsWrapper {
-  final LocationImpl location;
-
-  _LocationEqualsWrapper(this.location);
-
-  @override
-  int get hashCode {
-    return 31 * (31 * location.indexable.hashCode + location.offset) +
-        location.length;
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is _LocationEqualsWrapper) {
-      return other.location.offset == location.offset &&
-          other.location.length == location.length &&
-          other.location.indexable == location.indexable;
-    }
-    return false;
-  }
-}
-
-class _MockFileManager extends TypedMock implements FileManager {}
-
-class _MockIndexNode extends TypedMock implements IndexNode {}
-
-@reflectiveTest
-class _RelationKeyDataTest {
-  AnalysisContext context = new MockAnalysisContext('context');
-  ElementCodec elementCodec = new MockElementCodec();
-  RelationshipCodec relationshipCodec = new MockRelationshipCodec();
-  StringCodec stringCodec = new StringCodec();
-
-  void test_newFromData() {
-    RelationKeyData keyData = new RelationKeyData.forData(11, 12, 13, 2);
-    // equals
-    expect(keyData == this, isFalse);
-    expect(keyData == new RelationKeyData.forData(11, 12, 13, 20), isFalse);
-    expect(keyData == keyData, isTrue);
-    expect(keyData == new RelationKeyData.forData(11, 12, 13, 2), isTrue);
-  }
-
-  void test_newFromObjects() {
-    // prepare Element
-    IndexableElement indexable;
-    {
-      Element element = new MockElement();
-      indexable = new IndexableElement(element);
-      ElementLocation location = new ElementLocationImpl.con3(['foo', 'bar']);
-      when(element.location).thenReturn(location);
-      when(context.getElement(location)).thenReturn(indexable);
-      when(elementCodec.encode1(indexable)).thenReturn(11);
-      when(elementCodec.encode2(indexable)).thenReturn(12);
-      when(elementCodec.encode3(indexable)).thenReturn(13);
-    }
-    // prepare relationship
-    RelationshipImpl relationship =
-        RelationshipImpl.getRelationship('my-relationship');
-    int relationshipId = 1;
-    when(relationshipCodec.encode(relationship)).thenReturn(relationshipId);
-    // create RelationKeyData
-    RelationKeyData keyData = new RelationKeyData.forObject(
-        elementCodec, relationshipCodec, indexable, relationship);
-    // touch
-    keyData.hashCode;
-    // equals
-    expect(keyData == this, isFalse);
-    expect(keyData == new RelationKeyData.forData(11, 12, 13, 20), isFalse);
-    expect(keyData == keyData, isTrue);
-    expect(keyData == new RelationKeyData.forData(11, 12, 13, relationshipId),
-        isTrue);
-  }
-}
-
-@reflectiveTest
-class _SplitIndexStoreTest {
-  AnalysisContext contextA = new MockAnalysisContext('contextA');
-  AnalysisContext contextB = new MockAnalysisContext('contextB');
-  AnalysisContext contextC = new MockAnalysisContext('contextC');
-
-  Element elementA = new MockElement('elementA');
-  Element elementB = new MockElement('elementB');
-  Element elementC = new MockElement('elementC');
-  Element elementD = new MockElement('elementD');
-
-  IndexableElement indexableA;
-  IndexableElement indexableB;
-  IndexableElement indexableC;
-  IndexableElement indexableD;
-
-  Source librarySource = new MockSource('librarySource');
-  CompilationUnitElement libraryUnitElement = new MockCompilationUnitElement();
-  LibraryElement libraryElement = new MockLibraryElement();
-
-  Source librarySourceB = new MockSource('librarySourceB');
-  LibraryElement libraryElementB = new MockLibraryElement();
-  CompilationUnitElement libraryUnitElementB = new MockCompilationUnitElement();
-
-  ElementCodec elementCodec = new MockElementCodec();
-  MemoryNodeManager nodeManager = new MemoryNodeManager();
-  RelationshipImpl relationship =
-      RelationshipImpl.getRelationship('test-relationship');
-  Source sourceA = new MockSource('sourceA');
-  Source sourceB = new MockSource('sourceB');
-  Source sourceC = new MockSource('sourceC');
-  Source sourceD = new MockSource('sourceD');
-  SplitIndexStore store;
-  CompilationUnitElement unitElementA = new MockCompilationUnitElement();
-  CompilationUnitElement unitElementB = new MockCompilationUnitElement();
-  CompilationUnitElement unitElementC = new MockCompilationUnitElement();
-  CompilationUnitElement unitElementD = new MockCompilationUnitElement();
-
-  void setUp() {
-    indexableA = new IndexableElement(elementA);
-    indexableB = new IndexableElement(elementB);
-    indexableC = new IndexableElement(elementC);
-    indexableD = new IndexableElement(elementD);
-
-    nodeManager.elementCodec = elementCodec;
-    store = new SplitIndexStore(
-        nodeManager, <IndexObjectManager>[new DartUnitIndexObjectManager()]);
-    when(elementCodec.encode1(indexableA)).thenReturn(11);
-    when(elementCodec.encode2(indexableA)).thenReturn(12);
-    when(elementCodec.encode3(indexableA)).thenReturn(13);
-    when(elementCodec.encode1(indexableB)).thenReturn(21);
-    when(elementCodec.encode2(indexableB)).thenReturn(22);
-    when(elementCodec.encode3(indexableB)).thenReturn(23);
-    when(elementCodec.encode1(indexableC)).thenReturn(31);
-    when(elementCodec.encode2(indexableC)).thenReturn(32);
-    when(elementCodec.encode3(indexableC)).thenReturn(33);
-    when(elementCodec.encode1(indexableD)).thenReturn(41);
-    when(elementCodec.encode2(indexableD)).thenReturn(42);
-    when(elementCodec.encode3(indexableD)).thenReturn(43);
-    when(elementCodec.decode(contextA, 11, 12, 13)).thenReturn(indexableA);
-    when(elementCodec.decode(contextA, 21, 22, 23)).thenReturn(indexableB);
-    when(elementCodec.decode(contextA, 31, 32, 33)).thenReturn(indexableC);
-    when(elementCodec.decode(contextA, 41, 42, 43)).thenReturn(indexableD);
-    when(contextA.isDisposed).thenReturn(false);
-    when(contextB.isDisposed).thenReturn(false);
-    when(contextC.isDisposed).thenReturn(false);
-    when(sourceA.fullName).thenReturn('/home/user/sourceA.dart');
-    when(sourceB.fullName).thenReturn('/home/user/sourceB.dart');
-    when(sourceC.fullName).thenReturn('/home/user/sourceC.dart');
-    when(sourceD.fullName).thenReturn('/home/user/sourceD.dart');
-    when(elementA.context).thenReturn(contextA);
-    when(elementB.context).thenReturn(contextA);
-    when(elementC.context).thenReturn(contextA);
-    when(elementD.context).thenReturn(contextA);
-    when(elementA.enclosingElement).thenReturn(unitElementA);
-    when(elementB.enclosingElement).thenReturn(unitElementB);
-    when(elementC.enclosingElement).thenReturn(unitElementC);
-    when(elementD.enclosingElement).thenReturn(unitElementD);
-    when(elementA.source).thenReturn(sourceA);
-    when(elementB.source).thenReturn(sourceB);
-    when(elementC.source).thenReturn(sourceC);
-    when(elementD.source).thenReturn(sourceD);
-    when(elementA.library).thenReturn(libraryElement);
-    when(elementB.library).thenReturn(libraryElement);
-    when(elementC.library).thenReturn(libraryElement);
-    when(elementD.library).thenReturn(libraryElement);
-    when(unitElementA.source).thenReturn(sourceA);
-    when(unitElementB.source).thenReturn(sourceB);
-    when(unitElementC.source).thenReturn(sourceC);
-    when(unitElementD.source).thenReturn(sourceD);
-    when(unitElementA.library).thenReturn(libraryElement);
-    when(unitElementB.library).thenReturn(libraryElement);
-    when(unitElementC.library).thenReturn(libraryElement);
-    when(unitElementD.library).thenReturn(libraryElement);
-    // library
-    when(librarySource.fullName).thenReturn('/home/user/librarySource.dart');
-    when(libraryUnitElement.library).thenReturn(libraryElement);
-    when(libraryUnitElement.source).thenReturn(librarySource);
-    when(libraryElement.source).thenReturn(librarySource);
-    when(libraryElement.definingCompilationUnit).thenReturn(libraryUnitElement);
-    // library B
-    when(librarySourceB.fullName).thenReturn('/home/user/librarySource.dart');
-    when(libraryUnitElementB.library).thenReturn(libraryElementB);
-    when(libraryUnitElementB.source).thenReturn(librarySourceB);
-    when(libraryElementB.source).thenReturn(librarySourceB);
-    when(libraryElementB.definingCompilationUnit)
-        .thenReturn(libraryUnitElementB);
-  }
-
-  void test_aboutToIndexDart_disposedContext() {
-    when(contextA.isDisposed).thenReturn(true);
-    expect(store.aboutToIndex(contextA, unitElementA), isFalse);
-  }
-
-  Future test_aboutToIndexDart_library_first() {
-    when(libraryElement.parts)
-        .thenReturn(<CompilationUnitElement>[unitElementA, unitElementB]);
-    {
-      store.aboutToIndex(contextA, libraryUnitElement);
-      store.doneIndex();
-    }
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, []);
-    });
-  }
-
-  test_aboutToIndexDart_library_secondWithoutOneUnit() {
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableB);
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordRelationship(indexableA, relationship, locationA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementB);
-      store.recordRelationship(indexableA, relationship, locationB);
-      store.doneIndex();
-    }
-    // "A" and "B" locations
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, [locationA, locationB]);
-      // apply "libraryUnitElement", only with "B"
-      when(libraryElement.parts).thenReturn([unitElementB]);
-      {
-        store.aboutToIndex(contextA, libraryUnitElement);
-        store.doneIndex();
-      }
-    }).then((_) {
-      return store
-          .getRelationships(indexableA, relationship)
-          .then((List<LocationImpl> locations) {
-        assertLocations(locations, [locationB]);
-      });
-    });
-  }
-
-  void test_aboutToIndexDart_nullContext() {
-    expect(store.aboutToIndex(null, unitElementA), isFalse);
-  }
-
-  void test_aboutToIndexDart_nullLibraryElement() {
-    when(unitElementA.library).thenReturn(null);
-    expect(store.aboutToIndex(contextA, unitElementA), isFalse);
-  }
-
-  void test_aboutToIndexDart_nullLibraryUnitElement() {
-    when(libraryElement.definingCompilationUnit).thenReturn(null);
-    expect(store.aboutToIndex(contextA, unitElementA), isFalse);
-  }
-
-  void test_aboutToIndexDart_nullUnitElement() {
-    expect(store.aboutToIndex(contextA, null), isFalse);
-  }
-
-  test_cancelIndexDart() {
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableA);
-    store.aboutToIndex(contextA, unitElementA);
-    store.recordRelationship(indexableA, relationship, locationA);
-    store.recordRelationship(indexableA, relationship, locationB);
-    store.recordTopLevelDeclaration(elementA);
-    store.cancelIndex();
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, []);
-      expect(store.getTopLevelDeclarations((name) => true), isEmpty);
-    });
-  }
-
-  void test_clear() {
-    LocationImpl locationA = mockLocation(indexableA);
-    store.aboutToIndex(contextA, unitElementA);
-    store.recordRelationship(indexableA, relationship, locationA);
-    store.doneIndex();
-    expect(nodeManager.isEmpty(), isFalse);
-    // clear
-    store.clear();
-    expect(nodeManager.isEmpty(), isTrue);
-  }
-
-  test_getRelationships_empty() {
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      expect(locations, isEmpty);
-    });
-  }
-
-  void test_getStatistics() {
-    // empty initially
-    {
-      String statistics = store.statistics;
-      expect(statistics, contains('0 locations'));
-      expect(statistics, contains('0 sources'));
-    }
-    // add 2 locations
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableB);
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordRelationship(indexableA, relationship, locationA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementB);
-      store.recordRelationship(indexableA, relationship, locationB);
-      store.doneIndex();
-    }
-    {
-      String statistics = store.statistics;
-      expect(statistics, contains('2 locations'));
-      expect(statistics, contains('3 sources'));
-    }
-  }
-
-  void test_recordRelationship_multiplyDefinedElement() {
-    Element multiplyElement =
-        new MultiplyDefinedElementImpl(contextA, <Element>[elementA, elementB]);
-    LocationImpl location = mockLocation(indexableA);
-    store.recordRelationship(
-        new IndexableElement(multiplyElement), relationship, location);
-    store.doneIndex();
-    expect(nodeManager.isEmpty(), isTrue);
-  }
-
-  void test_recordRelationship_nullElement() {
-    LocationImpl locationA = mockLocation(indexableA);
-    store.recordRelationship(null, relationship, locationA);
-    store.doneIndex();
-    expect(nodeManager.isEmpty(), isTrue);
-  }
-
-  void test_recordRelationship_nullLocation() {
-    store.recordRelationship(indexableA, relationship, null);
-    store.doneIndex();
-    expect(nodeManager.isEmpty(), isTrue);
-  }
-
-  test_recordRelationship_oneElement_twoNodes() {
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableB);
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordRelationship(indexableA, relationship, locationA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementB);
-      store.recordRelationship(indexableA, relationship, locationB);
-      store.doneIndex();
-    }
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, [locationA, locationB]);
-    });
-  }
-
-  test_recordRelationship_oneLocation() {
-    LocationImpl locationA = mockLocation(indexableA);
-    store.aboutToIndex(contextA, unitElementA);
-    store.recordRelationship(indexableA, relationship, locationA);
-    store.doneIndex();
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, [locationA]);
-    });
-  }
-
-  test_recordRelationship_twoLocations() {
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableA);
-    store.aboutToIndex(contextA, unitElementA);
-    store.recordRelationship(indexableA, relationship, locationA);
-    store.recordRelationship(indexableA, relationship, locationB);
-    store.doneIndex();
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, [locationA, locationB]);
-    });
-  }
-
-  test_removeContext() {
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableB);
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordRelationship(indexableA, relationship, locationA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementB);
-      store.recordRelationship(indexableA, relationship, locationB);
-      store.doneIndex();
-    }
-    // "A" and "B" locations
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, [locationA, locationB]);
-      // remove "A" context
-      store.removeContext(contextA);
-    }).then((_) {
-      return store
-          .getRelationships(indexableA, relationship)
-          .then((List<LocationImpl> locations) {
-        assertLocations(locations, []);
-      });
-    });
-  }
-
-  void test_removeContext_nullContext() {
-    store.removeContext(null);
-  }
-
-  test_removeSource_library() async {
-    when(elementB.library).thenReturn(libraryElementB);
-    when(unitElementB.library).thenReturn(libraryElementB);
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableB);
-    LocationImpl locationC = mockLocation(indexableC);
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordRelationship(indexableD, relationship, locationA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementB);
-      store.recordRelationship(indexableD, relationship, locationB);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementC);
-      store.recordRelationship(indexableD, relationship, locationC);
-      store.doneIndex();
-    }
-    // "A", "B" and "C" locations
-    {
-      var locations = await store.getRelationships(indexableD, relationship);
-      assertLocations(locations, [locationA, locationB, locationC]);
-    }
-    // remove "librarySource"
-    store.removeSource(contextA, librarySource);
-    // only "B" location, which is in "librarySourceB"
-    {
-      var locations = await store.getRelationships(indexableD, relationship);
-      assertLocations(locations, [locationB]);
-    }
-  }
-
-  void test_removeSource_nullContext() {
-    store.removeSource(null, sourceA);
-  }
-
-  test_removeSource_unit() {
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableB);
-    LocationImpl locationC = mockLocation(indexableC);
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordRelationship(indexableA, relationship, locationA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementB);
-      store.recordRelationship(indexableA, relationship, locationB);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementC);
-      store.recordRelationship(indexableA, relationship, locationC);
-      store.doneIndex();
-    }
-    // "A", "B" and "C" locations
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, [locationA, locationB, locationC]);
-    }).then((_) {
-      // remove "A" source
-      store.removeSource(contextA, sourceA);
-      return store
-          .getRelationships(indexableA, relationship)
-          .then((List<LocationImpl> locations) {
-        assertLocations(locations, [locationB, locationC]);
-      });
-    });
-  }
-
-  test_removeSources_library() {
-    LocationImpl locationA = mockLocation(indexableA);
-    LocationImpl locationB = mockLocation(indexableB);
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordRelationship(indexableA, relationship, locationA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementB);
-      store.recordRelationship(indexableA, relationship, locationB);
-      store.doneIndex();
-    }
-    // "A" and "B" locations
-    return store
-        .getRelationships(indexableA, relationship)
-        .then((List<LocationImpl> locations) {
-      assertLocations(locations, [locationA, locationB]);
-    }).then((_) {
-      // remove "librarySource"
-      store.removeSources(contextA, new SingleSourceContainer(librarySource));
-      return store
-          .getRelationships(indexableA, relationship)
-          .then((List<LocationImpl> locations) {
-        assertLocations(locations, []);
-      });
-    });
-  }
-
-  void test_removeSources_nullContext() {
-    store.removeSources(null, null);
-  }
-
-  void test_removeSources_unit() {
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordTopLevelDeclaration(elementA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementB);
-      store.recordTopLevelDeclaration(elementB);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextA, unitElementC);
-      store.recordTopLevelDeclaration(elementC);
-      store.doneIndex();
-    }
-    // A, B, C elements
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementA, elementB, elementC]));
-    }
-    // remove "A" source
-    store.removeSources(contextA, new SingleSourceContainer(sourceA));
-    store.removeSource(contextA, sourceA);
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementB, elementC]));
-    }
-  }
-
-  void test_universe_aboutToIndex() {
-    when(elementCodec.decode(contextA, 11, 12, 13))
-        .thenReturn(new IndexableElement(elementA));
-    when(elementCodec.decode(contextB, 21, 22, 23))
-        .thenReturn(new IndexableElement(elementB));
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordTopLevelDeclaration(elementA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextB, unitElementB);
-      store.recordTopLevelDeclaration(elementB);
-      store.doneIndex();
-    }
-    // elementA, elementB
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementA, elementB]));
-    }
-    // re-index "unitElementA"
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.doneIndex();
-    }
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementB]));
-    }
-  }
-
-  void test_universe_clear() {
-    when(elementCodec.decode(contextA, 11, 12, 13))
-        .thenReturn(new IndexableElement(elementA));
-    when(elementCodec.decode(contextB, 21, 22, 23))
-        .thenReturn(new IndexableElement(elementB));
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordTopLevelDeclaration(elementA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextB, unitElementB);
-      store.recordTopLevelDeclaration(elementB);
-      store.doneIndex();
-    }
-    // elementA, elementB
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementA, elementB]));
-    }
-    // clear
-    store.clear();
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, isEmpty);
-    }
-  }
-
-  void test_universe_removeContext() {
-    when(elementCodec.decode(contextA, 11, 12, 13))
-        .thenReturn(new IndexableElement(elementA));
-    when(elementCodec.decode(contextB, 21, 22, 23))
-        .thenReturn(new IndexableElement(elementB));
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordTopLevelDeclaration(elementA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextB, unitElementB);
-      store.recordTopLevelDeclaration(elementB);
-      store.doneIndex();
-    }
-    // elementA, elementB
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementA, elementB]));
-    }
-    // remove "contextA"
-    store.removeContext(contextA);
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementB]));
-    }
-  }
-
-  void test_universe_removeSource() {
-    when(elementCodec.decode(contextA, 11, 12, 13))
-        .thenReturn(new IndexableElement(elementA));
-    when(elementCodec.decode(contextB, 21, 22, 23))
-        .thenReturn(new IndexableElement(elementB));
-    {
-      store.aboutToIndex(contextA, unitElementA);
-      store.recordTopLevelDeclaration(elementA);
-      store.doneIndex();
-    }
-    {
-      store.aboutToIndex(contextB, unitElementB);
-      store.recordTopLevelDeclaration(elementB);
-      store.doneIndex();
-    }
-    // elementA, elementB
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementA, elementB]));
-    }
-    // remove "sourceA"
-    store.removeSource(contextA, sourceA);
-    {
-      List<Element> elements = store.getTopLevelDeclarations(anyName);
-      expect(elements, unorderedEquals([elementB]));
-    }
-  }
-
-  static bool anyName(String name) => true;
-
-  /**
-   * Asserts that the [actual] locations have all the [expected] locations and
-   * only them.
-   */
-  static void assertLocations(
-      List<LocationImpl> actual, List<LocationImpl> expected) {
-    List<_LocationEqualsWrapper> actualWrappers = wrapLocations(actual);
-    List<_LocationEqualsWrapper> expectedWrappers = wrapLocations(expected);
-    expect(actualWrappers, unorderedEquals(expectedWrappers));
-  }
-
-  /**
-   * @return the new [LocationImpl] mock.
-   */
-  static LocationImpl mockLocation(IndexableElement indexable) {
-    LocationImpl location = new MockLocation();
-    when(location.indexable).thenReturn(indexable);
-    when(location.offset).thenReturn(0);
-    when(location.length).thenReturn(0);
-    when(location.isQualified).thenReturn(true);
-    when(location.isResolved).thenReturn(true);
-    return location;
-  }
-
-  /**
-   * Wraps the given locations into [LocationEqualsWrapper].
-   */
-  static List<_LocationEqualsWrapper> wrapLocations(
-      List<LocationImpl> locations) {
-    List<_LocationEqualsWrapper> wrappers = <_LocationEqualsWrapper>[];
-    for (LocationImpl location in locations) {
-      wrappers.add(new _LocationEqualsWrapper(location));
-    }
-    return wrappers;
-  }
-}
diff --git a/pkg/analysis_server/test/services/index/store/temporary_folder_file_manager_test.dart b/pkg/analysis_server/test/services/index/store/temporary_folder_file_manager_test.dart
deleted file mode 100644
index a6974aa..0000000
--- a/pkg/analysis_server/test/services/index/store/temporary_folder_file_manager_test.dart
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.store.temporary_folder_file_mananer;
-
-import 'dart:io';
-
-import 'package:analysis_server/src/services/index/store/temporary_folder_file_manager.dart';
-import 'package:path/path.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../../utils.dart';
-
-main() {
-  initializeTestEnvironment();
-  defineReflectiveTests(_SeparateFileManagerTest);
-}
-
-@reflectiveTest
-class _SeparateFileManagerTest {
-  TemporaryFolderFileManager fileManager;
-
-  void setUp() {
-    fileManager = new TemporaryFolderFileManager();
-  }
-
-  void tearDown() {
-    fileManager.clear();
-  }
-
-  test_clear() {
-    String name = "42.index";
-    // create the file
-    return fileManager.write(name, <int>[1, 2, 3, 4]).then((_) {
-      // check that the file exists
-      expect(_existsSync(name), isTrue);
-      // clear
-      fileManager.clear();
-      expect(_existsSync(name), isFalse);
-    });
-  }
-
-  test_delete_doesNotExist() {
-    return fileManager.write('other.index', <int>[1, 2, 3, 4]).then((_) {
-      String name = "42.index";
-      fileManager.delete(name);
-    });
-  }
-
-  test_delete_noDirectory() {
-    String name = "42.index";
-    fileManager.delete(name);
-  }
-
-  test_outputInput() {
-    String name = "42.index";
-    // create the file
-    return fileManager.write(name, <int>[1, 2, 3, 4]).then((_) {
-      // check that that the file exists
-      expect(_existsSync(name), isTrue);
-      // read the file
-      return fileManager.read(name).then((bytes) {
-        expect(bytes, <int>[1, 2, 3, 4]);
-        // delete
-        fileManager.delete(name);
-        // the file does not exist anymore
-        return fileManager.read(name).then((bytes) {
-          expect(bytes, isNull);
-        });
-      });
-    });
-  }
-
-  test_read_noDirectory() {
-    String name = "42.index";
-    return fileManager.read(name).then((bytes) {
-      expect(bytes, isNull);
-    });
-  }
-
-  bool _existsSync(String name) {
-    Directory directory = fileManager.test_directory;
-    if (directory == null) {
-      return false;
-    }
-    return new File(join(directory.path, name)).existsSync();
-  }
-}
diff --git a/pkg/analysis_server/test/services/index/store/test_all.dart b/pkg/analysis_server/test/services/index/store/test_all.dart
deleted file mode 100644
index ab63c97..0000000
--- a/pkg/analysis_server/test/services/index/store/test_all.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.store;
-
-import 'package:unittest/unittest.dart';
-
-import '../../../utils.dart';
-import 'codec_test.dart' as codec_test;
-import 'collection_test.dart' as collection_test;
-import 'split_store_test.dart' as split_store_test;
-import 'temporary_folder_file_manager_test.dart' as tmp_file_manager_test;
-
-/**
- * Utility for manually running all tests.
- */
-main() {
-  initializeTestEnvironment();
-  group('store', () {
-    codec_test.main();
-    collection_test.main();
-    tmp_file_manager_test.main();
-    split_store_test.main();
-  });
-}
diff --git a/pkg/analysis_server/test/services/index/test_all.dart b/pkg/analysis_server/test/services/index/test_all.dart
index 8f64484..27a2cd2 100644
--- a/pkg/analysis_server/test/services/index/test_all.dart
+++ b/pkg/analysis_server/test/services/index/test_all.dart
@@ -1,17 +1,11 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library test.services.src.index.all;
-
 import 'package:unittest/unittest.dart';
 
 import '../../utils.dart';
-import 'dart_index_contributor_test.dart' as dart_index_contributor_test;
-import 'indexable_file_test.dart' as indexable_file_test;
-import 'local_file_index_test.dart' as local_file_index_test;
-import 'local_index_test.dart' as local_index_test;
-import 'store/test_all.dart' as store_test_all;
+import 'index_test.dart' as index_test;
 
 /**
  * Utility for manually running all tests.
@@ -19,10 +13,6 @@
 main() {
   initializeTestEnvironment();
   group('index', () {
-    dart_index_contributor_test.main();
-    indexable_file_test.main();
-    local_file_index_test.main();
-    local_index_test.main();
-    store_test_all.main();
+    index_test.main();
   });
 }
diff --git a/pkg/analysis_server/test/services/linter/linter_test.dart b/pkg/analysis_server/test/services/linter/linter_test.dart
index a1f57eb..1017bd6 100644
--- a/pkg/analysis_server/test/services/linter/linter_test.dart
+++ b/pkg/analysis_server/test/services/linter/linter_test.dart
@@ -21,7 +21,7 @@
 
 @reflectiveTest
 class LinterRuleOptionsValidatorTest {
-  final LinterRuleOptionsValidator validator= new LinterRuleOptionsValidator();
+  final LinterRuleOptionsValidator validator = new LinterRuleOptionsValidator();
   final AnalysisOptionsProvider optionsProvider = new AnalysisOptionsProvider();
 
   RecordingErrorListener recorder;
@@ -53,6 +53,17 @@
         []);
   }
 
+  test_linter_null_rule() {
+    validate(
+        '''
+linter:
+  rules:
+    -
+
+    ''',
+        []);
+  }
+
   test_linter_undefined_rule() {
     validate(
         '''
@@ -63,7 +74,7 @@
         [UNDEFINED_LINT_WARNING]);
   }
 
-  validate(String source, List<AnalysisOptionsErrorCode> expected) {
+  validate(String source, List<ErrorCode> expected) {
     var options = optionsProvider.getOptionsFromString(source);
     validator.validate(reporter, options);
     expect(errors.map((AnalysisError e) => e.errorCode),
diff --git a/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart b/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
index 576f364..a565c87 100644
--- a/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
+++ b/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
@@ -9,11 +9,10 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analysis_server/src/services/search/search_engine_internal.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:unittest/unittest.dart';
 
@@ -148,18 +147,18 @@
 
   void indexTestUnit(String code) {
     resolveTestUnit(code);
-    index.index(context, testUnit);
+    index.indexUnit(testUnit);
   }
 
   void indexUnit(String file, String code) {
     Source source = addSource(file, code);
     CompilationUnit unit = resolveLibraryUnit(source);
-    index.index(context, unit);
+    index.indexUnit(unit);
   }
 
   void setUp() {
     super.setUp();
-    index = createLocalMemoryIndex();
+    index = createMemoryIndex();
     searchEngine = new SearchEngineImpl(index);
   }
 }
diff --git a/pkg/analysis_server/test/services/refactoring/abstract_rename.dart b/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
index f7b036f..e6238e3 100644
--- a/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
+++ b/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
@@ -7,8 +7,8 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/services/correction/namespace.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:unittest/unittest.dart';
 
 import 'abstract_refactoring.dart';
diff --git a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
index 9b58386..37f46cd 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
@@ -317,7 +317,8 @@
 $a
 bbb''';
 }
-""".replaceAll('\n', '\r\n'));
+"""
+        .replaceAll('\n', '\r\n'));
     _createRefactoring('a =');
     // validate change
     return assertSuccessfulRefactoring(r"""
@@ -328,7 +329,8 @@
 a
 bbb''';
 }
-""".replaceAll('\n', '\r\n'));
+"""
+        .replaceAll('\n', '\r\n'));
   }
 
   test_OK_intoStringInterpolation_string_multiLineIntoSingle() {
diff --git a/pkg/analysis_server/test/services/refactoring/move_file_test.dart b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
index 2de53d8..9146b93 100644
--- a/pkg/analysis_server/test/services/refactoring/move_file_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
@@ -108,10 +108,10 @@
 
   test_file_importedLibrary_package() async {
     // configure packages
-    testFile = '/packages/my_pkg/aaa/test.dart';
+    testFile = '/packages/my_pkg/lib/aaa/test.dart';
     provider.newFile(testFile, '');
     Map<String, List<Folder>> packageMap = {
-      'my_pkg': [provider.getResource('/packages/my_pkg')]
+      'my_pkg': [provider.getResource('/packages/my_pkg/lib')]
     };
     context.sourceFactory = new SourceFactory([
       AbstractContextTest.SDK_RESOLVER,
@@ -125,10 +125,10 @@
         '''
 import 'package:my_pkg/aaa/test.dart';
 ''');
-    addTestSource('');
+    addTestSource('', Uri.parse('package:my_pkg/aaa/test.dart'));
     _performAnalysis();
     // perform refactoring
-    _createRefactoring('/packages/my_pkg/bbb/ccc/new_name.dart');
+    _createRefactoring('/packages/my_pkg/lib/bbb/ccc/new_name.dart');
     await _assertSuccessfulRefactoring();
     assertFileChangeResult(
         pathA,
@@ -291,7 +291,7 @@
       }
       for (ChangeNotice notice in result.changeNotices) {
         if (notice.source.fullName.startsWith('/project/')) {
-          index.index(context, notice.resolvedDartUnit);
+          index.indexUnit(notice.resolvedDartUnit);
         }
       }
     }
diff --git a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
index 43a0a35..46ed173 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
@@ -135,7 +135,27 @@
         expectedMessage: "Renamed method will be invisible in 'my.lib'.");
   }
 
-  test_checkFinalConditions_shadowed_byLocal_inSameClass() async {
+  test_checkFinalConditions_shadowed_byLocalFunction_inSameClass() async {
+    indexTestUnit('''
+class A {
+  test() {}
+  main() {
+    newName() {}
+    test(); // marker
+  }
+}
+''');
+    createRenameRefactoringAtString('test() {}');
+    // check status
+    refactoring.newName = 'newName';
+    RefactoringStatus status = await refactoring.checkFinalConditions();
+    assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
+        expectedMessage:
+            "Usage of renamed method will be shadowed by function 'newName'.",
+        expectedContextSearch: 'test(); // marker');
+  }
+
+  test_checkFinalConditions_shadowed_byLocalVariable_inSameClass() async {
     indexTestUnit('''
 class A {
   test() {}
@@ -155,7 +175,7 @@
         expectedContextSearch: 'test(); // marker');
   }
 
-  test_checkFinalConditions_shadowed_byLocal_inSubClass() async {
+  test_checkFinalConditions_shadowed_byLocalVariable_inSubClass() async {
     indexTestUnit('''
 class A {
   test() {}
@@ -177,7 +197,7 @@
         expectedContextSearch: 'test(); // marker');
   }
 
-  test_checkFinalConditions_shadowed_byLocal_OK_qualifiedReference() async {
+  test_checkFinalConditions_shadowed_byLocalVariable_OK_qualifiedReference() async {
     indexTestUnit('''
 class A {
   test() {}
@@ -194,7 +214,7 @@
     assertRefactoringStatusOK(status);
   }
 
-  test_checkFinalConditions_shadowed_byLocal_OK_renamedNotUsed() async {
+  test_checkFinalConditions_shadowed_byLocalVariable_OK_renamedNotUsed() async {
     indexTestUnit('''
 class A {
   test() {}
diff --git a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
index 74d2ca8..bb4318b 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
@@ -7,8 +7,8 @@
 import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
index 538baaf..8d061ed 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
@@ -5,7 +5,7 @@
 library test.services.refactoring.rename_import;
 
 import 'package:analysis_server/plugin/protocol/protocol.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
index 9a8f259..597df6e 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
@@ -52,8 +52,7 @@
 library my.app;
 part 'part.dart';
 ''');
-    index.index(
-        context, context.resolveCompilationUnit2(unitSource, testSource));
+    index.indexUnit(context.resolveCompilationUnit2(unitSource, testSource));
     // configure refactoring
     _createRenameRefactoring();
     expect(refactoring.refactoringName, 'Rename Library');
@@ -81,8 +80,7 @@
 library my    . app;
 part 'part.dart';
 ''');
-    index.index(
-        context, context.resolveCompilationUnit2(unitSource, testSource));
+    index.indexUnit(context.resolveCompilationUnit2(unitSource, testSource));
     // configure refactoring
     _createRenameRefactoring();
     expect(refactoring.refactoringName, 'Rename Library');
diff --git a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
index a92bd0d..e454ece 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
@@ -101,6 +101,32 @@
     return assertRefactoringConditionsOK();
   }
 
+  test_checkFinalConditions_hasLocalVariable_otherForEachLoop() {
+    indexTestUnit('''
+main() {
+  for (int newName in []) {}
+  for (int test in []) {}
+}
+''');
+    createRenameRefactoringAtString('test in');
+    // check status
+    refactoring.newName = 'newName';
+    return assertRefactoringConditionsOK();
+  }
+
+  test_checkFinalConditions_hasLocalVariable_otherForLoop() {
+    indexTestUnit('''
+main() {
+  for (int newName = 0; newName < 10; newName++) {}
+  for (int test = 0; test < 10; test++) {}
+}
+''');
+    createRenameRefactoringAtString('test = 0');
+    // check status
+    refactoring.newName = 'newName';
+    return assertRefactoringConditionsOK();
+  }
+
   test_checkFinalConditions_hasLocalVariable_otherFunction() {
     indexTestUnit('''
 main() {
diff --git a/pkg/analysis_server/test/services/search/hierarchy_test.dart b/pkg/analysis_server/test/services/search/hierarchy_test.dart
index 4d96523..027c237 100644
--- a/pkg/analysis_server/test/services/search/hierarchy_test.dart
+++ b/pkg/analysis_server/test/services/search/hierarchy_test.dart
@@ -7,7 +7,6 @@
 import 'dart:async';
 
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine_internal.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -29,7 +28,7 @@
 
   void setUp() {
     super.setUp();
-    index = createLocalMemoryIndex();
+    index = createMemoryIndex();
     searchEngine = new SearchEngineImpl(index);
   }
 
@@ -316,6 +315,6 @@
 
   void _indexTestUnit(String code) {
     resolveTestUnit(code);
-    index.index(context, testUnit);
+    index.indexUnit(testUnit);
   }
 }
diff --git a/pkg/analysis_server/test/services/search/search_engine_test.dart b/pkg/analysis_server/test/services/search/search_engine_test.dart
index 0e38446..ffdfd4c 100644
--- a/pkg/analysis_server/test/services/search/search_engine_test.dart
+++ b/pkg/analysis_server/test/services/search/search_engine_test.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.
 
-library test.services.src.search.search_engine;
+library test.services.src.search.search_engine_internal;
 
 import 'dart:async';
 
 import 'package:analysis_server/src/services/index/index.dart';
-import 'package:analysis_server/src/services/index/local_memory_index.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analysis_server/src/services/search/search_engine_internal.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -15,7 +14,6 @@
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:typed_mock/typed_mock.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
@@ -64,8 +62,6 @@
   }
 }
 
-class MockIndex extends TypedMock implements Index {}
-
 @reflectiveTest
 class SearchEngineImplTest extends AbstractSingleUnitTest {
   Index index;
@@ -73,11 +69,11 @@
 
   void setUp() {
     super.setUp();
-    index = createLocalMemoryIndex();
+    index = createMemoryIndex();
     searchEngine = new SearchEngineImpl(index);
   }
 
-  Future test_searchAllSubtypes() {
+  test_searchAllSubtypes() async {
     _indexTestUnit('''
 class T {}
 class A extends T {}
@@ -93,37 +89,11 @@
       _expectId(elementB, MatchKind.DECLARATION, 'B extends A'),
       _expectId(elementC, MatchKind.DECLARATION, 'C implements B')
     ];
-    return searchEngine.searchAllSubtypes(element).then((matches) {
-      _assertMatches(matches, expected);
-    });
+    List<SearchMatch> matches = await searchEngine.searchAllSubtypes(element);
+    _assertMatches(matches, expected);
   }
 
-  Future test_searchElementDeclarations() {
-    _indexTestUnit('''
-class A {
-  test() {}
-}
-class B {
-  int test = 1;
-  main() {
-    int test = 2;
-  }
-}
-''');
-    ClassElement elementA = findElement('A');
-    ClassElement elementB = findElement('B');
-    Element element_test = findElement('test', ElementKind.LOCAL_VARIABLE);
-    var expected = [
-      _expectId(elementA.methods[0], MatchKind.DECLARATION, 'test() {}'),
-      _expectId(elementB.fields[0], MatchKind.DECLARATION, 'test = 1;'),
-      _expectId(element_test, MatchKind.DECLARATION, 'test = 2;'),
-    ];
-    return searchEngine.searchElementDeclarations('test').then((matches) {
-      _assertMatches(matches, expected);
-    });
-  }
-
-  Future test_searchMemberDeclarations() {
+  test_searchMemberDeclarations() async {
     _indexTestUnit('''
 class A {
   test() {}
@@ -141,55 +111,91 @@
       _expectId(elementA.methods[0], MatchKind.DECLARATION, 'test() {}'),
       _expectId(elementB.fields[0], MatchKind.DECLARATION, 'test = 1;')
     ];
-    return searchEngine.searchMemberDeclarations('test').then((matches) {
-      _assertMatches(matches, expected);
-    });
+    List<SearchMatch> matches =
+        await searchEngine.searchMemberDeclarations('test');
+    _assertMatches(matches, expected);
   }
 
-  Future test_searchMemberReferences() {
+  test_searchMemberReferences_qualified_resolved() async {
     _indexTestUnit('''
-class A {
-  var test; // A
-  mainA() {
-    test(); // a-inv-r-nq
-    test = 1; // a-write-r-nq
-    test += 2; // a-read-write-r-nq
-    print(test); // a-read-r-nq
-  }
+class C {
+  var test;
 }
-main(A a, p) {
-  a.test(); // a-inv-r-q
-  a.test = 1; // a-write-r-q
-  a.test += 2; // a-read-write-r-q
-  print(a.test); // a-read-r-q
-  p.test(); // p-inv-ur-q
-  p.test = 1; // p-write-ur-q
-  p.test += 2; // p-read-write-ur-q
-  print(p.test); // p-read-ur-q
+main(C c) {
+  print(c.test);
+  c.test = 1;
+  c.test += 2;
+  c.test();
 }
 ''');
-    Element mainA = findElement('mainA');
-    Element main = findElement('main');
-    var expected = [
-      _expectId(mainA, MatchKind.INVOCATION, 'test(); // a-inv-r-nq'),
-      _expectId(mainA, MatchKind.WRITE, 'test = 1; // a-write-r-nq'),
-      _expectId(mainA, MatchKind.READ_WRITE, 'test += 2; // a-read-write-r-nq'),
-      _expectId(mainA, MatchKind.READ, 'test); // a-read-r-nq'),
-      _expectIdQ(main, MatchKind.INVOCATION, 'test(); // a-inv-r-q'),
-      _expectIdQ(main, MatchKind.WRITE, 'test = 1; // a-write-r-q'),
-      _expectIdQ(main, MatchKind.READ_WRITE, 'test += 2; // a-read-write-r-q'),
-      _expectIdQ(main, MatchKind.READ, 'test); // a-read-r-q'),
-      _expectIdU(main, MatchKind.INVOCATION, 'test(); // p-inv-ur-q'),
-      _expectIdU(main, MatchKind.WRITE, 'test = 1; // p-write-ur-q'),
-      _expectIdU(main, MatchKind.READ_WRITE, 'test += 2; // p-read-write-ur-q'),
-      _expectIdU(main, MatchKind.READ, 'test); // p-read-ur-q'),
-    ];
-    return searchEngine.searchMemberReferences('test').then((matches) {
-      _assertMatches(matches, expected);
-    });
+    List<SearchMatch> matches =
+        await searchEngine.searchMemberReferences('test');
+    expect(matches, isEmpty);
   }
 
-  Future test_searchReferences_ClassElement() {
+  test_searchMemberReferences_qualified_unresolved() async {
+    _indexTestUnit('''
+main(p) {
+  print(p.test);
+  p.test = 1;
+  p.test += 2;
+  p.test();
+}
+''');
+    Element main = findElement('main');
+    var expected = [
+      _expectIdQU(main, MatchKind.READ, 'test);'),
+      _expectIdQU(main, MatchKind.WRITE, 'test = 1;'),
+      _expectIdQU(main, MatchKind.READ_WRITE, 'test += 2;'),
+      _expectIdQU(main, MatchKind.INVOCATION, 'test();'),
+    ];
+    List<SearchMatch> matches =
+        await searchEngine.searchMemberReferences('test');
+    _assertMatches(matches, expected);
+  }
+
+  test_searchMemberReferences_unqualified_resolved() async {
+    _indexTestUnit('''
+class C {
+  var test;
+  main() {
+    print(test);
+    test = 1;
+    test += 2;
+    test();
+  }
+}
+''');
+    List<SearchMatch> matches =
+        await searchEngine.searchMemberReferences('test');
+    expect(matches, isEmpty);
+  }
+
+  test_searchMemberReferences_unqualified_unresolved() async {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+class C {
+  main() {
+    print(test);
+    test = 1;
+    test += 2;
+    test();
+  }
+}
+''');
+    Element main = findElement('main');
+    var expected = [
+      _expectIdU(main, MatchKind.READ, 'test);'),
+      _expectIdU(main, MatchKind.WRITE, 'test = 1;'),
+      _expectIdU(main, MatchKind.READ_WRITE, 'test += 2;'),
+      _expectIdU(main, MatchKind.INVOCATION, 'test();'),
+    ];
+    List<SearchMatch> matches =
+        await searchEngine.searchMemberReferences('test');
+    _assertMatches(matches, expected);
+  }
+
+  test_searchReferences_ClassElement() async {
     _indexTestUnit('''
 class A {}
 main(A p) {
@@ -203,10 +209,10 @@
       _expectId(pElement, MatchKind.REFERENCE, 'A p'),
       _expectId(vElement, MatchKind.REFERENCE, 'A v')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_CompilationUnitElement() {
+  test_searchReferences_CompilationUnitElement() async {
     addSource(
         '/my_part.dart',
         '''
@@ -218,13 +224,13 @@
 ''');
     CompilationUnitElement element = testLibraryElement.parts[0];
     var expected = [
-      _expectId(testUnitElement, MatchKind.REFERENCE, "'my_part.dart'",
+      _expectIdQ(testUnitElement, MatchKind.REFERENCE, "'my_part.dart'",
           length: "'my_part.dart'".length)
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_ConstructorElement() {
+  test_searchReferences_ConstructorElement() async {
     _indexTestUnit('''
 class A {
   A.named() {}
@@ -236,16 +242,33 @@
     ConstructorElement element = findElement('named');
     Element mainElement = findElement('main');
     var expected = [
-      _expectId(mainElement, MatchKind.REFERENCE, '.named();', length: 6)
+      _expectIdQ(mainElement, MatchKind.REFERENCE, '.named();', length: 6)
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_Element_unknown() {
-    return _verifyReferences(DynamicElementImpl.instance, []);
+  test_searchReferences_ConstructorElement_synthetic() async {
+    _indexTestUnit('''
+class A {
+}
+main() {
+  new A();
+}
+''');
+    ClassElement classElement = findElement('A');
+    ConstructorElement element = classElement.unnamedConstructor;
+    Element mainElement = findElement('main');
+    var expected = [
+      _expectIdQ(mainElement, MatchKind.REFERENCE, '();', length: 0)
+    ];
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_FieldElement() {
+  test_searchReferences_Element_unknown() async {
+    await _verifyReferences(DynamicElementImpl.instance, []);
+  }
+
+  test_searchReferences_FieldElement() async {
     _indexTestUnit('''
 class A {
   var field;
@@ -267,8 +290,8 @@
     Element main = findElement('main');
     Element fieldParameter = findElement('field', ElementKind.PARAMETER);
     var expected = [
-      _expectId(fieldParameter, MatchKind.WRITE, 'field}'),
-      _expectId(main, MatchKind.REFERENCE, 'field: 1'),
+      _expectIdQ(fieldParameter, MatchKind.WRITE, 'field}'),
+      _expectIdQ(main, MatchKind.REFERENCE, 'field: 1'),
       _expectId(main, MatchKind.READ, 'field); // ref-nq'),
       _expectIdQ(main, MatchKind.READ, 'field); // ref-q'),
       _expectId(main, MatchKind.INVOCATION, 'field(); // inv-nq'),
@@ -276,10 +299,66 @@
       _expectId(main, MatchKind.WRITE, 'field = 2; // ref-nq'),
       _expectIdQ(main, MatchKind.WRITE, 'field = 3; // ref-q'),
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_FunctionElement() {
+  test_searchReferences_FieldElement_ofEnum() async {
+    _indexTestUnit('''
+enum MyEnum {
+  A, B, C
+}
+main() {
+  print(MyEnum.A.index);
+  print(MyEnum.values);
+  print(MyEnum.A);
+  print(MyEnum.B);
+}
+''');
+    ClassElement enumElement = findElement('MyEnum');
+    Element mainElement = findElement('main');
+    await _verifyReferences(enumElement.getField('index'),
+        [_expectIdQ(mainElement, MatchKind.READ, 'index);')]);
+    await _verifyReferences(enumElement.getField('values'),
+        [_expectIdQ(mainElement, MatchKind.READ, 'values);')]);
+    await _verifyReferences(enumElement.getField('A'), [
+      _expectIdQ(mainElement, MatchKind.READ, 'A.index);'),
+      _expectIdQ(mainElement, MatchKind.READ, 'A);')
+    ]);
+    await _verifyReferences(enumElement.getField('B'),
+        [_expectIdQ(mainElement, MatchKind.READ, 'B);')]);
+  }
+
+  test_searchReferences_FieldElement_synthetic() async {
+    _indexTestUnit('''
+class A {
+  get field => null;
+  set field(x) {}
+  main() {
+    // getter
+    print(field); // ref-nq
+    print(this.field); // ref-q
+    field(); // inv-nq
+    this.field(); // inv-q
+    // setter
+    field = 2; // ref-nq;
+    this.field = 3; // ref-q;
+  }
+}
+''');
+    FieldElement element = findElement('field', ElementKind.FIELD);
+    Element main = findElement('main');
+    var expected = [
+      _expectId(main, MatchKind.READ, 'field); // ref-nq'),
+      _expectIdQ(main, MatchKind.READ, 'field); // ref-q'),
+      _expectId(main, MatchKind.INVOCATION, 'field(); // inv-nq'),
+      _expectIdQ(main, MatchKind.INVOCATION, 'field(); // inv-q'),
+      _expectId(main, MatchKind.WRITE, 'field = 2; // ref-nq'),
+      _expectIdQ(main, MatchKind.WRITE, 'field = 3; // ref-q'),
+    ];
+    await _verifyReferences(element, expected);
+  }
+
+  test_searchReferences_FunctionElement() async {
     _indexTestUnit('''
 test() {}
 main() {
@@ -293,10 +372,27 @@
       _expectId(mainElement, MatchKind.INVOCATION, 'test();'),
       _expectId(mainElement, MatchKind.REFERENCE, 'test);')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_FunctionTypeAliasElement() {
+  test_searchReferences_FunctionElement_local() async {
+    _indexTestUnit('''
+main() {
+  test() {}
+  test();
+  print(test);
+}
+''');
+    FunctionElement element = findElement('test');
+    Element mainElement = findElement('main');
+    var expected = [
+      _expectId(mainElement, MatchKind.INVOCATION, 'test();'),
+      _expectId(mainElement, MatchKind.REFERENCE, 'test);')
+    ];
+    await _verifyReferences(element, expected);
+  }
+
+  test_searchReferences_FunctionTypeAliasElement() async {
     _indexTestUnit('''
 typedef Test();
 main() {
@@ -311,40 +407,59 @@
       _expectId(aElement, MatchKind.REFERENCE, 'Test a;'),
       _expectId(bElement, MatchKind.REFERENCE, 'Test b;')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_ImportElement_noPrefix() {
+  test_searchReferences_ImportElement_noPrefix() async {
     _indexTestUnit('''
-import 'dart:math';
+import 'dart:math' show max, PI, Random hide min;
+export 'dart:math' show max, PI, Random hide min;
 main() {
-  print(E);
+  print(PI);
+  print(new Random());
+  print(max(1, 2));
 }
+Random bar() => null;
 ''');
     ImportElement element = testLibraryElement.imports[0];
     Element mainElement = findElement('main');
-    var kind = MatchKind.REFERENCE;
-    var expected = [_expectId(mainElement, kind, 'E);', length: 0)];
-    return _verifyReferences(element, expected);
-  }
-
-  Future test_searchReferences_ImportElement_withPrefix() {
-    _indexTestUnit('''
-import 'dart:math' as math;
-main() {
-  print(math.PI);
-}
-''');
-    ImportElement element = testLibraryElement.imports[0];
-    Element mainElement = findElement('main');
+    Element barElement = findElement('bar');
     var kind = MatchKind.REFERENCE;
     var expected = [
-      _expectId(mainElement, kind, 'math.PI);', length: 'math.'.length)
+      _expectId(mainElement, kind, 'PI);', length: 0),
+      _expectId(mainElement, kind, 'Random()', length: 0),
+      _expectId(mainElement, kind, 'max(', length: 0),
+      _expectId(barElement, kind, 'Random bar()', length: 0),
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_LabelElement() {
+  test_searchReferences_ImportElement_withPrefix() async {
+    _indexTestUnit('''
+import 'dart:math' as math show max, PI, Random hide min;
+export 'dart:math' show max, PI, Random hide min;
+main() {
+  print(math.PI);
+  print(new math.Random());
+  print(math.max(1, 2));
+}
+math.Random bar() => null;
+''');
+    ImportElement element = testLibraryElement.imports[0];
+    Element mainElement = findElement('main');
+    Element barElement = findElement('bar');
+    var kind = MatchKind.REFERENCE;
+    var length = 'math.'.length;
+    var expected = [
+      _expectId(mainElement, kind, 'math.PI);', length: length),
+      _expectId(mainElement, kind, 'math.Random()', length: length),
+      _expectId(mainElement, kind, 'math.max(', length: length),
+      _expectId(barElement, kind, 'math.Random bar()', length: length),
+    ];
+    await _verifyReferences(element, expected);
+  }
+
+  test_searchReferences_LabelElement() async {
     _indexTestUnit('''
 main() {
 label:
@@ -362,10 +477,10 @@
       _expectId(mainElement, MatchKind.REFERENCE, 'label; // 1'),
       _expectId(mainElement, MatchKind.REFERENCE, 'label; // 2')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_LibraryElement() {
+  test_searchReferences_LibraryElement() async {
     var codeA = 'part of lib; // A';
     var codeB = 'part of lib; // B';
     addSource('/unitA.dart', codeA);
@@ -376,20 +491,20 @@
 part 'unitB.dart';
 ''');
     LibraryElement element = testLibraryElement;
-    CompilationUnitElement elementA = element.parts[0];
-    CompilationUnitElement elementB = element.parts[1];
-    index.index(context, elementA.computeNode());
-    index.index(context, elementB.computeNode());
+    CompilationUnitElement unitElementA = element.parts[0];
+    CompilationUnitElement unitElementB = element.parts[1];
+    index.indexUnit(unitElementA.computeNode());
+    index.indexUnit(unitElementB.computeNode());
     var expected = [
-      new ExpectedMatch(elementA, MatchKind.REFERENCE,
+      new ExpectedMatch(unitElementA, MatchKind.REFERENCE,
           codeA.indexOf('lib; // A'), 'lib'.length),
-      new ExpectedMatch(elementB, MatchKind.REFERENCE,
+      new ExpectedMatch(unitElementB, MatchKind.REFERENCE,
           codeB.indexOf('lib; // B'), 'lib'.length),
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_LocalVariableElement() {
+  test_searchReferences_LocalVariableElement() async {
     _indexTestUnit('''
 main() {
   var v;
@@ -407,10 +522,32 @@
       _expectId(mainElement, MatchKind.READ, 'v);'),
       _expectId(mainElement, MatchKind.INVOCATION, 'v();')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_MethodElement() {
+  test_searchReferences_LocalVariableElement_inForEachLoop() async {
+    _indexTestUnit('''
+main() {
+  for (var v in []) {
+    v = 1;
+    v += 2;
+    print(v);
+    v();
+  }
+}
+''');
+    LocalVariableElement element = findElement('v');
+    Element mainElement = findElement('main');
+    var expected = [
+      _expectId(mainElement, MatchKind.WRITE, 'v = 1;'),
+      _expectId(mainElement, MatchKind.READ_WRITE, 'v += 2;'),
+      _expectId(mainElement, MatchKind.READ, 'v);'),
+      _expectId(mainElement, MatchKind.INVOCATION, 'v();')
+    ];
+    await _verifyReferences(element, expected);
+  }
+
+  test_searchReferences_MethodElement() async {
     _indexTestUnit('''
 class A {
   m() {}
@@ -430,10 +567,10 @@
       _expectId(mainElement, MatchKind.REFERENCE, 'm); // 3'),
       _expectIdQ(mainElement, MatchKind.REFERENCE, 'm); // 4')
     ];
-    return _verifyReferences(method, expected);
+    await _verifyReferences(method, expected);
   }
 
-  Future test_searchReferences_MethodMember() {
+  test_searchReferences_MethodMember() async {
     _indexTestUnit('''
 class A<T> {
   T m() => null;
@@ -447,10 +584,92 @@
     var expected = [
       _expectIdQ(mainElement, MatchKind.INVOCATION, 'm(); // ref')
     ];
-    return _verifyReferences(method, expected);
+    await _verifyReferences(method, expected);
   }
 
-  Future test_searchReferences_ParameterElement() {
+  test_searchReferences_ParameterElement_ofConstructor() async {
+    _indexTestUnit('''
+class C {
+  var f;
+  C({p}) : f = p + 1 {
+    p = 2;
+    p += 3;
+    print(p);
+    p();
+  }
+}
+main() {
+  new C(p: 42);
+}
+''');
+    ParameterElement element = findElement('p');
+    ClassElement classC = findElement('C');
+    ConstructorElement constructorA = classC.unnamedConstructor;
+    Element mainElement = findElement('main');
+    var expected = [
+      _expectId(constructorA, MatchKind.READ, 'p + 1 {'),
+      _expectId(constructorA, MatchKind.WRITE, 'p = 2;'),
+      _expectId(constructorA, MatchKind.READ_WRITE, 'p += 3;'),
+      _expectId(constructorA, MatchKind.READ, 'p);'),
+      _expectId(constructorA, MatchKind.INVOCATION, 'p();'),
+      _expectIdQ(mainElement, MatchKind.REFERENCE, 'p: 42')
+    ];
+    await _verifyReferences(element, expected);
+  }
+
+  test_searchReferences_ParameterElement_ofLocalFunction() async {
+    _indexTestUnit('''
+main() {
+  foo({p}) {
+    p = 1;
+    p += 2;
+    print(p);
+    p();
+  }
+  foo(p: 42);
+}
+''');
+    ParameterElement element = findElement('p');
+    Element fooElement = findElement('foo');
+    Element mainElement = findElement('main');
+    var expected = [
+      _expectId(fooElement, MatchKind.WRITE, 'p = 1;'),
+      _expectId(fooElement, MatchKind.READ_WRITE, 'p += 2;'),
+      _expectId(fooElement, MatchKind.READ, 'p);'),
+      _expectId(fooElement, MatchKind.INVOCATION, 'p();'),
+      _expectIdQ(mainElement, MatchKind.REFERENCE, 'p: 42')
+    ];
+    await _verifyReferences(element, expected);
+  }
+
+  test_searchReferences_ParameterElement_ofMethod() async {
+    _indexTestUnit('''
+class C {
+  foo({p}) {
+    p = 1;
+    p += 2;
+    print(p);
+    p();
+  }
+}
+main(C c) {
+  c.foo(p: 42);
+}
+''');
+    ParameterElement element = findElement('p');
+    Element fooElement = findElement('foo');
+    Element mainElement = findElement('main');
+    var expected = [
+      _expectId(fooElement, MatchKind.WRITE, 'p = 1;'),
+      _expectId(fooElement, MatchKind.READ_WRITE, 'p += 2;'),
+      _expectId(fooElement, MatchKind.READ, 'p);'),
+      _expectId(fooElement, MatchKind.INVOCATION, 'p();'),
+      _expectIdQ(mainElement, MatchKind.REFERENCE, 'p: 42')
+    ];
+    await _verifyReferences(element, expected);
+  }
+
+  test_searchReferences_ParameterElement_ofTopLevelFunction() async {
     _indexTestUnit('''
 foo({p}) {
   p = 1;
@@ -470,12 +689,12 @@
       _expectId(fooElement, MatchKind.READ_WRITE, 'p += 2;'),
       _expectId(fooElement, MatchKind.READ, 'p);'),
       _expectId(fooElement, MatchKind.INVOCATION, 'p();'),
-      _expectId(mainElement, MatchKind.REFERENCE, 'p: 42')
+      _expectIdQ(mainElement, MatchKind.REFERENCE, 'p: 42')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_PrefixElement() {
+  test_searchReferences_PrefixElement() async {
     _indexTestUnit('''
 import 'dart:async' as ppp;
 main() {
@@ -490,29 +709,33 @@
       _expectId(elementA, MatchKind.REFERENCE, 'ppp.Future'),
       _expectId(elementB, MatchKind.REFERENCE, 'ppp.Stream')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_PropertyAccessorElement_getter() {
+  test_searchReferences_PropertyAccessorElement_getter() async {
     _indexTestUnit('''
 class A {
-  get g => null;
+  get ggg => null;
   main() {
-    g; // 1
-    this.g; // 2
+    print(ggg); // ref-nq
+    print(this.ggg); // ref-q
+    ggg(); // inv-nq
+    this.ggg(); // inv-q
   }
 }
 ''');
-    PropertyAccessorElement element = findElement('g', ElementKind.GETTER);
-    Element mainElement = findElement('main');
+    PropertyAccessorElement element = findElement('ggg', ElementKind.GETTER);
+    Element main = findElement('main');
     var expected = [
-      _expectId(mainElement, MatchKind.REFERENCE, 'g; // 1'),
-      _expectIdQ(mainElement, MatchKind.REFERENCE, 'g; // 2')
+      _expectId(main, MatchKind.REFERENCE, 'ggg); // ref-nq'),
+      _expectIdQ(main, MatchKind.REFERENCE, 'ggg); // ref-q'),
+      _expectId(main, MatchKind.INVOCATION, 'ggg(); // inv-nq'),
+      _expectIdQ(main, MatchKind.INVOCATION, 'ggg(); // inv-q'),
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_PropertyAccessorElement_setter() {
+  test_searchReferences_PropertyAccessorElement_setter() async {
     _indexTestUnit('''
 class A {
   set s(x) {}
@@ -528,10 +751,10 @@
       _expectId(mainElement, MatchKind.REFERENCE, 's = 1'),
       _expectIdQ(mainElement, MatchKind.REFERENCE, 's = 2')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchReferences_TopLevelVariableElement() {
+  test_searchReferences_TopLevelVariableElement() async {
     addSource(
         '/lib.dart',
         '''
@@ -556,18 +779,18 @@
     TopLevelVariableElement variable = impUnit.topLevelVariables[0];
     Element main = findElement('main');
     var expected = [
-      _expectId(testUnitElement, MatchKind.REFERENCE, 'V; // imp'),
-      _expectId(main, MatchKind.WRITE, 'V = 1; // q'),
-      _expectId(main, MatchKind.READ, 'V); // q'),
-      _expectId(main, MatchKind.INVOCATION, 'V(); // q'),
+      _expectIdQ(testUnitElement, MatchKind.REFERENCE, 'V; // imp'),
+      _expectIdQ(main, MatchKind.WRITE, 'V = 1; // q'),
+      _expectIdQ(main, MatchKind.READ, 'V); // q'),
+      _expectIdQ(main, MatchKind.INVOCATION, 'V(); // q'),
       _expectId(main, MatchKind.WRITE, 'V = 1; // nq'),
       _expectId(main, MatchKind.READ, 'V); // nq'),
       _expectId(main, MatchKind.INVOCATION, 'V(); // nq'),
     ];
-    return _verifyReferences(variable, expected);
+    await _verifyReferences(variable, expected);
   }
 
-  Future test_searchReferences_TypeParameterElement() {
+  test_searchReferences_TypeParameterElement() async {
     _indexTestUnit('''
 class A<T> {
   main(T a, T b) {}
@@ -580,10 +803,10 @@
       _expectId(aElement, MatchKind.REFERENCE, 'T a'),
       _expectId(bElement, MatchKind.REFERENCE, 'T b')
     ];
-    return _verifyReferences(element, expected);
+    await _verifyReferences(element, expected);
   }
 
-  Future test_searchSubtypes() {
+  test_searchSubtypes() async {
     _indexTestUnit('''
 class T {}
 class A extends T {} // A
@@ -599,12 +822,11 @@
       _expectId(elementB, MatchKind.REFERENCE, 'T; // B'),
       _expectId(elementC, MatchKind.REFERENCE, 'T {} // C')
     ];
-    return searchEngine.searchSubtypes(element).then((matches) {
-      _assertMatches(matches, expected);
-    });
+    List<SearchMatch> matches = await searchEngine.searchSubtypes(element);
+    _assertMatches(matches, expected);
   }
 
-  Future test_searchTopLevelDeclarations() {
+  test_searchTopLevelDeclarations() async {
     _indexTestUnit('''
 class A {} // A
 class B = Object with A;
@@ -625,7 +847,9 @@
       _expectId(topD, MatchKind.DECLARATION, 'D() {}'),
       _expectId(topE, MatchKind.DECLARATION, 'E = null')
     ];
-    return _verifyTopLevelDeclarations('^[A-E]\$', expected);
+    List<SearchMatch> matches =
+        await searchEngine.searchTopLevelDeclarations(r'^[A-E]$');
+    _assertMatches(matches, expected);
   }
 
   ExpectedMatch _expectId(Element element, MatchKind kind, String search,
@@ -638,36 +862,42 @@
         isResolved: isResolved, isQualified: isQualified);
   }
 
-  ExpectedMatch _expectIdQ(Element element, MatchKind kind, String search) {
-    return _expectId(element, kind, search, isQualified: true);
+  /**
+   * Create [ExpectedMatch] for a qualified and resolved match.
+   */
+  ExpectedMatch _expectIdQ(Element element, MatchKind kind, String search,
+      {int length, bool isResolved: true}) {
+    return _expectId(element, kind, search, isQualified: true, length: length);
   }
 
-  ExpectedMatch _expectIdU(Element element, MatchKind kind, String search) {
+  /**
+   * Create [ExpectedMatch] for a qualified and unresolved match.
+   */
+  ExpectedMatch _expectIdQU(Element element, MatchKind kind, String search,
+      {int length}) {
     return _expectId(element, kind, search,
-        isQualified: true, isResolved: false);
+        isQualified: true, isResolved: false, length: length);
+  }
+
+  /**
+   * Create [ExpectedMatch] for a unqualified and unresolved match.
+   */
+  ExpectedMatch _expectIdU(Element element, MatchKind kind, String search,
+      {int length}) {
+    return _expectId(element, kind, search,
+        isQualified: false, isResolved: false, length: length);
   }
 
   void _indexTestUnit(String code) {
     resolveTestUnit(code);
-    index.index(context, testUnit);
+    index.indexUnit(testUnit);
   }
 
   Future _verifyReferences(
-      Element element, List<ExpectedMatch> expectedMatches) {
-    return searchEngine
-        .searchReferences(element)
-        .then((List<SearchMatch> matches) {
-      _assertMatches(matches, expectedMatches);
-    });
-  }
-
-  Future _verifyTopLevelDeclarations(
-      String pattern, List<ExpectedMatch> expectedMatches) {
-    return searchEngine
-        .searchTopLevelDeclarations(pattern)
-        .then((List<SearchMatch> matches) {
-      _assertMatches(matches, expectedMatches);
-    });
+      Element element, List<ExpectedMatch> expectedMatches) async {
+    List<SearchMatch> matches = await searchEngine.searchReferences(element);
+    _assertMatches(matches, expectedMatches);
+    expect(matches, hasLength(expectedMatches.length));
   }
 
   static void _assertMatches(
diff --git a/pkg/analysis_server/test/socket_server_test.dart b/pkg/analysis_server/test/socket_server_test.dart
index 1175320..395072a 100644
--- a/pkg/analysis_server/test/socket_server_test.dart
+++ b/pkg/analysis_server/test/socket_server_test.dart
@@ -112,12 +112,12 @@
     ServerPlugin serverPlugin = new ServerPlugin();
     ExtensionManager manager = new ExtensionManager();
     manager.processPlugins([serverPlugin]);
-    SdkCreator sdkCreator = () =>
+    SdkCreator sdkCreator = (_) =>
         new DirectoryBasedDartSdk(DirectoryBasedDartSdk.defaultSdkDirectory);
     return new SocketServer(
         new AnalysisServerOptions(),
         sdkCreator,
-        sdkCreator(),
+        sdkCreator(null),
         InstrumentationService.NULL_SERVICE,
         serverPlugin,
         null,
diff --git a/pkg/analysis_server/test/source/caching_put_package_map_provider_test.dart b/pkg/analysis_server/test/source/caching_put_package_map_provider_test.dart
index 9aa321b..98f1165 100644
--- a/pkg/analysis_server/test/source/caching_put_package_map_provider_test.dart
+++ b/pkg/analysis_server/test/source/caching_put_package_map_provider_test.dart
@@ -45,7 +45,7 @@
       packages.forEach((String name, String path) {
         resProvider.newFolder(path);
       });
-      List<String> inputFiles = result['input_files'];
+      List<String> inputFiles = result['input_files'] as List<String>;
       for (String path in inputFiles) {
         resProvider.newFile(path, '');
       }
@@ -282,7 +282,7 @@
 
 _assertError(PackageMapInfo info, Map expected) {
   expect(info.packageMap, isNull);
-  List<String> expectedFiles = expected['input_files'];
+  List<String> expectedFiles = expected['input_files'] as List<String>;
   expect(info.dependencies, hasLength(expectedFiles.length));
   for (String path in expectedFiles) {
     expect(info.dependencies, contains(path));
@@ -290,14 +290,15 @@
 }
 
 _assertInfo(PackageMapInfo info, Map expected) {
-  Map<String, String> expectedPackages = expected['packages'];
+  Map<String, String> expectedPackages =
+      expected['packages'] as Map<String, String>;
   expect(info.packageMap, hasLength(expectedPackages.length));
   for (String key in expectedPackages.keys) {
     List<Folder> packageList = info.packageMap[key];
     expect(packageList, hasLength(1));
     expect(packageList[0].path, expectedPackages[key]);
   }
-  List<String> expectedFiles = expected['input_files'];
+  List<String> expectedFiles = expected['input_files'] as List<String>;
   expect(info.dependencies, hasLength(expectedFiles.length));
   for (String path in expectedFiles) {
     expect(info.dependencies, contains(path));
diff --git a/pkg/analysis_server/test/src/utilities/change_builder_core_test.dart b/pkg/analysis_server/test/src/utilities/change_builder_core_test.dart
index 4eb855f..c36c700 100644
--- a/pkg/analysis_server/test/src/utilities/change_builder_core_test.dart
+++ b/pkg/analysis_server/test/src/utilities/change_builder_core_test.dart
@@ -74,12 +74,12 @@
     ChangeBuilderImpl builder = new ChangeBuilderImpl();
     int offset = 10;
     String text = 'content';
-    builder.addFileEdit(source, 0, (FileEditBuilderImpl builder) {
-      builder.addInsertion(10, (EditBuilderImpl builder) {
+    builder.addFileEdit(source, 0, (FileEditBuilder builder) {
+      builder.addInsertion(10, (EditBuilder builder) {
         builder.addLinkedEdit('a', (LinkedEditBuilder builder) {
           builder.write(text);
         });
-        SourceEdit sourceEdit = builder.sourceEdit;
+        SourceEdit sourceEdit = (builder as EditBuilderImpl).sourceEdit;
         expect(sourceEdit.replacement, text);
       });
     });
@@ -97,9 +97,10 @@
 
   void test_createLinkedEditBuilder() {
     ChangeBuilderImpl builder = new ChangeBuilderImpl();
-    builder.addFileEdit(source, 0, (FileEditBuilderImpl builder) {
-      builder.addInsertion(10, (EditBuilderImpl builder) {
-        LinkedEditBuilderImpl linkBuilder = builder.createLinkedEditBuilder();
+    builder.addFileEdit(source, 0, (FileEditBuilder builder) {
+      builder.addInsertion(10, (EditBuilder builder) {
+        LinkedEditBuilderImpl linkBuilder =
+            (builder as EditBuilderImpl).createLinkedEditBuilder();
         expect(linkBuilder, new isInstanceOf<LinkedEditBuilder>());
       });
     });
@@ -110,8 +111,8 @@
     int timeStamp = 93;
     int offset = 10;
     String text = 'write';
-    builder.addFileEdit(source, timeStamp, (FileEditBuilderImpl builder) {
-      builder.addInsertion(offset, (EditBuilderImpl builder) {
+    builder.addFileEdit(source, timeStamp, (FileEditBuilder builder) {
+      builder.addInsertion(offset, (EditBuilder builder) {
         builder.write(text);
       });
     });
@@ -140,8 +141,8 @@
     int timeStamp = 39;
     int offset = 52;
     int length = 12;
-    builder.addFileEdit(source, timeStamp, (FileEditBuilderImpl builder) {
-      builder.addReplacement(offset, length, (EditBuilderImpl builder) {
+    builder.addFileEdit(source, timeStamp, (FileEditBuilder builder) {
+      builder.addReplacement(offset, length, (EditBuilder builder) {
         builder.writeln();
       });
     });
@@ -171,8 +172,8 @@
     int offset = 52;
     int length = 12;
     String text = 'writeln';
-    builder.addFileEdit(source, timeStamp, (FileEditBuilderImpl builder) {
-      builder.addReplacement(offset, length, (EditBuilderImpl builder) {
+    builder.addFileEdit(source, timeStamp, (FileEditBuilder builder) {
+      builder.addReplacement(offset, length, (EditBuilder builder) {
         builder.writeln(text);
       });
     });
@@ -204,8 +205,8 @@
 
   void test_addInsertion() {
     ChangeBuilderImpl builder = new ChangeBuilderImpl();
-    builder.addFileEdit(source, 0, (FileEditBuilderImpl builder) {
-      builder.addInsertion(10, (EditBuilderImpl builder) {
+    builder.addFileEdit(source, 0, (FileEditBuilder builder) {
+      builder.addInsertion(10, (EditBuilder builder) {
         expect(builder, isNotNull);
       });
     });
@@ -214,7 +215,7 @@
   void test_addLinkedPosition() {
     ChangeBuilderImpl changeBuilder = new ChangeBuilderImpl();
     String groupName = 'a';
-    changeBuilder.addFileEdit(source, 0, (FileEditBuilderImpl builder) {
+    changeBuilder.addFileEdit(source, 0, (FileEditBuilder builder) {
       builder.addLinkedPosition(3, 6, groupName);
     });
 
@@ -229,8 +230,8 @@
 
   void test_addReplacement() {
     ChangeBuilderImpl builder = new ChangeBuilderImpl();
-    builder.addFileEdit(source, 0, (FileEditBuilderImpl builder) {
-      builder.addReplacement(4, 5, (EditBuilderImpl builder) {
+    builder.addFileEdit(source, 0, (FileEditBuilder builder) {
+      builder.addReplacement(4, 5, (EditBuilder builder) {
         expect(builder, isNotNull);
       });
     });
@@ -238,10 +239,11 @@
 
   void test_createEditBuilder() {
     ChangeBuilderImpl builder = new ChangeBuilderImpl();
-    builder.addFileEdit(source, 0, (FileEditBuilderImpl builder) {
+    builder.addFileEdit(source, 0, (FileEditBuilder builder) {
       int offset = 4;
       int length = 5;
-      EditBuilderImpl editBuilder = builder.createEditBuilder(offset, length);
+      EditBuilderImpl editBuilder =
+          (builder as FileEditBuilderImpl).createEditBuilder(offset, length);
       expect(editBuilder, new isInstanceOf<EditBuilder>());
       SourceEdit sourceEdit = editBuilder.sourceEdit;
       expect(sourceEdit.length, length);
@@ -258,9 +260,9 @@
   void test_addSuggestion() {
     String groupName = 'a';
     ChangeBuilderImpl builder = new ChangeBuilderImpl();
-    builder.addFileEdit(source, 0, (FileEditBuilderImpl builder) {
-      builder.addInsertion(10, (EditBuilderImpl builder) {
-        builder.addLinkedEdit(groupName, (LinkedEditBuilderImpl builder) {
+    builder.addFileEdit(source, 0, (FileEditBuilder builder) {
+      builder.addInsertion(10, (EditBuilder builder) {
+        builder.addLinkedEdit(groupName, (LinkedEditBuilder builder) {
           builder.addSuggestion(LinkedEditSuggestionKind.TYPE, 'A');
         });
       });
@@ -273,9 +275,9 @@
   void test_addSuggestions() {
     String groupName = 'a';
     ChangeBuilderImpl builder = new ChangeBuilderImpl();
-    builder.addFileEdit(source, 0, (FileEditBuilderImpl builder) {
-      builder.addInsertion(10, (EditBuilderImpl builder) {
-        builder.addLinkedEdit(groupName, (LinkedEditBuilderImpl builder) {
+    builder.addFileEdit(source, 0, (FileEditBuilder builder) {
+      builder.addInsertion(10, (EditBuilder builder) {
+        builder.addLinkedEdit(groupName, (LinkedEditBuilder builder) {
           builder.addSuggestions(LinkedEditSuggestionKind.TYPE, ['A', 'B']);
         });
       });
diff --git a/pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart b/pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart
index 5db934d..61f8328 100644
--- a/pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart
+++ b/pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart
@@ -5,9 +5,11 @@
 library analysis_server.test.src.utilities.change_builder_dart_test;
 
 import 'package:analysis_server/plugin/protocol/protocol.dart';
+import 'package:analysis_server/src/provisional/edit/utilities/change_builder_core.dart';
 import 'package:analysis_server/src/provisional/edit/utilities/change_builder_dart.dart';
 import 'package:analysis_server/src/utilities/change_builder_dart.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
@@ -58,10 +60,10 @@
     ClassDeclaration declaration = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(0, (DartEditBuilder builder) {
-        builder.writeClassDeclaration('C',
-            interfaces: [declaration.element.type]);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(0, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeClassDeclaration('C', interfaces: [declaration.element.type]);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -74,9 +76,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(0, (DartEditBuilder builder) {
-        builder.writeClassDeclaration('C', isAbstract: true);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(0, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeClassDeclaration('C', isAbstract: true);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -88,9 +91,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(0, (DartEditBuilder builder) {
-        builder.writeClassDeclaration('C', memberWriter: () {
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(0, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeClassDeclaration('C',
+            memberWriter: () {
           builder.write('/**/');
         });
       });
@@ -105,9 +109,10 @@
     ClassDeclaration classA = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(0, (DartEditBuilder builder) {
-        builder.writeClassDeclaration('C', mixins: [classA.element.type]);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(0, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeClassDeclaration('C', mixins: [classA.element.type]);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -122,9 +127,9 @@
     ClassDeclaration classB = unit.declarations[1];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(0, (DartEditBuilder builder) {
-        builder.writeClassDeclaration('C',
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(0, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeClassDeclaration('C',
             mixins: [classB.element.type], superclass: classA.element.type);
       });
     });
@@ -138,9 +143,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(0, (DartEditBuilder builder) {
-        builder.writeClassDeclaration('C', nameGroupName: 'name');
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(0, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeClassDeclaration('C', nameGroupName: 'name');
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -160,10 +166,10 @@
     ClassDeclaration declaration = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(0, (DartEditBuilder builder) {
-        builder.writeClassDeclaration('C',
-            superclass: declaration.element.type);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(0, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeClassDeclaration('C', superclass: declaration.element.type);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -176,9 +182,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeFieldDeclaration('f', initializerWriter: () {
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeFieldDeclaration('f',
+            initializerWriter: () {
           builder.write('e');
         });
       });
@@ -193,9 +200,9 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeFieldDeclaration('f', isConst: true);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeFieldDeclaration('f', isConst: true);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -208,9 +215,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeFieldDeclaration('f', isConst: true, isFinal: true);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeFieldDeclaration('f', isConst: true, isFinal: true);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -223,9 +231,9 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeFieldDeclaration('f', isFinal: true);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeFieldDeclaration('f', isFinal: true);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -238,9 +246,9 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeFieldDeclaration('f', isStatic: true);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeFieldDeclaration('f', isStatic: true);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -253,9 +261,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeFieldDeclaration('f', nameGroupName: 'name');
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeFieldDeclaration('f', nameGroupName: 'name');
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -278,9 +287,9 @@
     ClassDeclaration declaration = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeFieldDeclaration('f',
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeFieldDeclaration('f',
             type: declaration.element.type, typeGroupName: 'type');
       });
     });
@@ -303,9 +312,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilderImpl builder) {
-        builder.writeGetterDeclaration('g', bodyWriter: () {
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeGetterDeclaration('g',
+            bodyWriter: () {
           builder.write('{}');
         });
       });
@@ -320,9 +330,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilderImpl builder) {
-        builder.writeGetterDeclaration('g', isStatic: true);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeGetterDeclaration('g', isStatic: true);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -335,9 +346,10 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilderImpl builder) {
-        builder.writeGetterDeclaration('g', nameGroupName: 'name');
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeGetterDeclaration('g', nameGroupName: 'name');
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -360,9 +372,9 @@
     ClassDeclaration classA = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilderImpl builder) {
-        builder.writeGetterDeclaration('g',
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeGetterDeclaration('g',
             returnType: classA.element.type, returnTypeGroupName: 'returnType');
       });
     });
@@ -391,9 +403,10 @@
     ClassDeclaration declaration = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeOverrideOfInheritedMember(declaration.element.methods[0]);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeOverrideOfInheritedMember(declaration.element.methods[0]);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -411,13 +424,13 @@
     CompilationUnit unit = resolveLibraryUnit(source);
     FunctionDeclaration f = unit.declarations[0];
     FormalParameterList parameters = f.functionExpression.parameters;
-    Iterable elements = parameters.parameters
+    Iterable<ParameterElement> elements = parameters.parameters
         .map((FormalParameter parameter) => parameter.element);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeParameters(elements);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeParameters(elements);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -430,13 +443,13 @@
     CompilationUnit unit = resolveLibraryUnit(source);
     FunctionDeclaration f = unit.declarations[0];
     FormalParameterList parameters = f.functionExpression.parameters;
-    Iterable elements = parameters.parameters
+    Iterable<ParameterElement> elements = parameters.parameters
         .map((FormalParameter parameter) => parameter.element);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeParameters(elements);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeParameters(elements);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -449,13 +462,13 @@
     CompilationUnit unit = resolveLibraryUnit(source);
     FunctionDeclaration f = unit.declarations[0];
     FormalParameterList parameters = f.functionExpression.parameters;
-    Iterable elements = parameters.parameters
+    Iterable<ParameterElement> elements = parameters.parameters
         .map((FormalParameter parameter) => parameter.element);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeParameters(elements);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeParameters(elements);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -475,9 +488,10 @@
     MethodInvocation invocation = statement.expression;
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeParametersMatchingArguments(invocation.argumentList);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeParametersMatchingArguments(invocation.argumentList);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -498,9 +512,10 @@
     MethodInvocation invocation = statement.expression;
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeParametersMatchingArguments(invocation.argumentList);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeParametersMatchingArguments(invocation.argumentList);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -514,9 +529,10 @@
     ClassDeclaration classA = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeParameterSource(classA.element.type, 'a');
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeParameterSource(classA.element.type, 'a');
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -529,9 +545,10 @@
     CompilationUnit unit = resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeType(unit.element.context.typeProvider.dynamicType);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeType(unit.element.context.typeProvider.dynamicType);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -546,10 +563,10 @@
     ClassDeclaration classB = unit.declarations[1];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder
-            .writeType(classB.element.type.substitute4([classA.element.type]));
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeType(classB.element.type.instantiate([classA.element.type]));
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -563,9 +580,10 @@
     ClassDeclaration classC = unit.declarations[2];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeType(classC.element.type, groupName: 'type');
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeType(classC.element.type, groupName: 'type');
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -585,9 +603,9 @@
     ClassDeclaration classC = unit.declarations[2];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeType(classC.element.type,
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeType(classC.element.type,
             addSupertypeProposals: true, groupName: 'type');
       });
     });
@@ -617,9 +635,9 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeType(null);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeType(null);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -632,9 +650,10 @@
     CompilationUnit unit = resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeType(unit.element.context.typeProvider.dynamicType,
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeType(
+            unit.element.context.typeProvider.dynamicType,
             required: true);
       });
     });
@@ -649,9 +668,10 @@
     ClassDeclaration classA = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeType(classA.element.type, required: true);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder)
+            .writeType(classA.element.type, required: true);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -664,9 +684,9 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeType(null, required: true);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeType(null, required: true);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -680,9 +700,9 @@
     ClassDeclaration classA = unit.declarations[0];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
-        builder.writeType(classA.element.type);
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+        (builder as DartEditBuilder).writeType(classA.element.type);
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -695,8 +715,8 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilderImpl).writeTypes([]);
       });
     });
@@ -712,8 +732,8 @@
     ClassDeclaration classB = unit.declarations[1];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilderImpl)
             .writeTypes([classA.element.type, classB.element.type]);
       });
@@ -728,8 +748,8 @@
     resolveLibraryUnit(source);
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilderImpl).writeTypes(null);
       });
     });
@@ -745,8 +765,8 @@
     ClassDeclaration classB = unit.declarations[1];
 
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
+    builder.addFileEdit(source, 1, (FileEditBuilder builder) {
+      builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilderImpl).writeTypes(
             [classA.element.type, classB.element.type],
             prefix: 'implements ');
@@ -764,11 +784,11 @@
     resolveLibraryUnit(source);
     int timeStamp = 65;
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
-    builder.addFileEdit(source, timeStamp, (DartFileEditBuilderImpl builder) {
+    builder.addFileEdit(source, timeStamp, (FileEditBuilder builder) {
       int offset = 4;
       int length = 5;
-      DartEditBuilderImpl editBuilder =
-          builder.createEditBuilder(offset, length);
+      DartEditBuilderImpl editBuilder = (builder as DartFileEditBuilderImpl)
+          .createEditBuilder(offset, length);
       expect(editBuilder, new isInstanceOf<DartEditBuilder>());
       SourceEdit sourceEdit = editBuilder.sourceEdit;
       expect(sourceEdit.length, length);
diff --git a/pkg/analysis_server/test/stress/utilities/git.dart b/pkg/analysis_server/test/stress/utilities/git.dart
index 30e45f7..32c7e9b 100644
--- a/pkg/analysis_server/test/stress/utilities/git.dart
+++ b/pkg/analysis_server/test/stress/utilities/git.dart
@@ -379,7 +379,7 @@
    */
   bool isFor(String fileName) =>
       (srcPath != null && fileName == path.basename(srcPath)) ||
-          (dstPath != null && fileName == path.basename(dstPath));
+      (dstPath != null && fileName == path.basename(dstPath));
 
   @override
   String toString() => srcPath ?? dstPath;
diff --git a/pkg/analysis_server/test/test_all.dart b/pkg/analysis_server/test/test_all.dart
index 0a4a883..994f5ef 100644
--- a/pkg/analysis_server/test/test_all.dart
+++ b/pkg/analysis_server/test/test_all.dart
@@ -7,6 +7,7 @@
 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;
@@ -35,6 +36,7 @@
     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();
diff --git a/pkg/analysis_server/test/timing/timing_framework.dart b/pkg/analysis_server/test/timing/timing_framework.dart
index cdf24fe..8861f94 100644
--- a/pkg/analysis_server/test/timing/timing_framework.dart
+++ b/pkg/analysis_server/test/timing/timing_framework.dart
@@ -224,17 +224,13 @@
    * number of milliseconds required to perform the operation the specified
    * number of times.
    */
-  Future<TimingResult> run() {
+  Future<TimingResult> run() async {
     List<int> times = new List<int>();
-    return oneTimeSetUp().then((_) {
-      return _repeat(warmupCount, null).then((_) {
-        return _repeat(timingCount, times).then((_) {
-          return oneTimeTearDown().then((_) {
-            return new Future.value(new TimingResult(times));
-          });
-        });
-      });
-    });
+    await oneTimeSetUp();
+    await _repeat(warmupCount, null);
+    await _repeat(timingCount, times);
+    await oneTimeTearDown();
+    return new Future<TimingResult>.value(new TimingResult(times));
   }
 
   /**
diff --git a/pkg/analysis_server/tool/spec/api.dart b/pkg/analysis_server/tool/spec/api.dart
index b5443aa..d542551 100644
--- a/pkg/analysis_server/tool/spec/api.dart
+++ b/pkg/analysis_server/tool/spec/api.dart
@@ -52,7 +52,7 @@
   /**
    * Dispatch the given [type] to the visitor.
    */
-  T visitTypeDecl(TypeDecl type) => type.accept(this);
+  T visitTypeDecl(TypeDecl type) => type.accept(this) as T;
   T visitTypeEnum(TypeEnum typeEnum);
   T visitTypeList(TypeList typeList);
   T visitTypeMap(TypeMap typeMap);
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
index fc389a4..02855a6 100644
--- a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
+++ b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
@@ -79,9 +79,9 @@
   final Map<String, ImpliedType> impliedTypes;
 
   CodegenProtocolVisitor(Api api)
-      : super(api),
-        toHtmlVisitor = new ToHtmlVisitor(api),
-        impliedTypes = computeImpliedTypes(api) {
+      : toHtmlVisitor = new ToHtmlVisitor(api),
+        impliedTypes = computeImpliedTypes(api),
+        super(api) {
     codeGeneratorSettings.commentLineLength = 79;
     codeGeneratorSettings.languageName = 'dart';
   }
diff --git a/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart b/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
index 3b5fde0..5819e20 100644
--- a/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
+++ b/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
@@ -45,8 +45,8 @@
   List<String> notificationSwitchContents = <String>[];
 
   CodegenInttestMethodsVisitor(Api api)
-      : super(api),
-        toHtmlVisitor = new ToHtmlVisitor(api) {
+      : toHtmlVisitor = new ToHtmlVisitor(api),
+        super(api) {
     codeGeneratorSettings.commentLineLength = 79;
     codeGeneratorSettings.languageName = 'dart';
   }
diff --git a/pkg/analysis_server/tool/spec/codegen_java.dart b/pkg/analysis_server/tool/spec/codegen_java.dart
index 3b7a4d2..9c4dd83 100644
--- a/pkg/analysis_server/tool/spec/codegen_java.dart
+++ b/pkg/analysis_server/tool/spec/codegen_java.dart
@@ -68,8 +68,8 @@
   final ToHtmlVisitor toHtmlVisitor;
 
   CodegenJavaVisitor(Api api)
-      : super(api),
-        toHtmlVisitor = new ToHtmlVisitor(api);
+      : toHtmlVisitor = new ToHtmlVisitor(api),
+        super(api);
 
   /**
    * Create a constructor, using [callback] to create its contents.
@@ -262,7 +262,7 @@
   }
 
   @override
-  TypeReference resolveTypeReferenceChain(TypeReference type) {
+  TypeDecl resolveTypeReferenceChain(TypeDecl type) {
     TypeDecl typeDecl = super.resolveTypeReferenceChain(type);
     if (typeDecl is TypeEnum) {
       return new TypeReference('String', null);
diff --git a/pkg/analysis_server/tool/spec/codegen_java_types.dart b/pkg/analysis_server/tool/spec/codegen_java_types.dart
index b752b2e..b28531a 100644
--- a/pkg/analysis_server/tool/spec/codegen_java_types.dart
+++ b/pkg/analysis_server/tool/spec/codegen_java_types.dart
@@ -480,8 +480,7 @@
 //        }
       if (className != 'Outline') {
         publicMethod('fromJson', () {
-          writeln(
-              'public static $className fromJson(JsonObject jsonObject) {');
+          writeln('public static $className fromJson(JsonObject jsonObject) {');
           indent(() {
             for (TypeObjectField field in fields) {
               write('${javaFieldType(field)} ${javaName(field.name)} = ');
diff --git a/pkg/analysis_server/tool/spec/codegen_matchers.dart b/pkg/analysis_server/tool/spec/codegen_matchers.dart
index be2f847..10c5b85 100644
--- a/pkg/analysis_server/tool/spec/codegen_matchers.dart
+++ b/pkg/analysis_server/tool/spec/codegen_matchers.dart
@@ -35,8 +35,8 @@
   String context;
 
   CodegenMatchersVisitor(Api api)
-      : super(api),
-        toHtmlVisitor = new ToHtmlVisitor(api) {
+      : toHtmlVisitor = new ToHtmlVisitor(api),
+        super(api) {
     codeGeneratorSettings.commentLineLength = 79;
     codeGeneratorSettings.languageName = 'dart';
   }
diff --git a/pkg/analysis_server/tool/spec/from_html.dart b/pkg/analysis_server/tool/spec/from_html.dart
index 3840d86..671b124 100644
--- a/pkg/analysis_server/tool/spec/from_html.dart
+++ b/pkg/analysis_server/tool/spec/from_html.dart
@@ -423,7 +423,8 @@
   checkName(html, 'type');
   String name = html.attributes['name'];
   String context = name != null ? name : 'type';
-  checkAttributes(html, ['name'], context, optionalAttributes: ['experimental']);
+  checkAttributes(html, ['name'], context,
+      optionalAttributes: ['experimental']);
   TypeDecl type = processContentsAsType(html, context);
   bool experimental = html.attributes['experimental'] == 'true';
   return new TypeDefinition(name, type, html, experimental: experimental);
@@ -517,7 +518,7 @@
  * Create a [TypeObject] from an HTML description.
  */
 TypeObject typeObjectFromHtml(dom.Element html, String context) {
-  checkAttributes(html, [], context,  optionalAttributes: ['experimental']);
+  checkAttributes(html, [], context, optionalAttributes: ['experimental']);
   List<TypeObjectField> fields = <TypeObjectField>[];
   recurse(html, context, {
     'field': (dom.Element child) {
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 9020207..00c4495 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java
@@ -72,6 +72,11 @@
   private final String correction;
 
   /**
+   * The name, as a string, of the error code associated with this error.
+   */
+  private final String code;
+
+  /**
    * 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
@@ -85,12 +90,13 @@
   /**
    * Constructor for {@link AnalysisError}.
    */
-  public AnalysisError(String severity, String type, Location location, String message, String correction, Boolean hasFix) {
+  public AnalysisError(String severity, String type, Location location, String message, String correction, String code, Boolean hasFix) {
     this.severity = severity;
     this.type = type;
     this.location = location;
     this.message = message;
     this.correction = correction;
+    this.code = code;
     this.hasFix = hasFix;
   }
 
@@ -104,6 +110,7 @@
         ObjectUtilities.equals(other.location, location) &&
         ObjectUtilities.equals(other.message, message) &&
         ObjectUtilities.equals(other.correction, correction) &&
+        ObjectUtilities.equals(other.code, code) &&
         ObjectUtilities.equals(other.hasFix, hasFix);
     }
     return false;
@@ -115,8 +122,9 @@
     Location location = Location.fromJson(jsonObject.get("location").getAsJsonObject());
     String message = jsonObject.get("message").getAsString();
     String correction = jsonObject.get("correction") == null ? null : jsonObject.get("correction").getAsString();
+    String code = jsonObject.get("code").getAsString();
     Boolean hasFix = jsonObject.get("hasFix") == null ? null : jsonObject.get("hasFix").getAsBoolean();
-    return new AnalysisError(severity, type, location, message, correction, hasFix);
+    return new AnalysisError(severity, type, location, message, correction, code, hasFix);
   }
 
   public static List<AnalysisError> fromJsonArray(JsonArray jsonArray) {
@@ -132,6 +140,13 @@
   }
 
   /**
+   * The name, as a string, of the error code associated with this error.
+   */
+  public String getCode() {
+    return code;
+  }
+
+  /**
    * The correction message to be displayed for this error. The correction message should indicate
    * how the user can fix the error. The field is omitted if there is no correction message
    * associated with the error code.
@@ -190,6 +205,7 @@
     builder.append(location);
     builder.append(message);
     builder.append(correction);
+    builder.append(code);
     builder.append(hasFix);
     return builder.toHashCode();
   }
@@ -203,6 +219,7 @@
     if (correction != null) {
       jsonObject.addProperty("correction", correction);
     }
+    jsonObject.addProperty("code", code);
     if (hasFix != null) {
       jsonObject.addProperty("hasFix", hasFix);
     }
@@ -223,6 +240,8 @@
     builder.append(message + ", ");
     builder.append("correction=");
     builder.append(correction + ", ");
+    builder.append("code=");
+    builder.append(code + ", ");
     builder.append("hasFix=");
     builder.append(hasFix);
     builder.append("]");
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index fa4664f..644a1a9 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -6,7 +6,7 @@
   </head>
   <body>
     <h1>Analysis Server API Specification</h1>
-    <h1 style="color:#999999">Version <version>1.14.0</version></h1>
+    <h1 style="color:#999999">Version <version>1.15.0</version></h1>
     <p>
       This document contains a specification of the API provided by the
       analysis server.  The API in this document is currently under
@@ -2088,6 +2088,12 @@
               message associated with the error code.
             </p>
           </field>
+          <field name="code">
+            <ref>String</ref>
+            <p>
+              The name, as a string, of the error code associated with this error.
+            </p>
+          </field>
           <field name="hasFix" optional="true">
             <ref>bool</ref>
             <p>
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index 2ccf00e..6e1bf7c 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -79,7 +79,8 @@
 
   list-style-type: none;
 }
-'''.trim();
+'''
+    .trim();
 
 final GeneratedFile target =
     new GeneratedFile('doc/api.html', (String pkgPath) {
@@ -171,8 +172,8 @@
   ApiMappings apiMappings;
 
   ToHtmlVisitor(Api api)
-      : super(api),
-        apiMappings = new ApiMappings(api) {
+      : apiMappings = new ApiMappings(api),
+        super(api) {
     apiMappings.visitApi();
   }
 
@@ -448,7 +449,8 @@
     });
   }
 
-  @override visitRefactoring(Refactoring refactoring) {
+  @override
+  visitRefactoring(Refactoring refactoring) {
     dt('refactoring', () {
       write(refactoring.kind);
     });
diff --git a/pkg/analyzer/.analysis_options b/pkg/analyzer/.analysis_options
index 7c974bd..2b11248 100644
--- a/pkg/analyzer/.analysis_options
+++ b/pkg/analyzer/.analysis_options
@@ -1,5 +1,6 @@
 linter:
   rules:
-    - annotate_overrides
+    # TODO(pq): re-enable once we have a bulk edit tool
+    # - annotate_overrides
     - empty_constructor_bodies
     - unnecessary_brace_in_string_interp
diff --git a/pkg/analyzer/README.md b/pkg/analyzer/README.md
index c6ad981..18dd9b2 100644
--- a/pkg/analyzer/README.md
+++ b/pkg/analyzer/README.md
@@ -15,7 +15,7 @@
 
 ## Configuring the analyzer
 
-Both the dartanalyzer and Dart Analysis Server can be configured
+Both `dartanalyzer` and Dart Analysis Server can be configured
 with a `.analysis_options` file. This YAML file can control which files
 and paths are analyzed, which lints are applied, and more.
 
@@ -25,14 +25,14 @@
 
 The `.analysis_options` file should live
 at the root of your project (for example, next to your `pubspec.yaml`).
-Different embedders of analyzer, such as dartanalyzer or Dart Analysis Server,
+Different embedders of analyzer, such as `dartanalyzer` or Dart Analysis Server,
 may choose to find the file in various different ways. Consult their
 documentation to learn more.
 
 Here is an example file that instructs the analyzer
 to ignore two files:
 
-```
+```yaml
 analyzer:
   exclude:
     - test/_data/p4/lib/lib1.dart
@@ -45,14 +45,14 @@
 
 Here is an example file that enables the analyzer's [strong mode][strongmode]:
 
-```
+```yaml
 analyzer:
   strong-mode: true
 ```
 
 Here is an example file that enables two lint rules:
 
-```
+```yaml
 linter:
   rules:
     - camel_case_types
@@ -64,7 +64,7 @@
 You can combine the `analyzer` section and the `linter` section into a single
 configuration. Here is an example:
 
-```
+```yaml
 analyzer:
   exclude:
     - test/_data/p4/lib/lib1.dart
@@ -77,17 +77,16 @@
 
 Many tools embed this library, such as:
 
-* dartfmt - a formatter for Dart code
-* dartdoc - a documentation generator for Dart code
-* Dart Analysis Server - a stateful server that supports IDEs and editors
+* [dartfmt] - a formatter for Dart code
+* [dartdoc] - a documentation generator for Dart code
+* [Dart Analysis Server][analysis_sever] - a stateful server that supports IDEs and editors
 
 ## Support
 
-Questions and requests for additional functionality are welcome.
-Please open an issue at
-[http://dartbug.com](http://dartbug.com)
-or by email
-[analyzer-discuss@dartlang.org][list].
+Post issues and feature requests at https://github.com/dart-lang/sdk/issues
+
+Questions and discussions are welcome at the
+[Dart Analyzer Discussion Group][list].
 
 ## Background
 
@@ -103,11 +102,15 @@
 
 ## License
 
-See the LICENSE file.
+See the [LICENSE] file.
 
-[serverapi]: http://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/doc/api.html
-[analyzercli]: https://github.com/dart-lang/analyzer_cli
+[serverapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/doc/api.html
+[analyzercli]: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli
 [list]: https://groups.google.com/a/dartlang.org/forum/#!forum/analyzer-discuss
 [lintrules]: http://dart-lang.github.io/linter/lints/
 [strongmode]: https://github.com/dart-lang/dev_compiler/blob/master/STRONG_MODE.md
 [glob]: https://pub.dartlang.org/packages/glob
+[LICENSE]: https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/LICENSE
+[dartfmt]: https://github.com/dart-lang/dart_style
+[dartdoc]: https://github.com/dart-lang/dartdoc
+[analysis_sever]: https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server
diff --git a/pkg/analyzer/benchmark/errors_in_all_libraries.dart b/pkg/analyzer/benchmark/errors_in_all_libraries.dart
new file mode 100644
index 0000000..0d68c2f
--- /dev/null
+++ b/pkg/analyzer/benchmark/errors_in_all_libraries.dart
@@ -0,0 +1,89 @@
+#!/usr/bin/env dart
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Resolves this library and everything it transitively imports and generates
+/// errors in all of those libraries. Does this in an infinite loop, starting
+/// from scratch each time, to show how VM warm-up affects things and to make
+/// it easier to connect to this with observatory.
+import 'dart:io';
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/java_io.dart';
+import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:path/path.dart' as p;
+
+void main(List<String> args) {
+  JavaSystemIO.setProperty(
+      "com.google.dart.sdk",
+      p.normalize(
+          p.join(p.dirname(p.fromUri(Platform.script)), "../../../sdk")));
+
+  // Assumes you have run "pub get" in the analyzer directory itself and uses
+  // that "packages" directory as its package root.
+  var packageRoot =
+      p.normalize(p.join(p.dirname(p.fromUri(Platform.script)), "packages"));
+
+  var best = new Duration(days: 1);
+  while (true) {
+    var start = new DateTime.now();
+    AnalysisEngine.instance.clearCaches();
+
+    var context = AnalysisEngine.instance.createAnalysisContext();
+    context.sourceFactory = new SourceFactory([
+      new DartUriResolver(DirectoryBasedDartSdk.defaultSdk),
+      new FileUriResolver(),
+      new PackageUriResolver([new JavaFile(packageRoot)])
+    ]);
+
+    AnalysisOptionsImpl options = context.analysisOptions;
+    options.strongMode = true;
+    options.strongModeHints = true;
+
+    var mainSource =
+        new FileBasedSource(new JavaFile(p.fromUri(Platform.script)));
+    context.applyChanges(new ChangeSet()..addedSource(mainSource));
+
+    var initialLibrary =
+        context.resolveCompilationUnit2(mainSource, mainSource);
+
+    // Walk all of the transitively referenced libraries and compute errors.
+    var errorCount = 0;
+    var allLibraries = _reachableLibraries(initialLibrary.element.library);
+    for (var lib in allLibraries) {
+      for (var unit in lib.units) {
+        var source = unit.source;
+
+        // Skip core libraries.
+        if (source.uri.scheme == 'dart') continue;
+
+        var librarySource = context.getLibrariesContaining(source).single;
+        context.resolveCompilationUnit2(source, librarySource);
+        errorCount += context.computeErrors(source).length;
+      }
+    }
+
+    var elapsed = new DateTime.now().difference(start);
+    print("$elapsed : $errorCount errors ${elapsed < best ? "(best)" : ""}");
+    if (elapsed < best) best = elapsed;
+  }
+}
+
+/// Returns all libraries transitively imported or exported from [start].
+List<LibraryElement> _reachableLibraries(LibraryElement start) {
+  var results = <LibraryElement>[];
+  var seen = new Set();
+  void find(LibraryElement lib) {
+    if (seen.contains(lib)) return;
+    seen.add(lib);
+    results.add(lib);
+    lib.importedLibraries.forEach(find);
+    lib.exportedLibraries.forEach(find);
+  }
+  find(start);
+  return results;
+}
diff --git a/pkg/analyzer/doc/support/dart.js b/pkg/analyzer/doc/support/dart.js
new file mode 100644
index 0000000..f8d686e
--- /dev/null
+++ b/pkg/analyzer/doc/support/dart.js
@@ -0,0 +1,32 @@
+// 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
new file mode 100644
index 0000000..0964121
--- /dev/null
+++ b/pkg/analyzer/doc/support/style.css
@@ -0,0 +1,29 @@
+*, *: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
new file mode 100644
index 0000000..488db0c
--- /dev/null
+++ b/pkg/analyzer/doc/support/viz.js
@@ -0,0 +1,1302 @@
+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
new file mode 100644
index 0000000..720a137
--- /dev/null
+++ b/pkg/analyzer/doc/support/web_app.dart.js
@@ -0,0 +1,4107 @@
+(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
new file mode 100644
index 0000000..2224724
--- /dev/null
+++ b/pkg/analyzer/doc/tasks.html
@@ -0,0 +1,340 @@
+<!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 [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
+  ComputePropagableVariableDependenciesTask -> PROPAGABLE_VARIABLE_DEPENDENCIES
+  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 -> ReadyLibraryElement6Task
+  EXPORTED_LIBRARIES [shape=box]
+  EXPORT_SOURCE_CLOSURE -> BuildExportNamespaceTask
+  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]
+  IMPORTED_LIBRARIES -> BuildDirectiveElementsTask
+  IMPORTED_LIBRARIES -> ReadyLibraryElement2Task
+  IMPORTED_LIBRARIES -> ReadyLibraryElement5Task
+  IMPORTED_LIBRARIES -> ReadyLibraryElement6Task
+  IMPORTED_LIBRARIES -> ResolveUnitTypeNamesTask
+  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
+  InferStaticVariableTypesInUnitTask -> CREATED_RESOLVED_UNIT8
+  InferStaticVariableTypesInUnitTask -> RESOLVED_UNIT8
+  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 -> ResolveLibraryTypeNamesTask
+  LIBRARY_ELEMENT4 -> ResolveUnitTypeNamesTask
+  LIBRARY_ELEMENT4 [shape=box]
+  LIBRARY_ELEMENT5 -> PartiallyResolveUnitReferencesTask
+  LIBRARY_ELEMENT5 -> PropagateVariableTypesInLibraryTask
+  LIBRARY_ELEMENT5 -> ReadyLibraryElement5Task
+  LIBRARY_ELEMENT5 -> ResolveInstanceFieldsInUnitTask
+  LIBRARY_ELEMENT5 [shape=box]
+  LIBRARY_ELEMENT6 -> PropagateVariableTypesInLibraryClosureTask
+  LIBRARY_ELEMENT6 -> ReadyLibraryElement6Task
+  LIBRARY_ELEMENT6 [shape=box]
+  LIBRARY_ELEMENT7 -> ResolveLibraryReferencesTask
+  LIBRARY_ELEMENT7 -> ResolveUnitTask
+  LIBRARY_ELEMENT7 [shape=box]
+  LIBRARY_ELEMENT8 -> EvaluateUnitConstantsTask
+  LIBRARY_ELEMENT8 -> ResolveLibraryTask
+  LIBRARY_ELEMENT8 [shape=box]
+  LIBRARY_ERRORS_READY [shape=box]
+  LIBRARY_SPECIFIC_UNITS -> GenerateHintsTask
+  LIBRARY_SPECIFIC_UNITS -> PropagateVariableTypesInLibraryTask
+  LIBRARY_SPECIFIC_UNITS -> ReadyResolvedUnitTask
+  LIBRARY_SPECIFIC_UNITS -> ResolveLibraryReferencesTask
+  LIBRARY_SPECIFIC_UNITS -> ResolveLibraryTypeNamesTask
+  LIBRARY_SPECIFIC_UNITS [shape=box]
+  LIBRARY_UNIT_ERRORS -> dartErrorsForUnit
+  LIBRARY_UNIT_ERRORS [shape=box]
+  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 -> ParseDartTask
+  MODIFICATION_TIME [shape=box]
+  PARSED_UNIT -> BuildCompilationUnitElementTask
+  PARSED_UNIT -> DartErrorsTask
+  PARSED_UNIT [shape=box]
+  PARSE_ERRORS -> dartErrorsForSource
+  PARSE_ERRORS [shape=box]
+  PROPAGABLE_VARIABLES_IN_UNIT -> PropagateVariableTypesInUnitTask
+  PROPAGABLE_VARIABLES_IN_UNIT [shape=box]
+  PROPAGABLE_VARIABLE_DEPENDENCIES -> PropagateVariableTypeTask
+  PROPAGABLE_VARIABLE_DEPENDENCIES [shape=box]
+  PROPAGATED_VARIABLE -> PropagateVariableTypeTask
+  PROPAGATED_VARIABLE -> PropagateVariableTypesInUnitTask
+  PROPAGATED_VARIABLE [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 -> SOURCE_KIND
+  ParseDartTask -> UNITS
+  PartiallyResolveUnitReferencesTask -> CREATED_RESOLVED_UNIT6
+  PartiallyResolveUnitReferencesTask -> INFERABLE_STATIC_VARIABLES_IN_UNIT
+  PartiallyResolveUnitReferencesTask -> PROPAGABLE_VARIABLES_IN_UNIT
+  PartiallyResolveUnitReferencesTask -> RESOLVED_UNIT6
+  PropagateVariableTypeTask -> PROPAGATED_VARIABLE
+  PropagateVariableTypesInLibraryClosureTask -> LIBRARY_ELEMENT7
+  PropagateVariableTypesInLibraryTask -> LIBRARY_ELEMENT6
+  PropagateVariableTypesInUnitTask -> CREATED_RESOLVED_UNIT7
+  PropagateVariableTypesInUnitTask -> RESOLVED_UNIT7
+  READY_LIBRARY_ELEMENT2 -> ComputeLibraryCycleTask
+  READY_LIBRARY_ELEMENT2 -> ReadyLibraryElement2Task
+  READY_LIBRARY_ELEMENT2 [shape=box]
+  READY_LIBRARY_ELEMENT5 -> PartiallyResolveUnitReferencesTask
+  READY_LIBRARY_ELEMENT5 -> ReadyLibraryElement5Task
+  READY_LIBRARY_ELEMENT5 [shape=box]
+  READY_LIBRARY_ELEMENT6 -> PropagateVariableTypesInLibraryClosureTask
+  READY_LIBRARY_ELEMENT6 -> ReadyLibraryElement6Task
+  READY_LIBRARY_ELEMENT6 [shape=box]
+  READY_RESOLVED_UNIT -> ResolveLibraryTask
+  READY_RESOLVED_UNIT -> VerifyUnitTask
+  READY_RESOLVED_UNIT [shape=box]
+  REFERENCED_NAMES [shape=box]
+  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 -> ResolveUnitTypeNamesTask
+  RESOLVED_UNIT3 [shape=box]
+  RESOLVED_UNIT4 -> ResolveLibraryTypeNamesTask
+  RESOLVED_UNIT4 -> ResolveVariableReferencesTask
+  RESOLVED_UNIT4 [shape=box]
+  RESOLVED_UNIT5 -> PartiallyResolveUnitReferencesTask
+  RESOLVED_UNIT5 [shape=box]
+  RESOLVED_UNIT6 -> ComputeInferableStaticVariableDependenciesTask
+  RESOLVED_UNIT6 -> ComputePropagableVariableDependenciesTask
+  RESOLVED_UNIT6 -> PropagateVariableTypeTask
+  RESOLVED_UNIT6 -> PropagateVariableTypesInUnitTask
+  RESOLVED_UNIT6 [shape=box]
+  RESOLVED_UNIT7 -> InferStaticVariableTypeTask
+  RESOLVED_UNIT7 -> InferStaticVariableTypesInUnitTask
+  RESOLVED_UNIT7 -> PropagateVariableTypesInLibraryTask
+  RESOLVED_UNIT7 [shape=box]
+  RESOLVED_UNIT8 -> ResolveInstanceFieldsInUnitTask
+  RESOLVED_UNIT8 [shape=box]
+  RESOLVED_UNIT9 -> InferInstanceMembersInUnitTask
+  RESOLVED_UNIT9 [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_ELEMENT5
+  ReadyLibraryElement6Task -> READY_LIBRARY_ELEMENT6
+  ReadyResolvedUnitTask -> READY_RESOLVED_UNIT
+  ResolveConstantExpressionTask -> CONSTANT_EXPRESSION_RESOLVED
+  ResolveDirectiveElementsTask -> CREATED_RESOLVED_UNIT2
+  ResolveDirectiveElementsTask -> RESOLVED_UNIT2
+  ResolveInstanceFieldsInUnitTask -> CREATED_RESOLVED_UNIT9
+  ResolveInstanceFieldsInUnitTask -> RESOLVED_UNIT9
+  ResolveLibraryReferencesTask -> LIBRARY_ELEMENT8
+  ResolveLibraryReferencesTask -> REFERENCED_NAMES
+  ResolveLibraryTask -> LIBRARY_ELEMENT
+  ResolveLibraryTypeNamesTask -> LIBRARY_ELEMENT5
+  ResolveUnitTask -> CONSTANT_EXPRESSIONS_DEPENDENCIES
+  ResolveUnitTask -> CREATED_RESOLVED_UNIT11
+  ResolveUnitTask -> RESOLVED_UNIT11
+  ResolveUnitTask -> RESOLVE_UNIT_ERRORS
+  ResolveUnitTypeNamesTask -> CREATED_RESOLVED_UNIT4
+  ResolveUnitTypeNamesTask -> RESOLVED_UNIT4
+  ResolveUnitTypeNamesTask -> RESOLVE_TYPE_NAMES_ERRORS
+  ResolveVariableReferencesTask -> CREATED_RESOLVED_UNIT5
+  ResolveVariableReferencesTask -> RESOLVED_UNIT5
+  ResolveVariableReferencesTask -> VARIABLE_REFERENCE_ERRORS
+  SCAN_ERRORS -> dartErrorsForSource
+  SCAN_ERRORS [shape=box]
+  SOURCE_KIND -> BuildDirectiveElementsTask
+  SOURCE_KIND [shape=box]
+  STRONG_MODE_ERRORS -> LibraryUnitErrorsTask
+  STRONG_MODE_ERRORS [shape=box]
+  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 -> PropagateVariableTypeTask
+  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/lib/analyzer.dart b/pkg/analyzer/lib/analyzer.dart
index fffb006..0454992 100644
--- a/pkg/analyzer/lib/analyzer.dart
+++ b/pkg/analyzer/lib/analyzer.dart
@@ -35,8 +35,7 @@
 /// parsed.
 CompilationUnit parseCompilationUnit(String contents,
     {String name, bool suppressErrors: false, bool parseFunctionBodies: true}) {
-  if (name == null) name = '<unknown source>';
-  var source = new StringSource(contents, name);
+  Source source = new StringSource(contents, name);
   return _parseSource(contents, source,
       suppressErrors: suppressErrors, parseFunctionBodies: parseFunctionBodies);
 }
@@ -78,7 +77,6 @@
 /// [suppressErrors] is `true`, in which case any errors are discarded.
 CompilationUnit parseDirectives(String contents,
     {String name, bool suppressErrors: false}) {
-  if (name == null) name = '<unknown source>';
   var source = new StringSource(contents, name);
   var errorCollector = new _ErrorCollector();
   var reader = new CharSequenceReader(contents);
diff --git a/pkg/analyzer/lib/context/declared_variables.dart b/pkg/analyzer/lib/context/declared_variables.dart
new file mode 100644
index 0000000..9a0322c
--- /dev/null
+++ b/pkg/analyzer/lib/context/declared_variables.dart
@@ -0,0 +1,88 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.context.declared_variables;
+
+import 'dart:collection';
+
+import 'package:analyzer/dart/constant/value.dart';
+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.
+ */
+class DeclaredVariables {
+  /**
+   * A table mapping the names of declared variables to their values.
+   */
+  HashMap<String, String> _declaredVariables = new HashMap<String, String>();
+
+  /**
+   * Define a variable with the given [name] to have the given [value].
+   */
+  void define(String name, String value) {
+    _declaredVariables[name] = value;
+  }
+
+  /**
+   * 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) {
+      return new DartObjectImpl(typeProvider.boolType, BoolState.UNKNOWN_VALUE);
+    }
+    if (value == "true") {
+      return new DartObjectImpl(typeProvider.boolType, BoolState.TRUE_STATE);
+    } else if (value == "false") {
+      return new DartObjectImpl(typeProvider.boolType, BoolState.FALSE_STATE);
+    }
+    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.
+   */
+  DartObject getInt(TypeProvider typeProvider, String name) {
+    String value = _declaredVariables[name];
+    if (value == null) {
+      return new DartObjectImpl(typeProvider.intType, IntState.UNKNOWN_VALUE);
+    }
+    int bigInteger;
+    try {
+      bigInteger = int.parse(value);
+    } on FormatException {
+      return new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE);
+    }
+    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'.
+   */
+  DartObject getString(TypeProvider typeProvider, String name) {
+    String value = _declaredVariables[name];
+    if (value == null) {
+      return new DartObjectImpl(
+          typeProvider.stringType, StringState.UNKNOWN_VALUE);
+    }
+    return new DartObjectImpl(typeProvider.stringType, new StringState(value));
+  }
+}
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index d0680c4..9e5bca2 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -536,7 +536,7 @@
    * (either AST nodes or tokens) that make up the contents of this node,
    * including doc comments but excluding other comments.
    */
-  Iterable/*<AstNode | Token>*/ get childEntities;
+  Iterable /* AstNode | Token */ get childEntities;
 
   /**
    * Return the offset of the character immediately following the last character
@@ -591,7 +591,7 @@
    * Use the given [visitor] to visit this node. Return the value returned by
    * the visitor as a result of visiting this node.
    */
-  dynamic /* =E */ accept/*<E>*/(AstVisitor/*<E>*/ visitor);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor);
 
   /**
    * Return the most immediate ancestor of this node for which the [predicate]
@@ -5899,7 +5899,8 @@
    * are added to the list will have their parent set to the given [owner]. The
    * list will initially be populated with the given [elements].
    */
-  factory NodeList(AstNode owner, [List<E> elements]) = NodeListImpl;
+  factory NodeList(AstNode owner, [List<E> elements]) =>
+      new NodeListImpl<E>(owner as AstNodeImpl, elements);
 
   /**
    * Return the first token included in this node list's source range, or `null`
@@ -6703,7 +6704,12 @@
   /**
    * Initialize a newly created identifier.
    */
-  factory SimpleIdentifier(Token token) = SimpleIdentifierImpl;
+  factory SimpleIdentifier(Token token, {bool isDeclaration: false}) {
+    if (isDeclaration) {
+      return new DeclaredSimpleIdentifier(token);
+    }
+    return new SimpleIdentifierImpl(token);
+  }
 
   /**
    * Return the auxiliary elements associated with this identifier, or `null` if
diff --git a/pkg/analyzer/lib/dart/ast/visitor.dart b/pkg/analyzer/lib/dart/ast/visitor.dart
index f76fb1d..989e7c6 100644
--- a/pkg/analyzer/lib/dart/ast/visitor.dart
+++ b/pkg/analyzer/lib/dart/ast/visitor.dart
@@ -2327,6 +2327,893 @@
 }
 
 /**
+ * An AST Visitor that captures visit call timings.
+ */
+class TimedAstVisitor<T> implements AstVisitor<T> {
+  /**
+   * The base visitor whose visit methods will be timed.
+   */
+  final AstVisitor<T> _baseVisitor;
+
+  /**
+   * Collects elapsed time for visit calls.
+   */
+  final Stopwatch stopwatch;
+
+  /**
+   * Initialize a newly created visitor to time calls to the given base
+   * visitor's visits.
+   */
+  TimedAstVisitor(this._baseVisitor, [Stopwatch watch])
+      : stopwatch = watch ?? new Stopwatch();
+
+  @override
+  T visitAdjacentStrings(AdjacentStrings node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitAdjacentStrings(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitAnnotation(Annotation node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitAnnotation(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitArgumentList(ArgumentList node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitArgumentList(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitAsExpression(AsExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitAsExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitAssertStatement(AssertStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitAssertStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitAssignmentExpression(AssignmentExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitAssignmentExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitAwaitExpression(AwaitExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitAwaitExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitBinaryExpression(BinaryExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitBinaryExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitBlock(Block node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitBlock(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitBlockFunctionBody(BlockFunctionBody node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitBlockFunctionBody(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitBooleanLiteral(BooleanLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitBooleanLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitBreakStatement(BreakStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitBreakStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitCascadeExpression(CascadeExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitCascadeExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitCatchClause(CatchClause node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitCatchClause(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitClassDeclaration(ClassDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitClassDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitClassTypeAlias(ClassTypeAlias node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitClassTypeAlias(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitComment(Comment node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitComment(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitCommentReference(CommentReference node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitCommentReference(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitCompilationUnit(CompilationUnit node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitCompilationUnit(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitConditionalExpression(ConditionalExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitConditionalExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitConfiguration(Configuration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitConfiguration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitConstructorDeclaration(ConstructorDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitConstructorDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitConstructorFieldInitializer(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitConstructorName(ConstructorName node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitConstructorName(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitContinueStatement(ContinueStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitContinueStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitDeclaredIdentifier(DeclaredIdentifier node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitDeclaredIdentifier(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitDefaultFormalParameter(DefaultFormalParameter node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitDefaultFormalParameter(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitDoStatement(DoStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitDoStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitDottedName(DottedName node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitDottedName(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitDoubleLiteral(DoubleLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitDoubleLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitEmptyFunctionBody(EmptyFunctionBody node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitEmptyFunctionBody(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitEmptyStatement(EmptyStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitEmptyStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitEnumConstantDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitEnumDeclaration(EnumDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitEnumDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitExportDirective(ExportDirective node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitExportDirective(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitExpressionFunctionBody(ExpressionFunctionBody node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitExpressionFunctionBody(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitExpressionStatement(ExpressionStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitExpressionStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitExtendsClause(ExtendsClause node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitExtendsClause(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFieldDeclaration(FieldDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFieldDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFieldFormalParameter(FieldFormalParameter node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFieldFormalParameter(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitForEachStatement(ForEachStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitForEachStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFormalParameterList(FormalParameterList node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFormalParameterList(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitForStatement(ForStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitForStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFunctionDeclaration(FunctionDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFunctionDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFunctionDeclarationStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFunctionExpression(FunctionExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFunctionExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFunctionExpressionInvocation(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFunctionTypeAlias(FunctionTypeAlias node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFunctionTypeAlias(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitFunctionTypedFormalParameter(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitHideCombinator(HideCombinator node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitHideCombinator(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitIfStatement(IfStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitIfStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitImplementsClause(ImplementsClause node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitImplementsClause(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitImportDirective(ImportDirective node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitImportDirective(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitIndexExpression(IndexExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitIndexExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitInstanceCreationExpression(InstanceCreationExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitInstanceCreationExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitIntegerLiteral(IntegerLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitIntegerLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitInterpolationExpression(InterpolationExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitInterpolationExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitInterpolationString(InterpolationString node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitInterpolationString(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitIsExpression(IsExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitIsExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitLabel(Label node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitLabel(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitLabeledStatement(LabeledStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitLabeledStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitLibraryDirective(LibraryDirective node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitLibraryDirective(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitLibraryIdentifier(LibraryIdentifier node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitLibraryIdentifier(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitListLiteral(ListLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitListLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitMapLiteral(MapLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitMapLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitMapLiteralEntry(MapLiteralEntry node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitMapLiteralEntry(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitMethodDeclaration(MethodDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitMethodDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitMethodInvocation(MethodInvocation node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitMethodInvocation(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitNamedExpression(NamedExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitNamedExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitNativeClause(NativeClause node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitNativeClause(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitNativeFunctionBody(NativeFunctionBody node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitNativeFunctionBody(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitNullLiteral(NullLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitNullLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitParenthesizedExpression(ParenthesizedExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitParenthesizedExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitPartDirective(PartDirective node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitPartDirective(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitPartOfDirective(PartOfDirective node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitPartOfDirective(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitPostfixExpression(PostfixExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitPostfixExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitPrefixedIdentifier(PrefixedIdentifier node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitPrefixedIdentifier(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitPrefixExpression(PrefixExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitPrefixExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitPropertyAccess(PropertyAccess node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitPropertyAccess(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitRedirectingConstructorInvocation(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitRethrowExpression(RethrowExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitRethrowExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitReturnStatement(ReturnStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitReturnStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitScriptTag(ScriptTag node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitScriptTag(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitShowCombinator(ShowCombinator node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitShowCombinator(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSimpleFormalParameter(SimpleFormalParameter node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSimpleFormalParameter(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSimpleIdentifier(SimpleIdentifier node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSimpleIdentifier(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSimpleStringLiteral(SimpleStringLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSimpleStringLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitStringInterpolation(StringInterpolation node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitStringInterpolation(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSuperConstructorInvocation(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSuperExpression(SuperExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSuperExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSwitchCase(SwitchCase node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSwitchCase(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSwitchDefault(SwitchDefault node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSwitchDefault(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSwitchStatement(SwitchStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSwitchStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitSymbolLiteral(SymbolLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSymbolLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitThisExpression(ThisExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitThisExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitThrowExpression(ThrowExpression node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitThrowExpression(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitTopLevelVariableDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitTryStatement(TryStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitTryStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitTypeArgumentList(TypeArgumentList node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitTypeArgumentList(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitTypeName(TypeName node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitTypeName(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitTypeParameter(TypeParameter node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitTypeParameter(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitTypeParameterList(TypeParameterList node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitTypeParameterList(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitVariableDeclaration(VariableDeclaration node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitVariableDeclaration(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitVariableDeclarationList(VariableDeclarationList node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitVariableDeclarationList(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitVariableDeclarationStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitWhileStatement(WhileStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitWhileStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitWithClause(WithClause node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitWithClause(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitYieldStatement(YieldStatement node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitYieldStatement(node);
+    stopwatch.stop();
+    return result;
+  }
+}
+
+/**
  * 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.
diff --git a/pkg/analyzer/lib/dart/constant/value.dart b/pkg/analyzer/lib/dart/constant/value.dart
new file mode 100644
index 0000000..e268345
--- /dev/null
+++ b/pkg/analyzer/lib/dart/constant/value.dart
@@ -0,0 +1,159 @@
+// 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.
+
+/**
+ * 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).
+ */
+library analyzer.dart.constant.value;
+
+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.
+ */
+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`.
+   */
+  bool get hasKnownValue;
+
+  /**
+   * 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].
+   */
+  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.
+   */
+  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`.
+   */
+  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`.
+   */
+  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`.
+   */
+  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`.
+   */
+  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`.
+   */
+  Map<DartObject, DartObject> toMapValue();
+
+  /**
+   * 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
+   */
+  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`.
+   */
+  DartType toTypeValue();
+}
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index e89eb22..a320b8d 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -37,8 +37,8 @@
 library analyzer.dart.element.element;
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/generated/constant.dart' show DartObject;
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
@@ -624,6 +624,11 @@
   bool get isDeprecated;
 
   /**
+   * Return `true` if this element has an annotation of the form '@JS(..)'.
+   */
+  bool get isJS;
+
+  /**
    * Return `true` if this element has an annotation of the form '@override'.
    */
   bool get isOverride;
@@ -646,6 +651,11 @@
   bool get isPublic;
 
   /**
+   * Return `true` if this element has an annotation of the form '@required'.
+   */
+  bool get isRequired;
+
+  /**
    * Return `true` if this element is synthetic. A synthetic element is an
    * element that is not represented in the source code explicitly, but is
    * implied by the source code, such as the default constructor for a class
@@ -808,12 +818,23 @@
   bool get isDeprecated;
 
   /**
+   * Return `true` if this annotation marks the associated element with the `JS`
+   * annotation.
+   */
+  bool get isJS;
+
+  /**
+   * 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 method as being
    * expected to override an inherited method.
    */
   bool get isOverride;
 
-
   /**
    * Return `true` if this annotation marks the associated member as being
    * protected.
@@ -825,6 +846,12 @@
    * a proxy object.
    */
   bool get isProxy;
+
+  /**
+   * Return `true` if this annotation marks the associated member as being
+   * required.
+   */
+  bool get isRequired;
 }
 
 /**
@@ -1325,12 +1352,6 @@
   static const List<LibraryElement> EMPTY_LIST = const <LibraryElement>[];
 
   /**
-   * Return a list containing the strongly connected component in the
-   * import/export graph in which the current library resides.
-   */
-  List<LibraryElement> get libraryCycle;
-
-  /**
    * Return the compilation unit that defines this library.
    */
   CompilationUnitElement get definingCompilationUnit;
@@ -1412,6 +1433,12 @@
   bool get isInSdk;
 
   /**
+   * Return a list containing the strongly connected component in the
+   * import/export graph in which the current library resides.
+   */
+  List<LibraryElement> get libraryCycle;
+
+  /**
    * Return the element representing the synthetic function `loadLibrary` that
    * is implicitly defined for this library if the library is imported using a
    * deferred import.
diff --git a/pkg/analyzer/lib/dart/element/type.dart b/pkg/analyzer/lib/dart/element/type.dart
index 3ff2ce8..11c97e8 100644
--- a/pkg/analyzer/lib/dart/element/type.dart
+++ b/pkg/analyzer/lib/dart/element/type.dart
@@ -132,6 +132,15 @@
   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.
+   */
+  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:
@@ -150,15 +159,6 @@
    */
   DartType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes);
-
-  /**
-   * 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);
 }
 
 /**
@@ -242,10 +242,7 @@
    */
   List<TypeParameterElement> get typeFormals;
 
-  /**
-   * Return the type resulting from instantiating (replacing) the given
-   * [argumentTypes] for this function's bound type parameters.
-   */
+  @override
   FunctionType instantiate(List<DartType> argumentTypes);
 
   /**
@@ -401,6 +398,9 @@
    */
   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
@@ -633,12 +633,7 @@
    * type's parameters. This is fully equivalent to `substitute2(argumentTypes,
    * getTypeArguments())`.
    */
-  // TODO(jmesserly): introduce a new "instantiate" and deprecate this.
-  // The new "instantiate" should work similar to FunctionType.instantiate,
-  // which uses [typeFormals] to model type parameters that haven't been
-  // filled in yet. Those are kept separate from already-substituted type
-  // parameters or free variables from the enclosing scopes, which allows nested
-  // generics to work, such as a generic method in a generic class.
+  @deprecated // use instantiate
   InterfaceType substitute4(List<DartType> argumentTypes);
 
   /**
@@ -665,7 +660,7 @@
  * 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`.
+ * we ask for the field type we will get `S`.
  *
  * Clients may not extend, implement or mix-in this class.
  */
@@ -684,6 +679,12 @@
    * 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.
+   */
+  ParameterizedType instantiate(List<DartType> argumentTypes);
 }
 
 /**
diff --git a/pkg/analyzer/lib/file_system/file_system.dart b/pkg/analyzer/lib/file_system/file_system.dart
index c9b3e96..ba2bf4b 100644
--- a/pkg/analyzer/lib/file_system/file_system.dart
+++ b/pkg/analyzer/lib/file_system/file_system.dart
@@ -32,10 +32,33 @@
   Source createSource([Uri uri]);
 
   /**
+   * Synchronously read the entire file contents as a list of bytes.
+   * Throws a [FileSystemException] if the operation fails.
+   */
+  List<int> readAsBytesSync();
+
+  /**
    * Synchronously read the entire file contents as a [String].
    * Throws [FileSystemException] if the file does not exist.
    */
   String readAsStringSync();
+
+  /**
+   * Synchronously rename this file.
+   * Return a [File] instance for the renamed file.
+   *
+   * If [newPath] identifies an existing file, that file is replaced.
+   * If [newPath] identifies an existing resource the operation might fail and
+   * an exception is thrown.
+   */
+  File renameSync(String newPath);
+
+  /**
+   * Synchronously write a list of bytes to the file.
+   *
+   * Throws a [FileSystemException] if the operation fails.
+   */
+  void writeAsBytesSync(List<int> bytes);
 }
 
 /**
@@ -63,7 +86,7 @@
 
   /**
    * If the path [path] is a relative path, convert it to an absolute path
-   * by interpreting it relative to this folder.  If it is already an aboslute
+   * by interpreting it relative to this folder.  If it is already an absolute
    * path, then don't change it.
    *
    * However, regardless of whether [path] is relative or absolute, normalize
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index fd26eb1..5035b93 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -23,6 +23,7 @@
   final Map<String, _MemoryResource> _pathToResource =
       new HashMap<String, _MemoryResource>();
   final Map<String, String> _pathToContent = new HashMap<String, String>();
+  final Map<String, List<int>> _pathToBytes = new HashMap<String, List<int>>();
   final Map<String, int> _pathToTimestamp = new HashMap<String, int>();
   final Map<String, List<StreamController<WatchEvent>>> _pathToWatchers =
       new HashMap<String, List<StreamController<WatchEvent>>>();
@@ -116,16 +117,18 @@
 
   File newFile(String path, String content, [int stamp]) {
     path = pathContext.normalize(path);
-    _MemoryResource folder = _pathToResource[pathContext.dirname(path)];
-    if (folder == null) {
-      newFolder(pathContext.dirname(path));
-    } else if (folder is! Folder) {
-      throw new ArgumentError('Cannot create file ($path) as child of file');
-    }
-    _MemoryFile file = new _MemoryFile(this, path);
-    _pathToResource[path] = file;
+    _MemoryFile file = _newFile(path);
     _pathToContent[path] = content;
-    _pathToTimestamp[path] = stamp != null ? stamp : nextStamp++;
+    _pathToTimestamp[path] = stamp ?? nextStamp++;
+    _notifyWatchers(path, ChangeType.ADD);
+    return file;
+  }
+
+  File newFileWithBytes(String path, List<int> bytes, [int stamp]) {
+    path = pathContext.normalize(path);
+    _MemoryFile file = _newFile(path);
+    _pathToBytes[path] = bytes;
+    _pathToTimestamp[path] = stamp ?? nextStamp++;
     _notifyWatchers(path, ChangeType.ADD);
     return file;
   }
@@ -156,6 +159,29 @@
     }
   }
 
+  _MemoryFile renameFileSync(_MemoryFile file, String newPath) {
+    String path = file.path;
+    if (newPath == path) {
+      return file;
+    }
+    _MemoryResource existingNewResource = _pathToResource[newPath];
+    if (existingNewResource is _MemoryFolder) {
+      throw new FileSystemException(
+          path, 'Could not be renamed: $newPath is a folder.');
+    }
+    _MemoryFile newFile = _newFile(newPath);
+    _pathToResource.remove(path);
+    _pathToContent[newPath] = _pathToContent.remove(path);
+    _pathToBytes[newPath] = _pathToBytes.remove(path);
+    _pathToTimestamp[newPath] = _pathToTimestamp.remove(path);
+    if (existingNewResource != null) {
+      _notifyWatchers(newPath, ChangeType.REMOVE);
+    }
+    _notifyWatchers(path, ChangeType.REMOVE);
+    _notifyWatchers(newPath, ChangeType.ADD);
+    return newFile;
+  }
+
   File updateFile(String path, String content, [int stamp]) {
     path = pathContext.normalize(path);
     newFolder(pathContext.dirname(path));
@@ -183,6 +209,22 @@
     }
   }
 
+  /**
+   * Create a new [_MemoryFile] without any content.
+   */
+  _MemoryFile _newFile(String path) {
+    String folderPath = pathContext.dirname(path);
+    _MemoryResource folder = _pathToResource[folderPath];
+    if (folder == null) {
+      newFolder(folderPath);
+    } else if (folder is! Folder) {
+      throw new ArgumentError('Cannot create file ($path) as child of file');
+    }
+    _MemoryFile file = new _MemoryFile(this, path);
+    _pathToResource[path] = file;
+    return file;
+  }
+
   void _notifyWatchers(String path, ChangeType changeType) {
     _pathToWatchers.forEach((String watcherPath,
         List<StreamController<WatchEvent>> streamControllers) {
@@ -194,6 +236,14 @@
       }
     });
   }
+
+  void _setFileBytes(_MemoryFile file, List<int> bytes) {
+    String path = file.path;
+    _pathToResource[path] = file;
+    _pathToBytes[path] = bytes;
+    _pathToTimestamp[path] = nextStamp++;
+    _notifyWatchers(path, ChangeType.MODIFY);
+  }
 }
 
 /**
@@ -236,9 +286,24 @@
   }
 
   @override
+  List<int> readAsBytesSync() {
+    throw new FileSystemException(path, 'File could not be read');
+  }
+
+  @override
   String readAsStringSync() {
     throw new FileSystemException(path, 'File could not be read');
   }
+
+  @override
+  File renameSync(String newPath) {
+    throw new FileSystemException(path, 'File could not be renamed');
+  }
+
+  @override
+  void writeAsBytesSync(List<int> bytes) {
+    throw new FileSystemException(path, 'File could not be written');
+  }
 }
 
 /**
@@ -282,6 +347,15 @@
   }
 
   @override
+  List<int> readAsBytesSync() {
+    List<int> bytes = _provider._pathToBytes[path];
+    if (bytes == null) {
+      throw new FileSystemException(path, 'File "$path" is not binary.');
+    }
+    return bytes;
+  }
+
+  @override
   String readAsStringSync() {
     String content = _provider._pathToContent[path];
     if (content == null) {
@@ -289,6 +363,16 @@
     }
     return content;
   }
+
+  @override
+  File renameSync(String newPath) {
+    return _provider.renameFileSync(this, newPath);
+  }
+
+  @override
+  void writeAsBytesSync(List<int> bytes) {
+    _provider._setFileBytes(this, bytes);
+  }
 }
 
 /**
@@ -372,17 +456,6 @@
   bool exists() => file.exists;
 
   @override
-  Uri resolveRelativeUri(Uri relativeUri) {
-    Uri baseUri = uri;
-    String scheme = uri.scheme;
-    if (scheme == DartUriResolver.DART_SCHEME) {
-      String libraryName = uri.path;
-      baseUri = Uri.parse('$scheme:$libraryName/$libraryName.dart');
-    }
-    return baseUri.resolveUri(relativeUri);
-  }
-
-  @override
   String toString() => file.toString();
 }
 
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index cdfa9a6..e259f75 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -19,8 +19,8 @@
  * A `dart:io` based implementation of [ResourceProvider].
  */
 class PhysicalResourceProvider implements ResourceProvider {
-  static final NORMALIZE_EOL_ALWAYS = (String string) =>
-      string.replaceAll(new RegExp('\r\n?'), '\n');
+  static final NORMALIZE_EOL_ALWAYS =
+      (String string) => string.replaceAll(new RegExp('\r\n?'), '\n');
 
   static final PhysicalResourceProvider INSTANCE =
       new PhysicalResourceProvider(null);
@@ -112,6 +112,16 @@
   }
 
   @override
+  List<int> readAsBytesSync() {
+    try {
+      io.File file = _entry as io.File;
+      return file.readAsBytesSync();
+    } on io.FileSystemException catch (exception) {
+      throw new FileSystemException(exception.path, exception.message);
+    }
+  }
+
+  @override
   String readAsStringSync() {
     try {
       io.File file = _entry as io.File;
@@ -120,6 +130,27 @@
       throw new FileSystemException(exception.path, exception.message);
     }
   }
+
+  @override
+  File renameSync(String newPath) {
+    try {
+      io.File file = _entry as io.File;
+      io.File newFile = file.renameSync(newPath);
+      return new _PhysicalFile(newFile);
+    } on io.FileSystemException catch (exception) {
+      throw new FileSystemException(exception.path, exception.message);
+    }
+  }
+
+  @override
+  void writeAsBytesSync(List<int> bytes) {
+    try {
+      io.File file = _entry as io.File;
+      file.writeAsBytesSync(bytes);
+    } on io.FileSystemException catch (exception) {
+      throw new FileSystemException(exception.path, exception.message);
+    }
+  }
 }
 
 /**
diff --git a/pkg/analyzer/lib/source/analysis_options_provider.dart b/pkg/analyzer/lib/source/analysis_options_provider.dart
index c53bbad..3e15c64 100644
--- a/pkg/analyzer/lib/source/analysis_options_provider.dart
+++ b/pkg/analyzer/lib/source/analysis_options_provider.dart
@@ -4,6 +4,8 @@
 
 library analyzer.source.analysis_options_provider;
 
+import 'dart:core' hide Resource;
+
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/util/yaml.dart';
@@ -14,10 +16,16 @@
 class AnalysisOptionsProvider {
   /// Provide the options found in [root]/[ANALYSIS_OPTIONS_FILE].
   /// Return an empty options map if the file does not exist.
-  Map<String, YamlNode> getOptions(Folder root) {
-    var optionsSource = _readAnalysisOptionsFile(
-        root.getChild(AnalysisEngine.ANALYSIS_OPTIONS_FILE));
-    return getOptionsFromString(optionsSource);
+  Map<String, YamlNode> getOptions(Folder root, {bool crawlUp: false}) {
+    Resource resource;
+    for (Folder folder = root; folder != null; folder = folder.parent) {
+      resource = folder.getChild(AnalysisEngine.ANALYSIS_OPTIONS_FILE);
+      if (resource.exists || !crawlUp) {
+        break;
+      }
+    }
+    String optionsText = _readAnalysisOptionsFile(resource);
+    return getOptionsFromString(optionsText);
   }
 
   /// Provide the options found in [file].
@@ -68,7 +76,7 @@
         if (v != null && v is! YamlNode) {
           throw new OptionsFormatException(
               'Bad options file format (expected Node value, '
-                  'got ${v.runtimeType}: `${v.toString()}`)',
+              'got ${v.runtimeType}: `${v.toString()}`)',
               doc.span);
         }
         options[key] = v;
@@ -91,7 +99,7 @@
   ///
   Map<String, YamlNode> merge(
           Map<String, YamlNode> defaults, Map<String, YamlNode> overrides) =>
-      new Merger().merge(defaults, overrides);
+      new Merger().merge(defaults, overrides) as Map<String, YamlNode>;
 
   /// Read the contents of [file] as a string.
   /// Returns null if file does not exist.
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index bbc6659..b55f5d9 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -40,7 +40,7 @@
   @override
   AnalysisContext get context {
     if (_analysisContext == null) {
-      _analysisContext = new SdkAnalysisContext();
+      _analysisContext = new SdkAnalysisContext(null);
       SourceFactory factory = new SourceFactory([_resolver]);
       _analysisContext.sourceFactory = factory;
       List<String> uris = this.uris;
diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart
index 8e369aa..ddd0679 100644
--- a/pkg/analyzer/lib/source/error_processor.dart
+++ b/pkg/analyzer/lib/source/error_processor.dart
@@ -10,6 +10,13 @@
 import 'package:analyzer/src/task/options.dart';
 import 'package:yaml/yaml.dart';
 
+/// String identifiers mapped to associated severities.
+const Map<String, ErrorSeverity> severityMap = const {
+  'error': ErrorSeverity.ERROR,
+  'info': ErrorSeverity.INFO,
+  'warning': ErrorSeverity.WARNING
+};
+
 /// Error processor configuration derived from analysis (or embedder) options.
 class ErrorConfig {
   /// The processors in this config.
@@ -57,13 +64,6 @@
   ErrorSeverity _toSeverity(String severity) => severityMap[severity];
 }
 
-/// String identifiers mapped to associated severities.
-const Map<String, ErrorSeverity> severityMap = const {
-  'error': ErrorSeverity.ERROR,
-  'info': ErrorSeverity.INFO,
-  'warning': ErrorSeverity.WARNING
-};
-
 /// Process errors by filtering or changing associated [ErrorSeverity].
 class ErrorProcessor {
   /// The code name of the associated error.
@@ -93,9 +93,35 @@
     if (context == null) {
       return null;
     }
+
+    // Let the user configure how specific errors are processed.
     List<ErrorProcessor> processors =
-        context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
+        context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS)
+        as List<ErrorProcessor>;
+
+    // Give strong mode a chance to upgrade it.
+    if (context.analysisOptions.strongMode) {
+      processors = processors.toList();
+      processors.add(_StrongModeTypeErrorProcessor.instance);
+    }
     return processors.firstWhere((ErrorProcessor p) => p.appliesTo(error),
         orElse: () => null);
   }
 }
+
+/// In strong mode, this upgrades static type warnings to errors.
+class _StrongModeTypeErrorProcessor implements ErrorProcessor {
+  static final instance = new _StrongModeTypeErrorProcessor();
+
+  // TODO(rnystrom): As far as I know, this is only used to implement
+  // appliesTo(). Consider making it private in ErrorProcessor if possible.
+  String get code => throw new UnsupportedError(
+      "_StrongModeTypeErrorProcessor is not specific to an error code.");
+
+  /// In strong mode, type warnings are upgraded to errors.
+  ErrorSeverity get severity => ErrorSeverity.ERROR;
+
+  /// Check if this processor applies to the given [error].
+  bool appliesTo(AnalysisError error) =>
+      error.errorCode.type == ErrorType.STATIC_TYPE_WARNING;
+}
diff --git a/pkg/analyzer/lib/source/sdk_ext.dart b/pkg/analyzer/lib/source/sdk_ext.dart
index fc7155a..126d3b6 100644
--- a/pkg/analyzer/lib/source/sdk_ext.dart
+++ b/pkg/analyzer/lib/source/sdk_ext.dart
@@ -155,7 +155,7 @@
   /// Read the contents of [libDir]/[SDK_EXT_NAME] as a string.
   /// Returns null if the file doesn't exist.
   String _readDotSdkExt(Folder libDir) {
-    var file = libDir.getChild(SDK_EXT_NAME);
+    File file = libDir.getChild(SDK_EXT_NAME);
     try {
       return file.readAsStringSync();
     } on FileSystemException {
diff --git a/pkg/analyzer/lib/src/cancelable_future.dart b/pkg/analyzer/lib/src/cancelable_future.dart
index 8ae070b..803137d 100644
--- a/pkg/analyzer/lib/src/cancelable_future.dart
+++ b/pkg/analyzer/lib/src/cancelable_future.dart
@@ -252,11 +252,11 @@
       _completer._outerCompleter.future.catchError(onError, test: test);
 
   @override
-  Future then(onValue(T value), {Function onError}) =>
+  Future/*<S>*/ then/*<S>*/(/*=S*/ onValue(T value), {Function onError}) =>
       _completer._outerCompleter.future.then(onValue, onError: onError);
 
   @override
-  Future timeout(Duration timeLimit, {onTimeout()}) {
+  Future<T> timeout(Duration timeLimit, {onTimeout()}) {
     // TODO(paulberry): Implement this in such a way that a timeout cancels
     // the future.
     return _completer._outerCompleter.future
@@ -288,11 +288,11 @@
       _future.catchError(onError, test: test);
 
   @override
-  Future then(onValue(value), {Function onError}) =>
+  Future/*<S>*/ then/*<S>*/(/*=S*/ onValue(T value), {Function onError}) =>
       _future.then(onValue, onError: onError);
 
   @override
-  Future timeout(Duration timeLimit, {onTimeout()}) =>
+  Future<T> timeout(Duration timeLimit, {onTimeout()}) =>
       _future.timeout(timeLimit, onTimeout: onTimeout);
 
   @override
diff --git a/pkg/analyzer/lib/src/codegen/tools.dart b/pkg/analyzer/lib/src/codegen/tools.dart
index dd6ee41..cccab10 100644
--- a/pkg/analyzer/lib/src/codegen/tools.dart
+++ b/pkg/analyzer/lib/src/codegen/tools.dart
@@ -99,14 +99,16 @@
    */
   void docComment(List<dom.Node> docs, {bool removeTrailingNewLine: false}) {
     if (containsOnlyWhitespace(docs)) return;
-    if (codeGeneratorSettings.docCommentStartMarker != null) writeln(codeGeneratorSettings.docCommentStartMarker);
+    if (codeGeneratorSettings.docCommentStartMarker != null)
+      writeln(codeGeneratorSettings.docCommentStartMarker);
     int width = codeGeneratorSettings.commentLineLength;
     bool javadocStyle = codeGeneratorSettings.languageName == 'java';
     indentBy(codeGeneratorSettings.docCommentLineLeader, () {
       write(nodesToText(docs, width - _state.indent.length, javadocStyle,
           removeTrailingNewLine: removeTrailingNewLine));
     });
-    if (codeGeneratorSettings.docCommentEndMarker != null) writeln(codeGeneratorSettings.docCommentEndMarker);
+    if (codeGeneratorSettings.docCommentEndMarker != null)
+      writeln(codeGeneratorSettings.docCommentEndMarker);
   }
 
   /**
@@ -509,7 +511,8 @@
    * Execute [callback], wrapping its output in an element with the given
    * [name] and [attributes].
    */
-  void element(String name, Map<String, String> attributes, [void callback()]) {
+  void element(String name, Map<dynamic, String> attributes,
+      [void callback()]) {
     add(makeElement(name, attributes, collectHtml(callback)));
   }
 
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index bbb0e69..8be0a41 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -173,12 +173,13 @@
    * It does not update the cache, if the corresponding [CacheEntry] does not
    * exist, then the default value is returned.
    */
-  Object getValue(AnalysisTarget target, ResultDescriptor result) {
+  Object/*=V*/ getValue/*<V>*/(
+      AnalysisTarget target, ResultDescriptor/*<V>*/ result) {
     CacheEntry entry = get(target);
     if (entry == null) {
       return result.defaultValue;
     }
-    return entry.getValue(result);
+    return entry.getValue(result) as Object/*=V*/;
   }
 
   /**
@@ -405,7 +406,7 @@
     if (_partition != null) {
       _partition.resultAccessed(target, descriptor);
     }
-    return data.value;
+    return data.value as Object/*=V*/;
   }
 
   /**
@@ -565,7 +566,8 @@
     // Ask the delta to validate.
     DeltaResult deltaResult = null;
     if (delta != null) {
-      deltaResult = delta.validate(_partition.context, target, descriptor);
+      deltaResult = delta.validate(
+          _partition.context, target, descriptor, thisData.value);
       if (deltaResult == DeltaResult.STOP) {
         return;
       }
@@ -1056,10 +1058,10 @@
 
   /**
    * Check whether this delta affects the result described by the given
-   * [descriptor] and [target].
+   * [descriptor] and [target]. The current [value] of the result is provided.
    */
   DeltaResult validate(InternalAnalysisContext context, AnalysisTarget target,
-      ResultDescriptor descriptor) {
+      ResultDescriptor descriptor, Object value) {
     return DeltaResult.INVALIDATE;
   }
 }
@@ -1095,7 +1097,7 @@
 /**
  * [InvalidatedResult] describes an invalidated result.
  */
-class InvalidatedResult {
+class InvalidatedResult<V> {
   /**
    * The target in which the result was invalidated.
    */
@@ -1104,12 +1106,13 @@
   /**
    * The descriptor of the result which was invalidated.
    */
-  final ResultDescriptor descriptor;
+  final ResultDescriptor<V> descriptor;
 
   /**
-   * The value of the result which was invalidated.
+   * The value of the result before it was invalidated, may be the default
+   * value if the result was flushed.
    */
-  final Object value;
+  final V value;
 
   InvalidatedResult(this.entry, this.descriptor, this.value);
 
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index def719f..1603fac 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -194,6 +194,13 @@
   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.
    */
@@ -281,6 +288,7 @@
     this._options.enableConditionalDirectives =
         options.enableConditionalDirectives;
     this._options.enableSuperMixins = options.enableSuperMixins;
+    this._options.enableTiming = options.enableTiming;
     this._options.hint = options.hint;
     this._options.incremental = options.incremental;
     this._options.incrementalApi = options.incrementalApi;
@@ -682,10 +690,19 @@
     if (sdk == null) {
       return new AnalysisCache(<CachePartition>[_privatePartition]);
     }
-    return new AnalysisCache(<CachePartition>[
+    AnalysisCache cache = new AnalysisCache(<CachePartition>[
       AnalysisEngine.instance.partitionManager.forSdk(sdk),
       _privatePartition
     ]);
+    cache.onResultInvalidated.listen((InvalidatedResult 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;
   }
 
   /**
@@ -816,8 +833,8 @@
   }
 
   @override
-  Object getConfigurationData(ResultDescriptor key) =>
-      _configurationData[key] ?? key?.defaultValue;
+  Object/*=V*/ getConfigurationData/*<V>*/(ResultDescriptor/*<V>*/ key) =>
+      (_configurationData[key] ?? key?.defaultValue) as Object/*=V*/;
 
   @override
   TimestampedData<String> getContents(Source source) {
@@ -1003,8 +1020,9 @@
   }
 
   @override
-  Object getResult(AnalysisTarget target, ResultDescriptor result) {
-    return _cache.getValue(target, result);
+  Object/*=V*/ getResult/*<V>*/(
+      AnalysisTarget target, ResultDescriptor/*<V>*/ result) {
+    return _cache.getValue(target, result) as Object/*=V*/;
   }
 
   @override
@@ -1048,7 +1066,8 @@
       // If not the same content (e.g. the file is being closed without save),
       // then force analysis.
       if (changed) {
-        if (!analysisOptions.incremental ||
+        if (newContents == null ||
+            !analysisOptions.incremental ||
             !_tryPoorMansIncrementalResolution(source, newContents)) {
           _sourceChanged(source);
         }
@@ -1099,8 +1118,24 @@
   }
 
   @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;
+  }
+
+  @override
+  @deprecated
   Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
-    return driver.onResultComputed(descriptor);
+    return onResultChanged(descriptor)
+        .where((event) => event.wasComputed)
+        .map((event) {
+      return new ComputedResult(
+          event.context, event.descriptor, event.target, event.value);
+    });
   }
 
   @override
@@ -1203,6 +1238,7 @@
       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);
@@ -1281,6 +1317,7 @@
     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);
   }
 
@@ -1516,12 +1553,12 @@
         new LibrarySpecificUnit(librarySource, unitSource);
     for (ResultDescriptor result in [
       RESOLVED_UNIT,
+      RESOLVED_UNIT12,
       RESOLVED_UNIT11,
       RESOLVED_UNIT10,
       RESOLVED_UNIT9,
       RESOLVED_UNIT8,
-      RESOLVED_UNIT7,
-      RESOLVED_UNIT6
+      RESOLVED_UNIT7
     ]) {
       CompilationUnit unit = getResult(target, result);
       if (unit != null) {
@@ -1977,7 +2014,7 @@
       return new CancelableFuture.error(new AnalysisNotScheduledError());
     }
     CacheEntry entry = _context.getCacheEntry(_target);
-    PendingFuture pendingFuture =
+    PendingFuture<T> pendingFuture =
         new PendingFuture<T>(_context, _target, (CacheEntry entry) {
       CacheState state = entry.getState(_descriptor);
       if (state == CacheState.ERROR) {
@@ -2139,6 +2176,22 @@
  * An [AnalysisContext] that only contains sources for a Dart SDK.
  */
 class SdkAnalysisContext extends AnalysisContextImpl {
+  /**
+   * Initialize a newly created SDK analysis context with the given [options].
+   * Analysis options cannot be changed afterwards.  If the given [options] are
+   * `null`, then default options are used.
+   */
+  SdkAnalysisContext(AnalysisOptions options) {
+    if (options != null) {
+      super.analysisOptions = options;
+    }
+  }
+
+  @override
+  void set analysisOptions(AnalysisOptions options) {
+    throw new StateError('AnalysisOptions of SDK context cannot be changed.');
+  }
+
   @override
   AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
     if (factory == null) {
diff --git a/pkg/analyzer/lib/src/context/source.dart b/pkg/analyzer/lib/src/context/source.dart
index 5d18886..3a22291 100644
--- a/pkg/analyzer/lib/src/context/source.dart
+++ b/pkg/analyzer/lib/src/context/source.dart
@@ -286,7 +286,8 @@
             "Cannot resolve a relative URI without a containing source: "
             "$containedUri");
       }
-      containedUri = containingSource.resolveRelativeUri(containedUri);
+      containedUri =
+          utils.resolveRelativeUri(containingSource.uri, containedUri);
     }
 
     Uri actualUri = containedUri;
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index d2e09de..4555a80 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -59,7 +59,8 @@
   NodeList<StringLiteral> get strings => _strings;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitAdjacentStrings(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitAdjacentStrings(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -155,7 +156,7 @@
   @override
   void visitChildren(AstVisitor visitor) {
     if (_commentIsBeforeAnnotations()) {
-      _safelyVisitChild(_comment, visitor);
+      _comment?.accept(visitor);
       _metadata.accept(visitor);
     } else {
       for (AstNode child in sortedCommentAndAnnotations) {
@@ -305,13 +306,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitAnnotation(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitAnnotation(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_constructorName, visitor);
-    _safelyVisitChild(_arguments, visitor);
+    _name?.accept(visitor);
+    _constructorName?.accept(visitor);
+    _arguments?.accept(visitor);
   }
 }
 
@@ -409,7 +411,8 @@
   Token get endToken => rightParenthesis;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitArgumentList(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitArgumentList(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -531,12 +534,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitAsExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitAsExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
-    _safelyVisitChild(_type, visitor);
+    _expression?.accept(visitor);
+    _type?.accept(visitor);
   }
 }
 
@@ -636,12 +640,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitAssertStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitAssertStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_condition, visitor);
-    _safelyVisitChild(message, visitor);
+    _condition?.accept(visitor);
+    message?.accept(visitor);
   }
 }
 
@@ -823,12 +828,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitAssignmentExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitAssignmentExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_leftHandSide, visitor);
-    _safelyVisitChild(_rightHandSide, visitor);
+    _leftHandSide?.accept(visitor);
+    _rightHandSide?.accept(visitor);
   }
 }
 
@@ -941,15 +947,6 @@
     }
     return child;
   }
-
-  /**
-   * If the given [child] is not `null`, use the given [visitor] to visit it.
-   */
-  void _safelyVisitChild(AstNode child, AstVisitor visitor) {
-    if (child != null) {
-      child.accept(visitor);
-    }
-  }
 }
 
 /**
@@ -1004,11 +1001,12 @@
   int get precedence => 0;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitAwaitExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitAwaitExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -1134,12 +1132,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitBinaryExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitBinaryExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_leftOperand, visitor);
-    _safelyVisitChild(_rightOperand, visitor);
+    _leftOperand?.accept(visitor);
+    _rightOperand?.accept(visitor);
   }
 }
 
@@ -1213,11 +1212,12 @@
   bool get isSynchronous => keyword == null || keyword.lexeme != Parser.ASYNC;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitBlockFunctionBody(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitBlockFunctionBody(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_block, visitor);
+    _block?.accept(visitor);
   }
 }
 
@@ -1268,7 +1268,8 @@
   NodeList<Statement> get statements => _statements;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitBlock(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitBlock(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -1313,7 +1314,8 @@
   bool get isSynthetic => literal.isSynthetic;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitBooleanLiteral(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitBooleanLiteral(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -1385,11 +1387,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitBreakStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitBreakStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_label, visitor);
+    _label?.accept(visitor);
   }
 }
 
@@ -1456,11 +1459,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitCascadeExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitCascadeExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_target, visitor);
+    _target?.accept(visitor);
     _cascadeSections.accept(visitor);
   }
 }
@@ -1610,14 +1614,15 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitCatchClause(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitCatchClause(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_exceptionType, visitor);
-    _safelyVisitChild(_exceptionParameter, visitor);
-    _safelyVisitChild(_stackTraceParameter, visitor);
-    _safelyVisitChild(_body, visitor);
+    _exceptionType?.accept(visitor);
+    _exceptionParameter?.accept(visitor);
+    _stackTraceParameter?.accept(visitor);
+    _body?.accept(visitor);
   }
 }
 
@@ -1830,7 +1835,8 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitClassDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitClassDeclaration(this);
 
   @override
   ConstructorDeclaration getConstructor(String name) {
@@ -1884,12 +1890,12 @@
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_typeParameters, visitor);
-    _safelyVisitChild(_extendsClause, visitor);
-    _safelyVisitChild(_withClause, visitor);
-    _safelyVisitChild(_implementsClause, visitor);
-    _safelyVisitChild(_nativeClause, visitor);
+    _name?.accept(visitor);
+    _typeParameters?.accept(visitor);
+    _extendsClause?.accept(visitor);
+    _withClause?.accept(visitor);
+    _implementsClause?.accept(visitor);
+    _nativeClause?.accept(visitor);
     members.accept(visitor);
   }
 }
@@ -2039,16 +2045,17 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitClassTypeAlias(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitClassTypeAlias(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_typeParameters, visitor);
-    _safelyVisitChild(_superclass, visitor);
-    _safelyVisitChild(_withClause, visitor);
-    _safelyVisitChild(_implementsClause, visitor);
+    _name?.accept(visitor);
+    _typeParameters?.accept(visitor);
+    _superclass?.accept(visitor);
+    _withClause?.accept(visitor);
+    _implementsClause?.accept(visitor);
   }
 }
 
@@ -2145,7 +2152,8 @@
   NodeList<CommentReference> get references => _references;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitComment(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitComment(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -2226,11 +2234,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitCommentReference(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitCommentReference(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_identifier, visitor);
+    _identifier?.accept(visitor);
   }
 }
 
@@ -2411,11 +2420,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitCompilationUnit(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitCompilationUnit(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_scriptTag, visitor);
+    _scriptTag?.accept(visitor);
     if (_directivesAreBeforeDeclarations) {
       _directives.accept(visitor);
       _declarations.accept(visitor);
@@ -2537,13 +2547,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitConditionalExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitConditionalExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_condition, visitor);
-    _safelyVisitChild(_thenExpression, visitor);
-    _safelyVisitChild(_elseExpression, visitor);
+    _condition?.accept(visitor);
+    _thenExpression?.accept(visitor);
+    _elseExpression?.accept(visitor);
   }
 }
 
@@ -2626,13 +2637,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitConfiguration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitConfiguration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_value, visitor);
-    _safelyVisitChild(_libraryUri, visitor);
+    _name?.accept(visitor);
+    _value?.accept(visitor);
+    _libraryUri?.accept(visitor);
   }
 }
 
@@ -2853,17 +2865,18 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitConstructorDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitConstructorDeclaration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_returnType, visitor);
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_parameters, visitor);
+    _returnType?.accept(visitor);
+    _name?.accept(visitor);
+    _parameters?.accept(visitor);
     _initializers.accept(visitor);
-    _safelyVisitChild(_redirectedConstructor, visitor);
-    _safelyVisitChild(_body, visitor);
+    _redirectedConstructor?.accept(visitor);
+    _body?.accept(visitor);
   }
 }
 
@@ -2951,12 +2964,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitConstructorFieldInitializer(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitConstructorFieldInitializer(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_fieldName, visitor);
-    _safelyVisitChild(_expression, visitor);
+    _fieldName?.accept(visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -3045,12 +3059,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitConstructorName(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitConstructorName(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_type, visitor);
-    _safelyVisitChild(_name, visitor);
+    _type?.accept(visitor);
+    _name?.accept(visitor);
   }
 }
 
@@ -3116,11 +3131,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitContinueStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitContinueStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_label, visitor);
+    _label?.accept(visitor);
   }
 }
 
@@ -3230,17 +3246,36 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitDeclaredIdentifier(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitDeclaredIdentifier(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_type, visitor);
-    _safelyVisitChild(_identifier, visitor);
+    _type?.accept(visitor);
+    _identifier?.accept(visitor);
   }
 }
 
 /**
+ * A simple identifier that declares a name.
+ */
+// TODO(rnystrom): Consider making this distinct from [SimpleIdentifier] and
+// get rid of all of the:
+//
+//     if (node.inDeclarationContext()) { ... }
+//
+// code and instead visit this separately. A declaration is semantically pretty
+// different from a use, so using the same node type doesn't seem to buy us
+// much.
+class DeclaredSimpleIdentifier extends SimpleIdentifierImpl {
+  DeclaredSimpleIdentifier(Token token) : super(token);
+
+  @override
+  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.
@@ -3331,12 +3366,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitDefaultFormalParameter(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitDefaultFormalParameter(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_parameter, visitor);
-    _safelyVisitChild(_defaultValue, visitor);
+    _parameter?.accept(visitor);
+    _defaultValue?.accept(visitor);
   }
 }
 
@@ -3461,12 +3497,13 @@
   Token get endToken => semicolon;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitDoStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitDoStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_body, visitor);
-    _safelyVisitChild(_condition, visitor);
+    _body?.accept(visitor);
+    _condition?.accept(visitor);
   }
 }
 
@@ -3503,7 +3540,8 @@
   Token get endToken => _components.endToken;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitDottedName(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitDottedName(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -3549,7 +3587,8 @@
   Token get endToken => literal;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitDoubleLiteral(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitDoubleLiteral(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -3588,7 +3627,8 @@
   Token get endToken => semicolon;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitEmptyFunctionBody(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitEmptyFunctionBody(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -3623,7 +3663,8 @@
   Token get endToken => semicolon;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitEmptyStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitEmptyStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -3675,12 +3716,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitEnumConstantDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitEnumConstantDeclaration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_name, visitor);
+    _name?.accept(visitor);
   }
 }
 
@@ -3756,12 +3798,13 @@
   Token get firstTokenAfterCommentAndMetadata => enumKeyword;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitEnumDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitEnumDeclaration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_name, visitor);
+    _name?.accept(visitor);
     _constants.accept(visitor);
   }
 }
@@ -3820,7 +3863,8 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitExportDirective(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitExportDirective(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -3910,11 +3954,12 @@
   bool get isSynchronous => keyword == null;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitExpressionFunctionBody(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitExpressionFunctionBody(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -4073,11 +4118,12 @@
   bool get isSynthetic => _expression.isSynthetic && semicolon.isSynthetic;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitExpressionStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitExpressionStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -4125,11 +4171,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitExtendsClause(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitExtendsClause(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_superclass, visitor);
+    _superclass?.accept(visitor);
   }
 }
 
@@ -4200,12 +4247,13 @@
   bool get isStatic => staticKeyword != null;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFieldDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFieldDeclaration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_fieldList, visitor);
+    _fieldList?.accept(visitor);
   }
 }
 
@@ -4342,15 +4390,16 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFieldFormalParameter(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFieldFormalParameter(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_type, visitor);
-    _safelyVisitChild(identifier, visitor);
-    _safelyVisitChild(_typeParameters, visitor);
-    _safelyVisitChild(_parameters, visitor);
+    _type?.accept(visitor);
+    identifier?.accept(visitor);
+    _typeParameters?.accept(visitor);
+    _parameters?.accept(visitor);
   }
 }
 
@@ -4503,14 +4552,15 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitForEachStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitForEachStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_loopVariable, visitor);
-    _safelyVisitChild(_identifier, visitor);
-    _safelyVisitChild(_iterable, visitor);
-    _safelyVisitChild(_body, visitor);
+    _loopVariable?.accept(visitor);
+    _identifier?.accept(visitor);
+    _iterable?.accept(visitor);
+    _body?.accept(visitor);
   }
 }
 
@@ -4643,7 +4693,8 @@
   NodeList<FormalParameter> get parameters => _parameters;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFormalParameterList(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFormalParameterList(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -4804,15 +4855,16 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitForStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitForStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_variableList, visitor);
-    _safelyVisitChild(_initialization, visitor);
-    _safelyVisitChild(_condition, visitor);
+    _variableList?.accept(visitor);
+    _initialization?.accept(visitor);
+    _condition?.accept(visitor);
     _updaters.accept(visitor);
-    _safelyVisitChild(_body, visitor);
+    _body?.accept(visitor);
   }
 }
 
@@ -4994,14 +5046,15 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFunctionDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFunctionDeclaration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_returnType, visitor);
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_functionExpression, visitor);
+    _returnType?.accept(visitor);
+    _name?.accept(visitor);
+    _functionExpression?.accept(visitor);
   }
 }
 
@@ -5040,11 +5093,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFunctionDeclarationStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFunctionDeclarationStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_functionDeclaration, visitor);
+    _functionDeclaration?.accept(visitor);
   }
 }
 
@@ -5147,13 +5201,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFunctionExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFunctionExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_typeParameters, visitor);
-    _safelyVisitChild(_parameters, visitor);
-    _safelyVisitChild(_body, visitor);
+    _typeParameters?.accept(visitor);
+    _parameters?.accept(visitor);
+    _body?.accept(visitor);
   }
 }
 
@@ -5229,13 +5284,14 @@
   int get precedence => 15;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFunctionExpressionInvocation(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFunctionExpressionInvocation(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_function, visitor);
-    _safelyVisitChild(_typeArguments, visitor);
-    _safelyVisitChild(_argumentList, visitor);
+    _function?.accept(visitor);
+    _typeArguments?.accept(visitor);
+    _argumentList?.accept(visitor);
   }
 }
 
@@ -5326,15 +5382,16 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFunctionTypeAlias(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFunctionTypeAlias(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_returnType, visitor);
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_typeParameters, visitor);
-    _safelyVisitChild(_parameters, visitor);
+    _returnType?.accept(visitor);
+    _name?.accept(visitor);
+    _typeParameters?.accept(visitor);
+    _parameters?.accept(visitor);
   }
 }
 
@@ -5428,15 +5485,16 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitFunctionTypedFormalParameter(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitFunctionTypedFormalParameter(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_returnType, visitor);
-    _safelyVisitChild(identifier, visitor);
-    _safelyVisitChild(_typeParameters, visitor);
-    _safelyVisitChild(_parameters, visitor);
+    _returnType?.accept(visitor);
+    identifier?.accept(visitor);
+    _typeParameters?.accept(visitor);
+    _parameters?.accept(visitor);
   }
 }
 
@@ -5473,7 +5531,8 @@
   NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitHideCombinator(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitHideCombinator(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -5613,13 +5672,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitIfStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitIfStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_condition, visitor);
-    _safelyVisitChild(_thenStatement, visitor);
-    _safelyVisitChild(_elseStatement, visitor);
+    _condition?.accept(visitor);
+    _thenStatement?.accept(visitor);
+    _elseStatement?.accept(visitor);
   }
 }
 
@@ -5664,7 +5724,8 @@
   NodeList<TypeName> get interfaces => _interfaces;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitImplementsClause(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitImplementsClause(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -5754,12 +5815,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitImportDirective(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitImportDirective(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_prefix, visitor);
+    _prefix?.accept(visitor);
     combinators.accept(visitor);
   }
 }
@@ -5946,7 +6008,8 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitIndexExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitIndexExpression(this);
 
   @override
   bool inGetterContext() {
@@ -5978,8 +6041,8 @@
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_target, visitor);
-    _safelyVisitChild(_index, visitor);
+    _target?.accept(visitor);
+    _index?.accept(visitor);
   }
 }
 
@@ -6062,12 +6125,13 @@
   int get precedence => 16;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitInstanceCreationExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_constructorName, visitor);
-    _safelyVisitChild(_argumentList, visitor);
+    _constructorName?.accept(visitor);
+    _argumentList?.accept(visitor);
   }
 }
 
@@ -6113,7 +6177,8 @@
   Token get endToken => literal;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitIntegerLiteral(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitIntegerLiteral(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -6194,11 +6259,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitInterpolationExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitInterpolationExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -6251,7 +6317,8 @@
   Token get endToken => contents;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitInterpolationString(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitInterpolationString(this);
 
   @override
   void visitChildren(AstVisitor visitor) {}
@@ -6376,12 +6443,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitIsExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitIsExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
-    _safelyVisitChild(_type, visitor);
+    _expression?.accept(visitor);
+    _type?.accept(visitor);
   }
 }
 
@@ -6441,12 +6509,13 @@
   Statement get unlabeled => _statement.unlabeled;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitLabeledStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitLabeledStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     _labels.accept(visitor);
-    _safelyVisitChild(_statement, visitor);
+    _statement?.accept(visitor);
   }
 }
 
@@ -6493,11 +6562,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitLabel(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitLabel(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_label, visitor);
+    _label?.accept(visitor);
   }
 }
 
@@ -6558,12 +6628,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitLibraryDirective(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitLibraryDirective(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_name, visitor);
+    _name?.accept(visitor);
   }
 }
 
@@ -6628,7 +6699,8 @@
   Element get staticElement => null;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitLibraryIdentifier(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitLibraryIdentifier(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -6698,7 +6770,8 @@
   Token get endToken => rightBracket;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitListLiteral(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitListLiteral(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -6802,12 +6875,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitMapLiteralEntry(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitMapLiteralEntry(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_key, visitor);
-    _safelyVisitChild(_value, visitor);
+    _key?.accept(visitor);
+    _value?.accept(visitor);
   }
 }
 
@@ -6873,7 +6947,8 @@
   NodeList<MapLiteralEntry> get entries => _entries;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitMapLiteral(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitMapLiteral(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -7019,7 +7094,9 @@
 
   @override
   Token get firstTokenAfterCommentAndMetadata {
-    if (modifierKeyword != null) {
+    if (externalKeyword != null) {
+      return externalKeyword;
+    } else if (modifierKeyword != null) {
       return modifierKeyword;
     } else if (_returnType != null) {
       return _returnType.beginToken;
@@ -7089,16 +7166,17 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitMethodDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitMethodDeclaration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_returnType, visitor);
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_typeParameters, visitor);
-    _safelyVisitChild(_parameters, visitor);
-    _safelyVisitChild(_body, visitor);
+    _returnType?.accept(visitor);
+    _name?.accept(visitor);
+    _typeParameters?.accept(visitor);
+    _parameters?.accept(visitor);
+    _body?.accept(visitor);
   }
 }
 
@@ -7210,14 +7288,15 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitMethodInvocation(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitMethodInvocation(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_target, visitor);
-    _safelyVisitChild(_methodName, visitor);
-    _safelyVisitChild(_typeArguments, visitor);
-    _safelyVisitChild(_argumentList, visitor);
+    _target?.accept(visitor);
+    _methodName?.accept(visitor);
+    _typeArguments?.accept(visitor);
+    _argumentList?.accept(visitor);
   }
 }
 
@@ -7316,12 +7395,13 @@
   int get precedence => 0;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitNamedExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitNamedExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_expression, visitor);
+    _name?.accept(visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -7436,11 +7516,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitNativeClause(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitNativeClause(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_name, visitor);
+    _name?.accept(visitor);
   }
 }
 
@@ -7501,11 +7582,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitNativeFunctionBody(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitNativeFunctionBody(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_stringLiteral, visitor);
+    _stringLiteral?.accept(visitor);
   }
 }
 
@@ -7518,8 +7600,7 @@
   /**
    * The node that is the parent of each of the elements in the list.
    */
-  @override
-  AstNodeImpl owner;
+  AstNodeImpl _owner;
 
   /**
    * The elements contained in the list.
@@ -7531,7 +7612,7 @@
    * 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]) {
+  NodeListImpl(this._owner, [List<E> elements]) {
     addAll(elements);
   }
 
@@ -7560,6 +7641,14 @@
     throw new UnsupportedError("Cannot resize NodeList.");
   }
 
+  @override
+  AstNode get owner => _owner;
+
+  @override
+  void set owner(AstNode value) {
+    _owner = value as AstNodeImpl;
+  }
+
   E operator [](int index) {
     if (index < 0 || index >= _elements.length) {
       throw new RangeError("Index: $index, Size: ${_elements.length}");
@@ -7571,7 +7660,7 @@
     if (index < 0 || index >= _elements.length) {
       throw new RangeError("Index: $index, Size: ${_elements.length}");
     }
-    owner._becomeParentOf(node);
+    _owner._becomeParentOf(node);
     _elements[index] = node;
   }
 
@@ -7593,7 +7682,7 @@
     if (nodes != null && !nodes.isEmpty) {
       _elements.addAll(nodes);
       for (E node in nodes) {
-        owner._becomeParentOf(node);
+        _owner._becomeParentOf(node);
       }
       return true;
     }
@@ -7611,7 +7700,7 @@
     if (index < 0 || index > length) {
       throw new RangeError("Index: $index, Size: ${_elements.length}");
     }
-    owner._becomeParentOf(node);
+    _owner._becomeParentOf(node);
     if (length == 0) {
       _elements.add(node);
     } else {
@@ -7729,7 +7818,7 @@
     // they often need to visit other nodes before visiting the identifier.
     //
     if (_commentIsBeforeAnnotations()) {
-      _safelyVisitChild(_comment, visitor);
+      _comment?.accept(visitor);
       _metadata.accept(visitor);
     } else {
       for (AstNode child in sortedCommentAndAnnotations) {
@@ -7777,7 +7866,8 @@
   Token get endToken => literal;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitNullLiteral(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitNullLiteral(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -7840,11 +7930,12 @@
   int get precedence => 15;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitParenthesizedExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitParenthesizedExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -7893,7 +7984,8 @@
   CompilationUnitElement get uriElement => element as CompilationUnitElement;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitPartDirective(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitPartDirective(this);
 }
 
 /**
@@ -7967,12 +8059,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitPartOfDirective(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitPartOfDirective(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_libraryName, visitor);
+    _libraryName?.accept(visitor);
   }
 }
 
@@ -8084,11 +8177,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitPostfixExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitPostfixExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_operand, visitor);
+    _operand?.accept(visitor);
   }
 }
 
@@ -8197,12 +8291,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitPrefixedIdentifier(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitPrefixedIdentifier(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_prefix, visitor);
-    _safelyVisitChild(_identifier, visitor);
+    _prefix?.accept(visitor);
+    _identifier?.accept(visitor);
   }
 }
 
@@ -8309,11 +8404,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitPrefixExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitPrefixExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_operand, visitor);
+    _operand?.accept(visitor);
   }
 }
 
@@ -8409,12 +8505,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitPropertyAccess(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitPropertyAccess(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_target, visitor);
-    _safelyVisitChild(_propertyName, visitor);
+    _target?.accept(visitor);
+    _propertyName?.accept(visitor);
   }
 }
 
@@ -8497,13 +8594,13 @@
   Token get endToken => _argumentList.endToken;
 
   @override
-  accept(AstVisitor visitor) =>
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
       visitor.visitRedirectingConstructorInvocation(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_constructorName, visitor);
-    _safelyVisitChild(_argumentList, visitor);
+    _constructorName?.accept(visitor);
+    _argumentList?.accept(visitor);
   }
 }
 
@@ -8538,7 +8635,8 @@
   int get precedence => 0;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitRethrowExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitRethrowExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -8597,11 +8695,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitReturnStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitReturnStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -8632,7 +8731,8 @@
   Token get endToken => scriptTag;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitScriptTag(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitScriptTag(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -8673,7 +8773,8 @@
   NodeList<SimpleIdentifier> get shownNames => _shownNames;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitShowCombinator(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitShowCombinator(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -8752,13 +8853,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSimpleFormalParameter(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_type, visitor);
-    _safelyVisitChild(identifier, visitor);
+    _type?.accept(visitor);
+    identifier?.accept(visitor);
   }
 }
 
@@ -8853,7 +8955,7 @@
 
   @override
   void set propagatedElement(Element element) {
-    _propagatedElement = _validateElement(element);
+    _propagatedElement = element;
   }
 
   @override
@@ -8861,53 +8963,15 @@
 
   @override
   void set staticElement(Element element) {
-    _staticElement = _validateElement(element);
+    _staticElement = element;
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSimpleIdentifier(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSimpleIdentifier(this);
 
   @override
-  bool inDeclarationContext() {
-    // TODO(brianwilkerson) Convert this to a getter.
-    AstNode parent = this.parent;
-    if (parent is CatchClause) {
-      CatchClause clause = parent;
-      return identical(this, clause.exceptionParameter) ||
-          identical(this, clause.stackTraceParameter);
-    } else if (parent is ClassDeclaration) {
-      return identical(this, parent.name);
-    } else if (parent is ClassTypeAlias) {
-      return identical(this, parent.name);
-    } else if (parent is ConstructorDeclaration) {
-      return identical(this, parent.name);
-    } else if (parent is DeclaredIdentifier) {
-      return identical(this, parent.identifier);
-    } else if (parent is EnumDeclaration) {
-      return identical(this, parent.name);
-    } else if (parent is EnumConstantDeclaration) {
-      return identical(this, parent.name);
-    } else if (parent is FunctionDeclaration) {
-      return identical(this, parent.name);
-    } else if (parent is FunctionTypeAlias) {
-      return identical(this, parent.name);
-    } else if (parent is ImportDirective) {
-      return identical(this, parent.prefix);
-    } else if (parent is Label) {
-      return identical(this, parent.label) &&
-          (parent.parent is LabeledStatement);
-    } else if (parent is MethodDeclaration) {
-      return identical(this, parent.name);
-    } else if (parent is FunctionTypedFormalParameter ||
-        parent is SimpleFormalParameter) {
-      return identical(this, (parent as NormalFormalParameter).identifier);
-    } else if (parent is TypeParameter) {
-      return identical(this, parent.name);
-    } else if (parent is VariableDeclaration) {
-      return identical(this, parent.name);
-    }
-    return false;
-  }
+  bool inDeclarationContext() => false;
 
   @override
   bool inGetterContext() {
@@ -8988,66 +9052,6 @@
   void visitChildren(AstVisitor visitor) {
     // There are no children to visit.
   }
-
-  /**
-   * Return the given element if it is valid, or report the problem and return
-   * `null` if it is not appropriate.
-   *
-   * The [parent] is the parent of the element, used for reporting when there is
-   * a problem.
-   * The [isValid] is `true` if the element is appropriate.
-   * The [element] is the element to be associated with this identifier.
-   */
-  Element _returnOrReportElement(
-      AstNode parent, bool isValid, Element element) {
-    if (!isValid) {
-      AnalysisEngine.instance.logger.logInformation(
-          "Internal error: attempting to set the name of a ${parent.runtimeType} to a ${element.runtimeType}",
-          new CaughtException(new AnalysisException(), null));
-      return null;
-    }
-    return element;
-  }
-
-  /**
-   * Return the given [element] if it is an appropriate element based on the
-   * parent of this identifier, or `null` if it is not appropriate.
-   */
-  Element _validateElement(Element element) {
-    if (element == null) {
-      return null;
-    }
-    AstNode parent = this.parent;
-    if (parent is ClassDeclaration && identical(parent.name, this)) {
-      return _returnOrReportElement(parent, element is ClassElement, element);
-    } else if (parent is ClassTypeAlias && identical(parent.name, this)) {
-      return _returnOrReportElement(parent, element is ClassElement, element);
-    } else if (parent is DeclaredIdentifier &&
-        identical(parent.identifier, this)) {
-      return _returnOrReportElement(
-          parent, element is LocalVariableElement, element);
-    } else if (parent is FormalParameter &&
-        identical(parent.identifier, this)) {
-      return _returnOrReportElement(
-          parent, element is ParameterElement, element);
-    } else if (parent is FunctionDeclaration && identical(parent.name, this)) {
-      return _returnOrReportElement(
-          parent, element is ExecutableElement, element);
-    } else if (parent is FunctionTypeAlias && identical(parent.name, this)) {
-      return _returnOrReportElement(
-          parent, element is FunctionTypeAliasElement, element);
-    } else if (parent is MethodDeclaration && identical(parent.name, this)) {
-      return _returnOrReportElement(
-          parent, element is ExecutableElement, element);
-    } else if (parent is TypeParameter && identical(parent.name, this)) {
-      return _returnOrReportElement(
-          parent, element is TypeParameterElement, element);
-    } else if (parent is VariableDeclaration && identical(parent.name, this)) {
-      return _returnOrReportElement(
-          parent, element is VariableElement, element);
-    }
-    return element;
-  }
 }
 
 /**
@@ -9131,7 +9135,8 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSimpleStringLiteral(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSimpleStringLiteral(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -9241,7 +9246,8 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitStringInterpolation(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitStringInterpolation(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -9457,12 +9463,13 @@
   Token get endToken => _argumentList.endToken;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSuperConstructorInvocation(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSuperConstructorInvocation(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_constructorName, visitor);
-    _safelyVisitChild(_argumentList, visitor);
+    _constructorName?.accept(visitor);
+    _argumentList?.accept(visitor);
   }
 }
 
@@ -9496,7 +9503,8 @@
   int get precedence => 16;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSuperExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSuperExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -9543,12 +9551,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSwitchCase(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSwitchCase(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     labels.accept(visitor);
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
     statements.accept(visitor);
   }
 }
@@ -9576,7 +9585,8 @@
     ..addAll(statements);
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSwitchDefault(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSwitchDefault(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -9733,11 +9743,12 @@
   NodeList<SwitchMember> get members => _members;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSwitchStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSwitchStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
     _members.accept(visitor);
   }
 }
@@ -9777,7 +9788,8 @@
   Token get endToken => components[components.length - 1];
 
   @override
-  accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitSymbolLiteral(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -9815,7 +9827,8 @@
   int get precedence => 16;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitThisExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitThisExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -9874,11 +9887,12 @@
   int get precedence => 0;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitThrowExpression(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitThrowExpression(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
   }
 }
 
@@ -9934,12 +9948,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitTopLevelVariableDeclaration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_variableList, visitor);
+    _variableList?.accept(visitor);
   }
 }
 
@@ -10035,13 +10050,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitTryStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitTryStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_body, visitor);
+    _body?.accept(visitor);
     _catchClauses.accept(visitor);
-    _safelyVisitChild(_finallyBlock, visitor);
+    _finallyBlock?.accept(visitor);
   }
 }
 
@@ -10130,7 +10146,8 @@
   Token get endToken => rightBracket;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitTypeArgumentList(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -10180,7 +10197,7 @@
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_typeArguments, visitor);
+    _typeArguments?.accept(visitor);
   }
 }
 
@@ -10260,12 +10277,13 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitTypeName(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitTypeName(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_typeArguments, visitor);
+    _name?.accept(visitor);
+    _typeArguments?.accept(visitor);
   }
 }
 
@@ -10342,13 +10360,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitTypeParameter(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitTypeParameter(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_bound, visitor);
+    _name?.accept(visitor);
+    _bound?.accept(visitor);
   }
 }
 
@@ -10398,7 +10417,8 @@
   NodeList<TypeParameter> get typeParameters => _typeParameters;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitTypeParameterList(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitTypeParameterList(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -10480,7 +10500,7 @@
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_uri, visitor);
+    _uri?.accept(visitor);
   }
 }
 
@@ -10620,13 +10640,14 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitVariableDeclaration(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitVariableDeclaration(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_name, visitor);
-    _safelyVisitChild(_initializer, visitor);
+    _name?.accept(visitor);
+    _initializer?.accept(visitor);
   }
 }
 
@@ -10715,12 +10736,13 @@
   NodeList<VariableDeclaration> get variables => _variables;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitVariableDeclarationList(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitVariableDeclarationList(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
     super.visitChildren(visitor);
-    _safelyVisitChild(_type, visitor);
+    _type?.accept(visitor);
     _variables.accept(visitor);
   }
 }
@@ -10771,11 +10793,12 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitVariableDeclarationStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitVariableDeclarationStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_variableList, visitor);
+    _variableList?.accept(visitor);
   }
 }
 
@@ -10851,12 +10874,13 @@
   Token get endToken => _body.endToken;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitWhileStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitWhileStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_condition, visitor);
-    _safelyVisitChild(_body, visitor);
+    _condition?.accept(visitor);
+    _body?.accept(visitor);
   }
 }
 
@@ -10900,7 +10924,8 @@
   NodeList<TypeName> get mixinTypes => _mixinTypes;
 
   @override
-  accept(AstVisitor visitor) => visitor.visitWithClause(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitWithClause(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -10976,10 +11001,11 @@
   }
 
   @override
-  accept(AstVisitor visitor) => visitor.visitYieldStatement(this);
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
+      visitor.visitYieldStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
-    _safelyVisitChild(_expression, visitor);
+    _expression?.accept(visitor);
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index dbbba10..edd0196 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -60,22 +60,23 @@
   /**
    * Return a clone of the given [node].
    */
-  AstNode cloneNode(AstNode node) {
+  AstNode/*=E*/ cloneNode/*<E extends AstNode>*/(AstNode/*=E*/ node) {
     if (node == null) {
       return null;
     }
-    return node.accept(this) as AstNode;
+    return node.accept(this) as AstNode/*=E*/;
   }
 
   /**
    * Return a list containing cloned versions of the nodes in the given list of
    * [nodes].
    */
-  List<AstNode> cloneNodeList(NodeList nodes) {
+  List<AstNode/*=E*/ > cloneNodeList/*<E extends AstNode>*/(
+      NodeList/*<E>*/ nodes) {
     int count = nodes.length;
-    List clonedNodes = new List();
+    List/*<E>*/ clonedNodes = new List/*<E>*/();
     for (int i = 0; i < count; i++) {
-      clonedNodes.add((nodes[i]).accept(this) as AstNode);
+      clonedNodes.add((nodes[i]).accept(this) as AstNode/*=E*/);
     }
     return clonedNodes;
   }
@@ -777,7 +778,8 @@
 
   @override
   SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) =>
-      new SimpleIdentifier(cloneToken(node.token));
+      new SimpleIdentifier(cloneToken(node.token),
+          isDeclaration: node.inDeclarationContext());
 
   @override
   SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) =>
@@ -2588,6 +2590,7 @@
  * mapping the old token stream to a new token stream, and preserving resolution
  * results.
  */
+@deprecated
 class IncrementalAstCloner implements AstVisitor<AstNode> {
   /**
    * The node to be replaced during the cloning process.
@@ -3101,18 +3104,21 @@
           _mapToken(node.implementsKeyword), _cloneNodeList(node.interfaces));
 
   @override
-  ImportDirective visitImportDirective(ImportDirective node) =>
-      new ImportDirective(
-          _cloneNode(node.documentationComment),
-          _cloneNodeList(node.metadata),
-          _mapToken(node.keyword),
-          _cloneNode(node.uri),
-          _cloneNodeList(node.configurations),
-          _mapToken(node.deferredKeyword),
-          _mapToken(node.asKeyword),
-          _cloneNode(node.prefix),
-          _cloneNodeList(node.combinators),
-          _mapToken(node.semicolon));
+  ImportDirective visitImportDirective(ImportDirective node) {
+    ImportDirective copy = new ImportDirective(
+        _cloneNode(node.documentationComment),
+        _cloneNodeList(node.metadata),
+        _mapToken(node.keyword),
+        _cloneNode(node.uri),
+        _cloneNodeList(node.configurations),
+        _mapToken(node.deferredKeyword),
+        _mapToken(node.asKeyword),
+        _cloneNode(node.prefix),
+        _cloneNodeList(node.combinators),
+        _mapToken(node.semicolon));
+    copy.element = node.element;
+    return copy;
+  }
 
   @override
   IndexExpression visitIndexExpression(IndexExpression node) {
@@ -3190,13 +3196,16 @@
           _cloneNodeList(node.labels), _cloneNode(node.statement));
 
   @override
-  LibraryDirective visitLibraryDirective(LibraryDirective node) =>
-      new LibraryDirective(
-          _cloneNode(node.documentationComment),
-          _cloneNodeList(node.metadata),
-          _mapToken(node.libraryKeyword),
-          _cloneNode(node.name),
-          _mapToken(node.semicolon));
+  LibraryDirective visitLibraryDirective(LibraryDirective node) {
+    LibraryDirective copy = new LibraryDirective(
+        _cloneNode(node.documentationComment),
+        _cloneNodeList(node.metadata),
+        _mapToken(node.libraryKeyword),
+        _cloneNode(node.name),
+        _mapToken(node.semicolon));
+    copy.element = node.element;
+    return copy;
+  }
 
   @override
   LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) {
@@ -3425,7 +3434,8 @@
       // documentation comments for the parser.
       mappedToken = node.token;
     }
-    SimpleIdentifier copy = new SimpleIdentifier(mappedToken);
+    SimpleIdentifier copy = new SimpleIdentifier(mappedToken,
+        isDeclaration: node.inDeclarationContext());
     copy.auxiliaryElements = node.auxiliaryElements;
     copy.propagatedElement = node.propagatedElement;
     copy.propagatedType = node.propagatedType;
@@ -3607,19 +3617,19 @@
       _cloneNode(node.expression),
       _mapToken(node.semicolon));
 
-  AstNode _cloneNode(AstNode node) {
+  AstNode/*=E*/ _cloneNode/*<E extends AstNode>*/(AstNode/*=E*/ node) {
     if (node == null) {
       return null;
     }
     if (identical(node, _oldNode)) {
-      return _newNode;
+      return _newNode as AstNode/*=E*/;
     }
-    return node.accept(this) as AstNode;
+    return node.accept(this) as AstNode/*=E*/;
   }
 
-  List _cloneNodeList(NodeList nodes) {
-    List clonedNodes = new List();
-    for (AstNode node in nodes) {
+  List/*<E>*/ _cloneNodeList/*<E extends AstNode>*/(NodeList/*<E>*/ nodes) {
+    List/*<E>*/ clonedNodes = new List/*<E>*/();
+    for (AstNode/*=E*/ node in nodes) {
       clonedNodes.add(_cloneNode(node));
     }
     return clonedNodes;
@@ -3690,8 +3700,6 @@
     }
     try {
       node.accept(this);
-    } on NodeLocator_NodeFoundException {
-      // A node with the right source position was found.
     } catch (exception, stackTrace) {
       AnalysisEngine.instance.logger.logInformation(
           "Unable to locate element at offset ($_startOffset - $_endOffset)",
@@ -3703,6 +3711,11 @@
 
   @override
   Object visitNode(AstNode node) {
+    // Don't visit a new tree if the result has been already found.
+    if (_foundNode != null) {
+      return null;
+    }
+    // Check whether the current node covers the selection.
     Token beginToken = node.beginToken;
     Token endToken = node.endToken;
     // Don't include synthetic tokens.
@@ -3720,10 +3733,9 @@
     if (start > _endOffset) {
       return null;
     }
+    // Check children.
     try {
       node.visitChildren(this);
-    } on NodeLocator_NodeFoundException {
-      rethrow;
     } catch (exception, stackTrace) {
       // Ignore the exception and proceed in order to visit the rest of the
       // structure.
@@ -3731,9 +3743,13 @@
           "Exception caught while traversing an AST structure.",
           new CaughtException(exception, stackTrace));
     }
+    // Found a child.
+    if (_foundNode != null) {
+      return null;
+    }
+    // Check this node.
     if (start <= _startOffset && _endOffset <= end) {
       _foundNode = node;
-      throw new NodeLocator_NodeFoundException();
     }
     return null;
   }
@@ -3781,7 +3797,7 @@
     }
     try {
       node.accept(this);
-    } on NodeLocator_NodeFoundException {} catch (exception, stackTrace) {
+    } catch (exception, stackTrace) {
       AnalysisEngine.instance.logger.logInformation(
           "Unable to locate element at offset ($_startOffset - $_endOffset)",
           new CaughtException(exception, stackTrace));
@@ -3792,6 +3808,11 @@
 
   @override
   Object visitNode(AstNode node) {
+    // Don't visit a new tree if the result has been already found.
+    if (_foundNode != null) {
+      return null;
+    }
+    // Check whether the current node covers the selection.
     Token beginToken = node.beginToken;
     Token endToken = node.endToken;
     // Don't include synthetic tokens.
@@ -3809,10 +3830,9 @@
     if (start > _endOffset) {
       return null;
     }
+    // Check children.
     try {
       node.visitChildren(this);
-    } on NodeLocator_NodeFoundException {
-      rethrow;
     } catch (exception, stackTrace) {
       // Ignore the exception and proceed in order to visit the rest of the
       // structure.
@@ -3820,21 +3840,19 @@
           "Exception caught while traversing an AST structure.",
           new CaughtException(exception, stackTrace));
     }
+    // Found a child.
+    if (_foundNode != null) {
+      return null;
+    }
+    // Check this node.
     if (start <= _startOffset && _endOffset < end) {
       _foundNode = node;
-      throw new NodeLocator_NodeFoundException();
     }
     return null;
   }
 }
 
 /**
- * An exception used by [NodeLocator] to cancel visiting after a node has been
- * found.
- */
-class NodeLocator_NodeFoundException extends RuntimeException {}
-
-/**
  * An object that will replace one child node in an AST node with another node.
  */
 class NodeReplacer implements AstVisitor<bool> {
@@ -5028,6 +5046,1426 @@
 }
 
 /**
+ * An object that copies resolution information from one AST structure to
+ * another as long as the structures of the corresponding children of a pair of
+ * nodes are the same.
+ */
+class ResolutionCopier 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
+   * invoked).
+   */
+  AstNode _toNode;
+
+  @override
+  bool visitAdjacentStrings(AdjacentStrings node) {
+    AdjacentStrings toNode = this._toNode as AdjacentStrings;
+    if (_isEqualNodeLists(node.strings, toNode.strings)) {
+      toNode.staticType = node.staticType;
+      toNode.propagatedType = node.propagatedType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitAnnotation(Annotation node) {
+    Annotation toNode = this._toNode as Annotation;
+    if (_and(
+        _isEqualTokens(node.atSign, toNode.atSign),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualTokens(node.period, toNode.period),
+        _isEqualNodes(node.constructorName, toNode.constructorName),
+        _isEqualNodes(node.arguments, toNode.arguments))) {
+      toNode.element = node.element;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitArgumentList(ArgumentList node) {
+    ArgumentList toNode = this._toNode as ArgumentList;
+    return _and(
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodeLists(node.arguments, toNode.arguments),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis));
+  }
+
+  @override
+  bool visitAsExpression(AsExpression node) {
+    AsExpression toNode = this._toNode as AsExpression;
+    if (_and(
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.asOperator, toNode.asOperator),
+        _isEqualNodes(node.type, toNode.type))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitAssertStatement(AssertStatement node) {
+    AssertStatement toNode = this._toNode as AssertStatement;
+    return _and(
+        _isEqualTokens(node.assertKeyword, toNode.assertKeyword),
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodes(node.condition, toNode.condition),
+        _isEqualTokens(node.comma, toNode.comma),
+        _isEqualNodes(node.message, toNode.message),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitAssignmentExpression(AssignmentExpression node) {
+    AssignmentExpression toNode = this._toNode as AssignmentExpression;
+    if (_and(
+        _isEqualNodes(node.leftHandSide, toNode.leftHandSide),
+        _isEqualTokens(node.operator, toNode.operator),
+        _isEqualNodes(node.rightHandSide, toNode.rightHandSide))) {
+      toNode.propagatedElement = node.propagatedElement;
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticElement = node.staticElement;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitAwaitExpression(AwaitExpression node) {
+    AwaitExpression toNode = this._toNode as AwaitExpression;
+    if (_and(_isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
+        _isEqualNodes(node.expression, toNode.expression))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitBinaryExpression(BinaryExpression node) {
+    BinaryExpression toNode = this._toNode as BinaryExpression;
+    if (_and(
+        _isEqualNodes(node.leftOperand, toNode.leftOperand),
+        _isEqualTokens(node.operator, toNode.operator),
+        _isEqualNodes(node.rightOperand, toNode.rightOperand))) {
+      toNode.propagatedElement = node.propagatedElement;
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticElement = node.staticElement;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitBlock(Block node) {
+    Block toNode = this._toNode as Block;
+    return _and(
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodeLists(node.statements, toNode.statements),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket));
+  }
+
+  @override
+  bool visitBlockFunctionBody(BlockFunctionBody node) {
+    BlockFunctionBody toNode = this._toNode as BlockFunctionBody;
+    return _isEqualNodes(node.block, toNode.block);
+  }
+
+  @override
+  bool visitBooleanLiteral(BooleanLiteral node) {
+    BooleanLiteral toNode = this._toNode as BooleanLiteral;
+    if (_and(_isEqualTokens(node.literal, toNode.literal),
+        node.value == toNode.value)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitBreakStatement(BreakStatement node) {
+    BreakStatement toNode = this._toNode as BreakStatement;
+    if (_and(
+        _isEqualTokens(node.breakKeyword, toNode.breakKeyword),
+        _isEqualNodes(node.label, toNode.label),
+        _isEqualTokens(node.semicolon, toNode.semicolon))) {
+      // TODO(paulberry): map node.target to toNode.target.
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitCascadeExpression(CascadeExpression node) {
+    CascadeExpression toNode = this._toNode as CascadeExpression;
+    if (_and(_isEqualNodes(node.target, toNode.target),
+        _isEqualNodeLists(node.cascadeSections, toNode.cascadeSections))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitCatchClause(CatchClause node) {
+    CatchClause toNode = this._toNode as CatchClause;
+    return _and(
+        _isEqualTokens(node.onKeyword, toNode.onKeyword),
+        _isEqualNodes(node.exceptionType, toNode.exceptionType),
+        _isEqualTokens(node.catchKeyword, toNode.catchKeyword),
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodes(node.exceptionParameter, toNode.exceptionParameter),
+        _isEqualTokens(node.comma, toNode.comma),
+        _isEqualNodes(node.stackTraceParameter, toNode.stackTraceParameter),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
+        _isEqualNodes(node.body, toNode.body));
+  }
+
+  @override
+  bool visitClassDeclaration(ClassDeclaration node) {
+    ClassDeclaration toNode = this._toNode as ClassDeclaration;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.abstractKeyword, toNode.abstractKeyword),
+        _isEqualTokens(node.classKeyword, toNode.classKeyword),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.typeParameters, toNode.typeParameters),
+        _isEqualNodes(node.extendsClause, toNode.extendsClause),
+        _isEqualNodes(node.withClause, toNode.withClause),
+        _isEqualNodes(node.implementsClause, toNode.implementsClause),
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodeLists(node.members, toNode.members),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket));
+  }
+
+  @override
+  bool visitClassTypeAlias(ClassTypeAlias node) {
+    ClassTypeAlias toNode = this._toNode as ClassTypeAlias;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.typedefKeyword, toNode.typedefKeyword),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.typeParameters, toNode.typeParameters),
+        _isEqualTokens(node.equals, toNode.equals),
+        _isEqualTokens(node.abstractKeyword, toNode.abstractKeyword),
+        _isEqualNodes(node.superclass, toNode.superclass),
+        _isEqualNodes(node.withClause, toNode.withClause),
+        _isEqualNodes(node.implementsClause, toNode.implementsClause),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitComment(Comment node) {
+    Comment toNode = this._toNode as Comment;
+    return _isEqualNodeLists(node.references, toNode.references);
+  }
+
+  @override
+  bool visitCommentReference(CommentReference node) {
+    CommentReference toNode = this._toNode as CommentReference;
+    return _and(_isEqualTokens(node.newKeyword, toNode.newKeyword),
+        _isEqualNodes(node.identifier, toNode.identifier));
+  }
+
+  @override
+  bool visitCompilationUnit(CompilationUnit node) {
+    CompilationUnit toNode = this._toNode as CompilationUnit;
+    if (_and(
+        _isEqualTokens(node.beginToken, toNode.beginToken),
+        _isEqualNodes(node.scriptTag, toNode.scriptTag),
+        _isEqualNodeLists(node.directives, toNode.directives),
+        _isEqualNodeLists(node.declarations, toNode.declarations),
+        _isEqualTokens(node.endToken, toNode.endToken))) {
+      toNode.element = node.element;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitConditionalExpression(ConditionalExpression node) {
+    ConditionalExpression toNode = this._toNode as ConditionalExpression;
+    if (_and(
+        _isEqualNodes(node.condition, toNode.condition),
+        _isEqualTokens(node.question, toNode.question),
+        _isEqualNodes(node.thenExpression, toNode.thenExpression),
+        _isEqualTokens(node.colon, toNode.colon),
+        _isEqualNodes(node.elseExpression, toNode.elseExpression))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitConfiguration(Configuration node) {
+    Configuration toNode = this._toNode as Configuration;
+    if (_and(
+        _isEqualTokens(node.ifKeyword, toNode.ifKeyword),
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualTokens(node.equalToken, toNode.equalToken),
+        _isEqualNodes(node.value, toNode.value),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
+        _isEqualNodes(node.libraryUri, toNode.libraryUri))) {
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitConstructorDeclaration(ConstructorDeclaration node) {
+    ConstructorDeclaration toNode = this._toNode as ConstructorDeclaration;
+    if (_and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.externalKeyword, toNode.externalKeyword),
+        _isEqualTokens(node.constKeyword, toNode.constKeyword),
+        _isEqualTokens(node.factoryKeyword, toNode.factoryKeyword),
+        _isEqualNodes(node.returnType, toNode.returnType),
+        _isEqualTokens(node.period, toNode.period),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.parameters, toNode.parameters),
+        _isEqualTokens(node.separator, toNode.separator),
+        _isEqualNodeLists(node.initializers, toNode.initializers),
+        _isEqualNodes(node.redirectedConstructor, toNode.redirectedConstructor),
+        _isEqualNodes(node.body, toNode.body))) {
+      toNode.element = node.element;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+    ConstructorFieldInitializer toNode =
+        this._toNode as ConstructorFieldInitializer;
+    return _and(
+        _isEqualTokens(node.thisKeyword, toNode.thisKeyword),
+        _isEqualTokens(node.period, toNode.period),
+        _isEqualNodes(node.fieldName, toNode.fieldName),
+        _isEqualTokens(node.equals, toNode.equals),
+        _isEqualNodes(node.expression, toNode.expression));
+  }
+
+  @override
+  bool visitConstructorName(ConstructorName node) {
+    ConstructorName toNode = this._toNode as ConstructorName;
+    if (_and(
+        _isEqualNodes(node.type, toNode.type),
+        _isEqualTokens(node.period, toNode.period),
+        _isEqualNodes(node.name, toNode.name))) {
+      toNode.staticElement = node.staticElement;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitContinueStatement(ContinueStatement node) {
+    ContinueStatement toNode = this._toNode as ContinueStatement;
+    if (_and(
+        _isEqualTokens(node.continueKeyword, toNode.continueKeyword),
+        _isEqualNodes(node.label, toNode.label),
+        _isEqualTokens(node.semicolon, toNode.semicolon))) {
+      // TODO(paulberry): map node.target to toNode.target.
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitDeclaredIdentifier(DeclaredIdentifier node) {
+    DeclaredIdentifier toNode = this._toNode as DeclaredIdentifier;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodes(node.type, toNode.type),
+        _isEqualNodes(node.identifier, toNode.identifier));
+  }
+
+  @override
+  bool visitDefaultFormalParameter(DefaultFormalParameter node) {
+    DefaultFormalParameter toNode = this._toNode as DefaultFormalParameter;
+    return _and(
+        _isEqualNodes(node.parameter, toNode.parameter),
+        node.kind == toNode.kind,
+        _isEqualTokens(node.separator, toNode.separator),
+        _isEqualNodes(node.defaultValue, toNode.defaultValue));
+  }
+
+  @override
+  bool visitDoStatement(DoStatement node) {
+    DoStatement toNode = this._toNode as DoStatement;
+    return _and(
+        _isEqualTokens(node.doKeyword, toNode.doKeyword),
+        _isEqualNodes(node.body, toNode.body),
+        _isEqualTokens(node.whileKeyword, toNode.whileKeyword),
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodes(node.condition, toNode.condition),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitDottedName(DottedName node) {
+    DottedName toNode = this._toNode as DottedName;
+    return _isEqualNodeLists(node.components, toNode.components);
+  }
+
+  @override
+  bool visitDoubleLiteral(DoubleLiteral node) {
+    DoubleLiteral toNode = this._toNode as DoubleLiteral;
+    if (_and(_isEqualTokens(node.literal, toNode.literal),
+        node.value == toNode.value)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitEmptyFunctionBody(EmptyFunctionBody node) {
+    EmptyFunctionBody toNode = this._toNode as EmptyFunctionBody;
+    return _isEqualTokens(node.semicolon, toNode.semicolon);
+  }
+
+  @override
+  bool visitEmptyStatement(EmptyStatement node) {
+    EmptyStatement toNode = this._toNode as EmptyStatement;
+    return _isEqualTokens(node.semicolon, toNode.semicolon);
+  }
+
+  @override
+  bool visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+    EnumConstantDeclaration toNode = this._toNode as EnumConstantDeclaration;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualNodes(node.name, toNode.name));
+  }
+
+  @override
+  bool visitEnumDeclaration(EnumDeclaration node) {
+    EnumDeclaration toNode = this._toNode as EnumDeclaration;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.enumKeyword, toNode.enumKeyword),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodeLists(node.constants, toNode.constants),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket));
+  }
+
+  @override
+  bool visitExportDirective(ExportDirective node) {
+    ExportDirective toNode = this._toNode as ExportDirective;
+    if (_and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodes(node.uri, toNode.uri),
+        _isEqualNodeLists(node.combinators, toNode.combinators),
+        _isEqualTokens(node.semicolon, toNode.semicolon))) {
+      toNode.element = node.element;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitExpressionFunctionBody(ExpressionFunctionBody node) {
+    ExpressionFunctionBody toNode = this._toNode as ExpressionFunctionBody;
+    return _and(
+        _isEqualTokens(node.functionDefinition, toNode.functionDefinition),
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitExpressionStatement(ExpressionStatement node) {
+    ExpressionStatement toNode = this._toNode as ExpressionStatement;
+    return _and(_isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitExtendsClause(ExtendsClause node) {
+    ExtendsClause toNode = this._toNode as ExtendsClause;
+    return _and(_isEqualTokens(node.extendsKeyword, toNode.extendsKeyword),
+        _isEqualNodes(node.superclass, toNode.superclass));
+  }
+
+  @override
+  bool visitFieldDeclaration(FieldDeclaration node) {
+    FieldDeclaration toNode = this._toNode as FieldDeclaration;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.staticKeyword, toNode.staticKeyword),
+        _isEqualNodes(node.fields, toNode.fields),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitFieldFormalParameter(FieldFormalParameter node) {
+    FieldFormalParameter toNode = this._toNode as FieldFormalParameter;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodes(node.type, toNode.type),
+        _isEqualTokens(node.thisKeyword, toNode.thisKeyword),
+        _isEqualTokens(node.period, toNode.period),
+        _isEqualNodes(node.identifier, toNode.identifier));
+  }
+
+  @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),
+        _isEqualTokens(node.inKeyword, toNode.inKeyword),
+        _isEqualNodes(node.iterable, toNode.iterable),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
+        _isEqualNodes(node.body, toNode.body));
+  }
+
+  @override
+  bool visitFormalParameterList(FormalParameterList node) {
+    FormalParameterList toNode = this._toNode as FormalParameterList;
+    return _and(
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodeLists(node.parameters, toNode.parameters),
+        _isEqualTokens(node.leftDelimiter, toNode.leftDelimiter),
+        _isEqualTokens(node.rightDelimiter, toNode.rightDelimiter),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis));
+  }
+
+  @override
+  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 visitFunctionDeclaration(FunctionDeclaration node) {
+    FunctionDeclaration toNode = this._toNode as FunctionDeclaration;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.externalKeyword, toNode.externalKeyword),
+        _isEqualNodes(node.returnType, toNode.returnType),
+        _isEqualTokens(node.propertyKeyword, toNode.propertyKeyword),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.functionExpression, toNode.functionExpression));
+  }
+
+  @override
+  bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+    FunctionDeclarationStatement toNode =
+        this._toNode as FunctionDeclarationStatement;
+    return _isEqualNodes(node.functionDeclaration, toNode.functionDeclaration);
+  }
+
+  @override
+  bool visitFunctionExpression(FunctionExpression node) {
+    FunctionExpression toNode = this._toNode as FunctionExpression;
+    if (_and(_isEqualNodes(node.parameters, toNode.parameters),
+        _isEqualNodes(node.body, toNode.body))) {
+      toNode.element = node.element;
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+    FunctionExpressionInvocation toNode =
+        this._toNode as FunctionExpressionInvocation;
+    if (_and(_isEqualNodes(node.function, toNode.function),
+        _isEqualNodes(node.argumentList, toNode.argumentList))) {
+      toNode.propagatedElement = node.propagatedElement;
+      toNode.propagatedInvokeType = node.propagatedInvokeType;
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticInvokeType = node.staticInvokeType;
+      toNode.staticElement = node.staticElement;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitFunctionTypeAlias(FunctionTypeAlias node) {
+    FunctionTypeAlias toNode = this._toNode as FunctionTypeAlias;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.typedefKeyword, toNode.typedefKeyword),
+        _isEqualNodes(node.returnType, toNode.returnType),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.typeParameters, toNode.typeParameters),
+        _isEqualNodes(node.parameters, toNode.parameters),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+    FunctionTypedFormalParameter toNode =
+        this._toNode as FunctionTypedFormalParameter;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualNodes(node.returnType, toNode.returnType),
+        _isEqualNodes(node.identifier, toNode.identifier),
+        _isEqualNodes(node.parameters, toNode.parameters));
+  }
+
+  @override
+  bool visitHideCombinator(HideCombinator node) {
+    HideCombinator toNode = this._toNode as HideCombinator;
+    return _and(_isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodeLists(node.hiddenNames, toNode.hiddenNames));
+  }
+
+  @override
+  bool visitIfStatement(IfStatement node) {
+    IfStatement toNode = this._toNode as IfStatement;
+    return _and(
+        _isEqualTokens(node.ifKeyword, toNode.ifKeyword),
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodes(node.condition, toNode.condition),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
+        _isEqualNodes(node.thenStatement, toNode.thenStatement),
+        _isEqualTokens(node.elseKeyword, toNode.elseKeyword),
+        _isEqualNodes(node.elseStatement, toNode.elseStatement));
+  }
+
+  @override
+  bool visitImplementsClause(ImplementsClause node) {
+    ImplementsClause toNode = this._toNode as ImplementsClause;
+    return _and(
+        _isEqualTokens(node.implementsKeyword, toNode.implementsKeyword),
+        _isEqualNodeLists(node.interfaces, toNode.interfaces));
+  }
+
+  @override
+  bool visitImportDirective(ImportDirective node) {
+    ImportDirective toNode = this._toNode as ImportDirective;
+    if (_and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodes(node.uri, toNode.uri),
+        _isEqualTokens(node.asKeyword, toNode.asKeyword),
+        _isEqualNodes(node.prefix, toNode.prefix),
+        _isEqualNodeLists(node.combinators, toNode.combinators),
+        _isEqualTokens(node.semicolon, toNode.semicolon))) {
+      toNode.element = node.element;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitIndexExpression(IndexExpression node) {
+    IndexExpression toNode = this._toNode as IndexExpression;
+    if (_and(
+        _isEqualNodes(node.target, toNode.target),
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodes(node.index, toNode.index),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
+      toNode.auxiliaryElements = node.auxiliaryElements;
+      toNode.propagatedElement = node.propagatedElement;
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticElement = node.staticElement;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitInstanceCreationExpression(InstanceCreationExpression node) {
+    InstanceCreationExpression toNode =
+        this._toNode as InstanceCreationExpression;
+    if (_and(
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodes(node.constructorName, toNode.constructorName),
+        _isEqualNodes(node.argumentList, toNode.argumentList))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticElement = node.staticElement;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitIntegerLiteral(IntegerLiteral node) {
+    IntegerLiteral toNode = this._toNode as IntegerLiteral;
+    if (_and(_isEqualTokens(node.literal, toNode.literal),
+        node.value == toNode.value)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitInterpolationExpression(InterpolationExpression node) {
+    InterpolationExpression toNode = this._toNode as InterpolationExpression;
+    return _and(
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket));
+  }
+
+  @override
+  bool visitInterpolationString(InterpolationString node) {
+    InterpolationString toNode = this._toNode as InterpolationString;
+    return _and(_isEqualTokens(node.contents, toNode.contents),
+        node.value == toNode.value);
+  }
+
+  @override
+  bool visitIsExpression(IsExpression node) {
+    IsExpression toNode = this._toNode as IsExpression;
+    if (_and(
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.isOperator, toNode.isOperator),
+        _isEqualTokens(node.notOperator, toNode.notOperator),
+        _isEqualNodes(node.type, toNode.type))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitLabel(Label node) {
+    Label toNode = this._toNode as Label;
+    return _and(_isEqualNodes(node.label, toNode.label),
+        _isEqualTokens(node.colon, toNode.colon));
+  }
+
+  @override
+  bool visitLabeledStatement(LabeledStatement node) {
+    LabeledStatement toNode = this._toNode as LabeledStatement;
+    return _and(_isEqualNodeLists(node.labels, toNode.labels),
+        _isEqualNodes(node.statement, toNode.statement));
+  }
+
+  @override
+  bool visitLibraryDirective(LibraryDirective node) {
+    LibraryDirective toNode = this._toNode as LibraryDirective;
+    if (_and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.libraryKeyword, toNode.libraryKeyword),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualTokens(node.semicolon, toNode.semicolon))) {
+      toNode.element = node.element;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitLibraryIdentifier(LibraryIdentifier node) {
+    LibraryIdentifier toNode = this._toNode as LibraryIdentifier;
+    if (_isEqualNodeLists(node.components, toNode.components)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitListLiteral(ListLiteral node) {
+    ListLiteral toNode = this._toNode as ListLiteral;
+    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.propagatedType = node.propagatedType;
+      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.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitMapLiteralEntry(MapLiteralEntry node) {
+    MapLiteralEntry toNode = this._toNode as MapLiteralEntry;
+    return _and(
+        _isEqualNodes(node.key, toNode.key),
+        _isEqualTokens(node.separator, toNode.separator),
+        _isEqualNodes(node.value, toNode.value));
+  }
+
+  @override
+  bool visitMethodDeclaration(MethodDeclaration node) {
+    MethodDeclaration toNode = this._toNode as MethodDeclaration;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.externalKeyword, toNode.externalKeyword),
+        _isEqualTokens(node.modifierKeyword, toNode.modifierKeyword),
+        _isEqualNodes(node.returnType, toNode.returnType),
+        _isEqualTokens(node.propertyKeyword, toNode.propertyKeyword),
+        _isEqualTokens(node.propertyKeyword, toNode.propertyKeyword),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.parameters, toNode.parameters),
+        _isEqualNodes(node.body, toNode.body));
+  }
+
+  @override
+  bool visitMethodInvocation(MethodInvocation node) {
+    MethodInvocation toNode = this._toNode as MethodInvocation;
+    if (_and(
+        _isEqualNodes(node.target, toNode.target),
+        _isEqualTokens(node.operator, toNode.operator),
+        _isEqualNodes(node.methodName, toNode.methodName),
+        _isEqualNodes(node.argumentList, toNode.argumentList))) {
+      toNode.propagatedInvokeType = node.propagatedInvokeType;
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticInvokeType = node.staticInvokeType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitNamedExpression(NamedExpression node) {
+    NamedExpression toNode = this._toNode as NamedExpression;
+    if (_and(_isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.expression, toNode.expression))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitNativeClause(NativeClause node) {
+    NativeClause toNode = this._toNode as NativeClause;
+    return _and(_isEqualTokens(node.nativeKeyword, toNode.nativeKeyword),
+        _isEqualNodes(node.name, toNode.name));
+  }
+
+  @override
+  bool visitNativeFunctionBody(NativeFunctionBody node) {
+    NativeFunctionBody toNode = this._toNode as NativeFunctionBody;
+    return _and(
+        _isEqualTokens(node.nativeKeyword, toNode.nativeKeyword),
+        _isEqualNodes(node.stringLiteral, toNode.stringLiteral),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitNullLiteral(NullLiteral node) {
+    NullLiteral toNode = this._toNode as NullLiteral;
+    if (_isEqualTokens(node.literal, toNode.literal)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitParenthesizedExpression(ParenthesizedExpression node) {
+    ParenthesizedExpression toNode = this._toNode as ParenthesizedExpression;
+    if (_and(
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitPartDirective(PartDirective node) {
+    PartDirective toNode = this._toNode as PartDirective;
+    if (_and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.partKeyword, toNode.partKeyword),
+        _isEqualNodes(node.uri, toNode.uri),
+        _isEqualTokens(node.semicolon, toNode.semicolon))) {
+      toNode.element = node.element;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitPartOfDirective(PartOfDirective node) {
+    PartOfDirective toNode = this._toNode as PartOfDirective;
+    if (_and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.partKeyword, toNode.partKeyword),
+        _isEqualTokens(node.ofKeyword, toNode.ofKeyword),
+        _isEqualNodes(node.libraryName, toNode.libraryName),
+        _isEqualTokens(node.semicolon, toNode.semicolon))) {
+      toNode.element = node.element;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitPostfixExpression(PostfixExpression node) {
+    PostfixExpression toNode = this._toNode as PostfixExpression;
+    if (_and(_isEqualNodes(node.operand, toNode.operand),
+        _isEqualTokens(node.operator, toNode.operator))) {
+      toNode.propagatedElement = node.propagatedElement;
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticElement = node.staticElement;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitPrefixedIdentifier(PrefixedIdentifier node) {
+    PrefixedIdentifier toNode = this._toNode as PrefixedIdentifier;
+    if (_and(
+        _isEqualNodes(node.prefix, toNode.prefix),
+        _isEqualTokens(node.period, toNode.period),
+        _isEqualNodes(node.identifier, toNode.identifier))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitPrefixExpression(PrefixExpression node) {
+    PrefixExpression toNode = this._toNode as PrefixExpression;
+    if (_and(_isEqualTokens(node.operator, toNode.operator),
+        _isEqualNodes(node.operand, toNode.operand))) {
+      toNode.propagatedElement = node.propagatedElement;
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticElement = node.staticElement;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitPropertyAccess(PropertyAccess node) {
+    PropertyAccess toNode = this._toNode as PropertyAccess;
+    if (_and(
+        _isEqualNodes(node.target, toNode.target),
+        _isEqualTokens(node.operator, toNode.operator),
+        _isEqualNodes(node.propertyName, toNode.propertyName))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
+    RedirectingConstructorInvocation toNode =
+        this._toNode as RedirectingConstructorInvocation;
+    if (_and(
+        _isEqualTokens(node.thisKeyword, toNode.thisKeyword),
+        _isEqualTokens(node.period, toNode.period),
+        _isEqualNodes(node.constructorName, toNode.constructorName),
+        _isEqualNodes(node.argumentList, toNode.argumentList))) {
+      toNode.staticElement = node.staticElement;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitRethrowExpression(RethrowExpression node) {
+    RethrowExpression toNode = this._toNode as RethrowExpression;
+    if (_isEqualTokens(node.rethrowKeyword, toNode.rethrowKeyword)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitReturnStatement(ReturnStatement node) {
+    ReturnStatement toNode = this._toNode as ReturnStatement;
+    return _and(
+        _isEqualTokens(node.returnKeyword, toNode.returnKeyword),
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitScriptTag(ScriptTag node) {
+    ScriptTag toNode = this._toNode as ScriptTag;
+    return _isEqualTokens(node.scriptTag, toNode.scriptTag);
+  }
+
+  @override
+  bool visitShowCombinator(ShowCombinator node) {
+    ShowCombinator toNode = this._toNode as ShowCombinator;
+    return _and(_isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodeLists(node.shownNames, toNode.shownNames));
+  }
+
+  @override
+  bool visitSimpleFormalParameter(SimpleFormalParameter node) {
+    SimpleFormalParameter toNode = this._toNode as SimpleFormalParameter;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodes(node.type, toNode.type),
+        _isEqualNodes(node.identifier, toNode.identifier));
+  }
+
+  @override
+  bool visitSimpleIdentifier(SimpleIdentifier node) {
+    SimpleIdentifier toNode = this._toNode as SimpleIdentifier;
+    if (_isEqualTokens(node.token, toNode.token)) {
+      toNode.staticElement = node.staticElement;
+      toNode.staticType = node.staticType;
+      toNode.propagatedElement = node.propagatedElement;
+      toNode.propagatedType = node.propagatedType;
+      toNode.auxiliaryElements = node.auxiliaryElements;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitSimpleStringLiteral(SimpleStringLiteral node) {
+    SimpleStringLiteral toNode = this._toNode as SimpleStringLiteral;
+    if (_and(_isEqualTokens(node.literal, toNode.literal),
+        node.value == toNode.value)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitStringInterpolation(StringInterpolation node) {
+    StringInterpolation toNode = this._toNode as StringInterpolation;
+    if (_isEqualNodeLists(node.elements, toNode.elements)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+    SuperConstructorInvocation toNode =
+        this._toNode as SuperConstructorInvocation;
+    if (_and(
+        _isEqualTokens(node.superKeyword, toNode.superKeyword),
+        _isEqualTokens(node.period, toNode.period),
+        _isEqualNodes(node.constructorName, toNode.constructorName),
+        _isEqualNodes(node.argumentList, toNode.argumentList))) {
+      toNode.staticElement = node.staticElement;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitSuperExpression(SuperExpression node) {
+    SuperExpression toNode = this._toNode as SuperExpression;
+    if (_isEqualTokens(node.superKeyword, toNode.superKeyword)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitSwitchCase(SwitchCase node) {
+    SwitchCase toNode = this._toNode as SwitchCase;
+    return _and(
+        _isEqualNodeLists(node.labels, toNode.labels),
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.colon, toNode.colon),
+        _isEqualNodeLists(node.statements, toNode.statements));
+  }
+
+  @override
+  bool visitSwitchDefault(SwitchDefault node) {
+    SwitchDefault toNode = this._toNode as SwitchDefault;
+    return _and(
+        _isEqualNodeLists(node.labels, toNode.labels),
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualTokens(node.colon, toNode.colon),
+        _isEqualNodeLists(node.statements, toNode.statements));
+  }
+
+  @override
+  bool visitSwitchStatement(SwitchStatement node) {
+    SwitchStatement toNode = this._toNode as SwitchStatement;
+    return _and(
+        _isEqualTokens(node.switchKeyword, toNode.switchKeyword),
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodeLists(node.members, toNode.members),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket));
+  }
+
+  @override
+  bool visitSymbolLiteral(SymbolLiteral node) {
+    SymbolLiteral toNode = this._toNode as SymbolLiteral;
+    if (_and(_isEqualTokens(node.poundSign, toNode.poundSign),
+        _isEqualTokenLists(node.components, toNode.components))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitThisExpression(ThisExpression node) {
+    ThisExpression toNode = this._toNode as ThisExpression;
+    if (_isEqualTokens(node.thisKeyword, toNode.thisKeyword)) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitThrowExpression(ThrowExpression node) {
+    ThrowExpression toNode = this._toNode as ThrowExpression;
+    if (_and(_isEqualTokens(node.throwKeyword, toNode.throwKeyword),
+        _isEqualNodes(node.expression, toNode.expression))) {
+      toNode.propagatedType = node.propagatedType;
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    TopLevelVariableDeclaration toNode =
+        this._toNode as TopLevelVariableDeclaration;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualNodes(node.variables, toNode.variables),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitTryStatement(TryStatement node) {
+    TryStatement toNode = this._toNode as TryStatement;
+    return _and(
+        _isEqualTokens(node.tryKeyword, toNode.tryKeyword),
+        _isEqualNodes(node.body, toNode.body),
+        _isEqualNodeLists(node.catchClauses, toNode.catchClauses),
+        _isEqualTokens(node.finallyKeyword, toNode.finallyKeyword),
+        _isEqualNodes(node.finallyBlock, toNode.finallyBlock));
+  }
+
+  @override
+  bool visitTypeArgumentList(TypeArgumentList node) {
+    TypeArgumentList toNode = this._toNode as TypeArgumentList;
+    return _and(
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodeLists(node.arguments, toNode.arguments),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket));
+  }
+
+  @override
+  bool visitTypeName(TypeName node) {
+    TypeName toNode = this._toNode as TypeName;
+    if (_and(_isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.typeArguments, toNode.typeArguments))) {
+      toNode.type = node.type;
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitTypeParameter(TypeParameter node) {
+    TypeParameter toNode = this._toNode as TypeParameter;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualTokens(node.extendsKeyword, toNode.extendsKeyword),
+        _isEqualNodes(node.bound, toNode.bound));
+  }
+
+  @override
+  bool visitTypeParameterList(TypeParameterList node) {
+    TypeParameterList toNode = this._toNode as TypeParameterList;
+    return _and(
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodeLists(node.typeParameters, toNode.typeParameters),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket));
+  }
+
+  @override
+  bool visitVariableDeclaration(VariableDeclaration node) {
+    VariableDeclaration toNode = this._toNode as VariableDeclaration;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualTokens(node.equals, toNode.equals),
+        _isEqualNodes(node.initializer, toNode.initializer));
+  }
+
+  @override
+  bool visitVariableDeclarationList(VariableDeclarationList node) {
+    VariableDeclarationList toNode = this._toNode as VariableDeclarationList;
+    return _and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.keyword, toNode.keyword),
+        _isEqualNodes(node.type, toNode.type),
+        _isEqualNodeLists(node.variables, toNode.variables));
+  }
+
+  @override
+  bool visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+    VariableDeclarationStatement toNode =
+        this._toNode as VariableDeclarationStatement;
+    return _and(_isEqualNodes(node.variables, toNode.variables),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  @override
+  bool visitWhileStatement(WhileStatement node) {
+    WhileStatement toNode = this._toNode as WhileStatement;
+    return _and(
+        _isEqualTokens(node.whileKeyword, toNode.whileKeyword),
+        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
+        _isEqualNodes(node.condition, toNode.condition),
+        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
+        _isEqualNodes(node.body, toNode.body));
+  }
+
+  @override
+  bool visitWithClause(WithClause node) {
+    WithClause toNode = this._toNode as WithClause;
+    return _and(_isEqualTokens(node.withKeyword, toNode.withKeyword),
+        _isEqualNodeLists(node.mixinTypes, toNode.mixinTypes));
+  }
+
+  @override
+  bool visitYieldStatement(YieldStatement node) {
+    YieldStatement toNode = this._toNode as YieldStatement;
+    return _and(
+        _isEqualTokens(node.yieldKeyword, toNode.yieldKeyword),
+        _isEqualNodes(node.expression, toNode.expression),
+        _isEqualTokens(node.semicolon, toNode.semicolon));
+  }
+
+  /**
+   * Return `true` if all of the parameters are `true`.
+   */
+  bool _and(bool b1, bool b2,
+      [bool b3 = true,
+      bool b4 = true,
+      bool b5 = true,
+      bool b6 = true,
+      bool b7 = true,
+      bool b8 = true,
+      bool b9 = true,
+      bool b10 = true,
+      bool b11 = true,
+      bool b12 = true,
+      bool b13 = true]) {
+    // TODO(brianwilkerson) Inline this method.
+    return b1 &&
+        b2 &&
+        b3 &&
+        b4 &&
+        b5 &&
+        b6 &&
+        b7 &&
+        b8 &&
+        b9 &&
+        b10 &&
+        b11 &&
+        b12 &&
+        b13;
+  }
+
+  /**
+   * Return `true` if the [first] and [second] lists of AST nodes have the same
+   * size and corresponding elements are equal.
+   */
+  bool _isEqualNodeLists(NodeList first, NodeList second) {
+    if (first == null) {
+      return second == null;
+    } else if (second == null) {
+      return false;
+    }
+    int size = first.length;
+    if (second.length != size) {
+      return false;
+    }
+    bool equal = true;
+    for (int i = 0; i < size; i++) {
+      if (!_isEqualNodes(first[i], second[i])) {
+        equal = false;
+      }
+    }
+    return equal;
+  }
+
+  /**
+   * Return `true` if the [fromNode] and [toNode] have the same structure. As a
+   * side-effect, if the nodes do have the same structure, any resolution data
+   * from the first node will be copied to the second node.
+   */
+  bool _isEqualNodes(AstNode fromNode, AstNode toNode) {
+    if (fromNode == null) {
+      return toNode == null;
+    } else if (toNode == null) {
+      return false;
+    } else if (fromNode.runtimeType == toNode.runtimeType) {
+      this._toNode = toNode;
+      return fromNode.accept(this);
+    }
+    //
+    // Check for a simple transformation caused by entering a period.
+    //
+    if (toNode is PrefixedIdentifier) {
+      SimpleIdentifier prefix = toNode.prefix;
+      if (fromNode.runtimeType == prefix.runtimeType) {
+        this._toNode = prefix;
+        return fromNode.accept(this);
+      }
+    } else if (toNode is PropertyAccess) {
+      Expression target = toNode.target;
+      if (fromNode.runtimeType == target.runtimeType) {
+        this._toNode = target;
+        return fromNode.accept(this);
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Return `true` if the [first] and [second] arrays of tokens have the same
+   * length and corresponding elements are equal.
+   */
+  bool _isEqualTokenLists(List<Token> first, List<Token> second) {
+    int length = first.length;
+    if (second.length != length) {
+      return false;
+    }
+    for (int i = 0; i < length; i++) {
+      if (!_isEqualTokens(first[i], second[i])) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Return `true` if the [first] and [second] tokens have the same structure.
+   */
+  bool _isEqualTokens(Token first, Token second) {
+    if (first == null) {
+      return second == null;
+    } else if (second == null) {
+      return false;
+    }
+    return first.lexeme == second.lexeme;
+  }
+
+  /**
+   * Copy resolution data from the [fromNode] to the [toNode].
+   */
+  static void copyResolutionData(AstNode fromNode, AstNode toNode) {
+    ResolutionCopier copier = new ResolutionCopier();
+    copier._isEqualNodes(fromNode, toNode);
+  }
+}
+
+/**
  * Traverse the AST from initial child node to successive parents, building a
  * collection of local variable and parameter names visible to the initial child
  * node. In case of name shadowing, the first name seen is the most specific one
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
new file mode 100644
index 0000000..2bf03d5
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -0,0 +1,2004 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.src.dart.constant.evaluation;
+
+import 'dart:collection';
+
+import 'package:analyzer/context/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';
+import 'package:analyzer/dart/element/type.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';
+import 'package:analyzer/src/dart/element/member.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/engine.dart'
+    show AnalysisEngine, RecordingErrorListener;
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
+import 'package:analyzer/src/generated/source.dart' show Source;
+import 'package:analyzer/src/generated/type_system.dart'
+    show TypeSystem, TypeSystemImpl;
+import 'package:analyzer/src/generated/utilities_collection.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart' show ParameterKind;
+import 'package:analyzer/src/task/dart.dart';
+
+/**
+ * Helper class encapsulating the methods for evaluating constants and
+ * constant instance creation expressions.
+ */
+class ConstantEvaluationEngine {
+  /**
+   * Parameter to "fromEnvironment" methods that denotes the default value.
+   */
+  static String _DEFAULT_VALUE_PARAM = "defaultValue";
+
+  /**
+   * Source of RegExp matching any public identifier.
+   * From sdk/lib/internal/symbol.dart.
+   */
+  static String _PUBLIC_IDENTIFIER_RE =
+      "(?!${ConstantValueComputer._RESERVED_WORD_RE}\\b(?!\\\$))[a-zA-Z\$][\\w\$]*";
+
+  /**
+   * RegExp that validates a non-empty non-private symbol.
+   * From sdk/lib/internal/symbol.dart.
+   */
+  static RegExp _PUBLIC_SYMBOL_PATTERN = new RegExp(
+      "^(?:${ConstantValueComputer._OPERATOR_RE}\$|$_PUBLIC_IDENTIFIER_RE(?:=?\$|[.](?!\$)))+?\$");
+
+  /**
+   * The type provider used to access the known types.
+   */
+  final TypeProvider typeProvider;
+
+  /**
+   * The type system.  This is used to guess the types of constants when their
+   * exact value is unknown.
+   */
+  final TypeSystem typeSystem;
+
+  /**
+   * The set of variables declared on the command line using '-D'.
+   */
+  final DeclaredVariables _declaredVariables;
+
+  /**
+   * Validator used to verify correct dependency analysis when running unit
+   * tests.
+   */
+  final ConstantEvaluationValidator validator;
+
+  /**
+   * Initialize a newly created [ConstantEvaluationEngine].  The [typeProvider]
+   * is used to access known types.  [_declaredVariables] is the set of
+   * variables declared on the command line using '-D'.  The [validator], if
+   * given, is used to verify correct dependency analysis when running unit
+   * tests.
+   */
+  ConstantEvaluationEngine(this.typeProvider, this._declaredVariables,
+      {ConstantEvaluationValidator validator, TypeSystem typeSystem})
+      : validator = validator != null
+            ? validator
+            : new ConstantEvaluationValidator_ForProduction(),
+        typeSystem = typeSystem != null ? typeSystem : new TypeSystemImpl();
+
+  /**
+   * Check that the arguments to a call to fromEnvironment() are correct. The
+   * [arguments] are the AST nodes of the arguments. The [argumentValues] are
+   * the values of the unnamed arguments. The [namedArgumentValues] are the
+   * values of the named arguments. The [expectedDefaultValueType] is the
+   * allowed type of the "defaultValue" parameter (if present). Note:
+   * "defaultValue" is always allowed to be null. Return `true` if the arguments
+   * are correct, `false` if there is an error.
+   */
+  bool checkFromEnvironmentArguments(
+      NodeList<Expression> arguments,
+      List<DartObjectImpl> argumentValues,
+      HashMap<String, DartObjectImpl> namedArgumentValues,
+      InterfaceType expectedDefaultValueType) {
+    int argumentCount = arguments.length;
+    if (argumentCount < 1 || argumentCount > 2) {
+      return false;
+    }
+    if (arguments[0] is NamedExpression) {
+      return false;
+    }
+    if (!identical(argumentValues[0].type, typeProvider.stringType)) {
+      return false;
+    }
+    if (argumentCount == 2) {
+      if (arguments[1] is! NamedExpression) {
+        return false;
+      }
+      if (!((arguments[1] as NamedExpression).name.label.name ==
+          _DEFAULT_VALUE_PARAM)) {
+        return false;
+      }
+      ParameterizedType defaultValueType =
+          namedArgumentValues[_DEFAULT_VALUE_PARAM].type;
+      if (!(identical(defaultValueType, expectedDefaultValueType) ||
+          identical(defaultValueType, typeProvider.nullType))) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Check that the arguments to a call to Symbol() are correct. The [arguments]
+   * are the AST nodes of the arguments. The [argumentValues] are the values of
+   * the unnamed arguments. The [namedArgumentValues] are the values of the
+   * named arguments. Return `true` if the arguments are correct, `false` if
+   * there is an error.
+   */
+  bool checkSymbolArguments(
+      NodeList<Expression> arguments,
+      List<DartObjectImpl> argumentValues,
+      HashMap<String, DartObjectImpl> namedArgumentValues) {
+    if (arguments.length != 1) {
+      return false;
+    }
+    if (arguments[0] is NamedExpression) {
+      return false;
+    }
+    if (!identical(argumentValues[0].type, typeProvider.stringType)) {
+      return false;
+    }
+    String name = argumentValues[0].toStringValue();
+    return isValidPublicSymbol(name);
+  }
+
+  /**
+   * Compute the constant value associated with the given [constant].
+   */
+  void computeConstantValue(ConstantEvaluationTarget constant) {
+    validator.beforeComputeValue(constant);
+    if (constant is ParameterElementImpl) {
+      Expression defaultValue = constant.constantInitializer;
+      if (defaultValue != null) {
+        RecordingErrorListener errorListener = new RecordingErrorListener();
+        ErrorReporter errorReporter =
+            new ErrorReporter(errorListener, constant.source);
+        DartObjectImpl dartObject =
+            defaultValue.accept(new ConstantVisitor(this, errorReporter));
+        constant.evaluationResult =
+            new EvaluationResultImpl(dartObject, errorListener.errors);
+      }
+    } else if (constant is VariableElementImpl) {
+      Expression constantInitializer = constant.constantInitializer;
+      if (constantInitializer != null) {
+        RecordingErrorListener errorListener = new RecordingErrorListener();
+        ErrorReporter errorReporter =
+            new ErrorReporter(errorListener, constant.source);
+        DartObjectImpl dartObject = constantInitializer
+            .accept(new ConstantVisitor(this, errorReporter));
+        // Only check the type for truly const declarations (don't check final
+        // fields with initializers, since their types may be generic.  The type
+        // of the final field will be checked later, when the constructor is
+        // invoked).
+        if (dartObject != null && constant.isConst) {
+          if (!runtimeTypeMatch(dartObject, constant.type)) {
+            errorReporter.reportErrorForElement(
+                CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
+                constant,
+                [dartObject.type, constant.type]);
+          }
+        }
+        constant.evaluationResult =
+            new EvaluationResultImpl(dartObject, errorListener.errors);
+      }
+    } else if (constant is ConstructorElement) {
+      if (constant.isConst) {
+        // No evaluation needs to be done; constructor declarations are only in
+        // the dependency graph to ensure that any constants referred to in
+        // initializer lists and parameter defaults are evaluated before
+        // invocations of the constructor.  However we do need to annotate the
+        // element as being free of constant evaluation cycles so that later
+        // code will know that it is safe to evaluate.
+        (constant as ConstructorElementImpl).isCycleFree = true;
+      }
+    } else if (constant is ElementAnnotationImpl) {
+      Annotation constNode = constant.annotationAst;
+      Element element = constant.element;
+      if (element is PropertyAccessorElement &&
+          element.variable is VariableElementImpl) {
+        // The annotation is a reference to a compile-time constant variable.
+        // Just copy the evaluation result.
+        VariableElementImpl variableElement =
+            element.variable as VariableElementImpl;
+        if (variableElement.evaluationResult != null) {
+          constant.evaluationResult = variableElement.evaluationResult;
+        } else {
+          // This could happen in the event that the annotation refers to a
+          // non-constant.  The error is detected elsewhere, so just silently
+          // ignore it here.
+          constant.evaluationResult = new EvaluationResultImpl(null);
+        }
+      } else if (element is ConstructorElementImpl &&
+          element.isConst &&
+          constNode.arguments != null) {
+        RecordingErrorListener errorListener = new RecordingErrorListener();
+        ErrorReporter errorReporter =
+            new ErrorReporter(errorListener, constant.source);
+        ConstantVisitor constantVisitor =
+            new ConstantVisitor(this, errorReporter);
+        DartObjectImpl result = evaluateConstructorCall(
+            constNode,
+            constNode.arguments.arguments,
+            element,
+            constantVisitor,
+            errorReporter);
+        constant.evaluationResult =
+            new EvaluationResultImpl(result, errorListener.errors);
+      } else {
+        // This may happen for invalid code (e.g. failing to pass arguments
+        // to an annotation which references a const constructor).  The error
+        // is detected elsewhere, so just silently ignore it here.
+        constant.evaluationResult = new EvaluationResultImpl(null);
+      }
+    } else if (constant is VariableElement) {
+      // constant is a VariableElement but not a VariableElementImpl.  This can
+      // happen sometimes in the case of invalid user code (for example, a
+      // constant expression that refers to a non-static field inside a generic
+      // class will wind up referring to a FieldMember).  The error is detected
+      // elsewhere, so just silently ignore it here.
+    } else {
+      // Should not happen.
+      assert(false);
+      AnalysisEngine.instance.logger.logError(
+          "Constant value computer trying to compute the value of a node of type ${constant.runtimeType}");
+      return;
+    }
+  }
+
+  /**
+   * Determine which constant elements need to have their values computed
+   * prior to computing the value of [constant], and report them using
+   * [callback].
+   */
+  void computeDependencies(
+      ConstantEvaluationTarget constant, ReferenceFinderCallback callback) {
+    ReferenceFinder referenceFinder = new ReferenceFinder(callback);
+    if (constant is ConstructorElement) {
+      constant = getConstructorImpl(constant);
+    }
+    if (constant is VariableElementImpl) {
+      Expression initializer = constant.constantInitializer;
+      if (initializer != null) {
+        initializer.accept(referenceFinder);
+      }
+    } else if (constant is ConstructorElementImpl) {
+      if (constant.isConst) {
+        constant.isCycleFree = false;
+        ConstructorElement redirectedConstructor =
+            getConstRedirectedConstructor(constant);
+        if (redirectedConstructor != null) {
+          ConstructorElement redirectedConstructorBase =
+              getConstructorImpl(redirectedConstructor);
+          callback(redirectedConstructorBase);
+          return;
+        } else if (constant.isFactory) {
+          // Factory constructor, but getConstRedirectedConstructor returned
+          // null.  This can happen if we're visiting one of the special external
+          // const factory constructors in the SDK, or if the code contains
+          // errors (such as delegating to a non-const constructor, or delegating
+          // to a constructor that can't be resolved).  In any of these cases,
+          // we'll evaluate calls to this constructor without having to refer to
+          // any other constants.  So we don't need to report any dependencies.
+          return;
+        }
+        bool defaultSuperInvocationNeeded = true;
+        List<ConstructorInitializer> initializers =
+            constant.constantInitializers;
+        for (ConstructorInitializer initializer in initializers) {
+          if (initializer is SuperConstructorInvocation ||
+              initializer is RedirectingConstructorInvocation) {
+            defaultSuperInvocationNeeded = false;
+          }
+          initializer.accept(referenceFinder);
+        }
+        if (defaultSuperInvocationNeeded) {
+          // No explicit superconstructor invocation found, so we need to
+          // manually insert a reference to the implicit superconstructor.
+          InterfaceType superclass =
+              (constant.returnType as InterfaceType).superclass;
+          if (superclass != null && !superclass.isObject) {
+            ConstructorElement unnamedConstructor =
+                getConstructorImpl(superclass.element.unnamedConstructor);
+            if (unnamedConstructor != null) {
+              callback(unnamedConstructor);
+            }
+          }
+        }
+        for (FieldElement field in constant.enclosingElement.fields) {
+          // Note: non-static const isn't allowed but we handle it anyway so
+          // that we won't be confused by incorrect code.
+          if ((field.isFinal || field.isConst) &&
+              !field.isStatic &&
+              field.initializer != null) {
+            callback(field);
+          }
+        }
+        for (ParameterElement parameterElement in constant.parameters) {
+          callback(parameterElement);
+        }
+      }
+    } else if (constant is ElementAnnotationImpl) {
+      Annotation constNode = constant.annotationAst;
+      Element element = constant.element;
+      if (element is PropertyAccessorElement &&
+          element.variable is VariableElementImpl) {
+        // The annotation is a reference to a compile-time constant variable,
+        // so it depends on the variable.
+        callback(element.variable);
+      } else if (element is ConstructorElementImpl) {
+        // The annotation is a constructor invocation, so it depends on the
+        // constructor.
+        callback(element);
+      } else {
+        // This could happen in the event of invalid code.  The error will be
+        // reported at constant evaluation time.
+      }
+      if (constNode.arguments != null) {
+        constNode.arguments.accept(referenceFinder);
+      }
+    } else if (constant is VariableElement) {
+      // constant is a VariableElement but not a VariableElementImpl.  This can
+      // happen sometimes in the case of invalid user code (for example, a
+      // constant expression that refers to a non-static field inside a generic
+      // class will wind up referring to a FieldMember).  So just don't bother
+      // computing any dependencies.
+    } else {
+      // Should not happen.
+      assert(false);
+      AnalysisEngine.instance.logger.logError(
+          "Constant value computer trying to compute the value of a node of type ${constant.runtimeType}");
+    }
+  }
+
+  /**
+   * Evaluate a call to fromEnvironment() on the bool, int, or String class. The
+   * [environmentValue] is the value fetched from the environment. The
+   * [builtInDefaultValue] is the value that should be used as the default if no
+   * "defaultValue" argument appears in [namedArgumentValues]. The
+   * [namedArgumentValues] are the values of the named parameters passed to
+   * fromEnvironment(). Return a [DartObjectImpl] object corresponding to the
+   * evaluated result.
+   */
+  DartObjectImpl computeValueFromEnvironment(
+      DartObject environmentValue,
+      DartObjectImpl builtInDefaultValue,
+      HashMap<String, DartObjectImpl> namedArgumentValues) {
+    DartObjectImpl value = environmentValue as DartObjectImpl;
+    if (value.isUnknown || value.isNull) {
+      // The name either doesn't exist in the environment or we couldn't parse
+      // the corresponding value.
+      // If the code supplied an explicit default, use it.
+      if (namedArgumentValues.containsKey(_DEFAULT_VALUE_PARAM)) {
+        value = namedArgumentValues[_DEFAULT_VALUE_PARAM];
+      } else if (value.isNull) {
+        // The code didn't supply an explicit default.
+        // The name exists in the environment but we couldn't parse the
+        // corresponding value.
+        // So use the built-in default value, because this is what the VM does.
+        value = builtInDefaultValue;
+      } else {
+        // The code didn't supply an explicit default.
+        // The name doesn't exist in the environment.
+        // The VM would use the built-in default value, but we don't want to do
+        // that for analysis because it's likely to lead to cascading errors.
+        // So just leave [value] in the unknown state.
+      }
+    }
+    return value;
+  }
+
+  DartObjectImpl evaluateConstructorCall(
+      AstNode node,
+      NodeList<Expression> arguments,
+      ConstructorElement constructor,
+      ConstantVisitor constantVisitor,
+      ErrorReporter errorReporter) {
+    if (!getConstructorImpl(constructor).isCycleFree) {
+      // It's not safe to evaluate this constructor, so bail out.
+      // TODO(paulberry): ensure that a reasonable error message is produced
+      // in this case, as well as other cases involving constant expression
+      // circularities (e.g. "compile-time constant expression depends on
+      // itself")
+      return new DartObjectImpl.validWithUnknownValue(constructor.returnType);
+    }
+    int argumentCount = arguments.length;
+    List<DartObjectImpl> argumentValues =
+        new List<DartObjectImpl>(argumentCount);
+    List<Expression> argumentNodes = new List<Expression>(argumentCount);
+    HashMap<String, DartObjectImpl> namedArgumentValues =
+        new HashMap<String, DartObjectImpl>();
+    HashMap<String, NamedExpression> namedArgumentNodes =
+        new HashMap<String, NamedExpression>();
+    for (int i = 0; i < argumentCount; i++) {
+      Expression argument = arguments[i];
+      if (argument is NamedExpression) {
+        String name = argument.name.label.name;
+        namedArgumentValues[name] =
+            constantVisitor._valueOf(argument.expression);
+        namedArgumentNodes[name] = argument;
+        argumentValues[i] = typeProvider.nullObject;
+      } else {
+        argumentValues[i] = constantVisitor._valueOf(argument);
+        argumentNodes[i] = argument;
+      }
+    }
+    constructor = followConstantRedirectionChain(constructor);
+    InterfaceType definingClass = constructor.returnType as InterfaceType;
+    if (constructor.isFactory) {
+      // We couldn't find a non-factory constructor.
+      // See if it's because we reached an external const factory constructor
+      // that we can emulate.
+      if (constructor.name == "fromEnvironment") {
+        if (!checkFromEnvironmentArguments(
+            arguments, argumentValues, namedArgumentValues, definingClass)) {
+          errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
+          return null;
+        }
+        String variableName =
+            argumentCount < 1 ? null : argumentValues[0].toStringValue();
+        if (identical(definingClass, typeProvider.boolType)) {
+          DartObject valueFromEnvironment;
+          valueFromEnvironment =
+              _declaredVariables.getBool(typeProvider, variableName);
+          return computeValueFromEnvironment(
+              valueFromEnvironment,
+              new DartObjectImpl(typeProvider.boolType, BoolState.FALSE_STATE),
+              namedArgumentValues);
+        } else if (identical(definingClass, typeProvider.intType)) {
+          DartObject valueFromEnvironment;
+          valueFromEnvironment =
+              _declaredVariables.getInt(typeProvider, variableName);
+          return computeValueFromEnvironment(
+              valueFromEnvironment,
+              new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE),
+              namedArgumentValues);
+        } else if (identical(definingClass, typeProvider.stringType)) {
+          DartObject valueFromEnvironment;
+          valueFromEnvironment =
+              _declaredVariables.getString(typeProvider, variableName);
+          return computeValueFromEnvironment(
+              valueFromEnvironment,
+              new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE),
+              namedArgumentValues);
+        }
+      } else if (constructor.name == "" &&
+          identical(definingClass, typeProvider.symbolType) &&
+          argumentCount == 1) {
+        if (!checkSymbolArguments(
+            arguments, argumentValues, namedArgumentValues)) {
+          errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
+          return null;
+        }
+        String argumentValue = argumentValues[0].toStringValue();
+        return new DartObjectImpl(
+            definingClass, new SymbolState(argumentValue));
+      }
+      // Either it's an external const factory constructor that we can't
+      // emulate, or an error occurred (a cycle, or a const constructor trying
+      // to delegate to a non-const constructor).
+      // In the former case, the best we can do is consider it an unknown value.
+      // In the latter case, the error has already been reported, so considering
+      // it an unknown value will suppress further errors.
+      return new DartObjectImpl.validWithUnknownValue(definingClass);
+    }
+    ConstructorElementImpl constructorBase = getConstructorImpl(constructor);
+    validator.beforeGetConstantInitializers(constructorBase);
+    List<ConstructorInitializer> initializers =
+        constructorBase.constantInitializers;
+    if (initializers == null) {
+      // This can happen in some cases where there are compile errors in the
+      // code being analyzed (for example if the code is trying to create a
+      // const instance using a non-const constructor, or the node we're
+      // visiting is involved in a cycle).  The error has already been reported,
+      // so consider it an unknown value to suppress further errors.
+      return new DartObjectImpl.validWithUnknownValue(definingClass);
+    }
+    HashMap<String, DartObjectImpl> fieldMap =
+        new HashMap<String, DartObjectImpl>();
+    // Start with final fields that are initialized at their declaration site.
+    for (FieldElement field in constructor.enclosingElement.fields) {
+      if ((field.isFinal || field.isConst) &&
+          !field.isStatic &&
+          field is ConstFieldElementImpl) {
+        validator.beforeGetFieldEvaluationResult(field);
+        EvaluationResultImpl evaluationResult = field.evaluationResult;
+        // It is possible that the evaluation result is null.
+        // This happens for example when we have duplicate fields.
+        // class Test {final x = 1; final x = 2; const Test();}
+        if (evaluationResult == null) {
+          continue;
+        }
+        // Match the value and the type.
+        DartType fieldType =
+            FieldMember.from(field, constructor.returnType).type;
+        DartObjectImpl fieldValue = evaluationResult.value;
+        if (fieldValue != null && !runtimeTypeMatch(fieldValue, fieldType)) {
+          errorReporter.reportErrorForNode(
+              CheckedModeCompileTimeErrorCode
+                  .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+              node,
+              [fieldValue.type, field.name, fieldType]);
+        }
+        fieldMap[field.name] = fieldValue;
+      }
+    }
+    // Now evaluate the constructor declaration.
+    HashMap<String, DartObjectImpl> parameterMap =
+        new HashMap<String, DartObjectImpl>();
+    List<ParameterElement> parameters = constructor.parameters;
+    int parameterCount = parameters.length;
+    for (int i = 0; i < parameterCount; i++) {
+      ParameterElement parameter = parameters[i];
+      ParameterElement baseParameter = parameter;
+      while (baseParameter is ParameterMember) {
+        baseParameter = (baseParameter as ParameterMember).baseElement;
+      }
+      DartObjectImpl argumentValue = null;
+      AstNode errorTarget = null;
+      if (baseParameter.parameterKind == ParameterKind.NAMED) {
+        argumentValue = namedArgumentValues[baseParameter.name];
+        errorTarget = namedArgumentNodes[baseParameter.name];
+      } else if (i < argumentCount) {
+        argumentValue = argumentValues[i];
+        errorTarget = argumentNodes[i];
+      }
+      if (errorTarget == null) {
+        // No argument node that we can direct error messages to, because we
+        // are handling an optional parameter that wasn't specified.  So just
+        // direct error messages to the constructor call.
+        errorTarget = node;
+      }
+      if (argumentValue == null && baseParameter is ParameterElementImpl) {
+        // The parameter is an optional positional parameter for which no value
+        // was provided, so use the default value.
+        validator.beforeGetParameterDefault(baseParameter);
+        EvaluationResultImpl evaluationResult = baseParameter.evaluationResult;
+        if (evaluationResult == null) {
+          // No default was provided, so the default value is null.
+          argumentValue = typeProvider.nullObject;
+        } else if (evaluationResult.value != null) {
+          argumentValue = evaluationResult.value;
+        }
+      }
+      if (argumentValue != null) {
+        if (!runtimeTypeMatch(argumentValue, parameter.type)) {
+          errorReporter.reportErrorForNode(
+              CheckedModeCompileTimeErrorCode
+                  .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+              errorTarget,
+              [argumentValue.type, parameter.type]);
+        }
+        if (baseParameter.isInitializingFormal) {
+          FieldElement field = (parameter as FieldFormalParameterElement).field;
+          if (field != null) {
+            DartType fieldType = field.type;
+            if (fieldType != parameter.type) {
+              // We've already checked that the argument can be assigned to the
+              // parameter; we also need to check that it can be assigned to
+              // the field.
+              if (!runtimeTypeMatch(argumentValue, fieldType)) {
+                errorReporter.reportErrorForNode(
+                    CheckedModeCompileTimeErrorCode
+                        .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+                    errorTarget,
+                    [argumentValue.type, fieldType]);
+              }
+            }
+            String fieldName = field.name;
+            if (fieldMap.containsKey(fieldName)) {
+              errorReporter.reportErrorForNode(
+                  CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
+            }
+            fieldMap[fieldName] = argumentValue;
+          }
+        } else {
+          String name = baseParameter.name;
+          parameterMap[name] = argumentValue;
+        }
+      }
+    }
+    ConstantVisitor initializerVisitor = new ConstantVisitor(
+        this, errorReporter,
+        lexicalEnvironment: parameterMap);
+    String superName = null;
+    NodeList<Expression> superArguments = null;
+    for (ConstructorInitializer initializer in initializers) {
+      if (initializer is ConstructorFieldInitializer) {
+        ConstructorFieldInitializer constructorFieldInitializer = initializer;
+        Expression initializerExpression =
+            constructorFieldInitializer.expression;
+        DartObjectImpl evaluationResult =
+            initializerExpression.accept(initializerVisitor);
+        if (evaluationResult != null) {
+          String fieldName = constructorFieldInitializer.fieldName.name;
+          if (fieldMap.containsKey(fieldName)) {
+            errorReporter.reportErrorForNode(
+                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
+          }
+          fieldMap[fieldName] = evaluationResult;
+          PropertyAccessorElement getter = definingClass.getGetter(fieldName);
+          if (getter != null) {
+            PropertyInducingElement field = getter.variable;
+            if (!runtimeTypeMatch(evaluationResult, field.type)) {
+              errorReporter.reportErrorForNode(
+                  CheckedModeCompileTimeErrorCode
+                      .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+                  node,
+                  [evaluationResult.type, fieldName, field.type]);
+            }
+          }
+        }
+      } else if (initializer is SuperConstructorInvocation) {
+        SuperConstructorInvocation superConstructorInvocation = initializer;
+        SimpleIdentifier name = superConstructorInvocation.constructorName;
+        if (name != null) {
+          superName = name.name;
+        }
+        superArguments = superConstructorInvocation.argumentList.arguments;
+      } else if (initializer is RedirectingConstructorInvocation) {
+        // This is a redirecting constructor, so just evaluate the constructor
+        // it redirects to.
+        ConstructorElement constructor = initializer.staticElement;
+        if (constructor != null && constructor.isConst) {
+          return evaluateConstructorCall(
+              node,
+              initializer.argumentList.arguments,
+              constructor,
+              initializerVisitor,
+              errorReporter);
+        }
+      }
+    }
+    // Evaluate explicit or implicit call to super().
+    InterfaceType superclass = definingClass.superclass;
+    if (superclass != null && !superclass.isObject) {
+      ConstructorElement superConstructor =
+          superclass.lookUpConstructor(superName, constructor.library);
+      if (superConstructor != null) {
+        if (superArguments == null) {
+          superArguments = new NodeList<Expression>(null);
+        }
+        evaluateSuperConstructorCall(node, fieldMap, superConstructor,
+            superArguments, initializerVisitor, errorReporter);
+      }
+    }
+    return new DartObjectImpl(definingClass, new GenericState(fieldMap));
+  }
+
+  void evaluateSuperConstructorCall(
+      AstNode node,
+      HashMap<String, DartObjectImpl> fieldMap,
+      ConstructorElement superConstructor,
+      NodeList<Expression> superArguments,
+      ConstantVisitor initializerVisitor,
+      ErrorReporter errorReporter) {
+    if (superConstructor != null && superConstructor.isConst) {
+      DartObjectImpl evaluationResult = evaluateConstructorCall(node,
+          superArguments, superConstructor, initializerVisitor, errorReporter);
+      if (evaluationResult != null) {
+        fieldMap[GenericState.SUPERCLASS_FIELD] = evaluationResult;
+      }
+    }
+  }
+
+  /**
+   * Attempt to follow the chain of factory redirections until a constructor is
+   * reached which is not a const factory constructor. Return the constant
+   * constructor which terminates the chain of factory redirections, if the
+   * chain terminates. If there is a problem (e.g. a redirection can't be found,
+   * or a cycle is encountered), the chain will be followed as far as possible
+   * and then a const factory constructor will be returned.
+   */
+  ConstructorElement followConstantRedirectionChain(
+      ConstructorElement constructor) {
+    HashSet<ConstructorElement> constructorsVisited =
+        new HashSet<ConstructorElement>();
+    while (true) {
+      ConstructorElement redirectedConstructor =
+          getConstRedirectedConstructor(constructor);
+      if (redirectedConstructor == null) {
+        break;
+      } else {
+        ConstructorElement constructorBase = getConstructorImpl(constructor);
+        constructorsVisited.add(constructorBase);
+        ConstructorElement redirectedConstructorBase =
+            getConstructorImpl(redirectedConstructor);
+        if (constructorsVisited.contains(redirectedConstructorBase)) {
+          // Cycle in redirecting factory constructors--this is not allowed
+          // and is checked elsewhere--see
+          // [ErrorVerifier.checkForRecursiveFactoryRedirect()]).
+          break;
+        }
+      }
+      constructor = redirectedConstructor;
+    }
+    return constructor;
+  }
+
+  /**
+   * Generate an error indicating that the given [constant] is not a valid
+   * compile-time constant because it references at least one of the constants
+   * in the given [cycle], each of which directly or indirectly references the
+   * constant.
+   */
+  void generateCycleError(Iterable<ConstantEvaluationTarget> cycle,
+      ConstantEvaluationTarget constant) {
+    if (constant is VariableElement) {
+      RecordingErrorListener errorListener = new RecordingErrorListener();
+      ErrorReporter errorReporter =
+          new ErrorReporter(errorListener, constant.source);
+      // TODO(paulberry): It would be really nice if we could extract enough
+      // information from the 'cycle' argument to provide the user with a
+      // description of the cycle.
+      errorReporter.reportErrorForElement(
+          CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, constant, []);
+      (constant as VariableElementImpl).evaluationResult =
+          new EvaluationResultImpl(null, errorListener.errors);
+    } else if (constant is ConstructorElement) {
+      // We don't report cycle errors on constructor declarations since there
+      // is nowhere to put the error information.
+    } else {
+      // Should not happen.  Formal parameter defaults and annotations should
+      // never appear as part of a cycle because they can't be referred to.
+      assert(false);
+      AnalysisEngine.instance.logger.logError(
+          "Constant value computer trying to report a cycle error for a node of type ${constant.runtimeType}");
+    }
+  }
+
+  /**
+   * If [constructor] redirects to another const constructor, return the
+   * const constructor it redirects to.  Otherwise return `null`.
+   */
+  ConstructorElement getConstRedirectedConstructor(
+      ConstructorElement constructor) {
+    if (!constructor.isFactory) {
+      return null;
+    }
+    if (identical(constructor.enclosingElement.type, typeProvider.symbolType)) {
+      // The dart:core.Symbol has a const factory constructor that redirects
+      // to dart:_internal.Symbol.  That in turn redirects to an external
+      // const constructor, which we won't be able to evaluate.
+      // So stop following the chain of redirections at dart:core.Symbol, and
+      // let [evaluateInstanceCreationExpression] handle it specially.
+      return null;
+    }
+    ConstructorElement redirectedConstructor =
+        constructor.redirectedConstructor;
+    if (redirectedConstructor == null) {
+      // This can happen if constructor is an external factory constructor.
+      return null;
+    }
+    if (!redirectedConstructor.isConst) {
+      // Delegating to a non-const constructor--this is not allowed (and
+      // is checked elsewhere--see
+      // [ErrorVerifier.checkForRedirectToNonConstConstructor()]).
+      return null;
+    }
+    return redirectedConstructor;
+  }
+
+  /**
+   * Check if the object [obj] matches the type [type] according to runtime type
+   * checking rules.
+   */
+  bool runtimeTypeMatch(DartObjectImpl obj, DartType type) {
+    if (obj.isNull) {
+      return true;
+    }
+    if (type.isUndefined) {
+      return false;
+    }
+    return obj.type.isSubtypeOf(type);
+  }
+
+  /**
+   * Determine whether the given string is a valid name for a public symbol
+   * (i.e. whether it is allowed for a call to the Symbol constructor).
+   */
+  static bool isValidPublicSymbol(String name) =>
+      name.isEmpty ||
+      name == "void" ||
+      new JavaPatternMatcher(_PUBLIC_SYMBOL_PATTERN, name).matches();
+}
+
+/**
+ * Interface used by unit tests to verify correct dependency analysis during
+ * constant evaluation.
+ */
+abstract class ConstantEvaluationValidator {
+  /**
+   * This method is called just before computing the constant value associated
+   * with [constant]. Unit tests will override this method to introduce
+   * additional error checking.
+   */
+  void beforeComputeValue(ConstantEvaluationTarget constant);
+
+  /**
+   * This method is called just before getting the constant initializers
+   * associated with the [constructor]. Unit tests will override this method to
+   * introduce additional error checking.
+   */
+  void beforeGetConstantInitializers(ConstructorElement constructor);
+
+  /**
+   * This method is called just before retrieving an evaluation result from an
+   * element. Unit tests will override it to introduce additional error
+   * checking.
+   */
+  void beforeGetEvaluationResult(ConstantEvaluationTarget constant);
+
+  /**
+   * This method is called just before getting the constant value of a field
+   * with an initializer.  Unit tests will override this method to introduce
+   * additional error checking.
+   */
+  void beforeGetFieldEvaluationResult(FieldElementImpl field);
+
+  /**
+   * This method is called just before getting a parameter's default value. Unit
+   * tests will override this method to introduce additional error checking.
+   */
+  void beforeGetParameterDefault(ParameterElement parameter);
+}
+
+/**
+ * Implementation of [ConstantEvaluationValidator] used in production; does no
+ * validation.
+ */
+class ConstantEvaluationValidator_ForProduction
+    implements ConstantEvaluationValidator {
+  @override
+  void beforeComputeValue(ConstantEvaluationTarget constant) {}
+
+  @override
+  void beforeGetConstantInitializers(ConstructorElement constructor) {}
+
+  @override
+  void beforeGetEvaluationResult(ConstantEvaluationTarget constant) {}
+
+  @override
+  void beforeGetFieldEvaluationResult(FieldElementImpl field) {}
+
+  @override
+  void beforeGetParameterDefault(ParameterElement parameter) {}
+}
+
+/**
+ * An object used to compute the values of constant variables and constant
+ * constructor invocations in one or more compilation units. The expected usage
+ * pattern is for the compilation units to be added to this computer using the
+ * method [add] and then for the method [computeValues] to be invoked exactly
+ * once. Any use of an instance after invoking the method [computeValues] will
+ * result in unpredictable behavior.
+ */
+class ConstantValueComputer {
+  /**
+   * Source of RegExp matching declarable operator names.
+   * From sdk/lib/internal/symbol.dart.
+   */
+  static String _OPERATOR_RE =
+      "(?:[\\-+*/%&|^]|\\[\\]=?|==|~/?|<[<=]?|>[>=]?|unary-)";
+
+  /**
+   * Source of RegExp matching Dart reserved words.
+   * From sdk/lib/internal/symbol.dart.
+   */
+  static String _RESERVED_WORD_RE =
+      "(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|d(?:efault|o)|e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ull)|ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|v(?:ar|oid)|w(?:hile|ith))";
+
+  /**
+   * A graph in which the nodes are the constants, and the edges are from each
+   * constant to the other constants that are referenced by it.
+   */
+  DirectedGraph<ConstantEvaluationTarget> referenceGraph =
+      new DirectedGraph<ConstantEvaluationTarget>();
+
+  /**
+   * The elements whose constant values need to be computed.  Any elements
+   * which appear in [referenceGraph] but not in this set either belong to a
+   * different library cycle (and hence don't need to be recomputed) or were
+   * computed during a previous stage of resolution stage (e.g. constants
+   * associated with enums).
+   */
+  HashSet<ConstantEvaluationTarget> _constantsToCompute =
+      new HashSet<ConstantEvaluationTarget>();
+
+  /**
+   * The evaluation engine that does the work of evaluating instance creation
+   * expressions.
+   */
+  final ConstantEvaluationEngine evaluationEngine;
+
+  final AnalysisContext _context;
+
+  /**
+   * Initialize a newly created constant value computer. The [typeProvider] is
+   * the type provider used to access known types. The [declaredVariables] is
+   * the set of variables declared on the command line using '-D'.
+   */
+  ConstantValueComputer(this._context, TypeProvider typeProvider,
+      DeclaredVariables declaredVariables,
+      [ConstantEvaluationValidator validator, TypeSystem typeSystem])
+      : evaluationEngine = new ConstantEvaluationEngine(
+            typeProvider, declaredVariables,
+            validator: validator, typeSystem: typeSystem);
+
+  /**
+   * Add the constants in the given compilation [unit] to the list of constants
+   * whose value needs to be computed.
+   */
+  void add(CompilationUnit unit, Source source, Source librarySource) {
+    ConstantFinder constantFinder =
+        new ConstantFinder(_context, source, librarySource);
+    unit.accept(constantFinder);
+    _constantsToCompute.addAll(constantFinder.constantsToCompute);
+  }
+
+  /**
+   * Compute values for all of the constants in the compilation units that were
+   * added.
+   */
+  void computeValues() {
+    for (ConstantEvaluationTarget constant in _constantsToCompute) {
+      referenceGraph.addNode(constant);
+      evaluationEngine.computeDependencies(constant,
+          (ConstantEvaluationTarget dependency) {
+        referenceGraph.addEdge(constant, dependency);
+      });
+    }
+    List<List<ConstantEvaluationTarget>> topologicalSort =
+        referenceGraph.computeTopologicalSort();
+    for (List<ConstantEvaluationTarget> constantsInCycle in topologicalSort) {
+      if (constantsInCycle.length == 1) {
+        ConstantEvaluationTarget constant = constantsInCycle[0];
+        if (!referenceGraph.getTails(constant).contains(constant)) {
+          _computeValueFor(constant);
+          continue;
+        }
+      }
+      for (ConstantEvaluationTarget constant in constantsInCycle) {
+        evaluationEngine.generateCycleError(constantsInCycle, constant);
+      }
+    }
+  }
+
+  /**
+   * Compute a value for the given [constant].
+   */
+  void _computeValueFor(ConstantEvaluationTarget constant) {
+    if (!_constantsToCompute.contains(constant)) {
+      // Element is in the dependency graph but should have been computed by
+      // a previous stage of analysis.
+      // TODO(paulberry): once we have moved over to the new task model, this
+      // should only occur for constants associated with enum members.  Once
+      // that happens we should add an assertion to verify that it doesn't
+      // occur in any other cases.
+      return;
+    }
+    evaluationEngine.computeConstantValue(constant);
+  }
+}
+
+/**
+ * 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>
+ */
+class ConstantVisitor extends UnifyingAstVisitor<DartObjectImpl> {
+  /**
+   * The type provider used to access the known types.
+   */
+  final ConstantEvaluationEngine evaluationEngine;
+
+  final HashMap<String, DartObjectImpl> _lexicalEnvironment;
+
+  /**
+   * Error reporter that we use to report errors accumulated while computing the
+   * constant.
+   */
+  final ErrorReporter _errorReporter;
+
+  /**
+   * Helper class used to compute constant values.
+   */
+  DartObjectComputer _dartObjectComputer;
+
+  /**
+   * Initialize a newly created constant visitor. The [evaluationEngine] is
+   * used to evaluate instance creation expressions. The [lexicalEnvironment]
+   * is a map containing values which should override identifiers, or `null` if
+   * no overriding is necessary. The [_errorReporter] is used to report errors
+   * found during evaluation.  The [validator] is used by unit tests to verify
+   * correct dependency analysis.
+   */
+  ConstantVisitor(this.evaluationEngine, this._errorReporter,
+      {HashMap<String, DartObjectImpl> lexicalEnvironment})
+      : _lexicalEnvironment = lexicalEnvironment {
+    this._dartObjectComputer =
+        new DartObjectComputer(_errorReporter, evaluationEngine.typeProvider);
+  }
+
+  /**
+   * Convenience getter to gain access to the [evalationEngine]'s type
+   * provider.
+   */
+  TypeProvider get _typeProvider => evaluationEngine.typeProvider;
+
+  /**
+   * Convenience getter to gain access to the [evaluationEngine]'s type system.
+   */
+  TypeSystem get _typeSystem => evaluationEngine.typeSystem;
+
+  @override
+  DartObjectImpl visitAdjacentStrings(AdjacentStrings node) {
+    DartObjectImpl result = null;
+    for (StringLiteral string in node.strings) {
+      if (result == null) {
+        result = string.accept(this);
+      } else {
+        result =
+            _dartObjectComputer.concatenate(node, result, string.accept(this));
+      }
+    }
+    return result;
+  }
+
+  @override
+  DartObjectImpl visitBinaryExpression(BinaryExpression node) {
+    DartObjectImpl leftResult = node.leftOperand.accept(this);
+    DartObjectImpl rightResult = node.rightOperand.accept(this);
+    TokenType operatorType = node.operator.type;
+    // 'null' is almost never good operand
+    if (operatorType != TokenType.BANG_EQ &&
+        operatorType != TokenType.EQ_EQ &&
+        operatorType != TokenType.QUESTION_QUESTION) {
+      if (leftResult != null && leftResult.isNull ||
+          rightResult != null && rightResult.isNull) {
+        _error(node, CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+        return null;
+      }
+    }
+    // evaluate operator
+    while (true) {
+      if (operatorType == TokenType.AMPERSAND) {
+        return _dartObjectComputer.bitAnd(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.AMPERSAND_AMPERSAND) {
+        return _dartObjectComputer.logicalAnd(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.BANG_EQ) {
+        return _dartObjectComputer.notEqual(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.BAR) {
+        return _dartObjectComputer.bitOr(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.BAR_BAR) {
+        return _dartObjectComputer.logicalOr(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.CARET) {
+        return _dartObjectComputer.bitXor(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.EQ_EQ) {
+        return _dartObjectComputer.equalEqual(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.GT) {
+        return _dartObjectComputer.greaterThan(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.GT_EQ) {
+        return _dartObjectComputer.greaterThanOrEqual(
+            node, leftResult, rightResult);
+      } else if (operatorType == TokenType.GT_GT) {
+        return _dartObjectComputer.shiftRight(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.LT) {
+        return _dartObjectComputer.lessThan(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.LT_EQ) {
+        return _dartObjectComputer.lessThanOrEqual(
+            node, leftResult, rightResult);
+      } else if (operatorType == TokenType.LT_LT) {
+        return _dartObjectComputer.shiftLeft(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.MINUS) {
+        return _dartObjectComputer.minus(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.PERCENT) {
+        return _dartObjectComputer.remainder(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.PLUS) {
+        return _dartObjectComputer.add(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.STAR) {
+        return _dartObjectComputer.times(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.SLASH) {
+        return _dartObjectComputer.divide(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.TILDE_SLASH) {
+        return _dartObjectComputer.integerDivide(node, leftResult, rightResult);
+      } else if (operatorType == TokenType.QUESTION_QUESTION) {
+        return _dartObjectComputer.questionQuestion(
+            node, leftResult, rightResult);
+      } else {
+        // TODO(brianwilkerson) Figure out which error to report.
+        _error(node, null);
+        return null;
+      }
+      break;
+    }
+  }
+
+  @override
+  DartObjectImpl visitBooleanLiteral(BooleanLiteral node) =>
+      new DartObjectImpl(_typeProvider.boolType, BoolState.from(node.value));
+
+  @override
+  DartObjectImpl visitConditionalExpression(ConditionalExpression node) {
+    Expression condition = node.condition;
+    DartObjectImpl conditionResult = condition.accept(this);
+    DartObjectImpl thenResult = node.thenExpression.accept(this);
+    DartObjectImpl elseResult = node.elseExpression.accept(this);
+    if (conditionResult == null) {
+      return conditionResult;
+    } else if (!conditionResult.isBool) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, condition);
+      return null;
+    } else if (thenResult == null) {
+      return thenResult;
+    } else if (elseResult == null) {
+      return elseResult;
+    }
+    conditionResult =
+        _dartObjectComputer.applyBooleanConversion(condition, conditionResult);
+    if (conditionResult == null) {
+      return conditionResult;
+    }
+    if (conditionResult.toBoolValue() == true) {
+      return thenResult;
+    } else if (conditionResult.toBoolValue() == false) {
+      return elseResult;
+    }
+    ParameterizedType thenType = thenResult.type;
+    ParameterizedType elseType = elseResult.type;
+    return new DartObjectImpl.validWithUnknownValue(
+        _typeSystem.getLeastUpperBound(_typeProvider, thenType, elseType)
+        as InterfaceType);
+  }
+
+  @override
+  DartObjectImpl visitDoubleLiteral(DoubleLiteral node) =>
+      new DartObjectImpl(_typeProvider.doubleType, new DoubleState(node.value));
+
+  @override
+  DartObjectImpl visitInstanceCreationExpression(
+      InstanceCreationExpression node) {
+    if (!node.isConst) {
+      // TODO(brianwilkerson) Figure out which error to report.
+      _error(node, null);
+      return null;
+    }
+    ConstructorElement constructor = node.staticElement;
+    if (constructor == null) {
+      // Couldn't resolve the constructor so we can't compute a value.  No
+      // problem - the error has already been reported.
+      return null;
+    }
+    return evaluationEngine.evaluateConstructorCall(
+        node, node.argumentList.arguments, constructor, this, _errorReporter);
+  }
+
+  @override
+  DartObjectImpl visitIntegerLiteral(IntegerLiteral node) =>
+      new DartObjectImpl(_typeProvider.intType, new IntState(node.value));
+
+  @override
+  DartObjectImpl visitInterpolationExpression(InterpolationExpression node) {
+    DartObjectImpl result = node.expression.accept(this);
+    if (result != null && !result.isBoolNumStringOrNull) {
+      _error(node, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING);
+      return null;
+    }
+    return _dartObjectComputer.performToString(node, result);
+  }
+
+  @override
+  DartObjectImpl visitInterpolationString(InterpolationString node) =>
+      new DartObjectImpl(_typeProvider.stringType, new StringState(node.value));
+
+  @override
+  DartObjectImpl visitListLiteral(ListLiteral node) {
+    if (node.constKeyword == null) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL, node);
+      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;
+    }
+    DartType elementType = _typeProvider.dynamicType;
+    if (node.typeArguments != null &&
+        node.typeArguments.arguments.length == 1) {
+      DartType type = node.typeArguments.arguments[0].type;
+      if (type != null) {
+        elementType = type;
+      }
+    }
+    InterfaceType listType = _typeProvider.listType.instantiate([elementType]);
+    return new DartObjectImpl(listType, new ListState(elements));
+  }
+
+  @override
+  DartObjectImpl visitMapLiteral(MapLiteral node) {
+    if (node.constKeyword == null) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL, node);
+      return null;
+    }
+    bool errorOccurred = false;
+    LinkedHashMap<DartObjectImpl, DartObjectImpl> map =
+        new LinkedHashMap<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;
+    if (node.typeArguments != null &&
+        node.typeArguments.arguments.length == 2) {
+      DartType keyTypeCandidate = node.typeArguments.arguments[0].type;
+      if (keyTypeCandidate != null) {
+        keyType = keyTypeCandidate;
+      }
+      DartType valueTypeCandidate = node.typeArguments.arguments[1].type;
+      if (valueTypeCandidate != null) {
+        valueType = valueTypeCandidate;
+      }
+    }
+    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) {
+      FunctionElement function = element;
+      if (function.name == "identical") {
+        NodeList<Expression> arguments = node.argumentList.arguments;
+        if (arguments.length == 2) {
+          Element enclosingElement = function.enclosingElement;
+          if (enclosingElement is CompilationUnitElement) {
+            LibraryElement library = enclosingElement.library;
+            if (library.isDartCore) {
+              DartObjectImpl leftArgument = arguments[0].accept(this);
+              DartObjectImpl rightArgument = arguments[1].accept(this);
+              return _dartObjectComputer.isIdentical(
+                  node, leftArgument, rightArgument);
+            }
+          }
+        }
+      }
+    }
+    // TODO(brianwilkerson) Figure out which error to report.
+    _error(node, null);
+    return null;
+  }
+
+  @override
+  DartObjectImpl visitNamedExpression(NamedExpression node) =>
+      node.expression.accept(this);
+
+  @override
+  DartObjectImpl visitNode(AstNode node) {
+    // TODO(brianwilkerson) Figure out which error to report.
+    _error(node, null);
+    return null;
+  }
+
+  @override
+  DartObjectImpl visitNullLiteral(NullLiteral node) => _typeProvider.nullObject;
+
+  @override
+  DartObjectImpl visitParenthesizedExpression(ParenthesizedExpression node) =>
+      node.expression.accept(this);
+
+  @override
+  DartObjectImpl visitPrefixedIdentifier(PrefixedIdentifier node) {
+    SimpleIdentifier prefixNode = node.prefix;
+    Element prefixElement = prefixNode.staticElement;
+    // String.length
+    if (prefixElement is! PrefixElement && prefixElement is! ClassElement) {
+      DartObjectImpl prefixResult = node.prefix.accept(this);
+      if (_isStringLength(prefixResult, node.identifier)) {
+        return prefixResult.stringLength(_typeProvider);
+      }
+    }
+    // importPrefix.CONST
+    if (prefixElement is! PrefixElement) {
+      DartObjectImpl prefixResult = prefixNode.accept(this);
+      if (prefixResult == null) {
+        // The error has already been reported.
+        return null;
+      }
+    }
+    // validate prefixed identifier
+    return _getConstantValue(node, node.staticElement);
+  }
+
+  @override
+  DartObjectImpl visitPrefixExpression(PrefixExpression node) {
+    DartObjectImpl operand = node.operand.accept(this);
+    if (operand != null && operand.isNull) {
+      _error(node, CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+      return null;
+    }
+    while (true) {
+      if (node.operator.type == TokenType.BANG) {
+        return _dartObjectComputer.logicalNot(node, operand);
+      } else if (node.operator.type == TokenType.TILDE) {
+        return _dartObjectComputer.bitNot(node, operand);
+      } else if (node.operator.type == TokenType.MINUS) {
+        return _dartObjectComputer.negated(node, operand);
+      } else {
+        // TODO(brianwilkerson) Figure out which error to report.
+        _error(node, null);
+        return null;
+      }
+      break;
+    }
+  }
+
+  @override
+  DartObjectImpl visitPropertyAccess(PropertyAccess node) {
+    if (node.target != null) {
+      DartObjectImpl prefixResult = node.target.accept(this);
+      if (_isStringLength(prefixResult, node.propertyName)) {
+        return prefixResult.stringLength(_typeProvider);
+      }
+    }
+    return _getConstantValue(node, node.propertyName.staticElement);
+  }
+
+  @override
+  DartObjectImpl visitSimpleIdentifier(SimpleIdentifier node) {
+    if (_lexicalEnvironment != null &&
+        _lexicalEnvironment.containsKey(node.name)) {
+      return _lexicalEnvironment[node.name];
+    }
+    return _getConstantValue(node, node.staticElement);
+  }
+
+  @override
+  DartObjectImpl visitSimpleStringLiteral(SimpleStringLiteral node) =>
+      new DartObjectImpl(_typeProvider.stringType, new StringState(node.value));
+
+  @override
+  DartObjectImpl visitStringInterpolation(StringInterpolation node) {
+    DartObjectImpl result = null;
+    bool first = true;
+    for (InterpolationElement element in node.elements) {
+      if (first) {
+        result = element.accept(this);
+        first = false;
+      } else {
+        result =
+            _dartObjectComputer.concatenate(node, result, element.accept(this));
+      }
+    }
+    return result;
+  }
+
+  @override
+  DartObjectImpl visitSymbolLiteral(SymbolLiteral node) {
+    StringBuffer buffer = new StringBuffer();
+    List<Token> components = node.components;
+    for (int i = 0; i < components.length; i++) {
+      if (i > 0) {
+        buffer.writeCharCode(0x2E);
+      }
+      buffer.write(components[i].lexeme);
+    }
+    return new DartObjectImpl(
+        _typeProvider.symbolType, new SymbolState(buffer.toString()));
+  }
+
+  /**
+   * Create an error associated with the given [node]. The error will have the
+   * given error [code].
+   */
+  void _error(AstNode node, ErrorCode code) {
+    _errorReporter.reportErrorForNode(
+        code == null ? CompileTimeErrorCode.INVALID_CONSTANT : code, node);
+  }
+
+  /**
+   * 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.
+   */
+  DartObjectImpl _getConstantValue(AstNode node, Element element) {
+    if (element is PropertyAccessorElement) {
+      element = (element as PropertyAccessorElement).variable;
+    }
+    if (element is VariableElementImpl) {
+      VariableElementImpl variableElementImpl = element;
+      evaluationEngine.validator.beforeGetEvaluationResult(element);
+      EvaluationResultImpl value = variableElementImpl.evaluationResult;
+      if (variableElementImpl.isConst && value != null) {
+        return value.value;
+      }
+    } else if (element is ExecutableElement) {
+      ExecutableElement function = element;
+      if (function.isStatic) {
+        ParameterizedType functionType = function.type;
+        if (functionType == null) {
+          functionType = _typeProvider.functionType;
+        }
+        return new DartObjectImpl(functionType, new FunctionState(function));
+      }
+    } else if (element is ClassElement ||
+        element is FunctionTypeAliasElement ||
+        element is DynamicElementImpl) {
+      return new DartObjectImpl(_typeProvider.typeType, new TypeState(element));
+    }
+    // TODO(brianwilkerson) Figure out which error to report.
+    _error(node, null);
+    return null;
+  }
+
+  /**
+   * Return `true` if the given [targetResult] represents a string and the
+   * [identifier] is "length".
+   */
+  bool _isStringLength(
+      DartObjectImpl targetResult, SimpleIdentifier identifier) {
+    if (targetResult == null || targetResult.type != _typeProvider.stringType) {
+      return false;
+    }
+    return identifier.name == 'length';
+  }
+
+  /**
+   * Return the value of the given [expression], or a representation of 'null'
+   * if the expression cannot be evaluated.
+   */
+  DartObjectImpl _valueOf(Expression expression) {
+    DartObjectImpl expressionValue = expression.accept(this);
+    if (expressionValue != null) {
+      return expressionValue;
+    }
+    return _typeProvider.nullObject;
+  }
+}
+
+/**
+ * A utility class that contains methods for manipulating instances of a Dart
+ * class and for collecting errors during evaluation.
+ */
+class DartObjectComputer {
+  /**
+   * The error reporter that we are using to collect errors.
+   */
+  final ErrorReporter _errorReporter;
+
+  /**
+   * The type provider used to create objects of the appropriate types, and to
+   * identify when an object is of a built-in type.
+   */
+  final TypeProvider _typeProvider;
+
+  DartObjectComputer(this._errorReporter, this._typeProvider);
+
+  DartObjectImpl add(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.add(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+        return null;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Return the result of applying boolean conversion to the [evaluationResult].
+   * The [node] is the node against which errors should be reported.
+   */
+  DartObjectImpl applyBooleanConversion(
+      AstNode node, DartObjectImpl evaluationResult) {
+    if (evaluationResult != null) {
+      try {
+        return evaluationResult.convertToBool(_typeProvider);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl bitAnd(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.bitAnd(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl bitNot(Expression node, DartObjectImpl evaluationResult) {
+    if (evaluationResult != null) {
+      try {
+        return evaluationResult.bitNot(_typeProvider);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl bitOr(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.bitOr(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl bitXor(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.bitXor(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl concatenate(Expression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.concatenate(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl divide(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.divide(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl equalEqual(Expression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.equalEqual(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl greaterThan(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.greaterThan(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl greaterThanOrEqual(BinaryExpression node,
+      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.greaterThanOrEqual(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl integerDivide(BinaryExpression node,
+      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.integerDivide(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl isIdentical(Expression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.isIdentical(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl lessThan(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.lessThan(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl lessThanOrEqual(BinaryExpression node,
+      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.lessThanOrEqual(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl logicalAnd(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.logicalAnd(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl logicalNot(Expression node, DartObjectImpl evaluationResult) {
+    if (evaluationResult != null) {
+      try {
+        return evaluationResult.logicalNot(_typeProvider);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl logicalOr(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.logicalOr(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl minus(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.minus(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl negated(Expression node, DartObjectImpl evaluationResult) {
+    if (evaluationResult != null) {
+      try {
+        return evaluationResult.negated(_typeProvider);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl notEqual(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.notEqual(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl performToString(
+      AstNode node, DartObjectImpl evaluationResult) {
+    if (evaluationResult != null) {
+      try {
+        return evaluationResult.performToString(_typeProvider);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl questionQuestion(Expression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      if (leftOperand.isNull) {
+        return rightOperand;
+      }
+      return leftOperand;
+    }
+    return null;
+  }
+
+  DartObjectImpl remainder(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.remainder(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl shiftLeft(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.shiftLeft(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl shiftRight(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.shiftRight(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Return the result of invoking the 'length' getter on the
+   * [evaluationResult]. The [node] is the node against which errors should be
+   * reported.
+   */
+  EvaluationResultImpl stringLength(
+      Expression node, EvaluationResultImpl evaluationResult) {
+    if (evaluationResult.value != null) {
+      try {
+        return new EvaluationResultImpl(
+            evaluationResult.value.stringLength(_typeProvider));
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return new EvaluationResultImpl(null);
+  }
+
+  DartObjectImpl times(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.times(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+}
+
+/**
+ * The result of attempting to evaluate an expression.
+ */
+class EvaluationResult {
+  // TODO(brianwilkerson) Merge with EvaluationResultImpl
+  /**
+   * The value of the expression.
+   */
+  final DartObject value;
+
+  /**
+   * The errors that should be reported for the expression(s) that were
+   * evaluated.
+   */
+  final List<AnalysisError> _errors;
+
+  /**
+   * Initialize a newly created result object with the given [value] and set of
+   * [_errors]. Clients should use one of the factory methods: [forErrors] and
+   * [forValue].
+   */
+  EvaluationResult(this.value, this._errors);
+
+  /**
+   * Return a list containing the errors that should be reported for the
+   * expression(s) that were evaluated. If there are no such errors, the list
+   * will be empty. The list can be empty even if the expression is not a valid
+   * compile time constant if the errors would have been reported by other parts
+   * of the analysis engine.
+   */
+  List<AnalysisError> get errors =>
+      _errors == null ? AnalysisError.NO_ERRORS : _errors;
+
+  /**
+   * Return `true` if the expression is a compile-time constant expression that
+   * would not throw an exception when evaluated.
+   */
+  bool get isValid => _errors == null;
+
+  /**
+   * Return an evaluation result representing the result of evaluating an
+   * expression that is not a compile-time constant because of the given
+   * [errors].
+   */
+  static EvaluationResult forErrors(List<AnalysisError> errors) =>
+      new EvaluationResult(null, errors);
+
+  /**
+   * Return an evaluation result representing the result of evaluating an
+   * expression that is a compile-time constant that evaluates to the given
+   * [value].
+   */
+  static EvaluationResult forValue(DartObject value) =>
+      new EvaluationResult(value, null);
+}
+
+/**
+ * The result of attempting to evaluate a expression.
+ */
+class EvaluationResultImpl {
+  /**
+   * The errors encountered while trying to evaluate the compile time constant.
+   * These errors may or may not have prevented the expression from being a
+   * valid compile time constant.
+   */
+  List<AnalysisError> _errors;
+
+  /**
+   * The value of the expression, or `null` if the value couldn't be computed
+   * due to errors.
+   */
+  final DartObjectImpl value;
+
+  EvaluationResultImpl(this.value, [List<AnalysisError> errors]) {
+    this._errors = errors == null ? <AnalysisError>[] : errors;
+  }
+
+  List<AnalysisError> get errors => _errors;
+
+  bool equalValues(TypeProvider typeProvider, EvaluationResultImpl result) {
+    if (this.value != null) {
+      if (result.value == null) {
+        return false;
+      }
+      return value == result.value;
+    } else {
+      return false;
+    }
+  }
+
+  @override
+  String toString() {
+    if (value == null) {
+      return "error";
+    }
+    return value.toString();
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/constant/utilities.dart b/pkg/analyzer/lib/src/dart/constant/utilities.dart
new file mode 100644
index 0000000..c324d7f
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/constant/utilities.dart
@@ -0,0 +1,312 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.src.dart.constant.utilities;
+
+import 'dart:collection';
+
+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/ast/utilities.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/generated/engine.dart';
+import 'package:analyzer/src/generated/source.dart' show Source;
+import 'package:analyzer/src/task/dart.dart';
+
+ConstructorElementImpl getConstructorImpl(ConstructorElement constructor) {
+  while (constructor is ConstructorMember) {
+    constructor = (constructor as ConstructorMember).baseElement;
+  }
+  if (constructor is ConstructorElementHandle) {
+    constructor = (constructor as ConstructorElementHandle).actualElement;
+  }
+  return constructor;
+}
+
+/**
+ * Callback used by [ReferenceFinder] to report that a dependency was found.
+ */
+typedef void ReferenceFinderCallback(ConstantEvaluationTarget dependency);
+
+/**
+ * An [AstCloner] that copies the necessary information from the AST to allow
+ * constants to be evaluated.
+ */
+class ConstantAstCloner extends AstCloner {
+  ConstantAstCloner() : super(true);
+
+  @override
+  ConstructorName visitConstructorName(ConstructorName node) {
+    ConstructorName name = super.visitConstructorName(node);
+    name.staticElement = node.staticElement;
+    return name;
+  }
+
+  @override
+  InstanceCreationExpression visitInstanceCreationExpression(
+      InstanceCreationExpression node) {
+    InstanceCreationExpression expression =
+        super.visitInstanceCreationExpression(node);
+    expression.staticElement = node.staticElement;
+    return expression;
+  }
+
+  @override
+  RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
+    RedirectingConstructorInvocation invocation =
+        super.visitRedirectingConstructorInvocation(node);
+    invocation.staticElement = node.staticElement;
+    return invocation;
+  }
+
+  @override
+  SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) {
+    SimpleIdentifier identifier = super.visitSimpleIdentifier(node);
+    identifier.staticElement = node.staticElement;
+    return identifier;
+  }
+
+  @override
+  SuperConstructorInvocation visitSuperConstructorInvocation(
+      SuperConstructorInvocation node) {
+    SuperConstructorInvocation invocation =
+        super.visitSuperConstructorInvocation(node);
+    invocation.staticElement = node.staticElement;
+    return invocation;
+  }
+
+  @override
+  TypeName visitTypeName(TypeName node) {
+    TypeName typeName = super.visitTypeName(node);
+    typeName.type = node.type;
+    return typeName;
+  }
+}
+
+/**
+ * A visitor used to traverse the AST structures of all of the compilation units
+ * being resolved and build the full set of dependencies for all constant
+ * expressions.
+ */
+class ConstantExpressionsDependenciesFinder extends RecursiveAstVisitor {
+  /**
+   * The constants whose values need to be computed.
+   */
+  HashSet<ConstantEvaluationTarget> dependencies =
+      new HashSet<ConstantEvaluationTarget>();
+
+  @override
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
+    if (node.isConst) {
+      _find(node);
+    } else {
+      super.visitInstanceCreationExpression(node);
+    }
+  }
+
+  @override
+  void visitListLiteral(ListLiteral node) {
+    if (node.constKeyword != null) {
+      _find(node);
+    } else {
+      super.visitListLiteral(node);
+    }
+  }
+
+  @override
+  void visitMapLiteral(MapLiteral node) {
+    if (node.constKeyword != null) {
+      _find(node);
+    } else {
+      super.visitMapLiteral(node);
+    }
+  }
+
+  @override
+  void visitSwitchCase(SwitchCase node) {
+    _find(node.expression);
+    node.statements.accept(this);
+  }
+
+  void _find(Expression node) {
+    if (node != null) {
+      ReferenceFinder referenceFinder = new ReferenceFinder(dependencies.add);
+      node.accept(referenceFinder);
+    }
+  }
+}
+
+/**
+ * A visitor used to traverse the AST structures of all of the compilation units
+ * being resolved and build tables of the constant variables, constant
+ * constructors, constant constructor invocations, and annotations found in
+ * those compilation units.
+ */
+class ConstantFinder extends RecursiveAstVisitor<Object> {
+  final AnalysisContext context;
+  final Source source;
+  final Source librarySource;
+
+  /**
+   * The elements and AST nodes whose constant values need to be computed.
+   */
+  List<ConstantEvaluationTarget> constantsToCompute =
+      <ConstantEvaluationTarget>[];
+
+  /**
+   * A flag indicating whether instance variables marked as "final" should be
+   * treated as "const".
+   */
+  bool treatFinalInstanceVarAsConst = false;
+
+  ConstantFinder(this.context, this.source, this.librarySource);
+
+  @override
+  Object visitAnnotation(Annotation node) {
+    super.visitAnnotation(node);
+    ElementAnnotation elementAnnotation = node.elementAnnotation;
+    if (elementAnnotation == null) {
+      // Analyzer ignores annotations on "part of" directives.
+      assert(node.parent is PartOfDirective);
+    } else {
+      constantsToCompute.add(elementAnnotation);
+    }
+    return null;
+  }
+
+  @override
+  Object visitClassDeclaration(ClassDeclaration node) {
+    bool prevTreatFinalInstanceVarAsConst = treatFinalInstanceVarAsConst;
+    if (node.element.constructors.any((ConstructorElement e) => e.isConst)) {
+      // Instance vars marked "final" need to be included in the dependency
+      // graph, since constant constructors implicitly use the values in their
+      // initializers.
+      treatFinalInstanceVarAsConst = true;
+    }
+    try {
+      return super.visitClassDeclaration(node);
+    } finally {
+      treatFinalInstanceVarAsConst = prevTreatFinalInstanceVarAsConst;
+    }
+  }
+
+  @override
+  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+    super.visitConstructorDeclaration(node);
+    if (node.constKeyword != null) {
+      ConstructorElement element = node.element;
+      if (element != null) {
+        constantsToCompute.add(element);
+        constantsToCompute.addAll(element.parameters);
+      }
+    }
+    return null;
+  }
+
+  @override
+  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+    super.visitDefaultFormalParameter(node);
+    Expression defaultValue = node.defaultValue;
+    if (defaultValue != null && node.element != null) {
+      constantsToCompute.add(node.element);
+    }
+    return null;
+  }
+
+  @override
+  Object visitVariableDeclaration(VariableDeclaration node) {
+    super.visitVariableDeclaration(node);
+    Expression initializer = node.initializer;
+    VariableElement element = node.element;
+    if (initializer != null &&
+        (node.isConst ||
+            treatFinalInstanceVarAsConst &&
+                element is FieldElement &&
+                node.isFinal &&
+                !element.isStatic)) {
+      if (element != null) {
+        constantsToCompute.add(element);
+      }
+    }
+    return null;
+  }
+}
+
+/**
+ * An object used to add reference information for a given variable to the
+ * bi-directional mapping used to order the evaluation of constants.
+ */
+class ReferenceFinder extends RecursiveAstVisitor<Object> {
+  /**
+   * The callback which should be used to report any dependencies that were
+   * found.
+   */
+  final ReferenceFinderCallback _callback;
+
+  /**
+   * Initialize a newly created reference finder to find references from a given
+   * variable to other variables and to add those references to the given graph.
+   * The [_callback] will be invoked for every dependency found.
+   */
+  ReferenceFinder(this._callback);
+
+  @override
+  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+    if (node.isConst) {
+      ConstructorElement constructor = getConstructorImpl(node.staticElement);
+      if (constructor != null) {
+        _callback(constructor);
+      }
+    }
+    return super.visitInstanceCreationExpression(node);
+  }
+
+  @override
+  Object visitLabel(Label node) {
+    // We are visiting the "label" part of a named expression in a function
+    // call (presumably a constructor call), e.g. "const C(label: ...)".  We
+    // don't want to visit the SimpleIdentifier for the label because that's a
+    // reference to a function parameter that needs to be filled in; it's not a
+    // constant whose value we depend on.
+    return null;
+  }
+
+  @override
+  Object visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
+    super.visitRedirectingConstructorInvocation(node);
+    ConstructorElement target = getConstructorImpl(node.staticElement);
+    if (target != null) {
+      _callback(target);
+    }
+    return null;
+  }
+
+  @override
+  Object visitSimpleIdentifier(SimpleIdentifier node) {
+    Element element = node.staticElement;
+    if (element is PropertyAccessorElement) {
+      element = (element as PropertyAccessorElement).variable;
+    }
+    if (element is VariableElement && element.isConst) {
+      _callback(element);
+    }
+    return null;
+  }
+
+  @override
+  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+    super.visitSuperConstructorInvocation(node);
+    ConstructorElement constructor = getConstructorImpl(node.staticElement);
+    if (constructor != null) {
+      _callback(constructor);
+    }
+    return null;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
new file mode 100644
index 0000000..6ebb45d
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -0,0 +1,2818 @@
+// 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.
+
+/**
+ * The implementation of the class [DartObject].
+ */
+library analyzer.src.dart.constant.value;
+
+import 'dart:collection';
+
+import 'package:analyzer/dart/constant/value.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
+import 'package:analyzer/src/generated/utilities_general.dart';
+
+/**
+ * The state of an object representing a boolean value.
+ */
+class BoolState extends InstanceState {
+  /**
+   * An instance representing the boolean value 'false'.
+   */
+  static BoolState FALSE_STATE = new BoolState(false);
+
+  /**
+   * An instance representing the boolean value 'true'.
+   */
+  static BoolState TRUE_STATE = new BoolState(true);
+
+  /**
+   * A state that can be used to represent a boolean whose value is not known.
+   */
+  static BoolState UNKNOWN_VALUE = new BoolState(null);
+
+  /**
+   * The value of this instance.
+   */
+  final bool value;
+
+  /**
+   * Initialize a newly created state to represent the given [value].
+   */
+  BoolState(this.value);
+
+  @override
+  int get hashCode => value == null ? 0 : (value ? 2 : 3);
+
+  @override
+  bool get isBool => true;
+
+  @override
+  bool get isBoolNumStringOrNull => true;
+
+  @override
+  bool get isUnknown => value == null;
+
+  @override
+  String get typeName => "bool";
+
+  @override
+  bool operator ==(Object object) =>
+      object is BoolState && identical(value, object.value);
+
+  @override
+  BoolState convertToBool() => this;
+
+  @override
+  StringState convertToString() {
+    if (value == null) {
+      return StringState.UNKNOWN_VALUE;
+    }
+    return new StringState(value ? "true" : "false");
+  }
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is BoolState) {
+      bool rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return BoolState.from(identical(value, rightValue));
+    } else if (rightOperand is DynamicState) {
+      return UNKNOWN_VALUE;
+    }
+    return FALSE_STATE;
+  }
+
+  @override
+  BoolState logicalAnd(InstanceState rightOperand) {
+    assertBool(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    return value ? rightOperand.convertToBool() : FALSE_STATE;
+  }
+
+  @override
+  BoolState logicalNot() {
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    return value ? FALSE_STATE : TRUE_STATE;
+  }
+
+  @override
+  BoolState logicalOr(InstanceState rightOperand) {
+    assertBool(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    return value ? TRUE_STATE : rightOperand.convertToBool();
+  }
+
+  @override
+  String toString() => value == null ? "-unknown-" : (value ? "true" : "false");
+
+  /**
+   * Return the boolean state representing the given boolean [value].
+   */
+  static BoolState from(bool value) =>
+      value ? BoolState.TRUE_STATE : BoolState.FALSE_STATE;
+}
+
+/**
+ * A representation of an instance of a Dart class.
+ */
+class DartObjectImpl implements DartObject {
+  /**
+   * An empty list of objects.
+   */
+  static const List<DartObjectImpl> EMPTY_LIST = const <DartObjectImpl>[];
+
+  /**
+   * The run-time type of this object.
+   */
+  @override
+  final ParameterizedType type;
+
+  /**
+   * The state of the object.
+   */
+  final InstanceState _state;
+
+  /**
+   * Initialize a newly created object to have the given [type] and [_state].
+   */
+  DartObjectImpl(this.type, this._state);
+
+  /**
+   * Create an object to represent an unknown value.
+   */
+  factory DartObjectImpl.validWithUnknownValue(InterfaceType type) {
+    if (type.element.library.isDartCore) {
+      String typeName = type.name;
+      if (typeName == "bool") {
+        return new DartObjectImpl(type, BoolState.UNKNOWN_VALUE);
+      } else if (typeName == "double") {
+        return new DartObjectImpl(type, DoubleState.UNKNOWN_VALUE);
+      } else if (typeName == "int") {
+        return new DartObjectImpl(type, IntState.UNKNOWN_VALUE);
+      } else if (typeName == "String") {
+        return new DartObjectImpl(type, StringState.UNKNOWN_VALUE);
+      }
+    }
+    return new DartObjectImpl(type, GenericState.UNKNOWN_VALUE);
+  }
+
+  HashMap<String, DartObjectImpl> get fields => _state.fields;
+
+  @override
+  int get hashCode => JenkinsSmiHash.hash2(type.hashCode, _state.hashCode);
+
+  @override
+  bool get hasKnownValue => !_state.isUnknown;
+
+  /**
+   * Return `true` if this object represents an object whose type is 'bool'.
+   */
+  bool get isBool => _state.isBool;
+
+  /**
+   * Return `true` if this object represents an object whose type is either
+   * 'bool', 'num', 'String', or 'Null'.
+   */
+  bool get isBoolNumStringOrNull => _state.isBoolNumStringOrNull;
+
+  @override
+  bool get isNull => _state is NullState;
+
+  /**
+   * Return `true` if this object represents an unknown value.
+   */
+  bool get isUnknown => _state.isUnknown;
+
+  /**
+   * Return `true` if this object represents an instance of a user-defined
+   * class.
+   */
+  bool get isUserDefinedObject => _state is GenericState;
+
+  @override
+  bool operator ==(Object object) {
+    if (object is! DartObjectImpl) {
+      return false;
+    }
+    DartObjectImpl dartObject = object as DartObjectImpl;
+    return type == dartObject.type && _state == dartObject._state;
+  }
+
+  /**
+   * Return the result of invoking the '+' operator on this object with the
+   * given [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 add(TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    InstanceState result = _state.add(rightOperand._state);
+    if (result is IntState) {
+      return new DartObjectImpl(typeProvider.intType, result);
+    } else if (result is DoubleState) {
+      return new DartObjectImpl(typeProvider.doubleType, result);
+    } else if (result is NumState) {
+      return new DartObjectImpl(typeProvider.numType, result);
+    } else if (result is StringState) {
+      return new DartObjectImpl(typeProvider.stringType, result);
+    }
+    // We should never get here.
+    throw new IllegalStateException("add returned a ${result.runtimeType}");
+  }
+
+  /**
+   * Return the result of invoking the '&' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl bitAnd(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.intType, _state.bitAnd(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '~' operator on this object. The
+   * [typeProvider] is the type provider used to find known types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl bitNot(TypeProvider typeProvider) =>
+      new DartObjectImpl(typeProvider.intType, _state.bitNot());
+
+  /**
+   * Return the result of invoking the '|' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl bitOr(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.intType, _state.bitOr(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '^' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl bitXor(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.intType, _state.bitXor(rightOperand._state));
+
+  /**
+   * 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 concatenate(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.stringType, _state.concatenate(rightOperand._state));
+
+  /**
+   * Return the result of applying boolean conversion to this object. 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 convertToBool(TypeProvider typeProvider) {
+    InterfaceType boolType = typeProvider.boolType;
+    if (identical(type, boolType)) {
+      return this;
+    }
+    return new DartObjectImpl(boolType, _state.convertToBool());
+  }
+
+  /**
+   * 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 divide(
+      TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    InstanceState result = _state.divide(rightOperand._state);
+    if (result is IntState) {
+      return new DartObjectImpl(typeProvider.intType, result);
+    } else if (result is DoubleState) {
+      return new DartObjectImpl(typeProvider.doubleType, result);
+    } else if (result is NumState) {
+      return new DartObjectImpl(typeProvider.numType, result);
+    }
+    // We should never get here.
+    throw new IllegalStateException("divide returned a ${result.runtimeType}");
+  }
+
+  /**
+   * 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 equalEqual(
+      TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    if (type != rightOperand.type) {
+      String typeName = type.name;
+      if (!(typeName == "bool" ||
+          typeName == "double" ||
+          typeName == "int" ||
+          typeName == "num" ||
+          typeName == "String" ||
+          typeName == "Null" ||
+          type.isDynamic)) {
+        throw new EvaluationException(
+            CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING);
+      }
+    }
+    return new DartObjectImpl(
+        typeProvider.boolType, _state.equalEqual(rightOperand._state));
+  }
+
+  @override
+  DartObject getField(String name) {
+    if (_state is GenericState) {
+      return (_state as GenericState).fields[name];
+    }
+    return null;
+  }
+
+  /**
+   * Return the result of invoking the '&gt;' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl greaterThan(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.boolType, _state.greaterThan(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '&gt;=' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl greaterThanOrEqual(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(typeProvider.boolType,
+          _state.greaterThanOrEqual(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '~/' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl integerDivide(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.intType, _state.integerDivide(rightOperand._state));
+
+  /**
+   * Return the result of invoking the identical function on this object with
+   * the [rightOperand]. The [typeProvider] is the type provider used to find
+   * known types.
+   */
+  DartObjectImpl isIdentical(
+      TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    return new DartObjectImpl(
+        typeProvider.boolType, _state.isIdentical(rightOperand._state));
+  }
+
+  /**
+   * Return the result of invoking the '&lt;' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl lessThan(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.boolType, _state.lessThan(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '&lt;=' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl lessThanOrEqual(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.boolType, _state.lessThanOrEqual(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '&&' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl logicalAnd(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.boolType, _state.logicalAnd(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '!' operator on this object. 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 logicalNot(TypeProvider typeProvider) =>
+      new DartObjectImpl(typeProvider.boolType, _state.logicalNot());
+
+  /**
+   * Return the result of invoking the '||' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl logicalOr(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.boolType, _state.logicalOr(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '-' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl minus(TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    InstanceState result = _state.minus(rightOperand._state);
+    if (result is IntState) {
+      return new DartObjectImpl(typeProvider.intType, result);
+    } else if (result is DoubleState) {
+      return new DartObjectImpl(typeProvider.doubleType, result);
+    } else if (result is NumState) {
+      return new DartObjectImpl(typeProvider.numType, result);
+    }
+    // We should never get here.
+    throw new IllegalStateException("minus returned a ${result.runtimeType}");
+  }
+
+  /**
+   * Return the result of invoking the '-' operator on this object. 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 negated(TypeProvider typeProvider) {
+    InstanceState result = _state.negated();
+    if (result is IntState) {
+      return new DartObjectImpl(typeProvider.intType, result);
+    } else if (result is DoubleState) {
+      return new DartObjectImpl(typeProvider.doubleType, result);
+    } else if (result is NumState) {
+      return new DartObjectImpl(typeProvider.numType, result);
+    }
+    // We should never get here.
+    throw new IllegalStateException("negated returned a ${result.runtimeType}");
+  }
+
+  /**
+   * 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 notEqual(
+      TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    if (type != rightOperand.type) {
+      String typeName = type.name;
+      if (typeName != "bool" &&
+          typeName != "double" &&
+          typeName != "int" &&
+          typeName != "num" &&
+          typeName != "String") {
+        return new DartObjectImpl(typeProvider.boolType, BoolState.TRUE_STATE);
+      }
+    }
+    return new DartObjectImpl(typeProvider.boolType,
+        _state.equalEqual(rightOperand._state).logicalNot());
+  }
+
+  /**
+   * Return the result of converting this object to a 'String'. The
+   * [typeProvider] is the type provider used to find known types.
+   *
+   * Throws an [EvaluationException] if the object cannot be converted to a
+   * 'String'.
+   */
+  DartObjectImpl performToString(TypeProvider typeProvider) {
+    InterfaceType stringType = typeProvider.stringType;
+    if (identical(type, stringType)) {
+      return this;
+    }
+    return new DartObjectImpl(stringType, _state.convertToString());
+  }
+
+  /**
+   * 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 remainder(
+      TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    InstanceState result = _state.remainder(rightOperand._state);
+    if (result is IntState) {
+      return new DartObjectImpl(typeProvider.intType, result);
+    } else if (result is DoubleState) {
+      return new DartObjectImpl(typeProvider.doubleType, result);
+    } else if (result is NumState) {
+      return new DartObjectImpl(typeProvider.numType, result);
+    }
+    // We should never get here.
+    throw new IllegalStateException(
+        "remainder returned a ${result.runtimeType}");
+  }
+
+  /**
+   * Return the result of invoking the '&lt;&lt;' 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 shiftLeft(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.intType, _state.shiftLeft(rightOperand._state));
+
+  /**
+   * Return the result of invoking the '&gt;&gt;' operator on this object with
+   * the [rightOperand]. The [typeProvider] is the type provider used to find
+   * known types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl shiftRight(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.intType, _state.shiftRight(rightOperand._state));
+
+  /**
+   * Return the result of invoking the 'length' getter on this object. 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 stringLength(TypeProvider typeProvider) =>
+      new DartObjectImpl(typeProvider.intType, _state.stringLength());
+
+  /**
+   * 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 times(TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    InstanceState result = _state.times(rightOperand._state);
+    if (result is IntState) {
+      return new DartObjectImpl(typeProvider.intType, result);
+    } else if (result is DoubleState) {
+      return new DartObjectImpl(typeProvider.doubleType, result);
+    } else if (result is NumState) {
+      return new DartObjectImpl(typeProvider.numType, result);
+    }
+    // We should never get here.
+    throw new IllegalStateException("times returned a ${result.runtimeType}");
+  }
+
+  @override
+  bool toBoolValue() {
+    if (_state is BoolState) {
+      return (_state as BoolState).value;
+    }
+    return null;
+  }
+
+  @override
+  double toDoubleValue() {
+    if (_state is DoubleState) {
+      return (_state as DoubleState).value;
+    }
+    return null;
+  }
+
+  @override
+  int toIntValue() {
+    if (_state is IntState) {
+      return (_state as IntState).value;
+    }
+    return null;
+  }
+
+  @override
+  List<DartObject> toListValue() {
+    if (_state is ListState) {
+      return (_state as ListState)._elements;
+    }
+    return null;
+  }
+
+  @override
+  Map<DartObject, DartObject> toMapValue() {
+    if (_state is MapState) {
+      return (_state as MapState)._entries;
+    }
+    return null;
+  }
+
+  @override
+  String toString() => "${type.displayName} ($_state)";
+
+  @override
+  String toStringValue() {
+    if (_state is StringState) {
+      return (_state as StringState).value;
+    }
+    return null;
+  }
+
+  @override
+  String toSymbolValue() {
+    if (_state is SymbolState) {
+      return (_state as SymbolState).value;
+    }
+    return null;
+  }
+
+  @override
+  DartType toTypeValue() {
+    if (_state is TypeState) {
+      Element element = (_state as TypeState)._element;
+      if (element is TypeDefiningElement) {
+        return element.type;
+      }
+    }
+    return null;
+  }
+}
+
+/**
+ * The state of an object representing a double.
+ */
+class DoubleState extends NumState {
+  /**
+   * A state that can be used to represent a double whose value is not known.
+   */
+  static DoubleState UNKNOWN_VALUE = new DoubleState(null);
+
+  /**
+   * The value of this instance.
+   */
+  final double value;
+
+  /**
+   * Initialize a newly created state to represent a double with the given
+   * [value].
+   */
+  DoubleState(this.value);
+
+  @override
+  int get hashCode => value == null ? 0 : value.hashCode;
+
+  @override
+  bool get isBoolNumStringOrNull => true;
+
+  @override
+  bool get isUnknown => value == null;
+
+  @override
+  String get typeName => "double";
+
+  @override
+  bool operator ==(Object object) =>
+      object is DoubleState && (value == object.value);
+
+  @override
+  NumState add(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value + rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value + rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  StringState convertToString() {
+    if (value == null) {
+      return StringState.UNKNOWN_VALUE;
+    }
+    return new StringState(value.toString());
+  }
+
+  @override
+  NumState divide(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value / rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value / rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState greaterThan(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value > rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value > rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  BoolState greaterThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value >= rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value >= rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  IntState integerDivide(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return IntState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return IntState.UNKNOWN_VALUE;
+      }
+      double result = value / rightValue.toDouble();
+      return new IntState(result.toInt());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return IntState.UNKNOWN_VALUE;
+      }
+      double result = value / rightValue;
+      return new IntState(result.toInt());
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return IntState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value == rightValue);
+    } else if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value == rightValue.toDouble());
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.FALSE_STATE;
+  }
+
+  @override
+  BoolState lessThan(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value < rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value < rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  BoolState lessThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value <= rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value <= rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  NumState minus(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value - rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value - rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  NumState negated() {
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    return new DoubleState(-(value));
+  }
+
+  @override
+  NumState remainder(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value % rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value % rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  NumState times(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value * rightValue.toDouble());
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new DoubleState(value * rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  String toString() => value == null ? "-unknown-" : value.toString();
+}
+
+/**
+ * The state of an object representing a Dart object for which there is no type
+ * information.
+ */
+class DynamicState extends InstanceState {
+  /**
+   * The unique instance of this class.
+   */
+  static DynamicState DYNAMIC_STATE = new DynamicState();
+
+  @override
+  bool get isBool => true;
+
+  @override
+  bool get isBoolNumStringOrNull => true;
+
+  @override
+  String get typeName => "dynamic";
+
+  @override
+  NumState add(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return _unknownNum(rightOperand);
+  }
+
+  @override
+  IntState bitAnd(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    return IntState.UNKNOWN_VALUE;
+  }
+
+  @override
+  IntState bitNot() => IntState.UNKNOWN_VALUE;
+
+  @override
+  IntState bitOr(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    return IntState.UNKNOWN_VALUE;
+  }
+
+  @override
+  IntState bitXor(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    return IntState.UNKNOWN_VALUE;
+  }
+
+  @override
+  StringState concatenate(InstanceState rightOperand) {
+    assertString(rightOperand);
+    return StringState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState convertToBool() => BoolState.UNKNOWN_VALUE;
+
+  @override
+  StringState convertToString() => StringState.UNKNOWN_VALUE;
+
+  @override
+  NumState divide(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return _unknownNum(rightOperand);
+  }
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState greaterThan(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState greaterThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  IntState integerDivide(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return IntState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState lessThan(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState lessThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState logicalAnd(InstanceState rightOperand) {
+    assertBool(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState logicalNot() => BoolState.UNKNOWN_VALUE;
+
+  @override
+  BoolState logicalOr(InstanceState rightOperand) {
+    assertBool(rightOperand);
+    return rightOperand.convertToBool();
+  }
+
+  @override
+  NumState minus(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return _unknownNum(rightOperand);
+  }
+
+  @override
+  NumState negated() => NumState.UNKNOWN_VALUE;
+
+  @override
+  NumState remainder(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return _unknownNum(rightOperand);
+  }
+
+  @override
+  IntState shiftLeft(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    return IntState.UNKNOWN_VALUE;
+  }
+
+  @override
+  IntState shiftRight(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    return IntState.UNKNOWN_VALUE;
+  }
+
+  @override
+  NumState times(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return _unknownNum(rightOperand);
+  }
+
+  /**
+   * Return an object representing an unknown numeric value whose type is based
+   * on the type of the [rightOperand].
+   */
+  NumState _unknownNum(InstanceState rightOperand) {
+    if (rightOperand is IntState) {
+      return IntState.UNKNOWN_VALUE;
+    } else if (rightOperand is DoubleState) {
+      return DoubleState.UNKNOWN_VALUE;
+    }
+    return NumState.UNKNOWN_VALUE;
+  }
+}
+
+/**
+ * A run-time exception that would be thrown during the evaluation of Dart code.
+ */
+class EvaluationException extends JavaException {
+  /**
+   * The error code associated with the exception.
+   */
+  final ErrorCode errorCode;
+
+  /**
+   * Initialize a newly created exception to have the given [errorCode].
+   */
+  EvaluationException(this.errorCode);
+}
+
+/**
+ * The state of an object representing a function.
+ */
+class FunctionState extends InstanceState {
+  /**
+   * The element representing the function being modeled.
+   */
+  final ExecutableElement _element;
+
+  /**
+   * Initialize a newly created state to represent the function with the given
+   * [element].
+   */
+  FunctionState(this._element);
+
+  @override
+  int get hashCode => _element == null ? 0 : _element.hashCode;
+
+  @override
+  String get typeName => "Function";
+
+  @override
+  bool operator ==(Object object) =>
+      object is FunctionState && (_element == object._element);
+
+  @override
+  StringState convertToString() {
+    if (_element == null) {
+      return StringState.UNKNOWN_VALUE;
+    }
+    return new StringState(_element.name);
+  }
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (_element == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is FunctionState) {
+      ExecutableElement rightElement = rightOperand._element;
+      if (rightElement == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(_element == rightElement);
+    } else if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.FALSE_STATE;
+  }
+
+  @override
+  String toString() => _element == null ? "-unknown-" : _element.name;
+}
+
+/**
+ * The state of an object representing a Dart object for which there is no more
+ * specific state.
+ */
+class GenericState extends InstanceState {
+  /**
+   * Pseudo-field that we use to represent fields in the superclass.
+   */
+  static String SUPERCLASS_FIELD = "(super)";
+
+  /**
+   * A state that can be used to represent an object whose state is not known.
+   */
+  static GenericState UNKNOWN_VALUE =
+      new GenericState(new HashMap<String, DartObjectImpl>());
+
+  /**
+   * The values of the fields of this instance.
+   */
+  final HashMap<String, DartObjectImpl> _fieldMap;
+
+  /**
+   * Initialize a newly created state to represent a newly created object. The
+   * [fieldMap] contains the values of the fields of the instance.
+   */
+  GenericState(this._fieldMap);
+
+  @override
+  HashMap<String, DartObjectImpl> get fields => _fieldMap;
+
+  @override
+  int get hashCode {
+    int hashCode = 0;
+    for (DartObjectImpl value in _fieldMap.values) {
+      hashCode += value.hashCode;
+    }
+    return hashCode;
+  }
+
+  @override
+  bool get isUnknown => identical(this, UNKNOWN_VALUE);
+
+  @override
+  String get typeName => "user defined type";
+
+  @override
+  bool operator ==(Object object) {
+    if (object is! GenericState) {
+      return false;
+    }
+    GenericState state = object as GenericState;
+    HashSet<String> otherFields =
+        new HashSet<String>.from(state._fieldMap.keys.toSet());
+    for (String fieldName in _fieldMap.keys.toSet()) {
+      if (_fieldMap[fieldName] != state._fieldMap[fieldName]) {
+        return false;
+      }
+      otherFields.remove(fieldName);
+    }
+    for (String fieldName in otherFields) {
+      if (state._fieldMap[fieldName] != _fieldMap[fieldName]) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  @override
+  StringState convertToString() => StringState.UNKNOWN_VALUE;
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.from(this == rightOperand);
+  }
+
+  @override
+  String toString() {
+    StringBuffer buffer = new StringBuffer();
+    List<String> fieldNames = _fieldMap.keys.toList();
+    fieldNames.sort();
+    bool first = true;
+    for (String fieldName in fieldNames) {
+      if (first) {
+        first = false;
+      } else {
+        buffer.write('; ');
+      }
+      buffer.write(fieldName);
+      buffer.write(' = ');
+      buffer.write(_fieldMap[fieldName]);
+    }
+    return buffer.toString();
+  }
+}
+
+/**
+ * The state of an object representing a Dart object.
+ */
+abstract class InstanceState {
+  /**
+   * If this represents a generic dart object, return a map from its field names
+   * to their values. Otherwise return null.
+   */
+  HashMap<String, DartObjectImpl> get fields => null;
+
+  /**
+   * Return `true` if this object represents an object whose type is 'bool'.
+   */
+  bool get isBool => false;
+
+  /**
+   * Return `true` if this object represents an object whose type is either
+   * 'bool', 'num', 'String', or 'Null'.
+   */
+  bool get isBoolNumStringOrNull => false;
+
+  /**
+   * Return `true` if this object represents an unknown value.
+   */
+  bool get isUnknown => false;
+
+  /**
+   * Return the name of the type of this value.
+   */
+  String get typeName;
+
+  /**
+   * 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.
+   */
+  InstanceState add(InstanceState rightOperand) {
+    if (this is StringState && rightOperand is StringState) {
+      return concatenate(rightOperand);
+    }
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Throw an exception if the given [state] does not represent a boolean value.
+   */
+  void assertBool(InstanceState state) {
+    if (!(state is BoolState || state is DynamicState)) {
+      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL);
+    }
+  }
+
+  /**
+   * Throw an exception if the given [state] does not represent a boolean,
+   * numeric, string or null value.
+   */
+  void assertBoolNumStringOrNull(InstanceState state) {
+    if (!(state is BoolState ||
+        state is DoubleState ||
+        state is IntState ||
+        state is NumState ||
+        state is StringState ||
+        state is NullState ||
+        state is DynamicState)) {
+      throw new EvaluationException(
+          CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING);
+    }
+  }
+
+  /**
+   * Throw an exception if the given [state] does not represent an integer or
+   * null value.
+   */
+  void assertIntOrNull(InstanceState state) {
+    if (!(state is IntState ||
+        state is NumState ||
+        state is NullState ||
+        state is DynamicState)) {
+      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_INT);
+    }
+  }
+
+  /**
+   * Throw an exception if the given [state] does not represent a boolean,
+   * numeric, string or null value.
+   */
+  void assertNumOrNull(InstanceState state) {
+    if (!(state is DoubleState ||
+        state is IntState ||
+        state is NumState ||
+        state is NullState ||
+        state is DynamicState)) {
+      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
+    }
+  }
+
+  /**
+   * Throw an exception if the given [state] does not represent a String value.
+   */
+  void assertString(InstanceState state) {
+    if (!(state is StringState || state is DynamicState)) {
+      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL);
+    }
+  }
+
+  /**
+   * 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.
+   */
+  IntState bitAnd(InstanceState rightOperand) {
+    assertIntOrNull(this);
+    assertIntOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the '~' operator on this object.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  IntState bitNot() {
+    assertIntOrNull(this);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * 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.
+   */
+  IntState bitOr(InstanceState rightOperand) {
+    assertIntOrNull(this);
+    assertIntOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * 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.
+   */
+  IntState bitXor(InstanceState rightOperand) {
+    assertIntOrNull(this);
+    assertIntOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * 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.
+   */
+  StringState concatenate(InstanceState rightOperand) {
+    assertString(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of applying boolean conversion to this object.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState convertToBool() => BoolState.FALSE_STATE;
+
+  /**
+   * Return the result of converting this object to a String.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  StringState convertToString();
+
+  /**
+   * 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.
+   */
+  NumState divide(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * 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 equalEqual(InstanceState rightOperand);
+
+  /**
+   * Return the result of invoking the '&gt;' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState greaterThan(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the '&gt;=' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState greaterThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * 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.
+   */
+  IntState integerDivide(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the identical function on this object with
+   * the [rightOperand].
+   */
+  BoolState isIdentical(InstanceState rightOperand);
+
+  /**
+   * Return the result of invoking the '&lt;' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState lessThan(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the '&lt;=' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState lessThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the '&&' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState logicalAnd(InstanceState rightOperand) {
+    assertBool(this);
+    assertBool(rightOperand);
+    return BoolState.FALSE_STATE;
+  }
+
+  /**
+   * Return the result of invoking the '!' operator on this object.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState logicalNot() {
+    assertBool(this);
+    return BoolState.TRUE_STATE;
+  }
+
+  /**
+   * Return the result of invoking the '||' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState logicalOr(InstanceState rightOperand) {
+    assertBool(this);
+    assertBool(rightOperand);
+    return rightOperand.convertToBool();
+  }
+
+  /**
+   * Return the result of invoking the '-' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  NumState minus(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the '-' operator on this object.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  NumState negated() {
+    assertNumOrNull(this);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * 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.
+   */
+  NumState remainder(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the '&lt;&lt;' operator on this object with
+   * the [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  IntState shiftLeft(InstanceState rightOperand) {
+    assertIntOrNull(this);
+    assertIntOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the '&gt;&gt;' operator on this object with
+   * the [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  IntState shiftRight(InstanceState rightOperand) {
+    assertIntOrNull(this);
+    assertIntOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * Return the result of invoking the 'length' getter on this object.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  IntState stringLength() {
+    assertString(this);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+
+  /**
+   * 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.
+   */
+  NumState times(InstanceState rightOperand) {
+    assertNumOrNull(this);
+    assertNumOrNull(rightOperand);
+    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
+  }
+}
+
+/**
+ * The state of an object representing an int.
+ */
+class IntState extends NumState {
+  /**
+   * A state that can be used to represent an int whose value is not known.
+   */
+  static IntState UNKNOWN_VALUE = new IntState(null);
+
+  /**
+   * The value of this instance.
+   */
+  final int value;
+
+  /**
+   * Initialize a newly created state to represent an int with the given
+   * [value].
+   */
+  IntState(this.value);
+
+  @override
+  int get hashCode => value == null ? 0 : value.hashCode;
+
+  @override
+  bool get isBoolNumStringOrNull => true;
+
+  @override
+  bool get isUnknown => value == null;
+
+  @override
+  String get typeName => "int";
+
+  @override
+  bool operator ==(Object object) =>
+      object is IntState && (value == object.value);
+
+  @override
+  NumState add(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      if (rightOperand is DoubleState) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new IntState(value + rightValue);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return new DoubleState(value.toDouble() + rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  IntState bitAnd(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new IntState(value & rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  IntState bitNot() {
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    return new IntState(~value);
+  }
+
+  @override
+  IntState bitOr(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new IntState(value | rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  IntState bitXor(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new IntState(value ^ rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  StringState convertToString() {
+    if (value == null) {
+      return StringState.UNKNOWN_VALUE;
+    }
+    return new StringState(value.toString());
+  }
+
+  @override
+  NumState divide(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return DoubleState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return DoubleState.UNKNOWN_VALUE;
+      } else {
+        return new DoubleState(value.toDouble() / rightValue.toDouble());
+      }
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return new DoubleState(value.toDouble() / rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return DoubleState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState greaterThan(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value.compareTo(rightValue) > 0);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value.toDouble() > rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  BoolState greaterThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value.compareTo(rightValue) >= 0);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value.toDouble() >= rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  IntState integerDivide(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      } else if (rightValue == 0) {
+        throw new EvaluationException(
+            CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE);
+      }
+      return new IntState(value ~/ rightValue);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      double result = value.toDouble() / rightValue;
+      return new IntState(result.toInt());
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value == rightValue);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(rightValue == value.toDouble());
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.FALSE_STATE;
+  }
+
+  @override
+  BoolState lessThan(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value.compareTo(rightValue) < 0);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value.toDouble() < rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  BoolState lessThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value.compareTo(rightValue) <= 0);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value.toDouble() <= rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  NumState minus(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      if (rightOperand is DoubleState) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new IntState(value - rightValue);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return new DoubleState(value.toDouble() - rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  NumState negated() {
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    return new IntState(-value);
+  }
+
+  @override
+  NumState remainder(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      if (rightOperand is DoubleState) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      } else if (rightValue == 0) {
+        return new DoubleState(value.toDouble() % rightValue.toDouble());
+      }
+      return new IntState(value.remainder(rightValue));
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return new DoubleState(value.toDouble() % rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  IntState shiftLeft(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      } else if (rightValue.bitLength > 31) {
+        return UNKNOWN_VALUE;
+      }
+      return new IntState(value << rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  IntState shiftRight(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      } else if (rightValue.bitLength > 31) {
+        return UNKNOWN_VALUE;
+      }
+      return new IntState(value >> rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  NumState times(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (value == null) {
+      if (rightOperand is DoubleState) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new IntState(value * rightValue);
+    } else if (rightOperand is DoubleState) {
+      double rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return DoubleState.UNKNOWN_VALUE;
+      }
+      return new DoubleState(value.toDouble() * rightValue);
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  String toString() => value == null ? "-unknown-" : value.toString();
+}
+
+/**
+ * The state of an object representing a list.
+ */
+class ListState extends InstanceState {
+  /**
+   * The elements of the list.
+   */
+  final List<DartObjectImpl> _elements;
+
+  /**
+   * Initialize a newly created state to represent a list with the given
+   * [elements].
+   */
+  ListState(this._elements);
+
+  @override
+  int get hashCode {
+    int value = 0;
+    int count = _elements.length;
+    for (int i = 0; i < count; i++) {
+      value = (value << 3) ^ _elements[i].hashCode;
+    }
+    return value;
+  }
+
+  @override
+  String get typeName => "List";
+
+  @override
+  bool operator ==(Object object) {
+    if (object is! ListState) {
+      return false;
+    }
+    List<DartObjectImpl> otherElements = (object as ListState)._elements;
+    int count = _elements.length;
+    if (otherElements.length != count) {
+      return false;
+    } else if (count == 0) {
+      return true;
+    }
+    for (int i = 0; i < count; i++) {
+      if (_elements[i] != otherElements[i]) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  @override
+  StringState convertToString() => StringState.UNKNOWN_VALUE;
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.from(this == rightOperand);
+  }
+
+  @override
+  String toString() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.write('[');
+    bool first = true;
+    _elements.forEach((DartObjectImpl element) {
+      if (first) {
+        first = false;
+      } else {
+        buffer.write(', ');
+      }
+      buffer.write(element);
+    });
+    buffer.write(']');
+    return buffer.toString();
+  }
+}
+
+/**
+ * The state of an object representing a map.
+ */
+class MapState extends InstanceState {
+  /**
+   * The entries in the map.
+   */
+  final HashMap<DartObjectImpl, DartObjectImpl> _entries;
+
+  /**
+   * Initialize a newly created state to represent a map with the given
+   * [entries].
+   */
+  MapState(this._entries);
+
+  @override
+  int get hashCode {
+    int value = 0;
+    for (DartObjectImpl key in _entries.keys.toSet()) {
+      value = (value << 3) ^ key.hashCode;
+    }
+    return value;
+  }
+
+  @override
+  String get typeName => "Map";
+
+  @override
+  bool operator ==(Object object) {
+    if (object is! MapState) {
+      return false;
+    }
+    HashMap<DartObjectImpl, DartObjectImpl> otherElements =
+        (object as MapState)._entries;
+    int count = _entries.length;
+    if (otherElements.length != count) {
+      return false;
+    } else if (count == 0) {
+      return true;
+    }
+    for (DartObjectImpl key in _entries.keys) {
+      DartObjectImpl value = _entries[key];
+      DartObjectImpl otherValue = otherElements[key];
+      if (value != otherValue) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  @override
+  StringState convertToString() => StringState.UNKNOWN_VALUE;
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.from(this == rightOperand);
+  }
+
+  @override
+  String toString() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.write('{');
+    bool first = true;
+    _entries.forEach((DartObjectImpl key, DartObjectImpl value) {
+      if (first) {
+        first = false;
+      } else {
+        buffer.write(', ');
+      }
+      buffer.write(key);
+      buffer.write(' = ');
+      buffer.write(value);
+    });
+    buffer.write('}');
+    return buffer.toString();
+  }
+}
+
+/**
+ * The state of an object representing the value 'null'.
+ */
+class NullState extends InstanceState {
+  /**
+   * An instance representing the boolean value 'null'.
+   */
+  static NullState NULL_STATE = new NullState();
+
+  @override
+  int get hashCode => 0;
+
+  @override
+  bool get isBoolNumStringOrNull => true;
+
+  @override
+  String get typeName => "Null";
+
+  @override
+  bool operator ==(Object object) => object is NullState;
+
+  @override
+  BoolState convertToBool() {
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  StringState convertToString() => new StringState("null");
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.from(rightOperand is NullState);
+  }
+
+  @override
+  BoolState logicalNot() {
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
+  String toString() => "null";
+}
+
+/**
+ * The state of an object representing a number of an unknown type (a 'num').
+ */
+class NumState extends InstanceState {
+  /**
+   * A state that can be used to represent a number whose value is not known.
+   */
+  static NumState UNKNOWN_VALUE = new NumState();
+
+  @override
+  int get hashCode => 7;
+
+  @override
+  bool get isBoolNumStringOrNull => true;
+
+  @override
+  bool get isUnknown => identical(this, UNKNOWN_VALUE);
+
+  @override
+  String get typeName => "num";
+
+  @override
+  bool operator ==(Object object) => object is NumState;
+
+  @override
+  NumState add(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return UNKNOWN_VALUE;
+  }
+
+  @override
+  StringState convertToString() => StringState.UNKNOWN_VALUE;
+
+  @override
+  NumState divide(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return DoubleState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState greaterThan(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState greaterThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  IntState integerDivide(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return IntState.UNKNOWN_VALUE;
+      } else if (rightValue == 0) {
+        throw new EvaluationException(
+            CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE);
+      }
+    } else if (rightOperand is DynamicState) {
+      return IntState.UNKNOWN_VALUE;
+    }
+    return IntState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState lessThan(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState lessThanOrEqual(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  NumState minus(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return UNKNOWN_VALUE;
+  }
+
+  @override
+  NumState negated() => UNKNOWN_VALUE;
+
+  @override
+  NumState remainder(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return UNKNOWN_VALUE;
+  }
+
+  @override
+  NumState times(InstanceState rightOperand) {
+    assertNumOrNull(rightOperand);
+    return UNKNOWN_VALUE;
+  }
+
+  @override
+  String toString() => "-unknown-";
+}
+
+/**
+ * The state of an object representing a string.
+ */
+class StringState extends InstanceState {
+  /**
+   * A state that can be used to represent a double whose value is not known.
+   */
+  static StringState UNKNOWN_VALUE = new StringState(null);
+
+  /**
+   * The value of this instance.
+   */
+  final String value;
+
+  /**
+   * Initialize a newly created state to represent the given [value].
+   */
+  StringState(this.value);
+
+  @override
+  int get hashCode => value == null ? 0 : value.hashCode;
+
+  @override
+  bool get isBoolNumStringOrNull => true;
+
+  @override
+  bool get isUnknown => value == null;
+
+  @override
+  String get typeName => "String";
+
+  @override
+  bool operator ==(Object object) =>
+      object is StringState && (value == object.value);
+
+  @override
+  StringState concatenate(InstanceState rightOperand) {
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is StringState) {
+      String rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      }
+      return new StringState("$value$rightValue");
+    } else if (rightOperand is DynamicState) {
+      return UNKNOWN_VALUE;
+    }
+    return super.concatenate(rightOperand);
+  }
+
+  @override
+  StringState convertToString() => this;
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is StringState) {
+      String rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value == rightValue);
+    } else if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.FALSE_STATE;
+  }
+
+  @override
+  IntState stringLength() {
+    if (value == null) {
+      return IntState.UNKNOWN_VALUE;
+    }
+    return new IntState(value.length);
+  }
+
+  @override
+  String toString() => value == null ? "-unknown-" : "'$value'";
+}
+
+/**
+ * The state of an object representing a symbol.
+ */
+class SymbolState extends InstanceState {
+  /**
+   * The value of this instance.
+   */
+  final String value;
+
+  /**
+   * Initialize a newly created state to represent the given [value].
+   */
+  SymbolState(this.value);
+
+  @override
+  int get hashCode => value == null ? 0 : value.hashCode;
+
+  @override
+  String get typeName => "Symbol";
+
+  @override
+  bool operator ==(Object object) =>
+      object is SymbolState && (value == object.value);
+
+  @override
+  StringState convertToString() {
+    if (value == null) {
+      return StringState.UNKNOWN_VALUE;
+    }
+    return new StringState(value);
+  }
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (value == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is SymbolState) {
+      String rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(value == rightValue);
+    } else if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.FALSE_STATE;
+  }
+
+  @override
+  String toString() => value == null ? "-unknown-" : "#$value";
+}
+
+/**
+ * The state of an object representing a type.
+ */
+class TypeState extends InstanceState {
+  /**
+   * The element representing the type being modeled.
+   */
+  final Element _element;
+
+  /**
+   * Initialize a newly created state to represent the given [value].
+   */
+  TypeState(this._element);
+
+  @override
+  int get hashCode => _element == null ? 0 : _element.hashCode;
+
+  @override
+  String get typeName => "Type";
+
+  @override
+  bool operator ==(Object object) =>
+      object is TypeState && (_element == object._element);
+
+  @override
+  StringState convertToString() {
+    if (_element == null) {
+      return StringState.UNKNOWN_VALUE;
+    }
+    return new StringState(_element.name);
+  }
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (_element == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    if (rightOperand is TypeState) {
+      Element rightElement = rightOperand._element;
+      if (rightElement == null) {
+        return BoolState.UNKNOWN_VALUE;
+      }
+      return BoolState.from(_element == rightElement);
+    } else if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.FALSE_STATE;
+  }
+
+  @override
+  String toString() => _element == null ? "-unknown-" : _element.name;
+}
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index 23869ee..2803273 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -204,11 +204,6 @@
   Object visitImportDirective(ImportDirective node) {
     // Remove previous element. (It will remain null if the target is missing.)
     node.element = null;
-
-    String uriContent = node.uriContent;
-    if (DartUriResolver.isDartExtUri(uriContent)) {
-      libraryElement.hasExtUri = true;
-    }
     Source importedSource = node.source;
     if (importedSource != null && context.exists(importedSource)) {
       // The imported source will be null if the URI in the import
@@ -225,7 +220,7 @@
           importElement.uriOffset = uriLiteral.offset;
           importElement.uriEnd = uriLiteral.end;
         }
-        importElement.uri = uriContent;
+        importElement.uri = node.uriContent;
         importElement.deferred = node.deferredKeyword != null;
         importElement.combinators = _buildCombinators(node);
         importElement.importedLibrary = importedLibrary;
@@ -312,7 +307,7 @@
    * The compilation unit element into which the elements being built will be
    * stored.
    */
-  final CompilationUnitElement compilationUnitElement;
+  final CompilationUnitElementImpl compilationUnitElement;
 
   /**
    * The element holder associated with the element that is currently being built.
@@ -339,9 +334,9 @@
   HashMap<String, FieldElement> _fieldMap;
 
   /**
-   * Initialize a newly created element builder to build the elements for a compilation unit.
-   *
-   * @param initialHolder the element holder associated with the compilation unit being built
+   * Initialize a newly created element builder to build the elements for a
+   * compilation unit. The [initialHolder] is the element holder to which the
+   * children of the visited compilation unit node will be added.
    */
   ElementBuilder(ElementHolder initialHolder, this.compilationUnitElement) {
     _currentHolder = initialHolder;
@@ -375,6 +370,7 @@
       if (node.exceptionType == null) {
         exception.hasImplicitType = true;
       }
+      exception.setVisibleRange(node.offset, node.length);
       _currentHolder.addLocalVariable(exception);
       exceptionParameter.staticElement = exception;
       // stack trace
@@ -383,6 +379,7 @@
         LocalVariableElementImpl stackTrace =
             new LocalVariableElementImpl.forNode(stackTraceParameter);
         _setCodeRange(stackTrace, stackTraceParameter);
+        stackTrace.setVisibleRange(node.offset, node.length);
         _currentHolder.addLocalVariable(stackTrace);
         stackTraceParameter.staticElement = stackTrace;
       }
@@ -484,7 +481,7 @@
   @override
   Object visitCompilationUnit(CompilationUnit node) {
     if (compilationUnitElement is ElementImpl) {
-      _setCodeRange(compilationUnitElement as ElementImpl, node);
+      _setCodeRange(compilationUnitElement, node);
     }
     return super.visitCompilationUnit(node);
   }
@@ -548,9 +545,7 @@
     _setCodeRange(element, node);
     element.metadata = _createElementAnnotations(node.metadata);
     ForEachStatement statement = node.parent as ForEachStatement;
-    int declarationEnd = node.offset + node.length;
-    int statementEnd = statement.offset + statement.length;
-    element.setVisibleRange(declarationEnd, statementEnd - declarationEnd - 1);
+    element.setVisibleRange(statement.offset, statement.length);
     element.const3 = node.isConst;
     element.final2 = node.isFinal;
     if (node.type == null) {
@@ -626,6 +621,27 @@
     // to subclass, mix-in, implement, or explicitly instantiate an enum).  So
     // we represent this as having no constructors.
     enumElement.constructors = ConstructorElement.EMPTY_LIST;
+    //
+    // Build the elements for the constants. These are minimal elements; the
+    // rest of the constant elements (and elements for other fields) must be
+    // built later after we can access the type provider.
+    //
+    List<FieldElement> fields = new List<FieldElement>();
+    NodeList<EnumConstantDeclaration> constants = node.constants;
+    for (EnumConstantDeclaration constant in constants) {
+      SimpleIdentifier constantName = constant.name;
+      FieldElementImpl constantField =
+          new ConstFieldElementImpl.forNode(constantName);
+      constantField.static = true;
+      constantField.const3 = true;
+      constantField.type = enumType;
+      setElementDocumentationComment(constantField, constant);
+      fields.add(constantField);
+      _createGetter(constantField);
+      constantName.staticElement = constantField;
+    }
+    enumElement.fields = fields;
+
     _currentHolder.addEnum(enumElement);
     enumName.staticElement = enumElement;
     return super.visitEnumDeclaration(node);
@@ -633,7 +649,9 @@
 
   @override
   Object visitExportDirective(ExportDirective node) {
-    _createElementAnnotations(node.metadata);
+    List<ElementAnnotation> annotations =
+        _createElementAnnotations(node.metadata);
+    compilationUnitElement.setAnnotations(node.offset, annotations);
     return super.visitExportDirective(node);
   }
 
@@ -895,7 +913,9 @@
 
   @override
   Object visitImportDirective(ImportDirective node) {
-    _createElementAnnotations(node.metadata);
+    List<ElementAnnotation> annotations =
+        _createElementAnnotations(node.metadata);
+    compilationUnitElement.setAnnotations(node.offset, annotations);
     return super.visitImportDirective(node);
   }
 
@@ -906,7 +926,6 @@
       SimpleIdentifier labelName = label.label;
       LabelElementImpl element =
           new LabelElementImpl.forNode(labelName, onSwitchStatement, false);
-      _setCodeRange(element, node);
       _currentHolder.addLabel(element);
       labelName.staticElement = element;
     }
@@ -915,7 +934,9 @@
 
   @override
   Object visitLibraryDirective(LibraryDirective node) {
-    _createElementAnnotations(node.metadata);
+    List<ElementAnnotation> annotations =
+        _createElementAnnotations(node.metadata);
+    compilationUnitElement.setAnnotations(node.offset, annotations);
     return super.visitLibraryDirective(node);
   }
 
@@ -1078,7 +1099,9 @@
 
   @override
   Object visitPartDirective(PartDirective node) {
-    _createElementAnnotations(node.metadata);
+    List<ElementAnnotation> annotations =
+        _createElementAnnotations(node.metadata);
+    compilationUnitElement.setAnnotations(node.offset, annotations);
     return super.visitPartDirective(node);
   }
 
@@ -1178,10 +1201,7 @@
       }
       element = variable;
       _setCodeRange(element, node);
-      Block enclosingBlock = node.getAncestor((node) => node is Block);
-      // TODO(brianwilkerson) This isn't right for variables declared in a for
-      // loop.
-      variable.setVisibleRange(enclosingBlock.offset, enclosingBlock.length);
+      _setVariableVisibleRange(variable, node);
       variable.hasImplicitType = varList.type == null;
       _currentHolder.addLocalVariable(variable);
       variableName.staticElement = element;
@@ -1314,6 +1334,18 @@
   }
 
   /**
+   * Create a getter that corresponds to the given [field].
+   */
+  void _createGetter(FieldElementImpl field) {
+    PropertyAccessorElementImpl getter =
+        new PropertyAccessorElementImpl.forVariable(field);
+    getter.getter = true;
+    getter.returnType = field.type;
+    getter.type = new FunctionTypeImpl(getter);
+    field.getter = getter;
+  }
+
+  /**
    * Create the types associated with the given type parameters, setting the type of each type
    * parameter, and return an array of types corresponding to the given parameters.
    *
@@ -1366,6 +1398,18 @@
     }
   }
 
+  void _setVariableVisibleRange(
+      LocalVariableElementImpl element, VariableDeclaration node) {
+    AstNode scopeNode;
+    AstNode parent2 = node.parent.parent;
+    if (parent2 is ForStatement) {
+      scopeNode = parent2;
+    } else {
+      scopeNode = node.getAncestor((node) => node is Block);
+    }
+    element.setVisibleRange(scopeNode.offset, scopeNode.length);
+  }
+
   /**
    * Make the given holder be the current holder while visiting the given node.
    *
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index e3f4dfe..63528f1b 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -9,14 +9,14 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/visitor.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/dart/element/handle.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/constant.dart'
-    show DartObject, EvaluationResultImpl;
-import 'package:analyzer/src/generated/element_handle.dart';
+import 'package:analyzer/src/generated/constant.dart' show EvaluationResultImpl;
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisContext, AnalysisEngine;
 import 'package:analyzer/src/generated/java_core.dart';
@@ -568,7 +568,8 @@
   @override
   MethodElement lookUpConcreteMethod(
           String methodName, LibraryElement library) =>
-      _internalLookUpConcreteMethod(methodName, library, true);
+      _internalLookUpConcreteMethod(
+          methodName, library, true, new HashSet<ClassElement>());
 
   @override
   PropertyAccessorElement lookUpGetter(
@@ -583,7 +584,8 @@
   @override
   MethodElement lookUpInheritedConcreteMethod(
           String methodName, LibraryElement library) =>
-      _internalLookUpConcreteMethod(methodName, library, false);
+      _internalLookUpConcreteMethod(
+          methodName, library, false, new HashSet<ClassElement>());
 
   @override
   PropertyAccessorElement lookUpInheritedConcreteSetter(
@@ -593,11 +595,13 @@
   @override
   MethodElement lookUpInheritedMethod(
           String methodName, LibraryElement library) =>
-      _internalLookUpMethod(methodName, library, false);
+      _internalLookUpMethod(
+          methodName, library, false, new HashSet<ClassElement>());
 
   @override
   MethodElement lookUpMethod(String methodName, LibraryElement library) =>
-      _internalLookUpMethod(methodName, library, true);
+      _internalLookUpMethod(
+          methodName, library, true, new HashSet<ClassElement>());
 
   @override
   PropertyAccessorElement lookUpSetter(
@@ -679,9 +683,8 @@
         visitedClasses.add(this);
       }
       try {
-        ClassElementImpl superclass = supertype.element;
-        constructorsToForward =
-            superclass._computeMixinAppConstructors(visitedClasses);
+        constructorsToForward = getImpl(supertype.element)
+            ._computeMixinAppConstructors(visitedClasses);
       } finally {
         visitedClasses.removeLast();
       }
@@ -742,25 +745,29 @@
         _internalLookUpGetter(getterName, library, includeThisClass);
     while (getter != null && getter.isAbstract) {
       Element definingClass = getter.enclosingElement;
-      if (definingClass is! ClassElementImpl) {
+      if (definingClass is! ClassElement) {
         return null;
       }
-      getter = (definingClass as ClassElementImpl)
+      getter = getImpl(definingClass)
           ._internalLookUpGetter(getterName, library, false);
     }
     return getter;
   }
 
   MethodElement _internalLookUpConcreteMethod(
-      String methodName, LibraryElement library, bool includeThisClass) {
-    MethodElement method =
-        _internalLookUpMethod(methodName, library, includeThisClass);
+      String methodName,
+      LibraryElement library,
+      bool includeThisClass,
+      HashSet<ClassElement> visitedClasses) {
+    MethodElement method = _internalLookUpMethod(
+        methodName, library, includeThisClass, visitedClasses);
     while (method != null && method.isAbstract) {
       ClassElement definingClass = method.enclosingElement;
       if (definingClass == null) {
         return null;
       }
-      method = definingClass.lookUpInheritedMethod(methodName, library);
+      method = getImpl(definingClass)
+          ._internalLookUpMethod(methodName, library, false, visitedClasses);
     }
     return method;
   }
@@ -813,9 +820,8 @@
     return null;
   }
 
-  MethodElement _internalLookUpMethod(
-      String methodName, LibraryElement library, bool includeThisClass) {
-    HashSet<ClassElement> visitedClasses = new HashSet<ClassElement>();
+  MethodElement _internalLookUpMethod(String methodName, LibraryElement library,
+      bool includeThisClass, HashSet<ClassElement> visitedClasses) {
     ClassElement currentElement = this;
     if (includeThisClass) {
       MethodElement element = currentElement.getMethod(methodName);
@@ -905,6 +911,18 @@
     }
     return false;
   }
+
+  /**
+   * Return the [ClassElementImpl] of the given [classElement].  May throw an
+   * exception if the [ClassElementImpl] cannot be provided (should not happen
+   * though).
+   */
+  static ClassElementImpl getImpl(ClassElement classElement) {
+    if (classElement is ClassElementHandle) {
+      return getImpl(classElement.actualElement);
+    }
+    return classElement as ClassElementImpl;
+  }
 }
 
 /**
@@ -928,6 +946,13 @@
   Source librarySource;
 
   /**
+   * A table mapping the offset of a directive to the annotations associated
+   * with that directive, or `null` if none of the annotations in the
+   * compilation unit have annotations.
+   */
+  Map<int, List<ElementAnnotation>> annotationMap = null;
+
+  /**
    * A list containing all of the top-level accessors (getters and setters)
    * contained in this compilation unit.
    */
@@ -1072,7 +1097,13 @@
    */
   void set types(List<ClassElement> types) {
     for (ClassElement type in types) {
-      (type as ClassElementImpl).enclosingElement = this;
+      // Another implementation of ClassElement is _DeferredClassElement,
+      // which is used to resynthesize classes lazily. We cannot cast it
+      // to ClassElementImpl, and it already can provide correct values of the
+      // 'enclosingElement' property.
+      if (type is ClassElementImpl) {
+        type.enclosingElement = this;
+      }
     }
     this._types = types;
   }
@@ -1103,6 +1134,18 @@
   @override
   CompilationUnit computeNode() => unit;
 
+  /**
+   * Return the annotations associated with the directive at the given [offset],
+   * or an empty list if the directive has no annotations or if there is no
+   * directive at the given offset.
+   */
+  List<ElementAnnotation> getAnnotations(int offset) {
+    if (annotationMap == null) {
+      return ElementAnnotation.EMPTY_LIST;
+    }
+    return annotationMap[offset] ?? ElementAnnotation.EMPTY_LIST;
+  }
+
   @override
   ElementImpl getChild(String identifier) {
     //
@@ -1181,6 +1224,15 @@
     _variables[index] = to;
   }
 
+  /**
+   * Set the annotations associated with the directive at the given [offset] to
+   * the given list of [annotations].
+   */
+  void setAnnotations(int offset, List<ElementAnnotation> annotations) {
+    annotationMap ??= new HashMap<int, List<ElementAnnotation>>();
+    annotationMap[offset] = annotations;
+  }
+
   @override
   void visitChildren(ElementVisitor visitor) {
     super.visitChildren(visitor);
@@ -1568,11 +1620,27 @@
   static String _DEPRECATED_VARIABLE_NAME = "deprecated";
 
   /**
+   * The name of the class used to JS annotate an element.
+   */
+  static String _JS_CLASS_NAME = "JS";
+
+  /**
+   * The name of `js` library, used to define JS annotations.
+   */
+  static String _JS_LIB_NAME = "js";
+
+  /**
    * The name of `meta` library, used to define analysis annotations.
    */
   static String _META_LIB_NAME = "meta";
 
   /**
+   * The name of the top-level variable used to mark a method as requiring
+   * overriders to call super.
+   */
+  static String _MUST_CALL_SUPER_VARIABLE_NAME = "mustCallSuper";
+
+  /**
    * The name of the top-level variable used to mark a method as being expected
    * to override an inherited method.
    */
@@ -1591,6 +1659,17 @@
   static String PROXY_VARIABLE_NAME = "proxy";
 
   /**
+   * The name of the class used to mark a parameter as being required.
+   */
+  static String _REQUIRED_CLASS_NAME = "Required";
+
+  /**
+   * The name of the top-level variable used to mark a parameter as being
+   * required.
+   */
+  static String _REQUIRED_VARIABLE_NAME = "required";
+
+  /**
    * The element representing the field, variable, or constructor being used as
    * an annotation.
    */
@@ -1639,6 +1718,17 @@
   }
 
   @override
+  bool get isJS => element is ConstructorElement &&
+        element.enclosingElement.name == _JS_CLASS_NAME &&
+        element.library?.name == _JS_LIB_NAME;
+
+  @override
+  bool get isMustCallSuper =>
+      element is PropertyAccessorElement &&
+      element.name == _MUST_CALL_SUPER_VARIABLE_NAME &&
+      element.library?.name == _META_LIB_NAME;
+
+  @override
   bool get isOverride =>
       element is PropertyAccessorElement &&
       element.name == _OVERRIDE_VARIABLE_NAME &&
@@ -1656,6 +1746,15 @@
       element.name == PROXY_VARIABLE_NAME &&
       element.library?.isDartCore == true;
 
+  @override
+  bool get isRequired =>
+      element is ConstructorElement &&
+          element.enclosingElement.name == _REQUIRED_CLASS_NAME &&
+          element.library?.name == _META_LIB_NAME ||
+      element is PropertyAccessorElement &&
+          element.name == _REQUIRED_VARIABLE_NAME &&
+          element.library?.name == _META_LIB_NAME;
+
   /**
    * Get the library containing this annotation.
    */
@@ -1839,6 +1938,16 @@
   }
 
   @override
+  bool get isJS {
+    for (ElementAnnotation annotation in metadata) {
+      if (annotation.isJS) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
   bool get isOverride {
     for (ElementAnnotation annotation in metadata) {
       if (annotation.isOverride) {
@@ -1871,6 +1980,16 @@
   bool get isPublic => !isPrivate;
 
   @override
+  bool get isRequired {
+    for (ElementAnnotation annotation in metadata) {
+      if (annotation.isRequired) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
   bool get isSynthetic => hasModifier(Modifier.SYNTHETIC);
 
   @override
@@ -1947,6 +2066,27 @@
   }
 
   /**
+   * Append to the given [buffer] a comma-separated list of the names of the
+   * types of this element and every enclosing element.
+   */
+  void appendPathTo(StringBuffer buffer) {
+    Element element = this;
+    while (element != null) {
+      if (element != this) {
+        buffer.write(', ');
+      }
+      buffer.write(element.runtimeType);
+      String name = element.name;
+      if (name != null) {
+        buffer.write(' (');
+        buffer.write(name);
+        buffer.write(')');
+      }
+      element = element.enclosingElement;
+    }
+  }
+
+  /**
    * Append a textual representation of this element to the given [buffer].
    */
   void appendTo(StringBuffer buffer) {
@@ -2030,15 +2170,6 @@
   }
 
   /**
-   * If the given [child] is not `null`, use the given [visitor] to visit it.
-   */
-  void safelyVisitChild(Element child, ElementVisitor visitor) {
-    if (child != null) {
-      child.accept(visitor);
-    }
-  }
-
-  /**
    * Use the given [visitor] to visit all of the [children] in the given array.
    */
   void safelyVisitChildren(List<Element> children, ElementVisitor visitor) {
@@ -2189,10 +2320,10 @@
 
   @override
   int get hashCode {
-    int result = 1;
+    int result = 0;
     for (int i = 0; i < _components.length; i++) {
       String component = _components[i];
-      result = 31 * result + component.hashCode;
+      result = JenkinsSmiHash.combine(result, component.hashCode);
     }
     return result;
   }
@@ -2687,6 +2818,20 @@
    */
   FunctionElementImpl.forOffset(int nameOffset) : super("", nameOffset);
 
+  /**
+   * Synthesize an unnamed function element that takes [parameters] and returns
+   * [returnType].
+   */
+  FunctionElementImpl.synthetic(
+      List<ParameterElement> parameters, DartType returnType)
+      : super("", -1) {
+    synthetic = true;
+    this.returnType = returnType;
+    this.parameters = parameters;
+
+    type = new FunctionTypeImpl(this);
+  }
+
   @override
   String get identifier {
     String identifier = super.identifier;
@@ -2987,7 +3132,7 @@
   @override
   void visitChildren(ElementVisitor visitor) {
     super.visitChildren(visitor);
-    safelyVisitChild(prefix, visitor);
+    prefix?.accept(visitor);
   }
 }
 
@@ -3133,8 +3278,8 @@
    * the given [name].
    */
   LibraryElementImpl.forNode(this.context, LibraryIdentifier name)
-      : super.forNode(name),
-        nameLength = name != null ? name.length : 0;
+      : nameLength = name != null ? name.length : 0,
+        super.forNode(name);
 
   @override
   int get codeLength {
@@ -3539,14 +3684,19 @@
     // are in the case where library cycles have simply never been computed from
     // a newly reachable node.
     Set<LibraryElementImpl> active = new HashSet();
-    void invalidate(LibraryElementImpl library) {
-      if (!active.add(library)) return;
-      if (library._libraryCycle != null) {
-        library._libraryCycle.forEach(invalidate);
-        library._libraryCycle = null;
+    void invalidate(LibraryElement library) {
+      if (library is LibraryElementHandle) {
+        library = (library as LibraryElementHandle).actualElement;
       }
-      library.exportedLibraries.forEach(invalidate);
-      library.importedLibraries.forEach(invalidate);
+      LibraryElementImpl libraryImpl = library;
+      if (active.add(libraryImpl)) {
+        if (libraryImpl._libraryCycle != null) {
+          libraryImpl._libraryCycle.forEach(invalidate);
+          libraryImpl._libraryCycle = null;
+        }
+        library.exportedLibraries.forEach(invalidate);
+        library.importedLibraries.forEach(invalidate);
+      }
     }
     invalidate(this);
   }
@@ -3560,7 +3710,7 @@
   @override
   void visitChildren(ElementVisitor visitor) {
     super.visitChildren(visitor);
-    safelyVisitChild(_definingCompilationUnit, visitor);
+    _definingCompilationUnit?.accept(visitor);
     safelyVisitChildren(_exports, visitor);
     safelyVisitChildren(_imports, visitor);
     safelyVisitChildren(_parts, visitor);
@@ -3698,8 +3848,8 @@
   }
 
   @override
-  VariableDeclaration computeNode() =>
-      getNodeMatching((node) => node is VariableDeclaration);
+  Declaration computeNode() => getNodeMatching(
+      (node) => node is DeclaredIdentifier || node is VariableDeclaration);
 
   /**
    * Set the visible range for this element to the range starting at the given
@@ -3980,6 +4130,9 @@
   bool get isDeprecated => false;
 
   @override
+  bool get isJS => false;
+
+  @override
   bool get isOverride => false;
 
   @override
@@ -3998,6 +4151,9 @@
   bool get isPublic => !isPrivate;
 
   @override
+  bool get isRequired => false;
+
+  @override
   bool get isSynthetic => true;
 
   @override
@@ -4856,7 +5012,7 @@
   @override
   void visitChildren(ElementVisitor visitor) {
     super.visitChildren(visitor);
-    safelyVisitChild(_initializer, visitor);
+    _initializer?.accept(visitor);
   }
 }
 
diff --git a/pkg/analyzer/lib/src/dart/element/handle.dart b/pkg/analyzer/lib/src/dart/element/handle.dart
new file mode 100644
index 0000000..b922a4c
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/element/handle.dart
@@ -0,0 +1,1114 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.src.generated.element_handle;
+
+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/src/dart/element/element.dart';
+import 'package:analyzer/src/generated/engine.dart';
+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';
+
+/**
+ * A handle to a [ClassElement].
+ */
+class ClassElementHandle extends ElementHandle implements ClassElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  ClassElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  List<PropertyAccessorElement> get accessors => actualElement.accessors;
+
+  @override
+  ClassElement get actualElement => super.actualElement as ClassElement;
+
+  @override
+  List<InterfaceType> get allSupertypes => actualElement.allSupertypes;
+
+  @override
+  List<ConstructorElement> get constructors => actualElement.constructors;
+
+  @override
+  List<FieldElement> get fields => actualElement.fields;
+
+  @override
+  bool get hasNonFinalField => actualElement.hasNonFinalField;
+
+  @override
+  bool get hasReferenceToSuper => actualElement.hasReferenceToSuper;
+
+  @override
+  bool get hasStaticMember => actualElement.hasStaticMember;
+
+  @override
+  List<InterfaceType> get interfaces => actualElement.interfaces;
+
+  @override
+  bool get isAbstract => actualElement.isAbstract;
+
+  @override
+  bool get isEnum => actualElement.isEnum;
+
+  @override
+  bool get isJS => actualElement.isJS;
+
+  @override
+  bool get isMixinApplication => actualElement.isMixinApplication;
+
+  @override
+  bool get isOrInheritsProxy => actualElement.isOrInheritsProxy;
+
+  @override
+  bool get isProxy => actualElement.isProxy;
+
+  @override
+  bool get isRequired => actualElement.isRequired;
+
+  @override
+  bool get isValidMixin => actualElement.isValidMixin;
+
+  @override
+  ElementKind get kind => ElementKind.CLASS;
+
+  @override
+  List<MethodElement> get methods => actualElement.methods;
+
+  @override
+  List<InterfaceType> get mixins => actualElement.mixins;
+
+  @override
+  InterfaceType get supertype => actualElement.supertype;
+
+  @override
+  InterfaceType get type => actualElement.type;
+
+  @override
+  List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
+
+  @override
+  ConstructorElement get unnamedConstructor => actualElement.unnamedConstructor;
+
+  @override
+  NamedCompilationUnitMember computeNode() => super.computeNode();
+
+  @override
+  FieldElement getField(String fieldName) => actualElement.getField(fieldName);
+
+  @override
+  PropertyAccessorElement getGetter(String getterName) =>
+      actualElement.getGetter(getterName);
+
+  @override
+  MethodElement getMethod(String methodName) =>
+      actualElement.getMethod(methodName);
+
+  @override
+  ConstructorElement getNamedConstructor(String name) =>
+      actualElement.getNamedConstructor(name);
+
+  @override
+  PropertyAccessorElement getSetter(String setterName) =>
+      actualElement.getSetter(setterName);
+
+  @override
+  bool isSuperConstructorAccessible(ConstructorElement constructor) =>
+      actualElement.isSuperConstructorAccessible(constructor);
+
+  @override
+  MethodElement lookUpConcreteMethod(
+          String methodName, LibraryElement library) =>
+      actualElement.lookUpConcreteMethod(methodName, library);
+
+  @override
+  PropertyAccessorElement lookUpGetter(
+          String getterName, LibraryElement library) =>
+      actualElement.lookUpGetter(getterName, library);
+
+  @override
+  PropertyAccessorElement lookUpInheritedConcreteGetter(
+          String methodName, LibraryElement library) =>
+      actualElement.lookUpInheritedConcreteGetter(methodName, library);
+
+  @override
+  MethodElement lookUpInheritedConcreteMethod(
+          String methodName, LibraryElement library) =>
+      actualElement.lookUpInheritedConcreteMethod(methodName, library);
+
+  @override
+  PropertyAccessorElement lookUpInheritedConcreteSetter(
+          String methodName, LibraryElement library) =>
+      actualElement.lookUpInheritedConcreteSetter(methodName, library);
+
+  @override
+  MethodElement lookUpInheritedMethod(
+          String methodName, LibraryElement library) =>
+      actualElement.lookUpInheritedMethod(methodName, library);
+
+  @override
+  MethodElement lookUpMethod(String methodName, LibraryElement library) =>
+      actualElement.lookUpMethod(methodName, library);
+
+  @override
+  PropertyAccessorElement lookUpSetter(
+          String setterName, LibraryElement library) =>
+      actualElement.lookUpSetter(setterName, library);
+}
+
+/**
+ * A handle to a [CompilationUnitElement].
+ */
+class CompilationUnitElementHandle extends ElementHandle
+    implements CompilationUnitElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  CompilationUnitElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  List<PropertyAccessorElement> get accessors => actualElement.accessors;
+
+  @override
+  CompilationUnitElement get actualElement =>
+      super.actualElement as CompilationUnitElement;
+
+  @override
+  LibraryElement get enclosingElement =>
+      super.enclosingElement as LibraryElement;
+
+  @override
+  List<ClassElement> get enums => actualElement.enums;
+
+  @override
+  List<FunctionElement> get functions => actualElement.functions;
+
+  @override
+  List<FunctionTypeAliasElement> get functionTypeAliases =>
+      actualElement.functionTypeAliases;
+
+  @override
+  bool get hasLoadLibraryFunction => actualElement.hasLoadLibraryFunction;
+
+  @override
+  ElementKind get kind => ElementKind.COMPILATION_UNIT;
+
+  @override
+  Source get source => actualElement.source;
+
+  @override
+  List<TopLevelVariableElement> get topLevelVariables =>
+      actualElement.topLevelVariables;
+
+  @override
+  List<ClassElement> get types => actualElement.types;
+
+  @override
+  String get uri => actualElement.uri;
+
+  @override
+  int get uriEnd => actualElement.uriEnd;
+
+  @override
+  int get uriOffset => actualElement.uriOffset;
+
+  @override
+  CompilationUnit computeNode() => actualElement.computeNode();
+
+  @override
+  Element getElementAt(int offset) {
+    return actualElement.getElementAt(offset);
+  }
+
+  @override
+  ClassElement getEnum(String enumName) => actualElement.getEnum(enumName);
+
+  @override
+  ClassElement getType(String className) => actualElement.getType(className);
+}
+
+/**
+ * A handle to a [ConstructorElement].
+ */
+class ConstructorElementHandle extends ExecutableElementHandle
+    implements ConstructorElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  ConstructorElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  ConstructorElement get actualElement =>
+      super.actualElement as ConstructorElement;
+
+  @override
+  ClassElement get enclosingElement => actualElement.enclosingElement;
+
+  @override
+  bool get isConst => actualElement.isConst;
+
+  @override
+  bool get isDefaultConstructor => actualElement.isDefaultConstructor;
+
+  @override
+  bool get isFactory => actualElement.isFactory;
+
+  @override
+  ElementKind get kind => ElementKind.CONSTRUCTOR;
+
+  @override
+  int get nameEnd => actualElement.nameEnd;
+
+  @override
+  int get periodOffset => actualElement.periodOffset;
+
+  @override
+  ConstructorElement get redirectedConstructor =>
+      actualElement.redirectedConstructor;
+
+  @override
+  ConstructorDeclaration computeNode() => actualElement.computeNode();
+}
+
+/**
+ * A handle to an [Element].
+ */
+abstract class ElementHandle implements Element {
+  /**
+   * The unique integer identifier of this element.
+   */
+  final int id = 0;
+
+  /**
+   * The [ElementResynthesizer] which will be used to resynthesize elements on
+   * demand.
+   */
+  final ElementResynthesizer _resynthesizer;
+
+  /**
+   * The location of this element, used to reconstitute the element if it has
+   * not yet been resynthesized.
+   */
+  final ElementLocation _location;
+
+  /**
+   * A reference to the element being referenced by this handle, or `null` if
+   * the element has not yet been resynthesized.
+   */
+  Element _elementReference;
+
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  ElementHandle(this._resynthesizer, this._location);
+
+  /**
+   * Return the element being represented by this handle, reconstituting the
+   * element if the reference has been set to `null`.
+   */
+  Element get actualElement {
+    if (_elementReference == null) {
+      _elementReference = _resynthesizer.getElement(_location);
+    }
+    return _elementReference;
+  }
+
+  @override
+  AnalysisContext get context => _resynthesizer.context;
+
+  @override
+  String get displayName => actualElement.displayName;
+
+  @deprecated
+  @override
+  SourceRange get docRange => actualElement.docRange;
+
+  @override
+  String get documentationComment => actualElement.documentationComment;
+
+  @override
+  Element get enclosingElement => actualElement.enclosingElement;
+
+  @override
+  int get hashCode => _location.hashCode;
+
+  @override
+  bool get isDeprecated => actualElement.isDeprecated;
+
+  @override
+  bool get isJS => actualElement.isJS;
+
+  @override
+  bool get isOverride => actualElement.isOverride;
+
+  @override
+  bool get isPrivate => actualElement.isPrivate;
+
+  @override
+  bool get isProtected => actualElement.isProtected;
+
+  @override
+  bool get isPublic => actualElement.isPublic;
+
+  @override
+  bool get isRequired => actualElement.isRequired;
+
+  @override
+  bool get isSynthetic => actualElement.isSynthetic;
+
+  @override
+  LibraryElement get library =>
+      getAncestor((element) => element is LibraryElement);
+
+  @override
+  ElementLocation get location => _location;
+
+  @override
+  List<ElementAnnotation> get metadata => actualElement.metadata;
+
+  @override
+  String get name => actualElement.name;
+
+  @override
+  int get nameLength => actualElement.nameLength;
+
+  @override
+  int get nameOffset => actualElement.nameOffset;
+
+  @override
+  Source get source => actualElement.source;
+
+  @override
+  CompilationUnit get unit => actualElement.unit;
+
+  @override
+  bool operator ==(Object object) =>
+      object is Element && object.location == _location;
+
+  @override
+  accept(ElementVisitor visitor) => actualElement.accept(visitor);
+
+  @override
+  String computeDocumentationComment() => documentationComment;
+
+  @override
+  AstNode computeNode() => actualElement.computeNode();
+
+  @override
+  Element getAncestor(Predicate<Element> predicate) =>
+      actualElement.getAncestor(predicate);
+
+  @override
+  String getExtendedDisplayName(String shortName) =>
+      actualElement.getExtendedDisplayName(shortName);
+
+  @override
+  bool isAccessibleIn(LibraryElement library) =>
+      actualElement.isAccessibleIn(library);
+
+  @override
+  void visitChildren(ElementVisitor visitor) {
+    actualElement.visitChildren(visitor);
+  }
+}
+
+/**
+ * Interface which allows an [Element] handle to be resynthesized based on an
+ * [ElementLocation].  The concrete classes implementing element handles use
+ * this interface to retrieve the underlying elements when queried.
+ */
+abstract class ElementResynthesizer {
+  /**
+   * The context that owns the element to be resynthesized.
+   */
+  final AnalysisContext context;
+
+  /**
+   * Initialize a newly created resynthesizer to resynthesize elements in the
+   * given [context].
+   */
+  ElementResynthesizer(this.context);
+
+  /**
+   * Return the element referenced by the given [location].
+   */
+  Element getElement(ElementLocation location);
+}
+
+/**
+ * A handle to an [ExecutableElement].
+ */
+abstract class ExecutableElementHandle extends ElementHandle
+    implements ExecutableElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  ExecutableElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  ExecutableElement get actualElement =>
+      super.actualElement as ExecutableElement;
+
+  @override
+  List<FunctionElement> get functions => actualElement.functions;
+
+  @override
+  bool get hasImplicitReturnType => actualElement.hasImplicitReturnType;
+
+  @override
+  bool get isAbstract => actualElement.isAbstract;
+
+  @override
+  bool get isAsynchronous => actualElement.isAsynchronous;
+
+  @override
+  bool get isExternal => actualElement.isExternal;
+
+  @override
+  bool get isGenerator => actualElement.isGenerator;
+
+  @override
+  bool get isOperator => actualElement.isOperator;
+
+  @override
+  bool get isStatic => actualElement.isStatic;
+
+  @override
+  bool get isSynchronous => actualElement.isSynchronous;
+
+  @override
+  List<LabelElement> get labels => actualElement.labels;
+
+  @override
+  List<LocalVariableElement> get localVariables => actualElement.localVariables;
+
+  @override
+  List<ParameterElement> get parameters => actualElement.parameters;
+
+  @override
+  DartType get returnType => actualElement.returnType;
+
+  @override
+  FunctionType get type => actualElement.type;
+
+  @override
+  List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
+}
+
+/**
+ * A handle to an [ExportElement].
+ */
+class ExportElementHandle extends ElementHandle implements ExportElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  ExportElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  ExportElement get actualElement => super.actualElement as ExportElement;
+
+  @override
+  List<NamespaceCombinator> get combinators => actualElement.combinators;
+
+  @override
+  LibraryElement get exportedLibrary => actualElement.exportedLibrary;
+
+  @override
+  ElementKind get kind => ElementKind.EXPORT;
+
+  @override
+  String get uri => actualElement.uri;
+
+  @override
+  int get uriEnd => actualElement.uriEnd;
+
+  @override
+  int get uriOffset => actualElement.uriOffset;
+}
+
+/**
+ * A handle to a [FieldElement].
+ */
+class FieldElementHandle extends PropertyInducingElementHandle
+    implements FieldElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  FieldElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  FieldElement get actualElement => super.actualElement as FieldElement;
+
+  @override
+  ClassElement get enclosingElement => actualElement.enclosingElement;
+
+  @override
+  bool get isEnumConstant => actualElement.isEnumConstant;
+
+  @override
+  ElementKind get kind => ElementKind.FIELD;
+
+  @override
+  VariableDeclaration computeNode() => actualElement.computeNode();
+}
+
+/**
+ * A handle to a [FunctionElement].
+ */
+class FunctionElementHandle extends ExecutableElementHandle
+    implements FunctionElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  FunctionElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  FunctionElement get actualElement => super.actualElement as FunctionElement;
+
+  @override
+  bool get isEntryPoint => actualElement.isEntryPoint;
+
+  @override
+  ElementKind get kind => ElementKind.FUNCTION;
+
+  @override
+  SourceRange get visibleRange => actualElement.visibleRange;
+
+  @override
+  FunctionDeclaration computeNode() => actualElement.computeNode();
+}
+
+/**
+ * A handle to a [FunctionTypeAliasElement].
+ */
+class FunctionTypeAliasElementHandle extends ElementHandle
+    implements FunctionTypeAliasElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  FunctionTypeAliasElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  FunctionTypeAliasElement get actualElement =>
+      super.actualElement as FunctionTypeAliasElement;
+
+  @override
+  CompilationUnitElement get enclosingElement =>
+      super.enclosingElement as CompilationUnitElement;
+
+  @override
+  ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS;
+
+  @override
+  List<ParameterElement> get parameters => actualElement.parameters;
+
+  @override
+  DartType get returnType => actualElement.returnType;
+
+  @override
+  FunctionType get type => actualElement.type;
+
+  @override
+  List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
+
+  @override
+  FunctionTypeAlias computeNode() => actualElement.computeNode();
+}
+
+/**
+ * A handle to an [ImportElement].
+ */
+class ImportElementHandle extends ElementHandle implements ImportElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  ImportElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  ImportElement get actualElement => super.actualElement as ImportElement;
+
+  @override
+  List<NamespaceCombinator> get combinators => actualElement.combinators;
+
+  @override
+  LibraryElement get importedLibrary => actualElement.importedLibrary;
+
+  @override
+  bool get isDeferred => actualElement.isDeferred;
+
+  @override
+  ElementKind get kind => ElementKind.IMPORT;
+
+  @override
+  PrefixElement get prefix => actualElement.prefix;
+
+  @override
+  int get prefixOffset => actualElement.prefixOffset;
+
+  @override
+  String get uri => actualElement.uri;
+
+  @override
+  int get uriEnd => actualElement.uriEnd;
+
+  @override
+  int get uriOffset => actualElement.uriOffset;
+}
+
+/**
+ * A handle to a [LabelElement].
+ */
+class LabelElementHandle extends ElementHandle implements LabelElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  LabelElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  ExecutableElement get enclosingElement =>
+      super.enclosingElement as ExecutableElement;
+
+  @override
+  ElementKind get kind => ElementKind.LABEL;
+}
+
+/**
+ * A handle to a [LibraryElement].
+ */
+class LibraryElementHandle extends ElementHandle implements LibraryElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  LibraryElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  LibraryElement get actualElement => super.actualElement as LibraryElement;
+
+  @override
+  CompilationUnitElement get definingCompilationUnit =>
+      actualElement.definingCompilationUnit;
+
+  @override
+  FunctionElement get entryPoint => actualElement.entryPoint;
+
+  @override
+  List<LibraryElement> get exportedLibraries => actualElement.exportedLibraries;
+
+  @override
+  Namespace get exportNamespace => actualElement.exportNamespace;
+
+  @override
+  List<ExportElement> get exports => actualElement.exports;
+
+  @override
+  bool get hasExtUri => actualElement.hasExtUri;
+
+  @override
+  bool get hasLoadLibraryFunction => actualElement.hasLoadLibraryFunction;
+
+  @override
+  String get identifier => location.components.last;
+
+  @override
+  List<LibraryElement> get importedLibraries => actualElement.importedLibraries;
+
+  @override
+  List<ImportElement> get imports => actualElement.imports;
+
+  @override
+  bool get isBrowserApplication => actualElement.isBrowserApplication;
+
+  @override
+  bool get isDartAsync => actualElement.isDartAsync;
+
+  @override
+  bool get isDartCore => actualElement.isDartCore;
+
+  @override
+  bool get isInSdk => actualElement.isInSdk;
+
+  @override
+  ElementKind get kind => ElementKind.LIBRARY;
+
+  @override
+  List<LibraryElement> get libraryCycle => actualElement.libraryCycle;
+
+  @override
+  FunctionElement get loadLibraryFunction => actualElement.loadLibraryFunction;
+
+  @override
+  List<CompilationUnitElement> get parts => actualElement.parts;
+
+  @override
+  List<PrefixElement> get prefixes => actualElement.prefixes;
+
+  @override
+  Namespace get publicNamespace => actualElement.publicNamespace;
+
+  @override
+  List<CompilationUnitElement> get units => actualElement.units;
+
+  @override
+  List<LibraryElement> get visibleLibraries => actualElement.visibleLibraries;
+
+  @override
+  List<ImportElement> getImportsWithPrefix(PrefixElement prefixElement) =>
+      actualElement.getImportsWithPrefix(prefixElement);
+
+  @override
+  ClassElement getType(String className) => actualElement.getType(className);
+
+  @override
+  bool isUpToDate(int timeStamp) => actualElement.isUpToDate(timeStamp);
+}
+
+/**
+ * A handle to a [LocalVariableElement].
+ */
+class LocalVariableElementHandle extends VariableElementHandle
+    implements LocalVariableElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  LocalVariableElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  LocalVariableElement get actualElement =>
+      super.actualElement as LocalVariableElement;
+
+  @override
+  ElementKind get kind => ElementKind.LOCAL_VARIABLE;
+
+  @override
+  SourceRange get visibleRange => actualElement.visibleRange;
+
+  @override
+  VariableDeclaration computeNode() => actualElement.computeNode();
+}
+
+/**
+ * A handle to a [MethodElement].
+ */
+class MethodElementHandle extends ExecutableElementHandle
+    implements MethodElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  MethodElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  MethodElement get actualElement => super.actualElement as MethodElement;
+
+  @override
+  ClassElement get enclosingElement => super.enclosingElement as ClassElement;
+
+  @override
+  bool get isStatic => actualElement.isStatic;
+
+  @override
+  ElementKind get kind => ElementKind.METHOD;
+
+  @override
+  MethodDeclaration computeNode() => actualElement.computeNode();
+}
+
+/**
+ * A handle to a [ParameterElement].
+ */
+class ParameterElementHandle extends VariableElementHandle
+    with ParameterElementMixin
+    implements ParameterElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  ParameterElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  ParameterElement get actualElement => super.actualElement as ParameterElement;
+
+  @override
+  String get defaultValueCode => actualElement.defaultValueCode;
+
+  @override
+  bool get isInitializingFormal => actualElement.isInitializingFormal;
+
+  @override
+  ElementKind get kind => ElementKind.PARAMETER;
+
+  @override
+  ParameterKind get parameterKind => actualElement.parameterKind;
+
+  @override
+  List<ParameterElement> get parameters => actualElement.parameters;
+
+  @override
+  List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
+
+  @override
+  SourceRange get visibleRange => actualElement.visibleRange;
+
+  @override
+  FormalParameter computeNode() => super.computeNode();
+}
+
+/**
+ * A handle to a [PrefixElement].
+ */
+class PrefixElementHandle extends ElementHandle implements PrefixElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  PrefixElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  PrefixElement get actualElement => super.actualElement as PrefixElement;
+
+  @override
+  LibraryElement get enclosingElement =>
+      super.enclosingElement as LibraryElement;
+
+  @override
+  List<LibraryElement> get importedLibraries => LibraryElement.EMPTY_LIST;
+
+  @override
+  ElementKind get kind => ElementKind.PREFIX;
+}
+
+/**
+ * A handle to a [PropertyAccessorElement].
+ */
+class PropertyAccessorElementHandle extends ExecutableElementHandle
+    implements PropertyAccessorElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  PropertyAccessorElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  PropertyAccessorElement get actualElement =>
+      super.actualElement as PropertyAccessorElement;
+
+  @override
+  PropertyAccessorElement get correspondingGetter =>
+      actualElement.correspondingGetter;
+
+  @override
+  PropertyAccessorElement get correspondingSetter =>
+      actualElement.correspondingSetter;
+
+  @override
+  bool get isGetter => actualElement.isGetter;
+
+  @override
+  bool get isSetter => actualElement.isSetter;
+
+  @override
+  ElementKind get kind {
+    if (isGetter) {
+      return ElementKind.GETTER;
+    } else {
+      return ElementKind.SETTER;
+    }
+  }
+
+  @override
+  PropertyInducingElement get variable => actualElement.variable;
+}
+
+/**
+ * A handle to an [PropertyInducingElement].
+ */
+abstract class PropertyInducingElementHandle extends VariableElementHandle
+    implements PropertyInducingElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  PropertyInducingElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  PropertyInducingElement get actualElement =>
+      super.actualElement as PropertyInducingElement;
+
+  @override
+  PropertyAccessorElement get getter => actualElement.getter;
+
+  @override
+  DartType get propagatedType => actualElement.propagatedType;
+
+  @override
+  PropertyAccessorElement get setter => actualElement.setter;
+}
+
+/**
+ * A handle to a [TopLevelVariableElement].
+ */
+class TopLevelVariableElementHandle extends PropertyInducingElementHandle
+    implements TopLevelVariableElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  TopLevelVariableElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE;
+
+  @override
+  VariableDeclaration computeNode() => super.computeNode();
+}
+
+/**
+ * A handle to a [TypeParameterElement].
+ */
+class TypeParameterElementHandle extends ElementHandle
+    implements TypeParameterElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  TypeParameterElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  TypeParameterElement get actualElement =>
+      super.actualElement as TypeParameterElement;
+
+  @override
+  DartType get bound => actualElement.bound;
+
+  @override
+  ElementKind get kind => ElementKind.TYPE_PARAMETER;
+
+  @override
+  TypeParameterType get type => actualElement.type;
+}
+
+/**
+ * A handle to an [VariableElement].
+ */
+abstract class VariableElementHandle extends ElementHandle
+    implements VariableElement {
+  /**
+   * Initialize a newly created element handle to represent the element at the
+   * given [_location]. The [_resynthesizer] will be used to resynthesize the
+   * element when needed.
+   */
+  VariableElementHandle(
+      ElementResynthesizer resynthesizer, ElementLocation location)
+      : super(resynthesizer, location);
+
+  @override
+  VariableElement get actualElement => super.actualElement as VariableElement;
+
+  @override
+  DartObject get constantValue => actualElement.constantValue;
+
+  @override
+  bool get hasImplicitType => actualElement.hasImplicitType;
+
+  @override
+  FunctionElement get initializer => actualElement.initializer;
+
+  @override
+  bool get isConst => actualElement.isConst;
+
+  @override
+  bool get isFinal => actualElement.isFinal;
+
+  @deprecated
+  @override
+  bool get isPotentiallyMutatedInClosure =>
+      actualElement.isPotentiallyMutatedInClosure;
+
+  @deprecated
+  @override
+  bool get isPotentiallyMutatedInScope =>
+      actualElement.isPotentiallyMutatedInScope;
+
+  @override
+  bool get isStatic => actualElement.isStatic;
+
+  @override
+  DartType get type => actualElement.type;
+}
diff --git a/pkg/analyzer/lib/src/dart/element/member.dart b/pkg/analyzer/lib/src/dart/element/member.dart
index 28bce1e..efb778f 100644
--- a/pkg/analyzer/lib/src/dart/element/member.dart
+++ b/pkg/analyzer/lib/src/dart/element/member.dart
@@ -5,12 +5,11 @@
 library analyzer.src.dart.element.member;
 
 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/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/constant.dart'
-    show DartObject, EvaluationResultImpl;
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisContext, AnalysisEngine;
 import 'package:analyzer/src/generated/java_core.dart';
@@ -462,6 +461,9 @@
   bool get isDeprecated => _baseElement.isDeprecated;
 
   @override
+  bool get isJS => _baseElement.isJS;
+
+  @override
   bool get isOverride => _baseElement.isOverride;
 
   @override
@@ -474,6 +476,9 @@
   bool get isPublic => _baseElement.isPublic;
 
   @override
+  bool get isRequired => _baseElement.isRequired;
+
+  @override
   bool get isSynthetic => _baseElement.isSynthetic;
 
   @override
@@ -524,6 +529,7 @@
   /**
    * If the given [child] is not `null`, use the given [visitor] to visit it.
    */
+  @deprecated
   void safelyVisitChild(Element child, ElementVisitor visitor) {
     // TODO(brianwilkerson) Make this private
     if (child != null) {
@@ -1017,10 +1023,12 @@
   bool get isFinal => baseElement.isFinal;
 
   @override
+  @deprecated
   bool get isPotentiallyMutatedInClosure =>
       baseElement.isPotentiallyMutatedInClosure;
 
   @override
+  @deprecated
   bool get isPotentiallyMutatedInScope =>
       baseElement.isPotentiallyMutatedInScope;
 
@@ -1032,6 +1040,6 @@
     // TODO(brianwilkerson) We need to finish implementing the accessors used
     // below so that we can safely invoke them.
     super.visitChildren(visitor);
-    safelyVisitChild(baseElement.initializer, visitor);
+    baseElement.initializer?.accept(visitor);
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 29658fb..475383e 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -270,66 +270,8 @@
     if (name == null || name.length == 0) {
       // Function types have an empty name when they are defined implicitly by
       // either a closure or as part of a parameter declaration.
-      List<DartType> normalParameterTypes = this.normalParameterTypes;
-      List<DartType> optionalParameterTypes = this.optionalParameterTypes;
-      Map<String, DartType> namedParameterTypes = this.namedParameterTypes;
-      DartType returnType = this.returnType;
       StringBuffer buffer = new StringBuffer();
-      buffer.write("(");
-      bool needsComma = false;
-      if (normalParameterTypes.length > 0) {
-        for (DartType type in normalParameterTypes) {
-          if (needsComma) {
-            buffer.write(", ");
-          } else {
-            needsComma = true;
-          }
-          buffer.write(type.displayName);
-        }
-      }
-      if (optionalParameterTypes.length > 0) {
-        if (needsComma) {
-          buffer.write(", ");
-          needsComma = false;
-        }
-        buffer.write("[");
-        for (DartType type in optionalParameterTypes) {
-          if (needsComma) {
-            buffer.write(", ");
-          } else {
-            needsComma = true;
-          }
-          buffer.write(type.displayName);
-        }
-        buffer.write("]");
-        needsComma = true;
-      }
-      if (namedParameterTypes.length > 0) {
-        if (needsComma) {
-          buffer.write(", ");
-          needsComma = false;
-        }
-        buffer.write("{");
-        namedParameterTypes.forEach((String name, DartType type) {
-          if (needsComma) {
-            buffer.write(", ");
-          } else {
-            needsComma = true;
-          }
-          buffer.write(name);
-          buffer.write(": ");
-          buffer.write(type.displayName);
-        });
-        buffer.write("}");
-        needsComma = true;
-      }
-      buffer.write(")");
-      buffer.write(ElementImpl.RIGHT_ARROW);
-      if (returnType == null) {
-        buffer.write("null");
-      } else {
-        buffer.write(returnType.displayName);
-      }
+      appendTo(buffer);
       name = buffer.toString();
     }
     return name;
@@ -627,47 +569,44 @@
     List<DartType> optionalParameterTypes = this.optionalParameterTypes;
     Map<String, DartType> namedParameterTypes = this.namedParameterTypes;
     DartType returnType = this.returnType;
-    buffer.write("(");
+
     bool needsComma = false;
-    if (normalParameterTypes.isNotEmpty) {
-      for (DartType type in normalParameterTypes) {
-        if (needsComma) {
-          buffer.write(", ");
-        } else {
-          needsComma = true;
-        }
-        (type as TypeImpl).appendTo(buffer);
+    void writeSeparator() {
+      if (needsComma) {
+        buffer.write(", ");
+      } else {
+        needsComma = true;
       }
     }
-    if (optionalParameterTypes.isNotEmpty) {
+    void startOptionalParameters() {
       if (needsComma) {
         buffer.write(", ");
         needsComma = false;
       }
+    }
+
+    buffer.write("(");
+    if (normalParameterTypes.isNotEmpty) {
+      for (DartType type in normalParameterTypes) {
+        writeSeparator();
+        (type as TypeImpl).appendTo(buffer);
+      }
+    }
+    if (optionalParameterTypes.isNotEmpty) {
+      startOptionalParameters();
       buffer.write("[");
       for (DartType type in optionalParameterTypes) {
-        if (needsComma) {
-          buffer.write(", ");
-        } else {
-          needsComma = true;
-        }
+        writeSeparator();
         (type as TypeImpl).appendTo(buffer);
       }
       buffer.write("]");
       needsComma = true;
     }
     if (namedParameterTypes.isNotEmpty) {
-      if (needsComma) {
-        buffer.write(", ");
-        needsComma = false;
-      }
+      startOptionalParameters();
       buffer.write("{");
       namedParameterTypes.forEach((String name, DartType type) {
-        if (needsComma) {
-          buffer.write(", ");
-        } else {
-          needsComma = true;
-        }
+        writeSeparator();
         buffer.write(name);
         buffer.write(": ");
         (type as TypeImpl).appendTo(buffer);
@@ -731,10 +670,7 @@
 
   @override
   bool isSubtypeOf(DartType type) {
-    return relate(
-        this,
-        type,
-        (DartType t, DartType s) => t.isAssignableTo(s),
+    return relate(this, type, (DartType t, DartType s) => t.isAssignableTo(s),
         new TypeSystemImpl().instantiateToBounds);
   }
 
@@ -752,7 +688,7 @@
       // base types.
       assert(this.prunedTypedefs == null);
       List<DartType> typeArgs = typeArguments
-          .map((TypeImpl t) => t.pruned(prune))
+          .map((DartType t) => (t as TypeImpl).pruned(prune))
           .toList(growable: false);
       return new FunctionTypeImpl._(
           element, name, prune, typeArgs, _isInstantiated);
@@ -803,7 +739,7 @@
         TypeParameterTypeImpl.getTypes(this.typeParameters);
     for (ParameterElement parameter in baseParameters) {
       if (parameter.parameterKind == kind) {
-        TypeImpl type = parameter.type;
+        TypeImpl type = parameter.type ?? DynamicTypeImpl.instance;
         if (typeArguments.length != 0 &&
             typeArguments.length == typeParameters.length) {
           type = type.substitute2(typeArguments, typeParameters, newPrune);
@@ -854,56 +790,6 @@
   }
 
   /**
-   * Given two functions [f1] and [f2] where f1 and f2 are known to be
-   * generic function types (both have type formals), this checks that they
-   * have the same number of formals, and that those formals have bounds
-   * (e.g. `<T extends LowerBound>`) that satisfy [relation].
-   *
-   * The return value will be a new list of fresh type variables, that can be
-   * used to instantiate both function types, allowing further comparison.
-   * For example, given `<T>T -> T` and `<U>U -> U` we can instantiate them with
-   * `F` to get `F -> F` and `F -> F`, which we can see are equal.
-   */
-  static List<DartType> relateTypeFormals(
-      FunctionType f1, FunctionType f2, bool relation(DartType t, DartType s)) {
-    List<TypeParameterElement> params1 = f1.typeFormals;
-    List<TypeParameterElement> params2 = f2.typeFormals;
-    int count = params1.length;
-    if (params2.length != count) {
-      return null;
-    }
-    // We build up a substitution matching up the type parameters
-    // from the two types, {variablesFresh/variables1} and
-    // {variablesFresh/variables2}
-    List<DartType> variables1 = <DartType>[];
-    List<DartType> variables2 = <DartType>[];
-    List<DartType> variablesFresh = <DartType>[];
-    for (int i = 0; i < count; i++) {
-      TypeParameterElement p1 = params1[i];
-      TypeParameterElement p2 = params2[i];
-      TypeParameterElementImpl pFresh =
-          new TypeParameterElementImpl.synthetic(p2.name);
-
-      DartType variable1 = p1.type;
-      DartType variable2 = p2.type;
-      DartType variableFresh = new TypeParameterTypeImpl(pFresh);
-
-      variables1.add(variable1);
-      variables2.add(variable2);
-      variablesFresh.add(variableFresh);
-      DartType bound1 = p1.bound ?? DynamicTypeImpl.instance;
-      DartType bound2 = p2.bound ?? DynamicTypeImpl.instance;
-      bound1 = bound1.substitute2(variablesFresh, variables1);
-      bound2 = bound2.substitute2(variablesFresh, variables2);
-      pFresh.bound = bound2;
-      if (!relation(bound2, bound1)) {
-        return null;
-      }
-    }
-    return variablesFresh;
-  }
-
-  /**
    * Compares two function types [t] and [s] to see if their corresponding
    * parameter types match [parameterRelation] and their return types match
    * [returnRelation].
@@ -920,7 +806,6 @@
       bool parameterRelation(DartType t, DartType s),
       FunctionType instantiateToBounds(FunctionType t),
       {bool returnRelation(DartType t, DartType s)}) {
-
     returnRelation ??= parameterRelation;
 
     // Trivial base cases.
@@ -1024,6 +909,56 @@
   }
 
   /**
+   * Given two functions [f1] and [f2] where f1 and f2 are known to be
+   * generic function types (both have type formals), this checks that they
+   * have the same number of formals, and that those formals have bounds
+   * (e.g. `<T extends LowerBound>`) that satisfy [relation].
+   *
+   * The return value will be a new list of fresh type variables, that can be
+   * used to instantiate both function types, allowing further comparison.
+   * For example, given `<T>T -> T` and `<U>U -> U` we can instantiate them with
+   * `F` to get `F -> F` and `F -> F`, which we can see are equal.
+   */
+  static List<DartType> relateTypeFormals(
+      FunctionType f1, FunctionType f2, bool relation(DartType t, DartType s)) {
+    List<TypeParameterElement> params1 = f1.typeFormals;
+    List<TypeParameterElement> params2 = f2.typeFormals;
+    int count = params1.length;
+    if (params2.length != count) {
+      return null;
+    }
+    // We build up a substitution matching up the type parameters
+    // from the two types, {variablesFresh/variables1} and
+    // {variablesFresh/variables2}
+    List<DartType> variables1 = <DartType>[];
+    List<DartType> variables2 = <DartType>[];
+    List<DartType> variablesFresh = <DartType>[];
+    for (int i = 0; i < count; i++) {
+      TypeParameterElement p1 = params1[i];
+      TypeParameterElement p2 = params2[i];
+      TypeParameterElementImpl pFresh =
+          new TypeParameterElementImpl.synthetic(p2.name);
+
+      DartType variable1 = p1.type;
+      DartType variable2 = p2.type;
+      DartType variableFresh = new TypeParameterTypeImpl(pFresh);
+
+      variables1.add(variable1);
+      variables2.add(variable2);
+      variablesFresh.add(variableFresh);
+      DartType bound1 = p1.bound ?? DynamicTypeImpl.instance;
+      DartType bound2 = p2.bound ?? DynamicTypeImpl.instance;
+      bound1 = bound1.substitute2(variablesFresh, variables1);
+      bound2 = bound2.substitute2(variablesFresh, variables2);
+      pFresh.bound = bound2;
+      if (!relation(bound2, bound1)) {
+        return null;
+      }
+    }
+    return variablesFresh;
+  }
+
+  /**
    * Return `true` if all of the name/type pairs in the first map ([firstTypes])
    * are equal to the corresponding name/type pairs in the second map
    * ([secondTypes]). The maps are expected to iterate over their entries in the
@@ -1313,6 +1248,10 @@
       PropertyAccessorMember.from(element.getSetter(setterName), this);
 
   @override
+  InterfaceTypeImpl instantiate(List<DartType> argumentTypes) =>
+      substitute2(argumentTypes, typeArguments);
+
+  @override
   bool isDirectSupertypeOf(InterfaceType type) {
     InterfaceType i = this;
     InterfaceType j = type;
@@ -1677,8 +1616,9 @@
       // base types.
       assert(this.prunedTypedefs == null);
       InterfaceTypeImpl result = new InterfaceTypeImpl._(element, name, prune);
-      result.typeArguments =
-          typeArguments.map((TypeImpl t) => t.pruned(prune)).toList();
+      result.typeArguments = typeArguments
+          .map((DartType t) => (t as TypeImpl).pruned(prune))
+          .toList();
       return result;
     }
   }
@@ -1732,9 +1672,10 @@
     return newType;
   }
 
+  @deprecated
   @override
   InterfaceTypeImpl substitute4(List<DartType> argumentTypes) =>
-      substitute2(argumentTypes, typeArguments);
+      instantiate(argumentTypes);
 
   /**
    * Starting from this type, search its class hierarchy for types of the form
@@ -1827,6 +1768,62 @@
       _computeSuperinterfaceSet(type, new HashSet<InterfaceType>());
 
   /**
+   * If there is a single type which is at least as specific as all of the
+   * types in [types], return it.  Otherwise return `null`.
+   */
+  static DartType findMostSpecificType(
+      List<DartType> types, TypeSystem typeSystem) {
+    // The << relation ("more specific than") is a partial ordering on types,
+    // so to find the most specific type of a set, we keep a bucket of the most
+    // specific types seen so far such that no type in the bucket is more
+    // specific than any other type in the bucket.
+    List<DartType> bucket = <DartType>[];
+
+    // Then we consider each type in turn.
+    for (DartType type in types) {
+      // If any existing type in the bucket is more specific than this type,
+      // then we can ignore this type.
+      if (bucket.any((DartType t) => typeSystem.isMoreSpecificThan(t, type))) {
+        continue;
+      }
+      // Otherwise, we need to add this type to the bucket and remove any types
+      // that are less specific than it.
+      bool added = false;
+      int i = 0;
+      while (i < bucket.length) {
+        if (typeSystem.isMoreSpecificThan(type, bucket[i])) {
+          if (added) {
+            if (i < bucket.length - 1) {
+              bucket[i] = bucket.removeLast();
+            } else {
+              bucket.removeLast();
+            }
+          } else {
+            bucket[i] = type;
+            i++;
+            added = true;
+          }
+        } else {
+          i++;
+        }
+      }
+      if (!added) {
+        bucket.add(type);
+      }
+    }
+
+    // Now that we are finished, if there is exactly one type left in the
+    // bucket, it is the most specific type.
+    if (bucket.length == 1) {
+      return bucket[0];
+    }
+
+    // Otherwise, there is no single type that is more specific than the
+    // others.
+    return null;
+  }
+
+  /**
    * 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
@@ -1920,62 +1917,6 @@
   }
 
   /**
-   * If there is a single type which is at least as specific as all of the
-   * types in [types], return it.  Otherwise return `null`.
-   */
-  static DartType findMostSpecificType(
-      List<DartType> types, TypeSystem typeSystem) {
-    // The << relation ("more specific than") is a partial ordering on types,
-    // so to find the most specific type of a set, we keep a bucket of the most
-    // specific types seen so far such that no type in the bucket is more
-    // specific than any other type in the bucket.
-    List<DartType> bucket = <DartType>[];
-
-    // Then we consider each type in turn.
-    for (DartType type in types) {
-      // If any existing type in the bucket is more specific than this type,
-      // then we can ignore this type.
-      if (bucket.any((DartType t) => typeSystem.isMoreSpecificThan(t, type))) {
-        continue;
-      }
-      // Otherwise, we need to add this type to the bucket and remove any types
-      // that are less specific than it.
-      bool added = false;
-      int i = 0;
-      while (i < bucket.length) {
-        if (typeSystem.isMoreSpecificThan(type, bucket[i])) {
-          if (added) {
-            if (i < bucket.length - 1) {
-              bucket[i] = bucket.removeLast();
-            } else {
-              bucket.removeLast();
-            }
-          } else {
-            bucket[i] = type;
-            i++;
-            added = true;
-          }
-        } else {
-          i++;
-        }
-      }
-      if (!added) {
-        bucket.add(type);
-      }
-    }
-
-    // Now that we are finished, if there is exactly one type left in the
-    // bucket, it is the most specific type.
-    if (bucket.length == 1) {
-      return bucket[0];
-    }
-
-    // Otherwise, there is no single type that is more specific than the
-    // others.
-    return null;
-  }
-
-  /**
    * Return the intersection of the [first] and [second] sets of types, where
    * intersection is based on the equality of the types themselves.
    */
@@ -2217,6 +2158,9 @@
    */
   TypeImpl pruned(List<FunctionTypeAliasElement> prune);
 
+  @override
+  DartType resolveToBound(DartType objectType) => this;
+
   /**
    * Return the type resulting from substituting the given [argumentTypes] for
    * the given [parameterTypes] in this type.
@@ -2232,9 +2176,6 @@
       [List<FunctionTypeAliasElement> prune]);
 
   @override
-  DartType resolveToBound(DartType objectType) => this;
-
-  @override
   String toString() {
     StringBuffer buffer = new StringBuffer();
     appendTo(buffer);
@@ -2372,6 +2313,15 @@
   TypeImpl pruned(List<FunctionTypeAliasElement> prune) => this;
 
   @override
+  DartType resolveToBound(DartType objectType) {
+    if (element.bound == null) {
+      return objectType;
+    }
+
+    return element.bound.resolveToBound(objectType);
+  }
+
+  @override
   DartType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes,
       [List<FunctionTypeAliasElement> prune]) {
@@ -2400,15 +2350,6 @@
     }
     return types;
   }
-
-  @override
-  DartType resolveToBound(DartType objectType) {
-    if (element.bound == null) {
-      return objectType;
-    }
-
-    return element.bound.resolveToBound(objectType);
-  }
 }
 
 /**
diff --git a/pkg/analyzer/lib/src/error.dart b/pkg/analyzer/lib/src/error.dart
index 166ba13..f39d1ae 100644
--- a/pkg/analyzer/lib/src/error.dart
+++ b/pkg/analyzer/lib/src/error.dart
@@ -26,7 +26,9 @@
 
     // Print a less friendly string representation to ensure that
     // error.source.contents is not executed, as .contents it isn't async
-    builder.write("Error in ${error.source.shortName}: ${error.message}");
+    String sourceName = error.source.shortName;
+    sourceName ??= '<unknown source>';
+    builder.write("Error in $sourceName: ${error.message}");
 
 //    var content = error.source.contents.data;
 //    var beforeError = content.substring(0, error.offset);
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 18c14d8..3b0eba2 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -12,6 +12,7 @@
  * contact the analyzer team to either find an alternate API or have the API you
  * depend on added to the public API.
  */
+@deprecated
 library analyzer.src.generated.ast;
 
 export 'package:analyzer/dart/ast/ast.dart';
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index 8d4de8e..16113c5 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -4,1069 +4,24 @@
 
 library analyzer.src.generated.constant;
 
-import 'dart:collection';
-
+import 'package:analyzer/context/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/element/element.dart';
-import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/member.dart';
-import 'package:analyzer/src/generated/element_handle.dart'
-    show ConstructorElementHandle;
+import 'package:analyzer/src/dart/constant/evaluation.dart';
+import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisEngine, RecordingErrorListener;
 import 'package:analyzer/src/generated/error.dart';
-import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 import 'package:analyzer/src/generated/source.dart' show Source;
 import 'package:analyzer/src/generated/type_system.dart'
     show TypeSystem, TypeSystemImpl;
-import 'package:analyzer/src/generated/utilities_collection.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart' show ParameterKind;
-import 'package:analyzer/src/generated/utilities_general.dart';
-import 'package:analyzer/src/task/dart.dart';
 
-ConstructorElementImpl _getConstructorImpl(ConstructorElement constructor) {
-  while (constructor is ConstructorMember) {
-    constructor = (constructor as ConstructorMember).baseElement;
-  }
-  if (constructor is ConstructorElementHandle) {
-    constructor = (constructor as ConstructorElementHandle).actualElement;
-  }
-  return constructor;
-}
-
-/**
- * Callback used by [ReferenceFinder] to report that a dependency was found.
- */
-typedef void ReferenceFinderCallback(ConstantEvaluationTarget dependency);
-
-/**
- * The state of an object representing a boolean value.
- */
-class BoolState extends InstanceState {
-  /**
-   * An instance representing the boolean value 'false'.
-   */
-  static BoolState FALSE_STATE = new BoolState(false);
-
-  /**
-   * An instance representing the boolean value 'true'.
-   */
-  static BoolState TRUE_STATE = new BoolState(true);
-
-  /**
-   * A state that can be used to represent a boolean whose value is not known.
-   */
-  static BoolState UNKNOWN_VALUE = new BoolState(null);
-
-  /**
-   * The value of this instance.
-   */
-  final bool value;
-
-  /**
-   * Initialize a newly created state to represent the given [value].
-   */
-  BoolState(this.value);
-
-  @override
-  int get hashCode => value == null ? 0 : (value ? 2 : 3);
-
-  @override
-  bool get isBool => true;
-
-  @override
-  bool get isBoolNumStringOrNull => true;
-
-  @override
-  bool get isUnknown => value == null;
-
-  @override
-  String get typeName => "bool";
-
-  @override
-  bool operator ==(Object object) =>
-      object is BoolState && identical(value, object.value);
-
-  @override
-  BoolState convertToBool() => this;
-
-  @override
-  StringState convertToString() {
-    if (value == null) {
-      return StringState.UNKNOWN_VALUE;
-    }
-    return new StringState(value ? "true" : "false");
-  }
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is BoolState) {
-      bool rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return BoolState.from(identical(value, rightValue));
-    } else if (rightOperand is DynamicState) {
-      return UNKNOWN_VALUE;
-    }
-    return FALSE_STATE;
-  }
-
-  @override
-  BoolState logicalAnd(InstanceState rightOperand) {
-    assertBool(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    return value ? rightOperand.convertToBool() : FALSE_STATE;
-  }
-
-  @override
-  BoolState logicalNot() {
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    return value ? FALSE_STATE : TRUE_STATE;
-  }
-
-  @override
-  BoolState logicalOr(InstanceState rightOperand) {
-    assertBool(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    return value ? TRUE_STATE : rightOperand.convertToBool();
-  }
-
-  @override
-  String toString() => value == null ? "-unknown-" : (value ? "true" : "false");
-
-  /**
-   * Return the boolean state representing the given boolean [value].
-   */
-  static BoolState from(bool value) =>
-      value ? BoolState.TRUE_STATE : BoolState.FALSE_STATE;
-}
-
-/**
- * An [AstCloner] that copies the necessary information from the AST to allow
- * constants to be evaluated.
- */
-class ConstantAstCloner extends AstCloner {
-  ConstantAstCloner() : super(true);
-
-  @override
-  ConstructorName visitConstructorName(ConstructorName node) {
-    ConstructorName name = super.visitConstructorName(node);
-    name.staticElement = node.staticElement;
-    return name;
-  }
-
-  @override
-  InstanceCreationExpression visitInstanceCreationExpression(
-      InstanceCreationExpression node) {
-    InstanceCreationExpression expression =
-        super.visitInstanceCreationExpression(node);
-    expression.staticElement = node.staticElement;
-    return expression;
-  }
-
-  @override
-  RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
-      RedirectingConstructorInvocation node) {
-    RedirectingConstructorInvocation invocation =
-        super.visitRedirectingConstructorInvocation(node);
-    invocation.staticElement = node.staticElement;
-    return invocation;
-  }
-
-  @override
-  SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) {
-    SimpleIdentifier identifier = super.visitSimpleIdentifier(node);
-    identifier.staticElement = node.staticElement;
-    return identifier;
-  }
-
-  @override
-  SuperConstructorInvocation visitSuperConstructorInvocation(
-      SuperConstructorInvocation node) {
-    SuperConstructorInvocation invocation =
-        super.visitSuperConstructorInvocation(node);
-    invocation.staticElement = node.staticElement;
-    return invocation;
-  }
-
-  @override
-  TypeName visitTypeName(TypeName node) {
-    TypeName typeName = super.visitTypeName(node);
-    typeName.type = node.type;
-    return typeName;
-  }
-}
-
-/**
- * Helper class encapsulating the methods for evaluating constants and
- * constant instance creation expressions.
- */
-class ConstantEvaluationEngine {
-  /**
-   * Parameter to "fromEnvironment" methods that denotes the default value.
-   */
-  static String _DEFAULT_VALUE_PARAM = "defaultValue";
-
-  /**
-   * Source of RegExp matching any public identifier.
-   * From sdk/lib/internal/symbol.dart.
-   */
-  static String _PUBLIC_IDENTIFIER_RE =
-      "(?!${ConstantValueComputer._RESERVED_WORD_RE}\\b(?!\\\$))[a-zA-Z\$][\\w\$]*";
-
-  /**
-   * RegExp that validates a non-empty non-private symbol.
-   * From sdk/lib/internal/symbol.dart.
-   */
-  static RegExp _PUBLIC_SYMBOL_PATTERN = new RegExp(
-      "^(?:${ConstantValueComputer._OPERATOR_RE}\$|$_PUBLIC_IDENTIFIER_RE(?:=?\$|[.](?!\$)))+?\$");
-
-  /**
-   * The type provider used to access the known types.
-   */
-  final TypeProvider typeProvider;
-
-  /**
-   * The type system.  This is used to guess the types of constants when their
-   * exact value is unknown.
-   */
-  final TypeSystem typeSystem;
-
-  /**
-   * The set of variables declared on the command line using '-D'.
-   */
-  final DeclaredVariables _declaredVariables;
-
-  /**
-   * Validator used to verify correct dependency analysis when running unit
-   * tests.
-   */
-  final ConstantEvaluationValidator validator;
-
-  /**
-   * Initialize a newly created [ConstantEvaluationEngine].  The [typeProvider]
-   * is used to access known types.  [_declaredVariables] is the set of
-   * variables declared on the command line using '-D'.  The [validator], if
-   * given, is used to verify correct dependency analysis when running unit
-   * tests.
-   */
-  ConstantEvaluationEngine(this.typeProvider, this._declaredVariables,
-      {ConstantEvaluationValidator validator, TypeSystem typeSystem})
-      : validator = validator != null
-            ? validator
-            : new ConstantEvaluationValidator_ForProduction(),
-        typeSystem = typeSystem != null ? typeSystem : new TypeSystemImpl();
-
-  /**
-   * Check that the arguments to a call to fromEnvironment() are correct. The
-   * [arguments] are the AST nodes of the arguments. The [argumentValues] are
-   * the values of the unnamed arguments. The [namedArgumentValues] are the
-   * values of the named arguments. The [expectedDefaultValueType] is the
-   * allowed type of the "defaultValue" parameter (if present). Note:
-   * "defaultValue" is always allowed to be null. Return `true` if the arguments
-   * are correct, `false` if there is an error.
-   */
-  bool checkFromEnvironmentArguments(
-      NodeList<Expression> arguments,
-      List<DartObjectImpl> argumentValues,
-      HashMap<String, DartObjectImpl> namedArgumentValues,
-      InterfaceType expectedDefaultValueType) {
-    int argumentCount = arguments.length;
-    if (argumentCount < 1 || argumentCount > 2) {
-      return false;
-    }
-    if (arguments[0] is NamedExpression) {
-      return false;
-    }
-    if (!identical(argumentValues[0].type, typeProvider.stringType)) {
-      return false;
-    }
-    if (argumentCount == 2) {
-      if (arguments[1] is! NamedExpression) {
-        return false;
-      }
-      if (!((arguments[1] as NamedExpression).name.label.name ==
-          _DEFAULT_VALUE_PARAM)) {
-        return false;
-      }
-      ParameterizedType defaultValueType =
-          namedArgumentValues[_DEFAULT_VALUE_PARAM].type;
-      if (!(identical(defaultValueType, expectedDefaultValueType) ||
-          identical(defaultValueType, typeProvider.nullType))) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  /**
-   * Check that the arguments to a call to Symbol() are correct. The [arguments]
-   * are the AST nodes of the arguments. The [argumentValues] are the values of
-   * the unnamed arguments. The [namedArgumentValues] are the values of the
-   * named arguments. Return `true` if the arguments are correct, `false` if
-   * there is an error.
-   */
-  bool checkSymbolArguments(
-      NodeList<Expression> arguments,
-      List<DartObjectImpl> argumentValues,
-      HashMap<String, DartObjectImpl> namedArgumentValues) {
-    if (arguments.length != 1) {
-      return false;
-    }
-    if (arguments[0] is NamedExpression) {
-      return false;
-    }
-    if (!identical(argumentValues[0].type, typeProvider.stringType)) {
-      return false;
-    }
-    String name = argumentValues[0].toStringValue();
-    return isValidPublicSymbol(name);
-  }
-
-  /**
-   * Compute the constant value associated with the given [constant].
-   */
-  void computeConstantValue(ConstantEvaluationTarget constant) {
-    validator.beforeComputeValue(constant);
-    if (constant is ParameterElementImpl) {
-      Expression defaultValue = constant.constantInitializer;
-      if (defaultValue != null) {
-        RecordingErrorListener errorListener = new RecordingErrorListener();
-        ErrorReporter errorReporter =
-            new ErrorReporter(errorListener, constant.source);
-        DartObjectImpl dartObject =
-            defaultValue.accept(new ConstantVisitor(this, errorReporter));
-        constant.evaluationResult =
-            new EvaluationResultImpl(dartObject, errorListener.errors);
-      }
-    } else if (constant is VariableElementImpl) {
-      Expression constantInitializer = constant.constantInitializer;
-      if (constantInitializer != null) {
-        RecordingErrorListener errorListener = new RecordingErrorListener();
-        ErrorReporter errorReporter =
-            new ErrorReporter(errorListener, constant.source);
-        DartObjectImpl dartObject = constantInitializer
-            .accept(new ConstantVisitor(this, errorReporter));
-        // Only check the type for truly const declarations (don't check final
-        // fields with initializers, since their types may be generic.  The type
-        // of the final field will be checked later, when the constructor is
-        // invoked).
-        if (dartObject != null && constant.isConst) {
-          if (!runtimeTypeMatch(dartObject, constant.type)) {
-            errorReporter.reportErrorForElement(
-                CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
-                constant,
-                [dartObject.type, constant.type]);
-          }
-        }
-        constant.evaluationResult =
-            new EvaluationResultImpl(dartObject, errorListener.errors);
-      }
-    } else if (constant is ConstructorElement) {
-      if (constant.isConst) {
-        // No evaluation needs to be done; constructor declarations are only in
-        // the dependency graph to ensure that any constants referred to in
-        // initializer lists and parameter defaults are evaluated before
-        // invocations of the constructor.  However we do need to annotate the
-        // element as being free of constant evaluation cycles so that later
-        // code will know that it is safe to evaluate.
-        (constant as ConstructorElementImpl).isCycleFree = true;
-      }
-    } else if (constant is ElementAnnotationImpl) {
-      Annotation constNode = constant.annotationAst;
-      Element element = constant.element;
-      if (element is PropertyAccessorElement &&
-          element.variable is VariableElementImpl) {
-        // The annotation is a reference to a compile-time constant variable.
-        // Just copy the evaluation result.
-        VariableElementImpl variableElement =
-            element.variable as VariableElementImpl;
-        if (variableElement.evaluationResult != null) {
-          constant.evaluationResult = variableElement.evaluationResult;
-        } else {
-          // This could happen in the event that the annotation refers to a
-          // non-constant.  The error is detected elsewhere, so just silently
-          // ignore it here.
-          constant.evaluationResult = new EvaluationResultImpl(null);
-        }
-      } else if (element is ConstructorElementImpl &&
-          element.isConst &&
-          constNode.arguments != null) {
-        RecordingErrorListener errorListener = new RecordingErrorListener();
-        ErrorReporter errorReporter =
-            new ErrorReporter(errorListener, constant.source);
-        ConstantVisitor constantVisitor =
-            new ConstantVisitor(this, errorReporter);
-        DartObjectImpl result = evaluateConstructorCall(
-            constNode,
-            constNode.arguments.arguments,
-            element,
-            constantVisitor,
-            errorReporter);
-        constant.evaluationResult =
-            new EvaluationResultImpl(result, errorListener.errors);
-      } else {
-        // This may happen for invalid code (e.g. failing to pass arguments
-        // to an annotation which references a const constructor).  The error
-        // is detected elsewhere, so just silently ignore it here.
-        constant.evaluationResult = new EvaluationResultImpl(null);
-      }
-    } else if (constant is VariableElement) {
-      // constant is a VariableElement but not a VariableElementImpl.  This can
-      // happen sometimes in the case of invalid user code (for example, a
-      // constant expression that refers to a non-static field inside a generic
-      // class will wind up referring to a FieldMember).  The error is detected
-      // elsewhere, so just silently ignore it here.
-    } else {
-      // Should not happen.
-      assert(false);
-      AnalysisEngine.instance.logger.logError(
-          "Constant value computer trying to compute the value of a node of type ${constant.runtimeType}");
-      return;
-    }
-  }
-
-  /**
-   * Determine which constant elements need to have their values computed
-   * prior to computing the value of [constant], and report them using
-   * [callback].
-   */
-  void computeDependencies(
-      ConstantEvaluationTarget constant, ReferenceFinderCallback callback) {
-    ReferenceFinder referenceFinder = new ReferenceFinder(callback);
-    if (constant is ConstructorElement) {
-      constant = _getConstructorImpl(constant);
-    }
-    if (constant is VariableElementImpl) {
-      Expression initializer = constant.constantInitializer;
-      if (initializer != null) {
-        initializer.accept(referenceFinder);
-      }
-    } else if (constant is ConstructorElementImpl) {
-      if (constant.isConst) {
-        constant.isCycleFree = false;
-        ConstructorElement redirectedConstructor =
-            getConstRedirectedConstructor(constant);
-        if (redirectedConstructor != null) {
-          ConstructorElement redirectedConstructorBase =
-              _getConstructorImpl(redirectedConstructor);
-          callback(redirectedConstructorBase);
-          return;
-        } else if (constant.isFactory) {
-          // Factory constructor, but getConstRedirectedConstructor returned
-          // null.  This can happen if we're visiting one of the special external
-          // const factory constructors in the SDK, or if the code contains
-          // errors (such as delegating to a non-const constructor, or delegating
-          // to a constructor that can't be resolved).  In any of these cases,
-          // we'll evaluate calls to this constructor without having to refer to
-          // any other constants.  So we don't need to report any dependencies.
-          return;
-        }
-        bool superInvocationFound = false;
-        List<ConstructorInitializer> initializers =
-            constant.constantInitializers;
-        for (ConstructorInitializer initializer in initializers) {
-          if (initializer is SuperConstructorInvocation) {
-            superInvocationFound = true;
-          }
-          initializer.accept(referenceFinder);
-        }
-        if (!superInvocationFound) {
-          // No explicit superconstructor invocation found, so we need to
-          // manually insert a reference to the implicit superconstructor.
-          InterfaceType superclass =
-              (constant.returnType as InterfaceType).superclass;
-          if (superclass != null && !superclass.isObject) {
-            ConstructorElement unnamedConstructor =
-                _getConstructorImpl(superclass.element.unnamedConstructor);
-            if (unnamedConstructor != null) {
-              callback(unnamedConstructor);
-            }
-          }
-        }
-        for (FieldElement field in constant.enclosingElement.fields) {
-          // Note: non-static const isn't allowed but we handle it anyway so
-          // that we won't be confused by incorrect code.
-          if ((field.isFinal || field.isConst) &&
-              !field.isStatic &&
-              field.initializer != null) {
-            callback(field);
-          }
-        }
-        for (ParameterElement parameterElement in constant.parameters) {
-          callback(parameterElement);
-        }
-      }
-    } else if (constant is ElementAnnotationImpl) {
-      Annotation constNode = constant.annotationAst;
-      Element element = constant.element;
-      if (element is PropertyAccessorElement &&
-          element.variable is VariableElementImpl) {
-        // The annotation is a reference to a compile-time constant variable,
-        // so it depends on the variable.
-        callback(element.variable);
-      } else if (element is ConstructorElementImpl) {
-        // The annotation is a constructor invocation, so it depends on the
-        // constructor.
-        callback(element);
-      } else {
-        // This could happen in the event of invalid code.  The error will be
-        // reported at constant evaluation time.
-      }
-      if (constNode.arguments != null) {
-        constNode.arguments.accept(referenceFinder);
-      }
-    } else if (constant is VariableElement) {
-      // constant is a VariableElement but not a VariableElementImpl.  This can
-      // happen sometimes in the case of invalid user code (for example, a
-      // constant expression that refers to a non-static field inside a generic
-      // class will wind up referring to a FieldMember).  So just don't bother
-      // computing any dependencies.
-    } else {
-      // Should not happen.
-      assert(false);
-      AnalysisEngine.instance.logger.logError(
-          "Constant value computer trying to compute the value of a node of type ${constant.runtimeType}");
-    }
-  }
-
-  /**
-   * Evaluate a call to fromEnvironment() on the bool, int, or String class. The
-   * [environmentValue] is the value fetched from the environment. The
-   * [builtInDefaultValue] is the value that should be used as the default if no
-   * "defaultValue" argument appears in [namedArgumentValues]. The
-   * [namedArgumentValues] are the values of the named parameters passed to
-   * fromEnvironment(). Return a [DartObjectImpl] object corresponding to the
-   * evaluated result.
-   */
-  DartObjectImpl computeValueFromEnvironment(
-      DartObject environmentValue,
-      DartObjectImpl builtInDefaultValue,
-      HashMap<String, DartObjectImpl> namedArgumentValues) {
-    DartObjectImpl value = environmentValue as DartObjectImpl;
-    if (value.isUnknown || value.isNull) {
-      // The name either doesn't exist in the environment or we couldn't parse
-      // the corresponding value.
-      // If the code supplied an explicit default, use it.
-      if (namedArgumentValues.containsKey(_DEFAULT_VALUE_PARAM)) {
-        value = namedArgumentValues[_DEFAULT_VALUE_PARAM];
-      } else if (value.isNull) {
-        // The code didn't supply an explicit default.
-        // The name exists in the environment but we couldn't parse the
-        // corresponding value.
-        // So use the built-in default value, because this is what the VM does.
-        value = builtInDefaultValue;
-      } else {
-        // The code didn't supply an explicit default.
-        // The name doesn't exist in the environment.
-        // The VM would use the built-in default value, but we don't want to do
-        // that for analysis because it's likely to lead to cascading errors.
-        // So just leave [value] in the unknown state.
-      }
-    }
-    return value;
-  }
-
-  DartObjectImpl evaluateConstructorCall(
-      AstNode node,
-      NodeList<Expression> arguments,
-      ConstructorElement constructor,
-      ConstantVisitor constantVisitor,
-      ErrorReporter errorReporter) {
-    if (!_getConstructorImpl(constructor).isCycleFree) {
-      // It's not safe to evaluate this constructor, so bail out.
-      // TODO(paulberry): ensure that a reasonable error message is produced
-      // in this case, as well as other cases involving constant expression
-      // circularities (e.g. "compile-time constant expression depends on
-      // itself")
-      return new DartObjectImpl.validWithUnknownValue(constructor.returnType);
-    }
-    int argumentCount = arguments.length;
-    List<DartObjectImpl> argumentValues =
-        new List<DartObjectImpl>(argumentCount);
-    List<Expression> argumentNodes = new List<Expression>(argumentCount);
-    HashMap<String, DartObjectImpl> namedArgumentValues =
-        new HashMap<String, DartObjectImpl>();
-    HashMap<String, NamedExpression> namedArgumentNodes =
-        new HashMap<String, NamedExpression>();
-    for (int i = 0; i < argumentCount; i++) {
-      Expression argument = arguments[i];
-      if (argument is NamedExpression) {
-        String name = argument.name.label.name;
-        namedArgumentValues[name] =
-            constantVisitor._valueOf(argument.expression);
-        namedArgumentNodes[name] = argument;
-        argumentValues[i] = typeProvider.nullObject;
-      } else {
-        argumentValues[i] = constantVisitor._valueOf(argument);
-        argumentNodes[i] = argument;
-      }
-    }
-    constructor = followConstantRedirectionChain(constructor);
-    InterfaceType definingClass = constructor.returnType as InterfaceType;
-    if (constructor.isFactory) {
-      // We couldn't find a non-factory constructor.
-      // See if it's because we reached an external const factory constructor
-      // that we can emulate.
-      if (constructor.name == "fromEnvironment") {
-        if (!checkFromEnvironmentArguments(
-            arguments, argumentValues, namedArgumentValues, definingClass)) {
-          errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-          return null;
-        }
-        String variableName =
-            argumentCount < 1 ? null : argumentValues[0].toStringValue();
-        if (identical(definingClass, typeProvider.boolType)) {
-          DartObject valueFromEnvironment;
-          valueFromEnvironment =
-              _declaredVariables.getBool(typeProvider, variableName);
-          return computeValueFromEnvironment(
-              valueFromEnvironment,
-              new DartObjectImpl(typeProvider.boolType, BoolState.FALSE_STATE),
-              namedArgumentValues);
-        } else if (identical(definingClass, typeProvider.intType)) {
-          DartObject valueFromEnvironment;
-          valueFromEnvironment =
-              _declaredVariables.getInt(typeProvider, variableName);
-          return computeValueFromEnvironment(
-              valueFromEnvironment,
-              new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE),
-              namedArgumentValues);
-        } else if (identical(definingClass, typeProvider.stringType)) {
-          DartObject valueFromEnvironment;
-          valueFromEnvironment =
-              _declaredVariables.getString(typeProvider, variableName);
-          return computeValueFromEnvironment(
-              valueFromEnvironment,
-              new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE),
-              namedArgumentValues);
-        }
-      } else if (constructor.name == "" &&
-          identical(definingClass, typeProvider.symbolType) &&
-          argumentCount == 1) {
-        if (!checkSymbolArguments(
-            arguments, argumentValues, namedArgumentValues)) {
-          errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-          return null;
-        }
-        String argumentValue = argumentValues[0].toStringValue();
-        return new DartObjectImpl(
-            definingClass, new SymbolState(argumentValue));
-      }
-      // Either it's an external const factory constructor that we can't
-      // emulate, or an error occurred (a cycle, or a const constructor trying
-      // to delegate to a non-const constructor).
-      // In the former case, the best we can do is consider it an unknown value.
-      // In the latter case, the error has already been reported, so considering
-      // it an unknown value will suppress further errors.
-      return new DartObjectImpl.validWithUnknownValue(definingClass);
-    }
-    ConstructorElementImpl constructorBase = _getConstructorImpl(constructor);
-    validator.beforeGetConstantInitializers(constructorBase);
-    List<ConstructorInitializer> initializers =
-        constructorBase.constantInitializers;
-    if (initializers == null) {
-      // This can happen in some cases where there are compile errors in the
-      // code being analyzed (for example if the code is trying to create a
-      // const instance using a non-const constructor, or the node we're
-      // visiting is involved in a cycle).  The error has already been reported,
-      // so consider it an unknown value to suppress further errors.
-      return new DartObjectImpl.validWithUnknownValue(definingClass);
-    }
-    HashMap<String, DartObjectImpl> fieldMap =
-        new HashMap<String, DartObjectImpl>();
-    // Start with final fields that are initialized at their declaration site.
-    for (FieldElement field in constructor.enclosingElement.fields) {
-      if ((field.isFinal || field.isConst) &&
-          !field.isStatic &&
-          field is ConstFieldElementImpl) {
-        validator.beforeGetFieldEvaluationResult(field);
-        EvaluationResultImpl evaluationResult = field.evaluationResult;
-        // It is possible that the evaluation result is null.
-        // This happens for example when we have duplicate fields.
-        // class Test {final x = 1; final x = 2; const Test();}
-        if (evaluationResult == null) {
-          continue;
-        }
-        // Match the value and the type.
-        DartType fieldType =
-            FieldMember.from(field, constructor.returnType).type;
-        DartObjectImpl fieldValue = evaluationResult.value;
-        if (fieldValue != null && !runtimeTypeMatch(fieldValue, fieldType)) {
-          errorReporter.reportErrorForNode(
-              CheckedModeCompileTimeErrorCode
-                  .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-              node,
-              [fieldValue.type, field.name, fieldType]);
-        }
-        fieldMap[field.name] = fieldValue;
-      }
-    }
-    // Now evaluate the constructor declaration.
-    HashMap<String, DartObjectImpl> parameterMap =
-        new HashMap<String, DartObjectImpl>();
-    List<ParameterElement> parameters = constructor.parameters;
-    int parameterCount = parameters.length;
-    for (int i = 0; i < parameterCount; i++) {
-      ParameterElement parameter = parameters[i];
-      ParameterElement baseParameter = parameter;
-      while (baseParameter is ParameterMember) {
-        baseParameter = (baseParameter as ParameterMember).baseElement;
-      }
-      DartObjectImpl argumentValue = null;
-      AstNode errorTarget = null;
-      if (baseParameter.parameterKind == ParameterKind.NAMED) {
-        argumentValue = namedArgumentValues[baseParameter.name];
-        errorTarget = namedArgumentNodes[baseParameter.name];
-      } else if (i < argumentCount) {
-        argumentValue = argumentValues[i];
-        errorTarget = argumentNodes[i];
-      }
-      if (errorTarget == null) {
-        // No argument node that we can direct error messages to, because we
-        // are handling an optional parameter that wasn't specified.  So just
-        // direct error messages to the constructor call.
-        errorTarget = node;
-      }
-      if (argumentValue == null && baseParameter is ParameterElementImpl) {
-        // The parameter is an optional positional parameter for which no value
-        // was provided, so use the default value.
-        validator.beforeGetParameterDefault(baseParameter);
-        EvaluationResultImpl evaluationResult = baseParameter.evaluationResult;
-        if (evaluationResult == null) {
-          // No default was provided, so the default value is null.
-          argumentValue = typeProvider.nullObject;
-        } else if (evaluationResult.value != null) {
-          argumentValue = evaluationResult.value;
-        }
-      }
-      if (argumentValue != null) {
-        if (!runtimeTypeMatch(argumentValue, parameter.type)) {
-          errorReporter.reportErrorForNode(
-              CheckedModeCompileTimeErrorCode
-                  .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-              errorTarget,
-              [argumentValue.type, parameter.type]);
-        }
-        if (baseParameter.isInitializingFormal) {
-          FieldElement field = (parameter as FieldFormalParameterElement).field;
-          if (field != null) {
-            DartType fieldType = field.type;
-            if (fieldType != parameter.type) {
-              // We've already checked that the argument can be assigned to the
-              // parameter; we also need to check that it can be assigned to
-              // the field.
-              if (!runtimeTypeMatch(argumentValue, fieldType)) {
-                errorReporter.reportErrorForNode(
-                    CheckedModeCompileTimeErrorCode
-                        .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-                    errorTarget,
-                    [argumentValue.type, fieldType]);
-              }
-            }
-            String fieldName = field.name;
-            if (fieldMap.containsKey(fieldName)) {
-              errorReporter.reportErrorForNode(
-                  CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-            }
-            fieldMap[fieldName] = argumentValue;
-          }
-        } else {
-          String name = baseParameter.name;
-          parameterMap[name] = argumentValue;
-        }
-      }
-    }
-    ConstantVisitor initializerVisitor = new ConstantVisitor(
-        this, errorReporter,
-        lexicalEnvironment: parameterMap);
-    String superName = null;
-    NodeList<Expression> superArguments = null;
-    for (ConstructorInitializer initializer in initializers) {
-      if (initializer is ConstructorFieldInitializer) {
-        ConstructorFieldInitializer constructorFieldInitializer = initializer;
-        Expression initializerExpression =
-            constructorFieldInitializer.expression;
-        DartObjectImpl evaluationResult =
-            initializerExpression.accept(initializerVisitor);
-        if (evaluationResult != null) {
-          String fieldName = constructorFieldInitializer.fieldName.name;
-          if (fieldMap.containsKey(fieldName)) {
-            errorReporter.reportErrorForNode(
-                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-          }
-          fieldMap[fieldName] = evaluationResult;
-          PropertyAccessorElement getter = definingClass.getGetter(fieldName);
-          if (getter != null) {
-            PropertyInducingElement field = getter.variable;
-            if (!runtimeTypeMatch(evaluationResult, field.type)) {
-              errorReporter.reportErrorForNode(
-                  CheckedModeCompileTimeErrorCode
-                      .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-                  node,
-                  [evaluationResult.type, fieldName, field.type]);
-            }
-          }
-        }
-      } else if (initializer is SuperConstructorInvocation) {
-        SuperConstructorInvocation superConstructorInvocation = initializer;
-        SimpleIdentifier name = superConstructorInvocation.constructorName;
-        if (name != null) {
-          superName = name.name;
-        }
-        superArguments = superConstructorInvocation.argumentList.arguments;
-      } else if (initializer is RedirectingConstructorInvocation) {
-        // This is a redirecting constructor, so just evaluate the constructor
-        // it redirects to.
-        ConstructorElement constructor = initializer.staticElement;
-        if (constructor != null && constructor.isConst) {
-          return evaluateConstructorCall(
-              node,
-              initializer.argumentList.arguments,
-              constructor,
-              initializerVisitor,
-              errorReporter);
-        }
-      }
-    }
-    // Evaluate explicit or implicit call to super().
-    InterfaceType superclass = definingClass.superclass;
-    if (superclass != null && !superclass.isObject) {
-      ConstructorElement superConstructor =
-          superclass.lookUpConstructor(superName, constructor.library);
-      if (superConstructor != null) {
-        if (superArguments == null) {
-          superArguments = new NodeList<Expression>(null);
-        }
-        evaluateSuperConstructorCall(node, fieldMap, superConstructor,
-            superArguments, initializerVisitor, errorReporter);
-      }
-    }
-    return new DartObjectImpl(definingClass, new GenericState(fieldMap));
-  }
-
-  void evaluateSuperConstructorCall(
-      AstNode node,
-      HashMap<String, DartObjectImpl> fieldMap,
-      ConstructorElement superConstructor,
-      NodeList<Expression> superArguments,
-      ConstantVisitor initializerVisitor,
-      ErrorReporter errorReporter) {
-    if (superConstructor != null && superConstructor.isConst) {
-      DartObjectImpl evaluationResult = evaluateConstructorCall(node,
-          superArguments, superConstructor, initializerVisitor, errorReporter);
-      if (evaluationResult != null) {
-        fieldMap[GenericState.SUPERCLASS_FIELD] = evaluationResult;
-      }
-    }
-  }
-
-  /**
-   * Attempt to follow the chain of factory redirections until a constructor is
-   * reached which is not a const factory constructor. Return the constant
-   * constructor which terminates the chain of factory redirections, if the
-   * chain terminates. If there is a problem (e.g. a redirection can't be found,
-   * or a cycle is encountered), the chain will be followed as far as possible
-   * and then a const factory constructor will be returned.
-   */
-  ConstructorElement followConstantRedirectionChain(
-      ConstructorElement constructor) {
-    HashSet<ConstructorElement> constructorsVisited =
-        new HashSet<ConstructorElement>();
-    while (true) {
-      ConstructorElement redirectedConstructor =
-          getConstRedirectedConstructor(constructor);
-      if (redirectedConstructor == null) {
-        break;
-      } else {
-        ConstructorElement constructorBase = _getConstructorImpl(constructor);
-        constructorsVisited.add(constructorBase);
-        ConstructorElement redirectedConstructorBase =
-            _getConstructorImpl(redirectedConstructor);
-        if (constructorsVisited.contains(redirectedConstructorBase)) {
-          // Cycle in redirecting factory constructors--this is not allowed
-          // and is checked elsewhere--see
-          // [ErrorVerifier.checkForRecursiveFactoryRedirect()]).
-          break;
-        }
-      }
-      constructor = redirectedConstructor;
-    }
-    return constructor;
-  }
-
-  /**
-   * Generate an error indicating that the given [constant] is not a valid
-   * compile-time constant because it references at least one of the constants
-   * in the given [cycle], each of which directly or indirectly references the
-   * constant.
-   */
-  void generateCycleError(Iterable<ConstantEvaluationTarget> cycle,
-      ConstantEvaluationTarget constant) {
-    if (constant is VariableElement) {
-      RecordingErrorListener errorListener = new RecordingErrorListener();
-      ErrorReporter errorReporter =
-          new ErrorReporter(errorListener, constant.source);
-      // TODO(paulberry): It would be really nice if we could extract enough
-      // information from the 'cycle' argument to provide the user with a
-      // description of the cycle.
-      errorReporter.reportErrorForElement(
-          CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, constant, []);
-      (constant as VariableElementImpl).evaluationResult =
-          new EvaluationResultImpl(null, errorListener.errors);
-    } else if (constant is ConstructorElement) {
-      // We don't report cycle errors on constructor declarations since there
-      // is nowhere to put the error information.
-    } else {
-      // Should not happen.  Formal parameter defaults and annotations should
-      // never appear as part of a cycle because they can't be referred to.
-      assert(false);
-      AnalysisEngine.instance.logger.logError(
-          "Constant value computer trying to report a cycle error for a node of type ${constant.runtimeType}");
-    }
-  }
-
-  /**
-   * If [constructor] redirects to another const constructor, return the
-   * const constructor it redirects to.  Otherwise return `null`.
-   */
-  ConstructorElement getConstRedirectedConstructor(
-      ConstructorElement constructor) {
-    if (!constructor.isFactory) {
-      return null;
-    }
-    if (identical(constructor.enclosingElement.type, typeProvider.symbolType)) {
-      // The dart:core.Symbol has a const factory constructor that redirects
-      // to dart:_internal.Symbol.  That in turn redirects to an external
-      // const constructor, which we won't be able to evaluate.
-      // So stop following the chain of redirections at dart:core.Symbol, and
-      // let [evaluateInstanceCreationExpression] handle it specially.
-      return null;
-    }
-    ConstructorElement redirectedConstructor =
-        constructor.redirectedConstructor;
-    if (redirectedConstructor == null) {
-      // This can happen if constructor is an external factory constructor.
-      return null;
-    }
-    if (!redirectedConstructor.isConst) {
-      // Delegating to a non-const constructor--this is not allowed (and
-      // is checked elsewhere--see
-      // [ErrorVerifier.checkForRedirectToNonConstConstructor()]).
-      return null;
-    }
-    return redirectedConstructor;
-  }
-
-  /**
-   * Check if the object [obj] matches the type [type] according to runtime type
-   * checking rules.
-   */
-  bool runtimeTypeMatch(DartObjectImpl obj, DartType type) {
-    if (obj.isNull) {
-      return true;
-    }
-    if (type.isUndefined) {
-      return false;
-    }
-    return obj.type.isSubtypeOf(type);
-  }
-
-  /**
-   * Determine whether the given string is a valid name for a public symbol
-   * (i.e. whether it is allowed for a call to the Symbol constructor).
-   */
-  static bool isValidPublicSymbol(String name) =>
-      name.isEmpty ||
-      name == "void" ||
-      new JavaPatternMatcher(_PUBLIC_SYMBOL_PATTERN, name).matches();
-}
-
-/**
- * Interface used by unit tests to verify correct dependency analysis during
- * constant evaluation.
- */
-abstract class ConstantEvaluationValidator {
-  /**
-   * This method is called just before computing the constant value associated
-   * with [constant]. Unit tests will override this method to introduce
-   * additional error checking.
-   */
-  void beforeComputeValue(ConstantEvaluationTarget constant);
-
-  /**
-   * This method is called just before getting the constant initializers
-   * associated with the [constructor]. Unit tests will override this method to
-   * introduce additional error checking.
-   */
-  void beforeGetConstantInitializers(ConstructorElement constructor);
-
-  /**
-   * This method is called just before retrieving an evaluation result from an
-   * element. Unit tests will override it to introduce additional error
-   * checking.
-   */
-  void beforeGetEvaluationResult(ConstantEvaluationTarget constant);
-
-  /**
-   * This method is called just before getting the constant value of a field
-   * with an initializer.  Unit tests will override this method to introduce
-   * additional error checking.
-   */
-  void beforeGetFieldEvaluationResult(FieldElementImpl field);
-
-  /**
-   * This method is called just before getting a parameter's default value. Unit
-   * tests will override this method to introduce additional error checking.
-   */
-  void beforeGetParameterDefault(ParameterElement parameter);
-}
-
-/**
- * Implementation of [ConstantEvaluationValidator] used in production; does no
- * validation.
- */
-class ConstantEvaluationValidator_ForProduction
-    implements ConstantEvaluationValidator {
-  @override
-  void beforeComputeValue(ConstantEvaluationTarget constant) {}
-
-  @override
-  void beforeGetConstantInitializers(ConstructorElement constructor) {}
-
-  @override
-  void beforeGetEvaluationResult(ConstantEvaluationTarget constant) {}
-
-  @override
-  void beforeGetFieldEvaluationResult(FieldElementImpl field) {}
-
-  @override
-  void beforeGetParameterDefault(ParameterElement parameter) {}
-}
+export 'package:analyzer/context/declared_variables.dart';
+export 'package:analyzer/dart/constant/value.dart';
+export 'package:analyzer/src/dart/constant/evaluation.dart';
+export 'package:analyzer/src/dart/constant/utilities.dart';
+export 'package:analyzer/src/dart/constant/value.dart';
 
 /// Instances of the class [ConstantEvaluator] evaluate constant expressions to
 /// produce their compile-time value.
@@ -1143,6 +98,7 @@
 /// In addition, this class defines several values that can be returned to
 /// indicate various conditions encountered during evaluation. These are
 /// documented with the static fields that define those values.
+@deprecated
 class ConstantEvaluator {
   /**
    * The source containing the expression(s) that will be evaluated.
@@ -1180,4243 +136,3 @@
     return EvaluationResult.forErrors(errorListener.errors);
   }
 }
-
-/**
- * A visitor used to traverse the AST structures of all of the compilation units
- * being resolved and build the full set of dependencies for all constant
- * expressions.
- */
-class ConstantExpressionsDependenciesFinder extends RecursiveAstVisitor {
-  /**
-   * The constants whose values need to be computed.
-   */
-  HashSet<ConstantEvaluationTarget> dependencies =
-      new HashSet<ConstantEvaluationTarget>();
-
-  @override
-  void visitInstanceCreationExpression(InstanceCreationExpression node) {
-    if (node.isConst) {
-      _find(node);
-    } else {
-      super.visitInstanceCreationExpression(node);
-    }
-  }
-
-  @override
-  void visitListLiteral(ListLiteral node) {
-    if (node.constKeyword != null) {
-      _find(node);
-    } else {
-      super.visitListLiteral(node);
-    }
-  }
-
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    if (node.constKeyword != null) {
-      _find(node);
-    } else {
-      super.visitMapLiteral(node);
-    }
-  }
-
-  @override
-  void visitSwitchCase(SwitchCase node) {
-    _find(node.expression);
-    node.statements.accept(this);
-  }
-
-  void _find(Expression node) {
-    if (node != null) {
-      ReferenceFinder referenceFinder = new ReferenceFinder(dependencies.add);
-      node.accept(referenceFinder);
-    }
-  }
-}
-
-/**
- * A visitor used to traverse the AST structures of all of the compilation units
- * being resolved and build tables of the constant variables, constant
- * constructors, constant constructor invocations, and annotations found in
- * those compilation units.
- */
-class ConstantFinder extends RecursiveAstVisitor<Object> {
-  final AnalysisContext context;
-  final Source source;
-  final Source librarySource;
-
-  /**
-   * The elements and AST nodes whose constant values need to be computed.
-   */
-  List<ConstantEvaluationTarget> constantsToCompute =
-      <ConstantEvaluationTarget>[];
-
-  /**
-   * True if instance variables marked as "final" should be treated as "const".
-   */
-  bool treatFinalInstanceVarAsConst = false;
-
-  ConstantFinder(this.context, this.source, this.librarySource);
-
-  @override
-  Object visitAnnotation(Annotation node) {
-    super.visitAnnotation(node);
-    ElementAnnotation elementAnnotation = node.elementAnnotation;
-    if (elementAnnotation == null) {
-      // Analyzer ignores annotations on "part of" directives.
-      assert(node.parent is PartOfDirective);
-    } else {
-      constantsToCompute.add(elementAnnotation);
-    }
-    return null;
-  }
-
-  @override
-  Object visitClassDeclaration(ClassDeclaration node) {
-    bool prevTreatFinalInstanceVarAsConst = treatFinalInstanceVarAsConst;
-    if (node.element.constructors.any((ConstructorElement e) => e.isConst)) {
-      // Instance vars marked "final" need to be included in the dependency
-      // graph, since constant constructors implicitly use the values in their
-      // initializers.
-      treatFinalInstanceVarAsConst = true;
-    }
-    try {
-      return super.visitClassDeclaration(node);
-    } finally {
-      treatFinalInstanceVarAsConst = prevTreatFinalInstanceVarAsConst;
-    }
-  }
-
-  @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
-    super.visitConstructorDeclaration(node);
-    if (node.constKeyword != null) {
-      ConstructorElement element = node.element;
-      if (element != null) {
-        constantsToCompute.add(element);
-        constantsToCompute.addAll(element.parameters);
-      }
-    }
-    return null;
-  }
-
-  @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
-    super.visitDefaultFormalParameter(node);
-    Expression defaultValue = node.defaultValue;
-    if (defaultValue != null && node.element != null) {
-      constantsToCompute.add(node.element);
-    }
-    return null;
-  }
-
-  @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
-    super.visitVariableDeclaration(node);
-    Expression initializer = node.initializer;
-    VariableElement element = node.element;
-    if (initializer != null &&
-        (node.isConst ||
-            treatFinalInstanceVarAsConst &&
-                element is FieldElement &&
-                node.isFinal &&
-                !element.isStatic)) {
-      if (node.element != null) {
-        constantsToCompute.add(node.element);
-      }
-    }
-    return null;
-  }
-}
-
-/**
- * An object used to compute the values of constant variables and constant
- * constructor invocations in one or more compilation units. The expected usage
- * pattern is for the compilation units to be added to this computer using the
- * method [add] and then for the method [computeValues] to be invoked exactly
- * once. Any use of an instance after invoking the method [computeValues] will
- * result in unpredictable behavior.
- */
-class ConstantValueComputer {
-  /**
-   * Source of RegExp matching declarable operator names.
-   * From sdk/lib/internal/symbol.dart.
-   */
-  static String _OPERATOR_RE =
-      "(?:[\\-+*/%&|^]|\\[\\]=?|==|~/?|<[<=]?|>[>=]?|unary-)";
-
-  /**
-   * Source of RegExp matching Dart reserved words.
-   * From sdk/lib/internal/symbol.dart.
-   */
-  static String _RESERVED_WORD_RE =
-      "(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|d(?:efault|o)|e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ull)|ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|v(?:ar|oid)|w(?:hile|ith))";
-
-  /**
-   * A graph in which the nodes are the constants, and the edges are from each
-   * constant to the other constants that are referenced by it.
-   */
-  DirectedGraph<ConstantEvaluationTarget> referenceGraph =
-      new DirectedGraph<ConstantEvaluationTarget>();
-
-  /**
-   * The elements whose constant values need to be computed.  Any elements
-   * which appear in [referenceGraph] but not in this set either belong to a
-   * different library cycle (and hence don't need to be recomputed) or were
-   * computed during a previous stage of resolution stage (e.g. constants
-   * associated with enums).
-   */
-  HashSet<ConstantEvaluationTarget> _constantsToCompute =
-      new HashSet<ConstantEvaluationTarget>();
-
-  /**
-   * The evaluation engine that does the work of evaluating instance creation
-   * expressions.
-   */
-  final ConstantEvaluationEngine evaluationEngine;
-
-  final AnalysisContext _context;
-
-  /**
-   * Initialize a newly created constant value computer. The [typeProvider] is
-   * the type provider used to access known types. The [declaredVariables] is
-   * the set of variables declared on the command line using '-D'.
-   */
-  ConstantValueComputer(this._context, TypeProvider typeProvider,
-      DeclaredVariables declaredVariables,
-      [ConstantEvaluationValidator validator, TypeSystem typeSystem])
-      : evaluationEngine = new ConstantEvaluationEngine(
-            typeProvider, declaredVariables,
-            validator: validator, typeSystem: typeSystem);
-
-  /**
-   * Add the constants in the given compilation [unit] to the list of constants
-   * whose value needs to be computed.
-   */
-  void add(CompilationUnit unit, Source source, Source librarySource) {
-    ConstantFinder constantFinder =
-        new ConstantFinder(_context, source, librarySource);
-    unit.accept(constantFinder);
-    _constantsToCompute.addAll(constantFinder.constantsToCompute);
-  }
-
-  /**
-   * Compute values for all of the constants in the compilation units that were
-   * added.
-   */
-  void computeValues() {
-    for (ConstantEvaluationTarget constant in _constantsToCompute) {
-      referenceGraph.addNode(constant);
-      evaluationEngine.computeDependencies(constant,
-          (ConstantEvaluationTarget dependency) {
-        referenceGraph.addEdge(constant, dependency);
-      });
-    }
-    List<List<ConstantEvaluationTarget>> topologicalSort =
-        referenceGraph.computeTopologicalSort();
-    for (List<ConstantEvaluationTarget> constantsInCycle in topologicalSort) {
-      if (constantsInCycle.length == 1) {
-        ConstantEvaluationTarget constant = constantsInCycle[0];
-        if (!referenceGraph.getTails(constant).contains(constant)) {
-          _computeValueFor(constant);
-          continue;
-        }
-      }
-      for (ConstantEvaluationTarget constant in constantsInCycle) {
-        evaluationEngine.generateCycleError(constantsInCycle, constant);
-      }
-    }
-  }
-
-  /**
-   * Compute a value for the given [constant].
-   */
-  void _computeValueFor(ConstantEvaluationTarget constant) {
-    if (!_constantsToCompute.contains(constant)) {
-      // Element is in the dependency graph but should have been computed by
-      // a previous stage of analysis.
-      // TODO(paulberry): once we have moved over to the new task model, this
-      // should only occur for constants associated with enum members.  Once
-      // that happens we should add an assertion to verify that it doesn't
-      // occur in any other cases.
-      return;
-    }
-    evaluationEngine.computeConstantValue(constant);
-  }
-}
-
-/**
- * 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>
- */
-class ConstantVisitor extends UnifyingAstVisitor<DartObjectImpl> {
-  /**
-   * The type provider used to access the known types.
-   */
-  final ConstantEvaluationEngine evaluationEngine;
-
-  final HashMap<String, DartObjectImpl> _lexicalEnvironment;
-
-  /**
-   * Error reporter that we use to report errors accumulated while computing the
-   * constant.
-   */
-  final ErrorReporter _errorReporter;
-
-  /**
-   * Helper class used to compute constant values.
-   */
-  DartObjectComputer _dartObjectComputer;
-
-  /**
-   * Initialize a newly created constant visitor. The [evaluationEngine] is
-   * used to evaluate instance creation expressions. The [lexicalEnvironment]
-   * is a map containing values which should override identifiers, or `null` if
-   * no overriding is necessary. The [_errorReporter] is used to report errors
-   * found during evaluation.  The [validator] is used by unit tests to verify
-   * correct dependency analysis.
-   */
-  ConstantVisitor(this.evaluationEngine, this._errorReporter,
-      {HashMap<String, DartObjectImpl> lexicalEnvironment})
-      : _lexicalEnvironment = lexicalEnvironment {
-    this._dartObjectComputer =
-        new DartObjectComputer(_errorReporter, evaluationEngine.typeProvider);
-  }
-
-  /**
-   * Convenience getter to gain access to the [evalationEngine]'s type
-   * provider.
-   */
-  TypeProvider get _typeProvider => evaluationEngine.typeProvider;
-
-  /**
-   * Convenience getter to gain access to the [evaluationEngine]'s type system.
-   */
-  TypeSystem get _typeSystem => evaluationEngine.typeSystem;
-
-  @override
-  DartObjectImpl visitAdjacentStrings(AdjacentStrings node) {
-    DartObjectImpl result = null;
-    for (StringLiteral string in node.strings) {
-      if (result == null) {
-        result = string.accept(this);
-      } else {
-        result =
-            _dartObjectComputer.concatenate(node, result, string.accept(this));
-      }
-    }
-    return result;
-  }
-
-  @override
-  DartObjectImpl visitBinaryExpression(BinaryExpression node) {
-    DartObjectImpl leftResult = node.leftOperand.accept(this);
-    DartObjectImpl rightResult = node.rightOperand.accept(this);
-    TokenType operatorType = node.operator.type;
-    // 'null' is almost never good operand
-    if (operatorType != TokenType.BANG_EQ &&
-        operatorType != TokenType.EQ_EQ &&
-        operatorType != TokenType.QUESTION_QUESTION) {
-      if (leftResult != null && leftResult.isNull ||
-          rightResult != null && rightResult.isNull) {
-        _error(node, CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-        return null;
-      }
-    }
-    // evaluate operator
-    while (true) {
-      if (operatorType == TokenType.AMPERSAND) {
-        return _dartObjectComputer.bitAnd(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.AMPERSAND_AMPERSAND) {
-        return _dartObjectComputer.logicalAnd(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.BANG_EQ) {
-        return _dartObjectComputer.notEqual(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.BAR) {
-        return _dartObjectComputer.bitOr(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.BAR_BAR) {
-        return _dartObjectComputer.logicalOr(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.CARET) {
-        return _dartObjectComputer.bitXor(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.EQ_EQ) {
-        return _dartObjectComputer.equalEqual(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.GT) {
-        return _dartObjectComputer.greaterThan(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.GT_EQ) {
-        return _dartObjectComputer.greaterThanOrEqual(
-            node, leftResult, rightResult);
-      } else if (operatorType == TokenType.GT_GT) {
-        return _dartObjectComputer.shiftRight(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.LT) {
-        return _dartObjectComputer.lessThan(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.LT_EQ) {
-        return _dartObjectComputer.lessThanOrEqual(
-            node, leftResult, rightResult);
-      } else if (operatorType == TokenType.LT_LT) {
-        return _dartObjectComputer.shiftLeft(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.MINUS) {
-        return _dartObjectComputer.minus(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.PERCENT) {
-        return _dartObjectComputer.remainder(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.PLUS) {
-        return _dartObjectComputer.add(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.STAR) {
-        return _dartObjectComputer.times(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.SLASH) {
-        return _dartObjectComputer.divide(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.TILDE_SLASH) {
-        return _dartObjectComputer.integerDivide(node, leftResult, rightResult);
-      } else if (operatorType == TokenType.QUESTION_QUESTION) {
-        return _dartObjectComputer.questionQuestion(
-            node, leftResult, rightResult);
-      } else {
-        // TODO(brianwilkerson) Figure out which error to report.
-        _error(node, null);
-        return null;
-      }
-      break;
-    }
-  }
-
-  @override
-  DartObjectImpl visitBooleanLiteral(BooleanLiteral node) =>
-      new DartObjectImpl(_typeProvider.boolType, BoolState.from(node.value));
-
-  @override
-  DartObjectImpl visitConditionalExpression(ConditionalExpression node) {
-    Expression condition = node.condition;
-    DartObjectImpl conditionResult = condition.accept(this);
-    DartObjectImpl thenResult = node.thenExpression.accept(this);
-    DartObjectImpl elseResult = node.elseExpression.accept(this);
-    if (conditionResult == null) {
-      return conditionResult;
-    } else if (!conditionResult.isBool) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, condition);
-      return null;
-    } else if (thenResult == null) {
-      return thenResult;
-    } else if (elseResult == null) {
-      return elseResult;
-    }
-    conditionResult =
-        _dartObjectComputer.applyBooleanConversion(condition, conditionResult);
-    if (conditionResult == null) {
-      return conditionResult;
-    }
-    if (conditionResult.toBoolValue() == true) {
-      return thenResult;
-    } else if (conditionResult.toBoolValue() == false) {
-      return elseResult;
-    }
-    ParameterizedType thenType = thenResult.type;
-    ParameterizedType elseType = elseResult.type;
-    return new DartObjectImpl.validWithUnknownValue(
-        _typeSystem.getLeastUpperBound(_typeProvider, thenType, elseType)
-        as InterfaceType);
-  }
-
-  @override
-  DartObjectImpl visitDoubleLiteral(DoubleLiteral node) =>
-      new DartObjectImpl(_typeProvider.doubleType, new DoubleState(node.value));
-
-  @override
-  DartObjectImpl visitInstanceCreationExpression(
-      InstanceCreationExpression node) {
-    if (!node.isConst) {
-      // TODO(brianwilkerson) Figure out which error to report.
-      _error(node, null);
-      return null;
-    }
-    ConstructorElement constructor = node.staticElement;
-    if (constructor == null) {
-      // Couldn't resolve the constructor so we can't compute a value.  No
-      // problem - the error has already been reported.
-      return null;
-    }
-    return evaluationEngine.evaluateConstructorCall(
-        node, node.argumentList.arguments, constructor, this, _errorReporter);
-  }
-
-  @override
-  DartObjectImpl visitIntegerLiteral(IntegerLiteral node) =>
-      new DartObjectImpl(_typeProvider.intType, new IntState(node.value));
-
-  @override
-  DartObjectImpl visitInterpolationExpression(InterpolationExpression node) {
-    DartObjectImpl result = node.expression.accept(this);
-    if (result != null && !result.isBoolNumStringOrNull) {
-      _error(node, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING);
-      return null;
-    }
-    return _dartObjectComputer.performToString(node, result);
-  }
-
-  @override
-  DartObjectImpl visitInterpolationString(InterpolationString node) =>
-      new DartObjectImpl(_typeProvider.stringType, new StringState(node.value));
-
-  @override
-  DartObjectImpl visitListLiteral(ListLiteral node) {
-    if (node.constKeyword == null) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL, node);
-      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;
-    }
-    DartType elementType = _typeProvider.dynamicType;
-    if (node.typeArguments != null &&
-        node.typeArguments.arguments.length == 1) {
-      DartType type = node.typeArguments.arguments[0].type;
-      if (type != null) {
-        elementType = type;
-      }
-    }
-    InterfaceType listType = _typeProvider.listType.substitute4([elementType]);
-    return new DartObjectImpl(listType, new ListState(elements));
-  }
-
-  @override
-  DartObjectImpl visitMapLiteral(MapLiteral node) {
-    if (node.constKeyword == null) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL, node);
-      return null;
-    }
-    bool errorOccurred = false;
-    LinkedHashMap<DartObjectImpl, DartObjectImpl> map =
-        new LinkedHashMap<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;
-    if (node.typeArguments != null &&
-        node.typeArguments.arguments.length == 2) {
-      DartType keyTypeCandidate = node.typeArguments.arguments[0].type;
-      if (keyTypeCandidate != null) {
-        keyType = keyTypeCandidate;
-      }
-      DartType valueTypeCandidate = node.typeArguments.arguments[1].type;
-      if (valueTypeCandidate != null) {
-        valueType = valueTypeCandidate;
-      }
-    }
-    InterfaceType mapType =
-        _typeProvider.mapType.substitute4([keyType, valueType]);
-    return new DartObjectImpl(mapType, new MapState(map));
-  }
-
-  @override
-  DartObjectImpl visitMethodInvocation(MethodInvocation node) {
-    Element element = node.methodName.staticElement;
-    if (element is FunctionElement) {
-      FunctionElement function = element;
-      if (function.name == "identical") {
-        NodeList<Expression> arguments = node.argumentList.arguments;
-        if (arguments.length == 2) {
-          Element enclosingElement = function.enclosingElement;
-          if (enclosingElement is CompilationUnitElement) {
-            LibraryElement library = enclosingElement.library;
-            if (library.isDartCore) {
-              DartObjectImpl leftArgument = arguments[0].accept(this);
-              DartObjectImpl rightArgument = arguments[1].accept(this);
-              return _dartObjectComputer.isIdentical(
-                  node, leftArgument, rightArgument);
-            }
-          }
-        }
-      }
-    }
-    // TODO(brianwilkerson) Figure out which error to report.
-    _error(node, null);
-    return null;
-  }
-
-  @override
-  DartObjectImpl visitNamedExpression(NamedExpression node) =>
-      node.expression.accept(this);
-
-  @override
-  DartObjectImpl visitNode(AstNode node) {
-    // TODO(brianwilkerson) Figure out which error to report.
-    _error(node, null);
-    return null;
-  }
-
-  @override
-  DartObjectImpl visitNullLiteral(NullLiteral node) => _typeProvider.nullObject;
-
-  @override
-  DartObjectImpl visitParenthesizedExpression(ParenthesizedExpression node) =>
-      node.expression.accept(this);
-
-  @override
-  DartObjectImpl visitPrefixedIdentifier(PrefixedIdentifier node) {
-    SimpleIdentifier prefixNode = node.prefix;
-    Element prefixElement = prefixNode.staticElement;
-    // String.length
-    if (prefixElement is! PrefixElement && prefixElement is! ClassElement) {
-      DartObjectImpl prefixResult = node.prefix.accept(this);
-      if (_isStringLength(prefixResult, node.identifier)) {
-        return prefixResult.stringLength(_typeProvider);
-      }
-    }
-    // importPrefix.CONST
-    if (prefixElement is! PrefixElement) {
-      DartObjectImpl prefixResult = prefixNode.accept(this);
-      if (prefixResult == null) {
-        // The error has already been reported.
-        return null;
-      }
-    }
-    // validate prefixed identifier
-    return _getConstantValue(node, node.staticElement);
-  }
-
-  @override
-  DartObjectImpl visitPrefixExpression(PrefixExpression node) {
-    DartObjectImpl operand = node.operand.accept(this);
-    if (operand != null && operand.isNull) {
-      _error(node, CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-      return null;
-    }
-    while (true) {
-      if (node.operator.type == TokenType.BANG) {
-        return _dartObjectComputer.logicalNot(node, operand);
-      } else if (node.operator.type == TokenType.TILDE) {
-        return _dartObjectComputer.bitNot(node, operand);
-      } else if (node.operator.type == TokenType.MINUS) {
-        return _dartObjectComputer.negated(node, operand);
-      } else {
-        // TODO(brianwilkerson) Figure out which error to report.
-        _error(node, null);
-        return null;
-      }
-      break;
-    }
-  }
-
-  @override
-  DartObjectImpl visitPropertyAccess(PropertyAccess node) {
-    if (node.target != null) {
-      DartObjectImpl prefixResult = node.target.accept(this);
-      if (_isStringLength(prefixResult, node.propertyName)) {
-        return prefixResult.stringLength(_typeProvider);
-      }
-    }
-    return _getConstantValue(node, node.propertyName.staticElement);
-  }
-
-  @override
-  DartObjectImpl visitSimpleIdentifier(SimpleIdentifier node) {
-    if (_lexicalEnvironment != null &&
-        _lexicalEnvironment.containsKey(node.name)) {
-      return _lexicalEnvironment[node.name];
-    }
-    return _getConstantValue(node, node.staticElement);
-  }
-
-  @override
-  DartObjectImpl visitSimpleStringLiteral(SimpleStringLiteral node) =>
-      new DartObjectImpl(_typeProvider.stringType, new StringState(node.value));
-
-  @override
-  DartObjectImpl visitStringInterpolation(StringInterpolation node) {
-    DartObjectImpl result = null;
-    bool first = true;
-    for (InterpolationElement element in node.elements) {
-      if (first) {
-        result = element.accept(this);
-        first = false;
-      } else {
-        result =
-            _dartObjectComputer.concatenate(node, result, element.accept(this));
-      }
-    }
-    return result;
-  }
-
-  @override
-  DartObjectImpl visitSymbolLiteral(SymbolLiteral node) {
-    StringBuffer buffer = new StringBuffer();
-    List<Token> components = node.components;
-    for (int i = 0; i < components.length; i++) {
-      if (i > 0) {
-        buffer.writeCharCode(0x2E);
-      }
-      buffer.write(components[i].lexeme);
-    }
-    return new DartObjectImpl(
-        _typeProvider.symbolType, new SymbolState(buffer.toString()));
-  }
-
-  /**
-   * Create an error associated with the given [node]. The error will have the
-   * given error [code].
-   */
-  void _error(AstNode node, ErrorCode code) {
-    _errorReporter.reportErrorForNode(
-        code == null ? CompileTimeErrorCode.INVALID_CONSTANT : code, node);
-  }
-
-  /**
-   * 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.
-   */
-  DartObjectImpl _getConstantValue(AstNode node, Element element) {
-    if (element is PropertyAccessorElement) {
-      element = (element as PropertyAccessorElement).variable;
-    }
-    if (element is VariableElementImpl) {
-      VariableElementImpl variableElementImpl = element;
-      evaluationEngine.validator.beforeGetEvaluationResult(element);
-      EvaluationResultImpl value = variableElementImpl.evaluationResult;
-      if (variableElementImpl.isConst && value != null) {
-        return value.value;
-      }
-    } else if (element is ExecutableElement) {
-      ExecutableElement function = element;
-      if (function.isStatic) {
-        ParameterizedType functionType = function.type;
-        if (functionType == null) {
-          functionType = _typeProvider.functionType;
-        }
-        return new DartObjectImpl(functionType, new FunctionState(function));
-      }
-    } else if (element is ClassElement ||
-        element is FunctionTypeAliasElement ||
-        element is DynamicElementImpl) {
-      return new DartObjectImpl(_typeProvider.typeType, new TypeState(element));
-    }
-    // TODO(brianwilkerson) Figure out which error to report.
-    _error(node, null);
-    return null;
-  }
-
-  /**
-   * Return `true` if the given [targetResult] represents a string and the
-   * [identifier] is "length".
-   */
-  bool _isStringLength(
-      DartObjectImpl targetResult, SimpleIdentifier identifier) {
-    if (targetResult == null || targetResult.type != _typeProvider.stringType) {
-      return false;
-    }
-    return identifier.name == 'length';
-  }
-
-  /**
-   * Return the value of the given [expression], or a representation of 'null'
-   * if the expression cannot be evaluated.
-   */
-  DartObjectImpl _valueOf(Expression expression) {
-    DartObjectImpl expressionValue = expression.accept(this);
-    if (expressionValue != null) {
-      return expressionValue;
-    }
-    return _typeProvider.nullObject;
-  }
-}
-
-/**
- * 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.
- */
-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`.
-   */
-  bool get hasKnownValue;
-
-  /**
-   * 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].
-   */
-  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.
-   */
-  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`.
-   */
-  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`.
-   */
-  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`.
-   */
-  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`.
-   */
-  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`.
-   */
-  Map<DartObject, DartObject> toMapValue();
-
-  /**
-   * 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
-   */
-  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`.
-   */
-  DartType toTypeValue();
-}
-
-/**
- * A utility class that contains methods for manipulating instances of a Dart
- * class and for collecting errors during evaluation.
- */
-class DartObjectComputer {
-  /**
-   * The error reporter that we are using to collect errors.
-   */
-  final ErrorReporter _errorReporter;
-
-  /**
-   * The type provider used to create objects of the appropriate types, and to
-   * identify when an object is of a built-in type.
-   */
-  final TypeProvider _typeProvider;
-
-  DartObjectComputer(this._errorReporter, this._typeProvider);
-
-  DartObjectImpl add(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.add(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-        return null;
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Return the result of applying boolean conversion to the [evaluationResult].
-   * The [node] is the node against which errors should be reported.
-   */
-  DartObjectImpl applyBooleanConversion(
-      AstNode node, DartObjectImpl evaluationResult) {
-    if (evaluationResult != null) {
-      try {
-        return evaluationResult.convertToBool(_typeProvider);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl bitAnd(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.bitAnd(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl bitNot(Expression node, DartObjectImpl evaluationResult) {
-    if (evaluationResult != null) {
-      try {
-        return evaluationResult.bitNot(_typeProvider);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl bitOr(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.bitOr(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl bitXor(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.bitXor(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl concatenate(Expression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.concatenate(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl divide(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.divide(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl equalEqual(Expression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.equalEqual(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl greaterThan(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.greaterThan(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl greaterThanOrEqual(BinaryExpression node,
-      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.greaterThanOrEqual(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl integerDivide(BinaryExpression node,
-      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.integerDivide(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl isIdentical(Expression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.isIdentical(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl lessThan(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.lessThan(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl lessThanOrEqual(BinaryExpression node,
-      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.lessThanOrEqual(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl logicalAnd(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.logicalAnd(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl logicalNot(Expression node, DartObjectImpl evaluationResult) {
-    if (evaluationResult != null) {
-      try {
-        return evaluationResult.logicalNot(_typeProvider);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl logicalOr(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.logicalOr(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl minus(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.minus(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl negated(Expression node, DartObjectImpl evaluationResult) {
-    if (evaluationResult != null) {
-      try {
-        return evaluationResult.negated(_typeProvider);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl notEqual(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.notEqual(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl performToString(
-      AstNode node, DartObjectImpl evaluationResult) {
-    if (evaluationResult != null) {
-      try {
-        return evaluationResult.performToString(_typeProvider);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl questionQuestion(Expression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      if (leftOperand.isNull) {
-        return rightOperand;
-      }
-      return leftOperand;
-    }
-    return null;
-  }
-
-  DartObjectImpl remainder(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.remainder(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl shiftLeft(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.shiftLeft(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl shiftRight(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.shiftRight(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Return the result of invoking the 'length' getter on the
-   * [evaluationResult]. The [node] is the node against which errors should be
-   * reported.
-   */
-  EvaluationResultImpl stringLength(
-      Expression node, EvaluationResultImpl evaluationResult) {
-    if (evaluationResult.value != null) {
-      try {
-        return new EvaluationResultImpl(
-            evaluationResult.value.stringLength(_typeProvider));
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return new EvaluationResultImpl(null);
-  }
-
-  DartObjectImpl times(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.times(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-}
-
-/**
- * An instance of a Dart class.
- */
-class DartObjectImpl implements DartObject {
-  /**
-   * An empty list of objects.
-   */
-  static const List<DartObjectImpl> EMPTY_LIST = const <DartObjectImpl>[];
-
-  /**
-   * The run-time type of this object.
-   */
-  @override
-  final ParameterizedType type;
-
-  /**
-   * The state of the object.
-   */
-  final InstanceState _state;
-
-  /**
-   * Initialize a newly created object to have the given [type] and [_state].
-   */
-  DartObjectImpl(this.type, this._state);
-
-  /**
-   * Create an object to represent an unknown value.
-   */
-  factory DartObjectImpl.validWithUnknownValue(InterfaceType type) {
-    if (type.element.library.isDartCore) {
-      String typeName = type.name;
-      if (typeName == "bool") {
-        return new DartObjectImpl(type, BoolState.UNKNOWN_VALUE);
-      } else if (typeName == "double") {
-        return new DartObjectImpl(type, DoubleState.UNKNOWN_VALUE);
-      } else if (typeName == "int") {
-        return new DartObjectImpl(type, IntState.UNKNOWN_VALUE);
-      } else if (typeName == "String") {
-        return new DartObjectImpl(type, StringState.UNKNOWN_VALUE);
-      }
-    }
-    return new DartObjectImpl(type, GenericState.UNKNOWN_VALUE);
-  }
-
-  HashMap<String, DartObjectImpl> get fields => _state.fields;
-
-  @override
-  int get hashCode => JenkinsSmiHash.hash2(type.hashCode, _state.hashCode);
-
-  @override
-  bool get hasKnownValue => !_state.isUnknown;
-
-  /**
-   * Return `true` if this object represents an object whose type is 'bool'.
-   */
-  bool get isBool => _state.isBool;
-
-  /**
-   * Return `true` if this object represents an object whose type is either
-   * 'bool', 'num', 'String', or 'Null'.
-   */
-  bool get isBoolNumStringOrNull => _state.isBoolNumStringOrNull;
-
-  @override
-  bool get isNull => _state is NullState;
-
-  /**
-   * Return `true` if this object represents an unknown value.
-   */
-  bool get isUnknown => _state.isUnknown;
-
-  /**
-   * Return `true` if this object represents an instance of a user-defined
-   * class.
-   */
-  bool get isUserDefinedObject => _state is GenericState;
-
-  @override
-  bool operator ==(Object object) {
-    if (object is! DartObjectImpl) {
-      return false;
-    }
-    DartObjectImpl dartObject = object as DartObjectImpl;
-    return type == dartObject.type && _state == dartObject._state;
-  }
-
-  /**
-   * Return the result of invoking the '+' operator on this object with the
-   * given [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 add(TypeProvider typeProvider, DartObjectImpl rightOperand) {
-    InstanceState result = _state.add(rightOperand._state);
-    if (result is IntState) {
-      return new DartObjectImpl(typeProvider.intType, result);
-    } else if (result is DoubleState) {
-      return new DartObjectImpl(typeProvider.doubleType, result);
-    } else if (result is NumState) {
-      return new DartObjectImpl(typeProvider.numType, result);
-    } else if (result is StringState) {
-      return new DartObjectImpl(typeProvider.stringType, result);
-    }
-    // We should never get here.
-    throw new IllegalStateException("add returned a ${result.runtimeType}");
-  }
-
-  /**
-   * Return the result of invoking the '&' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl bitAnd(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.bitAnd(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '~' operator on this object. The
-   * [typeProvider] is the type provider used to find known types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl bitNot(TypeProvider typeProvider) =>
-      new DartObjectImpl(typeProvider.intType, _state.bitNot());
-
-  /**
-   * Return the result of invoking the '|' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl bitOr(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.bitOr(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '^' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl bitXor(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.bitXor(rightOperand._state));
-
-  /**
-   * 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 concatenate(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.stringType, _state.concatenate(rightOperand._state));
-
-  /**
-   * Return the result of applying boolean conversion to this object. 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 convertToBool(TypeProvider typeProvider) {
-    InterfaceType boolType = typeProvider.boolType;
-    if (identical(type, boolType)) {
-      return this;
-    }
-    return new DartObjectImpl(boolType, _state.convertToBool());
-  }
-
-  /**
-   * 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 divide(
-      TypeProvider typeProvider, DartObjectImpl rightOperand) {
-    InstanceState result = _state.divide(rightOperand._state);
-    if (result is IntState) {
-      return new DartObjectImpl(typeProvider.intType, result);
-    } else if (result is DoubleState) {
-      return new DartObjectImpl(typeProvider.doubleType, result);
-    } else if (result is NumState) {
-      return new DartObjectImpl(typeProvider.numType, result);
-    }
-    // We should never get here.
-    throw new IllegalStateException("divide returned a ${result.runtimeType}");
-  }
-
-  /**
-   * 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 equalEqual(
-      TypeProvider typeProvider, DartObjectImpl rightOperand) {
-    if (type != rightOperand.type) {
-      String typeName = type.name;
-      if (!(typeName == "bool" ||
-          typeName == "double" ||
-          typeName == "int" ||
-          typeName == "num" ||
-          typeName == "String" ||
-          typeName == "Null" ||
-          type.isDynamic)) {
-        throw new EvaluationException(
-            CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING);
-      }
-    }
-    return new DartObjectImpl(
-        typeProvider.boolType, _state.equalEqual(rightOperand._state));
-  }
-
-  @override
-  DartObject getField(String name) {
-    if (_state is GenericState) {
-      return (_state as GenericState).fields[name];
-    }
-    return null;
-  }
-
-  /**
-   * Return the result of invoking the '&gt;' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl greaterThan(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.boolType, _state.greaterThan(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '&gt;=' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl greaterThanOrEqual(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(typeProvider.boolType,
-          _state.greaterThanOrEqual(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '~/' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl integerDivide(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.integerDivide(rightOperand._state));
-
-  /**
-   * Return the result of invoking the identical function on this object with
-   * the [rightOperand]. The [typeProvider] is the type provider used to find
-   * known types.
-   */
-  DartObjectImpl isIdentical(
-      TypeProvider typeProvider, DartObjectImpl rightOperand) {
-    return new DartObjectImpl(
-        typeProvider.boolType, _state.isIdentical(rightOperand._state));
-  }
-
-  /**
-   * Return the result of invoking the '&lt;' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl lessThan(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.boolType, _state.lessThan(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '&lt;=' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl lessThanOrEqual(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.boolType, _state.lessThanOrEqual(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '&&' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl logicalAnd(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.boolType, _state.logicalAnd(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '!' operator on this object. 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 logicalNot(TypeProvider typeProvider) =>
-      new DartObjectImpl(typeProvider.boolType, _state.logicalNot());
-
-  /**
-   * Return the result of invoking the '||' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl logicalOr(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.boolType, _state.logicalOr(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '-' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl minus(TypeProvider typeProvider, DartObjectImpl rightOperand) {
-    InstanceState result = _state.minus(rightOperand._state);
-    if (result is IntState) {
-      return new DartObjectImpl(typeProvider.intType, result);
-    } else if (result is DoubleState) {
-      return new DartObjectImpl(typeProvider.doubleType, result);
-    } else if (result is NumState) {
-      return new DartObjectImpl(typeProvider.numType, result);
-    }
-    // We should never get here.
-    throw new IllegalStateException("minus returned a ${result.runtimeType}");
-  }
-
-  /**
-   * Return the result of invoking the '-' operator on this object. 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 negated(TypeProvider typeProvider) {
-    InstanceState result = _state.negated();
-    if (result is IntState) {
-      return new DartObjectImpl(typeProvider.intType, result);
-    } else if (result is DoubleState) {
-      return new DartObjectImpl(typeProvider.doubleType, result);
-    } else if (result is NumState) {
-      return new DartObjectImpl(typeProvider.numType, result);
-    }
-    // We should never get here.
-    throw new IllegalStateException("negated returned a ${result.runtimeType}");
-  }
-
-  /**
-   * 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 notEqual(
-      TypeProvider typeProvider, DartObjectImpl rightOperand) {
-    if (type != rightOperand.type) {
-      String typeName = type.name;
-      if (typeName != "bool" &&
-          typeName != "double" &&
-          typeName != "int" &&
-          typeName != "num" &&
-          typeName != "String") {
-        return new DartObjectImpl(typeProvider.boolType, BoolState.TRUE_STATE);
-      }
-    }
-    return new DartObjectImpl(typeProvider.boolType,
-        _state.equalEqual(rightOperand._state).logicalNot());
-  }
-
-  /**
-   * Return the result of converting this object to a 'String'. The
-   * [typeProvider] is the type provider used to find known types.
-   *
-   * Throws an [EvaluationException] if the object cannot be converted to a
-   * 'String'.
-   */
-  DartObjectImpl performToString(TypeProvider typeProvider) {
-    InterfaceType stringType = typeProvider.stringType;
-    if (identical(type, stringType)) {
-      return this;
-    }
-    return new DartObjectImpl(stringType, _state.convertToString());
-  }
-
-  /**
-   * 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 remainder(
-      TypeProvider typeProvider, DartObjectImpl rightOperand) {
-    InstanceState result = _state.remainder(rightOperand._state);
-    if (result is IntState) {
-      return new DartObjectImpl(typeProvider.intType, result);
-    } else if (result is DoubleState) {
-      return new DartObjectImpl(typeProvider.doubleType, result);
-    } else if (result is NumState) {
-      return new DartObjectImpl(typeProvider.numType, result);
-    }
-    // We should never get here.
-    throw new IllegalStateException(
-        "remainder returned a ${result.runtimeType}");
-  }
-
-  /**
-   * Return the result of invoking the '&lt;&lt;' 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 shiftLeft(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.shiftLeft(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '&gt;&gt;' operator on this object with
-   * the [rightOperand]. The [typeProvider] is the type provider used to find
-   * known types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl shiftRight(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.shiftRight(rightOperand._state));
-
-  /**
-   * Return the result of invoking the 'length' getter on this object. 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 stringLength(TypeProvider typeProvider) =>
-      new DartObjectImpl(typeProvider.intType, _state.stringLength());
-
-  /**
-   * 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 times(TypeProvider typeProvider, DartObjectImpl rightOperand) {
-    InstanceState result = _state.times(rightOperand._state);
-    if (result is IntState) {
-      return new DartObjectImpl(typeProvider.intType, result);
-    } else if (result is DoubleState) {
-      return new DartObjectImpl(typeProvider.doubleType, result);
-    } else if (result is NumState) {
-      return new DartObjectImpl(typeProvider.numType, result);
-    }
-    // We should never get here.
-    throw new IllegalStateException("times returned a ${result.runtimeType}");
-  }
-
-  @override
-  bool toBoolValue() {
-    if (_state is BoolState) {
-      return (_state as BoolState).value;
-    }
-    return null;
-  }
-
-  @override
-  double toDoubleValue() {
-    if (_state is DoubleState) {
-      return (_state as DoubleState).value;
-    }
-    return null;
-  }
-
-  @override
-  int toIntValue() {
-    if (_state is IntState) {
-      return (_state as IntState).value;
-    }
-    return null;
-  }
-
-  @override
-  List<DartObject> toListValue() {
-    if (_state is ListState) {
-      return (_state as ListState)._elements;
-    }
-    return null;
-  }
-
-  @override
-  Map<DartObject, DartObject> toMapValue() {
-    if (_state is MapState) {
-      return (_state as MapState)._entries;
-    }
-    return null;
-  }
-
-  @override
-  String toString() => "${type.displayName} ($_state)";
-
-  @override
-  String toStringValue() {
-    if (_state is StringState) {
-      return (_state as StringState).value;
-    }
-    return null;
-  }
-
-  @override
-  String toSymbolValue() {
-    if (_state is SymbolState) {
-      return (_state as SymbolState).value;
-    }
-    return null;
-  }
-
-  @override
-  DartType toTypeValue() {
-    if (_state is TypeState) {
-      Element element = (_state as TypeState)._element;
-      if (element is TypeDefiningElement) {
-        return element.type;
-      }
-    }
-    return null;
-  }
-}
-
-/**
- * An object used to provide access to the values of variables that have been
- * defined on the command line using the `-D` option.
- */
-class DeclaredVariables {
-  /**
-   * A table mapping the names of declared variables to their values.
-   */
-  HashMap<String, String> _declaredVariables = new HashMap<String, String>();
-
-  /**
-   * Define a variable with the given [name] to have the given [value].
-   */
-  void define(String name, String value) {
-    _declaredVariables[name] = value;
-  }
-
-  /**
-   * 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) {
-      return new DartObjectImpl(typeProvider.boolType, BoolState.UNKNOWN_VALUE);
-    }
-    if (value == "true") {
-      return new DartObjectImpl(typeProvider.boolType, BoolState.TRUE_STATE);
-    } else if (value == "false") {
-      return new DartObjectImpl(typeProvider.boolType, BoolState.FALSE_STATE);
-    }
-    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.
-   */
-  DartObject getInt(TypeProvider typeProvider, String name) {
-    String value = _declaredVariables[name];
-    if (value == null) {
-      return new DartObjectImpl(typeProvider.intType, IntState.UNKNOWN_VALUE);
-    }
-    int bigInteger;
-    try {
-      bigInteger = int.parse(value);
-    } on FormatException {
-      return new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE);
-    }
-    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'.
-   */
-  DartObject getString(TypeProvider typeProvider, String name) {
-    String value = _declaredVariables[name];
-    if (value == null) {
-      return new DartObjectImpl(
-          typeProvider.stringType, StringState.UNKNOWN_VALUE);
-    }
-    return new DartObjectImpl(typeProvider.stringType, new StringState(value));
-  }
-}
-
-/**
- * The state of an object representing a double.
- */
-class DoubleState extends NumState {
-  /**
-   * A state that can be used to represent a double whose value is not known.
-   */
-  static DoubleState UNKNOWN_VALUE = new DoubleState(null);
-
-  /**
-   * The value of this instance.
-   */
-  final double value;
-
-  /**
-   * Initialize a newly created state to represent a double with the given
-   * [value].
-   */
-  DoubleState(this.value);
-
-  @override
-  int get hashCode => value == null ? 0 : value.hashCode;
-
-  @override
-  bool get isBoolNumStringOrNull => true;
-
-  @override
-  bool get isUnknown => value == null;
-
-  @override
-  String get typeName => "double";
-
-  @override
-  bool operator ==(Object object) =>
-      object is DoubleState && (value == object.value);
-
-  @override
-  NumState add(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value + rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value + rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  StringState convertToString() {
-    if (value == null) {
-      return StringState.UNKNOWN_VALUE;
-    }
-    return new StringState(value.toString());
-  }
-
-  @override
-  NumState divide(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value / rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value / rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState greaterThan(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value > rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value > rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  BoolState greaterThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value >= rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value >= rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  IntState integerDivide(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return IntState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return IntState.UNKNOWN_VALUE;
-      }
-      double result = value / rightValue.toDouble();
-      return new IntState(result.toInt());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return IntState.UNKNOWN_VALUE;
-      }
-      double result = value / rightValue;
-      return new IntState(result.toInt());
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return IntState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value == rightValue);
-    } else if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value == rightValue.toDouble());
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.FALSE_STATE;
-  }
-
-  @override
-  BoolState lessThan(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value < rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value < rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  BoolState lessThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value <= rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value <= rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  NumState minus(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value - rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value - rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  NumState negated() {
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    return new DoubleState(-(value));
-  }
-
-  @override
-  NumState remainder(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value % rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value % rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  NumState times(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value * rightValue.toDouble());
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new DoubleState(value * rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  String toString() => value == null ? "-unknown-" : value.toString();
-}
-
-/**
- * The state of an object representing a Dart object for which there is no type
- * information.
- */
-class DynamicState extends InstanceState {
-  /**
-   * The unique instance of this class.
-   */
-  static DynamicState DYNAMIC_STATE = new DynamicState();
-
-  @override
-  bool get isBool => true;
-
-  @override
-  bool get isBoolNumStringOrNull => true;
-
-  @override
-  String get typeName => "dynamic";
-
-  @override
-  NumState add(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return _unknownNum(rightOperand);
-  }
-
-  @override
-  IntState bitAnd(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    return IntState.UNKNOWN_VALUE;
-  }
-
-  @override
-  IntState bitNot() => IntState.UNKNOWN_VALUE;
-
-  @override
-  IntState bitOr(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    return IntState.UNKNOWN_VALUE;
-  }
-
-  @override
-  IntState bitXor(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    return IntState.UNKNOWN_VALUE;
-  }
-
-  @override
-  StringState concatenate(InstanceState rightOperand) {
-    assertString(rightOperand);
-    return StringState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState convertToBool() => BoolState.UNKNOWN_VALUE;
-
-  @override
-  StringState convertToString() => StringState.UNKNOWN_VALUE;
-
-  @override
-  NumState divide(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return _unknownNum(rightOperand);
-  }
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState greaterThan(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState greaterThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  IntState integerDivide(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return IntState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState lessThan(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState lessThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState logicalAnd(InstanceState rightOperand) {
-    assertBool(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState logicalNot() => BoolState.UNKNOWN_VALUE;
-
-  @override
-  BoolState logicalOr(InstanceState rightOperand) {
-    assertBool(rightOperand);
-    return rightOperand.convertToBool();
-  }
-
-  @override
-  NumState minus(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return _unknownNum(rightOperand);
-  }
-
-  @override
-  NumState negated() => NumState.UNKNOWN_VALUE;
-
-  @override
-  NumState remainder(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return _unknownNum(rightOperand);
-  }
-
-  @override
-  IntState shiftLeft(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    return IntState.UNKNOWN_VALUE;
-  }
-
-  @override
-  IntState shiftRight(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    return IntState.UNKNOWN_VALUE;
-  }
-
-  @override
-  NumState times(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return _unknownNum(rightOperand);
-  }
-
-  /**
-   * Return an object representing an unknown numeric value whose type is based
-   * on the type of the [rightOperand].
-   */
-  NumState _unknownNum(InstanceState rightOperand) {
-    if (rightOperand is IntState) {
-      return IntState.UNKNOWN_VALUE;
-    } else if (rightOperand is DoubleState) {
-      return DoubleState.UNKNOWN_VALUE;
-    }
-    return NumState.UNKNOWN_VALUE;
-  }
-}
-
-/**
- * A run-time exception that would be thrown during the evaluation of Dart code.
- */
-class EvaluationException extends JavaException {
-  /**
-   * The error code associated with the exception.
-   */
-  final ErrorCode errorCode;
-
-  /**
-   * Initialize a newly created exception to have the given [errorCode].
-   */
-  EvaluationException(this.errorCode);
-}
-
-/**
- * The result of attempting to evaluate an expression.
- */
-class EvaluationResult {
-  /**
-   * The value of the expression.
-   */
-  final DartObject value;
-
-  /**
-   * The errors that should be reported for the expression(s) that were
-   * evaluated.
-   */
-  final List<AnalysisError> _errors;
-
-  /**
-   * Initialize a newly created result object with the given [value] and set of
-   * [_errors]. Clients should use one of the factory methods: [forErrors] and
-   * [forValue].
-   */
-  EvaluationResult(this.value, this._errors);
-
-  /**
-   * Return a list containing the errors that should be reported for the
-   * expression(s) that were evaluated. If there are no such errors, the list
-   * will be empty. The list can be empty even if the expression is not a valid
-   * compile time constant if the errors would have been reported by other parts
-   * of the analysis engine.
-   */
-  List<AnalysisError> get errors =>
-      _errors == null ? AnalysisError.NO_ERRORS : _errors;
-
-  /**
-   * Return `true` if the expression is a compile-time constant expression that
-   * would not throw an exception when evaluated.
-   */
-  bool get isValid => _errors == null;
-
-  /**
-   * Return an evaluation result representing the result of evaluating an
-   * expression that is not a compile-time constant because of the given
-   * [errors].
-   */
-  static EvaluationResult forErrors(List<AnalysisError> errors) =>
-      new EvaluationResult(null, errors);
-
-  /**
-   * Return an evaluation result representing the result of evaluating an
-   * expression that is a compile-time constant that evaluates to the given
-   * [value].
-   */
-  static EvaluationResult forValue(DartObject value) =>
-      new EvaluationResult(value, null);
-}
-
-/**
- * The result of attempting to evaluate a expression.
- */
-class EvaluationResultImpl {
-  /**
-   * The errors encountered while trying to evaluate the compile time constant.
-   * These errors may or may not have prevented the expression from being a
-   * valid compile time constant.
-   */
-  List<AnalysisError> _errors;
-
-  /**
-   * The value of the expression, or `null` if the value couldn't be computed
-   * due to errors.
-   */
-  final DartObjectImpl value;
-
-  EvaluationResultImpl(this.value, [List<AnalysisError> errors]) {
-    this._errors = errors == null ? <AnalysisError>[] : errors;
-  }
-
-  List<AnalysisError> get errors => _errors;
-
-  bool equalValues(TypeProvider typeProvider, EvaluationResultImpl result) {
-    if (this.value != null) {
-      if (result.value == null) {
-        return false;
-      }
-      return value == result.value;
-    } else {
-      return false;
-    }
-  }
-
-  @override
-  String toString() {
-    if (value == null) {
-      return "error";
-    }
-    return value.toString();
-  }
-}
-
-/**
- * The state of an object representing a function.
- */
-class FunctionState extends InstanceState {
-  /**
-   * The element representing the function being modeled.
-   */
-  final ExecutableElement _element;
-
-  /**
-   * Initialize a newly created state to represent the function with the given
-   * [element].
-   */
-  FunctionState(this._element);
-
-  @override
-  int get hashCode => _element == null ? 0 : _element.hashCode;
-
-  @override
-  String get typeName => "Function";
-
-  @override
-  bool operator ==(Object object) =>
-      object is FunctionState && (_element == object._element);
-
-  @override
-  StringState convertToString() {
-    if (_element == null) {
-      return StringState.UNKNOWN_VALUE;
-    }
-    return new StringState(_element.name);
-  }
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (_element == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is FunctionState) {
-      ExecutableElement rightElement = rightOperand._element;
-      if (rightElement == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(_element == rightElement);
-    } else if (rightOperand is DynamicState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.FALSE_STATE;
-  }
-
-  @override
-  String toString() => _element == null ? "-unknown-" : _element.name;
-}
-
-/**
- * The state of an object representing a Dart object for which there is no more
- * specific state.
- */
-class GenericState extends InstanceState {
-  /**
-   * Pseudo-field that we use to represent fields in the superclass.
-   */
-  static String SUPERCLASS_FIELD = "(super)";
-
-  /**
-   * A state that can be used to represent an object whose state is not known.
-   */
-  static GenericState UNKNOWN_VALUE =
-      new GenericState(new HashMap<String, DartObjectImpl>());
-
-  /**
-   * The values of the fields of this instance.
-   */
-  final HashMap<String, DartObjectImpl> _fieldMap;
-
-  /**
-   * Initialize a newly created state to represent a newly created object. The
-   * [fieldMap] contains the values of the fields of the instance.
-   */
-  GenericState(this._fieldMap);
-
-  @override
-  HashMap<String, DartObjectImpl> get fields => _fieldMap;
-
-  @override
-  int get hashCode {
-    int hashCode = 0;
-    for (DartObjectImpl value in _fieldMap.values) {
-      hashCode += value.hashCode;
-    }
-    return hashCode;
-  }
-
-  @override
-  bool get isUnknown => identical(this, UNKNOWN_VALUE);
-
-  @override
-  String get typeName => "user defined type";
-
-  @override
-  bool operator ==(Object object) {
-    if (object is! GenericState) {
-      return false;
-    }
-    GenericState state = object as GenericState;
-    HashSet<String> otherFields =
-        new HashSet<String>.from(state._fieldMap.keys.toSet());
-    for (String fieldName in _fieldMap.keys.toSet()) {
-      if (_fieldMap[fieldName] != state._fieldMap[fieldName]) {
-        return false;
-      }
-      otherFields.remove(fieldName);
-    }
-    for (String fieldName in otherFields) {
-      if (state._fieldMap[fieldName] != _fieldMap[fieldName]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  @override
-  StringState convertToString() => StringState.UNKNOWN_VALUE;
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (rightOperand is DynamicState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.from(this == rightOperand);
-  }
-
-  @override
-  String toString() {
-    StringBuffer buffer = new StringBuffer();
-    List<String> fieldNames = _fieldMap.keys.toList();
-    fieldNames.sort();
-    bool first = true;
-    for (String fieldName in fieldNames) {
-      if (first) {
-        first = false;
-      } else {
-        buffer.write('; ');
-      }
-      buffer.write(fieldName);
-      buffer.write(' = ');
-      buffer.write(_fieldMap[fieldName]);
-    }
-    return buffer.toString();
-  }
-}
-
-/**
- * The state of an object representing a Dart object.
- */
-abstract class InstanceState {
-  /**
-   * If this represents a generic dart object, return a map from its field names
-   * to their values. Otherwise return null.
-   */
-  HashMap<String, DartObjectImpl> get fields => null;
-
-  /**
-   * Return `true` if this object represents an object whose type is 'bool'.
-   */
-  bool get isBool => false;
-
-  /**
-   * Return `true` if this object represents an object whose type is either
-   * 'bool', 'num', 'String', or 'Null'.
-   */
-  bool get isBoolNumStringOrNull => false;
-
-  /**
-   * Return `true` if this object represents an unknown value.
-   */
-  bool get isUnknown => false;
-
-  /**
-   * Return the name of the type of this value.
-   */
-  String get typeName;
-
-  /**
-   * 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.
-   */
-  InstanceState add(InstanceState rightOperand) {
-    if (this is StringState && rightOperand is StringState) {
-      return concatenate(rightOperand);
-    }
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Throw an exception if the given [state] does not represent a boolean value.
-   */
-  void assertBool(InstanceState state) {
-    if (!(state is BoolState || state is DynamicState)) {
-      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL);
-    }
-  }
-
-  /**
-   * Throw an exception if the given [state] does not represent a boolean,
-   * numeric, string or null value.
-   */
-  void assertBoolNumStringOrNull(InstanceState state) {
-    if (!(state is BoolState ||
-        state is DoubleState ||
-        state is IntState ||
-        state is NumState ||
-        state is StringState ||
-        state is NullState ||
-        state is DynamicState)) {
-      throw new EvaluationException(
-          CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING);
-    }
-  }
-
-  /**
-   * Throw an exception if the given [state] does not represent an integer or
-   * null value.
-   */
-  void assertIntOrNull(InstanceState state) {
-    if (!(state is IntState ||
-        state is NumState ||
-        state is NullState ||
-        state is DynamicState)) {
-      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_INT);
-    }
-  }
-
-  /**
-   * Throw an exception if the given [state] does not represent a boolean,
-   * numeric, string or null value.
-   */
-  void assertNumOrNull(InstanceState state) {
-    if (!(state is DoubleState ||
-        state is IntState ||
-        state is NumState ||
-        state is NullState ||
-        state is DynamicState)) {
-      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
-    }
-  }
-
-  /**
-   * Throw an exception if the given [state] does not represent a String value.
-   */
-  void assertString(InstanceState state) {
-    if (!(state is StringState || state is DynamicState)) {
-      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL);
-    }
-  }
-
-  /**
-   * 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.
-   */
-  IntState bitAnd(InstanceState rightOperand) {
-    assertIntOrNull(this);
-    assertIntOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the '~' operator on this object.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  IntState bitNot() {
-    assertIntOrNull(this);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * 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.
-   */
-  IntState bitOr(InstanceState rightOperand) {
-    assertIntOrNull(this);
-    assertIntOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * 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.
-   */
-  IntState bitXor(InstanceState rightOperand) {
-    assertIntOrNull(this);
-    assertIntOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * 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.
-   */
-  StringState concatenate(InstanceState rightOperand) {
-    assertString(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of applying boolean conversion to this object.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  BoolState convertToBool() => BoolState.FALSE_STATE;
-
-  /**
-   * Return the result of converting this object to a String.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  StringState convertToString();
-
-  /**
-   * 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.
-   */
-  NumState divide(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * 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 equalEqual(InstanceState rightOperand);
-
-  /**
-   * Return the result of invoking the '&gt;' operator on this object with the
-   * [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  BoolState greaterThan(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the '&gt;=' operator on this object with the
-   * [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  BoolState greaterThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * 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.
-   */
-  IntState integerDivide(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the identical function on this object with
-   * the [rightOperand].
-   */
-  BoolState isIdentical(InstanceState rightOperand);
-
-  /**
-   * Return the result of invoking the '&lt;' operator on this object with the
-   * [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  BoolState lessThan(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the '&lt;=' operator on this object with the
-   * [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  BoolState lessThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the '&&' operator on this object with the
-   * [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  BoolState logicalAnd(InstanceState rightOperand) {
-    assertBool(this);
-    assertBool(rightOperand);
-    return BoolState.FALSE_STATE;
-  }
-
-  /**
-   * Return the result of invoking the '!' operator on this object.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  BoolState logicalNot() {
-    assertBool(this);
-    return BoolState.TRUE_STATE;
-  }
-
-  /**
-   * Return the result of invoking the '||' operator on this object with the
-   * [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  BoolState logicalOr(InstanceState rightOperand) {
-    assertBool(this);
-    assertBool(rightOperand);
-    return rightOperand.convertToBool();
-  }
-
-  /**
-   * Return the result of invoking the '-' operator on this object with the
-   * [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  NumState minus(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the '-' operator on this object.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  NumState negated() {
-    assertNumOrNull(this);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * 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.
-   */
-  NumState remainder(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the '&lt;&lt;' operator on this object with
-   * the [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  IntState shiftLeft(InstanceState rightOperand) {
-    assertIntOrNull(this);
-    assertIntOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the '&gt;&gt;' operator on this object with
-   * the [rightOperand].
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  IntState shiftRight(InstanceState rightOperand) {
-    assertIntOrNull(this);
-    assertIntOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * Return the result of invoking the 'length' getter on this object.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  IntState stringLength() {
-    assertString(this);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-
-  /**
-   * 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.
-   */
-  NumState times(InstanceState rightOperand) {
-    assertNumOrNull(this);
-    assertNumOrNull(rightOperand);
-    throw new EvaluationException(CompileTimeErrorCode.INVALID_CONSTANT);
-  }
-}
-
-/**
- * The state of an object representing an int.
- */
-class IntState extends NumState {
-  /**
-   * A state that can be used to represent an int whose value is not known.
-   */
-  static IntState UNKNOWN_VALUE = new IntState(null);
-
-  /**
-   * The value of this instance.
-   */
-  final int value;
-
-  /**
-   * Initialize a newly created state to represent an int with the given
-   * [value].
-   */
-  IntState(this.value);
-
-  @override
-  int get hashCode => value == null ? 0 : value.hashCode;
-
-  @override
-  bool get isBoolNumStringOrNull => true;
-
-  @override
-  bool get isUnknown => value == null;
-
-  @override
-  String get typeName => "int";
-
-  @override
-  bool operator ==(Object object) =>
-      object is IntState && (value == object.value);
-
-  @override
-  NumState add(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      if (rightOperand is DoubleState) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new IntState(value + rightValue);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return new DoubleState(value.toDouble() + rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  IntState bitAnd(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new IntState(value & rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  IntState bitNot() {
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    return new IntState(~value);
-  }
-
-  @override
-  IntState bitOr(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new IntState(value | rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  IntState bitXor(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new IntState(value ^ rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  StringState convertToString() {
-    if (value == null) {
-      return StringState.UNKNOWN_VALUE;
-    }
-    return new StringState(value.toString());
-  }
-
-  @override
-  NumState divide(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return DoubleState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return DoubleState.UNKNOWN_VALUE;
-      } else {
-        return new DoubleState(value.toDouble() / rightValue.toDouble());
-      }
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return new DoubleState(value.toDouble() / rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return DoubleState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState greaterThan(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value.compareTo(rightValue) > 0);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value.toDouble() > rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  BoolState greaterThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value.compareTo(rightValue) >= 0);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value.toDouble() >= rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  IntState integerDivide(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      } else if (rightValue == 0) {
-        throw new EvaluationException(
-            CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE);
-      }
-      return new IntState(value ~/ rightValue);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      double result = value.toDouble() / rightValue;
-      return new IntState(result.toInt());
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value == rightValue);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(rightValue == value.toDouble());
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.FALSE_STATE;
-  }
-
-  @override
-  BoolState lessThan(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value.compareTo(rightValue) < 0);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value.toDouble() < rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  BoolState lessThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value.compareTo(rightValue) <= 0);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value.toDouble() <= rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  NumState minus(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      if (rightOperand is DoubleState) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new IntState(value - rightValue);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return new DoubleState(value.toDouble() - rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  NumState negated() {
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    return new IntState(-value);
-  }
-
-  @override
-  NumState remainder(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      if (rightOperand is DoubleState) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      } else if (rightValue == 0) {
-        return new DoubleState(value.toDouble() % rightValue.toDouble());
-      }
-      return new IntState(value.remainder(rightValue));
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return new DoubleState(value.toDouble() % rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  IntState shiftLeft(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      } else if (rightValue.bitLength > 31) {
-        return UNKNOWN_VALUE;
-      }
-      return new IntState(value << rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  IntState shiftRight(InstanceState rightOperand) {
-    assertIntOrNull(rightOperand);
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      } else if (rightValue.bitLength > 31) {
-        return UNKNOWN_VALUE;
-      }
-      return new IntState(value >> rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  NumState times(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (value == null) {
-      if (rightOperand is DoubleState) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new IntState(value * rightValue);
-    } else if (rightOperand is DoubleState) {
-      double rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return DoubleState.UNKNOWN_VALUE;
-      }
-      return new DoubleState(value.toDouble() * rightValue);
-    } else if (rightOperand is DynamicState || rightOperand is NumState) {
-      return UNKNOWN_VALUE;
-    }
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  String toString() => value == null ? "-unknown-" : value.toString();
-}
-
-/**
- * The state of an object representing a list.
- */
-class ListState extends InstanceState {
-  /**
-   * The elements of the list.
-   */
-  final List<DartObjectImpl> _elements;
-
-  /**
-   * Initialize a newly created state to represent a list with the given
-   * [elements].
-   */
-  ListState(this._elements);
-
-  @override
-  int get hashCode {
-    int value = 0;
-    int count = _elements.length;
-    for (int i = 0; i < count; i++) {
-      value = (value << 3) ^ _elements[i].hashCode;
-    }
-    return value;
-  }
-
-  @override
-  String get typeName => "List";
-
-  @override
-  bool operator ==(Object object) {
-    if (object is! ListState) {
-      return false;
-    }
-    List<DartObjectImpl> otherElements = (object as ListState)._elements;
-    int count = _elements.length;
-    if (otherElements.length != count) {
-      return false;
-    } else if (count == 0) {
-      return true;
-    }
-    for (int i = 0; i < count; i++) {
-      if (_elements[i] != otherElements[i]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  @override
-  StringState convertToString() => StringState.UNKNOWN_VALUE;
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (rightOperand is DynamicState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.from(this == rightOperand);
-  }
-
-  @override
-  String toString() {
-    StringBuffer buffer = new StringBuffer();
-    buffer.write('[');
-    bool first = true;
-    _elements.forEach((DartObjectImpl element) {
-      if (first) {
-        first = false;
-      } else {
-        buffer.write(', ');
-      }
-      buffer.write(element);
-    });
-    buffer.write(']');
-    return buffer.toString();
-  }
-}
-
-/**
- * The state of an object representing a map.
- */
-class MapState extends InstanceState {
-  /**
-   * The entries in the map.
-   */
-  final HashMap<DartObjectImpl, DartObjectImpl> _entries;
-
-  /**
-   * Initialize a newly created state to represent a map with the given
-   * [entries].
-   */
-  MapState(this._entries);
-
-  @override
-  int get hashCode {
-    int value = 0;
-    for (DartObjectImpl key in _entries.keys.toSet()) {
-      value = (value << 3) ^ key.hashCode;
-    }
-    return value;
-  }
-
-  @override
-  String get typeName => "Map";
-
-  @override
-  bool operator ==(Object object) {
-    if (object is! MapState) {
-      return false;
-    }
-    HashMap<DartObjectImpl, DartObjectImpl> otherElements =
-        (object as MapState)._entries;
-    int count = _entries.length;
-    if (otherElements.length != count) {
-      return false;
-    } else if (count == 0) {
-      return true;
-    }
-    for (DartObjectImpl key in _entries.keys) {
-      DartObjectImpl value = _entries[key];
-      DartObjectImpl otherValue = otherElements[key];
-      if (value != otherValue) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  @override
-  StringState convertToString() => StringState.UNKNOWN_VALUE;
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (rightOperand is DynamicState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.from(this == rightOperand);
-  }
-
-  @override
-  String toString() {
-    StringBuffer buffer = new StringBuffer();
-    buffer.write('{');
-    bool first = true;
-    _entries.forEach((DartObjectImpl key, DartObjectImpl value) {
-      if (first) {
-        first = false;
-      } else {
-        buffer.write(', ');
-      }
-      buffer.write(key);
-      buffer.write(' = ');
-      buffer.write(value);
-    });
-    buffer.write('}');
-    return buffer.toString();
-  }
-}
-
-/**
- * The state of an object representing the value 'null'.
- */
-class NullState extends InstanceState {
-  /**
-   * An instance representing the boolean value 'null'.
-   */
-  static NullState NULL_STATE = new NullState();
-
-  @override
-  int get hashCode => 0;
-
-  @override
-  bool get isBoolNumStringOrNull => true;
-
-  @override
-  String get typeName => "Null";
-
-  @override
-  bool operator ==(Object object) => object is NullState;
-
-  @override
-  BoolState convertToBool() {
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  StringState convertToString() => new StringState("null");
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (rightOperand is DynamicState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.from(rightOperand is NullState);
-  }
-
-  @override
-  BoolState logicalNot() {
-    throw new EvaluationException(
-        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
-  }
-
-  @override
-  String toString() => "null";
-}
-
-/**
- * The state of an object representing a number of an unknown type (a 'num').
- */
-class NumState extends InstanceState {
-  /**
-   * A state that can be used to represent a number whose value is not known.
-   */
-  static NumState UNKNOWN_VALUE = new NumState();
-
-  @override
-  int get hashCode => 7;
-
-  @override
-  bool get isBoolNumStringOrNull => true;
-
-  @override
-  bool get isUnknown => identical(this, UNKNOWN_VALUE);
-
-  @override
-  String get typeName => "num";
-
-  @override
-  bool operator ==(Object object) => object is NumState;
-
-  @override
-  NumState add(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return UNKNOWN_VALUE;
-  }
-
-  @override
-  StringState convertToString() => StringState.UNKNOWN_VALUE;
-
-  @override
-  NumState divide(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return DoubleState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState greaterThan(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState greaterThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  IntState integerDivide(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    if (rightOperand is IntState) {
-      int rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return IntState.UNKNOWN_VALUE;
-      } else if (rightValue == 0) {
-        throw new EvaluationException(
-            CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE);
-      }
-    } else if (rightOperand is DynamicState) {
-      return IntState.UNKNOWN_VALUE;
-    }
-    return IntState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState lessThan(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  BoolState lessThanOrEqual(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
-  NumState minus(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return UNKNOWN_VALUE;
-  }
-
-  @override
-  NumState negated() => UNKNOWN_VALUE;
-
-  @override
-  NumState remainder(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return UNKNOWN_VALUE;
-  }
-
-  @override
-  NumState times(InstanceState rightOperand) {
-    assertNumOrNull(rightOperand);
-    return UNKNOWN_VALUE;
-  }
-
-  @override
-  String toString() => "-unknown-";
-}
-
-/**
- * An object used to add reference information for a given variable to the
- * bi-directional mapping used to order the evaluation of constants.
- */
-class ReferenceFinder extends RecursiveAstVisitor<Object> {
-  /**
-   * The callback which should be used to report any dependencies that were
-   * found.
-   */
-  final ReferenceFinderCallback _callback;
-
-  /**
-   * Initialize a newly created reference finder to find references from a given
-   * variable to other variables and to add those references to the given graph.
-   * The [_callback] will be invoked for every dependency found.
-   */
-  ReferenceFinder(this._callback);
-
-  @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
-    if (node.isConst) {
-      ConstructorElement constructor = _getConstructorImpl(node.staticElement);
-      if (constructor != null) {
-        _callback(constructor);
-      }
-    }
-    return super.visitInstanceCreationExpression(node);
-  }
-
-  @override
-  Object visitLabel(Label node) {
-    // We are visiting the "label" part of a named expression in a function
-    // call (presumably a constructor call), e.g. "const C(label: ...)".  We
-    // don't want to visit the SimpleIdentifier for the label because that's a
-    // reference to a function parameter that needs to be filled in; it's not a
-    // constant whose value we depend on.
-    return null;
-  }
-
-  @override
-  Object visitRedirectingConstructorInvocation(
-      RedirectingConstructorInvocation node) {
-    super.visitRedirectingConstructorInvocation(node);
-    ConstructorElement target = _getConstructorImpl(node.staticElement);
-    if (target != null) {
-      _callback(target);
-    }
-    return null;
-  }
-
-  @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
-    Element element = node.staticElement;
-    if (element is PropertyAccessorElement) {
-      element = (element as PropertyAccessorElement).variable;
-    }
-    if (element is VariableElement && element.isConst) {
-      _callback(element);
-    }
-    return null;
-  }
-
-  @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
-    super.visitSuperConstructorInvocation(node);
-    ConstructorElement constructor = _getConstructorImpl(node.staticElement);
-    if (constructor != null) {
-      _callback(constructor);
-    }
-    return null;
-  }
-}
-
-/**
- * The state of an object representing a string.
- */
-class StringState extends InstanceState {
-  /**
-   * A state that can be used to represent a double whose value is not known.
-   */
-  static StringState UNKNOWN_VALUE = new StringState(null);
-
-  /**
-   * The value of this instance.
-   */
-  final String value;
-
-  /**
-   * Initialize a newly created state to represent the given [value].
-   */
-  StringState(this.value);
-
-  @override
-  int get hashCode => value == null ? 0 : value.hashCode;
-
-  @override
-  bool get isBoolNumStringOrNull => true;
-
-  @override
-  bool get isUnknown => value == null;
-
-  @override
-  String get typeName => "String";
-
-  @override
-  bool operator ==(Object object) =>
-      object is StringState && (value == object.value);
-
-  @override
-  StringState concatenate(InstanceState rightOperand) {
-    if (value == null) {
-      return UNKNOWN_VALUE;
-    }
-    if (rightOperand is StringState) {
-      String rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return UNKNOWN_VALUE;
-      }
-      return new StringState("$value$rightValue");
-    } else if (rightOperand is DynamicState) {
-      return UNKNOWN_VALUE;
-    }
-    return super.concatenate(rightOperand);
-  }
-
-  @override
-  StringState convertToString() => this;
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is StringState) {
-      String rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value == rightValue);
-    } else if (rightOperand is DynamicState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.FALSE_STATE;
-  }
-
-  @override
-  IntState stringLength() {
-    if (value == null) {
-      return IntState.UNKNOWN_VALUE;
-    }
-    return new IntState(value.length);
-  }
-
-  @override
-  String toString() => value == null ? "-unknown-" : "'$value'";
-}
-
-/**
- * The state of an object representing a symbol.
- */
-class SymbolState extends InstanceState {
-  /**
-   * The value of this instance.
-   */
-  final String value;
-
-  /**
-   * Initialize a newly created state to represent the given [value].
-   */
-  SymbolState(this.value);
-
-  @override
-  int get hashCode => value == null ? 0 : value.hashCode;
-
-  @override
-  String get typeName => "Symbol";
-
-  @override
-  bool operator ==(Object object) =>
-      object is SymbolState && (value == object.value);
-
-  @override
-  StringState convertToString() {
-    if (value == null) {
-      return StringState.UNKNOWN_VALUE;
-    }
-    return new StringState(value);
-  }
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (value == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is SymbolState) {
-      String rightValue = rightOperand.value;
-      if (rightValue == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(value == rightValue);
-    } else if (rightOperand is DynamicState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.FALSE_STATE;
-  }
-
-  @override
-  String toString() => value == null ? "-unknown-" : "#$value";
-}
-
-/**
- * The state of an object representing a type.
- */
-class TypeState extends InstanceState {
-  /**
-   * The element representing the type being modeled.
-   */
-  final Element _element;
-
-  /**
-   * Initialize a newly created state to represent the given [value].
-   */
-  TypeState(this._element);
-
-  @override
-  int get hashCode => _element == null ? 0 : _element.hashCode;
-
-  @override
-  String get typeName => "Type";
-
-  @override
-  bool operator ==(Object object) =>
-      object is TypeState && (_element == object._element);
-
-  @override
-  StringState convertToString() {
-    if (_element == null) {
-      return StringState.UNKNOWN_VALUE;
-    }
-    return new StringState(_element.name);
-  }
-
-  @override
-  BoolState equalEqual(InstanceState rightOperand) {
-    assertBoolNumStringOrNull(rightOperand);
-    return isIdentical(rightOperand);
-  }
-
-  @override
-  BoolState isIdentical(InstanceState rightOperand) {
-    if (_element == null) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    if (rightOperand is TypeState) {
-      Element rightElement = rightOperand._element;
-      if (rightElement == null) {
-        return BoolState.UNKNOWN_VALUE;
-      }
-      return BoolState.from(_element == rightElement);
-    } else if (rightOperand is DynamicState) {
-      return BoolState.UNKNOWN_VALUE;
-    }
-    return BoolState.FALSE_STATE;
-  }
-
-  @override
-  String toString() => _element == null ? "-unknown-" : _element.name;
-}
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 4ff96d5..5518d7c 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -13,6 +13,7 @@
  * contact the analyzer team to either find an alternate API or have the API you
  * depend on added to the public API.
  */
+@deprecated
 library analyzer.src.generated.element;
 
 export 'package:analyzer/dart/element/element.dart';
diff --git a/pkg/analyzer/lib/src/generated/element_handle.dart b/pkg/analyzer/lib/src/generated/element_handle.dart
index 9ed587f..115c44d 100644
--- a/pkg/analyzer/lib/src/generated/element_handle.dart
+++ b/pkg/analyzer/lib/src/generated/element_handle.dart
@@ -2,1101 +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.
 
+@deprecated
 library analyzer.src.generated.element_handle;
 
-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/generated/constant.dart';
-import 'package:analyzer/src/generated/engine.dart';
-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';
-
-/**
- * Instances of the class `ClassElementHandle` implement a handle to a `ClassElement`.
- */
-class ClassElementHandle extends ElementHandle implements ClassElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  ClassElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  List<PropertyAccessorElement> get accessors => actualElement.accessors;
-
-  @override
-  ClassElement get actualElement => super.actualElement as ClassElement;
-
-  @override
-  List<InterfaceType> get allSupertypes => actualElement.allSupertypes;
-
-  @override
-  List<ConstructorElement> get constructors => actualElement.constructors;
-
-  @override
-  List<FieldElement> get fields => actualElement.fields;
-
-  @override
-  bool get hasNonFinalField => actualElement.hasNonFinalField;
-
-  @override
-  bool get hasReferenceToSuper => actualElement.hasReferenceToSuper;
-
-  @override
-  bool get hasStaticMember => actualElement.hasStaticMember;
-
-  @override
-  List<InterfaceType> get interfaces => actualElement.interfaces;
-
-  @override
-  bool get isAbstract => actualElement.isAbstract;
-
-  @override
-  bool get isEnum => actualElement.isEnum;
-
-  @override
-  bool get isMixinApplication => actualElement.isMixinApplication;
-
-  @override
-  bool get isOrInheritsProxy => actualElement.isOrInheritsProxy;
-
-  @override
-  bool get isProxy => actualElement.isProxy;
-
-  @override
-  bool get isValidMixin => actualElement.isValidMixin;
-
-  @override
-  ElementKind get kind => ElementKind.CLASS;
-
-  @override
-  List<MethodElement> get methods => actualElement.methods;
-
-  @override
-  List<InterfaceType> get mixins => actualElement.mixins;
-
-  @override
-  InterfaceType get supertype => actualElement.supertype;
-
-  @override
-  InterfaceType get type => actualElement.type;
-
-  @override
-  List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
-
-  @override
-  ConstructorElement get unnamedConstructor => actualElement.unnamedConstructor;
-
-  @override
-  FieldElement getField(String fieldName) => actualElement.getField(fieldName);
-
-  @override
-  PropertyAccessorElement getGetter(String getterName) =>
-      actualElement.getGetter(getterName);
-
-  @override
-  MethodElement getMethod(String methodName) =>
-      actualElement.getMethod(methodName);
-
-  @override
-  ConstructorElement getNamedConstructor(String name) =>
-      actualElement.getNamedConstructor(name);
-
-  @override
-  PropertyAccessorElement getSetter(String setterName) =>
-      actualElement.getSetter(setterName);
-
-  @override
-  bool isSuperConstructorAccessible(ConstructorElement constructor) =>
-      actualElement.isSuperConstructorAccessible(constructor);
-
-  @override
-  MethodElement lookUpConcreteMethod(
-          String methodName, LibraryElement library) =>
-      actualElement.lookUpConcreteMethod(methodName, library);
-
-  @override
-  PropertyAccessorElement lookUpGetter(
-          String getterName, LibraryElement library) =>
-      actualElement.lookUpGetter(getterName, library);
-
-  @override
-  PropertyAccessorElement lookUpInheritedConcreteGetter(
-          String methodName, LibraryElement library) =>
-      actualElement.lookUpInheritedConcreteGetter(methodName, library);
-
-  @override
-  MethodElement lookUpInheritedConcreteMethod(
-          String methodName, LibraryElement library) =>
-      actualElement.lookUpInheritedConcreteMethod(methodName, library);
-
-  @override
-  PropertyAccessorElement lookUpInheritedConcreteSetter(
-          String methodName, LibraryElement library) =>
-      actualElement.lookUpInheritedConcreteSetter(methodName, library);
-
-  @override
-  MethodElement lookUpInheritedMethod(
-          String methodName, LibraryElement library) =>
-      actualElement.lookUpInheritedMethod(methodName, library);
-
-  @override
-  MethodElement lookUpMethod(String methodName, LibraryElement library) =>
-      actualElement.lookUpMethod(methodName, library);
-
-  @override
-  PropertyAccessorElement lookUpSetter(
-          String setterName, LibraryElement library) =>
-      actualElement.lookUpSetter(setterName, library);
-}
-
-/**
- * Instances of the class `CompilationUnitElementHandle` implements a handle to a
- * [CompilationUnitElement].
- */
-class CompilationUnitElementHandle extends ElementHandle
-    implements CompilationUnitElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  CompilationUnitElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  List<PropertyAccessorElement> get accessors => actualElement.accessors;
-
-  @override
-  CompilationUnitElement get actualElement =>
-      super.actualElement as CompilationUnitElement;
-
-  @override
-  LibraryElement get enclosingElement =>
-      super.enclosingElement as LibraryElement;
-
-  @override
-  List<ClassElement> get enums => actualElement.enums;
-
-  @override
-  List<FunctionElement> get functions => actualElement.functions;
-
-  @override
-  List<FunctionTypeAliasElement> get functionTypeAliases =>
-      actualElement.functionTypeAliases;
-
-  @override
-  bool get hasLoadLibraryFunction => actualElement.hasLoadLibraryFunction;
-
-  @override
-  ElementKind get kind => ElementKind.COMPILATION_UNIT;
-
-  @override
-  Source get source => actualElement.source;
-
-  @override
-  List<TopLevelVariableElement> get topLevelVariables =>
-      actualElement.topLevelVariables;
-
-  @override
-  List<ClassElement> get types => actualElement.types;
-
-  @override
-  String get uri => actualElement.uri;
-
-  @override
-  int get uriEnd => actualElement.uriEnd;
-
-  @override
-  int get uriOffset => actualElement.uriOffset;
-
-  @override
-  CompilationUnit computeNode() => actualElement.computeNode();
-
-  @override
-  Element getElementAt(int offset) {
-    return actualElement.getElementAt(offset);
-  }
-
-  @override
-  ClassElement getEnum(String enumName) => actualElement.getEnum(enumName);
-
-  @override
-  ClassElement getType(String className) => actualElement.getType(className);
-}
-
-/**
- * Instances of the class `ConstructorElementHandle` implement a handle to a
- * `ConstructorElement`.
- */
-class ConstructorElementHandle extends ExecutableElementHandle
-    implements ConstructorElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  ConstructorElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  ConstructorElement get actualElement =>
-      super.actualElement as ConstructorElement;
-
-  @override
-  ClassElement get enclosingElement => actualElement.enclosingElement;
-
-  @override
-  bool get isConst => actualElement.isConst;
-
-  @override
-  bool get isDefaultConstructor => actualElement.isDefaultConstructor;
-
-  @override
-  bool get isFactory => actualElement.isFactory;
-
-  @override
-  ElementKind get kind => ElementKind.CONSTRUCTOR;
-
-  @override
-  int get nameEnd => actualElement.nameEnd;
-
-  @override
-  int get periodOffset => actualElement.periodOffset;
-
-  @override
-  ConstructorElement get redirectedConstructor =>
-      actualElement.redirectedConstructor;
-
-  @override
-  ConstructorDeclaration computeNode() => actualElement.computeNode();
-}
-
-/**
- * The abstract class `ElementHandle` implements the behavior common to objects that implement
- * a handle to an [Element].
- */
-abstract class ElementHandle implements Element {
-  /**
-   * The unique integer identifier of this element.
-   */
-  final int id = 0;
-
-  /**
-   * The [ElementResynthesizer] which will be used to resynthesize elements on
-   * demand.
-   */
-  final ElementResynthesizer _resynthesizer;
-
-  /**
-   * The location of this element, used to reconstitute the element if it has been garbage
-   * collected.
-   */
-  final ElementLocation _location;
-
-  /**
-   * A reference to the element being referenced by this handle, or `null` if the element has
-   * been garbage collected.
-   */
-  Element _elementReference;
-
-  /**
-   * Initialize a newly created element handle to represent the element at the
-   * given [_location].  [_resynthesizer] will be used to resynthesize the
-   * element when needed.
-   */
-  ElementHandle(this._resynthesizer, this._location);
-
-  /**
-   * Return the element being represented by this handle, reconstituting the element if the
-   * reference has been set to `null`.
-   *
-   * @return the element being represented by this handle
-   */
-  Element get actualElement {
-    if (_elementReference == null) {
-      _elementReference = _resynthesizer.getElement(_location);
-    }
-    return _elementReference;
-  }
-
-  @override
-  AnalysisContext get context => _resynthesizer.context;
-
-  @override
-  String get displayName => actualElement.displayName;
-
-  @deprecated
-  @override
-  SourceRange get docRange => actualElement.docRange;
-
-  @override
-  String get documentationComment => actualElement.documentationComment;
-
-  @override
-  Element get enclosingElement => actualElement.enclosingElement;
-
-  @override
-  int get hashCode => _location.hashCode;
-
-  @override
-  bool get isDeprecated => actualElement.isDeprecated;
-
-  @override
-  bool get isOverride => actualElement.isOverride;
-
-  @override
-  bool get isPrivate => actualElement.isPrivate;
-
-  @override
-  bool get isProtected => actualElement.isProtected;
-
-  @override
-  bool get isPublic => actualElement.isPublic;
-
-  @override
-  bool get isSynthetic => actualElement.isSynthetic;
-
-  @override
-  LibraryElement get library =>
-      getAncestor((element) => element is LibraryElement);
-
-  @override
-  ElementLocation get location => _location;
-
-  @override
-  List<ElementAnnotation> get metadata => actualElement.metadata;
-
-  @override
-  String get name => actualElement.name;
-
-  @override
-  int get nameLength => actualElement.nameLength;
-
-  @override
-  int get nameOffset => actualElement.nameOffset;
-
-  @override
-  Source get source => actualElement.source;
-
-  @override
-  CompilationUnit get unit => actualElement.unit;
-
-  @override
-  bool operator ==(Object object) =>
-      object is Element && object.location == _location;
-
-  @override
-  accept(ElementVisitor visitor) => actualElement.accept(visitor);
-
-  @override
-  String computeDocumentationComment() => documentationComment;
-
-  @override
-  AstNode computeNode() => actualElement.computeNode();
-
-  @override
-  Element getAncestor(Predicate<Element> predicate) =>
-      actualElement.getAncestor(predicate);
-
-  @override
-  String getExtendedDisplayName(String shortName) =>
-      actualElement.getExtendedDisplayName(shortName);
-
-  @override
-  bool isAccessibleIn(LibraryElement library) =>
-      actualElement.isAccessibleIn(library);
-
-  @override
-  void visitChildren(ElementVisitor visitor) {
-    actualElement.visitChildren(visitor);
-  }
-}
-
-/**
- * Interface which allows an [Element] handle to be resynthesized based on an
- * [ElementLocation].  The concrete classes implementing element handles use
- * this interface to retrieve the underlying elements when queried.
- */
-abstract class ElementResynthesizer {
-  final AnalysisContext context;
-
-  ElementResynthesizer(this.context);
-
-  Element getElement(ElementLocation location);
-}
-
-/**
- * The abstract class `ExecutableElementHandle` implements the behavior common to objects that
- * implement a handle to an [ExecutableElement].
- */
-abstract class ExecutableElementHandle extends ElementHandle
-    implements ExecutableElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  ExecutableElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  ExecutableElement get actualElement =>
-      super.actualElement as ExecutableElement;
-
-  @override
-  List<FunctionElement> get functions => actualElement.functions;
-
-  @override
-  bool get hasImplicitReturnType => actualElement.hasImplicitReturnType;
-
-  @override
-  bool get isAbstract => actualElement.isAbstract;
-
-  @override
-  bool get isAsynchronous => actualElement.isAsynchronous;
-
-  @override
-  bool get isExternal => actualElement.isExternal;
-
-  @override
-  bool get isGenerator => actualElement.isGenerator;
-
-  @override
-  bool get isOperator => actualElement.isOperator;
-
-  @override
-  bool get isStatic => actualElement.isStatic;
-
-  @override
-  bool get isSynchronous => actualElement.isSynchronous;
-
-  @override
-  List<LabelElement> get labels => actualElement.labels;
-
-  @override
-  List<LocalVariableElement> get localVariables => actualElement.localVariables;
-
-  @override
-  List<ParameterElement> get parameters => actualElement.parameters;
-
-  @override
-  DartType get returnType => actualElement.returnType;
-
-  @override
-  FunctionType get type => actualElement.type;
-
-  @override
-  List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
-}
-
-/**
- * Instances of the class `ExportElementHandle` implement a handle to an `ExportElement`
- * .
- */
-class ExportElementHandle extends ElementHandle implements ExportElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  ExportElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  ExportElement get actualElement => super.actualElement as ExportElement;
-
-  @override
-  List<NamespaceCombinator> get combinators => actualElement.combinators;
-
-  @override
-  LibraryElement get exportedLibrary => actualElement.exportedLibrary;
-
-  @override
-  ElementKind get kind => ElementKind.EXPORT;
-
-  @override
-  String get uri => actualElement.uri;
-
-  @override
-  int get uriEnd => actualElement.uriEnd;
-
-  @override
-  int get uriOffset => actualElement.uriOffset;
-}
-
-/**
- * Instances of the class `FieldElementHandle` implement a handle to a `FieldElement`.
- */
-class FieldElementHandle extends PropertyInducingElementHandle
-    implements FieldElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  FieldElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  FieldElement get actualElement => super.actualElement as FieldElement;
-
-  @override
-  ClassElement get enclosingElement => actualElement.enclosingElement;
-
-  @override
-  bool get isEnumConstant => actualElement.isEnumConstant;
-
-  @override
-  ElementKind get kind => ElementKind.FIELD;
-
-  @override
-  VariableDeclaration computeNode() => actualElement.computeNode();
-}
-
-/**
- * Instances of the class `FunctionElementHandle` implement a handle to a
- * `FunctionElement`.
- */
-class FunctionElementHandle extends ExecutableElementHandle
-    implements FunctionElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  FunctionElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  FunctionElement get actualElement => super.actualElement as FunctionElement;
-
-  @override
-  bool get isEntryPoint => actualElement.isEntryPoint;
-
-  @override
-  ElementKind get kind => ElementKind.FUNCTION;
-
-  @override
-  SourceRange get visibleRange => actualElement.visibleRange;
-
-  @override
-  FunctionDeclaration computeNode() => actualElement.computeNode();
-}
-
-/**
- * Instances of the class `FunctionTypeAliasElementHandle` implement a handle to a
- * `FunctionTypeAliasElement`.
- */
-class FunctionTypeAliasElementHandle extends ElementHandle
-    implements FunctionTypeAliasElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  FunctionTypeAliasElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  FunctionTypeAliasElement get actualElement =>
-      super.actualElement as FunctionTypeAliasElement;
-
-  @override
-  CompilationUnitElement get enclosingElement =>
-      super.enclosingElement as CompilationUnitElement;
-
-  @override
-  ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS;
-
-  @override
-  List<ParameterElement> get parameters => actualElement.parameters;
-
-  @override
-  DartType get returnType => actualElement.returnType;
-
-  @override
-  FunctionType get type => actualElement.type;
-
-  @override
-  List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
-
-  @override
-  FunctionTypeAlias computeNode() => actualElement.computeNode();
-}
-
-/**
- * Instances of the class `ImportElementHandle` implement a handle to an `ImportElement`
- * .
- */
-class ImportElementHandle extends ElementHandle implements ImportElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  ImportElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  ImportElement get actualElement => super.actualElement as ImportElement;
-
-  @override
-  List<NamespaceCombinator> get combinators => actualElement.combinators;
-
-  @override
-  LibraryElement get importedLibrary => actualElement.importedLibrary;
-
-  @override
-  bool get isDeferred => actualElement.isDeferred;
-
-  @override
-  ElementKind get kind => ElementKind.IMPORT;
-
-  @override
-  PrefixElement get prefix => actualElement.prefix;
-
-  @override
-  int get prefixOffset => actualElement.prefixOffset;
-
-  @override
-  String get uri => actualElement.uri;
-
-  @override
-  int get uriEnd => actualElement.uriEnd;
-
-  @override
-  int get uriOffset => actualElement.uriOffset;
-}
-
-/**
- * Instances of the class `LabelElementHandle` implement a handle to a `LabelElement`.
- */
-class LabelElementHandle extends ElementHandle implements LabelElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  LabelElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  ExecutableElement get enclosingElement =>
-      super.enclosingElement as ExecutableElement;
-
-  @override
-  ElementKind get kind => ElementKind.LABEL;
-}
-
-/**
- * Instances of the class `LibraryElementHandle` implement a handle to a
- * `LibraryElement`.
- */
-class LibraryElementHandle extends ElementHandle implements LibraryElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  LibraryElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  LibraryElement get actualElement => super.actualElement as LibraryElement;
-
-  @override
-  CompilationUnitElement get definingCompilationUnit =>
-      actualElement.definingCompilationUnit;
-
-  @override
-  FunctionElement get entryPoint => actualElement.entryPoint;
-
-  @override
-  List<LibraryElement> get exportedLibraries => actualElement.exportedLibraries;
-
-  @override
-  Namespace get exportNamespace => actualElement.exportNamespace;
-
-  @override
-  List<ExportElement> get exports => actualElement.exports;
-
-  @override
-  bool get hasExtUri => actualElement.hasExtUri;
-
-  @override
-  bool get hasLoadLibraryFunction => actualElement.hasLoadLibraryFunction;
-
-  @override
-  String get identifier => location.components.last;
-
-  @override
-  List<LibraryElement> get importedLibraries => actualElement.importedLibraries;
-
-  @override
-  List<ImportElement> get imports => actualElement.imports;
-
-  @override
-  bool get isBrowserApplication => actualElement.isBrowserApplication;
-
-  @override
-  bool get isDartAsync => actualElement.isDartAsync;
-
-  @override
-  bool get isDartCore => actualElement.isDartCore;
-
-  @override
-  bool get isInSdk => actualElement.isInSdk;
-
-  @override
-  ElementKind get kind => ElementKind.LIBRARY;
-
-  @override
-  List<LibraryElement> get libraryCycle => actualElement.libraryCycle;
-
-  @override
-  FunctionElement get loadLibraryFunction => actualElement.loadLibraryFunction;
-
-  @override
-  List<CompilationUnitElement> get parts => actualElement.parts;
-
-  @override
-  List<PrefixElement> get prefixes => actualElement.prefixes;
-
-  @override
-  Namespace get publicNamespace => actualElement.publicNamespace;
-
-  @override
-  List<CompilationUnitElement> get units => actualElement.units;
-
-  @override
-  List<LibraryElement> get visibleLibraries => actualElement.visibleLibraries;
-
-  @override
-  List<ImportElement> getImportsWithPrefix(PrefixElement prefixElement) =>
-      actualElement.getImportsWithPrefix(prefixElement);
-
-  @override
-  ClassElement getType(String className) => actualElement.getType(className);
-
-  @override
-  bool isUpToDate(int timeStamp) => actualElement.isUpToDate(timeStamp);
-}
-
-/**
- * Instances of the class `LocalVariableElementHandle` implement a handle to a
- * `LocalVariableElement`.
- */
-class LocalVariableElementHandle extends VariableElementHandle
-    implements LocalVariableElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  LocalVariableElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  LocalVariableElement get actualElement =>
-      super.actualElement as LocalVariableElement;
-
-  @override
-  ElementKind get kind => ElementKind.LOCAL_VARIABLE;
-
-  @override
-  SourceRange get visibleRange => actualElement.visibleRange;
-
-  @override
-  VariableDeclaration computeNode() => actualElement.computeNode();
-}
-
-/**
- * Instances of the class `MethodElementHandle` implement a handle to a `MethodElement`.
- */
-class MethodElementHandle extends ExecutableElementHandle
-    implements MethodElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  MethodElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  MethodElement get actualElement => super.actualElement as MethodElement;
-
-  @override
-  ClassElement get enclosingElement => super.enclosingElement as ClassElement;
-
-  @override
-  bool get isStatic => actualElement.isStatic;
-
-  @override
-  ElementKind get kind => ElementKind.METHOD;
-
-  @override
-  MethodDeclaration computeNode() => actualElement.computeNode();
-}
-
-/**
- * Instances of the class `ParameterElementHandle` implement a handle to a
- * `ParameterElement`.
- */
-class ParameterElementHandle extends VariableElementHandle
-    with ParameterElementMixin
-    implements ParameterElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  ParameterElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  ParameterElement get actualElement => super.actualElement as ParameterElement;
-
-  @override
-  String get defaultValueCode => actualElement.defaultValueCode;
-
-  @override
-  bool get isInitializingFormal => actualElement.isInitializingFormal;
-
-  @override
-  ElementKind get kind => ElementKind.PARAMETER;
-
-  @override
-  ParameterKind get parameterKind => actualElement.parameterKind;
-
-  @override
-  List<ParameterElement> get parameters => actualElement.parameters;
-
-  @override
-  List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
-
-  @override
-  SourceRange get visibleRange => actualElement.visibleRange;
-}
-
-/**
- * Instances of the class `PrefixElementHandle` implement a handle to a `PrefixElement`.
- */
-class PrefixElementHandle extends ElementHandle implements PrefixElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  PrefixElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  PrefixElement get actualElement => super.actualElement as PrefixElement;
-
-  @override
-  LibraryElement get enclosingElement =>
-      super.enclosingElement as LibraryElement;
-
-  @override
-  List<LibraryElement> get importedLibraries => LibraryElement.EMPTY_LIST;
-
-  @override
-  ElementKind get kind => ElementKind.PREFIX;
-}
-
-/**
- * Instances of the class `PropertyAccessorElementHandle` implement a handle to a
- * `PropertyAccessorElement`.
- */
-class PropertyAccessorElementHandle extends ExecutableElementHandle
-    implements PropertyAccessorElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  PropertyAccessorElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  PropertyAccessorElement get actualElement =>
-      super.actualElement as PropertyAccessorElement;
-
-  @override
-  PropertyAccessorElement get correspondingGetter =>
-      actualElement.correspondingGetter;
-
-  @override
-  PropertyAccessorElement get correspondingSetter =>
-      actualElement.correspondingSetter;
-
-  @override
-  bool get isGetter => actualElement.isGetter;
-
-  @override
-  bool get isSetter => actualElement.isSetter;
-
-  @override
-  ElementKind get kind {
-    if (isGetter) {
-      return ElementKind.GETTER;
-    } else {
-      return ElementKind.SETTER;
-    }
-  }
-
-  @override
-  PropertyInducingElement get variable => actualElement.variable;
-}
-
-/**
- * The abstract class `PropertyInducingElementHandle` implements the behavior common to
- * objects that implement a handle to an `PropertyInducingElement`.
- */
-abstract class PropertyInducingElementHandle extends VariableElementHandle
-    implements PropertyInducingElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  PropertyInducingElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  PropertyInducingElement get actualElement =>
-      super.actualElement as PropertyInducingElement;
-
-  @override
-  PropertyAccessorElement get getter => actualElement.getter;
-
-  @override
-  DartType get propagatedType => actualElement.propagatedType;
-
-  @override
-  PropertyAccessorElement get setter => actualElement.setter;
-}
-
-/**
- * Instances of the class `TopLevelVariableElementHandle` implement a handle to a
- * `TopLevelVariableElement`.
- */
-class TopLevelVariableElementHandle extends PropertyInducingElementHandle
-    implements TopLevelVariableElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  TopLevelVariableElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE;
-}
-
-/**
- * Instances of the class `TypeParameterElementHandle` implement a handle to a
- * [TypeParameterElement].
- */
-class TypeParameterElementHandle extends ElementHandle
-    implements TypeParameterElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  TypeParameterElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  TypeParameterElement get actualElement =>
-      super.actualElement as TypeParameterElement;
-
-  @override
-  DartType get bound => actualElement.bound;
-
-  @override
-  ElementKind get kind => ElementKind.TYPE_PARAMETER;
-
-  @override
-  TypeParameterType get type => actualElement.type;
-}
-
-/**
- * The abstract class `VariableElementHandle` implements the behavior common to objects that
- * implement a handle to an `VariableElement`.
- */
-abstract class VariableElementHandle extends ElementHandle
-    implements VariableElement {
-  /**
-   * Initialize a newly created element handle to represent the given element.
-   *
-   * @param element the element being represented
-   */
-  VariableElementHandle(
-      ElementResynthesizer resynthesizer, ElementLocation location)
-      : super(resynthesizer, location);
-
-  @override
-  VariableElement get actualElement => super.actualElement as VariableElement;
-
-  @override
-  DartObject get constantValue => actualElement.constantValue;
-
-  @override
-  bool get hasImplicitType => actualElement.hasImplicitType;
-
-  @override
-  FunctionElement get initializer => actualElement.initializer;
-
-  @override
-  bool get isConst => actualElement.isConst;
-
-  @override
-  bool get isFinal => actualElement.isFinal;
-
-  @override
-  bool get isPotentiallyMutatedInClosure =>
-      actualElement.isPotentiallyMutatedInClosure;
-
-  @override
-  bool get isPotentiallyMutatedInScope =>
-      actualElement.isPotentiallyMutatedInScope;
-
-  @override
-  bool get isStatic => actualElement.isStatic;
-
-  @override
-  DartType get type => actualElement.type;
-}
+export 'package:analyzer/src/dart/element/handle.dart';
 
 /**
  * TODO(scheglov) invalid implementation
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index a9a3881..e8591ae 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -631,7 +631,7 @@
       // does not apply to conditional method invocation (i.e. 'C?.m(...)').
       //
       bool isConditional = node.operator.type == TokenType.QUESTION_PERIOD;
-      ClassElementImpl typeReference = getTypeReference(target);
+      ClassElement typeReference = getTypeReference(target);
       if (typeReference != null) {
         if (node.isCascaded) {
           typeReference = _typeType.element;
@@ -783,7 +783,7 @@
           return null;
         }
         if (!node.isCascaded) {
-          ClassElementImpl typeReference = getTypeReference(target);
+          ClassElement typeReference = getTypeReference(target);
           if (typeReference != null) {
             ConstructorElement constructor =
                 typeReference.getNamedConstructor(methodName.name);
@@ -1118,7 +1118,8 @@
 
   @override
   Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
-    ClassElementImpl enclosingClass = _resolver.enclosingClass;
+    ClassElementImpl enclosingClass =
+        ClassElementImpl.getImpl(_resolver.enclosingClass);
     if (enclosingClass == null) {
       // TODO(brianwilkerson) Report this error.
       return null;
@@ -2252,7 +2253,7 @@
     // hierarchy, instead we just look for the member in the type only.  This
     // does not apply to conditional property accesses (i.e. 'C?.m').
     //
-    ClassElementImpl typeReference = getTypeReference(target);
+    ClassElement typeReference = getTypeReference(target);
     if (typeReference != null) {
       if (isCascaded) {
         typeReference = _typeType.element;
@@ -2441,10 +2442,10 @@
    * then the element representing the class is returned, otherwise `null` is
    * returned.
    */
-  static ClassElementImpl getTypeReference(Expression expression) {
+  static ClassElement getTypeReference(Expression expression) {
     if (expression is Identifier) {
       Element staticElement = expression.staticElement;
-      if (staticElement is ClassElementImpl) {
+      if (staticElement is ClassElement) {
         return staticElement;
       }
     }
@@ -2586,7 +2587,7 @@
   Element get staticElement => null;
 
   @override
-  accept(AstVisitor visitor) => null;
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null;
 
   @override
   void visitChildren(AstVisitor visitor) {}
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 57d35d9..96333ad 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -346,7 +346,7 @@
    *
    * See [setConfigurationData].
    */
-  Object getConfigurationData(ResultDescriptor key);
+  Object/*=V*/ getConfigurationData/*<V>*/(ResultDescriptor/*<V>*/ key);
 
   /**
    * Return the contents and timestamp of the given [source].
@@ -514,9 +514,16 @@
   bool isServerLibrary(Source librarySource);
 
   /**
+   * Return the stream that is notified when a result with the given
+   * [descriptor] is changed, e.g. computed or invalidated.
+   */
+  Stream<ResultChangedEvent> onResultChanged(ResultDescriptor descriptor);
+
+  /**
    * Return the stream that is notified when a new value for the given
    * [descriptor] is computed.
    */
+  @deprecated
   Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor);
 
   /**
@@ -545,7 +552,7 @@
    * analysis results. This method can be long running.
    *
    * The implementation that uses the task model notifies subscribers of
-   * [onResultComputed] about computed results.
+   * [onResultChanged] about computed results.
    *
    * The following results are computed for Dart sources.
    *
@@ -1055,6 +1062,7 @@
   /**
    * Return `true` to enable interface libraries (DEP 40).
    */
+  @deprecated
   bool get enableConditionalDirectives;
 
   /**
@@ -1075,6 +1083,11 @@
   bool get enableSuperMixins;
 
   /**
+   * Return `true` if timing data should be gathered during execution.
+   */
+  bool get enableTiming;
+
+  /**
    * Return `true` if errors, warnings and hints should be generated for sources
    * that are implicitly being analyzed. The default value is `true`.
    */
@@ -1189,7 +1202,10 @@
   /**
    * A flag indicating whether interface libraries are to be supported (DEP 40).
    */
-  bool enableConditionalDirectives = false;
+  bool get enableConditionalDirectives => true;
+
+  @deprecated
+  void set enableConditionalDirectives(_) {}
 
   /**
    * A flag indicating whether generic methods are to be supported (DEP 22).
@@ -1208,6 +1224,9 @@
    */
   bool enableSuperMixins = false;
 
+  @override
+  bool enableTiming = false;
+
   /**
    * A flag indicating whether errors, warnings and hints should be generated
    * for sources that are implicitly being analyzed.
@@ -1285,6 +1304,7 @@
     enableStrictCallChecks = options.enableStrictCallChecks;
     enableGenericMethods = options.enableGenericMethods;
     enableSuperMixins = options.enableSuperMixins;
+    enableTiming = options.enableTiming;
     generateImplicitErrors = options.generateImplicitErrors;
     generateSdkErrors = options.generateSdkErrors;
     hint = options.hint;
@@ -1841,6 +1861,7 @@
 /**
  * [ComputedResult] describes a value computed for a [ResultDescriptor].
  */
+@deprecated
 class ComputedResult<V> {
   /**
    * The context in which the value was computed.
@@ -1865,7 +1886,7 @@
   ComputedResult(this.context, this.descriptor, this.target, this.value);
 
   @override
-  String toString() => '$descriptor of $target in $context';
+  String toString() => 'Computed $descriptor of $target in $context';
 }
 
 /**
@@ -2408,6 +2429,57 @@
 }
 
 /**
+ * [ResultChangedEvent] describes a change to an analysis result.
+ */
+class ResultChangedEvent<V> {
+  /**
+   * The context in which the result was changed.
+   */
+  final AnalysisContext context;
+
+  /**
+   * The target for which the result was changed.
+   */
+  final AnalysisTarget target;
+
+  /**
+   * The descriptor of the result which was changed.
+   */
+  final ResultDescriptor<V> descriptor;
+
+  /**
+   * If the result [wasComputed], the new value of the result. If the result
+   * [wasInvalidated], the value of before it was invalidated, may be the
+   * default value if the result was flushed.
+   */
+  final V value;
+
+  /**
+   * Is `true` if the result was computed, or `false` is is was invalidated.
+   */
+  final bool _wasComputed;
+
+  ResultChangedEvent(this.context, this.target, this.descriptor, this.value,
+      this._wasComputed);
+
+  /**
+   * Returns `true` if the result was computed.
+   */
+  bool get wasComputed => _wasComputed;
+
+  /**
+   * Returns `true` if the result was invalidated.
+   */
+  bool get wasInvalidated => !_wasComputed;
+
+  @override
+  String toString() {
+    String operation = _wasComputed ? 'Computed' : 'Invalidated';
+    return '$operation $descriptor of $target in $context';
+  }
+}
+
+/**
  * [SourcesChangedEvent] indicates which sources have been added, removed,
  * or whose contents have changed.
  */
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 59879fc..f3947b4 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -11,7 +11,9 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/source/error_processor.dart';
+import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode;
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/generated/shared_messages.dart'
     as shared_messages;
 import 'package:analyzer/src/generated/java_core.dart';
@@ -25,7 +27,7 @@
  * The descriptor used to associate error processors with analysis contexts in
  * configuration data.
  */
-final ListResultDescriptor<List<ErrorProcessor>> CONFIGURED_ERROR_PROCESSORS =
+final ListResultDescriptor<ErrorProcessor> CONFIGURED_ERROR_PROCESSORS =
     new ListResultDescriptorImpl('configured.errors', const <ErrorProcessor>[]);
 
 /**
@@ -176,7 +178,7 @@
    * Return the value of the given [property], or `null` if the given property
    * is not defined for this error.
    */
-  Object getProperty(ErrorProperty property) => null;
+  Object/*=V*/ getProperty/*<V>*/(ErrorProperty/*<V>*/ property) => null;
 
   @override
   String toString() {
@@ -255,13 +257,14 @@
       : super(source, offset, length, errorCode, arguments);
 
   @override
-  Object getProperty(ErrorProperty property) => _propertyMap[property];
+  Object/*=V*/ getProperty/*<V>*/(ErrorProperty/*<V>*/ property) =>
+      _propertyMap[property] as Object/*=V*/;
 
   /**
    * Set the value of the given [property] to the given [value]. Using a value
    * of `null` will effectively remove the property from this error.
    */
-  void setProperty(ErrorProperty property, Object value) {
+  void setProperty/*<V>*/(ErrorProperty/*<V>*/ property, Object/*=V*/ value) {
     _propertyMap[property] = value;
   }
 }
@@ -2681,6 +2684,8 @@
     HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION,
     HintCode.INVALID_ASSIGNMENT,
     HintCode.INVALID_USE_OF_PROTECTED_MEMBER,
+    HintCode.MISSING_JS_LIB_ANNOTATION,
+    HintCode.MISSING_REQUIRED_PARAM,
     HintCode.MISSING_RETURN,
     HintCode.NULL_AWARE_IN_CONDITION,
     HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER,
@@ -2703,6 +2708,7 @@
     HintCode.UNUSED_CATCH_CLAUSE,
     HintCode.UNUSED_CATCH_STACK,
     HintCode.UNUSED_LOCAL_VARIABLE,
+    HintCode.UNUSED_SHOWN_NAME,
     HintCode.USE_OF_VOID_RESULT,
     HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
     HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
@@ -2743,6 +2749,8 @@
     StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
     StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
     StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+    StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
+    StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
     StaticWarningCode.AMBIGUOUS_IMPORT,
     StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
     StaticWarningCode.ASSIGNMENT_TO_CONST,
@@ -3057,33 +3065,36 @@
    * The unique name of this error code.
    */
   String get uniqueName => "$runtimeType.$name";
+
+  @override
+  String toString() => uniqueName;
 }
 
 /**
  * The properties that can be associated with an [AnalysisError].
  */
-class ErrorProperty extends Enum<ErrorProperty> {
+class ErrorProperty<V> extends Enum<ErrorProperty> {
   /**
    * A property whose value is a list of [FieldElement]s that are final, but
    * not initialized by a constructor.
    */
-  static const ErrorProperty NOT_INITIALIZED_FIELDS =
-      const ErrorProperty('NOT_INITIALIZED_FIELDS', 0);
+  static const ErrorProperty<List<FieldElement>> NOT_INITIALIZED_FIELDS =
+      const ErrorProperty<List<FieldElement>>('NOT_INITIALIZED_FIELDS', 0);
 
   /**
    * A property whose value is the name of the library that is used by all
    * of the "part of" directives, so should be used in the "library" directive.
    * Is `null` if there is no a single name used by all of the parts.
    */
-  static const ErrorProperty PARTS_LIBRARY_NAME =
-      const ErrorProperty('PARTS_LIBRARY_NAME', 1);
+  static const ErrorProperty<String> PARTS_LIBRARY_NAME =
+      const ErrorProperty<String>('PARTS_LIBRARY_NAME', 1);
 
   /**
    * A property whose value is a list of [ExecutableElement] that should
    * be but are not implemented by a concrete class.
    */
-  static const ErrorProperty UNIMPLEMENTED_METHODS =
-      const ErrorProperty('UNIMPLEMENTED_METHODS', 2);
+  static const ErrorProperty<List<ExecutableElement>> UNIMPLEMENTED_METHODS =
+      const ErrorProperty<List<ExecutableElement>>('UNIMPLEMENTED_METHODS', 2);
 
   static const List<ErrorProperty> values = const [
     NOT_INITIALIZED_FIELDS,
@@ -3237,6 +3248,18 @@
    * clarify the message.
    */
   void _convertTypeNames(List<Object> arguments) {
+    String displayName(DartType type) {
+      if (type is FunctionType) {
+        String name = type.name;
+        if (name != null && name.length > 0) {
+          StringBuffer buffer = new StringBuffer();
+          buffer.write(name);
+          (type as TypeImpl).appendTo(buffer);
+          return buffer.toString();
+        }
+      }
+      return type.displayName;
+    }
     if (_hasEqualTypeNames(arguments)) {
       int count = arguments.length;
       for (int i = 0; i < count; i++) {
@@ -3245,9 +3268,9 @@
           DartType type = argument;
           Element element = type.element;
           if (element == null) {
-            arguments[i] = type.displayName;
+            arguments[i] = displayName(type);
           } else {
-            arguments[i] = element.getExtendedDisplayName(type.displayName);
+            arguments[i] = element.getExtendedDisplayName(displayName(type));
           }
         }
       }
@@ -3256,7 +3279,7 @@
       for (int i = 0; i < count; i++) {
         Object argument = arguments[i];
         if (argument is DartType) {
-          arguments[i] = argument.displayName;
+          arguments[i] = displayName(argument);
         }
       }
     }
@@ -3435,9 +3458,8 @@
    * 0: the name of the actual argument type
    * 1: the name of the expected type
    */
-  static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode(
-      'ARGUMENT_TYPE_NOT_ASSIGNABLE',
-      "The argument type '{0}' cannot be assigned to the parameter type '{1}'");
+  static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE =
+      shared_messages.ARGUMENT_TYPE_NOT_ASSIGNABLE_HINT;
 
   /**
    * When the target expression uses '?.' operator, it can be `null`, so all the
@@ -3554,6 +3576,25 @@
       "The member '{0}' can only be used within instance members of subclasses of '{1}'");
 
   /**
+   * Generate a hint for a constructor, function or method invocation where a
+   * required parameter is missing.
+   *
+   * Parameters:
+   * 0: the name of the parameter
+   * 1: an optional reason
+   */
+  static const HintCode MISSING_REQUIRED_PARAM = const HintCode(
+      'MISSING_REQUIRED_PARAM', "The parameter '{0}' is required. {1}");
+
+   /**
+   * Generate a hint for an element that is annotated with `@JS(...)` whose
+   * library declaration is not similarly annotated.
+   */
+  static const HintCode MISSING_JS_LIB_ANNOTATION = const HintCode(
+      'MISSING_JS_LIB_ANNOTATION',
+      "The @JS() annotation can only be used if it is also declared on the library directive.");
+
+  /**
    * Generate a hint for methods or functions that have a return type, but do
    * not have a non-void return statement on all branches. At the end of methods
    * or functions with no return, Dart implicitly returns `null`, avoiding these
@@ -3568,6 +3609,18 @@
       "Either add a return statement or change the return type to 'void'");
 
   /**
+   * Generate a hint for methods that override methods annotated `@mustCallSuper`
+   * that do not invoke the overridden super method.
+   *
+   * Parameters:
+   * 0: the name of the class declaring the overriden method
+   */
+  static const HintCode MUST_CALL_SUPER = const HintCode(
+      'MUST_CALL_SUPER',
+      "This method overrides a method annotated as @mustCall super in '{0}', "
+      "but does invoke the overriden method");
+
+  /**
    * A condition in a control flow statement could evaluate to `null` because it
    * uses the null-aware '?.' operator.
    */
@@ -3630,8 +3683,8 @@
    * 0: the name of the getter
    * 1: the name of the enclosing type where the getter is being looked for
    */
-  static const HintCode UNDEFINED_GETTER = const HintCode('UNDEFINED_GETTER',
-      "The getter '{0}' is not defined for the class '{1}'");
+  static const HintCode UNDEFINED_GETTER =
+      shared_messages.UNDEFINED_GETTER_HINT;
 
   /**
    * This hint is generated anywhere where the
@@ -3642,8 +3695,8 @@
    * 0: the name of the method that is undefined
    * 1: the resolved type name that the method lookup is happening on
    */
-  static const HintCode UNDEFINED_METHOD = const HintCode('UNDEFINED_METHOD',
-      "The method '{0}' is not defined for the class '{1}'");
+  static const HintCode UNDEFINED_METHOD =
+      shared_messages.UNDEFINED_METHOD_HINT;
 
   /**
    * This hint is generated anywhere where the
@@ -3654,9 +3707,8 @@
    * 0: the name of the operator
    * 1: the name of the enclosing type where the operator is being looked for
    */
-  static const HintCode UNDEFINED_OPERATOR = const HintCode(
-      'UNDEFINED_OPERATOR',
-      "The operator '{0}' is not defined for the class '{1}'");
+  static const HintCode UNDEFINED_OPERATOR =
+      shared_messages.UNDEFINED_OPERATOR_HINT;
 
   /**
    * This hint is generated anywhere where the
@@ -3668,8 +3720,8 @@
    * 0: the name of the setter
    * 1: the name of the enclosing type where the setter is being looked for
    */
-  static const HintCode UNDEFINED_SETTER = const HintCode('UNDEFINED_SETTER',
-      "The setter '{0}' is not defined for the class '{1}'");
+  static const HintCode UNDEFINED_SETTER =
+      shared_messages.UNDEFINED_SETTER_HINT;
 
   /**
    * Unnecessary cast.
@@ -3737,6 +3789,12 @@
       "The value of the local variable '{0}' is not used");
 
   /**
+   * Unused shown names are names shown on imports which are never used.
+   */
+  static const HintCode UNUSED_SHOWN_NAME =
+      const HintCode('UNUSED_SHOWN_NAME', "The name {0} is shown, but not used.");
+
+  /**
    * Hint for cases where the source expects a method or function to return a
    * non-void result, but the method or function signature returns void.
    *
@@ -4125,8 +4183,7 @@
    * 2: the name of the method
    */
   static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE =
-      const StaticTypeWarningCode('RETURN_OF_INVALID_TYPE',
-          "The return type '{0}' is not a '{1}', as defined by the method '{2}'");
+      shared_messages.RETURN_OF_INVALID_TYPE;
 
   /**
    * 12.11 Instance Creation: It is a static type warning if any of the type
@@ -4183,8 +4240,7 @@
    * 1: the name of the enumeration used to access the constant
    */
   static const StaticTypeWarningCode UNDEFINED_ENUM_CONSTANT =
-      const StaticTypeWarningCode('UNDEFINED_ENUM_CONSTANT',
-          "There is no constant named '{0}' in '{1}'");
+      shared_messages.UNDEFINED_ENUM_CONSTANT;
 
   /**
    * 12.15.3 Unqualified Invocation: If there exists a lexically visible
@@ -4199,8 +4255,7 @@
    * 0: the name of the method that is undefined
    */
   static const StaticTypeWarningCode UNDEFINED_FUNCTION =
-      const StaticTypeWarningCode(
-          'UNDEFINED_FUNCTION', "The function '{0}' is not defined");
+      shared_messages.UNDEFINED_FUNCTION;
 
   /**
    * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
@@ -4211,8 +4266,7 @@
    * 1: the name of the enclosing type where the getter is being looked for
    */
   static const StaticTypeWarningCode UNDEFINED_GETTER =
-      const StaticTypeWarningCode('UNDEFINED_GETTER',
-          "The getter '{0}' is not defined for the class '{1}'");
+      shared_messages.UNDEFINED_GETTER_STATIC_TYPE_WARNING;
 
   /**
    * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
@@ -4224,8 +4278,7 @@
    * 1: the resolved type name that the method lookup is happening on
    */
   static const StaticTypeWarningCode UNDEFINED_METHOD =
-      const StaticTypeWarningCode('UNDEFINED_METHOD',
-          "The method '{0}' is not defined for the class '{1}'");
+      shared_messages.UNDEFINED_METHOD_STATIC_TYPE_WARNING;
 
   /**
    * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
@@ -4237,10 +4290,7 @@
    * 1: the resolved type name that the method lookup is happening on
    */
   static const StaticTypeWarningCode UNDEFINED_METHOD_WITH_CONSTRUCTOR =
-      const StaticTypeWarningCode(
-          'UNDEFINED_METHOD_WITH_CONSTRUCTOR',
-          "The method '{0}' is not defined for the class '{1}', but a constructor with that name is defined",
-          "Add 'new' or 'const' to invoke the constuctor, or change the method name.");
+      shared_messages.UNDEFINED_METHOD_WITH_CONSTRUCTOR;
 
   /**
    * 12.18 Assignment: Evaluation of an assignment of the form
@@ -4263,8 +4313,7 @@
    * 1: the name of the enclosing type where the operator is being looked for
    */
   static const StaticTypeWarningCode UNDEFINED_OPERATOR =
-      const StaticTypeWarningCode('UNDEFINED_OPERATOR',
-          "The operator '{0}' is not defined for the class '{1}'");
+      shared_messages.UNDEFINED_OPERATOR_STATIC_TYPE_WARNING;
 
   /**
    * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
@@ -4278,8 +4327,7 @@
    * See [INACCESSIBLE_SETTER].
    */
   static const StaticTypeWarningCode UNDEFINED_SETTER =
-      const StaticTypeWarningCode('UNDEFINED_SETTER',
-          "The setter '{0}' is not defined for the class '{1}'");
+      shared_messages.UNDEFINED_SETTER_STATIC_TYPE_WARNING;
 
   /**
    * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
@@ -4290,8 +4338,7 @@
    * 1: the name of the enclosing type where the getter is being looked for
    */
   static const StaticTypeWarningCode UNDEFINED_SUPER_GETTER =
-      const StaticTypeWarningCode('UNDEFINED_SUPER_GETTER',
-          "The getter '{0}' is not defined in a superclass of '{1}'");
+      shared_messages.UNDEFINED_SUPER_GETTER_STATIC_TYPE_WARNING;
 
   /**
    * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
@@ -4305,8 +4352,7 @@
    * 1: the resolved type name that the method lookup is happening on
    */
   static const StaticTypeWarningCode UNDEFINED_SUPER_METHOD =
-      const StaticTypeWarningCode('UNDEFINED_SUPER_METHOD',
-          "The method '{0}' is not defined in a superclass of '{1}'");
+      shared_messages.UNDEFINED_SUPER_METHOD;
 
   /**
    * 12.18 Assignment: Evaluation of an assignment of the form
@@ -4329,8 +4375,7 @@
    * 1: the name of the enclosing type where the operator is being looked for
    */
   static const StaticTypeWarningCode UNDEFINED_SUPER_OPERATOR =
-      const StaticTypeWarningCode('UNDEFINED_SUPER_OPERATOR',
-          "The operator '{0}' is not defined in a superclass of '{1}'");
+      shared_messages.UNDEFINED_SUPER_OPERATOR;
 
   /**
    * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
@@ -4344,8 +4389,7 @@
    * See [INACCESSIBLE_SETTER].
    */
   static const StaticTypeWarningCode UNDEFINED_SUPER_SETTER =
-      const StaticTypeWarningCode('UNDEFINED_SUPER_SETTER',
-          "The setter '{0}' is not defined in a superclass of '{1}'");
+      shared_messages.UNDEFINED_SUPER_SETTER_STATIC_TYPE_WARNING;
 
   /**
    * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does
@@ -4400,6 +4444,32 @@
           "The type '{0}' implied by the 'yield' expression must be assignable to '{1}'");
 
   /**
+   * 17.6.2 For-in. If the iterable expression does not implement Iterable,
+   * this warning is reported.
+   *
+   * Parameters:
+   * 0: The type of the iterable expression.
+   * 1: The sequence type -- Iterable for `for` or Stream for `await for`.
+   */
+  static const StaticTypeWarningCode FOR_IN_OF_INVALID_TYPE =
+      const StaticTypeWarningCode('FOR_IN_OF_INVALID_TYPE',
+          "The type '{0}' used in the 'for' loop must implement {1}");
+
+  /**
+   * 17.6.2 For-in. It the iterable expression does not implement Iterable with
+   * a type argument that can be assigned to the for-in variable's type, this
+   * warning is reported.
+   *
+   * Parameters:
+   * 0: The type of the iterable expression.
+   * 1: The sequence type -- Iterable for `for` or Stream for `await for`.
+   * 2: The loop variable type.
+   */
+  static const StaticTypeWarningCode FOR_IN_OF_INVALID_ELEMENT_TYPE =
+      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}'");
+
+  /**
    * 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
@@ -4472,8 +4542,7 @@
    * 1: the name of the expected type
    */
   static const StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE =
-      const StaticWarningCode('ARGUMENT_TYPE_NOT_ASSIGNABLE',
-          "The argument type '{0}' cannot be assigned to the parameter type '{1}'");
+      shared_messages.ARGUMENT_TYPE_NOT_ASSIGNABLE_STATIC_WARNING;
 
   /**
    * 5 Variables: Attempting to assign to a final variable elsewhere will cause
@@ -5547,9 +5616,8 @@
    * 0: the name of the getter
    * 1: the name of the enclosing type where the getter is being looked for
    */
-  static const StaticWarningCode UNDEFINED_GETTER = const StaticWarningCode(
-      'UNDEFINED_GETTER',
-      "The getter '{0}' is not defined for the class '{1}'");
+  static const StaticWarningCode UNDEFINED_GETTER =
+      shared_messages.UNDEFINED_GETTER_STATIC_WARNING;
 
   /**
    * 12.30 Identifier Reference: It is as static warning if an identifier
@@ -5592,9 +5660,8 @@
    * 0: the name of the getter
    * 1: the name of the enclosing type where the setter is being looked for
    */
-  static const StaticWarningCode UNDEFINED_SETTER = const StaticWarningCode(
-      'UNDEFINED_SETTER',
-      "The setter '{0}' is not defined for the class '{1}'");
+  static const StaticWarningCode UNDEFINED_SETTER =
+      shared_messages.UNDEFINED_SETTER_STATIC_WARNING;
 
   /**
    * 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not
@@ -5618,8 +5685,7 @@
    * 1: the name of the enclosing type where the getter is being looked for
    */
   static const StaticWarningCode UNDEFINED_SUPER_GETTER =
-      const StaticWarningCode('UNDEFINED_SUPER_GETTER',
-          "The getter '{0}' is not defined in a superclass of '{1}'");
+      shared_messages.UNDEFINED_SUPER_GETTER_STATIC_WARNING;
 
   /**
    * 12.18 Assignment: It is as static warning if an assignment of the form
@@ -5637,8 +5703,7 @@
    * 1: the name of the enclosing type where the setter is being looked for
    */
   static const StaticWarningCode UNDEFINED_SUPER_SETTER =
-      const StaticWarningCode('UNDEFINED_SUPER_SETTER',
-          "The setter '{0}' is not defined in a superclass of '{1}'");
+      shared_messages.UNDEFINED_SUPER_SETTER_STATIC_WARNING;
 
   /**
    * 7.2 Getters: It is a static warning if the return type of a getter is void.
@@ -5667,12 +5732,19 @@
           "Add a case clause for the missing constant or add a default clause.");
 
   /**
+   * A flag indicating whether this warning is an error when running with strong
+   * mode enabled.
+   */
+  final bool isStrongModeError;
+
+  /**
    * Initialize a newly created error code to have the given [name]. The message
    * associated with the error will be created from the given [message]
    * template. The correction associated with the error will be created from the
    * given [correction] template.
    */
-  const StaticWarningCode(String name, String message, [String correction])
+  const StaticWarningCode(String name, String message,
+      [String correction, this.isStrongModeError = false])
       : super(name, message, correction);
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 32b4d31..ac7214d 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -9,11 +9,12 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/src/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/dart/element/visitor.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -198,7 +199,7 @@
    * The class containing the AST nodes being visited, or `null` if we are not
    * in the scope of a class.
    */
-  ClassElement _enclosingClass;
+  ClassElementImpl _enclosingClass;
 
   /**
    * The method or function that we are currently visiting, or `null` if we are
@@ -305,6 +306,7 @@
   @override
   Object visitAnnotation(Annotation node) {
     _checkForInvalidAnnotationFromDeferredLibrary(node);
+    _checkForMissingJSLibAnnotation(node);
     return super.visitAnnotation(node);
   }
 
@@ -356,8 +358,7 @@
   Object visitBinaryExpression(BinaryExpression node) {
     Token operator = node.operator;
     TokenType type = operator.type;
-    if (type == TokenType.AMPERSAND_AMPERSAND ||
-        type == TokenType.BAR_BAR) {
+    if (type == TokenType.AMPERSAND_AMPERSAND || type == TokenType.BAR_BAR) {
       String lexeme = operator.lexeme;
       _checkForAssignability(node.leftOperand, _boolType,
           StaticTypeWarningCode.NON_BOOL_OPERAND, [lexeme]);
@@ -421,10 +422,10 @@
 
   @override
   Object visitClassDeclaration(ClassDeclaration node) {
-    ClassElement outerClass = _enclosingClass;
+    ClassElementImpl outerClass = _enclosingClass;
     try {
       _isInNativeClass = node.nativeClause != null;
-      _enclosingClass = node.element;
+      _enclosingClass = ClassElementImpl.getImpl(node.element);
       ExtendsClause extendsClause = node.extendsClause;
       ImplementsClause implementsClause = node.implementsClause;
       WithClause withClause = node.withClause;
@@ -473,7 +474,7 @@
    */
   void visitClassDeclarationIncrementally(ClassDeclaration node) {
     _isInNativeClass = node.nativeClause != null;
-    _enclosingClass = node.element;
+    _enclosingClass = ClassElementImpl.getImpl(node.element);
     // initialize initialFieldElementsMap
     if (_enclosingClass != null) {
       List<FieldElement> fieldElements = _enclosingClass.fields;
@@ -491,9 +492,9 @@
   Object visitClassTypeAlias(ClassTypeAlias node) {
     _checkForBuiltInIdentifierAsName(
         node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME);
-    ClassElement outerClassElement = _enclosingClass;
+    ClassElementImpl outerClassElement = _enclosingClass;
     try {
-      _enclosingClass = node.element;
+      _enclosingClass = ClassElementImpl.getImpl(node.element);
       ImplementsClause implementsClause = node.implementsClause;
       // Only check for all of the inheritance logic around clauses if there
       // isn't an error code such as "Cannot extend double" already on the
@@ -609,10 +610,10 @@
 
   @override
   Object visitEnumDeclaration(EnumDeclaration node) {
-    ClassElement outerClass = _enclosingClass;
+    ClassElementImpl outerClass = _enclosingClass;
     try {
       _isInNativeClass = false;
-      _enclosingClass = node.element;
+      _enclosingClass = ClassElementImpl.getImpl(node.element);
       return super.visitEnumDeclaration(node);
     } finally {
       _enclosingClass = outerClass;
@@ -643,7 +644,13 @@
       DartType expectedReturnType = functionType == null
           ? DynamicTypeImpl.instance
           : functionType.returnType;
-      _checkForReturnOfInvalidType(node.expression, expectedReturnType);
+      bool isSetterWithImplicitReturn =
+          _enclosingFunction.hasImplicitReturnType &&
+              _enclosingFunction is PropertyAccessorElement &&
+              (_enclosingFunction as PropertyAccessorElement).isSetter;
+      if (!isSetterWithImplicitReturn) {
+        _checkForReturnOfInvalidType(node.expression, expectedReturnType);
+      }
       return super.visitExpressionFunctionBody(node);
     } finally {
       _inAsync = wasInAsync;
@@ -682,6 +689,12 @@
   }
 
   @override
+  Object visitForEachStatement(ForEachStatement node) {
+    _checkForInIterable(node);
+    return super.visitForEachStatement(node);
+  }
+
+  @override
   Object visitForStatement(ForStatement node) {
     if (node.condition != null) {
       _checkForNonBoolCondition(node.condition);
@@ -807,6 +820,8 @@
         InterfaceType interfaceType = type;
         _checkForConstOrNewWithAbstractClass(node, typeName, interfaceType);
         _checkForConstOrNewWithEnum(node, typeName, interfaceType);
+        _checkForMissingRequiredParam(
+            node.staticElement?.type, node.argumentList, node.constructorName);
         if (_isInConstInstanceCreation) {
           _checkForConstWithNonConst(node);
           _checkForConstWithUndefinedConstructor(
@@ -841,8 +856,9 @@
         }
       }
       _checkForExpectedOneListTypeArgument(node, typeArguments);
-      _checkForListElementTypeNotAssignable(node, typeArguments);
     }
+
+    _checkForListElementTypeNotAssignable(node);
     return super.visitListLiteral(node);
   }
 
@@ -858,8 +874,9 @@
         }
       }
       _checkExpectedTwoMapTypeArguments(typeArguments);
-      _checkForMapTypeNotAssignable(node, typeArguments);
     }
+
+    _checkForMapTypeNotAssignable(node);
     _checkForNonConstMapAsExpressionStatement(node);
     return super.visitMapLiteral(node);
   }
@@ -897,6 +914,7 @@
       _checkForAllInvalidOverrideErrorCodesForMethod(node);
       _checkForTypeAnnotationDeferredClass(returnTypeName);
       _checkForIllegalReturnType(returnTypeName);
+      _checkForMustCallSuper(node);
       return super.visitMethodDeclaration(node);
     } finally {
       _enclosingFunction = previousFunction;
@@ -915,6 +933,8 @@
     } else {
       _checkForUnqualifiedReferenceToNonLocalStaticMember(methodName);
     }
+    _checkForMissingRequiredParam(
+        node.staticInvokeType, node.argumentList, methodName);
     return super.visitMethodInvocation(node);
   }
 
@@ -931,7 +951,7 @@
 
   @override
   Object visitNativeFunctionBody(NativeFunctionBody node) {
-    _checkForNativeFunctionBodyInNonSDKCode(node);
+    _checkForNativeFunctionBodyInNonSdkCode(node);
     return super.visitNativeFunctionBody(node);
   }
 
@@ -1151,7 +1171,25 @@
     if (expression != null && !enableAssertMessage) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.EXTRA_ARGUMENT_TO_ASSERT, expression);
-      return;
+    }
+  }
+
+  /**
+   * Given a list of [directives] that have the same prefix, generate an error
+   * if there is more than one import and any of those imports is deferred.
+   *
+   * See [CompileTimeErrorCode.SHARED_DEFERRED_PREFIX].
+   */
+  void _checkDeferredPrefixCollision(List<ImportDirective> directives) {
+    int count = directives.length;
+    if (count > 1) {
+      for (int i = 0; i < count; i++) {
+        Token deferredToken = directives[i].deferredKeyword;
+        if (deferredToken != null) {
+          _errorReporter.reportErrorForToken(
+              CompileTimeErrorCode.SHARED_DEFERRED_PREFIX, deferredToken);
+        }
+      }
     }
   }
 
@@ -1161,18 +1199,14 @@
    *
    * See [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS].
    */
-  bool _checkExpectedTwoMapTypeArguments(TypeArgumentList typeArguments) {
-    // check number of type arguments
+  void _checkExpectedTwoMapTypeArguments(TypeArgumentList typeArguments) {
     int num = typeArguments.arguments.length;
-    if (num == 2) {
-      return false;
+    if (num != 2) {
+      _errorReporter.reportErrorForNode(
+          StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
+          typeArguments,
+          [num]);
     }
-    // report problem
-    _errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
-        typeArguments,
-        [num]);
-    return true;
   }
 
   /**
@@ -1184,18 +1218,18 @@
    * [StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR], and
    * [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES].
    */
-  bool _checkForAllFinalInitializedErrorCodes(
+  void _checkForAllFinalInitializedErrorCodes(
       ConstructorDeclaration constructor) {
     if (constructor.factoryKeyword != null ||
         constructor.redirectedConstructor != null ||
         constructor.externalKeyword != null) {
-      return false;
+      return;
     }
     // Ignore if native class.
     if (_isInNativeClass) {
-      return false;
+      return;
     }
-    bool foundError = false;
+
     HashMap<FieldElement, INIT_STATE> fieldElementsMap =
         new HashMap<FieldElement, INIT_STATE>.from(_initialFieldElementsMap);
     // Visit all of the field formal parameters
@@ -1219,7 +1253,6 @@
                     .FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
                 formalParameter.identifier,
                 [fieldElement.displayName]);
-            foundError = true;
           }
         } else if (state == INIT_STATE.INIT_IN_FIELD_FORMAL) {
           if (fieldElement.isFinal || fieldElement.isConst) {
@@ -1227,7 +1260,6 @@
                 CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES,
                 formalParameter.identifier,
                 [fieldElement.displayName]);
-            foundError = true;
           }
         }
       }
@@ -1236,7 +1268,7 @@
     NodeList<ConstructorInitializer> initializers = constructor.initializers;
     for (ConstructorInitializer constructorInitializer in initializers) {
       if (constructorInitializer is RedirectingConstructorInvocation) {
-        return false;
+        return;
       }
       if (constructorInitializer is ConstructorFieldInitializer) {
         ConstructorFieldInitializer constructorFieldInitializer =
@@ -1254,20 +1286,17 @@
                   StaticWarningCode
                       .FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
                   fieldName);
-              foundError = true;
             }
           } else if (state == INIT_STATE.INIT_IN_FIELD_FORMAL) {
             _errorReporter.reportErrorForNode(
                 CompileTimeErrorCode
                     .FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER,
                 fieldName);
-            foundError = true;
           } else if (state == INIT_STATE.INIT_IN_INITIALIZERS) {
             _errorReporter.reportErrorForNode(
                 CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
                 fieldName,
                 [fieldElement.displayName]);
-            foundError = true;
           }
         }
       }
@@ -1290,13 +1319,11 @@
               CompileTimeErrorCode.CONST_NOT_INITIALIZED,
               constructor.returnType,
               [fieldElement.name]);
-          foundError = true;
         }
       }
     });
 
     if (notInitFinalFields.isNotEmpty) {
-      foundError = true;
       AnalysisErrorWithProperties analysisError;
       List<String> names = notInitFinalFields.map((item) => item.name).toList();
       names.sort();
@@ -1320,7 +1347,6 @@
           ErrorProperty.NOT_INITIALIZED_FIELDS, notInitFinalFields);
       _errorReporter.reportError(analysisError);
     }
-    return foundError;
   }
 
   /**
@@ -1685,7 +1711,7 @@
    * the parameters of the executable element. The [errorNameTarget] is the node
    * to report problems on.
    */
-  bool _checkForAllInvalidOverrideErrorCodesForExecutable(
+  void _checkForAllInvalidOverrideErrorCodesForExecutable(
       ExecutableElement executableElement,
       List<ParameterElement> parameters,
       List<AstNode> parameterLocations,
@@ -1697,15 +1723,14 @@
         .lookupOverrides(_enclosingClass, executableElement.name);
     if (_checkForInstanceMethodNameCollidesWithSuperclassStatic(
         executableElement, errorNameTarget)) {
-      return true;
+      return;
     }
     for (ExecutableElement overriddenElement in overriddenExecutables) {
       if (_checkForAllInvalidOverrideErrorCodes(executableElement,
           overriddenElement, parameters, parameterLocations, errorNameTarget)) {
-        return true;
+        return;
       }
     }
-    return false;
   }
 
   /**
@@ -1713,12 +1738,12 @@
    *
    * See [_checkForAllInvalidOverrideErrorCodes].
    */
-  bool _checkForAllInvalidOverrideErrorCodesForField(
+  void _checkForAllInvalidOverrideErrorCodesForField(
       FieldDeclaration declaration) {
     if (_enclosingClass == null || declaration.isStatic) {
-      return false;
+      return;
     }
-    bool hasProblems = false;
+
     VariableDeclarationList fields = declaration.fields;
     for (VariableDeclaration field in fields.variables) {
       FieldElement element = field.element as FieldElement;
@@ -1729,19 +1754,14 @@
       PropertyAccessorElement setter = element.setter;
       SimpleIdentifier fieldName = field.name;
       if (getter != null) {
-        if (_checkForAllInvalidOverrideErrorCodesForExecutable(getter,
-            ParameterElement.EMPTY_LIST, AstNode.EMPTY_LIST, fieldName)) {
-          hasProblems = true;
-        }
+        _checkForAllInvalidOverrideErrorCodesForExecutable(
+            getter, ParameterElement.EMPTY_LIST, AstNode.EMPTY_LIST, fieldName);
       }
       if (setter != null) {
-        if (_checkForAllInvalidOverrideErrorCodesForExecutable(
-            setter, setter.parameters, <AstNode>[fieldName], fieldName)) {
-          hasProblems = true;
-        }
+        _checkForAllInvalidOverrideErrorCodesForExecutable(
+            setter, setter.parameters, <AstNode>[fieldName], fieldName);
       }
     }
-    return hasProblems;
   }
 
   /**
@@ -1749,27 +1769,27 @@
    *
    * See [_checkForAllInvalidOverrideErrorCodes].
    */
-  bool _checkForAllInvalidOverrideErrorCodesForMethod(
+  void _checkForAllInvalidOverrideErrorCodesForMethod(
       MethodDeclaration method) {
     if (_enclosingClass == null ||
         method.isStatic ||
         method.body is NativeFunctionBody) {
-      return false;
+      return;
     }
     ExecutableElement executableElement = method.element;
     if (executableElement == null) {
-      return false;
+      return;
     }
     SimpleIdentifier methodName = method.name;
     if (methodName.isSynthetic) {
-      return false;
+      return;
     }
     FormalParameterList formalParameterList = method.parameters;
     NodeList<FormalParameter> parameterList =
         formalParameterList != null ? formalParameterList.parameters : null;
     List<AstNode> parameters =
         parameterList != null ? new List.from(parameterList) : null;
-    return _checkForAllInvalidOverrideErrorCodesForExecutable(executableElement,
+    _checkForAllInvalidOverrideErrorCodesForExecutable(executableElement,
         executableElement.parameters, parameters, methodName);
   }
 
@@ -1821,32 +1841,25 @@
    * [StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE], and
    * [StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR].
    */
-  bool _checkForAllRedirectConstructorErrorCodes(
+  void _checkForAllRedirectConstructorErrorCodes(
       ConstructorDeclaration declaration) {
-    //
     // Prepare redirected constructor node
-    //
     ConstructorName redirectedConstructor = declaration.redirectedConstructor;
     if (redirectedConstructor == null) {
-      return false;
+      return;
     }
-    //
+
     // Prepare redirected constructor type
-    //
     ConstructorElement redirectedElement = redirectedConstructor.staticElement;
     if (redirectedElement == null) {
-      //
       // If the element is null, we check for the
       // REDIRECT_TO_MISSING_CONSTRUCTOR case
-      //
       TypeName constructorTypeName = redirectedConstructor.type;
       DartType redirectedType = constructorTypeName.type;
       if (redirectedType != null &&
           redirectedType.element != null &&
           !redirectedType.isDynamic) {
-        //
         // Prepare the constructor name
-        //
         String constructorStrName = constructorTypeName.name.name;
         if (redirectedConstructor.name != null) {
           constructorStrName += ".${redirectedConstructor.name.name}";
@@ -1856,15 +1869,13 @@
             : StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR);
         _errorReporter.reportErrorForNode(errorCode, redirectedConstructor,
             [constructorStrName, redirectedType.displayName]);
-        return true;
       }
-      return false;
+      return;
     }
     FunctionType redirectedType = redirectedElement.type;
     DartType redirectedReturnType = redirectedType.returnType;
-    //
+
     // Report specific problem when return type is incompatible
-    //
     FunctionType constructorType = declaration.element.type;
     DartType constructorReturnType = constructorType.returnType;
     if (!_typeSystem.isAssignableTo(
@@ -1873,19 +1884,14 @@
           StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE,
           redirectedConstructor,
           [redirectedReturnType, constructorReturnType]);
-      return true;
-    }
-    //
-    // Check parameters
-    //
-    if (!_typeSystem.isSubtypeOf(redirectedType, constructorType)) {
+      return;
+    } else if (!_typeSystem.isSubtypeOf(redirectedType, constructorType)) {
+      // Check parameters.
       _errorReporter.reportErrorForNode(
           StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE,
           redirectedConstructor,
           [redirectedType, constructorType]);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -1903,7 +1909,7 @@
    * [StaticWarningCode.RETURN_WITHOUT_VALUE], and
    * [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE].
    */
-  bool _checkForAllReturnStatementErrorCodes(ReturnStatement statement) {
+  void _checkForAllReturnStatementErrorCodes(ReturnStatement statement) {
     FunctionType functionType =
         _enclosingFunction == null ? null : _enclosingFunction.type;
     DartType expectedReturnType = functionType == null
@@ -1915,24 +1921,24 @@
         !(_enclosingFunction as ConstructorElement).isFactory;
     if (isGenerativeConstructor) {
       if (returnExpression == null) {
-        return false;
+        return;
       }
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR,
           returnExpression);
-      return true;
+      return;
     }
     // RETURN_WITHOUT_VALUE
     if (returnExpression == null) {
       if (_inGenerator ||
           _typeSystem.isAssignableTo(
               _computeReturnTypeForMethod(null), expectedReturnType)) {
-        return false;
+        return;
       }
       _hasReturnWithoutValue = true;
       _errorReporter.reportErrorForNode(
           StaticWarningCode.RETURN_WITHOUT_VALUE, statement);
-      return true;
+      return;
     } else if (_inGenerator) {
       // RETURN_IN_GENERATOR
       _errorReporter.reportErrorForNode(
@@ -1940,8 +1946,8 @@
           statement,
           [_inAsync ? "async*" : "sync*"]);
     }
-    // RETURN_OF_INVALID_TYPE
-    return _checkForReturnOfInvalidType(returnExpression, expectedReturnType);
+
+    _checkForReturnOfInvalidType(returnExpression, expectedReturnType);
   }
 
   /**
@@ -1953,10 +1959,10 @@
    *
    * See [CompileTimeErrorCode.AMBIGUOUS_EXPORT].
    */
-  bool _checkForAmbiguousExport(ExportDirective directive,
+  void _checkForAmbiguousExport(ExportDirective directive,
       ExportElement exportElement, LibraryElement exportedLibrary) {
     if (exportedLibrary == null) {
-      return false;
+      return;
     }
     // check exported names
     Namespace namespace =
@@ -1972,12 +1978,11 @@
           prevElement.library.definingCompilationUnit.displayName,
           element.library.definingCompilationUnit.displayName
         ]);
-        return true;
+        return;
       } else {
         _exportedElements[name] = element;
       }
     }
-    return false;
   }
 
   /**
@@ -1997,22 +2002,18 @@
    * [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE], and
    * [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE].
    */
-  bool _checkForArgumentTypeNotAssignable(
+  void _checkForArgumentTypeNotAssignable(
       Expression expression,
       DartType expectedStaticType,
       DartType actualStaticType,
       ErrorCode errorCode) {
-    //
     // Warning case: test static type information
-    //
-    if (actualStaticType != null && expectedStaticType != null) {
-      if (!_typeSystem.isAssignableTo(actualStaticType, expectedStaticType)) {
-        _errorReporter.reportTypeErrorForNode(
-            errorCode, expression, [actualStaticType, expectedStaticType]);
-        return true;
-      }
+    if (actualStaticType != null &&
+        expectedStaticType != null &&
+        !_typeSystem.isAssignableTo(actualStaticType, expectedStaticType)) {
+      _errorReporter.reportTypeErrorForNode(
+          errorCode, expression, [actualStaticType, expectedStaticType]);
     }
-    return false;
   }
 
   /**
@@ -2024,14 +2025,14 @@
    *
    * See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
    */
-  bool _checkForArgumentTypeNotAssignableForArgument(Expression argument) {
+  void _checkForArgumentTypeNotAssignableForArgument(Expression argument) {
     if (argument == null) {
-      return false;
+      return;
     }
     ParameterElement staticParameterElement = argument.staticParameterElement;
     DartType staticParameterType =
         staticParameterElement == null ? null : staticParameterElement.type;
-    return _checkForArgumentTypeNotAssignableWithExpectedTypes(argument,
+    _checkForArgumentTypeNotAssignableWithExpectedTypes(argument,
         staticParameterType, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
   }
 
@@ -2050,12 +2051,11 @@
    * [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE], and
    * [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE].
    */
-  bool _checkForArgumentTypeNotAssignableWithExpectedTypes(
-          Expression expression,
-          DartType expectedStaticType,
-          ErrorCode errorCode) =>
-      _checkForArgumentTypeNotAssignable(
-          expression, expectedStaticType, getStaticType(expression), errorCode);
+  void _checkForArgumentTypeNotAssignableWithExpectedTypes(
+      Expression expression, DartType expectedStaticType, ErrorCode errorCode) {
+    _checkForArgumentTypeNotAssignable(
+        expression, expectedStaticType, getStaticType(expression), errorCode);
+  }
 
   /**
    * Verify that the arguments in the given [argumentList] can be assigned to
@@ -2066,17 +2066,14 @@
    *
    * See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
    */
-  bool _checkForArgumentTypesNotAssignableInList(ArgumentList argumentList) {
+  void _checkForArgumentTypesNotAssignableInList(ArgumentList argumentList) {
     if (argumentList == null) {
-      return false;
+      return;
     }
-    bool problemReported = false;
+
     for (Expression argument in argumentList.arguments) {
-      if (_checkForArgumentTypeNotAssignableForArgument(argument)) {
-        problemReported = true;
-      }
+      _checkForArgumentTypeNotAssignableForArgument(argument);
     }
-    return problemReported;
   }
 
   /**
@@ -2086,20 +2083,19 @@
    * [errorCode] is the error code to be reported. The [arguments] are the
    * arguments to pass in when creating the error.
    */
-  bool _checkForAssignability(Expression expression, InterfaceType type,
+  void _checkForAssignability(Expression expression, InterfaceType type,
       ErrorCode errorCode, List<Object> arguments) {
     if (expression == null) {
-      return false;
+      return;
     }
     DartType expressionType = expression.staticType;
     if (expressionType == null) {
-      return false;
+      return;
     }
     if (_typeSystem.isAssignableTo(expressionType, type)) {
-      return false;
+      return;
     }
     _errorReporter.reportErrorForNode(errorCode, expression, arguments);
-    return true;
   }
 
   /**
@@ -2109,7 +2105,7 @@
    * [StaticWarningCode.ASSIGNMENT_TO_FINAL], and
    * [StaticWarningCode.ASSIGNMENT_TO_METHOD].
    */
-  bool _checkForAssignmentToFinal(Expression expression) {
+  void _checkForAssignmentToFinal(Expression expression) {
     // prepare element
     Element element = null;
     AstNode highlightedNode = expression;
@@ -2132,9 +2128,7 @@
       if (element.isConst) {
         _errorReporter.reportErrorForNode(
             StaticWarningCode.ASSIGNMENT_TO_CONST, expression);
-        return true;
-      }
-      if (element.isFinal) {
+      } else if (element.isFinal) {
         if (element is FieldElementImpl &&
             element.setter == null &&
             element.isSynthetic) {
@@ -2142,32 +2136,23 @@
               StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER,
               highlightedNode,
               [element.name, element.enclosingElement.displayName]);
-          return true;
+          return;
         }
         _errorReporter.reportErrorForNode(StaticWarningCode.ASSIGNMENT_TO_FINAL,
             highlightedNode, [element.name]);
-        return true;
       }
-      return false;
-    }
-    if (element is FunctionElement) {
+    } else if (element is FunctionElement) {
       _errorReporter.reportErrorForNode(
           StaticWarningCode.ASSIGNMENT_TO_FUNCTION, expression);
-      return true;
-    }
-    if (element is MethodElement) {
+    } else if (element is MethodElement) {
       _errorReporter.reportErrorForNode(
           StaticWarningCode.ASSIGNMENT_TO_METHOD, expression);
-      return true;
-    }
-    if (element is ClassElement ||
+    } else if (element is ClassElement ||
         element is FunctionTypeAliasElement ||
         element is TypeParameterElement) {
       _errorReporter.reportErrorForNode(
           StaticWarningCode.ASSIGNMENT_TO_TYPE, expression);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -2178,15 +2163,13 @@
    * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME], and
    * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME].
    */
-  bool _checkForBuiltInIdentifierAsName(
+  void _checkForBuiltInIdentifierAsName(
       SimpleIdentifier identifier, ErrorCode errorCode) {
     Token token = identifier.token;
     if (token.type == TokenType.KEYWORD) {
       _errorReporter
           .reportErrorForNode(errorCode, identifier, [identifier.name]);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -2195,7 +2178,7 @@
    *
    * see [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED].
    */
-  bool _checkForCaseBlockNotTerminated(SwitchCase switchCase) {
+  void _checkForCaseBlockNotTerminated(SwitchCase switchCase) {
     NodeList<Statement> statements = switchCase.statements;
     if (statements.isEmpty) {
       // fall-through without statements at all
@@ -2205,7 +2188,7 @@
         NodeList<SwitchMember> members = switchStatement.members;
         int index = members.indexOf(switchCase);
         if (index != -1 && index < members.length - 1) {
-          return false;
+          return;
         }
       }
       // no other switch member after this one
@@ -2215,20 +2198,19 @@
       if (statement is BreakStatement ||
           statement is ContinueStatement ||
           statement is ReturnStatement) {
-        return false;
+        return;
       }
       // terminated with 'throw' expression
       if (statement is ExpressionStatement) {
         Expression expression = statement.expression;
         if (expression is ThrowExpression) {
-          return false;
+          return;
         }
       }
     }
-    // report error
+
     _errorReporter.reportErrorForToken(
         StaticWarningCode.CASE_BLOCK_NOT_TERMINATED, switchCase.keyword);
-    return true;
   }
 
   /**
@@ -2237,17 +2219,15 @@
    *
    * See [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED].
    */
-  bool _checkForCaseBlocksNotTerminated(SwitchStatement statement) {
-    bool foundError = false;
+  void _checkForCaseBlocksNotTerminated(SwitchStatement statement) {
     NodeList<SwitchMember> members = statement.members;
     int lastMember = members.length - 1;
     for (int i = 0; i < lastMember; i++) {
       SwitchMember member = members[i];
-      if (member is SwitchCase && _checkForCaseBlockNotTerminated(member)) {
-        foundError = true;
+      if (member is SwitchCase) {
+        _checkForCaseBlockNotTerminated(member);
       }
     }
-    return foundError;
   }
 
   /**
@@ -2256,7 +2236,7 @@
    *
    * See [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER].
    */
-  bool _checkForConcreteClassWithAbstractMember(MethodDeclaration method) {
+  void _checkForConcreteClassWithAbstractMember(MethodDeclaration method) {
     if (method.isAbstract &&
         _enclosingClass != null &&
         !_enclosingClass.isAbstract) {
@@ -2278,10 +2258,8 @@
             StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
             nameNode,
             [memberName, _enclosingClass.displayName]);
-        return true;
       }
     }
-    return false;
   }
 
   /**
@@ -2294,7 +2272,7 @@
    * [CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD], and
    * [CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD].
    */
-  bool _checkForConflictingConstructorNameAndMember(
+  void _checkForConflictingConstructorNameAndMember(
       ConstructorDeclaration constructor,
       ConstructorElement constructorElement) {
     SimpleIdentifier constructorName = constructor.name;
@@ -2316,33 +2294,27 @@
               constructor,
               [name]);
         }
-        return true;
+        return;
       }
     }
     // conflict with class member
     if (constructorName != null &&
         constructorElement != null &&
         !constructorName.isSynthetic) {
-      // fields
-      FieldElement field = classElement.getField(name);
-      if (field != null) {
+      if (classElement.getField(name) != null) {
+        // fields
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
             constructor,
             [name]);
-        return true;
-      }
-      // methods
-      MethodElement method = classElement.getMethod(name);
-      if (method != null) {
+      } else if (classElement.getMethod(name) != null) {
+        // methods
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD,
             constructor,
             [name]);
-        return true;
       }
     }
-    return false;
   }
 
   /**
@@ -2352,11 +2324,11 @@
    * See [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD], and
    * [CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER].
    */
-  bool _checkForConflictingGetterAndMethod() {
+  void _checkForConflictingGetterAndMethod() {
     if (_enclosingClass == null) {
-      return false;
+      return;
     }
-    bool hasProblem = false;
+
     // method declared in the enclosing class vs. inherited getter
     for (MethodElement method in _enclosingClass.methods) {
       String name = method.name;
@@ -2366,8 +2338,7 @@
       if (inherited is! PropertyAccessorElement) {
         continue;
       }
-      // report problem
-      hasProblem = true;
+
       _errorReporter.reportErrorForElement(
           CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, method, [
         _enclosingClass.displayName,
@@ -2387,8 +2358,7 @@
       if (inherited is! MethodElement) {
         continue;
       }
-      // report problem
-      hasProblem = true;
+
       _errorReporter.reportErrorForElement(
           CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER, accessor, [
         _enclosingClass.displayName,
@@ -2396,8 +2366,6 @@
         name
       ]);
     }
-    // done
-    return hasProblem;
   }
 
   /**
@@ -2408,13 +2376,12 @@
    * See [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER], and
    * [StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER].
    */
-  bool _checkForConflictingInstanceGetterAndSuperclassMember() {
+  void _checkForConflictingInstanceGetterAndSuperclassMember() {
     if (_enclosingClass == null) {
-      return false;
+      return;
     }
     InterfaceType enclosingType = _enclosingClass.type;
     // check every accessor
-    bool hasProblem = false;
     for (PropertyAccessorElement accessor in _enclosingClass.accessors) {
       // we analyze instance accessors here
       if (accessor.isStatic) {
@@ -2451,8 +2418,7 @@
       ClassElement superElementClass =
           superElement.enclosingElement as ClassElement;
       InterfaceType superElementType = superElementClass.type;
-      // report problem
-      hasProblem = true;
+
       if (getter) {
         _errorReporter.reportErrorForElement(
             StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
@@ -2465,8 +2431,6 @@
             [superElementType.displayName]);
       }
     }
-    // done
-    return hasProblem;
   }
 
   /**
@@ -2478,17 +2442,16 @@
    *
    * See [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER].
    */
-  bool _checkForConflictingInstanceMethodSetter(ClassDeclaration declaration) {
+  void _checkForConflictingInstanceMethodSetter(ClassDeclaration declaration) {
     // Reference all of the class members in this class.
     NodeList<ClassMember> classMembers = declaration.members;
     if (classMembers.isEmpty) {
-      return false;
+      return;
     }
     // Create a HashMap to track conflicting members, and then loop through
     // members in the class to construct the HashMap, at the same time,
     // look for violations.  Don't add members if they are part of a conflict,
     // this prevents multiple warnings for one issue.
-    bool foundError = false;
     HashMap<String, ClassMember> memberHashMap =
         new HashMap<String, ClassMember>();
     for (ClassMember classMember in classMembers) {
@@ -2526,14 +2489,12 @@
             }
           }
           if (enclosingElementOfSetter != null) {
-            // report problem
             _errorReporter.reportErrorForNode(
                 StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER, name, [
               _enclosingClass.displayName,
               name.name,
               enclosingElementOfSetter.displayName
             ]);
-            foundError = true;
             addThisMemberToTheMap = false;
           }
         } else if (isSetter) {
@@ -2542,12 +2503,10 @@
           if (conflictingMethod != null &&
               conflictingMethod is MethodDeclaration &&
               !conflictingMethod.isGetter) {
-            // report problem
             _errorReporter.reportErrorForNode(
                 StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER2,
                 name,
                 [_enclosingClass.displayName, name.name]);
-            foundError = true;
             addThisMemberToTheMap = false;
           }
         }
@@ -2561,7 +2520,6 @@
         }
       }
     }
-    return foundError;
   }
 
   /**
@@ -2570,41 +2528,40 @@
    *
    * See [StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER].
    */
-  bool _checkForConflictingStaticGetterAndInstanceSetter(
+  void _checkForConflictingStaticGetterAndInstanceSetter(
       MethodDeclaration method) {
     if (!method.isStatic) {
-      return false;
+      return;
     }
     // prepare name
     SimpleIdentifier nameNode = method.name;
     if (nameNode == null) {
-      return false;
+      return;
     }
     String name = nameNode.name;
     // prepare enclosing type
     if (_enclosingClass == null) {
-      return false;
+      return;
     }
     InterfaceType enclosingType = _enclosingClass.type;
     // try to find setter
     ExecutableElement setter =
         enclosingType.lookUpSetter(name, _currentLibrary);
     if (setter == null) {
-      return false;
+      return;
     }
     // OK, also static
     if (setter.isStatic) {
-      return false;
+      return;
     }
     // prepare "setter" type to report its name
     ClassElement setterClass = setter.enclosingElement as ClassElement;
     InterfaceType setterType = setterClass.type;
-    // report problem
+
     _errorReporter.reportErrorForNode(
         StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER,
         nameNode,
         [setterType.displayName]);
-    return true;
   }
 
   /**
@@ -2613,20 +2570,20 @@
    *
    * See [StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER].
    */
-  bool _checkForConflictingStaticSetterAndInstanceMember(
+  void _checkForConflictingStaticSetterAndInstanceMember(
       MethodDeclaration method) {
     if (!method.isStatic) {
-      return false;
+      return;
     }
     // prepare name
     SimpleIdentifier nameNode = method.name;
     if (nameNode == null) {
-      return false;
+      return;
     }
     String name = nameNode.name;
     // prepare enclosing type
     if (_enclosingClass == null) {
-      return false;
+      return;
     }
     InterfaceType enclosingType = _enclosingClass.type;
     // try to find member
@@ -2639,21 +2596,20 @@
       member = enclosingType.lookUpSetter(name, _currentLibrary);
     }
     if (member == null) {
-      return false;
+      return;
     }
     // OK, also static
     if (member.isStatic) {
-      return false;
+      return;
     }
     // prepare "member" type to report its name
     ClassElement memberClass = member.enclosingElement as ClassElement;
     InterfaceType memberType = memberClass.type;
-    // report problem
+
     _errorReporter.reportErrorForNode(
         StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER,
         nameNode,
         [memberType.displayName]);
-    return true;
   }
 
   /**
@@ -2663,9 +2619,8 @@
    * See [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS], and
    * [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER].
    */
-  bool _checkForConflictingTypeVariableErrorCodes(
+  void _checkForConflictingTypeVariableErrorCodes(
       ClassDeclaration declaration) {
-    bool problemReported = false;
     for (TypeParameterElement typeParameter in _enclosingClass.typeParameters) {
       String name = typeParameter.name;
       // name is same as the name of the enclosing class
@@ -2674,7 +2629,6 @@
             CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
             typeParameter,
             [name]);
-        problemReported = true;
       }
       // check members
       if (_enclosingClass.getMethod(name) != null ||
@@ -2684,10 +2638,8 @@
             CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
             typeParameter,
             [name]);
-        problemReported = true;
       }
     }
-    return problemReported;
   }
 
   /**
@@ -2696,21 +2648,21 @@
    *
    * See [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER].
    */
-  bool _checkForConstConstructorWithNonConstSuper(
+  void _checkForConstConstructorWithNonConstSuper(
       ConstructorDeclaration constructor) {
     if (!_isEnclosingConstructorConst) {
-      return false;
+      return;
     }
     // OK, const factory, checked elsewhere
     if (constructor.factoryKeyword != null) {
-      return false;
+      return;
     }
     // check for mixins
     if (_enclosingClass.mixins.length != 0) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN,
           constructor.returnType);
-      return true;
+      return;
     }
     // try to find and check super constructor invocation
     for (ConstructorInitializer initializer in constructor.initializers) {
@@ -2718,37 +2670,34 @@
         SuperConstructorInvocation superInvocation = initializer;
         ConstructorElement element = superInvocation.staticElement;
         if (element == null || element.isConst) {
-          return false;
+          return;
         }
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER,
             superInvocation,
             [element.enclosingElement.displayName]);
-        return true;
+        return;
       }
     }
     // no explicit super constructor invocation, check default constructor
     InterfaceType supertype = _enclosingClass.supertype;
     if (supertype == null) {
-      return false;
+      return;
     }
     if (supertype.isObject) {
-      return false;
+      return;
     }
     ConstructorElement unnamedConstructor =
         supertype.element.unnamedConstructor;
-    if (unnamedConstructor == null) {
-      return false;
+    if (unnamedConstructor == null || unnamedConstructor.isConst) {
+      return;
     }
-    if (unnamedConstructor.isConst) {
-      return false;
-    }
+
     // default constructor is not 'const', report problem
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER,
         constructor.returnType,
         [supertype.displayName]);
-    return true;
   }
 
   /**
@@ -2758,22 +2707,21 @@
    *
    * See [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD].
    */
-  bool _checkForConstConstructorWithNonFinalField(
+  void _checkForConstConstructorWithNonFinalField(
       ConstructorDeclaration constructor,
       ConstructorElement constructorElement) {
     if (!_isEnclosingConstructorConst) {
-      return false;
+      return;
     }
     // check if there is non-final field
     ClassElement classElement = constructorElement.enclosingElement;
     if (!classElement.hasNonFinalField) {
-      return false;
+      return;
     }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
         constructor);
-    return true;
   }
 
   /**
@@ -2784,16 +2732,14 @@
    *
    * See [CompileTimeErrorCode.CONST_DEFERRED_CLASS].
    */
-  bool _checkForConstDeferredClass(InstanceCreationExpression expression,
+  void _checkForConstDeferredClass(InstanceCreationExpression expression,
       ConstructorName constructorName, TypeName typeName) {
     if (typeName.isDeferred) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.CONST_DEFERRED_CLASS,
           constructorName,
           [typeName.name.name]);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -2802,13 +2748,11 @@
    *
    * See [CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION].
    */
-  bool _checkForConstEvalThrowsException(ThrowExpression expression) {
+  void _checkForConstEvalThrowsException(ThrowExpression expression) {
     if (_isEnclosingConstructorConst) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION, expression);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -2816,13 +2760,11 @@
    *
    * See [CompileTimeErrorCode.CONST_FORMAL_PARAMETER].
    */
-  bool _checkForConstFormalParameter(NormalFormalParameter parameter) {
+  void _checkForConstFormalParameter(NormalFormalParameter parameter) {
     if (parameter.isConst) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.CONST_FORMAL_PARAMETER, parameter);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -2835,25 +2777,22 @@
    * See [StaticWarningCode.CONST_WITH_ABSTRACT_CLASS], and
    * [StaticWarningCode.NEW_WITH_ABSTRACT_CLASS].
    */
-  bool _checkForConstOrNewWithAbstractClass(
+  void _checkForConstOrNewWithAbstractClass(
       InstanceCreationExpression expression,
       TypeName typeName,
       InterfaceType type) {
     if (type.element.isAbstract) {
       ConstructorElement element = expression.staticElement;
       if (element != null && !element.isFactory) {
-        if ((expression.keyword as KeywordToken).keyword ==
-            Keyword.CONST) {
+        if ((expression.keyword as KeywordToken).keyword == Keyword.CONST) {
           _errorReporter.reportErrorForNode(
               StaticWarningCode.CONST_WITH_ABSTRACT_CLASS, typeName);
         } else {
           _errorReporter.reportErrorForNode(
               StaticWarningCode.NEW_WITH_ABSTRACT_CLASS, typeName);
         }
-        return true;
       }
     }
-    return false;
   }
 
   /**
@@ -2865,14 +2804,12 @@
    *
    * See [CompileTimeErrorCode.INSTANTIATE_ENUM].
    */
-  bool _checkForConstOrNewWithEnum(InstanceCreationExpression expression,
+  void _checkForConstOrNewWithEnum(InstanceCreationExpression expression,
       TypeName typeName, InterfaceType type) {
     if (type.element.isEnum) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.INSTANTIATE_ENUM, typeName);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -2884,14 +2821,12 @@
    *
    * See [CompileTimeErrorCode.CONST_WITH_NON_CONST].
    */
-  bool _checkForConstWithNonConst(InstanceCreationExpression expression) {
+  void _checkForConstWithNonConst(InstanceCreationExpression expression) {
     ConstructorElement constructorElement = expression.staticElement;
     if (constructorElement != null && !constructorElement.isConst) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.CONST_WITH_NON_CONST, expression);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -2899,14 +2834,14 @@
    *
    * See [CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS].
    */
-  bool _checkForConstWithTypeParameters(TypeName typeName) {
+  void _checkForConstWithTypeParameters(TypeName typeName) {
     // something wrong with AST
     if (typeName == null) {
-      return false;
+      return;
     }
     Identifier name = typeName.name;
     if (name == null) {
-      return false;
+      return;
     }
     // should not be a type parameter
     if (name.staticElement is TypeParameterElement) {
@@ -2916,16 +2851,10 @@
     // check type arguments
     TypeArgumentList typeArguments = typeName.typeArguments;
     if (typeArguments != null) {
-      bool hasError = false;
       for (TypeName argument in typeArguments.arguments) {
-        if (_checkForConstWithTypeParameters(argument)) {
-          hasError = true;
-        }
+        _checkForConstWithTypeParameters(argument);
       }
-      return hasError;
     }
-    // OK
-    return false;
   }
 
   /**
@@ -2940,20 +2869,20 @@
    * See [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR], and
    * [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT].
    */
-  bool _checkForConstWithUndefinedConstructor(
+  void _checkForConstWithUndefinedConstructor(
       InstanceCreationExpression expression,
       ConstructorName constructorName,
       TypeName typeName) {
     // OK if resolved
     if (expression.staticElement != null) {
-      return false;
+      return;
     }
     DartType type = typeName.type;
     if (type is InterfaceType) {
       ClassElement element = type.element;
       if (element != null && element.isEnum) {
         // We have already reported the error.
-        return false;
+        return;
       }
     }
     Identifier className = typeName.name;
@@ -2970,7 +2899,6 @@
           constructorName,
           [className]);
     }
-    return true;
   }
 
   /**
@@ -2979,8 +2907,7 @@
    *
    * See [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS].
    */
-  bool _checkForDefaultValueInFunctionTypeAlias(FunctionTypeAlias alias) {
-    bool result = false;
+  void _checkForDefaultValueInFunctionTypeAlias(FunctionTypeAlias alias) {
     FormalParameterList formalParameterList = alias.parameters;
     NodeList<FormalParameter> parameters = formalParameterList.parameters;
     for (FormalParameter formalParameter in parameters) {
@@ -2989,11 +2916,9 @@
         if (defaultFormalParameter.defaultValue != null) {
           _errorReporter.reportErrorForNode(
               CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, alias);
-          result = true;
         }
       }
     }
-    return result;
   }
 
   /**
@@ -3002,21 +2927,20 @@
    *
    * See [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER].
    */
-  bool _checkForDefaultValueInFunctionTypedParameter(
+  void _checkForDefaultValueInFunctionTypedParameter(
       DefaultFormalParameter parameter) {
     // OK, not in a function typed parameter.
     if (!_isInFunctionTypedFormalParameter) {
-      return false;
+      return;
     }
     // OK, no default value.
     if (parameter.defaultValue == null) {
-      return false;
+      return;
     }
-    // Report problem.
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
         parameter);
-    return true;
   }
 
   /**
@@ -3025,8 +2949,7 @@
    *
    * See [CompileTimeErrorCode.SHARED_DEFERRED_PREFIX].
    */
-  bool _checkForDeferredPrefixCollisions(CompilationUnit unit) {
-    bool foundError = false;
+  void _checkForDeferredPrefixCollisions(CompilationUnit unit) {
     NodeList<Directive> directives = unit.directives;
     int count = directives.length;
     if (count > 0) {
@@ -3053,12 +2976,9 @@
         }
       }
       for (List<ImportDirective> imports in prefixToDirectivesMap.values) {
-        if (_hasDeferredPrefixCollision(imports)) {
-          foundError = true;
-        }
+        _checkDeferredPrefixCollision(imports);
       }
     }
-    return foundError;
   }
 
   /**
@@ -3067,22 +2987,21 @@
    *
    * See [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE].
    */
-  bool _checkForDuplicateDefinitionInheritance() {
+  void _checkForDuplicateDefinitionInheritance() {
     if (_enclosingClass == null) {
-      return false;
+      return;
     }
-    bool hasProblem = false;
+
     for (ExecutableElement member in _enclosingClass.methods) {
-      if (member.isStatic && _checkForDuplicateDefinitionOfMember(member)) {
-        hasProblem = true;
+      if (member.isStatic) {
+        _checkForDuplicateDefinitionOfMember(member);
       }
     }
     for (ExecutableElement member in _enclosingClass.accessors) {
-      if (member.isStatic && _checkForDuplicateDefinitionOfMember(member)) {
-        hasProblem = true;
+      if (member.isStatic) {
+        _checkForDuplicateDefinitionOfMember(member);
       }
     }
-    return hasProblem;
   }
 
   /**
@@ -3091,21 +3010,21 @@
    *
    * See [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE].
    */
-  bool _checkForDuplicateDefinitionOfMember(ExecutableElement staticMember) {
+  void _checkForDuplicateDefinitionOfMember(ExecutableElement staticMember) {
     // prepare name
     String name = staticMember.name;
     if (name == null) {
-      return false;
+      return;
     }
     // try to find member
     ExecutableElement inheritedMember =
         _inheritanceManager.lookupInheritance(_enclosingClass, name);
     if (inheritedMember == null) {
-      return false;
+      return;
     }
     // OK, also static
     if (inheritedMember.isStatic) {
-      return false;
+      return;
     }
     // determine the display name, use the extended display name if the
     // enclosing class of the inherited member is in a different source
@@ -3116,12 +3035,11 @@
     } else {
       displayName = enclosingElement.getExtendedDisplayName(null);
     }
-    // report problem
+
     _errorReporter.reportErrorForElement(
         CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE,
         staticMember,
         [name, displayName]);
-    return true;
   }
 
   /**
@@ -3130,19 +3048,16 @@
    *
    * See [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS].
    */
-  bool _checkForExpectedOneListTypeArgument(
+  void _checkForExpectedOneListTypeArgument(
       ListLiteral literal, TypeArgumentList typeArguments) {
     // check number of type arguments
     int num = typeArguments.arguments.length;
-    if (num == 1) {
-      return false;
+    if (num != 1) {
+      _errorReporter.reportErrorForNode(
+          StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
+          typeArguments,
+          [num]);
     }
-    // report problem
-    _errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
-        typeArguments,
-        [num]);
-    return true;
   }
 
   /**
@@ -3154,10 +3069,10 @@
    *
    * See [CompileTimeErrorCode.EXPORT_DUPLICATED_LIBRARY_NAME].
    */
-  bool _checkForExportDuplicateLibraryName(ExportDirective directive,
+  void _checkForExportDuplicateLibraryName(ExportDirective directive,
       ExportElement exportElement, LibraryElement exportedLibrary) {
     if (exportedLibrary == null) {
-      return false;
+      return;
     }
     String name = exportedLibrary.name;
     // check if there is other exported library with the same name
@@ -3172,13 +3087,11 @@
             name
           ]);
         }
-        return true;
+        return;
       }
     } else {
       _nameToExportElement[name] = exportedLibrary;
     }
-    // OK
-    return false;
   }
 
   /**
@@ -3189,27 +3102,26 @@
    *
    * See [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY].
    */
-  bool _checkForExportInternalLibrary(
+  void _checkForExportInternalLibrary(
       ExportDirective directive, ExportElement exportElement) {
     if (_isInSystemLibrary) {
-      return false;
+      return;
     }
     // should be private
     DartSdk sdk = _currentLibrary.context.sourceFactory.dartSdk;
     String uri = exportElement.uri;
     SdkLibrary sdkLibrary = sdk.getSdkLibrary(uri);
     if (sdkLibrary == null) {
-      return false;
+      return;
     }
     if (!sdkLibrary.isInternal) {
-      return false;
+      return;
     }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY,
         directive,
         [directive.uri]);
-    return true;
   }
 
   /**
@@ -3217,11 +3129,11 @@
    *
    * See [CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS].
    */
-  bool _checkForExtendsDeferredClass(ExtendsClause clause) {
+  void _checkForExtendsDeferredClass(ExtendsClause clause) {
     if (clause == null) {
-      return false;
+      return;
     }
-    return _checkForExtendsOrImplementsDeferredClass(
+    _checkForExtendsOrImplementsDeferredClass(
         clause.superclass, CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS);
   }
 
@@ -3230,11 +3142,11 @@
    *
    * See [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS].
    */
-  bool _checkForExtendsDeferredClassInTypeAlias(ClassTypeAlias alias) {
+  void _checkForExtendsDeferredClassInTypeAlias(ClassTypeAlias alias) {
     if (alias == null) {
-      return false;
+      return;
     }
-    return _checkForExtendsOrImplementsDeferredClass(
+    _checkForExtendsOrImplementsDeferredClass(
         alias.superclass, CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS);
   }
 
@@ -3353,11 +3265,11 @@
    * See [CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE], and
    * [StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE].
    */
-  bool _checkForFieldInitializerNotAssignable(
+  void _checkForFieldInitializerNotAssignable(
       ConstructorFieldInitializer initializer, Element staticElement) {
     // prepare field element
     if (staticElement is! FieldElement) {
-      return false;
+      return;
     }
     FieldElement fieldElement = staticElement as FieldElement;
     // prepare field type
@@ -3365,15 +3277,15 @@
     // prepare expression type
     Expression expression = initializer.expression;
     if (expression == null) {
-      return false;
+      return;
     }
     // test the static type of the expression
     DartType staticType = getStaticType(expression);
     if (staticType == null) {
-      return false;
+      return;
     }
     if (_typeSystem.isAssignableTo(staticType, fieldType)) {
-      return false;
+      return;
     }
     // report problem
     if (_isEnclosingConstructorConst) {
@@ -3389,7 +3301,6 @@
         StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE,
         expression,
         [staticType, fieldType]);
-    return true;
     // TODO(brianwilkerson) Define a hint corresponding to these errors and
     // report it if appropriate.
 //        // test the propagated type of the expression
@@ -3420,7 +3331,7 @@
    *
    * See [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR].
    */
-  bool _checkForFieldInitializingFormalRedirectingConstructor(
+  void _checkForFieldInitializingFormalRedirectingConstructor(
       FieldFormalParameter parameter) {
     ConstructorDeclaration constructor =
         parameter.getAncestor((node) => node is ConstructorDeclaration);
@@ -3428,14 +3339,14 @@
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
           parameter);
-      return true;
+      return;
     }
     // constructor cannot be a factory
     if (constructor.factoryKeyword != null) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR,
           parameter);
-      return true;
+      return;
     }
     // constructor cannot have a redirection
     for (ConstructorInitializer initializer in constructor.initializers) {
@@ -3443,11 +3354,9 @@
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR,
             parameter);
-        return true;
+        return;
       }
     }
-    // OK
-    return false;
   }
 
   /**
@@ -3457,31 +3366,27 @@
    * See [CompileTimeErrorCode.CONST_NOT_INITIALIZED], and
    * [StaticWarningCode.FINAL_NOT_INITIALIZED].
    */
-  bool _checkForFinalNotInitialized(VariableDeclarationList list) {
-    if (_isInNativeClass) {
-      return false;
+  void _checkForFinalNotInitialized(VariableDeclarationList list) {
+    if (_isInNativeClass || list.isSynthetic) {
+      return;
     }
-    bool foundError = false;
-    if (!list.isSynthetic) {
-      NodeList<VariableDeclaration> variables = list.variables;
-      for (VariableDeclaration variable in variables) {
-        if (variable.initializer == null) {
-          if (list.isConst) {
-            _errorReporter.reportErrorForNode(
-                CompileTimeErrorCode.CONST_NOT_INITIALIZED,
-                variable.name,
-                [variable.name.name]);
-          } else if (list.isFinal) {
-            _errorReporter.reportErrorForNode(
-                StaticWarningCode.FINAL_NOT_INITIALIZED,
-                variable.name,
-                [variable.name.name]);
-          }
-          foundError = true;
+
+    NodeList<VariableDeclaration> variables = list.variables;
+    for (VariableDeclaration variable in variables) {
+      if (variable.initializer == null) {
+        if (list.isConst) {
+          _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.CONST_NOT_INITIALIZED,
+              variable.name,
+              [variable.name.name]);
+        } else if (list.isFinal) {
+          _errorReporter.reportErrorForNode(
+              StaticWarningCode.FINAL_NOT_INITIALIZED,
+              variable.name,
+              [variable.name.name]);
         }
       }
     }
-    return foundError;
   }
 
   /**
@@ -3493,21 +3398,18 @@
    * See [CompileTimeErrorCode.CONST_NOT_INITIALIZED], and
    * [StaticWarningCode.FINAL_NOT_INITIALIZED].
    */
-  bool _checkForFinalNotInitializedInClass(ClassDeclaration declaration) {
+  void _checkForFinalNotInitializedInClass(ClassDeclaration declaration) {
     NodeList<ClassMember> classMembers = declaration.members;
     for (ClassMember classMember in classMembers) {
       if (classMember is ConstructorDeclaration) {
-        return false;
+        return;
       }
     }
-    bool foundError = false;
     for (ClassMember classMember in classMembers) {
-      if (classMember is FieldDeclaration &&
-          _checkForFinalNotInitialized(classMember.fields)) {
-        foundError = true;
+      if (classMember is FieldDeclaration) {
+        _checkForFinalNotInitialized(classMember.fields);
       }
     }
-    return foundError;
   }
 
   /**
@@ -3552,18 +3454,14 @@
    *
    * See [CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS].
    */
-  bool _checkForImplementsDeferredClass(ImplementsClause clause) {
+  void _checkForImplementsDeferredClass(ImplementsClause clause) {
     if (clause == null) {
-      return false;
+      return;
     }
-    bool foundError = false;
     for (TypeName type in clause.interfaces) {
-      if (_checkForExtendsOrImplementsDeferredClass(
-          type, CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS)) {
-        foundError = true;
-      }
+      _checkForExtendsOrImplementsDeferredClass(
+          type, CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS);
     }
-    return foundError;
   }
 
   /**
@@ -3594,41 +3492,41 @@
    * [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC].
    * TODO(scheglov) rename thid method
    */
-  bool _checkForImplicitThisReferenceInInitializer(
+  void _checkForImplicitThisReferenceInInitializer(
       SimpleIdentifier identifier) {
     if (!_isInConstructorInitializer &&
         !_isInStaticMethod &&
         !_isInFactory &&
         !_isInInstanceVariableInitializer &&
         !_isInStaticVariableDeclaration) {
-      return false;
+      return;
     }
     // prepare element
     Element element = identifier.staticElement;
     if (!(element is MethodElement || element is PropertyAccessorElement)) {
-      return false;
+      return;
     }
     // static element
     ExecutableElement executableElement = element as ExecutableElement;
     if (executableElement.isStatic) {
-      return false;
+      return;
     }
     // not a class member
     Element enclosingElement = element.enclosingElement;
     if (enclosingElement is! ClassElement) {
-      return false;
+      return;
     }
     // comment
     AstNode parent = identifier.parent;
     if (parent is CommentReference) {
-      return false;
+      return;
     }
     // qualified method invocation
     if (parent is MethodInvocation) {
       MethodInvocation invocation = parent;
       if (identical(invocation.methodName, identifier) &&
           invocation.realTarget != null) {
-        return false;
+        return;
       }
     }
     // qualified property access
@@ -3636,16 +3534,16 @@
       PropertyAccess access = parent;
       if (identical(access.propertyName, identifier) &&
           access.realTarget != null) {
-        return false;
+        return;
       }
     }
     if (parent is PrefixedIdentifier) {
       PrefixedIdentifier prefixed = parent;
       if (identical(prefixed.identifier, identifier)) {
-        return false;
+        return;
       }
     }
-    // report problem
+
     if (_isInStaticMethod) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC, identifier);
@@ -3657,7 +3555,6 @@
           CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
           identifier);
     }
-    return true;
   }
 
   /**
@@ -3668,33 +3565,28 @@
    *
    * See [CompileTimeErrorCode.IMPORT_DUPLICATED_LIBRARY_NAME].
    */
-  bool _checkForImportDuplicateLibraryName(
+  void _checkForImportDuplicateLibraryName(
       ImportDirective directive, ImportElement importElement) {
     // prepare imported library
     LibraryElement nodeLibrary = importElement.importedLibrary;
     if (nodeLibrary == null) {
-      return false;
+      return;
     }
     String name = nodeLibrary.name;
     // check if there is another imported library with the same name
     LibraryElement prevLibrary = _nameToImportElement[name];
     if (prevLibrary != null) {
-      if (prevLibrary != nodeLibrary) {
-        if (!name.isEmpty) {
-          _errorReporter.reportErrorForNode(
-              StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED, directive, [
-            prevLibrary.definingCompilationUnit.displayName,
-            nodeLibrary.definingCompilationUnit.displayName,
-            name
-          ]);
-        }
-        return true;
+      if (prevLibrary != nodeLibrary && !name.isEmpty) {
+        _errorReporter.reportErrorForNode(
+            StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED, directive, [
+          prevLibrary.definingCompilationUnit.displayName,
+          nodeLibrary.definingCompilationUnit.displayName,
+          name
+        ]);
       }
     } else {
       _nameToImportElement[name] = nodeLibrary;
     }
-    // OK
-    return false;
   }
 
   /**
@@ -3705,27 +3597,23 @@
    *
    * See [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY].
    */
-  bool _checkForImportInternalLibrary(
+  void _checkForImportInternalLibrary(
       ImportDirective directive, ImportElement importElement) {
     if (_isInSystemLibrary) {
-      return false;
+      return;
     }
     // should be private
     DartSdk sdk = _currentLibrary.context.sourceFactory.dartSdk;
     String uri = importElement.uri;
     SdkLibrary sdkLibrary = sdk.getSdkLibrary(uri);
-    if (sdkLibrary == null) {
-      return false;
+    if (sdkLibrary == null || !sdkLibrary.isInternal) {
+      return;
     }
-    if (!sdkLibrary.isInternal) {
-      return false;
-    }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
         directive,
         [directive.uri]);
-    return true;
   }
 
   /**
@@ -3734,7 +3622,7 @@
    *
    * See [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE].
    */
-  bool _checkForInconsistentMethodInheritance() {
+  void _checkForInconsistentMethodInheritance() {
     // Ensure that the inheritance manager has a chance to generate all errors
     // we may care about, note that we ensure that the interfaces data since
     // there are no errors.
@@ -3742,12 +3630,68 @@
     HashSet<AnalysisError> errors =
         _inheritanceManager.getErrors(_enclosingClass);
     if (errors == null || errors.isEmpty) {
-      return false;
+      return;
     }
     for (AnalysisError error in errors) {
       _errorReporter.reportError(error);
     }
-    return true;
+    return;
+  }
+
+  /**
+   * Check for a type mis-match between the iterable expression and the
+   * assigned variable in a for-in statement.
+   */
+  void _checkForInIterable(ForEachStatement node) {
+    // Ignore malformed for statements.
+    if (node.identifier == null && node.loopVariable == null) {
+      return;
+    }
+
+    DartType iterableType = getStaticType(node.iterable);
+    if (iterableType.isDynamic) {
+      return;
+    }
+
+    // The type of the loop variable.
+    SimpleIdentifier variable = node.identifier != null
+        ? node.identifier
+        : node.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 (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]);
+    }
   }
 
   /**
@@ -3756,36 +3700,35 @@
    *
    * See [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER].
    */
-  bool _checkForInstanceAccessToStaticMember(
+  void _checkForInstanceAccessToStaticMember(
       ClassElement typeReference, SimpleIdentifier name) {
     // OK, in comment
     if (_isInComment) {
-      return false;
+      return;
     }
     // OK, target is a type
     if (typeReference != null) {
-      return false;
+      return;
     }
     // prepare member Element
     Element element = name.staticElement;
     if (element is! ExecutableElement) {
-      return false;
+      return;
     }
     ExecutableElement executableElement = element as ExecutableElement;
     // OK, top-level element
     if (executableElement.enclosingElement is! ClassElement) {
-      return false;
+      return;
     }
     // OK, instance member
     if (!executableElement.isStatic) {
-      return false;
+      return;
     }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
         name,
         [name.name]);
-    return true;
   }
 
   /**
@@ -3870,15 +3813,15 @@
    *
    * See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
    */
-  bool _checkForIntNotAssignable(Expression argument) {
+  void _checkForIntNotAssignable(Expression argument) {
     if (argument == null) {
-      return false;
+      return;
     }
     ParameterElement staticParameterElement = argument.staticParameterElement;
     DartType staticParameterType =
         staticParameterElement == null ? null : staticParameterElement.type;
-    return _checkForArgumentTypeNotAssignable(argument, staticParameterType,
-        _intType, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+    _checkForArgumentTypeNotAssignable(argument, staticParameterType, _intType,
+        StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
   }
 
   /**
@@ -3886,17 +3829,13 @@
    *
    * See [CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY].
    */
-  bool _checkForInvalidAnnotationFromDeferredLibrary(Annotation annotation) {
+  void _checkForInvalidAnnotationFromDeferredLibrary(Annotation annotation) {
     Identifier nameIdentifier = annotation.name;
-    if (nameIdentifier is PrefixedIdentifier) {
-      if (nameIdentifier.isDeferred) {
-        _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY,
-            annotation.name);
-        return true;
-      }
+    if (nameIdentifier is PrefixedIdentifier && nameIdentifier.isDeferred) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY,
+          annotation.name);
     }
-    return false;
   }
 
   /**
@@ -3905,9 +3844,9 @@
    *
    * See [StaticTypeWarningCode.INVALID_ASSIGNMENT].
    */
-  bool _checkForInvalidAssignment(Expression lhs, Expression rhs) {
+  void _checkForInvalidAssignment(Expression lhs, Expression rhs) {
     if (lhs == null || rhs == null) {
-      return false;
+      return;
     }
     VariableElement leftVariableElement = getVariableElement(lhs);
     DartType leftType = (leftVariableElement == null)
@@ -3919,9 +3858,7 @@
           StaticTypeWarningCode.INVALID_ASSIGNMENT,
           rhs,
           [staticRightType, leftType]);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -3931,10 +3868,10 @@
    *
    * See [StaticTypeWarningCode.INVALID_ASSIGNMENT].
    */
-  bool _checkForInvalidCompoundAssignment(
+  void _checkForInvalidCompoundAssignment(
       AssignmentExpression assignment, Expression lhs, Expression rhs) {
     if (lhs == null) {
-      return false;
+      return;
     }
     VariableElement leftVariableElement = getVariableElement(lhs);
     DartType leftType = (leftVariableElement == null)
@@ -3942,18 +3879,16 @@
         : leftVariableElement.type;
     MethodElement invokedMethod = assignment.staticElement;
     if (invokedMethod == null) {
-      return false;
+      return;
     }
     DartType rightType = invokedMethod.type.returnType;
     if (leftType == null || rightType == null) {
-      return false;
+      return;
     }
     if (!_typeSystem.isAssignableTo(rightType, leftType)) {
       _errorReporter.reportTypeErrorForNode(
           StaticTypeWarningCode.INVALID_ASSIGNMENT, rhs, [rightType, leftType]);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -3990,14 +3925,12 @@
    * Check to see whether the given function [body] has a modifier associated
    * with it, and report it as an error if it does.
    */
-  bool _checkForInvalidModifierOnBody(
+  void _checkForInvalidModifierOnBody(
       FunctionBody body, CompileTimeErrorCode errorCode) {
     Token keyword = body.keyword;
     if (keyword != null) {
       _errorReporter.reportErrorForToken(errorCode, keyword, [keyword.lexeme]);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -4005,13 +3938,11 @@
    *
    * See [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS].
    */
-  bool _checkForInvalidReferenceToThis(ThisExpression expression) {
+  void _checkForInvalidReferenceToThis(ThisExpression expression) {
     if (!_isThisInValidContext(expression)) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS, expression);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -4020,76 +3951,71 @@
    * [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST] or
    * [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP].
    */
-  bool _checkForInvalidTypeArgumentInConstTypedLiteral(
+  void _checkForInvalidTypeArgumentInConstTypedLiteral(
       NodeList<TypeName> arguments, ErrorCode errorCode) {
-    bool foundError = false;
     for (TypeName typeName in arguments) {
       if (typeName.type is TypeParameterType) {
         _errorReporter.reportErrorForNode(errorCode, typeName, [typeName.name]);
-        foundError = true;
       }
     }
-    return foundError;
   }
 
   /**
-   * Verify that the elements given list [literal] are subtypes of the specified
-   * element type. The [typeArguments] are the type arguments.
+   * Verify that the elements given list [literal] are subtypes of the list's
+   * static type.
    *
    * See [CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE], and
    * [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE].
    */
-  bool _checkForListElementTypeNotAssignable(
-      ListLiteral literal, TypeArgumentList typeArguments) {
-    NodeList<TypeName> typeNames = typeArguments.arguments;
-    if (typeNames.length < 1) {
-      return false;
-    }
-    DartType listElementType = typeNames[0].type;
+  void _checkForListElementTypeNotAssignable(ListLiteral 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 hasProblems = false;
     for (Expression element in literal.elements) {
       if (literal.constKeyword != null) {
         // TODO(paulberry): this error should be based on the actual type of the
         // list element, not the static type.  See dartbug.com/21119.
-        if (_checkForArgumentTypeNotAssignableWithExpectedTypes(
+        _checkForArgumentTypeNotAssignableWithExpectedTypes(
             element,
             listElementType,
-            CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE)) {
-          hasProblems = true;
-        }
+            CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE);
       }
-      if (_checkForArgumentTypeNotAssignableWithExpectedTypes(
-          element,
-          listElementType,
-          StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE)) {
-        hasProblems = true;
-      }
+      _checkForArgumentTypeNotAssignableWithExpectedTypes(element,
+          listElementType, StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE);
     }
-    return hasProblems;
   }
 
   /**
    * Verify that the key/value of entries of the given map [literal] are
-   * subtypes of the key/value types specified in the type arguments. The
-   * [typeArguments] are the type arguments.
+   * 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].
    */
-  bool _checkForMapTypeNotAssignable(
-      MapLiteral literal, TypeArgumentList typeArguments) {
-    // Prepare maps key/value types.
-    NodeList<TypeName> typeNames = typeArguments.arguments;
-    if (typeNames.length < 2) {
-      return false;
-    }
-    DartType keyType = typeNames[0].type;
-    DartType valueType = typeNames[1].type;
-    // Check every map entry.
-    bool hasProblems = false;
+  void _checkForMapTypeNotAssignable(MapLiteral 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;
+    assert(mapType is InterfaceTypeImpl);
+
+    List<DartType> typeArguments = (mapType as InterfaceTypeImpl).typeArguments;
+    assert(typeArguments.length == 2);
+    DartType keyType = typeArguments[0];
+    DartType valueType = typeArguments[1];
+
     NodeList<MapLiteralEntry> entries = literal.entries;
     for (MapLiteralEntry entry in entries) {
       Expression key = entry.key;
@@ -4097,27 +4023,16 @@
       if (literal.constKeyword != null) {
         // TODO(paulberry): this error should be based on the actual type of the
         // list element, not the static type.  See dartbug.com/21119.
-        if (_checkForArgumentTypeNotAssignableWithExpectedTypes(key, keyType,
-            CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE)) {
-          hasProblems = true;
-        }
-        if (_checkForArgumentTypeNotAssignableWithExpectedTypes(
-            value,
-            valueType,
-            CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE)) {
-          hasProblems = true;
-        }
+        _checkForArgumentTypeNotAssignableWithExpectedTypes(key, keyType,
+            CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE);
+        _checkForArgumentTypeNotAssignableWithExpectedTypes(value, valueType,
+            CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE);
       }
-      if (_checkForArgumentTypeNotAssignableWithExpectedTypes(
-          key, keyType, StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE)) {
-        hasProblems = true;
-      }
-      if (_checkForArgumentTypeNotAssignableWithExpectedTypes(
-          value, valueType, StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE)) {
-        hasProblems = true;
-      }
+      _checkForArgumentTypeNotAssignableWithExpectedTypes(
+          key, keyType, StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE);
+      _checkForArgumentTypeNotAssignableWithExpectedTypes(
+          value, valueType, StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE);
     }
-    return hasProblems;
   }
 
   /**
@@ -4126,26 +4041,23 @@
    *
    * See [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME].
    */
-  bool _checkForMemberWithClassName() {
+  void _checkForMemberWithClassName() {
     if (_enclosingClass == null) {
-      return false;
+      return;
     }
     String className = _enclosingClass.name;
     if (className == null) {
-      return false;
+      return;
     }
-    bool problemReported = false;
+
     // check accessors
     for (PropertyAccessorElement accessor in _enclosingClass.accessors) {
       if (className == accessor.name) {
         _errorReporter.reportErrorForElement(
             CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME, accessor);
-        problemReported = true;
       }
     }
     // don't check methods, they would be constructors
-    // done
-    return problemReported;
   }
 
   /**
@@ -4155,12 +4067,12 @@
    * See [StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES], and
    * [StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE].
    */
-  bool _checkForMismatchedAccessorTypes(
+  void _checkForMismatchedAccessorTypes(
       Declaration accessorDeclaration, String accessorTextName) {
     ExecutableElement accessorElement =
         accessorDeclaration.element as ExecutableElement;
     if (accessorElement is! PropertyAccessorElement) {
-      return false;
+      return;
     }
     PropertyAccessorElement propertyAccessorElement =
         accessorElement as PropertyAccessorElement;
@@ -4175,7 +4087,7 @@
       if (counterpartAccessor != null &&
           identical(counterpartAccessor.enclosingElement,
               propertyAccessorElement.enclosingElement)) {
-        return false;
+        return;
       }
     }
     if (counterpartAccessor == null) {
@@ -4202,7 +4114,7 @@
         }
       }
       if (counterpartAccessor == null) {
-        return false;
+        return;
       }
     }
     // Default of null == no accessor or no type (dynamic)
@@ -4226,7 +4138,6 @@
             StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES,
             accessorDeclaration,
             [accessorTextName, setterType, getterType]);
-        return true;
       } else {
         _errorReporter.reportTypeErrorForNode(
             StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE,
@@ -4238,7 +4149,6 @@
         ]);
       }
     }
-    return false;
   }
 
   /**
@@ -4246,23 +4156,23 @@
    * an enum type either have a default case or include all of the enum
    * constants.
    */
-  bool _checkForMissingEnumConstantInSwitch(SwitchStatement statement) {
+  void _checkForMissingEnumConstantInSwitch(SwitchStatement statement) {
     // TODO(brianwilkerson) This needs to be checked after constant values have
     // been computed.
     Expression expression = statement.expression;
     DartType expressionType = getStaticType(expression);
     if (expressionType == null) {
-      return false;
+      return;
     }
     Element expressionElement = expressionType.element;
     if (expressionElement is! ClassElement) {
-      return false;
+      return;
     }
     ClassElement classElement = expressionElement as ClassElement;
     if (!classElement.isEnum) {
-      return false;
+      return;
     }
-    List<String> constantNames = new List<String>();
+    List<String> constantNames = <String>[];
     List<FieldElement> fields = classElement.fields;
     int fieldCount = fields.length;
     for (int i = 0; i < fieldCount; i++) {
@@ -4276,18 +4186,17 @@
     for (int i = 0; i < memberCount; i++) {
       SwitchMember member = members[i];
       if (member is SwitchDefault) {
-        return false;
+        return;
       }
       String constantName = _getConstantName((member as SwitchCase).expression);
       if (constantName != null) {
         constantNames.remove(constantName);
       }
     }
-    int nameCount = constantNames.length;
-    if (nameCount == 0) {
-      return false;
+    if (constantNames.isEmpty) {
+      return;
     }
-    for (int i = 0; i < nameCount; i++) {
+    for (int i = 0; i < constantNames.length; i++) {
       int offset = statement.offset;
       int end = statement.rightParenthesis.end;
       _errorReporter.reportErrorForOffset(
@@ -4296,7 +4205,38 @@
           end - offset,
           [constantNames[i]]);
     }
-    return true;
+  }
+
+  void _checkForMissingJSLibAnnotation(Annotation node) {
+    if (node.elementAnnotation?.isJS ?? false) {
+      Element element = ElementLocator.locate(node.parent);
+      if (element?.library?.isJS != true) {
+        _errorReporter.reportErrorForNode(
+            HintCode.MISSING_JS_LIB_ANNOTATION, node, [element.name]);
+      }
+    }
+  }
+
+  void _checkForMissingRequiredParam(
+      DartType type, ArgumentList argumentList, AstNode node) {
+    if (type is FunctionType) {
+      List<ParameterElement> parameters = type.parameters;
+      for (ParameterElement param in parameters) {
+        if (param.parameterKind == ParameterKind.NAMED) {
+          ElementAnnotationImpl annotation = _getRequiredAnnotation(param);
+          if (annotation != null) {
+            String paramName = param.name;
+            if (!_containsNamedExpression(argumentList, paramName)) {
+              DartObject constantValue = annotation.constantValue;
+              String reason =
+                  constantValue.getField('reason')?.toStringValue() ?? '';
+              _errorReporter.reportErrorForNode(
+                  HintCode.MISSING_REQUIRED_PARAM, node, [paramName, reason]);
+            }
+          }
+        }
+      }
+    }
   }
 
   /**
@@ -4305,24 +4245,20 @@
    *
    * See [StaticWarningCode.MIXED_RETURN_TYPES].
    */
-  bool _checkForMixedReturns(BlockFunctionBody body) {
+  void _checkForMixedReturns(BlockFunctionBody body) {
     if (_hasReturnWithoutValue) {
-      return false;
+      return;
     }
-    int withCount = _returnsWith.length;
-    int withoutCount = _returnsWithout.length;
-    if (withCount > 0 && withoutCount > 0) {
-      for (int i = 0; i < withCount; i++) {
-        _errorReporter.reportErrorForToken(StaticWarningCode.MIXED_RETURN_TYPES,
-            _returnsWith[i].returnKeyword);
+    if (_returnsWith.isNotEmpty && _returnsWithout.isNotEmpty) {
+      for (ReturnStatement returnWith in _returnsWith) {
+        _errorReporter.reportErrorForToken(
+            StaticWarningCode.MIXED_RETURN_TYPES, returnWith.returnKeyword);
       }
-      for (int i = 0; i < withoutCount; i++) {
-        _errorReporter.reportErrorForToken(StaticWarningCode.MIXED_RETURN_TYPES,
-            _returnsWithout[i].returnKeyword);
+      for (ReturnStatement returnWithout in _returnsWithout) {
+        _errorReporter.reportErrorForToken(
+            StaticWarningCode.MIXED_RETURN_TYPES, returnWithout.returnKeyword);
       }
-      return true;
     }
-    return false;
   }
 
   /**
@@ -4351,7 +4287,7 @@
    * appropriate.
    */
   void _checkForMixinHasNoConstructors(AstNode node) {
-    if ((_enclosingClass as ClassElementImpl).doesMixinLackConstructors) {
+    if (_enclosingClass.doesMixinLackConstructors) {
       ErrorCode errorCode = CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS;
       _errorReporter
           .reportErrorForNode(errorCode, node, [_enclosingClass.supertype]);
@@ -4404,18 +4340,29 @@
    *
    * See [CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS].
    */
-  bool _checkForMultipleSuperInitializers(ConstructorDeclaration constructor) {
-    int numSuperInitializers = 0;
+  void _checkForMultipleSuperInitializers(ConstructorDeclaration constructor) {
+    bool hasSuperInitializer = false;
     for (ConstructorInitializer initializer in constructor.initializers) {
       if (initializer is SuperConstructorInvocation) {
-        numSuperInitializers++;
-        if (numSuperInitializers > 1) {
+        if (hasSuperInitializer) {
           _errorReporter.reportErrorForNode(
               CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS, initializer);
         }
+        hasSuperInitializer = true;
       }
     }
-    return numSuperInitializers > 0;
+  }
+
+  void _checkForMustCallSuper(MethodDeclaration node) {
+    MethodElement element = _findOverriddenMemberThatMustCallSuper(node);
+    if (element != null) {
+      _InvocationCollector collector = new _InvocationCollector();
+      node.accept(collector);
+      if (!collector.superCalls.contains(element.name)) {
+        _errorReporter.reportErrorForNode(HintCode.MUST_CALL_SUPER, node.name,
+            [element.enclosingElement.name]);
+      }
+    }
   }
 
   /**
@@ -4423,13 +4370,11 @@
    *
    * See [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE].
    */
-  bool _checkForNativeFunctionBodyInNonSDKCode(NativeFunctionBody body) {
+  void _checkForNativeFunctionBodyInNonSdkCode(NativeFunctionBody body) {
     if (!_isInSystemLibrary && !_hasExtUri) {
       _errorReporter.reportErrorForNode(
           ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, body);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -4442,20 +4387,20 @@
    *
    * See [StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR].
    */
-  bool _checkForNewWithUndefinedConstructor(
+  void _checkForNewWithUndefinedConstructor(
       InstanceCreationExpression expression,
       ConstructorName constructorName,
       TypeName typeName) {
     // OK if resolved
     if (expression.staticElement != null) {
-      return false;
+      return;
     }
     DartType type = typeName.type;
     if (type is InterfaceType) {
       ClassElement element = type.element;
       if (element != null && element.isEnum) {
         // We have already reported the error.
-        return false;
+        return;
       }
     }
     // prepare class name
@@ -4473,7 +4418,6 @@
           constructorName,
           [className]);
     }
-    return true;
   }
 
   /**
@@ -4483,22 +4427,21 @@
    *
    * See [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT].
    */
-  bool _checkForNoDefaultSuperConstructorImplicit(
+  void _checkForNoDefaultSuperConstructorImplicit(
       ClassDeclaration declaration) {
     // do nothing if mixin errors have already been reported for this class.
-    ClassElementImpl enclosingClass = _enclosingClass;
-    if (enclosingClass.doesMixinLackConstructors) {
-      return false;
+    if (_enclosingClass.doesMixinLackConstructors) {
+      return;
     }
     // do nothing if there is explicit constructor
     List<ConstructorElement> constructors = _enclosingClass.constructors;
     if (!constructors[0].isSynthetic) {
-      return false;
+      return;
     }
     // prepare super
     InterfaceType superType = _enclosingClass.supertype;
     if (superType == null) {
-      return false;
+      return;
     }
     ClassElement superElement = superType.element;
     // try to find default generative super constructor
@@ -4510,20 +4453,19 @@
             CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
             declaration.name,
             [superUnnamedConstructor]);
-        return true;
+        return;
       }
       if (superUnnamedConstructor.isDefaultConstructor &&
           _enclosingClass
               .isSuperConstructorAccessible(superUnnamedConstructor)) {
-        return true;
+        return;
       }
     }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
         declaration.name,
         [superType.displayName]);
-    return true;
   }
 
   /**
@@ -4538,12 +4480,12 @@
    * [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR], and
    * [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS].
    */
-  bool _checkForNonAbstractClassInheritsAbstractMember(
+  void _checkForNonAbstractClassInheritsAbstractMember(
       SimpleIdentifier classNameNode) {
     if (_enclosingClass.isAbstract) {
-      return false;
+      return;
     } else if (_hasNoSuchMethod(_enclosingClass)) {
-      return false;
+      return;
     }
     //
     // Store in local sets the set of all method and accessor names
@@ -4624,7 +4566,7 @@
     // class.
     int missingOverridesSize = missingOverrides.length;
     if (missingOverridesSize == 0) {
-      return false;
+      return;
     }
     List<ExecutableElement> missingOverridesArray =
         new List.from(missingOverrides);
@@ -4698,7 +4640,6 @@
     analysisError.setProperty(
         ErrorProperty.UNIMPLEMENTED_METHODS, missingOverridesArray);
     _errorReporter.reportError(analysisError);
-    return true;
   }
 
   /**
@@ -4707,15 +4648,13 @@
    *
    * See [StaticTypeWarningCode.NON_BOOL_CONDITION].
    */
-  bool _checkForNonBoolCondition(Expression condition) {
+  void _checkForNonBoolCondition(Expression condition) {
     DartType conditionType = getStaticType(condition);
     if (conditionType != null &&
         !_typeSystem.isAssignableTo(conditionType, _boolType)) {
       _errorReporter.reportErrorForNode(
           StaticTypeWarningCode.NON_BOOL_CONDITION, condition);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -4724,14 +4663,13 @@
    *
    * See [StaticTypeWarningCode.NON_BOOL_EXPRESSION].
    */
-  bool _checkForNonBoolExpression(AssertStatement statement) {
+  void _checkForNonBoolExpression(AssertStatement statement) {
     Expression expression = statement.condition;
     DartType type = getStaticType(expression);
     if (type is InterfaceType) {
       if (!_typeSystem.isAssignableTo(type, _boolType)) {
         _errorReporter.reportErrorForNode(
             StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression);
-        return true;
       }
     } else if (type is FunctionType) {
       FunctionType functionType = type;
@@ -4739,10 +4677,8 @@
           !_typeSystem.isAssignableTo(functionType.returnType, _boolType)) {
         _errorReporter.reportErrorForNode(
             StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression);
-        return true;
       }
     }
-    return false;
   }
 
   /**
@@ -4750,15 +4686,13 @@
    *
    * See [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION].
    */
-  bool _checkForNonBoolNegationExpression(Expression expression) {
+  void _checkForNonBoolNegationExpression(Expression expression) {
     DartType conditionType = getStaticType(expression);
     if (conditionType != null &&
         !_typeSystem.isAssignableTo(conditionType, _boolType)) {
       _errorReporter.reportErrorForNode(
           StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, expression);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -4769,29 +4703,28 @@
    *
    * See [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT].
    */
-  bool _checkForNonConstMapAsExpressionStatement(MapLiteral literal) {
+  void _checkForNonConstMapAsExpressionStatement(MapLiteral literal) {
     // "const"
     if (literal.constKeyword != null) {
-      return false;
+      return;
     }
     // has type arguments
     if (literal.typeArguments != null) {
-      return false;
+      return;
     }
     // prepare statement
     Statement statement =
         literal.getAncestor((node) => node is ExpressionStatement);
     if (statement == null) {
-      return false;
+      return;
     }
     // OK, statement does not start with map
     if (!identical(statement.beginToken, literal.beginToken)) {
-      return false;
+      return;
     }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT, literal);
-    return true;
   }
 
   /**
@@ -4800,11 +4733,11 @@
    *
    * See [StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR].
    */
-  bool _checkForNonVoidReturnTypeForOperator(MethodDeclaration declaration) {
+  void _checkForNonVoidReturnTypeForOperator(MethodDeclaration declaration) {
     // check that []= operator
     SimpleIdentifier name = declaration.name;
     if (name.name != "[]=") {
-      return false;
+      return;
     }
     // check return type
     TypeName typeName = declaration.returnType;
@@ -4815,8 +4748,6 @@
             StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR, typeName);
       }
     }
-    // no warning
-    return false;
   }
 
   /**
@@ -4825,7 +4756,7 @@
    *
    * See [StaticWarningCode.NON_VOID_RETURN_FOR_SETTER].
    */
-  bool _checkForNonVoidReturnTypeForSetter(TypeName typeName) {
+  void _checkForNonVoidReturnTypeForSetter(TypeName typeName) {
     if (typeName != null) {
       DartType type = typeName.type;
       if (type != null && !type.isVoid) {
@@ -4833,7 +4764,6 @@
             StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, typeName);
       }
     }
-    return false;
   }
 
   /**
@@ -4843,22 +4773,20 @@
    *
    * See [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR].
    */
-  bool _checkForOptionalParameterInOperator(MethodDeclaration declaration) {
+  void _checkForOptionalParameterInOperator(MethodDeclaration declaration) {
     FormalParameterList parameterList = declaration.parameters;
     if (parameterList == null) {
-      return false;
+      return;
     }
-    bool foundError = false;
+
     NodeList<FormalParameter> formalParameters = parameterList.parameters;
     for (FormalParameter formalParameter in formalParameters) {
       if (formalParameter.kind.isOptional) {
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR,
             formalParameter);
-        foundError = true;
       }
     }
-    return foundError;
   }
 
   /**
@@ -4866,20 +4794,19 @@
    *
    * See [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER].
    */
-  bool _checkForPrivateOptionalParameter(FormalParameter parameter) {
+  void _checkForPrivateOptionalParameter(FormalParameter parameter) {
     // should be named parameter
     if (parameter.kind != ParameterKind.NAMED) {
-      return false;
+      return;
     }
     // name should start with '_'
     SimpleIdentifier name = parameter.identifier;
     if (name.isSynthetic || !StringUtilities.startsWithChar(name.name, 0x5F)) {
-      return false;
+      return;
     }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER, parameter);
-    return true;
   }
 
   /**
@@ -4889,28 +4816,23 @@
    *
    * See [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT].
    */
-  bool _checkForRecursiveConstructorRedirect(ConstructorDeclaration declaration,
+  void _checkForRecursiveConstructorRedirect(ConstructorDeclaration declaration,
       ConstructorElement constructorElement) {
     // we check generative constructor here
     if (declaration.factoryKeyword != null) {
-      return false;
+      return;
     }
-    // try to find redirecting constructor invocation and analyzer it for
+    // try to find redirecting constructor invocation and analyze it for
     // recursion
     for (ConstructorInitializer initializer in declaration.initializers) {
       if (initializer is RedirectingConstructorInvocation) {
-        // OK if no cycle
-        if (!_hasRedirectingFactoryConstructorCycle(constructorElement)) {
-          return false;
+        if (_hasRedirectingFactoryConstructorCycle(constructorElement)) {
+          _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT, initializer);
         }
-        // report error
-        _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT, initializer);
-        return true;
+        return;
       }
     }
-    // OK, no redirecting constructor invocation
-    return false;
   }
 
   /**
@@ -4946,12 +4868,12 @@
    * [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS], and
    * [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS].
    */
-  bool _checkForRecursiveInterfaceInheritance(ClassElement element) {
+  void _checkForRecursiveInterfaceInheritance(ClassElement element) {
     if (element == null) {
-      return false;
+      return;
     }
-    return _safeCheckForRecursiveInterfaceInheritance(
-        element, new List<ClassElement>());
+
+    _safeCheckForRecursiveInterfaceInheritance(element, <ClassElement>[]);
   }
 
   /**
@@ -4965,12 +4887,9 @@
    * [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR], and
    * [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR].
    */
-  bool _checkForRedirectingConstructorErrorCodes(
+  void _checkForRedirectingConstructorErrorCodes(
       ConstructorDeclaration declaration) {
-    bool errorReported = false;
-    //
     // Check for default values in the parameters
-    //
     ConstructorName redirectedConstructor = declaration.redirectedConstructor;
     if (redirectedConstructor != null) {
       for (FormalParameter parameter in declaration.parameters.parameters) {
@@ -4980,7 +4899,6 @@
               CompileTimeErrorCode
                   .DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR,
               parameter.identifier);
-          errorReported = true;
         }
       }
     }
@@ -4992,7 +4910,6 @@
           _errorReporter.reportErrorForNode(
               CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS,
               initializer);
-          errorReported = true;
         }
         if (declaration.factoryKeyword == null) {
           RedirectingConstructorInvocation invocation = initializer;
@@ -5026,18 +4943,14 @@
           _errorReporter.reportErrorForNode(
               CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR,
               initializer);
-          errorReported = true;
         }
         if (initializer is ConstructorFieldInitializer) {
           _errorReporter.reportErrorForNode(
               CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR,
               initializer);
-          errorReported = true;
         }
       }
     }
-    // done
-    return errorReported;
   }
 
   /**
@@ -5047,36 +4960,35 @@
    *
    * See [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR].
    */
-  bool _checkForRedirectToNonConstConstructor(
+  void _checkForRedirectToNonConstConstructor(
       ConstructorDeclaration declaration, ConstructorElement element) {
     // prepare redirected constructor
     ConstructorName redirectedConstructorNode =
         declaration.redirectedConstructor;
     if (redirectedConstructorNode == null) {
-      return false;
+      return;
     }
     // prepare element
     if (element == null) {
-      return false;
+      return;
     }
     // OK, it is not 'const'
     if (!element.isConst) {
-      return false;
+      return;
     }
     // prepare redirected constructor
     ConstructorElement redirectedConstructor = element.redirectedConstructor;
     if (redirectedConstructor == null) {
-      return false;
+      return;
     }
     // OK, it is also 'const'
     if (redirectedConstructor.isConst) {
-      return false;
+      return;
     }
-    // report error
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR,
         redirectedConstructorNode);
-    return true;
   }
 
   /**
@@ -5084,13 +4996,11 @@
    *
    * See [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH].
    */
-  bool _checkForRethrowOutsideCatch(RethrowExpression expression) {
+  void _checkForRethrowOutsideCatch(RethrowExpression expression) {
     if (!_isInCatchClause) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH, expression);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -5099,21 +5009,20 @@
    *
    * See [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR].
    */
-  bool _checkForReturnInGenerativeConstructor(
+  void _checkForReturnInGenerativeConstructor(
       ConstructorDeclaration declaration) {
     // ignore factory
     if (declaration.factoryKeyword != null) {
-      return false;
+      return;
     }
     // block body (with possible return statement) is checked elsewhere
     FunctionBody body = declaration.body;
     if (body is! ExpressionFunctionBody) {
-      return false;
+      return;
     }
-    // report error
+
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR, body);
-    return true;
   }
 
   /**
@@ -5125,23 +5034,23 @@
    *
    * See [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE].
    */
-  bool _checkForReturnOfInvalidType(
+  void _checkForReturnOfInvalidType(
       Expression returnExpression, DartType expectedReturnType) {
     if (_enclosingFunction == null) {
-      return false;
+      return;
     }
     if (_inGenerator) {
       // "return expression;" is disallowed in generators, but this is checked
       // elsewhere.  Bare "return" is always allowed in generators regardless
       // of the return type.  So no need to do any further checking.
-      return false;
+      return;
     }
     DartType staticReturnType = _computeReturnTypeForMethod(returnExpression);
     if (expectedReturnType.isVoid) {
       if (staticReturnType.isVoid ||
           staticReturnType.isDynamic ||
           staticReturnType.isBottom) {
-        return false;
+        return;
       }
       _errorReporter.reportTypeErrorForNode(
           StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [
@@ -5149,16 +5058,16 @@
         expectedReturnType,
         _enclosingFunction.displayName
       ]);
-      return true;
+      return;
     }
     if (_typeSystem.isAssignableTo(staticReturnType, expectedReturnType)) {
-      return false;
+      return;
     }
     _errorReporter.reportTypeErrorForNode(
         StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
         returnExpression,
         [staticReturnType, expectedReturnType, _enclosingFunction.displayName]);
-    return true;
+
     // TODO(brianwilkerson) Define a hint corresponding to the warning and
     // report it if appropriate.
 //        Type propagatedReturnType = returnExpression.getPropagatedType();
@@ -5176,35 +5085,34 @@
   }
 
   /**
-   * Check the given [typeReference] and that the [name] is not the reference to
+   * Check the given [typeReference] and that the [name] is not a reference to
    * an instance member.
    *
    * See [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER].
    */
-  bool _checkForStaticAccessToInstanceMember(
+  void _checkForStaticAccessToInstanceMember(
       ClassElement typeReference, SimpleIdentifier name) {
     // OK, in comment
     if (_isInComment) {
-      return false;
+      return;
     }
     // OK, target is not a type
     if (typeReference == null) {
-      return false;
+      return;
     }
     // prepare member Element
     Element element = name.staticElement;
     if (element is! ExecutableElement) {
-      return false;
+      return;
     }
     ExecutableElement memberElement = element as ExecutableElement;
     // OK, static
     if (memberElement.isStatic) {
-      return false;
+      return;
     }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, name, [name.name]);
-    return true;
   }
 
   /**
@@ -5213,35 +5121,30 @@
    *
    * See [StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE].
    */
-  bool _checkForSwitchExpressionNotAssignable(SwitchStatement statement) {
+  void _checkForSwitchExpressionNotAssignable(SwitchStatement statement) {
     // prepare 'switch' expression type
     Expression expression = statement.expression;
     DartType expressionType = getStaticType(expression);
     if (expressionType == null) {
-      return false;
+      return;
     }
-    // compare with type of the first 'case'
-    NodeList<SwitchMember> members = statement.members;
-    for (SwitchMember switchMember in members) {
-      if (switchMember is! SwitchCase) {
-        continue;
-      }
-      SwitchCase switchCase = switchMember as SwitchCase;
-      // prepare 'case' type
-      Expression caseExpression = switchCase.expression;
-      DartType caseType = getStaticType(caseExpression);
-      // check types
-      if (_typeSystem.isAssignableTo(expressionType, caseType)) {
-        return false;
-      }
-      // report problem
+
+    // compare with type of the first non-default 'case'
+    SwitchCase switchCase = statement.members
+        .firstWhere((member) => member is SwitchCase, orElse: () => null);
+    if (switchCase == null) {
+      return;
+    }
+
+    Expression caseExpression = switchCase.expression;
+    DartType caseType = getStaticType(caseExpression);
+    // check types
+    if (!_typeSystem.isAssignableTo(expressionType, caseType)) {
       _errorReporter.reportErrorForNode(
           StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE,
           expression,
           [expressionType, caseType]);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -5250,15 +5153,12 @@
    *
    * See [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF].
    */
-  bool _checkForTypeAliasCannotReferenceItself_function(
+  void _checkForTypeAliasCannotReferenceItself_function(
       FunctionTypeAlias alias) {
-    FunctionTypeAliasElement element = alias.element;
-    if (!_hasTypedefSelfReference(element)) {
-      return false;
+    if (_hasTypedefSelfReference(alias.element)) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, alias);
     }
-    _errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, alias);
-    return true;
   }
 
   /**
@@ -5266,12 +5166,11 @@
    *
    * See [StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS].
    */
-  bool _checkForTypeAnnotationDeferredClass(TypeName name) {
+  void _checkForTypeAnnotationDeferredClass(TypeName name) {
     if (name != null && name.isDeferred) {
       _errorReporter.reportErrorForNode(
           StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, name, [name.name]);
     }
-    return false;
   }
 
   /**
@@ -5280,19 +5179,19 @@
    *
    * See [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS].
    */
-  bool _checkForTypeArgumentNotMatchingBounds(TypeName typeName) {
+  void _checkForTypeArgumentNotMatchingBounds(TypeName typeName) {
     if (typeName.typeArguments == null) {
-      return false;
+      return;
     }
     // prepare Type
     DartType type = typeName.type;
     if (type == null) {
-      return false;
+      return;
     }
     // prepare ClassElement
     Element element = type.element;
     if (element is! ClassElement) {
-      return false;
+      return;
     }
     ClassElement classElement = element as ClassElement;
     // prepare type parameters
@@ -5303,7 +5202,7 @@
     List<DartType> typeArguments = (type as InterfaceType).typeArguments;
     int loopThroughIndex =
         math.min(typeNameArgList.length, boundingElts.length);
-    bool foundError = false;
+
     for (int i = 0; i < loopThroughIndex; i++) {
       TypeName argTypeName = typeNameArgList[i];
       DartType argType = argTypeName.type;
@@ -5322,11 +5221,9 @@
           }
           _errorReporter.reportTypeErrorForNode(
               errorCode, argTypeName, [argType, boundType]);
-          foundError = true;
         }
       }
     }
-    return foundError;
   }
 
   /**
@@ -5335,21 +5232,18 @@
    *
    * See [StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC].
    */
-  bool _checkForTypeParameterReferencedByStatic(TypeName name) {
+  void _checkForTypeParameterReferencedByStatic(TypeName name) {
     if (_isInStaticMethod || _isInStaticVariableDeclaration) {
       DartType type = name.type;
-      if (type is TypeParameterType) {
-        // The class's type parameters are not in scope for static methods.
-        // However all other type parameters are legal (e.g. the static method's
-        // type parameters, or a local function's type parameters).
-        if (type.element.enclosingElement is ClassElement) {
-          _errorReporter.reportErrorForNode(
-              StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, name);
-          return true;
-        }
+      // The class's type parameters are not in scope for static methods.
+      // However all other type parameters are legal (e.g. the static method's
+      // type parameters, or a local function's type parameters).
+      if (type is TypeParameterType &&
+          type.element.enclosingElement is ClassElement) {
+        _errorReporter.reportErrorForNode(
+            StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, name);
       }
     }
-    return false;
   }
 
   /**
@@ -5357,23 +5251,22 @@
    *
    * See [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND].
    */
-  bool _checkForTypeParameterSupertypeOfItsBound(TypeParameter parameter) {
+  void _checkForTypeParameterSupertypeOfItsBound(TypeParameter parameter) {
     TypeParameterElement element = parameter.element;
     // prepare bound
     DartType bound = element.bound;
     if (bound == null) {
-      return false;
+      return;
     }
     // OK, type parameter is not supertype of its bound
     if (!bound.isMoreSpecificThan(element.type)) {
-      return false;
+      return;
     }
-    // report problem
+
     _errorReporter.reportErrorForNode(
         StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
         parameter,
         [element.displayName]);
-    return true;
   }
 
   /**
@@ -5385,40 +5278,36 @@
    * [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR], and
    * [StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT].
    */
-  bool _checkForUndefinedConstructorInInitializerImplicit(
+  void _checkForUndefinedConstructorInInitializerImplicit(
       ConstructorDeclaration constructor) {
     if (_enclosingClass == null) {
-      return false;
+      return;
     }
     // do nothing if mixin errors have already been reported for this class.
-    ClassElementImpl enclosingClass = _enclosingClass;
-    if (enclosingClass.doesMixinLackConstructors) {
-      return false;
+    if (_enclosingClass.doesMixinLackConstructors) {
+      return;
     }
-    //
+
     // Ignore if the constructor is not generative.
-    //
     if (constructor.factoryKeyword != null) {
-      return false;
+      return;
     }
-    //
+
     // Ignore if the constructor has either an implicit super constructor
     // invocation or a redirecting constructor invocation.
-    //
     for (ConstructorInitializer constructorInitializer
         in constructor.initializers) {
       if (constructorInitializer is SuperConstructorInvocation ||
           constructorInitializer is RedirectingConstructorInvocation) {
-        return false;
+        return;
       }
     }
-    //
+
     // Check to see whether the superclass has a non-factory unnamed
     // constructor.
-    //
     InterfaceType superType = _enclosingClass.supertype;
     if (superType == null) {
-      return false;
+      return;
     }
     ClassElement superElement = superType.element;
     ConstructorElement superUnnamedConstructor =
@@ -5429,32 +5318,25 @@
             CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
             constructor.returnType,
             [superUnnamedConstructor]);
-        return true;
-      }
-      if (!superUnnamedConstructor.isDefaultConstructor ||
+      } else if (!superUnnamedConstructor.isDefaultConstructor ||
           !_enclosingClass
               .isSuperConstructorAccessible(superUnnamedConstructor)) {
-        int offset;
-        int length;
-        {
-          Identifier returnType = constructor.returnType;
-          SimpleIdentifier name = constructor.name;
-          offset = returnType.offset;
-          length = (name != null ? name.end : returnType.end) - offset;
-        }
+        Identifier returnType = constructor.returnType;
+        SimpleIdentifier name = constructor.name;
+        int offset = returnType.offset;
+        int length = (name != null ? name.end : returnType.end) - offset;
         _errorReporter.reportErrorForOffset(
             CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT,
             offset,
             length,
             [superType.displayName]);
       }
-      return false;
+    } else {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT,
+          constructor.returnType,
+          [superElement.name]);
     }
-    _errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT,
-        constructor.returnType,
-        [superElement.name]);
-    return true;
   }
 
   /**
@@ -5463,28 +5345,27 @@
    *
    * See [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER].
    */
-  bool _checkForUnqualifiedReferenceToNonLocalStaticMember(
+  void _checkForUnqualifiedReferenceToNonLocalStaticMember(
       SimpleIdentifier name) {
     Element element = name.staticElement;
     if (element == null || element is TypeParameterElement) {
-      return false;
+      return;
     }
     Element enclosingElement = element.enclosingElement;
+    if (identical(enclosingElement, _enclosingClass)) {
+      return;
+    }
     if (enclosingElement is! ClassElement) {
-      return false;
+      return;
     }
     if ((element is MethodElement && !element.isStatic) ||
         (element is PropertyAccessorElement && !element.isStatic)) {
-      return false;
-    }
-    if (identical(enclosingElement, _enclosingClass)) {
-      return false;
+      return;
     }
     _errorReporter.reportErrorForNode(
         StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
         name,
         [name.name]);
-    return true;
   }
 
   void _checkForValidField(FieldFormalParameter parameter) {
@@ -5546,14 +5427,13 @@
    *
    * See [StaticWarningCode.VOID_RETURN_FOR_GETTER].
    */
-  bool _checkForVoidReturnType(MethodDeclaration getter) {
+  void _checkForVoidReturnType(MethodDeclaration getter) {
     TypeName returnType = getter.returnType;
     if (returnType == null || returnType.name.name != "void") {
-      return false;
+      return;
     }
     _errorReporter.reportErrorForNode(
         StaticWarningCode.VOID_RETURN_FOR_GETTER, returnType);
-    return true;
   }
 
   /**
@@ -5565,18 +5445,18 @@
    *
    * See [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR].
    */
-  bool _checkForWrongNumberOfParametersForOperator(
+  void _checkForWrongNumberOfParametersForOperator(
       MethodDeclaration declaration) {
     // prepare number of parameters
     FormalParameterList parameterList = declaration.parameters;
     if (parameterList == null) {
-      return false;
+      return;
     }
     int numParameters = parameterList.parameters.length;
     // prepare operator name
     SimpleIdentifier nameNode = declaration.name;
     if (nameNode == null) {
-      return false;
+      return;
     }
     String name = nameNode.name;
     // check for exact number of parameters
@@ -5608,18 +5488,12 @@
           CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR,
           nameNode,
           [name, expected, numParameters]);
-      return true;
-    }
-    // check for operator "-"
-    if ("-" == name && numParameters > 1) {
+    } else if ("-" == name && numParameters > 1) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS,
           nameNode,
           [numParameters]);
-      return true;
     }
-    // OK
-    return false;
   }
 
   /**
@@ -5632,23 +5506,19 @@
    *
    * See [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER].
    */
-  bool _checkForWrongNumberOfParametersForSetter(
+  void _checkForWrongNumberOfParametersForSetter(
       SimpleIdentifier setterName, FormalParameterList parameterList) {
-    if (setterName == null) {
-      return false;
+    if (setterName == null || parameterList == null) {
+      return;
     }
-    if (parameterList == null) {
-      return false;
-    }
+
     NodeList<FormalParameter> parameters = parameterList.parameters;
     if (parameters.length != 1 ||
         parameters[0].kind != ParameterKind.REQUIRED) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
           setterName);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -5657,11 +5527,11 @@
    *
    * This method should only be called in generator functions.
    */
-  bool _checkForYieldOfInvalidType(
+  void _checkForYieldOfInvalidType(
       Expression yieldExpression, bool isYieldEach) {
     assert(_inGenerator);
     if (_enclosingFunction == null) {
-      return false;
+      return;
     }
     DartType declaredReturnType = _enclosingFunction.returnType;
     DartType staticYieldedType = getStaticType(yieldExpression);
@@ -5670,17 +5540,17 @@
       impliedReturnType = staticYieldedType;
     } else if (_enclosingFunction.isAsynchronous) {
       impliedReturnType =
-          _typeProvider.streamType.substitute4(<DartType>[staticYieldedType]);
+          _typeProvider.streamType.instantiate(<DartType>[staticYieldedType]);
     } else {
       impliedReturnType =
-          _typeProvider.iterableType.substitute4(<DartType>[staticYieldedType]);
+          _typeProvider.iterableType.instantiate(<DartType>[staticYieldedType]);
     }
     if (!_typeSystem.isAssignableTo(impliedReturnType, declaredReturnType)) {
       _errorReporter.reportTypeErrorForNode(
           StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
           yieldExpression,
           [impliedReturnType, declaredReturnType]);
-      return true;
+      return;
     }
     if (isYieldEach) {
       // Since the declared return type might have been "dynamic", we need to
@@ -5697,10 +5567,9 @@
             StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
             yieldExpression,
             [impliedReturnType, requiredReturnType]);
-        return true;
+        return;
       }
     }
-    return false;
   }
 
   /**
@@ -5709,22 +5578,22 @@
    *
    * See [StaticWarningCode.FUNCTION_WITHOUT_CALL].
    */
-  bool _checkImplementsFunctionWithoutCall(ClassDeclaration declaration) {
+  void _checkImplementsFunctionWithoutCall(ClassDeclaration declaration) {
     if (declaration.isAbstract) {
-      return false;
+      return;
     }
     ClassElement classElement = declaration.element;
     if (classElement == null) {
-      return false;
+      return;
     }
     if (!_typeSystem.isSubtypeOf(
         classElement.type, _typeProvider.functionType)) {
-      return false;
+      return;
     }
     // If there is a noSuchMethod method, then don't report the warning,
     // see dartbug.com/16078
     if (_hasNoSuchMethod(classElement)) {
-      return false;
+      return;
     }
     ExecutableElement callMethod = _inheritanceManager.lookupMember(
         classElement, FunctionElement.CALL_METHOD_NAME);
@@ -5733,9 +5602,7 @@
         (callMethod as MethodElement).isAbstract) {
       _errorReporter.reportErrorForNode(
           StaticWarningCode.FUNCTION_WITHOUT_CALL, declaration.name);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -5744,30 +5611,26 @@
    *
    * See [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS].
    */
-  bool _checkImplementsSuperClass(ClassDeclaration declaration) {
+  void _checkImplementsSuperClass(ClassDeclaration declaration) {
     // prepare super type
     InterfaceType superType = _enclosingClass.supertype;
     if (superType == null) {
-      return false;
+      return;
     }
     // prepare interfaces
     ImplementsClause implementsClause = declaration.implementsClause;
     if (implementsClause == null) {
-      return false;
+      return;
     }
     // check interfaces
-    bool hasProblem = false;
     for (TypeName interfaceNode in implementsClause.interfaces) {
       if (interfaceNode.type == superType) {
-        hasProblem = true;
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS,
             interfaceNode,
             [superType.displayName]);
       }
     }
-    // done
-    return hasProblem;
   }
 
   DartType _computeReturnTypeForMethod(Expression returnExpression) {
@@ -5783,12 +5646,40 @@
     }
     DartType staticReturnType = getStaticType(returnExpression);
     if (staticReturnType != null && _enclosingFunction.isAsynchronous) {
-      return _typeProvider.futureType.substitute4(
+      return _typeProvider.futureType.instantiate(
           <DartType>[staticReturnType.flattenFutures(_typeSystem)]);
     }
     return staticReturnType;
   }
 
+  bool _containsNamedExpression(ArgumentList args, String name) {
+    for (Expression expression in args.arguments) {
+      if (expression is NamedExpression) {
+        if (expression.name.label.name == name) {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+
+  MethodElement _findOverriddenMemberThatMustCallSuper(MethodDeclaration node) {
+    ExecutableElement overriddenMember = _getOverriddenMember(node.element);
+    List<ExecutableElement> seen = <ExecutableElement>[];
+    while (
+        overriddenMember is MethodElement && !seen.contains(overriddenMember)) {
+      for (ElementAnnotation annotation in overriddenMember.metadata) {
+        if (annotation.isMustCallSuper) {
+          return overriddenMember;
+        }
+      }
+      seen.add(overriddenMember);
+      // Keep looking up the chain.
+      overriddenMember = _getOverriddenMember(overriddenMember);
+    }
+    return null;
+  }
+
   /**
    * Return the error code that should be used when the given class [element]
    * references itself directly.
@@ -5839,6 +5730,23 @@
     }
   }
 
+  ExecutableElement _getOverriddenMember(Element member) {
+    if (member == null || _inheritanceManager == null) {
+      return null;
+    }
+
+    ClassElement classElement =
+        member.getAncestor((element) => element is ClassElement);
+    if (classElement == null) {
+      return null;
+    }
+    return _inheritanceManager.lookupInheritance(classElement, member.name);
+  }
+
+  ElementAnnotationImpl _getRequiredAnnotation(ParameterElement param) => param
+      .metadata
+      .firstWhere((ElementAnnotation e) => e.isRequired, orElse: () => null);
+
   /**
    * Return the type of the first and only parameter of the given [setter].
    */
@@ -5853,28 +5761,6 @@
   }
 
   /**
-   * Given a list of [directives] that have the same prefix, generate an error
-   * if there is more than one import and any of those imports is deferred.
-   *
-   * See [CompileTimeErrorCode.SHARED_DEFERRED_PREFIX].
-   */
-  bool _hasDeferredPrefixCollision(List<ImportDirective> directives) {
-    bool foundError = false;
-    int count = directives.length;
-    if (count > 1) {
-      for (int i = 0; i < count; i++) {
-        Token deferredToken = directives[i].deferredKeyword;
-        if (deferredToken != null) {
-          _errorReporter.reportErrorForToken(
-              CompileTimeErrorCode.SHARED_DEFERRED_PREFIX, deferredToken);
-          foundError = true;
-        }
-      }
-    }
-    return foundError;
-  }
-
-  /**
    * Return `true` if the given [classElement] has a noSuchMethod() method
    * distinct from the one declared in class Object, as per the Dart Language
    * Specification (section 10.4).
@@ -6222,3 +6108,17 @@
     }
   }
 }
+
+/**
+ * Recursively visits an AST, looking for method invocations.
+ */
+class _InvocationCollector extends RecursiveAstVisitor {
+  final List<String> superCalls = <String>[];
+
+  @override
+  visitMethodInvocation(MethodInvocation node) {
+    if (node.target is SuperExpression) {
+      superCalls.add(node.methodName.name);
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/generated/generated/shared_messages.dart b/pkg/analyzer/lib/src/generated/generated/shared_messages.dart
index c0be1d2..249e939 100644
--- a/pkg/analyzer/lib/src/generated/generated/shared_messages.dart
+++ b/pkg/analyzer/lib/src/generated/generated/shared_messages.dart
@@ -24,32 +24,32 @@
 
 const ParserErrorCode CONST_CLASS = const ParserErrorCode(
     'CONST_CLASS',
-    "Classes can't be declared to be 'const'",
+    "Classes can't be declared to be 'const'.",
     "Try removing the 'const' keyword or moving to the class' constructor(s).");  // Generated. Don't edit.
 
 const ParserErrorCode CONST_METHOD = const ParserErrorCode(
     'CONST_METHOD',
-    "Getters, setters and methods can't be declared to be 'const'",
+    "Getters, setters and methods can't be declared to be 'const'.",
     "Try removing the 'const' keyword.");  // Generated. Don't edit.
 
 const ParserErrorCode CONST_ENUM = const ParserErrorCode(
     'CONST_ENUM',
-    "Enums can't be declared to be 'const'",
+    "Enums can't be declared to be 'const'.",
     "Try removing the 'const' keyword.");  // Generated. Don't edit.
 
 const ParserErrorCode CONST_TYPEDEF = const ParserErrorCode(
     'CONST_TYPEDEF',
-    "Type aliases can't be declared to be 'const'",
+    "Type aliases can't be declared to be 'const'.",
     "Try removing the 'const' keyword.");  // Generated. Don't edit.
 
 const ParserErrorCode CONST_AND_FINAL = const ParserErrorCode(
     'CONST_AND_FINAL',
-    "Members can't be declared to be both 'const' and 'final'",
+    "Members can't be declared to be both 'const' and 'final'.",
     "Try removing either the 'const' or 'final' keyword.");  // Generated. Don't edit.
 
 const ParserErrorCode CONST_AND_VAR = const ParserErrorCode(
     'CONST_AND_VAR',
-    "Members can't be declared to be both 'const' and 'var'",
+    "Members can't be declared to be both 'const' and 'var'.",
     "Try removing either the 'const' or 'var' keyword.");  // Generated. Don't edit.
 
 const ParserErrorCode CLASS_IN_CLASS = const ParserErrorCode(
@@ -59,7 +59,7 @@
 
 const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE = const ParserErrorCode(
     'CONSTRUCTOR_WITH_RETURN_TYPE',
-    "Constructors can't have a return type",
+    "Constructors can't have a return type.",
     "Try removing the return type.");  // Generated. Don't edit.
 
 const ParserErrorCode MISSING_EXPRESSION_IN_THROW = const ParserErrorCode(
@@ -69,7 +69,7 @@
 
 const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = const CompileTimeErrorCode(
     'RETHROW_OUTSIDE_CATCH',
-    "Rethrow must be inside of catch clause",
+    "Rethrow must be inside of catch clause.",
     "Try moving the expression into a catch clause, or using a 'throw' expression.");  // Generated. Don't edit.
 
 const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = const CompileTimeErrorCode(
@@ -80,4 +80,114 @@
 const CompileTimeErrorCode RETURN_IN_GENERATOR = const CompileTimeErrorCode(
     'RETURN_IN_GENERATOR',
     "Can't return a value from a generator function (using the '{0}' modifier).",
-    "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier");  // Generated. Don't edit.
+    "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier.");  // Generated. Don't edit.
+
+const StaticTypeWarningCode RETURN_OF_INVALID_TYPE = const StaticTypeWarningCode(
+    'RETURN_OF_INVALID_TYPE',
+    "The return type '{0}' is not a '{1}', as defined by the method '{2}'.",
+    null);  // Generated. Don't edit.
+
+const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE_HINT = const HintCode(
+    'ARGUMENT_TYPE_NOT_ASSIGNABLE',
+    "The argument type '{0}' cannot be assigned to the parameter type '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE_STATIC_WARNING = const StaticWarningCode(
+    'ARGUMENT_TYPE_NOT_ASSIGNABLE',
+    "The argument type '{0}' cannot be assigned to the parameter type '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_METHOD_STATIC_TYPE_WARNING = const StaticTypeWarningCode(
+    'UNDEFINED_METHOD',
+    "The method '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const HintCode UNDEFINED_METHOD_HINT = const HintCode(
+    'UNDEFINED_METHOD',
+    "The method '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_METHOD_WITH_CONSTRUCTOR = const StaticTypeWarningCode(
+    'UNDEFINED_METHOD_WITH_CONSTRUCTOR',
+    "The method '{0}' is not defined for the class '{1}', but a constructor with that name is defined.",
+    "Try adding 'new' or 'const' to invoke the constuctor, or change the method name.");  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_GETTER_STATIC_TYPE_WARNING = const StaticTypeWarningCode(
+    'UNDEFINED_GETTER',
+    "The getter '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticWarningCode UNDEFINED_GETTER_STATIC_WARNING = const StaticWarningCode(
+    'UNDEFINED_GETTER',
+    "The getter '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const HintCode UNDEFINED_GETTER_HINT = const HintCode(
+    'UNDEFINED_GETTER',
+    "The getter '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_ENUM_CONSTANT = const StaticTypeWarningCode(
+    'UNDEFINED_ENUM_CONSTANT',
+    "There is no constant named '{0}' in '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_OPERATOR_STATIC_TYPE_WARNING = const StaticTypeWarningCode(
+    'UNDEFINED_OPERATOR',
+    "The operator '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const HintCode UNDEFINED_OPERATOR_HINT = const HintCode(
+    'UNDEFINED_OPERATOR',
+    "The operator '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_SETTER_STATIC_TYPE_WARNING = const StaticTypeWarningCode(
+    'UNDEFINED_SETTER',
+    "The setter '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticWarningCode UNDEFINED_SETTER_STATIC_WARNING = const StaticWarningCode(
+    'UNDEFINED_SETTER',
+    "The setter '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const HintCode UNDEFINED_SETTER_HINT = const HintCode(
+    'UNDEFINED_SETTER',
+    "The setter '{0}' is not defined for the class '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_SUPER_GETTER_STATIC_TYPE_WARNING = const StaticTypeWarningCode(
+    'UNDEFINED_SUPER_GETTER',
+    "The getter '{0}' is not defined in a superclass of '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticWarningCode UNDEFINED_SUPER_GETTER_STATIC_WARNING = const StaticWarningCode(
+    'UNDEFINED_SUPER_GETTER',
+    "The getter '{0}' is not defined in a superclass of '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_SUPER_METHOD = const StaticTypeWarningCode(
+    'UNDEFINED_SUPER_METHOD',
+    "The method '{0}' is not defined in a superclass of '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_SUPER_OPERATOR = const StaticTypeWarningCode(
+    'UNDEFINED_SUPER_OPERATOR',
+    "The operator '{0}' is not defined in a superclass of '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_SUPER_SETTER_STATIC_TYPE_WARNING = const StaticTypeWarningCode(
+    'UNDEFINED_SUPER_SETTER',
+    "The setter '{0}' is not defined in a superclass of '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticWarningCode UNDEFINED_SUPER_SETTER_STATIC_WARNING = const StaticWarningCode(
+    'UNDEFINED_SUPER_SETTER',
+    "The setter '{0}' is not defined in a superclass of '{1}'.",
+    null);  // Generated. Don't edit.
+
+const StaticTypeWarningCode UNDEFINED_FUNCTION = const StaticTypeWarningCode(
+    'UNDEFINED_FUNCTION',
+    "The function '{0}' is not defined.",
+    null);  // Generated. Don't edit.
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolution_validator.dart b/pkg/analyzer/lib/src/generated/incremental_resolution_validator.dart
index cf2c0dd..67885d1 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolution_validator.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolution_validator.dart
@@ -36,7 +36,7 @@
 class _SameResolutionValidator implements AstVisitor {
   final bool validateTypes;
 
-  /// The expected node to compare with the visted node.
+  /// The expected node to compare with the visited node.
   AstNode other;
 
   _SameResolutionValidator(this.validateTypes, this.other);
@@ -848,13 +848,21 @@
     if (a == null && b == null) {
       return;
     }
-    if (a.nameOffset != b.nameOffset) {
-      _fail('Expected: ${b.nameOffset}\n  Actual: ${a.nameOffset}');
+    _verifyEqual('nameOffset', a.nameOffset, b.nameOffset);
+    if (a is ElementImpl && b is ElementImpl) {
+      _verifyEqual('codeOffset', a.codeOffset, b.codeOffset);
+      _verifyEqual('codeLength', a.codeLength, b.codeLength);
     }
     if (a is LocalElement && b is LocalElement) {
-      if (a.visibleRange != b.visibleRange) {
-        _fail('Expected: ${b.visibleRange}\nActual: ${a.visibleRange}');
-      }
+      _verifyEqual('visibleRange', a.visibleRange, b.visibleRange);
+    }
+    _verifyEqual(
+        'documentationComment', a.documentationComment, b.documentationComment);
+  }
+
+  void _verifyEqual(String name, actual, expected) {
+    if (actual != expected) {
+      _fail('$name\nExpected: $expected\n  Actual: $actual');
     }
   }
 
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index fc8c860..9ed4477 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -878,7 +878,7 @@
 
   @override
   DeltaResult validate(InternalAnalysisContext context, AnalysisTarget target,
-      ResultDescriptor descriptor) {
+      ResultDescriptor descriptor, Object value) {
     // A body change delta should never leak outside its source.
     // It can cause invalidation of results (e.g. hints) in other sources,
     // but only when a result in the updated source is INVALIDATE_NO_DELTA.
@@ -928,6 +928,7 @@
         isByTask(PropagateVariableTypeTask.DESCRIPTOR) ||
         isByTask(ScanDartTask.DESCRIPTOR) ||
         isByTask(ResolveConstantExpressionTask.DESCRIPTOR) ||
+        isByTask(ResolveDirectiveElementsTask.DESCRIPTOR) ||
         isByTask(ResolveInstanceFieldsInUnitTask.DESCRIPTOR) ||
         isByTask(ResolveLibraryReferencesTask.DESCRIPTOR) ||
         isByTask(ResolveLibraryTask.DESCRIPTOR) ||
@@ -1676,6 +1677,23 @@
     _updateEntry();
     // resolve references in the comment
     incrementalResolver._resolveReferences(newComment);
+    // update 'documentationComment' of the parent element(s)
+    {
+      AstNode parent = newComment.parent;
+      if (parent is AnnotatedNode) {
+        Element parentElement = ElementLocator.locate(newComment.parent);
+        if (parentElement is ElementImpl) {
+          setElementDocumentationComment(parentElement, parent);
+        } else if (parentElement == null && parent is FieldDeclaration) {
+          for (VariableDeclaration field in parent.fields.variables) {
+            if (field.element is ElementImpl) {
+              setElementDocumentationComment(
+                  field.element as ElementImpl, parent);
+            }
+          }
+        }
+      }
+    }
     // OK
     return true;
   }
@@ -2087,6 +2105,22 @@
         }
       }
     }
+    // code range
+    if (element is ElementImpl) {
+      int oldOffset = element.codeOffset;
+      int oldLength = element.codeLength;
+      if (oldOffset != null) {
+        int newOffset = oldOffset;
+        int newLength = oldLength;
+        newOffset += oldOffset > updateOffset ? updateDelta : 0;
+        if (oldOffset <= updateOffset && updateOffset < oldOffset + oldLength) {
+          newLength += updateDelta;
+        }
+        if (newOffset != oldOffset || newLength != oldLength) {
+          element.setCodeRange(newOffset, newLength);
+        }
+      }
+    }
     // visible range
     if (element is LocalElement) {
       SourceRange visibleRange = element.visibleRange;
diff --git a/pkg/analyzer/lib/src/generated/incremental_scanner.dart b/pkg/analyzer/lib/src/generated/incremental_scanner.dart
index ae34471..a0bd238 100644
--- a/pkg/analyzer/lib/src/generated/incremental_scanner.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_scanner.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.
 
+@deprecated
 library analyzer.src.generated.incremental_scanner;
 
 import "dart:math" as math;
@@ -18,6 +19,7 @@
  * An `IncrementalScanner` is a scanner that scans a subset of a string and
  * inserts the resulting tokens into the middle of an existing token stream.
  */
+@deprecated
 class IncrementalScanner {
   /**
    * The source being scanned.
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 9eff933..32afd15 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -26,6 +26,8 @@
 import 'package:analyzer/src/generated/utilities_collection.dart' show TokenMap;
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
+export 'package:analyzer/src/dart/ast/utilities.dart' show ResolutionCopier;
+
 Map<String, MethodTrampoline> methodTable_Parser = <String, MethodTrampoline>{
   'parseCompilationUnit_1': new MethodTrampoline(
       1, (Parser target, arg0) => target.parseCompilationUnit(arg0)),
@@ -126,7 +128,9 @@
   'expectKeyword_1': new MethodTrampoline(
       1, (Parser target, arg0) => target._expectKeyword(arg0)),
   'findRange_2': new MethodTrampoline(
-      2, (Parser target, arg0, arg1) => target._findRange(arg0, arg1)),
+      2,
+      (Parser target, List<List<int>> arg0, int arg1) =>
+          target._findRange(arg0, arg1)),
   'getCodeBlockRanges_1': new MethodTrampoline(
       1, (Parser target, arg0) => target._getCodeBlockRanges(arg0)),
   'getEndToken_1': new MethodTrampoline(
@@ -200,7 +204,9 @@
   'parseCommentReference_2': new MethodTrampoline(2,
       (Parser target, arg0, arg1) => target._parseCommentReference(arg0, arg1)),
   'parseCommentReferences_1': new MethodTrampoline(
-      1, (Parser target, arg0) => target._parseCommentReferences(arg0)),
+      1,
+      (Parser target, List<DocumentationCommentToken> arg0) =>
+          target._parseCommentReferences(arg0)),
   'parseCompilationUnitMember_1': new MethodTrampoline(
       1, (Parser target, arg0) => target._parseCompilationUnitMember(arg0)),
   'parseConfiguration_0':
@@ -525,6 +531,7 @@
  * the methods will throw an [IncrementalParseException] if the node could not
  * be parsed for some reason.
  */
+@deprecated
 class IncrementalParseDispatcher implements AstVisitor<AstNode> {
   /**
    * The parser used to parse the replacement for the node.
@@ -671,9 +678,9 @@
     if (identical(_oldNode, node.exceptionType)) {
       return _parser.parseTypeName();
     } else if (identical(_oldNode, node.exceptionParameter)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.stackTraceParameter)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.body)) {
       return _parser.parseBlock();
     }
@@ -715,7 +722,7 @@
     } else if (node.metadata.contains(_oldNode)) {
       return _parser.parseAnnotation();
     } else if (identical(_oldNode, node.name)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.typeParameters)) {
       return _parser.parseTypeParameterList();
     } else if (identical(_oldNode, node.superclass)) {
@@ -878,7 +885,7 @@
     } else if (node.metadata.contains(_oldNode)) {
       return _parser.parseAnnotation();
     } else if (identical(_oldNode, node.name)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     }
     return _notAChild(node);
   }
@@ -890,7 +897,7 @@
     } else if (node.metadata.contains(_oldNode)) {
       return _parser.parseAnnotation();
     } else if (identical(_oldNode, node.name)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (node.constants.contains(_oldNode)) {
       throw new InsufficientContextException();
     }
@@ -970,7 +977,7 @@
       throw new InsufficientContextException();
       //return parser.parseDeclaredIdentifier();
     } else if (identical(_oldNode, node.identifier)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.body)) {
       return _parser.parseStatement2();
     }
@@ -1008,7 +1015,7 @@
     } else if (identical(_oldNode, node.returnType)) {
       return _parser.parseReturnType();
     } else if (identical(_oldNode, node.name)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.functionExpression)) {
       throw new InsufficientContextException();
     }
@@ -1052,7 +1059,7 @@
     } else if (identical(_oldNode, node.returnType)) {
       return _parser.parseReturnType();
     } else if (identical(_oldNode, node.name)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.typeParameters)) {
       return _parser.parseTypeParameterList();
     } else if (identical(_oldNode, node.parameters)) {
@@ -1070,7 +1077,7 @@
     } else if (identical(_oldNode, node.returnType)) {
       return _parser.parseReturnType();
     } else if (identical(_oldNode, node.identifier)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.parameters)) {
       return _parser.parseFormalParameterList();
     }
@@ -1114,7 +1121,7 @@
     } else if (identical(_oldNode, node.uri)) {
       return _parser.parseStringLiteral();
     } else if (identical(_oldNode, node.prefix)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (node.combinators.contains(_oldNode)) {
       return _parser.parseCombinator();
     }
@@ -1174,7 +1181,8 @@
   @override
   AstNode visitLabel(Label node) {
     if (identical(_oldNode, node.label)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(
+          isDeclaration: node.parent is LabeledStatement);
     }
     return _notAChild(node);
   }
@@ -1182,7 +1190,7 @@
   @override
   AstNode visitLabeledStatement(LabeledStatement node) {
     if (node.labels.contains(_oldNode)) {
-      return _parser.parseLabel();
+      return _parser.parseLabel(isDeclaration: true);
     } else if (identical(_oldNode, node.statement)) {
       return _parser.parseStatement2();
     }
@@ -1253,7 +1261,7 @@
       if (node.operatorKeyword != null) {
         throw new InsufficientContextException();
       }
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.body)) {
       //return parser.parseFunctionBody();
       throw new InsufficientContextException();
@@ -1548,7 +1556,7 @@
     } else if (node.metadata.contains(_oldNode)) {
       return _parser.parseAnnotation();
     } else if (identical(_oldNode, node.name)) {
-      return _parser.parseSimpleIdentifier();
+      return _parser.parseSimpleIdentifier(isDeclaration: true);
     } else if (identical(_oldNode, node.bound)) {
       return _parser.parseTypeName();
     }
@@ -1662,6 +1670,7 @@
  * An exception that occurred while attempting to parse a replacement for a
  * specified node in an existing AST structure.
  */
+@deprecated
 class IncrementalParseException extends RuntimeException {
   /**
    * Initialize a newly created exception to have no message and to be its own
@@ -1686,6 +1695,7 @@
  * An object used to re-parse a single AST structure within a larger AST
  * structure.
  */
+@deprecated
 class IncrementalParser {
   /**
    * The source being parsed.
@@ -1857,6 +1867,7 @@
  * given parent.  Once it has visited all of these relationships, the parser
  * will be in the correct state for reparsing the node to be replaced.
  */
+@deprecated
 class IncrementalParseStateBuilder extends SimpleAstVisitor {
   // TODO(paulberry): add support for other pieces of parser state (_inAsync,
   // _inGenerator, _inLoop, and _inSwitch).  Note that _inLoop and _inSwitch
@@ -1948,6 +1959,7 @@
  * not enough context to know how to re-parse the node. Clients can attempt to
  * re-parse the parent of the node.
  */
+@deprecated
 class InsufficientContextException extends IncrementalParseException {
   /**
    * Initialize a newly created exception to have no message and to be its own
@@ -2528,10 +2540,10 @@
             null,
             null,
             null,
-            _createSyntheticIdentifier(),
+            _createSyntheticIdentifier(isDeclaration: true),
             null,
             new FormalParameterList(
-                null, new List<FormalParameter>(), null, null, null),
+                null, <FormalParameter>[], null, null, null),
             new EmptyFunctionBody(_createSyntheticToken(TokenType.SEMICOLON)));
       }
       return null;
@@ -2545,11 +2557,11 @@
           modifiers.factoryKeyword,
           parseSimpleIdentifier(),
           getAndAdvance(),
-          parseSimpleIdentifier(),
+          parseSimpleIdentifier(isDeclaration: true),
           parseFormalParameterList());
     } else if (_tokenMatches(_peek(), TokenType.OPEN_PAREN)) {
       TypeName returnType = _parseOptionalTypeNameComment();
-      SimpleIdentifier methodName = parseSimpleIdentifier();
+      SimpleIdentifier methodName = parseSimpleIdentifier(isDeclaration: true);
       TypeParameterList typeParameters = _parseGenericCommentTypeParameters();
       FormalParameterList parameters = parseFormalParameterList();
       if (_matches(TokenType.COLON) ||
@@ -2560,7 +2572,7 @@
             modifiers.externalKeyword,
             _validateModifiersForConstructor(modifiers),
             modifiers.factoryKeyword,
-            methodName,
+            new SimpleIdentifier(methodName.token, isDeclaration: false),
             null,
             null,
             parameters);
@@ -2652,7 +2664,7 @@
         _unlockErrorListener();
       }
     } else if (_tokenMatches(_peek(), TokenType.OPEN_PAREN)) {
-      SimpleIdentifier methodName = parseSimpleIdentifier();
+      SimpleIdentifier methodName = parseSimpleIdentifier(isDeclaration: true);
       TypeParameterList typeParameters = _parseGenericCommentTypeParameters();
       FormalParameterList parameters = parseFormalParameterList();
       if (methodName.name == className) {
@@ -2662,7 +2674,7 @@
             modifiers.externalKeyword,
             _validateModifiersForConstructor(modifiers),
             modifiers.factoryKeyword,
-            methodName,
+            new SimpleIdentifier(methodName.token, isDeclaration: true),
             null,
             null,
             parameters);
@@ -3218,8 +3230,9 @@
    *     label ::=
    *         identifier ':'
    */
-  Label parseLabel() {
-    SimpleIdentifier label = parseSimpleIdentifier();
+  Label parseLabel({bool isDeclaration: false}) {
+    SimpleIdentifier label =
+        parseSimpleIdentifier(isDeclaration: isDeclaration);
     Token colon = _expect(TokenType.COLON);
     return new Label(label, colon);
   }
@@ -3311,7 +3324,7 @@
             commentAndMetadata.comment,
             commentAndMetadata.metadata,
             holder.type,
-            identifier,
+            new SimpleIdentifier(identifier.token, isDeclaration: true),
             typeParameters,
             parameters);
       } else {
@@ -3356,8 +3369,12 @@
           null,
           null);
     }
-    return new SimpleFormalParameter(commentAndMetadata.comment,
-        commentAndMetadata.metadata, holder.keyword, holder.type, identifier);
+    return new SimpleFormalParameter(
+        commentAndMetadata.comment,
+        commentAndMetadata.metadata,
+        holder.keyword,
+        holder.type,
+        new SimpleIdentifier(identifier.token, isDeclaration: true));
   }
 
   /**
@@ -3369,7 +3386,7 @@
    */
   Identifier parsePrefixedIdentifier() {
     SimpleIdentifier qualifier = parseSimpleIdentifier();
-    if (!_matches(TokenType.PERIOD)) {
+    if (!_matches(TokenType.PERIOD) || _injectGenericCommentTypeList()) {
       return qualifier;
     }
     Token period = getAndAdvance();
@@ -3398,7 +3415,7 @@
    *     identifier ::=
    *         IDENTIFIER
    */
-  SimpleIdentifier parseSimpleIdentifier() {
+  SimpleIdentifier parseSimpleIdentifier({bool isDeclaration: false}) {
     if (_matchesIdentifier()) {
       String lexeme = _currentToken.lexeme;
       if ((_inAsync || _inGenerator) &&
@@ -3406,10 +3423,11 @@
         _reportErrorForCurrentToken(
             ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER);
       }
-      return new SimpleIdentifier(getAndAdvance());
+      return new SimpleIdentifier(getAndAdvance(),
+          isDeclaration: isDeclaration);
     }
     _reportErrorForCurrentToken(ParserErrorCode.MISSING_IDENTIFIER);
-    return _createSyntheticIdentifier();
+    return _createSyntheticIdentifier(isDeclaration: isDeclaration);
   }
 
   /**
@@ -3431,7 +3449,7 @@
   Statement parseStatement2() {
     List<Label> labels = new List<Label>();
     while (_matchesIdentifier() && _tokenMatches(_peek(), TokenType.COLON)) {
-      labels.add(parseLabel());
+      labels.add(parseLabel(isDeclaration: true));
     }
     Statement statement = _parseNonLabeledStatement();
     if (labels.isEmpty) {
@@ -3524,7 +3542,7 @@
    */
   TypeParameter parseTypeParameter() {
     CommentAndMetadata commentAndMetadata = _parseCommentAndMetadata();
-    SimpleIdentifier name = parseSimpleIdentifier();
+    SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
     if (_matchesKeyword(Keyword.EXTENDS)) {
       Token keyword = getAndAdvance();
       TypeName bound = parseTypeName();
@@ -3694,7 +3712,7 @@
   /**
    * Return a synthetic identifier.
    */
-  SimpleIdentifier _createSyntheticIdentifier() {
+  SimpleIdentifier _createSyntheticIdentifier({bool isDeclaration: false}) {
     Token syntheticToken;
     if (_currentToken.type == TokenType.KEYWORD) {
       // Consider current keyword token as an identifier.
@@ -3707,7 +3725,7 @@
     } else {
       syntheticToken = _createSyntheticToken(TokenType.IDENTIFIER);
     }
-    return new SimpleIdentifier(syntheticToken);
+    return new SimpleIdentifier(syntheticToken, isDeclaration: isDeclaration);
   }
 
   /**
@@ -3798,7 +3816,7 @@
       return _createSyntheticToken(TokenType.SEMICOLON);
     }
     _reportErrorForCurrentToken(ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]);
-    return _currentToken;
+    return _createSyntheticToken(type);
   }
 
   /**
@@ -4735,7 +4753,7 @@
             commentAndMetadata, abstractKeyword, keyword);
       }
     }
-    SimpleIdentifier name = parseSimpleIdentifier();
+    SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
     String className = name.name;
     TypeParameterList typeParameters = null;
     if (_matches(TokenType.LT)) {
@@ -4888,7 +4906,7 @@
    */
   ClassTypeAlias _parseClassTypeAlias(CommentAndMetadata commentAndMetadata,
       Token abstractKeyword, Token classKeyword) {
-    SimpleIdentifier className = parseSimpleIdentifier();
+    SimpleIdentifier className = parseSimpleIdentifier(isDeclaration: true);
     TypeParameterList typeParameters = null;
     if (_matches(TokenType.LT)) {
       typeParameters = parseTypeParameterList();
@@ -5697,7 +5715,7 @@
     CommentAndMetadata commentAndMetadata = _parseCommentAndMetadata();
     SimpleIdentifier name;
     if (_matchesIdentifier()) {
-      name = parseSimpleIdentifier();
+      name = parseSimpleIdentifier(isDeclaration: true);
     } else {
       name = _createSyntheticIdentifier();
     }
@@ -5718,7 +5736,7 @@
    */
   EnumDeclaration _parseEnumDeclaration(CommentAndMetadata commentAndMetadata) {
     Token keyword = _expectKeyword(Keyword.ENUM);
-    SimpleIdentifier name = parseSimpleIdentifier();
+    SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
     Token leftBracket = null;
     List<EnumConstantDeclaration> constants =
         new List<EnumConstantDeclaration>();
@@ -5981,8 +5999,13 @@
             Token keyword = variableList.keyword;
             TypeName type = variableList.type;
             if (keyword != null || type != null) {
-              loopVariable = new DeclaredIdentifier(commentAndMetadata.comment,
-                  commentAndMetadata.metadata, keyword, type, variable.name);
+              loopVariable = new DeclaredIdentifier(
+                  commentAndMetadata.comment,
+                  commentAndMetadata.metadata,
+                  keyword,
+                  type,
+                  new SimpleIdentifier(variable.name.token,
+                      isDeclaration: true));
             } else {
               if (!commentAndMetadata.metadata.isEmpty) {
                 // TODO(jwren) metadata isn't allowed before the identifier in
@@ -6193,7 +6216,7 @@
         !_tokenMatches(_peek(), TokenType.OPEN_PAREN)) {
       keyword = getAndAdvance();
     }
-    SimpleIdentifier name = parseSimpleIdentifier();
+    SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
     TypeParameterList typeParameters = _parseGenericMethodTypeParameters();
     FormalParameterList parameters = null;
     if (!isGetter) {
@@ -6293,7 +6316,7 @@
     if (hasReturnTypeInTypeAlias) {
       returnType = parseReturnType();
     }
-    SimpleIdentifier name = parseSimpleIdentifier();
+    SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
     TypeParameterList typeParameters = null;
     if (_matches(TokenType.LT)) {
       typeParameters = parseTypeParameterList();
@@ -6395,7 +6418,7 @@
   MethodDeclaration _parseGetter(CommentAndMetadata commentAndMetadata,
       Token externalKeyword, Token staticKeyword, TypeName returnType) {
     Token propertyKeyword = _expectKeyword(Keyword.GET);
-    SimpleIdentifier name = parseSimpleIdentifier();
+    SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
     if (_matches(TokenType.OPEN_PAREN) &&
         _tokenMatches(_peek(), TokenType.CLOSE_PAREN)) {
       _reportErrorForCurrentToken(ParserErrorCode.GETTER_WITH_PARAMETERS);
@@ -6481,7 +6504,7 @@
     }
     if (_matchesKeyword(Keyword.AS)) {
       asToken = getAndAdvance();
-      prefix = parseSimpleIdentifier();
+      prefix = parseSimpleIdentifier(isDeclaration: true);
     } else if (deferredToken != null) {
       _reportErrorForCurrentToken(
           ParserErrorCode.MISSING_PREFIX_IN_DEFERRED_IMPORT);
@@ -6497,7 +6520,7 @@
         _advance();
         if (_matchesKeyword(Keyword.AS)) {
           asToken = getAndAdvance();
-          prefix = parseSimpleIdentifier();
+          prefix = parseSimpleIdentifier(isDeclaration: true);
         }
       }
     }
@@ -6805,7 +6828,7 @@
       Token externalKeyword,
       Token staticKeyword,
       TypeName returnType) {
-    SimpleIdentifier methodName = parseSimpleIdentifier();
+    SimpleIdentifier methodName = parseSimpleIdentifier(isDeclaration: true);
     TypeParameterList typeParameters = _parseGenericMethodTypeParameters();
     FormalParameterList parameters;
     if (!_matches(TokenType.OPEN_PAREN) &&
@@ -7168,7 +7191,8 @@
       _reportErrorForCurrentToken(
           ParserErrorCode.NON_USER_DEFINABLE_OPERATOR, [_currentToken.lexeme]);
     }
-    SimpleIdentifier name = new SimpleIdentifier(getAndAdvance());
+    SimpleIdentifier name =
+        new SimpleIdentifier(getAndAdvance(), isDeclaration: true);
     if (_matches(TokenType.EQ)) {
       Token previous = _currentToken.previous;
       if ((_tokenMatches(previous, TokenType.EQ_EQ) ||
@@ -7553,7 +7577,7 @@
   MethodDeclaration _parseSetter(CommentAndMetadata commentAndMetadata,
       Token externalKeyword, Token staticKeyword, TypeName returnType) {
     Token propertyKeyword = _expectKeyword(Keyword.SET);
-    SimpleIdentifier name = parseSimpleIdentifier();
+    SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
     FormalParameterList parameters = parseFormalParameterList();
     _validateFormalParameterList(parameters);
     FunctionBody body = _parseFunctionBody(
@@ -7719,7 +7743,8 @@
         List<Label> labels = new List<Label>();
         while (
             _matchesIdentifier() && _tokenMatches(_peek(), TokenType.COLON)) {
-          SimpleIdentifier identifier = parseSimpleIdentifier();
+          SimpleIdentifier identifier =
+              parseSimpleIdentifier(isDeclaration: true);
           String label = identifier.token.lexeme;
           if (definedLabels.contains(label)) {
             _reportErrorForToken(
@@ -7875,10 +7900,10 @@
       if (_matchesKeyword(Keyword.CATCH)) {
         catchKeyword = getAndAdvance();
         leftParenthesis = _expect(TokenType.OPEN_PAREN);
-        exceptionParameter = parseSimpleIdentifier();
+        exceptionParameter = parseSimpleIdentifier(isDeclaration: true);
         if (_matches(TokenType.COMMA)) {
           comma = getAndAdvance();
-          stackTraceParameter = parseSimpleIdentifier();
+          stackTraceParameter = parseSimpleIdentifier(isDeclaration: true);
         }
         rightParenthesis = _expect(TokenType.CLOSE_PAREN);
       }
@@ -8111,7 +8136,7 @@
     // of a construct like "class C { int @deprecated foo() {} }" (i.e. the
     // user is in the middle of inserting "int bar;" prior to
     // "@deprecated foo() {}").
-    SimpleIdentifier name = parseSimpleIdentifier();
+    SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
     Token equals = null;
     Expression initializer = null;
     if (_matches(TokenType.EQ)) {
@@ -8609,8 +8634,10 @@
             return null;
           } else if (type == TokenType.OPEN_CURLY_BRACKET) {
             bracketNestingLevel++;
+            token = token.next;
           } else if (type == TokenType.CLOSE_CURLY_BRACKET) {
             bracketNestingLevel--;
+            token = token.next;
           } else if (type == TokenType.STRING) {
             token = _skipStringLiteral(token);
             if (token == null) {
@@ -9939,1423 +9966,3 @@
   @override
   ErrorType get type => ErrorType.SYNTACTIC_ERROR;
 }
-
-/**
- * An object that copies resolution information from one AST structure to
- * another as long as the structures of the corresponding children of a pair of
- * nodes are the same.
- */
-class ResolutionCopier 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
-   * invoked).
-   */
-  AstNode _toNode;
-
-  @override
-  bool visitAdjacentStrings(AdjacentStrings node) {
-    AdjacentStrings toNode = this._toNode as AdjacentStrings;
-    if (_isEqualNodeLists(node.strings, toNode.strings)) {
-      toNode.staticType = node.staticType;
-      toNode.propagatedType = node.propagatedType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitAnnotation(Annotation node) {
-    Annotation toNode = this._toNode as Annotation;
-    if (_and(
-        _isEqualTokens(node.atSign, toNode.atSign),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualTokens(node.period, toNode.period),
-        _isEqualNodes(node.constructorName, toNode.constructorName),
-        _isEqualNodes(node.arguments, toNode.arguments))) {
-      toNode.element = node.element;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitArgumentList(ArgumentList node) {
-    ArgumentList toNode = this._toNode as ArgumentList;
-    return _and(
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodeLists(node.arguments, toNode.arguments),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis));
-  }
-
-  @override
-  bool visitAsExpression(AsExpression node) {
-    AsExpression toNode = this._toNode as AsExpression;
-    if (_and(
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.asOperator, toNode.asOperator),
-        _isEqualNodes(node.type, toNode.type))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitAssertStatement(AssertStatement node) {
-    AssertStatement toNode = this._toNode as AssertStatement;
-    return _and(
-        _isEqualTokens(node.assertKeyword, toNode.assertKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.condition, toNode.condition),
-        _isEqualTokens(node.comma, toNode.comma),
-        _isEqualNodes(node.message, toNode.message),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitAssignmentExpression(AssignmentExpression node) {
-    AssignmentExpression toNode = this._toNode as AssignmentExpression;
-    if (_and(
-        _isEqualNodes(node.leftHandSide, toNode.leftHandSide),
-        _isEqualTokens(node.operator, toNode.operator),
-        _isEqualNodes(node.rightHandSide, toNode.rightHandSide))) {
-      toNode.propagatedElement = node.propagatedElement;
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticElement = node.staticElement;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitAwaitExpression(AwaitExpression node) {
-    AwaitExpression toNode = this._toNode as AwaitExpression;
-    if (_and(_isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
-        _isEqualNodes(node.expression, toNode.expression))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitBinaryExpression(BinaryExpression node) {
-    BinaryExpression toNode = this._toNode as BinaryExpression;
-    if (_and(
-        _isEqualNodes(node.leftOperand, toNode.leftOperand),
-        _isEqualTokens(node.operator, toNode.operator),
-        _isEqualNodes(node.rightOperand, toNode.rightOperand))) {
-      toNode.propagatedElement = node.propagatedElement;
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticElement = node.staticElement;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitBlock(Block node) {
-    Block toNode = this._toNode as Block;
-    return _and(
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.statements, toNode.statements),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket));
-  }
-
-  @override
-  bool visitBlockFunctionBody(BlockFunctionBody node) {
-    BlockFunctionBody toNode = this._toNode as BlockFunctionBody;
-    return _isEqualNodes(node.block, toNode.block);
-  }
-
-  @override
-  bool visitBooleanLiteral(BooleanLiteral node) {
-    BooleanLiteral toNode = this._toNode as BooleanLiteral;
-    if (_and(_isEqualTokens(node.literal, toNode.literal),
-        node.value == toNode.value)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitBreakStatement(BreakStatement node) {
-    BreakStatement toNode = this._toNode as BreakStatement;
-    if (_and(
-        _isEqualTokens(node.breakKeyword, toNode.breakKeyword),
-        _isEqualNodes(node.label, toNode.label),
-        _isEqualTokens(node.semicolon, toNode.semicolon))) {
-      // TODO(paulberry): map node.target to toNode.target.
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitCascadeExpression(CascadeExpression node) {
-    CascadeExpression toNode = this._toNode as CascadeExpression;
-    if (_and(_isEqualNodes(node.target, toNode.target),
-        _isEqualNodeLists(node.cascadeSections, toNode.cascadeSections))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitCatchClause(CatchClause node) {
-    CatchClause toNode = this._toNode as CatchClause;
-    return _and(
-        _isEqualTokens(node.onKeyword, toNode.onKeyword),
-        _isEqualNodes(node.exceptionType, toNode.exceptionType),
-        _isEqualTokens(node.catchKeyword, toNode.catchKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.exceptionParameter, toNode.exceptionParameter),
-        _isEqualTokens(node.comma, toNode.comma),
-        _isEqualNodes(node.stackTraceParameter, toNode.stackTraceParameter),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.body, toNode.body));
-  }
-
-  @override
-  bool visitClassDeclaration(ClassDeclaration node) {
-    ClassDeclaration toNode = this._toNode as ClassDeclaration;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.abstractKeyword, toNode.abstractKeyword),
-        _isEqualTokens(node.classKeyword, toNode.classKeyword),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.typeParameters, toNode.typeParameters),
-        _isEqualNodes(node.extendsClause, toNode.extendsClause),
-        _isEqualNodes(node.withClause, toNode.withClause),
-        _isEqualNodes(node.implementsClause, toNode.implementsClause),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.members, toNode.members),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket));
-  }
-
-  @override
-  bool visitClassTypeAlias(ClassTypeAlias node) {
-    ClassTypeAlias toNode = this._toNode as ClassTypeAlias;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.typedefKeyword, toNode.typedefKeyword),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.typeParameters, toNode.typeParameters),
-        _isEqualTokens(node.equals, toNode.equals),
-        _isEqualTokens(node.abstractKeyword, toNode.abstractKeyword),
-        _isEqualNodes(node.superclass, toNode.superclass),
-        _isEqualNodes(node.withClause, toNode.withClause),
-        _isEqualNodes(node.implementsClause, toNode.implementsClause),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitComment(Comment node) {
-    Comment toNode = this._toNode as Comment;
-    return _isEqualNodeLists(node.references, toNode.references);
-  }
-
-  @override
-  bool visitCommentReference(CommentReference node) {
-    CommentReference toNode = this._toNode as CommentReference;
-    return _and(_isEqualTokens(node.newKeyword, toNode.newKeyword),
-        _isEqualNodes(node.identifier, toNode.identifier));
-  }
-
-  @override
-  bool visitCompilationUnit(CompilationUnit node) {
-    CompilationUnit toNode = this._toNode as CompilationUnit;
-    if (_and(
-        _isEqualTokens(node.beginToken, toNode.beginToken),
-        _isEqualNodes(node.scriptTag, toNode.scriptTag),
-        _isEqualNodeLists(node.directives, toNode.directives),
-        _isEqualNodeLists(node.declarations, toNode.declarations),
-        _isEqualTokens(node.endToken, toNode.endToken))) {
-      toNode.element = node.element;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitConditionalExpression(ConditionalExpression node) {
-    ConditionalExpression toNode = this._toNode as ConditionalExpression;
-    if (_and(
-        _isEqualNodes(node.condition, toNode.condition),
-        _isEqualTokens(node.question, toNode.question),
-        _isEqualNodes(node.thenExpression, toNode.thenExpression),
-        _isEqualTokens(node.colon, toNode.colon),
-        _isEqualNodes(node.elseExpression, toNode.elseExpression))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitConfiguration(Configuration node) {
-    Configuration toNode = this._toNode as Configuration;
-    if (_and(
-        _isEqualTokens(node.ifKeyword, toNode.ifKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualTokens(node.equalToken, toNode.equalToken),
-        _isEqualNodes(node.value, toNode.value),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.libraryUri, toNode.libraryUri))) {
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitConstructorDeclaration(ConstructorDeclaration node) {
-    ConstructorDeclaration toNode = this._toNode as ConstructorDeclaration;
-    if (_and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.externalKeyword, toNode.externalKeyword),
-        _isEqualTokens(node.constKeyword, toNode.constKeyword),
-        _isEqualTokens(node.factoryKeyword, toNode.factoryKeyword),
-        _isEqualNodes(node.returnType, toNode.returnType),
-        _isEqualTokens(node.period, toNode.period),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.parameters, toNode.parameters),
-        _isEqualTokens(node.separator, toNode.separator),
-        _isEqualNodeLists(node.initializers, toNode.initializers),
-        _isEqualNodes(node.redirectedConstructor, toNode.redirectedConstructor),
-        _isEqualNodes(node.body, toNode.body))) {
-      toNode.element = node.element;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
-    ConstructorFieldInitializer toNode =
-        this._toNode as ConstructorFieldInitializer;
-    return _and(
-        _isEqualTokens(node.thisKeyword, toNode.thisKeyword),
-        _isEqualTokens(node.period, toNode.period),
-        _isEqualNodes(node.fieldName, toNode.fieldName),
-        _isEqualTokens(node.equals, toNode.equals),
-        _isEqualNodes(node.expression, toNode.expression));
-  }
-
-  @override
-  bool visitConstructorName(ConstructorName node) {
-    ConstructorName toNode = this._toNode as ConstructorName;
-    if (_and(
-        _isEqualNodes(node.type, toNode.type),
-        _isEqualTokens(node.period, toNode.period),
-        _isEqualNodes(node.name, toNode.name))) {
-      toNode.staticElement = node.staticElement;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitContinueStatement(ContinueStatement node) {
-    ContinueStatement toNode = this._toNode as ContinueStatement;
-    if (_and(
-        _isEqualTokens(node.continueKeyword, toNode.continueKeyword),
-        _isEqualNodes(node.label, toNode.label),
-        _isEqualTokens(node.semicolon, toNode.semicolon))) {
-      // TODO(paulberry): map node.target to toNode.target.
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitDeclaredIdentifier(DeclaredIdentifier node) {
-    DeclaredIdentifier toNode = this._toNode as DeclaredIdentifier;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodes(node.type, toNode.type),
-        _isEqualNodes(node.identifier, toNode.identifier));
-  }
-
-  @override
-  bool visitDefaultFormalParameter(DefaultFormalParameter node) {
-    DefaultFormalParameter toNode = this._toNode as DefaultFormalParameter;
-    return _and(
-        _isEqualNodes(node.parameter, toNode.parameter),
-        node.kind == toNode.kind,
-        _isEqualTokens(node.separator, toNode.separator),
-        _isEqualNodes(node.defaultValue, toNode.defaultValue));
-  }
-
-  @override
-  bool visitDoStatement(DoStatement node) {
-    DoStatement toNode = this._toNode as DoStatement;
-    return _and(
-        _isEqualTokens(node.doKeyword, toNode.doKeyword),
-        _isEqualNodes(node.body, toNode.body),
-        _isEqualTokens(node.whileKeyword, toNode.whileKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.condition, toNode.condition),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitDottedName(DottedName node) {
-    DottedName toNode = this._toNode as DottedName;
-    return _isEqualNodeLists(node.components, toNode.components);
-  }
-
-  @override
-  bool visitDoubleLiteral(DoubleLiteral node) {
-    DoubleLiteral toNode = this._toNode as DoubleLiteral;
-    if (_and(_isEqualTokens(node.literal, toNode.literal),
-        node.value == toNode.value)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitEmptyFunctionBody(EmptyFunctionBody node) {
-    EmptyFunctionBody toNode = this._toNode as EmptyFunctionBody;
-    return _isEqualTokens(node.semicolon, toNode.semicolon);
-  }
-
-  @override
-  bool visitEmptyStatement(EmptyStatement node) {
-    EmptyStatement toNode = this._toNode as EmptyStatement;
-    return _isEqualTokens(node.semicolon, toNode.semicolon);
-  }
-
-  @override
-  bool visitEnumConstantDeclaration(EnumConstantDeclaration node) {
-    EnumConstantDeclaration toNode = this._toNode as EnumConstantDeclaration;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualNodes(node.name, toNode.name));
-  }
-
-  @override
-  bool visitEnumDeclaration(EnumDeclaration node) {
-    EnumDeclaration toNode = this._toNode as EnumDeclaration;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.enumKeyword, toNode.enumKeyword),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.constants, toNode.constants),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket));
-  }
-
-  @override
-  bool visitExportDirective(ExportDirective node) {
-    ExportDirective toNode = this._toNode as ExportDirective;
-    if (_and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodes(node.uri, toNode.uri),
-        _isEqualNodeLists(node.combinators, toNode.combinators),
-        _isEqualTokens(node.semicolon, toNode.semicolon))) {
-      toNode.element = node.element;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitExpressionFunctionBody(ExpressionFunctionBody node) {
-    ExpressionFunctionBody toNode = this._toNode as ExpressionFunctionBody;
-    return _and(
-        _isEqualTokens(node.functionDefinition, toNode.functionDefinition),
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitExpressionStatement(ExpressionStatement node) {
-    ExpressionStatement toNode = this._toNode as ExpressionStatement;
-    return _and(_isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitExtendsClause(ExtendsClause node) {
-    ExtendsClause toNode = this._toNode as ExtendsClause;
-    return _and(_isEqualTokens(node.extendsKeyword, toNode.extendsKeyword),
-        _isEqualNodes(node.superclass, toNode.superclass));
-  }
-
-  @override
-  bool visitFieldDeclaration(FieldDeclaration node) {
-    FieldDeclaration toNode = this._toNode as FieldDeclaration;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.staticKeyword, toNode.staticKeyword),
-        _isEqualNodes(node.fields, toNode.fields),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitFieldFormalParameter(FieldFormalParameter node) {
-    FieldFormalParameter toNode = this._toNode as FieldFormalParameter;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodes(node.type, toNode.type),
-        _isEqualTokens(node.thisKeyword, toNode.thisKeyword),
-        _isEqualTokens(node.period, toNode.period),
-        _isEqualNodes(node.identifier, toNode.identifier));
-  }
-
-  @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),
-        _isEqualTokens(node.inKeyword, toNode.inKeyword),
-        _isEqualNodes(node.iterable, toNode.iterable),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.body, toNode.body));
-  }
-
-  @override
-  bool visitFormalParameterList(FormalParameterList node) {
-    FormalParameterList toNode = this._toNode as FormalParameterList;
-    return _and(
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodeLists(node.parameters, toNode.parameters),
-        _isEqualTokens(node.leftDelimiter, toNode.leftDelimiter),
-        _isEqualTokens(node.rightDelimiter, toNode.rightDelimiter),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis));
-  }
-
-  @override
-  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 visitFunctionDeclaration(FunctionDeclaration node) {
-    FunctionDeclaration toNode = this._toNode as FunctionDeclaration;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.externalKeyword, toNode.externalKeyword),
-        _isEqualNodes(node.returnType, toNode.returnType),
-        _isEqualTokens(node.propertyKeyword, toNode.propertyKeyword),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.functionExpression, toNode.functionExpression));
-  }
-
-  @override
-  bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
-    FunctionDeclarationStatement toNode =
-        this._toNode as FunctionDeclarationStatement;
-    return _isEqualNodes(node.functionDeclaration, toNode.functionDeclaration);
-  }
-
-  @override
-  bool visitFunctionExpression(FunctionExpression node) {
-    FunctionExpression toNode = this._toNode as FunctionExpression;
-    if (_and(_isEqualNodes(node.parameters, toNode.parameters),
-        _isEqualNodes(node.body, toNode.body))) {
-      toNode.element = node.element;
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
-    FunctionExpressionInvocation toNode =
-        this._toNode as FunctionExpressionInvocation;
-    if (_and(_isEqualNodes(node.function, toNode.function),
-        _isEqualNodes(node.argumentList, toNode.argumentList))) {
-      toNode.propagatedElement = node.propagatedElement;
-      toNode.propagatedInvokeType = node.propagatedInvokeType;
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticInvokeType = node.staticInvokeType;
-      toNode.staticElement = node.staticElement;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitFunctionTypeAlias(FunctionTypeAlias node) {
-    FunctionTypeAlias toNode = this._toNode as FunctionTypeAlias;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.typedefKeyword, toNode.typedefKeyword),
-        _isEqualNodes(node.returnType, toNode.returnType),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.typeParameters, toNode.typeParameters),
-        _isEqualNodes(node.parameters, toNode.parameters),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
-    FunctionTypedFormalParameter toNode =
-        this._toNode as FunctionTypedFormalParameter;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualNodes(node.returnType, toNode.returnType),
-        _isEqualNodes(node.identifier, toNode.identifier),
-        _isEqualNodes(node.parameters, toNode.parameters));
-  }
-
-  @override
-  bool visitHideCombinator(HideCombinator node) {
-    HideCombinator toNode = this._toNode as HideCombinator;
-    return _and(_isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodeLists(node.hiddenNames, toNode.hiddenNames));
-  }
-
-  @override
-  bool visitIfStatement(IfStatement node) {
-    IfStatement toNode = this._toNode as IfStatement;
-    return _and(
-        _isEqualTokens(node.ifKeyword, toNode.ifKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.condition, toNode.condition),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.thenStatement, toNode.thenStatement),
-        _isEqualTokens(node.elseKeyword, toNode.elseKeyword),
-        _isEqualNodes(node.elseStatement, toNode.elseStatement));
-  }
-
-  @override
-  bool visitImplementsClause(ImplementsClause node) {
-    ImplementsClause toNode = this._toNode as ImplementsClause;
-    return _and(
-        _isEqualTokens(node.implementsKeyword, toNode.implementsKeyword),
-        _isEqualNodeLists(node.interfaces, toNode.interfaces));
-  }
-
-  @override
-  bool visitImportDirective(ImportDirective node) {
-    ImportDirective toNode = this._toNode as ImportDirective;
-    if (_and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodes(node.uri, toNode.uri),
-        _isEqualTokens(node.asKeyword, toNode.asKeyword),
-        _isEqualNodes(node.prefix, toNode.prefix),
-        _isEqualNodeLists(node.combinators, toNode.combinators),
-        _isEqualTokens(node.semicolon, toNode.semicolon))) {
-      toNode.element = node.element;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitIndexExpression(IndexExpression node) {
-    IndexExpression toNode = this._toNode as IndexExpression;
-    if (_and(
-        _isEqualNodes(node.target, toNode.target),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodes(node.index, toNode.index),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
-      toNode.auxiliaryElements = node.auxiliaryElements;
-      toNode.propagatedElement = node.propagatedElement;
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticElement = node.staticElement;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitInstanceCreationExpression(InstanceCreationExpression node) {
-    InstanceCreationExpression toNode =
-        this._toNode as InstanceCreationExpression;
-    if (_and(
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodes(node.constructorName, toNode.constructorName),
-        _isEqualNodes(node.argumentList, toNode.argumentList))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticElement = node.staticElement;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitIntegerLiteral(IntegerLiteral node) {
-    IntegerLiteral toNode = this._toNode as IntegerLiteral;
-    if (_and(_isEqualTokens(node.literal, toNode.literal),
-        node.value == toNode.value)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitInterpolationExpression(InterpolationExpression node) {
-    InterpolationExpression toNode = this._toNode as InterpolationExpression;
-    return _and(
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket));
-  }
-
-  @override
-  bool visitInterpolationString(InterpolationString node) {
-    InterpolationString toNode = this._toNode as InterpolationString;
-    return _and(_isEqualTokens(node.contents, toNode.contents),
-        node.value == toNode.value);
-  }
-
-  @override
-  bool visitIsExpression(IsExpression node) {
-    IsExpression toNode = this._toNode as IsExpression;
-    if (_and(
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.isOperator, toNode.isOperator),
-        _isEqualTokens(node.notOperator, toNode.notOperator),
-        _isEqualNodes(node.type, toNode.type))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitLabel(Label node) {
-    Label toNode = this._toNode as Label;
-    return _and(_isEqualNodes(node.label, toNode.label),
-        _isEqualTokens(node.colon, toNode.colon));
-  }
-
-  @override
-  bool visitLabeledStatement(LabeledStatement node) {
-    LabeledStatement toNode = this._toNode as LabeledStatement;
-    return _and(_isEqualNodeLists(node.labels, toNode.labels),
-        _isEqualNodes(node.statement, toNode.statement));
-  }
-
-  @override
-  bool visitLibraryDirective(LibraryDirective node) {
-    LibraryDirective toNode = this._toNode as LibraryDirective;
-    if (_and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.libraryKeyword, toNode.libraryKeyword),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualTokens(node.semicolon, toNode.semicolon))) {
-      toNode.element = node.element;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitLibraryIdentifier(LibraryIdentifier node) {
-    LibraryIdentifier toNode = this._toNode as LibraryIdentifier;
-    if (_isEqualNodeLists(node.components, toNode.components)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitListLiteral(ListLiteral node) {
-    ListLiteral toNode = this._toNode as ListLiteral;
-    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.propagatedType = node.propagatedType;
-      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.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitMapLiteralEntry(MapLiteralEntry node) {
-    MapLiteralEntry toNode = this._toNode as MapLiteralEntry;
-    return _and(
-        _isEqualNodes(node.key, toNode.key),
-        _isEqualTokens(node.separator, toNode.separator),
-        _isEqualNodes(node.value, toNode.value));
-  }
-
-  @override
-  bool visitMethodDeclaration(MethodDeclaration node) {
-    MethodDeclaration toNode = this._toNode as MethodDeclaration;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.externalKeyword, toNode.externalKeyword),
-        _isEqualTokens(node.modifierKeyword, toNode.modifierKeyword),
-        _isEqualNodes(node.returnType, toNode.returnType),
-        _isEqualTokens(node.propertyKeyword, toNode.propertyKeyword),
-        _isEqualTokens(node.propertyKeyword, toNode.propertyKeyword),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.parameters, toNode.parameters),
-        _isEqualNodes(node.body, toNode.body));
-  }
-
-  @override
-  bool visitMethodInvocation(MethodInvocation node) {
-    MethodInvocation toNode = this._toNode as MethodInvocation;
-    if (_and(
-        _isEqualNodes(node.target, toNode.target),
-        _isEqualTokens(node.operator, toNode.operator),
-        _isEqualNodes(node.methodName, toNode.methodName),
-        _isEqualNodes(node.argumentList, toNode.argumentList))) {
-      toNode.propagatedInvokeType = node.propagatedInvokeType;
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticInvokeType = node.staticInvokeType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitNamedExpression(NamedExpression node) {
-    NamedExpression toNode = this._toNode as NamedExpression;
-    if (_and(_isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.expression, toNode.expression))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitNativeClause(NativeClause node) {
-    NativeClause toNode = this._toNode as NativeClause;
-    return _and(_isEqualTokens(node.nativeKeyword, toNode.nativeKeyword),
-        _isEqualNodes(node.name, toNode.name));
-  }
-
-  @override
-  bool visitNativeFunctionBody(NativeFunctionBody node) {
-    NativeFunctionBody toNode = this._toNode as NativeFunctionBody;
-    return _and(
-        _isEqualTokens(node.nativeKeyword, toNode.nativeKeyword),
-        _isEqualNodes(node.stringLiteral, toNode.stringLiteral),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitNullLiteral(NullLiteral node) {
-    NullLiteral toNode = this._toNode as NullLiteral;
-    if (_isEqualTokens(node.literal, toNode.literal)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitParenthesizedExpression(ParenthesizedExpression node) {
-    ParenthesizedExpression toNode = this._toNode as ParenthesizedExpression;
-    if (_and(
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitPartDirective(PartDirective node) {
-    PartDirective toNode = this._toNode as PartDirective;
-    if (_and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.partKeyword, toNode.partKeyword),
-        _isEqualNodes(node.uri, toNode.uri),
-        _isEqualTokens(node.semicolon, toNode.semicolon))) {
-      toNode.element = node.element;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitPartOfDirective(PartOfDirective node) {
-    PartOfDirective toNode = this._toNode as PartOfDirective;
-    if (_and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.partKeyword, toNode.partKeyword),
-        _isEqualTokens(node.ofKeyword, toNode.ofKeyword),
-        _isEqualNodes(node.libraryName, toNode.libraryName),
-        _isEqualTokens(node.semicolon, toNode.semicolon))) {
-      toNode.element = node.element;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitPostfixExpression(PostfixExpression node) {
-    PostfixExpression toNode = this._toNode as PostfixExpression;
-    if (_and(_isEqualNodes(node.operand, toNode.operand),
-        _isEqualTokens(node.operator, toNode.operator))) {
-      toNode.propagatedElement = node.propagatedElement;
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticElement = node.staticElement;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitPrefixedIdentifier(PrefixedIdentifier node) {
-    PrefixedIdentifier toNode = this._toNode as PrefixedIdentifier;
-    if (_and(
-        _isEqualNodes(node.prefix, toNode.prefix),
-        _isEqualTokens(node.period, toNode.period),
-        _isEqualNodes(node.identifier, toNode.identifier))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitPrefixExpression(PrefixExpression node) {
-    PrefixExpression toNode = this._toNode as PrefixExpression;
-    if (_and(_isEqualTokens(node.operator, toNode.operator),
-        _isEqualNodes(node.operand, toNode.operand))) {
-      toNode.propagatedElement = node.propagatedElement;
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticElement = node.staticElement;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitPropertyAccess(PropertyAccess node) {
-    PropertyAccess toNode = this._toNode as PropertyAccess;
-    if (_and(
-        _isEqualNodes(node.target, toNode.target),
-        _isEqualTokens(node.operator, toNode.operator),
-        _isEqualNodes(node.propertyName, toNode.propertyName))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitRedirectingConstructorInvocation(
-      RedirectingConstructorInvocation node) {
-    RedirectingConstructorInvocation toNode =
-        this._toNode as RedirectingConstructorInvocation;
-    if (_and(
-        _isEqualTokens(node.thisKeyword, toNode.thisKeyword),
-        _isEqualTokens(node.period, toNode.period),
-        _isEqualNodes(node.constructorName, toNode.constructorName),
-        _isEqualNodes(node.argumentList, toNode.argumentList))) {
-      toNode.staticElement = node.staticElement;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitRethrowExpression(RethrowExpression node) {
-    RethrowExpression toNode = this._toNode as RethrowExpression;
-    if (_isEqualTokens(node.rethrowKeyword, toNode.rethrowKeyword)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitReturnStatement(ReturnStatement node) {
-    ReturnStatement toNode = this._toNode as ReturnStatement;
-    return _and(
-        _isEqualTokens(node.returnKeyword, toNode.returnKeyword),
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitScriptTag(ScriptTag node) {
-    ScriptTag toNode = this._toNode as ScriptTag;
-    return _isEqualTokens(node.scriptTag, toNode.scriptTag);
-  }
-
-  @override
-  bool visitShowCombinator(ShowCombinator node) {
-    ShowCombinator toNode = this._toNode as ShowCombinator;
-    return _and(_isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodeLists(node.shownNames, toNode.shownNames));
-  }
-
-  @override
-  bool visitSimpleFormalParameter(SimpleFormalParameter node) {
-    SimpleFormalParameter toNode = this._toNode as SimpleFormalParameter;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodes(node.type, toNode.type),
-        _isEqualNodes(node.identifier, toNode.identifier));
-  }
-
-  @override
-  bool visitSimpleIdentifier(SimpleIdentifier node) {
-    SimpleIdentifier toNode = this._toNode as SimpleIdentifier;
-    if (_isEqualTokens(node.token, toNode.token)) {
-      toNode.staticElement = node.staticElement;
-      toNode.staticType = node.staticType;
-      toNode.propagatedElement = node.propagatedElement;
-      toNode.propagatedType = node.propagatedType;
-      toNode.auxiliaryElements = node.auxiliaryElements;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitSimpleStringLiteral(SimpleStringLiteral node) {
-    SimpleStringLiteral toNode = this._toNode as SimpleStringLiteral;
-    if (_and(_isEqualTokens(node.literal, toNode.literal),
-        node.value == toNode.value)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitStringInterpolation(StringInterpolation node) {
-    StringInterpolation toNode = this._toNode as StringInterpolation;
-    if (_isEqualNodeLists(node.elements, toNode.elements)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitSuperConstructorInvocation(SuperConstructorInvocation node) {
-    SuperConstructorInvocation toNode =
-        this._toNode as SuperConstructorInvocation;
-    if (_and(
-        _isEqualTokens(node.superKeyword, toNode.superKeyword),
-        _isEqualTokens(node.period, toNode.period),
-        _isEqualNodes(node.constructorName, toNode.constructorName),
-        _isEqualNodes(node.argumentList, toNode.argumentList))) {
-      toNode.staticElement = node.staticElement;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitSuperExpression(SuperExpression node) {
-    SuperExpression toNode = this._toNode as SuperExpression;
-    if (_isEqualTokens(node.superKeyword, toNode.superKeyword)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitSwitchCase(SwitchCase node) {
-    SwitchCase toNode = this._toNode as SwitchCase;
-    return _and(
-        _isEqualNodeLists(node.labels, toNode.labels),
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.colon, toNode.colon),
-        _isEqualNodeLists(node.statements, toNode.statements));
-  }
-
-  @override
-  bool visitSwitchDefault(SwitchDefault node) {
-    SwitchDefault toNode = this._toNode as SwitchDefault;
-    return _and(
-        _isEqualNodeLists(node.labels, toNode.labels),
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualTokens(node.colon, toNode.colon),
-        _isEqualNodeLists(node.statements, toNode.statements));
-  }
-
-  @override
-  bool visitSwitchStatement(SwitchStatement node) {
-    SwitchStatement toNode = this._toNode as SwitchStatement;
-    return _and(
-        _isEqualTokens(node.switchKeyword, toNode.switchKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.members, toNode.members),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket));
-  }
-
-  @override
-  bool visitSymbolLiteral(SymbolLiteral node) {
-    SymbolLiteral toNode = this._toNode as SymbolLiteral;
-    if (_and(_isEqualTokens(node.poundSign, toNode.poundSign),
-        _isEqualTokenLists(node.components, toNode.components))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitThisExpression(ThisExpression node) {
-    ThisExpression toNode = this._toNode as ThisExpression;
-    if (_isEqualTokens(node.thisKeyword, toNode.thisKeyword)) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitThrowExpression(ThrowExpression node) {
-    ThrowExpression toNode = this._toNode as ThrowExpression;
-    if (_and(_isEqualTokens(node.throwKeyword, toNode.throwKeyword),
-        _isEqualNodes(node.expression, toNode.expression))) {
-      toNode.propagatedType = node.propagatedType;
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
-    TopLevelVariableDeclaration toNode =
-        this._toNode as TopLevelVariableDeclaration;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualNodes(node.variables, toNode.variables),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitTryStatement(TryStatement node) {
-    TryStatement toNode = this._toNode as TryStatement;
-    return _and(
-        _isEqualTokens(node.tryKeyword, toNode.tryKeyword),
-        _isEqualNodes(node.body, toNode.body),
-        _isEqualNodeLists(node.catchClauses, toNode.catchClauses),
-        _isEqualTokens(node.finallyKeyword, toNode.finallyKeyword),
-        _isEqualNodes(node.finallyBlock, toNode.finallyBlock));
-  }
-
-  @override
-  bool visitTypeArgumentList(TypeArgumentList node) {
-    TypeArgumentList toNode = this._toNode as TypeArgumentList;
-    return _and(
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.arguments, toNode.arguments),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket));
-  }
-
-  @override
-  bool visitTypeName(TypeName node) {
-    TypeName toNode = this._toNode as TypeName;
-    if (_and(_isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.typeArguments, toNode.typeArguments))) {
-      toNode.type = node.type;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitTypeParameter(TypeParameter node) {
-    TypeParameter toNode = this._toNode as TypeParameter;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualTokens(node.extendsKeyword, toNode.extendsKeyword),
-        _isEqualNodes(node.bound, toNode.bound));
-  }
-
-  @override
-  bool visitTypeParameterList(TypeParameterList node) {
-    TypeParameterList toNode = this._toNode as TypeParameterList;
-    return _and(
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.typeParameters, toNode.typeParameters),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket));
-  }
-
-  @override
-  bool visitVariableDeclaration(VariableDeclaration node) {
-    VariableDeclaration toNode = this._toNode as VariableDeclaration;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualNodes(node.name, toNode.name),
-        _isEqualTokens(node.equals, toNode.equals),
-        _isEqualNodes(node.initializer, toNode.initializer));
-  }
-
-  @override
-  bool visitVariableDeclarationList(VariableDeclarationList node) {
-    VariableDeclarationList toNode = this._toNode as VariableDeclarationList;
-    return _and(
-        _isEqualNodes(node.documentationComment, toNode.documentationComment),
-        _isEqualNodeLists(node.metadata, toNode.metadata),
-        _isEqualTokens(node.keyword, toNode.keyword),
-        _isEqualNodes(node.type, toNode.type),
-        _isEqualNodeLists(node.variables, toNode.variables));
-  }
-
-  @override
-  bool visitVariableDeclarationStatement(VariableDeclarationStatement node) {
-    VariableDeclarationStatement toNode =
-        this._toNode as VariableDeclarationStatement;
-    return _and(_isEqualNodes(node.variables, toNode.variables),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  @override
-  bool visitWhileStatement(WhileStatement node) {
-    WhileStatement toNode = this._toNode as WhileStatement;
-    return _and(
-        _isEqualTokens(node.whileKeyword, toNode.whileKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.condition, toNode.condition),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.body, toNode.body));
-  }
-
-  @override
-  bool visitWithClause(WithClause node) {
-    WithClause toNode = this._toNode as WithClause;
-    return _and(_isEqualTokens(node.withKeyword, toNode.withKeyword),
-        _isEqualNodeLists(node.mixinTypes, toNode.mixinTypes));
-  }
-
-  @override
-  bool visitYieldStatement(YieldStatement node) {
-    YieldStatement toNode = this._toNode as YieldStatement;
-    return _and(
-        _isEqualTokens(node.yieldKeyword, toNode.yieldKeyword),
-        _isEqualNodes(node.expression, toNode.expression),
-        _isEqualTokens(node.semicolon, toNode.semicolon));
-  }
-
-  /**
-   * Return `true` if all of the parameters are `true`.
-   */
-  bool _and(bool b1, bool b2,
-      [bool b3 = true,
-      bool b4 = true,
-      bool b5 = true,
-      bool b6 = true,
-      bool b7 = true,
-      bool b8 = true,
-      bool b9 = true,
-      bool b10 = true,
-      bool b11 = true,
-      bool b12 = true,
-      bool b13 = true]) {
-    // TODO(brianwilkerson) Inline this method.
-    return b1 &&
-        b2 &&
-        b3 &&
-        b4 &&
-        b5 &&
-        b6 &&
-        b7 &&
-        b8 &&
-        b9 &&
-        b10 &&
-        b11 &&
-        b12 &&
-        b13;
-  }
-
-  /**
-   * Return `true` if the [first] and [second] lists of AST nodes have the same
-   * size and corresponding elements are equal.
-   */
-  bool _isEqualNodeLists(NodeList first, NodeList second) {
-    if (first == null) {
-      return second == null;
-    } else if (second == null) {
-      return false;
-    }
-    int size = first.length;
-    if (second.length != size) {
-      return false;
-    }
-    bool equal = true;
-    for (int i = 0; i < size; i++) {
-      if (!_isEqualNodes(first[i], second[i])) {
-        equal = false;
-      }
-    }
-    return equal;
-  }
-
-  /**
-   * Return `true` if the [fromNode] and [toNode] have the same structure. As a
-   * side-effect, if the nodes do have the same structure, any resolution data
-   * from the first node will be copied to the second node.
-   */
-  bool _isEqualNodes(AstNode fromNode, AstNode toNode) {
-    if (fromNode == null) {
-      return toNode == null;
-    } else if (toNode == null) {
-      return false;
-    } else if (fromNode.runtimeType == toNode.runtimeType) {
-      this._toNode = toNode;
-      return fromNode.accept(this);
-    }
-    //
-    // Check for a simple transformation caused by entering a period.
-    //
-    if (toNode is PrefixedIdentifier) {
-      SimpleIdentifier prefix = toNode.prefix;
-      if (fromNode.runtimeType == prefix.runtimeType) {
-        this._toNode = prefix;
-        return fromNode.accept(this);
-      }
-    } else if (toNode is PropertyAccess) {
-      Expression target = toNode.target;
-      if (fromNode.runtimeType == target.runtimeType) {
-        this._toNode = target;
-        return fromNode.accept(this);
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Return `true` if the [first] and [second] arrays of tokens have the same
-   * length and corresponding elements are equal.
-   */
-  bool _isEqualTokenLists(List<Token> first, List<Token> second) {
-    int length = first.length;
-    if (second.length != length) {
-      return false;
-    }
-    for (int i = 0; i < length; i++) {
-      if (!_isEqualTokens(first[i], second[i])) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  /**
-   * Return `true` if the [first] and [second] tokens have the same structure.
-   */
-  bool _isEqualTokens(Token first, Token second) {
-    if (first == null) {
-      return second == null;
-    } else if (second == null) {
-      return false;
-    }
-    return first.lexeme == second.lexeme;
-  }
-
-  /**
-   * Copy resolution data from the [fromNode] to the [toNode].
-   */
-  static void copyResolutionData(AstNode fromNode, AstNode toNode) {
-    ResolutionCopier copier = new ResolutionCopier();
-    copier._isEqualNodes(fromNode, toNode);
-  }
-}
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 491d391..3f1c0ed 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -53,6 +53,12 @@
   ClassElement _enclosingClass;
 
   /**
+   * A flag indicating whether a surrounding member (compilation unit or class)
+   * is deprecated.
+   */
+  bool inDeprecatedMember = false;
+
+  /**
    * The error reporter by which errors will be reported.
    */
   final ErrorReporter _errorReporter;
@@ -118,13 +124,19 @@
   @override
   Object visitClassDeclaration(ClassDeclaration node) {
     ClassElement outerClass = _enclosingClass;
+    bool wasInDeprecatedMember = inDeprecatedMember;
+    ClassElement element = node.element;
+    if (element != null && element.isDeprecated) {
+      inDeprecatedMember = true;
+    }
     try {
-      _enclosingClass = node.element;
+      _enclosingClass = element;
       // Commented out until we decide that we want this hint in the analyzer
       //    checkForOverrideEqualsButNotHashCode(node);
       return super.visitClassDeclaration(node);
     } finally {
       _enclosingClass = outerClass;
+      inDeprecatedMember = wasInDeprecatedMember;
     }
   }
 
@@ -154,8 +166,17 @@
 
   @override
   Object visitFunctionDeclaration(FunctionDeclaration node) {
-    _checkForMissingReturn(node.returnType, node.functionExpression.body);
-    return super.visitFunctionDeclaration(node);
+    bool wasInDeprecatedMember = inDeprecatedMember;
+    ExecutableElement element = node.element;
+    if (element != null && element.isDeprecated) {
+      inDeprecatedMember = true;
+    }
+    try {
+      _checkForMissingReturn(node.returnType, node.functionExpression.body);
+      return super.visitFunctionDeclaration(node);
+    } finally {
+      inDeprecatedMember = wasInDeprecatedMember;
+    }
   }
 
   @override
@@ -196,11 +217,20 @@
 
   @override
   Object visitMethodDeclaration(MethodDeclaration node) {
-    // This was determined to not be a good hint, see: dartbug.com/16029
-    //checkForOverridingPrivateMember(node);
-    _checkForMissingReturn(node.returnType, node.body);
-    _checkForUnnecessaryNoSuchMethod(node);
-    return super.visitMethodDeclaration(node);
+    bool wasInDeprecatedMember = inDeprecatedMember;
+    ExecutableElement element = node.element;
+    if (element != null && element.isDeprecated) {
+      inDeprecatedMember = true;
+    }
+    try {
+      // This was determined to not be a good hint, see: dartbug.com/16029
+      //checkForOverridingPrivateMember(node);
+      _checkForMissingReturn(node.returnType, node.body);
+      _checkForUnnecessaryNoSuchMethod(node);
+      return super.visitMethodDeclaration(node);
+    } finally {
+      inDeprecatedMember = wasInDeprecatedMember;
+    }
   }
 
   @override
@@ -484,8 +514,19 @@
    * @return `true` if and only if a hint code is generated on the passed node
    * See [HintCode.DEPRECATED_MEMBER_USE].
    */
-  bool _checkForDeprecatedMemberUse(Element element, AstNode node) {
-    if (element != null && element.isDeprecated) {
+  void _checkForDeprecatedMemberUse(Element element, AstNode node) {
+    bool isDeprecated(Element element) {
+      if (element == null) {
+        return false;
+      } else if (element is PropertyAccessorElement && element.isSynthetic) {
+        element = (element as PropertyAccessorElement).variable;
+        if (element == null) {
+          return false;
+        }
+      }
+      return element.isDeprecated;
+    }
+    if (!inDeprecatedMember && isDeprecated(element)) {
       String displayName = element.displayName;
       if (element is ConstructorElement) {
         // TODO(jwren) We should modify ConstructorElement.getDisplayName(),
@@ -499,9 +540,7 @@
       }
       _errorReporter.reportErrorForNode(
           HintCode.DEPRECATED_MEMBER_USE, node, [displayName]);
-      return true;
     }
-    return false;
   }
 
   /**
@@ -518,9 +557,9 @@
    * @return `true` if and only if a hint code is generated on the passed node
    * See [HintCode.DEPRECATED_MEMBER_USE].
    */
-  bool _checkForDeprecatedMemberUseAtIdentifier(SimpleIdentifier identifier) {
+  void _checkForDeprecatedMemberUseAtIdentifier(SimpleIdentifier identifier) {
     if (identifier.inDeclarationContext()) {
-      return false;
+      return;
     }
     AstNode parent = identifier.parent;
     if ((parent is ConstructorName && identical(identifier, parent.name)) ||
@@ -529,9 +568,9 @@
         (parent is SuperConstructorInvocation &&
             identical(identifier, parent.constructorName)) ||
         parent is HideCombinator) {
-      return false;
+      return;
     }
-    return _checkForDeprecatedMemberUse(identifier.bestElement, identifier);
+    _checkForDeprecatedMemberUse(identifier.bestElement, identifier);
   }
 
   /**
@@ -1818,14 +1857,14 @@
             _errorReporter.reportErrorForNode(
                 HintCode.DEAD_CODE, node.rightOperand);
             // only visit the LHS:
-            _safelyVisit(lhsCondition);
+            lhsCondition?.accept(this);
             return null;
           } else if (lhsResult.value.toBoolValue() == false && isAmpAmp) {
             // report error on if block: false && !e!
             _errorReporter.reportErrorForNode(
                 HintCode.DEAD_CODE, node.rightOperand);
             // only visit the LHS:
-            _safelyVisit(lhsCondition);
+            lhsCondition?.accept(this);
             return null;
           }
         }
@@ -1839,13 +1878,13 @@
 //                // report error on else block: !e! || true
 //                errorReporter.reportError(HintCode.DEAD_CODE, node.getRightOperand());
 //                // only visit the RHS:
-//                safelyVisit(rhsCondition);
+//                rhsCondition?.accept(this);
 //                return null;
 //              } else if (rhsResult == ValidResult.RESULT_FALSE && isAmpAmp) {
 //                // report error on if block: !e! && false
 //                errorReporter.reportError(HintCode.DEAD_CODE, node.getRightOperand());
 //                // only visit the RHS:
-//                safelyVisit(rhsCondition);
+//                rhsCondition?.accept(this);
 //                return null;
 //              }
 //            }
@@ -1869,7 +1908,7 @@
   @override
   Object visitConditionalExpression(ConditionalExpression node) {
     Expression conditionExpression = node.condition;
-    _safelyVisit(conditionExpression);
+    conditionExpression?.accept(this);
     if (!_isDebugConstant(conditionExpression)) {
       EvaluationResultImpl result =
           _getConstantBooleanValue(conditionExpression);
@@ -1878,13 +1917,13 @@
           // report error on else block: true ? 1 : !2!
           _errorReporter.reportErrorForNode(
               HintCode.DEAD_CODE, node.elseExpression);
-          _safelyVisit(node.thenExpression);
+          node.thenExpression?.accept(this);
           return null;
         } else {
           // report error on if block: false ? !1! : 2
           _errorReporter.reportErrorForNode(
               HintCode.DEAD_CODE, node.thenExpression);
-          _safelyVisit(node.elseExpression);
+          node.elseExpression?.accept(this);
           return null;
         }
       }
@@ -1895,7 +1934,7 @@
   @override
   Object visitIfStatement(IfStatement node) {
     Expression conditionExpression = node.condition;
-    _safelyVisit(conditionExpression);
+    conditionExpression?.accept(this);
     if (!_isDebugConstant(conditionExpression)) {
       EvaluationResultImpl result =
           _getConstantBooleanValue(conditionExpression);
@@ -1906,14 +1945,14 @@
           if (elseStatement != null) {
             _errorReporter.reportErrorForNode(
                 HintCode.DEAD_CODE, elseStatement);
-            _safelyVisit(node.thenStatement);
+            node.thenStatement?.accept(this);
             return null;
           }
         } else {
           // report error on if block: if (false) {!} else {}
           _errorReporter.reportErrorForNode(
               HintCode.DEAD_CODE, node.thenStatement);
-          _safelyVisit(node.elseStatement);
+          node.elseStatement?.accept(this);
           return null;
         }
       }
@@ -1935,8 +1974,8 @@
 
   @override
   Object visitTryStatement(TryStatement node) {
-    _safelyVisit(node.body);
-    _safelyVisit(node.finallyBlock);
+    node.body?.accept(this);
+    node.finallyBlock?.accept(this);
     NodeList<CatchClause> catchClauses = node.catchClauses;
     int numOfCatchClauses = catchClauses.length;
     List<DartType> visitedTypes = new List<DartType>();
@@ -1953,7 +1992,7 @@
             // this is equivalent to having a catch clause that doesn't have an
             // exception type, visit the block, but generate an error on any
             // following catch clauses (and don't visit them).
-            _safelyVisit(catchClause);
+            catchClause?.accept(this);
             if (i + 1 != numOfCatchClauses) {
               // this catch clause is not the last in the try statement
               CatchClause nextCatchClause = catchClauses[i + 1];
@@ -1980,12 +2019,12 @@
           }
           visitedTypes.add(currentType);
         }
-        _safelyVisit(catchClause);
+        catchClause?.accept(this);
       } else {
         // Found catch clause clause that doesn't have an exception type,
         // visit the block, but generate an error on any following catch clauses
         // (and don't visit them).
-        _safelyVisit(catchClause);
+        catchClause?.accept(this);
         if (i + 1 != numOfCatchClauses) {
           // this catch clause is not the last in the try statement
           CatchClause nextCatchClause = catchClauses[i + 1];
@@ -2004,7 +2043,7 @@
   @override
   Object visitWhileStatement(WhileStatement node) {
     Expression conditionExpression = node.condition;
-    _safelyVisit(conditionExpression);
+    conditionExpression?.accept(this);
     if (!_isDebugConstant(conditionExpression)) {
       EvaluationResultImpl result =
           _getConstantBooleanValue(conditionExpression);
@@ -2016,7 +2055,7 @@
         }
       }
     }
-    _safelyVisit(node.body);
+    node.body?.accept(this);
     return null;
   }
 
@@ -2031,7 +2070,7 @@
     int size = statements.length;
     for (int i = 0; i < size; i++) {
       Statement currentStatement = statements[i];
-      _safelyVisit(currentStatement);
+      currentStatement?.accept(this);
       bool returnOrBreakingStatement = currentStatement is ReturnStatement ||
           (currentStatement is BreakStatement &&
               currentStatement.label == null) ||
@@ -2103,24 +2142,19 @@
     }
     return false;
   }
-
-  /**
-   * If the given node is not `null`, visit this instance of the dead code verifier.
-   *
-   * @param node the node to be visited
-   */
-  void _safelyVisit(AstNode node) {
-    if (node != null) {
-      node.accept(this);
-    }
-  }
 }
 
 /**
  * A visitor that resolves declarations in an AST structure to already built
  * elements.
+ *
+ * The resulting AST must have everything resolved that would have been resolved
+ * by a [CompilationUnitBuilder] (that is, must be a valid [RESOLVED_UNIT1]).
+ * This class must not assume that the [CompilationUnitElement] passed to it is
+ * any more complete than a [COMPILATION_UNIT_ELEMENT].
  */
-class DeclarationResolver extends RecursiveAstVisitor<Object> {
+class DeclarationResolver extends RecursiveAstVisitor<Object>
+    with ExistingElementResolver {
   /**
    * The analysis context containing the sources to be analyzed.
    */
@@ -2133,11 +2167,6 @@
   Set<Element> _expectedElements;
 
   /**
-   * The compilation unit containing the AST nodes being visited.
-   */
-  CompilationUnitElement _enclosingUnit;
-
-  /**
    * The function type alias containing the AST nodes being visited, or `null`
    * if we are not in the scope of a function type alias.
    */
@@ -2200,7 +2229,7 @@
       SimpleIdentifier className = node.name;
       _enclosingClass = _findIdentifier(_enclosingUnit.types, className);
       super.visitClassDeclaration(node);
-      _resolveMetadata(node.metadata, _enclosingClass);
+      _resolveMetadata(node, node.metadata, _enclosingClass);
       return null;
     } finally {
       _enclosingClass = outerClass;
@@ -2214,7 +2243,7 @@
       SimpleIdentifier className = node.name;
       _enclosingClass = _findIdentifier(_enclosingUnit.types, className);
       super.visitClassTypeAlias(node);
-      _resolveMetadata(node.metadata, _enclosingClass);
+      _resolveMetadata(node, node.metadata, _enclosingClass);
       return null;
     } finally {
       _enclosingClass = outerClass;
@@ -2244,7 +2273,7 @@
       _expectedElements.remove(_enclosingExecutable);
       node.element = _enclosingExecutable as ConstructorElement;
       super.visitConstructorDeclaration(node);
-      _resolveMetadata(node.metadata, _enclosingExecutable);
+      _resolveMetadata(node, node.metadata, _enclosingExecutable);
       return null;
     } finally {
       _enclosingExecutable = outerExecutable;
@@ -2257,7 +2286,7 @@
     Element element =
         _findIdentifier(_enclosingExecutable.localVariables, variableName);
     super.visitDeclaredIdentifier(node);
-    _resolveMetadata(node.metadata, element);
+    _resolveMetadata(node, node.metadata, element);
     return null;
   }
 
@@ -2279,7 +2308,7 @@
     try {
       _enclosingParameter = element;
       super.visitDefaultFormalParameter(node);
-      _resolveMetadata(node.metadata, element);
+      _resolveMetadata(node, node.metadata, element);
       return null;
     } finally {
       _enclosingParameter = outerParameter;
@@ -2295,30 +2324,22 @@
       _findIdentifier(constants, constant.name);
     }
     super.visitEnumDeclaration(node);
-    _resolveMetadata(node.metadata, enclosingEnum);
+    _resolveMetadata(node, node.metadata, enclosingEnum);
     return null;
   }
 
   @override
   Object visitExportDirective(ExportDirective node) {
-    String uri = _getStringValue(node.uri);
-    ExportElement exportElement;
-    if (uri != null) {
-      LibraryElement library = _enclosingUnit.library;
-      Source source = _enclosingUnit.context.sourceFactory
-          .resolveUri(_enclosingUnit.source, uri);
-      exportElement = _findExport(node, library.exports, source);
-      node.element = exportElement;
-    }
     super.visitExportDirective(node);
-    _resolveMetadata(node.metadata, exportElement);
+    _resolveAnnotations(
+        node, node.metadata, _enclosingUnit.getAnnotations(node.offset));
     return null;
   }
 
   @override
   Object visitFieldDeclaration(FieldDeclaration node) {
     super.visitFieldDeclaration(node);
-    _resolveMetadata(node.metadata, node.fields.variables[0].element);
+    _resolveMetadata(node, node.metadata, node.fields.variables[0].element);
     return null;
   }
 
@@ -2331,7 +2352,7 @@
       try {
         _enclosingParameter = element;
         super.visitFieldFormalParameter(node);
-        _resolveMetadata(node.metadata, element);
+        _resolveMetadata(node, node.metadata, element);
         return null;
       } finally {
         _enclosingParameter = outerParameter;
@@ -2380,7 +2401,7 @@
       }
       node.functionExpression.element = _enclosingExecutable;
       super.visitFunctionDeclaration(node);
-      _resolveMetadata(node.metadata, _enclosingExecutable);
+      _resolveMetadata(node, node.metadata, _enclosingExecutable);
       return null;
     } finally {
       _enclosingExecutable = outerExecutable;
@@ -2412,7 +2433,7 @@
       _enclosingAlias =
           _findIdentifier(_enclosingUnit.functionTypeAliases, aliasName);
       super.visitFunctionTypeAlias(node);
-      _resolveMetadata(node.metadata, _enclosingAlias);
+      _resolveMetadata(node, node.metadata, _enclosingAlias);
       return null;
     } finally {
       _enclosingAlias = outerAlias;
@@ -2428,7 +2449,7 @@
       try {
         _enclosingParameter = element;
         super.visitFunctionTypedFormalParameter(node);
-        _resolveMetadata(node.metadata, _enclosingParameter);
+        _resolveMetadata(node, node.metadata, _enclosingParameter);
         return null;
       } finally {
         _enclosingParameter = outerParameter;
@@ -2440,17 +2461,9 @@
 
   @override
   Object visitImportDirective(ImportDirective node) {
-    String uri = _getStringValue(node.uri);
-    ImportElement importElement;
-    if (uri != null) {
-      LibraryElement library = _enclosingUnit.library;
-      Source source = _enclosingUnit.context.sourceFactory
-          .resolveUri(_enclosingUnit.source, uri);
-      importElement = _findImport(node, library.imports, source);
-      node.element = importElement;
-    }
     super.visitImportDirective(node);
-    _resolveMetadata(node.metadata, importElement);
+    _resolveAnnotations(
+        node, node.metadata, _enclosingUnit.getAnnotations(node.offset));
     return null;
   }
 
@@ -2465,10 +2478,9 @@
 
   @override
   Object visitLibraryDirective(LibraryDirective node) {
-    LibraryElement libraryElement = _enclosingUnit.library;
-    node.element = libraryElement;
     super.visitLibraryDirective(node);
-    _resolveMetadata(node.metadata, libraryElement);
+    _resolveAnnotations(
+        node, node.metadata, _enclosingUnit.getAnnotations(node.offset));
     return null;
   }
 
@@ -2500,7 +2512,7 @@
         _enclosingExecutable = accessor;
       }
       super.visitMethodDeclaration(node);
-      _resolveMetadata(node.metadata, _enclosingExecutable);
+      _resolveMetadata(node, node.metadata, _enclosingExecutable);
       return null;
     } finally {
       _enclosingExecutable = outerExecutable;
@@ -2509,16 +2521,9 @@
 
   @override
   Object visitPartDirective(PartDirective node) {
-    String uri = _getStringValue(node.uri);
-    CompilationUnitElement compilationUnitElement;
-    if (uri != null) {
-      Source partSource = _enclosingUnit.context.sourceFactory
-          .resolveUri(_enclosingUnit.source, uri);
-      compilationUnitElement =
-          _findPart(_enclosingUnit.library.parts, node, partSource);
-    }
     super.visitPartDirective(node);
-    _resolveMetadata(node.metadata, compilationUnitElement);
+    _resolveAnnotations(
+        node, node.metadata, _enclosingUnit.getAnnotations(node.offset));
     return null;
   }
 
@@ -2537,7 +2542,7 @@
       try {
         _enclosingParameter = element;
         super.visitSimpleFormalParameter(node);
-        _resolveMetadata(node.metadata, element);
+        _resolveMetadata(node, node.metadata, element);
         return null;
       } finally {
         _enclosingParameter = outerParameter;
@@ -2567,7 +2572,7 @@
   @override
   Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     super.visitTopLevelVariableDeclaration(node);
-    _resolveMetadata(node.metadata, node.variables.variables[0].element);
+    _resolveMetadata(node, node.metadata, node.variables.variables[0].element);
     return null;
   }
 
@@ -2596,7 +2601,7 @@
           'Could not find type parameter with name "$name" at $offset', node);
     }
     super.visitTypeParameter(node);
-    _resolveMetadata(node.metadata, element);
+    _resolveMetadata(node, node.metadata, element);
     return null;
   }
 
@@ -2634,7 +2639,7 @@
     super.visitVariableDeclarationList(node);
     if (node.parent is! FieldDeclaration &&
         node.parent is! TopLevelVariableDeclaration) {
-      _resolveMetadata(node.metadata, node.variables[0].element);
+      _resolveMetadata(node, node.metadata, node.variables[0].element);
     }
     return null;
   }
@@ -2651,25 +2656,6 @@
       _findWithNameAndOffset(elements, node, '', offset);
 
   /**
-   * Return the export element from the given list of [exports] whose library
-   * has the given [source]. Throw an [ElementMismatchException] if an element
-   * corresponding to the identifier cannot be found.
-   */
-  ExportElement _findExport(
-      ExportDirective node, List<ExportElement> exports, Source source) {
-    if (source == null || !_context.exists(source)) {
-      return null;
-    }
-    for (ExportElement export in exports) {
-      if (export.exportedLibrary.source == source) {
-        return export;
-      }
-    }
-    _mismatch("Could not find export element for '$source'", node);
-    return null; // Never reached
-  }
-
-  /**
    * Return the element in the given list of [elements] that was created for the
    * declaration with the given [identifier]. As a side-effect, associate the
    * returned element with the identifier. Throw an [ElementMismatchException]
@@ -2687,64 +2673,6 @@
   }
 
   /**
-   * Return the import element from the given list of [imports] whose library
-   * has the given [source]. Throw an [ElementMismatchException] if an element
-   * corresponding to the [source] cannot be found.
-   */
-  ImportElement _findImport(
-      ImportDirective node, List<ImportElement> imports, Source source) {
-    if (source == null || !_context.exists(source)) {
-      return null;
-    }
-    SimpleIdentifier prefix = node.prefix;
-    bool foundSource = false;
-    for (ImportElement element in imports) {
-      if (element.importedLibrary.source == source) {
-        foundSource = true;
-        PrefixElement prefixElement = element.prefix;
-        if (prefix == null) {
-          if (prefixElement == null) {
-            return element;
-          }
-        } else {
-          if (prefixElement != null &&
-              prefix.name == prefixElement.displayName) {
-            return element;
-          }
-        }
-      }
-    }
-    if (foundSource) {
-      if (prefix == null) {
-        _mismatch(
-            "Could not find import element for '$source' with no prefix", node);
-      }
-      _mismatch(
-          "Could not find import element for '$source' with prefix ${prefix.name}",
-          node);
-    }
-    _mismatch("Could not find import element for '$source'", node);
-    return null; // Never reached
-  }
-
-  /**
-   * Return the element in the given list of [parts] that was created for the
-   * part with the given [source]. Throw an [ElementMismatchException] if an
-   * element corresponding to the source cannot be found.
-   */
-  CompilationUnitElement _findPart(List<CompilationUnitElement> parts,
-      PartDirective directive, Source source) {
-    for (CompilationUnitElement part in parts) {
-      if (part.source == source) {
-        return part;
-      }
-    }
-    _mismatch(
-        'Could not find compilation unit element for "$source"', directive);
-    return null; // Never reached
-  }
-
-  /**
    * Return the element in the given list of [elements] that was created for the
    * declaration with the given [name] at the given [offset]. Throw an
    * [ElementMismatchException] if an element corresponding to the identifier
@@ -2811,51 +2739,37 @@
   }
 
   /**
-   * Return the value of the given string [literal], or `null` if the string is
-   * not a constant string without any string interpolation.
+   * Associate each of the annotation [nodes] with the corresponding
+   * [ElementAnnotation] in [annotations]. If there is a problem, report it
+   * against the given [parent] node.
    */
-  String _getStringValue(StringLiteral literal) {
-    if (literal is StringInterpolation) {
-      return null;
+  void _resolveAnnotations(AstNode parent, NodeList<Annotation> nodes,
+      List<ElementAnnotation> annotations) {
+    int nodeCount = nodes.length;
+    if (nodeCount != annotations.length) {
+      _mismatch(
+          'Found $nodeCount annotation nodes and '
+          '${annotations.length} element annotations',
+          parent);
     }
-    return literal.stringValue;
+    for (int i = 0; i < nodeCount; i++) {
+      nodes[i].elementAnnotation = annotations[i];
+    }
   }
 
   /**
-   * Throw an [ElementMismatchException] to report that the element model and
-   * the AST do not match. The [message] will have the path to the given [node]
-   * appended to it.
-   */
-  void _mismatch(String message, AstNode node) {
-    StringBuffer buffer = new StringBuffer();
-    buffer.writeln(message);
-    buffer.write('Path to root:');
-    String separator = ' ';
-    AstNode parent = node;
-    while (parent != null) {
-      buffer.write(separator);
-      buffer.write(parent.runtimeType.toString());
-      separator = ', ';
-      parent = parent.parent;
-    }
-    throw new ElementMismatchException(buffer.toString());
-  }
-
-  /**
-   * If [element] is not `null`, associate each [Annotation] in [astMetadata]
-   * with the corresponding [ElementAnnotation] in [element.metadata].
+   * If [element] is not `null`, associate each of the annotation [nodes] with
+   * the corresponding [ElementAnnotation] in [element.metadata]. If there is a
+   * problem, report it against the given [parent] node.
    *
    * If [element] is `null`, do nothing--this allows us to be robust in the
    * case where we are operating on an element model that hasn't been fully
    * built.
    */
-  void _resolveMetadata(NodeList<Annotation> astMetadata, Element element) {
+  void _resolveMetadata(
+      AstNode parent, NodeList<Annotation> nodes, Element element) {
     if (element != null) {
-      List<ElementAnnotation> elementMetadata = element.metadata;
-      assert(astMetadata.length == elementMetadata.length);
-      for (int i = 0; i < astMetadata.length; i++) {
-        astMetadata[i].elementAnnotation = elementMetadata[i];
-      }
+      _resolveAnnotations(parent, nodes, element.metadata);
     }
   }
 
@@ -2878,6 +2792,135 @@
 }
 
 /**
+ * A visitor that resolves directives in an AST structure to already built
+ * elements.
+ *
+ * The resulting AST must have everything resolved that would have been resolved
+ * by a [DirectiveElementBuilder].
+ */
+class DirectiveResolver extends SimpleAstVisitor with ExistingElementResolver {
+  @override
+  void visitCompilationUnit(CompilationUnit node) {
+    _enclosingUnit = node.element;
+    for (Directive directive in node.directives) {
+      directive.accept(this);
+    }
+  }
+
+  @override
+  void visitExportDirective(ExportDirective node) {
+    String uri = _getStringValue(node.uri);
+    if (uri != null) {
+      LibraryElement library = _enclosingUnit.library;
+      Source source = _enclosingUnit.context.sourceFactory
+          .resolveUri(_enclosingUnit.source, uri);
+      ExportElement exportElement = _findExport(node, library.exports, source);
+      node.element = exportElement;
+    } else {
+      node.element = null;
+    }
+  }
+
+  @override
+  void visitImportDirective(ImportDirective node) {
+    String uri = _getStringValue(node.uri);
+    if (uri != null) {
+      LibraryElement library = _enclosingUnit.library;
+      Source source = _enclosingUnit.context.sourceFactory
+          .resolveUri(_enclosingUnit.source, uri);
+      ImportElement importElement = _findImport(node, library.imports, source);
+      node.element = importElement;
+    } else {
+      node.element = null;
+    }
+  }
+
+  @override
+  void visitLibraryDirective(LibraryDirective node) {
+    node.element = _enclosingUnit.library;
+  }
+
+  /**
+   * Return the export element from the given list of [exports] whose library
+   * has the given [source]. Throw an [ElementMismatchException] if an element
+   * corresponding to the identifier cannot be found.
+   */
+  ExportElement _findExport(
+      ExportDirective node, List<ExportElement> exports, Source source) {
+    if (source == null || !_enclosingUnit.context.exists(source)) {
+      return null;
+    }
+    for (ExportElement export in exports) {
+      if (export.exportedLibrary.source == source) {
+        // Must have the same offset.
+        if (export.nameOffset != node.offset) {
+          continue;
+        }
+        // In general we should also match combinators.
+        // But currently we invalidate element model on any directive change.
+        // So, either the combinators are the same, or we build new elements.
+        return export;
+      }
+    }
+    _mismatch("Could not find export element for '$source'", node);
+    return null; // Never reached
+  }
+
+  /**
+   * Return the import element from the given list of [imports] whose library
+   * has the given [source]. Throw an [ElementMismatchException] if an element
+   * corresponding to the [source] cannot be found.
+   */
+  ImportElement _findImport(
+      ImportDirective node, List<ImportElement> imports, Source source) {
+    if (source == null || !_enclosingUnit.context.exists(source)) {
+      return null;
+    }
+    SimpleIdentifier prefix = node.prefix;
+    bool foundSource = false;
+    for (ImportElement element in imports) {
+      if (element.importedLibrary.source == source) {
+        foundSource = true;
+        // Must have the same offset.
+        if (element.nameOffset != node.offset) {
+          continue;
+        }
+        // Must have the same prefix.
+        if (element.prefix?.displayName != prefix?.name) {
+          continue;
+        }
+        // In general we should also match combinators.
+        // But currently we invalidate element model on any directive change.
+        // So, either the combinators are the same, or we build new elements.
+        return element;
+      }
+    }
+    if (foundSource) {
+      if (prefix == null) {
+        _mismatch(
+            "Could not find import element for '$source' with no prefix", node);
+      }
+      _mismatch(
+          "Could not find import element for '$source' with prefix ${prefix.name}",
+          node);
+    }
+    _mismatch("Could not find any import element for '$source'", node);
+    return null; // Never reached
+  }
+
+  /**
+   * Return the value of the given string [literal], or `null` if the string is
+   * not a constant string without any string interpolation.
+   */
+  String _getStringValue(StringLiteral literal) {
+    if (literal is StringInterpolation) {
+      return null;
+    }
+    return literal.stringValue;
+  }
+}
+
+/**
  * Instances of the class `ElementHolder` hold on to elements created while traversing an AST
  * structure so that they can be accessed when creating their enclosing element.
  */
@@ -3255,6 +3298,7 @@
   /**
    * The scope in which this scope is lexically enclosed.
    */
+  @override
   final Scope enclosingScope;
 
   /**
@@ -3363,7 +3407,7 @@
     valuesField.static = true;
     valuesField.const3 = true;
     valuesField.synthetic = true;
-    valuesField.type = _typeProvider.listType.substitute4(<DartType>[enumType]);
+    valuesField.type = _typeProvider.listType.instantiate(<DartType>[enumType]);
     fields.add(valuesField);
     getters.add(_createGetter(valuesField));
     //
@@ -3374,13 +3418,7 @@
     int constantCount = constants.length;
     for (int i = 0; i < constantCount; i++) {
       EnumConstantDeclaration constant = constants[i];
-      SimpleIdentifier constantName = constant.name;
-      FieldElementImpl constantField =
-          new ConstFieldElementImpl.forNode(constantName);
-      constantField.static = true;
-      constantField.const3 = true;
-      constantField.type = enumType;
-      setElementDocumentationComment(constantField, constant);
+      FieldElementImpl constantField = constant.name.staticElement;
       //
       // Create a value for the constant.
       //
@@ -3392,8 +3430,7 @@
       constantValues.add(value);
       constantField.evaluationResult = new EvaluationResultImpl(value);
       fields.add(constantField);
-      getters.add(_createGetter(constantField));
-      constantName.staticElement = constantField;
+      getters.add(constantField.getter);
     }
     //
     // Build the value of the 'values' field.
@@ -3428,6 +3465,41 @@
 }
 
 /**
+ * A mixin for classes that use an existing element model to resolve a portion
+ * of an AST structure.
+ */
+class ExistingElementResolver {
+  /**
+   * The compilation unit containing the AST nodes being visited.
+   */
+  CompilationUnitElementImpl _enclosingUnit;
+
+  /**
+   * Throw an [ElementMismatchException] to report that the element model and the
+   * AST do not match. The [message] will have the path to the given [node]
+   * appended to it.
+   */
+  void _mismatch(String message, AstNode node) {
+    StringBuffer buffer = new StringBuffer();
+    buffer.write('Mismatch in ');
+    buffer.write(runtimeType);
+    buffer.write(' while resolving ');
+    buffer.writeln(_enclosingUnit?.source?.fullName);
+    buffer.writeln(message);
+    buffer.write('Path to root:');
+    String separator = ' ';
+    AstNode parent = node;
+    while (parent != null) {
+      buffer.write(separator);
+      buffer.write(parent.runtimeType.toString());
+      separator = ', ';
+      parent = parent.parent;
+    }
+    throw new ElementMismatchException(buffer.toString());
+  }
+}
+
+/**
  * Instances of the class `ExitDetector` determine whether the visited AST node is guaranteed
  * to terminate by executing a `return` statement, `throw` expression, `rethrow`
  * expression, or simple infinite loop such as `while(true)`.
@@ -4018,41 +4090,33 @@
 
   @override
   void visitExportDirective(ExportDirective node) {
-    _visitMetadata(node.metadata);
+    _visitDirective(node);
   }
 
   @override
   void visitImportDirective(ImportDirective node) {
-    _visitMetadata(node.metadata);
+    _visitDirective(node);
   }
 
   @override
   void visitLibraryDirective(LibraryDirective node) {
-    _visitMetadata(node.metadata);
-  }
-
-  @override
-  void visitPrefixedIdentifier(PrefixedIdentifier node) {
-    // If the prefixed identifier references some A.B, where A is a library
-    // prefix, then we can lookup the associated ImportDirective in
-    // prefixElementMap and remove it from the unusedImports list.
-    SimpleIdentifier prefixIdentifier = node.prefix;
-    Element element = prefixIdentifier.staticElement;
-    if (element is PrefixElement) {
-      usedElements.prefixes.add(element);
-      return;
-    }
-    // Otherwise, pass the prefixed identifier element and name onto
-    // visitIdentifier.
-    _visitIdentifier(element, prefixIdentifier.name);
+    _visitDirective(node);
   }
 
   @override
   void visitSimpleIdentifier(SimpleIdentifier node) {
-    _visitIdentifier(node.staticElement, node.name);
+    _visitIdentifier(node, node.staticElement);
   }
 
-  void _visitIdentifier(Element element, String name) {
+  /**
+   * Visit identifiers used by the given [directive].
+   */
+  void _visitDirective(Directive directive) {
+    directive.documentationComment?.accept(this);
+    directive.metadata.accept(this);
+  }
+
+  void _visitIdentifier(SimpleIdentifier identifier, Element element) {
     if (element == null) {
       return;
     }
@@ -4061,11 +4125,18 @@
     if (element is MultiplyDefinedElement) {
       MultiplyDefinedElement multiplyDefinedElement = element;
       for (Element elt in multiplyDefinedElement.conflictingElements) {
-        _visitIdentifier(elt, name);
+        _visitIdentifier(identifier, elt);
       }
       return;
-    } else if (element is PrefixElement) {
-      usedElements.prefixes.add(element);
+    }
+
+    // Record `importPrefix.identifier` into 'prefixMap'.
+    if (_recordPrefixMap(identifier, element)) {
+      return;
+    }
+
+    if (element is PrefixElement) {
+      usedElements.prefixMap.putIfAbsent(element, () => <Element>[]);
       return;
     } else if (element.enclosingElement is! CompilationUnitElement) {
       // Identifiers that aren't a prefix element and whose enclosing element
@@ -4088,17 +4159,27 @@
   }
 
   /**
-   * Given some [NodeList] of [Annotation]s, ensure that the identifiers are visited by
-   * this visitor. Specifically, this covers the cases where AST nodes don't have their identifiers
-   * visited by this visitor, but still need their annotations visited.
-   *
-   * @param annotations the list of annotations to visit
+   * If the given [identifier] is prefixed with a [PrefixElement], fill the
+   * corresponding `UsedImportedElements.prefixMap` entry and return `true`.
    */
-  void _visitMetadata(NodeList<Annotation> annotations) {
-    int count = annotations.length;
-    for (int i = 0; i < count; i++) {
-      annotations[i].accept(this);
+  bool _recordPrefixMap(SimpleIdentifier identifier, Element element) {
+    bool recordIfTargetIsPrefixElement(Expression target) {
+      if (target is SimpleIdentifier && target.staticElement is PrefixElement) {
+        List<Element> prefixedElements = usedElements.prefixMap
+            .putIfAbsent(target.staticElement, () => <Element>[]);
+        prefixedElements.add(element);
+        return true;
+      }
+      return false;
     }
+    AstNode parent = identifier.parent;
+    if (parent is MethodInvocation && parent.methodName == identifier) {
+      return recordIfTargetIsPrefixElement(parent.target);
+    }
+    if (parent is PrefixedIdentifier && parent.identifier == identifier) {
+      return recordIfTargetIsPrefixElement(parent.prefix);
+    }
+    return false;
   }
 }
 
@@ -4309,6 +4390,7 @@
             .removeUsedElements(_usedImportedElementsVisitor.usedElements);
         importsVerifier.generateDuplicateImportHints(definingUnitErrorReporter);
         importsVerifier.generateUnusedImportHints(definingUnitErrorReporter);
+        importsVerifier.generateUnusedShownNameHints(definingUnitErrorReporter);
       }
       _library.accept(new UnusedLocalElementsVerifier(
           _errorListener, _usedLocalElementsVisitor.usedElements));
@@ -4391,20 +4473,23 @@
 }
 
 /**
- * Instances of the class `ImportsVerifier` visit all of the referenced libraries in the
- * source code verifying that all of the imports are used, otherwise a
- * [HintCode.UNUSED_IMPORT] is generated with
- * [generateUnusedImportHints].
+ * Instances of the class `ImportsVerifier` visit all of the referenced libraries in the source code
+ * verifying that all of the imports are used, otherwise a [HintCode.UNUSED_IMPORT] hint is
+ * generated with [generateUnusedImportHints].
+ *
+ * Additionally, [generateDuplicateImportHints] generates [HintCode.DUPLICATE_IMPORT] hints and
+ * [HintCode.UNUSED_SHOWN_NAME] hints.
  *
  * While this class does not yet have support for an "Organize Imports" action, this logic built up
  * in this class could be used for such an action in the future.
  */
-class ImportsVerifier /*extends RecursiveAstVisitor<Object>*/ {
+class ImportsVerifier {
   /**
-   * A list of [ImportDirective]s that the current library imports, as identifiers are visited
-   * by this visitor and an import has been identified as being used by the library, the
-   * [ImportDirective] is removed from this list. After all the sources in the library have
-   * been evaluated, this list represents the set of unused imports.
+   * A list of [ImportDirective]s that the current library imports, but does not use.
+   *
+   * As identifiers are visited by this visitor and an import has been identified as being used
+   * by the library, the [ImportDirective] is removed from this list. After all the sources in the
+   * library have been evaluated, this list represents the set of unused imports.
    *
    * See [ImportsVerifier.generateUnusedImportErrors].
    */
@@ -4417,15 +4502,14 @@
   final List<ImportDirective> _duplicateImports = <ImportDirective>[];
 
   /**
-   * This is a map between the set of [LibraryElement]s that the current library imports, and
-   * a list of [ImportDirective]s that imports the library. In cases where the current library
-   * imports a library with a single directive (such as `import lib1.dart;`), the library
+   * This is a map between the set of [LibraryElement]s that the current library imports, and the
+   * list of [ImportDirective]s that import each [LibraryElement]. In cases where the current
+   * library imports a library with a single directive (such as `import lib1.dart;`), the library
    * element will map to a list of one [ImportDirective], which will then be removed from the
    * [unusedImports] list. In cases where the current library imports a library with multiple
-   * directives (such as `import lib1.dart; import lib1.dart show C;`), the
-   * [LibraryElement] will be mapped to a list of the import directives, and the namespace
-   * will need to be used to compute the correct [ImportDirective] being used, see
-   * [namespaceMap].
+   * directives (such as `import lib1.dart; import lib1.dart show C;`), the [LibraryElement] will
+   * be mapped to a list of the import directives, and the namespace will need to be used to
+   * compute the correct [ImportDirective] being used; see [_namespaceMap].
    */
   final HashMap<LibraryElement, List<ImportDirective>> _libraryMap =
       new HashMap<LibraryElement, List<ImportDirective>>();
@@ -4452,44 +4536,62 @@
   final HashMap<PrefixElement, List<ImportDirective>> _prefixElementMap =
       new HashMap<PrefixElement, List<ImportDirective>>();
 
+  /**
+   * A map of identifiers that the current library's imports show, but that the library does not
+   * use.
+   *
+   * Each import directive maps to a list of the identifiers that are imported via the "show"
+   * keyword.
+   *
+   * As each identifier is visited by this visitor, it is identified as being used by the library,
+   * and the identifier is removed from this map (under the import that imported it). After all the
+   * sources in the library have been evaluated, each list in this map's values present the set of
+   * unused shown elements.
+   *
+   * See [ImportsVerifier.generateUnusedShownNameHints].
+   */
+  final HashMap<ImportDirective, List<SimpleIdentifier>> _unusedShownNamesMap =
+      new HashMap<ImportDirective, List<SimpleIdentifier>>();
+
   void addImports(CompilationUnit node) {
     for (Directive directive in node.directives) {
       if (directive is ImportDirective) {
         ImportDirective importDirective = directive;
         LibraryElement libraryElement = importDirective.uriElement;
-        if (libraryElement != null) {
-          _unusedImports.add(importDirective);
-          //
-          // Initialize prefixElementMap
-          //
-          if (importDirective.asKeyword != null) {
-            SimpleIdentifier prefixIdentifier = importDirective.prefix;
-            if (prefixIdentifier != null) {
-              Element element = prefixIdentifier.staticElement;
-              if (element is PrefixElement) {
-                PrefixElement prefixElementKey = element;
-                List<ImportDirective> list =
-                    _prefixElementMap[prefixElementKey];
-                if (list == null) {
-                  list = new List<ImportDirective>();
-                  _prefixElementMap[prefixElementKey] = list;
-                }
-                list.add(importDirective);
-              }
-              // TODO (jwren) Can the element ever not be a PrefixElement?
-            }
-          }
-          //
-          // Initialize libraryMap: libraryElement -> importDirective
-          //
-          _putIntoLibraryMap(libraryElement, importDirective);
-          //
-          // For this new addition to the libraryMap, also recursively add any
-          // exports from the libraryElement.
-          //
-          _addAdditionalLibrariesForExports(
-              libraryElement, importDirective, new List<LibraryElement>());
+        if (libraryElement == null) {
+          continue;
         }
+        _unusedImports.add(importDirective);
+        //
+        // Initialize prefixElementMap
+        //
+        if (importDirective.asKeyword != null) {
+          SimpleIdentifier prefixIdentifier = importDirective.prefix;
+          if (prefixIdentifier != null) {
+            Element element = prefixIdentifier.staticElement;
+            if (element is PrefixElement) {
+              PrefixElement prefixElementKey = element;
+              List<ImportDirective> list = _prefixElementMap[prefixElementKey];
+              if (list == null) {
+                list = new List<ImportDirective>();
+                _prefixElementMap[prefixElementKey] = list;
+              }
+              list.add(importDirective);
+            }
+            // TODO (jwren) Can the element ever not be a PrefixElement?
+          }
+        }
+        //
+        // Initialize libraryMap: libraryElement -> importDirective
+        //
+        _putIntoLibraryMap(libraryElement, importDirective);
+        //
+        // For this new addition to the libraryMap, also recursively add any
+        // exports from the libraryElement.
+        //
+        _addAdditionalLibrariesForExports(
+            libraryElement, importDirective, new List<LibraryElement>());
+        _addShownNames(importDirective);
       }
     }
     if (_unusedImports.length > 1) {
@@ -4532,12 +4634,12 @@
   }
 
   /**
-   * After all of the compilation units have been visited by this visitor, this method can be called
-   * to report an [HintCode.UNUSED_IMPORT] hint for each of the import directives in the
-   * [unusedImports] list.
+   * Report an [HintCode.UNUSED_IMPORT] hint for each unused import.
    *
-   * @param errorReporter the error reporter to report the set of [HintCode.UNUSED_IMPORT]
-   *          hints to
+   * Only call this method after all of the compilation units have been visited by this visitor.
+   *
+   * @param errorReporter the error reporter used to report the set of [HintCode.UNUSED_IMPORT]
+   *          hints
    */
   void generateUnusedImportHints(ErrorReporter errorReporter) {
     for (ImportDirective unusedImport in _unusedImports) {
@@ -4555,32 +4657,60 @@
   }
 
   /**
+   * Report an [HintCode.UNUSED_SHOWN_NAME] hint for each unused shown name.
+   *
+   * Only call this method after all of the compilation units have been visited by this visitor.
+   *
+   * @param errorReporter the error reporter used to report the set of [HintCode.UNUSED_SHOWN_NAME]
+   *          hints
+   */
+  void generateUnusedShownNameHints(ErrorReporter reporter) {
+    _unusedShownNamesMap.forEach(
+        (ImportDirective importDirective, List<SimpleIdentifier> identifiers) {
+      if (_unusedImports.contains(importDirective)) {
+        // This import is actually wholly unused, not just one or more shown names from it.
+        // This is then an "unused import", rather than unused shown names.
+        return;
+      }
+      for (Identifier identifier in identifiers) {
+        reporter.reportErrorForNode(
+            HintCode.UNUSED_SHOWN_NAME, identifier, [identifier.name]);
+      }
+    });
+  }
+
+  /**
    * Remove elements from [_unusedImports] using the given [usedElements].
    */
   void removeUsedElements(UsedImportedElements usedElements) {
-    // Stop if all the imports are known to be used.
-    if (_unusedImports.isEmpty) {
+    // Stop if all the imports and shown names are known to be used.
+    if (_unusedImports.isEmpty && _unusedShownNamesMap.isEmpty) {
       return;
     }
     // Process import prefixes.
-    for (PrefixElement prefix in usedElements.prefixes) {
+    usedElements.prefixMap
+        .forEach((PrefixElement prefix, List<Element> elements) {
       List<ImportDirective> importDirectives = _prefixElementMap[prefix];
       if (importDirectives != null) {
         for (ImportDirective importDirective in importDirectives) {
           _unusedImports.remove(importDirective);
+          for (Element element in elements) {
+            _removeFromUnusedShownNamesMap(element, importDirective);
+          }
         }
       }
-    }
+    });
     // Process top-level elements.
     for (Element element in usedElements.elements) {
-      // Stop if all the imports are known to be used.
-      if (_unusedImports.isEmpty) {
+      // Stop if all the imports and shown names are known to be used.
+      if (_unusedImports.isEmpty && _unusedShownNamesMap.isEmpty) {
         return;
       }
-      // Prepare import directives for this library.
+      // Prepare import directives for this element's library.
       LibraryElement library = element.library;
       List<ImportDirective> importsLibrary = _libraryMap[library];
       if (importsLibrary == null) {
+        // element's library is not imported. Must be the current library.
         continue;
       }
       // If there is only one import directive for this library, then it must be
@@ -4589,6 +4719,7 @@
       if (importsLibrary.length == 1) {
         ImportDirective usedImportDirective = importsLibrary[0];
         _unusedImports.remove(usedImportDirective);
+        _removeFromUnusedShownNamesMap(element, usedImportDirective);
         continue;
       }
       // Otherwise, find import directives using namespaces.
@@ -4597,6 +4728,7 @@
         Namespace namespace = _computeNamespace(importDirective);
         if (namespace != null && namespace.get(name) != null) {
           _unusedImports.remove(importDirective);
+          _removeFromUnusedShownNamesMap(element, importDirective);
         }
       }
     }
@@ -4619,9 +4751,28 @@
   }
 
   /**
-   * Lookup and return the [Namespace] from the [namespaceMap], if the map does not
-   * have the computed namespace, compute it and cache it in the map. If the import directive is not
-   * resolved or is not resolvable, `null` is returned.
+   * Add every shown name from [importDirective] into [_unusedShownNamesMap].
+   */
+  void _addShownNames(ImportDirective importDirective) {
+    if (importDirective.combinators == null) {
+      return;
+    }
+    List<SimpleIdentifier> identifiers = new List<SimpleIdentifier>();
+    _unusedShownNamesMap[importDirective] = identifiers;
+    for (Combinator combinator in importDirective.combinators) {
+      if (combinator is ShowCombinator) {
+        for (SimpleIdentifier name in combinator.shownNames) {
+          identifiers.add(name);
+        }
+      }
+    }
+  }
+
+  /**
+   * Lookup and return the [Namespace] from the [_namespaceMap].
+   *
+   * If the map does not have the computed namespace, compute it and cache it in the map. If
+   * [importDirective] is not resolved or is not resolvable, `null` is returned.
    *
    * @param importDirective the import directive used to compute the returned namespace
    * @return the computed or looked up [Namespace]
@@ -4656,6 +4807,35 @@
     }
     importList.add(importDirective);
   }
+
+  /**
+   * Remove [element] from the list of names shown by [importDirective].
+   */
+  void _removeFromUnusedShownNamesMap(
+      Element element, ImportDirective importDirective) {
+    List<SimpleIdentifier> identifiers = _unusedShownNamesMap[importDirective];
+    if (identifiers == null) {
+      return;
+    }
+    for (Identifier identifier in identifiers) {
+      if (element is PropertyAccessorElement) {
+        // If the getter or setter of a variable is used, then the variable (the
+        // shown name) is used.
+        if (identifier.staticElement == element.variable) {
+          identifiers.remove(identifier);
+          break;
+        }
+      } else {
+        if (identifier.staticElement == element) {
+          identifiers.remove(identifier);
+          break;
+        }
+      }
+    }
+    if (identifiers.isEmpty) {
+      _unusedShownNamesMap.remove(importDirective);
+    }
+  }
 }
 
 /**
@@ -4886,7 +5066,7 @@
     if (!match(t1.element.type, null)) {
       return null;
     }
-    DartType newT1 = t1.element.type.substitute4(actuals);
+    DartType newT1 = t1.element.type.instantiate(actuals);
     // If we found a solution, return it.
     if (_typeSystem.isSubtypeOf(newT1, t2)) {
       return actuals;
@@ -6046,6 +6226,7 @@
   /**
    * The listener that is to be informed when an error is encountered.
    */
+  @override
   final AnalysisErrorListener errorListener;
 
   /**
@@ -6544,10 +6725,9 @@
       //
       return Namespace.EMPTY;
     }
-    HashMap<String, Element> definedNames =
-        _createExportMapping(exportedLibrary, new HashSet<LibraryElement>());
-    definedNames = _applyCombinators(definedNames, element.combinators);
-    return new Namespace(definedNames);
+    HashMap<String, Element> exportedNames = _getExportMapping(exportedLibrary);
+    exportedNames = _applyCombinators(exportedNames, element.combinators);
+    return new Namespace(exportedNames);
   }
 
   /**
@@ -6556,9 +6736,10 @@
    * @param library the library whose export namespace is to be created
    * @return the export namespace that was created
    */
-  Namespace createExportNamespaceForLibrary(LibraryElement library) =>
-      new Namespace(
-          _createExportMapping(library, new HashSet<LibraryElement>()));
+  Namespace createExportNamespaceForLibrary(LibraryElement library) {
+    HashMap<String, Element> exportedNames = _getExportMapping(library);
+    return new Namespace(exportedNames);
+  }
 
   /**
    * Create a namespace representing the import namespace of the given library.
@@ -6575,11 +6756,10 @@
       //
       return Namespace.EMPTY;
     }
-    HashMap<String, Element> definedNames =
-        _createExportMapping(importedLibrary, new HashSet<LibraryElement>());
-    definedNames = _applyCombinators(definedNames, element.combinators);
-    definedNames = _applyPrefix(definedNames, element.prefix);
-    return new Namespace(definedNames);
+    HashMap<String, Element> exportedNames = _getExportMapping(importedLibrary);
+    exportedNames = _applyCombinators(exportedNames, element.combinators);
+    exportedNames = _applyPrefix(exportedNames, element.prefix);
+    return new Namespace(exportedNames);
   }
 
   /**
@@ -6703,7 +6883,7 @@
    *          be added by another library
    * @return the mapping table that was created
    */
-  HashMap<String, Element> _createExportMapping(
+  HashMap<String, Element> _computeExportMapping(
       LibraryElement library, HashSet<LibraryElement> visitedElements) {
     visitedElements.add(library);
     try {
@@ -6717,7 +6897,7 @@
           // valid library.
           //
           HashMap<String, Element> exportedNames =
-              _createExportMapping(exportedLibrary, visitedElements);
+              _computeExportMapping(exportedLibrary, visitedElements);
           exportedNames = _applyCombinators(exportedNames, element.combinators);
           definedNames.addAll(exportedNames);
         }
@@ -6732,6 +6912,20 @@
     }
   }
 
+  HashMap<String, Element> _getExportMapping(LibraryElement library) {
+    if (library is LibraryElementImpl) {
+      if (library.exportNamespace != null) {
+        return library.exportNamespace.definedNames;
+      } else {
+        HashMap<String, Element> exportMapping =
+            _computeExportMapping(library, new HashSet<LibraryElement>());
+        library.exportNamespace = new Namespace(exportMapping);
+        return exportMapping;
+      }
+    }
+    return _computeExportMapping(library, new HashSet<LibraryElement>());
+  }
+
   /**
    * Return a new map of names which has all the names from [definedNames]
    * with exception of [hiddenNames].
@@ -7243,6 +7437,7 @@
    * The class element representing the class containing the current node,
    * or `null` if the current node is not contained in a class.
    */
+  @override
   ClassElement enclosingClass = null;
 
   /**
@@ -7464,8 +7659,10 @@
 
     // Same number of type formals. Instantiate the function type so its
     // parameter and return type are in terms of the surrounding context.
-    return fnType.instantiate(
-        typeParameters.map((t) => t.name.staticElement.type).toList());
+    return fnType.instantiate(typeParameters
+        .map((TypeParameter t) =>
+            (t.name.staticElement as TypeParameterElement).type)
+        .toList());
   }
 
   /**
@@ -7614,13 +7811,13 @@
         identical(parent, _enclosingFunctionTypeAlias)) {
       return null;
     }
-    safelyVisit(node.name);
-    safelyVisit(node.constructorName);
+    node.name?.accept(this);
+    node.constructorName?.accept(this);
     Element element = node.element;
     if (element is ExecutableElement) {
       InferenceContext.setType(node.arguments, element.type);
     }
-    safelyVisit(node.arguments);
+    node.arguments?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     ElementAnnotationImpl elementAnnotationImpl = node.elementAnnotation;
@@ -7698,14 +7895,14 @@
 
   @override
   Object visitAssignmentExpression(AssignmentExpression node) {
-    safelyVisit(node.leftHandSide);
+    node.leftHandSide?.accept(this);
     TokenType operator = node.operator.type;
     if (operator == TokenType.EQ ||
         operator == TokenType.QUESTION_QUESTION_EQ) {
       InferenceContext.setType(
           node.rightHandSide, node.leftHandSide.staticType);
     }
-    safelyVisit(node.rightHandSide);
+    node.rightHandSide?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     return null;
@@ -7718,7 +7915,7 @@
     DartType contextType = InferenceContext.getType(node);
     if (contextType != null) {
       InterfaceType futureT = typeProvider.futureType
-          .substitute4([contextType.flattenFutures(typeSystem)]);
+          .instantiate([contextType.flattenFutures(typeSystem)]);
       InferenceContext.setType(node.expression, futureT);
     }
     return super.visitAwaitExpression(node);
@@ -7730,7 +7927,7 @@
     Expression leftOperand = node.leftOperand;
     Expression rightOperand = node.rightOperand;
     if (operatorType == TokenType.AMPERSAND_AMPERSAND) {
-      safelyVisit(leftOperand);
+      leftOperand?.accept(this);
       if (rightOperand != null) {
         _overrideManager.enterScope();
         try {
@@ -7753,7 +7950,7 @@
         }
       }
     } else if (operatorType == TokenType.BAR_BAR) {
-      safelyVisit(leftOperand);
+      leftOperand?.accept(this);
       if (rightOperand != null) {
         _overrideManager.enterScope();
         try {
@@ -7770,8 +7967,8 @@
         InferenceContext.setTypeFromNode(leftOperand, node);
         InferenceContext.setTypeFromNode(rightOperand, node);
       }
-      safelyVisit(leftOperand);
-      safelyVisit(rightOperand);
+      leftOperand?.accept(this);
+      rightOperand?.accept(this);
     }
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
@@ -7925,7 +8122,7 @@
   @override
   Object visitConditionalExpression(ConditionalExpression node) {
     Expression condition = node.condition;
-    safelyVisit(condition);
+    condition?.accept(this);
     Expression thenExpression = node.thenExpression;
     if (thenExpression != null) {
       _overrideManager.enterScope();
@@ -8007,7 +8204,7 @@
     //
     FieldElement fieldElement = enclosingClass.getField(node.fieldName.name);
     InferenceContext.setType(node.expression, fieldElement?.type);
-    safelyVisit(node.expression);
+    node.expression?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     return null;
@@ -8156,11 +8353,11 @@
           ? typeProvider.iterableType
           : typeProvider.streamType;
       InferenceContext.setType(
-          iterable, targetType.substitute4([loopVariable.type.type]));
+          iterable, targetType.instantiate([loopVariable.type.type]));
     }
-    safelyVisit(iterable);
-    safelyVisit(loopVariable);
-    safelyVisit(identifier);
+    iterable?.accept(this);
+    loopVariable?.accept(this);
+    identifier?.accept(this);
     Statement body = node.body;
     if (body != null) {
       _overrideManager.enterScope();
@@ -8210,9 +8407,9 @@
 
   @override
   void visitForStatementInScope(ForStatement node) {
-    safelyVisit(node.variables);
-    safelyVisit(node.initialization);
-    safelyVisit(node.condition);
+    node.variables?.accept(this);
+    node.initialization?.accept(this);
+    node.condition?.accept(this);
     _overrideManager.enterScope();
     try {
       _propagateTrueState(node.condition);
@@ -8282,11 +8479,11 @@
 
   @override
   Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
-    safelyVisit(node.function);
+    node.function?.accept(this);
     node.accept(elementResolver);
     _inferFunctionExpressionsParametersTypes(node.argumentList);
     _inferArgumentTypesFromContext(node);
-    safelyVisit(node.argumentList);
+    node.argumentList?.accept(this);
     node.accept(typeAnalyzer);
     return null;
   }
@@ -8319,7 +8516,7 @@
   @override
   Object visitIfStatement(IfStatement node) {
     Expression condition = node.condition;
-    safelyVisit(condition);
+    condition?.accept(this);
     Map<VariableElement, DartType> thenOverrides =
         new HashMap<VariableElement, DartType>();
     Statement thenStatement = node.thenStatement;
@@ -8399,12 +8596,12 @@
         }
       }
     }
-    safelyVisit(node.constructorName);
+    node.constructorName?.accept(this);
     FunctionType constructorType = node.constructorName.staticElement?.type;
     if (constructorType != null) {
       InferenceContext.setType(node.argumentList, constructorType);
     }
-    safelyVisit(node.argumentList);
+    node.argumentList?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     return null;
@@ -8424,12 +8621,12 @@
       targs = node.typeArguments.arguments.map((t) => t.type).toList();
     } else if (contextType is InterfaceType) {
       InterfaceType listD =
-          typeProvider.listType.substitute4([typeProvider.dynamicType]);
+          typeProvider.listType.instantiate([typeProvider.dynamicType]);
       targs = inferenceContext.matchTypes(listD, contextType);
     }
     if (targs != null && targs.length == 1 && !targs[0].isDynamic) {
       DartType eType = targs[0];
-      InterfaceType listT = typeProvider.listType.substitute4([eType]);
+      InterfaceType listT = typeProvider.listType.instantiate([eType]);
       for (Expression child in node.elements) {
         InferenceContext.setType(child, eType);
       }
@@ -8449,13 +8646,13 @@
       targs = node.typeArguments.arguments.map((t) => t.type).toList();
     } else if (contextType is InterfaceType) {
       InterfaceType mapD = typeProvider.mapType
-          .substitute4([typeProvider.dynamicType, typeProvider.dynamicType]);
+          .instantiate([typeProvider.dynamicType, typeProvider.dynamicType]);
       targs = inferenceContext.matchTypes(mapD, contextType);
     }
     if (targs != null && targs.length == 2 && targs.any((t) => !t.isDynamic)) {
       DartType kType = targs[0];
       DartType vType = targs[1];
-      InterfaceType mapT = typeProvider.mapType.substitute4([kType, vType]);
+      InterfaceType mapT = typeProvider.mapType.instantiate([kType, vType]);
       for (MapLiteralEntry entry in node.entries) {
         InferenceContext.setType(entry.key, kType);
         InferenceContext.setType(entry.value, vType);
@@ -8498,12 +8695,12 @@
     // We visit the target and argument list, but do not visit the method name
     // because it needs to be visited in the context of the invocation.
     //
-    safelyVisit(node.target);
-    safelyVisit(node.typeArguments);
+    node.target?.accept(this);
+    node.typeArguments?.accept(this);
     node.accept(elementResolver);
     _inferFunctionExpressionsParametersTypes(node.argumentList);
     _inferArgumentTypesFromContext(node);
-    safelyVisit(node.argumentList);
+    node.argumentList?.accept(this);
     node.accept(typeAnalyzer);
     return null;
   }
@@ -8534,7 +8731,7 @@
     // We visit the prefix, but do not visit the identifier because it needs to
     // be visited in the context of the prefix.
     //
-    safelyVisit(node.prefix);
+    node.prefix?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     return null;
@@ -8546,7 +8743,7 @@
     // We visit the target, but do not visit the property name because it needs
     // to be visited in the context of the property access node.
     //
-    safelyVisit(node.target);
+    node.target?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     return null;
@@ -8561,7 +8758,7 @@
     // invocation.
     //
     InferenceContext.setType(node.argumentList, node.staticElement?.type);
-    safelyVisit(node.argumentList);
+    node.argumentList?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     return null;
@@ -8595,7 +8792,7 @@
     // invocation.
     //
     InferenceContext.setType(node.argumentList, node.staticElement?.type);
-    safelyVisit(node.argumentList);
+    node.argumentList?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     return null;
@@ -8680,7 +8877,7 @@
     try {
       _implicitLabelScope = _implicitLabelScope.nest(node);
       Expression condition = node.condition;
-      safelyVisit(condition);
+      condition?.accept(this);
       Statement body = node.body;
       if (body != null) {
         _overrideManager.enterScope();
@@ -8718,7 +8915,7 @@
         InterfaceType wrapperType = _enclosingFunction.isSynchronous
             ? typeProvider.iterableType
             : typeProvider.streamType;
-        type = wrapperType.substitute4(<DartType>[type]);
+        type = wrapperType.instantiate(<DartType>[type]);
       }
       InferenceContext.setType(e, type);
     }
@@ -8732,9 +8929,7 @@
         InterfaceType wrapperType = _enclosingFunction.isSynchronous
             ? typeProvider.iterableType
             : typeProvider.streamType;
-        List<DartType> candidates =
-            _findImplementedTypeArgument(type, wrapperType);
-        type = InterfaceTypeImpl.findMostSpecificType(candidates, typeSystem);
+        type = typeSystem.mostSpecificTypeArgument(type, wrapperType);
       }
       if (type != null) {
         inferenceContext.addReturnOrYieldType(type);
@@ -8806,39 +9001,6 @@
   }
 
   /**
-   * Starting from t1, search its class hierarchy for types of the form
-   * `t2<R>`, and return a list of the resulting R's.
-   *
-   * For example, given t1 = `List<int>` and t2 = `Iterable<T>`, this will
-   * return [int].
-   */
-  // 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.
-  List<DartType> _findImplementedTypeArgument(DartType t1, InterfaceType t2) {
-    List<DartType> result = <DartType>[];
-    HashSet<ClassElement> visitedClasses = new HashSet<ClassElement>();
-    void recurse(InterfaceTypeImpl type) {
-      if (type.element == t2.element && type.typeArguments.isNotEmpty) {
-        result.add(type.typeArguments[0]);
-      }
-      if (visitedClasses.add(type.element)) {
-        if (type.superclass != null) {
-          recurse(type.superclass);
-        }
-        type.mixins.forEach(recurse);
-        type.interfaces.forEach(recurse);
-        visitedClasses.remove(type.element);
-      }
-    }
-    if (t1 is InterfaceType) {
-      recurse(t1);
-    }
-    return result;
-  }
-
-  /**
    * The given expression is the expression used to compute the iterator for a
    * for-each statement. Attempt to compute the type of objects that will be
    * assigned to the loop variable and return that type. Return `null` if the
@@ -9647,17 +9809,6 @@
         source, token.offset, token.length, errorCode, arguments));
   }
 
-  /**
-   * Visit the given AST node if it is not null.
-   *
-   * @param node the node to be visited
-   */
-  void safelyVisit(AstNode node) {
-    if (node != null) {
-      node.accept(this);
-    }
-  }
-
   @override
   Object visitBlock(Block node) {
     Scope outerScope = nameScope;
@@ -9735,16 +9886,16 @@
   }
 
   void visitClassDeclarationInScope(ClassDeclaration node) {
-    safelyVisit(node.name);
-    safelyVisit(node.typeParameters);
-    safelyVisit(node.extendsClause);
-    safelyVisit(node.withClause);
-    safelyVisit(node.implementsClause);
-    safelyVisit(node.nativeClause);
+    node.name?.accept(this);
+    node.typeParameters?.accept(this);
+    node.extendsClause?.accept(this);
+    node.withClause?.accept(this);
+    node.implementsClause?.accept(this);
+    node.nativeClause?.accept(this);
   }
 
   void visitClassMembersInScope(ClassDeclaration node) {
-    safelyVisit(node.documentationComment);
+    node.documentationComment?.accept(this);
     node.metadata.accept(this);
     node.members.accept(this);
   }
@@ -9810,7 +9961,7 @@
     try {
       _implicitLabelScope = _implicitLabelScope.nest(node);
       visitStatementInScope(node.body);
-      safelyVisit(node.condition);
+      node.condition?.accept(this);
     } finally {
       _implicitLabelScope = outerImplicitScope;
     }
@@ -9844,7 +9995,7 @@
   }
 
   void visitEnumMembersInScope(EnumDeclaration node) {
-    safelyVisit(node.documentationComment);
+    node.documentationComment?.accept(this);
     node.metadata.accept(this);
     node.constants.accept(this);
   }
@@ -9876,9 +10027,9 @@
     // We visit the iterator before the loop variable because the loop variable
     // cannot be in scope while visiting the iterator.
     //
-    safelyVisit(node.identifier);
-    safelyVisit(node.iterable);
-    safelyVisit(node.loopVariable);
+    node.identifier?.accept(this);
+    node.iterable?.accept(this);
+    node.loopVariable?.accept(this);
     visitStatementInScope(node.body);
   }
 
@@ -9922,9 +10073,9 @@
    * @param node the statement to be visited
    */
   void visitForStatementInScope(ForStatement node) {
-    safelyVisit(node.variables);
-    safelyVisit(node.initialization);
-    safelyVisit(node.condition);
+    node.variables?.accept(this);
+    node.initialization?.accept(this);
+    node.condition?.accept(this);
     node.updaters.accept(this);
     visitStatementInScope(node.body);
   }
@@ -10034,7 +10185,7 @@
 
   @override
   Object visitIfStatement(IfStatement node) {
-    safelyVisit(node.condition);
+    node.condition?.accept(this);
     visitStatementInScope(node.thenStatement);
     visitStatementInScope(node.elseStatement);
     return null;
@@ -10158,7 +10309,7 @@
 
   @override
   Object visitWhileStatement(WhileStatement node) {
-    safelyVisit(node.condition);
+    node.condition?.accept(this);
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
     try {
       _implicitLabelScope = _implicitLabelScope.nest(node);
@@ -11248,10 +11399,10 @@
     _symbolType = _getType(coreNamespace, "Symbol");
     _typeType = _getType(coreNamespace, "Type");
     _undefinedType = UndefinedTypeImpl.instance;
-    _futureDynamicType = _futureType.substitute4(<DartType>[_dynamicType]);
-    _futureNullType = _futureType.substitute4(<DartType>[_nullType]);
-    _iterableDynamicType = _iterableType.substitute4(<DartType>[_dynamicType]);
-    _streamDynamicType = _streamType.substitute4(<DartType>[_dynamicType]);
+    _futureDynamicType = _futureType.instantiate(<DartType>[_dynamicType]);
+    _futureNullType = _futureType.instantiate(<DartType>[_nullType]);
+    _iterableDynamicType = _iterableType.instantiate(<DartType>[_dynamicType]);
+    _streamDynamicType = _streamType.instantiate(<DartType>[_dynamicType]);
   }
 }
 
@@ -11283,6 +11434,11 @@
   bool _strongMode;
 
   /**
+   * Type type system in use for this resolver pass.
+   */
+  TypeSystem _typeSystem;
+
+  /**
    * Initialize a newly created visitor to resolve the nodes in an AST node.
    *
    * [definingLibrary] is the element for the library containing the node being
@@ -11305,6 +11461,7 @@
     _dynamicType = typeProvider.dynamicType;
     _undefinedType = typeProvider.undefinedType;
     _strongMode = definingLibrary.context.analysisOptions.strongMode;
+    _typeSystem = TypeSystem.create(definingLibrary.context);
   }
 
   @override
@@ -11853,7 +12010,7 @@
     if (argumentList != null) {
       NodeList<TypeName> arguments = argumentList.arguments;
       int argumentCount = arguments.length;
-      List<DartType> parameters = _getTypeParameters(type);
+      List<DartType> parameters = _typeSystem.typeFormalsAsTypes(type);
       int parameterCount = parameters.length;
       List<DartType> typeArguments = new List<DartType>(parameterCount);
       if (argumentCount == parameterCount) {
@@ -11872,22 +12029,9 @@
           typeArguments[i] = _dynamicType;
         }
       }
-      type = _instantiateType(type, typeArguments);
+      type = _typeSystem.instantiateType(type, typeArguments);
     } else {
-      //
-      // Check for the case where there are no type arguments given for a
-      // parameterized type.
-      //
-      List<DartType> parameters = _getTypeParameters(type);
-      int parameterCount = parameters.length;
-      if (parameterCount > 0) {
-        DynamicTypeImpl dynamicType = DynamicTypeImpl.instance;
-        List<DartType> arguments = new List<DartType>(parameterCount);
-        for (int i = 0; i < parameterCount; i++) {
-          arguments[i] = dynamicType;
-        }
-        type = _instantiateType(type, arguments);
-      }
+      type = _typeSystem.instantiateToBounds(type);
     }
     typeName.staticType = type;
     node.type = type;
@@ -12066,21 +12210,6 @@
   }
 
   /**
-   * Return the type arguments associated with the given type.
-   *
-   * @param type the type whole type arguments are to be returned
-   * @return the type arguments associated with the given type
-   */
-  List<DartType> _getTypeParameters(DartType type) {
-    if (type is InterfaceType) {
-      return type.typeArguments;
-    } else if (type is FunctionType) {
-      return TypeParameterTypeImpl.getTypes(type.typeFormals);
-    }
-    return DartType.EMPTY_LIST;
-  }
-
-  /**
    * Returns the simple identifier of the given (may be qualified) type name.
    *
    * @param typeName the (may be qualified) qualified type name
@@ -12128,21 +12257,6 @@
     }
   }
 
-  DartType _instantiateType(DartType type, List<DartType> typeArguments) {
-    // TODO(jmesserly): this should use TypeSystem.instantiateToBounds,
-    // from calling methods when they know they're just trying to fill in
-    // "dynamic" for the case of missing type arguments.
-
-    if (type is InterfaceTypeImpl) {
-      return type.substitute4(typeArguments);
-    } else if (type is FunctionTypeImpl) {
-      return type.instantiate(typeArguments);
-    } else {
-      // TODO(brianwilkerson) Report this internal error.
-      return type;
-    }
-  }
-
   /**
    * Checks if the given type name is used as the type in an as expression.
    *
@@ -12566,9 +12680,10 @@
  */
 class UsedImportedElements {
   /**
-   * The set of referenced [PrefixElement]s.
+   * The map of referenced [PrefixElement]s and the [Element]s that they prefix.
    */
-  final Set<PrefixElement> prefixes = new HashSet<PrefixElement>();
+  final Map<PrefixElement, List<Element>> prefixMap =
+      new HashMap<PrefixElement, List<Element>>();
 
   /**
    * The set of referenced top-level [Element]s.
diff --git a/pkg/analyzer/lib/src/generated/scanner.dart b/pkg/analyzer/lib/src/generated/scanner.dart
index 5a2e2c0..3b21b2f 100644
--- a/pkg/analyzer/lib/src/generated/scanner.dart
+++ b/pkg/analyzer/lib/src/generated/scanner.dart
@@ -7,5 +7,5 @@
 
 export 'package:analyzer/dart/ast/token.dart';
 export 'package:analyzer/src/dart/ast/token.dart' hide SimpleToken;
-export 'package:analyzer/src/dart/scanner/scanner.dart';
 export 'package:analyzer/src/dart/scanner/reader.dart';
+export 'package:analyzer/src/dart/scanner/scanner.dart';
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index 0670b7c..27577b8 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -14,9 +14,10 @@
     show ContentCache, Source, UriKind;
 
 /**
- * A function used to create a new DartSdk
+ * A function used to create a new DartSdk with the given [options]. If the
+ * passed [options] are `null`, then default options are used.
  */
-typedef DartSdk SdkCreator();
+typedef DartSdk SdkCreator(AnalysisOptions options);
 
 /**
  * A Dart SDK installed in a specified location.
@@ -126,9 +127,8 @@
     int encoding = options.encodeCrossContextOptions();
     DartSdk sdk = sdkMap[encoding];
     if (sdk == null) {
-      sdk = sdkCreator();
+      sdk = sdkCreator(options);
       sdkMap[encoding] = sdk;
-      sdk.context.analysisOptions.setCrossContextOptionsFrom(options);
     }
     return sdk;
   }
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index 6f03a84..9bf52bf 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -249,6 +249,11 @@
   Map<String, Source> _uriToSourceMap = new HashMap<String, Source>();
 
   /**
+   * The [AnalysisOptions] to use to create the [context].
+   */
+  AnalysisOptions _analysisOptions;
+
+  /**
    * Initialize a newly created SDK to represent the Dart SDK installed in the
    * [sdkDirectory]. The flag [useDart2jsPaths] is `true` if the dart2js path
    * should be used when it is available
@@ -258,12 +263,31 @@
     _libraryMap = initialLibraryMap(useDart2jsPaths);
   }
 
+  /**
+   * Set the [options] for this SDK analysis context.  Throw [StateError] if the
+   * context has been already created.
+   */
+  void set analysisOptions(AnalysisOptions options) {
+    if (_analysisContext != null) {
+      throw new StateError(
+          'Analysis options cannot be changed after context creation.');
+    }
+    _analysisOptions = options;
+  }
+
   @override
   AnalysisContext get context {
     if (_analysisContext == null) {
-      _analysisContext = new SdkAnalysisContext();
+      _analysisContext = new SdkAnalysisContext(_analysisOptions);
       SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
       _analysisContext.sourceFactory = factory;
+      if (_useSummary) {
+        PackageBundle sdkBundle = getSummarySdkBundle();
+        if (sdkBundle != null) {
+          _analysisContext.resultProvider =
+              new SdkSummaryResultProvider(_analysisContext, sdkBundle);
+        }
+      }
     }
     return _analysisContext;
   }
@@ -393,14 +417,11 @@
    * Specify whether SDK summary should be used.
    */
   void set useSummary(bool use) {
-    _useSummary = use;
-    if (_useSummary) {
-      PackageBundle sdkBundle = _getSummarySdkBundle();
-      if (sdkBundle != null) {
-        _analysisContext.resultProvider =
-            new SdkSummaryResultProvider(_analysisContext, sdkBundle);
-      }
+    if (_analysisContext != null) {
+      throw new StateError(
+          'The "useSummary" flag cannot be changed after context creation.');
     }
+    _useSummary = use;
   }
 
   /**
@@ -512,6 +533,30 @@
   SdkLibrary getSdkLibrary(String dartUri) => _libraryMap.getLibrary(dartUri);
 
   /**
+   * Return the [PackageBundle] for this SDK, if it exists, or `null` otherwise.
+   * This method should not be used outside of `analyzer` and `analyzer_cli`
+   * packages.
+   */
+  PackageBundle getSummarySdkBundle() {
+    String rootPath = directory.getAbsolutePath();
+    bool strongMode = _analysisOptions?.strongMode ?? false;
+    String name = strongMode ? 'strong.sum' : 'spec.sum';
+    String path = pathos.join(rootPath, 'lib', '_internal', name);
+    try {
+      File file = new File(path);
+      if (file.existsSync()) {
+        List<int> bytes = file.readAsBytesSync();
+        return new PackageBundle.fromBuffer(bytes);
+      }
+    } catch (exception, stackTrace) {
+      AnalysisEngine.instance.logger.logError(
+          'Failed to load SDK analysis summary from $path',
+          new CaughtException(exception, stackTrace));
+    }
+    return null;
+  }
+
+  /**
    * Read all of the configuration files to initialize the library maps. The
    * flag [useDart2jsPaths] is `true` if the dart2js path should be used when it
    * is available. Return the initialized library map.
@@ -547,28 +592,6 @@
     return source;
   }
 
-  /**
-   * Return the [PackageBundle] for this SDK, if it exists, or `null` otherwise.
-   */
-  PackageBundle _getSummarySdkBundle() {
-    String rootPath = directory.getAbsolutePath();
-    String name =
-        context.analysisOptions.strongMode ? 'strong.sum' : 'spec.sum';
-    String path = pathos.join(rootPath, 'lib', '_internal', name);
-    try {
-      File file = new File(path);
-      if (file.existsSync()) {
-        List<int> bytes = file.readAsBytesSync();
-        return new PackageBundle.fromBuffer(bytes);
-      }
-    } catch (exception, stackTrace) {
-      AnalysisEngine.instance.logger.logError(
-          'Failed to load SDK analysis summary from $path',
-          new CaughtException(exception, stackTrace));
-    }
-    return null;
-  }
-
   FileBasedSource _mapDartUri(String dartUri) {
     String libraryName;
     String relativePath;
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 092671e..0387905 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -404,11 +404,6 @@
 
   @override
   bool exists() => false;
-
-  @override
-  Uri resolveRelativeUri(Uri relativeUri) {
-    throw new UnsupportedOperationException('$fullName does not exist.');
-  }
 }
 
 /**
@@ -547,21 +542,6 @@
    * @return `true` if this source exists
    */
   bool exists();
-
-  /**
-   * Resolve the relative URI against the URI associated with this source object.
-   *
-   * Note: This method is not intended for public use, it is only visible out of necessity. It is
-   * only intended to be invoked by a [SourceFactory]. Source factories will
-   * only invoke this method if the URI is relative, so implementations of this method are not
-   * required to, and generally do not, verify the argument. The result of invoking this method with
-   * an absolute URI is intentionally left unspecified.
-   *
-   * @param relativeUri the relative URI to be resolved against this source
-   * @return the URI to which given URI was resolved
-   * @throws AnalysisException if the relative URI could not be resolved
-   */
-  Uri resolveRelativeUri(Uri relativeUri);
 }
 
 /**
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index 49641c8..811a048 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -11,6 +11,7 @@
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/java_io.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
 
 export 'package:analyzer/src/generated/source.dart';
 
@@ -82,6 +83,44 @@
 }
 
 /**
+ * Instances of the class [ExplicitSourceResolver] map URIs to files on disk
+ * using a fixed mapping provided at construction time.
+ */
+class ExplicitSourceResolver extends UriResolver {
+  final Map<Uri, JavaFile> uriToFileMap;
+  final Map<String, Uri> pathToUriMap;
+
+  /**
+   * Construct an [ExplicitSourceResolver] based on the given [uriToFileMap].
+   */
+  ExplicitSourceResolver(Map<Uri, JavaFile> uriToFileMap)
+      : uriToFileMap = uriToFileMap,
+        pathToUriMap = _computePathToUriMap(uriToFileMap);
+
+  @override
+  Source resolveAbsolute(Uri uri, [Uri actualUri]) {
+    return new FileBasedSource(uriToFileMap[uri], actualUri ?? uri);
+  }
+
+  @override
+  Uri restoreAbsolute(Source source) {
+    return pathToUriMap[source.fullName];
+  }
+
+  /**
+   * Build the inverse mapping of [uriToSourceMap].
+   */
+  static Map<String, Uri> _computePathToUriMap(
+      Map<Uri, JavaFile> uriToSourceMap) {
+    Map<String, Uri> pathToUriMap = <String, Uri>{};
+    uriToSourceMap.forEach((Uri uri, JavaFile file) {
+      pathToUriMap[file.getAbsolutePath()] = uri;
+    });
+    return pathToUriMap;
+  }
+}
+
+/**
  * Instances of the class `FileBasedSource` implement a source that represents a file.
  */
 class FileBasedSource extends Source {
@@ -209,32 +248,6 @@
   bool exists() => file.isFile();
 
   @override
-  Uri resolveRelativeUri(Uri containedUri) {
-    try {
-      Uri baseUri = uri;
-      bool isOpaque = uri.isAbsolute && !uri.path.startsWith('/');
-      if (isOpaque) {
-        String scheme = uri.scheme;
-        String part = uri.path;
-        if (scheme == DartUriResolver.DART_SCHEME && part.indexOf('/') < 0) {
-          part = "$part/$part.dart";
-        }
-        baseUri = parseUriWithException("$scheme:/$part");
-      }
-      Uri result = baseUri.resolveUri(containedUri);
-      if (isOpaque) {
-        result = parseUriWithException(
-            "${result.scheme}:${result.path.substring(1)}");
-      }
-      return result;
-    } catch (exception, stackTrace) {
-      throw new AnalysisException(
-          "Could not resolve URI ($containedUri) relative to source ($uri)",
-          new CaughtException(exception, stackTrace));
-    }
-  }
-
-  @override
   String toString() {
     if (file == null) {
       return "<unknown source>";
@@ -433,11 +446,13 @@
       if (resolvedFile.exists()) {
         JavaFile canonicalFile =
             getCanonicalFile(packagesDirectory, pkgName, relPath);
+        if (actualUri != null) {
+          return new FileBasedSource(canonicalFile, actualUri);
+        }
         if (_isSelfReference(packagesDirectory, canonicalFile)) {
           uri = canonicalFile.toURI();
         }
-        return new FileBasedSource(
-            canonicalFile, actualUri != null ? actualUri : uri);
+        return new FileBasedSource(canonicalFile, uri);
       }
     }
     return new FileBasedSource(
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index b54bc04..f76cf73 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -257,6 +257,8 @@
     } else {
       ExecutableElement staticMethodElement = node.staticElement;
       DartType staticType = _computeStaticReturnType(staticMethodElement);
+      staticType =
+          _refineAssignmentExpressionType(node, staticType, _getStaticType);
       _recordStaticType(node, staticType);
       MethodElement propagatedMethodElement = node.propagatedElement;
       if (!identical(propagatedMethodElement, staticMethodElement)) {
@@ -635,13 +637,16 @@
         _resolver.inferenceContext.recordInference(node, contextType);
       } else if (node.elements.isNotEmpty) {
         // Infer the list type from the arguments.
+        // TODO(jmesserly): record inference here?
         staticType =
             node.elements.map((e) => e.staticType).reduce(_leastUpperBound);
-        // TODO(jmesserly): record inference here?
+        if (staticType.isBottom) {
+          staticType = _dynamicType;
+        }
       }
     }
     _recordStaticType(
-        node, _typeProvider.listType.substitute4(<DartType>[staticType]));
+        node, _typeProvider.listType.instantiate(<DartType>[staticType]));
     return null;
   }
 
@@ -686,18 +691,24 @@
         _resolver.inferenceContext.recordInference(node, contextType);
       } else if (node.entries.isNotEmpty) {
         // Infer the list type from the arguments.
+        // TODO(jmesserly): record inference here?
         staticKeyType =
             node.entries.map((e) => e.key.staticType).reduce(_leastUpperBound);
         staticValueType = node.entries
             .map((e) => e.value.staticType)
             .reduce(_leastUpperBound);
-        // TODO(jmesserly): record inference here?
+        if (staticKeyType.isBottom) {
+          staticKeyType = _dynamicType;
+        }
+        if (staticValueType.isBottom) {
+          staticValueType = _dynamicType;
+        }
       }
     }
     _recordStaticType(
         node,
         _typeProvider.mapType
-            .substitute4(<DartType>[staticKeyType, staticValueType]));
+            .instantiate(<DartType>[staticKeyType, staticValueType]));
     return null;
   }
 
@@ -787,7 +798,7 @@
               if (returnType != null) {
                 // prepare the type of the returned Future
                 InterfaceType newFutureType = _typeProvider.futureType
-                    .substitute4([returnType.flattenFutures(_typeSystem)]);
+                    .instantiate([returnType.flattenFutures(_typeSystem)]);
                 // set the 'then' invocation type
                 _resolver.recordPropagatedTypeIfBetter(node, newFutureType);
                 needPropagatedType = false;
@@ -1485,10 +1496,10 @@
       InterfaceType genericType = body.isAsynchronous
           ? _typeProvider.streamType
           : _typeProvider.iterableType;
-      return genericType.substitute4(<DartType>[type]);
+      return genericType.instantiate(<DartType>[type]);
     } else if (body.isAsynchronous) {
       return _typeProvider.futureType
-          .substitute4(<DartType>[type.flattenFutures(_typeSystem)]);
+          .instantiate(<DartType>[type.flattenFutures(_typeSystem)]);
     } else {
       return type;
     }
@@ -1604,7 +1615,7 @@
         if (returnType.typeParameters.isNotEmpty) {
           // Caller can't deal with unbound type parameters, so substitute
           // `dynamic`.
-          return returnType.type.substitute4(
+          return returnType.type.instantiate(
               returnType.typeParameters.map((_) => _dynamicType).toList());
         }
         return returnType.type;
@@ -2086,6 +2097,44 @@
   }
 
   /**
+   * Attempts to make a better guess for the type of the given assignment
+   * [expression], given that resolution has so far produced the [currentType].
+   * The [typeAccessor] is used to access the corresponding type of the left
+   * and right operands.
+   */
+  DartType _refineAssignmentExpressionType(AssignmentExpression expression,
+      DartType currentType, DartType typeAccessor(Expression node)) {
+    Expression leftHandSize = expression.leftHandSide;
+    Expression rightHandSide = expression.rightHandSide;
+    TokenType operator = expression.operator.type;
+    DartType intType = _typeProvider.intType;
+    if (typeAccessor(leftHandSize) == intType) {
+      // int op= double
+      if (operator == TokenType.MINUS_EQ ||
+          operator == TokenType.PERCENT_EQ ||
+          operator == TokenType.PLUS_EQ ||
+          operator == TokenType.STAR_EQ) {
+        DartType doubleType = _typeProvider.doubleType;
+        if (typeAccessor(rightHandSide) == doubleType) {
+          return doubleType;
+        }
+      }
+      // int op= int
+      if (operator == TokenType.MINUS_EQ ||
+          operator == TokenType.PERCENT_EQ ||
+          operator == TokenType.PLUS_EQ ||
+          operator == TokenType.STAR_EQ ||
+          operator == TokenType.TILDE_SLASH_EQ) {
+        if (typeAccessor(rightHandSide) == intType) {
+          return intType;
+        }
+      }
+    }
+    // default
+    return currentType;
+  }
+
+  /**
    * Attempts to make a better guess for the type of the given binary
    * [expression], given that resolution has so far produced the [currentType].
    * The [typeAccessor] is used to access the corresponding type of the left
diff --git a/pkg/analyzer/lib/src/generated/testing/ast_factory.dart b/pkg/analyzer/lib/src/generated/testing/ast_factory.dart
index d8d44f4..6983cc8 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_factory.dart
@@ -869,6 +869,28 @@
           parameters,
           body);
 
+  static MethodDeclaration methodDeclaration4(
+          {bool external: false,
+          Keyword modifier,
+          TypeName returnType,
+          Keyword property,
+          bool operator: false,
+          String name,
+          FormalParameterList parameters,
+          FunctionBody body}) =>
+      new MethodDeclaration(
+          null,
+          null,
+          external ? TokenFactory.tokenFromKeyword(Keyword.EXTERNAL) : null,
+          modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
+          returnType,
+          property == null ? null : TokenFactory.tokenFromKeyword(property),
+          operator ? TokenFactory.tokenFromKeyword(Keyword.OPERATOR) : null,
+          identifier3(name),
+          null,
+          parameters,
+          body);
+
   static MethodInvocation methodInvocation(Expression target, String methodName,
           [List<Expression> arguments,
           TokenType operator = TokenType.PERIOD]) =>
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index 2beeab4..9fd53dd 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -167,7 +167,7 @@
     FieldElementImpl valuesField = new FieldElementImpl("values", -1);
     valuesField.static = true;
     valuesField.const3 = true;
-    valuesField.type = typeProvider.listType.substitute4(<DartType>[enumType]);
+    valuesField.type = typeProvider.listType.instantiate(<DartType>[enumType]);
     fields.add(valuesField);
     //
     // Build the enum constants.
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 06f4bee..bf2e130 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -248,7 +248,7 @@
   @override
   InterfaceType get futureDynamicType {
     if (_futureDynamicType == null) {
-      _futureDynamicType = futureType.substitute4(<DartType>[dynamicType]);
+      _futureDynamicType = futureType.instantiate(<DartType>[dynamicType]);
     }
     return _futureDynamicType;
   }
@@ -256,7 +256,7 @@
   @override
   InterfaceType get futureNullType {
     if (_futureNullType == null) {
-      _futureNullType = futureType.substitute4(<DartType>[nullType]);
+      _futureNullType = futureType.instantiate(<DartType>[nullType]);
     }
     return _futureNullType;
   }
@@ -291,7 +291,7 @@
   @override
   InterfaceType get iterableDynamicType {
     if (_iterableDynamicType == null) {
-      _iterableDynamicType = iterableType.substitute4(<DartType>[dynamicType]);
+      _iterableDynamicType = iterableType.instantiate(<DartType>[dynamicType]);
     }
     return _iterableDynamicType;
   }
@@ -305,7 +305,7 @@
       DartType eType = iterableElement.typeParameters[0].type;
       _setAccessors(iterableElement, <PropertyAccessorElement>[
         ElementFactory.getterElement(
-            "iterator", false, iteratorType.substitute4(<DartType>[eType])),
+            "iterator", false, iteratorType.instantiate(<DartType>[eType])),
         ElementFactory.getterElement("last", false, eType)
       ]);
       iterableElement.constructors = <ConstructorElement>[
@@ -345,7 +345,7 @@
       _listType = listElement.type;
       DartType eType = listElement.typeParameters[0].type;
       InterfaceType iterableType =
-          this.iterableType.substitute4(<DartType>[eType]);
+          this.iterableType.instantiate(<DartType>[eType]);
       listElement.interfaces = <InterfaceType>[iterableType];
       _setAccessors(listElement, <PropertyAccessorElement>[
         ElementFactory.getterElement("length", false, intType)
@@ -464,7 +464,7 @@
   @override
   InterfaceType get streamDynamicType {
     if (_streamDynamicType == null) {
-      _streamDynamicType = streamType.substitute4(<DartType>[dynamicType]);
+      _streamDynamicType = streamType.instantiate(<DartType>[dynamicType]);
     }
     return _streamDynamicType;
   }
@@ -486,7 +486,7 @@
         ElementFactory.getterElement("isEmpty", false, boolType),
         ElementFactory.getterElement("length", false, intType),
         ElementFactory.getterElement(
-            "codeUnits", false, listType.substitute4(<DartType>[intType]))
+            "codeUnits", false, listType.instantiate(<DartType>[intType]))
       ]);
       stringElement.methods = <MethodElement>[
         ElementFactory.methodElement("+", _stringType, [_stringType]),
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index ee4d0a1..9caffef 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -21,11 +21,7 @@
  * Implementation of [TypeSystem] using the strong mode rules.
  * https://github.com/dart-lang/dev_compiler/blob/master/STRONG_MODE.md
  */
-class StrongTypeSystemImpl implements TypeSystem {
-  final _specTypeSystem = new TypeSystemImpl();
-
-  StrongTypeSystemImpl();
-
+class StrongTypeSystemImpl extends TypeSystem {
   bool anyParameterType(FunctionType ft, bool predicate(DartType t)) {
     return ft.parameters.any((p) => predicate(p.type));
   }
@@ -45,11 +41,207 @@
     return null;
   }
 
+  /// Computes the greatest lower bound of [type1] and [type2].
   @override
-  DartType getLeastUpperBound(
-      TypeProvider typeProvider, DartType type1, DartType type2) {
-    // TODO(leafp): Implement a strong mode version of this.
-    return _specTypeSystem.getLeastUpperBound(typeProvider, type1, type2);
+  DartType getGreatestLowerBound(
+      TypeProvider provider, DartType type1, DartType type2) {
+    // The greatest lower bound relation is reflexive.
+    if (identical(type1, type2)) {
+      return type1;
+    }
+
+    // Treat dynamic as top. The GLB of dynamic and any type is just that type
+    // since dynamic permits all values.
+    if (type1.isDynamic) {
+      return type2;
+    }
+    if (type2.isDynamic) {
+      return type1;
+    }
+
+    // You can't get any lower than bottom.
+    if (type1.isBottom || type2.isBottom) {
+      return provider.bottomType;
+    }
+
+    // Treat void as top-like for GLB. This only comes into play with the
+    // return types of two functions whose GLB is being taken. We allow a
+    // non-void-returning function to subtype a void-returning one, so match
+    // that logic here by treating the non-void arm as the subtype for GLB.
+    if (type1.isVoid) {
+      return type2;
+    }
+    if (type2.isVoid) {
+      return type1;
+    }
+
+    // Function types have structural GLB.
+    if (type1 is FunctionType && type2 is FunctionType) {
+      return _functionGreatestLowerBound(provider, type1, type2);
+    }
+
+    // Otherwise, the GLB of two types is one of them it if it is a subtype of
+    // the other.
+    if (isSubtypeOf(type1, type2)) {
+      return type1;
+    }
+
+    if (isSubtypeOf(type2, type1)) {
+      return type2;
+    }
+
+    // No subtype relation, so no known GLB.
+    return provider.bottomType;
+  }
+
+  /**
+   * This currently does not implement a very complete least upper bound
+   * algorithm, but handles a couple of the very common cases that are
+   * causing pain in real code.  The current algorithm is:
+   * 1. If either of the types is a supertype of the other, return it.
+   *    This is in fact the best result in this case.
+   * 2. If the two types have the same class element, then take the
+   *    pointwise least upper bound of the type arguments.  This is again
+   *    the best result, except that the recursive calls may not return
+   *    the true least uppper bounds.  The result is guaranteed to be a
+   *    well-formed type under the assumption that the input types were
+   *    well-formed (and assuming that the recursive calls return
+   *    well-formed types).
+   * 3. Otherwise return the spec-defined least upper bound.  This will
+   *    be an upper bound, might (or might not) be least, and might
+   *    (or might not) be a well-formed type.
+   *
+   * TODO(leafp): Use matchTypes or something similar here to handle the
+   *  case where one of the types is a superclass (but not supertype) of
+   *  the other, e.g. LUB(Iterable<double>, List<int>) = Iterable<num>
+   * TODO(leafp): Figure out the right final algorithm and implement it.
+   */
+  @override
+  DartType _interfaceLeastUpperBound(
+      TypeProvider provider, InterfaceType type1, InterfaceType type2) {
+    if (isSubtypeOf(type1, type2)) {
+      return type2;
+    }
+    if (isSubtypeOf(type2, type1)) {
+      return type1;
+    }
+    if (type1.element == type2.element) {
+      List<DartType> tArgs1 = type1.typeArguments;
+      List<DartType> tArgs2 = type2.typeArguments;
+
+      assert(tArgs1.length == tArgs2.length);
+      List<DartType> tArgs = new List(tArgs1.length);
+      for (int i = 0; i < tArgs1.length; i++) {
+        tArgs[i] = getLeastUpperBound(provider, tArgs1[i], tArgs2[i]);
+      }
+      InterfaceTypeImpl lub = new InterfaceTypeImpl(type1.element);
+      lub.typeArguments = tArgs;
+      return lub;
+    }
+    return InterfaceTypeImpl.computeLeastUpperBound(type1, type2) ??
+        provider.dynamicType;
+  }
+
+  /**
+   * This currently just implements a simple least upper bound to
+   * handle some common cases.  It also avoids some termination issues
+   * with the naive spec algorithm.  The least upper bound of two types
+   * (at least one of which is a type parameter) is computed here as:
+   * 1. If either type is a supertype of the other, return it.
+   * 2. If the first type is a type parameter, replace it with its bound,
+   *    with recursive occurrences of itself replaced with Object.
+   *    The second part of this should ensure termination.  Informally,
+   *    each type variable instantiation in one of the arguments to the
+   *    least upper bound algorithm now strictly reduces the number
+   *    of bound variables in scope in that argument position.
+   * 3. If the second type is a type parameter, do the symmetric operation
+   *    to #2.
+   *
+   * It's not immediately obvious why this is symmetric in the case that both
+   * of the them are type parameters.  For #1, symmetry holds since subtype
+   * is antisymmetric.  For #2, it's clearly not symmetric if upper bounds of
+   * bottom are allowed.  Ignoring this (for various reasons, not least
+   * of which that there's no way to write it), there's an informal
+   * argument (that might even be right) that you will always either
+   * end up expanding both of them or else returning the same result no matter
+   * which order you expand them in.  A key observation is that
+   * identical(expand(type1), type2) => subtype(type1, type2)
+   * and hence the contra-positive.
+   *
+   * TODO(leafp): Think this through and figure out what's the right
+   * definition.  Be careful about termination.
+   *
+   * I suspect in general a reasonable algorithm is to expand the innermost
+   * type variable first.  Alternatively, you could probably choose to treat
+   * it as just an instance of the interface type upper bound problem, with
+   * the "inheritance" chain extended by the bounds placed on the variables.
+   */
+  @override
+  DartType _typeParameterLeastUpperBound(
+      TypeProvider provider, DartType type1, DartType type2) {
+    if (isSubtypeOf(type1, type2)) {
+      return type2;
+    }
+    if (isSubtypeOf(type2, type1)) {
+      return type1;
+    }
+    if (type1 is TypeParameterType) {
+      type1 = type1
+          .resolveToBound(provider.objectType)
+          .substitute2([provider.objectType], [type1]);
+      return getLeastUpperBound(provider, type1, type2);
+    }
+    // We should only be called when at least one of the types is a
+    // TypeParameterType
+    type2 = type2
+        .resolveToBound(provider.objectType)
+        .substitute2([provider.objectType], [type2]);
+    return getLeastUpperBound(provider, type1, type2);
+  }
+
+  /**
+   * Given a generic function type `F<T0, T1, ... Tn>` and a context type C,
+   * infer an instantiation of F, such that `F<S0, S1, ..., Sn>` <: C.
+   *
+   * This is similar to [inferGenericFunctionCall], but the return type is also
+   * considered as part of the solution.
+   *
+   * If this function is called with a [contextType] that is also
+   * uninstantiated, or a [fnType] that is already instantiated, it will have
+   * no effect and return [fnType].
+   */
+  FunctionType inferFunctionTypeInstantiation(TypeProvider typeProvider,
+      FunctionType contextType, FunctionType fnType) {
+    if (contextType.typeFormals.isNotEmpty || fnType.typeFormals.isEmpty) {
+      return fnType;
+    }
+
+    // Create a TypeSystem that will allow certain type parameters to be
+    // inferred. It will optimistically assume these type parameters can be
+    // subtypes (or supertypes) as necessary, and track the constraints that
+    // are implied by this.
+    var inferringTypeSystem =
+        new _StrongInferenceTypeSystem(typeProvider, fnType.typeFormals);
+
+    // Since we're trying to infer the instantiation, we want to ignore type
+    // formals as we check the parameters and return type.
+    var inferFnType =
+        fnType.instantiate(TypeParameterTypeImpl.getTypes(fnType.typeFormals));
+    if (!inferringTypeSystem.isSubtypeOf(inferFnType, contextType)) {
+      return fnType;
+    }
+
+    // Try to infer and instantiate the resulting type.
+    var resultType =
+        inferringTypeSystem._infer(fnType, allowPartialSolution: false);
+
+    // If the instantiation failed (because some type variable constraints
+    // could not be solved, in other words, we could not find a valid subtype),
+    // then return the original type, so the error is in terms of it.
+    //
+    // It would be safe to return a partial solution here, but the user
+    // experience may be better if we simply do not infer in this case.
+    return resultType ?? fnType;
   }
 
   /// Given a function type with generic type parameters, infer the type
@@ -107,71 +299,31 @@
   }
 
   /**
-   * Given a generic function type `F<T0, T1, ... Tn>` and a context type C,
-   * infer an instantiation of F, such that `F<S0, S1, ..., Sn>` <: C.
-   *
-   * This is similar to [inferGenericFunctionCall], but the return type is also
-   * considered as part of the solution.
-   *
-   * If this function is called with a [contextType] that is also
-   * uninstantiated, or a [fnType] that is already instantiated, it will have
-   * no effect and return [fnType].
-   */
-  FunctionType inferFunctionTypeInstantiation(TypeProvider typeProvider,
-      FunctionType contextType, FunctionType fnType) {
-    if (contextType.typeFormals.isNotEmpty || fnType.typeFormals.isEmpty) {
-      return fnType;
-    }
-
-    // Create a TypeSystem that will allow certain type parameters to be
-    // inferred. It will optimistically assume these type parameters can be
-    // subtypes (or supertypes) as necessary, and track the constraints that
-    // are implied by this.
-    var inferringTypeSystem =
-        new _StrongInferenceTypeSystem(typeProvider, fnType.typeFormals);
-
-    // Since we're trying to infer the instantiation, we want to ignore type
-    // formals as we check the parameters and return type.
-    var inferFnType =
-        fnType.instantiate(TypeParameterTypeImpl.getTypes(fnType.typeFormals));
-    if (!inferringTypeSystem.isSubtypeOf(inferFnType, contextType)) {
-      return fnType;
-    }
-
-    // Try to infer and instantiate the resulting type.
-    var resultType =
-        inferringTypeSystem._infer(fnType, allowPartialSolution: false);
-
-    // If the instantiation failed (because some type variable constraints
-    // could not be solved, in other words, we could not find a valid subtype),
-    // then return the original type, so the error is in terms of it.
-    //
-    // It would be safe to return a partial solution here, but the user
-    // experience may be better if we simply do not infer in this case.
-    return resultType ?? fnType;
-  }
-
-  /**
-   * Given a [FunctionType] [function], of the form
-   * <T0 extends B0, ... Tn extends Bn>.F (where Bi is implicitly
-   * dynamic if absent, and F is a non-generic function type)
-   * compute {I0/T0, ..., In/Tn}F
+   * Given a [DartType] [type], if [type] is an uninstantiated
+   * parameterized type then instantiate the parameters to their
+   * bounds. Specifically, if [type] is of the form
+   * `<T0 extends B0, ... Tn extends Bn>.F` or
+   * `class C<T0 extends B0, ... Tn extends Bn> {...}`
+   * (where Bi is implicitly dynamic if absent),
+   * compute `{I0/T0, ..., In/Tn}F or C<I0, ..., In>` respectively
    * where I_(i+1) = {I0/T0, ..., Ii/Ti, dynamic/T_(i+1)}B_(i+1).
    * That is, we instantiate the generic with its bounds, replacing
    * each Ti in Bi with dynamic to get Ii, and then replacing Ti with
    * Ii in all of the remaining bounds.
    */
-  DartType instantiateToBounds(FunctionType function) {
-    int count = function.typeFormals.length;
+  DartType instantiateToBounds(DartType type) {
+    List<TypeParameterElement> typeFormals = typeFormalsAsElements(type);
+    int count = typeFormals.length;
     if (count == 0) {
-      return function;
+      return type;
     }
+
     // We build up a substitution replacing bound parameters with
     // their instantiated bounds, {substituted/variables}
     List<DartType> substituted = new List<DartType>();
     List<DartType> variables = new List<DartType>();
     for (int i = 0; i < count; i++) {
-      TypeParameterElement param = function.typeFormals[i];
+      TypeParameterElement param = typeFormals[i];
       DartType bound = param.bound ?? DynamicTypeImpl.instance;
       DartType variable = param.type;
       // For each Ti extends Bi, first compute Ii by replacing
@@ -183,7 +335,8 @@
       // of dynamic in subsequent rounds.
       substituted[i] = bound.substitute2(substituted, variables);
     }
-    return function.instantiate(substituted);
+
+    return instantiateType(type, substituted);
   }
 
   @override
@@ -202,12 +355,23 @@
       return false;
     }
 
+    // Don't allow a non-generic function where a generic one is expected. The
+    // former wouldn't know how to handle type arguments being passed to it.
+    // TODO(rnystrom): This same check also exists in FunctionTypeImpl.relate()
+    // but we don't always reliably go through that code path. This should be
+    // cleaned up to avoid the redundancy.
+    if (fromType is FunctionType &&
+        toType is FunctionType &&
+        fromType.typeFormals.isEmpty &&
+        toType.typeFormals.isNotEmpty) {
+      return false;
+    }
+
     // If the subtype relation goes the other way, allow the implicit downcast.
     // TODO(leafp): Emit warnings and hints for these in some way.
     // TODO(leafp): Consider adding a flag to disable these?  Or just rely on
     //   --warnings-as-errors?
-    if (isSubtypeOf(toType, fromType) ||
-        _specTypeSystem.isAssignableTo(toType, fromType)) {
+    if (isSubtypeOf(toType, fromType) || toType.isAssignableTo(fromType)) {
       // TODO(leafp): error if type is known to be exact (literal,
       //  instance creation).
       // TODO(leafp): Warn on composite downcast.
@@ -254,6 +418,121 @@
   }
 
   /**
+   * Compute the greatest lower bound of function types [f] and [g].
+   *
+   * The spec rules for GLB on function types, informally, are pretty simple:
+   *
+   * - If a parameter is required in both, it stays required.
+   *
+   * - If a positional parameter is optional or missing in one, it becomes
+   *   optional.
+   *
+   * - Named parameters are unioned together.
+   *
+   * - For any parameter that exists in both functions, use the LUB of them as
+   *   the resulting parameter type.
+   *
+   * - Use the GLB of their return types.
+   */
+  DartType _functionGreatestLowerBound(
+      TypeProvider provider, FunctionType f, FunctionType g) {
+    // Calculate the LUB of each corresponding pair of parameters.
+    List<ParameterElement> parameters = [];
+
+    bool hasPositional = false;
+    bool hasNamed = false;
+    addParameter(
+        String name, DartType fType, DartType gType, ParameterKind kind) {
+      DartType paramType;
+      if (fType != null && gType != null) {
+        // If both functions have this parameter, include both of their types.
+        paramType = getLeastUpperBound(provider, fType, gType);
+      } else {
+        paramType = fType ?? gType;
+      }
+
+      parameters.add(new ParameterElementImpl.synthetic(name, paramType, kind));
+    }
+
+    // TODO(rnystrom): Right now, this assumes f and g do not have any type
+    // parameters. Revisit that in the presence of generic methods.
+    List<DartType> fRequired = f.normalParameterTypes;
+    List<DartType> gRequired = g.normalParameterTypes;
+
+    // We need some parameter names for in the synthesized function type.
+    List<String> fRequiredNames = f.normalParameterNames;
+    List<String> gRequiredNames = g.normalParameterNames;
+
+    // Parameters that are required in both functions are required in the
+    // result.
+    int requiredCount = math.min(fRequired.length, gRequired.length);
+    for (int i = 0; i < requiredCount; i++) {
+      addParameter(fRequiredNames[i], fRequired[i], gRequired[i],
+          ParameterKind.REQUIRED);
+    }
+
+    // Parameters that are optional or missing in either end up optional.
+    List<DartType> fPositional = f.optionalParameterTypes;
+    List<DartType> gPositional = g.optionalParameterTypes;
+    List<String> fPositionalNames = f.optionalParameterNames;
+    List<String> gPositionalNames = g.optionalParameterNames;
+
+    int totalPositional = math.max(fRequired.length + fPositional.length,
+        gRequired.length + gPositional.length);
+    for (int i = requiredCount; i < totalPositional; i++) {
+      // Find the corresponding positional parameters (required or optional) at
+      // this index, if there is one.
+      DartType fType;
+      String fName;
+      if (i < fRequired.length) {
+        fType = fRequired[i];
+        fName = fRequiredNames[i];
+      } else if (i < fRequired.length + fPositional.length) {
+        fType = fPositional[i - fRequired.length];
+        fName = fPositionalNames[i - fRequired.length];
+      }
+
+      DartType gType;
+      String gName;
+      if (i < gRequired.length) {
+        gType = gRequired[i];
+        gName = gRequiredNames[i];
+      } else if (i < gRequired.length + gPositional.length) {
+        gType = gPositional[i - gRequired.length];
+        gName = gPositionalNames[i - gRequired.length];
+      }
+
+      // The loop should not let us go past both f and g's positional params.
+      assert(fType != null || gType != null);
+
+      addParameter(fName ?? gName, fType, gType, ParameterKind.POSITIONAL);
+      hasPositional = true;
+    }
+
+    // Union the named parameters together.
+    Map<String, DartType> fNamed = f.namedParameterTypes;
+    Map<String, DartType> gNamed = g.namedParameterTypes;
+    for (String name in fNamed.keys.toSet()..addAll(gNamed.keys)) {
+      addParameter(name, fNamed[name], gNamed[name], ParameterKind.NAMED);
+      hasNamed = true;
+    }
+
+    // Edge case. Dart does not support functions with both optional positional
+    // and named parameters. If we would synthesize that, give up.
+    if (hasPositional && hasNamed) return provider.bottomType;
+
+    // Calculate the GLB of the return type.
+    DartType returnType =
+        getGreatestLowerBound(provider, f.returnType, g.returnType);
+    return new FunctionElementImpl.synthetic(parameters, returnType).type;
+  }
+
+  @override
+  DartType _functionParameterBound(
+          TypeProvider provider, DartType f, DartType g) =>
+      getGreatestLowerBound(provider, f, g);
+
+  /**
    * Guard against loops in the class hierarchy
    */
   _GuardedSubtypeChecker<DartType> _guard(
@@ -361,7 +640,6 @@
     _GuardedSubtypeChecker<DartType> guardedSubtype = _guard(_isSubtypeOf);
     _GuardedSubtypeChecker<DartType> guardedInferTypeParameter =
         _guard(_inferTypeParameterSubtypeOf);
-
     if (t1 == t2) {
       return true;
     }
@@ -399,6 +677,12 @@
       return guardedInferTypeParameter(t1, t2, visited);
     }
 
+    // Void only appears as the return type of a function, and we handle it
+    // directly in the function subtype rules. We should not get to a point
+    // where we're doing a subtype test on a "bare" void, but just in case we
+    // do, handle it safely.
+    // TODO(rnystrom): Determine how this can ever be reached. If it can't,
+    // remove it.
     if (t1.isVoid || t2.isVoid) {
       return false;
     }
@@ -428,8 +712,8 @@
     return _isFunctionSubtypeOf(t1 as FunctionType, t2 as FunctionType);
   }
 
-  // TODO(leafp): Document the rules in play here
   bool _isTop(DartType t, {bool dynamicIsBottom: false}) {
+    // TODO(leafp): Document the rules in play here
     return (t.isDynamic && !dynamicIsBottom) || t.isObject;
   }
 }
@@ -457,63 +741,6 @@
    * Compute the least upper bound of two types.
    */
   DartType getLeastUpperBound(
-      TypeProvider typeProvider, DartType type1, DartType type2);
-
-  /**
-   * Given a [function] type, instantiate it with its bounds.
-   *
-   * The behavior of this method depends on the type system, for example, in
-   * classic Dart `dynamic` will be used for all type arguments, whereas
-   * strong mode prefers the actual bound type if it was specified.
-   */
-  FunctionType instantiateToBounds(FunctionType function);
-
-  /**
-   * Return `true` if the [leftType] is assignable to the [rightType] (that is,
-   * if leftType <==> rightType).
-   */
-  bool isAssignableTo(DartType leftType, DartType rightType);
-
-  /**
-   * Return `true` if the [leftType] is more specific than the [rightType]
-   * (that is, if leftType << rightType), as defined in the Dart language spec.
-   *
-   * In strong mode, this is equivalent to [isSubtypeOf].
-   */
-  bool isMoreSpecificThan(DartType leftType, DartType rightType);
-
-  /**
-   * Return `true` if the [leftType] is a subtype of the [rightType] (that is,
-   * if leftType <: rightType).
-   */
-  bool isSubtypeOf(DartType leftType, DartType rightType);
-
-  /**
-   * Create either a strong mode or regular type system based on context.
-   */
-  static TypeSystem create(AnalysisContext context) {
-    return (context.analysisOptions.strongMode)
-        ? new StrongTypeSystemImpl()
-        : new TypeSystemImpl();
-  }
-}
-
-/**
- * Implementation of [TypeSystem] using the rules in the Dart specification.
- */
-class TypeSystemImpl implements TypeSystem {
-  TypeSystemImpl();
-
-  @override
-  bool canPromoteToType(DartType to, DartType from) {
-    // Declared type should not be "dynamic".
-    // Promoted type should not be "dynamic".
-    // Promoted type should be more specific than declared.
-    return !from.isDynamic && !to.isDynamic && to.isMoreSpecificThan(from);
-  }
-
-  @override
-  DartType getLeastUpperBound(
       TypeProvider typeProvider, DartType type1, DartType type2) {
     // The least upper bound relation is reflexive.
     if (identical(type1, type2)) {
@@ -541,10 +768,9 @@
       return type1;
     }
 
-    // Let U be a type variable with upper bound B.  The least upper bound of U
-    // and a type T is the least upper bound of B and T.
-    type1 = type1.resolveToBound(typeProvider.objectType);
-    type2 = type2.resolveToBound(typeProvider.objectType);
+    if (type1 is TypeParameterType || type2 is TypeParameterType) {
+      return _typeParameterLeastUpperBound(typeProvider, type1, type2);
+    }
 
     // The least upper bound of a function type and an interface type T is the
     // least upper bound of Function and T.
@@ -558,46 +784,143 @@
     // At this point type1 and type2 should both either be interface types or
     // function types.
     if (type1 is InterfaceType && type2 is InterfaceType) {
-      InterfaceType result =
-          InterfaceTypeImpl.computeLeastUpperBound(type1, type2);
-      if (result == null) {
-        return typeProvider.dynamicType;
-      }
-      return result;
-    } else if (type1 is FunctionType && type2 is FunctionType) {
+      return _interfaceLeastUpperBound(typeProvider, type1, type2);
+    }
+
+    if (type1 is FunctionType && type2 is FunctionType) {
       return _functionLeastUpperBound(typeProvider, type1, type2);
+    }
+
+    // Should never happen. As a defensive measure, return the dynamic type.
+    assert(false);
+    return typeProvider.dynamicType;
+  }
+
+  /**
+   * Given two [InterfaceType]s [type1] and [type2] return their least upper
+   * bound in a type system specific manner.
+   */
+  DartType _interfaceLeastUpperBound(
+      TypeProvider provider, InterfaceType type1, InterfaceType type2);
+
+  /**
+   * Given two [DartType]s [type1] and [type2] at least one of which is a
+   * [TypeParameterType], return their least upper bound in a type system
+   * specific manner.
+   */
+  DartType _typeParameterLeastUpperBound(
+      TypeProvider provider, DartType type1, DartType type2);
+
+  /**
+   * Given a [DartType] [type], instantiate it with its bounds.
+   *
+   * The behavior of this method depends on the type system, for example, in
+   * classic Dart `dynamic` will be used for all type arguments, whereas
+   * strong mode prefers the actual bound type if it was specified.
+   */
+  DartType instantiateToBounds(DartType type);
+
+  /**
+   * Given a [DartType] [type] and a list of types
+   * [typeArguments], instantiate the type formals with the
+   * provided actuals.  If [type] is not a parameterized type,
+   * no instantiation is done.
+   */
+  DartType instantiateType(DartType type, List<DartType> typeArguments) {
+    if (type is ParameterizedType) {
+      return type.instantiate(typeArguments);
     } else {
-      // Should never happen.  As a defensive measure, return the dynamic type.
-      assert(false);
-      return typeProvider.dynamicType;
+      return type;
     }
   }
 
   /**
-   * Instantiate the function type using `dynamic` for all generic parameters.
+   * Return `true` if the [leftType] is assignable to the [rightType] (that is,
+   * if leftType <==> rightType).
    */
-  FunctionType instantiateToBounds(FunctionType function) {
-    int count = function.typeFormals.length;
-    if (count == 0) {
-      return function;
+  bool isAssignableTo(DartType leftType, DartType rightType);
+
+  /**
+   * Return `true` if the [leftType] is more specific than the [rightType]
+   * (that is, if leftType << rightType), as defined in the Dart language spec.
+   *
+   * In strong mode, this is equivalent to [isSubtypeOf].
+   */
+  bool isMoreSpecificThan(DartType leftType, DartType rightType);
+
+  /**
+   * Return `true` if the [leftType] is a subtype of the [rightType] (that is,
+   * if leftType <: rightType).
+   */
+  bool isSubtypeOf(DartType leftType, DartType rightType);
+
+  /**
+   * Searches the superinterfaces of [type] for implementations of [genericType]
+   * and returns the most specific type argument used for that generic type.
+   *
+   * 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;
+
+    // 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);
+      }
     }
-    return function.instantiate(
-        new List<DartType>.filled(count, DynamicTypeImpl.instance));
+
+    recurse(type);
+
+    // Since the interface may be implemented multiple times with different
+    // type arguments, choose the best one.
+    return InterfaceTypeImpl.findMostSpecificType(candidates, this);
   }
 
-  @override
-  bool isAssignableTo(DartType leftType, DartType rightType) {
-    return leftType.isAssignableTo(rightType);
+  /**
+   * Given a [DartType] type, return the [TypeParameterElement]s corresponding
+   * to its formal type parameters (if any).
+   *
+   * @param type the type whose type arguments are to be returned
+   * @return the type arguments associated with the given type
+   */
+  List<TypeParameterElement> typeFormalsAsElements(DartType type) {
+    if (type is FunctionType) {
+      return type.typeFormals;
+    } else if (type is InterfaceType) {
+      return type.typeParameters;
+    } else {
+      return TypeParameterElement.EMPTY_LIST;
+    }
   }
 
-  @override
-  bool isMoreSpecificThan(DartType t1, DartType t2) =>
-      t1.isMoreSpecificThan(t2);
-
-  @override
-  bool isSubtypeOf(DartType leftType, DartType rightType) {
-    return leftType.isSubtypeOf(rightType);
-  }
+  /**
+   * Given a [DartType] type, return the [DartType]s corresponding
+   * to its formal type parameters (if any).
+   *
+   * @param type the type whose type arguments are to be returned
+   * @return the type arguments associated with the given type
+   */
+  List<DartType> typeFormalsAsTypes(DartType type) =>
+      TypeParameterTypeImpl.getTypes(typeFormalsAsElements(type));
 
   /**
    * Compute the least upper bound of function types [f] and [g].
@@ -638,7 +961,7 @@
     for (int i = 0; i < fRequired.length; i++) {
       parameters.add(new ParameterElementImpl.synthetic(
           fRequiredNames[i],
-          getLeastUpperBound(provider, fRequired[i], gRequired[i]),
+          _functionParameterBound(provider, fRequired[i], gRequired[i]),
           ParameterKind.REQUIRED));
     }
 
@@ -651,7 +974,7 @@
     for (int i = 0; i < length; i++) {
       parameters.add(new ParameterElementImpl.synthetic(
           fPositionalNames[i],
-          getLeastUpperBound(provider, fPositional[i], gPositional[i]),
+          _functionParameterBound(provider, fPositional[i], gPositional[i]),
           ParameterKind.POSITIONAL));
     }
 
@@ -660,21 +983,94 @@
     for (String name in fNamed.keys.toSet()..retainAll(gNamed.keys)) {
       parameters.add(new ParameterElementImpl.synthetic(
           name,
-          getLeastUpperBound(provider, fNamed[name], gNamed[name]),
+          _functionParameterBound(provider, fNamed[name], gNamed[name]),
           ParameterKind.NAMED));
     }
 
     // Calculate the LUB of the return type.
     DartType returnType =
         getLeastUpperBound(provider, f.returnType, g.returnType);
+    return new FunctionElementImpl.synthetic(parameters, returnType).type;
+  }
 
-    FunctionElementImpl function = new FunctionElementImpl("", -1);
-    function.synthetic = true;
-    function.returnType = returnType;
-    function.parameters = parameters;
+  /**
+   * Calculates the appropriate upper or lower bound of a pair of parameters
+   * for two function types whose least upper bound is being calculated.
+   *
+   * In spec mode, this uses least upper bound, which... doesn't really make
+   * much sense. Strong mode overrides this to use greatest lower bound.
+   */
+  DartType _functionParameterBound(
+          TypeProvider provider, DartType f, DartType g) =>
+      getLeastUpperBound(provider, f, g);
 
-    function.type = new FunctionTypeImpl(function);
-    return function.type;
+  /**
+   * Create either a strong mode or regular type system based on context.
+   */
+  static TypeSystem create(AnalysisContext context) {
+    return (context.analysisOptions.strongMode)
+        ? new StrongTypeSystemImpl()
+        : new TypeSystemImpl();
+  }
+}
+
+/**
+ * Implementation of [TypeSystem] using the rules in the Dart specification.
+ */
+class TypeSystemImpl extends TypeSystem {
+  TypeSystemImpl();
+
+  @override
+  bool canPromoteToType(DartType to, DartType from) {
+    // Declared type should not be "dynamic".
+    // Promoted type should not be "dynamic".
+    // Promoted type should be more specific than declared.
+    return !from.isDynamic && !to.isDynamic && to.isMoreSpecificThan(from);
+  }
+
+  /**
+   * Instantiate a parameterized type using `dynamic` for all generic
+   * parameters.  Returns the type unchanged if there are no parameters.
+   */
+  DartType instantiateToBounds(DartType type) {
+    List<DartType> typeFormals = typeFormalsAsTypes(type);
+    int count = typeFormals.length;
+    if (count > 0) {
+      List<DartType> typeArguments =
+          new List<DartType>.filled(count, DynamicTypeImpl.instance);
+      return instantiateType(type, typeArguments);
+    }
+    return type;
+  }
+
+  @override
+  bool isAssignableTo(DartType leftType, DartType rightType) {
+    return leftType.isAssignableTo(rightType);
+  }
+
+  @override
+  bool isMoreSpecificThan(DartType t1, DartType t2) =>
+      t1.isMoreSpecificThan(t2);
+
+  @override
+  bool isSubtypeOf(DartType leftType, DartType rightType) {
+    return leftType.isSubtypeOf(rightType);
+  }
+
+  @override
+  DartType _interfaceLeastUpperBound(
+      TypeProvider provider, InterfaceType type1, InterfaceType type2) {
+    InterfaceType result =
+        InterfaceTypeImpl.computeLeastUpperBound(type1, type2);
+    return result ?? provider.dynamicType;
+  }
+
+  @override
+  DartType _typeParameterLeastUpperBound(
+      TypeProvider provider, DartType type1, DartType type2) {
+    type1 = type1.resolveToBound(provider.objectType);
+    type2 = type2.resolveToBound(provider.objectType);
+    return getLeastUpperBound(provider, type1, type2);
   }
 }
 
diff --git a/pkg/analyzer/lib/src/generated/utilities_dart.dart b/pkg/analyzer/lib/src/generated/utilities_dart.dart
index 695f75e..2e4abf1 100644
--- a/pkg/analyzer/lib/src/generated/utilities_dart.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_dart.dart
@@ -6,8 +6,47 @@
 
 import 'package:analyzer/dart/ast/ast.dart' show AnnotatedNode, Comment;
 import 'package:analyzer/dart/ast/token.dart' show Token;
-import 'package:analyzer/src/generated/element.dart' show ElementImpl;
+import 'package:analyzer/src/dart/element/element.dart' show ElementImpl;
 import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/java_engine.dart';
+import 'package:analyzer/src/generated/source.dart';
+
+/**
+ * Resolve the [containedUri] against [baseUri] using Dart rules.
+ *
+ * This function behaves similarly to [Uri.resolveUri], except that it properly
+ * handles situations like the following:
+ *
+ *     resolveRelativeUri(dart:core, bool.dart) -> dart:core/bool.dart
+ *     resolveRelativeUri(package:a/b.dart, ../c.dart) -> package:a/c.dart
+ */
+Uri resolveRelativeUri(Uri baseUri, Uri containedUri) {
+  if (containedUri.isAbsolute) {
+    return containedUri;
+  }
+  Uri origBaseUri = baseUri;
+  try {
+    bool isOpaque = baseUri.isAbsolute && !baseUri.path.startsWith('/');
+    if (isOpaque) {
+      String scheme = baseUri.scheme;
+      String part = baseUri.path;
+      if (scheme == DartUriResolver.DART_SCHEME && part.indexOf('/') < 0) {
+        part = "$part/$part.dart";
+      }
+      baseUri = parseUriWithException("$scheme:/$part");
+    }
+    Uri result = baseUri.resolveUri(containedUri);
+    if (isOpaque) {
+      result =
+          parseUriWithException("${result.scheme}:${result.path.substring(1)}");
+    }
+    return result;
+  } catch (exception, stackTrace) {
+    throw new AnalysisException(
+        "Could not resolve URI ($containedUri) relative to source ($origBaseUri)",
+        new CaughtException(exception, stackTrace));
+  }
+}
 
 /**
  * If the given [node] has a documentation comment, remember its content
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index e0600dc..b9dca93 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -145,7 +145,7 @@
    * Make this the current tag for the isolate, run [f], and restore the
    * previous tag. Returns the result of invoking [f].
    */
-  makeCurrentWhile(f());
+  dynamic/*=E*/ makeCurrentWhile/*<E>*/(dynamic/*=E*/ f());
 
   /**
    * Reset the total time tracked by all [PerformanceTag]s to zero.
@@ -206,7 +206,7 @@
     return previous;
   }
 
-  makeCurrentWhile(f()) {
+  dynamic/*=E*/ makeCurrentWhile/*<E>*/(dynamic/*=E*/ f()) {
     PerformanceTag prevTag = makeCurrent();
     try {
       return f();
diff --git a/pkg/analyzer/lib/src/plugin/engine_plugin.dart b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
index 545064a..145c4aa 100644
--- a/pkg/analyzer/lib/src/plugin/engine_plugin.dart
+++ b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
@@ -224,6 +224,7 @@
     registerExtension(taskId, ReadyLibraryElement6Task.DESCRIPTOR);
     registerExtension(taskId, ReadyResolvedUnitTask.DESCRIPTOR);
     registerExtension(taskId, ResolveConstantExpressionTask.DESCRIPTOR);
+    registerExtension(taskId, ResolveDirectiveElementsTask.DESCRIPTOR);
     registerExtension(taskId, ResolveInstanceFieldsInUnitTask.DESCRIPTOR);
     registerExtension(taskId, ResolveLibraryReferencesTask.DESCRIPTOR);
     registerExtension(taskId, ResolveLibraryTask.DESCRIPTOR);
diff --git a/pkg/analyzer/lib/src/plugin/options_plugin.dart b/pkg/analyzer/lib/src/plugin/options_plugin.dart
index 6fba649..9a4fc01 100644
--- a/pkg/analyzer/lib/src/plugin/options_plugin.dart
+++ b/pkg/analyzer/lib/src/plugin/options_plugin.dart
@@ -34,11 +34,13 @@
 
   /// All contributed options processors.
   List<OptionsProcessor> get optionsProcessors =>
-      optionsProcessorExtensionPoint?.extensions ?? const [];
+      optionsProcessorExtensionPoint?.extensions as List<OptionsProcessor> ??
+      const <OptionsProcessor>[];
 
   /// All contributed options validators.
   List<OptionsValidator> get optionsValidators =>
-      optionsValidatorExtensionPoint?.extensions ?? const [];
+      optionsValidatorExtensionPoint?.extensions as List<OptionsValidator> ??
+      const <OptionsValidator>[];
 
   @override
   String get uniqueIdentifier => UNIQUE_IDENTIFIER;
diff --git a/pkg/analyzer/lib/src/plugin/plugin_configuration.dart b/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
index 222e376..2137f11 100644
--- a/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
+++ b/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
@@ -143,8 +143,7 @@
   }
 
   @override
-  void optionsProcessed(
-      AnalysisContext context, Map<String, Object> options) {
+  void optionsProcessed(AnalysisContext context, Map<String, Object> options) {
     _config = new PluginConfig.fromOptions(options);
   }
 }
diff --git a/pkg/analyzer/lib/src/services/lint.dart b/pkg/analyzer/lib/src/services/lint.dart
index af20f59..3b36457 100644
--- a/pkg/analyzer/lib/src/services/lint.dart
+++ b/pkg/analyzer/lib/src/services/lint.dart
@@ -4,11 +4,11 @@
 
 library analyzer.src.services.lint;
 
+import 'dart:collection';
+
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/error.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/task/model.dart';
 import 'package:analyzer/task/model.dart';
 
@@ -19,10 +19,14 @@
 final ResultDescriptor<List<Linter>> CONFIGURED_LINTS_KEY =
     new ResultDescriptorImpl('configured.lints', _noLints);
 
+/// Shared lint registry.
+LintRegistry lintRegistry = new LintRegistry();
+
 /// Return lints associated with this [context], or an empty list if there are
 /// none.
 List<Linter> getLints(AnalysisContext context) =>
-    context.getConfigurationData(CONFIGURED_LINTS_KEY) ?? _noLints;
+    context.getConfigurationData(CONFIGURED_LINTS_KEY) as List<Linter> ??
+    _noLints;
 
 /// Associate these [lints] with the given [context].
 void setLints(AnalysisContext context, List<Linter> lints) {
@@ -35,41 +39,22 @@
   /// NOTE: this is set by the framework before visit begins.
   ErrorReporter reporter;
 
+  /// Linter name.
+  String get name;
+
   /// Return a visitor to be passed to compilation units to perform lint
   /// analysis.
   /// Lint errors are reported via this [Linter]'s error [reporter].
   AstVisitor getVisitor();
 }
 
-/// Traverses a library's worth of dart code at a time to generate lint warnings
-/// over the set of sources.
-///
-/// See [LintCode].
-class LintGenerator {
-  static const List<Linter> _noLints = const <Linter>[];
+/// Manages lint timing.
+class LintRegistry {
+  /// Dictionary mapping lints (by name) to timers.
+  final Map<String, Stopwatch> timers = new HashMap<String, Stopwatch>();
 
-  final Iterable<CompilationUnit> _compilationUnits;
-  final AnalysisErrorListener _errorListener;
-  final Iterable<Linter> _linters;
-
-  LintGenerator(this._compilationUnits, this._errorListener,
-      [Iterable<Linter> linters])
-      : _linters = linters ?? _noLints;
-
-  void generate() {
-    PerformanceStatistics.lint.makeCurrentWhile(() {
-      _compilationUnits.forEach((cu) {
-        if (cu.element != null) {
-          _generate(cu, cu.element.source);
-        }
-      });
-    });
-  }
-
-  void _generate(CompilationUnit unit, Source source) {
-    ErrorReporter errorReporter = new ErrorReporter(_errorListener, source);
-    _linters.forEach((l) => l.reporter = errorReporter);
-    Iterable<AstVisitor> visitors = _linters.map((l) => l.getVisitor());
-    unit.accept(new DelegatingAstVisitor(visitors.where((v) => v != null)));
-  }
+  /// Get a timer associated with the given lint rule (or create one if none
+  /// exists).
+  Stopwatch getTimer(Linter linter) =>
+      timers.putIfAbsent(linter.name, () => new Stopwatch());
 }
diff --git a/pkg/analyzer/lib/src/string_source.dart b/pkg/analyzer/lib/src/string_source.dart
index 04eb0a3..ce0c087 100644
--- a/pkg/analyzer/lib/src/string_source.dart
+++ b/pkg/analyzer/lib/src/string_source.dart
@@ -64,8 +64,5 @@
   bool exists() => true;
 
   @override
-  Uri resolveRelativeUri(Uri relativeUri) => uri.resolveUri(relativeUri);
-
-  @override
   String toString() => 'StringSource ($fullName)';
 }
diff --git a/pkg/analyzer/lib/src/summary/base.dart b/pkg/analyzer/lib/src/summary/base.dart
index acdb839..7c3d8ae 100644
--- a/pkg/analyzer/lib/src/summary/base.dart
+++ b/pkg/analyzer/lib/src/summary/base.dart
@@ -23,6 +23,30 @@
 }
 
 /**
+ * Instances of this class represent data that has been read from a summary.
+ */
+abstract class SummaryClass {
+  /**
+   * Translate the data in this class into a JSON map, whose keys are the names
+   * of fields and whose values are the data stored in those fields,
+   * recursively converted into JSON.
+   *
+   * Fields containing their default value are elided.
+   *
+   * Intended for testing and debugging only.
+   */
+  Map<String, Object> toJson();
+
+  /**
+   * Translate the data in this class into a map whose keys are the names of
+   * fields and whose values are the data stored in those fields.
+   *
+   * Intended for testing and debugging only.
+   */
+  Map<String, Object> toMap();
+}
+
+/**
  * Annotation used in the summary IDL to indicate that a summary class can be
  * the top level object in an encoded summary.
  */
@@ -35,27 +59,3 @@
 
   const TopLevel([this.fileIdentifier]);
 }
-
-/**
- * Instances of this class represent data that has been read from a summary.
- */
-abstract class SummaryClass {
-  /**
-   * Translate the data in this class into a map whose keys are the names of
-   * fields and whose values are the data stored in those fields.
-   *
-   * Intended for testing and debugging only.
-   */
-  Map<String, Object> toMap();
-
-  /**
-   * Translate the data in this class into a JSON map, whose keys are the names
-   * of fields and whose values are the data stored in those fields,
-   * recursively converted into JSON.
-   *
-   * Fields containing their default value are elided.
-   *
-   * Intended for testing and debugging only.
-   */
-  Map<String, Object> toJson();
-}
diff --git a/pkg/analyzer/lib/src/summary/flat_buffers.dart b/pkg/analyzer/lib/src/summary/flat_buffers.dart
index ba2c2ef..410d9d4 100644
--- a/pkg/analyzer/lib/src/summary/flat_buffers.dart
+++ b/pkg/analyzer/lib/src/summary/flat_buffers.dart
@@ -720,6 +720,21 @@
 }
 
 /**
+ * Reader of lists of unsigned 8-bit integer values.
+ *
+ * The returned unmodifiable lists lazily read values on access.
+ */
+class Uint8ListReader extends Reader<List<int>> {
+  const Uint8ListReader();
+
+  @override
+  int get size => 4;
+
+  @override
+  List<int> read(BufferPointer bp) => new _FbUint8List(bp.derefObject());
+}
+
+/**
  * The reader of unsigned 8-bit integers.
  */
 class Uint8Reader extends Reader<int> {
@@ -736,16 +751,16 @@
  * List of booleans backed by 8-bit unsigned integers.
  */
 class _FbBoolList extends Object with ListMixin<bool> implements List<bool> {
-  final List<int> uint8List;
+  final BufferPointer bp;
   int _length;
 
-  _FbBoolList(BufferPointer bp)
-      : uint8List = new _FbGenericList<int>(const Uint8Reader(), bp);
+  _FbBoolList(this.bp);
 
   @override
   int get length {
     if (_length == null) {
-      _length = (uint8List.length - 1) * 8 - uint8List.last;
+      int byteLength = bp._getUint32();
+      _length = (byteLength - 1) * 8 - _getByte(byteLength - 1);
     }
     return _length;
   }
@@ -758,32 +773,25 @@
   bool operator [](int i) {
     int index = i ~/ 8;
     int mask = 1 << i % 8;
-    return uint8List[index] & mask != 0;
+    return _getByte(index) & mask != 0;
   }
 
   @override
   void operator []=(int i, bool e) =>
       throw new StateError('Attempt to modify immutable list');
+
+  int _getByte(int index) => bp._getUint8(4 + index);
 }
 
 /**
  * The list backed by 64-bit values - Uint64 length and Float64.
  */
 class _FbFloat64List extends _FbList<double> {
-  List<double> _items;
-
   _FbFloat64List(BufferPointer bp) : super(bp);
 
   @override
   double operator [](int i) {
-    _items ??= new List<double>(length);
-    double item = _items[i];
-    if (item == null) {
-      BufferPointer ref = bp._advance(8 + 8 * i);
-      item = ref._getFloat64();
-      _items[i] = item;
-    }
-    return item;
+    return bp._getFloat64(8 + 8 * i);
   }
 }
 
@@ -838,19 +846,23 @@
  * List backed by 32-bit unsigned integers.
  */
 class _FbUint32List extends _FbList<int> {
-  List<int> _items;
-
   _FbUint32List(BufferPointer bp) : super(bp);
 
   @override
   int operator [](int i) {
-    _items ??= new List<int>(length);
-    int item = _items[i];
-    if (item == null) {
-      item = bp._getUint32(4 + 4 * i);
-      _items[i] = item;
-    }
-    return item;
+    return bp._getUint32(4 + 4 * i);
+  }
+}
+
+/**
+ * List backed by 8-bit unsigned integers.
+ */
+class _FbUint8List extends _FbList<int> {
+  _FbUint8List(BufferPointer bp) : super(bp);
+
+  @override
+  int operator [](int i) {
+    return bp._getUint8(4 + i);
   }
 }
 
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index e5c4630..bd866c7 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -11,6 +11,19 @@
 import 'idl.dart' as idl;
 import 'dart:convert' as convert;
 
+class _CacheSourceKindReader extends fb.Reader<idl.CacheSourceKind> {
+  const _CacheSourceKindReader() : super();
+
+  @override
+  int get size => 1;
+
+  @override
+  idl.CacheSourceKind read(fb.BufferPointer bp) {
+    int index = const fb.Uint8Reader().read(bp);
+    return index < idl.CacheSourceKind.values.length ? idl.CacheSourceKind.values[index] : idl.CacheSourceKind.library;
+  }
+}
+
 class _IndexNameKindReader extends fb.Reader<idl.IndexNameKind> {
   const _IndexNameKindReader() : super();
 
@@ -33,7 +46,7 @@
   @override
   idl.IndexRelationKind read(fb.BufferPointer bp) {
     int index = const fb.Uint8Reader().read(bp);
-    return index < idl.IndexRelationKind.values.length ? idl.IndexRelationKind.values[index] : idl.IndexRelationKind.IS_EXTENDED_BY;
+    return index < idl.IndexRelationKind.values.length ? idl.IndexRelationKind.values[index] : idl.IndexRelationKind.IS_ANCESTOR_OF;
   }
 }
 
@@ -102,6 +115,19 @@
   }
 }
 
+class _UnlinkedExprAssignOperatorReader extends fb.Reader<idl.UnlinkedExprAssignOperator> {
+  const _UnlinkedExprAssignOperatorReader() : super();
+
+  @override
+  int get size => 1;
+
+  @override
+  idl.UnlinkedExprAssignOperator read(fb.BufferPointer bp) {
+    int index = const fb.Uint8Reader().read(bp);
+    return index < idl.UnlinkedExprAssignOperator.values.length ? idl.UnlinkedExprAssignOperator.values[index] : idl.UnlinkedExprAssignOperator.assign;
+  }
+}
+
 class _UnlinkedParamKindReader extends fb.Reader<idl.UnlinkedParamKind> {
   const _UnlinkedParamKindReader() : super();
 
@@ -115,6 +141,281 @@
   }
 }
 
+class CacheSourceContentBuilder extends Object with _CacheSourceContentMixin implements idl.CacheSourceContent {
+  bool _finished = false;
+
+  List<String> _exportedUris;
+  List<String> _importedUris;
+  idl.CacheSourceKind _kind;
+  List<String> _partUris;
+
+  @override
+  List<String> get exportedUris => _exportedUris ??= <String>[];
+
+  /**
+   * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`,
+   * or `package:foo/bar.dart`.  Empty if [kind] is [CacheSourceKind.part].
+   */
+  void set exportedUris(List<String> _value) {
+    assert(!_finished);
+    _exportedUris = _value;
+  }
+
+  @override
+  List<String> get importedUris => _importedUris ??= <String>[];
+
+  /**
+   * The list of explicitly imported URIs, e.g. `dart:core`, or `foo/bar.dart`,
+   * or `package:foo/bar.dart`.  Empty if [kind] is [CacheSourceKind.part].
+   */
+  void set importedUris(List<String> _value) {
+    assert(!_finished);
+    _importedUris = _value;
+  }
+
+  @override
+  idl.CacheSourceKind get kind => _kind ??= idl.CacheSourceKind.library;
+
+  /**
+   * The kind of the source.
+   */
+  void set kind(idl.CacheSourceKind _value) {
+    assert(!_finished);
+    _kind = _value;
+  }
+
+  @override
+  List<String> get partUris => _partUris ??= <String>[];
+
+  /**
+   * The list of part URIs, e.g. `foo/bar.dart`.  Empty if [kind] is
+   * [CacheSourceKind.part].
+   */
+  void set partUris(List<String> _value) {
+    assert(!_finished);
+    _partUris = _value;
+  }
+
+  CacheSourceContentBuilder({List<String> exportedUris, List<String> importedUris, idl.CacheSourceKind kind, List<String> partUris})
+    : _exportedUris = exportedUris,
+      _importedUris = importedUris,
+      _kind = kind,
+      _partUris = partUris;
+
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+  }
+
+  List<int> toBuffer() {
+    fb.Builder fbBuilder = new fb.Builder();
+    return fbBuilder.finish(finish(fbBuilder), "CaSS");
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    assert(!_finished);
+    _finished = true;
+    fb.Offset offset_exportedUris;
+    fb.Offset offset_importedUris;
+    fb.Offset offset_partUris;
+    if (!(_exportedUris == null || _exportedUris.isEmpty)) {
+      offset_exportedUris = fbBuilder.writeList(_exportedUris.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    if (!(_importedUris == null || _importedUris.isEmpty)) {
+      offset_importedUris = fbBuilder.writeList(_importedUris.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    if (!(_partUris == null || _partUris.isEmpty)) {
+      offset_partUris = fbBuilder.writeList(_partUris.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    fbBuilder.startTable();
+    if (offset_exportedUris != null) {
+      fbBuilder.addOffset(2, offset_exportedUris);
+    }
+    if (offset_importedUris != null) {
+      fbBuilder.addOffset(1, offset_importedUris);
+    }
+    if (_kind != null && _kind != idl.CacheSourceKind.library) {
+      fbBuilder.addUint8(0, _kind.index);
+    }
+    if (offset_partUris != null) {
+      fbBuilder.addOffset(3, offset_partUris);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+idl.CacheSourceContent readCacheSourceContent(List<int> buffer) {
+  fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
+  return const _CacheSourceContentReader().read(rootRef);
+}
+
+class _CacheSourceContentReader extends fb.TableReader<_CacheSourceContentImpl> {
+  const _CacheSourceContentReader();
+
+  @override
+  _CacheSourceContentImpl createObject(fb.BufferPointer bp) => new _CacheSourceContentImpl(bp);
+}
+
+class _CacheSourceContentImpl extends Object with _CacheSourceContentMixin implements idl.CacheSourceContent {
+  final fb.BufferPointer _bp;
+
+  _CacheSourceContentImpl(this._bp);
+
+  List<String> _exportedUris;
+  List<String> _importedUris;
+  idl.CacheSourceKind _kind;
+  List<String> _partUris;
+
+  @override
+  List<String> get exportedUris {
+    _exportedUris ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_bp, 2, const <String>[]);
+    return _exportedUris;
+  }
+
+  @override
+  List<String> get importedUris {
+    _importedUris ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_bp, 1, const <String>[]);
+    return _importedUris;
+  }
+
+  @override
+  idl.CacheSourceKind get kind {
+    _kind ??= const _CacheSourceKindReader().vTableGet(_bp, 0, idl.CacheSourceKind.library);
+    return _kind;
+  }
+
+  @override
+  List<String> get partUris {
+    _partUris ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_bp, 3, const <String>[]);
+    return _partUris;
+  }
+}
+
+abstract class _CacheSourceContentMixin implements idl.CacheSourceContent {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (exportedUris.isNotEmpty) _result["exportedUris"] = exportedUris;
+    if (importedUris.isNotEmpty) _result["importedUris"] = importedUris;
+    if (kind != idl.CacheSourceKind.library) _result["kind"] = kind.toString().split('.')[1];
+    if (partUris.isNotEmpty) _result["partUris"] = partUris;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+    "exportedUris": exportedUris,
+    "importedUris": importedUris,
+    "kind": kind,
+    "partUris": partUris,
+  };
+
+  @override
+  String toString() => convert.JSON.encode(toJson());
+}
+
+class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRange {
+  bool _finished = false;
+
+  int _length;
+  int _offset;
+
+  @override
+  int get length => _length ??= 0;
+
+  /**
+   * Length of the element code.
+   */
+  void set length(int _value) {
+    assert(!_finished);
+    assert(_value == null || _value >= 0);
+    _length = _value;
+  }
+
+  @override
+  int get offset => _offset ??= 0;
+
+  /**
+   * Offset of the element code relative to the beginning of the file.
+   */
+  void set offset(int _value) {
+    assert(!_finished);
+    assert(_value == null || _value >= 0);
+    _offset = _value;
+  }
+
+  CodeRangeBuilder({int length, int offset})
+    : _length = length,
+      _offset = offset;
+
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    assert(!_finished);
+    _finished = true;
+    fbBuilder.startTable();
+    if (_length != null && _length != 0) {
+      fbBuilder.addUint32(1, _length);
+    }
+    if (_offset != null && _offset != 0) {
+      fbBuilder.addUint32(0, _offset);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _CodeRangeReader extends fb.TableReader<_CodeRangeImpl> {
+  const _CodeRangeReader();
+
+  @override
+  _CodeRangeImpl createObject(fb.BufferPointer bp) => new _CodeRangeImpl(bp);
+}
+
+class _CodeRangeImpl extends Object with _CodeRangeMixin implements idl.CodeRange {
+  final fb.BufferPointer _bp;
+
+  _CodeRangeImpl(this._bp);
+
+  int _length;
+  int _offset;
+
+  @override
+  int get length {
+    _length ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
+    return _length;
+  }
+
+  @override
+  int get offset {
+    _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
+    return _offset;
+  }
+}
+
+abstract class _CodeRangeMixin implements idl.CodeRange {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (length != 0) _result["length"] = length;
+    if (offset != 0) _result["offset"] = offset;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+    "length": length,
+    "offset": offset,
+  };
+
+  @override
+  String toString() => convert.JSON.encode(toJson());
+}
+
 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.EntityRef {
   bool _finished = false;
 
@@ -264,6 +565,15 @@
       _syntheticReturnType = syntheticReturnType,
       _typeArguments = typeArguments;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _syntheticParams?.forEach((b) => b.flushInformative());
+    _syntheticReturnType?.flushInformative();
+    _typeArguments?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -438,6 +748,12 @@
     : _parts = parts,
       _uri = uri;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -572,6 +888,12 @@
       _name = name,
       _unit = unit;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -665,7 +987,9 @@
   bool _finished = false;
 
   List<LinkedDependencyBuilder> _dependencies;
+  List<int> _exportDependencies;
   List<LinkedExportNameBuilder> _exportNames;
+  bool _fallbackMode;
   List<int> _importDependencies;
   int _numPrelinkedDependencies;
   List<LinkedUnitBuilder> _units;
@@ -695,6 +1019,19 @@
   }
 
   @override
+  List<int> get exportDependencies => _exportDependencies ??= <int>[];
+
+  /**
+   * For each export in [UnlinkedUnit.exports], an index into [dependencies]
+   * of the library being exported.
+   */
+  void set exportDependencies(List<int> _value) {
+    assert(!_finished);
+    assert(_value == null || _value.every((e) => e >= 0));
+    _exportDependencies = _value;
+  }
+
+  @override
   List<LinkedExportNameBuilder> get exportNames => _exportNames ??= <LinkedExportNameBuilder>[];
 
   /**
@@ -710,6 +1047,18 @@
   }
 
   @override
+  bool get fallbackMode => _fallbackMode ??= false;
+
+  /**
+   * Indicates whether this library was summarized in "fallback mode".  If
+   * true, all other fields in the data structure have their default values.
+   */
+  void set fallbackMode(bool _value) {
+    assert(!_finished);
+    _fallbackMode = _value;
+  }
+
+  @override
   List<int> get importDependencies => _importDependencies ??= <int>[];
 
   /**
@@ -750,13 +1099,24 @@
     _units = _value;
   }
 
-  LinkedLibraryBuilder({List<LinkedDependencyBuilder> dependencies, List<LinkedExportNameBuilder> exportNames, List<int> importDependencies, int numPrelinkedDependencies, List<LinkedUnitBuilder> units})
+  LinkedLibraryBuilder({List<LinkedDependencyBuilder> dependencies, List<int> exportDependencies, List<LinkedExportNameBuilder> exportNames, bool fallbackMode, List<int> importDependencies, int numPrelinkedDependencies, List<LinkedUnitBuilder> units})
     : _dependencies = dependencies,
+      _exportDependencies = exportDependencies,
       _exportNames = exportNames,
+      _fallbackMode = fallbackMode,
       _importDependencies = importDependencies,
       _numPrelinkedDependencies = numPrelinkedDependencies,
       _units = units;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _dependencies?.forEach((b) => b.flushInformative());
+    _exportNames?.forEach((b) => b.flushInformative());
+    _units?.forEach((b) => b.flushInformative());
+  }
+
   List<int> toBuffer() {
     fb.Builder fbBuilder = new fb.Builder();
     return fbBuilder.finish(finish(fbBuilder), "LLib");
@@ -766,12 +1126,16 @@
     assert(!_finished);
     _finished = true;
     fb.Offset offset_dependencies;
+    fb.Offset offset_exportDependencies;
     fb.Offset offset_exportNames;
     fb.Offset offset_importDependencies;
     fb.Offset offset_units;
     if (!(_dependencies == null || _dependencies.isEmpty)) {
       offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (!(_exportDependencies == null || _exportDependencies.isEmpty)) {
+      offset_exportDependencies = fbBuilder.writeListUint32(_exportDependencies);
+    }
     if (!(_exportNames == null || _exportNames.isEmpty)) {
       offset_exportNames = fbBuilder.writeList(_exportNames.map((b) => b.finish(fbBuilder)).toList());
     }
@@ -785,9 +1149,15 @@
     if (offset_dependencies != null) {
       fbBuilder.addOffset(0, offset_dependencies);
     }
+    if (offset_exportDependencies != null) {
+      fbBuilder.addOffset(6, offset_exportDependencies);
+    }
     if (offset_exportNames != null) {
       fbBuilder.addOffset(4, offset_exportNames);
     }
+    if (_fallbackMode == true) {
+      fbBuilder.addBool(5, true);
+    }
     if (offset_importDependencies != null) {
       fbBuilder.addOffset(1, offset_importDependencies);
     }
@@ -819,7 +1189,9 @@
   _LinkedLibraryImpl(this._bp);
 
   List<idl.LinkedDependency> _dependencies;
+  List<int> _exportDependencies;
   List<idl.LinkedExportName> _exportNames;
+  bool _fallbackMode;
   List<int> _importDependencies;
   int _numPrelinkedDependencies;
   List<idl.LinkedUnit> _units;
@@ -831,12 +1203,24 @@
   }
 
   @override
+  List<int> get exportDependencies {
+    _exportDependencies ??= const fb.Uint32ListReader().vTableGet(_bp, 6, const <int>[]);
+    return _exportDependencies;
+  }
+
+  @override
   List<idl.LinkedExportName> get exportNames {
     _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExportNameReader()).vTableGet(_bp, 4, const <idl.LinkedExportName>[]);
     return _exportNames;
   }
 
   @override
+  bool get fallbackMode {
+    _fallbackMode ??= const fb.BoolReader().vTableGet(_bp, 5, false);
+    return _fallbackMode;
+  }
+
+  @override
   List<int> get importDependencies {
     _importDependencies ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]);
     return _importDependencies;
@@ -860,7 +1244,9 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (dependencies.isNotEmpty) _result["dependencies"] = dependencies.map((_value) => _value.toJson()).toList();
+    if (exportDependencies.isNotEmpty) _result["exportDependencies"] = exportDependencies;
     if (exportNames.isNotEmpty) _result["exportNames"] = exportNames.map((_value) => _value.toJson()).toList();
+    if (fallbackMode != false) _result["fallbackMode"] = fallbackMode;
     if (importDependencies.isNotEmpty) _result["importDependencies"] = importDependencies;
     if (numPrelinkedDependencies != 0) _result["numPrelinkedDependencies"] = numPrelinkedDependencies;
     if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson()).toList();
@@ -870,7 +1256,9 @@
   @override
   Map<String, Object> toMap() => {
     "dependencies": dependencies,
+    "exportDependencies": exportDependencies,
     "exportNames": exportNames,
+    "fallbackMode": fallbackMode,
     "importDependencies": importDependencies,
     "numPrelinkedDependencies": numPrelinkedDependencies,
     "units": units,
@@ -1009,6 +1397,12 @@
       _numTypeParameters = numTypeParameters,
       _unit = unit;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -1137,10 +1531,24 @@
 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.LinkedUnit {
   bool _finished = false;
 
+  List<int> _constCycles;
   List<LinkedReferenceBuilder> _references;
   List<EntityRefBuilder> _types;
 
   @override
+  List<int> get constCycles => _constCycles ??= <int>[];
+
+  /**
+   * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot])
+   * corresponding to const constructors that are part of cycles.
+   */
+  void set constCycles(List<int> _value) {
+    assert(!_finished);
+    assert(_value == null || _value.every((e) => e >= 0));
+    _constCycles = _value;
+  }
+
+  @override
   List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenceBuilder>[];
 
   /**
@@ -1168,15 +1576,28 @@
     _types = _value;
   }
 
-  LinkedUnitBuilder({List<LinkedReferenceBuilder> references, List<EntityRefBuilder> types})
-    : _references = references,
+  LinkedUnitBuilder({List<int> constCycles, List<LinkedReferenceBuilder> references, List<EntityRefBuilder> types})
+    : _constCycles = constCycles,
+      _references = references,
       _types = types;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _references?.forEach((b) => b.flushInformative());
+    _types?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
+    fb.Offset offset_constCycles;
     fb.Offset offset_references;
     fb.Offset offset_types;
+    if (!(_constCycles == null || _constCycles.isEmpty)) {
+      offset_constCycles = fbBuilder.writeListUint32(_constCycles);
+    }
     if (!(_references == null || _references.isEmpty)) {
       offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fbBuilder)).toList());
     }
@@ -1184,6 +1605,9 @@
       offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).toList());
     }
     fbBuilder.startTable();
+    if (offset_constCycles != null) {
+      fbBuilder.addOffset(2, offset_constCycles);
+    }
     if (offset_references != null) {
       fbBuilder.addOffset(0, offset_references);
     }
@@ -1206,10 +1630,17 @@
 
   _LinkedUnitImpl(this._bp);
 
+  List<int> _constCycles;
   List<idl.LinkedReference> _references;
   List<idl.EntityRef> _types;
 
   @override
+  List<int> get constCycles {
+    _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]);
+    return _constCycles;
+  }
+
+  @override
   List<idl.LinkedReference> get references {
     _references ??= const fb.ListReader<idl.LinkedReference>(const _LinkedReferenceReader()).vTableGet(_bp, 0, const <idl.LinkedReference>[]);
     return _references;
@@ -1226,6 +1657,7 @@
   @override
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
+    if (constCycles.isNotEmpty) _result["constCycles"] = constCycles;
     if (references.isNotEmpty) _result["references"] = references.map((_value) => _value.toJson()).toList();
     if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson()).toList();
     return _result;
@@ -1233,6 +1665,7 @@
 
   @override
   Map<String, Object> toMap() => {
+    "constCycles": constCycles,
     "references": references,
     "types": types,
   };
@@ -1344,6 +1777,14 @@
       _unlinkedUnits = unlinkedUnits,
       _unlinkedUnitUris = unlinkedUnitUris;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _linkedLibraries?.forEach((b) => b.flushInformative());
+    _unlinkedUnits?.forEach((b) => b.flushInformative());
+  }
+
   List<int> toBuffer() {
     fb.Builder fbBuilder = new fb.Builder();
     return fbBuilder.finish(finish(fbBuilder), "PBdl");
@@ -1551,7 +1992,9 @@
   List<String> get strings => _strings ??= <String>[];
 
   /**
-   * List of unique element strings used in this [PackageIndex].
+   * 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) {
     assert(!_finished);
@@ -1606,6 +2049,13 @@
       _units = units,
       _unitUnitUris = unitUnitUris;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _units?.forEach((b) => b.flushInformative());
+  }
+
   List<int> toBuffer() {
     fb.Builder fbBuilder = new fb.Builder();
     return fbBuilder.finish(finish(fbBuilder), "Indx");
@@ -1777,6 +2227,7 @@
   List<int> _usedElementLengths;
   List<int> _usedElementOffsets;
   List<int> _usedElements;
+  List<bool> _usedNameIsQualifiedFlags;
   List<idl.IndexRelationKind> _usedNameKinds;
   List<int> _usedNameOffsets;
   List<int> _usedNames;
@@ -1896,6 +2347,18 @@
   }
 
   @override
+  List<bool> get usedNameIsQualifiedFlags => _usedNameIsQualifiedFlags ??= <bool>[];
+
+  /**
+   * Each item of this list is the `true` if the corresponding name usage
+   * is qualified with some prefix.
+   */
+  void set usedNameIsQualifiedFlags(List<bool> _value) {
+    assert(!_finished);
+    _usedNameIsQualifiedFlags = _value;
+  }
+
+  @override
   List<idl.IndexRelationKind> get usedNameKinds => _usedNameKinds ??= <idl.IndexRelationKind>[];
 
   /**
@@ -1933,7 +2396,7 @@
     _usedNames = _value;
   }
 
-  UnitIndexBuilder({List<idl.IndexNameKind> definedNameKinds, List<int> definedNameOffsets, List<int> definedNames, int unit, List<bool> usedElementIsQualifiedFlags, List<idl.IndexRelationKind> usedElementKinds, List<int> usedElementLengths, List<int> usedElementOffsets, List<int> usedElements, List<idl.IndexRelationKind> usedNameKinds, List<int> usedNameOffsets, List<int> usedNames})
+  UnitIndexBuilder({List<idl.IndexNameKind> definedNameKinds, List<int> definedNameOffsets, List<int> definedNames, int unit, List<bool> usedElementIsQualifiedFlags, List<idl.IndexRelationKind> usedElementKinds, List<int> usedElementLengths, List<int> usedElementOffsets, List<int> usedElements, List<bool> usedNameIsQualifiedFlags, List<idl.IndexRelationKind> usedNameKinds, List<int> usedNameOffsets, List<int> usedNames})
     : _definedNameKinds = definedNameKinds,
       _definedNameOffsets = definedNameOffsets,
       _definedNames = definedNames,
@@ -1943,10 +2406,17 @@
       _usedElementLengths = usedElementLengths,
       _usedElementOffsets = usedElementOffsets,
       _usedElements = usedElements,
+      _usedNameIsQualifiedFlags = usedNameIsQualifiedFlags,
       _usedNameKinds = usedNameKinds,
       _usedNameOffsets = usedNameOffsets,
       _usedNames = usedNames;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -1958,6 +2428,7 @@
     fb.Offset offset_usedElementLengths;
     fb.Offset offset_usedElementOffsets;
     fb.Offset offset_usedElements;
+    fb.Offset offset_usedNameIsQualifiedFlags;
     fb.Offset offset_usedNameKinds;
     fb.Offset offset_usedNameOffsets;
     fb.Offset offset_usedNames;
@@ -1985,6 +2456,9 @@
     if (!(_usedElements == null || _usedElements.isEmpty)) {
       offset_usedElements = fbBuilder.writeListUint32(_usedElements);
     }
+    if (!(_usedNameIsQualifiedFlags == null || _usedNameIsQualifiedFlags.isEmpty)) {
+      offset_usedNameIsQualifiedFlags = fbBuilder.writeListBool(_usedNameIsQualifiedFlags);
+    }
     if (!(_usedNameKinds == null || _usedNameKinds.isEmpty)) {
       offset_usedNameKinds = fbBuilder.writeListUint8(_usedNameKinds.map((b) => b.index).toList());
     }
@@ -2022,6 +2496,9 @@
     if (offset_usedElements != null) {
       fbBuilder.addOffset(3, offset_usedElements);
     }
+    if (offset_usedNameIsQualifiedFlags != null) {
+      fbBuilder.addOffset(12, offset_usedNameIsQualifiedFlags);
+    }
     if (offset_usedNameKinds != null) {
       fbBuilder.addOffset(10, offset_usedNameKinds);
     }
@@ -2056,6 +2533,7 @@
   List<int> _usedElementLengths;
   List<int> _usedElementOffsets;
   List<int> _usedElements;
+  List<bool> _usedNameIsQualifiedFlags;
   List<idl.IndexRelationKind> _usedNameKinds;
   List<int> _usedNameOffsets;
   List<int> _usedNames;
@@ -2115,6 +2593,12 @@
   }
 
   @override
+  List<bool> get usedNameIsQualifiedFlags {
+    _usedNameIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bp, 12, const <bool>[]);
+    return _usedNameIsQualifiedFlags;
+  }
+
+  @override
   List<idl.IndexRelationKind> get usedNameKinds {
     _usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _IndexRelationKindReader()).vTableGet(_bp, 10, const <idl.IndexRelationKind>[]);
     return _usedNameKinds;
@@ -2146,6 +2630,7 @@
     if (usedElementLengths.isNotEmpty) _result["usedElementLengths"] = usedElementLengths;
     if (usedElementOffsets.isNotEmpty) _result["usedElementOffsets"] = usedElementOffsets;
     if (usedElements.isNotEmpty) _result["usedElements"] = usedElements;
+    if (usedNameIsQualifiedFlags.isNotEmpty) _result["usedNameIsQualifiedFlags"] = usedNameIsQualifiedFlags;
     if (usedNameKinds.isNotEmpty) _result["usedNameKinds"] = usedNameKinds.map((_value) => _value.toString().split('.')[1]).toList();
     if (usedNameOffsets.isNotEmpty) _result["usedNameOffsets"] = usedNameOffsets;
     if (usedNames.isNotEmpty) _result["usedNames"] = usedNames;
@@ -2163,6 +2648,7 @@
     "usedElementLengths": usedElementLengths,
     "usedElementOffsets": usedElementOffsets,
     "usedElements": usedElements,
+    "usedNameIsQualifiedFlags": usedNameIsQualifiedFlags,
     "usedNameKinds": usedNameKinds,
     "usedNameOffsets": usedNameOffsets,
     "usedNames": usedNames,
@@ -2176,6 +2662,7 @@
   bool _finished = false;
 
   List<UnlinkedConstBuilder> _annotations;
+  CodeRangeBuilder _codeRange;
   UnlinkedDocumentationCommentBuilder _documentationComment;
   List<UnlinkedExecutableBuilder> _executables;
   List<UnlinkedVariableBuilder> _fields;
@@ -2201,6 +2688,17 @@
   }
 
   @override
+  CodeRangeBuilder get codeRange => _codeRange;
+
+  /**
+   * Code range of the class.
+   */
+  void set codeRange(CodeRangeBuilder _value) {
+    assert(!_finished);
+    _codeRange = _value;
+  }
+
+  @override
   UnlinkedDocumentationCommentBuilder get documentationComment => _documentationComment;
 
   /**
@@ -2337,8 +2835,9 @@
     _typeParameters = _value;
   }
 
-  UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumentationCommentBuilder documentationComment, List<UnlinkedExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, bool hasNoSupertype, List<EntityRefBuilder> interfaces, bool isAbstract, bool isMixinApplication, List<EntityRefBuilder> mixins, String name, int nameOffset, EntityRefBuilder supertype, List<UnlinkedTypeParamBuilder> typeParameters})
+  UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, List<UnlinkedExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, bool hasNoSupertype, List<EntityRefBuilder> interfaces, bool isAbstract, bool isMixinApplication, List<EntityRefBuilder> mixins, String name, int nameOffset, EntityRefBuilder supertype, List<UnlinkedTypeParamBuilder> typeParameters})
     : _annotations = annotations,
+      _codeRange = codeRange,
       _documentationComment = documentationComment,
       _executables = executables,
       _fields = fields,
@@ -2352,10 +2851,27 @@
       _supertype = supertype,
       _typeParameters = typeParameters;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _codeRange = null;
+    _documentationComment = null;
+    _executables?.forEach((b) => b.flushInformative());
+    _fields?.forEach((b) => b.flushInformative());
+    _interfaces?.forEach((b) => b.flushInformative());
+    _mixins?.forEach((b) => b.flushInformative());
+    _nameOffset = null;
+    _supertype?.flushInformative();
+    _typeParameters?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
     fb.Offset offset_annotations;
+    fb.Offset offset_codeRange;
     fb.Offset offset_documentationComment;
     fb.Offset offset_executables;
     fb.Offset offset_fields;
@@ -2367,6 +2883,9 @@
     if (!(_annotations == null || _annotations.isEmpty)) {
       offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_codeRange != null) {
+      offset_codeRange = _codeRange.finish(fbBuilder);
+    }
     if (_documentationComment != null) {
       offset_documentationComment = _documentationComment.finish(fbBuilder);
     }
@@ -2395,6 +2914,9 @@
     if (offset_annotations != null) {
       fbBuilder.addOffset(5, offset_annotations);
     }
+    if (offset_codeRange != null) {
+      fbBuilder.addOffset(13, offset_codeRange);
+    }
     if (offset_documentationComment != null) {
       fbBuilder.addOffset(6, offset_documentationComment);
     }
@@ -2448,6 +2970,7 @@
   _UnlinkedClassImpl(this._bp);
 
   List<idl.UnlinkedConst> _annotations;
+  idl.CodeRange _codeRange;
   idl.UnlinkedDocumentationComment _documentationComment;
   List<idl.UnlinkedExecutable> _executables;
   List<idl.UnlinkedVariable> _fields;
@@ -2468,6 +2991,12 @@
   }
 
   @override
+  idl.CodeRange get codeRange {
+    _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 13, null);
+    return _codeRange;
+  }
+
+  @override
   idl.UnlinkedDocumentationComment get documentationComment {
     _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 6, null);
     return _documentationComment;
@@ -2545,6 +3074,7 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+    if (codeRange != null) _result["codeRange"] = codeRange.toJson();
     if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
     if (executables.isNotEmpty) _result["executables"] = executables.map((_value) => _value.toJson()).toList();
     if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJson()).toList();
@@ -2563,6 +3093,7 @@
   @override
   Map<String, Object> toMap() => {
     "annotations": annotations,
+    "codeRange": codeRange,
     "documentationComment": documentationComment,
     "executables": executables,
     "fields": fields,
@@ -2643,6 +3174,14 @@
       _offset = offset,
       _shows = shows;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _end = null;
+    _offset = null;
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -2739,14 +3278,26 @@
 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements idl.UnlinkedConst {
   bool _finished = false;
 
+  List<idl.UnlinkedExprAssignOperator> _assignmentOperators;
   List<double> _doubles;
   List<int> _ints;
-  bool _isInvalid;
+  bool _isValidConst;
   List<idl.UnlinkedConstOperation> _operations;
   List<EntityRefBuilder> _references;
   List<String> _strings;
 
   @override
+  List<idl.UnlinkedExprAssignOperator> get assignmentOperators => _assignmentOperators ??= <idl.UnlinkedExprAssignOperator>[];
+
+  /**
+   * Sequence of operators used by assignment operations.
+   */
+  void set assignmentOperators(List<idl.UnlinkedExprAssignOperator> _value) {
+    assert(!_finished);
+    _assignmentOperators = _value;
+  }
+
+  @override
   List<double> get doubles => _doubles ??= <double>[];
 
   /**
@@ -2772,15 +3323,15 @@
   }
 
   @override
-  bool get isInvalid => _isInvalid ??= false;
+  bool get isValidConst => _isValidConst ??= false;
 
   /**
-   * Indicates whether the expression is not a valid potentially constant
+   * Indicates whether the expression is a valid potentially constant
    * expression.
    */
-  void set isInvalid(bool _value) {
+  void set isValidConst(bool _value) {
     assert(!_finished);
-    _isInvalid = _value;
+    _isValidConst = _value;
   }
 
   @override
@@ -2821,22 +3372,34 @@
     _strings = _value;
   }
 
-  UnlinkedConstBuilder({List<double> doubles, List<int> ints, bool isInvalid, List<idl.UnlinkedConstOperation> operations, List<EntityRefBuilder> references, List<String> strings})
-    : _doubles = doubles,
+  UnlinkedConstBuilder({List<idl.UnlinkedExprAssignOperator> assignmentOperators, List<double> doubles, List<int> ints, bool isValidConst, List<idl.UnlinkedConstOperation> operations, List<EntityRefBuilder> references, List<String> strings})
+    : _assignmentOperators = assignmentOperators,
+      _doubles = doubles,
       _ints = ints,
-      _isInvalid = isInvalid,
+      _isValidConst = isValidConst,
       _operations = operations,
       _references = references,
       _strings = strings;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _references?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
+    fb.Offset offset_assignmentOperators;
     fb.Offset offset_doubles;
     fb.Offset offset_ints;
     fb.Offset offset_operations;
     fb.Offset offset_references;
     fb.Offset offset_strings;
+    if (!(_assignmentOperators == null || _assignmentOperators.isEmpty)) {
+      offset_assignmentOperators = fbBuilder.writeListUint8(_assignmentOperators.map((b) => b.index).toList());
+    }
     if (!(_doubles == null || _doubles.isEmpty)) {
       offset_doubles = fbBuilder.writeListFloat64(_doubles);
     }
@@ -2853,13 +3416,16 @@
       offset_strings = fbBuilder.writeList(_strings.map((b) => fbBuilder.writeString(b)).toList());
     }
     fbBuilder.startTable();
+    if (offset_assignmentOperators != null) {
+      fbBuilder.addOffset(6, offset_assignmentOperators);
+    }
     if (offset_doubles != null) {
       fbBuilder.addOffset(4, offset_doubles);
     }
     if (offset_ints != null) {
       fbBuilder.addOffset(1, offset_ints);
     }
-    if (_isInvalid == true) {
+    if (_isValidConst == true) {
       fbBuilder.addBool(5, true);
     }
     if (offset_operations != null) {
@@ -2887,14 +3453,21 @@
 
   _UnlinkedConstImpl(this._bp);
 
+  List<idl.UnlinkedExprAssignOperator> _assignmentOperators;
   List<double> _doubles;
   List<int> _ints;
-  bool _isInvalid;
+  bool _isValidConst;
   List<idl.UnlinkedConstOperation> _operations;
   List<idl.EntityRef> _references;
   List<String> _strings;
 
   @override
+  List<idl.UnlinkedExprAssignOperator> get assignmentOperators {
+    _assignmentOperators ??= const fb.ListReader<idl.UnlinkedExprAssignOperator>(const _UnlinkedExprAssignOperatorReader()).vTableGet(_bp, 6, const <idl.UnlinkedExprAssignOperator>[]);
+    return _assignmentOperators;
+  }
+
+  @override
   List<double> get doubles {
     _doubles ??= const fb.Float64ListReader().vTableGet(_bp, 4, const <double>[]);
     return _doubles;
@@ -2907,9 +3480,9 @@
   }
 
   @override
-  bool get isInvalid {
-    _isInvalid ??= const fb.BoolReader().vTableGet(_bp, 5, false);
-    return _isInvalid;
+  bool get isValidConst {
+    _isValidConst ??= const fb.BoolReader().vTableGet(_bp, 5, false);
+    return _isValidConst;
   }
 
   @override
@@ -2935,9 +3508,10 @@
   @override
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
+    if (assignmentOperators.isNotEmpty) _result["assignmentOperators"] = assignmentOperators.map((_value) => _value.toString().split('.')[1]).toList();
     if (doubles.isNotEmpty) _result["doubles"] = doubles.map((_value) => _value.isFinite ? _value : _value.toString()).toList();
     if (ints.isNotEmpty) _result["ints"] = ints;
-    if (isInvalid != false) _result["isInvalid"] = isInvalid;
+    if (isValidConst != false) _result["isValidConst"] = isValidConst;
     if (operations.isNotEmpty) _result["operations"] = operations.map((_value) => _value.toString().split('.')[1]).toList();
     if (references.isNotEmpty) _result["references"] = references.map((_value) => _value.toJson()).toList();
     if (strings.isNotEmpty) _result["strings"] = strings;
@@ -2946,9 +3520,10 @@
 
   @override
   Map<String, Object> toMap() => {
+    "assignmentOperators": assignmentOperators,
     "doubles": doubles,
     "ints": ints,
-    "isInvalid": isInvalid,
+    "isValidConst": isValidConst,
     "operations": operations,
     "references": references,
     "strings": strings,
@@ -3021,6 +3596,14 @@
       _kind = kind,
       _name = name;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _arguments?.forEach((b) => b.flushInformative());
+    _expression?.flushInformative();
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -3169,6 +3752,12 @@
       _offset = offset,
       _text = text;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -3250,6 +3839,7 @@
   bool _finished = false;
 
   List<UnlinkedConstBuilder> _annotations;
+  CodeRangeBuilder _codeRange;
   UnlinkedDocumentationCommentBuilder _documentationComment;
   String _name;
   int _nameOffset;
@@ -3267,6 +3857,17 @@
   }
 
   @override
+  CodeRangeBuilder get codeRange => _codeRange;
+
+  /**
+   * Code range of the enum.
+   */
+  void set codeRange(CodeRangeBuilder _value) {
+    assert(!_finished);
+    _codeRange = _value;
+  }
+
+  @override
   UnlinkedDocumentationCommentBuilder get documentationComment => _documentationComment;
 
   /**
@@ -3312,23 +3913,39 @@
     _values = _value;
   }
 
-  UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumentationCommentBuilder documentationComment, String name, int nameOffset, List<UnlinkedEnumValueBuilder> values})
+  UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String name, int nameOffset, List<UnlinkedEnumValueBuilder> values})
     : _annotations = annotations,
+      _codeRange = codeRange,
       _documentationComment = documentationComment,
       _name = name,
       _nameOffset = nameOffset,
       _values = values;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _codeRange = null;
+    _documentationComment = null;
+    _nameOffset = null;
+    _values?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
     fb.Offset offset_annotations;
+    fb.Offset offset_codeRange;
     fb.Offset offset_documentationComment;
     fb.Offset offset_name;
     fb.Offset offset_values;
     if (!(_annotations == null || _annotations.isEmpty)) {
       offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_codeRange != null) {
+      offset_codeRange = _codeRange.finish(fbBuilder);
+    }
     if (_documentationComment != null) {
       offset_documentationComment = _documentationComment.finish(fbBuilder);
     }
@@ -3342,6 +3959,9 @@
     if (offset_annotations != null) {
       fbBuilder.addOffset(4, offset_annotations);
     }
+    if (offset_codeRange != null) {
+      fbBuilder.addOffset(5, offset_codeRange);
+    }
     if (offset_documentationComment != null) {
       fbBuilder.addOffset(3, offset_documentationComment);
     }
@@ -3371,6 +3991,7 @@
   _UnlinkedEnumImpl(this._bp);
 
   List<idl.UnlinkedConst> _annotations;
+  idl.CodeRange _codeRange;
   idl.UnlinkedDocumentationComment _documentationComment;
   String _name;
   int _nameOffset;
@@ -3383,6 +4004,12 @@
   }
 
   @override
+  idl.CodeRange get codeRange {
+    _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 5, null);
+    return _codeRange;
+  }
+
+  @override
   idl.UnlinkedDocumentationComment get documentationComment {
     _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 3, null);
     return _documentationComment;
@@ -3412,6 +4039,7 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+    if (codeRange != null) _result["codeRange"] = codeRange.toJson();
     if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
     if (name != '') _result["name"] = name;
     if (nameOffset != 0) _result["nameOffset"] = nameOffset;
@@ -3422,6 +4050,7 @@
   @override
   Map<String, Object> toMap() => {
     "annotations": annotations,
+    "codeRange": codeRange,
     "documentationComment": documentationComment,
     "name": name,
     "nameOffset": nameOffset,
@@ -3479,6 +4108,14 @@
       _name = name,
       _nameOffset = nameOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _documentationComment = null;
+    _nameOffset = null;
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -3564,7 +4201,9 @@
   bool _finished = false;
 
   List<UnlinkedConstBuilder> _annotations;
+  CodeRangeBuilder _codeRange;
   List<UnlinkedConstructorInitializerBuilder> _constantInitializers;
+  int _constCycleSlot;
   UnlinkedDocumentationCommentBuilder _documentationComment;
   int _inferredReturnTypeSlot;
   bool _isAbstract;
@@ -3601,6 +4240,17 @@
   }
 
   @override
+  CodeRangeBuilder get codeRange => _codeRange;
+
+  /**
+   * Code range of the executable.
+   */
+  void set codeRange(CodeRangeBuilder _value) {
+    assert(!_finished);
+    _codeRange = _value;
+  }
+
+  @override
   List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _constantInitializers ??= <UnlinkedConstructorInitializerBuilder>[];
 
   /**
@@ -3613,6 +4263,23 @@
   }
 
   @override
+  int get constCycleSlot => _constCycleSlot ??= 0;
+
+  /**
+   * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`,
+   * a nonzero slot id which is unique within this compilation unit.  If this id
+   * is found in [LinkedUnit.constCycles], then this constructor is part of a
+   * cycle.
+   *
+   * Otherwise, zero.
+   */
+  void set constCycleSlot(int _value) {
+    assert(!_finished);
+    assert(_value == null || _value >= 0);
+    _constCycleSlot = _value;
+  }
+
+  @override
   UnlinkedDocumentationCommentBuilder get documentationComment => _documentationComment;
 
   /**
@@ -3898,9 +4565,11 @@
     _visibleOffset = _value;
   }
 
-  UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, List<UnlinkedConstructorInitializerBuilder> constantInitializers, UnlinkedDocumentationCommentBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bool isConst, bool isExternal, bool isFactory, bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutableKind kind, List<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBuilder> localLabels, List<UnlinkedVariableBuilder> localVariables, String name, int nameEnd, int nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffset, EntityRefBuilder redirectedConstructor, String redirectedConstructorName, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters, int visibleLength, int visibleOffset})
+  UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, List<UnlinkedConstructorInitializerBuilder> constantInitializers, int constCycleSlot, UnlinkedDocumentationCommentBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bool isConst, bool isExternal, bool isFactory, bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutableKind kind, List<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBuilder> localLabels, List<UnlinkedVariableBuilder> localVariables, String name, int nameEnd, int nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffset, EntityRefBuilder redirectedConstructor, String redirectedConstructorName, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters, int visibleLength, int visibleOffset})
     : _annotations = annotations,
+      _codeRange = codeRange,
       _constantInitializers = constantInitializers,
+      _constCycleSlot = constCycleSlot,
       _documentationComment = documentationComment,
       _inferredReturnTypeSlot = inferredReturnTypeSlot,
       _isAbstract = isAbstract,
@@ -3925,10 +4594,31 @@
       _visibleLength = visibleLength,
       _visibleOffset = visibleOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _codeRange = null;
+    _constantInitializers?.forEach((b) => b.flushInformative());
+    _documentationComment = null;
+    _localFunctions = null;
+    _localLabels = null;
+    _localVariables = null;
+    _nameEnd = null;
+    _nameOffset = null;
+    _parameters?.forEach((b) => b.flushInformative());
+    _periodOffset = null;
+    _redirectedConstructor?.flushInformative();
+    _returnType?.flushInformative();
+    _typeParameters?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
     fb.Offset offset_annotations;
+    fb.Offset offset_codeRange;
     fb.Offset offset_constantInitializers;
     fb.Offset offset_documentationComment;
     fb.Offset offset_localFunctions;
@@ -3943,6 +4633,9 @@
     if (!(_annotations == null || _annotations.isEmpty)) {
       offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_codeRange != null) {
+      offset_codeRange = _codeRange.finish(fbBuilder);
+    }
     if (!(_constantInitializers == null || _constantInitializers.isEmpty)) {
       offset_constantInitializers = fbBuilder.writeList(_constantInitializers.map((b) => b.finish(fbBuilder)).toList());
     }
@@ -3980,9 +4673,15 @@
     if (offset_annotations != null) {
       fbBuilder.addOffset(6, offset_annotations);
     }
+    if (offset_codeRange != null) {
+      fbBuilder.addOffset(26, offset_codeRange);
+    }
     if (offset_constantInitializers != null) {
       fbBuilder.addOffset(14, offset_constantInitializers);
     }
+    if (_constCycleSlot != null && _constCycleSlot != 0) {
+      fbBuilder.addUint32(25, _constCycleSlot);
+    }
     if (offset_documentationComment != null) {
       fbBuilder.addOffset(7, offset_documentationComment);
     }
@@ -4069,7 +4768,9 @@
   _UnlinkedExecutableImpl(this._bp);
 
   List<idl.UnlinkedConst> _annotations;
+  idl.CodeRange _codeRange;
   List<idl.UnlinkedConstructorInitializer> _constantInitializers;
+  int _constCycleSlot;
   idl.UnlinkedDocumentationComment _documentationComment;
   int _inferredReturnTypeSlot;
   bool _isAbstract;
@@ -4101,12 +4802,24 @@
   }
 
   @override
+  idl.CodeRange get codeRange {
+    _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 26, null);
+    return _codeRange;
+  }
+
+  @override
   List<idl.UnlinkedConstructorInitializer> get constantInitializers {
     _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitializer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <idl.UnlinkedConstructorInitializer>[]);
     return _constantInitializers;
   }
 
   @override
+  int get constCycleSlot {
+    _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0);
+    return _constCycleSlot;
+  }
+
+  @override
   idl.UnlinkedDocumentationComment get documentationComment {
     _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 7, null);
     return _documentationComment;
@@ -4250,7 +4963,9 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+    if (codeRange != null) _result["codeRange"] = codeRange.toJson();
     if (constantInitializers.isNotEmpty) _result["constantInitializers"] = constantInitializers.map((_value) => _value.toJson()).toList();
+    if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot;
     if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
     if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferredReturnTypeSlot;
     if (isAbstract != false) _result["isAbstract"] = isAbstract;
@@ -4280,7 +4995,9 @@
   @override
   Map<String, Object> toMap() => {
     "annotations": annotations,
+    "codeRange": codeRange,
     "constantInitializers": constantInitializers,
+    "constCycleSlot": constCycleSlot,
     "documentationComment": documentationComment,
     "inferredReturnTypeSlot": inferredReturnTypeSlot,
     "isAbstract": isAbstract,
@@ -4373,6 +5090,16 @@
       _uriEnd = uriEnd,
       _uriOffset = uriOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _offset = null;
+    _uriEnd = null;
+    _uriOffset = null;
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -4494,6 +5221,13 @@
     : _combinators = combinators,
       _uri = uri;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _combinators?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -4711,6 +5445,18 @@
       _uriEnd = uriEnd,
       _uriOffset = uriOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _combinators?.forEach((b) => b.flushInformative());
+    _offset = null;
+    _prefixOffset = null;
+    _uriEnd = null;
+    _uriOffset = null;
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -4940,6 +5686,13 @@
       _name = name,
       _nameOffset = nameOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _nameOffset = null;
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -5033,6 +5786,7 @@
   bool _finished = false;
 
   List<UnlinkedConstBuilder> _annotations;
+  CodeRangeBuilder _codeRange;
   UnlinkedConstBuilder _defaultValue;
   String _defaultValueCode;
   int _inferredTypeSlot;
@@ -5059,6 +5813,17 @@
   }
 
   @override
+  CodeRangeBuilder get codeRange => _codeRange;
+
+  /**
+   * Code range of the parameter.
+   */
+  void set codeRange(CodeRangeBuilder _value) {
+    assert(!_finished);
+    _codeRange = _value;
+  }
+
+  @override
   UnlinkedConstBuilder get defaultValue => _defaultValue;
 
   /**
@@ -5220,8 +5985,9 @@
     _visibleOffset = _value;
   }
 
-  UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBuilder defaultValue, String defaultValueCode, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
+  UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedConstBuilder defaultValue, String defaultValueCode, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
     : _annotations = annotations,
+      _codeRange = codeRange,
       _defaultValue = defaultValue,
       _defaultValueCode = defaultValueCode,
       _inferredTypeSlot = inferredTypeSlot,
@@ -5236,10 +6002,25 @@
       _visibleLength = visibleLength,
       _visibleOffset = visibleOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _codeRange = null;
+    _defaultValue?.flushInformative();
+    _defaultValueCode = null;
+    _initializer?.flushInformative();
+    _nameOffset = null;
+    _parameters?.forEach((b) => b.flushInformative());
+    _type?.flushInformative();
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
     fb.Offset offset_annotations;
+    fb.Offset offset_codeRange;
     fb.Offset offset_defaultValue;
     fb.Offset offset_defaultValueCode;
     fb.Offset offset_initializer;
@@ -5249,6 +6030,9 @@
     if (!(_annotations == null || _annotations.isEmpty)) {
       offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_codeRange != null) {
+      offset_codeRange = _codeRange.finish(fbBuilder);
+    }
     if (_defaultValue != null) {
       offset_defaultValue = _defaultValue.finish(fbBuilder);
     }
@@ -5271,6 +6055,9 @@
     if (offset_annotations != null) {
       fbBuilder.addOffset(9, offset_annotations);
     }
+    if (offset_codeRange != null) {
+      fbBuilder.addOffset(14, offset_codeRange);
+    }
     if (offset_defaultValue != null) {
       fbBuilder.addOffset(7, offset_defaultValue);
     }
@@ -5327,6 +6114,7 @@
   _UnlinkedParamImpl(this._bp);
 
   List<idl.UnlinkedConst> _annotations;
+  idl.CodeRange _codeRange;
   idl.UnlinkedConst _defaultValue;
   String _defaultValueCode;
   int _inferredTypeSlot;
@@ -5348,6 +6136,12 @@
   }
 
   @override
+  idl.CodeRange get codeRange {
+    _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null);
+    return _codeRange;
+  }
+
+  @override
   idl.UnlinkedConst get defaultValue {
     _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 7, null);
     return _defaultValue;
@@ -5431,6 +6225,7 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+    if (codeRange != null) _result["codeRange"] = codeRange.toJson();
     if (defaultValue != null) _result["defaultValue"] = defaultValue.toJson();
     if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode;
     if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
@@ -5450,6 +6245,7 @@
   @override
   Map<String, Object> toMap() => {
     "annotations": annotations,
+    "codeRange": codeRange,
     "defaultValue": defaultValue,
     "defaultValueCode": defaultValueCode,
     "inferredTypeSlot": inferredTypeSlot,
@@ -5518,6 +6314,15 @@
       _uriEnd = uriEnd,
       _uriOffset = uriOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _uriEnd = null;
+    _uriOffset = null;
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -5660,6 +6465,13 @@
       _name = name,
       _numTypeParameters = numTypeParameters;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _members?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -5801,6 +6613,14 @@
       _names = names,
       _parts = parts;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _exports?.forEach((b) => b.flushInformative());
+    _names?.forEach((b) => b.flushInformative());
+  }
+
   List<int> toBuffer() {
     fb.Builder fbBuilder = new fb.Builder();
     return fbBuilder.finish(finish(fbBuilder), "UPNS");
@@ -5936,6 +6756,12 @@
     : _name = name,
       _prefixReference = prefixReference;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
@@ -6005,6 +6831,7 @@
   bool _finished = false;
 
   List<UnlinkedConstBuilder> _annotations;
+  CodeRangeBuilder _codeRange;
   UnlinkedDocumentationCommentBuilder _documentationComment;
   String _name;
   int _nameOffset;
@@ -6024,6 +6851,17 @@
   }
 
   @override
+  CodeRangeBuilder get codeRange => _codeRange;
+
+  /**
+   * Code range of the typedef.
+   */
+  void set codeRange(CodeRangeBuilder _value) {
+    assert(!_finished);
+    _codeRange = _value;
+  }
+
+  @override
   UnlinkedDocumentationCommentBuilder get documentationComment => _documentationComment;
 
   /**
@@ -6091,8 +6929,9 @@
     _typeParameters = _value;
   }
 
-  UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumentationCommentBuilder documentationComment, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters})
+  UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters})
     : _annotations = annotations,
+      _codeRange = codeRange,
       _documentationComment = documentationComment,
       _name = name,
       _nameOffset = nameOffset,
@@ -6100,10 +6939,24 @@
       _returnType = returnType,
       _typeParameters = typeParameters;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _codeRange = null;
+    _documentationComment = null;
+    _nameOffset = null;
+    _parameters?.forEach((b) => b.flushInformative());
+    _returnType?.flushInformative();
+    _typeParameters?.forEach((b) => b.flushInformative());
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
     fb.Offset offset_annotations;
+    fb.Offset offset_codeRange;
     fb.Offset offset_documentationComment;
     fb.Offset offset_name;
     fb.Offset offset_parameters;
@@ -6112,6 +6965,9 @@
     if (!(_annotations == null || _annotations.isEmpty)) {
       offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_codeRange != null) {
+      offset_codeRange = _codeRange.finish(fbBuilder);
+    }
     if (_documentationComment != null) {
       offset_documentationComment = _documentationComment.finish(fbBuilder);
     }
@@ -6131,6 +6987,9 @@
     if (offset_annotations != null) {
       fbBuilder.addOffset(4, offset_annotations);
     }
+    if (offset_codeRange != null) {
+      fbBuilder.addOffset(7, offset_codeRange);
+    }
     if (offset_documentationComment != null) {
       fbBuilder.addOffset(6, offset_documentationComment);
     }
@@ -6166,6 +7025,7 @@
   _UnlinkedTypedefImpl(this._bp);
 
   List<idl.UnlinkedConst> _annotations;
+  idl.CodeRange _codeRange;
   idl.UnlinkedDocumentationComment _documentationComment;
   String _name;
   int _nameOffset;
@@ -6180,6 +7040,12 @@
   }
 
   @override
+  idl.CodeRange get codeRange {
+    _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 7, null);
+    return _codeRange;
+  }
+
+  @override
   idl.UnlinkedDocumentationComment get documentationComment {
     _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 6, null);
     return _documentationComment;
@@ -6221,6 +7087,7 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+    if (codeRange != null) _result["codeRange"] = codeRange.toJson();
     if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
     if (name != '') _result["name"] = name;
     if (nameOffset != 0) _result["nameOffset"] = nameOffset;
@@ -6233,6 +7100,7 @@
   @override
   Map<String, Object> toMap() => {
     "annotations": annotations,
+    "codeRange": codeRange,
     "documentationComment": documentationComment,
     "name": name,
     "nameOffset": nameOffset,
@@ -6250,6 +7118,7 @@
 
   List<UnlinkedConstBuilder> _annotations;
   EntityRefBuilder _bound;
+  CodeRangeBuilder _codeRange;
   String _name;
   int _nameOffset;
 
@@ -6277,6 +7146,17 @@
   }
 
   @override
+  CodeRangeBuilder get codeRange => _codeRange;
+
+  /**
+   * Code range of the type parameter.
+   */
+  void set codeRange(CodeRangeBuilder _value) {
+    assert(!_finished);
+    _codeRange = _value;
+  }
+
+  @override
   String get name => _name ??= '';
 
   /**
@@ -6299,17 +7179,29 @@
     _nameOffset = _value;
   }
 
-  UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBuilder bound, String name, int nameOffset})
+  UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBuilder bound, CodeRangeBuilder codeRange, String name, int nameOffset})
     : _annotations = annotations,
       _bound = bound,
+      _codeRange = codeRange,
       _name = name,
       _nameOffset = nameOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _bound?.flushInformative();
+    _codeRange = null;
+    _nameOffset = null;
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
     fb.Offset offset_annotations;
     fb.Offset offset_bound;
+    fb.Offset offset_codeRange;
     fb.Offset offset_name;
     if (!(_annotations == null || _annotations.isEmpty)) {
       offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(fbBuilder)).toList());
@@ -6317,6 +7209,9 @@
     if (_bound != null) {
       offset_bound = _bound.finish(fbBuilder);
     }
+    if (_codeRange != null) {
+      offset_codeRange = _codeRange.finish(fbBuilder);
+    }
     if (_name != null) {
       offset_name = fbBuilder.writeString(_name);
     }
@@ -6327,6 +7222,9 @@
     if (offset_bound != null) {
       fbBuilder.addOffset(2, offset_bound);
     }
+    if (offset_codeRange != null) {
+      fbBuilder.addOffset(4, offset_codeRange);
+    }
     if (offset_name != null) {
       fbBuilder.addOffset(0, offset_name);
     }
@@ -6351,6 +7249,7 @@
 
   List<idl.UnlinkedConst> _annotations;
   idl.EntityRef _bound;
+  idl.CodeRange _codeRange;
   String _name;
   int _nameOffset;
 
@@ -6367,6 +7266,12 @@
   }
 
   @override
+  idl.CodeRange get codeRange {
+    _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 4, null);
+    return _codeRange;
+  }
+
+  @override
   String get name {
     _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
     return _name;
@@ -6385,6 +7290,7 @@
     Map<String, Object> _result = <String, Object>{};
     if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
     if (bound != null) _result["bound"] = bound.toJson();
+    if (codeRange != null) _result["codeRange"] = codeRange.toJson();
     if (name != '') _result["name"] = name;
     if (nameOffset != 0) _result["nameOffset"] = nameOffset;
     return _result;
@@ -6394,6 +7300,7 @@
   Map<String, Object> toMap() => {
     "annotations": annotations,
     "bound": bound,
+    "codeRange": codeRange,
     "name": name,
     "nameOffset": nameOffset,
   };
@@ -6406,9 +7313,11 @@
   bool _finished = false;
 
   List<UnlinkedClassBuilder> _classes;
+  CodeRangeBuilder _codeRange;
   List<UnlinkedEnumBuilder> _enums;
   List<UnlinkedExecutableBuilder> _executables;
   List<UnlinkedExportNonPublicBuilder> _exports;
+  String _fallbackModePath;
   List<UnlinkedImportBuilder> _imports;
   List<UnlinkedConstBuilder> _libraryAnnotations;
   UnlinkedDocumentationCommentBuilder _libraryDocumentationComment;
@@ -6433,6 +7342,17 @@
   }
 
   @override
+  CodeRangeBuilder get codeRange => _codeRange;
+
+  /**
+   * Code range of the unit.
+   */
+  void set codeRange(CodeRangeBuilder _value) {
+    assert(!_finished);
+    _codeRange = _value;
+  }
+
+  @override
   List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[];
 
   /**
@@ -6467,6 +7387,21 @@
   }
 
   @override
+  String get fallbackModePath => _fallbackModePath ??= '';
+
+  /**
+   * If this compilation unit was summarized in fallback mode, the path where
+   * the compilation unit may be found on disk.  Otherwise empty.
+   *
+   * When this field is non-empty, all other fields in the data structure have
+   * their default values.
+   */
+  void set fallbackModePath(String _value) {
+    assert(!_finished);
+    _fallbackModePath = _value;
+  }
+
+  @override
   List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder>[];
 
   /**
@@ -6597,11 +7532,13 @@
     _variables = _value;
   }
 
-  UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, List<UnlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryName, int libraryNameLength, int libraryNameOffset, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables})
+  UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, CodeRangeBuilder codeRange, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, String fallbackModePath, List<UnlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryName, int libraryNameLength, int libraryNameOffset, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables})
     : _classes = classes,
+      _codeRange = codeRange,
       _enums = enums,
       _executables = executables,
       _exports = exports,
+      _fallbackModePath = fallbackModePath,
       _imports = imports,
       _libraryAnnotations = libraryAnnotations,
       _libraryDocumentationComment = libraryDocumentationComment,
@@ -6614,6 +7551,27 @@
       _typedefs = typedefs,
       _variables = variables;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _classes?.forEach((b) => b.flushInformative());
+    _codeRange = null;
+    _enums?.forEach((b) => b.flushInformative());
+    _executables?.forEach((b) => b.flushInformative());
+    _exports?.forEach((b) => b.flushInformative());
+    _imports?.forEach((b) => b.flushInformative());
+    _libraryAnnotations?.forEach((b) => b.flushInformative());
+    _libraryDocumentationComment = null;
+    _libraryNameLength = null;
+    _libraryNameOffset = null;
+    _parts?.forEach((b) => b.flushInformative());
+    _publicNamespace?.flushInformative();
+    _references?.forEach((b) => b.flushInformative());
+    _typedefs?.forEach((b) => b.flushInformative());
+    _variables?.forEach((b) => b.flushInformative());
+  }
+
   List<int> toBuffer() {
     fb.Builder fbBuilder = new fb.Builder();
     return fbBuilder.finish(finish(fbBuilder), "UUnt");
@@ -6623,9 +7581,11 @@
     assert(!_finished);
     _finished = true;
     fb.Offset offset_classes;
+    fb.Offset offset_codeRange;
     fb.Offset offset_enums;
     fb.Offset offset_executables;
     fb.Offset offset_exports;
+    fb.Offset offset_fallbackModePath;
     fb.Offset offset_imports;
     fb.Offset offset_libraryAnnotations;
     fb.Offset offset_libraryDocumentationComment;
@@ -6638,6 +7598,9 @@
     if (!(_classes == null || _classes.isEmpty)) {
       offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_codeRange != null) {
+      offset_codeRange = _codeRange.finish(fbBuilder);
+    }
     if (!(_enums == null || _enums.isEmpty)) {
       offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).toList());
     }
@@ -6647,6 +7610,9 @@
     if (!(_exports == null || _exports.isEmpty)) {
       offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_fallbackModePath != null) {
+      offset_fallbackModePath = fbBuilder.writeString(_fallbackModePath);
+    }
     if (!(_imports == null || _imports.isEmpty)) {
       offset_imports = fbBuilder.writeList(_imports.map((b) => b.finish(fbBuilder)).toList());
     }
@@ -6678,6 +7644,9 @@
     if (offset_classes != null) {
       fbBuilder.addOffset(2, offset_classes);
     }
+    if (offset_codeRange != null) {
+      fbBuilder.addOffset(15, offset_codeRange);
+    }
     if (offset_enums != null) {
       fbBuilder.addOffset(12, offset_enums);
     }
@@ -6687,6 +7656,9 @@
     if (offset_exports != null) {
       fbBuilder.addOffset(13, offset_exports);
     }
+    if (offset_fallbackModePath != null) {
+      fbBuilder.addOffset(16, offset_fallbackModePath);
+    }
     if (offset_imports != null) {
       fbBuilder.addOffset(5, offset_imports);
     }
@@ -6742,9 +7714,11 @@
   _UnlinkedUnitImpl(this._bp);
 
   List<idl.UnlinkedClass> _classes;
+  idl.CodeRange _codeRange;
   List<idl.UnlinkedEnum> _enums;
   List<idl.UnlinkedExecutable> _executables;
   List<idl.UnlinkedExportNonPublic> _exports;
+  String _fallbackModePath;
   List<idl.UnlinkedImport> _imports;
   List<idl.UnlinkedConst> _libraryAnnotations;
   idl.UnlinkedDocumentationComment _libraryDocumentationComment;
@@ -6764,6 +7738,12 @@
   }
 
   @override
+  idl.CodeRange get codeRange {
+    _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 15, null);
+    return _codeRange;
+  }
+
+  @override
   List<idl.UnlinkedEnum> get enums {
     _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()).vTableGet(_bp, 12, const <idl.UnlinkedEnum>[]);
     return _enums;
@@ -6782,6 +7762,12 @@
   }
 
   @override
+  String get fallbackModePath {
+    _fallbackModePath ??= const fb.StringReader().vTableGet(_bp, 16, '');
+    return _fallbackModePath;
+  }
+
+  @override
   List<idl.UnlinkedImport> get imports {
     _imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportReader()).vTableGet(_bp, 5, const <idl.UnlinkedImport>[]);
     return _imports;
@@ -6853,9 +7839,11 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.toJson()).toList();
+    if (codeRange != null) _result["codeRange"] = codeRange.toJson();
     if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson()).toList();
     if (executables.isNotEmpty) _result["executables"] = executables.map((_value) => _value.toJson()).toList();
     if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.toJson()).toList();
+    if (fallbackModePath != '') _result["fallbackModePath"] = fallbackModePath;
     if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.toJson()).toList();
     if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAnnotations.map((_value) => _value.toJson()).toList();
     if (libraryDocumentationComment != null) _result["libraryDocumentationComment"] = libraryDocumentationComment.toJson();
@@ -6873,9 +7861,11 @@
   @override
   Map<String, Object> toMap() => {
     "classes": classes,
+    "codeRange": codeRange,
     "enums": enums,
     "executables": executables,
     "exports": exports,
+    "fallbackModePath": fallbackModePath,
     "imports": imports,
     "libraryAnnotations": libraryAnnotations,
     "libraryDocumentationComment": libraryDocumentationComment,
@@ -6897,6 +7887,7 @@
   bool _finished = false;
 
   List<UnlinkedConstBuilder> _annotations;
+  CodeRangeBuilder _codeRange;
   UnlinkedConstBuilder _constExpr;
   UnlinkedDocumentationCommentBuilder _documentationComment;
   int _inferredTypeSlot;
@@ -6923,6 +7914,17 @@
   }
 
   @override
+  CodeRangeBuilder get codeRange => _codeRange;
+
+  /**
+   * Code range of the variable.
+   */
+  void set codeRange(CodeRangeBuilder _value) {
+    assert(!_finished);
+    _codeRange = _value;
+  }
+
+  @override
   UnlinkedConstBuilder get constExpr => _constExpr;
 
   /**
@@ -7086,8 +8088,9 @@
     _visibleOffset = _value;
   }
 
-  UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuilder documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffset})
+  UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuilder documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffset})
     : _annotations = annotations,
+      _codeRange = codeRange,
       _constExpr = constExpr,
       _documentationComment = documentationComment,
       _inferredTypeSlot = inferredTypeSlot,
@@ -7102,10 +8105,24 @@
       _visibleLength = visibleLength,
       _visibleOffset = visibleOffset;
 
+  /**
+   * Flush [informative] data recursively.
+   */
+  void flushInformative() {
+    _annotations?.forEach((b) => b.flushInformative());
+    _codeRange = null;
+    _constExpr?.flushInformative();
+    _documentationComment = null;
+    _initializer = null;
+    _nameOffset = null;
+    _type?.flushInformative();
+  }
+
   fb.Offset finish(fb.Builder fbBuilder) {
     assert(!_finished);
     _finished = true;
     fb.Offset offset_annotations;
+    fb.Offset offset_codeRange;
     fb.Offset offset_constExpr;
     fb.Offset offset_documentationComment;
     fb.Offset offset_initializer;
@@ -7114,6 +8131,9 @@
     if (!(_annotations == null || _annotations.isEmpty)) {
       offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_codeRange != null) {
+      offset_codeRange = _codeRange.finish(fbBuilder);
+    }
     if (_constExpr != null) {
       offset_constExpr = _constExpr.finish(fbBuilder);
     }
@@ -7133,6 +8153,9 @@
     if (offset_annotations != null) {
       fbBuilder.addOffset(8, offset_annotations);
     }
+    if (offset_codeRange != null) {
+      fbBuilder.addOffset(14, offset_codeRange);
+    }
     if (offset_constExpr != null) {
       fbBuilder.addOffset(5, offset_constExpr);
     }
@@ -7189,6 +8212,7 @@
   _UnlinkedVariableImpl(this._bp);
 
   List<idl.UnlinkedConst> _annotations;
+  idl.CodeRange _codeRange;
   idl.UnlinkedConst _constExpr;
   idl.UnlinkedDocumentationComment _documentationComment;
   int _inferredTypeSlot;
@@ -7210,6 +8234,12 @@
   }
 
   @override
+  idl.CodeRange get codeRange {
+    _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null);
+    return _codeRange;
+  }
+
+  @override
   idl.UnlinkedConst get constExpr {
     _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 5, null);
     return _constExpr;
@@ -7293,6 +8323,7 @@
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
     if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+    if (codeRange != null) _result["codeRange"] = codeRange.toJson();
     if (constExpr != null) _result["constExpr"] = constExpr.toJson();
     if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
     if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
@@ -7312,6 +8343,7 @@
   @override
   Map<String, Object> toMap() => {
     "annotations": annotations,
+    "codeRange": codeRange,
     "constExpr": constExpr,
     "documentationComment": documentationComment,
     "inferredTypeSlot": inferredTypeSlot,
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 63828ff..e7e548c 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -7,6 +7,15 @@
 
 
 /**
+ * Kind of a source in the cache.
+ */
+enum CacheSourceKind : byte {
+  library,
+
+  part
+}
+
+/**
  * Enum used to indicate the kind of a name in index.
  */
 enum IndexNameKind : byte {
@@ -27,6 +36,13 @@
 enum IndexRelationKind : byte {
   /**
    * Left: class.
+   *   Is ancestor of (is extended or implemented, directly or indirectly).
+   * Right: other class declaration.
+   */
+  IS_ANCESTOR_OF,
+
+  /**
+   * Left: class.
    *   Is extended by.
    * Right: other class declaration.
    */
@@ -58,7 +74,28 @@
    *   Is referenced (and not invoked, read/written) at.
    * Right: location.
    */
-  IS_REFERENCED_BY
+  IS_REFERENCED_BY,
+
+  /**
+   * Left: unresolved member name.
+   *   Is read at.
+   * Right: location.
+   */
+  IS_READ_BY,
+
+  /**
+   * Left: unresolved member name.
+   *   Is both read and written at.
+   * Right: location.
+   */
+  IS_READ_WRITTEN_BY,
+
+  /**
+   * Left: unresolved member name.
+   *   Is written at.
+   * Right: location.
+   */
+  IS_WRITTEN_BY
 }
 
 /**
@@ -78,6 +115,11 @@
   constructor,
 
   /**
+   * The synthetic field element.
+   */
+  field,
+
+  /**
    * The synthetic getter of a property introducing element.
    */
   getter,
@@ -85,7 +127,27 @@
   /**
    * The synthetic setter of a property introducing element.
    */
-  setter
+  setter,
+
+  /**
+   * The synthetic top-level variable element.
+   */
+  topLevelVariable,
+
+  /**
+   * The synthetic `loadLibrary` element.
+   */
+  loadLibrary,
+
+  /**
+   * The synthetic `index` getter of an enum.
+   */
+  enumIndex,
+
+  /**
+   * The synthetic `values` getter of an enum.
+   */
+  enumValues
 }
 
 /**
@@ -116,11 +178,6 @@
   method,
 
   /**
-   * The `length` property access.
-   */
-  length,
-
-  /**
    * The entity is a typedef.
    */
   typedef,
@@ -245,6 +302,13 @@
   pushReference,
 
   /**
+   * Pop the top value from the stack, extract the value of the property with
+   * the name obtained from [UnlinkedConst.strings], and push the result back
+   * onto the stack.
+   */
+  extractProperty,
+
+  /**
    * Pop the top `n` values from the stack (where `n` is obtained from
    * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
    * `n` values from [UnlinkedConst.strings] and use the lists of names and
@@ -296,12 +360,6 @@
   makeTypedMap,
 
   /**
-   * Pop the top 2 values from the stack, pass them to the predefined Dart
-   * function `identical`, and push the result back onto the stack.
-   */
-  identical,
-
-  /**
    * Pop the top 2 values from the stack, evaluate `v1 == v2`, and push the
    * result back onto the stack.
    */
@@ -440,10 +498,118 @@
   conditional,
 
   /**
-   * Pop the top value from the stack, evaluate `v.length`, and push the result
-   * back onto the stack.
+   * Pop from the stack `value` and get the next `target` reference from
+   * [UnlinkedConst.references] - a top-level variable (prefixed or not), an
+   * assignable field of a class (prefixed or not), or a sequence of getters
+   * ending with an assignable property `a.b.b.c.d.e`.  In general `a.b` cannot
+   * not be distinguished between: `a` is a prefix and `b` is a top-level
+   * variable; or `a` is an object and `b` is the name of a property.  Perform
+   * `reference op= value` where `op` is the next assignment operator from
+   * [UnlinkedConst.assignmentOperators].  Push `value` back into 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 `target` after/before update is pushed into the
+   * stack instead.
    */
-  length
+  assignToRef,
+
+  /**
+   * Pop from the stack `target` and `value`.  Get the name of the property from
+   * `UnlinkedConst.strings` and assign the `value` to the named property of the
+   * `target`.  This operation is used when we know that the `target` is an
+   * object reference expression, e.g. `new Foo().a.b.c` or `a.b[0].c.d`.
+   * Perform `target.property op= value` where `op` is the next assignment
+   * operator from [UnlinkedConst.assignmentOperators].  Push `value` back into
+   * 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 `target` after/before update is pushed into the
+   * stack instead.
+   */
+  assignToProperty,
+
+  /**
+   * Pop from the stack `index`, `target` and `value`.  Perform
+   * `target[index] op= value`  where `op` is the next assignment operator from
+   * [UnlinkedConst.assignmentOperators].  Push `value` back into 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 `target` after/before update is pushed into the
+   * stack instead.
+   */
+  assignToIndex,
+
+  /**
+   * Pop from the stack `index` and `target`.  Push into the stack the result
+   * of evaluation of `target[index]`.
+   */
+  extractIndex,
+
+  /**
+   * Pop the top `n` values from the stack (where `n` is obtained from
+   * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
+   * `n` values from [UnlinkedConst.strings] and use the lists of names and
+   * values to create named arguments.  Then pop the top `m` values from the
+   * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
+   * from the end) and use them as positional arguments.  Use the lists of
+   * positional and names arguments to invoke a method (or a function) with
+   * the reference from [UnlinkedConst.references].  Push the result of
+   * invocation value into the stack.
+   *
+   * In general `a.b` cannot not be distinguished between: `a` is a prefix and
+   * `b` is a top-level function; or `a` is an object and `b` is the name of a
+   * method.  This operation should be used for a sequence of identifiers
+   * `a.b.b.c.d.e` ending with an invokable result.
+   */
+  invokeMethodRef,
+
+  /**
+   * Pop the top `n` values from the stack (where `n` is obtained from
+   * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
+   * `n` values from [UnlinkedConst.strings] and use the lists of names and
+   * values to create named arguments.  Then pop the top `m` values from the
+   * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
+   * from the end) and use them as positional arguments.  Use the lists of
+   * positional and names arguments to invoke the method with the name from
+   * [UnlinkedConst.strings] of the target popped from the stack, and push the
+   * resulting value into the stack.
+   *
+   * This operation should be used for invocation of a method invocation
+   * where `target` is know to be an object instance.
+   */
+  invokeMethod,
+
+  /**
+   * Begin a new cascade section.  Duplicate the top value of the stack.
+   */
+  cascadeSectionBegin,
+
+  /**
+   * End a new cascade section.  Pop the top value from the stack and throw it
+   * away.
+   */
+  cascadeSectionEnd,
+
+  /**
+   * Pop the top value from the stack and cast it to the type with reference
+   * from [UnlinkedConst.references], push the result into the stack.
+   */
+  typeCast,
+
+  /**
+   * Pop the top value from the stack and check whether it is a subclass of the
+   * type with reference from [UnlinkedConst.references], push the result into
+   * the stack.
+   */
+  typeCheck,
+
+  /**
+   * Pop the top value from the stack and raise an exception with this value.
+   */
+  throwException
 }
 
 /**
@@ -492,6 +658,100 @@
 }
 
 /**
+ * Enum representing the various kinds of assignment operations combined
+ * with:
+ *    [UnlinkedConstOperation.assignToRef],
+ *    [UnlinkedConstOperation.assignToProperty],
+ *    [UnlinkedConstOperation.assignToIndex].
+ */
+enum UnlinkedExprAssignOperator : byte {
+  /**
+   * Perform simple assignment `target = operand`.
+   */
+  assign,
+
+  /**
+   * Perform `target ??= operand`.
+   */
+  ifNull,
+
+  /**
+   * Perform `target *= operand`.
+   */
+  multiply,
+
+  /**
+   * Perform `target /= operand`.
+   */
+  divide,
+
+  /**
+   * Perform `target ~/= operand`.
+   */
+  floorDivide,
+
+  /**
+   * Perform `target %= operand`.
+   */
+  modulo,
+
+  /**
+   * Perform `target += operand`.
+   */
+  plus,
+
+  /**
+   * Perform `target -= operand`.
+   */
+  minus,
+
+  /**
+   * Perform `target <<= operand`.
+   */
+  shiftLeft,
+
+  /**
+   * Perform `target >>= operand`.
+   */
+  shiftRight,
+
+  /**
+   * Perform `target &= operand`.
+   */
+  bitAnd,
+
+  /**
+   * Perform `target ^= operand`.
+   */
+  bitXor,
+
+  /**
+   * Perform `target |= operand`.
+   */
+  bitOr,
+
+  /**
+   * Perform `++target`.
+   */
+  prefixIncrement,
+
+  /**
+   * Perform `--target`.
+   */
+  prefixDecrement,
+
+  /**
+   * Perform `target++`.
+   */
+  postfixIncrement,
+
+  /**
+   * Perform `target++`.
+   */
+  postfixDecrement
+}
+
+/**
  * Enum used to indicate the kind of a parameter.
  */
 enum UnlinkedParamKind : byte {
@@ -512,6 +772,49 @@
 }
 
 /**
+ * Information about a source that depends only on its content.
+ */
+table CacheSourceContent {
+  /**
+   * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`,
+   * or `package:foo/bar.dart`.  Empty if [kind] is [CacheSourceKind.part].
+   */
+  exportedUris:[string] (id: 2);
+
+  /**
+   * The list of explicitly imported URIs, e.g. `dart:core`, or `foo/bar.dart`,
+   * or `package:foo/bar.dart`.  Empty if [kind] is [CacheSourceKind.part].
+   */
+  importedUris:[string] (id: 1);
+
+  /**
+   * The kind of the source.
+   */
+  kind:CacheSourceKind (id: 0);
+
+  /**
+   * The list of part URIs, e.g. `foo/bar.dart`.  Empty if [kind] is
+   * [CacheSourceKind.part].
+   */
+  partUris:[string] (id: 3);
+}
+
+/**
+ * Information about an element code range.
+ */
+table CodeRange {
+  /**
+   * Length of the element code.
+   */
+  length:uint (id: 1);
+
+  /**
+   * Offset of the element code relative to the beginning of the file.
+   */
+  offset:uint (id: 0);
+}
+
+/**
  * Summary information about a reference to a an entity such as a type, top
  * level executable, or executable within a class.
  */
@@ -675,6 +978,12 @@
   dependencies:[LinkedDependency] (id: 0);
 
   /**
+   * For each export in [UnlinkedUnit.exports], an index into [dependencies]
+   * of the library being exported.
+   */
+  exportDependencies:[uint] (id: 6);
+
+  /**
    * Information about entities in the export namespace of the library that are
    * not in the public namespace of the library (that is, entities that are
    * brought into the namespace via `export` directives).
@@ -684,6 +993,12 @@
   exportNames:[LinkedExportName] (id: 4);
 
   /**
+   * Indicates whether this library was summarized in "fallback mode".  If
+   * true, all other fields in the data structure have their default values.
+   */
+  fallbackMode:bool (id: 5);
+
+  /**
    * For each import in [UnlinkedUnit.imports], an index into [dependencies]
    * of the library being imported.
    */
@@ -777,6 +1092,12 @@
  */
 table LinkedUnit {
   /**
+   * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot])
+   * corresponding to const constructors that are part of cycles.
+   */
+  constCycles:[uint] (id: 2);
+
+  /**
    * Information about the resolution of references within the compilation
    * unit.  Each element of [UnlinkedUnit.references] has a corresponding
    * element in this list (at the same index).  If this list has additional
@@ -863,7 +1184,9 @@
   elementUnits:[uint] (id: 0);
 
   /**
-   * List of unique element strings used in this [PackageIndex].
+   * 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].
    */
   strings:[string] (id: 6);
 
@@ -946,6 +1269,12 @@
   usedElements:[uint] (id: 3);
 
   /**
+   * Each item of this list is the `true` if the corresponding name usage
+   * is qualified with some prefix.
+   */
+  usedNameIsQualifiedFlags:[ubyte] (id: 12);
+
+  /**
    * Each item of this list is the kind of the name usage.
    */
   usedNameKinds:[IndexRelationKind] (id: 10);
@@ -974,6 +1303,11 @@
   annotations:[UnlinkedConst] (id: 5);
 
   /**
+   * Code range of the class.
+   */
+  codeRange:CodeRange (id: 13);
+
+  /**
    * Documentation comment for the class, or `null` if there is no
    * documentation comment.
    */
@@ -1078,6 +1412,11 @@
  */
 table UnlinkedConst {
   /**
+   * Sequence of operators used by assignment operations.
+   */
+  assignmentOperators:[UnlinkedExprAssignOperator] (id: 6);
+
+  /**
    * Sequence of 64-bit doubles consumed by the operation `pushDouble`.
    */
   doubles:[double] (id: 4);
@@ -1090,10 +1429,10 @@
   ints:[uint] (id: 1);
 
   /**
-   * Indicates whether the expression is not a valid potentially constant
+   * Indicates whether the expression is a valid potentially constant
    * expression.
    */
-  isInvalid:bool (id: 5);
+  isValidConst:bool (id: 5);
 
   /**
    * Sequence of operations to execute (starting with an empty stack) to form
@@ -1180,6 +1519,11 @@
   annotations:[UnlinkedConst] (id: 4);
 
   /**
+   * Code range of the enum.
+   */
+  codeRange:CodeRange (id: 5);
+
+  /**
    * Documentation comment for the enum, or `null` if there is no documentation
    * comment.
    */
@@ -1234,12 +1578,27 @@
   annotations:[UnlinkedConst] (id: 6);
 
   /**
+   * Code range of the executable.
+   */
+  codeRange:CodeRange (id: 26);
+
+  /**
    * If a constant [UnlinkedExecutableKind.constructor], the constructor
    * initializers.  Otherwise empty.
    */
   constantInitializers:[UnlinkedConstructorInitializer] (id: 14);
 
   /**
+   * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`,
+   * a nonzero slot id which is unique within this compilation unit.  If this id
+   * is found in [LinkedUnit.constCycles], then this constructor is part of a
+   * cycle.
+   *
+   * Otherwise, zero.
+   */
+  constCycleSlot:uint (id: 25);
+
+  /**
    * Documentation comment for the executable, or `null` if there is no
    * documentation comment.
    */
@@ -1524,6 +1883,11 @@
   annotations:[UnlinkedConst] (id: 9);
 
   /**
+   * Code range of the parameter.
+   */
+  codeRange:CodeRange (id: 14);
+
+  /**
    * If the parameter has a default value, the constant expression in the
    * default value.  Note that the presence of this expression does not mean
    * that it is a valid, check [UnlinkedConst.isInvalid].
@@ -1720,6 +2084,11 @@
   annotations:[UnlinkedConst] (id: 4);
 
   /**
+   * Code range of the typedef.
+   */
+  codeRange:CodeRange (id: 7);
+
+  /**
    * Documentation comment for the typedef, or `null` if there is no
    * documentation comment.
    */
@@ -1767,6 +2136,11 @@
   bound:EntityRef (id: 2);
 
   /**
+   * Code range of the type parameter.
+   */
+  codeRange:CodeRange (id: 4);
+
+  /**
    * Name of the type parameter.
    */
   name:string (id: 0);
@@ -1787,6 +2161,11 @@
   classes:[UnlinkedClass] (id: 2);
 
   /**
+   * Code range of the unit.
+   */
+  codeRange:CodeRange (id: 15);
+
+  /**
    * Enums declared in the compilation unit.
    */
   enums:[UnlinkedEnum] (id: 12);
@@ -1803,6 +2182,15 @@
   exports:[UnlinkedExportNonPublic] (id: 13);
 
   /**
+   * If this compilation unit was summarized in fallback mode, the path where
+   * the compilation unit may be found on disk.  Otherwise empty.
+   *
+   * When this field is non-empty, all other fields in the data structure have
+   * their default values.
+   */
+  fallbackModePath:string (id: 16);
+
+  /**
    * Import declarations in the compilation unit.
    */
   imports:[UnlinkedImport] (id: 5);
@@ -1877,6 +2265,11 @@
   annotations:[UnlinkedConst] (id: 8);
 
   /**
+   * Code range of the variable.
+   */
+  codeRange:CodeRange (id: 14);
+
+  /**
    * If [isConst] is true, and the variable has an initializer, the constant
    * expression in the initializer.  Note that the presence of this expression
    * does not mean that it is a valid, check [UnlinkedConst.isInvalid].
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index 21473a2..ebbe533 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -49,10 +49,71 @@
  * Annotation describing information which is not part of Dart semantics; in
  * other words, if this information (or any information it refers to) changes,
  * static analysis and runtime behavior of the library are unaffected.
+ *
+ * Information that has purely local effect (in other words, it does not affect
+ * the API of the code being analyzed) is also marked as `informative`.
  */
 const informative = null;
 
 /**
+ * Information about a source that depends only on its content.
+ */
+@TopLevel('CaSS')
+abstract class CacheSourceContent extends base.SummaryClass {
+  factory CacheSourceContent.fromBuffer(List<int> buffer) =>
+      generated.readCacheSourceContent(buffer);
+
+  /**
+   * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`,
+   * or `package:foo/bar.dart`.  Empty if [kind] is [CacheSourceKind.part].
+   */
+  @Id(2)
+  List<String> get exportedUris;
+
+  /**
+   * The list of explicitly imported URIs, e.g. `dart:core`, or `foo/bar.dart`,
+   * or `package:foo/bar.dart`.  Empty if [kind] is [CacheSourceKind.part].
+   */
+  @Id(1)
+  List<String> get importedUris;
+
+  /**
+   * The kind of the source.
+   */
+  @Id(0)
+  CacheSourceKind get kind;
+
+  /**
+   * The list of part URIs, e.g. `foo/bar.dart`.  Empty if [kind] is
+   * [CacheSourceKind.part].
+   */
+  @Id(3)
+  List<String> get partUris;
+}
+
+/**
+ * Kind of a source in the cache.
+ */
+enum CacheSourceKind { library, part }
+
+/**
+ * Information about an element code range.
+ */
+abstract class CodeRange extends base.SummaryClass {
+  /**
+   * Length of the element code.
+   */
+  @Id(1)
+  int get length;
+
+  /**
+   * Offset of the element code relative to the beginning of the file.
+   */
+  @Id(0)
+  int get offset;
+}
+
+/**
  * Summary information about a reference to a an entity such as a type, top
  * level executable, or executable within a class.
  */
@@ -169,6 +230,13 @@
 enum IndexRelationKind {
   /**
    * Left: class.
+   *   Is ancestor of (is extended or implemented, directly or indirectly).
+   * Right: other class declaration.
+   */
+  IS_ANCESTOR_OF,
+
+  /**
+   * Left: class.
    *   Is extended by.
    * Right: other class declaration.
    */
@@ -200,7 +268,28 @@
    *   Is referenced (and not invoked, read/written) at.
    * Right: location.
    */
-  IS_REFERENCED_BY
+  IS_REFERENCED_BY,
+
+  /**
+   * Left: unresolved member name.
+   *   Is read at.
+   * Right: location.
+   */
+  IS_READ_BY,
+
+  /**
+   * Left: unresolved member name.
+   *   Is both read and written at.
+   * Right: location.
+   */
+  IS_READ_WRITTEN_BY,
+
+  /**
+   * Left: unresolved member name.
+   *   Is written at.
+   * Right: location.
+   */
+  IS_WRITTEN_BY
 }
 
 /**
@@ -220,6 +309,11 @@
   constructor,
 
   /**
+   * The synthetic field element.
+   */
+  field,
+
+  /**
    * The synthetic getter of a property introducing element.
    */
   getter,
@@ -227,7 +321,27 @@
   /**
    * The synthetic setter of a property introducing element.
    */
-  setter
+  setter,
+
+  /**
+   * The synthetic top-level variable element.
+   */
+  topLevelVariable,
+
+  /**
+   * The synthetic `loadLibrary` element.
+   */
+  loadLibrary,
+
+  /**
+   * The synthetic `index` getter of an enum.
+   */
+  enumIndex,
+
+  /**
+   * The synthetic `values` getter of an enum.
+   */
+  enumValues
 }
 
 /**
@@ -316,6 +430,13 @@
   List<LinkedDependency> get dependencies;
 
   /**
+   * For each export in [UnlinkedUnit.exports], an index into [dependencies]
+   * of the library being exported.
+   */
+  @Id(6)
+  List<int> get exportDependencies;
+
+  /**
    * Information about entities in the export namespace of the library that are
    * not in the public namespace of the library (that is, entities that are
    * brought into the namespace via `export` directives).
@@ -326,6 +447,13 @@
   List<LinkedExportName> get exportNames;
 
   /**
+   * Indicates whether this library was summarized in "fallback mode".  If
+   * true, all other fields in the data structure have their default values.
+   */
+  @Id(5)
+  bool get fallbackMode;
+
+  /**
    * For each import in [UnlinkedUnit.imports], an index into [dependencies]
    * of the library being imported.
    */
@@ -429,6 +557,13 @@
  */
 abstract class LinkedUnit extends base.SummaryClass {
   /**
+   * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot])
+   * corresponding to const constructors that are part of cycles.
+   */
+  @Id(2)
+  List<int> get constCycles;
+
+  /**
    * Information about the resolution of references within the compilation
    * unit.  Each element of [UnlinkedUnit.references] has a corresponding
    * element in this list (at the same index).  If this list has additional
@@ -535,7 +670,9 @@
   List<int> get elementUnits;
 
   /**
-   * List of unique element strings used in this [PackageIndex].
+   * 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].
    */
   @Id(6)
   List<String> get strings;
@@ -591,11 +728,6 @@
   method,
 
   /**
-   * The `length` property access.
-   */
-  length,
-
-  /**
    * The entity is a typedef.
    */
   typedef,
@@ -699,6 +831,13 @@
   List<int> get usedElements;
 
   /**
+   * Each item of this list is the `true` if the corresponding name usage
+   * is qualified with some prefix.
+   */
+  @Id(12)
+  List<bool> get usedNameIsQualifiedFlags;
+
+  /**
    * Each item of this list is the kind of the name usage.
    */
   @Id(10)
@@ -731,6 +870,13 @@
   List<UnlinkedConst> get annotations;
 
   /**
+   * Code range of the class.
+   */
+  @informative
+  @Id(13)
+  CodeRange get codeRange;
+
+  /**
    * Documentation comment for the class, or `null` if there is no
    * documentation comment.
    */
@@ -855,6 +1001,12 @@
  */
 abstract class UnlinkedConst extends base.SummaryClass {
   /**
+   * Sequence of operators used by assignment operations.
+   */
+  @Id(6)
+  List<UnlinkedExprAssignOperator> get assignmentOperators;
+
+  /**
    * Sequence of 64-bit doubles consumed by the operation `pushDouble`.
    */
   @Id(4)
@@ -869,11 +1021,11 @@
   List<int> get ints;
 
   /**
-   * Indicates whether the expression is not a valid potentially constant
+   * Indicates whether the expression is a valid potentially constant
    * expression.
    */
   @Id(5)
-  bool get isInvalid;
+  bool get isValidConst;
 
   /**
    * Sequence of operations to execute (starting with an empty stack) to form
@@ -988,6 +1140,13 @@
   pushReference,
 
   /**
+   * Pop the top value from the stack, extract the value of the property with
+   * the name obtained from [UnlinkedConst.strings], and push the result back
+   * onto the stack.
+   */
+  extractProperty,
+
+  /**
    * Pop the top `n` values from the stack (where `n` is obtained from
    * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
    * `n` values from [UnlinkedConst.strings] and use the lists of names and
@@ -1039,12 +1198,6 @@
   makeTypedMap,
 
   /**
-   * Pop the top 2 values from the stack, pass them to the predefined Dart
-   * function `identical`, and push the result back onto the stack.
-   */
-  identical,
-
-  /**
    * Pop the top 2 values from the stack, evaluate `v1 == v2`, and push the
    * result back onto the stack.
    */
@@ -1183,10 +1336,118 @@
   conditional,
 
   /**
-   * Pop the top value from the stack, evaluate `v.length`, and push the result
-   * back onto the stack.
+   * Pop from the stack `value` and get the next `target` reference from
+   * [UnlinkedConst.references] - a top-level variable (prefixed or not), an
+   * assignable field of a class (prefixed or not), or a sequence of getters
+   * ending with an assignable property `a.b.b.c.d.e`.  In general `a.b` cannot
+   * not be distinguished between: `a` is a prefix and `b` is a top-level
+   * variable; or `a` is an object and `b` is the name of a property.  Perform
+   * `reference op= value` where `op` is the next assignment operator from
+   * [UnlinkedConst.assignmentOperators].  Push `value` back into 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 `target` after/before update is pushed into the
+   * stack instead.
    */
-  length,
+  assignToRef,
+
+  /**
+   * Pop from the stack `target` and `value`.  Get the name of the property from
+   * `UnlinkedConst.strings` and assign the `value` to the named property of the
+   * `target`.  This operation is used when we know that the `target` is an
+   * object reference expression, e.g. `new Foo().a.b.c` or `a.b[0].c.d`.
+   * Perform `target.property op= value` where `op` is the next assignment
+   * operator from [UnlinkedConst.assignmentOperators].  Push `value` back into
+   * 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 `target` after/before update is pushed into the
+   * stack instead.
+   */
+  assignToProperty,
+
+  /**
+   * Pop from the stack `index`, `target` and `value`.  Perform
+   * `target[index] op= value`  where `op` is the next assignment operator from
+   * [UnlinkedConst.assignmentOperators].  Push `value` back into 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 `target` after/before update is pushed into the
+   * stack instead.
+   */
+  assignToIndex,
+
+  /**
+   * Pop from the stack `index` and `target`.  Push into the stack the result
+   * of evaluation of `target[index]`.
+   */
+  extractIndex,
+
+  /**
+   * Pop the top `n` values from the stack (where `n` is obtained from
+   * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
+   * `n` values from [UnlinkedConst.strings] and use the lists of names and
+   * values to create named arguments.  Then pop the top `m` values from the
+   * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
+   * from the end) and use them as positional arguments.  Use the lists of
+   * positional and names arguments to invoke a method (or a function) with
+   * the reference from [UnlinkedConst.references].  Push the result of
+   * invocation value into the stack.
+   *
+   * In general `a.b` cannot not be distinguished between: `a` is a prefix and
+   * `b` is a top-level function; or `a` is an object and `b` is the name of a
+   * method.  This operation should be used for a sequence of identifiers
+   * `a.b.b.c.d.e` ending with an invokable result.
+   */
+  invokeMethodRef,
+
+  /**
+   * Pop the top `n` values from the stack (where `n` is obtained from
+   * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
+   * `n` values from [UnlinkedConst.strings] and use the lists of names and
+   * values to create named arguments.  Then pop the top `m` values from the
+   * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
+   * from the end) and use them as positional arguments.  Use the lists of
+   * positional and names arguments to invoke the method with the name from
+   * [UnlinkedConst.strings] of the target popped from the stack, and push the
+   * resulting value into the stack.
+   *
+   * This operation should be used for invocation of a method invocation
+   * where `target` is know to be an object instance.
+   */
+  invokeMethod,
+
+  /**
+   * Begin a new cascade section.  Duplicate the top value of the stack.
+   */
+  cascadeSectionBegin,
+
+  /**
+   * End a new cascade section.  Pop the top value from the stack and throw it
+   * away.
+   */
+  cascadeSectionEnd,
+
+  /**
+   * Pop the top value from the stack and cast it to the type with reference
+   * from [UnlinkedConst.references], push the result into the stack.
+   */
+  typeCast,
+
+  /**
+   * Pop the top value from the stack and check whether it is a subclass of the
+   * type with reference from [UnlinkedConst.references], push the result into
+   * the stack.
+   */
+  typeCheck,
+
+  /**
+   * Pop the top value from the stack and raise an exception with this value.
+   */
+  throwException,
 }
 
 /**
@@ -1281,6 +1542,13 @@
   List<UnlinkedConst> get annotations;
 
   /**
+   * Code range of the enum.
+   */
+  @informative
+  @Id(5)
+  CodeRange get codeRange;
+
+  /**
    * Documentation comment for the enum, or `null` if there is no documentation
    * comment.
    */
@@ -1347,6 +1615,13 @@
   List<UnlinkedConst> get annotations;
 
   /**
+   * Code range of the executable.
+   */
+  @informative
+  @Id(26)
+  CodeRange get codeRange;
+
+  /**
    * If a constant [UnlinkedExecutableKind.constructor], the constructor
    * initializers.  Otherwise empty.
    */
@@ -1354,6 +1629,17 @@
   List<UnlinkedConstructorInitializer> get constantInitializers;
 
   /**
+   * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`,
+   * a nonzero slot id which is unique within this compilation unit.  If this id
+   * is found in [LinkedUnit.constCycles], then this constructor is part of a
+   * cycle.
+   *
+   * Otherwise, zero.
+   */
+  @Id(25)
+  int get constCycleSlot;
+
+  /**
    * Documentation comment for the executable, or `null` if there is no
    * documentation comment.
    */
@@ -1421,18 +1707,21 @@
   /**
    * The list of local functions.
    */
+  @informative
   @Id(18)
   List<UnlinkedExecutable> get localFunctions;
 
   /**
    * The list of local labels.
    */
+  @informative
   @Id(22)
   List<UnlinkedLabel> get localLabels;
 
   /**
    * The list of local variables.
    */
+  @informative
   @Id(19)
   List<UnlinkedVariable> get localVariables;
 
@@ -1602,6 +1891,100 @@
 }
 
 /**
+ * Enum representing the various kinds of assignment operations combined
+ * with:
+ *    [UnlinkedConstOperation.assignToRef],
+ *    [UnlinkedConstOperation.assignToProperty],
+ *    [UnlinkedConstOperation.assignToIndex].
+ */
+enum UnlinkedExprAssignOperator {
+  /**
+   * Perform simple assignment `target = operand`.
+   */
+  assign,
+
+  /**
+   * Perform `target ??= operand`.
+   */
+  ifNull,
+
+  /**
+   * Perform `target *= operand`.
+   */
+  multiply,
+
+  /**
+   * Perform `target /= operand`.
+   */
+  divide,
+
+  /**
+   * Perform `target ~/= operand`.
+   */
+  floorDivide,
+
+  /**
+   * Perform `target %= operand`.
+   */
+  modulo,
+
+  /**
+   * Perform `target += operand`.
+   */
+  plus,
+
+  /**
+   * Perform `target -= operand`.
+   */
+  minus,
+
+  /**
+   * Perform `target <<= operand`.
+   */
+  shiftLeft,
+
+  /**
+   * Perform `target >>= operand`.
+   */
+  shiftRight,
+
+  /**
+   * Perform `target &= operand`.
+   */
+  bitAnd,
+
+  /**
+   * Perform `target ^= operand`.
+   */
+  bitXor,
+
+  /**
+   * Perform `target |= operand`.
+   */
+  bitOr,
+
+  /**
+   * Perform `++target`.
+   */
+  prefixIncrement,
+
+  /**
+   * Perform `--target`.
+   */
+  prefixDecrement,
+
+  /**
+   * Perform `target++`.
+   */
+  postfixIncrement,
+
+  /**
+   * Perform `target++`.
+   */
+  postfixDecrement,
+}
+
+/**
  * Unlinked summary information about an import declaration.
  */
 abstract class UnlinkedImport extends base.SummaryClass {
@@ -1719,6 +2102,13 @@
   List<UnlinkedConst> get annotations;
 
   /**
+   * Code range of the parameter.
+   */
+  @informative
+  @Id(14)
+  CodeRange get codeRange;
+
+  /**
    * If the parameter has a default value, the constant expression in the
    * default value.  Note that the presence of this expression does not mean
    * that it is a valid, check [UnlinkedConst.isInvalid].
@@ -1969,6 +2359,13 @@
   List<UnlinkedConst> get annotations;
 
   /**
+   * Code range of the typedef.
+   */
+  @informative
+  @Id(7)
+  CodeRange get codeRange;
+
+  /**
    * Documentation comment for the typedef, or `null` if there is no
    * documentation comment.
    */
@@ -2026,6 +2423,13 @@
   EntityRef get bound;
 
   /**
+   * Code range of the type parameter.
+   */
+  @informative
+  @Id(4)
+  CodeRange get codeRange;
+
+  /**
    * Name of the type parameter.
    */
   @Id(0)
@@ -2054,6 +2458,13 @@
   List<UnlinkedClass> get classes;
 
   /**
+   * Code range of the unit.
+   */
+  @informative
+  @Id(15)
+  CodeRange get codeRange;
+
+  /**
    * Enums declared in the compilation unit.
    */
   @Id(12)
@@ -2073,6 +2484,16 @@
   List<UnlinkedExportNonPublic> get exports;
 
   /**
+   * If this compilation unit was summarized in fallback mode, the path where
+   * the compilation unit may be found on disk.  Otherwise empty.
+   *
+   * When this field is non-empty, all other fields in the data structure have
+   * their default values.
+   */
+  @Id(16)
+  String get fallbackModePath;
+
+  /**
    * Import declarations in the compilation unit.
    */
   @Id(5)
@@ -2162,6 +2583,13 @@
   List<UnlinkedConst> get annotations;
 
   /**
+   * Code range of the variable.
+   */
+  @informative
+  @Id(14)
+  CodeRange get codeRange;
+
+  /**
    * If [isConst] is true, and the variable has an initializer, the constant
    * expression in the initializer.  Note that the presence of this expression
    * does not mean that it is a valid, check [UnlinkedConst.isInvalid].
@@ -2190,6 +2618,7 @@
    * The synthetic initializer function of the variable.  Absent if the variable
    * does not have an initializer.
    */
+  @informative
   @Id(13)
   UnlinkedExecutable get initializer;
 
diff --git a/pkg/analyzer/lib/src/summary/incremental_cache.dart b/pkg/analyzer/lib/src/summary/incremental_cache.dart
new file mode 100644
index 0000000..9900773
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary/incremental_cache.dart
@@ -0,0 +1,420 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:convert' show UTF8;
+import 'dart:core' hide Resource;
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/summarize_elements.dart';
+import 'package:crypto/crypto.dart';
+
+/**
+ * Storage for cache data.
+ */
+abstract class CacheStorage {
+  /**
+   * Return bytes for the given [key], `null` if [key] is not in the storage.
+   */
+  List<int> get(String key);
+
+  /**
+   * Associate the [key] with the given [bytes].
+   *
+   * If the [key] was already in the storage, its associated value is changed.
+   * Otherwise the key-value pair is added to the storage.
+   *
+   * It is not guaranteed that data will always be accessible using [get], in
+   * some implementations association may silently fail or become inaccessible
+   * after some time.
+   */
+  void put(String key, List<int> bytes);
+}
+
+/**
+ * A [Folder] based implementation of [CacheStorage].
+ */
+class FolderCacheStorage implements CacheStorage {
+  /**
+   * The folder to read and write files.
+   */
+  final Folder folder;
+
+  /**
+   * To ensure that operations of writing files are atomic we create a temporary
+   * file with this name in the [folder] and then rename it once we are
+   * done writing.
+   */
+  final String tempFileName;
+
+  FolderCacheStorage(this.folder, this.tempFileName);
+
+  @override
+  List<int> get(String key) {
+    Resource file = folder.getChild(key);
+    if (file is File) {
+      try {
+        return file.readAsBytesSync();
+      } on FileSystemException {}
+    }
+    return null;
+  }
+
+  @override
+  void put(String key, List<int> bytes) {
+    String absPath = folder.getChild(key).path;
+    File tempFile = folder.getChild(tempFileName);
+    tempFile.writeAsBytesSync(bytes);
+    try {
+      tempFile.renameSync(absPath);
+    } catch (e) {}
+  }
+}
+
+/**
+ * Cache of information to support incremental analysis.
+ *
+ * Note that currently this class is not intended for interactive use.
+ */
+class IncrementalCache {
+  /**
+   * The storage for the cache data.
+   */
+  final CacheStorage storage;
+
+  /**
+   * The context in which this cache is used.
+   */
+  final AnalysisContext context;
+
+  /**
+   * Opaque data that reflects the current configuration, such as the [context]
+   * options, and is mixed into the hashes.
+   */
+  final List<int> configSalt;
+
+  final Map<Source, CacheSourceContent> _sourceContentMap =
+      <Source, CacheSourceContent>{};
+  final Map<Source, List<Source>> _libraryClosureMap = <Source, List<Source>>{};
+  final Map<Source, List<int>> _libraryClosureHashMap = <Source, List<int>>{};
+  final Map<Source, List<int>> _sourceContentHashMap = <Source, List<int>>{};
+
+  /**
+   * Mapping from a library closure key to its [PackageBundle].
+   */
+  final Map<String, PackageBundle> _bundleMap = <String, PackageBundle>{};
+
+  final Map<String, Source> _absoluteUriMap = <String, Source>{};
+
+  IncrementalCache(this.storage, this.context, this.configSalt);
+
+  /**
+   * Clear internal caches so that we read from file system again.
+   */
+  void clearInternalCaches() {
+    _sourceContentMap.clear();
+    _libraryClosureMap.clear();
+    _sourceContentHashMap.clear();
+    _bundleMap.clear();
+  }
+
+  /**
+   * Return all summaries that are required to provide results about the library
+   * with the given [librarySource] from its summary.  It includes all of the
+   * bundles in the import/export closure of the library.  If any of the
+   * bundles are not in the cache, then `null` is returned.  If any of the
+   * [LibraryBundleWithId]s were already returned as a part of the closure of
+   * another library, they are still included - it is up to the client to
+   * decide whether a bundle should be used or not, but it is easy to do
+   * using [LibraryBundleWithId.id].
+   */
+  List<LibraryBundleWithId> getLibraryClosureBundles(Source librarySource) {
+    try {
+      List<Source> closureSources = _getLibraryClosure(librarySource);
+      List<LibraryBundleWithId> closureBundles = <LibraryBundleWithId>[];
+      for (Source source in closureSources) {
+        if (source.isInSystemLibrary) {
+          continue;
+        }
+        if (getSourceKind(source) == SourceKind.PART) {
+          continue;
+        }
+        String key = _getLibraryBundleKey(source);
+        PackageBundle bundle = _getLibraryBundle(key);
+        if (bundle == null) {
+          return null;
+        }
+        closureBundles.add(new LibraryBundleWithId(source, key, bundle));
+      }
+      return closureBundles;
+    } catch (e) {
+      return null;
+    }
+  }
+
+  /**
+   * Return the kind of the given [source], or `null` if unknown.
+   */
+  SourceKind getSourceKind(Source source) {
+    try {
+      CacheSourceContent contentSource = _getCacheSourceContent(source);
+      if (contentSource != null) {
+        if (contentSource.kind == CacheSourceKind.library) {
+          return SourceKind.LIBRARY;
+        }
+        if (contentSource.kind == CacheSourceKind.part) {
+          return SourceKind.PART;
+        }
+      }
+    } catch (e) {}
+    return null;
+  }
+
+  /**
+   * Write information about the [libraryElement] into the cache.
+   */
+  void putLibrary(LibraryElement libraryElement) {
+    _writeCacheSourceContents(libraryElement);
+    String key = _getLibraryBundleKey(libraryElement.source);
+    PackageBundleAssembler assembler = new PackageBundleAssembler();
+    assembler.serializeLibraryElement(libraryElement);
+    List<int> bytes = assembler.assemble().toBuffer();
+    storage.put(key, bytes);
+  }
+
+  /**
+   * Fill the whole source closure of the library with the given
+   * [librarySource]. It includes defining units and parts of the library and
+   * all its directly or indirectly imported or exported libraries.
+   */
+  void _appendLibraryClosure(Set<Source> closure, Source librarySource) {
+    if (closure.add(librarySource)) {
+      CacheSourceContent contentSource = _getCacheSourceContent(librarySource);
+      if (contentSource == null) {
+        throw new StateError('No structure for $librarySource');
+      }
+      // Append parts.
+      for (String partUri in contentSource.partUris) {
+        Source partSource = _resolveUri(librarySource, partUri);
+        if (partSource == null) {
+          throw new StateError('Unable to resolve $partUri in $librarySource');
+        }
+        closure.add(partSource);
+      }
+      // Append imports and exports.
+      void appendLibrarySources(String refUri) {
+        Source refSource = _resolveUri(librarySource, refUri);
+        if (refSource == null) {
+          throw new StateError('Unable to resolve $refUri in $librarySource');
+        }
+        _appendLibraryClosure(closure, refSource);
+      }
+      contentSource.importedUris.forEach(appendLibrarySources);
+      contentSource.exportedUris.forEach(appendLibrarySources);
+    }
+  }
+
+  /**
+   * Get the content based information about the given [source], maybe `null`
+   * if the information is not in the cache.
+   */
+  CacheSourceContent _getCacheSourceContent(Source source) {
+    CacheSourceContent content = _sourceContentMap[source];
+    if (content == null) {
+      String key = _getCacheSourceContentKey(source);
+      List<int> bytes = storage.get(key);
+      if (bytes == null) {
+        return null;
+      }
+      content = new CacheSourceContent.fromBuffer(bytes);
+      _sourceContentMap[source] = content;
+    }
+    return content;
+  }
+
+  /**
+   * Return the key of the content based [source] information.
+   */
+  String _getCacheSourceContentKey(Source source) {
+    List<int> hash = _getSourceContentHash(source);
+    String hashStr = CryptoUtils.bytesToHex(hash);
+    return '$hashStr.content';
+  }
+
+  /**
+   * Get the bundle for the given key.
+   */
+  PackageBundle _getLibraryBundle(String key) {
+    PackageBundle bundle = _bundleMap[key];
+    if (bundle == null) {
+      List<int> bytes = storage.get(key);
+      if (bytes == null) {
+        return null;
+      }
+      bundle = new PackageBundle.fromBuffer(bytes);
+      _bundleMap[key] = bundle;
+    }
+    return bundle;
+  }
+
+  /**
+   * Return the key of the bundle of the [librarySource].
+   */
+  String _getLibraryBundleKey(Source librarySource) {
+    List<int> hash = _getLibraryClosureHash(librarySource);
+    String hashStr = CryptoUtils.bytesToHex(hash);
+    return '$hashStr.summary';
+  }
+
+  /**
+   * Return the whole source closure of the library with the given
+   * [librarySource]. It includes defining units and parts of the library and
+   * of all its directly or indirectly imported or exported libraries.
+   */
+  List<Source> _getLibraryClosure(Source librarySource) {
+    return _libraryClosureMap.putIfAbsent(librarySource, () {
+      Set<Source> closure = new Set<Source>();
+      _appendLibraryClosure(closure, librarySource);
+      return closure.toList();
+    });
+  }
+
+  /**
+   * Return the [context]-specific hash of the closure of the library with
+   * the given [librarySource].
+   */
+  List<int> _getLibraryClosureHash(Source librarySource) {
+    return _libraryClosureHashMap.putIfAbsent(librarySource, () {
+      List<Source> closure = _getLibraryClosure(librarySource);
+      MD5 md5 = new MD5();
+      for (Source source in closure) {
+        List<int> sourceHash = _getSourceContentHash(source);
+        md5.add(sourceHash);
+      }
+      md5.add(configSalt);
+      return md5.close();
+    });
+  }
+
+  /**
+   * Compute a hash of the given [source] contents.
+   */
+  List<int> _getSourceContentHash(Source source) {
+    return _sourceContentHashMap.putIfAbsent(source, () {
+      String sourceText = source.contents.data;
+      List<int> sourceBytes = UTF8.encode(sourceText);
+      return (new MD5()..add(sourceBytes)).close();
+    });
+  }
+
+  /**
+   * Return a source representing the URI that results from resolving the given
+   * (possibly relative) [containedUri] against the URI associated with the
+   * [containingSource], whether or not the resulting source exists, or `null`
+   * if either the [containedUri] is invalid or if it cannot be resolved against
+   * the [containingSource]'s URI.
+   */
+  Source _resolveUri(Source containingSource, String containedUri) {
+    // Cache absolute URIs.
+    if (containedUri.startsWith('dart:') ||
+        containedUri.startsWith('package:')) {
+      return _absoluteUriMap.putIfAbsent(containedUri, () {
+        return context.sourceFactory.resolveUri(containingSource, containedUri);
+      });
+    }
+    // Resolve relative URIs without caching.
+    return context.sourceFactory.resolveUri(containingSource, containedUri);
+  }
+
+  /**
+   * Write the content based information about the given [source].
+   */
+  void _writeCacheSourceContent(Source source, CacheSourceContentBuilder b) {
+    String key = _getCacheSourceContentKey(source);
+    List<int> bytes = b.toBuffer();
+    storage.put(key, bytes);
+    // Put into the cache to avoid reading it later.
+    _sourceContentMap[source] = new CacheSourceContent.fromBuffer(bytes);
+  }
+
+  /**
+   * Write [CacheSourceContent] for every unit of the given [library] and its
+   * direct and indirect imports/exports.
+   */
+  void _writeCacheSourceContents(LibraryElement library,
+      [Set<LibraryElement> writtenLibraries]) {
+    Source librarySource = library.source;
+    // Do nothing if already cached.
+    if (_sourceContentMap.containsKey(librarySource)) {
+      return;
+    }
+    // Stop recursion cycle.
+    writtenLibraries ??= new Set<LibraryElement>();
+    if (!writtenLibraries.add(library)) {
+      return;
+    }
+    // Write parts.
+    List<String> partUris = <String>[];
+    for (CompilationUnitElement part in library.parts) {
+      partUris.add(part.uri);
+      Source partSource = part.source;
+      if (context.getKindOf(partSource) == SourceKind.PART) {
+        _writeCacheSourceContent(partSource,
+            new CacheSourceContentBuilder(kind: CacheSourceKind.part));
+      }
+    }
+    // Write imports.
+    List<String> importUris = <String>[];
+    for (ImportElement element in library.imports) {
+      String uri = element.uri;
+      if (uri != null) {
+        importUris.add(uri);
+        _writeCacheSourceContents(element.importedLibrary, writtenLibraries);
+      }
+    }
+    // Write exports.
+    List<String> exportUris = <String>[];
+    for (ExportElement element in library.exports) {
+      String uri = element.uri;
+      if (uri != null) {
+        exportUris.add(uri);
+        _writeCacheSourceContents(element.exportedLibrary, writtenLibraries);
+      }
+    }
+    // Write the library.
+    _writeCacheSourceContent(
+        librarySource,
+        new CacheSourceContentBuilder(
+            kind: CacheSourceKind.library,
+            importedUris: importUris,
+            exportedUris: exportUris,
+            partUris: partUris));
+  }
+}
+
+/**
+ * The bundle for a source in the context.
+ */
+class LibraryBundleWithId {
+  /**
+   * The source of the library this bundle is for.
+   */
+  final Source source;
+
+  /**
+   * The unique ID of the [bundle] of the [source] in the context.
+   */
+  final String id;
+
+  /**
+   * The payload bundle.
+   */
+  final PackageBundle bundle;
+
+  LibraryBundleWithId(this.source, this.id, this.bundle);
+}
diff --git a/pkg/analyzer/lib/src/summary/index_unit.dart b/pkg/analyzer/lib/src/summary/index_unit.dart
index db659c7..610fba4 100644
--- a/pkg/analyzer/lib/src/summary/index_unit.dart
+++ b/pkg/analyzer/lib/src/summary/index_unit.dart
@@ -6,207 +6,16 @@
 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/element/member.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 
 /**
- * Object that gathers information about the whole package index and then uses
- * it to assemble a new [PackageIndexBuilder].  Call [index] on each compilation
- * unit to be indexed, then call [assemble] to retrieve the complete index for
- * the package.
- */
-class PackageIndexAssembler {
-  /**
-   * Map associating referenced elements with their [_ElementInfo]s.
-   */
-  final Map<Element, _ElementInfo> _elementMap = <Element, _ElementInfo>{};
-
-  /**
-   * Map associating [CompilationUnitElement]s with their identifiers, which
-   * are indices into [_unitLibraryUris] and [_unitUnitUris].
-   */
-  final Map<CompilationUnitElement, int> _unitMap =
-      <CompilationUnitElement, int>{};
-
-  /**
-   * Each item of this list corresponds to the library URI of a unique
-   * [CompilationUnitElement].  It is an index into [_strings].
-   */
-  final List<int> _unitLibraryUris = <int>[];
-
-  /**
-   * Each item of this list corresponds to the unit URI of a unique
-   * [CompilationUnitElement].  It is an index into [_strings].
-   */
-  final List<int> _unitUnitUris = <int>[];
-
-  /**
-   * Map associating strings with their identifiers, which are indices
-   * into [_strings].
-   */
-  final Map<String, int> _stringMap = <String, int>{};
-
-  /**
-   * List of unique strings used in this index.
-   */
-  final List<String> _strings = <String>[];
-
-  /**
-   * List of information about each unit indexed in this index.
-   */
-  final List<_UnitIndexAssembler> _units = <_UnitIndexAssembler>[];
-
-  /**
-   * Assemble a new [PackageIndexBuilder] using the information gathered by
-   * [index].
-   */
-  PackageIndexBuilder assemble() {
-    List<_ElementInfo> elementInfoList = _elementMap.values.toList();
-    elementInfoList.sort((a, b) {
-      return a.offset - b.offset;
-    });
-    for (int i = 0; i < elementInfoList.length; i++) {
-      elementInfoList[i].id = i;
-    }
-    return new PackageIndexBuilder(
-        unitLibraryUris: _unitLibraryUris,
-        unitUnitUris: _unitUnitUris,
-        elementUnits: elementInfoList.map((e) => e.unitId).toList(),
-        elementOffsets: elementInfoList.map((e) => e.offset).toList(),
-        elementKinds: elementInfoList.map((e) => e.kind).toList(),
-        strings: _strings,
-        units: _units.map((unit) => unit.assemble()).toList());
-  }
-
-  /**
-   * Index the given fully resolved [unit].
-   */
-  void index(CompilationUnit unit) {
-    int unitId = _getUnitId(unit.element);
-    _UnitIndexAssembler assembler = new _UnitIndexAssembler(this, unitId);
-    _units.add(assembler);
-    unit.accept(new _IndexContributor(assembler));
-  }
-
-  /**
-   * Return the unique [_ElementInfo] corresponding the [element].  The field
-   * [_ElementInfo.id] is filled by [assemble] during final sorting.
-   */
-  _ElementInfo _getElementInfo(Element element) {
-    if (element is Member) {
-      element = (element as Member).baseElement;
-    }
-    return _elementMap.putIfAbsent(element, () {
-      CompilationUnitElement unitElement = getUnitElement(element);
-      int unitId = _getUnitId(unitElement);
-      int offset = element.nameOffset;
-      if (element is LibraryElement || element is CompilationUnitElement) {
-        offset = 0;
-      }
-      IndexSyntheticElementKind kind = getIndexElementKind(element);
-      return new _ElementInfo(unitId, offset, kind);
-    });
-  }
-
-  /**
-   * Add information about [str] to [_strings] if necessary, and return the
-   * location in this array representing [str].
-   */
-  int _getStringId(String str) {
-    return _stringMap.putIfAbsent(str, () {
-      int id = _strings.length;
-      _strings.add(str);
-      return id;
-    });
-  }
-
-  /**
-   * Add information about [unitElement] to [_unitUnitUris] and
-   * [_unitLibraryUris] if necessary, and return the location in those
-   * arrays representing [unitElement].
-   */
-  int _getUnitId(CompilationUnitElement unitElement) {
-    return _unitMap.putIfAbsent(unitElement, () {
-      assert(_unitLibraryUris.length == _unitUnitUris.length);
-      int id = _unitUnitUris.length;
-      _unitLibraryUris.add(_getUriId(unitElement.library.source.uri));
-      _unitUnitUris.add(_getUriId(unitElement.source.uri));
-      return id;
-    });
-  }
-
-  /**
-   * Return the identifier corresponding to [uri].
-   */
-  int _getUriId(Uri uri) {
-    String str = uri.toString();
-    return _getStringId(str);
-  }
-
-  /**
-   * Return the kind of the given [element].
-   */
-  static IndexSyntheticElementKind getIndexElementKind(Element element) {
-    if (element.isSynthetic) {
-      if (element is ConstructorElement) {
-        return IndexSyntheticElementKind.constructor;
-      }
-      if (element is PropertyAccessorElement) {
-        return element.isGetter
-            ? IndexSyntheticElementKind.getter
-            : IndexSyntheticElementKind.setter;
-      }
-    }
-    return IndexSyntheticElementKind.notSynthetic;
-  }
-
-  /**
-   * Return the [CompilationUnitElement] that should be used for [element].
-   * Throw [StateError] if the [element] is not linked into a unit.
-   */
-  static CompilationUnitElement getUnitElement(Element element) {
-    for (Element e = element; e != null; e = e.enclosingElement) {
-      if (e is CompilationUnitElement) {
-        return e;
-      }
-      if (e is LibraryElement) {
-        return e.definingCompilationUnit;
-      }
-    }
-    throw new StateError(element.toString());
-  }
-}
-
-/**
- * Information about a single defined name.  Any [_DefinedNameInfo] is always
- * part of a [_UnitIndexAssembler], so [offset] should be understood within the
- * context of the compilation unit pointed to by the [_UnitIndexAssembler].
- */
-class _DefinedNameInfo {
-  /**
-   * The identifier of the name returned [PackageIndexAssembler._getStringId].
-   */
-  final int nameId;
-
-  /**
-   * The coarse-grained kind of the defined name.
-   */
-  final IndexNameKind kind;
-
-  /**
-   * The name offset of the defined element.
-   */
-  final int offset;
-
-  _DefinedNameInfo(this.nameId, this.kind, this.offset);
-}
-
-/**
  * Information about an element referenced in index.
  */
-class _ElementInfo {
+class ElementInfo {
   /**
    * The identifier of the [CompilationUnitElement] containing this element.
    */
@@ -228,7 +37,243 @@
    */
   int id;
 
-  _ElementInfo(this.unitId, this.offset, this.kind);
+  ElementInfo(this.unitId, this.offset, this.kind) {
+    assert(offset >= 0);
+  }
+}
+
+/**
+ * Object that gathers information about the whole package index and then uses
+ * it to assemble a new [PackageIndexBuilder].  Call [index] on each compilation
+ * unit to be indexed, then call [assemble] to retrieve the complete index for
+ * the package.
+ */
+class PackageIndexAssembler {
+  /**
+   * Map associating referenced elements with their [ElementInfo]s.
+   */
+  final Map<Element, ElementInfo> _elementMap = <Element, ElementInfo>{};
+
+  /**
+   * Map associating [CompilationUnitElement]s with their identifiers, which
+   * are indices into [_unitLibraryUris] and [_unitUnitUris].
+   */
+  final Map<CompilationUnitElement, int> _unitMap =
+      <CompilationUnitElement, int>{};
+
+  /**
+   * Each item of this list corresponds to the library URI of a unique
+   * [CompilationUnitElement].
+   */
+  final List<_StringInfo> _unitLibraryUris = <_StringInfo>[];
+
+  /**
+   * Each item of this list corresponds to the unit URI of a unique
+   * [CompilationUnitElement].
+   */
+  final List<_StringInfo> _unitUnitUris = <_StringInfo>[];
+
+  /**
+   * Map associating strings with their [_StringInfo]s.
+   */
+  final Map<String, _StringInfo> _stringMap = <String, _StringInfo>{};
+
+  /**
+   * List of information about each unit indexed in this index.
+   */
+  final List<_UnitIndexAssembler> _units = <_UnitIndexAssembler>[];
+
+  /**
+   * Assemble a new [PackageIndexBuilder] using the information gathered by
+   * [indexDeclarations] or [indexUnit].
+   */
+  PackageIndexBuilder assemble() {
+    // sort strings end set IDs
+    List<_StringInfo> stringInfoList = _stringMap.values.toList();
+    stringInfoList.sort((a, b) {
+      return a.value.compareTo(b.value);
+    });
+    for (int i = 0; i < stringInfoList.length; i++) {
+      stringInfoList[i].id = i;
+    }
+    // sort elements and set IDs
+    List<ElementInfo> elementInfoList = _elementMap.values.toList();
+    elementInfoList.sort((a, b) {
+      return a.offset - b.offset;
+    });
+    for (int i = 0; i < elementInfoList.length; i++) {
+      elementInfoList[i].id = i;
+    }
+    return new PackageIndexBuilder(
+        unitLibraryUris: _unitLibraryUris.map((s) => s.id).toList(),
+        unitUnitUris: _unitUnitUris.map((s) => s.id).toList(),
+        elementUnits: elementInfoList.map((e) => e.unitId).toList(),
+        elementOffsets: elementInfoList.map((e) => e.offset).toList(),
+        elementKinds: elementInfoList.map((e) => e.kind).toList(),
+        strings: stringInfoList.map((s) => s.value).toList(),
+        units: _units.map((unit) => unit.assemble()).toList());
+  }
+
+  /**
+   * Index declarations in the given partially resolved [unit].
+   */
+  void indexDeclarations(CompilationUnit unit) {
+    int unitId = _getUnitId(unit.element);
+    _UnitIndexAssembler assembler = new _UnitIndexAssembler(this, unitId);
+    _units.add(assembler);
+    unit.accept(new _IndexDeclarationContributor(assembler));
+  }
+
+  /**
+   * Index the given fully resolved [unit].
+   */
+  void indexUnit(CompilationUnit unit) {
+    int unitId = _getUnitId(unit.element);
+    _UnitIndexAssembler assembler = new _UnitIndexAssembler(this, unitId);
+    _units.add(assembler);
+    unit.accept(new _IndexContributor(assembler));
+  }
+
+  /**
+   * Return the unique [ElementInfo] corresponding the [element].  The field
+   * [ElementInfo.id] is filled by [assemble] during final sorting.
+   */
+  ElementInfo _getElementInfo(Element element) {
+    if (element is Member) {
+      element = (element as Member).baseElement;
+    }
+    return _elementMap.putIfAbsent(element, () {
+      CompilationUnitElement unitElement = getUnitElement(element);
+      int unitId = _getUnitId(unitElement);
+      return newElementInfo(unitId, element);
+    });
+  }
+
+  /**
+   * Return the unique [_StringInfo] corresponding the [str].  The field
+   * [_StringInfo.id] is filled by [assemble] during final sorting.
+   */
+  _StringInfo _getStringInfo(String str) {
+    return _stringMap.putIfAbsent(str, () {
+      return new _StringInfo(str);
+    });
+  }
+
+  /**
+   * Add information about [unitElement] to [_unitUnitUris] and
+   * [_unitLibraryUris] if necessary, and return the location in those
+   * arrays representing [unitElement].
+   */
+  int _getUnitId(CompilationUnitElement unitElement) {
+    return _unitMap.putIfAbsent(unitElement, () {
+      assert(_unitLibraryUris.length == _unitUnitUris.length);
+      int id = _unitUnitUris.length;
+      _unitLibraryUris.add(_getUriInfo(unitElement.library.source.uri));
+      _unitUnitUris.add(_getUriInfo(unitElement.source.uri));
+      return id;
+    });
+  }
+
+  /**
+   * Return the unique [_StringInfo] corresponding [uri].  The field
+   * [_StringInfo.id] is filled by [assemble] during final sorting.
+   */
+  _StringInfo _getUriInfo(Uri uri) {
+    String str = uri.toString();
+    return _getStringInfo(str);
+  }
+
+  /**
+   * Return the [CompilationUnitElement] that should be used for [element].
+   * Throw [StateError] if the [element] is not linked into a unit.
+   */
+  static CompilationUnitElement getUnitElement(Element element) {
+    for (Element e = element; e != null; e = e.enclosingElement) {
+      if (e is CompilationUnitElement) {
+        return e;
+      }
+      if (e is LibraryElement) {
+        return e.definingCompilationUnit;
+      }
+    }
+    throw new StateError(element.toString());
+  }
+
+  /**
+   * Return a new [ElementInfo] for the given [element] in the given [unitId].
+   * This method is static, so it cannot add any information to the index.
+   */
+  static ElementInfo newElementInfo(int unitId, Element element) {
+    IndexSyntheticElementKind kind = IndexSyntheticElementKind.notSynthetic;
+    if (element.isSynthetic) {
+      if (element is ConstructorElement) {
+        kind = IndexSyntheticElementKind.constructor;
+        element = element.enclosingElement;
+      } else if (element is FunctionElement && element.name == 'loadLibrary') {
+        kind = IndexSyntheticElementKind.loadLibrary;
+        element = element.library;
+      } else if (element is FieldElement) {
+        FieldElement field = element;
+        kind = IndexSyntheticElementKind.field;
+        element = field.getter;
+        element ??= field.setter;
+      } else if (element is PropertyAccessorElement) {
+        PropertyAccessorElement accessor = element;
+        Element enclosing = element.enclosingElement;
+        bool isEnumGetter = enclosing is ClassElement && enclosing.isEnum;
+        if (isEnumGetter && accessor.name == 'index') {
+          kind = IndexSyntheticElementKind.enumIndex;
+          element = enclosing;
+        } else if (isEnumGetter && accessor.name == 'values') {
+          kind = IndexSyntheticElementKind.enumValues;
+          element = enclosing;
+        } else {
+          kind = accessor.isGetter
+              ? IndexSyntheticElementKind.getter
+              : IndexSyntheticElementKind.setter;
+          element = accessor.variable;
+        }
+      } else if (element is TopLevelVariableElement) {
+        TopLevelVariableElement property = element;
+        kind = IndexSyntheticElementKind.topLevelVariable;
+        element = property.getter;
+        element ??= property.setter;
+      } else {
+        throw new ArgumentError(
+            'Unsupported synthetic element ${element.runtimeType}');
+      }
+    }
+    int offset = element.nameOffset;
+    if (element is LibraryElement || element is CompilationUnitElement) {
+      offset = 0;
+    }
+    return new ElementInfo(unitId, offset, kind);
+  }
+}
+
+/**
+ * Information about a single defined name.  Any [_DefinedNameInfo] is always
+ * part of a [_UnitIndexAssembler], so [offset] should be understood within the
+ * context of the compilation unit pointed to by the [_UnitIndexAssembler].
+ */
+class _DefinedNameInfo {
+  /**
+   * The information about the name returned from
+   * [PackageIndexAssembler._getStringInfo].
+   */
+  final _StringInfo nameInfo;
+
+  /**
+   * The coarse-grained kind of the defined name.
+   */
+  final IndexNameKind kind;
+
+  /**
+   * The name offset of the defined element.
+   */
+  final int offset;
+
+  _DefinedNameInfo(this.nameInfo, this.kind, this.offset);
 }
 
 /**
@@ -238,7 +283,7 @@
  * [_UnitIndexAssembler].
  */
 class _ElementRelationInfo {
-  final _ElementInfo elementInfo;
+  final ElementInfo elementInfo;
   final IndexRelationKind kind;
   final int offset;
   final int length;
@@ -251,33 +296,20 @@
 /**
  * Visits a resolved AST and adds relationships into [_UnitIndexAssembler].
  */
-class _IndexContributor extends GeneralizingAstVisitor {
-  final _UnitIndexAssembler assembler;
+class _IndexContributor extends _IndexDeclarationContributor {
+  _IndexContributor(_UnitIndexAssembler assembler) : super(assembler);
 
-  _IndexContributor(this.assembler);
-
-  /**
-   * Record definition of the given [element].
-   */
-  void recordDefinedElement(Element element) {
-    if (element != null) {
-      String name = element.displayName;
-      int offset = element.nameOffset;
-      Element enclosing = element.enclosingElement;
-      if (enclosing is CompilationUnitElement) {
-        assembler.defineName(name, IndexNameKind.topLevel, offset);
-      } else if (enclosing is ClassElement) {
-        assembler.defineName(name, IndexNameKind.classMember, offset);
-      }
-    }
+  void recordIsAncestorOf(Element descendant) {
+    _recordIsAncestorOf(descendant, descendant, false, <ClassElement>[]);
   }
 
   /**
    * Record that the name [node] has a relation of the given [kind].
    */
-  void recordNameRelation(SimpleIdentifier node, IndexRelationKind kind) {
+  void recordNameRelation(
+      SimpleIdentifier node, IndexRelationKind kind, bool isQualified) {
     if (node != null) {
-      assembler.addNameRelation(node.name, kind, node.offset);
+      assembler.addNameRelation(node.name, kind, node.offset, isQualified);
     }
   }
 
@@ -311,15 +343,20 @@
   void recordRelationOffset(Element element, IndexRelationKind kind, int offset,
       int length, bool isQualified) {
     // Ignore elements that can't be referenced outside of the unit.
-    if (element == null ||
-        element is FunctionElement &&
+    ElementKind elementKind = element?.kind;
+    if (elementKind == null ||
+        elementKind == ElementKind.DYNAMIC ||
+        elementKind == ElementKind.LABEL ||
+        elementKind == ElementKind.LOCAL_VARIABLE ||
+        elementKind == ElementKind.PREFIX ||
+        elementKind == ElementKind.TYPE_PARAMETER ||
+        elementKind == ElementKind.FUNCTION &&
+            element is FunctionElement &&
             element.enclosingElement is ExecutableElement ||
-        element is LabelElement ||
-        element is LocalVariableElement ||
-        element is ParameterElement &&
+        elementKind == ElementKind.PARAMETER &&
+            element is ParameterElement &&
             element.parameterKind != ParameterKind.NAMED ||
-        element is PrefixElement ||
-        element is TypeParameterElement) {
+        false) {
       return;
     }
     // Add the relation.
@@ -344,11 +381,18 @@
     Identifier name = typeName?.name;
     if (name != null) {
       Element element = name.staticElement;
-      SimpleIdentifier relNode =
-          name is PrefixedIdentifier ? name.identifier : name;
-      recordRelation(element, kind, relNode, true);
+      bool isQualified;
+      SimpleIdentifier relNode;
+      if (name is PrefixedIdentifier) {
+        isQualified = true;
+        relNode = name.identifier;
+      } else {
+        isQualified = false;
+        relNode = name;
+      }
+      recordRelation(element, kind, relNode, isQualified);
       recordRelation(
-          element, IndexRelationKind.IS_REFERENCED_BY, relNode, true);
+          element, IndexRelationKind.IS_REFERENCED_BY, relNode, isQualified);
       typeName.typeArguments?.accept(this);
     }
   }
@@ -377,16 +421,22 @@
       recordRelationOffset(objectElement, IndexRelationKind.IS_EXTENDED_BY,
           node.name.offset, 0, true);
     }
+    recordIsAncestorOf(node.element);
     super.visitClassDeclaration(node);
   }
 
   @override
+  visitClassTypeAlias(ClassTypeAlias node) {
+    recordIsAncestorOf(node.element);
+    super.visitClassTypeAlias(node);
+  }
+
+  @override
   visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
     SimpleIdentifier fieldName = node.fieldName;
     if (fieldName != null) {
       Element element = fieldName.staticElement;
-      recordRelation(
-          element, IndexRelationKind.IS_REFERENCED_BY, fieldName, true);
+      recordRelation(element, IndexRelationKind.IS_WRITTEN_BY, fieldName, true);
     }
     node.expression?.accept(this);
   }
@@ -406,7 +456,7 @@
       recordRelationOffset(
           element, IndexRelationKind.IS_REFERENCED_BY, offset, 0, true);
     }
-    super.visitConstructorName(node);
+    node.type.accept(this);
   }
 
   @override
@@ -446,13 +496,16 @@
   }
 
   @override
+  visitLibraryIdentifier(LibraryIdentifier node) {}
+
+  @override
   visitMethodInvocation(MethodInvocation node) {
     SimpleIdentifier name = node.methodName;
     Element element = name.bestElement;
-    // qualified unresolved name invocation
+    // unresolved name invocation
     bool isQualified = node.realTarget != null;
-    if (isQualified && element == null) {
-      recordNameRelation(name, IndexRelationKind.IS_INVOKED_BY);
+    if (element == null) {
+      recordNameRelation(name, IndexRelationKind.IS_INVOKED_BY, isQualified);
     }
     // element invocation
     IndexRelationKind kind = element is ClassElement
@@ -500,21 +553,40 @@
 
   @override
   visitSimpleIdentifier(SimpleIdentifier node) {
-    Element element = node.bestElement;
     // name in declaration
     if (node.inDeclarationContext()) {
+      Element element = node.staticElement;
       recordDefinedElement(element);
       return;
     }
-    // record qualified unresolved name reference
+    Element element = node.bestElement;
+    // record unresolved name reference
     bool isQualified = _isQualified(node);
-    if (isQualified && element == null) {
-      recordNameRelation(node, IndexRelationKind.IS_REFERENCED_BY);
+    if (element == null) {
+      bool inGetterContext = node.inGetterContext();
+      bool inSetterContext = node.inSetterContext();
+      IndexRelationKind kind;
+      if (inGetterContext && inSetterContext) {
+        kind = IndexRelationKind.IS_READ_WRITTEN_BY;
+      } else if (inGetterContext) {
+        kind = IndexRelationKind.IS_READ_BY;
+      } else {
+        kind = IndexRelationKind.IS_WRITTEN_BY;
+      }
+      recordNameRelation(node, kind, isQualified);
     }
     // this.field parameter
     if (element is FieldFormalParameterElement) {
-      recordRelation(
-          element.field, IndexRelationKind.IS_REFERENCED_BY, node, true);
+      AstNode parent = node.parent;
+      IndexRelationKind kind =
+          parent is FieldFormalParameter && parent.identifier == node
+              ? IndexRelationKind.IS_WRITTEN_BY
+              : IndexRelationKind.IS_REFERENCED_BY;
+      recordRelation(element.field, kind, node, true);
+      return;
+    }
+    // ignore a local reference to a parameter
+    if (element is ParameterElement && node.parent is! Label) {
       return;
     }
     // record specific relations
@@ -535,7 +607,7 @@
       recordRelationOffset(
           element, IndexRelationKind.IS_REFERENCED_BY, offset, 0, true);
     }
-    super.visitSuperConstructorInvocation(node);
+    node.argumentList?.accept(this);
   }
 
   @override
@@ -586,6 +658,71 @@
     AstNode parent = node.parent;
     return parent is Combinator || parent is Label;
   }
+
+  void _recordIsAncestorOf(Element descendant, ClassElement ancestor,
+      bool includeThis, List<ClassElement> visitedElements) {
+    if (ancestor == null) {
+      return;
+    }
+    if (visitedElements.contains(ancestor)) {
+      return;
+    }
+    visitedElements.add(ancestor);
+    if (includeThis) {
+      int offset = descendant.nameOffset;
+      int length = descendant.nameLength;
+      assembler.addElementRelation(
+          ancestor, IndexRelationKind.IS_ANCESTOR_OF, offset, length, false);
+    }
+    {
+      InterfaceType superType = ancestor.supertype;
+      if (superType != null) {
+        _recordIsAncestorOf(
+            descendant, superType.element, true, visitedElements);
+      }
+    }
+    for (InterfaceType mixinType in ancestor.mixins) {
+      _recordIsAncestorOf(descendant, mixinType.element, true, visitedElements);
+    }
+    for (InterfaceType implementedType in ancestor.interfaces) {
+      _recordIsAncestorOf(
+          descendant, implementedType.element, true, visitedElements);
+    }
+  }
+}
+
+/**
+ * Visits a resolved AST and adds relationships into [_UnitIndexAssembler].
+ */
+class _IndexDeclarationContributor extends GeneralizingAstVisitor {
+  final _UnitIndexAssembler assembler;
+
+  _IndexDeclarationContributor(this.assembler);
+
+  /**
+   * Record definition of the given [element].
+   */
+  void recordDefinedElement(Element element) {
+    if (element != null) {
+      String name = element.displayName;
+      int offset = element.nameOffset;
+      Element enclosing = element.enclosingElement;
+      if (enclosing is CompilationUnitElement) {
+        assembler.defineName(name, IndexNameKind.topLevel, offset);
+      } else if (enclosing is ClassElement) {
+        assembler.defineName(name, IndexNameKind.classMember, offset);
+      }
+    }
+  }
+
+  @override
+  visitSimpleIdentifier(SimpleIdentifier node) {
+    if (node.inDeclarationContext()) {
+      Element element = node.staticElement;
+      recordDefinedElement(element);
+      return;
+    }
+  }
 }
 
 /**
@@ -595,13 +732,33 @@
  */
 class _NameRelationInfo {
   /**
-   * The identifier of the name returned [PackageIndexAssembler._getStringId].
+   * The information about the name returned from
+   * [PackageIndexAssembler._getStringInfo].
    */
-  final int nameId;
+  final _StringInfo nameInfo;
   final IndexRelationKind kind;
   final int offset;
+  final bool isQualified;
 
-  _NameRelationInfo(this.nameId, this.kind, this.offset);
+  _NameRelationInfo(this.nameInfo, this.kind, this.offset, this.isQualified);
+}
+
+/**
+ * Information about a string referenced in the index.
+ */
+class _StringInfo {
+  /**
+   * The value of the string.
+   */
+  final String value;
+
+  /**
+   * The unique id of the string.  It is set after indexing of the whole
+   * package is done and we are assembling the full package index.
+   */
+  int id;
+
+  _StringInfo(this.value);
 }
 
 /**
@@ -612,7 +769,7 @@
  *    compilation unit.
  *  - Call [addNameRelation] for each name relation found in the
  *    compilation unit.
- *  - Assign ids to all the [_ElementInfo] objects reachable from
+ *  - Assign ids to all the [ElementInfo] objects reachable from
  *    [elementRelations].
  *  - Call [assemble] to produce the final unit index.
  */
@@ -628,15 +785,16 @@
   void addElementRelation(Element element, IndexRelationKind kind, int offset,
       int length, bool isQualified) {
     try {
-      _ElementInfo elementInfo = pkg._getElementInfo(element);
+      ElementInfo elementInfo = pkg._getElementInfo(element);
       elementRelations.add(new _ElementRelationInfo(
           elementInfo, kind, offset, length, isQualified));
     } on StateError {}
   }
 
-  void addNameRelation(String name, IndexRelationKind kind, int offset) {
-    int nameId = pkg._getStringId(name);
-    nameRelations.add(new _NameRelationInfo(nameId, kind, offset));
+  void addNameRelation(
+      String name, IndexRelationKind kind, int offset, bool isQualified) {
+    _StringInfo nameId = pkg._getStringInfo(name);
+    nameRelations.add(new _NameRelationInfo(nameId, kind, offset, isQualified));
   }
 
   /**
@@ -645,17 +803,17 @@
    */
   UnitIndexBuilder assemble() {
     definedNames.sort((a, b) {
-      return a.nameId - b.nameId;
+      return a.nameInfo.id - b.nameInfo.id;
     });
     elementRelations.sort((a, b) {
       return a.elementInfo.id - b.elementInfo.id;
     });
     nameRelations.sort((a, b) {
-      return a.nameId - b.nameId;
+      return a.nameInfo.id - b.nameInfo.id;
     });
     return new UnitIndexBuilder(
         unit: unitId,
-        definedNames: definedNames.map((n) => n.nameId).toList(),
+        definedNames: definedNames.map((n) => n.nameInfo.id).toList(),
         definedNameKinds: definedNames.map((n) => n.kind).toList(),
         definedNameOffsets: definedNames.map((n) => n.offset).toList(),
         usedElements: elementRelations.map((r) => r.elementInfo.id).toList(),
@@ -664,13 +822,15 @@
         usedElementLengths: elementRelations.map((r) => r.length).toList(),
         usedElementIsQualifiedFlags:
             elementRelations.map((r) => r.isQualified).toList(),
-        usedNames: nameRelations.map((r) => r.nameId).toList(),
+        usedNames: nameRelations.map((r) => r.nameInfo.id).toList(),
         usedNameKinds: nameRelations.map((r) => r.kind).toList(),
-        usedNameOffsets: nameRelations.map((r) => r.offset).toList());
+        usedNameOffsets: nameRelations.map((r) => r.offset).toList(),
+        usedNameIsQualifiedFlags:
+            nameRelations.map((r) => r.isQualified).toList());
   }
 
   void defineName(String name, IndexNameKind kind, int offset) {
-    int nameId = pkg._getStringId(name);
-    definedNames.add(new _DefinedNameInfo(nameId, kind, offset));
+    _StringInfo nameInfo = pkg._getStringInfo(name);
+    definedNames.add(new _DefinedNameInfo(nameInfo, kind, offset));
   }
 }
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
new file mode 100644
index 0000000..8d7d33e
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -0,0 +1,3966 @@
+// 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.
+
+/**
+ * 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
+ * scanning the element model to gather linked information and adding
+ * it to the summary data structures.
+ *
+ * The reason we use a miniature element model to do the linking
+ * (rather than resynthesizing the full element model from the
+ * summaries) is that it is expected that we will only need to
+ * traverse a small subset of the element properties in order to link.
+ * Resynthesizing only those properties that we need should save
+ * substantial CPU time.
+ *
+ * The element model implements the same interfaces as the full
+ * element model, so we can re-use code elsewhere in the analysis
+ * engine to do the linking.  However, only a small subset of the
+ * methods and getters defined in the full element model are
+ * implemented here.  To avoid static warnings, each element model
+ * class contains an implementation of `noSuchMethod`.
+ *
+ * The miniature element model follows the following design
+ * principles:
+ *
+ * - With few exceptions, resynthesis is done incrementally on demand,
+ *   so that we don't pay the cost of resynthesizing elements (or
+ *   properties of elements) that aren't referenced from a part of the
+ *   element model that is relevant to linking.
+ *
+ * - Computation of values in the miniature element model is similar
+ *   to the task model, but much lighter weight.  Instead of declaring
+ *   tasks and their relationships using classes, each task is simply
+ *   a method (frequently a getter) that computes a value.  Instead of
+ *   using a general purpose cache, values are cached by the methods
+ *   themselves in private fields (with `null` typically representing
+ *   "not yet cached").
+ *
+ * - No attempt is made to detect cyclic dependencies due to bugs in
+ *   the analyzer.  This saves time because dependency evaluation
+ *   doesn't have to be a separate step from evaluating a value; we
+ *   can simply call the getter.
+ *
+ * - However, for cases where cyclic dependencies may occur in the
+ *   absence of analyzer bugs (e.g. because of errors in the code
+ *   being analyzed, or cycles between top level and static variables
+ *   undergoing type inference), we do precompute dependencies, and we
+ *   use Tarjan's strongly connected components algorithm to detect
+ *   cycles.
+ *
+ * - As much as possible, bookkeeping data is pointed to directly by
+ *   the element objects, rather than being stored in maps.
+ *
+ * - Where possible, we favor method dispatch instead of "is" and "as"
+ *   checks.  E.g. see [ReferenceableElementForLink.asConstructor].
+ */
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart' show TokenType;
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/constant/value.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/prelink.dart';
+import 'package:analyzer/src/task/strong_mode.dart';
+
+bool isIncrementOrDecrement(UnlinkedExprAssignOperator operator) {
+  switch (operator) {
+    case UnlinkedExprAssignOperator.prefixDecrement:
+    case UnlinkedExprAssignOperator.prefixIncrement:
+    case UnlinkedExprAssignOperator.postfixDecrement:
+    case UnlinkedExprAssignOperator.postfixIncrement:
+      return true;
+    default:
+      return false;
+  }
+}
+
+/**
+ * Link together the build unit consisting of [libraryUris], using
+ * [getDependency] to fetch the [LinkedLibrary] objects from other
+ * build units, and [getUnit] to fetch the [UnlinkedUnit] objects from
+ * both this build unit and other build units.
+ *
+ * The [strong] flag controls whether type inference is performed in strong
+ * mode or spec mode.  Note that in spec mode, the only types that are inferred
+ * are the types of initializing formals, which are inferred from the types of
+ * the corresponding fields.
+ *
+ * A map is returned whose keys are the URIs of the libraries in this
+ * build unit, and whose values are the corresponding
+ * [LinkedLibraryBuilder]s.
+ */
+Map<String, LinkedLibraryBuilder> link(Set<String> libraryUris,
+    GetDependencyCallback getDependency, GetUnitCallback getUnit, bool strong) {
+  Map<String, LinkedLibraryBuilder> linkedLibraries =
+      setupForLink(libraryUris, getUnit);
+  relink(linkedLibraries, getDependency, getUnit, strong);
+  return linkedLibraries;
+}
+
+/**
+ * Given [libraries] (a map from URI to [LinkedLibraryBuilder]
+ * containing correct prelinked information), rebuild linked
+ * information, using [getDependency] to fetch the [LinkedLibrary]
+ * objects from other build units, and [getUnit] to fetch the
+ * [UnlinkedUnit] objects from both this build unit and other build
+ * units.
+ *
+ * The [strong] flag controls whether type inference is performed in strong
+ * mode or spec mode.  Note that in spec mode, the only types that are inferred
+ * are the types of initializing formals, which are inferred from the types of
+ * the corresponding fields.
+ */
+void relink(Map<String, LinkedLibraryBuilder> libraries,
+    GetDependencyCallback getDependency, GetUnitCallback getUnit, bool strong) {
+  new Linker(libraries, getDependency, getUnit, strong).link();
+}
+
+/**
+ * Prepare to link together the build unit consisting of [libraryUris], using
+ * [getUnit] to fetch the [UnlinkedUnit] objects from both this build unit and
+ * other build units.
+ *
+ * The libraries are prelinked, and a map is returned whose keys are the URIs of
+ * the libraries in this build unit, and whose values are the corresponding
+ * [LinkedLibraryBuilder]s.
+ */
+Map<String, LinkedLibraryBuilder> setupForLink(
+    Set<String> libraryUris, GetUnitCallback getUnit) {
+  Map<String, LinkedLibraryBuilder> linkedLibraries =
+      <String, LinkedLibraryBuilder>{};
+  for (String absoluteUri in libraryUris) {
+    Uri uri = Uri.parse(absoluteUri);
+    UnlinkedUnit getRelativeUnit(String relativeUri) =>
+        getUnit(resolveRelativeUri(uri, Uri.parse(relativeUri)).toString());
+    linkedLibraries[absoluteUri] = prelink(
+        getUnit(absoluteUri),
+        getRelativeUnit,
+        (String relativeUri) => getRelativeUnit(relativeUri)?.publicNamespace);
+  }
+  return linkedLibraries;
+}
+
+/**
+ * Create an [EntityRefBuilder] representing the given [type], in a form
+ * suitable for inclusion in [LinkedUnit.types].  [compilationUnit] is the
+ * compilation unit in which the type will be used.  If [slot] is provided, it
+ * is stored in [EntityRefBuilder.slot].
+ */
+EntityRefBuilder _createLinkedType(
+    DartType type,
+    CompilationUnitElementInBuildUnit compilationUnit,
+    TypeParameterizedElementForLink typeParameterContext,
+    {int slot}) {
+  EntityRefBuilder result = new EntityRefBuilder(slot: slot);
+  if (type is InterfaceType) {
+    ClassElementForLink element = type.element;
+    result.reference = compilationUnit.addReference(element);
+    if (type.typeArguments.isNotEmpty) {
+      result.typeArguments = type.typeArguments
+          .map((DartType t) =>
+              _createLinkedType(t, compilationUnit, typeParameterContext))
+          .toList();
+    }
+    return result;
+  } else if (type is DynamicTypeImpl) {
+    result.reference = compilationUnit.addRawReference('dynamic');
+    return result;
+  } else if (type is VoidTypeImpl) {
+    result.reference = compilationUnit.addRawReference('void');
+    return result;
+  } else if (type is BottomTypeImpl) {
+    result.reference = compilationUnit.addRawReference('*bottom*');
+    return result;
+  } else if (type is TypeParameterType) {
+    TypeParameterElementForLink element = type.element;
+    result.paramReference =
+        typeParameterContext.typeParameterNestingLevel - element.nestingLevel;
+    return result;
+  } else if (type is FunctionType) {
+    Element element = type.element;
+    if (element is FunctionElementForLink_FunctionTypedParam) {
+      result.reference =
+          compilationUnit.addReference(element.enclosingExecutable);
+      result.implicitFunctionTypeIndices = element.implicitFunctionTypeIndices;
+      if (type.typeArguments.isNotEmpty) {
+        result.typeArguments = type.typeArguments
+            .map((DartType t) =>
+                _createLinkedType(t, compilationUnit, typeParameterContext))
+            .toList();
+      }
+      return result;
+    }
+    if (element is MethodElementForLink) {
+      result.reference = compilationUnit.addReference(element);
+      if (type.typeArguments.isNotEmpty) {
+        result.typeArguments = type.typeArguments
+            .map((DartType t) =>
+                _createLinkedType(t, compilationUnit, typeParameterContext))
+            .toList();
+      }
+      return result;
+    }
+    // TODO(paulberry): implement other cases.
+    throw new UnimplementedError('${element.runtimeType}');
+  }
+  // TODO(paulberry): implement other cases.
+  throw new UnimplementedError('${type.runtimeType}');
+}
+
+/**
+ * Type of the callback used by [link] and [relink] to request
+ * [LinkedLibrary] objects from other build units.
+ */
+typedef LinkedLibrary GetDependencyCallback(String absoluteUri);
+
+/**
+ * Type of the callback used by [link] and [relink] to request
+ * [UnlinkedUnit] objects.
+ */
+typedef UnlinkedUnit GetUnitCallback(String absoluteUri);
+
+/**
+ * Element representing a class or enum resynthesized from a summary
+ * during linking.
+ */
+abstract class ClassElementForLink
+    implements ClassElementImpl, ReferenceableElementForLink {
+  Map<String, ReferenceableElementForLink> _containedNames;
+
+  @override
+  final CompilationUnitElementForLink enclosingElement;
+
+  @override
+  bool hasBeenInferred;
+
+  ClassElementForLink(CompilationUnitElementForLink enclosingElement)
+      : enclosingElement = enclosingElement,
+        hasBeenInferred = !enclosingElement.isInBuildUnit;
+
+  @override
+  ConstructorElementForLink get asConstructor => unnamedConstructor;
+
+  @override
+  ConstVariableNode get asConstVariable {
+    // When a class name is used as a constant variable, it doesn't depend on
+    // anything, so it is not necessary to include it in the constant
+    // dependency graph.
+    return null;
+  }
+
+  @override
+  DartType get asStaticType =>
+      enclosingElement.enclosingElement._linker.typeProvider.typeType;
+
+  @override
+  TypeInferenceNode get asTypeInferenceNode => null;
+
+  @override
+  List<ConstructorElementForLink> get constructors;
+
+  @override
+  List<FieldElementForLink> get fields;
+
+  /**
+   * Indicates whether this is the core class `Object`.
+   */
+  bool get isObject;
+
+  @override
+  LibraryElementForLink get library => enclosingElement.library;
+
+  @override
+  String get name;
+
+  @override
+  ConstructorElementForLink get unnamedConstructor;
+
+  @override
+  ReferenceableElementForLink getContainedName(String name) {
+    if (_containedNames == null) {
+      _containedNames = <String, ReferenceableElementForLink>{};
+      // TODO(paulberry): what's the correct way to handle name conflicts?
+      for (ConstructorElementForLink constructor in constructors) {
+        _containedNames[constructor.name] = constructor;
+      }
+      for (FieldElementForLink field in fields) {
+        // TODO(paulberry): do we need to handle nonstatic fields for
+        // consistent behavior with erroneous code?
+        if (field.isStatic) {
+          _containedNames[field.name] = field;
+        }
+      }
+      // TODO(paulberry): add methods.
+    }
+    return _containedNames.putIfAbsent(
+        name, () => UndefinedElementForLink.instance);
+  }
+
+  /**
+   * Perform type inference and cycle detection on this class and
+   * store the resulting information in [compilationUnit].
+   */
+  void link(CompilationUnitElementInBuildUnit compilationUnit);
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Element representing a class resynthesized from a summary during
+ * linking.
+ */
+class ClassElementForLink_Class extends ClassElementForLink
+    with TypeParameterizedElementForLink {
+  /**
+   * The unlinked representation of the class in the summary.
+   */
+  final UnlinkedClass _unlinkedClass;
+
+  List<ConstructorElementForLink> _constructors;
+  ConstructorElementForLink _unnamedConstructor;
+  bool _unnamedConstructorComputed = false;
+  List<FieldElementForLink_ClassField> _fields;
+  InterfaceType _supertype;
+  InterfaceType _type;
+  List<MethodElementForLink> _methods;
+  List<InterfaceType> _mixins;
+  List<InterfaceType> _interfaces;
+  List<PropertyAccessorElement> _accessors;
+
+  ClassElementForLink_Class(
+      CompilationUnitElementForLink enclosingElement, this._unlinkedClass)
+      : super(enclosingElement);
+
+  @override
+  List<PropertyAccessorElement> get accessors {
+    if (_accessors == null) {
+      _accessors = <PropertyAccessorElement>[];
+      Map<String, SyntheticVariableElementForLink> syntheticVariables =
+          <String, SyntheticVariableElementForLink>{};
+      for (UnlinkedExecutable unlinkedExecutable
+          in _unlinkedClass.executables) {
+        if (unlinkedExecutable.kind == UnlinkedExecutableKind.getter ||
+            unlinkedExecutable.kind == UnlinkedExecutableKind.setter) {
+          String name = unlinkedExecutable.name;
+          if (unlinkedExecutable.kind == UnlinkedExecutableKind.setter) {
+            assert(name.endsWith('='));
+            name = name.substring(0, name.length - 1);
+          }
+          SyntheticVariableElementForLink syntheticVariable = syntheticVariables
+              .putIfAbsent(name, () => new SyntheticVariableElementForLink());
+          PropertyAccessorElementForLink_Executable accessor =
+              new PropertyAccessorElementForLink_Executable(
+                  this, unlinkedExecutable, syntheticVariable);
+          _accessors.add(accessor);
+          if (unlinkedExecutable.kind == UnlinkedExecutableKind.getter) {
+            syntheticVariable._getter = accessor;
+          } else {
+            syntheticVariable._setter = accessor;
+          }
+        }
+      }
+      for (FieldElementForLink_ClassField field in fields) {
+        _accessors
+            .add(new PropertyAccessorElementForLink_Variable(field, false));
+        if (!field.isConst && !field.isFinal) {
+          _accessors
+              .add(new PropertyAccessorElementForLink_Variable(field, true));
+        }
+      }
+    }
+    return _accessors;
+  }
+
+  @override
+  List<ConstructorElementForLink> get constructors {
+    if (_constructors == null) {
+      _constructors = <ConstructorElementForLink>[];
+      for (UnlinkedExecutable unlinkedExecutable
+          in _unlinkedClass.executables) {
+        if (unlinkedExecutable.kind == UnlinkedExecutableKind.constructor) {
+          _constructors
+              .add(new ConstructorElementForLink(this, unlinkedExecutable));
+        }
+      }
+      if (_constructors.isEmpty) {
+        _unnamedConstructorComputed = true;
+        _unnamedConstructor = new ConstructorElementForLink_Synthetic(this);
+        _constructors.add(_unnamedConstructor);
+      }
+    }
+    return _constructors;
+  }
+
+  @override
+  String get displayName => _unlinkedClass.name;
+
+  @override
+  TypeParameterizedElementForLink get enclosingTypeParameterContext => null;
+
+  @override
+  List<FieldElementForLink_ClassField> get fields {
+    if (_fields == null) {
+      _fields = <FieldElementForLink_ClassField>[];
+      for (UnlinkedVariable field in _unlinkedClass.fields) {
+        _fields.add(new FieldElementForLink_ClassField(this, field));
+      }
+    }
+    return _fields;
+  }
+
+  @override
+  List<InterfaceType> get interfaces => _interfaces ??=
+      _unlinkedClass.interfaces.map(_computeInterfaceType).toList();
+
+  @override
+  bool get isObject => _unlinkedClass.hasNoSupertype;
+
+  @override
+  LibraryElementForLink get library => enclosingElement.library;
+
+  @override
+  List<MethodElementForLink> get methods {
+    if (_methods == null) {
+      _methods = <MethodElementForLink>[];
+      for (UnlinkedExecutable unlinkedExecutable
+          in _unlinkedClass.executables) {
+        if (unlinkedExecutable.kind ==
+            UnlinkedExecutableKind.functionOrMethod) {
+          _methods.add(new MethodElementForLink(this, unlinkedExecutable));
+        }
+      }
+    }
+    return _methods;
+  }
+
+  @override
+  List<InterfaceType> get mixins =>
+      _mixins ??= _unlinkedClass.mixins.map(_computeInterfaceType).toList();
+
+  @override
+  String get name => _unlinkedClass.name;
+
+  @override
+  InterfaceType get supertype {
+    if (isObject) {
+      return null;
+    }
+    return _supertype ??= _computeInterfaceType(_unlinkedClass.supertype);
+  }
+
+  @override
+  DartType get type =>
+      _type ??= buildType((int i) => typeParameterTypes[i], null);
+
+  @override
+  ConstructorElementForLink get unnamedConstructor {
+    if (!_unnamedConstructorComputed) {
+      for (ConstructorElementForLink constructor in constructors) {
+        if (constructor.name.isEmpty) {
+          _unnamedConstructor = constructor;
+          break;
+        }
+      }
+      _unnamedConstructorComputed = true;
+    }
+    return _unnamedConstructor;
+  }
+
+  @override
+  List<UnlinkedTypeParam> get _unlinkedTypeParams =>
+      _unlinkedClass.typeParameters;
+
+  @override
+  DartType buildType(
+      DartType getTypeArgument(int i), List<int> implicitFunctionTypeIndices) {
+    int numTypeParameters = _unlinkedClass.typeParameters.length;
+    if (numTypeParameters != 0) {
+      List<DartType> typeArguments = new List<DartType>(numTypeParameters);
+      for (int i = 0; i < numTypeParameters; i++) {
+        typeArguments[i] = getTypeArgument(i);
+      }
+      return new InterfaceTypeImpl.elementWithNameAndArgs(
+          this, name, typeArguments);
+    } else {
+      return _type ??= new InterfaceTypeImpl(this);
+    }
+  }
+
+  @override
+  PropertyAccessorElement getGetter(String getterName) {
+    for (PropertyAccessorElement accessor in accessors) {
+      if (accessor.isGetter && accessor.name == getterName) {
+        return accessor;
+      }
+    }
+    return null;
+  }
+
+  @override
+  MethodElement getMethod(String methodName) {
+    for (MethodElement method in methods) {
+      if (method.name == methodName) {
+        return method;
+      }
+    }
+    return null;
+  }
+
+  @override
+  void link(CompilationUnitElementInBuildUnit compilationUnit) {
+    for (ConstructorElementForLink constructorElement in constructors) {
+      constructorElement.link(compilationUnit);
+    }
+    if (library._linker.strongMode) {
+      for (MethodElementForLink methodElement in methods) {
+        methodElement.link(compilationUnit);
+      }
+      for (PropertyAccessorElementForLink propertyAccessorElement
+          in accessors) {
+        propertyAccessorElement.link(compilationUnit);
+      }
+      for (FieldElementForLink_ClassField fieldElement in fields) {
+        fieldElement.link(compilationUnit);
+      }
+    }
+  }
+
+  /**
+   * Convert [typeRef] into an [InterfaceType].
+   */
+  InterfaceType _computeInterfaceType(EntityRef typeRef) {
+    if (typeRef != null) {
+      DartType type = enclosingElement._resolveTypeRef(typeRef, this);
+      if (type is InterfaceType) {
+        return type;
+      }
+      // In the event that the `typeRef` isn't an interface type (which may
+      // happen in the event of erroneous code) just fall through and pretend
+      // the supertype is `Object`.
+    }
+    return enclosingElement.enclosingElement._linker.typeProvider.objectType;
+  }
+}
+
+/**
+ * Element representing an enum resynthesized from a summary during
+ * linking.
+ */
+class ClassElementForLink_Enum extends ClassElementForLink {
+  /**
+   * The unlinked representation of the enum in the summary.
+   */
+  final UnlinkedEnum _unlinkedEnum;
+
+  InterfaceType _type;
+  List<FieldElementForLink_EnumField> _fields;
+
+  ClassElementForLink_Enum(
+      CompilationUnitElementForLink enclosingElement, this._unlinkedEnum)
+      : super(enclosingElement);
+
+  @override
+  List<PropertyAccessorElement> get accessors {
+    // TODO(paulberry): do we need to include synthetic accessors?
+    return const [];
+  }
+
+  @override
+  List<ConstructorElementForLink> get constructors => const [];
+
+  @override
+  String get displayName => _unlinkedEnum.name;
+
+  @override
+  List<FieldElementForLink_EnumField> get fields {
+    if (_fields == null) {
+      _fields = <FieldElementForLink_EnumField>[];
+      _fields.add(new FieldElementForLink_EnumField(null, this));
+      for (UnlinkedEnumValue value in _unlinkedEnum.values) {
+        _fields.add(new FieldElementForLink_EnumField(value, this));
+      }
+    }
+    return _fields;
+  }
+
+  @override
+  List<InterfaceType> get interfaces => const [];
+
+  @override
+  bool get isObject => false;
+
+  @override
+  List<MethodElement> get methods => const [];
+
+  @override
+  List<InterfaceType> get mixins => const [];
+
+  @override
+  String get name => _unlinkedEnum.name;
+
+  @override
+  InterfaceType get supertype => library._linker.typeProvider.objectType;
+
+  @override
+  DartType get type => _type ??= new InterfaceTypeImpl(this);
+
+  @override
+  List<TypeParameterElement> get typeParameters => const [];
+
+  @override
+  ConstructorElementForLink get unnamedConstructor => null;
+
+  @override
+  DartType buildType(DartType getTypeArgument(int i),
+          List<int> implicitFunctionTypeIndices) =>
+      type;
+
+  @override
+  void link(CompilationUnitElementInBuildUnit compilationUnit) {}
+}
+
+/**
+ * Element representing a compilation unit resynthesized from a
+ * summary during linking.
+ */
+abstract class CompilationUnitElementForLink implements CompilationUnitElement {
+  /**
+   * The unlinked representation of the compilation unit in the
+   * summary.
+   */
+  final UnlinkedUnit _unlinkedUnit;
+
+  /**
+   * For each entry in [UnlinkedUnit.references], the element referred
+   * to by the reference, or `null` if it hasn't been located yet.
+   */
+  final List<ReferenceableElementForLink> _references;
+
+  List<ClassElementForLink_Class> _types;
+
+  Map<String, ReferenceableElementForLink> _containedNames;
+  List<TopLevelVariableElementForLink> _topLevelVariables;
+  List<ClassElementForLink_Enum> _enums;
+
+  /**
+   * Index of this unit in the list of units in the enclosing library.
+   */
+  final int unitNum;
+
+  CompilationUnitElementForLink(
+      UnlinkedUnit unlinkedUnit, this.unitNum, int numReferences)
+      : _references = new List<ReferenceableElementForLink>(numReferences),
+        _unlinkedUnit = unlinkedUnit;
+
+  @override
+  LibraryElementForLink get enclosingElement;
+
+  @override
+  List<ClassElementForLink_Enum> get enums {
+    if (_enums == null) {
+      _enums = <ClassElementForLink_Enum>[];
+      for (UnlinkedEnum unlinkedEnum in _unlinkedUnit.enums) {
+        _enums.add(new ClassElementForLink_Enum(this, unlinkedEnum));
+      }
+    }
+    return _enums;
+  }
+
+  /**
+   * Indicates whether this compilation element is part of the build unit
+   * currently being linked.
+   */
+  bool get isInBuildUnit;
+
+  /**
+   * Determine whether type inference is complete in this compilation unit.
+   */
+  bool get isTypeInferenceComplete {
+    LibraryCycleForLink libraryCycleForLink = library.libraryCycleForLink;
+    if (libraryCycleForLink == null) {
+      return true;
+    } else {
+      return libraryCycleForLink._node.isEvaluated;
+    }
+  }
+
+  @override
+  LibraryElementForLink get library => enclosingElement;
+
+  @override
+  List<TopLevelVariableElementForLink> get topLevelVariables {
+    if (_topLevelVariables == null) {
+      _topLevelVariables = <TopLevelVariableElementForLink>[];
+      for (UnlinkedVariable unlinkedVariable in _unlinkedUnit.variables) {
+        _topLevelVariables
+            .add(new TopLevelVariableElementForLink(this, unlinkedVariable));
+      }
+    }
+    return _topLevelVariables;
+  }
+
+  @override
+  List<ClassElementForLink_Class> get types {
+    if (_types == null) {
+      _types = <ClassElementForLink_Class>[];
+      for (UnlinkedClass unlinkedClass in _unlinkedUnit.classes) {
+        _types.add(new ClassElementForLink_Class(this, unlinkedClass));
+      }
+    }
+    return _types;
+  }
+
+  /**
+   * The linked representation of the compilation unit in the summary.
+   */
+  LinkedUnit get _linkedUnit;
+
+  /**
+   * Search the unit for a top level element with the given [name].
+   * If no name is found, return the singleton instance of
+   * [UndefinedElementForLink].
+   */
+  ReferenceableElementForLink getContainedName(name) {
+    if (_containedNames == null) {
+      _containedNames = <String, ReferenceableElementForLink>{};
+      // TODO(paulberry): what's the correct way to handle name conflicts?
+      for (ClassElementForLink_Class type in types) {
+        _containedNames[type.name] = type;
+      }
+      for (ClassElementForLink_Enum enm in enums) {
+        _containedNames[enm.name] = enm;
+      }
+      for (TopLevelVariableElementForLink variable in topLevelVariables) {
+        _containedNames[variable.name] = variable;
+      }
+      // TODO(paulberry): fill in other top level entities (typedefs
+      // and executables).
+    }
+    return _containedNames.putIfAbsent(
+        name, () => UndefinedElementForLink.instance);
+  }
+
+  /**
+   * Compute the type referred to by the given linked type [slot] (interpreted
+   * relative to [typeParameterContext]).  If there is no inferred type in the
+   * given slot, `dynamic` is returned.
+   */
+  DartType getLinkedType(
+      int slot, TypeParameterizedElementForLink typeParameterContext);
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+
+  /**
+   * Return the element referred to by the given [index] in
+   * [UnlinkedUnit.references].  If the reference is unresolved,
+   * return [UndefinedElementForLink.instance].
+   */
+  ReferenceableElementForLink _resolveRef(int index) {
+    if (_references[index] == null) {
+      UnlinkedReference unlinkedReference =
+          index < _unlinkedUnit.references.length
+              ? _unlinkedUnit.references[index]
+              : null;
+      LinkedReference linkedReference = _linkedUnit.references[index];
+      String name = unlinkedReference == null
+          ? linkedReference.name
+          : unlinkedReference.name;
+      int containingReference = unlinkedReference == null
+          ? linkedReference.containingReference
+          : unlinkedReference.prefixReference;
+      if (containingReference != 0 &&
+          _linkedUnit.references[containingReference].kind !=
+              ReferenceKind.prefix) {
+        _references[index] =
+            _resolveRef(containingReference).getContainedName(name);
+      } else if (linkedReference.dependency == 0) {
+        if (name == 'void') {
+          _references[index] = enclosingElement._linker.voidElement;
+        } else if (name == '*bottom*') {
+          _references[index] = enclosingElement._linker.bottomElement;
+        } else if (name == 'dynamic') {
+          _references[index] = enclosingElement._linker.dynamicElement;
+        } else {
+          _references[index] = enclosingElement.getContainedName(name);
+        }
+      } else {
+        LibraryElementForLink dependency =
+            enclosingElement._getDependency(linkedReference.dependency);
+        _references[index] = dependency.getContainedName(name);
+      }
+    }
+    return _references[index];
+  }
+
+  /**
+   * Resolve an [EntityRef] into a type.  If the reference is
+   * unresolved, return [DynamicTypeImpl.instance].
+   *
+   * TODO(paulberry): or should we have a class representing an
+   * unresolved type, for consistency with the full element model?
+   */
+  DartType _resolveTypeRef(
+      EntityRef type, TypeParameterizedElementForLink typeParameterContext,
+      {bool defaultVoid: false}) {
+    if (type == null) {
+      if (defaultVoid) {
+        return VoidTypeImpl.instance;
+      } else {
+        return DynamicTypeImpl.instance;
+      }
+    }
+    if (type.paramReference != 0) {
+      return typeParameterContext.getTypeParameterType(type.paramReference);
+    } else if (type.syntheticReturnType != null) {
+      // TODO(paulberry): implement.
+      throw new UnimplementedError();
+    } else if (type.implicitFunctionTypeIndices.isNotEmpty) {
+      // TODO(paulberry): implement.
+      throw new UnimplementedError();
+    } else {
+      DartType getTypeArgument(int i) {
+        if (i < type.typeArguments.length) {
+          return _resolveTypeRef(type.typeArguments[i], typeParameterContext);
+        } else {
+          return DynamicTypeImpl.instance;
+        }
+      }
+      ReferenceableElementForLink element = _resolveRef(type.reference);
+      return element.buildType(
+          getTypeArgument, type.implicitFunctionTypeIndices);
+    }
+  }
+}
+
+/**
+ * Element representing a compilation unit which is part of the build
+ * unit being linked.
+ */
+class CompilationUnitElementInBuildUnit extends CompilationUnitElementForLink {
+  @override
+  final LinkedUnitBuilder _linkedUnit;
+
+  @override
+  final LibraryElementInBuildUnit enclosingElement;
+
+  CompilationUnitElementInBuildUnit(this.enclosingElement,
+      UnlinkedUnit unlinkedUnit, this._linkedUnit, int unitNum)
+      : super(unlinkedUnit, unitNum, unlinkedUnit.references.length);
+
+  @override
+  bool get isInBuildUnit => true;
+
+  @override
+  LibraryElementInBuildUnit get library => enclosingElement;
+
+  /**
+   * If this compilation unit already has a reference in its references table
+   * matching [dependency], [name], [numTypeParameters], [unitNum],
+   * [containingReference], and [kind], return its index.  Otherwise add a new reference to
+   * the table and return its index.
+   */
+  int addRawReference(String name,
+      {int dependency: 0,
+      int numTypeParameters: 0,
+      int unitNum: 0,
+      int containingReference: 0,
+      ReferenceKind kind: ReferenceKind.classOrEnum}) {
+    List<LinkedReferenceBuilder> linkedReferences = _linkedUnit.references;
+    List<UnlinkedReference> unlinkedReferences = _unlinkedUnit.references;
+    for (int i = 0; i < linkedReferences.length; i++) {
+      LinkedReferenceBuilder linkedReference = linkedReferences[i];
+      if (linkedReference.dependency == dependency &&
+          (i < unlinkedReferences.length
+                  ? unlinkedReferences[i].name
+                  : linkedReference.name) ==
+              name &&
+          linkedReference.numTypeParameters == numTypeParameters &&
+          linkedReference.unit == unitNum &&
+          (i < unlinkedReferences.length
+                  ? unlinkedReferences[i].prefixReference
+                  : linkedReference.containingReference) ==
+              containingReference &&
+          linkedReference.kind == kind) {
+        return i;
+      }
+    }
+    int result = linkedReferences.length;
+    linkedReferences.add(new LinkedReferenceBuilder(
+        dependency: dependency,
+        name: name,
+        numTypeParameters: numTypeParameters,
+        unit: unitNum,
+        containingReference: containingReference,
+        kind: kind));
+    return result;
+  }
+
+  /**
+   * If this compilation unit already has a reference in its references table
+   * to [element], return its index.  Otherwise add a new reference to the table
+   * and return its index.
+   */
+  int addReference(Element element) {
+    if (element is ClassElementForLink) {
+      return addRawReference(element.name,
+          dependency: library.addDependency(element.library),
+          numTypeParameters: element.typeParameters.length,
+          unitNum: element.enclosingElement.unitNum);
+    } else if (element is ExecutableElementForLink) {
+      // TODO(paulberry): will this code ever be executed for an executable
+      // element that's not inside a class?
+      assert(element.enclosingElement is ClassElementForLink_Class);
+      ReferenceKind kind;
+      switch (element._unlinkedExecutable.kind) {
+        case UnlinkedExecutableKind.functionOrMethod:
+          kind = ReferenceKind.method;
+          break;
+        case UnlinkedExecutableKind.setter:
+          kind = ReferenceKind.propertyAccessor;
+          break;
+        default:
+          // TODO(paulberry): implement other cases as necessary
+          throw new UnimplementedError('${element._unlinkedExecutable.kind}');
+      }
+      return addRawReference(element.name,
+          numTypeParameters: element.typeParameters.length,
+          containingReference: addReference(element.enclosingElement),
+          kind: kind);
+    }
+    // TODO(paulberry): implement other cases
+    throw new UnimplementedError('${element.runtimeType}');
+  }
+
+  @override
+  DartType getLinkedType(
+      int slot, TypeParameterizedElementForLink typeParameterContext) {
+    // This method should only be called on compilation units that come from
+    // dependencies, never on compilation units that are part of the current
+    // build unit.
+    throw new StateError(
+        'Linker tried to access linked type from current build unit');
+  }
+
+  /**
+   * Perform type inference and const cycle detection on this
+   * compilation unit.
+   */
+  void link() {
+    if (library._linker.strongMode) {
+      new InstanceMemberInferrer(enclosingElement._linker.typeProvider,
+              enclosingElement.inheritanceManager)
+          .inferCompilationUnit(this);
+      for (TopLevelVariableElementForLink variable in topLevelVariables) {
+        variable.link(this);
+      }
+    }
+    for (ClassElementForLink classElement in types) {
+      classElement.link(this);
+    }
+  }
+
+  /**
+   * Throw away any information stored in the summary by a previous call to
+   * [link].
+   */
+  void unlink() {
+    _linkedUnit.constCycles.clear();
+    _linkedUnit.references.length = _unlinkedUnit.references.length;
+    _linkedUnit.types.clear();
+  }
+
+  /**
+   * Store the fact that the given [slot] represents a constant constructor
+   * that is part of a cycle.
+   */
+  void _storeConstCycle(int slot) {
+    _linkedUnit.constCycles.add(slot);
+  }
+
+  /**
+   * Store the given [linkedType] in the given [slot] of the this compilation
+   * unit's linked type list.
+   */
+  void _storeLinkedType(int slot, DartType linkedType,
+      TypeParameterizedElementForLink typeParameterContext) {
+    if (slot != 0) {
+      if (linkedType != null && !linkedType.isDynamic) {
+        _linkedUnit.types.add(_createLinkedType(
+            linkedType, this, typeParameterContext,
+            slot: slot));
+      }
+    }
+  }
+}
+
+/**
+ * Element representing a compilation unit which is depended upon
+ * (either directly or indirectly) by the build unit being linked.
+ *
+ * TODO(paulberry): ensure that inferred types in dependencies are properly
+ * resynthesized.
+ */
+class CompilationUnitElementInDependency extends CompilationUnitElementForLink {
+  @override
+  final LinkedUnit _linkedUnit;
+
+  List<EntityRef> _linkedTypeRefs;
+
+  @override
+  final LibraryElementInDependency enclosingElement;
+
+  CompilationUnitElementInDependency(this.enclosingElement,
+      UnlinkedUnit unlinkedUnit, LinkedUnit linkedUnit, int unitNum)
+      : _linkedUnit = linkedUnit,
+        super(unlinkedUnit, unitNum, linkedUnit.references.length) {
+    // Make one pass through the linked types to determine the lengths for
+    // _linkedTypeRefs and _linkedTypes.  TODO(paulberry): add an int to the
+    // summary to make this unnecessary.
+    int maxLinkedTypeSlot = 0;
+    for (EntityRef ref in _linkedUnit.types) {
+      if (ref.slot > maxLinkedTypeSlot) {
+        maxLinkedTypeSlot = ref.slot;
+      }
+    }
+    // Initialize _linkedTypeRefs.
+    _linkedTypeRefs = new List<EntityRef>(maxLinkedTypeSlot + 1);
+    for (EntityRef ref in _linkedUnit.types) {
+      _linkedTypeRefs[ref.slot] = ref;
+    }
+  }
+
+  @override
+  bool get isInBuildUnit => false;
+
+  @override
+  DartType getLinkedType(
+      int slot, TypeParameterizedElementForLink typeParameterContext) {
+    if (slot < _linkedTypeRefs.length) {
+      return _resolveTypeRef(_linkedTypeRefs[slot], typeParameterContext);
+    } else {
+      return DynamicTypeImpl.instance;
+    }
+  }
+}
+
+/**
+ * Instance of [ConstNode] representing a constant constructor.
+ */
+class ConstConstructorNode extends ConstNode {
+  /**
+   * The [ConstructorElement] to which this node refers.
+   */
+  final ConstructorElementForLink constructorElement;
+
+  /**
+   * Once this node has been evaluated, indicates whether the
+   * constructor is free of constant evaluation cycles.
+   */
+  bool isCycleFree = false;
+
+  ConstConstructorNode(this.constructorElement);
+
+  @override
+  List<ConstNode> computeDependencies() {
+    List<ConstNode> dependencies = <ConstNode>[];
+    void safeAddDependency(ConstNode target) {
+      if (target != null) {
+        dependencies.add(target);
+      }
+    }
+    UnlinkedExecutable unlinkedExecutable =
+        constructorElement._unlinkedExecutable;
+    ClassElementForLink_Class enclosingClass =
+        constructorElement.enclosingElement;
+    ConstructorElementForLink redirectedConstructor =
+        _getFactoryRedirectedConstructor();
+    if (redirectedConstructor != null) {
+      if (redirectedConstructor._constNode != null) {
+        safeAddDependency(redirectedConstructor._constNode);
+      }
+    } else if (unlinkedExecutable.isFactory) {
+      // Factory constructor, but getConstRedirectedConstructor returned
+      // null.  This can happen if we're visiting one of the special external
+      // const factory constructors in the SDK, or if the code contains
+      // errors (such as delegating to a non-const constructor, or delegating
+      // to a constructor that can't be resolved).  In any of these cases,
+      // we'll evaluate calls to this constructor without having to refer to
+      // any other constants.  So we don't need to report any dependencies.
+    } else {
+      ClassElementForLink superClass = enclosingClass.supertype?.element;
+      bool defaultSuperInvocationNeeded = true;
+      for (UnlinkedConstructorInitializer constructorInitializer
+          in constructorElement._unlinkedExecutable.constantInitializers) {
+        if (constructorInitializer.kind ==
+            UnlinkedConstructorInitializerKind.superInvocation) {
+          defaultSuperInvocationNeeded = false;
+          if (superClass != null && !superClass.isObject) {
+            ConstructorElementForLink constructor = superClass
+                .getContainedName(constructorInitializer.name)
+                .asConstructor;
+            safeAddDependency(constructor?._constNode);
+          }
+        } else if (constructorInitializer.kind ==
+            UnlinkedConstructorInitializerKind.thisInvocation) {
+          defaultSuperInvocationNeeded = false;
+          ConstructorElementForLink constructor = constructorElement
+              .enclosingElement
+              .getContainedName(constructorInitializer.name)
+              .asConstructor;
+          safeAddDependency(constructor?._constNode);
+        }
+        CompilationUnitElementForLink compilationUnit =
+            constructorElement.enclosingElement.enclosingElement;
+        collectDependencies(
+            dependencies, constructorInitializer.expression, compilationUnit);
+        for (UnlinkedConst unlinkedConst in constructorInitializer.arguments) {
+          collectDependencies(dependencies, unlinkedConst, compilationUnit);
+        }
+      }
+
+      if (defaultSuperInvocationNeeded) {
+        // No explicit superconstructor invocation found, so we need to
+        // manually insert a reference to the implicit superconstructor.
+        if (superClass != null && !superClass.isObject) {
+          ConstructorElementForLink unnamedConstructor =
+              superClass.unnamedConstructor;
+          safeAddDependency(unnamedConstructor?._constNode);
+        }
+      }
+      for (FieldElementForLink field in enclosingClass.fields) {
+        // Note: non-static const isn't allowed but we handle it anyway so
+        // that we won't be confused by incorrect code.
+        if ((field.isFinal || field.isConst) && !field.isStatic) {
+          safeAddDependency(field.asConstVariable);
+        }
+      }
+      for (ParameterElementForLink parameterElement
+          in constructorElement.parameters) {
+        safeAddDependency(parameterElement._constNode);
+      }
+    }
+    return dependencies;
+  }
+
+  /**
+   * If [constructorElement] redirects to another constructor via a factory
+   * redirect, return the constructor it redirects to.
+   */
+  ConstructorElementForLink _getFactoryRedirectedConstructor() {
+    EntityRef redirectedConstructor =
+        constructorElement._unlinkedExecutable.redirectedConstructor;
+    if (redirectedConstructor != null) {
+      return constructorElement.enclosingElement.enclosingElement
+          ._resolveRef(redirectedConstructor.reference)
+          .asConstructor;
+    } else {
+      return null;
+    }
+  }
+}
+
+/**
+ * Specialization of [DependencyWalker] for detecting constant
+ * evaluation cycles.
+ */
+class ConstDependencyWalker extends DependencyWalker<ConstNode> {
+  @override
+  void evaluate(ConstNode v) {
+    if (v is ConstConstructorNode) {
+      v.isCycleFree = true;
+    }
+    v.isEvaluated = true;
+  }
+
+  @override
+  void evaluateScc(List<ConstNode> scc) {
+    for (ConstNode v in scc) {
+      if (v is ConstConstructorNode) {
+        v.isCycleFree = false;
+      }
+      v.isEvaluated = true;
+    }
+  }
+}
+
+/**
+ * Specialization of [Node] used to construct the constant evaluation
+ * dependency graph.
+ */
+abstract class ConstNode extends Node<ConstNode> {
+  @override
+  bool isEvaluated = false;
+
+  /**
+   * Collect the dependencies in [unlinkedConst] (which should be
+   * interpreted relative to [compilationUnit]) and store them in
+   * [dependencies].
+   */
+  void collectDependencies(
+      List<ConstNode> dependencies,
+      UnlinkedConst unlinkedConst,
+      CompilationUnitElementForLink compilationUnit) {
+    if (unlinkedConst == null) {
+      return;
+    }
+    int refPtr = 0;
+    for (UnlinkedConstOperation operation in unlinkedConst.operations) {
+      switch (operation) {
+        case UnlinkedConstOperation.pushReference:
+          EntityRef ref = unlinkedConst.references[refPtr++];
+          ConstVariableNode variable =
+              compilationUnit._resolveRef(ref.reference).asConstVariable;
+          if (variable != null) {
+            dependencies.add(variable);
+          }
+          break;
+        case UnlinkedConstOperation.makeTypedList:
+          refPtr++;
+          break;
+        case UnlinkedConstOperation.makeTypedMap:
+          refPtr += 2;
+          break;
+        case UnlinkedConstOperation.invokeConstructor:
+          EntityRef ref = unlinkedConst.references[refPtr++];
+          ConstructorElementForLink element =
+              compilationUnit._resolveRef(ref.reference).asConstructor;
+          if (element?._constNode != null) {
+            dependencies.add(element._constNode);
+          }
+          break;
+        default:
+          break;
+      }
+    }
+    assert(refPtr == unlinkedConst.references.length);
+  }
+}
+
+/**
+ * Instance of [ConstNode] representing a parameter with a default
+ * value.
+ */
+class ConstParameterNode extends ConstNode {
+  /**
+   * The [ParameterElement] to which this node refers.
+   */
+  final ParameterElementForLink parameterElement;
+
+  ConstParameterNode(this.parameterElement);
+
+  @override
+  List<ConstNode> computeDependencies() {
+    List<ConstNode> dependencies = <ConstNode>[];
+    collectDependencies(
+        dependencies,
+        parameterElement._unlinkedParam.defaultValue,
+        parameterElement.compilationUnit);
+    return dependencies;
+  }
+}
+
+/**
+ * Element representing a constructor resynthesized from a summary
+ * during linking.
+ */
+class ConstructorElementForLink extends ExecutableElementForLink
+    implements ConstructorElementImpl, ReferenceableElementForLink {
+  /**
+   * If this is a `const` constructor and the enclosing library is
+   * part of the build unit being linked, the constructor's node in
+   * the constant evaluation dependency graph.  Otherwise `null`.
+   */
+  ConstConstructorNode _constNode;
+
+  ConstructorElementForLink(ClassElementForLink_Class enclosingElement,
+      UnlinkedExecutable unlinkedExecutable)
+      : super(enclosingElement, unlinkedExecutable) {
+    if (enclosingElement.enclosingElement.isInBuildUnit &&
+        _unlinkedExecutable != null &&
+        _unlinkedExecutable.constCycleSlot != 0) {
+      _constNode = new ConstConstructorNode(this);
+    }
+  }
+
+  @override
+  ConstructorElementForLink get asConstructor => this;
+
+  @override
+  ConstVariableNode get asConstVariable => null;
+
+  @override
+  DartType get asStaticType {
+    // Referring to a constructor directly is an error, so just use
+    // `dynamic`.
+    return DynamicTypeImpl.instance;
+  }
+
+  @override
+  TypeInferenceNode get asTypeInferenceNode => null;
+
+  @override
+  bool get isCycleFree {
+    if (!_constNode.isEvaluated) {
+      new ConstDependencyWalker().walk(_constNode);
+    }
+    return _constNode.isCycleFree;
+  }
+
+  @override
+  DartType buildType(DartType getTypeArgument(int i),
+          List<int> implicitFunctionTypeIndices) =>
+      DynamicTypeImpl.instance;
+
+  @override
+  ReferenceableElementForLink getContainedName(String name) =>
+      UndefinedElementForLink.instance;
+
+  /**
+   * Perform const cycle detection on this constructor.
+   */
+  void link(CompilationUnitElementInBuildUnit compilationUnit) {
+    if (_constNode != null && !isCycleFree) {
+      compilationUnit._storeConstCycle(_unlinkedExecutable.constCycleSlot);
+    }
+    // TODO(paulberry): call super.
+  }
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * A synthetic constructor.
+ */
+class ConstructorElementForLink_Synthetic extends ConstructorElementForLink {
+  ConstructorElementForLink_Synthetic(
+      ClassElementForLink_Class enclosingElement)
+      : super(enclosingElement, null);
+
+  @override
+  String get name => '';
+
+  @override
+  List<ParameterElement> get parameters => const <ParameterElement>[];
+}
+
+/**
+ * Instance of [ConstNode] representing a constant field or constant
+ * top level variable.
+ */
+class ConstVariableNode extends ConstNode {
+  /**
+   * The [FieldElement] or [TopLevelVariableElement] to which this
+   * node refers.
+   */
+  final VariableElementForLink variableElement;
+
+  ConstVariableNode(this.variableElement);
+
+  @override
+  List<ConstNode> computeDependencies() {
+    List<ConstNode> dependencies = <ConstNode>[];
+    collectDependencies(
+        dependencies,
+        variableElement.unlinkedVariable.constExpr,
+        variableElement.compilationUnit);
+    return dependencies;
+  }
+}
+
+/**
+ * An instance of [DependencyWalker] contains the core algorithms for
+ * walking a dependency graph and evaluating nodes in a safe order.
+ */
+abstract class DependencyWalker<NodeType extends Node<NodeType>> {
+  /**
+   * Called by [walk] to evaluate a single non-cyclical node, after
+   * all that node's dependencies have been evaluated.
+   */
+  void evaluate(NodeType v);
+
+  /**
+   * Called by [walk] to evaluate a strongly connected component
+   * containing one or more nodes.  All dependencies of the strongly
+   * connected component have been evaluated.
+   */
+  void evaluateScc(List<NodeType> scc);
+
+  /**
+   * Walk the dependency graph starting at [startingPoint], finding
+   * strongly connected components and evaluating them in a safe order
+   * by calling [evaluate] and [evaluateScc].
+   *
+   * This is an implementation of Tarjan's strongly connected
+   * components algorithm
+   * (https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm).
+   */
+  void walk(NodeType startingPoint) {
+    // TODO(paulberry): consider rewriting in a non-recursive way so
+    // that long dependency chains don't cause stack overflow.
+
+    // TODO(paulberry): in the event that an exception occurs during
+    // the walk, restore the state of the [Node] data structures so
+    // that further evaluation will be safe.
+
+    // The index which will be assigned to the next node that is
+    // freshly visited.
+    int index = 1;
+
+    // Stack of nodes which have been seen so far and whose strongly
+    // connected component is still being determined.  Nodes are only
+    // popped off the stack when they are evaluated, so sometimes the
+    // stack contains nodes that were visited after the current node.
+    List<NodeType> stack = <NodeType>[];
+
+    void strongConnect(NodeType node) {
+      bool hasTrivialCycle = false;
+
+      // Assign the current node an index and add it to the stack.  We
+      // haven't seen any of its dependencies yet, so set its lowLink
+      // to its index, indicating that so far it is the only node in
+      // its strongly connected component.
+      node.index = node.lowLink = index++;
+      stack.add(node);
+
+      // Consider the node's dependencies one at a time.
+      for (NodeType dependency in node.dependencies) {
+        // If the dependency has already been evaluated, it can't be
+        // part of this node's strongly connected component, so we can
+        // skip it.
+        if (dependency.isEvaluated) {
+          continue;
+        }
+        if (identical(node, dependency)) {
+          // If a node includes itself as a dependency, there is no need to
+          // explore the dependency further.
+          hasTrivialCycle = true;
+        } else if (dependency.index == 0) {
+          // The dependency hasn't been seen yet, so recurse on it.
+          strongConnect(dependency);
+          // If the dependency's lowLink refers to a node that was
+          // visited before the current node, that means that the
+          // current node, the dependency, and the node referred to by
+          // the dependency's lowLink are all part of the same
+          // strongly connected component, so we need to update the
+          // current node's lowLink accordingly.
+          if (dependency.lowLink < node.lowLink) {
+            node.lowLink = dependency.lowLink;
+          }
+        } else {
+          // The dependency has already been seen, so it is part of
+          // the current node's strongly connected component.  If it
+          // was visited earlier than the current node's lowLink, then
+          // it is a new addition to the current node's strongly
+          // connected component, so we need to update the current
+          // node's lowLink accordingly.
+          if (dependency.index < node.lowLink) {
+            node.lowLink = dependency.index;
+          }
+        }
+      }
+
+      // If the current node's lowLink is the same as its index, then
+      // we have finished visiting a strongly connected component, so
+      // pop the stack and evaluate it before moving on.
+      if (node.lowLink == node.index) {
+        // The strongly connected component has only one node.  If there is a
+        // cycle, it's a trivial one.
+        if (identical(stack.last, node)) {
+          stack.removeLast();
+          if (hasTrivialCycle) {
+            evaluateScc(<NodeType>[node]);
+          } else {
+            evaluate(node);
+          }
+        } else {
+          // There are multiple nodes in the strongly connected
+          // component.
+          List<NodeType> scc = <NodeType>[];
+          while (true) {
+            NodeType otherNode = stack.removeLast();
+            scc.add(otherNode);
+            if (identical(otherNode, node)) {
+              break;
+            }
+          }
+          evaluateScc(scc);
+        }
+      }
+    }
+
+    // Kick off the algorithm starting with the starting point.
+    strongConnect(startingPoint);
+  }
+}
+
+/**
+ * Base class for executable elements resynthesized from a summary during
+ * linking.
+ */
+abstract class ExecutableElementForLink extends Object
+    with TypeParameterizedElementForLink
+    implements ExecutableElementImpl {
+  /**
+   * The unlinked representation of the method in the summary.
+   */
+  final UnlinkedExecutable _unlinkedExecutable;
+
+  DartType _declaredReturnType;
+  DartType _inferredReturnType;
+  FunctionTypeImpl _type;
+  List<TypeParameterElementForLink> _typeParameters;
+  String _name;
+  List<ParameterElementForLink> _parameters;
+
+  /**
+   * TODO(paulberry): this won't always be a class element.
+   */
+  @override
+  final ClassElementForLink_Class enclosingElement;
+
+  ExecutableElementForLink(this.enclosingElement, this._unlinkedExecutable);
+
+  /**
+   * Return the compilation unit in which this executable appears.
+   */
+  CompilationUnitElementForLink get compilationUnit =>
+      enclosingElement.enclosingElement;
+
+  @override
+  TypeParameterizedElementForLink get enclosingTypeParameterContext =>
+      enclosingElement;
+
+  @override
+  bool get hasImplicitReturnType => _unlinkedExecutable.returnType == null;
+
+  @override
+  bool get isStatic => _unlinkedExecutable.isStatic;
+
+  @override
+  bool get isSynthetic => false;
+
+  @override
+  LibraryElementForLink get library => enclosingElement.library;
+
+  @override
+  String get name {
+    if (_name == null) {
+      _name = _unlinkedExecutable.name;
+      if (_name == '-' && _unlinkedExecutable.parameters.isEmpty) {
+        _name = 'unary-';
+      }
+    }
+    return _name;
+  }
+
+  @override
+  List<ParameterElementForLink> get parameters {
+    if (_parameters == null) {
+      int numParameters = _unlinkedExecutable.parameters.length;
+      _parameters = new List<ParameterElementForLink>(numParameters);
+      for (int i = 0; i < numParameters; i++) {
+        UnlinkedParam unlinkedParam = _unlinkedExecutable.parameters[i];
+        _parameters[i] = new ParameterElementForLink(
+            this, unlinkedParam, this, enclosingElement.enclosingElement, i);
+      }
+    }
+    return _parameters;
+  }
+
+  @override
+  DartType get returnType {
+    if (_inferredReturnType != null) {
+      return _inferredReturnType;
+    } else if (_declaredReturnType == null) {
+      if (_unlinkedExecutable.returnType == null) {
+        if (_unlinkedExecutable.kind == UnlinkedExecutableKind.constructor) {
+          // TODO(paulberry): implement.
+          throw new UnimplementedError();
+        } else if (!compilationUnit.isInBuildUnit) {
+          _inferredReturnType = compilationUnit.getLinkedType(
+              _unlinkedExecutable.inferredReturnTypeSlot, this);
+          return _inferredReturnType;
+        } else if (_unlinkedExecutable.kind == UnlinkedExecutableKind.setter &&
+            library._linker.strongMode) {
+          // In strong mode, setters without an explicit return type are
+          // considered to return `void`.
+          _declaredReturnType = VoidTypeImpl.instance;
+        } else {
+          _declaredReturnType = DynamicTypeImpl.instance;
+        }
+      } else {
+        _declaredReturnType = enclosingElement.enclosingElement
+            ._resolveTypeRef(_unlinkedExecutable.returnType, this);
+      }
+    }
+    return _declaredReturnType;
+  }
+
+  @override
+  void set returnType(DartType inferredType) {
+    assert(_inferredReturnType == null);
+    _inferredReturnType = inferredType;
+  }
+
+  @override
+  FunctionTypeImpl get type => _type ??= new FunctionTypeImpl(this);
+
+  @override
+  List<UnlinkedTypeParam> get _unlinkedTypeParams =>
+      _unlinkedExecutable.typeParameters;
+
+  @override
+  bool isAccessibleIn(LibraryElement library) =>
+      !Identifier.isPrivateName(name) || identical(this.library, library);
+
+  /**
+   * Store the results of type inference for this method in [compilationUnit].
+   */
+  void link(CompilationUnitElementInBuildUnit compilationUnit) {
+    compilationUnit._storeLinkedType(
+        _unlinkedExecutable.inferredReturnTypeSlot, returnType, this);
+    for (ParameterElementForLink parameterElement in parameters) {
+      parameterElement.link(compilationUnit);
+    }
+  }
+}
+
+class ExprTypeComputer {
+  VariableElementForLink variable;
+  CompilationUnitElementForLink unit;
+  LibraryElementForLink library;
+  Linker linker;
+  TypeProvider typeProvider;
+  UnlinkedConst unlinkedConst;
+
+  final List<DartType> stack = <DartType>[];
+  int intPtr = 0;
+  int refPtr = 0;
+  int strPtr = 0;
+  int assignmentOperatorPtr = 0;
+
+  ExprTypeComputer(VariableElementForLink variableElement) {
+    this.variable = variableElement;
+    unit = variableElement.compilationUnit;
+    library = unit.enclosingElement;
+    linker = library._linker;
+    typeProvider = linker.typeProvider;
+    unlinkedConst = variableElement.unlinkedVariable.constExpr;
+  }
+
+  DartType compute() {
+    // Perform RPN evaluation of the constant, using a stack of inferred types.
+    for (UnlinkedConstOperation operation in unlinkedConst.operations) {
+      switch (operation) {
+        case UnlinkedConstOperation.pushInt:
+          intPtr++;
+          stack.add(typeProvider.intType);
+          break;
+        case UnlinkedConstOperation.pushLongInt:
+          int numInts = _getNextInt();
+          intPtr += numInts;
+          stack.add(typeProvider.intType);
+          break;
+        case UnlinkedConstOperation.pushDouble:
+          stack.add(typeProvider.doubleType);
+          break;
+        case UnlinkedConstOperation.pushTrue:
+        case UnlinkedConstOperation.pushFalse:
+          stack.add(typeProvider.boolType);
+          break;
+        case UnlinkedConstOperation.pushString:
+          strPtr++;
+          stack.add(typeProvider.stringType);
+          break;
+        case UnlinkedConstOperation.concatenate:
+          stack.length -= _getNextInt();
+          stack.add(typeProvider.stringType);
+          break;
+        case UnlinkedConstOperation.makeSymbol:
+          strPtr++;
+          stack.add(typeProvider.symbolType);
+          break;
+        case UnlinkedConstOperation.pushNull:
+          stack.add(BottomTypeImpl.instance);
+          break;
+        case UnlinkedConstOperation.pushReference:
+          _doPushReference();
+          break;
+        case UnlinkedConstOperation.extractProperty:
+          _doExtractProperty();
+          break;
+        case UnlinkedConstOperation.invokeConstructor:
+          _doInvokeConstructor();
+          break;
+        case UnlinkedConstOperation.makeUntypedList:
+          _doMakeUntypedList();
+          break;
+        case UnlinkedConstOperation.makeUntypedMap:
+          _doMakeUntypedMap();
+          break;
+        case UnlinkedConstOperation.makeTypedList:
+          _doMakeTypedList();
+          break;
+        case UnlinkedConstOperation.makeTypedMap:
+          _doMakeTypeMap();
+          break;
+        case UnlinkedConstOperation.not:
+          stack.length -= 1;
+          stack.add(typeProvider.boolType);
+          break;
+        case UnlinkedConstOperation.complement:
+          _computePrefixExpressionType('~');
+          break;
+        case UnlinkedConstOperation.negate:
+          _computePrefixExpressionType('unary-');
+          break;
+        case UnlinkedConstOperation.and:
+        case UnlinkedConstOperation.or:
+        case UnlinkedConstOperation.equal:
+        case UnlinkedConstOperation.notEqual:
+          stack.length -= 2;
+          stack.add(typeProvider.boolType);
+          break;
+        case UnlinkedConstOperation.bitXor:
+          _computeBinaryExpressionType(TokenType.CARET);
+          break;
+        case UnlinkedConstOperation.bitAnd:
+          _computeBinaryExpressionType(TokenType.AMPERSAND);
+          break;
+        case UnlinkedConstOperation.bitOr:
+          _computeBinaryExpressionType(TokenType.BAR);
+          break;
+        case UnlinkedConstOperation.bitShiftRight:
+          _computeBinaryExpressionType(TokenType.GT_GT);
+          break;
+        case UnlinkedConstOperation.bitShiftLeft:
+          _computeBinaryExpressionType(TokenType.LT_LT);
+          break;
+        case UnlinkedConstOperation.add:
+          _computeBinaryExpressionType(TokenType.PLUS);
+          break;
+        case UnlinkedConstOperation.subtract:
+          _computeBinaryExpressionType(TokenType.MINUS);
+          break;
+        case UnlinkedConstOperation.multiply:
+          _computeBinaryExpressionType(TokenType.STAR);
+          break;
+        case UnlinkedConstOperation.divide:
+          _computeBinaryExpressionType(TokenType.SLASH);
+          break;
+        case UnlinkedConstOperation.floorDivide:
+          _computeBinaryExpressionType(TokenType.TILDE_SLASH);
+          break;
+        case UnlinkedConstOperation.greater:
+          _computeBinaryExpressionType(TokenType.GT);
+          break;
+        case UnlinkedConstOperation.less:
+          _computeBinaryExpressionType(TokenType.LT);
+          break;
+        case UnlinkedConstOperation.greaterEqual:
+          _computeBinaryExpressionType(TokenType.GT_EQ);
+          break;
+        case UnlinkedConstOperation.lessEqual:
+          _computeBinaryExpressionType(TokenType.LT_EQ);
+          break;
+        case UnlinkedConstOperation.modulo:
+          _computeBinaryExpressionType(TokenType.PERCENT);
+          break;
+        case UnlinkedConstOperation.conditional:
+          _doConditional();
+          break;
+        case UnlinkedConstOperation.assignToRef:
+          _doAssignToRef();
+          break;
+        case UnlinkedConstOperation.assignToProperty:
+          _doAssignToProperty();
+          break;
+        case UnlinkedConstOperation.assignToIndex:
+          _doAssignToIndex();
+          break;
+        case UnlinkedConstOperation.extractIndex:
+          _doExtractIndex();
+          break;
+        case UnlinkedConstOperation.invokeMethodRef:
+          _doInvokeMethodRef();
+          break;
+        case UnlinkedConstOperation.invokeMethod:
+          _doInvokeMethod();
+          break;
+        case UnlinkedConstOperation.cascadeSectionBegin:
+          stack.add(stack.last);
+          break;
+        case UnlinkedConstOperation.cascadeSectionEnd:
+          stack.removeLast();
+          break;
+        case UnlinkedConstOperation.typeCast:
+          stack.removeLast();
+          DartType type = _getNextTypeRef();
+          stack.add(type);
+          break;
+        case UnlinkedConstOperation.typeCheck:
+          stack.removeLast();
+          refPtr++;
+          stack.add(typeProvider.boolType);
+          break;
+        case UnlinkedConstOperation.throwException:
+          stack.removeLast();
+          stack.add(BottomTypeImpl.instance);
+          break;
+        default:
+          // TODO(paulberry): implement.
+          throw new UnimplementedError('$operation');
+      }
+    }
+    assert(intPtr == unlinkedConst.ints.length);
+    assert(refPtr == unlinkedConst.references.length);
+    assert(strPtr == unlinkedConst.strings.length);
+    assert(assignmentOperatorPtr == unlinkedConst.assignmentOperators.length);
+    assert(stack.length == 1);
+    return _dynamicIfNull(stack[0]);
+  }
+
+  void _computeBinaryExpressionType(TokenType operator) {
+    DartType right = stack.removeLast();
+    DartType left = stack.removeLast();
+    _pushBinaryOperatorType(left, operator, right);
+  }
+
+  void _computePrefixExpressionType(String operatorName) {
+    DartType operand = stack.removeLast();
+    if (operand is InterfaceType) {
+      MethodElement method = operand.lookUpMethod(operatorName, library);
+      if (method != null) {
+        DartType type = method.returnType;
+        stack.add(type);
+        return;
+      }
+    }
+    stack.add(DynamicTypeImpl.instance);
+  }
+
+  void _doAssignToIndex() {
+    stack.removeLast();
+    stack.removeLast();
+    UnlinkedExprAssignOperator operator =
+        unlinkedConst.assignmentOperators[assignmentOperatorPtr++];
+    if (operator == UnlinkedExprAssignOperator.assign) {
+      // The type of the assignment is the type of the value,
+      // which is already in the stack.
+    } else if (isIncrementOrDecrement(operator)) {
+      // TODO(scheglov) implement
+      stack.add(DynamicTypeImpl.instance);
+    } else {
+      stack.removeLast();
+      // TODO(scheglov) implement
+      stack.add(DynamicTypeImpl.instance);
+    }
+  }
+
+  void _doAssignToProperty() {
+    DartType targetType = stack.removeLast();
+    String propertyName = _getNextString();
+    UnlinkedExprAssignOperator assignOperator =
+        unlinkedConst.assignmentOperators[assignmentOperatorPtr++];
+    if (assignOperator == UnlinkedExprAssignOperator.assign) {
+      // The type of the assignment is the type of the value,
+      // which is already in the stack.
+    } else if (assignOperator == UnlinkedExprAssignOperator.postfixDecrement ||
+        assignOperator == UnlinkedExprAssignOperator.postfixIncrement) {
+      DartType propertyType = _getPropertyType(targetType, propertyName);
+      stack.add(propertyType);
+    } else if (assignOperator == UnlinkedExprAssignOperator.prefixDecrement) {
+      _pushPropertyBinaryExpression(
+          targetType, propertyName, TokenType.MINUS, typeProvider.intType);
+    } else if (assignOperator == UnlinkedExprAssignOperator.prefixIncrement) {
+      _pushPropertyBinaryExpression(
+          targetType, propertyName, TokenType.PLUS, typeProvider.intType);
+    } else {
+      TokenType binaryOperator =
+          _convertAssignOperatorToTokenType(assignOperator);
+      DartType operandType = stack.removeLast();
+      _pushPropertyBinaryExpression(
+          targetType, propertyName, binaryOperator, operandType);
+    }
+  }
+
+  void _doAssignToRef() {
+    refPtr++;
+    UnlinkedExprAssignOperator operator =
+        unlinkedConst.assignmentOperators[assignmentOperatorPtr++];
+    if (operator == UnlinkedExprAssignOperator.assign) {
+      // The type of the assignment is the type of the value,
+      // which is already in the stack.
+    } else if (isIncrementOrDecrement(operator)) {
+      // TODO(scheglov) implement
+      stack.add(DynamicTypeImpl.instance);
+    } else {
+      stack.removeLast();
+      // TODO(scheglov) implement
+      stack.add(DynamicTypeImpl.instance);
+    }
+  }
+
+  void _doConditional() {
+    DartType elseType = stack.removeLast();
+    DartType thenType = stack.removeLast();
+    stack.removeLast();
+    DartType type = _leastUpperBound(thenType, elseType);
+    type = _dynamicIfNull(type);
+    stack.add(type);
+  }
+
+  void _doExtractIndex() {
+    stack.removeLast(); // index
+    DartType target = stack.removeLast();
+    stack.add(() {
+      if (target is InterfaceType) {
+        MethodElement method = target.lookUpMethod('[]', library);
+        if (method != null) {
+          return method.returnType;
+        }
+      }
+      return DynamicTypeImpl.instance;
+    }());
+  }
+
+  void _doExtractProperty() {
+    DartType target = stack.removeLast();
+    String propertyName = _getNextString();
+    stack.add(() {
+      if (target is InterfaceType) {
+        PropertyAccessorElement getter =
+            target.lookUpGetter(propertyName, library);
+        if (getter != null) {
+          return getter.returnType;
+        }
+        MethodElement method = target.lookUpMethod(propertyName, library);
+        if (method != null) {
+          return method.type;
+        }
+      }
+      return DynamicTypeImpl.instance;
+    }());
+  }
+
+  void _doInvokeConstructor() {
+    int numNamed = _getNextInt();
+    int numPositional = _getNextInt();
+    // TODO(paulberry): don't just pop the args; use their types
+    // to infer the type of type arguments.
+    stack.length -= numNamed + numPositional;
+    strPtr += numNamed;
+    EntityRef ref = unlinkedConst.references[refPtr++];
+    ConstructorElementForLink element =
+        unit._resolveRef(ref.reference).asConstructor;
+    if (element != null) {
+      stack.add(element.enclosingElement.buildType(
+          (int i) => i >= ref.typeArguments.length
+              ? DynamicTypeImpl.instance
+              : unit._resolveTypeRef(
+                  ref.typeArguments[i], variable._typeParameterContext),
+          const []));
+    } else {
+      stack.add(DynamicTypeImpl.instance);
+    }
+  }
+
+  void _doInvokeMethod() {
+    int numNamed = unlinkedConst.ints[intPtr++];
+    int numPositional = unlinkedConst.ints[intPtr++];
+    List<String> namedArgNames = _getNextStrings(numNamed);
+    List<DartType> namedArgTypeList = _popList(numNamed);
+    List<DartType> positionalArgTypes = _popList(numPositional);
+    String methodName = _getNextString();
+    DartType target = stack.removeLast();
+    stack.add(() {
+      if (target is InterfaceType) {
+        MethodElement method = target.lookUpMethod(methodName, library);
+        DartType rawMethodType = method?.type;
+        TypeSystem ts = linker.typeSystem;
+        if (rawMethodType is FunctionType) {
+          if (rawMethodType.typeFormals.isNotEmpty &&
+              ts is StrongTypeSystemImpl) {
+            List<DartType> paramTypes = <DartType>[];
+            List<DartType> argTypes = <DartType>[];
+            // Add positional parameter and argument types.
+            for (int i = 0; i < numPositional; i++) {
+              ParameterElement parameter = rawMethodType.parameters[i];
+              if (parameter != null) {
+                paramTypes.add(parameter.type);
+                argTypes.add(positionalArgTypes[i]);
+              }
+            }
+            // Prepare named argument types map.
+            Map<String, DartType> namedArgTypes = <String, DartType>{};
+            for (int i = 0; i < numNamed; i++) {
+              String name = namedArgNames[i];
+              DartType type = namedArgTypeList[i];
+              namedArgTypes[name] = type;
+            }
+            // Add named parameter and argument types.
+            Map<String, DartType> namedParameterTypes =
+                rawMethodType.namedParameterTypes;
+            namedArgTypes.forEach((String name, DartType argType) {
+              DartType parameterType = namedParameterTypes[name];
+              if (parameterType != null) {
+                paramTypes.add(parameterType);
+                argTypes.add(argType);
+              }
+            });
+            // Perform inference.
+            FunctionType inferred = ts.inferGenericFunctionCall(
+                typeProvider, rawMethodType, paramTypes, argTypes, null);
+            return inferred.returnType;
+          }
+          // Not a generic method, use the raw return type.
+          return rawMethodType.returnType;
+        }
+      }
+      return DynamicTypeImpl.instance;
+    }());
+  }
+
+  void _doInvokeMethodRef() {
+    int numNamed = _getNextInt();
+    int numPositional = _getNextInt();
+    // TODO(paulberry): don't just pop the args; use their types
+    // to infer the type of type arguments.
+    stack.length -= numNamed + numPositional;
+    strPtr += numNamed;
+    refPtr++;
+    // TODO(paulberry): implement.
+    stack.add(DynamicTypeImpl.instance);
+  }
+
+  void _doMakeTypedList() {
+    DartType itemType = _getNextTypeRef();
+    stack.length -= _getNextInt();
+    stack.add(typeProvider.listType.instantiate(<DartType>[itemType]));
+  }
+
+  void _doMakeTypeMap() {
+    DartType keyType = _getNextTypeRef();
+    DartType valueType = _getNextTypeRef();
+    stack.length -= 2 * _getNextInt();
+    stack.add(typeProvider.mapType.instantiate(<DartType>[keyType, valueType]));
+  }
+
+  void _doMakeUntypedList() {
+    int numItems = _getNextInt();
+    DartType itemType = numItems == 0
+        ? DynamicTypeImpl.instance
+        : _popList(numItems).reduce(_leastUpperBound);
+    itemType = _dynamicIfNull(itemType);
+    stack.add(typeProvider.listType.instantiate(<DartType>[itemType]));
+  }
+
+  void _doMakeUntypedMap() {
+    int numEntries = _getNextInt();
+    List<DartType> keysValues = _popList(2 * numEntries);
+    DartType keyType = null;
+    DartType valueType = null;
+    for (int i = 0; i < 2 * numEntries; i++) {
+      DartType type = keysValues[i];
+      if (i.isEven) {
+        keyType = keyType == null ? type : _leastUpperBound(keyType, type);
+      } else {
+        valueType =
+            valueType == null ? type : _leastUpperBound(valueType, type);
+      }
+    }
+    keyType = _dynamicIfNull(keyType);
+    valueType = _dynamicIfNull(valueType);
+    stack.add(typeProvider.mapType.instantiate(<DartType>[keyType, valueType]));
+  }
+
+  void _doPushReference() {
+    EntityRef ref = unlinkedConst.references[refPtr++];
+    if (ref.paramReference != 0) {
+      stack.add(typeProvider.typeType);
+    } else {
+      // Synthetic function types can't be directly referred
+      // to by expressions.
+      assert(ref.syntheticReturnType == null);
+      // Nor can implicit function types derived from
+      // function-typed parameters.
+      assert(ref.implicitFunctionTypeIndices.isEmpty);
+      ReferenceableElementForLink element =
+          variable.compilationUnit._resolveRef(ref.reference);
+      stack.add(element.asStaticType);
+    }
+  }
+
+  int _getNextInt() {
+    return unlinkedConst.ints[intPtr++];
+  }
+
+  String _getNextString() {
+    return unlinkedConst.strings[strPtr++];
+  }
+
+  List<String> _getNextStrings(int n) {
+    List<String> result = new List<String>(n);
+    for (int i = 0; i < n; i++) {
+      result[i] = _getNextString();
+    }
+    return result;
+  }
+
+  DartType _getNextTypeRef() {
+    EntityRef ref = unlinkedConst.references[refPtr++];
+    return unit._resolveTypeRef(ref, variable._typeParameterContext);
+  }
+
+  /**
+   * Return the type of the property with the given [propertyName] in the
+   * given [targetType]. May return `dynamic` if the property cannot be
+   * resolved.
+   */
+  DartType _getPropertyType(DartType targetType, String propertyName) {
+    return targetType is InterfaceType
+        ? targetType.lookUpGetter(propertyName, library)?.returnType
+        : DynamicTypeImpl.instance;
+  }
+
+  DartType _leastUpperBound(DartType s, DartType t) {
+    return linker.typeSystem.getLeastUpperBound(typeProvider, s, t);
+  }
+
+  List<DartType> _popList(int n) {
+    List<DartType> result = stack.sublist(stack.length - n, stack.length);
+    stack.length -= n;
+    return result;
+  }
+
+  void _pushBinaryOperatorType(
+      DartType left, TokenType operator, DartType right) {
+    if (left is InterfaceType) {
+      MethodElement method = left.lookUpMethod(operator.lexeme, library);
+      if (method != null) {
+        DartType type = method.returnType;
+        type = _refineBinaryExpressionType(operator, type, left, right);
+        stack.add(type);
+        return;
+      }
+    }
+    stack.add(DynamicTypeImpl.instance);
+  }
+
+  /**
+   * Extract the property with the given [propertyName], apply the operator
+   * with the given [operandType], push the type of applying operand of the
+   * given [operandType].
+   */
+  void _pushPropertyBinaryExpression(DartType targetType, String propertyName,
+      TokenType operator, DartType operandType) {
+    DartType propertyType = _getPropertyType(targetType, propertyName);
+    _pushBinaryOperatorType(propertyType, operator, operandType);
+  }
+
+  DartType _refineBinaryExpressionType(TokenType operator, DartType currentType,
+      DartType leftType, DartType rightType) {
+    DartType intType = typeProvider.intType;
+    if (leftType == intType) {
+      // int op double
+      if (operator == TokenType.MINUS ||
+          operator == TokenType.PERCENT ||
+          operator == TokenType.PLUS ||
+          operator == TokenType.STAR) {
+        DartType doubleType = typeProvider.doubleType;
+        if (rightType == doubleType) {
+          return doubleType;
+        }
+      }
+      // int op int
+      if (operator == TokenType.MINUS ||
+          operator == TokenType.PERCENT ||
+          operator == TokenType.PLUS ||
+          operator == TokenType.STAR ||
+          operator == TokenType.TILDE_SLASH) {
+        if (rightType == intType) {
+          return intType;
+        }
+      }
+    }
+    // default
+    return currentType;
+  }
+
+  static TokenType _convertAssignOperatorToTokenType(
+      UnlinkedExprAssignOperator o) {
+    switch (o) {
+      case UnlinkedExprAssignOperator.assign:
+        return null;
+      case UnlinkedExprAssignOperator.ifNull:
+        return TokenType.QUESTION_QUESTION;
+      case UnlinkedExprAssignOperator.multiply:
+        return TokenType.STAR;
+      case UnlinkedExprAssignOperator.divide:
+        return TokenType.SLASH;
+      case UnlinkedExprAssignOperator.floorDivide:
+        return TokenType.TILDE_SLASH;
+      case UnlinkedExprAssignOperator.modulo:
+        return TokenType.PERCENT;
+      case UnlinkedExprAssignOperator.plus:
+        return TokenType.PLUS;
+      case UnlinkedExprAssignOperator.minus:
+        return TokenType.MINUS;
+      case UnlinkedExprAssignOperator.shiftLeft:
+        return TokenType.LT_LT;
+      case UnlinkedExprAssignOperator.shiftRight:
+        return TokenType.GT_GT;
+      case UnlinkedExprAssignOperator.bitAnd:
+        return TokenType.AMPERSAND;
+      case UnlinkedExprAssignOperator.bitXor:
+        return TokenType.CARET;
+      case UnlinkedExprAssignOperator.bitOr:
+        return TokenType.BAR;
+      case UnlinkedExprAssignOperator.prefixIncrement:
+        return TokenType.PLUS_PLUS;
+      case UnlinkedExprAssignOperator.prefixDecrement:
+        return TokenType.MINUS_MINUS;
+      case UnlinkedExprAssignOperator.postfixIncrement:
+        return TokenType.PLUS_PLUS;
+      case UnlinkedExprAssignOperator.postfixDecrement:
+        return TokenType.MINUS_MINUS;
+    }
+  }
+
+  static DartType _dynamicIfNull(DartType type) {
+    if (type == null || type.isBottom || type.isVoid) {
+      return DynamicTypeImpl.instance;
+    }
+    return type;
+  }
+}
+
+/**
+ * Element representing a field resynthesized from a summary during
+ * linking.
+ */
+abstract class FieldElementForLink
+    implements FieldElement, ReferenceableElementForLink {}
+
+/**
+ * Specialization of [FieldElementForLink] for class fields.
+ */
+class FieldElementForLink_ClassField extends VariableElementForLink
+    implements FieldElementForLink {
+  @override
+  final ClassElementForLink_Class enclosingElement;
+
+  /**
+   * If this is an instance field, the type that was computed by
+   * [InstanceMemberInferrer].
+   */
+  DartType _inferredInstanceType;
+
+  DartType _declaredType;
+
+  FieldElementForLink_ClassField(ClassElementForLink_Class enclosingElement,
+      UnlinkedVariable unlinkedVariable)
+      : enclosingElement = enclosingElement,
+        super(unlinkedVariable, enclosingElement.enclosingElement);
+
+  @override
+  bool get isStatic => unlinkedVariable.isStatic;
+
+  @override
+  DartType get type {
+    // TODO(paulberry): can this be unified with
+    // [VariableElementForLink.asStaticType]?
+    assert(!isStatic);
+    if (_inferredInstanceType != null) {
+      return _inferredInstanceType;
+    } else if (_declaredType == null) {
+      if (unlinkedVariable.type == null) {
+        if (!compilationUnit.isInBuildUnit) {
+          _inferredInstanceType = compilationUnit.getLinkedType(
+              unlinkedVariable.inferredTypeSlot, enclosingElement);
+          return _inferredInstanceType;
+        }
+        _declaredType = DynamicTypeImpl.instance;
+      } else {
+        _declaredType = compilationUnit._resolveTypeRef(
+            unlinkedVariable.type, enclosingElement);
+      }
+    }
+    return _declaredType;
+  }
+
+  @override
+  void set type(DartType inferredType) {
+    assert(!isStatic);
+    assert(_inferredInstanceType == null);
+    _inferredInstanceType = inferredType;
+  }
+
+  @override
+  TypeParameterizedElementForLink get _typeParameterContext => enclosingElement;
+
+  /**
+   * Store the results of type inference for this field in
+   * [compilationUnit].
+   */
+  void link(CompilationUnitElementInBuildUnit compilationUnit) {
+    if (hasImplicitType) {
+      if (isStatic) {
+        TypeInferenceNode typeInferenceNode = this.asTypeInferenceNode;
+        if (typeInferenceNode != null) {
+          compilationUnit._storeLinkedType(unlinkedVariable.inferredTypeSlot,
+              typeInferenceNode.inferredType, enclosingElement);
+        }
+      } else {
+        compilationUnit._storeLinkedType(unlinkedVariable.inferredTypeSlot,
+            _inferredInstanceType, enclosingElement);
+      }
+    }
+  }
+}
+
+/**
+ * Specialization of [FieldElementForLink] for enum fields.
+ */
+class FieldElementForLink_EnumField extends FieldElementForLink
+    implements FieldElement {
+  /**
+   * The unlinked representation of the field in the summary, or `null` if this
+   * is an enum's `values` field.
+   */
+  final UnlinkedEnumValue unlinkedEnumValue;
+
+  @override
+  final ClassElementForLink_Enum enclosingElement;
+
+  FieldElementForLink_EnumField(this.unlinkedEnumValue, this.enclosingElement);
+
+  @override
+  ConstructorElementForLink get asConstructor => null;
+
+  @override
+  ConstVariableNode get asConstVariable {
+    // Even though enum fields are constants, there is no need to include them
+    // in the const dependency graph because they can't participate in a
+    // circularity.
+    return null;
+  }
+
+  @override
+  DartType get asStaticType => enclosingElement.type;
+
+  @override
+  TypeInferenceNode get asTypeInferenceNode => null;
+
+  @override
+  bool get isStatic => true;
+
+  @override
+  bool get isSynthetic => false;
+
+  @override
+  String get name =>
+      unlinkedEnumValue == null ? 'values' : unlinkedEnumValue.name;
+
+  @override
+  DartType buildType(DartType getTypeArgument(int i),
+          List<int> implicitFunctionTypeIndices) =>
+      DynamicTypeImpl.instance;
+
+  @override
+  ReferenceableElementForLink getContainedName(String name) =>
+      UndefinedElementForLink.instance;
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Element representing a function-typed parameter resynthesied from a summary
+ * during linking.
+ */
+class FunctionElementForLink_FunctionTypedParam implements FunctionElement {
+  @override
+  final ParameterElementForLink enclosingElement;
+
+  /**
+   * The executable element containing this function-typed parameter.
+   */
+  final Element enclosingExecutable;
+
+  /**
+   * The appropriate integer list to store in
+   * [EntityRef.implicitFunctionTypeIndices] to refer to this function-typed
+   * parameter.
+   */
+  final List<int> implicitFunctionTypeIndices;
+
+  DartType _returnType;
+
+  FunctionElementForLink_FunctionTypedParam(this.enclosingElement,
+      this.enclosingExecutable, this.implicitFunctionTypeIndices);
+
+  @override
+  DartType get returnType {
+    if (_returnType == null) {
+      if (enclosingElement._unlinkedParam.type == null) {
+        _returnType = DynamicTypeImpl.instance;
+      } else {
+        _returnType = enclosingElement.compilationUnit._resolveTypeRef(
+            enclosingElement._unlinkedParam.type,
+            enclosingElement._typeParameterContext);
+      }
+    }
+    return _returnType;
+  }
+
+  @override
+  List<TypeParameterElement> get typeParameters => const [];
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Element representing the initializer expression of a variable.
+ */
+class FunctionElementForLink_Initializer implements FunctionElementImpl {
+  /**
+   * The variable for which this element is the initializer.
+   */
+  final VariableElementForLink _variable;
+
+  FunctionElementForLink_Initializer(this._variable);
+
+  @override
+  DartType get returnType {
+    // If this is a variable whose type needs inferring, infer it.
+    TypeInferenceNode typeInferenceNode = _variable._typeInferenceNode;
+    if (typeInferenceNode != null) {
+      return typeInferenceNode.inferredType;
+    } else {
+      // There's no reason linking should need to access the type of
+      // this FunctionElement, since the variable doesn't need its
+      // type inferred.
+      assert(false);
+      // But for robustness, return the dynamic type.
+      return DynamicTypeImpl.instance;
+    }
+  }
+
+  @override
+  void set returnType(DartType newType) {
+    // TODO(paulberry): store inferred type.
+  }
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Specialization of [DependencyWalker] for linking library cycles.
+ */
+class LibraryCycleDependencyWalker extends DependencyWalker<LibraryCycleNode> {
+  @override
+  void evaluate(LibraryCycleNode v) {
+    v.link();
+  }
+
+  @override
+  void evaluateScc(List<LibraryCycleNode> scc) {
+    // There should never be a cycle among library cycles.
+    throw new StateError('Cycle among library cycles');
+  }
+}
+
+/**
+ * An instance of [LibraryCycleForLink] represents a single library cycle
+ * discovered during linking; it consists of one or more libraries in the build
+ * unit being linked.
+ */
+class LibraryCycleForLink {
+  /**
+   * The libraries in the cycle.
+   */
+  final List<LibraryElementInBuildUnit> libraries;
+
+  /**
+   * The library cycles which this library depends on.
+   */
+  final List<LibraryCycleForLink> dependencies;
+
+  /**
+   * The [LibraryCycleNode] for this library cycle.
+   */
+  LibraryCycleNode _node;
+
+  LibraryCycleForLink(this.libraries, this.dependencies) {
+    _node = new LibraryCycleNode(this);
+  }
+
+  LibraryCycleNode get node => _node;
+
+  /**
+   * Link this library cycle and any library cycles it depends on.  Does
+   * nothing if this library cycle has already been linked.
+   */
+  void ensureLinked() {
+    if (!node.isEvaluated) {
+      new LibraryCycleDependencyWalker().walk(node);
+    }
+  }
+}
+
+/**
+ * Specialization of [Node] used to link library cycles in proper dependency
+ * order.
+ */
+class LibraryCycleNode extends Node<LibraryCycleNode> {
+  /**
+   * The library cycle this [Node] represents.
+   */
+  final LibraryCycleForLink libraryCycle;
+
+  /**
+   * Indicates whether this library cycle has been linked yet.
+   */
+  bool _isLinked = false;
+
+  LibraryCycleNode(this.libraryCycle);
+
+  @override
+  bool get isEvaluated => _isLinked;
+
+  @override
+  List<LibraryCycleNode> computeDependencies() => libraryCycle.dependencies
+      .map((LibraryCycleForLink cycle) => cycle.node)
+      .toList();
+
+  /**
+   * Link this library cycle.
+   */
+  void link() {
+    for (LibraryElementInBuildUnit library in libraryCycle.libraries) {
+      library.link();
+    }
+    _isLinked = true;
+  }
+}
+
+/**
+ * Specialization of [DependencyWalker] for computing library cycles.
+ */
+class LibraryDependencyWalker extends DependencyWalker<LibraryNode> {
+  @override
+  void evaluate(LibraryNode v) => evaluateScc(<LibraryNode>[v]);
+
+  @override
+  void evaluateScc(List<LibraryNode> scc) {
+    Set<LibraryCycleForLink> dependentCycles = new Set<LibraryCycleForLink>();
+    for (LibraryNode node in scc) {
+      for (LibraryNode dependency in node.dependencies) {
+        if (dependency.isEvaluated) {
+          dependentCycles.add(dependency._libraryCycle);
+        }
+      }
+    }
+    LibraryCycleForLink cycle = new LibraryCycleForLink(
+        scc.map((LibraryNode n) => n.library).toList(),
+        dependentCycles.toList());
+    for (LibraryNode node in scc) {
+      node._libraryCycle = cycle;
+    }
+  }
+}
+
+/**
+ * Element representing a library resynthesied from a summary during
+ * linking.  The type parameter, [UnitElement], represents the type
+ * that will be used for the compilation unit elements.
+ */
+abstract class LibraryElementForLink<
+        UnitElement extends CompilationUnitElementForLink>
+    implements LibraryElement {
+  /**
+   * Pointer back to the linker.
+   */
+  final Linker _linker;
+
+  /**
+   * The absolute URI of this library.
+   */
+  final Uri _absoluteUri;
+
+  List<UnitElement> _units;
+  final Map<String, ReferenceableElementForLink> _containedNames =
+      <String, ReferenceableElementForLink>{};
+  final List<LibraryElementForLink> _dependencies = <LibraryElementForLink>[];
+  UnlinkedUnit _definingUnlinkedUnit;
+  List<LibraryElementForLink> _importedLibraries;
+  List<LibraryElementForLink> _exportedLibraries;
+
+  LibraryElementForLink(this._linker, this._absoluteUri) {
+    if (_linkedLibrary != null) {
+      _dependencies.length = _linkedLibrary.dependencies.length;
+    }
+  }
+
+  /**
+   * Get the [UnlinkedUnit] for the defining compilation unit of this library.
+   */
+  UnlinkedUnit get definingUnlinkedUnit =>
+      _definingUnlinkedUnit ??= _linker.getUnit(_absoluteUri.toString());
+
+  @override
+  Element get enclosingElement => null;
+
+  @override
+  List<LibraryElementForLink> get exportedLibraries => _exportedLibraries ??=
+      _linkedLibrary.exportDependencies.map(_getDependency).toList();
+
+  @override
+  List<LibraryElementForLink> get importedLibraries => _importedLibraries ??=
+      _linkedLibrary.importDependencies.map(_getDependency).toList();
+
+  /**
+   * If this library is part of the build unit being linked, return the library
+   * cycle it is part of.  Otherwise return `null`.
+   */
+  LibraryCycleForLink get libraryCycleForLink;
+
+  @override
+  List<UnitElement> get units {
+    if (_units == null) {
+      UnlinkedUnit definingUnit = definingUnlinkedUnit;
+      _units = <UnitElement>[_makeUnitElement(definingUnit, 0)];
+      int numParts = definingUnit.parts.length;
+      for (int i = 0; i < numParts; i++) {
+        // TODO(paulberry): make sure we handle the case where Uri.parse fails.
+        // TODO(paulberry): make sure we handle the case where
+        // resolveRelativeUri fails.
+        UnlinkedUnit partUnit = _linker.getUnit(resolveRelativeUri(
+                _absoluteUri, Uri.parse(definingUnit.publicNamespace.parts[i]))
+            .toString());
+        _units.add(
+            _makeUnitElement(partUnit ?? new UnlinkedUnitBuilder(), i + 1));
+      }
+    }
+    return _units;
+  }
+
+  /**
+   * The linked representation of the library in the summary.
+   */
+  LinkedLibrary get _linkedLibrary;
+
+  /**
+   * Search all the units for a top level element with the given
+   * [name].  If no name is found, return the singleton instance of
+   * [UndefinedElementForLink].
+   */
+  ReferenceableElementForLink getContainedName(String name) =>
+      _containedNames.putIfAbsent(name, () {
+        for (UnitElement unit in units) {
+          ReferenceableElementForLink element = unit.getContainedName(name);
+          if (!identical(element, UndefinedElementForLink.instance)) {
+            return element;
+          }
+        }
+        return UndefinedElementForLink.instance;
+      });
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+
+  /**
+   * Return the [LibraryElement] corresponding to the given dependency [index].
+   */
+  LibraryElementForLink _getDependency(int index) {
+    return _dependencies[index] ??= _linker.getLibrary(resolveRelativeUri(
+        _absoluteUri, Uri.parse(_linkedLibrary.dependencies[index].uri)));
+  }
+
+  /**
+   * Create a [UnitElement] for one of the library's compilation
+   * units.
+   */
+  UnitElement _makeUnitElement(UnlinkedUnit unlinkedUnit, int i);
+}
+
+/**
+ * Element representing a library which is part of the build unit
+ * being linked.
+ */
+class LibraryElementInBuildUnit
+    extends LibraryElementForLink<CompilationUnitElementInBuildUnit> {
+  @override
+  final LinkedLibraryBuilder _linkedLibrary;
+
+  /**
+   * The [LibraryNode] representing this library in the library dependency
+   * graph.
+   */
+  LibraryNode _libraryNode;
+
+  InheritanceManager _inheritanceManager;
+
+  LibraryElementInBuildUnit(Linker linker, Uri absoluteUri, this._linkedLibrary)
+      : super(linker, absoluteUri) {
+    _libraryNode = new LibraryNode(this);
+  }
+
+  /**
+   * Get the inheritance manager for this library (creating it if necessary).
+   */
+  InheritanceManager get inheritanceManager =>
+      _inheritanceManager ??= new InheritanceManager(this);
+
+  @override
+  LibraryCycleForLink get libraryCycleForLink {
+    if (!_libraryNode.isEvaluated) {
+      new LibraryDependencyWalker().walk(_libraryNode);
+    }
+    return _libraryNode._libraryCycle;
+  }
+
+  /**
+   * If this library already has a dependency in its dependencies table matching
+   * [library], return its index.  Otherwise add a new dependency to table and
+   * return its index.
+   */
+  int addDependency(LibraryElementForLink library) {
+    for (int i = 0; i < _linkedLibrary.dependencies.length; i++) {
+      if (identical(_getDependency(i), library)) {
+        return i;
+      }
+    }
+    int result = _linkedLibrary.dependencies.length;
+    _linkedLibrary.dependencies.add(new LinkedDependencyBuilder(
+        parts: library.definingUnlinkedUnit.publicNamespace.parts,
+        uri: library._absoluteUri.toString()));
+    _dependencies.add(library);
+    return result;
+  }
+
+  /**
+   * Perform type inference and const cycle detection on this library.
+   */
+  void link() {
+    for (CompilationUnitElementInBuildUnit unit in units) {
+      unit.link();
+    }
+  }
+
+  /**
+   * Throw away any information stored in the summary by a previous call to
+   * [link].
+   */
+  void unlink() {
+    _linkedLibrary.dependencies.length =
+        _linkedLibrary.numPrelinkedDependencies;
+    for (CompilationUnitElementInBuildUnit unit in units) {
+      unit.unlink();
+    }
+  }
+
+  @override
+  CompilationUnitElementInBuildUnit _makeUnitElement(
+          UnlinkedUnit unlinkedUnit, int i) =>
+      new CompilationUnitElementInBuildUnit(
+          this, unlinkedUnit, _linkedLibrary.units[i], i);
+}
+
+/**
+ * Element representing a library which is depended upon (either
+ * directly or indirectly) by the build unit being linked.
+ */
+class LibraryElementInDependency
+    extends LibraryElementForLink<CompilationUnitElementInDependency> {
+  @override
+  final LinkedLibrary _linkedLibrary;
+
+  LibraryElementInDependency(
+      Linker linker, Uri absoluteUri, this._linkedLibrary)
+      : super(linker, absoluteUri);
+
+  @override
+  LibraryCycleForLink get libraryCycleForLink => null;
+
+  @override
+  CompilationUnitElementInDependency _makeUnitElement(
+          UnlinkedUnit unlinkedUnit, int i) =>
+      new CompilationUnitElementInDependency(
+          this, unlinkedUnit, _linkedLibrary.units[i], i);
+}
+
+/**
+ * Specialization of [Node] used to construct the library dependency graph.
+ */
+class LibraryNode extends Node<LibraryNode> {
+  /**
+   * The library this [Node] represents.
+   */
+  final LibraryElementInBuildUnit library;
+
+  /**
+   * The library cycle to which [library] belongs, if it has been computed.
+   * Otherwise `null`.
+   */
+  LibraryCycleForLink _libraryCycle;
+
+  LibraryNode(this.library);
+
+  @override
+  bool get isEvaluated => _libraryCycle != null;
+
+  @override
+  List<LibraryNode> computeDependencies() {
+    // Note: we only need to consider dependencies within the build unit being
+    // linked; dependencies in other build units can't participate in library
+    // cycles with us.
+    List<LibraryNode> dependencies = <LibraryNode>[];
+    for (LibraryElement dependency in library.importedLibraries) {
+      if (dependency is LibraryElementInBuildUnit) {
+        dependencies.add(dependency._libraryNode);
+      }
+    }
+    for (LibraryElement dependency in library.exportedLibraries) {
+      if (dependency is LibraryElementInBuildUnit) {
+        dependencies.add(dependency._libraryNode);
+      }
+    }
+    return dependencies;
+  }
+}
+
+/**
+ * Instances of [Linker] contain the necessary information to link
+ * together a single build unit.
+ */
+class Linker {
+  /**
+   * Callback to ask the client for a [LinkedLibrary] for a
+   * dependency.
+   */
+  final GetDependencyCallback getDependency;
+
+  /**
+   * Callback to ask the client for an [UnlinkedUnit].
+   */
+  final GetUnitCallback getUnit;
+
+  /**
+   * Map containing all library elements accessed during linking,
+   * whether they are part of the build unit being linked or whether
+   * they are dependencies.
+   */
+  final Map<Uri, LibraryElementForLink> _libraries =
+      <Uri, LibraryElementForLink>{};
+
+  /**
+   * List of library elements for the libraries in the build unit
+   * being linked.
+   */
+  final List<LibraryElementInBuildUnit> _librariesInBuildUnit =
+      <LibraryElementInBuildUnit>[];
+
+  /**
+   * Indicates whether type inference should use strong mode rules.
+   */
+  final bool strongMode;
+
+  LibraryElementForLink _coreLibrary;
+  LibraryElementForLink _asyncLibrary;
+  TypeProviderForLink _typeProvider;
+  TypeSystem _typeSystem;
+  SpecialTypeElementForLink _voidElement;
+  SpecialTypeElementForLink _dynamicElement;
+  SpecialTypeElementForLink _bottomElement;
+
+  Linker(Map<String, LinkedLibraryBuilder> linkedLibraries, this.getDependency,
+      this.getUnit, this.strongMode) {
+    // Create elements for the libraries to be linked.  The rest of
+    // the element model will be created on demand.
+    linkedLibraries
+        .forEach((String absoluteUri, LinkedLibraryBuilder linkedLibrary) {
+      Uri uri = Uri.parse(absoluteUri);
+      _librariesInBuildUnit.add(_libraries[uri] =
+          new LibraryElementInBuildUnit(this, uri, linkedLibrary));
+    });
+  }
+
+  /**
+   * Get the library element for `dart:async`.
+   */
+  LibraryElementForLink get asyncLibrary =>
+      _asyncLibrary ??= getLibrary(Uri.parse('dart:async'));
+
+  /**
+   * Get the element representing the "bottom" type.
+   */
+  SpecialTypeElementForLink get bottomElement => _bottomElement ??=
+      new SpecialTypeElementForLink(this, BottomTypeImpl.instance);
+
+  /**
+   * Get the library element for `dart:core`.
+   */
+  LibraryElementForLink get coreLibrary =>
+      _coreLibrary ??= getLibrary(Uri.parse('dart:core'));
+
+  /**
+   * Get the element representing `dynamic`.
+   */
+  SpecialTypeElementForLink get dynamicElement => _dynamicElement ??=
+      new SpecialTypeElementForLink(this, DynamicTypeImpl.instance);
+
+  /**
+   * Get an instance of [TypeProvider] for use during linking.
+   */
+  TypeProviderForLink get typeProvider =>
+      _typeProvider ??= new TypeProviderForLink(this);
+
+  /**
+   * Get an instance of [TypeSystem] for use during linking.
+   */
+  TypeSystem get typeSystem => _typeSystem ??=
+      strongMode ? new StrongTypeSystemImpl() : new TypeSystemImpl();
+
+  /**
+   * Get the element representing `void`.
+   */
+  SpecialTypeElementForLink get voidElement => _voidElement ??=
+      new SpecialTypeElementForLink(this, VoidTypeImpl.instance);
+
+  /**
+   * Get the library element for the library having the given [uri].
+   */
+  LibraryElementForLink getLibrary(Uri uri) => _libraries.putIfAbsent(
+      uri,
+      () => new LibraryElementInDependency(
+          this, uri, getDependency(uri.toString())));
+
+  /**
+   * Perform type inference and const cycle detection on all libraries
+   * in the build unit being linked.
+   */
+  void link() {
+    // Link library cycles in appropriate dependency order.
+    for (LibraryElementInBuildUnit library in _librariesInBuildUnit) {
+      library.libraryCycleForLink.ensureLinked();
+    }
+    // TODO(paulberry): set dependencies.
+  }
+
+  /**
+   * Throw away any information stored in the summary by a previous call to
+   * [link].
+   */
+  void unlink() {
+    for (LibraryElementInBuildUnit library in _librariesInBuildUnit) {
+      library.unlink();
+    }
+  }
+}
+
+/**
+ * Element representing a method resynthesized from a summary during linking.
+ */
+class MethodElementForLink extends ExecutableElementForLink
+    implements MethodElementImpl {
+  MethodElementForLink(ClassElementForLink_Class enclosingElement,
+      UnlinkedExecutable unlinkedExecutable)
+      : super(enclosingElement, unlinkedExecutable);
+
+  @override
+  ElementKind get kind => ElementKind.METHOD;
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Instances of [Node] represent nodes in a dependency graph.  The
+ * type parameter, [NodeType], is the derived type (this affords some
+ * extra type safety by making it difficult to accidentally construct
+ * bridges between unrelated dependency graphs).
+ */
+abstract class Node<NodeType> {
+  /**
+   * Index used by Tarjan's strongly connected components algorithm.
+   * Zero means the node has not been visited yet; a nonzero value
+   * counts the order in which the node was visited.
+   */
+  int index = 0;
+
+  /**
+   * Low link used by Tarjan's strongly connected components
+   * algorithm.  This represents the smallest [index] of all the nodes
+   * in the strongly connected component to which this node belongs.
+   */
+  int lowLink = 0;
+
+  List<NodeType> _dependencies;
+
+  /**
+   * Retrieve the dependencies of this node.
+   */
+  List<NodeType> get dependencies => _dependencies ??= computeDependencies();
+
+  /**
+   * Indicates whether this node has been evaluated yet.
+   */
+  bool get isEvaluated;
+
+  /**
+   * Compute the dependencies of this node.
+   */
+  List<NodeType> computeDependencies();
+}
+
+/**
+ * Element used for references that result from trying to access a nonstatic
+ * member of an element that is not a container (e.g. accessing the "length"
+ * property of a constant).
+ */
+class NonstaticMemberElementForLink implements ReferenceableElementForLink {
+  /**
+   * If the thing from which a member was accessed is a constant, the
+   * associated [ConstNode].  Otherwise `null`.
+   */
+  final ConstVariableNode _constNode;
+
+  NonstaticMemberElementForLink(this._constNode);
+
+  @override
+  ConstructorElementForLink get asConstructor => null;
+
+  @override
+  ConstVariableNode get asConstVariable => _constNode;
+
+  @override
+  DartType get asStaticType {
+    // TODO(paulberry): implement.
+    return DynamicTypeImpl.instance;
+  }
+
+  @override
+  TypeInferenceNode get asTypeInferenceNode {
+    // TODO(paulberry): implement.
+    return null;
+  }
+
+  @override
+  DartType buildType(DartType getTypeArgument(int i),
+          List<int> implicitFunctionTypeIndices) =>
+      DynamicTypeImpl.instance;
+
+  @override
+  ReferenceableElementForLink getContainedName(String name) => this;
+}
+
+/**
+ * Element representing a function or method parameter resynthesized
+ * from a summary during linking.
+ */
+class ParameterElementForLink implements ParameterElementImpl {
+  /**
+   * The unlinked representation of the parameter in the summary.
+   */
+  final UnlinkedParam _unlinkedParam;
+
+  /**
+   * The context in which type parameters should be interpreted.
+   */
+  final TypeParameterizedElementForLink _typeParameterContext;
+
+  /**
+   * If this parameter has a default value and the enclosing library
+   * is part of the build unit being linked, the parameter's node in
+   * the constant evaluation dependency graph.  Otherwise `null`.
+   */
+  ConstNode _constNode;
+
+  /**
+   * The compilation unit in which this parameter appears.
+   */
+  final CompilationUnitElementForLink compilationUnit;
+
+  /**
+   * The index of this parameter within [enclosingElement]'s parameter list.
+   */
+  final int _parameterIndex;
+
+  @override
+  final ExecutableElementForLink enclosingElement;
+
+  DartType _inferredType;
+  DartType _declaredType;
+
+  ParameterElementForLink(this.enclosingElement, this._unlinkedParam,
+      this._typeParameterContext, this.compilationUnit, this._parameterIndex) {
+    if (_unlinkedParam.defaultValue != null) {
+      _constNode = new ConstParameterNode(this);
+    }
+  }
+
+  @override
+  bool get hasImplicitType =>
+      !_unlinkedParam.isFunctionTyped && _unlinkedParam.type == null;
+
+  @override
+  String get name => _unlinkedParam.name;
+
+  @override
+  ParameterKind get parameterKind {
+    switch (_unlinkedParam.kind) {
+      case UnlinkedParamKind.required:
+        return ParameterKind.REQUIRED;
+      case UnlinkedParamKind.positional:
+        return ParameterKind.POSITIONAL;
+      case UnlinkedParamKind.named:
+        return ParameterKind.NAMED;
+    }
+  }
+
+  @override
+  DartType get type {
+    if (_inferredType != null) {
+      return _inferredType;
+    } else if (_declaredType == null) {
+      if (_unlinkedParam.isFunctionTyped) {
+        _declaredType = new FunctionTypeImpl(
+            new FunctionElementForLink_FunctionTypedParam(
+                this, enclosingElement, <int>[_parameterIndex]));
+      } else if (_unlinkedParam.type == null) {
+        if (!compilationUnit.isInBuildUnit) {
+          _inferredType = compilationUnit.getLinkedType(
+              _unlinkedParam.inferredTypeSlot, _typeParameterContext);
+          return _inferredType;
+        } else {
+          _declaredType = DynamicTypeImpl.instance;
+        }
+      } else {
+        _declaredType = compilationUnit._resolveTypeRef(
+            _unlinkedParam.type, _typeParameterContext);
+      }
+    }
+    return _declaredType;
+  }
+
+  @override
+  void set type(DartType inferredType) {
+    assert(_inferredType == null);
+    _inferredType = inferredType;
+  }
+
+  /**
+   * Store the results of type inference for this parameter in
+   * [compilationUnit].
+   */
+  void link(CompilationUnitElementInBuildUnit compilationUnit) {
+    compilationUnit._storeLinkedType(
+        _unlinkedParam.inferredTypeSlot, _inferredType, _typeParameterContext);
+  }
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Element representing a getter or setter resynthesized from a summary during
+ * linking.
+ */
+abstract class PropertyAccessorElementForLink
+    implements PropertyAccessorElementImpl {
+  void link(CompilationUnitElementInBuildUnit compilationUnit);
+}
+
+/**
+ * Specialization of [PropertyAccessorElementForLink] for non-synthetic
+ * accessors explicitly declared in the source code.
+ */
+class PropertyAccessorElementForLink_Executable extends ExecutableElementForLink
+    implements PropertyAccessorElementForLink {
+  @override
+  SyntheticVariableElementForLink variable;
+
+  PropertyAccessorElementForLink_Executable(
+      ClassElementForLink_Class enclosingElement,
+      UnlinkedExecutable unlinkedExecutable,
+      this.variable)
+      : super(enclosingElement, unlinkedExecutable);
+
+  @override
+  PropertyAccessorElementForLink_Executable get correspondingGetter =>
+      variable.getter;
+
+  @override
+  bool get isGetter =>
+      _unlinkedExecutable.kind == UnlinkedExecutableKind.getter;
+
+  @override
+  bool get isSetter =>
+      _unlinkedExecutable.kind == UnlinkedExecutableKind.setter;
+
+  @override
+  ElementKind get kind => _unlinkedExecutable.kind ==
+      UnlinkedExecutableKind.getter ? ElementKind.GETTER : ElementKind.SETTER;
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Specialization of [PropertyAccessorElementForLink] for synthetic accessors
+ * implied by a field or variable declaration.
+ */
+class PropertyAccessorElementForLink_Variable
+    implements PropertyAccessorElementForLink {
+  @override
+  final bool isSetter;
+
+  final VariableElementForLink _variable;
+  FunctionTypeImpl _type;
+
+  PropertyAccessorElementForLink_Variable(this._variable, this.isSetter);
+
+  @override
+  Element get enclosingElement => _variable.enclosingElement;
+
+  @override
+  bool get isGetter => !isSetter;
+
+  @override
+  bool get isStatic => _variable.isStatic;
+
+  @override
+  bool get isSynthetic => true;
+
+  @override
+  ElementKind get kind => isSetter ? ElementKind.SETTER : ElementKind.GETTER;
+
+  @override
+  String get name => isSetter ? '${_variable.name}=' : _variable.name;
+
+  @override
+  DartType get returnType {
+    if (isSetter) {
+      return VoidTypeImpl.instance;
+    } else if (_variable.hasImplicitType &&
+        !isStatic &&
+        !_variable.compilationUnit.isTypeInferenceComplete) {
+      // This is an instance field and we are currently inferring types in the
+      // library cycle containing it.  So we shouldn't use the inferred type
+      // (even if we have already computed it), since that would lead to
+      // non-deterministic type inference results.
+      return DynamicTypeImpl.instance;
+    } else {
+      return _variable.type;
+    }
+  }
+
+  @override
+  FunctionTypeImpl get type => _type ??= new FunctionTypeImpl(this);
+
+  @override
+  List<TypeParameterElement> get typeParameters {
+    // TODO(paulberry): is this correct for fields in generic classes?
+    return const [];
+  }
+
+  @override
+  bool isAccessibleIn(LibraryElement library) =>
+      !Identifier.isPrivateName(name) || identical(this.library, library);
+
+  @override
+  void link(CompilationUnitElementInBuildUnit compilationUnit) {}
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Abstract base class representing an element which can be the target
+ * of a reference.
+ */
+abstract class ReferenceableElementForLink {
+  /**
+   * If this element can be used in a constructor invocation context,
+   * return the associated constructor (which may be `this` or some
+   * other element).  Otherwise return `null`.
+   */
+  ConstructorElementForLink get asConstructor;
+
+  /**
+   * If this element can be used in a getter context to refer to a
+   * constant variable, return the [ConstVariableNode] for the
+   * constant value.  Otherwise return `null`.
+   */
+  ConstVariableNode get asConstVariable;
+
+  /**
+   * Return the static type (possibly inferred) of the entity referred to by
+   * this element.
+   */
+  DartType get asStaticType;
+
+  /**
+   * If this element can be used in a getter context as a type inference
+   * dependency, return the [TypeInferenceNode] for the inferred type.
+   * Otherwise return `null`.
+   */
+  TypeInferenceNode get asTypeInferenceNode;
+
+  /**
+   * Return the type indicated by this element when it is used in a
+   * type instantiation context.  If this element can't legally be
+   * instantiated as a type, return the dynamic type.
+   */
+  DartType buildType(
+      DartType getTypeArgument(int i), List<int> implicitFunctionTypeIndices);
+
+  /**
+   * If this element contains other named elements, return the
+   * contained element having the given [name].  If this element can't
+   * contain other named elements, or it doesn't contain an element
+   * with the given name, return the singleton of
+   * [UndefinedElementForLink].
+   */
+  ReferenceableElementForLink getContainedName(String name);
+}
+
+/**
+ * Element used for references to special types such as `void`.
+ */
+class SpecialTypeElementForLink extends ReferenceableElementForLink {
+  final Linker linker;
+  final DartType type;
+
+  SpecialTypeElementForLink(this.linker, this.type);
+
+  @override
+  ConstructorElementForLink get asConstructor => null;
+
+  @override
+  ConstVariableNode get asConstVariable => null;
+
+  @override
+  DartType get asStaticType => linker.typeProvider.typeType;
+
+  @override
+  TypeInferenceNode get asTypeInferenceNode => null;
+
+  @override
+  DartType buildType(
+      DartType getTypeArgument(int i), List<int> implicitFunctionTypeIndices) {
+    return type;
+  }
+
+  @override
+  ReferenceableElementForLink getContainedName(String name) {
+    return UndefinedElementForLink.instance;
+  }
+}
+
+/**
+ * Element representing a synthetic variable resynthesized from a summary during
+ * linking.
+ */
+class SyntheticVariableElementForLink implements PropertyInducingElementImpl {
+  PropertyAccessorElementForLink_Executable _getter;
+  PropertyAccessorElementForLink_Executable _setter;
+
+  @override
+  PropertyAccessorElementForLink_Executable get getter => _getter;
+
+  @override
+  PropertyAccessorElementForLink_Executable get setter => _setter;
+
+  @override
+  void set type(DartType inferredType) {}
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Element representing a top level variable resynthesized from a
+ * summary during linking.
+ */
+class TopLevelVariableElementForLink extends VariableElementForLink
+    implements TopLevelVariableElement {
+  TopLevelVariableElementForLink(CompilationUnitElement enclosingElement,
+      UnlinkedVariable unlinkedVariable)
+      : super(unlinkedVariable, enclosingElement);
+
+  @override
+  bool get isStatic => true;
+
+  @override
+  TypeParameterizedElementForLink get _typeParameterContext => null;
+
+  /**
+   * Store the results of type inference for this variable in
+   * [compilationUnit].
+   */
+  void link(CompilationUnitElementInBuildUnit compilationUnit) {
+    if (hasImplicitType) {
+      TypeInferenceNode typeInferenceNode = this.asTypeInferenceNode;
+      if (typeInferenceNode != null) {
+        compilationUnit._storeLinkedType(unlinkedVariable.inferredTypeSlot,
+            typeInferenceNode.inferredType, null);
+      }
+    }
+  }
+}
+
+/**
+ * Specialization of [DependencyWalker] for performing type inferrence
+ * on static and top level variables.
+ */
+class TypeInferenceDependencyWalker
+    extends DependencyWalker<TypeInferenceNode> {
+  @override
+  void evaluate(TypeInferenceNode v) {
+    v.evaluate(false);
+  }
+
+  @override
+  void evaluateScc(List<TypeInferenceNode> scc) {
+    for (TypeInferenceNode v in scc) {
+      v.evaluate(true);
+    }
+  }
+}
+
+/**
+ * Specialization of [Node] used to construct the type inference dependency
+ * graph.
+ */
+class TypeInferenceNode extends Node<TypeInferenceNode> {
+  /**
+   * The [FieldElement] or [TopLevelVariableElement] to which this
+   * node refers.
+   */
+  final VariableElementForLink variableElement;
+
+  /**
+   * If a type has been inferred for this node, the inferred type (may be
+   * `dynamic`).  Otherwise `null`.
+   */
+  DartType _inferredType;
+
+  TypeInferenceNode(this.variableElement);
+
+  /**
+   * Infer a type for this node if necessary, and return it.
+   */
+  DartType get inferredType {
+    if (_inferredType == null) {
+      new TypeInferenceDependencyWalker().walk(this);
+      assert(_inferredType != null);
+    }
+    return _inferredType;
+  }
+
+  @override
+  bool get isEvaluated => _inferredType != null;
+
+  /**
+   * Collect the type inference dependencies in [unlinkedConst] (which should be
+   * interpreted relative to [compilationUnit]) and store them in
+   * [dependencies].
+   */
+  void collectDependencies(
+      List<TypeInferenceNode> dependencies,
+      UnlinkedConst unlinkedConst,
+      CompilationUnitElementForLink compilationUnit) {
+    if (unlinkedConst == null) {
+      return;
+    }
+    int refPtr = 0;
+
+    for (UnlinkedConstOperation operation in unlinkedConst.operations) {
+      switch (operation) {
+        case UnlinkedConstOperation.pushReference:
+          EntityRef ref = unlinkedConst.references[refPtr++];
+          // TODO(paulberry): cache these resolved references for
+          // later use by evaluate().
+          TypeInferenceNode dependency =
+              compilationUnit._resolveRef(ref.reference).asTypeInferenceNode;
+          if (dependency != null) {
+            dependencies.add(dependency);
+          }
+          break;
+        case UnlinkedConstOperation.makeTypedList:
+        case UnlinkedConstOperation.invokeConstructor:
+          refPtr++;
+          break;
+        case UnlinkedConstOperation.makeTypedMap:
+          refPtr += 2;
+          break;
+        case UnlinkedConstOperation.assignToRef:
+          // TODO(paulberry): if this reference refers to a variable, should it
+          // be considered a type inference dependency?
+          refPtr++;
+          break;
+        case UnlinkedConstOperation.invokeMethodRef:
+          // TODO(paulberry): if this reference refers to a variable, should it
+          // be considered a type inference dependency?
+          refPtr++;
+          break;
+        case UnlinkedConstOperation.typeCast:
+        case UnlinkedConstOperation.typeCheck:
+          refPtr++;
+          break;
+        default:
+          break;
+      }
+    }
+    assert(refPtr == unlinkedConst.references.length);
+  }
+
+  @override
+  List<TypeInferenceNode> computeDependencies() {
+    List<TypeInferenceNode> dependencies = <TypeInferenceNode>[];
+    collectDependencies(
+        dependencies,
+        variableElement.unlinkedVariable.constExpr,
+        variableElement.compilationUnit);
+    return dependencies;
+  }
+
+  void evaluate(bool inCycle) {
+    if (inCycle) {
+      _inferredType = DynamicTypeImpl.instance;
+    } else {
+      _inferredType = new ExprTypeComputer(variableElement).compute();
+    }
+  }
+}
+
+/**
+ * Element representing a type parameter resynthesized from a summary during
+ * linking.
+ */
+class TypeParameterElementForLink implements TypeParameterElement {
+  /**
+   * The unlinked representation of the type parameter in the summary.
+   */
+  final UnlinkedTypeParam _unlinkedTypeParam;
+
+  /**
+   * The number of type parameters whose scope overlaps this one, and which are
+   * declared earlier in the file.
+   */
+  final int nestingLevel;
+
+  TypeParameterTypeImpl _type;
+
+  TypeParameterElementForLink(this._unlinkedTypeParam, this.nestingLevel);
+
+  @override
+  DartType get bound {
+    if (_unlinkedTypeParam.bound == null) {
+      return null;
+    }
+    // TODO(scheglov) implement
+    throw new UnimplementedError();
+  }
+
+  @override
+  ElementKind get kind => ElementKind.TYPE_PARAMETER;
+
+  @override
+  String get name => _unlinkedTypeParam.name;
+
+  @override
+  TypeParameterTypeImpl get type => _type ??= new TypeParameterTypeImpl(this);
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+/**
+ * Mixin representing an element which can have type parameters.
+ */
+abstract class TypeParameterizedElementForLink
+    implements TypeParameterizedElement {
+  List<TypeParameterType> _typeParameterTypes;
+  List<TypeParameterElementForLink> _typeParameters;
+  int _nestingLevel;
+
+  /**
+   * Get the type parameter context enclosing this one, if any.
+   */
+  TypeParameterizedElementForLink get enclosingTypeParameterContext;
+
+  /**
+   * Find out how many type parameters are in scope in this context.
+   */
+  int get typeParameterNestingLevel =>
+      _nestingLevel ??= _unlinkedTypeParams.length +
+          (enclosingTypeParameterContext?.typeParameterNestingLevel ?? 0);
+
+  List<TypeParameterElementForLink> get typeParameters {
+    if (_typeParameters == null) {
+      int enclosingNestingLevel =
+          enclosingTypeParameterContext?.typeParameterNestingLevel ?? 0;
+      int numTypeParameters = _unlinkedTypeParams.length;
+      _typeParameters =
+          new List<TypeParameterElementForLink>(numTypeParameters);
+      for (int i = 0; i < numTypeParameters; i++) {
+        _typeParameters[i] = new TypeParameterElementForLink(
+            _unlinkedTypeParams[i], enclosingNestingLevel + i);
+      }
+    }
+    return _typeParameters;
+  }
+
+  /**
+   * Get a list of [TypeParameterType] objects corresponding to the
+   * element's type parameters.
+   */
+  List<TypeParameterType> get typeParameterTypes {
+    if (_typeParameterTypes == null) {
+      _typeParameterTypes = typeParameters
+          .map((TypeParameterElementForLink e) => e.type)
+          .toList();
+    }
+    return _typeParameterTypes;
+  }
+
+  /**
+   * Get the [UnlinkedTypeParam]s representing the type parameters declared by
+   * this element.
+   */
+  List<UnlinkedTypeParam> get _unlinkedTypeParams;
+
+  /**
+   * Convert the given [index] into a type parameter type.
+   */
+  TypeParameterType getTypeParameterType(int index) {
+    List<TypeParameterType> types = typeParameterTypes;
+    if (index <= types.length) {
+      return types[types.length - index];
+    } else if (enclosingTypeParameterContext != null) {
+      return enclosingTypeParameterContext
+          .getTypeParameterType(index - types.length);
+    } else {
+      // If we get here, it means that a summary contained a type parameter index
+      // that was out of range.
+      throw new RangeError('Invalid type parameter index');
+    }
+  }
+}
+
+class TypeProviderForLink implements TypeProvider {
+  final Linker _linker;
+
+  InterfaceType _boolType;
+  InterfaceType _deprecatedType;
+  InterfaceType _doubleType;
+  InterfaceType _functionType;
+  InterfaceType _futureDynamicType;
+  InterfaceType _futureNullType;
+  InterfaceType _futureType;
+  InterfaceType _intType;
+  InterfaceType _iterableDynamicType;
+  InterfaceType _iterableType;
+  InterfaceType _listType;
+  InterfaceType _mapType;
+  InterfaceType _nullType;
+  InterfaceType _numType;
+  InterfaceType _objectType;
+  InterfaceType _stackTraceType;
+  InterfaceType _streamDynamicType;
+  InterfaceType _streamType;
+  InterfaceType _stringType;
+  InterfaceType _symbolType;
+  InterfaceType _typeType;
+
+  TypeProviderForLink(this._linker);
+
+  @override
+  InterfaceType get boolType =>
+      _boolType ??= _buildInterfaceType(_linker.coreLibrary, 'bool');
+
+  @override
+  DartType get bottomType => BottomTypeImpl.instance;
+
+  @override
+  InterfaceType get deprecatedType => _deprecatedType ??=
+      _buildInterfaceType(_linker.coreLibrary, 'Deprecated');
+
+  @override
+  InterfaceType get doubleType =>
+      _doubleType ??= _buildInterfaceType(_linker.coreLibrary, 'double');
+
+  @override
+  DartType get dynamicType => DynamicTypeImpl.instance;
+
+  @override
+  InterfaceType get functionType =>
+      _functionType ??= _buildInterfaceType(_linker.coreLibrary, 'Function');
+
+  @override
+  InterfaceType get futureDynamicType =>
+      _futureDynamicType ??= futureType.instantiate(<DartType>[dynamicType]);
+
+  @override
+  InterfaceType get futureNullType =>
+      _futureNullType ??= futureType.instantiate(<DartType>[nullType]);
+
+  @override
+  InterfaceType get futureType =>
+      _futureType ??= _buildInterfaceType(_linker.asyncLibrary, 'Future');
+
+  @override
+  InterfaceType get intType =>
+      _intType ??= _buildInterfaceType(_linker.coreLibrary, 'int');
+
+  @override
+  InterfaceType get iterableDynamicType => _iterableDynamicType ??=
+      iterableType.instantiate(<DartType>[dynamicType]);
+
+  @override
+  InterfaceType get iterableType =>
+      _iterableType ??= _buildInterfaceType(_linker.coreLibrary, 'Iterable');
+
+  @override
+  InterfaceType get listType =>
+      _listType ??= _buildInterfaceType(_linker.coreLibrary, 'List');
+
+  @override
+  InterfaceType get mapType =>
+      _mapType ??= _buildInterfaceType(_linker.coreLibrary, 'Map');
+
+  @override
+  List<InterfaceType> get nonSubtypableTypes => <InterfaceType>[
+        nullType,
+        numType,
+        intType,
+        doubleType,
+        boolType,
+        stringType
+      ];
+
+  @override
+  DartObjectImpl get nullObject {
+    // TODO(paulberry): implement if needed
+    throw new UnimplementedError();
+  }
+
+  @override
+  InterfaceType get nullType =>
+      _nullType ??= _buildInterfaceType(_linker.coreLibrary, 'Null');
+
+  @override
+  InterfaceType get numType =>
+      _numType ??= _buildInterfaceType(_linker.coreLibrary, 'num');
+
+  @override
+  InterfaceType get objectType =>
+      _objectType ??= _buildInterfaceType(_linker.coreLibrary, 'Object');
+
+  @override
+  InterfaceType get stackTraceType => _stackTraceType ??=
+      _buildInterfaceType(_linker.coreLibrary, 'StackTrace');
+
+  @override
+  InterfaceType get streamDynamicType =>
+      _streamDynamicType ??= streamType.instantiate(<DartType>[dynamicType]);
+
+  @override
+  InterfaceType get streamType =>
+      _streamType ??= _buildInterfaceType(_linker.asyncLibrary, 'Stream');
+
+  @override
+  InterfaceType get stringType =>
+      _stringType ??= _buildInterfaceType(_linker.coreLibrary, 'String');
+
+  @override
+  InterfaceType get symbolType =>
+      _symbolType ??= _buildInterfaceType(_linker.coreLibrary, 'Symbol');
+
+  @override
+  InterfaceType get typeType =>
+      _typeType ??= _buildInterfaceType(_linker.coreLibrary, 'Type');
+
+  @override
+  DartType get undefinedType => UndefinedTypeImpl.instance;
+
+  InterfaceType _buildInterfaceType(
+      LibraryElementForLink library, String name) {
+    return library.getContainedName(name).buildType((int i) {
+      // TODO(scheglov) accept type parameter names
+      var element = new TypeParameterElementImpl('T$i', -1);
+      return new TypeParameterTypeImpl(element);
+    }, const []);
+  }
+}
+
+/**
+ * Singleton element used for unresolved references.
+ */
+class UndefinedElementForLink implements ReferenceableElementForLink {
+  static const UndefinedElementForLink instance =
+      const UndefinedElementForLink._();
+
+  const UndefinedElementForLink._();
+
+  @override
+  ConstructorElementForLink get asConstructor => null;
+
+  @override
+  ConstVariableNode get asConstVariable => null;
+
+  @override
+  DartType get asStaticType => DynamicTypeImpl.instance;
+
+  @override
+  TypeInferenceNode get asTypeInferenceNode => null;
+
+  @override
+  DartType buildType(DartType getTypeArgument(int i),
+          List<int> implicitFunctionTypeIndices) =>
+      DynamicTypeImpl.instance;
+
+  @override
+  ReferenceableElementForLink getContainedName(String name) => this;
+}
+
+/**
+ * Element representing a top level variable resynthesized from a
+ * summary during linking.
+ */
+class VariableElementForLink
+    implements VariableElementImpl, ReferenceableElementForLink {
+  /**
+   * The unlinked representation of the variable in the summary.
+   */
+  final UnlinkedVariable unlinkedVariable;
+
+  /**
+   * If this variable is declared `const` and the enclosing library is
+   * part of the build unit being linked, the variable's node in the
+   * constant evaluation dependency graph.  Otherwise `null`.
+   */
+  ConstNode _constNode;
+
+  /**
+   * If this variable has an initializer and an implicit type, and the enclosing
+   * library is part of the build unit being linked, the variable's node in the
+   * type inference dependency graph.  Otherwise `null`.
+   */
+  TypeInferenceNode _typeInferenceNode;
+
+  FunctionElementForLink_Initializer _initializer;
+  DartType _staticType;
+
+  /**
+   * The compilation unit in which this variable appears.
+   */
+  final CompilationUnitElementForLink compilationUnit;
+
+  VariableElementForLink(this.unlinkedVariable, this.compilationUnit) {
+    if (compilationUnit.isInBuildUnit && unlinkedVariable.constExpr != null) {
+      _constNode = new ConstVariableNode(this);
+      if (unlinkedVariable.type == null) {
+        _typeInferenceNode = new TypeInferenceNode(this);
+      }
+    }
+  }
+
+  @override
+  ConstructorElementForLink get asConstructor => null;
+
+  @override
+  ConstVariableNode get asConstVariable => _constNode;
+
+  @override
+  DartType get asStaticType {
+    if (_staticType == null) {
+      if (_typeInferenceNode != null) {
+        assert(_typeInferenceNode.isEvaluated);
+        _staticType = _typeInferenceNode.inferredType;
+      } else if (hasImplicitType) {
+        if (!compilationUnit.isInBuildUnit) {
+          _staticType = compilationUnit.getLinkedType(
+              unlinkedVariable.inferredTypeSlot, _typeParameterContext);
+        } else {
+          _staticType = DynamicTypeImpl.instance;
+        }
+      } else {
+        _staticType = compilationUnit._resolveTypeRef(
+            unlinkedVariable.type, _typeParameterContext);
+      }
+    }
+    return _staticType;
+  }
+
+  @override
+  TypeInferenceNode get asTypeInferenceNode => _typeInferenceNode;
+
+  @override
+  bool get hasImplicitType => unlinkedVariable.type == null;
+
+  @override
+  FunctionElementForLink_Initializer get initializer {
+    if (unlinkedVariable.constExpr == null) {
+      return null;
+    } else {
+      return _initializer ??= new FunctionElementForLink_Initializer(this);
+    }
+  }
+
+  @override
+  bool get isConst => unlinkedVariable.isConst;
+
+  @override
+  bool get isFinal => unlinkedVariable.isFinal;
+
+  @override
+  bool get isStatic;
+
+  @override
+  bool get isSynthetic => false;
+
+  @override
+  String get name => unlinkedVariable.name;
+
+  @override
+  void set type(DartType newType) {
+    // TODO(paulberry): store inferred type.
+  }
+
+  /**
+   * The context in which type parameters should be interpreted, or `null` if
+   * there are no type parameters in scope.
+   */
+  TypeParameterizedElementForLink get _typeParameterContext;
+
+  @override
+  DartType buildType(DartType getTypeArgument(int i),
+          List<int> implicitFunctionTypeIndices) =>
+      DynamicTypeImpl.instance;
+
+  ReferenceableElementForLink getContainedName(String name) {
+    return new NonstaticMemberElementForLink(_constNode);
+  }
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index a58bfd3..bde6e40 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -4,8 +4,10 @@
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/java_io.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/summary/idl.dart';
 import 'package:analyzer/src/summary/resynthesize.dart';
 import 'package:analyzer/src/summary/summary_sdk.dart';
@@ -15,32 +17,15 @@
 import 'package:path/path.dart' as pathos;
 
 /**
- * If [uri] has the `package` scheme in form of `package:pkg/file.dart`,
- * return the `pkg` name.  Otherwise return `null`.
- */
-String _getPackageName(Uri uri) {
-  if (uri.scheme != 'package') {
-    return null;
-  }
-  String path = uri.path;
-  int index = path.indexOf('/');
-  if (index == -1) {
-    return null;
-  }
-  return path.substring(0, index);
-}
-
-/**
  * The [ResultProvider] that provides results from input package summaries.
  */
 class InputPackagesResultProvider extends ResultProvider {
   final InternalAnalysisContext _context;
-  final Map<String, String> _packageSummaryInputs;
 
   _FileBasedSummaryResynthesizer _resynthesizer;
   SummaryResultProvider _sdkProvider;
 
-  InputPackagesResultProvider(this._context, this._packageSummaryInputs) {
+  InputPackagesResultProvider(this._context, SummaryDataStore dataStore) {
     InternalAnalysisContext sdkContext = _context.sourceFactory.dartSdk.context;
     _sdkProvider = sdkContext.resultProvider;
     // Set the type provider to prevent the context from computing it.
@@ -52,7 +37,7 @@
         _context.typeProvider,
         _context.sourceFactory,
         _context.analysisOptions.strongMode,
-        _packageSummaryInputs.values.toList());
+        dataStore);
   }
 
   @override
@@ -65,12 +50,11 @@
     if (target is Source) {
       Uri uri = target.uri;
       // We know how to server results to input packages.
-      String sourcePackageName = _getPackageName(uri);
-      if (!_packageSummaryInputs.containsKey(sourcePackageName)) {
+      String uriString = uri.toString();
+      if (!_resynthesizer.hasLibrarySummary(uriString)) {
         return false;
       }
       // Provide known results.
-      String uriString = uri.toString();
       if (result == LIBRARY_ELEMENT1 ||
           result == LIBRARY_ELEMENT2 ||
           result == LIBRARY_ELEMENT3 ||
@@ -91,96 +75,70 @@
         entry.setValue(result, true, TargetedResult.EMPTY_LIST);
         return true;
       } else if (result == SOURCE_KIND) {
-        if (_resynthesizer.linkedMap.containsKey(uriString)) {
+        if (_resynthesizer._dataStore.linkedMap.containsKey(uriString)) {
           entry.setValue(result, SourceKind.LIBRARY, TargetedResult.EMPTY_LIST);
           return true;
         }
-        if (_resynthesizer.unlinkedMap.containsKey(uriString)) {
+        if (_resynthesizer._dataStore.unlinkedMap.containsKey(uriString)) {
           entry.setValue(result, SourceKind.PART, TargetedResult.EMPTY_LIST);
           return true;
         }
         return false;
       }
+    } else if (target is VariableElement) {
+      if (!_resynthesizer
+          .hasLibrarySummary(target.library.source.uri.toString())) {
+        return false;
+      }
+      if (result == PROPAGATED_VARIABLE || result == INFERRED_STATIC_VARIABLE) {
+        entry.setValue(result, target, TargetedResult.EMPTY_LIST);
+        return true;
+      }
     }
     return false;
   }
 }
 
 /**
- * The [UriResolver] that knows about sources that are parts of packages which
- * are served from their summaries.
+ * The [UriResolver] that knows about sources that are served from their
+ * summaries.
  */
 class InSummaryPackageUriResolver extends UriResolver {
-  final Map<String, String> _packageSummaryInputs;
+  final SummaryDataStore _dataStore;
 
-  InSummaryPackageUriResolver(this._packageSummaryInputs);
+  InSummaryPackageUriResolver(this._dataStore);
 
   @override
   Source resolveAbsolute(Uri uri, [Uri actualUri]) {
     actualUri ??= uri;
-    String packageName = _getPackageName(actualUri);
-    if (_packageSummaryInputs.containsKey(packageName)) {
-      return new _InSummarySource(actualUri);
+    UnlinkedUnit unit = _dataStore.unlinkedMap[uri.toString()];
+    if (unit != null) {
+      String summaryPath = _dataStore.uriToSummaryPath[uri.toString()];
+      if (unit.fallbackModePath.isNotEmpty) {
+        return new _InSummaryFallbackSource(
+            new JavaFile(unit.fallbackModePath), actualUri, summaryPath);
+      } else {
+        return new InSummarySource(actualUri, summaryPath);
+      }
     }
     return null;
   }
 }
 
 /**
- * A concrete resynthesizer that serves summaries from given file paths.
- */
-class _FileBasedSummaryResynthesizer extends SummaryResynthesizer {
-  final Map<String, UnlinkedUnit> unlinkedMap = <String, UnlinkedUnit>{};
-  final Map<String, LinkedLibrary> linkedMap = <String, LinkedLibrary>{};
-
-  _FileBasedSummaryResynthesizer(
-      SummaryResynthesizer parent,
-      AnalysisContext context,
-      TypeProvider typeProvider,
-      SourceFactory sourceFactory,
-      bool strongMode,
-      List<String> summaryPaths)
-      : super(parent, context, typeProvider, sourceFactory, strongMode) {
-    summaryPaths.forEach(_fillMaps);
-  }
-
-  @override
-  LinkedLibrary getLinkedSummary(String uri) {
-    return linkedMap[uri];
-  }
-
-  @override
-  UnlinkedUnit getUnlinkedSummary(String uri) {
-    return unlinkedMap[uri];
-  }
-
-  @override
-  bool hasLibrarySummary(String uri) {
-    return linkedMap.containsKey(uri);
-  }
-
-  void _fillMaps(String path) {
-    io.File file = new io.File(path);
-    List<int> buffer = file.readAsBytesSync();
-    PackageBundle bundle = new PackageBundle.fromBuffer(buffer);
-    for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
-      unlinkedMap[bundle.unlinkedUnitUris[i]] = bundle.unlinkedUnits[i];
-    }
-    for (int i = 0; i < bundle.linkedLibraryUris.length; i++) {
-      linkedMap[bundle.linkedLibraryUris[i]] = bundle.linkedLibraries[i];
-    }
-  }
-}
-
-/**
  * A placeholder of a source that is part of a package whose analysis results
  * are served from its summary.  This source uses its URI as [fullName] and has
  * empty contents.
  */
-class _InSummarySource extends Source {
+class InSummarySource extends Source {
   final Uri uri;
 
-  _InSummarySource(this.uri);
+  /**
+   * The summary file where this source was defined.
+   */
+  final String summaryPath;
+
+  InSummarySource(this.uri, this.summaryPath);
 
   @override
   TimestampedData<String> get contents => new TimestampedData<String>(0, '');
@@ -208,17 +166,106 @@
 
   @override
   bool operator ==(Object object) =>
-      object is _InSummarySource && object.uri == uri;
+      object is InSummarySource && object.uri == uri;
 
   @override
   bool exists() => true;
 
   @override
-  Uri resolveRelativeUri(Uri relativeUri) {
-    Uri baseUri = uri;
-    return baseUri.resolveUri(relativeUri);
+  String toString() => uri.toString();
+}
+
+/**
+ * A [SummaryDataStore] is a container for the data extracted from a set of
+ * summary package bundles.  It contains maps which can be used to find linked
+ * and unlinked summaries by URI.
+ */
+class SummaryDataStore {
+  /**
+   * Map from the URI of a compilation unit to the unlinked summary of that
+   * compilation unit.
+   */
+  final Map<String, UnlinkedUnit> unlinkedMap = <String, UnlinkedUnit>{};
+
+  /**
+   * Map from the URI of a library to the linked summary of that library.
+   */
+  final Map<String, LinkedLibrary> linkedMap = <String, LinkedLibrary>{};
+
+  /**
+   * Map from the URI of a library to the summary path that contained it.
+   */
+  final Map<String, String> uriToSummaryPath = <String, String>{};
+
+  SummaryDataStore(Iterable<String> summaryPaths) {
+    summaryPaths.forEach(_fillMaps);
+  }
+
+  /**
+   * Add the given [bundle] loaded from the file with the given [path].
+   */
+  void addBundle(String path, PackageBundle bundle) {
+    for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
+      String uri = bundle.unlinkedUnitUris[i];
+      uriToSummaryPath[uri] = path;
+      unlinkedMap[uri] = bundle.unlinkedUnits[i];
+    }
+    for (int i = 0; i < bundle.linkedLibraryUris.length; i++) {
+      String uri = bundle.linkedLibraryUris[i];
+      linkedMap[uri] = bundle.linkedLibraries[i];
+    }
+  }
+
+  void _fillMaps(String path) {
+    io.File file = new io.File(path);
+    List<int> buffer = file.readAsBytesSync();
+    PackageBundle bundle = new PackageBundle.fromBuffer(buffer);
+    addBundle(path, bundle);
+  }
+}
+
+/**
+ * A concrete resynthesizer that serves summaries from given file paths.
+ */
+class _FileBasedSummaryResynthesizer extends SummaryResynthesizer {
+  final SummaryDataStore _dataStore;
+
+  _FileBasedSummaryResynthesizer(
+      SummaryResynthesizer parent,
+      AnalysisContext context,
+      TypeProvider typeProvider,
+      SourceFactory sourceFactory,
+      bool strongMode,
+      this._dataStore)
+      : super(parent, context, typeProvider, sourceFactory, strongMode);
+
+  @override
+  LinkedLibrary getLinkedSummary(String uri) {
+    return _dataStore.linkedMap[uri];
   }
 
   @override
-  String toString() => uri.toString();
+  UnlinkedUnit getUnlinkedSummary(String uri) {
+    return _dataStore.unlinkedMap[uri];
+  }
+
+  @override
+  bool hasLibrarySummary(String uri) {
+    LinkedLibrary linkedLibrary = _dataStore.linkedMap[uri];
+    return linkedLibrary != null && !linkedLibrary.fallbackMode;
+  }
+}
+
+/**
+ * A source that is part of a package whose summary was generated in fallback
+ * mode.  This source behaves identically to a [FileBasedSource] except that it
+ * also provides [summaryPath].
+ */
+class _InSummaryFallbackSource extends FileBasedSource
+    implements InSummarySource {
+  @override
+  final String summaryPath;
+
+  _InSummaryFallbackSource(JavaFile file, Uri uri, this.summaryPath)
+      : super(file, uri);
 }
diff --git a/pkg/analyzer/lib/src/summary/prelink.dart b/pkg/analyzer/lib/src/summary/prelink.dart
index 688abe5..e98b64b 100644
--- a/pkg/analyzer/lib/src/summary/prelink.dart
+++ b/pkg/analyzer/lib/src/summary/prelink.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/name_filter.dart';
@@ -284,8 +285,16 @@
       });
     }
     for (UnlinkedEnum enm in unit.enums) {
-      privateNamespace.putIfAbsent(enm.name,
-          () => new _Meaning(unitNum, ReferenceKind.classOrEnum, 0, 0));
+      privateNamespace.putIfAbsent(enm.name, () {
+        Map<String, _Meaning> namespace = <String, _Meaning>{};
+        enm.values.forEach((UnlinkedEnumValue value) {
+          namespace[value.name] =
+              new _Meaning(unitNum, ReferenceKind.propertyAccessor, 0, 0);
+        });
+        namespace['values'] =
+            new _Meaning(unitNum, ReferenceKind.propertyAccessor, 0, 0);
+        return new _ClassMeaning(unitNum, 0, 0, namespace);
+      });
     }
     for (UnlinkedExecutable executable in unit.executables) {
       privateNamespace.putIfAbsent(
@@ -412,24 +421,8 @@
         // Prefix references must always point backward.
         assert(reference.prefixReference < i);
         namespace = prefixNamespaces[reference.prefixReference];
-        // If in `a.length` the `a` prefix is a top-level variable or a field,
-        // then it must be the `String.length` property reference.
-        if (namespace == null && reference.name == 'length') {
-          ReferenceKind prefixKind = references[reference.prefixReference].kind;
-          if (prefixKind == ReferenceKind.topLevelPropertyAccessor ||
-              prefixKind == ReferenceKind.propertyAccessor) {
-            references
-                .add(new LinkedReferenceBuilder(kind: ReferenceKind.length));
-            continue;
-          }
-        }
-        // Anything prefixed with 'unresolved' is unresolved.
-        if (references[reference.prefixReference].kind ==
-            ReferenceKind.unresolved) {
-          namespace = const <String, _Meaning>{};
-        }
-        // Prefix references must always point to proper prefixes.
-        assert(namespace != null);
+        // Expressions like 'a.b.c.d' cannot be prelinked.
+        namespace ??= const <String, _Meaning>{};
       }
       _Meaning meaning = namespace[reference.name];
       if (meaning != null) {
@@ -484,9 +477,12 @@
       }
     }
 
-    // Fill in imported names.
+    // Fill in imported and exported names.
     List<int> importDependencies =
         definingUnit.imports.map(handleImport).toList();
+    List<int> exportDependencies = definingUnit.publicNamespace.exports
+        .map((UnlinkedExportPublic exp) => uriToDependency[exp.uri])
+        .toList();
 
     // Link each compilation unit.
     List<LinkedUnitBuilder> linkedUnits = units.map(linkUnit).toList();
@@ -495,6 +491,7 @@
         units: linkedUnits,
         dependencies: dependencies,
         importDependencies: importDependencies,
+        exportDependencies: exportDependencies,
         exportNames: exportNames,
         numPrelinkedDependencies: dependencies.length);
   }
@@ -507,7 +504,8 @@
     if (sourceUri == null) {
       return relativeUri;
     } else {
-      return Uri.parse(sourceUri).resolve(relativeUri).toString();
+      return resolveRelativeUri(Uri.parse(sourceUri), Uri.parse(relativeUri))
+          .toString();
     }
   }
 }
diff --git a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
index 3273c9f..5cb6e8e5 100644
--- a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
+++ b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
@@ -116,7 +116,23 @@
 
   @override
   visitEnumDeclaration(EnumDeclaration node) {
-    addNameIfPublic(node.name.name, ReferenceKind.classOrEnum, 0);
+    UnlinkedPublicNameBuilder enm =
+        addNameIfPublic(node.name.name, ReferenceKind.classOrEnum, 0);
+    if (enm != null) {
+      enm.members.add(new UnlinkedPublicNameBuilder(
+          name: 'values',
+          kind: ReferenceKind.propertyAccessor,
+          numTypeParameters: 0));
+      for (EnumConstantDeclaration enumConstant in node.constants) {
+        String name = enumConstant.name.name;
+        if (isPublic(name)) {
+          enm.members.add(new UnlinkedPublicNameBuilder(
+              name: name,
+              kind: ReferenceKind.propertyAccessor,
+              numTypeParameters: 0));
+        }
+      }
+    }
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 214861a..63a7f0f 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -11,10 +11,10 @@
 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/handle.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/element_handle.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source_io.dart';
@@ -272,7 +272,7 @@
  * Builder of [Expression]s from [UnlinkedConst]s.
  */
 class _ConstExprBuilder {
-  final _LibraryResynthesizer resynthesizer;
+  final _UnitResynthesizer resynthesizer;
   final UnlinkedConst uc;
 
   int intPtr = 0;
@@ -286,7 +286,7 @@
   Expression get expr => stack.single;
 
   Expression build() {
-    if (uc.isInvalid) {
+    if (!uc.isValidConst) {
       return AstFactory.identifier3(r'$$invalidConstExpr$$');
     }
     for (UnlinkedConstOperation operation in uc.operations) {
@@ -414,12 +414,9 @@
           _push(
               AstFactory.conditionalExpression(condition, thenExpr, elseExpr));
           break;
-        // identical
-        case UnlinkedConstOperation.identical:
-          Expression second = _pop();
-          Expression first = _pop();
-          _push(AstFactory.methodInvocation(
-              null, 'identical', <Expression>[first, second]));
+        // invokeMethodRef
+        case UnlinkedConstOperation.invokeMethodRef:
+          _pushInvokeMethodRef();
           break;
         // containers
         case UnlinkedConstOperation.makeUntypedList:
@@ -438,33 +435,14 @@
           _pushMap(AstFactory.typeArgumentList(<TypeName>[keyType, valueType]));
           break;
         case UnlinkedConstOperation.pushReference:
-          EntityRef ref = uc.references[refPtr++];
-          _ReferenceInfo info = resynthesizer.referenceInfos[ref.reference];
-          if (info.enclosing != null &&
-              info.enclosing.element != null &&
-              info.enclosing.element is! ClassElement) {
-            SimpleIdentifier prefix = AstFactory.identifier3(
-                info.enclosing.name)..staticElement = info.enclosing.element;
-            SimpleIdentifier name = AstFactory.identifier3(info.name)
-              ..staticElement = info.element;
-            PrefixedIdentifier node = AstFactory.identifier(prefix, name);
-            _push(node);
-          } else {
-            SimpleIdentifier node = AstFactory.identifier3(info.name);
-            node.staticElement = info.element;
-            _push(node);
-          }
+          _pushReference();
+          break;
+        case UnlinkedConstOperation.extractProperty:
+          _pushExtractProperty();
           break;
         case UnlinkedConstOperation.invokeConstructor:
           _pushInstanceCreation();
           break;
-        case UnlinkedConstOperation.length:
-          Expression target = _pop();
-          SimpleIdentifier property = AstFactory.identifier3('length');
-          property.staticElement =
-              resynthesizer._buildStringLengthPropertyAccessorElement();
-          _push(AstFactory.propertyAccess(target, property));
-          break;
         case UnlinkedConstOperation.pushConstructorParameter:
           String name = uc.strings[stringPtr++];
           SimpleIdentifier identifier = AstFactory.identifier3(name);
@@ -474,30 +452,82 @@
                       'Unable to resolve constructor parameter: $name'));
           _push(identifier);
           break;
+        case UnlinkedConstOperation.assignToRef:
+        case UnlinkedConstOperation.assignToProperty:
+        case UnlinkedConstOperation.assignToIndex:
+        case UnlinkedConstOperation.extractIndex:
+        case UnlinkedConstOperation.invokeMethod:
+        case UnlinkedConstOperation.cascadeSectionBegin:
+        case UnlinkedConstOperation.cascadeSectionEnd:
+        case UnlinkedConstOperation.typeCast:
+        case UnlinkedConstOperation.typeCheck:
+        case UnlinkedConstOperation.throwException:
+          throw new UnimplementedError('$operation');
       }
     }
     return stack.single;
   }
 
+  List<Expression> _buildArguments() {
+    List<Expression> arguments;
+    {
+      int numNamedArgs = uc.ints[intPtr++];
+      int numPositionalArgs = uc.ints[intPtr++];
+      int numArgs = numNamedArgs + numPositionalArgs;
+      arguments = _removeTopItems(numArgs);
+      // add names to the named arguments
+      for (int i = 0; i < numNamedArgs; i++) {
+        String name = uc.strings[stringPtr++];
+        int index = numPositionalArgs + i;
+        arguments[index] = AstFactory.namedExpression2(name, arguments[index]);
+      }
+    }
+    return arguments;
+  }
+
+  /**
+   * Build the identifier sequence (a single or prefixed identifier, or a
+   * property access) corresponding to the given reference [info].
+   */
+  Expression _buildIdentifierSequence(_ReferenceInfo info) {
+    Expression enclosing;
+    if (info.enclosing != null) {
+      enclosing = _buildIdentifierSequence(info.enclosing);
+    }
+    Element element = info.element;
+    if (element == null && info.name == 'length') {
+      element = _getStringLengthElement();
+    }
+    if (enclosing == null) {
+      return AstFactory.identifier3(info.name)..staticElement = element;
+    }
+    if (enclosing is SimpleIdentifier) {
+      SimpleIdentifier identifier = AstFactory.identifier3(info.name)
+        ..staticElement = element;
+      return AstFactory.identifier(enclosing, identifier);
+    }
+    SimpleIdentifier property = AstFactory.identifier3(info.name)
+      ..staticElement = element;
+    return AstFactory.propertyAccess(enclosing, property);
+  }
+
   TypeName _buildTypeAst(DartType type) {
-    if (type is DynamicTypeImpl) {
-      TypeName node = AstFactory.typeName4('dynamic');
-      node.type = type;
-      (node.name as SimpleIdentifier).staticElement = type.element;
-      return node;
-    } else if (type is InterfaceType) {
+    List<TypeName> argumentNodes;
+    if (type is ParameterizedType) {
       List<DartType> typeArguments = type.typeArguments;
-      List<TypeName> argumentNodes = typeArguments.every((a) => a.isDynamic)
+      argumentNodes = typeArguments.every((a) => a.isDynamic)
           ? null
           : typeArguments.map(_buildTypeAst).toList();
-      TypeName node = AstFactory.typeName4(type.name, argumentNodes);
-      node.type = type;
-      (node.name as SimpleIdentifier).staticElement = type.element;
-      return node;
     }
-    throw new StateError('Unsupported type $type');
+    TypeName node = AstFactory.typeName4(type.name, argumentNodes);
+    node.type = type;
+    (node.name as SimpleIdentifier).staticElement = type.element;
+    return node;
   }
 
+  PropertyAccessorElement _getStringLengthElement() =>
+      resynthesizer.typeProvider.stringType.getGetter('length');
+
   InterpolationElement _newInterpolationElement(Expression expr) {
     if (expr is SimpleStringLiteral) {
       return new InterpolationString(expr.literal, expr.value);
@@ -531,6 +561,17 @@
     _push(AstFactory.binaryExpression(left, operator, right));
   }
 
+  void _pushExtractProperty() {
+    Expression target = _pop();
+    String name = uc.strings[stringPtr++];
+    // TODO(scheglov) Only String.length property access is supported.
+    assert(name == 'length');
+    _push(AstFactory.propertyAccess(
+        target,
+        AstFactory.identifier3('length')
+          ..staticElement = _getStringLengthElement()));
+  }
+
   void _pushInstanceCreation() {
     EntityRef ref = uc.references[refPtr++];
     _ReferenceInfo info = resynthesizer.referenceInfos[ref.reference];
@@ -581,19 +622,7 @@
       }
     }
     // prepare arguments
-    List<Expression> arguments;
-    {
-      int numNamedArgs = uc.ints[intPtr++];
-      int numPositionalArgs = uc.ints[intPtr++];
-      int numArgs = numNamedArgs + numPositionalArgs;
-      arguments = _removeTopItems(numArgs);
-      // add names to the named arguments
-      for (int i = 0; i < numNamedArgs; i++) {
-        String name = uc.strings[stringPtr++];
-        int index = numPositionalArgs + i;
-        arguments[index] = AstFactory.namedExpression2(name, arguments[index]);
-      }
-    }
+    List<Expression> arguments = _buildArguments();
     // create ConstructorName
     ConstructorName constructorNode;
     if (constructorName != null) {
@@ -610,6 +639,23 @@
     _push(instanceCreation);
   }
 
+  void _pushInvokeMethodRef() {
+    List<Expression> arguments = _buildArguments();
+    EntityRef ref = uc.references[refPtr++];
+    _ReferenceInfo info = resynthesizer.referenceInfos[ref.reference];
+    Expression node = _buildIdentifierSequence(info);
+    if (node is SimpleIdentifier) {
+      _push(new MethodInvocation(
+          null,
+          TokenFactory.tokenFromType(TokenType.PERIOD),
+          node,
+          null,
+          AstFactory.argumentList(arguments)));
+    } else {
+      throw new UnimplementedError('For ${node?.runtimeType}: $node');
+    }
+  }
+
   void _pushList(TypeArgumentList typeArguments) {
     int count = uc.ints[intPtr++];
     List<Expression> elements = <Expression>[];
@@ -635,6 +681,13 @@
     _push(AstFactory.prefixExpression(operator, operand));
   }
 
+  void _pushReference() {
+    EntityRef ref = uc.references[refPtr++];
+    _ReferenceInfo info = resynthesizer.referenceInfos[ref.reference];
+    Expression node = _buildIdentifierSequence(info);
+    _push(node);
+  }
+
   List<Expression> _removeTopItems(int count) {
     int start = stack.length - count;
     int end = stack.length;
@@ -645,6 +698,59 @@
 }
 
 /**
+ * A class element that has been resynthesized from a summary.  The actual
+ * element won't be constructed until it is requested.  But properties
+ * [context],  [displayName], [enclosingElement] and [name] can be used without
+ * creating the actual element.  This allows to put these elements into
+ * namespaces without creating actual elements until they are really needed.
+ */
+class _DeferredClassElement extends ClassElementHandle {
+  final _UnitResynthesizer unitResynthesizer;
+  final CompilationUnitElement unitElement;
+  final UnlinkedClass serializedClass;
+
+  ClassElementImpl _actualElement;
+
+  @override
+  final String name;
+
+  factory _DeferredClassElement(_UnitResynthesizer unitResynthesizer,
+      CompilationUnitElement unitElement, UnlinkedClass serializedClass) {
+    String name = serializedClass.name;
+    List<String> components =
+        unitResynthesizer.unit.location.components.toList();
+    components.add(name);
+    ElementLocationImpl location = new ElementLocationImpl.con3(components);
+    return new _DeferredClassElement._(
+        unitResynthesizer, unitElement, serializedClass, name, location);
+  }
+
+  _DeferredClassElement._(this.unitResynthesizer, this.unitElement,
+      this.serializedClass, this.name, ElementLocation location)
+      : super(null, location);
+
+  @override
+  ClassElementImpl get actualElement {
+    if (_actualElement == null) {
+      _actualElement = unitResynthesizer.buildClassImpl(serializedClass);
+      _actualElement.enclosingElement = unitElement;
+    }
+    return _actualElement;
+  }
+
+  @override
+  AnalysisContext get context => unitElement.context;
+
+  @override
+  String get displayName => name;
+
+  @override
+  CompilationUnitElement get enclosingElement {
+    return unitElement;
+  }
+}
+
+/**
  * The constructor element that has been resynthesized from a summary.  The
  * actual element won't be constructed until it is requested.  But properties
  * [displayName], [enclosingElement] and [name] can be used without creating
@@ -675,7 +781,8 @@
       : super(null, location);
 
   @override
-  Element get actualElement => enclosingElement.getNamedConstructor(name);
+  ConstructorElement get actualElement =>
+      enclosingElement.getNamedConstructor(name);
 
   @override
   AnalysisContext get context => _definingType.element.context;
@@ -690,7 +797,7 @@
 }
 
 /**
- * Local function element representing the intializer for a variable that has
+ * Local function element representing the initializer for a variable that has
  * been resynthesized from a summary.  The actual element won't be constructed
  * until it is requested.  But properties [context] and [enclosingElement] can
  * be used without creating the actual element.
@@ -822,41 +929,6 @@
   List<ClassElementImpl> delayedObjectSubclasses = <ClassElementImpl>[];
 
   /**
-   * [ElementHolder] into which resynthesized elements should be placed.  This
-   * object is recreated afresh for each unit in the library, and is used to
-   * populate the [CompilationUnitElement].
-   */
-  ElementHolder unitHolder;
-
-  /**
-   * The [LinkedUnit] from which elements are currently being resynthesized.
-   */
-  LinkedUnit linkedUnit;
-
-  /**
-   * The [UnlinkedUnit] from which elements are currently being resynthesized.
-   */
-  UnlinkedUnit unlinkedUnit;
-
-  /**
-   * Map from slot id to the corresponding [EntityRef] object for linked types
-   * (i.e. propagated and inferred types).
-   */
-  Map<int, EntityRef> linkedTypeMap;
-
-  /**
-   * The [CompilationUnitElementImpl] for the compilation unit currently being
-   * resynthesized.
-   */
-  CompilationUnitElementImpl currentCompilationUnit;
-
-  /**
-   * The [ConstructorElementImpl] for the constructor currently being
-   * resynthesized.
-   */
-  ConstructorElementImpl currentConstructor;
-
-  /**
    * Map of compilation unit elements that have been resynthesized so far.  The
    * key is the URI of the compilation unit.
    */
@@ -871,6 +943,531 @@
   final Map<String, Map<String, Element>> resynthesizedElements =
       <String, Map<String, Element>>{};
 
+  _LibraryResynthesizer(this.summaryResynthesizer, this.linkedLibrary,
+      this.unlinkedUnits, this.librarySource) {
+    isCoreLibrary = librarySource.uri.toString() == 'dart:core';
+  }
+
+  /**
+   * Resynthesize a [NamespaceCombinator].
+   */
+  NamespaceCombinator buildCombinator(UnlinkedCombinator serializedCombinator) {
+    if (serializedCombinator.shows.isNotEmpty) {
+      ShowElementCombinatorImpl combinator = new ShowElementCombinatorImpl();
+      // Note: we call toList() so that we don't retain a reference to the
+      // deserialized data structure.
+      combinator.shownNames = serializedCombinator.shows.toList();
+      combinator.offset = serializedCombinator.offset;
+      combinator.end = serializedCombinator.end;
+      return combinator;
+    } else {
+      HideElementCombinatorImpl combinator = new HideElementCombinatorImpl();
+      // Note: we call toList() so that we don't retain a reference to the
+      // deserialized data structure.
+      combinator.hiddenNames = serializedCombinator.hides.toList();
+      return combinator;
+    }
+  }
+
+  /**
+   * Resynthesize an [ExportElement],
+   */
+  ExportElement buildExport(
+      _UnitResynthesizer definingUnitResynthesizer,
+      UnlinkedExportPublic serializedExportPublic,
+      UnlinkedExportNonPublic serializedExportNonPublic) {
+    ExportElementImpl exportElement =
+        new ExportElementImpl(serializedExportNonPublic.offset);
+    String exportedLibraryUri = summaryResynthesizer.sourceFactory
+        .resolveUri(librarySource, serializedExportPublic.uri)
+        .uri
+        .toString();
+    exportElement.exportedLibrary = new LibraryElementHandle(
+        summaryResynthesizer,
+        new ElementLocationImpl.con3(<String>[exportedLibraryUri]));
+    exportElement.uri = serializedExportPublic.uri;
+    exportElement.combinators =
+        serializedExportPublic.combinators.map(buildCombinator).toList();
+    exportElement.uriOffset = serializedExportNonPublic.uriOffset;
+    exportElement.uriEnd = serializedExportNonPublic.uriEnd;
+    definingUnitResynthesizer.buildAnnotations(
+        exportElement, serializedExportNonPublic.annotations);
+    return exportElement;
+  }
+
+  /**
+   * Build an [ElementHandle] referring to the entity referred to by the given
+   * [exportName].
+   */
+  ElementHandle buildExportName(LinkedExportName exportName) {
+    String name = exportName.name;
+    if (exportName.kind == ReferenceKind.topLevelPropertyAccessor &&
+        !name.endsWith('=')) {
+      name += '?';
+    }
+    ElementLocationImpl location = new ElementLocationImpl.con3(
+        getReferencedLocationComponents(
+            exportName.dependency, exportName.unit, name));
+    switch (exportName.kind) {
+      case ReferenceKind.classOrEnum:
+        return new ClassElementHandle(summaryResynthesizer, location);
+      case ReferenceKind.typedef:
+        return new FunctionTypeAliasElementHandle(
+            summaryResynthesizer, location);
+      case ReferenceKind.topLevelFunction:
+        return new FunctionElementHandle(summaryResynthesizer, location);
+      case ReferenceKind.topLevelPropertyAccessor:
+        return new PropertyAccessorElementHandle(
+            summaryResynthesizer, location);
+      case ReferenceKind.constructor:
+      case ReferenceKind.function:
+      case ReferenceKind.propertyAccessor:
+      case ReferenceKind.method:
+      case ReferenceKind.prefix:
+      case ReferenceKind.unresolved:
+      case ReferenceKind.variable:
+        // Should never happen.  Exported names never refer to import prefixes,
+        // and they always refer to defined top-level entities.
+        throw new StateError('Unexpected export name kind: ${exportName.kind}');
+    }
+  }
+
+  /**
+   * Build the export namespace for the library by aggregating together its
+   * [publicNamespace] and [exportNames].
+   */
+  Namespace buildExportNamespace(
+      Namespace publicNamespace, List<LinkedExportName> exportNames) {
+    HashMap<String, Element> definedNames = new HashMap<String, Element>();
+    // Start by populating all the public names from [publicNamespace].
+    publicNamespace.definedNames.forEach((String name, Element element) {
+      definedNames[name] = element;
+    });
+    // Add all the names from [exportNames].
+    for (LinkedExportName exportName in exportNames) {
+      definedNames.putIfAbsent(
+          exportName.name, () => buildExportName(exportName));
+    }
+    return new Namespace(definedNames);
+  }
+
+  /**
+   * Resynthesize an [ImportElement].
+   */
+  ImportElement buildImport(_UnitResynthesizer definingUnitResynthesizer,
+      UnlinkedImport serializedImport, int dependency) {
+    bool isSynthetic = serializedImport.isImplicit;
+    ImportElementImpl importElement =
+        new ImportElementImpl(isSynthetic ? -1 : serializedImport.offset);
+    String absoluteUri = summaryResynthesizer.sourceFactory
+        .resolveUri(librarySource, linkedLibrary.dependencies[dependency].uri)
+        .uri
+        .toString();
+    importElement.importedLibrary = new LibraryElementHandle(
+        summaryResynthesizer,
+        new ElementLocationImpl.con3(<String>[absoluteUri]));
+    if (isSynthetic) {
+      importElement.synthetic = true;
+    } else {
+      importElement.uri = serializedImport.uri;
+      importElement.uriOffset = serializedImport.uriOffset;
+      importElement.uriEnd = serializedImport.uriEnd;
+      importElement.deferred = serializedImport.isDeferred;
+      definingUnitResynthesizer.buildAnnotations(
+          importElement, serializedImport.annotations);
+    }
+    importElement.prefixOffset = serializedImport.prefixOffset;
+    if (serializedImport.prefixReference != 0) {
+      UnlinkedReference serializedPrefix =
+          unlinkedUnits[0].references[serializedImport.prefixReference];
+      importElement.prefix = new PrefixElementImpl(
+          serializedPrefix.name, serializedImport.prefixOffset);
+    }
+    importElement.combinators =
+        serializedImport.combinators.map(buildCombinator).toList();
+    return importElement;
+  }
+
+  /**
+   * Main entry point.  Resynthesize the [LibraryElement] and return it.
+   */
+  LibraryElement buildLibrary() {
+    CompilationUnitElementImpl definingUnit =
+        new CompilationUnitElementImpl(librarySource.shortName);
+    _UnitResynthesizer definingUnitResynthesizer =
+        createUnitResynthesizer(definingUnit, 0);
+    // Create LibraryElementImpl.
+    bool hasName = unlinkedUnits[0].libraryName.isNotEmpty;
+    LibraryElementImpl library = new LibraryElementImpl(
+        summaryResynthesizer.context,
+        unlinkedUnits[0].libraryName,
+        hasName ? unlinkedUnits[0].libraryNameOffset : -1,
+        unlinkedUnits[0].libraryNameLength);
+    definingUnitResynthesizer.buildDocumentation(
+        library, unlinkedUnits[0].libraryDocumentationComment);
+    definingUnitResynthesizer.buildAnnotations(
+        library, unlinkedUnits[0].libraryAnnotations);
+    library.definingCompilationUnit = definingUnit;
+    definingUnit.source = librarySource;
+    definingUnit.librarySource = librarySource;
+    // Create parts.
+    List<CompilationUnitElement> partUnits = <CompilationUnitElement>[];
+    UnlinkedUnit unlinkedDefiningUnit = unlinkedUnits[0];
+    assert(unlinkedDefiningUnit.publicNamespace.parts.length + 1 ==
+        linkedLibrary.units.length);
+    for (int i = 1; i < linkedLibrary.units.length; i++) {
+      CompilationUnitElementImpl part = buildPart(
+          definingUnitResynthesizer,
+          unlinkedDefiningUnit.publicNamespace.parts[i - 1],
+          unlinkedDefiningUnit.parts[i - 1],
+          i);
+      partUnits.add(part);
+    }
+    library.parts = partUnits;
+    // Create imports.
+    List<ImportElement> imports = <ImportElement>[];
+    for (int i = 0; i < unlinkedDefiningUnit.imports.length; i++) {
+      imports.add(buildImport(
+          definingUnitResynthesizer,
+          unlinkedDefiningUnit.imports[i],
+          linkedLibrary.importDependencies[i]));
+    }
+    library.imports = imports;
+    // Create exports.
+    List<ExportElement> exports = <ExportElement>[];
+    assert(unlinkedDefiningUnit.exports.length ==
+        unlinkedDefiningUnit.publicNamespace.exports.length);
+    for (int i = 0; i < unlinkedDefiningUnit.exports.length; i++) {
+      exports.add(buildExport(
+          definingUnitResynthesizer,
+          unlinkedDefiningUnit.publicNamespace.exports[i],
+          unlinkedDefiningUnit.exports[i]));
+    }
+    library.exports = exports;
+    // Populate units.
+    populateUnit(definingUnitResynthesizer);
+    for (int i = 0; i < partUnits.length; i++) {
+      _UnitResynthesizer partResynthesizer =
+          createUnitResynthesizer(partUnits[i], i + 1);
+      populateUnit(partResynthesizer);
+    }
+    BuildLibraryElementUtils.patchTopLevelAccessors(library);
+    // Update delayed Object class references.
+    if (isCoreLibrary) {
+      ClassElement objectElement = library.getType('Object');
+      assert(objectElement != null);
+      for (ClassElementImpl classElement in delayedObjectSubclasses) {
+        classElement.supertype = objectElement.type;
+      }
+    }
+    // Compute namespaces.
+    library.publicNamespace =
+        new NamespaceBuilder().createPublicNamespaceForLibrary(library);
+    library.exportNamespace = buildExportNamespace(
+        library.publicNamespace, linkedLibrary.exportNames);
+    // Find the entry point.  Note: we can't use element.isEntryPoint because
+    // that will trigger resynthesis of exported libraries.
+    Element entryPoint =
+        library.exportNamespace.get(FunctionElement.MAIN_FUNCTION_NAME);
+    if (entryPoint is FunctionElement) {
+      library.entryPoint = entryPoint;
+    }
+    // Create the synthetic element for `loadLibrary`.
+    // Until the client received dart:core and dart:async, we cannot do this,
+    // because the TypeProvider is not fully initialized. So, it is up to the
+    // Dart SDK client to initialize TypeProvider and finish the dart:core and
+    // dart:async libraries creation.
+    if (library.name != 'dart.core' && library.name != 'dart.async') {
+      library.createLoadLibraryFunction(summaryResynthesizer.typeProvider);
+    }
+    // Done.
+    return library;
+  }
+
+  /**
+   * Create, but do not populate, the [CompilationUnitElement] for a part other
+   * than the defining compilation unit.
+   */
+  CompilationUnitElementImpl buildPart(
+      _UnitResynthesizer definingUnitResynthesizer,
+      String uri,
+      UnlinkedPart partDecl,
+      int unitNum) {
+    Source unitSource =
+        summaryResynthesizer.sourceFactory.resolveUri(librarySource, uri);
+    CompilationUnitElementImpl partUnit =
+        new CompilationUnitElementImpl(unitSource.shortName);
+    partUnit.uriOffset = partDecl.uriOffset;
+    partUnit.uriEnd = partDecl.uriEnd;
+    partUnit.source = unitSource;
+    partUnit.librarySource = librarySource;
+    partUnit.uri = uri;
+    definingUnitResynthesizer.buildAnnotations(partUnit, partDecl.annotations);
+    return partUnit;
+  }
+
+  /**
+   * Set up data structures for deserializing a compilation unit.
+   */
+  _UnitResynthesizer createUnitResynthesizer(
+      CompilationUnitElementImpl unit, int unitNum) {
+    LinkedUnit linkedUnit = linkedLibrary.units[unitNum];
+    UnlinkedUnit unlinkedUnit = unlinkedUnits[unitNum];
+    return new _UnitResynthesizer(this, unlinkedUnit, linkedUnit, unit);
+  }
+
+  /**
+   * Build the components of an [ElementLocationImpl] for the entity in the
+   * given [unit] of the dependency located at [dependencyIndex], and having
+   * the given [name].
+   */
+  List<String> getReferencedLocationComponents(
+      int dependencyIndex, int unit, String name) {
+    if (dependencyIndex == 0) {
+      String referencedLibraryUri = librarySource.uri.toString();
+      String partUri;
+      if (unit != 0) {
+        String uri = unlinkedUnits[0].publicNamespace.parts[unit - 1];
+        Source partSource =
+            summaryResynthesizer.sourceFactory.resolveUri(librarySource, uri);
+        partUri = partSource.uri.toString();
+      } else {
+        partUri = referencedLibraryUri;
+      }
+      return <String>[referencedLibraryUri, partUri, name];
+    }
+    LinkedDependency dependency = linkedLibrary.dependencies[dependencyIndex];
+    Source referencedLibrarySource = summaryResynthesizer.sourceFactory
+        .resolveUri(librarySource, dependency.uri);
+    String referencedLibraryUri = referencedLibrarySource.uri.toString();
+    String partUri;
+    if (unit != 0) {
+      String uri = dependency.parts[unit - 1];
+      Source partSource = summaryResynthesizer.sourceFactory
+          .resolveUri(referencedLibrarySource, uri);
+      partUri = partSource.uri.toString();
+    } else {
+      partUri = referencedLibraryUri;
+    }
+    return <String>[referencedLibraryUri, partUri, name];
+  }
+
+  /**
+   * Populate a [CompilationUnitElement] by deserializing all the elements
+   * contained in it.
+   */
+  void populateUnit(_UnitResynthesizer unitResynthesized) {
+    // TODO(scheglov)
+    unitResynthesized.populateUnit();
+    String absoluteUri = unitResynthesized.unit.source.uri.toString();
+    resynthesizedUnits[absoluteUri] = unitResynthesized.unit;
+    resynthesizedElements[absoluteUri] = unitResynthesized.elementMap;
+  }
+}
+
+/**
+ * Data structure used during resynthesis to record all the information that is
+ * known about how to resynthesize a single entry in [LinkedUnit.references]
+ * (and its associated entry in [UnlinkedUnit.references], if it exists).
+ */
+class _ReferenceInfo {
+  /**
+   * The enclosing [_ReferenceInfo], or `null` for top-level elements.
+   */
+  final _ReferenceInfo enclosing;
+
+  /**
+   * The name of the entity referred to by this reference.
+   */
+  final String name;
+
+  /**
+   * The element referred to by this reference, or `null` if there is no
+   * associated element (e.g. because it is a reference to an undefined
+   * entity).
+   */
+  final Element element;
+
+  /**
+   * If this reference refers to a non-generic type, the type it refers to.
+   * Otherwise `null`.
+   */
+  DartType type;
+
+  /**
+   * The number of type parameters accepted by the entity referred to by this
+   * reference, or zero if it doesn't accept any type parameters.
+   */
+  final int numTypeParameters;
+
+  /**
+   * Create a new [_ReferenceInfo] object referring to an element called [name]
+   * via the element handle [element], and having [numTypeParameters] type
+   * parameters.
+   *
+   * For the special types `dynamic` and `void`, [specialType] should point to
+   * the type itself.  Otherwise, pass `null` and the type will be computed
+   * when appropriate.
+   */
+  _ReferenceInfo(this.enclosing, this.name, this.element, DartType specialType,
+      this.numTypeParameters) {
+    if (specialType != null) {
+      type = specialType;
+    } else {
+      type = _buildType((_) => DynamicTypeImpl.instance, const []);
+    }
+  }
+
+  /**
+   * Build a [DartType] corresponding to the result of applying some type
+   * arguments to the entity referred to by this [_ReferenceInfo].  The type
+   * arguments are retrieved by calling [getTypeArgument].
+   *
+   * If [implicitFunctionTypeIndices] is not empty, a [DartType] should be
+   * created which refers to a function type implicitly defined by one of the
+   * element's parameters.  [implicitFunctionTypeIndices] is interpreted as in
+   * [EntityRef.implicitFunctionTypeIndices].
+   *
+   * If the entity referred to by this [_ReferenceInfo] is not a type, `null`
+   * is returned.
+   */
+  DartType buildType(
+      DartType getTypeArgument(int i), List<int> implicitFunctionTypeIndices) {
+    DartType result =
+        (numTypeParameters == 0 && implicitFunctionTypeIndices.isEmpty)
+            ? type
+            : _buildType(getTypeArgument, implicitFunctionTypeIndices);
+    if (result == null) {
+      // TODO(paulberry): figure out how to handle this case (which should
+      // only occur in the event of erroneous code).
+      throw new UnimplementedError();
+    }
+    return result;
+  }
+
+  /**
+   * If this reference refers to a type, build a [DartType] which instantiates
+   * it with type arguments returned by [getTypeArgument].  Otherwise return
+   * `null`.
+   *
+   * If [implicitFunctionTypeIndices] is not null, a [DartType] should be
+   * created which refers to a function type implicitly defined by one of the
+   * element's parameters.  [implicitFunctionTypeIndices] is interpreted as in
+   * [EntityRef.implicitFunctionTypeIndices].
+   */
+  DartType _buildType(
+      DartType getTypeArgument(int i), List<int> implicitFunctionTypeIndices) {
+    ElementHandle element = this.element; // To allow type promotion
+    if (element is ClassElementHandle) {
+      return new InterfaceTypeImpl.elementWithNameAndArgs(element, name,
+          _buildTypeArguments(numTypeParameters, getTypeArgument));
+    } else if (element is FunctionTypeAliasElementHandle) {
+      return new FunctionTypeImpl.elementWithNameAndArgs(
+          element,
+          name,
+          _buildTypeArguments(numTypeParameters, getTypeArgument),
+          numTypeParameters != 0);
+    } else if (element is FunctionTypedElement) {
+      int numTypeArguments;
+      FunctionTypedElementComputer computer;
+      if (implicitFunctionTypeIndices.isNotEmpty) {
+        numTypeArguments = numTypeParameters;
+        computer = () {
+          FunctionTypedElement element = this.element;
+          for (int index in implicitFunctionTypeIndices) {
+            element = element.parameters[index].type.element;
+          }
+          return element;
+        };
+      } else {
+        // For a type that refers to a generic executable, the type arguments are
+        // not supposed to include the arguments to the executable itself.
+        numTypeArguments = enclosing == null ? 0 : enclosing.numTypeParameters;
+        computer = () => this.element as FunctionTypedElement;
+      }
+      // TODO(paulberry): Is it a bug that we have to pass `false` for
+      // isInstantiated?
+      return new DeferredFunctionTypeImpl(computer, null,
+          _buildTypeArguments(numTypeArguments, getTypeArgument), false);
+    } else {
+      return null;
+    }
+  }
+
+  /**
+   * Build a list of type arguments having length [numTypeArguments] where each
+   * type argument is obtained by calling [getTypeArgument].
+   */
+  List<DartType> _buildTypeArguments(
+      int numTypeArguments, DartType getTypeArgument(int i)) {
+    List<DartType> typeArguments = const <DartType>[];
+    if (numTypeArguments != 0) {
+      typeArguments = <DartType>[];
+      for (int i = 0; i < numTypeArguments; i++) {
+        typeArguments.add(getTypeArgument(i));
+      }
+    }
+    return typeArguments;
+  }
+}
+
+/**
+ * An instance of [_UnitResynthesizer] is responsible for resynthesizing the
+ * elements in a single unit from that unit's summary.
+ */
+class _UnitResynthesizer {
+  /**
+   * The [_LibraryResynthesizer] which is being used to obtain summaries.
+   */
+  final _LibraryResynthesizer libraryResynthesizer;
+
+  /**
+   * The [UnlinkedUnit] from which elements are currently being resynthesized.
+   */
+  final UnlinkedUnit unlinkedUnit;
+
+  /**
+   * The [LinkedUnit] from which elements are currently being resynthesized.
+   */
+  final LinkedUnit linkedUnit;
+
+  /**
+   * The [CompilationUnitElementImpl] for the compilation unit currently being
+   * resynthesized.
+   */
+  final CompilationUnitElementImpl unit;
+
+  /**
+   * [ElementHolder] into which resynthesized elements should be placed.  This
+   * object is recreated afresh for each unit in the library, and is used to
+   * populate the [CompilationUnitElement].
+   */
+  final ElementHolder unitHolder = new ElementHolder();
+
+  /**
+   * Map of top-level elements that have been resynthesized so far.  The key is
+   * the name of the top level element.
+   */
+  Map<String, Element> elementMap = <String, Element>{};
+
+  /**
+   * Map from slot id to the corresponding [EntityRef] object for linked types
+   * (i.e. propagated and inferred types).
+   */
+  final Map<int, EntityRef> linkedTypeMap = <int, EntityRef>{};
+
+  /**
+   * Set of slot ids corresponding to const constructors that are part of
+   * cycles.
+   */
+  Set<int> constCycles;
+
+  /**
+   * The [ConstructorElementImpl] for the constructor currently being
+   * resynthesized.
+   */
+  ConstructorElementImpl currentConstructor;
+
   /**
    * Type parameters for the generic class, typedef, or executable currently
    * being resynthesized, if any.  This is a list of lists; if multiple
@@ -904,11 +1501,20 @@
    */
   List<_ReferenceInfo> referenceInfos;
 
-  _LibraryResynthesizer(this.summaryResynthesizer, this.linkedLibrary,
-      this.unlinkedUnits, this.librarySource) {
-    isCoreLibrary = librarySource.uri.toString() == 'dart:core';
+  _UnitResynthesizer(this.libraryResynthesizer, this.unlinkedUnit,
+      this.linkedUnit, this.unit) {
+    for (EntityRef t in linkedUnit.types) {
+      linkedTypeMap[t.slot] = t;
+    }
+    constCycles = linkedUnit.constCycles.toSet();
+    populateReferenceInfos();
   }
 
+  SummaryResynthesizer get summaryResynthesizer =>
+      libraryResynthesizer.summaryResynthesizer;
+
+  TypeProvider get typeProvider => summaryResynthesizer.typeProvider;
+
   /**
    * Build the annotations for the given [element].
    */
@@ -917,7 +1523,7 @@
     if (serializedAnnotations.isNotEmpty) {
       element.metadata = serializedAnnotations.map((UnlinkedConst a) {
         ElementAnnotationImpl elementAnnotation =
-            new ElementAnnotationImpl(this.currentCompilationUnit);
+            new ElementAnnotationImpl(this.unit);
         Expression constExpr = _buildConstExpression(a);
         if (constExpr is Identifier) {
           elementAnnotation.element = constExpr.staticElement;
@@ -947,6 +1553,23 @@
    * Resynthesize a [ClassElement] and place it in [unitHolder].
    */
   void buildClass(UnlinkedClass serializedClass) {
+    ClassElement classElement;
+    if (libraryResynthesizer.isCoreLibrary &&
+        serializedClass.supertype == null) {
+      classElement = buildClassImpl(serializedClass);
+      if (!serializedClass.hasNoSupertype) {
+        libraryResynthesizer.delayedObjectSubclasses.add(classElement);
+      }
+    } else {
+      classElement = new _DeferredClassElement(this, unit, serializedClass);
+    }
+    unitHolder.addType(classElement);
+  }
+
+  /**
+   * Resynthesize a [ClassElementImpl].
+   */
+  ClassElementImpl buildClassImpl(UnlinkedClass serializedClass) {
     ClassElementImpl classElement =
         new ClassElementImpl(serializedClass.name, serializedClass.nameOffset);
     classElement.hasBeenInferred = summaryResynthesizer.strongMode;
@@ -957,12 +1580,8 @@
     InterfaceTypeImpl correspondingType = new InterfaceTypeImpl(classElement);
     if (serializedClass.supertype != null) {
       classElement.supertype = buildType(serializedClass.supertype);
-    } else if (!serializedClass.hasNoSupertype) {
-      if (isCoreLibrary) {
-        delayedObjectSubclasses.add(classElement);
-      } else {
-        classElement.supertype = summaryResynthesizer.typeProvider.objectType;
-      }
+    } else if (!libraryResynthesizer.isCoreLibrary) {
+      classElement.supertype = typeProvider.objectType;
     }
     classElement.interfaces =
         serializedClass.interfaces.map(buildType).toList();
@@ -1014,12 +1633,19 @@
     classElement.type = correspondingType;
     buildDocumentation(classElement, serializedClass.documentationComment);
     buildAnnotations(classElement, serializedClass.annotations);
+    buildCodeRange(classElement, serializedClass.codeRange);
     resolveConstructorInitializers(classElement);
-    unitHolder.addType(classElement);
     currentTypeParameters.removeLast();
     assert(currentTypeParameters.isEmpty);
     fields = null;
     constructors = null;
+    return classElement;
+  }
+
+  void buildCodeRange(ElementImpl element, CodeRange codeRange) {
+    if (codeRange != null) {
+      element.setCodeRange(codeRange.offset, codeRange.length);
+    }
   }
 
   /**
@@ -1076,6 +1702,8 @@
     assert(serializedExecutable.kind == UnlinkedExecutableKind.constructor);
     currentConstructor = new ConstructorElementImpl(
         serializedExecutable.name, serializedExecutable.nameOffset);
+    currentConstructor.isCycleFree = serializedExecutable.isConst &&
+        !constCycles.contains(serializedExecutable.constCycleSlot);
     if (serializedExecutable.name.isEmpty) {
       currentConstructor.nameEnd =
           serializedExecutable.nameOffset + classType.name.length;
@@ -1101,8 +1729,7 @@
         currentConstructor.redirectedConstructor = _createConstructorElement(
             _createConstructorDefiningType(info, typeArguments), info);
       } else {
-        List<String> locationComponents =
-            currentCompilationUnit.location.components.toList();
+        List<String> locationComponents = unit.location.components.toList();
         locationComponents.add(classType.name);
         locationComponents.add(serializedExecutable.redirectedConstructorName);
         currentConstructor.redirectedConstructor =
@@ -1134,21 +1761,22 @@
    * associated fields and implicit accessors.
    */
   void buildEnum(UnlinkedEnum serializedEnum) {
-    assert(!isCoreLibrary);
+    assert(!libraryResynthesizer.isCoreLibrary);
     ClassElementImpl classElement =
         new ClassElementImpl(serializedEnum.name, serializedEnum.nameOffset);
     classElement.enum2 = true;
     InterfaceType enumType = new InterfaceTypeImpl(classElement);
     classElement.type = enumType;
-    classElement.supertype = summaryResynthesizer.typeProvider.objectType;
+    classElement.supertype = typeProvider.objectType;
     buildDocumentation(classElement, serializedEnum.documentationComment);
     buildAnnotations(classElement, serializedEnum.annotations);
+    buildCodeRange(classElement, serializedEnum.codeRange);
     ElementHolder memberHolder = new ElementHolder();
     // Build the 'index' field.
     FieldElementImpl indexField = new FieldElementImpl('index', -1);
     indexField.final2 = true;
     indexField.synthetic = true;
-    indexField.type = summaryResynthesizer.typeProvider.intType;
+    indexField.type = typeProvider.intType;
     memberHolder.addField(indexField);
     buildImplicitAccessors(indexField, memberHolder);
     // Build the 'values' field.
@@ -1156,8 +1784,7 @@
     valuesField.synthetic = true;
     valuesField.const3 = true;
     valuesField.static = true;
-    valuesField.type = summaryResynthesizer.typeProvider.listType
-        .substitute4(<DartType>[enumType]);
+    valuesField.type = typeProvider.listType.instantiate(<DartType>[enumType]);
     memberHolder.addField(valuesField);
     buildImplicitAccessors(valuesField, memberHolder);
     // Build fields for all enum constants.
@@ -1173,8 +1800,7 @@
       field.type = enumType;
       // Create a value for the constant.
       Map<String, DartObjectImpl> fieldMap = <String, DartObjectImpl>{
-        fieldName: new DartObjectImpl(
-            summaryResynthesizer.typeProvider.intType, new IntState(i))
+        fieldName: new DartObjectImpl(typeProvider.intType, new IntState(i))
       };
       DartObjectImpl value =
           new DartObjectImpl(enumType, new GenericState(fieldMap));
@@ -1298,6 +1924,7 @@
     buildDocumentation(
         executableElement, serializedExecutable.documentationComment);
     buildAnnotations(executableElement, serializedExecutable.annotations);
+    buildCodeRange(executableElement, serializedExecutable.codeRange);
     executableElement.functions =
         serializedExecutable.localFunctions.map(buildLocalFunction).toList();
     executableElement.labels =
@@ -1308,86 +1935,6 @@
   }
 
   /**
-   * Resynthesize an [ExportElement],
-   */
-  ExportElement buildExport(UnlinkedExportPublic serializedExportPublic,
-      UnlinkedExportNonPublic serializedExportNonPublic) {
-    ExportElementImpl exportElement =
-        new ExportElementImpl(serializedExportNonPublic.offset);
-    String exportedLibraryUri = summaryResynthesizer.sourceFactory
-        .resolveUri(librarySource, serializedExportPublic.uri)
-        .uri
-        .toString();
-    exportElement.exportedLibrary = new LibraryElementHandle(
-        summaryResynthesizer,
-        new ElementLocationImpl.con3(<String>[exportedLibraryUri]));
-    exportElement.uri = serializedExportPublic.uri;
-    exportElement.combinators =
-        serializedExportPublic.combinators.map(buildCombinator).toList();
-    exportElement.uriOffset = serializedExportNonPublic.uriOffset;
-    exportElement.uriEnd = serializedExportNonPublic.uriEnd;
-    buildAnnotations(exportElement, serializedExportNonPublic.annotations);
-    return exportElement;
-  }
-
-  /**
-   * Build an [ElementHandle] referring to the entity referred to by the given
-   * [exportName].
-   */
-  ElementHandle buildExportName(LinkedExportName exportName) {
-    String name = exportName.name;
-    if (exportName.kind == ReferenceKind.topLevelPropertyAccessor &&
-        !name.endsWith('=')) {
-      name += '?';
-    }
-    ElementLocationImpl location = new ElementLocationImpl.con3(
-        getReferencedLocationComponents(
-            exportName.dependency, exportName.unit, name));
-    switch (exportName.kind) {
-      case ReferenceKind.classOrEnum:
-        return new ClassElementHandle(summaryResynthesizer, location);
-      case ReferenceKind.typedef:
-        return new FunctionTypeAliasElementHandle(
-            summaryResynthesizer, location);
-      case ReferenceKind.topLevelFunction:
-        return new FunctionElementHandle(summaryResynthesizer, location);
-      case ReferenceKind.topLevelPropertyAccessor:
-        return new PropertyAccessorElementHandle(
-            summaryResynthesizer, location);
-      case ReferenceKind.constructor:
-      case ReferenceKind.function:
-      case ReferenceKind.propertyAccessor:
-      case ReferenceKind.method:
-      case ReferenceKind.length:
-      case ReferenceKind.prefix:
-      case ReferenceKind.unresolved:
-      case ReferenceKind.variable:
-        // Should never happen.  Exported names never refer to import prefixes,
-        // and they always refer to defined top-level entities.
-        throw new StateError('Unexpected export name kind: ${exportName.kind}');
-    }
-  }
-
-  /**
-   * Build the export namespace for the library by aggregating together its
-   * [publicNamespace] and [exportNames].
-   */
-  Namespace buildExportNamespace(
-      Namespace publicNamespace, List<LinkedExportName> exportNames) {
-    HashMap<String, Element> definedNames = new HashMap<String, Element>();
-    // Start by populating all the public names from [publicNamespace].
-    publicNamespace.definedNames.forEach((String name, Element element) {
-      definedNames[name] = element;
-    });
-    // Add all the names from [exportNames].
-    for (LinkedExportName exportName in exportNames) {
-      definedNames.putIfAbsent(
-          exportName.name, () => buildExportName(exportName));
-    }
-    return new Namespace(definedNames);
-  }
-
-  /**
    * Build the implicit getter and setter associated with [element], and place
    * them in [holder].
    */
@@ -1468,125 +2015,6 @@
   }
 
   /**
-   * Resynthesize an [ImportElement].
-   */
-  ImportElement buildImport(UnlinkedImport serializedImport, int dependency) {
-    bool isSynthetic = serializedImport.isImplicit;
-    ImportElementImpl importElement =
-        new ImportElementImpl(isSynthetic ? -1 : serializedImport.offset);
-    String absoluteUri = summaryResynthesizer.sourceFactory
-        .resolveUri(librarySource, linkedLibrary.dependencies[dependency].uri)
-        .uri
-        .toString();
-    importElement.importedLibrary = new LibraryElementHandle(
-        summaryResynthesizer,
-        new ElementLocationImpl.con3(<String>[absoluteUri]));
-    if (isSynthetic) {
-      importElement.synthetic = true;
-    } else {
-      importElement.uri = serializedImport.uri;
-      importElement.uriOffset = serializedImport.uriOffset;
-      importElement.uriEnd = serializedImport.uriEnd;
-      importElement.deferred = serializedImport.isDeferred;
-      buildAnnotations(importElement, serializedImport.annotations);
-    }
-    importElement.prefixOffset = serializedImport.prefixOffset;
-    if (serializedImport.prefixReference != 0) {
-      UnlinkedReference serializedPrefix =
-          unlinkedUnits[0].references[serializedImport.prefixReference];
-      importElement.prefix = new PrefixElementImpl(
-          serializedPrefix.name, serializedImport.prefixOffset);
-    }
-    importElement.combinators =
-        serializedImport.combinators.map(buildCombinator).toList();
-    return importElement;
-  }
-
-  /**
-   * Main entry point.  Resynthesize the [LibraryElement] and return it.
-   */
-  LibraryElement buildLibrary() {
-    CompilationUnitElementImpl definingCompilationUnit =
-        new CompilationUnitElementImpl(librarySource.shortName);
-    prepareUnit(definingCompilationUnit, 0);
-    bool hasName = unlinkedUnits[0].libraryName.isNotEmpty;
-    LibraryElementImpl library = new LibraryElementImpl(
-        summaryResynthesizer.context,
-        unlinkedUnits[0].libraryName,
-        hasName ? unlinkedUnits[0].libraryNameOffset : -1,
-        unlinkedUnits[0].libraryNameLength);
-    buildDocumentation(library, unlinkedUnits[0].libraryDocumentationComment);
-    buildAnnotations(library, unlinkedUnits[0].libraryAnnotations);
-    library.definingCompilationUnit = definingCompilationUnit;
-    definingCompilationUnit.source = librarySource;
-    definingCompilationUnit.librarySource = librarySource;
-    List<CompilationUnitElement> parts = <CompilationUnitElement>[];
-    UnlinkedUnit unlinkedDefiningUnit = unlinkedUnits[0];
-    assert(unlinkedDefiningUnit.publicNamespace.parts.length + 1 ==
-        linkedLibrary.units.length);
-    for (int i = 1; i < linkedLibrary.units.length; i++) {
-      CompilationUnitElementImpl part = buildPart(
-          unlinkedDefiningUnit.publicNamespace.parts[i - 1],
-          unlinkedDefiningUnit.parts[i - 1],
-          unlinkedUnits[i]);
-      parts.add(part);
-    }
-    library.parts = parts;
-    List<ImportElement> imports = <ImportElement>[];
-    for (int i = 0; i < unlinkedDefiningUnit.imports.length; i++) {
-      imports.add(buildImport(unlinkedDefiningUnit.imports[i],
-          linkedLibrary.importDependencies[i]));
-    }
-    library.imports = imports;
-    List<ExportElement> exports = <ExportElement>[];
-    assert(unlinkedDefiningUnit.exports.length ==
-        unlinkedDefiningUnit.publicNamespace.exports.length);
-    for (int i = 0; i < unlinkedDefiningUnit.exports.length; i++) {
-      exports.add(buildExport(unlinkedDefiningUnit.publicNamespace.exports[i],
-          unlinkedDefiningUnit.exports[i]));
-    }
-    library.exports = exports;
-    populateUnit(definingCompilationUnit, 0);
-    finishUnit();
-    for (int i = 0; i < parts.length; i++) {
-      prepareUnit(parts[i], i + 1);
-      populateUnit(parts[i], i + 1);
-      finishUnit();
-    }
-    BuildLibraryElementUtils.patchTopLevelAccessors(library);
-    // Update delayed Object class references.
-    if (isCoreLibrary) {
-      ClassElement objectElement = library.getType('Object');
-      assert(objectElement != null);
-      for (ClassElementImpl classElement in delayedObjectSubclasses) {
-        classElement.supertype = objectElement.type;
-      }
-    }
-    // Compute namespaces.
-    library.publicNamespace =
-        new NamespaceBuilder().createPublicNamespaceForLibrary(library);
-    library.exportNamespace = buildExportNamespace(
-        library.publicNamespace, linkedLibrary.exportNames);
-    // Find the entry point.  Note: we can't use element.isEntryPoint because
-    // that will trigger resynthesis of exported libraries.
-    Element entryPoint =
-        library.exportNamespace.get(FunctionElement.MAIN_FUNCTION_NAME);
-    if (entryPoint is FunctionElement) {
-      library.entryPoint = entryPoint;
-    }
-    // Create the synthetic element for `loadLibrary`.
-    // Until the client received dart:core and dart:async, we cannot do this,
-    // because the TypeProvider is not fully initialized. So, it is up to the
-    // Dart SDK client to initialize TypeProvider and finish the dart:core and
-    // dart:async libraries creation.
-    if (library.name != 'dart.core' && library.name != 'dart.async') {
-      library.createLoadLibraryFunction(summaryResynthesizer.typeProvider);
-    }
-    // Done.
-    return library;
-  }
-
-  /**
    * Build the appropriate [DartType] object corresponding to a slot id in the
    * [LinkedUnit.types] table.
    */
@@ -1635,7 +2063,7 @@
    */
   LocalVariableElement buildLocalVariable(UnlinkedVariable serializedVariable) {
     LocalVariableElementImpl element;
-    if (serializedVariable.constExpr != null) {
+    if (serializedVariable.constExpr != null && serializedVariable.isConst) {
       ConstLocalVariableElementImpl constElement =
           new ConstLocalVariableElementImpl(
               serializedVariable.name, serializedVariable.nameOffset);
@@ -1699,6 +2127,7 @@
     }
     parameterElement.synthetic = synthetic;
     buildAnnotations(parameterElement, serializedParameter.annotations);
+    buildCodeRange(parameterElement, serializedParameter.codeRange);
     if (serializedParameter.isFunctionTyped) {
       FunctionElementImpl parameterTypeElement =
           new FunctionElementImpl('', -1);
@@ -1714,8 +2143,8 @@
       if (serializedParameter.isInitializingFormal &&
           serializedParameter.type == null) {
         // The type is inherited from the matching field.
-        parameterElement.type = fields[serializedParameter.name]?.type ??
-            summaryResynthesizer.typeProvider.dynamicType;
+        parameterElement.type =
+            fields[serializedParameter.name]?.type ?? DynamicTypeImpl.instance;
       } else {
         parameterElement.type =
             buildLinkedType(serializedParameter.inferredTypeSlot) ??
@@ -1743,25 +2172,6 @@
   }
 
   /**
-   * Create, but do not populate, the [CompilationUnitElement] for a part other
-   * than the defining compilation unit.
-   */
-  CompilationUnitElementImpl buildPart(
-      String uri, UnlinkedPart partDecl, UnlinkedUnit serializedPart) {
-    Source unitSource =
-        summaryResynthesizer.sourceFactory.resolveUri(librarySource, uri);
-    CompilationUnitElementImpl partUnit =
-        new CompilationUnitElementImpl(unitSource.shortName);
-    partUnit.uriOffset = partDecl.uriOffset;
-    partUnit.uriEnd = partDecl.uriEnd;
-    partUnit.source = unitSource;
-    partUnit.librarySource = librarySource;
-    partUnit.uri = uri;
-    buildAnnotations(partUnit, partDecl.annotations);
-    return partUnit;
-  }
-
-  /**
    * Handle the parts that are common to top level variables and fields.
    */
   void buildPropertyIntroducingElementCommonParts(
@@ -1783,7 +2193,7 @@
       if (defaultVoid) {
         return VoidTypeImpl.instance;
       } else {
-        return summaryResynthesizer.typeProvider.dynamicType;
+        return DynamicTypeImpl.instance;
       }
     }
     if (type.paramReference != 0) {
@@ -1804,7 +2214,7 @@
         if (i < type.typeArguments.length) {
           return buildType(type.typeArguments[i]);
         } else {
-          return summaryResynthesizer.typeProvider.dynamicType;
+          return DynamicTypeImpl.instance;
         }
       }
       _ReferenceInfo referenceInfo = referenceInfos[type.reference];
@@ -1832,6 +2242,7 @@
     buildDocumentation(
         functionTypeAliasElement, serializedTypedef.documentationComment);
     buildAnnotations(functionTypeAliasElement, serializedTypedef.annotations);
+    buildCodeRange(functionTypeAliasElement, serializedTypedef.codeRange);
     unitHolder.addTypeAlias(functionTypeAliasElement);
     currentTypeParameters.removeLast();
     assert(currentTypeParameters.isEmpty);
@@ -1852,6 +2263,7 @@
             serializedTypeParameter.name, serializedTypeParameter.nameOffset);
     typeParameterElement.type = new TypeParameterTypeImpl(typeParameterElement);
     buildAnnotations(typeParameterElement, serializedTypeParameter.annotations);
+    buildCodeRange(typeParameterElement, serializedTypeParameter.codeRange);
     return typeParameterElement;
   }
 
@@ -1878,7 +2290,7 @@
       [ElementHolder holder]) {
     if (holder == null) {
       TopLevelVariableElementImpl element;
-      if (serializedVariable.constExpr != null) {
+      if (serializedVariable.constExpr != null && serializedVariable.isConst) {
         ConstTopLevelVariableElementImpl constElement =
             new ConstTopLevelVariableElementImpl(
                 serializedVariable.name, serializedVariable.nameOffset);
@@ -1894,7 +2306,9 @@
       buildImplicitAccessors(element, unitHolder);
     } else {
       FieldElementImpl element;
-      if (serializedVariable.constExpr != null) {
+      if (serializedVariable.constExpr != null &&
+          (serializedVariable.isConst ||
+              serializedVariable.isFinal && !serializedVariable.isStatic)) {
         ConstFieldElementImpl constElement = new ConstFieldElementImpl(
             serializedVariable.name, serializedVariable.nameOffset);
         element = constElement;
@@ -1925,6 +2339,7 @@
     buildVariableInitializer(element, serializedVariable.initializer);
     buildDocumentation(element, serializedVariable.documentationComment);
     buildAnnotations(element, serializedVariable.annotations);
+    buildCodeRange(element, serializedVariable.codeRange);
   }
 
   /**
@@ -1939,6 +2354,7 @@
     FunctionElementImpl initializerElement =
         buildLocalFunction(serializedInitializer);
     initializerElement.synthetic = true;
+    initializerElement.setCodeRange(null, null);
     variable.initializer = initializerElement;
   }
 
@@ -1953,19 +2369,6 @@
   }
 
   /**
-   * Tear down data structures used during deserialization of a compilation
-   * unit.
-   */
-  void finishUnit() {
-    unitHolder = null;
-    linkedUnit = null;
-    unlinkedUnit = null;
-    linkedTypeMap = null;
-    referenceInfos = null;
-    currentCompilationUnit = null;
-  }
-
-  /**
    * Return a list of type arguments corresponding to [currentTypeParameters],
    * skipping the innermost [skipLevels] nesting levels.
    *
@@ -1985,42 +2388,6 @@
   }
 
   /**
-   * Build the components of an [ElementLocationImpl] for the entity in the
-   * given [unit] of the dependency located at [dependencyIndex], and having
-   * the given [name].
-   */
-  List<String> getReferencedLocationComponents(
-      int dependencyIndex, int unit, String name) {
-    if (dependencyIndex == 0) {
-      String referencedLibraryUri = librarySource.uri.toString();
-      String partUri;
-      if (unit != 0) {
-        String uri = unlinkedUnits[0].publicNamespace.parts[unit - 1];
-        Source partSource =
-            summaryResynthesizer.sourceFactory.resolveUri(librarySource, uri);
-        partUri = partSource.uri.toString();
-      } else {
-        partUri = referencedLibraryUri;
-      }
-      return <String>[referencedLibraryUri, partUri, name];
-    }
-    LinkedDependency dependency = linkedLibrary.dependencies[dependencyIndex];
-    Source referencedLibrarySource = summaryResynthesizer.sourceFactory
-        .resolveUri(librarySource, dependency.uri);
-    String referencedLibraryUri = referencedLibrarySource.uri.toString();
-    String partUri;
-    if (unit != 0) {
-      String uri = dependency.parts[unit - 1];
-      Source partSource = summaryResynthesizer.sourceFactory
-          .resolveUri(referencedLibrarySource, uri);
-      partUri = partSource.uri.toString();
-    } else {
-      partUri = referencedLibraryUri;
-    }
-    return <String>[referencedLibraryUri, partUri, name];
-  }
-
-  /**
    * Get the type parameter from the surrounding scope whose De Bruijn index is
    * [index].
    */
@@ -2063,10 +2430,10 @@
       DartType type;
       int numTypeParameters = linkedReference.numTypeParameters;
       if (linkedReference.kind == ReferenceKind.unresolved) {
-        type = summaryResynthesizer.typeProvider.undefinedType;
+        type = UndefinedTypeImpl.instance;
         element = null;
       } else if (name == 'dynamic') {
-        type = summaryResynthesizer.typeProvider.dynamicType;
+        type = DynamicTypeImpl.instance;
         element = type.element;
       } else if (name == 'void') {
         type = VoidTypeImpl.instance;
@@ -2083,8 +2450,9 @@
           locationComponents.add(identifier);
         } else {
           String identifier = _getElementIdentifier(name, linkedReference.kind);
-          locationComponents = getReferencedLocationComponents(
-              linkedReference.dependency, linkedReference.unit, identifier);
+          locationComponents =
+              libraryResynthesizer.getReferencedLocationComponents(
+                  linkedReference.dependency, linkedReference.unit, identifier);
         }
         ElementLocation location =
             new ElementLocationImpl.con3(locationComponents);
@@ -2100,9 +2468,6 @@
             element =
                 new ConstructorElementHandle(summaryResynthesizer, location);
             break;
-          case ReferenceKind.length:
-            element = _buildStringLengthPropertyAccessorElement();
-            break;
           case ReferenceKind.method:
             assert(location.components.length == 4);
             element = new MethodElementHandle(summaryResynthesizer, location);
@@ -2160,13 +2525,12 @@
    * Populate a [CompilationUnitElement] by deserializing all the elements
    * contained in it.
    */
-  void populateUnit(CompilationUnitElementImpl unit, int unitNum) {
+  void populateUnit() {
     unlinkedUnit.classes.forEach(buildClass);
     unlinkedUnit.enums.forEach(buildEnum);
     unlinkedUnit.executables.forEach(buildExecutable);
     unlinkedUnit.typedefs.forEach(buildTypedef);
     unlinkedUnit.variables.forEach(buildVariable);
-    String absoluteUri = unit.source.uri.toString();
     unit.accessors = unitHolder.accessors;
     unit.enums = unitHolder.enums;
     unit.functions = unitHolder.functions;
@@ -2179,7 +2543,6 @@
     unit.typeAliases = typeAliases.where((e) => !e.isSynthetic).toList();
     unit.types = unitHolder.types;
     unit.topLevelVariables = unitHolder.topLevelVariables;
-    Map<String, Element> elementMap = <String, Element>{};
     for (ClassElement cls in unit.types) {
       elementMap[cls.name] = cls;
     }
@@ -2195,27 +2558,11 @@
     for (PropertyAccessorElementImpl accessor in unit.accessors) {
       elementMap[accessor.identifier] = accessor;
     }
-    resynthesizedUnits[absoluteUri] = unit;
-    resynthesizedElements[absoluteUri] = elementMap;
+    buildCodeRange(unit, unlinkedUnit.codeRange);
     assert(currentTypeParameters.isEmpty);
   }
 
   /**
-   * Set up data structures for deserializing a compilation unit.
-   */
-  void prepareUnit(CompilationUnitElementImpl unit, int unitNum) {
-    linkedUnit = linkedLibrary.units[unitNum];
-    unlinkedUnit = unlinkedUnits[unitNum];
-    linkedTypeMap = <int, EntityRef>{};
-    currentCompilationUnit = unit;
-    for (EntityRef t in linkedUnit.types) {
-      linkedTypeMap[t.slot] = t;
-    }
-    populateReferenceInfos();
-    unitHolder = new ElementHolder();
-  }
-
-  /**
    * Constructor initializers can reference fields and other constructors of
    * the same class, including forward references. So, we need to delay
    * resolution until after class elements are built.
@@ -2248,15 +2595,6 @@
   }
 
   /**
-   * Return the new handle of the `String.length` getter element.
-   */
-  PropertyAccessorElementHandle _buildStringLengthPropertyAccessorElement() =>
-      new PropertyAccessorElementHandle(
-          summaryResynthesizer,
-          new ElementLocationImpl.con3(
-              <String>['dart:core', 'dart:core', 'String', 'length?']));
-
-  /**
    * Return the defining type for a [ConstructorElement] by applying
    * [typeArgumentRefs] to the given linked [info].
    */
@@ -2308,149 +2646,3 @@
     return name;
   }
 }
-
-/**
- * Data structure used during resynthesis to record all the information that is
- * known about how to resynthesize a single entry in [LinkedUnit.references]
- * (and its associated entry in [UnlinkedUnit.references], if it exists).
- */
-class _ReferenceInfo {
-  /**
-   * The enclosing [_ReferenceInfo], or `null` for top-level elements.
-   */
-  final _ReferenceInfo enclosing;
-
-  /**
-   * The name of the entity referred to by this reference.
-   */
-  final String name;
-
-  /**
-   * The element referred to by this reference, or `null` if there is no
-   * associated element (e.g. because it is a reference to an undefined
-   * entity).
-   */
-  final Element element;
-
-  /**
-   * If this reference refers to a non-generic type, the type it refers to.
-   * Otherwise `null`.
-   */
-  DartType type;
-
-  /**
-   * The number of type parameters accepted by the entity referred to by this
-   * reference, or zero if it doesn't accept any type parameters.
-   */
-  final int numTypeParameters;
-
-  /**
-   * Create a new [_ReferenceInfo] object referring to an element called [name]
-   * via the element handle [element], and having [numTypeParameters] type
-   * parameters.
-   *
-   * For the special types `dynamic` and `void`, [specialType] should point to
-   * the type itself.  Otherwise, pass `null` and the type will be computed
-   * when appropriate.
-   */
-  _ReferenceInfo(this.enclosing, this.name, this.element, DartType specialType,
-      this.numTypeParameters) {
-    if (specialType != null) {
-      type = specialType;
-    } else {
-      type = _buildType((_) => DynamicTypeImpl.instance, const []);
-    }
-  }
-
-  /**
-   * Build a [DartType] corresponding to the result of applying some type
-   * arguments to the entity referred to by this [_ReferenceInfo].  The type
-   * arguments are retrieved by calling [getTypeArgument].
-   *
-   * If [implicitFunctionTypeIndices] is not empty, a [DartType] should be
-   * created which refers to a function type implicitly defined by one of the
-   * element's parameters.  [implicitFunctionTypeIndices] is interpreted as in
-   * [EntityRef.implicitFunctionTypeIndices].
-   *
-   * If the entity referred to by this [_ReferenceInfo] is not a type, `null`
-   * is returned.
-   */
-  DartType buildType(
-      DartType getTypeArgument(int i), List<int> implicitFunctionTypeIndices) {
-    DartType result =
-        (numTypeParameters == 0 && implicitFunctionTypeIndices.isEmpty)
-            ? type
-            : _buildType(getTypeArgument, implicitFunctionTypeIndices);
-    if (result == null) {
-      // TODO(paulberry): figure out how to handle this case (which should
-      // only occur in the event of erroneous code).
-      throw new UnimplementedError();
-    }
-    return result;
-  }
-
-  /**
-   * If this reference refers to a type, build a [DartType] which instantiates
-   * it with type arguments returned by [getTypeArgument].  Otherwise return
-   * `null`.
-   *
-   * If [implicitFunctionTypeIndices] is not null, a [DartType] should be
-   * created which refers to a function type implicitly defined by one of the
-   * element's parameters.  [implicitFunctionTypeIndices] is interpreted as in
-   * [EntityRef.implicitFunctionTypeIndices].
-   */
-  DartType _buildType(
-      DartType getTypeArgument(int i), List<int> implicitFunctionTypeIndices) {
-    ElementHandle element = this.element; // To allow type promotion
-    if (element is ClassElementHandle) {
-      return new InterfaceTypeImpl.elementWithNameAndArgs(element, name,
-          _buildTypeArguments(numTypeParameters, getTypeArgument));
-    } else if (element is FunctionTypeAliasElementHandle) {
-      return new FunctionTypeImpl.elementWithNameAndArgs(
-          element,
-          name,
-          _buildTypeArguments(numTypeParameters, getTypeArgument),
-          numTypeParameters != 0);
-    } else if (element is FunctionTypedElement) {
-      int numTypeArguments;
-      FunctionTypedElementComputer computer;
-      if (implicitFunctionTypeIndices.isNotEmpty) {
-        numTypeArguments = numTypeParameters;
-        computer = () {
-          FunctionTypedElement element = this.element;
-          for (int index in implicitFunctionTypeIndices) {
-            element = element.parameters[index].type.element;
-          }
-          return element;
-        };
-      } else {
-        // For a type that refers to a generic executable, the type arguments are
-        // not supposed to include the arguments to the executable itself.
-        numTypeArguments = enclosing == null ? 0 : enclosing.numTypeParameters;
-        computer = () => this.element;
-      }
-      // TODO(paulberry): Is it a bug that we have to pass `false` for
-      // isInstantiated?
-      return new DeferredFunctionTypeImpl(computer, null,
-          _buildTypeArguments(numTypeArguments, getTypeArgument), false);
-    } else {
-      return null;
-    }
-  }
-
-  /**
-   * Build a list of type arguments having length [numTypeArguments] where each
-   * type argument is obtained by calling [getTypeArgument].
-   */
-  List<DartType> _buildTypeArguments(
-      int numTypeArguments, DartType getTypeArgument(int i)) {
-    List<DartType> typeArguments = const <DartType>[];
-    if (numTypeArguments != 0) {
-      typeArguments = <DartType>[];
-      for (int i = 0; i < numTypeArguments; i++) {
-        typeArguments.add(getTypeArgument(i));
-      }
-    }
-    return typeArguments;
-  }
-}
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index cd9ff61..3c4ddb7 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -76,7 +76,13 @@
   EntityRefBuilder serializeIdentifier(Identifier identifier) {
     EntityRefBuilder b = new EntityRefBuilder();
     if (identifier is SimpleIdentifier) {
-      b.reference = visitor.serializeSimpleReference(identifier.name);
+      int index = visitor.serializeSimpleReference(identifier.name,
+          allowTypeParameter: true);
+      if (index < 0) {
+        b.paramReference = -index;
+      } else {
+        b.reference = index;
+      }
     } else if (identifier is PrefixedIdentifier) {
       int prefix = visitor.serializeSimpleReference(identifier.prefix.name);
       b.reference =
@@ -89,16 +95,24 @@
   }
 
   @override
-  EntityRefBuilder serializePropertyAccess(PropertyAccess access) {
-    Expression target = access.target;
-    if (target is Identifier) {
-      EntityRefBuilder targetRef = serializeIdentifier(target);
-      return new EntityRefBuilder(
-          reference: visitor.serializeReference(
-              targetRef.reference, access.propertyName.name));
+  EntityRefBuilder serializeIdentifierSequence(Expression expr) {
+    if (expr is Identifier) {
+      AstNode parent = expr.parent;
+      if (parent is MethodInvocation &&
+          parent.methodName == expr &&
+          parent.target != null) {
+        int targetId = serializeIdentifierSequence(parent.target).reference;
+        int nameId = visitor.serializeReference(targetId, expr.name);
+        return new EntityRefBuilder(reference: nameId);
+      }
+      return serializeIdentifier(expr);
+    }
+    if (expr is PropertyAccess) {
+      int targetId = serializeIdentifierSequence(expr.target).reference;
+      int nameId = visitor.serializeReference(targetId, expr.propertyName.name);
+      return new EntityRefBuilder(reference: nameId);
     } else {
-      // TODO(scheglov) should we handle other targets in malformed constants?
-      throw new StateError('Unexpected target type: ${target.runtimeType}');
+      throw new StateError('Unexpected node type: ${expr.runtimeType}');
     }
   }
 
@@ -256,6 +270,11 @@
   final Map<int, Map<String, int>> nameToReference = <int, Map<String, int>>{};
 
   /**
+   * True if the 'dart:core' library is been summarized.
+   */
+  bool isCoreLibrary = false;
+
+  /**
    * If the library has a library directive, the library name derived from it.
    * Otherwise `null`.
    */
@@ -296,9 +315,10 @@
   Block enclosingBlock = null;
 
   /**
-   * Create a slot id for storing a propagated or inferred type.
+   * Create a slot id for storing a propagated or inferred type or const cycle
+   * info.
    */
-  int assignTypeSlot() => ++numSlots;
+  int assignSlot() => ++numSlots;
 
   /**
    * Build a [_Scope] object containing the names defined within the body of a
@@ -348,6 +368,7 @@
    * and store the result in [classes].
    */
   void serializeClass(
+      AstNode node,
       Token abstractKeyword,
       String name,
       int nameOffset,
@@ -374,6 +395,8 @@
         serializeTypeParameters(typeParameters, typeParameterScope);
     if (superclass != null) {
       b.supertype = serializeTypeName(superclass);
+    } else {
+      b.hasNoSupertype = isCoreLibrary && name == 'Object';
     }
     if (withClause != null) {
       b.mixins = withClause.mixinTypes.map(serializeTypeName).toList();
@@ -394,6 +417,7 @@
     b.isAbstract = abstractKeyword != null;
     b.documentationComment = serializeDocumentation(documentationComment);
     b.annotations = serializeAnnotations(annotations);
+    b.codeRange = serializeCodeRange(node);
     classes.add(b);
     scopes.removeLast();
     assert(scopes.length == oldScopesLength);
@@ -402,6 +426,13 @@
   }
 
   /**
+   * Create a [CodeRangeBuilder] for the given [node].
+   */
+  CodeRangeBuilder serializeCodeRange(AstNode node) {
+    return new CodeRangeBuilder(offset: node.offset, length: node.length);
+  }
+
+  /**
    * Serialize a [Combinator] into an [UnlinkedCombinator].
    */
   UnlinkedCombinatorBuilder serializeCombinator(Combinator combinator) {
@@ -437,6 +468,7 @@
     b.libraryNameLength = libraryNameLength;
     b.libraryDocumentationComment = libraryDocumentationComment;
     b.libraryAnnotations = libraryAnnotations;
+    b.codeRange = serializeCodeRange(compilationUnit);
     b.classes = classes;
     b.enums = enums;
     b.executables = executables;
@@ -462,6 +494,36 @@
   }
 
   /**
+   * Serialize the given [declaredIdentifier] into [UnlinkedVariable], and
+   * store it in [variables].
+   */
+  void serializeDeclaredIdentifier(
+      AstNode scopeNode,
+      Comment documentationComment,
+      NodeList<Annotation> annotations,
+      bool isFinal,
+      bool isConst,
+      TypeName type,
+      bool assignPropagatedTypeSlot,
+      SimpleIdentifier declaredIdentifier) {
+    UnlinkedVariableBuilder b = new UnlinkedVariableBuilder();
+    b.isFinal = isFinal;
+    b.isConst = isConst;
+    b.name = declaredIdentifier.name;
+    b.nameOffset = declaredIdentifier.offset;
+    b.type = serializeTypeName(type);
+    b.documentationComment = serializeDocumentation(documentationComment);
+    b.annotations = serializeAnnotations(annotations);
+    b.codeRange = serializeCodeRange(declaredIdentifier);
+    if (assignPropagatedTypeSlot) {
+      b.propagatedTypeSlot = assignSlot();
+    }
+    b.visibleOffset = scopeNode?.offset;
+    b.visibleLength = scopeNode?.length;
+    this.variables.add(b);
+  }
+
+  /**
    * Serialize a [Comment] node into an [UnlinkedDocumentationComment] object.
    */
   UnlinkedDocumentationCommentBuilder serializeDocumentation(
@@ -484,6 +546,7 @@
    * [UnlinkedExecutable].
    */
   UnlinkedExecutableBuilder serializeExecutable(
+      AstNode node,
       String name,
       int nameOffset,
       bool isGetter,
@@ -510,7 +573,8 @@
     } else {
       b.kind = UnlinkedExecutableKind.functionOrMethod;
     }
-    b.isAbstract = body is EmptyFunctionBody;
+    b.isExternal = isExternal;
+    b.isAbstract = !isExternal && body is EmptyFunctionBody;
     b.name = nameString;
     b.nameOffset = nameOffset;
     b.typeParameters =
@@ -519,7 +583,6 @@
       b.isStatic = isDeclaredStatic;
     }
     b.returnType = serializeTypeName(returnType);
-    b.isExternal = isExternal;
     bool isSemanticallyStatic = isTopLevel || isDeclaredStatic;
     if (formalParameters != null) {
       b.parameters = formalParameters.parameters
@@ -529,15 +592,16 @@
         for (int i = 0; i < formalParameters.parameters.length; i++) {
           if (!b.parameters[i].isFunctionTyped &&
               b.parameters[i].type == null) {
-            b.parameters[i].inferredTypeSlot = assignTypeSlot();
+            b.parameters[i].inferredTypeSlot = assignSlot();
           }
         }
       }
     }
     b.documentationComment = serializeDocumentation(documentationComment);
     b.annotations = serializeAnnotations(annotations);
+    b.codeRange = serializeCodeRange(node);
     if (returnType == null && !isSemanticallyStatic) {
-      b.inferredReturnTypeSlot = assignTypeSlot();
+      b.inferredReturnTypeSlot = assignSlot();
     }
     b.visibleOffset = enclosingBlock?.offset;
     b.visibleLength = enclosingBlock?.length;
@@ -601,7 +665,7 @@
     UnlinkedExecutableBuilder initializer =
         new UnlinkedExecutableBuilder(nameOffset: expression.offset);
     serializeFunctionBody(initializer, expression);
-    initializer.inferredReturnTypeSlot = assignTypeSlot();
+    initializer.inferredReturnTypeSlot = assignSlot();
     return initializer;
   }
 
@@ -614,6 +678,7 @@
     b.name = node.identifier.name;
     b.nameOffset = node.identifier.offset;
     b.annotations = serializeAnnotations(node.metadata);
+    b.codeRange = serializeCodeRange(node);
     switch (node.kind) {
       case ParameterKind.REQUIRED:
         b.kind = UnlinkedParamKind.required;
@@ -648,8 +713,12 @@
   /**
    * Serialize a reference to a name declared either at top level or in a
    * nested scope.
+   *
+   * If [allowTypeParameter] is `true`, then references to type
+   * parameters are allowed, and are returned as negative numbers.
    */
-  int serializeSimpleReference(String name) {
+  int serializeSimpleReference(String name, {bool allowTypeParameter: false}) {
+    int indexOffset = 0;
     for (int i = scopes.length - 1; i >= 0; i--) {
       _Scope scope = scopes[i];
       _ScopedEntity entity = scope[name];
@@ -657,6 +726,9 @@
         if (entity is _ScopedClassMember) {
           return serializeReference(
               serializeReference(null, entity.className), name);
+        } else if (allowTypeParameter && entity is _ScopedTypeParameter) {
+          int paramReference = indexOffset + entity.index;
+          return -paramReference;
         } else {
           // Invalid reference to a type parameter.  Should never happen in
           // legal Dart code.
@@ -665,6 +737,9 @@
           throw new StateError('Invalid identifier reference');
         }
       }
+      if (scope is _TypeParameterScope) {
+        indexOffset += scope.length;
+      }
     }
     return serializeReference(null, name);
   }
@@ -756,6 +831,7 @@
    * in [this.variables].
    */
   void serializeVariables(
+      AstNode scopeNode,
       VariableDeclarationList variables,
       bool isDeclaredStatic,
       Comment documentationComment,
@@ -771,8 +847,10 @@
       b.type = serializeTypeName(variables.type);
       b.documentationComment = serializeDocumentation(documentationComment);
       b.annotations = serializeAnnotations(annotations);
+      b.codeRange = serializeCodeRange(variables.parent);
       if (variable.isConst ||
-          variable.isFinal && isField && !isDeclaredStatic) {
+          variable.isFinal && isField && !isDeclaredStatic ||
+          variables.type == null) {
         Expression initializer = variable.initializer;
         if (initializer != null) {
           b.constExpr = serializeConstExpr(initializer);
@@ -780,15 +858,15 @@
       }
       if (variable.initializer != null &&
           (variables.isFinal || variables.isConst)) {
-        b.propagatedTypeSlot = assignTypeSlot();
+        b.propagatedTypeSlot = assignSlot();
       }
       bool isSemanticallyStatic = !isField || isDeclaredStatic;
       if (variables.type == null &&
           (variable.initializer != null || !isSemanticallyStatic)) {
-        b.inferredTypeSlot = assignTypeSlot();
+        b.inferredTypeSlot = assignSlot();
       }
-      b.visibleOffset = enclosingBlock?.offset;
-      b.visibleLength = enclosingBlock?.length;
+      b.visibleOffset = scopeNode?.offset;
+      b.visibleLength = scopeNode?.length;
       b.initializer = serializeInitializerFunction(variable.initializer);
       this.variables.add(b);
     }
@@ -803,10 +881,26 @@
   }
 
   @override
+  void visitCatchClause(CatchClause node) {
+    SimpleIdentifier exception = node.exceptionParameter;
+    SimpleIdentifier st = node.stackTraceParameter;
+    if (exception != null) {
+      serializeDeclaredIdentifier(
+          node, null, null, false, false, node.exceptionType, false, exception);
+    }
+    if (st != null) {
+      serializeDeclaredIdentifier(
+          node, null, null, false, false, null, false, st);
+    }
+    super.visitCatchClause(node);
+  }
+
+  @override
   void visitClassDeclaration(ClassDeclaration node) {
     TypeName superclass =
         node.extendsClause == null ? null : node.extendsClause.superclass;
     serializeClass(
+        node,
         node.abstractKeyword,
         node.name.name,
         node.name.offset,
@@ -823,6 +917,7 @@
   @override
   void visitClassTypeAlias(ClassTypeAlias node) {
     serializeClass(
+        node,
         node.abstractKeyword,
         node.name.name,
         node.name.offset,
@@ -867,10 +962,14 @@
         }
       }
     }
-    b.isConst = node.constKeyword != null;
+    if (node.constKeyword != null) {
+      b.isConst = true;
+      b.constCycleSlot = assignSlot();
+    }
     b.isExternal = node.externalKeyword != null;
     b.documentationComment = serializeDocumentation(node.documentationComment);
     b.annotations = serializeAnnotations(node.metadata);
+    b.codeRange = serializeCodeRange(node);
     if (node.constKeyword != null) {
       Set<String> constructorParameterNames =
           node.parameters.parameters.map((p) => p.identifier.name).toSet();
@@ -894,6 +993,7 @@
       b.defaultValueCode = node.defaultValue.toSource();
     }
     b.initializer = serializeInitializerFunction(node.defaultValue);
+    b.codeRange = serializeCodeRange(node);
     return b;
   }
 
@@ -911,6 +1011,7 @@
         .toList();
     b.documentationComment = serializeDocumentation(node.documentationComment);
     b.annotations = serializeAnnotations(node.metadata);
+    b.codeRange = serializeCodeRange(node);
     enums.add(b);
   }
 
@@ -924,7 +1025,7 @@
 
   @override
   void visitFieldDeclaration(FieldDeclaration node) {
-    serializeVariables(node.fields, node.staticKeyword != null,
+    serializeVariables(null, node.fields, node.staticKeyword != null,
         node.documentationComment, node.metadata, true);
   }
 
@@ -944,8 +1045,35 @@
   }
 
   @override
+  void visitForEachStatement(ForEachStatement node) {
+    DeclaredIdentifier loopVariable = node.loopVariable;
+    if (loopVariable != null) {
+      serializeDeclaredIdentifier(
+          node,
+          loopVariable.documentationComment,
+          loopVariable.metadata,
+          loopVariable.isFinal,
+          loopVariable.isConst,
+          loopVariable.type,
+          true,
+          loopVariable.identifier);
+    }
+    super.visitForEachStatement(node);
+  }
+
+  @override
+  void visitForStatement(ForStatement node) {
+    VariableDeclarationList declaredVariables = node.variables;
+    if (declaredVariables != null) {
+      serializeVariables(node, declaredVariables, false, null, null, false);
+    }
+    super.visitForStatement(node);
+  }
+
+  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     executables.add(serializeExecutable(
+        node,
         node.name.name,
         node.name.offset,
         node.isGetter,
@@ -965,6 +1093,7 @@
   void visitFunctionExpression(FunctionExpression node) {
     if (node.parent is! FunctionDeclaration) {
       executables.add(serializeExecutable(
+          node,
           null,
           node.offset,
           false,
@@ -1000,6 +1129,7 @@
         .toList();
     b.documentationComment = serializeDocumentation(node.documentationComment);
     b.annotations = serializeAnnotations(node.metadata);
+    b.codeRange = serializeCodeRange(node);
     typedefs.add(b);
     scopes.removeLast();
     assert(scopes.length == oldScopesLength);
@@ -1037,12 +1167,14 @@
   @override
   void visitLabel(Label node) {
     AstNode parent = node.parent;
-    labels.add(new UnlinkedLabelBuilder(
-        name: node.label.name,
-        nameOffset: node.offset,
-        isOnSwitchMember: parent is SwitchMember,
-        isOnSwitchStatement:
-            parent is LabeledStatement && parent.statement is SwitchStatement));
+    if (parent is! NamedExpression) {
+      labels.add(new UnlinkedLabelBuilder(
+          name: node.label.name,
+          nameOffset: node.offset,
+          isOnSwitchMember: parent is SwitchMember,
+          isOnSwitchStatement: parent is LabeledStatement &&
+              parent.statement is SwitchStatement));
+    }
   }
 
   @override
@@ -1051,6 +1183,7 @@
         node.name.components.map((SimpleIdentifier id) => id.name).join('.');
     libraryNameOffset = node.name.offset;
     libraryNameLength = node.name.length;
+    isCoreLibrary = libraryName == 'dart.core';
     libraryDocumentationComment =
         serializeDocumentation(node.documentationComment);
     libraryAnnotations = serializeAnnotations(node.metadata);
@@ -1059,6 +1192,7 @@
   @override
   void visitMethodDeclaration(MethodDeclaration node) {
     executables.add(serializeExecutable(
+        node,
         node.name.name,
         node.name.offset,
         node.isGetter,
@@ -1083,7 +1217,9 @@
   }
 
   @override
-  void visitPartOfDirective(PartOfDirective node) {}
+  void visitPartOfDirective(PartOfDirective node) {
+    isCoreLibrary = node.libraryName.name == 'dart.core';
+  }
 
   @override
   UnlinkedParamBuilder visitSimpleFormalParameter(SimpleFormalParameter node) {
@@ -1094,8 +1230,8 @@
 
   @override
   void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
-    serializeVariables(
-        node.variables, false, node.documentationComment, node.metadata, false);
+    serializeVariables(null, node.variables, false, node.documentationComment,
+        node.metadata, false);
   }
 
   @override
@@ -1107,12 +1243,14 @@
       b.bound = serializeTypeName(node.bound);
     }
     b.annotations = serializeAnnotations(node.metadata);
+    b.codeRange = serializeCodeRange(node);
     return b;
   }
 
   @override
   void visitVariableDeclarationStatement(VariableDeclarationStatement node) {
-    serializeVariables(node.variables, false, null, null, false);
+    serializeVariables(
+        enclosingBlock, node.variables, false, null, null, false);
   }
 
   /**
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index 9e63ff8..6362f01 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -4,8 +4,8 @@
 
 library serialization.summarize_const_expr;
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 
@@ -46,7 +46,7 @@
   /**
    * See [UnlinkedConstBuilder.isInvalid].
    */
-  bool isInvalid = false;
+  bool isValidConst = true;
 
   /**
    * See [UnlinkedConstBuilder.operations].
@@ -54,6 +54,12 @@
   final List<UnlinkedConstOperation> operations = <UnlinkedConstOperation>[];
 
   /**
+   * See [UnlinkedConstBuilder.assignmentOperators].
+   */
+  final List<UnlinkedExprAssignOperator> assignmentOperators =
+      <UnlinkedExprAssignOperator>[];
+
+  /**
    * See [UnlinkedConstBuilder.ints].
    */
   final List<int> ints = <int>[];
@@ -86,7 +92,7 @@
     try {
       _serialize(expr);
     } on StateError {
-      isInvalid = true;
+      isValidConst = false;
     }
   }
 
@@ -107,34 +113,20 @@
    */
   EntityRefBuilder serializeIdentifier(Identifier identifier);
 
+  /**
+   * Return [EntityRefBuilder] that corresponds to the given [expr], which
+   * must be a sequence of identifiers.
+   */
+  EntityRefBuilder serializeIdentifierSequence(Expression expr);
+
   void serializeInstanceCreation(
       EntityRefBuilder constructor, ArgumentList argumentList) {
-    List<Expression> arguments = argumentList.arguments;
-    // Serialize the arguments.
-    List<String> argumentNames = <String>[];
-    arguments.forEach((arg) {
-      if (arg is NamedExpression) {
-        argumentNames.add(arg.name.label.name);
-        _serialize(arg.expression);
-      } else {
-        _serialize(arg);
-      }
-    });
-    // Add the op-code and numbers of named and positional arguments.
-    operations.add(UnlinkedConstOperation.invokeConstructor);
-    ints.add(argumentNames.length);
-    strings.addAll(argumentNames);
-    ints.add(arguments.length - argumentNames.length);
-    // Serialize the reference.
+    _serializeArguments(argumentList);
     references.add(constructor);
+    operations.add(UnlinkedConstOperation.invokeConstructor);
   }
 
   /**
-   * Return [EntityRefBuilder] that corresponds to the given [access].
-   */
-  EntityRefBuilder serializePropertyAccess(PropertyAccess access);
-
-  /**
    * Return [EntityRefBuilder] that corresponds to the given [type].
    */
   EntityRefBuilder serializeType(TypeName type);
@@ -144,17 +136,41 @@
    * serializer.
    */
   UnlinkedConstBuilder toBuilder() {
-    if (isInvalid) {
-      return new UnlinkedConstBuilder(isInvalid: true);
-    }
     return new UnlinkedConstBuilder(
+        isValidConst: isValidConst,
         operations: operations,
+        assignmentOperators: assignmentOperators,
         ints: ints,
         doubles: doubles,
         strings: strings,
         references: references);
   }
 
+  /**
+   * Push the operation for the given assignable [expr].
+   */
+  void _pushAssignable(Expression expr) {
+    if (_isIdentifierSequence(expr)) {
+      EntityRefBuilder ref = serializeIdentifierSequence(expr);
+      references.add(ref);
+      operations.add(UnlinkedConstOperation.assignToRef);
+    } else if (expr is PropertyAccess) {
+      if (!expr.isCascaded) {
+        _serialize(expr.target);
+      }
+      strings.add(expr.propertyName.name);
+      operations.add(UnlinkedConstOperation.assignToProperty);
+    } else if (expr is IndexExpression) {
+      if (!expr.isCascaded) {
+        _serialize(expr.target);
+      }
+      _serialize(expr.index);
+      operations.add(UnlinkedConstOperation.assignToIndex);
+    } else {
+      throw new StateError('Unsupported assignable: $expr');
+    }
+  }
+
   void _pushInt(int value) {
     assert(value >= 0);
     if (value >= (1 << 32)) {
@@ -207,6 +223,9 @@
         operations.add(UnlinkedConstOperation.pushReference);
       }
     } else if (expr is InstanceCreationExpression) {
+      if (!expr.isConst) {
+        isValidConst = false;
+      }
       serializeInstanceCreation(
           serializeConstructorName(
               expr.constructorName.type, expr.constructorName.name),
@@ -216,17 +235,7 @@
     } else if (expr is MapLiteral) {
       _serializeMapLiteral(expr);
     } else if (expr is MethodInvocation) {
-      String name = expr.methodName.name;
-      if (name != 'identical') {
-        throw new StateError('Only "identity" function invocation is allowed.');
-      }
-      if (expr.argumentList == null ||
-          expr.argumentList.arguments.length != 2) {
-        throw new StateError(
-            'The function "identity" requires exactly 2 arguments.');
-      }
-      expr.argumentList.arguments.forEach(_serialize);
-      operations.add(UnlinkedConstOperation.identical);
+      _serializeMethodInvocation(expr);
     } else if (expr is BinaryExpression) {
       _serializeBinaryExpression(expr);
     } else if (expr is ConditionalExpression) {
@@ -236,22 +245,107 @@
       operations.add(UnlinkedConstOperation.conditional);
     } else if (expr is PrefixExpression) {
       _serializePrefixExpression(expr);
+    } else if (expr is PostfixExpression) {
+      _serializePostfixExpression(expr);
     } else if (expr is PropertyAccess) {
-      if (expr.target is! PrefixedIdentifier &&
-          expr.propertyName.name == 'length') {
-        _serialize(expr.target);
-        operations.add(UnlinkedConstOperation.length);
-      } else {
-        references.add(serializePropertyAccess(expr));
-        operations.add(UnlinkedConstOperation.pushReference);
-      }
+      _serializePropertyAccess(expr);
     } else if (expr is ParenthesizedExpression) {
       _serialize(expr.expression);
+    } else if (expr is IndexExpression) {
+      isValidConst = false;
+      _serialize(expr.target);
+      _serialize(expr.index);
+      operations.add(UnlinkedConstOperation.extractIndex);
+    } else if (expr is AssignmentExpression) {
+      _serializeAssignment(expr);
+    } else if (expr is CascadeExpression) {
+      _serializeCascadeExpression(expr);
+    } else if (expr is FunctionExpression) {
+      isValidConst = false;
+      // TODO(scheglov) implement
+      operations.add(UnlinkedConstOperation.pushNull);
+    } else if (expr is FunctionExpressionInvocation) {
+      isValidConst = false;
+      // TODO(scheglov) implement
+      operations.add(UnlinkedConstOperation.pushNull);
+    } else if (expr is AsExpression) {
+      isValidConst = false;
+      _serialize(expr.expression);
+      references.add(serializeType(expr.type));
+      operations.add(UnlinkedConstOperation.typeCast);
+    } else if (expr is IsExpression) {
+      isValidConst = false;
+      _serialize(expr.expression);
+      references.add(serializeType(expr.type));
+      operations.add(UnlinkedConstOperation.typeCheck);
+    } else if (expr is ThrowExpression) {
+      isValidConst = false;
+      _serialize(expr.expression);
+      operations.add(UnlinkedConstOperation.throwException);
     } else {
       throw new StateError('Unknown expression type: $expr');
     }
   }
 
+  void _serializeArguments(ArgumentList argumentList) {
+    List<Expression> arguments = argumentList.arguments;
+    // Serialize the arguments.
+    List<String> argumentNames = <String>[];
+    arguments.forEach((arg) {
+      if (arg is NamedExpression) {
+        argumentNames.add(arg.name.label.name);
+        _serialize(arg.expression);
+      } else {
+        _serialize(arg);
+      }
+    });
+    // Add numbers of named and positional arguments, and the op-code.
+    ints.add(argumentNames.length);
+    strings.addAll(argumentNames);
+    ints.add(arguments.length - argumentNames.length);
+  }
+
+  void _serializeAssignment(AssignmentExpression expr) {
+    isValidConst = false;
+    // Push the value.
+    _serialize(expr.rightHandSide);
+    // Push the assignment operator.
+    TokenType operator = expr.operator.type;
+    UnlinkedExprAssignOperator assignmentOperator;
+    if (operator == TokenType.EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.assign;
+    } else if (operator == TokenType.QUESTION_QUESTION_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.ifNull;
+    } else if (operator == TokenType.STAR_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.multiply;
+    } else if (operator == TokenType.SLASH_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.divide;
+    } else if (operator == TokenType.TILDE_SLASH_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.floorDivide;
+    } else if (operator == TokenType.PERCENT_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.modulo;
+    } else if (operator == TokenType.PLUS_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.plus;
+    } else if (operator == TokenType.MINUS_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.minus;
+    } else if (operator == TokenType.LT_LT_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.shiftLeft;
+    } else if (operator == TokenType.GT_GT_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.shiftRight;
+    } else if (operator == TokenType.AMPERSAND_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.bitAnd;
+    } else if (operator == TokenType.CARET_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.bitXor;
+    } else if (operator == TokenType.BAR_EQ) {
+      assignmentOperator = UnlinkedExprAssignOperator.bitOr;
+    } else {
+      throw new StateError('Unknown assignment operator: $operator');
+    }
+    assignmentOperators.add(assignmentOperator);
+    // Push the assignment to the LHS.
+    _pushAssignable(expr.leftHandSide);
+  }
+
   void _serializeBinaryExpression(BinaryExpression expr) {
     _serialize(expr.leftOperand);
     _serialize(expr.rightOperand);
@@ -299,6 +393,15 @@
     }
   }
 
+  void _serializeCascadeExpression(CascadeExpression expr) {
+    _serialize(expr.target);
+    for (Expression section in expr.cascadeSections) {
+      operations.add(UnlinkedConstOperation.cascadeSectionBegin);
+      _serialize(section);
+      operations.add(UnlinkedConstOperation.cascadeSectionEnd);
+    }
+  }
+
   void _serializeListLiteral(ListLiteral expr) {
     List<Expression> elements = expr.elements;
     elements.forEach(_serialize);
@@ -328,20 +431,85 @@
     }
   }
 
-  void _serializePrefixExpression(PrefixExpression expr) {
-    _serialize(expr.operand);
+  void _serializeMethodInvocation(MethodInvocation invocation) {
+    if (invocation.target != null ||
+        invocation.methodName.name != 'identical') {
+      isValidConst = false;
+    }
+    Expression target = invocation.target;
+    SimpleIdentifier methodName = invocation.methodName;
+    ArgumentList argumentList = invocation.argumentList;
+    if (_isIdentifierSequence(methodName)) {
+      EntityRefBuilder ref = serializeIdentifierSequence(methodName);
+      references.add(ref);
+      _serializeArguments(argumentList);
+      operations.add(UnlinkedConstOperation.invokeMethodRef);
+    } else {
+      if (!invocation.isCascaded) {
+        _serialize(target);
+      }
+      _serializeArguments(argumentList);
+      strings.add(methodName.name);
+      operations.add(UnlinkedConstOperation.invokeMethod);
+    }
+  }
+
+  void _serializePostfixExpression(PostfixExpression expr) {
     TokenType operator = expr.operator.type;
-    if (operator == TokenType.BANG) {
-      operations.add(UnlinkedConstOperation.not);
-    } else if (operator == TokenType.MINUS) {
-      operations.add(UnlinkedConstOperation.negate);
-    } else if (operator == TokenType.TILDE) {
-      operations.add(UnlinkedConstOperation.complement);
+    Expression operand = expr.operand;
+    if (operator == TokenType.PLUS_PLUS) {
+      _serializePrefixPostfixIncDec(
+          operand, UnlinkedExprAssignOperator.postfixIncrement);
+    } else if (operator == TokenType.MINUS_MINUS) {
+      _serializePrefixPostfixIncDec(
+          operand, UnlinkedExprAssignOperator.postfixDecrement);
     } else {
       throw new StateError('Unknown operator: $operator');
     }
   }
 
+  void _serializePrefixExpression(PrefixExpression expr) {
+    TokenType operator = expr.operator.type;
+    Expression operand = expr.operand;
+    if (operator == TokenType.BANG) {
+      _serialize(operand);
+      operations.add(UnlinkedConstOperation.not);
+    } else if (operator == TokenType.MINUS) {
+      _serialize(operand);
+      operations.add(UnlinkedConstOperation.negate);
+    } else if (operator == TokenType.TILDE) {
+      _serialize(operand);
+      operations.add(UnlinkedConstOperation.complement);
+    } else if (operator == TokenType.PLUS_PLUS) {
+      _serializePrefixPostfixIncDec(
+          operand, UnlinkedExprAssignOperator.prefixIncrement);
+    } else if (operator == TokenType.MINUS_MINUS) {
+      _serializePrefixPostfixIncDec(
+          operand, UnlinkedExprAssignOperator.prefixDecrement);
+    } else {
+      throw new StateError('Unknown operator: $operator');
+    }
+  }
+
+  void _serializePrefixPostfixIncDec(
+      Expression operand, UnlinkedExprAssignOperator operator) {
+    isValidConst = false;
+    assignmentOperators.add(operator);
+    _pushAssignable(operand);
+  }
+
+  void _serializePropertyAccess(PropertyAccess expr) {
+    if (_isIdentifierSequence(expr)) {
+      EntityRefBuilder ref = serializeIdentifierSequence(expr);
+      references.add(ref);
+      operations.add(UnlinkedConstOperation.pushReference);
+    } else {
+      _serialize(expr.target);
+      strings.add(expr.propertyName.name);
+      operations.add(UnlinkedConstOperation.extractProperty);
+    }
+  }
+
   void _serializeString(StringLiteral expr) {
     if (expr is AdjacentStrings) {
       if (expr.strings.every((string) => string is SimpleStringLiteral)) {
@@ -369,4 +537,29 @@
       ints.add(interpolation.elements.length);
     }
   }
+
+  /**
+   * Return `true` if the given [expr] is a sequence of identifiers.
+   */
+  static bool _isIdentifierSequence(Expression expr) {
+    while (expr != null) {
+      if (expr is SimpleIdentifier) {
+        AstNode parent = expr.parent;
+        if (parent is MethodInvocation && parent.methodName == expr) {
+          if (parent.isCascaded) {
+            return false;
+          }
+          return parent.target == null || _isIdentifierSequence(parent.target);
+        }
+        return true;
+      } else if (expr is PrefixedIdentifier) {
+        expr = (expr as PrefixedIdentifier).prefix;
+      } else if (expr is PropertyAccess) {
+        expr = (expr as PropertyAccess).target;
+      } else {
+        return false;
+      }
+    }
+    return false;
+  }
 }
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 3d9896b..bb2a42e 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -6,12 +6,12 @@
 
 import 'dart:convert';
 
+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/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
@@ -20,6 +20,7 @@
 import 'package:analyzer/src/summary/name_filter.dart';
 import 'package:analyzer/src/summary/summarize_const_expr.dart';
 import 'package:crypto/crypto.dart';
+import 'package:path/path.dart' as path;
 
 /**
  * Serialize all the elements in [lib] to a summary using [ctx] as the context
@@ -138,6 +139,44 @@
   final List<String> _unlinkedUnitHashes = <String>[];
 
   /**
+   * Add a fallback library to the package bundle, corresponding to the library
+   * whose defining compilation unit is located at [source].  Caller must also
+   * call [addFallbackUnit] for all compilation units contained in the library
+   * (including the defining compilation unit).
+   */
+  void addFallbackLibrary(Source source) {
+    String uri = source.uri.toString();
+    _linkedLibraryUris.add(uri);
+    _linkedLibraries.add(new LinkedLibraryBuilder(fallbackMode: true));
+  }
+
+  /**
+   * Add a fallback compilation unit to the package bundle, corresponding to
+   * the compilation unit located at [source].
+   */
+  void addFallbackUnit(Source source) {
+    String uri = source.uri.toString();
+    _unlinkedUnitUris.add(uri);
+    _unlinkedUnits.add(new UnlinkedUnitBuilder(
+        fallbackModePath: path.relative(source.fullName)));
+  }
+
+  void addLinkedLibrary(String uri, LinkedLibraryBuilder library) {
+    _linkedLibraries.add(library);
+    _linkedLibraryUris.add(uri);
+  }
+
+  void addUnlinkedUnit(Source source, UnlinkedUnitBuilder unit) {
+    addUnlinkedUnitWithHash(source.uri.toString(), unit, _hash(source.contents.data));
+  }
+
+  void addUnlinkedUnitWithHash(String uri, UnlinkedUnitBuilder unit, String hash) {
+    _unlinkedUnitUris.add(uri);
+    _unlinkedUnits.add(unit);
+    _unlinkedUnitHashes.add(hash);
+  }
+
+  /**
    * Assemble a new [PackageBundleBuilder] using the gathered information.
    */
   PackageBundleBuilder assemble() {
@@ -246,6 +285,11 @@
   final List<_SerializeTypeRef> deferredLinkedTypes = <_SerializeTypeRef>[];
 
   /**
+   * List which should be stored in [LinkedUnit.constCycles].
+   */
+  final List<int> constCycles = <int>[];
+
+  /**
    * Index into the "references table" representing an unresolved reference, if
    * such an index exists.  `null` if no such entry has been made in the
    * references table yet.
@@ -307,7 +351,9 @@
     for (ClassElement enm in compilationUnit.enums) {
       if (enm.isPublic) {
         names.add(new UnlinkedPublicNameBuilder(
-            kind: ReferenceKind.classOrEnum, name: enm.name));
+            kind: ReferenceKind.classOrEnum,
+            name: enm.name,
+            members: serializeClassConstMembers(enm)));
       }
     }
     for (FunctionElement function in compilationUnit.functions) {
@@ -364,6 +410,7 @@
       unlinkedUnit.publicNamespace =
           new UnlinkedPublicNamespaceBuilder(names: names);
     }
+    unlinkedUnit.codeRange = serializeCodeRange(compilationUnit);
     unlinkedUnit.classes = compilationUnit.types.map(serializeClass).toList();
     unlinkedUnit.enums = compilationUnit.enums.map(serializeEnum).toList();
     unlinkedUnit.typedefs =
@@ -394,22 +441,23 @@
 
   /**
    * Create the [LinkedUnit.types] table based on deferred types that were
-   * found during [addCompilationUnitElements].
+   * found during [addCompilationUnitElements].  Also populate
+   * [LinkedUnit.constCycles].
    */
-  void createLinkedTypes() {
+  void createLinkedInfo() {
     buildingLinkedReferences = true;
     linkedUnit.types = deferredLinkedTypes
         .map((_SerializeTypeRef closure) => closure())
         .toList();
+    linkedUnit.constCycles = constCycles;
     buildingLinkedReferences = false;
   }
 
   /**
    * Compute the appropriate De Bruijn index to represent the given type
-   * parameter [type].
+   * parameter [type], or return `null` if the type parameter is not in scope.
    */
   int findTypeParameterIndex(TypeParameterType type, Element context) {
-    Element originalContext = context;
     int index = 0;
     while (context != null) {
       List<TypeParameterElement> typeParameters;
@@ -431,8 +479,7 @@
       }
       context = context.enclosingElement;
     }
-    throw new StateError(
-        'Unbound type parameter $type (${originalContext?.location})');
+    return null;
   }
 
   /**
@@ -460,9 +507,11 @@
     if (element.metadata.isEmpty) {
       return const <UnlinkedConstBuilder>[];
     }
-    return element.metadata.map((ElementAnnotationImpl a) {
-      _ConstExprSerializer serializer = new _ConstExprSerializer(this, null);
-      serializer.serializeAnnotation(a.annotationAst);
+    return element.metadata.map((ElementAnnotation a) {
+      _ConstExprSerializer serializer =
+          new _ConstExprSerializer(this, element, null);
+      serializer
+          .serializeAnnotation((a as ElementAnnotationImpl).annotationAst);
       return serializer.toBuilder();
     }).toList();
   }
@@ -530,6 +579,7 @@
     b.isMixinApplication = classElement.isMixinApplication;
     b.documentationComment = serializeDocumentation(classElement);
     b.annotations = serializeAnnotations(classElement);
+    b.codeRange = serializeCodeRange(classElement);
     return b;
   }
 
@@ -579,6 +629,14 @@
     return null;
   }
 
+  CodeRangeBuilder serializeCodeRange(Element element) {
+    if (element is ElementImpl && element.codeOffset != null) {
+      return new CodeRangeBuilder(
+          offset: element.codeOffset, length: element.codeLength);
+    }
+    return null;
+  }
+
   /**
    * Serialize the given [combinator] into an [UnlinkedCombinator].
    */
@@ -598,10 +656,11 @@
   /**
    * Serialize the given [expression], creating an [UnlinkedConstBuilder].
    */
-  UnlinkedConstBuilder serializeConstExpr(Expression expression,
+  UnlinkedConstBuilder serializeConstExpr(
+      Element context, Expression expression,
       [Set<String> constructorParameterNames]) {
     _ConstExprSerializer serializer =
-        new _ConstExprSerializer(this, constructorParameterNames);
+        new _ConstExprSerializer(this, context, constructorParameterNames);
     serializer.serialize(expression);
     return serializer.toBuilder();
   }
@@ -641,6 +700,7 @@
     b.values = values;
     b.documentationComment = serializeDocumentation(enumElement);
     b.annotations = serializeAnnotations(enumElement);
+    b.codeRange = serializeCodeRange(enumElement);
     return b;
   }
 
@@ -706,17 +766,19 @@
           b.redirectedConstructorName = redirectedConstructor.name;
         }
       }
-      if (executableElement.isConst &&
-          executableElement.constantInitializers != null) {
-        Set<String> constructorParameterNames =
-            executableElement.parameters.map((p) => p.name).toSet();
-        b.constantInitializers = executableElement.constantInitializers
-            .map((ConstructorInitializer initializer) =>
-                serializeConstructorInitializer(
-                    initializer,
-                    (expr) =>
-                        serializeConstExpr(expr, constructorParameterNames)))
-            .toList();
+      if (executableElement.isConst) {
+        b.constCycleSlot = storeConstCycle(!executableElement.isCycleFree);
+        if (executableElement.constantInitializers != null) {
+          Set<String> constructorParameterNames =
+              executableElement.parameters.map((p) => p.name).toSet();
+          b.constantInitializers = executableElement.constantInitializers
+              .map((ConstructorInitializer initializer) =>
+                  serializeConstructorInitializer(
+                      initializer,
+                      (expr) => serializeConstExpr(
+                          executableElement, expr, constructorParameterNames)))
+              .toList();
+        }
       }
     } else {
       b.kind = UnlinkedExecutableKind.functionOrMethod;
@@ -727,6 +789,7 @@
     b.isExternal = executableElement.isExternal;
     b.documentationComment = serializeDocumentation(executableElement);
     b.annotations = serializeAnnotations(executableElement);
+    b.codeRange = serializeCodeRange(executableElement);
     if (executableElement is FunctionElement) {
       SourceRange visibleRange = executableElement.visibleRange;
       if (visibleRange != null) {
@@ -793,12 +856,13 @@
   /**
    * Serialize the given [label], creating an [UnlinkedLabelBuilder].
    */
-  UnlinkedLabelBuilder serializeLabel(LabelElementImpl label) {
+  UnlinkedLabelBuilder serializeLabel(LabelElement label) {
+    LabelElementImpl labelImpl = label as LabelElementImpl;
     UnlinkedLabelBuilder b = new UnlinkedLabelBuilder();
-    b.name = label.name;
-    b.nameOffset = label.nameOffset;
-    b.isOnSwitchMember = label.isOnSwitchMember;
-    b.isOnSwitchStatement = label.isOnSwitchStatement;
+    b.name = labelImpl.name;
+    b.nameOffset = labelImpl.nameOffset;
+    b.isOnSwitchMember = labelImpl.isOnSwitchMember;
+    b.isOnSwitchStatement = labelImpl.isOnSwitchStatement;
     return b;
   }
 
@@ -823,6 +887,7 @@
         break;
     }
     b.annotations = serializeAnnotations(parameter);
+    b.codeRange = serializeCodeRange(parameter);
     b.isInitializingFormal = parameter.isInitializingFormal;
     DartType type = parameter.type;
     if (parameter.hasImplicitType) {
@@ -848,7 +913,7 @@
       ConstVariableElement constParameter = parameter as ConstVariableElement;
       Expression initializer = constParameter.constantInitializer;
       if (initializer != null) {
-        b.defaultValue = serializeConstExpr(initializer);
+        b.defaultValue = serializeConstExpr(parameter, initializer);
         b.defaultValueCode = parameter.defaultValueCode;
       }
     }
@@ -912,6 +977,7 @@
     b.parameters = typedefElement.parameters.map(serializeParam).toList();
     b.documentationComment = serializeDocumentation(typedefElement);
     b.annotations = serializeAnnotations(typedefElement);
+    b.codeRange = serializeCodeRange(typedefElement);
     return b;
   }
 
@@ -927,6 +993,7 @@
       b.bound = serializeTypeRef(typeParameter.bound, typeParameter);
     }
     b.annotations = serializeAnnotations(typeParameter);
+    b.codeRange = serializeCodeRange(typeParameter);
     return b;
   }
 
@@ -945,7 +1012,15 @@
     EntityRefBuilder b = new EntityRefBuilder(slot: slot);
     Element typeElement = type.element;
     if (type is TypeParameterType) {
-      b.paramReference = findTypeParameterIndex(type, context);
+      int typeParameterIndex = findTypeParameterIndex(type, context);
+      if (typeParameterIndex != null) {
+        b.paramReference = typeParameterIndex;
+      } else {
+        // Out-of-scope type parameters only occur in circumstances where they
+        // are irrelevant (i.e. when a type parameter is unused).  So we can
+        // safely convert them to `dynamic`.
+        b.reference = serializeReferenceForType(DynamicTypeImpl.instance);
+      }
     } else if (type is FunctionType &&
         typeElement is FunctionElement &&
         typeElement.enclosingElement == null) {
@@ -1007,8 +1082,8 @@
   }
 
   /**
-   * Create a new entry in the references table ([UnlinkedLibrary.references]
-   * and [LinkedLibrary.references]) representing an entity having the given
+   * Create a new entry in the references table ([UnlinkedUnit.references]
+   * and [LinkedUnit.references]) representing an entity having the given
    * [name] and [kind].  If [unit] is given, it is the index of the compilation
    * unit containing the entity being referred to.  If [prefixReference] is
    * given, it indicates the entry in the references table for the prefix.
@@ -1060,7 +1135,7 @@
       ConstVariableElement constVariable = variable as ConstVariableElement;
       Expression initializer = constVariable.constantInitializer;
       if (initializer != null) {
-        b.constExpr = serializeConstExpr(initializer);
+        b.constExpr = serializeConstExpr(variable, initializer);
       }
     }
     if (variable is PropertyInducingElement) {
@@ -1076,6 +1151,7 @@
         (variable.initializer != null || !variable.isStatic)) {
       b.inferredTypeSlot = storeInferredType(variable.type, variable);
     }
+    b.codeRange = serializeCodeRange(variable);
     if (variable is LocalVariableElement) {
       SourceRange visibleRange = variable.visibleRange;
       if (visibleRange != null) {
@@ -1091,6 +1167,18 @@
   }
 
   /**
+   * Create a new slot id and return it.  If [hasCycle] is `true`, arrange for
+   * the slot id to be included in [LinkedUnit.constCycles].
+   */
+  int storeConstCycle(bool hasCycle) {
+    int slot = ++numSlots;
+    if (hasCycle) {
+      constCycles.add(slot);
+    }
+    return slot;
+  }
+
+  /**
    * Create a slot id for the given [type] (which is an inferred type).  If
    * [type] is not `dynamic`, it is stored in [linkedTypes] so that once the
    * compilation unit has been fully visited, it will be serialized into
@@ -1198,11 +1286,6 @@
       return index;
     });
   }
-
-  int _getLengthPropertyReference(int prefix) {
-    return serializeUnlinkedReference('length', ReferenceKind.length,
-        prefixReference: prefix);
-  }
 }
 
 /**
@@ -1211,6 +1294,7 @@
  */
 class _ConstExprSerializer extends AbstractConstExprSerializer {
   final _CompilationUnitSerializer serializer;
+  final Element context;
 
   /**
    * If a constructor initializer expression is being serialized, the names of
@@ -1218,7 +1302,8 @@
    */
   final Set<String> constructorParameterNames;
 
-  _ConstExprSerializer(this.serializer, this.constructorParameterNames);
+  _ConstExprSerializer(
+      this.serializer, this.context, this.constructorParameterNames);
 
   @override
   bool isConstructorParameterName(String name) {
@@ -1274,70 +1359,58 @@
 
   EntityRefBuilder serializeIdentifier(Identifier identifier,
       {int prefixReference: 0}) {
-    Element element = identifier.staticElement;
-    // Unresolved identifier.
-    if (element == null) {
-      int reference;
-      if (identifier is PrefixedIdentifier) {
-        int prefix = serializeIdentifier(identifier.prefix).reference;
-        reference = serializer.serializeUnlinkedReference(
-            identifier.identifier.name, ReferenceKind.unresolved,
-            prefixReference: prefix);
+    if (identifier is SimpleIdentifier) {
+      Element element = identifier.staticElement;
+      if (element is TypeParameterElement) {
+        int typeParameterIndex =
+            serializer.findTypeParameterIndex(element.type, context);
+        return new EntityRefBuilder(paramReference: typeParameterIndex);
+      } else if (_isPrelinkResolvableElement(element)) {
+        int ref = serializer._getElementReferenceId(element);
+        return new EntityRefBuilder(reference: ref);
       } else {
-        reference = serializer.serializeUnlinkedReference(
-            identifier.name, ReferenceKind.unresolved,
-            prefixReference: prefixReference);
+        int ref = serializer.serializeUnlinkedReference(
+            identifier.name, ReferenceKind.unresolved);
+        return new EntityRefBuilder(reference: ref);
       }
-      return new EntityRefBuilder(reference: reference);
-    }
-    // The only supported instance property accessor - `length`.
-    if (identifier is PrefixedIdentifier &&
-        element is PropertyAccessorElement &&
-        !element.isStatic) {
-      if (element.name != 'length') {
-        throw new StateError('Only "length" property is allowed in constants.');
+    } else if (identifier is PrefixedIdentifier) {
+      Element element = identifier.staticElement;
+      if (_isPrelinkResolvableElement(element)) {
+        int ref = serializer._getElementReferenceId(element);
+        return new EntityRefBuilder(reference: ref);
+      } else {
+        int prefixRef = serializeIdentifier(identifier.prefix).reference;
+        int ref = serializer.serializeUnlinkedReference(
+            identifier.identifier.name, ReferenceKind.unresolved,
+            prefixReference: prefixRef);
+        return new EntityRefBuilder(reference: ref);
       }
-      Element prefixElement = identifier.prefix.staticElement;
-      int prefixRef = serializer._getElementReferenceId(prefixElement);
-      int lengthRef = serializer._getLengthPropertyReference(prefixRef);
-      return new EntityRefBuilder(reference: lengthRef);
+    } else {
+      throw new StateError(
+          'Unexpected identifier type: ${identifier.runtimeType}');
     }
-    if (element is TypeParameterElement) {
-      throw new StateError('Constants may not refer to type parameters.');
-    }
-    return new EntityRefBuilder(
-        reference: serializer._getElementReferenceId(element));
   }
 
   @override
-  EntityRefBuilder serializePropertyAccess(PropertyAccess access) {
-    Element element = access.propertyName.staticElement;
-    // Unresolved property access.
-    if (element == null) {
-      Expression target = access.target;
-      if (target is Identifier) {
-        EntityRefBuilder targetRef = serializeIdentifier(target);
-        EntityRefBuilder propertyRef = serializeIdentifier(access.propertyName,
-            prefixReference: targetRef.reference);
-        return new EntityRefBuilder(reference: propertyRef.reference);
+  EntityRefBuilder serializeIdentifierSequence(Expression expr) {
+    if (expr is Identifier) {
+      return serializeIdentifier(expr);
+    }
+    if (expr is PropertyAccess) {
+      Element element = expr.propertyName.staticElement;
+      if (_isPrelinkResolvableElement(element)) {
+        int ref = serializer._getElementReferenceId(element);
+        return new EntityRefBuilder(reference: ref);
       } else {
-        // TODO(scheglov) should we handle other targets in malformed constants?
-        throw new StateError('Unexpected target type: ${target.runtimeType}');
+        int targetRef = serializeIdentifierSequence(expr.target).reference;
+        int ref = serializer.serializeUnlinkedReference(
+            expr.propertyName.name, ReferenceKind.unresolved,
+            prefixReference: targetRef);
+        return new EntityRefBuilder(reference: ref);
       }
+    } else {
+      throw new StateError('Unexpected node type: ${expr.runtimeType}');
     }
-    // The only supported instance property accessor - `length`.
-    Expression target = access.target;
-    if (target is Identifier &&
-        element is PropertyAccessorElement &&
-        !element.isStatic) {
-      assert(element.name == 'length');
-      Element prefixElement = target.staticElement;
-      int prefixRef = serializer._getElementReferenceId(prefixElement);
-      int lengthRef = serializer._getLengthPropertyReference(prefixRef);
-      return new EntityRefBuilder(reference: lengthRef);
-    }
-    return new EntityRefBuilder(
-        reference: serializer._getElementReferenceId(element));
   }
 
   @override
@@ -1349,7 +1422,32 @@
       }
     }
     DartType type = typeName != null ? typeName.type : DynamicTypeImpl.instance;
-    return serializer.serializeTypeRef(type, null);
+    return serializer.serializeTypeRef(type, context);
+  }
+
+  /**
+   * Return `true` if the given [element] can be resolved at prelink step.
+   */
+  static bool _isPrelinkResolvableElement(Element element) {
+    if (element == null) {
+      return false;
+    }
+    if (element == DynamicTypeImpl.instance.element) {
+      return true;
+    }
+    if (element is PrefixElement) {
+      return true;
+    }
+    Element enclosingElement = element.enclosingElement;
+    if (enclosingElement is CompilationUnitElement) {
+      return true;
+    }
+    if (enclosingElement is ClassElement) {
+      return element is ConstructorElement ||
+          element is ClassMemberElement && element.isStatic ||
+          element is PropertyAccessorElement && element.isStatic;
+    }
+    return false;
   }
 }
 
@@ -1394,6 +1492,12 @@
   final List<int> linkedImports = <int>[];
 
   /**
+   * The linked portion of the "exports table".  This is the list of ints
+   * which should be written to [LinkedLibrary.exports].
+   */
+  final List<int> linkedExports = <int>[];
+
+  /**
    * Set of libraries which have been seen so far while visiting the transitive
    * closure of exports.
    */
@@ -1500,6 +1604,7 @@
     LinkedLibraryBuilder pb = new LinkedLibraryBuilder();
     for (ExportElement exportElement in libraryElement.exports) {
       addTransitiveExportClosure(exportElement.exportedLibrary);
+      linkedExports.add(serializeDependency(exportElement.exportedLibrary));
     }
     for (ImportElement importElement in libraryElement.imports) {
       addTransitiveExportClosure(importElement.importedLibrary);
@@ -1522,9 +1627,10 @@
     pb.numPrelinkedDependencies = dependencies.length;
     for (_CompilationUnitSerializer compilationUnitSerializer
         in compilationUnitSerializers) {
-      compilationUnitSerializer.createLinkedTypes();
+      compilationUnitSerializer.createLinkedInfo();
     }
     pb.importDependencies = linkedImports;
+    pb.exportDependencies = linkedExports;
     List<String> exportedNames =
         libraryElement.exportNamespace.definedNames.keys.toList();
     exportedNames.sort();
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index ad422ca..3faab08 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -93,6 +93,19 @@
       if (target.library == null || !target.library.isInSystemLibrary) {
         return false;
       }
+      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) {
+        entry.setValue(result, true, TargetedResult.EMPTY_LIST);
+        return true;
+      }
       if (result == COMPILATION_UNIT_ELEMENT) {
         String libraryUri = target.library.uri.toString();
         String unitUri = target.unit.uri.toString();
@@ -371,9 +384,9 @@
     _isAsyncInitialized = true;
     _futureType = _getType(library, "Future");
     _streamType = _getType(library, "Stream");
-    _futureDynamicType = _futureType.substitute4(<DartType>[dynamicType]);
-    _futureNullType = _futureType.substitute4(<DartType>[_nullType]);
-    _streamDynamicType = _streamType.substitute4(<DartType>[dynamicType]);
+    _futureDynamicType = _futureType.instantiate(<DartType>[dynamicType]);
+    _futureNullType = _futureType.instantiate(<DartType>[_nullType]);
+    _streamDynamicType = _streamType.instantiate(<DartType>[dynamicType]);
   }
 
   /**
@@ -398,7 +411,7 @@
     _stringType = _getType(library, "String");
     _symbolType = _getType(library, "Symbol");
     _typeType = _getType(library, "Type");
-    _iterableDynamicType = _iterableType.substitute4(<DartType>[dynamicType]);
+    _iterableDynamicType = _iterableType.instantiate(<DartType>[dynamicType]);
   }
 
   /**
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index b94806d..3f80560 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -45,22 +45,47 @@
 /**
  * The [ResultCachingPolicy] for ASTs.
  */
-const ResultCachingPolicy AST_CACHING_POLICY =
-    const SimpleResultCachingPolicy(8192, 8192);
+const ResultCachingPolicy<CompilationUnit> AST_CACHING_POLICY =
+    const SimpleResultCachingPolicy(16384, 16384);
+
+/**
+ * The [ResultCachingPolicy] for lists of [ConstantEvaluationTarget]s.
+ */
+const ResultCachingPolicy<List<ConstantEvaluationTarget>>
+    CONSTANT_EVALUATION_TARGET_LIST_POLICY =
+    const SimpleResultCachingPolicy(-1, -1);
+
+/**
+ * The [ResultCachingPolicy] for [ConstantEvaluationTarget]s.
+ */
+const ResultCachingPolicy<ConstantEvaluationTarget>
+    CONSTANT_EVALUATION_TARGET_POLICY = const SimpleResultCachingPolicy(-1, -1);
 
 /**
  * The [ResultCachingPolicy] for [Element]s.
  */
-const ResultCachingPolicy ELEMENT_CACHING_POLICY =
+const ResultCachingPolicy<Element> ELEMENT_CACHING_POLICY =
     const SimpleResultCachingPolicy(-1, -1);
 
 /**
  * The [ResultCachingPolicy] for [TOKEN_STREAM].
  */
-const ResultCachingPolicy TOKEN_STREAM_CACHING_POLICY =
+const ResultCachingPolicy<Token> TOKEN_STREAM_CACHING_POLICY =
     const SimpleResultCachingPolicy(1, 1);
 
 /**
+ * The [ResultCachingPolicy] for [UsedImportedElements]s.
+ */
+const ResultCachingPolicy<UsedImportedElements> USED_IMPORTED_ELEMENTS_POLICY =
+    const SimpleResultCachingPolicy(-1, -1);
+
+/**
+ * The [ResultCachingPolicy] for [UsedLocalElements]s.
+ */
+const ResultCachingPolicy<UsedLocalElements> USED_LOCAL_ELEMENTS_POLICY =
+    const SimpleResultCachingPolicy(-1, -1);
+
+/**
  * The errors produced while resolving a library directives.
  *
  * The list will be empty if there were no errors, but will not be `null`.
@@ -94,7 +119,7 @@
     COMPILATION_UNIT_CONSTANTS =
     new ListResultDescriptor<ConstantEvaluationTarget>(
         'COMPILATION_UNIT_CONSTANTS', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
+        cachingPolicy: CONSTANT_EVALUATION_TARGET_LIST_POLICY);
 
 /**
  * The element model associated with a single compilation unit.
@@ -151,7 +176,7 @@
  */
 final ResultDescriptor<ConstantEvaluationTarget> CONSTANT_VALUE =
     new ResultDescriptor<ConstantEvaluationTarget>('CONSTANT_VALUE', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
+        cachingPolicy: CONSTANT_EVALUATION_TARGET_POLICY);
 
 /**
  * The sources representing the libraries that include a given source as a part.
@@ -198,6 +223,15 @@
     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).
  *
@@ -617,8 +651,9 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
- * The resolved [CompilationUnit] associated with a compilation unit, with
- * constants not yet resolved.
+ * 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.
  */
@@ -628,7 +663,7 @@
 
 /**
  * The resolved [CompilationUnit] associated with a compilation unit, with
- * constants resolved.
+ * constants not yet resolved.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -637,6 +672,28 @@
         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
@@ -645,20 +702,6 @@
  *
  * 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.
- *
- * In addition to what is true of a [RESOLVED_UNIT2], 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_UNIT3 =
     new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT3', null,
         cachingPolicy: AST_CACHING_POLICY);
@@ -667,8 +710,9 @@
  * 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 references to local variables and formal
- * parameters have been resolved.
+ * 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.
  */
@@ -680,9 +724,8 @@
  * 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 elements and types associated with expressions
- * outside of method bodies (essentially initializers) have been initially
- * resolved.
+ * as an input can assume that references to local variables and formal
+ * parameters have been resolved.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -694,8 +737,9 @@
  * 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 the types of final variables have been
- * propagated.
+ * 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.
  */
@@ -707,7 +751,8 @@
  * 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 the types of static variables have been inferred.
+ * as an input can assume that the types of final variables have been
+ * propagated.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -719,8 +764,7 @@
  * 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 initializers of instance variables have been
- * re-resolved.
+ * as an input can assume that the types of static variables have been inferred.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -729,9 +773,11 @@
         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_UNIT8].
+ * 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.
  */
@@ -775,14 +821,14 @@
  */
 final ResultDescriptor<UsedImportedElements> USED_IMPORTED_ELEMENTS =
     new ResultDescriptor<UsedImportedElements>('USED_IMPORTED_ELEMENTS', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
+        cachingPolicy: USED_IMPORTED_ELEMENTS_POLICY);
 
 /**
  * The [UsedLocalElements] of a [LibrarySpecificUnit].
  */
 final ResultDescriptor<UsedLocalElements> USED_LOCAL_ELEMENTS =
     new ResultDescriptor<UsedLocalElements>('USED_LOCAL_ELEMENTS', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
+        cachingPolicy: USED_LOCAL_ELEMENTS_POLICY);
 
 /**
  * The errors produced while resolving variable references in a compilation unit.
@@ -1004,24 +1050,46 @@
     Map<Source, SourceKind> exportSourceKindMap =
         getRequiredInput(EXPORTS_SOURCE_KIND_INPUT_NAME);
     //
-    // Build elements.
+    // Try to get the existing LibraryElement.
     //
-    DirectiveElementBuilder builder = new DirectiveElementBuilder(
-        context,
-        libraryElement,
-        importLibraryMap,
-        importSourceKindMap,
-        exportLibraryMap,
-        exportSourceKindMap);
-    libraryUnit.accept(builder);
-    // See commentary in the computation of the LIBRARY_CYCLE result
-    // for details on library cycle invalidation.
-    libraryElement.invalidateLibraryCycles();
+    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,
+          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();
+      libraryUnit.accept(resolver);
+    }
     //
     // Record outputs.
     //
     outputs[LIBRARY_ELEMENT2] = libraryElement;
-    outputs[BUILD_DIRECTIVES_ERRORS] = builder.errors;
+    outputs[BUILD_DIRECTIVES_ERRORS] = errors;
   }
 
   /**
@@ -1078,7 +1146,7 @@
       'BuildEnumMemberElementsTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT2, RESOLVED_UNIT2]);
+      <ResultDescriptor>[CREATED_RESOLVED_UNIT3, RESOLVED_UNIT3]);
 
   BuildEnumMemberElementsTask(
       InternalAnalysisContext context, AnalysisTarget target)
@@ -1113,8 +1181,8 @@
     //
     // Record outputs.
     //
-    outputs[CREATED_RESOLVED_UNIT2] = true;
-    outputs[RESOLVED_UNIT2] = unit;
+    outputs[CREATED_RESOLVED_UNIT3] = true;
+    outputs[RESOLVED_UNIT3] = unit;
   }
 
   /**
@@ -1126,7 +1194,7 @@
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT1.of(unit)
+      UNIT_INPUT: RESOLVED_UNIT2.of(unit)
     };
   }
 
@@ -1383,9 +1451,7 @@
       libraryElement.definingCompilationUnit = definingCompilationUnitElement;
       libraryElement.entryPoint = entryPoint;
       libraryElement.parts = sourcedCompilationUnits;
-      for (Directive directive in directivesToResolve) {
-        directive.element = libraryElement;
-      }
+      libraryElement.hasExtUri = _hasExtUri(definingCompilationUnit);
       BuildLibraryElementUtils.patchTopLevelAccessors(libraryElement);
       // set the library documentation to the docs associated with the first
       // directive in the compilation unit.
@@ -1395,6 +1461,15 @@
       }
     }
     //
+    // 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.
+    //
+    for (Directive directive in directivesToResolve) {
+      directive.element = libraryElement;
+    }
+    //
     // Record outputs.
     //
     outputs[BUILD_LIBRARY_ERRORS] = errors;
@@ -1434,6 +1509,21 @@
   }
 
   /**
+   * Return `true` if the given compilation [unit] contains at least one
+   * import directive with a `dart-ext:` URI.
+   */
+  bool _hasExtUri(CompilationUnit unit) {
+    for (Directive directive in unit.directives) {
+      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].
@@ -1809,7 +1899,7 @@
 class ComputeInferableStaticVariableDependenciesTask
     extends InferStaticVariableTask {
   /**
-   * The name of the [RESOLVED_UNIT5] input.
+   * The name of the [RESOLVED_UNIT6] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -1863,7 +1953,7 @@
       CompilationUnitElementImpl unit = target
           .getAncestor((Element element) => element is CompilationUnitElement);
       return <String, TaskInput>{
-        UNIT_INPUT: RESOLVED_UNIT5
+        UNIT_INPUT: RESOLVED_UNIT6
             .of(new LibrarySpecificUnit(unit.librarySource, unit.source))
       };
     }
@@ -1942,7 +2032,7 @@
       List<LibraryElement> component = library.libraryCycle;
       Set<LibraryElement> filter = new Set<LibraryElement>.from(component);
       Set<CompilationUnitElement> deps = new Set<CompilationUnitElement>();
-      void addLibrary(l) {
+      void addLibrary(LibraryElement l) {
         if (!filter.contains(l)) {
           deps.addAll(l.units);
         }
@@ -1993,7 +2083,7 @@
 class ComputePropagableVariableDependenciesTask
     extends InferStaticVariableTask {
   /**
-   * The name of the [RESOLVED_UNIT5] input.
+   * The name of the [RESOLVED_UNIT6] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -2048,7 +2138,7 @@
       CompilationUnitElementImpl unit = target
           .getAncestor((Element element) => element is CompilationUnitElement);
       return <String, TaskInput>{
-        UNIT_INPUT: RESOLVED_UNIT5
+        UNIT_INPUT: RESOLVED_UNIT6
             .of(new LibrarySpecificUnit(unit.librarySource, unit.source))
       };
     }
@@ -2187,7 +2277,7 @@
 
   @override
   DeltaResult validate(InternalAnalysisContext context, AnalysisTarget target,
-      ResultDescriptor descriptor) {
+      ResultDescriptor descriptor, Object value) {
     if (hasDirectiveChange) {
       return DeltaResult.INVALIDATE;
     }
@@ -2215,6 +2305,10 @@
         return DeltaResult.KEEP_CONTINUE;
       }
       if (BuildLibraryElementTask.DESCRIPTOR.results.contains(descriptor)) {
+        // Invalidate cached results.
+        if (value is LibraryElementImpl) {
+          value.exportNamespace = null;
+        }
         return DeltaResult.KEEP_CONTINUE;
       }
       return DeltaResult.INVALIDATE;
@@ -2410,11 +2504,11 @@
 }
 
 /**
- * A task that builds [RESOLVED_UNIT11] for a unit.
+ * A task that builds [RESOLVED_UNIT12] for a unit.
  */
 class EvaluateUnitConstantsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT10] input.
+   * The name of the [RESOLVED_UNIT11] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -2430,7 +2524,7 @@
       'EvaluateUnitConstantsTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT11, RESOLVED_UNIT11]);
+      <ResultDescriptor>[CREATED_RESOLVED_UNIT12, RESOLVED_UNIT12]);
 
   EvaluateUnitConstantsTask(AnalysisContext context, LibrarySpecificUnit target)
       : super(context, target);
@@ -2443,8 +2537,8 @@
     // 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_UNIT11] = unit;
-    outputs[CREATED_RESOLVED_UNIT11] = true;
+    outputs[RESOLVED_UNIT12] = unit;
+    outputs[CREATED_RESOLVED_UNIT12] = true;
   }
 
   /**
@@ -2456,7 +2550,7 @@
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
       'libraryElement': LIBRARY_ELEMENT8.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT10.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT11.of(unit),
       CONSTANT_VALUES:
           COMPILATION_UNIT_CONSTANTS.of(unit).toListOf(CONSTANT_VALUE),
       'constantExpressionsDependencies':
@@ -2479,7 +2573,7 @@
  */
 class GatherUsedImportedElementsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT10] input.
+   * The name of the [RESOLVED_UNIT11] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -2523,7 +2617,7 @@
    */
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT10.of(unit)};
+    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT11.of(unit)};
   }
 
   /**
@@ -2541,7 +2635,7 @@
  */
 class GatherUsedLocalElementsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT10] input.
+   * The name of the [RESOLVED_UNIT11] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -2585,7 +2679,7 @@
    */
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT10.of(unit)};
+    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT11.of(unit)};
   }
 
   /**
@@ -2603,7 +2697,7 @@
  */
 class GenerateHintsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT10] input.
+   * The name of the [RESOLVED_UNIT11] input.
    */
   static const String RESOLVED_UNIT_INPUT = 'RESOLVED_UNIT';
 
@@ -2670,6 +2764,7 @@
       usedImportedElementsList.forEach(verifier.removeUsedElements);
       verifier.generateDuplicateImportHints(errorReporter);
       verifier.generateUnusedImportHints(errorReporter);
+      verifier.generateUnusedShownNameHints(errorReporter);
     }
     // Unused local elements.
     {
@@ -2769,10 +2864,23 @@
     //
     // Generate lints.
     //
+    List<AstVisitor> visitors = <AstVisitor>[];
+
+    bool timeVisits = analysisOptions.enableTiming;
     List<Linter> linters = getLints(context);
-    linters.forEach((l) => l.reporter = errorReporter);
-    Iterable<AstVisitor> visitors = linters.map((l) => l.getVisitor()).toList();
-    unit.accept(new DelegatingAstVisitor(visitors.where((v) => v != null)));
+    for (Linter linter in linters) {
+      AstVisitor visitor = linter.getVisitor();
+      if (visitor != null) {
+        linter.reporter = errorReporter;
+        if (timeVisits) {
+          visitor = new TimedAstVisitor(visitor, lintRegistry.getTimer(linter));
+        }
+        visitors.add(visitor);
+      }
+    }
+
+    DelegatingAstVisitor dv = new DelegatingAstVisitor(visitors);
+    unit.accept(dv);
 
     //
     // Record outputs.
@@ -2809,7 +2917,7 @@
   static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
 
   /**
-   * The name of the input whose value is the [RESOLVED_UNIT7] for the
+   * The name of the input whose value is the [RESOLVED_UNIT8] for the
    * compilation unit.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
@@ -2821,7 +2929,7 @@
       'InferInstanceMembersInUnitTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT9, RESOLVED_UNIT9]);
+      <ResultDescriptor>[CREATED_RESOLVED_UNIT10, RESOLVED_UNIT10]);
 
   /**
    * Initialize a newly created task to build a library element for the given
@@ -2845,15 +2953,16 @@
     // Infer instance members.
     //
     if (context.analysisOptions.strongMode) {
-      InstanceMemberInferrer inferrer = new InstanceMemberInferrer(typeProvider,
+      InstanceMemberInferrer inferrer = new InstanceMemberInferrer(
+          typeProvider, new InheritanceManager(unit.element.library),
           typeSystem: context.typeSystem);
       inferrer.inferCompilationUnit(unit.element);
     }
     //
     // Record outputs.
     //
-    outputs[RESOLVED_UNIT9] = unit;
-    outputs[CREATED_RESOLVED_UNIT9] = true;
+    outputs[RESOLVED_UNIT10] = unit;
+    outputs[CREATED_RESOLVED_UNIT10] = true;
   }
 
   /**
@@ -2864,7 +2973,7 @@
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
-      UNIT_INPUT: RESOLVED_UNIT8.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT9.of(unit),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
       // In strong mode, add additional dependencies to enforce inference
       // ordering.
@@ -2872,13 +2981,17 @@
       // Require that field re-resolution be complete for all units in the
       // current library cycle.
       'orderLibraryCycleTasks': LIBRARY_CYCLE_UNITS.of(unit).toList(
-          (CompilationUnitElementImpl unit) => CREATED_RESOLVED_UNIT8
-              .of(new LibrarySpecificUnit(unit.librarySource, unit.source))),
+          (CompilationUnitElement unit) => CREATED_RESOLVED_UNIT9.of(
+              new LibrarySpecificUnit(
+                  (unit as CompilationUnitElementImpl).librarySource,
+                  unit.source))),
       // Require that full inference be complete for all dependencies of the
       // current library cycle.
       'orderLibraryCycles': LIBRARY_CYCLE_DEPENDENCIES.of(unit).toList(
-          (CompilationUnitElementImpl unit) => CREATED_RESOLVED_UNIT9
-              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
+          (CompilationUnitElement unit) => CREATED_RESOLVED_UNIT10.of(
+              new LibrarySpecificUnit(
+                  (unit as CompilationUnitElementImpl).librarySource,
+                  unit.source)))
     };
   }
 
@@ -2908,12 +3021,33 @@
   VariableDeclaration getDeclaration(CompilationUnit unit) {
     VariableElement variable = target;
     AstNode node = new NodeLocator2(variable.nameOffset).searchWithin(unit);
+    if (node == null) {
+      Source variableSource = variable.source;
+      Source unitSource = unit.element.source;
+      if (variableSource != unitSource) {
+        throw new AnalysisException(
+            "Failed to find the AST node for the variable "
+            "${variable.displayName} in $variableSource "
+            "because we were looking in $unitSource");
+      }
+      throw new AnalysisException(
+          "Failed to find the AST node for the variable "
+          "${variable.displayName} in $variableSource");
+    }
     VariableDeclaration declaration =
         node.getAncestor((AstNode ancestor) => ancestor is VariableDeclaration);
     if (declaration == null || declaration.name != node) {
+      Source variableSource = variable.source;
+      Source unitSource = unit.element.source;
+      if (variableSource != unitSource) {
+        throw new AnalysisException(
+            "Failed to find the declaration of the variable "
+            "${variable.displayName} in $variableSource"
+            "because we were looking in $unitSource");
+      }
       throw new AnalysisException(
           "Failed to find the declaration of the variable "
-          "${variable.displayName} in ${variable.source}");
+          "${variable.displayName} in $variableSource");
     }
     return declaration;
   }
@@ -2925,7 +3059,7 @@
  */
 class InferStaticVariableTypesInUnitTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the input whose value is the [RESOLVED_UNIT6] for the
+   * The name of the input whose value is the [RESOLVED_UNIT7] for the
    * compilation unit.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
@@ -2943,7 +3077,7 @@
       'InferStaticVariableTypesInUnitTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT7, RESOLVED_UNIT7]);
+      <ResultDescriptor>[CREATED_RESOLVED_UNIT8, RESOLVED_UNIT8]);
 
   /**
    * Initialize a newly created task to build a library element for the given
@@ -2967,8 +3101,8 @@
     // because the work has implicitly been done by virtue of the task model
     // preparing all of the inputs.
     //
-    outputs[RESOLVED_UNIT7] = unit;
-    outputs[CREATED_RESOLVED_UNIT7] = true;
+    outputs[RESOLVED_UNIT8] = unit;
+    outputs[CREATED_RESOLVED_UNIT8] = true;
   }
 
   /**
@@ -2982,7 +3116,7 @@
       INFERRED_VARIABLES_INPUT: INFERABLE_STATIC_VARIABLES_IN_UNIT
           .of(unit)
           .toListOf(INFERRED_STATIC_VARIABLE),
-      UNIT_INPUT: RESOLVED_UNIT6.of(unit)
+      UNIT_INPUT: RESOLVED_UNIT7.of(unit)
     };
   }
 
@@ -3013,7 +3147,7 @@
   static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
 
   /**
-   * The name of the [RESOLVED_UNIT6] input.
+   * The name of the [RESOLVED_UNIT7] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -3104,15 +3238,17 @@
           .of(variable)
           .toListOf(INFERRED_STATIC_VARIABLE),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT6.of(unit),
+      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).toList(
-          (CompilationUnitElementImpl unit) => CREATED_RESOLVED_UNIT9
-              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
+          (CompilationUnitElement unit) => CREATED_RESOLVED_UNIT10.of(
+              new LibrarySpecificUnit(
+                  (unit as CompilationUnitElementImpl).librarySource,
+                  unit.source)))
     };
   }
 
@@ -3509,7 +3645,7 @@
 }
 
 /**
- * A task that builds [RESOLVED_UNIT5] for a unit.
+ * A task that builds [RESOLVED_UNIT6] for a unit.
  */
 class PartiallyResolveUnitReferencesTask extends SourceBasedAnalysisTask {
   /**
@@ -3518,7 +3654,7 @@
   static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
 
   /**
-   * The name of the [RESOLVED_UNIT4] input.
+   * The name of the [RESOLVED_UNIT5] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -3536,8 +3672,8 @@
       buildInputs, <ResultDescriptor>[
     INFERABLE_STATIC_VARIABLES_IN_UNIT,
     PROPAGABLE_VARIABLES_IN_UNIT,
-    CREATED_RESOLVED_UNIT5,
-    RESOLVED_UNIT5
+    CREATED_RESOLVED_UNIT6,
+    RESOLVED_UNIT6
   ]);
 
   PartiallyResolveUnitReferencesTask(
@@ -3571,8 +3707,8 @@
       outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT] = VariableElement.EMPTY_LIST;
     }
     outputs[PROPAGABLE_VARIABLES_IN_UNIT] = visitor.propagableVariables;
-    outputs[RESOLVED_UNIT5] = unit;
-    outputs[CREATED_RESOLVED_UNIT5] = true;
+    outputs[RESOLVED_UNIT6] = unit;
+    outputs[CREATED_RESOLVED_UNIT6] = true;
   }
 
   /**
@@ -3585,7 +3721,7 @@
     return <String, TaskInput>{
       'fullyBuiltLibraryElements': READY_LIBRARY_ELEMENT5.of(unit.library),
       LIBRARY_INPUT: LIBRARY_ELEMENT5.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT4.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT5.of(unit),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
       // In strong mode, add additional dependencies to enforce inference
       // ordering.
@@ -3593,8 +3729,10 @@
       // Require that full inference be complete for all dependencies of the
       // current library cycle.
       'orderLibraryCycles': LIBRARY_CYCLE_DEPENDENCIES.of(unit).toList(
-          (CompilationUnitElementImpl unit) => CREATED_RESOLVED_UNIT9
-              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
+          (CompilationUnitElement unit) => CREATED_RESOLVED_UNIT10.of(
+              new LibrarySpecificUnit(
+                  (unit as CompilationUnitElementImpl).librarySource,
+                  unit.source)))
     };
   }
 
@@ -3705,7 +3843,7 @@
     Source source = target;
     return <String, TaskInput>{
       'propagatedVariableTypesInUnits':
-          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT6),
+          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT7),
       LIBRARY_INPUT: LIBRARY_ELEMENT5.of(source),
     };
   }
@@ -3726,7 +3864,7 @@
  */
 class PropagateVariableTypesInUnitTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the input whose value is the [RESOLVED_UNIT5] for the
+   * The name of the input whose value is the [RESOLVED_UNIT6] for the
    * compilation unit.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
@@ -3738,7 +3876,7 @@
       'PropagateVariableTypesInUnitTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT6, RESOLVED_UNIT6]);
+      <ResultDescriptor>[CREATED_RESOLVED_UNIT7, RESOLVED_UNIT7]);
 
   PropagateVariableTypesInUnitTask(
       InternalAnalysisContext context, LibrarySpecificUnit unit)
@@ -3758,8 +3896,8 @@
     // because the work has implicitly been done by virtue of the task model
     // preparing all of the inputs.
     //
-    outputs[RESOLVED_UNIT6] = unit;
-    outputs[CREATED_RESOLVED_UNIT6] = true;
+    outputs[RESOLVED_UNIT7] = unit;
+    outputs[CREATED_RESOLVED_UNIT7] = true;
   }
 
   /**
@@ -3772,7 +3910,7 @@
     return <String, TaskInput>{
       'variables':
           PROPAGABLE_VARIABLES_IN_UNIT.of(unit).toListOf(PROPAGATED_VARIABLE),
-      UNIT_INPUT: RESOLVED_UNIT5.of(unit)
+      UNIT_INPUT: RESOLVED_UNIT6.of(unit)
     };
   }
 
@@ -3797,7 +3935,7 @@
   static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
 
   /**
-   * The name of the [RESOLVED_UNIT5] input.
+   * The name of the [RESOLVED_UNIT6] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -3867,6 +4005,15 @@
    */
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     VariableElement variable = target;
+    if (variable.library == null) {
+      StringBuffer buffer = new StringBuffer();
+      buffer.write(
+          'PropagateVariableTypeTask building inputs for a variable with no library. Variable name = "');
+      buffer.write(variable.name);
+      buffer.write('". Path = ');
+      (variable as ElementImpl).appendPathTo(buffer);
+      throw new AnalysisException(buffer.toString());
+    }
     LibrarySpecificUnit unit =
         new LibrarySpecificUnit(variable.library.source, variable.source);
     return <String, TaskInput>{
@@ -3874,7 +4021,7 @@
           .of(variable)
           .toListOf(PROPAGATED_VARIABLE),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT5.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT6.of(unit),
     };
   }
 
@@ -4198,7 +4345,7 @@
           'Cannot build inputs for a ${target.runtimeType}');
     }
     return <String, TaskInput>{
-      'createdResolvedUnit': CREATED_RESOLVED_UNIT10
+      'createdResolvedUnit': CREATED_RESOLVED_UNIT11
           .of(new LibrarySpecificUnit(librarySource, target.source))
     };
   }
@@ -4214,6 +4361,80 @@
 }
 
 /**
+ * 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';
+
+  /**
+   * The task descriptor describing this kind of task.
+   */
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'ResolveDirectiveElementsTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[CREATED_RESOLVED_UNIT2, RESOLVED_UNIT2]);
+
+  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);
+    //
+    // Resolve directive AST nodes to elements.
+    //
+    if (targetUnit.unit == targetUnit.library) {
+      DirectiveResolver resolver = new DirectiveResolver();
+      unit.accept(resolver);
+    }
+    //
+    // Record outputs.
+    //
+    outputs[CREATED_RESOLVED_UNIT2] = true;
+    outputs[RESOLVED_UNIT2] = 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>{
+      LIBRARY_INPUT: LIBRARY_ELEMENT2.of(unit.library),
+      UNIT_INPUT: RESOLVED_UNIT1.of(unit)
+    };
+  }
+
+  /**
+   * Create a [ResolveDirectiveElementsTask] based on the given [target] in
+   * the given [context].
+   */
+  static ResolveDirectiveElementsTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new ResolveDirectiveElementsTask(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
  */
@@ -4229,7 +4450,7 @@
   static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
 
   /**
-   * The name of the input whose value is the [RESOLVED_UNIT7] for the
+   * The name of the input whose value is the [RESOLVED_UNIT8] for the
    * compilation unit.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
@@ -4241,7 +4462,7 @@
       'ResolveInstanceFieldsInUnitTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT8, RESOLVED_UNIT8]);
+      <ResultDescriptor>[CREATED_RESOLVED_UNIT9, RESOLVED_UNIT9]);
 
   /**
    * Initialize a newly created task to build a library element for the given
@@ -4286,8 +4507,8 @@
     //
     // Record outputs.
     //
-    outputs[RESOLVED_UNIT8] = unit;
-    outputs[CREATED_RESOLVED_UNIT8] = true;
+    outputs[RESOLVED_UNIT9] = unit;
+    outputs[CREATED_RESOLVED_UNIT9] = true;
   }
 
   /**
@@ -4298,7 +4519,7 @@
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
-      UNIT_INPUT: RESOLVED_UNIT7.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT8.of(unit),
       LIBRARY_INPUT: LIBRARY_ELEMENT5.of(unit.library),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
       // In strong mode, add additional dependencies to enforce inference
@@ -4307,13 +4528,17 @@
       // Require that static variable inference  be complete for all units in
       // the current library cycle.
       'orderLibraryCycleTasks': LIBRARY_CYCLE_UNITS.of(unit).toList(
-          (CompilationUnitElementImpl unit) => CREATED_RESOLVED_UNIT7
-              .of(new LibrarySpecificUnit(unit.librarySource, unit.source))),
+          (CompilationUnitElement unit) => CREATED_RESOLVED_UNIT8.of(
+              new LibrarySpecificUnit(
+                  (unit as CompilationUnitElementImpl).librarySource,
+                  unit.source))),
       // Require that full inference be complete for all dependencies of the
       // current library cycle.
       'orderLibraryCycles': LIBRARY_CYCLE_DEPENDENCIES.of(unit).toList(
-          (CompilationUnitElementImpl unit) => CREATED_RESOLVED_UNIT9
-              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
+          (CompilationUnitElement unit) => CREATED_RESOLVED_UNIT10.of(
+              new LibrarySpecificUnit(
+                  (unit as CompilationUnitElementImpl).librarySource,
+                  unit.source)))
     };
   }
 
@@ -4328,7 +4553,7 @@
 }
 
 /**
- * A task that finishes resolution by requesting [RESOLVED_UNIT10] for every
+ * A task that finishes resolution by requesting [RESOLVED_UNIT11] for every
  * unit in the libraries closure and produces [LIBRARY_ELEMENT8].
  */
 class ResolveLibraryReferencesTask extends SourceBasedAnalysisTask {
@@ -4338,7 +4563,7 @@
   static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
 
   /**
-   * The name of the list of [RESOLVED_UNIT10] input.
+   * The name of the list of [RESOLVED_UNIT11] input.
    */
   static const String UNITS_INPUT = 'UNITS_INPUT';
 
@@ -4386,7 +4611,7 @@
     Source source = target;
     return <String, TaskInput>{
       LIBRARY_INPUT: LIBRARY_ELEMENT7.of(source),
-      UNITS_INPUT: LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT10),
+      UNITS_INPUT: LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT11),
     };
   }
 
@@ -4401,7 +4626,7 @@
 }
 
 /**
- * A task that finishes resolution by requesting [RESOLVED_UNIT11] for every
+ * A task that finishes resolution by requesting [RESOLVED_UNIT12] for every
  * unit in the libraries closure and produces [LIBRARY_ELEMENT].
  */
 class ResolveLibraryTask extends SourceBasedAnalysisTask {
@@ -4411,7 +4636,7 @@
   static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
 
   /**
-   * The name of the list of [RESOLVED_UNIT11] input.
+   * The name of the list of [RESOLVED_UNIT12] input.
    */
   static const String UNITS_INPUT = 'UNITS_INPUT';
 
@@ -4522,7 +4747,7 @@
     Source source = target;
     return <String, TaskInput>{
       'resolvedUnit':
-          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT3),
+          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT4),
       LIBRARY_INPUT: LIBRARY_ELEMENT4.of(source),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
     };
@@ -4554,7 +4779,7 @@
   static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
 
   /**
-   * The name of the [RESOLVED_UNIT9] input.
+   * The name of the [RESOLVED_UNIT10] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -4562,8 +4787,8 @@
       'ResolveUnitTask', createTask, buildInputs, <ResultDescriptor>[
     CONSTANT_EXPRESSIONS_DEPENDENCIES,
     RESOLVE_UNIT_ERRORS,
-    CREATED_RESOLVED_UNIT10,
-    RESOLVED_UNIT10
+    CREATED_RESOLVED_UNIT11,
+    RESOLVED_UNIT11
   ]);
 
   ResolveUnitTask(
@@ -4609,8 +4834,8 @@
     //
     outputs[CONSTANT_EXPRESSIONS_DEPENDENCIES] = constExprDependencies;
     outputs[RESOLVE_UNIT_ERRORS] = getTargetSourceErrors(errorListener, target);
-    outputs[RESOLVED_UNIT10] = unit;
-    outputs[CREATED_RESOLVED_UNIT10] = true;
+    outputs[RESOLVED_UNIT11] = unit;
+    outputs[CREATED_RESOLVED_UNIT11] = true;
   }
 
   /**
@@ -4623,15 +4848,17 @@
     return <String, TaskInput>{
       LIBRARY_INPUT: LIBRARY_ELEMENT7.of(unit.library),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT9.of(unit),
+      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).toList(
-          (CompilationUnitElementImpl unit) => CREATED_RESOLVED_UNIT9
-              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
+          (CompilationUnitElement unit) => CREATED_RESOLVED_UNIT10.of(
+              new LibrarySpecificUnit(
+                  (unit as CompilationUnitElementImpl).librarySource,
+                  unit.source)))
     };
   }
 
@@ -4646,7 +4873,7 @@
 }
 
 /**
- * A task that builds [RESOLVED_UNIT3] for a unit.
+ * A task that builds [RESOLVED_UNIT4] for a unit.
  */
 class ResolveUnitTypeNamesTask extends SourceBasedAnalysisTask {
   /**
@@ -4655,7 +4882,7 @@
   static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
 
   /**
-   * The name of the [RESOLVED_UNIT2] input.
+   * The name of the [RESOLVED_UNIT3] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -4670,8 +4897,8 @@
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
       'ResolveUnitTypeNamesTask', createTask, buildInputs, <ResultDescriptor>[
     RESOLVE_TYPE_NAMES_ERRORS,
-    CREATED_RESOLVED_UNIT3,
-    RESOLVED_UNIT3
+    CREATED_RESOLVED_UNIT4,
+    RESOLVED_UNIT4
   ]);
 
   ResolveUnitTypeNamesTask(
@@ -4702,8 +4929,8 @@
     //
     outputs[RESOLVE_TYPE_NAMES_ERRORS] =
         getTargetSourceErrors(errorListener, target);
-    outputs[RESOLVED_UNIT3] = unit;
-    outputs[CREATED_RESOLVED_UNIT3] = true;
+    outputs[RESOLVED_UNIT4] = unit;
+    outputs[CREATED_RESOLVED_UNIT4] = true;
   }
 
   /**
@@ -4720,7 +4947,7 @@
       'importsExportNamespace':
           IMPORTED_LIBRARIES.of(unit.library).toMapOf(LIBRARY_ELEMENT4),
       LIBRARY_INPUT: LIBRARY_ELEMENT4.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT2.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT3.of(unit),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
     };
   }
@@ -4736,7 +4963,7 @@
 }
 
 /**
- * A task that builds [RESOLVED_UNIT4] for a unit.
+ * A task that builds [RESOLVED_UNIT5] for a unit.
  */
 class ResolveVariableReferencesTask extends SourceBasedAnalysisTask {
   /**
@@ -4745,7 +4972,7 @@
   static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
 
   /**
-   * The name of the [RESOLVED_UNIT3] input.
+   * The name of the [RESOLVED_UNIT4] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -4761,8 +4988,8 @@
       'ResolveVariableReferencesTask',
       createTask,
       buildInputs, <ResultDescriptor>[
-    CREATED_RESOLVED_UNIT4,
-    RESOLVED_UNIT4,
+    CREATED_RESOLVED_UNIT5,
+    RESOLVED_UNIT5,
     VARIABLE_REFERENCE_ERRORS
   ]);
 
@@ -4794,8 +5021,8 @@
     //
     // Record outputs.
     //
-    outputs[RESOLVED_UNIT4] = unit;
-    outputs[CREATED_RESOLVED_UNIT4] = true;
+    outputs[RESOLVED_UNIT5] = unit;
+    outputs[CREATED_RESOLVED_UNIT5] = true;
     outputs[VARIABLE_REFERENCE_ERRORS] =
         getTargetSourceErrors(errorListener, target);
   }
@@ -4809,7 +5036,7 @@
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
       LIBRARY_INPUT: LIBRARY_ELEMENT1.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT3.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT4.of(unit),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
     };
   }
@@ -4961,7 +5188,7 @@
  */
 class StrongModeVerifyUnitTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT11] input.
+   * The name of the [RESOLVED_UNIT12] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -5017,7 +5244,7 @@
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
-      UNIT_INPUT: RESOLVED_UNIT11.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT12.of(unit),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
     };
   }
@@ -5075,6 +5302,11 @@
     CompilationUnit unit = getRequiredInput(UNIT_INPUT);
     CompilationUnitElement unitElement = unit.element;
     LibraryElement libraryElement = unitElement.library;
+    if (libraryElement == null) {
+      throw new AnalysisException(
+          'VerifyUnitTask verifying a unit with no library: '
+          '${unitElement.source.fullName}');
+    }
     //
     // Validate the directives.
     //
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index a586b3b..4a81c18 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -30,7 +30,8 @@
   /**
    * The list of errors that are reported for raw Dart [Source]s.
    */
-  static final List<ResultDescriptor> _SOURCE_ERRORS = <ResultDescriptor>[
+  static final List<ResultDescriptor<List<AnalysisError>>> _SOURCE_ERRORS =
+      <ResultDescriptor<List<AnalysisError>>>[
     BUILD_DIRECTIVES_ERRORS,
     BUILD_LIBRARY_ERRORS,
     PARSE_ERRORS,
@@ -40,7 +41,8 @@
   /**
    * The list of errors that are reported for raw Dart [LibrarySpecificUnit]s.
    */
-  static final List<ResultDescriptor> _UNIT_ERRORS = <ResultDescriptor>[
+  static final List<ResultDescriptor<List<AnalysisError>>> _UNIT_ERRORS =
+      <ResultDescriptor<List<AnalysisError>>>[
     HINTS,
     LINTS,
     LIBRARY_UNIT_ERRORS,
@@ -178,12 +180,12 @@
     }
     // If analysis is in progress, combine all known partial results.
     List<AnalysisError> errors = <AnalysisError>[];
-    for (ResultDescriptor descriptor in _SOURCE_ERRORS) {
+    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 descriptor in _UNIT_ERRORS) {
+      for (ResultDescriptor<List<AnalysisError>> descriptor in _UNIT_ERRORS) {
         errors.addAll(analysisCache.getValue(unit, descriptor));
       }
     }
@@ -202,7 +204,7 @@
       }
     }
     List<Source> libraries = partLibrariesMap[part];
-    return libraries != null ? libraries : Source.EMPTY_LIST;
+    return libraries?.toList() ?? Source.EMPTY_LIST;
   }
 
   @override
@@ -304,7 +306,7 @@
     // Update parts in libraries.
     if (isDartLibrarySource) {
       Source library = target;
-      List<Source> includedParts = outputs[INCLUDED_PARTS];
+      List<Source> includedParts = outputs[INCLUDED_PARTS] as List<Source>;
       if (includedParts != null) {
         libraryPartsMap[library] = includedParts;
         for (Source part in includedParts) {
diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart
index a041729..c41c41a 100644
--- a/pkg/analyzer/lib/src/task/driver.dart
+++ b/pkg/analyzer/lib/src/task/driver.dart
@@ -44,11 +44,11 @@
   final InternalAnalysisContext context;
 
   /**
-   * The map of [ComputedResult] controllers.
+   * The map of [ResultChangedEvent] controllers.
    */
-  final Map<ResultDescriptor, StreamController<ComputedResult>>
+  final Map<ResultDescriptor, StreamController<ResultChangedEvent>>
       resultComputedControllers =
-      <ResultDescriptor, StreamController<ComputedResult>>{};
+      <ResultDescriptor, StreamController<ResultChangedEvent>>{};
 
   /**
    * The work order that was previously computed but that has not yet been
@@ -165,6 +165,9 @@
         state == CacheState.IN_PROCESS) {
       return null;
     }
+    if (context.aboutToComputeResult(entry, result)) {
+      return null;
+    }
     TaskDescriptor taskDescriptor = taskManager.findTask(target, result);
     if (taskDescriptor == null) {
       return null;
@@ -208,11 +211,10 @@
    * Return the stream that is notified when a new value for the given
    * [descriptor] is computed.
    */
-  Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
-    return resultComputedControllers
-        .putIfAbsent(descriptor,
-            () => new StreamController<ComputedResult>.broadcast(sync: true))
-        .stream;
+  Stream<ResultChangedEvent> onResultComputed(ResultDescriptor descriptor) {
+    return resultComputedControllers.putIfAbsent(descriptor, () {
+      return new StreamController<ResultChangedEvent>.broadcast(sync: true);
+    }).stream;
   }
 
   /**
@@ -284,11 +286,11 @@
           entry.setValue(result, outputs[result], dependedOn);
         }
         outputs.forEach((ResultDescriptor descriptor, value) {
-          StreamController<ComputedResult> controller =
+          StreamController<ResultChangedEvent> controller =
               resultComputedControllers[descriptor];
           if (controller != null) {
-            ComputedResult event =
-                new ComputedResult(context, descriptor, target, value);
+            ResultChangedEvent event = new ResultChangedEvent(
+                context, target, descriptor, value, true);
             controller.add(event);
           }
         });
@@ -397,6 +399,8 @@
     while (_currentIndices.isNotEmpty) {
       Node nextUnevaluatedInput = getNextInput(_path[_currentIndices.last],
           _provisionalDependencies[_currentIndices.last]);
+      // If the assertion below fails, it indicates that [getNextInput] did not
+      // skip an input that we asked it to skip.
       assert(!_provisionalDependencies[_currentIndices.last]
           .contains(nextUnevaluatedInput));
       if (nextUnevaluatedInput != null) {
@@ -500,10 +504,36 @@
    * Initialize a newly created exception to represent a failed attempt to
    * perform the given [task] due to the given [dependencyCycle].
    */
-  InfiniteTaskLoopException(AnalysisTask task, this.dependencyCycle,
-      [this.cyclicPath])
-      : super(
-            'Infinite loop while performing task ${task.descriptor.name} for ${task.target}');
+  InfiniteTaskLoopException(AnalysisTask task, List<WorkItem> dependencyCycle,
+      [List<TargetedResult> cyclicPath])
+      : this.dependencyCycle = dependencyCycle,
+        this.cyclicPath = cyclicPath,
+        super(_composeMessage(task, dependencyCycle, cyclicPath));
+
+  /**
+   * Compose an error message based on the data we have available.
+   */
+  static String _composeMessage(AnalysisTask task,
+      List<WorkItem> dependencyCycle, List<TargetedResult> cyclicPath) {
+    StringBuffer buffer = new StringBuffer();
+    buffer.write('Infinite loop while performing task ');
+    buffer.write(task.descriptor.name);
+    buffer.write(' for ');
+    buffer.writeln(task.target);
+    buffer.writeln('  Dependency Cycle:');
+    for (WorkItem item in dependencyCycle) {
+      buffer.write('    ');
+      buffer.writeln(item);
+    }
+    if (cyclicPath != null) {
+      buffer.writeln('  Cyclic Path:');
+      for (TargetedResult result in cyclicPath) {
+        buffer.write('    ');
+        buffer.writeln(result);
+      }
+    }
+    return buffer.toString();
+  }
 }
 
 /**
@@ -567,7 +597,7 @@
    * or `null` if all of the inputs have been collected and the task can be
    * created.
    */
-  TaskInputBuilder builder;
+  TopLevelTaskInputBuilder builder;
 
   /**
    * The [TargetedResult]s outputs of this task depends on.
@@ -683,12 +713,7 @@
       inputTargetedResults.add(new TargetedResult(inputTarget, inputResult));
       CacheEntry inputEntry = context.getCacheEntry(inputTarget);
       CacheState inputState = inputEntry.getState(inputResult);
-      if (skipInputs.any((WorkItem item) =>
-          item.target == inputTarget && item.spawningResult == inputResult)) {
-        // This input is being skipped due to a circular dependency.  Tell the
-        // builder that it's not available so we can move on to other inputs.
-        builder.currentValueNotAvailable();
-      } else if (inputState == CacheState.ERROR) {
+      if (inputState == CacheState.ERROR) {
         exception = inputEntry.exception;
         return null;
       } else if (inputState == CacheState.IN_PROCESS) {
@@ -716,8 +741,16 @@
               throw new AnalysisException(
                   'Cannot find task to build $inputResult for $inputTarget');
             }
-            return new WorkItem(context, inputTarget, descriptor, inputResult,
-                level + 1, workOrder);
+            if (skipInputs.any((WorkItem item) =>
+                item.target == inputTarget && item.descriptor == descriptor)) {
+              // This input is being skipped due to a circular dependency.  Tell
+              // the builder that it's not available so we can move on to other
+              // inputs.
+              builder.currentValueNotAvailable();
+            } else {
+              return new WorkItem(context, inputTarget, descriptor, inputResult,
+                  level + 1, workOrder);
+            }
           } on AnalysisException catch (exception, stackTrace) {
             this.exception = new CaughtException(exception, stackTrace);
             return null;
diff --git a/pkg/analyzer/lib/src/task/html.dart b/pkg/analyzer/lib/src/task/html.dart
index 90e78bd..2575677 100644
--- a/pkg/analyzer/lib/src/task/html.dart
+++ b/pkg/analyzer/lib/src/task/html.dart
@@ -88,10 +88,6 @@
 
   @override
   bool exists() => source.exists();
-
-  @override
-  Uri resolveRelativeUri(Uri relativeUri) =>
-      throw new StateError('resolveRelativeUri not supported for scripts');
 }
 
 /**
@@ -170,7 +166,7 @@
    * input descriptors describing those inputs for a task with the
    * given [target].
    */
-  static Map<String, TaskInput> buildInputs(Source target) {
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     return <String, TaskInput>{DOCUMENT_INPUT: HTML_DOCUMENT.of(target)};
   }
 
@@ -241,7 +237,7 @@
    * input descriptors describing those inputs for a task with the
    * given [target].
    */
-  static Map<String, TaskInput> buildInputs(Source 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)
@@ -346,7 +342,7 @@
    * input descriptors describing those inputs for a task with the given
    * [source].
    */
-  static Map<String, TaskInput> buildInputs(Source source) {
+  static Map<String, TaskInput> buildInputs(AnalysisTarget source) {
     return <String, TaskInput>{CONTENT_INPUT_NAME: CONTENT.of(source)};
   }
 
diff --git a/pkg/analyzer/lib/src/task/inputs.dart b/pkg/analyzer/lib/src/task/inputs.dart
index 1134a58..cb497b6 100644
--- a/pkg/analyzer/lib/src/task/inputs.dart
+++ b/pkg/analyzer/lib/src/task/inputs.dart
@@ -39,7 +39,7 @@
  * A [TaskInputBuilder] used to build an input based on a [ConstantTaskInput].
  */
 class ConstantTaskInputBuilder<V> implements TaskInputBuilder<V> {
-  final ConstantTaskInput input;
+  final ConstantTaskInput<V> input;
 
   ConstantTaskInputBuilder(this.input);
 
@@ -89,29 +89,27 @@
  */
 abstract class ListTaskInputMixin<E> implements ListTaskInput<E> {
   @override
-  ListTaskInput /*<V>*/ toFlattenListOf /*<V>*/ (
-      ListResultDescriptor /*<V>*/ subListResult) {
-    return new ListToFlattenListTaskInput<E, dynamic /*=V*/ >(
+  ListTaskInput/*<V>*/ toFlattenListOf/*<V>*/(
+      ListResultDescriptor/*<V>*/ subListResult) {
+    return new ListToFlattenListTaskInput<E, dynamic/*=V*/ >(
         this, subListResult.of as dynamic);
   }
 
-  ListTaskInput /*<V>*/ toList /*<V>*/ (
-      UnaryFunction<E, dynamic /*<=V>*/ > mapper) {
-    return new ListToListTaskInput<E, dynamic /*=V*/ >(this, mapper);
+  ListTaskInput/*<V>*/ toList/*<V>*/(UnaryFunction<E, dynamic/*=V*/ > mapper) {
+    return new ListToListTaskInput<E, dynamic/*=V*/ >(this, mapper);
   }
 
-  ListTaskInput /*<V>*/ toListOf /*<V>*/ (
-      ResultDescriptor /*<V>*/ valueResult) {
+  ListTaskInput/*<V>*/ toListOf/*<V>*/(ResultDescriptor/*<V>*/ valueResult) {
     return (this as ListTaskInput<AnalysisTarget>).toList(valueResult.of);
   }
 
-  MapTaskInput<E, dynamic /*=V*/ > toMap /*<V>*/ (
-      UnaryFunction<E, dynamic /*<=V>*/ > mapper) {
-    return new ListToMapTaskInput<E, dynamic /*=V*/ >(this, mapper);
+  MapTaskInput<E, dynamic/*=V*/ > toMap/*<V>*/(
+      UnaryFunction<E, dynamic/*=V*/ > mapper) {
+    return new ListToMapTaskInput<E, dynamic/*=V*/ >(this, mapper);
   }
 
-  MapTaskInput<AnalysisTarget, dynamic /*=V*/ > toMapOf /*<V>*/ (
-      ResultDescriptor /*<V>*/ valueResult) {
+  MapTaskInput<AnalysisTarget, dynamic/*=V*/ > toMapOf/*<V>*/(
+      ResultDescriptor/*<V>*/ valueResult) {
     return (this as ListTaskInputImpl<AnalysisTarget>).toMap(valueResult.of);
   }
 }
@@ -161,7 +159,7 @@
 
   @override
   void _addResultElement(B baseElement, E resultElement) {
-    _resultValue.addAll(resultElement as Iterable);
+    _resultValue.addAll(resultElement as Iterable<E>);
   }
 
   @override
@@ -279,10 +277,10 @@
  * A mixin-ready implementation of [MapTaskInput].
  */
 abstract class MapTaskInputMixin<K, V> implements MapTaskInput<K, V> {
-  TaskInput<List /*<E>*/ > toFlattenList /*<E>*/ (
-      BinaryFunction<K, dynamic /*element of V*/, dynamic /*<=E>*/ > mapper) {
+  TaskInput<List/*<E>*/ > toFlattenList/*<E>*/(
+      BinaryFunction<K, dynamic /*element of V*/, dynamic/*=E*/ > mapper) {
     return new MapToFlattenListTaskInput<K, dynamic /*element of V*/,
-        dynamic /*=E*/ >(this as MapTaskInput<K, List /*<element of V>*/ >, mapper);
+        dynamic/*=E*/ >(this as MapTaskInput<K, List /*element of V*/ >, mapper);
   }
 }
 
@@ -420,6 +418,8 @@
 class ObjectToListTaskInput<E> extends TaskInputImpl<List<E>>
     with ListTaskInputMixin<E>
     implements ListTaskInput<E> {
+  // TODO(brianwilkerson) Add another type parameter to this class that can be
+  // used as the type of the keys of [mapper].
   /**
    * The input used to compute the value to be mapped.
    */
@@ -441,23 +441,22 @@
       new ObjectToListTaskInputBuilder<E>(this);
 
   @override
-  ListTaskInput /*<V>*/ toFlattenListOf /*<V>*/ (
-      ListResultDescriptor /*<V>*/ subListResult) {
-    return new ListToFlattenListTaskInput<E, dynamic /*=V*/ >(
+  ListTaskInput/*<V>*/ toFlattenListOf/*<V>*/(
+      ListResultDescriptor/*<V>*/ subListResult) {
+    return new ListToFlattenListTaskInput<E, dynamic/*=V*/ >(
         this, subListResult.of as dynamic);
   }
 
   @override
-  ListTaskInput /*<V>*/ toListOf /*<V>*/ (
-      ResultDescriptor /*<V>*/ valueResult) {
-    return new ListToListTaskInput<E, dynamic /*=V*/ >(
+  ListTaskInput/*<V>*/ toListOf/*<V>*/(ResultDescriptor/*<V>*/ valueResult) {
+    return new ListToListTaskInput<E, dynamic/*=V*/ >(
         this, valueResult.of as dynamic);
   }
 
   @override
-  MapTaskInput<AnalysisTarget, dynamic /*=V*/ > toMapOf /*<V>*/ (
-      ResultDescriptor /*<V>*/ valueResult) {
-    return new ListToMapTaskInput<AnalysisTarget, dynamic /*=V*/ >(
+  MapTaskInput<AnalysisTarget, dynamic/*=V*/ > toMapOf/*<V>*/(
+      ResultDescriptor/*<V>*/ valueResult) {
+    return new ListToMapTaskInput<AnalysisTarget, dynamic/*=V*/ >(
         this as dynamic, valueResult.of);
   }
 }
@@ -696,7 +695,7 @@
 
 abstract class TaskInputImpl<V> implements TaskInput<V> {
   @override
-  ListTaskInput /*<E>*/ mappedToList /*<E>*/ (List /*<E>*/ mapper(V value)) {
+  ListTaskInput/*<E>*/ mappedToList/*<E>*/(List/*<E>*/ mapper(V value)) {
     return new ObjectToListTaskInput(this, mapper);
   }
 }
diff --git a/pkg/analyzer/lib/src/task/model.dart b/pkg/analyzer/lib/src/task/model.dart
index 56e2827..47de4b3 100644
--- a/pkg/analyzer/lib/src/task/model.dart
+++ b/pkg/analyzer/lib/src/task/model.dart
@@ -11,7 +11,7 @@
 /**
  * The default [ResultCachingPolicy], results are never flushed.
  */
-const ResultCachingPolicy DEFAULT_CACHING_POLICY =
+const ResultCachingPolicy<Object> DEFAULT_CACHING_POLICY =
     const SimpleResultCachingPolicy(-1, -1);
 
 /**
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index e598910..d3cc82f 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -46,6 +46,7 @@
   static const String analyzer = 'analyzer';
   static const String enableAsync = 'enableAsync';
   static const String enableGenericMethods = 'enableGenericMethods';
+  static const String enableStrictCallChecks = 'enableStrictCallChecks';
   static const String enableSuperMixins = 'enableSuperMixins';
   static const String enableConditionalDirectives =
       "enableConditionalDirectives";
@@ -80,9 +81,10 @@
   /// Supported `analyzer` language configuration options.
   static const List<String> languageOptions = const [
     enableAsync,
-    enableGenericMethods,
-    enableSuperMixins,
     enableConditionalDirectives,
+    enableGenericMethods,
+    enableStrictCallChecks,
+    enableSuperMixins
   ];
 }
 
@@ -166,36 +168,36 @@
   @override
   void validate(ErrorReporter reporter, Map<String, YamlNode> options) {
     var analyzer = options[AnalyzerOptions.analyzer];
-    if (analyzer is! YamlMap) {
-      return;
-    }
-
-    var filters = analyzer[AnalyzerOptions.errors];
-    if (filters is YamlMap) {
-      String value;
-      filters.nodes.forEach((k, v) {
-        if (k is YamlScalar) {
-          value = toUpperCase(k.value);
-          if (!errorCodes.contains(value)) {
-            reporter.reportErrorForSpan(
-                AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE,
-                k.span,
-                [k.value?.toString()]);
+    if (analyzer is YamlMap) {
+      var filters = analyzer[AnalyzerOptions.errors];
+      if (filters is YamlMap) {
+        String value;
+        filters.nodes.forEach((k, v) {
+          if (k is YamlScalar) {
+            value = toUpperCase(k.value);
+            if (!errorCodes.contains(value)) {
+              reporter.reportErrorForSpan(
+                  AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE,
+                  k.span,
+                  [k.value?.toString()]);
+            }
           }
-        }
-        if (v is YamlScalar) {
-          value = toLowerCase(v.value);
-          if (!legalValues.contains(value)) {
-            reporter.reportErrorForSpan(
-                AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES,
-                v.span, [
-              AnalyzerOptions.errors,
-              v.value?.toString(),
-              legalValueString
-            ]);
+          if (v is YamlScalar) {
+            value = toLowerCase(v.value);
+            if (!legalValues.contains(value)) {
+              reporter.reportErrorForSpan(
+                  AnalysisOptionsWarningCode
+                      .UNSUPPORTED_OPTION_WITH_LEGAL_VALUES,
+                  v.span,
+                  [
+                    AnalyzerOptions.errors,
+                    v.value?.toString(),
+                    legalValueString
+                  ]);
+            }
           }
-        }
-      });
+        });
+      }
     }
   }
 }
@@ -253,7 +255,7 @@
   /// 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(Source source) =>
+  static Map<String, TaskInput> buildInputs(AnalysisTarget source) =>
       <String, TaskInput>{CONTENT_INPUT_NAME: CONTENT.of(source)};
 
   /// Compute [LineInfo] for the given [content].
@@ -287,31 +289,29 @@
   @override
   void validate(ErrorReporter reporter, Map<String, YamlNode> options) {
     var analyzer = options[AnalyzerOptions.analyzer];
-    if (analyzer is! YamlMap) {
-      return;
-    }
-
-    var language = analyzer[AnalyzerOptions.language];
-    if (language is YamlMap) {
-      language.nodes.forEach((k, v) {
-        String key, value;
-        bool validKey = false;
-        if (k is YamlScalar) {
-          key = k.value?.toString();
-          if (!AnalyzerOptions.languageOptions.contains(key)) {
-            builder.reportError(reporter, AnalyzerOptions.language, k);
-          } else {
-            // If we have a valid key, go on and check the value.
-            validKey = true;
+    if (analyzer is YamlMap) {
+      var language = analyzer[AnalyzerOptions.language];
+      if (language is YamlMap) {
+        language.nodes.forEach((k, v) {
+          String key, value;
+          bool validKey = false;
+          if (k is YamlScalar) {
+            key = k.value?.toString();
+            if (!AnalyzerOptions.languageOptions.contains(key)) {
+              builder.reportError(reporter, AnalyzerOptions.language, k);
+            } else {
+              // If we have a valid key, go on and check the value.
+              validKey = true;
+            }
           }
-        }
-        if (validKey && v is YamlScalar) {
-          value = toLowerCase(v.value);
-          if (!AnalyzerOptions.trueOrFalse.contains(value)) {
-            trueOrFalseBuilder.reportError(reporter, key, v);
+          if (validKey && v is YamlScalar) {
+            value = toLowerCase(v.value);
+            if (!AnalyzerOptions.trueOrFalse.contains(value)) {
+              trueOrFalseBuilder.reportError(reporter, key, v);
+            }
           }
-        }
-      });
+        });
+      }
     }
   }
 }
@@ -350,16 +350,14 @@
   @override
   void validate(ErrorReporter reporter, Map<String, YamlNode> options) {
     var analyzer = options[AnalyzerOptions.analyzer];
-    if (analyzer is! YamlMap) {
-      return;
-    }
-
-    var v = analyzer.nodes[AnalyzerOptions.strong_mode];
-    if (v is YamlScalar) {
-      var value = toLowerCase(v.value);
-      if (!AnalyzerOptions.trueOrFalse.contains(value)) {
-        trueOrFalseBuilder.reportError(
-            reporter, AnalyzerOptions.strong_mode, v);
+    if (analyzer is YamlMap) {
+      var v = analyzer.nodes[AnalyzerOptions.strong_mode];
+      if (v is YamlScalar) {
+        var value = toLowerCase(v.value);
+        if (!AnalyzerOptions.trueOrFalse.contains(value)) {
+          trueOrFalseBuilder.reportError(
+              reporter, AnalyzerOptions.strong_mode, v);
+        }
       }
     }
   }
@@ -429,17 +427,16 @@
       return;
     }
     var analyzer = optionMap[AnalyzerOptions.analyzer];
-    if (analyzer is! Map) {
-      return;
+    if (analyzer is Map) {
+      // Process strong mode option.
+      var strongMode = analyzer[AnalyzerOptions.strong_mode];
+      if (strongMode is bool) {
+        options.strongMode = strongMode;
+      }
+      // Process language options.
+      var language = analyzer[AnalyzerOptions.language];
+      _applyLanguageOptions(options, language);
     }
-    // Process strong mode option.
-    var strongMode = analyzer[AnalyzerOptions.strong_mode];
-    if (strongMode is bool) {
-      options.strongMode = strongMode;
-    }
-    // Process language options.
-    var language = analyzer[AnalyzerOptions.language];
-    _applyLanguageOptions(options, language);
   }
 
   /// Configure [context] based on the given [options] (which can be `null`
@@ -450,21 +447,19 @@
     }
 
     var analyzer = options[AnalyzerOptions.analyzer];
-    if (analyzer is! Map) {
-      return;
+    if (analyzer is Map) {
+      // Set strong mode (default is false).
+      var strongMode = analyzer[AnalyzerOptions.strong_mode];
+      setStrongMode(context, strongMode);
+
+      // Set filters.
+      var filters = analyzer[AnalyzerOptions.errors];
+      setProcessors(context, filters);
+
+      // Process language options.
+      var language = analyzer[AnalyzerOptions.language];
+      setLanguageOptions(context, language);
     }
-
-    // Set strong mode (default is false).
-    var strongMode = analyzer[AnalyzerOptions.strong_mode];
-    setStrongMode(context, strongMode);
-
-    // Set filters.
-    var filters = analyzer[AnalyzerOptions.errors];
-    setProcessors(context, filters);
-
-    // Process language options.
-    var language = analyzer[AnalyzerOptions.language];
-    setLanguageOptions(context, language);
   }
 
   void setLanguageOption(
@@ -477,6 +472,14 @@
         context.analysisOptions = options;
       }
     }
+    if (feature == AnalyzerOptions.enableStrictCallChecks) {
+      if (isTrue(value)) {
+        AnalysisOptionsImpl options =
+            new AnalysisOptionsImpl.from(context.analysisOptions);
+        options.enableStrictCallChecks = true;
+        context.analysisOptions = options;
+      }
+    }
     if (feature == AnalyzerOptions.enableSuperMixins) {
       if (isTrue(value)) {
         AnalysisOptionsImpl options =
diff --git a/pkg/analyzer/lib/src/task/options_work_manager.dart b/pkg/analyzer/lib/src/task/options_work_manager.dart
index 4447f30..bade2fc 100644
--- a/pkg/analyzer/lib/src/task/options_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/options_work_manager.dart
@@ -169,6 +169,7 @@
   }
 
   /// Return `true` if the given target is an `.analysis_options` source.
-  static bool _isOptionsSource(AnalysisTarget target) => target is Source &&
+  static bool _isOptionsSource(AnalysisTarget target) =>
+      target is Source &&
       AnalysisEngine.isAnalysisOptionsFileName(target.fullName);
 }
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 8f0c9de..eaa8599 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -145,7 +145,7 @@
     if (expr is ParenthesizedExpression) {
       checkAssignment(expr.expression, type);
     } else {
-      _recordMessage(_checkAssignment(expr, type));
+      _checkDowncast(expr, type);
     }
   }
 
@@ -327,19 +327,44 @@
 
   @override
   void visitForEachStatement(ForEachStatement node) {
-    // Check that the expression is an Iterable.
-    var expr = node.iterable;
-    var iterableType = node.awaitKeyword != null
-        ? typeProvider.streamType
-        : typeProvider.iterableType;
     var loopVariable = node.identifier != null
         ? node.identifier
         : node.loopVariable?.identifier;
+
+    // Safely handle malformed statements.
     if (loopVariable != null) {
-      var iteratorType = loopVariable.staticType;
-      var checkedType = iterableType.substitute4([iteratorType]);
-      checkAssignment(expr, checkedType);
+      // Find the element type of the sequence.
+      var sequenceInterface = node.awaitKeyword != null
+          ? typeProvider.streamType
+          : typeProvider.iterableType;
+      var iterableType = _getStaticType(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)) {
+          _recordMessage(DownCast.create(
+              rules, node.iterable, iterableType, sequenceType));
+          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.
+        _checkDowncast(loopVariable, _getStaticType(loopVariable),
+            from: elementType);
+      }
     }
+
     node.visitChildren(this);
   }
 
@@ -565,25 +590,15 @@
     node.visitChildren(this);
   }
 
-  StaticInfo _checkAssignment(Expression expr, DartType toT) {
-    final fromT = _getStaticType(expr);
-    final Coercion c = _coerceTo(fromT, toT);
-    if (c is Identity) return null;
-    if (c is CoercionError) return new StaticTypeError(rules, expr, toT);
-    if (c is Cast) return DownCast.create(rules, expr, c);
-    assert(false);
-    return null;
-  }
-
   void _checkCompoundAssignment(AssignmentExpression expr) {
     var op = expr.operator.type;
     assert(op.isAssignmentOperator && op != TokenType.EQ);
     var methodElement = expr.staticElement;
     if (methodElement == null) {
-      // Dynamic invocation
+      // Dynamic invocation.
       _recordDynamicInvoke(expr, expr.leftHandSide);
     } else {
-      // Sanity check the operator
+      // Sanity check the operator.
       assert(methodElement.isOperator);
       var functionType = methodElement.type;
       var paramTypes = functionType.normalParameterTypes;
@@ -591,7 +606,7 @@
       assert(functionType.namedParameterTypes.isEmpty);
       assert(functionType.optionalParameterTypes.isEmpty);
 
-      // Check the lhs type
+      // Check the LHS type.
       var staticInfo;
       var rhsType = _getStaticType(expr.rightHandSide);
       var lhsType = _getStaticType(expr.leftHandSide);
@@ -605,11 +620,10 @@
             rules.isSubtypeOf(lhsType, rhsType)) {
           // This is also slightly different from spec, but allows us to keep
           // compound operators in the int += num and num += dynamic cases.
-          staticInfo = DownCast.create(
-              rules, expr.rightHandSide, Coercion.cast(rhsType, lhsType));
+          staticInfo =
+              DownCast.create(rules, expr.rightHandSide, rhsType, lhsType);
           rhsType = lhsType;
         } else {
-          // Static type error
           staticInfo = new StaticTypeError(rules, expr, lhsType);
         }
         _recordMessage(staticInfo);
@@ -618,12 +632,60 @@
       // Check the rhs type
       if (staticInfo is! CoercionInfo) {
         var paramType = paramTypes.first;
-        staticInfo = _checkAssignment(expr.rightHandSide, paramType);
-        _recordMessage(staticInfo);
+        _checkDowncast(expr.rightHandSide, paramType);
       }
     }
   }
 
+  /// Records a [DownCast] of [expr] from [from] to [to], if there is one.
+  ///
+  /// If [from] is omitted, uses the static type of [expr].
+  ///
+  /// If [expr] does not require a downcast because it is not related to [to]
+  /// or is already a subtype of it, does nothing.
+  void _checkDowncast(Expression expr, DartType to, {DartType from}) {
+    if (from == null) {
+      from = _getStaticType(expr);
+    }
+
+    // We can use anything as void.
+    if (to.isVoid) return;
+
+    // fromT <: toT, no coercion needed.
+    if (rules.isSubtypeOf(from, to)) return;
+
+    // TODO(vsm): We can get rid of the second clause if we disallow
+    // all sideways casts - see TODO below.
+    // -------
+    // Note: a function type is never assignable to a class per the Dart
+    // spec - even if it has a compatible call method.  We disallow as
+    // well for consistency.
+    if ((from is FunctionType && rules.getCallMethodType(to) != null) ||
+        (to is FunctionType && rules.getCallMethodType(from) != null)) {
+      return;
+    }
+
+    // Downcast if toT <: fromT
+    if (rules.isSubtypeOf(to, from)) {
+      _recordMessage(DownCast.create(rules, expr, from, to));
+      return;
+    }
+
+    // TODO(vsm): Once we have generic methods, we should delete this
+    // workaround.  These sideways casts are always ones we warn about
+    // - i.e., we think they are likely to fail at runtime.
+    // -------
+    // Downcast if toT <===> fromT
+    // The intention here is to allow casts that are sideways in the restricted
+    // type system, but allowed in the regular dart type system, since these
+    // are likely to succeed.  The canonical example is List<dynamic> and
+    // Iterable<T> for some concrete T (e.g. Object).  These are unrelated
+    // in the restricted system, but List<dynamic> <: Iterable<T> in dart.
+    if (from.isAssignableTo(to)) {
+      _recordMessage(DownCast.create(rules, expr, from, to));
+    }
+  }
+
   void _checkFieldAccess(AstNode node, AstNode target, SimpleIdentifier field) {
     if ((_isDynamicTarget(target) || field.staticElement == null) &&
         !_isObjectProperty(target, field)) {
@@ -634,7 +696,7 @@
 
   void _checkReturnOrYield(Expression expression, AstNode node,
       {bool yieldStar: false}) {
-    var body = node.getAncestor((n) => n is FunctionBody);
+    FunctionBody body = node.getAncestor((n) => n is FunctionBody);
     var type = _getExpectedReturnType(body, yieldStar: yieldStar);
     if (type == null) {
       // We have a type mismatch: the async/async*/sync* modifier does
@@ -648,7 +710,7 @@
         !body.isGenerator &&
         actualType is InterfaceType &&
         actualType.element == futureType.element) {
-      type = futureType.substitute4([type]);
+      type = futureType.instantiate([type]);
     }
     // TODO(vsm): Enforce void or dynamic (to void?) when expression is null.
     if (expression != null) checkAssignment(expression, type);
@@ -675,44 +737,6 @@
     }
   }
 
-  Coercion _coerceTo(DartType fromT, DartType toT) {
-    // We can use anything as void
-    if (toT.isVoid) return Coercion.identity(toT);
-
-    // fromT <: toT, no coercion needed
-    if (rules.isSubtypeOf(fromT, toT)) return Coercion.identity(toT);
-
-    // TODO(vsm): We can get rid of the second clause if we disallow
-    // all sideways casts - see TODO below.
-    // -------
-    // Note: a function type is never assignable to a class per the Dart
-    // spec - even if it has a compatible call method.  We disallow as
-    // well for consistency.
-    if ((fromT is FunctionType && rules.getCallMethodType(toT) != null) ||
-        (toT is FunctionType && rules.getCallMethodType(fromT) != null)) {
-      return Coercion.error();
-    }
-
-    // Downcast if toT <: fromT
-    if (rules.isSubtypeOf(toT, fromT)) return Coercion.cast(fromT, toT);
-
-    // TODO(vsm): Once we have generic methods, we should delete this
-    // workaround.  These sideways casts are always ones we warn about
-    // - i.e., we think they are likely to fail at runtime.
-    // -------
-    // Downcast if toT <===> fromT
-    // The intention here is to allow casts that are sideways in the restricted
-    // type system, but allowed in the regular dart type system, since these
-    // are likely to succeed.  The canonical example is List<dynamic> and
-    // Iterable<T> for some concrete T (e.g. Object).  These are unrelated
-    // in the restricted system, but List<dynamic> <: Iterable<T> in dart.
-    if (fromT.isAssignableTo(toT)) {
-      return Coercion.cast(fromT, toT);
-    }
-
-    return Coercion.error();
-  }
-
   // Produce a coercion which coerces something of type fromT
   // to something of type toT.
   // Returns the error coercion if the types cannot be coerced
@@ -726,7 +750,8 @@
       functionType = _elementType(parent.element);
     } else {
       assert(parent is FunctionExpression);
-      functionType = parent.staticType ?? DynamicTypeImpl.instance;
+      functionType =
+          (parent as FunctionExpression).staticType ?? DynamicTypeImpl.instance;
     }
 
     var type = functionType.returnType;
@@ -753,7 +778,7 @@
     if (yieldStar) {
       if (type.isDynamic) {
         // Ensure it's at least a Stream / Iterable.
-        return expectedType.substitute4([typeProvider.dynamicType]);
+        return expectedType.instantiate([typeProvider.dynamicType]);
       } else {
         // Analyzer will provide a separate error if expected type
         // is not compatible with type.
@@ -781,55 +806,6 @@
     return t;
   }
 
-  /// Remove "fuzzy arrow" in this function type.
-  ///
-  /// Normally we treat dynamically typed parameters as bottom for function
-  /// types. This allows type tests such as `if (f is SingleArgFunction)`.
-  /// It also requires a dynamic check on the parameter type to call these
-  /// functions.
-  ///
-  /// When we convert to a strict arrow, dynamically typed parameters become
-  /// top. This is safe to do for known functions, like top-level or local
-  /// functions and static methods. Those functions must already be essentially
-  /// treating dynamic as top.
-  ///
-  /// Only the outer-most arrow can be strict. Any others must be fuzzy, because
-  /// we don't know what function value will be passed there.
-  // TODO(jmesserly): should we use a real "fuzzyArrow" bit on the function
-  // type? That would allow us to implement this in the subtype relation.
-  // TODO(jmesserly): we'll need to factor this differently if we want to
-  // move CodeChecker's functionality into existing analyzer. Likely we can
-  // let the Expression have a strict arrow, then in places were we do
-  // inference, convert back to a fuzzy arrow.
-  FunctionType _removeFuzz(FunctionType t) {
-    bool foundFuzz = false;
-    List<ParameterElement> parameters = <ParameterElement>[];
-    for (ParameterElement p in t.parameters) {
-      ParameterElement newP = _removeParameterFuzz(p);
-      parameters.add(newP);
-      if (p != newP) foundFuzz = true;
-    }
-    if (!foundFuzz) {
-      return t;
-    }
-
-    FunctionElementImpl function = new FunctionElementImpl("", -1);
-    function.synthetic = true;
-    function.returnType = t.returnType;
-    function.shareTypeParameters(t.typeFormals);
-    function.shareParameters(parameters);
-    return function.type = new FunctionTypeImpl(function);
-  }
-
-  /// Removes fuzzy arrow, see [_removeFuzz].
-  ParameterElement _removeParameterFuzz(ParameterElement p) {
-    if (p.type.isDynamic) {
-      return new ParameterElementImpl.synthetic(
-          p.name, typeProvider.objectType, p.parameterKind);
-    }
-    return p;
-  }
-
   /// 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
@@ -932,6 +908,55 @@
     }
   }
 
+  /// Remove "fuzzy arrow" in this function type.
+  ///
+  /// Normally we treat dynamically typed parameters as bottom for function
+  /// types. This allows type tests such as `if (f is SingleArgFunction)`.
+  /// It also requires a dynamic check on the parameter type to call these
+  /// functions.
+  ///
+  /// When we convert to a strict arrow, dynamically typed parameters become
+  /// top. This is safe to do for known functions, like top-level or local
+  /// functions and static methods. Those functions must already be essentially
+  /// treating dynamic as top.
+  ///
+  /// Only the outer-most arrow can be strict. Any others must be fuzzy, because
+  /// we don't know what function value will be passed there.
+  // TODO(jmesserly): should we use a real "fuzzyArrow" bit on the function
+  // type? That would allow us to implement this in the subtype relation.
+  // TODO(jmesserly): we'll need to factor this differently if we want to
+  // move CodeChecker's functionality into existing analyzer. Likely we can
+  // let the Expression have a strict arrow, then in places were we do
+  // inference, convert back to a fuzzy arrow.
+  FunctionType _removeFuzz(FunctionType t) {
+    bool foundFuzz = false;
+    List<ParameterElement> parameters = <ParameterElement>[];
+    for (ParameterElement p in t.parameters) {
+      ParameterElement newP = _removeParameterFuzz(p);
+      parameters.add(newP);
+      if (p != newP) foundFuzz = true;
+    }
+    if (!foundFuzz) {
+      return t;
+    }
+
+    FunctionElementImpl function = new FunctionElementImpl("", -1);
+    function.synthetic = true;
+    function.returnType = t.returnType;
+    function.shareTypeParameters(t.typeFormals);
+    function.shareParameters(parameters);
+    return function.type = new FunctionTypeImpl(function);
+  }
+
+  /// Removes fuzzy arrow, see [_removeFuzz].
+  ParameterElement _removeParameterFuzz(ParameterElement p) {
+    if (p.type.isDynamic) {
+      return new ParameterElementImpl.synthetic(
+          p.name, typeProvider.objectType, p.parameterKind);
+    }
+    return p;
+  }
+
   DartType _specializedBinaryReturnType(
       TokenType op, DartType t1, DartType t2, DartType normalReturnType) {
     // This special cases binary return types as per 16.26 and 16.27 of the
@@ -1035,7 +1060,6 @@
   _checkIndividualOverridesFromClass(ClassDeclaration node,
       InterfaceType baseType, Set<String> seen, bool isSubclass) {
     for (var member in node.members) {
-      if (member is ConstructorDeclaration) continue;
       if (member is FieldDeclaration) {
         if (member.isStatic) continue;
         for (var variable in member.fields.variables) {
@@ -1045,23 +1069,25 @@
           var getter = element.getter;
           var setter = element.setter;
           bool found = _checkSingleOverride(
-              getter, baseType, variable, member, isSubclass);
+              getter, baseType, variable.name, member, isSubclass);
           if (!variable.isFinal &&
               !variable.isConst &&
               _checkSingleOverride(
-                  setter, baseType, variable, member, isSubclass)) {
+                  setter, baseType, variable.name, member, isSubclass)) {
             found = true;
           }
           if (found) seen.add(name);
         }
-      } else {
-        if ((member as MethodDeclaration).isStatic) continue;
-        var method = (member as MethodDeclaration).element;
+      } else if (member is MethodDeclaration) {
+        if (member.isStatic) continue;
+        var method = member.element;
         if (seen.contains(method.name)) continue;
         if (_checkSingleOverride(
-            method, baseType, member, member, isSubclass)) {
+            method, baseType, member.name, member, isSubclass)) {
           seen.add(method.name);
         }
+      } else {
+        assert(member is ConstructorDeclaration);
       }
     }
   }
diff --git a/pkg/analyzer/lib/src/task/strong/info.dart b/pkg/analyzer/lib/src/task/strong/info.dart
index 6169815..41703e1 100644
--- a/pkg/analyzer/lib/src/task/strong/info.dart
+++ b/pkg/analyzer/lib/src/task/strong/info.dart
@@ -15,13 +15,16 @@
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/type_system.dart';
 
-// A down cast due to a variable declaration to a ground type.  E.g.,
-//   T x = expr;
-// where T is ground.  We exclude non-ground types as these behave differently
-// compared to standard Dart.
+/// A down cast due to a variable declaration to a ground type:
+///
+///     T x = expr;
+///
+/// where `T` is ground.  We exclude non-ground types as these behave
+/// differently compared to standard Dart.
 class AssignmentCast extends DownCast {
-  AssignmentCast(TypeSystem rules, Expression expression, Cast cast)
-      : super._internal(rules, expression, cast);
+  AssignmentCast(TypeSystem rules, Expression expression, DartType fromType,
+      DartType toType)
+      : super._internal(rules, expression, fromType, toType);
 
   @override
   String get name => 'STRONG_MODE_ASSIGNMENT_CAST';
@@ -29,30 +32,6 @@
   toErrorCode() => new HintCode(name, message);
 }
 
-// Coercion which casts one type to another
-class Cast extends Coercion {
-  Cast(DartType fromType, DartType toType) : super(fromType, toType);
-}
-
-// The abstract type of coercions mapping one type to another.
-// This class also exposes static builder functions which
-// check for errors and reduce redundant coercions to the identity.
-abstract class Coercion {
-  final DartType fromType;
-  final DartType toType;
-  Coercion(this.fromType, this.toType);
-  static Coercion cast(DartType fromT, DartType toT) => new Cast(fromT, toT);
-  static Coercion error() => new CoercionError();
-  static Coercion identity(DartType type) => new Identity(type);
-}
-
-// The error coercion.  This coercion signals that a coercion
-// could not be generated.  The code generator should not see
-// these.
-class CoercionError extends Coercion {
-  CoercionError() : super(null, null);
-}
-
 /// Implicitly injected expression conversion.
 abstract class CoercionInfo extends StaticInfo {
   static const String _propertyName = 'dev_compiler.src.info.CoercionInfo';
@@ -81,52 +60,49 @@
   }
 }
 
-// Base class for all casts from base type to sub type.
+/// Base class for all casts from base type to sub type.
 abstract class DownCast extends CoercionInfo {
-  Cast _cast;
+  final DartType _fromType;
+  final DartType _toType;
 
-  DownCast._internal(TypeSystem rules, Expression expression, this._cast)
-      : super(rules, expression) {
-    assert(_cast.toType != baseType &&
-        _cast.fromType == baseType &&
-        (baseType.isDynamic ||
-            // Call methods make the following non-redundant
-            _cast.toType.isSubtypeOf(baseType) ||
-            baseType.isAssignableTo(_cast.toType)));
-  }
+  DownCast._internal(
+      TypeSystem rules, Expression expression, this._fromType, this._toType)
+      : super(rules, expression);
 
   @override
   List<Object> get arguments => [baseType, convertedType];
 
-  Cast get cast => _cast;
+  /// The type being cast from.
+  ///
+  /// This is usually the static type of the associated expression, but may not
+  /// be if the cast is attached to a variable in a for-in loop.
+  @override
+  DartType get baseType => _fromType;
 
-  DartType get convertedType => _cast.toType;
+  DartType get convertedType => _toType;
 
   @override
   String get message => 'Unsound implicit cast from {0} to {1}';
 
-  // Factory to create correct DownCast variant.
-  static StaticInfo create(
-      StrongTypeSystemImpl rules, Expression expression, Cast cast) {
-    final fromT = cast.fromType;
-    final toT = cast.toType;
-
+  /// Factory to create correct DownCast variant.
+  static StaticInfo create(StrongTypeSystemImpl rules, Expression expression,
+      DartType fromType, DartType toType) {
     // toT <:_R fromT => to <: fromT
     // NB: classes with call methods are subtypes of function
     // types, but the function type is not assignable to the class
-    assert(toT.isSubtypeOf(fromT) || fromT.isAssignableTo(toT));
+    assert(toType.isSubtypeOf(fromType) || fromType.isAssignableTo(toType));
 
     // Handle null call specially.
     if (expression is NullLiteral) {
       // TODO(vsm): Create a NullCast for this once we revisit nonnullability.
-      return new DownCastImplicit(rules, expression, cast);
+      return new DownCastImplicit(rules, expression, fromType, toType);
     }
 
     // Inference "casts":
     if (expression is Literal || expression is FunctionExpression) {
       // fromT should be an exact type - this will almost certainly fail at
       // runtime.
-      return new StaticTypeError(rules, expression, toT);
+      return new StaticTypeError(rules, expression, toType);
     }
 
     if (expression is InstanceCreationExpression) {
@@ -134,74 +110,75 @@
       if (e == null || !e.isFactory) {
         // fromT should be an exact type - this will almost certainly fail at
         // runtime.
-        return new StaticTypeError(rules, expression, toT);
+        return new StaticTypeError(rules, expression, toType);
       }
     }
 
     if (StaticInfo.isKnownFunction(expression)) {
-      return new StaticTypeError(rules, expression, toT);
+      return new StaticTypeError(rules, expression, toType);
     }
 
     // TODO(vsm): Change this to an assert when we have generic methods and
     // fix TypeRules._coerceTo to disallow implicit sideways casts.
-    if (!rules.isSubtypeOf(toT, fromT)) {
-      assert(toT.isSubtypeOf(fromT) || fromT.isAssignableTo(toT));
-      return new DownCastComposite(rules, expression, cast);
+    if (!rules.isSubtypeOf(toType, fromType)) {
+      assert(toType.isSubtypeOf(fromType) || fromType.isAssignableTo(toType));
+      return new DownCastComposite(rules, expression, fromType, toType);
     }
 
     // Composite cast: these are more likely to fail.
-    if (!rules.isGroundType(toT)) {
+    if (!rules.isGroundType(toType)) {
       // This cast is (probably) due to our different treatment of dynamic.
       // It may be more likely to fail at runtime.
-      if (fromT is InterfaceType) {
+      if (fromType is InterfaceType) {
         // For class types, we'd like to allow non-generic down casts, e.g.,
         // Iterable<T> to List<T>.  The intuition here is that raw (generic)
         // casts are problematic, and we should complain about those.
-        var typeArgs = fromT.typeArguments;
+        var typeArgs = fromType.typeArguments;
         if (typeArgs.isEmpty || typeArgs.any((t) => t.isDynamic)) {
-          return new DownCastComposite(rules, expression, cast);
+          return new DownCastComposite(rules, expression, fromType, toType);
         }
       } else {
-        return new DownCastComposite(rules, expression, cast);
+        return new DownCastComposite(rules, expression, fromType, toType);
       }
     }
 
     // Dynamic cast
-    if (fromT.isDynamic) {
-      return new DynamicCast(rules, expression, cast);
+    if (fromType.isDynamic) {
+      return new DynamicCast(rules, expression, fromType, toType);
     }
 
     // Assignment cast
     var parent = expression.parent;
     if (parent is VariableDeclaration && (parent.initializer == expression)) {
-      return new AssignmentCast(rules, expression, cast);
+      return new AssignmentCast(rules, expression, fromType, toType);
     }
 
     // Other casts
-    return new DownCastImplicit(rules, expression, cast);
+    return new DownCastImplicit(rules, expression, fromType, toType);
   }
 }
 
-//
-// Implicit down casts.  These are only injected by the compiler by flag.
-//
-// A down cast to a non-ground type.  These behave differently from standard
-// Dart and may be more likely to fail at runtime.
+/// Implicit down casts.  These are only injected by the compiler by flag.
+///
+/// A down cast to a non-ground type.  These behave differently from standard
+/// Dart and may be more likely to fail at runtime.
 class DownCastComposite extends DownCast {
-  DownCastComposite(TypeSystem rules, Expression expression, Cast cast)
-      : super._internal(rules, expression, cast);
+  DownCastComposite(TypeSystem rules, Expression expression, DartType fromType,
+      DartType toType)
+      : super._internal(rules, expression, fromType, toType);
 
   @override
   String get name => 'STRONG_MODE_DOWN_CAST_COMPOSITE';
 
-  toErrorCode() => new StaticTypeWarningCode(name, message);
+  toErrorCode() => new StaticWarningCode(name, message);
 }
 
-// A down cast to a non-ground type.  These behave differently from standard
-// Dart and may be more likely to fail at runtime.
+/// A down cast to a non-ground type.  These behave differently from standard
+/// Dart and may be more likely to fail at runtime.
 class DownCastImplicit extends DownCast {
-  DownCastImplicit(TypeSystem rules, Expression expression, Cast cast)
-      : super._internal(rules, expression, cast);
+  DownCastImplicit(TypeSystem rules, Expression expression, DartType fromType,
+      DartType toType)
+      : super._internal(rules, expression, fromType, toType);
 
   @override
   String get name => 'STRONG_MODE_DOWN_CAST_IMPLICIT';
@@ -209,10 +186,11 @@
   toErrorCode() => new HintCode(name, message);
 }
 
-// A down cast from dynamic to T.
+/// A down cast from dynamic to T.
 class DynamicCast extends DownCast {
-  DynamicCast(TypeSystem rules, Expression expression, Cast cast)
-      : super._internal(rules, expression, cast);
+  DynamicCast(TypeSystem rules, Expression expression, DartType fromType,
+      DartType toType)
+      : super._internal(rules, expression, fromType, toType);
 
   @override
   String get name => 'STRONG_MODE_DYNAMIC_CAST';
@@ -248,12 +226,7 @@
   }
 }
 
-// The identity coercion
-class Identity extends Coercion {
-  Identity(DartType fromType) : super(fromType, fromType);
-}
-
-// Standard / unspecialized inferred type
+/// Standard / unspecialized inferred type.
 class InferredType extends InferredTypeBase {
   InferredType(TypeSystem rules, Expression expression, DartType type)
       : super._internal(rules, expression, type);
@@ -261,7 +234,7 @@
   @override
   String get name => 'STRONG_MODE_INFERRED_TYPE';
 
-  // Factory to create correct InferredType variant.
+  /// Factory to create correct InferredType variant.
   static InferredTypeBase create(
       TypeSystem rules, Expression expression, DartType type) {
     // Specialized inference:
@@ -278,7 +251,7 @@
   }
 }
 
-// An inferred type for a non-literal allocation site.
+/// An inferred type for a non-literal allocation site.
 class InferredTypeAllocation extends InferredTypeBase {
   InferredTypeAllocation(TypeSystem rules, Expression expression, DartType type)
       : super._internal(rules, expression, type);
@@ -287,8 +260,8 @@
   String get name => 'STRONG_MODE_INFERRED_TYPE_ALLOCATION';
 }
 
-// An inferred type for the wrapped expression, which may need to be
-// reified into the term
+/// An inferred type for the wrapped expression, which may need to be
+/// reified into the term.
 abstract class InferredTypeBase extends CoercionInfo {
   final DartType _type;
 
@@ -306,7 +279,7 @@
   toErrorCode() => new HintCode(name, message);
 }
 
-// An inferred type for a closure expression
+/// An inferred type for a closure expression.
 class InferredTypeClosure extends InferredTypeBase {
   InferredTypeClosure(TypeSystem rules, Expression expression, DartType type)
       : super._internal(rules, expression, type);
@@ -315,7 +288,7 @@
   String get name => 'STRONG_MODE_INFERRED_TYPE_CLOSURE';
 }
 
-// An inferred type for a literal expression.
+/// An inferred type for a literal expression.
 class InferredTypeLiteral extends InferredTypeBase {
   InferredTypeLiteral(TypeSystem rules, Expression expression, DartType type)
       : super._internal(rules, expression, type);
@@ -336,8 +309,8 @@
   String get name => 'STRONG_MODE_INVALID_FIELD_OVERRIDE';
 }
 
-// Invalid override due to incompatible type.  I.e., the overridden signature
-// is not compatible with the original.
+/// Invalid override due to incompatible type.  I.e., the overridden signature
+/// is not compatible with the original.
 class InvalidMethodOverride extends InvalidOverride {
   InvalidMethodOverride(AstNode node, ExecutableElement element,
       InterfaceType base, FunctionType subType, FunctionType baseType)
@@ -349,7 +322,7 @@
   String get name => 'STRONG_MODE_INVALID_METHOD_OVERRIDE';
 }
 
-// Invalid override of an instance member of a class.
+/// Invalid override of an instance member of a class.
 abstract class InvalidOverride extends StaticError {
   /// Member declaration with the invalid override.
   final ExecutableElement element;
@@ -545,7 +518,9 @@
 
   static bool isKnownFunction(Expression expression) {
     Element element = null;
-    if (expression is PropertyAccess) {
+    if (expression is FunctionExpression) {
+      return true;
+    } else if (expression is PropertyAccess) {
       element = expression.propertyName.staticElement;
     } else if (expression is Identifier) {
       element = expression.staticElement;
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
index b106dee..233e5c4 100644
--- a/pkg/analyzer/lib/src/task/strong_mode.dart
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -11,11 +11,11 @@
 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/resolver.dart'
     show TypeProvider, InheritanceManager;
 import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:analyzer/src/dart/element/type.dart';
 
 /**
  * Sets the type of the field. This is stored in the field itself, and the
@@ -29,7 +29,10 @@
   if (field is PropertyInducingElementImpl) {
     (field.getter as ExecutableElementImpl).returnType = newType;
     if (!field.isFinal && !field.isConst) {
-      (field.setter.parameters[0] as ParameterElementImpl).type = newType;
+      List<ParameterElement> setterParameters = field.setter.parameters;
+      if (setterParameters.isNotEmpty) {
+        (setterParameters[0] as ParameterElementImpl).type = newType;
+      }
     }
   }
 }
@@ -72,7 +75,7 @@
   /**
    * The inheritance manager used to find overridden method.
    */
-  InheritanceManager inheritanceManager;
+  final InheritanceManager inheritanceManager;
 
   /**
    * The classes that have been visited while attempting to infer the types of
@@ -84,7 +87,8 @@
   /**
    * Initialize a newly create inferrer.
    */
-  InstanceMemberInferrer(this.typeProvider, {TypeSystem typeSystem})
+  InstanceMemberInferrer(this.typeProvider, this.inheritanceManager,
+      {TypeSystem typeSystem})
       : typeSystem = (typeSystem != null) ? typeSystem : new TypeSystemImpl();
 
   /**
@@ -92,7 +96,6 @@
    * compilation [unit].
    */
   void inferCompilationUnit(CompilationUnitElement unit) {
-    inheritanceManager = new InheritanceManager(unit.library);
     unit.types.forEach((ClassElement classElement) {
       try {
         _inferClass(classElement);
@@ -284,11 +287,13 @@
     List<FunctionType> overriddenTypes = new List<FunctionType>();
     for (ExecutableElement overriddenMethod in overriddenMethods) {
       FunctionType overriddenType = overriddenMethod.type;
-      if (overriddenType.typeFormals.isNotEmpty &&
-          overriddenType.typeFormals.length != typeFormals.length) {
-        return;
+      if (overriddenType.typeFormals.isNotEmpty) {
+        if (overriddenType.typeFormals.length != typeFormals.length) {
+          return;
+        }
+        overriddenType = overriddenType.instantiate(typeFormals);
       }
-      overriddenTypes.add(overriddenType.instantiate(typeFormals));
+      overriddenTypes.add(overriddenType);
     }
 
     //
diff --git a/pkg/analyzer/lib/src/task/yaml.dart b/pkg/analyzer/lib/src/task/yaml.dart
index 1e1951c..e83fa8c 100644
--- a/pkg/analyzer/lib/src/task/yaml.dart
+++ b/pkg/analyzer/lib/src/task/yaml.dart
@@ -100,7 +100,7 @@
    * input descriptors describing those inputs for a task with the given
    * [source].
    */
-  static Map<String, TaskInput> buildInputs(Source source) {
+  static Map<String, TaskInput> buildInputs(AnalysisTarget source) {
     return <String, TaskInput>{CONTENT_INPUT_NAME: CONTENT.of(source)};
   }
 
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart
index 8144f17..be60b78 100644
--- a/pkg/analyzer/lib/task/model.dart
+++ b/pkg/analyzer/lib/task/model.dart
@@ -381,7 +381,7 @@
    * Return a task input that can be used to compute a list whose elements are
    * the result of passing the elements of this input to the [mapper] function.
    */
-  ListTaskInput/*<V>*/ toList/*<V>*/(UnaryFunction<E, dynamic/*<=V>*/ > mapper);
+  ListTaskInput/*<V>*/ toList/*<V>*/(UnaryFunction<E, dynamic/*=V*/ > mapper);
 
   /**
    * Return a task input that can be used to compute a list whose elements are
@@ -465,7 +465,7 @@
    * never evicted from the cache, and removed only when they are invalidated.
    */
   factory ResultDescriptor(String name, V defaultValue,
-      {ResultCachingPolicy<V> cachingPolicy}) = ResultDescriptorImpl;
+      {ResultCachingPolicy<V> cachingPolicy}) = ResultDescriptorImpl<V>;
 
   /**
    * Return the caching policy for results described by this descriptor.
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index fb6756b..4b0b2ad 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,8 +1,8 @@
 name: analyzer
-version: 0.27.3-alpha.0
+version: 0.27.3-alpha.7
 author: Dart Team <misc@dartlang.org>
 description: Static analyzer for Dart.
-homepage: http://www.dartlang.org
+homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
 environment:
   sdk: '>=1.12.0 <2.0.0'
 dependencies:
diff --git a/pkg/analyzer/test/cancelable_future_test.dart b/pkg/analyzer/test/cancelable_future_test.dart
index 24c84ae..1ece1a5f 100644
--- a/pkg/analyzer/test/cancelable_future_test.dart
+++ b/pkg/analyzer/test/cancelable_future_test.dart
@@ -39,15 +39,18 @@
     completer.future.cancel();
     expect(cancelCount, 1);
     // Make sure the future still completes with error.
-    return completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(error, new isInstanceOf<FutureCanceledError>());
-      // And make sure nothing else happens.
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(completer.isCompleted, isFalse);
-      expect(cancelCount, 1);
-    });
+    return completer.future
+        .then((_) {
+          fail('Expected error completion');
+        }, onError: (error) {
+          expect(error, new isInstanceOf<FutureCanceledError>());
+          // And make sure nothing else happens.
+        })
+        .then((_) => pumpEventQueue())
+        .then((_) {
+          expect(completer.isCompleted, isFalse);
+          expect(cancelCount, 1);
+        });
   }
 
   Future test_cancel_after_chaining() {
@@ -82,13 +85,16 @@
     // late to cancel.
     expect(cancelCount, 0);
     // Make sure the future still completes with the object.
-    return completer.future.then((result) {
-      expect(result, same(obj));
-      // And make sure nothing else happens.
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 0);
-    });
+    return completer.future
+        .then((result) {
+          expect(result, same(obj));
+          // And make sure nothing else happens.
+        })
+        .then((_) => pumpEventQueue())
+        .then((_) {
+          expect(completer.isCompleted, isTrue);
+          expect(cancelCount, 0);
+        });
   }
 
   Future test_cancel_before_chaining() {
@@ -126,15 +132,18 @@
     completer.complete(obj);
     expect(completer.isCompleted, isTrue);
     // Make sure the future still completer with error.
-    return completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(error, new isInstanceOf<FutureCanceledError>());
-      // And make sure nothing else happens.
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 1);
-    });
+    return completer.future
+        .then((_) {
+          fail('Expected error completion');
+        }, onError: (error) {
+          expect(error, new isInstanceOf<FutureCanceledError>());
+          // And make sure nothing else happens.
+        })
+        .then((_) => pumpEventQueue())
+        .then((_) {
+          expect(completer.isCompleted, isTrue);
+          expect(cancelCount, 1);
+        });
   }
 
   Future test_complete_after_chaining() {
@@ -150,16 +159,19 @@
     expect(completer.isCompleted, isFalse);
     // Running the event loop should have no effect since the completer hasn't
     // been completed yet.
-    return pumpEventQueue().then((_) {
-      completer.complete(obj);
-      expect(completer.isCompleted, isTrue);
-      // The callback should be deferred to a microtask.
-      expect(callbackInvoked, isFalse);
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(callbackInvoked, isTrue);
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 0);
-    });
+    return pumpEventQueue()
+        .then((_) {
+          completer.complete(obj);
+          expect(completer.isCompleted, isTrue);
+          // The callback should be deferred to a microtask.
+          expect(callbackInvoked, isFalse);
+        })
+        .then((_) => pumpEventQueue())
+        .then((_) {
+          expect(callbackInvoked, isTrue);
+          expect(completer.isCompleted, isTrue);
+          expect(cancelCount, 0);
+        });
   }
 
   void test_complete_after_complete() {
@@ -221,15 +233,18 @@
     completer.completeError(obj);
     expect(completer.isCompleted, isTrue);
     // Make sure the future still completes with error.
-    return completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(error, new isInstanceOf<FutureCanceledError>());
-      // And make sure nothing else happens.
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 1);
-    });
+    return completer.future
+        .then((_) {
+          fail('Expected error completion');
+        }, onError: (error) {
+          expect(error, new isInstanceOf<FutureCanceledError>());
+          // And make sure nothing else happens.
+        })
+        .then((_) => pumpEventQueue())
+        .then((_) {
+          expect(completer.isCompleted, isTrue);
+          expect(cancelCount, 1);
+        });
   }
 
   Future test_completeError_after_chaining() {
@@ -245,16 +260,19 @@
     expect(completer.isCompleted, isFalse);
     // Running the event loop should have no effect since the completer hasn't
     // been completed yet.
-    return pumpEventQueue().then((_) {
-      completer.completeError(obj);
-      expect(completer.isCompleted, isTrue);
-      // The callback should be deferred to a microtask.
-      expect(callbackInvoked, isFalse);
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(callbackInvoked, isTrue);
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 0);
-    });
+    return pumpEventQueue()
+        .then((_) {
+          completer.completeError(obj);
+          expect(completer.isCompleted, isTrue);
+          // The callback should be deferred to a microtask.
+          expect(callbackInvoked, isFalse);
+        })
+        .then((_) => pumpEventQueue())
+        .then((_) {
+          expect(callbackInvoked, isTrue);
+          expect(completer.isCompleted, isTrue);
+          expect(cancelCount, 0);
+        });
   }
 
   Future test_completeError_before_chaining() {
diff --git a/pkg/analyzer/test/context/declared_variables_test.dart b/pkg/analyzer/test/context/declared_variables_test.dart
new file mode 100644
index 0000000..3a33003
--- /dev/null
+++ b/pkg/analyzer/test/context/declared_variables_test.dart
@@ -0,0 +1,116 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.context.declared_variables_test;
+
+import 'package:analyzer/context/declared_variables.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/generated/constant.dart';
+import 'package:analyzer/src/generated/testing/test_type_provider.dart';
+import 'package:unittest/unittest.dart';
+
+import '../generated/test_support.dart';
+import '../reflective_tests.dart';
+import '../utils.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(DeclaredVariablesTest);
+}
+
+@reflectiveTest
+class DeclaredVariablesTest extends EngineTestCase {
+  void test_getBool_false() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    DeclaredVariables variables = new DeclaredVariables();
+    variables.define(variableName, "false");
+    DartObject object = variables.getBool(typeProvider, variableName);
+    expect(object, isNotNull);
+    expect(object.toBoolValue(), false);
+  }
+
+  void test_getBool_invalid() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    DeclaredVariables variables = new DeclaredVariables();
+    variables.define(variableName, "not true");
+    _assertNullDartObject(
+        typeProvider, variables.getBool(typeProvider, variableName));
+  }
+
+  void test_getBool_true() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    DeclaredVariables variables = new DeclaredVariables();
+    variables.define(variableName, "true");
+    DartObject object = variables.getBool(typeProvider, variableName);
+    expect(object, isNotNull);
+    expect(object.toBoolValue(), true);
+  }
+
+  void test_getBool_undefined() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    DeclaredVariables variables = new DeclaredVariables();
+    _assertUnknownDartObject(
+        typeProvider.boolType, variables.getBool(typeProvider, variableName));
+  }
+
+  void test_getInt_invalid() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    DeclaredVariables variables = new DeclaredVariables();
+    variables.define(variableName, "four score and seven years");
+    _assertNullDartObject(
+        typeProvider, variables.getInt(typeProvider, variableName));
+  }
+
+  void test_getInt_undefined() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    DeclaredVariables variables = new DeclaredVariables();
+    _assertUnknownDartObject(
+        typeProvider.intType, variables.getInt(typeProvider, variableName));
+  }
+
+  void test_getInt_valid() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    DeclaredVariables variables = new DeclaredVariables();
+    variables.define(variableName, "23");
+    DartObject object = variables.getInt(typeProvider, variableName);
+    expect(object, isNotNull);
+    expect(object.toIntValue(), 23);
+  }
+
+  void test_getString_defined() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    String value = "value";
+    DeclaredVariables variables = new DeclaredVariables();
+    variables.define(variableName, value);
+    DartObject object = variables.getString(typeProvider, variableName);
+    expect(object, isNotNull);
+    expect(object.toStringValue(), value);
+  }
+
+  void test_getString_undefined() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    String variableName = "var";
+    DeclaredVariables variables = new DeclaredVariables();
+    _assertUnknownDartObject(typeProvider.stringType,
+        variables.getString(typeProvider, variableName));
+  }
+
+  void _assertNullDartObject(TestTypeProvider typeProvider, DartObject result) {
+    expect(result.type, typeProvider.nullType);
+  }
+
+  void _assertUnknownDartObject(
+      ParameterizedType expectedType, DartObject result) {
+    expect((result as DartObjectImpl).isUnknown, isTrue);
+    expect(result.type, expectedType);
+  }
+}
diff --git a/pkg/analyzer/test/context/test_all.dart b/pkg/analyzer/test/context/test_all.dart
new file mode 100644
index 0000000..b5387ba
--- /dev/null
+++ b/pkg/analyzer/test/context/test_all.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.context.test_all;
+
+import 'package:unittest/unittest.dart';
+
+import '../utils.dart';
+import 'declared_variables_test.dart' as declared_variables;
+
+/// Utility for manually running all tests.
+main() {
+  initializeTestEnvironment();
+  group('context tests', () {
+    declared_variables.main();
+  });
+}
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index 7be2b72..35ff9a9 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -23,6 +23,7 @@
   runReflectiveTests(ConstructorDeclarationTest);
   runReflectiveTests(FieldFormalParameterTest);
   runReflectiveTests(IndexExpressionTest);
+  runReflectiveTests(MethodDeclarationTest);
   runReflectiveTests(NodeListTest);
   runReflectiveTests(SimpleIdentifierTest);
   runReflectiveTests(SimpleStringLiteralTest);
@@ -305,6 +306,44 @@
 }
 
 @reflectiveTest
+class MethodDeclarationTest extends EngineTestCase {
+  void test_firstTokenAfterCommentAndMetadata_external() {
+    MethodDeclaration declaration =
+        AstFactory.methodDeclaration4(external: true, name: 'm');
+    expect(declaration.firstTokenAfterCommentAndMetadata,
+        declaration.externalKeyword);
+  }
+
+  void test_firstTokenAfterCommentAndMetadata_external_getter() {
+    MethodDeclaration declaration = AstFactory.methodDeclaration4(
+        external: true, property: Keyword.GET, name: 'm');
+    expect(declaration.firstTokenAfterCommentAndMetadata,
+        declaration.externalKeyword);
+  }
+
+  void test_firstTokenAfterCommentAndMetadata_external_operator() {
+    MethodDeclaration declaration = AstFactory.methodDeclaration4(
+        external: true, operator: true, name: 'm');
+    expect(declaration.firstTokenAfterCommentAndMetadata,
+        declaration.externalKeyword);
+  }
+
+  void test_firstTokenAfterCommentAndMetadata_getter() {
+    MethodDeclaration declaration =
+        AstFactory.methodDeclaration4(property: Keyword.GET, name: 'm');
+    expect(declaration.firstTokenAfterCommentAndMetadata,
+        declaration.propertyKeyword);
+  }
+
+  void test_firstTokenAfterCommentAndMetadata_operator() {
+    MethodDeclaration declaration =
+        AstFactory.methodDeclaration4(operator: true, name: 'm');
+    expect(declaration.firstTokenAfterCommentAndMetadata,
+        declaration.operatorKeyword);
+  }
+}
+
+@reflectiveTest
 class NodeListTest extends EngineTestCase {
   void test_add() {
     AstNode parent = AstFactory.argumentList();
@@ -534,124 +573,6 @@
 
 @reflectiveTest
 class SimpleIdentifierTest extends ParserTestCase {
-  void test_inDeclarationContext_catch_exception() {
-    SimpleIdentifier identifier =
-        AstFactory.catchClause("e").exceptionParameter;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_catch_stack() {
-    SimpleIdentifier identifier =
-        AstFactory.catchClause2("e", "s").stackTraceParameter;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_classDeclaration() {
-    SimpleIdentifier identifier =
-        AstFactory.classDeclaration(null, "C", null, null, null, null).name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_classTypeAlias() {
-    SimpleIdentifier identifier =
-        AstFactory.classTypeAlias("C", null, null, null, null, null).name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_constructorDeclaration() {
-    SimpleIdentifier identifier = AstFactory
-        .constructorDeclaration(AstFactory.identifier3("C"), "c", null, null)
-        .name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_declaredIdentifier() {
-    DeclaredIdentifier declaredIdentifier = AstFactory.declaredIdentifier3("v");
-    SimpleIdentifier identifier = declaredIdentifier.identifier;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_enumConstantDeclaration() {
-    EnumDeclaration enumDeclaration =
-        AstFactory.enumDeclaration2('MyEnum', ['CONST']);
-    SimpleIdentifier identifier = enumDeclaration.constants[0].name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_enumDeclaration() {
-    EnumDeclaration enumDeclaration =
-        AstFactory.enumDeclaration2('MyEnum', ['A', 'B', 'C']);
-    SimpleIdentifier identifier = enumDeclaration.name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_fieldFormalParameter() {
-    SimpleIdentifier identifier =
-        AstFactory.fieldFormalParameter2("p").identifier;
-    expect(identifier.inDeclarationContext(), isFalse);
-  }
-
-  void test_inDeclarationContext_functionDeclaration() {
-    SimpleIdentifier identifier =
-        AstFactory.functionDeclaration(null, null, "f", null).name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_functionTypeAlias() {
-    SimpleIdentifier identifier =
-        AstFactory.typeAlias(null, "F", null, null).name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_label_false() {
-    SimpleIdentifier identifier =
-        AstFactory.namedExpression2("l", AstFactory.integer(0)).name.label;
-    expect(identifier.inDeclarationContext(), isFalse);
-  }
-
-  void test_inDeclarationContext_label_true() {
-    Label label = AstFactory.label2("l");
-    SimpleIdentifier identifier = label.label;
-    AstFactory.labeledStatement([label], AstFactory.emptyStatement());
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_methodDeclaration() {
-    SimpleIdentifier identifier = AstFactory.identifier3("m");
-    AstFactory.methodDeclaration2(
-        null, null, null, null, identifier, null, null);
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_prefix() {
-    SimpleIdentifier identifier =
-        AstFactory.importDirective3("uri", "pref").prefix;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_simpleFormalParameter() {
-    SimpleIdentifier identifier =
-        AstFactory.simpleFormalParameter3("p").identifier;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_typeParameter_bound() {
-    TypeName bound = AstFactory.typeName4("A");
-    SimpleIdentifier identifier = bound.name as SimpleIdentifier;
-    AstFactory.typeParameter2("E", bound);
-    expect(identifier.inDeclarationContext(), isFalse);
-  }
-
-  void test_inDeclarationContext_typeParameter_name() {
-    SimpleIdentifier identifier = AstFactory.typeParameter("E").name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
-  void test_inDeclarationContext_variableDeclaration() {
-    SimpleIdentifier identifier = AstFactory.variableDeclaration("v").name;
-    expect(identifier.inDeclarationContext(), isTrue);
-  }
-
   void test_inGetterContext() {
     for (_WrapperKind wrapper in _WrapperKind.values) {
       for (_AssignmentKind assignment in _AssignmentKind.values) {
diff --git a/pkg/analyzer/test/enum_test.dart b/pkg/analyzer/test/enum_test.dart
index 0ba5a98..93f8a4f 100644
--- a/pkg/analyzer/test/enum_test.dart
+++ b/pkg/analyzer/test/enum_test.dart
@@ -136,7 +136,7 @@
       if (_ignoreGetters.contains(name)) {
         return;
       }
-      C value = reflectedClass.getField(symbol).reflectee;
+      C value = reflectedClass.getField(symbol).reflectee as C;
       result[name] = value;
     });
     return result;
@@ -148,7 +148,7 @@
    */
   void check_explicit_values() {
     ClassMirror reflectedClass = reflectClass(C);
-    List<C> values = reflectedClass.getField(#values).reflectee;
+    List<C> values = reflectedClass.getField(#values).reflectee as List<C>;
     Map<C, int> reverseMap = <C, int>{};
 
     // Check that "values" is a list of values of type C, with no duplicates.
diff --git a/pkg/analyzer/test/file_system/memory_file_system_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart
index d00d2d4..b40be43 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -11,6 +11,7 @@
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/generated/engine.dart' show TimestampedData;
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:path/path.dart';
 import 'package:unittest/unittest.dart';
 import 'package:watcher/watcher.dart';
@@ -123,6 +124,19 @@
     expect(parent.path, equals('/foo/bar'));
   }
 
+  void test_readAsBytesSync_doesNotExist() {
+    File file = provider.getResource('/test.bin');
+    expect(() {
+      file.readAsBytesSync();
+    }, throwsA(_isFileSystemException));
+  }
+
+  void test_readAsBytesSync_exists() {
+    List<int> bytes = <int>[1, 2, 3, 4, 5];
+    File file = provider.newFileWithBytes('/file.bin', bytes);
+    expect(file.readAsBytesSync(), bytes);
+  }
+
   void test_readAsStringSync_doesNotExist() {
     File file = provider.getResource('/test.txt');
     expect(() {
@@ -135,6 +149,43 @@
     expect(file.readAsStringSync(), 'abc');
   }
 
+  void test_renameSync_newDoesNotExist() {
+    String oldPath = '/foo/bar/file.txt';
+    String newPath = '/foo/bar/new-file.txt';
+    File file = provider.newFile(oldPath, 'text');
+    File newFile = file.renameSync(newPath);
+    expect(file.path, oldPath);
+    expect(file.exists, isFalse);
+    expect(newFile.path, newPath);
+    expect(newFile.exists, isTrue);
+    expect(newFile.readAsStringSync(), 'text');
+  }
+
+  void test_renameSync_newExists_file() {
+    String oldPath = '/foo/bar/file.txt';
+    String newPath = '/foo/bar/new-file.txt';
+    File file = provider.newFile(oldPath, 'text');
+    provider.newFile(newPath, 'new text');
+    File newFile = file.renameSync(newPath);
+    expect(file.path, oldPath);
+    expect(file.exists, isFalse);
+    expect(newFile.path, newPath);
+    expect(newFile.exists, isTrue);
+    expect(newFile.readAsStringSync(), 'text');
+  }
+
+  void test_renameSync_newExists_folder() {
+    String oldPath = '/foo/bar/file.txt';
+    String newPath = '/foo/bar/baz';
+    File file = provider.newFile(oldPath, 'text');
+    provider.newFolder(newPath);
+    expect(() {
+      file.renameSync(newPath);
+    }, throwsA(_isFileSystemException));
+    expect(file.path, oldPath);
+    expect(file.exists, isTrue);
+  }
+
   void test_shortName() {
     File file = provider.getResource('/foo/bar/file.txt');
     expect(file.shortName, 'file.txt');
@@ -144,6 +195,23 @@
     File file = provider.getResource('/foo/bar/file.txt');
     expect(file.toString(), '/foo/bar/file.txt');
   }
+
+  void test_writeAsBytesSync_existing() {
+    File file = provider.newFileWithBytes('/foo/file.bin', <int>[1, 2]);
+    expect(file.readAsBytesSync(), <int>[1, 2]);
+    // write new bytes
+    file.writeAsBytesSync(<int>[10, 20]);
+    expect(file.readAsBytesSync(), <int>[10, 20]);
+  }
+
+  void test_writeAsBytesSync_new() {
+    File file = provider.getFile('/foo/file.bin');
+    expect(file.exists, false);
+    // write new bytes
+    file.writeAsBytesSync(<int>[10, 20]);
+    expect(file.exists, true);
+    expect(file.readAsBytesSync(), <int>[10, 20]);
+  }
 }
 
 @reflectiveTest
@@ -335,14 +403,14 @@
   }
 
   void test_resolveRelative() {
-    Uri relative = source.resolveRelativeUri(new Uri.file('bar/baz.dart'));
+    Uri relative = resolveRelativeUri(source.uri, new Uri.file('bar/baz.dart'));
     expect(relative.path, '/foo/bar/baz.dart');
   }
 
   void test_resolveRelative_dart() {
     File file = provider.newFile('/sdk/lib/core/core.dart', '');
     Source source = file.createSource(Uri.parse('dart:core'));
-    Uri resolved = source.resolveRelativeUri(Uri.parse('int.dart'));
+    Uri resolved = resolveRelativeUri(source.uri, Uri.parse('int.dart'));
     expect(resolved.toString(), 'dart:core/int.dart');
   }
 
@@ -384,7 +452,7 @@
   }
 
   void test_resolveRelative() {
-    Uri relative = source.resolveRelativeUri(new Uri.file('bar/baz.dart'));
+    Uri relative = resolveRelativeUri(source.uri, new Uri.file('bar/baz.dart'));
     expect(relative.path, '/foo/bar/baz.dart');
   }
 
@@ -467,14 +535,24 @@
     expect(source.contents.data, equals('contents 2'));
   }
 
-  void test_newFolder_aleadyExists_asFile() {
+  void test_newFileWithBytes() {
+    String path = '/my/file';
+    List<int> bytes = <int>[1, 2, 3, 4, 5];
+    provider.newFileWithBytes(path, bytes);
+    File file = provider.getResource(path);
+    expect(file, isNotNull);
+    expect(file.exists, isTrue);
+    expect(file.readAsBytesSync(), bytes);
+  }
+
+  void test_newFolder_alreadyExists_asFile() {
     provider.newFile('/my/file', 'qwerty');
     expect(() {
       provider.newFolder('/my/file');
     }, throwsA(new isInstanceOf<ArgumentError>()));
   }
 
-  void test_newFolder_aleadyExists_asFolder() {
+  void test_newFolder_alreadyExists_asFolder() {
     Folder folder = provider.newFolder('/my/folder');
     Folder newFolder = provider.newFolder('/my/folder');
     expect(newFolder, folder);
diff --git a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
index 850bbcf..5bf3256 100644
--- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
@@ -20,9 +20,11 @@
 
 main() {
   initializeTestEnvironment();
-  runReflectiveTests(PhysicalResourceProviderTest);
-  runReflectiveTests(FileTest);
-  runReflectiveTests(FolderTest);
+  if (!new bool.fromEnvironment('skipPhysicalResourceProviderTests')) {
+    runReflectiveTests(PhysicalResourceProviderTest);
+    runReflectiveTests(FileTest);
+    runReflectiveTests(FolderTest);
+  }
 }
 
 var _isFile = new isInstanceOf<File>();
@@ -104,6 +106,19 @@
     expect(parent.path, equals(tempPath));
   }
 
+  void test_readAsBytesSync_doesNotExist() {
+    File file = PhysicalResourceProvider.INSTANCE.getResource('/test.bin');
+    expect(() {
+      file.readAsBytesSync();
+    }, throwsA(_isFileSystemException));
+  }
+
+  void test_readAsBytesSync_exists() {
+    List<int> bytes = <int>[1, 2, 3, 4, 5];
+    new io.File(path).writeAsBytesSync(bytes);
+    expect(file.readAsBytesSync(), bytes);
+  }
+
   void test_readAsStringSync_doesNotExist() {
     File file = PhysicalResourceProvider.INSTANCE.getResource(path);
     expect(() {
@@ -117,6 +132,46 @@
     expect(file.readAsStringSync(), 'abc');
   }
 
+  void test_renameSync_newDoesNotExist() {
+    String oldPath = '$tempPath/file.txt';
+    String newPath = '$tempPath/new-file.txt';
+    new io.File(oldPath).writeAsStringSync('text');
+    File file = PhysicalResourceProvider.INSTANCE.getResource(oldPath);
+    File newFile = file.renameSync(newPath);
+    expect(file.path, oldPath);
+    expect(file.exists, isFalse);
+    expect(newFile.path, newPath);
+    expect(newFile.exists, isTrue);
+    expect(newFile.readAsStringSync(), 'text');
+  }
+
+  test_renameSync_newExists_file() async {
+    String oldPath = '$tempPath/file.txt';
+    String newPath = '$tempPath/new-file.txt';
+    new io.File(oldPath).writeAsStringSync('text');
+    new io.File(newPath).writeAsStringSync('new text');
+    File file = PhysicalResourceProvider.INSTANCE.getResource(oldPath);
+    File newFile = file.renameSync(newPath);
+    expect(file.path, oldPath);
+    expect(file.exists, isFalse);
+    expect(newFile.path, newPath);
+    expect(newFile.exists, isTrue);
+    expect(newFile.readAsStringSync(), 'text');
+  }
+
+  void test_renameSync_newExists_folder() {
+    String oldPath = '$tempPath/file.txt';
+    String newPath = '$tempPath/foo';
+    new io.File(oldPath).writeAsStringSync('text');
+    new io.Directory(newPath).createSync();
+    File file = PhysicalResourceProvider.INSTANCE.getResource(oldPath);
+    expect(() {
+      file.renameSync(newPath);
+    }, throwsA(_isFileSystemException));
+    expect(file.path, oldPath);
+    expect(file.exists, isTrue);
+  }
+
   void test_shortName() {
     expect(file.shortName, 'file.txt');
   }
@@ -124,6 +179,14 @@
   void test_toString() {
     expect(file.toString(), path);
   }
+
+  void test_writeAsBytesSync() {
+    new io.File(path).writeAsBytesSync(<int>[1, 2]);
+    expect(file.readAsBytesSync(), <int>[1, 2]);
+    // write new bytes
+    file.writeAsBytesSync(<int>[10, 20]);
+    expect(file.readAsBytesSync(), <int>[10, 20]);
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index b7ed4b3..f032daf 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -35,7 +35,7 @@
 import '../reflective_tests.dart';
 import '../utils.dart';
 import 'parser_test.dart';
-import 'resolver_test.dart';
+import 'resolver_test_case.dart';
 import 'test_support.dart';
 
 main() {
@@ -54,6 +54,7 @@
   runReflectiveTests(ExitDetectorTest2);
   runReflectiveTests(FileBasedSourceTest);
   runReflectiveTests(FileUriResolverTest);
+  runReflectiveTests(ResolveRelativeUriTest);
   runReflectiveTests(SDKLibrariesReaderTest);
   runReflectiveTests(UriKindTest);
 }
@@ -155,6 +156,24 @@
     expect(docFile, isNotNull);
   }
 
+  void test_analysisOptions_afterContextCreation() {
+    DirectoryBasedDartSdk sdk = _createDartSdk();
+    sdk.context;
+    expect(() {
+      sdk.analysisOptions = new AnalysisOptionsImpl();
+    }, throwsStateError);
+  }
+
+  void test_analysisOptions_beforeContextCreation() {
+    DirectoryBasedDartSdk sdk = _createDartSdk();
+    sdk.analysisOptions = new AnalysisOptionsImpl();
+    sdk.context;
+    // cannot change "analysisOptions" in the context
+    expect(() {
+      sdk.context.analysisOptions = new AnalysisOptionsImpl();
+    }, throwsStateError);
+  }
+
   void test_creation() {
     DirectoryBasedDartSdk sdk = _createDartSdk();
     expect(sdk, isNotNull);
@@ -262,6 +281,20 @@
     expect(executable.isExecutable(), isTrue);
   }
 
+  void test_useSummary_afterContextCreation() {
+    DirectoryBasedDartSdk sdk = _createDartSdk();
+    sdk.context;
+    expect(() {
+      sdk.useSummary = true;
+    }, throwsStateError);
+  }
+
+  void test_useSummary_beforeContextCreation() {
+    DirectoryBasedDartSdk sdk = _createDartSdk();
+    sdk.useSummary = true;
+    sdk.context;
+  }
+
   DirectoryBasedDartSdk _createDartSdk() {
     JavaFile sdkDirectory = DirectoryBasedDartSdk.defaultSdkDirectory;
     expect(sdkDirectory, isNotNull,
@@ -563,11 +596,13 @@
     String stackParameterName = "s";
     CatchClause clause =
         AstFactory.catchClause2(exceptionParameterName, stackParameterName);
+    _setNodeSourceRange(clause, 100, 110);
     clause.accept(builder);
 
     List<LocalVariableElement> variables = holder.localVariables;
     expect(variables, hasLength(2));
-    VariableElement exceptionVariable = variables[0];
+
+    LocalVariableElement exceptionVariable = variables[0];
     expect(exceptionVariable, isNotNull);
     expect(exceptionVariable.name, exceptionParameterName);
     expect(exceptionVariable.hasImplicitType, isTrue);
@@ -575,13 +610,16 @@
     expect(exceptionVariable.isConst, isFalse);
     expect(exceptionVariable.isFinal, isFalse);
     expect(exceptionVariable.initializer, isNull);
-    VariableElement stackVariable = variables[1];
+    _assertVisibleRange(exceptionVariable, 100, 110);
+
+    LocalVariableElement stackVariable = variables[1];
     expect(stackVariable, isNotNull);
     expect(stackVariable.name, stackParameterName);
     expect(stackVariable.isSynthetic, isFalse);
     expect(stackVariable.isConst, isFalse);
     expect(stackVariable.isFinal, isFalse);
     expect(stackVariable.initializer, isNull);
+    _assertVisibleRange(stackVariable, 100, 110);
   }
 
   void test_visitCatchClause_withType() {
@@ -1480,9 +1518,7 @@
     expect(parameter.isFinal, isFalse);
     expect(parameter.isSynthetic, isFalse);
     expect(parameter.parameterKind, ParameterKind.REQUIRED);
-    SourceRange visibleRange = parameter.visibleRange;
-    expect(100, visibleRange.offset);
-    expect(110, visibleRange.end);
+    _assertVisibleRange(parameter, 100, 110);
   }
 
   void test_visitFunctionTypedFormalParameter_withTypeParameters() {
@@ -1505,9 +1541,7 @@
     expect(parameter.isSynthetic, isFalse);
     expect(parameter.parameterKind, ParameterKind.REQUIRED);
     expect(parameter.typeParameters, hasLength(1));
-    SourceRange visibleRange = parameter.visibleRange;
-    expect(100, visibleRange.offset);
-    expect(110, visibleRange.end);
+    _assertVisibleRange(parameter, 100, 110);
   }
 
   void test_visitLabeledStatement() {
@@ -2051,11 +2085,7 @@
     expect(parameter.isFinal, isFalse);
     expect(parameter.isSynthetic, isFalse);
     expect(parameter.parameterKind, ParameterKind.NAMED);
-    {
-      SourceRange visibleRange = parameter.visibleRange;
-      expect(100, visibleRange.offset);
-      expect(110, visibleRange.end);
-    }
+    _assertVisibleRange(parameter, 100, 110);
     expect(parameter.defaultValueCode, "42");
     FunctionElement initializer = parameter.initializer;
     expect(initializer, isNotNull);
@@ -2083,11 +2113,7 @@
     expect(parameter.isSynthetic, isFalse);
     expect(parameter.name, parameterName);
     expect(parameter.parameterKind, ParameterKind.REQUIRED);
-    {
-      SourceRange visibleRange = parameter.visibleRange;
-      expect(100, visibleRange.offset);
-      expect(110, visibleRange.end);
-    }
+    _assertVisibleRange(parameter, 100, 110);
   }
 
   void test_visitSimpleFormalParameter_type() {
@@ -2110,11 +2136,7 @@
     expect(parameter.isSynthetic, isFalse);
     expect(parameter.name, parameterName);
     expect(parameter.parameterKind, ParameterKind.REQUIRED);
-    {
-      SourceRange visibleRange = parameter.visibleRange;
-      expect(100, visibleRange.offset);
-      expect(110, visibleRange.end);
-    }
+    _assertVisibleRange(parameter, 100, 110);
   }
 
   void test_visitTypeAlias_minimal() {
@@ -2233,6 +2255,7 @@
         AstFactory.blockFunctionBody2([statement]));
     statement.beginToken.offset = 50;
     statement.endToken.offset = 80;
+    _setBlockBodySourceRange(constructor.body, 100, 110);
     constructor.accept(builder);
 
     List<ConstructorElement> constructors = holder.constructors;
@@ -2244,6 +2267,73 @@
     _assertHasCodeRange(variableElement, 50, 31);
     expect(variableElement.hasImplicitType, isTrue);
     expect(variableElement.name, variableName);
+    _assertVisibleRange(variableElement, 100, 110);
+  }
+
+  void test_visitVariableDeclaration_inForEachStatement() {
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = _makeBuilder(holder);
+    //
+    // m() { for (var v in []) }
+    //
+    String variableName = "v";
+    Statement statement = AstFactory.forEachStatement(
+        AstFactory.declaredIdentifier3('v'),
+        AstFactory.listLiteral(),
+        AstFactory.block());
+    _setNodeSourceRange(statement, 100, 110);
+    MethodDeclaration method = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2([statement]));
+    _setBlockBodySourceRange(method.body, 200, 220);
+    method.accept(builder);
+
+    List<MethodElement> methods = holder.methods;
+    expect(methods, hasLength(1));
+    List<LocalVariableElement> variableElements = methods[0].localVariables;
+    expect(variableElements, hasLength(1));
+    LocalVariableElement variableElement = variableElements[0];
+    expect(variableElement.name, variableName);
+    _assertVisibleRange(variableElement, 100, 110);
+  }
+
+  void test_visitVariableDeclaration_inForStatement() {
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = _makeBuilder(holder);
+    //
+    // m() { for (T v;;) }
+    //
+    String variableName = "v";
+    ForStatement statement = AstFactory.forStatement2(
+        AstFactory.variableDeclarationList(null, AstFactory.typeName4('T'),
+            [AstFactory.variableDeclaration('v')]),
+        null,
+        null,
+        AstFactory.block());
+    _setNodeSourceRange(statement, 100, 110);
+    MethodDeclaration method = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2([statement]));
+    _setBlockBodySourceRange(method.body, 200, 220);
+    method.accept(builder);
+
+    List<MethodElement> methods = holder.methods;
+    expect(methods, hasLength(1));
+    List<LocalVariableElement> variableElements = methods[0].localVariables;
+    expect(variableElements, hasLength(1));
+    LocalVariableElement variableElement = variableElements[0];
+    expect(variableElement.name, variableName);
+    _assertVisibleRange(variableElement, 100, 110);
   }
 
   void test_visitVariableDeclaration_inMethod() {
@@ -2265,6 +2355,7 @@
         AstFactory.identifier3("m"),
         AstFactory.formalParameterList(),
         AstFactory.blockFunctionBody2([statement]));
+    _setBlockBodySourceRange(method.body, 100, 110);
     method.accept(builder);
 
     List<MethodElement> methods = holder.methods;
@@ -2274,6 +2365,7 @@
     LocalVariableElement variableElement = variableElements[0];
     expect(variableElement.hasImplicitType, isFalse);
     expect(variableElement.name, variableName);
+    _assertVisibleRange(variableElement, 100, 110);
   }
 
   void test_visitVariableDeclaration_localNestedInFunction() {
@@ -2435,9 +2527,25 @@
     expect(docRange.length, expectedLength);
   }
 
+  void _assertVisibleRange(LocalElement element, int offset, int end) {
+    SourceRange visibleRange = element.visibleRange;
+    expect(visibleRange.offset, offset);
+    expect(visibleRange.end, end);
+  }
+
   ElementBuilder _makeBuilder(ElementHolder holder) =>
       new ElementBuilder(holder, new CompilationUnitElementImpl('test.dart'));
 
+  void _setBlockBodySourceRange(BlockFunctionBody body, int offset, int end) {
+    _setNodeSourceRange(body.block, offset, end);
+  }
+
+  void _setNodeSourceRange(AstNode node, int offset, int end) {
+    node.beginToken.offset = offset;
+    Token endToken = node.endToken;
+    endToken.offset = end - endToken.length;
+  }
+
   void _useParameterInMethod(
       FormalParameter formalParameter, int blockOffset, int blockEnd) {
     Block block = AstFactory.block();
@@ -3953,38 +4061,6 @@
     expect(source.exists(), isFalse);
   }
 
-  void test_resolveRelative_dart_fileName() {
-    JavaFile file = FileUtilities2.createFile("/a/b/test.dart");
-    FileBasedSource source =
-        new FileBasedSource(file, parseUriWithException("dart:test"));
-    expect(source, isNotNull);
-    Uri relative = source.resolveRelativeUri(parseUriWithException("lib.dart"));
-    expect(relative, isNotNull);
-    expect(relative.toString(), "dart:test/lib.dart");
-  }
-
-  void test_resolveRelative_dart_filePath() {
-    JavaFile file = FileUtilities2.createFile("/a/b/test.dart");
-    FileBasedSource source =
-        new FileBasedSource(file, parseUriWithException("dart:test"));
-    expect(source, isNotNull);
-    Uri relative =
-        source.resolveRelativeUri(parseUriWithException("c/lib.dart"));
-    expect(relative, isNotNull);
-    expect(relative.toString(), "dart:test/c/lib.dart");
-  }
-
-  void test_resolveRelative_dart_filePathWithParent() {
-    JavaFile file = FileUtilities2.createFile("/a/b/test.dart");
-    FileBasedSource source = new FileBasedSource(
-        file, parseUriWithException("dart:test/b/test.dart"));
-    expect(source, isNotNull);
-    Uri relative =
-        source.resolveRelativeUri(parseUriWithException("../c/lib.dart"));
-    expect(relative, isNotNull);
-    expect(relative.toString(), "dart:test/c/lib.dart");
-  }
-
   void test_resolveRelative_file_fileName() {
     if (OSUtilities.isWindows()) {
       // On Windows, the URI that is produced includes a drive letter,
@@ -3995,7 +4071,8 @@
     JavaFile file = FileUtilities2.createFile("/a/b/test.dart");
     FileBasedSource source = new FileBasedSource(file);
     expect(source, isNotNull);
-    Uri relative = source.resolveRelativeUri(parseUriWithException("lib.dart"));
+    Uri relative =
+        resolveRelativeUri(source.uri, parseUriWithException("lib.dart"));
     expect(relative, isNotNull);
     expect(relative.toString(), "file:///a/b/lib.dart");
   }
@@ -4011,7 +4088,7 @@
     FileBasedSource source = new FileBasedSource(file);
     expect(source, isNotNull);
     Uri relative =
-        source.resolveRelativeUri(parseUriWithException("c/lib.dart"));
+        resolveRelativeUri(source.uri, parseUriWithException("c/lib.dart"));
     expect(relative, isNotNull);
     expect(relative.toString(), "file:///a/b/c/lib.dart");
   }
@@ -4026,53 +4103,11 @@
     FileBasedSource source = new FileBasedSource(file);
     expect(source, isNotNull);
     Uri relative =
-        source.resolveRelativeUri(parseUriWithException("../c/lib.dart"));
+        resolveRelativeUri(source.uri, parseUriWithException("../c/lib.dart"));
     expect(relative, isNotNull);
     expect(relative.toString(), "file:///a/c/lib.dart");
   }
 
-  void test_resolveRelative_package_fileName() {
-    JavaFile file = FileUtilities2.createFile("/a/b/test.dart");
-    FileBasedSource source =
-        new FileBasedSource(file, parseUriWithException("package:b/test.dart"));
-    expect(source, isNotNull);
-    Uri relative = source.resolveRelativeUri(parseUriWithException("lib.dart"));
-    expect(relative, isNotNull);
-    expect(relative.toString(), "package:b/lib.dart");
-  }
-
-  void test_resolveRelative_package_fileNameWithoutPackageName() {
-    JavaFile file = FileUtilities2.createFile("/a/b/test.dart");
-    FileBasedSource source =
-        new FileBasedSource(file, parseUriWithException("package:test.dart"));
-    expect(source, isNotNull);
-    Uri relative = source.resolveRelativeUri(parseUriWithException("lib.dart"));
-    expect(relative, isNotNull);
-    expect(relative.toString(), "package:lib.dart");
-  }
-
-  void test_resolveRelative_package_filePath() {
-    JavaFile file = FileUtilities2.createFile("/a/b/test.dart");
-    FileBasedSource source =
-        new FileBasedSource(file, parseUriWithException("package:b/test.dart"));
-    expect(source, isNotNull);
-    Uri relative =
-        source.resolveRelativeUri(parseUriWithException("c/lib.dart"));
-    expect(relative, isNotNull);
-    expect(relative.toString(), "package:b/c/lib.dart");
-  }
-
-  void test_resolveRelative_package_filePathWithParent() {
-    JavaFile file = FileUtilities2.createFile("/a/b/test.dart");
-    FileBasedSource source = new FileBasedSource(
-        file, parseUriWithException("package:a/b/test.dart"));
-    expect(source, isNotNull);
-    Uri relative =
-        source.resolveRelativeUri(parseUriWithException("../c/lib.dart"));
-    expect(relative, isNotNull);
-    expect(relative.toString(), "package:a/c/lib.dart");
-  }
-
   void test_system() {
     JavaFile file = FileUtilities2.createFile("/does/not/exist.dart");
     FileBasedSource source =
@@ -4119,6 +4154,74 @@
 }
 
 @reflectiveTest
+class ResolveRelativeUriTest {
+  void test_resolveRelative_dart_dartUri() {
+    Uri uri = parseUriWithException('dart:foo');
+    Uri relative = resolveRelativeUri(uri, parseUriWithException('dart:bar'));
+    expect(relative, isNotNull);
+    expect(relative.toString(), 'dart:bar');
+  }
+
+  void test_resolveRelative_dart_fileName() {
+    Uri uri = parseUriWithException("dart:test");
+    Uri relative = resolveRelativeUri(uri, parseUriWithException("lib.dart"));
+    expect(relative, isNotNull);
+    expect(relative.toString(), "dart:test/lib.dart");
+  }
+
+  void test_resolveRelative_dart_filePath() {
+    Uri uri = parseUriWithException("dart:test");
+    Uri relative = resolveRelativeUri(uri, parseUriWithException("c/lib.dart"));
+    expect(relative, isNotNull);
+    expect(relative.toString(), "dart:test/c/lib.dart");
+  }
+
+  void test_resolveRelative_dart_filePathWithParent() {
+    Uri uri = parseUriWithException("dart:test/b/test.dart");
+    Uri relative =
+        resolveRelativeUri(uri, parseUriWithException("../c/lib.dart"));
+    expect(relative, isNotNull);
+    expect(relative.toString(), "dart:test/c/lib.dart");
+  }
+
+  void test_resolveRelative_package_dartUri() {
+    Uri uri = parseUriWithException('package:foo/bar.dart');
+    Uri relative = resolveRelativeUri(uri, parseUriWithException('dart:test'));
+    expect(relative, isNotNull);
+    expect(relative.toString(), 'dart:test');
+  }
+
+  void test_resolveRelative_package_fileName() {
+    Uri uri = parseUriWithException("package:b/test.dart");
+    Uri relative = resolveRelativeUri(uri, parseUriWithException("lib.dart"));
+    expect(relative, isNotNull);
+    expect(relative.toString(), "package:b/lib.dart");
+  }
+
+  void test_resolveRelative_package_fileNameWithoutPackageName() {
+    Uri uri = parseUriWithException("package:test.dart");
+    Uri relative = resolveRelativeUri(uri, parseUriWithException("lib.dart"));
+    expect(relative, isNotNull);
+    expect(relative.toString(), "package:lib.dart");
+  }
+
+  void test_resolveRelative_package_filePath() {
+    Uri uri = parseUriWithException("package:b/test.dart");
+    Uri relative = resolveRelativeUri(uri, parseUriWithException("c/lib.dart"));
+    expect(relative, isNotNull);
+    expect(relative.toString(), "package:b/c/lib.dart");
+  }
+
+  void test_resolveRelative_package_filePathWithParent() {
+    Uri uri = parseUriWithException("package:a/b/test.dart");
+    Uri relative =
+        resolveRelativeUri(uri, parseUriWithException("../c/lib.dart"));
+    expect(relative, isNotNull);
+    expect(relative.toString(), "package:a/c/lib.dart");
+  }
+}
+
+@reflectiveTest
 class SDKLibrariesReaderTest extends EngineTestCase {
   void test_readFrom_dart2js() {
     LibraryMap libraryMap = new SdkLibrariesReader(true).readFromFile(
diff --git a/pkg/analyzer/test/generated/analysis_context_factory.dart b/pkg/analyzer/test/generated/analysis_context_factory.dart
new file mode 100644
index 0000000..04560c2
--- /dev/null
+++ b/pkg/analyzer/test/generated/analysis_context_factory.dart
@@ -0,0 +1,562 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.analysis_context_factory;
+
+import 'dart:collection';
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/java_engine_io.dart';
+import 'package:analyzer/src/generated/java_io.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/generated/testing/ast_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/generated/utilities_dart.dart';
+import 'package:analyzer/src/string_source.dart';
+import 'package:unittest/unittest.dart';
+
+/**
+ * The class `AnalysisContextFactory` defines utility methods used to create analysis contexts
+ * for testing purposes.
+ */
+class AnalysisContextFactory {
+  static String _DART_MATH = "dart:math";
+
+  static String _DART_INTERCEPTORS = "dart:_interceptors";
+
+  static String _DART_JS_HELPER = "dart:_js_helper";
+
+  /**
+   * Create an analysis context that has a fake core library already resolved.
+   * Return the context that was created.
+   */
+  static InternalAnalysisContext contextWithCore() {
+    AnalysisContextForTests context = new AnalysisContextForTests();
+    return initContextWithCore(context);
+  }
+
+  /**
+   * Create an analysis context that uses the given [options] and has a fake
+   * core library already resolved. Return the context that was created.
+   */
+  static InternalAnalysisContext contextWithCoreAndOptions(
+      AnalysisOptions options) {
+    AnalysisContextForTests context = new AnalysisContextForTests();
+    context._internalSetAnalysisOptions(options);
+    return initContextWithCore(context);
+  }
+
+  static InternalAnalysisContext contextWithCoreAndPackages(
+      Map<String, String> packages) {
+    AnalysisContextForTests context = new AnalysisContextForTests();
+    return initContextWithCore(context, new TestPackageUriResolver(packages));
+  }
+
+  /**
+   * Initialize the given analysis context with a fake core library already resolved.
+   *
+   * @param context the context to be initialized (not `null`)
+   * @return the analysis context that was created
+   */
+  static InternalAnalysisContext initContextWithCore(
+      InternalAnalysisContext context,
+      [UriResolver contributedResolver]) {
+    DirectoryBasedDartSdk sdk = new _AnalysisContextFactory_initContextWithCore(
+        new JavaFile("/fake/sdk"),
+        enableAsync: context.analysisOptions.enableAsync);
+    List<UriResolver> resolvers = <UriResolver>[
+      new DartUriResolver(sdk),
+      new FileUriResolver()
+    ];
+    if (contributedResolver != null) {
+      resolvers.add(contributedResolver);
+    }
+    SourceFactory sourceFactory = new SourceFactory(resolvers);
+    context.sourceFactory = sourceFactory;
+    AnalysisContext coreContext = sdk.context;
+    (coreContext.analysisOptions as AnalysisOptionsImpl).strongMode =
+        context.analysisOptions.strongMode;
+    //
+    // dart:core
+    //
+    TestTypeProvider provider = new TestTypeProvider();
+    CompilationUnitElementImpl coreUnit =
+        new CompilationUnitElementImpl("core.dart");
+    Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
+    coreContext.setContents(coreSource, "");
+    coreUnit.librarySource = coreUnit.source = coreSource;
+    ClassElementImpl proxyClassElement = ElementFactory.classElement2("_Proxy");
+    proxyClassElement.constructors = <ConstructorElement>[
+      ElementFactory.constructorElement(proxyClassElement, '', true)
+        ..isCycleFree = true
+        ..constantInitializers = <ConstructorInitializer>[]
+    ];
+    ClassElement objectClassElement = provider.objectType.element;
+    coreUnit.types = <ClassElement>[
+      provider.boolType.element,
+      provider.deprecatedType.element,
+      provider.doubleType.element,
+      provider.functionType.element,
+      provider.intType.element,
+      provider.iterableType.element,
+      provider.iteratorType.element,
+      provider.listType.element,
+      provider.mapType.element,
+      provider.nullType.element,
+      provider.numType.element,
+      objectClassElement,
+      proxyClassElement,
+      provider.stackTraceType.element,
+      provider.stringType.element,
+      provider.symbolType.element,
+      provider.typeType.element
+    ];
+    coreUnit.functions = <FunctionElement>[
+      ElementFactory.functionElement3("identical", provider.boolType.element,
+          <ClassElement>[objectClassElement, objectClassElement], null),
+      ElementFactory.functionElement3("print", VoidTypeImpl.instance.element,
+          <ClassElement>[objectClassElement], null)
+    ];
+    TopLevelVariableElement proxyTopLevelVariableElt = ElementFactory
+        .topLevelVariableElement3("proxy", true, false, proxyClassElement.type);
+    ConstTopLevelVariableElementImpl deprecatedTopLevelVariableElt =
+        ElementFactory.topLevelVariableElement3(
+            "deprecated", true, false, provider.deprecatedType);
+    {
+      ClassElement deprecatedElement = provider.deprecatedType.element;
+      InstanceCreationExpression initializer = AstFactory
+          .instanceCreationExpression2(
+              Keyword.CONST,
+              AstFactory.typeName(deprecatedElement),
+              [AstFactory.string2('next release')]);
+      ConstructorElement constructor = deprecatedElement.constructors.single;
+      initializer.staticElement = constructor;
+      initializer.constructorName.staticElement = constructor;
+      deprecatedTopLevelVariableElt.constantInitializer = initializer;
+    }
+    coreUnit.accessors = <PropertyAccessorElement>[
+      proxyTopLevelVariableElt.getter,
+      deprecatedTopLevelVariableElt.getter
+    ];
+    coreUnit.topLevelVariables = <TopLevelVariableElement>[
+      proxyTopLevelVariableElt,
+      deprecatedTopLevelVariableElt
+    ];
+    LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode(
+        coreContext, AstFactory.libraryIdentifier2(["dart", "core"]));
+    coreLibrary.definingCompilationUnit = coreUnit;
+    //
+    // dart:async
+    //
+    Source asyncSource;
+    LibraryElementImpl asyncLibrary;
+    if (context.analysisOptions.enableAsync) {
+      asyncLibrary = new LibraryElementImpl.forNode(
+          coreContext, AstFactory.libraryIdentifier2(["dart", "async"]));
+      CompilationUnitElementImpl asyncUnit =
+          new CompilationUnitElementImpl("async.dart");
+      asyncSource = sourceFactory.forUri(DartSdk.DART_ASYNC);
+      coreContext.setContents(asyncSource, "");
+      asyncUnit.librarySource = asyncUnit.source = asyncSource;
+      asyncLibrary.definingCompilationUnit = asyncUnit;
+      // Future
+      ClassElementImpl futureElement =
+          ElementFactory.classElement2("Future", ["T"]);
+      futureElement.enclosingElement = asyncUnit;
+      //   factory Future.value([value])
+      ConstructorElementImpl futureConstructor =
+          ElementFactory.constructorElement2(futureElement, "value");
+      futureConstructor.parameters = <ParameterElement>[
+        ElementFactory.positionalParameter2("value", provider.dynamicType)
+      ];
+      futureConstructor.factory = true;
+      futureElement.constructors = <ConstructorElement>[futureConstructor];
+      //   Future then(onValue(T value), { Function onError });
+      TypeDefiningElement futureThenR = DynamicElementImpl.instance;
+      if (context.analysisOptions.strongMode) {
+        futureThenR = ElementFactory.typeParameterWithType('R');
+      }
+      FunctionElementImpl thenOnValue = ElementFactory.functionElement3(
+          'onValue', futureThenR, [futureElement.typeParameters[0]], null);
+      thenOnValue.synthetic = true;
+
+      DartType futureRType = futureElement.type.instantiate([futureThenR.type]);
+      MethodElementImpl thenMethod = ElementFactory
+          .methodElementWithParameters(futureElement, "then", futureRType, [
+        ElementFactory.requiredParameter2("onValue", thenOnValue.type),
+        ElementFactory.namedParameter2("onError", provider.functionType)
+      ]);
+      if (!futureThenR.type.isDynamic) {
+        thenMethod.typeParameters = [futureThenR];
+      }
+      thenOnValue.enclosingElement = thenMethod;
+      thenOnValue.type = new FunctionTypeImpl(thenOnValue);
+      (thenMethod.parameters[0] as ParameterElementImpl).type =
+          thenOnValue.type;
+      thenMethod.type = new FunctionTypeImpl(thenMethod);
+
+      futureElement.methods = <MethodElement>[thenMethod];
+      // Completer
+      ClassElementImpl completerElement =
+          ElementFactory.classElement2("Completer", ["T"]);
+      ConstructorElementImpl completerConstructor =
+          ElementFactory.constructorElement2(completerElement, null);
+      completerElement.constructors = <ConstructorElement>[
+        completerConstructor
+      ];
+      // StreamSubscription
+      ClassElementImpl streamSubscriptionElement =
+          ElementFactory.classElement2("StreamSubscription", ["T"]);
+      // Stream
+      ClassElementImpl streamElement =
+          ElementFactory.classElement2("Stream", ["T"]);
+      streamElement.constructors = <ConstructorElement>[
+        ElementFactory.constructorElement2(streamElement, null)
+      ];
+      DartType returnType = streamSubscriptionElement.type
+          .instantiate(streamElement.type.typeArguments);
+      FunctionElementImpl listenOnData = ElementFactory.functionElement3(
+          'onData',
+          VoidTypeImpl.instance.element,
+          <TypeDefiningElement>[streamElement.typeParameters[0]],
+          null);
+      listenOnData.synthetic = true;
+      List<DartType> parameterTypes = <DartType>[listenOnData.type,];
+      // TODO(brianwilkerson) This is missing the optional parameters.
+      MethodElementImpl listenMethod =
+          ElementFactory.methodElement('listen', returnType, parameterTypes);
+      streamElement.methods = <MethodElement>[listenMethod];
+      listenMethod.type = new FunctionTypeImpl(listenMethod);
+
+      FunctionElementImpl listenParamFunction = parameterTypes[0].element;
+      listenParamFunction.enclosingElement = listenMethod;
+      listenParamFunction.type = new FunctionTypeImpl(listenParamFunction);
+      ParameterElementImpl listenParam = listenMethod.parameters[0];
+      listenParam.type = listenParamFunction.type;
+
+      asyncUnit.types = <ClassElement>[
+        completerElement,
+        futureElement,
+        streamElement,
+        streamSubscriptionElement
+      ];
+    }
+    //
+    // dart:html
+    //
+    CompilationUnitElementImpl htmlUnit =
+        new CompilationUnitElementImpl("html_dartium.dart");
+    Source htmlSource = sourceFactory.forUri(DartSdk.DART_HTML);
+    coreContext.setContents(htmlSource, "");
+    htmlUnit.librarySource = htmlUnit.source = htmlSource;
+    ClassElementImpl elementElement = ElementFactory.classElement2("Element");
+    InterfaceType elementType = elementElement.type;
+    ClassElementImpl canvasElement =
+        ElementFactory.classElement("CanvasElement", elementType);
+    ClassElementImpl contextElement =
+        ElementFactory.classElement2("CanvasRenderingContext");
+    InterfaceType contextElementType = contextElement.type;
+    ClassElementImpl context2dElement = ElementFactory.classElement(
+        "CanvasRenderingContext2D", contextElementType);
+    canvasElement.methods = <MethodElement>[
+      ElementFactory.methodElement(
+          "getContext", contextElementType, [provider.stringType])
+    ];
+    canvasElement.accessors = <PropertyAccessorElement>[
+      ElementFactory.getterElement("context2D", false, context2dElement.type)
+    ];
+    canvasElement.fields = canvasElement.accessors
+        .map((PropertyAccessorElement accessor) => accessor.variable)
+        .toList();
+    ClassElementImpl documentElement =
+        ElementFactory.classElement("Document", elementType);
+    ClassElementImpl htmlDocumentElement =
+        ElementFactory.classElement("HtmlDocument", documentElement.type);
+    htmlDocumentElement.methods = <MethodElement>[
+      ElementFactory
+          .methodElement("query", elementType, <DartType>[provider.stringType])
+    ];
+    htmlUnit.types = <ClassElement>[
+      ElementFactory.classElement("AnchorElement", elementType),
+      ElementFactory.classElement("BodyElement", elementType),
+      ElementFactory.classElement("ButtonElement", elementType),
+      canvasElement,
+      contextElement,
+      context2dElement,
+      ElementFactory.classElement("DivElement", elementType),
+      documentElement,
+      elementElement,
+      htmlDocumentElement,
+      ElementFactory.classElement("InputElement", elementType),
+      ElementFactory.classElement("SelectElement", elementType)
+    ];
+    htmlUnit.functions = <FunctionElement>[
+      ElementFactory.functionElement3("query", elementElement,
+          <ClassElement>[provider.stringType.element], ClassElement.EMPTY_LIST)
+    ];
+    TopLevelVariableElementImpl document =
+        ElementFactory.topLevelVariableElement3(
+            "document", false, true, htmlDocumentElement.type);
+    htmlUnit.topLevelVariables = <TopLevelVariableElement>[document];
+    htmlUnit.accessors = <PropertyAccessorElement>[document.getter];
+    LibraryElementImpl htmlLibrary = new LibraryElementImpl.forNode(
+        coreContext, AstFactory.libraryIdentifier2(["dart", "dom", "html"]));
+    htmlLibrary.definingCompilationUnit = htmlUnit;
+    //
+    // dart:math
+    //
+    CompilationUnitElementImpl mathUnit =
+        new CompilationUnitElementImpl("math.dart");
+    Source mathSource = sourceFactory.forUri(_DART_MATH);
+    coreContext.setContents(mathSource, "");
+    mathUnit.librarySource = mathUnit.source = mathSource;
+    FunctionElement cosElement = ElementFactory.functionElement3(
+        "cos",
+        provider.doubleType.element,
+        <ClassElement>[provider.numType.element],
+        ClassElement.EMPTY_LIST);
+    TopLevelVariableElement ln10Element = ElementFactory
+        .topLevelVariableElement3("LN10", true, false, provider.doubleType);
+    TypeParameterElement maxT =
+        ElementFactory.typeParameterWithType('T', provider.numType);
+    FunctionElementImpl maxElement = ElementFactory.functionElement3(
+        "max", maxT, [maxT, maxT], ClassElement.EMPTY_LIST);
+    maxElement.typeParameters = [maxT];
+    maxElement.type = new FunctionTypeImpl(maxElement);
+    TopLevelVariableElement piElement = ElementFactory.topLevelVariableElement3(
+        "PI", true, false, provider.doubleType);
+    ClassElementImpl randomElement = ElementFactory.classElement2("Random");
+    randomElement.abstract = true;
+    ConstructorElementImpl randomConstructor =
+        ElementFactory.constructorElement2(randomElement, null);
+    randomConstructor.factory = true;
+    ParameterElementImpl seedParam = new ParameterElementImpl("seed", 0);
+    seedParam.parameterKind = ParameterKind.POSITIONAL;
+    seedParam.type = provider.intType;
+    randomConstructor.parameters = <ParameterElement>[seedParam];
+    randomElement.constructors = <ConstructorElement>[randomConstructor];
+    FunctionElement sinElement = ElementFactory.functionElement3(
+        "sin",
+        provider.doubleType.element,
+        <ClassElement>[provider.numType.element],
+        ClassElement.EMPTY_LIST);
+    FunctionElement sqrtElement = ElementFactory.functionElement3(
+        "sqrt",
+        provider.doubleType.element,
+        <ClassElement>[provider.numType.element],
+        ClassElement.EMPTY_LIST);
+    mathUnit.accessors = <PropertyAccessorElement>[
+      ln10Element.getter,
+      piElement.getter
+    ];
+    mathUnit.functions = <FunctionElement>[
+      cosElement,
+      maxElement,
+      sinElement,
+      sqrtElement
+    ];
+    mathUnit.topLevelVariables = <TopLevelVariableElement>[
+      ln10Element,
+      piElement
+    ];
+    mathUnit.types = <ClassElement>[randomElement];
+    LibraryElementImpl mathLibrary = new LibraryElementImpl.forNode(
+        coreContext, AstFactory.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.
+    //
+    HashMap<Source, LibraryElement> elementMap =
+        new HashMap<Source, LibraryElement>();
+    elementMap[coreSource] = coreLibrary;
+    if (asyncSource != null) {
+      elementMap[asyncSource] = asyncLibrary;
+    }
+    elementMap[htmlSource] = htmlLibrary;
+    elementMap[mathSource] = mathLibrary;
+    //
+    // Set the public and export namespaces.  We don't use exports in the fake
+    // core library so public and export namespaces are the same.
+    //
+    for (LibraryElementImpl library in elementMap.values) {
+      Namespace namespace =
+          new NamespaceBuilder().createPublicNamespaceForLibrary(library);
+      library.exportNamespace = namespace;
+      library.publicNamespace = namespace;
+    }
+    context.recordLibraryElements(elementMap);
+    // Create the synthetic element for `loadLibrary`.
+    for (LibraryElementImpl library in elementMap.values) {
+      library.createLoadLibraryFunction(context.typeProvider);
+    }
+    return context;
+  }
+}
+
+/**
+ * An analysis context that has a fake SDK that is much smaller and faster for
+ * testing purposes.
+ */
+class AnalysisContextForTests extends AnalysisContextImpl {
+  @override
+  void set analysisOptions(AnalysisOptions options) {
+    AnalysisOptions currentOptions = analysisOptions;
+    bool needsRecompute = currentOptions.analyzeFunctionBodiesPredicate !=
+            options.analyzeFunctionBodiesPredicate ||
+        currentOptions.generateImplicitErrors !=
+            options.generateImplicitErrors ||
+        currentOptions.generateSdkErrors != options.generateSdkErrors ||
+        currentOptions.dart2jsHint != options.dart2jsHint ||
+        (currentOptions.hint && !options.hint) ||
+        currentOptions.preserveComments != options.preserveComments ||
+        currentOptions.enableStrictCallChecks != options.enableStrictCallChecks;
+    if (needsRecompute) {
+      fail(
+          "Cannot set options that cause the sources to be reanalyzed in a test context");
+    }
+    super.analysisOptions = options;
+  }
+
+  @override
+  bool exists(Source source) =>
+      super.exists(source) || sourceFactory.dartSdk.context.exists(source);
+
+  @override
+  TimestampedData<String> getContents(Source source) {
+    if (source.isInSystemLibrary) {
+      return sourceFactory.dartSdk.context.getContents(source);
+    }
+    return super.getContents(source);
+  }
+
+  @override
+  int getModificationStamp(Source source) {
+    if (source.isInSystemLibrary) {
+      return sourceFactory.dartSdk.context.getModificationStamp(source);
+    }
+    return super.getModificationStamp(source);
+  }
+
+  /**
+   * Set the analysis options, even if they would force re-analysis. This method should only be
+   * invoked before the fake SDK is initialized.
+   *
+   * @param options the analysis options to be set
+   */
+  void _internalSetAnalysisOptions(AnalysisOptions options) {
+    super.analysisOptions = options;
+  }
+}
+
+/**
+ * Helper for creating and managing single [AnalysisContext].
+ */
+class AnalysisContextHelper {
+  AnalysisContext context;
+
+  /**
+   * Creates new [AnalysisContext] using [AnalysisContextFactory].
+   */
+  AnalysisContextHelper([AnalysisOptionsImpl options]) {
+    if (options == null) {
+      options = new AnalysisOptionsImpl();
+    }
+    options.cacheSize = 256;
+    context = AnalysisContextFactory.contextWithCoreAndOptions(options);
+  }
+
+  Source addSource(String path, String code) {
+    Source source = new FileBasedSource(FileUtilities2.createFile(path));
+    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<Uri, Source> sourceMap = new HashMap<Uri, Source>();
+
+  TestPackageUriResolver(Map<String, String> map) {
+    map.forEach((String uri, String contents) {
+      sourceMap[Uri.parse(uri)] =
+          new StringSource(contents, '/test_pkg_source.dart');
+    });
+  }
+
+  @override
+  Source resolveAbsolute(Uri uri, [Uri actualUri]) => sourceMap[uri];
+
+  @override
+  Uri restoreAbsolute(Source source) => throw new UnimplementedError();
+}
+
+class _AnalysisContextFactory_initContextWithCore
+    extends DirectoryBasedDartSdk {
+  final bool enableAsync;
+  _AnalysisContextFactory_initContextWithCore(JavaFile arg0,
+      {this.enableAsync: true})
+      : super(arg0);
+
+  @override
+  LibraryMap initialLibraryMap(bool useDart2jsPaths) {
+    LibraryMap map = new LibraryMap();
+    if (enableAsync) {
+      _addLibrary(map, DartSdk.DART_ASYNC, false, "async.dart");
+    }
+    _addLibrary(map, DartSdk.DART_CORE, false, "core.dart");
+    _addLibrary(map, DartSdk.DART_HTML, false, "html_dartium.dart");
+    _addLibrary(map, AnalysisContextFactory._DART_MATH, false, "math.dart");
+    _addLibrary(map, AnalysisContextFactory._DART_INTERCEPTORS, true,
+        "_interceptors.dart");
+    _addLibrary(
+        map, AnalysisContextFactory._DART_JS_HELPER, true, "_js_helper.dart");
+    return map;
+  }
+
+  void _addLibrary(LibraryMap map, String uri, bool isInternal, String path) {
+    SdkLibraryImpl library = new SdkLibraryImpl(uri);
+    if (isInternal) {
+      library.category = "Internal";
+    }
+    library.path = path;
+    map.setLibrary(uri, library);
+  }
+}
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..e3eaeaf
--- /dev/null
+++ b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
@@ -0,0 +1,619 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.checked_mode_compile_time_error_code_test;
+
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+
+import '../reflective_tests.dart';
+import '../utils.dart';
+import 'resolver_test_case.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(CheckedModeCompileTimeErrorCodeTest);
+}
+
+@reflectiveTest
+class CheckedModeCompileTimeErrorCodeTest extends ResolverTestCase {
+  void test_fieldFormalParameterAssignableToField_extends() {
+    // 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());''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() {
+    // 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);''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_implements() {
+    // 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());''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_list_dynamic() {
+    // [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]);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_list_nonDynamic() {
+    // <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]);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_map_dynamic() {
+    // {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});''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_map_keyDifferent() {
+    // <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});''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_map_valueDifferent() {
+    // <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});''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_notype() {
+    // 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);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_null() {
+    // Null is assignable to anything.
+    Source source = addSource(r'''
+class A {
+  final int x;
+  const A(this.x);
+}
+var v = const A(null);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_typedef() {
+    // foo has the runtime type dynamic -> dynamic, so it should be 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);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterAssignableToField_typeSubstitution() {
+    // 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);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField() {
+    Source source = addSource(r'''
+class A {
+  final int x;
+  const A(this.x);
+}
+var v = const A('foo');''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_extends() {
+    // 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);
+}
+var v = const C(const A());''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_fieldType() {
+    Source source = addSource(r'''
+class A {
+  final int x;
+  const A(String this.x);
+}
+var v = const A('foo');''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() {
+    Source source = addSource(r'''
+class A {
+  final Unresolved x;
+  const A(String this.x);
+}
+var v = const A('foo');''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.UNDEFINED_CLASS
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_implements() {
+    // 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);
+}
+var v = const C(const A());''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_list() {
+    // <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);
+}
+var x = const A(const <num>[1, 2, 3]);''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_map_keyMismatch() {
+    // <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);
+}
+var x = const A(const <num, int>{1: 2});''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_map_valueMismatch() {
+    // <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);
+}
+var x = const A(const <int, num>{1: 2});''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_optional() {
+    Source source = addSource(r'''
+class A {
+  final int x;
+  const A([this.x = 'foo']);
+}
+var v = const A();''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticTypeWarningCode.INVALID_ASSIGNMENT
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameterNotAssignableToField_typedef() {
+    // 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);''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldInitializerNotAssignable() {
+    Source source = addSource(r'''
+class A {
+  final int x;
+  const A() : x = '';
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
+      StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldTypeMismatch() {
+    Source source = addSource(r'''
+class A {
+  const A(x) : y = x;
+  final int y;
+}
+var v = const A('foo');''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldTypeMismatch_generic() {
+    Source source = addSource(r'''
+class C<T> {
+  final T x = y;
+  const C();
+}
+const int y = 1;
+var v = const C<String>();
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+      StaticTypeWarningCode.INVALID_ASSIGNMENT
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldTypeMismatch_unresolved() {
+    Source source = addSource(r'''
+class A {
+  const A(x) : y = x;
+  final Unresolved y;
+}
+var v = const A('foo');''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+      StaticWarningCode.UNDEFINED_CLASS
+    ]);
+    verify([source]);
+  }
+
+  void test_fieldTypeOk_generic() {
+    Source source = addSource(r'''
+class C<T> {
+  final T x = y;
+  const C();
+}
+const int y = 1;
+var v = const C<int>();
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+    verify([source]);
+  }
+
+  void test_fieldTypeOk_null() {
+    Source source = addSource(r'''
+class A {
+  const A(x) : y = x;
+  final int y;
+}
+var v = const A(null);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldTypeOk_unresolved_null() {
+    // 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);''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
+    verify([source]);
+  }
+
+  void test_listElementTypeNotAssignable() {
+    Source source = addSource("var v = const <String> [42];");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
+      StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_mapKeyTypeNotAssignable() {
+    Source source = addSource("var v = const <String, int > {1 : 2};");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+      StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_mapValueTypeNotAssignable() {
+    Source source = addSource("var v = const <String, String> {'a' : 2};");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+      StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_parameterAssignable_null() {
+    // Null is assignable to anything.
+    Source source = addSource(r'''
+class A {
+  const A(int x);
+}
+var v = const A(null);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_parameterAssignable_typeSubstitution() {
+    Source source = addSource(r'''
+class A<T> {
+  const A(T x);
+}
+var v = const A<int>(3);''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_parameterAssignable_undefined_null() {
+    // 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);''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
+    verify([source]);
+  }
+
+  void test_parameterNotAssignable() {
+    Source source = addSource(r'''
+class A {
+  const A(int x);
+}
+var v = const A('foo');''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_parameterNotAssignable_typeSubstitution() {
+    Source source = addSource(r'''
+class A<T> {
+  const A(T x);
+}
+var v = const A<int>('foo');''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  void test_parameterNotAssignable_undefined() {
+    Source source = addSource(r'''
+class A {
+  const A(Unresolved x);
+}
+var v = const A('foo');''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.UNDEFINED_CLASS
+    ]);
+    verify([source]);
+  }
+
+  void test_redirectingConstructor_paramTypeMismatch() {
+    Source source = addSource(r'''
+class A {
+  const A.a1(x) : this.a2(x);
+  const A.a2(String x);
+}
+var v = const A.a1(0);''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+    ]);
+    verify([source]);
+  }
+
+  void test_topLevelVarAssignable_null() {
+    Source source = addSource("const int x = null;");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_topLevelVarAssignable_undefined_null() {
+    // Null always passes runtime type checks, even when the type is
+    // unresolved.
+    Source source = addSource("const Unresolved x = null;");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
+    verify([source]);
+  }
+
+  void test_topLevelVarNotAssignable() {
+    Source source = addSource("const int x = 'foo';");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
+      StaticTypeWarningCode.INVALID_ASSIGNMENT
+    ]);
+    verify([source]);
+  }
+
+  void test_topLevelVarNotAssignable_undefined() {
+    Source source = addSource("const Unresolved x = 'foo';");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
+      StaticWarningCode.UNDEFINED_CLASS
+    ]);
+    verify([source]);
+  }
+}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 09485aa..34dd9b9 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -4,6 +4,7 @@
 
 library analyzer.test.generated.compile_time_error_code_test;
 
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/source_io.dart';
@@ -11,8 +12,7 @@
 
 import '../reflective_tests.dart';
 import '../utils.dart';
-import 'resolver_test.dart';
-import 'package:analyzer/src/generated/engine.dart';
+import 'resolver_test_case.dart';
 
 main() {
   initializeTestEnvironment();
@@ -5478,6 +5478,22 @@
     verify([source]);
   }
 
+  void test_recursiveInterfaceInheritanceBaseCaseExtends_abstract() {
+    Source source = addSource(r'''
+class C extends C {
+  var bar = 0;
+  m();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS,
+      StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
+      StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
+    ]);
+    verify([source]);
+  }
+
   void test_recursiveInterfaceInheritanceBaseCaseImplements() {
     Source source = addSource("class A implements A {}");
     computeLibrarySourceErrors(source);
@@ -6045,6 +6061,21 @@
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
+  void test_uriDoesNotExist_import_appears_after_deleting_target() {
+    Source test = addSource("import 'target.dart';");
+    Source target = addNamedSource("/target.dart", "");
+    computeLibrarySourceErrors(test);
+    assertErrors(test, [HintCode.UNUSED_IMPORT]);
+
+    // Remove the overlay in the same way as AnalysisServer.
+    analysisContext2.setContents(target, null);
+    ChangeSet changeSet = new ChangeSet()..removedSource(target);
+    analysisContext2.applyChanges(changeSet);
+
+    computeLibrarySourceErrors(test);
+    assertErrors(test, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+  }
+
   void test_uriDoesNotExist_import_disappears_when_fixed() {
     Source source = addSource("import 'target.dart';");
     computeLibrarySourceErrors(source);
@@ -6065,21 +6096,6 @@
     assertErrors(source, [HintCode.UNUSED_IMPORT]);
   }
 
-  void test_uriDoesNotExist_import_appears_after_deleting_target() {
-    Source test = addSource("import 'target.dart';");
-    Source target = addNamedSource("/target.dart", "");
-    computeLibrarySourceErrors(test);
-    assertErrors(test, [HintCode.UNUSED_IMPORT]);
-
-    // Remove the overlay in the same way as AnalysisServer.
-    analysisContext2.setContents(target, null);
-    ChangeSet changeSet = new ChangeSet()..removedSource(target);
-    analysisContext2.applyChanges(changeSet);
-
-    computeLibrarySourceErrors(test);
-    assertErrors(test, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
-  }
-
   void test_uriDoesNotExist_part() {
     Source source = addSource(r'''
 library lib;
diff --git a/pkg/analyzer/test/generated/constant_test.dart b/pkg/analyzer/test/generated/constant_test.dart
index bb9ba02..ac35f08 100644
--- a/pkg/analyzer/test/generated/constant_test.dart
+++ b/pkg/analyzer/test/generated/constant_test.dart
@@ -5,96 +5,21 @@
 library analyzer.test.constant_test;
 
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/ast/token.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/error.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_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/generated/utilities_collection.dart';
-import 'package:analyzer/src/task/dart.dart';
-import 'package:path/path.dart';
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
 import '../utils.dart';
-import 'engine_test.dart';
-import 'resolver_test.dart';
+import 'resolver_test_case.dart';
 import 'test_support.dart';
 
 main() {
   initializeTestEnvironment();
   runReflectiveTests(ConstantEvaluatorTest);
-  runReflectiveTests(ConstantFinderTest);
-  runReflectiveTests(ConstantValueComputerTest);
-  runReflectiveTests(ConstantVisitorTest);
-  runReflectiveTests(DartObjectImplTest);
-  runReflectiveTests(DeclaredVariablesTest);
-  runReflectiveTests(ReferenceFinderTest);
-}
-
-const int LONG_MAX_VALUE = 0x7fffffffffffffff;
-
-/**
- * Implementation of [ConstantEvaluationValidator] used during unit tests;
- * verifies that any nodes referenced during constant evaluation are present in
- * the dependency graph.
- */
-class ConstantEvaluationValidator_ForTest
-    implements ConstantEvaluationValidator {
-  final InternalAnalysisContext context;
-  ConstantValueComputer computer;
-  ConstantEvaluationTarget _nodeBeingEvaluated;
-
-  ConstantEvaluationValidator_ForTest(this.context);
-
-  @override
-  void beforeComputeValue(ConstantEvaluationTarget constant) {
-    _nodeBeingEvaluated = constant;
-  }
-
-  @override
-  void beforeGetConstantInitializers(ConstructorElement constructor) =>
-      _checkPathTo(constructor);
-
-  @override
-  void beforeGetEvaluationResult(ConstantEvaluationTarget constant) =>
-      _checkPathTo(constant);
-
-  @override
-  void beforeGetFieldEvaluationResult(FieldElementImpl field) =>
-      _checkPathTo(field);
-
-  @override
-  void beforeGetParameterDefault(ParameterElement parameter) =>
-      _checkPathTo(parameter);
-
-  void _checkPathTo(ConstantEvaluationTarget target) {
-    if (computer.referenceGraph.containsPath(_nodeBeingEvaluated, target)) {
-      return; // pass
-    }
-    // print a nice error message on failure
-    StringBuffer out = new StringBuffer();
-    out.writeln("missing path in constant dependency graph");
-    out.writeln("from $_nodeBeingEvaluated to $target");
-    for (var s in context.analysisCache.sources) {
-      String text = context.getContents(s).data;
-      if (text != "") {
-        out.writeln('''
-=== ${s.shortName}
-$text''');
-      }
-    }
-    fail(out.toString());
-  }
 }
 
 @reflectiveTest
@@ -482,4060 +407,3 @@
     return evaluator.evaluate(variables[0].initializer);
   }
 }
-
-@reflectiveTest
-class ConstantFinderTest {
-  AstNode _node;
-  TypeProvider _typeProvider;
-  AnalysisContext _context;
-  Source _source;
-
-  void setUp() {
-    _typeProvider = new TestTypeProvider();
-    _context = new _TestAnalysisContext();
-    _source = new TestSource();
-  }
-
-  /**
-   * Test an annotation that consists solely of an identifier (and hence
-   * represents a reference to a compile-time constant variable).
-   */
-  void test_visitAnnotation_constantVariable() {
-    CompilationUnitElement compilationUnitElement =
-        ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
-    ElementFactory.library(_context, 'L').definingCompilationUnit =
-        compilationUnitElement;
-    ElementAnnotationImpl elementAnnotation =
-        new ElementAnnotationImpl(compilationUnitElement);
-    _node = elementAnnotation.annotationAst = AstFactory.annotation(
-        AstFactory.identifier3('x'))..elementAnnotation = elementAnnotation;
-    expect(_findAnnotations(), contains(_node));
-  }
-
-  /**
-   * Test an annotation that represents the invocation of a constant
-   * constructor.
-   */
-  void test_visitAnnotation_invocation() {
-    CompilationUnitElement compilationUnitElement =
-        ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
-    ElementFactory.library(_context, 'L').definingCompilationUnit =
-        compilationUnitElement;
-    ElementAnnotationImpl elementAnnotation =
-        new ElementAnnotationImpl(compilationUnitElement);
-    _node = elementAnnotation.annotationAst = AstFactory.annotation2(
-        AstFactory.identifier3('A'), null, AstFactory.argumentList())
-      ..elementAnnotation = elementAnnotation;
-    expect(_findAnnotations(), contains(_node));
-  }
-
-  void test_visitAnnotation_partOf() {
-    // Analyzer ignores annotations on "part of" directives.
-    Annotation annotation = AstFactory.annotation2(
-        AstFactory.identifier3('A'), null, AstFactory.argumentList());
-    _node = AstFactory.partOfDirective2(
-        <Annotation>[annotation], AstFactory.libraryIdentifier2(<String>['L']));
-    expect(_findConstants(), isEmpty);
-  }
-
-  void test_visitConstructorDeclaration_const() {
-    ConstructorElement element = _setupConstructorDeclaration("A", true);
-    expect(_findConstants(), contains(element));
-  }
-
-  void test_visitConstructorDeclaration_nonConst() {
-    _setupConstructorDeclaration("A", false);
-    expect(_findConstants(), isEmpty);
-  }
-
-  void test_visitVariableDeclaration_const() {
-    VariableElement element = _setupVariableDeclaration("v", true, true);
-    expect(_findConstants(), contains(element));
-  }
-
-  void test_visitVariableDeclaration_final_inClass() {
-    _setupFieldDeclaration('C', 'f', Keyword.FINAL);
-    expect(_findConstants(), isEmpty);
-  }
-
-  void test_visitVariableDeclaration_final_inClassWithConstConstructor() {
-    VariableDeclaration field = _setupFieldDeclaration('C', 'f', Keyword.FINAL,
-        hasConstConstructor: true);
-    expect(_findConstants(), contains(field.element));
-  }
-
-  void test_visitVariableDeclaration_final_outsideClass() {
-    _setupVariableDeclaration('v', false, true, isFinal: true);
-    expect(_findConstants(), isEmpty);
-  }
-
-  void test_visitVariableDeclaration_noInitializer() {
-    _setupVariableDeclaration("v", true, false);
-    expect(_findConstants(), isEmpty);
-  }
-
-  void test_visitVariableDeclaration_nonConst() {
-    _setupVariableDeclaration("v", false, true);
-    expect(_findConstants(), isEmpty);
-  }
-
-  void test_visitVariableDeclaration_static_const_inClass() {
-    VariableDeclaration field =
-        _setupFieldDeclaration('C', 'f', Keyword.CONST, isStatic: true);
-    expect(_findConstants(), contains(field.element));
-  }
-
-  void
-      test_visitVariableDeclaration_static_const_inClassWithConstConstructor() {
-    VariableDeclaration field = _setupFieldDeclaration('C', 'f', Keyword.CONST,
-        isStatic: true, hasConstConstructor: true);
-    expect(_findConstants(), contains(field.element));
-  }
-
-  void
-      test_visitVariableDeclaration_static_final_inClassWithConstConstructor() {
-    VariableDeclaration field = _setupFieldDeclaration('C', 'f', Keyword.FINAL,
-        isStatic: true, hasConstConstructor: true);
-    expect(_findConstants(), isNot(contains(field.element)));
-  }
-
-  void
-      test_visitVariableDeclaration_uninitialized_final_inClassWithConstConstructor() {
-    VariableDeclaration field = _setupFieldDeclaration('C', 'f', Keyword.FINAL,
-        isInitialized: false, hasConstConstructor: true);
-    expect(_findConstants(), isNot(contains(field.element)));
-  }
-
-  void test_visitVariableDeclaration_uninitialized_static_const_inClass() {
-    _setupFieldDeclaration('C', 'f', Keyword.CONST,
-        isStatic: true, isInitialized: false);
-    expect(_findConstants(), isEmpty);
-  }
-
-  List<Annotation> _findAnnotations() {
-    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);
-      }
-    }
-    return new List<Annotation>.from(annotations);
-  }
-
-  List<ConstantEvaluationTarget> _findConstants() {
-    ConstantFinder finder = new ConstantFinder(_context, _source, _source);
-    _node.accept(finder);
-    List<ConstantEvaluationTarget> constants = finder.constantsToCompute;
-    expect(constants, isNotNull);
-    return constants;
-  }
-
-  ConstructorElement _setupConstructorDeclaration(String name, bool isConst) {
-    Keyword constKeyword = isConst ? Keyword.CONST : null;
-    ConstructorDeclaration constructorDeclaration =
-        AstFactory.constructorDeclaration2(
-            constKeyword,
-            null,
-            null,
-            name,
-            AstFactory.formalParameterList(),
-            null,
-            AstFactory.blockFunctionBody2());
-    ClassElement classElement = ElementFactory.classElement2(name);
-    ConstructorElement element =
-        ElementFactory.constructorElement(classElement, name, isConst);
-    constructorDeclaration.element = element;
-    _node = constructorDeclaration;
-    return element;
-  }
-
-  VariableDeclaration _setupFieldDeclaration(
-      String className, String fieldName, Keyword keyword,
-      {bool isInitialized: true,
-      bool isStatic: false,
-      bool hasConstConstructor: false}) {
-    VariableDeclaration variableDeclaration = isInitialized
-        ? AstFactory.variableDeclaration2(fieldName, AstFactory.integer(0))
-        : AstFactory.variableDeclaration(fieldName);
-    VariableElement fieldElement = ElementFactory.fieldElement(
-        fieldName,
-        isStatic,
-        keyword == Keyword.FINAL,
-        keyword == Keyword.CONST,
-        _typeProvider.intType);
-    variableDeclaration.name.staticElement = fieldElement;
-    FieldDeclaration fieldDeclaration = AstFactory.fieldDeclaration2(
-        isStatic, keyword, <VariableDeclaration>[variableDeclaration]);
-    ClassDeclaration classDeclaration =
-        AstFactory.classDeclaration(null, className, null, null, null, null);
-    classDeclaration.members.add(fieldDeclaration);
-    _node = classDeclaration;
-    ClassElementImpl classElement = ElementFactory.classElement2(className);
-    classElement.fields = <FieldElement>[fieldElement];
-    classDeclaration.name.staticElement = classElement;
-    if (hasConstConstructor) {
-      ConstructorDeclaration constructorDeclaration =
-          AstFactory.constructorDeclaration2(
-              Keyword.CONST,
-              null,
-              AstFactory.identifier3(className),
-              null,
-              AstFactory.formalParameterList(),
-              null,
-              AstFactory.blockFunctionBody2());
-      classDeclaration.members.add(constructorDeclaration);
-      ConstructorElement constructorElement =
-          ElementFactory.constructorElement(classElement, '', true);
-      constructorDeclaration.element = constructorElement;
-      classElement.constructors = <ConstructorElement>[constructorElement];
-    } else {
-      classElement.constructors = ConstructorElement.EMPTY_LIST;
-    }
-    return variableDeclaration;
-  }
-
-  VariableElement _setupVariableDeclaration(
-      String name, bool isConst, bool isInitialized,
-      {isFinal: false}) {
-    VariableDeclaration variableDeclaration = isInitialized
-        ? AstFactory.variableDeclaration2(name, AstFactory.integer(0))
-        : AstFactory.variableDeclaration(name);
-    SimpleIdentifier identifier = variableDeclaration.name;
-    VariableElement element = ElementFactory.localVariableElement(identifier);
-    identifier.staticElement = element;
-    Keyword keyword = isConst ? Keyword.CONST : isFinal ? Keyword.FINAL : null;
-    AstFactory.variableDeclarationList2(keyword, [variableDeclaration]);
-    _node = variableDeclaration;
-    return element;
-  }
-}
-
-@reflectiveTest
-class ConstantValueComputerTest extends ResolverTestCase {
-  void test_annotation_constConstructor() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A {
-  final int i;
-  const A(this.i);
-}
-
-class C {
-  @A(5)
-  f() {}
-}
-''');
-    EvaluationResultImpl result =
-        _evaluateAnnotation(compilationUnit, "C", "f");
-    Map<String, DartObjectImpl> annotationFields = _assertType(result, 'A');
-    _assertIntField(annotationFields, 'i', 5);
-  }
-
-  void test_annotation_constConstructor_named() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A {
-  final int i;
-  const A.named(this.i);
-}
-
-class C {
-  @A.named(5)
-  f() {}
-}
-''');
-    EvaluationResultImpl result =
-        _evaluateAnnotation(compilationUnit, "C", "f");
-    Map<String, DartObjectImpl> annotationFields = _assertType(result, 'A');
-    _assertIntField(annotationFields, 'i', 5);
-  }
-
-  void test_annotation_constConstructor_noArgs() {
-    // Failing to pass arguments to an annotation which is a constant
-    // constructor is illegal, but shouldn't crash analysis.
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A {
-  final int i;
-  const A(this.i);
-}
-
-class C {
-  @A
-  f() {}
-}
-''');
-    _evaluateAnnotation(compilationUnit, "C", "f");
-  }
-
-  void test_annotation_constConstructor_noArgs_named() {
-    // Failing to pass arguments to an annotation which is a constant
-    // constructor is illegal, but shouldn't crash analysis.
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A {
-  final int i;
-  const A.named(this.i);
-}
-
-class C {
-  @A.named
-  f() {}
-}
-''');
-    _evaluateAnnotation(compilationUnit, "C", "f");
-  }
-
-  void test_annotation_nonConstConstructor() {
-    // Calling a non-const constructor from an annotation that is illegal, but
-    // shouldn't crash analysis.
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A {
-  final int i;
-  A(this.i);
-}
-
-class C {
-  @A(5)
-  f() {}
-}
-''');
-    _evaluateAnnotation(compilationUnit, "C", "f");
-  }
-
-  void test_annotation_staticConst() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-class C {
-  static const int i = 5;
-
-  @i
-  f() {}
-}
-''');
-    EvaluationResultImpl result =
-        _evaluateAnnotation(compilationUnit, "C", "f");
-    expect(_assertValidInt(result), 5);
-  }
-
-  void test_annotation_staticConst_args() {
-    // Applying arguments to an annotation that is a static const is
-    // illegal, but shouldn't crash analysis.
-    CompilationUnit compilationUnit = resolveSource(r'''
-class C {
-  static const int i = 5;
-
-  @i(1)
-  f() {}
-}
-''');
-    _evaluateAnnotation(compilationUnit, "C", "f");
-  }
-
-  void test_annotation_staticConst_otherClass() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A {
-  static const int i = 5;
-}
-
-class C {
-  @A.i
-  f() {}
-}
-''');
-    EvaluationResultImpl result =
-        _evaluateAnnotation(compilationUnit, "C", "f");
-    expect(_assertValidInt(result), 5);
-  }
-
-  void test_annotation_staticConst_otherClass_args() {
-    // Applying arguments to an annotation that is a static const is
-    // illegal, but shouldn't crash analysis.
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A {
-  static const int i = 5;
-}
-
-class C {
-  @A.i(1)
-  f() {}
-}
-''');
-    _evaluateAnnotation(compilationUnit, "C", "f");
-  }
-
-  void test_annotation_topLevelVariable() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const int i = 5;
-class C {
-  @i
-  f() {}
-}
-''');
-    EvaluationResultImpl result =
-        _evaluateAnnotation(compilationUnit, "C", "f");
-    expect(_assertValidInt(result), 5);
-  }
-
-  void test_annotation_topLevelVariable_args() {
-    // Applying arguments to an annotation that is a top-level variable is
-    // illegal, but shouldn't crash analysis.
-    CompilationUnit compilationUnit = resolveSource(r'''
-const int i = 5;
-class C {
-  @i(1)
-  f() {}
-}
-''');
-    _evaluateAnnotation(compilationUnit, "C", "f");
-  }
-
-  void test_computeValues_cycle() {
-    TestLogger logger = new TestLogger();
-    AnalysisEngine.instance.logger = logger;
-    try {
-      Source source = addSource(r'''
-  const int a = c;
-  const int b = a;
-  const int c = b;''');
-      LibraryElement libraryElement = resolve2(source);
-      CompilationUnit unit =
-          analysisContext.resolveCompilationUnit(source, libraryElement);
-      analysisContext.computeErrors(source);
-      expect(unit, isNotNull);
-      ConstantValueComputer computer = _makeConstantValueComputer();
-      computer.add(unit, source, source);
-      computer.computeValues();
-      NodeList<CompilationUnitMember> members = unit.declarations;
-      expect(members, hasLength(3));
-      _validate(false, (members[0] as TopLevelVariableDeclaration).variables);
-      _validate(false, (members[1] as TopLevelVariableDeclaration).variables);
-      _validate(false, (members[2] as TopLevelVariableDeclaration).variables);
-    } finally {
-      AnalysisEngine.instance.logger = Logger.NULL;
-    }
-  }
-
-  void test_computeValues_dependentVariables() {
-    Source source = addSource(r'''
-const int b = a;
-const int a = 0;''');
-    LibraryElement libraryElement = resolve2(source);
-    CompilationUnit unit =
-        analysisContext.resolveCompilationUnit(source, libraryElement);
-    expect(unit, isNotNull);
-    ConstantValueComputer computer = _makeConstantValueComputer();
-    computer.add(unit, source, source);
-    computer.computeValues();
-    NodeList<CompilationUnitMember> members = unit.declarations;
-    expect(members, hasLength(2));
-    _validate(true, (members[0] as TopLevelVariableDeclaration).variables);
-    _validate(true, (members[1] as TopLevelVariableDeclaration).variables);
-  }
-
-  void test_computeValues_empty() {
-    ConstantValueComputer computer = _makeConstantValueComputer();
-    computer.computeValues();
-  }
-
-  void test_computeValues_multipleSources() {
-    Source librarySource = addNamedSource(
-        "/lib.dart",
-        r'''
-library lib;
-part 'part.dart';
-const int c = b;
-const int a = 0;''');
-    Source partSource = addNamedSource(
-        "/part.dart",
-        r'''
-part of lib;
-const int b = a;
-const int d = c;''');
-    LibraryElement libraryElement = resolve2(librarySource);
-    CompilationUnit libraryUnit =
-        analysisContext.resolveCompilationUnit(librarySource, libraryElement);
-    expect(libraryUnit, isNotNull);
-    CompilationUnit partUnit =
-        analysisContext.resolveCompilationUnit(partSource, libraryElement);
-    expect(partUnit, isNotNull);
-    ConstantValueComputer computer = _makeConstantValueComputer();
-    computer.add(libraryUnit, librarySource, librarySource);
-    computer.add(partUnit, partSource, librarySource);
-    computer.computeValues();
-    NodeList<CompilationUnitMember> libraryMembers = libraryUnit.declarations;
-    expect(libraryMembers, hasLength(2));
-    _validate(
-        true, (libraryMembers[0] as TopLevelVariableDeclaration).variables);
-    _validate(
-        true, (libraryMembers[1] as TopLevelVariableDeclaration).variables);
-    NodeList<CompilationUnitMember> partMembers = libraryUnit.declarations;
-    expect(partMembers, hasLength(2));
-    _validate(true, (partMembers[0] as TopLevelVariableDeclaration).variables);
-    _validate(true, (partMembers[1] as TopLevelVariableDeclaration).variables);
-  }
-
-  void test_computeValues_singleVariable() {
-    Source source = addSource("const int a = 0;");
-    LibraryElement libraryElement = resolve2(source);
-    CompilationUnit unit =
-        analysisContext.resolveCompilationUnit(source, libraryElement);
-    expect(unit, isNotNull);
-    ConstantValueComputer computer = _makeConstantValueComputer();
-    computer.add(unit, source, source);
-    computer.computeValues();
-    NodeList<CompilationUnitMember> members = unit.declarations;
-    expect(members, hasLength(1));
-    _validate(true, (members[0] as TopLevelVariableDeclaration).variables);
-  }
-
-  void test_computeValues_value_depends_on_enum() {
-    Source source = addSource('''
-enum E { id0, id1 }
-const E e = E.id0;
-''');
-    LibraryElement libraryElement = resolve2(source);
-    CompilationUnit unit =
-        analysisContext.resolveCompilationUnit(source, libraryElement);
-    expect(unit, isNotNull);
-    ConstantValueComputer computer = _makeConstantValueComputer();
-    computer.add(unit, source, source);
-    computer.computeValues();
-    TopLevelVariableDeclaration declaration = unit.declarations
-        .firstWhere((member) => member is TopLevelVariableDeclaration);
-    _validate(true, declaration.variables);
-  }
-
-  void test_dependencyOnConstructor() {
-    // x depends on "const A()"
-    _assertProperDependencies(r'''
-class A {
-  const A();
-}
-const x = const A();''');
-  }
-
-  void test_dependencyOnConstructorArgument() {
-    // "const A(x)" depends on x
-    _assertProperDependencies(r'''
-class A {
-  const A(this.next);
-  final A next;
-}
-const A x = const A(null);
-const A y = const A(x);''');
-  }
-
-  void test_dependencyOnConstructorArgument_unresolvedConstructor() {
-    // "const A.a(x)" depends on x even if the constructor A.a can't be found.
-    _assertProperDependencies(
-        r'''
-class A {
-}
-const int x = 1;
-const A y = const A.a(x);''',
-        [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR]);
-  }
-
-  void test_dependencyOnConstructorInitializer() {
-    // "const A()" depends on x
-    _assertProperDependencies(r'''
-const int x = 1;
-class A {
-  const A() : v = x;
-  final int v;
-}''');
-  }
-
-  void test_dependencyOnExplicitSuperConstructor() {
-    // b depends on B() depends on A()
-    _assertProperDependencies(r'''
-class A {
-  const A(this.x);
-  final int x;
-}
-class B extends A {
-  const B() : super(5);
-}
-const B b = const B();''');
-  }
-
-  void test_dependencyOnExplicitSuperConstructorParameters() {
-    // b depends on B() depends on i
-    _assertProperDependencies(r'''
-class A {
-  const A(this.x);
-  final int x;
-}
-class B extends A {
-  const B() : super(i);
-}
-const B b = const B();
-const int i = 5;''');
-  }
-
-  void test_dependencyOnFactoryRedirect() {
-    // a depends on A.foo() depends on A.bar()
-    _assertProperDependencies(r'''
-const A a = const A.foo();
-class A {
-  factory const A.foo() = A.bar;
-  const A.bar();
-}''');
-  }
-
-  void test_dependencyOnFactoryRedirectWithTypeParams() {
-    _assertProperDependencies(r'''
-class A {
-  const factory A(var a) = B<int>;
-}
-
-class B<T> implements A {
-  final T x;
-  const B(this.x);
-}
-
-const A a = const A(10);''');
-  }
-
-  void test_dependencyOnImplicitSuperConstructor() {
-    // b depends on B() depends on A()
-    _assertProperDependencies(r'''
-class A {
-  const A() : x = 5;
-  final int x;
-}
-class B extends A {
-  const B();
-}
-const B b = const B();''');
-  }
-
-  void test_dependencyOnInitializedFinal() {
-    // a depends on A() depends on A.x
-    _assertProperDependencies('''
-class A {
-  const A();
-  final int x = 1;
-}
-const A a = const A();
-''');
-  }
-
-  void test_dependencyOnInitializedNonStaticConst() {
-    // Even though non-static consts are not allowed by the language, we need
-    // to handle them for error recovery purposes.
-    // a depends on A() depends on A.x
-    _assertProperDependencies(
-        '''
-class A {
-  const A();
-  const int x = 1;
-}
-const A a = const A();
-''',
-        [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
-  }
-
-  void test_dependencyOnNonFactoryRedirect() {
-    // a depends on A.foo() depends on A.bar()
-    _assertProperDependencies(r'''
-const A a = const A.foo();
-class A {
-  const A.foo() : this.bar();
-  const A.bar();
-}''');
-  }
-
-  void test_dependencyOnNonFactoryRedirect_arg() {
-    // a depends on A.foo() depends on b
-    _assertProperDependencies(r'''
-const A a = const A.foo();
-const int b = 1;
-class A {
-  const A.foo() : this.bar(b);
-  const A.bar(x) : y = x;
-  final int y;
-}''');
-  }
-
-  void test_dependencyOnNonFactoryRedirect_defaultValue() {
-    // a depends on A.foo() depends on A.bar() depends on b
-    _assertProperDependencies(r'''
-const A a = const A.foo();
-const int b = 1;
-class A {
-  const A.foo() : this.bar();
-  const A.bar([x = b]) : y = x;
-  final int y;
-}''');
-  }
-
-  void test_dependencyOnNonFactoryRedirect_toMissing() {
-    // a depends on A.foo() which depends on nothing, since A.bar() is
-    // missing.
-    _assertProperDependencies(
-        r'''
-const A a = const A.foo();
-class A {
-  const A.foo() : this.bar();
-}''',
-        [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR]);
-  }
-
-  void test_dependencyOnNonFactoryRedirect_toNonConst() {
-    // a depends on A.foo() which depends on nothing, since A.bar() is
-    // non-const.
-    _assertProperDependencies(r'''
-const A a = const A.foo();
-class A {
-  const A.foo() : this.bar();
-  A.bar();
-}''');
-  }
-
-  void test_dependencyOnNonFactoryRedirect_unnamed() {
-    // a depends on A.foo() depends on A()
-    _assertProperDependencies(r'''
-const A a = const A.foo();
-class A {
-  const A.foo() : this();
-  const A();
-}''');
-  }
-
-  void test_dependencyOnOptionalParameterDefault() {
-    // a depends on A() depends on B()
-    _assertProperDependencies(r'''
-class A {
-  const A([x = const B()]) : b = x;
-  final B b;
-}
-class B {
-  const B();
-}
-const A a = const A();''');
-  }
-
-  void test_dependencyOnVariable() {
-    // x depends on y
-    _assertProperDependencies(r'''
-const x = y + 1;
-const y = 2;''');
-  }
-
-  void test_final_initialized_at_declaration() {
-    CompilationUnit compilationUnit = resolveSource('''
-class A {
-  final int i = 123;
-  const A();
-}
-
-const A a = const A();
-''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, 'a');
-    Map<String, DartObjectImpl> fields = _assertType(result, "A");
-    expect(fields, hasLength(1));
-    _assertIntField(fields, "i", 123);
-  }
-
-  void test_fromEnvironment_bool_default_false() {
-    expect(_assertValidBool(_check_fromEnvironment_bool(null, "false")), false);
-  }
-
-  void test_fromEnvironment_bool_default_overridden() {
-    expect(
-        _assertValidBool(_check_fromEnvironment_bool("false", "true")), false);
-  }
-
-  void test_fromEnvironment_bool_default_parseError() {
-    expect(_assertValidBool(_check_fromEnvironment_bool("parseError", "true")),
-        true);
-  }
-
-  void test_fromEnvironment_bool_default_true() {
-    expect(_assertValidBool(_check_fromEnvironment_bool(null, "true")), true);
-  }
-
-  void test_fromEnvironment_bool_false() {
-    expect(_assertValidBool(_check_fromEnvironment_bool("false", null)), false);
-  }
-
-  void test_fromEnvironment_bool_parseError() {
-    expect(_assertValidBool(_check_fromEnvironment_bool("parseError", null)),
-        false);
-  }
-
-  void test_fromEnvironment_bool_true() {
-    expect(_assertValidBool(_check_fromEnvironment_bool("true", null)), true);
-  }
-
-  void test_fromEnvironment_bool_undeclared() {
-    _assertValidUnknown(_check_fromEnvironment_bool(null, null));
-  }
-
-  void test_fromEnvironment_int_default_overridden() {
-    expect(_assertValidInt(_check_fromEnvironment_int("234", "123")), 234);
-  }
-
-  void test_fromEnvironment_int_default_parseError() {
-    expect(
-        _assertValidInt(_check_fromEnvironment_int("parseError", "123")), 123);
-  }
-
-  void test_fromEnvironment_int_default_undeclared() {
-    expect(_assertValidInt(_check_fromEnvironment_int(null, "123")), 123);
-  }
-
-  void test_fromEnvironment_int_ok() {
-    expect(_assertValidInt(_check_fromEnvironment_int("234", null)), 234);
-  }
-
-  void test_fromEnvironment_int_parseError() {
-    _assertValidNull(_check_fromEnvironment_int("parseError", null));
-  }
-
-  void test_fromEnvironment_int_parseError_nullDefault() {
-    _assertValidNull(_check_fromEnvironment_int("parseError", "null"));
-  }
-
-  void test_fromEnvironment_int_undeclared() {
-    _assertValidUnknown(_check_fromEnvironment_int(null, null));
-  }
-
-  void test_fromEnvironment_int_undeclared_nullDefault() {
-    _assertValidNull(_check_fromEnvironment_int(null, "null"));
-  }
-
-  void test_fromEnvironment_string_default_overridden() {
-    expect(_assertValidString(_check_fromEnvironment_string("abc", "'def'")),
-        "abc");
-  }
-
-  void test_fromEnvironment_string_default_undeclared() {
-    expect(_assertValidString(_check_fromEnvironment_string(null, "'def'")),
-        "def");
-  }
-
-  void test_fromEnvironment_string_empty() {
-    expect(_assertValidString(_check_fromEnvironment_string("", null)), "");
-  }
-
-  void test_fromEnvironment_string_ok() {
-    expect(
-        _assertValidString(_check_fromEnvironment_string("abc", null)), "abc");
-  }
-
-  void test_fromEnvironment_string_undeclared() {
-    _assertValidUnknown(_check_fromEnvironment_string(null, null));
-  }
-
-  void test_fromEnvironment_string_undeclared_nullDefault() {
-    _assertValidNull(_check_fromEnvironment_string(null, "null"));
-  }
-
-  void test_instanceCreationExpression_computedField() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A(4, 5);
-class A {
-  const A(int i, int j) : k = 2 * i + j;
-  final int k;
-}''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "foo");
-    Map<String, DartObjectImpl> fields = _assertType(result, "A");
-    expect(fields, hasLength(1));
-    _assertIntField(fields, "k", 13);
-  }
-
-  void
-      test_instanceCreationExpression_computedField_namedOptionalWithDefault() {
-    _checkInstanceCreationOptionalParams(false, true, true);
-  }
-
-  void
-      test_instanceCreationExpression_computedField_namedOptionalWithoutDefault() {
-    _checkInstanceCreationOptionalParams(false, true, false);
-  }
-
-  void
-      test_instanceCreationExpression_computedField_unnamedOptionalWithDefault() {
-    _checkInstanceCreationOptionalParams(false, false, true);
-  }
-
-  void
-      test_instanceCreationExpression_computedField_unnamedOptionalWithoutDefault() {
-    _checkInstanceCreationOptionalParams(false, false, false);
-  }
-
-  void test_instanceCreationExpression_computedField_usesConstConstructor() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A(3);
-class A {
-  const A(int i) : b = const B(4);
-  final int b;
-}
-class B {
-  const B(this.k);
-  final int k;
-}''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "foo");
-    Map<String, DartObjectImpl> fieldsOfA = _assertType(result, "A");
-    expect(fieldsOfA, hasLength(1));
-    Map<String, DartObjectImpl> fieldsOfB =
-        _assertFieldType(fieldsOfA, "b", "B");
-    expect(fieldsOfB, hasLength(1));
-    _assertIntField(fieldsOfB, "k", 4);
-  }
-
-  void test_instanceCreationExpression_computedField_usesStaticConst() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A(3);
-class A {
-  const A(int i) : k = i + B.bar;
-  final int k;
-}
-class B {
-  static const bar = 4;
-}''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "foo");
-    Map<String, DartObjectImpl> fields = _assertType(result, "A");
-    expect(fields, hasLength(1));
-    _assertIntField(fields, "k", 7);
-  }
-
-  void test_instanceCreationExpression_computedField_usesTopLevelConst() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A(3);
-const bar = 4;
-class A {
-  const A(int i) : k = i + bar;
-  final int k;
-}''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "foo");
-    Map<String, DartObjectImpl> fields = _assertType(result, "A");
-    expect(fields, hasLength(1));
-    _assertIntField(fields, "k", 7);
-  }
-
-  void test_instanceCreationExpression_explicitSuper() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const B(4, 5);
-class A {
-  const A(this.x);
-  final int x;
-}
-class B extends A {
-  const B(int x, this.y) : super(x * 2);
-  final int y;
-}''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "foo");
-    Map<String, DartObjectImpl> fields = _assertType(result, "B");
-    expect(fields, hasLength(2));
-    _assertIntField(fields, "y", 5);
-    Map<String, DartObjectImpl> superclassFields =
-        _assertFieldType(fields, GenericState.SUPERCLASS_FIELD, "A");
-    expect(superclassFields, hasLength(1));
-    _assertIntField(superclassFields, "x", 8);
-  }
-
-  void test_instanceCreationExpression_fieldFormalParameter() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A(42);
-class A {
-  int x;
-  const A(this.x)
-}''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "foo");
-    Map<String, DartObjectImpl> fields = _assertType(result, "A");
-    expect(fields, hasLength(1));
-    _assertIntField(fields, "x", 42);
-  }
-
-  void
-      test_instanceCreationExpression_fieldFormalParameter_namedOptionalWithDefault() {
-    _checkInstanceCreationOptionalParams(true, true, true);
-  }
-
-  void
-      test_instanceCreationExpression_fieldFormalParameter_namedOptionalWithoutDefault() {
-    _checkInstanceCreationOptionalParams(true, true, false);
-  }
-
-  void
-      test_instanceCreationExpression_fieldFormalParameter_unnamedOptionalWithDefault() {
-    _checkInstanceCreationOptionalParams(true, false, true);
-  }
-
-  void
-      test_instanceCreationExpression_fieldFormalParameter_unnamedOptionalWithoutDefault() {
-    _checkInstanceCreationOptionalParams(true, false, false);
-  }
-
-  void test_instanceCreationExpression_implicitSuper() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const B(4);
-class A {
-  const A() : x = 3;
-  final int x;
-}
-class B extends A {
-  const B(this.y);
-  final int y;
-}''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "foo");
-    Map<String, DartObjectImpl> fields = _assertType(result, "B");
-    expect(fields, hasLength(2));
-    _assertIntField(fields, "y", 4);
-    Map<String, DartObjectImpl> superclassFields =
-        _assertFieldType(fields, GenericState.SUPERCLASS_FIELD, "A");
-    expect(superclassFields, hasLength(1));
-    _assertIntField(superclassFields, "x", 3);
-  }
-
-  void test_instanceCreationExpression_nonFactoryRedirect() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A.a1();
-class A {
-  const A.a1() : this.a2();
-  const A.a2() : x = 5;
-  final int x;
-}''');
-    Map<String, DartObjectImpl> aFields =
-        _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
-    _assertIntField(aFields, 'x', 5);
-  }
-
-  void test_instanceCreationExpression_nonFactoryRedirect_arg() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A.a1(1);
-class A {
-  const A.a1(x) : this.a2(x + 100);
-  const A.a2(x) : y = x + 10;
-  final int y;
-}''');
-    Map<String, DartObjectImpl> aFields =
-        _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
-    _assertIntField(aFields, 'y', 111);
-  }
-
-  void test_instanceCreationExpression_nonFactoryRedirect_cycle() {
-    // It is an error to have a cycle in non-factory redirects; however, we
-    // need to make sure that even if the error occurs, attempting to evaluate
-    // the constant will terminate.
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A();
-class A {
-  const A() : this.b();
-  const A.b() : this();
-}''');
-    _assertValidUnknown(_evaluateTopLevelVariable(compilationUnit, "foo"));
-  }
-
-  void test_instanceCreationExpression_nonFactoryRedirect_defaultArg() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A.a1();
-class A {
-  const A.a1() : this.a2();
-  const A.a2([x = 100]) : y = x + 10;
-  final int y;
-}''');
-    Map<String, DartObjectImpl> aFields =
-        _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
-    _assertIntField(aFields, 'y', 110);
-  }
-
-  void test_instanceCreationExpression_nonFactoryRedirect_toMissing() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A.a1();
-class A {
-  const A.a1() : this.a2();
-}''');
-    // We don't care what value foo evaluates to (since there is a compile
-    // error), but we shouldn't crash, and we should figure
-    // out that it evaluates to an instance of class A.
-    _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
-  }
-
-  void test_instanceCreationExpression_nonFactoryRedirect_toNonConst() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A.a1();
-class A {
-  const A.a1() : this.a2();
-  A.a2();
-}''');
-    // We don't care what value foo evaluates to (since there is a compile
-    // error), but we shouldn't crash, and we should figure
-    // out that it evaluates to an instance of class A.
-    _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
-  }
-
-  void test_instanceCreationExpression_nonFactoryRedirect_unnamed() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A.a1();
-class A {
-  const A.a1() : this();
-  const A() : x = 5;
-  final int x;
-}''');
-    Map<String, DartObjectImpl> aFields =
-        _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
-    _assertIntField(aFields, 'x', 5);
-  }
-
-  void test_instanceCreationExpression_redirect() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A();
-class A {
-  const factory A() = B;
-}
-class B implements A {
-  const B();
-}''');
-    _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "B");
-  }
-
-  void test_instanceCreationExpression_redirect_cycle() {
-    // It is an error to have a cycle in factory redirects; however, we need
-    // to make sure that even if the error occurs, attempting to evaluate the
-    // constant will terminate.
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A();
-class A {
-  const factory A() = A.b;
-  const factory A.b() = A;
-}''');
-    _assertValidUnknown(_evaluateTopLevelVariable(compilationUnit, "foo"));
-  }
-
-  void test_instanceCreationExpression_redirect_external() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A();
-class A {
-  external const factory A();
-}''');
-    _assertValidUnknown(_evaluateTopLevelVariable(compilationUnit, "foo"));
-  }
-
-  void test_instanceCreationExpression_redirect_nonConst() {
-    // It is an error for a const factory constructor redirect to a non-const
-    // constructor; however, we need to make sure that even if the error
-    // attempting to evaluate the constant won't cause a crash.
-    CompilationUnit compilationUnit = resolveSource(r'''
-const foo = const A();
-class A {
-  const factory A() = A.b;
-  A.b();
-}''');
-    _assertValidUnknown(_evaluateTopLevelVariable(compilationUnit, "foo"));
-  }
-
-  void test_instanceCreationExpression_redirectWithTypeParams() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A {
-  const factory A(var a) = B<int>;
-}
-
-class B<T> implements A {
-  final T x;
-  const B(this.x);
-}
-
-const A a = const A(10);''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "a");
-    Map<String, DartObjectImpl> fields = _assertType(result, "B<int>");
-    expect(fields, hasLength(1));
-    _assertIntField(fields, "x", 10);
-  }
-
-  void test_instanceCreationExpression_redirectWithTypeSubstitution() {
-    // To evaluate the redirection of A<int>,
-    // A's template argument (T=int) must be substituted
-    // into B's template argument (B<U> where U=T) to get B<int>.
-    CompilationUnit compilationUnit = resolveSource(r'''
-class A<T> {
-  const factory A(var a) = B<T>;
-}
-
-class B<U> implements A {
-  final U x;
-  const B(this.x);
-}
-
-const A<int> a = const A<int>(10);''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, "a");
-    Map<String, DartObjectImpl> fields = _assertType(result, "B<int>");
-    expect(fields, hasLength(1));
-    _assertIntField(fields, "x", 10);
-  }
-
-  void test_instanceCreationExpression_symbol() {
-    CompilationUnit compilationUnit =
-        resolveSource("const foo = const Symbol('a');");
-    EvaluationResultImpl evaluationResult =
-        _evaluateTopLevelVariable(compilationUnit, "foo");
-    expect(evaluationResult.value, isNotNull);
-    DartObjectImpl value = evaluationResult.value;
-    expect(value.type, typeProvider.symbolType);
-    expect(value.toSymbolValue(), "a");
-  }
-
-  void test_instanceCreationExpression_withSupertypeParams_explicit() {
-    _checkInstanceCreation_withSupertypeParams(true);
-  }
-
-  void test_instanceCreationExpression_withSupertypeParams_implicit() {
-    _checkInstanceCreation_withSupertypeParams(false);
-  }
-
-  void test_instanceCreationExpression_withTypeParams() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-class C<E> {
-  const C();
-}
-const c_int = const C<int>();
-const c_num = const C<num>();''');
-    EvaluationResultImpl c_int =
-        _evaluateTopLevelVariable(compilationUnit, "c_int");
-    _assertType(c_int, "C<int>");
-    DartObjectImpl c_int_value = c_int.value;
-    EvaluationResultImpl c_num =
-        _evaluateTopLevelVariable(compilationUnit, "c_num");
-    _assertType(c_num, "C<num>");
-    DartObjectImpl c_num_value = c_num.value;
-    expect(c_int_value == c_num_value, isFalse);
-  }
-
-  void test_isValidSymbol() {
-    expect(ConstantEvaluationEngine.isValidPublicSymbol(""), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.bar"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo\$"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo\$bar"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("iff"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("gif"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("if\$"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("\$if"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo="), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.bar="), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.+"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("void"), isTrue);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("_foo"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("_foo.bar"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo._bar"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("if"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("if.foo"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.if"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo=.bar"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo."), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("+.foo"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("void.foo"), isFalse);
-    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.void"), isFalse);
-  }
-
-  void test_length_of_improperly_typed_string_expression() {
-    // Since type annotations are ignored in unchecked mode, the improper
-    // types on s1 and s2 shouldn't prevent us from evaluating i to
-    // 'alpha'.length.
-    CompilationUnit compilationUnit = resolveSource('''
-const int s1 = 'alpha';
-const int s2 = 'beta';
-const int i = (true ? s1 : s2).length;
-''');
-    ConstTopLevelVariableElementImpl element =
-        findTopLevelDeclaration(compilationUnit, 'i').element;
-    EvaluationResultImpl result = element.evaluationResult;
-    expect(_assertValidInt(result), 5);
-  }
-
-  void test_length_of_improperly_typed_string_identifier() {
-    // Since type annotations are ignored in unchecked mode, the improper type
-    // on s shouldn't prevent us from evaluating i to 'alpha'.length.
-    CompilationUnit compilationUnit = resolveSource('''
-const int s = 'alpha';
-const int i = s.length;
-''');
-    ConstTopLevelVariableElementImpl element =
-        findTopLevelDeclaration(compilationUnit, 'i').element;
-    EvaluationResultImpl result = element.evaluationResult;
-    expect(_assertValidInt(result), 5);
-  }
-
-  void test_non_static_const_initialized_at_declaration() {
-    // Even though non-static consts are not allowed by the language, we need
-    // to handle them for error recovery purposes.
-    CompilationUnit compilationUnit = resolveSource('''
-class A {
-  const int i = 123;
-  const A();
-}
-
-const A a = const A();
-''');
-    EvaluationResultImpl result =
-        _evaluateTopLevelVariable(compilationUnit, 'a');
-    Map<String, DartObjectImpl> fields = _assertType(result, "A");
-    expect(fields, hasLength(1));
-    _assertIntField(fields, "i", 123);
-  }
-
-  void test_symbolLiteral_void() {
-    CompilationUnit compilationUnit =
-        resolveSource("const voidSymbol = #void;");
-    VariableDeclaration voidSymbol =
-        findTopLevelDeclaration(compilationUnit, "voidSymbol");
-    EvaluationResultImpl voidSymbolResult =
-        (voidSymbol.element as VariableElementImpl).evaluationResult;
-    DartObjectImpl value = voidSymbolResult.value;
-    expect(value.type, typeProvider.symbolType);
-    expect(value.toSymbolValue(), "void");
-  }
-
-  Map<String, DartObjectImpl> _assertFieldType(
-      Map<String, DartObjectImpl> fields,
-      String fieldName,
-      String expectedType) {
-    DartObjectImpl field = fields[fieldName];
-    expect(field.type.displayName, expectedType);
-    return field.fields;
-  }
-
-  void _assertIntField(
-      Map<String, DartObjectImpl> fields, String fieldName, int expectedValue) {
-    DartObjectImpl field = fields[fieldName];
-    expect(field.type.name, "int");
-    expect(field.toIntValue(), expectedValue);
-  }
-
-  void _assertNullField(Map<String, DartObjectImpl> fields, String fieldName) {
-    DartObjectImpl field = fields[fieldName];
-    expect(field.isNull, isTrue);
-  }
-
-  void _assertProperDependencies(String sourceText,
-      [List<ErrorCode> expectedErrorCodes = ErrorCode.EMPTY_LIST]) {
-    Source source = addSource(sourceText);
-    LibraryElement element = resolve2(source);
-    CompilationUnit unit =
-        analysisContext.resolveCompilationUnit(source, element);
-    expect(unit, isNotNull);
-    ConstantValueComputer computer = _makeConstantValueComputer();
-    computer.add(unit, source, source);
-    computer.computeValues();
-    assertErrors(source, expectedErrorCodes);
-  }
-
-  Map<String, DartObjectImpl> _assertType(
-      EvaluationResultImpl result, String typeName) {
-    expect(result.value, isNotNull);
-    DartObjectImpl value = result.value;
-    expect(value.type.displayName, typeName);
-    return value.fields;
-  }
-
-  bool _assertValidBool(EvaluationResultImpl result) {
-    expect(result.value, isNotNull);
-    DartObjectImpl value = result.value;
-    expect(value.type, typeProvider.boolType);
-    bool boolValue = value.toBoolValue();
-    expect(boolValue, isNotNull);
-    return boolValue;
-  }
-
-  int _assertValidInt(EvaluationResultImpl result) {
-    expect(result, isNotNull);
-    expect(result.value, isNotNull);
-    DartObjectImpl value = result.value;
-    expect(value.type, typeProvider.intType);
-    return value.toIntValue();
-  }
-
-  void _assertValidNull(EvaluationResultImpl result) {
-    expect(result.value, isNotNull);
-    DartObjectImpl value = result.value;
-    expect(value.type, typeProvider.nullType);
-  }
-
-  String _assertValidString(EvaluationResultImpl result) {
-    expect(result.value, isNotNull);
-    DartObjectImpl value = result.value;
-    expect(value.type, typeProvider.stringType);
-    return value.toStringValue();
-  }
-
-  void _assertValidUnknown(EvaluationResultImpl result) {
-    expect(result.value, isNotNull);
-    DartObjectImpl value = result.value;
-    expect(value.isUnknown, isTrue);
-  }
-
-  EvaluationResultImpl _check_fromEnvironment_bool(
-      String valueInEnvironment, String defaultExpr) {
-    String envVarName = "x";
-    String varName = "foo";
-    if (valueInEnvironment != null) {
-      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
-    }
-    String defaultArg =
-        defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
-    CompilationUnit compilationUnit = resolveSource(
-        "const $varName = const bool.fromEnvironment('$envVarName'$defaultArg);");
-    return _evaluateTopLevelVariable(compilationUnit, varName);
-  }
-
-  EvaluationResultImpl _check_fromEnvironment_int(
-      String valueInEnvironment, String defaultExpr) {
-    String envVarName = "x";
-    String varName = "foo";
-    if (valueInEnvironment != null) {
-      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
-    }
-    String defaultArg =
-        defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
-    CompilationUnit compilationUnit = resolveSource(
-        "const $varName = const int.fromEnvironment('$envVarName'$defaultArg);");
-    return _evaluateTopLevelVariable(compilationUnit, varName);
-  }
-
-  EvaluationResultImpl _check_fromEnvironment_string(
-      String valueInEnvironment, String defaultExpr) {
-    String envVarName = "x";
-    String varName = "foo";
-    if (valueInEnvironment != null) {
-      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
-    }
-    String defaultArg =
-        defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
-    CompilationUnit compilationUnit = resolveSource(
-        "const $varName = const String.fromEnvironment('$envVarName'$defaultArg);");
-    return _evaluateTopLevelVariable(compilationUnit, varName);
-  }
-
-  void _checkInstanceCreation_withSupertypeParams(bool isExplicit) {
-    String superCall = isExplicit ? " : super()" : "";
-    CompilationUnit compilationUnit = resolveSource("""
-class A<T> {
-  const A();
-}
-class B<T, U> extends A<T> {
-  const B()$superCall;
-}
-class C<T, U> extends A<U> {
-  const C()$superCall;
-}
-const b_int_num = const B<int, num>();
-const c_int_num = const C<int, num>();""");
-    EvaluationResultImpl b_int_num =
-        _evaluateTopLevelVariable(compilationUnit, "b_int_num");
-    Map<String, DartObjectImpl> b_int_num_fields =
-        _assertType(b_int_num, "B<int, num>");
-    _assertFieldType(b_int_num_fields, GenericState.SUPERCLASS_FIELD, "A<int>");
-    EvaluationResultImpl c_int_num =
-        _evaluateTopLevelVariable(compilationUnit, "c_int_num");
-    Map<String, DartObjectImpl> c_int_num_fields =
-        _assertType(c_int_num, "C<int, num>");
-    _assertFieldType(c_int_num_fields, GenericState.SUPERCLASS_FIELD, "A<num>");
-  }
-
-  void _checkInstanceCreationOptionalParams(
-      bool isFieldFormal, bool isNamed, bool hasDefault) {
-    String fieldName = "j";
-    String paramName = isFieldFormal ? fieldName : "i";
-    String formalParam =
-        "${isFieldFormal ? "this." : "int "}$paramName${hasDefault ? " = 3" : ""}";
-    CompilationUnit compilationUnit = resolveSource("""
-const x = const A();
-const y = const A(${isNamed ? '$paramName: ' : ''}10);
-class A {
-  const A(${isNamed ? "{$formalParam}" : "[$formalParam]"})${isFieldFormal ? "" : " : $fieldName = $paramName"};
-  final int $fieldName;
-}""");
-    EvaluationResultImpl x = _evaluateTopLevelVariable(compilationUnit, "x");
-    Map<String, DartObjectImpl> fieldsOfX = _assertType(x, "A");
-    expect(fieldsOfX, hasLength(1));
-    if (hasDefault) {
-      _assertIntField(fieldsOfX, fieldName, 3);
-    } else {
-      _assertNullField(fieldsOfX, fieldName);
-    }
-    EvaluationResultImpl y = _evaluateTopLevelVariable(compilationUnit, "y");
-    Map<String, DartObjectImpl> fieldsOfY = _assertType(y, "A");
-    expect(fieldsOfY, hasLength(1));
-    _assertIntField(fieldsOfY, fieldName, 10);
-  }
-
-  /**
-   * Search [compilationUnit] for a class named [className], containing a
-   * method [methodName], with exactly one annotation.  Return the constant
-   * value of the annotation.
-   */
-  EvaluationResultImpl _evaluateAnnotation(
-      CompilationUnit compilationUnit, String className, String memberName) {
-    for (CompilationUnitMember member in compilationUnit.declarations) {
-      if (member is ClassDeclaration && member.name.name == className) {
-        for (ClassMember classMember in member.members) {
-          if (classMember is MethodDeclaration &&
-              classMember.name.name == memberName) {
-            expect(classMember.metadata, hasLength(1));
-            ElementAnnotationImpl elementAnnotation =
-                classMember.metadata[0].elementAnnotation;
-            return elementAnnotation.evaluationResult;
-          }
-        }
-      }
-    }
-    fail('Class member not found');
-    return null;
-  }
-
-  EvaluationResultImpl _evaluateTopLevelVariable(
-      CompilationUnit compilationUnit, String name) {
-    VariableDeclaration varDecl =
-        findTopLevelDeclaration(compilationUnit, name);
-    ConstTopLevelVariableElementImpl varElement = varDecl.element;
-    return varElement.evaluationResult;
-  }
-
-  ConstantValueComputer _makeConstantValueComputer() {
-    ConstantEvaluationValidator_ForTest validator =
-        new ConstantEvaluationValidator_ForTest(analysisContext2);
-    validator.computer = new ConstantValueComputer(
-        analysisContext2,
-        analysisContext2.typeProvider,
-        analysisContext2.declaredVariables,
-        validator,
-        analysisContext2.typeSystem);
-    return validator.computer;
-  }
-
-  void _validate(bool shouldBeValid, VariableDeclarationList declarationList) {
-    for (VariableDeclaration declaration in declarationList.variables) {
-      VariableElementImpl element = declaration.element as VariableElementImpl;
-      expect(element, isNotNull);
-      EvaluationResultImpl result = element.evaluationResult;
-      if (shouldBeValid) {
-        expect(result.value, isNotNull);
-      } else {
-        expect(result.value, isNull);
-      }
-    }
-  }
-}
-
-@reflectiveTest
-class ConstantVisitorTest extends ResolverTestCase {
-  void test_visitBinaryExpression_questionQuestion_notNull_notNull() {
-    Expression left = AstFactory.string2('a');
-    Expression right = AstFactory.string2('b');
-    Expression expression =
-        AstFactory.binaryExpression(left, TokenType.QUESTION_QUESTION, right);
-
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    DartObjectImpl result = _evaluate(expression, errorReporter);
-    expect(result, isNotNull);
-    expect(result.isNull, isFalse);
-    expect(result.toStringValue(), 'a');
-    errorListener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_questionQuestion_null_notNull() {
-    Expression left = AstFactory.nullLiteral();
-    Expression right = AstFactory.string2('b');
-    Expression expression =
-        AstFactory.binaryExpression(left, TokenType.QUESTION_QUESTION, right);
-
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    DartObjectImpl result = _evaluate(expression, errorReporter);
-    expect(result, isNotNull);
-    expect(result.isNull, isFalse);
-    expect(result.toStringValue(), 'b');
-    errorListener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_questionQuestion_null_null() {
-    Expression left = AstFactory.nullLiteral();
-    Expression right = AstFactory.nullLiteral();
-    Expression expression =
-        AstFactory.binaryExpression(left, TokenType.QUESTION_QUESTION, right);
-
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    DartObjectImpl result = _evaluate(expression, errorReporter);
-    expect(result, isNotNull);
-    expect(result.isNull, isTrue);
-    errorListener.assertNoErrors();
-  }
-
-  void test_visitConditionalExpression_false() {
-    Expression thenExpression = AstFactory.integer(1);
-    Expression elseExpression = AstFactory.integer(0);
-    ConditionalExpression expression = AstFactory.conditionalExpression(
-        AstFactory.booleanLiteral(false), thenExpression, elseExpression);
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    _assertValue(0, _evaluate(expression, errorReporter));
-    errorListener.assertNoErrors();
-  }
-
-  void test_visitConditionalExpression_nonBooleanCondition() {
-    Expression thenExpression = AstFactory.integer(1);
-    Expression elseExpression = AstFactory.integer(0);
-    NullLiteral conditionExpression = AstFactory.nullLiteral();
-    ConditionalExpression expression = AstFactory.conditionalExpression(
-        conditionExpression, thenExpression, elseExpression);
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    DartObjectImpl result = _evaluate(expression, errorReporter);
-    expect(result, isNull);
-    errorListener
-        .assertErrorsWithCodes([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL]);
-  }
-
-  void test_visitConditionalExpression_nonConstantElse() {
-    Expression thenExpression = AstFactory.integer(1);
-    Expression elseExpression = AstFactory.identifier3("x");
-    ConditionalExpression expression = AstFactory.conditionalExpression(
-        AstFactory.booleanLiteral(true), thenExpression, elseExpression);
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    DartObjectImpl result = _evaluate(expression, errorReporter);
-    expect(result, isNull);
-    errorListener
-        .assertErrorsWithCodes([CompileTimeErrorCode.INVALID_CONSTANT]);
-  }
-
-  void test_visitConditionalExpression_nonConstantThen() {
-    Expression thenExpression = AstFactory.identifier3("x");
-    Expression elseExpression = AstFactory.integer(0);
-    ConditionalExpression expression = AstFactory.conditionalExpression(
-        AstFactory.booleanLiteral(true), thenExpression, elseExpression);
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    DartObjectImpl result = _evaluate(expression, errorReporter);
-    expect(result, isNull);
-    errorListener
-        .assertErrorsWithCodes([CompileTimeErrorCode.INVALID_CONSTANT]);
-  }
-
-  void test_visitConditionalExpression_true() {
-    Expression thenExpression = AstFactory.integer(1);
-    Expression elseExpression = AstFactory.integer(0);
-    ConditionalExpression expression = AstFactory.conditionalExpression(
-        AstFactory.booleanLiteral(true), thenExpression, elseExpression);
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    _assertValue(1, _evaluate(expression, errorReporter));
-    errorListener.assertNoErrors();
-  }
-
-  void test_visitSimpleIdentifier_className() {
-    CompilationUnit compilationUnit = resolveSource('''
-const a = C;
-class C {}
-''');
-    DartObjectImpl result = _evaluateConstant(compilationUnit, 'a', null);
-    expect(result.type, typeProvider.typeType);
-    expect(result.toTypeValue().name, 'C');
-  }
-
-  void test_visitSimpleIdentifier_dynamic() {
-    CompilationUnit compilationUnit = resolveSource('''
-const a = dynamic;
-''');
-    DartObjectImpl result = _evaluateConstant(compilationUnit, 'a', null);
-    expect(result.type, typeProvider.typeType);
-    expect(result.toTypeValue(), typeProvider.dynamicType);
-  }
-
-  void test_visitSimpleIdentifier_inEnvironment() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const a = b;
-const b = 3;''');
-    Map<String, DartObjectImpl> environment = new Map<String, DartObjectImpl>();
-    DartObjectImpl six =
-        new DartObjectImpl(typeProvider.intType, new IntState(6));
-    environment["b"] = six;
-    _assertValue(6, _evaluateConstant(compilationUnit, "a", environment));
-  }
-
-  void test_visitSimpleIdentifier_notInEnvironment() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const a = b;
-const b = 3;''');
-    Map<String, DartObjectImpl> environment = new Map<String, DartObjectImpl>();
-    DartObjectImpl six =
-        new DartObjectImpl(typeProvider.intType, new IntState(6));
-    environment["c"] = six;
-    _assertValue(3, _evaluateConstant(compilationUnit, "a", environment));
-  }
-
-  void test_visitSimpleIdentifier_withoutEnvironment() {
-    CompilationUnit compilationUnit = resolveSource(r'''
-const a = b;
-const b = 3;''');
-    _assertValue(3, _evaluateConstant(compilationUnit, "a", null));
-  }
-
-  void _assertValue(int expectedValue, DartObjectImpl result) {
-    expect(result, isNotNull);
-    expect(result.type.name, "int");
-    expect(result.toIntValue(), expectedValue);
-  }
-
-  NonExistingSource _dummySource() {
-    String path = '/test.dart';
-    return new NonExistingSource(path, toUri(path), UriKind.FILE_URI);
-  }
-
-  DartObjectImpl _evaluate(Expression expression, ErrorReporter errorReporter) {
-    return expression.accept(new ConstantVisitor(
-        new ConstantEvaluationEngine(
-            new TestTypeProvider(), new DeclaredVariables(),
-            typeSystem: new TypeSystemImpl()),
-        errorReporter));
-  }
-
-  DartObjectImpl _evaluateConstant(CompilationUnit compilationUnit, String name,
-      Map<String, DartObjectImpl> lexicalEnvironment) {
-    Source source = compilationUnit.element.source;
-    Expression expression =
-        findTopLevelConstantExpression(compilationUnit, name);
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
-    DartObjectImpl result = expression.accept(new ConstantVisitor(
-        new ConstantEvaluationEngine(typeProvider, new DeclaredVariables(),
-            typeSystem: typeSystem),
-        errorReporter,
-        lexicalEnvironment: lexicalEnvironment));
-    errorListener.assertNoErrors();
-    return result;
-  }
-}
-
-@reflectiveTest
-class DartObjectImplTest extends EngineTestCase {
-  TypeProvider _typeProvider = new TestTypeProvider();
-
-  void test_add_knownDouble_knownDouble() {
-    _assertAdd(_doubleValue(3.0), _doubleValue(1.0), _doubleValue(2.0));
-  }
-
-  void test_add_knownDouble_knownInt() {
-    _assertAdd(_doubleValue(3.0), _doubleValue(1.0), _intValue(2));
-  }
-
-  void test_add_knownDouble_unknownDouble() {
-    _assertAdd(_doubleValue(null), _doubleValue(1.0), _doubleValue(null));
-  }
-
-  void test_add_knownDouble_unknownInt() {
-    _assertAdd(_doubleValue(null), _doubleValue(1.0), _intValue(null));
-  }
-
-  void test_add_knownInt_knownInt() {
-    _assertAdd(_intValue(3), _intValue(1), _intValue(2));
-  }
-
-  void test_add_knownInt_knownString() {
-    _assertAdd(null, _intValue(1), _stringValue("2"));
-  }
-
-  void test_add_knownInt_unknownDouble() {
-    _assertAdd(_doubleValue(null), _intValue(1), _doubleValue(null));
-  }
-
-  void test_add_knownInt_unknownInt() {
-    _assertAdd(_intValue(null), _intValue(1), _intValue(null));
-  }
-
-  void test_add_knownString_knownInt() {
-    _assertAdd(null, _stringValue("1"), _intValue(2));
-  }
-
-  void test_add_knownString_knownString() {
-    _assertAdd(_stringValue("ab"), _stringValue("a"), _stringValue("b"));
-  }
-
-  void test_add_knownString_unknownString() {
-    _assertAdd(_stringValue(null), _stringValue("a"), _stringValue(null));
-  }
-
-  void test_add_unknownDouble_knownDouble() {
-    _assertAdd(_doubleValue(null), _doubleValue(null), _doubleValue(2.0));
-  }
-
-  void test_add_unknownDouble_knownInt() {
-    _assertAdd(_doubleValue(null), _doubleValue(null), _intValue(2));
-  }
-
-  void test_add_unknownInt_knownDouble() {
-    _assertAdd(_doubleValue(null), _intValue(null), _doubleValue(2.0));
-  }
-
-  void test_add_unknownInt_knownInt() {
-    _assertAdd(_intValue(null), _intValue(null), _intValue(2));
-  }
-
-  void test_add_unknownString_knownString() {
-    _assertAdd(_stringValue(null), _stringValue(null), _stringValue("b"));
-  }
-
-  void test_add_unknownString_unknownString() {
-    _assertAdd(_stringValue(null), _stringValue(null), _stringValue(null));
-  }
-
-  void test_bitAnd_knownInt_knownInt() {
-    _assertBitAnd(_intValue(2), _intValue(6), _intValue(3));
-  }
-
-  void test_bitAnd_knownInt_knownString() {
-    _assertBitAnd(null, _intValue(6), _stringValue("3"));
-  }
-
-  void test_bitAnd_knownInt_unknownInt() {
-    _assertBitAnd(_intValue(null), _intValue(6), _intValue(null));
-  }
-
-  void test_bitAnd_knownString_knownInt() {
-    _assertBitAnd(null, _stringValue("6"), _intValue(3));
-  }
-
-  void test_bitAnd_unknownInt_knownInt() {
-    _assertBitAnd(_intValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_bitAnd_unknownInt_unknownInt() {
-    _assertBitAnd(_intValue(null), _intValue(null), _intValue(null));
-  }
-
-  void test_bitNot_knownInt() {
-    _assertBitNot(_intValue(-4), _intValue(3));
-  }
-
-  void test_bitNot_knownString() {
-    _assertBitNot(null, _stringValue("6"));
-  }
-
-  void test_bitNot_unknownInt() {
-    _assertBitNot(_intValue(null), _intValue(null));
-  }
-
-  void test_bitOr_knownInt_knownInt() {
-    _assertBitOr(_intValue(7), _intValue(6), _intValue(3));
-  }
-
-  void test_bitOr_knownInt_knownString() {
-    _assertBitOr(null, _intValue(6), _stringValue("3"));
-  }
-
-  void test_bitOr_knownInt_unknownInt() {
-    _assertBitOr(_intValue(null), _intValue(6), _intValue(null));
-  }
-
-  void test_bitOr_knownString_knownInt() {
-    _assertBitOr(null, _stringValue("6"), _intValue(3));
-  }
-
-  void test_bitOr_unknownInt_knownInt() {
-    _assertBitOr(_intValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_bitOr_unknownInt_unknownInt() {
-    _assertBitOr(_intValue(null), _intValue(null), _intValue(null));
-  }
-
-  void test_bitXor_knownInt_knownInt() {
-    _assertBitXor(_intValue(5), _intValue(6), _intValue(3));
-  }
-
-  void test_bitXor_knownInt_knownString() {
-    _assertBitXor(null, _intValue(6), _stringValue("3"));
-  }
-
-  void test_bitXor_knownInt_unknownInt() {
-    _assertBitXor(_intValue(null), _intValue(6), _intValue(null));
-  }
-
-  void test_bitXor_knownString_knownInt() {
-    _assertBitXor(null, _stringValue("6"), _intValue(3));
-  }
-
-  void test_bitXor_unknownInt_knownInt() {
-    _assertBitXor(_intValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_bitXor_unknownInt_unknownInt() {
-    _assertBitXor(_intValue(null), _intValue(null), _intValue(null));
-  }
-
-  void test_concatenate_knownInt_knownString() {
-    _assertConcatenate(null, _intValue(2), _stringValue("def"));
-  }
-
-  void test_concatenate_knownString_knownInt() {
-    _assertConcatenate(null, _stringValue("abc"), _intValue(3));
-  }
-
-  void test_concatenate_knownString_knownString() {
-    _assertConcatenate(
-        _stringValue("abcdef"), _stringValue("abc"), _stringValue("def"));
-  }
-
-  void test_concatenate_knownString_unknownString() {
-    _assertConcatenate(
-        _stringValue(null), _stringValue("abc"), _stringValue(null));
-  }
-
-  void test_concatenate_unknownString_knownString() {
-    _assertConcatenate(
-        _stringValue(null), _stringValue(null), _stringValue("def"));
-  }
-
-  void test_divide_knownDouble_knownDouble() {
-    _assertDivide(_doubleValue(3.0), _doubleValue(6.0), _doubleValue(2.0));
-  }
-
-  void test_divide_knownDouble_knownInt() {
-    _assertDivide(_doubleValue(3.0), _doubleValue(6.0), _intValue(2));
-  }
-
-  void test_divide_knownDouble_unknownDouble() {
-    _assertDivide(_doubleValue(null), _doubleValue(6.0), _doubleValue(null));
-  }
-
-  void test_divide_knownDouble_unknownInt() {
-    _assertDivide(_doubleValue(null), _doubleValue(6.0), _intValue(null));
-  }
-
-  void test_divide_knownInt_knownInt() {
-    _assertDivide(_doubleValue(3.0), _intValue(6), _intValue(2));
-  }
-
-  void test_divide_knownInt_knownString() {
-    _assertDivide(null, _intValue(6), _stringValue("2"));
-  }
-
-  void test_divide_knownInt_unknownDouble() {
-    _assertDivide(_doubleValue(null), _intValue(6), _doubleValue(null));
-  }
-
-  void test_divide_knownInt_unknownInt() {
-    _assertDivide(_doubleValue(null), _intValue(6), _intValue(null));
-  }
-
-  void test_divide_knownString_knownInt() {
-    _assertDivide(null, _stringValue("6"), _intValue(2));
-  }
-
-  void test_divide_unknownDouble_knownDouble() {
-    _assertDivide(_doubleValue(null), _doubleValue(null), _doubleValue(2.0));
-  }
-
-  void test_divide_unknownDouble_knownInt() {
-    _assertDivide(_doubleValue(null), _doubleValue(null), _intValue(2));
-  }
-
-  void test_divide_unknownInt_knownDouble() {
-    _assertDivide(_doubleValue(null), _intValue(null), _doubleValue(2.0));
-  }
-
-  void test_divide_unknownInt_knownInt() {
-    _assertDivide(_doubleValue(null), _intValue(null), _intValue(2));
-  }
-
-  void test_equalEqual_bool_false() {
-    _assertEqualEqual(_boolValue(false), _boolValue(false), _boolValue(true));
-  }
-
-  void test_equalEqual_bool_true() {
-    _assertEqualEqual(_boolValue(true), _boolValue(true), _boolValue(true));
-  }
-
-  void test_equalEqual_bool_unknown() {
-    _assertEqualEqual(_boolValue(null), _boolValue(null), _boolValue(false));
-  }
-
-  void test_equalEqual_double_false() {
-    _assertEqualEqual(_boolValue(false), _doubleValue(2.0), _doubleValue(4.0));
-  }
-
-  void test_equalEqual_double_true() {
-    _assertEqualEqual(_boolValue(true), _doubleValue(2.0), _doubleValue(2.0));
-  }
-
-  void test_equalEqual_double_unknown() {
-    _assertEqualEqual(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
-  }
-
-  void test_equalEqual_int_false() {
-    _assertEqualEqual(_boolValue(false), _intValue(-5), _intValue(5));
-  }
-
-  void test_equalEqual_int_true() {
-    _assertEqualEqual(_boolValue(true), _intValue(5), _intValue(5));
-  }
-
-  void test_equalEqual_int_unknown() {
-    _assertEqualEqual(_boolValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_equalEqual_list_empty() {
-    _assertEqualEqual(null, _listValue(), _listValue());
-  }
-
-  void test_equalEqual_list_false() {
-    _assertEqualEqual(null, _listValue(), _listValue());
-  }
-
-  void test_equalEqual_map_empty() {
-    _assertEqualEqual(null, _mapValue(), _mapValue());
-  }
-
-  void test_equalEqual_map_false() {
-    _assertEqualEqual(null, _mapValue(), _mapValue());
-  }
-
-  void test_equalEqual_null() {
-    _assertEqualEqual(_boolValue(true), _nullValue(), _nullValue());
-  }
-
-  void test_equalEqual_string_false() {
-    _assertEqualEqual(
-        _boolValue(false), _stringValue("abc"), _stringValue("def"));
-  }
-
-  void test_equalEqual_string_true() {
-    _assertEqualEqual(
-        _boolValue(true), _stringValue("abc"), _stringValue("abc"));
-  }
-
-  void test_equalEqual_string_unknown() {
-    _assertEqualEqual(
-        _boolValue(null), _stringValue(null), _stringValue("def"));
-  }
-
-  void test_equals_list_false_differentSizes() {
-    expect(
-        _listValue([_boolValue(true)]) ==
-            _listValue([_boolValue(true), _boolValue(false)]),
-        isFalse);
-  }
-
-  void test_equals_list_false_sameSize() {
-    expect(_listValue([_boolValue(true)]) == _listValue([_boolValue(false)]),
-        isFalse);
-  }
-
-  void test_equals_list_true_empty() {
-    expect(_listValue(), _listValue());
-  }
-
-  void test_equals_list_true_nonEmpty() {
-    expect(_listValue([_boolValue(true)]), _listValue([_boolValue(true)]));
-  }
-
-  void test_equals_map_true_empty() {
-    expect(_mapValue(), _mapValue());
-  }
-
-  void test_equals_symbol_false() {
-    expect(_symbolValue("a") == _symbolValue("b"), isFalse);
-  }
-
-  void test_equals_symbol_true() {
-    expect(_symbolValue("a"), _symbolValue("a"));
-  }
-
-  void test_getValue_bool_false() {
-    expect(_boolValue(false).toBoolValue(), false);
-  }
-
-  void test_getValue_bool_true() {
-    expect(_boolValue(true).toBoolValue(), true);
-  }
-
-  void test_getValue_bool_unknown() {
-    expect(_boolValue(null).toBoolValue(), isNull);
-  }
-
-  void test_getValue_double_known() {
-    double value = 2.3;
-    expect(_doubleValue(value).toDoubleValue(), value);
-  }
-
-  void test_getValue_double_unknown() {
-    expect(_doubleValue(null).toDoubleValue(), isNull);
-  }
-
-  void test_getValue_int_known() {
-    int value = 23;
-    expect(_intValue(value).toIntValue(), value);
-  }
-
-  void test_getValue_int_unknown() {
-    expect(_intValue(null).toIntValue(), isNull);
-  }
-
-  void test_getValue_list_empty() {
-    Object result = _listValue().toListValue();
-    _assertInstanceOfObjectArray(result);
-    List<Object> array = result as List<Object>;
-    expect(array, hasLength(0));
-  }
-
-  void test_getValue_list_valid() {
-    Object result = _listValue([_intValue(23)]).toListValue();
-    _assertInstanceOfObjectArray(result);
-    List<Object> array = result as List<Object>;
-    expect(array, hasLength(1));
-  }
-
-  void test_getValue_map_empty() {
-    Object result = _mapValue().toMapValue();
-    EngineTestCase.assertInstanceOf((obj) => obj is Map, Map, result);
-    Map map = result as Map;
-    expect(map, hasLength(0));
-  }
-
-  void test_getValue_map_valid() {
-    Object result =
-        _mapValue([_stringValue("key"), _stringValue("value")]).toMapValue();
-    EngineTestCase.assertInstanceOf((obj) => obj is Map, Map, result);
-    Map map = result as Map;
-    expect(map, hasLength(1));
-  }
-
-  void test_getValue_null() {
-    expect(_nullValue().isNull, isTrue);
-  }
-
-  void test_getValue_string_known() {
-    String value = "twenty-three";
-    expect(_stringValue(value).toStringValue(), value);
-  }
-
-  void test_getValue_string_unknown() {
-    expect(_stringValue(null).toStringValue(), isNull);
-  }
-
-  void test_greaterThan_knownDouble_knownDouble_false() {
-    _assertGreaterThan(_boolValue(false), _doubleValue(1.0), _doubleValue(2.0));
-  }
-
-  void test_greaterThan_knownDouble_knownDouble_true() {
-    _assertGreaterThan(_boolValue(true), _doubleValue(2.0), _doubleValue(1.0));
-  }
-
-  void test_greaterThan_knownDouble_knownInt_false() {
-    _assertGreaterThan(_boolValue(false), _doubleValue(1.0), _intValue(2));
-  }
-
-  void test_greaterThan_knownDouble_knownInt_true() {
-    _assertGreaterThan(_boolValue(true), _doubleValue(2.0), _intValue(1));
-  }
-
-  void test_greaterThan_knownDouble_unknownDouble() {
-    _assertGreaterThan(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
-  }
-
-  void test_greaterThan_knownDouble_unknownInt() {
-    _assertGreaterThan(_boolValue(null), _doubleValue(1.0), _intValue(null));
-  }
-
-  void test_greaterThan_knownInt_knownInt_false() {
-    _assertGreaterThan(_boolValue(false), _intValue(1), _intValue(2));
-  }
-
-  void test_greaterThan_knownInt_knownInt_true() {
-    _assertGreaterThan(_boolValue(true), _intValue(2), _intValue(1));
-  }
-
-  void test_greaterThan_knownInt_knownString() {
-    _assertGreaterThan(null, _intValue(1), _stringValue("2"));
-  }
-
-  void test_greaterThan_knownInt_unknownDouble() {
-    _assertGreaterThan(_boolValue(null), _intValue(1), _doubleValue(null));
-  }
-
-  void test_greaterThan_knownInt_unknownInt() {
-    _assertGreaterThan(_boolValue(null), _intValue(1), _intValue(null));
-  }
-
-  void test_greaterThan_knownString_knownInt() {
-    _assertGreaterThan(null, _stringValue("1"), _intValue(2));
-  }
-
-  void test_greaterThan_unknownDouble_knownDouble() {
-    _assertGreaterThan(_boolValue(null), _doubleValue(null), _doubleValue(2.0));
-  }
-
-  void test_greaterThan_unknownDouble_knownInt() {
-    _assertGreaterThan(_boolValue(null), _doubleValue(null), _intValue(2));
-  }
-
-  void test_greaterThan_unknownInt_knownDouble() {
-    _assertGreaterThan(_boolValue(null), _intValue(null), _doubleValue(2.0));
-  }
-
-  void test_greaterThan_unknownInt_knownInt() {
-    _assertGreaterThan(_boolValue(null), _intValue(null), _intValue(2));
-  }
-
-  void test_greaterThanOrEqual_knownDouble_knownDouble_false() {
-    _assertGreaterThanOrEqual(
-        _boolValue(false), _doubleValue(1.0), _doubleValue(2.0));
-  }
-
-  void test_greaterThanOrEqual_knownDouble_knownDouble_true() {
-    _assertGreaterThanOrEqual(
-        _boolValue(true), _doubleValue(2.0), _doubleValue(1.0));
-  }
-
-  void test_greaterThanOrEqual_knownDouble_knownInt_false() {
-    _assertGreaterThanOrEqual(
-        _boolValue(false), _doubleValue(1.0), _intValue(2));
-  }
-
-  void test_greaterThanOrEqual_knownDouble_knownInt_true() {
-    _assertGreaterThanOrEqual(
-        _boolValue(true), _doubleValue(2.0), _intValue(1));
-  }
-
-  void test_greaterThanOrEqual_knownDouble_unknownDouble() {
-    _assertGreaterThanOrEqual(
-        _boolValue(null), _doubleValue(1.0), _doubleValue(null));
-  }
-
-  void test_greaterThanOrEqual_knownDouble_unknownInt() {
-    _assertGreaterThanOrEqual(
-        _boolValue(null), _doubleValue(1.0), _intValue(null));
-  }
-
-  void test_greaterThanOrEqual_knownInt_knownInt_false() {
-    _assertGreaterThanOrEqual(_boolValue(false), _intValue(1), _intValue(2));
-  }
-
-  void test_greaterThanOrEqual_knownInt_knownInt_true() {
-    _assertGreaterThanOrEqual(_boolValue(true), _intValue(2), _intValue(2));
-  }
-
-  void test_greaterThanOrEqual_knownInt_knownString() {
-    _assertGreaterThanOrEqual(null, _intValue(1), _stringValue("2"));
-  }
-
-  void test_greaterThanOrEqual_knownInt_unknownDouble() {
-    _assertGreaterThanOrEqual(
-        _boolValue(null), _intValue(1), _doubleValue(null));
-  }
-
-  void test_greaterThanOrEqual_knownInt_unknownInt() {
-    _assertGreaterThanOrEqual(_boolValue(null), _intValue(1), _intValue(null));
-  }
-
-  void test_greaterThanOrEqual_knownString_knownInt() {
-    _assertGreaterThanOrEqual(null, _stringValue("1"), _intValue(2));
-  }
-
-  void test_greaterThanOrEqual_unknownDouble_knownDouble() {
-    _assertGreaterThanOrEqual(
-        _boolValue(null), _doubleValue(null), _doubleValue(2.0));
-  }
-
-  void test_greaterThanOrEqual_unknownDouble_knownInt() {
-    _assertGreaterThanOrEqual(
-        _boolValue(null), _doubleValue(null), _intValue(2));
-  }
-
-  void test_greaterThanOrEqual_unknownInt_knownDouble() {
-    _assertGreaterThanOrEqual(
-        _boolValue(null), _intValue(null), _doubleValue(2.0));
-  }
-
-  void test_greaterThanOrEqual_unknownInt_knownInt() {
-    _assertGreaterThanOrEqual(_boolValue(null), _intValue(null), _intValue(2));
-  }
-
-  void test_hasKnownValue_bool_false() {
-    expect(_boolValue(false).hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_bool_true() {
-    expect(_boolValue(true).hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_bool_unknown() {
-    expect(_boolValue(null).hasKnownValue, isFalse);
-  }
-
-  void test_hasKnownValue_double_known() {
-    expect(_doubleValue(2.3).hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_double_unknown() {
-    expect(_doubleValue(null).hasKnownValue, isFalse);
-  }
-
-  void test_hasKnownValue_dynamic() {
-    expect(_dynamicValue().hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_int_known() {
-    expect(_intValue(23).hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_int_unknown() {
-    expect(_intValue(null).hasKnownValue, isFalse);
-  }
-
-  void test_hasKnownValue_list_empty() {
-    expect(_listValue().hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_list_invalidElement() {
-    expect(_listValue([_dynamicValue]).hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_list_valid() {
-    expect(_listValue([_intValue(23)]).hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_map_empty() {
-    expect(_mapValue().hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_map_invalidKey() {
-    expect(_mapValue([_dynamicValue(), _stringValue("value")]).hasKnownValue,
-        isTrue);
-  }
-
-  void test_hasKnownValue_map_invalidValue() {
-    expect(_mapValue([_stringValue("key"), _dynamicValue()]).hasKnownValue,
-        isTrue);
-  }
-
-  void test_hasKnownValue_map_valid() {
-    expect(
-        _mapValue([_stringValue("key"), _stringValue("value")]).hasKnownValue,
-        isTrue);
-  }
-
-  void test_hasKnownValue_null() {
-    expect(_nullValue().hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_num() {
-    expect(_numValue().hasKnownValue, isFalse);
-  }
-
-  void test_hasKnownValue_string_known() {
-    expect(_stringValue("twenty-three").hasKnownValue, isTrue);
-  }
-
-  void test_hasKnownValue_string_unknown() {
-    expect(_stringValue(null).hasKnownValue, isFalse);
-  }
-
-  void test_identical_bool_false() {
-    _assertIdentical(_boolValue(false), _boolValue(false), _boolValue(true));
-  }
-
-  void test_identical_bool_true() {
-    _assertIdentical(_boolValue(true), _boolValue(true), _boolValue(true));
-  }
-
-  void test_identical_bool_unknown() {
-    _assertIdentical(_boolValue(null), _boolValue(null), _boolValue(false));
-  }
-
-  void test_identical_double_false() {
-    _assertIdentical(_boolValue(false), _doubleValue(2.0), _doubleValue(4.0));
-  }
-
-  void test_identical_double_true() {
-    _assertIdentical(_boolValue(true), _doubleValue(2.0), _doubleValue(2.0));
-  }
-
-  void test_identical_double_unknown() {
-    _assertIdentical(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
-  }
-
-  void test_identical_int_false() {
-    _assertIdentical(_boolValue(false), _intValue(-5), _intValue(5));
-  }
-
-  void test_identical_int_true() {
-    _assertIdentical(_boolValue(true), _intValue(5), _intValue(5));
-  }
-
-  void test_identical_int_unknown() {
-    _assertIdentical(_boolValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_identical_list_empty() {
-    _assertIdentical(_boolValue(true), _listValue(), _listValue());
-  }
-
-  void test_identical_list_false() {
-    _assertIdentical(
-        _boolValue(false), _listValue(), _listValue([_intValue(3)]));
-  }
-
-  void test_identical_map_empty() {
-    _assertIdentical(_boolValue(true), _mapValue(), _mapValue());
-  }
-
-  void test_identical_map_false() {
-    _assertIdentical(_boolValue(false), _mapValue(),
-        _mapValue([_intValue(1), _intValue(2)]));
-  }
-
-  void test_identical_null() {
-    _assertIdentical(_boolValue(true), _nullValue(), _nullValue());
-  }
-
-  void test_identical_string_false() {
-    _assertIdentical(
-        _boolValue(false), _stringValue("abc"), _stringValue("def"));
-  }
-
-  void test_identical_string_true() {
-    _assertIdentical(
-        _boolValue(true), _stringValue("abc"), _stringValue("abc"));
-  }
-
-  void test_identical_string_unknown() {
-    _assertIdentical(_boolValue(null), _stringValue(null), _stringValue("def"));
-  }
-
-  void test_integerDivide_knownDouble_knownDouble() {
-    _assertIntegerDivide(_intValue(3), _doubleValue(6.0), _doubleValue(2.0));
-  }
-
-  void test_integerDivide_knownDouble_knownInt() {
-    _assertIntegerDivide(_intValue(3), _doubleValue(6.0), _intValue(2));
-  }
-
-  void test_integerDivide_knownDouble_unknownDouble() {
-    _assertIntegerDivide(
-        _intValue(null), _doubleValue(6.0), _doubleValue(null));
-  }
-
-  void test_integerDivide_knownDouble_unknownInt() {
-    _assertIntegerDivide(_intValue(null), _doubleValue(6.0), _intValue(null));
-  }
-
-  void test_integerDivide_knownInt_knownInt() {
-    _assertIntegerDivide(_intValue(3), _intValue(6), _intValue(2));
-  }
-
-  void test_integerDivide_knownInt_knownString() {
-    _assertIntegerDivide(null, _intValue(6), _stringValue("2"));
-  }
-
-  void test_integerDivide_knownInt_unknownDouble() {
-    _assertIntegerDivide(_intValue(null), _intValue(6), _doubleValue(null));
-  }
-
-  void test_integerDivide_knownInt_unknownInt() {
-    _assertIntegerDivide(_intValue(null), _intValue(6), _intValue(null));
-  }
-
-  void test_integerDivide_knownString_knownInt() {
-    _assertIntegerDivide(null, _stringValue("6"), _intValue(2));
-  }
-
-  void test_integerDivide_unknownDouble_knownDouble() {
-    _assertIntegerDivide(
-        _intValue(null), _doubleValue(null), _doubleValue(2.0));
-  }
-
-  void test_integerDivide_unknownDouble_knownInt() {
-    _assertIntegerDivide(_intValue(null), _doubleValue(null), _intValue(2));
-  }
-
-  void test_integerDivide_unknownInt_knownDouble() {
-    _assertIntegerDivide(_intValue(null), _intValue(null), _doubleValue(2.0));
-  }
-
-  void test_integerDivide_unknownInt_knownInt() {
-    _assertIntegerDivide(_intValue(null), _intValue(null), _intValue(2));
-  }
-
-  void test_isBoolNumStringOrNull_bool_false() {
-    expect(_boolValue(false).isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_bool_true() {
-    expect(_boolValue(true).isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_bool_unknown() {
-    expect(_boolValue(null).isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_double_known() {
-    expect(_doubleValue(2.3).isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_double_unknown() {
-    expect(_doubleValue(null).isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_dynamic() {
-    expect(_dynamicValue().isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_int_known() {
-    expect(_intValue(23).isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_int_unknown() {
-    expect(_intValue(null).isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_list() {
-    expect(_listValue().isBoolNumStringOrNull, isFalse);
-  }
-
-  void test_isBoolNumStringOrNull_null() {
-    expect(_nullValue().isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_num() {
-    expect(_numValue().isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_string_known() {
-    expect(_stringValue("twenty-three").isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_isBoolNumStringOrNull_string_unknown() {
-    expect(_stringValue(null).isBoolNumStringOrNull, isTrue);
-  }
-
-  void test_lessThan_knownDouble_knownDouble_false() {
-    _assertLessThan(_boolValue(false), _doubleValue(2.0), _doubleValue(1.0));
-  }
-
-  void test_lessThan_knownDouble_knownDouble_true() {
-    _assertLessThan(_boolValue(true), _doubleValue(1.0), _doubleValue(2.0));
-  }
-
-  void test_lessThan_knownDouble_knownInt_false() {
-    _assertLessThan(_boolValue(false), _doubleValue(2.0), _intValue(1));
-  }
-
-  void test_lessThan_knownDouble_knownInt_true() {
-    _assertLessThan(_boolValue(true), _doubleValue(1.0), _intValue(2));
-  }
-
-  void test_lessThan_knownDouble_unknownDouble() {
-    _assertLessThan(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
-  }
-
-  void test_lessThan_knownDouble_unknownInt() {
-    _assertLessThan(_boolValue(null), _doubleValue(1.0), _intValue(null));
-  }
-
-  void test_lessThan_knownInt_knownInt_false() {
-    _assertLessThan(_boolValue(false), _intValue(2), _intValue(1));
-  }
-
-  void test_lessThan_knownInt_knownInt_true() {
-    _assertLessThan(_boolValue(true), _intValue(1), _intValue(2));
-  }
-
-  void test_lessThan_knownInt_knownString() {
-    _assertLessThan(null, _intValue(1), _stringValue("2"));
-  }
-
-  void test_lessThan_knownInt_unknownDouble() {
-    _assertLessThan(_boolValue(null), _intValue(1), _doubleValue(null));
-  }
-
-  void test_lessThan_knownInt_unknownInt() {
-    _assertLessThan(_boolValue(null), _intValue(1), _intValue(null));
-  }
-
-  void test_lessThan_knownString_knownInt() {
-    _assertLessThan(null, _stringValue("1"), _intValue(2));
-  }
-
-  void test_lessThan_unknownDouble_knownDouble() {
-    _assertLessThan(_boolValue(null), _doubleValue(null), _doubleValue(2.0));
-  }
-
-  void test_lessThan_unknownDouble_knownInt() {
-    _assertLessThan(_boolValue(null), _doubleValue(null), _intValue(2));
-  }
-
-  void test_lessThan_unknownInt_knownDouble() {
-    _assertLessThan(_boolValue(null), _intValue(null), _doubleValue(2.0));
-  }
-
-  void test_lessThan_unknownInt_knownInt() {
-    _assertLessThan(_boolValue(null), _intValue(null), _intValue(2));
-  }
-
-  void test_lessThanOrEqual_knownDouble_knownDouble_false() {
-    _assertLessThanOrEqual(
-        _boolValue(false), _doubleValue(2.0), _doubleValue(1.0));
-  }
-
-  void test_lessThanOrEqual_knownDouble_knownDouble_true() {
-    _assertLessThanOrEqual(
-        _boolValue(true), _doubleValue(1.0), _doubleValue(2.0));
-  }
-
-  void test_lessThanOrEqual_knownDouble_knownInt_false() {
-    _assertLessThanOrEqual(_boolValue(false), _doubleValue(2.0), _intValue(1));
-  }
-
-  void test_lessThanOrEqual_knownDouble_knownInt_true() {
-    _assertLessThanOrEqual(_boolValue(true), _doubleValue(1.0), _intValue(2));
-  }
-
-  void test_lessThanOrEqual_knownDouble_unknownDouble() {
-    _assertLessThanOrEqual(
-        _boolValue(null), _doubleValue(1.0), _doubleValue(null));
-  }
-
-  void test_lessThanOrEqual_knownDouble_unknownInt() {
-    _assertLessThanOrEqual(
-        _boolValue(null), _doubleValue(1.0), _intValue(null));
-  }
-
-  void test_lessThanOrEqual_knownInt_knownInt_false() {
-    _assertLessThanOrEqual(_boolValue(false), _intValue(2), _intValue(1));
-  }
-
-  void test_lessThanOrEqual_knownInt_knownInt_true() {
-    _assertLessThanOrEqual(_boolValue(true), _intValue(1), _intValue(2));
-  }
-
-  void test_lessThanOrEqual_knownInt_knownString() {
-    _assertLessThanOrEqual(null, _intValue(1), _stringValue("2"));
-  }
-
-  void test_lessThanOrEqual_knownInt_unknownDouble() {
-    _assertLessThanOrEqual(_boolValue(null), _intValue(1), _doubleValue(null));
-  }
-
-  void test_lessThanOrEqual_knownInt_unknownInt() {
-    _assertLessThanOrEqual(_boolValue(null), _intValue(1), _intValue(null));
-  }
-
-  void test_lessThanOrEqual_knownString_knownInt() {
-    _assertLessThanOrEqual(null, _stringValue("1"), _intValue(2));
-  }
-
-  void test_lessThanOrEqual_unknownDouble_knownDouble() {
-    _assertLessThanOrEqual(
-        _boolValue(null), _doubleValue(null), _doubleValue(2.0));
-  }
-
-  void test_lessThanOrEqual_unknownDouble_knownInt() {
-    _assertLessThanOrEqual(_boolValue(null), _doubleValue(null), _intValue(2));
-  }
-
-  void test_lessThanOrEqual_unknownInt_knownDouble() {
-    _assertLessThanOrEqual(
-        _boolValue(null), _intValue(null), _doubleValue(2.0));
-  }
-
-  void test_lessThanOrEqual_unknownInt_knownInt() {
-    _assertLessThanOrEqual(_boolValue(null), _intValue(null), _intValue(2));
-  }
-
-  void test_logicalAnd_false_false() {
-    _assertLogicalAnd(_boolValue(false), _boolValue(false), _boolValue(false));
-  }
-
-  void test_logicalAnd_false_null() {
-    try {
-      _assertLogicalAnd(_boolValue(false), _boolValue(false), _nullValue());
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalAnd_false_string() {
-    try {
-      _assertLogicalAnd(
-          _boolValue(false), _boolValue(false), _stringValue("false"));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalAnd_false_true() {
-    _assertLogicalAnd(_boolValue(false), _boolValue(false), _boolValue(true));
-  }
-
-  void test_logicalAnd_null_false() {
-    try {
-      _assertLogicalAnd(_boolValue(false), _nullValue(), _boolValue(false));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalAnd_null_true() {
-    try {
-      _assertLogicalAnd(_boolValue(false), _nullValue(), _boolValue(true));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalAnd_string_false() {
-    try {
-      _assertLogicalAnd(
-          _boolValue(false), _stringValue("true"), _boolValue(false));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalAnd_string_true() {
-    try {
-      _assertLogicalAnd(
-          _boolValue(false), _stringValue("false"), _boolValue(true));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalAnd_true_false() {
-    _assertLogicalAnd(_boolValue(false), _boolValue(true), _boolValue(false));
-  }
-
-  void test_logicalAnd_true_null() {
-    _assertLogicalAnd(null, _boolValue(true), _nullValue());
-  }
-
-  void test_logicalAnd_true_string() {
-    try {
-      _assertLogicalAnd(
-          _boolValue(false), _boolValue(true), _stringValue("true"));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalAnd_true_true() {
-    _assertLogicalAnd(_boolValue(true), _boolValue(true), _boolValue(true));
-  }
-
-  void test_logicalNot_false() {
-    _assertLogicalNot(_boolValue(true), _boolValue(false));
-  }
-
-  void test_logicalNot_null() {
-    _assertLogicalNot(null, _nullValue());
-  }
-
-  void test_logicalNot_string() {
-    try {
-      _assertLogicalNot(_boolValue(true), _stringValue(null));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalNot_true() {
-    _assertLogicalNot(_boolValue(false), _boolValue(true));
-  }
-
-  void test_logicalNot_unknown() {
-    _assertLogicalNot(_boolValue(null), _boolValue(null));
-  }
-
-  void test_logicalOr_false_false() {
-    _assertLogicalOr(_boolValue(false), _boolValue(false), _boolValue(false));
-  }
-
-  void test_logicalOr_false_null() {
-    _assertLogicalOr(null, _boolValue(false), _nullValue());
-  }
-
-  void test_logicalOr_false_string() {
-    try {
-      _assertLogicalOr(
-          _boolValue(false), _boolValue(false), _stringValue("false"));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalOr_false_true() {
-    _assertLogicalOr(_boolValue(true), _boolValue(false), _boolValue(true));
-  }
-
-  void test_logicalOr_null_false() {
-    try {
-      _assertLogicalOr(_boolValue(false), _nullValue(), _boolValue(false));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalOr_null_true() {
-    try {
-      _assertLogicalOr(_boolValue(true), _nullValue(), _boolValue(true));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalOr_string_false() {
-    try {
-      _assertLogicalOr(
-          _boolValue(false), _stringValue("true"), _boolValue(false));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalOr_string_true() {
-    try {
-      _assertLogicalOr(
-          _boolValue(true), _stringValue("false"), _boolValue(true));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalOr_true_false() {
-    _assertLogicalOr(_boolValue(true), _boolValue(true), _boolValue(false));
-  }
-
-  void test_logicalOr_true_null() {
-    try {
-      _assertLogicalOr(_boolValue(true), _boolValue(true), _nullValue());
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalOr_true_string() {
-    try {
-      _assertLogicalOr(
-          _boolValue(true), _boolValue(true), _stringValue("true"));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_logicalOr_true_true() {
-    _assertLogicalOr(_boolValue(true), _boolValue(true), _boolValue(true));
-  }
-
-  void test_minus_knownDouble_knownDouble() {
-    _assertMinus(_doubleValue(1.0), _doubleValue(4.0), _doubleValue(3.0));
-  }
-
-  void test_minus_knownDouble_knownInt() {
-    _assertMinus(_doubleValue(1.0), _doubleValue(4.0), _intValue(3));
-  }
-
-  void test_minus_knownDouble_unknownDouble() {
-    _assertMinus(_doubleValue(null), _doubleValue(4.0), _doubleValue(null));
-  }
-
-  void test_minus_knownDouble_unknownInt() {
-    _assertMinus(_doubleValue(null), _doubleValue(4.0), _intValue(null));
-  }
-
-  void test_minus_knownInt_knownInt() {
-    _assertMinus(_intValue(1), _intValue(4), _intValue(3));
-  }
-
-  void test_minus_knownInt_knownString() {
-    _assertMinus(null, _intValue(4), _stringValue("3"));
-  }
-
-  void test_minus_knownInt_unknownDouble() {
-    _assertMinus(_doubleValue(null), _intValue(4), _doubleValue(null));
-  }
-
-  void test_minus_knownInt_unknownInt() {
-    _assertMinus(_intValue(null), _intValue(4), _intValue(null));
-  }
-
-  void test_minus_knownString_knownInt() {
-    _assertMinus(null, _stringValue("4"), _intValue(3));
-  }
-
-  void test_minus_unknownDouble_knownDouble() {
-    _assertMinus(_doubleValue(null), _doubleValue(null), _doubleValue(3.0));
-  }
-
-  void test_minus_unknownDouble_knownInt() {
-    _assertMinus(_doubleValue(null), _doubleValue(null), _intValue(3));
-  }
-
-  void test_minus_unknownInt_knownDouble() {
-    _assertMinus(_doubleValue(null), _intValue(null), _doubleValue(3.0));
-  }
-
-  void test_minus_unknownInt_knownInt() {
-    _assertMinus(_intValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_negated_double_known() {
-    _assertNegated(_doubleValue(2.0), _doubleValue(-2.0));
-  }
-
-  void test_negated_double_unknown() {
-    _assertNegated(_doubleValue(null), _doubleValue(null));
-  }
-
-  void test_negated_int_known() {
-    _assertNegated(_intValue(-3), _intValue(3));
-  }
-
-  void test_negated_int_unknown() {
-    _assertNegated(_intValue(null), _intValue(null));
-  }
-
-  void test_negated_string() {
-    _assertNegated(null, _stringValue(null));
-  }
-
-  void test_notEqual_bool_false() {
-    _assertNotEqual(_boolValue(false), _boolValue(true), _boolValue(true));
-  }
-
-  void test_notEqual_bool_true() {
-    _assertNotEqual(_boolValue(true), _boolValue(false), _boolValue(true));
-  }
-
-  void test_notEqual_bool_unknown() {
-    _assertNotEqual(_boolValue(null), _boolValue(null), _boolValue(false));
-  }
-
-  void test_notEqual_double_false() {
-    _assertNotEqual(_boolValue(false), _doubleValue(2.0), _doubleValue(2.0));
-  }
-
-  void test_notEqual_double_true() {
-    _assertNotEqual(_boolValue(true), _doubleValue(2.0), _doubleValue(4.0));
-  }
-
-  void test_notEqual_double_unknown() {
-    _assertNotEqual(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
-  }
-
-  void test_notEqual_int_false() {
-    _assertNotEqual(_boolValue(false), _intValue(5), _intValue(5));
-  }
-
-  void test_notEqual_int_true() {
-    _assertNotEqual(_boolValue(true), _intValue(-5), _intValue(5));
-  }
-
-  void test_notEqual_int_unknown() {
-    _assertNotEqual(_boolValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_notEqual_null() {
-    _assertNotEqual(_boolValue(false), _nullValue(), _nullValue());
-  }
-
-  void test_notEqual_string_false() {
-    _assertNotEqual(
-        _boolValue(false), _stringValue("abc"), _stringValue("abc"));
-  }
-
-  void test_notEqual_string_true() {
-    _assertNotEqual(_boolValue(true), _stringValue("abc"), _stringValue("def"));
-  }
-
-  void test_notEqual_string_unknown() {
-    _assertNotEqual(_boolValue(null), _stringValue(null), _stringValue("def"));
-  }
-
-  void test_performToString_bool_false() {
-    _assertPerformToString(_stringValue("false"), _boolValue(false));
-  }
-
-  void test_performToString_bool_true() {
-    _assertPerformToString(_stringValue("true"), _boolValue(true));
-  }
-
-  void test_performToString_bool_unknown() {
-    _assertPerformToString(_stringValue(null), _boolValue(null));
-  }
-
-  void test_performToString_double_known() {
-    _assertPerformToString(_stringValue("2.0"), _doubleValue(2.0));
-  }
-
-  void test_performToString_double_unknown() {
-    _assertPerformToString(_stringValue(null), _doubleValue(null));
-  }
-
-  void test_performToString_int_known() {
-    _assertPerformToString(_stringValue("5"), _intValue(5));
-  }
-
-  void test_performToString_int_unknown() {
-    _assertPerformToString(_stringValue(null), _intValue(null));
-  }
-
-  void test_performToString_null() {
-    _assertPerformToString(_stringValue("null"), _nullValue());
-  }
-
-  void test_performToString_string_known() {
-    _assertPerformToString(_stringValue("abc"), _stringValue("abc"));
-  }
-
-  void test_performToString_string_unknown() {
-    _assertPerformToString(_stringValue(null), _stringValue(null));
-  }
-
-  void test_remainder_knownDouble_knownDouble() {
-    _assertRemainder(_doubleValue(1.0), _doubleValue(7.0), _doubleValue(2.0));
-  }
-
-  void test_remainder_knownDouble_knownInt() {
-    _assertRemainder(_doubleValue(1.0), _doubleValue(7.0), _intValue(2));
-  }
-
-  void test_remainder_knownDouble_unknownDouble() {
-    _assertRemainder(_doubleValue(null), _doubleValue(7.0), _doubleValue(null));
-  }
-
-  void test_remainder_knownDouble_unknownInt() {
-    _assertRemainder(_doubleValue(null), _doubleValue(6.0), _intValue(null));
-  }
-
-  void test_remainder_knownInt_knownInt() {
-    _assertRemainder(_intValue(1), _intValue(7), _intValue(2));
-  }
-
-  void test_remainder_knownInt_knownString() {
-    _assertRemainder(null, _intValue(7), _stringValue("2"));
-  }
-
-  void test_remainder_knownInt_unknownDouble() {
-    _assertRemainder(_doubleValue(null), _intValue(7), _doubleValue(null));
-  }
-
-  void test_remainder_knownInt_unknownInt() {
-    _assertRemainder(_intValue(null), _intValue(7), _intValue(null));
-  }
-
-  void test_remainder_knownString_knownInt() {
-    _assertRemainder(null, _stringValue("7"), _intValue(2));
-  }
-
-  void test_remainder_unknownDouble_knownDouble() {
-    _assertRemainder(_doubleValue(null), _doubleValue(null), _doubleValue(2.0));
-  }
-
-  void test_remainder_unknownDouble_knownInt() {
-    _assertRemainder(_doubleValue(null), _doubleValue(null), _intValue(2));
-  }
-
-  void test_remainder_unknownInt_knownDouble() {
-    _assertRemainder(_doubleValue(null), _intValue(null), _doubleValue(2.0));
-  }
-
-  void test_remainder_unknownInt_knownInt() {
-    _assertRemainder(_intValue(null), _intValue(null), _intValue(2));
-  }
-
-  void test_shiftLeft_knownInt_knownInt() {
-    _assertShiftLeft(_intValue(48), _intValue(6), _intValue(3));
-  }
-
-  void test_shiftLeft_knownInt_knownString() {
-    _assertShiftLeft(null, _intValue(6), _stringValue(null));
-  }
-
-  void test_shiftLeft_knownInt_tooLarge() {
-    _assertShiftLeft(
-        _intValue(null),
-        _intValue(6),
-        new DartObjectImpl(
-            _typeProvider.intType, new IntState(LONG_MAX_VALUE)));
-  }
-
-  void test_shiftLeft_knownInt_unknownInt() {
-    _assertShiftLeft(_intValue(null), _intValue(6), _intValue(null));
-  }
-
-  void test_shiftLeft_knownString_knownInt() {
-    _assertShiftLeft(null, _stringValue(null), _intValue(3));
-  }
-
-  void test_shiftLeft_unknownInt_knownInt() {
-    _assertShiftLeft(_intValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_shiftLeft_unknownInt_unknownInt() {
-    _assertShiftLeft(_intValue(null), _intValue(null), _intValue(null));
-  }
-
-  void test_shiftRight_knownInt_knownInt() {
-    _assertShiftRight(_intValue(6), _intValue(48), _intValue(3));
-  }
-
-  void test_shiftRight_knownInt_knownString() {
-    _assertShiftRight(null, _intValue(48), _stringValue(null));
-  }
-
-  void test_shiftRight_knownInt_tooLarge() {
-    _assertShiftRight(
-        _intValue(null),
-        _intValue(48),
-        new DartObjectImpl(
-            _typeProvider.intType, new IntState(LONG_MAX_VALUE)));
-  }
-
-  void test_shiftRight_knownInt_unknownInt() {
-    _assertShiftRight(_intValue(null), _intValue(48), _intValue(null));
-  }
-
-  void test_shiftRight_knownString_knownInt() {
-    _assertShiftRight(null, _stringValue(null), _intValue(3));
-  }
-
-  void test_shiftRight_unknownInt_knownInt() {
-    _assertShiftRight(_intValue(null), _intValue(null), _intValue(3));
-  }
-
-  void test_shiftRight_unknownInt_unknownInt() {
-    _assertShiftRight(_intValue(null), _intValue(null), _intValue(null));
-  }
-
-  void test_stringLength_int() {
-    try {
-      _assertStringLength(_intValue(null), _intValue(0));
-      fail("Expected EvaluationException");
-    } on EvaluationException {}
-  }
-
-  void test_stringLength_knownString() {
-    _assertStringLength(_intValue(3), _stringValue("abc"));
-  }
-
-  void test_stringLength_unknownString() {
-    _assertStringLength(_intValue(null), _stringValue(null));
-  }
-
-  void test_times_knownDouble_knownDouble() {
-    _assertTimes(_doubleValue(6.0), _doubleValue(2.0), _doubleValue(3.0));
-  }
-
-  void test_times_knownDouble_knownInt() {
-    _assertTimes(_doubleValue(6.0), _doubleValue(2.0), _intValue(3));
-  }
-
-  void test_times_knownDouble_unknownDouble() {
-    _assertTimes(_doubleValue(null), _doubleValue(2.0), _doubleValue(null));
-  }
-
-  void test_times_knownDouble_unknownInt() {
-    _assertTimes(_doubleValue(null), _doubleValue(2.0), _intValue(null));
-  }
-
-  void test_times_knownInt_knownInt() {
-    _assertTimes(_intValue(6), _intValue(2), _intValue(3));
-  }
-
-  void test_times_knownInt_knownString() {
-    _assertTimes(null, _intValue(2), _stringValue("3"));
-  }
-
-  void test_times_knownInt_unknownDouble() {
-    _assertTimes(_doubleValue(null), _intValue(2), _doubleValue(null));
-  }
-
-  void test_times_knownInt_unknownInt() {
-    _assertTimes(_intValue(null), _intValue(2), _intValue(null));
-  }
-
-  void test_times_knownString_knownInt() {
-    _assertTimes(null, _stringValue("2"), _intValue(3));
-  }
-
-  void test_times_unknownDouble_knownDouble() {
-    _assertTimes(_doubleValue(null), _doubleValue(null), _doubleValue(3.0));
-  }
-
-  void test_times_unknownDouble_knownInt() {
-    _assertTimes(_doubleValue(null), _doubleValue(null), _intValue(3));
-  }
-
-  void test_times_unknownInt_knownDouble() {
-    _assertTimes(_doubleValue(null), _intValue(null), _doubleValue(3.0));
-  }
-
-  void test_times_unknownInt_knownInt() {
-    _assertTimes(_intValue(null), _intValue(null), _intValue(3));
-  }
-
-  /**
-   * Assert that the result of adding the left and right operands is the expected value, or that the
-   * operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertAdd(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.add(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.add(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of bit-anding the left and right operands is the expected value, or that
-   * the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertBitAnd(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.bitAnd(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.bitAnd(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the bit-not of the operand is the expected value, or that the operation throws an
-   * exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param operand the operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertBitNot(DartObjectImpl expected, DartObjectImpl operand) {
-    if (expected == null) {
-      try {
-        operand.bitNot(_typeProvider);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = operand.bitNot(_typeProvider);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of bit-oring the left and right operands is the expected value, or that
-   * the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertBitOr(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.bitOr(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.bitOr(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of bit-xoring the left and right operands is the expected value, or that
-   * the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertBitXor(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.bitXor(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.bitXor(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of concatenating the left and right operands is the expected value, or
-   * that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertConcatenate(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.concatenate(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.concatenate(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of dividing the left and right operands is the expected value, or that
-   * the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertDivide(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.divide(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.divide(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of comparing the left and right operands for equality is the expected
-   * value, or that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertEqualEqual(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.equalEqual(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.equalEqual(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of comparing the left and right operands is the expected value, or that
-   * the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertGreaterThan(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.greaterThan(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.greaterThan(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of comparing the left and right operands is the expected value, or that
-   * the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertGreaterThanOrEqual(DartObjectImpl expected,
-      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.greaterThanOrEqual(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.greaterThanOrEqual(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of comparing the left and right operands using
-   * identical() is the expected value.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   */
-  void _assertIdentical(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    DartObjectImpl result =
-        leftOperand.isIdentical(_typeProvider, rightOperand);
-    expect(result, isNotNull);
-    expect(result, expected);
-  }
-
-  void _assertInstanceOfObjectArray(Object result) {
-    // TODO(scheglov) implement
-  }
-
-  /**
-   * Assert that the result of dividing the left and right operands as integers is the expected
-   * value, or that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertIntegerDivide(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.integerDivide(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.integerDivide(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of comparing the left and right operands is the expected value, or that
-   * the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertLessThan(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.lessThan(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.lessThan(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of comparing the left and right operands is the expected value, or that
-   * the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertLessThanOrEqual(DartObjectImpl expected,
-      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.lessThanOrEqual(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.lessThanOrEqual(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of logical-anding the left and right operands is the expected value, or
-   * that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertLogicalAnd(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.logicalAnd(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.logicalAnd(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the logical-not of the operand is the expected value, or that the operation throws
-   * an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param operand the operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertLogicalNot(DartObjectImpl expected, DartObjectImpl operand) {
-    if (expected == null) {
-      try {
-        operand.logicalNot(_typeProvider);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = operand.logicalNot(_typeProvider);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of logical-oring the left and right operands is the expected value, or
-   * that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertLogicalOr(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.logicalOr(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.logicalOr(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of subtracting the left and right operands is the expected value, or
-   * that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertMinus(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.minus(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.minus(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the negation of the operand is the expected value, or that the operation throws an
-   * exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param operand the operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertNegated(DartObjectImpl expected, DartObjectImpl operand) {
-    if (expected == null) {
-      try {
-        operand.negated(_typeProvider);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = operand.negated(_typeProvider);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of comparing the left and right operands for inequality is the expected
-   * value, or that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertNotEqual(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.notEqual(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.notEqual(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that converting the operand to a string is the expected value, or that the operation
-   * throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param operand the operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertPerformToString(DartObjectImpl expected, DartObjectImpl operand) {
-    if (expected == null) {
-      try {
-        operand.performToString(_typeProvider);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = operand.performToString(_typeProvider);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of taking the remainder of the left and right operands is the expected
-   * value, or that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertRemainder(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.remainder(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.remainder(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of multiplying the left and right operands is the expected value, or
-   * that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertShiftLeft(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.shiftLeft(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.shiftLeft(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of multiplying the left and right operands is the expected value, or
-   * that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the right operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertShiftRight(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.shiftRight(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result =
-          leftOperand.shiftRight(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the length of the operand is the expected value, or that the operation throws an
-   * exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param operand the operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertStringLength(DartObjectImpl expected, DartObjectImpl operand) {
-    if (expected == null) {
-      try {
-        operand.stringLength(_typeProvider);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = operand.stringLength(_typeProvider);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of multiplying the left and right operands is the expected value, or
-   * that the operation throws an exception if the expected value is `null`.
-   *
-   * @param expected the expected result of the operation
-   * @param leftOperand the left operand to the operation
-   * @param rightOperand the left operand to the operation
-   * @throws EvaluationException if the result is an exception when it should not be
-   */
-  void _assertTimes(DartObjectImpl expected, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (expected == null) {
-      try {
-        leftOperand.times(_typeProvider, rightOperand);
-        fail("Expected an EvaluationException");
-      } on EvaluationException {}
-    } else {
-      DartObjectImpl result = leftOperand.times(_typeProvider, rightOperand);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  DartObjectImpl _boolValue(bool value) {
-    if (value == null) {
-      return new DartObjectImpl(
-          _typeProvider.boolType, BoolState.UNKNOWN_VALUE);
-    } else if (identical(value, false)) {
-      return new DartObjectImpl(_typeProvider.boolType, BoolState.FALSE_STATE);
-    } else if (identical(value, true)) {
-      return new DartObjectImpl(_typeProvider.boolType, BoolState.TRUE_STATE);
-    }
-    fail("Invalid boolean value used in test");
-    return null;
-  }
-
-  DartObjectImpl _doubleValue(double value) {
-    if (value == null) {
-      return new DartObjectImpl(
-          _typeProvider.doubleType, DoubleState.UNKNOWN_VALUE);
-    } else {
-      return new DartObjectImpl(
-          _typeProvider.doubleType, new DoubleState(value));
-    }
-  }
-
-  DartObjectImpl _dynamicValue() {
-    return new DartObjectImpl(
-        _typeProvider.nullType, DynamicState.DYNAMIC_STATE);
-  }
-
-  DartObjectImpl _intValue(int value) {
-    if (value == null) {
-      return new DartObjectImpl(_typeProvider.intType, IntState.UNKNOWN_VALUE);
-    } else {
-      return new DartObjectImpl(_typeProvider.intType, new IntState(value));
-    }
-  }
-
-  DartObjectImpl _listValue(
-      [List<DartObjectImpl> elements = DartObjectImpl.EMPTY_LIST]) {
-    return new DartObjectImpl(_typeProvider.listType, new ListState(elements));
-  }
-
-  DartObjectImpl _mapValue(
-      [List<DartObjectImpl> keyElementPairs = DartObjectImpl.EMPTY_LIST]) {
-    Map<DartObjectImpl, DartObjectImpl> map =
-        new Map<DartObjectImpl, DartObjectImpl>();
-    int count = keyElementPairs.length;
-    for (int i = 0; i < count;) {
-      map[keyElementPairs[i++]] = keyElementPairs[i++];
-    }
-    return new DartObjectImpl(_typeProvider.mapType, new MapState(map));
-  }
-
-  DartObjectImpl _nullValue() {
-    return new DartObjectImpl(_typeProvider.nullType, NullState.NULL_STATE);
-  }
-
-  DartObjectImpl _numValue() {
-    return new DartObjectImpl(_typeProvider.nullType, NumState.UNKNOWN_VALUE);
-  }
-
-  DartObjectImpl _stringValue(String value) {
-    if (value == null) {
-      return new DartObjectImpl(
-          _typeProvider.stringType, StringState.UNKNOWN_VALUE);
-    } else {
-      return new DartObjectImpl(
-          _typeProvider.stringType, new StringState(value));
-    }
-  }
-
-  DartObjectImpl _symbolValue(String value) {
-    return new DartObjectImpl(_typeProvider.symbolType, new SymbolState(value));
-  }
-}
-
-@reflectiveTest
-class DeclaredVariablesTest extends EngineTestCase {
-  void test_getBool_false() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    DeclaredVariables variables = new DeclaredVariables();
-    variables.define(variableName, "false");
-    DartObject object = variables.getBool(typeProvider, variableName);
-    expect(object, isNotNull);
-    expect(object.toBoolValue(), false);
-  }
-
-  void test_getBool_invalid() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    DeclaredVariables variables = new DeclaredVariables();
-    variables.define(variableName, "not true");
-    _assertNullDartObject(
-        typeProvider, variables.getBool(typeProvider, variableName));
-  }
-
-  void test_getBool_true() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    DeclaredVariables variables = new DeclaredVariables();
-    variables.define(variableName, "true");
-    DartObject object = variables.getBool(typeProvider, variableName);
-    expect(object, isNotNull);
-    expect(object.toBoolValue(), true);
-  }
-
-  void test_getBool_undefined() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    DeclaredVariables variables = new DeclaredVariables();
-    _assertUnknownDartObject(
-        typeProvider.boolType, variables.getBool(typeProvider, variableName));
-  }
-
-  void test_getInt_invalid() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    DeclaredVariables variables = new DeclaredVariables();
-    variables.define(variableName, "four score and seven years");
-    _assertNullDartObject(
-        typeProvider, variables.getInt(typeProvider, variableName));
-  }
-
-  void test_getInt_undefined() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    DeclaredVariables variables = new DeclaredVariables();
-    _assertUnknownDartObject(
-        typeProvider.intType, variables.getInt(typeProvider, variableName));
-  }
-
-  void test_getInt_valid() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    DeclaredVariables variables = new DeclaredVariables();
-    variables.define(variableName, "23");
-    DartObject object = variables.getInt(typeProvider, variableName);
-    expect(object, isNotNull);
-    expect(object.toIntValue(), 23);
-  }
-
-  void test_getString_defined() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    String value = "value";
-    DeclaredVariables variables = new DeclaredVariables();
-    variables.define(variableName, value);
-    DartObject object = variables.getString(typeProvider, variableName);
-    expect(object, isNotNull);
-    expect(object.toStringValue(), value);
-  }
-
-  void test_getString_undefined() {
-    TestTypeProvider typeProvider = new TestTypeProvider();
-    String variableName = "var";
-    DeclaredVariables variables = new DeclaredVariables();
-    _assertUnknownDartObject(typeProvider.stringType,
-        variables.getString(typeProvider, variableName));
-  }
-
-  void _assertNullDartObject(TestTypeProvider typeProvider, DartObject result) {
-    expect(result.type, typeProvider.nullType);
-  }
-
-  void _assertUnknownDartObject(
-      ParameterizedType expectedType, DartObject result) {
-    expect((result as DartObjectImpl).isUnknown, isTrue);
-    expect(result.type, expectedType);
-  }
-}
-
-@reflectiveTest
-class ReferenceFinderTest {
-  DirectedGraph<ConstantEvaluationTarget> _referenceGraph;
-  VariableElement _head;
-  Element _tail;
-
-  void setUp() {
-    _referenceGraph = new DirectedGraph<ConstantEvaluationTarget>();
-    _head = ElementFactory.topLevelVariableElement2("v1");
-  }
-
-  void test_visitSimpleIdentifier_const() {
-    _visitNode(_makeTailVariable("v2", true));
-    _assertOneArc(_tail);
-  }
-
-  void test_visitSuperConstructorInvocation_const() {
-    _visitNode(_makeTailSuperConstructorInvocation("A", true));
-    _assertOneArc(_tail);
-  }
-
-  void test_visitSuperConstructorInvocation_nonConst() {
-    _visitNode(_makeTailSuperConstructorInvocation("A", false));
-    _assertOneArc(_tail);
-  }
-
-  void test_visitSuperConstructorInvocation_unresolved() {
-    SuperConstructorInvocation superConstructorInvocation =
-        AstFactory.superConstructorInvocation();
-    _visitNode(superConstructorInvocation);
-    _assertNoArcs();
-  }
-
-  void _assertNoArcs() {
-    Set<ConstantEvaluationTarget> tails = _referenceGraph.getTails(_head);
-    expect(tails, hasLength(0));
-  }
-
-  void _assertOneArc(Element tail) {
-    Set<ConstantEvaluationTarget> tails = _referenceGraph.getTails(_head);
-    expect(tails, hasLength(1));
-    expect(tails.first, same(tail));
-  }
-
-  ReferenceFinder _createReferenceFinder(ConstantEvaluationTarget source) =>
-      new ReferenceFinder((ConstantEvaluationTarget dependency) {
-        _referenceGraph.addEdge(source, dependency);
-      });
-  SuperConstructorInvocation _makeTailSuperConstructorInvocation(
-      String name, bool isConst) {
-    List<ConstructorInitializer> initializers =
-        new List<ConstructorInitializer>();
-    ConstructorDeclaration constructorDeclaration =
-        AstFactory.constructorDeclaration(AstFactory.identifier3(name), null,
-            AstFactory.formalParameterList(), initializers);
-    if (isConst) {
-      constructorDeclaration.constKeyword = new KeywordToken(Keyword.CONST, 0);
-    }
-    ClassElementImpl classElement = ElementFactory.classElement2(name);
-    SuperConstructorInvocation superConstructorInvocation =
-        AstFactory.superConstructorInvocation();
-    ConstructorElementImpl constructorElement =
-        ElementFactory.constructorElement(classElement, name, isConst);
-    _tail = constructorElement;
-    superConstructorInvocation.staticElement = constructorElement;
-    return superConstructorInvocation;
-  }
-
-  SimpleIdentifier _makeTailVariable(String name, bool isConst) {
-    VariableDeclaration variableDeclaration =
-        AstFactory.variableDeclaration(name);
-    ConstLocalVariableElementImpl variableElement =
-        ElementFactory.constLocalVariableElement(name);
-    _tail = variableElement;
-    variableElement.const3 = isConst;
-    AstFactory.variableDeclarationList2(
-        isConst ? Keyword.CONST : Keyword.VAR, [variableDeclaration]);
-    SimpleIdentifier identifier = AstFactory.identifier3(name);
-    identifier.staticElement = variableElement;
-    return identifier;
-  }
-
-  void _visitNode(AstNode node) {
-    node.accept(_createReferenceFinder(_head));
-  }
-}
-
-class _TestAnalysisContext extends TestAnalysisContext {
-  @override
-  InternalAnalysisContext getContextFor(Source source) => this;
-}
diff --git a/pkg/analyzer/test/generated/declaration_resolver_test.dart b/pkg/analyzer/test/generated/declaration_resolver_test.dart
index 4f0b214..fc3a4c3 100644
--- a/pkg/analyzer/test/generated/declaration_resolver_test.dart
+++ b/pkg/analyzer/test/generated/declaration_resolver_test.dart
@@ -10,11 +10,14 @@
 import 'package:analyzer/src/dart/ast/utilities.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/task/dart.dart';
+import 'package:analyzer/task/dart.dart';
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
 import '../utils.dart';
-import 'resolver_test.dart';
+import 'resolver_test_case.dart';
 import 'test_support.dart';
 
 main() {
@@ -145,6 +148,17 @@
     checkMetadata('import');
   }
 
+  void test_metadata_importDirective_partiallyResolved() {
+    addNamedSource('/foo.dart', 'class C {}');
+    this.code = 'const a = null; @a import "foo.dart";';
+    Source source = addNamedSource('/test.dart', code);
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    analysisContext.computeResult(source, LIBRARY_ELEMENT1);
+    unit = analysisContext.computeResult(target, RESOLVED_UNIT1);
+    unit2 = _cloneResolveUnit(unit);
+    checkMetadata('import');
+  }
+
   void test_metadata_libraryDirective() {
     setupCode('@a library L;');
     checkMetadata('L');
@@ -244,6 +258,18 @@
     super.setUp();
   }
 
+  void test_enumConstant_partiallyResolved() {
+    String code = r'''
+enum Fruit {apple, pear}
+''';
+    Source source = addNamedSource('/test.dart', code);
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    analysisContext.computeResult(source, LIBRARY_ELEMENT1);
+    CompilationUnit unit =
+        analysisContext.computeResult(target, RESOLVED_UNIT1);
+    _cloneResolveUnit(unit);
+  }
+
   void test_functionDeclaration_getter() {
     String code = r'''
 int get zzz => 42;
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
new file mode 100644
index 0000000..5eb564a
--- /dev/null
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -0,0 +1,1011 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.element_resolver_test;
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/generated/element_resolver.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/java_engine_io.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/generated/testing/ast_factory.dart';
+import 'package:analyzer/src/generated/testing/element_factory.dart';
+import 'package:analyzer/src/generated/testing/test_type_provider.dart';
+import 'package:unittest/unittest.dart';
+
+import '../reflective_tests.dart';
+import '../utils.dart';
+import 'analysis_context_factory.dart';
+import 'test_support.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(ElementResolverTest);
+}
+
+@reflectiveTest
+class ElementResolverTest extends EngineTestCase {
+  /**
+   * The error listener to which errors will be reported.
+   */
+  GatheringErrorListener _listener;
+
+  /**
+   * The type provider used to access the types.
+   */
+  TestTypeProvider _typeProvider;
+
+  /**
+   * The library containing the code being resolved.
+   */
+  LibraryElementImpl _definingLibrary;
+
+  /**
+   * The resolver visitor that maintains the state for the resolver.
+   */
+  ResolverVisitor _visitor;
+
+  /**
+   * The resolver being used to resolve the test cases.
+   */
+  ElementResolver _resolver;
+
+  void fail_visitExportDirective_combinators() {
+    fail("Not yet tested");
+    // Need to set up the exported library so that the identifier can be
+    // resolved.
+    ExportDirective directive = AstFactory.exportDirective2(null, [
+      AstFactory.hideCombinator2(["A"])
+    ]);
+    _resolveNode(directive);
+    _listener.assertNoErrors();
+  }
+
+  void fail_visitFunctionExpressionInvocation() {
+    fail("Not yet tested");
+    _listener.assertNoErrors();
+  }
+
+  void fail_visitImportDirective_combinators_noPrefix() {
+    fail("Not yet tested");
+    // Need to set up the imported library so that the identifier can be
+    // resolved.
+    ImportDirective directive = AstFactory.importDirective3(null, null, [
+      AstFactory.showCombinator2(["A"])
+    ]);
+    _resolveNode(directive);
+    _listener.assertNoErrors();
+  }
+
+  void fail_visitImportDirective_combinators_prefix() {
+    fail("Not yet tested");
+    // Need to set up the imported library so that the identifiers can be
+    // resolved.
+    String prefixName = "p";
+    _definingLibrary.imports = <ImportElement>[
+      ElementFactory.importFor(null, ElementFactory.prefix(prefixName))
+    ];
+    ImportDirective directive = AstFactory.importDirective3(null, prefixName, [
+      AstFactory.showCombinator2(["A"]),
+      AstFactory.hideCombinator2(["B"])
+    ]);
+    _resolveNode(directive);
+    _listener.assertNoErrors();
+  }
+
+  void fail_visitRedirectingConstructorInvocation() {
+    fail("Not yet tested");
+    _listener.assertNoErrors();
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    _listener = new GatheringErrorListener();
+    _typeProvider = new TestTypeProvider();
+    _resolver = _createResolver();
+  }
+
+  void test_lookUpMethodInInterfaces() {
+    InterfaceType intType = _typeProvider.intType;
+    //
+    // abstract class A { int operator[](int index); }
+    //
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    MethodElement operator =
+        ElementFactory.methodElement("[]", intType, [intType]);
+    classA.methods = <MethodElement>[operator];
+    //
+    // class B implements A {}
+    //
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    //
+    // class C extends Object with B {}
+    //
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    classC.mixins = <InterfaceType>[classB.type];
+    //
+    // class D extends C {}
+    //
+    ClassElementImpl classD = ElementFactory.classElement("D", classC.type);
+    //
+    // D a;
+    // a[i];
+    //
+    SimpleIdentifier array = AstFactory.identifier3("a");
+    array.staticType = classD.type;
+    IndexExpression expression =
+        AstFactory.indexExpression(array, AstFactory.identifier3("i"));
+    expect(_resolveIndexExpression(expression), same(operator));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitAssignmentExpression_compound() {
+    InterfaceType intType = _typeProvider.intType;
+    SimpleIdentifier leftHandSide = AstFactory.identifier3("a");
+    leftHandSide.staticType = intType;
+    AssignmentExpression assignment = AstFactory.assignmentExpression(
+        leftHandSide, TokenType.PLUS_EQ, AstFactory.integer(1));
+    _resolveNode(assignment);
+    expect(
+        assignment.staticElement, same(getMethod(_typeProvider.numType, "+")));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitAssignmentExpression_simple() {
+    AssignmentExpression expression = AstFactory.assignmentExpression(
+        AstFactory.identifier3("x"), TokenType.EQ, AstFactory.integer(0));
+    _resolveNode(expression);
+    expect(expression.staticElement, isNull);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_bangEq() {
+    // String i;
+    // var j;
+    // i == j
+    InterfaceType stringType = _typeProvider.stringType;
+    SimpleIdentifier left = AstFactory.identifier3("i");
+    left.staticType = stringType;
+    BinaryExpression expression = AstFactory.binaryExpression(
+        left, TokenType.BANG_EQ, AstFactory.identifier3("j"));
+    _resolveNode(expression);
+    var stringElement = stringType.element;
+    expect(expression.staticElement, isNotNull);
+    expect(
+        expression.staticElement,
+        stringElement.lookUpMethod(
+            TokenType.EQ_EQ.lexeme, stringElement.library));
+    expect(expression.propagatedElement, isNull);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_eq() {
+    // String i;
+    // var j;
+    // i == j
+    InterfaceType stringType = _typeProvider.stringType;
+    SimpleIdentifier left = AstFactory.identifier3("i");
+    left.staticType = stringType;
+    BinaryExpression expression = AstFactory.binaryExpression(
+        left, TokenType.EQ_EQ, AstFactory.identifier3("j"));
+    _resolveNode(expression);
+    var stringElement = stringType.element;
+    expect(
+        expression.staticElement,
+        stringElement.lookUpMethod(
+            TokenType.EQ_EQ.lexeme, stringElement.library));
+    expect(expression.propagatedElement, isNull);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_plus() {
+    // num i;
+    // var j;
+    // i + j
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier left = AstFactory.identifier3("i");
+    left.staticType = numType;
+    BinaryExpression expression = AstFactory.binaryExpression(
+        left, TokenType.PLUS, AstFactory.identifier3("j"));
+    _resolveNode(expression);
+    expect(expression.staticElement, getMethod(numType, "+"));
+    expect(expression.propagatedElement, isNull);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_plus_propagatedElement() {
+    // var i = 1;
+    // var j;
+    // i + j
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier left = AstFactory.identifier3("i");
+    left.propagatedType = numType;
+    BinaryExpression expression = AstFactory.binaryExpression(
+        left, TokenType.PLUS, AstFactory.identifier3("j"));
+    _resolveNode(expression);
+    expect(expression.staticElement, isNull);
+    expect(expression.propagatedElement, getMethod(numType, "+"));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBreakStatement_withLabel() {
+    // loop: while (true) {
+    //   break loop;
+    // }
+    String label = "loop";
+    LabelElementImpl labelElement = new LabelElementImpl.forNode(
+        AstFactory.identifier3(label), false, false);
+    BreakStatement breakStatement = AstFactory.breakStatement2(label);
+    Expression condition = AstFactory.booleanLiteral(true);
+    WhileStatement whileStatement =
+        AstFactory.whileStatement(condition, breakStatement);
+    expect(_resolveBreak(breakStatement, labelElement, whileStatement),
+        same(labelElement));
+    expect(breakStatement.target, same(whileStatement));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBreakStatement_withoutLabel() {
+    BreakStatement statement = AstFactory.breakStatement();
+    _resolveStatement(statement, null, null);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitCommentReference_prefixedIdentifier_class_getter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    // set accessors
+    String propName = "p";
+    PropertyAccessorElement getter =
+        ElementFactory.getterElement(propName, false, _typeProvider.intType);
+    PropertyAccessorElement setter =
+        ElementFactory.setterElement(propName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getter, setter];
+    // set name scope
+    _visitor.nameScope = new EnclosedScope(null)
+      ..defineNameWithoutChecking('A', classA);
+    // prepare "A.p"
+    PrefixedIdentifier prefixed = AstFactory.identifier5('A', 'p');
+    CommentReference commentReference = new CommentReference(null, prefixed);
+    // resolve
+    _resolveNode(commentReference);
+    expect(prefixed.prefix.staticElement, classA);
+    expect(prefixed.identifier.staticElement, getter);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitCommentReference_prefixedIdentifier_class_method() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    // set method
+    MethodElement method =
+        ElementFactory.methodElement("m", _typeProvider.intType);
+    classA.methods = <MethodElement>[method];
+    // set name scope
+    _visitor.nameScope = new EnclosedScope(null)
+      ..defineNameWithoutChecking('A', classA);
+    // prepare "A.m"
+    PrefixedIdentifier prefixed = AstFactory.identifier5('A', 'm');
+    CommentReference commentReference = new CommentReference(null, prefixed);
+    // resolve
+    _resolveNode(commentReference);
+    expect(prefixed.prefix.staticElement, classA);
+    expect(prefixed.identifier.staticElement, method);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitConstructorName_named() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String constructorName = "a";
+    ConstructorElement constructor =
+        ElementFactory.constructorElement2(classA, constructorName);
+    classA.constructors = <ConstructorElement>[constructor];
+    ConstructorName name = AstFactory.constructorName(
+        AstFactory.typeName(classA), constructorName);
+    _resolveNode(name);
+    expect(name.staticElement, same(constructor));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitConstructorName_unnamed() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String constructorName = null;
+    ConstructorElement constructor =
+        ElementFactory.constructorElement2(classA, constructorName);
+    classA.constructors = <ConstructorElement>[constructor];
+    ConstructorName name = AstFactory.constructorName(
+        AstFactory.typeName(classA), constructorName);
+    _resolveNode(name);
+    expect(name.staticElement, same(constructor));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitContinueStatement_withLabel() {
+    // loop: while (true) {
+    //   continue loop;
+    // }
+    String label = "loop";
+    LabelElementImpl labelElement = new LabelElementImpl.forNode(
+        AstFactory.identifier3(label), false, false);
+    ContinueStatement continueStatement = AstFactory.continueStatement(label);
+    Expression condition = AstFactory.booleanLiteral(true);
+    WhileStatement whileStatement =
+        AstFactory.whileStatement(condition, continueStatement);
+    expect(_resolveContinue(continueStatement, labelElement, whileStatement),
+        same(labelElement));
+    expect(continueStatement.target, same(whileStatement));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitContinueStatement_withoutLabel() {
+    ContinueStatement statement = AstFactory.continueStatement();
+    _resolveStatement(statement, null, null);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitEnumDeclaration() {
+    CompilationUnitElementImpl compilationUnitElement =
+        ElementFactory.compilationUnit('foo.dart');
+    ClassElementImpl enumElement =
+        ElementFactory.enumElement(_typeProvider, ('E'));
+    compilationUnitElement.enums = <ClassElement>[enumElement];
+    EnumDeclaration enumNode = AstFactory.enumDeclaration2('E', []);
+    Annotation annotationNode =
+        AstFactory.annotation(AstFactory.identifier3('a'));
+    annotationNode.element = ElementFactory.classElement2('A');
+    annotationNode.elementAnnotation =
+        new ElementAnnotationImpl(compilationUnitElement);
+    enumNode.metadata.add(annotationNode);
+    enumNode.name.staticElement = enumElement;
+    List<ElementAnnotation> metadata = <ElementAnnotation>[
+      annotationNode.elementAnnotation
+    ];
+    _resolveNode(enumNode);
+    expect(metadata[0].element, annotationNode.element);
+  }
+
+  void test_visitExportDirective_noCombinators() {
+    ExportDirective directive = AstFactory.exportDirective2(null);
+    directive.element = ElementFactory
+        .exportFor(ElementFactory.library(_definingLibrary.context, "lib"));
+    _resolveNode(directive);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFieldFormalParameter() {
+    String fieldName = "f";
+    InterfaceType intType = _typeProvider.intType;
+    FieldElementImpl fieldElement =
+        ElementFactory.fieldElement(fieldName, false, false, false, intType);
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.fields = <FieldElement>[fieldElement];
+    FieldFormalParameter parameter =
+        AstFactory.fieldFormalParameter2(fieldName);
+    FieldFormalParameterElementImpl parameterElement =
+        ElementFactory.fieldFormalParameter(parameter.identifier);
+    parameterElement.field = fieldElement;
+    parameterElement.type = intType;
+    parameter.identifier.staticElement = parameterElement;
+    _resolveInClass(parameter, classA);
+    expect(parameter.element.type, same(intType));
+  }
+
+  void test_visitImportDirective_noCombinators_noPrefix() {
+    ImportDirective directive = AstFactory.importDirective3(null, null);
+    directive.element = ElementFactory.importFor(
+        ElementFactory.library(_definingLibrary.context, "lib"), null);
+    _resolveNode(directive);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitImportDirective_noCombinators_prefix() {
+    String prefixName = "p";
+    ImportElement importElement = ElementFactory.importFor(
+        ElementFactory.library(_definingLibrary.context, "lib"),
+        ElementFactory.prefix(prefixName));
+    _definingLibrary.imports = <ImportElement>[importElement];
+    ImportDirective directive = AstFactory.importDirective3(null, prefixName);
+    directive.element = importElement;
+    _resolveNode(directive);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitImportDirective_withCombinators() {
+    ShowCombinator combinator = AstFactory.showCombinator2(["A", "B", "C"]);
+    ImportDirective directive =
+        AstFactory.importDirective3(null, null, [combinator]);
+    LibraryElementImpl library =
+        ElementFactory.library(_definingLibrary.context, "lib");
+    TopLevelVariableElementImpl varA =
+        ElementFactory.topLevelVariableElement2("A");
+    TopLevelVariableElementImpl varB =
+        ElementFactory.topLevelVariableElement2("B");
+    TopLevelVariableElementImpl varC =
+        ElementFactory.topLevelVariableElement2("C");
+    CompilationUnitElementImpl unit =
+        library.definingCompilationUnit as CompilationUnitElementImpl;
+    unit.accessors = <PropertyAccessorElement>[
+      varA.getter,
+      varA.setter,
+      varB.getter,
+      varC.setter
+    ];
+    unit.topLevelVariables = <TopLevelVariableElement>[varA, varB, varC];
+    directive.element = ElementFactory.importFor(library, null);
+    _resolveNode(directive);
+    expect(combinator.shownNames[0].staticElement, same(varA));
+    expect(combinator.shownNames[1].staticElement, same(varB));
+    expect(combinator.shownNames[2].staticElement, same(varC));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIndexExpression_get() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    InterfaceType intType = _typeProvider.intType;
+    MethodElement getter =
+        ElementFactory.methodElement("[]", intType, [intType]);
+    classA.methods = <MethodElement>[getter];
+    SimpleIdentifier array = AstFactory.identifier3("a");
+    array.staticType = classA.type;
+    IndexExpression expression =
+        AstFactory.indexExpression(array, AstFactory.identifier3("i"));
+    expect(_resolveIndexExpression(expression), same(getter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIndexExpression_set() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    InterfaceType intType = _typeProvider.intType;
+    MethodElement setter =
+        ElementFactory.methodElement("[]=", intType, [intType]);
+    classA.methods = <MethodElement>[setter];
+    SimpleIdentifier array = AstFactory.identifier3("a");
+    array.staticType = classA.type;
+    IndexExpression expression =
+        AstFactory.indexExpression(array, AstFactory.identifier3("i"));
+    AstFactory.assignmentExpression(
+        expression, TokenType.EQ, AstFactory.integer(0));
+    expect(_resolveIndexExpression(expression), same(setter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitInstanceCreationExpression_named() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String constructorName = "a";
+    ConstructorElement constructor =
+        ElementFactory.constructorElement2(classA, constructorName);
+    classA.constructors = <ConstructorElement>[constructor];
+    ConstructorName name = AstFactory.constructorName(
+        AstFactory.typeName(classA), constructorName);
+    name.staticElement = constructor;
+    InstanceCreationExpression creation =
+        AstFactory.instanceCreationExpression(Keyword.NEW, name);
+    _resolveNode(creation);
+    expect(creation.staticElement, same(constructor));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitInstanceCreationExpression_unnamed() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String constructorName = null;
+    ConstructorElement constructor =
+        ElementFactory.constructorElement2(classA, constructorName);
+    classA.constructors = <ConstructorElement>[constructor];
+    ConstructorName name = AstFactory.constructorName(
+        AstFactory.typeName(classA), constructorName);
+    name.staticElement = constructor;
+    InstanceCreationExpression creation =
+        AstFactory.instanceCreationExpression(Keyword.NEW, name);
+    _resolveNode(creation);
+    expect(creation.staticElement, same(constructor));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitInstanceCreationExpression_unnamed_namedParameter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String constructorName = null;
+    ConstructorElementImpl constructor =
+        ElementFactory.constructorElement2(classA, constructorName);
+    String parameterName = "a";
+    ParameterElement parameter = ElementFactory.namedParameter(parameterName);
+    constructor.parameters = <ParameterElement>[parameter];
+    classA.constructors = <ConstructorElement>[constructor];
+    ConstructorName name = AstFactory.constructorName(
+        AstFactory.typeName(classA), constructorName);
+    name.staticElement = constructor;
+    InstanceCreationExpression creation = AstFactory.instanceCreationExpression(
+        Keyword.NEW,
+        name,
+        [AstFactory.namedExpression2(parameterName, AstFactory.integer(0))]);
+    _resolveNode(creation);
+    expect(creation.staticElement, same(constructor));
+    expect(
+        (creation.argumentList.arguments[0] as NamedExpression)
+            .name
+            .label
+            .staticElement,
+        same(parameter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitMethodInvocation() {
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier left = AstFactory.identifier3("i");
+    left.staticType = numType;
+    String methodName = "abs";
+    MethodInvocation invocation = AstFactory.methodInvocation(left, methodName);
+    _resolveNode(invocation);
+    expect(invocation.methodName.staticElement,
+        same(getMethod(numType, methodName)));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitMethodInvocation_namedParameter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    String parameterName = "p";
+    MethodElementImpl method = ElementFactory.methodElement(methodName, null);
+    ParameterElement parameter = ElementFactory.namedParameter(parameterName);
+    method.parameters = <ParameterElement>[parameter];
+    classA.methods = <MethodElement>[method];
+    SimpleIdentifier left = AstFactory.identifier3("i");
+    left.staticType = classA.type;
+    MethodInvocation invocation = AstFactory.methodInvocation(left, methodName,
+        [AstFactory.namedExpression2(parameterName, AstFactory.integer(0))]);
+    _resolveNode(invocation);
+    expect(invocation.methodName.staticElement, same(method));
+    expect(
+        (invocation.argumentList.arguments[0] as NamedExpression)
+            .name
+            .label
+            .staticElement,
+        same(parameter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPostfixExpression() {
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier operand = AstFactory.identifier3("i");
+    operand.staticType = numType;
+    PostfixExpression expression =
+        AstFactory.postfixExpression(operand, TokenType.PLUS_PLUS);
+    _resolveNode(expression);
+    expect(expression.staticElement, getMethod(numType, "+"));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixedIdentifier_dynamic() {
+    DartType dynamicType = _typeProvider.dynamicType;
+    SimpleIdentifier target = AstFactory.identifier3("a");
+    VariableElementImpl variable = ElementFactory.localVariableElement(target);
+    variable.type = dynamicType;
+    target.staticElement = variable;
+    target.staticType = dynamicType;
+    PrefixedIdentifier identifier =
+        AstFactory.identifier(target, AstFactory.identifier3("b"));
+    _resolveNode(identifier);
+    expect(identifier.staticElement, isNull);
+    expect(identifier.identifier.staticElement, isNull);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixedIdentifier_nonDynamic() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "b";
+    PropertyAccessorElement getter =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getter];
+    SimpleIdentifier target = AstFactory.identifier3("a");
+    VariableElementImpl variable = ElementFactory.localVariableElement(target);
+    variable.type = classA.type;
+    target.staticElement = variable;
+    target.staticType = classA.type;
+    PrefixedIdentifier identifier =
+        AstFactory.identifier(target, AstFactory.identifier3(getterName));
+    _resolveNode(identifier);
+    expect(identifier.staticElement, same(getter));
+    expect(identifier.identifier.staticElement, same(getter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixedIdentifier_staticClassMember_getter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    // set accessors
+    String propName = "b";
+    PropertyAccessorElement getter =
+        ElementFactory.getterElement(propName, false, _typeProvider.intType);
+    PropertyAccessorElement setter =
+        ElementFactory.setterElement(propName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getter, setter];
+    // prepare "A.m"
+    SimpleIdentifier target = AstFactory.identifier3("A");
+    target.staticElement = classA;
+    target.staticType = classA.type;
+    PrefixedIdentifier identifier =
+        AstFactory.identifier(target, AstFactory.identifier3(propName));
+    // resolve
+    _resolveNode(identifier);
+    expect(identifier.staticElement, same(getter));
+    expect(identifier.identifier.staticElement, same(getter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixedIdentifier_staticClassMember_method() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    // set methods
+    String propName = "m";
+    MethodElement method =
+        ElementFactory.methodElement("m", _typeProvider.intType);
+    classA.methods = <MethodElement>[method];
+    // prepare "A.m"
+    SimpleIdentifier target = AstFactory.identifier3("A");
+    target.staticElement = classA;
+    target.staticType = classA.type;
+    PrefixedIdentifier identifier =
+        AstFactory.identifier(target, AstFactory.identifier3(propName));
+    AstFactory.assignmentExpression(
+        identifier, TokenType.EQ, AstFactory.nullLiteral());
+    // resolve
+    _resolveNode(identifier);
+    expect(identifier.staticElement, same(method));
+    expect(identifier.identifier.staticElement, same(method));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixedIdentifier_staticClassMember_setter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    // set accessors
+    String propName = "b";
+    PropertyAccessorElement getter =
+        ElementFactory.getterElement(propName, false, _typeProvider.intType);
+    PropertyAccessorElement setter =
+        ElementFactory.setterElement(propName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getter, setter];
+    // prepare "A.b = null"
+    SimpleIdentifier target = AstFactory.identifier3("A");
+    target.staticElement = classA;
+    target.staticType = classA.type;
+    PrefixedIdentifier identifier =
+        AstFactory.identifier(target, AstFactory.identifier3(propName));
+    AstFactory.assignmentExpression(
+        identifier, TokenType.EQ, AstFactory.nullLiteral());
+    // resolve
+    _resolveNode(identifier);
+    expect(identifier.staticElement, same(setter));
+    expect(identifier.identifier.staticElement, same(setter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixExpression() {
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier operand = AstFactory.identifier3("i");
+    operand.staticType = numType;
+    PrefixExpression expression =
+        AstFactory.prefixExpression(TokenType.PLUS_PLUS, operand);
+    _resolveNode(expression);
+    expect(expression.staticElement, getMethod(numType, "+"));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPropertyAccess_getter_identifier() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "b";
+    PropertyAccessorElement getter =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getter];
+    SimpleIdentifier target = AstFactory.identifier3("a");
+    target.staticType = classA.type;
+    PropertyAccess access = AstFactory.propertyAccess2(target, getterName);
+    _resolveNode(access);
+    expect(access.propertyName.staticElement, same(getter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPropertyAccess_getter_super() {
+    //
+    // class A {
+    //  int get b;
+    // }
+    // class B {
+    //   ... super.m ...
+    // }
+    //
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "b";
+    PropertyAccessorElement getter =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getter];
+    SuperExpression target = AstFactory.superExpression();
+    target.staticType = ElementFactory.classElement("B", classA.type).type;
+    PropertyAccess access = AstFactory.propertyAccess2(target, getterName);
+    AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
+        AstFactory.expressionFunctionBody(access));
+    _resolveNode(access);
+    expect(access.propertyName.staticElement, same(getter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPropertyAccess_setter_this() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String setterName = "b";
+    PropertyAccessorElement setter =
+        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[setter];
+    ThisExpression target = AstFactory.thisExpression();
+    target.staticType = classA.type;
+    PropertyAccess access = AstFactory.propertyAccess2(target, setterName);
+    AstFactory.assignmentExpression(
+        access, TokenType.EQ, AstFactory.integer(0));
+    _resolveNode(access);
+    expect(access.propertyName.staticElement, same(setter));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSimpleIdentifier_classScope() {
+    InterfaceType doubleType = _typeProvider.doubleType;
+    String fieldName = "NAN";
+    SimpleIdentifier node = AstFactory.identifier3(fieldName);
+    _resolveInClass(node, doubleType.element);
+    expect(node.staticElement, getGetter(doubleType, fieldName));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSimpleIdentifier_dynamic() {
+    SimpleIdentifier node = AstFactory.identifier3("dynamic");
+    _resolveIdentifier(node);
+    expect(node.staticElement, same(_typeProvider.dynamicType.element));
+    expect(node.staticType, same(_typeProvider.typeType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSimpleIdentifier_lexicalScope() {
+    SimpleIdentifier node = AstFactory.identifier3("i");
+    VariableElementImpl element = ElementFactory.localVariableElement(node);
+    expect(_resolveIdentifier(node, [element]), same(element));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSimpleIdentifier_lexicalScope_field_setter() {
+    InterfaceType intType = _typeProvider.intType;
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String fieldName = "a";
+    FieldElement field =
+        ElementFactory.fieldElement(fieldName, false, false, false, intType);
+    classA.fields = <FieldElement>[field];
+    classA.accessors = <PropertyAccessorElement>[field.getter, field.setter];
+    SimpleIdentifier node = AstFactory.identifier3(fieldName);
+    AstFactory.assignmentExpression(node, TokenType.EQ, AstFactory.integer(0));
+    _resolveInClass(node, classA);
+    Element element = node.staticElement;
+    EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccessorElement,
+        PropertyAccessorElement, element);
+    expect((element as PropertyAccessorElement).isSetter, isTrue);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSuperConstructorInvocation() {
+    ClassElementImpl superclass = ElementFactory.classElement2("A");
+    ConstructorElementImpl superConstructor =
+        ElementFactory.constructorElement2(superclass, null);
+    superclass.constructors = <ConstructorElement>[superConstructor];
+    ClassElementImpl subclass =
+        ElementFactory.classElement("B", superclass.type);
+    ConstructorElementImpl subConstructor =
+        ElementFactory.constructorElement2(subclass, null);
+    subclass.constructors = <ConstructorElement>[subConstructor];
+    SuperConstructorInvocation invocation =
+        AstFactory.superConstructorInvocation();
+    _resolveInClass(invocation, subclass);
+    expect(invocation.staticElement, superConstructor);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSuperConstructorInvocation_namedParameter() {
+    ClassElementImpl superclass = ElementFactory.classElement2("A");
+    ConstructorElementImpl superConstructor =
+        ElementFactory.constructorElement2(superclass, null);
+    String parameterName = "p";
+    ParameterElement parameter = ElementFactory.namedParameter(parameterName);
+    superConstructor.parameters = <ParameterElement>[parameter];
+    superclass.constructors = <ConstructorElement>[superConstructor];
+    ClassElementImpl subclass =
+        ElementFactory.classElement("B", superclass.type);
+    ConstructorElementImpl subConstructor =
+        ElementFactory.constructorElement2(subclass, null);
+    subclass.constructors = <ConstructorElement>[subConstructor];
+    SuperConstructorInvocation invocation = AstFactory
+        .superConstructorInvocation([
+      AstFactory.namedExpression2(parameterName, AstFactory.integer(0))
+    ]);
+    _resolveInClass(invocation, subclass);
+    expect(invocation.staticElement, superConstructor);
+    expect(
+        (invocation.argumentList.arguments[0] as NamedExpression)
+            .name
+            .label
+            .staticElement,
+        same(parameter));
+    _listener.assertNoErrors();
+  }
+
+  /**
+   * Create the resolver used by the tests.
+   *
+   * @return the resolver that was created
+   */
+  ElementResolver _createResolver() {
+    InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
+    FileBasedSource source =
+        new FileBasedSource(FileUtilities2.createFile("/test.dart"));
+    CompilationUnitElementImpl definingCompilationUnit =
+        new CompilationUnitElementImpl("test.dart");
+    definingCompilationUnit.librarySource =
+        definingCompilationUnit.source = source;
+    _definingLibrary = ElementFactory.library(context, "test");
+    _definingLibrary.definingCompilationUnit = definingCompilationUnit;
+    _visitor = new ResolverVisitor(
+        _definingLibrary, source, _typeProvider, _listener,
+        nameScope: new LibraryScope(_definingLibrary, _listener));
+    try {
+      return _visitor.elementResolver;
+    } catch (exception) {
+      throw new IllegalArgumentException(
+          "Could not create resolver", exception);
+    }
+  }
+
+  /**
+   * Return the element associated with the label of [statement] after the
+   * resolver has resolved it.  [labelElement] is the label element to be
+   * defined in the statement's label scope, and [labelTarget] is the statement
+   * the label resolves to.
+   */
+  Element _resolveBreak(BreakStatement statement, LabelElementImpl labelElement,
+      Statement labelTarget) {
+    _resolveStatement(statement, labelElement, labelTarget);
+    return statement.label.staticElement;
+  }
+
+  /**
+   * Return the element associated with the label [statement] after the
+   * resolver has resolved it.  [labelElement] is the label element to be
+   * defined in the statement's label scope, and [labelTarget] is the AST node
+   * the label resolves to.
+   *
+   * @param statement the statement to be resolved
+   * @param labelElement the label element to be defined in the statement's label scope
+   * @return the element to which the statement's label was resolved
+   */
+  Element _resolveContinue(ContinueStatement statement,
+      LabelElementImpl labelElement, AstNode labelTarget) {
+    _resolveStatement(statement, labelElement, labelTarget);
+    return statement.label.staticElement;
+  }
+
+  /**
+   * Return the element associated with the given identifier after the resolver has resolved the
+   * identifier.
+   *
+   * @param node the expression to be resolved
+   * @param definedElements the elements that are to be defined in the scope in which the element is
+   *          being resolved
+   * @return the element to which the expression was resolved
+   */
+  Element _resolveIdentifier(Identifier node, [List<Element> definedElements]) {
+    _resolveNode(node, definedElements);
+    return node.staticElement;
+  }
+
+  /**
+   * Return the element associated with the given identifier after the resolver has resolved the
+   * identifier.
+   *
+   * @param node the expression to be resolved
+   * @param enclosingClass the element representing the class enclosing the identifier
+   * @return the element to which the expression was resolved
+   */
+  void _resolveInClass(AstNode node, ClassElement enclosingClass) {
+    try {
+      Scope outerScope = _visitor.nameScope;
+      try {
+        _visitor.enclosingClass = enclosingClass;
+        EnclosedScope innerScope = new ClassScope(
+            new TypeParameterScope(outerScope, enclosingClass), enclosingClass);
+        _visitor.nameScope = innerScope;
+        node.accept(_resolver);
+      } finally {
+        _visitor.enclosingClass = null;
+        _visitor.nameScope = outerScope;
+      }
+    } catch (exception) {
+      throw new IllegalArgumentException("Could not resolve node", exception);
+    }
+  }
+
+  /**
+   * Return the element associated with the given expression after the resolver has resolved the
+   * expression.
+   *
+   * @param node the expression to be resolved
+   * @param definedElements the elements that are to be defined in the scope in which the element is
+   *          being resolved
+   * @return the element to which the expression was resolved
+   */
+  Element _resolveIndexExpression(IndexExpression node,
+      [List<Element> definedElements]) {
+    _resolveNode(node, definedElements);
+    return node.staticElement;
+  }
+
+  /**
+   * Return the element associated with the given identifier after the resolver has resolved the
+   * identifier.
+   *
+   * @param node the expression to be resolved
+   * @param definedElements the elements that are to be defined in the scope in which the element is
+   *          being resolved
+   * @return the element to which the expression was resolved
+   */
+  void _resolveNode(AstNode node, [List<Element> definedElements]) {
+    try {
+      Scope outerScope = _visitor.nameScope;
+      try {
+        EnclosedScope innerScope = new EnclosedScope(outerScope);
+        if (definedElements != null) {
+          for (Element element in definedElements) {
+            innerScope.define(element);
+          }
+        }
+        _visitor.nameScope = innerScope;
+        node.accept(_resolver);
+      } finally {
+        _visitor.nameScope = outerScope;
+      }
+    } catch (exception) {
+      throw new IllegalArgumentException("Could not resolve node", exception);
+    }
+  }
+
+  /**
+   * Return the element associated with the label of the given statement after the resolver has
+   * resolved the statement.
+   *
+   * @param statement the statement to be resolved
+   * @param labelElement the label element to be defined in the statement's label scope
+   * @return the element to which the statement's label was resolved
+   */
+  void _resolveStatement(
+      Statement statement, LabelElementImpl labelElement, AstNode labelTarget) {
+    try {
+      LabelScope outerScope = _visitor.labelScope;
+      try {
+        LabelScope innerScope;
+        if (labelElement == null) {
+          innerScope = outerScope;
+        } else {
+          innerScope = new LabelScope(
+              outerScope, labelElement.name, labelTarget, labelElement);
+        }
+        _visitor.labelScope = innerScope;
+        statement.accept(_resolver);
+      } finally {
+        _visitor.labelScope = outerScope;
+      }
+    } catch (exception) {
+      throw new IllegalArgumentException("Could not resolve node", exception);
+    }
+  }
+}
diff --git a/pkg/analyzer/test/generated/engine_test.dart b/pkg/analyzer/test/generated/engine_test.dart
index f15ece1..f922d25 100644
--- a/pkg/analyzer/test/generated/engine_test.dart
+++ b/pkg/analyzer/test/generated/engine_test.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/source/embedder.dart';
+import 'package:analyzer/src/cancelable_future.dart';
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/context/source.dart';
@@ -417,14 +418,15 @@
   }
 
   @override
-  Future<CompilationUnit> computeResolvedCompilationUnitAsync(
+  CancelableFuture<CompilationUnit> computeResolvedCompilationUnitAsync(
       Source source, Source librarySource) {
     fail("Unexpected invocation of getResolvedCompilationUnitFuture");
     return null;
   }
 
   @override
-  Object computeResult(AnalysisTarget target, ResultDescriptor result) {
+  Object/*=V*/ computeResult/*<V>*/(
+      AnalysisTarget target, ResultDescriptor/*<V>*/ result) {
     fail("Unexpected invocation of computeResult");
     return null;
   }
@@ -460,7 +462,7 @@
   }
 
   @override
-  Object getConfigurationData(ResultDescriptor key) {
+  Object/*=V*/ getConfigurationData/*<V>*/(ResultDescriptor/*<V>*/ key) {
     fail("Unexpected invocation of getConfigurationData");
     return null;
   }
@@ -564,7 +566,8 @@
   }
 
   @override
-  Object getResult(AnalysisTarget target, ResultDescriptor result) {
+  Object/*=V*/ getResult/*<V>*/(
+      AnalysisTarget target, ResultDescriptor/*<V>*/ result) {
     fail("Unexpected invocation of getResult");
     return null;
   }
@@ -600,6 +603,13 @@
   }
 
   @override
+  Stream<ResultChangedEvent> onResultChanged(ResultDescriptor descriptor) {
+    fail("Unexpected invocation of onResultChanged");
+    return null;
+  }
+
+  @deprecated
+  @override
   Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
     fail("Unexpected invocation of onResultComputed");
     return null;
diff --git a/pkg/analyzer/test/generated/error_suppression_test.dart b/pkg/analyzer/test/generated/error_suppression_test.dart
index da6c49d..c77bb3d 100644
--- a/pkg/analyzer/test/generated/error_suppression_test.dart
+++ b/pkg/analyzer/test/generated/error_suppression_test.dart
@@ -8,7 +8,7 @@
 
 import '../reflective_tests.dart';
 import '../utils.dart';
-import 'resolver_test.dart';
+import 'resolver_test_case.dart';
 
 main() {
   initializeTestEnvironment();
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
new file mode 100644
index 0000000..168c471
--- /dev/null
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -0,0 +1,3249 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.hint_code_test;
+
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:unittest/unittest.dart';
+
+import '../reflective_tests.dart';
+import '../utils.dart';
+import 'analysis_context_factory.dart';
+import 'resolver_test_case.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(HintCodeTest);
+}
+
+@reflectiveTest
+class HintCodeTest extends ResolverTestCase {
+  void fail_deadCode_statementAfterRehrow() {
+    Source source = addSource(r'''
+f() {
+  try {
+    var one = 1;
+  } catch (e) {
+    rethrow;
+    var two = 2;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void fail_deadCode_statementAfterThrow() {
+    Source source = addSource(r'''
+f() {
+  var one = 1;
+  throw 'Stop here';
+  var two = 2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void fail_isInt() {
+    Source source = addSource("var v = 1 is int;");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.IS_INT]);
+    verify([source]);
+  }
+
+  void fail_isNotInt() {
+    Source source = addSource("var v = 1 is! int;");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.IS_NOT_INT]);
+    verify([source]);
+  }
+
+  void fail_overrideEqualsButNotHashCode() {
+    Source source = addSource(r'''
+class A {
+  bool operator ==(x) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE]);
+    verify([source]);
+  }
+
+  void fail_unusedImport_as_equalPrefixes() {
+    // See todo at ImportsVerifier.prefixElementMap.
+    Source source = addSource(r'''
+library L;
+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 {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_IMPORT]);
+    assertNoErrors(source2);
+    assertNoErrors(source3);
+    verify([source, source2, source3]);
+  }
+
+  @override
+  void reset() {
+    analysisContext2 = AnalysisContextFactory.contextWithCoreAndPackages({
+      'package:meta/meta.dart': r'''
+library meta;
+
+const _Factory factory = const _Factory();
+const _Literal literal = const _Literal();
+const _MustCallSuper mustCallSuper = const _MustCallSuper();
+const _Override override = const _Override();
+const _Protected protected = const _Protected();
+const Required required = const Required();
+class Required {
+  final String reason;
+  const Required([this.reason]);
+}
+
+class _Factory {
+  const _Factory();
+}
+class _Literal {
+  const _Literal();
+}
+class _MustCallSuper {
+  const _MustCallSuper();
+}
+class _Override {
+  const _Override();
+}
+class _Protected {
+  const _Protected();
+}
+class _Required {
+  final String reason;
+  const _Required([this.reason]));
+}
+''',
+      'package:js/js.dart': r'''
+library js;
+class JS {
+  const JS([String js]) { }
+}
+'''
+    });
+  }
+
+  void test_argumentTypeNotAssignable_functionType() {
+    Source source = addSource(r'''
+m() {
+  var a = new A();
+  a.n(() => 0);
+}
+class A {
+  n(void f(int i)) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+
+  void test_argumentTypeNotAssignable_message() {
+    // The implementation of HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE assumes that
+    // StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE has the same message.
+    expect(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE.message,
+        HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE.message);
+  }
+
+  void test_argumentTypeNotAssignable_type() {
+    Source source = addSource(r'''
+m() {
+  var i = '';
+  n(i);
+}
+n(int i) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+
+  void test_canBeNullAfterNullAware_false_methodInvocation() {
+    Source source = addSource(r'''
+m(x) {
+  x?.a()?.b();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_canBeNullAfterNullAware_false_propertyAccess() {
+    Source source = addSource(r'''
+m(x) {
+  x?.a?.b;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_canBeNullAfterNullAware_methodInvocation() {
+    Source source = addSource(r'''
+m(x) {
+  x?.a.b();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+    verify([source]);
+  }
+
+  void test_canBeNullAfterNullAware_parenthesized() {
+    Source source = addSource(r'''
+m(x) {
+  (x?.a).b;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+    verify([source]);
+  }
+
+  void test_canBeNullAfterNullAware_propertyAccess() {
+    Source source = addSource(r'''
+m(x) {
+  x?.a.b;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_conditionalElse() {
+    Source source = addSource(r'''
+f() {
+  true ? 1 : 2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_conditionalElse_nested() {
+    // test that a dead else-statement can't generate additional violations
+    Source source = addSource(r'''
+f() {
+  true ? true : false && false;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_conditionalIf() {
+    Source source = addSource(r'''
+f() {
+  false ? 1 : 2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_conditionalIf_nested() {
+    // test that a dead then-statement can't generate additional violations
+    Source source = addSource(r'''
+f() {
+  false ? false && false : true;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_else() {
+    Source source = addSource(r'''
+f() {
+  if(true) {} else {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_else_nested() {
+    // test that a dead else-statement can't generate additional violations
+    Source source = addSource(r'''
+f() {
+  if(true) {} else {if (false) {}}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_if() {
+    Source source = addSource(r'''
+f() {
+  if(false) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_if_nested() {
+    // test that a dead then-statement can't generate additional violations
+    Source source = addSource(r'''
+f() {
+  if(false) {if(false) {}}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_while() {
+    Source source = addSource(r'''
+f() {
+  while(false) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_while_nested() {
+    // test that a dead while body can't generate additional violations
+    Source source = addSource(r'''
+f() {
+  while(false) {if(false) {}}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadCatch_catchFollowingCatch() {
+    Source source = addSource(r'''
+class A {}
+f() {
+  try {} catch (e) {} catch (e) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadCatch_catchFollowingCatch_nested() {
+    // 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) {}}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadCatch_catchFollowingCatch_object() {
+    Source source = addSource(r'''
+f() {
+  try {} on Object catch (e) {} catch (e) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadCatch_catchFollowingCatch_object_nested() {
+    // 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) {}}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadCatch_onCatchSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+f() {
+  try {} on A catch (e) {} on B catch (e) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadCatch_onCatchSubtype_nested() {
+    // 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) {}}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadOperandLHS_and() {
+    Source source = addSource(r'''
+f() {
+  bool b = false && false;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadOperandLHS_and_nested() {
+    Source source = addSource(r'''
+f() {
+  bool b = false && (false && false);
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadOperandLHS_or() {
+    Source source = addSource(r'''
+f() {
+  bool b = true || true;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_deadOperandLHS_or_nested() {
+    Source source = addSource(r'''
+f() {
+  bool b = true || (false && false);
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterBreak_inDefaultCase() {
+    Source source = addSource(r'''
+f(v) {
+  switch(v) {
+    case 1:
+    default:
+      break;
+      var a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterBreak_inForEachStatement() {
+    Source source = addSource(r'''
+f() {
+  var list;
+  for(var l in list) {
+    break;
+    var a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterBreak_inForStatement() {
+    Source source = addSource(r'''
+f() {
+  for(;;) {
+    break;
+    var a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterBreak_inSwitchCase() {
+    Source source = addSource(r'''
+f(v) {
+  switch(v) {
+    case 1:
+      break;
+      var a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterBreak_inWhileStatement() {
+    Source source = addSource(r'''
+f(v) {
+  while(v) {
+    break;
+    var a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterContinue_inForEachStatement() {
+    Source source = addSource(r'''
+f() {
+  var list;
+  for(var l in list) {
+    continue;
+    var a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterContinue_inForStatement() {
+    Source source = addSource(r'''
+f() {
+  for(;;) {
+    continue;
+    var a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterContinue_inWhileStatement() {
+    Source source = addSource(r'''
+f(v) {
+  while(v) {
+    continue;
+    var a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterReturn_function() {
+    Source source = addSource(r'''
+f() {
+  var one = 1;
+  return;
+  var two = 2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterReturn_ifStatement() {
+    Source source = addSource(r'''
+f(bool b) {
+  if(b) {
+    var one = 1;
+    return;
+    var two = 2;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterReturn_method() {
+    Source source = addSource(r'''
+class A {
+  m() {
+    var one = 1;
+    return;
+    var two = 2;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterReturn_nested() {
+    Source source = addSource(r'''
+f() {
+  var one = 1;
+  return;
+  if(false) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deadCode_statementAfterReturn_twoReturns() {
+    Source source = addSource(r'''
+f() {
+  var one = 1;
+  return;
+  var two = 2;
+  return;
+  var three = 3;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_assignment() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  A operator+(A a) { return a; }
+}
+f(A a) {
+  A b;
+  a += b;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_Deprecated() {
+    Source source = addSource(r'''
+class A {
+  @Deprecated('0.9')
+  m() {}
+  n() {m();}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_deprecated() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  m() {}
+  n() {m();}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_export() {
+    Source source = addSource("export 'deprecated_library.dart';");
+    addNamedSource(
+        "/deprecated_library.dart",
+        r'''
+@deprecated
+library deprecated_library;
+class A {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_field() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  int x = 1;
+}
+f(A a) {
+  return a.x;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_getter() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  get m => 1;
+}
+f(A a) {
+  return a.m;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_import() {
+    Source source = addSource(r'''
+import 'deprecated_library.dart';
+f(A a) {}''');
+    addNamedSource(
+        "/deprecated_library.dart",
+        r'''
+@deprecated
+library deprecated_library;
+class A {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_indexExpression() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  operator[](int i) {}
+}
+f(A a) {
+  return a[1];
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_instanceCreation() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  A(int i) {}
+}
+f() {
+  A a = new A(1);
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_instanceCreation_namedConstructor() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  A.named(int i) {}
+}
+f() {
+  A a = new A.named(1);
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_operator() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  operator+(A a) {}
+}
+f(A a) {
+  A b;
+  return a + b;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_setter() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  set s(v) {}
+}
+f(A a) {
+  return a.s = 1;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_superConstructor() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  A() {}
+}
+class B extends A {
+  B() : super() {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_deprecatedAnnotationUse_superConstructor_namedConstructor() {
+    Source source = addSource(r'''
+class A {
+  @deprecated
+  A.named() {}
+}
+class B extends A {
+  B() : super.named() {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    verify([source]);
+  }
+
+  void test_divisionOptimization_double() {
+    Source source = addSource(r'''
+f(double x, double y) {
+  var v = (x / y).toInt();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
+    verify([source]);
+  }
+
+  void test_divisionOptimization_int() {
+    Source source = addSource(r'''
+f(int x, int y) {
+  var v = (x / y).toInt();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
+    verify([source]);
+  }
+
+  void test_divisionOptimization_propagatedType() {
+    // Tests the propagated type information of the '/' method
+    Source source = addSource(r'''
+f(x, y) {
+  x = 1;
+  y = 1;
+  var v = (x / y).toInt();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
+    verify([source]);
+  }
+
+  void test_divisionOptimization_wrappedBinaryExpression() {
+    Source source = addSource(r'''
+f(int x, int y) {
+  var v = (((x / y))).toInt();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
+    verify([source]);
+  }
+
+  void test_duplicateImport() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart';
+A a;''');
+    addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+class A {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DUPLICATE_IMPORT]);
+    verify([source]);
+  }
+
+  void test_duplicateImport2() {
+    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 {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(
+        source, [HintCode.DUPLICATE_IMPORT, HintCode.DUPLICATE_IMPORT]);
+    verify([source]);
+  }
+
+  void test_duplicateImport3() {
+    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 {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.DUPLICATE_IMPORT]);
+    verify([source]);
+  }
+
+  void test_importDeferredLibraryWithLoadFunction() {
+    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
+    ]);
+  }
+
+  void test_invalidAssignment_instanceVariable() {
+    Source source = addSource(r'''
+class A {
+  int x;
+}
+f(var y) {
+  A a;
+  if(y is String) {
+    a.x = y;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
+    verify([source]);
+  }
+
+  void test_invalidAssignment_localVariable() {
+    Source source = addSource(r'''
+f(var y) {
+  if(y is String) {
+    int x = y;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
+    verify([source]);
+  }
+
+  void test_invalidAssignment_message() {
+    // The implementation of HintCode.INVALID_ASSIGNMENT assumes that
+    // StaticTypeWarningCode.INVALID_ASSIGNMENT has the same message.
+    expect(StaticTypeWarningCode.INVALID_ASSIGNMENT.message,
+        HintCode.INVALID_ASSIGNMENT.message);
+  }
+
+  void test_invalidAssignment_staticVariable() {
+    Source source = addSource(r'''
+class A {
+  static int x;
+}
+f(var y) {
+  if(y is String) {
+    A.x = y;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
+    verify([source]);
+  }
+
+  void test_invalidAssignment_variableDeclaration() {
+    // 17971
+    Source source = addSource(r'''
+class Point {
+  final num x, y;
+  Point(this.x, this.y);
+  Point operator +(Point other) {
+    return new Point(x+other.x, y+other.y);
+  }
+}
+main() {
+  var p1 = new Point(0, 0);
+  var p2 = new Point(10, 10);
+  int n = p1 + p2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_field() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int a;
+}
+abstract class B implements A {
+  int b() => a;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_function() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+main() {
+  new A().a();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_getter() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int get a => 42;
+}
+abstract class B implements A {
+  int b() => a;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_message() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+class B {
+  void b() => new A().a();
+}''');
+    List<AnalysisError> errors = analysisContext2.computeErrors(source);
+    expect(errors, hasLength(1));
+    expect(errors[0].message,
+        "The member 'a' can only be used within instance members of subclasses of 'A'");
+  }
+
+  void test_invalidUseOfProtectedMember_method_1() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+class B {
+  void b() => new A().a();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_method_2() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+abstract class B implements A {
+  void b() => a();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_OK_1() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+class B extends A {
+  void b() => a();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, []);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_OK_2() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+class B extends Object with A {
+  void b() => a();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, []);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_OK_3() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected m1() {}
+}
+class B extends A {
+  static m2(A a) => a.m1();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, []);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_OK_4() {
+    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();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, []);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_OK_field() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int a = 42;
+}
+class B extends A {
+  int b() => a;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, []);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_OK_getter() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int get a => 42;
+}
+class B extends A {
+  int b() => a;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, []);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_OK_setter() {
+    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;
+  }
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, []);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_setter() {
+    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;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+    verify([source]);
+  }
+
+  void test_invalidUseOfProtectedMember_topLevelVariable() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+@protected
+int x = 0;
+main() {
+  print(x);
+}''');
+    computeLibrarySourceErrors(source);
+    // TODO(brianwilkerson) This should produce a hint because the annotation is
+    // being applied to the wrong kind of declaration.
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_isDouble() {
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.dart2jsHint = true;
+    resetWithOptions(options);
+    Source source = addSource("var v = 1 is double;");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.IS_DOUBLE]);
+    verify([source]);
+  }
+
+  void test_isNotDouble() {
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.dart2jsHint = true;
+    resetWithOptions(options);
+    Source source = addSource("var v = 1 is! double;");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.IS_NOT_DOUBLE]);
+    verify([source]);
+  }
+
+  void test_js_lib_OK() {
+    Source source = addSource(r'''
+@JS()
+library foo;
+
+import 'package:js/js.dart';
+
+@JS()
+class A { }
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_missing_js_lib_on_class_decl() {
+    Source source = addSource(r'''
+library foo;
+
+import 'package:js/js.dart';
+
+@JS()
+class A { }
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_JS_LIB_ANNOTATION]);
+    verify([source]);
+  }
+
+  void test_missing_js_lib_on_function() {
+    Source source = addSource(r'''
+library foo;
+
+import 'package:js/js.dart';
+
+@JS('acxZIndex')
+set _currentZIndex(int value) { }
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_JS_LIB_ANNOTATION]);
+    verify([source]);
+  }
+
+  void test_missing_js_lib_on_member() {
+    Source source = addSource(r'''
+library foo;
+
+import 'package:js/js.dart';
+
+class A {
+  @JS()
+  void a() { }
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_JS_LIB_ANNOTATION]);
+    verify([source]);
+  }
+
+  void test_missingReturn_async() {
+    Source source = addSource('''
+import 'dart:async';
+Future<int> f() async {}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_RETURN]);
+    verify([source]);
+  }
+
+  void test_missingReturn_function() {
+    Source source = addSource("int f() {}");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_RETURN]);
+    verify([source]);
+  }
+
+  void test_missingReturn_method() {
+    Source source = addSource(r'''
+class A {
+  int m() {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_RETURN]);
+    verify([source]);
+  }
+
+  void test_mustCallSuper() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @mustCallSuper
+  void a() {}
+}
+class B extends A {
+  @override
+  void a()
+  {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MUST_CALL_SUPER]);
+    verify([source]);
+  }
+
+  void test_mustCallSuper_indirect() {
+    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() {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MUST_CALL_SUPER]);
+    verify([source]);
+  }
+
+  void test_mustCallSuper_OK() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @mustCallSuper
+  void a() {}
+}
+class C extends A {
+  @override
+  void a() {
+    super.a(); //OK
+  }
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, []);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_assert() {
+    Source source = addSource(r'''
+m(x) {
+  assert (x?.a);
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_conditionalExpression() {
+    Source source = addSource(r'''
+m(x) {
+  return x?.a ? 0 : 1;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_do() {
+    Source source = addSource(r'''
+m(x) {
+  do {} while (x?.a);
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_for() {
+    Source source = addSource(r'''
+m(x) {
+  for (var v = x; v?.a; v = v.next) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if() {
+    Source source = addSource(r'''
+m(x) {
+  if (x?.a) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_conditionalAnd_first() {
+    Source source = addSource(r'''
+m(x) {
+  if (x?.a && x.b) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_conditionalAnd_second() {
+    Source source = addSource(r'''
+m(x) {
+  if (x.a && x?.b) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_conditionalAnd_third() {
+    Source source = addSource(r'''
+m(x) {
+  if (x.a && x.b && x?.c) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_conditionalOr_first() {
+    Source source = addSource(r'''
+m(x) {
+  if (x?.a || x.b) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_conditionalOr_second() {
+    Source source = addSource(r'''
+m(x) {
+  if (x.a || x?.b) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_conditionalOr_third() {
+    Source source = addSource(r'''
+m(x) {
+  if (x.a || x.b || x?.c) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_not() {
+    Source source = addSource(r'''
+m(x) {
+  if (!x?.a) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_parenthesized() {
+    Source source = addSource(r'''
+m(x) {
+  if ((x?.a)) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_while() {
+    Source source = addSource(r'''
+m(x) {
+  while (x?.a) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingGetter_invalid() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+}
+class B extends A {
+  @override
+  int get m => 1;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingMethod_invalid() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+}
+class B extends A {
+  @override
+  int m() => 1;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD]);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingSetter_invalid() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+}
+class B extends A {
+  @override
+  set m(int x) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER]);
+    verify([source]);
+  }
+
+  void test_required_constructor_param() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  C({@Required('must specify an `a`') int a}) {}
+}
+
+main() {
+  new C();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
+    verify([source]);
+  }
+
+  void test_required_constructor_param_no_reason() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  C({@required int a}) {}
+}
+
+main() {
+  new C();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
+    verify([source]);
+  }
+
+  void test_required_constructor_param_null_reason() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  C({@Required(null) int a}) {}
+}
+
+main() {
+  new C();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
+    verify([source]);
+  }
+
+  void test_required_constructor_param_OK() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  C({@required int a}) {}
+}
+
+main() {
+  new C(a: 2);
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_required_function_param() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+
+void f({@Required('must specify an `a`') int a}) {}
+
+main() {
+  f();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
+    verify([source]);
+  }
+
+  void test_required_method_param() {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  void m({@Required('must specify an `a`') int a}) {}
+}
+f() {
+  new A().m();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
+    verify([source]);
+  }
+
+  void test_typeCheck_type_is_Null() {
+    Source source = addSource(r'''
+m(i) {
+  bool b = i is Null;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.TYPE_CHECK_IS_NULL]);
+    verify([source]);
+  }
+
+  void test_typeCheck_type_not_Null() {
+    Source source = addSource(r'''
+m(i) {
+  bool b = i is! Null;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.TYPE_CHECK_IS_NOT_NULL]);
+    verify([source]);
+  }
+
+  void test_undefinedGetter() {
+    Source source = addSource(r'''
+class A {}
+f(var a) {
+  if(a is A) {
+    return a.m;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_GETTER]);
+  }
+
+  void test_undefinedGetter_message() {
+    // The implementation of HintCode.UNDEFINED_SETTER assumes that
+    // UNDEFINED_SETTER in StaticTypeWarningCode and StaticWarningCode are the
+    // same, this verifies that assumption.
+    expect(StaticWarningCode.UNDEFINED_GETTER.message,
+        StaticTypeWarningCode.UNDEFINED_GETTER.message);
+  }
+
+  void test_undefinedMethod() {
+    Source source = addSource(r'''
+f() {
+  var a = 'str';
+  a.notAMethodOnString();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_METHOD]);
+  }
+
+  void test_undefinedMethod_assignmentExpression() {
+    Source source = addSource(r'''
+class A {}
+class B {
+  f(var a, var a2) {
+    a = new A();
+    a2 = new A();
+    a += a2;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_METHOD]);
+  }
+
+  void test_undefinedOperator_binaryExpression() {
+    Source source = addSource(r'''
+class A {}
+f(var a) {
+  if(a is A) {
+    a + 1;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
+  }
+
+  void test_undefinedOperator_indexBoth() {
+    Source source = addSource(r'''
+class A {}
+f(var a) {
+  if(a is A) {
+    a[0]++;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
+  }
+
+  void test_undefinedOperator_indexGetter() {
+    Source source = addSource(r'''
+class A {}
+f(var a) {
+  if(a is A) {
+    a[0];
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
+  }
+
+  void test_undefinedOperator_indexSetter() {
+    Source source = addSource(r'''
+class A {}
+f(var a) {
+  if(a is A) {
+    a[0] = 1;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
+  }
+
+  void test_undefinedOperator_postfixExpression() {
+    Source source = addSource(r'''
+class A {}
+f(var a) {
+  if(a is A) {
+    a++;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
+  }
+
+  void test_undefinedOperator_prefixExpression() {
+    Source source = addSource(r'''
+class A {}
+f(var a) {
+  if(a is A) {
+    ++a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
+  }
+
+  void test_undefinedSetter() {
+    Source source = addSource(r'''
+class A {}
+f(var a) {
+  if(a is A) {
+    a.m = 0;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNDEFINED_SETTER]);
+  }
+
+  void test_undefinedSetter_message() {
+    // The implementation of HintCode.UNDEFINED_SETTER assumes that
+    // UNDEFINED_SETTER in StaticTypeWarningCode and StaticWarningCode are the
+    // same, this verifies that assumption.
+    expect(StaticWarningCode.UNDEFINED_SETTER.message,
+        StaticTypeWarningCode.UNDEFINED_SETTER.message);
+  }
+
+  void test_unnecessaryCast_type_supertype() {
+    Source source = addSource(r'''
+m(int i) {
+  var b = i as Object;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_CAST]);
+    verify([source]);
+  }
+
+  void test_unnecessaryCast_type_type() {
+    Source source = addSource(r'''
+m(num i) {
+  var b = i as num;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_CAST]);
+    verify([source]);
+  }
+
+  void test_unnecessaryNoSuchMethod_blockBody() {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(x) => super.noSuchMethod(x);
+}
+class B extends A {
+  mmm();
+  noSuchMethod(y) {
+    return super.noSuchMethod(y);
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_NO_SUCH_METHOD]);
+    verify([source]);
+  }
+
+  void test_unnecessaryNoSuchMethod_expressionBody() {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(x) => super.noSuchMethod(x);
+}
+class B extends A {
+  mmm();
+  noSuchMethod(y) => super.noSuchMethod(y);
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_NO_SUCH_METHOD]);
+    verify([source]);
+  }
+
+  void test_unnecessaryTypeCheck_null_is_Null() {
+    Source source = addSource("bool b = null is Null;");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
+    verify([source]);
+  }
+
+  void test_unnecessaryTypeCheck_null_not_Null() {
+    Source source = addSource("bool b = null is! Null;");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
+    verify([source]);
+  }
+
+  void test_unnecessaryTypeCheck_type_is_dynamic() {
+    Source source = addSource(r'''
+m(i) {
+  bool b = i is dynamic;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
+    verify([source]);
+  }
+
+  void test_unnecessaryTypeCheck_type_is_object() {
+    Source source = addSource(r'''
+m(i) {
+  bool b = i is Object;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
+    verify([source]);
+  }
+
+  void test_unnecessaryTypeCheck_type_not_dynamic() {
+    Source source = addSource(r'''
+m(i) {
+  bool b = i is! dynamic;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
+    verify([source]);
+  }
+
+  void test_unnecessaryTypeCheck_type_not_object() {
+    Source source = addSource(r'''
+m(i) {
+  bool b = i is! Object;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_isUsed_extends() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {}
+class B extends _A {}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_isUsed_fieldDeclaration() {
+    enableUnusedElement = true;
+    var src = r'''
+class Foo {
+  _Bar x;
+}
+
+class _Bar {
+}
+''';
+    Source source = addSource(src);
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_isUsed_implements() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {}
+class B implements _A {}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_isUsed_instanceCreation() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {}
+main() {
+  new _A();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_isUsed_staticFieldAccess() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {
+  static const F = 42;
+}
+main() {
+  _A.F;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_isUsed_staticMethodInvocation() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {
+  static m() {}
+}
+main() {
+  _A.m();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_isUsed_typeArgument() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {}
+main() {
+  var v = new List<_A>();
+  print(v);
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_notUsed_inClassMember() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {
+  static staticMethod() {
+    new _A();
+  }
+  instanceMethod() {
+    new _A();
+  }
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_notUsed_inConstructorName() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {
+  _A() {}
+  _A.named() {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_notUsed_isExpression() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {}
+main(p) {
+  if (p is _A) {
+  }
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {}
+main() {
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_class_notUsed_variableDeclaration() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class _A {}
+main() {
+  _A v;
+  print(v);
+}
+print(x) {}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_enum_isUsed_fieldReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+enum _MyEnum {A, B, C}
+main() {
+  print(_MyEnum.B);
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_enum_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+enum _MyEnum {A, B, C}
+main() {
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionLocal_isUsed_closure() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+main() {
+  print(() {});
+}
+print(x) {}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionLocal_isUsed_invocation() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+main() {
+  f() {}
+  f();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionLocal_isUsed_reference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+main() {
+  f() {}
+  print(f);
+}
+print(x) {}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionLocal_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+main() {
+  f() {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionLocal_notUsed_referenceFromItself() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+main() {
+  _f(int p) {
+    _f(p - 1);
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTop_isUsed_invocation() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+_f() {}
+main() {
+  _f();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTop_isUsed_reference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+_f() {}
+main() {
+  print(_f);
+}
+print(x) {}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTop_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+_f() {}
+main() {
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTop_notUsed_referenceFromItself() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+_f(int p) {
+  _f(p - 1);
+}
+main() {
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTypeAlias_isUsed_isExpression() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+typedef _F(a, b);
+main(f) {
+  if (f is _F) {
+    print('F');
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTypeAlias_isUsed_reference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+typedef _F(a, b);
+main(_F f) {
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTypeAlias_isUsed_typeArgument() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+typedef _F(a, b);
+main() {
+  var v = new List<_F>();
+  print(v);
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTypeAlias_isUsed_variableDeclaration() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+typedef _F(a, b);
+class A {
+  _F f;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_functionTypeAlias_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+typedef _F(a, b);
+main() {
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_getter_isUsed_invocation_implicitThis() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  get _g => null;
+  useGetter() {
+    var v = _g;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_getter_isUsed_invocation_PrefixedIdentifier() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  get _g => null;
+}
+main(A a) {
+  var v = a._g;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_getter_isUsed_invocation_PropertyAccess() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  get _g => null;
+}
+main() {
+  var v = new A()._g;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_getter_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  get _g => null;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_getter_notUsed_referenceFromItself() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  get _g {
+    return _g;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_hasReference_implicitThis() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+  useMethod() {
+    print(_m);
+  }
+}
+print(x) {}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_hasReference_implicitThis_subclass() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+  useMethod() {
+    print(_m);
+  }
+}
+class B extends A {
+  _m() {}
+}
+print(x) {}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_hasReference_PrefixedIdentifier() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+}
+main(A a) {
+  a._m;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_hasReference_PropertyAccess() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+}
+main() {
+  new A()._m;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_invocation_implicitThis() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+  useMethod() {
+    _m();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_invocation_implicitThis_subclass() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+  useMethod() {
+    _m();
+  }
+}
+class B extends A {
+  _m() {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_invocation_MemberElement() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A<T> {
+  _m(T t) {}
+}
+main(A<int> a) {
+  a._m(0);
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_invocation_propagated() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+}
+main() {
+  var a = new A();
+  a._m();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_invocation_static() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+}
+main() {
+  A a = new A();
+  a._m();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_invocation_subclass() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  _m() {}
+}
+class B extends A {
+  _m() {}
+}
+main(A a) {
+  a._m();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_notPrivate() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  m() {}
+}
+main() {
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_isUsed_staticInvocation() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  static _m() {}
+}
+main() {
+  A._m();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  static _m() {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_method_notUsed_referenceFromItself() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  static _m(int p) {
+    _m(p - 1);
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_setter_isUsed_invocation_implicitThis() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  set _s(x) {}
+  useSetter() {
+    _s = 42;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_setter_isUsed_invocation_PrefixedIdentifier() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  set _s(x) {}
+}
+main(A a) {
+  a._s = 42;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_setter_isUsed_invocation_PropertyAccess() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  set _s(x) {}
+}
+main() {
+  new A()._s = 42;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedElement_setter_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  set _s(x) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedElement_setter_notUsed_referenceFromItself() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  set _s(int x) {
+    if (x > 5) {
+      _s = x - 1;
+    }
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
+    verify([source]);
+  }
+
+  void test_unusedField_isUsed_argument() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f = 0;
+  main() {
+    print(++_f);
+  }
+}
+print(x) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedField_isUsed_reference_implicitThis() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+  main() {
+    print(_f);
+  }
+}
+print(x) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedField_isUsed_reference_implicitThis_expressionFunctionBody() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+  m() => _f;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedField_isUsed_reference_implicitThis_subclass() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+  main() {
+    print(_f);
+  }
+}
+class B extends A {
+  int _f;
+}
+print(x) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedField_isUsed_reference_qualified_propagatedElement() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+}
+main() {
+  var a = new A();
+  print(a._f);
+}
+print(x) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedField_isUsed_reference_qualified_staticElement() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+}
+main() {
+  A a = new A();
+  print(a._f);
+}
+print(x) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedField_isUsed_reference_qualified_unresolved() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+}
+main(a) {
+  print(a._f);
+}
+print(x) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedField_notUsed_compoundAssign() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+  main() {
+    _f += 2;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_FIELD]);
+    verify([source]);
+  }
+
+  void test_unusedField_notUsed_noReference() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_FIELD]);
+    verify([source]);
+  }
+
+  void test_unusedField_notUsed_postfixExpr() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f = 0;
+  main() {
+    _f++;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_FIELD]);
+    verify([source]);
+  }
+
+  void test_unusedField_notUsed_prefixExpr() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f = 0;
+  main() {
+    ++_f;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_FIELD]);
+    verify([source]);
+  }
+
+  void test_unusedField_notUsed_simpleAssignment() {
+    enableUnusedElement = true;
+    Source source = addSource(r'''
+class A {
+  int _f;
+  m() {
+    _f = 1;
+  }
+}
+main(A a) {
+  a._f = 2;
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_FIELD]);
+    verify([source]);
+  }
+
+  void test_unusedImport() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart';''');
+    Source source2 = addNamedSource("/lib1.dart", "library lib1;");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_IMPORT]);
+    assertNoErrors(source2);
+    verify([source, source2]);
+  }
+
+  void test_unusedImport_as() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart' as one;
+one.A a;''');
+    Source source2 = addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+class A {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_IMPORT]);
+    assertNoErrors(source2);
+    verify([source, source2]);
+  }
+
+  void test_unusedImport_hide() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart' hide A;
+A a;''');
+    Source source2 = addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+class A {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_IMPORT]);
+    assertNoErrors(source2);
+    verify([source, source2]);
+  }
+
+  void test_unusedImport_inComment_libraryDirective() {
+    Source source = addSource(r'''
+/// Use [Future] class.
+library L;
+import 'dart:async';
+''');
+    assertNoErrors(source);
+  }
+
+  void test_unusedImport_show() {
+    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;
+class A {}
+class B {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_IMPORT]);
+    assertNoErrors(source2);
+    verify([source, source2]);
+  }
+
+  void test_unusedShownName() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart' show A, B;
+A a;''');
+    Source source2 = addNamedSource(
+        "/lib1.dart", r'''
+library lib1;
+class A {}
+class B {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
+    assertNoErrors(source2);
+    verify([source, source2]);
+  }
+
+  void test_unusedShownName_topLevelVariable() {
+    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;
+const int var1 = 1;
+const int var2 = 2;
+const int var3 = 3;
+const int var4 = 4;''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
+    assertNoErrors(source2);
+    verify([source, source2]);
+  }
+
+  void test_unusedShownName_as() {
+    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;
+class A {}
+class B {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
+    assertNoErrors(source2);
+    verify([source, source2]);
+  }
+
+  void test_unusedShownName_duplicates() {
+    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;
+class A {}
+class B {}
+class C {}
+class D {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+        HintCode.UNUSED_SHOWN_NAME,
+        HintCode.UNUSED_SHOWN_NAME]);
+    assertNoErrors(source2);
+    verify([source, source2]);
+  }
+
+  void test_unusedLocalVariable_inCatch_exception() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  try {
+  } on String catch (exception) {
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_CATCH_CLAUSE]);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_inCatch_exception_hasStack() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  try {
+  } catch (exception, stack) {
+    print(stack);
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_inCatch_exception_noOnClause() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  try {
+  } catch (exception) {
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_inCatch_stackTrace() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  try {
+  } catch (exception, stackTrace) {
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_CATCH_STACK]);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_inCatch_stackTrace_used() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  try {
+  } catch (exception, stackTrace) {
+    print('exception at $stackTrace');
+  }
+}
+print(x) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_inFor_underscore_ignored() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  for (var _ in [1,2,3]) {
+    for (var __ in [4,5,6]) {
+      // do something
+    }
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_inFunction() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  var v = 1;
+  v = 2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_inMethod() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+class A {
+  foo() {
+    var v = 1;
+    v = 2;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_isInvoked() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+typedef Foo();
+main() {
+  Foo foo;
+  foo();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_isRead_notUsed_compoundAssign() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  var v = 1;
+  v += 2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_isRead_notUsed_postfixExpr() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  var v = 1;
+  v++;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_isRead_notUsed_prefixExpr() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  var v = 1;
+  ++v;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_isRead_usedArgument() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+main() {
+  var v = 1;
+  print(++v);
+}
+print(x) {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedLocalVariable_isRead_usedInvocationTarget() {
+    enableUnusedLocalVariable = true;
+    Source source = addSource(r'''
+class A {
+  foo() {}
+}
+main() {
+  var a = new A();
+  a.foo();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  void test_useOfVoidResult_assignmentExpression_function() {
+    Source source = addSource(r'''
+void f() {}
+class A {
+  n() {
+    var a;
+    a = f();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
+    verify([source]);
+  }
+
+  void test_useOfVoidResult_assignmentExpression_method() {
+    Source source = addSource(r'''
+class A {
+  void m() {}
+  n() {
+    var a;
+    a = m();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
+    verify([source]);
+  }
+
+  void test_useOfVoidResult_inForLoop() {
+    Source source = addSource(r'''
+class A {
+  void m() {}
+  n() {
+    for(var a = m();;) {}
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
+    verify([source]);
+  }
+
+  void test_useOfVoidResult_variableDeclaration_function() {
+    Source source = addSource(r'''
+void f() {}
+class A {
+  n() {
+    var a = f();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
+    verify([source]);
+  }
+
+  void test_useOfVoidResult_variableDeclaration_method() {
+    Source source = addSource(r'''
+class A {
+  void m() {}
+  n() {
+    var a = m();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
+    verify([source]);
+  }
+
+  void test_useOfVoidResult_variableDeclaration_method2() {
+    Source source = addSource(r'''
+class A {
+  void m() {}
+  n() {
+    var a = m(), b = m();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(
+        source, [HintCode.USE_OF_VOID_RESULT, HintCode.USE_OF_VOID_RESULT]);
+    verify([source]);
+  }
+}
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart
index 80e4264..80c41e1 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -31,7 +31,8 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
-import 'resolver_test.dart';
+import 'analysis_context_factory.dart';
+import 'resolver_test_case.dart';
 import 'test_support.dart';
 
 main() {
@@ -4774,6 +4775,34 @@
 ''');
   }
 
+  void test_updateFunctionToForLoop() {
+    _resolveUnit(r'''
+class PlayDrag {
+  final List<num> times = new List<num>();
+
+  PlayDrag.start() {}
+
+  void update(num pos) {
+    fo (int i = times.length - 2; i >= 0; i--) {}
+  }
+}
+''');
+
+    _updateAndValidate(
+        r'''
+class PlayDrag {
+  final List<num> times = new List<num>();
+
+  PlayDrag.start() {}
+
+  void update(num pos) {
+    for (int i = times.length - 2; i >= 0; i--) {}
+  }
+}
+''',
+        expectLibraryUnchanged: false);
+  }
+
   void test_visibleRange() {
     _resolveUnit(r'''
 class Test {
@@ -4845,34 +4874,6 @@
     }
   }
 
-  void test_updateFunctionToForLoop() {
-    _resolveUnit(r'''
-class PlayDrag {
-  final List<num> times = new List<num>();
-
-  PlayDrag.start() {}
-
-  void update(num pos) {
-    fo (int i = times.length - 2; i >= 0; i--) {}
-  }
-}
-''');
-
-    _updateAndValidate(
-        r'''
-class PlayDrag {
-  final List<num> times = new List<num>();
-
-  PlayDrag.start() {}
-
-  void update(num pos) {
-    for (int i = times.length - 2; i >= 0; i--) {}
-  }
-}
-''',
-        expectLibraryUnchanged: false);
-  }
-
   void _assertCacheResults(
       {bool expectLibraryUnchanged: true,
       bool expectCachePostConstantsValid: true}) {
@@ -4904,8 +4905,9 @@
     _assertCacheUnitResult(RESOLVED_UNIT8);
     _assertCacheUnitResult(RESOLVED_UNIT9);
     _assertCacheUnitResult(RESOLVED_UNIT10);
+    _assertCacheUnitResult(RESOLVED_UNIT11);
     if (expectCachePostConstantsValid) {
-      _assertCacheUnitResult(RESOLVED_UNIT11);
+      _assertCacheUnitResult(RESOLVED_UNIT12);
       _assertCacheUnitResult(RESOLVED_UNIT);
     }
   }
@@ -5289,18 +5291,18 @@
   Object lastException;
   Object lastStackTrace;
 
-  void expectNoErrors() {
-    if (lastException != null) {
-      fail("logged an exception:\n$lastException\n$lastStackTrace\n");
-    }
-  }
-
   @override
   void enter(String name) {}
 
   @override
   void exit() {}
 
+  void expectNoErrors() {
+    if (lastException != null) {
+      fail("logged an exception:\n$lastException\n$lastStackTrace\n");
+    }
+  }
+
   @override
   void log(Object obj) {}
 
diff --git a/pkg/analyzer/test/generated/inheritance_manager_test.dart b/pkg/analyzer/test/generated/inheritance_manager_test.dart
new file mode 100644
index 0000000..e41df2f
--- /dev/null
+++ b/pkg/analyzer/test/generated/inheritance_manager_test.dart
@@ -0,0 +1,1269 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.inheritance_manager_test;
+
+import 'dart:collection';
+
+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/generated/engine.dart';
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/java_engine_io.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/generated/testing/ast_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/generated/utilities_dart.dart';
+import 'package:unittest/unittest.dart';
+
+import '../reflective_tests.dart';
+import '../utils.dart';
+import 'analysis_context_factory.dart';
+import 'test_support.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(InheritanceManagerTest);
+}
+
+@reflectiveTest
+class InheritanceManagerTest {
+  /**
+   * The type provider used to access the types.
+   */
+  TestTypeProvider _typeProvider;
+
+  /**
+   * The library containing the code being resolved.
+   */
+  LibraryElementImpl _definingLibrary;
+
+  /**
+   * The inheritance manager being tested.
+   */
+  InheritanceManager _inheritanceManager;
+
+  /**
+   * The number of members that Object implements (as determined by [TestTypeProvider]).
+   */
+  int _numOfMembersInObject = 0;
+
+  void setUp() {
+    _typeProvider = new TestTypeProvider();
+    _inheritanceManager = _createInheritanceManager();
+    InterfaceType objectType = _typeProvider.objectType;
+    _numOfMembersInObject =
+        objectType.methods.length + objectType.accessors.length;
+  }
+
+  void test_getMapOfMembersInheritedFromClasses_accessor_extends() {
+    // class A { int get g; }
+    // class B extends A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(getterName), same(getterG));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromClasses_accessor_implements() {
+    // class A { int get g; }
+    // class B implements A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject);
+    expect(mapB.get(getterName), isNull);
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromClasses_accessor_with() {
+    // class A { int get g; }
+    // class B extends Object with A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(getterName), same(getterG));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromClasses_implicitExtends() {
+    // class A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    _assertNoErrors(classA);
+  }
+
+  void test_getMapOfMembersInheritedFromClasses_method_extends() {
+    // class A { int g(); }
+    // class B extends A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.supertype = classA.type;
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(methodName), same(methodM));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromClasses_method_implements() {
+    // class A { int g(); }
+    // class B implements A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject);
+    expect(mapB.get(methodName), isNull);
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromClasses_method_with() {
+    // class A { int g(); }
+    // class B extends Object with A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(methodName), same(methodM));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromClasses_method_with_two_mixins() {
+    // class A1 { int m(); }
+    // class A2 { int m(); }
+    // class B extends Object with A1, A2 {}
+    ClassElementImpl classA1 = ElementFactory.classElement2("A1");
+    String methodName = "m";
+    MethodElement methodA1M =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA1.methods = <MethodElement>[methodA1M];
+    ClassElementImpl classA2 = ElementFactory.classElement2("A2");
+    MethodElement methodA2M =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA2.methods = <MethodElement>[methodA2M];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA1.type, classA2.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
+    expect(mapB.get(methodName), same(methodA2M));
+    _assertNoErrors(classA1);
+    _assertNoErrors(classA2);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromInterfaces_accessor_extends() {
+    // class A { int get g; }
+    // class B extends A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(getterName), same(getterG));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromInterfaces_accessor_implements() {
+    // class A { int get g; }
+    // class B implements A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(getterName), same(getterG));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromInterfaces_accessor_with() {
+    // class A { int get g; }
+    // class B extends Object with A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(getterName), same(getterG));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromInterfaces_implicitExtends() {
+    // class A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    _assertNoErrors(classA);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_getter_method() {
+    // class I1 { int m(); }
+    // class I2 { int get m; }
+    // class A implements I2, I1 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classI1.methods = <MethodElement>[methodM];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    PropertyAccessorElement getter =
+        ElementFactory.getterElement(methodName, false, _typeProvider.intType);
+    classI2.accessors = <PropertyAccessorElement>[getter];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI2.type, classI1.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapA.get(methodName), isNull);
+    _assertErrors(classA,
+        [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_int_str() {
+    // class I1 { int m(); }
+    // class I2 { String m(); }
+    // class A implements I1, I2 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElement methodM1 =
+        ElementFactory.methodElement(methodName, null, [_typeProvider.intType]);
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    MethodElement methodM2 = ElementFactory
+        .methodElement(methodName, null, [_typeProvider.stringType]);
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapA.get(methodName), isNull);
+    _assertErrors(
+        classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_method_getter() {
+    // class I1 { int m(); }
+    // class I2 { int get m; }
+    // class A implements I1, I2 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classI1.methods = <MethodElement>[methodM];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    PropertyAccessorElement getter =
+        ElementFactory.getterElement(methodName, false, _typeProvider.intType);
+    classI2.accessors = <PropertyAccessorElement>[getter];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapA.get(methodName), isNull);
+    _assertErrors(classA,
+        [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_numOfRequiredParams() {
+    // class I1 { dynamic m(int, [int]); }
+    // class I2 { dynamic m(int, int, int); }
+    // class A implements I1, I2 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElementImpl methodM1 =
+        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
+    ParameterElementImpl parameter1 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a1"));
+    parameter1.type = _typeProvider.intType;
+    parameter1.parameterKind = ParameterKind.REQUIRED;
+    ParameterElementImpl parameter2 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a2"));
+    parameter2.type = _typeProvider.intType;
+    parameter2.parameterKind = ParameterKind.POSITIONAL;
+    methodM1.parameters = <ParameterElement>[parameter1, parameter2];
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    MethodElementImpl methodM2 =
+        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
+    ParameterElementImpl parameter3 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a3"));
+    parameter3.type = _typeProvider.intType;
+    parameter3.parameterKind = ParameterKind.REQUIRED;
+    ParameterElementImpl parameter4 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a4"));
+    parameter4.type = _typeProvider.intType;
+    parameter4.parameterKind = ParameterKind.REQUIRED;
+    ParameterElementImpl parameter5 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a5"));
+    parameter5.type = _typeProvider.intType;
+    parameter5.parameterKind = ParameterKind.REQUIRED;
+    methodM2.parameters = <ParameterElement>[
+      parameter3,
+      parameter4,
+      parameter5
+    ];
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapA.get(methodName), isNull);
+    _assertErrors(
+        classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_str_int() {
+    // class I1 { int m(); }
+    // class I2 { String m(); }
+    // class A implements I2, I1 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElement methodM1 = ElementFactory
+        .methodElement(methodName, null, [_typeProvider.stringType]);
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    MethodElement methodM2 =
+        ElementFactory.methodElement(methodName, null, [_typeProvider.intType]);
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI2.type, classI1.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapA.get(methodName), isNull);
+    _assertErrors(
+        classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+  }
+
+  void test_getMapOfMembersInheritedFromInterfaces_method_extends() {
+    // class A { int g(); }
+    // class B extends A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(methodName), same(methodM));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromInterfaces_method_implements() {
+    // class A { int g(); }
+    // class B implements A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(methodName), same(methodM));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromInterfaces_method_with() {
+    // class A { int g(); }
+    // class B extends Object with A {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA.type];
+    MemberMap mapB =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject);
+    expect(mapB.size, _numOfMembersInObject + 1);
+    expect(mapB.get(methodName), same(methodM));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_getMapOfMembersInheritedFromInterfaces_union_differentNames() {
+    // class I1 { int m1(); }
+    // class I2 { int m2(); }
+    // class A implements I1, I2 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName1 = "m1";
+    MethodElement methodM1 =
+        ElementFactory.methodElement(methodName1, _typeProvider.intType);
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    String methodName2 = "m2";
+    MethodElement methodM2 =
+        ElementFactory.methodElement(methodName2, _typeProvider.intType);
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject + 2);
+    expect(mapA.get(methodName1), same(methodM1));
+    expect(mapA.get(methodName2), same(methodM2));
+    _assertNoErrors(classA);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_getters() {
+    // class I1 { int get g; }
+    // class I2 { num get g; }
+    // class A implements I1, I2 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String accessorName = "g";
+    PropertyAccessorElement getter1 = ElementFactory.getterElement(
+        accessorName, false, _typeProvider.intType);
+    classI1.accessors = <PropertyAccessorElement>[getter1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    PropertyAccessorElement getter2 = ElementFactory.getterElement(
+        accessorName, false, _typeProvider.numType);
+    classI2.accessors = <PropertyAccessorElement>[getter2];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject + 1);
+    PropertyAccessorElement syntheticAccessor = ElementFactory.getterElement(
+        accessorName, false, _typeProvider.dynamicType);
+    expect(mapA.get(accessorName).type, syntheticAccessor.type);
+    _assertNoErrors(classA);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_methods() {
+    // class I1 { dynamic m(int); }
+    // class I2 { dynamic m(num); }
+    // class A implements I1, I2 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElementImpl methodM1 =
+        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
+    ParameterElementImpl parameter1 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
+    parameter1.type = _typeProvider.intType;
+    parameter1.parameterKind = ParameterKind.REQUIRED;
+    methodM1.parameters = <ParameterElement>[parameter1];
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    MethodElementImpl methodM2 =
+        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
+    ParameterElementImpl parameter2 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
+    parameter2.type = _typeProvider.numType;
+    parameter2.parameterKind = ParameterKind.REQUIRED;
+    methodM2.parameters = <ParameterElement>[parameter2];
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject + 1);
+    MethodElement syntheticMethod = ElementFactory.methodElement(
+        methodName, _typeProvider.dynamicType, [_typeProvider.dynamicType]);
+    expect(mapA.get(methodName).type, syntheticMethod.type);
+    _assertNoErrors(classA);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_setters() {
+    // class I1 { set s(int); }
+    // class I2 { set s(num); }
+    // class A implements I1, I2 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String accessorName = "s";
+    PropertyAccessorElement setter1 = ElementFactory.setterElement(
+        accessorName, false, _typeProvider.intType);
+    classI1.accessors = <PropertyAccessorElement>[setter1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    PropertyAccessorElement setter2 = ElementFactory.setterElement(
+        accessorName, false, _typeProvider.numType);
+    classI2.accessors = <PropertyAccessorElement>[setter2];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject + 1);
+    PropertyAccessorElementImpl syntheticAccessor = ElementFactory
+        .setterElement(accessorName, false, _typeProvider.dynamicType);
+    syntheticAccessor.returnType = _typeProvider.dynamicType;
+    expect(mapA.get("$accessorName=").type, syntheticAccessor.type);
+    _assertNoErrors(classA);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_getters() {
+    // class A {}
+    // class B extends A {}
+    // class C extends B {}
+    // class I1 { A get g; }
+    // class I2 { B get g; }
+    // class I3 { C get g; }
+    // class D implements I1, I2, I3 {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String accessorName = "g";
+    PropertyAccessorElement getter1 =
+        ElementFactory.getterElement(accessorName, false, classA.type);
+    classI1.accessors = <PropertyAccessorElement>[getter1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    PropertyAccessorElement getter2 =
+        ElementFactory.getterElement(accessorName, false, classB.type);
+    classI2.accessors = <PropertyAccessorElement>[getter2];
+    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
+    PropertyAccessorElement getter3 =
+        ElementFactory.getterElement(accessorName, false, classC.type);
+    classI3.accessors = <PropertyAccessorElement>[getter3];
+    ClassElementImpl classD = ElementFactory.classElement2("D");
+    classD.interfaces = <InterfaceType>[
+      classI1.type,
+      classI2.type,
+      classI3.type
+    ];
+    MemberMap mapD =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
+    expect(mapD.size, _numOfMembersInObject + 1);
+    PropertyAccessorElement syntheticAccessor = ElementFactory.getterElement(
+        accessorName, false, _typeProvider.dynamicType);
+    expect(mapD.get(accessorName).type, syntheticAccessor.type);
+    _assertNoErrors(classD);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_methods() {
+    // class A {}
+    // class B extends A {}
+    // class C extends B {}
+    // class I1 { dynamic m(A a); }
+    // class I2 { dynamic m(B b); }
+    // class I3 { dynamic m(C c); }
+    // class D implements I1, I2, I3 {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElementImpl methodM1 =
+        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
+    ParameterElementImpl parameter1 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
+    parameter1.type = classA.type;
+    parameter1.parameterKind = ParameterKind.REQUIRED;
+    methodM1.parameters = <ParameterElement>[parameter1];
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    MethodElementImpl methodM2 =
+        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
+    ParameterElementImpl parameter2 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
+    parameter2.type = classB.type;
+    parameter2.parameterKind = ParameterKind.REQUIRED;
+    methodM2.parameters = <ParameterElement>[parameter2];
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
+    MethodElementImpl methodM3 =
+        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
+    ParameterElementImpl parameter3 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
+    parameter3.type = classC.type;
+    parameter3.parameterKind = ParameterKind.REQUIRED;
+    methodM3.parameters = <ParameterElement>[parameter3];
+    classI3.methods = <MethodElement>[methodM3];
+    ClassElementImpl classD = ElementFactory.classElement2("D");
+    classD.interfaces = <InterfaceType>[
+      classI1.type,
+      classI2.type,
+      classI3.type
+    ];
+    MemberMap mapD =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
+    expect(mapD.size, _numOfMembersInObject + 1);
+    MethodElement syntheticMethod = ElementFactory.methodElement(
+        methodName, _typeProvider.dynamicType, [_typeProvider.dynamicType]);
+    expect(mapD.get(methodName).type, syntheticMethod.type);
+    _assertNoErrors(classD);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_setters() {
+    // class A {}
+    // class B extends A {}
+    // class C extends B {}
+    // class I1 { set s(A); }
+    // class I2 { set s(B); }
+    // class I3 { set s(C); }
+    // class D implements I1, I2, I3 {}
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String accessorName = "s";
+    PropertyAccessorElement setter1 =
+        ElementFactory.setterElement(accessorName, false, classA.type);
+    classI1.accessors = <PropertyAccessorElement>[setter1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    PropertyAccessorElement setter2 =
+        ElementFactory.setterElement(accessorName, false, classB.type);
+    classI2.accessors = <PropertyAccessorElement>[setter2];
+    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
+    PropertyAccessorElement setter3 =
+        ElementFactory.setterElement(accessorName, false, classC.type);
+    classI3.accessors = <PropertyAccessorElement>[setter3];
+    ClassElementImpl classD = ElementFactory.classElement2("D");
+    classD.interfaces = <InterfaceType>[
+      classI1.type,
+      classI2.type,
+      classI3.type
+    ];
+    MemberMap mapD =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
+    expect(mapD.size, _numOfMembersInObject + 1);
+    PropertyAccessorElementImpl syntheticAccessor = ElementFactory
+        .setterElement(accessorName, false, _typeProvider.dynamicType);
+    syntheticAccessor.returnType = _typeProvider.dynamicType;
+    expect(mapD.get("$accessorName=").type, syntheticAccessor.type);
+    _assertNoErrors(classD);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods() {
+    // class I1 { int m(); }
+    // class I2 { int m([int]); }
+    // class A implements I1, I2 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElement methodM1 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    MethodElementImpl methodM2 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    ParameterElementImpl parameter1 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a1"));
+    parameter1.type = _typeProvider.intType;
+    parameter1.parameterKind = ParameterKind.POSITIONAL;
+    methodM2.parameters = <ParameterElement>[parameter1];
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject + 1);
+    expect(mapA.get(methodName), same(methodM2));
+    _assertNoErrors(classA);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_3_methods() {
+    // class I1 { int m(); }
+    // class I2 { int m([int]); }
+    // class I3 { int m([int, int]); }
+    // class A implements I1, I2, I3 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElementImpl methodM1 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    MethodElementImpl methodM2 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    ParameterElementImpl parameter1 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a1"));
+    parameter1.type = _typeProvider.intType;
+    parameter1.parameterKind = ParameterKind.POSITIONAL;
+    methodM1.parameters = <ParameterElement>[parameter1];
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
+    MethodElementImpl methodM3 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    ParameterElementImpl parameter2 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a2"));
+    parameter2.type = _typeProvider.intType;
+    parameter2.parameterKind = ParameterKind.POSITIONAL;
+    ParameterElementImpl parameter3 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a3"));
+    parameter3.type = _typeProvider.intType;
+    parameter3.parameterKind = ParameterKind.POSITIONAL;
+    methodM3.parameters = <ParameterElement>[parameter2, parameter3];
+    classI3.methods = <MethodElement>[methodM3];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[
+      classI1.type,
+      classI2.type,
+      classI3.type
+    ];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject + 1);
+    expect(mapA.get(methodName), same(methodM3));
+    _assertNoErrors(classA);
+  }
+
+  void
+      test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_4_methods() {
+    // class I1 { int m(); }
+    // class I2 { int m(); }
+    // class I3 { int m([int]); }
+    // class I4 { int m([int, int]); }
+    // class A implements I1, I2, I3, I4 {}
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName = "m";
+    MethodElement methodM1 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    MethodElement methodM2 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classI2.methods = <MethodElement>[methodM2];
+    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
+    MethodElementImpl methodM3 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    ParameterElementImpl parameter1 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a1"));
+    parameter1.type = _typeProvider.intType;
+    parameter1.parameterKind = ParameterKind.POSITIONAL;
+    methodM3.parameters = <ParameterElement>[parameter1];
+    classI3.methods = <MethodElement>[methodM3];
+    ClassElementImpl classI4 = ElementFactory.classElement2("I4");
+    MethodElementImpl methodM4 =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    ParameterElementImpl parameter2 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a2"));
+    parameter2.type = _typeProvider.intType;
+    parameter2.parameterKind = ParameterKind.POSITIONAL;
+    ParameterElementImpl parameter3 =
+        new ParameterElementImpl.forNode(AstFactory.identifier3("a3"));
+    parameter3.type = _typeProvider.intType;
+    parameter3.parameterKind = ParameterKind.POSITIONAL;
+    methodM4.parameters = <ParameterElement>[parameter2, parameter3];
+    classI4.methods = <MethodElement>[methodM4];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[
+      classI1.type,
+      classI2.type,
+      classI3.type,
+      classI4.type
+    ];
+    MemberMap mapA =
+        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+    expect(mapA.size, _numOfMembersInObject + 1);
+    expect(mapA.get(methodName), same(methodM4));
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupInheritance_interface_getter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classB, getterName),
+        same(getterG));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_interface_method() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classB, methodName),
+        same(methodM));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_interface_setter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String setterName = "s";
+    PropertyAccessorElement setterS =
+        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[setterS];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classB, "$setterName="),
+        same(setterS));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_interface_staticMember() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    (methodM as MethodElementImpl).static = true;
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classB, methodName), isNull);
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_interfaces_infiniteLoop() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classA, "name"), isNull);
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupInheritance_interfaces_infiniteLoop2() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classA.interfaces = <InterfaceType>[classB.type];
+    classB.interfaces = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classA, "name"), isNull);
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_interfaces_union2() {
+    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
+    String methodName1 = "m1";
+    MethodElement methodM1 =
+        ElementFactory.methodElement(methodName1, _typeProvider.intType);
+    classI1.methods = <MethodElement>[methodM1];
+    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
+    String methodName2 = "m2";
+    MethodElement methodM2 =
+        ElementFactory.methodElement(methodName2, _typeProvider.intType);
+    classI2.methods = <MethodElement>[methodM2];
+    classI2.interfaces = <InterfaceType>[classI1.type];
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.interfaces = <InterfaceType>[classI2.type];
+    expect(_inheritanceManager.lookupInheritance(classA, methodName1),
+        same(methodM1));
+    expect(_inheritanceManager.lookupInheritance(classA, methodName2),
+        same(methodM2));
+    _assertNoErrors(classI1);
+    _assertNoErrors(classI2);
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupInheritance_mixin_getter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classB, getterName),
+        same(getterG));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_mixin_method() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classB, methodName),
+        same(methodM));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_mixin_setter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String setterName = "s";
+    PropertyAccessorElement setterS =
+        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[setterS];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classB, "$setterName="),
+        same(setterS));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_mixin_staticMember() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    (methodM as MethodElementImpl).static = true;
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.mixins = <InterfaceType>[classA.type];
+    expect(_inheritanceManager.lookupInheritance(classB, methodName), isNull);
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_noMember() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    expect(_inheritanceManager.lookupInheritance(classA, "a"), isNull);
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupInheritance_superclass_getter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    expect(_inheritanceManager.lookupInheritance(classB, getterName),
+        same(getterG));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_superclass_infiniteLoop() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.supertype = classA.type;
+    expect(_inheritanceManager.lookupInheritance(classA, "name"), isNull);
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupInheritance_superclass_infiniteLoop2() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classA.supertype = classB.type;
+    classB.supertype = classA.type;
+    expect(_inheritanceManager.lookupInheritance(classA, "name"), isNull);
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_superclass_method() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    expect(_inheritanceManager.lookupInheritance(classB, methodName),
+        same(methodM));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_superclass_setter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String setterName = "s";
+    PropertyAccessorElement setterS =
+        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[setterS];
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    expect(_inheritanceManager.lookupInheritance(classB, "$setterName="),
+        same(setterS));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupInheritance_superclass_staticMember() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    (methodM as MethodElementImpl).static = true;
+    classA.methods = <MethodElement>[methodM];
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    expect(_inheritanceManager.lookupInheritance(classB, methodName), isNull);
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupMember_getter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    expect(_inheritanceManager.lookupMember(classA, getterName), same(getterG));
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupMember_getter_static() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String getterName = "g";
+    PropertyAccessorElement getterG =
+        ElementFactory.getterElement(getterName, true, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[getterG];
+    expect(_inheritanceManager.lookupMember(classA, getterName), isNull);
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupMember_method() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    expect(_inheritanceManager.lookupMember(classA, methodName), same(methodM));
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupMember_method_static() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElement methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    (methodM as MethodElementImpl).static = true;
+    classA.methods = <MethodElement>[methodM];
+    expect(_inheritanceManager.lookupMember(classA, methodName), isNull);
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupMember_noMember() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    expect(_inheritanceManager.lookupMember(classA, "a"), isNull);
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupMember_setter() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String setterName = "s";
+    PropertyAccessorElement setterS =
+        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[setterS];
+    expect(_inheritanceManager.lookupMember(classA, "$setterName="),
+        same(setterS));
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupMember_setter_static() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String setterName = "s";
+    PropertyAccessorElement setterS =
+        ElementFactory.setterElement(setterName, true, _typeProvider.intType);
+    classA.accessors = <PropertyAccessorElement>[setterS];
+    expect(_inheritanceManager.lookupMember(classA, setterName), isNull);
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupOverrides_noParentClasses() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElementImpl methodM =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodM];
+    expect(
+        _inheritanceManager.lookupOverrides(classA, methodName), hasLength(0));
+    _assertNoErrors(classA);
+  }
+
+  void test_lookupOverrides_overrideBaseClass() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElementImpl methodMinA =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodMinA];
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    MethodElementImpl methodMinB =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classB.methods = <MethodElement>[methodMinB];
+    List<ExecutableElement> overrides =
+        _inheritanceManager.lookupOverrides(classB, methodName);
+    expect(overrides, unorderedEquals([methodMinA]));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupOverrides_overrideInterface() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElementImpl methodMinA =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodMinA];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    classB.interfaces = <InterfaceType>[classA.type];
+    MethodElementImpl methodMinB =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classB.methods = <MethodElement>[methodMinB];
+    List<ExecutableElement> overrides =
+        _inheritanceManager.lookupOverrides(classB, methodName);
+    expect(overrides, unorderedEquals([methodMinA]));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+  }
+
+  void test_lookupOverrides_overrideTwoInterfaces() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    String methodName = "m";
+    MethodElementImpl methodMinA =
+        ElementFactory.methodElement(methodName, _typeProvider.intType);
+    classA.methods = <MethodElement>[methodMinA];
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    MethodElementImpl methodMinB =
+        ElementFactory.methodElement(methodName, _typeProvider.doubleType);
+    classB.methods = <MethodElement>[methodMinB];
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    classC.interfaces = <InterfaceType>[classA.type, classB.type];
+    MethodElementImpl methodMinC =
+        ElementFactory.methodElement(methodName, _typeProvider.numType);
+    classC.methods = <MethodElement>[methodMinC];
+    List<ExecutableElement> overrides =
+        _inheritanceManager.lookupOverrides(classC, methodName);
+    expect(overrides, unorderedEquals([methodMinA, methodMinB]));
+    _assertNoErrors(classA);
+    _assertNoErrors(classB);
+    _assertNoErrors(classC);
+  }
+
+  void _assertErrors(ClassElement classElt,
+      [List<ErrorCode> expectedErrorCodes = ErrorCode.EMPTY_LIST]) {
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    HashSet<AnalysisError> actualErrors =
+        _inheritanceManager.getErrors(classElt);
+    if (actualErrors != null) {
+      for (AnalysisError error in actualErrors) {
+        errorListener.onError(error);
+      }
+    }
+    errorListener.assertErrorsWithCodes(expectedErrorCodes);
+  }
+
+  void _assertNoErrors(ClassElement classElt) {
+    _assertErrors(classElt);
+  }
+
+  /**
+   * Create the inheritance manager used by the tests.
+   *
+   * @return the inheritance manager that was created
+   */
+  InheritanceManager _createInheritanceManager() {
+    AnalysisContext context = AnalysisContextFactory.contextWithCore();
+    FileBasedSource source =
+        new FileBasedSource(FileUtilities2.createFile("/test.dart"));
+    CompilationUnitElementImpl definingCompilationUnit =
+        new CompilationUnitElementImpl("test.dart");
+    definingCompilationUnit.librarySource =
+        definingCompilationUnit.source = source;
+    _definingLibrary = ElementFactory.library(context, "test");
+    _definingLibrary.definingCompilationUnit = definingCompilationUnit;
+    return new InheritanceManager(_definingLibrary);
+  }
+}
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index de21885..8b4cd5e 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -14,7 +14,7 @@
 
 import '../reflective_tests.dart';
 import '../utils.dart';
-import 'resolver_test.dart';
+import 'resolver_test_case.dart';
 import 'test_support.dart';
 
 main() {
@@ -167,7 +167,7 @@
 class N {}
 class N2 {}''');
     computeLibrarySourceErrors(source);
-    assertNoErrors(source);
+    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
   }
 
   void test_annotated_partOfDeclaration() {
@@ -1477,6 +1477,26 @@
     verify([source]);
   }
 
+  void test_constRedirectSkipsSupertype() {
+    // 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();
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
   void test_constructorDeclaration_scope_signature() {
     Source source = addSource(r'''
 const app = 0;
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..9fc1dfb
--- /dev/null
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -0,0 +1,1235 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.non_hint_code_test;
+
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+
+import '../reflective_tests.dart';
+import '../utils.dart';
+import 'resolver_test_case.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(NonHintCodeTest);
+}
+
+@reflectiveTest
+class NonHintCodeTest extends ResolverTestCase {
+  void test_deadCode_deadBlock_conditionalElse_debugConst() {
+    Source source = addSource(r'''
+const bool DEBUG = true;
+f() {
+  DEBUG ? 1 : 2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_conditionalIf_debugConst() {
+    Source source = addSource(r'''
+const bool DEBUG = false;
+f() {
+  DEBUG ? 1 : 2;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_else() {
+    Source source = addSource(r'''
+const bool DEBUG = true;
+f() {
+  if(DEBUG) {} else {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_if_debugConst_prefixedIdentifier() {
+    Source source = addSource(r'''
+class A {
+  static const bool DEBUG = false;
+}
+f() {
+  if(A.DEBUG) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_if_debugConst_prefixedIdentifier2() {
+    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;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_if_debugConst_propertyAccessor() {
+    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;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_if_debugConst_simpleIdentifier() {
+    Source source = addSource(r'''
+const bool DEBUG = false;
+f() {
+  if(DEBUG) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadBlock_while_debugConst() {
+    Source source = addSource(r'''
+const bool DEBUG = false;
+f() {
+  while(DEBUG) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadCatch_onCatchSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+f() {
+  try {} on B catch (e) {} on A catch (e) {} catch (e) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadOperandLHS_and_debugConst() {
+    Source source = addSource(r'''
+const bool DEBUG = false;
+f() {
+  bool b = DEBUG && false;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deadCode_deadOperandLHS_or_debugConst() {
+    Source source = addSource(r'''
+const bool DEBUG = true;
+f() {
+  bool b = DEBUG || true;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deprecatedMemberUse_inDeprecatedClass() {
+    Source source = addSource(r'''
+@deprecated
+f() {}
+
+@deprecated
+class C {
+  m() {
+    f();
+  }
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deprecatedMemberUse_inDeprecatedFunction() {
+    Source source = addSource(r'''
+@deprecated
+f() {}
+
+@deprecated
+g() {
+  f();
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deprecatedMemberUse_inDeprecatedMethod() {
+    Source source = addSource(r'''
+@deprecated
+f() {}
+
+class C {
+  @deprecated
+  m() {
+    f();
+  }
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_deprecatedMemberUse_inDeprecatedMethod_inDeprecatedClass() {
+    Source source = addSource(r'''
+@deprecated
+f() {}
+
+@deprecated
+class C {
+  @deprecated
+  m() {
+    f();
+  }
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_divisionOptimization() {
+    Source source = addSource(r'''
+f(int x, int y) {
+  var v = x / y.toInt();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_divisionOptimization_supressIfDivisionNotDefinedInCore() {
+    Source source = addSource(r'''
+f(x, y) {
+  var v = (x / y).toInt();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_divisionOptimization_supressIfDivisionOverridden() {
+    Source source = addSource(r'''
+class A {
+  num operator /(x) { return x; }
+}
+f(A x, A y) {
+  var v = (x / y).toInt();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_duplicateImport_as() {
+    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 {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_duplicateImport_hide() {
+    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 {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_duplicateImport_show() {
+    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 {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_importDeferredLibraryWithLoadFunction() {
+    resolveWithErrors(<String>[
+      r'''
+library lib1;
+f() {}''',
+      r'''
+library root;
+import 'lib1.dart' deferred as lib1;
+main() { lib1.f(); }'''
+    ], ErrorCode.EMPTY_LIST);
+  }
+
+  void test_issue20904BuggyTypePromotionAtIfJoin_1() {
+    // 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;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_issue20904BuggyTypePromotionAtIfJoin_3() {
+    // 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;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_issue20904BuggyTypePromotionAtIfJoin_4() {
+    // 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;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_missingReturn_emptyFunctionBody() {
+    Source source = addSource(r'''
+abstract class A {
+  int m();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_missingReturn_expressionFunctionBody() {
+    Source source = addSource("int f() => 0;");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_missingReturn_noReturnType() {
+    Source source = addSource("f() {}");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_missingReturn_voidReturnType() {
+    Source source = addSource("void f() {}");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_for_noCondition() {
+    Source source = addSource(r'''
+m(x) {
+  for (var v = x; ; v++) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_nullAwareInCondition_if_notTopLevel() {
+    Source source = addSource(r'''
+m(x) {
+  if (x?.y == null) {}
+}
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_overrideEqualsButNotHashCode() {
+    Source source = addSource(r'''
+class A {
+  bool operator ==(x) { return x; }
+  get hashCode => 0;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingGetter_inInterface() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+  int get m => 0;
+}
+class B implements A {
+  @override
+  int get m => 1;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingGetter_inSuperclass() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+  int get m => 0;
+}
+class B extends A {
+  @override
+  int get m => 1;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingMethod_inInterface() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+  int m() => 0;
+}
+class B implements A {
+  @override
+  int m() => 1;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingMethod_inSuperclass() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+  int m() => 0;
+}
+class B extends A {
+  @override
+  int m() => 1;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingSetter_inInterface() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+  set m(int x) {}
+}
+class B implements A {
+  @override
+  set m(int x) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_overrideOnNonOverridingSetter_inSuperclass() {
+    Source source = addSource(r'''
+library dart.core;
+const override = null;
+class A {
+  set m(int x) {}
+}
+class B extends A {
+  @override
+  set m(int x) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_propagatedFieldType() {
+    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());
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_proxy_annotation_prefixed() {
+    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;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_proxy_annotation_prefixed2() {
+    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;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_proxy_annotation_prefixed3() {
+    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 {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedGetter_inSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  get b => 0;
+}
+f(var a) {
+  if(a is A) {
+    return a.b;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedMethod_assignmentExpression_inSubtype() {
+    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;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedMethod_dynamic() {
+    Source source = addSource(r'''
+class D<T extends dynamic> {
+  fieldAccess(T t) => t.abc;
+  methodAccess(T t) => t.xyz(1, 2, 'three');
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedMethod_inSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  b() {}
+}
+f() {
+  var a = new A();
+  a.b();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedMethod_unionType_all() {
+    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();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedMethod_unionType_some() {
+    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);
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedOperator_binaryExpression_inSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  operator +(B b) {}
+}
+f(var a) {
+  if(a is A) {
+    a + 1;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedOperator_indexBoth_inSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  operator [](int index) {}
+}
+f(var a) {
+  if(a is A) {
+    a[0]++;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedOperator_indexGetter_inSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  operator [](int index) {}
+}
+f(var a) {
+  if(a is A) {
+    a[0];
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedOperator_indexSetter_inSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  operator []=(i, v) {}
+}
+f(var a) {
+  if(a is A) {
+    a[0] = 1;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedOperator_postfixExpression() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  operator +(B b) {return new B();}
+}
+f(var a) {
+  if(a is A) {
+    a++;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedOperator_prefixExpression() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  operator +(B b) {return new B();}
+}
+f(var a) {
+  if(a is A) {
+    ++a;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_undefinedSetter_inSubtype() {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  set b(x) {}
+}
+f(var a) {
+  if(a is A) {
+    a.b = 0;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_unnecessaryCast_13855_parameter_A() {
+    // dartbug.com/13855, dartbug.com/13732
+    Source source = addSource(r'''
+class A{
+  a() {}
+}
+class B<E> {
+  E e;
+  m() {
+    (e as A).a();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unnecessaryCast_conditionalExpression() {
+    Source source = addSource(r'''
+abstract class I {}
+class A implements I {}
+class B implements I {}
+I m(A a, B b) {
+  return a == null ? b as I : a as I;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unnecessaryCast_dynamic_type() {
+    Source source = addSource(r'''
+m(v) {
+  var b = v as Object;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unnecessaryCast_generics() {
+    // dartbug.com/18953
+    Source source = addSource(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) {});
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unnecessaryCast_type_dynamic() {
+    Source source = addSource(r'''
+m(v) {
+  var b = Object as dynamic;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unnecessaryNoSuchMethod_blockBody_notReturnStatement() {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(x) => super.noSuchMethod(x);
+}
+class B extends A {
+  mmm();
+  noSuchMethod(y) {
+    print(y);
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unnecessaryNoSuchMethod_blockBody_notSingleStatement() {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(x) => super.noSuchMethod(x);
+}
+class B extends A {
+  mmm();
+  noSuchMethod(y) {
+    print(y);
+    return super.noSuchMethod(y);
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unnecessaryNoSuchMethod_expressionBody_notNoSuchMethod() {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(x) => super.noSuchMethod(x);
+}
+class B extends A {
+  mmm();
+  noSuchMethod(y) => super.hashCode;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unnecessaryNoSuchMethod_expressionBody_notSuper() {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(x) => super.noSuchMethod(x);
+}
+class B extends A {
+  mmm();
+  noSuchMethod(y) => 42;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedImport_annotationOnDirective() {
+    Source source = addSource(r'''
+library L;
+@A()
+import 'lib1.dart';''');
+    Source source2 = addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+class A {
+  const A() {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    verify([source, source2]);
+  }
+
+  void test_unusedImport_as_equalPrefixes() {
+    // 18818
+    Source source = addSource(r'''
+library L;
+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 {}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source);
+    assertNoErrors(source2);
+    assertNoErrors(source3);
+    verify([source, source2, source3]);
+  }
+
+  void test_unusedImport_core_library() {
+    Source source = addSource(r'''
+library L;
+import 'dart:core';''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedImport_export() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart';
+Two two;''');
+    addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+export 'lib2.dart';
+class One {}''');
+    addNamedSource(
+        "/lib2.dart",
+        r'''
+library lib2;
+class Two {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedImport_export2() {
+    Source source = addSource(r'''
+library L;
+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 {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedImport_export_infiniteLoop() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart';
+Two two;''');
+    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;
+export 'lib2.dart';
+class Three {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedImport_metadata() {
+    Source source = addSource(r'''
+library L;
+@A(x)
+import 'lib1.dart';
+class A {
+  final int value;
+  const A(this.value);
+}''');
+    addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+const x = 0;''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedImport_prefix_topLevelFunction() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart' hide topLevelFunction;
+import 'lib1.dart' as one show topLevelFunction;
+class A {
+  static void x() {
+    One o;
+    one.topLevelFunction();
+  }
+}''');
+    addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+class One {}
+topLevelFunction() {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_unusedImport_prefix_topLevelFunction2() {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart' hide topLevelFunction;
+import 'lib1.dart' as one show topLevelFunction;
+import 'lib1.dart' as two show topLevelFunction;
+class A {
+  static void x() {
+    One o;
+    one.topLevelFunction();
+    two.topLevelFunction();
+  }
+}''');
+    addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+class One {}
+topLevelFunction() {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_useOfVoidResult_implicitReturnValue() {
+    Source source = addSource(r'''
+f() {}
+class A {
+  n() {
+    var a = f();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_useOfVoidResult_nonVoidReturnValue() {
+    Source source = addSource(r'''
+int f() => 1;
+g() {
+  var a = f();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+}
+
+class PubSuggestionCodeTest extends ResolverTestCase {
+  void test_import_package() {
+    Source source = addSource("import 'package:somepackage/other.dart';");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+  }
+
+  void test_import_packageWithDotDot() {
+    Source source = addSource("import 'package:somepackage/../other.dart';");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+      HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT
+    ]);
+  }
+
+  void test_import_packageWithLeadingDotDot() {
+    Source source = addSource("import 'package:../other.dart';");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+      HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT
+    ]);
+  }
+
+  void test_import_referenceIntoLibDirectory() {
+    cacheSource("/myproj/pubspec.yaml", "");
+    cacheSource("/myproj/lib/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/web/test.dart", "import '../lib/other.dart';");
+    computeLibrarySourceErrors(source);
+    assertErrors(
+        source, [HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE]);
+  }
+
+  void test_import_referenceIntoLibDirectory_no_pubspec() {
+    cacheSource("/myproj/lib/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/web/test.dart", "import '../lib/other.dart';");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_import_referenceOutOfLibDirectory() {
+    cacheSource("/myproj/pubspec.yaml", "");
+    cacheSource("/myproj/web/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/lib/test.dart", "import '../web/other.dart';");
+    computeLibrarySourceErrors(source);
+    assertErrors(
+        source, [HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE]);
+  }
+
+  void test_import_referenceOutOfLibDirectory_no_pubspec() {
+    cacheSource("/myproj/web/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/lib/test.dart", "import '../web/other.dart';");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_import_valid_inside_lib1() {
+    cacheSource("/myproj/pubspec.yaml", "");
+    cacheSource("/myproj/lib/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/lib/test.dart", "import 'other.dart';");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_import_valid_inside_lib2() {
+    cacheSource("/myproj/pubspec.yaml", "");
+    cacheSource("/myproj/lib/bar/other.dart", "");
+    Source source = addNamedSource(
+        "/myproj/lib/foo/test.dart", "import '../bar/other.dart';");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_import_valid_outside_lib() {
+    cacheSource("/myproj/pubspec.yaml", "");
+    cacheSource("/myproj/web/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+}
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 19a2a89..c366b84 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -7,11 +7,8 @@
 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/token.dart';
 import 'package:analyzer/src/dart/ast/utilities.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';
@@ -20,7 +17,6 @@
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/source.dart' show Source;
 import 'package:analyzer/src/generated/testing/ast_factory.dart';
-import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/token_factory.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:unittest/unittest.dart' hide Configuration;
@@ -36,7 +32,6 @@
   runReflectiveTests(IncrementalParserTest);
   runReflectiveTests(NonErrorParserTest);
   runReflectiveTests(RecoveryParserTest);
-  runReflectiveTests(ResolutionCopierTest);
   runReflectiveTests(SimpleParserTest);
 }
 
@@ -2038,6 +2033,24 @@
         "static var x;", [ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION]);
   }
 
+  void test_string_unterminated_interpolation_block() {
+    ParserTestCase.parseCompilationUnit(
+        r'''
+m() {
+ {
+ '${${
+''',
+        [
+          ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
+          ParserErrorCode.EXPECTED_TOKEN,
+          ParserErrorCode.EXPECTED_TOKEN,
+          ParserErrorCode.EXPECTED_TOKEN,
+          ParserErrorCode.EXPECTED_TOKEN,
+          ParserErrorCode.EXPECTED_TOKEN,
+          ParserErrorCode.EXPECTED_TOKEN,
+        ]);
+  }
+
   void test_switchHasCaseAfterDefaultCase() {
     parse4(
         "parseSwitchStatement",
@@ -3505,7 +3518,7 @@
 
   void test_expressionList_multiple_end() {
     List<Expression> result = parse4("parseExpressionList", ", 2, 3, 4",
-        [ParserErrorCode.MISSING_IDENTIFIER]);
+        [ParserErrorCode.MISSING_IDENTIFIER]) as List<Expression>;
     expect(result, hasLength(4));
     Expression syntheticExpression = result[0];
     EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
@@ -3515,7 +3528,7 @@
 
   void test_expressionList_multiple_middle() {
     List<Expression> result = parse4("parseExpressionList", "1, 2, , 4",
-        [ParserErrorCode.MISSING_IDENTIFIER]);
+        [ParserErrorCode.MISSING_IDENTIFIER]) as List<Expression>;
     expect(result, hasLength(4));
     Expression syntheticExpression = result[2];
     EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
@@ -3525,7 +3538,7 @@
 
   void test_expressionList_multiple_start() {
     List<Expression> result = parse4("parseExpressionList", "1, 2, 3,",
-        [ParserErrorCode.MISSING_IDENTIFIER]);
+        [ParserErrorCode.MISSING_IDENTIFIER]) as List<Expression>;
     expect(result, hasLength(4));
     Expression syntheticExpression = result[3];
     EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
@@ -4247,663 +4260,6 @@
   }
 }
 
-@reflectiveTest
-class ResolutionCopierTest extends EngineTestCase {
-  void test_visitAdjacentStrings() {
-    AdjacentStrings createNode() => new AdjacentStrings([
-          new SimpleStringLiteral(null, 'hello'),
-          new SimpleStringLiteral(null, 'world')
-        ]);
-
-    AdjacentStrings fromNode = createNode();
-    DartType propagatedType = ElementFactory.classElement2("A").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("B").type;
-    fromNode.staticType = staticType;
-
-    AdjacentStrings toNode = createNode();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitAnnotation() {
-    String annotationName = "proxy";
-    Annotation fromNode =
-        AstFactory.annotation(AstFactory.identifier3(annotationName));
-    Element element = ElementFactory.topLevelVariableElement2(annotationName);
-    fromNode.element = element;
-    Annotation toNode =
-        AstFactory.annotation(AstFactory.identifier3(annotationName));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.element, same(element));
-  }
-
-  void test_visitAsExpression() {
-    AsExpression fromNode = AstFactory.asExpression(
-        AstFactory.identifier3("x"), AstFactory.typeName4("A"));
-    DartType propagatedType = ElementFactory.classElement2("A").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("B").type;
-    fromNode.staticType = staticType;
-    AsExpression toNode = AstFactory.asExpression(
-        AstFactory.identifier3("x"), AstFactory.typeName4("A"));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitAssignmentExpression() {
-    AssignmentExpression fromNode = AstFactory.assignmentExpression(
-        AstFactory.identifier3("a"),
-        TokenType.PLUS_EQ,
-        AstFactory.identifier3("b"));
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    MethodElement propagatedElement =
-        ElementFactory.methodElement("+", propagatedType);
-    fromNode.propagatedElement = propagatedElement;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    MethodElement staticElement = ElementFactory.methodElement("+", staticType);
-    fromNode.staticElement = staticElement;
-    fromNode.staticType = staticType;
-    AssignmentExpression toNode = AstFactory.assignmentExpression(
-        AstFactory.identifier3("a"),
-        TokenType.PLUS_EQ,
-        AstFactory.identifier3("b"));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedElement, same(propagatedElement));
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticElement, same(staticElement));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitBinaryExpression() {
-    BinaryExpression fromNode = AstFactory.binaryExpression(
-        AstFactory.identifier3("a"),
-        TokenType.PLUS,
-        AstFactory.identifier3("b"));
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    MethodElement propagatedElement =
-        ElementFactory.methodElement("+", propagatedType);
-    fromNode.propagatedElement = propagatedElement;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    MethodElement staticElement = ElementFactory.methodElement("+", staticType);
-    fromNode.staticElement = staticElement;
-    fromNode.staticType = staticType;
-    BinaryExpression toNode = AstFactory.binaryExpression(
-        AstFactory.identifier3("a"),
-        TokenType.PLUS,
-        AstFactory.identifier3("b"));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedElement, same(propagatedElement));
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticElement, same(staticElement));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitBooleanLiteral() {
-    BooleanLiteral fromNode = AstFactory.booleanLiteral(true);
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    BooleanLiteral toNode = AstFactory.booleanLiteral(true);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitCascadeExpression() {
-    CascadeExpression fromNode = AstFactory.cascadeExpression(
-        AstFactory.identifier3("a"), [AstFactory.identifier3("b")]);
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    CascadeExpression toNode = AstFactory.cascadeExpression(
-        AstFactory.identifier3("a"), [AstFactory.identifier3("b")]);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitCompilationUnit() {
-    CompilationUnit fromNode = AstFactory.compilationUnit();
-    CompilationUnitElement element =
-        new CompilationUnitElementImpl("test.dart");
-    fromNode.element = element;
-    CompilationUnit toNode = AstFactory.compilationUnit();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.element, same(element));
-  }
-
-  void test_visitConditionalExpression() {
-    ConditionalExpression fromNode = AstFactory.conditionalExpression(
-        AstFactory.identifier3("c"),
-        AstFactory.identifier3("a"),
-        AstFactory.identifier3("b"));
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    ConditionalExpression toNode = AstFactory.conditionalExpression(
-        AstFactory.identifier3("c"),
-        AstFactory.identifier3("a"),
-        AstFactory.identifier3("b"));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitConstructorDeclaration() {
-    String className = "A";
-    String constructorName = "c";
-    ConstructorDeclaration fromNode = AstFactory.constructorDeclaration(
-        AstFactory.identifier3(className),
-        constructorName,
-        AstFactory.formalParameterList(),
-        null);
-    ConstructorElement element = ElementFactory.constructorElement2(
-        ElementFactory.classElement2(className), constructorName);
-    fromNode.element = element;
-    ConstructorDeclaration toNode = AstFactory.constructorDeclaration(
-        AstFactory.identifier3(className),
-        constructorName,
-        AstFactory.formalParameterList(),
-        null);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.element, same(element));
-  }
-
-  void test_visitConstructorName() {
-    ConstructorName fromNode =
-        AstFactory.constructorName(AstFactory.typeName4("A"), "c");
-    ConstructorElement staticElement = ElementFactory.constructorElement2(
-        ElementFactory.classElement2("A"), "c");
-    fromNode.staticElement = staticElement;
-    ConstructorName toNode =
-        AstFactory.constructorName(AstFactory.typeName4("A"), "c");
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.staticElement, same(staticElement));
-  }
-
-  void test_visitDoubleLiteral() {
-    DoubleLiteral fromNode = AstFactory.doubleLiteral(1.0);
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    DoubleLiteral toNode = AstFactory.doubleLiteral(1.0);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitExportDirective() {
-    ExportDirective fromNode = AstFactory.exportDirective2("dart:uri");
-    ExportElement element = new ExportElementImpl(-1);
-    fromNode.element = element;
-    ExportDirective toNode = AstFactory.exportDirective2("dart:uri");
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.element, same(element));
-  }
-
-  void test_visitFunctionExpression() {
-    FunctionExpression fromNode = AstFactory.functionExpression2(
-        AstFactory.formalParameterList(), AstFactory.emptyFunctionBody());
-    MethodElement element = ElementFactory.methodElement(
-        "m", ElementFactory.classElement2("C").type);
-    fromNode.element = element;
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    FunctionExpression toNode = AstFactory.functionExpression2(
-        AstFactory.formalParameterList(), AstFactory.emptyFunctionBody());
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.element, same(element));
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitFunctionExpressionInvocation() {
-    FunctionExpressionInvocation fromNode =
-        AstFactory.functionExpressionInvocation(AstFactory.identifier3("f"));
-    MethodElement propagatedElement = ElementFactory.methodElement(
-        "m", ElementFactory.classElement2("C").type);
-    fromNode.propagatedElement = propagatedElement;
-    MethodElement staticElement = ElementFactory.methodElement(
-        "m", ElementFactory.classElement2("C").type);
-    fromNode.staticElement = staticElement;
-    FunctionExpressionInvocation toNode =
-        AstFactory.functionExpressionInvocation(AstFactory.identifier3("f"));
-
-    _copyAndVerifyInvocation(fromNode, toNode);
-
-    expect(toNode.propagatedElement, same(propagatedElement));
-    expect(toNode.staticElement, same(staticElement));
-  }
-
-  void test_visitImportDirective() {
-    ImportDirective fromNode = AstFactory.importDirective3("dart:uri", null);
-    ImportElement element = new ImportElementImpl(0);
-    fromNode.element = element;
-    ImportDirective toNode = AstFactory.importDirective3("dart:uri", null);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.element, same(element));
-  }
-
-  void test_visitIndexExpression() {
-    IndexExpression fromNode = AstFactory.indexExpression(
-        AstFactory.identifier3("a"), AstFactory.integer(0));
-    MethodElement propagatedElement = ElementFactory.methodElement(
-        "m", ElementFactory.classElement2("C").type);
-    MethodElement staticElement = ElementFactory.methodElement(
-        "m", ElementFactory.classElement2("C").type);
-    AuxiliaryElements auxiliaryElements =
-        new AuxiliaryElements(staticElement, propagatedElement);
-    fromNode.auxiliaryElements = auxiliaryElements;
-    fromNode.propagatedElement = propagatedElement;
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    fromNode.staticElement = staticElement;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    IndexExpression toNode = AstFactory.indexExpression(
-        AstFactory.identifier3("a"), AstFactory.integer(0));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.auxiliaryElements, same(auxiliaryElements));
-    expect(toNode.propagatedElement, same(propagatedElement));
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticElement, same(staticElement));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitInstanceCreationExpression() {
-    InstanceCreationExpression fromNode = AstFactory
-        .instanceCreationExpression2(Keyword.NEW, AstFactory.typeName4("C"));
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    ConstructorElement staticElement = ElementFactory.constructorElement2(
-        ElementFactory.classElement2("C"), null);
-    fromNode.staticElement = staticElement;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    InstanceCreationExpression toNode = AstFactory.instanceCreationExpression2(
-        Keyword.NEW, AstFactory.typeName4("C"));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticElement, same(staticElement));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitIntegerLiteral() {
-    IntegerLiteral fromNode = AstFactory.integer(2);
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    IntegerLiteral toNode = AstFactory.integer(2);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitIsExpression() {
-    IsExpression fromNode = AstFactory.isExpression(
-        AstFactory.identifier3("x"), false, AstFactory.typeName4("A"));
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    IsExpression toNode = AstFactory.isExpression(
-        AstFactory.identifier3("x"), false, AstFactory.typeName4("A"));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitLibraryIdentifier() {
-    LibraryIdentifier fromNode =
-        AstFactory.libraryIdentifier([AstFactory.identifier3("lib")]);
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    LibraryIdentifier toNode =
-        AstFactory.libraryIdentifier([AstFactory.identifier3("lib")]);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitListLiteral() {
-    ListLiteral fromNode = AstFactory.listLiteral();
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    ListLiteral toNode = AstFactory.listLiteral();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitMapLiteral() {
-    MapLiteral fromNode = AstFactory.mapLiteral2();
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    MapLiteral toNode = AstFactory.mapLiteral2();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitMethodInvocation() {
-    MethodInvocation fromNode = AstFactory.methodInvocation2("m");
-    MethodInvocation toNode = AstFactory.methodInvocation2("m");
-    _copyAndVerifyInvocation(fromNode, toNode);
-  }
-
-  void test_visitNamedExpression() {
-    NamedExpression fromNode =
-        AstFactory.namedExpression2("n", AstFactory.integer(0));
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    NamedExpression toNode =
-        AstFactory.namedExpression2("n", AstFactory.integer(0));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitNullLiteral() {
-    NullLiteral fromNode = AstFactory.nullLiteral();
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    NullLiteral toNode = AstFactory.nullLiteral();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitParenthesizedExpression() {
-    ParenthesizedExpression fromNode =
-        AstFactory.parenthesizedExpression(AstFactory.integer(0));
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    ParenthesizedExpression toNode =
-        AstFactory.parenthesizedExpression(AstFactory.integer(0));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitPartDirective() {
-    PartDirective fromNode = AstFactory.partDirective2("part.dart");
-    LibraryElement element = new LibraryElementImpl.forNode(
-        null, AstFactory.libraryIdentifier2(["lib"]));
-    fromNode.element = element;
-    PartDirective toNode = AstFactory.partDirective2("part.dart");
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.element, same(element));
-  }
-
-  void test_visitPartOfDirective() {
-    PartOfDirective fromNode =
-        AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["lib"]));
-    LibraryElement element = new LibraryElementImpl.forNode(
-        null, AstFactory.libraryIdentifier2(["lib"]));
-    fromNode.element = element;
-    PartOfDirective toNode =
-        AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["lib"]));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.element, same(element));
-  }
-
-  void test_visitPostfixExpression() {
-    String variableName = "x";
-    PostfixExpression fromNode = AstFactory.postfixExpression(
-        AstFactory.identifier3(variableName), TokenType.PLUS_PLUS);
-    MethodElement propagatedElement = ElementFactory.methodElement(
-        "+", ElementFactory.classElement2("C").type);
-    fromNode.propagatedElement = propagatedElement;
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    MethodElement staticElement = ElementFactory.methodElement(
-        "+", ElementFactory.classElement2("C").type);
-    fromNode.staticElement = staticElement;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    PostfixExpression toNode = AstFactory.postfixExpression(
-        AstFactory.identifier3(variableName), TokenType.PLUS_PLUS);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedElement, same(propagatedElement));
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticElement, same(staticElement));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitPrefixedIdentifier() {
-    PrefixedIdentifier fromNode = AstFactory.identifier5("p", "f");
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    PrefixedIdentifier toNode = AstFactory.identifier5("p", "f");
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitPrefixExpression() {
-    PrefixExpression fromNode = AstFactory.prefixExpression(
-        TokenType.PLUS_PLUS, AstFactory.identifier3("x"));
-    MethodElement propagatedElement = ElementFactory.methodElement(
-        "+", ElementFactory.classElement2("C").type);
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedElement = propagatedElement;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    MethodElement staticElement = ElementFactory.methodElement(
-        "+", ElementFactory.classElement2("C").type);
-    fromNode.staticElement = staticElement;
-    fromNode.staticType = staticType;
-    PrefixExpression toNode = AstFactory.prefixExpression(
-        TokenType.PLUS_PLUS, AstFactory.identifier3("x"));
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedElement, same(propagatedElement));
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticElement, same(staticElement));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitPropertyAccess() {
-    PropertyAccess fromNode =
-        AstFactory.propertyAccess2(AstFactory.identifier3("x"), "y");
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    PropertyAccess toNode =
-        AstFactory.propertyAccess2(AstFactory.identifier3("x"), "y");
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitRedirectingConstructorInvocation() {
-    RedirectingConstructorInvocation fromNode =
-        AstFactory.redirectingConstructorInvocation();
-    ConstructorElement staticElement = ElementFactory.constructorElement2(
-        ElementFactory.classElement2("C"), null);
-    fromNode.staticElement = staticElement;
-    RedirectingConstructorInvocation toNode =
-        AstFactory.redirectingConstructorInvocation();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.staticElement, same(staticElement));
-  }
-
-  void test_visitRethrowExpression() {
-    RethrowExpression fromNode = AstFactory.rethrowExpression();
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    RethrowExpression toNode = AstFactory.rethrowExpression();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitSimpleIdentifier() {
-    SimpleIdentifier fromNode = AstFactory.identifier3("x");
-    MethodElement propagatedElement = ElementFactory.methodElement(
-        "m", ElementFactory.classElement2("C").type);
-    MethodElement staticElement = ElementFactory.methodElement(
-        "m", ElementFactory.classElement2("C").type);
-    AuxiliaryElements auxiliaryElements =
-        new AuxiliaryElements(staticElement, propagatedElement);
-    fromNode.auxiliaryElements = auxiliaryElements;
-    fromNode.propagatedElement = propagatedElement;
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    fromNode.staticElement = staticElement;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    SimpleIdentifier toNode = AstFactory.identifier3("x");
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.auxiliaryElements, same(auxiliaryElements));
-    expect(toNode.propagatedElement, same(propagatedElement));
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticElement, same(staticElement));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitSimpleStringLiteral() {
-    SimpleStringLiteral fromNode = AstFactory.string2("abc");
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    SimpleStringLiteral toNode = AstFactory.string2("abc");
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitStringInterpolation() {
-    StringInterpolation fromNode =
-        AstFactory.string([AstFactory.interpolationString("a", "'a'")]);
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    StringInterpolation toNode =
-        AstFactory.string([AstFactory.interpolationString("a", "'a'")]);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitSuperConstructorInvocation() {
-    SuperConstructorInvocation fromNode =
-        AstFactory.superConstructorInvocation();
-    ConstructorElement staticElement = ElementFactory.constructorElement2(
-        ElementFactory.classElement2("C"), null);
-    fromNode.staticElement = staticElement;
-    SuperConstructorInvocation toNode = AstFactory.superConstructorInvocation();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.staticElement, same(staticElement));
-  }
-
-  void test_visitSuperExpression() {
-    SuperExpression fromNode = AstFactory.superExpression();
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    SuperExpression toNode = AstFactory.superExpression();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitSymbolLiteral() {
-    SymbolLiteral fromNode = AstFactory.symbolLiteral(["s"]);
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    SymbolLiteral toNode = AstFactory.symbolLiteral(["s"]);
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitThisExpression() {
-    ThisExpression fromNode = AstFactory.thisExpression();
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    ThisExpression toNode = AstFactory.thisExpression();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitThrowExpression() {
-    ThrowExpression fromNode = AstFactory.throwExpression();
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    ThrowExpression toNode = AstFactory.throwExpression();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitTypeName() {
-    TypeName fromNode = AstFactory.typeName4("C");
-    DartType type = ElementFactory.classElement2("C").type;
-    fromNode.type = type;
-    TypeName toNode = AstFactory.typeName4("C");
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.type, same(type));
-  }
-
-  void _copyAndVerifyInvocation(
-      InvocationExpression fromNode, InvocationExpression toNode) {
-    DartType propagatedType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedType = propagatedType;
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-
-    DartType propagatedInvokeType = ElementFactory.classElement2("C").type;
-    fromNode.propagatedInvokeType = propagatedInvokeType;
-    DartType staticInvokeType = ElementFactory.classElement2("C").type;
-    fromNode.staticInvokeType = staticInvokeType;
-
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.propagatedType, same(propagatedType));
-    expect(toNode.staticType, same(staticType));
-    expect(toNode.propagatedInvokeType, same(propagatedInvokeType));
-    expect(toNode.staticInvokeType, same(staticInvokeType));
-  }
-}
-
 /**
  * The class `SimpleParserTest` defines parser tests that test individual parsing method. The
  * code fragments should be as minimal as possible in order to test the method, but should not test
@@ -6729,7 +6085,8 @@
   }
 
   void test_parseCombinators_h() {
-    List<Combinator> combinators = parse4("parseCombinators", "hide a;");
+    List<Combinator> combinators =
+        parse4("parseCombinators", "hide a;") as List<Combinator>;
     expect(combinators, hasLength(1));
     HideCombinator combinator = combinators[0] as HideCombinator;
     expect(combinator, isNotNull);
@@ -6738,7 +6095,8 @@
   }
 
   void test_parseCombinators_hs() {
-    List<Combinator> combinators = parse4("parseCombinators", "hide a show b;");
+    List<Combinator> combinators =
+        parse4("parseCombinators", "hide a show b;") as List<Combinator>;
     expect(combinators, hasLength(2));
     HideCombinator hideCombinator = combinators[0] as HideCombinator;
     expect(hideCombinator, isNotNull);
@@ -6752,12 +6110,14 @@
 
   void test_parseCombinators_hshs() {
     List<Combinator> combinators =
-        parse4("parseCombinators", "hide a show b hide c show d;");
+        parse4("parseCombinators", "hide a show b hide c show d;")
+        as List<Combinator>;
     expect(combinators, hasLength(4));
   }
 
   void test_parseCombinators_s() {
-    List<Combinator> combinators = parse4("parseCombinators", "show a;");
+    List<Combinator> combinators =
+        parse4("parseCombinators", "show a;") as List<Combinator>;
     expect(combinators, hasLength(1));
     ShowCombinator combinator = combinators[0] as ShowCombinator;
     expect(combinator, isNotNull);
@@ -6918,7 +6278,8 @@
         TokenType.MULTI_LINE_COMMENT, "/** xxx [a] yyy [bb] zzz */", 3);
     List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[token];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     List<Token> tokenReferences = token.references;
     expect(references, hasLength(2));
     expect(tokenReferences, hasLength(2));
@@ -6950,7 +6311,8 @@
           TokenType.MULTI_LINE_COMMENT, "/** [ some text", 5)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(1));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -6965,7 +6327,8 @@
           TokenType.MULTI_LINE_COMMENT, "/** [namePrefix some text", 5)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(1));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -6982,7 +6345,8 @@
           TokenType.SINGLE_LINE_COMMENT, "/// x [c]", 28)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(3));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -7004,7 +6368,8 @@
           "/**\n *     a[i]\n * non-code line\n */", 3)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, isEmpty);
   }
 
@@ -7016,7 +6381,8 @@
           TokenType.SINGLE_LINE_COMMENT, "///     a[i] == b[i]", 0)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, isEmpty);
   }
 
@@ -7026,7 +6392,8 @@
           TokenType.MULTI_LINE_COMMENT, "/** [:xxx [a] yyy:] [b] zzz */", 3)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(1));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -7040,7 +6407,8 @@
           TokenType.MULTI_LINE_COMMENT, "/** `a[i]` and [b] */", 0)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(1));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -7054,7 +6422,8 @@
           TokenType.MULTI_LINE_COMMENT, "/** `a[i] and [b] */", 0)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(2));
   }
 
@@ -7064,7 +6433,8 @@
           "/**\n *     a[i]\n * xxx [i] zzz\n */", 3)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(1));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -7078,7 +6448,8 @@
           "/** [a]: http://www.google.com (Google) [b] zzz */", 3)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(1));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -7092,7 +6463,8 @@
           "/** [a](http://www.google.com) [b] zzz */", 3)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(1));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -7106,7 +6478,8 @@
           TokenType.MULTI_LINE_COMMENT, "/** [a][c] [b] zzz */", 3)
     ];
     List<CommentReference> references =
-        parse("parseCommentReferences", <Object>[tokens], "");
+        parse("parseCommentReferences", <Object>[tokens], "")
+        as List<CommentReference>;
     expect(references, hasLength(1));
     CommentReference reference = references[0];
     expect(reference, isNotNull);
@@ -8067,12 +7440,14 @@
   }
 
   void test_parseExpressionList_multiple() {
-    List<Expression> result = parse4("parseExpressionList", "1, 2, 3");
+    List<Expression> result =
+        parse4("parseExpressionList", "1, 2, 3") as List<Expression>;
     expect(result, hasLength(3));
   }
 
   void test_parseExpressionList_single() {
-    List<Expression> result = parse4("parseExpressionList", "1");
+    List<Expression> result =
+        parse4("parseExpressionList", "1") as List<Expression>;
     expect(result, hasLength(1));
   }
 
@@ -9027,12 +8402,14 @@
   }
 
   void test_parseIdentifierList_multiple() {
-    List<SimpleIdentifier> list = parse4("parseIdentifierList", "a, b, c");
+    List<SimpleIdentifier> list =
+        parse4("parseIdentifierList", "a, b, c") as List<SimpleIdentifier>;
     expect(list, hasLength(3));
   }
 
   void test_parseIdentifierList_single() {
-    List<SimpleIdentifier> list = parse4("parseIdentifierList", "a");
+    List<SimpleIdentifier> list =
+        parse4("parseIdentifierList", "a") as List<SimpleIdentifier>;
     expect(list, hasLength(1));
   }
 
@@ -9266,7 +8643,9 @@
     expect(expression.keyword, token);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    expect(name.type, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments, isNull);
     expect(name.period, isNull);
     expect(name.name, isNull);
     expect(expression.argumentList, isNotNull);
@@ -9279,12 +8658,79 @@
     expect(expression.keyword, token);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    expect(name.type, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments, isNull);
     expect(name.period, isNotNull);
     expect(name.name, isNotNull);
     expect(expression.argumentList, isNotNull);
   }
 
+  void
+      test_parseInstanceCreationExpression_qualifiedType_named_typeParameterComment() {
+    enableGenericMethodComments = true;
+    Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
+    InstanceCreationExpression expression = parse(
+        "parseInstanceCreationExpression", <Object>[token], "A.B/*<E>*/.c()");
+    expect(expression.keyword, token);
+    ConstructorName name = expression.constructorName;
+    expect(name, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments.arguments, hasLength(1));
+    expect(name.period, isNotNull);
+    expect(name.name, isNotNull);
+    expect(expression.argumentList, isNotNull);
+  }
+
+  void
+      test_parseInstanceCreationExpression_qualifiedType_named_typeParameters() {
+    Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
+    InstanceCreationExpression expression =
+        parse("parseInstanceCreationExpression", <Object>[token], "A.B<E>.c()");
+    expect(expression.keyword, token);
+    ConstructorName name = expression.constructorName;
+    expect(name, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments.arguments, hasLength(1));
+    expect(name.period, isNotNull);
+    expect(name.name, isNotNull);
+    expect(expression.argumentList, isNotNull);
+  }
+
+  void
+      test_parseInstanceCreationExpression_qualifiedType_typeParameterComment() {
+    enableGenericMethodComments = true;
+    Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
+    InstanceCreationExpression expression = parse(
+        "parseInstanceCreationExpression", <Object>[token], "A.B/*<E>*/()");
+    expect(expression.keyword, token);
+    ConstructorName name = expression.constructorName;
+    expect(name, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments.arguments, hasLength(1));
+    expect(name.period, isNull);
+    expect(name.name, isNull);
+    expect(expression.argumentList, isNotNull);
+  }
+
+  void test_parseInstanceCreationExpression_qualifiedType_typeParameters() {
+    Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
+    InstanceCreationExpression expression =
+        parse("parseInstanceCreationExpression", <Object>[token], "A.B<E>()");
+    expect(expression.keyword, token);
+    ConstructorName name = expression.constructorName;
+    expect(name, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments.arguments, hasLength(1));
+    expect(name.period, isNull);
+    expect(name.name, isNull);
+    expect(expression.argumentList, isNotNull);
+  }
+
   void test_parseInstanceCreationExpression_type() {
     Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
     InstanceCreationExpression expression =
@@ -9292,25 +8738,92 @@
     expect(expression.keyword, token);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    expect(name.type, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments, isNull);
     expect(name.period, isNull);
     expect(name.name, isNull);
     expect(expression.argumentList, isNotNull);
   }
 
   void test_parseInstanceCreationExpression_type_named() {
+    enableGenericMethodComments = true;
+    Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
+    InstanceCreationExpression expression =
+        parse("parseInstanceCreationExpression", <Object>[token], "A.c()");
+    expect(expression.keyword, token);
+    ConstructorName name = expression.constructorName;
+    expect(name, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments, isNull);
+    expect(name.period, isNull);
+    expect(name.name, isNull);
+    expect(expression.argumentList, isNotNull);
+  }
+
+  void test_parseInstanceCreationExpression_type_named_typeParameterComment() {
+    enableGenericMethodComments = true;
+    Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
+    InstanceCreationExpression expression = parse(
+        "parseInstanceCreationExpression", <Object>[token], "A/*<B>*/.c()");
+    expect(expression.keyword, token);
+    ConstructorName name = expression.constructorName;
+    expect(name, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments.arguments, hasLength(1));
+    expect(name.period, isNotNull);
+    expect(name.name, isNotNull);
+    expect(expression.argumentList, isNotNull);
+  }
+
+  void test_parseInstanceCreationExpression_type_named_typeParameters() {
     Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
     InstanceCreationExpression expression =
         parse("parseInstanceCreationExpression", <Object>[token], "A<B>.c()");
     expect(expression.keyword, token);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    expect(name.type, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments.arguments, hasLength(1));
     expect(name.period, isNotNull);
     expect(name.name, isNotNull);
     expect(expression.argumentList, isNotNull);
   }
 
+  void test_parseInstanceCreationExpression_type_typeParameterComment() {
+    enableGenericMethodComments = true;
+    Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
+    InstanceCreationExpression expression =
+        parse("parseInstanceCreationExpression", <Object>[token], "A/*<B>*/()");
+    expect(expression.keyword, token);
+    ConstructorName name = expression.constructorName;
+    expect(name, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments.arguments, hasLength(1));
+    expect(name.period, isNull);
+    expect(name.name, isNull);
+    expect(expression.argumentList, isNotNull);
+  }
+
+  void test_parseInstanceCreationExpression_type_typeParameters() {
+    Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
+    InstanceCreationExpression expression =
+        parse("parseInstanceCreationExpression", <Object>[token], "A<B>()");
+    expect(expression.keyword, token);
+    ConstructorName name = expression.constructorName;
+    expect(name, isNotNull);
+    TypeName type = name.type;
+    expect(type, isNotNull);
+    expect(type.typeArguments.arguments, hasLength(1));
+    expect(name.period, isNull);
+    expect(name.name, isNull);
+    expect(expression.argumentList, isNotNull);
+  }
+
   void test_parseLibraryDirective() {
     LibraryDirective directive = parse("parseLibraryDirective",
         <Object>[emptyCommentAndMetadata()], "library l;");
@@ -10405,6 +9918,7 @@
   void test_parseStatement_singleLabel() {
     LabeledStatement statement = parse4("parseStatement", "l: return x;");
     expect(statement.labels, hasLength(1));
+    expect(statement.labels[0].label.inDeclarationContext(), isTrue);
     expect(statement.statement, isNotNull);
   }
 
@@ -10675,7 +10189,32 @@
     expect(statement.rightParenthesis, isNotNull);
     expect(statement.leftBracket, isNotNull);
     expect(statement.members, hasLength(1));
-    expect(statement.members[0].labels, hasLength(3));
+    {
+      List<Label> labels = statement.members[0].labels;
+      expect(labels, hasLength(3));
+      expect(labels[0].label.inDeclarationContext(), isTrue);
+      expect(labels[1].label.inDeclarationContext(), isTrue);
+      expect(labels[2].label.inDeclarationContext(), isTrue);
+    }
+    expect(statement.rightBracket, isNotNull);
+  }
+
+  void test_parseSwitchStatement_labeledDefault() {
+    SwitchStatement statement =
+        parse4("parseSwitchStatement", "switch (a) {l1: l2: l3: default:}");
+    expect(statement.switchKeyword, isNotNull);
+    expect(statement.leftParenthesis, isNotNull);
+    expect(statement.expression, isNotNull);
+    expect(statement.rightParenthesis, isNotNull);
+    expect(statement.leftBracket, isNotNull);
+    expect(statement.members, hasLength(1));
+    {
+      List<Label> labels = statement.members[0].labels;
+      expect(labels, hasLength(3));
+      expect(labels[0].label.inDeclarationContext(), isTrue);
+      expect(labels[1].label.inDeclarationContext(), isTrue);
+      expect(labels[2].label.inDeclarationContext(), isTrue);
+    }
     expect(statement.rightBracket, isNotNull);
   }
 
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 41d96a5..4fe6516 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -12,59 +12,39 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/context/context.dart';
-import 'package:analyzer/src/dart/ast/ast.dart'
-    show SimpleIdentifierImpl, PrefixedIdentifierImpl;
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/element_resolver.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/java_core.dart';
-import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/java_engine_io.dart';
-import 'package:analyzer/src/generated/java_io.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/generated/static_type_analyzer.dart';
 import 'package:analyzer/src/generated/testing/ast_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/generated/testing/token_factory.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:analyzer/src/string_source.dart';
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
 import '../utils.dart';
+import 'analysis_context_factory.dart';
+import 'resolver_test_case.dart';
 import 'test_support.dart';
 
 main() {
   initializeTestEnvironment();
   runReflectiveTests(AnalysisDeltaTest);
   runReflectiveTests(ChangeSetTest);
-  runReflectiveTests(CheckedModeCompileTimeErrorCodeTest);
   runReflectiveTests(DisableAsyncTestCase);
-  runReflectiveTests(ElementResolverTest);
   runReflectiveTests(EnclosedScopeTest);
   runReflectiveTests(ErrorResolverTest);
-  runReflectiveTests(HintCodeTest);
-  runReflectiveTests(InheritanceManagerTest);
   runReflectiveTests(LibraryImportScopeTest);
   runReflectiveTests(LibraryScopeTest);
   runReflectiveTests(MemberMapTest);
-  runReflectiveTests(NonHintCodeTest);
   runReflectiveTests(ScopeTest);
-  runReflectiveTests(SimpleResolverTest);
-  runReflectiveTests(StaticTypeAnalyzerTest);
-  runReflectiveTests(StaticTypeAnalyzer2Test);
   runReflectiveTests(StrictModeTest);
-  runReflectiveTests(StrongModeDownwardsInferenceTest);
-  runReflectiveTests(StrongModeStaticTypeAnalyzer2Test);
-  runReflectiveTests(StrongModeTypePropagationTest);
   runReflectiveTests(SubtypeManagerTest);
   runReflectiveTests(TypeOverrideManagerTest);
   runReflectiveTests(TypePropagationTest);
@@ -72,490 +52,6 @@
   runReflectiveTests(TypeResolverVisitorTest);
 }
 
-/**
- * The class `AnalysisContextFactory` defines utility methods used to create analysis contexts
- * for testing purposes.
- */
-class AnalysisContextFactory {
-  static String _DART_MATH = "dart:math";
-
-  static String _DART_INTERCEPTORS = "dart:_interceptors";
-
-  static String _DART_JS_HELPER = "dart:_js_helper";
-
-  /**
-   * Create an analysis context that has a fake core library already resolved.
-   * Return the context that was created.
-   */
-  static InternalAnalysisContext contextWithCore() {
-    AnalysisContextForTests context = new AnalysisContextForTests();
-    return initContextWithCore(context);
-  }
-
-  /**
-   * Create an analysis context that uses the given [options] and has a fake
-   * core library already resolved. Return the context that was created.
-   */
-  static InternalAnalysisContext contextWithCoreAndOptions(
-      AnalysisOptions options) {
-    AnalysisContextForTests context = new AnalysisContextForTests();
-    context._internalSetAnalysisOptions(options);
-    return initContextWithCore(context);
-  }
-
-  static InternalAnalysisContext contextWithCoreAndPackages(
-      Map<String, String> packages) {
-    AnalysisContextForTests context = new AnalysisContextForTests();
-    return initContextWithCore(context, new TestPackageUriResolver(packages));
-  }
-
-  /**
-   * Initialize the given analysis context with a fake core library already resolved.
-   *
-   * @param context the context to be initialized (not `null`)
-   * @return the analysis context that was created
-   */
-  static InternalAnalysisContext initContextWithCore(
-      InternalAnalysisContext context,
-      [UriResolver contributedResolver]) {
-    DirectoryBasedDartSdk sdk = new _AnalysisContextFactory_initContextWithCore(
-        new JavaFile("/fake/sdk"),
-        enableAsync: context.analysisOptions.enableAsync);
-    List<UriResolver> resolvers = <UriResolver>[
-      new DartUriResolver(sdk),
-      new FileUriResolver()
-    ];
-    if (contributedResolver != null) {
-      resolvers.add(contributedResolver);
-    }
-    SourceFactory sourceFactory = new SourceFactory(resolvers);
-    context.sourceFactory = sourceFactory;
-    AnalysisContext coreContext = sdk.context;
-    (coreContext.analysisOptions as AnalysisOptionsImpl).strongMode =
-        context.analysisOptions.strongMode;
-    //
-    // dart:core
-    //
-    TestTypeProvider provider = new TestTypeProvider();
-    CompilationUnitElementImpl coreUnit =
-        new CompilationUnitElementImpl("core.dart");
-    Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
-    coreContext.setContents(coreSource, "");
-    coreUnit.librarySource = coreUnit.source = coreSource;
-    ClassElementImpl proxyClassElement = ElementFactory.classElement2("_Proxy");
-    proxyClassElement.constructors = <ConstructorElement>[
-      ElementFactory.constructorElement(proxyClassElement, '', true)
-        ..isCycleFree = true
-        ..constantInitializers = <ConstructorInitializer>[]
-    ];
-    ClassElement objectClassElement = provider.objectType.element;
-    coreUnit.types = <ClassElement>[
-      provider.boolType.element,
-      provider.deprecatedType.element,
-      provider.doubleType.element,
-      provider.functionType.element,
-      provider.intType.element,
-      provider.iterableType.element,
-      provider.iteratorType.element,
-      provider.listType.element,
-      provider.mapType.element,
-      provider.nullType.element,
-      provider.numType.element,
-      objectClassElement,
-      proxyClassElement,
-      provider.stackTraceType.element,
-      provider.stringType.element,
-      provider.symbolType.element,
-      provider.typeType.element
-    ];
-    coreUnit.functions = <FunctionElement>[
-      ElementFactory.functionElement3("identical", provider.boolType.element,
-          <ClassElement>[objectClassElement, objectClassElement], null),
-      ElementFactory.functionElement3("print", VoidTypeImpl.instance.element,
-          <ClassElement>[objectClassElement], null)
-    ];
-    TopLevelVariableElement proxyTopLevelVariableElt = ElementFactory
-        .topLevelVariableElement3("proxy", true, false, proxyClassElement.type);
-    ConstTopLevelVariableElementImpl deprecatedTopLevelVariableElt =
-        ElementFactory.topLevelVariableElement3(
-            "deprecated", true, false, provider.deprecatedType);
-    {
-      ClassElement deprecatedElement = provider.deprecatedType.element;
-      InstanceCreationExpression initializer = AstFactory
-          .instanceCreationExpression2(
-              Keyword.CONST,
-              AstFactory.typeName(deprecatedElement),
-              [AstFactory.string2('next release')]);
-      ConstructorElement constructor = deprecatedElement.constructors.single;
-      initializer.staticElement = constructor;
-      initializer.constructorName.staticElement = constructor;
-      deprecatedTopLevelVariableElt.constantInitializer = initializer;
-    }
-    coreUnit.accessors = <PropertyAccessorElement>[
-      proxyTopLevelVariableElt.getter,
-      deprecatedTopLevelVariableElt.getter
-    ];
-    coreUnit.topLevelVariables = <TopLevelVariableElement>[
-      proxyTopLevelVariableElt,
-      deprecatedTopLevelVariableElt
-    ];
-    LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode(
-        coreContext, AstFactory.libraryIdentifier2(["dart", "core"]));
-    coreLibrary.definingCompilationUnit = coreUnit;
-    //
-    // dart:async
-    //
-    Source asyncSource;
-    LibraryElementImpl asyncLibrary;
-    if (context.analysisOptions.enableAsync) {
-      asyncLibrary = new LibraryElementImpl.forNode(
-          coreContext, AstFactory.libraryIdentifier2(["dart", "async"]));
-      CompilationUnitElementImpl asyncUnit =
-          new CompilationUnitElementImpl("async.dart");
-      asyncSource = sourceFactory.forUri(DartSdk.DART_ASYNC);
-      coreContext.setContents(asyncSource, "");
-      asyncUnit.librarySource = asyncUnit.source = asyncSource;
-      asyncLibrary.definingCompilationUnit = asyncUnit;
-      // Future
-      ClassElementImpl futureElement =
-          ElementFactory.classElement2("Future", ["T"]);
-      futureElement.enclosingElement = asyncUnit;
-      //   factory Future.value([value])
-      ConstructorElementImpl futureConstructor =
-          ElementFactory.constructorElement2(futureElement, "value");
-      futureConstructor.parameters = <ParameterElement>[
-        ElementFactory.positionalParameter2("value", provider.dynamicType)
-      ];
-      futureConstructor.factory = true;
-      futureElement.constructors = <ConstructorElement>[futureConstructor];
-      //   Future then(onValue(T value), { Function onError });
-      TypeDefiningElement futureThenR = DynamicElementImpl.instance;
-      if (context.analysisOptions.strongMode) {
-        futureThenR = ElementFactory.typeParameterWithType('R');
-      }
-      FunctionElementImpl thenOnValue = ElementFactory.functionElement3(
-          'onValue', futureThenR, [futureElement.typeParameters[0]], null);
-      thenOnValue.synthetic = true;
-
-      DartType futureRType = futureElement.type.substitute4([futureThenR.type]);
-      MethodElementImpl thenMethod = ElementFactory
-          .methodElementWithParameters(futureElement, "then", futureRType, [
-        ElementFactory.requiredParameter2("onValue", thenOnValue.type),
-        ElementFactory.namedParameter2("onError", provider.functionType)
-      ]);
-      if (!futureThenR.type.isDynamic) {
-        thenMethod.typeParameters = [futureThenR];
-      }
-      thenOnValue.enclosingElement = thenMethod;
-      thenOnValue.type = new FunctionTypeImpl(thenOnValue);
-      (thenMethod.parameters[0] as ParameterElementImpl).type =
-          thenOnValue.type;
-      thenMethod.type = new FunctionTypeImpl(thenMethod);
-
-      futureElement.methods = <MethodElement>[thenMethod];
-      // Completer
-      ClassElementImpl completerElement =
-          ElementFactory.classElement2("Completer", ["T"]);
-      ConstructorElementImpl completerConstructor =
-          ElementFactory.constructorElement2(completerElement, null);
-      completerElement.constructors = <ConstructorElement>[
-        completerConstructor
-      ];
-      // StreamSubscription
-      ClassElementImpl streamSubscriptionElement =
-          ElementFactory.classElement2("StreamSubscription", ["T"]);
-      // Stream
-      ClassElementImpl streamElement =
-          ElementFactory.classElement2("Stream", ["T"]);
-      streamElement.constructors = <ConstructorElement>[
-        ElementFactory.constructorElement2(streamElement, null)
-      ];
-      DartType returnType = streamSubscriptionElement.type
-          .substitute4(streamElement.type.typeArguments);
-      FunctionElementImpl listenOnData = ElementFactory.functionElement3(
-          'onData',
-          VoidTypeImpl.instance.element,
-          <TypeDefiningElement>[streamElement.typeParameters[0]],
-          null);
-      listenOnData.synthetic = true;
-      List<DartType> parameterTypes = <DartType>[listenOnData.type,];
-      // TODO(brianwilkerson) This is missing the optional parameters.
-      MethodElementImpl listenMethod =
-          ElementFactory.methodElement('listen', returnType, parameterTypes);
-      streamElement.methods = <MethodElement>[listenMethod];
-      listenMethod.type = new FunctionTypeImpl(listenMethod);
-
-      FunctionElementImpl listenParamFunction = parameterTypes[0].element;
-      listenParamFunction.enclosingElement = listenMethod;
-      listenParamFunction.type = new FunctionTypeImpl(listenParamFunction);
-      ParameterElementImpl listenParam = listenMethod.parameters[0];
-      listenParam.type = listenParamFunction.type;
-
-      asyncUnit.types = <ClassElement>[
-        completerElement,
-        futureElement,
-        streamElement,
-        streamSubscriptionElement
-      ];
-    }
-    //
-    // dart:html
-    //
-    CompilationUnitElementImpl htmlUnit =
-        new CompilationUnitElementImpl("html_dartium.dart");
-    Source htmlSource = sourceFactory.forUri(DartSdk.DART_HTML);
-    coreContext.setContents(htmlSource, "");
-    htmlUnit.librarySource = htmlUnit.source = htmlSource;
-    ClassElementImpl elementElement = ElementFactory.classElement2("Element");
-    InterfaceType elementType = elementElement.type;
-    ClassElementImpl canvasElement =
-        ElementFactory.classElement("CanvasElement", elementType);
-    ClassElementImpl contextElement =
-        ElementFactory.classElement2("CanvasRenderingContext");
-    InterfaceType contextElementType = contextElement.type;
-    ClassElementImpl context2dElement = ElementFactory.classElement(
-        "CanvasRenderingContext2D", contextElementType);
-    canvasElement.methods = <MethodElement>[
-      ElementFactory.methodElement(
-          "getContext", contextElementType, [provider.stringType])
-    ];
-    canvasElement.accessors = <PropertyAccessorElement>[
-      ElementFactory.getterElement("context2D", false, context2dElement.type)
-    ];
-    canvasElement.fields = canvasElement.accessors
-        .map((PropertyAccessorElement accessor) => accessor.variable)
-        .toList();
-    ClassElementImpl documentElement =
-        ElementFactory.classElement("Document", elementType);
-    ClassElementImpl htmlDocumentElement =
-        ElementFactory.classElement("HtmlDocument", documentElement.type);
-    htmlDocumentElement.methods = <MethodElement>[
-      ElementFactory
-          .methodElement("query", elementType, <DartType>[provider.stringType])
-    ];
-    htmlUnit.types = <ClassElement>[
-      ElementFactory.classElement("AnchorElement", elementType),
-      ElementFactory.classElement("BodyElement", elementType),
-      ElementFactory.classElement("ButtonElement", elementType),
-      canvasElement,
-      contextElement,
-      context2dElement,
-      ElementFactory.classElement("DivElement", elementType),
-      documentElement,
-      elementElement,
-      htmlDocumentElement,
-      ElementFactory.classElement("InputElement", elementType),
-      ElementFactory.classElement("SelectElement", elementType)
-    ];
-    htmlUnit.functions = <FunctionElement>[
-      ElementFactory.functionElement3("query", elementElement,
-          <ClassElement>[provider.stringType.element], ClassElement.EMPTY_LIST)
-    ];
-    TopLevelVariableElementImpl document =
-        ElementFactory.topLevelVariableElement3(
-            "document", false, true, htmlDocumentElement.type);
-    htmlUnit.topLevelVariables = <TopLevelVariableElement>[document];
-    htmlUnit.accessors = <PropertyAccessorElement>[document.getter];
-    LibraryElementImpl htmlLibrary = new LibraryElementImpl.forNode(
-        coreContext, AstFactory.libraryIdentifier2(["dart", "dom", "html"]));
-    htmlLibrary.definingCompilationUnit = htmlUnit;
-    //
-    // dart:math
-    //
-    CompilationUnitElementImpl mathUnit =
-        new CompilationUnitElementImpl("math.dart");
-    Source mathSource = sourceFactory.forUri(_DART_MATH);
-    coreContext.setContents(mathSource, "");
-    mathUnit.librarySource = mathUnit.source = mathSource;
-    FunctionElement cosElement = ElementFactory.functionElement3(
-        "cos",
-        provider.doubleType.element,
-        <ClassElement>[provider.numType.element],
-        ClassElement.EMPTY_LIST);
-    TopLevelVariableElement ln10Element = ElementFactory
-        .topLevelVariableElement3("LN10", true, false, provider.doubleType);
-    TypeParameterElement maxT =
-        ElementFactory.typeParameterWithType('T', provider.numType);
-    FunctionElementImpl maxElement = ElementFactory.functionElement3(
-        "max", maxT, [maxT, maxT], ClassElement.EMPTY_LIST);
-    maxElement.typeParameters = [maxT];
-    maxElement.type = new FunctionTypeImpl(maxElement);
-    TopLevelVariableElement piElement = ElementFactory.topLevelVariableElement3(
-        "PI", true, false, provider.doubleType);
-    ClassElementImpl randomElement = ElementFactory.classElement2("Random");
-    randomElement.abstract = true;
-    ConstructorElementImpl randomConstructor =
-        ElementFactory.constructorElement2(randomElement, null);
-    randomConstructor.factory = true;
-    ParameterElementImpl seedParam = new ParameterElementImpl("seed", 0);
-    seedParam.parameterKind = ParameterKind.POSITIONAL;
-    seedParam.type = provider.intType;
-    randomConstructor.parameters = <ParameterElement>[seedParam];
-    randomElement.constructors = <ConstructorElement>[randomConstructor];
-    FunctionElement sinElement = ElementFactory.functionElement3(
-        "sin",
-        provider.doubleType.element,
-        <ClassElement>[provider.numType.element],
-        ClassElement.EMPTY_LIST);
-    FunctionElement sqrtElement = ElementFactory.functionElement3(
-        "sqrt",
-        provider.doubleType.element,
-        <ClassElement>[provider.numType.element],
-        ClassElement.EMPTY_LIST);
-    mathUnit.accessors = <PropertyAccessorElement>[
-      ln10Element.getter,
-      piElement.getter
-    ];
-    mathUnit.functions = <FunctionElement>[
-      cosElement,
-      maxElement,
-      sinElement,
-      sqrtElement
-    ];
-    mathUnit.topLevelVariables = <TopLevelVariableElement>[
-      ln10Element,
-      piElement
-    ];
-    mathUnit.types = <ClassElement>[randomElement];
-    LibraryElementImpl mathLibrary = new LibraryElementImpl.forNode(
-        coreContext, AstFactory.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.
-    //
-    HashMap<Source, LibraryElement> elementMap =
-        new HashMap<Source, LibraryElement>();
-    elementMap[coreSource] = coreLibrary;
-    if (asyncSource != null) {
-      elementMap[asyncSource] = asyncLibrary;
-    }
-    elementMap[htmlSource] = htmlLibrary;
-    elementMap[mathSource] = mathLibrary;
-    //
-    // Set the public and export namespaces.  We don't use exports in the fake
-    // core library so public and export namespaces are the same.
-    //
-    for (LibraryElementImpl library in elementMap.values) {
-      Namespace namespace =
-          new NamespaceBuilder().createPublicNamespaceForLibrary(library);
-      library.exportNamespace = namespace;
-      library.publicNamespace = namespace;
-    }
-    context.recordLibraryElements(elementMap);
-    // Create the synthetic element for `loadLibrary`.
-    for (LibraryElementImpl library in elementMap.values) {
-      library.createLoadLibraryFunction(context.typeProvider);
-    }
-    return context;
-  }
-}
-
-/**
- * An analysis context that has a fake SDK that is much smaller and faster for
- * testing purposes.
- */
-class AnalysisContextForTests extends AnalysisContextImpl {
-  @override
-  void set analysisOptions(AnalysisOptions options) {
-    AnalysisOptions currentOptions = analysisOptions;
-    bool needsRecompute = currentOptions.analyzeFunctionBodiesPredicate !=
-            options.analyzeFunctionBodiesPredicate ||
-        currentOptions.generateImplicitErrors !=
-            options.generateImplicitErrors ||
-        currentOptions.generateSdkErrors != options.generateSdkErrors ||
-        currentOptions.dart2jsHint != options.dart2jsHint ||
-        (currentOptions.hint && !options.hint) ||
-        currentOptions.preserveComments != options.preserveComments ||
-        currentOptions.enableStrictCallChecks != options.enableStrictCallChecks;
-    if (needsRecompute) {
-      fail(
-          "Cannot set options that cause the sources to be reanalyzed in a test context");
-    }
-    super.analysisOptions = options;
-  }
-
-  @override
-  bool exists(Source source) =>
-      super.exists(source) || sourceFactory.dartSdk.context.exists(source);
-
-  @override
-  TimestampedData<String> getContents(Source source) {
-    if (source.isInSystemLibrary) {
-      return sourceFactory.dartSdk.context.getContents(source);
-    }
-    return super.getContents(source);
-  }
-
-  @override
-  int getModificationStamp(Source source) {
-    if (source.isInSystemLibrary) {
-      return sourceFactory.dartSdk.context.getModificationStamp(source);
-    }
-    return super.getModificationStamp(source);
-  }
-
-  /**
-   * Set the analysis options, even if they would force re-analysis. This method should only be
-   * invoked before the fake SDK is initialized.
-   *
-   * @param options the analysis options to be set
-   */
-  void _internalSetAnalysisOptions(AnalysisOptions options) {
-    super.analysisOptions = options;
-  }
-}
-
-/**
- * Helper for creating and managing single [AnalysisContext].
- */
-class AnalysisContextHelper {
-  AnalysisContext context;
-
-  /**
-   * Creates new [AnalysisContext] using [AnalysisContextFactory].
-   */
-  AnalysisContextHelper([AnalysisOptionsImpl options]) {
-    if (options == null) {
-      options = new AnalysisOptionsImpl();
-    }
-    options.cacheSize = 256;
-    context = AnalysisContextFactory.contextWithCoreAndOptions(options);
-  }
-
-  Source addSource(String path, String code) {
-    Source source = new FileBasedSource(FileUtilities2.createFile(path));
-    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();
-    }
-  }
-}
-
 @reflectiveTest
 class AnalysisDeltaTest extends EngineTestCase {
   TestSource source1 = new TestSource('/1.dart');
@@ -650,608 +146,6 @@
 }
 
 @reflectiveTest
-class CheckedModeCompileTimeErrorCodeTest extends ResolverTestCase {
-  void test_fieldFormalParameterAssignableToField_extends() {
-    // 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());''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() {
-    // 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);''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_implements() {
-    // 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());''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_list_dynamic() {
-    // [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]);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_list_nonDynamic() {
-    // <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]);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_map_dynamic() {
-    // {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});''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_map_keyDifferent() {
-    // <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});''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_map_valueDifferent() {
-    // <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});''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_notype() {
-    // 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);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_null() {
-    // Null is assignable to anything.
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A(this.x);
-}
-var v = const A(null);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_typedef() {
-    // foo has the runtime type dynamic -> dynamic, so it should be 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);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterAssignableToField_typeSubstitution() {
-    // 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);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField() {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A(this.x);
-}
-var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_extends() {
-    // 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);
-}
-var v = const C(const A());''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_fieldType() {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A(String this.x);
-}
-var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() {
-    Source source = addSource(r'''
-class A {
-  final Unresolved x;
-  const A(String this.x);
-}
-var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.UNDEFINED_CLASS
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_implements() {
-    // 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);
-}
-var v = const C(const A());''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_list() {
-    // <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);
-}
-var x = const A(const <num>[1, 2, 3]);''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_map_keyMismatch() {
-    // <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);
-}
-var x = const A(const <num, int>{1: 2});''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_map_valueMismatch() {
-    // <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);
-}
-var x = const A(const <int, num>{1: 2});''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_optional() {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A([this.x = 'foo']);
-}
-var v = const A();''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticTypeWarningCode.INVALID_ASSIGNMENT
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameterNotAssignableToField_typedef() {
-    // 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);''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldInitializerNotAssignable() {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A() : x = '';
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
-      StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldTypeMismatch() {
-    Source source = addSource(r'''
-class A {
-  const A(x) : y = x;
-  final int y;
-}
-var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldTypeMismatch_generic() {
-    Source source = addSource(r'''
-class C<T> {
-  final T x = y;
-  const C();
-}
-const int y = 1;
-var v = const C<String>();
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-      StaticTypeWarningCode.INVALID_ASSIGNMENT
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldTypeMismatch_unresolved() {
-    Source source = addSource(r'''
-class A {
-  const A(x) : y = x;
-  final Unresolved y;
-}
-var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-      StaticWarningCode.UNDEFINED_CLASS
-    ]);
-    verify([source]);
-  }
-
-  void test_fieldTypeOk_generic() {
-    Source source = addSource(r'''
-class C<T> {
-  final T x = y;
-  const C();
-}
-const int y = 1;
-var v = const C<int>();
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
-  }
-
-  void test_fieldTypeOk_null() {
-    Source source = addSource(r'''
-class A {
-  const A(x) : y = x;
-  final int y;
-}
-var v = const A(null);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldTypeOk_unresolved_null() {
-    // 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);''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
-  }
-
-  void test_listElementTypeNotAssignable() {
-    Source source = addSource("var v = const <String> [42];");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_mapKeyTypeNotAssignable() {
-    Source source = addSource("var v = const <String, int > {1 : 2};");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_mapValueTypeNotAssignable() {
-    Source source = addSource("var v = const <String, String> {'a' : 2};");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_parameterAssignable_null() {
-    // Null is assignable to anything.
-    Source source = addSource(r'''
-class A {
-  const A(int x);
-}
-var v = const A(null);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_parameterAssignable_typeSubstitution() {
-    Source source = addSource(r'''
-class A<T> {
-  const A(T x);
-}
-var v = const A<int>(3);''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_parameterAssignable_undefined_null() {
-    // 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);''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
-  }
-
-  void test_parameterNotAssignable() {
-    Source source = addSource(r'''
-class A {
-  const A(int x);
-}
-var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_parameterNotAssignable_typeSubstitution() {
-    Source source = addSource(r'''
-class A<T> {
-  const A(T x);
-}
-var v = const A<int>('foo');''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  void test_parameterNotAssignable_undefined() {
-    Source source = addSource(r'''
-class A {
-  const A(Unresolved x);
-}
-var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.UNDEFINED_CLASS
-    ]);
-    verify([source]);
-  }
-
-  void test_redirectingConstructor_paramTypeMismatch() {
-    Source source = addSource(r'''
-class A {
-  const A.a1(x) : this.a2(x);
-  const A.a2(String x);
-}
-var v = const A.a1(0);''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  void test_topLevelVarAssignable_null() {
-    Source source = addSource("const int x = null;");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_topLevelVarAssignable_undefined_null() {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    Source source = addSource("const Unresolved x = null;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
-  }
-
-  void test_topLevelVarNotAssignable() {
-    Source source = addSource("const int x = 'foo';");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
-      StaticTypeWarningCode.INVALID_ASSIGNMENT
-    ]);
-    verify([source]);
-  }
-
-  void test_topLevelVarNotAssignable_undefined() {
-    Source source = addSource("const Unresolved x = 'foo';");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
-      StaticWarningCode.UNDEFINED_CLASS
-    ]);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
 class DisableAsyncTestCase extends ResolverTestCase {
   @override
   void setUp() {
@@ -1297,986 +191,6 @@
 }
 
 @reflectiveTest
-class ElementResolverTest extends EngineTestCase {
-  /**
-   * The error listener to which errors will be reported.
-   */
-  GatheringErrorListener _listener;
-
-  /**
-   * The type provider used to access the types.
-   */
-  TestTypeProvider _typeProvider;
-
-  /**
-   * The library containing the code being resolved.
-   */
-  LibraryElementImpl _definingLibrary;
-
-  /**
-   * The resolver visitor that maintains the state for the resolver.
-   */
-  ResolverVisitor _visitor;
-
-  /**
-   * The resolver being used to resolve the test cases.
-   */
-  ElementResolver _resolver;
-
-  void fail_visitExportDirective_combinators() {
-    fail("Not yet tested");
-    // Need to set up the exported library so that the identifier can be
-    // resolved.
-    ExportDirective directive = AstFactory.exportDirective2(null, [
-      AstFactory.hideCombinator2(["A"])
-    ]);
-    _resolveNode(directive);
-    _listener.assertNoErrors();
-  }
-
-  void fail_visitFunctionExpressionInvocation() {
-    fail("Not yet tested");
-    _listener.assertNoErrors();
-  }
-
-  void fail_visitImportDirective_combinators_noPrefix() {
-    fail("Not yet tested");
-    // Need to set up the imported library so that the identifier can be
-    // resolved.
-    ImportDirective directive = AstFactory.importDirective3(null, null, [
-      AstFactory.showCombinator2(["A"])
-    ]);
-    _resolveNode(directive);
-    _listener.assertNoErrors();
-  }
-
-  void fail_visitImportDirective_combinators_prefix() {
-    fail("Not yet tested");
-    // Need to set up the imported library so that the identifiers can be
-    // resolved.
-    String prefixName = "p";
-    _definingLibrary.imports = <ImportElement>[
-      ElementFactory.importFor(null, ElementFactory.prefix(prefixName))
-    ];
-    ImportDirective directive = AstFactory.importDirective3(null, prefixName, [
-      AstFactory.showCombinator2(["A"]),
-      AstFactory.hideCombinator2(["B"])
-    ]);
-    _resolveNode(directive);
-    _listener.assertNoErrors();
-  }
-
-  void fail_visitRedirectingConstructorInvocation() {
-    fail("Not yet tested");
-    _listener.assertNoErrors();
-  }
-
-  @override
-  void setUp() {
-    super.setUp();
-    _listener = new GatheringErrorListener();
-    _typeProvider = new TestTypeProvider();
-    _resolver = _createResolver();
-  }
-
-  void test_lookUpMethodInInterfaces() {
-    InterfaceType intType = _typeProvider.intType;
-    //
-    // abstract class A { int operator[](int index); }
-    //
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    MethodElement operator =
-        ElementFactory.methodElement("[]", intType, [intType]);
-    classA.methods = <MethodElement>[operator];
-    //
-    // class B implements A {}
-    //
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    //
-    // class C extends Object with B {}
-    //
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    classC.mixins = <InterfaceType>[classB.type];
-    //
-    // class D extends C {}
-    //
-    ClassElementImpl classD = ElementFactory.classElement("D", classC.type);
-    //
-    // D a;
-    // a[i];
-    //
-    SimpleIdentifier array = AstFactory.identifier3("a");
-    array.staticType = classD.type;
-    IndexExpression expression =
-        AstFactory.indexExpression(array, AstFactory.identifier3("i"));
-    expect(_resolveIndexExpression(expression), same(operator));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAssignmentExpression_compound() {
-    InterfaceType intType = _typeProvider.intType;
-    SimpleIdentifier leftHandSide = AstFactory.identifier3("a");
-    leftHandSide.staticType = intType;
-    AssignmentExpression assignment = AstFactory.assignmentExpression(
-        leftHandSide, TokenType.PLUS_EQ, AstFactory.integer(1));
-    _resolveNode(assignment);
-    expect(
-        assignment.staticElement, same(getMethod(_typeProvider.numType, "+")));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAssignmentExpression_simple() {
-    AssignmentExpression expression = AstFactory.assignmentExpression(
-        AstFactory.identifier3("x"), TokenType.EQ, AstFactory.integer(0));
-    _resolveNode(expression);
-    expect(expression.staticElement, isNull);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_bangEq() {
-    // String i;
-    // var j;
-    // i == j
-    InterfaceType stringType = _typeProvider.stringType;
-    SimpleIdentifier left = AstFactory.identifier3("i");
-    left.staticType = stringType;
-    BinaryExpression expression = AstFactory.binaryExpression(
-        left, TokenType.BANG_EQ, AstFactory.identifier3("j"));
-    _resolveNode(expression);
-    var stringElement = stringType.element;
-    expect(expression.staticElement, isNotNull);
-    expect(
-        expression.staticElement,
-        stringElement.lookUpMethod(
-            TokenType.EQ_EQ.lexeme, stringElement.library));
-    expect(expression.propagatedElement, isNull);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_eq() {
-    // String i;
-    // var j;
-    // i == j
-    InterfaceType stringType = _typeProvider.stringType;
-    SimpleIdentifier left = AstFactory.identifier3("i");
-    left.staticType = stringType;
-    BinaryExpression expression = AstFactory.binaryExpression(
-        left, TokenType.EQ_EQ, AstFactory.identifier3("j"));
-    _resolveNode(expression);
-    var stringElement = stringType.element;
-    expect(
-        expression.staticElement,
-        stringElement.lookUpMethod(
-            TokenType.EQ_EQ.lexeme, stringElement.library));
-    expect(expression.propagatedElement, isNull);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_plus() {
-    // num i;
-    // var j;
-    // i + j
-    InterfaceType numType = _typeProvider.numType;
-    SimpleIdentifier left = AstFactory.identifier3("i");
-    left.staticType = numType;
-    BinaryExpression expression = AstFactory.binaryExpression(
-        left, TokenType.PLUS, AstFactory.identifier3("j"));
-    _resolveNode(expression);
-    expect(expression.staticElement, getMethod(numType, "+"));
-    expect(expression.propagatedElement, isNull);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_plus_propagatedElement() {
-    // var i = 1;
-    // var j;
-    // i + j
-    InterfaceType numType = _typeProvider.numType;
-    SimpleIdentifier left = AstFactory.identifier3("i");
-    left.propagatedType = numType;
-    BinaryExpression expression = AstFactory.binaryExpression(
-        left, TokenType.PLUS, AstFactory.identifier3("j"));
-    _resolveNode(expression);
-    expect(expression.staticElement, isNull);
-    expect(expression.propagatedElement, getMethod(numType, "+"));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBreakStatement_withLabel() {
-    // loop: while (true) {
-    //   break loop;
-    // }
-    String label = "loop";
-    LabelElementImpl labelElement = new LabelElementImpl.forNode(
-        AstFactory.identifier3(label), false, false);
-    BreakStatement breakStatement = AstFactory.breakStatement2(label);
-    Expression condition = AstFactory.booleanLiteral(true);
-    WhileStatement whileStatement =
-        AstFactory.whileStatement(condition, breakStatement);
-    expect(_resolveBreak(breakStatement, labelElement, whileStatement),
-        same(labelElement));
-    expect(breakStatement.target, same(whileStatement));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBreakStatement_withoutLabel() {
-    BreakStatement statement = AstFactory.breakStatement();
-    _resolveStatement(statement, null, null);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitCommentReference_prefixedIdentifier_class_getter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    // set accessors
-    String propName = "p";
-    PropertyAccessorElement getter =
-        ElementFactory.getterElement(propName, false, _typeProvider.intType);
-    PropertyAccessorElement setter =
-        ElementFactory.setterElement(propName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getter, setter];
-    // set name scope
-    _visitor.nameScope = new EnclosedScope(null)
-      ..defineNameWithoutChecking('A', classA);
-    // prepare "A.p"
-    PrefixedIdentifier prefixed = AstFactory.identifier5('A', 'p');
-    CommentReference commentReference = new CommentReference(null, prefixed);
-    // resolve
-    _resolveNode(commentReference);
-    expect(prefixed.prefix.staticElement, classA);
-    expect(prefixed.identifier.staticElement, getter);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitCommentReference_prefixedIdentifier_class_method() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    // set method
-    MethodElement method =
-        ElementFactory.methodElement("m", _typeProvider.intType);
-    classA.methods = <MethodElement>[method];
-    // set name scope
-    _visitor.nameScope = new EnclosedScope(null)
-      ..defineNameWithoutChecking('A', classA);
-    // prepare "A.m"
-    PrefixedIdentifier prefixed = AstFactory.identifier5('A', 'm');
-    CommentReference commentReference = new CommentReference(null, prefixed);
-    // resolve
-    _resolveNode(commentReference);
-    expect(prefixed.prefix.staticElement, classA);
-    expect(prefixed.identifier.staticElement, method);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitConstructorName_named() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String constructorName = "a";
-    ConstructorElement constructor =
-        ElementFactory.constructorElement2(classA, constructorName);
-    classA.constructors = <ConstructorElement>[constructor];
-    ConstructorName name = AstFactory.constructorName(
-        AstFactory.typeName(classA), constructorName);
-    _resolveNode(name);
-    expect(name.staticElement, same(constructor));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitConstructorName_unnamed() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String constructorName = null;
-    ConstructorElement constructor =
-        ElementFactory.constructorElement2(classA, constructorName);
-    classA.constructors = <ConstructorElement>[constructor];
-    ConstructorName name = AstFactory.constructorName(
-        AstFactory.typeName(classA), constructorName);
-    _resolveNode(name);
-    expect(name.staticElement, same(constructor));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitContinueStatement_withLabel() {
-    // loop: while (true) {
-    //   continue loop;
-    // }
-    String label = "loop";
-    LabelElementImpl labelElement = new LabelElementImpl.forNode(
-        AstFactory.identifier3(label), false, false);
-    ContinueStatement continueStatement = AstFactory.continueStatement(label);
-    Expression condition = AstFactory.booleanLiteral(true);
-    WhileStatement whileStatement =
-        AstFactory.whileStatement(condition, continueStatement);
-    expect(_resolveContinue(continueStatement, labelElement, whileStatement),
-        same(labelElement));
-    expect(continueStatement.target, same(whileStatement));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitContinueStatement_withoutLabel() {
-    ContinueStatement statement = AstFactory.continueStatement();
-    _resolveStatement(statement, null, null);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitEnumDeclaration() {
-    CompilationUnitElementImpl compilationUnitElement =
-        ElementFactory.compilationUnit('foo.dart');
-    ClassElementImpl enumElement =
-        ElementFactory.enumElement(_typeProvider, ('E'));
-    compilationUnitElement.enums = <ClassElement>[enumElement];
-    EnumDeclaration enumNode = AstFactory.enumDeclaration2('E', []);
-    Annotation annotationNode =
-        AstFactory.annotation(AstFactory.identifier3('a'));
-    annotationNode.element = ElementFactory.classElement2('A');
-    annotationNode.elementAnnotation =
-        new ElementAnnotationImpl(compilationUnitElement);
-    enumNode.metadata.add(annotationNode);
-    enumNode.name.staticElement = enumElement;
-    List<ElementAnnotation> metadata = <ElementAnnotation>[
-      annotationNode.elementAnnotation
-    ];
-    _resolveNode(enumNode);
-    expect(metadata[0].element, annotationNode.element);
-  }
-
-  void test_visitExportDirective_noCombinators() {
-    ExportDirective directive = AstFactory.exportDirective2(null);
-    directive.element = ElementFactory
-        .exportFor(ElementFactory.library(_definingLibrary.context, "lib"));
-    _resolveNode(directive);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFieldFormalParameter() {
-    String fieldName = "f";
-    InterfaceType intType = _typeProvider.intType;
-    FieldElementImpl fieldElement =
-        ElementFactory.fieldElement(fieldName, false, false, false, intType);
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.fields = <FieldElement>[fieldElement];
-    FieldFormalParameter parameter =
-        AstFactory.fieldFormalParameter2(fieldName);
-    FieldFormalParameterElementImpl parameterElement =
-        ElementFactory.fieldFormalParameter(parameter.identifier);
-    parameterElement.field = fieldElement;
-    parameterElement.type = intType;
-    parameter.identifier.staticElement = parameterElement;
-    _resolveInClass(parameter, classA);
-    expect(parameter.element.type, same(intType));
-  }
-
-  void test_visitImportDirective_noCombinators_noPrefix() {
-    ImportDirective directive = AstFactory.importDirective3(null, null);
-    directive.element = ElementFactory.importFor(
-        ElementFactory.library(_definingLibrary.context, "lib"), null);
-    _resolveNode(directive);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitImportDirective_noCombinators_prefix() {
-    String prefixName = "p";
-    ImportElement importElement = ElementFactory.importFor(
-        ElementFactory.library(_definingLibrary.context, "lib"),
-        ElementFactory.prefix(prefixName));
-    _definingLibrary.imports = <ImportElement>[importElement];
-    ImportDirective directive = AstFactory.importDirective3(null, prefixName);
-    directive.element = importElement;
-    _resolveNode(directive);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitImportDirective_withCombinators() {
-    ShowCombinator combinator = AstFactory.showCombinator2(["A", "B", "C"]);
-    ImportDirective directive =
-        AstFactory.importDirective3(null, null, [combinator]);
-    LibraryElementImpl library =
-        ElementFactory.library(_definingLibrary.context, "lib");
-    TopLevelVariableElementImpl varA =
-        ElementFactory.topLevelVariableElement2("A");
-    TopLevelVariableElementImpl varB =
-        ElementFactory.topLevelVariableElement2("B");
-    TopLevelVariableElementImpl varC =
-        ElementFactory.topLevelVariableElement2("C");
-    CompilationUnitElementImpl unit =
-        library.definingCompilationUnit as CompilationUnitElementImpl;
-    unit.accessors = <PropertyAccessorElement>[
-      varA.getter,
-      varA.setter,
-      varB.getter,
-      varC.setter
-    ];
-    unit.topLevelVariables = <TopLevelVariableElement>[varA, varB, varC];
-    directive.element = ElementFactory.importFor(library, null);
-    _resolveNode(directive);
-    expect(combinator.shownNames[0].staticElement, same(varA));
-    expect(combinator.shownNames[1].staticElement, same(varB));
-    expect(combinator.shownNames[2].staticElement, same(varC));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIndexExpression_get() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    InterfaceType intType = _typeProvider.intType;
-    MethodElement getter =
-        ElementFactory.methodElement("[]", intType, [intType]);
-    classA.methods = <MethodElement>[getter];
-    SimpleIdentifier array = AstFactory.identifier3("a");
-    array.staticType = classA.type;
-    IndexExpression expression =
-        AstFactory.indexExpression(array, AstFactory.identifier3("i"));
-    expect(_resolveIndexExpression(expression), same(getter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIndexExpression_set() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    InterfaceType intType = _typeProvider.intType;
-    MethodElement setter =
-        ElementFactory.methodElement("[]=", intType, [intType]);
-    classA.methods = <MethodElement>[setter];
-    SimpleIdentifier array = AstFactory.identifier3("a");
-    array.staticType = classA.type;
-    IndexExpression expression =
-        AstFactory.indexExpression(array, AstFactory.identifier3("i"));
-    AstFactory.assignmentExpression(
-        expression, TokenType.EQ, AstFactory.integer(0));
-    expect(_resolveIndexExpression(expression), same(setter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitInstanceCreationExpression_named() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String constructorName = "a";
-    ConstructorElement constructor =
-        ElementFactory.constructorElement2(classA, constructorName);
-    classA.constructors = <ConstructorElement>[constructor];
-    ConstructorName name = AstFactory.constructorName(
-        AstFactory.typeName(classA), constructorName);
-    name.staticElement = constructor;
-    InstanceCreationExpression creation =
-        AstFactory.instanceCreationExpression(Keyword.NEW, name);
-    _resolveNode(creation);
-    expect(creation.staticElement, same(constructor));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitInstanceCreationExpression_unnamed() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String constructorName = null;
-    ConstructorElement constructor =
-        ElementFactory.constructorElement2(classA, constructorName);
-    classA.constructors = <ConstructorElement>[constructor];
-    ConstructorName name = AstFactory.constructorName(
-        AstFactory.typeName(classA), constructorName);
-    name.staticElement = constructor;
-    InstanceCreationExpression creation =
-        AstFactory.instanceCreationExpression(Keyword.NEW, name);
-    _resolveNode(creation);
-    expect(creation.staticElement, same(constructor));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitInstanceCreationExpression_unnamed_namedParameter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String constructorName = null;
-    ConstructorElementImpl constructor =
-        ElementFactory.constructorElement2(classA, constructorName);
-    String parameterName = "a";
-    ParameterElement parameter = ElementFactory.namedParameter(parameterName);
-    constructor.parameters = <ParameterElement>[parameter];
-    classA.constructors = <ConstructorElement>[constructor];
-    ConstructorName name = AstFactory.constructorName(
-        AstFactory.typeName(classA), constructorName);
-    name.staticElement = constructor;
-    InstanceCreationExpression creation = AstFactory.instanceCreationExpression(
-        Keyword.NEW,
-        name,
-        [AstFactory.namedExpression2(parameterName, AstFactory.integer(0))]);
-    _resolveNode(creation);
-    expect(creation.staticElement, same(constructor));
-    expect(
-        (creation.argumentList.arguments[0] as NamedExpression)
-            .name
-            .label
-            .staticElement,
-        same(parameter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitMethodInvocation() {
-    InterfaceType numType = _typeProvider.numType;
-    SimpleIdentifier left = AstFactory.identifier3("i");
-    left.staticType = numType;
-    String methodName = "abs";
-    MethodInvocation invocation = AstFactory.methodInvocation(left, methodName);
-    _resolveNode(invocation);
-    expect(invocation.methodName.staticElement,
-        same(getMethod(numType, methodName)));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitMethodInvocation_namedParameter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    String parameterName = "p";
-    MethodElementImpl method = ElementFactory.methodElement(methodName, null);
-    ParameterElement parameter = ElementFactory.namedParameter(parameterName);
-    method.parameters = <ParameterElement>[parameter];
-    classA.methods = <MethodElement>[method];
-    SimpleIdentifier left = AstFactory.identifier3("i");
-    left.staticType = classA.type;
-    MethodInvocation invocation = AstFactory.methodInvocation(left, methodName,
-        [AstFactory.namedExpression2(parameterName, AstFactory.integer(0))]);
-    _resolveNode(invocation);
-    expect(invocation.methodName.staticElement, same(method));
-    expect(
-        (invocation.argumentList.arguments[0] as NamedExpression)
-            .name
-            .label
-            .staticElement,
-        same(parameter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPostfixExpression() {
-    InterfaceType numType = _typeProvider.numType;
-    SimpleIdentifier operand = AstFactory.identifier3("i");
-    operand.staticType = numType;
-    PostfixExpression expression =
-        AstFactory.postfixExpression(operand, TokenType.PLUS_PLUS);
-    _resolveNode(expression);
-    expect(expression.staticElement, getMethod(numType, "+"));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixedIdentifier_dynamic() {
-    DartType dynamicType = _typeProvider.dynamicType;
-    SimpleIdentifier target = AstFactory.identifier3("a");
-    VariableElementImpl variable = ElementFactory.localVariableElement(target);
-    variable.type = dynamicType;
-    target.staticElement = variable;
-    target.staticType = dynamicType;
-    PrefixedIdentifier identifier =
-        AstFactory.identifier(target, AstFactory.identifier3("b"));
-    _resolveNode(identifier);
-    expect(identifier.staticElement, isNull);
-    expect(identifier.identifier.staticElement, isNull);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixedIdentifier_nonDynamic() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "b";
-    PropertyAccessorElement getter =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getter];
-    SimpleIdentifier target = AstFactory.identifier3("a");
-    VariableElementImpl variable = ElementFactory.localVariableElement(target);
-    variable.type = classA.type;
-    target.staticElement = variable;
-    target.staticType = classA.type;
-    PrefixedIdentifier identifier =
-        AstFactory.identifier(target, AstFactory.identifier3(getterName));
-    _resolveNode(identifier);
-    expect(identifier.staticElement, same(getter));
-    expect(identifier.identifier.staticElement, same(getter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixedIdentifier_staticClassMember_getter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    // set accessors
-    String propName = "b";
-    PropertyAccessorElement getter =
-        ElementFactory.getterElement(propName, false, _typeProvider.intType);
-    PropertyAccessorElement setter =
-        ElementFactory.setterElement(propName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getter, setter];
-    // prepare "A.m"
-    SimpleIdentifier target = AstFactory.identifier3("A");
-    target.staticElement = classA;
-    target.staticType = classA.type;
-    PrefixedIdentifier identifier =
-        AstFactory.identifier(target, AstFactory.identifier3(propName));
-    // resolve
-    _resolveNode(identifier);
-    expect(identifier.staticElement, same(getter));
-    expect(identifier.identifier.staticElement, same(getter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixedIdentifier_staticClassMember_method() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    // set methods
-    String propName = "m";
-    MethodElement method =
-        ElementFactory.methodElement("m", _typeProvider.intType);
-    classA.methods = <MethodElement>[method];
-    // prepare "A.m"
-    SimpleIdentifier target = AstFactory.identifier3("A");
-    target.staticElement = classA;
-    target.staticType = classA.type;
-    PrefixedIdentifier identifier =
-        AstFactory.identifier(target, AstFactory.identifier3(propName));
-    AstFactory.assignmentExpression(
-        identifier, TokenType.EQ, AstFactory.nullLiteral());
-    // resolve
-    _resolveNode(identifier);
-    expect(identifier.staticElement, same(method));
-    expect(identifier.identifier.staticElement, same(method));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixedIdentifier_staticClassMember_setter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    // set accessors
-    String propName = "b";
-    PropertyAccessorElement getter =
-        ElementFactory.getterElement(propName, false, _typeProvider.intType);
-    PropertyAccessorElement setter =
-        ElementFactory.setterElement(propName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getter, setter];
-    // prepare "A.b = null"
-    SimpleIdentifier target = AstFactory.identifier3("A");
-    target.staticElement = classA;
-    target.staticType = classA.type;
-    PrefixedIdentifier identifier =
-        AstFactory.identifier(target, AstFactory.identifier3(propName));
-    AstFactory.assignmentExpression(
-        identifier, TokenType.EQ, AstFactory.nullLiteral());
-    // resolve
-    _resolveNode(identifier);
-    expect(identifier.staticElement, same(setter));
-    expect(identifier.identifier.staticElement, same(setter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixExpression() {
-    InterfaceType numType = _typeProvider.numType;
-    SimpleIdentifier operand = AstFactory.identifier3("i");
-    operand.staticType = numType;
-    PrefixExpression expression =
-        AstFactory.prefixExpression(TokenType.PLUS_PLUS, operand);
-    _resolveNode(expression);
-    expect(expression.staticElement, getMethod(numType, "+"));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPropertyAccess_getter_identifier() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "b";
-    PropertyAccessorElement getter =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getter];
-    SimpleIdentifier target = AstFactory.identifier3("a");
-    target.staticType = classA.type;
-    PropertyAccess access = AstFactory.propertyAccess2(target, getterName);
-    _resolveNode(access);
-    expect(access.propertyName.staticElement, same(getter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPropertyAccess_getter_super() {
-    //
-    // class A {
-    //  int get b;
-    // }
-    // class B {
-    //   ... super.m ...
-    // }
-    //
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "b";
-    PropertyAccessorElement getter =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getter];
-    SuperExpression target = AstFactory.superExpression();
-    target.staticType = ElementFactory.classElement("B", classA.type).type;
-    PropertyAccess access = AstFactory.propertyAccess2(target, getterName);
-    AstFactory.methodDeclaration2(
-        null,
-        null,
-        null,
-        null,
-        AstFactory.identifier3("m"),
-        AstFactory.formalParameterList(),
-        AstFactory.expressionFunctionBody(access));
-    _resolveNode(access);
-    expect(access.propertyName.staticElement, same(getter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPropertyAccess_setter_this() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String setterName = "b";
-    PropertyAccessorElement setter =
-        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[setter];
-    ThisExpression target = AstFactory.thisExpression();
-    target.staticType = classA.type;
-    PropertyAccess access = AstFactory.propertyAccess2(target, setterName);
-    AstFactory.assignmentExpression(
-        access, TokenType.EQ, AstFactory.integer(0));
-    _resolveNode(access);
-    expect(access.propertyName.staticElement, same(setter));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSimpleIdentifier_classScope() {
-    InterfaceType doubleType = _typeProvider.doubleType;
-    String fieldName = "NAN";
-    SimpleIdentifier node = AstFactory.identifier3(fieldName);
-    _resolveInClass(node, doubleType.element);
-    expect(node.staticElement, getGetter(doubleType, fieldName));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSimpleIdentifier_dynamic() {
-    SimpleIdentifier node = AstFactory.identifier3("dynamic");
-    _resolveIdentifier(node);
-    expect(node.staticElement, same(_typeProvider.dynamicType.element));
-    expect(node.staticType, same(_typeProvider.typeType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSimpleIdentifier_lexicalScope() {
-    SimpleIdentifier node = AstFactory.identifier3("i");
-    VariableElementImpl element = ElementFactory.localVariableElement(node);
-    expect(_resolveIdentifier(node, [element]), same(element));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSimpleIdentifier_lexicalScope_field_setter() {
-    InterfaceType intType = _typeProvider.intType;
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String fieldName = "a";
-    FieldElement field =
-        ElementFactory.fieldElement(fieldName, false, false, false, intType);
-    classA.fields = <FieldElement>[field];
-    classA.accessors = <PropertyAccessorElement>[field.getter, field.setter];
-    SimpleIdentifier node = AstFactory.identifier3(fieldName);
-    AstFactory.assignmentExpression(node, TokenType.EQ, AstFactory.integer(0));
-    _resolveInClass(node, classA);
-    Element element = node.staticElement;
-    EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccessorElement,
-        PropertyAccessorElement, element);
-    expect((element as PropertyAccessorElement).isSetter, isTrue);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSuperConstructorInvocation() {
-    ClassElementImpl superclass = ElementFactory.classElement2("A");
-    ConstructorElementImpl superConstructor =
-        ElementFactory.constructorElement2(superclass, null);
-    superclass.constructors = <ConstructorElement>[superConstructor];
-    ClassElementImpl subclass =
-        ElementFactory.classElement("B", superclass.type);
-    ConstructorElementImpl subConstructor =
-        ElementFactory.constructorElement2(subclass, null);
-    subclass.constructors = <ConstructorElement>[subConstructor];
-    SuperConstructorInvocation invocation =
-        AstFactory.superConstructorInvocation();
-    _resolveInClass(invocation, subclass);
-    expect(invocation.staticElement, superConstructor);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSuperConstructorInvocation_namedParameter() {
-    ClassElementImpl superclass = ElementFactory.classElement2("A");
-    ConstructorElementImpl superConstructor =
-        ElementFactory.constructorElement2(superclass, null);
-    String parameterName = "p";
-    ParameterElement parameter = ElementFactory.namedParameter(parameterName);
-    superConstructor.parameters = <ParameterElement>[parameter];
-    superclass.constructors = <ConstructorElement>[superConstructor];
-    ClassElementImpl subclass =
-        ElementFactory.classElement("B", superclass.type);
-    ConstructorElementImpl subConstructor =
-        ElementFactory.constructorElement2(subclass, null);
-    subclass.constructors = <ConstructorElement>[subConstructor];
-    SuperConstructorInvocation invocation = AstFactory
-        .superConstructorInvocation([
-      AstFactory.namedExpression2(parameterName, AstFactory.integer(0))
-    ]);
-    _resolveInClass(invocation, subclass);
-    expect(invocation.staticElement, superConstructor);
-    expect(
-        (invocation.argumentList.arguments[0] as NamedExpression)
-            .name
-            .label
-            .staticElement,
-        same(parameter));
-    _listener.assertNoErrors();
-  }
-
-  /**
-   * Create the resolver used by the tests.
-   *
-   * @return the resolver that was created
-   */
-  ElementResolver _createResolver() {
-    InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
-    FileBasedSource source =
-        new FileBasedSource(FileUtilities2.createFile("/test.dart"));
-    CompilationUnitElementImpl definingCompilationUnit =
-        new CompilationUnitElementImpl("test.dart");
-    definingCompilationUnit.librarySource =
-        definingCompilationUnit.source = source;
-    _definingLibrary = ElementFactory.library(context, "test");
-    _definingLibrary.definingCompilationUnit = definingCompilationUnit;
-    _visitor = new ResolverVisitor(
-        _definingLibrary, source, _typeProvider, _listener,
-        nameScope: new LibraryScope(_definingLibrary, _listener));
-    try {
-      return _visitor.elementResolver;
-    } catch (exception) {
-      throw new IllegalArgumentException(
-          "Could not create resolver", exception);
-    }
-  }
-
-  /**
-   * Return the element associated with the label of [statement] after the
-   * resolver has resolved it.  [labelElement] is the label element to be
-   * defined in the statement's label scope, and [labelTarget] is the statement
-   * the label resolves to.
-   */
-  Element _resolveBreak(BreakStatement statement, LabelElementImpl labelElement,
-      Statement labelTarget) {
-    _resolveStatement(statement, labelElement, labelTarget);
-    return statement.label.staticElement;
-  }
-
-  /**
-   * Return the element associated with the label [statement] after the
-   * resolver has resolved it.  [labelElement] is the label element to be
-   * defined in the statement's label scope, and [labelTarget] is the AST node
-   * the label resolves to.
-   *
-   * @param statement the statement to be resolved
-   * @param labelElement the label element to be defined in the statement's label scope
-   * @return the element to which the statement's label was resolved
-   */
-  Element _resolveContinue(ContinueStatement statement,
-      LabelElementImpl labelElement, AstNode labelTarget) {
-    _resolveStatement(statement, labelElement, labelTarget);
-    return statement.label.staticElement;
-  }
-
-  /**
-   * Return the element associated with the given identifier after the resolver has resolved the
-   * identifier.
-   *
-   * @param node the expression to be resolved
-   * @param definedElements the elements that are to be defined in the scope in which the element is
-   *          being resolved
-   * @return the element to which the expression was resolved
-   */
-  Element _resolveIdentifier(Identifier node, [List<Element> definedElements]) {
-    _resolveNode(node, definedElements);
-    return node.staticElement;
-  }
-
-  /**
-   * Return the element associated with the given identifier after the resolver has resolved the
-   * identifier.
-   *
-   * @param node the expression to be resolved
-   * @param enclosingClass the element representing the class enclosing the identifier
-   * @return the element to which the expression was resolved
-   */
-  void _resolveInClass(AstNode node, ClassElement enclosingClass) {
-    try {
-      Scope outerScope = _visitor.nameScope;
-      try {
-        _visitor.enclosingClass = enclosingClass;
-        EnclosedScope innerScope = new ClassScope(
-            new TypeParameterScope(outerScope, enclosingClass), enclosingClass);
-        _visitor.nameScope = innerScope;
-        node.accept(_resolver);
-      } finally {
-        _visitor.enclosingClass = null;
-        _visitor.nameScope = outerScope;
-      }
-    } catch (exception) {
-      throw new IllegalArgumentException("Could not resolve node", exception);
-    }
-  }
-
-  /**
-   * Return the element associated with the given expression after the resolver has resolved the
-   * expression.
-   *
-   * @param node the expression to be resolved
-   * @param definedElements the elements that are to be defined in the scope in which the element is
-   *          being resolved
-   * @return the element to which the expression was resolved
-   */
-  Element _resolveIndexExpression(IndexExpression node,
-      [List<Element> definedElements]) {
-    _resolveNode(node, definedElements);
-    return node.staticElement;
-  }
-
-  /**
-   * Return the element associated with the given identifier after the resolver has resolved the
-   * identifier.
-   *
-   * @param node the expression to be resolved
-   * @param definedElements the elements that are to be defined in the scope in which the element is
-   *          being resolved
-   * @return the element to which the expression was resolved
-   */
-  void _resolveNode(AstNode node, [List<Element> definedElements]) {
-    try {
-      Scope outerScope = _visitor.nameScope;
-      try {
-        EnclosedScope innerScope = new EnclosedScope(outerScope);
-        if (definedElements != null) {
-          for (Element element in definedElements) {
-            innerScope.define(element);
-          }
-        }
-        _visitor.nameScope = innerScope;
-        node.accept(_resolver);
-      } finally {
-        _visitor.nameScope = outerScope;
-      }
-    } catch (exception) {
-      throw new IllegalArgumentException("Could not resolve node", exception);
-    }
-  }
-
-  /**
-   * Return the element associated with the label of the given statement after the resolver has
-   * resolved the statement.
-   *
-   * @param statement the statement to be resolved
-   * @param labelElement the label element to be defined in the statement's label scope
-   * @return the element to which the statement's label was resolved
-   */
-  void _resolveStatement(
-      Statement statement, LabelElementImpl labelElement, AstNode labelTarget) {
-    try {
-      LabelScope outerScope = _visitor.labelScope;
-      try {
-        LabelScope innerScope;
-        if (labelElement == null) {
-          innerScope = outerScope;
-        } else {
-          innerScope = new LabelScope(
-              outerScope, labelElement.name, labelTarget, labelElement);
-        }
-        _visitor.labelScope = innerScope;
-        statement.accept(_resolver);
-      } finally {
-        _visitor.labelScope = outerScope;
-      }
-    } catch (exception) {
-      throw new IllegalArgumentException("Could not resolve node", exception);
-    }
-  }
-}
-
-@reflectiveTest
 class EnclosedScopeTest extends ResolverTestCase {
   void test_define_duplicate() {
     GatheringErrorListener listener = new GatheringErrorListener();
@@ -2374,7 +288,7 @@
  * Tests for generic method and function resolution that do not use strong mode.
  */
 @reflectiveTest
-class GenericMethodResolverTest extends _StaticTypeAnalyzer2TestShared {
+class GenericMethodResolverTest extends StaticTypeAnalyzer2TestShared {
   void setUp() {
     super.setUp();
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
@@ -2391,7 +305,7 @@
     // therefore discard the propagated type.
     //
     // So this test does not use strong mode.
-    _resolveTestUnit(r'''
+    resolveTestUnit(r'''
 abstract class Iter {
   List<S> map<S>(S f(x));
 }
@@ -2402,4127 +316,7 @@
   }
   return null;
 }''');
-    _expectIdentifierType('y = ', 'dynamic', 'List<dynamic>');
-  }
-}
-
-@reflectiveTest
-class HintCodeTest extends ResolverTestCase {
-  void fail_deadCode_statementAfterRehrow() {
-    Source source = addSource(r'''
-f() {
-  try {
-    var one = 1;
-  } catch (e) {
-    rethrow;
-    var two = 2;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void fail_deadCode_statementAfterThrow() {
-    Source source = addSource(r'''
-f() {
-  var one = 1;
-  throw 'Stop here';
-  var two = 2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void fail_isInt() {
-    Source source = addSource("var v = 1 is int;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.IS_INT]);
-    verify([source]);
-  }
-
-  void fail_isNotInt() {
-    Source source = addSource("var v = 1 is! int;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.IS_NOT_INT]);
-    verify([source]);
-  }
-
-  void fail_overrideEqualsButNotHashCode() {
-    Source source = addSource(r'''
-class A {
-  bool operator ==(x) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE]);
-    verify([source]);
-  }
-
-  void fail_unusedImport_as_equalPrefixes() {
-    // See todo at ImportsVerifier.prefixElementMap.
-    Source source = addSource(r'''
-library L;
-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 {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    assertNoErrors(source3);
-    verify([source, source2, source3]);
-  }
-
-  @override
-  void reset() {
-    analysisContext2 = AnalysisContextFactory.contextWithCoreAndPackages({
-      'package:meta/meta.dart': r'''
-library meta;
-
-const _Protected protected = const _Protected();
-
-class _Protected {
-  const _Protected();
-}
-'''
-    });
-  }
-
-  void test_argumentTypeNotAssignable_functionType() {
-    Source source = addSource(r'''
-m() {
-  var a = new A();
-  a.n(() => 0);
-}
-class A {
-  n(void f(int i)) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  void test_argumentTypeNotAssignable_message() {
-    // The implementation of HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE assumes that
-    // StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE has the same message.
-    expect(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE.message,
-        HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE.message);
-  }
-
-  void test_argumentTypeNotAssignable_type() {
-    Source source = addSource(r'''
-m() {
-  var i = '';
-  n(i);
-}
-n(int i) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  void test_canBeNullAfterNullAware_false_methodInvocation() {
-    Source source = addSource(r'''
-m(x) {
-  x?.a()?.b();
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_canBeNullAfterNullAware_false_propertyAccess() {
-    Source source = addSource(r'''
-m(x) {
-  x?.a?.b;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_canBeNullAfterNullAware_methodInvocation() {
-    Source source = addSource(r'''
-m(x) {
-  x?.a.b();
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  void test_canBeNullAfterNullAware_parenthesized() {
-    Source source = addSource(r'''
-m(x) {
-  (x?.a).b;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  void test_canBeNullAfterNullAware_propertyAccess() {
-    Source source = addSource(r'''
-m(x) {
-  x?.a.b;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_conditionalElse() {
-    Source source = addSource(r'''
-f() {
-  true ? 1 : 2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_conditionalElse_nested() {
-    // test that a dead else-statement can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  true ? true : false && false;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_conditionalIf() {
-    Source source = addSource(r'''
-f() {
-  false ? 1 : 2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_conditionalIf_nested() {
-    // test that a dead then-statement can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  false ? false && false : true;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_else() {
-    Source source = addSource(r'''
-f() {
-  if(true) {} else {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_else_nested() {
-    // test that a dead else-statement can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  if(true) {} else {if (false) {}}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_if() {
-    Source source = addSource(r'''
-f() {
-  if(false) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_if_nested() {
-    // test that a dead then-statement can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  if(false) {if(false) {}}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_while() {
-    Source source = addSource(r'''
-f() {
-  while(false) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_while_nested() {
-    // test that a dead while body can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  while(false) {if(false) {}}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadCatch_catchFollowingCatch() {
-    Source source = addSource(r'''
-class A {}
-f() {
-  try {} catch (e) {} catch (e) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadCatch_catchFollowingCatch_nested() {
-    // 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) {}}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadCatch_catchFollowingCatch_object() {
-    Source source = addSource(r'''
-f() {
-  try {} on Object catch (e) {} catch (e) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadCatch_catchFollowingCatch_object_nested() {
-    // 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) {}}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadCatch_onCatchSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-f() {
-  try {} on A catch (e) {} on B catch (e) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadCatch_onCatchSubtype_nested() {
-    // 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) {}}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadOperandLHS_and() {
-    Source source = addSource(r'''
-f() {
-  bool b = false && false;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadOperandLHS_and_nested() {
-    Source source = addSource(r'''
-f() {
-  bool b = false && (false && false);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadOperandLHS_or() {
-    Source source = addSource(r'''
-f() {
-  bool b = true || true;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_deadOperandLHS_or_nested() {
-    Source source = addSource(r'''
-f() {
-  bool b = true || (false && false);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterBreak_inDefaultCase() {
-    Source source = addSource(r'''
-f(v) {
-  switch(v) {
-    case 1:
-    default:
-      break;
-      var a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterBreak_inForEachStatement() {
-    Source source = addSource(r'''
-f() {
-  var list;
-  for(var l in list) {
-    break;
-    var a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterBreak_inForStatement() {
-    Source source = addSource(r'''
-f() {
-  for(;;) {
-    break;
-    var a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterBreak_inSwitchCase() {
-    Source source = addSource(r'''
-f(v) {
-  switch(v) {
-    case 1:
-      break;
-      var a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterBreak_inWhileStatement() {
-    Source source = addSource(r'''
-f(v) {
-  while(v) {
-    break;
-    var a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterContinue_inForEachStatement() {
-    Source source = addSource(r'''
-f() {
-  var list;
-  for(var l in list) {
-    continue;
-    var a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterContinue_inForStatement() {
-    Source source = addSource(r'''
-f() {
-  for(;;) {
-    continue;
-    var a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterContinue_inWhileStatement() {
-    Source source = addSource(r'''
-f(v) {
-  while(v) {
-    continue;
-    var a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterReturn_function() {
-    Source source = addSource(r'''
-f() {
-  var one = 1;
-  return;
-  var two = 2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterReturn_ifStatement() {
-    Source source = addSource(r'''
-f(bool b) {
-  if(b) {
-    var one = 1;
-    return;
-    var two = 2;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterReturn_method() {
-    Source source = addSource(r'''
-class A {
-  m() {
-    var one = 1;
-    return;
-    var two = 2;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterReturn_nested() {
-    Source source = addSource(r'''
-f() {
-  var one = 1;
-  return;
-  if(false) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deadCode_statementAfterReturn_twoReturns() {
-    Source source = addSource(r'''
-f() {
-  var one = 1;
-  return;
-  var two = 2;
-  return;
-  var three = 3;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_assignment() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A operator+(A a) { return a; }
-}
-f(A a) {
-  A b;
-  a += b;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_deprecated() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  m() {}
-  n() {m();}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_Deprecated() {
-    Source source = addSource(r'''
-class A {
-  @Deprecated('0.9')
-  m() {}
-  n() {m();}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_export() {
-    Source source = addSource("export 'deprecated_library.dart';");
-    addNamedSource(
-        "/deprecated_library.dart",
-        r'''
-@deprecated
-library deprecated_library;
-class A {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_getter() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  get m => 1;
-}
-f(A a) {
-  return a.m;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_import() {
-    Source source = addSource(r'''
-import 'deprecated_library.dart';
-f(A a) {}''');
-    addNamedSource(
-        "/deprecated_library.dart",
-        r'''
-@deprecated
-library deprecated_library;
-class A {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_indexExpression() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  operator[](int i) {}
-}
-f(A a) {
-  return a[1];
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_instanceCreation() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A(int i) {}
-}
-f() {
-  A a = new A(1);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_instanceCreation_namedConstructor() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A.named(int i) {}
-}
-f() {
-  A a = new A.named(1);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_operator() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  operator+(A a) {}
-}
-f(A a) {
-  A b;
-  return a + b;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_setter() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  set s(v) {}
-}
-f(A a) {
-  return a.s = 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_superConstructor() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A() {}
-}
-class B extends A {
-  B() : super() {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_superConstructor_namedConstructor() {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A.named() {}
-}
-class B extends A {
-  B() : super.named() {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  void test_divisionOptimization_double() {
-    Source source = addSource(r'''
-f(double x, double y) {
-  var v = (x / y).toInt();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
-    verify([source]);
-  }
-
-  void test_divisionOptimization_int() {
-    Source source = addSource(r'''
-f(int x, int y) {
-  var v = (x / y).toInt();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
-    verify([source]);
-  }
-
-  void test_divisionOptimization_propagatedType() {
-    // Tests the propagated type information of the '/' method
-    Source source = addSource(r'''
-f(x, y) {
-  x = 1;
-  y = 1;
-  var v = (x / y).toInt();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
-    verify([source]);
-  }
-
-  void test_divisionOptimization_wrappedBinaryExpression() {
-    Source source = addSource(r'''
-f(int x, int y) {
-  var v = (((x / y))).toInt();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
-    verify([source]);
-  }
-
-  void test_duplicateImport() {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart';
-A a;''');
-    addNamedSource(
-        "/lib1.dart",
-        r'''
-library lib1;
-class A {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
-  void test_duplicateImport2() {
-    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 {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [HintCode.DUPLICATE_IMPORT, HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
-  void test_duplicateImport3() {
-    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 {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
-  void test_importDeferredLibraryWithLoadFunction() {
-    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
-    ]);
-  }
-
-  void test_invalidAssignment_instanceVariable() {
-    Source source = addSource(r'''
-class A {
-  int x;
-}
-f(var y) {
-  A a;
-  if(y is String) {
-    a.x = y;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
-    verify([source]);
-  }
-
-  void test_invalidAssignment_localVariable() {
-    Source source = addSource(r'''
-f(var y) {
-  if(y is String) {
-    int x = y;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
-    verify([source]);
-  }
-
-  void test_invalidAssignment_message() {
-    // The implementation of HintCode.INVALID_ASSIGNMENT assumes that
-    // StaticTypeWarningCode.INVALID_ASSIGNMENT has the same message.
-    expect(StaticTypeWarningCode.INVALID_ASSIGNMENT.message,
-        HintCode.INVALID_ASSIGNMENT.message);
-  }
-
-  void test_invalidAssignment_staticVariable() {
-    Source source = addSource(r'''
-class A {
-  static int x;
-}
-f(var y) {
-  if(y is String) {
-    A.x = y;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
-    verify([source]);
-  }
-
-  void test_invalidAssignment_variableDeclaration() {
-    // 17971
-    Source source = addSource(r'''
-class Point {
-  final num x, y;
-  Point(this.x, this.y);
-  Point operator +(Point other) {
-    return new Point(x+other.x, y+other.y);
-  }
-}
-main() {
-  var p1 = new Point(0, 0);
-  var p2 = new Point(10, 10);
-  int n = p1 + p2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_field() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int a;
-}
-abstract class B implements A {
-  int b() => a;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_function() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-main() {
-  new A().a();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_getter() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int get a => 42;
-}
-abstract class B implements A {
-  int b() => a;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_message() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-class B {
-  void b() => new A().a();
-}''');
-    List<AnalysisError> errors = analysisContext2.computeErrors(source);
-    expect(errors, hasLength(1));
-    expect(errors[0].message,
-        "The member 'a' can only be used within instance members of subclasses of 'A'");
-  }
-
-  void test_invalidUseOfProtectedMember_method_1() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-class B {
-  void b() => new A().a();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_method_2() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-abstract class B implements A {
-  void b() => a();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_OK_1() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-class B extends A {
-  void b() => a();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_OK_2() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-class B extends Object with A {
-  void b() => a();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_OK_3() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected m1() {}
-}
-class B extends A {
-  static m2(A a) => a.m1();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_OK_4() {
-    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();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_OK_field() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int a = 42;
-}
-class B extends A {
-  int b() => a;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_OK_getter() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int get a => 42;
-}
-class B extends A {
-  int b() => a;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_OK_setter() {
-    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;
-  }
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_setter() {
-    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;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    verify([source]);
-  }
-
-  void test_invalidUseOfProtectedMember_topLevelVariable() {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-@protected
-int x = 0;
-main() {
-  print(x);
-}''');
-    computeLibrarySourceErrors(source);
-    // TODO(brianwilkerson) This should produce a hint because the annotation is
-    // being applied to the wrong kind of declaration.
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_isDouble() {
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    options.dart2jsHint = true;
-    resetWithOptions(options);
-    Source source = addSource("var v = 1 is double;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.IS_DOUBLE]);
-    verify([source]);
-  }
-
-  void test_isNotDouble() {
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    options.dart2jsHint = true;
-    resetWithOptions(options);
-    Source source = addSource("var v = 1 is! double;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.IS_NOT_DOUBLE]);
-    verify([source]);
-  }
-
-  void test_missingReturn_async() {
-    Source source = addSource('''
-import 'dart:async';
-Future<int> f() async {}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  void test_missingReturn_function() {
-    Source source = addSource("int f() {}");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  void test_missingReturn_method() {
-    Source source = addSource(r'''
-class A {
-  int m() {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_assert() {
-    Source source = addSource(r'''
-m(x) {
-  assert (x?.a);
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_conditionalExpression() {
-    Source source = addSource(r'''
-m(x) {
-  return x?.a ? 0 : 1;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_do() {
-    Source source = addSource(r'''
-m(x) {
-  do {} while (x?.a);
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_for() {
-    Source source = addSource(r'''
-m(x) {
-  for (var v = x; v?.a; v = v.next) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if() {
-    Source source = addSource(r'''
-m(x) {
-  if (x?.a) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_conditionalAnd_first() {
-    Source source = addSource(r'''
-m(x) {
-  if (x?.a && x.b) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_conditionalAnd_second() {
-    Source source = addSource(r'''
-m(x) {
-  if (x.a && x?.b) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_conditionalAnd_third() {
-    Source source = addSource(r'''
-m(x) {
-  if (x.a && x.b && x?.c) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_conditionalOr_first() {
-    Source source = addSource(r'''
-m(x) {
-  if (x?.a || x.b) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_conditionalOr_second() {
-    Source source = addSource(r'''
-m(x) {
-  if (x.a || x?.b) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_conditionalOr_third() {
-    Source source = addSource(r'''
-m(x) {
-  if (x.a || x.b || x?.c) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_not() {
-    Source source = addSource(r'''
-m(x) {
-  if (!x?.a) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_parenthesized() {
-    Source source = addSource(r'''
-m(x) {
-  if ((x?.a)) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_while() {
-    Source source = addSource(r'''
-m(x) {
-  while (x?.a) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingGetter_invalid() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-}
-class B extends A {
-  @override
-  int get m => 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingMethod_invalid() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-}
-class B extends A {
-  @override
-  int m() => 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD]);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingSetter_invalid() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-}
-class B extends A {
-  @override
-  set m(int x) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER]);
-    verify([source]);
-  }
-
-  void test_typeCheck_type_is_Null() {
-    Source source = addSource(r'''
-m(i) {
-  bool b = i is Null;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.TYPE_CHECK_IS_NULL]);
-    verify([source]);
-  }
-
-  void test_typeCheck_type_not_Null() {
-    Source source = addSource(r'''
-m(i) {
-  bool b = i is! Null;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.TYPE_CHECK_IS_NOT_NULL]);
-    verify([source]);
-  }
-
-  void test_undefinedGetter() {
-    Source source = addSource(r'''
-class A {}
-f(var a) {
-  if(a is A) {
-    return a.m;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_GETTER]);
-  }
-
-  void test_undefinedGetter_message() {
-    // The implementation of HintCode.UNDEFINED_SETTER assumes that
-    // UNDEFINED_SETTER in StaticTypeWarningCode and StaticWarningCode are the
-    // same, this verifies that assumption.
-    expect(StaticWarningCode.UNDEFINED_GETTER.message,
-        StaticTypeWarningCode.UNDEFINED_GETTER.message);
-  }
-
-  void test_undefinedMethod() {
-    Source source = addSource(r'''
-f() {
-  var a = 'str';
-  a.notAMethodOnString();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_METHOD]);
-  }
-
-  void test_undefinedMethod_assignmentExpression() {
-    Source source = addSource(r'''
-class A {}
-class B {
-  f(var a, var a2) {
-    a = new A();
-    a2 = new A();
-    a += a2;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_METHOD]);
-  }
-
-  void test_undefinedOperator_binaryExpression() {
-    Source source = addSource(r'''
-class A {}
-f(var a) {
-  if(a is A) {
-    a + 1;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-  }
-
-  void test_undefinedOperator_indexBoth() {
-    Source source = addSource(r'''
-class A {}
-f(var a) {
-  if(a is A) {
-    a[0]++;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-  }
-
-  void test_undefinedOperator_indexGetter() {
-    Source source = addSource(r'''
-class A {}
-f(var a) {
-  if(a is A) {
-    a[0];
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-  }
-
-  void test_undefinedOperator_indexSetter() {
-    Source source = addSource(r'''
-class A {}
-f(var a) {
-  if(a is A) {
-    a[0] = 1;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-  }
-
-  void test_undefinedOperator_postfixExpression() {
-    Source source = addSource(r'''
-class A {}
-f(var a) {
-  if(a is A) {
-    a++;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-  }
-
-  void test_undefinedOperator_prefixExpression() {
-    Source source = addSource(r'''
-class A {}
-f(var a) {
-  if(a is A) {
-    ++a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-  }
-
-  void test_undefinedSetter() {
-    Source source = addSource(r'''
-class A {}
-f(var a) {
-  if(a is A) {
-    a.m = 0;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNDEFINED_SETTER]);
-  }
-
-  void test_undefinedSetter_message() {
-    // The implementation of HintCode.UNDEFINED_SETTER assumes that
-    // UNDEFINED_SETTER in StaticTypeWarningCode and StaticWarningCode are the
-    // same, this verifies that assumption.
-    expect(StaticWarningCode.UNDEFINED_SETTER.message,
-        StaticTypeWarningCode.UNDEFINED_SETTER.message);
-  }
-
-  void test_unnecessaryCast_type_supertype() {
-    Source source = addSource(r'''
-m(int i) {
-  var b = i as Object;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_CAST]);
-    verify([source]);
-  }
-
-  void test_unnecessaryCast_type_type() {
-    Source source = addSource(r'''
-m(num i) {
-  var b = i as num;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_CAST]);
-    verify([source]);
-  }
-
-  void test_unnecessaryNoSuchMethod_blockBody() {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(x) => super.noSuchMethod(x);
-}
-class B extends A {
-  mmm();
-  noSuchMethod(y) {
-    return super.noSuchMethod(y);
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_NO_SUCH_METHOD]);
-    verify([source]);
-  }
-
-  void test_unnecessaryNoSuchMethod_expressionBody() {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(x) => super.noSuchMethod(x);
-}
-class B extends A {
-  mmm();
-  noSuchMethod(y) => super.noSuchMethod(y);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_NO_SUCH_METHOD]);
-    verify([source]);
-  }
-
-  void test_unnecessaryTypeCheck_null_is_Null() {
-    Source source = addSource("bool b = null is Null;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
-    verify([source]);
-  }
-
-  void test_unnecessaryTypeCheck_null_not_Null() {
-    Source source = addSource("bool b = null is! Null;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
-    verify([source]);
-  }
-
-  void test_unnecessaryTypeCheck_type_is_dynamic() {
-    Source source = addSource(r'''
-m(i) {
-  bool b = i is dynamic;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
-    verify([source]);
-  }
-
-  void test_unnecessaryTypeCheck_type_is_object() {
-    Source source = addSource(r'''
-m(i) {
-  bool b = i is Object;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
-    verify([source]);
-  }
-
-  void test_unnecessaryTypeCheck_type_not_dynamic() {
-    Source source = addSource(r'''
-m(i) {
-  bool b = i is! dynamic;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
-    verify([source]);
-  }
-
-  void test_unnecessaryTypeCheck_type_not_object() {
-    Source source = addSource(r'''
-m(i) {
-  bool b = i is! Object;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_isUsed_extends() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {}
-class B extends _A {}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_isUsed_fieldDeclaration() {
-    enableUnusedElement = true;
-    var src = r'''
-class Foo {
-  _Bar x;
-}
-
-class _Bar {
-}
-''';
-    Source source = addSource(src);
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_isUsed_implements() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {}
-class B implements _A {}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_isUsed_instanceCreation() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {}
-main() {
-  new _A();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_isUsed_staticFieldAccess() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {
-  static const F = 42;
-}
-main() {
-  _A.F;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_isUsed_staticMethodInvocation() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {
-  static m() {}
-}
-main() {
-  _A.m();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_isUsed_typeArgument() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {}
-main() {
-  var v = new List<_A>();
-  print(v);
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_notUsed_inClassMember() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {
-  static staticMethod() {
-    new _A();
-  }
-  instanceMethod() {
-    new _A();
-  }
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_notUsed_inConstructorName() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {
-  _A() {}
-  _A.named() {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_notUsed_isExpression() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {}
-main(p) {
-  if (p is _A) {
-  }
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {}
-main() {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_class_notUsed_variableDeclaration() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class _A {}
-main() {
-  _A v;
-  print(v);
-}
-print(x) {}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_enum_isUsed_fieldReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-enum _MyEnum {A, B, C}
-main() {
-  print(_MyEnum.B);
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_enum_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-enum _MyEnum {A, B, C}
-main() {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionLocal_isUsed_closure() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-main() {
-  print(() {});
-}
-print(x) {}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionLocal_isUsed_invocation() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-main() {
-  f() {}
-  f();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionLocal_isUsed_reference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-main() {
-  f() {}
-  print(f);
-}
-print(x) {}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionLocal_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-main() {
-  f() {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionLocal_notUsed_referenceFromItself() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-main() {
-  _f(int p) {
-    _f(p - 1);
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTop_isUsed_invocation() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-_f() {}
-main() {
-  _f();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTop_isUsed_reference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-_f() {}
-main() {
-  print(_f);
-}
-print(x) {}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTop_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-_f() {}
-main() {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTop_notUsed_referenceFromItself() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-_f(int p) {
-  _f(p - 1);
-}
-main() {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTypeAlias_isUsed_isExpression() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-typedef _F(a, b);
-main(f) {
-  if (f is _F) {
-    print('F');
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTypeAlias_isUsed_reference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-typedef _F(a, b);
-main(_F f) {
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTypeAlias_isUsed_typeArgument() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-typedef _F(a, b);
-main() {
-  var v = new List<_F>();
-  print(v);
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTypeAlias_isUsed_variableDeclaration() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-typedef _F(a, b);
-class A {
-  _F f;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_functionTypeAlias_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-typedef _F(a, b);
-main() {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_getter_isUsed_invocation_implicitThis() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  get _g => null;
-  useGetter() {
-    var v = _g;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_getter_isUsed_invocation_PrefixedIdentifier() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  get _g => null;
-}
-main(A a) {
-  var v = a._g;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_getter_isUsed_invocation_PropertyAccess() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  get _g => null;
-}
-main() {
-  var v = new A()._g;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_getter_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  get _g => null;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_getter_notUsed_referenceFromItself() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  get _g {
-    return _g;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_hasReference_implicitThis() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-  useMethod() {
-    print(_m);
-  }
-}
-print(x) {}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_hasReference_implicitThis_subclass() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-  useMethod() {
-    print(_m);
-  }
-}
-class B extends A {
-  _m() {}
-}
-print(x) {}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_hasReference_PrefixedIdentifier() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-}
-main(A a) {
-  a._m;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_hasReference_PropertyAccess() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-}
-main() {
-  new A()._m;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_invocation_implicitThis() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-  useMethod() {
-    _m();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_invocation_implicitThis_subclass() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-  useMethod() {
-    _m();
-  }
-}
-class B extends A {
-  _m() {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_invocation_MemberElement() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A<T> {
-  _m(T t) {}
-}
-main(A<int> a) {
-  a._m(0);
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_invocation_propagated() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-}
-main() {
-  var a = new A();
-  a._m();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_invocation_static() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-}
-main() {
-  A a = new A();
-  a._m();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_invocation_subclass() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  _m() {}
-}
-class B extends A {
-  _m() {}
-}
-main(A a) {
-  a._m();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_notPrivate() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  m() {}
-}
-main() {
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_isUsed_staticInvocation() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  static _m() {}
-}
-main() {
-  A._m();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  static _m() {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_method_notUsed_referenceFromItself() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  static _m(int p) {
-    _m(p - 1);
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_setter_isUsed_invocation_implicitThis() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  set _s(x) {}
-  useSetter() {
-    _s = 42;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_setter_isUsed_invocation_PrefixedIdentifier() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  set _s(x) {}
-}
-main(A a) {
-  a._s = 42;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_setter_isUsed_invocation_PropertyAccess() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  set _s(x) {}
-}
-main() {
-  new A()._s = 42;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedElement_setter_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  set _s(x) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedElement_setter_notUsed_referenceFromItself() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  set _s(int x) {
-    if (x > 5) {
-      _s = x - 1;
-    }
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_ELEMENT]);
-    verify([source]);
-  }
-
-  void test_unusedField_isUsed_argument() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f = 0;
-  main() {
-    print(++_f);
-  }
-}
-print(x) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedField_isUsed_reference_implicitThis() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-  main() {
-    print(_f);
-  }
-}
-print(x) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedField_isUsed_reference_implicitThis_expressionFunctionBody() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-  m() => _f;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedField_isUsed_reference_implicitThis_subclass() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-  main() {
-    print(_f);
-  }
-}
-class B extends A {
-  int _f;
-}
-print(x) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedField_isUsed_reference_qualified_propagatedElement() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-}
-main() {
-  var a = new A();
-  print(a._f);
-}
-print(x) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedField_isUsed_reference_qualified_staticElement() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-}
-main() {
-  A a = new A();
-  print(a._f);
-}
-print(x) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedField_isUsed_reference_qualified_unresolved() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-}
-main(a) {
-  print(a._f);
-}
-print(x) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedField_notUsed_compoundAssign() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-  main() {
-    _f += 2;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_FIELD]);
-    verify([source]);
-  }
-
-  void test_unusedField_notUsed_noReference() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_FIELD]);
-    verify([source]);
-  }
-
-  void test_unusedField_notUsed_postfixExpr() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f = 0;
-  main() {
-    _f++;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_FIELD]);
-    verify([source]);
-  }
-
-  void test_unusedField_notUsed_prefixExpr() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f = 0;
-  main() {
-    ++_f;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_FIELD]);
-    verify([source]);
-  }
-
-  void test_unusedField_notUsed_simpleAssignment() {
-    enableUnusedElement = true;
-    Source source = addSource(r'''
-class A {
-  int _f;
-  m() {
-    _f = 1;
-  }
-}
-main(A a) {
-  a._f = 2;
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_FIELD]);
-    verify([source]);
-  }
-
-  void test_unusedImport() {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';''');
-    Source source2 = addNamedSource("/lib1.dart", "library lib1;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  void test_unusedImport_as() {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart' as one;
-one.A a;''');
-    Source source2 = addNamedSource(
-        "/lib1.dart",
-        r'''
-library lib1;
-class A {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  void test_unusedImport_hide() {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart' hide A;
-A a;''');
-    Source source2 = addNamedSource(
-        "/lib1.dart",
-        r'''
-library lib1;
-class A {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  void test_unusedImport_show() {
-    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;
-class A {}
-class B {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  void test_unusedLocalVariable_inCatch_exception() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  try {
-  } on String catch (exception) {
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_CATCH_CLAUSE]);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_inCatch_exception_hasStack() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  try {
-  } catch (exception, stack) {
-    print(stack);
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_inCatch_exception_noOnClause() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  try {
-  } catch (exception) {
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_inCatch_stackTrace() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  try {
-  } catch (exception, stackTrace) {
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_CATCH_STACK]);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_inCatch_stackTrace_used() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  try {
-  } catch (exception, stackTrace) {
-    print('exception at $stackTrace');
-  }
-}
-print(x) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_inFor_underscore_ignored() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  for (var _ in [1,2,3]) {
-    for (var __ in [4,5,6]) {
-      // do something
-    }
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_inFunction() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  var v = 1;
-  v = 2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_inMethod() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-class A {
-  foo() {
-    var v = 1;
-    v = 2;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_isInvoked() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-typedef Foo();
-main() {
-  Foo foo;
-  foo();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_isRead_notUsed_compoundAssign() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  var v = 1;
-  v += 2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_isRead_notUsed_postfixExpr() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  var v = 1;
-  v++;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_isRead_notUsed_prefixExpr() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  var v = 1;
-  ++v;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.UNUSED_LOCAL_VARIABLE]);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_isRead_usedArgument() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-main() {
-  var v = 1;
-  print(++v);
-}
-print(x) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedLocalVariable_isRead_usedInvocationTarget() {
-    enableUnusedLocalVariable = true;
-    Source source = addSource(r'''
-class A {
-  foo() {}
-}
-main() {
-  var a = new A();
-  a.foo();
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  void test_useOfVoidResult_assignmentExpression_function() {
-    Source source = addSource(r'''
-void f() {}
-class A {
-  n() {
-    var a;
-    a = f();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
-    verify([source]);
-  }
-
-  void test_useOfVoidResult_assignmentExpression_method() {
-    Source source = addSource(r'''
-class A {
-  void m() {}
-  n() {
-    var a;
-    a = m();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
-    verify([source]);
-  }
-
-  void test_useOfVoidResult_inForLoop() {
-    Source source = addSource(r'''
-class A {
-  void m() {}
-  n() {
-    for(var a = m();;) {}
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
-    verify([source]);
-  }
-
-  void test_useOfVoidResult_variableDeclaration_function() {
-    Source source = addSource(r'''
-void f() {}
-class A {
-  n() {
-    var a = f();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
-    verify([source]);
-  }
-
-  void test_useOfVoidResult_variableDeclaration_method() {
-    Source source = addSource(r'''
-class A {
-  void m() {}
-  n() {
-    var a = m();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [HintCode.USE_OF_VOID_RESULT]);
-    verify([source]);
-  }
-
-  void test_useOfVoidResult_variableDeclaration_method2() {
-    Source source = addSource(r'''
-class A {
-  void m() {}
-  n() {
-    var a = m(), b = m();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [HintCode.USE_OF_VOID_RESULT, HintCode.USE_OF_VOID_RESULT]);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
-class InheritanceManagerTest {
-  /**
-   * The type provider used to access the types.
-   */
-  TestTypeProvider _typeProvider;
-
-  /**
-   * The library containing the code being resolved.
-   */
-  LibraryElementImpl _definingLibrary;
-
-  /**
-   * The inheritance manager being tested.
-   */
-  InheritanceManager _inheritanceManager;
-
-  /**
-   * The number of members that Object implements (as determined by [TestTypeProvider]).
-   */
-  int _numOfMembersInObject = 0;
-
-  void setUp() {
-    _typeProvider = new TestTypeProvider();
-    _inheritanceManager = _createInheritanceManager();
-    InterfaceType objectType = _typeProvider.objectType;
-    _numOfMembersInObject =
-        objectType.methods.length + objectType.accessors.length;
-  }
-
-  void test_getMapOfMembersInheritedFromClasses_accessor_extends() {
-    // class A { int get g; }
-    // class B extends A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(getterName), same(getterG));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromClasses_accessor_implements() {
-    // class A { int get g; }
-    // class B implements A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject);
-    expect(mapB.get(getterName), isNull);
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromClasses_accessor_with() {
-    // class A { int get g; }
-    // class B extends Object with A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(getterName), same(getterG));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromClasses_implicitExtends() {
-    // class A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    _assertNoErrors(classA);
-  }
-
-  void test_getMapOfMembersInheritedFromClasses_method_extends() {
-    // class A { int g(); }
-    // class B extends A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.supertype = classA.type;
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(methodName), same(methodM));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromClasses_method_implements() {
-    // class A { int g(); }
-    // class B implements A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject);
-    expect(mapB.get(methodName), isNull);
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromClasses_method_with() {
-    // class A { int g(); }
-    // class B extends Object with A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(methodName), same(methodM));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromClasses_method_with_two_mixins() {
-    // class A1 { int m(); }
-    // class A2 { int m(); }
-    // class B extends Object with A1, A2 {}
-    ClassElementImpl classA1 = ElementFactory.classElement2("A1");
-    String methodName = "m";
-    MethodElement methodA1M =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA1.methods = <MethodElement>[methodA1M];
-    ClassElementImpl classA2 = ElementFactory.classElement2("A2");
-    MethodElement methodA2M =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA2.methods = <MethodElement>[methodA2M];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA1.type, classA2.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromClasses(classB);
-    expect(mapB.get(methodName), same(methodA2M));
-    _assertNoErrors(classA1);
-    _assertNoErrors(classA2);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromInterfaces_accessor_extends() {
-    // class A { int get g; }
-    // class B extends A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(getterName), same(getterG));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromInterfaces_accessor_implements() {
-    // class A { int get g; }
-    // class B implements A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(getterName), same(getterG));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromInterfaces_accessor_with() {
-    // class A { int get g; }
-    // class B extends Object with A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(getterName), same(getterG));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromInterfaces_implicitExtends() {
-    // class A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    _assertNoErrors(classA);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_getter_method() {
-    // class I1 { int m(); }
-    // class I2 { int get m; }
-    // class A implements I2, I1 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classI1.methods = <MethodElement>[methodM];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    PropertyAccessorElement getter =
-        ElementFactory.getterElement(methodName, false, _typeProvider.intType);
-    classI2.accessors = <PropertyAccessorElement>[getter];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI2.type, classI1.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapA.get(methodName), isNull);
-    _assertErrors(classA,
-        [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_int_str() {
-    // class I1 { int m(); }
-    // class I2 { String m(); }
-    // class A implements I1, I2 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElement methodM1 =
-        ElementFactory.methodElement(methodName, null, [_typeProvider.intType]);
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    MethodElement methodM2 = ElementFactory
-        .methodElement(methodName, null, [_typeProvider.stringType]);
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapA.get(methodName), isNull);
-    _assertErrors(
-        classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_method_getter() {
-    // class I1 { int m(); }
-    // class I2 { int get m; }
-    // class A implements I1, I2 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classI1.methods = <MethodElement>[methodM];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    PropertyAccessorElement getter =
-        ElementFactory.getterElement(methodName, false, _typeProvider.intType);
-    classI2.accessors = <PropertyAccessorElement>[getter];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapA.get(methodName), isNull);
-    _assertErrors(classA,
-        [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_numOfRequiredParams() {
-    // class I1 { dynamic m(int, [int]); }
-    // class I2 { dynamic m(int, int, int); }
-    // class A implements I1, I2 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElementImpl methodM1 =
-        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
-    ParameterElementImpl parameter1 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a1"));
-    parameter1.type = _typeProvider.intType;
-    parameter1.parameterKind = ParameterKind.REQUIRED;
-    ParameterElementImpl parameter2 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a2"));
-    parameter2.type = _typeProvider.intType;
-    parameter2.parameterKind = ParameterKind.POSITIONAL;
-    methodM1.parameters = <ParameterElement>[parameter1, parameter2];
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    MethodElementImpl methodM2 =
-        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
-    ParameterElementImpl parameter3 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a3"));
-    parameter3.type = _typeProvider.intType;
-    parameter3.parameterKind = ParameterKind.REQUIRED;
-    ParameterElementImpl parameter4 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a4"));
-    parameter4.type = _typeProvider.intType;
-    parameter4.parameterKind = ParameterKind.REQUIRED;
-    ParameterElementImpl parameter5 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a5"));
-    parameter5.type = _typeProvider.intType;
-    parameter5.parameterKind = ParameterKind.REQUIRED;
-    methodM2.parameters = <ParameterElement>[
-      parameter3,
-      parameter4,
-      parameter5
-    ];
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapA.get(methodName), isNull);
-    _assertErrors(
-        classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_str_int() {
-    // class I1 { int m(); }
-    // class I2 { String m(); }
-    // class A implements I2, I1 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElement methodM1 = ElementFactory
-        .methodElement(methodName, null, [_typeProvider.stringType]);
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    MethodElement methodM2 =
-        ElementFactory.methodElement(methodName, null, [_typeProvider.intType]);
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI2.type, classI1.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapA.get(methodName), isNull);
-    _assertErrors(
-        classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
-  }
-
-  void test_getMapOfMembersInheritedFromInterfaces_method_extends() {
-    // class A { int g(); }
-    // class B extends A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(methodName), same(methodM));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromInterfaces_method_implements() {
-    // class A { int g(); }
-    // class B implements A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(methodName), same(methodM));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromInterfaces_method_with() {
-    // class A { int g(); }
-    // class B extends Object with A {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA.type];
-    MemberMap mapB =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classB);
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject);
-    expect(mapB.size, _numOfMembersInObject + 1);
-    expect(mapB.get(methodName), same(methodM));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_getMapOfMembersInheritedFromInterfaces_union_differentNames() {
-    // class I1 { int m1(); }
-    // class I2 { int m2(); }
-    // class A implements I1, I2 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName1 = "m1";
-    MethodElement methodM1 =
-        ElementFactory.methodElement(methodName1, _typeProvider.intType);
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    String methodName2 = "m2";
-    MethodElement methodM2 =
-        ElementFactory.methodElement(methodName2, _typeProvider.intType);
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject + 2);
-    expect(mapA.get(methodName1), same(methodM1));
-    expect(mapA.get(methodName2), same(methodM2));
-    _assertNoErrors(classA);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_getters() {
-    // class I1 { int get g; }
-    // class I2 { num get g; }
-    // class A implements I1, I2 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String accessorName = "g";
-    PropertyAccessorElement getter1 = ElementFactory.getterElement(
-        accessorName, false, _typeProvider.intType);
-    classI1.accessors = <PropertyAccessorElement>[getter1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    PropertyAccessorElement getter2 = ElementFactory.getterElement(
-        accessorName, false, _typeProvider.numType);
-    classI2.accessors = <PropertyAccessorElement>[getter2];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject + 1);
-    PropertyAccessorElement syntheticAccessor = ElementFactory.getterElement(
-        accessorName, false, _typeProvider.dynamicType);
-    expect(mapA.get(accessorName).type, syntheticAccessor.type);
-    _assertNoErrors(classA);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_methods() {
-    // class I1 { dynamic m(int); }
-    // class I2 { dynamic m(num); }
-    // class A implements I1, I2 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElementImpl methodM1 =
-        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
-    ParameterElementImpl parameter1 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
-    parameter1.type = _typeProvider.intType;
-    parameter1.parameterKind = ParameterKind.REQUIRED;
-    methodM1.parameters = <ParameterElement>[parameter1];
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    MethodElementImpl methodM2 =
-        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
-    ParameterElementImpl parameter2 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
-    parameter2.type = _typeProvider.numType;
-    parameter2.parameterKind = ParameterKind.REQUIRED;
-    methodM2.parameters = <ParameterElement>[parameter2];
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject + 1);
-    MethodElement syntheticMethod = ElementFactory.methodElement(
-        methodName, _typeProvider.dynamicType, [_typeProvider.dynamicType]);
-    expect(mapA.get(methodName).type, syntheticMethod.type);
-    _assertNoErrors(classA);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_setters() {
-    // class I1 { set s(int); }
-    // class I2 { set s(num); }
-    // class A implements I1, I2 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String accessorName = "s";
-    PropertyAccessorElement setter1 = ElementFactory.setterElement(
-        accessorName, false, _typeProvider.intType);
-    classI1.accessors = <PropertyAccessorElement>[setter1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    PropertyAccessorElement setter2 = ElementFactory.setterElement(
-        accessorName, false, _typeProvider.numType);
-    classI2.accessors = <PropertyAccessorElement>[setter2];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject + 1);
-    PropertyAccessorElementImpl syntheticAccessor = ElementFactory
-        .setterElement(accessorName, false, _typeProvider.dynamicType);
-    syntheticAccessor.returnType = _typeProvider.dynamicType;
-    expect(mapA.get("$accessorName=").type, syntheticAccessor.type);
-    _assertNoErrors(classA);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_getters() {
-    // class A {}
-    // class B extends A {}
-    // class C extends B {}
-    // class I1 { A get g; }
-    // class I2 { B get g; }
-    // class I3 { C get g; }
-    // class D implements I1, I2, I3 {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String accessorName = "g";
-    PropertyAccessorElement getter1 =
-        ElementFactory.getterElement(accessorName, false, classA.type);
-    classI1.accessors = <PropertyAccessorElement>[getter1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    PropertyAccessorElement getter2 =
-        ElementFactory.getterElement(accessorName, false, classB.type);
-    classI2.accessors = <PropertyAccessorElement>[getter2];
-    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
-    PropertyAccessorElement getter3 =
-        ElementFactory.getterElement(accessorName, false, classC.type);
-    classI3.accessors = <PropertyAccessorElement>[getter3];
-    ClassElementImpl classD = ElementFactory.classElement2("D");
-    classD.interfaces = <InterfaceType>[
-      classI1.type,
-      classI2.type,
-      classI3.type
-    ];
-    MemberMap mapD =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
-    expect(mapD.size, _numOfMembersInObject + 1);
-    PropertyAccessorElement syntheticAccessor = ElementFactory.getterElement(
-        accessorName, false, _typeProvider.dynamicType);
-    expect(mapD.get(accessorName).type, syntheticAccessor.type);
-    _assertNoErrors(classD);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_methods() {
-    // class A {}
-    // class B extends A {}
-    // class C extends B {}
-    // class I1 { dynamic m(A a); }
-    // class I2 { dynamic m(B b); }
-    // class I3 { dynamic m(C c); }
-    // class D implements I1, I2, I3 {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElementImpl methodM1 =
-        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
-    ParameterElementImpl parameter1 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
-    parameter1.type = classA.type;
-    parameter1.parameterKind = ParameterKind.REQUIRED;
-    methodM1.parameters = <ParameterElement>[parameter1];
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    MethodElementImpl methodM2 =
-        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
-    ParameterElementImpl parameter2 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
-    parameter2.type = classB.type;
-    parameter2.parameterKind = ParameterKind.REQUIRED;
-    methodM2.parameters = <ParameterElement>[parameter2];
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
-    MethodElementImpl methodM3 =
-        ElementFactory.methodElement(methodName, _typeProvider.dynamicType);
-    ParameterElementImpl parameter3 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a0"));
-    parameter3.type = classC.type;
-    parameter3.parameterKind = ParameterKind.REQUIRED;
-    methodM3.parameters = <ParameterElement>[parameter3];
-    classI3.methods = <MethodElement>[methodM3];
-    ClassElementImpl classD = ElementFactory.classElement2("D");
-    classD.interfaces = <InterfaceType>[
-      classI1.type,
-      classI2.type,
-      classI3.type
-    ];
-    MemberMap mapD =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
-    expect(mapD.size, _numOfMembersInObject + 1);
-    MethodElement syntheticMethod = ElementFactory.methodElement(
-        methodName, _typeProvider.dynamicType, [_typeProvider.dynamicType]);
-    expect(mapD.get(methodName).type, syntheticMethod.type);
-    _assertNoErrors(classD);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_setters() {
-    // class A {}
-    // class B extends A {}
-    // class C extends B {}
-    // class I1 { set s(A); }
-    // class I2 { set s(B); }
-    // class I3 { set s(C); }
-    // class D implements I1, I2, I3 {}
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String accessorName = "s";
-    PropertyAccessorElement setter1 =
-        ElementFactory.setterElement(accessorName, false, classA.type);
-    classI1.accessors = <PropertyAccessorElement>[setter1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    PropertyAccessorElement setter2 =
-        ElementFactory.setterElement(accessorName, false, classB.type);
-    classI2.accessors = <PropertyAccessorElement>[setter2];
-    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
-    PropertyAccessorElement setter3 =
-        ElementFactory.setterElement(accessorName, false, classC.type);
-    classI3.accessors = <PropertyAccessorElement>[setter3];
-    ClassElementImpl classD = ElementFactory.classElement2("D");
-    classD.interfaces = <InterfaceType>[
-      classI1.type,
-      classI2.type,
-      classI3.type
-    ];
-    MemberMap mapD =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
-    expect(mapD.size, _numOfMembersInObject + 1);
-    PropertyAccessorElementImpl syntheticAccessor = ElementFactory
-        .setterElement(accessorName, false, _typeProvider.dynamicType);
-    syntheticAccessor.returnType = _typeProvider.dynamicType;
-    expect(mapD.get("$accessorName=").type, syntheticAccessor.type);
-    _assertNoErrors(classD);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods() {
-    // class I1 { int m(); }
-    // class I2 { int m([int]); }
-    // class A implements I1, I2 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElement methodM1 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    MethodElementImpl methodM2 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    ParameterElementImpl parameter1 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a1"));
-    parameter1.type = _typeProvider.intType;
-    parameter1.parameterKind = ParameterKind.POSITIONAL;
-    methodM2.parameters = <ParameterElement>[parameter1];
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject + 1);
-    expect(mapA.get(methodName), same(methodM2));
-    _assertNoErrors(classA);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_3_methods() {
-    // class I1 { int m(); }
-    // class I2 { int m([int]); }
-    // class I3 { int m([int, int]); }
-    // class A implements I1, I2, I3 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElementImpl methodM1 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    MethodElementImpl methodM2 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    ParameterElementImpl parameter1 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a1"));
-    parameter1.type = _typeProvider.intType;
-    parameter1.parameterKind = ParameterKind.POSITIONAL;
-    methodM1.parameters = <ParameterElement>[parameter1];
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
-    MethodElementImpl methodM3 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    ParameterElementImpl parameter2 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a2"));
-    parameter2.type = _typeProvider.intType;
-    parameter2.parameterKind = ParameterKind.POSITIONAL;
-    ParameterElementImpl parameter3 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a3"));
-    parameter3.type = _typeProvider.intType;
-    parameter3.parameterKind = ParameterKind.POSITIONAL;
-    methodM3.parameters = <ParameterElement>[parameter2, parameter3];
-    classI3.methods = <MethodElement>[methodM3];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[
-      classI1.type,
-      classI2.type,
-      classI3.type
-    ];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject + 1);
-    expect(mapA.get(methodName), same(methodM3));
-    _assertNoErrors(classA);
-  }
-
-  void
-      test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_4_methods() {
-    // class I1 { int m(); }
-    // class I2 { int m(); }
-    // class I3 { int m([int]); }
-    // class I4 { int m([int, int]); }
-    // class A implements I1, I2, I3, I4 {}
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName = "m";
-    MethodElement methodM1 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    MethodElement methodM2 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classI2.methods = <MethodElement>[methodM2];
-    ClassElementImpl classI3 = ElementFactory.classElement2("I3");
-    MethodElementImpl methodM3 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    ParameterElementImpl parameter1 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a1"));
-    parameter1.type = _typeProvider.intType;
-    parameter1.parameterKind = ParameterKind.POSITIONAL;
-    methodM3.parameters = <ParameterElement>[parameter1];
-    classI3.methods = <MethodElement>[methodM3];
-    ClassElementImpl classI4 = ElementFactory.classElement2("I4");
-    MethodElementImpl methodM4 =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    ParameterElementImpl parameter2 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a2"));
-    parameter2.type = _typeProvider.intType;
-    parameter2.parameterKind = ParameterKind.POSITIONAL;
-    ParameterElementImpl parameter3 =
-        new ParameterElementImpl.forNode(AstFactory.identifier3("a3"));
-    parameter3.type = _typeProvider.intType;
-    parameter3.parameterKind = ParameterKind.POSITIONAL;
-    methodM4.parameters = <ParameterElement>[parameter2, parameter3];
-    classI4.methods = <MethodElement>[methodM4];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[
-      classI1.type,
-      classI2.type,
-      classI3.type,
-      classI4.type
-    ];
-    MemberMap mapA =
-        _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
-    expect(mapA.size, _numOfMembersInObject + 1);
-    expect(mapA.get(methodName), same(methodM4));
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupInheritance_interface_getter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classB, getterName),
-        same(getterG));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_interface_method() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classB, methodName),
-        same(methodM));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_interface_setter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String setterName = "s";
-    PropertyAccessorElement setterS =
-        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[setterS];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classB, "$setterName="),
-        same(setterS));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_interface_staticMember() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    (methodM as MethodElementImpl).static = true;
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classB, methodName), isNull);
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_interfaces_infiniteLoop() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classA, "name"), isNull);
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupInheritance_interfaces_infiniteLoop2() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classA.interfaces = <InterfaceType>[classB.type];
-    classB.interfaces = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classA, "name"), isNull);
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_interfaces_union2() {
-    ClassElementImpl classI1 = ElementFactory.classElement2("I1");
-    String methodName1 = "m1";
-    MethodElement methodM1 =
-        ElementFactory.methodElement(methodName1, _typeProvider.intType);
-    classI1.methods = <MethodElement>[methodM1];
-    ClassElementImpl classI2 = ElementFactory.classElement2("I2");
-    String methodName2 = "m2";
-    MethodElement methodM2 =
-        ElementFactory.methodElement(methodName2, _typeProvider.intType);
-    classI2.methods = <MethodElement>[methodM2];
-    classI2.interfaces = <InterfaceType>[classI1.type];
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.interfaces = <InterfaceType>[classI2.type];
-    expect(_inheritanceManager.lookupInheritance(classA, methodName1),
-        same(methodM1));
-    expect(_inheritanceManager.lookupInheritance(classA, methodName2),
-        same(methodM2));
-    _assertNoErrors(classI1);
-    _assertNoErrors(classI2);
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupInheritance_mixin_getter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classB, getterName),
-        same(getterG));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_mixin_method() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classB, methodName),
-        same(methodM));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_mixin_setter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String setterName = "s";
-    PropertyAccessorElement setterS =
-        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[setterS];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classB, "$setterName="),
-        same(setterS));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_mixin_staticMember() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    (methodM as MethodElementImpl).static = true;
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.mixins = <InterfaceType>[classA.type];
-    expect(_inheritanceManager.lookupInheritance(classB, methodName), isNull);
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_noMember() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    expect(_inheritanceManager.lookupInheritance(classA, "a"), isNull);
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupInheritance_superclass_getter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    expect(_inheritanceManager.lookupInheritance(classB, getterName),
-        same(getterG));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_superclass_infiniteLoop() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    classA.supertype = classA.type;
-    expect(_inheritanceManager.lookupInheritance(classA, "name"), isNull);
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupInheritance_superclass_infiniteLoop2() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classA.supertype = classB.type;
-    classB.supertype = classA.type;
-    expect(_inheritanceManager.lookupInheritance(classA, "name"), isNull);
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_superclass_method() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    expect(_inheritanceManager.lookupInheritance(classB, methodName),
-        same(methodM));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_superclass_setter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String setterName = "s";
-    PropertyAccessorElement setterS =
-        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[setterS];
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    expect(_inheritanceManager.lookupInheritance(classB, "$setterName="),
-        same(setterS));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupInheritance_superclass_staticMember() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    (methodM as MethodElementImpl).static = true;
-    classA.methods = <MethodElement>[methodM];
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    expect(_inheritanceManager.lookupInheritance(classB, methodName), isNull);
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupMember_getter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    expect(_inheritanceManager.lookupMember(classA, getterName), same(getterG));
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupMember_getter_static() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String getterName = "g";
-    PropertyAccessorElement getterG =
-        ElementFactory.getterElement(getterName, true, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[getterG];
-    expect(_inheritanceManager.lookupMember(classA, getterName), isNull);
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupMember_method() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    expect(_inheritanceManager.lookupMember(classA, methodName), same(methodM));
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupMember_method_static() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElement methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    (methodM as MethodElementImpl).static = true;
-    classA.methods = <MethodElement>[methodM];
-    expect(_inheritanceManager.lookupMember(classA, methodName), isNull);
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupMember_noMember() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    expect(_inheritanceManager.lookupMember(classA, "a"), isNull);
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupMember_setter() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String setterName = "s";
-    PropertyAccessorElement setterS =
-        ElementFactory.setterElement(setterName, false, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[setterS];
-    expect(_inheritanceManager.lookupMember(classA, "$setterName="),
-        same(setterS));
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupMember_setter_static() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String setterName = "s";
-    PropertyAccessorElement setterS =
-        ElementFactory.setterElement(setterName, true, _typeProvider.intType);
-    classA.accessors = <PropertyAccessorElement>[setterS];
-    expect(_inheritanceManager.lookupMember(classA, setterName), isNull);
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupOverrides_noParentClasses() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElementImpl methodM =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodM];
-    expect(
-        _inheritanceManager.lookupOverrides(classA, methodName), hasLength(0));
-    _assertNoErrors(classA);
-  }
-
-  void test_lookupOverrides_overrideBaseClass() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElementImpl methodMinA =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodMinA];
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    MethodElementImpl methodMinB =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classB.methods = <MethodElement>[methodMinB];
-    List<ExecutableElement> overrides =
-        _inheritanceManager.lookupOverrides(classB, methodName);
-    expect(overrides, unorderedEquals([methodMinA]));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupOverrides_overrideInterface() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElementImpl methodMinA =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodMinA];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    classB.interfaces = <InterfaceType>[classA.type];
-    MethodElementImpl methodMinB =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classB.methods = <MethodElement>[methodMinB];
-    List<ExecutableElement> overrides =
-        _inheritanceManager.lookupOverrides(classB, methodName);
-    expect(overrides, unorderedEquals([methodMinA]));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-  }
-
-  void test_lookupOverrides_overrideTwoInterfaces() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    MethodElementImpl methodMinA =
-        ElementFactory.methodElement(methodName, _typeProvider.intType);
-    classA.methods = <MethodElement>[methodMinA];
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    MethodElementImpl methodMinB =
-        ElementFactory.methodElement(methodName, _typeProvider.doubleType);
-    classB.methods = <MethodElement>[methodMinB];
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    classC.interfaces = <InterfaceType>[classA.type, classB.type];
-    MethodElementImpl methodMinC =
-        ElementFactory.methodElement(methodName, _typeProvider.numType);
-    classC.methods = <MethodElement>[methodMinC];
-    List<ExecutableElement> overrides =
-        _inheritanceManager.lookupOverrides(classC, methodName);
-    expect(overrides, unorderedEquals([methodMinA, methodMinB]));
-    _assertNoErrors(classA);
-    _assertNoErrors(classB);
-    _assertNoErrors(classC);
-  }
-
-  void _assertErrors(ClassElement classElt,
-      [List<ErrorCode> expectedErrorCodes = ErrorCode.EMPTY_LIST]) {
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    HashSet<AnalysisError> actualErrors =
-        _inheritanceManager.getErrors(classElt);
-    if (actualErrors != null) {
-      for (AnalysisError error in actualErrors) {
-        errorListener.onError(error);
-      }
-    }
-    errorListener.assertErrorsWithCodes(expectedErrorCodes);
-  }
-
-  void _assertNoErrors(ClassElement classElt) {
-    _assertErrors(classElt);
-  }
-
-  /**
-   * Create the inheritance manager used by the tests.
-   *
-   * @return the inheritance manager that was created
-   */
-  InheritanceManager _createInheritanceManager() {
-    AnalysisContext context = AnalysisContextFactory.contextWithCore();
-    FileBasedSource source =
-        new FileBasedSource(FileUtilities2.createFile("/test.dart"));
-    CompilationUnitElementImpl definingCompilationUnit =
-        new CompilationUnitElementImpl("test.dart");
-    definingCompilationUnit.librarySource =
-        definingCompilationUnit.source = source;
-    _definingLibrary = ElementFactory.library(context, "test");
-    _definingLibrary.definingCompilationUnit = definingCompilationUnit;
-    return new InheritanceManager(_definingLibrary);
+    expectIdentifierType('y = ', 'dynamic', 'List<dynamic>');
   }
 }
 
@@ -6788,1824 +582,6 @@
   }
 }
 
-@reflectiveTest
-class NonHintCodeTest extends ResolverTestCase {
-  void test_deadCode_deadBlock_conditionalElse_debugConst() {
-    Source source = addSource(r'''
-const bool DEBUG = true;
-f() {
-  DEBUG ? 1 : 2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_conditionalIf_debugConst() {
-    Source source = addSource(r'''
-const bool DEBUG = false;
-f() {
-  DEBUG ? 1 : 2;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_else() {
-    Source source = addSource(r'''
-const bool DEBUG = true;
-f() {
-  if(DEBUG) {} else {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_if_debugConst_prefixedIdentifier() {
-    Source source = addSource(r'''
-class A {
-  static const bool DEBUG = false;
-}
-f() {
-  if(A.DEBUG) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_if_debugConst_prefixedIdentifier2() {
-    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;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_if_debugConst_propertyAccessor() {
-    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;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_if_debugConst_simpleIdentifier() {
-    Source source = addSource(r'''
-const bool DEBUG = false;
-f() {
-  if(DEBUG) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadBlock_while_debugConst() {
-    Source source = addSource(r'''
-const bool DEBUG = false;
-f() {
-  while(DEBUG) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadCatch_onCatchSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-f() {
-  try {} on B catch (e) {} on A catch (e) {} catch (e) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadOperandLHS_and_debugConst() {
-    Source source = addSource(r'''
-const bool DEBUG = false;
-f() {
-  bool b = DEBUG && false;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deadCode_deadOperandLHS_or_debugConst() {
-    Source source = addSource(r'''
-const bool DEBUG = true;
-f() {
-  bool b = DEBUG || true;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_deprecatedAnnotationUse_classWithConstructor() {
-    Source source = addSource(r'''
-@deprecated
-class C {
-  C();
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_divisionOptimization() {
-    Source source = addSource(r'''
-f(int x, int y) {
-  var v = x / y.toInt();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_divisionOptimization_supressIfDivisionNotDefinedInCore() {
-    Source source = addSource(r'''
-f(x, y) {
-  var v = (x / y).toInt();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_divisionOptimization_supressIfDivisionOverridden() {
-    Source source = addSource(r'''
-class A {
-  num operator /(x) { return x; }
-}
-f(A x, A y) {
-  var v = (x / y).toInt();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_duplicateImport_as() {
-    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 {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_duplicateImport_hide() {
-    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 {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_duplicateImport_show() {
-    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 {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_importDeferredLibraryWithLoadFunction() {
-    resolveWithErrors(<String>[
-      r'''
-library lib1;
-f() {}''',
-      r'''
-library root;
-import 'lib1.dart' deferred as lib1;
-main() { lib1.f(); }'''
-    ], ErrorCode.EMPTY_LIST);
-  }
-
-  void test_issue20904BuggyTypePromotionAtIfJoin_1() {
-    // 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;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_issue20904BuggyTypePromotionAtIfJoin_3() {
-    // 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;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_issue20904BuggyTypePromotionAtIfJoin_4() {
-    // 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;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_missingReturn_emptyFunctionBody() {
-    Source source = addSource(r'''
-abstract class A {
-  int m();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_missingReturn_expressionFunctionBody() {
-    Source source = addSource("int f() => 0;");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_missingReturn_noReturnType() {
-    Source source = addSource("f() {}");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_missingReturn_voidReturnType() {
-    Source source = addSource("void f() {}");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_for_noCondition() {
-    Source source = addSource(r'''
-m(x) {
-  for (var v = x; ; v++) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_nullAwareInCondition_if_notTopLevel() {
-    Source source = addSource(r'''
-m(x) {
-  if (x?.y == null) {}
-}
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_overrideEqualsButNotHashCode() {
-    Source source = addSource(r'''
-class A {
-  bool operator ==(x) { return x; }
-  get hashCode => 0;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingGetter_inInterface() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-  int get m => 0;
-}
-class B implements A {
-  @override
-  int get m => 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingGetter_inSuperclass() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-  int get m => 0;
-}
-class B extends A {
-  @override
-  int get m => 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingMethod_inInterface() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-  int m() => 0;
-}
-class B implements A {
-  @override
-  int m() => 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingMethod_inSuperclass() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-  int m() => 0;
-}
-class B extends A {
-  @override
-  int m() => 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingSetter_inInterface() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-  set m(int x) {}
-}
-class B implements A {
-  @override
-  set m(int x) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_overrideOnNonOverridingSetter_inSuperclass() {
-    Source source = addSource(r'''
-library dart.core;
-const override = null;
-class A {
-  set m(int x) {}
-}
-class B extends A {
-  @override
-  set m(int x) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_propagatedFieldType() {
-    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());
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_proxy_annotation_prefixed() {
-    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;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_proxy_annotation_prefixed2() {
-    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;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_proxy_annotation_prefixed3() {
-    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 {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedGetter_inSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  get b => 0;
-}
-f(var a) {
-  if(a is A) {
-    return a.b;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedMethod_assignmentExpression_inSubtype() {
-    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;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedMethod_dynamic() {
-    Source source = addSource(r'''
-class D<T extends dynamic> {
-  fieldAccess(T t) => t.abc;
-  methodAccess(T t) => t.xyz(1, 2, 'three');
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedMethod_inSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  b() {}
-}
-f() {
-  var a = new A();
-  a.b();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedMethod_unionType_all() {
-    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();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedMethod_unionType_some() {
-    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);
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedOperator_binaryExpression_inSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  operator +(B b) {}
-}
-f(var a) {
-  if(a is A) {
-    a + 1;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedOperator_indexBoth_inSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  operator [](int index) {}
-}
-f(var a) {
-  if(a is A) {
-    a[0]++;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedOperator_indexGetter_inSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  operator [](int index) {}
-}
-f(var a) {
-  if(a is A) {
-    a[0];
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedOperator_indexSetter_inSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  operator []=(i, v) {}
-}
-f(var a) {
-  if(a is A) {
-    a[0] = 1;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedOperator_postfixExpression() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  operator +(B b) {return new B();}
-}
-f(var a) {
-  if(a is A) {
-    a++;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedOperator_prefixExpression() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  operator +(B b) {return new B();}
-}
-f(var a) {
-  if(a is A) {
-    ++a;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_undefinedSetter_inSubtype() {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  set b(x) {}
-}
-f(var a) {
-  if(a is A) {
-    a.b = 0;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_unnecessaryCast_13855_parameter_A() {
-    // dartbug.com/13855, dartbug.com/13732
-    Source source = addSource(r'''
-class A{
-  a() {}
-}
-class B<E> {
-  E e;
-  m() {
-    (e as A).a();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unnecessaryCast_conditionalExpression() {
-    Source source = addSource(r'''
-abstract class I {}
-class A implements I {}
-class B implements I {}
-I m(A a, B b) {
-  return a == null ? b as I : a as I;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unnecessaryCast_dynamic_type() {
-    Source source = addSource(r'''
-m(v) {
-  var b = v as Object;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unnecessaryCast_generics() {
-    // dartbug.com/18953
-    Source source = addSource(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) {});
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unnecessaryCast_type_dynamic() {
-    Source source = addSource(r'''
-m(v) {
-  var b = Object as dynamic;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unnecessaryNoSuchMethod_blockBody_notReturnStatement() {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(x) => super.noSuchMethod(x);
-}
-class B extends A {
-  mmm();
-  noSuchMethod(y) {
-    print(y);
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unnecessaryNoSuchMethod_blockBody_notSingleStatement() {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(x) => super.noSuchMethod(x);
-}
-class B extends A {
-  mmm();
-  noSuchMethod(y) {
-    print(y);
-    return super.noSuchMethod(y);
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unnecessaryNoSuchMethod_expressionBody_notNoSuchMethod() {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(x) => super.noSuchMethod(x);
-}
-class B extends A {
-  mmm();
-  noSuchMethod(y) => super.hashCode;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unnecessaryNoSuchMethod_expressionBody_notSuper() {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(x) => super.noSuchMethod(x);
-}
-class B extends A {
-  mmm();
-  noSuchMethod(y) => 42;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedImport_annotationOnDirective() {
-    Source source = addSource(r'''
-library L;
-@A()
-import 'lib1.dart';''');
-    Source source2 = addNamedSource(
-        "/lib1.dart",
-        r'''
-library lib1;
-class A {
-  const A() {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    verify([source, source2]);
-  }
-
-  void test_unusedImport_as_equalPrefixes() {
-    // 18818
-    Source source = addSource(r'''
-library L;
-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 {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source);
-    assertNoErrors(source2);
-    assertNoErrors(source3);
-    verify([source, source2, source3]);
-  }
-
-  void test_unusedImport_core_library() {
-    Source source = addSource(r'''
-library L;
-import 'dart:core';''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedImport_export() {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-Two two;''');
-    addNamedSource(
-        "/lib1.dart",
-        r'''
-library lib1;
-export 'lib2.dart';
-class One {}''');
-    addNamedSource(
-        "/lib2.dart",
-        r'''
-library lib2;
-class Two {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedImport_export2() {
-    Source source = addSource(r'''
-library L;
-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 {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedImport_export_infiniteLoop() {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-Two two;''');
-    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;
-export 'lib2.dart';
-class Three {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedImport_metadata() {
-    Source source = addSource(r'''
-library L;
-@A(x)
-import 'lib1.dart';
-class A {
-  final int value;
-  const A(this.value);
-}''');
-    addNamedSource(
-        "/lib1.dart",
-        r'''
-library lib1;
-const x = 0;''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_unusedImport_prefix_topLevelFunction() {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' hide topLevelFunction;
-import 'lib1.dart' as one show topLevelFunction;
-class A {
-  static void x() {
-    One o;
-    one.topLevelFunction();
-  }
-}''');
-    addNamedSource(
-        "/lib1.dart",
-        r'''
-library lib1;
-class One {}
-topLevelFunction() {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_useOfVoidResult_implicitReturnValue() {
-    Source source = addSource(r'''
-f() {}
-class A {
-  n() {
-    var a = f();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_useOfVoidResult_nonVoidReturnValue() {
-    Source source = addSource(r'''
-int f() => 1;
-g() {
-  var a = f();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-}
-
-class PubSuggestionCodeTest extends ResolverTestCase {
-  void test_import_package() {
-    Source source = addSource("import 'package:somepackage/other.dart';");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
-  }
-
-  void test_import_packageWithDotDot() {
-    Source source = addSource("import 'package:somepackage/../other.dart';");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
-      HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT
-    ]);
-  }
-
-  void test_import_packageWithLeadingDotDot() {
-    Source source = addSource("import 'package:../other.dart';");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
-      HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT
-    ]);
-  }
-
-  void test_import_referenceIntoLibDirectory() {
-    cacheSource("/myproj/pubspec.yaml", "");
-    cacheSource("/myproj/lib/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/web/test.dart", "import '../lib/other.dart';");
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE]);
-  }
-
-  void test_import_referenceIntoLibDirectory_no_pubspec() {
-    cacheSource("/myproj/lib/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/web/test.dart", "import '../lib/other.dart';");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_import_referenceOutOfLibDirectory() {
-    cacheSource("/myproj/pubspec.yaml", "");
-    cacheSource("/myproj/web/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/lib/test.dart", "import '../web/other.dart';");
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE]);
-  }
-
-  void test_import_referenceOutOfLibDirectory_no_pubspec() {
-    cacheSource("/myproj/web/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/lib/test.dart", "import '../web/other.dart';");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_import_valid_inside_lib1() {
-    cacheSource("/myproj/pubspec.yaml", "");
-    cacheSource("/myproj/lib/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/lib/test.dart", "import 'other.dart';");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_import_valid_inside_lib2() {
-    cacheSource("/myproj/pubspec.yaml", "");
-    cacheSource("/myproj/lib/bar/other.dart", "");
-    Source source = addNamedSource(
-        "/myproj/lib/foo/test.dart", "import '../bar/other.dart';");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_import_valid_outside_lib() {
-    cacheSource("/myproj/pubspec.yaml", "");
-    cacheSource("/myproj/web/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-}
-
-/**
- * An AST visitor used to verify that all of the nodes in an AST structure that
- * should have been resolved were resolved.
- */
-class ResolutionVerifier extends RecursiveAstVisitor<Object> {
-  /**
-   * A set containing nodes that are known to not be resolvable and should
-   * therefore not cause the test to fail.
-   */
-  final Set<AstNode> _knownExceptions;
-
-  /**
-   * A list containing all of the AST nodes that were not resolved.
-   */
-  List<AstNode> _unresolvedNodes = new List<AstNode>();
-
-  /**
-   * A list containing all of the AST nodes that were resolved to an element of
-   * the wrong type.
-   */
-  List<AstNode> _wrongTypedNodes = new List<AstNode>();
-
-  /**
-   * Initialize a newly created verifier to verify that all of the identifiers
-   * in the visited AST structures that are expected to have been resolved have
-   * an element associated with them. Nodes in the set of [_knownExceptions] are
-   * not expected to have been resolved, even if they normally would have been
-   * expected to have been resolved.
-   */
-  ResolutionVerifier([this._knownExceptions]);
-
-  /**
-   * Assert that all of the visited identifiers were resolved.
-   */
-  void assertResolved() {
-    if (!_unresolvedNodes.isEmpty || !_wrongTypedNodes.isEmpty) {
-      StringBuffer buffer = new StringBuffer();
-      if (!_unresolvedNodes.isEmpty) {
-        buffer.write("Failed to resolve ");
-        buffer.write(_unresolvedNodes.length);
-        buffer.writeln(" nodes:");
-        _printNodes(buffer, _unresolvedNodes);
-      }
-      if (!_wrongTypedNodes.isEmpty) {
-        buffer.write("Resolved ");
-        buffer.write(_wrongTypedNodes.length);
-        buffer.writeln(" to the wrong type of element:");
-        _printNodes(buffer, _wrongTypedNodes);
-      }
-      fail(buffer.toString());
-    }
-  }
-
-  @override
-  Object visitAnnotation(Annotation node) {
-    node.visitChildren(this);
-    ElementAnnotation elementAnnotation = node.elementAnnotation;
-    if (elementAnnotation == null) {
-      if (_knownExceptions == null || !_knownExceptions.contains(node)) {
-        _unresolvedNodes.add(node);
-      }
-    } else if (elementAnnotation is! ElementAnnotation) {
-      _wrongTypedNodes.add(node);
-    }
-    return null;
-  }
-
-  @override
-  Object visitBinaryExpression(BinaryExpression node) {
-    node.visitChildren(this);
-    if (!node.operator.isUserDefinableOperator) {
-      return null;
-    }
-    DartType operandType = node.leftOperand.staticType;
-    if (operandType == null || operandType.isDynamic) {
-      return null;
-    }
-    return _checkResolved(
-        node, node.staticElement, (node) => node is MethodElement);
-  }
-
-  @override
-  Object visitCommentReference(CommentReference node) => null;
-
-  @override
-  Object visitCompilationUnit(CompilationUnit node) {
-    node.visitChildren(this);
-    return _checkResolved(
-        node, node.element, (node) => node is CompilationUnitElement);
-  }
-
-  @override
-  Object visitExportDirective(ExportDirective node) =>
-      _checkResolved(node, node.element, (node) => node is ExportElement);
-
-  @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
-    node.visitChildren(this);
-    if (node.element is LibraryElement) {
-      _wrongTypedNodes.add(node);
-    }
-    return null;
-  }
-
-  @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
-    node.visitChildren(this);
-    // TODO(brianwilkerson) If we start resolving function expressions, then
-    // conditionally check to see whether the node was resolved correctly.
-    return null;
-    //checkResolved(node, node.getElement(), FunctionElement.class);
-  }
-
-  @override
-  Object visitImportDirective(ImportDirective node) {
-    // Not sure how to test the combinators given that it isn't an error if the
-    // names are not defined.
-    _checkResolved(node, node.element, (node) => node is ImportElement);
-    SimpleIdentifier prefix = node.prefix;
-    if (prefix == null) {
-      return null;
-    }
-    return _checkResolved(
-        prefix, prefix.staticElement, (node) => node is PrefixElement);
-  }
-
-  @override
-  Object visitIndexExpression(IndexExpression node) {
-    node.visitChildren(this);
-    DartType targetType = node.realTarget.staticType;
-    if (targetType == null || targetType.isDynamic) {
-      return null;
-    }
-    return _checkResolved(
-        node, node.staticElement, (node) => node is MethodElement);
-  }
-
-  @override
-  Object visitLibraryDirective(LibraryDirective node) =>
-      _checkResolved(node, node.element, (node) => node is LibraryElement);
-
-  @override
-  Object visitNamedExpression(NamedExpression node) =>
-      node.expression.accept(this);
-
-  @override
-  Object visitPartDirective(PartDirective node) => _checkResolved(
-      node, node.element, (node) => node is CompilationUnitElement);
-
-  @override
-  Object visitPartOfDirective(PartOfDirective node) =>
-      _checkResolved(node, node.element, (node) => node is LibraryElement);
-
-  @override
-  Object visitPostfixExpression(PostfixExpression node) {
-    node.visitChildren(this);
-    if (!node.operator.isUserDefinableOperator) {
-      return null;
-    }
-    DartType operandType = node.operand.staticType;
-    if (operandType == null || operandType.isDynamic) {
-      return null;
-    }
-    return _checkResolved(
-        node, node.staticElement, (node) => node is MethodElement);
-  }
-
-  @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
-    SimpleIdentifier prefix = node.prefix;
-    prefix.accept(this);
-    DartType prefixType = prefix.staticType;
-    if (prefixType == null || prefixType.isDynamic) {
-      return null;
-    }
-    return _checkResolved(node, node.staticElement, null);
-  }
-
-  @override
-  Object visitPrefixExpression(PrefixExpression node) {
-    node.visitChildren(this);
-    if (!node.operator.isUserDefinableOperator) {
-      return null;
-    }
-    DartType operandType = node.operand.staticType;
-    if (operandType == null || operandType.isDynamic) {
-      return null;
-    }
-    return _checkResolved(
-        node, node.staticElement, (node) => node is MethodElement);
-  }
-
-  @override
-  Object visitPropertyAccess(PropertyAccess node) {
-    Expression target = node.realTarget;
-    target.accept(this);
-    DartType targetType = target.staticType;
-    if (targetType == null || targetType.isDynamic) {
-      return null;
-    }
-    return node.propertyName.accept(this);
-  }
-
-  @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
-    if (node.name == "void") {
-      return null;
-    }
-    if (node.staticType != null &&
-        node.staticType.isDynamic &&
-        node.staticElement == null) {
-      return null;
-    }
-    AstNode parent = node.parent;
-    if (parent is MethodInvocation) {
-      MethodInvocation invocation = parent;
-      if (identical(invocation.methodName, node)) {
-        Expression target = invocation.realTarget;
-        DartType targetType = target == null ? null : target.staticType;
-        if (targetType == null || targetType.isDynamic) {
-          return null;
-        }
-      }
-    }
-    return _checkResolved(node, node.staticElement, null);
-  }
-
-  Object _checkResolved(
-      AstNode node, Element element, Predicate<Element> predicate) {
-    if (element == null) {
-      if (_knownExceptions == null || !_knownExceptions.contains(node)) {
-        _unresolvedNodes.add(node);
-      }
-    } else if (predicate != null) {
-      if (!predicate(element)) {
-        _wrongTypedNodes.add(node);
-      }
-    }
-    return null;
-  }
-
-  String _getFileName(AstNode node) {
-    // TODO (jwren) there are two copies of this method, one here and one in
-    // StaticTypeVerifier, they should be resolved into a single method
-    if (node != null) {
-      AstNode root = node.root;
-      if (root is CompilationUnit) {
-        CompilationUnit rootCU = root;
-        if (rootCU.element != null) {
-          return rootCU.element.source.fullName;
-        } else {
-          return "<unknown file- CompilationUnit.getElement() returned null>";
-        }
-      } else {
-        return "<unknown file- CompilationUnit.getRoot() is not a CompilationUnit>";
-      }
-    }
-    return "<unknown file- ASTNode is null>";
-  }
-
-  void _printNodes(StringBuffer buffer, List<AstNode> nodes) {
-    for (AstNode identifier in nodes) {
-      buffer.write("  ");
-      buffer.write(identifier.toString());
-      buffer.write(" (");
-      buffer.write(_getFileName(identifier));
-      buffer.write(" : ");
-      buffer.write(identifier.offset);
-      buffer.writeln(")");
-    }
-  }
-}
-
-class ResolverTestCase extends EngineTestCase {
-  /**
-   * 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].
-   */
-  bool enableUnusedElement = false;
-
-  /**
-   * Specifies if [assertErrors] should check for [HintCode.UNUSED_LOCAL_VARIABLE].
-   */
-  bool enableUnusedLocalVariable = false;
-
-  AnalysisContext get analysisContext => analysisContext2;
-
-  /**
-   * 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
-   */
-  TypeProvider get typeProvider => analysisContext2.typeProvider;
-
-  /**
-   * Return a type system that can be used to test the results of resolution.
-   *
-   * @return a type system
-   */
-  TypeSystem get typeSystem => analysisContext2.typeSystem;
-
-  /**
-   * Add a source file to the content provider. The file path should be absolute.
-   *
-   * @param filePath the path of the file being added
-   * @param contents the contents to be returned by the content provider for the specified file
-   * @return the source object representing the added file
-   */
-  Source addNamedSource(String filePath, String contents) {
-    Source source = cacheSource(filePath, contents);
-    ChangeSet changeSet = new ChangeSet();
-    changeSet.addedSource(source);
-    analysisContext2.applyChanges(changeSet);
-    return source;
-  }
-
-  /**
-   * Add a source file to the content provider.
-   *
-   * @param contents the contents to be returned by the content provider for the specified file
-   * @return the source object representing the added file
-   */
-  Source addSource(String contents) => addNamedSource("/test.dart", contents);
-
-  /**
-   * Assert that the number of errors reported against the given source matches the number of errors
-   * that are given and that they have the expected error codes. The order in which the errors were
-   * gathered is ignored.
-   *
-   * @param source the source against which the errors should have been reported
-   * @param expectedErrorCodes the error codes of the errors that should have been reported
-   * @throws AnalysisException if the reported errors could not be computed
-   * @throws AssertionFailedError if a different number of errors have been reported than were
-   *           expected
-   */
-  void assertErrors(Source source,
-      [List<ErrorCode> expectedErrorCodes = ErrorCode.EMPTY_LIST]) {
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    for (AnalysisError error in analysisContext2.computeErrors(source)) {
-      expect(error.source, source);
-      ErrorCode errorCode = error.errorCode;
-      if (!enableUnusedElement &&
-          (errorCode == HintCode.UNUSED_ELEMENT ||
-              errorCode == HintCode.UNUSED_FIELD)) {
-        continue;
-      }
-      if (!enableUnusedLocalVariable &&
-          (errorCode == HintCode.UNUSED_CATCH_CLAUSE ||
-              errorCode == HintCode.UNUSED_CATCH_STACK ||
-              errorCode == HintCode.UNUSED_LOCAL_VARIABLE)) {
-        continue;
-      }
-      errorListener.onError(error);
-    }
-    errorListener.assertErrorsWithCodes(expectedErrorCodes);
-  }
-
-  /**
-   * Assert that no errors have been reported against the given source.
-   *
-   * @param source the source against which no errors should have been reported
-   * @throws AnalysisException if the reported errors could not be computed
-   * @throws AssertionFailedError if any errors have been reported
-   */
-  void assertNoErrors(Source source) {
-    assertErrors(source);
-  }
-
-  /**
-   * Cache the source file content in the source factory but don't add the source to the analysis
-   * context. The file path should be absolute.
-   *
-   * @param filePath the path of the file being cached
-   * @param contents the contents to be returned by the content provider for the specified file
-   * @return the source object representing the cached file
-   */
-  Source cacheSource(String filePath, String contents) {
-    Source source = new FileBasedSource(FileUtilities2.createFile(filePath));
-    analysisContext2.setContents(source, contents);
-    return source;
-  }
-
-  /**
-   * 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);
-  }
-
-  /**
-   * Computes errors for the given [librarySource].
-   * This assumes that the given [librarySource] and its parts have already
-   * been added to the content provider using the method [addNamedSource].
-   */
-  void computeLibrarySourceErrors(Source librarySource) {
-    analysisContext.computeErrors(librarySource);
-  }
-
-  /**
-   * Create a library element that represents a library named `"test"` containing a single
-   * empty compilation unit.
-   *
-   * @return the library element that was created
-   */
-  LibraryElementImpl createDefaultTestLibrary() =>
-      createTestLibrary(AnalysisContextFactory.contextWithCore(), "test");
-
-  /**
-   * Create a library element that represents a library with the given name containing a single
-   * empty compilation unit.
-   *
-   * @param libraryName the name of the library to be created
-   * @return the library element that was created
-   */
-  LibraryElementImpl createTestLibrary(
-      AnalysisContext context, String libraryName,
-      [List<String> typeNames]) {
-    String fileName = "$libraryName.dart";
-    FileBasedSource definingCompilationUnitSource =
-        _createNamedSource(fileName);
-    List<CompilationUnitElement> sourcedCompilationUnits;
-    if (typeNames == null) {
-      sourcedCompilationUnits = CompilationUnitElement.EMPTY_LIST;
-    } else {
-      int count = typeNames.length;
-      sourcedCompilationUnits = new List<CompilationUnitElement>(count);
-      for (int i = 0; i < count; i++) {
-        String typeName = typeNames[i];
-        ClassElementImpl type =
-            new ClassElementImpl.forNode(AstFactory.identifier3(typeName));
-        String fileName = "$typeName.dart";
-        CompilationUnitElementImpl compilationUnit =
-            new CompilationUnitElementImpl(fileName);
-        compilationUnit.source = _createNamedSource(fileName);
-        compilationUnit.librarySource = definingCompilationUnitSource;
-        compilationUnit.types = <ClassElement>[type];
-        sourcedCompilationUnits[i] = compilationUnit;
-      }
-    }
-    CompilationUnitElementImpl compilationUnit =
-        new CompilationUnitElementImpl(fileName);
-    compilationUnit.librarySource =
-        compilationUnit.source = definingCompilationUnitSource;
-    LibraryElementImpl library = new LibraryElementImpl.forNode(
-        context, AstFactory.libraryIdentifier2([libraryName]));
-    library.definingCompilationUnit = compilationUnit;
-    library.parts = sourcedCompilationUnits;
-    return library;
-  }
-
-  Expression findTopLevelConstantExpression(
-          CompilationUnit compilationUnit, String name) =>
-      findTopLevelDeclaration(compilationUnit, name).initializer;
-
-  VariableDeclaration findTopLevelDeclaration(
-      CompilationUnit compilationUnit, String name) {
-    for (CompilationUnitMember member in compilationUnit.declarations) {
-      if (member is TopLevelVariableDeclaration) {
-        for (VariableDeclaration variable in member.variables.variables) {
-          if (variable.name.name == name) {
-            return variable;
-          }
-        }
-      }
-    }
-    return null;
-    // Not found
-  }
-
-  /**
-   * In the rare cases we want to group several tests into single "test_" method, so need a way to
-   * reset test instance to reuse it.
-   */
-  void reset() {
-    analysisContext2 = AnalysisContextFactory.contextWithCore();
-  }
-
-  /**
-   * Reset the analysis context to have the given options applied.
-   *
-   * @param options the analysis options to be applied to the context
-   */
-  void resetWithOptions(AnalysisOptions options) {
-    analysisContext2 =
-        AnalysisContextFactory.contextWithCoreAndOptions(options);
-  }
-
-  /**
-   * 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);
-
-  CompilationUnit resolveSource(String sourceText) =>
-      resolveSource2("/test.dart", sourceText);
-
-  CompilationUnit resolveSource2(String fileName, String sourceText) {
-    Source source = addNamedSource(fileName, sourceText);
-    LibraryElement library = analysisContext.computeLibraryElement(source);
-    return analysisContext.resolveCompilationUnit(source, library);
-  }
-
-  Source resolveSources(List<String> sourceTexts) {
-    for (int i = 0; i < sourceTexts.length; i++) {
-      CompilationUnit unit =
-          resolveSource2("/lib${i + 1}.dart", sourceTexts[i]);
-      // reference the source if this is the last source
-      if (i + 1 == sourceTexts.length) {
-        return unit.element.source;
-      }
-    }
-    return null;
-  }
-
-  void resolveWithAndWithoutExperimental(
-      List<String> strSources,
-      List<ErrorCode> codesWithoutExperimental,
-      List<ErrorCode> codesWithExperimental) {
-    // Setup analysis context as non-experimental
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-//    options.enableDeferredLoading = false;
-    resetWithOptions(options);
-    // Analysis and assertions
-    Source source = resolveSources(strSources);
-    assertErrors(source, codesWithoutExperimental);
-    verify([source]);
-    // Setup analysis context as experimental
-    reset();
-    // Analysis and assertions
-    source = resolveSources(strSources);
-    assertErrors(source, codesWithExperimental);
-    verify([source]);
-  }
-
-  void resolveWithErrors(List<String> strSources, List<ErrorCode> codes) {
-    // Analysis and assertions
-    Source source = resolveSources(strSources);
-    assertErrors(source, codes);
-    verify([source]);
-  }
-
-  @override
-  void setUp() {
-    ElementFactory.flushStaticState();
-    super.setUp();
-    reset();
-  }
-
-  @override
-  void tearDown() {
-    analysisContext2 = null;
-    super.tearDown();
-  }
-
-  /**
-   * Verify that all of the identifiers in the compilation units associated with
-   * the given [sources] have been resolved.
-   */
-  void verify(List<Source> sources) {
-    ResolutionVerifier verifier = new ResolutionVerifier();
-    for (Source source in sources) {
-      List<Source> libraries = analysisContext2.getLibrariesContaining(source);
-      for (Source library in libraries) {
-        analysisContext2
-            .resolveCompilationUnit2(source, library)
-            .accept(verifier);
-      }
-    }
-    verifier.assertResolved();
-  }
-
-  /**
-   * @param code the code that assigns the value to the variable "v", no matter how. We check that
-   *          "v" has expected static and propagated type.
-   */
-  void _assertPropagatedAssignedType(String code, DartType expectedStaticType,
-      DartType expectedPropagatedType) {
-    SimpleIdentifier identifier = _findMarkedIdentifier(code, "v = ");
-    expect(identifier.staticType, same(expectedStaticType));
-    expect(identifier.propagatedType, same(expectedPropagatedType));
-  }
-
-  /**
-   * @param code the code that iterates using variable "v". We check that
-   *          "v" has expected static and propagated type.
-   */
-  void _assertPropagatedIterationType(String code, DartType expectedStaticType,
-      DartType expectedPropagatedType) {
-    SimpleIdentifier identifier = _findMarkedIdentifier(code, "v in ");
-    expect(identifier.staticType, same(expectedStaticType));
-    expect(identifier.propagatedType, same(expectedPropagatedType));
-  }
-
-  /**
-   * Check the static and propagated types of the expression marked with "; // marker" comment.
-   *
-   * @param code source code to analyze, with the expression to check marked with "// marker".
-   * @param expectedStaticType if non-null, check actual static type is equal to this.
-   * @param expectedPropagatedType if non-null, check actual static type is equal to this.
-   * @throws Exception
-   */
-  void _assertTypeOfMarkedExpression(String code, DartType expectedStaticType,
-      DartType expectedPropagatedType) {
-    SimpleIdentifier identifier = _findMarkedIdentifier(code, "; // marker");
-    if (expectedStaticType != null) {
-      expect(identifier.staticType, expectedStaticType);
-    }
-    expect(identifier.propagatedType, expectedPropagatedType);
-  }
-
-  /**
-   * Create a source object representing a file with the given [fileName] and
-   * give it an empty content. Return the source that was created.
-   */
-  FileBasedSource _createNamedSource(String fileName) {
-    FileBasedSource source =
-        new FileBasedSource(FileUtilities2.createFile(fileName));
-    analysisContext2.setContents(source, "");
-    return source;
-  }
-
-  /**
-   * Return the `SimpleIdentifier` marked by `marker`. The source code must have no
-   * errors and be verifiable.
-   *
-   * @param code source code to analyze.
-   * @param marker marker identifying sought after expression in source code.
-   * @return expression marked by the marker.
-   * @throws Exception
-   */
-  SimpleIdentifier _findMarkedIdentifier(String code, String marker) {
-    try {
-      Source source = addSource(code);
-      LibraryElement library = resolve2(source);
-      assertNoErrors(source);
-      verify([source]);
-      CompilationUnit unit = resolveCompilationUnit(source, library);
-      // Could generalize this further by making [SimpleIdentifier.class] a
-      // parameter.
-      return EngineTestCase.findNode(
-          unit, code, marker, (node) => node is SimpleIdentifier);
-    } catch (exception) {
-      // Is there a better exception to throw here? The point is that an
-      // assertion failure here should be a failure, in both "test_*" and
-      // "fail_*" tests. However, an assertion failure is success for the
-      // purpose of "fail_*" tests, so without catching them here "fail_*" tests
-      // can succeed by failing for the wrong reason.
-      throw new JavaException("Unexexpected assertion failure: $exception");
-    }
-  }
-}
-
 class Scope_EnclosedScopeTest_test_define_duplicate extends Scope {
   GatheringErrorListener listener;
 
@@ -8692,3299 +668,12 @@
       localLookup(name, referencingLibrary);
 }
 
-@reflectiveTest
-class SimpleResolverTest extends ResolverTestCase {
-  void fail_getter_and_setter_fromMixins_property_access() {
-    // TODO(paulberry): it appears that auxiliaryElements isn't properly set on
-    // a SimpleIdentifier that's inside a property access.  This bug should be
-    // fixed.
-    Source source = addSource('''
-class B {}
-class M1 {
-  get x => null;
-  set x(value) {}
-}
-class M2 {
-  get x => null;
-  set x(value) {}
-}
-class C extends B with M1, M2 {}
-void main() {
-  new C().x += 1;
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that both the getter and setter for "x" in "new C().x" refer to
-    // the accessors defined in M2.
-    FunctionDeclaration main =
-        library.definingCompilationUnit.functions[0].computeNode();
-    BlockFunctionBody body = main.functionExpression.body;
-    ExpressionStatement stmt = body.block.statements[0];
-    AssignmentExpression assignment = stmt.expression;
-    PropertyAccess propertyAccess = assignment.leftHandSide;
-    expect(
-        propertyAccess.propertyName.staticElement.enclosingElement.name, 'M2');
-    expect(
-        propertyAccess
-            .propertyName.auxiliaryElements.staticElement.enclosingElement.name,
-        'M2');
-  }
-
-  void fail_staticInvocation() {
-    Source source = addSource(r'''
-class A {
-  static int get g => (a,b) => 0;
-}
-class B {
-  f() {
-    A.g(1,0);
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_argumentResolution_required_matching() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2, 3);
-  }
-  void g(a, b, c) {}
-}''');
-    _validateArgumentResolution(source, [0, 1, 2]);
-  }
-
-  void test_argumentResolution_required_tooFew() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2);
-  }
-  void g(a, b, c) {}
-}''');
-    _validateArgumentResolution(source, [0, 1]);
-  }
-
-  void test_argumentResolution_required_tooMany() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2, 3);
-  }
-  void g(a, b) {}
-}''');
-    _validateArgumentResolution(source, [0, 1, -1]);
-  }
-
-  void test_argumentResolution_requiredAndNamed_extra() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2, c: 3, d: 4);
-  }
-  void g(a, b, {c}) {}
-}''');
-    _validateArgumentResolution(source, [0, 1, 2, -1]);
-  }
-
-  void test_argumentResolution_requiredAndNamed_matching() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2, c: 3);
-  }
-  void g(a, b, {c}) {}
-}''');
-    _validateArgumentResolution(source, [0, 1, 2]);
-  }
-
-  void test_argumentResolution_requiredAndNamed_missing() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2, d: 3);
-  }
-  void g(a, b, {c, d}) {}
-}''');
-    _validateArgumentResolution(source, [0, 1, 3]);
-  }
-
-  void test_argumentResolution_requiredAndPositional_fewer() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2, 3);
-  }
-  void g(a, b, [c, d]) {}
-}''');
-    _validateArgumentResolution(source, [0, 1, 2]);
-  }
-
-  void test_argumentResolution_requiredAndPositional_matching() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2, 3, 4);
-  }
-  void g(a, b, [c, d]) {}
-}''');
-    _validateArgumentResolution(source, [0, 1, 2, 3]);
-  }
-
-  void test_argumentResolution_requiredAndPositional_more() {
-    Source source = addSource(r'''
-class A {
-  void f() {
-    g(1, 2, 3, 4);
-  }
-  void g(a, b, [c]) {}
-}''');
-    _validateArgumentResolution(source, [0, 1, 2, -1]);
-  }
-
-  void test_argumentResolution_setter_propagated() {
-    Source source = addSource(r'''
-main() {
-  var a = new A();
-  a.sss = 0;
-}
-class A {
-  set sss(x) {}
-}''');
-    LibraryElement library = resolve2(source);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    // find "a.sss = 0"
-    AssignmentExpression assignment;
-    {
-      FunctionElement mainElement = unit.functions[0];
-      FunctionBody mainBody = mainElement.computeNode().functionExpression.body;
-      Statement statement = (mainBody as BlockFunctionBody).block.statements[1];
-      ExpressionStatement expressionStatement =
-          statement as ExpressionStatement;
-      assignment = expressionStatement.expression as AssignmentExpression;
-    }
-    // get parameter
-    Expression rhs = assignment.rightHandSide;
-    expect(rhs.staticParameterElement, isNull);
-    ParameterElement parameter = rhs.propagatedParameterElement;
-    expect(parameter, isNotNull);
-    expect(parameter.displayName, "x");
-    // validate
-    ClassElement classA = unit.types[0];
-    PropertyAccessorElement setter = classA.accessors[0];
-    expect(setter.parameters[0], same(parameter));
-  }
-
-  void test_argumentResolution_setter_propagated_propertyAccess() {
-    Source source = addSource(r'''
-main() {
-  var a = new A();
-  a.b.sss = 0;
-}
-class A {
-  B b = new B();
-}
-class B {
-  set sss(x) {}
-}''');
-    LibraryElement library = resolve2(source);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    // find "a.b.sss = 0"
-    AssignmentExpression assignment;
-    {
-      FunctionElement mainElement = unit.functions[0];
-      FunctionBody mainBody = mainElement.computeNode().functionExpression.body;
-      Statement statement = (mainBody as BlockFunctionBody).block.statements[1];
-      ExpressionStatement expressionStatement =
-          statement as ExpressionStatement;
-      assignment = expressionStatement.expression as AssignmentExpression;
-    }
-    // get parameter
-    Expression rhs = assignment.rightHandSide;
-    expect(rhs.staticParameterElement, isNull);
-    ParameterElement parameter = rhs.propagatedParameterElement;
-    expect(parameter, isNotNull);
-    expect(parameter.displayName, "x");
-    // validate
-    ClassElement classB = unit.types[1];
-    PropertyAccessorElement setter = classB.accessors[0];
-    expect(setter.parameters[0], same(parameter));
-  }
-
-  void test_argumentResolution_setter_static() {
-    Source source = addSource(r'''
-main() {
-  A a = new A();
-  a.sss = 0;
-}
-class A {
-  set sss(x) {}
-}''');
-    LibraryElement library = resolve2(source);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    // find "a.sss = 0"
-    AssignmentExpression assignment;
-    {
-      FunctionElement mainElement = unit.functions[0];
-      FunctionBody mainBody = mainElement.computeNode().functionExpression.body;
-      Statement statement = (mainBody as BlockFunctionBody).block.statements[1];
-      ExpressionStatement expressionStatement =
-          statement as ExpressionStatement;
-      assignment = expressionStatement.expression as AssignmentExpression;
-    }
-    // get parameter
-    Expression rhs = assignment.rightHandSide;
-    ParameterElement parameter = rhs.staticParameterElement;
-    expect(parameter, isNotNull);
-    expect(parameter.displayName, "x");
-    // validate
-    ClassElement classA = unit.types[0];
-    PropertyAccessorElement setter = classA.accessors[0];
-    expect(setter.parameters[0], same(parameter));
-  }
-
-  void test_argumentResolution_setter_static_propertyAccess() {
-    Source source = addSource(r'''
-main() {
-  A a = new A();
-  a.b.sss = 0;
-}
-class A {
-  B b = new B();
-}
-class B {
-  set sss(x) {}
-}''');
-    LibraryElement library = resolve2(source);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    // find "a.b.sss = 0"
-    AssignmentExpression assignment;
-    {
-      FunctionElement mainElement = unit.functions[0];
-      FunctionBody mainBody = mainElement.computeNode().functionExpression.body;
-      Statement statement = (mainBody as BlockFunctionBody).block.statements[1];
-      ExpressionStatement expressionStatement =
-          statement as ExpressionStatement;
-      assignment = expressionStatement.expression as AssignmentExpression;
-    }
-    // get parameter
-    Expression rhs = assignment.rightHandSide;
-    ParameterElement parameter = rhs.staticParameterElement;
-    expect(parameter, isNotNull);
-    expect(parameter.displayName, "x");
-    // validate
-    ClassElement classB = unit.types[1];
-    PropertyAccessorElement setter = classB.accessors[0];
-    expect(setter.parameters[0], same(parameter));
-  }
-
-  void test_breakTarget_labeled() {
-    // Verify that the target of the label is correctly found and is recorded
-    // as the unlabeled portion of the statement.
-    String text = r'''
-void f() {
-  loop1: while (true) {
-    loop2: for (int i = 0; i < 10; i++) {
-      break loop1;
-      break loop2;
-    }
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    WhileStatement whileStatement = EngineTestCase.findNode(
-        unit, text, 'while (true)', (n) => n is WhileStatement);
-    ForStatement forStatement =
-        EngineTestCase.findNode(unit, text, 'for', (n) => n is ForStatement);
-    BreakStatement break1 = EngineTestCase.findNode(
-        unit, text, 'break loop1', (n) => n is BreakStatement);
-    BreakStatement break2 = EngineTestCase.findNode(
-        unit, text, 'break loop2', (n) => n is BreakStatement);
-    expect(break1.target, same(whileStatement));
-    expect(break2.target, same(forStatement));
-  }
-
-  void test_breakTarget_unlabeledBreakFromDo() {
-    String text = r'''
-void f() {
-  do {
-    break;
-  } while (true);
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    DoStatement doStatement =
-        EngineTestCase.findNode(unit, text, 'do', (n) => n is DoStatement);
-    BreakStatement breakStatement = EngineTestCase.findNode(
-        unit, text, 'break', (n) => n is BreakStatement);
-    expect(breakStatement.target, same(doStatement));
-  }
-
-  void test_breakTarget_unlabeledBreakFromFor() {
-    String text = r'''
-void f() {
-  for (int i = 0; i < 10; i++) {
-    break;
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    ForStatement forStatement =
-        EngineTestCase.findNode(unit, text, 'for', (n) => n is ForStatement);
-    BreakStatement breakStatement = EngineTestCase.findNode(
-        unit, text, 'break', (n) => n is BreakStatement);
-    expect(breakStatement.target, same(forStatement));
-  }
-
-  void test_breakTarget_unlabeledBreakFromForEach() {
-    String text = r'''
-void f() {
-  for (x in []) {
-    break;
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    ForEachStatement forStatement = EngineTestCase.findNode(
-        unit, text, 'for', (n) => n is ForEachStatement);
-    BreakStatement breakStatement = EngineTestCase.findNode(
-        unit, text, 'break', (n) => n is BreakStatement);
-    expect(breakStatement.target, same(forStatement));
-  }
-
-  void test_breakTarget_unlabeledBreakFromSwitch() {
-    String text = r'''
-void f() {
-  while (true) {
-    switch (0) {
-      case 0:
-        break;
-    }
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    SwitchStatement switchStatement = EngineTestCase.findNode(
-        unit, text, 'switch', (n) => n is SwitchStatement);
-    BreakStatement breakStatement = EngineTestCase.findNode(
-        unit, text, 'break', (n) => n is BreakStatement);
-    expect(breakStatement.target, same(switchStatement));
-  }
-
-  void test_breakTarget_unlabeledBreakFromWhile() {
-    String text = r'''
-void f() {
-  while (true) {
-    break;
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    WhileStatement whileStatement = EngineTestCase.findNode(
-        unit, text, 'while', (n) => n is WhileStatement);
-    BreakStatement breakStatement = EngineTestCase.findNode(
-        unit, text, 'break', (n) => n is BreakStatement);
-    expect(breakStatement.target, same(whileStatement));
-  }
-
-  void test_breakTarget_unlabeledBreakToOuterFunction() {
-    // Verify that unlabeled break statements can't resolve to loops in an
-    // outer function.
-    String text = r'''
-void f() {
-  while (true) {
-    void g() {
-      break;
-    }
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    BreakStatement breakStatement = EngineTestCase.findNode(
-        unit, text, 'break', (n) => n is BreakStatement);
-    expect(breakStatement.target, isNull);
-  }
-
-  void test_class_definesCall() {
-    Source source = addSource(r'''
-class A {
-  int call(int x) { return x; }
-}
-int f(A a) {
-  return a(0);
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_class_extends_implements() {
-    Source source = addSource(r'''
-class A extends B implements C {}
-class B {}
-class C {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_commentReference_class() {
-    Source source = addSource(r'''
-f() {}
-/** [A] [new A] [A.n] [new A.n] [m] [f] */
-class A {
-  A() {}
-  A.n() {}
-  m() {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_commentReference_parameter() {
-    Source source = addSource(r'''
-class A {
-  A() {}
-  A.n() {}
-  /** [e] [f] */
-  m(e, f()) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_commentReference_singleLine() {
-    Source source = addSource(r'''
-/// [A]
-class A {}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_continueTarget_labeled() {
-    // Verify that the target of the label is correctly found and is recorded
-    // as the unlabeled portion of the statement.
-    String text = r'''
-void f() {
-  loop1: while (true) {
-    loop2: for (int i = 0; i < 10; i++) {
-      continue loop1;
-      continue loop2;
-    }
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    WhileStatement whileStatement = EngineTestCase.findNode(
-        unit, text, 'while (true)', (n) => n is WhileStatement);
-    ForStatement forStatement =
-        EngineTestCase.findNode(unit, text, 'for', (n) => n is ForStatement);
-    ContinueStatement continue1 = EngineTestCase.findNode(
-        unit, text, 'continue loop1', (n) => n is ContinueStatement);
-    ContinueStatement continue2 = EngineTestCase.findNode(
-        unit, text, 'continue loop2', (n) => n is ContinueStatement);
-    expect(continue1.target, same(whileStatement));
-    expect(continue2.target, same(forStatement));
-  }
-
-  void test_continueTarget_unlabeledContinueFromDo() {
-    String text = r'''
-void f() {
-  do {
-    continue;
-  } while (true);
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    DoStatement doStatement =
-        EngineTestCase.findNode(unit, text, 'do', (n) => n is DoStatement);
-    ContinueStatement continueStatement = EngineTestCase.findNode(
-        unit, text, 'continue', (n) => n is ContinueStatement);
-    expect(continueStatement.target, same(doStatement));
-  }
-
-  void test_continueTarget_unlabeledContinueFromFor() {
-    String text = r'''
-void f() {
-  for (int i = 0; i < 10; i++) {
-    continue;
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    ForStatement forStatement =
-        EngineTestCase.findNode(unit, text, 'for', (n) => n is ForStatement);
-    ContinueStatement continueStatement = EngineTestCase.findNode(
-        unit, text, 'continue', (n) => n is ContinueStatement);
-    expect(continueStatement.target, same(forStatement));
-  }
-
-  void test_continueTarget_unlabeledContinueFromForEach() {
-    String text = r'''
-void f() {
-  for (x in []) {
-    continue;
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    ForEachStatement forStatement = EngineTestCase.findNode(
-        unit, text, 'for', (n) => n is ForEachStatement);
-    ContinueStatement continueStatement = EngineTestCase.findNode(
-        unit, text, 'continue', (n) => n is ContinueStatement);
-    expect(continueStatement.target, same(forStatement));
-  }
-
-  void test_continueTarget_unlabeledContinueFromWhile() {
-    String text = r'''
-void f() {
-  while (true) {
-    continue;
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    WhileStatement whileStatement = EngineTestCase.findNode(
-        unit, text, 'while', (n) => n is WhileStatement);
-    ContinueStatement continueStatement = EngineTestCase.findNode(
-        unit, text, 'continue', (n) => n is ContinueStatement);
-    expect(continueStatement.target, same(whileStatement));
-  }
-
-  void test_continueTarget_unlabeledContinueSkipsSwitch() {
-    String text = r'''
-void f() {
-  while (true) {
-    switch (0) {
-      case 0:
-        continue;
-    }
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    WhileStatement whileStatement = EngineTestCase.findNode(
-        unit, text, 'while', (n) => n is WhileStatement);
-    ContinueStatement continueStatement = EngineTestCase.findNode(
-        unit, text, 'continue', (n) => n is ContinueStatement);
-    expect(continueStatement.target, same(whileStatement));
-  }
-
-  void test_continueTarget_unlabeledContinueToOuterFunction() {
-    // Verify that unlabeled continue statements can't resolve to loops in an
-    // outer function.
-    String text = r'''
-void f() {
-  while (true) {
-    void g() {
-      continue;
-    }
-  }
-}
-''';
-    CompilationUnit unit = resolveSource(text);
-    ContinueStatement continueStatement = EngineTestCase.findNode(
-        unit, text, 'continue', (n) => n is ContinueStatement);
-    expect(continueStatement.target, isNull);
-  }
-
-  void test_empty() {
-    Source source = addSource("");
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_entryPoint_exported() {
-    addNamedSource(
-        "/two.dart",
-        r'''
-library two;
-main() {}''');
-    Source source = addNamedSource(
-        "/one.dart",
-        r'''
-library one;
-export 'two.dart';''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    FunctionElement main = library.entryPoint;
-    expect(main, isNotNull);
-    expect(main.library, isNot(same(library)));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_entryPoint_local() {
-    Source source = addNamedSource(
-        "/one.dart",
-        r'''
-library one;
-main() {}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    FunctionElement main = library.entryPoint;
-    expect(main, isNotNull);
-    expect(main.library, same(library));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_entryPoint_none() {
-    Source source = addNamedSource("/one.dart", "library one;");
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    expect(library.entryPoint, isNull);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_enum_externalLibrary() {
-    addNamedSource(
-        "/my_lib.dart",
-        r'''
-library my_lib;
-enum EEE {A, B, C}''');
-    Source source = addSource(r'''
-import 'my_lib.dart';
-main() {
-  EEE e = null;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_extractedMethodAsConstant() {
-    Source source = addSource(r'''
-abstract class Comparable<T> {
-  int compareTo(T other);
-  static int compare(Comparable a, Comparable b) => a.compareTo(b);
-}
-class A {
-  void sort([compare = Comparable.compare]) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_fieldFormalParameter() {
-    Source source = addSource(r'''
-class A {
-  int x;
-  A(this.x) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_forEachLoops_nonConflicting() {
-    Source source = addSource(r'''
-f() {
-  List list = [1,2,3];
-  for (int x in list) {}
-  for (int x in list) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_forLoops_nonConflicting() {
-    Source source = addSource(r'''
-f() {
-  for (int i = 0; i < 3; i++) {
-  }
-  for (int i = 0; i < 3; i++) {
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_functionTypeAlias() {
-    Source source = addSource(r'''
-typedef bool P(e);
-class A {
-  P p;
-  m(e) {
-    if (p(e)) {}
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_getter_and_setter_fromMixins_bare_identifier() {
-    Source source = addSource('''
-class B {}
-class M1 {
-  get x => null;
-  set x(value) {}
-}
-class M2 {
-  get x => null;
-  set x(value) {}
-}
-class C extends B with M1, M2 {
-  void f() {
-    x += 1;
-  }
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that both the getter and setter for "x" in C.f() refer to the
-    // accessors defined in M2.
-    ClassElement classC = library.definingCompilationUnit.types[3];
-    MethodDeclaration f = classC.getMethod('f').computeNode();
-    BlockFunctionBody body = f.body;
-    ExpressionStatement stmt = body.block.statements[0];
-    AssignmentExpression assignment = stmt.expression;
-    SimpleIdentifier leftHandSide = assignment.leftHandSide;
-    expect(leftHandSide.staticElement.enclosingElement.name, 'M2');
-    expect(leftHandSide.auxiliaryElements.staticElement.enclosingElement.name,
-        'M2');
-  }
-
-  void test_getter_fromMixins_bare_identifier() {
-    Source source = addSource('''
-class B {}
-class M1 {
-  get x => null;
-}
-class M2 {
-  get x => null;
-}
-class C extends B with M1, M2 {
-  f() {
-    return x;
-  }
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that the getter for "x" in C.f() refers to the getter defined in
-    // M2.
-    ClassElement classC = library.definingCompilationUnit.types[3];
-    MethodDeclaration f = classC.getMethod('f').computeNode();
-    BlockFunctionBody body = f.body;
-    ReturnStatement stmt = body.block.statements[0];
-    SimpleIdentifier x = stmt.expression;
-    expect(x.staticElement.enclosingElement.name, 'M2');
-  }
-
-  void test_getter_fromMixins_property_access() {
-    Source source = addSource('''
-class B {}
-class M1 {
-  get x => null;
-}
-class M2 {
-  get x => null;
-}
-class C extends B with M1, M2 {}
-void main() {
-  var y = new C().x;
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that the getter for "x" in "new C().x" refers to the getter
-    // defined in M2.
-    FunctionDeclaration main =
-        library.definingCompilationUnit.functions[0].computeNode();
-    BlockFunctionBody body = main.functionExpression.body;
-    VariableDeclarationStatement stmt = body.block.statements[0];
-    PropertyAccess propertyAccess = stmt.variables.variables[0].initializer;
-    expect(
-        propertyAccess.propertyName.staticElement.enclosingElement.name, 'M2');
-  }
-
-  void test_getterAndSetterWithDifferentTypes() {
-    Source source = addSource(r'''
-class A {
-  int get f => 0;
-  void set f(String s) {}
-}
-g (A a) {
-  a.f = a.f.toString();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]);
-    verify([source]);
-  }
-
-  void test_hasReferenceToSuper() {
-    Source source = addSource(r'''
-class A {}
-class B {toString() => super.toString();}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<ClassElement> classes = unit.types;
-    expect(classes, hasLength(2));
-    expect(classes[0].hasReferenceToSuper, isFalse);
-    expect(classes[1].hasReferenceToSuper, isTrue);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_import_hide() {
-    addNamedSource(
-        "/lib1.dart",
-        r'''
-library lib1;
-set foo(value) {}
-class A {}''');
-    addNamedSource(
-        "/lib2.dart",
-        r'''
-library lib2;
-set foo(value) {}''');
-    Source source = addNamedSource(
-        "/lib3.dart",
-        r'''
-import 'lib1.dart' hide foo;
-import 'lib2.dart';
-
-main() {
-  foo = 0;
-}
-A a;''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_import_prefix() {
-    addNamedSource(
-        "/two.dart",
-        r'''
-library two;
-f(int x) {
-  return x * x;
-}''');
-    Source source = addNamedSource(
-        "/one.dart",
-        r'''
-library one;
-import 'two.dart' as _two;
-main() {
-  _two.f(0);
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_import_spaceInUri() {
-    addNamedSource(
-        "/sub folder/lib.dart",
-        r'''
-library lib;
-foo() {}''');
-    Source source = addNamedSource(
-        "/app.dart",
-        r'''
-import 'sub folder/lib.dart';
-
-main() {
-  foo();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_indexExpression_typeParameters() {
-    Source source = addSource(r'''
-f() {
-  List<int> a;
-  a[0];
-  List<List<int>> b;
-  b[0][0];
-  List<List<List<int>>> c;
-  c[0][0][0];
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_indexExpression_typeParameters_invalidAssignmentWarning() {
-    Source source = addSource(r'''
-f() {
-  List<List<int>> b;
-  b[0][0] = 'hi';
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
-  }
-
-  void test_indirectOperatorThroughCall() {
-    Source source = addSource(r'''
-class A {
-  B call() { return new B(); }
-}
-
-class B {
-  int operator [](int i) { return i; }
-}
-
-A f = new A();
-
-g(int x) {}
-
-main() {
-  g(f()[0]);
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_invoke_dynamicThroughGetter() {
-    Source source = addSource(r'''
-class A {
-  List get X => [() => 0];
-  m(A a) {
-    X.last;
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_isValidMixin_badSuperclass() {
-    Source source = addSource(r'''
-class A extends B {}
-class B {}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isFalse);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
-  }
-
-  void test_isValidMixin_badSuperclass_withSuperMixins() {
-    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource(r'''
-class A extends B {}
-class B {}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isTrue);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_isValidMixin_constructor() {
-    Source source = addSource(r'''
-class A {
-  A() {}
-}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isFalse);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
-    verify([source]);
-  }
-
-  void test_isValidMixin_constructor_withSuperMixins() {
-    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource(r'''
-class A {
-  A() {}
-}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isFalse);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
-    verify([source]);
-  }
-
-  void test_isValidMixin_factoryConstructor() {
-    Source source = addSource(r'''
-class A {
-  factory A() => null;
-}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isTrue);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_isValidMixin_factoryConstructor_withSuperMixins() {
-    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource(r'''
-class A {
-  factory A() => null;
-}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isTrue);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_isValidMixin_super() {
-    Source source = addSource(r'''
-class A {
-  toString() {
-    return super.toString();
-  }
-}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isFalse);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
-    verify([source]);
-  }
-
-  void test_isValidMixin_super_withSuperMixins() {
-    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource(r'''
-class A {
-  toString() {
-    return super.toString();
-  }
-}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isTrue);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_isValidMixin_valid() {
-    Source source = addSource('''
-class A {}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isTrue);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_isValidMixin_valid_withSuperMixins() {
-    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource('''
-class A {}
-class C = Object with A;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    ClassElement a = unit.getType('A');
-    expect(a.isValidMixin, isTrue);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_labels_switch() {
-    Source source = addSource(r'''
-void doSwitch(int target) {
-  switch (target) {
-    l0: case 0:
-      continue l1;
-    l1: case 1:
-      continue l0;
-    default:
-      continue l1;
-  }
-}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_localVariable_types_invoked() {
-    Source source = addSource(r'''
-const A = null;
-main() {
-  var myVar = (int p) => 'foo';
-  myVar(42);
-}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnit unit =
-        analysisContext.resolveCompilationUnit(source, library);
-    expect(unit, isNotNull);
-    List<bool> found = [false];
-    List<CaughtException> thrownException = new List<CaughtException>(1);
-    unit.accept(new _SimpleResolverTest_localVariable_types_invoked(
-        this, found, thrownException));
-    if (thrownException[0] != null) {
-      throw new AnalysisException(
-          "Exception", new CaughtException(thrownException[0], null));
-    }
-    expect(found[0], isTrue);
-  }
-
-  void test_metadata_class() {
-    Source source = addSource(r'''
-const A = null;
-@A class C<A> {}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unitElement = library.definingCompilationUnit;
-    expect(unitElement, isNotNull);
-    List<ClassElement> classes = unitElement.types;
-    expect(classes, hasLength(1));
-    List<ElementAnnotation> annotations = classes[0].metadata;
-    expect(annotations, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = resolveCompilationUnit(source, library);
-    NodeList<CompilationUnitMember> declarations = unit.declarations;
-    expect(declarations, hasLength(2));
-    Element expectedElement = (declarations[0] as TopLevelVariableDeclaration)
-        .variables
-        .variables[0]
-        .name
-        .staticElement;
-    EngineTestCase.assertInstanceOf((obj) => obj is PropertyInducingElement,
-        PropertyInducingElement, expectedElement);
-    expectedElement = (expectedElement as PropertyInducingElement).getter;
-    Element actualElement =
-        (declarations[1] as ClassDeclaration).metadata[0].name.staticElement;
-    expect(actualElement, same(expectedElement));
-  }
-
-  void test_metadata_field() {
-    Source source = addSource(r'''
-const A = null;
-class C {
-  @A int f;
-}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<ClassElement> classes = unit.types;
-    expect(classes, hasLength(1));
-    FieldElement field = classes[0].fields[0];
-    List<ElementAnnotation> annotations = field.metadata;
-    expect(annotations, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_fieldFormalParameter() {
-    Source source = addSource(r'''
-const A = null;
-class C {
-  int f;
-  C(@A this.f);
-}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<ClassElement> classes = unit.types;
-    expect(classes, hasLength(1));
-    List<ConstructorElement> constructors = classes[0].constructors;
-    expect(constructors, hasLength(1));
-    List<ParameterElement> parameters = constructors[0].parameters;
-    expect(parameters, hasLength(1));
-    List<ElementAnnotation> annotations = parameters[0].metadata;
-    expect(annotations, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_function() {
-    Source source = addSource(r'''
-const A = null;
-@A f() {}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<FunctionElement> functions = unit.functions;
-    expect(functions, hasLength(1));
-    List<ElementAnnotation> annotations = functions[0].metadata;
-    expect(annotations, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_functionTypedParameter() {
-    Source source = addSource(r'''
-const A = null;
-f(@A int p(int x)) {}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<FunctionElement> functions = unit.functions;
-    expect(functions, hasLength(1));
-    List<ParameterElement> parameters = functions[0].parameters;
-    expect(parameters, hasLength(1));
-    List<ElementAnnotation> annotations1 = parameters[0].metadata;
-    expect(annotations1, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_libraryDirective() {
-    Source source = addSource(r'''
-@A library lib;
-const A = null;''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    List<ElementAnnotation> annotations = library.metadata;
-    expect(annotations, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_method() {
-    Source source = addSource(r'''
-const A = null;
-class C {
-  @A void m() {}
-}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<ClassElement> classes = unit.types;
-    expect(classes, hasLength(1));
-    MethodElement method = classes[0].methods[0];
-    List<ElementAnnotation> annotations = method.metadata;
-    expect(annotations, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_namedParameter() {
-    Source source = addSource(r'''
-const A = null;
-f({@A int p : 0}) {}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<FunctionElement> functions = unit.functions;
-    expect(functions, hasLength(1));
-    List<ParameterElement> parameters = functions[0].parameters;
-    expect(parameters, hasLength(1));
-    List<ElementAnnotation> annotations1 = parameters[0].metadata;
-    expect(annotations1, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_positionalParameter() {
-    Source source = addSource(r'''
-const A = null;
-f([@A int p = 0]) {}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<FunctionElement> functions = unit.functions;
-    expect(functions, hasLength(1));
-    List<ParameterElement> parameters = functions[0].parameters;
-    expect(parameters, hasLength(1));
-    List<ElementAnnotation> annotations1 = parameters[0].metadata;
-    expect(annotations1, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_simpleParameter() {
-    Source source = addSource(r'''
-const A = null;
-f(@A p1, @A int p2) {}''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unit = library.definingCompilationUnit;
-    expect(unit, isNotNull);
-    List<FunctionElement> functions = unit.functions;
-    expect(functions, hasLength(1));
-    List<ParameterElement> parameters = functions[0].parameters;
-    expect(parameters, hasLength(2));
-    List<ElementAnnotation> annotations1 = parameters[0].metadata;
-    expect(annotations1, hasLength(1));
-    List<ElementAnnotation> annotations2 = parameters[1].metadata;
-    expect(annotations2, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_metadata_typedef() {
-    Source source = addSource(r'''
-const A = null;
-@A typedef F<A>();''');
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    CompilationUnitElement unitElement = library.definingCompilationUnit;
-    expect(unitElement, isNotNull);
-    List<FunctionTypeAliasElement> aliases = unitElement.functionTypeAliases;
-    expect(aliases, hasLength(1));
-    List<ElementAnnotation> annotations = aliases[0].metadata;
-    expect(annotations, hasLength(1));
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = resolveCompilationUnit(source, library);
-    NodeList<CompilationUnitMember> declarations = unit.declarations;
-    expect(declarations, hasLength(2));
-    Element expectedElement = (declarations[0] as TopLevelVariableDeclaration)
-        .variables
-        .variables[0]
-        .name
-        .staticElement;
-    EngineTestCase.assertInstanceOf((obj) => obj is PropertyInducingElement,
-        PropertyInducingElement, expectedElement);
-    expectedElement = (expectedElement as PropertyInducingElement).getter;
-    Element actualElement =
-        (declarations[1] as FunctionTypeAlias).metadata[0].name.staticElement;
-    expect(actualElement, same(expectedElement));
-  }
-
-  void test_method_fromMixin() {
-    Source source = addSource(r'''
-class B {
-  bar() => 1;
-}
-class A {
-  foo() => 2;
-}
-
-class C extends B with A {
-  bar() => super.bar();
-  foo() => super.foo();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_method_fromMixins() {
-    Source source = addSource('''
-class B {}
-class M1 {
-  void f() {}
-}
-class M2 {
-  void f() {}
-}
-class C extends B with M1, M2 {}
-void main() {
-  new C().f();
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that the "f" in "new C().f()" refers to the "f" defined in M2.
-    FunctionDeclaration main =
-        library.definingCompilationUnit.functions[0].computeNode();
-    BlockFunctionBody body = main.functionExpression.body;
-    ExpressionStatement stmt = body.block.statements[0];
-    MethodInvocation expr = stmt.expression;
-    expect(expr.methodName.staticElement.enclosingElement.name, 'M2');
-  }
-
-  void test_method_fromMixins_bare_identifier() {
-    Source source = addSource('''
-class B {}
-class M1 {
-  void f() {}
-}
-class M2 {
-  void f() {}
-}
-class C extends B with M1, M2 {
-  void g() {
-    f();
-  }
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that the call to f() in C.g() refers to the method defined in M2.
-    ClassElement classC = library.definingCompilationUnit.types[3];
-    MethodDeclaration g = classC.getMethod('g').computeNode();
-    BlockFunctionBody body = g.body;
-    ExpressionStatement stmt = body.block.statements[0];
-    MethodInvocation invocation = stmt.expression;
-    SimpleIdentifier methodName = invocation.methodName;
-    expect(methodName.staticElement.enclosingElement.name, 'M2');
-  }
-
-  void test_method_fromMixins_invked_from_outside_class() {
-    Source source = addSource('''
-class B {}
-class M1 {
-  void f() {}
-}
-class M2 {
-  void f() {}
-}
-class C extends B with M1, M2 {}
-void main() {
-  new C().f();
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that the call to f() in "new C().f()" refers to the method
-    // defined in M2.
-    FunctionDeclaration main =
-        library.definingCompilationUnit.functions[0].computeNode();
-    BlockFunctionBody body = main.functionExpression.body;
-    ExpressionStatement stmt = body.block.statements[0];
-    MethodInvocation invocation = stmt.expression;
-    expect(invocation.methodName.staticElement.enclosingElement.name, 'M2');
-  }
-
-  void test_method_fromSuperclassMixin() {
-    Source source = addSource(r'''
-class A {
-  void m1() {}
-}
-class B extends Object with A {
-}
-class C extends B {
-}
-f(C c) {
-  c.m1();
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_methodCascades() {
-    Source source = addSource(r'''
-class A {
-  void m1() {}
-  void m2() {}
-  void m() {
-    A a = new A();
-    a..m1()
-     ..m2();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_methodCascades_withSetter() {
-    Source source = addSource(r'''
-class A {
-  String name;
-  void m1() {}
-  void m2() {}
-  void m() {
-    A a = new A();
-    a..m1()
-     ..name = 'name'
-     ..m2();
-  }
-}''');
-    computeLibrarySourceErrors(source);
-    // failing with error code: INVOCATION_OF_NON_FUNCTION
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_resolveAgainstNull() {
-    Source source = addSource(r'''
-f(var p) {
-  return null == p;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-  }
-
-  void test_setter_fromMixins_bare_identifier() {
-    Source source = addSource('''
-class B {}
-class M1 {
-  set x(value) {}
-}
-class M2 {
-  set x(value) {}
-}
-class C extends B with M1, M2 {
-  void f() {
-    x = 1;
-  }
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that the setter for "x" in C.f() refers to the setter defined in
-    // M2.
-    ClassElement classC = library.definingCompilationUnit.types[3];
-    MethodDeclaration f = classC.getMethod('f').computeNode();
-    BlockFunctionBody body = f.body;
-    ExpressionStatement stmt = body.block.statements[0];
-    AssignmentExpression assignment = stmt.expression;
-    SimpleIdentifier leftHandSide = assignment.leftHandSide;
-    expect(leftHandSide.staticElement.enclosingElement.name, 'M2');
-  }
-
-  void test_setter_fromMixins_property_access() {
-    Source source = addSource('''
-class B {}
-class M1 {
-  set x(value) {}
-}
-class M2 {
-  set x(value) {}
-}
-class C extends B with M1, M2 {}
-void main() {
-  new C().x = 1;
-}
-''');
-    LibraryElement library = resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-    // Verify that the setter for "x" in "new C().x" refers to the setter
-    // defined in M2.
-    FunctionDeclaration main =
-        library.definingCompilationUnit.functions[0].computeNode();
-    BlockFunctionBody body = main.functionExpression.body;
-    ExpressionStatement stmt = body.block.statements[0];
-    AssignmentExpression assignment = stmt.expression;
-    PropertyAccess propertyAccess = assignment.leftHandSide;
-    expect(
-        propertyAccess.propertyName.staticElement.enclosingElement.name, 'M2');
-  }
-
-  void test_setter_inherited() {
-    Source source = addSource(r'''
-class A {
-  int get x => 0;
-  set x(int p) {}
-}
-class B extends A {
-  int get x => super.x == null ? 0 : super.x;
-  int f() => x = 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_setter_static() {
-    Source source = addSource(r'''
-set s(x) {
-}
-
-main() {
-  s = 123;
-}''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  /**
-   * Resolve the given source and verify that the arguments in a specific method invocation were
-   * correctly resolved.
-   *
-   * The source is expected to be source for a compilation unit, the first declaration is expected
-   * to be a class, the first member of which is expected to be a method with a block body, and the
-   * first statement in the body is expected to be an expression statement whose expression is a
-   * method invocation. It is the arguments to that method invocation that are tested. The method
-   * invocation can contain errors.
-   *
-   * The arguments were resolved correctly if the number of expressions in the list matches the
-   * length of the array of indices and if, for each index in the array of indices, the parameter to
-   * which the argument expression was resolved is the parameter in the invoked method's list of
-   * parameters at that index. Arguments that should not be resolved to a parameter because of an
-   * error can be denoted by including a negative index in the array of indices.
-   *
-   * @param source the source to be resolved
-   * @param indices the array of indices used to associate arguments with parameters
-   * @throws Exception if the source could not be resolved or if the structure of the source is not
-   *           valid
-   */
-  void _validateArgumentResolution(Source source, List<int> indices) {
-    LibraryElement library = resolve2(source);
-    expect(library, isNotNull);
-    ClassElement classElement = library.definingCompilationUnit.types[0];
-    List<ParameterElement> parameters = classElement.methods[1].parameters;
-    CompilationUnit unit = resolveCompilationUnit(source, library);
-    expect(unit, isNotNull);
-    ClassDeclaration classDeclaration =
-        unit.declarations[0] as ClassDeclaration;
-    MethodDeclaration methodDeclaration =
-        classDeclaration.members[0] as MethodDeclaration;
-    Block block = (methodDeclaration.body as BlockFunctionBody).block;
-    ExpressionStatement statement = block.statements[0] as ExpressionStatement;
-    MethodInvocation invocation = statement.expression as MethodInvocation;
-    NodeList<Expression> arguments = invocation.argumentList.arguments;
-    int argumentCount = arguments.length;
-    expect(argumentCount, indices.length);
-    for (int i = 0; i < argumentCount; i++) {
-      Expression argument = arguments[i];
-      ParameterElement element = argument.staticParameterElement;
-      int index = indices[i];
-      if (index < 0) {
-        expect(element, isNull);
-      } else {
-        expect(element, same(parameters[index]));
-      }
-    }
-  }
-}
-
 class SourceContainer_ChangeSetTest_test_toString implements SourceContainer {
   @override
   bool contains(Source source) => false;
 }
 
 /**
- * Like [StaticTypeAnalyzerTest], but as end-to-end tests.
- */
-@reflectiveTest
-class StaticTypeAnalyzer2Test extends _StaticTypeAnalyzer2TestShared {
-  void test_FunctionExpressionInvocation_block() {
-    String code = r'''
-main() {
-  var foo = (() { return 1; })();
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'dynamic', isNull);
-  }
-
-  void test_FunctionExpressionInvocation_curried() {
-    String code = r'''
-typedef int F();
-F f() => null;
-main() {
-  var foo = f()();
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'int', isNull);
-  }
-
-  void test_FunctionExpressionInvocation_expression() {
-    String code = r'''
-main() {
-  var foo = (() => 1)();
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'int', isNull);
-  }
-
-  void test_MethodInvocation_nameType_localVariable() {
-    String code = r"""
-typedef Foo();
-main() {
-  Foo foo;
-  foo();
-}
-""";
-    _resolveTestUnit(code);
-    // "foo" should be resolved to the "Foo" type
-    _expectIdentifierType("foo();", new isInstanceOf<FunctionType>());
-  }
-
-  void test_MethodInvocation_nameType_parameter_FunctionTypeAlias() {
-    String code = r"""
-typedef Foo();
-main(Foo foo) {
-  foo();
-}
-""";
-    _resolveTestUnit(code);
-    // "foo" should be resolved to the "Foo" type
-    _expectIdentifierType("foo();", new isInstanceOf<FunctionType>());
-  }
-
-  void test_MethodInvocation_nameType_parameter_propagatedType() {
-    String code = r"""
-typedef Foo();
-main(p) {
-  if (p is Foo) {
-    p();
-  }
-}
-""";
-    _resolveTestUnit(code);
-    _expectIdentifierType("p()", DynamicTypeImpl.instance,
-        predicate((type) => type.name == 'Foo'));
-  }
-
-  void test_staticMethods_classTypeParameters() {
-    String code = r'''
-class C<T> {
-  static void m() => null;
-}
-main() {
-  print(C.m);
-}
-''';
-    _resolveTestUnit(code);
-    _expectFunctionType('m);', '() → void');
-  }
-
-  void test_staticMethods_classTypeParameters_genericMethod() {
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    options.enableGenericMethods = true;
-    resetWithOptions(options);
-    String code = r'''
-class C<T> {
-  static void m<S>(S s) {
-    void f<U>(S s, U u) {}
-    print(f);
-  }
-}
-main() {
-  print(C.m);
-}
-''';
-    _resolveTestUnit(code);
-    // C - m
-    TypeParameterType typeS;
-    {
-      _expectFunctionType('m);', '<S>(S) → void',
-          elementTypeParams: '[S]', typeFormals: '[S]');
-
-      FunctionTypeImpl type = _findIdentifier('m);').staticType;
-      typeS = type.typeFormals[0].type;
-      type = type.instantiate([DynamicTypeImpl.instance]);
-      expect(type.toString(), '(dynamic) → void');
-      expect(type.typeParameters.toString(), '[S]');
-      expect(type.typeArguments, [DynamicTypeImpl.instance]);
-      expect(type.typeFormals, isEmpty);
-    }
-    // C - m - f
-    {
-      _expectFunctionType('f);', '<U>(S, U) → void',
-          elementTypeParams: '[U]',
-          typeParams: '[S]',
-          typeArgs: '[S]',
-          typeFormals: '[U]');
-
-      FunctionTypeImpl type = _findIdentifier('f);').staticType;
-      type = type.instantiate([DynamicTypeImpl.instance]);
-      expect(type.toString(), '(S, dynamic) → void');
-      expect(type.typeParameters.toString(), '[S, U]');
-      expect(type.typeArguments, [typeS, DynamicTypeImpl.instance]);
-      expect(type.typeFormals, isEmpty);
-    }
-  }
-}
-
-@reflectiveTest
-class StaticTypeAnalyzerTest extends EngineTestCase {
-  /**
-   * The error listener to which errors will be reported.
-   */
-  GatheringErrorListener _listener;
-
-  /**
-   * The resolver visitor used to create the analyzer.
-   */
-  ResolverVisitor _visitor;
-
-  /**
-   * The analyzer being used to analyze the test cases.
-   */
-  StaticTypeAnalyzer _analyzer;
-
-  /**
-   * The type provider used to access the types.
-   */
-  TestTypeProvider _typeProvider;
-
-  /**
-   * The type system used to analyze the test cases.
-   */
-  TypeSystem get _typeSystem => _visitor.typeSystem;
-
-  void fail_visitFunctionExpressionInvocation() {
-    fail("Not yet tested");
-    _listener.assertNoErrors();
-  }
-
-  void fail_visitMethodInvocation() {
-    fail("Not yet tested");
-    _listener.assertNoErrors();
-  }
-
-  void fail_visitSimpleIdentifier() {
-    fail("Not yet tested");
-    _listener.assertNoErrors();
-  }
-
-  @override
-  void setUp() {
-    super.setUp();
-    _listener = new GatheringErrorListener();
-    _analyzer = _createAnalyzer();
-  }
-
-  void test_flatten_derived() {
-    // class Derived<T> extends Future<T> { ... }
-    ClassElementImpl derivedClass =
-        ElementFactory.classElement2('Derived', ['T']);
-    derivedClass.supertype = _typeProvider.futureType
-        .substitute4([derivedClass.typeParameters[0].type]);
-    InterfaceType intType = _typeProvider.intType;
-    DartType dynamicType = _typeProvider.dynamicType;
-    InterfaceType derivedIntType = derivedClass.type.substitute4([intType]);
-    // flatten(Derived) = dynamic
-    InterfaceType derivedDynamicType =
-        derivedClass.type.substitute4([dynamicType]);
-    expect(_flatten(derivedDynamicType), dynamicType);
-    // flatten(Derived<int>) = int
-    expect(_flatten(derivedIntType), intType);
-    // flatten(Derived<Derived>) = Derived
-    expect(_flatten(derivedClass.type.substitute4([derivedDynamicType])),
-        derivedDynamicType);
-    // flatten(Derived<Derived<int>>) = Derived<int>
-    expect(_flatten(derivedClass.type.substitute4([derivedIntType])),
-        derivedIntType);
-  }
-
-  void test_flatten_inhibit_recursion() {
-    // class A extends B
-    // class B extends A
-    ClassElementImpl classA = ElementFactory.classElement2('A', []);
-    ClassElementImpl classB = ElementFactory.classElement2('B', []);
-    classA.supertype = classB.type;
-    classB.supertype = classA.type;
-    // flatten(A) = A and flatten(B) = B, since neither class contains Future
-    // in its class hierarchy.  Even though there is a loop in the class
-    // hierarchy, flatten() should terminate.
-    expect(_flatten(classA.type), classA.type);
-    expect(_flatten(classB.type), classB.type);
-  }
-
-  void test_flatten_related_derived_types() {
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType numType = _typeProvider.numType;
-    // class Derived<T> extends Future<T>
-    ClassElementImpl derivedClass =
-        ElementFactory.classElement2('Derived', ['T']);
-    derivedClass.supertype = _typeProvider.futureType
-        .substitute4([derivedClass.typeParameters[0].type]);
-    InterfaceType derivedType = derivedClass.type;
-    // class A extends Derived<int> implements Derived<num> { ... }
-    ClassElementImpl classA =
-        ElementFactory.classElement('A', derivedType.substitute4([intType]));
-    classA.interfaces = <InterfaceType>[
-      derivedType.substitute4([numType])
-    ];
-    // class B extends Future<num> implements Future<int> { ... }
-    ClassElementImpl classB =
-        ElementFactory.classElement('B', derivedType.substitute4([numType]));
-    classB.interfaces = <InterfaceType>[
-      derivedType.substitute4([intType])
-    ];
-    // flatten(A) = flatten(B) = int, since int is more specific than num.
-    // The code in flatten() that inhibits infinite recursion shouldn't be
-    // fooled by the fact that Derived appears twice in the type hierarchy.
-    expect(_flatten(classA.type), intType);
-    expect(_flatten(classB.type), intType);
-  }
-
-  void test_flatten_related_types() {
-    InterfaceType futureType = _typeProvider.futureType;
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType numType = _typeProvider.numType;
-    // class A extends Future<int> implements Future<num> { ... }
-    ClassElementImpl classA =
-        ElementFactory.classElement('A', futureType.substitute4([intType]));
-    classA.interfaces = <InterfaceType>[
-      futureType.substitute4([numType])
-    ];
-    // class B extends Future<num> implements Future<int> { ... }
-    ClassElementImpl classB =
-        ElementFactory.classElement('B', futureType.substitute4([numType]));
-    classB.interfaces = <InterfaceType>[
-      futureType.substitute4([intType])
-    ];
-    // flatten(A) = flatten(B) = int, since int is more specific than num.
-    expect(_flatten(classA.type), intType);
-    expect(_flatten(classB.type), intType);
-  }
-
-  void test_flatten_simple() {
-    InterfaceType intType = _typeProvider.intType;
-    DartType dynamicType = _typeProvider.dynamicType;
-    InterfaceType futureDynamicType = _typeProvider.futureDynamicType;
-    InterfaceType futureIntType =
-        _typeProvider.futureType.substitute4([intType]);
-    InterfaceType futureFutureDynamicType =
-        _typeProvider.futureType.substitute4([futureDynamicType]);
-    InterfaceType futureFutureIntType =
-        _typeProvider.futureType.substitute4([futureIntType]);
-    // flatten(int) = int
-    expect(_flatten(intType), intType);
-    // flatten(dynamic) = dynamic
-    expect(_flatten(dynamicType), dynamicType);
-    // flatten(Future) = dynamic
-    expect(_flatten(futureDynamicType), dynamicType);
-    // flatten(Future<int>) = int
-    expect(_flatten(futureIntType), intType);
-    // flatten(Future<Future>) = dynamic
-    expect(_flatten(futureFutureDynamicType), dynamicType);
-    // flatten(Future<Future<int>>) = int
-    expect(_flatten(futureFutureIntType), intType);
-  }
-
-  void test_flatten_unrelated_types() {
-    InterfaceType futureType = _typeProvider.futureType;
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType stringType = _typeProvider.stringType;
-    // class A extends Future<int> implements Future<String> { ... }
-    ClassElementImpl classA =
-        ElementFactory.classElement('A', futureType.substitute4([intType]));
-    classA.interfaces = <InterfaceType>[
-      futureType.substitute4([stringType])
-    ];
-    // class B extends Future<String> implements Future<int> { ... }
-    ClassElementImpl classB =
-        ElementFactory.classElement('B', futureType.substitute4([stringType]));
-    classB.interfaces = <InterfaceType>[
-      futureType.substitute4([intType])
-    ];
-    // flatten(A) = A and flatten(B) = B, since neither string nor int is more
-    // specific than the other.
-    expect(_flatten(classA.type), classA.type);
-    expect(_flatten(classB.type), classB.type);
-  }
-
-  void test_visitAdjacentStrings() {
-    // "a" "b"
-    Expression node = AstFactory
-        .adjacentStrings([_resolvedString("a"), _resolvedString("b")]);
-    expect(_analyze(node), same(_typeProvider.stringType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAsExpression() {
-    // class A { ... this as B ... }
-    // class B extends A {}
-    ClassElement superclass = ElementFactory.classElement2("A");
-    InterfaceType superclassType = superclass.type;
-    ClassElement subclass = ElementFactory.classElement("B", superclassType);
-    Expression node = AstFactory.asExpression(
-        AstFactory.thisExpression(), AstFactory.typeName(subclass));
-    expect(_analyze3(node, superclassType), same(subclass.type));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAssignmentExpression_compound() {
-    // i += 1
-    InterfaceType numType = _typeProvider.numType;
-    SimpleIdentifier identifier = _resolvedVariable(_typeProvider.intType, "i");
-    AssignmentExpression node = AstFactory.assignmentExpression(
-        identifier, TokenType.PLUS_EQ, _resolvedInteger(1));
-    MethodElement plusMethod = getMethod(numType, "+");
-    node.staticElement = plusMethod;
-    expect(_analyze(node), same(numType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAssignmentExpression_compoundIfNull_differentTypes() {
-    // double d; d ??= 0
-    Expression node = AstFactory.assignmentExpression(
-        _resolvedVariable(_typeProvider.doubleType, 'd'),
-        TokenType.QUESTION_QUESTION_EQ,
-        _resolvedInteger(0));
-    expect(_analyze(node), same(_typeProvider.numType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAssignmentExpression_compoundIfNull_sameTypes() {
-    // int i; i ??= 0
-    Expression node = AstFactory.assignmentExpression(
-        _resolvedVariable(_typeProvider.intType, 'i'),
-        TokenType.QUESTION_QUESTION_EQ,
-        _resolvedInteger(0));
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAssignmentExpression_simple() {
-    // i = 0
-    InterfaceType intType = _typeProvider.intType;
-    Expression node = AstFactory.assignmentExpression(
-        _resolvedVariable(intType, "i"), TokenType.EQ, _resolvedInteger(0));
-    expect(_analyze(node), same(intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAwaitExpression_flattened() {
-    // await e, where e has type Future<Future<int>>
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType futureIntType =
-        _typeProvider.futureType.substitute4(<DartType>[intType]);
-    InterfaceType futureFutureIntType =
-        _typeProvider.futureType.substitute4(<DartType>[futureIntType]);
-    Expression node =
-        AstFactory.awaitExpression(_resolvedVariable(futureFutureIntType, 'e'));
-    expect(_analyze(node), same(intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitAwaitExpression_simple() {
-    // await e, where e has type Future<int>
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType futureIntType =
-        _typeProvider.futureType.substitute4(<DartType>[intType]);
-    Expression node =
-        AstFactory.awaitExpression(_resolvedVariable(futureIntType, 'e'));
-    expect(_analyze(node), same(intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_equals() {
-    // 2 == 3
-    Expression node = AstFactory.binaryExpression(
-        _resolvedInteger(2), TokenType.EQ_EQ, _resolvedInteger(3));
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_ifNull() {
-    // 1 ?? 1.5
-    Expression node = AstFactory.binaryExpression(
-        _resolvedInteger(1), TokenType.QUESTION_QUESTION, _resolvedDouble(1.5));
-    expect(_analyze(node), same(_typeProvider.numType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_logicalAnd() {
-    // false && true
-    Expression node = AstFactory.binaryExpression(
-        AstFactory.booleanLiteral(false),
-        TokenType.AMPERSAND_AMPERSAND,
-        AstFactory.booleanLiteral(true));
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_logicalOr() {
-    // false || true
-    Expression node = AstFactory.binaryExpression(
-        AstFactory.booleanLiteral(false),
-        TokenType.BAR_BAR,
-        AstFactory.booleanLiteral(true));
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_minusID_propagated() {
-    // a - b
-    BinaryExpression node = AstFactory.binaryExpression(
-        _propagatedVariable(_typeProvider.intType, 'a'),
-        TokenType.MINUS,
-        _propagatedVariable(_typeProvider.doubleType, 'b'));
-    node.propagatedElement = getMethod(_typeProvider.numType, "+");
-    _analyze(node);
-    expect(node.propagatedType, same(_typeProvider.doubleType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_notEquals() {
-    // 2 != 3
-    Expression node = AstFactory.binaryExpression(
-        _resolvedInteger(2), TokenType.BANG_EQ, _resolvedInteger(3));
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_plusID() {
-    // 1 + 2.0
-    BinaryExpression node = AstFactory.binaryExpression(
-        _resolvedInteger(1), TokenType.PLUS, _resolvedDouble(2.0));
-    node.staticElement = getMethod(_typeProvider.numType, "+");
-    expect(_analyze(node), same(_typeProvider.doubleType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_plusII() {
-    // 1 + 2
-    BinaryExpression node = AstFactory.binaryExpression(
-        _resolvedInteger(1), TokenType.PLUS, _resolvedInteger(2));
-    node.staticElement = getMethod(_typeProvider.numType, "+");
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_plusII_propagated() {
-    // a + b
-    BinaryExpression node = AstFactory.binaryExpression(
-        _propagatedVariable(_typeProvider.intType, 'a'),
-        TokenType.PLUS,
-        _propagatedVariable(_typeProvider.intType, 'b'));
-    node.propagatedElement = getMethod(_typeProvider.numType, "+");
-    _analyze(node);
-    expect(node.propagatedType, same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_slash() {
-    // 2 / 2
-    BinaryExpression node = AstFactory.binaryExpression(
-        _resolvedInteger(2), TokenType.SLASH, _resolvedInteger(2));
-    node.staticElement = getMethod(_typeProvider.numType, "/");
-    expect(_analyze(node), same(_typeProvider.doubleType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_star_notSpecial() {
-    // class A {
-    //   A operator *(double value);
-    // }
-    // (a as A) * 2.0
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    InterfaceType typeA = classA.type;
-    MethodElement operator =
-        ElementFactory.methodElement("*", typeA, [_typeProvider.doubleType]);
-    classA.methods = <MethodElement>[operator];
-    BinaryExpression node = AstFactory.binaryExpression(
-        AstFactory.asExpression(
-            AstFactory.identifier3("a"), AstFactory.typeName(classA)),
-        TokenType.PLUS,
-        _resolvedDouble(2.0));
-    node.staticElement = operator;
-    expect(_analyze(node), same(typeA));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBinaryExpression_starID() {
-    // 1 * 2.0
-    BinaryExpression node = AstFactory.binaryExpression(
-        _resolvedInteger(1), TokenType.PLUS, _resolvedDouble(2.0));
-    node.staticElement = getMethod(_typeProvider.numType, "*");
-    expect(_analyze(node), same(_typeProvider.doubleType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBooleanLiteral_false() {
-    // false
-    Expression node = AstFactory.booleanLiteral(false);
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitBooleanLiteral_true() {
-    // true
-    Expression node = AstFactory.booleanLiteral(true);
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitCascadeExpression() {
-    // a..length
-    Expression node = AstFactory.cascadeExpression(
-        _resolvedString("a"), [AstFactory.propertyAccess2(null, "length")]);
-    expect(_analyze(node), same(_typeProvider.stringType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitConditionalExpression_differentTypes() {
-    // true ? 1.0 : 0
-    Expression node = AstFactory.conditionalExpression(
-        AstFactory.booleanLiteral(true),
-        _resolvedDouble(1.0),
-        _resolvedInteger(0));
-    expect(_analyze(node), same(_typeProvider.numType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitConditionalExpression_sameTypes() {
-    // true ? 1 : 0
-    Expression node = AstFactory.conditionalExpression(
-        AstFactory.booleanLiteral(true),
-        _resolvedInteger(1),
-        _resolvedInteger(0));
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitDoubleLiteral() {
-    // 4.33
-    Expression node = AstFactory.doubleLiteral(4.33);
-    expect(_analyze(node), same(_typeProvider.doubleType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_async_block() {
-    // () async {}
-    BlockFunctionBody body = AstFactory.blockFunctionBody2();
-    body.keyword = TokenFactory.tokenFromString('async');
-    FunctionExpression node =
-        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(
-        _typeProvider.futureDynamicType, null, null, null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_async_expression() {
-    // () async => e, where e has type int
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType futureIntType =
-        _typeProvider.futureType.substitute4(<DartType>[intType]);
-    Expression expression = _resolvedVariable(intType, 'e');
-    ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
-    body.keyword = TokenFactory.tokenFromString('async');
-    FunctionExpression node =
-        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(futureIntType, null, null, null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_async_expression_flatten() {
-    // () async => e, where e has type Future<int>
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType futureIntType =
-        _typeProvider.futureType.substitute4(<DartType>[intType]);
-    Expression expression = _resolvedVariable(futureIntType, 'e');
-    ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
-    body.keyword = TokenFactory.tokenFromString('async');
-    FunctionExpression node =
-        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(futureIntType, null, null, null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_async_expression_flatten_twice() {
-    // () async => e, where e has type Future<Future<int>>
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType futureIntType =
-        _typeProvider.futureType.substitute4(<DartType>[intType]);
-    InterfaceType futureFutureIntType =
-        _typeProvider.futureType.substitute4(<DartType>[futureIntType]);
-    Expression expression = _resolvedVariable(futureFutureIntType, 'e');
-    ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
-    body.keyword = TokenFactory.tokenFromString('async');
-    FunctionExpression node =
-        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(futureIntType, null, null, null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_generator_async() {
-    // () async* {}
-    BlockFunctionBody body = AstFactory.blockFunctionBody2();
-    body.keyword = TokenFactory.tokenFromString('async');
-    body.star = TokenFactory.tokenFromType(TokenType.STAR);
-    FunctionExpression node =
-        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(
-        _typeProvider.streamDynamicType, null, null, null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_generator_sync() {
-    // () sync* {}
-    BlockFunctionBody body = AstFactory.blockFunctionBody2();
-    body.keyword = TokenFactory.tokenFromString('sync');
-    body.star = TokenFactory.tokenFromType(TokenType.STAR);
-    FunctionExpression node =
-        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(
-        _typeProvider.iterableDynamicType, null, null, null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_named_block() {
-    // ({p1 : 0, p2 : 0}) {}
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p1 = AstFactory.namedFormalParameter(
-        AstFactory.simpleFormalParameter3("p1"), _resolvedInteger(0));
-    _setType(p1, dynamicType);
-    FormalParameter p2 = AstFactory.namedFormalParameter(
-        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
-    _setType(p2, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p1, p2]),
-        AstFactory.blockFunctionBody2());
-    _analyze5(p1);
-    _analyze5(p2);
-    DartType resultType = _analyze(node);
-    Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
-    expectedNamedTypes["p1"] = dynamicType;
-    expectedNamedTypes["p2"] = dynamicType;
-    _assertFunctionType(
-        dynamicType, null, null, expectedNamedTypes, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_named_expression() {
-    // ({p : 0}) -> 0;
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p = AstFactory.namedFormalParameter(
-        AstFactory.simpleFormalParameter3("p"), _resolvedInteger(0));
-    _setType(p, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p]),
-        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
-    _analyze5(p);
-    DartType resultType = _analyze(node);
-    Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
-    expectedNamedTypes["p"] = dynamicType;
-    _assertFunctionType(
-        _typeProvider.intType, null, null, expectedNamedTypes, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_normal_block() {
-    // (p1, p2) {}
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
-    _setType(p1, dynamicType);
-    FormalParameter p2 = AstFactory.simpleFormalParameter3("p2");
-    _setType(p2, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p1, p2]),
-        AstFactory.blockFunctionBody2());
-    _analyze5(p1);
-    _analyze5(p2);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(dynamicType, <DartType>[dynamicType, dynamicType], null,
-        null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_normal_expression() {
-    // (p1, p2) -> 0
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p = AstFactory.simpleFormalParameter3("p");
-    _setType(p, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p]),
-        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
-    _analyze5(p);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(
-        _typeProvider.intType, <DartType>[dynamicType], null, null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_normalAndNamed_block() {
-    // (p1, {p2 : 0}) {}
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
-    _setType(p1, dynamicType);
-    FormalParameter p2 = AstFactory.namedFormalParameter(
-        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
-    _setType(p2, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p1, p2]),
-        AstFactory.blockFunctionBody2());
-    _analyze5(p2);
-    DartType resultType = _analyze(node);
-    Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
-    expectedNamedTypes["p2"] = dynamicType;
-    _assertFunctionType(dynamicType, <DartType>[dynamicType], null,
-        expectedNamedTypes, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_normalAndNamed_expression() {
-    // (p1, {p2 : 0}) -> 0
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
-    _setType(p1, dynamicType);
-    FormalParameter p2 = AstFactory.namedFormalParameter(
-        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
-    _setType(p2, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p1, p2]),
-        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
-    _analyze5(p2);
-    DartType resultType = _analyze(node);
-    Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
-    expectedNamedTypes["p2"] = dynamicType;
-    _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType], null,
-        expectedNamedTypes, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_normalAndPositional_block() {
-    // (p1, [p2 = 0]) {}
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
-    _setType(p1, dynamicType);
-    FormalParameter p2 = AstFactory.positionalFormalParameter(
-        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
-    _setType(p2, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p1, p2]),
-        AstFactory.blockFunctionBody2());
-    _analyze5(p1);
-    _analyze5(p2);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(dynamicType, <DartType>[dynamicType],
-        <DartType>[dynamicType], null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_normalAndPositional_expression() {
-    // (p1, [p2 = 0]) -> 0
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
-    _setType(p1, dynamicType);
-    FormalParameter p2 = AstFactory.positionalFormalParameter(
-        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
-    _setType(p2, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p1, p2]),
-        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
-    _analyze5(p1);
-    _analyze5(p2);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType],
-        <DartType>[dynamicType], null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_positional_block() {
-    // ([p1 = 0, p2 = 0]) {}
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p1 = AstFactory.positionalFormalParameter(
-        AstFactory.simpleFormalParameter3("p1"), _resolvedInteger(0));
-    _setType(p1, dynamicType);
-    FormalParameter p2 = AstFactory.positionalFormalParameter(
-        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
-    _setType(p2, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p1, p2]),
-        AstFactory.blockFunctionBody2());
-    _analyze5(p1);
-    _analyze5(p2);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(dynamicType, null, <DartType>[dynamicType, dynamicType],
-        null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitFunctionExpression_positional_expression() {
-    // ([p1 = 0, p2 = 0]) -> 0
-    DartType dynamicType = _typeProvider.dynamicType;
-    FormalParameter p = AstFactory.positionalFormalParameter(
-        AstFactory.simpleFormalParameter3("p"), _resolvedInteger(0));
-    _setType(p, dynamicType);
-    FunctionExpression node = _resolvedFunctionExpression(
-        AstFactory.formalParameterList([p]),
-        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
-    _analyze5(p);
-    DartType resultType = _analyze(node);
-    _assertFunctionType(
-        _typeProvider.intType, null, <DartType>[dynamicType], null, resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIndexExpression_getter() {
-    // List a;
-    // a[2]
-    InterfaceType listType = _typeProvider.listType;
-    SimpleIdentifier identifier = _resolvedVariable(listType, "a");
-    IndexExpression node =
-        AstFactory.indexExpression(identifier, _resolvedInteger(2));
-    MethodElement indexMethod = listType.element.methods[0];
-    node.staticElement = indexMethod;
-    expect(_analyze(node), same(listType.typeArguments[0]));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIndexExpression_setter() {
-    // List a;
-    // a[2] = 0
-    InterfaceType listType = _typeProvider.listType;
-    SimpleIdentifier identifier = _resolvedVariable(listType, "a");
-    IndexExpression node =
-        AstFactory.indexExpression(identifier, _resolvedInteger(2));
-    MethodElement indexMethod = listType.element.methods[1];
-    node.staticElement = indexMethod;
-    AstFactory.assignmentExpression(node, TokenType.EQ, AstFactory.integer(0));
-    expect(_analyze(node), same(listType.typeArguments[0]));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIndexExpression_typeParameters() {
-    // List<int> list = ...
-    // list[0]
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType listType = _typeProvider.listType;
-    // (int) -> E
-    MethodElement methodElement = getMethod(listType, "[]");
-    // "list" has type List<int>
-    SimpleIdentifier identifier = AstFactory.identifier3("list");
-    InterfaceType listOfIntType = listType.substitute4(<DartType>[intType]);
-    identifier.staticType = listOfIntType;
-    // list[0] has MethodElement element (int) -> E
-    IndexExpression indexExpression =
-        AstFactory.indexExpression(identifier, AstFactory.integer(0));
-    MethodElement indexMethod = MethodMember.from(methodElement, listOfIntType);
-    indexExpression.staticElement = indexMethod;
-    // analyze and assert result of the index expression
-    expect(_analyze(indexExpression), same(intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIndexExpression_typeParameters_inSetterContext() {
-    // List<int> list = ...
-    // list[0] = 0;
-    InterfaceType intType = _typeProvider.intType;
-    InterfaceType listType = _typeProvider.listType;
-    // (int, E) -> void
-    MethodElement methodElement = getMethod(listType, "[]=");
-    // "list" has type List<int>
-    SimpleIdentifier identifier = AstFactory.identifier3("list");
-    InterfaceType listOfIntType = listType.substitute4(<DartType>[intType]);
-    identifier.staticType = listOfIntType;
-    // list[0] has MethodElement element (int) -> E
-    IndexExpression indexExpression =
-        AstFactory.indexExpression(identifier, AstFactory.integer(0));
-    MethodElement indexMethod = MethodMember.from(methodElement, listOfIntType);
-    indexExpression.staticElement = indexMethod;
-    // list[0] should be in a setter context
-    AstFactory.assignmentExpression(
-        indexExpression, TokenType.EQ, AstFactory.integer(0));
-    // analyze and assert result of the index expression
-    expect(_analyze(indexExpression), same(intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitInstanceCreationExpression_named() {
-    // new C.m()
-    ClassElementImpl classElement = ElementFactory.classElement2("C");
-    String constructorName = "m";
-    ConstructorElementImpl constructor =
-        ElementFactory.constructorElement2(classElement, constructorName);
-    constructor.returnType = classElement.type;
-    FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
-    constructor.type = constructorType;
-    classElement.constructors = <ConstructorElement>[constructor];
-    InstanceCreationExpression node = AstFactory.instanceCreationExpression2(
-        null,
-        AstFactory.typeName(classElement),
-        [AstFactory.identifier3(constructorName)]);
-    node.staticElement = constructor;
-    expect(_analyze(node), same(classElement.type));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitInstanceCreationExpression_typeParameters() {
-    // new C<I>()
-    ClassElementImpl elementC = ElementFactory.classElement2("C", ["E"]);
-    ClassElementImpl elementI = ElementFactory.classElement2("I");
-    ConstructorElementImpl constructor =
-        ElementFactory.constructorElement2(elementC, null);
-    elementC.constructors = <ConstructorElement>[constructor];
-    constructor.returnType = elementC.type;
-    FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
-    constructor.type = constructorType;
-    TypeName typeName =
-        AstFactory.typeName(elementC, [AstFactory.typeName(elementI)]);
-    typeName.type = elementC.type.substitute4(<DartType>[elementI.type]);
-    InstanceCreationExpression node =
-        AstFactory.instanceCreationExpression2(null, typeName);
-    node.staticElement = constructor;
-    InterfaceType interfaceType = _analyze(node) as InterfaceType;
-    List<DartType> typeArgs = interfaceType.typeArguments;
-    expect(typeArgs.length, 1);
-    expect(typeArgs[0], elementI.type);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitInstanceCreationExpression_unnamed() {
-    // new C()
-    ClassElementImpl classElement = ElementFactory.classElement2("C");
-    ConstructorElementImpl constructor =
-        ElementFactory.constructorElement2(classElement, null);
-    constructor.returnType = classElement.type;
-    FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
-    constructor.type = constructorType;
-    classElement.constructors = <ConstructorElement>[constructor];
-    InstanceCreationExpression node = AstFactory.instanceCreationExpression2(
-        null, AstFactory.typeName(classElement));
-    node.staticElement = constructor;
-    expect(_analyze(node), same(classElement.type));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIntegerLiteral() {
-    // 42
-    Expression node = _resolvedInteger(42);
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIsExpression_negated() {
-    // a is! String
-    Expression node = AstFactory.isExpression(
-        _resolvedString("a"), true, AstFactory.typeName4("String"));
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitIsExpression_notNegated() {
-    // a is String
-    Expression node = AstFactory.isExpression(
-        _resolvedString("a"), false, AstFactory.typeName4("String"));
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitListLiteral_empty() {
-    // []
-    Expression node = AstFactory.listLiteral();
-    DartType resultType = _analyze(node);
-    _assertType2(
-        _typeProvider.listType
-            .substitute4(<DartType>[_typeProvider.dynamicType]),
-        resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitListLiteral_nonEmpty() {
-    // [0]
-    Expression node = AstFactory.listLiteral([_resolvedInteger(0)]);
-    DartType resultType = _analyze(node);
-    _assertType2(
-        _typeProvider.listType
-            .substitute4(<DartType>[_typeProvider.dynamicType]),
-        resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitMapLiteral_empty() {
-    // {}
-    Expression node = AstFactory.mapLiteral2();
-    DartType resultType = _analyze(node);
-    _assertType2(
-        _typeProvider.mapType.substitute4(
-            <DartType>[_typeProvider.dynamicType, _typeProvider.dynamicType]),
-        resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitMapLiteral_nonEmpty() {
-    // {"k" : 0}
-    Expression node = AstFactory
-        .mapLiteral2([AstFactory.mapLiteralEntry("k", _resolvedInteger(0))]);
-    DartType resultType = _analyze(node);
-    _assertType2(
-        _typeProvider.mapType.substitute4(
-            <DartType>[_typeProvider.dynamicType, _typeProvider.dynamicType]),
-        resultType);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitMethodInvocation_then() {
-    // then()
-    Expression node = AstFactory.methodInvocation(null, "then");
-    _analyze(node);
-    _listener.assertNoErrors();
-  }
-
-  void test_visitNamedExpression() {
-    // n: a
-    Expression node = AstFactory.namedExpression2("n", _resolvedString("a"));
-    expect(_analyze(node), same(_typeProvider.stringType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitNullLiteral() {
-    // null
-    Expression node = AstFactory.nullLiteral();
-    expect(_analyze(node), same(_typeProvider.bottomType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitParenthesizedExpression() {
-    // (0)
-    Expression node = AstFactory.parenthesizedExpression(_resolvedInteger(0));
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPostfixExpression_minusMinus() {
-    // 0--
-    PostfixExpression node = AstFactory.postfixExpression(
-        _resolvedInteger(0), TokenType.MINUS_MINUS);
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPostfixExpression_plusPlus() {
-    // 0++
-    PostfixExpression node =
-        AstFactory.postfixExpression(_resolvedInteger(0), TokenType.PLUS_PLUS);
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixedIdentifier_getter() {
-    DartType boolType = _typeProvider.boolType;
-    PropertyAccessorElementImpl getter =
-        ElementFactory.getterElement("b", false, boolType);
-    PrefixedIdentifier node = AstFactory.identifier5("a", "b");
-    node.identifier.staticElement = getter;
-    expect(_analyze(node), same(boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixedIdentifier_setter() {
-    DartType boolType = _typeProvider.boolType;
-    FieldElementImpl field =
-        ElementFactory.fieldElement("b", false, false, false, boolType);
-    PropertyAccessorElement setter = field.setter;
-    PrefixedIdentifier node = AstFactory.identifier5("a", "b");
-    node.identifier.staticElement = setter;
-    expect(_analyze(node), same(boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixedIdentifier_variable() {
-    VariableElementImpl variable = ElementFactory.localVariableElement2("b");
-    variable.type = _typeProvider.boolType;
-    PrefixedIdentifier node = AstFactory.identifier5("a", "b");
-    node.identifier.staticElement = variable;
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixExpression_bang() {
-    // !0
-    PrefixExpression node =
-        AstFactory.prefixExpression(TokenType.BANG, _resolvedInteger(0));
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixExpression_minus() {
-    // -0
-    PrefixExpression node =
-        AstFactory.prefixExpression(TokenType.MINUS, _resolvedInteger(0));
-    MethodElement minusMethod = getMethod(_typeProvider.numType, "-");
-    node.staticElement = minusMethod;
-    expect(_analyze(node), same(_typeProvider.numType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixExpression_minusMinus() {
-    // --0
-    PrefixExpression node =
-        AstFactory.prefixExpression(TokenType.MINUS_MINUS, _resolvedInteger(0));
-    MethodElement minusMethod = getMethod(_typeProvider.numType, "-");
-    node.staticElement = minusMethod;
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixExpression_not() {
-    // !true
-    Expression node = AstFactory.prefixExpression(
-        TokenType.BANG, AstFactory.booleanLiteral(true));
-    expect(_analyze(node), same(_typeProvider.boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixExpression_plusPlus() {
-    // ++0
-    PrefixExpression node =
-        AstFactory.prefixExpression(TokenType.PLUS_PLUS, _resolvedInteger(0));
-    MethodElement plusMethod = getMethod(_typeProvider.numType, "+");
-    node.staticElement = plusMethod;
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPrefixExpression_tilde() {
-    // ~0
-    PrefixExpression node =
-        AstFactory.prefixExpression(TokenType.TILDE, _resolvedInteger(0));
-    MethodElement tildeMethod = getMethod(_typeProvider.intType, "~");
-    node.staticElement = tildeMethod;
-    expect(_analyze(node), same(_typeProvider.intType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPropertyAccess_propagated_getter() {
-    DartType boolType = _typeProvider.boolType;
-    PropertyAccessorElementImpl getter =
-        ElementFactory.getterElement("b", false, boolType);
-    PropertyAccess node =
-        AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
-    node.propertyName.propagatedElement = getter;
-    expect(_analyze2(node, false), same(boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPropertyAccess_propagated_setter() {
-    DartType boolType = _typeProvider.boolType;
-    FieldElementImpl field =
-        ElementFactory.fieldElement("b", false, false, false, boolType);
-    PropertyAccessorElement setter = field.setter;
-    PropertyAccess node =
-        AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
-    node.propertyName.propagatedElement = setter;
-    expect(_analyze2(node, false), same(boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPropertyAccess_static_getter() {
-    DartType boolType = _typeProvider.boolType;
-    PropertyAccessorElementImpl getter =
-        ElementFactory.getterElement("b", false, boolType);
-    PropertyAccess node =
-        AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
-    node.propertyName.staticElement = getter;
-    expect(_analyze(node), same(boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitPropertyAccess_static_setter() {
-    DartType boolType = _typeProvider.boolType;
-    FieldElementImpl field =
-        ElementFactory.fieldElement("b", false, false, false, boolType);
-    PropertyAccessorElement setter = field.setter;
-    PropertyAccess node =
-        AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
-    node.propertyName.staticElement = setter;
-    expect(_analyze(node), same(boolType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSimpleIdentifier_dynamic() {
-    // "dynamic"
-    SimpleIdentifier identifier = AstFactory.identifier3('dynamic');
-    DynamicElementImpl element = DynamicElementImpl.instance;
-    identifier.staticElement = element;
-    identifier.staticType = _typeProvider.typeType;
-    expect(_analyze(identifier), same(_typeProvider.typeType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSimpleStringLiteral() {
-    // "a"
-    Expression node = _resolvedString("a");
-    expect(_analyze(node), same(_typeProvider.stringType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitStringInterpolation() {
-    // "a${'b'}c"
-    Expression node = AstFactory.string([
-      AstFactory.interpolationString("a", "a"),
-      AstFactory.interpolationExpression(_resolvedString("b")),
-      AstFactory.interpolationString("c", "c")
-    ]);
-    expect(_analyze(node), same(_typeProvider.stringType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSuperExpression() {
-    // super
-    InterfaceType superType = ElementFactory.classElement2("A").type;
-    InterfaceType thisType = ElementFactory.classElement("B", superType).type;
-    Expression node = AstFactory.superExpression();
-    expect(_analyze3(node, thisType), same(thisType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitSymbolLiteral() {
-    expect(_analyze(AstFactory.symbolLiteral(["a"])),
-        same(_typeProvider.symbolType));
-  }
-
-  void test_visitThisExpression() {
-    // this
-    InterfaceType thisType = ElementFactory
-        .classElement("B", ElementFactory.classElement2("A").type)
-        .type;
-    Expression node = AstFactory.thisExpression();
-    expect(_analyze3(node, thisType), same(thisType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitThrowExpression_withoutValue() {
-    // throw
-    Expression node = AstFactory.throwExpression();
-    expect(_analyze(node), same(_typeProvider.bottomType));
-    _listener.assertNoErrors();
-  }
-
-  void test_visitThrowExpression_withValue() {
-    // throw 0
-    Expression node = AstFactory.throwExpression2(_resolvedInteger(0));
-    expect(_analyze(node), same(_typeProvider.bottomType));
-    _listener.assertNoErrors();
-  }
-
-  /**
-   * Return the type associated with the given expression after the static type analyzer has
-   * computed a type for it.
-   *
-   * @param node the expression with which the type is associated
-   * @return the type associated with the expression
-   */
-  DartType _analyze(Expression node) => _analyze4(node, null, true);
-
-  /**
-   * Return the type associated with the given expression after the static or propagated type
-   * analyzer has computed a type for it.
-   *
-   * @param node the expression with which the type is associated
-   * @param useStaticType `true` if the static type is being requested, and `false` if
-   *          the propagated type is being requested
-   * @return the type associated with the expression
-   */
-  DartType _analyze2(Expression node, bool useStaticType) =>
-      _analyze4(node, null, useStaticType);
-
-  /**
-   * Return the type associated with the given expression after the static type analyzer has
-   * computed a type for it.
-   *
-   * @param node the expression with which the type is associated
-   * @param thisType the type of 'this'
-   * @return the type associated with the expression
-   */
-  DartType _analyze3(Expression node, InterfaceType thisType) =>
-      _analyze4(node, thisType, true);
-
-  /**
-   * Return the type associated with the given expression after the static type analyzer has
-   * computed a type for it.
-   *
-   * @param node the expression with which the type is associated
-   * @param thisType the type of 'this'
-   * @param useStaticType `true` if the static type is being requested, and `false` if
-   *          the propagated type is being requested
-   * @return the type associated with the expression
-   */
-  DartType _analyze4(
-      Expression node, InterfaceType thisType, bool useStaticType) {
-    try {
-      _analyzer.thisType = thisType;
-    } catch (exception) {
-      throw new IllegalArgumentException(
-          "Could not set type of 'this'", exception);
-    }
-    node.accept(_analyzer);
-    if (useStaticType) {
-      return node.staticType;
-    } else {
-      return node.propagatedType;
-    }
-  }
-
-  /**
-   * Return the type associated with the given parameter after the static type analyzer has computed
-   * a type for it.
-   *
-   * @param node the parameter with which the type is associated
-   * @return the type associated with the parameter
-   */
-  DartType _analyze5(FormalParameter node) {
-    node.accept(_analyzer);
-    return (node.identifier.staticElement as ParameterElement).type;
-  }
-
-  /**
-   * Assert that the actual type is a function type with the expected characteristics.
-   *
-   * @param expectedReturnType the expected return type of the function
-   * @param expectedNormalTypes the expected types of the normal parameters
-   * @param expectedOptionalTypes the expected types of the optional parameters
-   * @param expectedNamedTypes the expected types of the named parameters
-   * @param actualType the type being tested
-   */
-  void _assertFunctionType(
-      DartType expectedReturnType,
-      List<DartType> expectedNormalTypes,
-      List<DartType> expectedOptionalTypes,
-      Map<String, DartType> expectedNamedTypes,
-      DartType actualType) {
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionType, FunctionType, actualType);
-    FunctionType functionType = actualType as FunctionType;
-    List<DartType> normalTypes = functionType.normalParameterTypes;
-    if (expectedNormalTypes == null) {
-      expect(normalTypes, hasLength(0));
-    } else {
-      int expectedCount = expectedNormalTypes.length;
-      expect(normalTypes, hasLength(expectedCount));
-      for (int i = 0; i < expectedCount; i++) {
-        expect(normalTypes[i], same(expectedNormalTypes[i]));
-      }
-    }
-    List<DartType> optionalTypes = functionType.optionalParameterTypes;
-    if (expectedOptionalTypes == null) {
-      expect(optionalTypes, hasLength(0));
-    } else {
-      int expectedCount = expectedOptionalTypes.length;
-      expect(optionalTypes, hasLength(expectedCount));
-      for (int i = 0; i < expectedCount; i++) {
-        expect(optionalTypes[i], same(expectedOptionalTypes[i]));
-      }
-    }
-    Map<String, DartType> namedTypes = functionType.namedParameterTypes;
-    if (expectedNamedTypes == null) {
-      expect(namedTypes, hasLength(0));
-    } else {
-      expect(namedTypes, hasLength(expectedNamedTypes.length));
-      expectedNamedTypes.forEach((String name, DartType type) {
-        expect(namedTypes[name], same(type));
-      });
-    }
-    expect(functionType.returnType, equals(expectedReturnType));
-  }
-
-  void _assertType(
-      InterfaceTypeImpl expectedType, InterfaceTypeImpl actualType) {
-    expect(actualType.displayName, expectedType.displayName);
-    expect(actualType.element, expectedType.element);
-    List<DartType> expectedArguments = expectedType.typeArguments;
-    int length = expectedArguments.length;
-    List<DartType> actualArguments = actualType.typeArguments;
-    expect(actualArguments, hasLength(length));
-    for (int i = 0; i < length; i++) {
-      _assertType2(expectedArguments[i], actualArguments[i]);
-    }
-  }
-
-  void _assertType2(DartType expectedType, DartType actualType) {
-    if (expectedType is InterfaceTypeImpl) {
-      EngineTestCase.assertInstanceOf(
-          (obj) => obj is InterfaceTypeImpl, InterfaceTypeImpl, actualType);
-      _assertType(expectedType, actualType as InterfaceTypeImpl);
-    }
-    // TODO(brianwilkerson) Compare other kinds of types then make this a shared
-    // utility method.
-  }
-
-  /**
-   * Create the analyzer used by the tests.
-   *
-   * @return the analyzer to be used by the tests
-   */
-  StaticTypeAnalyzer _createAnalyzer() {
-    InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
-    FileBasedSource source =
-        new FileBasedSource(FileUtilities2.createFile("/lib.dart"));
-    CompilationUnitElementImpl definingCompilationUnit =
-        new CompilationUnitElementImpl("lib.dart");
-    definingCompilationUnit.librarySource =
-        definingCompilationUnit.source = source;
-    LibraryElementImpl definingLibrary =
-        new LibraryElementImpl.forNode(context, null);
-    definingLibrary.definingCompilationUnit = definingCompilationUnit;
-    _typeProvider = new TestTypeProvider(context);
-    _visitor = new ResolverVisitor(
-        definingLibrary, source, _typeProvider, _listener,
-        nameScope: new LibraryScope(definingLibrary, _listener));
-    _visitor.overrideManager.enterScope();
-    try {
-      return _visitor.typeAnalyzer;
-    } catch (exception) {
-      throw new IllegalArgumentException(
-          "Could not create analyzer", exception);
-    }
-  }
-
-  DartType _flatten(DartType type) => type.flattenFutures(_typeSystem);
-
-  /**
-   * Return a simple identifier that has been resolved to a variable element with the given type.
-   *
-   * @param type the type of the variable being represented
-   * @param variableName the name of the variable
-   * @return a simple identifier that has been resolved to a variable element with the given type
-   */
-  SimpleIdentifier _propagatedVariable(
-      InterfaceType type, String variableName) {
-    SimpleIdentifier identifier = AstFactory.identifier3(variableName);
-    VariableElementImpl element =
-        ElementFactory.localVariableElement(identifier);
-    element.type = type;
-    identifier.staticType = _typeProvider.dynamicType;
-    identifier.propagatedElement = element;
-    identifier.propagatedType = type;
-    return identifier;
-  }
-
-  /**
-   * Return an integer literal that has been resolved to the correct type.
-   *
-   * @param value the value of the literal
-   * @return an integer literal that has been resolved to the correct type
-   */
-  DoubleLiteral _resolvedDouble(double value) {
-    DoubleLiteral literal = AstFactory.doubleLiteral(value);
-    literal.staticType = _typeProvider.doubleType;
-    return literal;
-  }
-
-  /**
-   * Create a function expression that has an element associated with it, where the element has an
-   * incomplete type associated with it (just like the one
-   * [ElementBuilder.visitFunctionExpression] would have built if we had
-   * run it).
-   *
-   * @param parameters the parameters to the function
-   * @param body the body of the function
-   * @return a resolved function expression
-   */
-  FunctionExpression _resolvedFunctionExpression(
-      FormalParameterList parameters, FunctionBody body) {
-    List<ParameterElement> parameterElements = new List<ParameterElement>();
-    for (FormalParameter parameter in parameters.parameters) {
-      ParameterElementImpl element =
-          new ParameterElementImpl.forNode(parameter.identifier);
-      element.parameterKind = parameter.kind;
-      element.type = _typeProvider.dynamicType;
-      parameter.identifier.staticElement = element;
-      parameterElements.add(element);
-    }
-    FunctionExpression node = AstFactory.functionExpression2(parameters, body);
-    FunctionElementImpl element = new FunctionElementImpl.forNode(null);
-    element.parameters = parameterElements;
-    element.type = new FunctionTypeImpl(element);
-    node.element = element;
-    return node;
-  }
-
-  /**
-   * Return an integer literal that has been resolved to the correct type.
-   *
-   * @param value the value of the literal
-   * @return an integer literal that has been resolved to the correct type
-   */
-  IntegerLiteral _resolvedInteger(int value) {
-    IntegerLiteral literal = AstFactory.integer(value);
-    literal.staticType = _typeProvider.intType;
-    return literal;
-  }
-
-  /**
-   * Return a string literal that has been resolved to the correct type.
-   *
-   * @param value the value of the literal
-   * @return a string literal that has been resolved to the correct type
-   */
-  SimpleStringLiteral _resolvedString(String value) {
-    SimpleStringLiteral string = AstFactory.string2(value);
-    string.staticType = _typeProvider.stringType;
-    return string;
-  }
-
-  /**
-   * Return a simple identifier that has been resolved to a variable element with the given type.
-   *
-   * @param type the type of the variable being represented
-   * @param variableName the name of the variable
-   * @return a simple identifier that has been resolved to a variable element with the given type
-   */
-  SimpleIdentifier _resolvedVariable(InterfaceType type, String variableName) {
-    SimpleIdentifier identifier = AstFactory.identifier3(variableName);
-    VariableElementImpl element =
-        ElementFactory.localVariableElement(identifier);
-    element.type = type;
-    identifier.staticElement = element;
-    identifier.staticType = type;
-    return identifier;
-  }
-
-  /**
-   * Set the type of the given parameter to the given type.
-   *
-   * @param parameter the parameter whose type is to be set
-   * @param type the new type of the given parameter
-   */
-  void _setType(FormalParameter parameter, DartType type) {
-    SimpleIdentifier identifier = parameter.identifier;
-    Element element = identifier.staticElement;
-    if (element is! ParameterElement) {
-      element = new ParameterElementImpl.forNode(identifier);
-      identifier.staticElement = element;
-    }
-    (element as ParameterElementImpl).type = type;
-  }
-}
-
-/**
  * Instances of the class `StaticTypeVerifier` verify that all of the nodes in an AST
  * structure that should have a static type associated with them do have a static type.
  */
@@ -12350,2234 +1039,6 @@
   }
 }
 
-/**
- * Strong mode static analyzer downwards inference tests
- */
-@reflectiveTest
-class StrongModeDownwardsInferenceTest extends ResolverTestCase {
-  TypeAssertions _assertions;
-
-  Asserter<DartType> _isDynamic;
-  Asserter<InterfaceType> _isFutureOfDynamic;
-  Asserter<InterfaceType> _isFutureOfInt;
-  Asserter<DartType> _isInt;
-  Asserter<DartType> _isNum;
-  Asserter<DartType> _isString;
-
-  AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, DartType>
-      _isFunction2Of;
-  AsserterBuilder<List<Asserter<DartType>>, InterfaceType> _isFutureOf;
-  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> _sameElement;
-
-  @override
-  void setUp() {
-    super.setUp();
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    options.strongMode = true;
-    resetWithOptions(options);
-    _assertions = new TypeAssertions(typeProvider);
-    _isType = _assertions.isType;
-    _hasElement = _assertions.hasElement;
-    _isInstantiationOf = _assertions.isInstantiationOf;
-    _isInt = _assertions.isInt;
-    _isNum = _assertions.isNum;
-    _isString = _assertions.isString;
-    _isDynamic = _assertions.isDynamic;
-    _isListOf = _assertions.isListOf;
-    _isMapOf = _assertions.isMapOf;
-    _isFunction2Of = _assertions.isFunction2Of;
-    _sameElement = _assertions.sameElement;
-    _isFutureOf = _isInstantiationOf(_sameElement(typeProvider.futureType));
-    _isFutureOfDynamic = _isFutureOf([_isDynamic]);
-    _isFutureOfInt = _isFutureOf([_isInt]);
-    _isStreamOf = _isInstantiationOf(_sameElement(typeProvider.streamType));
-  }
-
-  void test_async_method_propagation() {
-    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 = 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);
-    // This should be int when we handle the implicit Future<T> | T union
-    // https://github.com/dart-lang/sdk/issues/25322
-    check("f4", _isFutureOfDynamic);
-    check("f5", _isFutureOfInt);
-
-    check("g0", _isFutureOfDynamic);
-    check("g1", _isFutureOfDynamic);
-    check("g2", _isFutureOfDynamic);
-
-    check("g3", _isFutureOfInt);
-    // This should be int when we handle the implicit Future<T> | T union
-    // https://github.com/dart-lang/sdk/issues/25322
-    check("g4", _isFutureOfDynamic);
-    check("g5", _isFutureOfInt);
-  }
-
-  void test_async_propagation() {
-    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 = 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);
-    // This should be int when we handle the implicit Future<T> | T union
-    // https://github.com/dart-lang/sdk/issues/25322
-    check("f4", _isFutureOfDynamic);
-    check("f5", _isFutureOfInt);
-
-    check("g0", _isFutureOfDynamic);
-    check("g1", _isFutureOfDynamic);
-    check("g2", _isFutureOfDynamic);
-
-    check("g3", _isFutureOfInt);
-    // This should be int when we handle the implicit Future<T> | T union
-    // https://github.com/dart-lang/sdk/issues/25322
-    check("g4", _isFutureOfDynamic);
-    check("g5", _isFutureOfInt);
-  }
-
-  void test_async_star_method_propagation() {
-    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 = 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([_isListOf(_isInt)]));
-  }
-
-  void test_async_star_propagation() {
-    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 = 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([_isListOf(_isInt)]));
-  }
-
-  void test_cascadeExpression() {
-    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 = 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").element;
-
-    CascadeExpression cascade = fetch(0);
-    _isInstantiationOf(_hasElement(elementA))([_isInt])(cascade.staticType);
-    MethodInvocation invoke = cascade.cascadeSections[0];
-    FunctionExpression function = invoke.argumentList.arguments[1];
-    ExecutableElement f0 = function.element;
-    _isListOf(_isInt)(f0.type.returnType);
-    expect(f0.type.normalParameterTypes[0], typeProvider.intType);
-  }
-
-  void test_constructorInitializer_propagation() {
-    String code = r'''
-      class A {
-        List<String> x;
-        A() : this.x = [];
-      }
-   ''';
-    CompilationUnit unit = resolveSource(code);
-    ConstructorDeclaration constructor =
-        AstFinder.getConstructorInClass(unit, "A", null);
-    ConstructorFieldInitializer assignment = constructor.initializers[0];
-    Expression exp = assignment.expression;
-    _isListOf(_isString)(exp.staticType);
-  }
-
-  void test_factoryConstructor_propagation() {
-    String code = r'''
-      class A<T> {
-        factory A() { return new B(); }
-      }
-      class B<S> extends A<S> {}
-   ''';
-    CompilationUnit unit = 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").element;
-    ClassElement elementA = AstFinder.getClass(unit, "A").element;
-    expect(exp.constructorName.type.type.element, elementB);
-    _isInstantiationOf(_hasElement(elementB))(
-        [_isType(elementA.typeParameters[0].type)])(exp.staticType);
-  }
-
-  void test_fieldDeclaration_propagation() {
-    String code = r'''
-      class A {
-        List<String> f0 = ["hello"];
-      }
-   ''';
-    CompilationUnit unit = resolveSource(code);
-
-    VariableDeclaration field = AstFinder.getFieldInClass(unit, "A", "f0");
-
-    _isListOf(_isString)(field.initializer.staticType);
-  }
-
-  void test_functionDeclaration_body_propagation() {
-    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 = 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 = anon1.element.type;
-    expect(type1.returnType, typeProvider.intType);
-    expect(type1.normalParameterTypes[0], typeProvider.intType);
-  }
-
-  void test_functionLiteral_assignment_typedArguments() {
-    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 = 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 exp.element.type;
-    }
-    _isFunction2Of(_isInt, _isString)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isString, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isInt)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  void test_functionLiteral_assignment_unTypedArguments() {
-    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 = 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 exp.element.type;
-    }
-    _isFunction2Of(_isInt, _isString)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isInt, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isInt)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  void test_functionLiteral_body_propagation() {
-    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 = 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);
-  }
-
-  void test_functionLiteral_functionExpressionInvocation_typedArguments() {
-    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 = 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 exp.element.type;
-    }
-    _isFunction2Of(_isInt, _isString)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isString, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isInt)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  void test_functionLiteral_functionExpressionInvocation_unTypedArguments() {
-    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 = 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 exp.element.type;
-    }
-    _isFunction2Of(_isInt, _isString)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isInt, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isInt)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  void test_functionLiteral_functionInvocation_typedArguments() {
-    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 = 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 exp.element.type;
-    }
-    _isFunction2Of(_isInt, _isString)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isString, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isInt)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  void test_functionLiteral_functionInvocation_unTypedArguments() {
-    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 = 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 exp.element.type;
-    }
-    _isFunction2Of(_isInt, _isString)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isInt, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isInt)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  void test_functionLiteral_methodInvocation_typedArguments() {
-    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 = 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 exp.element.type;
-    }
-    _isFunction2Of(_isInt, _isString)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isString, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isInt)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  void test_functionLiteral_methodInvocation_unTypedArguments() {
-    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 = 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 exp.element.type;
-    }
-    _isFunction2Of(_isInt, _isString)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isInt, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isInt)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  void test_functionLiteral_unTypedArgument_propagation() {
-    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 = 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);
-  }
-
-  void test_inference_hints() {
-    Source source = addSource(r'''
-      void main () {
-        var x = 3;
-        List<int> l0 = [];
-     }
-   ''');
-    resolve2(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_instanceCreation() {
-    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() {
-        // Currently we only allow variable constraints.  Test that we reject.
-        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 = 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").element;
-    Element elementB = AstFinder.getClass(unit, "B").element;
-    Element elementC = AstFinder.getClass(unit, "C").element;
-    Element elementD = AstFinder.getClass(unit, "D").element;
-    Element elementE = AstFinder.getClass(unit, "E").element;
-    Element elementF = AstFinder.getClass(unit, "F").element;
-
-    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([_isDynamic, _isDynamic]), 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]));
-    }
-  }
-
-  void test_listLiteral_nested() {
-    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 = 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(assertListOfInt);
-
-    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);
-  }
-
-  void test_listLiteral_simple() {
-    String code = r'''
-      void main () {
-        List<int> l0 = [];
-        List<int> l1 = [3];
-        List<int> l2 = ["hello"];
-        List<int> l3 = ["hello", 3];
-     }
-   ''';
-    CompilationUnit unit = 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));
-  }
-
-  void test_listLiteral_simple_const() {
-    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 = 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));
-  }
-
-  void test_listLiteral_simple_disabled() {
-    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 = 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));
-  }
-
-  void test_listLiteral_simple_subtype() {
-    String code = r'''
-      void main () {
-        Iterable<int> l0 = [];
-        Iterable<int> l1 = [3];
-        Iterable<int> l2 = ["hello"];
-        Iterable<int> l3 = ["hello", 3];
-     }
-   ''';
-    CompilationUnit unit = 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));
-  }
-
-  void test_mapLiteral_nested() {
-    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 = 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, assertListOfString);
-
-    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);
-  }
-
-  void test_mapLiteral_simple() {
-    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 = 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));
-  }
-
-  void test_mapLiteral_simple_disabled() {
-    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 = 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));
-  }
-
-  void test_methodDeclaration_body_propagation() {
-    String code = r'''
-      class A {
-        List<String> m0(int x) => ["hello"];
-        List<String> m1(int x) {return [3];};
-      }
-   ''';
-    CompilationUnit unit = 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);
-  }
-
-  void test_redirectingConstructor_propagation() {
-    String code = r'''
-      class A {
-        A() : this.named([]);
-        A.named(List<String> x);
-      }
-   ''';
-    CompilationUnit unit = resolveSource(code);
-
-    ConstructorDeclaration constructor =
-        AstFinder.getConstructorInClass(unit, "A", null);
-    RedirectingConstructorInvocation invocation = constructor.initializers[0];
-    Expression exp = invocation.argumentList.arguments[0];
-    _isListOf(_isString)(exp.staticType);
-  }
-
-  void test_superConstructorInvocation_propagation() {
-    String code = r'''
-      class B {
-        B(List<String>);
-      }
-      class A extends B {
-        A() : super([]);
-      }
-   ''';
-    CompilationUnit unit = resolveSource(code);
-
-    ConstructorDeclaration constructor =
-        AstFinder.getConstructorInClass(unit, "A", null);
-    SuperConstructorInvocation invocation = constructor.initializers[0];
-    Expression exp = invocation.argumentList.arguments[0];
-    _isListOf(_isString)(exp.staticType);
-  }
-
-  void test_sync_star_method_propagation() {
-    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 = 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(_isListOf(_isInt)));
-  }
-
-  void test_sync_star_propagation() {
-    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 = 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(_isListOf(_isInt)));
-  }
-}
-
-/**
- * Strong mode static analyzer end to end tests
- */
-@reflectiveTest
-class StrongModeStaticTypeAnalyzer2Test extends _StaticTypeAnalyzer2TestShared {
-  void fail_genericMethod_tearoff_instantiated() {
-    _resolveTestUnit(r'''
-class C<E> {
-  /*=T*/ f/*<T>*/(E e) => null;
-  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
-  static final h = g;
-}
-
-/*=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");
-  }
-
-  void setUp() {
-    super.setUp();
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    options.strongMode = true;
-    resetWithOptions(options);
-  }
-
-  void test_dynamicObjectGetter_hashCode() {
-    String code = r'''
-main() {
-  dynamic a = null;
-  var foo = a.hashCode;
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'int', isNull);
-  }
-
-  void test_dynamicObjectMethod_toString() {
-    String code = r'''
-main() {
-  dynamic a = null;
-  var foo = a.toString();
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'String', isNull);
-  }
-
-  void test_genericFunction() {
-    _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');
-  }
-
-  void test_genericFunction_bounds() {
-    _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]');
-  }
-
-  void test_genericFunction_parameter() {
-    _resolveTestUnit(r'''
-void g(/*=T*/ f/*<T>*/(/*=T*/ x)) {}
-''');
-    _expectFunctionType('f', '<T>(T) → T',
-        elementTypeParams: '[T]', 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');
-  }
-
-  void test_genericFunction_static() {
-    _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');
-  }
-
-  void test_genericFunction_typedef() {
-    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);
-  }
-}
-''';
-    _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");
-  }
-
-  void test_genericMethod() {
-    _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]');
-  }
-
-  void test_genericMethod_explicitTypeParams() {
-    _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.substitute4([typeProvider.intType]));
-  }
-
-  void test_genericMethod_functionExpressionInvocation_explicit() {
-    _resolveTestUnit(r'''
-class C<E> {
-  /*=T*/ f/*<T>*/(/*=T*/ e) => null;
-  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
-  static final h = g;
-}
-
-/*=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 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");
-  }
-
-  void test_genericMethod_functionExpressionInvocation_inferred() {
-    _resolveTestUnit(r'''
-class C<E> {
-  /*=T*/ f/*<T>*/(/*=T*/ e) => null;
-  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
-  static final h = g;
-}
-
-/*=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 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);
-}
-''');
-    _expectIdentifierType('methodCall', "int");
-    _expectIdentifierType('staticCall', "int");
-    _expectIdentifierType('staticFieldCall', "int");
-    _expectIdentifierType('topFunCall', "int");
-    _expectIdentifierType('topFieldCall', "int");
-    _expectIdentifierType('localCall', "int");
-    _expectIdentifierType('paramCall', "int");
-    _expectIdentifierType('lambdaCall', "int");
-  }
-
-  void test_genericMethod_functionInvocation_explicit() {
-    _resolveTestUnit(r'''
-class C<E> {
-  /*=T*/ f/*<T>*/(/*=T*/ e) => null;
-  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
-  static final h = g;
-}
-
-/*=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 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");
-  }
-
-  void test_genericMethod_functionInvocation_inferred() {
-    _resolveTestUnit(r'''
-class C<E> {
-  /*=T*/ f/*<T>*/(/*=T*/ e) => null;
-  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
-  static final h = g;
-}
-
-/*=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 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");
-  }
-
-  void test_genericMethod_functionTypedParameter() {
-    _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>');
-  }
-
-  void test_genericMethod_implicitDynamic() {
-    // Regression test for:
-    // https://github.com/dart-lang/sdk/issues/25100#issuecomment-162047588
-    // These should not cause any hints or warnings.
-    _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', isNull);
-    _expectIdentifierType('map((e) => 3);', '<T>((dynamic) → T) → T', isNull);
-
-    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');
-  }
-
-  void test_genericMethod_max_doubleDouble() {
-    String code = r'''
-import 'dart:math';
-main() {
-  var foo = max(1.0, 2.0);
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'double', isNull);
-  }
-
-  void test_genericMethod_max_doubleDouble_prefixed() {
-    String code = r'''
-import 'dart:math' as math;
-main() {
-  var foo = math.max(1.0, 2.0);
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'double', isNull);
-  }
-
-  void test_genericMethod_max_doubleInt() {
-    String code = r'''
-import 'dart:math';
-main() {
-  var foo = max(1.0, 2);
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'num', isNull);
-  }
-
-  void test_genericMethod_max_intDouble() {
-    String code = r'''
-import 'dart:math';
-main() {
-  var foo = max(1, 2.0);
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'num', isNull);
-  }
-
-  void test_genericMethod_max_intInt() {
-    String code = r'''
-import 'dart:math';
-main() {
-  var foo = max(1, 2);
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'int', isNull);
-  }
-
-  void test_genericMethod_nestedBound() {
-    String code = r'''
-class Foo<T extends num> {
-  void method/*<U extends T>*/(dynamic/*=U*/ u) {
-    u.abs();
-  }
-}
-''';
-    // Just validate that there is no warning on the call to `.abs()`.
-    _resolveTestUnit(code);
-  }
-
-  void test_genericMethod_nestedCapture() {
-    _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');
-  }
-
-  void test_genericMethod_nestedFunctions() {
-    _resolveTestUnit(r'''
-/*=S*/ f/*<S>*/(/*=S*/ x) {
-  g/*<S>*/(/*=S*/ x) => f;
-  return null;
-}
-''');
-    _expectIdentifierType('f', '<S>(S) → S');
-    _expectIdentifierType('g', '<S>(S) → dynamic');
-  }
-
-  void test_genericMethod_override() {
-    _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');
-  }
-
-  void test_genericMethod_override_bounds() {
-    _resolveTestUnit(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;
-}
-''');
-  }
-
-  void test_genericMethod_override_invalidReturnType() {
-    Source source = addSource(r'''
-class C {
-  Iterable/*<T>*/ f/*<T>*/(/*=T*/ x) => null;
-}
-class D extends C {
-  String f/*<S>*/(/*=S*/ x) => null;
-}''');
-    // TODO(jmesserly): we can't use assertErrors because STRONG_MODE_* errors
-    // from CodeChecker don't have working equality.
-    List<AnalysisError> errors = analysisContext2.computeErrors(source);
-
-    // Sort errors by name.
-    errors.sort((AnalysisError e1, AnalysisError e2) =>
-        e1.errorCode.name.compareTo(e2.errorCode.name));
-
-    expect(errors.map((e) => e.errorCode.name), [
-      'INVALID_METHOD_OVERRIDE_RETURN_TYPE',
-      'STRONG_MODE_INVALID_METHOD_OVERRIDE'
-    ]);
-    expect(errors[0].message, contains('Iterable<S>'),
-        reason: 'errors should be in terms of the type parameters '
-            'at the error location');
-    verify([source]);
-  }
-
-  void test_genericMethod_override_invalidTypeParamBounds() {
-    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;
-}''');
-    // TODO(jmesserly): this is modified code from assertErrors, which we can't
-    // use directly because STRONG_MODE_* errors don't have working equality.
-    List<AnalysisError> errors = analysisContext2.computeErrors(source);
-    List errorNames = errors.map((e) => e.errorCode.name).toList();
-    expect(errorNames, hasLength(2));
-    expect(errorNames, contains('STRONG_MODE_INVALID_METHOD_OVERRIDE'));
-    expect(
-        errorNames, contains('INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND'));
-    verify([source]);
-  }
-
-  void test_genericMethod_override_invalidTypeParamCount() {
-    Source source = addSource(r'''
-class C {
-  /*=T*/ f/*<T>*/(/*=T*/ x) => null;
-}
-class D extends C {
-  /*=S*/ f/*<T, S>*/(/*=T*/ x) => null;
-}''');
-    // TODO(jmesserly): we can't use assertErrors because STRONG_MODE_* errors
-    // from CodeChecker don't have working equality.
-    List<AnalysisError> errors = analysisContext2.computeErrors(source);
-    expect(errors.map((e) => e.errorCode.name), [
-      'STRONG_MODE_INVALID_METHOD_OVERRIDE',
-      'INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS'
-    ]);
-    verify([source]);
-  }
-
-  void test_genericMethod_propagatedType_promotion() {
-    // 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.
-    _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>', isNull);
-  }
-
-  void test_genericMethod_tearoff() {
-    _resolveTestUnit(r'''
-class C<E> {
-  /*=T*/ f/*<T>*/(E e) => null;
-  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
-  static final h = g;
-}
-
-/*=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 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");
-  }
-
-  void test_genericMethod_then() {
-    String code = r'''
-import 'dart:async';
-String toString(int x) => x.toString();
-main() {
-  Future<int> bar = null;
-  var foo = bar.then(toString);
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'Future<String>', isNull);
-  }
-
-  void test_genericMethod_then_prefixed() {
-    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);
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'Future<String>', isNull);
-  }
-
-  void test_genericMethod_then_propagatedType() {
-    // 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));
-}
-''';
-    // This should produce no hints or warnings.
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'Future<String>', isNull);
-  }
-
-  void test_setterWithDynamicTypeIsError() {
-    Source source = addSource(r'''
-class A {
-  dynamic set f(String s) => null;
-}
-dynamic set g(int x) => null;
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
-      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER
-    ]);
-    verify([source]);
-  }
-
-  void test_setterWithExplicitVoidType_returningVoid() {
-    Source source = addSource(r'''
-void returnsVoid() {}
-class A {
-  void set f(String s) => returnsVoid();
-}
-void set g(int x) => returnsVoid();
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_setterWithNoVoidType() {
-    Source source = addSource(r'''
-class A {
-  set f(String s) {
-    return '42';
-  }
-}
-set g(int x) => 42;
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
-      StaticTypeWarningCode.RETURN_OF_INVALID_TYPE
-    ]);
-    verify([source]);
-  }
-
-  void test_setterWithNoVoidType_returningVoid() {
-    Source source = addSource(r'''
-void returnsVoid() {}
-class A {
-  set f(String s) => returnsVoid();
-}
-set g(int x) => returnsVoid();
-''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  void test_setterWithOtherTypeIsError() {
-    Source source = addSource(r'''
-class A {
-  String set f(String s) => null;
-}
-Object set g(x) => null;
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
-      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER
-    ]);
-    verify([source]);
-  }
-
-  void test_ternaryOperator_null_left() {
-    String code = r'''
-main() {
-  var foo = (true) ? null : 3;
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'int', isNull);
-  }
-
-  void test_ternaryOperator_null_right() {
-    String code = r'''
-main() {
-  var foo = (true) ? 3 : null;
-}
-''';
-    _resolveTestUnit(code);
-    _expectInitializerType('foo', 'int', isNull);
-  }
-}
-
-@reflectiveTest
-class StrongModeTypePropagationTest extends ResolverTestCase {
-  @override
-  void setUp() {
-    super.setUp();
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    options.strongMode = true;
-    resetWithOptions(options);
-  }
-
-  void test_foreachInference_dynamic_disabled() {
-    String code = r'''
-main() {
-  var list = <int>[];
-  for (dynamic v in list) {
-    v; // marker
-  }
-}''';
-    _assertPropagatedIterationType(
-        code, typeProvider.dynamicType, typeProvider.intType);
-    _assertTypeOfMarkedExpression(
-        code, typeProvider.dynamicType, typeProvider.intType);
-  }
-
-  void test_foreachInference_reusedVar_disabled() {
-    String code = r'''
-main() {
-  var list = <int>[];
-  var v;
-  for (v in list) {
-    v; // marker
-  }
-}''';
-    _assertPropagatedIterationType(
-        code, typeProvider.dynamicType, typeProvider.intType);
-    _assertTypeOfMarkedExpression(
-        code, typeProvider.dynamicType, typeProvider.intType);
-  }
-
-  void test_foreachInference_var() {
-    String code = r'''
-main() {
-  var list = <int>[];
-  for (var v in list) {
-    v; // marker
-  }
-}''';
-    _assertPropagatedIterationType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_foreachInference_var_iterable() {
-    String code = r'''
-main() {
-  Iterable<int> list = <int>[];
-  for (var v in list) {
-    v; // marker
-  }
-}''';
-    _assertPropagatedIterationType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_foreachInference_var_stream() {
-    String code = r'''
-import 'dart:async';
-main() async {
-  Stream<int> stream = null;
-  await for (var v in stream) {
-    v; // marker
-  }
-}''';
-    _assertPropagatedIterationType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_bottom_disabled() {
-    String code = r'''
-main() {
-  var v = null;
-  v; // marker
-}''';
-    _assertPropagatedAssignedType(code, typeProvider.dynamicType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.dynamicType, null);
-  }
-
-  void test_localVariableInference_constant() {
-    String code = r'''
-main() {
-  var v = 3;
-  v; // marker
-}''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_declaredType_disabled() {
-    String code = r'''
-main() {
-  dynamic v = 3;
-  v; // marker
-}''';
-    _assertPropagatedAssignedType(
-        code, typeProvider.dynamicType, typeProvider.intType);
-    _assertTypeOfMarkedExpression(
-        code, typeProvider.dynamicType, typeProvider.intType);
-  }
-
-  void test_localVariableInference_noInitializer_disabled() {
-    String code = r'''
-main() {
-  var v;
-  v = 3;
-  v; // marker
-}''';
-    _assertPropagatedAssignedType(
-        code, typeProvider.dynamicType, typeProvider.intType);
-    _assertTypeOfMarkedExpression(
-        code, typeProvider.dynamicType, typeProvider.intType);
-  }
-
-  void test_localVariableInference_transitive_field_inferred_lexical() {
-    String code = r'''
-class A {
-  final x = 3;
-  f() {
-    var v = x;
-    return v; // marker
-  }
-}
-main() {
-}
-''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_field_inferred_reversed() {
-    String code = r'''
-class A {
-  f() {
-    var v = x;
-    return v; // marker
-  }
-  final x = 3;
-}
-main() {
-}
-''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_field_lexical() {
-    String code = r'''
-class A {
-  int x = 3;
-  f() {
-    var v = x;
-    return v; // marker
-  }
-}
-main() {
-}
-''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_field_reversed() {
-    String code = r'''
-class A {
-  f() {
-    var v = x;
-    return v; // marker
-  }
-  int x = 3;
-}
-main() {
-}
-''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_list_local() {
-    String code = r'''
-main() {
-  var x = <int>[3];
-  var v = x[0];
-  v; // marker
-}''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_local() {
-    String code = r'''
-main() {
-  var x = 3;
-  var v = x;
-  v; // marker
-}''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_toplevel_inferred_lexical() {
-    String code = r'''
-final x = 3;
-main() {
-  var v = x;
-  v; // marker
-}
-''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_toplevel_inferred_reversed() {
-    String code = r'''
-main() {
-  var v = x;
-  v; // marker
-}
-final x = 3;
-''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_toplevel_lexical() {
-    String code = r'''
-int x = 3;
-main() {
-  var v = x;
-  v; // marker
-}
-''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-
-  void test_localVariableInference_transitive_toplevel_reversed() {
-    String code = r'''
-main() {
-  var v = x;
-  v; // marker
-}
-int x = 3;
-''';
-    _assertPropagatedAssignedType(code, typeProvider.intType, null);
-    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
-  }
-}
-
 @reflectiveTest
 class SubtypeManagerTest {
   /**
@@ -14678,23 +1139,6 @@
   }
 }
 
-class TestPackageUriResolver extends UriResolver {
-  Map<Uri, Source> sourceMap = new HashMap<Uri, Source>();
-
-  TestPackageUriResolver(Map<String, String> map) {
-    map.forEach((String uri, String contents) {
-      sourceMap[Uri.parse(uri)] =
-          new StringSource(contents, '/test_pkg_source.dart');
-    });
-  }
-
-  @override
-  Source resolveAbsolute(Uri uri, [Uri actualUri]) => sourceMap[uri];
-
-  @override
-  Uri restoreAbsolute(Source source) => throw new UnimplementedError();
-}
-
 @reflectiveTest
 class TypeOverrideManagerTest extends EngineTestCase {
   void test_exitScope_noScopes() {
@@ -14770,7 +1214,7 @@
 class TypePropagationTest extends ResolverTestCase {
   void fail_mergePropagatedTypesAtJoinPoint_1() {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f1(x) {
   var y = [];
@@ -14789,7 +1233,7 @@
 
   void fail_mergePropagatedTypesAtJoinPoint_2() {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f2(x) {
   var y = [];
@@ -14807,7 +1251,7 @@
 
   void fail_mergePropagatedTypesAtJoinPoint_3() {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f4(x) {
   var y = [];
@@ -14827,7 +1271,7 @@
 
   void fail_mergePropagatedTypesAtJoinPoint_5() {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f6(x,y) {
   var z = [];
@@ -14867,7 +1311,7 @@
     x; // marker
   }
 }''';
-    DartType t = _findMarkedIdentifier(code, "; // marker").propagatedType;
+    DartType t = findMarkedIdentifier(code, "; // marker").propagatedType;
     expect(typeProvider.intType.isSubtypeOf(t), isTrue);
     expect(typeProvider.stringType.isSubtypeOf(t), isTrue);
   }
@@ -14899,7 +1343,7 @@
     }
   }
 }''';
-    DartType t = _findMarkedIdentifier(code, "; // marker").propagatedType;
+    DartType t = findMarkedIdentifier(code, "; // marker").propagatedType;
     expect(typeProvider.intType.isSubtypeOf(t), isTrue);
     expect(typeProvider.stringType.isSubtypeOf(t), isTrue);
   }
@@ -14910,7 +1354,7 @@
 main() {
   var v = (() {return 42;})();
 }''';
-    _assertPropagatedAssignedType(
+    assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -15064,7 +1508,7 @@
 f(A a) {
   return a.v; // marker
 }''';
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -15082,7 +1526,7 @@
     return v; // marker
   }
 }''';
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -15101,7 +1545,7 @@
     return p.v; // marker
   }
 }''';
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -15113,7 +1557,7 @@
     v; // marker
   }
 }''';
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -15129,7 +1573,7 @@
 f() {
   return A.V; // marker
 }''';
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -15140,7 +1584,7 @@
 f() {
   var v2 = p.V; // marker prefixed
 }''';
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -15151,7 +1595,7 @@
 f() {
   return V; // marker simple
 }''';
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -15229,7 +1673,7 @@
     verify([source]);
     CompilationUnit unit = resolveCompilationUnit(source, library);
     InterfaceType listOfStringType =
-        typeProvider.listType.substitute4([typeProvider.stringType]);
+        typeProvider.listType.instantiate([typeProvider.stringType]);
     // in the declaration
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
@@ -15588,7 +2032,7 @@
   helper.max(10, 10); // marker
 }''';
     SimpleIdentifier methodName =
-        _findMarkedIdentifier(code, "(10, 10); // marker");
+        findMarkedIdentifier(code, "(10, 10); // marker");
     MethodInvocation methodInvoke = methodName.parent;
     expect(methodInvoke.methodName.staticElement, isNotNull);
     expect(methodInvoke.methodName.propagatedElement, isNull);
@@ -15954,8 +2398,8 @@
     return a; // marker
   }
 }''';
-    DartType tB = _findMarkedIdentifier(code, "; // B").propagatedType;
-    _assertTypeOfMarkedExpression(code, null, tB);
+    DartType tB = findMarkedIdentifier(code, "; // B").propagatedType;
+    assertTypeOfMarkedExpression(code, null, tB);
   }
 
   void test_issue20904BuggyTypePromotionAtIfJoin_6() {
@@ -15974,8 +2418,8 @@
     return b; // marker
   }
 }''';
-    DartType tB = _findMarkedIdentifier(code, "; // B").propagatedType;
-    _assertTypeOfMarkedExpression(code, null, tB);
+    DartType tB = findMarkedIdentifier(code, "; // B").propagatedType;
+    assertTypeOfMarkedExpression(code, null, tB);
   }
 
   void test_listLiteral_different() {
@@ -16076,17 +2520,17 @@
   return v;
 }''';
     {
-      SimpleIdentifier identifier = _findMarkedIdentifier(code, "v;");
+      SimpleIdentifier identifier = findMarkedIdentifier(code, "v;");
       expect(identifier.propagatedType, null);
     }
     {
-      SimpleIdentifier identifier = _findMarkedIdentifier(code, "v = '';");
+      SimpleIdentifier identifier = findMarkedIdentifier(code, "v = '';");
       expect(identifier.propagatedType, typeProvider.stringType);
     }
   }
 
   void test_mergePropagatedTypes_afterIfThen_same() {
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 main() {
   var v = 1;
@@ -16100,7 +2544,7 @@
   }
 
   void test_mergePropagatedTypes_afterIfThenElse_different() {
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 main() {
   var v = 1;
@@ -16116,7 +2560,7 @@
   }
 
   void test_mergePropagatedTypes_afterIfThenElse_same() {
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 main() {
   var v = 1;
@@ -16133,7 +2577,7 @@
 
   void test_mergePropagatedTypesAtJoinPoint_4() {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f5(x) {
   var y = [];
@@ -16194,7 +2638,7 @@
   helper.$name; // marker
 }''';
 
-    SimpleIdentifier id = _findMarkedIdentifier(code, "; // marker");
+    SimpleIdentifier id = findMarkedIdentifier(code, "; // marker");
     PrefixedIdentifier prefixedId = id.parent;
     expect(id.staticType, typeProvider.dynamicType);
     expect(prefixedId.staticType, typeProvider.dynamicType);
@@ -16208,7 +2652,7 @@
   $name; // marker
 }''';
 
-    SimpleIdentifier getter = _findMarkedIdentifier(code, "; // marker");
+    SimpleIdentifier getter = findMarkedIdentifier(code, "; // marker");
     expect(getter.staticType, typeProvider.dynamicType);
   }
 
@@ -16219,7 +2663,7 @@
   dynamic obj;
   obj..$name..$name; // marker
 }''';
-    PropertyAccess access = _findMarkedIdentifier(code, "; // marker").parent;
+    PropertyAccess access = findMarkedIdentifier(code, "; // marker").parent;
     expect(access.staticType, typeProvider.dynamicType);
     expect(access.realTarget.staticType, typeProvider.dynamicType);
   }
@@ -16237,7 +2681,7 @@
 main() {
   helper.$name(); // marker
 }''';
-    SimpleIdentifier methodName = _findMarkedIdentifier(code, "(); // marker");
+    SimpleIdentifier methodName = findMarkedIdentifier(code, "(); // marker");
     MethodInvocation methodInvoke = methodName.parent;
     expect(methodName.staticType, typeProvider.dynamicType);
     expect(methodInvoke.staticType, typeProvider.dynamicType);
@@ -16250,10 +2694,10 @@
   dynamic $name = () => null;
   $name(); // marker
 }''';
-    SimpleIdentifier identifier = _findMarkedIdentifier(code, "$name = ");
+    SimpleIdentifier identifier = findMarkedIdentifier(code, "$name = ");
     expect(identifier.staticType, typeProvider.dynamicType);
 
-    SimpleIdentifier methodName = _findMarkedIdentifier(code, "(); // marker");
+    SimpleIdentifier methodName = findMarkedIdentifier(code, "(); // marker");
     MethodInvocation methodInvoke = methodName.parent;
     expect(methodName.staticType, typeProvider.dynamicType);
     expect(methodInvoke.staticType, typeProvider.dynamicType);
@@ -16266,7 +2710,7 @@
   dynamic obj;
   obj..$name()..$name(); // marker
 }''';
-    SimpleIdentifier methodName = _findMarkedIdentifier(code, "(); // marker");
+    SimpleIdentifier methodName = findMarkedIdentifier(code, "(); // marker");
     MethodInvocation methodInvoke = methodName.parent;
 
     expect(methodInvoke.staticType, typeProvider.dynamicType);
@@ -16280,7 +2724,7 @@
     // static type of [bool] for [==] comparison and the implementation
     // was already consistent with the spec there. But, it's another
     // [Object] method, so it's included here.
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f1(x) {
   var v = (x == x);
@@ -16292,7 +2736,7 @@
 
   void test_objectMethodOnDynamicExpression_hashCode() {
     // https://code.google.com/p/dart/issues/detail?id=20342
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f1(x) {
   var v = x.hashCode;
@@ -16304,7 +2748,7 @@
 
   void test_objectMethodOnDynamicExpression_runtimeType() {
     // https://code.google.com/p/dart/issues/detail?id=20342
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f1(x) {
   var v = x.runtimeType;
@@ -16316,7 +2760,7 @@
 
   void test_objectMethodOnDynamicExpression_toString() {
     // https://code.google.com/p/dart/issues/detail?id=20342
-    _assertTypeOfMarkedExpression(
+    assertTypeOfMarkedExpression(
         r'''
 f1(x) {
   var v = x.toString();
@@ -16332,7 +2776,7 @@
   f() => 42;
   var v = f();
 }''';
-    _assertPropagatedAssignedType(
+    assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -17087,20 +3531,6 @@
     _listener.assertErrorsWithCodes([StaticWarningCode.UNDEFINED_CLASS]);
   }
 
-  void test_visitTypeName_prefixed_noParameters_noArguments_undefined() {
-    SimpleIdentifier prefix = AstFactory.identifier3("unknownPrefix")
-      ..staticElement = new _StaleElement();
-    SimpleIdentifier suffix = AstFactory.identifier3("unknownSuffix")
-      ..staticElement = new _StaleElement();
-    TypeName typeName =
-        new TypeName(AstFactory.identifier(prefix, suffix), null);
-    _resolveNode(typeName, []);
-    expect(typeName.type, UndefinedTypeImpl.instance);
-    expect(prefix.staticElement, null);
-    expect(suffix.staticElement, null);
-    _listener.assertErrorsWithCodes([StaticWarningCode.UNDEFINED_CLASS]);
-  }
-
   void test_visitTypeName_parameters_arguments() {
     ClassElement classA = ElementFactory.classElement2("A", ["E"]);
     ClassElement classB = ElementFactory.classElement2("B");
@@ -17129,6 +3559,20 @@
     _listener.assertNoErrors();
   }
 
+  void test_visitTypeName_prefixed_noParameters_noArguments_undefined() {
+    SimpleIdentifier prefix = AstFactory.identifier3("unknownPrefix")
+      ..staticElement = new _StaleElement();
+    SimpleIdentifier suffix = AstFactory.identifier3("unknownSuffix")
+      ..staticElement = new _StaleElement();
+    TypeName typeName =
+        new TypeName(AstFactory.identifier(prefix, suffix), null);
+    _resolveNode(typeName, []);
+    expect(typeName.type, UndefinedTypeImpl.instance);
+    expect(prefix.staticElement, null);
+    expect(suffix.staticElement, null);
+    _listener.assertErrorsWithCodes([StaticWarningCode.UNDEFINED_CLASS]);
+  }
+
   void test_visitTypeName_void() {
     ClassElement classA = ElementFactory.classElement2("A");
     TypeName typeName = AstFactory.typeName4("void");
@@ -17196,70 +3640,6 @@
   }
 }
 
-class _AnalysisContextFactory_initContextWithCore
-    extends DirectoryBasedDartSdk {
-  final bool enableAsync;
-  _AnalysisContextFactory_initContextWithCore(JavaFile arg0,
-      {this.enableAsync: true})
-      : super(arg0);
-
-  @override
-  LibraryMap initialLibraryMap(bool useDart2jsPaths) {
-    LibraryMap map = new LibraryMap();
-    if (enableAsync) {
-      _addLibrary(map, DartSdk.DART_ASYNC, false, "async.dart");
-    }
-    _addLibrary(map, DartSdk.DART_CORE, false, "core.dart");
-    _addLibrary(map, DartSdk.DART_HTML, false, "html_dartium.dart");
-    _addLibrary(map, AnalysisContextFactory._DART_MATH, false, "math.dart");
-    _addLibrary(map, AnalysisContextFactory._DART_INTERCEPTORS, true,
-        "_interceptors.dart");
-    _addLibrary(
-        map, AnalysisContextFactory._DART_JS_HELPER, true, "_js_helper.dart");
-    return map;
-  }
-
-  void _addLibrary(LibraryMap map, String uri, bool isInternal, String path) {
-    SdkLibraryImpl library = new SdkLibraryImpl(uri);
-    if (isInternal) {
-      library.category = "Internal";
-    }
-    library.path = path;
-    map.setLibrary(uri, library);
-  }
-}
-
-class _SimpleResolverTest_localVariable_types_invoked
-    extends RecursiveAstVisitor<Object> {
-  final SimpleResolverTest test;
-
-  List<bool> found;
-
-  List<CaughtException> thrownException;
-
-  _SimpleResolverTest_localVariable_types_invoked(
-      this.test, this.found, this.thrownException)
-      : super();
-
-  @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
-    if (node.name == "myVar" && node.parent is MethodInvocation) {
-      try {
-        found[0] = true;
-        // check static type
-        DartType staticType = node.staticType;
-        expect(staticType, same(test.typeProvider.dynamicType));
-        // check propagated type
-        FunctionType propagatedType = node.propagatedType as FunctionType;
-        expect(propagatedType.returnType, test.typeProvider.stringType);
-      } on AnalysisException catch (e, stackTrace) {
-        thrownException[0] = new CaughtException(e, stackTrace);
-      }
-    }
-    return null;
-  }
-}
-
 /**
  * Represents an element left over from a previous resolver run.
  *
@@ -17269,108 +3649,8 @@
   _StaleElement() : super("_StaleElement", -1);
 
   @override
-  accept(_) => throw "_StaleElement shouldn't be visited";
+  get kind => throw "_StaleElement's kind shouldn't be accessed";
 
   @override
-  get kind => throw "_StaleElement's kind shouldn't be accessed";
-}
-
-/**
- * Shared infrastructure for [StaticTypeAnalyzer2Test] and
- * [StrongModeStaticTypeAnalyzer2Test].
- */
-class _StaticTypeAnalyzer2TestShared extends ResolverTestCase {
-  String testCode;
-  Source testSource;
-  CompilationUnit testUnit;
-
-  /**
-   * Looks up the identifier with [name] and validates that its type type
-   * stringifies to [type] and that its generics match the given stringified
-   * output.
-   */
-  _expectFunctionType(String name, String type,
-      {String elementTypeParams: '[]',
-      String typeParams: '[]',
-      String typeArgs: '[]',
-      String typeFormals: '[]'}) {
-    SimpleIdentifier identifier = _findIdentifier(name);
-    // Element is either ExecutableElement or ParameterElement.
-    var element = identifier.staticElement;
-    FunctionTypeImpl functionType = identifier.staticType;
-    expect(functionType.toString(), type);
-    expect(element.typeParameters.toString(), elementTypeParams);
-    expect(functionType.typeParameters.toString(), typeParams);
-    expect(functionType.typeArguments.toString(), typeArgs);
-    expect(functionType.typeFormals.toString(), typeFormals);
-  }
-
-  /**
-   * Looks up the identifier with [name] and validates its static [type].
-   *
-   * If [type] is a string, validates that the identifier's static type
-   * stringifies to that text. Otherwise, [type] is used directly a [Matcher]
-   * to match the type.
-   *
-   * If [propagatedType] is given, also validate's the identifier's propagated
-   * type.
-   */
-  void _expectIdentifierType(String name, type, [propagatedType]) {
-    SimpleIdentifier identifier = _findIdentifier(name);
-    _expectType(identifier.staticType, type);
-    if (propagatedType != null) {
-      _expectType(identifier.propagatedType, propagatedType);
-    }
-  }
-
-  /**
-   * Looks up the initializer for the declaration containing [identifier] and
-   * validates its static [type].
-   *
-   * If [type] is a string, validates that the identifier's static type
-   * stringifies to that text. Otherwise, [type] is used directly a [Matcher]
-   * to match the type.
-   *
-   * If [propagatedType] is given, also validate's the identifier's propagated
-   * type.
-   */
-  void _expectInitializerType(String name, type, [propagatedType]) {
-    SimpleIdentifier identifier = _findIdentifier(name);
-    VariableDeclaration declaration =
-        identifier.getAncestor((node) => node is VariableDeclaration);
-    Expression initializer = declaration.initializer;
-    _expectType(initializer.staticType, type);
-    if (propagatedType != null) {
-      _expectType(initializer.propagatedType, propagatedType);
-    }
-  }
-
-  /**
-   * Validates that [type] matches [expected].
-   *
-   * If [expected] is a string, validates that the type stringifies to that
-   * text. Otherwise, [expected] is used directly a [Matcher] to match the type.
-   */
-  _expectType(DartType type, expected) {
-    if (expected is String) {
-      expect(type.toString(), expected);
-    } else {
-      expect(type, expected);
-    }
-  }
-
-  SimpleIdentifier _findIdentifier(String search) {
-    SimpleIdentifier identifier = EngineTestCase.findNode(
-        testUnit, testCode, search, (node) => node is SimpleIdentifier);
-    return identifier;
-  }
-
-  void _resolveTestUnit(String code) {
-    testCode = code;
-    testSource = addSource(testCode);
-    LibraryElement library = resolve2(testSource);
-    assertNoErrors(testSource);
-    verify([testSource]);
-    testUnit = resolveCompilationUnit(testSource, library);
-  }
+  accept(_) => throw "_StaleElement shouldn't be visited";
 }
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
new file mode 100644
index 0000000..264d393
--- /dev/null
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -0,0 +1,838 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.resolver_test_case;
+
+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/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/java_engine.dart';
+import 'package:analyzer/src/generated/java_engine_io.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/generated/testing/ast_factory.dart';
+import 'package:analyzer/src/generated/testing/element_factory.dart';
+import 'package:unittest/unittest.dart';
+
+import 'analysis_context_factory.dart';
+import 'test_support.dart';
+
+/**
+ * An AST visitor used to verify that all of the nodes in an AST structure that
+ * should have been resolved were resolved.
+ */
+class ResolutionVerifier extends RecursiveAstVisitor<Object> {
+  /**
+   * A set containing nodes that are known to not be resolvable and should
+   * therefore not cause the test to fail.
+   */
+  final Set<AstNode> _knownExceptions;
+
+  /**
+   * A list containing all of the AST nodes that were not resolved.
+   */
+  List<AstNode> _unresolvedNodes = new List<AstNode>();
+
+  /**
+   * A list containing all of the AST nodes that were resolved to an element of
+   * the wrong type.
+   */
+  List<AstNode> _wrongTypedNodes = new List<AstNode>();
+
+  /**
+   * Initialize a newly created verifier to verify that all of the identifiers
+   * in the visited AST structures that are expected to have been resolved have
+   * an element associated with them. Nodes in the set of [_knownExceptions] are
+   * not expected to have been resolved, even if they normally would have been
+   * expected to have been resolved.
+   */
+  ResolutionVerifier([this._knownExceptions]);
+
+  /**
+   * Assert that all of the visited identifiers were resolved.
+   */
+  void assertResolved() {
+    if (!_unresolvedNodes.isEmpty || !_wrongTypedNodes.isEmpty) {
+      StringBuffer buffer = new StringBuffer();
+      if (!_unresolvedNodes.isEmpty) {
+        buffer.write("Failed to resolve ");
+        buffer.write(_unresolvedNodes.length);
+        buffer.writeln(" nodes:");
+        _printNodes(buffer, _unresolvedNodes);
+      }
+      if (!_wrongTypedNodes.isEmpty) {
+        buffer.write("Resolved ");
+        buffer.write(_wrongTypedNodes.length);
+        buffer.writeln(" to the wrong type of element:");
+        _printNodes(buffer, _wrongTypedNodes);
+      }
+      fail(buffer.toString());
+    }
+  }
+
+  @override
+  Object visitAnnotation(Annotation node) {
+    node.visitChildren(this);
+    ElementAnnotation elementAnnotation = node.elementAnnotation;
+    if (elementAnnotation == null) {
+      if (_knownExceptions == null || !_knownExceptions.contains(node)) {
+        _unresolvedNodes.add(node);
+      }
+    } else if (elementAnnotation is! ElementAnnotation) {
+      _wrongTypedNodes.add(node);
+    }
+    return null;
+  }
+
+  @override
+  Object visitBinaryExpression(BinaryExpression node) {
+    node.visitChildren(this);
+    if (!node.operator.isUserDefinableOperator) {
+      return null;
+    }
+    DartType operandType = node.leftOperand.staticType;
+    if (operandType == null || operandType.isDynamic) {
+      return null;
+    }
+    return _checkResolved(
+        node, node.staticElement, (node) => node is MethodElement);
+  }
+
+  @override
+  Object visitCommentReference(CommentReference node) => null;
+
+  @override
+  Object visitCompilationUnit(CompilationUnit node) {
+    node.visitChildren(this);
+    return _checkResolved(
+        node, node.element, (node) => node is CompilationUnitElement);
+  }
+
+  @override
+  Object visitExportDirective(ExportDirective node) =>
+      _checkResolved(node, node.element, (node) => node is ExportElement);
+
+  @override
+  Object visitFunctionDeclaration(FunctionDeclaration node) {
+    node.visitChildren(this);
+    if (node.element is LibraryElement) {
+      _wrongTypedNodes.add(node);
+    }
+    return null;
+  }
+
+  @override
+  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+    node.visitChildren(this);
+    // TODO(brianwilkerson) If we start resolving function expressions, then
+    // conditionally check to see whether the node was resolved correctly.
+    return null;
+    //checkResolved(node, node.getElement(), FunctionElement.class);
+  }
+
+  @override
+  Object visitImportDirective(ImportDirective node) {
+    // Not sure how to test the combinators given that it isn't an error if the
+    // names are not defined.
+    _checkResolved(node, node.element, (node) => node is ImportElement);
+    SimpleIdentifier prefix = node.prefix;
+    if (prefix == null) {
+      return null;
+    }
+    return _checkResolved(
+        prefix, prefix.staticElement, (node) => node is PrefixElement);
+  }
+
+  @override
+  Object visitIndexExpression(IndexExpression node) {
+    node.visitChildren(this);
+    DartType targetType = node.realTarget.staticType;
+    if (targetType == null || targetType.isDynamic) {
+      return null;
+    }
+    return _checkResolved(
+        node, node.staticElement, (node) => node is MethodElement);
+  }
+
+  @override
+  Object visitLibraryDirective(LibraryDirective node) =>
+      _checkResolved(node, node.element, (node) => node is LibraryElement);
+
+  @override
+  Object visitNamedExpression(NamedExpression node) =>
+      node.expression.accept(this);
+
+  @override
+  Object visitPartDirective(PartDirective node) => _checkResolved(
+      node, node.element, (node) => node is CompilationUnitElement);
+
+  @override
+  Object visitPartOfDirective(PartOfDirective node) =>
+      _checkResolved(node, node.element, (node) => node is LibraryElement);
+
+  @override
+  Object visitPostfixExpression(PostfixExpression node) {
+    node.visitChildren(this);
+    if (!node.operator.isUserDefinableOperator) {
+      return null;
+    }
+    DartType operandType = node.operand.staticType;
+    if (operandType == null || operandType.isDynamic) {
+      return null;
+    }
+    return _checkResolved(
+        node, node.staticElement, (node) => node is MethodElement);
+  }
+
+  @override
+  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+    SimpleIdentifier prefix = node.prefix;
+    prefix.accept(this);
+    DartType prefixType = prefix.staticType;
+    if (prefixType == null || prefixType.isDynamic) {
+      return null;
+    }
+    return _checkResolved(node, node.staticElement, null);
+  }
+
+  @override
+  Object visitPrefixExpression(PrefixExpression node) {
+    node.visitChildren(this);
+    if (!node.operator.isUserDefinableOperator) {
+      return null;
+    }
+    DartType operandType = node.operand.staticType;
+    if (operandType == null || operandType.isDynamic) {
+      return null;
+    }
+    return _checkResolved(
+        node, node.staticElement, (node) => node is MethodElement);
+  }
+
+  @override
+  Object visitPropertyAccess(PropertyAccess node) {
+    Expression target = node.realTarget;
+    target.accept(this);
+    DartType targetType = target.staticType;
+    if (targetType == null || targetType.isDynamic) {
+      return null;
+    }
+    return node.propertyName.accept(this);
+  }
+
+  @override
+  Object visitSimpleIdentifier(SimpleIdentifier node) {
+    if (node.name == "void") {
+      return null;
+    }
+    if (node.staticType != null &&
+        node.staticType.isDynamic &&
+        node.staticElement == null) {
+      return null;
+    }
+    AstNode parent = node.parent;
+    if (parent is MethodInvocation) {
+      MethodInvocation invocation = parent;
+      if (identical(invocation.methodName, node)) {
+        Expression target = invocation.realTarget;
+        DartType targetType = target == null ? null : target.staticType;
+        if (targetType == null || targetType.isDynamic) {
+          return null;
+        }
+      }
+    }
+    return _checkResolved(node, node.staticElement, null);
+  }
+
+  Object _checkResolved(
+      AstNode node, Element element, Predicate<Element> predicate) {
+    if (element == null) {
+      if (_knownExceptions == null || !_knownExceptions.contains(node)) {
+        _unresolvedNodes.add(node);
+      }
+    } else if (predicate != null) {
+      if (!predicate(element)) {
+        _wrongTypedNodes.add(node);
+      }
+    }
+    return null;
+  }
+
+  String _getFileName(AstNode node) {
+    // TODO (jwren) there are two copies of this method, one here and one in
+    // StaticTypeVerifier, they should be resolved into a single method
+    if (node != null) {
+      AstNode root = node.root;
+      if (root is CompilationUnit) {
+        CompilationUnit rootCU = root;
+        if (rootCU.element != null) {
+          return rootCU.element.source.fullName;
+        } else {
+          return "<unknown file- CompilationUnit.getElement() returned null>";
+        }
+      } else {
+        return "<unknown file- CompilationUnit.getRoot() is not a CompilationUnit>";
+      }
+    }
+    return "<unknown file- ASTNode is null>";
+  }
+
+  void _printNodes(StringBuffer buffer, List<AstNode> nodes) {
+    for (AstNode identifier in nodes) {
+      buffer.write("  ");
+      buffer.write(identifier.toString());
+      buffer.write(" (");
+      buffer.write(_getFileName(identifier));
+      buffer.write(" : ");
+      buffer.write(identifier.offset);
+      buffer.writeln(")");
+    }
+  }
+}
+
+class ResolverTestCase extends EngineTestCase {
+  /**
+   * 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].
+   */
+  bool enableUnusedElement = false;
+
+  /**
+   * Specifies if [assertErrors] should check for [HintCode.UNUSED_LOCAL_VARIABLE].
+   */
+  bool enableUnusedLocalVariable = false;
+
+  AnalysisContext get analysisContext => analysisContext2;
+
+  /**
+   * 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
+   */
+  TypeProvider get typeProvider => analysisContext2.typeProvider;
+
+  /**
+   * Return a type system that can be used to test the results of resolution.
+   *
+   * @return a type system
+   */
+  TypeSystem get typeSystem => analysisContext2.typeSystem;
+
+  /**
+   * Add a source file to the content provider. The file path should be absolute.
+   *
+   * @param filePath the path of the file being added
+   * @param contents the contents to be returned by the content provider for the specified file
+   * @return the source object representing the added file
+   */
+  Source addNamedSource(String filePath, String contents) {
+    Source source = cacheSource(filePath, contents);
+    ChangeSet changeSet = new ChangeSet();
+    changeSet.addedSource(source);
+    analysisContext2.applyChanges(changeSet);
+    return source;
+  }
+
+  /**
+   * Add a source file to the content provider.
+   *
+   * @param contents the contents to be returned by the content provider for the specified file
+   * @return the source object representing the added file
+   */
+  Source addSource(String contents) => addNamedSource("/test.dart", contents);
+
+  /**
+   * Assert that the number of errors reported against the given source matches the number of errors
+   * that are given and that they have the expected error codes. The order in which the errors were
+   * gathered is ignored.
+   *
+   * @param source the source against which the errors should have been reported
+   * @param expectedErrorCodes the error codes of the errors that should have been reported
+   * @throws AnalysisException if the reported errors could not be computed
+   * @throws AssertionFailedError if a different number of errors have been reported than were
+   *           expected
+   */
+  void assertErrors(Source source,
+      [List<ErrorCode> expectedErrorCodes = ErrorCode.EMPTY_LIST]) {
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    for (AnalysisError error in analysisContext2.computeErrors(source)) {
+      expect(error.source, source);
+      ErrorCode errorCode = error.errorCode;
+      if (!enableUnusedElement &&
+          (errorCode == HintCode.UNUSED_ELEMENT ||
+              errorCode == HintCode.UNUSED_FIELD)) {
+        continue;
+      }
+      if (!enableUnusedLocalVariable &&
+          (errorCode == HintCode.UNUSED_CATCH_CLAUSE ||
+              errorCode == HintCode.UNUSED_CATCH_STACK ||
+              errorCode == HintCode.UNUSED_LOCAL_VARIABLE)) {
+        continue;
+      }
+      errorListener.onError(error);
+    }
+    errorListener.assertErrorsWithCodes(expectedErrorCodes);
+  }
+
+  /**
+   * Asserts that [code] verifies, but has errors with the given error codes.
+   *
+   * Like [assertErrors], but takes a string of source code.
+   */
+  // TODO(rnystrom): Use this in more tests that have the same structure.
+  void assertErrorsInCode(String code, List<ErrorCode> errors) {
+    Source source = addSource(code);
+    computeLibrarySourceErrors(source);
+    assertErrors(source, errors);
+    verify([source]);
+  }
+
+  /**
+   * Asserts that [code] has errors with the given error codes.
+   *
+   * Like [assertErrors], but takes a string of source code.
+   */
+  void assertErrorsInUnverifiedCode(String code, List<ErrorCode> errors) {
+    Source source = addSource(code);
+    computeLibrarySourceErrors(source);
+    assertErrors(source, errors);
+  }
+
+  /**
+   * Assert that no errors have been reported against the given source.
+   *
+   * @param source the source against which no errors should have been reported
+   * @throws AnalysisException if the reported errors could not be computed
+   * @throws AssertionFailedError if any errors have been reported
+   */
+  void assertNoErrors(Source source) {
+    assertErrors(source);
+  }
+
+  /**
+   * Asserts that [code] has no errors or warnings.
+   */
+  // TODO(rnystrom): Use this in more tests that have the same structure.
+  void assertNoErrorsInCode(String code) {
+    Source source = addSource(code);
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  /**
+   * @param code the code that assigns the value to the variable "v", no matter how. We check that
+   *          "v" has expected static and propagated type.
+   */
+  void assertPropagatedAssignedType(String code, DartType expectedStaticType,
+      DartType expectedPropagatedType) {
+    SimpleIdentifier identifier = findMarkedIdentifier(code, "v = ");
+    expect(identifier.staticType, same(expectedStaticType));
+    expect(identifier.propagatedType, same(expectedPropagatedType));
+  }
+
+  /**
+   * @param code the code that iterates using variable "v". We check that
+   *          "v" has expected static and propagated type.
+   */
+  void assertPropagatedIterationType(String code, DartType expectedStaticType,
+      DartType expectedPropagatedType) {
+    SimpleIdentifier identifier = findMarkedIdentifier(code, "v in ");
+    expect(identifier.staticType, same(expectedStaticType));
+    expect(identifier.propagatedType, same(expectedPropagatedType));
+  }
+
+  /**
+   * Check the static and propagated types of the expression marked with "; // marker" comment.
+   *
+   * @param code source code to analyze, with the expression to check marked with "// marker".
+   * @param expectedStaticType if non-null, check actual static type is equal to this.
+   * @param expectedPropagatedType if non-null, check actual static type is equal to this.
+   * @throws Exception
+   */
+  void assertTypeOfMarkedExpression(String code, DartType expectedStaticType,
+      DartType expectedPropagatedType) {
+    SimpleIdentifier identifier = findMarkedIdentifier(code, "; // marker");
+    if (expectedStaticType != null) {
+      expect(identifier.staticType, expectedStaticType);
+    }
+    expect(identifier.propagatedType, expectedPropagatedType);
+  }
+
+  /**
+   * Cache the source file content in the source factory but don't add the source to the analysis
+   * context. The file path should be absolute.
+   *
+   * @param filePath the path of the file being cached
+   * @param contents the contents to be returned by the content provider for the specified file
+   * @return the source object representing the cached file
+   */
+  Source cacheSource(String filePath, String contents) {
+    Source source = new FileBasedSource(FileUtilities2.createFile(filePath));
+    analysisContext2.setContents(source, contents);
+    return source;
+  }
+
+  /**
+   * 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);
+  }
+
+  /**
+   * Computes errors for the given [librarySource].
+   * This assumes that the given [librarySource] and its parts have already
+   * been added to the content provider using the method [addNamedSource].
+   */
+  void computeLibrarySourceErrors(Source librarySource) {
+    analysisContext.computeErrors(librarySource);
+  }
+
+  /**
+   * Create a library element that represents a library named `"test"` containing a single
+   * empty compilation unit.
+   *
+   * @return the library element that was created
+   */
+  LibraryElementImpl createDefaultTestLibrary() =>
+      createTestLibrary(AnalysisContextFactory.contextWithCore(), "test");
+
+  /**
+   * Create a source object representing a file with the given [fileName] and
+   * give it an empty content. Return the source that was created.
+   */
+  FileBasedSource createNamedSource(String fileName) {
+    FileBasedSource source =
+        new FileBasedSource(FileUtilities2.createFile(fileName));
+    analysisContext2.setContents(source, "");
+    return source;
+  }
+
+  /**
+   * Create a library element that represents a library with the given name containing a single
+   * empty compilation unit.
+   *
+   * @param libraryName the name of the library to be created
+   * @return the library element that was created
+   */
+  LibraryElementImpl createTestLibrary(
+      AnalysisContext context, String libraryName,
+      [List<String> typeNames]) {
+    String fileName = "$libraryName.dart";
+    FileBasedSource definingCompilationUnitSource = createNamedSource(fileName);
+    List<CompilationUnitElement> sourcedCompilationUnits;
+    if (typeNames == null) {
+      sourcedCompilationUnits = CompilationUnitElement.EMPTY_LIST;
+    } else {
+      int count = typeNames.length;
+      sourcedCompilationUnits = new List<CompilationUnitElement>(count);
+      for (int i = 0; i < count; i++) {
+        String typeName = typeNames[i];
+        ClassElementImpl type =
+            new ClassElementImpl.forNode(AstFactory.identifier3(typeName));
+        String fileName = "$typeName.dart";
+        CompilationUnitElementImpl compilationUnit =
+            new CompilationUnitElementImpl(fileName);
+        compilationUnit.source = createNamedSource(fileName);
+        compilationUnit.librarySource = definingCompilationUnitSource;
+        compilationUnit.types = <ClassElement>[type];
+        sourcedCompilationUnits[i] = compilationUnit;
+      }
+    }
+    CompilationUnitElementImpl compilationUnit =
+        new CompilationUnitElementImpl(fileName);
+    compilationUnit.librarySource =
+        compilationUnit.source = definingCompilationUnitSource;
+    LibraryElementImpl library = new LibraryElementImpl.forNode(
+        context, AstFactory.libraryIdentifier2([libraryName]));
+    library.definingCompilationUnit = compilationUnit;
+    library.parts = sourcedCompilationUnits;
+    return library;
+  }
+
+  /**
+   * Return the `SimpleIdentifier` marked by `marker`. The source code must have no
+   * errors and be verifiable.
+   *
+   * @param code source code to analyze.
+   * @param marker marker identifying sought after expression in source code.
+   * @return expression marked by the marker.
+   * @throws Exception
+   */
+  SimpleIdentifier findMarkedIdentifier(String code, String marker) {
+    try {
+      Source source = addSource(code);
+      LibraryElement library = resolve2(source);
+      assertNoErrors(source);
+      verify([source]);
+      CompilationUnit unit = resolveCompilationUnit(source, library);
+      // Could generalize this further by making [SimpleIdentifier.class] a
+      // parameter.
+      return EngineTestCase.findNode(
+          unit, code, marker, (node) => node is SimpleIdentifier);
+    } catch (exception) {
+      // Is there a better exception to throw here? The point is that an
+      // assertion failure here should be a failure, in both "test_*" and
+      // "fail_*" tests. However, an assertion failure is success for the
+      // purpose of "fail_*" tests, so without catching them here "fail_*" tests
+      // can succeed by failing for the wrong reason.
+      throw new JavaException("Unexexpected assertion failure: $exception");
+    }
+  }
+
+  Expression findTopLevelConstantExpression(
+          CompilationUnit compilationUnit, String name) =>
+      findTopLevelDeclaration(compilationUnit, name).initializer;
+
+  VariableDeclaration findTopLevelDeclaration(
+      CompilationUnit compilationUnit, String name) {
+    for (CompilationUnitMember member in compilationUnit.declarations) {
+      if (member is TopLevelVariableDeclaration) {
+        for (VariableDeclaration variable in member.variables.variables) {
+          if (variable.name.name == name) {
+            return variable;
+          }
+        }
+      }
+    }
+    return null;
+    // Not found
+  }
+
+  /**
+   * In the rare cases we want to group several tests into single "test_" method, so need a way to
+   * reset test instance to reuse it.
+   */
+  void reset() {
+    analysisContext2 = AnalysisContextFactory.contextWithCore();
+  }
+
+  /**
+   * Reset the analysis context to have the given options applied.
+   *
+   * @param options the analysis options to be applied to the context
+   */
+  void resetWithOptions(AnalysisOptions options) {
+    analysisContext2 =
+        AnalysisContextFactory.contextWithCoreAndOptions(options);
+  }
+
+  /**
+   * 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);
+
+  CompilationUnit resolveSource(String sourceText) =>
+      resolveSource2("/test.dart", sourceText);
+
+  CompilationUnit resolveSource2(String fileName, String sourceText) {
+    Source source = addNamedSource(fileName, sourceText);
+    LibraryElement library = analysisContext.computeLibraryElement(source);
+    return analysisContext.resolveCompilationUnit(source, library);
+  }
+
+  Source resolveSources(List<String> sourceTexts) {
+    for (int i = 0; i < sourceTexts.length; i++) {
+      CompilationUnit unit =
+          resolveSource2("/lib${i + 1}.dart", sourceTexts[i]);
+      // reference the source if this is the last source
+      if (i + 1 == sourceTexts.length) {
+        return unit.element.source;
+      }
+    }
+    return null;
+  }
+
+  void resolveWithAndWithoutExperimental(
+      List<String> strSources,
+      List<ErrorCode> codesWithoutExperimental,
+      List<ErrorCode> codesWithExperimental) {
+    // Setup analysis context as non-experimental
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+//    options.enableDeferredLoading = false;
+    resetWithOptions(options);
+    // Analysis and assertions
+    Source source = resolveSources(strSources);
+    assertErrors(source, codesWithoutExperimental);
+    verify([source]);
+    // Setup analysis context as experimental
+    reset();
+    // Analysis and assertions
+    source = resolveSources(strSources);
+    assertErrors(source, codesWithExperimental);
+    verify([source]);
+  }
+
+  void resolveWithErrors(List<String> strSources, List<ErrorCode> codes) {
+    // Analysis and assertions
+    Source source = resolveSources(strSources);
+    assertErrors(source, codes);
+    verify([source]);
+  }
+
+  @override
+  void setUp() {
+    ElementFactory.flushStaticState();
+    super.setUp();
+    reset();
+  }
+
+  @override
+  void tearDown() {
+    analysisContext2 = null;
+    super.tearDown();
+  }
+
+  /**
+   * Verify that all of the identifiers in the compilation units associated with
+   * the given [sources] have been resolved.
+   */
+  void verify(List<Source> sources) {
+    ResolutionVerifier verifier = new ResolutionVerifier();
+    for (Source source in sources) {
+      List<Source> libraries = analysisContext2.getLibrariesContaining(source);
+      for (Source library in libraries) {
+        analysisContext2
+            .resolveCompilationUnit2(source, library)
+            .accept(verifier);
+      }
+    }
+    verifier.assertResolved();
+  }
+}
+
+/**
+ * Shared infrastructure for [StaticTypeAnalyzer2Test] and
+ * [StrongModeStaticTypeAnalyzer2Test].
+ */
+class StaticTypeAnalyzer2TestShared extends ResolverTestCase {
+  String testCode;
+  Source testSource;
+  CompilationUnit testUnit;
+
+  /**
+   * Looks up the identifier with [name] and validates that its type type
+   * stringifies to [type] and that its generics match the given stringified
+   * output.
+   */
+  expectFunctionType(String name, String type,
+      {String elementTypeParams: '[]',
+      String typeParams: '[]',
+      String typeArgs: '[]',
+      String typeFormals: '[]'}) {
+    SimpleIdentifier identifier = findIdentifier(name);
+    // Element is either ExecutableElement or ParameterElement.
+    var element = identifier.staticElement;
+    FunctionTypeImpl functionType = identifier.staticType;
+    expect(functionType.toString(), type);
+    expect(element.typeParameters.toString(), elementTypeParams);
+    expect(functionType.typeParameters.toString(), typeParams);
+    expect(functionType.typeArguments.toString(), typeArgs);
+    expect(functionType.typeFormals.toString(), typeFormals);
+  }
+
+  /**
+   * Looks up the identifier with [name] and validates its static [type].
+   *
+   * If [type] is a string, validates that the identifier's static type
+   * stringifies to that text. Otherwise, [type] is used directly a [Matcher]
+   * to match the type.
+   *
+   * If [propagatedType] is given, also validate's the identifier's propagated
+   * type.
+   */
+  void expectIdentifierType(String name, type, [propagatedType]) {
+    SimpleIdentifier identifier = findIdentifier(name);
+    _expectType(identifier.staticType, type);
+    if (propagatedType != null) {
+      _expectType(identifier.propagatedType, propagatedType);
+    }
+  }
+
+  /**
+   * Looks up the initializer for the declaration containing [identifier] and
+   * validates its static [type].
+   *
+   * If [type] is a string, validates that the identifier's static type
+   * stringifies to that text. Otherwise, [type] is used directly a [Matcher]
+   * to match the type.
+   *
+   * If [propagatedType] is given, also validate's the identifier's propagated
+   * type.
+   */
+  void expectInitializerType(String name, type, [propagatedType]) {
+    SimpleIdentifier identifier = findIdentifier(name);
+    VariableDeclaration declaration =
+        identifier.getAncestor((node) => node is VariableDeclaration);
+    Expression initializer = declaration.initializer;
+    _expectType(initializer.staticType, type);
+    if (propagatedType != null) {
+      _expectType(initializer.propagatedType, propagatedType);
+    }
+  }
+
+  SimpleIdentifier findIdentifier(String search) {
+    SimpleIdentifier identifier = EngineTestCase.findNode(
+        testUnit, testCode, search, (node) => node is SimpleIdentifier);
+    return identifier;
+  }
+
+  void resolveTestUnit(String code) {
+    testCode = code;
+    testSource = addSource(testCode);
+    LibraryElement library = resolve2(testSource);
+    assertNoErrors(testSource);
+    verify([testSource]);
+    testUnit = resolveCompilationUnit(testSource, library);
+  }
+
+  /**
+   * Validates that [type] matches [expected].
+   *
+   * If [expected] is a string, validates that the type stringifies to that
+   * text. Otherwise, [expected] is used directly a [Matcher] to match the type.
+   */
+  _expectType(DartType type, expected) {
+    if (expected is String) {
+      expect(type.toString(), expected);
+    } else {
+      expect(type, expected);
+    }
+  }
+}
diff --git a/pkg/analyzer/test/generated/simple_resolver_test.dart b/pkg/analyzer/test/generated/simple_resolver_test.dart
new file mode 100644
index 0000000..fcd3a5f
--- /dev/null
+++ b/pkg/analyzer/test/generated/simple_resolver_test.dart
@@ -0,0 +1,1762 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.simple_resolver_test;
+
+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/engine.dart';
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/java_engine.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:unittest/unittest.dart';
+
+import '../reflective_tests.dart';
+import '../utils.dart';
+import 'resolver_test_case.dart';
+import 'test_support.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(SimpleResolverTest);
+}
+
+@reflectiveTest
+class SimpleResolverTest extends ResolverTestCase {
+  void fail_getter_and_setter_fromMixins_property_access() {
+    // TODO(paulberry): it appears that auxiliaryElements isn't properly set on
+    // a SimpleIdentifier that's inside a property access.  This bug should be
+    // fixed.
+    Source source = addSource('''
+class B {}
+class M1 {
+  get x => null;
+  set x(value) {}
+}
+class M2 {
+  get x => null;
+  set x(value) {}
+}
+class C extends B with M1, M2 {}
+void main() {
+  new C().x += 1;
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that both the getter and setter for "x" in "new C().x" refer to
+    // the accessors defined in M2.
+    FunctionDeclaration main =
+        library.definingCompilationUnit.functions[0].computeNode();
+    BlockFunctionBody body = main.functionExpression.body;
+    ExpressionStatement stmt = body.block.statements[0];
+    AssignmentExpression assignment = stmt.expression;
+    PropertyAccess propertyAccess = assignment.leftHandSide;
+    expect(
+        propertyAccess.propertyName.staticElement.enclosingElement.name, 'M2');
+    expect(
+        propertyAccess
+            .propertyName.auxiliaryElements.staticElement.enclosingElement.name,
+        'M2');
+  }
+
+  void fail_staticInvocation() {
+    Source source = addSource(r'''
+class A {
+  static int get g => (a,b) => 0;
+}
+class B {
+  f() {
+    A.g(1,0);
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_argumentResolution_required_matching() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2, 3);
+  }
+  void g(a, b, c) {}
+}''');
+    _validateArgumentResolution(source, [0, 1, 2]);
+  }
+
+  void test_argumentResolution_required_tooFew() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2);
+  }
+  void g(a, b, c) {}
+}''');
+    _validateArgumentResolution(source, [0, 1]);
+  }
+
+  void test_argumentResolution_required_tooMany() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2, 3);
+  }
+  void g(a, b) {}
+}''');
+    _validateArgumentResolution(source, [0, 1, -1]);
+  }
+
+  void test_argumentResolution_requiredAndNamed_extra() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2, c: 3, d: 4);
+  }
+  void g(a, b, {c}) {}
+}''');
+    _validateArgumentResolution(source, [0, 1, 2, -1]);
+  }
+
+  void test_argumentResolution_requiredAndNamed_matching() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2, c: 3);
+  }
+  void g(a, b, {c}) {}
+}''');
+    _validateArgumentResolution(source, [0, 1, 2]);
+  }
+
+  void test_argumentResolution_requiredAndNamed_missing() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2, d: 3);
+  }
+  void g(a, b, {c, d}) {}
+}''');
+    _validateArgumentResolution(source, [0, 1, 3]);
+  }
+
+  void test_argumentResolution_requiredAndPositional_fewer() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2, 3);
+  }
+  void g(a, b, [c, d]) {}
+}''');
+    _validateArgumentResolution(source, [0, 1, 2]);
+  }
+
+  void test_argumentResolution_requiredAndPositional_matching() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2, 3, 4);
+  }
+  void g(a, b, [c, d]) {}
+}''');
+    _validateArgumentResolution(source, [0, 1, 2, 3]);
+  }
+
+  void test_argumentResolution_requiredAndPositional_more() {
+    Source source = addSource(r'''
+class A {
+  void f() {
+    g(1, 2, 3, 4);
+  }
+  void g(a, b, [c]) {}
+}''');
+    _validateArgumentResolution(source, [0, 1, 2, -1]);
+  }
+
+  void test_argumentResolution_setter_propagated() {
+    Source source = addSource(r'''
+main() {
+  var a = new A();
+  a.sss = 0;
+}
+class A {
+  set sss(x) {}
+}''');
+    LibraryElement library = resolve2(source);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    // find "a.sss = 0"
+    AssignmentExpression assignment;
+    {
+      FunctionElement mainElement = unit.functions[0];
+      FunctionBody mainBody = mainElement.computeNode().functionExpression.body;
+      Statement statement = (mainBody as BlockFunctionBody).block.statements[1];
+      ExpressionStatement expressionStatement =
+          statement as ExpressionStatement;
+      assignment = expressionStatement.expression as AssignmentExpression;
+    }
+    // get parameter
+    Expression rhs = assignment.rightHandSide;
+    expect(rhs.staticParameterElement, isNull);
+    ParameterElement parameter = rhs.propagatedParameterElement;
+    expect(parameter, isNotNull);
+    expect(parameter.displayName, "x");
+    // validate
+    ClassElement classA = unit.types[0];
+    PropertyAccessorElement setter = classA.accessors[0];
+    expect(setter.parameters[0], same(parameter));
+  }
+
+  void test_argumentResolution_setter_propagated_propertyAccess() {
+    Source source = addSource(r'''
+main() {
+  var a = new A();
+  a.b.sss = 0;
+}
+class A {
+  B b = new B();
+}
+class B {
+  set sss(x) {}
+}''');
+    LibraryElement library = resolve2(source);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    // find "a.b.sss = 0"
+    AssignmentExpression assignment;
+    {
+      FunctionElement mainElement = unit.functions[0];
+      FunctionBody mainBody = mainElement.computeNode().functionExpression.body;
+      Statement statement = (mainBody as BlockFunctionBody).block.statements[1];
+      ExpressionStatement expressionStatement =
+          statement as ExpressionStatement;
+      assignment = expressionStatement.expression as AssignmentExpression;
+    }
+    // get parameter
+    Expression rhs = assignment.rightHandSide;
+    expect(rhs.staticParameterElement, isNull);
+    ParameterElement parameter = rhs.propagatedParameterElement;
+    expect(parameter, isNotNull);
+    expect(parameter.displayName, "x");
+    // validate
+    ClassElement classB = unit.types[1];
+    PropertyAccessorElement setter = classB.accessors[0];
+    expect(setter.parameters[0], same(parameter));
+  }
+
+  void test_argumentResolution_setter_static() {
+    Source source = addSource(r'''
+main() {
+  A a = new A();
+  a.sss = 0;
+}
+class A {
+  set sss(x) {}
+}''');
+    LibraryElement library = resolve2(source);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    // find "a.sss = 0"
+    AssignmentExpression assignment;
+    {
+      FunctionElement mainElement = unit.functions[0];
+      FunctionBody mainBody = mainElement.computeNode().functionExpression.body;
+      Statement statement = (mainBody as BlockFunctionBody).block.statements[1];
+      ExpressionStatement expressionStatement =
+          statement as ExpressionStatement;
+      assignment = expressionStatement.expression as AssignmentExpression;
+    }
+    // get parameter
+    Expression rhs = assignment.rightHandSide;
+    ParameterElement parameter = rhs.staticParameterElement;
+    expect(parameter, isNotNull);
+    expect(parameter.displayName, "x");
+    // validate
+    ClassElement classA = unit.types[0];
+    PropertyAccessorElement setter = classA.accessors[0];
+    expect(setter.parameters[0], same(parameter));
+  }
+
+  void test_argumentResolution_setter_static_propertyAccess() {
+    Source source = addSource(r'''
+main() {
+  A a = new A();
+  a.b.sss = 0;
+}
+class A {
+  B b = new B();
+}
+class B {
+  set sss(x) {}
+}''');
+    LibraryElement library = resolve2(source);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    // find "a.b.sss = 0"
+    AssignmentExpression assignment;
+    {
+      FunctionElement mainElement = unit.functions[0];
+      FunctionBody mainBody = mainElement.computeNode().functionExpression.body;
+      Statement statement = (mainBody as BlockFunctionBody).block.statements[1];
+      ExpressionStatement expressionStatement =
+          statement as ExpressionStatement;
+      assignment = expressionStatement.expression as AssignmentExpression;
+    }
+    // get parameter
+    Expression rhs = assignment.rightHandSide;
+    ParameterElement parameter = rhs.staticParameterElement;
+    expect(parameter, isNotNull);
+    expect(parameter.displayName, "x");
+    // validate
+    ClassElement classB = unit.types[1];
+    PropertyAccessorElement setter = classB.accessors[0];
+    expect(setter.parameters[0], same(parameter));
+  }
+
+  void test_breakTarget_labeled() {
+    // Verify that the target of the label is correctly found and is recorded
+    // as the unlabeled portion of the statement.
+    String text = r'''
+void f() {
+  loop1: while (true) {
+    loop2: for (int i = 0; i < 10; i++) {
+      break loop1;
+      break loop2;
+    }
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    WhileStatement whileStatement = EngineTestCase.findNode(
+        unit, text, 'while (true)', (n) => n is WhileStatement);
+    ForStatement forStatement =
+        EngineTestCase.findNode(unit, text, 'for', (n) => n is ForStatement);
+    BreakStatement break1 = EngineTestCase.findNode(
+        unit, text, 'break loop1', (n) => n is BreakStatement);
+    BreakStatement break2 = EngineTestCase.findNode(
+        unit, text, 'break loop2', (n) => n is BreakStatement);
+    expect(break1.target, same(whileStatement));
+    expect(break2.target, same(forStatement));
+  }
+
+  void test_breakTarget_unlabeledBreakFromDo() {
+    String text = r'''
+void f() {
+  do {
+    break;
+  } while (true);
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    DoStatement doStatement =
+        EngineTestCase.findNode(unit, text, 'do', (n) => n is DoStatement);
+    BreakStatement breakStatement = EngineTestCase.findNode(
+        unit, text, 'break', (n) => n is BreakStatement);
+    expect(breakStatement.target, same(doStatement));
+  }
+
+  void test_breakTarget_unlabeledBreakFromFor() {
+    String text = r'''
+void f() {
+  for (int i = 0; i < 10; i++) {
+    break;
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    ForStatement forStatement =
+        EngineTestCase.findNode(unit, text, 'for', (n) => n is ForStatement);
+    BreakStatement breakStatement = EngineTestCase.findNode(
+        unit, text, 'break', (n) => n is BreakStatement);
+    expect(breakStatement.target, same(forStatement));
+  }
+
+  void test_breakTarget_unlabeledBreakFromForEach() {
+    String text = r'''
+void f() {
+  for (x in []) {
+    break;
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    ForEachStatement forStatement = EngineTestCase.findNode(
+        unit, text, 'for', (n) => n is ForEachStatement);
+    BreakStatement breakStatement = EngineTestCase.findNode(
+        unit, text, 'break', (n) => n is BreakStatement);
+    expect(breakStatement.target, same(forStatement));
+  }
+
+  void test_breakTarget_unlabeledBreakFromSwitch() {
+    String text = r'''
+void f() {
+  while (true) {
+    switch (0) {
+      case 0:
+        break;
+    }
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    SwitchStatement switchStatement = EngineTestCase.findNode(
+        unit, text, 'switch', (n) => n is SwitchStatement);
+    BreakStatement breakStatement = EngineTestCase.findNode(
+        unit, text, 'break', (n) => n is BreakStatement);
+    expect(breakStatement.target, same(switchStatement));
+  }
+
+  void test_breakTarget_unlabeledBreakFromWhile() {
+    String text = r'''
+void f() {
+  while (true) {
+    break;
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    WhileStatement whileStatement = EngineTestCase.findNode(
+        unit, text, 'while', (n) => n is WhileStatement);
+    BreakStatement breakStatement = EngineTestCase.findNode(
+        unit, text, 'break', (n) => n is BreakStatement);
+    expect(breakStatement.target, same(whileStatement));
+  }
+
+  void test_breakTarget_unlabeledBreakToOuterFunction() {
+    // Verify that unlabeled break statements can't resolve to loops in an
+    // outer function.
+    String text = r'''
+void f() {
+  while (true) {
+    void g() {
+      break;
+    }
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    BreakStatement breakStatement = EngineTestCase.findNode(
+        unit, text, 'break', (n) => n is BreakStatement);
+    expect(breakStatement.target, isNull);
+  }
+
+  void test_class_definesCall() {
+    Source source = addSource(r'''
+class A {
+  int call(int x) { return x; }
+}
+int f(A a) {
+  return a(0);
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_class_extends_implements() {
+    Source source = addSource(r'''
+class A extends B implements C {}
+class B {}
+class C {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_commentReference_class() {
+    Source source = addSource(r'''
+f() {}
+/** [A] [new A] [A.n] [new A.n] [m] [f] */
+class A {
+  A() {}
+  A.n() {}
+  m() {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_commentReference_parameter() {
+    Source source = addSource(r'''
+class A {
+  A() {}
+  A.n() {}
+  /** [e] [f] */
+  m(e, f()) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_commentReference_singleLine() {
+    Source source = addSource(r'''
+/// [A]
+class A {}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_continueTarget_labeled() {
+    // Verify that the target of the label is correctly found and is recorded
+    // as the unlabeled portion of the statement.
+    String text = r'''
+void f() {
+  loop1: while (true) {
+    loop2: for (int i = 0; i < 10; i++) {
+      continue loop1;
+      continue loop2;
+    }
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    WhileStatement whileStatement = EngineTestCase.findNode(
+        unit, text, 'while (true)', (n) => n is WhileStatement);
+    ForStatement forStatement =
+        EngineTestCase.findNode(unit, text, 'for', (n) => n is ForStatement);
+    ContinueStatement continue1 = EngineTestCase.findNode(
+        unit, text, 'continue loop1', (n) => n is ContinueStatement);
+    ContinueStatement continue2 = EngineTestCase.findNode(
+        unit, text, 'continue loop2', (n) => n is ContinueStatement);
+    expect(continue1.target, same(whileStatement));
+    expect(continue2.target, same(forStatement));
+  }
+
+  void test_continueTarget_unlabeledContinueFromDo() {
+    String text = r'''
+void f() {
+  do {
+    continue;
+  } while (true);
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    DoStatement doStatement =
+        EngineTestCase.findNode(unit, text, 'do', (n) => n is DoStatement);
+    ContinueStatement continueStatement = EngineTestCase.findNode(
+        unit, text, 'continue', (n) => n is ContinueStatement);
+    expect(continueStatement.target, same(doStatement));
+  }
+
+  void test_continueTarget_unlabeledContinueFromFor() {
+    String text = r'''
+void f() {
+  for (int i = 0; i < 10; i++) {
+    continue;
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    ForStatement forStatement =
+        EngineTestCase.findNode(unit, text, 'for', (n) => n is ForStatement);
+    ContinueStatement continueStatement = EngineTestCase.findNode(
+        unit, text, 'continue', (n) => n is ContinueStatement);
+    expect(continueStatement.target, same(forStatement));
+  }
+
+  void test_continueTarget_unlabeledContinueFromForEach() {
+    String text = r'''
+void f() {
+  for (x in []) {
+    continue;
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    ForEachStatement forStatement = EngineTestCase.findNode(
+        unit, text, 'for', (n) => n is ForEachStatement);
+    ContinueStatement continueStatement = EngineTestCase.findNode(
+        unit, text, 'continue', (n) => n is ContinueStatement);
+    expect(continueStatement.target, same(forStatement));
+  }
+
+  void test_continueTarget_unlabeledContinueFromWhile() {
+    String text = r'''
+void f() {
+  while (true) {
+    continue;
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    WhileStatement whileStatement = EngineTestCase.findNode(
+        unit, text, 'while', (n) => n is WhileStatement);
+    ContinueStatement continueStatement = EngineTestCase.findNode(
+        unit, text, 'continue', (n) => n is ContinueStatement);
+    expect(continueStatement.target, same(whileStatement));
+  }
+
+  void test_continueTarget_unlabeledContinueSkipsSwitch() {
+    String text = r'''
+void f() {
+  while (true) {
+    switch (0) {
+      case 0:
+        continue;
+    }
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    WhileStatement whileStatement = EngineTestCase.findNode(
+        unit, text, 'while', (n) => n is WhileStatement);
+    ContinueStatement continueStatement = EngineTestCase.findNode(
+        unit, text, 'continue', (n) => n is ContinueStatement);
+    expect(continueStatement.target, same(whileStatement));
+  }
+
+  void test_continueTarget_unlabeledContinueToOuterFunction() {
+    // Verify that unlabeled continue statements can't resolve to loops in an
+    // outer function.
+    String text = r'''
+void f() {
+  while (true) {
+    void g() {
+      continue;
+    }
+  }
+}
+''';
+    CompilationUnit unit = resolveSource(text);
+    ContinueStatement continueStatement = EngineTestCase.findNode(
+        unit, text, 'continue', (n) => n is ContinueStatement);
+    expect(continueStatement.target, isNull);
+  }
+
+  void test_empty() {
+    Source source = addSource("");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_entryPoint_exported() {
+    addNamedSource(
+        "/two.dart",
+        r'''
+library two;
+main() {}''');
+    Source source = addNamedSource(
+        "/one.dart",
+        r'''
+library one;
+export 'two.dart';''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    FunctionElement main = library.entryPoint;
+    expect(main, isNotNull);
+    expect(main.library, isNot(same(library)));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_entryPoint_local() {
+    Source source = addNamedSource(
+        "/one.dart",
+        r'''
+library one;
+main() {}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    FunctionElement main = library.entryPoint;
+    expect(main, isNotNull);
+    expect(main.library, same(library));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_entryPoint_none() {
+    Source source = addNamedSource("/one.dart", "library one;");
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    expect(library.entryPoint, isNull);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_enum_externalLibrary() {
+    addNamedSource(
+        "/my_lib.dart",
+        r'''
+library my_lib;
+enum EEE {A, B, C}''');
+    Source source = addSource(r'''
+import 'my_lib.dart';
+main() {
+  EEE e = null;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_extractedMethodAsConstant() {
+    Source source = addSource(r'''
+abstract class Comparable<T> {
+  int compareTo(T other);
+  static int compare(Comparable a, Comparable b) => a.compareTo(b);
+}
+class A {
+  void sort([compare = Comparable.compare]) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_fieldFormalParameter() {
+    Source source = addSource(r'''
+class A {
+  int x;
+  A(this.x) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_forEachLoops_nonConflicting() {
+    Source source = addSource(r'''
+f() {
+  List list = [1,2,3];
+  for (int x in list) {}
+  for (int x in list) {}
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_forLoops_nonConflicting() {
+    Source source = addSource(r'''
+f() {
+  for (int i = 0; i < 3; i++) {
+  }
+  for (int i = 0; i < 3; i++) {
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_functionTypeAlias() {
+    Source source = addSource(r'''
+typedef bool P(e);
+class A {
+  P p;
+  m(e) {
+    if (p(e)) {}
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_getter_and_setter_fromMixins_bare_identifier() {
+    Source source = addSource('''
+class B {}
+class M1 {
+  get x => null;
+  set x(value) {}
+}
+class M2 {
+  get x => null;
+  set x(value) {}
+}
+class C extends B with M1, M2 {
+  void f() {
+    x += 1;
+  }
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that both the getter and setter for "x" in C.f() refer to the
+    // accessors defined in M2.
+    ClassElement classC = library.definingCompilationUnit.types[3];
+    MethodDeclaration f = classC.getMethod('f').computeNode();
+    BlockFunctionBody body = f.body;
+    ExpressionStatement stmt = body.block.statements[0];
+    AssignmentExpression assignment = stmt.expression;
+    SimpleIdentifier leftHandSide = assignment.leftHandSide;
+    expect(leftHandSide.staticElement.enclosingElement.name, 'M2');
+    expect(leftHandSide.auxiliaryElements.staticElement.enclosingElement.name,
+        'M2');
+  }
+
+  void test_getter_fromMixins_bare_identifier() {
+    Source source = addSource('''
+class B {}
+class M1 {
+  get x => null;
+}
+class M2 {
+  get x => null;
+}
+class C extends B with M1, M2 {
+  f() {
+    return x;
+  }
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that the getter for "x" in C.f() refers to the getter defined in
+    // M2.
+    ClassElement classC = library.definingCompilationUnit.types[3];
+    MethodDeclaration f = classC.getMethod('f').computeNode();
+    BlockFunctionBody body = f.body;
+    ReturnStatement stmt = body.block.statements[0];
+    SimpleIdentifier x = stmt.expression;
+    expect(x.staticElement.enclosingElement.name, 'M2');
+  }
+
+  void test_getter_fromMixins_property_access() {
+    Source source = addSource('''
+class B {}
+class M1 {
+  get x => null;
+}
+class M2 {
+  get x => null;
+}
+class C extends B with M1, M2 {}
+void main() {
+  var y = new C().x;
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that the getter for "x" in "new C().x" refers to the getter
+    // defined in M2.
+    FunctionDeclaration main =
+        library.definingCompilationUnit.functions[0].computeNode();
+    BlockFunctionBody body = main.functionExpression.body;
+    VariableDeclarationStatement stmt = body.block.statements[0];
+    PropertyAccess propertyAccess = stmt.variables.variables[0].initializer;
+    expect(
+        propertyAccess.propertyName.staticElement.enclosingElement.name, 'M2');
+  }
+
+  void test_getterAndSetterWithDifferentTypes() {
+    Source source = addSource(r'''
+class A {
+  int get f => 0;
+  void set f(String s) {}
+}
+g (A a) {
+  a.f = a.f.toString();
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(
+        source, [StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]);
+    verify([source]);
+  }
+
+  void test_hasReferenceToSuper() {
+    Source source = addSource(r'''
+class A {}
+class B {toString() => super.toString();}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<ClassElement> classes = unit.types;
+    expect(classes, hasLength(2));
+    expect(classes[0].hasReferenceToSuper, isFalse);
+    expect(classes[1].hasReferenceToSuper, isTrue);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_import_hide() {
+    addNamedSource(
+        "/lib1.dart",
+        r'''
+library lib1;
+set foo(value) {}
+class A {}''');
+    addNamedSource(
+        "/lib2.dart",
+        r'''
+library lib2;
+set foo(value) {}''');
+    Source source = addNamedSource(
+        "/lib3.dart",
+        r'''
+import 'lib1.dart' hide foo;
+import 'lib2.dart';
+
+main() {
+  foo = 0;
+}
+A a;''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_import_prefix() {
+    addNamedSource(
+        "/two.dart",
+        r'''
+library two;
+f(int x) {
+  return x * x;
+}''');
+    Source source = addNamedSource(
+        "/one.dart",
+        r'''
+library one;
+import 'two.dart' as _two;
+main() {
+  _two.f(0);
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_import_spaceInUri() {
+    addNamedSource(
+        "/sub folder/lib.dart",
+        r'''
+library lib;
+foo() {}''');
+    Source source = addNamedSource(
+        "/app.dart",
+        r'''
+import 'sub folder/lib.dart';
+
+main() {
+  foo();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_indexExpression_typeParameters() {
+    Source source = addSource(r'''
+f() {
+  List<int> a;
+  a[0];
+  List<List<int>> b;
+  b[0][0];
+  List<List<List<int>>> c;
+  c[0][0][0];
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_indexExpression_typeParameters_invalidAssignmentWarning() {
+    Source source = addSource(r'''
+f() {
+  List<List<int>> b;
+  b[0][0] = 'hi';
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+    verify([source]);
+  }
+
+  void test_indirectOperatorThroughCall() {
+    Source source = addSource(r'''
+class A {
+  B call() { return new B(); }
+}
+
+class B {
+  int operator [](int i) { return i; }
+}
+
+A f = new A();
+
+g(int x) {}
+
+main() {
+  g(f()[0]);
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_invoke_dynamicThroughGetter() {
+    Source source = addSource(r'''
+class A {
+  List get X => [() => 0];
+  m(A a) {
+    X.last;
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_isValidMixin_badSuperclass() {
+    Source source = addSource(r'''
+class A extends B {}
+class B {}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isFalse);
+    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
+    verify([source]);
+  }
+
+  void test_isValidMixin_badSuperclass_withSuperMixins() {
+    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
+    Source source = addSource(r'''
+class A extends B {}
+class B {}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isTrue);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_isValidMixin_constructor() {
+    Source source = addSource(r'''
+class A {
+  A() {}
+}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isFalse);
+    assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+    verify([source]);
+  }
+
+  void test_isValidMixin_constructor_withSuperMixins() {
+    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
+    Source source = addSource(r'''
+class A {
+  A() {}
+}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isFalse);
+    assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+    verify([source]);
+  }
+
+  void test_isValidMixin_factoryConstructor() {
+    Source source = addSource(r'''
+class A {
+  factory A() => null;
+}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isTrue);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_isValidMixin_factoryConstructor_withSuperMixins() {
+    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
+    Source source = addSource(r'''
+class A {
+  factory A() => null;
+}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isTrue);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_isValidMixin_super() {
+    Source source = addSource(r'''
+class A {
+  toString() {
+    return super.toString();
+  }
+}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isFalse);
+    assertErrors(source, [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
+    verify([source]);
+  }
+
+  void test_isValidMixin_super_withSuperMixins() {
+    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
+    Source source = addSource(r'''
+class A {
+  toString() {
+    return super.toString();
+  }
+}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isTrue);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_isValidMixin_valid() {
+    Source source = addSource('''
+class A {}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isTrue);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_isValidMixin_valid_withSuperMixins() {
+    resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
+    Source source = addSource('''
+class A {}
+class C = Object with A;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    ClassElement a = unit.getType('A');
+    expect(a.isValidMixin, isTrue);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_labels_switch() {
+    Source source = addSource(r'''
+void doSwitch(int target) {
+  switch (target) {
+    l0: case 0:
+      continue l1;
+    l1: case 1:
+      continue l0;
+    default:
+      continue l1;
+  }
+}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_localVariable_types_invoked() {
+    Source source = addSource(r'''
+const A = null;
+main() {
+  var myVar = (int p) => 'foo';
+  myVar(42);
+}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnit unit =
+        analysisContext.resolveCompilationUnit(source, library);
+    expect(unit, isNotNull);
+    List<bool> found = [false];
+    List<CaughtException> thrownException = new List<CaughtException>(1);
+    unit.accept(new _SimpleResolverTest_localVariable_types_invoked(
+        this, found, thrownException));
+    if (thrownException[0] != null) {
+      throw new AnalysisException(
+          "Exception", new CaughtException(thrownException[0], null));
+    }
+    expect(found[0], isTrue);
+  }
+
+  void test_metadata_class() {
+    Source source = addSource(r'''
+const A = null;
+@A class C<A> {}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unitElement = library.definingCompilationUnit;
+    expect(unitElement, isNotNull);
+    List<ClassElement> classes = unitElement.types;
+    expect(classes, hasLength(1));
+    List<ElementAnnotation> annotations = classes[0].metadata;
+    expect(annotations, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = resolveCompilationUnit(source, library);
+    NodeList<CompilationUnitMember> declarations = unit.declarations;
+    expect(declarations, hasLength(2));
+    Element expectedElement = (declarations[0] as TopLevelVariableDeclaration)
+        .variables
+        .variables[0]
+        .name
+        .staticElement;
+    EngineTestCase.assertInstanceOf((obj) => obj is PropertyInducingElement,
+        PropertyInducingElement, expectedElement);
+    expectedElement = (expectedElement as PropertyInducingElement).getter;
+    Element actualElement =
+        (declarations[1] as ClassDeclaration).metadata[0].name.staticElement;
+    expect(actualElement, same(expectedElement));
+  }
+
+  void test_metadata_field() {
+    Source source = addSource(r'''
+const A = null;
+class C {
+  @A int f;
+}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<ClassElement> classes = unit.types;
+    expect(classes, hasLength(1));
+    FieldElement field = classes[0].fields[0];
+    List<ElementAnnotation> annotations = field.metadata;
+    expect(annotations, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_fieldFormalParameter() {
+    Source source = addSource(r'''
+const A = null;
+class C {
+  int f;
+  C(@A this.f);
+}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<ClassElement> classes = unit.types;
+    expect(classes, hasLength(1));
+    List<ConstructorElement> constructors = classes[0].constructors;
+    expect(constructors, hasLength(1));
+    List<ParameterElement> parameters = constructors[0].parameters;
+    expect(parameters, hasLength(1));
+    List<ElementAnnotation> annotations = parameters[0].metadata;
+    expect(annotations, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_function() {
+    Source source = addSource(r'''
+const A = null;
+@A f() {}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<FunctionElement> functions = unit.functions;
+    expect(functions, hasLength(1));
+    List<ElementAnnotation> annotations = functions[0].metadata;
+    expect(annotations, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_functionTypedParameter() {
+    Source source = addSource(r'''
+const A = null;
+f(@A int p(int x)) {}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<FunctionElement> functions = unit.functions;
+    expect(functions, hasLength(1));
+    List<ParameterElement> parameters = functions[0].parameters;
+    expect(parameters, hasLength(1));
+    List<ElementAnnotation> annotations1 = parameters[0].metadata;
+    expect(annotations1, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_libraryDirective() {
+    Source source = addSource(r'''
+@A library lib;
+const A = null;''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    List<ElementAnnotation> annotations = library.metadata;
+    expect(annotations, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_method() {
+    Source source = addSource(r'''
+const A = null;
+class C {
+  @A void m() {}
+}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<ClassElement> classes = unit.types;
+    expect(classes, hasLength(1));
+    MethodElement method = classes[0].methods[0];
+    List<ElementAnnotation> annotations = method.metadata;
+    expect(annotations, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_namedParameter() {
+    Source source = addSource(r'''
+const A = null;
+f({@A int p : 0}) {}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<FunctionElement> functions = unit.functions;
+    expect(functions, hasLength(1));
+    List<ParameterElement> parameters = functions[0].parameters;
+    expect(parameters, hasLength(1));
+    List<ElementAnnotation> annotations1 = parameters[0].metadata;
+    expect(annotations1, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_positionalParameter() {
+    Source source = addSource(r'''
+const A = null;
+f([@A int p = 0]) {}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<FunctionElement> functions = unit.functions;
+    expect(functions, hasLength(1));
+    List<ParameterElement> parameters = functions[0].parameters;
+    expect(parameters, hasLength(1));
+    List<ElementAnnotation> annotations1 = parameters[0].metadata;
+    expect(annotations1, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_simpleParameter() {
+    Source source = addSource(r'''
+const A = null;
+f(@A p1, @A int p2) {}''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unit = library.definingCompilationUnit;
+    expect(unit, isNotNull);
+    List<FunctionElement> functions = unit.functions;
+    expect(functions, hasLength(1));
+    List<ParameterElement> parameters = functions[0].parameters;
+    expect(parameters, hasLength(2));
+    List<ElementAnnotation> annotations1 = parameters[0].metadata;
+    expect(annotations1, hasLength(1));
+    List<ElementAnnotation> annotations2 = parameters[1].metadata;
+    expect(annotations2, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_metadata_typedef() {
+    Source source = addSource(r'''
+const A = null;
+@A typedef F<A>();''');
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    CompilationUnitElement unitElement = library.definingCompilationUnit;
+    expect(unitElement, isNotNull);
+    List<FunctionTypeAliasElement> aliases = unitElement.functionTypeAliases;
+    expect(aliases, hasLength(1));
+    List<ElementAnnotation> annotations = aliases[0].metadata;
+    expect(annotations, hasLength(1));
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = resolveCompilationUnit(source, library);
+    NodeList<CompilationUnitMember> declarations = unit.declarations;
+    expect(declarations, hasLength(2));
+    Element expectedElement = (declarations[0] as TopLevelVariableDeclaration)
+        .variables
+        .variables[0]
+        .name
+        .staticElement;
+    EngineTestCase.assertInstanceOf((obj) => obj is PropertyInducingElement,
+        PropertyInducingElement, expectedElement);
+    expectedElement = (expectedElement as PropertyInducingElement).getter;
+    Element actualElement =
+        (declarations[1] as FunctionTypeAlias).metadata[0].name.staticElement;
+    expect(actualElement, same(expectedElement));
+  }
+
+  void test_method_fromMixin() {
+    Source source = addSource(r'''
+class B {
+  bar() => 1;
+}
+class A {
+  foo() => 2;
+}
+
+class C extends B with A {
+  bar() => super.bar();
+  foo() => super.foo();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_method_fromMixins() {
+    Source source = addSource('''
+class B {}
+class M1 {
+  void f() {}
+}
+class M2 {
+  void f() {}
+}
+class C extends B with M1, M2 {}
+void main() {
+  new C().f();
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that the "f" in "new C().f()" refers to the "f" defined in M2.
+    FunctionDeclaration main =
+        library.definingCompilationUnit.functions[0].computeNode();
+    BlockFunctionBody body = main.functionExpression.body;
+    ExpressionStatement stmt = body.block.statements[0];
+    MethodInvocation expr = stmt.expression;
+    expect(expr.methodName.staticElement.enclosingElement.name, 'M2');
+  }
+
+  void test_method_fromMixins_bare_identifier() {
+    Source source = addSource('''
+class B {}
+class M1 {
+  void f() {}
+}
+class M2 {
+  void f() {}
+}
+class C extends B with M1, M2 {
+  void g() {
+    f();
+  }
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that the call to f() in C.g() refers to the method defined in M2.
+    ClassElement classC = library.definingCompilationUnit.types[3];
+    MethodDeclaration g = classC.getMethod('g').computeNode();
+    BlockFunctionBody body = g.body;
+    ExpressionStatement stmt = body.block.statements[0];
+    MethodInvocation invocation = stmt.expression;
+    SimpleIdentifier methodName = invocation.methodName;
+    expect(methodName.staticElement.enclosingElement.name, 'M2');
+  }
+
+  void test_method_fromMixins_invked_from_outside_class() {
+    Source source = addSource('''
+class B {}
+class M1 {
+  void f() {}
+}
+class M2 {
+  void f() {}
+}
+class C extends B with M1, M2 {}
+void main() {
+  new C().f();
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that the call to f() in "new C().f()" refers to the method
+    // defined in M2.
+    FunctionDeclaration main =
+        library.definingCompilationUnit.functions[0].computeNode();
+    BlockFunctionBody body = main.functionExpression.body;
+    ExpressionStatement stmt = body.block.statements[0];
+    MethodInvocation invocation = stmt.expression;
+    expect(invocation.methodName.staticElement.enclosingElement.name, 'M2');
+  }
+
+  void test_method_fromSuperclassMixin() {
+    Source source = addSource(r'''
+class A {
+  void m1() {}
+}
+class B extends Object with A {
+}
+class C extends B {
+}
+f(C c) {
+  c.m1();
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_methodCascades() {
+    Source source = addSource(r'''
+class A {
+  void m1() {}
+  void m2() {}
+  void m() {
+    A a = new A();
+    a..m1()
+     ..m2();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_methodCascades_withSetter() {
+    Source source = addSource(r'''
+class A {
+  String name;
+  void m1() {}
+  void m2() {}
+  void m() {
+    A a = new A();
+    a..m1()
+     ..name = 'name'
+     ..m2();
+  }
+}''');
+    computeLibrarySourceErrors(source);
+    // failing with error code: INVOCATION_OF_NON_FUNCTION
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_resolveAgainstNull() {
+    Source source = addSource(r'''
+f(var p) {
+  return null == p;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+  }
+
+  void test_setter_fromMixins_bare_identifier() {
+    Source source = addSource('''
+class B {}
+class M1 {
+  set x(value) {}
+}
+class M2 {
+  set x(value) {}
+}
+class C extends B with M1, M2 {
+  void f() {
+    x = 1;
+  }
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that the setter for "x" in C.f() refers to the setter defined in
+    // M2.
+    ClassElement classC = library.definingCompilationUnit.types[3];
+    MethodDeclaration f = classC.getMethod('f').computeNode();
+    BlockFunctionBody body = f.body;
+    ExpressionStatement stmt = body.block.statements[0];
+    AssignmentExpression assignment = stmt.expression;
+    SimpleIdentifier leftHandSide = assignment.leftHandSide;
+    expect(leftHandSide.staticElement.enclosingElement.name, 'M2');
+  }
+
+  void test_setter_fromMixins_property_access() {
+    Source source = addSource('''
+class B {}
+class M1 {
+  set x(value) {}
+}
+class M2 {
+  set x(value) {}
+}
+class C extends B with M1, M2 {}
+void main() {
+  new C().x = 1;
+}
+''');
+    LibraryElement library = resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+    // Verify that the setter for "x" in "new C().x" refers to the setter
+    // defined in M2.
+    FunctionDeclaration main =
+        library.definingCompilationUnit.functions[0].computeNode();
+    BlockFunctionBody body = main.functionExpression.body;
+    ExpressionStatement stmt = body.block.statements[0];
+    AssignmentExpression assignment = stmt.expression;
+    PropertyAccess propertyAccess = assignment.leftHandSide;
+    expect(
+        propertyAccess.propertyName.staticElement.enclosingElement.name, 'M2');
+  }
+
+  void test_setter_inherited() {
+    Source source = addSource(r'''
+class A {
+  int get x => 0;
+  set x(int p) {}
+}
+class B extends A {
+  int get x => super.x == null ? 0 : super.x;
+  int f() => x = 1;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_setter_static() {
+    Source source = addSource(r'''
+set s(x) {
+}
+
+main() {
+  s = 123;
+}''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  /**
+   * Resolve the given source and verify that the arguments in a specific method invocation were
+   * correctly resolved.
+   *
+   * The source is expected to be source for a compilation unit, the first declaration is expected
+   * to be a class, the first member of which is expected to be a method with a block body, and the
+   * first statement in the body is expected to be an expression statement whose expression is a
+   * method invocation. It is the arguments to that method invocation that are tested. The method
+   * invocation can contain errors.
+   *
+   * The arguments were resolved correctly if the number of expressions in the list matches the
+   * length of the array of indices and if, for each index in the array of indices, the parameter to
+   * which the argument expression was resolved is the parameter in the invoked method's list of
+   * parameters at that index. Arguments that should not be resolved to a parameter because of an
+   * error can be denoted by including a negative index in the array of indices.
+   *
+   * @param source the source to be resolved
+   * @param indices the array of indices used to associate arguments with parameters
+   * @throws Exception if the source could not be resolved or if the structure of the source is not
+   *           valid
+   */
+  void _validateArgumentResolution(Source source, List<int> indices) {
+    LibraryElement library = resolve2(source);
+    expect(library, isNotNull);
+    ClassElement classElement = library.definingCompilationUnit.types[0];
+    List<ParameterElement> parameters = classElement.methods[1].parameters;
+    CompilationUnit unit = resolveCompilationUnit(source, library);
+    expect(unit, isNotNull);
+    ClassDeclaration classDeclaration =
+        unit.declarations[0] as ClassDeclaration;
+    MethodDeclaration methodDeclaration =
+        classDeclaration.members[0] as MethodDeclaration;
+    Block block = (methodDeclaration.body as BlockFunctionBody).block;
+    ExpressionStatement statement = block.statements[0] as ExpressionStatement;
+    MethodInvocation invocation = statement.expression as MethodInvocation;
+    NodeList<Expression> arguments = invocation.argumentList.arguments;
+    int argumentCount = arguments.length;
+    expect(argumentCount, indices.length);
+    for (int i = 0; i < argumentCount; i++) {
+      Expression argument = arguments[i];
+      ParameterElement element = argument.staticParameterElement;
+      int index = indices[i];
+      if (index < 0) {
+        expect(element, isNull);
+      } else {
+        expect(element, same(parameters[index]));
+      }
+    }
+  }
+}
+
+class _SimpleResolverTest_localVariable_types_invoked
+    extends RecursiveAstVisitor<Object> {
+  final SimpleResolverTest test;
+
+  List<bool> found;
+
+  List<CaughtException> thrownException;
+
+  _SimpleResolverTest_localVariable_types_invoked(
+      this.test, this.found, this.thrownException)
+      : super();
+
+  @override
+  Object visitSimpleIdentifier(SimpleIdentifier node) {
+    if (node.name == "myVar" && node.parent is MethodInvocation) {
+      try {
+        found[0] = true;
+        // check static type
+        DartType staticType = node.staticType;
+        expect(staticType, same(test.typeProvider.dynamicType));
+        // check propagated type
+        FunctionType propagatedType = node.propagatedType as FunctionType;
+        expect(propagatedType.returnType, test.typeProvider.stringType);
+      } on AnalysisException catch (e, stackTrace) {
+        thrownException[0] = new CaughtException(e, stackTrace);
+      }
+    }
+    return null;
+  }
+}
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
new file mode 100644
index 0000000..0e0e3a1
--- /dev/null
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -0,0 +1,1645 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.static_type_analyzer_test;
+
+import 'dart:collection';
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/member.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/java_engine_io.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/generated/static_type_analyzer.dart';
+import 'package:analyzer/src/generated/testing/ast_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/generated/testing/token_factory.dart';
+import 'package:unittest/unittest.dart';
+
+import '../reflective_tests.dart';
+import '../utils.dart';
+import 'analysis_context_factory.dart';
+import 'resolver_test_case.dart';
+import 'test_support.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(StaticTypeAnalyzerTest);
+  runReflectiveTests(StaticTypeAnalyzer2Test);
+}
+
+/**
+ * Like [StaticTypeAnalyzerTest], but as end-to-end tests.
+ */
+@reflectiveTest
+class StaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared {
+  void test_FunctionExpressionInvocation_block() {
+    String code = r'''
+main() {
+  var foo = (() { return 1; })();
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'dynamic', isNull);
+  }
+
+  void test_FunctionExpressionInvocation_curried() {
+    String code = r'''
+typedef int F();
+F f() => null;
+main() {
+  var foo = f()();
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'int', isNull);
+  }
+
+  void test_FunctionExpressionInvocation_expression() {
+    String code = r'''
+main() {
+  var foo = (() => 1)();
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'int', isNull);
+  }
+
+  void test_MethodInvocation_nameType_localVariable() {
+    String code = r"""
+typedef Foo();
+main() {
+  Foo foo;
+  foo();
+}
+""";
+    resolveTestUnit(code);
+    // "foo" should be resolved to the "Foo" type
+    expectIdentifierType("foo();", new isInstanceOf<FunctionType>());
+  }
+
+  void test_MethodInvocation_nameType_parameter_FunctionTypeAlias() {
+    String code = r"""
+typedef Foo();
+main(Foo foo) {
+  foo();
+}
+""";
+    resolveTestUnit(code);
+    // "foo" should be resolved to the "Foo" type
+    expectIdentifierType("foo();", new isInstanceOf<FunctionType>());
+  }
+
+  void test_MethodInvocation_nameType_parameter_propagatedType() {
+    String code = r"""
+typedef Foo();
+main(p) {
+  if (p is Foo) {
+    p();
+  }
+}
+""";
+    resolveTestUnit(code);
+    expectIdentifierType("p()", DynamicTypeImpl.instance,
+        predicate((type) => type.name == 'Foo'));
+  }
+
+  void test_staticMethods_classTypeParameters() {
+    String code = r'''
+class C<T> {
+  static void m() => null;
+}
+main() {
+  print(C.m);
+}
+''';
+    resolveTestUnit(code);
+    expectFunctionType('m);', '() → void');
+  }
+
+  void test_staticMethods_classTypeParameters_genericMethod() {
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.enableGenericMethods = true;
+    resetWithOptions(options);
+    String code = r'''
+class C<T> {
+  static void m<S>(S s) {
+    void f<U>(S s, U u) {}
+    print(f);
+  }
+}
+main() {
+  print(C.m);
+}
+''';
+    resolveTestUnit(code);
+    // C - m
+    TypeParameterType typeS;
+    {
+      expectFunctionType('m);', '<S>(S) → void',
+          elementTypeParams: '[S]', typeFormals: '[S]');
+
+      FunctionTypeImpl type = findIdentifier('m);').staticType;
+      typeS = type.typeFormals[0].type;
+      type = type.instantiate([DynamicTypeImpl.instance]);
+      expect(type.toString(), '(dynamic) → void');
+      expect(type.typeParameters.toString(), '[S]');
+      expect(type.typeArguments, [DynamicTypeImpl.instance]);
+      expect(type.typeFormals, isEmpty);
+    }
+    // C - m - f
+    {
+      expectFunctionType('f);', '<U>(S, U) → void',
+          elementTypeParams: '[U]',
+          typeParams: '[S]',
+          typeArgs: '[S]',
+          typeFormals: '[U]');
+
+      FunctionTypeImpl type = findIdentifier('f);').staticType;
+      type = type.instantiate([DynamicTypeImpl.instance]);
+      expect(type.toString(), '(S, dynamic) → void');
+      expect(type.typeParameters.toString(), '[S, U]');
+      expect(type.typeArguments, [typeS, DynamicTypeImpl.instance]);
+      expect(type.typeFormals, isEmpty);
+    }
+  }
+}
+
+@reflectiveTest
+class StaticTypeAnalyzerTest extends EngineTestCase {
+  /**
+   * The error listener to which errors will be reported.
+   */
+  GatheringErrorListener _listener;
+
+  /**
+   * The resolver visitor used to create the analyzer.
+   */
+  ResolverVisitor _visitor;
+
+  /**
+   * The analyzer being used to analyze the test cases.
+   */
+  StaticTypeAnalyzer _analyzer;
+
+  /**
+   * The type provider used to access the types.
+   */
+  TestTypeProvider _typeProvider;
+
+  /**
+   * The type system used to analyze the test cases.
+   */
+  TypeSystem get _typeSystem => _visitor.typeSystem;
+
+  void fail_visitFunctionExpressionInvocation() {
+    fail("Not yet tested");
+    _listener.assertNoErrors();
+  }
+
+  void fail_visitMethodInvocation() {
+    fail("Not yet tested");
+    _listener.assertNoErrors();
+  }
+
+  void fail_visitSimpleIdentifier() {
+    fail("Not yet tested");
+    _listener.assertNoErrors();
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    _listener = new GatheringErrorListener();
+    _analyzer = _createAnalyzer();
+  }
+
+  void test_flatten_derived() {
+    // class Derived<T> extends Future<T> { ... }
+    ClassElementImpl derivedClass =
+        ElementFactory.classElement2('Derived', ['T']);
+    derivedClass.supertype = _typeProvider.futureType
+        .instantiate([derivedClass.typeParameters[0].type]);
+    InterfaceType intType = _typeProvider.intType;
+    DartType dynamicType = _typeProvider.dynamicType;
+    InterfaceType derivedIntType = derivedClass.type.instantiate([intType]);
+    // flatten(Derived) = dynamic
+    InterfaceType derivedDynamicType =
+        derivedClass.type.instantiate([dynamicType]);
+    expect(_flatten(derivedDynamicType), dynamicType);
+    // flatten(Derived<int>) = int
+    expect(_flatten(derivedIntType), intType);
+    // flatten(Derived<Derived>) = Derived
+    expect(_flatten(derivedClass.type.instantiate([derivedDynamicType])),
+        derivedDynamicType);
+    // flatten(Derived<Derived<int>>) = Derived<int>
+    expect(_flatten(derivedClass.type.instantiate([derivedIntType])),
+        derivedIntType);
+  }
+
+  void test_flatten_inhibit_recursion() {
+    // class A extends B
+    // class B extends A
+    ClassElementImpl classA = ElementFactory.classElement2('A', []);
+    ClassElementImpl classB = ElementFactory.classElement2('B', []);
+    classA.supertype = classB.type;
+    classB.supertype = classA.type;
+    // flatten(A) = A and flatten(B) = B, since neither class contains Future
+    // in its class hierarchy.  Even though there is a loop in the class
+    // hierarchy, flatten() should terminate.
+    expect(_flatten(classA.type), classA.type);
+    expect(_flatten(classB.type), classB.type);
+  }
+
+  void test_flatten_related_derived_types() {
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType numType = _typeProvider.numType;
+    // class Derived<T> extends Future<T>
+    ClassElementImpl derivedClass =
+        ElementFactory.classElement2('Derived', ['T']);
+    derivedClass.supertype = _typeProvider.futureType
+        .instantiate([derivedClass.typeParameters[0].type]);
+    InterfaceType derivedType = derivedClass.type;
+    // class A extends Derived<int> implements Derived<num> { ... }
+    ClassElementImpl classA =
+        ElementFactory.classElement('A', derivedType.instantiate([intType]));
+    classA.interfaces = <InterfaceType>[
+      derivedType.instantiate([numType])
+    ];
+    // class B extends Future<num> implements Future<int> { ... }
+    ClassElementImpl classB =
+        ElementFactory.classElement('B', derivedType.instantiate([numType]));
+    classB.interfaces = <InterfaceType>[
+      derivedType.instantiate([intType])
+    ];
+    // flatten(A) = flatten(B) = int, since int is more specific than num.
+    // The code in flatten() that inhibits infinite recursion shouldn't be
+    // fooled by the fact that Derived appears twice in the type hierarchy.
+    expect(_flatten(classA.type), intType);
+    expect(_flatten(classB.type), intType);
+  }
+
+  void test_flatten_related_types() {
+    InterfaceType futureType = _typeProvider.futureType;
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType numType = _typeProvider.numType;
+    // class A extends Future<int> implements Future<num> { ... }
+    ClassElementImpl classA =
+        ElementFactory.classElement('A', futureType.instantiate([intType]));
+    classA.interfaces = <InterfaceType>[
+      futureType.instantiate([numType])
+    ];
+    // class B extends Future<num> implements Future<int> { ... }
+    ClassElementImpl classB =
+        ElementFactory.classElement('B', futureType.instantiate([numType]));
+    classB.interfaces = <InterfaceType>[
+      futureType.instantiate([intType])
+    ];
+    // flatten(A) = flatten(B) = int, since int is more specific than num.
+    expect(_flatten(classA.type), intType);
+    expect(_flatten(classB.type), intType);
+  }
+
+  void test_flatten_simple() {
+    InterfaceType intType = _typeProvider.intType;
+    DartType dynamicType = _typeProvider.dynamicType;
+    InterfaceType futureDynamicType = _typeProvider.futureDynamicType;
+    InterfaceType futureIntType =
+        _typeProvider.futureType.instantiate([intType]);
+    InterfaceType futureFutureDynamicType =
+        _typeProvider.futureType.instantiate([futureDynamicType]);
+    InterfaceType futureFutureIntType =
+        _typeProvider.futureType.instantiate([futureIntType]);
+    // flatten(int) = int
+    expect(_flatten(intType), intType);
+    // flatten(dynamic) = dynamic
+    expect(_flatten(dynamicType), dynamicType);
+    // flatten(Future) = dynamic
+    expect(_flatten(futureDynamicType), dynamicType);
+    // flatten(Future<int>) = int
+    expect(_flatten(futureIntType), intType);
+    // flatten(Future<Future>) = dynamic
+    expect(_flatten(futureFutureDynamicType), dynamicType);
+    // flatten(Future<Future<int>>) = int
+    expect(_flatten(futureFutureIntType), intType);
+  }
+
+  void test_flatten_unrelated_types() {
+    InterfaceType futureType = _typeProvider.futureType;
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType stringType = _typeProvider.stringType;
+    // class A extends Future<int> implements Future<String> { ... }
+    ClassElementImpl classA =
+        ElementFactory.classElement('A', futureType.instantiate([intType]));
+    classA.interfaces = <InterfaceType>[
+      futureType.instantiate([stringType])
+    ];
+    // class B extends Future<String> implements Future<int> { ... }
+    ClassElementImpl classB =
+        ElementFactory.classElement('B', futureType.instantiate([stringType]));
+    classB.interfaces = <InterfaceType>[
+      futureType.instantiate([intType])
+    ];
+    // flatten(A) = A and flatten(B) = B, since neither string nor int is more
+    // specific than the other.
+    expect(_flatten(classA.type), classA.type);
+    expect(_flatten(classB.type), classB.type);
+  }
+
+  void test_visitAdjacentStrings() {
+    // "a" "b"
+    Expression node = AstFactory
+        .adjacentStrings([_resolvedString("a"), _resolvedString("b")]);
+    expect(_analyze(node), same(_typeProvider.stringType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitAsExpression() {
+    // class A { ... this as B ... }
+    // class B extends A {}
+    ClassElement superclass = ElementFactory.classElement2("A");
+    InterfaceType superclassType = superclass.type;
+    ClassElement subclass = ElementFactory.classElement("B", superclassType);
+    Expression node = AstFactory.asExpression(
+        AstFactory.thisExpression(), AstFactory.typeName(subclass));
+    expect(_analyze3(node, superclassType), same(subclass.type));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitAssignmentExpression_compound_II() {
+    validate(TokenType operator) {
+      InterfaceType numType = _typeProvider.numType;
+      InterfaceType intType = _typeProvider.intType;
+      SimpleIdentifier identifier = _resolvedVariable(intType, "i");
+      AssignmentExpression node = AstFactory.assignmentExpression(
+          identifier, operator, _resolvedInteger(1));
+      MethodElement plusMethod = getMethod(numType, "+");
+      node.staticElement = plusMethod;
+      expect(_analyze(node), same(intType));
+      _listener.assertNoErrors();
+    }
+    validate(TokenType.MINUS_EQ);
+    validate(TokenType.PERCENT_EQ);
+    validate(TokenType.PLUS_EQ);
+    validate(TokenType.STAR_EQ);
+    validate(TokenType.TILDE_SLASH_EQ);
+  }
+
+  void test_visitAssignmentExpression_compound_plusID() {
+    validate(TokenType operator) {
+      InterfaceType numType = _typeProvider.numType;
+      InterfaceType intType = _typeProvider.intType;
+      InterfaceType doubleType = _typeProvider.doubleType;
+      SimpleIdentifier identifier = _resolvedVariable(intType, "i");
+      AssignmentExpression node = AstFactory.assignmentExpression(
+          identifier, operator, _resolvedDouble(1.0));
+      MethodElement plusMethod = getMethod(numType, "+");
+      node.staticElement = plusMethod;
+      expect(_analyze(node), same(doubleType));
+      _listener.assertNoErrors();
+    }
+    validate(TokenType.MINUS_EQ);
+    validate(TokenType.PERCENT_EQ);
+    validate(TokenType.PLUS_EQ);
+    validate(TokenType.STAR_EQ);
+  }
+
+  void test_visitAssignmentExpression_compoundIfNull_differentTypes() {
+    // double d; d ??= 0
+    Expression node = AstFactory.assignmentExpression(
+        _resolvedVariable(_typeProvider.doubleType, 'd'),
+        TokenType.QUESTION_QUESTION_EQ,
+        _resolvedInteger(0));
+    expect(_analyze(node), same(_typeProvider.numType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitAssignmentExpression_compoundIfNull_sameTypes() {
+    // int i; i ??= 0
+    Expression node = AstFactory.assignmentExpression(
+        _resolvedVariable(_typeProvider.intType, 'i'),
+        TokenType.QUESTION_QUESTION_EQ,
+        _resolvedInteger(0));
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitAssignmentExpression_simple() {
+    // i = 0
+    InterfaceType intType = _typeProvider.intType;
+    Expression node = AstFactory.assignmentExpression(
+        _resolvedVariable(intType, "i"), TokenType.EQ, _resolvedInteger(0));
+    expect(_analyze(node), same(intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitAwaitExpression_flattened() {
+    // await e, where e has type Future<Future<int>>
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType futureIntType =
+        _typeProvider.futureType.instantiate(<DartType>[intType]);
+    InterfaceType futureFutureIntType =
+        _typeProvider.futureType.instantiate(<DartType>[futureIntType]);
+    Expression node =
+        AstFactory.awaitExpression(_resolvedVariable(futureFutureIntType, 'e'));
+    expect(_analyze(node), same(intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitAwaitExpression_simple() {
+    // await e, where e has type Future<int>
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType futureIntType =
+        _typeProvider.futureType.instantiate(<DartType>[intType]);
+    Expression node =
+        AstFactory.awaitExpression(_resolvedVariable(futureIntType, 'e'));
+    expect(_analyze(node), same(intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_equals() {
+    // 2 == 3
+    Expression node = AstFactory.binaryExpression(
+        _resolvedInteger(2), TokenType.EQ_EQ, _resolvedInteger(3));
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_ifNull() {
+    // 1 ?? 1.5
+    Expression node = AstFactory.binaryExpression(
+        _resolvedInteger(1), TokenType.QUESTION_QUESTION, _resolvedDouble(1.5));
+    expect(_analyze(node), same(_typeProvider.numType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_logicalAnd() {
+    // false && true
+    Expression node = AstFactory.binaryExpression(
+        AstFactory.booleanLiteral(false),
+        TokenType.AMPERSAND_AMPERSAND,
+        AstFactory.booleanLiteral(true));
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_logicalOr() {
+    // false || true
+    Expression node = AstFactory.binaryExpression(
+        AstFactory.booleanLiteral(false),
+        TokenType.BAR_BAR,
+        AstFactory.booleanLiteral(true));
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_minusID_propagated() {
+    // a - b
+    BinaryExpression node = AstFactory.binaryExpression(
+        _propagatedVariable(_typeProvider.intType, 'a'),
+        TokenType.MINUS,
+        _propagatedVariable(_typeProvider.doubleType, 'b'));
+    node.propagatedElement = getMethod(_typeProvider.numType, "+");
+    _analyze(node);
+    expect(node.propagatedType, same(_typeProvider.doubleType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_notEquals() {
+    // 2 != 3
+    Expression node = AstFactory.binaryExpression(
+        _resolvedInteger(2), TokenType.BANG_EQ, _resolvedInteger(3));
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_plusID() {
+    // 1 + 2.0
+    BinaryExpression node = AstFactory.binaryExpression(
+        _resolvedInteger(1), TokenType.PLUS, _resolvedDouble(2.0));
+    node.staticElement = getMethod(_typeProvider.numType, "+");
+    expect(_analyze(node), same(_typeProvider.doubleType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_plusII() {
+    // 1 + 2
+    BinaryExpression node = AstFactory.binaryExpression(
+        _resolvedInteger(1), TokenType.PLUS, _resolvedInteger(2));
+    node.staticElement = getMethod(_typeProvider.numType, "+");
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_plusII_propagated() {
+    // a + b
+    BinaryExpression node = AstFactory.binaryExpression(
+        _propagatedVariable(_typeProvider.intType, 'a'),
+        TokenType.PLUS,
+        _propagatedVariable(_typeProvider.intType, 'b'));
+    node.propagatedElement = getMethod(_typeProvider.numType, "+");
+    _analyze(node);
+    expect(node.propagatedType, same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_slash() {
+    // 2 / 2
+    BinaryExpression node = AstFactory.binaryExpression(
+        _resolvedInteger(2), TokenType.SLASH, _resolvedInteger(2));
+    node.staticElement = getMethod(_typeProvider.numType, "/");
+    expect(_analyze(node), same(_typeProvider.doubleType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_star_notSpecial() {
+    // class A {
+    //   A operator *(double value);
+    // }
+    // (a as A) * 2.0
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    InterfaceType typeA = classA.type;
+    MethodElement operator =
+        ElementFactory.methodElement("*", typeA, [_typeProvider.doubleType]);
+    classA.methods = <MethodElement>[operator];
+    BinaryExpression node = AstFactory.binaryExpression(
+        AstFactory.asExpression(
+            AstFactory.identifier3("a"), AstFactory.typeName(classA)),
+        TokenType.PLUS,
+        _resolvedDouble(2.0));
+    node.staticElement = operator;
+    expect(_analyze(node), same(typeA));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_starID() {
+    // 1 * 2.0
+    BinaryExpression node = AstFactory.binaryExpression(
+        _resolvedInteger(1), TokenType.PLUS, _resolvedDouble(2.0));
+    node.staticElement = getMethod(_typeProvider.numType, "*");
+    expect(_analyze(node), same(_typeProvider.doubleType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBooleanLiteral_false() {
+    // false
+    Expression node = AstFactory.booleanLiteral(false);
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitBooleanLiteral_true() {
+    // true
+    Expression node = AstFactory.booleanLiteral(true);
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitCascadeExpression() {
+    // a..length
+    Expression node = AstFactory.cascadeExpression(
+        _resolvedString("a"), [AstFactory.propertyAccess2(null, "length")]);
+    expect(_analyze(node), same(_typeProvider.stringType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitConditionalExpression_differentTypes() {
+    // true ? 1.0 : 0
+    Expression node = AstFactory.conditionalExpression(
+        AstFactory.booleanLiteral(true),
+        _resolvedDouble(1.0),
+        _resolvedInteger(0));
+    expect(_analyze(node), same(_typeProvider.numType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitConditionalExpression_sameTypes() {
+    // true ? 1 : 0
+    Expression node = AstFactory.conditionalExpression(
+        AstFactory.booleanLiteral(true),
+        _resolvedInteger(1),
+        _resolvedInteger(0));
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitDoubleLiteral() {
+    // 4.33
+    Expression node = AstFactory.doubleLiteral(4.33);
+    expect(_analyze(node), same(_typeProvider.doubleType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_async_block() {
+    // () async {}
+    BlockFunctionBody body = AstFactory.blockFunctionBody2();
+    body.keyword = TokenFactory.tokenFromString('async');
+    FunctionExpression node =
+        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(
+        _typeProvider.futureDynamicType, null, null, null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_async_expression() {
+    // () async => e, where e has type int
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType futureIntType =
+        _typeProvider.futureType.instantiate(<DartType>[intType]);
+    Expression expression = _resolvedVariable(intType, 'e');
+    ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
+    body.keyword = TokenFactory.tokenFromString('async');
+    FunctionExpression node =
+        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(futureIntType, null, null, null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_async_expression_flatten() {
+    // () async => e, where e has type Future<int>
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType futureIntType =
+        _typeProvider.futureType.instantiate(<DartType>[intType]);
+    Expression expression = _resolvedVariable(futureIntType, 'e');
+    ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
+    body.keyword = TokenFactory.tokenFromString('async');
+    FunctionExpression node =
+        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(futureIntType, null, null, null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_async_expression_flatten_twice() {
+    // () async => e, where e has type Future<Future<int>>
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType futureIntType =
+        _typeProvider.futureType.instantiate(<DartType>[intType]);
+    InterfaceType futureFutureIntType =
+        _typeProvider.futureType.instantiate(<DartType>[futureIntType]);
+    Expression expression = _resolvedVariable(futureFutureIntType, 'e');
+    ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
+    body.keyword = TokenFactory.tokenFromString('async');
+    FunctionExpression node =
+        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(futureIntType, null, null, null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_generator_async() {
+    // () async* {}
+    BlockFunctionBody body = AstFactory.blockFunctionBody2();
+    body.keyword = TokenFactory.tokenFromString('async');
+    body.star = TokenFactory.tokenFromType(TokenType.STAR);
+    FunctionExpression node =
+        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(
+        _typeProvider.streamDynamicType, null, null, null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_generator_sync() {
+    // () sync* {}
+    BlockFunctionBody body = AstFactory.blockFunctionBody2();
+    body.keyword = TokenFactory.tokenFromString('sync');
+    body.star = TokenFactory.tokenFromType(TokenType.STAR);
+    FunctionExpression node =
+        _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(
+        _typeProvider.iterableDynamicType, null, null, null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_named_block() {
+    // ({p1 : 0, p2 : 0}) {}
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p1 = AstFactory.namedFormalParameter(
+        AstFactory.simpleFormalParameter3("p1"), _resolvedInteger(0));
+    _setType(p1, dynamicType);
+    FormalParameter p2 = AstFactory.namedFormalParameter(
+        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
+    _setType(p2, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p1, p2]),
+        AstFactory.blockFunctionBody2());
+    _analyze5(p1);
+    _analyze5(p2);
+    DartType resultType = _analyze(node);
+    Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
+    expectedNamedTypes["p1"] = dynamicType;
+    expectedNamedTypes["p2"] = dynamicType;
+    _assertFunctionType(
+        dynamicType, null, null, expectedNamedTypes, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_named_expression() {
+    // ({p : 0}) -> 0;
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p = AstFactory.namedFormalParameter(
+        AstFactory.simpleFormalParameter3("p"), _resolvedInteger(0));
+    _setType(p, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p]),
+        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
+    _analyze5(p);
+    DartType resultType = _analyze(node);
+    Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
+    expectedNamedTypes["p"] = dynamicType;
+    _assertFunctionType(
+        _typeProvider.intType, null, null, expectedNamedTypes, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_normal_block() {
+    // (p1, p2) {}
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
+    _setType(p1, dynamicType);
+    FormalParameter p2 = AstFactory.simpleFormalParameter3("p2");
+    _setType(p2, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p1, p2]),
+        AstFactory.blockFunctionBody2());
+    _analyze5(p1);
+    _analyze5(p2);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(dynamicType, <DartType>[dynamicType, dynamicType], null,
+        null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_normal_expression() {
+    // (p1, p2) -> 0
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p = AstFactory.simpleFormalParameter3("p");
+    _setType(p, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p]),
+        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
+    _analyze5(p);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(
+        _typeProvider.intType, <DartType>[dynamicType], null, null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_normalAndNamed_block() {
+    // (p1, {p2 : 0}) {}
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
+    _setType(p1, dynamicType);
+    FormalParameter p2 = AstFactory.namedFormalParameter(
+        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
+    _setType(p2, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p1, p2]),
+        AstFactory.blockFunctionBody2());
+    _analyze5(p2);
+    DartType resultType = _analyze(node);
+    Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
+    expectedNamedTypes["p2"] = dynamicType;
+    _assertFunctionType(dynamicType, <DartType>[dynamicType], null,
+        expectedNamedTypes, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_normalAndNamed_expression() {
+    // (p1, {p2 : 0}) -> 0
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
+    _setType(p1, dynamicType);
+    FormalParameter p2 = AstFactory.namedFormalParameter(
+        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
+    _setType(p2, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p1, p2]),
+        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
+    _analyze5(p2);
+    DartType resultType = _analyze(node);
+    Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
+    expectedNamedTypes["p2"] = dynamicType;
+    _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType], null,
+        expectedNamedTypes, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_normalAndPositional_block() {
+    // (p1, [p2 = 0]) {}
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
+    _setType(p1, dynamicType);
+    FormalParameter p2 = AstFactory.positionalFormalParameter(
+        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
+    _setType(p2, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p1, p2]),
+        AstFactory.blockFunctionBody2());
+    _analyze5(p1);
+    _analyze5(p2);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(dynamicType, <DartType>[dynamicType],
+        <DartType>[dynamicType], null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_normalAndPositional_expression() {
+    // (p1, [p2 = 0]) -> 0
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
+    _setType(p1, dynamicType);
+    FormalParameter p2 = AstFactory.positionalFormalParameter(
+        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
+    _setType(p2, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p1, p2]),
+        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
+    _analyze5(p1);
+    _analyze5(p2);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType],
+        <DartType>[dynamicType], null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_positional_block() {
+    // ([p1 = 0, p2 = 0]) {}
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p1 = AstFactory.positionalFormalParameter(
+        AstFactory.simpleFormalParameter3("p1"), _resolvedInteger(0));
+    _setType(p1, dynamicType);
+    FormalParameter p2 = AstFactory.positionalFormalParameter(
+        AstFactory.simpleFormalParameter3("p2"), _resolvedInteger(0));
+    _setType(p2, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p1, p2]),
+        AstFactory.blockFunctionBody2());
+    _analyze5(p1);
+    _analyze5(p2);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(dynamicType, null, <DartType>[dynamicType, dynamicType],
+        null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitFunctionExpression_positional_expression() {
+    // ([p1 = 0, p2 = 0]) -> 0
+    DartType dynamicType = _typeProvider.dynamicType;
+    FormalParameter p = AstFactory.positionalFormalParameter(
+        AstFactory.simpleFormalParameter3("p"), _resolvedInteger(0));
+    _setType(p, dynamicType);
+    FunctionExpression node = _resolvedFunctionExpression(
+        AstFactory.formalParameterList([p]),
+        AstFactory.expressionFunctionBody(_resolvedInteger(0)));
+    _analyze5(p);
+    DartType resultType = _analyze(node);
+    _assertFunctionType(
+        _typeProvider.intType, null, <DartType>[dynamicType], null, resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIndexExpression_getter() {
+    // List a;
+    // a[2]
+    InterfaceType listType = _typeProvider.listType;
+    SimpleIdentifier identifier = _resolvedVariable(listType, "a");
+    IndexExpression node =
+        AstFactory.indexExpression(identifier, _resolvedInteger(2));
+    MethodElement indexMethod = listType.element.methods[0];
+    node.staticElement = indexMethod;
+    expect(_analyze(node), same(listType.typeArguments[0]));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIndexExpression_setter() {
+    // List a;
+    // a[2] = 0
+    InterfaceType listType = _typeProvider.listType;
+    SimpleIdentifier identifier = _resolvedVariable(listType, "a");
+    IndexExpression node =
+        AstFactory.indexExpression(identifier, _resolvedInteger(2));
+    MethodElement indexMethod = listType.element.methods[1];
+    node.staticElement = indexMethod;
+    AstFactory.assignmentExpression(node, TokenType.EQ, AstFactory.integer(0));
+    expect(_analyze(node), same(listType.typeArguments[0]));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIndexExpression_typeParameters() {
+    // List<int> list = ...
+    // list[0]
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType listType = _typeProvider.listType;
+    // (int) -> E
+    MethodElement methodElement = getMethod(listType, "[]");
+    // "list" has type List<int>
+    SimpleIdentifier identifier = AstFactory.identifier3("list");
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    identifier.staticType = listOfIntType;
+    // list[0] has MethodElement element (int) -> E
+    IndexExpression indexExpression =
+        AstFactory.indexExpression(identifier, AstFactory.integer(0));
+    MethodElement indexMethod = MethodMember.from(methodElement, listOfIntType);
+    indexExpression.staticElement = indexMethod;
+    // analyze and assert result of the index expression
+    expect(_analyze(indexExpression), same(intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIndexExpression_typeParameters_inSetterContext() {
+    // List<int> list = ...
+    // list[0] = 0;
+    InterfaceType intType = _typeProvider.intType;
+    InterfaceType listType = _typeProvider.listType;
+    // (int, E) -> void
+    MethodElement methodElement = getMethod(listType, "[]=");
+    // "list" has type List<int>
+    SimpleIdentifier identifier = AstFactory.identifier3("list");
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    identifier.staticType = listOfIntType;
+    // list[0] has MethodElement element (int) -> E
+    IndexExpression indexExpression =
+        AstFactory.indexExpression(identifier, AstFactory.integer(0));
+    MethodElement indexMethod = MethodMember.from(methodElement, listOfIntType);
+    indexExpression.staticElement = indexMethod;
+    // list[0] should be in a setter context
+    AstFactory.assignmentExpression(
+        indexExpression, TokenType.EQ, AstFactory.integer(0));
+    // analyze and assert result of the index expression
+    expect(_analyze(indexExpression), same(intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitInstanceCreationExpression_named() {
+    // new C.m()
+    ClassElementImpl classElement = ElementFactory.classElement2("C");
+    String constructorName = "m";
+    ConstructorElementImpl constructor =
+        ElementFactory.constructorElement2(classElement, constructorName);
+    constructor.returnType = classElement.type;
+    FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
+    constructor.type = constructorType;
+    classElement.constructors = <ConstructorElement>[constructor];
+    InstanceCreationExpression node = AstFactory.instanceCreationExpression2(
+        null,
+        AstFactory.typeName(classElement),
+        [AstFactory.identifier3(constructorName)]);
+    node.staticElement = constructor;
+    expect(_analyze(node), same(classElement.type));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitInstanceCreationExpression_typeParameters() {
+    // new C<I>()
+    ClassElementImpl elementC = ElementFactory.classElement2("C", ["E"]);
+    ClassElementImpl elementI = ElementFactory.classElement2("I");
+    ConstructorElementImpl constructor =
+        ElementFactory.constructorElement2(elementC, null);
+    elementC.constructors = <ConstructorElement>[constructor];
+    constructor.returnType = elementC.type;
+    FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
+    constructor.type = constructorType;
+    TypeName typeName =
+        AstFactory.typeName(elementC, [AstFactory.typeName(elementI)]);
+    typeName.type = elementC.type.instantiate(<DartType>[elementI.type]);
+    InstanceCreationExpression node =
+        AstFactory.instanceCreationExpression2(null, typeName);
+    node.staticElement = constructor;
+    InterfaceType interfaceType = _analyze(node) as InterfaceType;
+    List<DartType> typeArgs = interfaceType.typeArguments;
+    expect(typeArgs.length, 1);
+    expect(typeArgs[0], elementI.type);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitInstanceCreationExpression_unnamed() {
+    // new C()
+    ClassElementImpl classElement = ElementFactory.classElement2("C");
+    ConstructorElementImpl constructor =
+        ElementFactory.constructorElement2(classElement, null);
+    constructor.returnType = classElement.type;
+    FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
+    constructor.type = constructorType;
+    classElement.constructors = <ConstructorElement>[constructor];
+    InstanceCreationExpression node = AstFactory.instanceCreationExpression2(
+        null, AstFactory.typeName(classElement));
+    node.staticElement = constructor;
+    expect(_analyze(node), same(classElement.type));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIntegerLiteral() {
+    // 42
+    Expression node = _resolvedInteger(42);
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIsExpression_negated() {
+    // a is! String
+    Expression node = AstFactory.isExpression(
+        _resolvedString("a"), true, AstFactory.typeName4("String"));
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitIsExpression_notNegated() {
+    // a is String
+    Expression node = AstFactory.isExpression(
+        _resolvedString("a"), false, AstFactory.typeName4("String"));
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitListLiteral_empty() {
+    // []
+    Expression node = AstFactory.listLiteral();
+    DartType resultType = _analyze(node);
+    _assertType2(
+        _typeProvider.listType
+            .instantiate(<DartType>[_typeProvider.dynamicType]),
+        resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitListLiteral_nonEmpty() {
+    // [0]
+    Expression node = AstFactory.listLiteral([_resolvedInteger(0)]);
+    DartType resultType = _analyze(node);
+    _assertType2(
+        _typeProvider.listType
+            .instantiate(<DartType>[_typeProvider.dynamicType]),
+        resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitMapLiteral_empty() {
+    // {}
+    Expression node = AstFactory.mapLiteral2();
+    DartType resultType = _analyze(node);
+    _assertType2(
+        _typeProvider.mapType.instantiate(
+            <DartType>[_typeProvider.dynamicType, _typeProvider.dynamicType]),
+        resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitMapLiteral_nonEmpty() {
+    // {"k" : 0}
+    Expression node = AstFactory
+        .mapLiteral2([AstFactory.mapLiteralEntry("k", _resolvedInteger(0))]);
+    DartType resultType = _analyze(node);
+    _assertType2(
+        _typeProvider.mapType.instantiate(
+            <DartType>[_typeProvider.dynamicType, _typeProvider.dynamicType]),
+        resultType);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitMethodInvocation_then() {
+    // then()
+    Expression node = AstFactory.methodInvocation(null, "then");
+    _analyze(node);
+    _listener.assertNoErrors();
+  }
+
+  void test_visitNamedExpression() {
+    // n: a
+    Expression node = AstFactory.namedExpression2("n", _resolvedString("a"));
+    expect(_analyze(node), same(_typeProvider.stringType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitNullLiteral() {
+    // null
+    Expression node = AstFactory.nullLiteral();
+    expect(_analyze(node), same(_typeProvider.bottomType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitParenthesizedExpression() {
+    // (0)
+    Expression node = AstFactory.parenthesizedExpression(_resolvedInteger(0));
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPostfixExpression_minusMinus() {
+    // 0--
+    PostfixExpression node = AstFactory.postfixExpression(
+        _resolvedInteger(0), TokenType.MINUS_MINUS);
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPostfixExpression_plusPlus() {
+    // 0++
+    PostfixExpression node =
+        AstFactory.postfixExpression(_resolvedInteger(0), TokenType.PLUS_PLUS);
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixedIdentifier_getter() {
+    DartType boolType = _typeProvider.boolType;
+    PropertyAccessorElementImpl getter =
+        ElementFactory.getterElement("b", false, boolType);
+    PrefixedIdentifier node = AstFactory.identifier5("a", "b");
+    node.identifier.staticElement = getter;
+    expect(_analyze(node), same(boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixedIdentifier_setter() {
+    DartType boolType = _typeProvider.boolType;
+    FieldElementImpl field =
+        ElementFactory.fieldElement("b", false, false, false, boolType);
+    PropertyAccessorElement setter = field.setter;
+    PrefixedIdentifier node = AstFactory.identifier5("a", "b");
+    node.identifier.staticElement = setter;
+    expect(_analyze(node), same(boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixedIdentifier_variable() {
+    VariableElementImpl variable = ElementFactory.localVariableElement2("b");
+    variable.type = _typeProvider.boolType;
+    PrefixedIdentifier node = AstFactory.identifier5("a", "b");
+    node.identifier.staticElement = variable;
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixExpression_bang() {
+    // !0
+    PrefixExpression node =
+        AstFactory.prefixExpression(TokenType.BANG, _resolvedInteger(0));
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixExpression_minus() {
+    // -0
+    PrefixExpression node =
+        AstFactory.prefixExpression(TokenType.MINUS, _resolvedInteger(0));
+    MethodElement minusMethod = getMethod(_typeProvider.numType, "-");
+    node.staticElement = minusMethod;
+    expect(_analyze(node), same(_typeProvider.numType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixExpression_minusMinus() {
+    // --0
+    PrefixExpression node =
+        AstFactory.prefixExpression(TokenType.MINUS_MINUS, _resolvedInteger(0));
+    MethodElement minusMethod = getMethod(_typeProvider.numType, "-");
+    node.staticElement = minusMethod;
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixExpression_not() {
+    // !true
+    Expression node = AstFactory.prefixExpression(
+        TokenType.BANG, AstFactory.booleanLiteral(true));
+    expect(_analyze(node), same(_typeProvider.boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixExpression_plusPlus() {
+    // ++0
+    PrefixExpression node =
+        AstFactory.prefixExpression(TokenType.PLUS_PLUS, _resolvedInteger(0));
+    MethodElement plusMethod = getMethod(_typeProvider.numType, "+");
+    node.staticElement = plusMethod;
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPrefixExpression_tilde() {
+    // ~0
+    PrefixExpression node =
+        AstFactory.prefixExpression(TokenType.TILDE, _resolvedInteger(0));
+    MethodElement tildeMethod = getMethod(_typeProvider.intType, "~");
+    node.staticElement = tildeMethod;
+    expect(_analyze(node), same(_typeProvider.intType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPropertyAccess_propagated_getter() {
+    DartType boolType = _typeProvider.boolType;
+    PropertyAccessorElementImpl getter =
+        ElementFactory.getterElement("b", false, boolType);
+    PropertyAccess node =
+        AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+    node.propertyName.propagatedElement = getter;
+    expect(_analyze2(node, false), same(boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPropertyAccess_propagated_setter() {
+    DartType boolType = _typeProvider.boolType;
+    FieldElementImpl field =
+        ElementFactory.fieldElement("b", false, false, false, boolType);
+    PropertyAccessorElement setter = field.setter;
+    PropertyAccess node =
+        AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+    node.propertyName.propagatedElement = setter;
+    expect(_analyze2(node, false), same(boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPropertyAccess_static_getter() {
+    DartType boolType = _typeProvider.boolType;
+    PropertyAccessorElementImpl getter =
+        ElementFactory.getterElement("b", false, boolType);
+    PropertyAccess node =
+        AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+    node.propertyName.staticElement = getter;
+    expect(_analyze(node), same(boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitPropertyAccess_static_setter() {
+    DartType boolType = _typeProvider.boolType;
+    FieldElementImpl field =
+        ElementFactory.fieldElement("b", false, false, false, boolType);
+    PropertyAccessorElement setter = field.setter;
+    PropertyAccess node =
+        AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+    node.propertyName.staticElement = setter;
+    expect(_analyze(node), same(boolType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSimpleIdentifier_dynamic() {
+    // "dynamic"
+    SimpleIdentifier identifier = AstFactory.identifier3('dynamic');
+    DynamicElementImpl element = DynamicElementImpl.instance;
+    identifier.staticElement = element;
+    identifier.staticType = _typeProvider.typeType;
+    expect(_analyze(identifier), same(_typeProvider.typeType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSimpleStringLiteral() {
+    // "a"
+    Expression node = _resolvedString("a");
+    expect(_analyze(node), same(_typeProvider.stringType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitStringInterpolation() {
+    // "a${'b'}c"
+    Expression node = AstFactory.string([
+      AstFactory.interpolationString("a", "a"),
+      AstFactory.interpolationExpression(_resolvedString("b")),
+      AstFactory.interpolationString("c", "c")
+    ]);
+    expect(_analyze(node), same(_typeProvider.stringType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSuperExpression() {
+    // super
+    InterfaceType superType = ElementFactory.classElement2("A").type;
+    InterfaceType thisType = ElementFactory.classElement("B", superType).type;
+    Expression node = AstFactory.superExpression();
+    expect(_analyze3(node, thisType), same(thisType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitSymbolLiteral() {
+    expect(_analyze(AstFactory.symbolLiteral(["a"])),
+        same(_typeProvider.symbolType));
+  }
+
+  void test_visitThisExpression() {
+    // this
+    InterfaceType thisType = ElementFactory
+        .classElement("B", ElementFactory.classElement2("A").type)
+        .type;
+    Expression node = AstFactory.thisExpression();
+    expect(_analyze3(node, thisType), same(thisType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitThrowExpression_withoutValue() {
+    // throw
+    Expression node = AstFactory.throwExpression();
+    expect(_analyze(node), same(_typeProvider.bottomType));
+    _listener.assertNoErrors();
+  }
+
+  void test_visitThrowExpression_withValue() {
+    // throw 0
+    Expression node = AstFactory.throwExpression2(_resolvedInteger(0));
+    expect(_analyze(node), same(_typeProvider.bottomType));
+    _listener.assertNoErrors();
+  }
+
+  /**
+   * Return the type associated with the given expression after the static type analyzer has
+   * computed a type for it.
+   *
+   * @param node the expression with which the type is associated
+   * @return the type associated with the expression
+   */
+  DartType _analyze(Expression node) => _analyze4(node, null, true);
+
+  /**
+   * Return the type associated with the given expression after the static or propagated type
+   * analyzer has computed a type for it.
+   *
+   * @param node the expression with which the type is associated
+   * @param useStaticType `true` if the static type is being requested, and `false` if
+   *          the propagated type is being requested
+   * @return the type associated with the expression
+   */
+  DartType _analyze2(Expression node, bool useStaticType) =>
+      _analyze4(node, null, useStaticType);
+
+  /**
+   * Return the type associated with the given expression after the static type analyzer has
+   * computed a type for it.
+   *
+   * @param node the expression with which the type is associated
+   * @param thisType the type of 'this'
+   * @return the type associated with the expression
+   */
+  DartType _analyze3(Expression node, InterfaceType thisType) =>
+      _analyze4(node, thisType, true);
+
+  /**
+   * Return the type associated with the given expression after the static type analyzer has
+   * computed a type for it.
+   *
+   * @param node the expression with which the type is associated
+   * @param thisType the type of 'this'
+   * @param useStaticType `true` if the static type is being requested, and `false` if
+   *          the propagated type is being requested
+   * @return the type associated with the expression
+   */
+  DartType _analyze4(
+      Expression node, InterfaceType thisType, bool useStaticType) {
+    try {
+      _analyzer.thisType = thisType;
+    } catch (exception) {
+      throw new IllegalArgumentException(
+          "Could not set type of 'this'", exception);
+    }
+    node.accept(_analyzer);
+    if (useStaticType) {
+      return node.staticType;
+    } else {
+      return node.propagatedType;
+    }
+  }
+
+  /**
+   * Return the type associated with the given parameter after the static type analyzer has computed
+   * a type for it.
+   *
+   * @param node the parameter with which the type is associated
+   * @return the type associated with the parameter
+   */
+  DartType _analyze5(FormalParameter node) {
+    node.accept(_analyzer);
+    return (node.identifier.staticElement as ParameterElement).type;
+  }
+
+  /**
+   * Assert that the actual type is a function type with the expected characteristics.
+   *
+   * @param expectedReturnType the expected return type of the function
+   * @param expectedNormalTypes the expected types of the normal parameters
+   * @param expectedOptionalTypes the expected types of the optional parameters
+   * @param expectedNamedTypes the expected types of the named parameters
+   * @param actualType the type being tested
+   */
+  void _assertFunctionType(
+      DartType expectedReturnType,
+      List<DartType> expectedNormalTypes,
+      List<DartType> expectedOptionalTypes,
+      Map<String, DartType> expectedNamedTypes,
+      DartType actualType) {
+    EngineTestCase.assertInstanceOf(
+        (obj) => obj is FunctionType, FunctionType, actualType);
+    FunctionType functionType = actualType as FunctionType;
+    List<DartType> normalTypes = functionType.normalParameterTypes;
+    if (expectedNormalTypes == null) {
+      expect(normalTypes, hasLength(0));
+    } else {
+      int expectedCount = expectedNormalTypes.length;
+      expect(normalTypes, hasLength(expectedCount));
+      for (int i = 0; i < expectedCount; i++) {
+        expect(normalTypes[i], same(expectedNormalTypes[i]));
+      }
+    }
+    List<DartType> optionalTypes = functionType.optionalParameterTypes;
+    if (expectedOptionalTypes == null) {
+      expect(optionalTypes, hasLength(0));
+    } else {
+      int expectedCount = expectedOptionalTypes.length;
+      expect(optionalTypes, hasLength(expectedCount));
+      for (int i = 0; i < expectedCount; i++) {
+        expect(optionalTypes[i], same(expectedOptionalTypes[i]));
+      }
+    }
+    Map<String, DartType> namedTypes = functionType.namedParameterTypes;
+    if (expectedNamedTypes == null) {
+      expect(namedTypes, hasLength(0));
+    } else {
+      expect(namedTypes, hasLength(expectedNamedTypes.length));
+      expectedNamedTypes.forEach((String name, DartType type) {
+        expect(namedTypes[name], same(type));
+      });
+    }
+    expect(functionType.returnType, equals(expectedReturnType));
+  }
+
+  void _assertType(
+      InterfaceTypeImpl expectedType, InterfaceTypeImpl actualType) {
+    expect(actualType.displayName, expectedType.displayName);
+    expect(actualType.element, expectedType.element);
+    List<DartType> expectedArguments = expectedType.typeArguments;
+    int length = expectedArguments.length;
+    List<DartType> actualArguments = actualType.typeArguments;
+    expect(actualArguments, hasLength(length));
+    for (int i = 0; i < length; i++) {
+      _assertType2(expectedArguments[i], actualArguments[i]);
+    }
+  }
+
+  void _assertType2(DartType expectedType, DartType actualType) {
+    if (expectedType is InterfaceTypeImpl) {
+      EngineTestCase.assertInstanceOf(
+          (obj) => obj is InterfaceTypeImpl, InterfaceTypeImpl, actualType);
+      _assertType(expectedType, actualType as InterfaceTypeImpl);
+    }
+    // TODO(brianwilkerson) Compare other kinds of types then make this a shared
+    // utility method.
+  }
+
+  /**
+   * Create the analyzer used by the tests.
+   *
+   * @return the analyzer to be used by the tests
+   */
+  StaticTypeAnalyzer _createAnalyzer() {
+    InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
+    FileBasedSource source =
+        new FileBasedSource(FileUtilities2.createFile("/lib.dart"));
+    CompilationUnitElementImpl definingCompilationUnit =
+        new CompilationUnitElementImpl("lib.dart");
+    definingCompilationUnit.librarySource =
+        definingCompilationUnit.source = source;
+    LibraryElementImpl definingLibrary =
+        new LibraryElementImpl.forNode(context, null);
+    definingLibrary.definingCompilationUnit = definingCompilationUnit;
+    _typeProvider = new TestTypeProvider(context);
+    _visitor = new ResolverVisitor(
+        definingLibrary, source, _typeProvider, _listener,
+        nameScope: new LibraryScope(definingLibrary, _listener));
+    _visitor.overrideManager.enterScope();
+    try {
+      return _visitor.typeAnalyzer;
+    } catch (exception) {
+      throw new IllegalArgumentException(
+          "Could not create analyzer", exception);
+    }
+  }
+
+  DartType _flatten(DartType type) => type.flattenFutures(_typeSystem);
+
+  /**
+   * Return a simple identifier that has been resolved to a variable element with the given type.
+   *
+   * @param type the type of the variable being represented
+   * @param variableName the name of the variable
+   * @return a simple identifier that has been resolved to a variable element with the given type
+   */
+  SimpleIdentifier _propagatedVariable(
+      InterfaceType type, String variableName) {
+    SimpleIdentifier identifier = AstFactory.identifier3(variableName);
+    VariableElementImpl element =
+        ElementFactory.localVariableElement(identifier);
+    element.type = type;
+    identifier.staticType = _typeProvider.dynamicType;
+    identifier.propagatedElement = element;
+    identifier.propagatedType = type;
+    return identifier;
+  }
+
+  /**
+   * Return an integer literal that has been resolved to the correct type.
+   *
+   * @param value the value of the literal
+   * @return an integer literal that has been resolved to the correct type
+   */
+  DoubleLiteral _resolvedDouble(double value) {
+    DoubleLiteral literal = AstFactory.doubleLiteral(value);
+    literal.staticType = _typeProvider.doubleType;
+    return literal;
+  }
+
+  /**
+   * Create a function expression that has an element associated with it, where the element has an
+   * incomplete type associated with it (just like the one
+   * [ElementBuilder.visitFunctionExpression] would have built if we had
+   * run it).
+   *
+   * @param parameters the parameters to the function
+   * @param body the body of the function
+   * @return a resolved function expression
+   */
+  FunctionExpression _resolvedFunctionExpression(
+      FormalParameterList parameters, FunctionBody body) {
+    List<ParameterElement> parameterElements = new List<ParameterElement>();
+    for (FormalParameter parameter in parameters.parameters) {
+      ParameterElementImpl element =
+          new ParameterElementImpl.forNode(parameter.identifier);
+      element.parameterKind = parameter.kind;
+      element.type = _typeProvider.dynamicType;
+      parameter.identifier.staticElement = element;
+      parameterElements.add(element);
+    }
+    FunctionExpression node = AstFactory.functionExpression2(parameters, body);
+    FunctionElementImpl element = new FunctionElementImpl.forNode(null);
+    element.parameters = parameterElements;
+    element.type = new FunctionTypeImpl(element);
+    node.element = element;
+    return node;
+  }
+
+  /**
+   * Return an integer literal that has been resolved to the correct type.
+   *
+   * @param value the value of the literal
+   * @return an integer literal that has been resolved to the correct type
+   */
+  IntegerLiteral _resolvedInteger(int value) {
+    IntegerLiteral literal = AstFactory.integer(value);
+    literal.staticType = _typeProvider.intType;
+    return literal;
+  }
+
+  /**
+   * Return a string literal that has been resolved to the correct type.
+   *
+   * @param value the value of the literal
+   * @return a string literal that has been resolved to the correct type
+   */
+  SimpleStringLiteral _resolvedString(String value) {
+    SimpleStringLiteral string = AstFactory.string2(value);
+    string.staticType = _typeProvider.stringType;
+    return string;
+  }
+
+  /**
+   * Return a simple identifier that has been resolved to a variable element with the given type.
+   *
+   * @param type the type of the variable being represented
+   * @param variableName the name of the variable
+   * @return a simple identifier that has been resolved to a variable element with the given type
+   */
+  SimpleIdentifier _resolvedVariable(InterfaceType type, String variableName) {
+    SimpleIdentifier identifier = AstFactory.identifier3(variableName);
+    VariableElementImpl element =
+        ElementFactory.localVariableElement(identifier);
+    element.type = type;
+    identifier.staticElement = element;
+    identifier.staticType = type;
+    return identifier;
+  }
+
+  /**
+   * Set the type of the given parameter to the given type.
+   *
+   * @param parameter the parameter whose type is to be set
+   * @param type the new type of the given parameter
+   */
+  void _setType(FormalParameter parameter, DartType type) {
+    SimpleIdentifier identifier = parameter.identifier;
+    Element element = identifier.staticElement;
+    if (element is! ParameterElement) {
+      element = new ParameterElementImpl.forNode(identifier);
+      identifier.staticElement = element;
+    }
+    (element as ParameterElementImpl).type = type;
+  }
+}
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 137deb5..64bebe3 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -12,7 +12,7 @@
 
 import '../reflective_tests.dart';
 import '../utils.dart';
-import 'resolver_test.dart';
+import 'resolver_test_case.dart';
 
 main() {
   initializeTestEnvironment();
@@ -23,17 +23,18 @@
 @reflectiveTest
 class StaticTypeWarningCodeTest extends ResolverTestCase {
   void fail_inaccessibleSetter() {
-    Source source = addSource(r'''
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INACCESSIBLE_SETTER]);
-    verify([source]);
+    // TODO(rnystrom): This doesn't look right.
+    assertErrorsInCode(
+        r'''
+''',
+        [StaticTypeWarningCode.INACCESSIBLE_SETTER]);
   }
 
   void fail_method_lookup_mixin_of_extends() {
     // See dartbug.com/25605
     resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource('''
+    assertErrorsInUnverifiedCode(
+        '''
 class A { a() => null; }
 class B {}
 abstract class M extends A {}
@@ -41,19 +42,19 @@
 main() {
   new T().a(); // Warning: The method 'a' is not defined for the class 'T'
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      // TODO(paulberry): when dartbug.com/25614 is fixed, add static warning
-      // code for "B does not extend A".
-      StaticTypeWarningCode.UNDEFINED_METHOD
-    ]);
+''',
+        [
+          // TODO(paulberry): when dartbug.com/25614 is fixed, add static warning
+          // code for "B does not extend A".
+          StaticTypeWarningCode.UNDEFINED_METHOD
+        ]);
   }
 
   void fail_method_lookup_mixin_of_implements() {
     // See dartbug.com/25605
     resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource('''
+    assertErrorsInUnverifiedCode(
+        '''
 class A { a() => null; }
 class B {}
 abstract class M implements A {}
@@ -61,18 +62,18 @@
 main() {
   new T().a(); // Warning: The method 'a' is not defined for the class 'T'
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-      StaticTypeWarningCode.UNDEFINED_METHOD
-    ]);
+''',
+        [
+          StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          StaticTypeWarningCode.UNDEFINED_METHOD
+        ]);
   }
 
   void fail_method_lookup_mixin_of_mixin() {
     // See dartbug.com/25605
     resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource('''
+    assertErrorsInUnverifiedCode(
+        '''
 class A {}
 class B { b() => null; }
 class C {}
@@ -81,15 +82,15 @@
 main() {
   new T().b();
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void fail_method_lookup_mixin_of_mixin_application() {
     // See dartbug.com/25605
     resetWithOptions(new AnalysisOptionsImpl()..enableSuperMixins = true);
-    Source source = addSource('''
+    assertErrorsInUnverifiedCode(
+        '''
 class A { a() => null; }
 class B {}
 class C {}
@@ -98,21 +99,19 @@
 main() {
   new T().a();
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void fail_undefinedEnumConstant() {
     // We need a way to set the parseEnum flag in the parser to true.
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 enum E { ONE }
 E e() {
   return E.TWO;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT]);
   }
 
   void test_ambiguousImport_function() {
@@ -141,7 +140,8 @@
     // dubious practice for the computation of an assert message to have side
     // effects, since it is only evaluated if the assert fails).
     resetWithOptions(new AnalysisOptionsImpl()..enableAssertMessage = true);
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 class C {
   void foo() {}
 }
@@ -152,40 +152,143 @@
     assert(true, () { x = new C(); return 'msg'; }());
   }
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
     // Do not verify since `x.foo()` fails to resolve.
   }
 
   void test_await_flattened() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 import 'dart:async';
 Future<Future<int>> ffi() => null;
 f() async {
   Future<int> b = await ffi(); // Warning: int not assignable to Future<int>
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_await_simple() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 import 'dart:async';
 Future<int> fi() => null;
 f() async {
   String a = await fi(); // Warning: int not assignable to String
 }
+''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  void test_awaitForIn_declaredVariableRightType() {
+    assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<int> stream;
+  await for (int i in stream) {}
+}
 ''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+  }
+
+  void test_awaitForIn_declaredVariableWrongType() {
+    assertErrorsInCode(
+        '''
+import 'dart:async';
+f() async {
+  Stream<String> stream;
+  await for (int i in stream) {}
+}
+''',
+        [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  void test_awaitForIn_downcast() {
+    assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<num> stream;
+  await for (int i in stream) {}
+}
+''');
+  }
+
+  void test_awaitForIn_dynamicStream() {
+    assertNoErrorsInCode('''
+f() async {
+  dynamic stream;
+  await for (int i in stream) {}
+}
+''');
+  }
+
+  void test_awaitForIn_dynamicVariable() {
+    assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<int> stream;
+  await for (var i in stream) {}
+}
+''');
+  }
+
+  void test_awaitForIn_existingVariableRightType() {
+    assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<int> stream;
+  int i;
+  await for (i in stream) {}
+}
+''');
+  }
+
+  void test_awaitForIn_existingVariableWrongType() {
+    assertErrorsInCode(
+        '''
+import 'dart:async';
+f() async {
+  Stream<String> stream;
+  int i;
+  await for (i in stream) {}
+}
+''',
+        [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  void test_awaitForIn_notStream() {
+    assertErrorsInCode(
+        '''
+f() async {
+  await for (var i in true) {}
+}
+''',
+        [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
+  }
+
+  void test_awaitForIn_streamOfDynamic() {
+    assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream stream;
+  await for (int i in stream) {}
+}
+''');
+  }
+
+  void test_awaitForIn_upcast() {
+    assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<int> stream;
+  await for (num i in stream) {}
+}
+''');
   }
 
   void test_bug21912() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 class A {}
 class B extends A {}
 
@@ -204,120 +307,232 @@
     left = t2;
   }
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.INVALID_ASSIGNMENT,
-      StaticTypeWarningCode.INVALID_ASSIGNMENT
-    ]);
-    verify([source]);
+''',
+        [
+          StaticTypeWarningCode.INVALID_ASSIGNMENT,
+          StaticTypeWarningCode.INVALID_ASSIGNMENT
+        ]);
   }
 
   void test_expectedOneListTypeArgument() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 main() {
   <int, int> [];
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
   }
 
   void test_expectedTwoMapTypeArguments_one() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 main() {
   <int> {};
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
   }
 
   void test_expectedTwoMapTypeArguments_three() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 main() {
   <int, int, int> {};
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
+  }
+
+  void test_forIn_declaredVariableRightType() {
+    assertNoErrorsInCode('''
+f() {
+  for (int i in <int>[]) {}
+}
+''');
+  }
+
+  void test_forIn_declaredVariableWrongType() {
+    assertErrorsInCode(
+        '''
+f() {
+  for (int i in <String>[]) {}
+}
+''',
+        [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  void test_forIn_downcast() {
+    assertNoErrorsInCode('''
+f() {
+  for (int i in <num>[]) {}
+}
+''');
+  }
+
+  void test_forIn_dynamic() {
+    assertNoErrorsInCode('''
+f() {
+  dynamic d; // Could be [].
+  for (var i in d) {}
+}
+''');
+  }
+
+  void test_forIn_dynamicIterable() {
+    assertNoErrorsInCode('''
+f() {
+  dynamic iterable;
+  for (int i in iterable) {}
+}
+''');
+  }
+
+  void test_forIn_dynamicVariable() {
+    assertNoErrorsInCode('''
+f() {
+  for (var i in <int>[]) {}
+}
+''');
+  }
+
+  void test_forIn_existingVariableRightType() {
+    assertNoErrorsInCode('''
+f() {
+  int i;
+  for (i in <int>[]) {}
+}
+''');
+  }
+
+  void test_forIn_existingVariableWrongType() {
+    assertErrorsInCode(
+        '''
+f() {
+  int i;
+  for (i in <String>[]) {}
+}
+''',
+        [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  void test_forIn_iterableOfDynamic() {
+    assertNoErrorsInCode('''
+f() {
+  for (int i in []) {}
+}
+''');
+  }
+
+  void test_forIn_notIterable() {
+    assertErrorsInCode(
+        '''
+f() {
+  for (var i in true) {}
+}
+''',
+        [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
+  }
+
+  void test_forIn_object() {
+    assertNoErrorsInCode('''
+f() {
+  Object o; // Could be [].
+  for (var i in o) {}
+}
+''');
+  }
+
+  void test_forIn_typeBoundBad() {
+    assertErrorsInCode(
+        '''
+class Foo<T extends Iterable<int>> {
+  void method(T iterable) {
+    for (String i in iterable) {}
+  }
+}
+''',
+        [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  void test_forIn_typeBoundGood() {
+    assertNoErrorsInCode('''
+class Foo<T extends Iterable<int>> {
+  void method(T iterable) {
+    for (var i in iterable) {}
+  }
+}
+''');
+  }
+
+  void test_forIn_upcast() {
+    assertNoErrorsInCode('''
+f() {
+  for (num i in <int>[]) {}
+}
+''');
   }
 
   void test_illegal_return_type_async_function() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 int f() async {}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
-      HintCode.MISSING_RETURN
-    ]);
-    verify([source]);
+''',
+        [
+          StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
+          HintCode.MISSING_RETURN
+        ]);
   }
 
   void test_illegal_return_type_async_generator_function() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 int f() async* {}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
   }
 
   void test_illegal_return_type_async_generator_method() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 class C {
   int f() async* {}
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
   }
 
   void test_illegal_return_type_async_method() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 class C {
   int f() async {}
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
-      HintCode.MISSING_RETURN
-    ]);
-    verify([source]);
+''',
+        [
+          StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
+          HintCode.MISSING_RETURN
+        ]);
   }
 
   void test_illegal_return_type_sync_generator_function() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 int f() sync* {}
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
   }
 
   void test_illegal_return_type_sync_generator_method() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 class C {
   int f() sync* {}
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
   }
 
   void test_inconsistentMethodInheritance_paramCount() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 abstract class A {
   int x();
 }
@@ -325,115 +540,101 @@
   int x(int y);
 }
 class C implements A, B {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
   }
 
   void test_inconsistentMethodInheritance_paramType() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 abstract class A {
   x(int i);
 }
 abstract class B {
   x(String s);
 }
-abstract class C implements A, B {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
-    verify([source]);
+abstract class C implements A, B {}
+''',
+        [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
   }
 
   void test_inconsistentMethodInheritance_returnType() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 abstract class A {
   int x();
 }
 abstract class B {
   String x();
 }
-abstract class C implements A, B {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
-    verify([source]);
+abstract class C implements A, B {}
+''',
+        [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
   }
 
   void test_instanceAccessToStaticMember_method_invocation() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static m() {}
 }
 main(A a) {
   a.m();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
   }
 
   void test_instanceAccessToStaticMember_method_reference() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static m() {}
 }
 main(A a) {
   a.m;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
   }
 
   void test_instanceAccessToStaticMember_propertyAccess_field() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static var f;
 }
 main(A a) {
   a.f;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
   }
 
   void test_instanceAccessToStaticMember_propertyAccess_getter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static get f => 42;
 }
 main(A a) {
   a.f;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
   }
 
   void test_instanceAccessToStaticMember_propertyAccess_setter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static set f(x) {}
 }
 main(A a) {
   a.f = 42;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
   }
 
   void test_invalidAssignment_compoundAssignment() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class byte {
   int _value;
   byte(this._value);
@@ -443,152 +644,137 @@
 void main() {
   byte b = new byte(52);
   b += 3;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_defaultValue_named() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f({String x: 0}) {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_defaultValue_optional() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f([String x = 0]) {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_dynamic() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 main() {
   dynamic = 1;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_functionExpressionInvocation() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 main() {
   String x = (() => 5)();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_ifNullAssignment() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 void f(int i) {
   double d;
   d ??= i;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_instanceVariable() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   int x;
 }
 f() {
   A a;
   a.x = '0';
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_localVariable() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   int x;
   x = '0';
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_regressionInIssue18468Fix() {
     // https://code.google.com/p/dart/issues/detail?id=18628
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class C<T> {
   T t = int;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_staticVariable() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static int x;
 }
 f() {
   A.x = '0';
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_topLevelVariableDeclaration() {
-    Source source = addSource("int x = 'string';");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+    assertErrorsInCode(
+        "int x = 'string';", [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_typeParameter() {
     // 14221
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class B<T> {
   T value;
   void test(num n) {
     value = n;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invalidAssignment_variableDeclaration() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   int x = 'string';
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
   void test_invocationOfNonFunction_class() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   void m() {
     A();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+}''',
+        [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
   }
 
   void test_invocationOfNonFunction_localGenericFunction() {
@@ -599,41 +785,39 @@
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.enableStrictCallChecks = true;
     resetWithOptions(options);
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 f(Function f) {
   return f();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
   }
 
   void test_invocationOfNonFunction_localObject() {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.enableStrictCallChecks = true;
     resetWithOptions(options);
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 f(Object o) {
   return o();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
   }
 
   void test_invocationOfNonFunction_localVariable() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   int x;
   return x();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
   }
 
   void test_invocationOfNonFunction_ordinaryInvocation() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static int x;
 }
@@ -641,27 +825,27 @@
   m() {
     A.x();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+}''',
+        [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
     // A call to verify(source) fails as A.x() cannot be resolved.
   }
 
   void test_invocationOfNonFunction_staticInvocation() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static int get g => 0;
   f() {
     A.g();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+}''',
+        [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
     // A call to verify(source) fails as g() cannot be resolved.
   }
 
   void test_invocationOfNonFunction_superExpression() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   int get g => 0;
 }
@@ -669,282 +853,246 @@
   m() {
     var v = super.g();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
   }
 
   void test_invocationOfNonFunctionExpression_literal() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   3(5);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION]);
   }
 
   void test_nonBoolCondition_conditional() {
-    Source source = addSource("f() { return 3 ? 2 : 1; }");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-    verify([source]);
+    assertErrorsInCode("f() { return 3 ? 2 : 1; }",
+        [StaticTypeWarningCode.NON_BOOL_CONDITION]);
   }
 
   void test_nonBoolCondition_do() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   do {} while (3);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_CONDITION]);
   }
 
+  // https://github.com/dart-lang/sdk/issues/24713
   void test_nonBoolCondition_for() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   for (;3;) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_CONDITION]);
   }
 
   void test_nonBoolCondition_if() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   if (3) return 2; else return 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_CONDITION]);
   }
 
   void test_nonBoolCondition_while() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   while (3) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_CONDITION]);
   }
 
   void test_nonBoolExpression_functionType() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 int makeAssertion() => 1;
 f() {
   assert(makeAssertion);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
   }
 
   void test_nonBoolExpression_interfaceType() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   assert(0);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
   }
 
   void test_nonBoolNegationExpression() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 f() {
   !42;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION]);
   }
 
   void test_nonBoolOperand_and_left() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 bool f(int left, bool right) {
   return left && right;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_OPERAND]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_OPERAND]);
   }
 
   void test_nonBoolOperand_and_right() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 bool f(bool left, String right) {
   return left && right;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_OPERAND]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_OPERAND]);
   }
 
   void test_nonBoolOperand_or_left() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 bool f(List<int> left, bool right) {
   return left || right;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_OPERAND]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_OPERAND]);
   }
 
   void test_nonBoolOperand_or_right() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 bool f(bool left, double right) {
   return left || right;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_OPERAND]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_BOOL_OPERAND]);
   }
 
   void test_nonTypeAsTypeArgument_notAType() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 int A;
 class B<E> {}
-f(B<A> b) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
-    verify([source]);
+f(B<A> b) {}''',
+        [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
   }
 
   void test_nonTypeAsTypeArgument_undefinedIdentifier() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class B<E> {}
-f(B<A> b) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
-    verify([source]);
+f(B<A> b) {}''',
+        [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
   }
 
   void test_returnOfInvalidType_async_future_int_mismatches_future_null() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 import 'dart:async';
 Future<Null> f() async {
   return 5;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_async_future_int_mismatches_future_string() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 import 'dart:async';
 Future<String> f() async {
   return 5;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_async_future_int_mismatches_int() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 int f() async {
   return 5;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE
-    ]);
-    verify([source]);
+''',
+        [
+          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
+          StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE
+        ]);
   }
 
   void test_returnOfInvalidType_expressionFunctionBody_function() {
-    Source source = addSource("int f() => '0';");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+    assertErrorsInCode(
+        "int f() => '0';", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_expressionFunctionBody_getter() {
-    Source source = addSource("int get g => '0';");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+    assertErrorsInCode(
+        "int get g => '0';", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_expressionFunctionBody_localFunction() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   String m() {
     int f() => '0';
     return '0';
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_expressionFunctionBody_method() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   int f() => '0';
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_expressionFunctionBody_void() {
-    Source source = addSource("void f() => 42;");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+    assertErrorsInCode(
+        "void f() => 42;", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_function() {
-    Source source = addSource("int f() { return '0'; }");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+    assertErrorsInCode("int f() { return '0'; }",
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_getter() {
-    Source source = addSource("int get g { return '0'; }");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+    assertErrorsInCode("int get g { return '0'; }",
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_localFunction() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   String m() {
     int f() { return '0'; }
     return '0';
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_returnOfInvalidType_method() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   int f() { return '0'; }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
-  // https://github.com/dart-lang/sdk/issues/24713
   void test_returnOfInvalidType_not_issued_for_valid_generic_return() {
-    Source source = addSource(r'''
+    assertNoErrorsInCode(r'''
 abstract class F<T, U>  {
   U get value;
 }
@@ -958,321 +1106,296 @@
 }
 
 void main() { }''');
-    computeLibrarySourceErrors(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   void test_returnOfInvalidType_void() {
-    Source source = addSource("void f() { return 42; }");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-    verify([source]);
+    assertErrorsInCode("void f() { return 42; }",
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
   }
 
   void test_typeArgumentNotMatchingBounds_classTypeAlias() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class C {}
 class G<E extends A> {}
-class D = G<B> with C;''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+class D = G<B> with C;
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_extends() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-class C extends G<B>{}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+class C extends G<B>{}
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_extends_regressionInIssue18468Fix() {
     // https://code.google.com/p/dart/issues/detail?id=18628
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class X<T extends Type> {}
-class Y<U> extends X<U> {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+class Y<U> extends X<U> {}
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_fieldFormalParameter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
 class C {
   var f;
   C(G<B> this.f) {}
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_functionReturnType() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-G<B> f() { return null; }''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+G<B> f() { return null; }
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_functionTypeAlias() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-typedef G<B> f();''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+typedef G<B> f();
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_functionTypedFormalParameter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-f(G<B> h()) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+f(G<B> h()) {}
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_implements() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-class C implements G<B>{}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+class C implements G<B>{}
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_is() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-var b = 1 is G<B>;''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+var b = 1 is G<B>;
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_methodReturnType() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
 class C {
   G<B> m() { return null; }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_new() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-f() { return new G<B>(); }''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+f() { return new G<B>(); }
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_new_superTypeOfUpperBound() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B extends A {}
 class C extends B {}
 class G<E extends B> {}
-f() { return new G<A>(); }''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+f() { return new G<A>(); }
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_parameter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-f(G<B> g) {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+f(G<B> g) {}
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_redirectingConstructor() {
-    Source source = addSource(r'''
+    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>;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
-      StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE
-    ]);
-    verify([source]);
+}''',
+        [
+          StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
+          StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE
+        ]);
   }
 
   void test_typeArgumentNotMatchingBounds_typeArgumentList() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class C<E> {}
 class D<E extends A> {}
-C<D<B>> Var;''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+C<D<B>> Var;
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_typeParameter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class C {}
 class G<E extends A> {}
-class D<F extends G<B>> {}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+class D<F extends G<B>> {}
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_variableDeclaration() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-G<B> g;''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+G<B> g;
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeArgumentNotMatchingBounds_with() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {}
 class G<E extends A> {}
-class C extends Object with G<B>{}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+class C extends Object with G<B>{}
+''',
+        [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   void test_typeParameterSupertypeOfItsBound() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A<T extends T> {
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND]);
-    verify([source]);
+}
+''',
+        [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND]);
   }
 
   void
       test_typePromotion_booleanAnd_useInRight_accessedInClosureRight_mutated() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 callMe(f()) { f(); }
 main(Object p) {
   (p is String) && callMe(() { p.length; });
   p = 0;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_booleanAnd_useInRight_mutatedInLeft() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   ((p is String) && ((p = 42) == 42)) && p.length != 0;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_booleanAnd_useInRight_mutatedInRight() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   (p is String) && (((p = 42) == 42) && p.length != 0);
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void
       test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_after() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 callMe(f()) { f(); }
 main(Object p) {
   p is String ? callMe(() { p.length; }) : 0;
   p = 42;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void
       test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_before() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 callMe(f()) { f(); }
 main(Object p) {
   p = 42;
   p is String ? callMe(() { p.length; }) : 0;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_conditional_useInThen_hasAssignment() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   p is String ? (p.length + (p = 42)) : 0;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_accessedInClosure_hasAssignment() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 callMe(f()) { f(); }
 main(Object p) {
   if (p is String) {
@@ -1281,24 +1404,24 @@
     });
   }
   p = 0;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_and_right_hasAssignment() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   if (p is String && (p = null) == null) {
     p.length;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_extends_notMoreSpecific_dynamic() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class V {}
 class A<T> {}
 class B<S> extends A<S> {
@@ -1309,13 +1432,13 @@
   if (p is B) {
     p.b;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_extends_notMoreSpecific_notMoreSpecificTypeArg() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class V {}
 class A<T> {}
 class B<S> extends A<S> {
@@ -1326,85 +1449,85 @@
   if (p is B<int>) {
     p.b;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_hasAssignment_after() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   if (p is String) {
     p.length;
     p = 0;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_hasAssignment_before() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   if (p is String) {
     p = 0;
     p.length;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_hasAssignment_inClosure_anonymous_after() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   if (p is String) {
     p.length;
   }
   () {p = 0;};
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_hasAssignment_inClosure_anonymous_before() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   () {p = 0;};
   if (p is String) {
     p.length;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_hasAssignment_inClosure_function_after() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   if (p is String) {
     p.length;
   }
   f() {p = 0;};
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_hasAssignment_inClosure_function_before() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 main(Object p) {
   f() {p = 0;};
   if (p is String) {
     p.length;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_implements_notMoreSpecific_dynamic() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class V {}
 class A<T> {}
 class B<S> implements A<S> {
@@ -1415,13 +1538,13 @@
   if (p is B) {
     p.b;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_typePromotion_if_with_notMoreSpecific_dynamic() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class V {}
 class A<T> {}
 class B<S> extends Object with A<S> {
@@ -1432,30 +1555,29 @@
   if (p is B) {
     p.b;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedFunction() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 void f() {
   g();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
   }
 
   void test_undefinedFunction_inCatch() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 void f() {
   try {
   } on Object {
     g();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
   }
 
   void test_undefinedFunction_inImportedLib() {
@@ -1472,11 +1594,11 @@
   }
 
   void test_undefinedGetter() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class T {}
-f(T e) { return e.m; }''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+f(T e) { return e.m; }''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedGetter_generic_function_call() {
@@ -1486,30 +1608,31 @@
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.enableStrictCallChecks = true;
     resetWithOptions(options);
-    Source source = addSource('''
+    assertErrorsInUnverifiedCode(
+        '''
 f(Function f) {
   return f.call;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedGetter_object_call() {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.enableStrictCallChecks = true;
     resetWithOptions(options);
-    Source source = addSource('''
+    assertErrorsInUnverifiedCode(
+        '''
 f(Object o) {
   return o.call;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedGetter_proxy_annotation_fakeProxy() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 library L;
 class Fake {
   const Fake();
@@ -1518,115 +1641,109 @@
 @proxy class PrefixProxy {}
 main() {
   new PrefixProxy().foo;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedGetter_static() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
-var a = A.B;''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+var a = A.B;''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedGetter_typeLiteral_cascadeTarget() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class T {
   static int get foo => 42;
 }
 main() {
   T..foo;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedGetter_typeLiteral_conditionalAccess() {
     // When applied to a type literal, the conditional access operator '?.'
     // cannot be used to access instance getters of Type.
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 class A {}
 f() => A?.hashCode;
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedGetter_void() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class T {
   void m() {}
 }
-f(T e) { return e.m().f; }''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
+f(T e) { return e.m().f; }''',
+        [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   void test_undefinedGetter_wrongNumberOfTypeArguments_tooLittle() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A<K, V> {
   K element;
 }
 main(A<int> a) {
   a.element.anyGetterExistsInDynamic;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
   }
 
   void test_undefinedGetter_wrongNumberOfTypeArguments_tooMany() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A<E> {
   E element;
 }
 main(A<int,int> a) {
   a.element.anyGetterExistsInDynamic;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
   }
 
   void test_undefinedGetter_wrongOfTypeArgument() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A<E> {
   E element;
 }
 main(A<NoSuchType> a) {
   a.element.anyGetterExistsInDynamic;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
   }
 
   void test_undefinedMethod() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   void m() {
     n();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_assignmentExpression() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B {
   f(A a) {
     A a2 = new A();
     a += a2;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_generic_function_call() {
@@ -1636,17 +1753,18 @@
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.enableStrictCallChecks = true;
     resetWithOptions(options);
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 f(Function f) {
   f.call();
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_ignoreTypePropagation() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B extends A {
   m() {}
@@ -1656,28 +1774,26 @@
     A a = new B();
     a.m();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_leastUpperBoundWithNull() {
-    Source source = addSource('f(bool b, int i) => (b ? null : i).foo();');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    assertErrorsInCode('f(bool b, int i) => (b ? null : i).foo();',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_object_call() {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.enableStrictCallChecks = true;
     resetWithOptions(options);
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 f(Object o) {
   o.call();
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_private() {
@@ -1688,19 +1804,20 @@
 class A {
   _foo() {}
 }''');
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 import 'lib.dart';
 class B extends A {
   test() {
     _foo();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_proxy_annotation_fakeProxy() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 library L;
 class Fake {
   const Fake();
@@ -1709,230 +1826,229 @@
 @proxy class PrefixProxy {}
 main() {
   new PrefixProxy().foo();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_typeLiteral_cascadeTarget() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 class T {
   static void foo() {}
 }
 main() {
   T..foo();
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethod_typeLiteral_conditionalAccess() {
     // When applied to a type literal, the conditional access operator '?.'
     // cannot be used to access instance methods of Type.
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 class A {}
 f() => A?.toString();
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
   void test_undefinedMethodWithConstructor() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class C {
   C.m();
 }
 f() {
   C c = C.m();
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR]);
   }
 
   void test_undefinedOperator_indexBoth() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
 f(A a) {
   a[0]++;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   void test_undefinedOperator_indexGetter() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
 f(A a) {
   a[0];
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   void test_undefinedOperator_indexSetter() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
 f(A a) {
   a[0] = 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   void test_undefinedOperator_plus() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
 f(A a) {
   a + 1;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   void test_undefinedOperator_postfixExpression() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 f(A a) {
   a++;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   void test_undefinedOperator_prefixExpression() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 f(A a) {
   ++a;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   void test_undefinedSetter() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class T {}
-f(T e1) { e1.m = 0; }''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
+f(T e1) { e1.m = 0; }''',
+        [StaticTypeWarningCode.UNDEFINED_SETTER]);
   }
 
   void test_undefinedSetter_static() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
-f() { A.B = 0;}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
+f() { A.B = 0;}''',
+        [StaticTypeWarningCode.UNDEFINED_SETTER]);
   }
 
   void test_undefinedSetter_typeLiteral_cascadeTarget() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class T {
   static void set foo(_) {}
 }
 main() {
   T..foo = 42;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_SETTER]);
   }
 
   void test_undefinedSetter_void() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class T {
   void m() {}
 }
-f(T e) { e.m().f = 0; }''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
+f(T e) { e.m().f = 0; }''',
+        [StaticTypeWarningCode.UNDEFINED_SETTER]);
   }
 
   void test_undefinedSuperGetter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B extends A {
   get g {
     return super.g;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_GETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_SUPER_GETTER]);
   }
 
   void test_undefinedSuperMethod() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B extends A {
   m() { return super.m(); }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
   }
 
   void test_undefinedSuperOperator_binaryExpression() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
 class B extends A {
   operator +(value) {
     return super + value;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
   }
 
   void test_undefinedSuperOperator_indexBoth() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
 class B extends A {
   operator [](index) {
     return super[index]++;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
   }
 
   void test_undefinedSuperOperator_indexGetter() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
 class B extends A {
   operator [](index) {
     return super[index + 1];
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
   }
 
   void test_undefinedSuperOperator_indexSetter() {
-    Source source = addSource(r'''
+    assertErrorsInUnverifiedCode(
+        r'''
 class A {}
 class B extends A {
   operator []=(index, value) {
     return super[index] = 0;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
   }
 
   void test_undefinedSuperSetter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class B extends A {
   f() {
     super.m = 0;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_SETTER]);
+}''',
+        [StaticTypeWarningCode.UNDEFINED_SUPER_SETTER]);
   }
 
   void test_unqualifiedReferenceToNonLocalStaticMember_getter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static int get a => 0;
 }
@@ -1940,16 +2056,15 @@
   int b() {
     return a;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
-    ]);
-    verify([source]);
+}''',
+        [
+          StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
+        ]);
   }
 
   void test_unqualifiedReferenceToNonLocalStaticMember_method() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static void a() {}
 }
@@ -1957,16 +2072,15 @@
   void b() {
     a();
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
-    ]);
-    verify([source]);
+}''',
+        [
+          StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
+        ]);
   }
 
   void test_unqualifiedReferenceToNonLocalStaticMember_setter() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {
   static set a(x) {}
 }
@@ -1974,196 +2088,174 @@
   b(y) {
     a = y;
   }
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
-    ]);
-    verify([source]);
+}''',
+        [
+          StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
+        ]);
   }
 
   void test_wrongNumberOfTypeArguments_classAlias() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class M {}
-class B<F extends num> = A<F> with M;''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-    verify([source]);
+class B<F extends num> = A<F> with M;''',
+        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
   }
 
   void test_wrongNumberOfTypeArguments_tooFew() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A<E, F> {}
-A<A> a = null;''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-    verify([source]);
+A<A> a = null;''',
+        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
   }
 
   void test_wrongNumberOfTypeArguments_tooMany() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A<E> {}
-A<A, A> a = null;''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-    verify([source]);
+A<A, A> a = null;''',
+        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
   }
 
   void test_wrongNumberOfTypeArguments_typeTest_tooFew() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class C<K, V> {}
 f(p) {
   return p is C<A>;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
   }
 
   void test_wrongNumberOfTypeArguments_typeTest_tooMany() {
-    Source source = addSource(r'''
+    assertErrorsInCode(
+        r'''
 class A {}
 class C<E> {}
 f(p) {
   return p is C<A, A>;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-    verify([source]);
+}''',
+        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
   }
 
   void test_yield_async_to_basic_type() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 int f() async* {
   yield 3;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
-    ]);
-    verify([source]);
+''',
+        [
+          StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+          StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
+        ]);
   }
 
   void test_yield_async_to_iterable() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 Iterable<int> f() async* {
   yield 3;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
-    ]);
-    verify([source]);
+''',
+        [
+          StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+          StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
+        ]);
   }
 
   void test_yield_async_to_mistyped_stream() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 import 'dart:async';
 Stream<int> f() async* {
   yield "foo";
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
   }
 
   void test_yield_each_async_non_stream() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 f() async* {
   yield* 0;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
   }
 
   void test_yield_each_async_to_mistyped_stream() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 import 'dart:async';
 Stream<int> f() async* {
   yield* g();
 }
 Stream<String> g() => null;
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
   }
 
   void test_yield_each_sync_non_iterable() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 f() sync* {
   yield* 0;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
   }
 
   void test_yield_each_sync_to_mistyped_iterable() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 Iterable<int> f() sync* {
   yield* g();
 }
 Iterable<String> g() => null;
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
   }
 
   void test_yield_sync_to_basic_type() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 int f() sync* {
   yield 3;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
-    ]);
-    verify([source]);
+''',
+        [
+          StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+          StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
+        ]);
   }
 
   void test_yield_sync_to_mistyped_iterable() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 Iterable<int> f() sync* {
   yield "foo";
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-    verify([source]);
+''',
+        [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
   }
 
   void test_yield_sync_to_stream() {
-    Source source = addSource('''
+    assertErrorsInCode(
+        '''
 import 'dart:async';
 Stream<int> f() sync* {
   yield 3;
 }
-''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
-    ]);
-    verify([source]);
+''',
+        [
+          StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+          StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
+        ]);
   }
 }
 
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 02c44b8..1445233 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -10,7 +10,7 @@
 
 import '../reflective_tests.dart';
 import '../utils.dart';
-import 'resolver_test.dart';
+import 'resolver_test_case.dart';
 
 main() {
   initializeTestEnvironment();
@@ -993,7 +993,8 @@
     assertErrors(source, [StaticWarningCode.CONFLICTING_DART_IMPORT]);
   }
 
-  void test_conflictingInstanceGetterAndSuperclassMember_declField_direct_setter() {
+  void
+      test_conflictingInstanceGetterAndSuperclassMember_declField_direct_setter() {
     Source source = addSource(r'''
 class A {
   static set v(x) {}
@@ -1007,7 +1008,8 @@
     verify([source]);
   }
 
-  void test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_getter() {
+  void
+      test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_getter() {
     Source source = addSource(r'''
 class A {
   static get v => 0;
@@ -1021,7 +1023,8 @@
     verify([source]);
   }
 
-  void test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_method() {
+  void
+      test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_method() {
     Source source = addSource(r'''
 class A {
   static v() {}
@@ -1035,7 +1038,8 @@
     verify([source]);
   }
 
-  void test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_setter() {
+  void
+      test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_setter() {
     Source source = addSource(r'''
 class A {
   static set v(x) {}
@@ -2319,6 +2323,24 @@
     verify([source]);
   }
 
+  void test_missingEnumConstantInSwitch() {
+    Source source = addSource(r'''
+enum E { ONE, TWO, THREE, FOUR }
+bool odd(E e) {
+  switch (e) {
+    case E.ONE:
+    case E.THREE: return true;
+  }
+  return false;
+}''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH,
+      StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH
+    ]);
+    verify([source]);
+  }
+
   void test_mixedReturnTypes_localFunction() {
     Source source = addSource(r'''
 class C {
@@ -2505,7 +2527,8 @@
     verify([source]);
   }
 
-  void test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_interface() {
+  void
+      test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_interface() {
     // 15979
     Source source = addSource(r'''
 abstract class M {}
@@ -2534,7 +2557,8 @@
     verify([source]);
   }
 
-  void test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_superclass() {
+  void
+      test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_superclass() {
     // 15979
     Source source = addSource(r'''
 class M {}
@@ -2548,7 +2572,8 @@
     verify([source]);
   }
 
-  void test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation() {
+  void
+      test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation() {
     // 15028
     Source source = addSource(r'''
 class C {
@@ -2616,7 +2641,8 @@
     verify([source]);
   }
 
-  void test_nonAbstractClassInheritsAbstractMemberOne_method_optionalParamCount() {
+  void
+      test_nonAbstractClassInheritsAbstractMemberOne_method_optionalParamCount() {
     // 7640
     Source source = addSource(r'''
 abstract class A {
@@ -2683,7 +2709,8 @@
     verify([source]);
   }
 
-  void test_nonAbstractClassInheritsAbstractMemberOne_setter_and_implicitSetter() {
+  void
+      test_nonAbstractClassInheritsAbstractMemberOne_setter_and_implicitSetter() {
     // test from language/override_inheritance_abstract_test_14.dart
     Source source = addSource(r'''
 abstract class A {
@@ -2744,7 +2771,8 @@
     verify([source]);
   }
 
-  void test_nonAbstractClassInheritsAbstractMemberOne_variable_fromInterface_missingGetter() {
+  void
+      test_nonAbstractClassInheritsAbstractMemberOne_variable_fromInterface_missingGetter() {
     // 16133
     Source source = addSource(r'''
 class I {
@@ -2759,7 +2787,8 @@
     verify([source]);
   }
 
-  void test_nonAbstractClassInheritsAbstractMemberOne_variable_fromInterface_missingSetter() {
+  void
+      test_nonAbstractClassInheritsAbstractMemberOne_variable_fromInterface_missingSetter() {
     // 16133
     Source source = addSource(r'''
 class I {
@@ -2803,7 +2832,8 @@
     verify([source]);
   }
 
-  void test_nonAbstractClassInheritsAbstractMemberTwo_variable_fromInterface_missingBoth() {
+  void
+      test_nonAbstractClassInheritsAbstractMemberTwo_variable_fromInterface_missingBoth() {
     // 16133
     Source source = addSource(r'''
 class I {
@@ -3189,7 +3219,8 @@
     ]);
   }
 
-  void test_typeAnnotationDeferredClass_functionTypedFormalParameter_returnType() {
+  void
+      test_typeAnnotationDeferredClass_functionTypedFormalParameter_returnType() {
     resolveWithErrors(<String>[
       r'''
 library lib1;
@@ -3616,22 +3647,4 @@
     computeLibrarySourceErrors(source);
     assertErrors(source, [StaticWarningCode.VOID_RETURN_FOR_GETTER]);
   }
-
-  void test_missingEnumConstantInSwitch() {
-    Source source = addSource(r'''
-enum E { ONE, TWO, THREE, FOUR }
-bool odd(E e) {
-  switch (e) {
-    case E.ONE:
-    case E.THREE: return true;
-  }
-  return false;
-}''');
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH,
-      StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH
-    ]);
-    verify([source]);
-  }
 }
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..8a55212
--- /dev/null
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -0,0 +1,2277 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.strong_mode_test;
+
+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/generated/engine.dart';
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:unittest/unittest.dart';
+
+import '../reflective_tests.dart';
+import '../utils.dart';
+import 'resolver_test_case.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(StrongModeDownwardsInferenceTest);
+  runReflectiveTests(StrongModeStaticTypeAnalyzer2Test);
+  runReflectiveTests(StrongModeTypePropagationTest);
+}
+
+/**
+ * Strong mode static analyzer downwards inference tests
+ */
+@reflectiveTest
+class StrongModeDownwardsInferenceTest extends ResolverTestCase {
+  TypeAssertions _assertions;
+
+  Asserter<DartType> _isDynamic;
+  Asserter<InterfaceType> _isFutureOfDynamic;
+  Asserter<InterfaceType> _isFutureOfInt;
+  Asserter<DartType> _isInt;
+  Asserter<DartType> _isNum;
+  Asserter<DartType> _isString;
+
+  AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, DartType>
+      _isFunction2Of;
+  AsserterBuilder<List<Asserter<DartType>>, InterfaceType> _isFutureOf;
+  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> _sameElement;
+
+  @override
+  void setUp() {
+    super.setUp();
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.strongMode = true;
+    resetWithOptions(options);
+    _assertions = new TypeAssertions(typeProvider);
+    _isType = _assertions.isType;
+    _hasElement = _assertions.hasElement;
+    _isInstantiationOf = _assertions.isInstantiationOf;
+    _isInt = _assertions.isInt;
+    _isNum = _assertions.isNum;
+    _isString = _assertions.isString;
+    _isDynamic = _assertions.isDynamic;
+    _isListOf = _assertions.isListOf;
+    _isMapOf = _assertions.isMapOf;
+    _isFunction2Of = _assertions.isFunction2Of;
+    _sameElement = _assertions.sameElement;
+    _isFutureOf = _isInstantiationOf(_sameElement(typeProvider.futureType));
+    _isFutureOfDynamic = _isFutureOf([_isDynamic]);
+    _isFutureOfInt = _isFutureOf([_isInt]);
+    _isStreamOf = _isInstantiationOf(_sameElement(typeProvider.streamType));
+  }
+
+  void test_async_method_propagation() {
+    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 = 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);
+    // This should be int when we handle the implicit Future<T> | T union
+    // https://github.com/dart-lang/sdk/issues/25322
+    check("f4", _isFutureOfDynamic);
+    check("f5", _isFutureOfInt);
+
+    check("g0", _isFutureOfDynamic);
+    check("g1", _isFutureOfDynamic);
+    check("g2", _isFutureOfDynamic);
+
+    check("g3", _isFutureOfInt);
+    // This should be int when we handle the implicit Future<T> | T union
+    // https://github.com/dart-lang/sdk/issues/25322
+    check("g4", _isFutureOfDynamic);
+    check("g5", _isFutureOfInt);
+  }
+
+  void test_async_propagation() {
+    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 = 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);
+    // This should be int when we handle the implicit Future<T> | T union
+    // https://github.com/dart-lang/sdk/issues/25322
+    check("f4", _isFutureOfDynamic);
+    check("f5", _isFutureOfInt);
+
+    check("g0", _isFutureOfDynamic);
+    check("g1", _isFutureOfDynamic);
+    check("g2", _isFutureOfDynamic);
+
+    check("g3", _isFutureOfInt);
+    // This should be int when we handle the implicit Future<T> | T union
+    // https://github.com/dart-lang/sdk/issues/25322
+    check("g4", _isFutureOfDynamic);
+    check("g5", _isFutureOfInt);
+  }
+
+  void test_async_star_method_propagation() {
+    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 = 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([_isListOf(_isInt)]));
+  }
+
+  void test_async_star_propagation() {
+    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 = 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([_isListOf(_isInt)]));
+  }
+
+  void test_cascadeExpression() {
+    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 = 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").element;
+
+    CascadeExpression cascade = fetch(0);
+    _isInstantiationOf(_hasElement(elementA))([_isInt])(cascade.staticType);
+    MethodInvocation invoke = cascade.cascadeSections[0];
+    FunctionExpression function = invoke.argumentList.arguments[1];
+    ExecutableElement f0 = function.element;
+    _isListOf(_isInt)(f0.type.returnType);
+    expect(f0.type.normalParameterTypes[0], typeProvider.intType);
+  }
+
+  void test_constructorInitializer_propagation() {
+    String code = r'''
+      class A {
+        List<String> x;
+        A() : this.x = [];
+      }
+   ''';
+    CompilationUnit unit = resolveSource(code);
+    ConstructorDeclaration constructor =
+        AstFinder.getConstructorInClass(unit, "A", null);
+    ConstructorFieldInitializer assignment = constructor.initializers[0];
+    Expression exp = assignment.expression;
+    _isListOf(_isString)(exp.staticType);
+  }
+
+  void test_factoryConstructor_propagation() {
+    String code = r'''
+      class A<T> {
+        factory A() { return new B(); }
+      }
+      class B<S> extends A<S> {}
+   ''';
+    CompilationUnit unit = 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").element;
+    ClassElement elementA = AstFinder.getClass(unit, "A").element;
+    expect(exp.constructorName.type.type.element, elementB);
+    _isInstantiationOf(_hasElement(elementB))(
+        [_isType(elementA.typeParameters[0].type)])(exp.staticType);
+  }
+
+  void test_fieldDeclaration_propagation() {
+    String code = r'''
+      class A {
+        List<String> f0 = ["hello"];
+      }
+   ''';
+    CompilationUnit unit = resolveSource(code);
+
+    VariableDeclaration field = AstFinder.getFieldInClass(unit, "A", "f0");
+
+    _isListOf(_isString)(field.initializer.staticType);
+  }
+
+  void test_functionDeclaration_body_propagation() {
+    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 = 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 = anon1.element.type;
+    expect(type1.returnType, typeProvider.intType);
+    expect(type1.normalParameterTypes[0], typeProvider.intType);
+  }
+
+  void test_functionLiteral_assignment_typedArguments() {
+    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 = 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 exp.element.type;
+    }
+    _isFunction2Of(_isInt, _isString)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isString, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isInt)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  void test_functionLiteral_assignment_unTypedArguments() {
+    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 = 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 exp.element.type;
+    }
+    _isFunction2Of(_isInt, _isString)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isInt, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isInt)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  void test_functionLiteral_body_propagation() {
+    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 = 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);
+  }
+
+  void test_functionLiteral_functionExpressionInvocation_typedArguments() {
+    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 = 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 exp.element.type;
+    }
+    _isFunction2Of(_isInt, _isString)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isString, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isInt)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  void test_functionLiteral_functionExpressionInvocation_unTypedArguments() {
+    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 = 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 exp.element.type;
+    }
+    _isFunction2Of(_isInt, _isString)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isInt, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isInt)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  void test_functionLiteral_functionInvocation_typedArguments() {
+    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 = 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 exp.element.type;
+    }
+    _isFunction2Of(_isInt, _isString)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isString, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isInt)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  void test_functionLiteral_functionInvocation_unTypedArguments() {
+    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 = 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 exp.element.type;
+    }
+    _isFunction2Of(_isInt, _isString)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isInt, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isInt)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  void test_functionLiteral_methodInvocation_typedArguments() {
+    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 = 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 exp.element.type;
+    }
+    _isFunction2Of(_isInt, _isString)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isString, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isInt)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  void test_functionLiteral_methodInvocation_unTypedArguments() {
+    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 = 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 exp.element.type;
+    }
+    _isFunction2Of(_isInt, _isString)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isInt, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isInt)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  void test_functionLiteral_unTypedArgument_propagation() {
+    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 = 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);
+  }
+
+  void test_inference_hints() {
+    Source source = addSource(r'''
+      void main () {
+        var x = 3;
+        List<int> l0 = [];
+     }
+   ''');
+    resolve2(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_instanceCreation() {
+    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() {
+        // Currently we only allow variable constraints.  Test that we reject.
+        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 = 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").element;
+    Element elementB = AstFinder.getClass(unit, "B").element;
+    Element elementC = AstFinder.getClass(unit, "C").element;
+    Element elementD = AstFinder.getClass(unit, "D").element;
+    Element elementE = AstFinder.getClass(unit, "E").element;
+    Element elementF = AstFinder.getClass(unit, "F").element;
+
+    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([_isDynamic, _isDynamic]), 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]));
+    }
+  }
+
+  void test_listLiteral_nested() {
+    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 = 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(assertListOfInt);
+
+    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);
+  }
+
+  void test_listLiteral_simple() {
+    String code = r'''
+      void main () {
+        List<int> l0 = [];
+        List<int> l1 = [3];
+        List<int> l2 = ["hello"];
+        List<int> l3 = ["hello", 3];
+     }
+   ''';
+    CompilationUnit unit = 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));
+  }
+
+  void test_listLiteral_simple_const() {
+    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 = 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));
+  }
+
+  void test_listLiteral_simple_disabled() {
+    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 = 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));
+  }
+
+  void test_listLiteral_simple_subtype() {
+    String code = r'''
+      void main () {
+        Iterable<int> l0 = [];
+        Iterable<int> l1 = [3];
+        Iterable<int> l2 = ["hello"];
+        Iterable<int> l3 = ["hello", 3];
+     }
+   ''';
+    CompilationUnit unit = 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));
+  }
+
+  void test_mapLiteral_nested() {
+    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 = 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, assertListOfString);
+
+    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);
+  }
+
+  void test_mapLiteral_simple() {
+    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 = 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));
+  }
+
+  void test_mapLiteral_simple_disabled() {
+    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 = 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));
+  }
+
+  void test_methodDeclaration_body_propagation() {
+    String code = r'''
+      class A {
+        List<String> m0(int x) => ["hello"];
+        List<String> m1(int x) {return [3];};
+      }
+   ''';
+    CompilationUnit unit = 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);
+  }
+
+  void test_redirectingConstructor_propagation() {
+    String code = r'''
+      class A {
+        A() : this.named([]);
+        A.named(List<String> x);
+      }
+   ''';
+    CompilationUnit unit = resolveSource(code);
+
+    ConstructorDeclaration constructor =
+        AstFinder.getConstructorInClass(unit, "A", null);
+    RedirectingConstructorInvocation invocation = constructor.initializers[0];
+    Expression exp = invocation.argumentList.arguments[0];
+    _isListOf(_isString)(exp.staticType);
+  }
+
+  void test_superConstructorInvocation_propagation() {
+    String code = r'''
+      class B {
+        B(List<String>);
+      }
+      class A extends B {
+        A() : super([]);
+      }
+   ''';
+    CompilationUnit unit = resolveSource(code);
+
+    ConstructorDeclaration constructor =
+        AstFinder.getConstructorInClass(unit, "A", null);
+    SuperConstructorInvocation invocation = constructor.initializers[0];
+    Expression exp = invocation.argumentList.arguments[0];
+    _isListOf(_isString)(exp.staticType);
+  }
+
+  void test_sync_star_method_propagation() {
+    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 = 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(_isListOf(_isInt)));
+  }
+
+  void test_sync_star_propagation() {
+    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 = 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(_isListOf(_isInt)));
+  }
+}
+
+/**
+ * Strong mode static analyzer end to end tests
+ */
+@reflectiveTest
+class StrongModeStaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared {
+  void fail_genericMethod_tearoff_instantiated() {
+    resolveTestUnit(r'''
+class C<E> {
+  /*=T*/ f/*<T>*/(E e) => null;
+  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
+  static final h = g;
+}
+
+/*=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");
+  }
+
+  void setUp() {
+    super.setUp();
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.strongMode = true;
+    resetWithOptions(options);
+  }
+
+  void test_dynamicObjectGetter_hashCode() {
+    String code = r'''
+main() {
+  dynamic a = null;
+  var foo = a.hashCode;
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'int', isNull);
+  }
+
+  void test_dynamicObjectMethod_toString() {
+    String code = r'''
+main() {
+  dynamic a = null;
+  var foo = a.toString();
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'String', isNull);
+  }
+
+  void test_genericFunction() {
+    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');
+  }
+
+  void test_genericFunction_bounds() {
+    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]');
+  }
+
+  void test_genericFunction_parameter() {
+    resolveTestUnit(r'''
+void g(/*=T*/ f/*<T>*/(/*=T*/ x)) {}
+''');
+    expectFunctionType('f', '<T>(T) → T',
+        elementTypeParams: '[T]', 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');
+  }
+
+  void test_genericFunction_static() {
+    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');
+  }
+
+  void test_genericFunction_typedef() {
+    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);
+  }
+}
+''';
+    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");
+  }
+
+  void test_genericMethod() {
+    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]');
+  }
+
+  void test_genericMethod_explicitTypeParams() {
+    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]));
+  }
+
+  void test_genericMethod_functionExpressionInvocation_explicit() {
+    resolveTestUnit(r'''
+class C<E> {
+  /*=T*/ f/*<T>*/(/*=T*/ e) => null;
+  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
+  static final h = g;
+}
+
+/*=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 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");
+  }
+
+  void test_genericMethod_functionExpressionInvocation_inferred() {
+    resolveTestUnit(r'''
+class C<E> {
+  /*=T*/ f/*<T>*/(/*=T*/ e) => null;
+  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
+  static final h = g;
+}
+
+/*=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 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);
+}
+''');
+    expectIdentifierType('methodCall', "int");
+    expectIdentifierType('staticCall', "int");
+    expectIdentifierType('staticFieldCall', "int");
+    expectIdentifierType('topFunCall', "int");
+    expectIdentifierType('topFieldCall', "int");
+    expectIdentifierType('localCall', "int");
+    expectIdentifierType('paramCall', "int");
+    expectIdentifierType('lambdaCall', "int");
+  }
+
+  void test_genericMethod_functionInvocation_explicit() {
+    resolveTestUnit(r'''
+class C<E> {
+  /*=T*/ f/*<T>*/(/*=T*/ e) => null;
+  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
+  static final h = g;
+}
+
+/*=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 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");
+  }
+
+  void test_genericMethod_functionInvocation_inferred() {
+    resolveTestUnit(r'''
+class C<E> {
+  /*=T*/ f/*<T>*/(/*=T*/ e) => null;
+  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
+  static final h = g;
+}
+
+/*=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 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");
+  }
+
+  void test_genericMethod_functionTypedParameter() {
+    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>');
+  }
+
+  void test_genericMethod_implicitDynamic() {
+    // Regression test for:
+    // https://github.com/dart-lang/sdk/issues/25100#issuecomment-162047588
+    // These should not cause any hints or warnings.
+    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', isNull);
+    expectIdentifierType('map((e) => 3);', '<T>((dynamic) → T) → T', isNull);
+
+    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');
+  }
+
+  void test_genericMethod_max_doubleDouble() {
+    String code = r'''
+import 'dart:math';
+main() {
+  var foo = max(1.0, 2.0);
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'double', isNull);
+  }
+
+  void test_genericMethod_max_doubleDouble_prefixed() {
+    String code = r'''
+import 'dart:math' as math;
+main() {
+  var foo = math.max(1.0, 2.0);
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'double', isNull);
+  }
+
+  void test_genericMethod_max_doubleInt() {
+    String code = r'''
+import 'dart:math';
+main() {
+  var foo = max(1.0, 2);
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'num', isNull);
+  }
+
+  void test_genericMethod_max_intDouble() {
+    String code = r'''
+import 'dart:math';
+main() {
+  var foo = max(1, 2.0);
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'num', isNull);
+  }
+
+  void test_genericMethod_max_intInt() {
+    String code = r'''
+import 'dart:math';
+main() {
+  var foo = max(1, 2);
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'int', isNull);
+  }
+
+  void test_genericMethod_nestedBound() {
+    String code = r'''
+class Foo<T extends num> {
+  void method/*<U extends T>*/(dynamic/*=U*/ u) {
+    u.abs();
+  }
+}
+''';
+    // Just validate that there is no warning on the call to `.abs()`.
+    resolveTestUnit(code);
+  }
+
+  void test_genericMethod_nestedCapture() {
+    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');
+  }
+
+  void test_genericMethod_nestedFunctions() {
+    resolveTestUnit(r'''
+/*=S*/ f/*<S>*/(/*=S*/ x) {
+  g/*<S>*/(/*=S*/ x) => f;
+  return null;
+}
+''');
+    expectIdentifierType('f', '<S>(S) → S');
+    expectIdentifierType('g', '<S>(S) → dynamic');
+  }
+
+  void test_genericMethod_override() {
+    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');
+  }
+
+  void test_genericMethod_override_bounds() {
+    resolveTestUnit(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;
+}
+''');
+  }
+
+  void test_genericMethod_override_invalidReturnType() {
+    Source source = addSource(r'''
+class C {
+  Iterable/*<T>*/ f/*<T>*/(/*=T*/ x) => null;
+}
+class D extends C {
+  String f/*<S>*/(/*=S*/ x) => null;
+}''');
+    // TODO(jmesserly): we can't use assertErrors because STRONG_MODE_* errors
+    // from CodeChecker don't have working equality.
+    List<AnalysisError> errors = analysisContext2.computeErrors(source);
+
+    // Sort errors by name.
+    errors.sort((AnalysisError e1, AnalysisError e2) =>
+        e1.errorCode.name.compareTo(e2.errorCode.name));
+
+    expect(errors.map((e) => e.errorCode.name), [
+      'INVALID_METHOD_OVERRIDE_RETURN_TYPE',
+      'STRONG_MODE_INVALID_METHOD_OVERRIDE'
+    ]);
+    expect(errors[0].message, contains('Iterable<S>'),
+        reason: 'errors should be in terms of the type parameters '
+            'at the error location');
+    verify([source]);
+  }
+
+  void test_genericMethod_override_invalidTypeParamBounds() {
+    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;
+}''');
+    // TODO(jmesserly): this is modified code from assertErrors, which we can't
+    // use directly because STRONG_MODE_* errors don't have working equality.
+    List<AnalysisError> errors = analysisContext2.computeErrors(source);
+    List errorNames = errors.map((e) => e.errorCode.name).toList();
+    expect(errorNames, hasLength(2));
+    expect(errorNames, contains('STRONG_MODE_INVALID_METHOD_OVERRIDE'));
+    expect(
+        errorNames, contains('INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND'));
+    verify([source]);
+  }
+
+  void test_genericMethod_override_invalidTypeParamCount() {
+    Source source = addSource(r'''
+class C {
+  /*=T*/ f/*<T>*/(/*=T*/ x) => null;
+}
+class D extends C {
+  /*=S*/ f/*<T, S>*/(/*=T*/ x) => null;
+}''');
+    // TODO(jmesserly): we can't use assertErrors because STRONG_MODE_* errors
+    // from CodeChecker don't have working equality.
+    List<AnalysisError> errors = analysisContext2.computeErrors(source);
+    expect(errors.map((e) => e.errorCode.name), [
+      'STRONG_MODE_INVALID_METHOD_OVERRIDE',
+      'INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS'
+    ]);
+    verify([source]);
+  }
+
+  void test_genericMethod_propagatedType_promotion() {
+    // 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.
+    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>', isNull);
+  }
+
+  void test_genericMethod_tearoff() {
+    resolveTestUnit(r'''
+class C<E> {
+  /*=T*/ f/*<T>*/(E e) => null;
+  static /*=T*/ g/*<T>*/(/*=T*/ e) => null;
+  static final h = g;
+}
+
+/*=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 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");
+  }
+
+  void test_genericMethod_then() {
+    String code = r'''
+import 'dart:async';
+String toString(int x) => x.toString();
+main() {
+  Future<int> bar = null;
+  var foo = bar.then(toString);
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'Future<String>', isNull);
+  }
+
+  void test_genericMethod_then_prefixed() {
+    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);
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'Future<String>', isNull);
+  }
+
+  void test_genericMethod_then_propagatedType() {
+    // 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));
+}
+''';
+    // This should produce no hints or warnings.
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'Future<String>', isNull);
+  }
+
+  void test_implicitBounds() {
+    String code = r'''
+class A<T> {}
+
+class B<T extends num> {}
+
+class C<S extends int, T extends B<S>, U extends B> {}
+
+void test() {
+//
+  A ai;
+  B bi;
+  C ci;
+  var aa = new A();
+  var bb = new B();
+  var cc = new C();
+}
+''';
+    resolveTestUnit(code);
+    expectIdentifierType('ai', "A<dynamic>");
+    expectIdentifierType('bi', "B<num>");
+    expectIdentifierType('ci', "C<int, B<int>, B<num>>");
+    expectIdentifierType('aa', "A<dynamic>");
+    expectIdentifierType('bb', "B<num>");
+    expectIdentifierType('cc', "C<int, B<int>, B<num>>");
+  }
+
+  void test_setterWithDynamicTypeIsError() {
+    Source source = addSource(r'''
+class A {
+  dynamic set f(String s) => null;
+}
+dynamic set g(int x) => null;
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
+      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER
+    ]);
+    verify([source]);
+  }
+
+  void test_setterWithExplicitVoidType_returningVoid() {
+    Source source = addSource(r'''
+void returnsVoid() {}
+class A {
+  void set f(String s) => returnsVoid();
+}
+void set g(int x) => returnsVoid();
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_setterWithNoVoidType() {
+    Source source = addSource(r'''
+class A {
+  set f(String s) {
+    return '42';
+  }
+}
+set g(int x) => 42;
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,]);
+    verify([source]);
+  }
+
+  void test_setterWithNoVoidType_returningVoid() {
+    Source source = addSource(r'''
+void returnsVoid() {}
+class A {
+  set f(String s) => returnsVoid();
+}
+set g(int x) => returnsVoid();
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_setterWithOtherTypeIsError() {
+    Source source = addSource(r'''
+class A {
+  String set f(String s) => null;
+}
+Object set g(x) => null;
+''');
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
+      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER
+    ]);
+    verify([source]);
+  }
+
+  void test_ternaryOperator_null_left() {
+    String code = r'''
+main() {
+  var foo = (true) ? null : 3;
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'int', isNull);
+  }
+
+  void test_ternaryOperator_null_right() {
+    String code = r'''
+main() {
+  var foo = (true) ? 3 : null;
+}
+''';
+    resolveTestUnit(code);
+    expectInitializerType('foo', 'int', isNull);
+  }
+}
+
+@reflectiveTest
+class StrongModeTypePropagationTest extends ResolverTestCase {
+  @override
+  void setUp() {
+    super.setUp();
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.strongMode = true;
+    resetWithOptions(options);
+  }
+
+  void test_foreachInference_dynamic_disabled() {
+    String code = r'''
+main() {
+  var list = <int>[];
+  for (dynamic v in list) {
+    v; // marker
+  }
+}''';
+    assertPropagatedIterationType(
+        code, typeProvider.dynamicType, typeProvider.intType);
+    assertTypeOfMarkedExpression(
+        code, typeProvider.dynamicType, typeProvider.intType);
+  }
+
+  void test_foreachInference_reusedVar_disabled() {
+    String code = r'''
+main() {
+  var list = <int>[];
+  var v;
+  for (v in list) {
+    v; // marker
+  }
+}''';
+    assertPropagatedIterationType(
+        code, typeProvider.dynamicType, typeProvider.intType);
+    assertTypeOfMarkedExpression(
+        code, typeProvider.dynamicType, typeProvider.intType);
+  }
+
+  void test_foreachInference_var() {
+    String code = r'''
+main() {
+  var list = <int>[];
+  for (var v in list) {
+    v; // marker
+  }
+}''';
+    assertPropagatedIterationType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_foreachInference_var_iterable() {
+    String code = r'''
+main() {
+  Iterable<int> list = <int>[];
+  for (var v in list) {
+    v; // marker
+  }
+}''';
+    assertPropagatedIterationType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_foreachInference_var_stream() {
+    String code = r'''
+import 'dart:async';
+main() async {
+  Stream<int> stream = null;
+  await for (var v in stream) {
+    v; // marker
+  }
+}''';
+    assertPropagatedIterationType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_bottom_disabled() {
+    String code = r'''
+main() {
+  var v = null;
+  v; // marker
+}''';
+    assertPropagatedAssignedType(code, typeProvider.dynamicType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.dynamicType, null);
+  }
+
+  void test_localVariableInference_constant() {
+    String code = r'''
+main() {
+  var v = 3;
+  v; // marker
+}''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_declaredType_disabled() {
+    String code = r'''
+main() {
+  dynamic v = 3;
+  v; // marker
+}''';
+    assertPropagatedAssignedType(
+        code, typeProvider.dynamicType, typeProvider.intType);
+    assertTypeOfMarkedExpression(
+        code, typeProvider.dynamicType, typeProvider.intType);
+  }
+
+  void test_localVariableInference_noInitializer_disabled() {
+    String code = r'''
+main() {
+  var v;
+  v = 3;
+  v; // marker
+}''';
+    assertPropagatedAssignedType(
+        code, typeProvider.dynamicType, typeProvider.intType);
+    assertTypeOfMarkedExpression(
+        code, typeProvider.dynamicType, typeProvider.intType);
+  }
+
+  void test_localVariableInference_transitive_field_inferred_lexical() {
+    String code = r'''
+class A {
+  final x = 3;
+  f() {
+    var v = x;
+    return v; // marker
+  }
+}
+main() {
+}
+''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_field_inferred_reversed() {
+    String code = r'''
+class A {
+  f() {
+    var v = x;
+    return v; // marker
+  }
+  final x = 3;
+}
+main() {
+}
+''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_field_lexical() {
+    String code = r'''
+class A {
+  int x = 3;
+  f() {
+    var v = x;
+    return v; // marker
+  }
+}
+main() {
+}
+''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_field_reversed() {
+    String code = r'''
+class A {
+  f() {
+    var v = x;
+    return v; // marker
+  }
+  int x = 3;
+}
+main() {
+}
+''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_list_local() {
+    String code = r'''
+main() {
+  var x = <int>[3];
+  var v = x[0];
+  v; // marker
+}''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_local() {
+    String code = r'''
+main() {
+  var x = 3;
+  var v = x;
+  v; // marker
+}''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_toplevel_inferred_lexical() {
+    String code = r'''
+final x = 3;
+main() {
+  var v = x;
+  v; // marker
+}
+''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_toplevel_inferred_reversed() {
+    String code = r'''
+main() {
+  var v = x;
+  v; // marker
+}
+final x = 3;
+''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_toplevel_lexical() {
+    String code = r'''
+int x = 3;
+main() {
+  var v = x;
+  v; // marker
+}
+''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_toplevel_reversed() {
+    String code = r'''
+main() {
+  var v = x;
+  v; // marker
+}
+int x = 3;
+''';
+    assertPropagatedAssignedType(code, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+}
diff --git a/pkg/analyzer/test/generated/test_all.dart b/pkg/analyzer/test/generated/test_all.dart
index 4785daf..3536c10 100644
--- a/pkg/analyzer/test/generated/test_all.dart
+++ b/pkg/analyzer/test/generated/test_all.dart
@@ -8,22 +8,31 @@
 
 import '../utils.dart';
 import 'all_the_rest_test.dart' as all_the_rest;
+import 'checked_mode_compile_time_error_code_test.dart'
+    as checked_mode_compile_time_error_code_test;
 import 'compile_time_error_code_test.dart' as compile_time_error_code_test;
 import 'constant_test.dart' as constant_test;
 import 'declaration_resolver_test.dart' as declaration_resolver_test;
+import 'element_resolver_test.dart' as element_resolver_test;
 import 'engine_test.dart' as engine_test;
 import 'error_suppression_test.dart' as error_suppression_test;
+import 'hint_code_test.dart' as hint_code_test;
 import 'incremental_resolver_test.dart' as incremental_resolver_test;
 import 'incremental_scanner_test.dart' as incremental_scanner_test;
+import 'inheritance_manager_test.dart' as inheritance_manager_test;
 import 'java_core_test.dart' as java_core_test;
 import 'java_io_test.dart' as java_io_test;
 import 'non_error_resolver_test.dart' as non_error_resolver_test;
+import 'non_hint_code_test.dart' as non_hint_code_test;
 import 'parser_test.dart' as parser_test;
 import 'resolver_test.dart' as resolver_test;
 import 'scanner_test.dart' as scanner_test;
+import 'simple_resolver_test.dart' as simple_resolver_test;
 import 'source_factory_test.dart' as source_factory_test;
+import 'static_type_analyzer_test.dart' as static_type_analyzer_test;
 import 'static_type_warning_code_test.dart' as static_type_warning_code_test;
 import 'static_warning_code_test.dart' as static_warning_code_test;
+import 'strong_mode_test.dart' as strong_mode_test;
 import 'type_system_test.dart' as type_system_test;
 import 'utilities_test.dart' as utilities_test;
 
@@ -32,22 +41,30 @@
   initializeTestEnvironment();
   group('generated tests', () {
     all_the_rest.main();
+    checked_mode_compile_time_error_code_test.main();
     compile_time_error_code_test.main();
     constant_test.main();
     declaration_resolver_test.main();
+    element_resolver_test.main();
     engine_test.main();
     error_suppression_test.main();
+    hint_code_test.main();
     incremental_resolver_test.main();
     incremental_scanner_test.main();
+    inheritance_manager_test.main();
     java_core_test.main();
     java_io_test.main();
     non_error_resolver_test.main();
+    non_hint_code_test.main();
     parser_test.main();
     resolver_test.main();
     scanner_test.main();
+    simple_resolver_test.main();
     source_factory_test.main();
+    static_type_analyzer_test.main();
     static_type_warning_code_test.main();
     static_warning_code_test.main();
+    strong_mode_test.main();
     type_system_test.main();
     utilities_test.main();
   });
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index 239c42b..1168c8b 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -19,7 +19,7 @@
 import 'package:plugin/plugin.dart';
 import 'package:unittest/unittest.dart';
 
-import 'resolver_test.dart';
+import 'analysis_context_factory.dart';
 
 /**
  * The class `EngineTestCase` defines utility methods for making assertions.
@@ -624,10 +624,6 @@
     throw new UnsupportedOperationException();
   }
 
-  Uri resolveRelativeUri(Uri uri) {
-    return new Uri(scheme: 'file', path: _name).resolveUri(uri);
-  }
-
   void setContents(String value) {
     generateExceptionOnRead = false;
     _modificationStamp = new DateTime.now().millisecondsSinceEpoch;
@@ -663,8 +659,4 @@
     }
     return false;
   }
-
-  Uri resolveRelativeUri(Uri uri) {
-    return this.uri.resolveUri(uri);
-  }
 }
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index 20d1a821..c164540 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_test.dart
@@ -10,6 +10,7 @@
 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/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
@@ -17,6 +18,7 @@
 
 import '../reflective_tests.dart';
 import '../utils.dart';
+import 'analysis_context_factory.dart';
 
 main() {
   initializeTestEnvironment();
@@ -24,6 +26,526 @@
   runReflectiveTests(StrongSubtypingTest);
   runReflectiveTests(StrongGenericFunctionInferenceTest);
   runReflectiveTests(LeastUpperBoundTest);
+  runReflectiveTests(StrongLeastUpperBoundTest);
+  runReflectiveTests(StrongGreatestLowerBoundTest);
+}
+
+/**
+ * Base class for testing LUB and GLB in spec and strong mode.
+ */
+abstract class BoundTestBase {
+  TypeProvider typeProvider;
+  TypeSystem typeSystem;
+  FunctionType simpleFunctionType;
+
+  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;
+  InterfaceType get numType => typeProvider.numType;
+  InterfaceType get objectType => typeProvider.objectType;
+  InterfaceType get stringType => typeProvider.stringType;
+  StrongTypeSystemImpl get strongTypeSystem =>
+      typeSystem as StrongTypeSystemImpl;
+
+  DartType get voidType => VoidTypeImpl.instance;
+
+  void setUp() {
+    InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
+    typeProvider = context.typeProvider;
+    FunctionTypeAliasElementImpl typeAlias =
+        ElementFactory.functionTypeAliasElement('A');
+    typeAlias.parameters = [];
+    typeAlias.returnType = voidType;
+    simpleFunctionType = typeAlias.type;
+  }
+
+  void _checkGreatestLowerBound(
+      DartType type1, DartType type2, DartType expectedResult) {
+    DartType glb =
+        strongTypeSystem.getGreatestLowerBound(typeProvider, type1, type2);
+    expect(glb, expectedResult);
+    // Check that the result is a lower bound.
+    expect(typeSystem.isSubtypeOf(glb, type1), true);
+    expect(typeSystem.isSubtypeOf(glb, type2), true);
+    // Check for symmetry while we're at it.  Unfortunately,
+    // for function types, the current version of equality
+    // does not respect re-ordering of named parameters, so
+    // for function types we just check if they are mutual subtypes.
+    // https://github.com/dart-lang/sdk/issues/26126
+    // TODO(leafp): Fix this.
+    glb = strongTypeSystem.getGreatestLowerBound(typeProvider, type2, type1);
+    if (glb is FunctionTypeImpl) {
+      expect(typeSystem.isSubtypeOf(glb, expectedResult), true);
+      expect(typeSystem.isSubtypeOf(expectedResult, glb), true);
+    } else {
+      expect(glb, expectedResult);
+    }
+  }
+
+  void _checkLeastUpperBound(
+      DartType type1, DartType type2, DartType expectedResult) {
+    DartType lub = typeSystem.getLeastUpperBound(typeProvider, type1, type2);
+    expect(lub, expectedResult);
+    // Check that the result is an upper bound.
+    expect(typeSystem.isSubtypeOf(type1, lub), true);
+    expect(typeSystem.isSubtypeOf(type2, lub), true);
+
+    // Check for symmetry while we're at it.  Unfortunately,
+    // for function types, the current version of equality
+    // does not respect re-ordering of named parameters, so
+    // for function types we just check if they are mutual subtypes.
+    // https://github.com/dart-lang/sdk/issues/26126
+    // TODO(leafp): Fix this.
+    lub = typeSystem.getLeastUpperBound(typeProvider, type2, type1);
+    if (lub is FunctionTypeImpl) {
+      expect(typeSystem.isSubtypeOf(lub, expectedResult), true);
+      expect(typeSystem.isSubtypeOf(expectedResult, lub), true);
+    } else {
+      expect(lub, expectedResult);
+    }
+  }
+
+  /**
+   * Creates a function type with the given parameter and return types.
+   *
+   * The return type defaults to `void` if omitted.
+   */
+  FunctionType _functionType(List<DartType> required,
+      {List<DartType> optional,
+      Map<String, DartType> named,
+      DartType returns}) {
+    if (returns == null) {
+      returns = voidType;
+    }
+
+    return ElementFactory
+        .functionElement8(required, returns, optional: optional, named: named)
+        .type;
+  }
+}
+
+/**
+ * Tests LUB in spec mode.
+ *
+ * Tests defined in this class are ones whose behavior is spec mode-specific.
+ * In particular, function parameters are compared using LUB in spec mode, but
+ * GLB in strong mode.
+ */
+@reflectiveTest
+class LeastUpperBoundTest extends LeastUpperBoundTestBase {
+  void setUp() {
+    typeSystem = new TypeSystemImpl();
+    super.setUp();
+  }
+
+  void test_functionsLubNamedParams() {
+    FunctionType type1 =
+        _functionType([], named: {'a': stringType, 'b': intType});
+    FunctionType type2 = _functionType([], named: {'a': intType, 'b': numType});
+    FunctionType expected =
+        _functionType([], named: {'a': objectType, 'b': numType});
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsLubPositionalParams() {
+    FunctionType type1 = _functionType([], optional: [stringType, intType]);
+    FunctionType type2 = _functionType([], optional: [intType, numType]);
+    FunctionType expected = _functionType([], optional: [objectType, numType]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsLubRequiredParams() {
+    FunctionType type1 = _functionType([stringType, intType, intType]);
+    FunctionType type2 = _functionType([intType, doubleType, numType]);
+    FunctionType expected = _functionType([objectType, numType, numType]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_nestedNestedFunctionsLubInnermostParamTypes() {
+    FunctionType type1 = _functionType([
+      _functionType([
+        _functionType([stringType, intType, intType])
+      ])
+    ]);
+    FunctionType type2 = _functionType([
+      _functionType([
+        _functionType([intType, doubleType, numType])
+      ])
+    ]);
+    FunctionType expected = _functionType([
+      _functionType([
+        _functionType([objectType, numType, numType])
+      ])
+    ]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  /// Check least upper bound of the same class with different type parameters.
+  void test_typeParameters_different() {
+    // class List<int>
+    // class List<double>
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    InterfaceType listOfDoubleType =
+        listType.instantiate(<DartType>[doubleType]);
+    _checkLeastUpperBound(listOfIntType, listOfDoubleType, objectType);
+  }
+
+  /// Check least upper bound of two related classes with different
+  /// type parameters.
+  void test_typeParametersAndClass_different() {
+    // class List<int>
+    // class Iterable<double>
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    InterfaceType iterableOfDoubleType =
+        iterableType.instantiate(<DartType>[doubleType]);
+    _checkLeastUpperBound(listOfIntType, iterableOfDoubleType, objectType);
+  }
+}
+
+/**
+ * Base class for testing LUB in spec and strong mode.
+ * Defines helper functions and tests. Tests here are ones whose behavior is
+ * the same in strong and spec mode.
+ */
+abstract class LeastUpperBoundTestBase extends BoundTestBase {
+  void test_bottom_function() {
+    _checkLeastUpperBound(bottomType, simpleFunctionType, simpleFunctionType);
+  }
+
+  void test_bottom_interface() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkLeastUpperBound(bottomType, interfaceType, interfaceType);
+  }
+
+  void test_bottom_typeParam() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkLeastUpperBound(bottomType, typeParam, typeParam);
+  }
+
+  void test_directInterfaceCase() {
+    // class A
+    // class B implements A
+    // class C implements B
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    classB.interfaces = <InterfaceType>[typeA];
+    classC.interfaces = <InterfaceType>[typeB];
+    _checkLeastUpperBound(typeB, typeC, typeB);
+  }
+
+  void test_directSubclassCase() {
+    // class A
+    // class B extends A
+    // class C extends B
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    _checkLeastUpperBound(typeB, typeC, typeB);
+  }
+
+  void test_dynamic_bottom() {
+    _checkLeastUpperBound(dynamicType, bottomType, dynamicType);
+  }
+
+  void test_dynamic_function() {
+    _checkLeastUpperBound(dynamicType, simpleFunctionType, dynamicType);
+  }
+
+  void test_dynamic_interface() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkLeastUpperBound(dynamicType, interfaceType, dynamicType);
+  }
+
+  void test_dynamic_typeParam() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkLeastUpperBound(dynamicType, typeParam, dynamicType);
+  }
+
+  void test_dynamic_void() {
+    _checkLeastUpperBound(dynamicType, voidType, dynamicType);
+  }
+
+  void test_functionsDifferentRequiredArity() {
+    FunctionType type1 = _functionType([intType, intType]);
+    FunctionType type2 = _functionType([intType, intType, intType]);
+    _checkLeastUpperBound(type1, type2, functionType);
+  }
+
+  void test_functionsIgnoreExtraNamedParams() {
+    FunctionType type1 = _functionType([], named: {'a': intType, 'b': intType});
+    FunctionType type2 = _functionType([], named: {'a': intType, 'c': intType});
+    FunctionType expected = _functionType([], named: {'a': intType});
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsIgnoreExtraPositionalParams() {
+    FunctionType type1 =
+        _functionType([], optional: [intType, intType, stringType]);
+    FunctionType type2 = _functionType([], optional: [intType]);
+    FunctionType expected = _functionType([], optional: [intType]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsLubReturnType() {
+    FunctionType type1 = _functionType([], returns: intType);
+    FunctionType type2 = _functionType([], returns: doubleType);
+    FunctionType expected = _functionType([], returns: numType);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsSameType() {
+    FunctionType type1 = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    FunctionType type2 = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    FunctionType expected = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_interface_function() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkLeastUpperBound(interfaceType, simpleFunctionType, objectType);
+  }
+
+  void test_mixinCase() {
+    // class A
+    // class B extends A
+    // class C extends A
+    // class D extends B with M, N, O, P
+    ClassElement classA = ElementFactory.classElement2("A");
+    ClassElement classB = ElementFactory.classElement("B", classA.type);
+    ClassElement classC = ElementFactory.classElement("C", classA.type);
+    ClassElementImpl classD = ElementFactory.classElement("D", classB.type);
+    InterfaceType typeA = classA.type;
+    InterfaceType typeC = classC.type;
+    InterfaceType typeD = classD.type;
+    classD.mixins = <InterfaceType>[
+      ElementFactory.classElement2("M").type,
+      ElementFactory.classElement2("N").type,
+      ElementFactory.classElement2("O").type,
+      ElementFactory.classElement2("P").type
+    ];
+    _checkLeastUpperBound(typeD, typeC, typeA);
+  }
+
+  void test_nestedFunctionsLubInnerParamTypes() {
+    FunctionType type1 = _functionType([
+      _functionType([stringType, intType, intType])
+    ]);
+    FunctionType type2 = _functionType([
+      _functionType([intType, doubleType, numType])
+    ]);
+    FunctionType expected = _functionType([
+      _functionType([objectType, numType, numType])
+    ]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_object() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    DartType typeObject = typeA.element.supertype;
+    // assert that object does not have a super type
+    expect((typeObject.element as ClassElement).supertype, isNull);
+    // assert that both A and B have the same super type of Object
+    expect(typeB.element.supertype, typeObject);
+    // finally, assert that the only least upper bound of A and B is Object
+    _checkLeastUpperBound(typeA, typeB, typeObject);
+  }
+
+  void test_self() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+
+    List<DartType> types = [
+      dynamicType,
+      voidType,
+      bottomType,
+      typeParam,
+      interfaceType,
+      simpleFunctionType
+    ];
+
+    for (DartType type in types) {
+      _checkLeastUpperBound(type, type, type);
+    }
+  }
+
+  void test_sharedSuperclass1() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    _checkLeastUpperBound(typeB, typeC, typeA);
+  }
+
+  void test_sharedSuperclass2() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
+    ClassElementImpl classD = ElementFactory.classElement("D", classC.type);
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeD = classD.type;
+    _checkLeastUpperBound(typeB, typeD, typeA);
+  }
+
+  void test_sharedSuperclass3() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
+    ClassElementImpl classD = ElementFactory.classElement("D", classB.type);
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    InterfaceType typeD = classD.type;
+    _checkLeastUpperBound(typeC, typeD, typeB);
+  }
+
+  void test_sharedSuperclass4() {
+    ClassElement classA = ElementFactory.classElement2("A");
+    ClassElement classA2 = ElementFactory.classElement2("A2");
+    ClassElement classA3 = ElementFactory.classElement2("A3");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
+    InterfaceType typeA = classA.type;
+    InterfaceType typeA2 = classA2.type;
+    InterfaceType typeA3 = classA3.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    classB.interfaces = <InterfaceType>[typeA2];
+    classC.interfaces = <InterfaceType>[typeA3];
+    _checkLeastUpperBound(typeB, typeC, typeA);
+  }
+
+  void test_sharedSuperinterface1() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    classB.interfaces = <InterfaceType>[typeA];
+    classC.interfaces = <InterfaceType>[typeA];
+    _checkLeastUpperBound(typeB, typeC, typeA);
+  }
+
+  void test_sharedSuperinterface2() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    ClassElementImpl classD = ElementFactory.classElement2("D");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    InterfaceType typeD = classD.type;
+    classB.interfaces = <InterfaceType>[typeA];
+    classC.interfaces = <InterfaceType>[typeA];
+    classD.interfaces = <InterfaceType>[typeC];
+    _checkLeastUpperBound(typeB, typeD, typeA);
+  }
+
+  void test_sharedSuperinterface3() {
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    ClassElementImpl classD = ElementFactory.classElement2("D");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    InterfaceType typeD = classD.type;
+    classB.interfaces = <InterfaceType>[typeA];
+    classC.interfaces = <InterfaceType>[typeB];
+    classD.interfaces = <InterfaceType>[typeB];
+    _checkLeastUpperBound(typeC, typeD, typeB);
+  }
+
+  void test_sharedSuperinterface4() {
+    ClassElement classA = ElementFactory.classElement2("A");
+    ClassElement classA2 = ElementFactory.classElement2("A2");
+    ClassElement classA3 = ElementFactory.classElement2("A3");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    InterfaceType typeA = classA.type;
+    InterfaceType typeA2 = classA2.type;
+    InterfaceType typeA3 = classA3.type;
+    InterfaceType typeB = classB.type;
+    InterfaceType typeC = classC.type;
+    classB.interfaces = <InterfaceType>[typeA, typeA2];
+    classC.interfaces = <InterfaceType>[typeA, typeA3];
+    _checkLeastUpperBound(typeB, typeC, typeA);
+  }
+
+  void test_twoComparables() {
+    _checkLeastUpperBound(stringType, numType, objectType);
+  }
+
+  void test_typeParam_function_bounded() {
+    DartType typeA = ElementFactory.classElement('A', functionType).type;
+    TypeParameterElementImpl typeParamElement =
+        ElementFactory.typeParameterElement('T');
+    typeParamElement.bound = typeA;
+    DartType typeParam = typeParamElement.type;
+    _checkLeastUpperBound(typeParam, simpleFunctionType, functionType);
+  }
+
+  void test_typeParam_function_noBound() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkLeastUpperBound(typeParam, simpleFunctionType, objectType);
+  }
+
+  void test_typeParam_interface_bounded() {
+    DartType typeA = ElementFactory.classElement2('A', []).type;
+    DartType typeB = ElementFactory.classElement('B', typeA).type;
+    DartType typeC = ElementFactory.classElement('C', typeA).type;
+    TypeParameterElementImpl typeParamElement =
+        ElementFactory.typeParameterElement('T');
+    typeParamElement.bound = typeB;
+    DartType typeParam = typeParamElement.type;
+    _checkLeastUpperBound(typeParam, typeC, typeA);
+  }
+
+  void test_typeParam_interface_noBound() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkLeastUpperBound(typeParam, interfaceType, objectType);
+  }
+
+  void test_typeParameters_same() {
+    // List<int>
+    // List<int>
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    _checkLeastUpperBound(listOfIntType, listOfIntType, listOfIntType);
+  }
+
+  void test_void() {
+    List<DartType> types = [
+      bottomType,
+      simpleFunctionType,
+      ElementFactory.classElement2('A', []).type,
+      ElementFactory.typeParameterElement('T').type
+    ];
+    for (DartType type in types) {
+      _checkLeastUpperBound(
+          _functionType([], returns: voidType),
+          _functionType([], returns: type),
+          _functionType([], returns: voidType));
+    }
+  }
 }
 
 @reflectiveTest
@@ -138,14 +660,14 @@
     InterfaceType LType = LClass.type;
     ClassElementImpl MClass = ElementFactory.classElement2('M', ["T"]);
     DartType typeParam = MClass.typeParameters[0].type;
-    InterfaceType superType = LType.substitute4(<DartType>[typeParam]);
+    InterfaceType superType = LType.instantiate(<DartType>[typeParam]);
     MClass.interfaces = <InterfaceType>[superType];
     InterfaceType MType = MClass.type;
 
-    InterfaceType top = LType.substitute4(<DartType>[dynamicType]);
-    InterfaceType left = MType.substitute4(<DartType>[dynamicType]);
-    InterfaceType right = LType.substitute4(<DartType>[intType]);
-    InterfaceType bottom = MType.substitute4(<DartType>[intType]);
+    InterfaceType top = LType.instantiate(<DartType>[dynamicType]);
+    InterfaceType left = MType.instantiate(<DartType>[dynamicType]);
+    InterfaceType right = LType.instantiate(<DartType>[intType]);
+    InterfaceType bottom = MType.instantiate(<DartType>[intType]);
 
     _checkCrossLattice(top, left, right, bottom);
   }
@@ -341,12 +863,12 @@
     // <TFrom, TTo extends Iterable<TFrom>>(TFrom) -> TTo
     var tFrom = TypeBuilder.variable('TFrom');
     var tTo =
-        TypeBuilder.variable('TTo', bound: iterableType.substitute4([tFrom]));
+        TypeBuilder.variable('TTo', bound: iterableType.instantiate([tFrom]));
     var cast = TypeBuilder
         .function(types: [tFrom, tTo], required: [tFrom], result: tTo);
     expect(_inferCall(cast, [stringType]), [
       stringType,
-      iterableType.substitute4([stringType])
+      iterableType.instantiate([stringType])
     ]);
   }
 
@@ -358,19 +880,19 @@
         clonable.type;
     // class Foo extends Clonable<Foo>
     ClassElementImpl foo = ElementFactory.classElement('Foo', null);
-    foo.supertype = clonable.type.substitute4([foo.type]);
+    foo.supertype = clonable.type.instantiate([foo.type]);
 
     // <S extends Clonable<S>>
     var s = TypeBuilder.variable('S');
     (s.element as TypeParameterElementImpl).bound =
-        clonable.type.substitute4([s]);
+        clonable.type.instantiate([s]);
     // (S, S) -> S
     var clone = TypeBuilder.function(types: [s], required: [s, s], result: s);
     expect(_inferCall(clone, [foo.type, foo.type]), [foo.type]);
 
     // Something invalid...
     expect(_inferCall(clone, [stringType, numType]), [
-      clonable.type.substitute4([dynamicType])
+      clonable.type.instantiate([dynamicType])
     ]);
   }
 
@@ -527,6 +1049,359 @@
   }
 }
 
+/**
+ * Tests GLB, which only exists in strong mode.
+ */
+@reflectiveTest
+class StrongGreatestLowerBoundTest extends BoundTestBase {
+  void setUp() {
+    typeSystem = new StrongTypeSystemImpl();
+    super.setUp();
+  }
+
+  void test_bottom_function() {
+    _checkGreatestLowerBound(bottomType, simpleFunctionType, bottomType);
+  }
+
+  void test_bottom_interface() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkGreatestLowerBound(bottomType, interfaceType, bottomType);
+  }
+
+  void test_bottom_typeParam() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkGreatestLowerBound(bottomType, typeParam, bottomType);
+  }
+
+  void test_classAndSuperclass() {
+    // class A
+    // class B extends A
+    // class C extends B
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
+    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
+    _checkGreatestLowerBound(classA.type, classC.type, classC.type);
+  }
+
+  void test_classAndSuperinterface() {
+    // class A
+    // class B implements A
+    // class C implements B
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    ClassElementImpl classC = ElementFactory.classElement2("C");
+    classB.interfaces = <InterfaceType>[classA.type];
+    classC.interfaces = <InterfaceType>[classB.type];
+    _checkGreatestLowerBound(classA.type, classC.type, classC.type);
+  }
+
+  void test_dynamic_bottom() {
+    _checkGreatestLowerBound(dynamicType, bottomType, bottomType);
+  }
+
+  void test_dynamic_function() {
+    _checkGreatestLowerBound(
+        dynamicType, simpleFunctionType, simpleFunctionType);
+  }
+
+  void test_dynamic_interface() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkGreatestLowerBound(dynamicType, interfaceType, interfaceType);
+  }
+
+  void test_dynamic_typeParam() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkGreatestLowerBound(dynamicType, typeParam, typeParam);
+  }
+
+  void test_dynamic_void() {
+    _checkGreatestLowerBound(dynamicType, voidType, voidType);
+  }
+
+  void test_functionsDifferentNamedTakeUnion() {
+    FunctionType type1 = _functionType([], named: {'a': intType, 'b': intType});
+    FunctionType type2 =
+        _functionType([], named: {'b': doubleType, 'c': stringType});
+    FunctionType expected =
+        _functionType([], named: {'a': intType, 'b': numType, 'c': stringType});
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_functionsDifferentOptionalArityTakeMax() {
+    FunctionType type1 = _functionType([], optional: [intType]);
+    FunctionType type2 =
+        _functionType([], optional: [doubleType, stringType, objectType]);
+    FunctionType expected =
+        _functionType([], optional: [numType, stringType, objectType]);
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_functionsDifferentRequiredArityBecomeOptional() {
+    FunctionType type1 = _functionType([intType]);
+    FunctionType type2 = _functionType([intType, intType, intType]);
+    FunctionType expected =
+        _functionType([intType], optional: [intType, intType]);
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_functionsGlbReturnType() {
+    FunctionType type1 = _functionType([], returns: intType);
+    FunctionType type2 = _functionType([], returns: numType);
+    FunctionType expected = _functionType([], returns: intType);
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_functionsLubNamedParams() {
+    FunctionType type1 =
+        _functionType([], named: {'a': stringType, 'b': intType});
+    FunctionType type2 = _functionType([], named: {'a': intType, 'b': numType});
+    FunctionType expected =
+        _functionType([], named: {'a': objectType, 'b': numType});
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_functionsLubPositionalParams() {
+    FunctionType type1 = _functionType([], optional: [stringType, intType]);
+    FunctionType type2 = _functionType([], optional: [intType, numType]);
+    FunctionType expected = _functionType([], optional: [objectType, numType]);
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_functionsLubRequiredParams() {
+    FunctionType type1 = _functionType([stringType, intType, intType]);
+    FunctionType type2 = _functionType([intType, doubleType, numType]);
+    FunctionType expected = _functionType([objectType, numType, numType]);
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_functionsMixedOptionalAndRequiredBecomeOptional() {
+    FunctionType type1 = _functionType([intType, intType],
+        optional: [intType, intType, intType]);
+    FunctionType type2 = _functionType([intType], optional: [intType, intType]);
+    FunctionType expected = _functionType([intType],
+        optional: [intType, intType, intType, intType]);
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_functionsReturnBottomIfMixOptionalAndNamed() {
+    // Dart doesn't allow a function to have both optional and named parameters,
+    // so if we would have synthethized that, pick bottom instead.
+    FunctionType type1 = _functionType([intType], named: {'a': intType});
+    FunctionType type2 = _functionType([], named: {'a': intType});
+    _checkGreatestLowerBound(type1, type2, bottomType);
+  }
+
+  void test_functionsSameType() {
+    FunctionType type1 = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    FunctionType type2 = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    FunctionType expected = _functionType([stringType, intType, numType],
+        optional: [doubleType], named: {'n': numType}, returns: intType);
+    _checkGreatestLowerBound(type1, type2, expected);
+  }
+
+  void test_interface_function() {
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkGreatestLowerBound(interfaceType, simpleFunctionType, bottomType);
+  }
+
+  void test_mixin() {
+    // class A
+    // class B
+    // class C
+    // class D extends A with B, C
+    ClassElement classA = ElementFactory.classElement2("A");
+    ClassElement classB = ElementFactory.classElement2("B");
+    ClassElement classC = ElementFactory.classElement2("C");
+    ClassElementImpl classD = ElementFactory.classElement("D", classA.type);
+    classD.mixins = <InterfaceType>[classB.type, classC.type];
+    _checkGreatestLowerBound(classA.type, classD.type, classD.type);
+    _checkGreatestLowerBound(classB.type, classD.type, classD.type);
+    _checkGreatestLowerBound(classC.type, classD.type, classD.type);
+  }
+
+  void test_self() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+
+    List<DartType> types = [
+      dynamicType,
+      voidType,
+      bottomType,
+      typeParam,
+      interfaceType,
+      simpleFunctionType
+    ];
+
+    for (DartType type in types) {
+      _checkGreatestLowerBound(type, type, type);
+    }
+  }
+
+  void test_typeParam_function_noBound() {
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    _checkGreatestLowerBound(typeParam, simpleFunctionType, bottomType);
+  }
+
+  void test_typeParam_interface_bounded() {
+    DartType typeA = ElementFactory.classElement2('A', []).type;
+    DartType typeB = ElementFactory.classElement('B', typeA).type;
+    DartType typeC = ElementFactory.classElement('C', typeB).type;
+    TypeParameterElementImpl typeParam =
+        ElementFactory.typeParameterElement('T');
+    typeParam.bound = typeB;
+    _checkGreatestLowerBound(typeParam.type, typeC, bottomType);
+  }
+
+  void test_typeParam_interface_noBound() {
+    // GLB(T, A) = ⊥
+    DartType typeParam = ElementFactory.typeParameterElement('T').type;
+    DartType interfaceType = ElementFactory.classElement2('A', []).type;
+    _checkGreatestLowerBound(typeParam, interfaceType, bottomType);
+  }
+
+  void test_typeParameters_different() {
+    // GLB(List<int>, List<double>) = ⊥
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    InterfaceType listOfDoubleType =
+        listType.instantiate(<DartType>[doubleType]);
+    // TODO(rnystrom): Can we do something better here?
+    _checkGreatestLowerBound(listOfIntType, listOfDoubleType, bottomType);
+  }
+
+  void test_typeParameters_same() {
+    // GLB(List<int>, List<int>) = List<int>
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    _checkGreatestLowerBound(listOfIntType, listOfIntType, listOfIntType);
+  }
+
+  void test_unrelatedClasses() {
+    // class A
+    // class B
+    // class C
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    ClassElementImpl classB = ElementFactory.classElement2("B");
+    _checkGreatestLowerBound(classA.type, classB.type, bottomType);
+  }
+
+  void test_void() {
+    List<DartType> types = [
+      bottomType,
+      simpleFunctionType,
+      ElementFactory.classElement2('A', []).type,
+      ElementFactory.typeParameterElement('T').type
+    ];
+    for (DartType type in types) {
+      _checkGreatestLowerBound(_functionType([], returns: voidType),
+          _functionType([], returns: type), _functionType([], returns: type));
+    }
+  }
+}
+
+/**
+ * Tests LUB in strong mode.
+ *
+ * Tests defined in this class are ones whose behavior is spec mode-specific.
+ * In particular, function parameters are compared using LUB in spec mode, but
+ * GLB in strong mode.
+ */
+@reflectiveTest
+class StrongLeastUpperBoundTest extends LeastUpperBoundTestBase {
+  void setUp() {
+    typeSystem = new StrongTypeSystemImpl();
+    super.setUp();
+  }
+
+  void test_functionsGlbNamedParams() {
+    FunctionType type1 =
+        _functionType([], named: {'a': stringType, 'b': intType});
+    FunctionType type2 = _functionType([], named: {'a': intType, 'b': numType});
+    FunctionType expected =
+        _functionType([], named: {'a': bottomType, 'b': intType});
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsGlbPositionalParams() {
+    FunctionType type1 = _functionType([], optional: [stringType, intType]);
+    FunctionType type2 = _functionType([], optional: [intType, numType]);
+    FunctionType expected = _functionType([], optional: [bottomType, intType]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_functionsGlbRequiredParams() {
+    FunctionType type1 = _functionType([stringType, intType, intType]);
+    FunctionType type2 = _functionType([intType, doubleType, numType]);
+    FunctionType expected = _functionType([bottomType, bottomType, intType]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_nestedNestedFunctionsGlbInnermostParamTypes() {
+    FunctionType type1 = _functionType([
+      _functionType([
+        _functionType([stringType, intType, intType])
+      ])
+    ]);
+    FunctionType type2 = _functionType([
+      _functionType([
+        _functionType([intType, doubleType, numType])
+      ])
+    ]);
+    FunctionType expected = _functionType([
+      _functionType([
+        _functionType([bottomType, bottomType, intType])
+      ])
+    ]);
+    _checkLeastUpperBound(type1, type2, expected);
+  }
+
+  void test_typeParam_boundedByParam() {
+    TypeParameterElementImpl typeParamElementT =
+        ElementFactory.typeParameterElement('T');
+    TypeParameterElementImpl typeParamElementS =
+        ElementFactory.typeParameterElement('S');
+    DartType typeParamT = typeParamElementT.type;
+    DartType typeParamS = typeParamElementS.type;
+    typeParamElementT.bound = typeParamS;
+    _checkLeastUpperBound(typeParamT, typeParamS, typeParamS);
+  }
+
+  void test_typeParam_fBounded() {
+    ClassElementImpl AClass = ElementFactory.classElement2('A', ["Q"]);
+    InterfaceType AType = AClass.type;
+
+    DartType s = TypeBuilder.variable("S");
+    (s.element as TypeParameterElementImpl).bound = AType.instantiate([s]);
+    DartType u = TypeBuilder.variable("U");
+    (u.element as TypeParameterElementImpl).bound = AType.instantiate([u]);
+
+    _checkLeastUpperBound(s, u, AType.instantiate([objectType]));
+  }
+
+  /// Check least upper bound of the same class with different type parameters.
+  void test_typeParameters_different() {
+    // class List<int>
+    // class List<double>
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    InterfaceType listOfDoubleType =
+        listType.instantiate(<DartType>[doubleType]);
+    InterfaceType listOfNum = listType.instantiate(<DartType>[numType]);
+    _checkLeastUpperBound(listOfIntType, listOfDoubleType, listOfNum);
+  }
+
+  /// Check least upper bound of two related classes with different
+  /// type parameters.
+  void test_typeParametersAndClass_different() {
+    // class List<int>
+    // class Iterable<double>
+    InterfaceType listOfIntType = listType.instantiate(<DartType>[intType]);
+    InterfaceType iterableOfDoubleType =
+        iterableType.instantiate(<DartType>[doubleType]);
+    // TODO(leafp): this should be iterableOfNumType
+    _checkLeastUpperBound(listOfIntType, iterableOfDoubleType, objectType);
+  }
+}
+
 @reflectiveTest
 class StrongSubtypingTest {
   TypeProvider typeProvider;
@@ -687,14 +1562,14 @@
     ClassElementImpl AClass = ElementFactory.classElement2('A', ["Q"]);
     InterfaceType AType = AClass.type;
     ClassElementImpl BClass = ElementFactory.classElement2('B', ["R"]);
-    BClass.supertype = AType.substitute4([BClass.typeParameters[0].type]);
+    BClass.supertype = AType.instantiate([BClass.typeParameters[0].type]);
     InterfaceType BType = BClass.type;
 
     DartType s = TypeBuilder.variable("S");
-    (s.element as TypeParameterElementImpl).bound = AType.substitute4([s]);
+    (s.element as TypeParameterElementImpl).bound = AType.instantiate([s]);
     DartType t = TypeBuilder.variable("T", bound: s);
     DartType u = TypeBuilder.variable("U");
-    (u.element as TypeParameterElementImpl).bound = BType.substitute4([u]);
+    (u.element as TypeParameterElementImpl).bound = BType.instantiate([u]);
     DartType v = TypeBuilder.variable("V", bound: u);
 
     _checkIsStrictSubtypeOf(
@@ -710,14 +1585,14 @@
     InterfaceType LType = LClass.type;
     ClassElementImpl MClass = ElementFactory.classElement2('M', ["T"]);
     DartType typeParam = MClass.typeParameters[0].type;
-    InterfaceType superType = LType.substitute4(<DartType>[typeParam]);
+    InterfaceType superType = LType.instantiate(<DartType>[typeParam]);
     MClass.interfaces = <InterfaceType>[superType];
     InterfaceType MType = MClass.type;
 
-    InterfaceType top = LType.substitute4(<DartType>[dynamicType]);
-    InterfaceType left = MType.substitute4(<DartType>[dynamicType]);
-    InterfaceType right = LType.substitute4(<DartType>[intType]);
-    InterfaceType bottom = MType.substitute4(<DartType>[intType]);
+    InterfaceType top = LType.instantiate(<DartType>[dynamicType]);
+    InterfaceType left = MType.instantiate(<DartType>[dynamicType]);
+    InterfaceType right = LType.instantiate(<DartType>[intType]);
+    InterfaceType bottom = MType.instantiate(<DartType>[intType]);
 
     _checkLattice(top, left, right, bottom);
   }
@@ -923,428 +1798,3 @@
   static TypeParameterType variable(String name, {DartType bound}) =>
       ElementFactory.typeParameterWithType(name, bound).type;
 }
-
-@reflectiveTest
-class LeastUpperBoundTest {
-  TypeProvider typeProvider;
-  TypeSystem typeSystem;
-  FunctionType simpleFunctionType;
-
-  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 TypeSystemImpl();
-    FunctionTypeAliasElementImpl typeAlias =
-        ElementFactory.functionTypeAliasElement('A');
-    typeAlias.parameters = [];
-    typeAlias.returnType = voidType;
-    simpleFunctionType = typeAlias.type;
-  }
-
-  void test_bottom_function() {
-    _checkLeastUpperBound(bottomType, simpleFunctionType, simpleFunctionType);
-  }
-
-  void test_bottom_interface() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(bottomType, interfaceType, interfaceType);
-  }
-
-  void test_bottom_typeParam() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    _checkLeastUpperBound(bottomType, typeParam, typeParam);
-  }
-
-  void test_directInterfaceCase() {
-    //
-    // class A
-    // class B implements A
-    // class C implements B
-    //
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    classB.interfaces = <InterfaceType>[typeA];
-    classC.interfaces = <InterfaceType>[typeB];
-    _checkLeastUpperBound(typeB, typeC, typeB);
-  }
-
-  void test_directSubclassCase() {
-    //
-    // class A
-    // class B extends A
-    // class C extends B
-    //
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    _checkLeastUpperBound(typeB, typeC, typeB);
-  }
-
-  void test_dynamic_bottom() {
-    _checkLeastUpperBound(dynamicType, bottomType, dynamicType);
-  }
-
-  void test_dynamic_function() {
-    _checkLeastUpperBound(dynamicType, simpleFunctionType, dynamicType);
-  }
-
-  void test_dynamic_interface() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(dynamicType, interfaceType, dynamicType);
-  }
-
-  void test_dynamic_typeParam() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    _checkLeastUpperBound(dynamicType, typeParam, dynamicType);
-  }
-
-  void test_dynamic_void() {
-    _checkLeastUpperBound(dynamicType, voidType, dynamicType);
-  }
-
-  void test_interface_function() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(interfaceType, simpleFunctionType, objectType);
-  }
-
-  void test_mixinCase() {
-    //
-    // class A
-    // class B extends A
-    // class C extends A
-    // class D extends B with M, N, O, P
-    //
-    ClassElement classA = ElementFactory.classElement2("A");
-    ClassElement classB = ElementFactory.classElement("B", classA.type);
-    ClassElement classC = ElementFactory.classElement("C", classA.type);
-    ClassElementImpl classD = ElementFactory.classElement("D", classB.type);
-    InterfaceType typeA = classA.type;
-    InterfaceType typeC = classC.type;
-    InterfaceType typeD = classD.type;
-    classD.mixins = <InterfaceType>[
-      ElementFactory.classElement2("M").type,
-      ElementFactory.classElement2("N").type,
-      ElementFactory.classElement2("O").type,
-      ElementFactory.classElement2("P").type
-    ];
-    _checkLeastUpperBound(typeD, typeC, typeA);
-  }
-
-  void test_object() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    DartType typeObject = typeA.element.supertype;
-    // assert that object does not have a super type
-    expect((typeObject.element as ClassElement).supertype, isNull);
-    // assert that both A and B have the same super type of Object
-    expect(typeB.element.supertype, typeObject);
-    // finally, assert that the only least upper bound of A and B is Object
-    _checkLeastUpperBound(typeA, typeB, typeObject);
-  }
-
-  void test_self() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-
-    List<DartType> types = [
-      dynamicType,
-      voidType,
-      bottomType,
-      typeParam,
-      interfaceType,
-      simpleFunctionType
-    ];
-
-    for (DartType type in types) {
-      _checkLeastUpperBound(type, type, type);
-    }
-  }
-
-  void test_sharedSuperclass1() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperclass2() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
-    ClassElementImpl classD = ElementFactory.classElement("D", classC.type);
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeD = classD.type;
-    _checkLeastUpperBound(typeB, typeD, typeA);
-  }
-
-  void test_sharedSuperclass3() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classB.type);
-    ClassElementImpl classD = ElementFactory.classElement("D", classB.type);
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    InterfaceType typeD = classD.type;
-    _checkLeastUpperBound(typeC, typeD, typeB);
-  }
-
-  void test_sharedSuperclass4() {
-    ClassElement classA = ElementFactory.classElement2("A");
-    ClassElement classA2 = ElementFactory.classElement2("A2");
-    ClassElement classA3 = ElementFactory.classElement2("A3");
-    ClassElementImpl classB = ElementFactory.classElement("B", classA.type);
-    ClassElementImpl classC = ElementFactory.classElement("C", classA.type);
-    InterfaceType typeA = classA.type;
-    InterfaceType typeA2 = classA2.type;
-    InterfaceType typeA3 = classA3.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    classB.interfaces = <InterfaceType>[typeA2];
-    classC.interfaces = <InterfaceType>[typeA3];
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperinterface1() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    classB.interfaces = <InterfaceType>[typeA];
-    classC.interfaces = <InterfaceType>[typeA];
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperinterface2() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    ClassElementImpl classD = ElementFactory.classElement2("D");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    InterfaceType typeD = classD.type;
-    classB.interfaces = <InterfaceType>[typeA];
-    classC.interfaces = <InterfaceType>[typeA];
-    classD.interfaces = <InterfaceType>[typeC];
-    _checkLeastUpperBound(typeB, typeD, typeA);
-  }
-
-  void test_sharedSuperinterface3() {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    ClassElementImpl classD = ElementFactory.classElement2("D");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    InterfaceType typeD = classD.type;
-    classB.interfaces = <InterfaceType>[typeA];
-    classC.interfaces = <InterfaceType>[typeB];
-    classD.interfaces = <InterfaceType>[typeB];
-    _checkLeastUpperBound(typeC, typeD, typeB);
-  }
-
-  void test_sharedSuperinterface4() {
-    ClassElement classA = ElementFactory.classElement2("A");
-    ClassElement classA2 = ElementFactory.classElement2("A2");
-    ClassElement classA3 = ElementFactory.classElement2("A3");
-    ClassElementImpl classB = ElementFactory.classElement2("B");
-    ClassElementImpl classC = ElementFactory.classElement2("C");
-    InterfaceType typeA = classA.type;
-    InterfaceType typeA2 = classA2.type;
-    InterfaceType typeA3 = classA3.type;
-    InterfaceType typeB = classB.type;
-    InterfaceType typeC = classC.type;
-    classB.interfaces = <InterfaceType>[typeA, typeA2];
-    classC.interfaces = <InterfaceType>[typeA, typeA3];
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_twoComparables() {
-    _checkLeastUpperBound(stringType, numType, objectType);
-  }
-
-  void test_typeParam_function_bounded() {
-    DartType typeA = ElementFactory.classElement('A', functionType).type;
-    TypeParameterElementImpl typeParamElement =
-        ElementFactory.typeParameterElement('T');
-    typeParamElement.bound = typeA;
-    DartType typeParam = typeParamElement.type;
-    _checkLeastUpperBound(typeParam, simpleFunctionType, functionType);
-  }
-
-  void test_typeParam_function_noBound() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    _checkLeastUpperBound(typeParam, simpleFunctionType, objectType);
-  }
-
-  void test_typeParam_interface_bounded() {
-    DartType typeA = ElementFactory.classElement2('A', []).type;
-    DartType typeB = ElementFactory.classElement('B', typeA).type;
-    DartType typeC = ElementFactory.classElement('C', typeA).type;
-    TypeParameterElementImpl typeParamElement =
-        ElementFactory.typeParameterElement('T');
-    typeParamElement.bound = typeB;
-    DartType typeParam = typeParamElement.type;
-    _checkLeastUpperBound(typeParam, typeC, typeA);
-  }
-
-  void test_typeParam_interface_noBound() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(typeParam, interfaceType, objectType);
-  }
-
-  void test_typeParameters_different() {
-    //
-    // class List<int>
-    // class List<double>
-    //
-    InterfaceType listOfIntType = listType.substitute4(<DartType>[intType]);
-    InterfaceType listOfDoubleType =
-        listType.substitute4(<DartType>[doubleType]);
-    _checkLeastUpperBound(listOfIntType, listOfDoubleType, objectType);
-  }
-
-  void test_typeParameters_same() {
-    //
-    // List<int>
-    // List<int>
-    //
-    InterfaceType listOfIntType = listType.substitute4(<DartType>[intType]);
-    expect(
-        typeSystem.getLeastUpperBound(
-            typeProvider, listOfIntType, listOfIntType),
-        listOfIntType);
-  }
-
-  void test_void_bottom() {
-    _checkLeastUpperBound(voidType, bottomType, voidType);
-  }
-
-  void test_void_function() {
-    _checkLeastUpperBound(voidType, simpleFunctionType, voidType);
-  }
-
-  void test_void_interface() {
-    DartType interfaceType = ElementFactory.classElement2('A', []).type;
-    _checkLeastUpperBound(voidType, interfaceType, voidType);
-  }
-
-  void test_void_typeParam() {
-    DartType typeParam = ElementFactory.typeParameterElement('T').type;
-    _checkLeastUpperBound(voidType, typeParam, voidType);
-  }
-
-  void test_functionsSameType() {
-    FunctionType type1 = _functionType([stringType, intType, numType],
-        optional: [doubleType], named: {'n': numType}, returns: intType);
-    FunctionType type2 = _functionType([stringType, intType, numType],
-        optional: [doubleType], named: {'n': numType}, returns: intType);
-    FunctionType expected = _functionType([stringType, intType, numType],
-        optional: [doubleType], named: {'n': numType}, returns: intType);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsDifferentRequiredArity() {
-    FunctionType type1 = _functionType([intType, intType]);
-    FunctionType type2 = _functionType([intType, intType, intType]);
-    _checkLeastUpperBound(type1, type2, functionType);
-  }
-
-  void test_functionsLubRequiredParams() {
-    FunctionType type1 = _functionType([stringType, intType, intType]);
-    FunctionType type2 = _functionType([intType, doubleType, numType]);
-    FunctionType expected = _functionType([objectType, numType, numType]);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsLubPositionalParams() {
-    FunctionType type1 = _functionType([], optional: [stringType, intType]);
-    FunctionType type2 = _functionType([], optional: [intType, doubleType]);
-    FunctionType expected = _functionType([], optional: [objectType, numType]);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsIgnoreExtraPositionalParams() {
-    FunctionType type1 =
-        _functionType([], optional: [intType, intType, stringType]);
-    FunctionType type2 = _functionType([], optional: [doubleType]);
-    FunctionType expected = _functionType([], optional: [numType]);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsLubNamedParams() {
-    FunctionType type1 =
-        _functionType([], named: {'a': stringType, 'b': intType});
-    FunctionType type2 =
-        _functionType([], named: {'a': intType, 'b': doubleType});
-    FunctionType expected =
-        _functionType([], named: {'a': objectType, 'b': numType});
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsIgnoreExtraNamedParams() {
-    FunctionType type1 = _functionType([], named: {'a': intType, 'b': intType});
-    FunctionType type2 =
-        _functionType([], named: {'a': doubleType, 'c': doubleType});
-    FunctionType expected = _functionType([], named: {'a': numType});
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_functionsLubReturnType() {
-    FunctionType type1 = _functionType([], returns: intType);
-    FunctionType type2 = _functionType([], returns: doubleType);
-
-    FunctionType expected = _functionType([], returns: numType);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  /**
-   * Creates a function type with the given parameter and return types.
-   *
-   * The return type defaults to `void` if omitted.
-   */
-  FunctionType _functionType(List<DartType> required,
-      {List<DartType> optional,
-      Map<String, DartType> named,
-      DartType returns}) {
-    if (returns == null) {
-      returns = voidType;
-    }
-
-    return ElementFactory
-        .functionElement8(required, returns, optional: optional, named: named)
-        .type;
-  }
-
-  void _checkLeastUpperBound(
-      DartType type1, DartType type2, DartType expectedResult) {
-    expect(typeSystem.getLeastUpperBound(typeProvider, type1, type2),
-        expectedResult);
-  }
-}
diff --git a/pkg/analyzer/test/reflective_tests.dart b/pkg/analyzer/test/reflective_tests.dart
index 970743d..310e7d0 100644
--- a/pkg/analyzer/test/reflective_tests.dart
+++ b/pkg/analyzer/test/reflective_tests.dart
@@ -4,13 +4,25 @@
 
 library analyzer.test.reflective_tests;
 
+import 'dart:async';
 @MirrorsUsed(metaTargets: 'ReflectiveTest')
 import 'dart:mirrors';
-import 'dart:async';
 
 import 'package:unittest/unittest.dart';
 
 /**
+ * A marker annotation used to annotate overridden test methods (so we cannot
+ * rename them to `fail_`) which are expected to fail.
+ */
+const _FailingTest failingTest = const _FailingTest();
+
+/**
+ * A marker annotation used to instruct dart2js to keep reflection information
+ * for the annotated classes.
+ */
+const ReflectiveTest reflectiveTest = const ReflectiveTest();
+
+/**
  * Runs test methods existing in the given [type].
  *
  * Methods with names starting with `test` are run using [test] function.
@@ -23,7 +35,7 @@
  * method invocation.
  *
  * If [type] declares method `tearDown`, it will be invoked after any test
- * method invocation. If method returns [Future] to test some asyncronous
+ * method invocation. If method returns [Future] to test some asynchronous
  * behavior, then `tearDown` will be invoked in `Future.complete`.
  */
 void runReflectiveTests(Type type) {
@@ -36,7 +48,8 @@
   }
   String className = MirrorSystem.getName(classMirror.simpleName);
   group(className, () {
-    classMirror.instanceMembers.forEach((symbol, memberMirror) {
+    classMirror.instanceMembers
+        .forEach((Symbol symbol, MethodMirror memberMirror) {
       // we need only methods
       if (memberMirror is! MethodMirror || !memberMirror.isRegularMethod) {
         return;
@@ -45,7 +58,11 @@
       // test_
       if (memberName.startsWith('test_')) {
         test(memberName, () {
-          return _runTest(classMirror, symbol);
+          if (_hasFailingTestAnnotation(memberMirror)) {
+            return _runFailingTest(classMirror, symbol);
+          } else {
+            return _runTest(classMirror, symbol);
+          }
         });
         return;
       }
@@ -71,6 +88,11 @@
   });
 }
 
+bool _hasFailingTestAnnotation(MethodMirror method) {
+  return method.metadata.any((InstanceMirror annotation) =>
+      annotation.type.reflectedType == _FailingTest);
+}
+
 Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) {
   var invocationResult = null;
   InstanceMirror closure;
@@ -116,7 +138,9 @@
 }
 
 /**
- * A marker annotation used to instruct dart2js to keep reflection information
- * for the annotated classes.
+ * A marker annotation used to annotate overridden test methods (so we cannot
+ * rename them to `fail_`) which are expected to fail.
  */
-const ReflectiveTest reflectiveTest = const ReflectiveTest();
+class _FailingTest {
+  const _FailingTest();
+}
diff --git a/pkg/analyzer/test/resource_utils.dart b/pkg/analyzer/test/resource_utils.dart
new file mode 100644
index 0000000..5936144
--- /dev/null
+++ b/pkg/analyzer/test/resource_utils.dart
@@ -0,0 +1,129 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.resource_utils;
+
+import 'dart:core' hide Resource;
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/memory_file_system.dart';
+import 'package:analyzer/src/util/absolute_path.dart';
+import 'package:path/path.dart' as path;
+import 'package:unittest/unittest.dart';
+
+bool get isWindows => path.Style.platform == path.Style.windows;
+
+/**
+ * Assert that the given path is posix and absolute.
+ */
+void expectAbsolutePosixPath(String posixPath) {
+  expect(posixPath, startsWith('/'),
+      reason: 'Expected absolute posix path, but found $posixPath');
+}
+
+/**
+ * Assert that the given path is posix.
+ */
+void expectPosixPath(String posixPath) {
+  expect(posixPath.indexOf('\\'), -1,
+      reason: 'Expected posix path, but found $posixPath');
+}
+
+/**
+ * Translate the given posixPath to a file URI appropriate for the
+ * platform on which the tests are executing.
+ */
+String posixToOSFileUri(String posixPath) {
+  expectPosixPath(posixPath);
+  return isWindows ? 'file:///C:$posixPath' : 'file://$posixPath';
+}
+
+/**
+ * Translate the given posixPath to a path appropriate for the
+ * platform on which the tests are executing.
+ */
+String posixToOSPath(String posixPath) {
+  expectPosixPath(posixPath);
+  if (isWindows) {
+    String windowsPath = posixPath.replaceAll('/', '\\');
+    if (posixPath.startsWith('/')) {
+      return 'C:$windowsPath';
+    }
+    return windowsPath;
+  }
+  return posixPath;
+}
+
+/**
+ * A convenience utility for setting up a test [MemoryResourceProvider].
+ * All supplied paths are assumed to be in [path.posix] format
+ * and are automatically translated to [path.context].
+ *
+ * This class intentionally does not implement [ResourceProvider]
+ * directly or indirectly so that it cannot be used as a resource provider.
+ * We do not want functionality under test to interact with a resource provider
+ * that automatically translates paths.
+ */
+class TestPathTranslator {
+  final MemoryResourceProvider _provider;
+
+  TestPathTranslator(this._provider);
+
+  Resource getResource(String posixPath) =>
+      _provider.getResource(posixToOSPath(posixPath));
+
+  File newFile(String posixPath, String content) =>
+      _provider.newFile(posixToOSPath(posixPath), content);
+
+  Folder newFolder(String posixPath) =>
+      _provider.newFolder(posixToOSPath(posixPath));
+}
+
+/**
+ * A resource provider for testing that asserts that any supplied paths
+ * are appropriate for the OS platform on which the tests are running.
+ */
+class TestResourceProvider implements ResourceProvider {
+  final ResourceProvider _provider;
+
+  TestResourceProvider(this._provider) {
+    expect(_provider.absolutePathContext.separator, isWindows ? '\\' : '/');
+  }
+
+  @override
+  AbsolutePathContext get absolutePathContext => _provider.absolutePathContext;
+
+  @override
+  path.Context get pathContext => _provider.pathContext;
+
+  @override
+  File getFile(String path) => _provider.getFile(_assertPath(path));
+
+  @override
+  Folder getFolder(String path) => _provider.getFolder(_assertPath(path));
+
+  @override
+  Resource getResource(String path) => _provider.getResource(_assertPath(path));
+
+  @override
+  Folder getStateLocation(String pluginId) =>
+      _provider.getStateLocation(pluginId);
+
+  /**
+   * Assert that the given path is valid for the OS platform on which the
+   * tests are running.
+   */
+  String _assertPath(String path) {
+    if (isWindows) {
+      if (path.contains('/')) {
+        fail('Expected windows path, but found: $path');
+      }
+    } else {
+      if (path.contains('\\')) {
+        fail('Expected posix path, but found: $path');
+      }
+    }
+    return path;
+  }
+}
diff --git a/pkg/analyzer/test/source/analysis_options_provider_test.dart b/pkg/analyzer/test/source/analysis_options_provider_test.dart
index d71304b..ee9f0e0 100644
--- a/pkg/analyzer/test/source/analysis_options_provider_test.dart
+++ b/pkg/analyzer/test/source/analysis_options_provider_test.dart
@@ -4,16 +4,21 @@
 
 library analyzer.test.source.analysis_options_provider_test;
 
+import 'dart:core' hide Resource;
+
+import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/source/analysis_options_provider.dart';
 import 'package:unittest/unittest.dart';
 import 'package:yaml/yaml.dart';
 
+import '../reflective_tests.dart';
+import '../resource_utils.dart';
 import '../utils.dart';
 
 main() {
   initializeTestEnvironment();
-
+  runReflectiveTests(AnalysisOptionsProviderTest);
   group('AnalysisOptionsProvider', () {
     void expectMergesTo(String defaults, String overrides, String expected) {
       var optionsProvider = new AnalysisOptionsProvider();
@@ -68,68 +73,6 @@
   });
 
   group('AnalysisOptionsProvider', () {
-    setUp(() {
-      buildResourceProvider();
-    });
-    tearDown(() {
-      clearResourceProvider();
-    });
-    test('test_simple', () {
-      var optionsProvider = new AnalysisOptionsProvider();
-      Map<String, YamlNode> options =
-          optionsProvider.getOptions(resourceProvider.getFolder('/'));
-      expect(options, hasLength(1));
-      expect(options['analyzer'], isNotNull);
-      YamlMap analyzer = options['analyzer'];
-      expect(analyzer, hasLength(1));
-      expect(analyzer['ignore'], isNotNull);
-      YamlList ignore = analyzer['ignore'];
-      expect(ignore, hasLength(2));
-      expect(ignore[0], 'ignoreme.dart');
-      expect(ignore[1], 'sdk_ext/**');
-    });
-    test('test_doesnotexist', () {
-      var optionsProvider = new AnalysisOptionsProvider();
-      Map<String, YamlNode> options =
-          optionsProvider.getOptions(resourceProvider.getFolder('/empty'));
-      expect(options, isEmpty);
-    });
-  });
-  group('AnalysisOptionsProvider', () {
-    setUp(() {
-      buildResourceProvider(emptyAnalysisOptions: true);
-    });
-    tearDown(() {
-      clearResourceProvider();
-    });
-    test('test_empty', () {
-      var optionsProvider = new AnalysisOptionsProvider();
-      Map<String, YamlNode> options =
-          optionsProvider.getOptions(resourceProvider.getFolder('/'));
-      expect(options, isNotNull);
-    });
-  });
-  group('AnalysisOptionsProvider', () {
-    setUp(() {
-      buildResourceProvider(badAnalysisOptions: true);
-    });
-    tearDown(() {
-      clearResourceProvider();
-    });
-    test('test_invalid', () {
-      var optionsProvider = new AnalysisOptionsProvider();
-      bool exceptionCaught = false;
-      try {
-        Map<String, YamlNode> options =
-            optionsProvider.getOptions(resourceProvider.getFolder('/'));
-        expect(options, isNotNull);
-      } catch (e) {
-        exceptionCaught = true;
-      }
-      expect(exceptionCaught, isTrue);
-    });
-  });
-  group('AnalysisOptionsProvider', () {
     test('test_bad_yaml (1)', () {
       var src = '''
     analyzer: # <= bang
@@ -156,19 +99,91 @@
   });
 }
 
-MemoryResourceProvider resourceProvider;
+@reflectiveTest
+class AnalysisOptionsProviderTest {
+  TestPathTranslator pathTranslator;
+  ResourceProvider resourceProvider;
 
-buildResourceProvider(
-    {bool emptyAnalysisOptions: false, bool badAnalysisOptions: false}) {
-  resourceProvider = new MemoryResourceProvider();
-  resourceProvider.newFolder('/empty');
-  resourceProvider.newFolder('/tmp');
-  if (badAnalysisOptions) {
-    resourceProvider.newFile('/.analysis_options', r''':''');
-  } else if (emptyAnalysisOptions) {
-    resourceProvider.newFile('/.analysis_options', r'''#empty''');
-  } else {
-    resourceProvider.newFile(
+  AnalysisOptionsProvider provider = new AnalysisOptionsProvider();
+
+  void setUp() {
+    var rawProvider = new MemoryResourceProvider(isWindows: isWindows);
+    resourceProvider = new TestResourceProvider(rawProvider);
+    pathTranslator = new TestPathTranslator(rawProvider);
+  }
+
+  void test_getOptions_crawlUp_hasInFolder() {
+    pathTranslator.newFolder('/foo/bar');
+    pathTranslator.newFile(
+        '/foo/.analysis_options',
+        r'''
+analyzer:
+  ignore:
+    - foo
+''');
+    pathTranslator.newFile(
+        '/foo/bar/.analysis_options',
+        r'''
+analyzer:
+  ignore:
+    - bar
+''');
+    Map<String, YamlNode> options = _getOptions('/foo/bar', crawlUp: true);
+    expect(options, hasLength(1));
+    {
+      YamlMap analyzer = options['analyzer'];
+      expect(analyzer, isNotNull);
+      expect(analyzer['ignore'], unorderedEquals(['bar']));
+    }
+  }
+
+  void test_getOptions_crawlUp_hasInParent() {
+    pathTranslator.newFolder('/foo/bar/baz');
+    pathTranslator.newFile(
+        '/foo/.analysis_options',
+        r'''
+analyzer:
+  ignore:
+    - foo
+''');
+    pathTranslator.newFile(
+        '/foo/bar/.analysis_options',
+        r'''
+analyzer:
+  ignore:
+    - bar
+''');
+    Map<String, YamlNode> options = _getOptions('/foo/bar/baz', crawlUp: true);
+    expect(options, hasLength(1));
+    {
+      YamlMap analyzer = options['analyzer'];
+      expect(analyzer, isNotNull);
+      expect(analyzer['ignore'], unorderedEquals(['bar']));
+    }
+  }
+
+  void test_getOptions_doesNotExist() {
+    pathTranslator.newFolder('/notFile');
+    Map<String, YamlNode> options = _getOptions('/notFile');
+    expect(options, isEmpty);
+  }
+
+  void test_getOptions_empty() {
+    pathTranslator.newFile('/.analysis_options', r'''#empty''');
+    Map<String, YamlNode> options = _getOptions('/');
+    expect(options, isNotNull);
+    expect(options, isEmpty);
+  }
+
+  void test_getOptions_invalid() {
+    pathTranslator.newFile('/.analysis_options', r''':''');
+    expect(() {
+      _getOptions('/');
+    }, throws);
+  }
+
+  void test_getOptions_simple() {
+    pathTranslator.newFile(
         '/.analysis_options',
         r'''
 analyzer:
@@ -176,13 +191,22 @@
     - ignoreme.dart
     - 'sdk_ext/**'
 ''');
+    Map<String, YamlNode> options = _getOptions('/');
+    expect(options, hasLength(1));
+    {
+      YamlMap analyzer = options['analyzer'];
+      expect(analyzer, hasLength(1));
+      {
+        YamlList ignore = analyzer['ignore'];
+        expect(ignore, hasLength(2));
+        expect(ignore[0], 'ignoreme.dart');
+        expect(ignore[1], 'sdk_ext/**');
+      }
+    }
   }
-}
 
-clearResourceProvider() {
-  resourceProvider = null;
-}
-
-emptyResourceProvider() {
-  resourceProvider = new MemoryResourceProvider();
+  Map<String, YamlNode> _getOptions(String posixPath, {bool crawlUp: false}) {
+    Resource resource = pathTranslator.getResource(posixPath);
+    return provider.getOptions(resource, crawlUp: crawlUp);
+  }
 }
diff --git a/pkg/analyzer/test/source/embedder_test.dart b/pkg/analyzer/test/source/embedder_test.dart
index eecb818..898aa1f 100644
--- a/pkg/analyzer/test/source/embedder_test.dart
+++ b/pkg/analyzer/test/source/embedder_test.dart
@@ -10,10 +10,10 @@
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/source/embedder.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/util/absolute_path.dart';
 import 'package:path/path.dart' as path;
 import 'package:unittest/unittest.dart';
 
+import '../resource_utils.dart';
 import '../utils.dart';
 
 main() {
@@ -138,8 +138,8 @@
   });
 }
 
-ResourceProvider resourceProvider;
 TestPathTranslator pathTranslator;
+ResourceProvider resourceProvider;
 
 buildResourceProvider() {
   var rawProvider = new MemoryResourceProvider(isWindows: isWindows);
@@ -163,115 +163,3 @@
   resourceProvider = null;
   pathTranslator = null;
 }
-
-// TODO(danrubel) if this approach works well for running tests
-// in a platform specific way, then move all of the following functionality
-// into a separate test utility library.
-
-bool get isWindows => path.Style.platform == path.Style.windows;
-
-/**
- * Assert that the given path is posix.
- */
-void expectAbsolutePosixPath(String posixPath) {
-  expect(posixPath, startsWith('/'),
-      reason: 'Expected absolute posix path, but found $posixPath');
-}
-
-/**
- * Translate the given posixPath to a path appropriate for the
- * platform on which the tests are executing.
- */
-String posixToOSPath(String posixPath) {
-  expectAbsolutePosixPath(posixPath);
-  if (isWindows) {
-    String windowsPath = posixPath.replaceAll('/', '\\');
-    if (posixPath.startsWith('/')) {
-      return 'C:$windowsPath';
-    }
-    return windowsPath;
-  }
-  return posixPath;
-}
-
-/**
- * Translate the given posixPath to a file URI appropriate for the
- * platform on which the tests are executing.
- */
-String posixToOSFileUri(String posixPath) {
-  expectAbsolutePosixPath(posixPath);
-  return isWindows ? 'file:///C:$posixPath' : 'file://$posixPath';
-}
-
-/**
- * A convenience utility for setting up a test [MemoryResourceProvider].
- * All supplied paths are assumed to be in [path.posix] format
- * and are automatically translated to [path.context].
- *
- * This class intentionally does not implement [ResourceProvider]
- * directly or indirectly so that it cannot be used as a resource provider.
- * We do not want functionality under test to interact with a resource provider
- * that automatically translates paths.
- */
-class TestPathTranslator {
-  final MemoryResourceProvider _provider;
-
-  TestPathTranslator(this._provider);
-
-  Resource getResource(String posixPath) =>
-      _provider.getResource(posixToOSPath(posixPath));
-
-  File newFile(String posixPath, String content) =>
-      _provider.newFile(posixToOSPath(posixPath), content);
-
-  Folder newFolder(String posixPath) =>
-      _provider.newFolder(posixToOSPath(posixPath));
-}
-
-/**
- * A resource provider for testing that asserts that any supplied paths
- * are appropriate for the OS platform on which the tests are running.
- */
-class TestResourceProvider implements ResourceProvider {
-  final ResourceProvider _provider;
-
-  TestResourceProvider(this._provider) {
-    expect(_provider.absolutePathContext.separator, isWindows ? '\\' : '/');
-  }
-
-  @override
-  AbsolutePathContext get absolutePathContext => _provider.absolutePathContext;
-
-  @override
-  File getFile(String path) => _provider.getFile(_assertPath(path));
-
-  @override
-  Folder getFolder(String path) => _provider.getFolder(_assertPath(path));
-
-  @override
-  Resource getResource(String path) => _provider.getResource(_assertPath(path));
-
-  @override
-  Folder getStateLocation(String pluginId) =>
-      _provider.getStateLocation(pluginId);
-
-  @override
-  path.Context get pathContext => _provider.pathContext;
-
-  /**
-   * Assert that the given path is valid for the OS platform on which the
-   * tests are running.
-   */
-  String _assertPath(String path) {
-    if (isWindows) {
-      if (path.contains('/')) {
-        fail('Expected windows path, but found: $path');
-      }
-    } else {
-      if (path.contains('\\')) {
-        fail('Expected posix path, but found: $path');
-      }
-    }
-    return path;
-  }
-}
diff --git a/pkg/analyzer/test/source/error_processor_test.dart b/pkg/analyzer/test/source/error_processor_test.dart
index 3c3facb..ca088967 100644
--- a/pkg/analyzer/test/source/error_processor_test.dart
+++ b/pkg/analyzer/test/source/error_processor_test.dart
@@ -16,7 +16,6 @@
 import 'package:yaml/src/yaml_node.dart';
 
 import '../generated/test_support.dart';
-import '../utils.dart';
 
 main() {
   AnalysisError invalid_assignment =
@@ -40,14 +39,18 @@
     ['x']
   ]);
 
-  initializeTestEnvironment();
+  AnalysisError non_bool_operand = new AnalysisError(
+      new TestSource(), 0, 1, StaticTypeWarningCode.NON_BOOL_OPERAND, [
+    ['x']
+  ]);
+
   oneTimeSetup();
 
   setUp(() {
     context = new TestContext();
   });
 
-  group('ErrorProcessorTest', () {
+  group('ErrorProcessor', () {
     test('configureOptions', () {
       configureOptions('''
 analyzer:
@@ -62,9 +65,25 @@
       expect(getProcessor(unused_local_variable), isNull);
       expect(getProcessor(use_of_void_result), isNull);
     });
+
+    test('upgrades static type warnings to errors in strong mode', () {
+      configureOptions('''
+analyzer:
+  strong-mode: true
+''');
+      expect(getProcessor(non_bool_operand).severity, ErrorSeverity.ERROR);
+    });
+
+    test('does not upgrade other warnings to errors in strong mode', () {
+      configureOptions('''
+analyzer:
+  strong-mode: true
+''');
+      expect(getProcessor(unused_local_variable), isNull);
+    });
   });
 
-  group('ErrorConfigTest', () {
+  group('ErrorConfig', () {
     var config = '''
 analyzer:
   errors:
@@ -76,7 +95,8 @@
     group('processing', () {
       test('yaml map', () {
         var options = optionsProvider.getOptionsFromString(config);
-        var errorConfig = new ErrorConfig(options['analyzer']['errors']);
+        var errorConfig =
+            new ErrorConfig((options['analyzer'] as YamlMap)['errors']);
         expect(errorConfig.processors, hasLength(2));
 
         // ignore
diff --git a/pkg/analyzer/test/source/package_map_resolver_test.dart b/pkg/analyzer/test/source/package_map_resolver_test.dart
index 0017961..7453505 100644
--- a/pkg/analyzer/test/source/package_map_resolver_test.dart
+++ b/pkg/analyzer/test/source/package_map_resolver_test.dart
@@ -21,7 +21,8 @@
 
 @reflectiveTest
 class _PackageMapUriResolverTest {
-  static const Map EMPTY_MAP = const <String, List<Folder>>{};
+  static const Map<String, List<Folder>> EMPTY_MAP =
+      const <String, List<Folder>>{};
   MemoryResourceProvider provider = new MemoryResourceProvider();
 
   void test_isPackageUri() {
diff --git a/pkg/analyzer/test/src/abstract_single_unit.dart b/pkg/analyzer/test/src/abstract_single_unit.dart
index 48ba251..787ac21 100644
--- a/pkg/analyzer/test/src/abstract_single_unit.dart
+++ b/pkg/analyzer/test/src/abstract_single_unit.dart
@@ -4,8 +4,9 @@
 
 library test.services.src.index.abstract_single_file;
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -23,9 +24,10 @@
   CompilationUnitElement testUnitElement;
   LibraryElement testLibraryElement;
 
-  void addTestSource(String code, [Uri uri]) {
+  Source addTestSource(String code, [Uri uri]) {
     testCode = code;
     testSource = addSource(testFile, code);
+    return testSource;
   }
 
   void assertNoErrorsInSource(Source source) {
diff --git a/pkg/analyzer/test/src/context/abstract_context.dart b/pkg/analyzer/test/src/context/abstract_context.dart
index b0b7a01..be85eff 100644
--- a/pkg/analyzer/test/src/context/abstract_context.dart
+++ b/pkg/analyzer/test/src/context/abstract_context.dart
@@ -45,9 +45,12 @@
 typedef void _ElementVisitorFunction(Element element);
 
 class AbstractContextTest {
+  static final MockSdk SHARED_MOCK_SDK = new MockSdk();
+  static final MockSdk SHARED_STRONG_MOCK_SDK = new MockSdk();
+
   MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
 
-  DartSdk sdk = new MockSdk();
+  DartSdk sdk;
   SourceFactory sourceFactory;
   AnalysisContextImpl context;
   AnalysisCache analysisCache;
@@ -120,6 +123,8 @@
     return new AnalysisContextImpl();
   }
 
+  DartSdk createDartSdk() => new MockSdk();
+
   Source newSource(String path, [String content = '']) {
     File file = resourceProvider.newFile(path, content);
     return file.createSource();
@@ -135,6 +140,7 @@
   }
 
   void prepareAnalysisContext([AnalysisOptions options]) {
+    sdk = createDartSdk();
     sdkResolver = new DartUriResolver(sdk);
     resourceResolver = new ResourceUriResolver(resourceProvider);
     sourceFactory =
diff --git a/pkg/analyzer/test/src/context/cache_test.dart b/pkg/analyzer/test/src/context/cache_test.dart
index 37bd49c..3c44f09 100644
--- a/pkg/analyzer/test/src/context/cache_test.dart
+++ b/pkg/analyzer/test/src/context/cache_test.dart
@@ -1127,7 +1127,7 @@
 
   @override
   DeltaResult validate(InternalAnalysisContext context, AnalysisTarget target,
-      ResultDescriptor descriptor) {
+      ResultDescriptor descriptor, Object value) {
     if (descriptor == keepDescriptor) {
       return DeltaResult.KEEP_CONTINUE;
     }
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index d7e0a58..e19a173 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -1397,6 +1397,22 @@
     expect(analysisResult.changeNotices, isNotNull);
   }
 
+  void test_handleContentsChanged_incremental_newContentsNull() {
+    context.analysisOptions = new AnalysisOptionsImpl()..incremental = true;
+    ContentCache contentCache = new ContentCache();
+    context.contentCache = contentCache;
+    // old contents
+    String oldContents = 'foo() {}';
+    Source source = resourceProvider.getFile('/test.dart').createSource();
+    contentCache.setContents(source, oldContents);
+    expect(context.computeLibraryElement(source), isNotNull);
+    // new contents
+    String newContents = null;
+    contentCache.setContents(source, newContents);
+    context.handleContentsChanged(source, oldContents, newContents, true);
+    expect(context.getLibraryElement(source), isNull);
+  }
+
   Future test_implicitAnalysisEvents_added() async {
     AnalyzedSourcesListener listener = new AnalyzedSourcesListener();
     context.implicitAnalysisEvents.listen(listener.onData);
@@ -1463,6 +1479,46 @@
     expect(context.isServerLibrary(source), isFalse);
   }
 
+  void test_onResultInvalidated_removeSource() {
+    Source source = addSource('/test.dart', 'main() {}');
+    _analyzeAll_assertFinished();
+    // listen for changes
+    bool listenerInvoked = false;
+    context.onResultChanged(RESOLVED_UNIT).listen((ResultChangedEvent event) {
+      Source eventSource = event.target.source;
+      expect(event.wasComputed, isFalse);
+      expect(event.wasInvalidated, isTrue);
+      expect(event.descriptor, RESOLVED_UNIT);
+      expect(eventSource, source);
+      listenerInvoked = true;
+    });
+    // apply changes
+    expect(listenerInvoked, false);
+    context.applyChanges(new ChangeSet()..removedSource(source));
+    // verify
+    expect(listenerInvoked, isTrue);
+  }
+
+  void test_onResultInvalidated_setContents() {
+    Source source = addSource('/test.dart', 'main() {}');
+    _analyzeAll_assertFinished();
+    // listen for changes
+    bool listenerInvoked = false;
+    context.onResultChanged(RESOLVED_UNIT).listen((ResultChangedEvent event) {
+      Source eventSource = event.target.source;
+      expect(event.wasComputed, isFalse);
+      expect(event.wasInvalidated, isTrue);
+      expect(event.descriptor, RESOLVED_UNIT);
+      expect(eventSource, source);
+      listenerInvoked = true;
+    });
+    // apply changes
+    expect(listenerInvoked, false);
+    context.setContents(source, 'class B {}');
+    // verify
+    expect(listenerInvoked, isTrue);
+  }
+
   void test_parseCompilationUnit_errors() {
     Source source = addSource("/lib.dart", "library {");
     CompilationUnit compilationUnit = context.parseCompilationUnit(source);
@@ -1875,14 +1931,14 @@
     LibrarySpecificUnit unitA = new LibrarySpecificUnit(sourceA, sourceA);
     for (int i = 0; i < 10000; i++) {
       context.performAnalysisTask();
-      if (context.getResult(unitA, RESOLVED_UNIT2) != null) {
+      if (context.getResult(unitA, RESOLVED_UNIT3) != null) {
         break;
       }
     }
     // Update the source.
     // This should invalidate all the results and also reset the driver.
     context.setContents(sourceA, "library semicolonWasAdded;");
-    expect(context.getResult(unitA, RESOLVED_UNIT2), isNull);
+    expect(context.getResult(unitA, RESOLVED_UNIT3), isNull);
     expect(analysisDriver.currentWorkOrder, isNull);
     // Continue analysis.
     _analyzeAll_assertFinished();
@@ -1930,20 +1986,26 @@
 //    JUnitTestCase.assertNotNullMsg("performAnalysisTask failed to compute an element model", _context.getLibraryElement(source));
   }
 
-  void test_performAnalysisTask_onResultComputed() {
+  void test_performAnalysisTask_onResultChanged() {
     Set<String> libraryElementUris = new Set<String>();
     Set<String> parsedUnitUris = new Set<String>();
     Set<String> resolvedUnitUris = new Set<String>();
     // listen
-    context.onResultComputed(LIBRARY_ELEMENT).listen((event) {
+    context.onResultChanged(LIBRARY_ELEMENT).listen((event) {
+      expect(event.wasComputed, isTrue);
+      expect(event.wasInvalidated, isFalse);
       Source librarySource = event.target;
       libraryElementUris.add(librarySource.uri.toString());
     });
-    context.onResultComputed(PARSED_UNIT).listen((event) {
+    context.onResultChanged(PARSED_UNIT).listen((event) {
+      expect(event.wasComputed, isTrue);
+      expect(event.wasInvalidated, isFalse);
       Source source = event.target;
       parsedUnitUris.add(source.uri.toString());
     });
-    context.onResultComputed(RESOLVED_UNIT).listen((event) {
+    context.onResultChanged(RESOLVED_UNIT).listen((event) {
+      expect(event.wasComputed, isTrue);
+      expect(event.wasInvalidated, isFalse);
       LibrarySpecificUnit target = event.target;
       Source librarySource = target.library;
       resolvedUnitUris.add(librarySource.uri.toString());
@@ -2068,6 +2130,7 @@
     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);
 
     context.resolveCompilationUnit2(source, source);
diff --git a/pkg/analyzer/test/src/context/mock_sdk.dart b/pkg/analyzer/test/src/context/mock_sdk.dart
index 5466949..62d0beb 100644
--- a/pkg/analyzer/test/src/context/mock_sdk.dart
+++ b/pkg/analyzer/test/src/context/mock_sdk.dart
@@ -32,6 +32,15 @@
       Iterable<Future/*<T>*/> futures) => null;
   Future/*<R>*/ then/*<R>*/(/*=R*/ onValue(T value)) => null;
 }
+
+abstract class Completer<T> {
+  factory Completer() => new _AsyncCompleter<T>();
+  factory Completer.sync() => new _SyncCompleter<T>();
+  Future<T> get future;
+  void complete([value]);
+  void completeError(Object error, [StackTrace stackTrace]);
+  bool get isCompleted;
+}
 ''',
     const <String, String>{
       '/lib/async/stream.dart': r'''
@@ -113,6 +122,14 @@
   num operator -(num other);
   num operator *(num other);
   num operator /(num other);
+  int operator ^(int other);
+  int operator &(int other);
+  int operator |(int other);
+  int operator <<(int other);
+  int operator >>(int other);
+  int operator ~/(num other);
+  num operator %(num other);
+  int operator ~();
   int toInt();
   double toDouble();
   num abs();
@@ -151,18 +168,28 @@
       /*=R*/ combine(/*=R*/ previousValue, E element));
 }
 
-abstract class List<E> implements Iterable<E> {
-  void add(E value);
-  E operator [](int index);
-  void operator []=(int index, E value);
+class List<E> implements Iterable<E> {
+  List();
+  void add(E value) {}
+  E operator [](int index) => null;
+  void operator []=(int index, E value) {}
   Iterator<E> get iterator => null;
-  void clear();
+  void clear() {}
+
+  bool get isEmpty => false;
+  E get first => null;
+
+  Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e)) => null;
+
+  /*=R*/ fold/*<R>*/(/*=R*/ initialValue,
+      /*=R*/ combine(/*=R*/ previousValue, E element)) => null;
+
 }
 
-abstract class Map<K, V> extends Object {
-  Iterable<K> get keys;
-  V operator [](K key);
-  void operator []=(K key, V value);
+class Map<K, V> extends Object {
+  Iterable<K> get keys => null;
+  V operator [](K key) => null;
+  void operator []=(K key, V value) {}
 }
 
 external bool identical(Object a, Object b);
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index f3a0e4c..ce4b499 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -6,11 +6,15 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/java_engine.dart' show Predicate;
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/testing/ast_factory.dart';
+import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/token_factory.dart';
 import 'package:unittest/unittest.dart';
 
@@ -24,6 +28,7 @@
   runReflectiveTests(ConstantEvaluatorTest);
   runReflectiveTests(NodeLocatorTest);
   runReflectiveTests(NodeLocator2Test);
+  runReflectiveTests(ResolutionCopierTest);
   runReflectiveTests(ToSourceVisitorTest);
 }
 
@@ -415,7 +420,7 @@
   }
 
   void _assertLocate(CompilationUnit unit, int start, int end,
-      Predicate<AstNode> predicate, Type expectedClass) {
+      Predicate<Object> predicate, Type expectedClass) {
     NodeLocator locator = new NodeLocator(start, end);
     AstNode node = locator.searchWithin(unit);
     expect(node, isNotNull);
@@ -428,6 +433,663 @@
 }
 
 @reflectiveTest
+class ResolutionCopierTest extends EngineTestCase {
+  void test_visitAdjacentStrings() {
+    AdjacentStrings createNode() => new AdjacentStrings([
+          new SimpleStringLiteral(null, 'hello'),
+          new SimpleStringLiteral(null, 'world')
+        ]);
+
+    AdjacentStrings fromNode = createNode();
+    DartType propagatedType = ElementFactory.classElement2("A").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("B").type;
+    fromNode.staticType = staticType;
+
+    AdjacentStrings toNode = createNode();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitAnnotation() {
+    String annotationName = "proxy";
+    Annotation fromNode =
+        AstFactory.annotation(AstFactory.identifier3(annotationName));
+    Element element = ElementFactory.topLevelVariableElement2(annotationName);
+    fromNode.element = element;
+    Annotation toNode =
+        AstFactory.annotation(AstFactory.identifier3(annotationName));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.element, same(element));
+  }
+
+  void test_visitAsExpression() {
+    AsExpression fromNode = AstFactory.asExpression(
+        AstFactory.identifier3("x"), AstFactory.typeName4("A"));
+    DartType propagatedType = ElementFactory.classElement2("A").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("B").type;
+    fromNode.staticType = staticType;
+    AsExpression toNode = AstFactory.asExpression(
+        AstFactory.identifier3("x"), AstFactory.typeName4("A"));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitAssignmentExpression() {
+    AssignmentExpression fromNode = AstFactory.assignmentExpression(
+        AstFactory.identifier3("a"),
+        TokenType.PLUS_EQ,
+        AstFactory.identifier3("b"));
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    MethodElement propagatedElement =
+        ElementFactory.methodElement("+", propagatedType);
+    fromNode.propagatedElement = propagatedElement;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    MethodElement staticElement = ElementFactory.methodElement("+", staticType);
+    fromNode.staticElement = staticElement;
+    fromNode.staticType = staticType;
+    AssignmentExpression toNode = AstFactory.assignmentExpression(
+        AstFactory.identifier3("a"),
+        TokenType.PLUS_EQ,
+        AstFactory.identifier3("b"));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedElement, same(propagatedElement));
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticElement, same(staticElement));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitBinaryExpression() {
+    BinaryExpression fromNode = AstFactory.binaryExpression(
+        AstFactory.identifier3("a"),
+        TokenType.PLUS,
+        AstFactory.identifier3("b"));
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    MethodElement propagatedElement =
+        ElementFactory.methodElement("+", propagatedType);
+    fromNode.propagatedElement = propagatedElement;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    MethodElement staticElement = ElementFactory.methodElement("+", staticType);
+    fromNode.staticElement = staticElement;
+    fromNode.staticType = staticType;
+    BinaryExpression toNode = AstFactory.binaryExpression(
+        AstFactory.identifier3("a"),
+        TokenType.PLUS,
+        AstFactory.identifier3("b"));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedElement, same(propagatedElement));
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticElement, same(staticElement));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitBooleanLiteral() {
+    BooleanLiteral fromNode = AstFactory.booleanLiteral(true);
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    BooleanLiteral toNode = AstFactory.booleanLiteral(true);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitCascadeExpression() {
+    CascadeExpression fromNode = AstFactory.cascadeExpression(
+        AstFactory.identifier3("a"), [AstFactory.identifier3("b")]);
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    CascadeExpression toNode = AstFactory.cascadeExpression(
+        AstFactory.identifier3("a"), [AstFactory.identifier3("b")]);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitCompilationUnit() {
+    CompilationUnit fromNode = AstFactory.compilationUnit();
+    CompilationUnitElement element =
+        new CompilationUnitElementImpl("test.dart");
+    fromNode.element = element;
+    CompilationUnit toNode = AstFactory.compilationUnit();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.element, same(element));
+  }
+
+  void test_visitConditionalExpression() {
+    ConditionalExpression fromNode = AstFactory.conditionalExpression(
+        AstFactory.identifier3("c"),
+        AstFactory.identifier3("a"),
+        AstFactory.identifier3("b"));
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    ConditionalExpression toNode = AstFactory.conditionalExpression(
+        AstFactory.identifier3("c"),
+        AstFactory.identifier3("a"),
+        AstFactory.identifier3("b"));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitConstructorDeclaration() {
+    String className = "A";
+    String constructorName = "c";
+    ConstructorDeclaration fromNode = AstFactory.constructorDeclaration(
+        AstFactory.identifier3(className),
+        constructorName,
+        AstFactory.formalParameterList(),
+        null);
+    ConstructorElement element = ElementFactory.constructorElement2(
+        ElementFactory.classElement2(className), constructorName);
+    fromNode.element = element;
+    ConstructorDeclaration toNode = AstFactory.constructorDeclaration(
+        AstFactory.identifier3(className),
+        constructorName,
+        AstFactory.formalParameterList(),
+        null);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.element, same(element));
+  }
+
+  void test_visitConstructorName() {
+    ConstructorName fromNode =
+        AstFactory.constructorName(AstFactory.typeName4("A"), "c");
+    ConstructorElement staticElement = ElementFactory.constructorElement2(
+        ElementFactory.classElement2("A"), "c");
+    fromNode.staticElement = staticElement;
+    ConstructorName toNode =
+        AstFactory.constructorName(AstFactory.typeName4("A"), "c");
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.staticElement, same(staticElement));
+  }
+
+  void test_visitDoubleLiteral() {
+    DoubleLiteral fromNode = AstFactory.doubleLiteral(1.0);
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    DoubleLiteral toNode = AstFactory.doubleLiteral(1.0);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitExportDirective() {
+    ExportDirective fromNode = AstFactory.exportDirective2("dart:uri");
+    ExportElement element = new ExportElementImpl(-1);
+    fromNode.element = element;
+    ExportDirective toNode = AstFactory.exportDirective2("dart:uri");
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.element, same(element));
+  }
+
+  void test_visitFunctionExpression() {
+    FunctionExpression fromNode = AstFactory.functionExpression2(
+        AstFactory.formalParameterList(), AstFactory.emptyFunctionBody());
+    MethodElement element = ElementFactory.methodElement(
+        "m", ElementFactory.classElement2("C").type);
+    fromNode.element = element;
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    FunctionExpression toNode = AstFactory.functionExpression2(
+        AstFactory.formalParameterList(), AstFactory.emptyFunctionBody());
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.element, same(element));
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitFunctionExpressionInvocation() {
+    FunctionExpressionInvocation fromNode =
+        AstFactory.functionExpressionInvocation(AstFactory.identifier3("f"));
+    MethodElement propagatedElement = ElementFactory.methodElement(
+        "m", ElementFactory.classElement2("C").type);
+    fromNode.propagatedElement = propagatedElement;
+    MethodElement staticElement = ElementFactory.methodElement(
+        "m", ElementFactory.classElement2("C").type);
+    fromNode.staticElement = staticElement;
+    FunctionExpressionInvocation toNode =
+        AstFactory.functionExpressionInvocation(AstFactory.identifier3("f"));
+
+    _copyAndVerifyInvocation(fromNode, toNode);
+
+    expect(toNode.propagatedElement, same(propagatedElement));
+    expect(toNode.staticElement, same(staticElement));
+  }
+
+  void test_visitImportDirective() {
+    ImportDirective fromNode = AstFactory.importDirective3("dart:uri", null);
+    ImportElement element = new ImportElementImpl(0);
+    fromNode.element = element;
+    ImportDirective toNode = AstFactory.importDirective3("dart:uri", null);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.element, same(element));
+  }
+
+  void test_visitIndexExpression() {
+    IndexExpression fromNode = AstFactory.indexExpression(
+        AstFactory.identifier3("a"), AstFactory.integer(0));
+    MethodElement propagatedElement = ElementFactory.methodElement(
+        "m", ElementFactory.classElement2("C").type);
+    MethodElement staticElement = ElementFactory.methodElement(
+        "m", ElementFactory.classElement2("C").type);
+    AuxiliaryElements auxiliaryElements =
+        new AuxiliaryElements(staticElement, propagatedElement);
+    fromNode.auxiliaryElements = auxiliaryElements;
+    fromNode.propagatedElement = propagatedElement;
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    fromNode.staticElement = staticElement;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    IndexExpression toNode = AstFactory.indexExpression(
+        AstFactory.identifier3("a"), AstFactory.integer(0));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.auxiliaryElements, same(auxiliaryElements));
+    expect(toNode.propagatedElement, same(propagatedElement));
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticElement, same(staticElement));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitInstanceCreationExpression() {
+    InstanceCreationExpression fromNode = AstFactory
+        .instanceCreationExpression2(Keyword.NEW, AstFactory.typeName4("C"));
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    ConstructorElement staticElement = ElementFactory.constructorElement2(
+        ElementFactory.classElement2("C"), null);
+    fromNode.staticElement = staticElement;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    InstanceCreationExpression toNode = AstFactory.instanceCreationExpression2(
+        Keyword.NEW, AstFactory.typeName4("C"));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticElement, same(staticElement));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitIntegerLiteral() {
+    IntegerLiteral fromNode = AstFactory.integer(2);
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    IntegerLiteral toNode = AstFactory.integer(2);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitIsExpression() {
+    IsExpression fromNode = AstFactory.isExpression(
+        AstFactory.identifier3("x"), false, AstFactory.typeName4("A"));
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    IsExpression toNode = AstFactory.isExpression(
+        AstFactory.identifier3("x"), false, AstFactory.typeName4("A"));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitLibraryIdentifier() {
+    LibraryIdentifier fromNode =
+        AstFactory.libraryIdentifier([AstFactory.identifier3("lib")]);
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    LibraryIdentifier toNode =
+        AstFactory.libraryIdentifier([AstFactory.identifier3("lib")]);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitListLiteral() {
+    ListLiteral fromNode = AstFactory.listLiteral();
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    ListLiteral toNode = AstFactory.listLiteral();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitMapLiteral() {
+    MapLiteral fromNode = AstFactory.mapLiteral2();
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    MapLiteral toNode = AstFactory.mapLiteral2();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitMethodInvocation() {
+    MethodInvocation fromNode = AstFactory.methodInvocation2("m");
+    MethodInvocation toNode = AstFactory.methodInvocation2("m");
+    _copyAndVerifyInvocation(fromNode, toNode);
+  }
+
+  void test_visitNamedExpression() {
+    NamedExpression fromNode =
+        AstFactory.namedExpression2("n", AstFactory.integer(0));
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    NamedExpression toNode =
+        AstFactory.namedExpression2("n", AstFactory.integer(0));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitNullLiteral() {
+    NullLiteral fromNode = AstFactory.nullLiteral();
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    NullLiteral toNode = AstFactory.nullLiteral();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitParenthesizedExpression() {
+    ParenthesizedExpression fromNode =
+        AstFactory.parenthesizedExpression(AstFactory.integer(0));
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    ParenthesizedExpression toNode =
+        AstFactory.parenthesizedExpression(AstFactory.integer(0));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitPartDirective() {
+    PartDirective fromNode = AstFactory.partDirective2("part.dart");
+    LibraryElement element = new LibraryElementImpl.forNode(
+        null, AstFactory.libraryIdentifier2(["lib"]));
+    fromNode.element = element;
+    PartDirective toNode = AstFactory.partDirective2("part.dart");
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.element, same(element));
+  }
+
+  void test_visitPartOfDirective() {
+    PartOfDirective fromNode =
+        AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["lib"]));
+    LibraryElement element = new LibraryElementImpl.forNode(
+        null, AstFactory.libraryIdentifier2(["lib"]));
+    fromNode.element = element;
+    PartOfDirective toNode =
+        AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["lib"]));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.element, same(element));
+  }
+
+  void test_visitPostfixExpression() {
+    String variableName = "x";
+    PostfixExpression fromNode = AstFactory.postfixExpression(
+        AstFactory.identifier3(variableName), TokenType.PLUS_PLUS);
+    MethodElement propagatedElement = ElementFactory.methodElement(
+        "+", ElementFactory.classElement2("C").type);
+    fromNode.propagatedElement = propagatedElement;
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    MethodElement staticElement = ElementFactory.methodElement(
+        "+", ElementFactory.classElement2("C").type);
+    fromNode.staticElement = staticElement;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    PostfixExpression toNode = AstFactory.postfixExpression(
+        AstFactory.identifier3(variableName), TokenType.PLUS_PLUS);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedElement, same(propagatedElement));
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticElement, same(staticElement));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitPrefixedIdentifier() {
+    PrefixedIdentifier fromNode = AstFactory.identifier5("p", "f");
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    PrefixedIdentifier toNode = AstFactory.identifier5("p", "f");
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitPrefixExpression() {
+    PrefixExpression fromNode = AstFactory.prefixExpression(
+        TokenType.PLUS_PLUS, AstFactory.identifier3("x"));
+    MethodElement propagatedElement = ElementFactory.methodElement(
+        "+", ElementFactory.classElement2("C").type);
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedElement = propagatedElement;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    MethodElement staticElement = ElementFactory.methodElement(
+        "+", ElementFactory.classElement2("C").type);
+    fromNode.staticElement = staticElement;
+    fromNode.staticType = staticType;
+    PrefixExpression toNode = AstFactory.prefixExpression(
+        TokenType.PLUS_PLUS, AstFactory.identifier3("x"));
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedElement, same(propagatedElement));
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticElement, same(staticElement));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitPropertyAccess() {
+    PropertyAccess fromNode =
+        AstFactory.propertyAccess2(AstFactory.identifier3("x"), "y");
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    PropertyAccess toNode =
+        AstFactory.propertyAccess2(AstFactory.identifier3("x"), "y");
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitRedirectingConstructorInvocation() {
+    RedirectingConstructorInvocation fromNode =
+        AstFactory.redirectingConstructorInvocation();
+    ConstructorElement staticElement = ElementFactory.constructorElement2(
+        ElementFactory.classElement2("C"), null);
+    fromNode.staticElement = staticElement;
+    RedirectingConstructorInvocation toNode =
+        AstFactory.redirectingConstructorInvocation();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.staticElement, same(staticElement));
+  }
+
+  void test_visitRethrowExpression() {
+    RethrowExpression fromNode = AstFactory.rethrowExpression();
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    RethrowExpression toNode = AstFactory.rethrowExpression();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitSimpleIdentifier() {
+    SimpleIdentifier fromNode = AstFactory.identifier3("x");
+    MethodElement propagatedElement = ElementFactory.methodElement(
+        "m", ElementFactory.classElement2("C").type);
+    MethodElement staticElement = ElementFactory.methodElement(
+        "m", ElementFactory.classElement2("C").type);
+    AuxiliaryElements auxiliaryElements =
+        new AuxiliaryElements(staticElement, propagatedElement);
+    fromNode.auxiliaryElements = auxiliaryElements;
+    fromNode.propagatedElement = propagatedElement;
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    fromNode.staticElement = staticElement;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    SimpleIdentifier toNode = AstFactory.identifier3("x");
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.auxiliaryElements, same(auxiliaryElements));
+    expect(toNode.propagatedElement, same(propagatedElement));
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticElement, same(staticElement));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitSimpleStringLiteral() {
+    SimpleStringLiteral fromNode = AstFactory.string2("abc");
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    SimpleStringLiteral toNode = AstFactory.string2("abc");
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitStringInterpolation() {
+    StringInterpolation fromNode =
+        AstFactory.string([AstFactory.interpolationString("a", "'a'")]);
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    StringInterpolation toNode =
+        AstFactory.string([AstFactory.interpolationString("a", "'a'")]);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitSuperConstructorInvocation() {
+    SuperConstructorInvocation fromNode =
+        AstFactory.superConstructorInvocation();
+    ConstructorElement staticElement = ElementFactory.constructorElement2(
+        ElementFactory.classElement2("C"), null);
+    fromNode.staticElement = staticElement;
+    SuperConstructorInvocation toNode = AstFactory.superConstructorInvocation();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.staticElement, same(staticElement));
+  }
+
+  void test_visitSuperExpression() {
+    SuperExpression fromNode = AstFactory.superExpression();
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    SuperExpression toNode = AstFactory.superExpression();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitSymbolLiteral() {
+    SymbolLiteral fromNode = AstFactory.symbolLiteral(["s"]);
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    SymbolLiteral toNode = AstFactory.symbolLiteral(["s"]);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitThisExpression() {
+    ThisExpression fromNode = AstFactory.thisExpression();
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    ThisExpression toNode = AstFactory.thisExpression();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitThrowExpression() {
+    ThrowExpression fromNode = AstFactory.throwExpression();
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    ThrowExpression toNode = AstFactory.throwExpression();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+  }
+
+  void test_visitTypeName() {
+    TypeName fromNode = AstFactory.typeName4("C");
+    DartType type = ElementFactory.classElement2("C").type;
+    fromNode.type = type;
+    TypeName toNode = AstFactory.typeName4("C");
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.type, same(type));
+  }
+
+  void _copyAndVerifyInvocation(
+      InvocationExpression fromNode, InvocationExpression toNode) {
+    DartType propagatedType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedType = propagatedType;
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+
+    DartType propagatedInvokeType = ElementFactory.classElement2("C").type;
+    fromNode.propagatedInvokeType = propagatedInvokeType;
+    DartType staticInvokeType = ElementFactory.classElement2("C").type;
+    fromNode.staticInvokeType = staticInvokeType;
+
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.propagatedType, same(propagatedType));
+    expect(toNode.staticType, same(staticType));
+    expect(toNode.propagatedInvokeType, same(propagatedInvokeType));
+    expect(toNode.staticInvokeType, same(staticInvokeType));
+  }
+}
+
+@reflectiveTest
 class ToSourceVisitorTest extends EngineTestCase {
   void test_visitAdjacentStrings() {
     _assertSource(
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
new file mode 100644
index 0000000..960726e
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -0,0 +1,1603 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.constant_test;
+
+import 'package:analyzer/context/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/src/dart/element/element.dart';
+import 'package:analyzer/src/generated/constant.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/error.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_factory.dart';
+import 'package:analyzer/src/generated/testing/test_type_provider.dart';
+import 'package:analyzer/src/task/dart.dart';
+import 'package:path/path.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../../generated/resolver_test_case.dart';
+import '../../../generated/test_support.dart';
+import '../../../reflective_tests.dart';
+import '../../../utils.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(ConstantValueComputerTest);
+  runReflectiveTests(ConstantVisitorTest);
+}
+
+/**
+ * Implementation of [ConstantEvaluationValidator] used during unit tests;
+ * verifies that any nodes referenced during constant evaluation are present in
+ * the dependency graph.
+ */
+class ConstantEvaluationValidator_ForTest
+    implements ConstantEvaluationValidator {
+  final InternalAnalysisContext context;
+  ConstantValueComputer computer;
+  ConstantEvaluationTarget _nodeBeingEvaluated;
+
+  ConstantEvaluationValidator_ForTest(this.context);
+
+  @override
+  void beforeComputeValue(ConstantEvaluationTarget constant) {
+    _nodeBeingEvaluated = constant;
+  }
+
+  @override
+  void beforeGetConstantInitializers(ConstructorElement constructor) =>
+      _checkPathTo(constructor);
+
+  @override
+  void beforeGetEvaluationResult(ConstantEvaluationTarget constant) =>
+      _checkPathTo(constant);
+
+  @override
+  void beforeGetFieldEvaluationResult(FieldElementImpl field) =>
+      _checkPathTo(field);
+
+  @override
+  void beforeGetParameterDefault(ParameterElement parameter) =>
+      _checkPathTo(parameter);
+
+  void _checkPathTo(ConstantEvaluationTarget target) {
+    if (computer.referenceGraph.containsPath(_nodeBeingEvaluated, target)) {
+      return; // pass
+    }
+    // print a nice error message on failure
+    StringBuffer out = new StringBuffer();
+    out.writeln("missing path in constant dependency graph");
+    out.writeln("from $_nodeBeingEvaluated to $target");
+    for (var s in context.analysisCache.sources) {
+      String text = context.getContents(s).data;
+      if (text != "") {
+        out.writeln('''
+=== ${s.shortName}
+$text''');
+      }
+    }
+    fail(out.toString());
+  }
+}
+
+@reflectiveTest
+class ConstantValueComputerTest extends ResolverTestCase {
+  void test_annotation_constConstructor() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A {
+  final int i;
+  const A(this.i);
+}
+
+class C {
+  @A(5)
+  f() {}
+}
+''');
+    EvaluationResultImpl result =
+        _evaluateAnnotation(compilationUnit, "C", "f");
+    Map<String, DartObjectImpl> annotationFields = _assertType(result, 'A');
+    _assertIntField(annotationFields, 'i', 5);
+  }
+
+  void test_annotation_constConstructor_named() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A {
+  final int i;
+  const A.named(this.i);
+}
+
+class C {
+  @A.named(5)
+  f() {}
+}
+''');
+    EvaluationResultImpl result =
+        _evaluateAnnotation(compilationUnit, "C", "f");
+    Map<String, DartObjectImpl> annotationFields = _assertType(result, 'A');
+    _assertIntField(annotationFields, 'i', 5);
+  }
+
+  void test_annotation_constConstructor_noArgs() {
+    // Failing to pass arguments to an annotation which is a constant
+    // constructor is illegal, but shouldn't crash analysis.
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A {
+  final int i;
+  const A(this.i);
+}
+
+class C {
+  @A
+  f() {}
+}
+''');
+    _evaluateAnnotation(compilationUnit, "C", "f");
+  }
+
+  void test_annotation_constConstructor_noArgs_named() {
+    // Failing to pass arguments to an annotation which is a constant
+    // constructor is illegal, but shouldn't crash analysis.
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A {
+  final int i;
+  const A.named(this.i);
+}
+
+class C {
+  @A.named
+  f() {}
+}
+''');
+    _evaluateAnnotation(compilationUnit, "C", "f");
+  }
+
+  void test_annotation_nonConstConstructor() {
+    // Calling a non-const constructor from an annotation that is illegal, but
+    // shouldn't crash analysis.
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A {
+  final int i;
+  A(this.i);
+}
+
+class C {
+  @A(5)
+  f() {}
+}
+''');
+    _evaluateAnnotation(compilationUnit, "C", "f");
+  }
+
+  void test_annotation_staticConst() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+class C {
+  static const int i = 5;
+
+  @i
+  f() {}
+}
+''');
+    EvaluationResultImpl result =
+        _evaluateAnnotation(compilationUnit, "C", "f");
+    expect(_assertValidInt(result), 5);
+  }
+
+  void test_annotation_staticConst_args() {
+    // Applying arguments to an annotation that is a static const is
+    // illegal, but shouldn't crash analysis.
+    CompilationUnit compilationUnit = resolveSource(r'''
+class C {
+  static const int i = 5;
+
+  @i(1)
+  f() {}
+}
+''');
+    _evaluateAnnotation(compilationUnit, "C", "f");
+  }
+
+  void test_annotation_staticConst_otherClass() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A {
+  static const int i = 5;
+}
+
+class C {
+  @A.i
+  f() {}
+}
+''');
+    EvaluationResultImpl result =
+        _evaluateAnnotation(compilationUnit, "C", "f");
+    expect(_assertValidInt(result), 5);
+  }
+
+  void test_annotation_staticConst_otherClass_args() {
+    // Applying arguments to an annotation that is a static const is
+    // illegal, but shouldn't crash analysis.
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A {
+  static const int i = 5;
+}
+
+class C {
+  @A.i(1)
+  f() {}
+}
+''');
+    _evaluateAnnotation(compilationUnit, "C", "f");
+  }
+
+  void test_annotation_topLevelVariable() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const int i = 5;
+class C {
+  @i
+  f() {}
+}
+''');
+    EvaluationResultImpl result =
+        _evaluateAnnotation(compilationUnit, "C", "f");
+    expect(_assertValidInt(result), 5);
+  }
+
+  void test_annotation_topLevelVariable_args() {
+    // Applying arguments to an annotation that is a top-level variable is
+    // illegal, but shouldn't crash analysis.
+    CompilationUnit compilationUnit = resolveSource(r'''
+const int i = 5;
+class C {
+  @i(1)
+  f() {}
+}
+''');
+    _evaluateAnnotation(compilationUnit, "C", "f");
+  }
+
+  void test_computeValues_cycle() {
+    TestLogger logger = new TestLogger();
+    AnalysisEngine.instance.logger = logger;
+    try {
+      Source source = addSource(r'''
+  const int a = c;
+  const int b = a;
+  const int c = b;''');
+      LibraryElement libraryElement = resolve2(source);
+      CompilationUnit unit =
+          analysisContext.resolveCompilationUnit(source, libraryElement);
+      analysisContext.computeErrors(source);
+      expect(unit, isNotNull);
+      ConstantValueComputer computer = _makeConstantValueComputer();
+      computer.add(unit, source, source);
+      computer.computeValues();
+      NodeList<CompilationUnitMember> members = unit.declarations;
+      expect(members, hasLength(3));
+      _validate(false, (members[0] as TopLevelVariableDeclaration).variables);
+      _validate(false, (members[1] as TopLevelVariableDeclaration).variables);
+      _validate(false, (members[2] as TopLevelVariableDeclaration).variables);
+    } finally {
+      AnalysisEngine.instance.logger = Logger.NULL;
+    }
+  }
+
+  void test_computeValues_dependentVariables() {
+    Source source = addSource(r'''
+const int b = a;
+const int a = 0;''');
+    LibraryElement libraryElement = resolve2(source);
+    CompilationUnit unit =
+        analysisContext.resolveCompilationUnit(source, libraryElement);
+    expect(unit, isNotNull);
+    ConstantValueComputer computer = _makeConstantValueComputer();
+    computer.add(unit, source, source);
+    computer.computeValues();
+    NodeList<CompilationUnitMember> members = unit.declarations;
+    expect(members, hasLength(2));
+    _validate(true, (members[0] as TopLevelVariableDeclaration).variables);
+    _validate(true, (members[1] as TopLevelVariableDeclaration).variables);
+  }
+
+  void test_computeValues_empty() {
+    ConstantValueComputer computer = _makeConstantValueComputer();
+    computer.computeValues();
+  }
+
+  void test_computeValues_multipleSources() {
+    Source librarySource = addNamedSource(
+        "/lib.dart",
+        r'''
+library lib;
+part 'part.dart';
+const int c = b;
+const int a = 0;''');
+    Source partSource = addNamedSource(
+        "/part.dart",
+        r'''
+part of lib;
+const int b = a;
+const int d = c;''');
+    LibraryElement libraryElement = resolve2(librarySource);
+    CompilationUnit libraryUnit =
+        analysisContext.resolveCompilationUnit(librarySource, libraryElement);
+    expect(libraryUnit, isNotNull);
+    CompilationUnit partUnit =
+        analysisContext.resolveCompilationUnit(partSource, libraryElement);
+    expect(partUnit, isNotNull);
+    ConstantValueComputer computer = _makeConstantValueComputer();
+    computer.add(libraryUnit, librarySource, librarySource);
+    computer.add(partUnit, partSource, librarySource);
+    computer.computeValues();
+    NodeList<CompilationUnitMember> libraryMembers = libraryUnit.declarations;
+    expect(libraryMembers, hasLength(2));
+    _validate(
+        true, (libraryMembers[0] as TopLevelVariableDeclaration).variables);
+    _validate(
+        true, (libraryMembers[1] as TopLevelVariableDeclaration).variables);
+    NodeList<CompilationUnitMember> partMembers = libraryUnit.declarations;
+    expect(partMembers, hasLength(2));
+    _validate(true, (partMembers[0] as TopLevelVariableDeclaration).variables);
+    _validate(true, (partMembers[1] as TopLevelVariableDeclaration).variables);
+  }
+
+  void test_computeValues_singleVariable() {
+    Source source = addSource("const int a = 0;");
+    LibraryElement libraryElement = resolve2(source);
+    CompilationUnit unit =
+        analysisContext.resolveCompilationUnit(source, libraryElement);
+    expect(unit, isNotNull);
+    ConstantValueComputer computer = _makeConstantValueComputer();
+    computer.add(unit, source, source);
+    computer.computeValues();
+    NodeList<CompilationUnitMember> members = unit.declarations;
+    expect(members, hasLength(1));
+    _validate(true, (members[0] as TopLevelVariableDeclaration).variables);
+  }
+
+  void test_computeValues_value_depends_on_enum() {
+    Source source = addSource('''
+enum E { id0, id1 }
+const E e = E.id0;
+''');
+    LibraryElement libraryElement = resolve2(source);
+    CompilationUnit unit =
+        analysisContext.resolveCompilationUnit(source, libraryElement);
+    expect(unit, isNotNull);
+    ConstantValueComputer computer = _makeConstantValueComputer();
+    computer.add(unit, source, source);
+    computer.computeValues();
+    TopLevelVariableDeclaration declaration = unit.declarations
+        .firstWhere((member) => member is TopLevelVariableDeclaration);
+    _validate(true, declaration.variables);
+  }
+
+  void test_dependencyOnConstructor() {
+    // x depends on "const A()"
+    _assertProperDependencies(r'''
+class A {
+  const A();
+}
+const x = const A();''');
+  }
+
+  void test_dependencyOnConstructorArgument() {
+    // "const A(x)" depends on x
+    _assertProperDependencies(r'''
+class A {
+  const A(this.next);
+  final A next;
+}
+const A x = const A(null);
+const A y = const A(x);''');
+  }
+
+  void test_dependencyOnConstructorArgument_unresolvedConstructor() {
+    // "const A.a(x)" depends on x even if the constructor A.a can't be found.
+    _assertProperDependencies(
+        r'''
+class A {
+}
+const int x = 1;
+const A y = const A.a(x);''',
+        [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR]);
+  }
+
+  void test_dependencyOnConstructorInitializer() {
+    // "const A()" depends on x
+    _assertProperDependencies(r'''
+const int x = 1;
+class A {
+  const A() : v = x;
+  final int v;
+}''');
+  }
+
+  void test_dependencyOnExplicitSuperConstructor() {
+    // b depends on B() depends on A()
+    _assertProperDependencies(r'''
+class A {
+  const A(this.x);
+  final int x;
+}
+class B extends A {
+  const B() : super(5);
+}
+const B b = const B();''');
+  }
+
+  void test_dependencyOnExplicitSuperConstructorParameters() {
+    // b depends on B() depends on i
+    _assertProperDependencies(r'''
+class A {
+  const A(this.x);
+  final int x;
+}
+class B extends A {
+  const B() : super(i);
+}
+const B b = const B();
+const int i = 5;''');
+  }
+
+  void test_dependencyOnFactoryRedirect() {
+    // a depends on A.foo() depends on A.bar()
+    _assertProperDependencies(r'''
+const A a = const A.foo();
+class A {
+  factory const A.foo() = A.bar;
+  const A.bar();
+}''');
+  }
+
+  void test_dependencyOnFactoryRedirectWithTypeParams() {
+    _assertProperDependencies(r'''
+class A {
+  const factory A(var a) = B<int>;
+}
+
+class B<T> implements A {
+  final T x;
+  const B(this.x);
+}
+
+const A a = const A(10);''');
+  }
+
+  void test_dependencyOnImplicitSuperConstructor() {
+    // b depends on B() depends on A()
+    _assertProperDependencies(r'''
+class A {
+  const A() : x = 5;
+  final int x;
+}
+class B extends A {
+  const B();
+}
+const B b = const B();''');
+  }
+
+  void test_dependencyOnInitializedFinal() {
+    // a depends on A() depends on A.x
+    _assertProperDependencies('''
+class A {
+  const A();
+  final int x = 1;
+}
+const A a = const A();
+''');
+  }
+
+  void test_dependencyOnInitializedNonStaticConst() {
+    // Even though non-static consts are not allowed by the language, we need
+    // to handle them for error recovery purposes.
+    // a depends on A() depends on A.x
+    _assertProperDependencies(
+        '''
+class A {
+  const A();
+  const int x = 1;
+}
+const A a = const A();
+''',
+        [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
+  }
+
+  void test_dependencyOnNonFactoryRedirect() {
+    // a depends on A.foo() depends on A.bar()
+    _assertProperDependencies(r'''
+const A a = const A.foo();
+class A {
+  const A.foo() : this.bar();
+  const A.bar();
+}''');
+  }
+
+  void test_dependencyOnNonFactoryRedirect_arg() {
+    // a depends on A.foo() depends on b
+    _assertProperDependencies(r'''
+const A a = const A.foo();
+const int b = 1;
+class A {
+  const A.foo() : this.bar(b);
+  const A.bar(x) : y = x;
+  final int y;
+}''');
+  }
+
+  void test_dependencyOnNonFactoryRedirect_defaultValue() {
+    // a depends on A.foo() depends on A.bar() depends on b
+    _assertProperDependencies(r'''
+const A a = const A.foo();
+const int b = 1;
+class A {
+  const A.foo() : this.bar();
+  const A.bar([x = b]) : y = x;
+  final int y;
+}''');
+  }
+
+  void test_dependencyOnNonFactoryRedirect_toMissing() {
+    // a depends on A.foo() which depends on nothing, since A.bar() is
+    // missing.
+    _assertProperDependencies(
+        r'''
+const A a = const A.foo();
+class A {
+  const A.foo() : this.bar();
+}''',
+        [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR]);
+  }
+
+  void test_dependencyOnNonFactoryRedirect_toNonConst() {
+    // a depends on A.foo() which depends on nothing, since A.bar() is
+    // non-const.
+    _assertProperDependencies(r'''
+const A a = const A.foo();
+class A {
+  const A.foo() : this.bar();
+  A.bar();
+}''');
+  }
+
+  void test_dependencyOnNonFactoryRedirect_unnamed() {
+    // a depends on A.foo() depends on A()
+    _assertProperDependencies(r'''
+const A a = const A.foo();
+class A {
+  const A.foo() : this();
+  const A();
+}''');
+  }
+
+  void test_dependencyOnOptionalParameterDefault() {
+    // a depends on A() depends on B()
+    _assertProperDependencies(r'''
+class A {
+  const A([x = const B()]) : b = x;
+  final B b;
+}
+class B {
+  const B();
+}
+const A a = const A();''');
+  }
+
+  void test_dependencyOnVariable() {
+    // x depends on y
+    _assertProperDependencies(r'''
+const x = y + 1;
+const y = 2;''');
+  }
+
+  void test_final_initialized_at_declaration() {
+    CompilationUnit compilationUnit = resolveSource('''
+class A {
+  final int i = 123;
+  const A();
+}
+
+const A a = const A();
+''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, 'a');
+    Map<String, DartObjectImpl> fields = _assertType(result, "A");
+    expect(fields, hasLength(1));
+    _assertIntField(fields, "i", 123);
+  }
+
+  void test_fromEnvironment_bool_default_false() {
+    expect(_assertValidBool(_check_fromEnvironment_bool(null, "false")), false);
+  }
+
+  void test_fromEnvironment_bool_default_overridden() {
+    expect(
+        _assertValidBool(_check_fromEnvironment_bool("false", "true")), false);
+  }
+
+  void test_fromEnvironment_bool_default_parseError() {
+    expect(_assertValidBool(_check_fromEnvironment_bool("parseError", "true")),
+        true);
+  }
+
+  void test_fromEnvironment_bool_default_true() {
+    expect(_assertValidBool(_check_fromEnvironment_bool(null, "true")), true);
+  }
+
+  void test_fromEnvironment_bool_false() {
+    expect(_assertValidBool(_check_fromEnvironment_bool("false", null)), false);
+  }
+
+  void test_fromEnvironment_bool_parseError() {
+    expect(_assertValidBool(_check_fromEnvironment_bool("parseError", null)),
+        false);
+  }
+
+  void test_fromEnvironment_bool_true() {
+    expect(_assertValidBool(_check_fromEnvironment_bool("true", null)), true);
+  }
+
+  void test_fromEnvironment_bool_undeclared() {
+    _assertValidUnknown(_check_fromEnvironment_bool(null, null));
+  }
+
+  void test_fromEnvironment_int_default_overridden() {
+    expect(_assertValidInt(_check_fromEnvironment_int("234", "123")), 234);
+  }
+
+  void test_fromEnvironment_int_default_parseError() {
+    expect(
+        _assertValidInt(_check_fromEnvironment_int("parseError", "123")), 123);
+  }
+
+  void test_fromEnvironment_int_default_undeclared() {
+    expect(_assertValidInt(_check_fromEnvironment_int(null, "123")), 123);
+  }
+
+  void test_fromEnvironment_int_ok() {
+    expect(_assertValidInt(_check_fromEnvironment_int("234", null)), 234);
+  }
+
+  void test_fromEnvironment_int_parseError() {
+    _assertValidNull(_check_fromEnvironment_int("parseError", null));
+  }
+
+  void test_fromEnvironment_int_parseError_nullDefault() {
+    _assertValidNull(_check_fromEnvironment_int("parseError", "null"));
+  }
+
+  void test_fromEnvironment_int_undeclared() {
+    _assertValidUnknown(_check_fromEnvironment_int(null, null));
+  }
+
+  void test_fromEnvironment_int_undeclared_nullDefault() {
+    _assertValidNull(_check_fromEnvironment_int(null, "null"));
+  }
+
+  void test_fromEnvironment_string_default_overridden() {
+    expect(_assertValidString(_check_fromEnvironment_string("abc", "'def'")),
+        "abc");
+  }
+
+  void test_fromEnvironment_string_default_undeclared() {
+    expect(_assertValidString(_check_fromEnvironment_string(null, "'def'")),
+        "def");
+  }
+
+  void test_fromEnvironment_string_empty() {
+    expect(_assertValidString(_check_fromEnvironment_string("", null)), "");
+  }
+
+  void test_fromEnvironment_string_ok() {
+    expect(
+        _assertValidString(_check_fromEnvironment_string("abc", null)), "abc");
+  }
+
+  void test_fromEnvironment_string_undeclared() {
+    _assertValidUnknown(_check_fromEnvironment_string(null, null));
+  }
+
+  void test_fromEnvironment_string_undeclared_nullDefault() {
+    _assertValidNull(_check_fromEnvironment_string(null, "null"));
+  }
+
+  void test_instanceCreationExpression_computedField() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A(4, 5);
+class A {
+  const A(int i, int j) : k = 2 * i + j;
+  final int k;
+}''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "foo");
+    Map<String, DartObjectImpl> fields = _assertType(result, "A");
+    expect(fields, hasLength(1));
+    _assertIntField(fields, "k", 13);
+  }
+
+  void
+      test_instanceCreationExpression_computedField_namedOptionalWithDefault() {
+    _checkInstanceCreationOptionalParams(false, true, true);
+  }
+
+  void
+      test_instanceCreationExpression_computedField_namedOptionalWithoutDefault() {
+    _checkInstanceCreationOptionalParams(false, true, false);
+  }
+
+  void
+      test_instanceCreationExpression_computedField_unnamedOptionalWithDefault() {
+    _checkInstanceCreationOptionalParams(false, false, true);
+  }
+
+  void
+      test_instanceCreationExpression_computedField_unnamedOptionalWithoutDefault() {
+    _checkInstanceCreationOptionalParams(false, false, false);
+  }
+
+  void test_instanceCreationExpression_computedField_usesConstConstructor() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A(3);
+class A {
+  const A(int i) : b = const B(4);
+  final int b;
+}
+class B {
+  const B(this.k);
+  final int k;
+}''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "foo");
+    Map<String, DartObjectImpl> fieldsOfA = _assertType(result, "A");
+    expect(fieldsOfA, hasLength(1));
+    Map<String, DartObjectImpl> fieldsOfB =
+        _assertFieldType(fieldsOfA, "b", "B");
+    expect(fieldsOfB, hasLength(1));
+    _assertIntField(fieldsOfB, "k", 4);
+  }
+
+  void test_instanceCreationExpression_computedField_usesStaticConst() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A(3);
+class A {
+  const A(int i) : k = i + B.bar;
+  final int k;
+}
+class B {
+  static const bar = 4;
+}''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "foo");
+    Map<String, DartObjectImpl> fields = _assertType(result, "A");
+    expect(fields, hasLength(1));
+    _assertIntField(fields, "k", 7);
+  }
+
+  void test_instanceCreationExpression_computedField_usesTopLevelConst() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A(3);
+const bar = 4;
+class A {
+  const A(int i) : k = i + bar;
+  final int k;
+}''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "foo");
+    Map<String, DartObjectImpl> fields = _assertType(result, "A");
+    expect(fields, hasLength(1));
+    _assertIntField(fields, "k", 7);
+  }
+
+  void test_instanceCreationExpression_explicitSuper() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const B(4, 5);
+class A {
+  const A(this.x);
+  final int x;
+}
+class B extends A {
+  const B(int x, this.y) : super(x * 2);
+  final int y;
+}''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "foo");
+    Map<String, DartObjectImpl> fields = _assertType(result, "B");
+    expect(fields, hasLength(2));
+    _assertIntField(fields, "y", 5);
+    Map<String, DartObjectImpl> superclassFields =
+        _assertFieldType(fields, GenericState.SUPERCLASS_FIELD, "A");
+    expect(superclassFields, hasLength(1));
+    _assertIntField(superclassFields, "x", 8);
+  }
+
+  void test_instanceCreationExpression_fieldFormalParameter() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A(42);
+class A {
+  int x;
+  const A(this.x)
+}''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "foo");
+    Map<String, DartObjectImpl> fields = _assertType(result, "A");
+    expect(fields, hasLength(1));
+    _assertIntField(fields, "x", 42);
+  }
+
+  void
+      test_instanceCreationExpression_fieldFormalParameter_namedOptionalWithDefault() {
+    _checkInstanceCreationOptionalParams(true, true, true);
+  }
+
+  void
+      test_instanceCreationExpression_fieldFormalParameter_namedOptionalWithoutDefault() {
+    _checkInstanceCreationOptionalParams(true, true, false);
+  }
+
+  void
+      test_instanceCreationExpression_fieldFormalParameter_unnamedOptionalWithDefault() {
+    _checkInstanceCreationOptionalParams(true, false, true);
+  }
+
+  void
+      test_instanceCreationExpression_fieldFormalParameter_unnamedOptionalWithoutDefault() {
+    _checkInstanceCreationOptionalParams(true, false, false);
+  }
+
+  void test_instanceCreationExpression_implicitSuper() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const B(4);
+class A {
+  const A() : x = 3;
+  final int x;
+}
+class B extends A {
+  const B(this.y);
+  final int y;
+}''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "foo");
+    Map<String, DartObjectImpl> fields = _assertType(result, "B");
+    expect(fields, hasLength(2));
+    _assertIntField(fields, "y", 4);
+    Map<String, DartObjectImpl> superclassFields =
+        _assertFieldType(fields, GenericState.SUPERCLASS_FIELD, "A");
+    expect(superclassFields, hasLength(1));
+    _assertIntField(superclassFields, "x", 3);
+  }
+
+  void test_instanceCreationExpression_nonFactoryRedirect() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A.a1();
+class A {
+  const A.a1() : this.a2();
+  const A.a2() : x = 5;
+  final int x;
+}''');
+    Map<String, DartObjectImpl> aFields =
+        _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
+    _assertIntField(aFields, 'x', 5);
+  }
+
+  void test_instanceCreationExpression_nonFactoryRedirect_arg() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A.a1(1);
+class A {
+  const A.a1(x) : this.a2(x + 100);
+  const A.a2(x) : y = x + 10;
+  final int y;
+}''');
+    Map<String, DartObjectImpl> aFields =
+        _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
+    _assertIntField(aFields, 'y', 111);
+  }
+
+  void test_instanceCreationExpression_nonFactoryRedirect_cycle() {
+    // It is an error to have a cycle in non-factory redirects; however, we
+    // need to make sure that even if the error occurs, attempting to evaluate
+    // the constant will terminate.
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A();
+class A {
+  const A() : this.b();
+  const A.b() : this();
+}''');
+    _assertValidUnknown(_evaluateTopLevelVariable(compilationUnit, "foo"));
+  }
+
+  void test_instanceCreationExpression_nonFactoryRedirect_defaultArg() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A.a1();
+class A {
+  const A.a1() : this.a2();
+  const A.a2([x = 100]) : y = x + 10;
+  final int y;
+}''');
+    Map<String, DartObjectImpl> aFields =
+        _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
+    _assertIntField(aFields, 'y', 110);
+  }
+
+  void test_instanceCreationExpression_nonFactoryRedirect_toMissing() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A.a1();
+class A {
+  const A.a1() : this.a2();
+}''');
+    // We don't care what value foo evaluates to (since there is a compile
+    // error), but we shouldn't crash, and we should figure
+    // out that it evaluates to an instance of class A.
+    _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
+  }
+
+  void test_instanceCreationExpression_nonFactoryRedirect_toNonConst() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A.a1();
+class A {
+  const A.a1() : this.a2();
+  A.a2();
+}''');
+    // We don't care what value foo evaluates to (since there is a compile
+    // error), but we shouldn't crash, and we should figure
+    // out that it evaluates to an instance of class A.
+    _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
+  }
+
+  void test_instanceCreationExpression_nonFactoryRedirect_unnamed() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A.a1();
+class A {
+  const A.a1() : this();
+  const A() : x = 5;
+  final int x;
+}''');
+    Map<String, DartObjectImpl> aFields =
+        _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "A");
+    _assertIntField(aFields, 'x', 5);
+  }
+
+  void test_instanceCreationExpression_redirect() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A();
+class A {
+  const factory A() = B;
+}
+class B implements A {
+  const B();
+}''');
+    _assertType(_evaluateTopLevelVariable(compilationUnit, "foo"), "B");
+  }
+
+  void test_instanceCreationExpression_redirect_cycle() {
+    // It is an error to have a cycle in factory redirects; however, we need
+    // to make sure that even if the error occurs, attempting to evaluate the
+    // constant will terminate.
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A();
+class A {
+  const factory A() = A.b;
+  const factory A.b() = A;
+}''');
+    _assertValidUnknown(_evaluateTopLevelVariable(compilationUnit, "foo"));
+  }
+
+  void test_instanceCreationExpression_redirect_external() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A();
+class A {
+  external const factory A();
+}''');
+    _assertValidUnknown(_evaluateTopLevelVariable(compilationUnit, "foo"));
+  }
+
+  void test_instanceCreationExpression_redirect_nonConst() {
+    // It is an error for a const factory constructor redirect to a non-const
+    // constructor; however, we need to make sure that even if the error
+    // attempting to evaluate the constant won't cause a crash.
+    CompilationUnit compilationUnit = resolveSource(r'''
+const foo = const A();
+class A {
+  const factory A() = A.b;
+  A.b();
+}''');
+    _assertValidUnknown(_evaluateTopLevelVariable(compilationUnit, "foo"));
+  }
+
+  void test_instanceCreationExpression_redirectWithTypeParams() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A {
+  const factory A(var a) = B<int>;
+}
+
+class B<T> implements A {
+  final T x;
+  const B(this.x);
+}
+
+const A a = const A(10);''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "a");
+    Map<String, DartObjectImpl> fields = _assertType(result, "B<int>");
+    expect(fields, hasLength(1));
+    _assertIntField(fields, "x", 10);
+  }
+
+  void test_instanceCreationExpression_redirectWithTypeSubstitution() {
+    // To evaluate the redirection of A<int>,
+    // A's template argument (T=int) must be substituted
+    // into B's template argument (B<U> where U=T) to get B<int>.
+    CompilationUnit compilationUnit = resolveSource(r'''
+class A<T> {
+  const factory A(var a) = B<T>;
+}
+
+class B<U> implements A {
+  final U x;
+  const B(this.x);
+}
+
+const A<int> a = const A<int>(10);''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, "a");
+    Map<String, DartObjectImpl> fields = _assertType(result, "B<int>");
+    expect(fields, hasLength(1));
+    _assertIntField(fields, "x", 10);
+  }
+
+  void test_instanceCreationExpression_symbol() {
+    CompilationUnit compilationUnit =
+        resolveSource("const foo = const Symbol('a');");
+    EvaluationResultImpl evaluationResult =
+        _evaluateTopLevelVariable(compilationUnit, "foo");
+    expect(evaluationResult.value, isNotNull);
+    DartObjectImpl value = evaluationResult.value;
+    expect(value.type, typeProvider.symbolType);
+    expect(value.toSymbolValue(), "a");
+  }
+
+  void test_instanceCreationExpression_withSupertypeParams_explicit() {
+    _checkInstanceCreation_withSupertypeParams(true);
+  }
+
+  void test_instanceCreationExpression_withSupertypeParams_implicit() {
+    _checkInstanceCreation_withSupertypeParams(false);
+  }
+
+  void test_instanceCreationExpression_withTypeParams() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+class C<E> {
+  const C();
+}
+const c_int = const C<int>();
+const c_num = const C<num>();''');
+    EvaluationResultImpl c_int =
+        _evaluateTopLevelVariable(compilationUnit, "c_int");
+    _assertType(c_int, "C<int>");
+    DartObjectImpl c_int_value = c_int.value;
+    EvaluationResultImpl c_num =
+        _evaluateTopLevelVariable(compilationUnit, "c_num");
+    _assertType(c_num, "C<num>");
+    DartObjectImpl c_num_value = c_num.value;
+    expect(c_int_value == c_num_value, isFalse);
+  }
+
+  void test_isValidSymbol() {
+    expect(ConstantEvaluationEngine.isValidPublicSymbol(""), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.bar"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo\$"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo\$bar"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("iff"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("gif"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("if\$"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("\$if"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo="), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.bar="), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.+"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("void"), isTrue);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("_foo"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("_foo.bar"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo._bar"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("if"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("if.foo"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.if"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo=.bar"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo."), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("+.foo"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("void.foo"), isFalse);
+    expect(ConstantEvaluationEngine.isValidPublicSymbol("foo.void"), isFalse);
+  }
+
+  void test_length_of_improperly_typed_string_expression() {
+    // Since type annotations are ignored in unchecked mode, the improper
+    // types on s1 and s2 shouldn't prevent us from evaluating i to
+    // 'alpha'.length.
+    CompilationUnit compilationUnit = resolveSource('''
+const int s1 = 'alpha';
+const int s2 = 'beta';
+const int i = (true ? s1 : s2).length;
+''');
+    ConstTopLevelVariableElementImpl element =
+        findTopLevelDeclaration(compilationUnit, 'i').element;
+    EvaluationResultImpl result = element.evaluationResult;
+    expect(_assertValidInt(result), 5);
+  }
+
+  void test_length_of_improperly_typed_string_identifier() {
+    // Since type annotations are ignored in unchecked mode, the improper type
+    // on s shouldn't prevent us from evaluating i to 'alpha'.length.
+    CompilationUnit compilationUnit = resolveSource('''
+const int s = 'alpha';
+const int i = s.length;
+''');
+    ConstTopLevelVariableElementImpl element =
+        findTopLevelDeclaration(compilationUnit, 'i').element;
+    EvaluationResultImpl result = element.evaluationResult;
+    expect(_assertValidInt(result), 5);
+  }
+
+  void test_non_static_const_initialized_at_declaration() {
+    // Even though non-static consts are not allowed by the language, we need
+    // to handle them for error recovery purposes.
+    CompilationUnit compilationUnit = resolveSource('''
+class A {
+  const int i = 123;
+  const A();
+}
+
+const A a = const A();
+''');
+    EvaluationResultImpl result =
+        _evaluateTopLevelVariable(compilationUnit, 'a');
+    Map<String, DartObjectImpl> fields = _assertType(result, "A");
+    expect(fields, hasLength(1));
+    _assertIntField(fields, "i", 123);
+  }
+
+  void test_symbolLiteral_void() {
+    CompilationUnit compilationUnit =
+        resolveSource("const voidSymbol = #void;");
+    VariableDeclaration voidSymbol =
+        findTopLevelDeclaration(compilationUnit, "voidSymbol");
+    EvaluationResultImpl voidSymbolResult =
+        (voidSymbol.element as VariableElementImpl).evaluationResult;
+    DartObjectImpl value = voidSymbolResult.value;
+    expect(value.type, typeProvider.symbolType);
+    expect(value.toSymbolValue(), "void");
+  }
+
+  Map<String, DartObjectImpl> _assertFieldType(
+      Map<String, DartObjectImpl> fields,
+      String fieldName,
+      String expectedType) {
+    DartObjectImpl field = fields[fieldName];
+    expect(field.type.displayName, expectedType);
+    return field.fields;
+  }
+
+  void _assertIntField(
+      Map<String, DartObjectImpl> fields, String fieldName, int expectedValue) {
+    DartObjectImpl field = fields[fieldName];
+    expect(field.type.name, "int");
+    expect(field.toIntValue(), expectedValue);
+  }
+
+  void _assertNullField(Map<String, DartObjectImpl> fields, String fieldName) {
+    DartObjectImpl field = fields[fieldName];
+    expect(field.isNull, isTrue);
+  }
+
+  void _assertProperDependencies(String sourceText,
+      [List<ErrorCode> expectedErrorCodes = ErrorCode.EMPTY_LIST]) {
+    Source source = addSource(sourceText);
+    LibraryElement element = resolve2(source);
+    CompilationUnit unit =
+        analysisContext.resolveCompilationUnit(source, element);
+    expect(unit, isNotNull);
+    ConstantValueComputer computer = _makeConstantValueComputer();
+    computer.add(unit, source, source);
+    computer.computeValues();
+    assertErrors(source, expectedErrorCodes);
+  }
+
+  Map<String, DartObjectImpl> _assertType(
+      EvaluationResultImpl result, String typeName) {
+    expect(result.value, isNotNull);
+    DartObjectImpl value = result.value;
+    expect(value.type.displayName, typeName);
+    return value.fields;
+  }
+
+  bool _assertValidBool(EvaluationResultImpl result) {
+    expect(result.value, isNotNull);
+    DartObjectImpl value = result.value;
+    expect(value.type, typeProvider.boolType);
+    bool boolValue = value.toBoolValue();
+    expect(boolValue, isNotNull);
+    return boolValue;
+  }
+
+  int _assertValidInt(EvaluationResultImpl result) {
+    expect(result, isNotNull);
+    expect(result.value, isNotNull);
+    DartObjectImpl value = result.value;
+    expect(value.type, typeProvider.intType);
+    return value.toIntValue();
+  }
+
+  void _assertValidNull(EvaluationResultImpl result) {
+    expect(result.value, isNotNull);
+    DartObjectImpl value = result.value;
+    expect(value.type, typeProvider.nullType);
+  }
+
+  String _assertValidString(EvaluationResultImpl result) {
+    expect(result.value, isNotNull);
+    DartObjectImpl value = result.value;
+    expect(value.type, typeProvider.stringType);
+    return value.toStringValue();
+  }
+
+  void _assertValidUnknown(EvaluationResultImpl result) {
+    expect(result.value, isNotNull);
+    DartObjectImpl value = result.value;
+    expect(value.isUnknown, isTrue);
+  }
+
+  EvaluationResultImpl _check_fromEnvironment_bool(
+      String valueInEnvironment, String defaultExpr) {
+    String envVarName = "x";
+    String varName = "foo";
+    if (valueInEnvironment != null) {
+      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
+    }
+    String defaultArg =
+        defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
+    CompilationUnit compilationUnit = resolveSource(
+        "const $varName = const bool.fromEnvironment('$envVarName'$defaultArg);");
+    return _evaluateTopLevelVariable(compilationUnit, varName);
+  }
+
+  EvaluationResultImpl _check_fromEnvironment_int(
+      String valueInEnvironment, String defaultExpr) {
+    String envVarName = "x";
+    String varName = "foo";
+    if (valueInEnvironment != null) {
+      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
+    }
+    String defaultArg =
+        defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
+    CompilationUnit compilationUnit = resolveSource(
+        "const $varName = const int.fromEnvironment('$envVarName'$defaultArg);");
+    return _evaluateTopLevelVariable(compilationUnit, varName);
+  }
+
+  EvaluationResultImpl _check_fromEnvironment_string(
+      String valueInEnvironment, String defaultExpr) {
+    String envVarName = "x";
+    String varName = "foo";
+    if (valueInEnvironment != null) {
+      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
+    }
+    String defaultArg =
+        defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
+    CompilationUnit compilationUnit = resolveSource(
+        "const $varName = const String.fromEnvironment('$envVarName'$defaultArg);");
+    return _evaluateTopLevelVariable(compilationUnit, varName);
+  }
+
+  void _checkInstanceCreation_withSupertypeParams(bool isExplicit) {
+    String superCall = isExplicit ? " : super()" : "";
+    CompilationUnit compilationUnit = resolveSource("""
+class A<T> {
+  const A();
+}
+class B<T, U> extends A<T> {
+  const B()$superCall;
+}
+class C<T, U> extends A<U> {
+  const C()$superCall;
+}
+const b_int_num = const B<int, num>();
+const c_int_num = const C<int, num>();""");
+    EvaluationResultImpl b_int_num =
+        _evaluateTopLevelVariable(compilationUnit, "b_int_num");
+    Map<String, DartObjectImpl> b_int_num_fields =
+        _assertType(b_int_num, "B<int, num>");
+    _assertFieldType(b_int_num_fields, GenericState.SUPERCLASS_FIELD, "A<int>");
+    EvaluationResultImpl c_int_num =
+        _evaluateTopLevelVariable(compilationUnit, "c_int_num");
+    Map<String, DartObjectImpl> c_int_num_fields =
+        _assertType(c_int_num, "C<int, num>");
+    _assertFieldType(c_int_num_fields, GenericState.SUPERCLASS_FIELD, "A<num>");
+  }
+
+  void _checkInstanceCreationOptionalParams(
+      bool isFieldFormal, bool isNamed, bool hasDefault) {
+    String fieldName = "j";
+    String paramName = isFieldFormal ? fieldName : "i";
+    String formalParam =
+        "${isFieldFormal ? "this." : "int "}$paramName${hasDefault ? " = 3" : ""}";
+    CompilationUnit compilationUnit = resolveSource("""
+const x = const A();
+const y = const A(${isNamed ? '$paramName: ' : ''}10);
+class A {
+  const A(${isNamed ? "{$formalParam}" : "[$formalParam]"})${isFieldFormal ? "" : " : $fieldName = $paramName"};
+  final int $fieldName;
+}""");
+    EvaluationResultImpl x = _evaluateTopLevelVariable(compilationUnit, "x");
+    Map<String, DartObjectImpl> fieldsOfX = _assertType(x, "A");
+    expect(fieldsOfX, hasLength(1));
+    if (hasDefault) {
+      _assertIntField(fieldsOfX, fieldName, 3);
+    } else {
+      _assertNullField(fieldsOfX, fieldName);
+    }
+    EvaluationResultImpl y = _evaluateTopLevelVariable(compilationUnit, "y");
+    Map<String, DartObjectImpl> fieldsOfY = _assertType(y, "A");
+    expect(fieldsOfY, hasLength(1));
+    _assertIntField(fieldsOfY, fieldName, 10);
+  }
+
+  /**
+   * Search [compilationUnit] for a class named [className], containing a
+   * method [methodName], with exactly one annotation.  Return the constant
+   * value of the annotation.
+   */
+  EvaluationResultImpl _evaluateAnnotation(
+      CompilationUnit compilationUnit, String className, String memberName) {
+    for (CompilationUnitMember member in compilationUnit.declarations) {
+      if (member is ClassDeclaration && member.name.name == className) {
+        for (ClassMember classMember in member.members) {
+          if (classMember is MethodDeclaration &&
+              classMember.name.name == memberName) {
+            expect(classMember.metadata, hasLength(1));
+            ElementAnnotationImpl elementAnnotation =
+                classMember.metadata[0].elementAnnotation;
+            return elementAnnotation.evaluationResult;
+          }
+        }
+      }
+    }
+    fail('Class member not found');
+    return null;
+  }
+
+  EvaluationResultImpl _evaluateTopLevelVariable(
+      CompilationUnit compilationUnit, String name) {
+    VariableDeclaration varDecl =
+        findTopLevelDeclaration(compilationUnit, name);
+    ConstTopLevelVariableElementImpl varElement = varDecl.element;
+    return varElement.evaluationResult;
+  }
+
+  ConstantValueComputer _makeConstantValueComputer() {
+    ConstantEvaluationValidator_ForTest validator =
+        new ConstantEvaluationValidator_ForTest(analysisContext2);
+    validator.computer = new ConstantValueComputer(
+        analysisContext2,
+        analysisContext2.typeProvider,
+        analysisContext2.declaredVariables,
+        validator,
+        analysisContext2.typeSystem);
+    return validator.computer;
+  }
+
+  void _validate(bool shouldBeValid, VariableDeclarationList declarationList) {
+    for (VariableDeclaration declaration in declarationList.variables) {
+      VariableElementImpl element = declaration.element as VariableElementImpl;
+      expect(element, isNotNull);
+      EvaluationResultImpl result = element.evaluationResult;
+      if (shouldBeValid) {
+        expect(result.value, isNotNull);
+      } else {
+        expect(result.value, isNull);
+      }
+    }
+  }
+}
+
+@reflectiveTest
+class ConstantVisitorTest extends ResolverTestCase {
+  void test_visitBinaryExpression_questionQuestion_notNull_notNull() {
+    Expression left = AstFactory.string2('a');
+    Expression right = AstFactory.string2('b');
+    Expression expression =
+        AstFactory.binaryExpression(left, TokenType.QUESTION_QUESTION, right);
+
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    DartObjectImpl result = _evaluate(expression, errorReporter);
+    expect(result, isNotNull);
+    expect(result.isNull, isFalse);
+    expect(result.toStringValue(), 'a');
+    errorListener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_questionQuestion_null_notNull() {
+    Expression left = AstFactory.nullLiteral();
+    Expression right = AstFactory.string2('b');
+    Expression expression =
+        AstFactory.binaryExpression(left, TokenType.QUESTION_QUESTION, right);
+
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    DartObjectImpl result = _evaluate(expression, errorReporter);
+    expect(result, isNotNull);
+    expect(result.isNull, isFalse);
+    expect(result.toStringValue(), 'b');
+    errorListener.assertNoErrors();
+  }
+
+  void test_visitBinaryExpression_questionQuestion_null_null() {
+    Expression left = AstFactory.nullLiteral();
+    Expression right = AstFactory.nullLiteral();
+    Expression expression =
+        AstFactory.binaryExpression(left, TokenType.QUESTION_QUESTION, right);
+
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    DartObjectImpl result = _evaluate(expression, errorReporter);
+    expect(result, isNotNull);
+    expect(result.isNull, isTrue);
+    errorListener.assertNoErrors();
+  }
+
+  void test_visitConditionalExpression_false() {
+    Expression thenExpression = AstFactory.integer(1);
+    Expression elseExpression = AstFactory.integer(0);
+    ConditionalExpression expression = AstFactory.conditionalExpression(
+        AstFactory.booleanLiteral(false), thenExpression, elseExpression);
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    _assertValue(0, _evaluate(expression, errorReporter));
+    errorListener.assertNoErrors();
+  }
+
+  void test_visitConditionalExpression_nonBooleanCondition() {
+    Expression thenExpression = AstFactory.integer(1);
+    Expression elseExpression = AstFactory.integer(0);
+    NullLiteral conditionExpression = AstFactory.nullLiteral();
+    ConditionalExpression expression = AstFactory.conditionalExpression(
+        conditionExpression, thenExpression, elseExpression);
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    DartObjectImpl result = _evaluate(expression, errorReporter);
+    expect(result, isNull);
+    errorListener
+        .assertErrorsWithCodes([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL]);
+  }
+
+  void test_visitConditionalExpression_nonConstantElse() {
+    Expression thenExpression = AstFactory.integer(1);
+    Expression elseExpression = AstFactory.identifier3("x");
+    ConditionalExpression expression = AstFactory.conditionalExpression(
+        AstFactory.booleanLiteral(true), thenExpression, elseExpression);
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    DartObjectImpl result = _evaluate(expression, errorReporter);
+    expect(result, isNull);
+    errorListener
+        .assertErrorsWithCodes([CompileTimeErrorCode.INVALID_CONSTANT]);
+  }
+
+  void test_visitConditionalExpression_nonConstantThen() {
+    Expression thenExpression = AstFactory.identifier3("x");
+    Expression elseExpression = AstFactory.integer(0);
+    ConditionalExpression expression = AstFactory.conditionalExpression(
+        AstFactory.booleanLiteral(true), thenExpression, elseExpression);
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    DartObjectImpl result = _evaluate(expression, errorReporter);
+    expect(result, isNull);
+    errorListener
+        .assertErrorsWithCodes([CompileTimeErrorCode.INVALID_CONSTANT]);
+  }
+
+  void test_visitConditionalExpression_true() {
+    Expression thenExpression = AstFactory.integer(1);
+    Expression elseExpression = AstFactory.integer(0);
+    ConditionalExpression expression = AstFactory.conditionalExpression(
+        AstFactory.booleanLiteral(true), thenExpression, elseExpression);
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    _assertValue(1, _evaluate(expression, errorReporter));
+    errorListener.assertNoErrors();
+  }
+
+  void test_visitSimpleIdentifier_className() {
+    CompilationUnit compilationUnit = resolveSource('''
+const a = C;
+class C {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'a', null);
+    expect(result.type, typeProvider.typeType);
+    expect(result.toTypeValue().name, 'C');
+  }
+
+  void test_visitSimpleIdentifier_dynamic() {
+    CompilationUnit compilationUnit = resolveSource('''
+const a = dynamic;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'a', null);
+    expect(result.type, typeProvider.typeType);
+    expect(result.toTypeValue(), typeProvider.dynamicType);
+  }
+
+  void test_visitSimpleIdentifier_inEnvironment() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const a = b;
+const b = 3;''');
+    Map<String, DartObjectImpl> environment = new Map<String, DartObjectImpl>();
+    DartObjectImpl six =
+        new DartObjectImpl(typeProvider.intType, new IntState(6));
+    environment["b"] = six;
+    _assertValue(6, _evaluateConstant(compilationUnit, "a", environment));
+  }
+
+  void test_visitSimpleIdentifier_notInEnvironment() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const a = b;
+const b = 3;''');
+    Map<String, DartObjectImpl> environment = new Map<String, DartObjectImpl>();
+    DartObjectImpl six =
+        new DartObjectImpl(typeProvider.intType, new IntState(6));
+    environment["c"] = six;
+    _assertValue(3, _evaluateConstant(compilationUnit, "a", environment));
+  }
+
+  void test_visitSimpleIdentifier_withoutEnvironment() {
+    CompilationUnit compilationUnit = resolveSource(r'''
+const a = b;
+const b = 3;''');
+    _assertValue(3, _evaluateConstant(compilationUnit, "a", null));
+  }
+
+  void _assertValue(int expectedValue, DartObjectImpl result) {
+    expect(result, isNotNull);
+    expect(result.type.name, "int");
+    expect(result.toIntValue(), expectedValue);
+  }
+
+  NonExistingSource _dummySource() {
+    String path = '/test.dart';
+    return new NonExistingSource(path, toUri(path), UriKind.FILE_URI);
+  }
+
+  DartObjectImpl _evaluate(Expression expression, ErrorReporter errorReporter) {
+    return expression.accept(new ConstantVisitor(
+        new ConstantEvaluationEngine(
+            new TestTypeProvider(), new DeclaredVariables(),
+            typeSystem: new TypeSystemImpl()),
+        errorReporter));
+  }
+
+  DartObjectImpl _evaluateConstant(CompilationUnit compilationUnit, String name,
+      Map<String, DartObjectImpl> lexicalEnvironment) {
+    Source source = compilationUnit.element.source;
+    Expression expression =
+        findTopLevelConstantExpression(compilationUnit, name);
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
+    DartObjectImpl result = expression.accept(new ConstantVisitor(
+        new ConstantEvaluationEngine(typeProvider, new DeclaredVariables(),
+            typeSystem: typeSystem),
+        errorReporter,
+        lexicalEnvironment: lexicalEnvironment));
+    errorListener.assertNoErrors();
+    return result;
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/constant/test_all.dart b/pkg/analyzer/test/src/dart/constant/test_all.dart
new file mode 100644
index 0000000..a6eb5b6
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/constant/test_all.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.src.dart.constant.test_all;
+
+import 'package:unittest/unittest.dart';
+
+import '../../../utils.dart';
+import 'evaluation_test.dart' as evaluation;
+import 'utilities_test.dart' as utilities;
+import 'value_test.dart' as value;
+
+/// Utility for manually running all tests.
+main() {
+  initializeTestEnvironment();
+  group('constant tests', () {
+    evaluation.main();
+    utilities.main();
+    value.main();
+  });
+}
diff --git a/pkg/analyzer/test/src/dart/constant/utilities_test.dart b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
new file mode 100644
index 0000000..a922cf5
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
@@ -0,0 +1,354 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.src.dart.constant.utilities_test;
+
+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/ast/token.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_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/generated/utilities_collection.dart';
+import 'package:analyzer/src/task/dart.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../../generated/engine_test.dart';
+import '../../../generated/test_support.dart';
+import '../../../reflective_tests.dart';
+import '../../../utils.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(ConstantFinderTest);
+  runReflectiveTests(ReferenceFinderTest);
+}
+
+@reflectiveTest
+class ConstantFinderTest {
+  AstNode _node;
+  TypeProvider _typeProvider;
+  AnalysisContext _context;
+  Source _source;
+
+  void setUp() {
+    _typeProvider = new TestTypeProvider();
+    _context = new _TestAnalysisContext();
+    _source = new TestSource();
+  }
+
+  /**
+   * Test an annotation that consists solely of an identifier (and hence
+   * represents a reference to a compile-time constant variable).
+   */
+  void test_visitAnnotation_constantVariable() {
+    CompilationUnitElement compilationUnitElement =
+        ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
+    ElementFactory.library(_context, 'L').definingCompilationUnit =
+        compilationUnitElement;
+    ElementAnnotationImpl elementAnnotation =
+        new ElementAnnotationImpl(compilationUnitElement);
+    _node = elementAnnotation.annotationAst = AstFactory.annotation(
+        AstFactory.identifier3('x'))..elementAnnotation = elementAnnotation;
+    expect(_findAnnotations(), contains(_node));
+  }
+
+  /**
+   * Test an annotation that represents the invocation of a constant
+   * constructor.
+   */
+  void test_visitAnnotation_invocation() {
+    CompilationUnitElement compilationUnitElement =
+        ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
+    ElementFactory.library(_context, 'L').definingCompilationUnit =
+        compilationUnitElement;
+    ElementAnnotationImpl elementAnnotation =
+        new ElementAnnotationImpl(compilationUnitElement);
+    _node = elementAnnotation.annotationAst = AstFactory.annotation2(
+        AstFactory.identifier3('A'), null, AstFactory.argumentList())
+      ..elementAnnotation = elementAnnotation;
+    expect(_findAnnotations(), contains(_node));
+  }
+
+  void test_visitAnnotation_partOf() {
+    // Analyzer ignores annotations on "part of" directives.
+    Annotation annotation = AstFactory.annotation2(
+        AstFactory.identifier3('A'), null, AstFactory.argumentList());
+    _node = AstFactory.partOfDirective2(
+        <Annotation>[annotation], AstFactory.libraryIdentifier2(<String>['L']));
+    expect(_findConstants(), isEmpty);
+  }
+
+  void test_visitConstructorDeclaration_const() {
+    ConstructorElement element = _setupConstructorDeclaration("A", true);
+    expect(_findConstants(), contains(element));
+  }
+
+  void test_visitConstructorDeclaration_nonConst() {
+    _setupConstructorDeclaration("A", false);
+    expect(_findConstants(), isEmpty);
+  }
+
+  void test_visitVariableDeclaration_const() {
+    VariableElement element = _setupVariableDeclaration("v", true, true);
+    expect(_findConstants(), contains(element));
+  }
+
+  void test_visitVariableDeclaration_final_inClass() {
+    _setupFieldDeclaration('C', 'f', Keyword.FINAL);
+    expect(_findConstants(), isEmpty);
+  }
+
+  void test_visitVariableDeclaration_final_inClassWithConstConstructor() {
+    VariableDeclaration field = _setupFieldDeclaration('C', 'f', Keyword.FINAL,
+        hasConstConstructor: true);
+    expect(_findConstants(), contains(field.element));
+  }
+
+  void test_visitVariableDeclaration_final_outsideClass() {
+    _setupVariableDeclaration('v', false, true, isFinal: true);
+    expect(_findConstants(), isEmpty);
+  }
+
+  void test_visitVariableDeclaration_noInitializer() {
+    _setupVariableDeclaration("v", true, false);
+    expect(_findConstants(), isEmpty);
+  }
+
+  void test_visitVariableDeclaration_nonConst() {
+    _setupVariableDeclaration("v", false, true);
+    expect(_findConstants(), isEmpty);
+  }
+
+  void test_visitVariableDeclaration_static_const_inClass() {
+    VariableDeclaration field =
+        _setupFieldDeclaration('C', 'f', Keyword.CONST, isStatic: true);
+    expect(_findConstants(), contains(field.element));
+  }
+
+  void
+      test_visitVariableDeclaration_static_const_inClassWithConstConstructor() {
+    VariableDeclaration field = _setupFieldDeclaration('C', 'f', Keyword.CONST,
+        isStatic: true, hasConstConstructor: true);
+    expect(_findConstants(), contains(field.element));
+  }
+
+  void
+      test_visitVariableDeclaration_static_final_inClassWithConstConstructor() {
+    VariableDeclaration field = _setupFieldDeclaration('C', 'f', Keyword.FINAL,
+        isStatic: true, hasConstConstructor: true);
+    expect(_findConstants(), isNot(contains(field.element)));
+  }
+
+  void
+      test_visitVariableDeclaration_uninitialized_final_inClassWithConstConstructor() {
+    VariableDeclaration field = _setupFieldDeclaration('C', 'f', Keyword.FINAL,
+        isInitialized: false, hasConstConstructor: true);
+    expect(_findConstants(), isNot(contains(field.element)));
+  }
+
+  void test_visitVariableDeclaration_uninitialized_static_const_inClass() {
+    _setupFieldDeclaration('C', 'f', Keyword.CONST,
+        isStatic: true, isInitialized: false);
+    expect(_findConstants(), isEmpty);
+  }
+
+  List<Annotation> _findAnnotations() {
+    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);
+      }
+    }
+    return new List<Annotation>.from(annotations);
+  }
+
+  List<ConstantEvaluationTarget> _findConstants() {
+    ConstantFinder finder = new ConstantFinder(_context, _source, _source);
+    _node.accept(finder);
+    List<ConstantEvaluationTarget> constants = finder.constantsToCompute;
+    expect(constants, isNotNull);
+    return constants;
+  }
+
+  ConstructorElement _setupConstructorDeclaration(String name, bool isConst) {
+    Keyword constKeyword = isConst ? Keyword.CONST : null;
+    ConstructorDeclaration constructorDeclaration =
+        AstFactory.constructorDeclaration2(
+            constKeyword,
+            null,
+            null,
+            name,
+            AstFactory.formalParameterList(),
+            null,
+            AstFactory.blockFunctionBody2());
+    ClassElement classElement = ElementFactory.classElement2(name);
+    ConstructorElement element =
+        ElementFactory.constructorElement(classElement, name, isConst);
+    constructorDeclaration.element = element;
+    _node = constructorDeclaration;
+    return element;
+  }
+
+  VariableDeclaration _setupFieldDeclaration(
+      String className, String fieldName, Keyword keyword,
+      {bool isInitialized: true,
+      bool isStatic: false,
+      bool hasConstConstructor: false}) {
+    VariableDeclaration variableDeclaration = isInitialized
+        ? AstFactory.variableDeclaration2(fieldName, AstFactory.integer(0))
+        : AstFactory.variableDeclaration(fieldName);
+    VariableElement fieldElement = ElementFactory.fieldElement(
+        fieldName,
+        isStatic,
+        keyword == Keyword.FINAL,
+        keyword == Keyword.CONST,
+        _typeProvider.intType);
+    variableDeclaration.name.staticElement = fieldElement;
+    FieldDeclaration fieldDeclaration = AstFactory.fieldDeclaration2(
+        isStatic, keyword, <VariableDeclaration>[variableDeclaration]);
+    ClassDeclaration classDeclaration =
+        AstFactory.classDeclaration(null, className, null, null, null, null);
+    classDeclaration.members.add(fieldDeclaration);
+    _node = classDeclaration;
+    ClassElementImpl classElement = ElementFactory.classElement2(className);
+    classElement.fields = <FieldElement>[fieldElement];
+    classDeclaration.name.staticElement = classElement;
+    if (hasConstConstructor) {
+      ConstructorDeclaration constructorDeclaration =
+          AstFactory.constructorDeclaration2(
+              Keyword.CONST,
+              null,
+              AstFactory.identifier3(className),
+              null,
+              AstFactory.formalParameterList(),
+              null,
+              AstFactory.blockFunctionBody2());
+      classDeclaration.members.add(constructorDeclaration);
+      ConstructorElement constructorElement =
+          ElementFactory.constructorElement(classElement, '', true);
+      constructorDeclaration.element = constructorElement;
+      classElement.constructors = <ConstructorElement>[constructorElement];
+    } else {
+      classElement.constructors = ConstructorElement.EMPTY_LIST;
+    }
+    return variableDeclaration;
+  }
+
+  VariableElement _setupVariableDeclaration(
+      String name, bool isConst, bool isInitialized,
+      {isFinal: false}) {
+    VariableDeclaration variableDeclaration = isInitialized
+        ? AstFactory.variableDeclaration2(name, AstFactory.integer(0))
+        : AstFactory.variableDeclaration(name);
+    SimpleIdentifier identifier = variableDeclaration.name;
+    VariableElement element = ElementFactory.localVariableElement(identifier);
+    identifier.staticElement = element;
+    Keyword keyword = isConst ? Keyword.CONST : isFinal ? Keyword.FINAL : null;
+    AstFactory.variableDeclarationList2(keyword, [variableDeclaration]);
+    _node = variableDeclaration;
+    return element;
+  }
+}
+
+@reflectiveTest
+class ReferenceFinderTest {
+  DirectedGraph<ConstantEvaluationTarget> _referenceGraph;
+  VariableElement _head;
+  Element _tail;
+
+  void setUp() {
+    _referenceGraph = new DirectedGraph<ConstantEvaluationTarget>();
+    _head = ElementFactory.topLevelVariableElement2("v1");
+  }
+
+  void test_visitSimpleIdentifier_const() {
+    _visitNode(_makeTailVariable("v2", true));
+    _assertOneArc(_tail);
+  }
+
+  void test_visitSuperConstructorInvocation_const() {
+    _visitNode(_makeTailSuperConstructorInvocation("A", true));
+    _assertOneArc(_tail);
+  }
+
+  void test_visitSuperConstructorInvocation_nonConst() {
+    _visitNode(_makeTailSuperConstructorInvocation("A", false));
+    _assertOneArc(_tail);
+  }
+
+  void test_visitSuperConstructorInvocation_unresolved() {
+    SuperConstructorInvocation superConstructorInvocation =
+        AstFactory.superConstructorInvocation();
+    _visitNode(superConstructorInvocation);
+    _assertNoArcs();
+  }
+
+  void _assertNoArcs() {
+    Set<ConstantEvaluationTarget> tails = _referenceGraph.getTails(_head);
+    expect(tails, hasLength(0));
+  }
+
+  void _assertOneArc(Element tail) {
+    Set<ConstantEvaluationTarget> tails = _referenceGraph.getTails(_head);
+    expect(tails, hasLength(1));
+    expect(tails.first, same(tail));
+  }
+
+  ReferenceFinder _createReferenceFinder(ConstantEvaluationTarget source) =>
+      new ReferenceFinder((ConstantEvaluationTarget dependency) {
+        _referenceGraph.addEdge(source, dependency);
+      });
+  SuperConstructorInvocation _makeTailSuperConstructorInvocation(
+      String name, bool isConst) {
+    List<ConstructorInitializer> initializers =
+        new List<ConstructorInitializer>();
+    ConstructorDeclaration constructorDeclaration =
+        AstFactory.constructorDeclaration(AstFactory.identifier3(name), null,
+            AstFactory.formalParameterList(), initializers);
+    if (isConst) {
+      constructorDeclaration.constKeyword = new KeywordToken(Keyword.CONST, 0);
+    }
+    ClassElementImpl classElement = ElementFactory.classElement2(name);
+    SuperConstructorInvocation superConstructorInvocation =
+        AstFactory.superConstructorInvocation();
+    ConstructorElementImpl constructorElement =
+        ElementFactory.constructorElement(classElement, name, isConst);
+    _tail = constructorElement;
+    superConstructorInvocation.staticElement = constructorElement;
+    return superConstructorInvocation;
+  }
+
+  SimpleIdentifier _makeTailVariable(String name, bool isConst) {
+    VariableDeclaration variableDeclaration =
+        AstFactory.variableDeclaration(name);
+    ConstLocalVariableElementImpl variableElement =
+        ElementFactory.constLocalVariableElement(name);
+    _tail = variableElement;
+    variableElement.const3 = isConst;
+    AstFactory.variableDeclarationList2(
+        isConst ? Keyword.CONST : Keyword.VAR, [variableDeclaration]);
+    SimpleIdentifier identifier = AstFactory.identifier3(name);
+    identifier.staticElement = variableElement;
+    return identifier;
+  }
+
+  void _visitNode(AstNode node) {
+    node.accept(_createReferenceFinder(_head));
+  }
+}
+
+class _TestAnalysisContext extends TestAnalysisContext {
+  @override
+  InternalAnalysisContext getContextFor(Source source) => this;
+}
diff --git a/pkg/analyzer/test/src/dart/constant/value_test.dart b/pkg/analyzer/test/src/dart/constant/value_test.dart
new file mode 100644
index 0000000..0904904
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/constant/value_test.dart
@@ -0,0 +1,2029 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.src.dart.constant.value_test;
+
+import 'package:analyzer/src/generated/constant.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/testing/test_type_provider.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../../generated/test_support.dart';
+import '../../../reflective_tests.dart';
+import '../../../utils.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(DartObjectImplTest);
+}
+
+const int LONG_MAX_VALUE = 0x7fffffffffffffff;
+
+@reflectiveTest
+class DartObjectImplTest extends EngineTestCase {
+  TypeProvider _typeProvider = new TestTypeProvider();
+
+  void test_add_knownDouble_knownDouble() {
+    _assertAdd(_doubleValue(3.0), _doubleValue(1.0), _doubleValue(2.0));
+  }
+
+  void test_add_knownDouble_knownInt() {
+    _assertAdd(_doubleValue(3.0), _doubleValue(1.0), _intValue(2));
+  }
+
+  void test_add_knownDouble_unknownDouble() {
+    _assertAdd(_doubleValue(null), _doubleValue(1.0), _doubleValue(null));
+  }
+
+  void test_add_knownDouble_unknownInt() {
+    _assertAdd(_doubleValue(null), _doubleValue(1.0), _intValue(null));
+  }
+
+  void test_add_knownInt_knownInt() {
+    _assertAdd(_intValue(3), _intValue(1), _intValue(2));
+  }
+
+  void test_add_knownInt_knownString() {
+    _assertAdd(null, _intValue(1), _stringValue("2"));
+  }
+
+  void test_add_knownInt_unknownDouble() {
+    _assertAdd(_doubleValue(null), _intValue(1), _doubleValue(null));
+  }
+
+  void test_add_knownInt_unknownInt() {
+    _assertAdd(_intValue(null), _intValue(1), _intValue(null));
+  }
+
+  void test_add_knownString_knownInt() {
+    _assertAdd(null, _stringValue("1"), _intValue(2));
+  }
+
+  void test_add_knownString_knownString() {
+    _assertAdd(_stringValue("ab"), _stringValue("a"), _stringValue("b"));
+  }
+
+  void test_add_knownString_unknownString() {
+    _assertAdd(_stringValue(null), _stringValue("a"), _stringValue(null));
+  }
+
+  void test_add_unknownDouble_knownDouble() {
+    _assertAdd(_doubleValue(null), _doubleValue(null), _doubleValue(2.0));
+  }
+
+  void test_add_unknownDouble_knownInt() {
+    _assertAdd(_doubleValue(null), _doubleValue(null), _intValue(2));
+  }
+
+  void test_add_unknownInt_knownDouble() {
+    _assertAdd(_doubleValue(null), _intValue(null), _doubleValue(2.0));
+  }
+
+  void test_add_unknownInt_knownInt() {
+    _assertAdd(_intValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_add_unknownString_knownString() {
+    _assertAdd(_stringValue(null), _stringValue(null), _stringValue("b"));
+  }
+
+  void test_add_unknownString_unknownString() {
+    _assertAdd(_stringValue(null), _stringValue(null), _stringValue(null));
+  }
+
+  void test_bitAnd_knownInt_knownInt() {
+    _assertBitAnd(_intValue(2), _intValue(6), _intValue(3));
+  }
+
+  void test_bitAnd_knownInt_knownString() {
+    _assertBitAnd(null, _intValue(6), _stringValue("3"));
+  }
+
+  void test_bitAnd_knownInt_unknownInt() {
+    _assertBitAnd(_intValue(null), _intValue(6), _intValue(null));
+  }
+
+  void test_bitAnd_knownString_knownInt() {
+    _assertBitAnd(null, _stringValue("6"), _intValue(3));
+  }
+
+  void test_bitAnd_unknownInt_knownInt() {
+    _assertBitAnd(_intValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_bitAnd_unknownInt_unknownInt() {
+    _assertBitAnd(_intValue(null), _intValue(null), _intValue(null));
+  }
+
+  void test_bitNot_knownInt() {
+    _assertBitNot(_intValue(-4), _intValue(3));
+  }
+
+  void test_bitNot_knownString() {
+    _assertBitNot(null, _stringValue("6"));
+  }
+
+  void test_bitNot_unknownInt() {
+    _assertBitNot(_intValue(null), _intValue(null));
+  }
+
+  void test_bitOr_knownInt_knownInt() {
+    _assertBitOr(_intValue(7), _intValue(6), _intValue(3));
+  }
+
+  void test_bitOr_knownInt_knownString() {
+    _assertBitOr(null, _intValue(6), _stringValue("3"));
+  }
+
+  void test_bitOr_knownInt_unknownInt() {
+    _assertBitOr(_intValue(null), _intValue(6), _intValue(null));
+  }
+
+  void test_bitOr_knownString_knownInt() {
+    _assertBitOr(null, _stringValue("6"), _intValue(3));
+  }
+
+  void test_bitOr_unknownInt_knownInt() {
+    _assertBitOr(_intValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_bitOr_unknownInt_unknownInt() {
+    _assertBitOr(_intValue(null), _intValue(null), _intValue(null));
+  }
+
+  void test_bitXor_knownInt_knownInt() {
+    _assertBitXor(_intValue(5), _intValue(6), _intValue(3));
+  }
+
+  void test_bitXor_knownInt_knownString() {
+    _assertBitXor(null, _intValue(6), _stringValue("3"));
+  }
+
+  void test_bitXor_knownInt_unknownInt() {
+    _assertBitXor(_intValue(null), _intValue(6), _intValue(null));
+  }
+
+  void test_bitXor_knownString_knownInt() {
+    _assertBitXor(null, _stringValue("6"), _intValue(3));
+  }
+
+  void test_bitXor_unknownInt_knownInt() {
+    _assertBitXor(_intValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_bitXor_unknownInt_unknownInt() {
+    _assertBitXor(_intValue(null), _intValue(null), _intValue(null));
+  }
+
+  void test_concatenate_knownInt_knownString() {
+    _assertConcatenate(null, _intValue(2), _stringValue("def"));
+  }
+
+  void test_concatenate_knownString_knownInt() {
+    _assertConcatenate(null, _stringValue("abc"), _intValue(3));
+  }
+
+  void test_concatenate_knownString_knownString() {
+    _assertConcatenate(
+        _stringValue("abcdef"), _stringValue("abc"), _stringValue("def"));
+  }
+
+  void test_concatenate_knownString_unknownString() {
+    _assertConcatenate(
+        _stringValue(null), _stringValue("abc"), _stringValue(null));
+  }
+
+  void test_concatenate_unknownString_knownString() {
+    _assertConcatenate(
+        _stringValue(null), _stringValue(null), _stringValue("def"));
+  }
+
+  void test_divide_knownDouble_knownDouble() {
+    _assertDivide(_doubleValue(3.0), _doubleValue(6.0), _doubleValue(2.0));
+  }
+
+  void test_divide_knownDouble_knownInt() {
+    _assertDivide(_doubleValue(3.0), _doubleValue(6.0), _intValue(2));
+  }
+
+  void test_divide_knownDouble_unknownDouble() {
+    _assertDivide(_doubleValue(null), _doubleValue(6.0), _doubleValue(null));
+  }
+
+  void test_divide_knownDouble_unknownInt() {
+    _assertDivide(_doubleValue(null), _doubleValue(6.0), _intValue(null));
+  }
+
+  void test_divide_knownInt_knownInt() {
+    _assertDivide(_doubleValue(3.0), _intValue(6), _intValue(2));
+  }
+
+  void test_divide_knownInt_knownString() {
+    _assertDivide(null, _intValue(6), _stringValue("2"));
+  }
+
+  void test_divide_knownInt_unknownDouble() {
+    _assertDivide(_doubleValue(null), _intValue(6), _doubleValue(null));
+  }
+
+  void test_divide_knownInt_unknownInt() {
+    _assertDivide(_doubleValue(null), _intValue(6), _intValue(null));
+  }
+
+  void test_divide_knownString_knownInt() {
+    _assertDivide(null, _stringValue("6"), _intValue(2));
+  }
+
+  void test_divide_unknownDouble_knownDouble() {
+    _assertDivide(_doubleValue(null), _doubleValue(null), _doubleValue(2.0));
+  }
+
+  void test_divide_unknownDouble_knownInt() {
+    _assertDivide(_doubleValue(null), _doubleValue(null), _intValue(2));
+  }
+
+  void test_divide_unknownInt_knownDouble() {
+    _assertDivide(_doubleValue(null), _intValue(null), _doubleValue(2.0));
+  }
+
+  void test_divide_unknownInt_knownInt() {
+    _assertDivide(_doubleValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_equalEqual_bool_false() {
+    _assertEqualEqual(_boolValue(false), _boolValue(false), _boolValue(true));
+  }
+
+  void test_equalEqual_bool_true() {
+    _assertEqualEqual(_boolValue(true), _boolValue(true), _boolValue(true));
+  }
+
+  void test_equalEqual_bool_unknown() {
+    _assertEqualEqual(_boolValue(null), _boolValue(null), _boolValue(false));
+  }
+
+  void test_equalEqual_double_false() {
+    _assertEqualEqual(_boolValue(false), _doubleValue(2.0), _doubleValue(4.0));
+  }
+
+  void test_equalEqual_double_true() {
+    _assertEqualEqual(_boolValue(true), _doubleValue(2.0), _doubleValue(2.0));
+  }
+
+  void test_equalEqual_double_unknown() {
+    _assertEqualEqual(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
+  }
+
+  void test_equalEqual_int_false() {
+    _assertEqualEqual(_boolValue(false), _intValue(-5), _intValue(5));
+  }
+
+  void test_equalEqual_int_true() {
+    _assertEqualEqual(_boolValue(true), _intValue(5), _intValue(5));
+  }
+
+  void test_equalEqual_int_unknown() {
+    _assertEqualEqual(_boolValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_equalEqual_list_empty() {
+    _assertEqualEqual(null, _listValue(), _listValue());
+  }
+
+  void test_equalEqual_list_false() {
+    _assertEqualEqual(null, _listValue(), _listValue());
+  }
+
+  void test_equalEqual_map_empty() {
+    _assertEqualEqual(null, _mapValue(), _mapValue());
+  }
+
+  void test_equalEqual_map_false() {
+    _assertEqualEqual(null, _mapValue(), _mapValue());
+  }
+
+  void test_equalEqual_null() {
+    _assertEqualEqual(_boolValue(true), _nullValue(), _nullValue());
+  }
+
+  void test_equalEqual_string_false() {
+    _assertEqualEqual(
+        _boolValue(false), _stringValue("abc"), _stringValue("def"));
+  }
+
+  void test_equalEqual_string_true() {
+    _assertEqualEqual(
+        _boolValue(true), _stringValue("abc"), _stringValue("abc"));
+  }
+
+  void test_equalEqual_string_unknown() {
+    _assertEqualEqual(
+        _boolValue(null), _stringValue(null), _stringValue("def"));
+  }
+
+  void test_equals_list_false_differentSizes() {
+    expect(
+        _listValue([_boolValue(true)]) ==
+            _listValue([_boolValue(true), _boolValue(false)]),
+        isFalse);
+  }
+
+  void test_equals_list_false_sameSize() {
+    expect(_listValue([_boolValue(true)]) == _listValue([_boolValue(false)]),
+        isFalse);
+  }
+
+  void test_equals_list_true_empty() {
+    expect(_listValue(), _listValue());
+  }
+
+  void test_equals_list_true_nonEmpty() {
+    expect(_listValue([_boolValue(true)]), _listValue([_boolValue(true)]));
+  }
+
+  void test_equals_map_true_empty() {
+    expect(_mapValue(), _mapValue());
+  }
+
+  void test_equals_symbol_false() {
+    expect(_symbolValue("a") == _symbolValue("b"), isFalse);
+  }
+
+  void test_equals_symbol_true() {
+    expect(_symbolValue("a"), _symbolValue("a"));
+  }
+
+  void test_getValue_bool_false() {
+    expect(_boolValue(false).toBoolValue(), false);
+  }
+
+  void test_getValue_bool_true() {
+    expect(_boolValue(true).toBoolValue(), true);
+  }
+
+  void test_getValue_bool_unknown() {
+    expect(_boolValue(null).toBoolValue(), isNull);
+  }
+
+  void test_getValue_double_known() {
+    double value = 2.3;
+    expect(_doubleValue(value).toDoubleValue(), value);
+  }
+
+  void test_getValue_double_unknown() {
+    expect(_doubleValue(null).toDoubleValue(), isNull);
+  }
+
+  void test_getValue_int_known() {
+    int value = 23;
+    expect(_intValue(value).toIntValue(), value);
+  }
+
+  void test_getValue_int_unknown() {
+    expect(_intValue(null).toIntValue(), isNull);
+  }
+
+  void test_getValue_list_empty() {
+    Object result = _listValue().toListValue();
+    _assertInstanceOfObjectArray(result);
+    List<Object> array = result as List<Object>;
+    expect(array, hasLength(0));
+  }
+
+  void test_getValue_list_valid() {
+    Object result = _listValue([_intValue(23)]).toListValue();
+    _assertInstanceOfObjectArray(result);
+    List<Object> array = result as List<Object>;
+    expect(array, hasLength(1));
+  }
+
+  void test_getValue_map_empty() {
+    Object result = _mapValue().toMapValue();
+    EngineTestCase.assertInstanceOf((obj) => obj is Map, Map, result);
+    Map map = result as Map;
+    expect(map, hasLength(0));
+  }
+
+  void test_getValue_map_valid() {
+    Object result =
+        _mapValue([_stringValue("key"), _stringValue("value")]).toMapValue();
+    EngineTestCase.assertInstanceOf((obj) => obj is Map, Map, result);
+    Map map = result as Map;
+    expect(map, hasLength(1));
+  }
+
+  void test_getValue_null() {
+    expect(_nullValue().isNull, isTrue);
+  }
+
+  void test_getValue_string_known() {
+    String value = "twenty-three";
+    expect(_stringValue(value).toStringValue(), value);
+  }
+
+  void test_getValue_string_unknown() {
+    expect(_stringValue(null).toStringValue(), isNull);
+  }
+
+  void test_greaterThan_knownDouble_knownDouble_false() {
+    _assertGreaterThan(_boolValue(false), _doubleValue(1.0), _doubleValue(2.0));
+  }
+
+  void test_greaterThan_knownDouble_knownDouble_true() {
+    _assertGreaterThan(_boolValue(true), _doubleValue(2.0), _doubleValue(1.0));
+  }
+
+  void test_greaterThan_knownDouble_knownInt_false() {
+    _assertGreaterThan(_boolValue(false), _doubleValue(1.0), _intValue(2));
+  }
+
+  void test_greaterThan_knownDouble_knownInt_true() {
+    _assertGreaterThan(_boolValue(true), _doubleValue(2.0), _intValue(1));
+  }
+
+  void test_greaterThan_knownDouble_unknownDouble() {
+    _assertGreaterThan(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
+  }
+
+  void test_greaterThan_knownDouble_unknownInt() {
+    _assertGreaterThan(_boolValue(null), _doubleValue(1.0), _intValue(null));
+  }
+
+  void test_greaterThan_knownInt_knownInt_false() {
+    _assertGreaterThan(_boolValue(false), _intValue(1), _intValue(2));
+  }
+
+  void test_greaterThan_knownInt_knownInt_true() {
+    _assertGreaterThan(_boolValue(true), _intValue(2), _intValue(1));
+  }
+
+  void test_greaterThan_knownInt_knownString() {
+    _assertGreaterThan(null, _intValue(1), _stringValue("2"));
+  }
+
+  void test_greaterThan_knownInt_unknownDouble() {
+    _assertGreaterThan(_boolValue(null), _intValue(1), _doubleValue(null));
+  }
+
+  void test_greaterThan_knownInt_unknownInt() {
+    _assertGreaterThan(_boolValue(null), _intValue(1), _intValue(null));
+  }
+
+  void test_greaterThan_knownString_knownInt() {
+    _assertGreaterThan(null, _stringValue("1"), _intValue(2));
+  }
+
+  void test_greaterThan_unknownDouble_knownDouble() {
+    _assertGreaterThan(_boolValue(null), _doubleValue(null), _doubleValue(2.0));
+  }
+
+  void test_greaterThan_unknownDouble_knownInt() {
+    _assertGreaterThan(_boolValue(null), _doubleValue(null), _intValue(2));
+  }
+
+  void test_greaterThan_unknownInt_knownDouble() {
+    _assertGreaterThan(_boolValue(null), _intValue(null), _doubleValue(2.0));
+  }
+
+  void test_greaterThan_unknownInt_knownInt() {
+    _assertGreaterThan(_boolValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_greaterThanOrEqual_knownDouble_knownDouble_false() {
+    _assertGreaterThanOrEqual(
+        _boolValue(false), _doubleValue(1.0), _doubleValue(2.0));
+  }
+
+  void test_greaterThanOrEqual_knownDouble_knownDouble_true() {
+    _assertGreaterThanOrEqual(
+        _boolValue(true), _doubleValue(2.0), _doubleValue(1.0));
+  }
+
+  void test_greaterThanOrEqual_knownDouble_knownInt_false() {
+    _assertGreaterThanOrEqual(
+        _boolValue(false), _doubleValue(1.0), _intValue(2));
+  }
+
+  void test_greaterThanOrEqual_knownDouble_knownInt_true() {
+    _assertGreaterThanOrEqual(
+        _boolValue(true), _doubleValue(2.0), _intValue(1));
+  }
+
+  void test_greaterThanOrEqual_knownDouble_unknownDouble() {
+    _assertGreaterThanOrEqual(
+        _boolValue(null), _doubleValue(1.0), _doubleValue(null));
+  }
+
+  void test_greaterThanOrEqual_knownDouble_unknownInt() {
+    _assertGreaterThanOrEqual(
+        _boolValue(null), _doubleValue(1.0), _intValue(null));
+  }
+
+  void test_greaterThanOrEqual_knownInt_knownInt_false() {
+    _assertGreaterThanOrEqual(_boolValue(false), _intValue(1), _intValue(2));
+  }
+
+  void test_greaterThanOrEqual_knownInt_knownInt_true() {
+    _assertGreaterThanOrEqual(_boolValue(true), _intValue(2), _intValue(2));
+  }
+
+  void test_greaterThanOrEqual_knownInt_knownString() {
+    _assertGreaterThanOrEqual(null, _intValue(1), _stringValue("2"));
+  }
+
+  void test_greaterThanOrEqual_knownInt_unknownDouble() {
+    _assertGreaterThanOrEqual(
+        _boolValue(null), _intValue(1), _doubleValue(null));
+  }
+
+  void test_greaterThanOrEqual_knownInt_unknownInt() {
+    _assertGreaterThanOrEqual(_boolValue(null), _intValue(1), _intValue(null));
+  }
+
+  void test_greaterThanOrEqual_knownString_knownInt() {
+    _assertGreaterThanOrEqual(null, _stringValue("1"), _intValue(2));
+  }
+
+  void test_greaterThanOrEqual_unknownDouble_knownDouble() {
+    _assertGreaterThanOrEqual(
+        _boolValue(null), _doubleValue(null), _doubleValue(2.0));
+  }
+
+  void test_greaterThanOrEqual_unknownDouble_knownInt() {
+    _assertGreaterThanOrEqual(
+        _boolValue(null), _doubleValue(null), _intValue(2));
+  }
+
+  void test_greaterThanOrEqual_unknownInt_knownDouble() {
+    _assertGreaterThanOrEqual(
+        _boolValue(null), _intValue(null), _doubleValue(2.0));
+  }
+
+  void test_greaterThanOrEqual_unknownInt_knownInt() {
+    _assertGreaterThanOrEqual(_boolValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_hasKnownValue_bool_false() {
+    expect(_boolValue(false).hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_bool_true() {
+    expect(_boolValue(true).hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_bool_unknown() {
+    expect(_boolValue(null).hasKnownValue, isFalse);
+  }
+
+  void test_hasKnownValue_double_known() {
+    expect(_doubleValue(2.3).hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_double_unknown() {
+    expect(_doubleValue(null).hasKnownValue, isFalse);
+  }
+
+  void test_hasKnownValue_dynamic() {
+    expect(_dynamicValue().hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_int_known() {
+    expect(_intValue(23).hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_int_unknown() {
+    expect(_intValue(null).hasKnownValue, isFalse);
+  }
+
+  void test_hasKnownValue_list_empty() {
+    expect(_listValue().hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_list_invalidElement() {
+    expect(_listValue([_dynamicValue()]).hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_list_valid() {
+    expect(_listValue([_intValue(23)]).hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_map_empty() {
+    expect(_mapValue().hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_map_invalidKey() {
+    expect(_mapValue([_dynamicValue(), _stringValue("value")]).hasKnownValue,
+        isTrue);
+  }
+
+  void test_hasKnownValue_map_invalidValue() {
+    expect(_mapValue([_stringValue("key"), _dynamicValue()]).hasKnownValue,
+        isTrue);
+  }
+
+  void test_hasKnownValue_map_valid() {
+    expect(
+        _mapValue([_stringValue("key"), _stringValue("value")]).hasKnownValue,
+        isTrue);
+  }
+
+  void test_hasKnownValue_null() {
+    expect(_nullValue().hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_num() {
+    expect(_numValue().hasKnownValue, isFalse);
+  }
+
+  void test_hasKnownValue_string_known() {
+    expect(_stringValue("twenty-three").hasKnownValue, isTrue);
+  }
+
+  void test_hasKnownValue_string_unknown() {
+    expect(_stringValue(null).hasKnownValue, isFalse);
+  }
+
+  void test_identical_bool_false() {
+    _assertIdentical(_boolValue(false), _boolValue(false), _boolValue(true));
+  }
+
+  void test_identical_bool_true() {
+    _assertIdentical(_boolValue(true), _boolValue(true), _boolValue(true));
+  }
+
+  void test_identical_bool_unknown() {
+    _assertIdentical(_boolValue(null), _boolValue(null), _boolValue(false));
+  }
+
+  void test_identical_double_false() {
+    _assertIdentical(_boolValue(false), _doubleValue(2.0), _doubleValue(4.0));
+  }
+
+  void test_identical_double_true() {
+    _assertIdentical(_boolValue(true), _doubleValue(2.0), _doubleValue(2.0));
+  }
+
+  void test_identical_double_unknown() {
+    _assertIdentical(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
+  }
+
+  void test_identical_int_false() {
+    _assertIdentical(_boolValue(false), _intValue(-5), _intValue(5));
+  }
+
+  void test_identical_int_true() {
+    _assertIdentical(_boolValue(true), _intValue(5), _intValue(5));
+  }
+
+  void test_identical_int_unknown() {
+    _assertIdentical(_boolValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_identical_list_empty() {
+    _assertIdentical(_boolValue(true), _listValue(), _listValue());
+  }
+
+  void test_identical_list_false() {
+    _assertIdentical(
+        _boolValue(false), _listValue(), _listValue([_intValue(3)]));
+  }
+
+  void test_identical_map_empty() {
+    _assertIdentical(_boolValue(true), _mapValue(), _mapValue());
+  }
+
+  void test_identical_map_false() {
+    _assertIdentical(_boolValue(false), _mapValue(),
+        _mapValue([_intValue(1), _intValue(2)]));
+  }
+
+  void test_identical_null() {
+    _assertIdentical(_boolValue(true), _nullValue(), _nullValue());
+  }
+
+  void test_identical_string_false() {
+    _assertIdentical(
+        _boolValue(false), _stringValue("abc"), _stringValue("def"));
+  }
+
+  void test_identical_string_true() {
+    _assertIdentical(
+        _boolValue(true), _stringValue("abc"), _stringValue("abc"));
+  }
+
+  void test_identical_string_unknown() {
+    _assertIdentical(_boolValue(null), _stringValue(null), _stringValue("def"));
+  }
+
+  void test_integerDivide_knownDouble_knownDouble() {
+    _assertIntegerDivide(_intValue(3), _doubleValue(6.0), _doubleValue(2.0));
+  }
+
+  void test_integerDivide_knownDouble_knownInt() {
+    _assertIntegerDivide(_intValue(3), _doubleValue(6.0), _intValue(2));
+  }
+
+  void test_integerDivide_knownDouble_unknownDouble() {
+    _assertIntegerDivide(
+        _intValue(null), _doubleValue(6.0), _doubleValue(null));
+  }
+
+  void test_integerDivide_knownDouble_unknownInt() {
+    _assertIntegerDivide(_intValue(null), _doubleValue(6.0), _intValue(null));
+  }
+
+  void test_integerDivide_knownInt_knownInt() {
+    _assertIntegerDivide(_intValue(3), _intValue(6), _intValue(2));
+  }
+
+  void test_integerDivide_knownInt_knownString() {
+    _assertIntegerDivide(null, _intValue(6), _stringValue("2"));
+  }
+
+  void test_integerDivide_knownInt_unknownDouble() {
+    _assertIntegerDivide(_intValue(null), _intValue(6), _doubleValue(null));
+  }
+
+  void test_integerDivide_knownInt_unknownInt() {
+    _assertIntegerDivide(_intValue(null), _intValue(6), _intValue(null));
+  }
+
+  void test_integerDivide_knownString_knownInt() {
+    _assertIntegerDivide(null, _stringValue("6"), _intValue(2));
+  }
+
+  void test_integerDivide_unknownDouble_knownDouble() {
+    _assertIntegerDivide(
+        _intValue(null), _doubleValue(null), _doubleValue(2.0));
+  }
+
+  void test_integerDivide_unknownDouble_knownInt() {
+    _assertIntegerDivide(_intValue(null), _doubleValue(null), _intValue(2));
+  }
+
+  void test_integerDivide_unknownInt_knownDouble() {
+    _assertIntegerDivide(_intValue(null), _intValue(null), _doubleValue(2.0));
+  }
+
+  void test_integerDivide_unknownInt_knownInt() {
+    _assertIntegerDivide(_intValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_isBoolNumStringOrNull_bool_false() {
+    expect(_boolValue(false).isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_bool_true() {
+    expect(_boolValue(true).isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_bool_unknown() {
+    expect(_boolValue(null).isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_double_known() {
+    expect(_doubleValue(2.3).isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_double_unknown() {
+    expect(_doubleValue(null).isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_dynamic() {
+    expect(_dynamicValue().isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_int_known() {
+    expect(_intValue(23).isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_int_unknown() {
+    expect(_intValue(null).isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_list() {
+    expect(_listValue().isBoolNumStringOrNull, isFalse);
+  }
+
+  void test_isBoolNumStringOrNull_null() {
+    expect(_nullValue().isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_num() {
+    expect(_numValue().isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_string_known() {
+    expect(_stringValue("twenty-three").isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_isBoolNumStringOrNull_string_unknown() {
+    expect(_stringValue(null).isBoolNumStringOrNull, isTrue);
+  }
+
+  void test_lessThan_knownDouble_knownDouble_false() {
+    _assertLessThan(_boolValue(false), _doubleValue(2.0), _doubleValue(1.0));
+  }
+
+  void test_lessThan_knownDouble_knownDouble_true() {
+    _assertLessThan(_boolValue(true), _doubleValue(1.0), _doubleValue(2.0));
+  }
+
+  void test_lessThan_knownDouble_knownInt_false() {
+    _assertLessThan(_boolValue(false), _doubleValue(2.0), _intValue(1));
+  }
+
+  void test_lessThan_knownDouble_knownInt_true() {
+    _assertLessThan(_boolValue(true), _doubleValue(1.0), _intValue(2));
+  }
+
+  void test_lessThan_knownDouble_unknownDouble() {
+    _assertLessThan(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
+  }
+
+  void test_lessThan_knownDouble_unknownInt() {
+    _assertLessThan(_boolValue(null), _doubleValue(1.0), _intValue(null));
+  }
+
+  void test_lessThan_knownInt_knownInt_false() {
+    _assertLessThan(_boolValue(false), _intValue(2), _intValue(1));
+  }
+
+  void test_lessThan_knownInt_knownInt_true() {
+    _assertLessThan(_boolValue(true), _intValue(1), _intValue(2));
+  }
+
+  void test_lessThan_knownInt_knownString() {
+    _assertLessThan(null, _intValue(1), _stringValue("2"));
+  }
+
+  void test_lessThan_knownInt_unknownDouble() {
+    _assertLessThan(_boolValue(null), _intValue(1), _doubleValue(null));
+  }
+
+  void test_lessThan_knownInt_unknownInt() {
+    _assertLessThan(_boolValue(null), _intValue(1), _intValue(null));
+  }
+
+  void test_lessThan_knownString_knownInt() {
+    _assertLessThan(null, _stringValue("1"), _intValue(2));
+  }
+
+  void test_lessThan_unknownDouble_knownDouble() {
+    _assertLessThan(_boolValue(null), _doubleValue(null), _doubleValue(2.0));
+  }
+
+  void test_lessThan_unknownDouble_knownInt() {
+    _assertLessThan(_boolValue(null), _doubleValue(null), _intValue(2));
+  }
+
+  void test_lessThan_unknownInt_knownDouble() {
+    _assertLessThan(_boolValue(null), _intValue(null), _doubleValue(2.0));
+  }
+
+  void test_lessThan_unknownInt_knownInt() {
+    _assertLessThan(_boolValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_lessThanOrEqual_knownDouble_knownDouble_false() {
+    _assertLessThanOrEqual(
+        _boolValue(false), _doubleValue(2.0), _doubleValue(1.0));
+  }
+
+  void test_lessThanOrEqual_knownDouble_knownDouble_true() {
+    _assertLessThanOrEqual(
+        _boolValue(true), _doubleValue(1.0), _doubleValue(2.0));
+  }
+
+  void test_lessThanOrEqual_knownDouble_knownInt_false() {
+    _assertLessThanOrEqual(_boolValue(false), _doubleValue(2.0), _intValue(1));
+  }
+
+  void test_lessThanOrEqual_knownDouble_knownInt_true() {
+    _assertLessThanOrEqual(_boolValue(true), _doubleValue(1.0), _intValue(2));
+  }
+
+  void test_lessThanOrEqual_knownDouble_unknownDouble() {
+    _assertLessThanOrEqual(
+        _boolValue(null), _doubleValue(1.0), _doubleValue(null));
+  }
+
+  void test_lessThanOrEqual_knownDouble_unknownInt() {
+    _assertLessThanOrEqual(
+        _boolValue(null), _doubleValue(1.0), _intValue(null));
+  }
+
+  void test_lessThanOrEqual_knownInt_knownInt_false() {
+    _assertLessThanOrEqual(_boolValue(false), _intValue(2), _intValue(1));
+  }
+
+  void test_lessThanOrEqual_knownInt_knownInt_true() {
+    _assertLessThanOrEqual(_boolValue(true), _intValue(1), _intValue(2));
+  }
+
+  void test_lessThanOrEqual_knownInt_knownString() {
+    _assertLessThanOrEqual(null, _intValue(1), _stringValue("2"));
+  }
+
+  void test_lessThanOrEqual_knownInt_unknownDouble() {
+    _assertLessThanOrEqual(_boolValue(null), _intValue(1), _doubleValue(null));
+  }
+
+  void test_lessThanOrEqual_knownInt_unknownInt() {
+    _assertLessThanOrEqual(_boolValue(null), _intValue(1), _intValue(null));
+  }
+
+  void test_lessThanOrEqual_knownString_knownInt() {
+    _assertLessThanOrEqual(null, _stringValue("1"), _intValue(2));
+  }
+
+  void test_lessThanOrEqual_unknownDouble_knownDouble() {
+    _assertLessThanOrEqual(
+        _boolValue(null), _doubleValue(null), _doubleValue(2.0));
+  }
+
+  void test_lessThanOrEqual_unknownDouble_knownInt() {
+    _assertLessThanOrEqual(_boolValue(null), _doubleValue(null), _intValue(2));
+  }
+
+  void test_lessThanOrEqual_unknownInt_knownDouble() {
+    _assertLessThanOrEqual(
+        _boolValue(null), _intValue(null), _doubleValue(2.0));
+  }
+
+  void test_lessThanOrEqual_unknownInt_knownInt() {
+    _assertLessThanOrEqual(_boolValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_logicalAnd_false_false() {
+    _assertLogicalAnd(_boolValue(false), _boolValue(false), _boolValue(false));
+  }
+
+  void test_logicalAnd_false_null() {
+    try {
+      _assertLogicalAnd(_boolValue(false), _boolValue(false), _nullValue());
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalAnd_false_string() {
+    try {
+      _assertLogicalAnd(
+          _boolValue(false), _boolValue(false), _stringValue("false"));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalAnd_false_true() {
+    _assertLogicalAnd(_boolValue(false), _boolValue(false), _boolValue(true));
+  }
+
+  void test_logicalAnd_null_false() {
+    try {
+      _assertLogicalAnd(_boolValue(false), _nullValue(), _boolValue(false));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalAnd_null_true() {
+    try {
+      _assertLogicalAnd(_boolValue(false), _nullValue(), _boolValue(true));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalAnd_string_false() {
+    try {
+      _assertLogicalAnd(
+          _boolValue(false), _stringValue("true"), _boolValue(false));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalAnd_string_true() {
+    try {
+      _assertLogicalAnd(
+          _boolValue(false), _stringValue("false"), _boolValue(true));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalAnd_true_false() {
+    _assertLogicalAnd(_boolValue(false), _boolValue(true), _boolValue(false));
+  }
+
+  void test_logicalAnd_true_null() {
+    _assertLogicalAnd(null, _boolValue(true), _nullValue());
+  }
+
+  void test_logicalAnd_true_string() {
+    try {
+      _assertLogicalAnd(
+          _boolValue(false), _boolValue(true), _stringValue("true"));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalAnd_true_true() {
+    _assertLogicalAnd(_boolValue(true), _boolValue(true), _boolValue(true));
+  }
+
+  void test_logicalNot_false() {
+    _assertLogicalNot(_boolValue(true), _boolValue(false));
+  }
+
+  void test_logicalNot_null() {
+    _assertLogicalNot(null, _nullValue());
+  }
+
+  void test_logicalNot_string() {
+    try {
+      _assertLogicalNot(_boolValue(true), _stringValue(null));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalNot_true() {
+    _assertLogicalNot(_boolValue(false), _boolValue(true));
+  }
+
+  void test_logicalNot_unknown() {
+    _assertLogicalNot(_boolValue(null), _boolValue(null));
+  }
+
+  void test_logicalOr_false_false() {
+    _assertLogicalOr(_boolValue(false), _boolValue(false), _boolValue(false));
+  }
+
+  void test_logicalOr_false_null() {
+    _assertLogicalOr(null, _boolValue(false), _nullValue());
+  }
+
+  void test_logicalOr_false_string() {
+    try {
+      _assertLogicalOr(
+          _boolValue(false), _boolValue(false), _stringValue("false"));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalOr_false_true() {
+    _assertLogicalOr(_boolValue(true), _boolValue(false), _boolValue(true));
+  }
+
+  void test_logicalOr_null_false() {
+    try {
+      _assertLogicalOr(_boolValue(false), _nullValue(), _boolValue(false));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalOr_null_true() {
+    try {
+      _assertLogicalOr(_boolValue(true), _nullValue(), _boolValue(true));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalOr_string_false() {
+    try {
+      _assertLogicalOr(
+          _boolValue(false), _stringValue("true"), _boolValue(false));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalOr_string_true() {
+    try {
+      _assertLogicalOr(
+          _boolValue(true), _stringValue("false"), _boolValue(true));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalOr_true_false() {
+    _assertLogicalOr(_boolValue(true), _boolValue(true), _boolValue(false));
+  }
+
+  void test_logicalOr_true_null() {
+    try {
+      _assertLogicalOr(_boolValue(true), _boolValue(true), _nullValue());
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalOr_true_string() {
+    try {
+      _assertLogicalOr(
+          _boolValue(true), _boolValue(true), _stringValue("true"));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_logicalOr_true_true() {
+    _assertLogicalOr(_boolValue(true), _boolValue(true), _boolValue(true));
+  }
+
+  void test_minus_knownDouble_knownDouble() {
+    _assertMinus(_doubleValue(1.0), _doubleValue(4.0), _doubleValue(3.0));
+  }
+
+  void test_minus_knownDouble_knownInt() {
+    _assertMinus(_doubleValue(1.0), _doubleValue(4.0), _intValue(3));
+  }
+
+  void test_minus_knownDouble_unknownDouble() {
+    _assertMinus(_doubleValue(null), _doubleValue(4.0), _doubleValue(null));
+  }
+
+  void test_minus_knownDouble_unknownInt() {
+    _assertMinus(_doubleValue(null), _doubleValue(4.0), _intValue(null));
+  }
+
+  void test_minus_knownInt_knownInt() {
+    _assertMinus(_intValue(1), _intValue(4), _intValue(3));
+  }
+
+  void test_minus_knownInt_knownString() {
+    _assertMinus(null, _intValue(4), _stringValue("3"));
+  }
+
+  void test_minus_knownInt_unknownDouble() {
+    _assertMinus(_doubleValue(null), _intValue(4), _doubleValue(null));
+  }
+
+  void test_minus_knownInt_unknownInt() {
+    _assertMinus(_intValue(null), _intValue(4), _intValue(null));
+  }
+
+  void test_minus_knownString_knownInt() {
+    _assertMinus(null, _stringValue("4"), _intValue(3));
+  }
+
+  void test_minus_unknownDouble_knownDouble() {
+    _assertMinus(_doubleValue(null), _doubleValue(null), _doubleValue(3.0));
+  }
+
+  void test_minus_unknownDouble_knownInt() {
+    _assertMinus(_doubleValue(null), _doubleValue(null), _intValue(3));
+  }
+
+  void test_minus_unknownInt_knownDouble() {
+    _assertMinus(_doubleValue(null), _intValue(null), _doubleValue(3.0));
+  }
+
+  void test_minus_unknownInt_knownInt() {
+    _assertMinus(_intValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_negated_double_known() {
+    _assertNegated(_doubleValue(2.0), _doubleValue(-2.0));
+  }
+
+  void test_negated_double_unknown() {
+    _assertNegated(_doubleValue(null), _doubleValue(null));
+  }
+
+  void test_negated_int_known() {
+    _assertNegated(_intValue(-3), _intValue(3));
+  }
+
+  void test_negated_int_unknown() {
+    _assertNegated(_intValue(null), _intValue(null));
+  }
+
+  void test_negated_string() {
+    _assertNegated(null, _stringValue(null));
+  }
+
+  void test_notEqual_bool_false() {
+    _assertNotEqual(_boolValue(false), _boolValue(true), _boolValue(true));
+  }
+
+  void test_notEqual_bool_true() {
+    _assertNotEqual(_boolValue(true), _boolValue(false), _boolValue(true));
+  }
+
+  void test_notEqual_bool_unknown() {
+    _assertNotEqual(_boolValue(null), _boolValue(null), _boolValue(false));
+  }
+
+  void test_notEqual_double_false() {
+    _assertNotEqual(_boolValue(false), _doubleValue(2.0), _doubleValue(2.0));
+  }
+
+  void test_notEqual_double_true() {
+    _assertNotEqual(_boolValue(true), _doubleValue(2.0), _doubleValue(4.0));
+  }
+
+  void test_notEqual_double_unknown() {
+    _assertNotEqual(_boolValue(null), _doubleValue(1.0), _doubleValue(null));
+  }
+
+  void test_notEqual_int_false() {
+    _assertNotEqual(_boolValue(false), _intValue(5), _intValue(5));
+  }
+
+  void test_notEqual_int_true() {
+    _assertNotEqual(_boolValue(true), _intValue(-5), _intValue(5));
+  }
+
+  void test_notEqual_int_unknown() {
+    _assertNotEqual(_boolValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_notEqual_null() {
+    _assertNotEqual(_boolValue(false), _nullValue(), _nullValue());
+  }
+
+  void test_notEqual_string_false() {
+    _assertNotEqual(
+        _boolValue(false), _stringValue("abc"), _stringValue("abc"));
+  }
+
+  void test_notEqual_string_true() {
+    _assertNotEqual(_boolValue(true), _stringValue("abc"), _stringValue("def"));
+  }
+
+  void test_notEqual_string_unknown() {
+    _assertNotEqual(_boolValue(null), _stringValue(null), _stringValue("def"));
+  }
+
+  void test_performToString_bool_false() {
+    _assertPerformToString(_stringValue("false"), _boolValue(false));
+  }
+
+  void test_performToString_bool_true() {
+    _assertPerformToString(_stringValue("true"), _boolValue(true));
+  }
+
+  void test_performToString_bool_unknown() {
+    _assertPerformToString(_stringValue(null), _boolValue(null));
+  }
+
+  void test_performToString_double_known() {
+    _assertPerformToString(_stringValue("2.0"), _doubleValue(2.0));
+  }
+
+  void test_performToString_double_unknown() {
+    _assertPerformToString(_stringValue(null), _doubleValue(null));
+  }
+
+  void test_performToString_int_known() {
+    _assertPerformToString(_stringValue("5"), _intValue(5));
+  }
+
+  void test_performToString_int_unknown() {
+    _assertPerformToString(_stringValue(null), _intValue(null));
+  }
+
+  void test_performToString_null() {
+    _assertPerformToString(_stringValue("null"), _nullValue());
+  }
+
+  void test_performToString_string_known() {
+    _assertPerformToString(_stringValue("abc"), _stringValue("abc"));
+  }
+
+  void test_performToString_string_unknown() {
+    _assertPerformToString(_stringValue(null), _stringValue(null));
+  }
+
+  void test_remainder_knownDouble_knownDouble() {
+    _assertRemainder(_doubleValue(1.0), _doubleValue(7.0), _doubleValue(2.0));
+  }
+
+  void test_remainder_knownDouble_knownInt() {
+    _assertRemainder(_doubleValue(1.0), _doubleValue(7.0), _intValue(2));
+  }
+
+  void test_remainder_knownDouble_unknownDouble() {
+    _assertRemainder(_doubleValue(null), _doubleValue(7.0), _doubleValue(null));
+  }
+
+  void test_remainder_knownDouble_unknownInt() {
+    _assertRemainder(_doubleValue(null), _doubleValue(6.0), _intValue(null));
+  }
+
+  void test_remainder_knownInt_knownInt() {
+    _assertRemainder(_intValue(1), _intValue(7), _intValue(2));
+  }
+
+  void test_remainder_knownInt_knownString() {
+    _assertRemainder(null, _intValue(7), _stringValue("2"));
+  }
+
+  void test_remainder_knownInt_unknownDouble() {
+    _assertRemainder(_doubleValue(null), _intValue(7), _doubleValue(null));
+  }
+
+  void test_remainder_knownInt_unknownInt() {
+    _assertRemainder(_intValue(null), _intValue(7), _intValue(null));
+  }
+
+  void test_remainder_knownString_knownInt() {
+    _assertRemainder(null, _stringValue("7"), _intValue(2));
+  }
+
+  void test_remainder_unknownDouble_knownDouble() {
+    _assertRemainder(_doubleValue(null), _doubleValue(null), _doubleValue(2.0));
+  }
+
+  void test_remainder_unknownDouble_knownInt() {
+    _assertRemainder(_doubleValue(null), _doubleValue(null), _intValue(2));
+  }
+
+  void test_remainder_unknownInt_knownDouble() {
+    _assertRemainder(_doubleValue(null), _intValue(null), _doubleValue(2.0));
+  }
+
+  void test_remainder_unknownInt_knownInt() {
+    _assertRemainder(_intValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_shiftLeft_knownInt_knownInt() {
+    _assertShiftLeft(_intValue(48), _intValue(6), _intValue(3));
+  }
+
+  void test_shiftLeft_knownInt_knownString() {
+    _assertShiftLeft(null, _intValue(6), _stringValue(null));
+  }
+
+  void test_shiftLeft_knownInt_tooLarge() {
+    _assertShiftLeft(
+        _intValue(null),
+        _intValue(6),
+        new DartObjectImpl(
+            _typeProvider.intType, new IntState(LONG_MAX_VALUE)));
+  }
+
+  void test_shiftLeft_knownInt_unknownInt() {
+    _assertShiftLeft(_intValue(null), _intValue(6), _intValue(null));
+  }
+
+  void test_shiftLeft_knownString_knownInt() {
+    _assertShiftLeft(null, _stringValue(null), _intValue(3));
+  }
+
+  void test_shiftLeft_unknownInt_knownInt() {
+    _assertShiftLeft(_intValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_shiftLeft_unknownInt_unknownInt() {
+    _assertShiftLeft(_intValue(null), _intValue(null), _intValue(null));
+  }
+
+  void test_shiftRight_knownInt_knownInt() {
+    _assertShiftRight(_intValue(6), _intValue(48), _intValue(3));
+  }
+
+  void test_shiftRight_knownInt_knownString() {
+    _assertShiftRight(null, _intValue(48), _stringValue(null));
+  }
+
+  void test_shiftRight_knownInt_tooLarge() {
+    _assertShiftRight(
+        _intValue(null),
+        _intValue(48),
+        new DartObjectImpl(
+            _typeProvider.intType, new IntState(LONG_MAX_VALUE)));
+  }
+
+  void test_shiftRight_knownInt_unknownInt() {
+    _assertShiftRight(_intValue(null), _intValue(48), _intValue(null));
+  }
+
+  void test_shiftRight_knownString_knownInt() {
+    _assertShiftRight(null, _stringValue(null), _intValue(3));
+  }
+
+  void test_shiftRight_unknownInt_knownInt() {
+    _assertShiftRight(_intValue(null), _intValue(null), _intValue(3));
+  }
+
+  void test_shiftRight_unknownInt_unknownInt() {
+    _assertShiftRight(_intValue(null), _intValue(null), _intValue(null));
+  }
+
+  void test_stringLength_int() {
+    try {
+      _assertStringLength(_intValue(null), _intValue(0));
+      fail("Expected EvaluationException");
+    } on EvaluationException {}
+  }
+
+  void test_stringLength_knownString() {
+    _assertStringLength(_intValue(3), _stringValue("abc"));
+  }
+
+  void test_stringLength_unknownString() {
+    _assertStringLength(_intValue(null), _stringValue(null));
+  }
+
+  void test_times_knownDouble_knownDouble() {
+    _assertTimes(_doubleValue(6.0), _doubleValue(2.0), _doubleValue(3.0));
+  }
+
+  void test_times_knownDouble_knownInt() {
+    _assertTimes(_doubleValue(6.0), _doubleValue(2.0), _intValue(3));
+  }
+
+  void test_times_knownDouble_unknownDouble() {
+    _assertTimes(_doubleValue(null), _doubleValue(2.0), _doubleValue(null));
+  }
+
+  void test_times_knownDouble_unknownInt() {
+    _assertTimes(_doubleValue(null), _doubleValue(2.0), _intValue(null));
+  }
+
+  void test_times_knownInt_knownInt() {
+    _assertTimes(_intValue(6), _intValue(2), _intValue(3));
+  }
+
+  void test_times_knownInt_knownString() {
+    _assertTimes(null, _intValue(2), _stringValue("3"));
+  }
+
+  void test_times_knownInt_unknownDouble() {
+    _assertTimes(_doubleValue(null), _intValue(2), _doubleValue(null));
+  }
+
+  void test_times_knownInt_unknownInt() {
+    _assertTimes(_intValue(null), _intValue(2), _intValue(null));
+  }
+
+  void test_times_knownString_knownInt() {
+    _assertTimes(null, _stringValue("2"), _intValue(3));
+  }
+
+  void test_times_unknownDouble_knownDouble() {
+    _assertTimes(_doubleValue(null), _doubleValue(null), _doubleValue(3.0));
+  }
+
+  void test_times_unknownDouble_knownInt() {
+    _assertTimes(_doubleValue(null), _doubleValue(null), _intValue(3));
+  }
+
+  void test_times_unknownInt_knownDouble() {
+    _assertTimes(_doubleValue(null), _intValue(null), _doubleValue(3.0));
+  }
+
+  void test_times_unknownInt_knownInt() {
+    _assertTimes(_intValue(null), _intValue(null), _intValue(3));
+  }
+
+  /**
+   * Assert that the result of adding the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertAdd(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.add(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.add(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of bit-anding the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertBitAnd(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.bitAnd(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.bitAnd(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the bit-not of the [operand] is the [expected] value, or that
+   * the operation throws an exception if the expected value is `null`.
+   */
+  void _assertBitNot(DartObjectImpl expected, DartObjectImpl operand) {
+    if (expected == null) {
+      try {
+        operand.bitNot(_typeProvider);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = operand.bitNot(_typeProvider);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of bit-oring the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertBitOr(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.bitOr(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.bitOr(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of bit-xoring the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertBitXor(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.bitXor(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.bitXor(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of concatenating the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertConcatenate(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.concatenate(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.concatenate(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of dividing the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertDivide(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.divide(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.divide(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of comparing the [left] and [right] operands for
+   * equality is the [expected] value, or that the operation throws an exception
+   * if the expected value is `null`.
+   */
+  void _assertEqualEqual(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.equalEqual(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.equalEqual(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of comparing the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertGreaterThan(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.greaterThan(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.greaterThan(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of comparing the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertGreaterThanOrEqual(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.greaterThanOrEqual(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.greaterThanOrEqual(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of comparing the [left] and [right] operands using
+   * identical() is the expected value.
+   */
+  void _assertIdentical(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    DartObjectImpl result = left.isIdentical(_typeProvider, right);
+    expect(result, isNotNull);
+    expect(result, expected);
+  }
+
+  void _assertInstanceOfObjectArray(Object result) {
+    // TODO(scheglov) implement
+  }
+
+  /**
+   * Assert that the result of dividing the [left] and [right] operands as
+   * integers is the [expected] value, or that the operation throws an exception
+   * if the expected value is `null`.
+   */
+  void _assertIntegerDivide(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.integerDivide(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.integerDivide(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of comparing the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertLessThan(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.lessThan(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.lessThan(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of comparing the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertLessThanOrEqual(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.lessThanOrEqual(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.lessThanOrEqual(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of logical-anding the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertLogicalAnd(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.logicalAnd(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.logicalAnd(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the logical-not of the [operand] is the [expected] value, or
+   * that the operation throws an exception if the expected value is `null`.
+   */
+  void _assertLogicalNot(DartObjectImpl expected, DartObjectImpl operand) {
+    if (expected == null) {
+      try {
+        operand.logicalNot(_typeProvider);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = operand.logicalNot(_typeProvider);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of logical-oring the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertLogicalOr(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.logicalOr(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.logicalOr(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of subtracting the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertMinus(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.minus(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.minus(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the negation of the [operand] is the [expected] value, or that
+   * the operation throws an exception if the expected value is `null`.
+   */
+  void _assertNegated(DartObjectImpl expected, DartObjectImpl operand) {
+    if (expected == null) {
+      try {
+        operand.negated(_typeProvider);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = operand.negated(_typeProvider);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of comparing the [left] and [right] operands for
+   * inequality is the [expected] value, or that the operation throws an
+   * exception if the expected value is `null`.
+   */
+  void _assertNotEqual(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.notEqual(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.notEqual(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that converting the [operand] to a string is the [expected] value,
+   * or that the operation throws an exception if the expected value is `null`.
+   */
+  void _assertPerformToString(DartObjectImpl expected, DartObjectImpl operand) {
+    if (expected == null) {
+      try {
+        operand.performToString(_typeProvider);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = operand.performToString(_typeProvider);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of taking the remainder of the [left] and [right]
+   * operands is the [expected] value, or that the operation throws an exception
+   * if the expected value is `null`.
+   */
+  void _assertRemainder(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.remainder(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.remainder(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of multiplying the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertShiftLeft(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.shiftLeft(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.shiftLeft(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of multiplying the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertShiftRight(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.shiftRight(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.shiftRight(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the length of the [operand] is the [expected] value, or that
+   * the operation throws an exception if the expected value is `null`.
+   */
+  void _assertStringLength(DartObjectImpl expected, DartObjectImpl operand) {
+    if (expected == null) {
+      try {
+        operand.stringLength(_typeProvider);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = operand.stringLength(_typeProvider);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of multiplying the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertTimes(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      try {
+        left.times(_typeProvider, right);
+        fail("Expected an EvaluationException");
+      } on EvaluationException {}
+    } else {
+      DartObjectImpl result = left.times(_typeProvider, right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  DartObjectImpl _boolValue(bool value) {
+    if (value == null) {
+      return new DartObjectImpl(
+          _typeProvider.boolType, BoolState.UNKNOWN_VALUE);
+    } else if (identical(value, false)) {
+      return new DartObjectImpl(_typeProvider.boolType, BoolState.FALSE_STATE);
+    } else if (identical(value, true)) {
+      return new DartObjectImpl(_typeProvider.boolType, BoolState.TRUE_STATE);
+    }
+    fail("Invalid boolean value used in test");
+    return null;
+  }
+
+  DartObjectImpl _doubleValue(double value) {
+    if (value == null) {
+      return new DartObjectImpl(
+          _typeProvider.doubleType, DoubleState.UNKNOWN_VALUE);
+    } else {
+      return new DartObjectImpl(
+          _typeProvider.doubleType, new DoubleState(value));
+    }
+  }
+
+  DartObjectImpl _dynamicValue() {
+    return new DartObjectImpl(
+        _typeProvider.nullType, DynamicState.DYNAMIC_STATE);
+  }
+
+  DartObjectImpl _intValue(int value) {
+    if (value == null) {
+      return new DartObjectImpl(_typeProvider.intType, IntState.UNKNOWN_VALUE);
+    } else {
+      return new DartObjectImpl(_typeProvider.intType, new IntState(value));
+    }
+  }
+
+  DartObjectImpl _listValue(
+      [List<DartObjectImpl> elements = DartObjectImpl.EMPTY_LIST]) {
+    return new DartObjectImpl(_typeProvider.listType, new ListState(elements));
+  }
+
+  DartObjectImpl _mapValue(
+      [List<DartObjectImpl> keyElementPairs = DartObjectImpl.EMPTY_LIST]) {
+    Map<DartObjectImpl, DartObjectImpl> map =
+        new Map<DartObjectImpl, DartObjectImpl>();
+    int count = keyElementPairs.length;
+    for (int i = 0; i < count;) {
+      map[keyElementPairs[i++]] = keyElementPairs[i++];
+    }
+    return new DartObjectImpl(_typeProvider.mapType, new MapState(map));
+  }
+
+  DartObjectImpl _nullValue() {
+    return new DartObjectImpl(_typeProvider.nullType, NullState.NULL_STATE);
+  }
+
+  DartObjectImpl _numValue() {
+    return new DartObjectImpl(_typeProvider.nullType, NumState.UNKNOWN_VALUE);
+  }
+
+  DartObjectImpl _stringValue(String value) {
+    if (value == null) {
+      return new DartObjectImpl(
+          _typeProvider.stringType, StringState.UNKNOWN_VALUE);
+    } else {
+      return new DartObjectImpl(
+          _typeProvider.stringType, new StringState(value));
+    }
+  }
+
+  DartObjectImpl _symbolValue(String value) {
+    return new DartObjectImpl(_typeProvider.symbolType, new SymbolState(value));
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index f907ae3..ebee2d6 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -8,6 +8,7 @@
 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/handle.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisContext, AnalysisOptionsImpl;
@@ -18,8 +19,8 @@
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
 import 'package:unittest/unittest.dart';
 
-import '../../../generated/resolver_test.dart'
-    show TestTypeProvider, AnalysisContextHelper;
+import '../../../generated/analysis_context_factory.dart'
+    show AnalysisContextHelper;
 import '../../../generated/test_support.dart';
 import '../../../reflective_tests.dart';
 import '../../../utils.dart';
@@ -29,6 +30,7 @@
   runReflectiveTests(FieldElementImplTest);
   runReflectiveTests(FunctionTypeImplTest);
   runReflectiveTests(InterfaceTypeImplTest);
+  runReflectiveTests(LocalVariableElementImplTest);
   runReflectiveTests(TypeParameterTypeImplTest);
   runReflectiveTests(VoidTypeImplTest);
   runReflectiveTests(ClassElementImplTest);
@@ -119,6 +121,24 @@
     }
   }
 
+  void test_constructors_mixinApplicationWithHandle() {
+    AnalysisContext context = createAnalysisContext();
+    context.sourceFactory = new SourceFactory([]);
+
+    ElementLocation location = new ElementLocationImpl.con2('');
+    ClassElementImpl classA = ElementFactory.classElement2("A");
+    classA.mixinApplication = true;
+    TestElementResynthesizer resynthesizer =
+        new TestElementResynthesizer(context, {location: classA});
+    ClassElementHandle classAHandle =
+        new ClassElementHandle(resynthesizer, location);
+    ClassElementImpl classB =
+        ElementFactory.classElement("B", new InterfaceTypeImpl(classAHandle));
+    classB.mixinApplication = true;
+
+    expect(classB.constructors, hasLength(1));
+  }
+
   void test_getAllSupertypes_interface() {
     ClassElement classA = ElementFactory.classElement2("A");
     ClassElement classB = ElementFactory.classElement("B", classA.type);
@@ -1299,20 +1319,110 @@
     expect(type.element, typeElement);
   }
 
-  void test_getNamedParameterTypes() {
-    FunctionTypeImpl type = new FunctionTypeImpl(
-        new FunctionElementImpl.forNode(AstFactory.identifier3("f")));
+  void test_getNamedParameterTypes_namedParameters() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    FunctionElement element = ElementFactory
+        .functionElementWithParameters('f', VoidTypeImpl.instance, [
+      ElementFactory.requiredParameter2('a', typeProvider.intType),
+      ElementFactory.requiredParameter('b'),
+      ElementFactory.namedParameter2('c', typeProvider.stringType),
+      ElementFactory.namedParameter('d')
+    ]);
+    FunctionTypeImpl type = element.type;
+    Map<String, DartType> types = type.namedParameterTypes;
+    expect(types, hasLength(2));
+    expect(types['c'], typeProvider.stringType);
+    expect(types['d'], DynamicTypeImpl.instance);
+  }
+
+  void test_getNamedParameterTypes_noNamedParameters() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    FunctionElement element = ElementFactory
+        .functionElementWithParameters('f', VoidTypeImpl.instance, [
+      ElementFactory.requiredParameter2('a', typeProvider.intType),
+      ElementFactory.requiredParameter('b'),
+      ElementFactory.positionalParameter2('c', typeProvider.stringType)
+    ]);
+    FunctionTypeImpl type = element.type;
     Map<String, DartType> types = type.namedParameterTypes;
     expect(types, hasLength(0));
   }
 
-  void test_getNormalParameterTypes() {
-    FunctionTypeImpl type = new FunctionTypeImpl(
-        new FunctionElementImpl.forNode(AstFactory.identifier3("f")));
+  void test_getNamedParameterTypes_noParameters() {
+    FunctionTypeImpl type = ElementFactory.functionElement('f').type;
+    Map<String, DartType> types = type.namedParameterTypes;
+    expect(types, hasLength(0));
+  }
+
+  void test_getNormalParameterTypes_noNormalParameters() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    FunctionElement element = ElementFactory
+        .functionElementWithParameters('f', VoidTypeImpl.instance, [
+      ElementFactory.positionalParameter2('c', typeProvider.stringType),
+      ElementFactory.positionalParameter('d')
+    ]);
+    FunctionTypeImpl type = element.type;
     List<DartType> types = type.normalParameterTypes;
     expect(types, hasLength(0));
   }
 
+  void test_getNormalParameterTypes_noParameters() {
+    FunctionTypeImpl type = ElementFactory.functionElement('f').type;
+    List<DartType> types = type.normalParameterTypes;
+    expect(types, hasLength(0));
+  }
+
+  void test_getNormalParameterTypes_normalParameters() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    FunctionElement element = ElementFactory
+        .functionElementWithParameters('f', VoidTypeImpl.instance, [
+      ElementFactory.requiredParameter2('a', typeProvider.intType),
+      ElementFactory.requiredParameter('b'),
+      ElementFactory.positionalParameter2('c', typeProvider.stringType)
+    ]);
+    FunctionTypeImpl type = element.type;
+    List<DartType> types = type.normalParameterTypes;
+    expect(types, hasLength(2));
+    expect(types[0], typeProvider.intType);
+    expect(types[1], DynamicTypeImpl.instance);
+  }
+
+  void test_getOptionalParameterTypes_noOptionalParameters() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    FunctionElement element = ElementFactory
+        .functionElementWithParameters('f', VoidTypeImpl.instance, [
+      ElementFactory.requiredParameter2('a', typeProvider.intType),
+      ElementFactory.requiredParameter('b'),
+      ElementFactory.namedParameter2('c', typeProvider.stringType),
+      ElementFactory.namedParameter('d')
+    ]);
+    FunctionTypeImpl type = element.type;
+    List<DartType> types = type.optionalParameterTypes;
+    expect(types, hasLength(0));
+  }
+
+  void test_getOptionalParameterTypes_noParameters() {
+    FunctionTypeImpl type = ElementFactory.functionElement('f').type;
+    List<DartType> types = type.optionalParameterTypes;
+    expect(types, hasLength(0));
+  }
+
+  void test_getOptionalParameterTypes_optionalParameters() {
+    TestTypeProvider typeProvider = new TestTypeProvider();
+    FunctionElement element = ElementFactory
+        .functionElementWithParameters('f', VoidTypeImpl.instance, [
+      ElementFactory.requiredParameter2('a', typeProvider.intType),
+      ElementFactory.requiredParameter('b'),
+      ElementFactory.positionalParameter2('c', typeProvider.stringType),
+      ElementFactory.positionalParameter('d')
+    ]);
+    FunctionTypeImpl type = element.type;
+    List<DartType> types = type.optionalParameterTypes;
+    expect(types, hasLength(2));
+    expect(types[0], typeProvider.stringType);
+    expect(types[1], DynamicTypeImpl.instance);
+  }
+
   void test_getReturnType() {
     DartType expectedReturnType = VoidTypeImpl.instance;
     FunctionElementImpl functionElement =
@@ -1969,7 +2079,7 @@
     FunctionTypeAliasElementImpl f =
         ElementFactory.functionTypeAliasElement('f');
     ClassElementImpl c = ElementFactory.classElement2('C', ['T']);
-    f.returnType = c.type.substitute4([f.type]);
+    f.returnType = c.type.instantiate([f.type]);
     expect(f.type.toString(), '() \u2192 C<...>');
   }
 
@@ -2757,8 +2867,8 @@
     ClassElement classB = ElementFactory.classElement2("B");
     DartType dynamicType = DynamicTypeImpl.instance;
     InterfaceType typeAOfDynamic =
-        classA.type.substitute4(<DartType>[dynamicType]);
-    InterfaceType typeAOfB = classA.type.substitute4(<DartType>[classB.type]);
+        classA.type.instantiate(<DartType>[dynamicType]);
+    InterfaceType typeAOfB = classA.type.instantiate(<DartType>[classB.type]);
     expect(typeAOfDynamic.isMoreSpecificThan(typeAOfB), isFalse);
     expect(typeAOfB.isMoreSpecificThan(typeAOfDynamic), isTrue);
   }
@@ -2895,8 +3005,8 @@
     ClassElement classB = ElementFactory.classElement2("B");
     DartType dynamicType = DynamicTypeImpl.instance;
     InterfaceType typeAOfDynamic =
-        classA.type.substitute4(<DartType>[dynamicType]);
-    InterfaceType typeAOfB = classA.type.substitute4(<DartType>[classB.type]);
+        classA.type.instantiate(<DartType>[dynamicType]);
+    InterfaceType typeAOfB = classA.type.instantiate(<DartType>[classB.type]);
     expect(typeAOfDynamic.isSubtypeOf(typeAOfB), isTrue);
     expect(typeAOfB.isSubtypeOf(typeAOfDynamic), isTrue);
   }
@@ -2982,7 +3092,7 @@
     ClassElement classJ = ElementFactory.classElement("J", classI.type);
     ClassElement classK = ElementFactory.classElement2("K");
     InterfaceType typeA = classA.type;
-    InterfaceType typeA_dynamic = typeA.substitute4(<DartType>[dynamicType]);
+    InterfaceType typeA_dynamic = typeA.instantiate(<DartType>[dynamicType]);
     InterfaceTypeImpl typeAI = new InterfaceTypeImpl(classA);
     InterfaceTypeImpl typeAJ = new InterfaceTypeImpl(classA);
     InterfaceTypeImpl typeAK = new InterfaceTypeImpl(classA);
@@ -3613,6 +3723,24 @@
         library.visibleLibraries, unorderedEquals(<LibraryElement>[library]));
   }
 
+  void test_invalidateLibraryCycles_withHandle() {
+    AnalysisContext context = createAnalysisContext();
+    context.sourceFactory = new SourceFactory([]);
+    LibraryElementImpl library = ElementFactory.library(context, "foo");
+    LibraryElementImpl importedLibrary = ElementFactory.library(context, "bar");
+    ElementLocation location = new ElementLocationImpl.con2('');
+    TestElementResynthesizer resynthesizer =
+        new TestElementResynthesizer(context, {location: importedLibrary});
+    LibraryElement importedLibraryHandle =
+        new LibraryElementHandle(resynthesizer, location);
+    ImportElementImpl import =
+        ElementFactory.importFor(importedLibraryHandle, null);
+    library.imports = <ImportElement>[import];
+    library.libraryCycle; // Force computation of the cycle.
+
+    library.invalidateLibraryCycles();
+  }
+
   void test_isUpToDate() {
     AnalysisContext context = createAnalysisContext();
     context.sourceFactory = new SourceFactory([]);
@@ -3643,6 +3771,45 @@
 }
 
 @reflectiveTest
+class LocalVariableElementImplTest extends EngineTestCase {
+  void test_computeNode_declaredIdentifier() {
+    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
+    AnalysisContext context = contextHelper.context;
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
+main() {
+  for (int v in <int>[1, 2, 3]) {}
+}''');
+    LibraryElement libraryElement = context.computeLibraryElement(source);
+    FunctionElement mainElement = libraryElement.units[0].functions[0];
+    LocalVariableElement element = mainElement.localVariables[0];
+    DeclaredIdentifier node = element.computeNode() as DeclaredIdentifier;
+    expect(node, isNotNull);
+    expect(node.identifier.name, 'v');
+    expect(node.element, same(element));
+  }
+
+  void test_computeNode_variableDeclaration() {
+    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
+    AnalysisContext context = contextHelper.context;
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
+main() {
+  int v = 0;
+}''');
+    LibraryElement libraryElement = context.computeLibraryElement(source);
+    FunctionElement mainElement = libraryElement.units[0].functions[0];
+    LocalVariableElement element = mainElement.localVariables[0];
+    VariableDeclaration node = element.computeNode() as VariableDeclaration;
+    expect(node, isNotNull);
+    expect(node.name.name, 'v');
+    expect(node.element, same(element));
+  }
+}
+
+@reflectiveTest
 class MethodElementImplTest extends EngineTestCase {
   void test_computeNode() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
@@ -3848,6 +4015,18 @@
   }
 }
 
+class TestElementResynthesizer extends ElementResynthesizer {
+  Map<ElementLocation, Element> locationMap;
+
+  TestElementResynthesizer(AnalysisContext context, this.locationMap)
+      : super(context);
+
+  @override
+  Element getElement(ElementLocation location) {
+    return locationMap[location];
+  }
+}
+
 @reflectiveTest
 class TypeParameterTypeImplTest extends EngineTestCase {
   void test_creation() {
@@ -3952,18 +4131,10 @@
     expect(typeParameterTypeT.isMoreSpecificThan(classS.type), isTrue);
   }
 
-  void test_resolveToBound_unbound() {
-    TypeParameterTypeImpl type = new TypeParameterTypeImpl(
-        new TypeParameterElementImpl.forNode(AstFactory.identifier3("E")));
-    // Returns whatever type is passed to resolveToBound().
-    expect(type.resolveToBound(VoidTypeImpl.instance),
-        same(VoidTypeImpl.instance));
-  }
-
   void test_resolveToBound_bound() {
     ClassElementImpl classS = ElementFactory.classElement2("A");
     TypeParameterElementImpl element =
-    new TypeParameterElementImpl.forNode(AstFactory.identifier3("E"));
+        new TypeParameterElementImpl.forNode(AstFactory.identifier3("E"));
     element.bound = classS.type;
     TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
     expect(type.resolveToBound(null), same(classS.type));
@@ -3972,16 +4143,24 @@
   void test_resolveToBound_nestedBound() {
     ClassElementImpl classS = ElementFactory.classElement2("A");
     TypeParameterElementImpl elementE =
-    new TypeParameterElementImpl.forNode(AstFactory.identifier3("E"));
+        new TypeParameterElementImpl.forNode(AstFactory.identifier3("E"));
     elementE.bound = classS.type;
     TypeParameterTypeImpl typeE = new TypeParameterTypeImpl(elementE);
     TypeParameterElementImpl elementF =
-    new TypeParameterElementImpl.forNode(AstFactory.identifier3("F"));
+        new TypeParameterElementImpl.forNode(AstFactory.identifier3("F"));
     elementF.bound = typeE;
     TypeParameterTypeImpl typeF = new TypeParameterTypeImpl(elementE);
     expect(typeF.resolveToBound(null), same(classS.type));
   }
 
+  void test_resolveToBound_unbound() {
+    TypeParameterTypeImpl type = new TypeParameterTypeImpl(
+        new TypeParameterElementImpl.forNode(AstFactory.identifier3("E")));
+    // Returns whatever type is passed to resolveToBound().
+    expect(type.resolveToBound(VoidTypeImpl.instance),
+        same(VoidTypeImpl.instance));
+  }
+
   void test_substitute_equal() {
     TypeParameterElementImpl element =
         new TypeParameterElementImpl.forNode(AstFactory.identifier3("E"));
diff --git a/pkg/analyzer/test/src/dart/test_all.dart b/pkg/analyzer/test/src/dart/test_all.dart
index ec4f182..15a0849 100644
--- a/pkg/analyzer/test/src/dart/test_all.dart
+++ b/pkg/analyzer/test/src/dart/test_all.dart
@@ -7,12 +7,16 @@
 import 'package:unittest/unittest.dart';
 
 import '../../utils.dart';
+import 'ast/test_all.dart' as ast;
+import 'constant/test_all.dart' as constant;
 import 'element/test_all.dart' as element;
 
 /// Utility for manually running all tests.
 main() {
   initializeTestEnvironment();
   group('dart tests', () {
+    ast.main();
+    constant.main();
     element.main();
   });
 }
diff --git a/pkg/analyzer/test/src/summary/flat_buffers_test.dart b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
index 076df23..b17dc14 100644
--- a/pkg/analyzer/test/src/summary/flat_buffers_test.dart
+++ b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
@@ -345,7 +345,7 @@
     }
     // read and verify
     BufferPointer root = new BufferPointer.fromBytes(byteList);
-    List<int> items = const ListReader<int>(const Uint32Reader()).read(root);
+    List<int> items = const Uint32ListReader().read(root);
     expect(items, hasLength(3));
     expect(items, orderedEquals(<int>[1, 2, 0x9ABCDEF0]));
   }
@@ -354,14 +354,14 @@
     List<int> byteList;
     {
       Builder builder = new Builder(initialSize: 0);
-      Offset offset = builder.writeListUint8(<int>[1, 2, 0x9A]);
+      Offset offset = builder.writeListUint8(<int>[1, 2, 3, 4, 0x9A]);
       byteList = builder.finish(offset);
     }
     // read and verify
     BufferPointer root = new BufferPointer.fromBytes(byteList);
-    List<int> items = const ListReader<int>(const Uint8Reader()).read(root);
-    expect(items, hasLength(3));
-    expect(items, orderedEquals(<int>[1, 2, 0x9A]));
+    List<int> items = const Uint8ListReader().read(root);
+    expect(items, hasLength(5));
+    expect(items, orderedEquals(<int>[1, 2, 3, 4, 0x9A]));
   }
 }
 
diff --git a/pkg/analyzer/test/src/summary/in_summary_source_test.dart b/pkg/analyzer/test/src/summary/in_summary_source_test.dart
new file mode 100644
index 0000000..f45602c
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/in_summary_source_test.dart
@@ -0,0 +1,78 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.src.summary.in_summary_source_test;
+
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:path/path.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../reflective_tests.dart';
+
+main() {
+  groupSep = ' | ';
+  runReflectiveTests(InSummarySourceTest);
+}
+
+@reflectiveTest
+class InSummarySourceTest extends ReflectiveTest {
+  test_fallbackPath() {
+    String fooFallbackPath = absolute('path', 'to', 'foo.dart');
+    var sourceFactory = new SourceFactory([
+      new InSummaryPackageUriResolver(new MockSummaryDataStore.fake(
+          {'package:foo/foo.dart': 'foo.sum',},
+          uriToFallbackModePath: {'package:foo/foo.dart': fooFallbackPath}))
+    ]);
+
+    InSummarySource source = sourceFactory.forUri('package:foo/foo.dart');
+    expect(source, new isInstanceOf<FileBasedSource>());
+    expect(source.fullName, fooFallbackPath);
+  }
+
+  test_InSummarySource() {
+    var sourceFactory = new SourceFactory([
+      new InSummaryPackageUriResolver(new MockSummaryDataStore.fake({
+        'package:foo/foo.dart': 'foo.sum',
+        'package:foo/src/foo_impl.dart': 'foo.sum',
+        'package:bar/baz.dart': 'bar.sum',
+      }))
+    ]);
+
+    InSummarySource source = sourceFactory.forUri('package:foo/foo.dart');
+    expect(source, isNot(new isInstanceOf<FileBasedSource>()));
+    expect(source.summaryPath, 'foo.sum');
+
+    source = sourceFactory.forUri('package:foo/src/foo_impl.dart');
+    expect(source, isNot(new isInstanceOf<FileBasedSource>()));
+    expect(source.summaryPath, 'foo.sum');
+
+    source = sourceFactory.forUri('package:bar/baz.dart');
+    expect(source, isNot(new isInstanceOf<FileBasedSource>()));
+    expect(source.summaryPath, 'bar.sum');
+  }
+}
+
+class MockSummaryDataStore implements SummaryDataStore {
+  final Map<String, LinkedLibrary> linkedMap;
+  final Map<String, UnlinkedUnit> unlinkedMap;
+  final Map<String, String> uriToSummaryPath;
+
+  MockSummaryDataStore(this.linkedMap, this.unlinkedMap, this.uriToSummaryPath);
+
+  factory MockSummaryDataStore.fake(Map<String, String> uriToSummary,
+      {Map<String, String> uriToFallbackModePath: const {}}) {
+    // Create fake unlinked map.
+    // We don't populate the values as it is not needed for the test.
+    var unlinkedMap = new Map<String, UnlinkedUnit>.fromIterable(
+        uriToSummary.keys,
+        value: (uri) => new UnlinkedUnitBuilder(
+            fallbackModePath: uriToFallbackModePath[uri]));
+    return new MockSummaryDataStore(null, unlinkedMap, uriToSummary);
+  }
+
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
diff --git a/pkg/analyzer/test/src/summary/incremental_cache_test.dart b/pkg/analyzer/test/src/summary/incremental_cache_test.dart
new file mode 100644
index 0000000..bf7620a
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/incremental_cache_test.dart
@@ -0,0 +1,187 @@
+// 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/src/generated/source.dart';
+import 'package:analyzer/src/summary/incremental_cache.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../reflective_tests.dart';
+import '../abstract_single_unit.dart';
+
+main() {
+  groupSep = ' | ';
+  runReflectiveTests(IncrementalCacheTest);
+}
+
+/**
+ * TODO(scheglov) write more tests for invalidation.
+ */
+@reflectiveTest
+class IncrementalCacheTest extends AbstractSingleUnitTest {
+  _TestCacheStorage storage = new _TestCacheStorage();
+  IncrementalCache cache;
+
+  Source putLibrary(String path, String code) {
+    Source source = addSource(path, code);
+    LibraryElement libraryElement = context.computeLibraryElement(source);
+    cache.putLibrary(libraryElement);
+    return source;
+  }
+
+  void putTestLibrary(String code) {
+    resolveTestUnit(code);
+    cache.putLibrary(testLibraryElement);
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    cache = new IncrementalCache(storage, context, <int>[]);
+  }
+
+  void test_getLibraryClosureBundles_emptyCache() {
+    resolveTestUnit('main() {}');
+    // the cache is empty, no bundles
+    List<LibraryBundleWithId> bundles =
+        cache.getLibraryClosureBundles(testSource);
+    expect(bundles, isNull);
+  }
+
+  void test_getLibraryClosureBundles_exportLib() {
+    Source aSource = putLibrary('/a.dart', '');
+    putTestLibrary(r'''
+import 'a.dart';
+main() {}
+''');
+    List<LibraryBundleWithId> bundles =
+        cache.getLibraryClosureBundles(testSource);
+    expect(bundles, isNotNull);
+    expect(_getBundleSources(bundles), [testSource, aSource].toSet());
+    // remove the 'a.dart' bundle, 'test.dart' loading fails
+    cache.clearInternalCaches();
+    storage.map.remove(_findBundleForSource(bundles, aSource).id);
+    expect(cache.getLibraryClosureBundles(testSource), isNull);
+  }
+
+  void test_getLibraryClosureBundles_importLib() {
+    Source aSource = putLibrary('/a.dart', '');
+    putTestLibrary(r'''
+import 'a.dart';
+main() {}
+''');
+    List<LibraryBundleWithId> bundles =
+        cache.getLibraryClosureBundles(testSource);
+    expect(bundles, isNotNull);
+    expect(_getBundleSources(bundles), [testSource, aSource].toSet());
+    // remove the 'a.dart' bundle, 'test.dart' loading fails
+    cache.clearInternalCaches();
+    storage.map.remove(_findBundleForSource(bundles, aSource).id);
+    expect(cache.getLibraryClosureBundles(testSource), isNull);
+  }
+
+  void test_getLibraryClosureBundles_importLib2() {
+    Source aSource = putLibrary('/a.dart', '');
+    Source bSource = putLibrary('/b.dart', "import 'a.dart';");
+    putTestLibrary(r'''
+import 'b.dart';
+main() {}
+''');
+    List<LibraryBundleWithId> bundles =
+        cache.getLibraryClosureBundles(testSource);
+    expect(bundles, isNotNull);
+    expect(_getBundleSources(bundles), [testSource, aSource, bSource].toSet());
+    // remove the 'a.dart' bundle, 'test.dart' loading fails
+    cache.clearInternalCaches();
+    storage.map.remove(_findBundleForSource(bundles, aSource).id);
+    expect(cache.getLibraryClosureBundles(testSource), isNull);
+  }
+
+  void test_getLibraryClosureBundles_importSdk() {
+    putTestLibrary(r'''
+import 'dart:async';
+main() {}
+''');
+    List<LibraryBundleWithId> bundles =
+        cache.getLibraryClosureBundles(testSource);
+    expect(bundles, isNotNull);
+    expect(_getBundleSources(bundles), [testSource].toSet());
+  }
+
+  void test_getLibraryClosureBundles_onlyLibrary() {
+    putTestLibrary(r'''
+main() {}
+''');
+    // the cache is empty, no bundles
+    List<LibraryBundleWithId> bundles =
+        cache.getLibraryClosureBundles(testSource);
+    expect(bundles, isNotNull);
+  }
+
+  void test_getSourceKind_library() {
+    putTestLibrary(r'''
+main() {}
+''');
+    expect(cache.getSourceKind(testSource), SourceKind.LIBRARY);
+  }
+
+  void test_getSourceKind_library_usedAsPart() {
+    verifyNoTestUnitErrors = false;
+    Source fooSource = addSource(
+        '/foo.dart',
+        r'''
+import 'dart:math';
+''');
+    putTestLibrary(r'''
+part 'foo.dart';
+main() {}
+''');
+    expect(cache.getSourceKind(testSource), SourceKind.LIBRARY);
+    // not a part, but also not enough information to write it as a library
+    expect(cache.getSourceKind(fooSource), isNull);
+  }
+
+  void test_getSourceKind_notCached() {
+    resolveTestUnit(r'''
+main() {}
+''');
+    expect(cache.getSourceKind(testSource), isNull);
+  }
+
+  void test_getSourceKind_part() {
+    Source partSource = addSource('/foo.dart', 'part of lib;');
+    putTestLibrary(r'''
+library lib;
+part 'foo.dart';
+''');
+    expect(cache.getSourceKind(testSource), SourceKind.LIBRARY);
+    expect(cache.getSourceKind(partSource), SourceKind.PART);
+  }
+
+  LibraryBundleWithId _findBundleForSource(
+      List<LibraryBundleWithId> bundles, Source source) {
+    return bundles.singleWhere((b) => b.source == source);
+  }
+
+  Set<Source> _getBundleSources(List<LibraryBundleWithId> bundles) {
+    return bundles.map((b) => b.source).toSet();
+  }
+}
+
+/**
+ * A [Map] based [CacheStorage].
+ */
+class _TestCacheStorage implements CacheStorage {
+  final Map<String, List<int>> map = <String, List<int>>{};
+
+  @override
+  List<int> get(String key) {
+    return map[key];
+  }
+
+  @override
+  void put(String key, List<int> bytes) {
+    map[key] = bytes;
+  }
+}
diff --git a/pkg/analyzer/test/src/summary/index_unit_test.dart b/pkg/analyzer/test/src/summary/index_unit_test.dart
index bfa331f..cb18d02 100644
--- a/pkg/analyzer/test/src/summary/index_unit_test.dart
+++ b/pkg/analyzer/test/src/summary/index_unit_test.dart
@@ -41,7 +41,8 @@
   UnitIndex unitIndex;
 
   _ElementIndexAssert assertThat(Element element) {
-    return new _ElementIndexAssert(this, element);
+    List<_Relation> relations = _getElementRelations(element);
+    return new _ElementIndexAssert(this, element, relations);
   }
 
   _NameIndexAssert assertThatName(String name) {
@@ -98,6 +99,11 @@
     _assertDefinedName('A', IndexNameKind.topLevel, 'A {}');
   }
 
+  void test_definedName_topLevel_class2() {
+    _indexTestUnit('class A {}', declOnly: true);
+    _assertDefinedName('A', IndexNameKind.topLevel, 'A {}');
+  }
+
   void test_definedName_topLevel_classAlias() {
     _indexTestUnit('''
 class M {}
@@ -139,6 +145,43 @@
     _assertDefinedName('V', IndexNameKind.topLevel, 'V = 42;');
   }
 
+  void test_hasAncestor_ClassDeclaration() {
+    _indexTestUnit('''
+class A {}
+class B1 extends A {}
+class B2 implements A {}
+class C1 extends B1 {}
+class C2 extends B2 {}
+class C3 implements B1 {}
+class C4 implements B2 {}
+class M extends Object with A {}
+''');
+    ClassElement classElementA = findElement("A");
+    assertThat(classElementA)
+      ..isAncestorOf('B1 extends A')
+      ..isAncestorOf('B2 implements A')
+      ..isAncestorOf('C1 extends B1')
+      ..isAncestorOf('C2 extends B2')
+      ..isAncestorOf('C3 implements B1')
+      ..isAncestorOf('C4 implements B2')
+      ..isAncestorOf('M extends Object with A');
+  }
+
+  void test_hasAncestor_ClassTypeAlias() {
+    _indexTestUnit('''
+class A {}
+class B extends A {}
+class C1 = Object with A;
+class C2 = Object with B;
+''');
+    ClassElement classElementA = findElement('A');
+    ClassElement classElementB = findElement('B');
+    assertThat(classElementA)
+      ..isAncestorOf('C1 = Object with A')
+      ..isAncestorOf('C2 = Object with B');
+    assertThat(classElementB)..isAncestorOf('C2 = Object with B');
+  }
+
   void test_isExtendedBy_ClassDeclaration() {
     _indexTestUnit('''
 class A {} // 1
@@ -146,8 +189,8 @@
 ''');
     ClassElement elementA = findElement('A');
     assertThat(elementA)
-      ..isExtendedAt('A {} // 2', true)
-      ..isReferencedAt('A {} // 2', true);
+      ..isExtendedAt('A {} // 2', false)
+      ..isReferencedAt('A {} // 2', false);
   }
 
   void test_isExtendedBy_ClassDeclaration_isQualified() {
@@ -181,6 +224,23 @@
 ''');
     ClassElement elementA = findElement('A');
     assertThat(elementA)
+      ..isExtendedAt('A with', false)
+      ..isReferencedAt('A with', false);
+  }
+
+  void test_isExtendedBy_ClassTypeAlias_isQualified() {
+    addSource(
+        '/lib.dart',
+        '''
+class A {}
+''');
+    _indexTestUnit('''
+import 'lib.dart' as p;
+class B {}
+class C = p.A with B;
+''');
+    ClassElement elementA = importedUnit().getType('A');
+    assertThat(elementA)
       ..isExtendedAt('A with', true)
       ..isReferencedAt('A with', true);
   }
@@ -192,8 +252,8 @@
 ''');
     ClassElement elementA = findElement('A');
     assertThat(elementA)
-      ..isImplementedAt('A {} // 2', true)
-      ..isReferencedAt('A {} // 2', true);
+      ..isImplementedAt('A {} // 2', false)
+      ..isReferencedAt('A {} // 2', false);
   }
 
   void test_isImplementedBy_ClassDeclaration_isQualified() {
@@ -220,8 +280,8 @@
 ''');
     ClassElement elementB = findElement('B');
     assertThat(elementB)
-      ..isImplementedAt('B; // 3', true)
-      ..isReferencedAt('B; // 3', true);
+      ..isImplementedAt('B; // 3', false)
+      ..isReferencedAt('B; // 3', false);
   }
 
   void test_isInvokedBy_FieldElement() {
@@ -259,6 +319,21 @@
       ..isInvokedAt('foo(); // nq', false);
   }
 
+  void test_isInvokedBy_FunctionElement_synthetic_loadLibrary() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+import 'dart:math' deferred as math;
+main() {
+  math.loadLibrary(); // 1
+  math.loadLibrary(); // 2
+}
+''');
+    LibraryElement mathLib = testLibraryElement.imports[0].importedLibrary;
+    FunctionElement element = mathLib.loadLibraryFunction;
+    assertThat(element).isInvokedAt('loadLibrary(); // 1', true);
+    assertThat(element).isInvokedAt('loadLibrary(); // 2', true);
+  }
+
   void test_isInvokedBy_MethodElement() {
     _indexTestUnit('''
 class A {
@@ -338,6 +413,21 @@
     assertThat(element).isInvokedAt('~a', true, length: 1);
   }
 
+  void test_isInvokedBy_PropertyAccessorElement_getter() {
+    _indexTestUnit('''
+class A {
+  get ggg => null;
+  main() {
+    this.ggg(); // q
+    ggg(); // nq
+  }
+}''');
+    PropertyAccessorElement element = findElement('ggg', ElementKind.GETTER);
+    assertThat(element)
+      ..isInvokedAt('ggg(); // q', true)
+      ..isInvokedAt('ggg(); // nq', false);
+  }
+
   void test_isMixedInBy_ClassDeclaration() {
     _indexTestUnit('''
 class A {} // 1
@@ -345,8 +435,8 @@
 ''');
     ClassElement elementA = findElement('A');
     assertThat(elementA)
-      ..isMixedInAt('A {} // 2', true)
-      ..isReferencedAt('A {} // 2', true);
+      ..isMixedInAt('A {} // 2', false)
+      ..isReferencedAt('A {} // 2', false);
   }
 
   void test_isMixedInBy_ClassDeclaration_isQualified() {
@@ -369,7 +459,7 @@
 class B = Object with A; // 2
 ''');
     ClassElement elementA = findElement('A');
-    assertThat(elementA).isMixedInAt('A; // 2', true);
+    assertThat(elementA).isMixedInAt('A; // 2', false);
   }
 
   void test_isReferencedBy_ClassElement() {
@@ -491,10 +581,12 @@
     ConstructorElement constA_foo = classA.constructors[1];
     // A()
     assertThat(constA)
+      ..hasRelationCount(2)
       ..isReferencedAt('(); // 1', true, length: 0)
       ..isReferencedAt('(); // 4', true, length: 0);
     // A.foo()
     assertThat(constA_foo)
+      ..hasRelationCount(3)
       ..isReferencedAt('.foo(); // 2', true, length: 4)
       ..isReferencedAt('.foo; // 3', true, length: 4)
       ..isReferencedAt('.foo(); // 5', true, length: 4);
@@ -540,6 +632,22 @@
     // No additional validation, but it should not fail with stack overflow.
   }
 
+  void test_isReferencedBy_ConstructorElement_namedOnlyWithDot() {
+    _indexTestUnit('''
+class A {
+  A.named() {}
+}
+main() {
+  new A.named();
+}
+''');
+    // has ".named()", but does not have "named()"
+    int offsetWithoutDot = findOffset('named();');
+    int offsetWithDot = findOffset('.named();');
+    expect(unitIndex.usedElementOffsets, isNot(contains(offsetWithoutDot)));
+    expect(unitIndex.usedElementOffsets, contains(offsetWithDot));
+  }
+
   void test_isReferencedBy_ConstructorElement_redirection() {
     _indexTestUnit('''
 class A {
@@ -555,15 +663,24 @@
     assertThat(constA_bar).isReferencedAt('.bar(); // 1', true, length: 4);
   }
 
-  void test_isReferencedBy_ConstructorFieldInitializer() {
+  void test_isReferencedBy_ConstructorElement_synthetic() {
     _indexTestUnit('''
-class A {
-  int field;
-  A() : field = 5;
+class A {}
+main() {
+  new A(); // 1
 }
 ''');
-    FieldElement element = findElement('field');
-    assertThat(element).isReferencedAt('field = 5', true);
+    ClassElement classA = findElement('A');
+    ConstructorElement constA = classA.constructors[0];
+    // A()
+    assertThat(constA)..isReferencedAt('(); // 1', true, length: 0);
+  }
+
+  void test_isReferencedBy_DynamicElement() {
+    _indexTestUnit('''
+dynamic f() {
+}''');
+    expect(unitIndex.usedElementOffsets, isEmpty);
   }
 
   void test_isReferencedBy_FieldElement() {
@@ -572,28 +689,120 @@
   var field;
   A({this.field});
   m() {
-    field = 1; // nq
+    field = 2; // nq
     print(field); // nq
   }
 }
 main(A a) {
-  a.field = 2; // q
+  a.field = 3; // q
   print(a.field); // q
-  new A(field: 3);
+  new A(field: 4);
 }
 ''');
     FieldElement field = findElement('field');
     PropertyAccessorElement getter = field.getter;
     PropertyAccessorElement setter = field.setter;
     // A()
-    assertThat(field)..isReferencedAt('field});', true);
+    assertThat(field)..isWrittenAt('field});', true);
     // m()
-    assertThat(setter)..isReferencedAt('field = 1; // nq', false);
+    assertThat(setter)..isReferencedAt('field = 2; // nq', false);
     assertThat(getter)..isReferencedAt('field); // nq', false);
     // main()
-    assertThat(setter)..isReferencedAt('field = 2; // q', true);
+    assertThat(setter)..isReferencedAt('field = 3; // q', true);
     assertThat(getter)..isReferencedAt('field); // q', true);
-    assertThat(field)..isReferencedAt('field: 3', true);
+    assertThat(field)..isReferencedAt('field: 4', true);
+  }
+
+  void test_isReferencedBy_FieldElement_multiple() {
+    _indexTestUnit('''
+class A {
+  var aaa;
+  var bbb;
+  A(this.aaa, this.bbb) {}
+  m() {
+    print(aaa);
+    aaa = 1;
+    print(bbb);
+    bbb = 2;
+  }
+}
+''');
+    // aaa
+    {
+      FieldElement field = findElement('aaa');
+      PropertyAccessorElement getter = field.getter;
+      PropertyAccessorElement setter = field.setter;
+      assertThat(field)..isWrittenAt('aaa, ', true);
+      assertThat(getter)..isReferencedAt('aaa);', false);
+      assertThat(setter)..isReferencedAt('aaa = 1;', false);
+    }
+    // bbb
+    {
+      FieldElement field = findElement('bbb');
+      PropertyAccessorElement getter = field.getter;
+      PropertyAccessorElement setter = field.setter;
+      assertThat(field)..isWrittenAt('bbb) {}', true);
+      assertThat(getter)..isReferencedAt('bbb);', false);
+      assertThat(setter)..isReferencedAt('bbb = 2;', false);
+    }
+  }
+
+  void test_isReferencedBy_FieldElement_ofEnum() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+enum MyEnum {
+  A, B, C
+}
+main() {
+  print(MyEnum.values);
+  print(MyEnum.A.index);
+  print(MyEnum.A);
+  print(MyEnum.B);
+}
+''');
+    ClassElement enumElement = findElement('MyEnum');
+    assertThat(enumElement.getGetter('values'))
+      ..isReferencedAt('values);', true);
+    assertThat(enumElement.getGetter('index'))..isReferencedAt('index);', true);
+    assertThat(enumElement.getGetter('A'))..isReferencedAt('A);', true);
+    assertThat(enumElement.getGetter('B'))..isReferencedAt('B);', true);
+  }
+
+  void test_isReferencedBy_FieldElement_synthetic_hasGetter() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+class A {
+  A() : f = 42;
+  int get f => 0;
+}
+''');
+    ClassElement element2 = findElement('A');
+    assertThat(element2.getField('f')).isWrittenAt('f = 42', true);
+  }
+
+  void test_isReferencedBy_FieldElement_synthetic_hasGetterSetter() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+class A {
+  A() : f = 42;
+  int get f => 0;
+  set f(_) {}
+}
+''');
+    ClassElement element2 = findElement('A');
+    assertThat(element2.getField('f')).isWrittenAt('f = 42', true);
+  }
+
+  void test_isReferencedBy_FieldElement_synthetic_hasSetter() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+class A {
+  A() : f = 42;
+  set f(_) {}
+}
+''');
+    ClassElement element2 = findElement('A');
+    assertThat(element2.getField('f')).isWrittenAt('f = 42', true);
   }
 
   void test_isReferencedBy_FunctionElement() {
@@ -689,6 +898,35 @@
       ..isReferencedAt('V = 5; // nq', false);
   }
 
+  void test_isReferencedBy_TopLevelVariableElement_synthetic_hasGetterSetter() {
+    verifyNoTestUnitErrors = false;
+    addSource(
+        '/lib.dart',
+        '''
+int get V => 0;
+void set V(_) {}
+''');
+    _indexTestUnit('''
+import 'lib.dart' show V;
+''');
+    TopLevelVariableElement element = importedUnit().topLevelVariables[0];
+    assertThat(element).isReferencedAt('V;', true);
+  }
+
+  void test_isReferencedBy_TopLevelVariableElement_synthetic_hasSetter() {
+    verifyNoTestUnitErrors = false;
+    addSource(
+        '/lib.dart',
+        '''
+void set V(_) {}
+''');
+    _indexTestUnit('''
+import 'lib.dart' show V;
+''');
+    TopLevelVariableElement element = importedUnit().topLevelVariables[0];
+    assertThat(element).isReferencedAt('V;', true);
+  }
+
   void test_isReferencedBy_typeInVariableList() {
     _indexTestUnit('''
 class A {}
@@ -698,46 +936,108 @@
     assertThat(element).isReferencedAt('A myVariable', false);
   }
 
-  void test_usedName_isInvokedBy() {
-    verifyNoTestUnitErrors = false;
+  void test_isWrittenBy_FieldElement() {
     _indexTestUnit('''
-class C {
-  x() {}
-}
-main(C c) {
-  x(); // nq
-  c.x(); // q
-  y(); // nq
-  c.y(); // q
+class A {
+  int field;
+  A.foo({this.field});
+  A.bar() : field = 5;
 }
 ''');
-    assertThatName('x')
-      ..isNotInvokedAt('x(); // nq')
-      ..isNotInvokedAt('x(); // q');
-    assertThatName('y')
-      ..isNotInvokedAt('y(); // nq')
-      ..isInvokedAt('y(); // q');
+    FieldElement element = findElement('field');
+    assertThat(element)
+      ..isWrittenAt('field})', true)
+      ..isWrittenAt('field = 5', true);
   }
 
-  void test_usedName_isReferencedBy() {
+  void test_usedName_inLibraryIdentifier() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+library aaa.bbb.ccc;
+class C {
+  var bbb;
+}
+main(p) {
+  p.bbb = 1;
+}
+''');
+    assertThatName('bbb')
+      ..isNotUsed('bbb.ccc', IndexRelationKind.IS_READ_BY)
+      ..isUsedQ('bbb = 1;', IndexRelationKind.IS_WRITTEN_BY);
+  }
+
+  void test_usedName_qualified_resolved() {
     verifyNoTestUnitErrors = false;
     _indexTestUnit('''
 class C {
-  int x;
+  var x;
 }
 main(C c) {
-  x; // nq
-  c.x; // q
-  y; // nq
-  c.y; // q
+  c.x;
+  c.x = 1;
+  c.x += 2;
+  c.x();
 }
 ''');
     assertThatName('x')
-      ..isNotReferencedAt('x; // nq')
-      ..isNotReferencedAt('x; // q');
-    assertThatName('y')
-      ..isNotReferencedAt('y; // nq')
-      ..isReferencedAt('y; // q');
+      ..isNotUsedQ('x;', IndexRelationKind.IS_READ_BY)
+      ..isNotUsedQ('x = 1;', IndexRelationKind.IS_WRITTEN_BY)
+      ..isNotUsedQ('x += 2;', IndexRelationKind.IS_READ_WRITTEN_BY)
+      ..isNotUsedQ('x();', IndexRelationKind.IS_INVOKED_BY);
+  }
+
+  void test_usedName_qualified_unresolved() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+main(p) {
+  p.x;
+  p.x = 1;
+  p.x += 2;
+  p.x();
+}
+''');
+    assertThatName('x')
+      ..isUsedQ('x;', IndexRelationKind.IS_READ_BY)
+      ..isUsedQ('x = 1;', IndexRelationKind.IS_WRITTEN_BY)
+      ..isUsedQ('x += 2;', IndexRelationKind.IS_READ_WRITTEN_BY)
+      ..isUsedQ('x();', IndexRelationKind.IS_INVOKED_BY);
+  }
+
+  void test_usedName_unqualified_resolved() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+class C {
+  var x;
+  m() {
+    x;
+    x = 1;
+    x += 2;
+    x();
+  }
+}
+''');
+    assertThatName('x')
+      ..isNotUsedQ('x;', IndexRelationKind.IS_READ_BY)
+      ..isNotUsedQ('x = 1;', IndexRelationKind.IS_WRITTEN_BY)
+      ..isNotUsedQ('x += 2;', IndexRelationKind.IS_READ_WRITTEN_BY)
+      ..isNotUsedQ('x();', IndexRelationKind.IS_INVOKED_BY);
+  }
+
+  void test_usedName_unqualified_unresolved() {
+    verifyNoTestUnitErrors = false;
+    _indexTestUnit('''
+main() {
+  x;
+  x = 1;
+  x += 2;
+  x();
+}
+''');
+    assertThatName('x')
+      ..isUsed('x;', IndexRelationKind.IS_READ_BY)
+      ..isUsed('x = 1;', IndexRelationKind.IS_WRITTEN_BY)
+      ..isUsed('x += 2;', IndexRelationKind.IS_READ_WRITTEN_BY)
+      ..isUsed('x();', IndexRelationKind.IS_INVOKED_BY);
   }
 
   void _assertDefinedName(String name, IndexNameKind kind, String search) {
@@ -758,16 +1058,14 @@
    */
   void _assertHasRelation(
       Element element,
+      List<_Relation> relations,
       IndexRelationKind expectedRelationKind,
       ExpectedLocation expectedLocation) {
-    int elementId = _findElementId(element);
-    for (int i = 0; i < unitIndex.usedElementOffsets.length; i++) {
-      if (unitIndex.usedElements[i] == elementId &&
-          unitIndex.usedElementKinds[i] == expectedRelationKind &&
-          unitIndex.usedElementOffsets[i] == expectedLocation.offset &&
-          unitIndex.usedElementLengths[i] == expectedLocation.length &&
-          unitIndex.usedElementIsQualifiedFlags[i] ==
-              expectedLocation.isQualified) {
+    for (_Relation relation in relations) {
+      if (relation.kind == expectedRelationKind &&
+          relation.offset == expectedLocation.offset &&
+          relation.length == expectedLocation.length &&
+          relation.isQualified == expectedLocation.isQualified) {
         return;
       }
     }
@@ -781,7 +1079,9 @@
     for (int i = 0; i < unitIndex.usedNames.length; i++) {
       if (unitIndex.usedNames[i] == nameId &&
           unitIndex.usedNameKinds[i] == kind &&
-          unitIndex.usedNameOffsets[i] == expectedLocation.offset) {
+          unitIndex.usedNameOffsets[i] == expectedLocation.offset &&
+          unitIndex.usedNameIsQualifiedFlags[i] ==
+              expectedLocation.isQualified) {
         if (isNot) {
           _failWithIndexDump('Unexpected $name $kind at $expectedLocation');
         }
@@ -814,18 +1114,13 @@
    */
   int _findElementId(Element element) {
     int unitId = _getUnitId(element);
-    int offset = element.nameOffset;
-    if (element is LibraryElement || element is CompilationUnitElement) {
-      offset = 0;
-    }
-    IndexSyntheticElementKind kind =
-        PackageIndexAssembler.getIndexElementKind(element);
+    ElementInfo info = PackageIndexAssembler.newElementInfo(unitId, element);
     for (int elementId = 0;
         elementId < packageIndex.elementUnits.length;
         elementId++) {
       if (packageIndex.elementUnits[elementId] == unitId &&
-          packageIndex.elementOffsets[elementId] == offset &&
-          packageIndex.elementKinds[elementId] == kind) {
+          packageIndex.elementOffsets[elementId] == info.offset &&
+          packageIndex.elementKinds[elementId] == info.kind) {
         return elementId;
       }
     }
@@ -833,6 +1128,24 @@
     return 0;
   }
 
+  /**
+   * Return all relations with [element] in [unitIndex].
+   */
+  List<_Relation> _getElementRelations(Element element) {
+    int elementId = _findElementId(element);
+    List<_Relation> relations = <_Relation>[];
+    for (int i = 0; i < unitIndex.usedElementOffsets.length; i++) {
+      if (unitIndex.usedElements[i] == elementId) {
+        relations.add(new _Relation(
+            unitIndex.usedElementKinds[i],
+            unitIndex.usedElementOffsets[i],
+            unitIndex.usedElementLengths[i],
+            unitIndex.usedElementIsQualifiedFlags[i]));
+      }
+    }
+    return relations;
+  }
+
   int _getStringId(String str) {
     int id = packageIndex.strings.indexOf(str);
     expect(id, isNonNegative);
@@ -861,10 +1174,14 @@
     return _getStringId(str);
   }
 
-  void _indexTestUnit(String code) {
+  void _indexTestUnit(String code, {bool declOnly: false}) {
     resolveTestUnit(code);
     PackageIndexAssembler assembler = new PackageIndexAssembler();
-    assembler.index(testUnit);
+    if (declOnly) {
+      assembler.indexDeclarations(testUnit);
+    } else {
+      assembler.indexUnit(testUnit);
+    }
     // assemble, write and read
     PackageIndexBuilder indexBuilder = assembler.assemble();
     List<int> indexBytes = indexBuilder.toBuffer();
@@ -879,31 +1196,61 @@
 class _ElementIndexAssert {
   final PackageIndexAssemblerTest test;
   final Element element;
+  final List<_Relation> relations;
 
-  _ElementIndexAssert(this.test, this.element);
+  _ElementIndexAssert(this.test, this.element, this.relations);
+
+  void hasRelationCount(int expectedCount) {
+    expect(relations, hasLength(expectedCount));
+  }
+
+  void isAncestorOf(String search, {int length}) {
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_ANCESTOR_OF,
+        test._expectedLocation(search, false, length: length));
+  }
 
   void isExtendedAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(element, IndexRelationKind.IS_EXTENDED_BY,
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_EXTENDED_BY,
         test._expectedLocation(search, isQualified, length: length));
   }
 
   void isImplementedAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(element, IndexRelationKind.IS_IMPLEMENTED_BY,
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_IMPLEMENTED_BY,
         test._expectedLocation(search, isQualified, length: length));
   }
 
   void isInvokedAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(element, IndexRelationKind.IS_INVOKED_BY,
+    test._assertHasRelation(element, relations, IndexRelationKind.IS_INVOKED_BY,
         test._expectedLocation(search, isQualified, length: length));
   }
 
   void isMixedInAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(element, IndexRelationKind.IS_MIXED_IN_BY,
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_MIXED_IN_BY,
         test._expectedLocation(search, isQualified, length: length));
   }
 
   void isReferencedAt(String search, bool isQualified, {int length}) {
-    test._assertHasRelation(element, IndexRelationKind.IS_REFERENCED_BY,
+    test._assertHasRelation(
+        element,
+        relations,
+        IndexRelationKind.IS_REFERENCED_BY,
+        test._expectedLocation(search, isQualified, length: length));
+  }
+
+  void isWrittenAt(String search, bool isQualified, {int length}) {
+    test._assertHasRelation(element, relations, IndexRelationKind.IS_WRITTEN_BY,
         test._expectedLocation(search, isQualified, length: length));
   }
 }
@@ -914,23 +1261,38 @@
 
   _NameIndexAssert(this.test, this.name);
 
-  void isInvokedAt(String search, {int length}) {
-    test._assertUsedName(name, IndexRelationKind.IS_INVOKED_BY,
-        test._expectedLocation(search, true, length: length), false);
+  void isNotUsed(String search, IndexRelationKind kind) {
+    test._assertUsedName(
+        name, kind, test._expectedLocation(search, false), true);
   }
 
-  void isNotInvokedAt(String search, {int length}) {
-    test._assertUsedName(name, IndexRelationKind.IS_INVOKED_BY,
-        test._expectedLocation(search, true, length: length), true);
+  void isNotUsedQ(String search, IndexRelationKind kind) {
+    test._assertUsedName(
+        name, kind, test._expectedLocation(search, true), true);
   }
 
-  void isNotReferencedAt(String search, {int length}) {
-    test._assertUsedName(name, IndexRelationKind.IS_REFERENCED_BY,
-        test._expectedLocation(search, true, length: length), true);
+  void isUsed(String search, IndexRelationKind kind) {
+    test._assertUsedName(
+        name, kind, test._expectedLocation(search, false), false);
   }
 
-  void isReferencedAt(String search, {int length}) {
-    test._assertUsedName(name, IndexRelationKind.IS_REFERENCED_BY,
-        test._expectedLocation(search, true, length: length), false);
+  void isUsedQ(String search, IndexRelationKind kind) {
+    test._assertUsedName(
+        name, kind, test._expectedLocation(search, true), false);
+  }
+}
+
+class _Relation {
+  final IndexRelationKind kind;
+  final int offset;
+  final int length;
+  final bool isQualified;
+
+  _Relation(this.kind, this.offset, this.length, this.isQualified);
+
+  @override
+  String toString() {
+    return '_Relation{kind: $kind, offset: $offset, length: $length, '
+        'isQualified: $isQualified}';
   }
 }
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
new file mode 100644
index 0000000..81499ae
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -0,0 +1,400 @@
+// 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/summary/format.dart';
+import 'package:analyzer/src/summary/link.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../reflective_tests.dart';
+import 'summarize_ast_test.dart';
+
+main() {
+  groupSep = ' | ';
+  runReflectiveTests(LinkerUnitTest);
+}
+
+@reflectiveTest
+class LinkerUnitTest extends SummaryLinkerTest {
+  Linker linker;
+
+  LinkerInputs linkerInputs;
+  LibraryElementInBuildUnit _testLibrary;
+  @override
+  bool get allowMissingFiles => false;
+
+  LibraryElementInBuildUnit get testLibrary => _testLibrary ??=
+      linker.getLibrary(linkerInputs.testDartUri) as LibraryElementInBuildUnit;
+
+  void createLinker(String text, {String path: '/test.dart'}) {
+    linkerInputs = createLinkerInputs(text, path: path);
+    Map<String, LinkedLibraryBuilder> linkedLibraries =
+        setupForLink(linkerInputs.linkedLibraries, linkerInputs.getUnit);
+    linker = new Linker(linkedLibraries, linkerInputs.getDependency,
+        linkerInputs.getUnit, true);
+  }
+
+  LibraryElementForLink getLibrary(String uri) {
+    return linker.getLibrary(Uri.parse(uri));
+  }
+
+  void test_inferredType_instanceField_dynamic() {
+    createLinker('''
+var x;
+class C {
+  var f = x; // Inferred type: dynamic
+}
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    library.libraryCycleForLink.ensureLinked();
+    ClassElementForLink_Class cls = library.getContainedName('C');
+    expect(cls.fields, hasLength(1));
+    var field = cls.fields[0];
+    expect(field.type.toString(), 'dynamic');
+  }
+
+  void test_inferredType_methodParamType_dynamic() {
+    createLinker('''
+clas B {
+  void f(dynamic x) {}
+}
+class C extends B {
+  f(x) {} // Inferred param type: dynamic
+}
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    library.libraryCycleForLink.ensureLinked();
+    ClassElementForLink_Class cls = library.getContainedName('C');
+    expect(cls.methods, hasLength(1));
+    var method = cls.methods[0];
+    expect(method.parameters, hasLength(1));
+    expect(method.parameters[0].type.toString(), 'dynamic');
+  }
+
+  void test_inferredType_methodReturnType_dynamic() {
+    createLinker('''
+class B {
+  dynamic f() {}
+}
+class C extends B {
+  f() {} // Inferred return type: dynamic
+}
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    library.libraryCycleForLink.ensureLinked();
+    ClassElementForLink_Class cls = library.getContainedName('C');
+    expect(cls.methods, hasLength(1));
+    expect(cls.methods[0].returnType.toString(), 'dynamic');
+  }
+
+  void test_inferredType_staticField_dynamic() {
+    createLinker('''
+dynamic x = null;
+class C {
+  static var y = x;
+}
+''');
+    expect(
+        linker
+            .getLibrary(linkerInputs.testDartUri)
+            .getContainedName('C')
+            .getContainedName('y')
+            .asTypeInferenceNode
+            .inferredType
+            .toString(),
+        'dynamic');
+  }
+
+  void test_inferredType_topLevelVariable_dynamic() {
+    createLinker('''
+dynamic x = null;
+var y = x;
+''');
+    expect(
+        linker
+            .getLibrary(linkerInputs.testDartUri)
+            .getContainedName('y')
+            .asTypeInferenceNode
+            .inferredType
+            .toString(),
+        'dynamic');
+  }
+
+  void test_inferredTypeFromOutsideBuildUnit_dynamic() {
+    var bundle = createPackageBundle(
+        '''
+var x;
+var y = x; // Inferred type: dynamic
+''',
+        path: '/a.dart');
+    addBundle(bundle);
+    createLinker('''
+import 'a.dart';
+var z = y; // Inferred type: dynamic
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    expect(
+        library
+            .getContainedName('z')
+            .asTypeInferenceNode
+            .inferredType
+            .toString(),
+        'dynamic');
+  }
+
+  void test_inferredTypeFromOutsideBuildUnit_instanceField() {
+    var bundle = createPackageBundle(
+        '''
+class C {
+  var f = 0; // Inferred type: int
+}
+''',
+        path: '/a.dart');
+    addBundle(bundle);
+    createLinker('''
+import 'a.dart';
+var x = new C().f; // Inferred type: int
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    expect(
+        library
+            .getContainedName('x')
+            .asTypeInferenceNode
+            .inferredType
+            .toString(),
+        'int');
+  }
+
+  void test_inferredTypeFromOutsideBuildUnit_methodParamType_viaGeneric() {
+    var bundle = createPackageBundle(
+        '''
+class B {
+  T f<T>(T t) => t;
+}
+class C extends B {
+  f<T>(t) => t; // Inferred param type: T
+}
+''',
+        path: '/a.dart');
+    addBundle(bundle);
+    createLinker('''
+import 'a.dart';
+var x = new C().f(0); // Inferred type: int
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    expect(
+        library
+            .getContainedName('x')
+            .asTypeInferenceNode
+            .inferredType
+            .toString(),
+        'int');
+  }
+
+  void test_inferredType_methodReturnType_void() {
+    createLinker('''
+class B {
+  void f() {}
+}
+class C extends B {
+  f() {}
+}
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    library.libraryCycleForLink.ensureLinked();
+    ClassElementForLink_Class cls = library.getContainedName('C');
+    expect(cls.methods, hasLength(1));
+    expect(cls.methods[0].returnType.toString(), 'void');
+  }
+
+  void test_inferredTypeFromOutsideBuildUnit_methodParamType_viaInheritance() {
+    var bundle = createPackageBundle(
+        '''
+class B {
+  void f(int i) {}
+}
+class C extends B {
+  f(i) {} // Inferred param type: int
+}
+''',
+        path: '/a.dart');
+    addBundle(bundle);
+    createLinker('''
+import 'a.dart';
+class D extends C {
+  f(i) {} // Inferred param type: int
+}
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    library.libraryCycleForLink.ensureLinked();
+    ClassElementForLink_Class cls = library.getContainedName('D');
+    expect(cls.methods, hasLength(1));
+    var method = cls.methods[0];
+    expect(method.parameters, hasLength(1));
+    expect(method.parameters[0].type.toString(), 'int');
+  }
+
+  void test_inferredTypeFromOutsideBuildUnit_methodReturnType_viaCall() {
+    var bundle = createPackageBundle(
+        '''
+class B {
+  int f() => 0;
+}
+class C extends B {
+  f() => 1; // Inferred return type: int
+}
+''',
+        path: '/a.dart');
+    addBundle(bundle);
+    createLinker('''
+import 'a.dart';
+var x = new C().f(); // Inferred type: int
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    expect(
+        library
+            .getContainedName('x')
+            .asTypeInferenceNode
+            .inferredType
+            .toString(),
+        'int');
+  }
+
+  void test_inferredTypeFromOutsideBuildUnit_methodReturnType_viaInheritance() {
+    var bundle = createPackageBundle(
+        '''
+class B {
+  int f() => 0;
+}
+class C extends B {
+  f() => 1; // Inferred return type: int
+}
+''',
+        path: '/a.dart');
+    addBundle(bundle);
+    createLinker('''
+import 'a.dart';
+class D extends C {
+  f() => 2; //Inferred return type: int
+}
+''');
+    LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+    library.libraryCycleForLink.ensureLinked();
+    ClassElementForLink_Class cls = library.getContainedName('D');
+    expect(cls.methods, hasLength(1));
+    expect(cls.methods[0].returnType.toString(), 'int');
+  }
+
+  void test_inferredTypeFromOutsideBuildUnit_staticField() {
+    var bundle =
+        createPackageBundle('class C { static var f = 0; }', path: '/a.dart');
+    addBundle(bundle);
+    createLinker('import "a.dart"; var x = C.f;', path: '/b.dart');
+    expect(
+        linker
+            .getLibrary(linkerInputs.testDartUri)
+            .getContainedName('x')
+            .asTypeInferenceNode
+            .inferredType
+            .toString(),
+        'int');
+  }
+
+  void test_inferredTypeFromOutsideBuildUnit_topLevelVariable() {
+    var bundle = createPackageBundle('var a = 0;', path: '/a.dart');
+    addBundle(bundle);
+    createLinker('import "a.dart"; var b = a;', path: '/b.dart');
+    expect(
+        linker
+            .getLibrary(linkerInputs.testDartUri)
+            .getContainedName('b')
+            .asTypeInferenceNode
+            .inferredType
+            .toString(),
+        'int');
+  }
+
+  void test_libraryCycle_ignoresDependenciesOutsideBuildUnit() {
+    createLinker('import "dart:async";');
+    LibraryCycleForLink libraryCycle = testLibrary.libraryCycleForLink;
+    expect(libraryCycle.dependencies, isEmpty);
+    expect(libraryCycle.libraries, [testLibrary]);
+  }
+
+  void test_libraryCycle_linkEnsuresDependenciesLinked() {
+    addNamedSource('/a.dart', 'import "b.dart";');
+    addNamedSource('/b.dart', '');
+    addNamedSource('/c.dart', '');
+    createLinker('import "a.dart"; import "c.dart";');
+    LibraryElementForLink libA = getLibrary('file:///a.dart');
+    LibraryElementForLink libB = getLibrary('file:///b.dart');
+    LibraryElementForLink libC = getLibrary('file:///c.dart');
+    expect(libA.libraryCycleForLink.node.isEvaluated, isFalse);
+    expect(libB.libraryCycleForLink.node.isEvaluated, isFalse);
+    expect(libC.libraryCycleForLink.node.isEvaluated, isFalse);
+    libA.libraryCycleForLink.ensureLinked();
+    expect(libA.libraryCycleForLink.node.isEvaluated, isTrue);
+    expect(libB.libraryCycleForLink.node.isEvaluated, isTrue);
+    expect(libC.libraryCycleForLink.node.isEvaluated, isFalse);
+  }
+
+  void test_libraryCycle_nontrivial() {
+    addNamedSource('/a.dart', 'import "b.dart";');
+    addNamedSource('/b.dart', 'import "a.dart";');
+    createLinker('');
+    LibraryElementForLink libA = getLibrary('file:///a.dart');
+    LibraryElementForLink libB = getLibrary('file:///b.dart');
+    LibraryCycleForLink libraryCycle = libA.libraryCycleForLink;
+    expect(libB.libraryCycleForLink, same(libraryCycle));
+    expect(libraryCycle.dependencies, isEmpty);
+    expect(libraryCycle.libraries, unorderedEquals([libA, libB]));
+  }
+
+  void test_libraryCycle_nontrivial_dependencies() {
+    addNamedSource('/a.dart', '');
+    addNamedSource('/b.dart', '');
+    addNamedSource('/c.dart', 'import "a.dart"; import "d.dart";');
+    addNamedSource('/d.dart', 'import "b.dart"; import "c.dart";');
+    createLinker('');
+    LibraryElementForLink libA = getLibrary('file:///a.dart');
+    LibraryElementForLink libB = getLibrary('file:///b.dart');
+    LibraryElementForLink libC = getLibrary('file:///c.dart');
+    LibraryElementForLink libD = getLibrary('file:///d.dart');
+    LibraryCycleForLink libraryCycle = libC.libraryCycleForLink;
+    expect(libD.libraryCycleForLink, same(libraryCycle));
+    expect(libraryCycle.dependencies,
+        unorderedEquals([libA.libraryCycleForLink, libB.libraryCycleForLink]));
+    expect(libraryCycle.libraries, unorderedEquals([libC, libD]));
+  }
+
+  void test_libraryCycle_nontrivial_via_export() {
+    addNamedSource('/a.dart', 'export "b.dart";');
+    addNamedSource('/b.dart', 'export "a.dart";');
+    createLinker('');
+    LibraryElementForLink libA = getLibrary('file:///a.dart');
+    LibraryElementForLink libB = getLibrary('file:///b.dart');
+    LibraryCycleForLink libraryCycle = libA.libraryCycleForLink;
+    expect(libB.libraryCycleForLink, same(libraryCycle));
+    expect(libraryCycle.dependencies, isEmpty);
+    expect(libraryCycle.libraries, unorderedEquals([libA, libB]));
+  }
+
+  void test_libraryCycle_trivial() {
+    createLinker('');
+    LibraryCycleForLink libraryCycle = testLibrary.libraryCycleForLink;
+    expect(libraryCycle.dependencies, isEmpty);
+    expect(libraryCycle.libraries, [testLibrary]);
+  }
+
+  void test_libraryCycle_trivial_dependencies() {
+    addNamedSource('/a.dart', '');
+    addNamedSource('/b.dart', '');
+    createLinker('import "a.dart"; import "b.dart";');
+    LibraryElementForLink libA = getLibrary('file:///a.dart');
+    LibraryElementForLink libB = getLibrary('file:///b.dart');
+    LibraryCycleForLink libraryCycle = testLibrary.libraryCycleForLink;
+    expect(libraryCycle.dependencies,
+        unorderedEquals([libA.libraryCycleForLink, libB.libraryCycleForLink]));
+    expect(libraryCycle.libraries, [testLibrary]);
+  }
+}
diff --git a/pkg/analyzer/test/src/summary/name_filter_test.dart b/pkg/analyzer/test/src/summary/name_filter_test.dart
index 5f5ca4f..3646720 100644
--- a/pkg/analyzer/test/src/summary/name_filter_test.dart
+++ b/pkg/analyzer/test/src/summary/name_filter_test.dart
@@ -113,8 +113,8 @@
 
   test_merge_hides_hides() {
     NameFilter filter = new NameFilter.forUnlinkedCombinator(
-        new UnlinkedCombinatorBuilder(hides: ['foo'])).merge(
-        new NameFilter.forUnlinkedCombinator(
+            new UnlinkedCombinatorBuilder(hides: ['foo']))
+        .merge(new NameFilter.forUnlinkedCombinator(
             new UnlinkedCombinatorBuilder(hides: ['bar'])));
     expect(filter.accepts('foo'), isFalse);
     expect(filter.accepts('bar'), isFalse);
@@ -138,8 +138,8 @@
 
   test_merge_hides_shows() {
     NameFilter filter = new NameFilter.forUnlinkedCombinator(
-        new UnlinkedCombinatorBuilder(hides: ['bar', 'baz'])).merge(
-        new NameFilter.forUnlinkedCombinator(
+            new UnlinkedCombinatorBuilder(hides: ['bar', 'baz']))
+        .merge(new NameFilter.forUnlinkedCombinator(
             new UnlinkedCombinatorBuilder(shows: ['foo', 'bar'])));
     expect(filter.accepts('foo'), isTrue);
     expect(filter.accepts('bar'), isFalse);
@@ -183,8 +183,8 @@
 
   test_merge_shows_hides() {
     NameFilter filter = new NameFilter.forUnlinkedCombinator(
-        new UnlinkedCombinatorBuilder(shows: ['foo', 'bar'])).merge(
-        new NameFilter.forUnlinkedCombinator(
+            new UnlinkedCombinatorBuilder(shows: ['foo', 'bar']))
+        .merge(new NameFilter.forUnlinkedCombinator(
             new UnlinkedCombinatorBuilder(hides: ['bar', 'baz'])));
     expect(filter.accepts('foo'), isTrue);
     expect(filter.accepts('bar'), isFalse);
@@ -208,8 +208,8 @@
 
   test_merge_shows_shows() {
     NameFilter filter = new NameFilter.forUnlinkedCombinator(
-        new UnlinkedCombinatorBuilder(shows: ['foo', 'bar'])).merge(
-        new NameFilter.forUnlinkedCombinator(
+            new UnlinkedCombinatorBuilder(shows: ['foo', 'bar']))
+        .merge(new NameFilter.forUnlinkedCombinator(
             new UnlinkedCombinatorBuilder(shows: ['bar', 'baz'])));
     expect(filter.accepts('foo'), isFalse);
     expect(filter.accepts('bar'), isTrue);
@@ -221,8 +221,8 @@
 
   test_merge_shows_shows_emptyResult() {
     NameFilter filter = new NameFilter.forUnlinkedCombinator(
-        new UnlinkedCombinatorBuilder(shows: ['foo'])).merge(
-        new NameFilter.forUnlinkedCombinator(
+            new UnlinkedCombinatorBuilder(shows: ['foo']))
+        .merge(new NameFilter.forUnlinkedCombinator(
             new UnlinkedCombinatorBuilder(shows: ['bar'])));
     expect(filter.accepts('foo'), isFalse);
     expect(filter.accepts('bar'), isFalse);
diff --git a/pkg/analyzer/test/src/summary/prelinker_test.dart b/pkg/analyzer/test/src/summary/prelinker_test.dart
index 4453ab0..f2f1a82 100644
--- a/pkg/analyzer/test/src/summary/prelinker_test.dart
+++ b/pkg/analyzer/test/src/summary/prelinker_test.dart
@@ -49,7 +49,7 @@
 
   String resolveToAbsoluteUri(LibraryElement library, String relativeUri) {
     Source resolvedSource =
-        analysisContext.sourceFactory.resolveUri(library.source, relativeUri);
+        context.sourceFactory.resolveUri(library.source, relativeUri);
     if (resolvedSource == null) {
       fail('Failed to resolve relative uri "$relativeUri"');
     }
@@ -75,7 +75,8 @@
     }
     UnlinkedPublicNamespace getImport(String relativeUri) {
       String absoluteUri = resolveToAbsoluteUri(library, relativeUri);
-      UnlinkedPublicNamespace namespace = sdkPublicNamespace[absoluteUri];
+      UnlinkedPublicNamespace namespace = SerializedMockSdk
+          .instance.uriToUnlinkedUnit[absoluteUri]?.publicNamespace;
       if (namespace == null) {
         namespace = uriToPublicNamespace[absoluteUri];
       }
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
new file mode 100644
index 0000000..5e2bcd6
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -0,0 +1,591 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.src.summary.resynthesize_ast_test;
+
+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/generated/engine.dart'
+    show AnalysisContext, AnalysisOptionsImpl;
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/link.dart';
+import 'package:analyzer/src/summary/prelink.dart';
+import 'package:analyzer/src/summary/resynthesize.dart';
+import 'package:analyzer/src/summary/summarize_ast.dart';
+import 'package:analyzer/src/summary/summarize_elements.dart'
+    show PackageBundleAssembler;
+import 'package:analyzer/task/dart.dart' show PARSED_UNIT;
+import 'package:unittest/unittest.dart';
+
+import '../../reflective_tests.dart';
+import '../context/abstract_context.dart';
+import '../task/strong/inferred_type_test.dart';
+import 'resynthesize_test.dart';
+import 'summary_common.dart';
+
+main() {
+  groupSep = ' | ';
+  runReflectiveTests(ResynthesizeAstTest);
+  runReflectiveTests(AstInferredTypeTest);
+}
+
+@reflectiveTest
+class AstInferredTypeTest extends AbstractResynthesizeTest
+    with _AstResynthesizeTestMixin, InferredTypeMixin {
+  bool get checkPropagatedTypes {
+    // AST-based summaries do not yet handle propagated types.
+    // TODO(paulberry): fix this.
+    return false;
+  }
+
+  @override
+  bool get skipBrokenAstInference => true;
+
+  @override
+  void addFile(String content, {String name: '/main.dart'}) {
+    addLibrarySource(name, content);
+  }
+
+  @override
+  CompilationUnitElement checkFile(String content) {
+    Source source = addSource('/main.dart', content);
+    SummaryResynthesizer resynthesizer = _encodeLibrary(source);
+    LibraryElementImpl resynthesized = _checkSource(resynthesizer, source);
+    for (Source otherSource in otherLibrarySources) {
+      _checkSource(resynthesizer, otherSource);
+    }
+    return resynthesized.definingCompilationUnit;
+  }
+
+  @override
+  void compareLocalVariableElementLists(ExecutableElement resynthesized,
+      ExecutableElement original, String desc) {
+    // We don't resynthesize local elements during link.
+    // So, we should not compare them.
+  }
+
+  @override
+  DartSdk createDartSdk() => AbstractContextTest.SHARED_STRONG_MOCK_SDK;
+
+  @override
+  AnalysisOptionsImpl createOptions() => new AnalysisOptionsImpl()
+    ..enableGenericMethods = true
+    ..strongMode = true;
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_async_allReturnsAreValues() {
+    super.test_blockBodiedLambdas_async_allReturnsAreValues();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_async_alReturnsAreFutures() {
+    super.test_blockBodiedLambdas_async_alReturnsAreFutures();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_async_mixOfValuesAndFutures() {
+    super.test_blockBodiedLambdas_async_mixOfValuesAndFutures();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_asyncStar() {
+    super.test_blockBodiedLambdas_asyncStar();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_basic_topLevel() {
+    super.test_blockBodiedLambdas_basic_topLevel();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_doesNotInferBottom_async() {
+    super.test_blockBodiedLambdas_doesNotInferBottom_async();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_doesNotInferBottom_asyncStar() {
+    super.test_blockBodiedLambdas_doesNotInferBottom_asyncStar();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_doesNotInferBottom_sync() {
+    super.test_blockBodiedLambdas_doesNotInferBottom_sync();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_doesNotInferBottom_syncStar() {
+    super.test_blockBodiedLambdas_doesNotInferBottom_syncStar();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_downwardsIncompatibleWithUpwardsInference() {
+    super.test_blockBodiedLambdas_downwardsIncompatibleWithUpwardsInference();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_LUB_topLevel() {
+    super.test_blockBodiedLambdas_LUB_topLevel();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_nestedLambdas() {
+    super.test_blockBodiedLambdas_nestedLambdas();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_noReturn() {
+    super.test_blockBodiedLambdas_noReturn();
+  }
+
+  @override
+  @failingTest
+  void test_blockBodiedLambdas_syncStar() {
+    super.test_blockBodiedLambdas_syncStar();
+  }
+
+  @override
+  @failingTest
+  void test_canInferAlsoFromStaticAndInstanceFieldsFlagOn() {
+    super.test_canInferAlsoFromStaticAndInstanceFieldsFlagOn();
+  }
+
+  @override
+  @failingTest
+  void test_downwardsInferenceAnnotations() {
+    super.test_downwardsInferenceAnnotations();
+  }
+
+  @override
+  @failingTest
+  void test_downwardsInferenceAsyncAwait() {
+    super.test_downwardsInferenceAsyncAwait();
+  }
+
+  @override
+  @failingTest
+  void test_downwardsInferenceForEach() {
+    super.test_downwardsInferenceForEach();
+  }
+
+  @override
+  @failingTest
+  void test_downwardsInferenceOnFunctionOfTUsingTheT() {
+    super.test_downwardsInferenceOnFunctionOfTUsingTheT();
+  }
+
+  @override
+  @failingTest
+  void test_downwardsInferenceOnGenericFunctionExpressions() {
+    super.test_downwardsInferenceOnGenericFunctionExpressions();
+  }
+
+  @override
+  @failingTest
+  void test_downwardsInferenceYieldYieldStar() {
+    super.test_downwardsInferenceYieldYieldStar();
+  }
+
+  @override
+  @failingTest
+  void test_genericMethods_inferJSBuiltin() {
+    super.test_genericMethods_inferJSBuiltin();
+  }
+
+  void test_infer_extractIndex_custom() {
+    var unit = checkFile('''
+class A {
+  String operator [](_) => null;
+}
+var a = new A();
+var b = a[0];
+  ''');
+    expect(unit.topLevelVariables[1].type.toString(), 'String');
+  }
+
+  void test_infer_extractIndex_fromList() {
+    var unit = checkFile('''
+var a = <int>[1, 2, 3];
+var b = a[0];
+  ''');
+    expect(unit.topLevelVariables[1].type.toString(), 'int');
+  }
+
+  void test_infer_extractIndex_fromMap() {
+    var unit = checkFile('''
+var a = <int, double>{};
+var b = a[0];
+  ''');
+    expect(unit.topLevelVariables[1].type.toString(), 'double');
+  }
+
+  void test_infer_extractProperty_getter() {
+    checkFile(r'''
+var a = 1.isEven;
+var b = 2.isNaN;
+var c = 3.foo;
+var d = foo.bar;
+  ''');
+  }
+
+  void test_infer_extractProperty_method() {
+    checkFile(r'''
+var a = 1.round;
+  ''');
+  }
+
+  void test_infer_invokeConstructor_factoryRedirected() {
+    checkFile(r'''
+class A {
+  factory A() = B;
+}
+class B implements A {}
+var a = new A();
+  ''');
+  }
+
+  void test_infer_invokeConstructor_named() {
+    checkFile(r'''
+class A {
+  A.aaa();
+}
+class B<K, V> {
+  B.bbb();
+}
+var a = new A.aaa();
+var b1 = new B.bbb();
+var b2 = new B<int, String>.bbb();
+var b3 = new B<List<int>, Map<List<int>, Set<String>>>.bbb();
+  ''');
+  }
+
+  void test_infer_invokeConstructor_named_importedWithPrefix() {
+    addFile(
+        r'''
+class A {
+  A.aaa();
+}
+class B<K, V> {
+  B.bbb();
+}
+''',
+        name: '/a.dart');
+    checkFile(r'''
+import 'a.dart' as p;
+var a = new p.A.aaa();
+var b1 = new p.B.bbb();
+var b2 = new p.B<int, String>.bbb();
+  ''');
+  }
+
+  void test_infer_invokeConstructor_unnamed() {
+    checkFile(r'''
+class A {
+  A();
+}
+class B<T> {
+  B();
+}
+var a = new A();
+var b1 = new B();
+var b2 = new B<int>();
+  ''');
+  }
+
+  void test_infer_invokeConstructor_unnamed_synthetic() {
+    checkFile(r'''
+class A {}
+class B<T> {}
+var a = new A();
+var b1 = new B();
+var b2 = new B<int>();
+  ''');
+  }
+
+  @override
+  @failingTest
+  void test_inferCorrectlyOnMultipleVariablesDeclaredTogether() {
+    super.test_inferCorrectlyOnMultipleVariablesDeclaredTogether();
+  }
+
+  @override
+  @failingTest
+  void test_inferenceInCyclesIsDeterministic() {
+    super.test_inferenceInCyclesIsDeterministic();
+  }
+
+  @override
+  @failingTest
+  void test_inferFromRhsOnlyIfItWontConflictWithOverriddenFields() {
+    super.test_inferFromRhsOnlyIfItWontConflictWithOverriddenFields();
+  }
+
+  @override
+  @failingTest
+  void test_inferTypesOnGenericInstantiations_4() {
+    super.test_inferTypesOnGenericInstantiations_4();
+  }
+
+  @override
+  @failingTest
+  void test_inferTypesOnGenericInstantiations_5() {
+    super.test_inferTypesOnGenericInstantiations_5();
+  }
+
+  @override
+  @failingTest
+  void test_inferTypesOnGenericInstantiationsInLibraryCycle() {
+    super.test_inferTypesOnGenericInstantiationsInLibraryCycle();
+  }
+
+  void test_invokeMethod_notGeneric_genericClass() {
+    var unit = checkFile(r'''
+class C<T> {
+  T m(int a, {String b, T c}) => null;
+}
+var v = new C<double>().m(1, b: 'bbb', c: 2.0);
+  ''');
+    expect(unit.topLevelVariables[0].type.toString(), 'double');
+  }
+
+  void test_invokeMethod_notGeneric_notGenericClass() {
+    var unit = checkFile(r'''
+class C {
+  int m(int a, {String b, int c}) => null;
+}
+var v = new C().m(1, b: 'bbb', c: 2.0);
+  ''');
+    expect(unit.topLevelVariables[0].type.toString(), 'int');
+  }
+
+  @override
+  @failingTest
+  void test_listLiteralsShouldNotInferBottom() {
+    super.test_listLiteralsShouldNotInferBottom();
+  }
+
+  @override
+  @failingTest
+  void test_mapLiteralsShouldNotInferBottom() {
+    super.test_mapLiteralsShouldNotInferBottom();
+  }
+
+  @override
+  @failingTest
+  void test_nullLiteralShouldNotInferAsBottom() {
+    super.test_nullLiteralShouldNotInferAsBottom();
+  }
+
+  LibraryElementImpl _checkSource(
+      SummaryResynthesizer resynthesizer, Source source) {
+    LibraryElementImpl resynthesized =
+        resynthesizer.getLibraryElement(source.uri.toString());
+    LibraryElementImpl original = context.computeLibraryElement(source);
+    checkLibraryElements(original, resynthesized);
+    return resynthesized;
+  }
+}
+
+@reflectiveTest
+class ResynthesizeAstTest extends ResynthesizeTest
+    with _AstResynthesizeTestMixin {
+  @override
+  bool get checkPropagatedTypes => false;
+
+  @override
+  void checkLibrary(String text,
+      {bool allowErrors: false, bool dumpSummaries: false}) {
+    Source source = addTestSource(text);
+    LibraryElementImpl resynthesized = _encodeDecodeLibraryElement(source);
+    LibraryElementImpl original = context.computeLibraryElement(source);
+    checkLibraryElements(original, resynthesized);
+  }
+
+  @override
+  DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK;
+
+  @override
+  TestSummaryResynthesizer encodeDecodeLibrarySource(Source source) {
+    return _encodeLibrary(source);
+  }
+
+  @override
+  @failingTest
+  void test_constructor_initializers_field_notConst() {
+    super.test_constructor_initializers_field_notConst();
+  }
+
+  @override
+  @failingTest
+  void test_inferred_function_type_in_generic_class_constructor() {
+    super.test_inferred_function_type_in_generic_class_constructor();
+  }
+
+  @override
+  @failingTest
+  void test_metadata_constructor_call_named() {
+    super.test_metadata_constructor_call_named();
+  }
+
+  @override
+  @failingTest
+  void test_metadata_constructor_call_named_prefixed() {
+    super.test_metadata_constructor_call_named_prefixed();
+  }
+
+  @override
+  @failingTest
+  void test_metadata_constructor_call_unnamed() {
+    super.test_metadata_constructor_call_unnamed();
+  }
+
+  @override
+  @failingTest
+  void test_metadata_constructor_call_with_args() {
+    super.test_metadata_constructor_call_with_args();
+  }
+
+  @override
+  @failingTest
+  void test_type_reference_to_import_part_in_subdir() {
+    super.test_type_reference_to_import_part_in_subdir();
+  }
+}
+
+/**
+ * Abstract mixin for serializing ASTs and resynthesizing elements from it.
+ */
+abstract class _AstResynthesizeTestMixin {
+  final Set<Source> serializedSources = new Set<Source>();
+  final PackageBundleAssembler bundleAssembler = new PackageBundleAssembler();
+  final Map<String, UnlinkedUnitBuilder> uriToUnit =
+      <String, UnlinkedUnitBuilder>{};
+
+  AnalysisContext get context;
+
+  LibraryElementImpl _encodeDecodeLibraryElement(Source source) {
+    SummaryResynthesizer resynthesizer = _encodeLibrary(source);
+    return resynthesizer.getLibraryElement(source.uri.toString());
+  }
+
+  TestSummaryResynthesizer _encodeLibrary(Source source) {
+    _serializeLibrary(source);
+
+    PackageBundle bundle =
+        new PackageBundle.fromBuffer(bundleAssembler.assemble().toBuffer());
+
+    Map<String, UnlinkedUnit> unlinkedSummaries = <String, UnlinkedUnit>{};
+    for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
+      String uri = bundle.unlinkedUnitUris[i];
+      unlinkedSummaries[uri] = bundle.unlinkedUnits[i];
+    }
+
+    LinkedLibrary getDependency(String absoluteUri) {
+      Map<String, LinkedLibrary> sdkLibraries =
+          SerializedMockSdk.instance.uriToLinkedLibrary;
+      LinkedLibrary linkedLibrary = sdkLibraries[absoluteUri];
+      if (linkedLibrary == null) {
+        fail('Linker unexpectedly requested LinkedLibrary for "$absoluteUri".'
+            '  Libraries available: ${sdkLibraries.keys}');
+      }
+      return linkedLibrary;
+    }
+
+    UnlinkedUnit getUnit(String absoluteUri) {
+      UnlinkedUnit unit = uriToUnit[absoluteUri] ??
+          SerializedMockSdk.instance.uriToUnlinkedUnit[absoluteUri];
+      if (unit == null) {
+        fail('Linker unexpectedly requested unit for "$absoluteUri".');
+      }
+      return unit;
+    }
+
+    Set<String> nonSdkLibraryUris = context.sources
+        .where((Source source) =>
+            !source.isInSystemLibrary &&
+            context.computeKindOf(source) == SourceKind.LIBRARY)
+        .map((Source source) => source.uri.toString())
+        .toSet();
+
+    Map<String, LinkedLibrary> linkedSummaries = link(nonSdkLibraryUris,
+        getDependency, getUnit, context.analysisOptions.strongMode);
+
+    return new TestSummaryResynthesizer(
+        null,
+        context,
+        new Map<String, UnlinkedUnit>()
+          ..addAll(SerializedMockSdk.instance.uriToUnlinkedUnit)
+          ..addAll(unlinkedSummaries),
+        new Map<String, LinkedLibrary>()
+          ..addAll(SerializedMockSdk.instance.uriToLinkedLibrary)
+          ..addAll(linkedSummaries));
+  }
+
+  UnlinkedUnit _getUnlinkedUnit(Source source) {
+    String uriStr = source.uri.toString();
+    {
+      UnlinkedUnit unlinkedUnitInSdk =
+          SerializedMockSdk.instance.uriToUnlinkedUnit[uriStr];
+      if (unlinkedUnitInSdk != null) {
+        return unlinkedUnitInSdk;
+      }
+    }
+    return uriToUnit.putIfAbsent(uriStr, () {
+      CompilationUnit unit = context.computeResult(source, PARSED_UNIT);
+      UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
+      bundleAssembler.addUnlinkedUnit(source, unlinkedUnit);
+      return unlinkedUnit;
+    });
+  }
+
+  void _serializeLibrary(Source librarySource) {
+    if (librarySource.isInSystemLibrary) {
+      return;
+    }
+    if (!serializedSources.add(librarySource)) {
+      return;
+    }
+
+    Source resolveRelativeUri(String relativeUri) {
+      Source resolvedSource =
+          context.sourceFactory.resolveUri(librarySource, relativeUri);
+      if (resolvedSource == null) {
+        throw new StateError('Could not resolve $relativeUri in the context of '
+            '$librarySource (${librarySource.runtimeType})');
+      }
+      return resolvedSource;
+    }
+
+    UnlinkedUnit getPart(String relativeUri) {
+      return _getUnlinkedUnit(resolveRelativeUri(relativeUri));
+    }
+
+    UnlinkedPublicNamespace getImport(String relativeUri) {
+      return getPart(relativeUri).publicNamespace;
+    }
+
+    UnlinkedUnit definingUnit = _getUnlinkedUnit(librarySource);
+    LinkedLibraryBuilder linkedLibrary =
+        prelink(definingUnit, getPart, getImport);
+    linkedLibrary.dependencies.skip(1).forEach((LinkedDependency d) {
+      _serializeLibrary(resolveRelativeUri(d.uri));
+    });
+  }
+}
diff --git a/pkg/analyzer/test/src/summary/resynthesize_strong_test.dart b/pkg/analyzer/test/src/summary/resynthesize_strong_test.dart
index 37c2f4a..d337de7 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_strong_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_strong_test.dart
@@ -5,18 +5,23 @@
 library analyzer.test.src.summary.resynthesize_strong_test;
 
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/sdk.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../reflective_tests.dart';
+import '../context/abstract_context.dart';
 import 'resynthesize_test.dart';
 
 main() {
   groupSep = ' | ';
-  runReflectiveTests(ResynthStrongTest);
+  runReflectiveTests(ResynthesizeStrongTest);
 }
 
 @reflectiveTest
-class ResynthStrongTest extends ResynthTest {
+class ResynthesizeStrongTest extends ResynthesizeElementTest {
+  @override
+  DartSdk createDartSdk() => AbstractContextTest.SHARED_STRONG_MOCK_SDK;
+
   @override
   AnalysisOptionsImpl createOptions() =>
       super.createOptions()..strongMode = true;
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index e163d04..5b4f8ed 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -7,17 +7,19 @@
 import 'dart:convert';
 
 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/src/dart/ast/ast.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/generated/constant.dart' show DartObject;
-import 'package:analyzer/src/generated/element_handle.dart';
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/resolver.dart'
     show Namespace, TypeProvider;
+import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/testing/ast_factory.dart';
 import 'package:analyzer/src/summary/idl.dart';
@@ -25,32 +27,63 @@
 import 'package:analyzer/src/summary/summarize_elements.dart';
 import 'package:unittest/unittest.dart';
 
-import '../../generated/resolver_test.dart';
+import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../abstract_single_unit.dart';
+import '../context/abstract_context.dart';
 import 'summary_common.dart' show canonicalize;
 
 main() {
   groupSep = ' | ';
-  runReflectiveTests(ResynthTest);
+  runReflectiveTests(ResynthesizeElementTest);
 }
 
-@reflectiveTest
-class ResynthTest extends ResolverTestCase {
+/**
+ * Abstract base class for resynthesizing and comparing elements.
+ */
+abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
   Set<Source> otherLibrarySources = new Set<Source>();
   bool constantInitializersAreInvalid = false;
 
+  bool get checkPropagatedTypes => true;
+
   /**
-   * Determine the analysis options that should be used for this test.
+   * Derived classes can override this getter to return `true` in order to
+   * cause certain checks to be skipped if they are known to fail with
+   * AST-based type inference.
+   *
+   * TODO(paulberry): remove this flag once AST-based type inference is fully
+   * working.
    */
-  AnalysisOptionsImpl createOptions() =>
-      new AnalysisOptionsImpl()..enableGenericMethods = true;
+  bool get skipBrokenAstInference => false;
 
   void addLibrary(String uri) {
-    otherLibrarySources.add(analysisContext2.sourceFactory.forUri(uri));
+    otherLibrarySources.add(context.sourceFactory.forUri(uri));
   }
 
-  void addLibrarySource(String filePath, String contents) {
-    otherLibrarySources.add(addNamedSource(filePath, contents));
+  Source addLibrarySource(String filePath, String contents) {
+    Source 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();
   }
 
   /**
@@ -64,18 +97,6 @@
     }
   }
 
-  void checkLibrary(String text,
-      {bool allowErrors: false, bool dumpSummaries: false}) {
-    Source source = addSource(text);
-    LibraryElementImpl original = resolve2(source);
-    LibraryElementImpl resynthesized = resynthesizeLibraryElement(
-        encodeLibrary(original,
-            allowErrors: allowErrors, dumpSummaries: dumpSummaries),
-        source.uri.toString(),
-        original);
-    checkLibraryElements(original, resynthesized);
-  }
-
   void checkLibraryElements(
       LibraryElementImpl original, LibraryElementImpl resynthesized) {
     compareElements(resynthesized, original, '(library)');
@@ -127,7 +148,7 @@
    * resynthesizing [library].
    */
   void checkMinimalResynthesisWork(
-      _TestSummaryResynthesizer resynthesizer, LibraryElement library) {
+      TestSummaryResynthesizer resynthesizer, LibraryElement library) {
     // Check that no other summaries needed to be resynthesized to resynthesize
     // the library element.
     expect(resynthesizer.resynthesisCount, 1);
@@ -185,57 +206,48 @@
   }
 
   void compareClassElements(
-      ClassElementImpl resynthesized, ClassElementImpl original, String desc) {
-    compareElements(resynthesized, original, desc);
-    expect(resynthesized.fields.length, original.fields.length,
-        reason: '$desc fields.length');
-    for (int i = 0; i < resynthesized.fields.length; i++) {
-      String name = original.fields[i].name;
-      compareFieldElements(
-          resynthesized.fields[i], original.fields[i], '$desc.field $name');
+      ClassElement resynthesized, ClassElement original, String desc) {
+    ClassElementImpl r = getActualElement(resynthesized, desc);
+    ClassElementImpl o = getActualElement(original, 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(
-        resynthesized.supertype, original.supertype, '$desc supertype');
-    expect(resynthesized.interfaces.length, original.interfaces.length);
-    for (int i = 0; i < resynthesized.interfaces.length; i++) {
-      compareTypes(resynthesized.interfaces[i], original.interfaces[i],
-          '$desc interface ${original.interfaces[i].name}');
+    compareTypes(r.supertype, o.supertype, '$desc supertype');
+    expect(r.interfaces.length, o.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(resynthesized.mixins.length, original.mixins.length);
-    for (int i = 0; i < resynthesized.mixins.length; i++) {
-      compareTypes(resynthesized.mixins[i], original.mixins[i],
-          '$desc mixin ${original.mixins[i].name}');
+    expect(r.mixins.length, o.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(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}');
+    expect(r.typeParameters.length, o.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(resynthesized.constructors.length, original.constructors.length,
+    expect(r.constructors.length, o.constructors.length,
         reason: '$desc constructors.length');
-    for (int i = 0; i < resynthesized.constructors.length; i++) {
-      compareConstructorElements(
-          resynthesized.constructors[i],
-          original.constructors[i],
-          '$desc constructor ${original.constructors[i].name}');
+    for (int i = 0; i < r.constructors.length; i++) {
+      compareConstructorElements(r.constructors[i], o.constructors[i],
+          '$desc constructor ${o.constructors[i].name}');
     }
-    expect(resynthesized.accessors.length, original.accessors.length);
-    for (int i = 0; i < resynthesized.accessors.length; i++) {
-      comparePropertyAccessorElements(
-          resynthesized.accessors[i],
-          original.accessors[i],
-          '$desc accessor ${original.accessors[i].name}');
+    expect(r.accessors.length, o.accessors.length);
+    for (int i = 0; i < r.accessors.length; i++) {
+      comparePropertyAccessorElements(r.accessors[i], o.accessors[i],
+          '$desc accessor ${o.accessors[i].name}');
     }
-    expect(resynthesized.methods.length, original.methods.length);
-    for (int i = 0; i < resynthesized.methods.length; i++) {
-      compareMethodElements(resynthesized.methods[i], original.methods[i],
-          '$desc.${original.methods[i].name}');
+    expect(r.methods.length, o.methods.length);
+    for (int i = 0; i < r.methods.length; i++) {
+      compareMethodElements(
+          r.methods[i], o.methods[i], '$desc.${o.methods[i].name}');
     }
-    compareTypes(resynthesized.type, original.type, desc);
-    expect(resynthesized.hasBeenInferred, original.hasBeenInferred,
-        reason: desc);
+    compareTypes(r.type, o.type, desc);
+    expect(r.hasBeenInferred, o.hasBeenInferred, reason: desc);
   }
 
   void compareCompilationUnitElements(CompilationUnitElementImpl resynthesized,
@@ -373,6 +385,17 @@
           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) {
+          compareElements(
+              r.prefix.staticElement, o.staticElement?.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) {
@@ -451,6 +474,13 @@
         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);
@@ -458,7 +488,12 @@
         ConstructorName rConstructor = r.constructorName;
         expect(oConstructor, isNotNull, reason: desc);
         expect(rConstructor, isNotNull, reason: desc);
-        compareConstructorElements(
+        // 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;
@@ -517,10 +552,10 @@
       return;
     }
     compareExecutableElements(resynthesized, original, desc);
+    ConstructorElementImpl resynthesizedImpl =
+        getActualElement(resynthesized, desc);
+    ConstructorElementImpl originalImpl = getActualElement(original, desc);
     if (original.isConst) {
-      ConstructorElementImpl resynthesizedImpl =
-          getActualElement(resynthesized, desc);
-      ConstructorElementImpl originalImpl = getActualElement(original, desc);
       compareConstAstLists(resynthesizedImpl.constantInitializers,
           originalImpl.constantInitializers, desc);
     }
@@ -533,6 +568,8 @@
     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(
@@ -618,6 +655,8 @@
     expect(resynthesized.location, original.location, reason: desc);
     expect(resynthesized.name, original.name);
     expect(resynthesized.nameOffset, original.nameOffset, reason: desc);
+    expect(rImpl.codeOffset, oImpl.codeOffset, reason: desc);
+    expect(rImpl.codeLength, oImpl.codeLength, reason: desc);
     expect(resynthesized.documentationComment, original.documentationComment,
         reason: desc);
     expect(resynthesized.docRange, original.docRange, reason: desc);
@@ -651,8 +690,10 @@
     compareElements(resynthesized, original, desc);
     compareParameterElementLists(
         resynthesized.parameters, original.parameters, desc);
-    compareTypes(
-        resynthesized.returnType, original.returnType, '$desc return type');
+    if (checkPropagatedTypes || !original.hasImplicitReturnType) {
+      compareTypes(
+          resynthesized.returnType, original.returnType, '$desc return type');
+    }
     if (!shallow) {
       compareTypes(resynthesized.type, original.type, desc);
     }
@@ -682,13 +723,7 @@
       }
     }
     if (original is! Member) {
-      List<LocalVariableElement> rVariables = resynthesized.localVariables;
-      List<LocalVariableElement> oVariables = original.localVariables;
-      expect(rVariables, hasLength(oVariables.length));
-      for (int i = 0; i < oVariables.length; i++) {
-        compareVariableElements(rVariables[i], oVariables[i],
-            '$desc local variable ${oVariables[i].name}');
-      }
+      compareLocalVariableElementLists(resynthesized, original, desc);
     }
   }
 
@@ -767,6 +802,17 @@
     compareElements(resynthesized, original, desc);
   }
 
+  void compareLocalVariableElementLists(ExecutableElement resynthesized,
+      ExecutableElement original, String desc) {
+    List<LocalVariableElement> rVariables = resynthesized.localVariables;
+    List<LocalVariableElement> oVariables = original.localVariables;
+    expect(rVariables, hasLength(oVariables.length));
+    for (int i = 0; i < oVariables.length; i++) {
+      compareVariableElements(rVariables[i], oVariables[i],
+          '$desc local variable ${oVariables[i].name}');
+    }
+  }
+
   void compareMetadata(List<ElementAnnotation> resynthesized,
       List<ElementAnnotation> original, String desc) {
     expect(resynthesized, hasLength(original.length), reason: desc);
@@ -877,7 +923,9 @@
       PropertyInducingElementImpl original,
       String desc) {
     compareVariableElements(resynthesized, original, desc);
-    compareTypes(resynthesized.propagatedType, original.propagatedType, desc);
+    if (checkPropagatedTypes) {
+      compareTypes(resynthesized.propagatedType, original.propagatedType, desc);
+    }
     if (original.getter == null) {
       expect(resynthesized.getter, isNull);
     } else {
@@ -956,8 +1004,20 @@
       expect(resynthesized.typeArguments.length, original.typeArguments.length,
           reason: desc);
       for (int i = 0; i < resynthesized.typeArguments.length; i++) {
-        compareTypes(resynthesized.typeArguments[i], original.typeArguments[i],
-            '$desc type argument ${original.typeArguments[i].name}');
+        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 type argument ${original.typeArguments[i].name}');
+        }
       }
       if (original.typeParameters == null) {
         expect(resynthesized.typeParameters, isNull, reason: desc);
@@ -1009,8 +1069,10 @@
     VariableElementImpl resynthesizedActual =
         getActualElement(resynthesized, desc);
     VariableElementImpl originalActual = getActualElement(original, desc);
-    compareFunctionElements(resynthesizedActual.initializer,
-        originalActual.initializer, '$desc initializer');
+    if (!skipBrokenAstInference) {
+      compareFunctionElements(resynthesizedActual.initializer,
+          originalActual.initializer, '$desc initializer');
+    }
     if (originalActual is ConstVariableElement) {
       Element oEnclosing = original.enclosingElement;
       if (oEnclosing is ClassElement && oEnclosing.isEnum) {
@@ -1030,35 +1092,45 @@
     checkPossibleLocalElements(resynthesized, original);
   }
 
+  DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK;
+
+  /**
+   * Determine the analysis options that should be used for this test.
+   */
+  AnalysisOptionsImpl createOptions() =>
+      new AnalysisOptionsImpl()..enableGenericMethods = true;
+
   /**
    * Serialize the given [library] into a summary.  Then create a
-   * [_TestSummaryResynthesizer] which can deserialize it, along with any
+   * [TestSummaryResynthesizer] which can deserialize it, along with any
    * references it makes to `dart:core`.
    *
    * Errors will lead to a test failure unless [allowErrors] is `true`.
    */
-  _TestSummaryResynthesizer encodeLibrary(LibraryElementImpl library,
+  TestSummaryResynthesizer encodeLibrary(LibraryElementImpl library,
       {bool allowErrors: false, bool dumpSummaries: false}) {
     if (!allowErrors) {
       assertNoErrors(library.source);
     }
     addLibrary('dart:core');
+    addLibrary('dart:async');
+    addLibrary('dart:math');
     return encodeLibraryElement(library, dumpSummaries: dumpSummaries);
   }
 
   /**
    * Convert the library element [library] into a summary, and then create a
-   * [_TestSummaryResynthesizer] which can deserialize it.
+   * [TestSummaryResynthesizer] which can deserialize it.
    *
    * Caller is responsible for checking the library for errors, and adding any
    * dependent libraries using [addLibrary].
    */
-  _TestSummaryResynthesizer encodeLibraryElement(LibraryElementImpl library,
+  TestSummaryResynthesizer encodeLibraryElement(LibraryElementImpl library,
       {bool dumpSummaries: false}) {
     Map<String, UnlinkedUnit> unlinkedSummaries = <String, UnlinkedUnit>{};
     LinkedLibrary getLinkedSummaryFor(LibraryElement lib) {
       LibrarySerializationResult serialized = serializeLibrary(
-          lib, typeProvider, analysisContext.analysisOptions.strongMode);
+          lib, context.typeProvider, context.analysisOptions.strongMode);
       for (int i = 0; i < serialized.unlinkedUnits.length; i++) {
         unlinkedSummaries[serialized.unitUris[i]] =
             new UnlinkedUnit.fromBuffer(serialized.unlinkedUnits[i].toBuffer());
@@ -1069,7 +1141,7 @@
       library.source.uri.toString(): getLinkedSummaryFor(library)
     };
     for (Source source in otherLibrarySources) {
-      LibraryElement original = resolve2(source);
+      LibraryElement original = context.computeLibraryElement(source);
       String uri = source.uri.toString();
       linkedSummaries[uri] = getLinkedSummaryFor(original);
     }
@@ -1081,18 +1153,8 @@
         print('Linked $path: ${JSON.encode(canonicalize(lib))}');
       });
     }
-    return new _TestSummaryResynthesizer(
-        null,
-        analysisContext,
-        analysisContext.typeProvider,
-        analysisContext.sourceFactory,
-        unlinkedSummaries,
-        linkedSummaries,
-        createOptions().strongMode);
-  }
-
-  fail_library_hasExtUri() {
-    checkLibrary('import "dart-ext:doesNotExist.dart";');
+    return new TestSummaryResynthesizer(
+        null, context, unlinkedSummaries, linkedSummaries);
   }
 
   ElementImpl getActualElement(Element element, String desc) {
@@ -1116,13 +1178,124 @@
   }
 
   /**
+   * 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;
+    }
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    prepareAnalysisContext(createOptions());
+  }
+
+  void _assertUnresolvedIdentifier(Expression initializer, String desc) {
+    expect(initializer, new isInstanceOf<SimpleIdentifier>(), reason: desc);
+    SimpleIdentifier identifier = initializer;
+    expect(identifier.staticElement, isNull, reason: desc);
+  }
+}
+
+@reflectiveTest
+class ResynthesizeElementTest extends ResynthesizeTest {
+  @override
+  void checkLibrary(String text,
+      {bool allowErrors: false, bool dumpSummaries: false}) {
+    Source source = addTestSource(text);
+    LibraryElementImpl original = context.computeLibraryElement(source);
+    LibraryElementImpl resynthesized = resynthesizeLibraryElement(
+        encodeLibrary(original,
+            allowErrors: allowErrors, dumpSummaries: dumpSummaries),
+        source.uri.toString(),
+        original);
+    checkLibraryElements(original, resynthesized);
+  }
+
+  @override
+  SummaryResynthesizer encodeDecodeLibrarySource(Source librarySource) {
+    LibraryElement libraryElement =
+        context.computeLibraryElement(librarySource);
+    return encodeLibrary(libraryElement);
+  }
+
+  /**
+   * Serialize the given [library] into a summary.  Then create a
+   * [TestSummaryResynthesizer] which can deserialize it, along with any
+   * references it makes to `dart:core`.
+   *
+   * Errors will lead to a test failure unless [allowErrors] is `true`.
+   */
+  TestSummaryResynthesizer encodeLibrary(LibraryElementImpl library,
+      {bool allowErrors: false, bool dumpSummaries: false}) {
+    if (!allowErrors) {
+      assertNoErrors(library.source);
+    }
+    addLibrary('dart:core');
+    addLibrary('dart:async');
+    addLibrary('dart:math');
+    return encodeLibraryElement(library, dumpSummaries: dumpSummaries);
+  }
+
+  /**
+   * Convert the library element [library] into a summary, and then create a
+   * [TestSummaryResynthesizer] which can deserialize it.
+   *
+   * Caller is responsible for checking the library for errors, and adding any
+   * dependent libraries using [addLibrary].
+   */
+  TestSummaryResynthesizer encodeLibraryElement(LibraryElementImpl library,
+      {bool dumpSummaries: false}) {
+    Map<String, UnlinkedUnit> unlinkedSummaries = <String, UnlinkedUnit>{};
+    LinkedLibrary getLinkedSummaryFor(LibraryElement lib) {
+      LibrarySerializationResult serialized = serializeLibrary(
+          lib, context.typeProvider, context.analysisOptions.strongMode);
+      for (int i = 0; i < serialized.unlinkedUnits.length; i++) {
+        unlinkedSummaries[serialized.unitUris[i]] =
+            new UnlinkedUnit.fromBuffer(serialized.unlinkedUnits[i].toBuffer());
+      }
+      return new LinkedLibrary.fromBuffer(serialized.linked.toBuffer());
+    }
+    Map<String, LinkedLibrary> linkedSummaries = <String, LinkedLibrary>{
+      library.source.uri.toString(): getLinkedSummaryFor(library)
+    };
+    for (Source source in otherLibrarySources) {
+      LibraryElement original = context.computeLibraryElement(source);
+      String uri = source.uri.toString();
+      linkedSummaries[uri] = getLinkedSummaryFor(original);
+    }
+    if (dumpSummaries) {
+      unlinkedSummaries.forEach((String path, UnlinkedUnit unit) {
+        print('Unlinked $path: ${JSON.encode(canonicalize(unit))}');
+      });
+      linkedSummaries.forEach((String path, LinkedLibrary lib) {
+        print('Linked $path: ${JSON.encode(canonicalize(lib))}');
+      });
+    }
+    return new TestSummaryResynthesizer(
+        null, context, unlinkedSummaries, linkedSummaries);
+  }
+
+  /**
    * Resynthesize the library element associated with [uri] using
    * [resynthesizer], and verify that it only had to consult one summary in
    * order to do so.  [original] is consulted merely to verify that no
    * unnecessary resynthesis work was performed.
    */
   LibraryElementImpl resynthesizeLibraryElement(
-      _TestSummaryResynthesizer resynthesizer,
+      TestSummaryResynthesizer resynthesizer,
       String uri,
       LibraryElement original) {
     LibraryElementImpl resynthesized = resynthesizer.getLibraryElement(uri);
@@ -1130,10 +1303,31 @@
     return resynthesized;
   }
 
-  @override
-  void setUp() {
-    super.setUp();
-    resetWithOptions(createOptions());
+  test_core() {
+    addLibrary('dart:async');
+    addLibrary('dart:math');
+    String uri = 'dart:core';
+    LibraryElementImpl original =
+        context.computeLibraryElement(context.sourceFactory.forUri(uri));
+    LibraryElementImpl resynthesized = resynthesizeLibraryElement(
+        encodeLibraryElement(original), uri, original);
+    checkLibraryElements(original, resynthesized);
+  }
+}
+
+@reflectiveTest
+abstract class ResynthesizeTest extends AbstractResynthesizeTest {
+  void checkLibrary(String text,
+      {bool allowErrors: false, bool dumpSummaries: false});
+
+  /**
+   * Return a [SummaryResynthesizer] to resynthesize the library with the
+   * given [librarySource].
+   */
+  SummaryResynthesizer encodeDecodeLibrarySource(Source librarySource);
+
+  fail_library_hasExtUri() {
+    checkLibrary('import "dart-ext:doesNotExist.dart";');
   }
 
   test_class_abstract() {
@@ -2016,6 +2210,15 @@
 ''');
   }
 
+  test_const_reference_type_functionType() {
+    checkLibrary(r'''
+typedef F();
+class C {
+  final f = <F>[];
+}
+''');
+  }
+
   test_const_reference_type_imported() {
     addLibrarySource(
         '/a.dart',
@@ -2048,6 +2251,14 @@
 ''');
   }
 
+  test_const_reference_type_typeParameter() {
+    checkLibrary(r'''
+class C<T> {
+  final f = <T>[];
+}
+''');
+  }
+
   test_const_reference_unresolved_prefix0() {
     checkLibrary(
         r'''
@@ -2513,18 +2724,30 @@
 ''');
   }
 
-  test_core() {
-    if (createOptions().strongMode) {
-      // The fake `dart:core` library is always in spec mode, so don't bother
-      // trying to check that it resynthesizes properly; it won't.
-      return;
-    }
-    String uri = 'dart:core';
-    LibraryElementImpl original =
-        resolve2(analysisContext2.sourceFactory.forUri(uri));
-    LibraryElementImpl resynthesized = resynthesizeLibraryElement(
-        encodeLibraryElement(original), uri, original);
-    checkLibraryElements(original, resynthesized);
+  test_constructor_withCycles_const() {
+    checkLibrary('''
+class C {
+  final x;
+  const C() : x = const D();
+}
+class D {
+  final x;
+  const D() : x = const C();
+}
+''');
+  }
+
+  test_constructor_withCycles_nonConst() {
+    checkLibrary('''
+class C {
+  final x;
+  C() : x = new D();
+}
+class D {
+  final x;
+  D() : x = new C();
+}
+''');
   }
 
   test_enum_documented() {
@@ -2677,7 +2900,7 @@
   }
 
   test_field_propagatedType_final_dep_inPart() {
-    addNamedSource('/a.dart', 'part of lib; final a = 1;');
+    addSource('/a.dart', 'part of lib; final a = 1;');
     checkLibrary('''
 library lib;
 part "a.dart";
@@ -2700,6 +2923,14 @@
 }''');
   }
 
+  test_field_static_final_untyped() {
+    checkLibrary('class C { static final x = 0; }');
+  }
+
+  test_field_untyped() {
+    checkLibrary('class C { var x = 0; }');
+  }
+
   test_function_documented() {
     checkLibrary('''
 // Extra comment so doc comment offset != 0
@@ -2724,7 +2955,7 @@
   }
 
   test_function_entry_point_in_part() {
-    addNamedSource('/a.dart', 'part of my.lib; main() {}');
+    addSource('/a.dart', 'part of my.lib; main() {}');
     checkLibrary('library my.lib; part "a.dart";');
   }
 
@@ -2777,12 +3008,12 @@
   }
 
   test_function_type_parameter() {
-    resetWithOptions(createOptions()..enableGenericMethods = true);
+    prepareAnalysisContext(createOptions()..enableGenericMethods = true);
     checkLibrary('T f<T, U>(U u) => null;');
   }
 
   test_function_type_parameter_with_function_typed_parameter() {
-    resetWithOptions(createOptions()..enableGenericMethods = true);
+    prepareAnalysisContext(createOptions()..enableGenericMethods = true);
     checkLibrary('void f<T, U>(T x(U u)) {}');
   }
 
@@ -2791,7 +3022,7 @@
   }
 
   test_generic_gClass_gMethodStatic() {
-    resetWithOptions(createOptions()..enableGenericMethods = true);
+    prepareAnalysisContext(createOptions()..enableGenericMethods = true);
     checkLibrary('''
 class C<T, U> {
   static void m<V, W>(V v, W w) {
@@ -2803,73 +3034,84 @@
   }
 
   test_getElement_constructor_named() {
-    ConstructorElement original = resolve2(addSource('class C { C.named(); }'))
+    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(original);
+    ConstructorElement resynthesized = validateGetElement(text, original);
     compareConstructorElements(resynthesized, original, 'C.constructor named');
   }
 
   test_getElement_constructor_unnamed() {
+    String text = 'class C { C(); }';
+    Source source = addLibrarySource('/test.dart', text);
     ConstructorElement original =
-        resolve2(addSource('class C { C(); }')).getType('C').unnamedConstructor;
+        context.computeLibraryElement(source).getType('C').unnamedConstructor;
     expect(original, isNotNull);
-    ConstructorElement resynthesized = validateGetElement(original);
+    ConstructorElement resynthesized = validateGetElement(text, original);
     compareConstructorElements(resynthesized, original, 'C.constructor');
   }
 
   test_getElement_field() {
+    String text = 'class C { var f; }';
+    Source source = addLibrarySource('/test.dart', text);
     FieldElement original =
-        resolve2(addSource('class C { var f; }')).getType('C').getField('f');
+        context.computeLibraryElement(source).getType('C').getField('f');
     expect(original, isNotNull);
-    FieldElement resynthesized = validateGetElement(original);
+    FieldElement resynthesized = validateGetElement(text, original);
     compareFieldElements(resynthesized, original, 'C.field f');
   }
 
   test_getElement_getter() {
+    String text = 'class C { get f => null; }';
+    Source source = addLibrarySource('/test.dart', text);
     PropertyAccessorElement original =
-        resolve2(addSource('class C { get f => null; }'))
-            .getType('C')
-            .getGetter('f');
+        context.computeLibraryElement(source).getType('C').getGetter('f');
     expect(original, isNotNull);
-    PropertyAccessorElement resynthesized = validateGetElement(original);
+    PropertyAccessorElement resynthesized = validateGetElement(text, original);
     comparePropertyAccessorElements(resynthesized, original, 'C.getter f');
   }
 
   test_getElement_method() {
+    String text = 'class C { f() {} }';
+    Source source = addLibrarySource('/test.dart', text);
     MethodElement original =
-        resolve2(addSource('class C { f() {} }')).getType('C').getMethod('f');
+        context.computeLibraryElement(source).getType('C').getMethod('f');
     expect(original, isNotNull);
-    MethodElement resynthesized = validateGetElement(original);
+    MethodElement resynthesized = validateGetElement(text, original);
     compareMethodElements(resynthesized, original, 'C.method f');
   }
 
   test_getElement_operator() {
+    String text = 'class C { operator+(x) => null; }';
+    Source source = addLibrarySource('/test.dart', text);
     MethodElement original =
-        resolve2(addSource('class C { operator+(x) => null; }'))
-            .getType('C')
-            .getMethod('+');
+        context.computeLibraryElement(source).getType('C').getMethod('+');
     expect(original, isNotNull);
-    MethodElement resynthesized = validateGetElement(original);
+    MethodElement resynthesized = validateGetElement(text, original);
     compareMethodElements(resynthesized, original, 'C.operator+');
   }
 
   test_getElement_setter() {
+    String text = 'class C { void set f(value) {} }';
+    Source source = addLibrarySource('/test.dart', text);
     PropertyAccessorElement original =
-        resolve2(addSource('class C { void set f(value) {} }'))
-            .getType('C')
-            .getSetter('f');
+        context.computeLibraryElement(source).getType('C').getSetter('f');
     expect(original, isNotNull);
-    PropertyAccessorElement resynthesized = validateGetElement(original);
+    PropertyAccessorElement resynthesized = validateGetElement(text, original);
     comparePropertyAccessorElements(resynthesized, original, 'C.setter f');
   }
 
   test_getElement_unit() {
-    Source source = addSource('class C { f() {} }');
-    CompilationUnitElement original = resolve2(source).definingCompilationUnit;
+    String text = 'class C { f() {} }';
+    Source source = addLibrarySource('/test.dart', text);
+    CompilationUnitElement original =
+        context.computeLibraryElement(source).definingCompilationUnit;
     expect(original, isNotNull);
-    CompilationUnitElement resynthesized = validateGetElement(original);
+    CompilationUnitElement resynthesized = validateGetElement(text, original);
     compareCompilationUnitElements(resynthesized, original);
   }
 
@@ -2925,7 +3167,11 @@
 
   test_import_show() {
     addLibrary('dart:async');
-    checkLibrary('import "dart:async" show Future, Stream; Future f;');
+    checkLibrary('''
+import "dart:async" show Future, Stream;
+Future f;
+Stream s;
+''');
   }
 
   test_imports() {
@@ -3391,7 +3637,7 @@
   }
 
   test_metadata_partDirective() {
-    addNamedSource('/foo.dart', 'part of L;');
+    addSource('/foo.dart', 'part of L;');
     checkLibrary('library L; @a part "foo.dart"; const a = null;');
   }
 
@@ -3466,17 +3712,17 @@
   }
 
   test_method_type_parameter() {
-    resetWithOptions(createOptions()..enableGenericMethods = true);
+    prepareAnalysisContext(createOptions()..enableGenericMethods = true);
     checkLibrary('class C { T f<T, U>(U u) => null; }');
   }
 
   test_method_type_parameter_in_generic_class() {
-    resetWithOptions(createOptions()..enableGenericMethods = true);
+    prepareAnalysisContext(createOptions()..enableGenericMethods = true);
     checkLibrary('class C<T, U> { V f<V, W>(T t, U u, W w) => null; }');
   }
 
   test_method_type_parameter_with_function_typed_parameter() {
-    resetWithOptions(createOptions()..enableGenericMethods = true);
+    prepareAnalysisContext(createOptions()..enableGenericMethods = true);
     checkLibrary('class C { void f<T, U>(T x(U u)) {} }');
   }
 
@@ -3609,8 +3855,8 @@
   }
 
   test_parts() {
-    addNamedSource('/a.dart', 'part of my.lib;');
-    addNamedSource('/b.dart', 'part of my.lib;');
+    addSource('/a.dart', 'part of my.lib;');
+    addSource('/b.dart', 'part of my.lib;');
     checkLibrary('library my.lib; part "a.dart"; part "b.dart";');
   }
 
@@ -3746,26 +3992,24 @@
   }
 
   test_type_reference_lib_to_part() {
-    addNamedSource(
-        '/a.dart', 'part of l; class C {} enum E { v } typedef F();');
+    addSource('/a.dart', 'part of l; class C {} enum E { v } typedef F();');
     checkLibrary('library l; part "a.dart"; C c; E e; F f;');
   }
 
   test_type_reference_part_to_lib() {
-    addNamedSource('/a.dart', 'part of l; C c; E e; F f;');
+    addSource('/a.dart', 'part of l; C c; E e; F f;');
     checkLibrary(
         'library l; part "a.dart"; class C {} enum E { v } typedef F();');
   }
 
   test_type_reference_part_to_other_part() {
-    addNamedSource(
-        '/a.dart', 'part of l; class C {} enum E { v } typedef F();');
-    addNamedSource('/b.dart', 'part of l; C c; E e; F f;');
+    addSource('/a.dart', 'part of l; class C {} enum E { v } typedef F();');
+    addSource('/b.dart', 'part of l; C c; E e; F f;');
     checkLibrary('library l; part "a.dart"; part "b.dart";');
   }
 
   test_type_reference_part_to_part() {
-    addNamedSource('/a.dart',
+    addSource('/a.dart',
         'part of l; class C {} enum E { v } typedef F(); C c; E e; F f;');
     checkLibrary('library l; part "a.dart";');
   }
@@ -3819,22 +4063,20 @@
 
   test_type_reference_to_import_part() {
     addLibrarySource('/a.dart', 'library l; part "b.dart";');
-    addNamedSource(
-        '/b.dart', 'part of l; class C {} enum E { v } typedef F();');
+    addSource('/b.dart', 'part of l; class C {} enum E { v } typedef F();');
     checkLibrary('import "a.dart"; C c; E e; F f;');
   }
 
   test_type_reference_to_import_part2() {
     addLibrarySource('/a.dart', 'library l; part "p1.dart"; part "p2.dart";');
-    addNamedSource('/p1.dart', 'part of l; class C1 {}');
-    addNamedSource('/p2.dart', 'part of l; class C2 {}');
+    addSource('/p1.dart', 'part of l; class C1 {}');
+    addSource('/p2.dart', 'part of l; class C2 {}');
     checkLibrary('import "a.dart"; C1 c1; C2 c2;');
   }
 
   test_type_reference_to_import_part_in_subdir() {
     addLibrarySource('/a/b.dart', 'library l; part "c.dart";');
-    addNamedSource(
-        '/a/c.dart', 'part of l; class C {} enum E { v } typedef F();');
+    addSource('/a/c.dart', 'part of l; class C {} enum E { v } typedef F();');
     checkLibrary('import "a/b.dart"; C c; E e; F f;');
   }
 
@@ -3932,6 +4174,16 @@
     checkLibrary('f() {} g() {}');
   }
 
+  test_unused_type_parameter() {
+    checkLibrary('''
+class C<T> {
+  void f() {}
+}
+C<int> c;
+var v = c.f;
+''');
+  }
+
   test_variable_const() {
     checkLibrary('const int i = 0;');
   }
@@ -3949,19 +4201,23 @@
     checkLibrary('final int x = 0;');
   }
 
+  test_variable_final_top_level_untyped() {
+    checkLibrary('final v = 0;');
+  }
+
   test_variable_getterInLib_setterInPart() {
-    addNamedSource('/a.dart', 'part of my.lib; void set x(int _) {}');
+    addSource('/a.dart', 'part of my.lib; void set x(int _) {}');
     checkLibrary('library my.lib; part "a.dart"; int get x => 42;');
   }
 
   test_variable_getterInPart_setterInLib() {
-    addNamedSource('/a.dart', 'part of my.lib; int get x => 42;');
+    addSource('/a.dart', 'part of my.lib; int get x => 42;');
     checkLibrary('library my.lib; part "a.dart"; void set x(int _) {}');
   }
 
   test_variable_getterInPart_setterInPart() {
-    addNamedSource('/a.dart', 'part of my.lib; int get x => 42;');
-    addNamedSource('/b.dart', 'part of my.lib; void set x(int _) {}');
+    addSource('/a.dart', 'part of my.lib; int get x => 42;');
+    addSource('/b.dart', 'part of my.lib; void set x(int _) {}');
     checkLibrary('library my.lib; part "a.dart"; part "b.dart";');
   }
 
@@ -3983,7 +4239,7 @@
   }
 
   test_variable_propagatedType_final_dep_inPart() {
-    addNamedSource('/a.dart', 'part of lib; final a = 1;');
+    addSource('/a.dart', 'part of lib; final a = 1;');
     checkLibrary('library lib; part "a.dart"; final b = a / 2;');
   }
 
@@ -3999,8 +4255,8 @@
   }
 
   test_variable_setterInPart_getterInPart() {
-    addNamedSource('/a.dart', 'part of my.lib; void set x(int _) {}');
-    addNamedSource('/b.dart', 'part of my.lib; int get x => 42;');
+    addSource('/a.dart', 'part of my.lib; void set x(int _) {}');
+    addSource('/b.dart', 'part of my.lib; int get x => 42;');
     checkLibrary('library my.lib; part "a.dart"; part "b.dart";');
   }
 
@@ -4010,11 +4266,12 @@
 
   /**
    * Encode the library containing [original] into a summary and then use
-   * [_TestSummaryResynthesizer.getElement] to retrieve just the original
+   * [TestSummaryResynthesizer.getElement] to retrieve just the original
    * element from the resynthesized summary.
    */
-  Element validateGetElement(Element original) {
-    _TestSummaryResynthesizer resynthesizer = encodeLibrary(original.library);
+  Element validateGetElement(String text, Element original) {
+    SummaryResynthesizer resynthesizer =
+        encodeDecodeLibrarySource(original.library.source);
     ElementLocationImpl location = original.location;
     Element result = resynthesizer.getElement(location);
     checkMinimalResynthesisWork(resynthesizer, original.library);
@@ -4024,15 +4281,9 @@
     expect(result.location, location);
     return result;
   }
-
-  void _assertUnresolvedIdentifier(Expression initializer, String desc) {
-    expect(initializer, new isInstanceOf<SimpleIdentifier>(), reason: desc);
-    SimpleIdentifier identifier = initializer;
-    expect(identifier.staticElement, isNull, reason: desc);
-  }
 }
 
-class _TestSummaryResynthesizer extends SummaryResynthesizer {
+class TestSummaryResynthesizer extends SummaryResynthesizer {
   final Map<String, UnlinkedUnit> unlinkedSummaries;
   final Map<String, LinkedLibrary> linkedSummaries;
 
@@ -4048,15 +4299,10 @@
    */
   final Set<String> linkedSummariesRequested = new Set<String>();
 
-  _TestSummaryResynthesizer(
-      SummaryResynthesizer parent,
-      AnalysisContext context,
-      TypeProvider typeProvider,
-      SourceFactory sourceFactory,
-      this.unlinkedSummaries,
-      this.linkedSummaries,
-      bool strongMode)
-      : super(parent, context, typeProvider, sourceFactory, strongMode);
+  TestSummaryResynthesizer(SummaryResynthesizer parent, AnalysisContext context,
+      this.unlinkedSummaries, this.linkedSummaries)
+      : super(parent, context, context.typeProvider, context.sourceFactory,
+            context.analysisOptions.strongMode);
 
   @override
   LinkedLibrary getLinkedSummary(String uri) {
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
new file mode 100644
index 0000000..13f10ce
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
@@ -0,0 +1,174 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.src.summary.summarize_ast_strong_test;
+
+import 'package:unittest/unittest.dart';
+
+import '../../reflective_tests.dart';
+import 'summarize_ast_test.dart';
+
+main() {
+  groupSep = ' | ';
+  runReflectiveTests(LinkedSummarizeAstStrongTest);
+}
+
+/**
+ * Override of [LinkedSummarizeAstTest] which uses strong mode.
+ */
+@reflectiveTest
+class LinkedSummarizeAstStrongTest extends LinkedSummarizeAstTest {
+  @override
+  bool get strongMode => true;
+
+  @override
+  @failingTest
+  test_bottom_reference_shared() {
+    super.test_bottom_reference_shared();
+  }
+
+  @override
+  @failingTest
+  test_closure_executable_with_imported_return_type() {
+    super.test_closure_executable_with_imported_return_type();
+  }
+
+  @override
+  @failingTest
+  test_closure_executable_with_return_type_from_closure() {
+    super.test_closure_executable_with_return_type_from_closure();
+  }
+
+  @override
+  @failingTest
+  test_closure_executable_with_unimported_return_type() {
+    super.test_closure_executable_with_unimported_return_type();
+  }
+
+  @override
+  @failingTest
+  test_field_propagated_type_final_immediate() {
+    super.test_field_propagated_type_final_immediate();
+  }
+
+  @override
+  @failingTest
+  test_fully_linked_references_follow_other_references() {
+    super.test_fully_linked_references_follow_other_references();
+  }
+
+  @override
+  @failingTest
+  test_implicit_dependencies_follow_other_dependencies() {
+    super.test_implicit_dependencies_follow_other_dependencies();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_bottom_return_type() {
+    super.test_initializer_executable_with_bottom_return_type();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_imported_return_type() {
+    super.test_initializer_executable_with_imported_return_type();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_return_type_from_closure() {
+    super.test_initializer_executable_with_return_type_from_closure();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_return_type_from_closure_field() {
+    super.test_initializer_executable_with_return_type_from_closure_field();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_return_type_from_closure_local() {
+    super.test_initializer_executable_with_return_type_from_closure_local();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_unimported_return_type() {
+    super.test_initializer_executable_with_unimported_return_type();
+  }
+
+  @override
+  @failingTest
+  test_linked_reference_reuse() {
+    super.test_linked_reference_reuse();
+  }
+
+  @override
+  @failingTest
+  test_linked_type_dependency_reuse() {
+    super.test_linked_type_dependency_reuse();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_genericClosure() {
+    super.test_syntheticFunctionType_genericClosure();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_genericClosure_inGenericFunction() {
+    super.test_syntheticFunctionType_genericClosure_inGenericFunction();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_inGenericClass() {
+    super.test_syntheticFunctionType_inGenericClass();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_inGenericFunction() {
+    super.test_syntheticFunctionType_inGenericFunction();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_noArguments() {
+    super.test_syntheticFunctionType_noArguments();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_withArguments() {
+    super.test_syntheticFunctionType_withArguments();
+  }
+
+  @override
+  @failingTest
+  test_unused_type_parameter() {
+    super.test_unused_type_parameter();
+  }
+
+  @override
+  @failingTest
+  test_variable_propagated_type_final_immediate() {
+    super.test_variable_propagated_type_final_immediate();
+  }
+
+  @override
+  @failingTest
+  test_variable_propagated_type_new_reference() {
+    super.test_variable_propagated_type_new_reference();
+  }
+
+  @override
+  @failingTest
+  test_variable_propagated_type_omit_dynamic() {
+    super.test_variable_propagated_type_omit_dynamic();
+  }
+}
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_test.dart
index 4e4cc1e..60b30a8 100644
--- a/pkg/analyzer/test/src/summary/summarize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_ast_test.dart
@@ -11,9 +11,12 @@
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/parser.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
-import 'package:analyzer/src/summary/prelink.dart';
+import 'package:analyzer/src/summary/link.dart';
 import 'package:analyzer/src/summary/summarize_ast.dart';
+import 'package:analyzer/src/summary/summarize_elements.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../reflective_tests.dart';
@@ -21,27 +24,172 @@
 
 main() {
   groupSep = ' | ';
-  runReflectiveTests(UnlinkedSummarizeAstTest);
+  runReflectiveTests(LinkedSummarizeAstSpecTest);
+}
+
+@reflectiveTest
+class LinkedSummarizeAstSpecTest extends LinkedSummarizeAstTest {
+  @override
+  bool get strongMode => false;
+
+  @override
+  @failingTest
+  test_bottom_reference_shared() {
+    super.test_bottom_reference_shared();
+  }
+
+  @override
+  @failingTest
+  test_closure_executable_with_bottom_return_type() {
+    super.test_closure_executable_with_bottom_return_type();
+  }
+
+  @override
+  @failingTest
+  test_closure_executable_with_imported_return_type() {
+    super.test_closure_executable_with_imported_return_type();
+  }
+
+  @override
+  @failingTest
+  test_closure_executable_with_return_type_from_closure() {
+    super.test_closure_executable_with_return_type_from_closure();
+  }
+
+  @override
+  @failingTest
+  test_closure_executable_with_unimported_return_type() {
+    super.test_closure_executable_with_unimported_return_type();
+  }
+
+  @override
+  @failingTest
+  test_field_propagated_type_final_immediate() {
+    super.test_field_propagated_type_final_immediate();
+  }
+
+  @override
+  @failingTest
+  test_fully_linked_references_follow_other_references() {
+    super.test_fully_linked_references_follow_other_references();
+  }
+
+  @override
+  @failingTest
+  test_implicit_dependencies_follow_other_dependencies() {
+    super.test_implicit_dependencies_follow_other_dependencies();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_bottom_return_type() {
+    super.test_initializer_executable_with_bottom_return_type();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_imported_return_type() {
+    super.test_initializer_executable_with_imported_return_type();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_return_type_from_closure() {
+    super.test_initializer_executable_with_return_type_from_closure();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_return_type_from_closure_field() {
+    super.test_initializer_executable_with_return_type_from_closure_field();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_return_type_from_closure_local() {
+    super.test_initializer_executable_with_return_type_from_closure_local();
+  }
+
+  @override
+  @failingTest
+  test_initializer_executable_with_unimported_return_type() {
+    super.test_initializer_executable_with_unimported_return_type();
+  }
+
+  @override
+  @failingTest
+  test_linked_reference_reuse() {
+    super.test_linked_reference_reuse();
+  }
+
+  @override
+  @failingTest
+  test_linked_type_dependency_reuse() {
+    super.test_linked_type_dependency_reuse();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_inGenericClass() {
+    super.test_syntheticFunctionType_inGenericClass();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_inGenericFunction() {
+    super.test_syntheticFunctionType_inGenericFunction();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_noArguments() {
+    super.test_syntheticFunctionType_noArguments();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_withArguments() {
+    super.test_syntheticFunctionType_withArguments();
+  }
+
+  @override
+  @failingTest
+  test_unused_type_parameter() {
+    super.test_unused_type_parameter();
+  }
+
+  @override
+  @failingTest
+  test_variable_propagated_type_final_immediate() {
+    super.test_variable_propagated_type_final_immediate();
+  }
+
+  @override
+  @failingTest
+  test_variable_propagated_type_new_reference() {
+    super.test_variable_propagated_type_new_reference();
+  }
+
+  @override
+  @failingTest
+  test_variable_propagated_type_omit_dynamic() {
+    super.test_variable_propagated_type_omit_dynamic();
+  }
 }
 
 /**
- * Override of [SummaryTest] which creates unlinked summaries directly from the
+ * Override of [SummaryTest] which creates linked summaries directly from the
  * AST.
  */
 @reflectiveTest
-class UnlinkedSummarizeAstTest extends Object with SummaryTest {
+abstract class LinkedSummarizeAstTest extends SummaryLinkerTest
+    with SummaryTest {
   @override
   LinkedLibrary linked;
 
   @override
   List<UnlinkedUnit> unlinkedUnits;
 
-  /**
-   * Map from absolute URI to the [UnlinkedUnit] for each compilation unit
-   * passed to [addNamedSource].
-   */
-  Map<String, UnlinkedUnit> uriToUnit = <String, UnlinkedUnit>{};
-
   @override
   bool get checkAstDerivedData => true;
 
@@ -49,55 +197,25 @@
   bool get expectAbsoluteUrisInDependencies => false;
 
   @override
-  bool get skipFullyLinkedData => true;
+  bool get skipFullyLinkedData => false;
 
   @override
-  bool get strongMode => false;
-
-  @override
-  addNamedSource(String filePath, String contents) {
-    CompilationUnit unit = _parseText(contents);
-    UnlinkedUnit unlinkedUnit =
-        new UnlinkedUnit.fromBuffer(serializeAstUnlinked(unit).toBuffer());
-    uriToUnit[absUri(filePath)] = unlinkedUnit;
-  }
+  bool get skipNonConstInitializers => false;
 
   @override
   void serializeLibraryText(String text, {bool allowErrors: false}) {
-    Uri testDartUri = Uri.parse(absUri('/test.dart'));
-    String resolveToAbsoluteUri(String relativeUri) =>
-        testDartUri.resolve(relativeUri).toString();
-    CompilationUnit unit = _parseText(text);
-    UnlinkedUnit definingUnit =
-        new UnlinkedUnit.fromBuffer(serializeAstUnlinked(unit).toBuffer());
-    UnlinkedUnit getPart(String relativeUri) {
-      String absoluteUri = resolveToAbsoluteUri(relativeUri);
-      UnlinkedUnit unit = uriToUnit[absoluteUri];
-      if (unit == null && !allowMissingFiles) {
-        fail('Prelinker unexpectedly requested unit for "$relativeUri"'
-            ' (resolves to "$absoluteUri").');
-      }
-      return unit;
-    }
-    UnlinkedPublicNamespace getImport(String relativeUri) {
-      String absoluteUri = resolveToAbsoluteUri(relativeUri);
-      UnlinkedPublicNamespace namespace = sdkPublicNamespace[absoluteUri];
-      if (namespace == null) {
-        namespace = uriToUnit[absoluteUri]?.publicNamespace;
-      }
-      if (namespace == null && !allowMissingFiles) {
-        fail('Prelinker unexpectedly requested namespace for "$relativeUri"'
-            ' (resolves to "$absoluteUri").'
-            '  Namespaces available: ${uriToUnit.keys}');
-      }
-      return namespace;
-    }
-    linked = new LinkedLibrary.fromBuffer(
-        prelink(definingUnit, getPart, getImport).toBuffer());
+    Map<String, UnlinkedUnitBuilder> uriToUnit = this.uriToUnit;
+    LinkerInputs linkerInputs = createLinkerInputs(text);
+    linked = link(linkerInputs.linkedLibraries, linkerInputs.getDependency,
+        linkerInputs.getUnit, strongMode)[linkerInputs.testDartUri.toString()];
+    expect(linked, isNotNull);
     validateLinkedLibrary(linked);
-    unlinkedUnits = <UnlinkedUnit>[definingUnit];
-    for (String relativeUri in definingUnit.publicNamespace.parts) {
-      UnlinkedUnit unit = uriToUnit[resolveToAbsoluteUri(relativeUri)];
+    unlinkedUnits = <UnlinkedUnit>[linkerInputs.unlinkedDefiningUnit];
+    for (String relativeUri
+        in linkerInputs.unlinkedDefiningUnit.publicNamespace.parts) {
+      UnlinkedUnit unit = uriToUnit[
+          resolveRelativeUri(linkerInputs.testDartUri, Uri.parse(relativeUri))
+              .toString()];
       if (unit == null) {
         if (!allowMissingFiles) {
           fail('Test referred to unknown unit $relativeUri');
@@ -108,6 +226,163 @@
     }
   }
 
+  test_class_no_superclass() {
+    UnlinkedClass cls = serializeClassText('part of dart.core; class Object {}',
+        className: 'Object');
+    expect(cls.supertype, isNull);
+    expect(cls.hasNoSupertype, isTrue);
+  }
+}
+
+/**
+ * Instances of the class [LinkerInputs] encapsulate the necessary information
+ * to pass to the summary linker.
+ */
+class LinkerInputs {
+  final bool _allowMissingFiles;
+  final Map<String, UnlinkedUnit> _uriToUnit;
+  final Uri testDartUri;
+  final UnlinkedUnit unlinkedDefiningUnit;
+  final Map<String, LinkedLibrary> _dependentLinkedLibraries;
+  final Map<String, UnlinkedUnit> _dependentUnlinkedUnits;
+
+  LinkerInputs(
+      this._allowMissingFiles,
+      this._uriToUnit,
+      this.testDartUri,
+      this.unlinkedDefiningUnit,
+      this._dependentLinkedLibraries,
+      this._dependentUnlinkedUnits);
+
+  Set<String> get linkedLibraries => _uriToUnit.keys.toSet();
+
+  LinkedLibrary getDependency(String absoluteUri) {
+    Map<String, LinkedLibrary> sdkLibraries =
+        SerializedMockSdk.instance.uriToLinkedLibrary;
+    LinkedLibrary linkedLibrary =
+        sdkLibraries[absoluteUri] ?? _dependentLinkedLibraries[absoluteUri];
+    if (linkedLibrary == null && !_allowMissingFiles) {
+      Set<String> librariesAvailable = sdkLibraries.keys.toSet();
+      librariesAvailable.addAll(_dependentLinkedLibraries.keys);
+      fail('Linker unexpectedly requested LinkedLibrary for "$absoluteUri".'
+          '  Libraries available: ${librariesAvailable.toList()}');
+    }
+    return linkedLibrary;
+  }
+
+  UnlinkedUnit getUnit(String absoluteUri) {
+    UnlinkedUnit unit = _uriToUnit[absoluteUri] ??
+        SerializedMockSdk.instance.uriToUnlinkedUnit[absoluteUri] ??
+        _dependentUnlinkedUnits[absoluteUri];
+    if (unit == null && !_allowMissingFiles) {
+      fail('Linker unexpectedly requested unit for "$absoluteUri".');
+    }
+    return unit;
+  }
+}
+
+/**
+ * Base class providing the ability to run the summary linker using summaries
+ * build from ASTs.
+ */
+abstract class SummaryLinkerTest {
+  /**
+   * Map from absolute URI to the [UnlinkedUnit] for each compilation unit
+   * passed to [addNamedSource].
+   */
+  Map<String, UnlinkedUnitBuilder> uriToUnit = <String, UnlinkedUnitBuilder>{};
+
+  /**
+   * Map from absolute URI to the [LinkedLibrary] for each compilation unit in a
+   * package bundle passed to [addBundle].
+   */
+  Map<String, LinkedLibrary> _dependentLinkedLibraries =
+      <String, LinkedLibrary>{};
+
+  /**
+   * Map from absolute URI to the [UnlinkedUnit] for each compilation unit in a
+   * package bundle passed to [addBundle].
+   */
+  Map<String, UnlinkedUnit> _dependentUnlinkedUnits = <String, UnlinkedUnit>{};
+
+  /**
+   * A test will set this to `true` if it contains `import`, `export`, or
+   * `part` declarations that deliberately refer to non-existent files.
+   */
+  bool get allowMissingFiles;
+
+  /**
+   * Add the given package bundle as a dependency so that it may be referenced
+   * by the files under test.
+   */
+  void addBundle(PackageBundle bundle) {
+    for (int i = 0; i < bundle.linkedLibraryUris.length; i++) {
+      _dependentLinkedLibraries[bundle.linkedLibraryUris[i]] =
+          bundle.linkedLibraries[i];
+    }
+    for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
+      _dependentUnlinkedUnits[bundle.unlinkedUnitUris[i]] =
+          bundle.unlinkedUnits[i];
+    }
+  }
+
+  /**
+   * Add the given source file so that it may be referenced by the file under
+   * test.
+   */
+  Source addNamedSource(String filePath, String contents) {
+    CompilationUnit unit = _parseText(contents);
+    UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
+    uriToUnit[absUri(filePath)] = unlinkedUnit;
+    // Tests using SummaryLinkerTest don't actually need the returned
+    // Source, so we can safely return `null`.
+    return null;
+  }
+
+  LinkerInputs createLinkerInputs(String text, {String path: '/test.dart'}) {
+    Uri testDartUri = Uri.parse(absUri(path));
+    CompilationUnit unit = _parseText(text);
+    UnlinkedUnitBuilder unlinkedDefiningUnit = serializeAstUnlinked(unit);
+    uriToUnit[testDartUri.toString()] = unlinkedDefiningUnit;
+    LinkerInputs linkerInputs = new LinkerInputs(
+        allowMissingFiles,
+        uriToUnit,
+        testDartUri,
+        unlinkedDefiningUnit,
+        _dependentLinkedLibraries,
+        _dependentUnlinkedUnits);
+    // Reset uriToUnit, _dependentLinkedLibraries, and _dependentUnlinkedUnits
+    // in case the test needs to start a new package bundle.
+    uriToUnit = <String, UnlinkedUnitBuilder>{};
+    _dependentLinkedLibraries = <String, LinkedLibrary>{};
+    _dependentUnlinkedUnits = <String, UnlinkedUnit>{};
+    return linkerInputs;
+  }
+
+  /**
+   * Link together the given file, along with any other files passed to
+   * [addNamedSource], to form a package bundle.  Reset the state of the buffers
+   * accumulated by [addNamedSource] and [addBundle] so that further bundles
+   * can be created.
+   */
+  PackageBundleBuilder createPackageBundle(String text,
+      {String path: '/test.dart'}) {
+    PackageBundleAssembler assembler = new PackageBundleAssembler();
+    LinkerInputs linkerInputs = createLinkerInputs(text, path: path);
+    Map<String, LinkedLibraryBuilder> linkedLibraries = link(
+        linkerInputs.linkedLibraries,
+        linkerInputs.getDependency,
+        linkerInputs.getUnit,
+        true);
+    linkedLibraries.forEach(assembler.addLinkedLibrary);
+    linkerInputs._uriToUnit.forEach((String uri, UnlinkedUnitBuilder unit) {
+      // Note: it doesn't matter what we store for the hash because it isn't
+      // used in these tests.
+      assembler.addUnlinkedUnitWithHash(uri, unit, 'HASH');
+    });
+    return assembler.assemble();
+  }
+
   CompilationUnit _parseText(String text) {
     CharSequenceReader reader = new CharSequenceReader(text);
     Scanner scanner =
diff --git a/pkg/analyzer/test/src/summary/summarize_elements_strong_test.dart b/pkg/analyzer/test/src/summary/summarize_elements_strong_test.dart
index 8a8bfe6..1ae97d4 100644
--- a/pkg/analyzer/test/src/summary/summarize_elements_strong_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_elements_strong_test.dart
@@ -5,9 +5,11 @@
 library analyzer.test.src.summary.summarize_elements_strong_test;
 
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/sdk.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../reflective_tests.dart';
+import '../context/abstract_context.dart';
 import 'summarize_elements_test.dart';
 import 'summary_common.dart';
 
@@ -27,4 +29,7 @@
 
   @override
   bool get strongMode => true;
+
+  @override
+  DartSdk createDartSdk() => AbstractContextTest.SHARED_STRONG_MOCK_SDK;
 }
diff --git a/pkg/analyzer/test/src/summary/summarize_elements_test.dart b/pkg/analyzer/test/src/summary/summarize_elements_test.dart
index b854d31..eda8138 100644
--- a/pkg/analyzer/test/src/summary/summarize_elements_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_elements_test.dart
@@ -6,6 +6,7 @@
 
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/summary/format.dart';
@@ -16,8 +17,9 @@
     as summarize_elements;
 import 'package:unittest/unittest.dart';
 
-import '../../generated/resolver_test.dart';
 import '../../reflective_tests.dart';
+import '../abstract_single_unit.dart';
+import '../context/abstract_context.dart';
 import 'summary_common.dart';
 
 main() {
@@ -29,7 +31,7 @@
  * Override of [SummaryTest] which creates summaries from the element model.
  */
 @reflectiveTest
-class SummarizeElementsTest extends ResolverTestCase with SummaryTest {
+class SummarizeElementsTest extends AbstractSingleUnitTest with SummaryTest {
   /**
    * The list of absolute unit URIs corresponding to the compilation units in
    * [unlinkedUnits].
@@ -64,15 +66,21 @@
   bool get skipFullyLinkedData => false;
 
   @override
+  bool get skipNonConstInitializers => true;
+
+  @override
   bool get strongMode => false;
 
   @override
   Source addNamedSource(String filePath, String contents) {
-    Source source = super.addNamedSource(filePath, contents);
+    Source source = super.addSource(filePath, contents);
     _fileContents[source] = contents;
     return source;
   }
 
+  @override
+  DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK;
+
   /**
    * Serialize the library containing the given class [element], then
    * deserialize it and return the summary of the class.
@@ -89,7 +97,7 @@
   void serializeLibraryElement(LibraryElement library) {
     summarize_elements.LibrarySerializationResult serializedLib =
         summarize_elements.serializeLibrary(
-            library, typeProvider, analysisContext.analysisOptions.strongMode);
+            library, context.typeProvider, context.analysisOptions.strongMode);
     {
       List<int> buffer = serializedLib.linked.toBuffer();
       linked = new LinkedLibrary.fromBuffer(buffer);
@@ -104,14 +112,15 @@
 
   @override
   void serializeLibraryText(String text, {bool allowErrors: false}) {
-    Source source = addSource(text);
+    Source source = addTestSource(text);
     _fileContents[source] = text;
-    LibraryElement library = resolve2(source);
+    LibraryElement library = context.computeLibraryElement(source);
     if (!allowErrors) {
-      assertNoErrors(source);
+      assertNoErrorsInSource(source);
     }
     serializeLibraryElement(library);
     expect(unlinkedUnits[0].imports.length, linked.importDependencies.length);
+    expect(unlinkedUnits[0].exports.length, linked.exportDependencies.length);
     expect(linked.units.length, unlinkedUnits.length);
     for (int i = 0; i < linked.units.length; i++) {
       expect(unlinkedUnits[i].references.length,
@@ -123,11 +132,12 @@
   @override
   void setUp() {
     super.setUp();
-    resetWithOptions(options);
+    prepareAnalysisContext(options);
   }
 
   test_class_no_superclass() {
-    UnlinkedClass cls = serializeClassElement(typeProvider.objectType.element);
+    UnlinkedClass cls =
+        serializeClassElement(context.typeProvider.objectType.element);
     expect(cls.supertype, isNull);
     expect(cls.hasNoSupertype, isTrue);
   }
@@ -138,7 +148,7 @@
    */
   void verifyPublicNamespace() {
     for (int i = 0; i < unlinkedUnits.length; i++) {
-      Source source = analysisContext.sourceFactory.forUri(unitUris[i]);
+      Source source = context.sourceFactory.forUri(unitUris[i]);
       String text = _fileContents[source];
       if (text == null) {
         if (!allowMissingFiles) {
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 9427cd6..cfde5e9 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -23,41 +23,15 @@
     as summarize_elements;
 import 'package:unittest/unittest.dart';
 
-import '../../generated/resolver_test.dart';
+import '../context/mock_sdk.dart';
 
 /**
- * The public namespaces of the sdk are computed once so that we don't bog
- * down the test.  Structured as a map from absolute URI to the corresponding
- * public namespace.
- *
- * Note: should an exception occur during computation of this variable, it
- * will silently be set to null to allow other tests to run.
+ * Convert [path] to a suitably formatted absolute path URI for the current
+ * platform.
  */
-final Map<String, UnlinkedPublicNamespace> sdkPublicNamespace = () {
-  try {
-    AnalysisContext analysisContext = AnalysisContextFactory.contextWithCore();
-    Map<String, UnlinkedPublicNamespace> uriToNamespace =
-        <String, UnlinkedPublicNamespace>{};
-    List<LibraryElement> libraries = [
-      analysisContext.typeProvider.objectType.element.library,
-      analysisContext.typeProvider.futureType.element.library
-    ];
-    for (LibraryElement library in libraries) {
-      summarize_elements.LibrarySerializationResult serializedLibrary =
-          summarize_elements.serializeLibrary(
-              library, analysisContext.typeProvider, false);
-      for (int i = 0; i < serializedLibrary.unlinkedUnits.length; i++) {
-        uriToNamespace[serializedLibrary.unitUris[i]] =
-            new UnlinkedUnit.fromBuffer(
-                    serializedLibrary.unlinkedUnits[i].toBuffer())
-                .publicNamespace;
-      }
-    }
-    return uriToNamespace;
-  } catch (_) {
-    return null;
-  }
-}();
+String absUri(String path) {
+  return FileUtilities2.createFile(path).toURI().toString();
+}
 
 /**
  * Convert a summary object (or a portion of one) into a canonical form that
@@ -116,6 +90,52 @@
 typedef void _EntityRefValidator(EntityRef entityRef);
 
 /**
+ * [SerializedMockSdk] is a singleton class representing the result of
+ * serializing the mock SDK to summaries.  It is computed once and then shared
+ * among test invocations so that we don't bog down the tests.
+ *
+ * Note: should an exception occur during computation of [instance], it will
+ * silently be set to null to allow other tests to complete quickly.
+ */
+class SerializedMockSdk {
+  static final SerializedMockSdk instance = _serializeMockSdk();
+
+  final Map<String, UnlinkedUnit> uriToUnlinkedUnit;
+
+  final Map<String, LinkedLibrary> uriToLinkedLibrary;
+  SerializedMockSdk._(this.uriToUnlinkedUnit, this.uriToLinkedLibrary);
+
+  static SerializedMockSdk _serializeMockSdk() {
+    try {
+      AnalysisContext analysisContext = new MockSdk().context;
+      Map<String, UnlinkedUnit> uriToUnlinkedUnit = <String, UnlinkedUnit>{};
+      Map<String, LinkedLibrary> uriToLinkedLibrary = <String, LinkedLibrary>{};
+      List<LibraryElement> libraries = [
+        analysisContext.typeProvider.objectType.element.library,
+        analysisContext.typeProvider.futureType.element.library,
+        analysisContext.computeLibraryElement(
+            analysisContext.sourceFactory.resolveUri(null, 'dart:math')),
+      ];
+      for (LibraryElement library in libraries) {
+        summarize_elements.LibrarySerializationResult serializedLibrary =
+            summarize_elements.serializeLibrary(
+                library, analysisContext.typeProvider, false);
+        uriToLinkedLibrary[library.source.uri.toString()] =
+            new LinkedLibrary.fromBuffer(serializedLibrary.linked.toBuffer());
+        for (int i = 0; i < serializedLibrary.unlinkedUnits.length; i++) {
+          uriToUnlinkedUnit[serializedLibrary.unitUris[i]] =
+              new UnlinkedUnit.fromBuffer(
+                  serializedLibrary.unlinkedUnits[i].toBuffer());
+        }
+      }
+      return new SerializedMockSdk._(uriToUnlinkedUnit, uriToLinkedLibrary);
+    } catch (_) {
+      return null;
+    }
+  }
+}
+
+/**
  * Base class containing most summary tests.  This allows summary tests to be
  * re-used to exercise all the different ways in which summaries can be
  * generated (e.g. direct from the AST, from the element model, from a
@@ -161,6 +181,11 @@
   bool get skipFullyLinkedData;
 
   /**
+   * `true` if non-const variable initializers are not serialized.
+   */
+  bool get skipNonConstInitializers;
+
+  /**
    * `true` if the linked portion of the summary contains the result of strong
    * mode analysis.
    */
@@ -173,14 +198,6 @@
   List<UnlinkedUnit> get unlinkedUnits;
 
   /**
-   * Convert [path] to a suitably formatted absolute path URI for the current
-   * platform.
-   */
-  String absUri(String path) {
-    return FileUtilities2.createFile(path).toURI().toString();
-  }
-
-  /**
    * Add the given source file so that it may be referenced by the file under
    * test.
    */
@@ -200,19 +217,38 @@
     ]);
   }
 
+  void checkConstCycle(String className,
+      {String name: '', bool hasCycle: true}) {
+    UnlinkedClass cls = findClass(className);
+    int constCycleSlot =
+        findExecutable(name, executables: cls.executables).constCycleSlot;
+    expect(constCycleSlot, isNot(0));
+    if (!skipFullyLinkedData) {
+      expect(
+          definingUnit.constCycles,
+          hasCycle
+              ? contains(constCycleSlot)
+              : isNot(contains(constCycleSlot)));
+    }
+  }
+
   /**
    * Verify that the [dependency]th element of the dependency table represents
    * a file reachable via the given [absoluteUri] and [relativeUri].
    */
   void checkDependency(int dependency, String absoluteUri, String relativeUri) {
+    expect(dependency, new isInstanceOf<int>());
     if (expectAbsoluteUrisInDependencies) {
       // The element model doesn't (yet) store enough information to recover
       // relative URIs, so we have to use the absolute URI.
       // TODO(paulberry): fix this.
-      relativeUri = absoluteUri;
+      expect(linked.dependencies[dependency].uri, absoluteUri);
+    } else if (dependency >= linked.numPrelinkedDependencies) {
+      // Fully-linked dependencies are always absolute URIs.
+      expect(linked.dependencies[dependency].uri, absoluteUri);
+    } else {
+      expect(linked.dependencies[dependency].uri, relativeUri);
     }
-    expect(dependency, new isInstanceOf<int>());
-    expect(linked.dependencies[dependency].uri, relativeUri);
   }
 
   /**
@@ -481,7 +517,8 @@
       UnlinkedUnit unlinkedSourceUnit,
       int numTypeParameters: 0,
       bool checkAstDerivedDataOverride: false,
-      int localIndex: 0}) {
+      int localIndex: 0,
+      bool unresolvedHasName: false}) {
     linkedSourceUnit ??= definingUnit;
     unlinkedSourceUnit ??= unlinkedUnits[0];
     LinkedReference referenceResolution =
@@ -516,7 +553,7 @@
         !checkAstDerivedDataOverride) {
       // summarize_elements.dart isn't yet able to record the name of
       // unresolved references.  TODO(paulberry): fix this.
-      expect(name, '*unresolved*');
+      expect(name, unresolvedHasName ? expectedName : '*unresolved*');
     } else {
       if (expectedName == null) {
         expect(name, isEmpty);
@@ -558,7 +595,8 @@
       LinkedUnit linkedSourceUnit,
       UnlinkedUnit unlinkedSourceUnit,
       int numTypeParameters: 0,
-      bool checkAstDerivedDataOverride: false}) {
+      bool checkAstDerivedDataOverride: false,
+      bool unresolvedHasName: false}) {
     linkedSourceUnit ??= definingUnit;
     expect(typeRef, new isInstanceOf<EntityRef>());
     expect(typeRef.paramReference, 0);
@@ -573,12 +611,14 @@
         linkedSourceUnit: linkedSourceUnit,
         unlinkedSourceUnit: unlinkedSourceUnit,
         numTypeParameters: numTypeParameters,
-        checkAstDerivedDataOverride: checkAstDerivedDataOverride);
+        checkAstDerivedDataOverride: checkAstDerivedDataOverride,
+        unresolvedHasName: unresolvedHasName);
     expect(reference, isNotNull,
         reason: 'Unlinked type refs must refer to an explicit reference');
     if (expectedKind == ReferenceKind.unresolved &&
         !checkAstDerivedData &&
-        !checkAstDerivedDataOverride) {
+        !checkAstDerivedDataOverride &&
+        !unresolvedHasName) {
       // summarize_elements.dart isn't yet able to record the prefix of
       // unresolved references.  TODO(paulberry): fix this.
       expect(reference.prefixReference, 0);
@@ -1076,6 +1116,11 @@
     expect(cls.hasNoSupertype, isFalse);
   }
 
+  test_class_codeRange() {
+    UnlinkedClass cls = serializeClassText(' class C {}');
+    _assertCodeRange(cls.codeRange, 1, 10);
+  }
+
   test_class_concrete() {
     UnlinkedClass cls = serializeClassText('class C {}');
     expect(cls.isAbstract, false);
@@ -1697,18 +1742,6 @@
         strings: ['T']);
   }
 
-  test_constExpr_identical() {
-    UnlinkedVariable variable =
-        serializeVariableText('const v = identical(42, null);');
-    _assertUnlinkedConst(variable.constExpr, operators: [
-      UnlinkedConstOperation.pushInt,
-      UnlinkedConstOperation.pushNull,
-      UnlinkedConstOperation.identical
-    ], ints: [
-      42
-    ]);
-  }
-
   test_constExpr_invokeConstructor_generic_named() {
     UnlinkedVariable variable = serializeVariableText('''
 class C<K, V> {
@@ -2171,6 +2204,25 @@
     ]);
   }
 
+  test_constExpr_invokeMethodRef_identical() {
+    UnlinkedVariable variable =
+        serializeVariableText('const v = identical(42, null);');
+    _assertUnlinkedConst(variable.constExpr, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushNull,
+      UnlinkedConstOperation.invokeMethodRef
+    ], ints: [
+      42,
+      0,
+      2
+    ], referenceValidators: [
+      (EntityRef r) {
+        checkTypeRef(r, 'dart:core', 'dart:core', 'identical',
+            expectedKind: ReferenceKind.topLevelFunction);
+      }
+    ]);
+  }
+
   test_constExpr_length_classConstField() {
     UnlinkedVariable variable = serializeVariableText('''
 class C {
@@ -2223,7 +2275,8 @@
       UnlinkedConstOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, null, 'length',
-              expectedKind: ReferenceKind.length,
+              expectedKind: ReferenceKind.unresolved,
+              unresolvedHasName: true,
               prefixExpectations: [
                 new _PrefixExpectation(
                     ReferenceKind.topLevelPropertyAccessor, 'a')
@@ -2242,7 +2295,8 @@
       UnlinkedConstOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, null, 'length',
-              expectedKind: ReferenceKind.length,
+              expectedKind: ReferenceKind.unresolved,
+              unresolvedHasName: true,
               prefixExpectations: [
                 new _PrefixExpectation(ReferenceKind.propertyAccessor, 'F'),
                 new _PrefixExpectation(ReferenceKind.classOrEnum, 'C'),
@@ -2264,7 +2318,8 @@
       UnlinkedConstOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, null, 'length',
-              expectedKind: ReferenceKind.length,
+              expectedKind: ReferenceKind.unresolved,
+              unresolvedHasName: true,
               prefixExpectations: [
                 new _PrefixExpectation(
                     ReferenceKind.topLevelPropertyAccessor, 'a',
@@ -2287,7 +2342,8 @@
       UnlinkedConstOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, null, 'length',
-              expectedKind: ReferenceKind.length,
+              expectedKind: ReferenceKind.unresolved,
+              unresolvedHasName: true,
               prefixExpectations: [
                 new _PrefixExpectation(
                     ReferenceKind.topLevelPropertyAccessor, 'a',
@@ -2304,10 +2360,11 @@
       UnlinkedConstOperation.pushString,
       UnlinkedConstOperation.pushString,
       UnlinkedConstOperation.add,
-      UnlinkedConstOperation.length
+      UnlinkedConstOperation.extractProperty
     ], strings: [
       'abc',
-      'edf'
+      'edf',
+      'length'
     ]);
   }
 
@@ -2316,9 +2373,10 @@
         serializeVariableText('const v = ("abc").length;');
     _assertUnlinkedConst(variable.constExpr, operators: [
       UnlinkedConstOperation.pushString,
-      UnlinkedConstOperation.length
+      UnlinkedConstOperation.extractProperty
     ], strings: [
-      'abc'
+      'abc',
+      'length'
     ]);
   }
 
@@ -2327,9 +2385,10 @@
         serializeVariableText('const v = "abc".length;');
     _assertUnlinkedConst(variable.constExpr, operators: [
       UnlinkedConstOperation.pushString,
-      UnlinkedConstOperation.length
+      UnlinkedConstOperation.extractProperty
     ], strings: [
-      'abc'
+      'abc',
+      'length'
     ]);
   }
 
@@ -2599,6 +2658,82 @@
     ]);
   }
 
+  test_constExpr_pushReference_enumValue() {
+    UnlinkedVariable variable = serializeVariableText('''
+enum C {V1, V2, V3}
+const v = C.V1;
+''');
+    _assertUnlinkedConst(variable.constExpr, operators: [
+      UnlinkedConstOperation.pushReference
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'V1',
+              expectedKind: ReferenceKind.propertyAccessor,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C')
+              ])
+    ]);
+  }
+
+  test_constExpr_pushReference_enumValue_viaImport() {
+    addNamedSource(
+        '/a.dart',
+        '''
+enum C {V1, V2, V3}
+''');
+    UnlinkedVariable variable = serializeVariableText('''
+import 'a.dart';
+const v = C.V1;
+''');
+    _assertUnlinkedConst(variable.constExpr, operators: [
+      UnlinkedConstOperation.pushReference
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'V1',
+              expectedKind: ReferenceKind.propertyAccessor,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                    absoluteUri: absUri('/a.dart'), relativeUri: 'a.dart')
+              ])
+    ]);
+  }
+
+  test_constExpr_pushReference_enumValues() {
+    UnlinkedVariable variable = serializeVariableText('''
+enum C {V1, V2, V3}
+const v = C.values;
+''');
+    _assertUnlinkedConst(variable.constExpr, operators: [
+      UnlinkedConstOperation.pushReference
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'values',
+              expectedKind: ReferenceKind.propertyAccessor,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C')
+              ])
+    ]);
+  }
+
+  test_constExpr_pushReference_enumValues_viaImport() {
+    addNamedSource(
+        '/a.dart',
+        '''
+enum C {V1, V2, V3}
+''');
+    UnlinkedVariable variable = serializeVariableText('''
+import 'a.dart';
+const v = C.values;
+''');
+    _assertUnlinkedConst(variable.constExpr, operators: [
+      UnlinkedConstOperation.pushReference
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'values',
+              expectedKind: ReferenceKind.propertyAccessor,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                    absoluteUri: absUri('/a.dart'), relativeUri: 'a.dart')
+              ])
+    ]);
+  }
+
   test_constExpr_pushReference_field() {
     UnlinkedVariable variable = serializeVariableText('''
 class C {
@@ -2873,7 +3008,13 @@
 ''';
     UnlinkedVariable variable =
         serializeClassText(text, allowErrors: true).fields[0];
-    _assertUnlinkedConst(variable.constExpr, isInvalid: true);
+    _assertUnlinkedConst(variable.constExpr, operators: [
+      UnlinkedConstOperation.pushReference
+    ], referenceValidators: [
+      (EntityRef r) {
+        return checkParamTypeRef(r, 1);
+      }
+    ]);
   }
 
   test_constExpr_pushReference_unresolved_prefix0() {
@@ -3333,6 +3474,7 @@
     expect(parameter.kind, UnlinkedParamKind.named);
     expect(parameter.initializer, isNotNull);
     expect(parameter.defaultValueCode, '42');
+    _assertCodeRange(parameter.codeRange, 13, 10);
     _assertUnlinkedConst(parameter.defaultValue,
         operators: [UnlinkedConstOperation.pushInt], ints: [42]);
   }
@@ -3364,6 +3506,7 @@
     expect(parameter.kind, UnlinkedParamKind.positional);
     expect(parameter.initializer, isNotNull);
     expect(parameter.defaultValueCode, '42');
+    _assertCodeRange(parameter.codeRange, 13, 11);
     _assertUnlinkedConst(parameter.defaultValue,
         operators: [UnlinkedConstOperation.pushInt], ints: [42]);
   }
@@ -3408,6 +3551,7 @@
     expect(executable.nameOffset, text.indexOf('foo'));
     expect(executable.periodOffset, text.indexOf('.foo'));
     expect(executable.nameEnd, text.indexOf('()'));
+    _assertCodeRange(executable.codeRange, 10, 8);
   }
 
   test_constructor_non_const() {
@@ -3800,6 +3944,551 @@
     expect(executable.returnType, isNull);
   }
 
+  test_constructor_withCycles_const() {
+    serializeLibraryText('''
+class C {
+  final x;
+  const C() : x = const D();
+}
+class D {
+  final x;
+  const D() : x = const C();
+}
+class E {
+  final x;
+  const E() : x = null;
+}
+''');
+    checkConstCycle('C');
+    checkConstCycle('D');
+    checkConstCycle('E', hasCycle: false);
+  }
+
+  test_constructor_withCycles_nonConst() {
+    serializeLibraryText('''
+class C {
+  final x;
+  C() : x = new D();
+}
+class D {
+  final x;
+  D() : x = new C();
+}
+''');
+    expect(findClass('C').executables[0].constCycleSlot, 0);
+    expect(findClass('D').executables[0].constCycleSlot, 0);
+  }
+
+  test_constructorCycle_redirectToImplicitConstructor() {
+    serializeLibraryText(
+        '''
+class C {
+  const factory C() = D;
+}
+class D extends C {}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_redirectToNonConstConstructor() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    serializeLibraryText(
+        '''
+class C {
+  const factory C() = D;
+}
+class D extends C {
+  D();
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_redirectToSymbolConstructor() {
+    // The symbol constructor has some special case behaviors in analyzer.
+    // Make sure those special case behaviors don't cause problems.
+    serializeLibraryText(
+        '''
+class C {
+  const factory C(String name) = Symbol;
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToClass() {
+    serializeLibraryText('''
+class C {
+  final x;
+  const C() : x = C;
+}
+''');
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToEnum() {
+    serializeLibraryText('''
+enum E { v }
+class C {
+  final x;
+  const C() : x = E;
+}
+''');
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToEnumValue() {
+    serializeLibraryText('''
+enum E { v }
+class C {
+  final x;
+  const C() : x = E.v;
+}
+''');
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToEnumValues() {
+    serializeLibraryText('''
+enum E { v }
+class C {
+  final x;
+  const C() : x = E.values;
+}
+''');
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToGenericParameter() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    serializeLibraryText(
+        '''
+class C<T> {
+  final x;
+  const C() : x = T;
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToGenericParameter_asSupertype() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    serializeLibraryText(
+        '''
+class C<T> extends T {
+  const C();
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToStaticMethod_inOtherClass() {
+    serializeLibraryText('''
+class C {
+  final x;
+  const C() : x = D.f;
+}
+class D {
+  static void f() {}
+}
+''');
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToStaticMethod_inSameClass() {
+    serializeLibraryText('''
+class C {
+  final x;
+  static void f() {}
+  const C() : x = f;
+}
+''');
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToTopLevelFunction() {
+    serializeLibraryText('''
+void f() {}
+class C {
+  final x;
+  const C() : x = f;
+}
+''');
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToTypedef() {
+    serializeLibraryText('''
+typedef F();
+class C {
+  final x;
+  const C() : x = F;
+}
+''');
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToUndefinedName() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    serializeLibraryText(
+        '''
+class C {
+  final x;
+  const C() : x = foo;
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToUndefinedName_viaPrefix() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    addNamedSource('/a.dart', '');
+    serializeLibraryText(
+        '''
+import 'a.dart' as a;
+class C {
+  final x;
+  const C() : x = a.foo;
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_referenceToUndefinedName_viaPrefix_nonExistentFile() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    allowMissingFiles = true;
+    serializeLibraryText(
+        '''
+import 'a.dart' as a;
+class C {
+  final x;
+  const C() : x = a.foo;
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_trivial() {
+    serializeLibraryText(
+        '''
+class C {
+  const C() : this();
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+  }
+
+  test_constructorCycle_viaFactoryRedirect() {
+    serializeLibraryText(
+        '''
+class C {
+  const C();
+  const factory C.named() = D;
+}
+class D extends C {
+  final x;
+  const D() : x = y;
+}
+const y = const C.named();
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+    checkConstCycle('C', name: 'named');
+    checkConstCycle('D');
+  }
+
+  test_constructorCycle_viaFinalField() {
+    serializeLibraryText(
+        '''
+class C {
+  final x = const C();
+  const C();
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+  }
+
+  test_constructorCycle_viaLength() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    serializeLibraryText(
+        '''
+class C {
+  final x;
+  const C() : x = y.length;
+}
+const y = const C();
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+  }
+
+  test_constructorCycle_viaNamedConstructor() {
+    serializeLibraryText('''
+class C {
+  final x;
+  const C() : x = const D.named();
+}
+class D {
+  final x;
+  const D.named() : x = const C();
+}
+''');
+    checkConstCycle('C');
+    checkConstCycle('D', name: 'named');
+  }
+
+  test_constructorCycle_viaOrdinaryRedirect() {
+    serializeLibraryText('''
+class C {
+  final x;
+  const C() : this.named();
+  const C.named() : x = const C();
+}
+''');
+    checkConstCycle('C');
+    checkConstCycle('C', name: 'named');
+  }
+
+  test_constructorCycle_viaOrdinaryRedirect_suppressSupertype() {
+    // Since C redirects to C.named, it doesn't implicitly refer to B's unnamed
+    // constructor.  Therefore there is no cycle.
+    serializeLibraryText('''
+class B {
+  final x;
+  const B() : x = const C();
+  const B.named() : x = null;
+}
+class C extends B {
+  const C() : this.named();
+  const C.named() : super.named();
+}
+''');
+    checkConstCycle('B', hasCycle: false);
+    checkConstCycle('B', name: 'named', hasCycle: false);
+    checkConstCycle('C', hasCycle: false);
+    checkConstCycle('C', name: 'named', hasCycle: false);
+  }
+
+  test_constructorCycle_viaRedirectArgument() {
+    serializeLibraryText(
+        '''
+class C {
+  final x;
+  const C() : this.named(y);
+  const C.named(this.x);
+}
+const y = const C();
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+    checkConstCycle('C', name: 'named', hasCycle: false);
+  }
+
+  test_constructorCycle_viaStaticField_inOtherClass() {
+    serializeLibraryText(
+        '''
+class C {
+  final x;
+  const C() : x = D.y;
+}
+class D {
+  static const y = const C();
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+  }
+
+  test_constructorCycle_viaStaticField_inSameClass() {
+    serializeLibraryText(
+        '''
+class C {
+  final x;
+  static const y = const C();
+  const C() : x = y;
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+  }
+
+  test_constructorCycle_viaSuperArgument() {
+    serializeLibraryText(
+        '''
+class B {
+  final x;
+  const B(this.x);
+}
+class C extends B {
+  const C() : super(y);
+}
+const y = const C();
+''',
+        allowErrors: true);
+    checkConstCycle('B', hasCycle: false);
+    checkConstCycle('C');
+  }
+
+  test_constructorCycle_viaSupertype() {
+    serializeLibraryText('''
+class C {
+  final x;
+  const C() : x = const D();
+}
+class D extends C {
+  const D();
+}
+''');
+    checkConstCycle('C');
+    checkConstCycle('D');
+  }
+
+  test_constructorCycle_viaSupertype_Enum() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    serializeLibraryText(
+        '''
+enum E { v }
+class C extends E {
+  const C();
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+  }
+
+  test_constructorCycle_viaSupertype_explicit() {
+    serializeLibraryText('''
+class C {
+  final x;
+  const C() : x = const D();
+  const C.named() : x = const D.named();
+}
+class D extends C {
+  const D() : super();
+  const D.named() : super.named();
+}
+''');
+    checkConstCycle('C');
+    checkConstCycle('C', name: 'named');
+    checkConstCycle('D');
+    checkConstCycle('D', name: 'named');
+  }
+
+  test_constructorCycle_viaSupertype_explicit_undefined() {
+    // It's not valid Dart but we need to make sure it doesn't crash
+    // summary generation.
+    serializeLibraryText(
+        '''
+class C {
+  final x;
+  const C() : x = const D();
+}
+class D extends C {
+  const D() : super.named();
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C', hasCycle: false);
+    checkConstCycle('D', hasCycle: false);
+  }
+
+  test_constructorCycle_viaSupertype_withDefaultTypeArgument() {
+    serializeLibraryText('''
+class C<T> {
+  final x;
+  const C() : x = const D();
+}
+class D extends C {
+  const D();
+}
+''');
+    checkConstCycle('C');
+    checkConstCycle('D');
+  }
+
+  test_constructorCycle_viaSupertype_withTypeArgument() {
+    serializeLibraryText('''
+class C<T> {
+  final x;
+  const C() : x = const D();
+}
+class D extends C<int> {
+  const D();
+}
+''');
+    checkConstCycle('C');
+    checkConstCycle('D');
+  }
+
+  test_constructorCycle_viaTopLevelVariable() {
+    serializeLibraryText(
+        '''
+class C {
+  final x;
+  const C() : x = y;
+}
+const y = const C();
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+  }
+
+  test_constructorCycle_viaTopLevelVariable_imported() {
+    addNamedSource(
+        '/a.dart',
+        '''
+import 'test.dart';
+const y = const C();
+    ''');
+    serializeLibraryText(
+        '''
+import 'a.dart';
+class C {
+  final x;
+  const C() : x = y;
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+  }
+
+  test_constructorCycle_viaTopLevelVariable_importedViaPrefix() {
+    addNamedSource(
+        '/a.dart',
+        '''
+import 'test.dart';
+const y = const C();
+    ''');
+    serializeLibraryText(
+        '''
+import 'a.dart' as a;
+class C {
+  final x;
+  const C() : x = a.y;
+}
+''',
+        allowErrors: true);
+    checkConstCycle('C');
+  }
+
   test_dependencies_export_to_export_unused() {
     addNamedSource('/a.dart', 'export "b.dart";');
     addNamedSource('/b.dart', '');
@@ -3967,11 +4656,25 @@
     expect(e.values, hasLength(1));
     expect(e.values[0].name, 'v1');
     expect(e.values[0].nameOffset, text.indexOf('v1'));
+    _assertCodeRange(e.codeRange, 0, 13);
     expect(unlinkedUnits[0].publicNamespace.names, hasLength(1));
     expect(unlinkedUnits[0].publicNamespace.names[0].kind,
         ReferenceKind.classOrEnum);
     expect(unlinkedUnits[0].publicNamespace.names[0].name, 'E');
     expect(unlinkedUnits[0].publicNamespace.names[0].numTypeParameters, 0);
+    expect(unlinkedUnits[0].publicNamespace.names[0].members, hasLength(2));
+    expect(unlinkedUnits[0].publicNamespace.names[0].members[0].kind,
+        ReferenceKind.propertyAccessor);
+    expect(unlinkedUnits[0].publicNamespace.names[0].members[0].name, 'values');
+    expect(
+        unlinkedUnits[0].publicNamespace.names[0].members[0].numTypeParameters,
+        0);
+    expect(unlinkedUnits[0].publicNamespace.names[0].members[1].kind,
+        ReferenceKind.propertyAccessor);
+    expect(unlinkedUnits[0].publicNamespace.names[0].members[1].name, 'v1');
+    expect(
+        unlinkedUnits[0].publicNamespace.names[0].members[1].numTypeParameters,
+        0);
   }
 
   test_enum_documented() {
@@ -4011,6 +4714,13 @@
     checkDocumentationComment(value.documentationComment, text);
   }
 
+  test_enum_value_private() {
+    serializeEnumText('enum E { _v }', 'E');
+    expect(unlinkedUnits[0].publicNamespace.names, hasLength(1));
+    expect(unlinkedUnits[0].publicNamespace.names[0].members, hasLength(1));
+    expect(unlinkedUnits[0].publicNamespace.names[0].members[0].name, 'values');
+  }
+
   test_executable_abstract() {
     UnlinkedExecutable executable =
         serializeClassText('abstract class C { f(); }').executables[0];
@@ -4149,12 +4859,14 @@
   bbb: switch (42) {
     ccc: case 0:
       break;
+    ddd: default:
+      break;
   }
 }
 ''';
     UnlinkedExecutable executable = serializeExecutableText(code);
     List<UnlinkedLabel> labels = executable.localLabels;
-    expect(labels, hasLength(3));
+    expect(labels, hasLength(4));
     {
       UnlinkedLabel aaa = labels.singleWhere((l) => l.name == 'aaa');
       expect(aaa, isNotNull);
@@ -4173,6 +4885,12 @@
       expect(ccc.isOnSwitchMember, isTrue);
       expect(ccc.isOnSwitchStatement, isFalse);
     }
+    {
+      UnlinkedLabel ccc = labels.singleWhere((l) => l.name == 'ddd');
+      expect(ccc, isNotNull);
+      expect(ccc.isOnSwitchMember, isTrue);
+      expect(ccc.isOnSwitchStatement, isFalse);
+    }
   }
 
   test_executable_localLabels_inTopLevelGetter() {
@@ -4200,6 +4918,56 @@
     }
   }
 
+  test_executable_localLabels_namedExpressionLabel() {
+    String code = r'''
+f() {
+  foo(p: 42);
+}
+foo({int p}) {}
+''';
+    UnlinkedExecutable executable = serializeExecutableText(code);
+    List<UnlinkedLabel> labels = executable.localLabels;
+    expect(labels, isEmpty);
+  }
+
+  test_executable_localVariables_catch() {
+    String code = r'''
+f() { // 1
+  try {
+    throw 42;
+  } on int catch (e, st) { // 2
+    print(e);
+    print(st);
+  } // 3
+} // 4
+''';
+    UnlinkedExecutable executable = serializeExecutableText(code);
+    List<UnlinkedVariable> variables = executable.localVariables;
+    expect(variables, hasLength(2));
+    {
+      UnlinkedVariable e = variables.singleWhere((v) => v.name == 'e');
+      _assertVariableVisible(code, e, 'on int catch (', '} // 3');
+      checkTypeRef(e.type, 'dart:core', 'dart:core', 'int');
+    }
+    {
+      UnlinkedVariable st = variables.singleWhere((v) => v.name == 'st');
+      _assertVariableVisible(code, st, 'on int catch (', '} // 3');
+    }
+  }
+
+  test_executable_localVariables_catch_noVariables() {
+    String code = r'''
+f() {
+  try {
+    throw 42;
+  } on int {}
+}
+''';
+    UnlinkedExecutable executable = serializeExecutableText(code);
+    List<UnlinkedVariable> variables = executable.localVariables;
+    expect(variables, isEmpty);
+  }
+
   test_executable_localVariables_empty() {
     UnlinkedExecutable executable = serializeExecutableText(r'''
 f() {
@@ -4208,6 +4976,77 @@
     expect(executable.localVariables, isEmpty);
   }
 
+  test_executable_localVariables_forEachLoop() {
+    String code = r'''
+f() { // 1
+  for (int i in <int>[]) { // 2
+    print(i);
+  } // 3
+} // 4
+''';
+    UnlinkedExecutable executable = serializeExecutableText(code);
+    List<UnlinkedVariable> variables = executable.localVariables;
+    expect(variables, hasLength(1));
+    {
+      UnlinkedVariable i = variables.singleWhere((v) => v.name == 'i');
+      _assertVariableVisible(code, i, 'for', '} // 3');
+      checkTypeRef(i.type, 'dart:core', 'dart:core', 'int');
+    }
+  }
+
+  test_executable_localVariables_forEachLoop_outside() {
+    String code = r'''
+f() { // 1
+  int i;
+  for (i in <int>[]) {
+    print(i);
+  }
+} // 4
+''';
+    UnlinkedExecutable executable = serializeExecutableText(code);
+    List<UnlinkedVariable> variables = executable.localVariables;
+    expect(variables, hasLength(1));
+    {
+      UnlinkedVariable i = variables.singleWhere((v) => v.name == 'i');
+      _assertVariableVisible(code, i, '{ // 1', '} // 4');
+      checkTypeRef(i.type, 'dart:core', 'dart:core', 'int');
+    }
+  }
+
+  test_executable_localVariables_forLoop() {
+    String code = r'''
+f() { // 1
+  for (int i = 0, j = 0; i < 10; i++, j++) { // 2
+    print(i);
+  } // 3
+} // 4
+''';
+    UnlinkedExecutable executable = serializeExecutableText(code);
+    List<UnlinkedVariable> variables = executable.localVariables;
+    expect(variables, hasLength(2));
+    {
+      UnlinkedVariable i = variables.singleWhere((v) => v.name == 'i');
+      _assertVariableVisible(code, i, 'for', '} // 3');
+      checkTypeRef(i.type, 'dart:core', 'dart:core', 'int');
+    }
+    {
+      UnlinkedVariable i = variables.singleWhere((v) => v.name == 'j');
+      _assertVariableVisible(code, i, 'for', '} // 3');
+      checkTypeRef(i.type, 'dart:core', 'dart:core', 'int');
+    }
+  }
+
+  test_executable_localVariables_forLoop_noVariables() {
+    String code = r'''
+f() {
+  for (; true;) {}
+}
+''';
+    UnlinkedExecutable executable = serializeExecutableText(code);
+    List<UnlinkedVariable> variables = executable.localVariables;
+    expect(variables, isEmpty);
+  }
+
   test_executable_localVariables_inConstructor() {
     String code = r'''
 class C {
@@ -4367,6 +5206,7 @@
     expect(executable.isExternal, isFalse);
     expect(executable.visibleOffset, 0);
     expect(executable.visibleLength, 0);
+    _assertCodeRange(executable.codeRange, 10, 6);
   }
 
   test_executable_member_function_explicit_return() {
@@ -4390,6 +5230,7 @@
     expect(executable.kind, UnlinkedExecutableKind.getter);
     expect(executable.returnType, isNotNull);
     expect(executable.isExternal, isFalse);
+    _assertCodeRange(executable.codeRange, 10, 15);
     expect(findVariable('f', variables: cls.fields), isNull);
     expect(findExecutable('f=', executables: cls.executables), isNull);
   }
@@ -4408,6 +5249,7 @@
     expect(executable.kind, UnlinkedExecutableKind.setter);
     expect(executable.returnType, isNotNull);
     expect(executable.isExternal, isFalse);
+    _assertCodeRange(executable.codeRange, 10, 20);
     expect(findVariable('f', variables: cls.fields), isNull);
     expect(findExecutable('f', executables: cls.executables), isNull);
   }
@@ -4469,6 +5311,14 @@
     expect(executable.isExternal, false);
   }
 
+  test_executable_operator_abstract() {
+    UnlinkedExecutable executable =
+        serializeClassText('class C { C operator+(C c); }', allowErrors: true)
+            .executables[0];
+    expect(executable.isAbstract, true);
+    expect(executable.isExternal, false);
+  }
+
   test_executable_operator_equal() {
     UnlinkedExecutable executable = serializeClassText(
             'class C { bool operator==(Object other) => false; }')
@@ -4480,6 +5330,7 @@
     UnlinkedExecutable executable =
         serializeClassText('class C { external C operator+(C c); }')
             .executables[0];
+    expect(executable.isAbstract, false);
     expect(executable.isExternal, true);
   }
 
@@ -4529,6 +5380,12 @@
     expect(executable.name, '<=');
   }
 
+  test_executable_param_codeRange() {
+    UnlinkedExecutable executable = serializeExecutableText('f(int x) {}');
+    UnlinkedParam parameter = executable.parameters[0];
+    _assertCodeRange(parameter.codeRange, 2, 5);
+  }
+
   test_executable_param_function_typed() {
     if (!checkAstDerivedData) {
       // TODO(paulberry): this test fails when building the summary from the
@@ -4619,6 +5476,7 @@
     expect(param.kind, UnlinkedParamKind.named);
     expect(param.initializer, isNotNull);
     expect(param.defaultValueCode, '42');
+    _assertCodeRange(param.codeRange, 3, 5);
     _assertUnlinkedConst(param.defaultValue,
         operators: [UnlinkedConstOperation.pushInt], ints: [42]);
   }
@@ -4638,6 +5496,7 @@
     expect(param.kind, UnlinkedParamKind.positional);
     expect(param.initializer, isNotNull);
     expect(param.defaultValueCode, '42');
+    _assertCodeRange(param.codeRange, 3, 6);
     _assertUnlinkedConst(param.defaultValue,
         operators: [UnlinkedConstOperation.pushInt], ints: [42]);
   }
@@ -4834,6 +5693,12 @@
         ReferenceKind.classOrEnum);
   }
 
+  test_export_dependency() {
+    serializeLibraryText('export "dart:async";');
+    expect(unlinkedUnits[0].exports, hasLength(1));
+    checkDependency(linked.exportDependencies[0], 'dart:async', 'dart:async');
+  }
+
   test_export_enum() {
     addNamedSource('/a.dart', 'enum E { v }');
     serializeLibraryText('export "a.dart";');
@@ -4895,6 +5760,21 @@
     expect(linked.exportNames, isNotEmpty);
   }
 
+  test_export_missing() {
+    if (!checkAstDerivedData) {
+      // TODO(paulberry): At the moment unresolved exports are not included in
+      // the element model, so we can't pass this test.
+      return;
+    }
+    // Unresolved exports are included since this is necessary for proper
+    // dependency tracking.
+    allowMissingFiles = true;
+    serializeLibraryText('export "foo.dart";', allowErrors: true);
+    expect(unlinkedUnits[0].imports, hasLength(1));
+    checkDependency(
+        linked.exportDependencies[0], absUri('/foo.dart'), 'foo.dart');
+  }
+
   test_export_names_excludes_names_from_library() {
     addNamedSource('/a.dart', 'part of my.lib; int y; int _y;');
     serializeLibraryText('library my.lib; part "a.dart"; int x; int _x;');
@@ -5036,6 +5916,832 @@
         ReferenceKind.topLevelPropertyAccessor);
   }
 
+  test_expr_assignOperator_assign() {
+    _assertAssignmentOperator(
+        '(a = 1 + 2) + 3', UnlinkedExprAssignOperator.assign);
+  }
+
+  test_expr_assignOperator_bitAnd() {
+    _assertAssignmentOperator(
+        '(a &= 1 + 2) + 3', UnlinkedExprAssignOperator.bitAnd);
+  }
+
+  test_expr_assignOperator_bitOr() {
+    _assertAssignmentOperator(
+        '(a |= 1 + 2) + 3', UnlinkedExprAssignOperator.bitOr);
+  }
+
+  test_expr_assignOperator_bitXor() {
+    _assertAssignmentOperator(
+        '(a ^= 1 + 2) + 3', UnlinkedExprAssignOperator.bitXor);
+  }
+
+  test_expr_assignOperator_divide() {
+    _assertAssignmentOperator(
+        '(a /= 1 + 2) + 3', UnlinkedExprAssignOperator.divide);
+  }
+
+  test_expr_assignOperator_floorDivide() {
+    _assertAssignmentOperator(
+        '(a ~/= 1 + 2) + 3', UnlinkedExprAssignOperator.floorDivide);
+  }
+
+  test_expr_assignOperator_ifNull() {
+    _assertAssignmentOperator(
+        '(a ??= 1 + 2) + 3', UnlinkedExprAssignOperator.ifNull);
+  }
+
+  test_expr_assignOperator_minus() {
+    _assertAssignmentOperator(
+        '(a -= 1 + 2) + 3', UnlinkedExprAssignOperator.minus);
+  }
+
+  test_expr_assignOperator_modulo() {
+    _assertAssignmentOperator(
+        '(a %= 1 + 2) + 3', UnlinkedExprAssignOperator.modulo);
+  }
+
+  test_expr_assignOperator_multiply() {
+    _assertAssignmentOperator(
+        '(a *= 1 + 2) + 3', UnlinkedExprAssignOperator.multiply);
+  }
+
+  test_expr_assignOperator_plus() {
+    _assertAssignmentOperator(
+        '(a += 1 + 2) + 3', UnlinkedExprAssignOperator.plus);
+  }
+
+  test_expr_assignOperator_shiftLeft() {
+    _assertAssignmentOperator(
+        '(a <<= 1 + 2) + 3', UnlinkedExprAssignOperator.shiftLeft);
+  }
+
+  test_expr_assignOperator_shiftRight() {
+    _assertAssignmentOperator(
+        '(a >>= 1 + 2) + 3', UnlinkedExprAssignOperator.shiftRight);
+  }
+
+  test_expr_assignToIndex_ofFieldSequence() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class A {
+  B b;
+}
+class B {
+  C c;
+}
+class C {
+  List<int> f = <int>[0, 1, 2];
+}
+A a = new A();
+final v = (a.b.c.f[1] = 5);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushReference,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToIndex,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      5,
+      1
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'f',
+              expectedKind: ReferenceKind.unresolved,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.unresolved, 'c'),
+                new _PrefixExpectation(ReferenceKind.unresolved, 'b'),
+                new _PrefixExpectation(
+                    ReferenceKind.topLevelPropertyAccessor, 'a')
+              ])
+    ]);
+  }
+
+  test_expr_assignToIndex_ofIndexExpression() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class A {
+ List<B> b;
+}
+class B {
+  List<C> c;
+}
+class C {
+  List<int> f = <int>[0, 1, 2];
+}
+A a = new A();
+final v = (a.b[1].c[2].f[3] = 5);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      // 5
+      UnlinkedConstOperation.pushInt,
+      // a.b[1]
+      UnlinkedConstOperation.pushReference,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.extractIndex,
+      // c[2]
+      UnlinkedConstOperation.extractProperty,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.extractIndex,
+      // f[3] = 5
+      UnlinkedConstOperation.extractProperty,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToIndex,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      5,
+      1,
+      2,
+      3,
+    ], strings: [
+      'c',
+      'f'
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null,
+              'b', expectedKind: ReferenceKind.unresolved, prefixExpectations: [
+            new _PrefixExpectation(ReferenceKind.topLevelPropertyAccessor, 'a')
+          ])
+    ]);
+  }
+
+  test_expr_assignToIndex_ofTopLevelVariable() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+List<int> a = <int>[0, 1, 2];
+final v = (a[1] = 5);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushReference,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToIndex,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      5,
+      1,
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'a',
+          expectedKind: ReferenceKind.topLevelPropertyAccessor)
+    ]);
+  }
+
+  test_expr_assignToProperty_ofInstanceCreation() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class C {
+  int f;
+}
+final v = (new C().f = 5);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.invokeConstructor,
+      UnlinkedConstOperation.assignToProperty,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      5,
+      0,
+      0,
+    ], strings: [
+      'f'
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'C',
+          expectedKind: ReferenceKind.classOrEnum)
+    ]);
+  }
+
+  test_expr_assignToRef_classStaticField() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class C {
+  static int f;
+}
+final v = (C.f = 1);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToRef,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      1,
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'f',
+              expectedKind: ReferenceKind.unresolved,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C')
+              ])
+    ]);
+  }
+
+  test_expr_assignToRef_fieldSequence() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class A {
+  B b;
+}
+class B {
+  C c;
+}
+class C {
+  int f;
+}
+A a = new A();
+final v = (a.b.c.f = 1);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToRef,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      1,
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'f',
+              expectedKind: ReferenceKind.unresolved,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.unresolved, 'c'),
+                new _PrefixExpectation(ReferenceKind.unresolved, 'b'),
+                new _PrefixExpectation(
+                    ReferenceKind.topLevelPropertyAccessor, 'a')
+              ])
+    ]);
+  }
+
+  test_expr_assignToRef_postfixDecrement() {
+    _assertRefPrefixPostfixIncrementDecrement(
+        'a-- + 2', UnlinkedExprAssignOperator.postfixDecrement);
+  }
+
+  test_expr_assignToRef_postfixIncrement() {
+    _assertRefPrefixPostfixIncrementDecrement(
+        'a++ + 2', UnlinkedExprAssignOperator.postfixIncrement);
+  }
+
+  test_expr_assignToRef_prefixDecrement() {
+    _assertRefPrefixPostfixIncrementDecrement(
+        '--a + 2', UnlinkedExprAssignOperator.prefixDecrement);
+  }
+
+  test_expr_assignToRef_prefixIncrement() {
+    _assertRefPrefixPostfixIncrementDecrement(
+        '++a + 2', UnlinkedExprAssignOperator.prefixIncrement);
+  }
+
+  test_expr_assignToRef_topLevelVariable() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+int a = 0;
+final v = (a = 1);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToRef,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      1,
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'a',
+          expectedKind: ReferenceKind.topLevelPropertyAccessor)
+    ]);
+  }
+
+  test_expr_assignToRef_topLevelVariable_imported() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    addNamedSource(
+        '/a.dart',
+        '''
+int a = 0;
+''');
+    UnlinkedVariable variable = serializeVariableText('''
+import 'a.dart';
+final v = (a = 1);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToRef,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      1,
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'a.dart', 'a',
+          expectedKind: ReferenceKind.topLevelPropertyAccessor)
+    ]);
+  }
+
+  test_expr_assignToRef_topLevelVariable_imported_withPrefix() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    addNamedSource(
+        '/a.dart',
+        '''
+int a = 0;
+''');
+    UnlinkedVariable variable = serializeVariableText('''
+import 'a.dart' as p;
+final v = (p.a = 1);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToRef,
+    ], assignmentOperators: [
+      (UnlinkedExprAssignOperator.assign)
+    ], ints: [
+      1,
+    ], strings: [], referenceValidators: [
+      (EntityRef r) {
+        return checkTypeRef(r, absUri('/a.dart'), 'a.dart', 'a',
+            expectedKind: ReferenceKind.topLevelPropertyAccessor,
+            expectedPrefix: 'p');
+      }
+    ]);
+  }
+
+  test_expr_cascadeSection_assignToIndex() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class C {
+  List<int> items;
+}
+final C c = new C();
+final v = c.items..[1] = 2;
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushReference,
+      //   ..[1] = 2
+      UnlinkedConstOperation.cascadeSectionBegin,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToIndex,
+      // c
+      UnlinkedConstOperation.cascadeSectionEnd,
+    ], assignmentOperators: [
+      UnlinkedExprAssignOperator.assign,
+    ], ints: [
+      2,
+      1
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'items',
+              expectedKind: ReferenceKind.unresolved,
+              prefixExpectations: [
+                new _PrefixExpectation(
+                    ReferenceKind.topLevelPropertyAccessor, 'c'),
+              ])
+    ]);
+  }
+
+  test_expr_cascadeSection_assignToProperty() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class C {
+  int f1 = 0;
+  int f2 = 0;
+}
+final v = new C()..f1 = 1..f2 += 2;
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      // new C()
+      UnlinkedConstOperation.invokeConstructor,
+      //   ..f1 = 1
+      UnlinkedConstOperation.cascadeSectionBegin,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToProperty,
+      // C
+      UnlinkedConstOperation.cascadeSectionEnd,
+      //   ..f2 += 2
+      UnlinkedConstOperation.cascadeSectionBegin,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToProperty,
+      // C
+      UnlinkedConstOperation.cascadeSectionEnd,
+    ], assignmentOperators: [
+      UnlinkedExprAssignOperator.assign,
+      UnlinkedExprAssignOperator.plus,
+    ], ints: [
+      0, 0, // new C()
+      1, // f1 = 1
+      2, // f2 += 2
+    ], strings: [
+      'f1',
+      'f2',
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'C',
+          expectedKind: ReferenceKind.classOrEnum)
+    ]);
+  }
+
+  test_expr_cascadeSection_embedded() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class A {
+  int fa1;
+  B b;
+  int fa2;
+}
+class B {
+  int fb;
+}
+final v = new A()
+  ..fa1 = 1
+  ..b = (new B()..fb = 2)
+  ..fa2 = 3;
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      // new A()
+      UnlinkedConstOperation.invokeConstructor,
+      // ..fa1 = 1
+      UnlinkedConstOperation.cascadeSectionBegin,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToProperty,
+      UnlinkedConstOperation.cascadeSectionEnd,
+      // ..b
+      UnlinkedConstOperation.cascadeSectionBegin,
+      //   new B()
+      UnlinkedConstOperation.invokeConstructor,
+      //   ..fb = 2
+      UnlinkedConstOperation.cascadeSectionBegin,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToProperty,
+      UnlinkedConstOperation.cascadeSectionEnd,
+      // ..b = <pop value>
+      UnlinkedConstOperation.assignToProperty,
+      UnlinkedConstOperation.cascadeSectionEnd,
+      // ..fa2 = 3
+      UnlinkedConstOperation.cascadeSectionBegin,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.assignToProperty,
+      UnlinkedConstOperation.cascadeSectionEnd,
+    ], assignmentOperators: [
+      UnlinkedExprAssignOperator.assign,
+      UnlinkedExprAssignOperator.assign,
+      UnlinkedExprAssignOperator.assign,
+      UnlinkedExprAssignOperator.assign,
+    ], ints: [
+      0,
+      0,
+      1,
+      0,
+      0,
+      2,
+      3,
+    ], strings: [
+      'fa1',
+      'fb',
+      'b',
+      'fa2',
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'A',
+          expectedKind: ReferenceKind.classOrEnum),
+      (EntityRef r) => checkTypeRef(r, null, null, 'B',
+          expectedKind: ReferenceKind.classOrEnum),
+    ]);
+  }
+
+  test_expr_cascadeSection_invokeMethod() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class A {
+  int m(int _) => 0;
+}
+final A a = new A();
+final v = a..m(5).abs()..m(6);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      // a
+      UnlinkedConstOperation.pushReference,
+      //   ..m(5)
+      UnlinkedConstOperation.cascadeSectionBegin,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.invokeMethod,
+      //   ..abs()
+      UnlinkedConstOperation.invokeMethod,
+      // a
+      UnlinkedConstOperation.cascadeSectionEnd,
+      //   ..m(6)
+      UnlinkedConstOperation.cascadeSectionBegin,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.invokeMethod,
+      // a
+      UnlinkedConstOperation.cascadeSectionEnd,
+    ], ints: [
+      5, 0, 1, // m(5)
+      0, 0, // abs()
+      6, 0, 1, // m(5)
+    ], strings: [
+      'm',
+      'abs',
+      'm',
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'a',
+          expectedKind: ReferenceKind.topLevelPropertyAccessor),
+    ]);
+  }
+
+  test_expr_extractIndex_ofClassField() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class C {
+  List<int> get items => null;
+}
+final v = new C().items[5];
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.invokeConstructor,
+      UnlinkedConstOperation.extractProperty,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.extractIndex,
+    ], ints: [
+      0,
+      0,
+      5
+    ], strings: [
+      'items'
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'C',
+          expectedKind: ReferenceKind.classOrEnum)
+    ]);
+  }
+
+  test_expr_extractProperty_ofInvokeConstructor() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class C {
+  int f = 0;
+}
+final v = new C().f;
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.invokeConstructor,
+      UnlinkedConstOperation.extractProperty,
+    ], ints: [
+      0,
+      0
+    ], strings: [
+      'f'
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'C',
+          expectedKind: ReferenceKind.classOrEnum)
+    ]);
+  }
+
+  test_expr_functionExpression_asArgument() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+final v = foo(5, () => 42);
+foo(a, b) {}
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushNull,
+      UnlinkedConstOperation.invokeMethodRef
+    ], ints: [
+      5,
+      0,
+      2
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'foo',
+          expectedKind: ReferenceKind.topLevelFunction)
+    ]);
+  }
+
+  test_expr_functionExpression_withBlockBody() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+final v = () { return 42; };
+''');
+    _assertUnlinkedConst(variable.constExpr,
+        isValidConst: false, operators: [UnlinkedConstOperation.pushNull]);
+  }
+
+  test_expr_functionExpression_withExpressionBody() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+final v = () => 42;
+''');
+    _assertUnlinkedConst(variable.constExpr,
+        isValidConst: false, operators: [UnlinkedConstOperation.pushNull]);
+  }
+
+  test_expr_functionExpressionInvocation_withBlockBody() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+final v = ((a, b) {return 42;})(1, 2);
+''');
+    _assertUnlinkedConst(variable.constExpr,
+        isValidConst: false, operators: [UnlinkedConstOperation.pushNull]);
+  }
+
+  test_expr_functionExpressionInvocation_withExpressionBody() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+final v = ((a, b) => 42)(1, 2);
+''');
+    _assertUnlinkedConst(variable.constExpr,
+        isValidConst: false, operators: [UnlinkedConstOperation.pushNull]);
+  }
+
+  test_expr_invokeMethod_instance() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class C {
+  int m(a, {b, c}) => 42;
+}
+final v = new C().m(1, b: 2, c: 3);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.invokeConstructor,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.invokeMethod,
+    ], ints: [
+      0,
+      0,
+      1,
+      2,
+      3,
+      2,
+      1
+    ], strings: [
+      'b',
+      'c',
+      'm'
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'C',
+          expectedKind: ReferenceKind.classOrEnum)
+    ]);
+  }
+
+  test_expr_invokeMethodRef_instance() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+class A {
+  B b;
+}
+class B {
+  C c;
+}
+class C {
+  int m(int a, int b) => a + b;
+}
+A a = new A();
+final v = a.b.c.m(10, 20);
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.invokeMethodRef,
+    ], ints: [
+      10,
+      20,
+      0,
+      2
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'm',
+              expectedKind: ReferenceKind.unresolved,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.unresolved, 'c'),
+                new _PrefixExpectation(ReferenceKind.unresolved, 'b'),
+                new _PrefixExpectation(
+                    ReferenceKind.topLevelPropertyAccessor, 'a')
+              ])
+    ]);
+  }
+
+  test_expr_invokeMethodRef_static_importedWithPrefix() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    addNamedSource(
+        '/a.dart',
+        '''
+class C {
+  static int m() => 42;
+}
+''');
+    UnlinkedVariable variable = serializeVariableText('''
+import 'a.dart' as p;
+final v = p.C.m();
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.invokeMethodRef,
+    ], ints: [
+      0,
+      0
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'm',
+              expectedKind: ReferenceKind.method,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                    absoluteUri: absUri('/a.dart'), relativeUri: 'a.dart'),
+                new _PrefixExpectation(ReferenceKind.prefix, 'p')
+              ])
+    ]);
+  }
+
+  test_expr_throwException() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+final v = throw 1 + 2;
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.add,
+      UnlinkedConstOperation.throwException,
+    ], ints: [
+      1,
+      2
+    ]);
+  }
+
+  test_expr_typeCast() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+final v = 42 as num;
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.typeCast,
+    ], ints: [
+      42
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, 'dart:core', 'dart:core', 'num',
+          expectedKind: ReferenceKind.classOrEnum)
+    ]);
+  }
+
+  test_expr_typeCheck() {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+final v = 42 is num;
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.typeCheck,
+    ], ints: [
+      42
+    ], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, 'dart:core', 'dart:core', 'num',
+          expectedKind: ReferenceKind.classOrEnum)
+    ]);
+  }
+
   test_field() {
     UnlinkedClass cls = serializeClassText('class C { int i; }');
     UnlinkedVariable variable = findVariable('i', variables: cls.fields);
@@ -5077,14 +6783,40 @@
         operators: [UnlinkedConstOperation.pushInt], ints: [0]);
   }
 
-  test_field_final_invalidConstExpr() {
+  test_field_final_notConstExpr() {
     UnlinkedVariable variable = serializeClassText(r'''
 class C {
   final int f = 1 + m();
   static int m() => 42;
 }''').fields[0];
     expect(variable.isFinal, isTrue);
-    _assertUnlinkedConst(variable.constExpr, isInvalid: true);
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.invokeMethodRef,
+      UnlinkedConstOperation.add,
+    ], ints: [
+      1,
+      0,
+      0
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'm',
+              expectedKind: ReferenceKind.method,
+              prefixExpectations: [
+                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C')
+              ])
+    ]);
+  }
+
+  test_field_final_typeParameter() {
+    UnlinkedVariable variable = serializeClassText(r'''
+class C<T> {
+  final f = <T>[];
+}''').fields[0];
+    expect(variable.isFinal, isTrue);
+    _assertUnlinkedConst(variable.constExpr,
+        operators: [UnlinkedConstOperation.makeTypedList],
+        ints: [0],
+        referenceValidators: [(EntityRef r) => checkParamTypeRef(r, 1)]);
   }
 
   test_field_formal_param_inferred_type_explicit() {
@@ -5180,6 +6912,28 @@
     expect(variable.constExpr, isNull);
   }
 
+  test_field_static_final_untyped() {
+    if (!checkAstDerivedData) {
+      // The element model doesn't contain the initializer expressions needed
+      // for type inference.  TODO(paulberry): fix.
+      return;
+    }
+    UnlinkedVariable variable =
+        serializeClassText('class C { static final x = 0; }').fields[0];
+    expect(variable.constExpr, isNotNull);
+  }
+
+  test_field_untyped() {
+    if (!checkAstDerivedData) {
+      // The element model doesn't contain the initializer expressions needed
+      // for type inference.  TODO(paulberry): fix.
+      return;
+    }
+    UnlinkedVariable variable =
+        serializeClassText('class C { var x = 0; }').fields[0];
+    expect(variable.constExpr, isNotNull);
+  }
+
   test_fully_linked_references_follow_other_references() {
     if (skipFullyLinkedData) {
       return;
@@ -5485,7 +7239,7 @@
     checkTypeRef(findVariable('f').type, 'dart:async', 'dart:async', 'Future',
         numTypeParameters: 1);
     checkTypeRef(findVariable('s').type, 'dart:async', 'dart:async', 'Stream',
-        numTypeParameters: 1);
+        expectedTargetUnit: 1, numTypeParameters: 1);
   }
 
   test_import_reference_merged_prefixed() {
@@ -5499,7 +7253,7 @@
     checkTypeRef(findVariable('f').type, 'dart:async', 'dart:async', 'Future',
         expectedPrefix: 'a', numTypeParameters: 1);
     checkTypeRef(findVariable('s').type, 'dart:async', 'dart:async', 'Stream',
-        expectedPrefix: 'a', numTypeParameters: 1);
+        expectedTargetUnit: 1, expectedPrefix: 'a', numTypeParameters: 1);
   }
 
   test_import_reference_merged_prefixed_separate_libraries() {
@@ -6542,14 +8296,12 @@
 final v = f() ? /*<T>*/(T t) => 0 : /*<T>*/(T t) => 1;
 bool f() => true;
 ''');
-    // The inferred type of `v` is currently `(Object) -> int` due to
-    // dartbug.com/25802.  TODO(paulberry): fix this test when the bug is fixed.
     EntityRef inferredType = getTypeRefForSlot(variable.inferredTypeSlot);
     checkLinkedTypeRef(
         inferredType.syntheticReturnType, 'dart:core', 'dart:core', 'int');
     expect(inferredType.syntheticParams, hasLength(1));
-    checkLinkedTypeRef(inferredType.syntheticParams[0].type, 'dart:core',
-        'dart:core', 'Object');
+    checkLinkedTypeRef(
+        inferredType.syntheticParams[0].type, null, null, '*bottom*');
   }
 
   test_syntheticFunctionType_genericClosure_inGenericFunction() {
@@ -6570,16 +8322,14 @@
   final v = b ? /*<V>*/(T t, U u, V v) => 0 : /*<V>*/(T t, U u, V v) => 1;
 }
 ''').localVariables[0];
-    // The inferred type of `v` is currently `(T, U, Object) -> int` due to
-    // dartbug.com/25802.  TODO(paulberry): fix this test when the bug is fixed.
     EntityRef inferredType = getTypeRefForSlot(variable.inferredTypeSlot);
     checkLinkedTypeRef(
         inferredType.syntheticReturnType, 'dart:core', 'dart:core', 'int');
     expect(inferredType.syntheticParams, hasLength(3));
     checkParamTypeRef(inferredType.syntheticParams[0].type, 2);
     checkParamTypeRef(inferredType.syntheticParams[1].type, 1);
-    checkLinkedTypeRef(inferredType.syntheticParams[2].type, 'dart:core',
-        'dart:core', 'Object');
+    checkLinkedTypeRef(
+        inferredType.syntheticParams[2].type, null, null, '*bottom*');
   }
 
   test_syntheticFunctionType_inGenericClass() {
@@ -6751,6 +8501,13 @@
     checkDynamicTypeRef(serializeTypeText('dynamic'));
   }
 
+  test_type_param_codeRange() {
+    UnlinkedClass cls =
+        serializeClassText('class A {} class C<T extends A> {}');
+    UnlinkedTypeParam typeParameter = cls.typeParameters[0];
+    _assertCodeRange(typeParameter.codeRange, 19, 11);
+  }
+
   test_type_param_not_shadowed_by_constructor() {
     UnlinkedClass cls =
         serializeClassText('class C<D> { D x; C.D(); } class D {}');
@@ -7009,6 +8766,11 @@
     checkUnresolvedTypeRef(typeRef, null, 'Foo');
   }
 
+  test_typedef_codeRange() {
+    UnlinkedTypedef type = serializeTypedefText('typedef F();');
+    _assertCodeRange(type.codeRange, 0, 12);
+  }
+
   test_typedef_documented() {
     String text = '''
 // Extra comment so doc comment offset != 0
@@ -7093,6 +8855,12 @@
     expect(type.typeParameters[1].name, 'U');
   }
 
+  test_unit_codeRange() {
+    serializeLibraryText('  int a = 1;  ');
+    UnlinkedUnit unit = unlinkedUnits[0];
+    _assertCodeRange(unit.codeRange, 0, 14);
+  }
+
   test_unresolved_reference_in_multiple_parts() {
     addNamedSource('/a.dart', 'part of foo; int x; Unresolved y;');
     serializeLibraryText('library foo; part "a.dart"; Unresolved z;',
@@ -7117,6 +8885,24 @@
     expect(xType.reference, yType.reference);
   }
 
+  test_unused_type_parameter() {
+    if (skipFullyLinkedData) {
+      return;
+    }
+    // Unused type parameters get converted to `dynamic`.
+    UnlinkedVariable variable = serializeVariableText('''
+class C<T> {
+  void f() {}
+}
+C<int> c;
+var v = c.f;
+''');
+    EntityRef type =
+        getTypeRefForSlot(variable.initializer.inferredReturnTypeSlot);
+    expect(type.typeArguments, hasLength(1));
+    checkLinkedTypeRef(type.typeArguments[0], null, null, 'dynamic');
+  }
+
   test_variable() {
     String text = 'int i;';
     UnlinkedVariable v = serializeVariableText(text, variableName: 'i');
@@ -7134,6 +8920,13 @@
     expect(unlinkedUnits[0].publicNamespace.names[1].numTypeParameters, 0);
   }
 
+  test_variable_codeRange() {
+    serializeLibraryText(' int a = 1, b = 22;');
+    List<UnlinkedVariable> variables = unlinkedUnits[0].variables;
+    _assertCodeRange(variables[0].codeRange, 1, 18);
+    _assertCodeRange(variables[1].codeRange, 1, 18);
+  }
+
   test_variable_const() {
     UnlinkedVariable variable =
         serializeVariableText('const int i = 0;', variableName: 'i');
@@ -7164,6 +8957,16 @@
     expect(variable.constExpr, isNull);
   }
 
+  test_variable_final_top_level_untyped() {
+    if (!checkAstDerivedData) {
+      // The element model doesn't contain the initializer expressions needed
+      // for type inference.  TODO(paulberry): fix.
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('final v = 0;');
+    expect(variable.constExpr, isNotNull);
+  }
+
   test_variable_implicit_dynamic() {
     UnlinkedVariable variable = serializeVariableText('var v;');
     expect(variable.type, isNull);
@@ -7383,6 +9186,44 @@
     }
   }
 
+  /**
+   * Assert that serializing the given [expr] of form `(a op= 1 + 2) + 3`
+   * uses the given [expectedAssignOperator].
+   */
+  void _assertAssignmentOperator(
+      String expr, UnlinkedExprAssignOperator expectedAssignOperator) {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+int a = 0;
+final v = $expr;
+    ''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.add,
+      UnlinkedConstOperation.assignToRef,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.add,
+    ], assignmentOperators: [
+      expectedAssignOperator
+    ], ints: [
+      1,
+      2,
+      3
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'a',
+          expectedKind: ReferenceKind.topLevelPropertyAccessor)
+    ]);
+  }
+
+  void _assertCodeRange(CodeRange codeRange, int offset, int length) {
+    expect(codeRange, isNotNull);
+    expect(codeRange.offset, offset);
+    expect(codeRange.length, length);
+  }
+
   void _assertExecutableVisible(String code, UnlinkedExecutable f,
       String visibleBegin, String visibleEnd) {
     int expectedVisibleOffset = code.indexOf(visibleBegin);
@@ -7406,20 +9247,53 @@
     expect(p.visibleLength, isZero);
   }
 
+  /**
+   * Assert that the [expr] of the form `++a + 2` is serialized with the
+   * [expectedAssignmentOperator].
+   */
+  void _assertRefPrefixPostfixIncrementDecrement(
+      String expr, UnlinkedExprAssignOperator expectedAssignmentOperator) {
+    if (skipNonConstInitializers) {
+      return;
+    }
+    UnlinkedVariable variable = serializeVariableText('''
+int a = 0;
+final v = $expr;
+''');
+    _assertUnlinkedConst(variable.constExpr, isValidConst: false, operators: [
+      UnlinkedConstOperation.assignToRef,
+      UnlinkedConstOperation.pushInt,
+      UnlinkedConstOperation.add,
+    ], assignmentOperators: [
+      expectedAssignmentOperator
+    ], ints: [
+      2
+    ], strings: [], referenceValidators: [
+      (EntityRef r) => checkTypeRef(r, null, null, 'a',
+          expectedKind: ReferenceKind.topLevelPropertyAccessor)
+    ]);
+  }
+
+  /**
+   * TODO(scheglov) rename "Const" to "Expr" everywhere
+   */
   void _assertUnlinkedConst(UnlinkedConst constExpr,
-      {bool isInvalid: false,
+      {bool isValidConst: true,
       List<UnlinkedConstOperation> operators: const <UnlinkedConstOperation>[],
+      List<UnlinkedExprAssignOperator> assignmentOperators:
+          const <UnlinkedExprAssignOperator>[],
       List<int> ints: const <int>[],
       List<double> doubles: const <double>[],
       List<String> strings: const <String>[],
       List<_EntityRefValidator> referenceValidators:
           const <_EntityRefValidator>[]}) {
     expect(constExpr, isNotNull);
-    expect(constExpr.isInvalid, isInvalid);
+    expect(constExpr.isValidConst, isValidConst);
     expect(constExpr.operations, operators);
     expect(constExpr.ints, ints);
     expect(constExpr.doubles, doubles);
     expect(constExpr.strings, strings);
+    expect(constExpr.assignmentOperators, assignmentOperators);
     expect(constExpr.references, hasLength(referenceValidators.length));
     for (int i = 0; i < referenceValidators.length; i++) {
       referenceValidators[i](constExpr.references[i]);
diff --git a/pkg/analyzer/test/src/summary/test_all.dart b/pkg/analyzer/test/src/summary/test_all.dart
index fe80a5a..fa620fe 100644
--- a/pkg/analyzer/test/src/summary/test_all.dart
+++ b/pkg/analyzer/test/src/summary/test_all.dart
@@ -8,11 +8,15 @@
 
 import '../../utils.dart';
 import 'flat_buffers_test.dart' as flat_buffers_test;
+import 'in_summary_source_test.dart' as in_summary_source_test;
+import 'incremental_cache_test.dart' as incremental_cache_test;
 import 'index_unit_test.dart' as index_unit_test;
 import 'name_filter_test.dart' as name_filter_test;
 import 'prelinker_test.dart' as prelinker_test;
+import 'resynthesize_ast_test.dart' as resynthesize_ast_test;
 import 'resynthesize_strong_test.dart' as resynthesize_strong_test;
 import 'resynthesize_test.dart' as resynthesize_test;
+import 'summarize_ast_strong_test.dart' as summarize_ast_strong_test;
 import 'summarize_ast_test.dart' as summarize_ast_test;
 import 'summarize_elements_strong_test.dart' as summarize_elements_strong_test;
 import 'summarize_elements_test.dart' as summarize_elements_test;
@@ -22,11 +26,15 @@
   initializeTestEnvironment();
   group('summary tests', () {
     flat_buffers_test.main();
+    in_summary_source_test.main();
+    incremental_cache_test.main();
     index_unit_test.main();
     name_filter_test.main();
     prelinker_test.main();
+    resynthesize_ast_test.main();
     resynthesize_strong_test.main();
     resynthesize_test.main();
+    summarize_ast_strong_test.main();
     summarize_ast_test.main();
     summarize_elements_strong_test.main();
     summarize_elements_test.main();
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index 9bf0050..9b058bc 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -27,7 +27,7 @@
 import 'package:analyzer/task/model.dart';
 import 'package:unittest/unittest.dart';
 
-import '../../generated/resolver_test.dart';
+import '../../generated/resolver_test_case.dart';
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
 import '../../utils.dart';
@@ -66,6 +66,7 @@
   runReflectiveTests(PartiallyResolveUnitReferencesTaskTest);
   runReflectiveTests(PropagateVariableTypesInUnitTaskTest);
   runReflectiveTests(PropagateVariableTypeTaskTest);
+  runReflectiveTests(ResolveDirectiveElementsTaskTest);
   runReflectiveTests(ResolveInstanceFieldsInUnitTaskTest);
   runReflectiveTests(ResolveLibraryTaskTest);
   runReflectiveTests(ResolveLibraryTypeNamesTaskTest);
@@ -130,6 +131,8 @@
     new isInstanceOf<PropagateVariableTypesInUnitTask>();
 isInstanceOf isPropagateVariableTypeTask =
     new isInstanceOf<PropagateVariableTypeTask>();
+isInstanceOf isResolveDirectiveElementsTask =
+    new isInstanceOf<ResolveDirectiveElementsTask>();
 isInstanceOf isResolveLibraryTask = new isInstanceOf<ResolveLibraryTask>();
 isInstanceOf isResolveLibraryTypeNamesTask =
     new isInstanceOf<ResolveLibraryTypeNamesTask>();
@@ -562,9 +565,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT2);
-    expect(outputs[RESOLVED_UNIT2], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT2], isTrue);
+    computeResult(target, RESOLVED_UNIT3);
+    expect(outputs[RESOLVED_UNIT3], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT3], isTrue);
   }
 
   test_perform() {
@@ -575,9 +578,9 @@
   A, B
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT2,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT3,
         matcher: isBuildEnumMemberElementsTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT2];
+    CompilationUnit unit = outputs[RESOLVED_UNIT3];
     // validate Element
     ClassElement enumElement = unit.element.getEnum('MyEnum');
     List<FieldElement> fields = enumElement.fields;
@@ -981,7 +984,8 @@
     libraryUnitElement = libraryUnit.element;
     librarySource = libraryUnitElement.source;
     libraryElement = outputs[LIBRARY_ELEMENT1];
-    partUnits = task.inputs[BuildLibraryElementTask.PARTS_UNIT_INPUT];
+    partUnits = task.inputs[BuildLibraryElementTask.PARTS_UNIT_INPUT]
+        as List<CompilationUnit>;
   }
 }
 
@@ -1012,6 +1016,10 @@
 
 @reflectiveTest
 class BuildSourceExportClosureTaskTest extends _AbstractDartTaskTest {
+  List<Source> getExportSourceClosure(Map<ResultDescriptor, dynamic> outputs) {
+    return outputs[EXPORT_SOURCE_CLOSURE] as List<Source>;
+  }
+
   test_perform_exportClosure() {
     Source sourceA = newSource(
         '/a.dart',
@@ -1040,21 +1048,21 @@
     {
       computeResult(sourceA, EXPORT_SOURCE_CLOSURE,
           matcher: isBuildSourceExportClosureTask);
-      List<Source> closure = outputs[EXPORT_SOURCE_CLOSURE];
+      List<Source> closure = getExportSourceClosure(outputs);
       expect(closure, unorderedEquals([sourceA, sourceB, sourceC]));
     }
     // c.dart
     {
       computeResult(sourceC, EXPORT_SOURCE_CLOSURE,
           matcher: isBuildSourceExportClosureTask);
-      List<Source> closure = outputs[EXPORT_SOURCE_CLOSURE];
+      List<Source> closure = getExportSourceClosure(outputs);
       expect(closure, unorderedEquals([sourceA, sourceB, sourceC]));
     }
     // d.dart
     {
       computeResult(sourceD, EXPORT_SOURCE_CLOSURE,
           matcher: isBuildSourceExportClosureTask);
-      List<Source> closure = outputs[EXPORT_SOURCE_CLOSURE];
+      List<Source> closure = getExportSourceClosure(outputs);
       expect(closure, unorderedEquals([sourceD]));
     }
   }
@@ -1076,17 +1084,14 @@
 
 @reflectiveTest
 class BuildTypeProviderTaskTest_noAsync extends _AbstractDartTaskTest {
+  DartSdk createDartSdk() => new MockSdk(dartAsync: false);
+
   void prepareAnalysisContext([AnalysisOptions options]) {
     AnalysisOptionsImpl newOptions = new AnalysisOptionsImpl();
     newOptions.enableAsync = false;
     super.prepareAnalysisContext(newOptions);
   }
 
-  void setUp() {
-    sdk = new MockSdk(dartAsync: false);
-    super.setUp();
-  }
-
   test_perform_noAsync() {
     expect(context, isNotNull);
     computeResult(AnalysisContextTarget.request, TYPE_PROVIDER,
@@ -1207,8 +1212,8 @@
     // First compute the resolved unit for the source.
     LibrarySpecificUnit librarySpecificUnit =
         new LibrarySpecificUnit(source, source);
-    computeResult(librarySpecificUnit, RESOLVED_UNIT2);
-    CompilationUnit unit = outputs[RESOLVED_UNIT2];
+    computeResult(librarySpecificUnit, RESOLVED_UNIT3);
+    CompilationUnit unit = outputs[RESOLVED_UNIT3];
     // Find the element for 'A'
     EnumDeclaration enumDeclaration = unit.declarations[0];
     EnumConstantDeclaration constantDeclaration = enumDeclaration.constants[0];
@@ -1494,9 +1499,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5);
-    expect(outputs[RESOLVED_UNIT5], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT5], isTrue);
+    computeResult(target, RESOLVED_UNIT6);
+    expect(outputs[RESOLVED_UNIT6], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT6], isTrue);
   }
 
   test_perform() {
@@ -1507,22 +1512,36 @@
 const b = 0;
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(target, RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     TopLevelVariableElement elementA = unit.element.topLevelVariables[0];
     TopLevelVariableElement elementB = unit.element.topLevelVariables[1];
 
     computeResult(elementA, INFERABLE_STATIC_VARIABLE_DEPENDENCIES,
         matcher: isComputeInferableStaticVariableDependenciesTask);
     expect(outputs, hasLength(1));
-    List<VariableElement> dependencies =
-        outputs[INFERABLE_STATIC_VARIABLE_DEPENDENCIES];
+    List<VariableElement> dependencies = outputs[
+        INFERABLE_STATIC_VARIABLE_DEPENDENCIES] as List<VariableElement>;
     expect(dependencies, unorderedEquals([elementB]));
   }
 }
 
 @reflectiveTest
 class ComputeLibraryCycleTaskTest extends _AbstractDartTaskTest {
+  List<LibraryElement> getLibraryCycle(Map<ResultDescriptor, dynamic> outputs) {
+    return outputs[LIBRARY_CYCLE] as List<LibraryElement>;
+  }
+
+  List<CompilationUnitElement> getLibraryCycleDependencies(
+      Map<ResultDescriptor, dynamic> outputs) {
+    return outputs[LIBRARY_CYCLE_DEPENDENCIES] as List<CompilationUnitElement>;
+  }
+
+  List<CompilationUnitElement> getLibraryCycleUnits(
+      Map<ResultDescriptor, dynamic> outputs) {
+    return outputs[LIBRARY_CYCLE_UNITS] as List<CompilationUnitElement>;
+  }
+
   @override
   void setUp() {
     super.setUp();
@@ -1642,18 +1661,18 @@
     });
     List<Map<ResultDescriptor, dynamic>> results =
         computeLibraryResultsMap(sources, LIBRARY_CYCLE);
-    List<LibraryElement> component0 = results[0][LIBRARY_CYCLE];
-    List<LibraryElement> component1 = results[1][LIBRARY_CYCLE];
+    List<LibraryElement> component0 = getLibraryCycle(results[0]);
+    List<LibraryElement> component1 = getLibraryCycle(results[1]);
     expect(component0, hasLength(1));
     expect(component1, hasLength(1));
 
-    List<CompilationUnitElement> units0 = results[0][LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units1 = results[1][LIBRARY_CYCLE_UNITS];
+    List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]);
+    List<CompilationUnitElement> units1 = getLibraryCycleUnits(results[1]);
     expect(units0, hasLength(1));
     expect(units1, hasLength(1));
 
-    List<CompilationUnitElement> dep0 = results[0][LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep1 = results[1][LIBRARY_CYCLE_DEPENDENCIES];
+    List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]);
+    List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results[1]);
     expect(dep0, hasLength(1)); // dart:core
     expect(dep1, hasLength(2)); // dart:core, a.dart
   }
@@ -1672,24 +1691,24 @@
     });
     List<Map<ResultDescriptor, dynamic>> results =
         computeLibraryResultsMap(sources, LIBRARY_CYCLE).toList();
-    List<LibraryElement> component0 = results[0][LIBRARY_CYCLE];
-    List<LibraryElement> component1 = results[1][LIBRARY_CYCLE];
-    List<LibraryElement> component2 = results[2][LIBRARY_CYCLE];
+    List<LibraryElement> component0 = getLibraryCycle(results[0]);
+    List<LibraryElement> component1 = getLibraryCycle(results[1]);
+    List<LibraryElement> component2 = getLibraryCycle(results[2]);
 
     expect(component0, hasLength(3));
     expect(component1, hasLength(3));
     expect(component2, hasLength(3));
 
-    List<CompilationUnitElement> units0 = results[0][LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units1 = results[1][LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units2 = results[2][LIBRARY_CYCLE_UNITS];
+    List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]);
+    List<CompilationUnitElement> units1 = getLibraryCycleUnits(results[1]);
+    List<CompilationUnitElement> units2 = getLibraryCycleUnits(results[2]);
     expect(units0, hasLength(3));
     expect(units1, hasLength(3));
     expect(units2, hasLength(3));
 
-    List<CompilationUnitElement> dep0 = results[0][LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep1 = results[1][LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep2 = results[2][LIBRARY_CYCLE_DEPENDENCIES];
+    List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]);
+    List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results[1]);
+    List<CompilationUnitElement> dep2 = getLibraryCycleDependencies(results[2]);
     expect(dep0, hasLength(1)); // dart:core
     expect(dep1, hasLength(1)); // dart:core
     expect(dep2, hasLength(1)); // dart:core
@@ -1759,13 +1778,13 @@
     });
     List<Map<ResultDescriptor, dynamic>> results =
         computeLibraryResultsMap(sources, LIBRARY_CYCLE).toList();
-    List<LibraryElement> component0 = results[0][LIBRARY_CYCLE];
+    List<LibraryElement> component0 = getLibraryCycle(results[0]);
     expect(component0, hasLength(1));
 
-    List<CompilationUnitElement> units0 = results[0][LIBRARY_CYCLE_UNITS];
+    List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]);
     expect(units0, hasLength(1));
 
-    List<CompilationUnitElement> dep0 = results[0][LIBRARY_CYCLE_DEPENDENCIES];
+    List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]);
     expect(dep0, hasLength(1)); // dart:core
   }
 
@@ -1776,9 +1795,9 @@
 import 'dart:core';
 ''');
     computeResult(new LibrarySpecificUnit(source, source), LIBRARY_CYCLE);
-    List<LibraryElement> component = outputs[LIBRARY_CYCLE];
-    List<CompilationUnitElement> units = outputs[LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> deps = outputs[LIBRARY_CYCLE_DEPENDENCIES];
+    List<LibraryElement> component = getLibraryCycle(outputs);
+    List<CompilationUnitElement> units = getLibraryCycleUnits(outputs);
+    List<CompilationUnitElement> deps = getLibraryCycleDependencies(outputs);
     expect(component, hasLength(1));
     expect(units, hasLength(1));
     expect(deps, hasLength(1));
@@ -1797,23 +1816,23 @@
     });
     List<Map<ResultDescriptor, dynamic>> results =
         computeLibraryResultsMap(sources, LIBRARY_CYCLE);
-    List<LibraryElement> component0 = results[0][LIBRARY_CYCLE];
-    List<LibraryElement> component1 = results[1][LIBRARY_CYCLE];
-    List<LibraryElement> component2 = results[2][LIBRARY_CYCLE];
+    List<LibraryElement> component0 = getLibraryCycle(results[0]);
+    List<LibraryElement> component1 = getLibraryCycle(results[1]);
+    List<LibraryElement> component2 = getLibraryCycle(results[2]);
     expect(component0, hasLength(1));
     expect(component1, hasLength(1));
     expect(component2, hasLength(1));
 
-    List<CompilationUnitElement> units0 = results[0][LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units1 = results[1][LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units2 = results[2][LIBRARY_CYCLE_UNITS];
+    List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]);
+    List<CompilationUnitElement> units1 = getLibraryCycleUnits(results[1]);
+    List<CompilationUnitElement> units2 = getLibraryCycleUnits(results[2]);
     expect(units0, hasLength(1));
     expect(units1, hasLength(1));
     expect(units2, hasLength(1));
 
-    List<CompilationUnitElement> dep0 = results[0][LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep1 = results[1][LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep2 = results[2][LIBRARY_CYCLE_DEPENDENCIES];
+    List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]);
+    List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results[1]);
+    List<CompilationUnitElement> dep2 = getLibraryCycleDependencies(results[2]);
     expect(dep0, hasLength(1)); // dart:core
     expect(dep1, hasLength(1)); // dart:core,
     expect(dep2, hasLength(3)); // dart:core, a.dart, b.dart
@@ -1840,29 +1859,29 @@
     });
     List<Map<ResultDescriptor, dynamic>> results =
         computeLibraryResultsMap(sources, LIBRARY_CYCLE).toList();
-    List<LibraryElement> component0 = results[0][LIBRARY_CYCLE];
-    List<LibraryElement> component1 = results[1][LIBRARY_CYCLE];
-    List<LibraryElement> component2 = results[2][LIBRARY_CYCLE];
-    List<LibraryElement> component3 = results[3][LIBRARY_CYCLE];
+    List<LibraryElement> component0 = getLibraryCycle(results[0]);
+    List<LibraryElement> component1 = getLibraryCycle(results[1]);
+    List<LibraryElement> component2 = getLibraryCycle(results[2]);
+    List<LibraryElement> component3 = getLibraryCycle(results[3]);
 
     expect(component0, hasLength(2));
     expect(component1, hasLength(2));
     expect(component2, hasLength(2));
     expect(component3, hasLength(2));
 
-    List<CompilationUnitElement> units0 = results[0][LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units1 = results[1][LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units2 = results[2][LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units3 = results[3][LIBRARY_CYCLE_UNITS];
+    List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]);
+    List<CompilationUnitElement> units1 = getLibraryCycleUnits(results[1]);
+    List<CompilationUnitElement> units2 = getLibraryCycleUnits(results[2]);
+    List<CompilationUnitElement> units3 = getLibraryCycleUnits(results[3]);
     expect(units0, hasLength(2));
     expect(units1, hasLength(2));
     expect(units2, hasLength(2));
     expect(units3, hasLength(2));
 
-    List<CompilationUnitElement> dep0 = results[0][LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep1 = results[1][LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep2 = results[2][LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep3 = results[3][LIBRARY_CYCLE_DEPENDENCIES];
+    List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]);
+    List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results[1]);
+    List<CompilationUnitElement> dep2 = getLibraryCycleDependencies(results[2]);
+    List<CompilationUnitElement> dep3 = getLibraryCycleDependencies(results[3]);
     expect(dep0, hasLength(1)); // dart:core
     expect(dep1, hasLength(1)); // dart:core
     expect(dep2, hasLength(3)); // dart:core, a.dart, b.dart
@@ -1925,14 +1944,14 @@
         new LibrarySpecificUnit(sources[5], sources[7]), LIBRARY_CYCLE);
     Map<ResultDescriptor, dynamic> results7 = outputs;
 
-    List<LibraryElement> component0 = results0[LIBRARY_CYCLE];
-    List<LibraryElement> component1 = results1[LIBRARY_CYCLE];
-    List<LibraryElement> component2 = results2[LIBRARY_CYCLE];
-    List<LibraryElement> component3 = results3[LIBRARY_CYCLE];
-    List<LibraryElement> component4 = results4[LIBRARY_CYCLE];
-    List<LibraryElement> component5 = results5[LIBRARY_CYCLE];
-    List<LibraryElement> component6 = results6[LIBRARY_CYCLE];
-    List<LibraryElement> component7 = results7[LIBRARY_CYCLE];
+    List<LibraryElement> component0 = getLibraryCycle(results0);
+    List<LibraryElement> component1 = getLibraryCycle(results1);
+    List<LibraryElement> component2 = getLibraryCycle(results2);
+    List<LibraryElement> component3 = getLibraryCycle(results3);
+    List<LibraryElement> component4 = getLibraryCycle(results4);
+    List<LibraryElement> component5 = getLibraryCycle(results5);
+    List<LibraryElement> component6 = getLibraryCycle(results6);
+    List<LibraryElement> component7 = getLibraryCycle(results7);
 
     expect(component0, hasLength(2));
     expect(component1, hasLength(2));
@@ -1943,14 +1962,14 @@
     expect(component6, hasLength(2));
     expect(component7, hasLength(2));
 
-    List<CompilationUnitElement> units0 = results0[LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units1 = results1[LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units2 = results2[LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units3 = results3[LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units4 = results4[LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units5 = results5[LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units6 = results6[LIBRARY_CYCLE_UNITS];
-    List<CompilationUnitElement> units7 = results7[LIBRARY_CYCLE_UNITS];
+    List<CompilationUnitElement> units0 = getLibraryCycleUnits(results0);
+    List<CompilationUnitElement> units1 = getLibraryCycleUnits(results1);
+    List<CompilationUnitElement> units2 = getLibraryCycleUnits(results2);
+    List<CompilationUnitElement> units3 = getLibraryCycleUnits(results3);
+    List<CompilationUnitElement> units4 = getLibraryCycleUnits(results4);
+    List<CompilationUnitElement> units5 = getLibraryCycleUnits(results5);
+    List<CompilationUnitElement> units6 = getLibraryCycleUnits(results6);
+    List<CompilationUnitElement> units7 = getLibraryCycleUnits(results7);
     expect(units0, hasLength(4));
     expect(units1, hasLength(4));
     expect(units2, hasLength(4));
@@ -1960,14 +1979,14 @@
     expect(units6, hasLength(4));
     expect(units7, hasLength(4));
 
-    List<CompilationUnitElement> dep0 = results0[LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep1 = results1[LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep2 = results2[LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep3 = results3[LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep4 = results4[LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep5 = results5[LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep6 = results6[LIBRARY_CYCLE_DEPENDENCIES];
-    List<CompilationUnitElement> dep7 = results7[LIBRARY_CYCLE_DEPENDENCIES];
+    List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results0);
+    List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results1);
+    List<CompilationUnitElement> dep2 = getLibraryCycleDependencies(results2);
+    List<CompilationUnitElement> dep3 = getLibraryCycleDependencies(results3);
+    List<CompilationUnitElement> dep4 = getLibraryCycleDependencies(results4);
+    List<CompilationUnitElement> dep5 = getLibraryCycleDependencies(results5);
+    List<CompilationUnitElement> dep6 = getLibraryCycleDependencies(results6);
+    List<CompilationUnitElement> dep7 = getLibraryCycleDependencies(results7);
     expect(dep0, hasLength(1)); // dart:core
     expect(dep1, hasLength(1)); // dart:core
     expect(dep2, hasLength(1)); // dart:core
@@ -1982,6 +2001,11 @@
 @reflectiveTest
 class ComputePropagableVariableDependenciesTaskTest
     extends _AbstractDartTaskTest {
+  List<VariableElement> getPropagableVariableDependencies(
+      Map<ResultDescriptor, dynamic> outputs) {
+    return outputs[PROPAGABLE_VARIABLE_DEPENDENCIES] as List<VariableElement>;
+  }
+
   test_perform_instanceField() {
     AnalysisTarget source = newSource(
         '/test.dart',
@@ -2001,8 +2025,8 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(target, RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     FieldElement elementA = AstFinder.getFieldInClassElement(unit, 'A', 'a');
     // compute
     computeResult(elementA, PROPAGABLE_VARIABLE_DEPENDENCIES,
@@ -2010,7 +2034,7 @@
     // verify
     expect(outputs, hasLength(1));
     List<VariableElement> dependencies =
-        outputs[PROPAGABLE_VARIABLE_DEPENDENCIES];
+        getPropagableVariableDependencies(outputs);
     expect(
         dependencies,
         unorderedEquals([
@@ -2032,8 +2056,8 @@
 var   d4 = 4;
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(target, RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     TopLevelVariableElement elementA =
         AstFinder.getTopLevelVariableElement(unit, 'a');
     // compute
@@ -2042,7 +2066,7 @@
     // verify
     expect(outputs, hasLength(1));
     List<VariableElement> dependencies =
-        outputs[PROPAGABLE_VARIABLE_DEPENDENCIES];
+        getPropagableVariableDependencies(outputs);
     expect(
         dependencies,
         unorderedEquals([
@@ -2063,8 +2087,8 @@
 final d = 4;
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(target, RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     TopLevelVariableElement elementA =
         AstFinder.getTopLevelVariableElement(unit, 'a');
     // compute
@@ -2073,7 +2097,7 @@
     // verify
     expect(outputs, hasLength(1));
     List<VariableElement> dependencies =
-        outputs[PROPAGABLE_VARIABLE_DEPENDENCIES];
+        getPropagableVariableDependencies(outputs);
     expect(dependencies,
         unorderedEquals([AstFinder.getTopLevelVariableElement(unit, 'd')]));
   }
@@ -2087,8 +2111,8 @@
 const c = 2;
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(target, RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     TopLevelVariableElement elementA =
         AstFinder.getTopLevelVariableElement(unit, 'a');
     // compute
@@ -2097,7 +2121,7 @@
     // verify
     expect(outputs, hasLength(1));
     List<VariableElement> dependencies =
-        outputs[PROPAGABLE_VARIABLE_DEPENDENCIES];
+        getPropagableVariableDependencies(outputs);
     expect(
         dependencies,
         unorderedEquals([
@@ -2109,13 +2133,17 @@
 
 @reflectiveTest
 class ContainingLibrariesTaskTest extends _AbstractDartTaskTest {
+  List<Source> getContainingLibraries(Map<ResultDescriptor, dynamic> outputs) {
+    return outputs[CONTAINING_LIBRARIES] as List<Source>;
+  }
+
   test_perform_definingCompilationUnit() {
     AnalysisTarget library = newSource('/test.dart', 'library test;');
     computeResult(library, INCLUDED_PARTS);
     computeResult(library, CONTAINING_LIBRARIES,
         matcher: isContainingLibrariesTask);
     expect(outputs, hasLength(1));
-    List<Source> containingLibraries = outputs[CONTAINING_LIBRARIES];
+    List<Source> containingLibraries = getContainingLibraries(outputs);
     expect(containingLibraries, unorderedEquals([library]));
   }
 
@@ -2131,7 +2159,7 @@
     computeResult(part, CONTAINING_LIBRARIES,
         matcher: isContainingLibrariesTask);
     expect(outputs, hasLength(1));
-    List<Source> containingLibraries = outputs[CONTAINING_LIBRARIES];
+    List<Source> containingLibraries = getContainingLibraries(outputs);
     expect(containingLibraries, unorderedEquals([library1, library2]));
   }
 
@@ -2144,20 +2172,24 @@
     computeResult(part, CONTAINING_LIBRARIES,
         matcher: isContainingLibrariesTask);
     expect(outputs, hasLength(1));
-    List<Source> containingLibraries = outputs[CONTAINING_LIBRARIES];
+    List<Source> containingLibraries = getContainingLibraries(outputs);
     expect(containingLibraries, unorderedEquals([library]));
   }
 }
 
 @reflectiveTest
 class DartErrorsTaskTest extends _AbstractDartTaskTest {
+  List<AnalysisError> getDartErrors(Map<ResultDescriptor, dynamic> outputs) {
+    return outputs[DART_ERRORS] as List<AnalysisError>;
+  }
+
   test_perform_definingCompilationUnit() {
     AnalysisTarget library =
         newSource('/test.dart', 'library test; import "dart:math";');
     computeResult(library, INCLUDED_PARTS);
     computeResult(library, DART_ERRORS, matcher: isDartErrorsTask);
     expect(outputs, hasLength(1));
-    List<AnalysisError> errors = outputs[DART_ERRORS];
+    List<AnalysisError> errors = getDartErrors(outputs);
     expect(errors, hasLength(1));
   }
 
@@ -2170,7 +2202,7 @@
     computeResult(library, DART_ERRORS);
     computeResult(part, DART_ERRORS, matcher: isDartErrorsTask);
     expect(outputs, hasLength(1));
-    List<AnalysisError> errors = outputs[DART_ERRORS];
+    List<AnalysisError> errors = getDartErrors(outputs);
     // This should contain only the errors in the part file, not the ones in the
     // library.
     expect(errors, hasLength(1));
@@ -2187,9 +2219,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT11);
-    expect(outputs[RESOLVED_UNIT11], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT11], isTrue);
+    computeResult(target, RESOLVED_UNIT12);
+    expect(outputs[RESOLVED_UNIT12], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT12], isTrue);
   }
 
   test_perform() {
@@ -2206,9 +2238,9 @@
 const x = const C();
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT11,
+    computeResult(target, RESOLVED_UNIT12,
         matcher: isEvaluateUnitConstantsTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT11];
+    CompilationUnit unit = outputs[RESOLVED_UNIT12];
     CompilationUnitElement unitElement = unit.element;
     expect(
         (unitElement.types[0].constructors[0] as ConstructorElementImpl)
@@ -2230,7 +2262,7 @@
   UsedImportedElements usedElements;
   Set<String> usedElementNames;
 
-  test_perform() {
+  test_perform_inBody() {
     newSource(
         '/a.dart',
         r'''
@@ -2256,6 +2288,54 @@
     expect(usedElementNames, unorderedEquals(['A']));
   }
 
+  test_perform_inComment_exportDirective() {
+    Source source = newSource(
+        '/test.dart',
+        r'''
+import 'dart:async';
+/// Use [Future].
+export 'dart:math';
+''');
+    _computeUsedElements(source);
+    expect(usedElementNames, unorderedEquals(['Future']));
+  }
+
+  test_perform_inComment_importDirective() {
+    Source source = newSource(
+        '/test.dart',
+        r'''
+import 'dart:async';
+/// Use [Future].
+import 'dart:math';
+''');
+    _computeUsedElements(source);
+    expect(usedElementNames, unorderedEquals(['Future']));
+  }
+
+  test_perform_inComment_libraryDirective() {
+    Source source = newSource(
+        '/test.dart',
+        r'''
+/// Use [Future].
+library test;
+import 'dart:async';
+''');
+    _computeUsedElements(source);
+    expect(usedElementNames, unorderedEquals(['Future']));
+  }
+
+  test_perform_inComment_topLevelFunction() {
+    Source source = newSource(
+        '/test.dart',
+        r'''
+import 'dart:async';
+/// Use [Future].
+main() {}
+''');
+    _computeUsedElements(source);
+    expect(usedElementNames, unorderedEquals(['Future']));
+  }
+
   void _computeUsedElements(Source source) {
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
     computeResult(target, USED_IMPORTED_ELEMENTS,
@@ -2651,6 +2731,9 @@
 
 class GenerateLintsTaskTest_TestLinter extends Linter {
   @override
+  String get name => 'GenerateLintsTaskTest_TestLinter';
+
+  @override
   AstVisitor getVisitor() => new GenerateLintsTaskTest_AstVisitor(this);
 }
 
@@ -2664,9 +2747,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT9);
-    expect(outputs[RESOLVED_UNIT9], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT9], isTrue);
+    computeResult(target, RESOLVED_UNIT10);
+    expect(outputs[RESOLVED_UNIT10], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT10], isTrue);
   }
 
   void test_perform() {
@@ -2686,9 +2769,9 @@
 class Y {}
 class Z {}
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10,
         matcher: isInferInstanceMembersInUnitTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT9];
+    CompilationUnit unit = outputs[RESOLVED_UNIT10];
     VariableDeclaration field = AstFinder.getFieldInClass(unit, 'B', 'f');
     MethodDeclaration method = AstFinder.getMethodInClass(unit, 'B', 'm');
     DartType typeX = AstFinder.getClass(unit, 'X').element.type;
@@ -2720,12 +2803,12 @@
 }
 ''');
     computeResult(
-        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT9,
+        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT10,
         matcher: isInferInstanceMembersInUnitTask);
-    CompilationUnit firstUnit = outputs[RESOLVED_UNIT9];
+    CompilationUnit firstUnit = outputs[RESOLVED_UNIT10];
     computeResult(
-        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT9);
-    CompilationUnit secondUnit = outputs[RESOLVED_UNIT9];
+        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT10);
+    CompilationUnit secondUnit = outputs[RESOLVED_UNIT10];
 
     VariableDeclaration variableA =
         AstFinder.getTopLevelVariable(firstUnit, 'a');
@@ -2752,8 +2835,8 @@
   String field = topLevel;
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9);
-    CompilationUnit unit = outputs[RESOLVED_UNIT9];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10);
+    CompilationUnit unit = outputs[RESOLVED_UNIT10];
     VariableDeclaration topLevelDecl =
         AstFinder.getTopLevelVariable(unit, 'topLevel');
     VariableDeclaration fieldDecl =
@@ -2770,6 +2853,12 @@
 
 @reflectiveTest
 class InferStaticVariableTypesInUnitTaskTest extends _AbstractDartTaskTest {
+  @override
+  void setUp() {
+    super.setUp();
+    enableStrongMode();
+  }
+
   test_created_resolved_unit() {
     Source source = newSource(
         '/test.dart',
@@ -2778,9 +2867,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT7);
-    expect(outputs[RESOLVED_UNIT7], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT7], isTrue);
+    computeResult(target, RESOLVED_UNIT8);
+    expect(outputs[RESOLVED_UNIT8], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT8], isTrue);
   }
 
   void test_perform_const_field() {
@@ -2792,14 +2881,26 @@
   static const X = "";
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT7,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8,
         matcher: isInferStaticVariableTypesInUnitTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT7];
+    CompilationUnit unit = outputs[RESOLVED_UNIT8];
     VariableDeclaration declaration = AstFinder.getFieldInClass(unit, 'M', 'X');
     InterfaceType stringType = context.typeProvider.stringType;
     expect(declaration.element.type, stringType);
   }
 
+  test_perform_hasParseError() {
+    Source source = newSource(
+        '/test.dart',
+        r'''
+@(i $=
+''');
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    computeResult(target, RESOLVED_UNIT8);
+    expect(outputs[RESOLVED_UNIT8], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT8], isTrue);
+  }
+
   void test_perform_nestedDeclarations() {
     enableStrongMode();
     AnalysisTarget source = newSource(
@@ -2811,7 +2912,7 @@
   return xSquared;
 };
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT7,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8,
         matcher: isInferStaticVariableTypesInUnitTask);
   }
 
@@ -2834,12 +2935,12 @@
 class M {}
 ''');
     computeResult(
-        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT7,
+        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT8,
         matcher: isInferStaticVariableTypesInUnitTask);
-    CompilationUnit firstUnit = outputs[RESOLVED_UNIT7];
+    CompilationUnit firstUnit = outputs[RESOLVED_UNIT8];
     computeResult(
-        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT7);
-    CompilationUnit secondUnit = outputs[RESOLVED_UNIT7];
+        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT8);
+    CompilationUnit secondUnit = outputs[RESOLVED_UNIT8];
 
     VariableDeclaration variableA =
         AstFinder.getTopLevelVariable(firstUnit, 'a');
@@ -2868,9 +2969,9 @@
   return 1 + X;
 };
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT7,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8,
         matcher: isInferStaticVariableTypesInUnitTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT7];
+    CompilationUnit unit = outputs[RESOLVED_UNIT8];
     TopLevelVariableDeclaration declaration = unit.declarations[1];
     FunctionExpression function =
         declaration.variables.variables[0].initializer;
@@ -2892,8 +2993,8 @@
   var field = '';
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     VariableDeclaration declaration =
         AstFinder.getFieldInClass(unit, 'C', 'field');
     VariableElement variable = declaration.name.staticElement;
@@ -2908,8 +3009,8 @@
         '''
 var topLevel = '';
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     VariableDeclaration declaration =
         AstFinder.getTopLevelVariable(unit, 'topLevel');
     VariableElement variable = declaration.name.staticElement;
@@ -2928,8 +3029,8 @@
   var field3 = topLevel3;
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     VariableDeclaration topLevelDecl =
         AstFinder.getTopLevelVariable(unit, 'topLevel3');
     VariableDeclaration fieldDecl =
@@ -2955,8 +3056,8 @@
   var field = topLevel;
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     VariableElement topLevel =
         AstFinder.getTopLevelVariable(unit, 'topLevel').name.staticElement;
     VariableElement field =
@@ -2978,8 +3079,8 @@
 var pi = piFirst ? 3.14 : tau / 2;
 var tau = piFirst ? pi * 2 : 6.28;
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     VariableElement piFirst =
         AstFinder.getTopLevelVariable(unit, 'piFirst').name.staticElement;
     VariableElement pi =
@@ -3001,8 +3102,8 @@
         '''
 var a = '' / null;
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     VariableElement a =
         AstFinder.getTopLevelVariable(unit, 'a').name.staticElement;
 
@@ -3018,8 +3119,8 @@
         '''
 var a = null;
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     VariableElement a =
         AstFinder.getTopLevelVariable(unit, 'a').name.staticElement;
 
@@ -3065,6 +3166,11 @@
 
 @reflectiveTest
 class LibraryUnitErrorsTaskTest extends _AbstractDartTaskTest {
+  List<AnalysisError> getLibraryUnitErrors(
+      Map<ResultDescriptor, dynamic> outputs) {
+    return outputs[LIBRARY_UNIT_ERRORS] as List<AnalysisError>;
+  }
+
   test_perform_definingCompilationUnit() {
     AnalysisTarget library =
         newSource('/test.dart', 'library test; import "dart:math";');
@@ -3072,7 +3178,7 @@
         new LibrarySpecificUnit(library, library), LIBRARY_UNIT_ERRORS,
         matcher: isLibraryUnitErrorsTask);
     expect(outputs, hasLength(1));
-    List<AnalysisError> errors = outputs[LIBRARY_UNIT_ERRORS];
+    List<AnalysisError> errors = getLibraryUnitErrors(outputs);
     expect(errors, hasLength(1));
   }
 
@@ -3083,7 +3189,7 @@
     computeResult(new LibrarySpecificUnit(library, part), LIBRARY_UNIT_ERRORS,
         matcher: isLibraryUnitErrorsTask);
     expect(outputs, hasLength(1));
-    List<AnalysisError> errors = outputs[LIBRARY_UNIT_ERRORS];
+    List<AnalysisError> errors = getLibraryUnitErrors(outputs);
     expect(errors, hasLength(0));
   }
 }
@@ -3256,7 +3362,8 @@
     computeResult(source, PARSED_UNIT, matcher: isParseDartTask);
   }
 
-  static void _assertHasCore(List<Source> sources, int lenght) {
+  static void _assertHasCore(dynamic sourceList, int lenght) {
+    List<Source> sources = sourceList as List<Source>;
     expect(sources, hasLength(lenght));
     expect(sources, contains(predicate((Source s) {
       return s.fullName.endsWith('core.dart');
@@ -3290,7 +3397,8 @@
     computeResult(target, PROPAGABLE_VARIABLES_IN_UNIT,
         matcher: isPartiallyResolveUnitReferencesTask);
     // PROPAGABLE_VARIABLES_IN_UNIT
-    List<VariableElement> variables = outputs[PROPAGABLE_VARIABLES_IN_UNIT];
+    List<VariableElement> variables =
+        outputs[PROPAGABLE_VARIABLES_IN_UNIT] as List<VariableElement>;
     expect(variables.map((v) => v.displayName),
         unorderedEquals(['t1', 't2', 'fs1', 'fs2', 'fi1', 'fi2']));
   }
@@ -3319,11 +3427,11 @@
   new A<int>().m();
 }
 ''');
-    computeResult(new LibrarySpecificUnit(sourceC, sourceC), RESOLVED_UNIT5,
+    computeResult(new LibrarySpecificUnit(sourceC, sourceC), RESOLVED_UNIT6,
         matcher: isPartiallyResolveUnitReferencesTask);
     // validate
     expect(outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT], hasLength(0));
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     expect(unit, isNotNull);
 
     FunctionDeclaration mainFunction = unit.declarations[0];
@@ -3351,13 +3459,13 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5,
+    computeResult(target, RESOLVED_UNIT6,
         matcher: isPartiallyResolveUnitReferencesTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     // INFERABLE_STATIC_VARIABLES_IN_UNIT
     {
       List<VariableElement> variables =
-          outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT];
+          outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT] as List<VariableElement>;
       expect(variables, hasLength(4));
       expect(variables.map((v) => v.displayName),
           unorderedEquals(['a', 'b', 'd', 'f']));
@@ -3394,9 +3502,9 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5,
+    computeResult(target, RESOLVED_UNIT6,
         matcher: isPartiallyResolveUnitReferencesTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     NodeList<CompilationUnitMember> declarations = unit.declarations;
 
     void expectReference(BlockFunctionBody body, bool isResolved) {
@@ -3445,9 +3553,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT6);
-    expect(outputs[RESOLVED_UNIT6], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT6], isTrue);
+    computeResult(target, RESOLVED_UNIT7);
+    expect(outputs[RESOLVED_UNIT7], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT7], isTrue);
   }
 
   void test_perform_cycle() {
@@ -3459,9 +3567,9 @@
 final tau = piFirst ? pi * 2 : 6.28;
 ''');
     // compute
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT7,
         matcher: isPropagateVariableTypesInUnitTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT6];
+    CompilationUnit unit = outputs[RESOLVED_UNIT7];
     // verify
     TopLevelVariableElement piFirst =
         AstFinder.getTopLevelVariableElement(unit, 'piFirst');
@@ -3484,9 +3592,9 @@
 final c = '2';
 ''');
     // compute
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT7,
         matcher: isPropagateVariableTypesInUnitTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT6];
+    CompilationUnit unit = outputs[RESOLVED_UNIT7];
     // verify
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -3509,8 +3617,8 @@
 final pi = piFirst ? 3.14 : tau / 2;
 final tau = piFirst ? pi * 2 : 6.28;
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     TopLevelVariableElement piFirst =
         AstFinder.getTopLevelVariableElement(unit, 'piFirst');
     TopLevelVariableElement pi =
@@ -3532,8 +3640,8 @@
         '''
 var a = null;
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     TopLevelVariableElement a = AstFinder.getTopLevelVariableElement(unit, 'a');
     // compute
     computeResult(a, PROPAGATED_VARIABLE, matcher: isPropagateVariableTypeTask);
@@ -3548,8 +3656,8 @@
 final b = 1;
 final c = '2';
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT6);
+    CompilationUnit unit = outputs[RESOLVED_UNIT6];
     TopLevelVariableElement elementA =
         AstFinder.getTopLevelVariableElement(unit, 'a');
     TopLevelVariableElement elementB =
@@ -3568,6 +3676,57 @@
 }
 
 @reflectiveTest
+class ResolveDirectiveElementsTaskTest extends _AbstractDartTaskTest {
+  test_perform() {
+    List<Source> sources = newSources({
+      '/libA.dart': '''
+library libA;
+import 'libB.dart';
+export 'libC.dart';
+''',
+      '/libB.dart': '''
+library libB;
+''',
+      '/libC.dart': '''
+library libC;
+'''
+    });
+    Source sourceA = sources[0];
+    LibrarySpecificUnit targetA = new LibrarySpecificUnit(sourceA, sourceA);
+    // build directive elements
+    computeResult(sourceA, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
+    // prepare outputs
+    LibraryElement libraryElementA = outputs[LIBRARY_ELEMENT2];
+    LibraryElement libraryElementB = libraryElementA.imports[0].importedLibrary;
+    LibraryElement libraryElementC = libraryElementA.exports[0].exportedLibrary;
+    // clear elements in directive ASTs
+    {
+      CompilationUnit unitA = context.getResult(targetA, RESOLVED_UNIT1);
+      unitA.directives[1].element = null;
+      unitA.directives[2].element = null;
+    }
+    // resolve directive ASTs
+    computeResult(targetA, RESOLVED_UNIT2,
+        matcher: isResolveDirectiveElementsTask);
+    // validate that directive ASTs have elements
+    CompilationUnit unitA = context.getResult(targetA, RESOLVED_UNIT2);
+    {
+      ImportDirective importNode = unitA.directives[1];
+      ImportElement importElement = importNode.element;
+      expect(importElement, isNotNull);
+      expect(importElement.importedLibrary, libraryElementB);
+    }
+    {
+      ExportDirective exportNode = unitA.directives[2];
+      ExportElement exportElement = exportNode.element;
+      expect(exportElement, isNotNull);
+      expect(exportElement.exportedLibrary, libraryElementC);
+    }
+  }
+}
+
+@reflectiveTest
 class ResolveInstanceFieldsInUnitTaskTest extends _AbstractDartTaskTest {
   @override
   void setUp() {
@@ -3583,9 +3742,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT8);
-    expect(outputs[RESOLVED_UNIT8], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT8], isTrue);
+    computeResult(target, RESOLVED_UNIT9);
+    expect(outputs[RESOLVED_UNIT9], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT9], isTrue);
   }
 
   // Test inference of instance fields across units
@@ -3615,16 +3774,16 @@
     DartType dynamicType = context.typeProvider.dynamicType;
 
     computeResult(
-        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT8);
-    CompilationUnit unit1 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT9);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT9];
 
     // B.b2 shoud be resolved on the rhs, but not yet inferred.
     assertVariableDeclarationTypes(
         AstFinder.getFieldInClass(unit1, "B", "b2"), dynamicType, intType);
 
     computeResult(
-        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT8);
-    CompilationUnit unit0 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT9);
+    CompilationUnit unit0 = outputs[RESOLVED_UNIT9];
 
     // B.b2 should now be fully resolved and inferred.
     assertVariableDeclarationTypes(
@@ -3635,7 +3794,7 @@
         AstFinder.getFieldInClass(unit0, "A", "a2"), dynamicType, intType);
 
     computeResult(
-        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT8);
+        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT9);
 
     // A.a2 should now be fully resolved and inferred.
     assertVariableDeclarationTypes(
@@ -3672,15 +3831,15 @@
     DartType dynamicType = context.typeProvider.dynamicType;
 
     computeResult(
-        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT8);
-    CompilationUnit unit0 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT9);
+    CompilationUnit unit0 = outputs[RESOLVED_UNIT9];
 
     // A.a2 should now be resolved on the rhs, but not yet inferred.
     assertVariableDeclarationTypes(
         AstFinder.getFieldInClass(unit0, "A", "a2"), dynamicType, dynamicType);
 
     computeResult(
-        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT8);
+        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT9);
 
     // A.a2 should now be fully resolved and inferred (but not re-resolved).
     assertVariableDeclarationTypes(
@@ -3718,8 +3877,8 @@
     DartType dynamicType = context.typeProvider.dynamicType;
 
     computeResult(
-        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT8);
-    CompilationUnit unit1 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT9);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT9];
 
     assertVariableDeclarationTypes(
         AstFinder.getFieldInClass(unit1, "B", "b1"), intType, intType);
@@ -3727,8 +3886,8 @@
         AstFinder.getFieldInClass(unit1, "B", "b2"), dynamicType, intType);
 
     computeResult(
-        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT8);
-    CompilationUnit unit0 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT9);
+    CompilationUnit unit0 = outputs[RESOLVED_UNIT9];
 
     assertVariableDeclarationTypes(
         AstFinder.getFieldInClass(unit0, "A", "a1"), intType, intType);
@@ -3741,7 +3900,7 @@
         AstFinder.getFieldInClass(unit1, "B", "b2"), intType, intType);
 
     computeResult(
-        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT8);
+        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT9);
 
     assertVariableDeclarationTypes(
         AstFinder.getFieldInClass(unit0, "A", "a1"), intType, intType);
@@ -3780,8 +3939,8 @@
     DartType dynamicType = context.typeProvider.dynamicType;
 
     computeResult(
-        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT8);
-    CompilationUnit unit0 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT9);
+    CompilationUnit unit0 = outputs[RESOLVED_UNIT9];
 
     // A.a2 should now be resolved on the rhs, but not yet inferred.
     assertVariableDeclarationTypes(
@@ -3792,7 +3951,7 @@
         AstFinder.getFieldInClass(unit0, "B", "b2"), dynamicType, intType);
 
     computeResult(
-        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT8);
+        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT9);
 
     // A.a2 should now be fully resolved and inferred (but not re-resolved).
     assertVariableDeclarationTypes(
@@ -3901,9 +4060,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT10);
-    expect(outputs[RESOLVED_UNIT10], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT10], isTrue);
+    computeResult(target, RESOLVED_UNIT11);
+    expect(outputs[RESOLVED_UNIT11], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT11], isTrue);
   }
 
   void test_perform() {
@@ -3920,9 +4079,9 @@
   }
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT11,
         matcher: isResolveUnitTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT10];
+    CompilationUnit unit = outputs[RESOLVED_UNIT11];
 
     FunctionDeclaration f = unit.declarations[0];
     _assertResolved(f.functionExpression.body);
@@ -3949,10 +4108,10 @@
   a.v.isEven;
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT11,
         matcher: isResolveUnitTask);
     expect(outputs[RESOLVE_UNIT_ERRORS], hasLength(0));
-    CompilationUnit unit = outputs[RESOLVED_UNIT10];
+    CompilationUnit unit = outputs[RESOLVED_UNIT11];
     FunctionDeclaration main = unit.declarations[0];
     BlockFunctionBody body = main.functionExpression.body;
     ExpressionStatement statement = body.block.statements.single;
@@ -3977,9 +4136,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT3);
-    expect(outputs[RESOLVED_UNIT3], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT3], isTrue);
+    computeResult(target, RESOLVED_UNIT4);
+    expect(outputs[RESOLVED_UNIT4], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT4], isTrue);
   }
 
   test_perform() {
@@ -3991,9 +4150,9 @@
 int f(String p) => p.length;
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT3, matcher: isResolveUnitTypeNamesTask);
+    computeResult(target, RESOLVED_UNIT4, matcher: isResolveUnitTypeNamesTask);
     // validate
-    CompilationUnit unit = outputs[RESOLVED_UNIT3];
+    CompilationUnit unit = outputs[RESOLVED_UNIT4];
     {
       ClassDeclaration nodeA = unit.declarations[0];
       ClassDeclaration nodeB = unit.declarations[1];
@@ -4033,9 +4192,9 @@
 typedef String G(int p);
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT3, matcher: isResolveUnitTypeNamesTask);
+    computeResult(target, RESOLVED_UNIT4, matcher: isResolveUnitTypeNamesTask);
     // validate
-    CompilationUnit unit = outputs[RESOLVED_UNIT3];
+    CompilationUnit unit = outputs[RESOLVED_UNIT4];
     FunctionTypeAlias nodeF = unit.declarations[0];
     FunctionTypeAlias nodeG = unit.declarations[1];
     {
@@ -4089,9 +4248,9 @@
 class A {}
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT4);
-    expect(outputs[RESOLVED_UNIT4], isNotNull);
-    expect(outputs[CREATED_RESOLVED_UNIT4], isTrue);
+    computeResult(target, RESOLVED_UNIT5);
+    expect(outputs[RESOLVED_UNIT5], isNotNull);
+    expect(outputs[CREATED_RESOLVED_UNIT5], isTrue);
   }
 
   test_perform_buildClosureLibraryElements() {
@@ -4102,7 +4261,7 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT4,
+    computeResult(target, RESOLVED_UNIT5,
         matcher: isResolveVariableReferencesTask);
   }
 
@@ -4124,10 +4283,10 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT4,
+    computeResult(target, RESOLVED_UNIT5,
         matcher: isResolveVariableReferencesTask);
     // validate
-    CompilationUnit unit = outputs[RESOLVED_UNIT4];
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
     FunctionDeclaration mainDeclaration = unit.declarations[0];
     FunctionBody body = mainDeclaration.functionExpression.body;
     FunctionElement main = mainDeclaration.element;
@@ -4151,10 +4310,10 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT4,
+    computeResult(target, RESOLVED_UNIT5,
         matcher: isResolveVariableReferencesTask);
     // validate
-    CompilationUnit unit = outputs[RESOLVED_UNIT4];
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
     FunctionDeclaration mainDeclaration = unit.declarations[0];
     FunctionBody body = mainDeclaration.functionExpression.body;
     FunctionElement main = mainDeclaration.element;
@@ -4233,8 +4392,8 @@
 var pi = piFirst ? 3.14 : tau / 2;
 var tau = piFirst ? pi * 2 : 6.28;
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10);
-    CompilationUnit unit = outputs[RESOLVED_UNIT10];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT11);
+    CompilationUnit unit = outputs[RESOLVED_UNIT11];
     VariableElement piFirst =
         AstFinder.getTopLevelVariable(unit, 'piFirst').name.staticElement;
     VariableElement pi =
@@ -4276,11 +4435,11 @@
           }
 ''');
     computeResult(
-        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT10);
-    CompilationUnit unit1 = outputs[RESOLVED_UNIT10];
+        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT11);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT11];
     computeResult(
-        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT10);
-    CompilationUnit unit2 = outputs[RESOLVED_UNIT10];
+        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT11);
+    CompilationUnit unit2 = outputs[RESOLVED_UNIT11];
 
     InterfaceType intType = context.typeProvider.intType;
 
@@ -4327,7 +4486,7 @@
     '''
     });
     List<dynamic> units =
-        computeLibraryResults(sources, RESOLVED_UNIT10).toList();
+        computeLibraryResults(sources, RESOLVED_UNIT11).toList();
     CompilationUnit unit0 = units[0];
     CompilationUnit unit1 = units[1];
     CompilationUnit unit2 = units[2];
@@ -4374,7 +4533,7 @@
     '''
     });
     List<dynamic> units =
-        computeLibraryResults(sources, RESOLVED_UNIT10).toList();
+        computeLibraryResults(sources, RESOLVED_UNIT11).toList();
     CompilationUnit unit0 = units[0];
     CompilationUnit unit2 = units[2];
 
@@ -4415,11 +4574,11 @@
           }
 ''');
     computeResult(
-        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT10);
-    CompilationUnit unit1 = outputs[RESOLVED_UNIT10];
+        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT11);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT11];
     computeResult(
-        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT10);
-    CompilationUnit unit2 = outputs[RESOLVED_UNIT10];
+        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT11);
+    CompilationUnit unit2 = outputs[RESOLVED_UNIT11];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -4469,7 +4628,7 @@
     '''
     });
     List<dynamic> units =
-        computeLibraryResults(sources, RESOLVED_UNIT10).toList();
+        computeLibraryResults(sources, RESOLVED_UNIT11).toList();
     CompilationUnit unit0 = units[0];
     CompilationUnit unit1 = units[1];
     CompilationUnit unit2 = units[2];
@@ -4505,8 +4664,8 @@
         y = "hi";
       }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10);
-    CompilationUnit unit = outputs[RESOLVED_UNIT10];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT11);
+    CompilationUnit unit = outputs[RESOLVED_UNIT11];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -4544,8 +4703,8 @@
         final z = 42; // should infer `int`
       }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10);
-    CompilationUnit unit = outputs[RESOLVED_UNIT10];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT11);
+    CompilationUnit unit = outputs[RESOLVED_UNIT11];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -4593,8 +4752,8 @@
       int y = 0; // field def after use
       final z = 42; // should infer `int`
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10);
-    CompilationUnit unit = outputs[RESOLVED_UNIT10];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT11);
+    CompilationUnit unit = outputs[RESOLVED_UNIT11];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -4646,8 +4805,8 @@
         new A().y2 = /*severe:StaticTypeError*/"hi";
       }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10);
-    CompilationUnit unit = outputs[RESOLVED_UNIT10];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT11);
+    CompilationUnit unit = outputs[RESOLVED_UNIT11];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -4688,8 +4847,8 @@
         x = "hi";
       }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT10);
-    CompilationUnit unit = outputs[RESOLVED_UNIT10];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT11);
+    CompilationUnit unit = outputs[RESOLVED_UNIT11];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -4760,10 +4919,9 @@
     AnalysisTarget source = newSource(
         '/test.dart',
         '''
-int topLevel = 3;
-class C {
-  String field = topLevel;
-}
+class A {}
+class B extends A {}
+B b = new A();
 ''');
     computeResult(new LibrarySpecificUnit(source, source), STRONG_MODE_ERRORS);
     // validate
@@ -4794,6 +4952,42 @@
     ]);
   }
 
+  test_perform_ConstantValidator_declaredIdentifier() {
+    Source source = newSource(
+        '/test.dart',
+        '''
+void main() {
+  for (const foo in []) {
+    print(foo);
+  }
+}
+''');
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
+    // validate
+    _fillErrorListener(VERIFY_ERRORS);
+    errorListener.assertNoErrors();
+  }
+
+  test_perform_ConstantValidator_dependencyCycle() {
+    Source source = newSource(
+        '/test.dart',
+        '''
+const int a = b;
+const int b = c;
+const int c = a;
+''');
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
+    // validate
+    _fillErrorListener(VERIFY_ERRORS);
+    errorListener.assertErrorsWithCodes(<ErrorCode>[
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT
+    ]);
+  }
+
   test_perform_ConstantValidator_duplicateFields() {
     Source source = newSource(
         '/test.dart',
@@ -4815,6 +5009,38 @@
     errorListener.assertNoErrors();
   }
 
+  test_perform_ConstantValidator_noInitializer() {
+    Source source = newSource(
+        '/test.dart',
+        '''
+const x;
+''');
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
+    // validate
+    _fillErrorListener(VERIFY_ERRORS);
+    errorListener.assertErrorsWithCodes(
+        <ErrorCode>[CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
+  }
+
+  test_perform_ConstantValidator_unknownValue() {
+    Source source = newSource(
+        '/test.dart',
+        '''
+import 'no-such-file.dart' as p;
+
+const int x = p.y;
+''');
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
+    // validate
+    _fillErrorListener(VERIFY_ERRORS);
+    errorListener.assertErrorsWithCodes(<ErrorCode>[
+      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+      CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+    ]);
+  }
+
   test_perform_directiveError() {
     Source source = newSource(
         '/test.dart',
@@ -4970,7 +5196,7 @@
    * Fill [errorListener] with [result] errors in the current [task].
    */
   void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
-    List<AnalysisError> errors = task.outputs[result];
+    List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>;
     expect(errors, isNotNull, reason: result.name);
     errorListener = new GatheringErrorListener();
     errorListener.addAll(errors);
diff --git a/pkg/analyzer/test/src/task/driver_test.dart b/pkg/analyzer/test/src/task/driver_test.dart
index 221636a..efbf9ee 100644
--- a/pkg/analyzer/test/src/task/driver_test.dart
+++ b/pkg/analyzer/test/src/task/driver_test.dart
@@ -124,6 +124,32 @@
     expect(analysisDriver.createNextWorkOrder(), isNull);
   }
 
+  test_createWorkOrderForResult_aboutToComputeResult() {
+    AnalysisTarget target = new TestSource();
+    ResultDescriptor result = new ResultDescriptor('result', null);
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
+        (context, target) => new TestAnalysisTask(context, target),
+        (target) => {},
+        [result]);
+    taskManager.addTaskDescriptor(descriptor);
+    context.getCacheEntry(target).setState(result, CacheState.INVALID);
+    // has result
+    {
+      when(context.aboutToComputeResult(anyObject, result)).thenReturn(true);
+      WorkOrder workOrder =
+          analysisDriver.createWorkOrderForResult(target, result);
+      expect(workOrder, isNull);
+    }
+    // no result
+    {
+      when(context.aboutToComputeResult(anyObject, result)).thenReturn(false);
+      WorkOrder workOrder =
+          analysisDriver.createWorkOrderForResult(target, result);
+      expect(workOrder, isNotNull);
+    }
+  }
+
   test_createWorkOrderForResult_error() {
     AnalysisTarget target = new TestSource();
     ResultDescriptor result = new ResultDescriptor('result', null);
@@ -215,8 +241,8 @@
 
   test_performAnalysisTask_infiniteLoop_handled() {
     AnalysisTarget target = new TestSource();
-    ResultDescriptor resultA = new ResultDescriptor('resultA', -1);
-    ResultDescriptor resultB = new ResultDescriptor('resultB', -2);
+    ResultDescriptor<int> resultA = new ResultDescriptor<int>('resultA', -1);
+    ResultDescriptor<int> resultB = new ResultDescriptor<int>('resultB', -2);
     // configure tasks
     TestAnalysisTask task1;
     TestAnalysisTask task2;
@@ -264,8 +290,8 @@
 
   test_performAnalysisTask_infiniteLoop_unhandled() {
     AnalysisTarget target = new TestSource();
-    ResultDescriptor resultA = new ResultDescriptor('resultA', -1);
-    ResultDescriptor resultB = new ResultDescriptor('resultB', -2);
+    ResultDescriptor<int> resultA = new ResultDescriptor<int>('resultA', -1);
+    ResultDescriptor<int> resultB = new ResultDescriptor<int>('resultB', -2);
     // configure tasks
     TestAnalysisTask task1;
     TestAnalysisTask task2;
@@ -298,8 +324,8 @@
 
   test_performAnalysisTask_inputsFirst() {
     AnalysisTarget target = new TestSource();
-    ResultDescriptor resultA = new ResultDescriptor('resultA', -1);
-    ResultDescriptor resultB = new ResultDescriptor('resultB', -2);
+    ResultDescriptor<int> resultA = new ResultDescriptor<int>('resultA', -1);
+    ResultDescriptor<int> resultB = new ResultDescriptor<int>('resultB', -2);
     // configure tasks
     TestAnalysisTask task1;
     TestAnalysisTask task2;
@@ -649,57 +675,6 @@
     expect(item.target, target);
   }
 
-  test_gatherInputs_complete() {
-    AnalysisTarget target = new TestSource();
-    TaskDescriptor descriptor = new TaskDescriptor(
-        'task',
-        (context, target) => new TestAnalysisTask(context, target),
-        (target) => {},
-        [new ResultDescriptor('output', null)]);
-    WorkItem item = new WorkItem(context, target, descriptor, null, 0, null);
-    WorkItem result = item.gatherInputs(taskManager, []);
-    expect(result, isNull);
-    expect(item.exception, isNull);
-  }
-
-  test_gatherInputs_incomplete() {
-    AnalysisTarget target = new TestSource();
-    ResultDescriptor resultA = new ResultDescriptor('resultA', null);
-    ResultDescriptor resultB = new ResultDescriptor('resultB', null);
-    // prepare tasks
-    TaskDescriptor task1 = new TaskDescriptor(
-        'task',
-        (context, target) =>
-            new TestAnalysisTask(context, target, results: [resultA]),
-        (target) => {},
-        [resultA]);
-    TaskDescriptor task2 = new TaskDescriptor(
-        'task',
-        (context, target) => new TestAnalysisTask(context, target),
-        (target) => {'one': resultA.of(target)},
-        [resultB]);
-    taskManager.addTaskDescriptor(task1);
-    taskManager.addTaskDescriptor(task2);
-    // gather inputs
-    WorkItem item = new WorkItem(context, target, task2, null, 0, null);
-    WorkItem inputItem = item.gatherInputs(taskManager, []);
-    expect(inputItem, isNotNull);
-  }
-
-  test_gatherInputs_invalid() {
-    AnalysisTarget target = new TestSource();
-    ResultDescriptor inputResult = new ResultDescriptor('input', null);
-    TaskDescriptor descriptor = new TaskDescriptor(
-        'task',
-        (context, target) => new TestAnalysisTask(context, target),
-        (target) => {'one': inputResult.of(target)},
-        [new ResultDescriptor('output', null)]);
-    WorkItem item = new WorkItem(context, target, descriptor, null, 0, null);
-    WorkItem result = item.gatherInputs(taskManager, []);
-    expect(result, isNull);
-    expect(item.exception, isNotNull);
-  }
-
   test_gatherInputs_aboutToComputeResult_hasResult() {
     AnalysisTarget target = new TestSource();
     ResultDescriptor resultA = new ResultDescriptor('resultA', null);
@@ -754,6 +729,57 @@
     expect(inputItem.target, target);
     expect(inputItem.descriptor, task1);
   }
+
+  test_gatherInputs_complete() {
+    AnalysisTarget target = new TestSource();
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
+        (context, target) => new TestAnalysisTask(context, target),
+        (target) => {},
+        [new ResultDescriptor('output', null)]);
+    WorkItem item = new WorkItem(context, target, descriptor, null, 0, null);
+    WorkItem result = item.gatherInputs(taskManager, []);
+    expect(result, isNull);
+    expect(item.exception, isNull);
+  }
+
+  test_gatherInputs_incomplete() {
+    AnalysisTarget target = new TestSource();
+    ResultDescriptor resultA = new ResultDescriptor('resultA', null);
+    ResultDescriptor resultB = new ResultDescriptor('resultB', null);
+    // prepare tasks
+    TaskDescriptor task1 = new TaskDescriptor(
+        'task',
+        (context, target) =>
+            new TestAnalysisTask(context, target, results: [resultA]),
+        (target) => {},
+        [resultA]);
+    TaskDescriptor task2 = new TaskDescriptor(
+        'task',
+        (context, target) => new TestAnalysisTask(context, target),
+        (target) => {'one': resultA.of(target)},
+        [resultB]);
+    taskManager.addTaskDescriptor(task1);
+    taskManager.addTaskDescriptor(task2);
+    // gather inputs
+    WorkItem item = new WorkItem(context, target, task2, null, 0, null);
+    WorkItem inputItem = item.gatherInputs(taskManager, []);
+    expect(inputItem, isNotNull);
+  }
+
+  test_gatherInputs_invalid() {
+    AnalysisTarget target = new TestSource();
+    ResultDescriptor inputResult = new ResultDescriptor('input', null);
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
+        (context, target) => new TestAnalysisTask(context, target),
+        (target) => {'one': inputResult.of(target)},
+        [new ResultDescriptor('output', null)]);
+    WorkItem item = new WorkItem(context, target, descriptor, null, 0, null);
+    WorkItem result = item.gatherInputs(taskManager, []);
+    expect(result, isNull);
+    expect(item.exception, isNotNull);
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/src/task/inputs_test.dart b/pkg/analyzer/test/src/task/inputs_test.dart
index be97598..509c296 100644
--- a/pkg/analyzer/test/src/task/inputs_test.dart
+++ b/pkg/analyzer/test/src/task/inputs_test.dart
@@ -141,7 +141,8 @@
 
   test_toList() {
     var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
-    TaskInput<List> input2 = input.toList((target) => 'name');
+    TaskInput<List> input2 =
+        input.toList((target) => new SimpleTaskInput(target, null));
     expect(input2,
         new isInstanceOf<ListToListTaskInput<AnalysisTarget, String>>());
   }
@@ -155,7 +156,8 @@
 
   test_toMap() {
     var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
-    TaskInput<Map> input2 = input.toMap((target) => 'name');
+    TaskInput<Map> input2 =
+        input.toMap((target) => new SimpleTaskInput(target, null));
     expect(
         input2, new isInstanceOf<ListToMapTaskInput<AnalysisTarget, String>>());
   }
@@ -170,8 +172,8 @@
 @reflectiveTest
 class ListToListTaskInputBuilderTest extends EngineTestCase {
   static final AnalysisTarget target1 = new TestSource();
-  static final ResultDescriptorImpl result1 =
-      new ResultDescriptorImpl('result1', null);
+  static final ResultDescriptorImpl<List> result1 =
+      new ResultDescriptorImpl<List>('result1', null);
   static final ResultDescriptorImpl result2 =
       new ResultDescriptorImpl('result2', null);
   static final ListToListTaskInput input = new ListToListTaskInput(
@@ -342,11 +344,11 @@
 @reflectiveTest
 class ListToListTaskInputTest extends EngineTestCase {
   static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl result =
-      new ResultDescriptorImpl('result', null);
+  static final ResultDescriptorImpl<List> result =
+      new ResultDescriptorImpl<List>('result', null);
 
   test_create() {
-    SimpleTaskInput baseAccessor = result.of(target);
+    SimpleTaskInput<List> baseAccessor = result.of(target);
     GenerateTaskInputs generate = (object) {};
     ListToListTaskInput input = new ListToListTaskInput(baseAccessor, generate);
     expect(input, isNotNull);
@@ -355,7 +357,7 @@
   }
 
   test_createBuilder() {
-    SimpleTaskInput baseAccessor = result.of(target);
+    SimpleTaskInput<List> baseAccessor = result.of(target);
     GenerateTaskInputs generate = (object) {};
     ListToListTaskInput input = new ListToListTaskInput(baseAccessor, generate);
     expect(input.createBuilder(), isNotNull);
@@ -365,8 +367,8 @@
 @reflectiveTest
 class ListToMapTaskInputBuilderTest extends EngineTestCase {
   static final AnalysisTarget target1 = new TestSource('target1');
-  static final ResultDescriptorImpl result1 =
-      new ResultDescriptorImpl('result1', null);
+  static final ResultDescriptorImpl<List> result1 =
+      new ResultDescriptorImpl<List>('result1', null);
   static final ResultDescriptorImpl result2 =
       new ResultDescriptorImpl('result2', null);
   static final ListToMapTaskInput input = new ListToMapTaskInput(
@@ -535,11 +537,11 @@
 @reflectiveTest
 class ListToMapTaskInputTest extends EngineTestCase {
   static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl result =
-      new ResultDescriptorImpl('result', null);
+  static final ResultDescriptorImpl<List> result =
+      new ResultDescriptorImpl<List>('result', null);
 
   test_create() {
-    SimpleTaskInput baseAccessor = result.of(target);
+    SimpleTaskInput<List> baseAccessor = result.of(target);
     GenerateTaskInputs generate = (object) {};
     ListToMapTaskInput input = new ListToMapTaskInput(baseAccessor, generate);
     expect(input, isNotNull);
@@ -548,7 +550,7 @@
   }
 
   test_createBuilder() {
-    SimpleTaskInput baseAccessor = result.of(target);
+    SimpleTaskInput<List> baseAccessor = result.of(target);
     GenerateTaskInputs generate = (object) {};
     ListToMapTaskInput input = new ListToMapTaskInput(baseAccessor, generate);
     expect(input.createBuilder(), isNotNull);
@@ -561,7 +563,7 @@
   static final ResultDescriptorImpl result =
       new ResultDescriptorImpl('result', null);
   static final SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
-  static final Function mapper = (x) => [x];
+  static final mapper = (Object x) => [x];
   static final ObjectToListTaskInput input =
       new ObjectToListTaskInput(baseInput, mapper);
 
@@ -689,7 +691,7 @@
 
   test_create() {
     SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
-    Function mapper = (x) => [x];
+    var mapper = (Object x) => [x];
     ObjectToListTaskInput input = new ObjectToListTaskInput(baseInput, mapper);
     expect(input, isNotNull);
     expect(input.baseInput, baseInput);
@@ -698,7 +700,7 @@
 
   test_createBuilder() {
     SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
-    Function mapper = (x) => [x];
+    var mapper = (Object x) => [x];
     ObjectToListTaskInput input = new ObjectToListTaskInput(baseInput, mapper);
     expect(input.createBuilder(),
         new isInstanceOf<ObjectToListTaskInputBuilder>());
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index 105ed8b..05c5713 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -67,6 +67,16 @@
     expect(analysisOptions.enableAsync, false);
   }
 
+  test_configure_enableConditionalDirectives() {
+    expect(analysisOptions.enableConditionalDirectives, true);
+    configureContext('''
+analyzer:
+  language:
+    enableConditionalDirectives: true
+''');
+    expect(analysisOptions.enableConditionalDirectives, true);
+  }
+
   test_configure_enableGenericMethods() {
     expect(analysisOptions.enableGenericMethods, false);
     configureContext('''
@@ -77,14 +87,13 @@
     expect(analysisOptions.enableGenericMethods, true);
   }
 
-  test_configure_enableConditionalDirectives() {
-    expect(analysisOptions.enableConditionalDirectives, false);
+  test_configure_enableStrictCallChecks() {
     configureContext('''
 analyzer:
   language:
-    enableConditionalDirectives: true
+    enableStrictCallChecks: true
 ''');
-    expect(analysisOptions.enableConditionalDirectives, true);
+    expect(analysisOptions.enableStrictCallChecks, true);
   }
 
   test_configure_enableSuperMixins() {
@@ -105,7 +114,8 @@
 ''');
 
     List<ErrorProcessor> processors =
-        context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
+        context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS)
+        as List<ErrorProcessor>;
     expect(processors, hasLength(2));
 
     var unused_local = new AnalysisError(
@@ -213,7 +223,8 @@
     AnalysisTarget target = newSource(optionsFilePath, code);
     computeResult(target, ANALYSIS_OPTIONS_ERRORS);
     expect(task, isGenerateOptionsErrorsTask);
-    List<AnalysisError> errors = outputs[ANALYSIS_OPTIONS_ERRORS];
+    List<AnalysisError> errors =
+        outputs[ANALYSIS_OPTIONS_ERRORS] as List<AnalysisError>;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, AnalysisOptionsErrorCode.PARSE_ERROR);
   }
@@ -241,7 +252,8 @@
     AnalysisTarget target = newSource(optionsFilePath, code);
     computeResult(target, ANALYSIS_OPTIONS_ERRORS);
     expect(task, isGenerateOptionsErrorsTask);
-    List<AnalysisError> errors = outputs[ANALYSIS_OPTIONS_ERRORS];
+    List<AnalysisError> errors =
+        outputs[ANALYSIS_OPTIONS_ERRORS] as List<AnalysisError>;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode,
         AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES);
@@ -387,7 +399,7 @@
         [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE]);
   }
 
-  void validate(String source, List<AnalysisOptionsErrorCode> expected) {
+  void validate(String source, List<ErrorCode> expected) {
     var options = optionsProvider.getOptionsFromString(source);
     var errors = validator.validate(options);
     expect(errors.map((AnalysisError e) => e.errorCode),
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index a87577c..cff8782 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -28,16 +28,22 @@
           Comparator<K> _comparator;
           _Predicate _validKey;
 
-          // TODO(rnystrom): Initializing _comparator should have a cast, since
-          // K may not always be Comparable. It doesn't currently get one
-          // because we're using the spec's LUB on function types, which isn't
-          // sound.
+          // The warning on assigning to _comparator is legitimate. Since K has
+          // no bound, all we know is that it's object. _comparator's function
+          // type is effectively:              (Object, Object) -> int
+          // We are assigning it a fn of type: (Comparable, Comparable) -> int
+          // There's no telling if that will work. For example, consider:
+          //
+          //     new SplayTreeMap<Uri>();
+          //
+          // This would end up calling .compareTo() on a Uri, which doesn't
+          // define that since it doesn't implement Comparable.
           SplayTreeMap([int compare(K key1, K key2),
                         bool isValidKey(potentialKey)])
-            : _comparator = (compare == null) ? Comparable.compare : compare,
+            : _comparator = /*warning:DOWN_CAST_COMPOSITE*/(compare == null) ? Comparable.compare : compare,
               _validKey = (isValidKey != null) ? isValidKey : ((v) => true) {
-            _Predicate<Object> v = /*warning:DOWN_CAST_COMPOSITE*/(isValidKey != null)
-                                    ? isValidKey : (/*info:INFERRED_TYPE_CLOSURE*/(_) => true);
+            _Predicate<Object> v = (isValidKey != null)
+                ? isValidKey : (/*info:INFERRED_TYPE_CLOSURE*/(_) => true);
 
             v = (isValidKey != null)
                  ? v : (/*info:INFERRED_TYPE_CLOSURE*/(_) => true);
@@ -49,13 +55,80 @@
           int i = 42;
 
           // Check the boolean conversion of the condition.
-          print((/*severe:STATIC_TYPE_ERROR*/i) ? false : true);
+          print(/*warning:NON_BOOL_CONDITION*/i ? false : true);
           print((/*info:DOWN_CAST_IMPLICIT*/obj) ? false : true);
           print((/*info:DYNAMIC_CAST*/dyn) ? false : true);
         }
       ''');
   });
 
+  test('least upper bounds', () {
+    checkFile('''
+      typedef T Returns<T>();
+
+      // regression test for https://github.com/dart-lang/sdk/issues/26094
+      class A <S extends  Returns<S>, T extends Returns<T>> {
+        int test(bool b) {
+          S s;
+          T t;
+          if (b) {
+            return /*warning:RETURN_OF_INVALID_TYPE*/b ? s : t;
+          } else {
+            return /*warning:RETURN_OF_INVALID_TYPE*/s ?? t;
+          }
+        }
+      }
+
+      class B<S, T extends S> {
+        T t;
+        S s;
+        int test(bool b) {
+          return /*warning:RETURN_OF_INVALID_TYPE*/b ? t : s;
+        }
+      }
+
+      class C {
+        // Check that the least upper bound of two types with the same
+        // class but different type arguments produces the pointwise
+        // least upper bound of the type arguments
+        int test1(bool b) {
+          List<int> li;
+          List<double> ld;
+          return /*warning:RETURN_OF_INVALID_TYPE*/b ? li : ld;
+        }
+        // TODO(leafp): This case isn't handled yet.  This test checks
+        // the case where two related classes are instantiated with related
+        // but different types.
+        Iterable<num> test2(bool b) {
+          List<int> li;
+          Iterable<double> id;
+          int x =
+              /*info:ASSIGNMENT_CAST should be warning:INVALID_ASSIGNMENT*/
+              b ? li : id;
+          return /*warning:DOWN_CAST_COMPOSITE should be pass*/b ? li : id;
+        }
+      }
+      ''');
+  });
+
+  test('setter return types', () {
+    checkFile('''
+      void voidFn() => null;
+      class A {
+        set a(y) => 4;
+        set b(y) => voidFn();
+        void set c(y) => /*warning:RETURN_OF_INVALID_TYPE*/4;
+        void set d(y) => voidFn();
+        /*warning:NON_VOID_RETURN_FOR_SETTER*/int set e(y) => 4;
+        /*warning:NON_VOID_RETURN_FOR_SETTER*/int set f(y) =>
+            /*warning:RETURN_OF_INVALID_TYPE*/voidFn();
+        set g(y) {return /*warning:RETURN_OF_INVALID_TYPE*/4;}
+        void set h(y) {return /*warning:RETURN_OF_INVALID_TYPE*/4;}
+        /*warning:NON_VOID_RETURN_FOR_SETTER*/int set i(y) {return 4;}
+      }
+    ''');
+  });
+
   test('if/for/do/while statements use boolean conversion', () {
     checkFile('''
       main() {
@@ -67,29 +140,95 @@
         if (b) {}
         if (/*info:DYNAMIC_CAST*/dyn) {}
         if (/*info:DOWN_CAST_IMPLICIT*/obj) {}
-        if (/*severe:STATIC_TYPE_ERROR*/i) {}
+        if (/*warning:NON_BOOL_CONDITION*/i) {}
 
         while (b) {}
         while (/*info:DYNAMIC_CAST*/dyn) {}
         while (/*info:DOWN_CAST_IMPLICIT*/obj) {}
-        while (/*severe:STATIC_TYPE_ERROR*/i) {}
+        while (/*warning:NON_BOOL_CONDITION*/i) {}
 
         do {} while (b);
         do {} while (/*info:DYNAMIC_CAST*/dyn);
         do {} while (/*info:DOWN_CAST_IMPLICIT*/obj);
-        do {} while (/*severe:STATIC_TYPE_ERROR*/i);
+        do {} while (/*warning:NON_BOOL_CONDITION*/i);
 
         for (;b;) {}
         for (;/*info:DYNAMIC_CAST*/dyn;) {}
         for (;/*info:DOWN_CAST_IMPLICIT*/obj;) {}
-        for (;/*severe:STATIC_TYPE_ERROR*/i;) {}
+        for (;/*warning:NON_BOOL_CONDITION*/i;) {}
+      }
+    ''');
+  });
+
+  test('for-in casts supertype sequence to iterable', () {
+    checkFile('''
+      main() {
+        dynamic d;
+        for (var i in /*info:DYNAMIC_CAST*/d) {}
+
+        Object o;
+        for (var i in /*info:DOWN_CAST_IMPLICIT*/o) {}
+      }
+    ''');
+  });
+
+  test('await for-in casts supertype sequence to stream', () {
+    checkFile('''
+      main() async {
+        dynamic d;
+        await for (var i in /*info:DYNAMIC_CAST*/d) {}
+
+        Object o;
+        await for (var i in /*info:DOWN_CAST_IMPLICIT*/o) {}
+      }
+    ''');
+  });
+
+  test('for-in casts iterable element to variable', () {
+    checkFile('''
+      main() {
+        // Don't choke if sequence is not iterable.
+        for (var i in /*warning:FOR_IN_OF_INVALID_TYPE*/1234) {}
+
+        // Dynamic cast.
+        for (String /*info:DYNAMIC_CAST*/s in <dynamic>[]) {}
+
+        // Identity cast.
+        for (String s in <String>[]) {}
+
+        // Untyped.
+        for (var s in <String>[]) {}
+
+        // Downcast.
+        for (int /*info:DOWN_CAST_IMPLICIT*/i in <num>[]) {}
+      }
+    ''');
+  });
+
+  test('await for-in casts stream element to variable', () {
+    checkFile('''
+      import 'dart:async';
+      main() async {
+        // Don't choke if sequence is not stream.
+        await for (var i in /*warning:FOR_IN_OF_INVALID_TYPE*/1234) {}
+
+        // Dynamic cast.
+        await for (String /*info:DYNAMIC_CAST*/s in new Stream<dynamic>()) {}
+
+        // Identity cast.
+        await for (String s in new Stream<String>()) {}
+
+        // Untyped.
+        await for (var s in new Stream<String>()) {}
+
+        // Downcast.
+        await for (int /*info:DOWN_CAST_IMPLICIT*/i in new Stream<num>()) {}
       }
     ''');
   });
 
   test('dynamic invocation', () {
     checkFile('''
-
       class A {
         dynamic call(dynamic x) => x;
       }
@@ -103,22 +242,24 @@
           int x;
           double y;
           x = f(3);
-          x = /*severe:STATIC_TYPE_ERROR*/f.col(3.0);
-          y = /*severe:STATIC_TYPE_ERROR*/f(3);
+          x = /*warning:INVALID_ASSIGNMENT*/f.col(3.0);
+          y = /*warning:INVALID_ASSIGNMENT*/f(3);
           y = f.col(3.0);
-          f(/*severe:STATIC_TYPE_ERROR*/3.0);
-          f.col(/*severe:STATIC_TYPE_ERROR*/3);
+          f(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3.0);
+          f.col(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
         }
         {
           Function f = new B();
           int x;
           double y;
           x = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f(3);
-          x = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f.col(3.0);
+          x = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE, info:INVALID_ASSIGNMENT*/f.col(3.0);
           y = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f(3);
           y = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f.col(3.0);
-          (/*info:DYNAMIC_INVOKE*/f(3.0));
-          (/*info:DYNAMIC_INVOKE*/f.col(3));
+          /*info:DYNAMIC_INVOKE*/f(3.0);
+          // Through type propagation, we know f is actually a B, hence the
+          // hint.
+          /*info:DYNAMIC_INVOKE*/f.col(/*info:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
         }
         {
           A f = new B();
@@ -126,19 +267,19 @@
           double y;
           x = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f(3);
           y = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f(3);
-          (/*info:DYNAMIC_INVOKE*/f(3.0));
+          /*info:DYNAMIC_INVOKE*/f(3.0);
         }
         {
           dynamic g = new B();
-          (/*info:DYNAMIC_INVOKE*/g.call(32.0));
-          (/*info:DYNAMIC_INVOKE*/g.col(42.0));
-          (/*info:DYNAMIC_INVOKE*/g.foo(42.0));
-          (/*info:DYNAMIC_INVOKE*/g./*info:UNDEFINED_GETTER*/x);
+          /*info:DYNAMIC_INVOKE*/g.call(/*info:ARGUMENT_TYPE_NOT_ASSIGNABLE*/32.0);
+          /*info:DYNAMIC_INVOKE*/g.col(42.0);
+          /*info:DYNAMIC_INVOKE*/g.foo(42.0);
+          /*info:DYNAMIC_INVOKE*/g./*info:UNDEFINED_GETTER*/x;
           A f = new B();
-          f.call(32.0);
-          (/*info:DYNAMIC_INVOKE*/f.col(42.0));
-          (/*info:DYNAMIC_INVOKE*/f.foo(42.0));
-          (/*info:DYNAMIC_INVOKE*/f./*warning:UNDEFINED_GETTER*/x);
+          f.call(/*info:ARGUMENT_TYPE_NOT_ASSIGNABLE*/32.0);
+          /*info:DYNAMIC_INVOKE*/f.col(42.0);
+          /*info:DYNAMIC_INVOKE*/f.foo(42.0);
+          /*info:DYNAMIC_INVOKE*/f./*warning:UNDEFINED_GETTER*/x;
         }
       }
     ''');
@@ -157,7 +298,7 @@
       class A {
         String x = "hello world";
 
-        void baz1(y) => x + /*info:DYNAMIC_CAST*/y;
+        void baz1(y) { x + /*info:DYNAMIC_CAST*/y; }
         static baz2(y) => /*info:DYNAMIC_INVOKE*/y + y;
       }
 
@@ -235,7 +376,7 @@
         int x;
         String y;
 
-        A(this.x) : this.y = /*severe:STATIC_TYPE_ERROR*/42;
+        A(this.x) : this.y = /*warning:FIELD_INITIALIZER_NOT_ASSIGNABLE*/42;
 
         A.c1(p): this.x = /*info:DOWN_CAST_IMPLICIT*/z, this.y = /*info:DYNAMIC_CAST*/p;
 
@@ -245,17 +386,17 @@
       }
 
       class B extends A {
-        B() : super(/*severe:STATIC_TYPE_ERROR*/"hello");
+        B() : super(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello");
 
-        B.c2(int x, String y) : super.c2(/*severe:STATIC_TYPE_ERROR*/y,
-                                         /*severe:STATIC_TYPE_ERROR*/x);
+        B.c2(int x, String y) : super.c2(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/y,
+                                         /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/x);
 
         B.c3(num x, Object y) : super.c3(x, /*info:DOWN_CAST_IMPLICIT*/y);
       }
 
       void main() {
-         A a = new A.c2(/*info:DOWN_CAST_IMPLICIT*/z, /*severe:STATIC_TYPE_ERROR*/z);
-         var b = new B.c2(/*severe:STATIC_TYPE_ERROR*/"hello", /*info:DOWN_CAST_IMPLICIT*/obj);
+         A a = new A.c2(/*info:DOWN_CAST_IMPLICIT*/z, /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/z);
+         var b = new B.c2(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello", /*info:DOWN_CAST_IMPLICIT*/obj);
       }
    ''');
   });
@@ -282,7 +423,7 @@
       typedef int Foo();
       void foo() {}
       void main () {
-        Foo x = /*severe:STATIC_TYPE_ERROR*/foo();
+        Foo x = /*warning:INVALID_ASSIGNMENT,info:USE_OF_VOID_RESULT*/foo();
       }
    ''');
   });
@@ -352,9 +493,9 @@
          B b;
          y = a;
          o = a;
-         i = /*severe:STATIC_TYPE_ERROR*/a;
-         d = /*severe:STATIC_TYPE_ERROR*/a;
-         n = /*severe:STATIC_TYPE_ERROR*/a;
+         i = /*warning:INVALID_ASSIGNMENT*/a;
+         d = /*warning:INVALID_ASSIGNMENT*/a;
+         n = /*warning:INVALID_ASSIGNMENT*/a;
          a = a;
          b = /*info:DOWN_CAST_IMPLICIT*/a;
       }
@@ -379,12 +520,12 @@
          C c;
          y = b;
          o = b;
-         i = /*severe:STATIC_TYPE_ERROR*/b;
-         d = /*severe:STATIC_TYPE_ERROR*/b;
-         n = /*severe:STATIC_TYPE_ERROR*/b;
+         i = /*warning:INVALID_ASSIGNMENT*/b;
+         d = /*warning:INVALID_ASSIGNMENT*/b;
+         n = /*warning:INVALID_ASSIGNMENT*/b;
          a = b;
          b = b;
-         c = /*severe:STATIC_TYPE_ERROR*/b;
+         c = /*warning:INVALID_ASSIGNMENT*/b;
       }
    ''');
     });
@@ -411,12 +552,12 @@
          {
            left = /*info:DOWN_CAST_IMPLICIT*/top;
            left = left;
-           left = /*severe:STATIC_TYPE_ERROR*/right;
+           left = /*warning:INVALID_ASSIGNMENT*/right;
            left = bot;
          }
          {
            right = /*info:DOWN_CAST_IMPLICIT*/top;
-           right = /*severe:STATIC_TYPE_ERROR*/left;
+           right = /*warning:INVALID_ASSIGNMENT*/left;
            right = right;
            right = bot;
          }
@@ -444,7 +585,7 @@
       Object globalTop(int x) => x;
       int globalLeft(int x) => x;
       Object globalRight(Object x) => x;
-      int _bot(Object x) => /*info:DOWN_CAST_IMPLICIT*/x;
+      int bot_(Object x) => /*info:DOWN_CAST_IMPLICIT*/x;
       int globalBot(Object x) => x as int;
 
       void main() {
@@ -504,7 +645,7 @@
       typedef B Bot(A x);   // Bottom of the lattice
 
       B left(B x) => x;
-      B _bot(A x) => /*info:DOWN_CAST_IMPLICIT*/x;
+      B bot_(A x) => /*info:DOWN_CAST_IMPLICIT*/x;
       B bot(A x) => x as B;
       A top(B x) => x;
       A right(A x) => x;
@@ -593,8 +734,24 @@
    ''');
     });
 
-    test('dynamic - known functions', () {
+    test('dynamic functions - closures are not fuzzy', () {
+      // Regression test for
+      // https://github.com/dart-lang/sdk/issues/26118
+      checkFile('''
+        void test1() {
+          void takesF(f(int x)) => null;
+          takesF((dynamic y) => 3);
+        }
 
+        void test2() {
+          int x;
+          int f/*<T>*/(/*=T*/ t, callback(/*=T*/ x)) { return 3; }
+          f(x, (y) => 3);
+        }
+     ''');
+    });
+
+    test('dynamic - known functions', () {
       // Our lattice should look like this:
       //
       //
@@ -606,6 +763,10 @@
       //         \      /
       //         Top -> A
       //
+      // Note that downcasts of known functions are promoted to
+      // static type errors, since they cannot succeed.
+      // This makes some of what look like downcasts turn into
+      // type errors below.
       checkFile('''
         class A {}
 
@@ -620,51 +781,160 @@
         A aa(A x) => x;
         dynamic topTop(dynamic x) => x;
         A topA(dynamic x) => /*info:DYNAMIC_CAST*/x;
-
+        void apply/*<T>*/(/*=T*/ f0, /*=T*/ f1, /*=T*/ f2,
+                          /*=T*/ f3, /*=T*/ f4, /*=T*/ f5) {}
         void main() {
           BotTop botTop;
           BotA botA;
           {
             BotTop f;
-            f = topTop;
-            f = aTop;
             f = topA;
+            f = topTop;
             f = aa;
+            f = aTop;
+            f = botA;
+            f = botTop;
+            apply/*<BotTop>*/(
+                topA,
+                topTop,
+                aa,
+                aTop,
+                botA,
+                botTop
+                              );
+            apply/*<BotTop>*/(
+                (dynamic x) => new A(),
+                (dynamic x) => (x as Object),
+                (A x) => x,
+                (A x) => null,
+                botA,
+                botTop
+                              );
           }
           {
             ATop f;
-            f = topTop;
-            f = aTop;
             f = topA;
+            f = topTop;
             f = aa;
+            f = aTop;
+            f = /*warning:DOWN_CAST_COMPOSITE should be severe:STATIC_TYPE_ERROR*/botA;
+            f = /*warning:DOWN_CAST_COMPOSITE*/botTop;
+            apply/*<ATop>*/(
+                topA,
+                topTop,
+                aa,
+                aTop,
+                /*warning:DOWN_CAST_COMPOSITE should be severe:STATIC_TYPE_ERROR*/botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                            );
+            apply/*<ATop>*/(
+                (dynamic x) => new A(),
+                (dynamic x) => (x as Object),
+                (A x) => x,
+                (A x) => null,
+                /*warning:DOWN_CAST_COMPOSITE should be severe:STATIC_TYPE_ERROR*/botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                            );
           }
           {
             BotA f;
-            f = /*severe:STATIC_TYPE_ERROR*/topTop;
-            f = /*severe:STATIC_TYPE_ERROR*/aTop;
             f = topA;
+            f = /*severe:STATIC_TYPE_ERROR*/topTop;
             f = aa;
+            f = /*severe:STATIC_TYPE_ERROR*/aTop;
+            f = botA;
+            f = /*warning:DOWN_CAST_COMPOSITE*/botTop;
+            apply/*<BotA>*/(
+                topA,
+                /*severe:STATIC_TYPE_ERROR*/topTop,
+                aa,
+                /*severe:STATIC_TYPE_ERROR*/aTop,
+                botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                            );
+            apply/*<BotA>*/(
+                (dynamic x) => new A(),
+                /*severe:STATIC_TYPE_ERROR*/(dynamic x) => (x as Object),
+                (A x) => x,
+                /*severe:STATIC_TYPE_ERROR*/(A x) => (x as Object),
+                botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                            );
           }
           {
             AA f;
-            f = /*severe:STATIC_TYPE_ERROR*/topTop;
-            f = /*severe:STATIC_TYPE_ERROR*/aTop;
             f = topA;
+            f = /*severe:STATIC_TYPE_ERROR*/topTop;
             f = aa;
+            f = /*severe:STATIC_TYPE_ERROR*/aTop; // known function
+            f = /*warning:DOWN_CAST_COMPOSITE*/botA;
+            f = /*warning:DOWN_CAST_COMPOSITE*/botTop;
+            apply/*<AA>*/(
+                topA,
+                /*severe:STATIC_TYPE_ERROR*/topTop,
+                aa,
+                /*severe:STATIC_TYPE_ERROR*/aTop, // known function
+                /*warning:DOWN_CAST_COMPOSITE*/botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                          );
+            apply/*<AA>*/(
+                (dynamic x) => new A(),
+                /*severe:STATIC_TYPE_ERROR*/(dynamic x) => (x as Object),
+                (A x) => x,
+                /*severe:STATIC_TYPE_ERROR*/(A x) => (x as Object), // known function
+                /*warning:DOWN_CAST_COMPOSITE*/botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                          );
           }
           {
             TopTop f;
-            f = topTop;
-            f = /*severe:STATIC_TYPE_ERROR*/aTop;
             f = topA;
+            f = topTop;
             f = /*severe:STATIC_TYPE_ERROR*/aa;
+            f = /*severe:STATIC_TYPE_ERROR*/aTop; // known function
+            f = /*warning:DOWN_CAST_COMPOSITE should be severe:STATIC_TYPE_ERROR*/botA;
+            f = /*warning:DOWN_CAST_COMPOSITE*/botTop;
+            apply/*<TopTop>*/(
+                topA,
+                topTop,
+                /*severe:STATIC_TYPE_ERROR*/aa,
+                /*severe:STATIC_TYPE_ERROR*/aTop, // known function
+                /*warning:DOWN_CAST_COMPOSITE should be severe:STATIC_TYPE_ERROR*/botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                              );
+            apply/*<TopTop>*/(
+                (dynamic x) => new A(),
+                (dynamic x) => (x as Object),
+                /*severe:STATIC_TYPE_ERROR*/(A x) => x,
+                /*severe:STATIC_TYPE_ERROR*/(A x) => (x as Object), // known function
+                /*warning:DOWN_CAST_COMPOSITE should be severe:STATIC_TYPE_ERROR*/botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                              );
           }
           {
             TopA f;
-            f = /*severe:STATIC_TYPE_ERROR*/topTop;
-            f = /*severe:STATIC_TYPE_ERROR*/aTop;
             f = topA;
-            f = /*severe:STATIC_TYPE_ERROR*/aa;
+            f = /*severe:STATIC_TYPE_ERROR*/topTop; // known function
+            f = /*severe:STATIC_TYPE_ERROR*/aa; // known function
+            f = /*severe:STATIC_TYPE_ERROR*/aTop; // known function
+            f = /*warning:DOWN_CAST_COMPOSITE*/botA;
+            f = /*warning:DOWN_CAST_COMPOSITE*/botTop;
+            apply/*<TopA>*/(
+                topA,
+                /*severe:STATIC_TYPE_ERROR*/topTop, // known function
+                /*severe:STATIC_TYPE_ERROR*/aa, // known function
+                /*severe:STATIC_TYPE_ERROR*/aTop, // known function
+                /*warning:DOWN_CAST_COMPOSITE*/botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                            );
+            apply/*<TopA>*/(
+                (dynamic x) => new A(),
+                /*severe:STATIC_TYPE_ERROR*/(dynamic x) => (x as Object), // known function
+                /*severe:STATIC_TYPE_ERROR*/(A x) => x, // known function
+                /*severe:STATIC_TYPE_ERROR*/(A x) => (x as Object), // known function
+                /*warning:DOWN_CAST_COMPOSITE*/botA,
+                /*warning:DOWN_CAST_COMPOSITE*/botTop
+                            );
           }
         }
      ''');
@@ -866,7 +1136,7 @@
       BToA top(AToB f) => f;
       AToB left(AToB f) => f;
       BToA right(BToA f) => f;
-      AToB _bot(BToA f) => /*warning:DOWN_CAST_COMPOSITE*/f;
+      AToB bot_(BToA f) => /*warning:DOWN_CAST_COMPOSITE*/f;
       AToB bot(BToA f) => f as AToB;
 
       void main() {
@@ -916,7 +1186,7 @@
       Function2<B, A> top(AToB f) => f;
       Function2<A, B> left(AToB f) => f;
       Function2<B, A> right(BToA f) => f;
-      Function2<A, B> _bot(BToA f) => /*warning:DOWN_CAST_COMPOSITE*/f;
+      Function2<A, B> bot_(BToA f) => /*warning:DOWN_CAST_COMPOSITE*/f;
       Function2<A, B> bot(BToA f) => f as Function2<A, B>;
 
       void main() {
@@ -966,7 +1236,7 @@
       BToA top(Function2<A, B> f) => f;
       AToB left(Function2<A, B> f) => f;
       BToA right(Function2<B, A> f) => f;
-      AToB _bot(Function2<B, A> f) => /*warning:DOWN_CAST_COMPOSITE*/f;
+      AToB bot_(Function2<B, A> f) => /*warning:DOWN_CAST_COMPOSITE*/f;
       AToB bot(Function2<B, A> f) => f as AToB;
 
       void main() {
@@ -1071,91 +1341,91 @@
 
          r = r;
          r = o;
-         r = /*severe:STATIC_TYPE_ERROR*/n;
-         r = /*severe:STATIC_TYPE_ERROR*/rr;
+         r = /*warning:INVALID_ASSIGNMENT*/n;
+         r = /*warning:INVALID_ASSIGNMENT*/rr;
          r = ro;
          r = rn;
          r = oo;
-         r = /*severe:STATIC_TYPE_ERROR*/nn;
-         r = /*severe:STATIC_TYPE_ERROR*/nnn;
+         r = /*warning:INVALID_ASSIGNMENT*/nn;
+         r = /*warning:INVALID_ASSIGNMENT*/nnn;
 
          o = /*warning:DOWN_CAST_COMPOSITE*/r;
          o = o;
-         o = /*severe:STATIC_TYPE_ERROR*/n;
-         o = /*severe:STATIC_TYPE_ERROR*/rr;
-         o = /*severe:STATIC_TYPE_ERROR*/ro;
-         o = /*severe:STATIC_TYPE_ERROR*/rn;
+         o = /*warning:INVALID_ASSIGNMENT*/n;
+         o = /*warning:INVALID_ASSIGNMENT*/rr;
+         o = /*warning:INVALID_ASSIGNMENT*/ro;
+         o = /*warning:INVALID_ASSIGNMENT*/rn;
          o = oo;
-         o = /*severe:STATIC_TYPE_ERROR*/nn;
-         o = /*severe:STATIC_TYPE_ERROR*/nnn;
+         o = /*warning:INVALID_ASSIGNMENT*/nn;
+         o = /*warning:INVALID_ASSIGNMENT*/nnn;
 
-         n = /*severe:STATIC_TYPE_ERROR*/r;
-         n = /*severe:STATIC_TYPE_ERROR*/o;
+         n = /*warning:INVALID_ASSIGNMENT*/r;
+         n = /*warning:INVALID_ASSIGNMENT*/o;
          n = n;
-         n = /*severe:STATIC_TYPE_ERROR*/rr;
-         n = /*severe:STATIC_TYPE_ERROR*/ro;
-         n = /*severe:STATIC_TYPE_ERROR*/rn;
-         n = /*severe:STATIC_TYPE_ERROR*/oo;
+         n = /*warning:INVALID_ASSIGNMENT*/rr;
+         n = /*warning:INVALID_ASSIGNMENT*/ro;
+         n = /*warning:INVALID_ASSIGNMENT*/rn;
+         n = /*warning:INVALID_ASSIGNMENT*/oo;
          n = nn;
          n = nnn;
 
-         rr = /*severe:STATIC_TYPE_ERROR*/r;
-         rr = /*severe:STATIC_TYPE_ERROR*/o;
-         rr = /*severe:STATIC_TYPE_ERROR*/n;
+         rr = /*warning:INVALID_ASSIGNMENT*/r;
+         rr = /*warning:INVALID_ASSIGNMENT*/o;
+         rr = /*warning:INVALID_ASSIGNMENT*/n;
          rr = rr;
          rr = ro;
-         rr = /*severe:STATIC_TYPE_ERROR*/rn;
+         rr = /*warning:INVALID_ASSIGNMENT*/rn;
          rr = oo;
-         rr = /*severe:STATIC_TYPE_ERROR*/nn;
-         rr = /*severe:STATIC_TYPE_ERROR*/nnn;
+         rr = /*warning:INVALID_ASSIGNMENT*/nn;
+         rr = /*warning:INVALID_ASSIGNMENT*/nnn;
 
          ro = /*warning:DOWN_CAST_COMPOSITE*/r;
-         ro = /*severe:STATIC_TYPE_ERROR*/o;
-         ro = /*severe:STATIC_TYPE_ERROR*/n;
+         ro = /*warning:INVALID_ASSIGNMENT*/o;
+         ro = /*warning:INVALID_ASSIGNMENT*/n;
          ro = /*warning:DOWN_CAST_COMPOSITE*/rr;
          ro = ro;
-         ro = /*severe:STATIC_TYPE_ERROR*/rn;
+         ro = /*warning:INVALID_ASSIGNMENT*/rn;
          ro = oo;
-         ro = /*severe:STATIC_TYPE_ERROR*/nn;
-         ro = /*severe:STATIC_TYPE_ERROR*/nnn;
+         ro = /*warning:INVALID_ASSIGNMENT*/nn;
+         ro = /*warning:INVALID_ASSIGNMENT*/nnn;
 
          rn = /*warning:DOWN_CAST_COMPOSITE*/r;
-         rn = /*severe:STATIC_TYPE_ERROR*/o;
-         rn = /*severe:STATIC_TYPE_ERROR*/n;
-         rn = /*severe:STATIC_TYPE_ERROR*/rr;
-         rn = /*severe:STATIC_TYPE_ERROR*/ro;
+         rn = /*warning:INVALID_ASSIGNMENT*/o;
+         rn = /*warning:INVALID_ASSIGNMENT*/n;
+         rn = /*warning:INVALID_ASSIGNMENT*/rr;
+         rn = /*warning:INVALID_ASSIGNMENT*/ro;
          rn = rn;
-         rn = /*severe:STATIC_TYPE_ERROR*/oo;
-         rn = /*severe:STATIC_TYPE_ERROR*/nn;
-         rn = /*severe:STATIC_TYPE_ERROR*/nnn;
+         rn = /*warning:INVALID_ASSIGNMENT*/oo;
+         rn = /*warning:INVALID_ASSIGNMENT*/nn;
+         rn = /*warning:INVALID_ASSIGNMENT*/nnn;
 
          oo = /*warning:DOWN_CAST_COMPOSITE*/r;
          oo = /*warning:DOWN_CAST_COMPOSITE*/o;
-         oo = /*severe:STATIC_TYPE_ERROR*/n;
+         oo = /*warning:INVALID_ASSIGNMENT*/n;
          oo = /*warning:DOWN_CAST_COMPOSITE*/rr;
          oo = /*warning:DOWN_CAST_COMPOSITE*/ro;
-         oo = /*severe:STATIC_TYPE_ERROR*/rn;
+         oo = /*warning:INVALID_ASSIGNMENT*/rn;
          oo = oo;
-         oo = /*severe:STATIC_TYPE_ERROR*/nn;
-         oo = /*severe:STATIC_TYPE_ERROR*/nnn;
+         oo = /*warning:INVALID_ASSIGNMENT*/nn;
+         oo = /*warning:INVALID_ASSIGNMENT*/nnn;
 
-         nn = /*severe:STATIC_TYPE_ERROR*/r;
-         nn = /*severe:STATIC_TYPE_ERROR*/o;
+         nn = /*warning:INVALID_ASSIGNMENT*/r;
+         nn = /*warning:INVALID_ASSIGNMENT*/o;
          nn = /*warning:DOWN_CAST_COMPOSITE*/n;
-         nn = /*severe:STATIC_TYPE_ERROR*/rr;
-         nn = /*severe:STATIC_TYPE_ERROR*/ro;
-         nn = /*severe:STATIC_TYPE_ERROR*/rn;
-         nn = /*severe:STATIC_TYPE_ERROR*/oo;
+         nn = /*warning:INVALID_ASSIGNMENT*/rr;
+         nn = /*warning:INVALID_ASSIGNMENT*/ro;
+         nn = /*warning:INVALID_ASSIGNMENT*/rn;
+         nn = /*warning:INVALID_ASSIGNMENT*/oo;
          nn = nn;
          nn = nnn;
 
-         nnn = /*severe:STATIC_TYPE_ERROR*/r;
-         nnn = /*severe:STATIC_TYPE_ERROR*/o;
+         nnn = /*warning:INVALID_ASSIGNMENT*/r;
+         nnn = /*warning:INVALID_ASSIGNMENT*/o;
          nnn = /*warning:DOWN_CAST_COMPOSITE*/n;
-         nnn = /*severe:STATIC_TYPE_ERROR*/rr;
-         nnn = /*severe:STATIC_TYPE_ERROR*/ro;
-         nnn = /*severe:STATIC_TYPE_ERROR*/rn;
-         nnn = /*severe:STATIC_TYPE_ERROR*/oo;
+         nnn = /*warning:INVALID_ASSIGNMENT*/rr;
+         nnn = /*warning:INVALID_ASSIGNMENT*/ro;
+         nnn = /*warning:INVALID_ASSIGNMENT*/rn;
+         nnn = /*warning:INVALID_ASSIGNMENT*/oo;
          nnn = /*warning:DOWN_CAST_COMPOSITE*/nn;
          nnn = nnn;
       }
@@ -1179,7 +1449,7 @@
          {
            I2I f;
            f = new A();
-           f = /*severe:STATIC_TYPE_ERROR*/new B();
+           f = /*warning:INVALID_ASSIGNMENT*/new B();
            f = i2i;
            f = /*severe:STATIC_TYPE_ERROR*/n2n;
            f = /*warning:DOWN_CAST_COMPOSITE*/i2i as Object;
@@ -1187,7 +1457,7 @@
          }
          {
            N2N f;
-           f = /*severe:STATIC_TYPE_ERROR*/new A();
+           f = /*warning:INVALID_ASSIGNMENT*/new A();
            f = new B();
            f = /*severe:STATIC_TYPE_ERROR*/i2i;
            f = n2n;
@@ -1197,18 +1467,18 @@
          {
            A f;
            f = new A();
-           f = /*severe:STATIC_TYPE_ERROR*/new B();
-           f = /*severe:STATIC_TYPE_ERROR*/i2i;
-           f = /*severe:STATIC_TYPE_ERROR*/n2n;
+           f = /*warning:INVALID_ASSIGNMENT*/new B();
+           f = /*warning:INVALID_ASSIGNMENT*/i2i;
+           f = /*warning:INVALID_ASSIGNMENT*/n2n;
            f = /*info:DOWN_CAST_IMPLICIT*/i2i as Object;
            f = /*info:DOWN_CAST_IMPLICIT*/n2n as Function;
          }
          {
            B f;
-           f = /*severe:STATIC_TYPE_ERROR*/new A();
+           f = /*warning:INVALID_ASSIGNMENT*/new A();
            f = new B();
-           f = /*severe:STATIC_TYPE_ERROR*/i2i;
-           f = /*severe:STATIC_TYPE_ERROR*/n2n;
+           f = /*warning:INVALID_ASSIGNMENT*/i2i;
+           f = /*warning:INVALID_ASSIGNMENT*/n2n;
            f = /*info:DOWN_CAST_IMPLICIT*/i2i as Object;
            f = /*info:DOWN_CAST_IMPLICIT*/n2n as Function;
          }
@@ -1230,7 +1500,7 @@
 
       class A {
         void bar() => null;
-        void foo() => bar; // allowed
+        void foo() => bar(); // allowed
       }
    ''');
     });
@@ -1257,8 +1527,8 @@
             local = g; // valid
 
             // Non-generic function cannot subtype a generic one.
-            local = /*severe:STATIC_TYPE_ERROR*/(x) => null;
-            local = /*severe:STATIC_TYPE_ERROR*/nonGenericFn;
+            local = /*warning:INVALID_ASSIGNMENT*/(x) => null;
+            local = /*warning:INVALID_ASSIGNMENT*/nonGenericFn;
           }
           {
             Iterable/*<R>*/ f/*<P, R>*/(List/*<P>*/ p) => null;
@@ -1273,8 +1543,8 @@
             local2 = /*warning:DOWN_CAST_COMPOSITE*/local;
 
             // Non-generic function cannot subtype a generic one.
-            local = /*severe:STATIC_TYPE_ERROR*/(x) => null;
-            local = /*severe:STATIC_TYPE_ERROR*/nonGenericFn;
+            local = /*warning:INVALID_ASSIGNMENT*/(x) => null;
+            local = /*warning:INVALID_ASSIGNMENT*/nonGenericFn;
           }
         }
       ''');
@@ -1313,6 +1583,7 @@
           lOfDs = lOfDs;
           lOfDs = lOfOs;
           lOfDs = lOfAs;
+          lOfDs = new L(); // Reset type propagation.
         }
         {
           lOfOs = mOfDs;
@@ -1321,14 +1592,16 @@
           lOfOs = lOfDs;
           lOfOs = lOfOs;
           lOfOs = lOfAs;
+          lOfOs = new L<Object>(); // Reset type propagation.
         }
         {
           lOfAs = /*warning:DOWN_CAST_COMPOSITE*/mOfDs;
-          lOfAs = /*severe:STATIC_TYPE_ERROR*/mOfOs;
+          lOfAs = /*warning:INVALID_ASSIGNMENT*/mOfOs;
           lOfAs = mOfAs;
           lOfAs = /*warning:DOWN_CAST_COMPOSITE*/lOfDs;
           lOfAs = /*info:DOWN_CAST_IMPLICIT*/lOfOs;
           lOfAs = lOfAs;
+          lOfAs = new L<A>(); // Reset type propagation.
         }
         {
           mOfDs = mOfDs;
@@ -1337,6 +1610,7 @@
           mOfDs = /*info:DOWN_CAST_IMPLICIT*/lOfDs;
           mOfDs = /*info:DOWN_CAST_IMPLICIT*/lOfOs;
           mOfDs = /*warning:DOWN_CAST_COMPOSITE*/lOfAs;
+          mOfDs = new M(); // Reset type propagation.
         }
         {
           mOfOs = mOfDs;
@@ -1344,7 +1618,8 @@
           mOfOs = mOfAs;
           mOfOs = /*info:DOWN_CAST_IMPLICIT*/lOfDs;
           mOfOs = /*info:DOWN_CAST_IMPLICIT*/lOfOs;
-          mOfOs = /*severe:STATIC_TYPE_ERROR*/lOfAs;
+          mOfOs = /*warning:INVALID_ASSIGNMENT*/lOfAs;
+          mOfOs = new M<Object>(); // Reset type propagation.
         }
         {
           mOfAs = /*warning:DOWN_CAST_COMPOSITE*/mOfDs;
@@ -1354,7 +1629,6 @@
           mOfAs = /*info:DOWN_CAST_IMPLICIT*/lOfOs;
           mOfAs = /*info:DOWN_CAST_IMPLICIT*/lOfAs;
         }
-
       }
    ''');
   });
@@ -1367,9 +1641,9 @@
             String s = "hello";
             {
                List<int> l = <int>[i];
-               l = <int>[/*severe:STATIC_TYPE_ERROR*/s];
+               l = <int>[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/s];
                l = <int>[/*info:DOWN_CAST_IMPLICIT*/n];
-               l = <int>[i, /*info:DOWN_CAST_IMPLICIT*/n, /*severe:STATIC_TYPE_ERROR*/s];
+               l = <int>[i, /*info:DOWN_CAST_IMPLICIT*/n, /*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/s];
             }
             {
                List l = [i];
@@ -1379,11 +1653,11 @@
             }
             {
                Map<String, int> m = <String, int>{s: i};
-               m = <String, int>{s: /*severe:STATIC_TYPE_ERROR*/s};
+               m = <String, int>{s: /*warning:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/s};
                m = <String, int>{s: /*info:DOWN_CAST_IMPLICIT*/n};
                m = <String, int>{s: i,
                                  s: /*info:DOWN_CAST_IMPLICIT*/n,
-                                 s: /*severe:STATIC_TYPE_ERROR*/s};
+                                 s: /*warning:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/s};
             }
            // TODO(leafp): We can't currently test for key errors since the
            // error marker binds to the entire entry.
@@ -1406,7 +1680,9 @@
     checkFile('''
           class A {
             static const num n = 3.0;
-            static const int i = /*info:ASSIGNMENT_CAST*/n;
+            // The severe error is from constant evaluation where we know the
+            // concrete type.
+            static const int /*severe:VARIABLE_TYPE_MISMATCH*/i = /*info:ASSIGNMENT_CAST*/n;
             final int fi;
             const A(num a) : this.fi = /*info:DOWN_CAST_IMPLICIT*/a;
           }
@@ -1414,7 +1690,7 @@
             const B(Object a) : super(/*info:DOWN_CAST_IMPLICIT*/a);
           }
           void foo(Object o) {
-            var a = const A(/*info:DOWN_CAST_IMPLICIT*/o);
+            var a = const A(/*info:DOWN_CAST_IMPLICIT, severe:CONST_WITH_NON_CONSTANT_ARGUMENT, severe:INVALID_CONSTANT*/o);
           }
      ''');
   });
@@ -1435,7 +1711,7 @@
   test('unbound redirecting constructor', () {
     checkFile('''
       class Foo {
-        Foo() : this.init();
+        Foo() : /*severe:REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR*/this.init();
       }
        ''');
   });
@@ -1444,7 +1720,7 @@
     checkFile('''
           class A {
             A(A x) {}
-            A.two() : this(/*severe:STATIC_TYPE_ERROR*/3);
+            A.two() : this(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
           }
        ''');
   });
@@ -1453,7 +1729,7 @@
     checkFile('''
           class A { A(A x) {} }
           class B extends A {
-            B() : super(/*severe:STATIC_TYPE_ERROR*/3);
+            B() : super(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
           }
        ''');
   });
@@ -1513,7 +1789,7 @@
             var _f3;
             get _f4 => null;
 
-            int _m1();
+            int _m1() => null;
           }
 
           class GrandChild extends main.Child {
@@ -1521,7 +1797,8 @@
             /*severe:INVALID_FIELD_OVERRIDE*/var _f3;
             var _f4;
 
-            /*severe:INVALID_METHOD_OVERRIDE*/String _m1();
+            /*severe:INVALID_METHOD_OVERRIDE*/String
+                /*warning:INVALID_METHOD_OVERRIDE_RETURN_TYPE*/_m1() => null;
           }
     ''',
         name: '/helper.dart');
@@ -1533,7 +1810,7 @@
             var _f2;
             var _f4;
 
-            String _m1();
+            String _m1() => null;
           }
     ''');
   });
@@ -1580,7 +1857,7 @@
             /*severe:INVALID_FIELD_OVERRIDE,severe:INVALID_METHOD_OVERRIDE*/dynamic get f4 => null;
           }
 
-          class Child2 implements Base {
+          class /*warning:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR*/Child2 implements Base {
             /*severe:INVALID_METHOD_OVERRIDE*/A get f1 => null;
             C get f2 => null;
             get f3 => null;
@@ -1664,21 +1941,21 @@
           class C extends B {}
 
           class Base {
-            B m1(B a);
-            B m2(B a);
-            B m3(B a);
-            B m4(B a);
-            B m5(B a);
-            B m6(B a);
+            B m1(B a) => null;
+            B m2(B a) => null;
+            B m3(B a) => null;
+            B m4(B a) => null;
+            B m5(B a) => null;
+            B m6(B a) => null;
           }
 
           class Child extends Base {
-            /*severe:INVALID_METHOD_OVERRIDE*/A m1(A value) {}
-            /*severe:INVALID_METHOD_OVERRIDE*/C m2(C value) {}
-            /*severe:INVALID_METHOD_OVERRIDE*/A m3(C value) {}
-            C m4(A value) {}
-            m5(value) {}
-            /*severe:INVALID_METHOD_OVERRIDE*/dynamic m6(dynamic value) {}
+            /*severe:INVALID_METHOD_OVERRIDE*/A m1(A value) => null;
+            /*severe:INVALID_METHOD_OVERRIDE*/C m2(C value) => null;
+            /*severe:INVALID_METHOD_OVERRIDE*/A m3(C value) => null;
+            C m4(A value) => null;
+            m5(value) => null;
+            /*severe:INVALID_METHOD_OVERRIDE*/dynamic m6(dynamic value) => null;
           }
        ''');
   });
@@ -1693,7 +1970,8 @@
           }
 
           class Derived<S extends A> extends Base<B> {
-            /*severe:INVALID_METHOD_OVERRIDE*/S foo() => null;
+            /*severe:INVALID_METHOD_OVERRIDE*/S
+                /*warning:INVALID_METHOD_OVERRIDE_RETURN_TYPE*/foo() => null;
           }
 
           class Derived2<S extends B> extends Base<B> {
@@ -1758,14 +2036,14 @@
             dynamic x;
             if (x is int) {
               int y = x;
-              String z = /*severe:STATIC_TYPE_ERROR*/x;
+              String z = /*warning:INVALID_ASSIGNMENT*/x;
             }
           }
           g() {
             Object x;
             if (x is int) {
               int y = x;
-              String z = /*severe:STATIC_TYPE_ERROR*/x;
+              String z = /*warning:INVALID_ASSIGNMENT*/x;
             }
           }
     ''');
@@ -1774,10 +2052,10 @@
   test('unary operators', () {
     checkFile('''
       class A {
-        A operator ~() {}
-        A operator +(int x) {}
-        A operator -(int x) {}
-        A operator -() {}
+        A operator ~() => null;
+        A operator +(int x) => null;
+        A operator -(int x) => null;
+        A operator -() => null;
       }
 
       foo() => new A();
@@ -1790,7 +2068,7 @@
         ~a;
         (/*info:DYNAMIC_INVOKE*/~d);
 
-        !/*severe:STATIC_TYPE_ERROR*/a;
+        !/*warning:NON_BOOL_NEGATION_EXPRESSION*/a;
         !/*info:DYNAMIC_CAST*/d;
 
         -a;
@@ -1811,22 +2089,22 @@
   test('binary and index operators', () {
     checkFile('''
           class A {
-            A operator *(B b) {}
-            A operator /(B b) {}
-            A operator ~/(B b) {}
-            A operator %(B b) {}
-            A operator +(B b) {}
-            A operator -(B b) {}
-            A operator <<(B b) {}
-            A operator >>(B b) {}
-            A operator &(B b) {}
-            A operator ^(B b) {}
-            A operator |(B b) {}
-            A operator[](B b) {}
+            A operator *(B b) => null;
+            A operator /(B b) => null;
+            A operator ~/(B b) => null;
+            A operator %(B b) => null;
+            A operator +(B b) => null;
+            A operator -(B b) => null;
+            A operator <<(B b) => null;
+            A operator >>(B b) => null;
+            A operator &(B b) => null;
+            A operator ^(B b) => null;
+            A operator |(B b) => null;
+            A operator[](B b) => null;
           }
 
           class B {
-            A operator -(B b) {}
+            A operator -(B b) => null;
           }
 
           foo() => new A();
@@ -1841,9 +2119,9 @@
             a = a ~/ b;
             a = a % b;
             a = a + b;
-            a = a + /*severe:STATIC_TYPE_ERROR*/a;
+            a = a + /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/a;
             a = a - b;
-            b = /*severe:STATIC_TYPE_ERROR*/b - b;
+            b = /*warning:INVALID_ASSIGNMENT*/b - b;
             a = a << b;
             a = a >> b;
             a = a & b;
@@ -1855,20 +2133,20 @@
             int y = 42;
             x = x + x;
             x = x + /*info:DYNAMIC_CAST*/c;
-            x = x + /*severe:STATIC_TYPE_ERROR*/y;
+            x = x + /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/y;
 
             bool p = true;
             p = p && p;
             p = p && /*info:DYNAMIC_CAST*/c;
             p = (/*info:DYNAMIC_CAST*/c) && p;
             p = (/*info:DYNAMIC_CAST*/c) && /*info:DYNAMIC_CAST*/c;
-            p = (/*severe:STATIC_TYPE_ERROR*/y) && p;
+            p = /*warning:NON_BOOL_OPERAND*/y && p;
             p = c == y;
 
             a = a[b];
             a = a[/*info:DYNAMIC_CAST*/c];
             c = (/*info:DYNAMIC_INVOKE*/c[b]);
-            a[/*severe:STATIC_TYPE_ERROR*/y];
+            a[/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/y];
           }
        ''');
   });
@@ -1893,27 +2171,27 @@
   test('compound assignments', () {
     checkFile('''
           class A {
-            A operator *(B b) {}
-            A operator /(B b) {}
-            A operator ~/(B b) {}
-            A operator %(B b) {}
-            A operator +(B b) {}
-            A operator -(B b) {}
-            A operator <<(B b) {}
-            A operator >>(B b) {}
-            A operator &(B b) {}
-            A operator ^(B b) {}
-            A operator |(B b) {}
-            D operator [](B index) {}
-            void operator []=(B index, D value) {}
+            A operator *(B b) => null;
+            A operator /(B b) => null;
+            A operator ~/(B b) => null;
+            A operator %(B b) => null;
+            A operator +(B b) => null;
+            A operator -(B b) => null;
+            A operator <<(B b) => null;
+            A operator >>(B b) => null;
+            A operator &(B b) => null;
+            A operator ^(B b) => null;
+            A operator |(B b) => null;
+            D operator [](B index) => null;
+            void operator []=(B index, D value) => null;
           }
 
           class B {
-            A operator -(B b) {}
+            A operator -(B b) => null;
           }
 
           class D {
-            D operator +(D d) {}
+            D operator +(D d) => null;
           }
 
           foo() => new A();
@@ -1921,7 +2199,7 @@
           test() {
             int x = 0;
             x += 5;
-            (/*severe:STATIC_TYPE_ERROR*/x += 3.14);
+            /*severe:STATIC_TYPE_ERROR*/x += 3.14;
 
             double y = 0.0;
             y += 5;
@@ -1951,22 +2229,22 @@
             a ~/= b;
             a %= b;
             a += b;
-            a += /*severe:STATIC_TYPE_ERROR*/a;
+            a += /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/a;
             a -= b;
-            (/*severe:STATIC_TYPE_ERROR*/b -= b);
+            /*severe:STATIC_TYPE_ERROR*/b -= /*warning:INVALID_ASSIGNMENT*/b;
             a <<= b;
             a >>= b;
             a &= b;
             a ^= b;
             a |= b;
-            (/*info:DYNAMIC_INVOKE*/c += b);
+            /*info:DYNAMIC_INVOKE*/c += b;
 
             var d = new D();
             a[b] += d;
             a[/*info:DYNAMIC_CAST*/c] += d;
-            a[/*severe:STATIC_TYPE_ERROR*/z] += d;
+            a[/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/z] += d;
             a[b] += /*info:DYNAMIC_CAST*/c;
-            a[b] += /*severe:STATIC_TYPE_ERROR*/z;
+            a[b] += /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/z;
             /*info:DYNAMIC_INVOKE,info:DYNAMIC_INVOKE*/c[b] += d;
           }
        ''');
@@ -2011,7 +2289,7 @@
     checkFile('''
           foo() {
             for (int i = 0; i < 10; i++) {
-              i = /*severe:STATIC_TYPE_ERROR*/"hi";
+              i = /*warning:INVALID_ASSIGNMENT*/"hi";
             }
           }
           bar() {
@@ -2043,35 +2321,43 @@
             }
 
             class T1 extends Base {
-              /*severe:INVALID_METHOD_OVERRIDE,severe:INVALID_FIELD_OVERRIDE*/B get f => null;
+              /*warning:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, severe:INVALID_FIELD_OVERRIDE, severe:INVALID_METHOD_OVERRIDE*/B get
+                  /*warning:INVALID_GETTER_OVERRIDE_RETURN_TYPE*/f => null;
             }
 
             class T2 extends Base {
-              /*severe:INVALID_METHOD_OVERRIDE,severe:INVALID_FIELD_OVERRIDE*/set f(B b) => null;
+              /*warning:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, severe:INVALID_FIELD_OVERRIDE, severe:INVALID_METHOD_OVERRIDE*/set f(
+                  /*warning:INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE*/B b) => null;
             }
 
             class T3 extends Base {
-              /*severe:INVALID_FIELD_OVERRIDE,severe:INVALID_METHOD_OVERRIDE*/final B f;
+              /*severe:INVALID_FIELD_OVERRIDE, severe:INVALID_METHOD_OVERRIDE*/final B
+                  /*warning:FINAL_NOT_INITIALIZED, warning:INVALID_GETTER_OVERRIDE_RETURN_TYPE*/f;
             }
             class T4 extends Base {
               // two: one for the getter one for the setter.
-              /*severe:INVALID_FIELD_OVERRIDE,severe:INVALID_METHOD_OVERRIDE,severe:INVALID_METHOD_OVERRIDE*/B f;
+              /*severe:INVALID_FIELD_OVERRIDE, severe:INVALID_METHOD_OVERRIDE, severe:INVALID_METHOD_OVERRIDE*/B
+                  /*warning:INVALID_GETTER_OVERRIDE_RETURN_TYPE, warning:INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE*/f;
             }
 
-            class T5 implements Base {
-              /*severe:INVALID_METHOD_OVERRIDE*/B get f => null;
+            class /*warning:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE*/T5 implements Base {
+              /*warning:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, severe:INVALID_METHOD_OVERRIDE*/B get
+                  /*warning:INVALID_GETTER_OVERRIDE_RETURN_TYPE*/f => null;
             }
 
-            class T6 implements Base {
-              /*severe:INVALID_METHOD_OVERRIDE*/set f(B b) => null;
+            class /*warning:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE*/T6 implements Base {
+              /*warning:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, severe:INVALID_METHOD_OVERRIDE*/set f(
+                  /*warning:INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE*/B b) => null;
             }
 
-            class T7 implements Base {
-              /*severe:INVALID_METHOD_OVERRIDE*/final B f;
+            class /*warning:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE*/T7 implements Base {
+              /*severe:INVALID_METHOD_OVERRIDE*/final B
+                  /*warning:INVALID_GETTER_OVERRIDE_RETURN_TYPE*/f = null;
             }
             class T8 implements Base {
               // two: one for the getter one for the setter.
-              /*severe:INVALID_METHOD_OVERRIDE,severe:INVALID_METHOD_OVERRIDE*/B f;
+              /*severe:INVALID_METHOD_OVERRIDE, severe:INVALID_METHOD_OVERRIDE*/B
+                  /*warning:INVALID_GETTER_OVERRIDE_RETURN_TYPE, warning:INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE*/f;
             }
          ''');
     });
@@ -2086,7 +2372,8 @@
             }
 
             class Test extends Base {
-                /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+              /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
             }
          ''');
     });
@@ -2103,7 +2390,8 @@
             }
 
             class Test extends Parent {
-                /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                      /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
                 /*severe:INVALID_FIELD_OVERRIDE*/int x;
             }
          ''');
@@ -2123,7 +2411,8 @@
 
             class Test extends Parent {
                 // Reported only once
-                /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
             }
          ''');
     });
@@ -2137,7 +2426,8 @@
                 m(A a) {}
             }
             class Parent extends Grandparent {
-                /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+              /*severe:INVALID_METHOD_OVERRIDE*/m(
+                  /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
             }
 
             class Test extends Parent {
@@ -2164,9 +2454,12 @@
                 int x;
             }
 
-            class T1 extends Base with /*severe:INVALID_METHOD_OVERRIDE*/M1 {}
-            class T2 extends Base with /*severe:INVALID_METHOD_OVERRIDE*/M1, /*severe:INVALID_FIELD_OVERRIDE*/M2 {}
-            class T3 extends Base with /*severe:INVALID_FIELD_OVERRIDE*/M2, /*severe:INVALID_METHOD_OVERRIDE*/M1 {}
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1 extends Base
+                with /*severe:INVALID_METHOD_OVERRIDE*/M1 {}
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T2 extends Base
+                with /*severe:INVALID_METHOD_OVERRIDE*/M1, /*severe:INVALID_FIELD_OVERRIDE*/M2 {}
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T3 extends Base
+                with /*severe:INVALID_FIELD_OVERRIDE*/M2, /*severe:INVALID_METHOD_OVERRIDE*/M1 {}
          ''');
     });
 
@@ -2188,7 +2481,9 @@
                 int x;
             }
 
-            class T1 extends Base with M1, /*severe:INVALID_METHOD_OVERRIDE,severe:INVALID_FIELD_OVERRIDE*/M2 {}
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1 extends Base
+                with M1,
+                /*severe:INVALID_METHOD_OVERRIDE,severe:INVALID_FIELD_OVERRIDE*/M2 {}
          ''');
     });
 
@@ -2216,7 +2511,7 @@
                 m(B a) {}
             }
 
-            class T1 extends Base
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1 extends Base
                 with M1, /*severe:INVALID_METHOD_OVERRIDE*/M2, M3 {}
          ''');
     });
@@ -2231,7 +2526,8 @@
             }
 
             class T1 implements I {
-                /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+              /*severe:INVALID_METHOD_OVERRIDE*/m(
+                  /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
             }
          ''');
     });
@@ -2249,9 +2545,8 @@
                 m(B a) {}
             }
 
-
-            class T1 /*severe:INVALID_METHOD_OVERRIDE*/extends Base implements I {
-            }
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                /*severe:INVALID_METHOD_OVERRIDE*/extends Base implements I {}
          ''');
     });
 
@@ -2268,8 +2563,9 @@
                 m(B a) {}
             }
 
-            class T1 extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
-               implements I {}
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
+                implements I {}
          ''');
     });
 
@@ -2288,14 +2584,16 @@
                 m(B a) {}
             }
 
-            class T1 /*severe:INVALID_METHOD_OVERRIDE*/extends Base
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                /*severe:INVALID_METHOD_OVERRIDE*/extends Base
                 implements I1 {}
 
             class T2 extends Base implements I1 {
                 /*severe:INVALID_METHOD_OVERRIDE,severe:INVALID_METHOD_OVERRIDE*/m(a) {}
             }
 
-            class T3 extends Object with /*severe:INVALID_METHOD_OVERRIDE*/Base
+            class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T3
+                extends Object with /*severe:INVALID_METHOD_OVERRIDE*/Base
                 implements I1 {}
 
             class T4 extends Object with Base implements I1 {
@@ -2317,7 +2615,8 @@
               abstract class I2 implements I1 {}
 
               class T1 implements I2 {
-                  /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
            ''');
     });
@@ -2332,7 +2631,8 @@
               abstract class I2 extends I1 {}
 
               class T1 implements I2 {
-                  /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
            ''');
     });
@@ -2347,7 +2647,8 @@
               abstract class I2 extends Object with M1 {}
 
               class T1 implements I2 {
-                  /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
            ''');
     });
@@ -2362,7 +2663,8 @@
               abstract class Base implements I1 {}
 
               class T1 extends Base {
-                  /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
            ''');
     });
@@ -2375,15 +2677,14 @@
                   m(A a);
               }
 
-              // See issue #25
-              /*pass should be warning:AnalyzerError*/class Base implements I1 {
-              }
+              class /*warning:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE*/Base
+                  implements I1 {}
 
               class T1 extends Base {
                   // not reported technically because if the class is concrete,
                   // it should implement all its interfaces and hence it is
                   // sufficient to check overrides against it.
-                  m(B a) {}
+                  m(/*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
            ''');
     });
@@ -2404,9 +2705,9 @@
                   m(B a) {}
               }
 
-              class T1 extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
-                  implements I2 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                  extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
+                  implements I2 {}
            ''');
     });
     test('superclass of interface of child', () {
@@ -2423,9 +2724,9 @@
                   m(B a) {}
               }
 
-              class T1 extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
-                  implements I2 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                  extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
+                  implements I2 {}
            ''');
     });
     test('mixin of interface of child', () {
@@ -2442,9 +2743,9 @@
                   m(B a) {}
               }
 
-              class T1 extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
-                  implements I2 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                  extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
+                  implements I2 {}
            ''');
     });
     test('interface of abstract superclass', () {
@@ -2461,8 +2762,8 @@
                   m(B a) {}
               }
 
-              class T1 extends Base with /*severe:INVALID_METHOD_OVERRIDE*/M {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1 extends Base
+                  with /*severe:INVALID_METHOD_OVERRIDE*/M {}
            ''');
     });
     test('interface of concrete superclass', () {
@@ -2474,16 +2775,15 @@
                   m(A a);
               }
 
-              // See issue #25
-              /*pass should be warning:AnalyzerError*/class Base implements I1 {
-              }
+              class /*warning:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE*/Base
+                  implements I1 {}
 
               class M {
                   m(B a) {}
               }
 
-              class T1 extends Base with M {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1 extends Base
+                  with M {}
            ''');
     });
   });
@@ -2503,9 +2803,8 @@
                   m(B a) {}
               }
 
-              class T1 /*severe:INVALID_METHOD_OVERRIDE*/extends Base
-                  implements I2 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                  /*severe:INVALID_METHOD_OVERRIDE*/extends Base implements I2 {}
            ''');
     });
     test('superclass of interface of child', () {
@@ -2522,9 +2821,9 @@
                   m(B a) {}
               }
 
-              class T1 /*severe:INVALID_METHOD_OVERRIDE*/extends Base
-                  implements I2 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                  /*severe:INVALID_METHOD_OVERRIDE*/extends Base
+                  implements I2 {}
            ''');
     });
     test('mixin of interface of child', () {
@@ -2541,9 +2840,9 @@
                   m(B a) {}
               }
 
-              class T1 /*severe:INVALID_METHOD_OVERRIDE*/extends Base
-                  implements I2 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                  /*severe:INVALID_METHOD_OVERRIDE*/extends Base
+                  implements I2 {}
            ''');
     });
     test('interface of abstract superclass', () {
@@ -2556,7 +2855,8 @@
               }
 
               abstract class Base implements I1 {
-                  /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
 
               class T1 extends Base {
@@ -2579,7 +2879,8 @@
               }
 
               class Base implements I1 {
-                  /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
 
               class T1 extends Base {
@@ -2602,11 +2903,11 @@
                   m(A a);
               }
 
-              class Base {
-              }
+              class Base {}
 
               class T1 implements I2 {
-                /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
            ''');
     });
@@ -2621,20 +2922,21 @@
               }
 
               class Base {
-                  m(B a);
+                  m(B a) {}
               }
 
               // Note: no error reported in `extends Base` to avoid duplicating
               // the error in T1.
               class T1 extends Base implements I1 {
-                /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
 
               // If there is no error in the class, we do report the error at
               // the base class:
-              class T2 /*severe:INVALID_METHOD_OVERRIDE*/extends Base
-                  implements I1 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T2
+                  /*severe:INVALID_METHOD_OVERRIDE*/extends Base
+                  implements I1 {}
            ''');
     });
 
@@ -2648,16 +2950,17 @@
               }
 
               class M {
-                  m(B a);
+                  m(B a) {}
               }
 
               class T1 extends Object with M implements I1 {
-                /*severe:INVALID_METHOD_OVERRIDE*/m(B a) {}
+                /*severe:INVALID_METHOD_OVERRIDE*/m(
+                    /*warning:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B a) {}
               }
 
-              class T2 extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
-                  implements I1 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T2
+                  extends Object with /*severe:INVALID_METHOD_OVERRIDE*/M
+                  implements I1 {}
            ''');
     });
 
@@ -2677,16 +2980,15 @@
               class Parent1 extends Grandparent {
                   m(B a) {}
               }
-              class Parent2 extends Grandparent {
-              }
+              class Parent2 extends Grandparent {}
 
               // Note: otherwise both errors would be reported on this line
-              class T1 /*severe:INVALID_METHOD_OVERRIDE*/extends Parent1
-                  implements I1 {
-              }
-              class T2 /*severe:INVALID_METHOD_OVERRIDE*/extends Parent2
-                  implements I1 {
-              }
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                  /*severe:INVALID_METHOD_OVERRIDE*/extends Parent1
+                  implements I1 {}
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T2
+                  /*severe:INVALID_METHOD_OVERRIDE*/extends Parent2
+                  implements I1 {}
            ''');
     });
 
@@ -2710,11 +3012,10 @@
               // Here we want to report both, because the error location is
               // different.
               // TODO(sigmund): should we merge these as well?
-              class T1 extends Object
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1 extends Object
                   with /*severe:INVALID_METHOD_OVERRIDE*/M1,
                   /*severe:INVALID_METHOD_OVERRIDE*/M2
-                  implements I1 {
-              }
+                  implements I1 {}
            ''');
     });
 
@@ -2738,10 +3039,10 @@
               // Here we want to report both, because the error location is
               // different.
               // TODO(sigmund): should we merge these as well?
-              class T1 /*severe:INVALID_METHOD_OVERRIDE*/extends Base
+              class /*warning:INCONSISTENT_METHOD_INHERITANCE*/T1
+                  /*severe:INVALID_METHOD_OVERRIDE*/extends Base
                   with /*severe:INVALID_METHOD_OVERRIDE*/M
-                  implements I1 {
-              }
+                  implements I1 {}
            ''');
     });
   });
@@ -2810,24 +3111,27 @@
 
         foo1() async => x;
         Future foo2() async => x;
-        Future<int> foo3() async => (/*info:DYNAMIC_CAST*/x);
-        Future<int> foo4() async => (new Future<int>.value(/*info:DYNAMIC_CAST*/x));
-        Future<int> foo5() async => (/*severe:STATIC_TYPE_ERROR*/new Future<String>.value(/*info:DYNAMIC_CAST*/x));
+        Future<int> foo3() async => /*info:DYNAMIC_CAST*/x;
+        Future<int> foo4() async => new Future<int>.value(/*info:DYNAMIC_CAST*/x);
+        Future<int> foo5() async =>
+            /*warning:RETURN_OF_INVALID_TYPE*/new Future<String>.value(/*info:DYNAMIC_CAST*/x);
 
         bar1() async { return x; }
         Future bar2() async { return x; }
-        Future<int> bar3() async { return (/*info:DYNAMIC_CAST*/x); }
-        Future<int> bar4() async { return (new Future<int>.value(/*info:DYNAMIC_CAST*/x)); }
-        Future<int> bar5() async { return (/*severe:STATIC_TYPE_ERROR*/new Future<String>.value(/*info:DYNAMIC_CAST*/x)); }
+        Future<int> bar3() async { return /*info:DYNAMIC_CAST*/x; }
+        Future<int> bar4() async { return new Future<int>.value(/*info:DYNAMIC_CAST*/x); }
+        Future<int> bar5() async {
+          return /*warning:RETURN_OF_INVALID_TYPE*/new Future<String>.value(/*info:DYNAMIC_CAST*/x);
+        }
 
         int y;
         Future<int> z;
 
-        void baz() async {
+        baz() async {
           int a = /*info:DYNAMIC_CAST*/await x;
           int b = await y;
           int c = await z;
-          String d = /*severe:STATIC_TYPE_ERROR*/await z;
+          String d = /*warning:INVALID_ASSIGNMENT*/await z;
         }
 
         Future<bool> get issue_264 async {
@@ -2849,33 +3153,31 @@
 
         bar1() async* { yield x; }
         Stream bar2() async* { yield x; }
-        Stream<int> bar3() async* { yield (/*info:DYNAMIC_CAST*/x); }
-        Stream<int> bar4() async* { yield (/*severe:STATIC_TYPE_ERROR*/new Stream<int>()); }
+        Stream<int> bar3() async* { yield /*info:DYNAMIC_CAST*/x; }
+        Stream<int> bar4() async* { yield /*warning:YIELD_OF_INVALID_TYPE*/new Stream<int>(); }
 
-        baz1() async* { yield* (/*info:DYNAMIC_CAST*/x); }
-        Stream baz2() async* { yield* (/*info:DYNAMIC_CAST*/x); }
-        Stream<int> baz3() async* { yield* (/*warning:DOWN_CAST_COMPOSITE*/x); }
+        baz1() async* { yield* /*info:DYNAMIC_CAST*/x; }
+        Stream baz2() async* { yield* /*info:DYNAMIC_CAST*/x; }
+        Stream<int> baz3() async* { yield* /*warning:DOWN_CAST_COMPOSITE*/x; }
         Stream<int> baz4() async* { yield* new Stream<int>(); }
-        Stream<int> baz5() async* { yield* (/*info:INFERRED_TYPE_ALLOCATION*/new Stream()); }
+        Stream<int> baz5() async* { yield* /*info:INFERRED_TYPE_ALLOCATION*/new Stream(); }
     ''');
     });
 
     test('sync*', () {
       checkFile('''
-        import 'dart:async';
-
         dynamic x;
 
         bar1() sync* { yield x; }
         Iterable bar2() sync* { yield x; }
-        Iterable<int> bar3() sync* { yield (/*info:DYNAMIC_CAST*/x); }
-        Iterable<int> bar4() sync* { yield (/*severe:STATIC_TYPE_ERROR*/new Iterable<int>()); }
+        Iterable<int> bar3() sync* { yield /*info:DYNAMIC_CAST*/x; }
+        Iterable<int> bar4() sync* { yield /*warning:YIELD_OF_INVALID_TYPE*/bar3(); }
 
-        baz1() sync* { yield* (/*info:DYNAMIC_CAST*/x); }
-        Iterable baz2() sync* { yield* (/*info:DYNAMIC_CAST*/x); }
-        Iterable<int> baz3() sync* { yield* (/*warning:DOWN_CAST_COMPOSITE*/x); }
-        Iterable<int> baz4() sync* { yield* new Iterable<int>(); }
-        Iterable<int> baz5() sync* { yield* (/*info:INFERRED_TYPE_ALLOCATION*/new Iterable()); }
+        baz1() sync* { yield* /*info:DYNAMIC_CAST*/x; }
+        Iterable baz2() sync* { yield* /*info:DYNAMIC_CAST*/x; }
+        Iterable<int> baz3() sync* { yield* /*warning:DOWN_CAST_COMPOSITE*/x; }
+        Iterable<int> baz4() sync* { yield* bar3(); }
+        Iterable<int> baz5() sync* { yield* /*info:INFERRED_TYPE_ALLOCATION*/new List(); }
     ''');
     });
   });
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 4bfe3521..3ace67a 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -7,1195 +7,911 @@
 /// Tests for type inference.
 library analyzer.test.src.task.strong.inferred_type_test;
 
+import 'package:analyzer/dart/element/element.dart';
 import 'package:unittest/unittest.dart';
 
-import 'strong_test_helper.dart';
+import '../../../reflective_tests.dart';
+import 'strong_test_helper.dart' as helper;
 
 void main() {
-  initStrongModeTests();
-
-  // Error also expected when declared type is `int`.
-  test('infer type on var', () {
-    checkFile('''
-      test1() {
-        int x = 3;
-        x = /*severe:STATIC_TYPE_ERROR*/"hi";
-      }
-    ''');
-  });
-
-  // If inferred type is `int`, error is also reported
-  test('infer type on var 2', () {
-    checkFile('''
-      test2() {
-        var x = 3;
-        x = /*severe:STATIC_TYPE_ERROR*/"hi";
-      }
-    ''');
-  });
-
-  test('No error when declared type is `num` and assigned null.', () {
-    checkFile('''
-        test1() {
-          num x = 3;
-          x = null;
-        }
-      ''');
-  });
-
-  test('do not infer type on dynamic', () {
-    checkFile('''
-      test() {
-        dynamic x = 3;
-        x = "hi";
-      }
-    ''');
-  });
-
-  test('do not infer type when initializer is null', () {
-    checkFile('''
-      test() {
-        var x = null;
-        x = "hi";
-        x = 3;
-      }
-    ''');
-  });
-
-  test('infer type on var from field', () {
-    checkFile('''
-      class A {
-        int x = 0;
-
-        test1() {
-          var a = x;
-          a = /*severe:STATIC_TYPE_ERROR*/"hi";
-          a = 3;
-          var b = y;
-          b = /*severe:STATIC_TYPE_ERROR*/"hi";
-          b = 4;
-          var c = z;
-          c = /*severe:STATIC_TYPE_ERROR*/"hi";
-          c = 4;
-        }
-
-        int y; // field def after use
-        final z = 42; // should infer `int`
-      }
-    ''');
-  });
-
-  test('infer type on var from top-level', () {
-    checkFile('''
-      int x = 0;
-
-      test1() {
-        var a = x;
-        a = /*severe:STATIC_TYPE_ERROR*/"hi";
-        a = 3;
-        var b = y;
-        b = /*severe:STATIC_TYPE_ERROR*/"hi";
-        b = 4;
-        var c = z;
-        c = /*severe:STATIC_TYPE_ERROR*/"hi";
-        c = 4;
-      }
-
-      int y = 0; // field def after use
-      final z = 42; // should infer `int`
-    ''');
-  });
-
-  test('do not infer field type when initializer is null', () {
-    checkFile('''
-      var x = null;
-      var y = 3;
-      class A {
-        static var x = null;
-        static var y = 3;
-
-        var x2 = null;
-        var y2 = 3;
-      }
-
-      test() {
-        x = "hi";
-        y = /*severe:STATIC_TYPE_ERROR*/"hi";
-        A.x = "hi";
-        A.y = /*severe:STATIC_TYPE_ERROR*/"hi";
-        new A().x2 = "hi";
-        new A().y2 = /*severe:STATIC_TYPE_ERROR*/"hi";
-      }
-    ''');
-  });
-
-  test('infer from variables in non-cycle imports with flag', () {
-    addFile(
-        '''
-          var x = 2;
-      ''',
-        name: '/a.dart');
-    checkFile('''
-          import 'a.dart';
-          var y = x;
-
-          test1() {
-            x = /*severe:STATIC_TYPE_ERROR*/"hi";
-            y = /*severe:STATIC_TYPE_ERROR*/"hi";
-          }
-    ''');
-  });
-
-  test('infer from variables in non-cycle imports with flag 2', () {
-    addFile(
-        '''
-          class A { static var x = 2; }
-      ''',
-        name: '/a.dart');
-    checkFile('''
-          import 'a.dart';
-          class B { static var y = A.x; }
-
-          test1() {
-            A.x = /*severe:STATIC_TYPE_ERROR*/"hi";
-            B.y = /*severe:STATIC_TYPE_ERROR*/"hi";
-          }
-    ''');
-  });
-
-  test('infer from variables in cycle libs when flag is on', () {
-    addFile(
-        '''
-          import 'main.dart';
-          var x = 2; // ok to infer
-      ''',
-        name: '/a.dart');
-    checkFile('''
-          import 'a.dart';
-          var y = x; // now ok :)
-
-          test1() {
-            int t = 3;
-            t = x;
-            t = y;
-          }
-    ''');
-  });
-
-  test('infer from variables in cycle libs when flag is on 2', () {
-    addFile(
-        '''
-          import 'main.dart';
-          class A { static var x = 2; }
-      ''',
-        name: '/a.dart');
-    checkFile('''
-          import 'a.dart';
-          class B { static var y = A.x; }
-
-          test1() {
-            int t = 3;
-            t = A.x;
-            t = B.y;
-          }
-    ''');
-  });
-
-  test('can infer also from static and instance fields (flag on)', () {
-    addFile(
-        '''
-          import 'b.dart';
-          class A {
-            static final a1 = B.b1;
-            final a2 = new B().b2;
-          }
-      ''',
-        name: '/a.dart');
-    addFile(
-        '''
-          class B {
-            static final b1 = 1;
-            final b2 = 1;
-          }
-      ''',
-        name: '/b.dart');
-    checkFile('''
-          import "a.dart";
-
-          test1() {
-            int x = 0;
-            // inference in A now works.
-            x = A.a1;
-            x = new A().a2;
-          }
-    ''');
-  });
-
-  test('inference in cycles is deterministic', () {
-    addFile(
-        '''
-          import 'b.dart';
-          class A {
-            static final a1 = B.b1;
-            final a2 = new B().b2;
-          }
-      ''',
-        name: '/a.dart');
-    addFile(
-        '''
-          class B {
-            static final b1 = 1;
-            final b2 = 1;
-          }
-      ''',
-        name: '/b.dart');
-    addFile(
-        '''
-          import "main.dart"; // creates a cycle
-
-          class C {
-            static final c1 = 1;
-            final c2 = 1;
-          }
-      ''',
-        name: '/c.dart');
-    addFile(
-        '''
-          library e;
-          import 'a.dart';
-          part 'e2.dart';
-
-          class E {
-            static final e1 = 1;
-            static final e2 = F.f1;
-            static final e3 = A.a1;
-            final e4 = 1;
-            final e5 = new F().f2;
-            final e6 = new A().a2;
-          }
-      ''',
-        name: '/e.dart');
-    addFile(
-        '''
-          part 'f2.dart';
-      ''',
-        name: '/f.dart');
-    addFile(
-        '''
-          part of e;
-          class F {
-            static final f1 = 1;
-            final f2 = 1;
-          }
-      ''',
-        name: '/e2.dart');
-    checkFile('''
-          import "a.dart";
-          import "c.dart";
-          import "e.dart";
-
-          class D {
-            static final d1 = A.a1 + 1;
-            static final d2 = C.c1 + 1;
-            final d3 = new A().a2;
-            final d4 = new C().c2;
-          }
-
-          test1() {
-            int x = 0;
-            // inference in A works, it's not in a cycle
-            x = A.a1;
-            x = new A().a2;
-
-            // Within a cycle we allow inference when the RHS is well known, but
-            // not when it depends on other fields within the cycle
-            x = C.c1;
-            x = D.d1;
-            x = D.d2;
-            x = new C().c2;
-            x = new D().d3;
-            x = /*info:DYNAMIC_CAST*/new D().d4;
-
-
-            // Similarly if the library contains parts.
-            x = E.e1;
-            x = E.e2;
-            x = E.e3;
-            x = new E().e4;
-            x = /*info:DYNAMIC_CAST*/new E().e5;
-            x = new E().e6;
-            x = F.f1;
-            x = new F().f2;
-          }
-    ''');
-  });
-
-  test('infer from complex expressions if the outer-most value is precise', () {
-    checkFile('''
-        class A { int x; B operator+(other) {} }
-        class B extends A { B(ignore); }
-        var a = new A();
-        // Note: it doesn't matter that some of these refer to 'x'.
-        var b = new B(/*warning:UNDEFINED_IDENTIFIER*/x);  // allocations
-        var c1 = [/*warning:UNDEFINED_IDENTIFIER*/x];      // list literals
-        var c2 = const [];
-        var d = <dynamic, dynamic>{'a': 'b'};     // map literals
-        var e = new A()..x = 3; // cascades
-        var f = 2 + 3;          // binary expressions are OK if the left operand
-                                // is from a library in a different strongest
-                                // conected component.
-        var g = -3;
-        var h = new A() + 3;
-        var i = /*warning:UNDEFINED_OPERATOR*/- new A();
-        var j = null as B;
-
-        test1() {
-          a = /*severe:STATIC_TYPE_ERROR*/"hi";
-          a = new B(3);
-          b = /*severe:STATIC_TYPE_ERROR*/"hi";
-          b = new B(3);
-          c1 = [];
-          c1 = /*severe:STATIC_TYPE_ERROR*/{};
-          c2 = [];
-          c2 = /*severe:STATIC_TYPE_ERROR*/{};
-          d = {};
-          d = /*severe:STATIC_TYPE_ERROR*/3;
-          e = new A();
-          e = /*severe:STATIC_TYPE_ERROR*/{};
-          f = 3;
-          f = /*severe:STATIC_TYPE_ERROR*/false;
-          g = 1;
-          g = /*severe:STATIC_TYPE_ERROR*/false;
-          h = /*severe:STATIC_TYPE_ERROR*/false;
-          h = new B('b');
-          i = false;
-          j = new B('b');
-          j = /*severe:STATIC_TYPE_ERROR*/false;
-          j = /*severe:STATIC_TYPE_ERROR*/[];
-        }
-    ''');
-  });
-
-  test('infer list literal nested in map literal', () {
-    checkFile(r'''
-class Resource {}
-class Folder extends Resource {}
-
-Resource getResource(String str) => null;
-
-class Foo<T> {
-  Foo(T t);
+  helper.initStrongModeTests();
+  runReflectiveTests(InferredTypeTest);
 }
 
+abstract class InferredTypeMixin {
+  /**
+   * Add a new file with the given [name] and [content].
+   */
+  void addFile(String content, {String name: '/main.dart'});
+
+  /**
+   * Add the file, process it (resolve, validate, etc) and return the resolved
+   * unit element.
+   */
+  CompilationUnitElement checkFile(String content);
+
+  void test_blockBodiedLambdas_async_allReturnsAreValues() {
+    var mainUnit = checkFile(r'''
+import 'dart:async';
+import 'dart:math' show Random;
+main() {
+  var f = /*info:INFERRED_TYPE_CLOSURE*/() async {
+    if (new Random().nextBool()) {
+      return 1;
+    } else {
+      return 2.0;
+    }
+  };
+  Future<num> g = f();
+  Future<int> h = /*info:ASSIGNMENT_CAST*/f();
+}
+''');
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → Future<num>');
+  }
+
+  void test_blockBodiedLambdas_async_alReturnsAreFutures() {
+    var mainUnit = checkFile(r'''
+import 'dart:async';
+import 'dart:math' show Random;
+main() {
+  var f = /*info:INFERRED_TYPE_CLOSURE*/() async {
+    if (new Random().nextBool()) {
+      return new Future<int>.value(1);
+    } else {
+      return new Future<double>.value(2.0);
+    }
+  };
+  Future<num> g = f();
+  Future<int> h = /*info:ASSIGNMENT_CAST*/f();
+}
+''');
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → Future<num>');
+  }
+
+  void test_blockBodiedLambdas_async_mixOfValuesAndFutures() {
+    var mainUnit = checkFile(r'''
+  import 'dart:async';
+  import 'dart:math' show Random;
+  main() {
+    var f = /*info:INFERRED_TYPE_CLOSURE*/() async {
+      if (new Random().nextBool()) {
+        return new Future<int>.value(1);
+      } else {
+        return 2.0;
+      }
+    };
+    Future<num> g = f();
+    Future<int> h = /*info:ASSIGNMENT_CAST*/f();
+  }
+''');
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → Future<num>');
+  }
+
+  void test_blockBodiedLambdas_asyncStar() {
+    var mainUnit = checkFile(r'''
+  import 'dart:async';
+  main() {
+    var f = /*info:INFERRED_TYPE_CLOSURE*/() async* {
+      yield 1;
+      Stream<double> s;
+      yield* s;
+    };
+    Stream<num> g = f();
+    Stream<int> h = /*info:ASSIGNMENT_CAST*/f();
+  }
+''');
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → Stream<num>');
+  }
+
+  void test_blockBodiedLambdas_basic() {
+    checkFile(r'''
+test1() {
+  List<int> o;
+  var y = o.map(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) { return x + 1; });
+  Iterable<int> z = y;
+}
+''');
+  }
+
+  void test_blockBodiedLambdas_basic_topLevel() {
+    checkFile(r'''
+List<int> o;
+var y = o.map(/*info:INFERRED_TYPE_CLOSURE*/(x) { return x + 1; });
+Iterable<int> z = y;
+''');
+  }
+
+  void test_blockBodiedLambdas_doesNotInferBottom_async() {
+    var mainUnit = checkFile(r'''
+import 'dart:async';
+main() async {
+  var f = () async { return null; };
+  Future y = f();
+  Future<String> z = /*warning:DOWN_CAST_COMPOSITE*/f();
+  String s = /*info:DYNAMIC_CAST*/await f();
+}
+''');
+
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → Future<dynamic>');
+  }
+
+  void test_blockBodiedLambdas_doesNotInferBottom_asyncStar() {
+    var mainUnit = checkFile(r'''
+import 'dart:async';
+main() async {
+  var f = () async* { yield null; };
+  Stream y = f();
+  Stream<String> z = /*warning:DOWN_CAST_COMPOSITE*/f();
+  String s = /*info:DYNAMIC_CAST*/await f().first;
+}
+''');
+
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → Stream<dynamic>');
+  }
+
+  void test_blockBodiedLambdas_doesNotInferBottom_sync() {
+    var mainUnit = checkFile(r'''
+var h = null;
+void foo(int f(Object _)) {}
+
 main() {
-  // List inside map
-  var map = <String, List<Folder>>{
-    'pkgA': /*info:INFERRED_TYPE_LITERAL*/[/*info:DOWN_CAST_IMPLICIT*/getResource('/pkgA/lib/')],
-    'pkgB': /*info:INFERRED_TYPE_LITERAL*/[/*info:DOWN_CAST_IMPLICIT*/getResource('/pkgB/lib/')]
-  };
-  // Also try map inside list
-  var list = <Map<String, Folder>>[
-    /*info:INFERRED_TYPE_LITERAL*/{ 'pkgA': /*info:DOWN_CAST_IMPLICIT*/getResource('/pkgA/lib/') },
-    /*info:INFERRED_TYPE_LITERAL*/{ 'pkgB': /*info:DOWN_CAST_IMPLICIT*/getResource('/pkgB/lib/') },
-  ];
-  // Instance creation too
-  var foo = new Foo<List<Folder>>(
-    /*info:INFERRED_TYPE_LITERAL*/[/*info:DOWN_CAST_IMPLICIT*/getResource('/pkgA/lib/')]
-  );
+  var f = (Object x) { return null; };
+  String y = /*info:DYNAMIC_CAST*/f(42);
+
+  f = /*info:INFERRED_TYPE_CLOSURE*/(x) => 'hello';
+
+  foo(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) { return null; });
+  foo(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) { throw "not implemented"; });
 }
-    ''');
-  });
+''');
 
-  // but flags can enable this behavior.
-  test('infer if complex expressions read possibly inferred field', () {
+    var f = mainUnit.functions[1].localVariables[0];
+    expect(f.type.toString(), '(Object) → dynamic');
+  }
+
+  void test_blockBodiedLambdas_doesNotInferBottom_syncStar() {
+    var mainUnit = checkFile(r'''
+main() {
+  var f = () sync* { yield null; };
+  Iterable y = f();
+  Iterable<String> z = /*warning:DOWN_CAST_COMPOSITE*/f();
+  String s = /*info:DYNAMIC_CAST*/f().first;
+}
+''');
+
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → Iterable<dynamic>');
+  }
+
+  void test_blockBodiedLambdas_downwardsIncompatibleWithUpwardsInference() {
+    var mainUnit = checkFile(r'''
+main() {
+  String f() => null;
+  var g = f;
+  g = /*info:INFERRED_TYPE_CLOSURE*/() { return /*warning:RETURN_OF_INVALID_TYPE*/1; };
+}
+''');
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → String');
+  }
+
+  void test_blockBodiedLambdas_LUB() {
+    checkFile(r'''
+import 'dart:math' show Random;
+test2() {
+  List<num> o;
+  var y = o.map(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) {
+    if (new Random().nextBool()) {
+      return x.toInt() + 1;
+    } else {
+      return x.toDouble();
+    }
+  });
+  Iterable<num> w = y;
+  Iterable<int> z = /*info:ASSIGNMENT_CAST*/y;
+}
+''');
+  }
+
+  void test_blockBodiedLambdas_LUB_topLevel() {
+    checkFile(r'''
+import 'dart:math' show Random;
+List<num> o;
+var y = o.map(/*info:INFERRED_TYPE_CLOSURE*/(x) {
+  if (new Random().nextBool()) {
+    return x.toInt() + 1;
+  } else {
+    return x.toDouble();
+  }
+});
+Iterable<num> w = y;
+Iterable<int> z = /*info:ASSIGNMENT_CAST*/y;
+''');
+  }
+
+  void test_blockBodiedLambdas_nestedLambdas() {
+    // Original feature request: https://github.com/dart-lang/sdk/issues/25487
+    var mainUnit = checkFile(r'''
+main() {
+  var f = /*info:INFERRED_TYPE_CLOSURE*/() {
+    return /*info:INFERRED_TYPE_CLOSURE*/(int x) { return 2.0 * x; };
+  };
+}
+''');
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → (int) → num');
+  }
+
+  void test_blockBodiedLambdas_noReturn() {
+    var mainUnit = checkFile(r'''
+test1() {
+  List<int> o;
+  var y = o.map(/*info:INFERRED_TYPE_CLOSURE*/(x) { });
+  Iterable<int> z = /*warning:DOWN_CAST_COMPOSITE*/y;
+}
+''');
+    var f = mainUnit.functions[0].localVariables[1];
+    expect(f.type.toString(), 'Iterable<dynamic>');
+  }
+
+  void test_blockBodiedLambdas_syncStar() {
+    var mainUnit = checkFile(r'''
+main() {
+  var f = /*info:INFERRED_TYPE_CLOSURE*/() sync* {
+    yield 1;
+    yield* [3, 4.0];
+  };
+  Iterable<num> g = f();
+  Iterable<int> h = /*info:ASSIGNMENT_CAST*/f();
+}
+''');
+    var f = mainUnit.functions[0].localVariables[0];
+    expect(f.type.toString(), '() → Iterable<num>');
+  }
+
+  void test_canInferAlsoFromStaticAndInstanceFieldsFlagOn() {
     addFile(
         '''
-        class A {
-          var x = 3;
-        }
-      ''',
+import 'b.dart';
+class A {
+  static final a1 = B.b1;
+  final a2 = new B().b2;
+}
+''',
         name: '/a.dart');
-    checkFile('''
-        import 'a.dart';
-        class B {
-          var y = 3;
-        }
-        final t1 = new A();
-        final t2 = new A().x;
-        final t3 = new B();
-        final t4 = new B().y;
-
-        test1() {
-          int i = 0;
-          A a;
-          B b;
-          a = t1;
-          i = t2;
-          b = t3;
-          i = /*info:DYNAMIC_CAST*/t4;
-          i = new B().y; // B.y was inferred though
-        }
-    ''');
-  });
-
-  group('infer types on loop indices', () {
-    test('foreach loop', () {
-      checkFile('''
-      class Foo {
-        int bar = 42;
-      }
-
-      class Bar<T extends Iterable<String>> {
-        void foo(T t) {
-          for (var i in t) {
-            int x = /*severe:STATIC_TYPE_ERROR*/i;
-          }
-        }
-      }
-
-      class Baz<T, E extends Iterable<T>, S extends E> {
-        void foo(S t) {
-          for (var i in t) {
-            int x = /*severe:STATIC_TYPE_ERROR*/i;
-            T y = i;
-          }
-        }
-      }
-
-      test() {
-        var list = <Foo>[];
-        for (var x in list) {
-          String y = /*severe:STATIC_TYPE_ERROR*/x;
-        }
-
-        for (dynamic x in list) {
-          String y = /*info:DYNAMIC_CAST*/x;
-        }
-
-        for (String x in /*severe:STATIC_TYPE_ERROR*/list) {
-          String y = x;
-        }
-
-        var z;
-        for(z in list) {
-          String y = /*info:DYNAMIC_CAST*/z;
-        }
-
-        Iterable iter = list;
-        for (Foo x in /*warning:DOWN_CAST_COMPOSITE*/iter) {
-          var y = x;
-        }
-
-        dynamic iter2 = list;
-        for (Foo x in /*warning:DOWN_CAST_COMPOSITE*/iter2) {
-          var y = x;
-        }
-
-        var map = <String, Foo>{};
-        // Error: map must be an Iterable.
-        for (var x in /*severe:STATIC_TYPE_ERROR*/map) {
-          String y = /*info:DYNAMIC_CAST*/x;
-        }
-
-        // We're not properly inferring that map.keys is an Iterable<String>
-        // and that x is a String.
-        for (var x in map.keys) {
-          String y = x;
-        }
-      }
-      ''');
-    });
-
-    test('for loop, with inference', () {
-      checkFile('''
-      test() {
-        for (var i = 0; i < 10; i++) {
-          int j = i + 1;
-        }
-      }
-      ''');
-    });
-  });
-
-  test('propagate inference to field in class', () {
-    checkFile('''
-      class A {
-        int x = 2;
-      }
-
-      test() {
-        var a = new A();
-        A b = a;                      // doesn't require down cast
-        print(a.x);     // doesn't require dynamic invoke
-        print(a.x + 2); // ok to use in bigger expression
-      }
-    ''');
-  });
-
-  test('propagate inference to field in class dynamic warnings', () {
-    checkFile('''
-      class A {
-        int x = 2;
-      }
-
-      test() {
-        dynamic a = new A();
-        A b = /*info:DYNAMIC_CAST*/a;
-        print(/*info:DYNAMIC_INVOKE*/a.x);
-        print(/*info:DYNAMIC_INVOKE*/(/*info:DYNAMIC_INVOKE*/a.x) + 2);
-      }
-    ''');
-  });
-
-  test('propagate inference transitively', () {
-    checkFile('''
-      class A {
-        int x = 2;
-      }
-
-      test5() {
-        var a1 = new A();
-        a1.x = /*severe:STATIC_TYPE_ERROR*/"hi";
-
-        A a2 = new A();
-        a2.x = /*severe:STATIC_TYPE_ERROR*/"hi";
-      }
-    ''');
-  });
-
-  test('propagate inference transitively 2', () {
-    checkFile('''
-      class A {
-        int x = 42;
-      }
-
-      class B {
-        A a = new A();
-      }
-
-      class C {
-        B b = new B();
-      }
-
-      class D {
-        C c = new C();
-      }
-
-      void main() {
-        var d1 = new D();
-        print(d1.c.b.a.x);
-
-        D d2 = new D();
-        print(d2.c.b.a.x);
-      }
-    ''');
-  });
-
-  group('infer type on overridden fields', () {
-    test('2', () {
-      checkFile('''
-        class A {
-          int x = 2;
-        }
-
-        class B extends A {
-          /*severe:INVALID_FIELD_OVERRIDE*/get x => 3;
-        }
-
-        foo() {
-          String y = /*severe:STATIC_TYPE_ERROR*/new B().x;
-          int z = new B().x;
-        }
-    ''');
-    });
-
-    test('4', () {
-      checkFile('''
-        class A {
-          int x = 2;
-        }
-
-        class B implements A {
-          get x => 3;
-        }
-
-        foo() {
-          String y = /*severe:STATIC_TYPE_ERROR*/new B().x;
-          int z = new B().x;
-        }
-    ''');
-    });
-  });
-
-  group('infer types on generic instantiations', () {
-    test('infer', () {
-      checkFile('''
-        class A<T> {
-          T x;
-        }
-
-        class B implements A<int> {
-          /*severe:INVALID_METHOD_OVERRIDE*/dynamic get x => 3;
-        }
-
-        foo() {
-          String y = /*info:DYNAMIC_CAST*/new B().x;
-          int z = /*info:DYNAMIC_CAST*/new B().x;
-        }
-    ''');
-    });
-
-    test('3', () {
-      checkFile('''
-        class A<T> {
-          T x;
-          T w;
-        }
-
-        class B implements A<int> {
-          get x => 3;
-          get w => /*severe:STATIC_TYPE_ERROR*/"hello";
-        }
-
-        foo() {
-          String y = /*severe:STATIC_TYPE_ERROR*/new B().x;
-          int z = new B().x;
-        }
-    ''');
-    });
-
-    test('4', () {
-      checkFile('''
-        class A<T> {
-          T x;
-        }
-
-        class B<E> extends A<E> {
-          E y;
-          /*severe:INVALID_FIELD_OVERRIDE*/get x => y;
-        }
-
-        foo() {
-          int y = /*severe:STATIC_TYPE_ERROR*/new B<String>().x;
-          String z = new B<String>().x;
-        }
-    ''');
-    });
-
-    test('5', () {
-      checkFile('''
-        abstract class I<E> {
-          String m(a, String f(v, E e));
-        }
-
-        abstract class A<E> implements I<E> {
-          const A();
-          String m(a, String f(v, E e));
-        }
-
-        abstract class M {
-          int y;
-        }
-
-        class B<E> extends A<E> implements M {
-          const B();
-          int get y => 0;
-
-          m(a, f(v, E e)) {}
-        }
-
-        foo () {
-          int y = /*severe:STATIC_TYPE_ERROR*/new B().m(null, null);
-          String z = new B().m(null, null);
-        }
-    ''');
-    });
-  });
-
-  test('infer type regardless of declaration order or cycles', () {
     addFile(
         '''
-        import 'main.dart';
-
-        class B extends A { }
-      ''',
+class B {
+  static final b1 = 1;
+  final b2 = 1;
+}
+''',
         name: '/b.dart');
     checkFile('''
-        import 'b.dart';
-        class C extends B {
-          get x;
-        }
-        class A {
-          int get x;
-        }
-        foo () {
-          int y = new C().x;
-          String z = /*severe:STATIC_TYPE_ERROR*/new C().x;
-        }
-    ''');
-  });
+import "a.dart";
 
-  // Note: this is a regression test for a non-deterministic behavior we used to
-  // have with inference in library cycles. If you see this test flake out,
-  // change `test` to `skip_test` and reopen bug #48.
-  test('infer types on generic instantiations in library cycle', () {
-    addFile(
-        '''
-          import 'main.dart';
-        abstract class I<E> {
-          A<E> m(a, String f(v, int e));
-        }
-      ''',
-        name: '/a.dart');
+test1() {
+  int x = 0;
+  // inference in A now works.
+  x = A.a1;
+  x = new A().a2;
+}
+''');
+  }
+
+  void test_conflictsCanHappen() {
     checkFile('''
-          import 'a.dart';
+class I1 {
+  int x;
+}
+class I2 extends I1 {
+  int y;
+}
 
-        abstract class A<E> implements I<E> {
-          const A();
+class A {
+  final I1 a = null;
+}
 
-          E value;
-        }
+class B {
+  final I2 a = null;
+}
 
-        abstract class M {
-          int y;
-        }
+class C1 implements A, B {
+  /*severe:INVALID_METHOD_OVERRIDE*/get a => null;
+}
 
-        class B<E> extends A<E> implements M {
-          const B();
-          int get y => 0;
+// Still ambiguous
+class C2 implements B, A {
+  /*severe:INVALID_METHOD_OVERRIDE*/get a => null;
+}
+''');
+  }
 
-          m(a, f(v, int e)) {}
-        }
-
-        foo () {
-          int y = /*severe:STATIC_TYPE_ERROR*/new B<String>().m(null, null).value;
-          String z = new B<String>().m(null, null).value;
-        }
-    ''');
-  });
-
-  group('do not infer overridden fields that explicitly say dynamic', () {
-    test('infer', () {
-      checkFile('''
-          class A {
-            int x = 2;
-          }
-
-          class B implements A {
-            /*severe:INVALID_METHOD_OVERRIDE*/dynamic get x => 3;
-          }
-
-          foo() {
-            String y = /*info:DYNAMIC_CAST*/new B().x;
-            int z = /*info:DYNAMIC_CAST*/new B().x;
-          }
-      ''');
-    });
-  });
-
-  test('conflicts can happen', () {
+  void test_conflictsCanHappen2() {
     checkFile('''
-        class I1 {
-          int x;
-        }
-        class I2 extends I1 {
-          int y;
-        }
+class I1 {
+  int x;
+}
+class I2 {
+  int y;
+}
 
-        class A {
-          final I1 a;
-        }
+class I3 implements I1, I2 {
+  int x;
+  int y;
+}
 
-        class B {
-          final I2 a;
-        }
+class A {
+  final I1 a = null;
+}
 
-        class C1 implements A, B {
-          /*severe:INVALID_METHOD_OVERRIDE*/get a => null;
-        }
+class B {
+  final I2 a = null;
+}
 
-        // Still ambiguous
-        class C2 implements B, A {
-          /*severe:INVALID_METHOD_OVERRIDE*/get a => null;
-        }
-    ''');
-  });
+class C1 implements A, B {
+  I3 get a => null;
+}
 
-  test('conflicts can happen 2', () {
+class C2 implements A, B {
+  /*severe:INVALID_METHOD_OVERRIDE*/get a => null;
+}
+''');
+  }
+
+  void test_doNotInferOverriddenFieldsThatExplicitlySayDynamic_infer() {
     checkFile('''
-        class I1 {
-          int x;
-        }
-        class I2 {
-          int y;
-        }
+class A {
+  final int x = 2;
+}
 
-        class I3 implements I1, I2 {
-          int x;
-          int y;
-        }
+class B implements A {
+  /*severe:INVALID_METHOD_OVERRIDE*/dynamic get x => 3;
+}
 
-        class A {
-          final I1 a;
-        }
+foo() {
+  String y = /*info:DYNAMIC_CAST*/new B().x;
+  int z = /*info:DYNAMIC_CAST*/new B().x;
+}
+''');
+  }
 
-        class B {
-          final I2 a;
-        }
-
-        class C1 implements A, B {
-          I3 get a => null;
-        }
-
-        class C2 implements A, B {
-          /*severe:INVALID_METHOD_OVERRIDE*/get a => null;
-        }
-    ''');
-  });
-
-  test('infer from RHS only if it wont conflict with overridden fields', () {
+  void test_dontInferFieldTypeWhenInitializerIsNull() {
     checkFile('''
-        class A {
-          var x;
-        }
+var x = null;
+var y = 3;
+class A {
+  static var x = null;
+  static var y = 3;
 
-        class B implements A {
-          var x = 2;
-        }
+  var x2 = null;
+  var y2 = 3;
+}
 
-        foo() {
-          String y = /*info:DYNAMIC_CAST*/new B().x;
-          int z = /*info:DYNAMIC_CAST*/new B().x;
-        }
-    ''');
-  });
+test() {
+  x = "hi";
+  y = /*warning:INVALID_ASSIGNMENT*/"hi";
+  A.x = "hi";
+  A.y = /*warning:INVALID_ASSIGNMENT*/"hi";
+  new A().x2 = "hi";
+  new A().y2 = /*warning:INVALID_ASSIGNMENT*/"hi";
+}
+''');
+  }
 
-  test('infer from RHS only if it wont conflict with overridden fields 2', () {
+  void test_dontInferTypeOnDynamic() {
     checkFile('''
-        class A {
-          final x;
-        }
+test() {
+  dynamic x = 3;
+  x = "hi";
+}
+''');
+  }
 
-        class B implements A {
-          final x = 2;
-        }
-
-        foo() {
-          String y = /*severe:STATIC_TYPE_ERROR*/new B().x;
-          int z = new B().x;
-        }
-    ''');
-  });
-
-  test('infer correctly on multiple variables declared together', () {
+  void test_dontInferTypeWhenInitializerIsNull() {
     checkFile('''
-        class A {
-          var x, y = 2, z = "hi";
-        }
+test() {
+  var x = null;
+  x = "hi";
+  x = 3;
+}
+''');
+  }
 
-        class B implements A {
-          var x = 2, y = 3, z, w = 2;
-        }
-
-        foo() {
-          String s;
-          int i;
-
-          s = /*info:DYNAMIC_CAST*/new B().x;
-          s = /*severe:STATIC_TYPE_ERROR*/new B().y;
-          s = new B().z;
-          s = /*severe:STATIC_TYPE_ERROR*/new B().w;
-
-          i = /*info:DYNAMIC_CAST*/new B().x;
-          i = new B().y;
-          i = /*severe:STATIC_TYPE_ERROR*/new B().z;
-          i = new B().w;
-        }
-    ''');
-  });
-
-  test('infer consts transitively', () {
-    addFile(
-        '''
-        const b1 = 2;
-      ''',
-        name: '/b.dart');
-    addFile(
-        '''
-        import 'main.dart';
-        import 'b.dart';
-        const a1 = m2;
-        const a2 = b1;
-      ''',
-        name: '/a.dart');
+  void test_downwardInference_miscellaneous() {
     checkFile('''
-        import 'a.dart';
-        const m1 = a1;
-        const m2 = a2;
+typedef T Function2<S, T>(S x);
+class A<T> {
+  Function2<T, T> x;
+  A(this.x);
+}
+void main() {
+  {  // Variables, nested literals
+    var x = "hello";
+    var y = 3;
+    void f(List<Map<int, String>> l) {};
+    f(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/{y: x}]);
+  }
+  {
+    int f(int x) => 0;
+    A<int> a = /*info:INFERRED_TYPE_ALLOCATION*/new A(f);
+  }
+}
+''');
+  }
 
-        foo() {
-          int i;
-          i = m1;
-        }
-    ''');
-  });
-
-  test('infer statics transitively', () {
-    addFile(
-        '''
-        final b1 = 2;
-      ''',
-        name: '/b.dart');
-    addFile(
-        '''
-        import 'main.dart';
-        import 'b.dart';
-        final a1 = m2;
-        class A {
-          static final a2 = b1;
-        }
-      ''',
-        name: '/a.dart');
+  void test_downwardsInferenceAnnotations() {
     checkFile('''
-        import 'a.dart';
-        final m1 = a1;
-        final m2 = A.a2;
+class Foo {
+  const Foo(List<String> l);
+  const Foo.named(List<String> l);
+}
+@Foo(/*info:INFERRED_TYPE_LITERAL*/const [])
+class Bar {}
+@Foo.named(/*info:INFERRED_TYPE_LITERAL*/const [])
+class Baz {}
+''');
+  }
 
-        foo() {
-          int i;
-          i = m1;
-        }
-    ''');
-  });
-
-  test('infer statics transitively 2', () {
+  void test_downwardsInferenceAssignmentStatements() {
     checkFile('''
-        const x1 = 1;
-        final x2 = 1;
-        final y1 = x1;
-        final y2 = x2;
+void main() {
+  List<int> l;
+  l = /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"];
+  l = (l = /*info:INFERRED_TYPE_LITERAL*/[1]);
+}
+''');
+  }
 
-        foo() {
-          int i;
-          i = y1;
-          i = y2;
-        }
-    ''');
-  });
-
-  test('infer statics transitively 3', () {
-    addFile(
-        '''
-        const a1 = 3;
-        const a2 = 4;
-        class A {
-          static const a3 = null;
-        }
-      ''',
-        name: '/a.dart');
+  void test_downwardsInferenceAsyncAwait() {
     checkFile('''
-        import 'a.dart' show a1, A;
-        import 'a.dart' as p show a2, A;
-        const t1 = 1;
-        const t2 = t1;
-        const t3 = a1;
-        const t4 = p.a2;
-        const t5 = A.a3;
-        const t6 = p.A.a3;
+import 'dart:async';
+Future test() async {
+  dynamic d;
+  List<int> l0 = /*warning:DOWN_CAST_COMPOSITE should be pass*/await /*pass should be info:INFERRED_TYPE_LITERAL*/[d];
+  List<int> l1 = await /*info:INFERRED_TYPE_ALLOCATION*/new Future.value(/*info:INFERRED_TYPE_LITERAL*/[/*info:DYNAMIC_CAST*/d]);
+}
+''');
+  }
 
-        foo() {
-          int i;
-          i = t1;
-          i = t2;
-          i = t3;
-          i = t4;
-        }
-    ''');
-  });
-
-  test('infer statics with method invocations', () {
-    addFile(
-        '''
-        m3(String a, String b, [a1,a2]) {}
-      ''',
-        name: '/a.dart');
+  void test_downwardsInferenceForEach() {
     checkFile('''
-        import 'a.dart';
-        class T {
-          static final T foo = m1(m2(m3('', '')));
-          static T m1(String m) { return null; }
-          static String m2(e) { return ''; }
-        }
+import 'dart:async';
+Future main() async {
+  for(int x in /*info:INFERRED_TYPE_LITERAL*/[1, 2, 3]) {}
+  await for(int x in /*info:INFERRED_TYPE_ALLOCATION*/new Stream()) {}
+}
+''');
+  }
 
-
-    ''');
-  });
-
-  test('downwards inference: miscellaneous', () {
+  void test_downwardsInferenceInitializingFormalDefaultFormal() {
     checkFile('''
-      typedef T Function2<S, T>(S x);
-      class A<T> {
-        Function2<T, T> x;
-        A(this.x);
-      }
-      void main() {
-          {  // Variables, nested literals
-            var x = "hello";
-            var y = 3;
-            void f(List<Map<int, String>> l) {};
-            f(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/{y: x}]);
-          }
-          {
-            int f(int x) {};
-            A<int> a = /*info:INFERRED_TYPE_ALLOCATION*/new A(f);
-          }
-      }
-      ''');
-  });
+typedef T Function2<S, T>([S x]);
+class Foo {
+  List<int> x;
+  Foo([this.x = /*info:INFERRED_TYPE_LITERAL*/const [1]]);
+  Foo.named([List<int> x = /*info:INFERRED_TYPE_LITERAL*/const [1]]);
+}
+void f([List<int> l = /*info:INFERRED_TYPE_LITERAL*/const [1]]) {}
+// We do this inference in an early task but don't preserve the infos.
+Function2<List<int>, String> g = /*pass should be info:INFERRED_TYPE_CLOSURE*/([llll = /*info:INFERRED_TYPE_LITERAL*/const [1]]) => "hello";
+''');
+  }
 
-  group('downwards inference on instance creations', () {
-    test('infer downwards', () {
-      checkFile('''
-      class A<S, T> {
-        S x;
-        T y;
-        A(this.x, this.y);
-        A.named(this.x, this.y);
-      }
+  void test_downwardsInferenceOnConstructorArguments_inferDownwards() {
+    checkFile('''
+class F0 {
+  F0(List<int> a) {}
+}
+class F1 {
+  F1({List<int> a}) {}
+}
+class F2 {
+  F2(Iterable<int> a) {}
+}
+class F3 {
+  F3(Iterable<Iterable<int>> a) {}
+}
+class F4 {
+  F4({Iterable<Iterable<int>> a}) {}
+}
+void main() {
+  new F0(/*info:INFERRED_TYPE_LITERAL*/[]);
+  new F0(/*info:INFERRED_TYPE_LITERAL*/[3]);
+  new F0(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  new F0(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello",
+                                      3]);
 
-      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);
-      }
+  new F1(a: /*info:INFERRED_TYPE_LITERAL*/[]);
+  new F1(a: /*info:INFERRED_TYPE_LITERAL*/[3]);
+  new F1(a: /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  new F1(a: /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3]);
 
-      class C<S> extends B<S, S> {
-        C(S a) : super(a, a);
-        C.named(S a) : super.named(a, a);
-      }
+  new F2(/*info:INFERRED_TYPE_LITERAL*/[]);
+  new F2(/*info:INFERRED_TYPE_LITERAL*/[3]);
+  new F2(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  new F2(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3]);
 
-      class D<S, T> extends B<T, int> {
-        D(T a) : super(a, 3);
-        D.named(T a) : super.named(a, 3);
-      }
+  new F3(/*info:INFERRED_TYPE_LITERAL*/[]);
+  new F3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
+  new F3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]]);
+  new F3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"],
+                   /*info:INFERRED_TYPE_LITERAL*/[3]]);
 
-      class E<S, T> extends A<C<S>, T> {
-        E(T a) : super(null, a);
-      }
+  new F4(a: /*info:INFERRED_TYPE_LITERAL*/[]);
+  new F4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
+  new F4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]]);
+  new F4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"],
+                      /*info:INFERRED_TYPE_LITERAL*/[3]]);
+}
+''');
+  }
 
-      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 test_downwardsInferenceOnFunctionArguments_inferDownwards() {
+    checkFile('''
+void f0(List<int> a) {}
+void f1({List<int> a}) {}
+void f2(Iterable<int> a) {}
+void f3(Iterable<Iterable<int>> a) {}
+void f4({Iterable<Iterable<int>> a}) {}
+void main() {
+  f0(/*info:INFERRED_TYPE_LITERAL*/[]);
+  f0(/*info:INFERRED_TYPE_LITERAL*/[3]);
+  f0(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  f0(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3]);
 
-      void main() {
-        {
-          A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new A(3, "hello");
-          A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/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 = /*severe:STATIC_TYPE_ERROR*/new A<int, dynamic>(3, "hello");
-          A<int, String> a5 = /*severe:STATIC_TYPE_ERROR*/new A<dynamic, dynamic>.named(3, "hello");
-        }
-        {
-          A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new A(/*severe:STATIC_TYPE_ERROR*/"hello", /*severe:STATIC_TYPE_ERROR*/3);
-          A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new A.named(/*severe:STATIC_TYPE_ERROR*/"hello", /*severe:STATIC_TYPE_ERROR*/3);
-        }
-        {
-          A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new B("hello", 3);
-          A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/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 = /*severe:STATIC_TYPE_ERROR*/new B<String, dynamic>("hello", 3);
-          A<int, String> a5 = /*severe:STATIC_TYPE_ERROR*/new B<dynamic, dynamic>.named("hello", 3);
-        }
-        {
-          A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new B(/*severe:STATIC_TYPE_ERROR*/3, /*severe:STATIC_TYPE_ERROR*/"hello");
-          A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new B.named(/*severe:STATIC_TYPE_ERROR*/3, /*severe:STATIC_TYPE_ERROR*/"hello");
-        }
-        {
-          A<int, int> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new C(3);
-          A<int, int> a1 = /*info:INFERRED_TYPE_ALLOCATION*/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 = /*severe:STATIC_TYPE_ERROR*/new C<dynamic>(3);
-          A<int, int> a5 = /*severe:STATIC_TYPE_ERROR*/new C<dynamic>.named(3);
-        }
-        {
-          A<int, int> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new C(/*severe:STATIC_TYPE_ERROR*/"hello");
-          A<int, int> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new C.named(/*severe:STATIC_TYPE_ERROR*/"hello");
-        }
-        {
-          A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new D("hello");
-          A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/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 = /*severe:STATIC_TYPE_ERROR*/new D<num, dynamic>("hello");
-          A<int, String> a5 = /*severe:STATIC_TYPE_ERROR*/new D<dynamic, dynamic>.named("hello");
-        }
-        {
-          A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new D(/*severe:STATIC_TYPE_ERROR*/3);
-          A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new D.named(/*severe:STATIC_TYPE_ERROR*/3);
-        }
-        { // Currently we only allow variable constraints.  Test that we reject.
-          A<C<int>, String> a0 = /*severe:STATIC_TYPE_ERROR*/new E("hello");
-        }
-        { // Check named and optional arguments
-          A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new F(3, "hello", a: /*info:INFERRED_TYPE_LITERAL*/[3], b: /*info:INFERRED_TYPE_LITERAL*/["hello"]);
-          A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new F(3, "hello", a: /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"], b: /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/3]);
-          A<int, String> a2 = /*info:INFERRED_TYPE_ALLOCATION*/new F.named(3, "hello", 3, "hello");
-          A<int, String> a3 = /*info:INFERRED_TYPE_ALLOCATION*/new F.named(3, "hello");
-          A<int, String> a4 = /*info:INFERRED_TYPE_ALLOCATION*/new F.named(3, "hello", /*severe:STATIC_TYPE_ERROR*/"hello", /*severe:STATIC_TYPE_ERROR*/3);
-          A<int, String> a5 = /*info:INFERRED_TYPE_ALLOCATION*/new F.named(3, "hello", /*severe:STATIC_TYPE_ERROR*/"hello");
-        }
-      }
-        ''');
-    });
-  });
+  f1(a: /*info:INFERRED_TYPE_LITERAL*/[]);
+  f1(a: /*info:INFERRED_TYPE_LITERAL*/[3]);
+  f1(a: /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  f1(a: /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3]);
 
-  group('downwards inference on list literals', () {
-    test('infer downwards', () {
-      checkFile('''
-      void foo([List<String> list1 = /*info:INFERRED_TYPE_LITERAL*/const [],
-                List<String> list2 = /*info:INFERRED_TYPE_LITERAL*/const [/*severe:STATIC_TYPE_ERROR*/42]]) {
-      }
+  f2(/*info:INFERRED_TYPE_LITERAL*/[]);
+  f2(/*info:INFERRED_TYPE_LITERAL*/[3]);
+  f2(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  f2(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3]);
 
-      void main() {
-        {
-          List<int> l0 = /*info:INFERRED_TYPE_LITERAL*/[];
-          List<int> l1 = /*info:INFERRED_TYPE_LITERAL*/[3];
-          List<int> l2 = /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"];
-          List<int> l3 = /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3];
-        }
-        {
-          List<dynamic> l0 = [];
-          List<dynamic> l1 = [3];
-          List<dynamic> l2 = ["hello"];
-          List<dynamic> l3 = ["hello", 3];
-        }
-        {
-          List<int> l0 = /*severe:STATIC_TYPE_ERROR*/<num>[];
-          List<int> l1 = /*severe:STATIC_TYPE_ERROR*/<num>[3];
-          List<int> l2 = /*severe:STATIC_TYPE_ERROR*/<num>[/*severe:STATIC_TYPE_ERROR*/"hello"];
-          List<int> l3 = /*severe:STATIC_TYPE_ERROR*/<num>[/*severe:STATIC_TYPE_ERROR*/"hello", 3];
-        }
-        {
-          Iterable<int> i0 = /*info:INFERRED_TYPE_LITERAL*/[];
-          Iterable<int> i1 = /*info:INFERRED_TYPE_LITERAL*/[3];
-          Iterable<int> i2 = /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"];
-          Iterable<int> i3 = /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3];
-        }
-        {
-          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 [/*severe:STATIC_TYPE_ERROR*/"hello"];
-          const List<int> c3 = /*info:INFERRED_TYPE_LITERAL*/const [/*severe:STATIC_TYPE_ERROR*/"hello", 3];
-        }
-      }
-      ''');
-    });
+  f3(/*info:INFERRED_TYPE_LITERAL*/[]);
+  f3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
+  f3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]]);
+  f3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"], /*info:INFERRED_TYPE_LITERAL*/[3]]);
 
-    test('infer if value types match context', () {
-      checkFile(r'''
+  f4(a: /*info:INFERRED_TYPE_LITERAL*/[]);
+  f4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
+  f4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]]);
+  f4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"], /*info:INFERRED_TYPE_LITERAL*/[3]]);
+}
+''');
+  }
+
+  void test_downwardsInferenceOnFunctionExpressions() {
+    checkFile('''
+typedef T Function2<S, T>(S x);
+
+void main () {
+  {
+    Function2<int, String> l0 = /*info:INFERRED_TYPE_CLOSURE*/(int x) => null;
+    Function2<int, String> l1 = (int x) => "hello";
+    Function2<int, String> l2 = /*warning:INVALID_ASSIGNMENT*/(String x) => "hello";
+    Function2<int, String> l3 = /*warning:INVALID_ASSIGNMENT*/(int x) => 3;
+    Function2<int, String> l4 = /*info:INFERRED_TYPE_CLOSURE*/(int x) {return /*warning:RETURN_OF_INVALID_TYPE*/3;};
+  }
+  {
+    Function2<int, String> l0 = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*/(x) => null;
+    Function2<int, String> l1 = /*info:INFERRED_TYPE_CLOSURE*/(x) => "hello";
+    Function2<int, String> l2 = /*info:INFERRED_TYPE_CLOSURE, warning:INVALID_ASSIGNMENT*/(x) => 3;
+    Function2<int, String> l3 = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*/(x) {return /*warning:RETURN_OF_INVALID_TYPE*/3;};
+    Function2<int, String> l4 = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*/(x) {return /*warning:RETURN_OF_INVALID_TYPE*/x;};
+  }
+  {
+    Function2<int, List<String>> l0 = /*info:INFERRED_TYPE_CLOSURE*/(int x) => null;
+    Function2<int, List<String>> l1 = (int x) => /*info:INFERRED_TYPE_LITERAL*/["hello"];
+    Function2<int, List<String>> l2 = /*warning:INVALID_ASSIGNMENT*/(String x) => /*info:INFERRED_TYPE_LITERAL*/["hello"];
+    Function2<int, List<String>> l3 = (int x) => /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/3];
+    Function2<int, List<String>> l4 = /*info:INFERRED_TYPE_CLOSURE*/(int x) {return /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/3];};
+  }
+  {
+    Function2<int, int> l0 = /*info:INFERRED_TYPE_CLOSURE*/(x) => x;
+    Function2<int, int> l1 = /*info:INFERRED_TYPE_CLOSURE*/(x) => x+1;
+    Function2<int, String> l2 = /*info:INFERRED_TYPE_CLOSURE, warning:INVALID_ASSIGNMENT*/(x) => x;
+    Function2<int, String> l3 = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*/(x) => /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/x.substring(3);
+    Function2<String, String> l4 = /*info:INFERRED_TYPE_CLOSURE*/(x) => x.substring(3);
+  }
+}
+''');
+  }
+
+  void test_downwardsInferenceOnFunctionOfTUsingTheT() {
+    checkFile('''
+void main () {
+  {
+    /*=T*/ f/*<T>*/(/*=T*/ x) => null;
+    var v1 = f;
+    v1 = /*info:INFERRED_TYPE_CLOSURE*//*<S>*/(x) => x;
+  }
+  {
+    /*=List<T>*/ f/*<T>*/(/*=T*/ x) => null;
+    var v2 = f;
+    v2 = /*info:INFERRED_TYPE_CLOSURE*//*<S>*/(x) => /*info:INFERRED_TYPE_LITERAL*/[x];
+    Iterable<int> r = v2(42);
+    Iterable<String> s = v2('hello');
+    Iterable<List<int>> t = v2(<int>[]);
+    Iterable<num> u = v2(42);
+    Iterable<num> v = v2/*<num>*/(42);
+  }
+}
+''');
+  }
+
+  void test_downwardsInferenceOnGenericConstructorArguments_inferDownwards() {
+    checkFile('''
+class F0<T> {
+  F0(List<T> a) {}
+}
+class F1<T> {
+  F1({List<T> a}) {}
+}
+class F2<T> {
+  F2(Iterable<T> a) {}
+}
+class F3<T> {
+  F3(Iterable<Iterable<T>> a) {}
+}
+class F4<T> {
+  F4({Iterable<Iterable<T>> a}) {}
+}
+void main() {
+  new F0<int>(/*info:INFERRED_TYPE_LITERAL*/[]);
+  new F0<int>(/*info:INFERRED_TYPE_LITERAL*/[3]);
+  new F0<int>(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  new F0<int>(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello",
+                                      3]);
+
+  new F1<int>(a: /*info:INFERRED_TYPE_LITERAL*/[]);
+  new F1<int>(a: /*info:INFERRED_TYPE_LITERAL*/[3]);
+  new F1<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  new F1<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3]);
+
+  new F2<int>(/*info:INFERRED_TYPE_LITERAL*/[]);
+  new F2<int>(/*info:INFERRED_TYPE_LITERAL*/[3]);
+  new F2<int>(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]);
+  new F2<int>(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3]);
+
+  new F3<int>(/*info:INFERRED_TYPE_LITERAL*/[]);
+  new F3<int>(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
+  new F3<int>(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]]);
+  new F3<int>(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"],
+                   /*info:INFERRED_TYPE_LITERAL*/[3]]);
+
+  new F4<int>(a: /*info:INFERRED_TYPE_LITERAL*/[]);
+  new F4<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
+  new F4<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"]]);
+  new F4<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"],
+                      /*info:INFERRED_TYPE_LITERAL*/[3]]);
+
+  new F3(/*info:INFERRED_TYPE_LITERAL*/[]);
+  new F3(/*info:INFERRED_TYPE_LITERAL*/[[3]]);
+  new F3(/*info:INFERRED_TYPE_LITERAL*/[["hello"]]);
+  new F3(/*info:INFERRED_TYPE_LITERAL*/[["hello"], [3]]);
+
+  new F4(a: /*info:INFERRED_TYPE_LITERAL*/[]);
+  new F4(a: /*info:INFERRED_TYPE_LITERAL*/[[3]]);
+  new F4(a: /*info:INFERRED_TYPE_LITERAL*/[["hello"]]);
+  new F4(a: /*info:INFERRED_TYPE_LITERAL*/[["hello"], [3]]);
+}
+''');
+  }
+
+  void test_downwardsInferenceOnGenericFunctionExpressions() {
+    checkFile('''
+void main () {
+  {
+    String f/*<S>*/(int x) => null;
+    var v = f;
+    v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(int x) => null;
+    v = /*<T>*/(int x) => "hello";
+    v = /*warning:INVALID_ASSIGNMENT*//*<T>*/(String x) => "hello";
+    v = /*warning:INVALID_ASSIGNMENT*//*<T>*/(int x) => 3;
+    v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(int x) {return /*warning:RETURN_OF_INVALID_TYPE*/3;};
+  }
+  {
+    String f/*<S>*/(int x) => null;
+    var v = f;
+    v = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => null;
+    v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => "hello";
+    v = /*info:INFERRED_TYPE_CLOSURE, warning:INVALID_ASSIGNMENT*//*<T>*/(x) => 3;
+    v = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) {return /*warning:RETURN_OF_INVALID_TYPE*/3;};
+    v = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) {return /*warning:RETURN_OF_INVALID_TYPE*/x;};
+  }
+  {
+    List<String> f/*<S>*/(int x) => null;
+    var v = f;
+    v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(int x) => null;
+    v = /*<T>*/(int x) => /*info:INFERRED_TYPE_LITERAL*/["hello"];
+    v = /*warning:INVALID_ASSIGNMENT*//*<T>*/(String x) => /*info:INFERRED_TYPE_LITERAL*/["hello"];
+    v = /*<T>*/(int x) => /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/3];
+    v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(int x) {return /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/3];};
+  }
+  {
+    int int2int/*<S>*/(int x) => null;
+    String int2String/*<T>*/(int x) => null;
+    String string2String/*<T>*/(String x) => null;
+    var x = int2int;
+    x = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => x;
+    x = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => x+1;
+    var y = int2String;
+    y = /*info:INFERRED_TYPE_CLOSURE, warning:INVALID_ASSIGNMENT*//*<T>*/(x) => x;
+    y = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => /*info:DYNAMIC_INVOKE, info:DYNAMIC_CAST*/x.substring(3);
+    var z = string2String;
+    z = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => x.substring(3);
+  }
+}
+''');
+  }
+
+  void test_downwardsInferenceOnInstanceCreations_inferDownwards() {
+    checkFile('''
+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 main() {
+  {
+    A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new A(3, "hello");
+    A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/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 = /*severe:STATIC_TYPE_ERROR*/new A<int, dynamic>(3, "hello");
+    A<int, String> a5 = /*severe:STATIC_TYPE_ERROR*/new A<dynamic, dynamic>.named(3, "hello");
+  }
+  {
+    A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new A(
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello",
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
+    A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new A.named(
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello",
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
+  }
+  {
+    A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new B("hello", 3);
+    A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/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 = /*severe:STATIC_TYPE_ERROR*/new B<String, dynamic>("hello", 3);
+    A<int, String> a5 = /*severe:STATIC_TYPE_ERROR*/new B<dynamic, dynamic>.named("hello", 3);
+  }
+  {
+    A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new B(
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3,
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello");
+    A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new B.named(
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3,
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello");
+  }
+  {
+    A<int, int> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new C(3);
+    A<int, int> a1 = /*info:INFERRED_TYPE_ALLOCATION*/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 = /*severe:STATIC_TYPE_ERROR*/new C<dynamic>(3);
+    A<int, int> a5 = /*severe:STATIC_TYPE_ERROR*/new C<dynamic>.named(3);
+  }
+  {
+    A<int, int> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new C(
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello");
+    A<int, int> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new C.named(
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello");
+  }
+  {
+    A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new D("hello");
+    A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/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 = /*severe:STATIC_TYPE_ERROR*/new D<num, dynamic>("hello");
+    A<int, String> a5 = /*severe:STATIC_TYPE_ERROR*/new D<dynamic, dynamic>.named("hello");
+  }
+  {
+    A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new D(
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
+    A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new D.named(
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
+  }
+  { // Currently we only allow variable constraints.  Test that we reject.
+    A<C<int>, String> a0 = /*severe:STATIC_TYPE_ERROR*/new E("hello");
+  }
+  { // Check named and optional arguments
+    A<int, String> a0 = /*info:INFERRED_TYPE_ALLOCATION*/new F(3, "hello",
+        a: /*info:INFERRED_TYPE_LITERAL*/[3],
+        b: /*info:INFERRED_TYPE_LITERAL*/["hello"]);
+    A<int, String> a1 = /*info:INFERRED_TYPE_ALLOCATION*/new F(3, "hello",
+        a: /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"],
+        b: /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/3]);
+    A<int, String> a2 = /*info:INFERRED_TYPE_ALLOCATION*/new F.named(3, "hello", 3, "hello");
+    A<int, String> a3 = /*info:INFERRED_TYPE_ALLOCATION*/new F.named(3, "hello");
+    A<int, String> a4 = /*info:INFERRED_TYPE_ALLOCATION*/new F.named(3, "hello",
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello", /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
+    A<int, String> a5 = /*info:INFERRED_TYPE_ALLOCATION*/new F.named(3, "hello",
+        /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hello");
+  }
+}
+  ''');
+  }
+
+  void test_downwardsInferenceOnListLiterals_inferDownwards() {
+    checkFile('''
+void foo([List<String> list1 = /*info:INFERRED_TYPE_LITERAL*/const [],
+          List<String> list2 = /*info:INFERRED_TYPE_LITERAL*/const [/*severe:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/42]]) {
+}
+
+void main() {
+  {
+    List<int> l0 = /*info:INFERRED_TYPE_LITERAL*/[];
+    List<int> l1 = /*info:INFERRED_TYPE_LITERAL*/[3];
+    List<int> l2 = /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"];
+    List<int> l3 = /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3];
+  }
+  {
+    List<dynamic> l0 = [];
+    List<dynamic> l1 = [3];
+    List<dynamic> l2 = ["hello"];
+    List<dynamic> l3 = ["hello", 3];
+  }
+  {
+    List<int> l0 = /*severe:STATIC_TYPE_ERROR*/<num>[];
+    List<int> l1 = /*severe:STATIC_TYPE_ERROR*/<num>[3];
+    List<int> l2 = /*severe:STATIC_TYPE_ERROR*/<num>[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"];
+    List<int> l3 = /*severe:STATIC_TYPE_ERROR*/<num>[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3];
+  }
+  {
+    Iterable<int> i0 = /*info:INFERRED_TYPE_LITERAL*/[];
+    Iterable<int> i1 = /*info:INFERRED_TYPE_LITERAL*/[3];
+    Iterable<int> i2 = /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"];
+    Iterable<int> i3 = /*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3];
+  }
+  {
+    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 [/*severe:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"];
+    const List<int> c3 = /*info:INFERRED_TYPE_LITERAL*/const [/*severe:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3];
+  }
+}
+''');
+  }
+
+  void test_downwardsInferenceOnListLiterals_inferIfValueTypesMatchContext() {
+    checkFile(r'''
 class DartType {}
 typedef void Asserter<T>(T type);
 typedef Asserter<T> AsserterBuilder<S, T>(S arg);
@@ -1217,9 +933,9 @@
     assertDOf(/*info:INFERRED_TYPE_LITERAL*/[_isInt, _isString]);
     assertEOf(/*info:INFERRED_TYPE_LITERAL*/[_isInt, _isString]);
   }
-}
+  }
 
-abstract class G<T> {
+  abstract class G<T> {
   AsserterBuilder<List<Asserter<DartType>>, DartType> assertAOf;
   AsserterBuilder<List<Asserter<DartType>>, DartType> get assertDOf;
 
@@ -1250,542 +966,305 @@
   g.assertAOf(/*info:INFERRED_TYPE_LITERAL*/[_isInt, _isString]);
   g.assertDOf(/*info:INFERRED_TYPE_LITERAL*/[_isInt, _isString]);
 }
-    ''');
-    });
-  });
+  ''');
+  }
 
-  group('downwards inference on function arguments', () {
-    test('infer downwards', () {
-      checkFile('''
-      void f0(List<int> a) {}
-      void f1({List<int> a}) {}
-      void f2(Iterable<int> a) {}
-      void f3(Iterable<Iterable<int>> a) {}
-      void f4({Iterable<Iterable<int>> a}) {}
-      void main() {
-        f0(/*info:INFERRED_TYPE_LITERAL*/[]);
-        f0(/*info:INFERRED_TYPE_LITERAL*/[3]);
-        f0(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        f0(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3]);
-
-        f1(a: /*info:INFERRED_TYPE_LITERAL*/[]);
-        f1(a: /*info:INFERRED_TYPE_LITERAL*/[3]);
-        f1(a: /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        f1(a: /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3]);
-
-        f2(/*info:INFERRED_TYPE_LITERAL*/[]);
-        f2(/*info:INFERRED_TYPE_LITERAL*/[3]);
-        f2(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        f2(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3]);
-
-        f3(/*info:INFERRED_TYPE_LITERAL*/[]);
-        f3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
-        f3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]]);
-        f3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"], /*info:INFERRED_TYPE_LITERAL*/[3]]);
-
-        f4(a: /*info:INFERRED_TYPE_LITERAL*/[]);
-        f4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
-        f4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]]);
-        f4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"], /*info:INFERRED_TYPE_LITERAL*/[3]]);
-      }
-      ''');
-    });
-  });
-
-  group('downwards inference on constructor arguments', () {
-    test('infer downwards', () {
-      checkFile('''
-      class F0 {
-        F0(List<int> a) {}
-      }
-      class F1 {
-        F1({List<int> a}) {}
-      }
-      class F2 {
-        F2(Iterable<int> a) {}
-      }
-      class F3 {
-        F3(Iterable<Iterable<int>> a) {}
-      }
-      class F4 {
-        F4({Iterable<Iterable<int>> a}) {}
-      }
-      void main() {
-        new F0(/*info:INFERRED_TYPE_LITERAL*/[]);
-        new F0(/*info:INFERRED_TYPE_LITERAL*/[3]);
-        new F0(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        new F0(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello",
-                                            3]);
-
-        new F1(a: /*info:INFERRED_TYPE_LITERAL*/[]);
-        new F1(a: /*info:INFERRED_TYPE_LITERAL*/[3]);
-        new F1(a: /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        new F1(a: /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3]);
-
-        new F2(/*info:INFERRED_TYPE_LITERAL*/[]);
-        new F2(/*info:INFERRED_TYPE_LITERAL*/[3]);
-        new F2(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        new F2(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3]);
-
-        new F3(/*info:INFERRED_TYPE_LITERAL*/[]);
-        new F3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
-        new F3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]]);
-        new F3(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"],
-                         /*info:INFERRED_TYPE_LITERAL*/[3]]);
-
-        new F4(a: /*info:INFERRED_TYPE_LITERAL*/[]);
-        new F4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
-        new F4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]]);
-        new F4(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"],
-                            /*info:INFERRED_TYPE_LITERAL*/[3]]);
-      }
-      ''');
-    });
-  });
-
-  group('downwards inference on generic constructor arguments', () {
-    test('infer downwards', () {
-      checkFile('''
-      class F0<T> {
-        F0(List<T> a) {}
-      }
-      class F1<T> {
-        F1({List<T> a}) {}
-      }
-      class F2<T> {
-        F2(Iterable<T> a) {}
-      }
-      class F3<T> {
-        F3(Iterable<Iterable<T>> a) {}
-      }
-      class F4<T> {
-        F4({Iterable<Iterable<T>> a}) {}
-      }
-      void main() {
-        new F0<int>(/*info:INFERRED_TYPE_LITERAL*/[]);
-        new F0<int>(/*info:INFERRED_TYPE_LITERAL*/[3]);
-        new F0<int>(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        new F0<int>(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello",
-                                            3]);
-
-        new F1<int>(a: /*info:INFERRED_TYPE_LITERAL*/[]);
-        new F1<int>(a: /*info:INFERRED_TYPE_LITERAL*/[3]);
-        new F1<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        new F1<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3]);
-
-        new F2<int>(/*info:INFERRED_TYPE_LITERAL*/[]);
-        new F2<int>(/*info:INFERRED_TYPE_LITERAL*/[3]);
-        new F2<int>(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]);
-        new F2<int>(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello", 3]);
-
-        new F3<int>(/*info:INFERRED_TYPE_LITERAL*/[]);
-        new F3<int>(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
-        new F3<int>(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]]);
-        new F3<int>(/*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"],
-                         /*info:INFERRED_TYPE_LITERAL*/[3]]);
-
-        new F4<int>(a: /*info:INFERRED_TYPE_LITERAL*/[]);
-        new F4<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[3]]);
-        new F4<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"]]);
-        new F4<int>(a: /*info:INFERRED_TYPE_LITERAL*/[/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"],
-                            /*info:INFERRED_TYPE_LITERAL*/[3]]);
-
-        new F3(/*info:INFERRED_TYPE_LITERAL*/[]);
-        new F3(/*info:INFERRED_TYPE_LITERAL*/[[3]]);
-        new F3(/*info:INFERRED_TYPE_LITERAL*/[["hello"]]);
-        new F3(/*info:INFERRED_TYPE_LITERAL*/[["hello"], [3]]);
-
-        new F4(a: /*info:INFERRED_TYPE_LITERAL*/[]);
-        new F4(a: /*info:INFERRED_TYPE_LITERAL*/[[3]]);
-        new F4(a: /*info:INFERRED_TYPE_LITERAL*/[["hello"]]);
-        new F4(a: /*info:INFERRED_TYPE_LITERAL*/[["hello"], [3]]);
-      }
-      ''');
-    });
-  });
-
-  group('downwards inference on map literals', () {
-    test('infer downwards', () {
-      checkFile('''
-      void foo([Map<int, String> m1 = /*info:INFERRED_TYPE_LITERAL*/const {1: "hello"},
-        Map<int, String> m2 = /*info:INFERRED_TYPE_LITERAL*/const {(/*severe:STATIC_TYPE_ERROR*/"hello"): "world"}]) {
-      }
-      void main() {
-        {
-          Map<int, String> l0 = /*info:INFERRED_TYPE_LITERAL*/{};
-          Map<int, String> l1 = /*info:INFERRED_TYPE_LITERAL*/{3: "hello"};
-          Map<int, String> l2 = /*info:INFERRED_TYPE_LITERAL*/{(/*severe:STATIC_TYPE_ERROR*/"hello"): "hello"};
-          Map<int, String> l3 = /*info:INFERRED_TYPE_LITERAL*/{3: /*severe:STATIC_TYPE_ERROR*/3};
-          Map<int, String> l4 = /*info:INFERRED_TYPE_LITERAL*/{3:"hello", (/*severe:STATIC_TYPE_ERROR*/"hello"): /*severe:STATIC_TYPE_ERROR*/3};
-        }
-        {
-          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, String> l0 = /*info:INFERRED_TYPE_LITERAL*/{};
-          Map<dynamic, String> l1 = /*info:INFERRED_TYPE_LITERAL*/{3: "hello"};
-          Map<dynamic, String> l2 = /*info:INFERRED_TYPE_LITERAL*/{"hello": "hello"};
-          Map<dynamic, String> l3 = /*info:INFERRED_TYPE_LITERAL*/{3: /*severe:STATIC_TYPE_ERROR*/3};
-          Map<dynamic, String> l4 = /*info:INFERRED_TYPE_LITERAL*/{3:"hello", "hello": /*severe:STATIC_TYPE_ERROR*/3};
-        }
-        {
-          Map<int, dynamic> l0 = /*info:INFERRED_TYPE_LITERAL*/{};
-          Map<int, dynamic> l1 = /*info:INFERRED_TYPE_LITERAL*/{3: "hello"};
-          Map<int, dynamic> l2 = /*info:INFERRED_TYPE_LITERAL*/{(/*severe:STATIC_TYPE_ERROR*/"hello"): "hello"};
-          Map<int, dynamic> l3 = /*info:INFERRED_TYPE_LITERAL*/{3: 3};
-          Map<int, dynamic> l4 = /*info:INFERRED_TYPE_LITERAL*/{3:"hello", (/*severe:STATIC_TYPE_ERROR*/"hello"): 3};
-        }
-        {
-          Map<int, String> l0 = /*severe:STATIC_TYPE_ERROR*/<num, dynamic>{};
-          Map<int, String> l1 = /*severe:STATIC_TYPE_ERROR*/<num, dynamic>{3: "hello"};
-          Map<int, String> l3 = /*severe:STATIC_TYPE_ERROR*/<num, dynamic>{3: 3};
-        }
-        {
-          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 {(/*severe:STATIC_TYPE_ERROR*/"hello"): "hello"};
-          const Map<int, String> l3 = /*info:INFERRED_TYPE_LITERAL*/const {3: /*severe:STATIC_TYPE_ERROR*/3};
-          const Map<int, String> l4 = /*info:INFERRED_TYPE_LITERAL*/const {3:"hello", (/*severe:STATIC_TYPE_ERROR*/"hello"): /*severe:STATIC_TYPE_ERROR*/3};
-        }
-      }
-      ''');
-    });
-  });
-
-  test('downwards inference on function expressions', () {
+  void test_downwardsInferenceOnMapLiterals() {
     checkFile('''
-      typedef T Function2<S, T>(S x);
-
-      void main () {
-        {
-          Function2<int, String> l0 = /*info:INFERRED_TYPE_CLOSURE*/(int x) => null;
-          Function2<int, String> l1 = (int x) => "hello";
-          Function2<int, String> l2 = /*severe:STATIC_TYPE_ERROR*/(String x) => "hello";
-          Function2<int, String> l3 = /*severe:STATIC_TYPE_ERROR*/(int x) => 3;
-          Function2<int, String> l4 = /*info:INFERRED_TYPE_CLOSURE*/(int x) {return /*severe:STATIC_TYPE_ERROR*/3;};
-        }
-        {
-          Function2<int, String> l0 = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*/(x) => null;
-          Function2<int, String> l1 = /*info:INFERRED_TYPE_CLOSURE*/(x) => "hello";
-          Function2<int, String> l2 = /*info:INFERRED_TYPE_CLOSURE, severe:STATIC_TYPE_ERROR*/(x) => 3;
-          Function2<int, String> l3 = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*/(x) {return /*severe:STATIC_TYPE_ERROR*/3;};
-          Function2<int, String> l4 = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*/(x) {return /*severe:STATIC_TYPE_ERROR*/x;};
-        }
-        {
-          Function2<int, List<String>> l0 = /*info:INFERRED_TYPE_CLOSURE*/(int x) => null;
-          Function2<int, List<String>> l1 = (int x) => /*info:INFERRED_TYPE_LITERAL*/["hello"];
-          Function2<int, List<String>> l2 = /*severe:STATIC_TYPE_ERROR*/(String x) => /*info:INFERRED_TYPE_LITERAL*/["hello"];
-          Function2<int, List<String>> l3 = (int x) => /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/3];
-          Function2<int, List<String>> l4 = /*info:INFERRED_TYPE_CLOSURE*/(int x) {return /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/3];};
-        }
-        {
-          Function2<int, int> l0 = /*info:INFERRED_TYPE_CLOSURE*/(x) => x;
-          Function2<int, int> l1 = /*info:INFERRED_TYPE_CLOSURE*/(x) => x+1;
-          Function2<int, String> l2 = /*info:INFERRED_TYPE_CLOSURE, severe:STATIC_TYPE_ERROR*/(x) => x;
-          Function2<int, String> l3 = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*/(x) => /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/x.substring(3);
-          Function2<String, String> l4 = /*info:INFERRED_TYPE_CLOSURE*/(x) => x.substring(3);
-        }
-      }
-      ''');
-  });
-
-  test('downwards inference on generic function expressions', () {
-    checkFile('''
-      void main () {
-        {
-          String f/*<S>*/(int x) => null;
-          var v = f;
-          v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(int x) => null;
-          v = /*<T>*/(int x) => "hello";
-          v = /*severe:STATIC_TYPE_ERROR*//*<T>*/(String x) => "hello";
-          v = /*severe:STATIC_TYPE_ERROR*//*<T>*/(int x) => 3;
-          v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(int x) {return /*severe:STATIC_TYPE_ERROR*/3;};
-        }
-        {
-          String f/*<S>*/(int x) => null;
-          var v = f;
-          v = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => null;
-          v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => "hello";
-          v = /*info:INFERRED_TYPE_CLOSURE, severe:STATIC_TYPE_ERROR*//*<T>*/(x) => 3;
-          v = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) {return /*severe:STATIC_TYPE_ERROR*/3;};
-          v = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) {return /*severe:STATIC_TYPE_ERROR*/x;};
-        }
-        {
-          List<String> f/*<S>*/(int x) => null;
-          var v = f;
-          v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(int x) => null;
-          v = /*<T>*/(int x) => /*info:INFERRED_TYPE_LITERAL*/["hello"];
-          v = /*severe:STATIC_TYPE_ERROR*//*<T>*/(String x) => /*info:INFERRED_TYPE_LITERAL*/["hello"];
-          v = /*<T>*/(int x) => /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/3];
-          v = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(int x) {return /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/3];};
-        }
-        {
-          int int2int/*<S>*/(int x) => null;
-          String int2String/*<T>*/(int x) => null;
-          String string2String/*<T>*/(String x) => null;
-          var x = int2int;
-          x = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => x;
-          x = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => x+1;
-          var y = int2String;
-          y = /*info:INFERRED_TYPE_CLOSURE, severe:STATIC_TYPE_ERROR*//*<T>*/(x) => x;
-          y = /*info:INFERRED_TYPE_CLOSURE, info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => /*info:DYNAMIC_INVOKE, info:DYNAMIC_CAST*/x.substring(3);
-          var z = string2String;
-          z = /*info:INFERRED_TYPE_CLOSURE*//*<T>*/(x) => x.substring(3);
-        }
-      }
-      ''');
-  });
-
-  test('downwards inference on function<T> using the T', () {
-    checkFile('''
-      void main () {
-        {
-          /*=T*/ f/*<T>*/(/*=T*/ x) => null;
-          var v1 = f;
-          v1 = /*info:INFERRED_TYPE_CLOSURE*//*<S>*/(x) => x;
-        }
-        {
-          /*=List<T>*/ f/*<T>*/(/*=T*/ x) => null;
-          var v2 = f;
-          v2 = /*info:INFERRED_TYPE_CLOSURE*//*<S>*/(x) => /*info:INFERRED_TYPE_LITERAL*/[x];
-          Iterable<int> r = v2(42);
-          Iterable<String> s = v2('hello');
-          Iterable<List<int>> t = v2(<int>[]);
-          Iterable<num> u = v2(42);
-          Iterable<num> v = v2/*<num>*/(42);
-        }
-      }
-    ''');
-  });
-
-  test('downwards inference initializing formal, default formal', () {
-    checkFile('''
-      typedef T Function2<S, T>([S x]);
-      class Foo {
-        List<int> x;
-        Foo([this.x = /*info:INFERRED_TYPE_LITERAL*/const [1]]);
-        Foo.named([List<int> x = /*info:INFERRED_TYPE_LITERAL*/const [1]]);
-      }
-      void f([List<int> l = /*info:INFERRED_TYPE_LITERAL*/const [1]]) {}
-      // We do this inference in an early task but don't preserve the infos.
-      Function2<List<int>, String> g = /*pass should be info:INFERRED_TYPE_CLOSURE*/([llll = /*info:INFERRED_TYPE_LITERAL*/const [1]]) => "hello";
-    ''');
-  });
-
-  test('downwards inference async/await', () {
-    checkFile('''
-      import 'dart:async';
-      Future<int> test() async {
-        dynamic d;
-        List<int> l0 = /*warning:DOWN_CAST_COMPOSITE should be pass*/await /*pass should be info:INFERRED_TYPE_LITERAL*/[d];
-        List<int> l1 = await /*info:INFERRED_TYPE_ALLOCATION*/new Future.value(/*info:INFERRED_TYPE_LITERAL*/[/*info:DYNAMIC_CAST*/d]);
-      }
-    ''');
-  });
-
-  test('downwards inference foreach', () {
-    checkFile('''
-      import 'dart:async';
-      Future main() async {
-        for(int x in /*info:INFERRED_TYPE_LITERAL*/[1, 2, 3]) {
-        }
-        await for(int x in /*info:INFERRED_TYPE_ALLOCATION*/new Stream()) {
-        }
-      }
-    ''');
-  });
-
-  test('downwards inference yield/yield*', () {
-    checkFile('''
-      import 'dart:async';
-        Stream<List<int>> foo() async* {
-          yield /*info:INFERRED_TYPE_LITERAL*/[];
-          yield /*severe:STATIC_TYPE_ERROR*/new Stream();
-          yield* /*severe:STATIC_TYPE_ERROR*/[];
-          yield* /*info:INFERRED_TYPE_ALLOCATION*/new Stream();
-        }
-
-        Iterable<Map<int, int>> bar() sync* {
-          yield /*info:INFERRED_TYPE_LITERAL*/{};
-          yield /*severe:STATIC_TYPE_ERROR*/new List();
-          yield* /*severe:STATIC_TYPE_ERROR*/{};
-          yield* /*info:INFERRED_TYPE_ALLOCATION*/new List();
-        }
-        ''');
-  });
-
-  test('downwards inference, annotations', () {
-    checkFile('''
-        class Foo {
-          const Foo(List<String> l);
-          const Foo.named(List<String> l);
-        }
-        @Foo(/*info:INFERRED_TYPE_LITERAL*/const [])
-        class Bar {}
-        @Foo.named(/*info:INFERRED_TYPE_LITERAL*/const [])
-        class Baz {}
-        ''');
-  });
-
-  test('downwards inference, assignment statements', () {
-    checkFile('''
-    void main() {
-      List<int> l;
-      l = /*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/"hello"];
-      l = (l = /*info:INFERRED_TYPE_LITERAL*/[1]);
-    }
+void foo([Map<int, String> m1 = /*info:INFERRED_TYPE_LITERAL*/const {1: "hello"},
+    Map<int, String> m2 = /*info:INFERRED_TYPE_LITERAL*/const {
+      // The warning is the type error, and the severe is the compile time
+      // error from const evaluation.
+      /*severe:MAP_KEY_TYPE_NOT_ASSIGNABLE,warning:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
+          "world"
+    }]) {
+}
+void main() {
+  {
+    Map<int, String> l0 = /*info:INFERRED_TYPE_LITERAL*/{};
+    Map<int, String> l1 = /*info:INFERRED_TYPE_LITERAL*/{3: "hello"};
+    Map<int, String> l2 = /*info:INFERRED_TYPE_LITERAL*/{
+      /*warning:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello": "hello"
+    };
+    Map<int, String> l3 = /*info:INFERRED_TYPE_LITERAL*/{
+      3: /*warning:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
+    };
+    Map<int, String> l4 = /*info:INFERRED_TYPE_LITERAL*/{
+      3: "hello",
+      /*warning:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
+          /*warning:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
+    };
+  }
+  {
+    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, String> l0 = /*info:INFERRED_TYPE_LITERAL*/{};
+    Map<dynamic, String> l1 = /*info:INFERRED_TYPE_LITERAL*/{3: "hello"};
+    Map<dynamic, String> l2 = /*info:INFERRED_TYPE_LITERAL*/{"hello": "hello"};
+    Map<dynamic, String> l3 = /*info:INFERRED_TYPE_LITERAL*/{
+      3: /*warning:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
+    };
+    Map<dynamic, String> l4 = /*info:INFERRED_TYPE_LITERAL*/{
+      3: "hello",
+      "hello": /*warning:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
+    };
+  }
+  {
+    Map<int, dynamic> l0 = /*info:INFERRED_TYPE_LITERAL*/{};
+    Map<int, dynamic> l1 = /*info:INFERRED_TYPE_LITERAL*/{3: "hello"};
+    Map<int, dynamic> l2 = /*info:INFERRED_TYPE_LITERAL*/{
+      /*warning:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello": "hello"
+    };
+    Map<int, dynamic> l3 = /*info:INFERRED_TYPE_LITERAL*/{3: 3};
+    Map<int, dynamic> l4 = /*info:INFERRED_TYPE_LITERAL*/{
+      3:"hello",
+      /*warning:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello": 3
+    };
+  }
+  {
+    Map<int, String> l0 = /*severe:STATIC_TYPE_ERROR*/<num, dynamic>{};
+    Map<int, String> l1 = /*severe:STATIC_TYPE_ERROR*/<num, dynamic>{3: "hello"};
+    Map<int, String> l3 = /*severe:STATIC_TYPE_ERROR*/<num, dynamic>{3: 3};
+  }
+  {
+    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 {
+      /*severe:MAP_KEY_TYPE_NOT_ASSIGNABLE,warning:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
+          "hello"
+    };
+    const Map<int, String> l3 = /*info:INFERRED_TYPE_LITERAL*/const {
+      3: /*severe:MAP_VALUE_TYPE_NOT_ASSIGNABLE,warning:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
+    };
+    const Map<int, String> l4 = /*info:INFERRED_TYPE_LITERAL*/const {
+      3:"hello",
+      /*severe:MAP_KEY_TYPE_NOT_ASSIGNABLE,warning:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
+          /*severe:MAP_VALUE_TYPE_NOT_ASSIGNABLE,warning:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
+    };
+  }
+}
 ''');
-  });
+  }
 
-  test('inferred initializing formal checks default value', () {
+  void test_downwardsInferenceYieldYieldStar() {
     checkFile('''
-      class Foo {
-        var x = 1;
-        Foo([this.x = /*severe:STATIC_TYPE_ERROR*/"1"]);
-      }''');
-  });
+import 'dart:async';
+Stream<List<int>> foo() async* {
+  yield /*info:INFERRED_TYPE_LITERAL*/[];
+  yield /*warning:YIELD_OF_INVALID_TYPE*/new Stream();
+  yield* /*warning:YIELD_OF_INVALID_TYPE*/[];
+  yield* /*info:INFERRED_TYPE_ALLOCATION*/new Stream();
+}
 
-  group('generic methods', () {
-    test('dart:math min/max', () {
-      checkFile('''
-        import 'dart:math';
+Iterable<Map<int, int>> bar() sync* {
+  yield /*info:INFERRED_TYPE_LITERAL*/{};
+  yield /*warning:YIELD_OF_INVALID_TYPE*/new List();
+  yield* /*warning:YIELD_OF_INVALID_TYPE*/{};
+  yield* /*info:INFERRED_TYPE_ALLOCATION*/new List();
+}
+  ''');
+  }
 
-        void printInt(int x) => print(x);
-        void printDouble(double x) => print(x);
+  void test_genericMethods_basicDownwardInference() {
+    checkFile(r'''
+/*=T*/ f/*<S, T>*/(/*=S*/ s) => null;
+main() {
+  String x = f(42);
+  String y = (f)(42);
+}
+''');
+  }
 
-        num myMax(num x, num y) => max(x, y);
+  void test_genericMethods_correctlyRecognizeGenericUpperBound() {
+    // Regression test for https://github.com/dart-lang/sdk/issues/25740.
+    checkFile(r'''
+class Foo<T extends Pattern> {
+void method/*<U extends T>*/(dynamic/*=U*/ u) {}
+}
+main() {
+  new Foo().method/*<String>*/("str");
+  new Foo();
 
-        main() {
-          // Okay if static types match.
-          printInt(max(1, 2));
-          printInt(min(1, 2));
-          printDouble(max(1.0, 2.0));
-          printDouble(min(1.0, 2.0));
+  new Foo<String>().method("str");
+  new Foo().method("str");
 
-          // No help for user-defined functions from num->num->num.
-          printInt(/*info:DOWN_CAST_IMPLICIT*/myMax(1, 2));
-          printInt(myMax(1, 2) as int);
+  new Foo<String>().method(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/42);
+}
+''');
+  }
 
-          // Mixing int and double means return type is num.
-          printInt(/*info:DOWN_CAST_IMPLICIT*/max(1, 2.0));
-          printInt(/*info:DOWN_CAST_IMPLICIT*/min(1, 2.0));
-          printDouble(/*info:DOWN_CAST_IMPLICIT*/max(1, 2.0));
-          printDouble(/*info:DOWN_CAST_IMPLICIT*/min(1, 2.0));
+  void test_genericMethods_dartMathMinMax() {
+    checkFile('''
+import 'dart:math';
 
-          // Types other than int and double are not accepted.
-          printInt(
-              /*info:DOWN_CAST_IMPLICIT*/min(
-                  /*severe:STATIC_TYPE_ERROR*/"hi",
-                  /*severe:STATIC_TYPE_ERROR*/"there"));
-        }
-    ''');
-    });
+void printInt(int x) => print(x);
+void printDouble(double x) => print(x);
 
-    test('Iterable and Future', () {
-      checkFile('''
-        import 'dart:async';
+num myMax(num x, num y) => max(x, y);
 
-        Future<int> make(int x) => (/*info:INFERRED_TYPE_ALLOCATION*/new Future(() => x));
+main() {
+  // Okay if static types match.
+  printInt(max(1, 2));
+  printInt(min(1, 2));
+  printDouble(max(1.0, 2.0));
+  printDouble(min(1.0, 2.0));
 
-        main() {
-          Iterable<Future<int>> list = <int>[1, 2, 3].map(make);
-          Future<List<int>> results = Future.wait(list);
-          Future<String> results2 = results.then((List<int> list)
-            => list.fold('', /*info:INFERRED_TYPE_CLOSURE*/(x, y) => x + y.toString()));
-        }
-    ''');
-    });
+  // No help for user-defined functions from num->num->num.
+  printInt(/*info:DOWN_CAST_IMPLICIT*/myMax(1, 2));
+  printInt(myMax(1, 2) as int);
 
-    // TODO(jmesserly): we should change how this inference works.
-    // For now this test will cover what we use.
-    test('infer JS builtin', () {
-      checkFile('''
-        import 'dart:_foreign_helper' show JS;
-        main() {
-          String x = /*severe:STATIC_TYPE_ERROR*/JS('int', '42');
-          var y = JS('String', '"hello"');
-          y = "world";
-          y = /*severe:STATIC_TYPE_ERROR*/42;
-        }
-    ''');
-    });
+  // Mixing int and double means return type is num.
+  printInt(/*info:DOWN_CAST_IMPLICIT*/max(1, 2.0));
+  printInt(/*info:DOWN_CAST_IMPLICIT*/min(1, 2.0));
+  printDouble(/*info:DOWN_CAST_IMPLICIT*/max(1, 2.0));
+  printDouble(/*info:DOWN_CAST_IMPLICIT*/min(1, 2.0));
 
+  // Types other than int and double are not accepted.
+  printInt(
+      /*info:DOWN_CAST_IMPLICIT*/min(
+          /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"hi",
+          /*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/"there"));
+}
+''');
+  }
 
-    test('inferred generic instantiation', () {
-      checkFile('''
+  void test_genericMethods_doNotInferInvalidOverrideOfGenericMethod() {
+    checkFile('''
+class C {
+/*=T*/ m/*<T>*/(/*=T*/ x) => x;
+}
+class D extends C {
+/*severe:INVALID_METHOD_OVERRIDE*/m(x) => x;
+}
+main() {
+  int y = /*info:DYNAMIC_CAST*/new D()./*warning:WRONG_NUMBER_OF_TYPE_ARGUMENTS*/m/*<int>*/(42);
+  print(y);
+}
+''');
+  }
+
+  void test_genericMethods_downwardsInferenceAffectsArguments() {
+    checkFile(r'''
+/*=T*/ f/*<T>*/(List/*<T>*/ s) => null;
+main() {
+  String x = f(/*info:INFERRED_TYPE_LITERAL*/['hi']);
+  String y = f(/*info:INFERRED_TYPE_LITERAL*/[/*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/42]);
+}
+''');
+  }
+
+  void test_genericMethods_downwardsInferenceFold() {
+    // Regression from https://github.com/dart-lang/sdk/issues/25491
+    // The first example works now, but the latter requires a full solution to
+    // https://github.com/dart-lang/sdk/issues/25490
+    checkFile(r'''
+void main() {
+  List<int> o;
+  int y = o.fold(0, /*info:INFERRED_TYPE_CLOSURE*/(x, y) => x + y);
+  var z = o.fold(0, /*info:INFERRED_TYPE_CLOSURE*/(x, y) => /*info:DYNAMIC_INVOKE*/x + y);
+  y = /*info:DYNAMIC_CAST*/z;
+}
+void functionExpressionInvocation() {
+  List<int> o;
+  int y = (o.fold)(0, /*info:INFERRED_TYPE_CLOSURE*/(x, y) => x + y);
+  var z = (o.fold)(0, /*info:INFERRED_TYPE_CLOSURE*/(x, y) => /*info:DYNAMIC_INVOKE*/x + y);
+  y = /*info:DYNAMIC_CAST*/z;
+}
+''');
+  }
+
+  void test_genericMethods_handleOverrideOfNonGenericWithGeneric() {
+    // Regression test for crash when adding genericity
+    checkFile('''
+class C {
+  m(x) => x;
+}
+class D extends C {
+  /*=T*/ m/*<T>*/(/*=T*/ x) => x;
+}
+main() {
+  int y = /*info:DYNAMIC_CAST*/(new D() as C).m(42);
+  print(y);
+}
+  ''');
+  }
+
+  void test_genericMethods_inferGenericInstantiation() {
+    checkFile('''
 import 'dart:math' as math;
 import 'dart:math' show min;
 
 class C {
-  /*=T*/ m/*<T extends num>*/(/*=T*/ x, /*=T*/ y) => null;
+/*=T*/ m/*<T extends num>*/(/*=T*/ x, /*=T*/ y) => null;
 }
 
 main() {
-  takeIII(math.max);
-  takeDDD(math.max);
-  takeNNN(math.max);
-  takeIDN(math.max);
-  takeDIN(math.max);
-  takeIIN(math.max);
-  takeDDN(math.max);
-  takeIIO(math.max);
-  takeDDO(math.max);
+takeIII(math.max);
+takeDDD(math.max);
+takeNNN(math.max);
+takeIDN(math.max);
+takeDIN(math.max);
+takeIIN(math.max);
+takeDDN(math.max);
+takeIIO(math.max);
+takeDDO(math.max);
 
-  takeOOI(/*severe:STATIC_TYPE_ERROR*/math.max);
-  takeIDI(/*severe:STATIC_TYPE_ERROR*/math.max);
-  takeDID(/*severe:STATIC_TYPE_ERROR*/math.max);
-  takeOON(/*severe:STATIC_TYPE_ERROR*/math.max);
-  takeOOO(/*severe:STATIC_TYPE_ERROR*/math.max);
+takeOOI(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/math.max);
+takeIDI(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/math.max);
+takeDID(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/math.max);
+takeOON(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/math.max);
+takeOOO(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/math.max);
 
-  // Also test SimpleIdentifier
-  takeIII(min);
-  takeDDD(min);
-  takeNNN(min);
-  takeIDN(min);
-  takeDIN(min);
-  takeIIN(min);
-  takeDDN(min);
-  takeIIO(min);
-  takeDDO(min);
+// Also test SimpleIdentifier
+takeIII(min);
+takeDDD(min);
+takeNNN(min);
+takeIDN(min);
+takeDIN(min);
+takeIIN(min);
+takeDDN(min);
+takeIIO(min);
+takeDDO(min);
 
-  takeOOI(/*severe:STATIC_TYPE_ERROR*/min);
-  takeIDI(/*severe:STATIC_TYPE_ERROR*/min);
-  takeDID(/*severe:STATIC_TYPE_ERROR*/min);
-  takeOON(/*severe:STATIC_TYPE_ERROR*/min);
-  takeOOO(/*severe:STATIC_TYPE_ERROR*/min);
+takeOOI(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/min);
+takeIDI(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/min);
+takeDID(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/min);
+takeOON(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/min);
+takeOOO(/*severe:STATIC_TYPE_ERROR,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/min);
 
-  // Also PropertyAccess
-  takeIII(new C().m);
-  takeDDD(new C().m);
-  takeNNN(new C().m);
-  takeIDN(new C().m);
-  takeDIN(new C().m);
-  takeIIN(new C().m);
-  takeDDN(new C().m);
-  takeIIO(new C().m);
-  takeDDO(new C().m);
+// Also PropertyAccess
+takeIII(new C().m);
+takeDDD(new C().m);
+takeNNN(new C().m);
+takeIDN(new C().m);
+takeDIN(new C().m);
+takeIIN(new C().m);
+takeDDN(new C().m);
+takeIIO(new C().m);
+takeDDO(new C().m);
 
-  // Note: this is a warning because a downcast of a method tear-off could work
-  // (derived method can be a subtype):
-  //
-  //     class D extends C {
-  //       S m<S extends num>(Object x, Object y);
-  //     }
-  //
-  // That's legal because we're loosening parameter types.
-  //
-  takeOON(/*warning:DOWN_CAST_COMPOSITE*/new C().m);
-  takeOOO(/*warning:DOWN_CAST_COMPOSITE*/new C().m);
+// Note: this is a warning because a downcast of a method tear-off could work
+// (derived method can be a subtype):
+//
+//     class D extends C {
+//       S m<S extends num>(Object x, Object y);
+//     }
+//
+// That's legal because we're loosening parameter types.
+//
+takeOON(/*warning:DOWN_CAST_COMPOSITE,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/new C().m);
+takeOOO(/*warning:DOWN_CAST_COMPOSITE,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/new C().m);
 
-  // Note: this is a warning because a downcast of a method tear-off could work
-  // in "normal" Dart, due to bivariance.
-  takeOOI(/*warning:DOWN_CAST_COMPOSITE*/new C().m);
-  takeIDI(/*warning:DOWN_CAST_COMPOSITE*/new C().m);
-  takeDID(/*warning:DOWN_CAST_COMPOSITE*/new C().m);
+// Note: this is a warning because a downcast of a method tear-off could work
+// in "normal" Dart, due to bivariance.
+takeOOI(/*warning:DOWN_CAST_COMPOSITE,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/new C().m);
+takeIDI(/*warning:DOWN_CAST_COMPOSITE,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/new C().m);
+takeDID(/*warning:DOWN_CAST_COMPOSITE,warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/new C().m);
 }
 
 void takeIII(int fn(int a, int b)) {}
@@ -1802,12 +1281,12 @@
 void takeOOI(int fn(Object a, Object b)) {}
 void takeIIO(Object fn(int a, int b)) {}
 void takeDDO(Object fn(double a, double b)) {}
-  ''');
-    });
+''');
+  }
 
+  void test_genericMethods_inferGenericMethodType() {
     // Regression test for https://github.com/dart-lang/sdk/issues/25668
-    test('infer generic method type', () {
-      checkFile('''
+    checkFile('''
 class C {
   /*=T*/ m/*<T>*/(/*=T*/ x) => x;
 }
@@ -1818,377 +1297,1377 @@
   int y = new D().m/*<int>*/(42);
   print(y);
 }
-    ''');
-    });
+  ''');
+  }
 
-    test('do not infer invalid override of generic method', () {
-      checkFile('''
+  void test_genericMethods_inferJSBuiltin() {
+    // TODO(jmesserly): we should change how this inference works.
+    // For now this test will cover what we use.
+    checkFile('''
+import 'dart:_foreign_helper' show JS;
+main() {
+  String x = /*warning:INVALID_ASSIGNMENT*/JS('int', '42');
+  var y = JS('String', '"hello"');
+  y = "world";
+  y = /*warning:INVALID_ASSIGNMENT*/42;
+}
+''');
+  }
+
+  void test_genericMethods_IterableAndFuture() {
+    checkFile('''
+import 'dart:async';
+
+Future<int> make(int x) => (/*info:INFERRED_TYPE_ALLOCATION*/new Future(() => x));
+
+main() {
+  Iterable<Future<int>> list = <int>[1, 2, 3].map(make);
+  Future<List<int>> results = Future.wait(list);
+  Future<String> results2 = results.then((List<int> list)
+    => list.fold('', /*info:INFERRED_TYPE_CLOSURE*/(x, y) => x + y.toString()));
+}
+''');
+  }
+
+  void test_infer_assignToIndex() {
+    checkFile(r'''
+List<double> a = <double>[];
+var b = (a[0] = 1.0);
+''');
+  }
+
+  void test_infer_assignToProperty() {
+    checkFile(r'''
+class A {
+  int f;
+}
+var v_assign = (new A().f = 1);
+var v_plus = (new A().f += 1);
+var v_minus = (new A().f -= 1);
+var v_multiply = (new A().f *= 1);
+var v_prefix_pp = (++new A().f);
+var v_prefix_mm = (--new A().f);
+var v_postfix_pp = (new A().f++);
+var v_postfix_mm = (new A().f--);
+''');
+  }
+
+  void test_infer_assignToProperty_custom() {
+    checkFile(r'''
+class A {
+  int operator +(other) => 1;
+  double operator -(other) => 2.0;
+}
+class B {
+  A a;
+}
+var v_prefix_pp = (++new B().a);
+var v_prefix_mm = (--new B().a);
+var v_postfix_pp = (new B().a++);
+var v_postfix_mm = (new B().a--);
+''');
+  }
+
+  void test_infer_assignToRef() {
+    checkFile(r'''
+class A {
+  int f;
+}
+A a = new A();
+var b = (a.f = 1);
+var c = 0;
+var d = (c = 1);
+''');
+  }
+
+  void test_infer_binary_custom() {
+    checkFile(r'''
+class A {
+  int operator +(other) => 1;
+  double operator -(other) => 2.0;
+}
+var v_add = new A() + 'foo';
+var v_minus = new A() - 'bar';
+''');
+  }
+
+  void test_infer_binary_doubleDouble() {
+    checkFile(r'''
+var a_equal = 1.0 == 2.0;
+var a_notEqual = 1.0 != 2.0;
+var a_add = 1.0 + 2.0;
+var a_subtract = 1.0 - 2.0;
+var a_multiply = 1.0 * 2.0;
+var a_divide = 1.0 / 2.0;
+var a_floorDivide = 1.0 ~/ 2.0;
+var a_greater = 1.0 > 2.0;
+var a_less = 1.0 < 2.0;
+var a_greaterEqual = 1.0 >= 2.0;
+var a_lessEqual = 1.0 <= 2.0;
+var a_modulo = 1.0 % 2.0;
+''');
+  }
+
+  void test_infer_binary_doubleInt() {
+    checkFile(r'''
+var a_equal = 1.0 == 2;
+var a_notEqual = 1.0 != 2;
+var a_add = 1.0 + 2;
+var a_subtract = 1.0 - 2;
+var a_multiply = 1.0 * 2;
+var a_divide = 1.0 / 2;
+var a_floorDivide = 1.0 ~/ 2;
+var a_greater = 1.0 > 2;
+var a_less = 1.0 < 2;
+var a_greaterEqual = 1.0 >= 2;
+var a_lessEqual = 1.0 <= 2;
+var a_modulo = 1.0 % 2;
+''');
+  }
+
+  void test_infer_binary_intDouble() {
+    checkFile(r'''
+var a_equal = 1 == 2.0;
+var a_notEqual = 1 != 2.0;
+var a_add = 1 + 2.0;
+var a_subtract = 1 - 2.0;
+var a_multiply = 1 * 2.0;
+var a_divide = 1 / 2.0;
+var a_floorDivide = 1 ~/ 2.0;
+var a_greater = 1 > 2.0;
+var a_less = 1 < 2.0;
+var a_greaterEqual = 1 >= 2.0;
+var a_lessEqual = 1 <= 2.0;
+var a_modulo = 1 % 2.0;
+''');
+  }
+
+  void test_infer_binary_intInt() {
+    checkFile(r'''
+var a_equal = 1 == 2;
+var a_notEqual = 1 != 2;
+var a_bitXor = 1 ^ 2;
+var a_bitAnd = 1 & 2;
+var a_bitOr = 1 | 2;
+var a_bitShiftRight = 1 >> 2;
+var a_bitShiftLeft = 1 << 2;
+var a_add = 1 + 2;
+var a_subtract = 1 - 2;
+var a_multiply = 1 * 2;
+var a_divide = 1 / 2;
+var a_floorDivide = 1 ~/ 2;
+var a_greater = 1 > 2;
+var a_less = 1 < 2;
+var a_greaterEqual = 1 >= 2;
+var a_lessEqual = 1 <= 2;
+var a_modulo = 1 % 2;
+''');
+  }
+
+  void test_infer_conditional() {
+    checkFile(r'''
+var a = 1 == 2 ? 1 : 2.0;
+var b = 1 == 2 ? 1.0 : 2;
+''');
+  }
+
+  void test_infer_prefixExpression() {
+    checkFile(r'''
+var a_not = !true;
+var a_complement = ~1;
+var a_negate = -1;
+''');
+  }
+
+  void test_infer_prefixExpression_custom() {
+    checkFile(r'''
+class A {
+  A();
+  int operator ~() => 1;
+  double operator -() => 2.0;
+}
+var a = new A();
+var v_complement = ~a;
+var v_negate = -a;
+''');
+  }
+
+  void test_infer_throw() {
+    checkFile(r'''
+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);
+''');
+  }
+
+  void test_infer_typeCast() {
+    checkFile(r'''
+class A<T> {}
+class B<T> extends A<T> {
+  foo() {}
+}
+A<num> a = new B<int>();
+var b = (a as B<int>);
+main() {
+  b.foo();
+}
+''');
+  }
+
+  void test_infer_typedListLiteral() {
+    checkFile(r'''
+var a = <int>[];
+var b = <double>[1.0, 2.0, 3.0];
+var c = <List<int>>[];
+var d = <dynamic>[1, 2.0, false];
+''');
+  }
+
+  void test_infer_typedMapLiteral() {
+    checkFile(r'''
+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>{};
+''');
+  }
+
+  void test_infer_use_of_void() {
+    checkFile('''
+class B {
+  void f() {}
+}
+class C extends B {
+  f() {}
+}
+var x = new C()./*info:USE_OF_VOID_RESULT*/f();
+''');
+  }
+
+  void test_inferConstsTransitively() {
+    addFile(
+        '''
+const b1 = 2;
+''',
+        name: '/b.dart');
+    addFile(
+        '''
+import 'main.dart';
+import 'b.dart';
+const a1 = m2;
+const a2 = b1;
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+const m1 = a1;
+const m2 = a2;
+
+foo() {
+  int i;
+  i = m1;
+}
+''');
+  }
+
+  void test_inferCorrectlyOnMultipleVariablesDeclaredTogether() {
+    checkFile('''
+class A {
+  var x, y = 2, z = "hi";
+}
+
+class B implements A {
+  var x = 2, y = 3, z, w = 2;
+}
+
+foo() {
+  String s;
+  int i;
+
+  s = /*info:DYNAMIC_CAST*/new B().x;
+  s = /*warning:INVALID_ASSIGNMENT*/new B().y;
+  s = new B().z;
+  s = /*warning:INVALID_ASSIGNMENT*/new B().w;
+
+  i = /*info:DYNAMIC_CAST*/new B().x;
+  i = new B().y;
+  i = /*warning:INVALID_ASSIGNMENT*/new B().z;
+  i = new B().w;
+}
+''');
+  }
+
+  void test_inferenceInCyclesIsDeterministic() {
+    addFile(
+        '''
+import 'b.dart';
+class A {
+  static final a1 = B.b1;
+  final a2 = new B().b2;
+}
+''',
+        name: '/a.dart');
+    addFile(
+        '''
+class B {
+  static final b1 = 1;
+  final b2 = 1;
+}
+''',
+        name: '/b.dart');
+    addFile(
+        '''
+import "main.dart"; // creates a cycle
+
+class C {
+  static final c1 = 1;
+  final c2 = 1;
+}
+''',
+        name: '/c.dart');
+    addFile(
+        '''
+library e;
+import 'a.dart';
+part 'e2.dart';
+
+class E {
+  static final e1 = 1;
+  static final e2 = F.f1;
+  static final e3 = A.a1;
+  final e4 = 1;
+  final e5 = new F().f2;
+  final e6 = new A().a2;
+}
+''',
+        name: '/e.dart');
+    addFile(
+        '''
+part 'f2.dart';
+''',
+        name: '/f.dart');
+    addFile(
+        '''
+part of e;
+class F {
+  static final f1 = 1;
+  final f2 = 1;
+}
+''',
+        name: '/e2.dart');
+    checkFile('''
+import "a.dart";
+import "c.dart";
+import "e.dart";
+
+class D {
+  static final d1 = A.a1 + 1;
+  static final d2 = C.c1 + 1;
+  final d3 = new A().a2;
+  final d4 = new C().c2;
+}
+
+test1() {
+  int x = 0;
+  // inference in A works, it's not in a cycle
+  x = A.a1;
+  x = new A().a2;
+
+  // Within a cycle we allow inference when the RHS is well known, but
+  // not when it depends on other fields within the cycle
+  x = C.c1;
+  x = D.d1;
+  x = D.d2;
+  x = new C().c2;
+  x = new D().d3;
+  x = /*info:DYNAMIC_CAST*/new D().d4;
+
+
+  // Similarly if the library contains parts.
+  x = E.e1;
+  x = E.e2;
+  x = E.e3;
+  x = new E().e4;
+  x = /*info:DYNAMIC_CAST*/new E().e5;
+  x = new E().e6;
+  x = F.f1;
+  x = new F().f2;
+}
+''');
+  }
+
+  void test_inferFromComplexExpressionsIfOuterMostValueIsPrecise() {
+    checkFile('''
+class A { int x; B operator+(other) => null; }
+class B extends A { B(ignore); }
+var a = new A();
+// Note: it doesn't matter that some of these refer to 'x'.
+var b = new B(/*warning:UNDEFINED_IDENTIFIER*/x);  // allocations
+var c1 = [/*warning:UNDEFINED_IDENTIFIER*/x];      // list literals
+var c2 = const [];
+var d = <dynamic, dynamic>{'a': 'b'};     // map literals
+var e = new A()..x = 3; // cascades
+var f = 2 + 3;          // binary expressions are OK if the left operand
+                        // is from a library in a different strongest
+                        // conected component.
+var g = -3;
+var h = new A() + 3;
+var i = /*warning:UNDEFINED_OPERATOR*/- new A();
+var j = null as B;
+
+test1() {
+  a = /*warning:INVALID_ASSIGNMENT*/"hi";
+  a = new B(3);
+  b = /*warning:INVALID_ASSIGNMENT*/"hi";
+  b = new B(3);
+  c1 = [];
+  c1 = /*warning:INVALID_ASSIGNMENT*/{};
+  c2 = [];
+  c2 = /*warning:INVALID_ASSIGNMENT*/{};
+  d = {};
+  d = /*warning:INVALID_ASSIGNMENT*/3;
+  e = new A();
+  e = /*warning:INVALID_ASSIGNMENT*/{};
+  f = 3;
+  f = /*warning:INVALID_ASSIGNMENT*/false;
+  g = 1;
+  g = /*warning:INVALID_ASSIGNMENT*/false;
+  h = /*warning:INVALID_ASSIGNMENT*/false;
+  h = new B('b');
+  i = false;
+  j = new B('b');
+  j = /*warning:INVALID_ASSIGNMENT*/false;
+  j = /*warning:INVALID_ASSIGNMENT*/[];
+}
+''');
+  }
+
+  void test_inferFromRhsOnlyIfItWontConflictWithOverriddenFields() {
+    checkFile('''
+class A {
+  var x;
+}
+
+class B implements A {
+  var x = 2;
+}
+
+foo() {
+  String y = /*info:DYNAMIC_CAST*/new B().x;
+  int z = /*info:DYNAMIC_CAST*/new B().x;
+}
+''');
+  }
+
+  void test_inferFromRhsOnlyIfItWontConflictWithOverriddenFields2() {
+    checkFile('''
+class A {
+  final x = null;
+}
+
+class B implements A {
+  final x = 2;
+}
+
+foo() {
+  String y = /*warning:INVALID_ASSIGNMENT*/new B().x;
+  int z = new B().x;
+}
+''');
+  }
+
+  void test_inferFromVariablesInCycleLibsWhenFlagIsOn() {
+    addFile(
+        '''
+import 'main.dart';
+var x = 2; // ok to infer
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+var y = x; // now ok :)
+
+test1() {
+  int t = 3;
+  t = x;
+  t = y;
+}
+''');
+  }
+
+  void test_inferFromVariablesInCycleLibsWhenFlagIsOn2() {
+    addFile(
+        '''
+import 'main.dart';
+class A { static var x = 2; }
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+class B { static var y = A.x; }
+
+test1() {
+  int t = 3;
+  t = A.x;
+  t = B.y;
+}
+''');
+  }
+
+  void test_inferFromVariablesInNonCycleImportsWithFlag() {
+    addFile(
+        '''
+var x = 2;
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+var y = x;
+
+test1() {
+  x = /*warning:INVALID_ASSIGNMENT*/"hi";
+  y = /*warning:INVALID_ASSIGNMENT*/"hi";
+}
+''');
+  }
+
+  void test_inferFromVariablesInNonCycleImportsWithFlag2() {
+    addFile(
+        '''
+class A { static var x = 2; }
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+class B { static var y = A.x; }
+
+test1() {
+  A.x = /*warning:INVALID_ASSIGNMENT*/"hi";
+  B.y = /*warning:INVALID_ASSIGNMENT*/"hi";
+}
+''');
+  }
+
+  void test_inferGenericMethodType_named() {
+    var unit = checkFile('''
+class C {
+  /*=T*/ m/*<T>*/(int a, {String b, /*=T*/ c}) => null;
+}
+var y = new C().m(1, b: 'bbb', c: 2.0);
+  ''');
+    expect(unit.topLevelVariables[0].type.toString(), 'double');
+  }
+
+  void test_inferGenericMethodType_positional() {
+    var unit = checkFile('''
+class C {
+  /*=T*/ m/*<T>*/(int a, [/*=T*/ b]) => null;
+}
+var y = new C().m(1, 2.0);
+  ''');
+    expect(unit.topLevelVariables[0].type.toString(), 'double');
+  }
+
+  void test_inferGenericMethodType_positional2() {
+    var unit = checkFile('''
+class C {
+  /*=T*/ m/*<T>*/(int a, [String b, /*=T*/ c]) => null;
+}
+var y = new C().m(1, 'bbb', 2.0);
+  ''');
+    expect(unit.topLevelVariables[0].type.toString(), 'double');
+  }
+
+  void test_inferGenericMethodType_required() {
+    var unit = checkFile('''
 class C {
   /*=T*/ m/*<T>*/(/*=T*/ x) => x;
 }
-class D extends C {
-  /*severe:INVALID_METHOD_OVERRIDE*/m(x) => x;
-}
-main() {
-  int y = /*info:DYNAMIC_CAST*/new D()./*warning:WRONG_NUMBER_OF_TYPE_ARGUMENTS*/m/*<int>*/(42);
-  print(y);
-}
-    ''');
-    });
-
-    test('correctly recognize generic upper bound', () {
-      // Regression test for https://github.com/dart-lang/sdk/issues/25740.
-      checkFile(r'''
-class Foo<T extends Pattern> {
-  void method/*<U extends T>*/(dynamic/*=U*/ u) {}
-}
-main() {
-  new Foo().method/*<String>*/("str");
-  new Foo();
-
-  new Foo<String>().method("str");
-  new Foo().method("str");
-
-  new Foo<String>().method(/*severe:STATIC_TYPE_ERROR*/42);
-}
-      ''');
-    });
-
-    test('basic downwards inference', () {
-      checkFile(r'''
-/*=T*/ f/*<S, T>*/(/*=S*/ s) => null;
-main() {
-  String x = f(42);
-  String y = (f)(42);
-}
-      ''');
-    });
-
-    test('downwards inference affects arguments', () {
-      checkFile(r'''
-/*=T*/ f/*<T>*/(List/*<T>*/ s) => null;
-main() {
-  String x = f(/*info:INFERRED_TYPE_LITERAL*/['hi']);
-  String y = f(/*info:INFERRED_TYPE_LITERAL*/[/*severe:STATIC_TYPE_ERROR*/42]);
-}
-      ''');
-    });
-
-    test('downwards inference fold', () {
-      // Regression from https://github.com/dart-lang/sdk/issues/25491
-      // The first example works now, but the latter requires a full solution to
-      // https://github.com/dart-lang/sdk/issues/25490
-      checkFile(r'''
-void main() {
-  List<int> o;
-  int y = o.fold(0, /*info:INFERRED_TYPE_CLOSURE*/(x, y) => x + y);
-  var z = o.fold(0, /*info:INFERRED_TYPE_CLOSURE*/(x, y) => /*info:DYNAMIC_INVOKE*/x + y);
-  y = /*info:DYNAMIC_CAST*/z;
-}
-void functionExpressionInvocation() {
-  List<int> o;
-  int y = (o.fold)(0, /*info:INFERRED_TYPE_CLOSURE*/(x, y) => x + y);
-  var z = (o.fold)(0, /*info:INFERRED_TYPE_CLOSURE*/(x, y) => /*info:DYNAMIC_INVOKE*/x + y);
-  y = /*info:DYNAMIC_CAST*/z;
-}
-      ''');
-    });
-
-  });
-
-  // Regression test for https://github.com/dart-lang/dev_compiler/issues/47
-  test('null literal should not infer as bottom', () {
-    checkFile(r'''
-      var h = null;
-      void foo(int f(Object _)) {}
-
-      main() {
-        var f = (Object x) => null;
-        String y = /*info:DYNAMIC_CAST*/f(42);
-
-        f = /*info:INFERRED_TYPE_CLOSURE*/(x) => 'hello';
-
-        var g = null;
-        g = 'hello';
-        (/*info:DYNAMIC_INVOKE*/g.foo());
-
-        h = 'hello';
-        (/*info:DYNAMIC_INVOKE*/h.foo());
-
-        foo(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) => null);
-        foo(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) => throw "not implemented");
-      }
+var y = new C().m(42);
   ''');
-  });
+    expect(unit.topLevelVariables[0].type.toString(), 'int');
+  }
 
-  test('list literals', () {
+  void test_inferIfComplexExpressionsReadPossibleInferredField() {
+    // but flags can enable this behavior.
+    addFile(
+        '''
+class A {
+  var x = 3;
+}
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+class B {
+  var y = 3;
+}
+final t1 = new A();
+final t2 = new A().x;
+final t3 = new B();
+final t4 = new B().y;
+
+test1() {
+  int i = 0;
+  A a;
+  B b;
+  a = t1;
+  i = t2;
+  b = t3;
+  i = /*info:DYNAMIC_CAST*/t4;
+  i = new B().y; // B.y was inferred though
+}
+''');
+  }
+
+  void test_inferListLiteralNestedInMapLiteral() {
+    checkFile(r'''
+class Resource {}
+class Folder extends Resource {}
+
+Resource getResource(String str) => null;
+
+class Foo<T> {
+  Foo(T t);
+}
+
+main() {
+  // List inside map
+  var map = <String, List<Folder>>{
+    'pkgA': /*info:INFERRED_TYPE_LITERAL*/[/*info:DOWN_CAST_IMPLICIT*/getResource('/pkgA/lib/')],
+    'pkgB': /*info:INFERRED_TYPE_LITERAL*/[/*info:DOWN_CAST_IMPLICIT*/getResource('/pkgB/lib/')]
+  };
+  // Also try map inside list
+  var list = <Map<String, Folder>>[
+    /*info:INFERRED_TYPE_LITERAL*/{ 'pkgA': /*info:DOWN_CAST_IMPLICIT*/getResource('/pkgA/lib/') },
+    /*info:INFERRED_TYPE_LITERAL*/{ 'pkgB': /*info:DOWN_CAST_IMPLICIT*/getResource('/pkgB/lib/') },
+  ];
+  // Instance creation too
+  var foo = new Foo<List<Folder>>(
+    /*info:INFERRED_TYPE_LITERAL*/[/*info:DOWN_CAST_IMPLICIT*/getResource('/pkgA/lib/')]
+  );
+}
+  ''');
+  }
+
+  void test_inferredInitializingFormalChecksDefaultValue() {
+    checkFile('''
+class Foo {
+  var x = 1;
+  Foo([this.x = /*warning:INVALID_ASSIGNMENT*/"1"]);
+}''');
+  }
+
+  void test_inferStaticsTransitively() {
+    addFile(
+        '''
+final b1 = 2;
+''',
+        name: '/b.dart');
+    addFile(
+        '''
+import 'main.dart';
+import 'b.dart';
+final a1 = m2;
+class A {
+  static final a2 = b1;
+}
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+final m1 = a1;
+final m2 = A.a2;
+
+foo() {
+  int i;
+  i = m1;
+}
+''');
+  }
+
+  void test_inferStaticsTransitively2() {
+    checkFile('''
+const x1 = 1;
+final x2 = 1;
+final y1 = x1;
+final y2 = x2;
+
+foo() {
+  int i;
+  i = y1;
+  i = y2;
+}
+''');
+  }
+
+  void test_inferStaticsTransitively3() {
+    addFile(
+        '''
+const a1 = 3;
+const a2 = 4;
+class A {
+  static const a3 = null;
+}
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart' show a1, A;
+import 'a.dart' as p show a2, A;
+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;
+  i = t1;
+  i = t2;
+  i = t3;
+  i = t4;
+}
+''');
+  }
+
+  void test_inferStaticsWithMethodInvocations() {
+    addFile(
+        '''
+m3(String a, String b, [a1,a2]) {}
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+class T {
+  static final T foo = m1(m2(m3('', '')));
+  static T m1(String m) { return null; }
+  static String m2(e) { return ''; }
+}
+''');
+  }
+
+  void test_inferTypeOnOverriddenFields2() {
+    checkFile('''
+class A {
+  int x = 2;
+}
+
+class B extends A {
+  /*severe:INVALID_FIELD_OVERRIDE*/get x => 3;
+}
+
+foo() {
+  String y = /*warning:INVALID_ASSIGNMENT*/new B().x;
+  int z = new B().x;
+}
+''');
+  }
+
+  void test_inferTypeOnOverriddenFields4() {
+    checkFile('''
+class A {
+  final int x = 2;
+}
+
+class B implements A {
+  get x => 3;
+}
+
+foo() {
+  String y = /*warning:INVALID_ASSIGNMENT*/new B().x;
+  int z = new B().x;
+}
+''');
+  }
+
+  void test_inferTypeOnVar() {
+    // Error also expected when declared type is `int`.
+    checkFile('''
+test1() {
+  int x = 3;
+  x = /*warning:INVALID_ASSIGNMENT*/"hi";
+}
+''');
+  }
+
+  void test_inferTypeOnVar2() {
+    checkFile('''
+test2() {
+  var x = 3;
+  x = /*warning:INVALID_ASSIGNMENT*/"hi";
+}
+''');
+  }
+
+  void test_inferTypeOnVarFromField() {
+    checkFile('''
+class A {
+  int x = 0;
+
+  test1() {
+    var a = x;
+    a = /*warning:INVALID_ASSIGNMENT*/"hi";
+    a = 3;
+    var b = y;
+    b = /*warning:INVALID_ASSIGNMENT*/"hi";
+    b = 4;
+    var c = z;
+    c = /*warning:INVALID_ASSIGNMENT*/"hi";
+    c = 4;
+  }
+
+  int y; // field def after use
+  final z = 42; // should infer `int`
+}
+''');
+  }
+
+  void test_inferTypeOnVarFromTopLevel() {
+    checkFile('''
+int x = 0;
+
+test1() {
+  var a = x;
+  a = /*warning:INVALID_ASSIGNMENT*/"hi";
+  a = 3;
+  var b = y;
+  b = /*warning:INVALID_ASSIGNMENT*/"hi";
+  b = 4;
+  var c = z;
+  c = /*warning:INVALID_ASSIGNMENT*/"hi";
+  c = 4;
+}
+
+int y = 0; // field def after use
+final z = 42; // should infer `int`
+''');
+  }
+
+  void test_inferTypeRegardlessOfDeclarationOrderOrCycles() {
+    addFile(
+        '''
+import 'main.dart';
+
+class B extends A { }
+''',
+        name: '/b.dart');
+    checkFile('''
+import 'b.dart';
+class C extends B {
+  get x => null;
+}
+class A {
+  int get x => 0;
+}
+foo() {
+  int y = new C().x;
+  String z = /*warning:INVALID_ASSIGNMENT*/new C().x;
+}
+''');
+  }
+
+  void test_inferTypesOnGenericInstantiations_3() {
+    checkFile('''
+class A<T> {
+  final T x = null;
+  final T w = null;
+}
+
+class B implements A<int> {
+  get x => 3;
+  get w => /*warning:RETURN_OF_INVALID_TYPE*/"hello";
+}
+
+foo() {
+  String y = /*warning:INVALID_ASSIGNMENT*/new B().x;
+  int z = new B().x;
+}
+''');
+  }
+
+  void test_inferTypesOnGenericInstantiations_4() {
+    checkFile('''
+class A<T> {
+  T x;
+}
+
+class B<E> extends A<E> {
+  E y;
+  /*severe:INVALID_FIELD_OVERRIDE*/get x => y;
+}
+
+foo() {
+  int y = /*warning:INVALID_ASSIGNMENT*/new B<String>().x;
+  String z = new B<String>().x;
+}
+''');
+  }
+
+  void test_inferTypesOnGenericInstantiations_5() {
+    checkFile('''
+abstract class I<E> {
+  String m(a, String f(v, E e));
+}
+
+abstract class A<E> implements I<E> {
+  const A();
+  String m(a, String f(v, E e));
+}
+
+abstract class M {
+  final int y = 0;
+}
+
+class B<E> extends A<E> implements M {
+  const B();
+  int get y => 0;
+
+  m(a, f(v, E e)) {}
+}
+
+foo () {
+  int y = /*warning:INVALID_ASSIGNMENT*/new B().m(null, null);
+  String z = new B().m(null, null);
+}
+''');
+  }
+
+  void test_inferTypesOnGenericInstantiations_infer() {
+    checkFile('''
+class A<T> {
+  final T x = null;
+}
+
+class B implements A<int> {
+  /*severe:INVALID_METHOD_OVERRIDE*/dynamic get x => 3;
+}
+
+foo() {
+  String y = /*info:DYNAMIC_CAST*/new B().x;
+  int z = /*info:DYNAMIC_CAST*/new B().x;
+}
+''');
+  }
+
+  void test_inferTypesOnGenericInstantiationsInLibraryCycle() {
+    // Note: this is a regression test for a non-deterministic behavior we used to
+    // have with inference in library cycles. If you see this test flake out,
+    // change `test` to `skip_test` and reopen bug #48.
+    addFile(
+        '''
+import 'main.dart';
+abstract class I<E> {
+  A<E> m(a, String f(v, int e));
+}
+''',
+        name: '/a.dart');
+    checkFile('''
+import 'a.dart';
+
+abstract class A<E> implements I<E> {
+  const A();
+
+  final E value = null;
+}
+
+abstract class M {
+  final int y = 0;
+}
+
+class B<E> extends A<E> implements M {
+  const B();
+  int get y => 0;
+
+  m(a, f(v, int e)) {}
+}
+
+foo () {
+  int y = /*warning:INVALID_ASSIGNMENT*/new B<String>().m(null, null).value;
+  String z = new B<String>().m(null, null).value;
+}
+''');
+  }
+
+  void test_inferTypesOnLoopIndices_forEachLoop() {
+    checkFile('''
+class Foo {
+  int bar = 42;
+}
+
+class Bar<T extends Iterable<String>> {
+  void foo(T t) {
+    for (var i in t) {
+      int x = /*warning:INVALID_ASSIGNMENT*/i;
+    }
+  }
+}
+
+class Baz<T, E extends Iterable<T>, S extends E> {
+  void foo(S t) {
+    for (var i in t) {
+      int x = /*warning:INVALID_ASSIGNMENT*/i;
+      T y = i;
+    }
+  }
+}
+
+test() {
+  var list = <Foo>[];
+  for (var x in list) {
+    String y = /*warning:INVALID_ASSIGNMENT*/x;
+  }
+
+  for (dynamic x in list) {
+    // The INVALID_ASSIGNMENT hint is because type propagation knows x is
+    // a Foo.
+    String y = /*info:DYNAMIC_CAST,info:INVALID_ASSIGNMENT*/x;
+  }
+
+  for (String x in /*warning:FOR_IN_OF_INVALID_ELEMENT_TYPE*/list) {
+    String y = x;
+  }
+
+  var z;
+  for(z in list) {
+    String y = /*info:DYNAMIC_CAST,info:INVALID_ASSIGNMENT*/z;
+  }
+
+  Iterable iter = list;
+  for (Foo /*info:DYNAMIC_CAST*/x in iter) {
+    var y = x;
+  }
+
+  dynamic iter2 = list;
+  for (Foo /*info:DYNAMIC_CAST*/x in /*info:DYNAMIC_CAST*/iter2) {
+    var y = x;
+  }
+
+  var map = <String, Foo>{};
+  // Error: map must be an Iterable.
+  for (var x in /*warning:FOR_IN_OF_INVALID_TYPE*/map) {
+    String y = /*info:DYNAMIC_CAST*/x;
+  }
+
+  // We're not properly inferring that map.keys is an Iterable<String>
+  // and that x is a String.
+  for (var x in map.keys) {
+    String y = x;
+  }
+}
+''');
+  }
+
+  void test_inferTypesOnLoopIndices_forLoopWithInference() {
+    checkFile('''
+test() {
+  for (var i = 0; i < 10; i++) {
+    int j = i + 1;
+  }
+}
+''');
+  }
+
+  void test_listLiterals() {
     checkFile(r'''
 test1() {
   var x = [1, 2, 3];
-  x.add(/*severe:STATIC_TYPE_ERROR*/'hi');
-  x.add(/*severe:STATIC_TYPE_ERROR*/4.0);
+  x.add(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi');
+  x.add(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/4.0);
   x.add(4);
   List<num> y = x;
 }
 test2() {
   var x = [1, 2.0, 3];
-  x.add(/*severe:STATIC_TYPE_ERROR*/'hi');
+  x.add(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi');
   x.add(4.0);
   List<int> y = /*info:ASSIGNMENT_CAST*/x;
 }
-    ''');
-  });
+  ''');
+  }
 
-  test('map literals', () {
+  void test_listLiterals_topLevel() {
+    checkFile(r'''
+var x1 = [1, 2, 3];
+test1() {
+  x1.add(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi');
+  x1.add(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/4.0);
+  x1.add(4);
+  List<num> y = x1;
+}
+var x2 = [1, 2.0, 3];
+test2() {
+  x2.add(/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi');
+  x2.add(4.0);
+  List<int> y = /*info:ASSIGNMENT_CAST*/x2;
+}
+  ''');
+  }
+
+  void test_listLiteralsShouldNotInferBottom() {
+    var unit = checkFile(r'''
+test1() {
+  var x = [null];
+  x.add(42);
+}
+''');
+    var x = unit.functions[0].localVariables[0];
+    expect(x.type.toString(), 'List<dynamic>');
+  }
+
+  void test_mapLiterals() {
     checkFile(r'''
 test1() {
   var x = { 1: 'x', 2: 'y' };
   x[3] = 'z';
-  x[/*severe:STATIC_TYPE_ERROR*/'hi'] = 'w';
-  x[/*severe:STATIC_TYPE_ERROR*/4.0] = 'u';
-  x[3] = /*severe:STATIC_TYPE_ERROR*/42;
+  x[/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi'] = 'w';
+  x[/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/4.0] = 'u';
+  x[3] = /*warning:INVALID_ASSIGNMENT*/42;
   Map<num, String> y = x;
 }
 
 test2() {
   var x = { 1: 'x', 2: 'y', 3.0: new RegExp('.') };
   x[3] = 'z';
-  x[/*severe:STATIC_TYPE_ERROR*/'hi'] = 'w';
+  x[/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi'] = 'w';
   x[4.0] = 'u';
-  x[3] = /*severe:STATIC_TYPE_ERROR*/42;
+  x[3] = /*warning:INVALID_ASSIGNMENT*/42;
   Pattern p = null;
   x[2] = p;
   Map<int, String> y = /*info:ASSIGNMENT_CAST*/x;
 }
-    ''');
-  });
+  ''');
+  }
 
+  void test_mapLiterals_topLevel() {
+    checkFile(r'''
+var x1 = { 1: 'x', 2: 'y' };
+test1() {
+  x1[3] = 'z';
+  x1[/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi'] = 'w';
+  x1[/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/4.0] = 'u';
+  x1[3] = /*warning:INVALID_ASSIGNMENT*/42;
+  Map<num, String> y = x1;
+}
 
-  group('block bodied lambdas', () {
-    // Original feature request: https://github.com/dart-lang/sdk/issues/25487
+var x2 = { 1: 'x', 2: 'y', 3.0: new RegExp('.') };
+test2() {
+  x2[3] = 'z';
+  x2[/*warning:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi'] = 'w';
+  x2[4.0] = 'u';
+  x2[3] = /*warning:INVALID_ASSIGNMENT*/42;
+  Pattern p = null;
+  x2[2] = p;
+  Map<int, String> y = /*info:ASSIGNMENT_CAST*/x2;
+}
+  ''');
+  }
 
-    test('basic', () {
-      checkFile(r'''
-        test1() {
-          List<int> o;
-          var y = o.map(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) { return x + 1; });
-          Iterable<int> z = y;
-        }
-      ''');
-    });
+  void test_mapLiteralsShouldNotInferBottom() {
+    var unit = checkFile(r'''
+test1() {
+  var x = { null: null };
+  x[3] = 'z';
+}
+''');
+    var x = unit.functions[0].localVariables[0];
+    expect(x.type.toString(), 'Map<dynamic, dynamic>');
+  }
 
-    test('no return', () {
-      var mainUnit = checkFile(r'''
-        test1() {
-          List<int> o;
-          var y = o.map(/*info:INFERRED_TYPE_CLOSURE*/(x) { });
-          Iterable<int> z = /*warning:DOWN_CAST_COMPOSITE*/y;
-        }
-      ''');
-      var f = mainUnit.element.functions[0].localVariables[1];
-      expect(f.type.toString(), 'Iterable<dynamic>');
-    });
+  void test_noErrorWhenDeclaredTypeIsNumAndAssignedNull() {
+    checkFile('''
+test1() {
+  num x = 3;
+  x = null;
+}
+''');
+  }
 
-    test('LUB', () {
-      checkFile(r'''
-        import 'dart:math' show Random;
-        test2() {
-          List<num> o;
-          var y = o.map(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) {
-            if (new Random().nextBool()) {
-              return x.toInt() + 1;
-            } else {
-              return x.toDouble();
-            }
-          });
-          Iterable<num> w = y;
-          Iterable<int> z = /*info:ASSIGNMENT_CAST*/y;
-        }
-      ''');
-    });
+  void test_nullLiteralShouldNotInferAsBottom() {
+    // Regression test for https://github.com/dart-lang/dev_compiler/issues/47
+    checkFile(r'''
+var h = null;
+void foo(int f(Object _)) {}
 
-    group('does not infer bottom', () {
-      test('sync', () {
-        var mainUnit = checkFile(r'''
-          var h = null;
-          void foo(int f(Object _)) {}
+main() {
+  var f = (Object x) => null;
+  String y = /*info:DYNAMIC_CAST*/f(42);
 
-          main() {
-            var f = (Object x) { return null; };
-            String y = /*info:DYNAMIC_CAST*/f(42);
+  f = /*info:INFERRED_TYPE_CLOSURE*/(x) => 'hello';
 
-            f = /*info:INFERRED_TYPE_CLOSURE*/(x) => 'hello';
+  var g = null;
+  g = 'hello';
+  (/*info:DYNAMIC_INVOKE*/g.foo());
 
-            foo(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) { return null; });
-            foo(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) { throw "not implemented"; });
-          }
-        ''');
+  h = 'hello';
+  (/*info:DYNAMIC_INVOKE*/h.foo());
 
-        var f = mainUnit.element.functions[1].localVariables[0];
-        expect(f.type.toString(), '(Object) → dynamic');
-      });
+  foo(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) => null);
+  foo(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) => throw "not implemented");
+}
+''');
+  }
 
-      test('sync*', () {
-        var mainUnit = checkFile(r'''
-          main() {
-            var f = () sync* { yield null; };
-            Iterable y = f();
-            Iterable<String> z = /*warning:DOWN_CAST_COMPOSITE*/f();
-            String s = /*info:DYNAMIC_CAST*/f().first;
-          }
-        ''');
+  void test_propagateInferenceToFieldInClass() {
+    checkFile('''
+class A {
+  int x = 2;
+}
 
-        var f = mainUnit.element.functions[0].localVariables[0];
-        expect(f.type.toString(), '() → Iterable<dynamic>');
-      });
+test() {
+  var a = new A();
+  A b = a;                      // doesn't require down cast
+  print(a.x);     // doesn't require dynamic invoke
+  print(a.x + 2); // ok to use in bigger expression
+}
+''');
+  }
 
-      test('async', () {
-        var mainUnit = checkFile(r'''
-          import 'dart:async';
-          main() async {
-            var f = () async { return null; };
-            Future y = f();
-            Future<String> z = /*warning:DOWN_CAST_COMPOSITE*/f();
-            String s = /*info:DYNAMIC_CAST*/await f();
-          }
-        ''');
+  void test_propagateInferenceToFieldInClassDynamicWarnings() {
+    checkFile('''
+class A {
+  int x = 2;
+}
 
-        var f = mainUnit.element.functions[0].localVariables[0];
-        expect(f.type.toString(), '() → Future<dynamic>');
-      });
+test() {
+  dynamic a = new A();
+  A b = /*info:DYNAMIC_CAST*/a;
+  print(/*info:DYNAMIC_INVOKE*/a.x);
+  print(/*info:DYNAMIC_INVOKE*/(/*info:DYNAMIC_INVOKE*/a.x) + 2);
+}
+''');
+  }
 
-      test('async*', () {
-        var mainUnit = checkFile(r'''
-          import 'dart:async';
-          main() async {
-            var f = () async* { yield null; };
-            Stream y = f();
-            Stream<String> z = /*warning:DOWN_CAST_COMPOSITE*/f();
-            String s = /*info:DYNAMIC_CAST*/await f().first;
-          }
-        ''');
+  void test_propagateInferenceTransitively() {
+    checkFile('''
+class A {
+  int x = 2;
+}
 
-        var f = mainUnit.element.functions[0].localVariables[0];
-        expect(f.type.toString(), '() → Stream<dynamic>');
-      });
-    });
+test5() {
+  var a1 = new A();
+  a1.x = /*warning:INVALID_ASSIGNMENT*/"hi";
 
-    group('async', () {
-      test('all returns are values', () {
-        var mainUnit = checkFile(r'''
-          import 'dart:async';
-          import 'dart:math' show Random;
-          main() {
-            var f = /*info:INFERRED_TYPE_CLOSURE*/() async {
-              if (new Random().nextBool()) {
-                return 1;
-              } else {
-                return 2.0;
-              }
-            };
-            Future<num> g = f();
-            Future<int> h = /*info:ASSIGNMENT_CAST*/f();
-          }
-        ''');
-        var f = mainUnit.element.functions[0].localVariables[0];
-        expect(f.type.toString(), '() → Future<num>');
-      });
+  A a2 = new A();
+  a2.x = /*warning:INVALID_ASSIGNMENT*/"hi";
+}
+''');
+  }
 
-      test('all returns are futures', () {
-        var mainUnit = checkFile(r'''
-          import 'dart:async';
-          import 'dart:math' show Random;
-          main() {
-            var f = /*info:INFERRED_TYPE_CLOSURE*/() async {
-              if (new Random().nextBool()) {
-                return new Future<int>.value(1);
-              } else {
-                return new Future<double>.value(2.0);
-              }
-            };
-            Future<num> g = f();
-            Future<int> h = /*info:ASSIGNMENT_CAST*/f();
-          }
-        ''');
-        var f = mainUnit.element.functions[0].localVariables[0];
-        expect(f.type.toString(), '() → Future<num>');
-      });
+  void test_propagateInferenceTransitively2() {
+    checkFile('''
+class A {
+  int x = 42;
+}
 
-      test('mix of values and futures', () {
-        var mainUnit = checkFile(r'''
-          import 'dart:async';
-          import 'dart:math' show Random;
-          main() {
-            var f = /*info:INFERRED_TYPE_CLOSURE*/() async {
-              if (new Random().nextBool()) {
-                return new Future<int>.value(1);
-              } else {
-                return 2.0;
-              }
-            };
-            Future<num> g = f();
-            Future<int> h = /*info:ASSIGNMENT_CAST*/f();
-          }
-        ''');
-        var f = mainUnit.element.functions[0].localVariables[0];
-        expect(f.type.toString(), '() → Future<num>');
-      });
-    });
+class B {
+  A a = new A();
+}
 
-    test('sync*', () {
-      var mainUnit = checkFile(r'''
-        main() {
-          var f = /*info:INFERRED_TYPE_CLOSURE*/() sync* {
-            yield 1;
-            yield* [3, 4.0];
-          };
-          Iterable<num> g = f();
-          Iterable<int> h = /*info:ASSIGNMENT_CAST*/f();
-        }
-      ''');
-      var f = mainUnit.element.functions[0].localVariables[0];
-      expect(f.type.toString(), '() → Iterable<num>');
-    });
+class C {
+  B b = new B();
+}
 
-    test('async*', () {
-      var mainUnit = checkFile(r'''
-        import 'dart:async';
-        main() {
-          var f = /*info:INFERRED_TYPE_CLOSURE*/() async* {
-            yield 1;
-            Stream<double> s;
-            yield* s;
-          };
-          Stream<num> g = f();
-          Stream<int> h = /*info:ASSIGNMENT_CAST*/f();
-        }
-      ''');
-      var f = mainUnit.element.functions[0].localVariables[0];
-      expect(f.type.toString(), '() → Stream<num>');
-    });
+class D {
+  C c = new C();
+}
 
-    test('downwards incompatible with upwards inference', () {
-      var mainUnit = checkFile(r'''
-        main() {
-          String f() => null;
-          var g = f;
-          g = /*info:INFERRED_TYPE_CLOSURE*/() { return /*severe:STATIC_TYPE_ERROR*/1; };
-        }
-      ''');
-      var f = mainUnit.element.functions[0].localVariables[0];
-      expect(f.type.toString(), '() → String');
-    });
+void main() {
+  var d1 = new D();
+  print(d1.c.b.a.x);
 
-    test('nested lambdas', () {
-      var mainUnit = checkFile(r'''
-        main() {
-          var f = /*info:INFERRED_TYPE_CLOSURE*/() {
-            return /*info:INFERRED_TYPE_CLOSURE*/(int x) { return 2.0 * x; };
-          };
-        }
-      ''');
-      var f = mainUnit.element.functions[0].localVariables[0];
-      expect(f.type.toString(), '() → (int) → num');
-    });
-  });
+  D d2 = new D();
+  print(d2.c.b.a.x);
+}
+''');
+  }
+
+  void test_staticRefersToNonstaticField_inOtherLibraryCycle() {
+    addFile(
+        '''
+import 'b.dart';
+var x = new C().f;
+''',
+        name: '/a.dart');
+    addFile(
+        '''
+class C {
+  var f = 0;
+}
+''',
+        name: '/b.dart');
+    checkFile('''
+import 'a.dart';
+test() {
+  x = /*warning:INVALID_ASSIGNMENT*/"hi";
+}
+''');
+  }
+
+  void test_staticRefersToNonstaticField_inSameLibraryCycle() {
+    addFile(
+        '''
+import 'b.dart';
+var x = new C().f;
+class D {
+  var f = 0;
+}
+''',
+        name: '/a.dart');
+    addFile(
+        '''
+import 'a.dart';
+var y = new D().f;
+class C {
+  var f = 0;
+}
+''',
+        name: '/b.dart');
+    checkFile('''
+import 'a.dart';
+import 'b.dart';
+test() {
+  x = "hi";
+  y = "hi";
+}
+''');
+  }
+}
+
+@reflectiveTest
+class InferredTypeTest extends InferredTypeMixin {
+  /// Adds a file to check. The file should contain:
+  ///
+  ///   * all expected failures are listed in the source code using comments
+  ///     immediately in front of the AST node that should contain the error.
+  ///
+  ///   * errors are formatted as a token `level:Type`, where `level` is the
+  ///     logging level were the error would be reported at, and `Type` is the
+  ///     concrete subclass of [StaticInfo] that denotes the error.
+  ///
+  /// For example to check that an assignment produces a type error, you can
+  /// create a file like:
+  ///
+  ///     addFile('''
+  ///       String x = /*severe:STATIC_TYPE_ERROR*/3;
+  ///     ''');
+  ///     check();
+  ///
+  /// For a single file, you may also use [checkFile].
+  @override
+  void addFile(String content, {String name: '/main.dart'}) {
+    helper.addFile(content, name: name);
+  }
+
+  /// Adds a file using [helper.addFile] and calls [helper.check].
+  ///
+  /// Also returns the resolved compilation unit.
+  @override
+  CompilationUnitElement checkFile(String content) {
+    return helper.checkFile(content).element;
+  }
 }
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 e04fb30..6e5b83b 100644
--- a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
+++ b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
@@ -63,8 +63,9 @@
   var uriResolver = new _TestUriResolver(files);
   // Enable task model strong mode
   var context = AnalysisEngine.instance.createAnalysisContext();
-  context.analysisOptions.strongMode = true;
-  (context.analysisOptions as AnalysisOptionsImpl).strongModeHints = true;
+  AnalysisOptionsImpl options = context.analysisOptions as AnalysisOptionsImpl;
+  options.strongMode = true;
+  options.strongModeHints = true;
   context.sourceFactory =
       new SourceFactory([new DartUriResolver(new MockSdk()), uriResolver]);
 
@@ -87,11 +88,17 @@
 
       var librarySource = context.getLibrariesContaining(source).single;
       var resolved = context.resolveCompilationUnit2(source, librarySource);
-      errors.addAll(context.getErrors(source).errors.where((e) =>
-          e.errorCode != HintCode.UNUSED_LOCAL_VARIABLE &&
-          // TODO(jmesserly): these are usually intentional dynamic calls.
-          e.errorCode.name != 'UNDEFINED_METHOD'));
 
+      errors.addAll(context.computeErrors(source).where((e) =>
+          // TODO(jmesserly): these are usually intentional dynamic calls.
+          e.errorCode.name != 'UNDEFINED_METHOD' &&
+          // We don't care about any of these:
+          e.errorCode != HintCode.UNNECESSARY_CAST &&
+          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));
       _expectErrors(resolved, errors);
     }
   }
@@ -107,6 +114,28 @@
   return check();
 }
 
+void initStrongModeTests() {
+  setUp(() {
+    AnalysisEngine.instance.processRequiredPlugins();
+    files = new MemoryResourceProvider();
+    _checkCalled = false;
+  });
+
+  tearDown(() {
+    // This is a sanity check, in case only addFile is called.
+    expect(_checkCalled, true, reason: 'must call check() method in test case');
+    files = null;
+  });
+}
+
+Level _actualErrorLevel(AnalysisError actual) {
+  return const <ErrorSeverity, Level>{
+    ErrorSeverity.ERROR: Level.SEVERE,
+    ErrorSeverity.WARNING: Level.WARNING,
+    ErrorSeverity.INFO: Level.INFO
+  }[actual.errorCode.errorSeverity];
+}
+
 SourceSpanWithContext _createSpanHelper(
     LineInfo lineInfo, int start, Source source, String content,
     {int end}) {
@@ -143,49 +172,6 @@
   }
 }
 
-void initStrongModeTests() {
-  setUp(() {
-    AnalysisEngine.instance.processRequiredPlugins();
-    files = new MemoryResourceProvider();
-    _checkCalled = false;
-  });
-
-  tearDown(() {
-    // This is a sanity check, in case only addFile is called.
-    expect(_checkCalled, true, reason: 'must call check() method in test case');
-    files = null;
-  });
-}
-
-SourceLocation _locationForOffset(LineInfo lineInfo, Uri uri, int offset) {
-  var loc = lineInfo.getLocation(offset);
-  return new SourceLocation(offset,
-      sourceUrl: uri, line: loc.lineNumber - 1, column: loc.columnNumber - 1);
-}
-
-/// Returns all libraries transitively imported or exported from [start].
-List<LibraryElement> _reachableLibraries(LibraryElement start) {
-  var results = <LibraryElement>[];
-  var seen = new Set();
-  void find(LibraryElement lib) {
-    if (seen.contains(lib)) return;
-    seen.add(lib);
-    results.add(lib);
-    lib.importedLibraries.forEach(find);
-    lib.exportedLibraries.forEach(find);
-  }
-  find(start);
-  return results;
-}
-
-Level _actualErrorLevel(AnalysisError actual) {
-  return const <ErrorSeverity, Level>{
-    ErrorSeverity.ERROR: Level.SEVERE,
-    ErrorSeverity.WARNING: Level.WARNING,
-    ErrorSeverity.INFO: Level.INFO
-  }[actual.errorCode.errorSeverity];
-}
-
 void _expectErrors(CompilationUnit unit, List<AnalysisError> actualErrors) {
   var expectedErrors = _findExpectedErrors(unit.beginToken);
 
@@ -261,6 +247,27 @@
   return expectedErrors;
 }
 
+SourceLocation _locationForOffset(LineInfo lineInfo, Uri uri, int offset) {
+  var loc = lineInfo.getLocation(offset);
+  return new SourceLocation(offset,
+      sourceUrl: uri, line: loc.lineNumber - 1, column: loc.columnNumber - 1);
+}
+
+/// Returns all libraries transitively imported or exported from [start].
+List<LibraryElement> _reachableLibraries(LibraryElement start) {
+  var results = <LibraryElement>[];
+  var seen = new Set();
+  void find(LibraryElement lib) {
+    if (seen.contains(lib)) return;
+    seen.add(lib);
+    results.add(lib);
+    lib.importedLibraries.forEach(find);
+    lib.exportedLibraries.forEach(find);
+  }
+  find(start);
+  return results;
+}
+
 void _reportFailure(
     CompilationUnit unit,
     List<_ErrorExpectation> unreported,
diff --git a/pkg/analyzer/test/src/task/strong/test_all.dart b/pkg/analyzer/test/src/task/strong/test_all.dart
new file mode 100644
index 0000000..be9a178
--- /dev/null
+++ b/pkg/analyzer/test/src/task/strong/test_all.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.src.task.strong.test_all;
+
+import 'package:unittest/unittest.dart';
+
+import '../../../utils.dart';
+import 'checker_test.dart' as checker_test;
+import 'inferred_type_test.dart' as inferred_type_test;
+
+/// Utility for manually running all tests.
+main() {
+  initializeTestEnvironment();
+  group('task tests', () {
+    checker_test.main();
+    inferred_type_test.main();
+  });
+}
diff --git a/pkg/analyzer/test/src/task/strong_mode_test.dart b/pkg/analyzer/test/src/task/strong_mode_test.dart
index 097d5d4..c4589f7 100644
--- a/pkg/analyzer/test/src/task/strong_mode_test.dart
+++ b/pkg/analyzer/test/src/task/strong_mode_test.dart
@@ -7,6 +7,7 @@
 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/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/task/strong_mode.dart';
 import 'package:unittest/unittest.dart';
@@ -18,14 +19,17 @@
 main() {
   initializeTestEnvironment();
   runReflectiveTests(InstanceMemberInferrerTest);
+  runReflectiveTests(SetFieldTypeTest);
   runReflectiveTests(VariableGathererTest);
 }
 
 @reflectiveTest
 class InstanceMemberInferrerTest extends AbstractContextTest {
-  InstanceMemberInferrer get createInferrer =>
-      new InstanceMemberInferrer(context.typeProvider,
-          typeSystem: context.typeSystem);
+  InstanceMemberInferrer createInferrer(LibraryElement library) {
+    return new InstanceMemberInferrer(
+        context.typeProvider, new InheritanceManager(library),
+        typeSystem: context.typeSystem);
+  }
 
   /**
    * Add a source with the given [content] and return the result of resolving
@@ -37,13 +41,12 @@
   }
 
   void test_creation() {
-    InstanceMemberInferrer inferrer = createInferrer;
+    InstanceMemberInferrer inferrer = createInferrer(null);
     expect(inferrer, isNotNull);
     expect(inferrer.typeSystem, isNotNull);
   }
 
   void test_inferCompilationUnit_field_multiple_different() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -62,14 +65,13 @@
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_field_multiple_different_generic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A<E> {
@@ -88,14 +90,13 @@
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_field_multiple_dynamic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -114,14 +115,13 @@
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_field_multiple_same() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -143,14 +143,13 @@
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldC.type, expectedType);
     expect(getterC.returnType, expectedType);
   }
 
   void test_inferCompilationUnit_field_noOverride() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -163,7 +162,7 @@
     expect(fieldA.type.isDynamic, isTrue);
     expect(getterA.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    InstanceMemberInferrer inferrer = _runInferrer(unit);
 
     DartType intType = inferrer.typeProvider.intType;
     expect(fieldA.type, intType);
@@ -171,7 +170,6 @@
   }
 
   void test_inferCompilationUnit_field_noOverride_bottom() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -184,14 +182,13 @@
     expect(fieldA.type.isDynamic, isTrue);
     expect(getterA.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldA.type.isDynamic, isTrue);
     expect(getterA.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_field_single_explicitlyDynamic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -210,14 +207,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type, fieldA.type);
     expect(getterB.returnType, getterA.returnType);
   }
 
   void test_inferCompilationUnit_field_single_final() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -236,14 +232,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type, fieldA.type);
     expect(getterB.returnType, getterA.returnType);
   }
 
   void test_inferCompilationUnit_field_single_final_narrowType() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -259,14 +254,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    InstanceMemberInferrer inferrer = _runInferrer(unit);
 
     expect(fieldB.type, inferrer.typeProvider.intType);
     expect(getterB.returnType, fieldB.type);
   }
 
   void test_inferCompilationUnit_field_single_generic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A<E> {
@@ -283,14 +277,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type, typeBE);
     expect(getterB.returnType, typeBE);
   }
 
   void test_inferCompilationUnit_field_single_inconsistentAccessors() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -307,14 +300,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_field_single_noModifiers() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -333,14 +325,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type, fieldA.type);
     expect(getterB.returnType, getterA.returnType);
   }
 
   void test_inferCompilationUnit_fieldFormal() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String fieldName = 'f';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -355,7 +346,7 @@
     expect(fieldA.type.isDynamic, isTrue);
     expect(paramA.type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    InstanceMemberInferrer inferrer = _runInferrer(unit);
 
     DartType intType = inferrer.typeProvider.intType;
     expect(fieldA.type, intType);
@@ -363,7 +354,6 @@
   }
 
   void test_inferCompilationUnit_getter_multiple_different() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String getterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -382,14 +372,13 @@
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_getter_multiple_dynamic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String getterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -408,14 +397,13 @@
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_getter_multiple_same() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String getterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -437,14 +425,13 @@
     expect(fieldC.type.isDynamic, isTrue);
     expect(getterC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldC.type, expectedType);
     expect(getterC.returnType, expectedType);
   }
 
   void test_inferCompilationUnit_getter_single() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String getterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -463,14 +450,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type, fieldA.type);
     expect(getterB.returnType, getterA.returnType);
   }
 
   void test_inferCompilationUnit_getter_single_generic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String getterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A<E> {
@@ -487,14 +473,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type, typeBE);
     expect(getterB.returnType, typeBE);
   }
 
   void test_inferCompilationUnit_getter_single_inconsistentAccessors() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String getterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -514,7 +499,7 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(getterB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     // Expected behavior is that the getter is inferred: getters and setters
     // are treated as independent methods.
@@ -523,17 +508,15 @@
   }
 
   void test_inferCompilationUnit_invalid_inheritanceCycle() {
-    InstanceMemberInferrer inferrer = createInferrer;
     CompilationUnitElement unit = resolve('''
 class A extends C {}
 class B extends A {}
 class C extends B {}
 ''');
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
   }
 
   void test_inferCompilationUnit_method_parameter_multiple_different() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -551,13 +534,12 @@
     ParameterElement parameterC = methodC.parameters[0];
     expect(parameterC.type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(parameterC.type.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_method_parameter_multiple_named_different() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -575,13 +557,12 @@
     ParameterElement parameterC = methodC.parameters[0];
     expect(parameterC.type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(parameterC.type.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_method_parameter_multiple_named_same() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -603,13 +584,12 @@
     ParameterElement parameterC = methodC.parameters[0];
     expect(parameterC.type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(parameterC.type, expectedType);
   }
 
   void test_inferCompilationUnit_method_parameter_multiple_namedAndRequired() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -627,14 +607,13 @@
     ParameterElement parameterC = methodC.parameters[0];
     expect(parameterC.type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(parameterC.type.isDynamic, isTrue);
   }
 
   void
       test_inferCompilationUnit_method_parameter_multiple_optionalAndRequired() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -656,13 +635,12 @@
     ParameterElement parameterC = methodC.parameters[0];
     expect(parameterC.type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(parameterC.type, expectedType);
   }
 
   void test_inferCompilationUnit_method_parameter_single_generic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A<E> {
@@ -679,7 +657,7 @@
     expect(parameterC.type.isDynamic, isTrue);
     expect(methodC.type.typeArguments, [typeCE]);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(parameterC.type, classC.typeParameters[0].type);
     expect(methodC.type.typeArguments, [typeCE],
@@ -687,7 +665,6 @@
   }
 
   void test_inferCompilationUnit_method_return_multiple_different() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -704,13 +681,12 @@
     MethodElement methodC = classC.getMethod(methodName);
     expect(methodC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_method_return_multiple_different_generic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A<E> {
@@ -727,13 +703,12 @@
     MethodElement methodC = classC.getMethod(methodName);
     expect(methodC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_method_return_multiple_dynamic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -750,13 +725,12 @@
     MethodElement methodC = classC.getMethod(methodName);
     expect(methodC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_method_return_multiple_same_generic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A<E> {
@@ -773,13 +747,12 @@
     MethodElement methodC = classC.getMethod(methodName);
     expect(methodC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodC.returnType, classC.typeParameters[0].type);
   }
 
   void test_inferCompilationUnit_method_return_multiple_same_nonVoid() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -799,13 +772,12 @@
     MethodElement methodC = classC.getMethod(methodName);
     expect(methodC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodC.returnType, expectedType);
   }
 
   void test_inferCompilationUnit_method_return_multiple_same_void() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -825,13 +797,12 @@
     MethodElement methodC = classC.getMethod(methodName);
     expect(methodC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodC.returnType, expectedType);
   }
 
   void test_inferCompilationUnit_method_return_multiple_void() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -848,13 +819,12 @@
     MethodElement methodC = classC.getMethod(methodName);
     expect(methodC.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodC.returnType.isDynamic, isTrue);
   }
 
   void test_inferCompilationUnit_method_return_single() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -870,13 +840,12 @@
     MethodElement methodB = classB.getMethod(methodName);
     expect(methodB.returnType.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodB.returnType, methodA.returnType);
   }
 
   void test_inferCompilationUnit_method_return_single_generic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String methodName = 'm';
     CompilationUnitElement unit = resolve('''
 class A<E> {
@@ -892,7 +861,7 @@
     expect(methodB.returnType.isDynamic, isTrue);
     expect(methodB.type.typeArguments, [typeBE]);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(methodB.returnType, classB.typeParameters[0].type);
     expect(methodB.type.typeArguments, [typeBE],
@@ -900,7 +869,6 @@
   }
 
   void test_inferCompilationUnit_setter_single() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String setterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -919,14 +887,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(setterB.parameters[0].type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type, fieldA.type);
     expect(setterB.parameters[0].type, setterA.parameters[0].type);
   }
 
   void test_inferCompilationUnit_setter_single_generic() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String setterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A<E> {
@@ -943,14 +910,13 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(setterB.parameters[0].type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     expect(fieldB.type, typeBE);
     expect(setterB.parameters[0].type, typeBE);
   }
 
   void test_inferCompilationUnit_setter_single_inconsistentAccessors() {
-    InstanceMemberInferrer inferrer = createInferrer;
     String getterName = 'g';
     CompilationUnitElement unit = resolve('''
 class A {
@@ -969,7 +935,7 @@
     expect(fieldB.type.isDynamic, isTrue);
     expect(setterB.parameters[0].type.isDynamic, isTrue);
 
-    inferrer.inferCompilationUnit(unit);
+    _runInferrer(unit);
 
     // Expected behavior is that the getter is inferred: getters and setters
     // are treated as independent methods.
@@ -979,6 +945,29 @@
     // resolver would do if we explicitly typed the parameter as 'String'
     expect(fieldB.type, setterB.parameters[0].type);
   }
+
+  InstanceMemberInferrer _runInferrer(CompilationUnitElement unit) {
+    InstanceMemberInferrer inferrer = createInferrer(unit.library);
+    inferrer.inferCompilationUnit(unit);
+    return inferrer;
+  }
+}
+
+@reflectiveTest
+class SetFieldTypeTest extends AbstractContextTest {
+  void test_setter_withoutParameter() {
+    CompilationUnitElement unit = _resolve('''
+var x = 0;
+set x() {}
+''');
+    TopLevelVariableElement variable = unit.topLevelVariables.single;
+    setFieldType(variable, context.typeProvider.intType);
+  }
+
+  CompilationUnitElement _resolve(String content) {
+    Source source = addSource('/test.dart', content);
+    return context.resolveCompilationUnit2(source, source).element;
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/src/task/test_all.dart b/pkg/analyzer/test/src/task/test_all.dart
index 956a8e5..22108ff 100644
--- a/pkg/analyzer/test/src/task/test_all.dart
+++ b/pkg/analyzer/test/src/task/test_all.dart
@@ -20,6 +20,7 @@
 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;
 import 'strong_mode_test.dart' as strong_mode_test;
 import 'yaml_test.dart' as yaml_test;
 
@@ -39,6 +40,7 @@
     model_test.main();
     options_test.main();
     options_work_manager_test.main();
+    strong_mode_test_all.main();
     strong_mode_test.main();
     yaml_test.main();
   });
diff --git a/pkg/analyzer/test/test_all.dart b/pkg/analyzer/test/test_all.dart
index 8155789..7e45412 100644
--- a/pkg/analyzer/test/test_all.dart
+++ b/pkg/analyzer/test/test_all.dart
@@ -7,6 +7,7 @@
 import 'package:unittest/unittest.dart';
 
 import 'cancelable_future_test.dart' as cancelable_future_test;
+import 'context/test_all.dart' as context;
 import 'enum_test.dart' as enum_test;
 import 'file_system/test_all.dart' as file_system;
 import 'generated/test_all.dart' as generated;
@@ -21,6 +22,7 @@
   initializeTestEnvironment();
   group('analysis engine', () {
     cancelable_future_test.main();
+    context.main();
     enum_test.main();
     file_system.main();
     generated.main();
diff --git a/pkg/analyzer/tool/summary/build_sdk_summaries.dart b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
index 29f49db..01fa8fe 100644
--- a/pkg/analyzer/tool/summary/build_sdk_summaries.dart
+++ b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
@@ -7,47 +7,93 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/sdk_io.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/flat_buffers.dart' as fb;
 import 'package:analyzer/src/summary/index_unit.dart';
 import 'package:analyzer/src/summary/summarize_elements.dart';
 import 'package:path/path.dart';
 
 main(List<String> args) {
-  if (args.length < 1 || args.length > 2) {
+  if (args.length < 1) {
     _printUsage();
     exitCode = 1;
     return;
   }
-  //
-  // Prepare output file path.
-  //
-  String outputDirectoryPath = args[0];
-  if (!FileSystemEntity.isDirectorySync(outputDirectoryPath)) {
-    print("'$outputDirectoryPath' is not a directory.");
-    _printUsage();
-    exitCode = 1;
-    return;
-  }
-  //
-  // Prepare SDK path.
-  //
-  String sdkPath;
-  if (args.length == 2) {
-    sdkPath = args[1];
-    if (!FileSystemEntity.isDirectorySync('$sdkPath/lib')) {
-      print("'$sdkPath/lib' does not exist.");
+  String command = args[0];
+  if (command == 'multiple-outputs' && args.length >= 2 && args.length <= 3) {
+    //
+    // Prepare the output path.
+    //
+    String outputDirectoryPath = args[1];
+    if (!FileSystemEntity.isDirectorySync(outputDirectoryPath)) {
+      print("'$outputDirectoryPath' is not a directory.");
       _printUsage();
       exitCode = 1;
       return;
     }
+    //
+    // Prepare results.
+    //
+    String sdkPath = args.length > 2 ? args[2] : null;
+    _Output output = _buildMultipleOutputs(sdkPath);
+    if (output == null) {
+      exitCode = 1;
+      return;
+    }
+    //
+    // Write results.
+    //
+    output.spec.writeMultiple(outputDirectoryPath, 'spec');
+    output.strong.writeMultiple(outputDirectoryPath, 'strong');
+  } else if (command == 'single-output' &&
+      args.length >= 2 &&
+      args.length <= 3) {
+    String outputPath = args[1];
+    String sdkPath = args.length > 2 ? args[2] : null;
+    //
+    // Prepare results.
+    //
+    _Output output = _buildMultipleOutputs(sdkPath);
+    if (output == null) {
+      exitCode = 1;
+      return;
+    }
+    //
+    // Write results.
+    //
+    fb.Builder builder = new fb.Builder();
+    fb.Offset specSumOffset = builder.writeListUint8(output.spec.sum);
+    fb.Offset specIndexOffset = builder.writeListUint8(output.spec.index);
+    fb.Offset strongSumOffset = builder.writeListUint8(output.strong.sum);
+    fb.Offset strongIndexOffset = builder.writeListUint8(output.strong.index);
+    builder.startTable();
+    builder.addOffset(_FIELD_SPEC_SUM, specSumOffset);
+    builder.addOffset(_FIELD_SPEC_INDEX, specIndexOffset);
+    builder.addOffset(_FIELD_STRONG_SUM, strongSumOffset);
+    builder.addOffset(_FIELD_STRONG_INDEX, strongIndexOffset);
+    fb.Offset offset = builder.endTable();
+    new File(outputPath)
+        .writeAsBytesSync(builder.finish(offset), mode: FileMode.WRITE_ONLY);
+  } else if (command == 'extract-spec-sum' && args.length == 3) {
+    String inputPath = args[1];
+    String outputPath = args[2];
+    _extractSingleOutput(inputPath, _FIELD_SPEC_SUM, outputPath);
+  } else if (command == 'extract-spec-index' && args.length == 3) {
+    String inputPath = args[1];
+    String outputPath = args[2];
+    _extractSingleOutput(inputPath, _FIELD_SPEC_INDEX, outputPath);
+  } else if (command == 'extract-strong-sum' && args.length == 3) {
+    String inputPath = args[1];
+    String outputPath = args[2];
+    _extractSingleOutput(inputPath, _FIELD_STRONG_SUM, outputPath);
+  } else if (command == 'extract-strong-index' && args.length == 3) {
+    String inputPath = args[1];
+    String outputPath = args[2];
+    _extractSingleOutput(inputPath, _FIELD_STRONG_INDEX, outputPath);
   } else {
-    sdkPath = DirectoryBasedDartSdk.defaultSdkDirectory.getAbsolutePath();
+    _printUsage();
+    exitCode = 1;
+    return;
   }
-  //
-  // Build spec and strong summaries.
-  //
-  new _Builder(sdkPath, outputDirectoryPath, false).build();
-  new _Builder(sdkPath, outputDirectoryPath, true).build();
 }
 
 /**
@@ -55,17 +101,67 @@
  */
 const BINARY_NAME = "build_sdk_summaries";
 
+const int _FIELD_SPEC_INDEX = 1;
+const int _FIELD_SPEC_SUM = 0;
+const int _FIELD_STRONG_INDEX = 3;
+const int _FIELD_STRONG_SUM = 2;
+
+_Output _buildMultipleOutputs(String sdkPath) {
+  //
+  // Validate the SDK path.
+  //
+  if (sdkPath != null) {
+    if (!FileSystemEntity.isDirectorySync('$sdkPath/lib')) {
+      print("'$sdkPath/lib' does not exist.");
+      _printUsage();
+      return null;
+    }
+  } else {
+    sdkPath = DirectoryBasedDartSdk.defaultSdkDirectory.getAbsolutePath();
+  }
+  //
+  // Build spec and strong outputs.
+  //
+  _BuilderOutput spec = new _Builder(sdkPath, false).build();
+  _BuilderOutput strong = new _Builder(sdkPath, true).build();
+  return new _Output(spec, strong);
+}
+
+/**
+ * Open the flat buffer in [inputPath] and extract the byte array in the [field]
+ * into the [outputPath] file.
+ */
+void _extractSingleOutput(String inputPath, int field, String outputPath) {
+  List<int> bytes = new File(inputPath).readAsBytesSync();
+  fb.BufferPointer root = new fb.BufferPointer.fromBytes(bytes);
+  fb.BufferPointer table = root.derefObject();
+  List<int> fieldBytes = const fb.Uint8ListReader().vTableGet(table, field);
+  new File(outputPath).writeAsBytesSync(fieldBytes, mode: FileMode.WRITE_ONLY);
+}
+
 /**
  * Print information about how to use the SDK summaries builder.
  */
 void _printUsage() {
-  print('Usage: $BINARY_NAME output_directory_path [sdk_path]');
-  print('Build files spec.sum and strong.sum in the output directory.');
+//  print('Usage: $BINARY_NAME command output_directory_path [sdk_path]');
+  print('Usage: $BINARY_NAME command arguments');
+  print('Where command can be one of the following:');
+  print('  multiple-outputs output_directory_path [sdk_path]');
+  print('    Generate separate summary and index files.');
+  print('  single-output output_file_path [sdk_path]');
+  print('    Generate a single file with summary and index.');
+  print('  extract-spec-sum input_file output_file');
+  print('    Extract the spec-mode summary file.');
+  print('  extract-strong-sum input_file output_file');
+  print('    Extract the strong-mode summary file.');
+  print('  extract-spec-index input_file output_file');
+  print('    Extract the spec-mode index file.');
+  print('  extract-strong-index input_file output_file');
+  print('    Extract the strong-mode index file.');
 }
 
 class _Builder {
   final String sdkPath;
-  final String outputDirectoryPath;
   final bool strongMode;
 
   AnalysisContext context;
@@ -74,12 +170,12 @@
   final PackageBundleAssembler bundleAssembler = new PackageBundleAssembler();
   final PackageIndexAssembler indexAssembler = new PackageIndexAssembler();
 
-  _Builder(this.sdkPath, this.outputDirectoryPath, this.strongMode);
+  _Builder(this.sdkPath, this.strongMode);
 
   /**
    * Build a strong or spec mode summary for the Dart SDK at [sdkPath].
    */
-  void build() {
+  _BuilderOutput build() {
     String modeName = strongMode ? 'strong' : 'spec';
     print('Generating $modeName mode summary and index.');
     Stopwatch sw = new Stopwatch()..start();
@@ -89,9 +185,8 @@
     DirectoryBasedDartSdk sdk =
         new DirectoryBasedDartSdk(new JavaFile(sdkPath));
     sdk.useSummary = false;
+    sdk.analysisOptions = new AnalysisOptionsImpl()..strongMode = strongMode;
     context = sdk.context;
-    context.analysisOptions = new AnalysisOptionsImpl()
-      ..strongMode = strongMode;
     //
     // Prepare 'dart:' URIs to serialize.
     //
@@ -107,27 +202,12 @@
       _serializeLibrary(libSource);
     }
     //
-    // Write the whole SDK bundle.
+    // Assemble the output.
     //
-    {
-      PackageBundleBuilder bundle = bundleAssembler.assemble();
-      String outputPath = join(outputDirectoryPath, '$modeName.sum');
-      File file = new File(outputPath);
-      file.writeAsBytesSync(bundle.toBuffer(), mode: FileMode.WRITE_ONLY);
-    }
-    //
-    // Write the whole SDK index.
-    //
-    {
-      PackageIndexBuilder index = indexAssembler.assemble();
-      String outputPath = join(outputDirectoryPath, '$modeName.index');
-      File file = new File(outputPath);
-      file.writeAsBytesSync(index.toBuffer(), mode: FileMode.WRITE_ONLY);
-    }
-    //
-    // Done.
-    //
+    List<int> sumBytes = bundleAssembler.assemble().toBuffer();
+    List<int> indexBytes = indexAssembler.assemble().toBuffer();
     print('\tDone in ${sw.elapsedMilliseconds} ms.');
+    return new _BuilderOutput(sumBytes, indexBytes);
   }
 
   /**
@@ -147,7 +227,36 @@
       Source unitSource = unitElement.source;
       CompilationUnit unit =
           context.resolveCompilationUnit2(unitSource, source);
-      indexAssembler.index(unit);
+      indexAssembler.indexUnit(unit);
     }
   }
 }
+
+class _BuilderOutput {
+  final List<int> sum;
+  final List<int> index;
+
+  _BuilderOutput(this.sum, this.index);
+
+  void writeMultiple(String outputDirectoryPath, String modeName) {
+    // Write summary.
+    {
+      String outputPath = join(outputDirectoryPath, '$modeName.sum');
+      File file = new File(outputPath);
+      file.writeAsBytesSync(sum, mode: FileMode.WRITE_ONLY);
+    }
+    // Write index.
+    {
+      String outputPath = join(outputDirectoryPath, '$modeName.index');
+      File file = new File(outputPath);
+      file.writeAsBytesSync(index, mode: FileMode.WRITE_ONLY);
+    }
+  }
+}
+
+class _Output {
+  final _BuilderOutput spec;
+  final _BuilderOutput strong;
+
+  _Output(this.spec, this.strong);
+}
diff --git a/pkg/analyzer/tool/summary/check_test.dart b/pkg/analyzer/tool/summary/check_test.dart
index 156dc19..98f25b6 100644
--- a/pkg/analyzer/tool/summary/check_test.dart
+++ b/pkg/analyzer/tool/summary/check_test.dart
@@ -18,6 +18,5 @@
 main() {
   String script = Platform.script.toFilePath(windows: Platform.isWindows);
   String pkgPath = normalize(join(dirname(script), '..', '..'));
-  GeneratedContent.checkAll(
-      pkgPath, 'tool/summary/generate.dart', allTargets);
+  GeneratedContent.checkAll(pkgPath, 'tool/summary/generate.dart', allTargets);
 }
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index cfa14a0..51dad39 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -283,6 +283,7 @@
             }
             int id;
             bool isDeprecated = false;
+            bool isInformative = false;
             for (Annotation annotation in classMember.metadata) {
               if (annotation.name.name == 'Id') {
                 if (id != null) {
@@ -305,6 +306,8 @@
                   throw new Exception('@deprecated does not take args ($desc)');
                 }
                 isDeprecated = true;
+              } else if (annotation.name.name == 'informative') {
+                isInformative = true;
               }
             }
             if (id == null) {
@@ -314,7 +317,12 @@
             idlModel.FieldType fieldType =
                 new idlModel.FieldType(type.name.name, isList);
             cls.allFields.add(new idlModel.FieldDeclaration(
-                doc, classMember.name.name, fieldType, id, isDeprecated));
+                doc,
+                classMember.name.name,
+                fieldType,
+                id,
+                isDeprecated,
+                isInformative));
           } else if (classMember is ConstructorDeclaration &&
               classMember.name.name == 'fromBuffer') {
             // Ignore `fromBuffer` declarations; they simply forward to the
@@ -589,6 +597,30 @@
         String suffix = i == fields.length - 1 ? ';' : ',';
         out('${prefix}_${field.name} = ${field.name}$suffix');
       }
+      // Generate flushInformative().
+      {
+        out();
+        out('/**');
+        out(' * Flush [informative] data recursively.');
+        out(' */');
+        out('void flushInformative() {');
+        indent(() {
+          for (idlModel.FieldDeclaration field in cls.fields) {
+            idlModel.FieldType fieldType = field.type;
+            String valueName = '_' + field.name;
+            if (field.isInformative) {
+              out('$valueName = null;');
+            } else if (_idl.classes.containsKey(fieldType.typeName)) {
+              if (fieldType.isList) {
+                out('$valueName?.forEach((b) => b.flushInformative());');
+              } else {
+                out('$valueName?.flushInformative();');
+              }
+            }
+          }
+        });
+        out('}');
+      }
       // Generate finish.
       if (cls.isTopLevel) {
         out();
diff --git a/pkg/analyzer/tool/summary/idl_model.dart b/pkg/analyzer/tool/summary/idl_model.dart
index 9ec248f..18b981c 100644
--- a/pkg/analyzer/tool/summary/idl_model.dart
+++ b/pkg/analyzer/tool/summary/idl_model.dart
@@ -25,7 +25,7 @@
 
   /**
    * If [isTopLevel] is `true` and a file identifier was specified for this
-   * class, the file identifier string.  Otheswise `null`.
+   * class, the file identifier string.  Otherwise `null`.
    */
   final String fileIdentifier;
 
@@ -97,8 +97,13 @@
    */
   final bool isDeprecated;
 
-  FieldDeclaration(
-      String documentation, String name, this.type, this.id, this.isDeprecated)
+  /**
+   * Indicates whether the field is informative.
+   */
+  final bool isInformative;
+
+  FieldDeclaration(String documentation, String name, this.type, this.id,
+      this.isDeprecated, this.isInformative)
       : super(documentation, name);
 }
 
diff --git a/pkg/analyzer/tool/task_dependency_graph/generate.dart b/pkg/analyzer/tool/task_dependency_graph/generate.dart
index 9b960f3..2b904bb 100644
--- a/pkg/analyzer/tool/task_dependency_graph/generate.dart
+++ b/pkg/analyzer/tool/task_dependency_graph/generate.dart
@@ -42,9 +42,12 @@
 main() {
   String script = Platform.script.toFilePath(windows: Platform.isWindows);
   String pkgPath = normalize(join(dirname(script), '..', '..'));
-  GeneratedContent.generateAll(pkgPath, <GeneratedContent>[target]);
+  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());
@@ -52,6 +55,7 @@
 typedef void GetterFinderCallback(PropertyAccessorElement element);
 
 class Driver {
+  static bool hasInitializedPlugins = false;
   PhysicalResourceProvider resourceProvider;
   AnalysisContext context;
   InterfaceType resultDescriptorType;
@@ -59,6 +63,7 @@
   ClassElement enginePluginClass;
   CompilationUnitElement taskUnitElement;
   InterfaceType extensionPointIdType;
+
   final String rootDir;
 
   Driver(String pkgPath) : rootDir = new Directory(pkgPath).absolute.path;
@@ -121,7 +126,28 @@
    * Generate the task dependency graph and return it as a [String].
    */
   String generateFileContents() {
-    AnalysisEngine.instance.processRequiredPlugins();
+    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 {
+${generateGraphData()}
+}
+''';
+  }
+
+  String generateGraphData() {
+    if (!hasInitializedPlugins) {
+      AnalysisEngine.instance.processRequiredPlugins();
+      hasInitializedPlugins = true;
+    }
     List<String> lines = <String>[];
     resourceProvider = PhysicalResourceProvider.INSTANCE;
     DartSdk sdk = DirectoryBasedDartSdk.defaultSdk;
@@ -151,9 +177,9 @@
     resultDescriptorType = modelElement
         .getType('ResultDescriptor')
         .type
-        .substitute4([dynamicType]);
+        .instantiate([dynamicType]);
     listOfResultDescriptorType =
-        context.typeProvider.listType.substitute4([resultDescriptorType]);
+        context.typeProvider.listType.instantiate([resultDescriptorType]);
     CompilationUnitElement enginePluginUnitElement =
         getUnit(enginePluginSource).element;
     enginePluginClass = enginePluginUnitElement.getType('EnginePlugin');
@@ -197,20 +223,32 @@
       lines.add('  $result [shape=box]');
     }
     lines.sort();
+    return lines.join('\n');
+  }
+
+  String generateHtml() {
     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".
+<!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 {
-${lines.join('\n')}
+  tooltip="Analysis Task Dependency Graph";
+  node [fontname=Helvetica];
+  edge [fontname=Helvetica, fontcolor=gray];
+${generateGraphData()}
 }
+</script>
+</body>
+</html>
 ''';
   }
 
diff --git a/pkg/analyzer/tool/task_dependency_graph/tasks.dot b/pkg/analyzer/tool/task_dependency_graph/tasks.dot
index d77151b..4142a2a 100644
--- a/pkg/analyzer/tool/task_dependency_graph/tasks.dot
+++ b/pkg/analyzer/tool/task_dependency_graph/tasks.dot
@@ -19,8 +19,8 @@
   BuildCompilationUnitElementTask -> RESOLVED_UNIT1
   BuildDirectiveElementsTask -> BUILD_DIRECTIVES_ERRORS
   BuildDirectiveElementsTask -> LIBRARY_ELEMENT2
-  BuildEnumMemberElementsTask -> CREATED_RESOLVED_UNIT2
-  BuildEnumMemberElementsTask -> RESOLVED_UNIT2
+  BuildEnumMemberElementsTask -> CREATED_RESOLVED_UNIT3
+  BuildEnumMemberElementsTask -> RESOLVED_UNIT3
   BuildExportNamespaceTask -> LIBRARY_ELEMENT4
   BuildLibraryElementTask -> BUILD_LIBRARY_ERRORS
   BuildLibraryElementTask -> IS_LAUNCHABLE
@@ -46,23 +46,24 @@
   CONTENT [shape=box]
   CREATED_RESOLVED_UNIT [shape=box]
   CREATED_RESOLVED_UNIT1 [shape=box]
-  CREATED_RESOLVED_UNIT10 -> ResolveConstantExpressionTask
+  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 -> ResolveInstanceFieldsInUnitTask
   CREATED_RESOLVED_UNIT7 [shape=box]
-  CREATED_RESOLVED_UNIT8 -> InferInstanceMembersInUnitTask
+  CREATED_RESOLVED_UNIT8 -> ResolveInstanceFieldsInUnitTask
   CREATED_RESOLVED_UNIT8 [shape=box]
   CREATED_RESOLVED_UNIT9 -> InferInstanceMembersInUnitTask
-  CREATED_RESOLVED_UNIT9 -> InferStaticVariableTypeTask
-  CREATED_RESOLVED_UNIT9 -> PartiallyResolveUnitReferencesTask
-  CREATED_RESOLVED_UNIT9 -> ResolveInstanceFieldsInUnitTask
-  CREATED_RESOLVED_UNIT9 -> ResolveUnitTask
   CREATED_RESOLVED_UNIT9 [shape=box]
   ComputeConstantDependenciesTask -> CONSTANT_DEPENDENCIES
   ComputeConstantValueTask -> CONSTANT_VALUE
@@ -85,8 +86,8 @@
   EXPORTED_LIBRARIES [shape=box]
   EXPORT_SOURCE_CLOSURE -> BuildExportNamespaceTask
   EXPORT_SOURCE_CLOSURE [shape=box]
-  EvaluateUnitConstantsTask -> CREATED_RESOLVED_UNIT11
-  EvaluateUnitConstantsTask -> RESOLVED_UNIT11
+  EvaluateUnitConstantsTask -> CREATED_RESOLVED_UNIT12
+  EvaluateUnitConstantsTask -> RESOLVED_UNIT12
   GatherUsedImportedElementsTask -> USED_IMPORTED_ELEMENTS
   GatherUsedLocalElementsTask -> USED_LOCAL_ELEMENTS
   GenerateHintsTask -> HINTS
@@ -109,11 +110,11 @@
   INFERRED_STATIC_VARIABLE -> InferStaticVariableTypesInUnitTask
   INFERRED_STATIC_VARIABLE [shape=box]
   IS_LAUNCHABLE [shape=box]
-  InferInstanceMembersInUnitTask -> CREATED_RESOLVED_UNIT9
-  InferInstanceMembersInUnitTask -> RESOLVED_UNIT9
+  InferInstanceMembersInUnitTask -> CREATED_RESOLVED_UNIT10
+  InferInstanceMembersInUnitTask -> RESOLVED_UNIT10
   InferStaticVariableTypeTask -> INFERRED_STATIC_VARIABLE
-  InferStaticVariableTypesInUnitTask -> CREATED_RESOLVED_UNIT7
-  InferStaticVariableTypesInUnitTask -> RESOLVED_UNIT7
+  InferStaticVariableTypesInUnitTask -> CREATED_RESOLVED_UNIT8
+  InferStaticVariableTypesInUnitTask -> RESOLVED_UNIT8
   LIBRARY_CYCLE [shape=box]
   LIBRARY_CYCLE_DEPENDENCIES -> InferInstanceMembersInUnitTask
   LIBRARY_CYCLE_DEPENDENCIES -> InferStaticVariableTypeTask
@@ -133,6 +134,7 @@
   LIBRARY_ELEMENT2 -> BuildSourceExportClosureTask
   LIBRARY_ELEMENT2 -> ComputeLibraryCycleTask
   LIBRARY_ELEMENT2 -> ReadyLibraryElement2Task
+  LIBRARY_ELEMENT2 -> ResolveDirectiveElementsTask
   LIBRARY_ELEMENT2 [shape=box]
   LIBRARY_ELEMENT3 -> BuildExportNamespaceTask
   LIBRARY_ELEMENT3 -> BuildTypeProviderTask
@@ -193,15 +195,15 @@
   ParseDartTask -> PARSE_ERRORS
   ParseDartTask -> SOURCE_KIND
   ParseDartTask -> UNITS
-  PartiallyResolveUnitReferencesTask -> CREATED_RESOLVED_UNIT5
+  PartiallyResolveUnitReferencesTask -> CREATED_RESOLVED_UNIT6
   PartiallyResolveUnitReferencesTask -> INFERABLE_STATIC_VARIABLES_IN_UNIT
   PartiallyResolveUnitReferencesTask -> PROPAGABLE_VARIABLES_IN_UNIT
-  PartiallyResolveUnitReferencesTask -> RESOLVED_UNIT5
+  PartiallyResolveUnitReferencesTask -> RESOLVED_UNIT6
   PropagateVariableTypeTask -> PROPAGATED_VARIABLE
   PropagateVariableTypesInLibraryClosureTask -> LIBRARY_ELEMENT7
   PropagateVariableTypesInLibraryTask -> LIBRARY_ELEMENT6
-  PropagateVariableTypesInUnitTask -> CREATED_RESOLVED_UNIT6
-  PropagateVariableTypesInUnitTask -> RESOLVED_UNIT6
+  PropagateVariableTypesInUnitTask -> CREATED_RESOLVED_UNIT7
+  PropagateVariableTypesInUnitTask -> RESOLVED_UNIT7
   READY_LIBRARY_ELEMENT2 -> ComputeLibraryCycleTask
   READY_LIBRARY_ELEMENT2 -> ReadyLibraryElement2Task
   READY_LIBRARY_ELEMENT2 [shape=box]
@@ -221,37 +223,39 @@
   RESOLVED_UNIT -> VerifyUnitTask
   RESOLVED_UNIT [shape=box]
   RESOLVED_UNIT1 -> BuildDirectiveElementsTask
-  RESOLVED_UNIT1 -> BuildEnumMemberElementsTask
   RESOLVED_UNIT1 -> BuildLibraryElementTask
+  RESOLVED_UNIT1 -> ResolveDirectiveElementsTask
   RESOLVED_UNIT1 [shape=box]
-  RESOLVED_UNIT10 -> EvaluateUnitConstantsTask
-  RESOLVED_UNIT10 -> GatherUsedImportedElementsTask
-  RESOLVED_UNIT10 -> GatherUsedLocalElementsTask
-  RESOLVED_UNIT10 -> ResolveLibraryReferencesTask
+  RESOLVED_UNIT10 -> ResolveUnitTask
   RESOLVED_UNIT10 [shape=box]
-  RESOLVED_UNIT11 -> StrongModeVerifyUnitTask
+  RESOLVED_UNIT11 -> EvaluateUnitConstantsTask
+  RESOLVED_UNIT11 -> GatherUsedImportedElementsTask
+  RESOLVED_UNIT11 -> GatherUsedLocalElementsTask
+  RESOLVED_UNIT11 -> ResolveLibraryReferencesTask
   RESOLVED_UNIT11 [shape=box]
-  RESOLVED_UNIT2 -> ResolveUnitTypeNamesTask
+  RESOLVED_UNIT12 -> StrongModeVerifyUnitTask
+  RESOLVED_UNIT12 [shape=box]
+  RESOLVED_UNIT2 -> BuildEnumMemberElementsTask
   RESOLVED_UNIT2 [shape=box]
-  RESOLVED_UNIT3 -> ResolveLibraryTypeNamesTask
-  RESOLVED_UNIT3 -> ResolveVariableReferencesTask
+  RESOLVED_UNIT3 -> ResolveUnitTypeNamesTask
   RESOLVED_UNIT3 [shape=box]
-  RESOLVED_UNIT4 -> PartiallyResolveUnitReferencesTask
+  RESOLVED_UNIT4 -> ResolveLibraryTypeNamesTask
+  RESOLVED_UNIT4 -> ResolveVariableReferencesTask
   RESOLVED_UNIT4 [shape=box]
-  RESOLVED_UNIT5 -> ComputeInferableStaticVariableDependenciesTask
-  RESOLVED_UNIT5 -> ComputePropagableVariableDependenciesTask
-  RESOLVED_UNIT5 -> PropagateVariableTypeTask
-  RESOLVED_UNIT5 -> PropagateVariableTypesInUnitTask
+  RESOLVED_UNIT5 -> PartiallyResolveUnitReferencesTask
   RESOLVED_UNIT5 [shape=box]
-  RESOLVED_UNIT6 -> InferStaticVariableTypeTask
-  RESOLVED_UNIT6 -> InferStaticVariableTypesInUnitTask
-  RESOLVED_UNIT6 -> PropagateVariableTypesInLibraryTask
+  RESOLVED_UNIT6 -> ComputeInferableStaticVariableDependenciesTask
+  RESOLVED_UNIT6 -> ComputePropagableVariableDependenciesTask
+  RESOLVED_UNIT6 -> PropagateVariableTypeTask
+  RESOLVED_UNIT6 -> PropagateVariableTypesInUnitTask
   RESOLVED_UNIT6 [shape=box]
-  RESOLVED_UNIT7 -> ResolveInstanceFieldsInUnitTask
+  RESOLVED_UNIT7 -> InferStaticVariableTypeTask
+  RESOLVED_UNIT7 -> InferStaticVariableTypesInUnitTask
+  RESOLVED_UNIT7 -> PropagateVariableTypesInLibraryTask
   RESOLVED_UNIT7 [shape=box]
-  RESOLVED_UNIT8 -> InferInstanceMembersInUnitTask
+  RESOLVED_UNIT8 -> ResolveInstanceFieldsInUnitTask
   RESOLVED_UNIT8 [shape=box]
-  RESOLVED_UNIT9 -> ResolveUnitTask
+  RESOLVED_UNIT9 -> InferInstanceMembersInUnitTask
   RESOLVED_UNIT9 [shape=box]
   RESOLVE_TYPE_NAMES_ERRORS -> LibraryUnitErrorsTask
   RESOLVE_TYPE_NAMES_ERRORS [shape=box]
@@ -262,21 +266,23 @@
   ReadyLibraryElement6Task -> READY_LIBRARY_ELEMENT6
   ReadyResolvedUnitTask -> READY_RESOLVED_UNIT
   ResolveConstantExpressionTask -> CONSTANT_EXPRESSION_RESOLVED
-  ResolveInstanceFieldsInUnitTask -> CREATED_RESOLVED_UNIT8
-  ResolveInstanceFieldsInUnitTask -> RESOLVED_UNIT8
+  ResolveDirectiveElementsTask -> CREATED_RESOLVED_UNIT2
+  ResolveDirectiveElementsTask -> RESOLVED_UNIT2
+  ResolveInstanceFieldsInUnitTask -> CREATED_RESOLVED_UNIT9
+  ResolveInstanceFieldsInUnitTask -> RESOLVED_UNIT9
   ResolveLibraryReferencesTask -> LIBRARY_ELEMENT8
   ResolveLibraryReferencesTask -> REFERENCED_NAMES
   ResolveLibraryTask -> LIBRARY_ELEMENT
   ResolveLibraryTypeNamesTask -> LIBRARY_ELEMENT5
   ResolveUnitTask -> CONSTANT_EXPRESSIONS_DEPENDENCIES
-  ResolveUnitTask -> CREATED_RESOLVED_UNIT10
-  ResolveUnitTask -> RESOLVED_UNIT10
+  ResolveUnitTask -> CREATED_RESOLVED_UNIT11
+  ResolveUnitTask -> RESOLVED_UNIT11
   ResolveUnitTask -> RESOLVE_UNIT_ERRORS
-  ResolveUnitTypeNamesTask -> CREATED_RESOLVED_UNIT3
-  ResolveUnitTypeNamesTask -> RESOLVED_UNIT3
+  ResolveUnitTypeNamesTask -> CREATED_RESOLVED_UNIT4
+  ResolveUnitTypeNamesTask -> RESOLVED_UNIT4
   ResolveUnitTypeNamesTask -> RESOLVE_TYPE_NAMES_ERRORS
-  ResolveVariableReferencesTask -> CREATED_RESOLVED_UNIT4
-  ResolveVariableReferencesTask -> RESOLVED_UNIT4
+  ResolveVariableReferencesTask -> CREATED_RESOLVED_UNIT5
+  ResolveVariableReferencesTask -> RESOLVED_UNIT5
   ResolveVariableReferencesTask -> VARIABLE_REFERENCE_ERRORS
   SCAN_ERRORS -> dartErrorsForSource
   SCAN_ERRORS [shape=box]
diff --git a/pkg/analyzer_cli/.analysis_options b/pkg/analyzer_cli/.analysis_options
new file mode 100644
index 0000000..78831a9
--- /dev/null
+++ b/pkg/analyzer_cli/.analysis_options
@@ -0,0 +1,3 @@
+analyzer:
+  exclude:
+    - 'test/data'
diff --git a/pkg/analyzer_cli/lib/src/analyzer_impl.dart b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
index 56eaa2f..7314a20 100644
--- a/pkg/analyzer_cli/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
@@ -40,6 +40,9 @@
 
   final AnalysisContext context;
 
+  /// Accumulated analysis statistics.
+  final AnalysisStats stats;
+
   final Source librarySource;
 
   /// All [Source]s references by the analyzed library.
@@ -59,7 +62,8 @@
   /// specified the "--package-warnings" option.
   String _selfPackageName;
 
-  AnalyzerImpl(this.context, this.librarySource, this.options, this.startTime);
+  AnalyzerImpl(this.context, this.librarySource, this.options, this.stats,
+      this.startTime);
 
   /// Returns the maximal [ErrorSeverity] of the recorded errors.
   ErrorSeverity get maxErrorSeverity {
@@ -76,8 +80,8 @@
     return status;
   }
 
-  void addCompilationUnitSource(CompilationUnitElement unit,
-      Set<LibraryElement> libraries, Set<CompilationUnitElement> units) {
+  void addCompilationUnitSource(
+      CompilationUnitElement unit, Set<CompilationUnitElement> units) {
     if (unit == null || units.contains(unit)) {
       return;
     }
@@ -91,21 +95,13 @@
       return;
     }
     // Maybe skip library.
-    {
-      UriKind uriKind = library.source.uriKind;
-      // Optionally skip package: libraries.
-      if (!options.showPackageWarnings && _isOtherPackage(library.source.uri)) {
-        return;
-      }
-      // Optionally skip SDK libraries.
-      if (!options.showSdkWarnings && uriKind == UriKind.DART_URI) {
-        return;
-      }
+    if (!_isAnalyzedLibrary(library)) {
+      return;
     }
     // Add compilation units.
-    addCompilationUnitSource(library.definingCompilationUnit, libraries, units);
+    addCompilationUnitSource(library.definingCompilationUnit, units);
     for (CompilationUnitElement child in library.parts) {
-      addCompilationUnitSource(child, libraries, units);
+      addCompilationUnitSource(child, units);
     }
     // Add referenced libraries.
     for (LibraryElement child in library.importedLibraries) {
@@ -181,18 +177,34 @@
     return status;
   }
 
-  /// Determine whether the given URI refers to a package other than the package
-  /// being analyzed.
-  bool _isOtherPackage(Uri uri) {
-    if (uri.scheme != 'package') {
+  /// Returns true if we want to report diagnostics for this library.
+  bool _isAnalyzedLibrary(LibraryElement library) {
+    switch (library.source.uriKind) {
+      case UriKind.DART_URI:
+        return options.showSdkWarnings;
+      case UriKind.PACKAGE_URI:
+        return _isAnalyzedPackage(library.source.uri);
+      default:
+        return true;
+    }
+  }
+
+  /// Determine whether the given URI refers to a package being analyzed.
+  bool _isAnalyzedPackage(Uri uri) {
+    if (uri.scheme != 'package' || uri.pathSegments.isEmpty) {
       return false;
     }
-    if (_selfPackageName != null &&
-        uri.pathSegments.length > 0 &&
-        uri.pathSegments[0] == _selfPackageName) {
+
+    String packageName = uri.pathSegments.first;
+    if (packageName == _selfPackageName) {
+      return true;
+    } else if (!options.showPackageWarnings) {
       return false;
+    } else if (options.showPackageWarningsPrefix == null) {
+      return true;
+    } else {
+      return packageName.startsWith(options.showPackageWarningsPrefix);
     }
-    return true;
   }
 
   _printColdPerf() {
@@ -220,7 +232,8 @@
     StringSink sink = options.machineFormat ? errorSink : outSink;
 
     // Print errors.
-    ErrorFormatter formatter = new ErrorFormatter(sink, options, _processError);
+    ErrorFormatter formatter =
+        new ErrorFormatter(sink, options, stats, _processError);
     formatter.formatErrors(errorInfos);
   }
 
@@ -237,26 +250,32 @@
   ///   * if [options.enableTypeChecks] is false, then de-escalate checked-mode
   ///   compile time errors to a severity of [ErrorSeverity.INFO].
   ///   * if [options.hintsAreFatal] is true, escalate hints to errors.
+  ///   * if [options.lintsAreFatal] is true, escalate lints to errors.
   static ErrorSeverity computeSeverity(
       AnalysisError error, CommandLineOptions options,
       [AnalysisContext context]) {
+    bool isStrongMode = false;
     if (context != null) {
       ErrorProcessor processor = ErrorProcessor.getProcessor(context, error);
       // If there is a processor for this error, defer to it.
       if (processor != null) {
         return processor.severity;
       }
+      isStrongMode = context.analysisOptions.strongMode;
     }
 
     if (!options.enableTypeChecks &&
         error.errorCode.type == ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR) {
       return ErrorSeverity.INFO;
-    }
-
-    if (options.hintsAreFatal && error.errorCode is HintCode) {
+    } else if (options.hintsAreFatal && error.errorCode is HintCode) {
+      return ErrorSeverity.ERROR;
+    } else if (options.lintsAreFatal && error.errorCode is LintCode) {
+      return ErrorSeverity.ERROR;
+    } else if (isStrongMode &&
+        error is StaticWarningCode &&
+        (error as StaticWarningCode).isStrongModeError) {
       return ErrorSeverity.ERROR;
     }
-
     return error.errorCode.errorSeverity;
   }
 
@@ -284,6 +303,13 @@
     ErrorSeverity severity = computeSeverity(error, options, context);
     bool isOverridden = false;
 
+    // Skip TODOs categorically (unless escalated to ERROR or HINT.)
+    // https://github.com/dart-lang/sdk/issues/26215
+    if (error.errorCode.type == ErrorType.TODO &&
+        severity == ErrorSeverity.INFO) {
+      return null;
+    }
+
     // First check for a filter.
     if (severity == null) {
       // Null severity means the error has been explicitly ignored.
@@ -298,11 +324,6 @@
       if (severity == ErrorSeverity.INFO && options.disableHints) {
         return null;
       }
-
-      // Skip TODOs.
-      if (severity == ErrorType.TODO) {
-        return null;
-      }
     }
 
     return new ProcessedSeverity(severity, isOverridden);
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
new file mode 100644
index 0000000..511c6c0
--- /dev/null
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -0,0 +1,414 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer_cli.src.build_mode;
+
+import 'dart:core' hide Resource;
+import 'dart:io' as io;
+
+import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit;
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/java_io.dart';
+import 'package:analyzer/src/generated/sdk_io.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/link.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:analyzer/src/summary/summarize_ast.dart';
+import 'package:analyzer/src/summary/summarize_elements.dart';
+import 'package:analyzer/task/dart.dart';
+import 'package:analyzer_cli/src/analyzer_impl.dart';
+import 'package:analyzer_cli/src/driver.dart';
+import 'package:analyzer_cli/src/error_formatter.dart';
+import 'package:analyzer_cli/src/options.dart';
+import 'package:protobuf/protobuf.dart';
+
+import 'message_grouper.dart';
+import 'worker_protocol.pb.dart';
+
+/**
+ * Analyzer used when the "--build-mode" option is supplied.
+ */
+class BuildMode {
+  final CommandLineOptions options;
+  final AnalysisStats stats;
+
+  final ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
+  SummaryDataStore summaryDataStore;
+  InternalAnalysisContext context;
+  Map<Uri, JavaFile> uriToFileMap;
+  final List<Source> explicitSources = <Source>[];
+
+  PackageBundleAssembler assembler = new PackageBundleAssembler();
+  final Set<Source> processedSources = new Set<Source>();
+  final Map<Uri, UnlinkedUnit> uriToUnit = <Uri, UnlinkedUnit>{};
+
+  BuildMode(this.options, this.stats);
+
+  /**
+   * Perform package analysis according to the given [options].
+   */
+  ErrorSeverity analyze() {
+    // Write initial progress message.
+    if (!options.machineFormat) {
+      outSink.writeln("Analyzing sources ${options.sourceFiles}...");
+    }
+
+    // Create the URI to file map.
+    uriToFileMap = _createUriToFileMap(options.sourceFiles);
+    if (uriToFileMap == null) {
+      io.exitCode = ErrorSeverity.ERROR.ordinal;
+      return ErrorSeverity.ERROR;
+    }
+
+    // Prepare the analysis context.
+    _createContext();
+
+    // Add sources.
+    ChangeSet changeSet = new ChangeSet();
+    for (Uri uri in uriToFileMap.keys) {
+      JavaFile file = uriToFileMap[uri];
+      if (!file.exists()) {
+        errorSink.writeln('File not found: ${file.getPath()}');
+        io.exitCode = ErrorSeverity.ERROR.ordinal;
+        return ErrorSeverity.ERROR;
+      }
+      Source source = new FileBasedSource(file, uri);
+      explicitSources.add(source);
+      changeSet.addedSource(source);
+    }
+    context.applyChanges(changeSet);
+
+    if (!options.buildSummaryOnly) {
+      // Perform full analysis.
+      while (true) {
+        AnalysisResult analysisResult = context.performAnalysisTask();
+        if (!analysisResult.hasMoreWork) {
+          break;
+        }
+      }
+    }
+
+    // Write summary.
+    if (options.buildSummaryOutput != null) {
+      if (options.buildSummaryOnlyAst && !options.buildSummaryFallback) {
+        _serializeAstBasedSummary(explicitSources);
+      } else {
+        for (Source source in explicitSources) {
+          if (context.computeKindOf(source) == SourceKind.LIBRARY) {
+            if (options.buildSummaryFallback) {
+              assembler.addFallbackLibrary(source);
+            } else {
+              LibraryElement libraryElement =
+                  context.computeLibraryElement(source);
+              assembler.serializeLibraryElement(libraryElement);
+            }
+          }
+          if (options.buildSummaryFallback) {
+            assembler.addFallbackUnit(source);
+          }
+        }
+      }
+      // Write the whole package bundle.
+      PackageBundleBuilder sdkBundle = assembler.assemble();
+      if (options.buildSummaryExcludeInformative) {
+        sdkBundle.flushInformative();
+        sdkBundle.unlinkedUnitHashes = null;
+      }
+      io.File file = new io.File(options.buildSummaryOutput);
+      file.writeAsBytesSync(sdkBundle.toBuffer(), mode: io.FileMode.WRITE_ONLY);
+    }
+
+    if (options.buildSummaryOnly) {
+      return ErrorSeverity.NONE;
+    } else {
+      // Process errors.
+      _printErrors(outputPath: options.buildAnalysisOutput);
+      return _computeMaxSeverity();
+    }
+  }
+
+  ErrorSeverity _computeMaxSeverity() {
+    ErrorSeverity maxSeverity = ErrorSeverity.NONE;
+    if (!options.buildSuppressExitCode) {
+      for (Source source in explicitSources) {
+        AnalysisErrorInfo errorInfo = context.getErrors(source);
+        for (AnalysisError error in errorInfo.errors) {
+          ProcessedSeverity processedSeverity =
+              AnalyzerImpl.processError(error, options, context);
+          if (processedSeverity != null) {
+            maxSeverity = maxSeverity.max(processedSeverity.severity);
+          }
+        }
+      }
+    }
+    return maxSeverity;
+  }
+
+  void _createContext() {
+    DirectoryBasedDartSdk sdk =
+        new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
+    sdk.analysisOptions =
+        Driver.createAnalysisOptionsForCommandLineOptions(options);
+    sdk.useSummary = true;
+
+    // Read the summaries.
+    summaryDataStore = new SummaryDataStore(options.buildSummaryInputs);
+
+    // In AST mode include SDK bundle to avoid parsing SDK sources.
+    if (options.buildSummaryOnlyAst) {
+      summaryDataStore.addBundle(null, sdk.getSummarySdkBundle());
+    }
+
+    // Create the context.
+    context = AnalysisEngine.instance.createAnalysisContext();
+    context.sourceFactory = new SourceFactory(<UriResolver>[
+      new DartUriResolver(sdk),
+      new InSummaryPackageUriResolver(summaryDataStore),
+      new ExplicitSourceResolver(uriToFileMap)
+    ]);
+
+    // Set context options.
+    Driver.setAnalysisContextOptions(context, options,
+        (AnalysisOptionsImpl contextOptions) {
+      if (options.buildSummaryOnlyDiet) {
+        contextOptions.analyzeFunctionBodies = false;
+      }
+    });
+
+    // Configure using summaries.
+    context.typeProvider = sdk.context.typeProvider;
+    context.resultProvider =
+        new InputPackagesResultProvider(context, summaryDataStore);
+  }
+
+  /**
+   * Print errors for all explicit sources.  If [outputPath] is supplied, output
+   * is sent to a new file at that path.
+   */
+  void _printErrors({String outputPath}) {
+    StringBuffer buffer = new StringBuffer();
+    ErrorFormatter formatter = new ErrorFormatter(
+        buffer,
+        options,
+        stats,
+        (AnalysisError error) =>
+            AnalyzerImpl.processError(error, options, context));
+    for (Source source in explicitSources) {
+      AnalysisErrorInfo errorInfo = context.getErrors(source);
+      formatter.formatErrors([errorInfo]);
+    }
+    if (!options.machineFormat) {
+      stats.print(buffer);
+    }
+    if (outputPath == null) {
+      StringSink sink = options.machineFormat ? errorSink : outSink;
+      sink.write(buffer);
+    } else {
+      new io.File(outputPath).writeAsStringSync(buffer.toString());
+    }
+  }
+
+  /**
+   * Serialize the package with the given [sources] into [assembler] using only
+   * their ASTs and [LinkedUnit]s of input packages.
+   */
+  void _serializeAstBasedSummary(List<Source> sources) {
+    Set<String> sourceUris =
+        sources.map((Source s) => s.uri.toString()).toSet();
+
+    LinkedLibrary _getDependency(String absoluteUri) =>
+        summaryDataStore.linkedMap[absoluteUri];
+
+    UnlinkedUnit _getUnit(String absoluteUri) {
+      // Maybe an input package contains the source.
+      {
+        UnlinkedUnit unlinkedUnit = summaryDataStore.unlinkedMap[absoluteUri];
+        if (unlinkedUnit != null) {
+          return unlinkedUnit;
+        }
+      }
+      // Parse the source and serialize its AST.
+      Uri uri = Uri.parse(absoluteUri);
+      Source source = context.sourceFactory.forUri2(uri);
+      return uriToUnit.putIfAbsent(uri, () {
+        CompilationUnit unit = context.computeResult(source, PARSED_UNIT);
+        UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
+        assembler.addUnlinkedUnit(source, unlinkedUnit);
+        return unlinkedUnit;
+      });
+    }
+
+    Map<String, LinkedLibraryBuilder> linkResult =
+        link(sourceUris, _getDependency, _getUnit, options.strongMode);
+    linkResult.forEach(assembler.addLinkedLibrary);
+  }
+
+  /**
+   * Convert [sourceEntities] (a list of file specifications of the form
+   * "$uri|$path") to a map from URI to path.  If an error occurs, report the
+   * error and return null.
+   */
+  static Map<Uri, JavaFile> _createUriToFileMap(List<String> sourceEntities) {
+    Map<Uri, JavaFile> uriToFileMap = <Uri, JavaFile>{};
+    for (String sourceFile in sourceEntities) {
+      int pipeIndex = sourceFile.indexOf('|');
+      if (pipeIndex == -1) {
+        // TODO(paulberry): add the ability to guess the URI from the path.
+        errorSink.writeln(
+            'Illegal input file (must be "\$uri|\$path"): $sourceFile');
+        return null;
+      }
+      Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex));
+      String path = sourceFile.substring(pipeIndex + 1);
+      uriToFileMap[uri] = new JavaFile(path);
+    }
+    return uriToFileMap;
+  }
+}
+
+/**
+ * Default implementation of [WorkerConnection] that works with stdio.
+ */
+class StdWorkerConnection implements WorkerConnection {
+  final MessageGrouper _messageGrouper;
+  final io.Stdout _stdoutStream;
+
+  StdWorkerConnection(io.Stdin stdinStream, this._stdoutStream)
+      : _messageGrouper = new MessageGrouper(stdinStream);
+
+  @override
+  WorkRequest readRequest() {
+    var buffer = _messageGrouper.next;
+    if (buffer == null) return null;
+
+    return new WorkRequest.fromBuffer(buffer);
+  }
+
+  @override
+  void writeResponse(WorkResponse response) {
+    var responseBuffer = response.writeToBuffer();
+
+    var writer = new CodedBufferWriter();
+    writer.writeInt32NoTag(responseBuffer.length);
+    writer.writeRawBytes(responseBuffer);
+
+    _stdoutStream.add(writer.toBuffer());
+  }
+}
+
+/**
+ * Connection between a worker and input / output.
+ */
+abstract class WorkerConnection {
+  /**
+   * Read a new [WorkRequest]. Returns [null] when there are no more requests.
+   */
+  WorkRequest readRequest();
+
+  /**
+   * Write the given [response] as bytes to the output.
+   */
+  void writeResponse(WorkResponse response);
+}
+
+/**
+ * Persistent Bazel worker.
+ */
+class WorkerLoop {
+  static const int EXIT_CODE_OK = 0;
+  static const int EXIT_CODE_ERROR = 15;
+
+  final WorkerConnection connection;
+
+  final StringBuffer errorBuffer = new StringBuffer();
+  final StringBuffer outBuffer = new StringBuffer();
+
+  final String dartSdkPath;
+
+  WorkerLoop(this.connection, {this.dartSdkPath});
+
+  factory WorkerLoop.std(
+      {io.Stdin stdinStream, io.Stdout stdoutStream, String dartSdkPath}) {
+    stdinStream ??= io.stdin;
+    stdoutStream ??= io.stdout;
+    WorkerConnection connection =
+        new StdWorkerConnection(stdinStream, stdoutStream);
+    return new WorkerLoop(connection, dartSdkPath: dartSdkPath);
+  }
+
+  /**
+   * Performs analysis with given [options].
+   */
+  void analyze(CommandLineOptions options) {
+    options.dartSdkPath ??= dartSdkPath;
+    new BuildMode(options, new AnalysisStats()).analyze();
+  }
+
+  /**
+   * Perform a single loop step.  Return `true` if should exit the loop.
+   */
+  bool performSingle() {
+    try {
+      WorkRequest request = connection.readRequest();
+      if (request == null) {
+        return true;
+      }
+      // Prepare options.
+      CommandLineOptions options =
+          CommandLineOptions.parse(request.arguments, (String msg) {
+        throw new ArgumentError(msg);
+      });
+      // Analyze and respond.
+      analyze(options);
+      String msg = _getErrorOutputBuffersText();
+      connection.writeResponse(new WorkResponse()
+        ..exitCode = EXIT_CODE_OK
+        ..output = msg);
+    } catch (e, st) {
+      String msg = _getErrorOutputBuffersText();
+      msg += '$e \n $st';
+      connection.writeResponse(new WorkResponse()
+        ..exitCode = EXIT_CODE_ERROR
+        ..output = msg);
+    }
+    return false;
+  }
+
+  /**
+   * Run the worker loop.
+   */
+  void run() {
+    errorSink = errorBuffer;
+    outSink = outBuffer;
+    exitHandler = (int exitCode) {
+      return throw new StateError('Exit called: $exitCode');
+    };
+    while (true) {
+      errorBuffer.clear();
+      outBuffer.clear();
+      bool shouldExit = performSingle();
+      if (shouldExit) {
+        break;
+      }
+    }
+  }
+
+  String _getErrorOutputBuffersText() {
+    String msg = '';
+    if (errorBuffer.isNotEmpty) {
+      msg += errorBuffer.toString() + '\n';
+    }
+    if (outBuffer.isNotEmpty) {
+      msg += outBuffer.toString() + '\n';
+    }
+    return msg;
+  }
+}
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index 85c53ee..a05f81e 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -33,8 +33,9 @@
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/task/options.dart';
 import 'package:analyzer_cli/src/analyzer_impl.dart';
+import 'package:analyzer_cli/src/build_mode.dart';
+import 'package:analyzer_cli/src/error_formatter.dart';
 import 'package:analyzer_cli/src/options.dart';
-import 'package:analyzer_cli/src/package_analyzer.dart';
 import 'package:analyzer_cli/src/perf_report.dart';
 import 'package:analyzer_cli/starter.dart';
 import 'package:linter/src/plugin/linter_plugin.dart';
@@ -79,6 +80,9 @@
   /// `null` if [_analyzeAll] hasn't been called yet.
   AnalysisContext _context;
 
+  /// The total number of source files loaded by an AnalysisContext.
+  int _analyzedFileCount = 0;
+
   /// If [_context] is not `null`, the [CommandLineOptions] that guided its
   /// creation.
   CommandLineOptions _previousOptions;
@@ -89,6 +93,9 @@
   @override
   ResolverProvider packageResolverProvider;
 
+  /// Collected analysis statistics.
+  final AnalysisStats stats = new AnalysisStats();
+
   /// This Driver's current analysis context.
   ///
   /// *Visible for testing.*
@@ -96,11 +103,14 @@
 
   @override
   void set userDefinedPlugins(List<Plugin> plugins) {
-    _userDefinedPlugins = plugins == null ? <Plugin>[] : plugins;
+    _userDefinedPlugins = plugins ?? <Plugin>[];
   }
 
   @override
   void start(List<String> args) {
+    if (_context != null) {
+      throw new StateError("start() can only be called once");
+    }
     int startTime = new DateTime.now().millisecondsSinceEpoch;
 
     StringUtilities.INTERNER = new MappedInterner();
@@ -114,8 +124,8 @@
     _setupEnv(options);
 
     // Do analysis.
-    if (options.packageMode) {
-      ErrorSeverity severity = _analyzePackage(options);
+    if (options.buildMode) {
+      ErrorSeverity severity = _buildModeAnalyze(options);
       // In case of error propagate exit code.
       if (severity == ErrorSeverity.ERROR) {
         exitCode = severity.ordinal;
@@ -133,8 +143,13 @@
       }
     }
 
+    if (_context != null) {
+      _analyzedFileCount += _context.sources.length;
+    }
+
     if (options.perfReport != null) {
-      String json = makePerfReport(startTime, currentTimeMillis(), options);
+      String json = makePerfReport(
+          startTime, currentTimeMillis(), options, _analyzedFileCount, stats);
       new File(options.perfReport).writeAsStringSync(json);
     }
   }
@@ -162,32 +177,32 @@
     // Add all the files to be analyzed en masse to the context.  Skip any
     // files that were added earlier (whether explicitly or implicitly) to
     // avoid causing those files to be unnecessarily re-read.
-    Set<Source> knownSources = _context.sources.toSet();
+    Set<Source> knownSources = context.sources.toSet();
     List<Source> sourcesToAnalyze = <Source>[];
     ChangeSet changeSet = new ChangeSet();
     for (String sourcePath in options.sourceFiles) {
       sourcePath = sourcePath.trim();
-      // Check that file exists.
-      if (!new File(sourcePath).existsSync()) {
-        errorSink.writeln('File not found: $sourcePath');
+
+      // Collect files for analysis.
+      // Note that these files will all be analyzed in the same context.
+      // This should be updated when the ContextManager re-work is complete
+      // (See: https://github.com/dart-lang/sdk/issues/24133)
+      Iterable<File> files = _collectFiles(sourcePath);
+      if (files.isEmpty) {
+        errorSink.writeln('No dart files found at: $sourcePath');
         exitCode = ErrorSeverity.ERROR.ordinal;
-        //Fail fast; don't analyze more files
         return ErrorSeverity.ERROR;
       }
-      // Check that file is Dart file.
-      if (!AnalysisEngine.isDartFileName(sourcePath)) {
-        errorSink.writeln('$sourcePath is not a Dart file');
-        exitCode = ErrorSeverity.ERROR.ordinal;
-        // Fail fast; don't analyze more files.
-        return ErrorSeverity.ERROR;
+
+      for (File file in files) {
+        Source source = _computeLibrarySource(file.absolute.path);
+        if (!knownSources.contains(source)) {
+          changeSet.addedSource(source);
+        }
+        sourcesToAnalyze.add(source);
       }
-      Source source = _computeLibrarySource(sourcePath);
-      if (!knownSources.contains(source)) {
-        changeSet.addedSource(source);
-      }
-      sourcesToAnalyze.add(source);
     }
-    _context.applyChanges(changeSet);
+    context.applyChanges(changeSet);
 
     // Analyze the libraries.
     ErrorSeverity allResult = ErrorSeverity.NONE;
@@ -219,13 +234,21 @@
       }
     }
 
+    if (!options.machineFormat) {
+      stats.print(outSink);
+    }
+
     return allResult;
   }
 
-  /// Perform package analysis according to the given [options].
-  ErrorSeverity _analyzePackage(CommandLineOptions options) {
+  /// Perform analysis in build mode according to the given [options].
+  ErrorSeverity _buildModeAnalyze(CommandLineOptions options) {
     return _analyzeAllTag.makeCurrentWhile(() {
-      return new PackageAnalyzer(options).analyze();
+      if (options.buildModePersistentWorker) {
+        new WorkerLoop.std(dartSdkPath: options.dartSdkPath).run();
+      } else {
+        return new BuildMode(options, stats).analyze();
+      }
     });
   }
 
@@ -259,6 +282,10 @@
     if (options.showPackageWarnings != _previousOptions.showPackageWarnings) {
       return false;
     }
+    if (options.showPackageWarningsPrefix !=
+        _previousOptions.showPackageWarningsPrefix) {
+      return false;
+    }
     if (options.showSdkWarnings != _previousOptions.showSdkWarnings) {
       return false;
     }
@@ -271,6 +298,10 @@
     if (options.enableSuperMixins != _previousOptions.enableSuperMixins) {
       return false;
     }
+    if (options.enableConditionalDirectives !=
+        _previousOptions.enableConditionalDirectives) {
+      return false;
+    }
     return true;
   }
 
@@ -288,38 +319,14 @@
       return (Source source) => true;
     }
 
-    // Determine the set of packages requiring a full parse.  Use null to
-    // represent the case where all packages require a full parse.
-    Set<String> packagesRequiringFullParse;
-    if (options.showPackageWarnings) {
-      // We are showing warnings from all packages so all packages require a
-      // full parse.
-      packagesRequiringFullParse = null;
-    } else {
-      // We aren't showing warnings for dependent packages, but we may still
-      // need to show warnings for "self" packages, so we need to do a full
-      // parse in any package containing files mentioned on the command line.
-      // TODO(paulberry): implement this.  As a temporary workaround, we're
-      // fully parsing all packages.
-      packagesRequiringFullParse = null;
-    }
     return (Source source) {
       if (options.sourceFiles.contains(source.fullName)) {
         return true;
       } else if (source.uri.scheme == 'dart') {
         return options.showSdkWarnings;
-      } else if (source.uri.scheme == 'package') {
-        if (packagesRequiringFullParse == null) {
-          return true;
-        } else if (source.uri.pathSegments.length == 0) {
-          // We should never see a URI like this, but fully parse it to be
-          // safe.
-          return true;
-        } else {
-          return packagesRequiringFullParse
-              .contains(source.uri.pathSegments[0]);
-        }
       } else {
+        // TODO(paulberry): diet parse 'package:' imports when we don't want
+        // diagnostics. (Full parse is still needed for "self" packages.)
         return true;
       }
     };
@@ -447,6 +454,29 @@
     return new SourceFactory(resolvers, packages);
   }
 
+  /// Collect all analyzable files at [filePath], recursively if it's a
+  /// directory, ignoring links.
+  Iterable<File> _collectFiles(String filePath) {
+    List<File> files = <File>[];
+    File file = new File(filePath);
+    if (file.existsSync()) {
+      files.add(file);
+    } else {
+      Directory directory = new Directory(filePath);
+      if (directory.existsSync()) {
+        for (FileSystemEntity entry
+            in directory.listSync(recursive: true, followLinks: false)) {
+          String relative = path.relative(entry.path, from: directory.path);
+          if (AnalysisEngine.isDartFileName(entry.path) &&
+              !_isInHiddenDir(relative)) {
+            files.add(entry);
+          }
+        }
+      }
+    }
+    return files;
+  }
+
   /// Convert the given [sourcePath] (which may be relative to the current
   /// working directory) to a [Source] object that can be fed to the analysis
   /// context.
@@ -473,18 +503,22 @@
     }
     _previousOptions = options;
 
+    // Save stats from previous context before clobbering it.
+    if (_context != null) {
+      _analyzedFileCount += _context.sources.length;
+    }
+
     // Create a context.
-    AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
-    _context = context;
+    _context = AnalysisEngine.instance.createAnalysisContext();
 
     // Choose a package resolution policy and a diet parsing policy based on
     // the command-line options.
     SourceFactory sourceFactory = _chooseUriResolutionPolicy(
-        options, (context as InternalAnalysisContext).embedderYamlLocator);
+        options, (_context as InternalAnalysisContext).embedderYamlLocator);
     AnalyzeFunctionBodiesPredicate dietParsingPolicy =
         _chooseDietParsingPolicy(options);
 
-    context.sourceFactory = sourceFactory;
+    _context.sourceFactory = sourceFactory;
 
     setAnalysisContextOptions(_context, options,
         (AnalysisOptionsImpl contextOptions) {
@@ -521,6 +555,10 @@
     return folderMap;
   }
 
+  /// Returns `true` if this relative path is a hidden directory.
+  bool _isInHiddenDir(String relative) =>
+      path.split(relative).any((part) => part.startsWith("."));
+
   void _processPlugins() {
     List<Plugin> plugins = <Plugin>[];
     plugins.addAll(AnalysisEngine.instance.requiredPlugins);
@@ -537,7 +575,7 @@
   ErrorSeverity _runAnalyzer(Source source, CommandLineOptions options) {
     int startTime = currentTimeMillis();
     AnalyzerImpl analyzer =
-        new AnalyzerImpl(_context, source, options, startTime);
+        new AnalyzerImpl(_context, source, options, stats, startTime);
     var errorSeverity = analyzer.analyzeSync();
     if (errorSeverity == ErrorSeverity.ERROR) {
       exitCode = errorSeverity.ordinal;
@@ -554,10 +592,26 @@
     // to activate batch mode.
     if (sdk == null) {
       sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
+      sdk.analysisOptions = createAnalysisOptionsForCommandLineOptions(options);
     }
     _isBatch = options.shouldBatch;
   }
 
+  static AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions(
+      CommandLineOptions options) {
+    AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl();
+    contextOptions.hint = !options.disableHints;
+    contextOptions.enableStrictCallChecks = options.enableStrictCallChecks;
+    contextOptions.enableSuperMixins = options.enableSuperMixins;
+    contextOptions.enableConditionalDirectives =
+        options.enableConditionalDirectives;
+    contextOptions.generateImplicitErrors = options.showPackageWarnings;
+    contextOptions.generateSdkErrors = options.showSdkWarnings;
+    contextOptions.lint = options.lints;
+    contextOptions.strongMode = options.strongMode;
+    return contextOptions;
+  }
+
   static void setAnalysisContextOptions(
       AnalysisContext context,
       CommandLineOptions options,
@@ -575,19 +629,12 @@
     }
 
     // Prepare context options.
-    AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl();
-    contextOptions.hint = !options.disableHints;
-    contextOptions.enableStrictCallChecks = options.enableStrictCallChecks;
-    contextOptions.enableSuperMixins = options.enableSuperMixins;
-    contextOptions.generateImplicitErrors = options.showPackageWarnings;
-    contextOptions.generateSdkErrors = options.showSdkWarnings;
-    contextOptions.lint = options.lints;
-    contextOptions.strongMode = options.strongMode;
+    AnalysisOptionsImpl contextOptions =
+        createAnalysisOptionsForCommandLineOptions(options);
     configureContextOptions(contextOptions);
 
     // Set context options.
     context.analysisOptions = contextOptions;
-    context.sourceFactory.dartSdk.context.analysisOptions = contextOptions;
 
     // Process analysis options file (and notify all interested parties).
     _processAnalysisOptions(context, options);
@@ -679,7 +726,7 @@
             '>>> BATCH END (${totalTests - testsFailed}/$totalTests) ${time}ms');
         exitCode = batchResult.ordinal;
       }
-      // Prepare aruments.
+      // Prepare arguments.
       var args;
       {
         var lineArgs = line.split(new RegExp('\\s+'));
diff --git a/pkg/analyzer_cli/lib/src/error_formatter.dart b/pkg/analyzer_cli/lib/src/error_formatter.dart
index 0154d73..c43fcd8 100644
--- a/pkg/analyzer_cli/lib/src/error_formatter.dart
+++ b/pkg/analyzer_cli/lib/src/error_formatter.dart
@@ -13,19 +13,105 @@
 ProcessedSeverity _identity(AnalysisError error) =>
     new ProcessedSeverity(error.errorCode.errorSeverity);
 
+String _pluralize(String word, int count) => count == 1 ? word : word + "s";
+
 /// Returns desired severity for the given [error] (or `null` if it's to be
 /// suppressed).
 typedef ProcessedSeverity _SeverityProcessor(AnalysisError error);
 
+/// Analysis statistics counter.
+class AnalysisStats {
+  /// The total number of diagnostics sent to [formatErrors].
+  int unfilteredCount;
+
+  int errorCount;
+  int hintCount;
+  int lintCount;
+  int warnCount;
+
+  AnalysisStats() {
+    init();
+  }
+
+  /// The total number of diagnostics reported to the user.
+  int get filteredCount => errorCount + warnCount + hintCount + lintCount;
+
+  /// (Re)set initial values.
+  void init() {
+    unfilteredCount = 0;
+    errorCount = 0;
+    hintCount = 0;
+    lintCount = 0;
+    warnCount = 0;
+  }
+
+  /// Print statistics to [out].
+  void print(StringSink out) {
+    var hasErrors = errorCount != 0;
+    var hasWarns = warnCount != 0;
+    var hasHints = hintCount != 0;
+    var hasLints = lintCount != 0;
+    bool hasContent = false;
+    if (hasErrors) {
+      out.write(errorCount);
+      out.write(' ');
+      out.write(_pluralize("error", errorCount));
+      hasContent = true;
+    }
+    if (hasWarns) {
+      if (hasContent) {
+        if (!hasHints && !hasLints) {
+          out.write(' and ');
+        } else {
+          out.write(", ");
+        }
+      }
+      out.write(warnCount);
+      out.write(' ');
+      out.write(_pluralize("warning", warnCount));
+      hasContent = true;
+    }
+    if (hasHints) {
+      if (hasContent) {
+        if (!hasLints) {
+          out.write(' and ');
+        } else {
+          out.write(", ");
+        }
+      }
+      out.write(hintCount);
+      out.write(' ');
+      out.write(_pluralize("hint", hintCount));
+      hasContent = true;
+    }
+    if (hasLints) {
+      if (hasContent) {
+        out.write(" and ");
+      }
+      out.write(lintCount);
+      out.write(' ');
+      out.write(_pluralize("lint", lintCount));
+      hasContent = true;
+    }
+    if (hasContent) {
+      out.writeln(" found.");
+    } else {
+      out.writeln("No issues found");
+    }
+  }
+}
+
 /// Helper for formatting [AnalysisError]s.
 /// The two format options are a user consumable format and a machine consumable
 /// format.
 class ErrorFormatter {
   final StringSink out;
   final CommandLineOptions options;
+  final AnalysisStats stats;
   final _SeverityProcessor processSeverity;
 
-  ErrorFormatter(this.out, this.options, [this.processSeverity = _identity]);
+  ErrorFormatter(this.out, this.options, this.stats,
+      [this.processSeverity = _identity]);
 
   /// Compute the severity for this [error] or `null` if this error should be
   /// filtered.
@@ -83,6 +169,8 @@
   }
 
   void formatErrors(List<AnalysisErrorInfo> errorInfos) {
+    stats.unfilteredCount += errorInfos.length;
+
     var errors = new List<AnalysisError>();
     var errorToLine = new Map<AnalysisError, LineInfo>();
     for (AnalysisErrorInfo errorInfo in errorInfos) {
@@ -112,84 +200,26 @@
       return error1.offset - error2.offset;
     });
     // Format errors.
-    int errorCount = 0;
-    int warnCount = 0;
-    int hintCount = 0;
-    int lintCount = 0;
     for (AnalysisError error in errors) {
       ProcessedSeverity processedSeverity = processSeverity(error);
       ErrorSeverity severity = processedSeverity.severity;
       if (severity == ErrorSeverity.ERROR) {
-        errorCount++;
+        stats.errorCount++;
       } else if (severity == ErrorSeverity.WARNING) {
         /// Only treat a warning as an error if it's not been set by a
         /// proccesser.
         if (!processedSeverity.overridden && options.warningsAreFatal) {
-          errorCount++;
+          stats.errorCount++;
         } else {
-          warnCount++;
+          stats.warnCount++;
         }
       } else if (error.errorCode.type == ErrorType.HINT) {
-        hintCount++;
+        stats.hintCount++;
       } else if (error.errorCode.type == ErrorType.LINT) {
-        lintCount++;
+        stats.lintCount++;
       }
       formatError(errorToLine, error);
     }
-    // Print statistics.
-    if (!options.machineFormat) {
-      var hasErrors = errorCount != 0;
-      var hasWarns = warnCount != 0;
-      var hasHints = hintCount != 0;
-      var hasLints = lintCount != 0;
-      bool hasContent = false;
-      if (hasErrors) {
-        out.write(errorCount);
-        out.write(' ');
-        out.write(pluralize("error", errorCount));
-        hasContent = true;
-      }
-      if (hasWarns) {
-        if (hasContent) {
-          if (!hasHints && !hasLints) {
-            out.write(' and ');
-          } else {
-            out.write(", ");
-          }
-        }
-        out.write(warnCount);
-        out.write(' ');
-        out.write(pluralize("warning", warnCount));
-        hasContent = true;
-      }
-      if (hasHints) {
-        if (hasContent) {
-          if (!hasLints) {
-            out.write(' and ');
-          } else {
-            out.write(", ");
-          }
-        }
-        out.write(hintCount);
-        out.write(' ');
-        out.write(pluralize("hint", hintCount));
-        hasContent = true;
-      }
-      if (hasLints) {
-        if (hasContent) {
-          out.write(" and ");
-        }
-        out.write(lintCount);
-        out.write(' ');
-        out.write(pluralize("lint", lintCount));
-        hasContent = true;
-      }
-      if (hasContent) {
-        out.writeln(" found.");
-      } else {
-        out.writeln("No issues found");
-      }
-    }
   }
 
   static String escapePipe(String input) {
@@ -202,17 +232,9 @@
     }
     return result.toString();
   }
-
-  static String pluralize(String word, int count) {
-    if (count == 1) {
-      return word;
-    } else {
-      return word + "s";
-    }
-  }
 }
 
-/// A severity with awareness of whether it was overriden by a processor.
+/// A severity with awareness of whether it was overridden by a processor.
 class ProcessedSeverity {
   ErrorSeverity severity;
   bool overridden;
diff --git a/pkg/analyzer_cli/lib/src/message_grouper.dart b/pkg/analyzer_cli/lib/src/message_grouper.dart
new file mode 100644
index 0000000..8696796
--- /dev/null
+++ b/pkg/analyzer_cli/lib/src/message_grouper.dart
@@ -0,0 +1,112 @@
+// 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';
+import 'dart:typed_data';
+
+/// Groups stdin input into messages by interpreting it as
+/// base-128 encoded lengths interleaved with raw data.
+///
+/// The base-128 encoding is in little-endian order, with the high bit set on
+/// all bytes but the last.  This was chosen since it's the same as the
+/// base-128 encoding used by protobufs, so it allows a modest amount of code
+/// reuse at the other end of the protocol.
+///
+/// Possible future improvements to consider (should a debugging need arise):
+/// - Put a magic number at the beginning of the stream.
+/// - Use a guard byte between messages to sanity check that the encoder and
+///   decoder agree on the encoding of lengths.
+class MessageGrouper {
+  final _state = new _MessageGrouperState();
+  final Stdin _stdin;
+
+  MessageGrouper(this._stdin);
+
+  /// Blocks until the next full message is received, and then returns it.
+  ///
+  /// Returns null at end of file.
+  List<int> get next {
+    var message;
+    while (message == null) {
+    var nextByte = _stdin.readByteSync();
+    if (nextByte == -1) return null;
+      message = _state.handleInput(nextByte);
+    }
+    return message;
+  }
+}
+
+/// State held by the [MessageGrouper] while waiting for additional data to
+/// arrive.
+class _MessageGrouperState {
+  /// `true` means we are waiting to receive bytes of base-128 encoded length.
+  /// Some bytes of length may have been received already.
+  ///
+  /// `false` means we are waiting to receive more bytes of message data.  Some
+  /// bytes of message data may have been received already.
+  bool waitingForLength = true;
+
+  /// If [waitingForLength] is `true`, the decoded value of the length bytes
+  /// received so far (if any).  If [waitingForLength] is `false`, the decoded
+  /// length that was most recently received.
+  int length = 0;
+
+  /// If [waitingForLength] is `true`, the amount by which the next received
+  /// length byte must be left-shifted; otherwise undefined.
+  int lengthShift = 0;
+
+  /// If [waitingForLength] is `false`, a [Uint8List] which is ready to receive
+  /// message data.  Otherwise null.
+  Uint8List message;
+
+  /// If [waitingForLength] is `false`, the number of message bytes that have
+  /// been received so far.  Otherwise zero.
+  int numMessageBytesReceived;
+
+  _MessageGrouperState() {
+    reset();
+  }
+
+  /// Handle one byte at a time.
+  ///
+  /// Returns a [List<int>] of message bytes if [byte] was the last byte in a
+  /// message, otherwise returns [null].
+  List<int> handleInput(int byte) {
+    if (waitingForLength) {
+      length |= (byte & 0x7f) << lengthShift;
+      if ((byte & 0x80) == 0) {
+        waitingForLength = false;
+        message = new Uint8List(length);
+        if (length == 0) {
+          // There is no message data to wait for, so just go ahead and deliver the
+          // empty message.
+          var messageToReturn = message;
+          reset();
+          return messageToReturn;
+        }
+      } else {
+        lengthShift += 7;
+      }
+    } else {
+      message[numMessageBytesReceived] = byte;
+      numMessageBytesReceived++;
+      if (numMessageBytesReceived == length) {
+        var messageToReturn = message;
+        reset();
+        return messageToReturn;
+      }
+    }
+    return null;
+  }
+
+  /// Reset the state so that we are ready to receive the next base-128 encoded
+  /// length.
+  void reset() {
+    waitingForLength = true;
+    length = 0;
+    lengthShift = 0;
+    message = null;
+    numMessageBytesReceived = 0;
+  }
+}
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index 732fc63..fc778f4 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -33,6 +33,41 @@
   /// The path to an analysis options file
   final String analysisOptionsFile;
 
+  /// The path to output analysis results when in build mode.
+  final String buildAnalysisOutput;
+
+  /// Whether to use build mode.
+  final bool buildMode;
+
+  /// Whether to use build mode as a Bazel persistent worker.
+  final bool buildModePersistentWorker;
+
+  /// List of summary file paths to use in build mode.
+  final List<String> buildSummaryInputs;
+
+  /// Whether to skip analysis when creating summaries in build mode.
+  final bool buildSummaryOnly;
+
+  /// Whether to create summaries using only ASTs, i.e. don't perform
+  /// resolution.
+  final bool buildSummaryOnlyAst;
+
+  /// Whether to use diet parsing, i.e. skip function bodies. We don't need to
+  /// analyze function bodies to use summaries during future compilation steps.
+  final bool buildSummaryOnlyDiet;
+
+  /// Whether to use exclude informative data from created summaries.
+  final bool buildSummaryExcludeInformative;
+
+  /// The path to output the summary when creating summaries in build mode.
+  final String buildSummaryOutput;
+
+  /// Whether to output a summary in "fallback mode".
+  final bool buildSummaryFallback;
+
+  /// Whether to suppress a nonzero exit code in build mode.
+  final bool buildSuppressExitCode;
+
   /// The path to the dart SDK
   String dartSdkPath;
 
@@ -45,6 +80,9 @@
   /// Whether to display version information
   final bool displayVersion;
 
+  /// Whether to enable conditional directives (DEP 40).
+  final bool enableConditionalDirectives;
+
   /// Whether to enable null-aware operators (DEP 9).
   final bool enableNullAwareOperators;
 
@@ -74,21 +112,6 @@
   /// Whether to use machine format for error display
   final bool machineFormat;
 
-  /// Whether to use the whole package analysis mode.
-  final bool packageMode;
-
-  /// The path of the root folder of the package to analyze.
-  final String packageModePath;
-
-  /// The name of the package being analyzed.
-  final String packageName;
-
-  /// Mapping of package names to package summary file paths.
-  final Map<String, String> packageSummaryInputs;
-
-  /// The path to find the package summary.
-  final String packageSummaryOutput;
-
   /// The path to the package root
   final String packageRootPath;
 
@@ -105,6 +128,9 @@
   /// Whether to show package: warnings
   final bool showPackageWarnings;
 
+  /// If not null, show package: warnings only for matching packages.
+  final String showPackageWarningsPrefix;
+
   /// Whether to show SDK warnings
   final bool showSdkWarnings;
 
@@ -117,14 +143,30 @@
   /// Whether to use strong static checking.
   final bool strongMode;
 
+  /// Whether to treat lints as fatal
+  final bool lintsAreFatal;
+
   /// Initialize options from the given parsed [args].
   CommandLineOptions._fromArgs(
       ArgResults args, Map<String, String> definedVariables)
-      : dartSdkPath = args['dart-sdk'],
+      : buildAnalysisOutput = args['build-analysis-output'],
+        buildMode = args['build-mode'],
+        buildModePersistentWorker = args['persistent_worker'],
+        buildSummaryFallback = args['build-summary-fallback'],
+        buildSummaryInputs = args['build-summary-input'],
+        buildSummaryOnly = args['build-summary-only'],
+        buildSummaryOnlyAst = args['build-summary-only-ast'],
+        buildSummaryOnlyDiet = args['build-summary-only-diet'],
+        buildSummaryExcludeInformative =
+            args['build-summary-exclude-informative'],
+        buildSummaryOutput = args['build-summary-output'],
+        buildSuppressExitCode = args['build-suppress-exit-code'],
+        dartSdkPath = args['dart-sdk'],
         definedVariables = definedVariables,
         analysisOptionsFile = args['options'],
         disableHints = args['no-hints'],
         displayVersion = args['version'],
+        enableConditionalDirectives = args['enable-conditional-directives'],
         enableNullAwareOperators = args['enable-null-aware-operators'],
         enableStrictCallChecks = args['enable-strict-call-checks'],
         enableSuperMixins = args['supermixin'],
@@ -134,27 +176,25 @@
         lints = args['lints'],
         log = args['log'],
         machineFormat = args['machine'] || args['format'] == 'machine',
-        packageMode = args['package-mode'],
-        packageModePath = args['package-mode-path'],
-        packageName = args['package-name'],
-        packageSummaryInputs = _parsePackageSummaryInputs(args),
-        packageSummaryOutput = args['package-summary-output'],
         packageConfigPath = args['packages'],
         packageRootPath = args['package-root'],
         perfReport = args['x-perf-report'],
         shouldBatch = args['batch'],
-        showPackageWarnings =
-            args['show-package-warnings'] || args['package-warnings'],
+        showPackageWarnings = args['show-package-warnings'] ||
+            args['package-warnings'] ||
+            args['x-package-warnings-prefix'] != null,
+        showPackageWarningsPrefix = args['x-package-warnings-prefix'],
         showSdkWarnings = args['show-sdk-warnings'] || args['warnings'],
         sourceFiles = args.rest,
         warningsAreFatal = args['fatal-warnings'],
-        strongMode = args['strong'];
+        strongMode = args['strong'],
+        lintsAreFatal = args['fatal-lints'];
 
   /// Parse [args] into [CommandLineOptions] describing the specified
   /// analyzer options. In case of a format error, calls [printAndFail], which
   /// by default prints an error message to stderr and exits.
   static CommandLineOptions parse(List<String> args,
-      [printAndFail = printAndFail]) {
+      [printAndFail(String msg) = printAndFail]) {
     CommandLineOptions options = _parse(args);
     // Check SDK.
     {
@@ -196,6 +236,16 @@
           "Null aware operators are supported by default.");
     }
 
+    // Build mode.
+    if (options.buildModePersistentWorker && !options.buildMode) {
+      printAndFail('The option --persisten_worker can be used only '
+          'together with --build-mode.');
+    }
+    if (options.buildSummaryOnlyDiet && !options.buildSummaryOnly) {
+      printAndFail('The option --build-summary-only-diet can be used only '
+          'together with --build-summary-only.');
+    }
+
     return options;
   }
 
@@ -213,6 +263,12 @@
   }
 
   static CommandLineOptions _parse(List<String> args) {
+    // Check if the args are in a file (bazel worker mode).
+    if (args.last.startsWith('@')) {
+      var argsFile = new File(args.last.substring(1));
+      args = argsFile.readAsLinesSync();
+    }
+
     args = args.expand((String arg) => arg.split('=')).toList();
     var parser = new CommandLineParser()
       ..addFlag('batch',
@@ -257,6 +313,8 @@
           help: 'Treat non-type warnings as fatal.',
           defaultsTo: false,
           negatable: false)
+      ..addFlag('fatal-lints',
+          help: 'Treat lints as fatal.', defaultsTo: false, negatable: false)
       ..addFlag('package-warnings',
           help: 'Show warnings from package: imports.',
           defaultsTo: false,
@@ -273,6 +331,10 @@
           help: 'Show warnings from SDK imports (deprecated).',
           defaultsTo: false,
           negatable: false)
+      ..addOption('x-package-warnings-prefix',
+          help:
+              'Show warnings from package: imports that match the given prefix',
+          hide: true)
       ..addOption('x-perf-report',
           help: 'Writes a performance report to the given file (experimental).')
       ..addFlag('help',
@@ -287,31 +349,61 @@
           allowMultiple: true,
           splitCommas: false)
       //
-      // Package analysis mode and summary.
+      // Build mode.
       //
-      ..addFlag('package-mode',
-          help: 'Enable the whole package analysis mode. '
-              'Exactly one input path must be specified, which must be a path '
-              'to the folder with a Pub package.',
+      ..addFlag('persistent_worker',
+          help: 'Enable Bazel persistent worker mode.',
           defaultsTo: false,
           negatable: false,
           hide: true)
-      ..addOption('package-mode-path',
-          help: 'The path of the root folder of the package to analyze.',
+      ..addOption('build-analysis-output',
+          help:
+              'Specifies the path to the file where analysis results should be written.',
           hide: true)
-      ..addOption('package-name',
-          help: 'The name of the package to analyze, as it is used by clients.',
+      ..addFlag('build-mode',
+          // TODO(paulberry): add more documentation.
+          help: 'Enable build mode.',
+          defaultsTo: false,
+          negatable: false,
           hide: true)
-      ..addOption('package-summary-input',
-          help: '--package-summary-input=packageName,/path/to/package.sum '
-              'specifies the summary file that contains information about '
-              'every library of the specified package.',
+      ..addOption('build-summary-input',
+          help: 'Path to a summary file that contains information from a '
+              'previous analysis run.  May be specified multiple times.',
           allowMultiple: true,
-          splitCommas: false,
           hide: true)
-      ..addOption('package-summary-output',
+      ..addOption('build-summary-output',
           help: 'Specifies the path to the file where the summary information '
-              'about the package should be written to.',
+              'should be written.',
+          hide: true)
+      ..addFlag('build-summary-only',
+          help: 'Disable analysis (only generate summaries).',
+          defaultsTo: false,
+          negatable: false,
+          hide: true)
+      ..addFlag('build-summary-only-ast',
+          help: 'Generate summaries using ASTs.',
+          defaultsTo: false,
+          negatable: false,
+          hide: true)
+      ..addFlag('build-summary-only-diet',
+          help: 'Diet parse function bodies.',
+          defaultsTo: false,
+          negatable: false,
+          hide: true)
+      ..addFlag('build-summary-exclude-informative',
+          help: 'Exclude @informative information (docs, offsets, etc).',
+          defaultsTo: false,
+          negatable: false,
+          hide: true)
+      ..addFlag('build-summary-fallback',
+          help: 'If outputting a summary, output it in fallback mode.',
+          defaultsTo: false,
+          negatable: false,
+          hide: true)
+      ..addFlag('build-suppress-exit-code',
+          help: 'Exit with code 0 even if errors are found.',
+          defaultsTo: false,
+          negatable: false,
           hide: true)
       //
       // Hidden flags.
@@ -326,6 +418,11 @@
           defaultsTo: false,
           negatable: false,
           hide: true)
+      ..addFlag('enable-conditional-directives',
+          help: 'Enable support for conditional directives (DEP 40).',
+          defaultsTo: false,
+          negatable: false,
+          hide: true)
       ..addFlag('enable-null-aware-operators',
           help: 'Enable support for null-aware operators (DEP 9).',
           defaultsTo: false,
@@ -365,6 +462,28 @@
           args.map((String arg) => arg == '-batch' ? '--batch' : arg).toList();
       Map<String, String> definedVariables = <String, String>{};
       var results = parser.parse(args, definedVariables);
+
+      // Persistent worker.
+      if (args.contains('--persistent_worker')) {
+        bool validArgs;
+        if (!args.contains('--build-mode')) {
+          validArgs = false;
+        } else if (args.length == 2) {
+          validArgs = true;
+        } else if (args.length == 4 && args.contains('--dart-sdk')) {
+          validArgs = true;
+        } else {
+          validArgs = false;
+        }
+        if (!validArgs) {
+          printAndFail('The --persistent_worker flag should be used with and '
+              'only with the --build-mode flag, and possibly the --dart-sdk '
+              'option. Got: $args');
+          return null; // Only reachable in testing.
+        }
+        return new CommandLineOptions._fromArgs(results, definedVariables);
+      }
+
       // Help requests.
       if (results['help']) {
         _showUsage(parser);
@@ -379,6 +498,14 @@
           exitHandler(15);
           return null; // Only reachable in testing.
         }
+      } else if (results['persistent_worker']) {
+        if (results.rest.isNotEmpty) {
+          errorSink.writeln(
+              'No source files expected in the persistent worker mode.');
+          _showUsage(parser);
+          exitHandler(15);
+          return null; // Only reachable in testing.
+        }
       } else if (results['version']) {
         outSink.write('$_binaryName version ${_getVersion()}');
         exitHandler(0);
@@ -399,27 +526,6 @@
     }
   }
 
-  /// Parse the `--package-summary-input` arguments into a Map of package
-  /// names to summary paths.
-  static Map<String, String> _parsePackageSummaryInputs(ArgResults args) {
-    Map<String, String> result = <String, String>{};
-    List<String> argList = args['package-summary-input'];
-    for (String arg in argList) {
-      int index = arg.indexOf(',');
-      if (index == -1) {
-        errorSink.writeln(
-            'The syntax is --package-summary-input=packageName,/path/to/pkg.sum');
-        errorSink.writeln('No comma found in: $arg');
-        exitHandler(15);
-        return null; // Only reachable in testing.
-      }
-      String packageName = arg.substring(0, index);
-      String summaryPath = arg.substring(index + 1);
-      result[packageName] = summaryPath;
-    }
-    return result;
-  }
-
   static _showUsage(parser) {
     errorSink
         .writeln('Usage: $_binaryName [options...] <libraries to analyze...>');
diff --git a/pkg/analyzer_cli/lib/src/package_analyzer.dart b/pkg/analyzer_cli/lib/src/package_analyzer.dart
deleted file mode 100644
index 746c77a..0000000
--- a/pkg/analyzer_cli/lib/src/package_analyzer.dart
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library analyzer_cli.src.package_analyzer;
-
-import 'dart:core' hide Resource;
-import 'dart:io' as io;
-
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/source/package_map_resolver.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/error.dart';
-import 'package:analyzer/src/generated/java_io.dart';
-import 'package:analyzer/src/generated/sdk_io.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/summary/format.dart';
-import 'package:analyzer/src/summary/package_bundle_reader.dart';
-import 'package:analyzer/src/summary/summarize_elements.dart';
-import 'package:analyzer_cli/src/analyzer_impl.dart';
-import 'package:analyzer_cli/src/driver.dart';
-import 'package:analyzer_cli/src/error_formatter.dart';
-import 'package:analyzer_cli/src/options.dart';
-import 'package:path/path.dart' as pathos;
-
-/**
- * The hermetic whole package analyzer.
- */
-class PackageAnalyzer {
-  final CommandLineOptions options;
-
-  String packagePath;
-  String packageLibPath;
-
-  final ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
-  InternalAnalysisContext context;
-  final List<Source> explicitSources = <Source>[];
-
-  PackageAnalyzer(this.options);
-
-  /**
-   * Perform package analysis according to the given [options].
-   */
-  ErrorSeverity analyze() {
-    packagePath = options.packageModePath;
-    packageLibPath = resourceProvider.pathContext.join(packagePath, 'lib');
-    if (packageLibPath == null) {
-      errorSink.writeln('--package-mode-path must be set to the root '
-          'folder of the package to analyze.');
-      io.exitCode = ErrorSeverity.ERROR.ordinal;
-      return ErrorSeverity.ERROR;
-    }
-
-    // Write the progress message.
-    if (!options.machineFormat) {
-      outSink.writeln("Analyzing sources ${options.sourceFiles}...");
-    }
-
-    // Prepare the analysis context.
-    _createContext();
-
-    // Add sources.
-    ChangeSet changeSet = new ChangeSet();
-    for (String path in options.sourceFiles) {
-      if (AnalysisEngine.isDartFileName(path)) {
-        path = resourceProvider.pathContext.absolute(path);
-        File file = resourceProvider.getFile(path);
-        if (!file.exists) {
-          errorSink.writeln('File not found: $path');
-          io.exitCode = ErrorSeverity.ERROR.ordinal;
-          return ErrorSeverity.ERROR;
-        }
-        Source source = _createSourceInContext(file);
-        explicitSources.add(source);
-        changeSet.addedSource(source);
-      }
-    }
-    context.applyChanges(changeSet);
-
-    // Perform full analysis.
-    while (true) {
-      AnalysisResult analysisResult = context.performAnalysisTask();
-      if (!analysisResult.hasMoreWork) {
-        break;
-      }
-    }
-
-    // Write summary for Dart libraries.
-    if (options.packageSummaryOutput != null) {
-      PackageBundleAssembler assembler = new PackageBundleAssembler();
-      for (Source source in context.librarySources) {
-        if (pathos.isWithin(packageLibPath, source.fullName)) {
-          LibraryElement libraryElement = context.getLibraryElement(source);
-          if (libraryElement != null) {
-            assembler.serializeLibraryElement(libraryElement);
-          }
-        }
-      }
-      // Write the whole package bundle.
-      PackageBundleBuilder sdkBundle = assembler.assemble();
-      io.File file = new io.File(options.packageSummaryOutput);
-      file.writeAsBytesSync(sdkBundle.toBuffer(), mode: io.FileMode.WRITE_ONLY);
-    }
-
-    // Process errors.
-    _printErrors();
-    return _computeMaxSeverity();
-  }
-
-  ErrorSeverity _computeMaxSeverity() {
-    ErrorSeverity maxSeverity = ErrorSeverity.NONE;
-    for (Source source in explicitSources) {
-      AnalysisErrorInfo errorInfo = context.getErrors(source);
-      for (AnalysisError error in errorInfo.errors) {
-        ProcessedSeverity processedSeverity =
-            AnalyzerImpl.processError(error, options, context);
-        if (processedSeverity != null) {
-          maxSeverity = maxSeverity.max(processedSeverity.severity);
-        }
-      }
-    }
-    return maxSeverity;
-  }
-
-  void _createContext() {
-    DirectoryBasedDartSdk sdk =
-        new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
-
-    // Create the context.
-    context = AnalysisEngine.instance.createAnalysisContext();
-    context.sourceFactory = new SourceFactory(<UriResolver>[
-      new DartUriResolver(sdk),
-      new InSummaryPackageUriResolver(options.packageSummaryInputs),
-      new PackageMapUriResolver(resourceProvider, <String, List<Folder>>{
-        options.packageName: <Folder>[
-          resourceProvider.getFolder(packageLibPath)
-        ],
-      }),
-      new FileUriResolver()
-    ]);
-
-    // Set context options.
-    Driver.setAnalysisContextOptions(
-        context, options, (AnalysisOptionsImpl contextOptions) {});
-
-    // Configure using summaries.
-    sdk.useSummary = true;
-    context.typeProvider = sdk.context.typeProvider;
-    context.resultProvider =
-        new InputPackagesResultProvider(context, options.packageSummaryInputs);
-  }
-
-  /**
-   * Create and return a source representing the given [file].
-   */
-  Source _createSourceInContext(File file) {
-    Source source = file.createSource();
-    if (context == null) {
-      return source;
-    }
-    Uri uri = context.sourceFactory.restoreUri(source);
-    return file.createSource(uri);
-  }
-
-  /**
-   * Print errors for all explicit sources.
-   */
-  void _printErrors() {
-    StringSink sink = options.machineFormat ? errorSink : outSink;
-    ErrorFormatter formatter = new ErrorFormatter(
-        sink,
-        options,
-        (AnalysisError error) =>
-            AnalyzerImpl.processError(error, options, context));
-    for (Source source in explicitSources) {
-      AnalysisErrorInfo errorInfo = context.getErrors(source);
-      formatter.formatErrors([errorInfo]);
-    }
-  }
-}
diff --git a/pkg/analyzer_cli/lib/src/perf_report.dart b/pkg/analyzer_cli/lib/src/perf_report.dart
index 208e560..f92ae9a 100644
--- a/pkg/analyzer_cli/lib/src/perf_report.dart
+++ b/pkg/analyzer_cli/lib/src/perf_report.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/src/generated/utilities_general.dart'
     show PerformanceTag;
 import 'package:analyzer/task/model.dart' show AnalysisTask;
+import 'package:analyzer_cli/src/error_formatter.dart';
 import 'package:analyzer_cli/src/options.dart' show CommandLineOptions;
 
 const _JSON = const JsonEncoder.withIndent("  ");
@@ -39,7 +40,8 @@
   }
 }();
 
-String makePerfReport(int startTime, int endTime, CommandLineOptions options) {
+String makePerfReport(int startTime, int endTime, CommandLineOptions options,
+    int analyzedFileCount, AnalysisStats stats) {
   int totalTime = endTime - startTime;
   int otherTime = totalTime;
 
@@ -53,6 +55,7 @@
     'dartSdkPath': options.dartSdkPath,
     'strongMode': options.strongMode,
     'showPackageWarnings': options.showPackageWarnings,
+    'showPackageWarningsPrefix': options.showPackageWarningsPrefix,
     'showSdkWarnings': options.showSdkWarnings,
     'definedVariables': options.definedVariables,
     'packageRootPath': options.packageRootPath,
@@ -89,6 +92,9 @@
     'options': optionsJson,
     'totalElapsedTime': totalTime,
     'totalTaskTime': totalTaskTime,
+    'analyzedFiles': analyzedFileCount,
+    'generatedDiagnostics': stats.unfilteredCount,
+    'reportedDiagnostics': stats.filteredCount,
     'performanceTags': perfTagsJson,
     'tasks': taskRows.map((r) => r.toJson()).toList(),
   };
diff --git a/pkg/analyzer_cli/lib/src/worker_protocol.pb.dart b/pkg/analyzer_cli/lib/src/worker_protocol.pb.dart
new file mode 100755
index 0000000..908dfac
--- /dev/null
+++ b/pkg/analyzer_cli/lib/src/worker_protocol.pb.dart
@@ -0,0 +1,133 @@
+///
+//  Generated code. Do not modify.
+///
+library blaze.worker_worker_protocol;
+
+import 'package:protobuf/protobuf.dart';
+
+class Input extends GeneratedMessage {
+  static final BuilderInfo _i = new BuilderInfo('Input')
+    ..a(1, 'path', PbFieldType.OS)
+    ..a(2, 'digest', PbFieldType.OY)
+    ..hasRequiredFields = false
+  ;
+
+  Input() : super();
+  Input.fromBuffer(List<int> i, [ExtensionRegistry r = ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
+  Input.fromJson(String i, [ExtensionRegistry r = ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
+  Input clone() => new Input()..mergeFromMessage(this);
+  BuilderInfo get info_ => _i;
+  static Input create() => new Input();
+  static PbList<Input> createRepeated() => new PbList<Input>();
+  static Input getDefault() {
+    if (_defaultInstance == null) _defaultInstance = new _ReadonlyInput();
+    return _defaultInstance;
+  }
+  static Input _defaultInstance;
+  static void $checkItem(Input v) {
+    if (v is !Input) checkItemFailed(v, 'Input');
+  }
+
+  String get path => $_get(0, 1, '');
+  void set path(String v) { $_setString(0, 1, v); }
+  bool hasPath() => $_has(0, 1);
+  void clearPath() => clearField(1);
+
+  List<int> get digest => $_get(1, 2, null);
+  void set digest(List<int> v) { $_setBytes(1, 2, v); }
+  bool hasDigest() => $_has(1, 2);
+  void clearDigest() => clearField(2);
+}
+
+class _ReadonlyInput extends Input with ReadonlyMessageMixin {}
+
+class WorkRequest extends GeneratedMessage {
+  static final BuilderInfo _i = new BuilderInfo('WorkRequest')
+    ..p(1, 'arguments', PbFieldType.PS)
+    ..pp(2, 'inputs', PbFieldType.PM, Input.$checkItem, Input.create)
+    ..hasRequiredFields = false
+  ;
+
+  WorkRequest() : super();
+  WorkRequest.fromBuffer(List<int> i, [ExtensionRegistry r = ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
+  WorkRequest.fromJson(String i, [ExtensionRegistry r = ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
+  WorkRequest clone() => new WorkRequest()..mergeFromMessage(this);
+  BuilderInfo get info_ => _i;
+  static WorkRequest create() => new WorkRequest();
+  static PbList<WorkRequest> createRepeated() => new PbList<WorkRequest>();
+  static WorkRequest getDefault() {
+    if (_defaultInstance == null) _defaultInstance = new _ReadonlyWorkRequest();
+    return _defaultInstance;
+  }
+  static WorkRequest _defaultInstance;
+  static void $checkItem(WorkRequest v) {
+    if (v is !WorkRequest) checkItemFailed(v, 'WorkRequest');
+  }
+
+  List<String> get arguments => $_get(0, 1, null);
+
+  List<Input> get inputs => $_get(1, 2, null);
+}
+
+class _ReadonlyWorkRequest extends WorkRequest with ReadonlyMessageMixin {}
+
+class WorkResponse extends GeneratedMessage {
+  static final BuilderInfo _i = new BuilderInfo('WorkResponse')
+    ..a(1, 'exitCode', PbFieldType.O3)
+    ..a(2, 'output', PbFieldType.OS)
+    ..hasRequiredFields = false
+  ;
+
+  WorkResponse() : super();
+  WorkResponse.fromBuffer(List<int> i, [ExtensionRegistry r = ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
+  WorkResponse.fromJson(String i, [ExtensionRegistry r = ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
+  WorkResponse clone() => new WorkResponse()..mergeFromMessage(this);
+  BuilderInfo get info_ => _i;
+  static WorkResponse create() => new WorkResponse();
+  static PbList<WorkResponse> createRepeated() => new PbList<WorkResponse>();
+  static WorkResponse getDefault() {
+    if (_defaultInstance == null) _defaultInstance = new _ReadonlyWorkResponse();
+    return _defaultInstance;
+  }
+  static WorkResponse _defaultInstance;
+  static void $checkItem(WorkResponse v) {
+    if (v is !WorkResponse) checkItemFailed(v, 'WorkResponse');
+  }
+
+  int get exitCode => $_get(0, 1, 0);
+  void set exitCode(int v) { $_setUnsignedInt32(0, 1, v); }
+  bool hasExitCode() => $_has(0, 1);
+  void clearExitCode() => clearField(1);
+
+  String get output => $_get(1, 2, '');
+  void set output(String v) { $_setString(1, 2, v); }
+  bool hasOutput() => $_has(1, 2);
+  void clearOutput() => clearField(2);
+}
+
+class _ReadonlyWorkResponse extends WorkResponse with ReadonlyMessageMixin {}
+
+const Input$json = const {
+  '1': 'Input',
+  '2': const [
+    const {'1': 'path', '3': 1, '4': 1, '5': 9},
+    const {'1': 'digest', '3': 2, '4': 1, '5': 12},
+  ],
+};
+
+const WorkRequest$json = const {
+  '1': 'WorkRequest',
+  '2': const [
+    const {'1': 'arguments', '3': 1, '4': 3, '5': 9},
+    const {'1': 'inputs', '3': 2, '4': 3, '5': 11, '6': '.blaze.worker.Input'},
+  ],
+};
+
+const WorkResponse$json = const {
+  '1': 'WorkResponse',
+  '2': const [
+    const {'1': 'exit_code', '3': 1, '4': 1, '5': 5},
+    const {'1': 'output', '3': 2, '4': 1, '5': 9},
+  ],
+};
+
diff --git a/pkg/analyzer_cli/pubspec.yaml b/pkg/analyzer_cli/pubspec.yaml
index 6e59161..a1b2fe8 100644
--- a/pkg/analyzer_cli/pubspec.yaml
+++ b/pkg/analyzer_cli/pubspec.yaml
@@ -12,6 +12,7 @@
   linter: ^0.1.10
   package_config: ^0.1.1
   plugin: ^0.1.0
+  protobuf: ^0.5.0
   yaml: ^2.1.2
 dev_dependencies:
   test_reflective_loader: '>=0.0.3 <0.1.0'
diff --git a/pkg/analyzer_cli/test/all.dart b/pkg/analyzer_cli/test/all.dart
index 9f08563..05d8a98 100644
--- a/pkg/analyzer_cli/test/all.dart
+++ b/pkg/analyzer_cli/test/all.dart
@@ -3,9 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'boot_loader_test.dart' as boot_loader;
+import 'build_mode_test.dart' as build_mode_test;
 import 'driver_test.dart' as driver;
 import 'error_test.dart' as error;
+import 'message_grouper_test.dart' as message_grouper;
 import 'options_test.dart' as options;
+import 'package_prefix_test.dart' as package_prefix;
 import 'perf_report_test.dart' as perf;
 import 'plugin_manager_test.dart' as plugin_manager;
 import 'reporter_test.dart' as reporter;
@@ -15,15 +18,18 @@
 
 main() {
   boot_loader.main();
+  build_mode_test.main();
   driver.main();
   // TODO(pq): fix tests to run safely on the bots
   // https://github.com/dart-lang/sdk/issues/25001
   //sdk_ext.main();
   //strong_mode.main();
   error.main();
+  message_grouper.main();
   options.main();
   perf.main();
   plugin_manager.main();
   reporter.main();
   super_mixin.main();
+  package_prefix.main();
 }
diff --git a/pkg/analyzer_cli/test/build_mode_test.dart b/pkg/analyzer_cli/test/build_mode_test.dart
new file mode 100644
index 0000000..dcc2423
--- /dev/null
+++ b/pkg/analyzer_cli/test/build_mode_test.dart
@@ -0,0 +1,158 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer_cli.test.built_mode;
+
+import 'dart:collection';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:analyzer_cli/src/build_mode.dart';
+import 'package:analyzer_cli/src/driver.dart';
+import 'package:analyzer_cli/src/options.dart';
+import 'package:analyzer_cli/src/worker_protocol.pb.dart';
+import 'package:protobuf/protobuf.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+import 'package:typed_mock/typed_mock.dart';
+import 'package:unittest/unittest.dart';
+
+import 'utils.dart';
+
+main() {
+  defineReflectiveTests(WorkerLoopTest);
+}
+
+typedef void _TestWorkerLoopAnalyze(CommandLineOptions options);
+
+@reflectiveTest
+class WorkerLoopTest {
+  final TestStdinStream stdinStream = new TestStdinStream();
+  final TestStdoutStream stdoutStream = new TestStdoutStream();
+  _TestWorkerConnection connection;
+
+  WorkerLoopTest() {
+    connection = new _TestWorkerConnection(this.stdinStream, this.stdoutStream);
+  }
+
+  void setUp() {}
+
+  List<int> _serializeProto(GeneratedMessage message) {
+    var buffer = message.writeToBuffer();
+
+    var writer = new CodedBufferWriter();
+    writer.writeInt32NoTag(buffer.length);
+    writer.writeRawBytes(buffer);
+
+    return writer.toBuffer();
+  }
+
+  test_run() {
+    var request = new WorkRequest();
+    request.arguments.addAll([
+      '--build-summary-input=/tmp/1.sum',
+      '--build-summary-input=/tmp/2.sum',
+      'package:foo/foo.dart|/inputs/foo/lib/foo.dart',
+      'package:foo/bar.dart|/inputs/foo/lib/bar.dart',
+    ]);
+    stdinStream.addInputBytes(_serializeProto(request));
+
+    new _TestWorkerLoop(connection, (CommandLineOptions options) {
+      expect(options.buildSummaryInputs,
+          unorderedEquals(['/tmp/1.sum', '/tmp/2.sum']));
+      expect(
+          options.sourceFiles,
+          unorderedEquals([
+            'package:foo/foo.dart|/inputs/foo/lib/foo.dart',
+            'package:foo/bar.dart|/inputs/foo/lib/bar.dart'
+          ]));
+      outSink.writeln('outSink a');
+      errorSink.writeln('errorSink a');
+      outSink.writeln('outSink b');
+      errorSink.writeln('errorSink b');
+    }).run();
+    expect(connection.outputList, hasLength(1));
+
+    var response = connection.outputList[0];
+    expect(response.exitCode, WorkerLoop.EXIT_CODE_OK);
+    expect(
+        response.output,
+        allOf(contains('errorSink a'), contains('errorSink a'),
+            contains('outSink a'), contains('outSink b')));
+
+    // Check that a serialized version was written to std out.
+    expect(stdoutStream.writes, hasLength(1));
+    expect(stdoutStream.writes[0], _serializeProto(response));
+  }
+
+  test_run_invalidOptions() {
+    var request = new WorkRequest();
+    request.arguments.addAll(['--unknown-option', '/foo.dart', '/bar.dart']);
+    stdinStream.addInputBytes(_serializeProto(request));
+    new _TestWorkerLoop(connection).run();
+    expect(connection.outputList, hasLength(1));
+
+    var response = connection.outputList[0];
+    expect(response.exitCode, WorkerLoop.EXIT_CODE_ERROR);
+    expect(response.output, anything);
+  }
+
+  test_run_invalidRequest_noArgumentsInputs() {
+    stdinStream.addInputBytes(_serializeProto(new WorkRequest()));
+
+    new _TestWorkerLoop(connection).run();
+    expect(connection.outputList, hasLength(1));
+
+    var response = connection.outputList[0];
+    expect(response.exitCode, WorkerLoop.EXIT_CODE_ERROR);
+    expect(response.output, anything);
+  }
+
+  test_run_invalidRequest_randomBytes() {
+    stdinStream.addInputBytes([1, 2, 3]);
+    new _TestWorkerLoop(connection).run();
+    expect(connection.outputList, hasLength(1));
+
+    var response = connection.outputList[0];
+    expect(response.exitCode, WorkerLoop.EXIT_CODE_ERROR);
+    expect(response.output, anything);
+  }
+
+  test_run_stopAtEOF() {
+    stdinStream.addInputBytes([-1]);
+    new _TestWorkerLoop(connection).run();
+  }
+}
+
+/**
+ * A [StdWorkerConnection] which records its responses.
+ */
+class _TestWorkerConnection extends StdWorkerConnection {
+  final outputList = <WorkResponse>[];
+
+  _TestWorkerConnection(Stdin stdinStream, Stdout stdoutStream)
+      : super(stdinStream, stdoutStream);
+
+  @override
+  void writeResponse(WorkResponse response) {
+    super.writeResponse(response);
+    outputList.add(response);
+  }
+}
+
+/**
+ * [WorkerLoop] for testing.
+ */
+class _TestWorkerLoop extends WorkerLoop {
+  final _TestWorkerLoopAnalyze _analyze;
+
+  _TestWorkerLoop(WorkerConnection connection, [this._analyze])
+      : super(connection);
+
+  @override
+  void analyze(CommandLineOptions options) {
+    if (_analyze != null) {
+      _analyze(options);
+    }
+  }
+}
diff --git a/pkg/analyzer_cli/test/data/file_with_todo.dart b/pkg/analyzer_cli/test/data/file_with_todo.dart
new file mode 100644
index 0000000..dd3feda
--- /dev/null
+++ b/pkg/analyzer_cli/test/data/file_with_todo.dart
@@ -0,0 +1,2 @@
+//TODO: add main
+main() {}
diff --git a/pkg/analyzer_cli/test/data/package_prefix/main.dart b/pkg/analyzer_cli/test/data/package_prefix/main.dart
new file mode 100644
index 0000000..4f1f313
--- /dev/null
+++ b/pkg/analyzer_cli/test/data/package_prefix/main.dart
@@ -0,0 +1,14 @@
+// Test data for package_prefix_test.dart
+//
+// To test manually:
+//
+// This should show a hint about an unused import in foo:
+// dart ../../../bin/analyzer.dart --packages=packagelist \
+//   --x-package-warnings-prefix=f main.dart
+
+import "package:foo/foo.dart";
+import "package:bar/bar.dart";
+
+main() {
+  print("$foo$bar");
+}
diff --git a/pkg/analyzer_cli/test/data/package_prefix/packagelist b/pkg/analyzer_cli/test/data/package_prefix/packagelist
new file mode 100644
index 0000000..85a25f7
--- /dev/null
+++ b/pkg/analyzer_cli/test/data/package_prefix/packagelist
@@ -0,0 +1,2 @@
+bar:pkg/bar/
+foo:pkg/foo/
diff --git a/pkg/analyzer_cli/test/data/package_prefix/pkg/bar/bar.dart b/pkg/analyzer_cli/test/data/package_prefix/pkg/bar/bar.dart
new file mode 100644
index 0000000..0890e0a
--- /dev/null
+++ b/pkg/analyzer_cli/test/data/package_prefix/pkg/bar/bar.dart
@@ -0,0 +1,3 @@
+import "dart:async"; // should trigger unused import
+
+var bar = "bar";
diff --git a/pkg/analyzer_cli/test/data/package_prefix/pkg/foo/foo.dart b/pkg/analyzer_cli/test/data/package_prefix/pkg/foo/foo.dart
new file mode 100644
index 0000000..ee511f5
--- /dev/null
+++ b/pkg/analyzer_cli/test/data/package_prefix/pkg/foo/foo.dart
@@ -0,0 +1,3 @@
+import "dart:async"; // should trigger unused import
+
+var foo = "foo";
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index 244788c..0b48331 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -66,6 +66,10 @@
         expect(processor.options['test_plugin'], isNotNull);
         expect(processor.exception, isNull);
       });
+      test('todos', () {
+        drive('data/file_with_todo.dart');
+        expect(outSink.toString().contains('[info]'), isFalse);
+      });
     });
 
     group('exit codes', () {
@@ -252,8 +256,7 @@
               outSink.toString(),
               contains(
                   "[error] This function declares a return type of 'int'"));
-          expect(outSink.toString(),
-              contains("1 error and 1 warning found."));
+          expect(outSink.toString(), contains("1 error and 1 warning found."));
         });
 
         test('language', () {
@@ -280,12 +283,54 @@
           // Should not be made fatal by `--fatal-warnings`.
           expect(outSink.toString(),
               contains("[warning] The function 'baz' is not defined"));
-          expect(outSink.toString(),
-              contains("1 error and 1 warning found."));
+          expect(outSink.toString(), contains("1 error and 1 warning found."));
         });
       });
     });
 
+    group('build-mode', () {
+      // Shared driver command.
+      void doDrive(String filePath, {List<String> additionalArgs: const []}) {
+        drive('file:///test_file.dart|$filePath',
+            args: [
+              '--dart-sdk',
+              findSdkDirForSummaries(),
+              '--build-mode',
+              '--machine'
+            ]..addAll(additionalArgs),
+            options: 'data/options_tests_project/.analysis_options');
+      }
+
+      test('no stats', () {
+        doDrive('data/test_file.dart');
+        // Should not print stat summary.
+        expect(outSink.toString(), isEmpty);
+        expect(errorSink.toString(), isEmpty);
+        expect(exitCode, 0);
+      });
+
+      test(
+          'Fails if file not found, even when --build-suppress-exit-code is given',
+          () {
+        doDrive('data/non_existent_file.dart',
+            additionalArgs: ['--build-suppress-exit-code']);
+        expect(exitCode, isNot(0));
+      });
+
+      test('Fails if there are errors', () {
+        doDrive('data/file_with_error.dart');
+        expect(exitCode, isNot(0));
+      });
+
+      test(
+          'Succeeds if there are errors, when --build-suppress-exit-code is given',
+          () {
+        doDrive('data/file_with_error.dart',
+            additionalArgs: ['--build-suppress-exit-code']);
+        expect(exitCode, 0);
+      });
+    });
+
 //TODO(pq): fix to be bot-friendly (sdk#25258).
 //    group('in temp directory', () {
 //      Directory savedCurrentDirectory;
@@ -348,8 +393,6 @@
 //      });
 //    });
   });
-
-
 }
 
 const emptyOptionsFile = 'data/empty_options.yaml';
@@ -360,8 +403,14 @@
 List<ErrorProcessor> get processors =>
     driver.context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
 
-ErrorProcessor processorFor(AnalysisError error) =>
-    processors.firstWhere((p) => p.appliesTo(error));
+/// Convert a file specification from a relative path to an absolute path.
+/// Handles the case where the file specification is of the form "$uri|$path".
+String adjustFileSpec(String fileSpec) {
+  int uriPrefixLength = fileSpec.indexOf('|') + 1;
+  String uriPrefix = fileSpec.substring(0, uriPrefixLength);
+  String relativePath = fileSpec.substring(uriPrefixLength);
+  return '$uriPrefix${path.join(testDirectory, relativePath)}';
+}
 
 /// Start a driver for the given [source], optionally providing additional
 /// [args] and an [options] file path.  The value of [options] defaults to
@@ -373,14 +422,60 @@
   var cmd = [
     '--options',
     path.join(testDirectory, options),
-    path.join(testDirectory, source)
+    adjustFileSpec(source)
   ]..addAll(args);
   driver.start(cmd);
 }
 
+/// Try to find a appropriate directory to pass to "--dart-sdk" that will
+/// allow summaries to be found.
+String findSdkDirForSummaries() {
+  Set<String> triedDirectories = new Set<String>();
+  bool isSuitable(String sdkDir) {
+    triedDirectories.add(sdkDir);
+    return new File(path.join(sdkDir, 'lib', '_internal', 'spec.sum'))
+        .existsSync();
+  }
+  // Usually the sdk directory is the parent of the parent of the "dart"
+  // executable.
+  Directory executableParent = new File(Platform.executable).parent;
+  Directory executableGrandparent = executableParent.parent;
+  if (isSuitable(executableGrandparent.path)) {
+    return executableGrandparent.path;
+  }
+  // During buildbot execution, the sdk directory is simply the parent of the
+  // "dart" executable.
+  if (isSuitable(executableParent.path)) {
+    return executableParent.path;
+  }
+  // If neither of those are suitable, assume we are running locally within the
+  // SDK project (e.g. within an IDE).  Find the build output directory and
+  // search all built configurations.
+  Directory sdkRootDir =
+      new File(Platform.script.toFilePath()).parent.parent.parent.parent;
+  for (String outDirName in ['out', 'xcodebuild']) {
+    Directory outDir = new Directory(path.join(sdkRootDir.path, outDirName));
+    if (outDir.existsSync()) {
+      for (FileSystemEntity subdir in outDir.listSync()) {
+        if (subdir is Directory) {
+          String candidateSdkDir = path.join(subdir.path, 'dart-sdk');
+          if (isSuitable(candidateSdkDir)) {
+            return candidateSdkDir;
+          }
+        }
+      }
+    }
+  }
+  throw new Exception('Could not find an SDK directory containing summaries.'
+      '  Tried: ${triedDirectories.toList()}');
+}
+
 Map<String, YamlNode> parseOptions(String src) =>
     new AnalysisOptionsProvider().getOptionsFromString(src);
 
+ErrorProcessor processorFor(AnalysisError error) =>
+    processors.firstWhere((p) => p.appliesTo(error));
+
 class TestPlugin extends Plugin {
   TestProcessor processor;
   TestPlugin(this.processor);
diff --git a/pkg/analyzer_cli/test/message_grouper_test.dart b/pkg/analyzer_cli/test/message_grouper_test.dart
new file mode 100644
index 0000000..6388f9b
--- /dev/null
+++ b/pkg/analyzer_cli/test/message_grouper_test.dart
@@ -0,0 +1,123 @@
+// 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_cli/src/message_grouper.dart';
+import 'package:unittest/unittest.dart';
+
+import 'utils.dart';
+
+main() {
+  MessageGrouper messageGrouper;
+  TestStdinStream stdinStream;
+
+  setUp(() {
+    stdinStream = new TestStdinStream();
+    messageGrouper = new MessageGrouper(stdinStream);
+  });
+
+  group('message_grouper', () {
+    /// Check that if the message grouper produces the [expectedOutput] in
+    /// response to the corresponding [input].
+    void check(List<int> input, List<List<int>> expectedOutput) {
+      stdinStream.addInputBytes(input);
+      for (var chunk in expectedOutput) {
+        expect(messageGrouper.next, equals(chunk));
+      }
+    }
+
+    /// Make a simple message having the given [length]
+    List<int> makeMessage(int length) {
+      var result = <int>[];
+      for (int i = 0; i < length; i++) {
+        result.add(i & 0xff);
+      }
+      return result;
+    }
+
+    test('Empty message', () {
+      check([0], [[]]);
+    });
+
+    test('Short message', () {
+      check([
+        5,
+        10,
+        20,
+        30,
+        40,
+        50
+      ], [
+        [10, 20, 30, 40, 50]
+      ]);
+    });
+
+    test('Message with 2-byte length', () {
+      var len = 0x155;
+      var msg = makeMessage(len);
+      var encodedLen = [0xd5, 0x02];
+      check([]..addAll(encodedLen)..addAll(msg), [msg]);
+    });
+
+    test('Message with 3-byte length', () {
+      var len = 0x4103;
+      var msg = makeMessage(len);
+      var encodedLen = [0x83, 0x82, 0x01];
+      check([]..addAll(encodedLen)..addAll(msg), [msg]);
+    });
+
+    test('Multiple messages', () {
+      check([
+        2,
+        10,
+        20,
+        2,
+        30,
+        40
+      ], [
+        [10, 20],
+        [30, 40]
+      ]);
+    });
+
+    test('Empty message at start', () {
+      check([
+        0,
+        2,
+        10,
+        20
+      ], [
+        [],
+        [10, 20]
+      ]);
+    });
+
+    test('Empty message at end', () {
+      check([
+        2,
+        10,
+        20,
+        0
+      ], [
+        [10, 20],
+        []
+      ]);
+    });
+
+    test('Empty message in the middle', () {
+      check([
+        2,
+        10,
+        20,
+        0,
+        2,
+        30,
+        40
+      ], [
+        [10, 20],
+        [],
+        [30, 40]
+      ]);
+    });
+  });
+}
diff --git a/pkg/analyzer_cli/test/options_test.dart b/pkg/analyzer_cli/test/options_test.dart
index 1c6aa76..6b546a6 100644
--- a/pkg/analyzer_cli/test/options_test.dart
+++ b/pkg/analyzer_cli/test/options_test.dart
@@ -19,26 +19,33 @@
         CommandLineOptions options =
             CommandLineOptions.parse(['--dart-sdk', '.', 'foo.dart']);
         expect(options, isNotNull);
+        expect(options.buildMode, isFalse);
+        expect(options.buildAnalysisOutput, isNull);
+        expect(options.buildSummaryFallback, isFalse);
+        expect(options.buildSummaryInputs, isEmpty);
+        expect(options.buildSummaryOnly, isFalse);
+        expect(options.buildSummaryOutput, isNull);
+        expect(options.buildSuppressExitCode, isFalse);
         expect(options.dartSdkPath, isNotNull);
         expect(options.disableHints, isFalse);
         expect(options.lints, isFalse);
         expect(options.displayVersion, isFalse);
         expect(options.enableStrictCallChecks, isFalse);
         expect(options.enableSuperMixins, isFalse);
+        expect(options.enableConditionalDirectives, isFalse);
         expect(options.enableTypeChecks, isFalse);
         expect(options.hintsAreFatal, isFalse);
         expect(options.ignoreUnrecognizedFlags, isFalse);
         expect(options.log, isFalse);
         expect(options.machineFormat, isFalse);
-        expect(options.packageMode, isFalse);
         expect(options.packageRootPath, isNull);
-        expect(options.packageSummaryInputs, isEmpty);
         expect(options.shouldBatch, isFalse);
         expect(options.showPackageWarnings, isFalse);
         expect(options.showSdkWarnings, isFalse);
         expect(options.sourceFiles, equals(['foo.dart']));
         expect(options.warningsAreFatal, isFalse);
         expect(options.strongMode, isFalse);
+        expect(options.lintsAreFatal, isFalse);
       });
 
       test('batch', () {
@@ -176,6 +183,12 @@
         expect(options.strongMode, isTrue);
       });
 
+      test('hintsAreFatal', () {
+        CommandLineOptions options = CommandLineOptions
+            .parse(['--dart-sdk', '.', '--fatal-lints', 'foo.dart']);
+        expect(options.lintsAreFatal, isTrue);
+      });
+
       test("can't specify package and package-root", () {
         var failureMessage;
         CommandLineOptions.parse(
@@ -230,45 +243,84 @@
 class CommandLineOptionsTest extends AbstractStatusTest {
   CommandLineOptions options;
 
-  test_packageMode() {
-    _parse(['--package-mode', '/path/to/pkg']);
-    expect(options.packageMode, isTrue);
-    print(options.packageSummaryInputs);
+  test_buildAnalysisOutput() {
+    _parse([
+      '--build-mode',
+      '--build-analysis-output=//path/to/output.analysis',
+      'package:p/foo.dart|/path/to/p/lib/foo.dart'
+    ]);
+    expect(options.buildMode, isTrue);
+    expect(options.buildAnalysisOutput, '//path/to/output.analysis');
   }
 
-  test_packageSummaryInput() {
-    _parse([
-      '--package-mode',
-      '--package-summary-input=aaa,/path/to/aaa.sum',
-      '--package-summary-input=long.package.bbb,/path/to/bbb.sum',
-      '/path/to/pkg'
-    ]);
-    expect(options.packageMode, isTrue);
-    Map<String, String> map = options.packageSummaryInputs;
-    expect(map, hasLength(2));
-    expect(map, containsPair('aaa', '/path/to/aaa.sum'));
-    expect(map, containsPair('long.package.bbb', '/path/to/bbb.sum'));
+  test_buildMode() {
+    _parse(['--build-mode', 'package:p/foo.dart|/path/to/p/lib/foo.dart']);
+    expect(options.buildMode, isTrue);
   }
 
-  test_packageSummaryInput_noComma() {
+  test_buildSummaryFallback() {
     _parse([
-      '--package-mode',
-      '--package-summary-input=noCommaInMapping',
-      '/path/to/pkg'
+      '--build-mode',
+      '--build-summary-output=//path/to/output.sum',
+      '--build-summary-fallback',
+      'package:p/foo.dart|/path/to/p/lib/foo.dart'
     ]);
-    expect(lastExitHandlerCode, 15);
-    expect(errorStringBuffer.toString(), contains('--package-summary-input'));
-    expect(errorStringBuffer.toString(), contains('noCommaInMapping'));
+    expect(options.buildMode, isTrue);
+    expect(options.buildSummaryFallback, isTrue);
   }
 
-  test_packageSummaryOutput() {
+  test_buildSummaryInputs_commaSeparated() {
     _parse([
-      '--package-mode',
-      '--package-summary-output=/path/to/output.sum',
-      '/path/to/pkg'
+      '--build-mode',
+      '--build-summary-input=/path/to/aaa.sum,/path/to/bbb.sum',
+      'package:p/foo.dart|/path/to/p/lib/foo.dart'
     ]);
-    expect(options.packageMode, isTrue);
-    expect(options.packageSummaryOutput, '/path/to/output.sum');
+    expect(options.buildMode, isTrue);
+    expect(
+        options.buildSummaryInputs, ['/path/to/aaa.sum', '/path/to/bbb.sum']);
+  }
+
+  test_buildSummaryInputs_separateFlags() {
+    _parse([
+      '--build-mode',
+      '--build-summary-input=/path/to/aaa.sum',
+      '--build-summary-input=/path/to/bbb.sum',
+      'package:p/foo.dart|/path/to/p/lib/foo.dart'
+    ]);
+    expect(options.buildMode, isTrue);
+    expect(
+        options.buildSummaryInputs, ['/path/to/aaa.sum', '/path/to/bbb.sum']);
+  }
+
+  test_buildSummaryOnly() {
+    _parse([
+      '--build-mode',
+      '--build-summary-output=/path/to/aaa.sum',
+      '--build-summary-only',
+      'package:p/foo.dart|/path/to/p/lib/foo.dart'
+    ]);
+    expect(options.buildMode, isTrue);
+    expect(options.buildSummaryOnly, isTrue);
+  }
+
+  test_buildSummaryOutput() {
+    _parse([
+      '--build-mode',
+      '--build-summary-output=//path/to/output.sum',
+      'package:p/foo.dart|/path/to/p/lib/foo.dart'
+    ]);
+    expect(options.buildMode, isTrue);
+    expect(options.buildSummaryOutput, '//path/to/output.sum');
+  }
+
+  test_buildSuppressExitCode() {
+    _parse([
+      '--build-mode',
+      '--build-suppress-exit-code',
+      'package:p/foo.dart|/path/to/p/lib/foo.dart'
+    ]);
+    expect(options.buildMode, isTrue);
+    expect(options.buildSuppressExitCode, isTrue);
   }
 
   void _parse(List<String> args) {
diff --git a/pkg/analyzer_cli/test/package_prefix_test.dart b/pkg/analyzer_cli/test/package_prefix_test.dart
new file mode 100644
index 0000000..22d71e1
--- /dev/null
+++ b/pkg/analyzer_cli/test/package_prefix_test.dart
@@ -0,0 +1,74 @@
+import 'dart:io' show exitCode;
+
+import 'package:analyzer_cli/src/driver.dart' show Driver, outSink, errorSink;
+import 'package:analyzer_cli/src/options.dart' show ExitHandler, exitHandler;
+import 'package:path/path.dart';
+import 'package:unittest/unittest.dart';
+
+import 'utils.dart' show testDirectory;
+
+main() {
+  group('--x-package-warnings-prefix', () {
+    _Runner runner;
+
+    setUp(() {
+      runner = new _Runner.setUp();
+    });
+
+    tearDown(() {
+      runner.tearDown();
+      runner = null;
+    });
+
+    test('shows only the hint whose package matches the prefix', () {
+      runner.run([
+        "--packages",
+        join(testDirectory, 'data', 'package_prefix', 'packagelist'),
+        "--x-package-warnings-prefix=f",
+        join(testDirectory, 'data', 'package_prefix', 'main.dart')
+      ]);
+      expect(runner.stdout, contains('1 hint found'));
+      expect(runner.stdout, contains('Unused import'));
+      expect(runner.stdout,
+          contains(join('package_prefix', 'pkg', 'foo', 'foo.dart')));
+      expect(runner.stdout, isNot(contains('bar.dart')));
+    });
+  });
+}
+
+class _Runner {
+  final _stdout = new StringBuffer();
+  final _stderr = new StringBuffer();
+
+  final StringSink _savedOutSink;
+  final StringSink _savedErrorSink;
+  final int _savedExitCode;
+  final ExitHandler _savedExitHandler;
+
+  _Runner.setUp()
+      : _savedOutSink = outSink,
+        _savedErrorSink = errorSink,
+        _savedExitHandler = exitHandler,
+        _savedExitCode = exitCode {
+    outSink = _stdout;
+    errorSink = _stderr;
+    exitHandler = (_) {};
+  }
+
+  String get stderr => _stderr.toString();
+
+  String get stdout => _stdout.toString();
+  void run(List<String> args) {
+    new Driver().start(args);
+    if (stderr.isNotEmpty) {
+      fail("Unexpected output to stderr:\n$stderr");
+    }
+  }
+
+  void tearDown() {
+    outSink = _savedOutSink;
+    errorSink = _savedErrorSink;
+    exitCode = _savedExitCode;
+    exitHandler = _savedExitHandler;
+  }
+}
diff --git a/pkg/analyzer_cli/test/perf_report_test.dart b/pkg/analyzer_cli/test/perf_report_test.dart
index f668485..19d91a1 100644
--- a/pkg/analyzer_cli/test/perf_report_test.dart
+++ b/pkg/analyzer_cli/test/perf_report_test.dart
@@ -6,6 +6,7 @@
 
 import 'dart:convert' show JSON;
 
+import 'package:analyzer_cli/src/error_formatter.dart' show AnalysisStats;
 import 'package:analyzer_cli/src/options.dart';
 import 'package:analyzer_cli/src/perf_report.dart';
 import 'package:unittest/unittest.dart';
@@ -13,7 +14,7 @@
 main() {
   test('makePerfReport', () {
     var options = CommandLineOptions.parse(["somefile.dart"]);
-    var encoded = makePerfReport(1000, 1234, options);
+    var encoded = makePerfReport(1000, 1234, options, 0, new AnalysisStats());
 
     var json = JSON.decode(encoded);
     expect(json['totalElapsedTime'], 234);
diff --git a/pkg/analyzer_cli/test/reporter_test.dart b/pkg/analyzer_cli/test/reporter_test.dart
index 94b0896..3a0853b 100644
--- a/pkg/analyzer_cli/test/reporter_test.dart
+++ b/pkg/analyzer_cli/test/reporter_test.dart
@@ -14,7 +14,9 @@
 main() {
   group('reporter', () {
     var out = new StringBuffer();
+    var stats = new AnalysisStats();
 
+    setUp(() => stats.init());
     tearDown(() => out.clear());
 
     // Options
@@ -23,28 +25,32 @@
     when(options.hintsAreFatal).thenReturn(false);
     when(options.machineFormat).thenReturn(false);
 
-    var reporter = new ErrorFormatter(out, options);
+    var reporter = new ErrorFormatter(out, options, stats);
 
     test('error', () {
       var error = mockError(ErrorType.SYNTACTIC_ERROR, ErrorSeverity.ERROR);
       reporter.formatErrors([error]);
 
-      expect(
-          out.toString(),
-          '''[error] MSG (/foo/bar/baz.dart, line 3, col 3)
-1 error found.
-''');
+      expect(out.toString().trim(),
+          '[error] MSG (/foo/bar/baz.dart, line 3, col 3)');
     });
 
     test('hint', () {
       var error = mockError(ErrorType.HINT, ErrorSeverity.INFO);
       reporter.formatErrors([error]);
 
+      expect(out.toString().trim(),
+          '[hint] MSG (/foo/bar/baz.dart, line 3, col 3)');
+    });
+
+    test('stats', () {
+      var error = mockError(ErrorType.HINT, ErrorSeverity.INFO);
+      reporter.formatErrors([error]);
+      stats.print(out);
       expect(
-          out.toString(),
+          out.toString().trim(),
           '''[hint] MSG (/foo/bar/baz.dart, line 3, col 3)
-1 hint found.
-''');
+1 hint found.''');
     });
   });
 }
diff --git a/pkg/analyzer_cli/test/utils.dart b/pkg/analyzer_cli/test/utils.dart
index 07dbe4b..ce71009b 100644
--- a/pkg/analyzer_cli/test/utils.dart
+++ b/pkg/analyzer_cli/test/utils.dart
@@ -4,6 +4,7 @@
 
 library analyzer_cli.test.utils;
 
+import 'dart:collection';
 import 'dart:io';
 import 'dart:mirrors';
 
@@ -11,6 +12,7 @@
 import 'package:analyzer/src/generated/java_io.dart';
 import 'package:path/path.dart' as pathos;
 import 'package:path/path.dart' as path;
+import 'package:typed_mock/typed_mock.dart';
 import 'package:unittest/unittest.dart';
 
 /// Gets the test directory in a way that works with
@@ -63,3 +65,37 @@
 }
 
 class _TestUtils {}
+
+/**
+ * A [Stdin] mock.
+ */
+class TestStdinStream extends TypedMock implements Stdin {
+  final pendingBytes = new Queue<int>();
+
+  // Adds all the input bytes to this stream.
+  void addInputBytes(List<int> bytes) {
+    pendingBytes.addAll(bytes);
+  }
+
+  @override
+  int readByteSync() {
+    if (pendingBytes.isEmpty) {
+      return -1;
+    } else {
+      return pendingBytes.removeFirst();
+    }
+  }
+}
+
+/**
+ * A [Stdout] mock.
+ */
+class TestStdoutStream extends TypedMock implements Stdout {
+  final writes = <List<int>>[];
+
+  @override
+  void add(List<int> bytes) {
+    super.add(bytes);
+    writes.add(bytes);
+  }
+}
diff --git a/pkg/compiler/lib/compiler.dart b/pkg/compiler/lib/compiler.dart
index 763dc4a..11e99b3 100644
--- a/pkg/compiler/lib/compiler.dart
+++ b/pkg/compiler/lib/compiler.dart
@@ -7,6 +7,7 @@
 import 'dart:async';
 import 'package:package_config/packages.dart';
 import 'compiler_new.dart' as new_api;
+import 'src/options.dart' show CompilerOptions;
 import 'src/old_to_new_api.dart';
 
 // Unless explicitly allowed, passing [:null:] for any argument to the
@@ -51,8 +52,7 @@
  * As more features are added to the compiler, new names and
  * extensions may be introduced.
  */
-typedef EventSink<String> CompilerOutputProvider(String name,
-                                                 String extension);
+typedef EventSink<String> CompilerOutputProvider(String name, String extension);
 
 /**
  * Invoked by the compiler to report diagnostics. If [uri] is
@@ -64,8 +64,8 @@
  * diagnostic message, and [kind] indicates indicates what kind of
  * diagnostic it is.
  */
-typedef void DiagnosticHandler(Uri uri, int begin, int end,
-                               String message, Diagnostic kind);
+typedef void DiagnosticHandler(
+    Uri uri, int begin, int end, String message, Diagnostic kind);
 
 /**
  * Provides a package lookup mechanism in the case that no package root or
@@ -103,19 +103,14 @@
  * as the compiler may create multiple files to support lazy loading
  * of libraries.
  */
-Future<CompilationResult> compile(
-    Uri script,
-    Uri libraryRoot,
-    Uri packageRoot,
-    CompilerInputProvider inputProvider,
-    DiagnosticHandler handler,
+Future<CompilationResult> compile(Uri script, Uri libraryRoot, Uri packageRoot,
+    CompilerInputProvider inputProvider, DiagnosticHandler handler,
     [List<String> options = const [],
-     CompilerOutputProvider outputProvider,
-     Map<String, dynamic> environment = const {},
-     Uri packageConfig,
-     PackagesDiscoveryProvider packagesDiscoveryProvider]) {
-
-  new_api.CompilerOptions compilerOptions = new new_api.CompilerOptions(
+    CompilerOutputProvider outputProvider,
+    Map<String, dynamic> environment = const {},
+    Uri packageConfig,
+    PackagesDiscoveryProvider packagesDiscoveryProvider]) {
+  CompilerOptions compilerOptions = new CompilerOptions.parse(
       entryPoint: script,
       libraryRoot: libraryRoot,
       packageRoot: packageRoot,
@@ -130,8 +125,9 @@
   new_api.CompilerOutput compilerOutput =
       new LegacyCompilerOutput(outputProvider);
 
-  return new_api.compile(compilerOptions, compilerInput,
-                         compilerDiagnostics, compilerOutput)
+  return new_api
+      .compile(
+          compilerOptions, compilerInput, compilerDiagnostics, compilerOutput)
       .then((new_api.CompilationResult result) {
     return new CompilationResult(result.compiler, isSuccess: result.isSuccess);
   });
diff --git a/pkg/compiler/lib/compiler_new.dart b/pkg/compiler/lib/compiler_new.dart
index b6c1e4f..51de3810 100644
--- a/pkg/compiler/lib/compiler_new.dart
+++ b/pkg/compiler/lib/compiler_new.dart
@@ -9,7 +9,9 @@
 
 import 'dart:async';
 import 'src/apiimpl.dart';
-import 'compiler.dart' show Diagnostic, PackagesDiscoveryProvider;
+import 'src/options.dart' show CompilerOptions;
+
+import 'compiler.dart' show Diagnostic;
 export 'compiler.dart' show Diagnostic, PackagesDiscoveryProvider;
 
 // Unless explicitly allowed, passing `null` for any argument to the
@@ -71,8 +73,8 @@
   /// Experimental: [code] gives access to an id for the messages. Currently it
   /// is the [Message] used to create the diagnostic, if available, from which
   /// the [MessageKind] is accessible.
-  void report(var code,
-              Uri uri, int begin, int end, String text, Diagnostic kind);
+  void report(
+      var code, Uri uri, int begin, int end, String text, Diagnostic kind);
 }
 
 /// Information resulting from the compilation.
@@ -90,56 +92,6 @@
   CompilationResult(this.compiler, {this.isSuccess: true});
 }
 
-/// Object for passing options to the compiler.
-class CompilerOptions {
-  final Uri entryPoint;
-  final Uri libraryRoot;
-  final Uri packageRoot;
-  final Uri packageConfig;
-  final PackagesDiscoveryProvider packagesDiscoveryProvider;
-  final List<String> options;
-  final Map<String, dynamic> environment;
-
-  /// Creates an option object for the compiler.
-  // TODO(johnniwinther): Expand comment when [options] are explicit as named
-  // arguments.
-  factory CompilerOptions(
-      {Uri entryPoint,
-       Uri libraryRoot,
-       Uri packageRoot,
-       Uri packageConfig,
-       PackagesDiscoveryProvider packagesDiscoveryProvider,
-       List<String> options: const <String>[],
-       Map<String, dynamic> environment: const <String, dynamic>{}}) {
-    if (entryPoint == null) {
-      throw new ArgumentError("entryPoint must be non-null");
-    }
-    if (!libraryRoot.path.endsWith("/")) {
-      throw new ArgumentError("libraryRoot must end with a /");
-    }
-    if (packageRoot != null && !packageRoot.path.endsWith("/")) {
-      throw new ArgumentError("packageRoot must end with a /");
-    }
-    return new CompilerOptions._(
-        entryPoint,
-        libraryRoot,
-        packageRoot,
-        packageConfig,
-        packagesDiscoveryProvider,
-        options,
-        environment);
-  }
-
-  CompilerOptions._(
-      this.entryPoint,
-      this.libraryRoot,
-      this.packageRoot,
-      this.packageConfig,
-      this.packagesDiscoveryProvider,
-      this.options,
-      this.environment);
-}
-
 /// Returns a future that completes to a [CompilationResult] when the Dart
 /// sources in [options] have been compiled.
 ///
@@ -154,7 +106,6 @@
     CompilerInput compilerInput,
     CompilerDiagnostics compilerDiagnostics,
     CompilerOutput compilerOutput) {
-
   if (compilerOptions == null) {
     throw new ArgumentError("compilerOptions must be non-null");
   }
@@ -169,15 +120,7 @@
   }
 
   CompilerImpl compiler = new CompilerImpl(
-      compilerInput,
-      compilerOutput,
-      compilerDiagnostics,
-      compilerOptions.libraryRoot,
-      compilerOptions.packageRoot,
-      compilerOptions.options,
-      compilerOptions.environment,
-      compilerOptions.packageConfig,
-      compilerOptions.packagesDiscoveryProvider);
+      compilerInput, compilerOutput, compilerDiagnostics, compilerOptions);
   return compiler.run(compilerOptions.entryPoint).then((bool success) {
     return new CompilationResult(compiler, isSuccess: success);
   });
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index 73bbc60..bfadc5b 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -9,56 +9,28 @@
 
 import 'package:package_config/packages.dart';
 import 'package:package_config/packages_file.dart' as pkgs;
-import 'package:package_config/src/packages_impl.dart' show
-    MapPackages,
-    NonFilePackagesDirectoryPackages;
-import 'package:package_config/src/util.dart' show
-    checkValidPackageUri;
+import 'package:package_config/src/packages_impl.dart'
+    show MapPackages, NonFilePackagesDirectoryPackages;
+import 'package:package_config/src/util.dart' show checkValidPackageUri;
 
 import '../compiler_new.dart' as api;
-import 'commandline_options.dart';
 import 'common.dart';
-import 'common/tasks.dart' show
-    GenericTask;
+import 'common/tasks.dart' show GenericTask;
 import 'compiler.dart';
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticOptions;
-import 'diagnostics/messages.dart' show
-    Message;
+import 'diagnostics/messages.dart' show Message;
 import 'elements/elements.dart' as elements;
+import 'environment.dart';
 import 'io/source_file.dart';
+import 'options.dart' show CompilerOptions;
 import 'platform_configuration.dart' as platform_configuration;
 import 'script.dart';
 
-const bool forceIncrementalSupport =
-    const bool.fromEnvironment('DART2JS_EXPERIMENTAL_INCREMENTAL_SUPPORT');
-
-/// For every 'dart:' library, a corresponding environment variable is set
-/// to "true". The environment variable's name is the concatenation of
-/// this prefix and the name (without the 'dart:'.
-///
-/// For example 'dart:html' has the environment variable 'dart.library.html' set
-/// to "true".
-const String dartLibraryEnvironmentPrefix = 'dart.library.';
-
-/// Locations of the platform descriptor files relative to the library root.
-const String _clientPlatform = "lib/dart_client.platform";
-const String _serverPlatform = "lib/dart_server.platform";
-const String _sharedPlatform = "lib/dart_shared.platform";
-const String _dart2dartPlatform = "lib/dart2dart.platform";
-
 /// Implements the [Compiler] using a [api.CompilerInput] for supplying the
 /// sources.
 class CompilerImpl extends Compiler {
   api.CompilerInput provider;
   api.CompilerDiagnostics handler;
-  final Uri platformConfigUri;
-  final Uri packageConfig;
-  final Uri packageRoot;
-  final api.PackagesDiscoveryProvider packagesDiscoveryProvider;
   Packages packages;
-  List<String> options;
-  Map<String, dynamic> environment;
   bool mockableLibraryUsed = false;
 
   /// A mapping of the dart: library-names to their location.
@@ -70,179 +42,21 @@
   GenericTask userProviderTask;
   GenericTask userPackagesDiscoveryTask;
 
-  Uri get libraryRoot => platformConfigUri.resolve(".");
+  Uri get libraryRoot => options.platformConfigUri.resolve(".");
 
-  CompilerImpl(this.provider,
-           api.CompilerOutput outputProvider,
-           this.handler,
-           Uri libraryRoot,
-           this.packageRoot,
-           List<String> options,
-           this.environment,
-           [this.packageConfig,
-            this.packagesDiscoveryProvider])
-      : this.options = options,
-        this.platformConfigUri = resolvePlatformConfig(libraryRoot, options),
-        super(
+  CompilerImpl(this.provider, api.CompilerOutput outputProvider, this.handler,
+      CompilerOptions options)
+      : super(
+            options: options,
             outputProvider: outputProvider,
-            enableTypeAssertions: hasOption(options, Flags.enableCheckedMode),
-            enableUserAssertions: hasOption(options, Flags.enableCheckedMode),
-            trustTypeAnnotations:
-                hasOption(options, Flags.trustTypeAnnotations),
-            trustPrimitives:
-                hasOption(options, Flags.trustPrimitives),
-            trustJSInteropTypeAnnotations:
-                hasOption(options, Flags.trustJSInteropTypeAnnotations),
-            enableMinification: hasOption(options, Flags.minify),
-            useFrequencyNamer:
-                !hasOption(options, Flags.noFrequencyBasedMinification),
-            preserveUris: hasOption(options, Flags.preserveUris),
-            enableNativeLiveTypeAnalysis:
-                !hasOption(options, Flags.disableNativeLiveTypeAnalysis),
-            emitJavaScript: !(hasOption(options, '--output-type=dart') ||
-                              hasOption(options, '--output-type=dart-multi')),
-            dart2dartMultiFile: hasOption(options, '--output-type=dart-multi'),
-            generateSourceMap: !hasOption(options, Flags.noSourceMaps),
-            analyzeAllFlag: hasOption(options, Flags.analyzeAll),
-            analyzeOnly: hasOption(options, Flags.analyzeOnly),
-            analyzeMain: hasOption(options, Flags.analyzeMain),
-            analyzeSignaturesOnly:
-                hasOption(options, Flags.analyzeSignaturesOnly),
-            strips: extractCsvOption(options, '--force-strip='),
-            disableTypeInferenceFlag:
-                hasOption(options, Flags.disableTypeInference),
-            preserveComments: hasOption(options, Flags.preserveComments),
-            useCpsIr: hasOption(options, Flags.useCpsIr),
-            verbose: hasOption(options, Flags.verbose),
-            sourceMapUri: extractUriOption(options, '--source-map='),
-            outputUri: extractUriOption(options, '--out='),
-            deferredMapUri: extractUriOption(options, '--deferred-map='),
-            dumpInfo: hasOption(options, Flags.dumpInfo),
-            buildId: extractStringOption(
-                options, '--build-id=',
-                "build number could not be determined"),
-            useContentSecurityPolicy:
-              hasOption(options, Flags.useContentSecurityPolicy),
-            useStartupEmitter: hasOption(options, Flags.fastStartup),
-            enableConditionalDirectives:
-                hasOption(options, Flags.conditionalDirectives),
-            hasIncrementalSupport:
-                forceIncrementalSupport ||
-                hasOption(options, Flags.incrementalSupport),
-            diagnosticOptions: new DiagnosticOptions(
-                suppressWarnings: hasOption(options, Flags.suppressWarnings),
-                fatalWarnings: hasOption(options, Flags.fatalWarnings),
-                suppressHints: hasOption(options, Flags.suppressHints),
-                terseDiagnostics: hasOption(options, Flags.terse),
-                shownPackageWarnings: extractOptionalCsvOption(
-                      options, Flags.showPackageWarnings)),
-            enableExperimentalMirrors:
-                hasOption(options, Flags.enableExperimentalMirrors),
-            enableAssertMessage:
-                hasOption(options, Flags.enableAssertMessage),
-            generateCodeWithCompileTimeErrors:
-                hasOption(options, Flags.generateCodeWithCompileTimeErrors),
-            testMode: hasOption(options, Flags.testMode),
-            allowNativeExtensions:
-                hasOption(options, Flags.allowNativeExtensions)) {
+            environment: new _Environment(options.environment)) {
+    _Environment env = environment;
+    env.compiler = this;
     tasks.addAll([
-        userHandlerTask = new GenericTask('Diagnostic handler', this),
-        userProviderTask = new GenericTask('Input provider', this),
-        userPackagesDiscoveryTask =
-            new GenericTask('Package discovery', this),
+      userHandlerTask = new GenericTask('Diagnostic handler', this),
+      userProviderTask = new GenericTask('Input provider', this),
+      userPackagesDiscoveryTask = new GenericTask('Package discovery', this),
     ]);
-    if (libraryRoot == null) {
-      throw new ArgumentError("[libraryRoot] is null.");
-    }
-    if (!libraryRoot.path.endsWith("/")) {
-      throw new ArgumentError("[libraryRoot] must end with a /.");
-    }
-    if (packageRoot != null && packageConfig != null) {
-      throw new ArgumentError("Only one of [packageRoot] or [packageConfig] "
-                              "may be given.");
-    }
-    if (packageRoot != null && !packageRoot.path.endsWith("/")) {
-      throw new ArgumentError("[packageRoot] must end with a /.");
-    }
-    if (!analyzeOnly) {
-      if (allowNativeExtensions) {
-        throw new ArgumentError(
-            "${Flags.allowNativeExtensions} is only supported in combination "
-            "with ${Flags.analyzeOnly}");
-      }
-    }
-  }
-
-  static String extractStringOption(List<String> options,
-                                    String prefix,
-                                    String defaultValue) {
-    for (String option in options) {
-      if (option.startsWith(prefix)) {
-        return option.substring(prefix.length);
-      }
-    }
-    return defaultValue;
-  }
-
-  static Uri extractUriOption(List<String> options, String prefix) {
-    var option = extractStringOption(options, prefix, null);
-    return (option == null) ? null : Uri.parse(option);
-  }
-
-  // CSV: Comma separated values.
-  static List<String> extractCsvOption(List<String> options, String prefix) {
-    for (String option in options) {
-      if (option.startsWith(prefix)) {
-        return option.substring(prefix.length).split(',');
-      }
-    }
-    return const <String>[];
-  }
-
-  /// Extract list of comma separated values 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.
-  static List<String> extractOptionalCsvOption(
-      List<String> options, String flag) {
-    String prefix = '$flag=';
-    for (String option in options) {
-      if (option == flag) {
-        return const <String>[];
-      }
-      if (option.startsWith(flag)) {
-        return option.substring(prefix.length).split(',');
-      }
-    }
-    return null;
-  }
-
-  static Uri resolvePlatformConfig(Uri libraryRoot,
-                                   List<String> options) {
-    String platformConfigPath =
-        extractStringOption(options, "--platform-config=", null);
-    if (platformConfigPath != null) {
-      return libraryRoot.resolve(platformConfigPath);
-    } else if (hasOption(options, '--output-type=dart')) {
-      return libraryRoot.resolve(_dart2dartPlatform);
-    } else {
-      Iterable<String> categories = extractCsvOption(options, '--categories=');
-      if (categories.length == 0) {
-        return libraryRoot.resolve(_clientPlatform);
-      }
-      assert(categories.length <= 2);
-      if (categories.contains("Client")) {
-        if (categories.contains("Server")) {
-          return libraryRoot.resolve(_sharedPlatform);
-        }
-        return libraryRoot.resolve(_clientPlatform);
-      }
-      assert(categories.contains("Server"));
-      return libraryRoot.resolve(_serverPlatform);
-    }
-  }
-
-  static bool hasOption(List<String> options, String option) {
-    return options.indexOf(option) >= 0;
   }
 
   void log(message) {
@@ -252,7 +66,7 @@
 
   /// See [Compiler.translateResolvedUri].
   Uri translateResolvedUri(elements.LibraryElement importingLibrary,
-                           Uri resolvedUri, Spannable spannable) {
+      Uri resolvedUri, Spannable spannable) {
     if (resolvedUri.scheme == 'dart') {
       return translateDartUri(importingLibrary, resolvedUri, spannable);
     }
@@ -262,11 +76,11 @@
   /**
    * Reads the script designated by [readableUri].
    */
-  Future<Script> readScript(Spannable node, Uri readableUri) {
+  Future<Script> readScript(Uri readableUri, [Spannable node]) {
     if (!readableUri.isAbsolute) {
       if (node == null) node = NO_LOCATION_SPANNABLE;
-      reporter.internalError(node,
-          'Relative uri $readableUri provided to readScript(Uri).');
+      reporter.internalError(
+          node, 'Relative uri $readableUri provided to readScript(Uri).');
     }
 
     // We need to store the current element since we are reporting read errors
@@ -281,24 +95,21 @@
             {'uri': readableUri, 'exception': exception});
       } else {
         reporter.withCurrentElement(element, () {
-          reporter.reportErrorMessage(
-              node,
-              MessageKind.READ_SCRIPT_ERROR,
+          reporter.reportErrorMessage(node, MessageKind.READ_SCRIPT_ERROR,
               {'uri': readableUri, 'exception': exception});
         });
       }
     }
 
     Uri resourceUri = translateUri(node, readableUri);
-    if (resourceUri == null) return synthesizeScript(node, readableUri);
+    if (resourceUri == null) return _synthesizeScript(readableUri);
     if (resourceUri.scheme == 'dart-ext') {
-      if (!allowNativeExtensions) {
+      if (!options.allowNativeExtensions) {
         reporter.withCurrentElement(element, () {
-          reporter.reportErrorMessage(
-              node, MessageKind.DART_EXT_NOT_SUPPORTED);
+          reporter.reportErrorMessage(node, MessageKind.DART_EXT_NOT_SUPPORTED);
         });
       }
-      return synthesizeScript(node, readableUri);
+      return _synthesizeScript(readableUri);
     }
 
     // TODO(johnniwinther): Wrap the result from [provider] in a specialized
@@ -312,7 +123,7 @@
         sourceFile = new StringSourceFile.fromUri(resourceUri, data);
       } else {
         String message = "Expected a 'String' or a 'List<int>' from the input "
-                         "provider, but got: ${Error.safeToString(data)}.";
+            "provider, but got: ${Error.safeToString(data)}.";
         reportReadError(message);
       }
       // We use [readableUri] as the URI for the script since need to preserve
@@ -322,18 +133,12 @@
       return new Script(readableUri, resourceUri, sourceFile);
     }).catchError((error) {
       reportReadError(error);
-      return synthesizeScript(node, readableUri);
+      return _synthesizeScript(readableUri);
     });
   }
 
-  Future<Script> synthesizeScript(Spannable node, Uri readableUri) {
-    return new Future.value(
-        new Script(
-            readableUri, readableUri,
-            new StringSourceFile.fromUri(
-                readableUri,
-                "// Synthetic source file generated for '$readableUri'."),
-            isSynthesized: true));
+  Future<Script> _synthesizeScript(Uri readableUri) {
+    return new Future.value(new Script.synthetic(readableUri));
   }
 
   /**
@@ -341,16 +146,12 @@
    *
    * See [LibraryLoader] for terminology on URIs.
    */
-  Uri translateUri(Spannable node, Uri readableUri) {
-    switch (readableUri.scheme) {
-      case 'package': return translatePackageUri(node, readableUri);
-      default: return readableUri;
-    }
-  }
+  Uri translateUri(Spannable node, Uri uri) =>
+      uri.scheme == 'package' ? translatePackageUri(node, uri) : uri;
 
   /// Translates "resolvedUri" with scheme "dart" to a [uri] resolved relative
-  /// to [platformConfigUri] according to the information in the file at
-  /// [platformConfigUri].
+  /// to `options.platformConfigUri` according to the information in the file at
+  /// `options.platformConfigUri`.
   ///
   /// Returns null and emits an error if the library could not be found or
   /// imported into [importingLibrary].
@@ -358,19 +159,16 @@
   /// Internal libraries (whose name starts with '_') can be only resolved if
   /// [importingLibrary] is a platform or patch library.
   Uri translateDartUri(elements.LibraryElement importingLibrary,
-                       Uri resolvedUri, Spannable spannable) {
-
+      Uri resolvedUri, Spannable spannable) {
     Uri location = lookupLibraryUri(resolvedUri.path);
 
     if (location == null) {
-      reporter.reportErrorMessage(
-          spannable,
-          MessageKind.LIBRARY_NOT_FOUND,
+      reporter.reportErrorMessage(spannable, MessageKind.LIBRARY_NOT_FOUND,
           {'resolvedUri': resolvedUri});
       return null;
     }
 
-    if (resolvedUri.path.startsWith('_')  ) {
+    if (resolvedUri.path.startsWith('_')) {
       bool allowInternalLibraryAccess = importingLibrary != null &&
           (importingLibrary.isPlatformLibrary ||
               importingLibrary.isPatch ||
@@ -380,14 +178,12 @@
       if (!allowInternalLibraryAccess) {
         if (importingLibrary != null) {
           reporter.reportErrorMessage(
-              spannable,
-              MessageKind.INTERNAL_LIBRARY_FROM,
-              {'resolvedUri': resolvedUri,
-                'importingUri': importingLibrary.canonicalUri});
+              spannable, MessageKind.INTERNAL_LIBRARY_FROM, {
+            'resolvedUri': resolvedUri,
+            'importingUri': importingLibrary.canonicalUri
+          });
         } else {
-          reporter.reportErrorMessage(
-              spannable,
-              MessageKind.INTERNAL_LIBRARY,
+          reporter.reportErrorMessage(spannable, MessageKind.INTERNAL_LIBRARY,
               {'resolvedUri': resolvedUri});
           registerDisallowedLibraryUse(resolvedUri);
         }
@@ -396,16 +192,13 @@
     }
 
     if (location.scheme == "unsupported") {
-      reporter.reportErrorMessage(
-          spannable,
-          MessageKind.LIBRARY_NOT_SUPPORTED,
+      reporter.reportErrorMessage(spannable, MessageKind.LIBRARY_NOT_SUPPORTED,
           {'resolvedUri': resolvedUri});
       registerDisallowedLibraryUse(resolvedUri);
       return null;
     }
 
-    if (resolvedUri.path == 'html' ||
-        resolvedUri.path == 'io') {
+    if (resolvedUri.path == 'html' || resolvedUri.path == 'io') {
       // TODO(ahe): Get rid of mockableLibraryUsed when test.dart
       // supports this use case better.
       mockableLibraryUsed = true;
@@ -417,24 +210,18 @@
     try {
       checkValidPackageUri(uri);
     } on ArgumentError catch (e) {
-      reporter.reportErrorMessage(
-          node,
-          MessageKind.INVALID_PACKAGE_URI,
+      reporter.reportErrorMessage(node, MessageKind.INVALID_PACKAGE_URI,
           {'uri': uri, 'exception': e.message});
       return null;
     }
-    return packages.resolve(uri,
-        notFound: (Uri notFound) {
-          reporter.reportErrorMessage(
-              node,
-              MessageKind.LIBRARY_NOT_FOUND,
-              {'resolvedUri': uri});
-          return null;
-        });
+    return packages.resolve(uri, notFound: (Uri notFound) {
+      reporter.reportErrorMessage(
+          node, MessageKind.LIBRARY_NOT_FOUND, {'resolvedUri': uri});
+      return null;
+    });
   }
 
-  Future<elements.LibraryElement> analyzeUri(
-      Uri uri,
+  Future<elements.LibraryElement> analyzeUri(Uri uri,
       {bool skipLibraryWithPartOfTag: true}) {
     List<Future> setupFutures = new List<Future>();
     if (sdkLibraries == null) {
@@ -444,39 +231,37 @@
       setupFutures.add(setupPackages(uri));
     }
     return Future.wait(setupFutures).then((_) {
-      return super.analyzeUri(uri,
-          skipLibraryWithPartOfTag: skipLibraryWithPartOfTag);
+      return super
+          .analyzeUri(uri, skipLibraryWithPartOfTag: skipLibraryWithPartOfTag);
     });
   }
 
   Future setupPackages(Uri uri) {
-    if (packageRoot != null) {
+    if (options.packageRoot != null) {
       // Use "non-file" packages because the file version requires a [Directory]
       // and we can't depend on 'dart:io' classes.
-      packages = new NonFilePackagesDirectoryPackages(packageRoot);
-    } else if (packageConfig != null) {
-      return callUserProvider(packageConfig).then((packageConfigContents) {
-        if (packageConfigContents is String) {
-          packageConfigContents = UTF8.encode(packageConfigContents);
+      packages = new NonFilePackagesDirectoryPackages(options.packageRoot);
+    } else if (options.packageConfig != null) {
+      return callUserProvider(options.packageConfig).then((configContents) {
+        if (configContents is String) {
+          configContents = UTF8.encode(configContents);
         }
         // The input provider may put a trailing 0 byte when it reads a source
         // file, which confuses the package config parser.
-        if (packageConfigContents.length > 0 &&
-            packageConfigContents.last == 0) {
-          packageConfigContents = packageConfigContents.sublist(
-              0, packageConfigContents.length - 1);
+        if (configContents.length > 0 && configContents.last == 0) {
+          configContents = configContents.sublist(0, configContents.length - 1);
         }
         packages =
-            new MapPackages(pkgs.parse(packageConfigContents, packageConfig));
+            new MapPackages(pkgs.parse(configContents, options.packageConfig));
       }).catchError((error) {
         reporter.reportErrorMessage(
             NO_LOCATION_SPANNABLE,
             MessageKind.INVALID_PACKAGE_CONFIG,
-            {'uri': packageConfig, 'exception': error});
+            {'uri': options.packageConfig, 'exception': error});
         packages = Packages.noPackages;
       });
     } else {
-      if (packagesDiscoveryProvider == null) {
+      if (options.packagesDiscoveryProvider == null) {
         packages = Packages.noPackages;
       } else {
         return callUserPackagesDiscovery(uri).then((p) {
@@ -489,7 +274,8 @@
 
   Future<Null> setupSdk() {
     if (sdkLibraries == null) {
-      return platform_configuration.load(platformConfigUri, provider)
+      return platform_configuration
+          .load(options.platformConfigUri, provider)
           .then((Map<String, Uri> mapping) {
         sdkLibraries = mapping;
       });
@@ -501,7 +287,7 @@
   }
 
   Future<bool> run(Uri uri) {
-    log('Using platform configuration at ${platformConfigUri}');
+    log('Using platform configuration at ${options.platformConfigUri}');
 
     return Future.wait([setupSdk(), setupPackages(uri)]).then((_) {
       assert(sdkLibraries != null);
@@ -529,16 +315,15 @@
   }
 
   void reportDiagnostic(DiagnosticMessage message,
-                        List<DiagnosticMessage> infos,
-                        api.Diagnostic kind) {
+      List<DiagnosticMessage> infos, api.Diagnostic kind) {
     _reportDiagnosticMessage(message, kind);
     for (DiagnosticMessage info in infos) {
       _reportDiagnosticMessage(info, api.Diagnostic.INFO);
     }
   }
 
-  void _reportDiagnosticMessage(DiagnosticMessage diagnosticMessage,
-                                api.Diagnostic kind) {
+  void _reportDiagnosticMessage(
+      DiagnosticMessage diagnosticMessage, api.Diagnostic kind) {
     // [:span.uri:] might be [:null:] in case of a [Script] with no [uri]. For
     // instance in the [Types] constructor in typechecker.dart.
     SourceSpan span = diagnosticMessage.sourceSpan;
@@ -551,75 +336,76 @@
     }
   }
 
-  bool get isMockCompilation {
-    return mockableLibraryUsed
-      && (options.indexOf(Flags.allowMockCompilation) != -1);
-  }
+  bool get isMockCompilation =>
+      mockableLibraryUsed && options.allowMockCompilation;
 
   void callUserHandler(Message message, Uri uri, int begin, int end,
-                       String text, api.Diagnostic kind) {
-    try {
-      userHandlerTask.measure(() {
-        handler.report(message, uri, begin, end, text, kind);
-      });
-    } catch (ex, s) {
-      diagnoseCrashInUserCode(
-          'Uncaught exception in diagnostic handler', ex, s);
-      rethrow;
-    }
+      String text, api.Diagnostic kind) {
+    userHandlerTask.measure(() {
+      handler.report(message, uri, begin, end, text, kind);
+    });
   }
 
   Future callUserProvider(Uri uri) {
-    try {
-      return userProviderTask.measure(() => provider.readFromUri(uri));
-    } catch (ex, s) {
-      diagnoseCrashInUserCode('Uncaught exception in input provider', ex, s);
-      rethrow;
-    }
+    return userProviderTask.measure(() => provider.readFromUri(uri));
   }
 
   Future<Packages> callUserPackagesDiscovery(Uri uri) {
-    try {
-      return userPackagesDiscoveryTask.measure(
-                 () => packagesDiscoveryProvider(uri));
-    } catch (ex, s) {
-      diagnoseCrashInUserCode('Uncaught exception in package discovery', ex, s);
-      rethrow;
-    }
+    return userPackagesDiscoveryTask
+        .measure(() => options.packagesDiscoveryProvider(uri));
   }
 
-  fromEnvironment(String name) {
-    assert(invariant(NO_LOCATION_SPANNABLE,
-        sdkLibraries != null, message: "setupSdk() has not been run"));
+  Uri lookupLibraryUri(String libraryName) {
+    assert(invariant(NO_LOCATION_SPANNABLE, sdkLibraries != null,
+        message: "setupSdk() has not been run"));
+    return sdkLibraries[libraryName];
+  }
 
-    var result = environment[name];
-    if (result != null || environment.containsKey(name)) return result;
-    if (!name.startsWith(dartLibraryEnvironmentPrefix)) return null;
+  Uri resolvePatchUri(String libraryName) {
+    return backend.resolvePatchUri(libraryName, options.platformConfigUri);
+  }
+}
 
-    String libraryName = name.substring(dartLibraryEnvironmentPrefix.length);
+class _Environment implements Environment {
+  final Map<String, String> definitions;
+
+  // TODO(sigmund): break the circularity here: Compiler needs an environment to
+  // intialize the library loader, but the environment here needs to know about
+  // how the sdk is set up and about whether the backend supports mirrors.
+  CompilerImpl compiler;
+
+  _Environment(this.definitions);
+
+  String valueOf(String name) {
+    assert(invariant(NO_LOCATION_SPANNABLE, compiler.sdkLibraries != null,
+        message: "setupSdk() has not been run"));
+
+    var result = definitions[name];
+    if (result != null || definitions.containsKey(name)) return result;
+    if (!name.startsWith(_dartLibraryEnvironmentPrefix)) return null;
+
+    String libraryName = name.substring(_dartLibraryEnvironmentPrefix.length);
 
     // Private libraries are not exposed to the users.
     if (libraryName.startsWith("_")) return null;
 
-    if (sdkLibraries.containsKey(libraryName)) {
+    if (compiler.sdkLibraries.containsKey(libraryName)) {
       // Dart2js always "supports" importing 'dart:mirrors' but will abort
       // the compilation at a later point if the backend doesn't support
       // mirrors. In this case 'mirrors' should not be in the environment.
       if (libraryName == 'mirrors') {
-        return backend.supportsReflection ? "true" : null;
+        return compiler.backend.supportsReflection ? "true" : null;
       }
       return "true";
     }
     return null;
   }
-
-  Uri lookupLibraryUri(String libraryName) {
-    assert(invariant(NO_LOCATION_SPANNABLE,
-        sdkLibraries != null, message: "setupSdk() has not been run"));
-    return sdkLibraries[libraryName];
-  }
-
-  Uri resolvePatchUri(String libraryName) {
-    return backend.resolvePatchUri(libraryName, platformConfigUri);
-  }
 }
+
+/// For every 'dart:' library, a corresponding environment variable is set
+/// to "true". The environment variable's name is the concatenation of
+/// this prefix and the name (without the 'dart:'.
+///
+/// For example 'dart:html' has the environment variable 'dart.library.html' set
+/// to "true".
+const String _dartLibraryEnvironmentPrefix = 'dart.library.';
diff --git a/pkg/compiler/lib/src/cache_strategy.dart b/pkg/compiler/lib/src/cache_strategy.dart
index 2a0a8f0..3136a18 100644
--- a/pkg/compiler/lib/src/cache_strategy.dart
+++ b/pkg/compiler/lib/src/cache_strategy.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 'dart:collection' show
-    HashMap,
-    HashSet;
+import 'dart:collection' show HashMap, HashSet;
 
 /**
  * Helper class for allocating sets and maps appropriate for caching objects
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index d015b7c..2d0ee99 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -5,31 +5,22 @@
 library closureToClassMapper;
 
 import 'common.dart';
-import 'common/names.dart' show
-    Identifiers;
-import 'common/resolution.dart' show
-    Parsing,
-    Resolution;
-import 'common/tasks.dart' show
-    CompilerTask;
-import 'compiler.dart' show
-    Compiler;
+import 'common/names.dart' show Identifiers;
+import 'common/resolution.dart' show Parsing, Resolution;
+import 'common/tasks.dart' show CompilerTask;
+import 'compiler.dart' show Compiler;
 import 'constants/expressions.dart';
 import 'dart_types.dart';
 import 'elements/elements.dart';
-import 'elements/modelx.dart' show
-    BaseFunctionElementX,
-    ClassElementX,
-    ElementX,
-    LocalFunctionElementX;
+import 'elements/modelx.dart'
+    show BaseFunctionElementX, ClassElementX, ElementX, LocalFunctionElementX;
 import 'elements/visitor.dart' show ElementVisitor;
 import 'js_backend/js_backend.dart' show JavaScriptBackend;
 import 'resolution/tree_elements.dart' show TreeElements;
 import 'tokens/token.dart' show Token;
 import 'tree/tree.dart';
 import 'util/util.dart';
-import 'universe/universe.dart' show
-    Universe;
+import 'universe/universe.dart' show Universe;
 
 class ClosureTask extends CompilerTask {
   Map<Node, ClosureClassMap> closureMappingCache;
@@ -39,9 +30,8 @@
 
   String get name => "Closure Simplifier";
 
-  ClosureClassMap computeClosureToClassMapping(Element element,
-                                               Node node,
-                                               TreeElements elements) {
+  ClosureClassMap computeClosureToClassMapping(
+      Element element, Node node, TreeElements elements) {
     return measure(() {
       ClosureClassMap cached = closureMappingCache[node];
       if (cached != null) return cached;
@@ -107,9 +97,7 @@
   /// The [BoxLocal] or [LocalElement] being accessed through the field.
   final Local local;
 
-  ClosureFieldElement(String name,
-                      this.local,
-                      ClosureClassElement enclosing)
+  ClosureFieldElement(String name, this.local, ClosureClassElement enclosing)
       : super(name, ElementKind.FIELD, enclosing);
 
   /// Use [closureClass] instead.
@@ -128,8 +116,8 @@
   bool get hasNode => false;
 
   Node get node {
-    throw new SpannableAssertionFailure(local,
-        'Should not access node of ClosureFieldElement.');
+    throw new SpannableAssertionFailure(
+        local, 'Should not access node of ClosureFieldElement.');
   }
 
   bool get hasResolvedAst => hasTreeElements;
@@ -139,8 +127,8 @@
   }
 
   Expression get initializer {
-    throw new SpannableAssertionFailure(local,
-        'Should not access initializer of ClosureFieldElement.');
+    throw new SpannableAssertionFailure(
+        local, 'Should not access initializer of ClosureFieldElement.');
   }
 
   bool get isInstanceMember => true;
@@ -177,6 +165,7 @@
   DartType rawType;
   DartType thisType;
   FunctionType callType;
+
   /// Node that corresponds to this closure, used for source position.
   final FunctionExpression node;
 
@@ -187,18 +176,17 @@
 
   final List<ClosureFieldElement> _closureFields = <ClosureFieldElement>[];
 
-  ClosureClassElement(this.node,
-                      String name,
-                      Compiler compiler,
-                      LocalFunctionElement closure)
+  ClosureClassElement(
+      this.node, String name, Compiler compiler, LocalFunctionElement closure)
       : this.methodElement = closure,
-        super(name,
-              closure.compilationUnit,
-              // By assigning a fresh class-id we make sure that the hashcode
-              // is unique, but also emit closure classes after all other
-              // classes (since the emitter sorts classes by their id).
-              compiler.getNextFreeClassId(),
-              STATE_DONE) {
+        super(
+            name,
+            closure.compilationUnit,
+            // By assigning a fresh class-id we make sure that the hashcode
+            // is unique, but also emit closure classes after all other
+            // classes (since the emitter sorts classes by their id).
+            compiler.getNextFreeId(),
+            STATE_DONE) {
     JavaScriptBackend backend = compiler.backend;
     ClassElement superclass = methodElement.isInstanceMember
         ? backend.helpers.boundClosureClass
@@ -251,12 +239,14 @@
 // TODO(ngeoffray, ahe): These classes continuously cause problems.  We need to
 // find a more general solution.
 class BoxFieldElement extends ElementX
-    implements TypedElement, CapturedVariable, FieldElement,
+    implements
+        TypedElement,
+        CapturedVariable,
+        FieldElement,
         PrivatelyNamedJSEntity {
   final BoxLocal box;
 
-  BoxFieldElement(String name, this.variableElement,
-      BoxLocal box)
+  BoxFieldElement(String name, this.variableElement, BoxLocal box)
       : this.box = box,
         super(name, ElementKind.FIELD, box.executableContext);
 
@@ -309,6 +299,7 @@
 /// A local variable used encode the direct (uncaptured) references to [this].
 class ThisLocal extends Local {
   final ExecutableElement executableContext;
+  final hashCode = ++ElementX.elementHashCode;
 
   ThisLocal(this.executableContext);
 
@@ -322,9 +313,8 @@
     implements MethodElement {
   final LocalFunctionElement expression;
 
-  SynthesizedCallMethodElementX(String name,
-                                LocalFunctionElementX other,
-                                ClosureClassElement enclosing)
+  SynthesizedCallMethodElementX(
+      String name, LocalFunctionElementX other, ClosureClassElement enclosing)
       : expression = other,
         super(name, other.kind, other.modifiers, enclosing) {
     asyncMarker = other.asyncMarker;
@@ -352,6 +342,10 @@
   }
 
   Element get analyzableElement => closureClass.methodElement.analyzableElement;
+
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitMethodElement(this, arg);
+  }
 }
 
 // The box-element for a scope, and the captured variables that need to be
@@ -373,8 +367,8 @@
     return capturedVariables.containsKey(variable);
   }
 
-  void forEachCapturedVariable(f(LocalVariableElement variable,
-                                 BoxFieldElement boxField)) {
+  void forEachCapturedVariable(
+      f(LocalVariableElement variable, BoxFieldElement boxField)) {
     capturedVariables.forEach(f);
   }
 }
@@ -411,10 +405,8 @@
   /// TODO(johnniwinter): Add variables to this only if the variable is mutated.
   final Set<Local> variablesUsedInTryOrGenerator = new Set<Local>();
 
-  ClosureClassMap(this.closureElement,
-                  this.closureClassElement,
-                  this.callElement,
-                  this.thisLocal);
+  ClosureClassMap(this.closureElement, this.closureClassElement,
+      this.callElement, this.thisLocal);
 
   void addFreeVariable(Local element) {
     assert(freeVariableMap[element] == null);
@@ -427,8 +419,7 @@
     return freeVariableMap.containsKey(element);
   }
 
-  void forEachFreeVariable(f(Local variable,
-                             CapturedVariable field)) {
+  void forEachFreeVariable(f(Local variable, CapturedVariable field)) {
     freeVariableMap.forEach(f);
   }
 
@@ -452,8 +443,7 @@
     return capturingScopesBox(variable);
   }
 
-  void forEachCapturedVariable(void f(Local variable,
-                                      CapturedVariable field)) {
+  void forEachCapturedVariable(void f(Local variable, CapturedVariable field)) {
     freeVariableMap.forEach((variable, copy) {
       if (variable is BoxLocal) return;
       f(variable, copy);
@@ -463,8 +453,8 @@
     });
   }
 
-  void forEachBoxedVariable(void f(LocalVariableElement local,
-                                   BoxFieldElement field)) {
+  void forEachBoxedVariable(
+      void f(LocalVariableElement local, BoxFieldElement field)) {
     freeVariableMap.forEach((variable, copy) {
       if (!isVariableBoxed(variable)) return;
       f(variable, copy);
@@ -516,9 +506,7 @@
 
   bool insideClosure = false;
 
-  ClosureTranslator(this.compiler,
-                    this.elements,
-                    this.closureMappingCache);
+  ClosureTranslator(this.compiler, this.elements, this.closureMappingCache);
 
   DiagnosticReporter get reporter => compiler.reporter;
 
@@ -563,8 +551,7 @@
     _capturedVariableMapping[variable] = null;
   }
 
-  void setCapturedVariableBoxField(Local variable,
-      BoxFieldElement boxField) {
+  void setCapturedVariableBoxField(Local variable, BoxFieldElement boxField) {
     assert(isCapturedVariable(variable));
     _capturedVariableMapping[variable] = boxField;
   }
@@ -586,9 +573,10 @@
   }
 
   void translateLazyInitializer(VariableElement element,
-                                VariableDefinitions node,
-                                Expression initializer) {
-    visitInvokable(element, node, () { visit(initializer); });
+      VariableDefinitions node, Expression initializer) {
+    visitInvokable(element, node, () {
+      visit(initializer);
+    });
     updateClosures();
   }
 
@@ -622,8 +610,7 @@
         }
       });
       ClosureClassElement closureClass = data.closureClassElement;
-      assert(closureClass != null ||
-             (fieldCaptures.isEmpty && boxes.isEmpty));
+      assert(closureClass != null || (fieldCaptures.isEmpty && boxes.isEmpty));
 
       void addClosureField(Local local, String name) {
         ClosureFieldElement closureField =
@@ -669,7 +656,7 @@
     // the factory.
     bool inCurrentContext(Local variable) {
       return variable == executableContext ||
-             variable.executableContext == executableContext;
+          variable.executableContext == executableContext;
     }
 
     if (insideClosure && !inCurrentContext(variable)) {
@@ -714,8 +701,8 @@
       visit(node.type);
     }
     for (Link<Node> link = node.definitions.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       Node definition = link.head;
       LocalElement element = elements[definition];
       assert(element != null);
@@ -743,7 +730,8 @@
     // TODO(karlklose,johnniwinther): if the type is null, the annotation is
     // from a parameter which has been analyzed before the method has been
     // resolved and the result has been thrown away.
-    if (compiler.enableTypeAssertions && type != null &&
+    if (compiler.options.enableTypeAssertions &&
+        type != null &&
         type.containsTypeVariables) {
       if (insideClosure && member.isFactoryConstructor) {
         // This is a closure in a factory constructor.  Since there is no
@@ -770,8 +758,7 @@
     } else {
       Element element = elements[node];
       if (element != null && element.isTypeVariable) {
-        if (outermostElement.isConstructor ||
-            outermostElement.isField) {
+        if (outermostElement.isConstructor || outermostElement.isField) {
           TypeVariableElement typeVariable = element;
           useTypeVariableAsLocal(typeVariable.type);
         } else {
@@ -791,7 +778,7 @@
       TypeVariableElement variable = element;
       analyzeType(variable.type);
     } else if (node.receiver == null &&
-               Elements.isInstanceSend(node, elements)) {
+        Elements.isInstanceSend(node, elements)) {
       registerNeedsThis();
     } else if (node.isSuperCall) {
       registerNeedsThis();
@@ -813,7 +800,7 @@
     Element element = elements[node];
     if (Elements.isLocal(element)) {
       mutatedVariables.add(element);
-      if (compiler.enableTypeAssertions) {
+      if (compiler.options.enableTypeAssertions) {
         TypedElement typedElement = element;
         analyzeTypeVariables(typedElement.type);
       }
@@ -843,8 +830,7 @@
     type.forEachTypeVariable((TypeVariableType typeVariable) {
       // Field initializers are inlined and access the type variable as
       // normal parameters.
-      if (!outermostElement.isField &&
-          !outermostElement.isConstructor) {
+      if (!outermostElement.isField && !outermostElement.isConstructor) {
         registerNeedsThis();
       } else {
         useTypeVariableAsLocal(typeVariable);
@@ -857,8 +843,7 @@
     if (type == null) return;
     if (outermostElement.isClassMember &&
         compiler.backend.classNeedsRti(outermostElement.enclosingClass)) {
-      if (outermostElement.isConstructor ||
-          outermostElement.isField) {
+      if (outermostElement.isConstructor || outermostElement.isField) {
         analyzeTypeVariables(type);
       } else if (outermostElement.isInstanceMember) {
         if (type.containsTypeVariables) {
@@ -953,8 +938,8 @@
           node.initializer.asVariableDefinitions();
       if (definitions == null) return;
       for (Link<Node> link = definitions.definitions.nodes;
-           !link.isEmpty;
-           link = link.tail) {
+          !link.isEmpty;
+          link = link.tail) {
         Node definition = link.head;
         LocalVariableElement element = elements[definition];
         // Non-mutated variables should not be boxed.  The mutatedVariables set
@@ -979,20 +964,20 @@
       parts = parts.prepend(ownName);
     }
     for (Element enclosingElement = element.enclosingElement;
-         enclosingElement != null &&
-             (enclosingElement.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY
-              || enclosingElement.kind == ElementKind.GENERATIVE_CONSTRUCTOR
-              || enclosingElement.kind == ElementKind.CLASS
-              || enclosingElement.kind == ElementKind.FUNCTION
-              || enclosingElement.kind == ElementKind.GETTER
-              || enclosingElement.kind == ElementKind.SETTER);
-         enclosingElement = enclosingElement.enclosingElement) {
+        enclosingElement != null &&
+            (enclosingElement.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY ||
+                enclosingElement.kind == ElementKind.GENERATIVE_CONSTRUCTOR ||
+                enclosingElement.kind == ElementKind.CLASS ||
+                enclosingElement.kind == ElementKind.FUNCTION ||
+                enclosingElement.kind == ElementKind.GETTER ||
+                enclosingElement.kind == ElementKind.SETTER);
+        enclosingElement = enclosingElement.enclosingElement) {
       // TODO(johnniwinther): Simplify computed names.
       if (enclosingElement.isGenerativeConstructor ||
           enclosingElement.isGenerativeConstructorBody ||
           enclosingElement.isFactoryConstructor) {
-        parts = parts.prepend(
-            Elements.reconstructConstructorName(enclosingElement));
+        parts = parts
+            .prepend(Elements.reconstructConstructorName(enclosingElement));
       } else {
         String surroundingName =
             Elements.operatorNameToIdentifier(enclosingElement.name);
@@ -1009,18 +994,16 @@
 
   JavaScriptBackend get backend => compiler.backend;
 
-  ClosureClassMap globalizeClosure(FunctionExpression node,
-                                   LocalFunctionElement element) {
+  ClosureClassMap globalizeClosure(
+      FunctionExpression node, LocalFunctionElement element) {
     String closureName = computeClosureName(element);
-    ClosureClassElement globalizedElement = new ClosureClassElement(
-        node, closureName, compiler, element);
+    ClosureClassElement globalizedElement =
+        new ClosureClassElement(node, closureName, compiler, element);
     // Extend [globalizedElement] as an instantiated class in the closed world.
-    compiler.world.registerClass(
-        globalizedElement, isDirectlyInstantiated: true);
-    FunctionElement callElement =
-        new SynthesizedCallMethodElementX(Identifiers.call,
-                                          element,
-                                          globalizedElement);
+    compiler.world
+        .registerClass(globalizedElement, isDirectlyInstantiated: true);
+    FunctionElement callElement = new SynthesizedCallMethodElementX(
+        Identifiers.call, element, globalizedElement);
     backend.maybeMarkClosureAsNeededForReflection(
         globalizedElement, callElement, element);
     MemberElement enclosing = element.memberContext;
@@ -1031,13 +1014,12 @@
     // function. It could be [null] if we are inside a static method.
     ThisLocal thisElement = closureData.thisLocal;
 
-    return new ClosureClassMap(element, globalizedElement,
-                               callElement, thisElement);
+    return new ClosureClassMap(
+        element, globalizedElement, callElement, thisElement);
   }
 
-  void visitInvokable(ExecutableElement element,
-                      Node node,
-                      void visitChildren()) {
+  void visitInvokable(
+      ExecutableElement element, Node node, void visitChildren()) {
     bool oldInsideClosure = insideClosure;
     Element oldFunctionElement = executableContext;
     ClosureClassMap oldClosureData = closureData;
@@ -1065,14 +1047,13 @@
       // escape the potential type variables used in that closure.
       if (element is FunctionElement &&
           (compiler.backend.methodNeedsRti(element) ||
-           compiler.enableTypeAssertions)) {
+              compiler.options.enableTypeAssertions)) {
         analyzeTypeVariables(type);
       }
 
       visitChildren();
     });
 
-
     ClosureClassMap savedClosureData = closureData;
     bool savedInsideClosure = insideClosure;
 
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index fdb8ca2..9c0c244 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -12,6 +12,7 @@
   static const String analyzeMain = '--analyze-main';
   static const String analyzeOnly = '--analyze-only';
   static const String analyzeSignaturesOnly = '--analyze-signatures-only';
+  static const String disableInlining = '--disable-inlining';
   static const String disableDiagnosticColors = '--disable-diagnostic-colors';
   static const String disableNativeLiveTypeAnalysis =
       '--disable-native-live-type-analysis';
@@ -44,11 +45,14 @@
       '--experimental-trust-js-interop-type-annotations';
   static const String useContentSecurityPolicy = '--csp';
   static const String useCpsIr = '--use-cps-ir';
+  static const String useNewSourceInfo = '--use-new-source-info';
   static const String verbose = '--verbose';
   static const String version = '--version';
 
-  // Experimental flags.
   static const String conditionalDirectives = '--conditional-directives';
+
+  // Experimental flags.
+  static const String genericMethodSyntax = '--generic-method-syntax';
 }
 
 class Option {
diff --git a/pkg/compiler/lib/src/common.dart b/pkg/compiler/lib/src/common.dart
index df3ad46..bf49907 100644
--- a/pkg/compiler/lib/src/common.dart
+++ b/pkg/compiler/lib/src/common.dart
@@ -6,20 +6,16 @@
 /// of phase or subfunctionality.
 library dart2js.common;
 
-export 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
-    DiagnosticReporter;
-export 'diagnostics/invariant.dart' show
-    assertDebugMode,
-    InternalErrorFunction,
-    invariant;
-export 'diagnostics/messages.dart' show
-    MessageKind;
-export 'diagnostics/source_span.dart' show
-    SourceSpan;
-export 'diagnostics/spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE,
-    NO_LOCATION_SPANNABLE,
-    Spannable,
-    SpannableAssertionFailure;
+export 'diagnostics/diagnostic_listener.dart'
+    show DiagnosticMessage, DiagnosticReporter;
+export 'diagnostics/invariant.dart'
+    show assertDebugMode, InternalErrorFunction, invariant;
+export 'diagnostics/messages.dart' show MessageKind;
+export 'diagnostics/source_span.dart' show SourceSpan;
+export 'diagnostics/spannable.dart'
+    show
+        CURRENT_ELEMENT_SPANNABLE,
+        NO_LOCATION_SPANNABLE,
+        Spannable,
+        SpannableAssertionFailure;
 export 'helpers/helpers.dart';
diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
index 3063616..71a8c82 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -7,72 +7,44 @@
 import 'dart:async' show Future;
 
 import '../common.dart';
-import '../common/codegen.dart' show
-    CodegenImpact;
-import '../common/resolution.dart' show
-    ResolutionImpact;
-import '../compiler.dart' show
-    Compiler;
-import '../compile_time_constants.dart' show
-    BackendConstantEnvironment,
-    ConstantCompilerTask;
-import '../constants/expressions.dart' show
-    ConstantExpression;
-import '../constants/constant_system.dart' show
-    ConstantSystem;
-import '../constants/values.dart' show
-    ConstantValue;
-import '../dart_types.dart' show
-    DartType,
-    InterfaceType;
-import '../elements/elements.dart' show
-    ClassElement,
-    ConstructorElement,
-    Element,
-    FunctionElement,
-    LibraryElement,
-    MetadataAnnotation,
-    MethodElement;
-import '../enqueue.dart' show
-    Enqueuer,
-    CodegenEnqueuer,
-    ResolutionEnqueuer;
-import '../io/code_output.dart' show
-    CodeBuffer;
-import '../io/source_information.dart' show
-    SourceInformationStrategy;
-import '../js_backend/backend_helpers.dart' as js_backend show
-    BackendHelpers;
-import '../js_backend/js_backend.dart' as js_backend show
-    JavaScriptBackend;
-import '../library_loader.dart' show
-    LibraryLoader,
-    LoadedLibraries;
-import '../native/native.dart' as native show
-    NativeEnqueuer,
-    maybeEnableNative;
-import '../patch_parser.dart' show
-    checkNativeAnnotation, checkJsInteropAnnotation;
-import '../resolution/tree_elements.dart' show
-    TreeElements;
-import '../tree/tree.dart' show
-    Node,
-    Send;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/world_impact.dart' show
-    ImpactStrategy,
-    WorldImpact;
+import '../common/codegen.dart' show CodegenImpact;
+import '../common/resolution.dart' show ResolutionImpact;
+import '../compiler.dart' show Compiler;
+import '../compile_time_constants.dart'
+    show BackendConstantEnvironment, ConstantCompilerTask;
+import '../constants/expressions.dart' show ConstantExpression;
+import '../constants/constant_system.dart' show ConstantSystem;
+import '../constants/values.dart' show ConstantValue;
+import '../dart_types.dart' show DartType, InterfaceType;
+import '../elements/elements.dart'
+    show
+        ClassElement,
+        ConstructorElement,
+        Element,
+        FunctionElement,
+        LibraryElement,
+        MetadataAnnotation,
+        MethodElement;
+import '../enqueue.dart' show Enqueuer, CodegenEnqueuer, ResolutionEnqueuer;
+import '../io/code_output.dart' show CodeBuffer;
+import '../io/source_information.dart' show SourceInformationStrategy;
+import '../js_backend/backend_helpers.dart' as js_backend show BackendHelpers;
+import '../js_backend/js_backend.dart' as js_backend show JavaScriptBackend;
+import '../library_loader.dart' show LibraryLoader, LoadedLibraries;
+import '../native/native.dart' as native show NativeEnqueuer, maybeEnableNative;
+import '../patch_parser.dart'
+    show checkNativeAnnotation, checkJsInteropAnnotation;
+import '../resolution/tree_elements.dart' show TreeElements;
+import '../serialization/serialization.dart'
+    show DeserializerPlugin, ObjectDecoder, ObjectEncoder, SerializerPlugin;
+import '../tree/tree.dart' show Node, Send;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/world_impact.dart' show ImpactStrategy, WorldImpact;
 
-import 'codegen.dart' show
-    CodegenWorkItem;
-import 'registry.dart' show
-    Registry;
-import 'tasks.dart' show
-    CompilerTask;
-import 'work.dart' show
-    ItemCompilationContext;
-
+import 'codegen.dart' show CodegenWorkItem;
+import 'registry.dart' show Registry;
+import 'tasks.dart' show CompilerTask;
+import 'work.dart' show ItemCompilationContext;
 
 abstract class Backend {
   final Compiler compiler;
@@ -102,6 +74,9 @@
     return const SourceInformationStrategy();
   }
 
+  /// Interface for serialization of backend specific data.
+  BackendSerialization get serialization => const BackendSerialization();
+
   // TODO(johnniwinther): Move this to the JavaScriptBackend.
   String get patchVersion => null;
 
@@ -124,6 +99,7 @@
   native.NativeEnqueuer nativeResolutionEnqueuer(world) {
     return new native.NativeEnqueuer();
   }
+
   native.NativeEnqueuer nativeCodegenEnqueuer(world) {
     return new native.NativeEnqueuer();
   }
@@ -157,52 +133,44 @@
   /// Called during resolution when a constant value for [metadata] on
   /// [annotatedElement] has been evaluated.
   void registerMetadataConstant(MetadataAnnotation metadata,
-                                Element annotatedElement,
-                                Registry registry) {}
+      Element annotatedElement, Registry registry) {}
 
   /// Called to notify to the backend that a class is being instantiated.
   // TODO(johnniwinther): Remove this. It's only called once for each [cls] and
   // only with [Compiler.globalDependencies] as [registry].
-  void registerInstantiatedClass(ClassElement cls,
-                                 Enqueuer enqueuer,
-                                 Registry registry) {}
+  void registerInstantiatedClass(
+      ClassElement cls, Enqueuer enqueuer, Registry registry) {}
 
   /// Called to notify to the backend that a class is implemented by an
   /// instantiated class.
-  void registerImplementedClass(ClassElement cls,
-                                Enqueuer enqueuer,
-                                Registry registry) {}
+  void registerImplementedClass(
+      ClassElement cls, Enqueuer enqueuer, Registry registry) {}
 
   /// Called to instruct to the backend register [type] as instantiated on
   /// [enqueuer].
-  void registerInstantiatedType(InterfaceType type,
-                                Enqueuer enqueuer,
-                                Registry registry,
-                                {bool mirrorUsage: false}) {
+  void registerInstantiatedType(
+      InterfaceType type, Enqueuer enqueuer, Registry registry,
+      {bool mirrorUsage: false}) {
     registry.registerDependency(type.element);
     enqueuer.registerInstantiatedType(type, mirrorUsage: mirrorUsage);
   }
 
   /// Register a runtime type variable bound tests between [typeArgument] and
   /// [bound].
-  void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
-                                              DartType bound) {}
+  void registerTypeVariableBoundsSubtypeCheck(
+      DartType typeArgument, DartType bound) {}
 
   /**
    * Call this to register that an instantiated generic class has a call
    * method.
    */
   void registerCallMethodWithFreeTypeVariables(
-      Element callMethod,
-      Enqueuer enqueuer,
-      Registry registry) {}
+      Element callMethod, Enqueuer enqueuer, Registry registry) {}
 
   /// Called to instruct the backend to register that a closure exists for a
   /// function on an instantiated generic class.
   void registerClosureWithFreeTypeVariables(
-      Element closure,
-      Enqueuer enqueuer,
-      Registry registry) {
+      Element closure, Enqueuer enqueuer, Registry registry) {
     enqueuer.universe.closuresWithFreeTypeVariables.add(closure);
   }
 
@@ -341,9 +309,8 @@
   /// Called by [MirrorUsageAnalyzerTask] after it has merged all @MirrorsUsed
   /// annotations. The arguments corresponds to the unions of the corresponding
   /// fields of the annotations.
-  void registerMirrorUsage(Set<String> symbols,
-                           Set<Element> targets,
-                           Set<Element> metaTargets) {}
+  void registerMirrorUsage(
+      Set<String> symbols, Set<Element> targets, Set<Element> metaTargets) {}
 
   /// Returns true if this element needs reflection information at runtime.
   bool isAccessibleByReflection(Element element) => true;
@@ -411,15 +378,12 @@
 
   void registerMainHasArguments(Enqueuer enqueuer) {}
 
-  void registerAsyncMarker(FunctionElement element,
-                           Enqueuer enqueuer,
-                           Registry registry) {}
+  void registerAsyncMarker(
+      FunctionElement element, Enqueuer enqueuer, Registry registry) {}
 
   /// Called when resolving a call to a foreign function.
-  void registerForeignCall(Send node,
-                           Element element,
-                           CallStructure callStructure,
-                           ForeignResolver resolver) {}
+  void registerForeignCall(Send node, Element element,
+      CallStructure callStructure, ForeignResolver resolver) {}
 
   /// Returns the location of the patch-file associated with [libraryName]
   /// resolved from [plaformConfigUri].
@@ -430,7 +394,8 @@
   /// Creates an impact strategy to use for compilation.
   ImpactStrategy createImpactStrategy(
       {bool supportDeferredLoad: true,
-       bool supportDumpInfo: true}) {
+      bool supportDumpInfo: true,
+      bool supportSerialization: true}) {
     return const ImpactStrategy();
   }
 }
@@ -462,3 +427,11 @@
     return worldImpact;
   }
 }
+
+/// Interface for serialization of backend specific data.
+class BackendSerialization {
+  const BackendSerialization();
+
+  SerializerPlugin get serializer => const SerializerPlugin();
+  DeserializerPlugin get deserializer => const DeserializerPlugin();
+}
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index 7e9b40f..0a9cf75 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -5,40 +5,24 @@
 library dart2js.common.codegen;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
-import '../constants/values.dart' show
-    ConstantValue;
-import '../dart_types.dart' show
-    DartType,
-    InterfaceType;
-import '../elements/elements.dart' show
-    AstElement,
-    ClassElement,
-    Element,
-    FunctionElement,
-    LocalFunctionElement;
-import '../enqueue.dart' show
-    CodegenEnqueuer;
-import '../resolution/tree_elements.dart' show
-    TreeElements;
-import '../universe/use.dart' show
-    DynamicUse,
-    StaticUse,
-    TypeUse;
-import '../universe/world_impact.dart' show
-    WorldImpact,
-    WorldImpactBuilder,
-    WorldImpactVisitor;
-import '../util/util.dart' show
-    Pair,
-    Setlet;
-import 'registry.dart' show
-    Registry,
-    EagerRegistry;
-import 'work.dart' show
-    ItemCompilationContext,
-    WorkItem;
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart' show ConstantValue;
+import '../dart_types.dart' show DartType, InterfaceType;
+import '../elements/elements.dart'
+    show
+        AstElement,
+        ClassElement,
+        Element,
+        FunctionElement,
+        LocalFunctionElement;
+import '../enqueue.dart' show CodegenEnqueuer;
+import '../resolution/tree_elements.dart' show TreeElements;
+import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
+import '../universe/world_impact.dart'
+    show WorldImpact, WorldImpactBuilder, WorldImpactVisitor;
+import '../util/util.dart' show Pair, Setlet;
+import 'registry.dart' show Registry, EagerRegistry;
+import 'work.dart' show ItemCompilationContext, WorkItem;
 
 class CodegenImpact extends WorldImpact {
   const CodegenImpact();
@@ -94,21 +78,23 @@
 
   Iterable<ConstantValue> get compileTimeConstants {
     return _compileTimeConstants != null
-        ? _compileTimeConstants : const <ConstantValue>[];
+        ? _compileTimeConstants
+        : const <ConstantValue>[];
   }
 
-  void registerTypeVariableBoundsSubtypeCheck(DartType subtype,
-                                              DartType supertype) {
+  void registerTypeVariableBoundsSubtypeCheck(
+      DartType subtype, DartType supertype) {
     if (_typeVariableBoundsSubtypeChecks == null) {
       _typeVariableBoundsSubtypeChecks = new Setlet<Pair<DartType, DartType>>();
     }
-    _typeVariableBoundsSubtypeChecks.add(
-        new Pair<DartType, DartType>(subtype, supertype));
+    _typeVariableBoundsSubtypeChecks
+        .add(new Pair<DartType, DartType>(subtype, supertype));
   }
 
   Iterable<Pair<DartType, DartType>> get typeVariableBoundsSubtypeChecks {
     return _typeVariableBoundsSubtypeChecks != null
-        ? _typeVariableBoundsSubtypeChecks : const <Pair<DartType, DartType>>[];
+        ? _typeVariableBoundsSubtypeChecks
+        : const <Pair<DartType, DartType>>[];
   }
 
   void registerConstSymbol(String name) {
@@ -119,8 +105,7 @@
   }
 
   Iterable<String> get constSymbols {
-    return _constSymbols != null
-        ? _constSymbols : const <String>[];
+    return _constSymbols != null ? _constSymbols : const <String>[];
   }
 
   void registerSpecializedGetInterceptor(Set<ClassElement> classes) {
@@ -132,7 +117,8 @@
 
   Iterable<Set<ClassElement>> get specializedGetInterceptors {
     return _specializedGetInterceptors != null
-        ? _specializedGetInterceptors : const <Set<ClassElement>>[];
+        ? _specializedGetInterceptors
+        : const <Set<ClassElement>>[];
   }
 
   void registerUseInterceptor() {
@@ -149,8 +135,7 @@
   }
 
   Iterable<ClassElement> get typeConstants {
-    return _typeConstants != null
-        ? _typeConstants : const <ClassElement>[];
+    return _typeConstants != null ? _typeConstants : const <ClassElement>[];
   }
 
   void registerAsyncMarker(FunctionElement element) {
@@ -161,8 +146,7 @@
   }
 
   Iterable<Element> get asyncMarkers {
-    return _asyncMarkers != null
-        ? _asyncMarkers : const <FunctionElement>[];
+    return _asyncMarkers != null ? _asyncMarkers : const <FunctionElement>[];
   }
 }
 
@@ -177,7 +161,7 @@
       : this.compiler = compiler,
         this.currentElement = currentElement,
         this.worldImpact = new _CodegenImpact(new EagerRegistry(
-          'EagerRegistry for $currentElement', compiler.enqueuer.codegen));
+            'EagerRegistry for $currentElement', compiler.enqueuer.codegen));
 
   bool get isForResolution => false;
 
@@ -204,8 +188,8 @@
     worldImpact.registerCompileTimeConstant(constant);
   }
 
-  void registerTypeVariableBoundsSubtypeCheck(DartType subtype,
-                                              DartType supertype) {
+  void registerTypeVariableBoundsSubtypeCheck(
+      DartType subtype, DartType supertype) {
     worldImpact.registerTypeVariableBoundsSubtypeCheck(subtype, supertype);
   }
 
@@ -242,16 +226,14 @@
 class CodegenWorkItem extends WorkItem {
   CodegenRegistry registry;
 
-  factory CodegenWorkItem(
-      Compiler compiler,
-      AstElement element,
+  factory CodegenWorkItem(Compiler compiler, AstElement element,
       ItemCompilationContext compilationContext) {
     // If this assertion fails, the resolution callbacks of the backend may be
     // missing call of form registry.registerXXX. Alternatively, the code
     // generation could spuriously be adding dependencies on things we know we
     // don't need.
-    assert(invariant(element,
-        compiler.enqueuer.resolution.hasBeenProcessed(element),
+    assert(invariant(
+        element, compiler.enqueuer.resolution.hasBeenProcessed(element),
         message: "$element has not been resolved."));
     assert(invariant(element, element.resolvedAst.elements != null,
         message: 'Resolution tree is null for $element in codegen work item'));
@@ -259,8 +241,7 @@
   }
 
   CodegenWorkItem.internal(
-      AstElement element,
-      ItemCompilationContext compilationContext)
+      AstElement element, ItemCompilationContext compilationContext)
       : super(element, compilationContext);
 
   TreeElements get resolutionTree => element.resolvedAst.elements;
diff --git a/pkg/compiler/lib/src/common/names.dart b/pkg/compiler/lib/src/common/names.dart
index 70ebabe..300d176 100644
--- a/pkg/compiler/lib/src/common/names.dart
+++ b/pkg/compiler/lib/src/common/names.dart
@@ -6,13 +6,9 @@
 /// the compiler.
 library dart2js.common.names;
 
-import '../elements/elements.dart' show
-    Name,
-    PublicName;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
+import '../elements/elements.dart' show Name, PublicName;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
 
 /// [String]s commonly used.
 class Identifiers {
@@ -106,8 +102,7 @@
       new Selector.call(Names.toString_, CallStructure.NO_ARGS);
 
   /// The selector for tearing off toString.
-  static final Selector toStringGetter =
-      new Selector.getter(Names.toString_);
+  static final Selector toStringGetter = new Selector.getter(Names.toString_);
 
   static final Selector hashCode_ =
       new Selector.getter(const PublicName('hashCode'));
@@ -131,9 +126,22 @@
   /// These objects are shared between different runs in batch-mode and must
   /// thus remain in the [Selector.canonicalizedValues] map.
   static final List<Selector> ALL = <Selector>[
-      cancel, current, iterator, moveNext, noSuchMethod_, noSuchMethodGetter,
-      toString_, toStringGetter, hashCode_, compareTo, equals, length,
-      codeUnitAt, index, runtimeType_];
+    cancel,
+    current,
+    iterator,
+    moveNext,
+    noSuchMethod_,
+    noSuchMethodGetter,
+    toString_,
+    toStringGetter,
+    hashCode_,
+    compareTo,
+    equals,
+    length,
+    codeUnitAt,
+    index,
+    runtimeType_
+  ];
 }
 
 /// [Uri]s commonly used.
diff --git a/pkg/compiler/lib/src/common/registry.dart b/pkg/compiler/lib/src/common/registry.dart
index 1ba7b9d..0499858 100644
--- a/pkg/compiler/lib/src/common/registry.dart
+++ b/pkg/compiler/lib/src/common/registry.dart
@@ -4,16 +4,10 @@
 
 library dart2js.common.registry;
 
-import '../dart_types.dart' show
-    InterfaceType;
-import '../enqueue.dart' show
-    Enqueuer;
-import '../elements/elements.dart' show
-    Element,
-    FunctionElement;
-import '../universe/use.dart' show
-    DynamicUse,
-    StaticUse;
+import '../dart_types.dart' show InterfaceType;
+import '../enqueue.dart' show Enqueuer;
+import '../elements/elements.dart' show Element, FunctionElement;
+import '../universe/use.dart' show DynamicUse, StaticUse;
 
 /// Interface for registration of element dependencies.
 abstract class Registry {
diff --git a/pkg/compiler/lib/src/common/resolution.dart b/pkg/compiler/lib/src/common/resolution.dart
index e422ef8..42f9617 100644
--- a/pkg/compiler/lib/src/common/resolution.dart
+++ b/pkg/compiler/lib/src/common/resolution.dart
@@ -1,4 +1,3 @@
-
 // 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.
@@ -6,47 +5,37 @@
 library dart2js.common.resolution;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
-import '../constants/expressions.dart' show
-    ConstantExpression;
-import '../core_types.dart' show
-    CoreTypes;
-import '../dart_types.dart' show
-    DartType,
-    InterfaceType;
-import '../elements/elements.dart' show
-    AstElement,
-    ClassElement,
-    Element,
-    ErroneousElement,
-    FunctionElement,
-    FunctionSignature,
-    LocalFunctionElement,
-    MetadataAnnotation,
-    MethodElement,
-    TypedefElement,
-    TypeVariableElement;
-import '../enqueue.dart' show
-    ResolutionEnqueuer;
-import '../parser/element_listener.dart' show
-    ScannerOptions;
-import '../tree/tree.dart' show
-    AsyncForIn,
-    Send,
-    TypeAnnotation;
-import '../universe/world_impact.dart' show
-    WorldImpact;
-import 'work.dart' show
-    ItemCompilationContext,
-    WorkItem;
+import '../compiler.dart' show Compiler;
+import '../constants/expressions.dart' show ConstantExpression;
+import '../core_types.dart' show CoreTypes;
+import '../dart_types.dart' show DartType, InterfaceType;
+import '../elements/elements.dart'
+    show
+        AstElement,
+        ClassElement,
+        Element,
+        ErroneousElement,
+        FunctionElement,
+        FunctionSignature,
+        LocalFunctionElement,
+        MetadataAnnotation,
+        MethodElement,
+        ResolvedAst,
+        TypedefElement,
+        TypeVariableElement;
+import '../enqueue.dart' show ResolutionEnqueuer;
+import '../options.dart' show ParserOptions;
+import '../parser/element_listener.dart' show ScannerOptions;
+import '../tree/tree.dart' show AsyncForIn, Send, TypeAnnotation;
+import '../universe/world_impact.dart' show WorldImpact;
+import 'work.dart' show ItemCompilationContext, WorkItem;
 
 /// [WorkItem] used exclusively by the [ResolutionEnqueuer].
 class ResolutionWorkItem extends WorkItem {
   bool _isAnalyzed = false;
 
-  ResolutionWorkItem(AstElement element,
-                     ItemCompilationContext compilationContext)
+  ResolutionWorkItem(
+      AstElement element, ItemCompilationContext compilationContext)
       : super(element, compilationContext);
 
   WorldImpact run(Compiler compiler, ResolutionEnqueuer world) {
@@ -75,48 +64,69 @@
 enum Feature {
   /// Invocation of a generative construction on an abstract class.
   ABSTRACT_CLASS_INSTANTIATION,
+
   /// An assert statement with no message.
   ASSERT,
+
   /// An assert statement with a message.
   ASSERT_WITH_MESSAGE,
+
   /// A method with an `async` body modifier.
   ASYNC,
+
   /// An asynchronous for in statement like `await for (var e in i) {}`.
   ASYNC_FOR_IN,
+
   /// A method with an `async*` body modifier.
   ASYNC_STAR,
+
   /// A catch statement.
   CATCH_STATEMENT,
+
   /// A compile time error.
   COMPILE_TIME_ERROR,
+
   /// A fall through in a switch case.
   FALL_THROUGH_ERROR,
+
   /// A ++/-- operation.
   INC_DEC_OPERATION,
+
   /// A field whose initialization is not a constant.
   LAZY_FIELD,
+
   /// A catch clause with a variable for the stack trace.
   STACK_TRACE_IN_CATCH,
+
   /// String interpolation.
   STRING_INTERPOLATION,
+
   /// String juxtaposition.
   STRING_JUXTAPOSITION,
+
   /// An implicit call to `super.noSuchMethod`, like calling an unresolved
   /// super method.
   SUPER_NO_SUCH_METHOD,
+
   /// A redirection to the `Symbol` constructor.
   SYMBOL_CONSTRUCTOR,
+
   /// An synchronous for in statement, like `for (var e in i) {}`.
   SYNC_FOR_IN,
+
   /// A method with a `sync*` body modifier.
   SYNC_STAR,
+
   /// A throw expression.
   THROW_EXPRESSION,
+
   /// An implicit throw of a `NoSuchMethodError`, like calling an unresolved
   /// static method.
   THROW_NO_SUCH_METHOD,
+
   /// An implicit throw of a runtime error, like
   THROW_RUNTIME_ERROR,
+
   /// The need for a type variable bound check, like instantiation of a generic
   /// type whose type variable have non-trivial bounds.
   TYPE_VARIABLE_BOUNDS_CHECK,
@@ -131,8 +141,7 @@
   MapLiteralUse(this.type, {this.isConstant: false, this.isEmpty: false});
 
   int get hashCode {
-    return
-        type.hashCode * 13 +
+    return type.hashCode * 13 +
         isConstant.hashCode * 17 +
         isEmpty.hashCode * 19;
   }
@@ -140,11 +149,14 @@
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! MapLiteralUse) return false;
-    return
-        type == other.type &&
+    return type == other.type &&
         isConstant == other.isConstant &&
         isEmpty == other.isEmpty;
   }
+
+  String toString() {
+    return 'MapLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)';
+  }
 }
 
 /// A use of a list literal seen during resolution.
@@ -156,8 +168,7 @@
   ListLiteralUse(this.type, {this.isConstant: false, this.isEmpty: false});
 
   int get hashCode {
-    return
-        type.hashCode * 13 +
+    return type.hashCode * 13 +
         isConstant.hashCode * 17 +
         isEmpty.hashCode * 19;
   }
@@ -165,11 +176,14 @@
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! ListLiteralUse) return false;
-    return
-        type == other.type &&
+    return type == other.type &&
         isConstant == other.isConstant &&
         isEmpty == other.isEmpty;
   }
+
+  String toString() {
+    return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)';
+  }
 }
 
 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`.
@@ -178,6 +192,10 @@
   DiagnosticReporter get reporter;
   CoreTypes get coreTypes;
 
+  /// If set to `true` resolution caches will not be cleared. Use this only for
+  /// testing.
+  bool retainCachesForTesting;
+
   void resolveTypedef(TypedefElement typdef);
   void resolveClass(ClassElement cls);
   void registerClass(ClassElement cls);
@@ -187,6 +205,21 @@
 
   bool hasBeenResolved(Element element);
 
+  ResolutionWorkItem createWorkItem(
+      Element element, ItemCompilationContext compilationContext);
+
+  /// Returns `true` if [element] as a fully computed [ResolvedAst].
+  bool hasResolvedAst(Element element);
+
+  /// Returns the `ResolvedAst` for the [element].
+  ResolvedAst getResolvedAst(Element element);
+
+  /// Returns `true` if the [ResolutionImpact] for [element] is cached.
+  bool hasResolutionImpact(Element element);
+
+  /// Returns the precomputed [ResolutionImpact] for [element].
+  ResolutionImpact getResolutionImpact(Element element);
+
   /// Returns the precomputed [WorldImpact] for [element].
   WorldImpact getWorldImpact(Element element);
 
@@ -209,4 +242,5 @@
   void parsePatchClass(ClassElement cls);
   measure(f());
   ScannerOptions getScannerOptionsFor(Element element);
-}
\ No newline at end of file
+  ParserOptions get parserOptions;
+}
diff --git a/pkg/compiler/lib/src/common/tasks.dart b/pkg/compiler/lib/src/common/tasks.dart
index 737c2a9..69e5f11 100644
--- a/pkg/compiler/lib/src/common/tasks.dart
+++ b/pkg/compiler/lib/src/common/tasks.dart
@@ -4,14 +4,11 @@
 
 library dart2js.common.tasks;
 
-import 'dart:developer' show
-    UserTag;
+import 'dart:developer' show UserTag;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
-import '../elements/elements.dart' show
-    Element;
+import '../compiler.dart' show Compiler;
+import '../elements/elements.dart' show Element;
 
 typedef void DeferredAction();
 
@@ -30,7 +27,7 @@
 
   CompilerTask(Compiler compiler)
       : this.compiler = compiler,
-        watch = (compiler.verbose) ? new Stopwatch() : null;
+        watch = (compiler.options.verbose) ? new Stopwatch() : null;
 
   DiagnosticReporter get reporter => compiler.reporter;
 
@@ -80,8 +77,8 @@
     // Use a nested CompilerTask for the measurement to ensure nested [measure]
     // calls work correctly. The subtasks will never themselves have nested
     // subtasks because they are not accessible outside.
-    GenericTask subtask = _subtasks.putIfAbsent(name,
-        () => new GenericTask(name, compiler));
+    GenericTask subtask =
+        _subtasks.putIfAbsent(name, () => new GenericTask(name, compiler));
     return subtask.measure(action);
   }
 
@@ -93,6 +90,5 @@
 class GenericTask extends CompilerTask {
   final String name;
 
-  GenericTask(this.name, Compiler compiler)
-      : super(compiler);
+  GenericTask(this.name, Compiler compiler) : super(compiler);
 }
diff --git a/pkg/compiler/lib/src/common/work.dart b/pkg/compiler/lib/src/common/work.dart
index 482d9e8..31dc75c 100644
--- a/pkg/compiler/lib/src/common/work.dart
+++ b/pkg/compiler/lib/src/common/work.dart
@@ -5,22 +5,16 @@
 library dart2js.common.work;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
-import '../elements/elements.dart' show
-    AstElement;
-import '../enqueue.dart' show
-    Enqueuer;
-import '../universe/world_impact.dart' show
-    WorldImpact;
-
+import '../compiler.dart' show Compiler;
+import '../elements/elements.dart' show AstElement;
+import '../enqueue.dart' show Enqueuer;
+import '../universe/world_impact.dart' show WorldImpact;
 
 /**
  * Contains backend-specific data that is used throughout the compilation of
  * one work item.
  */
-class ItemCompilationContext {
-}
+class ItemCompilationContext {}
 
 abstract class WorkItem {
   final ItemCompilationContext compilationContext;
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index d633e6b..825176c 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -5,31 +5,23 @@
 library dart2js.compile_time_constant_evaluator;
 
 import 'common.dart';
-import 'common/resolution.dart' show
-    Resolution;
-import 'common/tasks.dart' show
-    CompilerTask;
-import 'compiler.dart' show
-    Compiler;
+import 'common/resolution.dart' show Resolution;
+import 'common/tasks.dart' show CompilerTask;
+import 'compiler.dart' show Compiler;
 import 'constant_system_dart.dart';
 import 'constants/constant_system.dart';
 import 'constants/evaluation.dart';
 import 'constants/expressions.dart';
 import 'constants/values.dart';
-import 'core_types.dart' show
-    CoreTypes;
+import 'core_types.dart' show CoreTypes;
 import 'dart_types.dart';
 import 'elements/elements.dart';
-import 'elements/modelx.dart' show
-    FunctionElementX;
-import 'resolution/tree_elements.dart' show
-    TreeElements;
+import 'elements/modelx.dart' show FunctionElementX;
+import 'resolution/tree_elements.dart' show TreeElements;
 import 'resolution/operators.dart';
 import 'tree/tree.dart';
-import 'util/util.dart' show
-    Link;
-import 'universe/call_structure.dart' show
-    CallStructure;
+import 'util/util.dart' show Link;
+import 'universe/call_structure.dart' show CallStructure;
 
 /// A [ConstantEnvironment] provides access for constants compiled for variable
 /// initializers.
@@ -87,9 +79,8 @@
   /// the compile-time constant for the backend interpretation of constants.
   ///
   /// The returned constant is always of the frontend interpretation.
-  ConstantExpression compileMetadata(MetadataAnnotation metadata,
-                                     Node node,
-                                     TreeElements elements);
+  ConstantExpression compileMetadata(
+      MetadataAnnotation metadata, Node node, TreeElements elements);
 
   /// Evaluates [constant] and caches the result.
   // TODO(johnniwinther): Remove when all constants are evaluated.
@@ -182,8 +173,7 @@
   void evaluate(ConstantExpression constant) {
     constantValueMap.putIfAbsent(constant, () {
       return constant.evaluate(
-          new _CompilerEnvironment(compiler),
-          constantSystem);
+          new _CompilerEnvironment(compiler), constantSystem);
     });
   }
 
@@ -243,7 +233,7 @@
     } else {
       expression = compileNodeWithDefinitions(initializer, definitions,
           isConst: isConst);
-      if (compiler.enableTypeAssertions &&
+      if (compiler.options.enableTypeAssertions &&
           checkType &&
           expression != null &&
           element.isField) {
@@ -263,11 +253,8 @@
           if (!constantSystem.isSubtype(
               compiler.types, constantType, elementType)) {
             if (isConst) {
-              reporter.reportErrorMessage(
-                  node,
-                  MessageKind.NOT_ASSIGNABLE,
-                  {'fromType': constantType,
-                   'toType': elementType});
+              reporter.reportErrorMessage(node, MessageKind.NOT_ASSIGNABLE,
+                  {'fromType': constantType, 'toType': elementType});
             } else {
               // If the field cannot be lazily initialized, we will throw
               // the exception at runtime.
@@ -292,10 +279,12 @@
   }
 
   ConstantExpression compileNodeWithDefinitions(
-      Node node, TreeElements definitions, {bool isConst: true}) {
+      Node node, TreeElements definitions,
+      {bool isConst: true}) {
     assert(node != null);
     CompileTimeConstantEvaluator evaluator = new CompileTimeConstantEvaluator(
-        this, definitions, compiler, isConst: isConst);
+        this, definitions, compiler,
+        isConst: isConst);
     AstConstant constant = evaluator.evaluate(node);
     if (constant != null) {
       cacheConstantValue(constant.expression, constant.value);
@@ -340,7 +329,8 @@
   }
 
   ConstantExpression compileNodeWithDefinitions(
-      Node node, TreeElements definitions, {bool isConst: true}) {
+      Node node, TreeElements definitions,
+      {bool isConst: true}) {
     ConstantExpression constant = definitions.getConstant(node);
     if (constant != null && getConstantValue(constant) != null) {
       return constant;
@@ -393,13 +383,17 @@
   }
 
   AstConstant visitLiteralBool(LiteralBool node) {
-    return new AstConstant(context, node,
+    return new AstConstant(
+        context,
+        node,
         new BoolConstantExpression(node.value),
         constantSystem.createBool(node.value));
   }
 
   AstConstant visitLiteralDouble(LiteralDouble node) {
-    return new AstConstant(context, node,
+    return new AstConstant(
+        context,
+        node,
         new DoubleConstantExpression(node.value),
         constantSystem.createDouble(node.value));
   }
@@ -426,7 +420,9 @@
       argumentValues.add(argument.value);
     }
     DartType type = elements.getType(node);
-    return new AstConstant(context, node,
+    return new AstConstant(
+        context,
+        node,
         new ListConstantExpression(type, argumentExpressions),
         constantSystem.createList(type, argumentValues));
   }
@@ -462,7 +458,9 @@
       map[key.value] = value.value;
     }
     InterfaceType type = elements.getType(node);
-    return new AstConstant(context, node,
+    return new AstConstant(
+        context,
+        node,
         new MapConstantExpression(type, keyExpressions, valueExpressions),
         constantSystem.createMap(
             compiler, type, keyValues, map.values.toList()));
@@ -474,7 +472,9 @@
   }
 
   AstConstant visitLiteralString(LiteralString node) {
-    return new AstConstant(context, node,
+    return new AstConstant(
+        context,
+        node,
         new StringConstantExpression(node.dartString.slowToString()),
         constantSystem.createString(node.dartString));
   }
@@ -485,7 +485,9 @@
     if (left == null || right == null) return null;
     StringConstantValue leftValue = left.value;
     StringConstantValue rightValue = right.value;
-    return new AstConstant(context, node,
+    return new AstConstant(
+        context,
+        node,
         new ConcatenateConstantExpression([left.expression, right.expression]),
         constantSystem.createString(new DartString.concat(
             leftValue.primitiveValue, rightValue.primitiveValue)));
@@ -529,7 +531,9 @@
           new DartString.concat(accumulator, partStringValue.primitiveValue);
     }
     ;
-    return new AstConstant(context, node,
+    return new AstConstant(
+        context,
+        node,
         new ConcatenateConstantExpression(subexpressions),
         constantSystem.createString(accumulator));
   }
@@ -580,7 +584,9 @@
       if (Elements.isStaticOrTopLevelFunction(element)) {
         FunctionElementX function = element;
         function.computeType(resolution);
-        result = new AstConstant(context, send,
+        result = new AstConstant(
+            context,
+            send,
             new FunctionConstantExpression(function),
             new FunctionConstantValue(function));
       } else if (Elements.isStaticOrTopLevelField(element)) {
@@ -591,14 +597,18 @@
           elementExpression = handler.compileVariable(element);
         }
         if (elementExpression != null) {
-          result = new AstConstant(context, send,
+          result = new AstConstant(
+              context,
+              send,
               new VariableConstantExpression(element),
               handler.getConstantValue(elementExpression));
         }
       } else if (Elements.isClass(element) || Elements.isTypedef(element)) {
         assert(elements.isTypeLiteral(send));
         DartType elementType = elements.getTypeLiteralType(send);
-        result = new AstConstant(context, send,
+        result = new AstConstant(
+            context,
+            send,
             new TypeConstantExpression(elementType),
             makeTypeConstant(elementType));
       } else if (send.receiver != null) {
@@ -619,7 +629,9 @@
         ConstantExpression variableExpression =
             handler.compileConstant(element);
         if (variableExpression != null) {
-          result = new AstConstant(context, send,
+          result = new AstConstant(
+              context,
+              send,
               new VariableConstantExpression(element),
               handler.getConstantValue(variableExpression));
         }
@@ -634,11 +646,13 @@
         }
         PrefixElement prefix =
             compiler.deferredLoadTask.deferredPrefixElement(send, elements);
-        result = new AstConstant(context, send,
+        result = new AstConstant(
+            context,
+            send,
             new DeferredConstantExpression(result.expression, prefix),
             new DeferredConstantValue(result.value, prefix));
-        compiler.deferredLoadTask.registerConstantDeferredUse(
-            result.value, prefix);
+        compiler.deferredLoadTask
+            .registerConstantDeferredUse(result.value, prefix);
       }
       return result;
     } else if (send.isCall) {
@@ -651,8 +665,12 @@
         ConstantValue result =
             constantSystem.identity.fold(left.value, right.value);
         if (result != null) {
-          return new AstConstant(context, send, new IdenticalConstantExpression(
-              left.expression, right.expression), result);
+          return new AstConstant(
+              context,
+              send,
+              new IdenticalConstantExpression(
+                  left.expression, right.expression),
+              result);
         }
       }
       return signalNotCompileTimeConstant(send);
@@ -672,7 +690,9 @@
       if (folded == null) {
         return signalNotCompileTimeConstant(send);
       }
-      return new AstConstant(context, send,
+      return new AstConstant(
+          context,
+          send,
           new UnaryConstantExpression(operator, receiverConstant.expression),
           folded);
     } else if (send.isOperator && !send.isPostfix) {
@@ -716,8 +736,12 @@
       if (folded == null) {
         return signalNotCompileTimeConstant(send);
       }
-      return new AstConstant(context, send, new BinaryConstantExpression(
-          left.expression, operator, right.expression), folded);
+      return new AstConstant(
+          context,
+          send,
+          new BinaryConstantExpression(
+              left.expression, operator, right.expression),
+          folded);
     }
     return signalNotCompileTimeConstant(send);
   }
@@ -729,11 +753,8 @@
     } else if (!condition.value.isBool) {
       DartType conditionType = condition.value.getType(coreTypes);
       if (isEvaluatingConstant) {
-        reporter.reportErrorMessage(
-            node.condition,
-            MessageKind.NOT_ASSIGNABLE,
-            {'fromType': conditionType,
-             'toType': coreTypes.boolType});
+        reporter.reportErrorMessage(node.condition, MessageKind.NOT_ASSIGNABLE,
+            {'fromType': conditionType, 'toType': coreTypes.boolType});
         return new ErroneousAstConstant(context, node);
       }
       return null;
@@ -744,11 +765,14 @@
       return null;
     }
     BoolConstantValue boolCondition = condition.value;
-    return new AstConstant(context, node, new ConditionalConstantExpression(
-        condition.expression, thenExpression.expression,
-        elseExpression.expression), boolCondition.primitiveValue
-        ? thenExpression.value
-        : elseExpression.value);
+    return new AstConstant(
+        context,
+        node,
+        new ConditionalConstantExpression(condition.expression,
+            thenExpression.expression, elseExpression.expression),
+        boolCondition.primitiveValue
+            ? thenExpression.value
+            : elseExpression.value);
   }
 
   AstConstant visitSendSet(SendSet node) {
@@ -762,9 +786,12 @@
    *
    * Invariant: [target] must be an implementation element.
    */
-  List<AstConstant> evaluateArgumentsToConstructor(Node node,
-      CallStructure callStructure, Link<Node> arguments,
-      ConstructorElement target, {AstConstant compileArgument(Node node)}) {
+  List<AstConstant> evaluateArgumentsToConstructor(
+      Node node,
+      CallStructure callStructure,
+      Link<Node> arguments,
+      ConstructorElement target,
+      {AstConstant compileArgument(Node node)}) {
     assert(invariant(node, target.isImplementation));
 
     AstConstant compileDefaultValue(VariableElement element) {
@@ -778,9 +805,8 @@
     if (!callStructure.signatureApplies(signature)) {
       String name = Elements.constructorNameForDiagnostics(
           target.enclosingClass.name, target.name);
-      reporter.reportErrorMessage(
-          node, MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS,
-          {'constructorName': name});
+      reporter.reportErrorMessage(node,
+          MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS, {'constructorName': name});
 
       return new List<AstConstant>.filled(
           target.functionSignature.parameterCount,
@@ -834,8 +860,7 @@
       if (constructor.isEffectiveTargetMalformed) {
         isInvalid = true;
       } else {
-        constructedType =
-            constructor.computeEffectiveTargetType(type);
+        constructedType = constructor.computeEffectiveTargetType(type);
         ConstructorElement target = constructor.effectiveTarget;
         // The constructor must be an implementation to ensure that field
         // initializers are handled correctly.
@@ -882,14 +907,26 @@
       return createFromEnvironmentConstant(node, constructedType, constructor,
           callStructure, normalizedArguments, concreteArguments);
     } else {
-      return makeConstructedConstant(compiler, handler, context, node, type,
-          constructor, constructedType, implementation, callStructure,
-          concreteArguments, normalizedArguments);
+      return makeConstructedConstant(
+          compiler,
+          handler,
+          context,
+          node,
+          type,
+          constructor,
+          constructedType,
+          implementation,
+          callStructure,
+          concreteArguments,
+          normalizedArguments);
     }
   }
 
-  AstConstant createFromEnvironmentConstant(Node node, InterfaceType type,
-      ConstructorElement constructor, CallStructure callStructure,
+  AstConstant createFromEnvironmentConstant(
+      Node node,
+      InterfaceType type,
+      ConstructorElement constructor,
+      CallStructure callStructure,
       List<AstConstant> normalizedArguments,
       List<AstConstant> concreteArguments) {
     var firstArgument = normalizedArguments[0].value;
@@ -906,8 +943,7 @@
       reporter.reportErrorMessage(
           normalizedArguments[0].node,
           MessageKind.NOT_ASSIGNABLE,
-          {'fromType': type,
-           'toType': coreTypes.stringType});
+          {'fromType': type, 'toType': coreTypes.stringType});
       return null;
     }
 
@@ -917,8 +953,7 @@
       reporter.reportErrorMessage(
           normalizedArguments[1].node,
           MessageKind.NOT_ASSIGNABLE,
-          {'fromType': type,
-           'toType': coreTypes.intType});
+          {'fromType': type, 'toType': coreTypes.intType});
       return null;
     }
 
@@ -928,8 +963,7 @@
       reporter.reportErrorMessage(
           normalizedArguments[1].node,
           MessageKind.NOT_ASSIGNABLE,
-          {'fromType': type,
-           'toType': coreTypes.boolType});
+          {'fromType': type, 'toType': coreTypes.boolType});
       return null;
     }
 
@@ -939,8 +973,7 @@
       reporter.reportErrorMessage(
           normalizedArguments[1].node,
           MessageKind.NOT_ASSIGNABLE,
-          {'fromType': type,
-           'toType': coreTypes.stringType});
+          {'fromType': type, 'toType': coreTypes.stringType});
       return null;
     }
 
@@ -989,24 +1022,31 @@
     }
   }
 
-  static AstConstant makeConstructedConstant(Compiler compiler,
-      ConstantCompilerBase handler, Element context, Node node,
-      InterfaceType type, ConstructorElement constructor,
-      InterfaceType constructedType, ConstructorElement target,
-      CallStructure callStructure, List<AstConstant> concreteArguments,
+  static AstConstant makeConstructedConstant(
+      Compiler compiler,
+      ConstantCompilerBase handler,
+      Element context,
+      Node node,
+      InterfaceType type,
+      ConstructorElement constructor,
+      InterfaceType constructedType,
+      ConstructorElement target,
+      CallStructure callStructure,
+      List<AstConstant> concreteArguments,
       List<AstConstant> normalizedArguments) {
     if (target.isRedirectingFactory) {
       // This happens is case of cyclic redirection.
       assert(invariant(node, compiler.compilationFailed,
           message: "makeConstructedConstant can only be called with the "
-          "effective target: $constructor"));
+              "effective target: $constructor"));
       return new ErroneousAstConstant(context, node);
     }
-    assert(invariant(node,
+    assert(invariant(
+        node,
         callStructure.signatureApplies(constructor.functionSignature) ||
             compiler.compilationFailed,
         message: "Call structure $callStructure does not apply to constructor "
-        "$constructor."));
+            "$constructor."));
 
     ConstructorEvaluator evaluator =
         new ConstructorEvaluator(constructedType, target, handler, compiler);
@@ -1018,8 +1058,10 @@
     fieldConstants.forEach((FieldElement field, AstConstant astConstant) {
       fieldValues[field] = astConstant.value;
     });
-    return new AstConstant(context, node, new ConstructedConstantExpression(
-            type, constructor, callStructure,
+    return new AstConstant(
+        context,
+        node,
+        new ConstructedConstantExpression(type, constructor, callStructure,
             concreteArguments.map((e) => e.expression).toList()),
         new ConstructedConstantValue(constructedType, fieldValues));
   }
@@ -1079,17 +1121,14 @@
   }
 
   void potentiallyCheckType(TypedElement element, AstConstant constant) {
-    if (compiler.enableTypeAssertions) {
+    if (compiler.options.enableTypeAssertions) {
       DartType elementType = element.type.substByContext(constructedType);
       DartType constantType = constant.value.getType(coreTypes);
       if (!constantSystem.isSubtype(
           compiler.types, constantType, elementType)) {
         reporter.withCurrentElement(constant.element, () {
-          reporter.reportErrorMessage(
-              constant.node,
-              MessageKind.NOT_ASSIGNABLE,
-              {'fromType': constantType,
-               'toType': elementType});
+          reporter.reportErrorMessage(constant.node, MessageKind.NOT_ASSIGNABLE,
+              {'fromType': constantType, 'toType': elementType});
         });
       }
     }
@@ -1127,7 +1166,9 @@
       List<AstConstant> compiledArguments, FunctionElement targetConstructor) {
     ConstructorEvaluator evaluator = new ConstructorEvaluator(
         constructedType.asInstanceOf(targetConstructor.enclosingClass),
-        targetConstructor, handler, compiler);
+        targetConstructor,
+        handler,
+        compiler);
     evaluator.evaluateConstructorFieldValues(compiledArguments);
     // Copy over the fieldValues from the super/redirect-constructor.
     // No need to go through [updateFieldValue] because the
@@ -1168,11 +1209,11 @@
           if (!target.isMalformed) {
             List<AstConstant> compiledArguments =
                 evaluateArgumentsToConstructor(
-                  call,
-                  elements.getSelector(call).callStructure,
-                  call.arguments,
-                  target,
-                  compileArgument: evaluateConstant);
+                    call,
+                    elements.getSelector(call).callStructure,
+                    call.arguments,
+                    target,
+                    compileArgument: evaluateConstant);
             evaluateSuperOrRedirectSend(compiledArguments, target);
           }
           foundSuperOrRedirect = true;
@@ -1202,7 +1243,9 @@
         // already and compilation will fail anyway. So just ignore that case.
         if (targetConstructor != null) {
           List<AstConstant> compiledArguments = evaluateArgumentsToConstructor(
-              functionNode, CallStructure.NO_ARGS, const Link<Node>(),
+              functionNode,
+              CallStructure.NO_ARGS,
+              const Link<Node>(),
               targetConstructor);
           evaluateSuperOrRedirectSend(compiledArguments, targetConstructor);
         }
@@ -1227,10 +1270,10 @@
   /// inheritance chain of [classElement].
   Map<FieldElement, AstConstant> buildFieldConstants(
       ClassElement classElement) {
-    Map<FieldElement, AstConstant> fieldConstants = <FieldElement, AstConstant>{
-    };
-    classElement.implementation
-        .forEachInstanceField((ClassElement enclosing, FieldElement field) {
+    Map<FieldElement, AstConstant> fieldConstants =
+        <FieldElement, AstConstant>{};
+    classElement.implementation.forEachInstanceField(
+        (ClassElement enclosing, FieldElement field) {
       AstConstant fieldValue = fieldValues[field];
       if (fieldValue == null) {
         // Use the default value.
@@ -1268,9 +1311,11 @@
 
   factory AstConstant.fromDefaultValue(VariableElement element,
       ConstantExpression constant, ConstantValue value) {
-    return new AstConstant(element, element.initializer != null
-        ? element.initializer
-        : element.node, constant, value);
+    return new AstConstant(
+        element,
+        element.initializer != null ? element.initializer : element.node,
+        constant,
+        value);
   }
 
   String toString() => expression.toString();
@@ -1278,9 +1323,13 @@
 
 /// A synthetic constant used to recover from errors.
 class ErroneousAstConstant extends AstConstant {
-  ErroneousAstConstant(Element element, Node node) : super(element, node,
-          // TODO(johnniwinther): Return a [NonConstantValue] instead.
-          new ErroneousConstantExpression(), new NullConstantValue());
+  ErroneousAstConstant(Element element, Node node)
+      : super(
+            element,
+            node,
+            // TODO(johnniwinther): Return a [NonConstantValue] instead.
+            new ErroneousConstantExpression(),
+            new NullConstantValue());
 }
 
 // TODO(johnniwinther): Clean this up.
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 3df2ba4..1b01849 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -4,151 +4,94 @@
 
 library dart2js.compiler_base;
 
-import 'dart:async' show
-    EventSink,
-    Future;
+import 'dart:async' show EventSink, Future;
 
 import '../compiler_new.dart' as api;
-import 'cache_strategy.dart' show
-    CacheStrategy;
-import 'closure.dart' as closureMapping show
-    ClosureTask;
+import 'cache_strategy.dart' show CacheStrategy;
+import 'closure.dart' as closureMapping show ClosureTask;
 import 'common.dart';
-import 'common/backend_api.dart' show
-    Backend;
-import 'common/codegen.dart' show
-    CodegenImpact,
-    CodegenWorkItem;
-import 'common/names.dart' show
-    Identifiers,
-    Uris;
-import 'common/registry.dart' show
-    EagerRegistry,
-    Registry;
-import 'common/resolution.dart' show
-    Parsing,
-    Resolution,
-    ResolutionWorkItem,
-    ResolutionImpact;
-import 'common/tasks.dart' show
-    CompilerTask,
-    GenericTask;
-import 'common/work.dart' show
-    WorkItem;
+import 'common/backend_api.dart' show Backend;
+import 'common/codegen.dart' show CodegenImpact, CodegenWorkItem;
+import 'common/names.dart' show Identifiers, Uris;
+import 'common/registry.dart' show EagerRegistry, Registry;
+import 'common/resolution.dart'
+    show Parsing, Resolution, ResolutionWorkItem, ResolutionImpact;
+import 'common/tasks.dart' show CompilerTask, GenericTask;
+import 'common/work.dart' show ItemCompilationContext, WorkItem;
 import 'compile_time_constants.dart';
 import 'constants/values.dart';
-import 'core_types.dart' show
-    CoreClasses,
-    CoreTypes;
+import 'core_types.dart' show CoreClasses, CoreTypes;
 import 'dart_backend/dart_backend.dart' as dart_backend;
-import 'dart_types.dart' show
-    DartType,
-    DynamicType,
-    InterfaceType,
-    Types;
+import 'dart_types.dart' show DartType, DynamicType, InterfaceType, Types;
 import 'deferred_load.dart' show DeferredLoadTask, OutputUnit;
 import 'diagnostics/code_location.dart';
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticOptions;
-import 'diagnostics/invariant.dart' show
-    REPORT_EXCESS_RESOLUTION;
-import 'diagnostics/messages.dart' show
-    Message,
-    MessageTemplate;
-import 'dump_info.dart' show
-    DumpInfoTask;
+import 'diagnostics/diagnostic_listener.dart' show DiagnosticReporter;
+import 'diagnostics/invariant.dart' show REPORT_EXCESS_RESOLUTION;
+import 'diagnostics/messages.dart' show Message, MessageTemplate;
+import 'dump_info.dart' show DumpInfoTask;
 import 'elements/elements.dart';
-import 'elements/modelx.dart' show
-    ErroneousElementX,
-    ClassElementX,
-    CompilationUnitElementX,
-    DeferredLoaderGetterElementX,
-    MethodElementX,
-    LibraryElementX,
-    PrefixElementX;
-import 'enqueue.dart' show
-    CodegenEnqueuer,
-    Enqueuer,
-    EnqueueTask,
-    ResolutionEnqueuer,
-    QueueFilter;
-import 'io/source_information.dart' show
-    SourceInformation;
-import 'js_backend/backend_helpers.dart' as js_backend show
-    BackendHelpers;
-import 'js_backend/js_backend.dart' as js_backend show
-    JavaScriptBackend;
-import 'library_loader.dart' show
-    LibraryLoader,
-    LibraryLoaderTask,
-    LoadedLibraries;
-import 'mirrors_used.dart' show
-    MirrorUsageAnalyzerTask;
-import 'common/names.dart' show
-    Selectors;
-import 'null_compiler_output.dart' show
-    NullCompilerOutput,
-    NullSink;
-import 'parser/diet_parser_task.dart' show
-    DietParserTask;
-import 'parser/element_listener.dart' show
-    ScannerOptions;
-import 'parser/parser_task.dart' show
-    ParserTask;
-import 'patch_parser.dart' show
-    PatchParserTask;
-import 'resolution/registry.dart' show
-    ResolutionRegistry;
-import 'resolution/resolution.dart' show
-    ResolverTask;
-import 'resolution/tree_elements.dart' show
-    TreeElementMapping;
-import 'scanner/scanner_task.dart' show
-    ScannerTask;
-import 'serialization/task.dart' show
-    SerializationTask;
-import 'script.dart' show
-    Script;
-import 'ssa/ssa.dart' show
-    HInstruction;
-import 'tracer.dart' show
-    Tracer;
-import 'tokens/token.dart' show
-    StringToken,
-    Token,
-    TokenPair;
-import 'tokens/token_constants.dart' as Tokens show
-    COMMENT_TOKEN,
-    EOF_TOKEN;
-import 'tokens/token_map.dart' show
-    TokenMap;
-import 'tree/tree.dart' show
-    Node,
-    TypeAnnotation;
-import 'typechecker.dart' show
-    TypeCheckerTask;
+import 'elements/modelx.dart'
+    show
+        ErroneousElementX,
+        ClassElementX,
+        CompilationUnitElementX,
+        DeferredLoaderGetterElementX,
+        MethodElementX,
+        LibraryElementX,
+        PrefixElementX;
+import 'enqueue.dart'
+    show
+        CodegenEnqueuer,
+        Enqueuer,
+        EnqueueTask,
+        ResolutionEnqueuer,
+        QueueFilter;
+import 'environment.dart';
+import 'id_generator.dart';
+import 'io/source_information.dart' show SourceInformation;
+import 'js_backend/backend_helpers.dart' as js_backend show BackendHelpers;
+import 'js_backend/js_backend.dart' as js_backend show JavaScriptBackend;
+import 'library_loader.dart'
+    show
+        ElementScanner,
+        LibraryLoader,
+        LibraryLoaderTask,
+        LoadedLibraries,
+        LibraryLoaderListener,
+        ResolvedUriTranslator,
+        ScriptLoader;
+import 'mirrors_used.dart' show MirrorUsageAnalyzerTask;
+import 'common/names.dart' show Selectors;
+import 'null_compiler_output.dart' show NullCompilerOutput, NullSink;
+import 'options.dart' show CompilerOptions, DiagnosticOptions, ParserOptions;
+import 'parser/diet_parser_task.dart' show DietParserTask;
+import 'parser/element_listener.dart' show ScannerOptions;
+import 'parser/parser_task.dart' show ParserTask;
+import 'patch_parser.dart' show PatchParserTask;
+import 'resolution/registry.dart' show ResolutionRegistry;
+import 'resolution/resolution.dart' show ResolverTask;
+import 'resolution/tree_elements.dart' show TreeElementMapping;
+import 'scanner/scanner_task.dart' show ScannerTask;
+import 'serialization/task.dart' show SerializationTask;
+import 'script.dart' show Script;
+import 'ssa/nodes.dart' show HInstruction;
+import 'tracer.dart' show Tracer;
+import 'tokens/token.dart' show StringToken, Token, TokenPair;
+import 'tokens/token_map.dart' show TokenMap;
+import 'tree/tree.dart' show Node, TypeAnnotation;
+import 'typechecker.dart' show TypeCheckerTask;
 import 'types/types.dart' as ti;
-import 'universe/call_structure.dart' show
-    CallStructure;
-import 'universe/selector.dart' show
-    Selector;
-import 'universe/universe.dart' show
-    Universe;
-import 'universe/use.dart' show
-    StaticUse;
-import 'universe/world_impact.dart' show
-    ImpactStrategy,
-    WorldImpact;
-import 'util/util.dart' show
-    Link,
-    Setlet;
-import 'world.dart' show
-    World;
+import 'universe/call_structure.dart' show CallStructure;
+import 'universe/selector.dart' show Selector;
+import 'universe/universe.dart' show Universe;
+import 'universe/use.dart' show StaticUse;
+import 'universe/world_impact.dart' show ImpactStrategy, WorldImpact;
+import 'util/util.dart' show Link, Setlet;
+import 'world.dart' show World;
 
-abstract class Compiler {
-
+abstract class Compiler implements LibraryLoaderListener, IdGenerator {
   final Stopwatch totalCompileTime = new Stopwatch();
-  int nextFreeClassId = 0;
+  final IdGenerator idGenerator = new IdGenerator();
   World world;
   Types types;
   _CompilerCoreTypes _coreTypes;
@@ -184,42 +127,8 @@
   final Registry mirrorDependencies =
       new ResolutionRegistry(null, new TreeElementMapping(null));
 
-  final bool enableMinification;
-
-  final bool useFrequencyNamer;
-
-  /// When `true` emits URIs in the reflection metadata.
-  final bool preserveUris;
-
-  final bool enableTypeAssertions;
-  final bool enableUserAssertions;
-  final bool trustTypeAnnotations;
-  final bool trustPrimitives;
-  final bool trustJSInteropTypeAnnotations;
-  final bool disableTypeInferenceFlag;
-  final Uri deferredMapUri;
-  final bool dumpInfo;
-  final bool useContentSecurityPolicy;
-  final bool enableExperimentalMirrors;
-  final bool enableAssertMessage;
-
-  /**
-   * The maximum size of a concrete type before it widens to dynamic during
-   * concrete type inference.
-   */
-  final int maxConcreteTypeSize;
-  final bool analyzeAllFlag;
-  final bool analyzeOnly;
-
-  /// If true, disable tree-shaking for the main script.
-  final bool analyzeMain;
-
-  /**
-   * If true, skip analysis of method bodies and field initializers. Implies
-   * [analyzeOnly].
-   */
-  final bool analyzeSignaturesOnly;
-  final bool enableNativeLiveTypeAnalysis;
+  /// Options provided from command-line arguments.
+  final CompilerOptions options;
 
   /**
    * If true, stop compilation after type inference is complete. Used for
@@ -227,49 +136,9 @@
    */
   bool stopAfterTypeInference = false;
 
-  /**
-   * If [:true:], comment tokens are collected in [commentMap] during scanning.
-   */
-  final bool preserveComments;
-
-  /// Use the new CPS based backend end.  This flag works for both the Dart and
-  /// JavaScript backend.
-  final bool useCpsIr;
-
-  /**
-   * Is the compiler in verbose mode.
-   */
-  final bool verbose;
-
-  /**
-   * URI of the main source map if the compiler is generating source
-   * maps.
-   */
-  final Uri sourceMapUri;
-
-  /**
-   * URI of the main output if the compiler is generating source maps.
-   */
-  final Uri outputUri;
-
-  /// If `true`, some values are cached for reuse in incremental compilation.
-  /// Incremental compilation is basically calling [run] more than once.
-  final bool hasIncrementalSupport;
-
-  /// If `true` native extension syntax is supported by the frontend.
-  final bool allowNativeExtensions;
-
   /// Output provider from user of Compiler API.
   api.CompilerOutput userOutputProvider;
 
-  /// Generate output even when there are compile-time errors.
-  final bool generateCodeWithCompileTimeErrors;
-
-  /// The compiler is run from the build bot.
-  final bool testMode;
-
-  bool disableInlining = false;
-
   List<Uri> librariesToAnalyzeWhenRun;
 
   /// The set of platform libraries reported as unsupported.
@@ -353,7 +222,11 @@
   /// Tracks elements with compile-time errors.
   final Set<Element> elementsWithCompileTimeErrors = new Set<Element>();
 
-  fromEnvironment(String name) => null;
+  final Environment environment;
+  // TODO(sigmund): delete once we migrate the rest of the compiler to use
+  // `environment` directly.
+  @deprecated
+  fromEnvironment(String name) => environment.valueOf(name);
 
   Element get currentElement => _reporter.currentElement;
 
@@ -380,19 +253,14 @@
   DeferredLoadTask deferredLoadTask;
   MirrorUsageAnalyzerTask mirrorUsageAnalyzerTask;
   DumpInfoTask dumpInfoTask;
-  String buildId;
 
   /// A customizable filter that is applied to enqueued work items.
   QueueFilter enqueuerFilter = new QueueFilter();
 
-  final Selector symbolValidatedConstructorSelector = new Selector.call(
-      const PublicName('validated'), CallStructure.ONE_ARG);
+  final Selector symbolValidatedConstructorSelector =
+      new Selector.call(const PublicName('validated'), CallStructure.ONE_ARG);
 
-  static const String CREATE_INVOCATION_MIRROR =
-      'createInvocationMirror';
-
-  static const String UNDETERMINED_BUILD_ID =
-      "build number could not be determined";
+  static const String CREATE_INVOCATION_MIRROR = 'createInvocationMirror';
 
   bool enabledRuntimeType = false;
   bool enabledFunctionApply = false;
@@ -404,7 +272,7 @@
   Stopwatch progress;
 
   bool get shouldPrintProgress {
-    return verbose && progress.elapsedMilliseconds > 500;
+    return options.verbose && progress.elapsedMilliseconds > 500;
   }
 
   static const int PHASE_SCANNING = 0;
@@ -424,73 +292,26 @@
     compilationFailedInternal = value;
   }
 
-  /// Set by the backend if real reflection is detected in use of dart:mirrors.
-  bool disableTypeInferenceForMirrors = false;
-
-  Compiler({this.enableTypeAssertions: false,
-            this.enableUserAssertions: false,
-            this.trustTypeAnnotations: false,
-            this.trustPrimitives: false,
-            this.trustJSInteropTypeAnnotations: false,
-            bool disableTypeInferenceFlag: false,
-            this.maxConcreteTypeSize: 5,
-            this.enableMinification: false,
-            this.preserveUris: false,
-            this.enableNativeLiveTypeAnalysis: false,
-            bool emitJavaScript: true,
-            bool dart2dartMultiFile: false,
-            bool generateSourceMap: true,
-            bool analyzeAllFlag: false,
-            bool analyzeOnly: false,
-            this.analyzeMain: false,
-            bool analyzeSignaturesOnly: false,
-            this.preserveComments: false,
-            this.useCpsIr: false,
-            this.useFrequencyNamer: false,
-            this.verbose: false,
-            this.sourceMapUri: null,
-            this.outputUri: null,
-            this.buildId: UNDETERMINED_BUILD_ID,
-            this.deferredMapUri: null,
-            this.dumpInfo: false,
-            bool useStartupEmitter: false,
-            bool enableConditionalDirectives: false,
-            this.useContentSecurityPolicy: false,
-            bool hasIncrementalSupport: false,
-            this.enableExperimentalMirrors: false,
-            this.enableAssertMessage: false,
-            this.allowNativeExtensions: false,
-            this.generateCodeWithCompileTimeErrors: false,
-            this.testMode: false,
-            DiagnosticOptions diagnosticOptions,
-            api.CompilerOutput outputProvider,
-            List<String> strips: const []})
-      : this.disableTypeInferenceFlag =
-          disableTypeInferenceFlag || !emitJavaScript,
-        this.analyzeOnly =
-            analyzeOnly || analyzeSignaturesOnly || analyzeAllFlag,
-        this.analyzeSignaturesOnly = analyzeSignaturesOnly,
-        this.analyzeAllFlag = analyzeAllFlag,
-        this.hasIncrementalSupport = hasIncrementalSupport,
-        cacheStrategy = new CacheStrategy(hasIncrementalSupport),
+  Compiler(
+      {CompilerOptions options,
+      api.CompilerOutput outputProvider,
+      this.environment: const _EmptyEnvironment()})
+      : this.options = options,
+        this.cacheStrategy = new CacheStrategy(options.hasIncrementalSupport),
         this.userOutputProvider = outputProvider == null
-            ? const NullCompilerOutput() : outputProvider {
-    if (hasIncrementalSupport) {
-      // TODO(ahe): This is too much. Any method from platform and package
-      // libraries can be inlined.
-      disableInlining = true;
-    }
+            ? const NullCompilerOutput()
+            : outputProvider {
     world = new World(this);
     // TODO(johnniwinther): Initialize core types in [initializeCoreClasses] and
     // make its field final.
-    _reporter = new _CompilerDiagnosticReporter(this, diagnosticOptions);
+    _reporter = new _CompilerDiagnosticReporter(this, options);
     _parsing = new _CompilerParsing(this);
     _resolution = new _CompilerResolution(this);
     _coreTypes = new _CompilerCoreTypes(_resolution);
     types = new Types(_resolution);
     tracer = new Tracer(this, this.outputProvider);
 
-    if (verbose) {
+    if (options.verbose) {
       progress = new Stopwatch()..start();
     }
 
@@ -498,31 +319,41 @@
     // for global dependencies.
     globalDependencies = new GlobalDependencyRegistry(this);
 
-    if (emitJavaScript) {
-      js_backend.JavaScriptBackend jsBackend =
-          new js_backend.JavaScriptBackend(
-              this, generateSourceMap: generateSourceMap,
-              useStartupEmitter: useStartupEmitter);
+    if (options.emitJavaScript) {
+      js_backend.JavaScriptBackend jsBackend = new js_backend.JavaScriptBackend(
+          this,
+          generateSourceMap: options.generateSourceMap,
+          useStartupEmitter: options.useStartupEmitter,
+          useNewSourceInfo: options.useNewSourceInfo);
       backend = jsBackend;
     } else {
-      backend = new dart_backend.DartBackend(this, strips,
-                                             multiFile: dart2dartMultiFile);
-      if (dumpInfo) {
+      backend = new dart_backend.DartBackend(this, options.strips,
+          multiFile: options.dart2dartMultiFile);
+      if (options.dumpInfo) {
         throw new ArgumentError('--dump-info is not supported for dart2dart.');
       }
     }
 
+    if (options.dumpInfo && options.useStartupEmitter) {
+      throw new ArgumentError(
+          '--dump-info is not supported with the fast startup emitter');
+    }
+
     tasks = [
-      libraryLoader = new LibraryLoaderTask(this),
+      dietParser = new DietParserTask(this, parsing.parserOptions, idGenerator),
+      scanner = createScannerTask(),
       serialization = new SerializationTask(this),
-      scanner = new ScannerTask(this),
-      dietParser = new DietParserTask(
-          this, enableConditionalDirectives: enableConditionalDirectives),
-      parser = new ParserTask(
-          this, enableConditionalDirectives: enableConditionalDirectives),
-      patchParser = new PatchParserTask(
-          this, enableConditionalDirectives: enableConditionalDirectives),
-      resolver = new ResolverTask(this, backend.constantCompilerTask),
+      libraryLoader = new LibraryLoaderTask(
+          this,
+          new _ResolvedUriTranslator(this),
+          new _ScriptLoader(this),
+          new _ElementScanner(scanner),
+          this.serialization,
+          this,
+          environment),
+      parser = new ParserTask(this, parsing.parserOptions),
+      patchParser = new PatchParserTask(this, parsing.parserOptions),
+      resolver = createResolverTask(),
       closureToClassMapper = new closureMapping.ClosureTask(this),
       checker = new TypeCheckerTask(this),
       typesTask = new ti.TypesTask(this),
@@ -537,20 +368,32 @@
     tasks.addAll(backend.tasks);
   }
 
+  /// Creates the scanner task.
+  ///
+  /// Override this to mock the scanner for testing.
+  ScannerTask createScannerTask() => new ScannerTask(this, dietParser,
+      preserveComments: options.preserveComments, commentMap: commentMap);
+
+  /// Creates the resolver task.
+  ///
+  /// Override this to mock the resolver for testing.
+  ResolverTask createResolverTask() {
+    return new ResolverTask(this, backend.constantCompilerTask);
+  }
+
   Universe get resolverWorld => enqueuer.resolution.universe;
   Universe get codegenWorld => enqueuer.codegen.universe;
 
-  bool get hasBuildId => buildId != UNDETERMINED_BUILD_ID;
-
-  bool get analyzeAll => analyzeAllFlag || compileAll;
+  bool get analyzeAll => options.analyzeAll || compileAll;
 
   bool get compileAll => false;
 
-  bool get disableTypeInference {
-    return disableTypeInferenceFlag || compilationFailed;
-  }
+  bool get disableTypeInference =>
+      options.disableTypeInference || compilationFailed;
 
-  int getNextFreeClassId() => nextFreeClassId++;
+  // TODO(het): remove this and pass idGenerator directly instead
+  @deprecated
+  int getNextFreeId() => idGenerator.getNextFreeId();
 
   void unimplemented(Spannable spannable, String methodName) {
     reporter.internalError(spannable, "$methodName not implemented.");
@@ -639,7 +482,7 @@
     // The maximum number of full imports chains to process.
     final int chainLimit = 10000;
     // The maximum number of imports chains to show.
-    final int compactChainLimit = verbose ? 20 : 10;
+    final int compactChainLimit = options.verbose ? 20 : 10;
     int chainCount = 0;
     loadedLibraries.forEachImportChain(uri,
         callback: (Link<Uri> importChainReversed) {
@@ -648,20 +491,18 @@
           new UriLocation(importChainReversed.head);
       compactImportChain = compactImportChain.prepend(currentCodeLocation);
       for (Link<Uri> link = importChainReversed.tail;
-           !link.isEmpty;
-           link = link.tail) {
+          !link.isEmpty;
+          link = link.tail) {
         Uri uri = link.head;
         if (!currentCodeLocation.inSameLocation(uri)) {
           currentCodeLocation =
-              verbose ? new UriLocation(uri) : new CodeLocation(uri);
-          compactImportChain =
-              compactImportChain.prepend(currentCodeLocation);
+              options.verbose ? new UriLocation(uri) : new CodeLocation(uri);
+          compactImportChain = compactImportChain.prepend(currentCodeLocation);
         }
       }
-      String importChain =
-          compactImportChain.map((CodeLocation codeLocation) {
-            return codeLocation.relativize(rootUri);
-          }).join(' => ');
+      String importChain = compactImportChain.map((CodeLocation codeLocation) {
+        return codeLocation.relativize(rootUri);
+      }).join(' => ');
 
       if (!importChains.contains(importChain)) {
         if (importChains.length > compactChainLimit) {
@@ -704,11 +545,12 @@
         if (loadedLibraries.containsLibrary(uri)) {
           Set<String> importChains =
               computeImportChainsFor(loadedLibraries, uri);
-          reporter.reportInfo(NO_LOCATION_SPANNABLE,
-             MessageKind.DISALLOWED_LIBRARY_IMPORT,
-              {'uri': uri,
-               'importChain': importChains.join(
-                   MessageTemplate.DISALLOWED_LIBRARY_IMPORT_PADDING)});
+          reporter.reportInfo(
+              NO_LOCATION_SPANNABLE, MessageKind.DISALLOWED_LIBRARY_IMPORT, {
+            'uri': uri,
+            'importChain': importChains
+                .join(MessageTemplate.DISALLOWED_LIBRARY_IMPORT_PADDING)
+          });
         }
       }
 
@@ -721,27 +563,28 @@
       if (importsMirrorsLibrary && !backend.supportsReflection) {
         Set<String> importChains =
             computeImportChainsFor(loadedLibraries, Uris.dart_mirrors);
-        reporter.reportErrorMessage(
-            NO_LOCATION_SPANNABLE,
-            MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND,
-            {'importChain': importChains.join(
-                MessageTemplate.MIRRORS_NOT_SUPPORTED_BY_BACKEND_PADDING)});
-      } else if (importsMirrorsLibrary && !enableExperimentalMirrors) {
+        reporter.reportErrorMessage(NO_LOCATION_SPANNABLE,
+            MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND, {
+          'importChain': importChains
+              .join(MessageTemplate.MIRRORS_NOT_SUPPORTED_BY_BACKEND_PADDING)
+        });
+      } else if (importsMirrorsLibrary && !options.enableExperimentalMirrors) {
         Set<String> importChains =
             computeImportChainsFor(loadedLibraries, Uris.dart_mirrors);
         reporter.reportWarningMessage(
-            NO_LOCATION_SPANNABLE,
-            MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
-            {'importChain': importChains.join(
-                 MessageTemplate.IMPORT_EXPERIMENTAL_MIRRORS_PADDING)});
+            NO_LOCATION_SPANNABLE, MessageKind.IMPORT_EXPERIMENTAL_MIRRORS, {
+          'importChain': importChains
+              .join(MessageTemplate.IMPORT_EXPERIMENTAL_MIRRORS_PADDING)
+        });
       }
 
       coreClasses.functionClass.ensureResolved(resolution);
       functionApplyMethod =
           coreClasses.functionClass.lookupLocalMember('apply');
 
-      if (preserveComments) {
-        return libraryLoader.loadLibrary(Uris.dart_mirrors)
+      if (options.preserveComments) {
+        return libraryLoader
+            .loadLibrary(Uris.dart_mirrors)
             .then((LibraryElement libraryElement) {
           documentClass = libraryElement.find('Comment');
         });
@@ -754,9 +597,8 @@
     if (field == null) return false;
     if (!resolution.hasBeenResolved(field)) return false;
     if (proxyConstant == null) {
-      proxyConstant =
-          constants.getConstantValue(
-              resolver.constantCompiler.compileConstant(field));
+      proxyConstant = constants
+          .getConstantValue(resolver.constantCompiler.compileConstant(field));
     }
     return proxyConstant == value;
   }
@@ -764,7 +606,8 @@
   Element findRequiredElement(LibraryElement library, String name) {
     var element = library.find(name);
     if (element == null) {
-      reporter.internalError(library,
+      reporter.internalError(
+          library,
           "The library '${library.canonicalUri}' does not contain required "
           "element: '$name'.");
     }
@@ -781,8 +624,8 @@
     } else if (coreClasses.symbolClass == cls) {
       symbolConstructor = cls.constructors.head;
     } else if (symbolImplementationClass == cls) {
-      symbolValidatedConstructor = cls.lookupConstructor(
-          symbolValidatedConstructorSelector.name);
+      symbolValidatedConstructor =
+          cls.lookupConstructor(symbolValidatedConstructorSelector.name);
     } else if (mirrorsUsedClass == cls) {
       mirrorsUsedConstructor = cls.constructors.head;
     } else if (coreClasses.intClass == cls) {
@@ -857,24 +700,24 @@
     // The selector objects held in static fields must remain canonical.
     for (Selector selector in Selectors.ALL) {
       Selector.canonicalizedValues
-        .putIfAbsent(selector.hashCode, () => <Selector>[])
-        .add(selector);
+          .putIfAbsent(selector.hashCode, () => <Selector>[])
+          .add(selector);
     }
 
-    assert(uri != null || analyzeOnly || hasIncrementalSupport);
+    assert(uri != null || options.analyzeOnly || options.hasIncrementalSupport);
     return new Future.sync(() {
       if (librariesToAnalyzeWhenRun != null) {
         return Future.forEach(librariesToAnalyzeWhenRun, (libraryUri) {
-          reporter.log('Analyzing $libraryUri ($buildId)');
+          reporter.log('Analyzing $libraryUri (${options.buildId})');
           return libraryLoader.loadLibrary(libraryUri);
         });
       }
     }).then((_) {
       if (uri != null) {
-        if (analyzeOnly) {
-          reporter.log('Analyzing $uri ($buildId)');
+        if (options.analyzeOnly) {
+          reporter.log('Analyzing $uri (${options.buildId})');
         } else {
-          reporter.log('Compiling $uri ($buildId)');
+          reporter.log('Compiling $uri (${options.buildId})');
         }
         return libraryLoader.loadLibrary(uri).then((LibraryElement library) {
           mainApp = library;
@@ -891,17 +734,15 @@
     Element main = mainApp.findExported(Identifiers.main);
     ErroneousElement errorElement = null;
     if (main == null) {
-      if (analyzeOnly) {
+      if (options.analyzeOnly) {
         if (!analyzeAll) {
-          errorElement = new ErroneousElementX(
-              MessageKind.CONSIDER_ANALYZE_ALL, {'main': Identifiers.main},
-              Identifiers.main, mainApp);
+          errorElement = new ErroneousElementX(MessageKind.CONSIDER_ANALYZE_ALL,
+              {'main': Identifiers.main}, Identifiers.main, mainApp);
         }
       } else {
         // Compilation requires a main method.
-        errorElement = new ErroneousElementX(
-            MessageKind.MISSING_MAIN, {'main': Identifiers.main},
-            Identifiers.main, mainApp);
+        errorElement = new ErroneousElementX(MessageKind.MISSING_MAIN,
+            {'main': Identifiers.main}, Identifiers.main, mainApp);
       }
       mainFunction = backend.helperForMissingMain();
     } else if (main.isError && main.isSynthesized) {
@@ -912,9 +753,8 @@
       }
       mainFunction = backend.helperForBadMain();
     } else if (!main.isFunction) {
-      errorElement = new ErroneousElementX(
-          MessageKind.MAIN_NOT_A_FUNCTION, {'main': Identifiers.main},
-          Identifiers.main, main);
+      errorElement = new ErroneousElementX(MessageKind.MAIN_NOT_A_FUNCTION,
+          {'main': Identifiers.main}, Identifiers.main, main);
       mainFunction = backend.helperForBadMain();
     } else {
       mainFunction = main;
@@ -925,7 +765,8 @@
         parameters.orderedForEachParameter((Element parameter) {
           if (index++ < 2) return;
           errorElement = new ErroneousElementX(
-              MessageKind.MAIN_WITH_EXTRA_PARAMETER, {'main': Identifiers.main},
+              MessageKind.MAIN_WITH_EXTRA_PARAMETER,
+              {'main': Identifiers.main},
               Identifiers.main,
               parameter);
           mainFunction = backend.helperForMainArity();
@@ -935,7 +776,7 @@
       }
     }
     if (mainFunction == null) {
-      if (errorElement == null && !analyzeOnly && !analyzeAll) {
+      if (errorElement == null && !options.analyzeOnly && !analyzeAll) {
         reporter.internalError(mainApp, "Problem with '${Identifiers.main}'.");
       } else {
         mainFunction = errorElement;
@@ -944,8 +785,7 @@
     if (errorElement != null &&
         errorElement.isSynthesized &&
         !mainApp.isSynthesized) {
-      reporter.reportWarningMessage(
-          errorElement, errorElement.messageKind,
+      reporter.reportWarningMessage(errorElement, errorElement.messageKind,
           errorElement.messageArguments);
     }
   }
@@ -957,14 +797,13 @@
   ///
   /// This operation assumes an unclosed resolution queue and is only supported
   /// when the '--analyze-main' option is used.
-  Future<LibraryElement> analyzeUri(
-      Uri libraryUri,
+  Future<LibraryElement> analyzeUri(Uri libraryUri,
       {bool skipLibraryWithPartOfTag: true}) {
-    assert(analyzeMain);
-    reporter.log('Analyzing $libraryUri ($buildId)');
-    return libraryLoader.loadLibrary(
-        libraryUri, skipFileWithPartOfTag: true).then(
-            (LibraryElement library) {
+    assert(options.analyzeMain);
+    reporter.log('Analyzing $libraryUri (${options.buildId})');
+    return libraryLoader
+        .loadLibrary(libraryUri, skipFileWithPartOfTag: true)
+        .then((LibraryElement library) {
       if (library == null) return null;
       fullyEnqueueLibrary(library, enqueuer.resolution);
       emptyQueue(enqueuer.resolution);
@@ -986,22 +825,23 @@
     deferredLoadTask.beforeResolution(this);
     impactStrategy = backend.createImpactStrategy(
         supportDeferredLoad: deferredLoadTask.isProgramSplit,
-        supportDumpInfo: dumpInfo);
+        supportDumpInfo: options.dumpInfo,
+        supportSerialization: serialization.supportSerialization);
 
     phase = PHASE_RESOLVING;
     if (analyzeAll) {
       libraryLoader.libraries.forEach((LibraryElement library) {
-      reporter.log('Enqueuing ${library.canonicalUri}');
+        reporter.log('Enqueuing ${library.canonicalUri}');
         fullyEnqueueLibrary(library, enqueuer.resolution);
       });
-    } else if (analyzeMain) {
+    } else if (options.analyzeMain) {
       if (mainApp != null) {
         fullyEnqueueLibrary(mainApp, enqueuer.resolution);
       }
       if (librariesToAnalyzeWhenRun != null) {
         for (Uri libraryUri in librariesToAnalyzeWhenRun) {
-          fullyEnqueueLibrary(libraryLoader.lookupLibrary(libraryUri),
-              enqueuer.resolution);
+          fullyEnqueueLibrary(
+              libraryLoader.lookupLibrary(libraryUri), enqueuer.resolution);
         }
       }
     }
@@ -1015,14 +855,14 @@
 
     _reporter.reportSuppressedMessagesSummary();
 
-    if (compilationFailed){
-      if (!generateCodeWithCompileTimeErrors) return;
+    if (compilationFailed) {
+      if (!options.generateCodeWithCompileTimeErrors) return;
       if (!backend.enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) {
         return;
       }
     }
 
-    if (analyzeOnly) {
+    if (options.analyzeOnly) {
       if (!analyzeAll && !compilationFailed) {
         // No point in reporting unused code when [analyzeAll] is true: all
         // code is artificially used.
@@ -1068,7 +908,7 @@
 
     int programSize = backend.assembleProgram();
 
-    if (dumpInfo) {
+    if (options.dumpInfo) {
       dumpInfoTask.reportSize(programSize);
       dumpInfoTask.dumpInfo();
     }
@@ -1090,8 +930,7 @@
       ClassElement cls = element;
       cls.ensureResolved(resolution);
       cls.forEachLocalMember(enqueuer.resolution.addToWorkList);
-      backend.registerInstantiatedType(
-          cls.rawType, world, globalDependencies);
+      backend.registerInstantiatedType(cls.rawType, world, globalDependencies);
     } else {
       world.addToWorkList(element);
     }
@@ -1115,7 +954,7 @@
    */
   void emptyQueue(Enqueuer world) {
     world.forEach((WorkItem work) {
-    reporter.withCurrentElement(work.element, () {
+      reporter.withCurrentElement(work.element, () {
         world.applyImpact(work.element, work.run(this, world));
       });
     });
@@ -1139,7 +978,7 @@
       }
       world.addToWorkList(main);
     }
-    if (verbose) {
+    if (options.verbose) {
       progress.reset();
     }
     emptyQueue(world);
@@ -1185,29 +1024,28 @@
     }
     reporter.log('Excess resolution work: ${resolved.length}.');
     for (Element e in resolved) {
-      reporter.reportWarningMessage(e,
-          MessageKind.GENERIC,
+      reporter.reportWarningMessage(e, MessageKind.GENERIC,
           {'text': 'Warning: $e resolved but not compiled.'});
     }
   }
 
   WorldImpact analyzeElement(Element element) {
-    assert(invariant(element,
-           element.impliesType ||
-           element.isField ||
-           element.isFunction ||
-           element.isConstructor ||
-           element.isGetter ||
-           element.isSetter,
-           message: 'Unexpected element kind: ${element.kind}'));
+    assert(invariant(
+        element,
+        element.impliesType ||
+            element.isField ||
+            element.isFunction ||
+            element.isConstructor ||
+            element.isGetter ||
+            element.isSetter,
+        message: 'Unexpected element kind: ${element.kind}'));
     assert(invariant(element, element is AnalyzableElement,
         message: 'Element $element is not analyzable.'));
     assert(invariant(element, element.isDeclaration));
     return resolution.computeWorldImpact(element);
   }
 
-  WorldImpact analyze(ResolutionWorkItem work,
-                      ResolutionEnqueuer world) {
+  WorldImpact analyze(ResolutionWorkItem work, ResolutionEnqueuer world) {
     assert(invariant(work.element, identical(world, enqueuer.resolution)));
     assert(invariant(work.element, !work.isAnalyzed,
         message: 'Element ${work.element} has already been analyzed'));
@@ -1215,8 +1053,7 @@
       // TODO(ahe): Add structured diagnostics to the compiler API and
       // use it to separate this from the --verbose option.
       if (phase == PHASE_RESOLVING) {
-        reporter.log(
-            'Resolved ${enqueuer.resolution.processedElements.length} '
+        reporter.log('Resolved ${enqueuer.resolution.processedElements.length} '
             'elements.');
         progress.reset();
       }
@@ -1236,16 +1073,15 @@
     if (shouldPrintProgress) {
       // TODO(ahe): Add structured diagnostics to the compiler API and
       // use it to separate this from the --verbose option.
-      reporter.log(
-          'Compiled ${enqueuer.codegen.generatedCode.length} methods.');
+      reporter
+          .log('Compiled ${enqueuer.codegen.generatedCode.length} methods.');
       progress.reset();
     }
     return backend.codegen(work);
   }
 
   void reportDiagnostic(DiagnosticMessage message,
-                        List<DiagnosticMessage> infos,
-                        api.Diagnostic kind);
+      List<DiagnosticMessage> infos, api.Diagnostic kind);
 
   void reportCrashInUserCode(String message, exception, stackTrace) {
     _reporter.onCrashInUserCode(message, exception, stackTrace);
@@ -1254,12 +1090,12 @@
   /// Messages for which compile-time errors are reported but compilation
   /// continues regardless.
   static const List<MessageKind> BENIGN_ERRORS = const <MessageKind>[
-      MessageKind.INVALID_METADATA,
-      MessageKind.INVALID_METADATA_GENERIC,
+    MessageKind.INVALID_METADATA,
+    MessageKind.INVALID_METADATA_GENERIC,
   ];
 
   bool markCompilationAsFailed(DiagnosticMessage message, api.Diagnostic kind) {
-    if (testMode) {
+    if (options.testMode) {
       // When in test mode, i.e. on the build-bot, we always stop compilation.
       return true;
     }
@@ -1270,13 +1106,13 @@
   }
 
   void fatalDiagnosticReported(DiagnosticMessage message,
-                               List<DiagnosticMessage> infos,
-                               api.Diagnostic kind) {
+      List<DiagnosticMessage> infos, api.Diagnostic kind) {
     if (markCompilationAsFailed(message, kind)) {
       compilationFailed = true;
     }
   }
 
+  // TODO(sigmund): move this dart doc somewhere else too.
   /**
    * Translates the [resolvedUri] into a readable URI.
    *
@@ -1290,8 +1126,8 @@
    *
    * See [LibraryLoader] for terminology on URIs.
    */
-  Uri translateResolvedUri(LibraryElement importingLibrary,
-                           Uri resolvedUri, Spannable spannable) {
+  Uri translateResolvedUri(
+      LibraryElement importingLibrary, Uri resolvedUri, Spannable spannable) {
     unimplemented(importingLibrary, 'Compiler.translateResolvedUri');
     return null;
   }
@@ -1301,18 +1137,11 @@
    *
    * See [LibraryLoader] for terminology on URIs.
    */
-  Future<Script> readScript(Spannable node, Uri readableUri) {
+  Future<Script> readScript(Uri readableUri, [Spannable node]) {
     unimplemented(node, 'Compiler.readScript');
     return null;
   }
 
-  /// Compatible with [readScript] and used by [LibraryLoader] to create
-  /// synthetic scripts to recover from read errors and bad URIs.
-  Future<Script> synthesizeScript(Spannable node, Uri readableUri) {
-    unimplemented(node, 'Compiler.synthesizeScript');
-    return null;
-  }
-
   Element lookupElementIn(ScopeContainerElement container, String name) {
     Element element = container.localLookup(name);
     if (element == null) {
@@ -1323,28 +1152,6 @@
 
   bool get isMockCompilation => false;
 
-  Token processAndStripComments(Token currentToken) {
-    Token firstToken = currentToken;
-    Token prevToken;
-    while (currentToken.kind != Tokens.EOF_TOKEN) {
-      if (identical(currentToken.kind, Tokens.COMMENT_TOKEN)) {
-        Token firstCommentToken = currentToken;
-        while (identical(currentToken.kind, Tokens.COMMENT_TOKEN)) {
-          currentToken = currentToken.next;
-        }
-        commentMap[currentToken] = firstCommentToken;
-        if (prevToken == null) {
-          firstToken = currentToken;
-        } else {
-          prevToken.next = currentToken;
-        }
-      }
-      prevToken = currentToken;
-      currentToken = currentToken.next;
-    }
-    return firstToken;
-  }
-
   void reportUnusedCode() {
     void checkLive(member) {
       if (member.isMalformed) return;
@@ -1419,8 +1226,8 @@
       userCodeLocations.add(new CodeLocation(mainApp.canonicalUri));
     }
     if (librariesToAnalyzeWhenRun != null) {
-      userCodeLocations.addAll(librariesToAnalyzeWhenRun.map(
-          (Uri uri) => new CodeLocation(uri)));
+      userCodeLocations.addAll(
+          librariesToAnalyzeWhenRun.map((Uri uri) => new CodeLocation(uri)));
     }
     if (userCodeLocations.isEmpty && assumeInUserCode) {
       // Assume in user code since [mainApp] has not been set yet.
@@ -1447,10 +1254,6 @@
     return libraryUri;
   }
 
-  void diagnoseCrashInUserCode(String message, exception, stackTrace) {
-    // Overridden by Compiler in apiimpl.dart.
-  }
-
   void forgetElement(Element element) {
     enqueuer.forgetElement(element);
     if (element is MemberElement) {
@@ -1468,7 +1271,7 @@
 
   EventSink<String> outputProvider(String name, String extension) {
     if (compilationFailed) {
-      if (!generateCodeWithCompileTimeErrors || testMode) {
+      if (!options.generateCodeWithCompileTimeErrors || options.testMode) {
         // Disable output in test mode: The build bot currently uses the time
         // stamp of the generated file to determine whether the output is
         // up-to-date.
@@ -1555,8 +1358,7 @@
   }
 
   @override
-  InterfaceType mapType([DartType keyType,
-                         DartType valueType]) {
+  InterfaceType mapType([DartType keyType, DartType valueType]) {
     mapClass.ensureResolved(resolution);
     InterfaceType type = mapClass.rawType;
     if (keyType == null && valueType == null) {
@@ -1655,9 +1457,7 @@
 
   Element get currentElement => _currentElement;
 
-  DiagnosticMessage createMessage(
-      Spannable spannable,
-      MessageKind messageKind,
+  DiagnosticMessage createMessage(Spannable spannable, MessageKind messageKind,
       [Map arguments = const {}]) {
     SourceSpan span = spanFromSpannable(spannable);
     MessageTemplate template = MessageTemplate.TEMPLATES[messageKind];
@@ -1665,64 +1465,58 @@
     return new DiagnosticMessage(span, spannable, message);
   }
 
-  void reportError(
-      DiagnosticMessage message,
+  void reportError(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
     reportDiagnosticInternal(message, infos, api.Diagnostic.ERROR);
   }
 
-  void reportWarning(
-      DiagnosticMessage message,
+  void reportWarning(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
     reportDiagnosticInternal(message, infos, api.Diagnostic.WARNING);
   }
 
-  void reportHint(
-      DiagnosticMessage message,
+  void reportHint(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
     reportDiagnosticInternal(message, infos, api.Diagnostic.HINT);
   }
 
   @deprecated
   void reportInfo(Spannable node, MessageKind messageKind,
-                  [Map arguments = const {}]) {
-    reportDiagnosticInternal(
-        createMessage(node, messageKind, arguments),
-        const <DiagnosticMessage>[],
-        api.Diagnostic.INFO);
+      [Map arguments = const {}]) {
+    reportDiagnosticInternal(createMessage(node, messageKind, arguments),
+        const <DiagnosticMessage>[], api.Diagnostic.INFO);
   }
 
   void reportDiagnosticInternal(DiagnosticMessage message,
-                                List<DiagnosticMessage> infos,
-                                api.Diagnostic kind) {
+      List<DiagnosticMessage> infos, api.Diagnostic kind) {
     if (!options.showAllPackageWarnings &&
         message.spannable != NO_LOCATION_SPANNABLE) {
       switch (kind) {
-      case api.Diagnostic.WARNING:
-      case api.Diagnostic.HINT:
-        Element element = elementFromSpannable(message.spannable);
-        if (!compiler.inUserCode(element, assumeInUserCode: true)) {
-          Uri uri = compiler.getCanonicalUri(element);
-          if (options.showPackageWarningsFor(uri)) {
-            reportDiagnostic(message, infos, kind);
+        case api.Diagnostic.WARNING:
+        case api.Diagnostic.HINT:
+          Element element = elementFromSpannable(message.spannable);
+          if (!compiler.inUserCode(element, assumeInUserCode: true)) {
+            Uri uri = compiler.getCanonicalUri(element);
+            if (options.showPackageWarningsFor(uri)) {
+              reportDiagnostic(message, infos, kind);
+              return;
+            }
+            SuppressionInfo info = suppressedWarnings.putIfAbsent(
+                uri, () => new SuppressionInfo());
+            if (kind == api.Diagnostic.WARNING) {
+              info.warnings++;
+            } else {
+              info.hints++;
+            }
+            lastDiagnosticWasFiltered = true;
             return;
           }
-          SuppressionInfo info =
-              suppressedWarnings.putIfAbsent(uri, () => new SuppressionInfo());
-          if (kind == api.Diagnostic.WARNING) {
-            info.warnings++;
-          } else {
-            info.hints++;
+          break;
+        case api.Diagnostic.INFO:
+          if (lastDiagnosticWasFiltered) {
+            return;
           }
-          lastDiagnosticWasFiltered = true;
-          return;
-        }
-        break;
-      case api.Diagnostic.INFO:
-        if (lastDiagnosticWasFiltered) {
-          return;
-        }
-        break;
+          break;
       }
     }
     lastDiagnosticWasFiltered = false;
@@ -1730,13 +1524,11 @@
   }
 
   void reportDiagnostic(DiagnosticMessage message,
-                        List<DiagnosticMessage> infos,
-                        api.Diagnostic kind) {
+      List<DiagnosticMessage> infos, api.Diagnostic kind) {
     compiler.reportDiagnostic(message, infos, kind);
     if (kind == api.Diagnostic.ERROR ||
         kind == api.Diagnostic.CRASH ||
-        (options.fatalWarnings &&
-         kind == api.Diagnostic.WARNING)) {
+        (options.fatalWarnings && kind == api.Diagnostic.WARNING)) {
       compiler.fatalDiagnosticReported(message, infos, kind);
     }
   }
@@ -1776,8 +1568,8 @@
   }
 
   void reportAssertionFailure(SpannableAssertionFailure ex) {
-    String message = (ex.message != null) ? tryToString(ex.message)
-                                          : tryToString(ex);
+    String message =
+        (ex.message != null) ? tryToString(ex.message) : tryToString(ex);
     reportDiagnosticInternal(
         createMessage(ex.node, MessageKind.GENERIC, {'text': message}),
         const <DiagnosticMessage>[],
@@ -1794,7 +1586,6 @@
     if (uri == null && currentElement != null) {
       uri = currentElement.compilationUnit.script.resourceUri;
       assert(invariant(currentElement, () {
-
         bool sameToken(Token token, Token sought) {
           if (token == sought) return true;
           if (token.stringValue == '>>') {
@@ -1951,7 +1742,8 @@
 
   Element _elementFromHInstruction(HInstruction instruction) {
     return instruction.sourceElement is Element
-        ? instruction.sourceElement : null;
+        ? instruction.sourceElement
+        : null;
   }
 
   internalError(Spannable node, reason) {
@@ -1966,17 +1758,14 @@
   void unhandledExceptionOnElement(Element element) {
     if (hasCrashed) return;
     hasCrashed = true;
-    reportDiagnostic(
-        createMessage(element, MessageKind.COMPILER_CRASHED),
-        const <DiagnosticMessage>[],
-        api.Diagnostic.CRASH);
+    reportDiagnostic(createMessage(element, MessageKind.COMPILER_CRASHED),
+        const <DiagnosticMessage>[], api.Diagnostic.CRASH);
     pleaseReportCrash();
   }
 
   void pleaseReportCrash() {
-    print(
-        MessageTemplate.TEMPLATES[MessageKind.PLEASE_REPORT_THE_CRASH]
-            .message({'buildId': compiler.buildId}));
+    print(MessageTemplate.TEMPLATES[MessageKind.PLEASE_REPORT_THE_CRASH]
+        .message({'buildId': compiler.options.buildId}));
   }
 
   /// Finds the approximate [Element] for [node]. [currentElement] is used as
@@ -1996,10 +1785,8 @@
   void log(message) {
     Message msg = MessageTemplate.TEMPLATES[MessageKind.GENERIC]
         .message({'text': '$message'});
-    reportDiagnostic(
-        new DiagnosticMessage(null, null, msg),
-        const <DiagnosticMessage>[],
-        api.Diagnostic.VERBOSE_INFO);
+    reportDiagnostic(new DiagnosticMessage(null, null, msg),
+        const <DiagnosticMessage>[], api.Diagnostic.VERBOSE_INFO);
   }
 
   String tryToString(object) {
@@ -2019,8 +1806,7 @@
         } else {
           reportDiagnostic(
               createMessage(
-                  new SourceSpan(uri, 0, 0),
-                  MessageKind.COMPILER_CRASHED),
+                  new SourceSpan(uri, 0, 0), MessageKind.COMPILER_CRASHED),
               const <DiagnosticMessage>[],
               api.Diagnostic.CRASH);
         }
@@ -2049,14 +1835,10 @@
         }
         MessageTemplate template = MessageTemplate.TEMPLATES[kind];
         Message message = template.message(
-            {'warnings': info.warnings,
-             'hints': info.hints,
-             'uri': uri},
-             options.terseDiagnostics);
-        reportDiagnostic(
-            new DiagnosticMessage(null, null, message),
-            const <DiagnosticMessage>[],
-            api.Diagnostic.HINT);
+            {'warnings': info.warnings, 'hints': info.hints, 'uri': uri},
+            options.terseDiagnostics);
+        reportDiagnostic(new DiagnosticMessage(null, null, message),
+            const <DiagnosticMessage>[], api.Diagnostic.HINT);
       });
     }
   }
@@ -2065,7 +1847,10 @@
 // TODO(johnniwinther): Move [ResolverTask] here.
 class _CompilerResolution implements Resolution {
   final Compiler compiler;
+  final Map<Element, ResolutionImpact> _resolutionImpactCache =
+      <Element, ResolutionImpact>{};
   final Map<Element, WorldImpact> _worldImpactCache = <Element, WorldImpact>{};
+  bool retainCachesForTesting = false;
 
   _CompilerResolution(this.compiler);
 
@@ -2109,6 +1894,38 @@
   }
 
   @override
+  bool hasResolvedAst(Element element) {
+    return element is AstElement &&
+        hasBeenResolved(element) &&
+        element.hasResolvedAst;
+  }
+
+  @override
+  ResolvedAst getResolvedAst(Element element) {
+    if (hasResolvedAst(element)) {
+      AstElement astElement = element;
+      return astElement.resolvedAst;
+    }
+    assert(invariant(element, hasResolvedAst(element),
+        message: "ResolvedAst not available for $element."));
+    return null;
+  }
+
+
+  @override
+  bool hasResolutionImpact(Element element) {
+    return _resolutionImpactCache.containsKey(element);
+  }
+
+  @override
+  ResolutionImpact getResolutionImpact(Element element) {
+    ResolutionImpact resolutionImpact = _resolutionImpactCache[element];
+    assert(invariant(element, resolutionImpact != null,
+        message: "ResolutionImpact not available for $element."));
+    return resolutionImpact;
+  }
+
+  @override
   WorldImpact getWorldImpact(Element element) {
     WorldImpact worldImpact = _worldImpactCache[element];
     assert(invariant(element, worldImpact != null,
@@ -2122,39 +1939,62 @@
       assert(compiler.parser != null);
       Node tree = compiler.parser.parse(element);
       assert(invariant(element, !element.isSynthesized || tree == null));
-      ResolutionImpact resolutionImpact =
-          compiler.resolver.resolve(element);
-      if (tree != null && !compiler.analyzeSignaturesOnly) {
+      ResolutionImpact resolutionImpact = compiler.resolver.resolve(element);
+      if (compiler.serialization.supportSerialization ||
+          retainCachesForTesting) {
+        // [ResolutionImpact] is currently only used by serialization. The
+        // enqueuer uses the [WorldImpact] which is always cached.
+        // TODO(johnniwinther): Align these use cases better; maybe only
+        // cache [ResolutionImpact] and let the enqueuer transform it into
+        // a [WorldImpact].
+        _resolutionImpactCache[element] = resolutionImpact;
+      }
+      if (tree != null && !compiler.options.analyzeSignaturesOnly) {
         // TODO(het): don't do this if suppressWarnings is on, currently we have
         // to do it because the typechecker also sets types
         // Only analyze nodes with a corresponding [TreeElements].
         compiler.checker.check(element);
       }
-      WorldImpact worldImpact =
-          compiler.backend.impactTransformer.transformResolutionImpact(
-              resolutionImpact);
+      WorldImpact worldImpact = compiler.backend.impactTransformer
+          .transformResolutionImpact(resolutionImpact);
       return worldImpact;
     });
   }
 
   @override
   void uncacheWorldImpact(Element element) {
+    if (retainCachesForTesting) return;
+    if (compiler.serialization.isDeserialized(element)) return;
     assert(invariant(element, _worldImpactCache[element] != null,
         message: "WorldImpact not computed for $element."));
     _worldImpactCache[element] = const WorldImpact();
+    _resolutionImpactCache.remove(element);
   }
 
   @override
   void emptyCache() {
+    if (retainCachesForTesting) return;
     for (Element element in _worldImpactCache.keys) {
       _worldImpactCache[element] = const WorldImpact();
     }
+    _resolutionImpactCache.clear();
   }
 
   @override
   bool hasBeenResolved(Element element) {
     return _worldImpactCache.containsKey(element);
   }
+
+  @override
+  ResolutionWorkItem createWorkItem(
+      Element element, ItemCompilationContext compilationContext) {
+    if (compiler.serialization.isDeserialized(element)) {
+      return compiler.serialization
+          .createResolutionWorkItem(element, compilationContext);
+    } else {
+      return new ResolutionWorkItem(element, compilationContext);
+    }
+  }
 }
 
 // TODO(johnniwinther): Move [ParserTask], [PatchParserTask], [DietParserTask]
@@ -2179,10 +2019,10 @@
     });
   }
 
-  ScannerOptions getScannerOptionsFor(Element element) {
-    return new ScannerOptions(
-      canUseNative: compiler.backend.canLibraryUseNative(element.library));
-  }
+  ScannerOptions getScannerOptionsFor(Element element) =>
+      new ScannerOptions.from(compiler, element.library);
+
+  ParserOptions get parserOptions => compiler.options;
 }
 
 class GlobalDependencyRegistry extends EagerRegistry {
@@ -2208,3 +2048,35 @@
     return _otherDependencies != null ? _otherDependencies : const <Element>[];
   }
 }
+
+// TODO(sigmund): in the future, each of these classes should be self contained
+// and not use references to `compiler`.
+class _ResolvedUriTranslator implements ResolvedUriTranslator {
+  Compiler compiler;
+  _ResolvedUriTranslator(this.compiler);
+
+  Uri translate(LibraryElement importingLibrary, Uri resolvedUri,
+          [Spannable spannable]) =>
+      compiler.translateResolvedUri(importingLibrary, resolvedUri, spannable);
+}
+
+class _ScriptLoader implements ScriptLoader {
+  Compiler compiler;
+  _ScriptLoader(this.compiler);
+
+  Future<Script> readScript(Uri uri, [Spannable spannable]) =>
+      compiler.readScript(uri, spannable);
+}
+
+class _ElementScanner implements ElementScanner {
+  ScannerTask scanner;
+  _ElementScanner(this.scanner);
+  void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
+  void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
+}
+
+class _EmptyEnvironment implements Environment {
+  const _EmptyEnvironment();
+
+  String valueOf(String key) => null;
+}
diff --git a/pkg/compiler/lib/src/constant_system_dart.dart b/pkg/compiler/lib/src/constant_system_dart.dart
index c2c819e..60e8899 100644
--- a/pkg/compiler/lib/src/constant_system_dart.dart
+++ b/pkg/compiler/lib/src/constant_system_dart.dart
@@ -4,13 +4,11 @@
 
 library dart2js.constant_system.dart;
 
-import 'compiler.dart' show
-    Compiler;
+import 'compiler.dart' show Compiler;
 import 'constants/constant_system.dart';
 import 'constants/values.dart';
 import 'dart_types.dart';
-import 'tree/tree.dart' show
-    DartString;
+import 'tree/tree.dart' show DartString;
 
 const DART_CONSTANT_SYSTEM = const DartConstantSystem();
 
@@ -77,7 +75,7 @@
 class BitOrOperation extends BinaryBitOperation {
   final String name = '|';
   const BitOrOperation();
-  int foldInts(int left, int right)  => left | right;
+  int foldInts(int left, int right) => left | right;
   apply(left, right) => left | right;
 }
 
@@ -104,6 +102,7 @@
     if (right > 100 || right < 0) return null;
     return left << right;
   }
+
   apply(left, right) => left << right;
 }
 
@@ -114,6 +113,7 @@
     if (right < 0) return null;
     return left >> right;
   }
+
   apply(left, right) => left >> right;
 }
 
@@ -161,8 +161,7 @@
       }
       // 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()) {
+      if (left.isInt && right.isInt && !isDivide() || isTruncatingDivide()) {
         assert(foldedValue is int);
         return DART_CONSTANT_SYSTEM.createInt(foldedValue);
       } else {
@@ -199,6 +198,7 @@
     if (right == 0) return null;
     return left % right;
   }
+
   num foldNums(num left, num right) => left % right;
   apply(left, right) => left % right;
 }
@@ -210,11 +210,13 @@
     if (right == 0) return null;
     return left ~/ right;
   }
+
   num foldNums(num left, num right) {
     num ratio = left / right;
     if (ratio.isNaN || ratio.isInfinite) return null;
     return ratio.truncate().toInt();
   }
+
   apply(left, right) => left ~/ right;
   bool isTruncatingDivide() => true;
 }
@@ -244,13 +246,14 @@
     } else if (left.isString && right.isString) {
       StringConstantValue leftString = left;
       StringConstantValue rightString = right;
-      DartString result = new DartString.concat(leftString.primitiveValue,
-                                                rightString.primitiveValue);
+      DartString result = new DartString.concat(
+          leftString.primitiveValue, rightString.primitiveValue);
       return DART_CONSTANT_SYSTEM.createString(result);
     } else {
       return null;
     }
   }
+
   apply(left, right) => left + right;
 }
 
@@ -316,6 +319,7 @@
     }
     return DART_CONSTANT_SYSTEM.createBool(left == right);
   }
+
   apply(left, right) => left == right;
 }
 
@@ -329,6 +333,7 @@
     if (left.isNaN && right.isNaN) return null;
     return DART_CONSTANT_SYSTEM.createBool(left == right);
   }
+
   apply(left, right) => identical(left, right);
 }
 
@@ -339,6 +344,7 @@
     if (left.isNull) return right;
     return left;
   }
+
   apply(left, right) => left ?? right;
 }
 
@@ -407,7 +413,6 @@
 
   const DartConstantSystem();
 
-
   @override
   IntConstantValue createInt(int i) => new IntConstantValue(i);
 
@@ -426,16 +431,13 @@
   NullConstantValue createNull() => new NullConstantValue();
 
   @override
-  ListConstantValue createList(InterfaceType type,
-                               List<ConstantValue> values) {
+  ListConstantValue createList(InterfaceType type, List<ConstantValue> values) {
     return new ListConstantValue(type, values);
   }
 
   @override
-  MapConstantValue createMap(Compiler compiler,
-                             InterfaceType type,
-                             List<ConstantValue> keys,
-                             List<ConstantValue> values) {
+  MapConstantValue createMap(Compiler compiler, InterfaceType type,
+      List<ConstantValue> keys, List<ConstantValue> values) {
     return new MapConstantValue(type, keys, values);
   }
 
diff --git a/pkg/compiler/lib/src/constants/constant_constructors.dart b/pkg/compiler/lib/src/constants/constant_constructors.dart
index 4cc77b3..c389eef 100644
--- a/pkg/compiler/lib/src/constants/constant_constructors.dart
+++ b/pkg/compiler/lib/src/constants/constant_constructors.dart
@@ -11,14 +11,11 @@
 import '../elements/elements.dart';
 import '../resolution/operators.dart';
 import '../resolution/semantic_visitor.dart';
-import '../resolution/send_resolver.dart' show
-    DeclarationResolverMixin;
+import '../resolution/send_resolver.dart' show DeclarationResolverMixin;
 import '../resolution/send_structure.dart';
-import '../resolution/tree_elements.dart' show
-    TreeElements;
+import '../resolution/tree_elements.dart' show TreeElements;
 import '../tree/tree.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
+import '../universe/call_structure.dart' show CallStructure;
 
 import 'constructors.dart';
 import 'expressions.dart';
@@ -30,32 +27,32 @@
 }
 
 class ConstantConstructorComputer extends SemanticVisitor
-    with SemanticDeclarationResolvedMixin,
-         DeclarationResolverMixin,
-         GetBulkMixin,
-         SetBulkMixin,
-         ErrorBulkMixin,
-         InvokeBulkMixin,
-         IndexSetBulkMixin,
-         CompoundBulkMixin,
-         SetIfNullBulkMixin,
-         UnaryBulkMixin,
-         BaseBulkMixin,
-         BinaryBulkMixin,
-         PrefixBulkMixin,
-         PostfixBulkMixin,
-         NewBulkMixin,
-         InitializerBulkMixin,
-         FunctionBulkMixin,
-         VariableBulkMixin
+    with
+        SemanticDeclarationResolvedMixin,
+        DeclarationResolverMixin,
+        GetBulkMixin,
+        SetBulkMixin,
+        ErrorBulkMixin,
+        InvokeBulkMixin,
+        IndexSetBulkMixin,
+        CompoundBulkMixin,
+        SetIfNullBulkMixin,
+        UnaryBulkMixin,
+        BaseBulkMixin,
+        BinaryBulkMixin,
+        PrefixBulkMixin,
+        PostfixBulkMixin,
+        NewBulkMixin,
+        InitializerBulkMixin,
+        FunctionBulkMixin,
+        VariableBulkMixin
     implements SemanticDeclarationVisitor, SemanticSendVisitor {
   final Map<FieldElement, ConstantExpression> fieldMap =
       <FieldElement, ConstantExpression>{};
-  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues =
-      <dynamic/*int|String*/, ConstantExpression>{};
+  final Map<dynamic /*int|String*/, ConstantExpression> defaultValues =
+      <dynamic /*int|String*/, ConstantExpression>{};
 
-  ConstantConstructorComputer(TreeElements elements)
-      : super(elements);
+  ConstantConstructorComputer(TreeElements elements) : super(elements);
 
   SemanticDeclarationVisitor get declVisitor => this;
 
@@ -73,7 +70,7 @@
 
   @override
   bulkHandleNode(Node node, String template, _) {
-    internalError(node, template.replaceFirst('#' , '$node'));
+    internalError(node, template.replaceFirst('#', '$node'));
   }
 
   internalError(Node node, String message) {
@@ -81,12 +78,12 @@
   }
 
   ConstantConstructor visitGenerativeConstructorDeclaration(
-        FunctionExpression node,
-        ConstructorElement constructor,
-        NodeList parameters,
-        NodeList initializers,
-        Node body,
-        _) {
+      FunctionExpression node,
+      ConstructorElement constructor,
+      NodeList parameters,
+      NodeList initializers,
+      Node body,
+      _) {
     applyParameters(parameters, _);
     ConstructedConstantExpression constructorInvocation =
         applyInitializers(node, _);
@@ -131,18 +128,12 @@
 
     return new RedirectingFactoryConstantConstructor(
         new ConstructedConstantExpression(
-            redirectionType,
-            redirectionTarget,
-            callStructure,
-            arguments));
+            redirectionType, redirectionTarget, callStructure, arguments));
   }
 
   @override
-  visitFactoryConstructorDeclaration(
-      FunctionExpression node,
-      ConstructorElement constructor,
-      NodeList parameters,
-      Node body, _) {
+  visitFactoryConstructorDeclaration(FunctionExpression node,
+      ConstructorElement constructor, NodeList parameters, Node body, _) {
     // TODO(johnniwinther): Handle constant constructors with errors.
     internalError(node, "Factory constructor cannot be constant: $node.");
   }
@@ -151,12 +142,8 @@
     computeParameterStructures(parameters).forEach((s) => s.dispatch(this, _));
   }
 
-  visitParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      int index,
-      _) {
+  visitParameterDeclaration(VariableDefinitions node, Node definition,
+      ParameterElement parameter, int index, _) {
     // Do nothing.
   }
 
@@ -171,23 +158,15 @@
     defaultValues[index] = defaultValue;
   }
 
-  visitNamedParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      ConstantExpression defaultValue,
-      _) {
+  visitNamedParameterDeclaration(VariableDefinitions node, Node definition,
+      ParameterElement parameter, ConstantExpression defaultValue, _) {
     assert(invariant(node, defaultValue != null));
     String name = parameter.name;
     defaultValues[name] = defaultValue;
   }
 
-  visitInitializingFormalDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      InitializingFormalElement parameter,
-      int index,
-      _) {
+  visitInitializingFormalDeclaration(VariableDefinitions node, Node definition,
+      InitializingFormalElement parameter, int index, _) {
     fieldMap[parameter.fieldElement] = new PositionalArgumentReference(index);
   }
 
@@ -231,18 +210,11 @@
     return constructorInvocation;
   }
 
-  visitFieldInitializer(
-      SendSet node,
-      FieldElement field,
-      Node initializer,
-      _) {
+  visitFieldInitializer(SendSet node, FieldElement field, Node initializer, _) {
     fieldMap[field] = apply(initializer);
   }
 
-  visitParameterGet(
-      Send node,
-      ParameterElement parameter,
-      _) {
+  visitParameterGet(Send node, ParameterElement parameter, _) {
     if (parameter.isNamed) {
       return new NamedArgumentReference(parameter.name);
     } else {
@@ -261,10 +233,7 @@
     List<ConstantExpression> argumentExpression =
         arguments.nodes.map((a) => apply(a)).toList();
     return new ConstructedConstantExpression(
-        type,
-        superConstructor,
-        callStructure,
-        argumentExpression);
+        type, superConstructor, callStructure, argumentExpression);
   }
 
   ConstructedConstantExpression visitImplicitSuperConstructorInvoke(
@@ -272,11 +241,8 @@
       ConstructorElement superConstructor,
       InterfaceType type,
       _) {
-     return new ConstructedConstantExpression(
-         type,
-         superConstructor,
-         CallStructure.NO_ARGS,
-         const <ConstantExpression>[]);
+    return new ConstructedConstantExpression(type, superConstructor,
+        CallStructure.NO_ARGS, const <ConstantExpression>[]);
   }
 
   ConstructedConstantExpression visitThisConstructorInvoke(
@@ -287,48 +253,29 @@
       _) {
     List<ConstantExpression> argumentExpression =
         arguments.nodes.map((a) => apply(a)).toList();
-    return new ConstructedConstantExpression(
-        currentClass.thisType,
-        thisConstructor,
-        callStructure,
-        argumentExpression);
+    return new ConstructedConstantExpression(currentClass.thisType,
+        thisConstructor, callStructure, argumentExpression);
   }
 
   @override
   ConstantExpression visitBinary(
-      Send node,
-      Node left,
-      BinaryOperator operator,
-      Node right,
-      _) {
-    return new BinaryConstantExpression(
-        apply(left), operator, apply(right));
+      Send node, Node left, BinaryOperator operator, Node right, _) {
+    return new BinaryConstantExpression(apply(left), operator, apply(right));
   }
 
-
   @override
   ConstantExpression visitUnary(
-      Send node,
-      UnaryOperator operator,
-      Node expression,
-      _) {
-    return new UnaryConstantExpression(
-        operator, apply(expression));
+      Send node, UnaryOperator operator, Node expression, _) {
+    return new UnaryConstantExpression(operator, apply(expression));
   }
 
   @override
-  ConstantExpression visitStaticFieldGet(
-      Send node,
-      FieldElement field,
-      _) {
+  ConstantExpression visitStaticFieldGet(Send node, FieldElement field, _) {
     return new VariableConstantExpression(field);
   }
 
   @override
-  ConstantExpression visitTopLevelFieldGet(
-      Send node,
-      FieldElement field,
-      _) {
+  ConstantExpression visitTopLevelFieldGet(Send node, FieldElement field, _) {
     return new VariableConstantExpression(field);
   }
 
@@ -354,14 +301,13 @@
 
   @override
   ConstantExpression visitConditional(Conditional node) {
-    return new ConditionalConstantExpression(
-        apply(node.condition),
-        apply(node.thenExpression),
-        apply(node.elseExpression));
+    return new ConditionalConstantExpression(apply(node.condition),
+        apply(node.thenExpression), apply(node.elseExpression));
   }
 
   @override
-  ConstantExpression visitParenthesizedExpression(ParenthesizedExpression node) {
+  ConstantExpression visitParenthesizedExpression(
+      ParenthesizedExpression node) {
     return apply(node.expression);
   }
 
@@ -383,4 +329,4 @@
   ConstantExpression visitNamedArgument(NamedArgument node) {
     return apply(node.expression);
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/constants/constant_system.dart b/pkg/compiler/lib/src/constants/constant_system.dart
index 06c9fad..aae267f 100644
--- a/pkg/compiler/lib/src/constants/constant_system.dart
+++ b/pkg/compiler/lib/src/constants/constant_system.dart
@@ -5,11 +5,9 @@
 library dart2js.constant_system;
 
 import '../dart_types.dart';
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../resolution/operators.dart';
-import '../tree/tree.dart' show
-    DartString;
+import '../tree/tree.dart' show DartString;
 import 'values.dart';
 
 abstract class Operation {
@@ -64,16 +62,12 @@
   ConstantValue createString(DartString string);
   ConstantValue createBool(bool value);
   ConstantValue createNull();
-  ConstantValue createList(InterfaceType type,
-                           List<ConstantValue> values);
+  ConstantValue createList(InterfaceType type, List<ConstantValue> values);
   // TODO(johnniwinther): Remove the need for [compiler].
-  ConstantValue createMap(Compiler compiler,
-                          InterfaceType type,
-                          List<ConstantValue> keys,
-                          List<ConstantValue> values);
+  ConstantValue createMap(Compiler compiler, InterfaceType type,
+      List<ConstantValue> keys, List<ConstantValue> values);
   // TODO(johnniwinther): Remove the need for [compiler].
-  ConstantValue createType(Compiler compiler,
-                           DartType type);
+  ConstantValue createType(Compiler compiler, DartType type);
 
   // We need to special case the subtype check for JavaScript constant
   // system because an int is a double at runtime.
@@ -92,35 +86,59 @@
 
   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;
+      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;
+      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;
     }
   }
 }
diff --git a/pkg/compiler/lib/src/constants/constructors.dart b/pkg/compiler/lib/src/constants/constructors.dart
index 7faf593..c2b53fc 100644
--- a/pkg/compiler/lib/src/constants/constructors.dart
+++ b/pkg/compiler/lib/src/constants/constructors.dart
@@ -5,11 +5,8 @@
 library dart2js.constants.constructors;
 
 import '../dart_types.dart';
-import '../elements/elements.dart' show
-    ConstructorElement,
-    FieldElement;
-import '../universe/call_structure.dart' show
-    CallStructure;
+import '../elements/elements.dart' show ConstructorElement, FieldElement;
+import '../universe/call_structure.dart' show CallStructure;
 import '../util/util.dart';
 import 'evaluation.dart';
 import 'expressions.dart';
@@ -31,8 +28,7 @@
   /// Computes the constant expressions of the fields of the created instance
   /// in a const constructor invocation with [arguments].
   Map<FieldElement, ConstantExpression> computeInstanceFields(
-      List<ConstantExpression> arguments,
-      CallStructure callStructure);
+      List<ConstantExpression> arguments, CallStructure callStructure);
 
   accept(ConstantConstructorVisitor visitor, arg);
 }
@@ -52,16 +48,13 @@
 }
 
 /// A generative constant constructor.
-class GenerativeConstantConstructor implements ConstantConstructor{
+class GenerativeConstantConstructor implements ConstantConstructor {
   final InterfaceType type;
-  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
+  final Map<dynamic /*int|String*/, ConstantExpression> defaultValues;
   final Map<FieldElement, ConstantExpression> fieldMap;
   final ConstructedConstantExpression superConstructorInvocation;
 
-  GenerativeConstantConstructor(
-      this.type,
-      this.defaultValues,
-      this.fieldMap,
+  GenerativeConstantConstructor(this.type, this.defaultValues, this.fieldMap,
       this.superConstructorInvocation);
 
   ConstantConstructorKind get kind => ConstantConstructorKind.GENERATIVE;
@@ -71,14 +64,13 @@
   }
 
   Map<FieldElement, ConstantExpression> computeInstanceFields(
-      List<ConstantExpression> arguments,
-      CallStructure callStructure) {
-    NormalizedArguments args = new NormalizedArguments(
-        defaultValues, callStructure, arguments);
+      List<ConstantExpression> arguments, CallStructure callStructure) {
+    NormalizedArguments args =
+        new NormalizedArguments(defaultValues, callStructure, arguments);
     Map<FieldElement, ConstantExpression> appliedFieldMap =
         applyFields(args, superConstructorInvocation);
     fieldMap.forEach((FieldElement field, ConstantExpression constant) {
-     appliedFieldMap[field] = constant.apply(args);
+      appliedFieldMap[field] = constant.apply(args);
     });
     return appliedFieldMap;
   }
@@ -97,8 +89,7 @@
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! GenerativeConstantConstructor) return false;
-    return
-        type == other.type &&
+    return type == other.type &&
         superConstructorInvocation == other.superConstructorInvocation &&
         mapEquals(defaultValues, other.defaultValues) &&
         mapEquals(fieldMap, other.fieldMap);
@@ -151,25 +142,24 @@
 
 /// A redirecting generative constant constructor.
 class RedirectingGenerativeConstantConstructor implements ConstantConstructor {
-  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
+  final Map<dynamic /*int|String*/, ConstantExpression> defaultValues;
   final ConstructedConstantExpression thisConstructorInvocation;
 
   RedirectingGenerativeConstantConstructor(
-      this.defaultValues,
-      this.thisConstructorInvocation);
+      this.defaultValues, this.thisConstructorInvocation);
 
   ConstantConstructorKind get kind {
     return ConstantConstructorKind.REDIRECTING_GENERATIVE;
   }
 
   InterfaceType computeInstanceType(InterfaceType newType) {
-    return thisConstructorInvocation.computeInstanceType()
+    return thisConstructorInvocation
+        .computeInstanceType()
         .substByContext(newType);
   }
 
   Map<FieldElement, ConstantExpression> computeInstanceFields(
-      List<ConstantExpression> arguments,
-      CallStructure callStructure) {
+      List<ConstantExpression> arguments, CallStructure callStructure) {
     NormalizedArguments args =
         new NormalizedArguments(defaultValues, callStructure, arguments);
     Map<FieldElement, ConstantExpression> appliedFieldMap =
@@ -190,8 +180,7 @@
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! RedirectingGenerativeConstantConstructor) return false;
-    return
-        thisConstructorInvocation == other.thisConstructorInvocation &&
+    return thisConstructorInvocation == other.thisConstructorInvocation &&
         GenerativeConstantConstructor.mapEquals(
             defaultValues, other.defaultValues);
   }
@@ -219,13 +208,13 @@
   }
 
   InterfaceType computeInstanceType(InterfaceType newType) {
-    return targetConstructorInvocation.computeInstanceType()
+    return targetConstructorInvocation
+        .computeInstanceType()
         .substByContext(newType);
   }
 
   Map<FieldElement, ConstantExpression> computeInstanceFields(
-      List<ConstantExpression> arguments,
-      CallStructure callStructure) {
+      List<ConstantExpression> arguments, CallStructure callStructure) {
     ConstantConstructor constantConstructor =
         targetConstructorInvocation.target.constantConstructor;
     return constantConstructor.computeInstanceFields(arguments, callStructure);
diff --git a/pkg/compiler/lib/src/constants/evaluation.dart b/pkg/compiler/lib/src/constants/evaluation.dart
index 176d736..88aad8a 100644
--- a/pkg/compiler/lib/src/constants/evaluation.dart
+++ b/pkg/compiler/lib/src/constants/evaluation.dart
@@ -4,10 +4,8 @@
 
 library dart2js.constants.evaluation;
 
-import '../compiler.dart' show
-    Compiler;
-import '../universe/call_structure.dart' show
-    CallStructure;
+import '../compiler.dart' show Compiler;
+import '../universe/call_structure.dart' show CallStructure;
 import 'expressions.dart';
 
 /// Environment used for evaluating constant expressions.
@@ -22,7 +20,7 @@
 /// The normalized arguments passed to a const constructor computed from the
 /// actual [arguments] and the [defaultValues] of the called construrctor.
 class NormalizedArguments {
-  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
+  final Map<dynamic /*int|String*/, ConstantExpression> defaultValues;
   final CallStructure callStructure;
   final List<ConstantExpression> arguments;
 
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index 02f7b1a..809d7e0 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -8,18 +8,17 @@
 import '../constants/constant_system.dart';
 import '../core_types.dart';
 import '../dart_types.dart';
-import '../elements/elements.dart' show
-    ConstructorElement,
-    Element,
-    FieldElement,
-    FunctionElement,
-    PrefixElement,
-    VariableElement;
+import '../elements/elements.dart'
+    show
+        ConstructorElement,
+        Element,
+        FieldElement,
+        FunctionElement,
+        PrefixElement,
+        VariableElement;
 import '../resolution/operators.dart';
-import '../tree/tree.dart' show
-    DartString;
-import '../universe/call_structure.dart' show
-    CallStructure;
+import '../tree/tree.dart' show DartString;
+import '../universe/call_structure.dart' show CallStructure;
 import 'evaluation.dart';
 import 'values.dart';
 
@@ -48,7 +47,6 @@
   TYPE,
   UNARY,
   VARIABLE,
-
   POSITIONAL_REFERENCE,
   NAMED_REFERENCE,
 }
@@ -78,8 +76,8 @@
 
   /// Compute the [ConstantValue] for this expression using the [environment]
   /// and the [constantSystem].
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem);
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem);
 
   /// Returns the type of this constant expression, if it is independent of the
   /// environment values.
@@ -112,7 +110,7 @@
 
   String toString() {
     assertDebugMode('Use ConstantExpression.getText() instead of '
-                    'ConstantExpression.toString()');
+        'ConstantExpression.toString()');
     return getText();
   }
 }
@@ -126,8 +124,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     // TODO(johnniwinther): Use non-constant values for errors.
     return new NonConstantValue();
   }
@@ -146,8 +144,8 @@
   SyntheticConstantExpression(this.value);
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return value;
   }
 
@@ -166,8 +164,6 @@
   ConstantExpressionKind get kind => ConstantExpressionKind.SYNTHETIC;
 }
 
-
-
 /// A boolean, int, double, string, or null constant.
 abstract class PrimitiveConstantExpression extends ConstantExpression {
   /// The primitive value of this contant expression.
@@ -187,8 +183,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.createBool(primitiveValue);
   }
 
@@ -217,8 +213,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.createInt(primitiveValue);
   }
 
@@ -247,8 +243,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.createDouble(primitiveValue);
   }
 
@@ -277,8 +273,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.createString(new DartString.literal(primitiveValue));
   }
 
@@ -305,8 +301,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.createNull();
   }
 
@@ -336,8 +332,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.createList(type,
         values.map((v) => v.evaluate(environment, constantSystem)).toList());
   }
@@ -385,9 +381,10 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
-    return constantSystem.createMap(environment.compiler,
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
+    return constantSystem.createMap(
+        environment.compiler,
         type,
         keys.map((k) => k.evaluate(environment, constantSystem)).toList(),
         values.map((v) => v.evaluate(environment, constantSystem)).toList());
@@ -432,10 +429,7 @@
   final List<ConstantExpression> arguments;
 
   ConstructedConstantExpression(
-      this.type,
-      this.target,
-      this.callStructure,
-      this.arguments) {
+      this.type, this.target, this.callStructure, this.arguments) {
     assert(type.element == target.enclosingClass);
     assert(!arguments.contains(null));
   }
@@ -447,8 +441,8 @@
   }
 
   Map<FieldElement, ConstantExpression> computeInstanceFields() {
-    return target.constantConstructor.computeInstanceFields(
-        arguments, callStructure);
+    return target.constantConstructor
+        .computeInstanceFields(arguments, callStructure);
   }
 
   InterfaceType computeInstanceType() {
@@ -456,18 +450,17 @@
   }
 
   ConstructedConstantExpression apply(NormalizedArguments arguments) {
-    return new ConstructedConstantExpression(
-        type, target, callStructure,
+    return new ConstructedConstantExpression(type, target, callStructure,
         this.arguments.map((a) => a.apply(arguments)).toList());
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     Map<FieldElement, ConstantValue> fieldValues =
         <FieldElement, ConstantValue>{};
-    computeInstanceFields().forEach(
-        (FieldElement field, ConstantExpression constant) {
+    computeInstanceFields()
+        .forEach((FieldElement field, ConstantExpression constant) {
       fieldValues[field] = constant.evaluate(environment, constantSystem);
     });
     return new ConstructedConstantValue(computeInstanceType(), fieldValues);
@@ -476,9 +469,7 @@
   @override
   int _computeHashCode() {
     int hashCode =
-        13 * type.hashCode +
-        17 * target.hashCode +
-        19 * callStructure.hashCode;
+        13 * type.hashCode + 17 * target.hashCode + 19 * callStructure.hashCode;
     for (ConstantExpression value in arguments) {
       hashCode ^= 23 * value.hashCode;
     }
@@ -515,8 +506,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     DartString accumulator;
     for (ConstantExpression expression in expressions) {
       ConstantValue value = expression.evaluate(environment, constantSystem);
@@ -585,8 +576,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     // TODO(johnniwinther): Implement this.
     throw new UnsupportedError('SymbolConstantExpression.evaluate');
   }
@@ -611,8 +602,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.createType(environment.compiler, type);
   }
 
@@ -641,8 +632,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return element.constant.evaluate(environment, constantSystem);
   }
 
@@ -668,8 +659,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return new FunctionConstantValue(element);
   }
 
@@ -702,8 +693,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.lookupBinary(operator).fold(
         left.evaluate(environment, constantSystem),
         right.evaluate(environment, constantSystem));
@@ -711,9 +702,7 @@
 
   ConstantExpression apply(NormalizedArguments arguments) {
     return new BinaryConstantExpression(
-        left.apply(arguments),
-        operator,
-        right.apply(arguments));
+        left.apply(arguments), operator, right.apply(arguments));
   }
 
   DartType getKnownType(CoreTypes coreTypes) {
@@ -734,11 +723,11 @@
           assert(knownRightType == coreTypes.stringType);
           return coreTypes.stringType;
         } else if (knownLeftType == coreTypes.intType &&
-                   knownRightType == coreTypes.intType) {
+            knownRightType == coreTypes.intType) {
           return coreTypes.intType;
         }
         assert(knownLeftType == coreTypes.doubleType ||
-               knownRightType == coreTypes.doubleType);
+            knownRightType == coreTypes.doubleType);
         return coreTypes.doubleType;
       case BinaryOperatorKind.SUB:
       case BinaryOperatorKind.MUL:
@@ -748,7 +737,7 @@
           return coreTypes.intType;
         }
         assert(knownLeftType == coreTypes.doubleType ||
-               knownRightType == coreTypes.doubleType);
+            knownRightType == coreTypes.doubleType);
         return coreTypes.doubleType;
       case BinaryOperatorKind.DIV:
         return coreTypes.doubleType;
@@ -767,21 +756,18 @@
     }
   }
 
-
   int get precedence => PRECEDENCE_MAP[operator.kind];
 
   @override
   int _computeHashCode() {
-    return 13 * operator.hashCode +
-           17 * left.hashCode +
-           19 * right.hashCode;
+    return 13 * operator.hashCode + 17 * left.hashCode + 19 * right.hashCode;
   }
 
   @override
   bool _equals(BinaryConstantExpression other) {
     return operator == other.operator &&
-           left == other.left &&
-           right == other.right;
+        left == other.left &&
+        right == other.right;
   }
 
   static const Map<BinaryOperatorKind, int> PRECEDENCE_MAP = const {
@@ -822,8 +808,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return constantSystem.identity.fold(
         left.evaluate(environment, constantSystem),
         right.evaluate(environment, constantSystem));
@@ -831,22 +817,19 @@
 
   ConstantExpression apply(NormalizedArguments arguments) {
     return new IdenticalConstantExpression(
-        left.apply(arguments),
-        right.apply(arguments));
+        left.apply(arguments), right.apply(arguments));
   }
 
   int get precedence => 15;
 
   @override
   int _computeHashCode() {
-    return 17 * left.hashCode +
-           19 * right.hashCode;
+    return 17 * left.hashCode + 19 * right.hashCode;
   }
 
   @override
   bool _equals(IdenticalConstantExpression other) {
-    return left == other.left &&
-           right == other.right;
+    return left == other.left && right == other.right;
   }
 
   @override
@@ -869,30 +852,27 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
-    return constantSystem.lookupUnary(operator).fold(
-        expression.evaluate(environment, constantSystem));
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
+    return constantSystem
+        .lookupUnary(operator)
+        .fold(expression.evaluate(environment, constantSystem));
   }
 
   ConstantExpression apply(NormalizedArguments arguments) {
-    return new UnaryConstantExpression(
-        operator,
-        expression.apply(arguments));
+    return new UnaryConstantExpression(operator, expression.apply(arguments));
   }
 
   int get precedence => PRECEDENCE_MAP[operator.kind];
 
   @override
   int _computeHashCode() {
-    return 13 * operator.hashCode +
-           17 * expression.hashCode;
+    return 13 * operator.hashCode + 17 * expression.hashCode;
   }
 
   @override
   bool _equals(UnaryConstantExpression other) {
-    return operator == other.operator &&
-           expression == other.expression;
+    return operator == other.operator && expression == other.expression;
   }
 
   @override
@@ -907,7 +887,6 @@
   };
 }
 
-
 /// A string length constant expression like `a.length`.
 class StringLengthConstantExpression extends ConstantExpression {
   final ConstantExpression expression;
@@ -921,8 +900,8 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     ConstantValue value = expression.evaluate(environment, constantSystem);
     if (value.isString) {
       StringConstantValue stringValue = value;
@@ -957,9 +936,7 @@
   final ConstantExpression trueExp;
   final ConstantExpression falseExp;
 
-  ConditionalConstantExpression(this.condition,
-                                this.trueExp,
-                                this.falseExp);
+  ConditionalConstantExpression(this.condition, this.trueExp, this.falseExp);
 
   ConstantExpressionKind get kind => ConstantExpressionKind.CONDITIONAL;
 
@@ -968,10 +945,8 @@
   }
 
   ConstantExpression apply(NormalizedArguments arguments) {
-    return new ConditionalConstantExpression(
-        condition.apply(arguments),
-        trueExp.apply(arguments),
-        falseExp.apply(arguments));
+    return new ConditionalConstantExpression(condition.apply(arguments),
+        trueExp.apply(arguments), falseExp.apply(arguments));
   }
 
   int get precedence => 3;
@@ -979,26 +954,24 @@
   @override
   int _computeHashCode() {
     return 13 * condition.hashCode +
-           17 * trueExp.hashCode +
-           19 * falseExp.hashCode;
+        17 * trueExp.hashCode +
+        19 * falseExp.hashCode;
   }
 
   @override
   bool _equals(ConditionalConstantExpression other) {
     return condition == other.condition &&
-           trueExp == other.trueExp &&
-           falseExp == other.falseExp;
+        trueExp == other.trueExp &&
+        falseExp == other.falseExp;
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     ConstantValue conditionValue =
         condition.evaluate(environment, constantSystem);
-    ConstantValue trueValue =
-        trueExp.evaluate(environment, constantSystem);
-    ConstantValue falseValue =
-        falseExp.evaluate(environment, constantSystem);
+    ConstantValue trueValue = trueExp.evaluate(environment, constantSystem);
+    ConstantValue falseValue = falseExp.evaluate(environment, constantSystem);
     if (conditionValue.isTrue) {
       return trueValue;
     } else if (conditionValue.isFalse) {
@@ -1044,8 +1017,8 @@
   bool _equals(PositionalArgumentReference other) => index == other.index;
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     throw new UnsupportedError('PositionalArgumentReference.evaluate');
   }
 }
@@ -1075,8 +1048,8 @@
   bool _equals(NamedArgumentReference other) => name == other.name;
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     throw new UnsupportedError('NamedArgumentReference.evaluate');
   }
 }
@@ -1089,24 +1062,20 @@
 
   @override
   int _computeHashCode() {
-    return 13 * name.hashCode +
-           17 * defaultValue.hashCode;
+    return 13 * name.hashCode + 17 * defaultValue.hashCode;
   }
 
   @override
   bool _equals(FromEnvironmentConstantExpression other) {
-    return name == other.name &&
-           defaultValue == other.defaultValue;
+    return name == other.name && defaultValue == other.defaultValue;
   }
 }
 
 /// A `const bool.fromEnvironment` constant.
 class BoolFromEnvironmentConstantExpression
     extends FromEnvironmentConstantExpression {
-
   BoolFromEnvironmentConstantExpression(
-      ConstantExpression name,
-      ConstantExpression defaultValue)
+      ConstantExpression name, ConstantExpression defaultValue)
       : super(name, defaultValue);
 
   ConstantExpressionKind get kind {
@@ -1118,14 +1087,13 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     ConstantValue nameConstantValue =
         name.evaluate(environment, constantSystem);
     ConstantValue defaultConstantValue;
     if (defaultValue != null) {
-      defaultConstantValue =
-          defaultValue.evaluate(environment, constantSystem);
+      defaultConstantValue = defaultValue.evaluate(environment, constantSystem);
     } else {
       defaultConstantValue = constantSystem.createBool(false);
     }
@@ -1145,8 +1113,7 @@
   }
 
   ConstantExpression apply(NormalizedArguments arguments) {
-    return new BoolFromEnvironmentConstantExpression(
-        name.apply(arguments),
+    return new BoolFromEnvironmentConstantExpression(name.apply(arguments),
         defaultValue != null ? defaultValue.apply(arguments) : null);
   }
 
@@ -1157,10 +1124,8 @@
 /// A `const int.fromEnvironment` constant.
 class IntFromEnvironmentConstantExpression
     extends FromEnvironmentConstantExpression {
-
   IntFromEnvironmentConstantExpression(
-      ConstantExpression name,
-      ConstantExpression defaultValue)
+      ConstantExpression name, ConstantExpression defaultValue)
       : super(name, defaultValue);
 
   ConstantExpressionKind get kind {
@@ -1172,14 +1137,13 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     ConstantValue nameConstantValue =
         name.evaluate(environment, constantSystem);
     ConstantValue defaultConstantValue;
     if (defaultValue != null) {
-      defaultConstantValue =
-          defaultValue.evaluate(environment, constantSystem);
+      defaultConstantValue = defaultValue.evaluate(environment, constantSystem);
     } else {
       defaultConstantValue = constantSystem.createNull();
     }
@@ -1201,8 +1165,7 @@
   }
 
   ConstantExpression apply(NormalizedArguments arguments) {
-    return new IntFromEnvironmentConstantExpression(
-        name.apply(arguments),
+    return new IntFromEnvironmentConstantExpression(name.apply(arguments),
         defaultValue != null ? defaultValue.apply(arguments) : null);
   }
 
@@ -1213,10 +1176,8 @@
 /// A `const String.fromEnvironment` constant.
 class StringFromEnvironmentConstantExpression
     extends FromEnvironmentConstantExpression {
-
   StringFromEnvironmentConstantExpression(
-      ConstantExpression name,
-      ConstantExpression defaultValue)
+      ConstantExpression name, ConstantExpression defaultValue)
       : super(name, defaultValue);
 
   ConstantExpressionKind get kind {
@@ -1228,14 +1189,13 @@
   }
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     ConstantValue nameConstantValue =
         name.evaluate(environment, constantSystem);
     ConstantValue defaultConstantValue;
     if (defaultValue != null) {
-      defaultConstantValue =
-          defaultValue.evaluate(environment, constantSystem);
+      defaultConstantValue = defaultValue.evaluate(environment, constantSystem);
     } else {
       defaultConstantValue = constantSystem.createNull();
     }
@@ -1253,8 +1213,7 @@
   }
 
   ConstantExpression apply(NormalizedArguments arguments) {
-    return new StringFromEnvironmentConstantExpression(
-        name.apply(arguments),
+    return new StringFromEnvironmentConstantExpression(name.apply(arguments),
         defaultValue != null ? defaultValue.apply(arguments) : null);
   }
 
@@ -1273,8 +1232,8 @@
   ConstantExpressionKind get kind => ConstantExpressionKind.DEFERRED;
 
   @override
-  ConstantValue evaluate(Environment environment,
-                         ConstantSystem constantSystem) {
+  ConstantValue evaluate(
+      Environment environment, ConstantSystem constantSystem) {
     return expression.evaluate(environment, constantSystem);
   }
 
@@ -1284,8 +1243,7 @@
   }
 
   ConstantExpression apply(NormalizedArguments arguments) {
-    return new DeferredConstantExpression(
-        expression.apply(arguments), prefix);
+    return new DeferredConstantExpression(expression.apply(arguments), prefix);
   }
 
   @override
@@ -1324,12 +1282,12 @@
   R visitUnary(UnaryConstantExpression exp, A context);
   R visitStringLength(StringLengthConstantExpression exp, A context);
   R visitConditional(ConditionalConstantExpression exp, A context);
-  R visitBoolFromEnvironment(BoolFromEnvironmentConstantExpression exp,
-                             A context);
-  R visitIntFromEnvironment(IntFromEnvironmentConstantExpression exp,
-                            A context);
-  R visitStringFromEnvironment(StringFromEnvironmentConstantExpression exp,
-                               A context);
+  R visitBoolFromEnvironment(
+      BoolFromEnvironmentConstantExpression exp, A context);
+  R visitIntFromEnvironment(
+      IntFromEnvironmentConstantExpression exp, A context);
+  R visitStringFromEnvironment(
+      StringFromEnvironmentConstantExpression exp, A context);
   R visitDeferred(DeferredConstantExpression exp, A context);
 
   R visitPositional(PositionalArgumentReference exp, A context);
@@ -1339,9 +1297,8 @@
 class ConstExpPrinter extends ConstantExpressionVisitor {
   final StringBuffer sb = new StringBuffer();
 
-  void write(ConstantExpression parent,
-             ConstantExpression child,
-             {bool leftAssociative: true}) {
+  void write(ConstantExpression parent, ConstantExpression child,
+      {bool leftAssociative: true}) {
     if (child.precedence < parent.precedence ||
         !leftAssociative && child.precedence == parent.precedence) {
       sb.write('(');
@@ -1478,7 +1435,6 @@
         visit(expression);
         sb.write("}");
       }
-
     }
     sb.write('"');
   }
@@ -1572,7 +1528,7 @@
 
   @override
   void visitBoolFromEnvironment(BoolFromEnvironmentConstantExpression exp,
-                                [_]) {
+      [_]) {
     sb.write('const bool.fromEnvironment(');
     visit(exp.name);
     if (exp.defaultValue != null) {
@@ -1595,7 +1551,7 @@
 
   @override
   void visitStringFromEnvironment(StringFromEnvironmentConstantExpression exp,
-                                  [_]) {
+      [_]) {
     sb.write('const String.fromEnvironment(');
     visit(exp.name);
     if (exp.defaultValue != null) {
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index fde5cde..1cc0271 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -8,11 +8,7 @@
 import '../core_types.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart'
-    show ClassElement,
-         Element,
-         FieldElement,
-         FunctionElement,
-         PrefixElement;
+    show ClassElement, Element, FieldElement, FunctionElement, PrefixElement;
 import '../tree/tree.dart' hide unparse;
 import '../util/util.dart' show Hashing;
 
@@ -89,7 +85,7 @@
 
   String toString() {
     assertDebugMode("Use Constant.unparse() or Constant.toStructuredString() "
-                    "instead of Constant.toString().");
+        "instead of Constant.toString().");
     return toStructuredString();
   }
 }
@@ -104,7 +100,7 @@
   bool get isFunction => true;
 
   bool operator ==(var other) {
-    if (other is !FunctionConstantValue) return false;
+    if (other is! FunctionConstantValue) return false;
     return identical(other.element, element);
   }
 
@@ -141,7 +137,7 @@
   bool get isPrimitive => true;
 
   bool operator ==(var other) {
-    if (other is !PrimitiveConstantValue) return false;
+    if (other is! PrimitiveConstantValue) return false;
     PrimitiveConstantValue otherPrimitive = other;
     // We use == instead of 'identical' so that DartStrings compare correctly.
     return primitiveValue == otherPrimitive.primitiveValue;
@@ -195,20 +191,34 @@
 
   factory IntConstantValue(int value) {
     switch (value) {
-      case 0: return const IntConstantValue._internal(0);
-      case 1: return const IntConstantValue._internal(1);
-      case 2: return const IntConstantValue._internal(2);
-      case 3: return const IntConstantValue._internal(3);
-      case 4: return const IntConstantValue._internal(4);
-      case 5: return const IntConstantValue._internal(5);
-      case 6: return const IntConstantValue._internal(6);
-      case 7: return const IntConstantValue._internal(7);
-      case 8: return const IntConstantValue._internal(8);
-      case 9: return const IntConstantValue._internal(9);
-      case 10: return const IntConstantValue._internal(10);
-      case -1: return const IntConstantValue._internal(-1);
-      case -2: return const IntConstantValue._internal(-2);
-      default: return new IntConstantValue._internal(value);
+      case 0:
+        return const IntConstantValue._internal(0);
+      case 1:
+        return const IntConstantValue._internal(1);
+      case 2:
+        return const IntConstantValue._internal(2);
+      case 3:
+        return const IntConstantValue._internal(3);
+      case 4:
+        return const IntConstantValue._internal(4);
+      case 5:
+        return const IntConstantValue._internal(5);
+      case 6:
+        return const IntConstantValue._internal(6);
+      case 7:
+        return const IntConstantValue._internal(7);
+      case 8:
+        return const IntConstantValue._internal(8);
+      case 9:
+        return const IntConstantValue._internal(9);
+      case 10:
+        return const IntConstantValue._internal(10);
+      case -1:
+        return const IntConstantValue._internal(-1);
+      case -2:
+        return const IntConstantValue._internal(-2);
+      default:
+        return new IntConstantValue._internal(value);
     }
   }
 
@@ -233,7 +243,7 @@
   // The is [:!IntConstant:] check at the beginning of the function makes sure
   // that we compare only equal to integer constants.
   bool operator ==(var other) {
-    if (other is !IntConstantValue) return false;
+    if (other is! IntConstantValue) return false;
     IntConstantValue otherInt = other;
     return primitiveValue == otherInt.primitiveValue;
   }
@@ -288,7 +298,7 @@
   DartType getType(CoreTypes types) => types.doubleType;
 
   bool operator ==(var other) {
-    if (other is !DoubleConstantValue) return false;
+    if (other is! DoubleConstantValue) return false;
     DoubleConstantValue otherDouble = other;
     double otherValue = otherDouble.primitiveValue;
     if (primitiveValue == 0.0 && otherValue == 0.0) {
@@ -389,10 +399,11 @@
   DartType getType(CoreTypes types) => types.stringType;
 
   bool operator ==(var other) {
-    if (other is !StringConstantValue) return false;
+    if (identical(this, other)) return true;
+    if (other is! StringConstantValue) return false;
     StringConstantValue otherString = other;
     return hashCode == otherString.hashCode &&
-           primitiveValue == otherString.primitiveValue;
+        primitiveValue == otherString.primitiveValue;
   }
 
   DartString toDartString() => primitiveValue;
@@ -435,7 +446,7 @@
 
   bool operator ==(other) {
     return other is TypeConstantValue &&
-           representedType == other.representedType;
+        representedType == other.representedType;
   }
 
   int get hashCode => representedType.hashCode * 13;
@@ -461,7 +472,8 @@
   bool get isList => true;
 
   bool operator ==(var other) {
-    if (other is !ListConstantValue) return false;
+    if (identical(this, other)) return true;
+    if (other is! ListConstantValue) return false;
     ListConstantValue otherList = other;
     if (hashCode != otherList.hashCode) return false;
     if (type != otherList.type) return false;
@@ -482,7 +494,7 @@
     StringBuffer sb = new StringBuffer();
     _unparseTypeArguments(sb);
     sb.write('[');
-    for (int i = 0 ; i < length ; i++) {
+    for (int i = 0; i < length; i++) {
       if (i > 0) sb.write(',');
       sb.write(entries[i].unparse());
     }
@@ -495,7 +507,7 @@
     sb.write('ListConstant(');
     _unparseTypeArguments(sb);
     sb.write('[');
-    for (int i = 0 ; i < length ; i++) {
+    for (int i = 0; i < length; i++) {
       if (i > 0) sb.write(', ');
       sb.write(entries[i].toStructuredString());
     }
@@ -510,14 +522,12 @@
   final int hashCode;
   Map<ConstantValue, ConstantValue> _lookupMap;
 
-  MapConstantValue(InterfaceType type,
-                   List<ConstantValue> keys,
-                   List<ConstantValue> values)
+  MapConstantValue(
+      InterfaceType type, List<ConstantValue> keys, List<ConstantValue> values)
       : this.keys = keys,
         this.values = values,
-        this.hashCode = Hashing.listHash(values,
-                            Hashing.listHash(keys,
-                                Hashing.objectHash(type))),
+        this.hashCode = Hashing.listHash(
+            values, Hashing.listHash(keys, Hashing.objectHash(type))),
         super(type) {
     assert(keys.length == values.length);
   }
@@ -525,7 +535,8 @@
   bool get isMap => true;
 
   bool operator ==(var other) {
-    if (other is !MapConstantValue) return false;
+    if (identical(this, other)) return true;
+    if (other is! MapConstantValue) return false;
     MapConstantValue otherMap = other;
     if (hashCode != otherMap.hashCode) return false;
     if (type != other.type) return false;
@@ -558,7 +569,7 @@
     StringBuffer sb = new StringBuffer();
     _unparseTypeArguments(sb);
     sb.write('{');
-    for (int i = 0 ; i < length ; i++) {
+    for (int i = 0; i < length; i++) {
       if (i > 0) sb.write(',');
       sb.write(keys[i].unparse());
       sb.write(':');
@@ -594,8 +605,8 @@
   bool get isInterceptor => true;
 
   bool operator ==(other) {
-    return other is InterceptorConstantValue
-        && dispatchedType == other.dispatchedType;
+    return other is InterceptorConstantValue &&
+        dispatchedType == other.dispatchedType;
   }
 
   int get hashCode => dispatchedType.hashCode * 43;
@@ -626,8 +637,7 @@
   bool get isDummy => true;
 
   bool operator ==(other) {
-    return other is SyntheticConstantValue
-        && payload == other.payload;
+    return other is SyntheticConstantValue && payload == other.payload;
   }
 
   get hashCode => payload.hashCode * 17 + kind.hashCode;
@@ -649,11 +659,11 @@
   final Map<FieldElement, ConstantValue> fields;
   final int hashCode;
 
-  ConstructedConstantValue(InterfaceType type,
-                           Map<FieldElement, ConstantValue> fields)
-    : this.fields = fields,
-      hashCode = Hashing.mapHash(fields, Hashing.objectHash(type)),
-      super(type) {
+  ConstructedConstantValue(
+      InterfaceType type, Map<FieldElement, ConstantValue> fields)
+      : this.fields = fields,
+        hashCode = Hashing.mapHash(fields, Hashing.objectHash(type)),
+        super(type) {
     assert(type != null);
     assert(!fields.containsValue(null));
   }
@@ -661,7 +671,8 @@
   bool get isConstructedObject => true;
 
   bool operator ==(var otherVar) {
-    if (otherVar is !ConstructedConstantValue) return false;
+    if (identical(this, otherVar)) return true;
+    if (otherVar is! ConstructedConstantValue) return false;
     ConstructedConstantValue other = otherVar;
     if (hashCode != other.hashCode) return false;
     if (type != other.type) return false;
@@ -724,9 +735,9 @@
   bool get isReference => true;
 
   bool operator ==(other) {
-    return other is DeferredConstantValue
-        && referenced == other.referenced
-        && prefix == other.prefix;
+    return other is DeferredConstantValue &&
+        referenced == other.referenced &&
+        prefix == other.prefix;
   }
 
   get hashCode => (referenced.hashCode * 17 + prefix.hashCode) & 0x3fffffff;
diff --git a/pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart b/pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart
index de027ec..5bdfc6c 100644
--- a/pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart
+++ b/pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart
@@ -2,8 +2,6 @@
 
 import 'cps_ir_nodes.dart';
 import 'optimizers.dart';
-import '../common/names.dart';
-import '../universe/selector.dart';
 import 'type_mask_system.dart';
 import 'cps_fragment.dart';
 
@@ -59,7 +57,7 @@
     if (prim is SetField) return prim.object;
     if (prim is SetIndex) return prim.object;
     if (prim is InvokeMethod && !selectorsOnNull.contains(prim.selector)) {
-      return prim.dartReceiver;
+      return prim.receiver;
     }
     if (prim is ForeignCode) {
       return prim.isNullGuardOnNullFirstArgument() ? prim.argument(0) : null;
@@ -73,7 +71,9 @@
     if (prim is ReceiverCheck && prim.isNullCheck) {
       Primitive value = prim.value;
       LetPrim let = prim.parent;
-      prim..replaceUsesWith(value)..destroy();
+      prim
+        ..replaceUsesWith(value)
+        ..destroy();
       let.remove();
     } else if (prim is GetLength || prim is GetField || prim is GetIndex) {
       if (prim.hasNoRefinedUses) {
diff --git a/pkg/compiler/lib/src/cps_ir/bounds_checker.dart b/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
index b357c99..b4ca8e1 100644
--- a/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
+++ b/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
@@ -12,7 +12,6 @@
 import 'type_mask_system.dart';
 import '../types/types.dart';
 import '../world.dart';
-import '../elements/elements.dart';
 import 'loop_effects.dart';
 import 'effects.dart';
 
@@ -125,13 +124,13 @@
     return lengthOf
         .putIfAbsent(indexableObject, () => <int, SignedVariable>{})
         .putIfAbsent(effectNumber, () {
-            int length = types.getContainerLength(type);
-            if (length != null) {
-              return octagon.makeVariable(length, length);
-            } else {
-              return octagon.makeVariable(0, MAX_UINT32);
-            }
-        });
+      int length = types.getContainerLength(type);
+      if (length != null) {
+        return octagon.makeVariable(length, length);
+      } else {
+        return octagon.makeVariable(0, MAX_UINT32);
+      }
+    });
   }
 
   // ------------- CONSTRAINT HELPERS -----------------
@@ -494,9 +493,8 @@
   void visitBoundsCheck(BoundsCheck node) {
     if (node.checks == BoundsCheck.NONE) return;
     assert(node.indexRef != null); // Because there is at least one check.
-    SignedVariable length = node.lengthRef == null
-        ? null
-        : getValue(node.length);
+    SignedVariable length =
+        node.lengthRef == null ? null : getValue(node.length);
     SignedVariable index = getValue(node.index);
     if (node.hasUpperBoundCheck) {
       if (isDefinitelyLessThan(index, length)) {
@@ -520,12 +518,16 @@
       }
     }
     if (!node.lengthUsedInCheck && node.lengthRef != null) {
-      node..lengthRef.unlink()..lengthRef = null;
+      node
+        ..lengthRef.unlink()
+        ..lengthRef = null;
     }
     if (node.checks == BoundsCheck.NONE) {
       // We can't remove the bounds check node because it may still be used to
       // restrict code motion.  But the index is no longer needed.
-      node..indexRef.unlink()..indexRef = null;
+      node
+        ..indexRef.unlink()
+        ..indexRef = null;
     }
   }
 
@@ -632,9 +634,9 @@
       // was not rewritten to GetLength.  But if we can prove that the call only
       // succeeds for indexables, we can trust that it returns the length.
       TypeMask successType =
-          types.receiverTypeFor(node.selector, node.dartReceiver.type);
+          types.receiverTypeFor(node.selector, node.receiver.type);
       if (types.isDefinitelyIndexable(successType)) {
-        valueOf[node] = getLength(node.dartReceiver, currentEffectNumber);
+        valueOf[node] = getLength(node.receiver, currentEffectNumber);
       }
     }
   }
diff --git a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
index 5751644..7c5e45c 100644
--- a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
+++ b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
@@ -212,7 +212,7 @@
 
 /// True for the built-in operators that may be used in a compound assignment.
 bool isCompoundableOperator(BuiltinOperator operator) {
-  switch(operator) {
+  switch (operator) {
     case BuiltinOperator.NumAdd:
     case BuiltinOperator.NumSubtract:
     case BuiltinOperator.NumMultiply:
@@ -228,12 +228,11 @@
 int getEffectsOfBuiltinMethod(BuiltinMethod method) {
   switch (method) {
     case BuiltinMethod.Push:
-      return Effects.changesIndexableContent |
-             Effects.changesIndexableLength;
+      return Effects.changesIndexableContent | Effects.changesIndexableLength;
     case BuiltinMethod.Pop:
       return Effects.dependsOnIndexableContent |
-             Effects.dependsOnIndexableLength |
-             Effects.changesIndexableLength;
+          Effects.dependsOnIndexableLength |
+          Effects.changesIndexableLength;
     case BuiltinMethod.SetLength:
       return Effects.changesIndexableLength;
   }
diff --git a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
index f30375a..992ae55 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
@@ -118,25 +118,22 @@
     return letPrim(new Refinement(value, type));
   }
 
-  Primitive invokeBuiltin(BuiltinMethod method,
-                          Primitive receiver,
-                          List<Primitive> arguments,
-                          {bool receiverIsNotNull: false}) {
+  Primitive invokeBuiltin(
+      BuiltinMethod method, Primitive receiver, List<Primitive> arguments,
+      {bool receiverIsNotNull: false}) {
     ApplyBuiltinMethod apply =
         new ApplyBuiltinMethod(method, receiver, arguments, sourceInformation);
     return letPrim(apply);
   }
 
   /// Inserts an invocation and returns a primitive holding the returned value.
-  Primitive invokeMethod(Primitive receiver,
-      Selector selector,
-      TypeMask mask,
+  Primitive invokeMethod(Primitive receiver, Selector selector, TypeMask mask,
       List<Primitive> arguments,
-      [CallingConvention callingConvention = CallingConvention.Normal]) {
-    InvokeMethod invoke =
-        new InvokeMethod(receiver, selector, mask, arguments,
-                         sourceInformation: sourceInformation,
-                         callingConvention: callingConvention);
+      {Primitive interceptor, CallingConvention callingConvention}) {
+    InvokeMethod invoke = new InvokeMethod(receiver, selector, mask, arguments,
+        sourceInformation: sourceInformation,
+        callingConvention: callingConvention,
+        interceptor: interceptor);
     return letPrim(invoke);
   }
 
@@ -166,8 +163,8 @@
   /// Call [continueLoop] with the returned continuation to iterate the loop.
   ///
   /// The loop body becomes the new hole.
-  Continuation beginLoop([List<Parameter> loopVars,
-                          List<Primitive> initialValues]) {
+  Continuation beginLoop(
+      [List<Parameter> loopVars, List<Primitive> initialValues]) {
     if (initialValues == null) {
       assert(loopVars == null);
       loopVars = <Parameter>[];
@@ -193,12 +190,14 @@
   ///
   /// The other branch becomes the new hole.
   CpsFragment branch(Primitive condition,
-                     {bool negate: false,
-                      bool strict: false}) {
+      {bool negate: false, bool strict: false}) {
     Continuation trueCont = new Continuation(<Parameter>[]);
     Continuation falseCont = new Continuation(<Parameter>[]);
-    put(new LetCont.two(trueCont, falseCont,
-            new Branch(condition, trueCont, falseCont, strict: strict)));
+    put(new LetCont.two(
+        trueCont,
+        falseCont,
+        new Branch(condition, trueCont, falseCont, sourceInformation,
+            strict: strict)));
     if (negate) {
       context = trueCont;
       return new CpsFragment(sourceInformation, falseCont);
@@ -275,12 +274,14 @@
   /// remains open, even if [target] never returns.
   ///
   /// The [target] function is destroyed and should not be reused.
-  Primitive inlineFunction(FunctionDefinition target,
-                           Primitive thisArgument,
-                           List<Primitive> arguments,
-                           {Entity hint}) {
-    if (thisArgument != null) {
-      target.thisParameter.replaceUsesWith(thisArgument);
+  Primitive inlineFunction(
+      FunctionDefinition target, Primitive receiver, List<Primitive> arguments,
+      {Entity hint, Primitive interceptor}) {
+    if (interceptor != null) {
+      target.interceptorParameter.replaceUsesWith(interceptor);
+    }
+    if (receiver != null) {
+      target.receiverParameter.replaceUsesWith(receiver);
     }
     for (int i = 0; i < arguments.length; ++i) {
       target.parameters[i].replaceUsesWith(arguments[i]);
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
index 95fa11a..7927ba0 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
@@ -6,42 +6,31 @@
 
 import '../closure.dart' as closure;
 import '../common.dart';
-import '../common/names.dart' show
-    Names,
-    Selectors;
-import '../compile_time_constants.dart' show
-    BackendConstantEnvironment;
+import '../common/names.dart' show Names, Selectors;
+import '../compile_time_constants.dart' show BackendConstantEnvironment;
 import '../constants/constant_system.dart';
-import '../constants/values.dart' show
-    ConstantValue,
-    PrimitiveConstantValue;
+import '../constants/values.dart' show ConstantValue, PrimitiveConstantValue;
 import '../dart_types.dart';
 import '../elements/elements.dart';
 import '../io/source_information.dart';
-import '../js/js.dart' as js show
-    js,
-    objectLiteral,
-    Expression,
-    LiteralStatement,
-    Template,
-    InterpolatedExpression,
-    isIdentityTemplate;
-import '../native/native.dart' show
-    NativeBehavior;
+import '../js/js.dart' as js
+    show
+        js,
+        objectLiteral,
+        Expression,
+        LiteralStatement,
+        Template,
+        InterpolatedExpression,
+        isIdentityTemplate;
+import '../native/native.dart' show NativeBehavior;
 import '../tree/tree.dart' as ast;
-import '../types/types.dart' show
-    TypeMask;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector,
-    SelectorKind;
+import '../types/types.dart' show TypeMask;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector, SelectorKind;
 
-import 'cps_ir_builder_task.dart' show
-    GlobalProgramInformation;
+import 'cps_ir_builder_task.dart' show GlobalProgramInformation;
 import 'cps_ir_nodes.dart' as ir;
 
-
 /// A mapping from variable elements to their compile-time values.
 ///
 /// Map elements denoted by parameters and local variables to the
@@ -110,7 +99,7 @@
 
   ir.Primitive lookup(Local element) {
     assert(invariant(element, variable2index.containsKey(element),
-                     message: "Unknown variable: $element."));
+        message: "Unknown variable: $element."));
     return index2value[variable2index[element]];
   }
 
@@ -158,8 +147,8 @@
   /// The environment is the one in effect at the point where the jump's
   /// continuation will be bound.  Continuations can take an extra argument
   /// (see [addJump]).
-  JumpCollector(this._continuationEnvironment, this.target,
-      bool hasExtraArgument) {
+  JumpCollector(
+      this._continuationEnvironment, this.target, bool hasExtraArgument) {
     if (hasExtraArgument) _continuationEnvironment.extend(null, null);
   }
 
@@ -168,7 +157,8 @@
   /// There is no jump target, it is implicitly the exit from the function.
   /// There is no environment at the destination.
   JumpCollector.retrn(this._continuation)
-      : _continuationEnvironment = null, target = null;
+      : _continuationEnvironment = null,
+        target = null;
 
   /// Construct a collector for collecting goto jumps.
   ///
@@ -280,8 +270,8 @@
       [ir.Primitive value, SourceInformation sourceInformation]) {
     assert(_continuation == null);
     _buildTryExit(builder);
-    ir.InvokeContinuation invoke = new ir.InvokeContinuation.uninitialized(
-        isEscapingTry: isEscapingTry);
+    ir.InvokeContinuation invoke =
+        new ir.InvokeContinuation.uninitialized(isEscapingTry: isEscapingTry);
     builder.add(invoke);
     _invocations.add(invoke);
     // Truncate the environment at the invocation site so it only includes
@@ -316,8 +306,8 @@
       int length = _continuationEnvironment.length;
       for (int varIndex = 0; varIndex < length; ++varIndex) {
         for (Environment invocationEnvironment in _invocationEnvironments) {
-          assert(invocationEnvironment.sameDomain(length,
-                                                  _continuationEnvironment));
+          assert(invocationEnvironment.sameDomain(
+              length, _continuationEnvironment));
           if (invocationEnvironment[varIndex] !=
               _continuationEnvironment[varIndex]) {
             ir.Parameter parameter = new ir.Parameter(
@@ -399,10 +389,9 @@
     if (value != null) ++delta;
     if (delta > 0) builder.environment.discard(delta);
     if (value != null) builder.environment.extend(null, value);
-    builder.add(new ir.InvokeContinuation(_continuation,
-        builder.environment.index2value,
-        isRecursive: true,
-        isEscapingTry: isEscapingTry));
+    builder.add(new ir.InvokeContinuation(
+        _continuation, builder.environment.index2value,
+        isRecursive: true, isEscapingTry: isEscapingTry));
     builder._current = null;
   }
 }
@@ -424,8 +413,7 @@
       [ir.Primitive value, SourceInformation sourceInformation]) {
     isEmpty = false;
     builder.add(new ir.InvokeContinuation(continuation, <ir.Primitive>[value],
-        isEscapingTry: isEscapingTry,
-        sourceInformation: sourceInformation));
+        isEscapingTry: isEscapingTry, sourceInformation: sourceInformation));
     builder._current = null;
   }
 }
@@ -444,7 +432,8 @@
   JumpCollector _breakJoin;
 
   GotoJumpCollector(JumpTarget target, this._stateVariableIndex,
-      this._stateValue, this._breakJoin) : super.goto(target);
+      this._stateValue, this._breakJoin)
+      : super.goto(target);
 
   void addJump(IrBuilder builder,
       [ir.Primitive value, SourceInformation sourceInformation]) {
@@ -599,11 +588,10 @@
   GlobalProgramInformation get program => state.program;
 
   IrBuilder(GlobalProgramInformation program,
-            BackendConstantEnvironment constants,
-            ExecutableElement currentElement)
-    : state = new IrBuilderSharedState(program, constants, currentElement),
-      environment = new Environment.empty(),
-      mutableVariables = <Local, ir.MutableVariable>{};
+      BackendConstantEnvironment constants, ExecutableElement currentElement)
+      : state = new IrBuilderSharedState(program, constants, currentElement),
+        environment = new Environment.empty(),
+        mutableVariables = <Local, ir.MutableVariable>{};
 
   IrBuilder._internal(this.state, this.environment, this.mutableVariables);
 
@@ -630,8 +618,7 @@
 
   /// Creates a [ir.MutableVariable] for the given local.
   void makeMutableVariable(Local local) {
-    mutableVariables[local] =
-        new ir.MutableVariable(local);
+    mutableVariables[local] = new ir.MutableVariable(local);
   }
 
   /// Remove an [ir.MutableVariable] for a local.
@@ -650,8 +637,7 @@
   bool get isOpen => root == null || _current != null;
 
   List<ir.Primitive> buildFunctionHeader(Iterable<Local> parameters,
-                                        {ClosureScope closureScope,
-                                         ClosureEnvironment env}) {
+      {ClosureScope closureScope, ClosureEnvironment env}) {
     _createThisParameter();
     _enterClosureEnvironment(env);
     _enterScope(closureScope);
@@ -687,65 +673,63 @@
     return primitive;
   }
 
-  ir.Primitive buildInvokeStatic(Element element,
-                                 Selector selector,
-                                 List<ir.Primitive> arguments,
-                                 SourceInformation sourceInformation) {
+  ir.Primitive buildInvokeStatic(Element element, Selector selector,
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     assert(!element.isLocal);
     assert(!element.isInstanceMember);
     assert(isOpen);
     if (program.isJsInterop(element)) {
-      return buildInvokeJsInteropMember(element, arguments);
+      return buildInvokeJsInteropMember(element, arguments, sourceInformation);
     }
     return addPrimitive(
         new ir.InvokeStatic(element, selector, arguments, sourceInformation));
   }
 
-  ir.Primitive _buildInvokeSuper(Element target,
-                                 Selector selector,
-                                 List<ir.Primitive> arguments,
-                                 SourceInformation sourceInformation) {
+  ir.Primitive _buildInvokeSuper(Element target, Selector selector,
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     assert(target.isInstanceMember);
     assert(isOpen);
     return addPrimitive(new ir.InvokeMethodDirectly(
         buildThis(), target, selector, arguments, sourceInformation));
   }
 
-  ir.Primitive _buildInvokeDynamic(ir.Primitive receiver,
-                                   Selector selector,
-                                   TypeMask mask,
-                                   List<ir.Primitive> arguments,
-                                   SourceInformation sourceInformation) {
+  ir.Primitive _buildInvokeDynamic(
+      ir.Primitive receiver,
+      Selector selector,
+      TypeMask mask,
+      List<ir.Primitive> arguments,
+      SourceInformation sourceInformation) {
     assert(isOpen);
-    return addPrimitive(new ir.InvokeMethod(
-        receiver, selector, mask, arguments,
+    return addPrimitive(new ir.InvokeMethod(receiver, selector, mask, arguments,
         sourceInformation: sourceInformation));
   }
 
-  ir.Primitive _buildInvokeCall(ir.Primitive target,
-                                CallStructure callStructure,
-                                TypeMask mask,
-                                List<ir.Definition> arguments,
-                                {SourceInformation sourceInformation}) {
+  ir.Primitive _buildInvokeCall(
+      ir.Primitive target,
+      CallStructure callStructure,
+      TypeMask mask,
+      List<ir.Definition> arguments,
+      SourceInformation sourceInformation) {
     Selector selector = callStructure.callSelector;
     return _buildInvokeDynamic(
         target, selector, mask, arguments, sourceInformation);
   }
 
   ir.Primitive buildStaticNoSuchMethod(Selector selector,
-                                       List<ir.Primitive> arguments) {
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     ir.Primitive receiver = buildStringConstant('');
     ir.Primitive name = buildStringConstant(selector.name);
     ir.Primitive argumentList = buildListLiteral(null, arguments);
     ir.Primitive expectedArgumentNames = buildNullConstant();
     return buildStaticFunctionInvocation(
         program.throwNoSuchMethod,
-        <ir.Primitive>[receiver, name, argumentList, expectedArgumentNames]);
+        <ir.Primitive>[receiver, name, argumentList, expectedArgumentNames],
+        sourceInformation);
   }
 
   /// Create a [ir.Constant] from [value] and add it to the CPS term.
   ir.Constant buildConstant(ConstantValue value,
-                            {SourceInformation sourceInformation}) {
+      {SourceInformation sourceInformation}) {
     assert(isOpen);
     return addPrimitive(
         new ir.Constant(value, sourceInformation: sourceInformation));
@@ -784,9 +768,9 @@
 
   /// Creates a non-constant list literal of the provided [type] and with the
   /// provided [values].
-  ir.Primitive buildListLiteral(InterfaceType type,
-                                Iterable<ir.Primitive> values,
-                                {TypeMask allocationSiteType}) {
+  ir.Primitive buildListLiteral(
+      InterfaceType type, Iterable<ir.Primitive> values,
+      {TypeMask allocationSiteType}) {
     assert(isOpen);
     return addPrimitive(new ir.LiteralList(type, values.toList(),
         allocationSiteType: allocationSiteType));
@@ -798,7 +782,8 @@
   ir.Primitive buildConditional(
       ir.Primitive condition,
       ir.Primitive buildThenExpression(IrBuilder builder),
-      ir.Primitive buildElseExpression(IrBuilder builder)) {
+      ir.Primitive buildElseExpression(IrBuilder builder),
+      SourceInformation sourceInformation) {
     assert(isOpen);
 
     // The then and else expressions are delimited.
@@ -828,11 +813,13 @@
     ir.Continuation elseContinuation = new ir.Continuation([]);
     thenContinuation.body = thenBuilder.root;
     elseContinuation.body = elseBuilder.root;
-    add(new ir.LetCont(join.continuation,
-            new ir.LetCont.two(thenContinuation, elseContinuation,
-                new ir.Branch.strict(condition,
-                                     thenContinuation,
-                                     elseContinuation))));
+    add(new ir.LetCont(
+        join.continuation,
+        new ir.LetCont.two(
+            thenContinuation,
+            elseContinuation,
+            new ir.Branch.strict(condition, thenContinuation, elseContinuation,
+                sourceInformation))));
     environment = join.environment;
     return environment.discard(1);
   }
@@ -855,14 +842,12 @@
   /// 1. Call [buildFunctionHeader].
   /// 2. Call `buildXXX` methods to build the body.
   /// 3. Call [makeFunctionDefinition] to finish.
-  ir.FunctionDefinition makeFunctionDefinition() {
+  ir.FunctionDefinition makeFunctionDefinition(
+      SourceInformation sourceInformation) {
     _ensureReturn();
-    return new ir.FunctionDefinition(
-        state.currentElement,
-        state.thisParameter,
-        state.functionParameters,
-        state.returnContinuation,
-        root);
+    return new ir.FunctionDefinition(state.currentElement, state.thisParameter,
+        state.functionParameters, state.returnContinuation, root,
+        sourceInformation: sourceInformation);
   }
 
   /// Create a invocation of the [method] on the super class where the call
@@ -872,68 +857,54 @@
       MethodElement method,
       CallStructure callStructure,
       List<ir.Primitive> arguments,
-      {SourceInformation sourceInformation}) {
+      SourceInformation sourceInformation) {
     // TODO(johnniwinther): This shouldn't be necessary.
     SelectorKind kind = Elements.isOperatorName(method.name)
-        ? SelectorKind.OPERATOR : SelectorKind.CALL;
-    Selector selector =
-        new Selector(kind, method.memberName, callStructure);
+        ? SelectorKind.OPERATOR
+        : SelectorKind.CALL;
+    Selector selector = new Selector(kind, method.memberName, callStructure);
     return _buildInvokeSuper(method, selector, arguments, sourceInformation);
   }
 
   /// Create a read access of the [method] on the super class, i.e. a
   /// closurization of [method].
-  ir.Primitive buildSuperMethodGet(MethodElement method,
-                                   {SourceInformation sourceInformation}) {
+  ir.Primitive buildSuperMethodGet(
+      MethodElement method, SourceInformation sourceInformation) {
     // TODO(johnniwinther): This should have its own ir node.
-    return _buildInvokeSuper(
-        method,
-        new Selector.getter(method.memberName),
-        const <ir.Primitive>[],
-        sourceInformation);
+    return _buildInvokeSuper(method, new Selector.getter(method.memberName),
+        const <ir.Primitive>[], sourceInformation);
   }
 
   /// Create a getter invocation of the [getter] on the super class.
-  ir.Primitive buildSuperGetterGet(MethodElement getter,
-                                   SourceInformation sourceInformation) {
+  ir.Primitive buildSuperGetterGet(
+      MethodElement getter, SourceInformation sourceInformation) {
     // TODO(johnniwinther): This should have its own ir node.
-    return _buildInvokeSuper(
-        getter,
-        new Selector.getter(getter.memberName),
-        const <ir.Primitive>[],
-        sourceInformation);
+    return _buildInvokeSuper(getter, new Selector.getter(getter.memberName),
+        const <ir.Primitive>[], sourceInformation);
   }
 
   /// Create an setter invocation of the [setter] on the super class with
   /// [value].
-  ir.Primitive buildSuperSetterSet(MethodElement setter,
-                                   ir.Primitive value,
-                                   {SourceInformation sourceInformation}) {
+  ir.Primitive buildSuperSetterSet(MethodElement setter, ir.Primitive value,
+      SourceInformation sourceInformation) {
     // TODO(johnniwinther): This should have its own ir node.
-    _buildInvokeSuper(
-        setter,
-        new Selector.setter(setter.memberName),
-        <ir.Primitive>[value],
-        sourceInformation);
+    _buildInvokeSuper(setter, new Selector.setter(setter.memberName),
+        <ir.Primitive>[value], sourceInformation);
     return value;
   }
 
   /// Create an invocation of the index [method] on the super class with
   /// the provided [index].
-  ir.Primitive buildSuperIndex(MethodElement method,
-                               ir.Primitive index,
-                               {SourceInformation sourceInformation}) {
+  ir.Primitive buildSuperIndex(MethodElement method, ir.Primitive index,
+      SourceInformation sourceInformation) {
     return _buildInvokeSuper(
-        method, new Selector.index(), <ir.Primitive>[index],
-        sourceInformation);
+        method, new Selector.index(), <ir.Primitive>[index], sourceInformation);
   }
 
   /// Create an invocation of the index set [method] on the super class with
   /// the provided [index] and [value].
-  ir.Primitive buildSuperIndexSet(MethodElement method,
-                                  ir.Primitive index,
-                                  ir.Primitive value,
-                                  {SourceInformation sourceInformation}) {
+  ir.Primitive buildSuperIndexSet(MethodElement method, ir.Primitive index,
+      ir.Primitive value, SourceInformation sourceInformation) {
     _buildInvokeSuper(method, new Selector.indexSet(),
         <ir.Primitive>[index, value], sourceInformation);
     return value;
@@ -942,27 +913,26 @@
   /// Create a dynamic invocation on [receiver] where the method name and
   /// argument structure are defined by [selector] and the argument values are
   /// defined by [arguments].
-  ir.Primitive buildDynamicInvocation(ir.Primitive receiver,
-                                      Selector selector,
-                                      TypeMask mask,
-                                      List<ir.Primitive> arguments,
-                                      {SourceInformation sourceInformation}) {
+  ir.Primitive buildDynamicInvocation(
+      ir.Primitive receiver,
+      Selector selector,
+      TypeMask mask,
+      List<ir.Primitive> arguments,
+      SourceInformation sourceInformation) {
     return _buildInvokeDynamic(
         receiver, selector, mask, arguments, sourceInformation);
   }
 
   /// Create a dynamic getter invocation on [receiver] where the getter name is
   /// defined by [selector].
-  ir.Primitive buildDynamicGet(ir.Primitive receiver,
-                               Selector selector,
-                               TypeMask mask,
-                               SourceInformation sourceInformation) {
+  ir.Primitive buildDynamicGet(ir.Primitive receiver, Selector selector,
+      TypeMask mask, SourceInformation sourceInformation) {
     assert(selector.isGetter);
     FieldElement field = program.locateSingleField(selector, mask);
     if (field != null) {
       // If the world says this resolves to a unique field, then it MUST be
       // treated as a field access, since the getter might not be emitted.
-      return buildFieldGet(receiver, field);
+      return buildFieldGet(receiver, field, sourceInformation);
     } else {
       return _buildInvokeDynamic(
           receiver, selector, mask, const <ir.Primitive>[], sourceInformation);
@@ -971,34 +941,31 @@
 
   /// Create a dynamic setter invocation on [receiver] where the setter name and
   /// argument are defined by [selector] and [value], respectively.
-  ir.Primitive buildDynamicSet(ir.Primitive receiver,
-                               Selector selector,
-                               TypeMask mask,
-                               ir.Primitive value,
-                               {SourceInformation sourceInformation}) {
+  ir.Primitive buildDynamicSet(ir.Primitive receiver, Selector selector,
+      TypeMask mask, ir.Primitive value, SourceInformation sourceInformation) {
     assert(selector.isSetter);
     FieldElement field = program.locateSingleField(selector, mask);
     if (field != null) {
       // If the world says this resolves to a unique field, then it MUST be
       // treated as a field access, since the setter might not be emitted.
-      buildFieldSet(receiver, field, value);
+      buildFieldSet(receiver, field, value, sourceInformation);
     } else {
-      _buildInvokeDynamic(receiver, selector, mask, <ir.Primitive>[value],
-                          sourceInformation);
+      _buildInvokeDynamic(
+          receiver, selector, mask, <ir.Primitive>[value], sourceInformation);
     }
     return value;
   }
 
   /// Create a dynamic index set invocation on [receiver] with the provided
   /// [index] and [value].
-  ir.Primitive buildDynamicIndexSet(ir.Primitive receiver,
-                                    TypeMask mask,
-                                    ir.Primitive index,
-                                    ir.Primitive value,
-                                    {SourceInformation sourceInformation}) {
-    _buildInvokeDynamic(
-        receiver, new Selector.indexSet(), mask, <ir.Primitive>[index, value],
-        sourceInformation);
+  ir.Primitive buildDynamicIndexSet(
+      ir.Primitive receiver,
+      TypeMask mask,
+      ir.Primitive index,
+      ir.Primitive value,
+      SourceInformation sourceInformation) {
+    _buildInvokeDynamic(receiver, new Selector.indexSet(), mask,
+        <ir.Primitive>[index, value], sourceInformation);
     return value;
   }
 
@@ -1012,42 +979,37 @@
       SourceInformation sourceInformation) {
     // TODO(johnniwinther): Maybe this should have its own ir node.
     return buildCallInvocation(
-        buildLocalGet(function), callStructure, arguments,
-        sourceInformation: sourceInformation);
+        buildLocalGet(function), callStructure, arguments, sourceInformation);
   }
 
   /// Create a static invocation of [function].
   ///
   /// The arguments are not named and their values are defined by [arguments].
-  ir.Primitive buildStaticFunctionInvocation(
-      MethodElement function,
-      List<ir.Primitive> arguments,
-      {SourceInformation sourceInformation}) {
+  ir.Primitive buildStaticFunctionInvocation(MethodElement function,
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     Selector selector = new Selector.call(
         function.memberName, new CallStructure(arguments.length));
     return buildInvokeStatic(function, selector, arguments, sourceInformation);
   }
 
   /// Create a getter invocation of the static [getter].
-  ir.Primitive buildStaticGetterGet(MethodElement getter,
-                                    SourceInformation sourceInformation) {
+  ir.Primitive buildStaticGetterGet(
+      MethodElement getter, SourceInformation sourceInformation) {
     Selector selector = new Selector.getter(getter.memberName);
     return buildInvokeStatic(
         getter, selector, const <ir.Primitive>[], sourceInformation);
   }
 
   /// Create a write access to the static [field] with the [value].
-  ir.Primitive buildStaticFieldSet(FieldElement field,
-                                   ir.Primitive value,
-                                   [SourceInformation sourceInformation]) {
+  ir.Primitive buildStaticFieldSet(FieldElement field, ir.Primitive value,
+      SourceInformation sourceInformation) {
     addPrimitive(new ir.SetStatic(field, value, sourceInformation));
     return value;
   }
 
   /// Create a setter invocation of the static [setter] with the [value].
-  ir.Primitive buildStaticSetterSet(MethodElement setter,
-                                    ir.Primitive value,
-                                    {SourceInformation sourceInformation}) {
+  ir.Primitive buildStaticSetterSet(MethodElement setter, ir.Primitive value,
+      SourceInformation sourceInformation) {
     Selector selector = new Selector.setter(setter.memberName);
     buildInvokeStatic(
         setter, selector, <ir.Primitive>[value], sourceInformation);
@@ -1057,22 +1019,18 @@
   /// Create an erroneous invocation where argument structure is defined by
   /// [selector] and the argument values are defined by [arguments].
   // TODO(johnniwinther): Make this more fine-grained.
-  ir.Primitive buildErroneousInvocation(
-      Element element,
-      Selector selector,
-      List<ir.Primitive> arguments) {
+  ir.Primitive buildErroneousInvocation(Element element, Selector selector,
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     // TODO(johnniwinther): This should have its own ir node.
-    return buildInvokeStatic(element, selector, arguments, null);
+    return buildInvokeStatic(element, selector, arguments, sourceInformation);
   }
 
   /// Concatenate string values.  The arguments must be strings.
-  ir.Primitive buildStringConcatenation(List<ir.Primitive> arguments,
-                                        {SourceInformation sourceInformation}) {
+  ir.Primitive buildStringConcatenation(
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     assert(isOpen);
     return addPrimitive(new ir.ApplyBuiltinOperator(
-        ir.BuiltinOperator.StringConcatenate,
-        arguments,
-        sourceInformation));
+        ir.BuiltinOperator.StringConcatenate, arguments, sourceInformation));
   }
 
   /// Create an invocation of the `call` method of [functionExpression], where
@@ -1082,9 +1040,9 @@
       ir.Primitive functionExpression,
       CallStructure callStructure,
       List<ir.Definition> arguments,
-      {SourceInformation sourceInformation}) {
-    return _buildInvokeCall(functionExpression, callStructure, null, arguments,
-        sourceInformation: sourceInformation);
+      SourceInformation sourceInformation) {
+    return _buildInvokeCall(
+        functionExpression, callStructure, null, arguments, sourceInformation);
   }
 
   /// Creates an if-then-else statement with the provided [condition] where the
@@ -1094,9 +1052,11 @@
   /// An if-then statement is created if [buildElsePart] is a no-op.
   // TODO(johnniwinther): Unify implementation with [buildConditional] and
   // [_buildLogicalOperator].
-  void buildIf(ir.Primitive condition,
-               void buildThenPart(IrBuilder builder),
-               void buildElsePart(IrBuilder builder)) {
+  void buildIf(
+      ir.Primitive condition,
+      void buildThenPart(IrBuilder builder),
+      void buildElsePart(IrBuilder builder),
+      SourceInformation sourceInformation) {
     assert(isOpen);
 
     // The then and else parts are delimited.
@@ -1120,13 +1080,12 @@
         ? <ir.Continuation>[elseContinuation, thenContinuation]
         : <ir.Continuation>[thenContinuation, elseContinuation];
 
-    ir.Expression result =
-        new ir.LetCont.many(arms,
-            new ir.Branch.strict(condition,
-                                 thenContinuation,
-                                 elseContinuation));
+    ir.Expression result = new ir.LetCont.many(
+        arms,
+        new ir.Branch.strict(
+            condition, thenContinuation, elseContinuation, sourceInformation));
 
-    JumpCollector join;  // Null if there is no join.
+    JumpCollector join; // Null if there is no join.
     if (thenBuilder.isOpen && elseBuilder.isOpen) {
       // There is a join-point continuation.  Build the term
       // 'let cont join(x, ...) = [] in Result' and plug invocations of the
@@ -1171,9 +1130,10 @@
 
   void addRecursiveContinuation(BackwardJumpCollector collector) {
     assert(environment.length == collector.environment.length);
-    add(new ir.LetCont(collector.continuation,
-            new ir.InvokeContinuation(collector.continuation,
-                                      environment.index2value)));
+    add(new ir.LetCont(
+        collector.continuation,
+        new ir.InvokeContinuation(
+            collector.continuation, environment.index2value)));
     environment = collector.environment;
   }
 
@@ -1190,13 +1150,15 @@
   ///
   /// [loopVariables] is the list of variables declared in the for-loop
   /// initializer.
-  void buildFor({SubbuildFunction buildInitializer,
-                 SubbuildFunction buildCondition,
-                 SubbuildFunction buildBody,
-                 SubbuildFunction buildUpdate,
-                 JumpTarget target,
-                 ClosureScope closureScope,
-                 List<LocalElement> loopVariables}) {
+  void buildFor(
+      {SubbuildFunction buildInitializer,
+      SubbuildFunction buildCondition,
+      SourceInformation conditionSourceInformation,
+      SubbuildFunction buildBody,
+      SubbuildFunction buildUpdate,
+      JumpTarget target,
+      ClosureScope closureScope,
+      List<LocalElement> loopVariables}) {
     assert(isOpen);
 
     // For loops use four named continuations: the entry to the condition,
@@ -1279,8 +1241,8 @@
     // Connect the inner and outer body builders.  This is done only after
     // it is guaranteed that the updateBuilder has a non-empty term.
     if (hasContinues) {
-      outerBodyBuilder.add(new ir.LetCont(continueCollector.continuation,
-          innerBodyBuilder.root));
+      outerBodyBuilder.add(new ir.LetCont(
+          continueCollector.continuation, innerBodyBuilder.root));
       continueCollector.continuation.body = updateBuilder.root;
     } else {
       outerBodyBuilder.add(innerBodyBuilder.root);
@@ -1292,11 +1254,11 @@
     bodyContinuation.body = outerBodyBuilder.root;
     // Note the order of continuations: the first one is the one that will
     // be filled by LetCont.plug.
-    ir.LetCont branch =
-        new ir.LetCont.two(exitContinuation, bodyContinuation,
-            new ir.Branch.strict(condition,
-                                 bodyContinuation,
-                                 exitContinuation));
+    ir.LetCont branch = new ir.LetCont.two(
+        exitContinuation,
+        bodyContinuation,
+        new ir.Branch.strict(condition, bodyContinuation, exitContinuation,
+            conditionSourceInformation));
     // If there are breaks in the body, then there must be a join-point
     // continuation for the normal exit and the breaks.  Otherwise, the
     // successor is translated in the hole in the exit continuation.
@@ -1330,17 +1292,23 @@
   /// [buildBody] creates the body, `b`, of the loop. The jump [target] is used
   /// to identify which `break` and `continue` statements that have this for-in
   /// statement as their target.
-  void buildForIn({SubbuildFunction buildExpression,
-                   SubbuildFunction buildVariableDeclaration,
-                   Element variableElement,
-                   Selector variableSelector,
-                   TypeMask variableMask,
-                   TypeMask currentMask,
-                   TypeMask iteratorMask,
-                   TypeMask moveNextMask,
-                   SubbuildFunction buildBody,
-                   JumpTarget target,
-                   ClosureScope closureScope}) {
+  void buildForIn(
+      {SubbuildFunction buildExpression,
+      SubbuildFunction buildVariableDeclaration,
+      Element variableElement,
+      Selector variableSelector,
+      TypeMask variableMask,
+      SourceInformation variableSetSourceInformation,
+      TypeMask currentMask,
+      SourceInformation currentSourceInformation,
+      TypeMask iteratorMask,
+      SourceInformation iteratorSourceInformation,
+      TypeMask moveNextMask,
+      SourceInformation moveNextSourceInformation,
+      SubbuildFunction buildBody,
+      JumpTarget target,
+      ClosureScope closureScope,
+      SourceInformation conditionSourceInformation}) {
     // The for-in loop
     //
     // for (a in e) s;
@@ -1360,11 +1328,8 @@
     // in expressionReceiver.iterator () iteratorInvoked
     ir.Primitive expressionReceiver = buildExpression(this);
     List<ir.Primitive> emptyArguments = <ir.Primitive>[];
-    ir.Primitive iterator = addPrimitive(
-        new ir.InvokeMethod(expressionReceiver,
-            Selectors.iterator,
-            iteratorMask,
-            emptyArguments));
+    ir.Primitive iterator = addPrimitive(new ir.InvokeMethod(
+        expressionReceiver, Selectors.iterator, iteratorMask, emptyArguments));
 
     // Fill with:
     // let cont loop(x, ...) =
@@ -1374,11 +1339,8 @@
     // in loop(v, ...)
     JumpCollector loop = new BackwardJumpCollector(environment, target: target);
     addRecursiveContinuation(loop);
-    ir.Primitive condition = addPrimitive(
-        new ir.InvokeMethod(iterator,
-            Selectors.moveNext,
-            moveNextMask,
-            emptyArguments));
+    ir.Primitive condition = addPrimitive(new ir.InvokeMethod(
+        iterator, Selectors.moveNext, moveNextMask, emptyArguments));
 
     // As a delimited term, build:
     // <<BODY>> =
@@ -1393,39 +1355,40 @@
     if (buildVariableDeclaration != null) {
       buildVariableDeclaration(bodyBuilder);
     }
-    ir.Primitive currentValue = bodyBuilder.addPrimitive(
-        new ir.InvokeMethod(
-            iterator,
-            Selectors.current,
-            currentMask,
-            emptyArguments));
+    ir.Primitive currentValue = bodyBuilder.addPrimitive(new ir.InvokeMethod(
+        iterator, Selectors.current, currentMask, emptyArguments,
+        sourceInformation: currentSourceInformation));
     // TODO(johnniwinther): Extract this as a provided strategy.
     if (Elements.isLocal(variableElement)) {
-      bodyBuilder.buildLocalVariableSet(variableElement, currentValue);
+      bodyBuilder.buildLocalVariableSet(
+          variableElement, currentValue, variableSetSourceInformation);
     } else if (Elements.isError(variableElement) ||
-               Elements.isMalformed(variableElement)) {
+        Elements.isMalformed(variableElement)) {
       Selector selector = new Selector.setter(
           new Name(variableElement.name, variableElement.library));
       List<ir.Primitive> value = <ir.Primitive>[currentValue];
       // Note the comparison below.  It can be the case that an element isError
       // and isMalformed.
       if (Elements.isError(variableElement)) {
-        bodyBuilder.buildStaticNoSuchMethod(selector, value);
+        bodyBuilder.buildStaticNoSuchMethod(
+            selector, value, variableSetSourceInformation);
       } else {
-        bodyBuilder.buildErroneousInvocation(variableElement, selector, value);
+        bodyBuilder.buildErroneousInvocation(
+            variableElement, selector, value, variableSetSourceInformation);
       }
     } else if (Elements.isStaticOrTopLevel(variableElement)) {
       if (variableElement.isField) {
-        bodyBuilder.addPrimitive(
-            new ir.SetStatic(variableElement, currentValue));
+        bodyBuilder.addPrimitive(new ir.SetStatic(
+            variableElement, currentValue, variableSetSourceInformation));
       } else {
-        bodyBuilder.buildStaticSetterSet(variableElement, currentValue);
+        bodyBuilder.buildStaticSetterSet(
+            variableElement, currentValue, variableSetSourceInformation);
       }
     } else {
       ir.Primitive receiver = bodyBuilder.buildThis();
       assert(receiver != null);
-      bodyBuilder.buildDynamicSet(
-          receiver, variableSelector, variableMask, currentValue);
+      bodyBuilder.buildDynamicSet(receiver, variableSelector, variableMask,
+          currentValue, variableSetSourceInformation);
     }
 
     // Translate the body in the hole in the delimited term above, and add
@@ -1451,11 +1414,11 @@
     bodyContinuation.body = bodyBuilder.root;
     // Note the order of continuations: the first one is the one that will
     // be filled by LetCont.plug.
-    ir.LetCont branch =
-        new ir.LetCont.two(exitContinuation, bodyContinuation,
-            new ir.Branch.strict(condition,
-                                 bodyContinuation,
-                                 exitContinuation));
+    ir.LetCont branch = new ir.LetCont.two(
+        exitContinuation,
+        bodyContinuation,
+        new ir.Branch.strict(condition, bodyContinuation, exitContinuation,
+            conditionSourceInformation));
     // If there are breaks in the body, then there must be a join-point
     // continuation for the normal exit and the breaks.  Otherwise, the
     // successor is translated in the hole in the exit continuation.
@@ -1478,10 +1441,12 @@
   ///
   /// The jump [target] is used to identify which `break` and `continue`
   /// statements that have this `while` statement as their target.
-  void buildWhile({SubbuildFunction buildCondition,
-                   SubbuildFunction buildBody,
-                   JumpTarget target,
-                   ClosureScope closureScope}) {
+  void buildWhile(
+      {SubbuildFunction buildCondition,
+      SubbuildFunction buildBody,
+      JumpTarget target,
+      ClosureScope closureScope,
+      SourceInformation sourceInformation}) {
     assert(isOpen);
     // While loops use four named continuations: the entry to the body, the
     // loop exit, the loop back edge (continue), and the loop exit (break).
@@ -1526,11 +1491,11 @@
     bodyContinuation.body = bodyBuilder.root;
     // Note the order of continuations: the first one is the one that will
     // be filled by LetCont.plug.
-    ir.LetCont branch =
-        new ir.LetCont.two(exitContinuation, bodyContinuation,
-            new ir.Branch.strict(condition,
-                                 bodyContinuation,
-                                 exitContinuation));
+    ir.LetCont branch = new ir.LetCont.two(
+        exitContinuation,
+        bodyContinuation,
+        new ir.Branch.strict(
+            condition, bodyContinuation, exitContinuation, sourceInformation));
     // If there are breaks in the body, then there must be a join-point
     // continuation for the normal exit and the breaks.  Otherwise, the
     // successor is translated in the hole in the exit continuation.
@@ -1548,7 +1513,6 @@
     }
   }
 
-
   /// Creates a do-while loop.
   ///
   /// The body and condition are created by [buildBody] and [buildCondition].
@@ -1556,10 +1520,12 @@
   /// statements in the body that have the loop as their target.
   /// [closureScope] contains all the variables declared in the loop (but not
   /// declared in some inner closure scope).
-  void buildDoWhile({SubbuildFunction buildBody,
-                     SubbuildFunction buildCondition,
-                     JumpTarget target,
-                     ClosureScope closureScope}) {
+  void buildDoWhile(
+      {SubbuildFunction buildBody,
+      SubbuildFunction buildCondition,
+      JumpTarget target,
+      ClosureScope closureScope,
+      SourceInformation sourceInformation}) {
     assert(isOpen);
     // The CPS translation of [[do body; while (condition); successor]] is:
     //
@@ -1612,11 +1578,11 @@
     repeatBuilder.jumpTo(loop);
     repeatContinuation.body = repeatBuilder.root;
 
-    continueBuilder.add(
-        new ir.LetCont.two(exitContinuation, repeatContinuation,
-            new ir.Branch.strict(condition,
-                                 repeatContinuation,
-                                 exitContinuation)));
+    continueBuilder.add(new ir.LetCont.two(
+        exitContinuation,
+        repeatContinuation,
+        new ir.Branch.strict(condition, repeatContinuation, exitContinuation,
+            sourceInformation)));
     continueCollector.continuation.body = continueBuilder.root;
 
     // Construct the loop continuation (i.e., the body and condition).
@@ -1624,18 +1590,16 @@
     // let cont continue(x, ...) =
     //   <Continue>
     // in [[body]]; continue(v, ...)
-    loopBuilder.add(
-        new ir.LetCont(continueCollector.continuation,
-            bodyBuilder.root));
+    loopBuilder
+        .add(new ir.LetCont(continueCollector.continuation, bodyBuilder.root));
 
     // And tie it all together.
     add(new ir.LetCont(breakCollector.continuation, loopBuilder.root));
     environment = breakCollector.environment;
   }
 
-  void buildSimpleSwitch(JumpCollector join,
-                         List<SwitchCaseInfo> cases,
-                         SubbuildFunction buildDefaultBody) {
+  void buildSimpleSwitch(JumpCollector join, List<SwitchCaseInfo> cases,
+      SubbuildFunction buildDefaultBody) {
     IrBuilder casesBuilder = makeDelimitedBuilder();
     for (SwitchCaseInfo caseInfo in cases) {
       ir.Primitive condition = caseInfo.buildCondition(casesBuilder);
@@ -1647,11 +1611,11 @@
       // A LetCont.two term has a hole as the body of the first listed
       // continuation, to be plugged by the translation.  Therefore put the
       // else continuation first.
-      casesBuilder.add(
-          new ir.LetCont.two(elseContinuation, thenContinuation,
-              new ir.Branch.strict(condition,
-                                   thenContinuation,
-                                   elseContinuation)));
+      casesBuilder.add(new ir.LetCont.two(
+          elseContinuation,
+          thenContinuation,
+          new ir.Branch.strict(condition, thenContinuation, elseContinuation,
+              caseInfo.sourceInformation)));
     }
 
     if (buildDefaultBody == null) {
@@ -1683,13 +1647,14 @@
   ///
   /// Please see the function's implementation for where these functions are
   /// called.
-  void _helpBuildTryCatch(TryStatementInfo variables,
+  void _helpBuildTryCatch(
+      TryStatementInfo variables,
       void enterTry(IrBuilder builder),
       SubbuildFunction buildTryBlock,
       void leaveTry(IrBuilder builder),
       List<ir.Parameter> buildCatch(IrBuilder builder, JumpCollector join),
-      void leaveTryCatch(IrBuilder builder, JumpCollector join,
-          ir.Expression body)) {
+      void leaveTryCatch(
+          IrBuilder builder, JumpCollector join, ir.Expression body)) {
     JumpCollector join = new ForwardJumpCollector(environment);
     IrBuilder tryCatchBuilder = makeDelimitedBuilder();
 
@@ -1727,8 +1692,7 @@
     List<ir.Parameter> catchParameters = buildCatch(catchBuilder, join);
     ir.Continuation catchContinuation = new ir.Continuation(catchParameters);
     catchContinuation.body = catchBuilder.root;
-    tryCatchBuilder.add(
-        new ir.LetHandler(catchContinuation, tryBuilder.root));
+    tryCatchBuilder.add(new ir.LetHandler(catchContinuation, tryBuilder.root));
 
     leaveTryCatch(this, join, tryCatchBuilder.root);
   }
@@ -1740,9 +1704,8 @@
   /// [buildTryBlock] builds the try block.
   /// [catchClauseInfos] provides access to the catch type, exception variable,
   /// and stack trace variable, and a function for building the catch block.
-  void buildTryCatch(TryStatementInfo variables,
-                     SubbuildFunction buildTryBlock,
-                     List<CatchClauseInfo> catchClauseInfos) {
+  void buildTryCatch(TryStatementInfo variables, SubbuildFunction buildTryBlock,
+      List<CatchClauseInfo> catchClauseInfos) {
     assert(isOpen);
     // Catch handlers are in scope for their body.  The CPS translation of
     // [[try tryBlock catch (ex, st) catchBlock; successor]] is:
@@ -1796,8 +1759,7 @@
       restoreJump(builder.state.returnCollector);
     }
 
-    List<ir.Parameter> buildCatch(IrBuilder builder,
-                                  JumpCollector join) {
+    List<ir.Parameter> buildCatch(IrBuilder builder, JumpCollector join) {
       // Translate the catch clauses.  Multiple clauses are translated as if
       // they were explicitly cascaded if/else type tests.
 
@@ -1839,9 +1801,8 @@
 
       // Expand multiple catch clauses into an explicit if/then/else.  Iterate
       // them in reverse so the current block becomes the next else block.
-      ir.Expression catchBody = (catchAll == null)
-          ? new ir.Rethrow()
-          : buildCatchClause(catchAll);
+      ir.Expression catchBody =
+          (catchAll == null) ? new ir.Rethrow() : buildCatchClause(catchAll);
       for (CatchClauseInfo clause in catchClauseInfos.reversed) {
         ir.Continuation thenContinuation = new ir.Continuation([]);
         ir.Continuation elseContinuation = new ir.Continuation([]);
@@ -1852,14 +1813,14 @@
         // environment with the nested builder because this part cannot mutate
         // it.
         IrBuilder checkBuilder = builder.makeDelimitedBuilder(environment);
-        ir.Primitive typeMatches =
-            checkBuilder.buildTypeOperator(exceptionParameter,
-                clause.type,
-                isTypeTest: true);
-        checkBuilder.add(new ir.LetCont.two(thenContinuation, elseContinuation,
-            new ir.Branch.strict(typeMatches,
-                                 thenContinuation,
-                                 elseContinuation)));
+        ir.Primitive typeMatches = checkBuilder.buildTypeOperator(
+            exceptionParameter, clause.type, clause.sourceInformation,
+            isTypeTest: true);
+        checkBuilder.add(new ir.LetCont.two(
+            thenContinuation,
+            elseContinuation,
+            new ir.Branch.strict(typeMatches, thenContinuation,
+                elseContinuation, clause.sourceInformation)));
         catchBody = checkBuilder.root;
       }
       builder.add(catchBody);
@@ -1867,16 +1828,16 @@
       return <ir.Parameter>[exceptionParameter, traceParameter];
     }
 
-    void leaveTryCatch(IrBuilder builder, JumpCollector join,
-                       ir.Expression body) {
+    void leaveTryCatch(
+        IrBuilder builder, JumpCollector join, ir.Expression body) {
       // Add the binding for the join-point continuation and continue the
       // translation in its body.
       builder.add(new ir.LetCont(join.continuation, body));
       builder.environment = join.environment;
     }
 
-    _helpBuildTryCatch(variables, enterTry, buildTryBlock, leaveTry,
-        buildCatch, leaveTryCatch);
+    _helpBuildTryCatch(variables, enterTry, buildTryBlock, leaveTry, buildCatch,
+        leaveTryCatch);
   }
 
   /// Translates a try/finally.
@@ -1886,8 +1847,7 @@
   /// [buildTryBlock] builds the try block.
   /// [buildFinallyBlock] builds the finally block.
   void buildTryFinally(TryStatementInfo variables,
-                       SubbuildFunction buildTryBlock,
-                       SubbuildFunction buildFinallyBlock) {
+      SubbuildFunction buildTryBlock, SubbuildFunction buildFinallyBlock) {
     assert(isOpen);
     // Try/finally is implemented in terms of try/catch and by duplicating the
     // code for finally at all exits.  The encoding is:
@@ -1918,13 +1878,13 @@
       savedContinues = builder.state.continueCollectors;
       savedReturn = builder.state.returnCollector;
 
-      builder.state.breakCollectors = newBreaks =
-          savedBreaks.map(interceptJump).toList();
-      builder.state.continueCollectors = newContinues =
-          savedContinues.map(interceptJump).toList();
+      builder.state.breakCollectors =
+          newBreaks = savedBreaks.map(interceptJump).toList();
+      builder.state.continueCollectors =
+          newContinues = savedContinues.map(interceptJump).toList();
       builder.state.returnCollector = newReturn =
           new ForwardJumpCollector(environment, hasExtraArgument: true)
-              ..enterTry(variables.boxedOnEntry);
+            ..enterTry(variables.boxedOnEntry);
     }
 
     void leaveTry(IrBuilder builder) {
@@ -1942,8 +1902,7 @@
       builder.state.returnCollector = savedReturn;
     }
 
-    List<ir.Parameter> buildCatch(IrBuilder builder,
-                                  JumpCollector join) {
+    List<ir.Parameter> buildCatch(IrBuilder builder, JumpCollector join) {
       // The catch block of the try/catch used for try/finally is the finally
       // code followed by a rethrow.
       buildFinallyBlock(builder);
@@ -1954,13 +1913,13 @@
       return <ir.Parameter>[new ir.Parameter(null), new ir.Parameter(null)];
     }
 
-    void leaveTryCatch(IrBuilder builder, JumpCollector join,
-                       ir.Expression body) {
+    void leaveTryCatch(
+        IrBuilder builder, JumpCollector join, ir.Expression body) {
       // Build a list of continuations for jumps from the try block and
       // duplicate the finally code before jumping to the actual target.
       List<ir.Continuation> exits = <ir.Continuation>[join.continuation];
-      void addJump(JumpCollector newCollector,
-                   JumpCollector originalCollector) {
+      void addJump(
+          JumpCollector newCollector, JumpCollector originalCollector) {
         if (newCollector.isEmpty) return;
         IrBuilder builder = makeDelimitedBuilder(newCollector.environment);
         buildFinallyBlock(builder);
@@ -1987,8 +1946,8 @@
       buildFinallyBlock(builder);
     }
 
-    _helpBuildTryCatch(variables, enterTry, buildTryBlock, leaveTry,
-        buildCatch, leaveTryCatch);
+    _helpBuildTryCatch(variables, enterTry, buildTryBlock, leaveTry, buildCatch,
+        leaveTryCatch);
   }
 
   /// Create a return statement `return value;` or `return;` if [value] is
@@ -2007,16 +1966,17 @@
 
   /// Generate the body for a native function [function] that is annotated with
   /// an implementation in JavaScript (provided as string in [javaScriptCode]).
-  void buildNativeFunctionBody(FunctionElement function,
-                               String javaScriptCode) {
+  void buildNativeFunctionBody(FunctionElement function, String javaScriptCode,
+      SourceInformation sourceInformation) {
     NativeBehavior behavior = new NativeBehavior();
     behavior.sideEffects.setAllSideEffects();
     // Generate a [ForeignCode] statement from the given native code.
     buildForeignCode(
-        js.js.statementTemplateYielding(
-            new js.LiteralStatement(javaScriptCode)),
+        js.js
+            .statementTemplateYielding(new js.LiteralStatement(javaScriptCode)),
         <ir.Primitive>[],
-        behavior);
+        behavior,
+        sourceInformation);
   }
 
   /// Generate the body for a native function that redirects to a native
@@ -2025,9 +1985,8 @@
   /// Generates a call to the real target, which is given by [functions]'s
   /// `fixedBackendName`, passing all parameters as arguments.  The target can
   /// be the JavaScript implementation of a function, getter, or setter.
-  void buildRedirectingNativeFunctionBody(FunctionElement function,
-                                          String name,
-                                          SourceInformation source) {
+  void buildRedirectingNativeFunctionBody(FunctionElement function, String name,
+      SourceInformation sourceInformation) {
     List<ir.Primitive> arguments = <ir.Primitive>[];
     NativeBehavior behavior = new NativeBehavior();
     behavior.sideEffects.setAllSideEffects();
@@ -2047,8 +2006,8 @@
         // The parameter type is a function type either directly or through
         // typedef(s).
         ir.Constant arity = buildIntegerConstant(type.computeArity());
-        input = buildStaticFunctionInvocation(
-            program.closureConverter, <ir.Primitive>[input, arity]);
+        input = buildStaticFunctionInvocation(program.closureConverter,
+            <ir.Primitive>[input, arity], sourceInformation);
       }
       arguments.add(input);
       argumentTemplates.add('#');
@@ -2068,8 +2027,9 @@
         js.js.uncachedExpressionTemplate(code),
         arguments,
         behavior,
+        sourceInformation,
         type: program.getTypeMaskForNativeFunction(function));
-    buildReturn(value: value, sourceInformation: source);
+    buildReturn(value: value, sourceInformation: sourceInformation);
   }
 
   static _isNotNull(ir.Primitive value) =>
@@ -2077,7 +2037,7 @@
 
   /// Builds a call to a resolved js-interop element.
   ir.Primitive buildInvokeJsInteropMember(FunctionElement element,
-      List<ir.Primitive> arguments) {
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     program.addNativeMethod(element);
     String target = program.getJsInteropTargetPath(element);
     // Strip off trailing arguments that were not specified.
@@ -2087,8 +2047,9 @@
     var inputs = arguments.where(_isNotNull).toList();
 
     var behavior = new NativeBehavior()..sideEffects.setAllSideEffects();
-    DartType type = element.isConstructor ?
-        element.enclosingClass.thisType : element.type.returnType;
+    DartType type = element.isConstructor
+        ? element.enclosingClass.thisType
+        : element.type.returnType;
     // Native behavior effects here are similar to native/behavior.dart.
     // The return type is dynamic if we don't trust js-interop type
     // declarations.
@@ -2103,7 +2064,8 @@
 
     // It also includes any other JS interop type if we don't trust the
     // annotation or if is declared too broad.
-    if (!program.trustJSInteropTypeAnnotations || type.isObject ||
+    if (!program.trustJSInteropTypeAnnotations ||
+        type.isObject ||
         type.isDynamic) {
       behavior.typesInstantiated.add(program.jsJavascriptObjectType);
     }
@@ -2117,14 +2079,15 @@
       var args = new List.filled(inputs.length, '#').join(',');
       code = element.isConstructor ? "new $target($args)" : "$target($args)";
     }
-    return buildForeignCode(js.js.parseForeignJS(code), inputs, behavior);
+    return buildForeignCode(
+        js.js.parseForeignJS(code), inputs, behavior, sourceInformation);
     // TODO(sigmund): should we record the source-information here?
   }
 
   /// Builds an object literal that results from invoking a factory constructor
   /// of a js-interop anonymous type.
   ir.Primitive buildJsInteropObjectLiteral(ConstructorElement constructor,
-      List<ir.Primitive> arguments, {SourceInformation source}) {
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     assert(program.isJsInteropAnonymous(constructor));
     program.addNativeMethod(constructor);
     FunctionSignature params = constructor.functionSignature;
@@ -2134,7 +2097,7 @@
     params.orderedForEachParameter((ParameterElement parameter) {
       // TODO(jacobr): throw if parameter names do not match names of property
       // names in the class.
-      assert (parameter.isNamed);
+      assert(parameter.isNamed);
       ir.Primitive argument = arguments[i++];
       if (_isNotNull(argument)) {
         filteredArguments.add(argument);
@@ -2148,8 +2111,8 @@
       behavior.typesReturned.add(constructor.enclosingClass.thisType);
     }
 
-    // TODO(sigmund): should we record the source-information here?
-    return buildForeignCode(code, filteredArguments, behavior);
+    return buildForeignCode(
+        code, filteredArguments, behavior, sourceInformation);
   }
 
   /// Create a blocks of [statements] by applying [build] to all reachable
@@ -2176,8 +2139,7 @@
   }
 
   /// Creates a labeled statement
-  void buildLabeledStatement({SubbuildFunction buildBody,
-                              JumpTarget target}) {
+  void buildLabeledStatement({SubbuildFunction buildBody, JumpTarget target}) {
     JumpCollector join = new ForwardJumpCollector(environment, target: target);
     IrBuilder innerBuilder = makeDelimitedBuilder();
     innerBuilder.state.breakCollectors.add(join);
@@ -2213,8 +2175,8 @@
     return buildJumpInternal(target, state.continueCollectors);
   }
 
-  bool buildJumpInternal(JumpTarget target,
-                         Iterable<JumpCollector> collectors) {
+  bool buildJumpInternal(
+      JumpTarget target, Iterable<JumpCollector> collectors) {
     assert(isOpen);
     for (JumpCollector collector in collectors) {
       if (target == collector.target) {
@@ -2246,7 +2208,8 @@
   }
 
   /// Create a negation of [condition].
-  ir.Primitive buildNegation(ir.Primitive condition) {
+  ir.Primitive buildNegation(
+      ir.Primitive condition, SourceInformation sourceInformation) {
     // ! e is translated as e ? false : true
 
     // Add a continuation parameter for the result of the expression.
@@ -2264,15 +2227,17 @@
     ir.Constant falseConstant = makeBoolConstant(false);
 
     thenContinuation.body = new ir.LetPrim(falseConstant)
-        ..plug(new ir.InvokeContinuation(joinContinuation, [falseConstant]));
+      ..plug(new ir.InvokeContinuation(joinContinuation, [falseConstant]));
     elseContinuation.body = new ir.LetPrim(trueConstant)
-        ..plug(new ir.InvokeContinuation(joinContinuation, [trueConstant]));
+      ..plug(new ir.InvokeContinuation(joinContinuation, [trueConstant]));
 
-    add(new ir.LetCont(joinContinuation,
-          new ir.LetCont.two(thenContinuation, elseContinuation,
-              new ir.Branch.strict(condition,
-                                   thenContinuation,
-                                   elseContinuation))));
+    add(new ir.LetCont(
+        joinContinuation,
+        new ir.LetCont.two(
+            thenContinuation,
+            elseContinuation,
+            new ir.Branch.strict(condition, thenContinuation, elseContinuation,
+                sourceInformation))));
     return resultParameter;
   }
 
@@ -2282,6 +2247,7 @@
   ir.Primitive buildLogicalOperator(
       ir.Primitive leftValue,
       ir.Primitive buildRightValue(IrBuilder builder),
+      SourceInformation sourceInformation,
       {bool isLazyOr: false}) {
     // e0 && e1 is translated as if e0 ? (e1 == true) : false.
     // e0 || e1 is translated as if e0 ? true : (e1 == true).
@@ -2328,11 +2294,11 @@
     rightTrueContinuation.body = rightTrueBuilder.root;
     rightFalseContinuation.body = rightFalseBuilder.root;
     // The right subexpression has two continuations.
-    rightBuilder.add(
-        new ir.LetCont.two(rightTrueContinuation, rightFalseContinuation,
-            new ir.Branch.strict(rightValue,
-                                 rightTrueContinuation,
-                                 rightFalseContinuation)));
+    rightBuilder.add(new ir.LetCont.two(
+        rightTrueContinuation,
+        rightFalseContinuation,
+        new ir.Branch.strict(rightValue, rightTrueContinuation,
+            rightFalseContinuation, sourceInformation)));
     // Depending on the operator, the left subexpression's continuations are
     // either the right subexpression or an invocation of the join-point
     // continuation.
@@ -2344,20 +2310,21 @@
       leftFalseContinuation.body = emptyBuilder.root;
     }
 
-    add(new ir.LetCont(join.continuation,
-            new ir.LetCont.two(leftTrueContinuation, leftFalseContinuation,
-                new ir.Branch.strict(leftValue,
-                                     leftTrueContinuation,
-                                     leftFalseContinuation))));
+    add(new ir.LetCont(
+        join.continuation,
+        new ir.LetCont.two(
+            leftTrueContinuation,
+            leftFalseContinuation,
+            new ir.Branch.strict(leftValue, leftTrueContinuation,
+                leftFalseContinuation, sourceInformation))));
     environment = join.environment;
     return environment.discard(1);
   }
 
   ir.Primitive buildIdentical(ir.Primitive x, ir.Primitive y,
-                              {SourceInformation sourceInformation}) {
+      {SourceInformation sourceInformation}) {
     return addPrimitive(new ir.ApplyBuiltinOperator(
-        ir.BuiltinOperator.Identical, <ir.Primitive>[x, y],
-        sourceInformation));
+        ir.BuiltinOperator.Identical, <ir.Primitive>[x, y], sourceInformation));
   }
 
   /// Called when entering a nested function with free variables.
@@ -2378,8 +2345,8 @@
       } else {
         // Unboxed variables are loaded from the function object immediately.
         // This includes BoxLocals which are themselves unboxed variables.
-        environment.extend(local,
-            addPrimitive(new ir.GetField(thisPrim, location.field)));
+        environment.extend(
+            local, addPrimitive(new ir.GetField(thisPrim, location.field)));
       }
     });
 
@@ -2432,9 +2399,7 @@
     ClosureLocation location = state.boxedVariables[parameterElement];
     if (location != null) {
       addPrimitive(new ir.SetField(
-          environment.lookup(location.box),
-          location.field,
-          parameter));
+          environment.lookup(location.box), location.field, parameter));
     } else {
       environment.extend(parameterElement, parameter);
     }
@@ -2449,7 +2414,7 @@
   }
 
   void declareLocalVariable(LocalElement variableElement,
-                            {ir.Primitive initialValue}) {
+      {ir.Primitive initialValue}) {
     assert(isOpen);
     if (initialValue == null) {
       initialValue = buildNullConstant();
@@ -2457,13 +2422,9 @@
     ClosureLocation location = state.boxedVariables[variableElement];
     if (location != null) {
       addPrimitive(new ir.SetField(
-          environment.lookup(location.box),
-          location.field,
-          initialValue));
+          environment.lookup(location.box), location.field, initialValue));
     } else if (isInMutableVariable(variableElement)) {
-      add(new ir.LetMutable(
-          getMutableVariable(variableElement),
-          initialValue));
+      add(new ir.LetMutable(getMutableVariable(variableElement), initialValue));
     } else {
       initialValue.useElementAsHint(variableElement);
       environment.extend(variableElement, initialValue);
@@ -2471,16 +2432,17 @@
   }
 
   /// Add [functionElement] to the environment with provided [definition].
-  void declareLocalFunction(LocalFunctionElement functionElement,
-                            closure.ClosureClassElement classElement,
-                            SourceInformation sourceInformation) {
+  void declareLocalFunction(
+      LocalFunctionElement functionElement,
+      closure.ClosureClassElement classElement,
+      SourceInformation sourceInformation) {
     ir.Primitive closure =
-         buildFunctionExpression(classElement, sourceInformation);
+        buildFunctionExpression(classElement, sourceInformation);
     declareLocalVariable(functionElement, initialValue: closure);
   }
 
   ir.Primitive buildFunctionExpression(closure.ClosureClassElement classElement,
-                                       SourceInformation sourceInformation) {
+      SourceInformation sourceInformation) {
     List<ir.Primitive> arguments = <ir.Primitive>[];
     for (closure.ClosureFieldElement field in classElement.closureFields) {
       // Captured 'this' and type variables are not always available as locals
@@ -2501,16 +2463,20 @@
   }
 
   /// Create a read access of [local] function, variable, or parameter.
-  ir.Primitive buildLocalGet(LocalElement local) {
+  // TODO(johnniwinther): Make [sourceInformation] mandatory.
+  ir.Primitive buildLocalGet(LocalElement local,
+      {SourceInformation sourceInformation}) {
     assert(isOpen);
     ClosureLocation location = state.boxedVariables[local];
     if (location != null) {
-      ir.Primitive result = new ir.GetField(environment.lookup(location.box),
-                                            location.field);
+      ir.Primitive result = new ir.GetField(
+          environment.lookup(location.box), location.field,
+          sourceInformation: sourceInformation);
       result.useElementAsHint(local);
       return addPrimitive(result);
     } else if (isInMutableVariable(local)) {
-      return addPrimitive(new ir.GetMutable(getMutableVariable(local)));
+      return addPrimitive(new ir.GetMutable(getMutableVariable(local),
+          sourceInformation: sourceInformation));
     } else {
       return environment.lookup(local);
     }
@@ -2518,17 +2484,17 @@
 
   /// Create a write access to [local] variable or parameter with the provided
   /// [value].
-  ir.Primitive buildLocalVariableSet(LocalElement local, ir.Primitive value) {
+  ir.Primitive buildLocalVariableSet(LocalElement local, ir.Primitive value,
+      SourceInformation sourceInformation) {
     assert(isOpen);
     ClosureLocation location = state.boxedVariables[local];
     if (location != null) {
       addPrimitive(new ir.SetField(
-          environment.lookup(location.box),
-          location.field,
-          value));
+          environment.lookup(location.box), location.field, value,
+          sourceInformation: sourceInformation));
     } else if (isInMutableVariable(local)) {
-      addPrimitive(new ir.SetMutable(
-          getMutableVariable(local), value));
+      addPrimitive(new ir.SetMutable(getMutableVariable(local), value,
+          sourceInformation: sourceInformation));
     } else {
       value.useElementAsHint(local);
       environment.update(local, value);
@@ -2540,8 +2506,8 @@
   ///
   /// The loop variables will subsequently be declared using
   /// [declareLocalVariable].
-  void _enterForLoopInitializer(ClosureScope scope,
-                                List<LocalElement> loopVariables) {
+  void _enterForLoopInitializer(
+      ClosureScope scope, List<LocalElement> loopVariables) {
     if (scope == null) return;
     // If there are no boxed loop variables, don't create the box here, let
     // it be created inside the body instead.
@@ -2550,8 +2516,7 @@
   }
 
   /// Called before building the body of a for-loop.
-  void _enterForLoopBody(ClosureScope scope,
-                         List<LocalElement> loopVariables) {
+  void _enterForLoopBody(ClosureScope scope, List<LocalElement> loopVariables) {
     if (scope == null) return;
     // If there are boxed loop variables, the box has already been created
     // at the initializer.
@@ -2560,8 +2525,8 @@
   }
 
   /// Called before building the update of a for-loop.
-  void _enterForLoopUpdate(ClosureScope scope,
-                           List<LocalElement> loopVariables) {
+  void _enterForLoopUpdate(
+      ClosureScope scope, List<LocalElement> loopVariables) {
     if (scope == null) return;
     // If there are no boxed loop variables, then the box is created inside the
     // body, so there is no need to explicitly renew it.
@@ -2587,23 +2552,29 @@
     return state.thisParameter;
   }
 
-  ir.Primitive buildFieldGet(ir.Primitive receiver, FieldElement target) {
+  ir.Primitive buildFieldGet(ir.Primitive receiver, FieldElement target,
+      SourceInformation sourceInformation) {
     return addPrimitive(new ir.GetField(receiver, target,
+        sourceInformation: sourceInformation,
         isFinal: program.fieldNeverChanges(target)));
   }
 
-  void buildFieldSet(ir.Primitive receiver,
-                     FieldElement target,
-                     ir.Primitive value) {
-    addPrimitive(new ir.SetField(receiver, target, value));
+  void buildFieldSet(ir.Primitive receiver, FieldElement target,
+      ir.Primitive value, SourceInformation sourceInformation) {
+    addPrimitive(new ir.SetField(receiver, target, value,
+        sourceInformation: sourceInformation));
   }
 
-  ir.Primitive buildSuperFieldGet(FieldElement target) {
-    return addPrimitive(new ir.GetField(buildThis(), target));
+  ir.Primitive buildSuperFieldGet(
+      FieldElement target, SourceInformation sourceInformation) {
+    return addPrimitive(new ir.GetField(buildThis(), target,
+        sourceInformation: sourceInformation));
   }
 
-  ir.Primitive buildSuperFieldSet(FieldElement target, ir.Primitive value) {
-    addPrimitive(new ir.SetField(buildThis(), target, value));
+  ir.Primitive buildSuperFieldSet(FieldElement target, ir.Primitive value,
+      SourceInformation sourceInformation) {
+    addPrimitive(new ir.SetField(buildThis(), target, value,
+        sourceInformation: sourceInformation));
     return value;
   }
 
@@ -2612,8 +2583,8 @@
   /// The header for a constructor body differs from other functions in that
   /// some parameters are already boxed, and the box is passed as an argument
   /// instead of being created in the header.
-  void buildConstructorBodyHeader(Iterable<Local> parameters,
-                                  ClosureScope closureScope) {
+  void buildConstructorBodyHeader(
+      Iterable<Local> parameters, ClosureScope closureScope) {
     _createThisParameter();
     for (Local param in parameters) {
       ir.Parameter parameter = _createLocalParameter(param);
@@ -2640,10 +2611,10 @@
     ClassElement cls = element.enclosingClass;
     if (program.isJsInterop(element)) {
       if (program.isJsInteropAnonymous(element)) {
-        return buildJsInteropObjectLiteral(element, arguments,
-            source: sourceInformation);
+        return buildJsInteropObjectLiteral(
+            element, arguments, sourceInformation);
       }
-      return buildInvokeJsInteropMember(element, arguments);
+      return buildInvokeJsInteropMember(element, arguments, sourceInformation);
     }
     if (program.requiresRuntimeTypesFor(cls)) {
       InterfaceType interface = type;
@@ -2653,8 +2624,7 @@
             ? buildNullConstant()
             : buildTypeExpression(argument);
       });
-      arguments = new List<ir.Primitive>.from(arguments)
-          ..addAll(typeArguments);
+      arguments = new List<ir.Primitive>.from(arguments)..addAll(typeArguments);
     }
     return addPrimitive(new ir.InvokeConstructor(
         type, element, selector, arguments, sourceInformation,
@@ -2671,8 +2641,8 @@
         ir.Primitive value = buildTypeVariableAccess(variable);
         arguments.add(value);
       });
-      return addPrimitive(new ir.TypeExpression(ir.TypeExpressionKind.COMPLETE,
-                                                type, arguments));
+      return addPrimitive(new ir.TypeExpression(
+          ir.TypeExpressionKind.COMPLETE, type, arguments));
     } else if (type.treatAsDynamic) {
       return buildNullConstant();
     } else {
@@ -2688,7 +2658,7 @@
   /// corresponding type argument (field initializers are evaluated before the
   /// receiver object is created).
   ir.Primitive buildTypeVariableAccess(TypeVariableType variable,
-                                       {SourceInformation sourceInformation}) {
+      {SourceInformation sourceInformation}) {
     // If the local exists in the environment, use that.
     // This is put here when we are inside a constructor or field initializer,
     // (or possibly a closure inside one of these).
@@ -2713,24 +2683,26 @@
   }
 
   /// Reifies the value of [variable] on the current receiver object.
-  ir.Primitive buildReifyTypeVariable(TypeVariableType variable,
-                                      SourceInformation sourceInformation) {
+  ir.Primitive buildReifyTypeVariable(
+      TypeVariableType variable, SourceInformation sourceInformation) {
     ir.Primitive typeArgument =
         buildTypeVariableAccess(variable, sourceInformation: sourceInformation);
     return addPrimitive(
         new ir.ReifyRuntimeType(typeArgument, sourceInformation));
   }
 
-  ir.Primitive buildInvocationMirror(Selector selector,
-                                     List<ir.Primitive> arguments) {
+  ir.Primitive buildInvocationMirror(
+      Selector selector, List<ir.Primitive> arguments) {
     return addPrimitive(new ir.CreateInvocationMirror(selector, arguments));
   }
 
-  ir.Primitive buildForeignCode(js.Template codeTemplate,
-                                List<ir.Primitive> arguments,
-                                NativeBehavior behavior,
-                                {Element dependency,
-                                 TypeMask type}) {
+  ir.Primitive buildForeignCode(
+      js.Template codeTemplate,
+      List<ir.Primitive> arguments,
+      NativeBehavior behavior,
+      SourceInformation sourceInformation,
+      {Element dependency,
+      TypeMask type}) {
     assert(behavior != null);
     if (type == null) {
       type = program.getTypeMaskForForeign(behavior);
@@ -2743,10 +2715,7 @@
       return addPrimitive(new ir.Refinement(arguments.single, type));
     }
     ir.Primitive result = addPrimitive(new ir.ForeignCode(
-        codeTemplate,
-        type,
-        arguments,
-        behavior,
+        codeTemplate, type, arguments, behavior, sourceInformation,
         dependency: dependency));
     if (!codeTemplate.isExpression) {
       // Close the term if this is a "throw" expression or native body.
@@ -2757,9 +2726,9 @@
   }
 
   /// Creates a type test or type cast of [value] against [type].
-  ir.Primitive buildTypeOperator(ir.Primitive value,
-                                 DartType type,
-                                 {bool isTypeTest}) {
+  ir.Primitive buildTypeOperator(
+      ir.Primitive value, DartType type, SourceInformation sourceInformation,
+      {bool isTypeTest}) {
     assert(isOpen);
     assert(isTypeTest != null);
 
@@ -2768,9 +2737,8 @@
     if (type.isMalformed) {
       ErroneousElement element = type.element;
       ir.Primitive message = buildStringConstant(element.message);
-      return buildStaticFunctionInvocation(
-          program.throwTypeErrorHelper,
-          <ir.Primitive>[message]);
+      return buildStaticFunctionInvocation(program.throwTypeErrorHelper,
+          <ir.Primitive>[message], sourceInformation);
     }
 
     List<ir.Primitive> typeArguments = const <ir.Primitive>[];
@@ -2793,7 +2761,7 @@
       }
       if (type is InterfaceType && type.element == program.nullClass) {
         // `x is Null` is true if and only if x is null.
-        return _buildCheckNull(value);
+        return _buildCheckNull(value, sourceInformation);
       }
       return addPrimitive(new ir.TypeTest(value, type, typeArguments));
     } else {
@@ -2809,28 +2777,30 @@
   /// expression whose result is either [value] if [value] is not null, or
   /// `right` if [value] is null. Only when [value] is null, [buildRight] is
   /// evaluated to produce the `right` value.
-  ir.Primitive buildIfNull(ir.Primitive value,
-                           ir.Primitive buildRight(IrBuilder builder),
-                           {SourceInformation sourceInformation}) {
-    ir.Primitive condition =
-        _buildCheckNull(value, sourceInformation: sourceInformation);
-    return buildConditional(condition, buildRight, (_) => value);
+  ir.Primitive buildIfNull(
+      ir.Primitive value,
+      ir.Primitive buildRight(IrBuilder builder),
+      SourceInformation sourceInformation) {
+    ir.Primitive condition = _buildCheckNull(value, sourceInformation);
+    return buildConditional(
+        condition, buildRight, (_) => value, sourceInformation);
   }
 
   /// Create a conditional send. This is equivalent to a conditional expression
   /// that checks if [receiver] is null, if so, it returns null, otherwise it
   /// evaluates the [buildSend] expression.
-  ir.Primitive buildIfNotNullSend(ir.Primitive receiver,
-                                  ir.Primitive buildSend(IrBuilder builder),
-                                  {SourceInformation sourceInformation}) {
-    ir.Primitive condition =
-        _buildCheckNull(receiver, sourceInformation: sourceInformation);
-    return buildConditional(condition, (_) => receiver, buildSend);
+  ir.Primitive buildIfNotNullSend(
+      ir.Primitive receiver,
+      ir.Primitive buildSend(IrBuilder builder),
+      SourceInformation sourceInformation) {
+    ir.Primitive condition = _buildCheckNull(receiver, sourceInformation);
+    return buildConditional(
+        condition, (_) => receiver, buildSend, sourceInformation);
   }
 
   /// Creates a type test checking whether [value] is null.
-  ir.Primitive _buildCheckNull(ir.Primitive value,
-                               {SourceInformation sourceInformation}) {
+  ir.Primitive _buildCheckNull(
+      ir.Primitive value, SourceInformation sourceInformation) {
     assert(isOpen);
     return buildIdentical(value, buildNullConstant(),
         sourceInformation: sourceInformation);
@@ -2931,16 +2901,20 @@
   final LocalVariableElement exceptionVariable;
   final LocalVariableElement stackTraceVariable;
   final SubbuildFunction buildCatchBlock;
+  final SourceInformation sourceInformation;
 
-  CatchClauseInfo({this.type,
-                   this.exceptionVariable,
-                   this.stackTraceVariable,
-                   this.buildCatchBlock});
+  CatchClauseInfo(
+      {this.type,
+      this.exceptionVariable,
+      this.stackTraceVariable,
+      this.buildCatchBlock,
+      this.sourceInformation});
 }
 
 class SwitchCaseInfo {
   final SubbuildFunction buildCondition;
   final SubbuildFunction buildBody;
+  final SourceInformation sourceInformation;
 
-  SwitchCaseInfo(this.buildCondition, this.buildBody);
+  SwitchCaseInfo(this.buildCondition, this.buildBody, this.sourceInformation);
 }
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index cfea55a..e9d1845 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -6,59 +6,54 @@
 
 import '../closure.dart' as closure;
 import '../common.dart';
-import '../common/names.dart' show
-    Identifiers,
-    Names,
-    Selectors;
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
+import '../common/names.dart' show Identifiers, Names, Selectors;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
 import '../constants/expressions.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    SynthesizedConstructorElementX,
-    ConstructorBodyElementX,
-    FunctionSignatureX;
+import '../elements/modelx.dart'
+    show
+        SynthesizedConstructorElementX,
+        ConstructorBodyElementX,
+        FunctionSignatureX;
 import '../io/source_information.dart';
-import '../js_backend/backend_helpers.dart' show
-    BackendHelpers;
-import '../js_backend/js_backend.dart' show
-    JavaScriptBackend,
-    SyntheticConstantKind;
-import '../resolution/tree_elements.dart' show
-    TreeElements;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart'
+    show JavaScriptBackend, SyntheticConstantKind;
+import '../resolution/tree_elements.dart' show TreeElements;
 import '../resolution/semantic_visitor.dart';
 import '../resolution/operators.dart' as op;
 import '../tree/tree.dart' as ast;
-import '../types/types.dart' show
-    TypeMask;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
-import '../constants/values.dart' show
-    ConstantValue;
+import '../types/types.dart' show TypeMask;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../constants/values.dart' show ConstantValue;
 import 'cps_ir_nodes.dart' as ir;
 import 'cps_ir_builder.dart';
-import '../native/native.dart' show
-    NativeBehavior,
-    HasCapturedPlaceholders;
+import '../native/native.dart' show NativeBehavior, HasCapturedPlaceholders;
 
 // TODO(karlklose): remove.
 import '../js/js.dart' as js show js, Template, Expression, Name;
-import '../ssa/ssa.dart' show TypeMaskFactory;
+import '../ssa/types.dart' show TypeMaskFactory;
 import '../util/util.dart';
 
 import 'package:js_runtime/shared/embedded_names.dart'
     show JsBuiltin, JsGetName;
 import '../constants/values.dart';
-import 'type_mask_system.dart' show
-    TypeMaskSystem;
+import 'type_mask_system.dart' show TypeMaskSystem;
 
 typedef void IrBuilderCallback(Element element, ir.FunctionDefinition irNode);
 
+class ExplicitReceiverParameter implements Local {
+  final ExecutableElement executableContext;
+
+  ExplicitReceiverParameter(this.executableContext);
+
+  String get name => 'receiver';
+  String toString() => 'ExplicitReceiverParameter($executableContext)';
+}
+
 /// This task provides the interface to build IR nodes from [ast.Node]s, which
 /// is used from the [CpsFunctionCompiler] to generate code.
 ///
@@ -79,8 +74,8 @@
 
   String get name => 'CPS builder';
 
-  ir.FunctionDefinition buildNode(AstElement element,
-                                  TypeMaskSystem typeMaskSystem) {
+  ir.FunctionDefinition buildNode(
+      AstElement element, TypeMaskSystem typeMaskSystem) {
     return measure(() {
       bailoutMessage = null;
 
@@ -90,10 +85,8 @@
         SourceInformationBuilder sourceInformationBuilder =
             sourceInformationStrategy.createBuilderForContext(element);
 
-        IrBuilderVisitor builder =
-            new IrBuilderVisitor(
-                elementsMapping, compiler, sourceInformationBuilder,
-                typeMaskSystem);
+        IrBuilderVisitor builder = new IrBuilderVisitor(elementsMapping,
+            compiler, sourceInformationBuilder, typeMaskSystem);
         ir.FunctionDefinition irNode = builder.buildExecutable(element);
         if (irNode == null) {
           bailoutMessage = builder.bailoutMessage;
@@ -116,17 +109,19 @@
 /// For statements, `null` is returned.
 // TODO(johnniwinther): Implement [SemanticDeclVisitor].
 class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
-    with IrBuilderMixin<ast.Node>,
-         SemanticSendResolvedMixin<ir.Primitive, dynamic>,
-         ErrorBulkMixin<ir.Primitive, dynamic>,
-         BaseImplementationOfStaticsMixin<ir.Primitive, dynamic>,
-         BaseImplementationOfLocalsMixin<ir.Primitive, dynamic>,
-         BaseImplementationOfDynamicsMixin<ir.Primitive, dynamic>,
-         BaseImplementationOfConstantsMixin<ir.Primitive, dynamic>,
-         BaseImplementationOfNewMixin<ir.Primitive, dynamic>,
-         BaseImplementationOfCompoundsMixin<ir.Primitive, dynamic>,
-         BaseImplementationOfSetIfNullsMixin<ir.Primitive, dynamic>,
-         BaseImplementationOfIndexCompoundsMixin<ir.Primitive, dynamic>
+    with
+        IrBuilderMixin<ast.Node>,
+        SemanticSendResolvedMixin<ir.Primitive, dynamic>,
+        ErrorBulkMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfStaticsMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfLocalsMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfDynamicsMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfConstantsMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfNewMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfCompoundsMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfSetIfNullsMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfIndexCompoundsMixin<ir.Primitive, dynamic>,
+        BaseImplementationOfSuperIndexSetIfNullMixin<ir.Primitive, dynamic>
     implements SemanticSendVisitor<ir.Primitive, dynamic> {
   final TreeElements elements;
   final Compiler compiler;
@@ -160,10 +155,8 @@
   // arguments, and what the arguments are.
 
   /// Construct a top-level visitor.
-  IrBuilderVisitor(this.elements,
-                   this.compiler,
-                   this.sourceInformationBuilder,
-                   this.typeMaskSystem);
+  IrBuilderVisitor(this.elements, this.compiler, this.sourceInformationBuilder,
+      this.typeMaskSystem);
 
   JavaScriptBackend get backend => compiler.backend;
   BackendHelpers get helpers => backend.helpers;
@@ -199,11 +192,8 @@
   /// Returns the [ClosureScope] for any function, possibly different from the
   /// one currently being built.
   ClosureScope getClosureScopeForFunction(FunctionElement function) {
-    closure.ClosureClassMap map =
-        compiler.closureToClassMapper.computeClosureToClassMapping(
-            function,
-            function.node,
-            elements);
+    closure.ClosureClassMap map = compiler.closureToClassMapper
+        .computeClosureToClassMapping(function, function.node, elements);
     return new ClosureScope(map.capturingScopes[function.node]);
   }
 
@@ -216,9 +206,7 @@
 
   IrBuilder getBuilderFor(Element element) {
     return new IrBuilder(
-        new GlobalProgramInformation(compiler),
-        backend.constants,
-        element);
+        new GlobalProgramInformation(compiler), backend.constants, element);
   }
 
   /// Builds the [ir.FunctionDefinition] for an executable element. In case the
@@ -287,8 +275,8 @@
     ClassElement clazz = type.element;
     assert(clazz.typeVariables.length == type.typeArguments.length);
     for (int i = 0; i < clazz.typeVariables.length; ++i) {
-      irBuilder.declareTypeVariable(clazz.typeVariables[i],
-          type.typeArguments[i]);
+      irBuilder.declareTypeVariable(
+          clazz.typeVariables[i], type.typeArguments[i]);
     }
     loadTypeVariablesForSuperClasses(clazz);
   }
@@ -308,8 +296,8 @@
     if (constructor.isSynthesized) return null;
     ast.FunctionExpression node = constructor.node;
     // If we know the body doesn't have any code, we don't generate it.
-    if (!node.hasBody()) return null;
-    if (node.hasEmptyBody()) return null;
+    if (!node.hasBody) return null;
+    if (node.hasEmptyBody) return null;
     ClassElement classElement = constructor.enclosingClass;
     ConstructorBodyElement bodyElement;
     classElement.forEachBackendMember((Element backendMember) {
@@ -328,7 +316,7 @@
         // Create origin body element for patched constructors.
         ConstructorBodyElementX patch = bodyElement;
         ConstructorBodyElementX origin =
-        new ConstructorBodyElementX(constructor.origin);
+            new ConstructorBodyElementX(constructor.origin);
         origin.applyPatch(patch);
         classElement.origin.addBackendMember(bodyElement.origin);
       }
@@ -388,8 +376,12 @@
     return withBuilder(builder, () {
       // Setup parameters and create a box if anything is captured.
       List<Local> parameters = <Local>[];
-      constructor.functionSignature.orderedForEachParameter(
-          (ParameterElement p) => parameters.add(p));
+      if (constructor.isGenerativeConstructor &&
+          backend.isNativeOrExtendsNative(classElement)) {
+        parameters.add(new ExplicitReceiverParameter(constructor));
+      }
+      constructor.functionSignature
+          .orderedForEachParameter((ParameterElement p) => parameters.add(p));
 
       int firstTypeArgumentParameterIndex;
 
@@ -446,9 +438,11 @@
       // --- Create the object ---
       // Get the initial field values in the canonical order.
       List<ir.Primitive> instanceArguments = <ir.Primitive>[];
+      List<FieldElement> fields = <FieldElement>[];
       classElement.forEachInstanceField((ClassElement c, FieldElement field) {
         ir.Primitive value = fieldValues[field];
         if (value != null) {
+          fields.add(field);
           instanceArguments.add(value);
         } else {
           assert(backend.isNativeOrExtendsNative(c));
@@ -456,16 +450,30 @@
         }
       }, includeSuperAndInjectedMembers: true);
 
-      ir.Primitive instance = new ir.CreateInstance(
-          classElement,
-          instanceArguments,
-          typeInformation,
-          constructor.hasNode
-              ? sourceInformationBuilder.buildCreate(constructor.node)
-          // TODO(johnniwinther): Provide source information for creation
-          // through synthetic constructors.
-              : null);
-      irBuilder.add(new ir.LetPrim(instance));
+      ir.Primitive instance;
+      if (constructor.isGenerativeConstructor &&
+          backend.isNativeOrExtendsNative(classElement)) {
+        instance = irParameters.first;
+        instance.type =
+            new TypeMask.exact(classElement, typeMaskSystem.classWorld);
+        irBuilder.addPrimitive(new ir.ReceiverCheck.nullCheck(
+            instance, Selectors.toString_, null));
+        for (int i = 0; i < fields.length; i++) {
+          irBuilder.addPrimitive(
+              new ir.SetField(instance, fields[i], instanceArguments[i]));
+        }
+      } else {
+        instance = new ir.CreateInstance(
+            classElement,
+            instanceArguments,
+            typeInformation,
+            constructor.hasNode
+                ? sourceInformationBuilder.buildCreate(constructor.node)
+                // TODO(johnniwinther): Provide source information for creation
+                // through synthetic constructors.
+                : null);
+        irBuilder.add(new ir.LetPrim(instance));
+      }
 
       // --- Call constructor bodies ---
       for (ConstructorElement target in constructorList) {
@@ -475,8 +483,8 @@
         for (Local param in getConstructorBodyParameters(bodyElement)) {
           bodyArguments.add(irBuilder.environment.lookup(param));
         }
-        Selector selector = new Selector.call(target.memberName,
-            new CallStructure(bodyArguments.length));
+        Selector selector = new Selector.call(
+            target.memberName, new CallStructure(bodyArguments.length));
         irBuilder.addPrimitive(new ir.InvokeMethodDirectly(
             instance, bodyElement, selector, bodyArguments, null));
       }
@@ -485,9 +493,10 @@
       irBuilder.buildReturn(
           value: instance,
           sourceInformation:
-          sourceInformationBuilder.buildImplicitReturn(constructor));
+              sourceInformationBuilder.buildImplicitReturn(constructor));
 
-      return irBuilder.makeFunctionDefinition();
+      return irBuilder.makeFunctionDefinition(
+          sourceInformationBuilder.buildVariableDeclaration());
     });
   }
 
@@ -496,11 +505,8 @@
   /// Every visitor can only be applied to nodes in one context, because
   /// the [elements] field is specific to that context.
   IrBuilderVisitor makeVisitorForContext(AstElement context) {
-    return new IrBuilderVisitor(
-        context.resolvedAst.elements,
-        compiler,
-        sourceInformationBuilder.forContext(context),
-        typeMaskSystem);
+    return new IrBuilderVisitor(context.resolvedAst.elements, compiler,
+        sourceInformationBuilder.forContext(context), typeMaskSystem);
   }
 
   /// Builds the IR for an [expression] taken from a different [context].
@@ -519,8 +525,7 @@
       Map<FieldElement, ir.Primitive> fieldValues) {
     assert(constructor.enclosingClass.implementation.isMixinApplication);
     assert(constructor.isSynthesized);
-    ConstructorElement target =
-        constructor.definingConstructor.implementation;
+    ConstructorElement target = constructor.definingConstructor.implementation;
     // The resolver gives us the exact same FunctionSignature for the two
     // constructors. The parameters for the synthesized constructor
     // are already in the environment, so the target constructor's parameters
@@ -537,8 +542,7 @@
   ///
   /// Defaults for optional arguments are evaluated in order to ensure
   /// all parameters are available in the environment.
-  void loadArguments(ConstructorElement target,
-      CallStructure call,
+  void loadArguments(ConstructorElement target, CallStructure call,
       List<ir.Primitive> arguments) {
     assert(target.isImplementation);
     assert(target == elements.analyzedElement);
@@ -645,8 +649,8 @@
       return;
     }
     // Evaluate initializing parameters, e.g. `Foo(this.x)`.
-    constructor.functionSignature.orderedForEachParameter(
-        (ParameterElement parameter) {
+    constructor.functionSignature
+        .orderedForEachParameter((ParameterElement parameter) {
       if (parameter.isInitializingFormal) {
         InitializingFormalElement fieldParameter = parameter;
         fieldValues[fieldParameter.fieldElement] =
@@ -657,7 +661,7 @@
     ast.FunctionExpression node = constructor.node;
     bool hasConstructorCall = false; // Has this() or super() initializer?
     if (node != null && node.initializers != null) {
-      for(ast.Node initializer in node.initializers) {
+      for (ast.Node initializer in node.initializers) {
         if (initializer is ast.SendSet) {
           // Field initializer.
           FieldElement field = elements[initializer];
@@ -668,15 +672,11 @@
           Selector selector = elements.getSelector(initializer);
           List<ir.Primitive> arguments = initializer.arguments.mapToList(visit);
           evaluateConstructorCallFromInitializer(
-              target,
-              selector.callStructure,
-              arguments,
-              supers,
-              fieldValues);
+              target, selector.callStructure, arguments, supers, fieldValues);
           hasConstructorCall = true;
         } else {
-          reporter.internalError(initializer,
-              "Unexpected initializer type $initializer");
+          reporter.internalError(
+              initializer, "Unexpected initializer type $initializer");
         }
       }
     }
@@ -689,11 +689,7 @@
       }
       target = target.implementation;
       evaluateConstructorCallFromInitializer(
-          target,
-          CallStructure.NO_ARGS,
-          const [],
-          supers,
-          fieldValues);
+          target, CallStructure.NO_ARGS, const [], supers, fieldValues);
     }
     // Add this constructor after the superconstructors.
     supers.add(constructor);
@@ -717,11 +713,8 @@
   ir.FunctionDefinition buildConstructorBody(ConstructorBodyElement body) {
     ConstructorElement constructor = body.constructor;
     ast.FunctionExpression node = constructor.node;
-    closureClassMap =
-        compiler.closureToClassMapper.computeClosureToClassMapping(
-            constructor,
-            node,
-            elements);
+    closureClassMap = compiler.closureToClassMapper
+        .computeClosureToClassMapping(constructor, node, elements);
 
     // We compute variables boxed in mutable variables on entry to each try
     // block, not including variables captured by a closure (which are boxed
@@ -735,10 +728,11 @@
     IrBuilder builder = getBuilderFor(body);
 
     return withBuilder(builder, () {
-      irBuilder.buildConstructorBodyHeader(getConstructorBodyParameters(body),
-          getClosureScopeForNode(node));
+      irBuilder.buildConstructorBodyHeader(
+          getConstructorBodyParameters(body), getClosureScopeForNode(node));
       visit(node.body);
-      return irBuilder.makeFunctionDefinition();
+      return irBuilder.makeFunctionDefinition(
+          sourceInformationBuilder.buildVariableDeclaration());
     });
   }
 
@@ -750,27 +744,21 @@
     assert(node != null);
     assert(elements[node] != null);
 
-    closureClassMap =
-        compiler.closureToClassMapper.computeClosureToClassMapping(
-            element,
-            node,
-            elements);
+    closureClassMap = compiler.closureToClassMapper
+        .computeClosureToClassMapping(element, node, elements);
     TryBoxedVariables variables = _analyzeTryBoxedVariables(node);
     tryStatements = variables.tryStatements;
     IrBuilder builder = getBuilderFor(element);
-    return withBuilder(builder,
-        () => _makeFunctionBody(builder, element, node));
+    return withBuilder(
+        builder, () => _makeFunctionBody(builder, element, node));
   }
 
   ir.FunctionDefinition buildStaticFieldInitializer(FieldElement element) {
     if (!backend.constants.lazyStatics.contains(element)) {
       return null; // Nothing to do.
     }
-    closureClassMap =
-        compiler.closureToClassMapper.computeClosureToClassMapping(
-            element,
-            element.node,
-            elements);
+    closureClassMap = compiler.closureToClassMapper
+        .computeClosureToClassMapping(element, element.node, elements);
     IrBuilder builder = getBuilderFor(element);
     return withBuilder(builder, () {
       irBuilder.buildFunctionHeader(<Local>[]);
@@ -780,8 +768,9 @@
       irBuilder.buildReturn(
           value: initialValue,
           sourceInformation:
-          sourceInformationBuilder.buildReturn(sendSet.assignmentOperator));
-      return irBuilder.makeFunctionDefinition();
+              sourceInformationBuilder.buildReturn(sendSet.assignmentOperator));
+      return irBuilder.makeFunctionDefinition(
+          sourceInformationBuilder.buildVariableDeclaration());
     });
   }
 
@@ -814,8 +803,7 @@
   /// appear in a canonical order.  A [CallStructure] reflecting this order
   /// is returned.
   CallStructure normalizeStaticArguments(CallStructure callStructure,
-      FunctionElement target,
-      List<ir.Primitive> arguments) {
+      FunctionElement target, List<ir.Primitive> arguments) {
     target = target.implementation;
     FunctionSignature signature = target.functionSignature;
     if (!signature.optionalParametersAreNamed &&
@@ -844,7 +832,8 @@
     // value in the temporary list, otherwise the default value.
     signature.orderedOptionalParameters.forEach((ParameterElement element) {
       int nameIndex = callStructure.namedArguments.indexOf(element.name);
-      arguments.add(nameIndex == -1 ? translateDefaultValue(element)
+      arguments.add(nameIndex == -1
+          ? translateDefaultValue(element)
           : namedArguments[nameIndex]);
       normalizedNames.add(element.name);
     });
@@ -857,8 +846,8 @@
   /// list [arguments] is normalized by sorting it in place so that the named
   /// arguments appear in a canonical order.  A [CallStructure] reflecting this
   /// order is returned.
-  CallStructure normalizeDynamicArguments(CallStructure callStructure,
-      List<ir.Primitive> arguments) {
+  CallStructure normalizeDynamicArguments(
+      CallStructure callStructure, List<ir.Primitive> arguments) {
     assert(arguments.length == callStructure.argumentCount);
     if (callStructure.namedArguments.isEmpty) return callStructure;
     int destinationIndex = callStructure.positionalArgumentCount;
@@ -867,8 +856,8 @@
       int sourceIndex = callStructure.namedArguments.indexOf(argName);
       arguments[destinationIndex++] = namedArguments[sourceIndex];
     }
-    return new CallStructure(callStructure.argumentCount,
-        callStructure.getOrderedNamedArguments());
+    return new CallStructure(
+        callStructure.argumentCount, callStructure.getOrderedNamedArguments());
   }
 
   /// Read the value of [field].
@@ -889,9 +878,7 @@
   }
 
   ir.FunctionDefinition _makeFunctionBody(
-      IrBuilder builder,
-      FunctionElement element,
-      ast.FunctionExpression node) {
+      IrBuilder builder, FunctionElement element, ast.FunctionExpression node) {
     FunctionSignature signature = element.functionSignature;
     List<Local> parameters = <Local>[];
     signature.orderedForEachParameter(
@@ -910,8 +897,8 @@
     }
 
     irBuilder.buildFunctionHeader(parameters,
-                                  closureScope: getClosureScopeForNode(node),
-                                  env: getClosureEnvironment());
+        closureScope: getClosureScopeForNode(node),
+        env: getClosureEnvironment());
 
     if (element == helpers.jsArrayTypedConstructor) {
       // Generate a body for JSArray<E>.typed(allocation):
@@ -932,27 +919,30 @@
 
         ir.Primitive typeInformation = irBuilder.addPrimitive(
             new ir.TypeExpression(ir.TypeExpressionKind.INSTANCE,
-                                  element.enclosingClass.thisType,
-                                  <ir.Primitive>[typeArgument]));
+                element.enclosingClass.thisType, <ir.Primitive>[typeArgument]));
 
         MethodElement helper = helpers.setRuntimeTypeInfo;
         CallStructure callStructure = CallStructure.TWO_ARGS;
         Selector selector = new Selector.call(helper.memberName, callStructure);
         allocation = irBuilder.buildInvokeStatic(
-            helper, selector, <ir.Primitive>[allocation, typeInformation],
+            helper,
+            selector,
+            <ir.Primitive>[allocation, typeInformation],
             sourceInformationBuilder.buildGeneric(node));
       }
 
       ir.Primitive refinement = irBuilder.addPrimitive(
           new ir.Refinement(allocation, typeMaskSystem.arrayType));
 
-      irBuilder.buildReturn(value: refinement,
+      irBuilder.buildReturn(
+          value: refinement,
           sourceInformation:
               sourceInformationBuilder.buildImplicitReturn(element));
     } else {
       visit(node.body);
     }
-    return irBuilder.makeFunctionDefinition();
+    return irBuilder.makeFunctionDefinition(
+        sourceInformationBuilder.buildVariableDeclaration());
   }
 
   /// Builds the IR for creating an instance of the closure class corresponding
@@ -965,15 +955,15 @@
   }
 
   ir.Primitive visitFunctionExpression(ast.FunctionExpression node) {
-    return irBuilder.buildFunctionExpression(makeSubFunction(node),
-        sourceInformationBuilder.buildCreate(node));
+    return irBuilder.buildFunctionExpression(
+        makeSubFunction(node), sourceInformationBuilder.buildCreate(node));
   }
 
   visitFunctionDeclaration(ast.FunctionDeclaration node) {
     LocalFunctionElement element = elements[node.function];
     Object inner = makeSubFunction(node.function);
-    irBuilder.declareLocalFunction(element, inner,
-        sourceInformationBuilder.buildCreate(node.function));
+    irBuilder.declareLocalFunction(
+        element, inner, sourceInformationBuilder.buildCreate(node.function));
   }
 
   // ## Statements ##
@@ -1044,10 +1034,9 @@
     });
     ClassElement cls = redirectingConstructor.enclosingClass;
     InterfaceType targetType =
-          redirectingConstructor.computeEffectiveTargetType(cls.thisType);
-    CallStructure callStructure = new CallStructure(
-        redirectingSignature.parameterCount,
-        namedParameters);
+        redirectingConstructor.computeEffectiveTargetType(cls.thisType);
+    CallStructure callStructure =
+        new CallStructure(redirectingSignature.parameterCount, namedParameters);
     callStructure =
         normalizeStaticArguments(callStructure, targetConstructor, arguments);
     ir.Primitive instance = irBuilder.buildConstructorInvocation(
@@ -1083,10 +1072,8 @@
   }
 
   visitIf(ast.If node) {
-    irBuilder.buildIf(
-        build(node.condition),
-        subbuild(node.thenPart),
-        subbuild(node.elsePart));
+    irBuilder.buildIf(build(node.condition), subbuild(node.thenPart),
+        subbuild(node.elsePart), sourceInformationBuilder.buildIf(node));
   }
 
   visitLabeledStatement(ast.LabeledStatement node) {
@@ -1096,8 +1083,7 @@
     } else {
       JumpTarget target = elements.getTargetDefinition(body);
       irBuilder.buildLabeledStatement(
-          buildBody: subbuild(body),
-          target: target);
+          buildBody: subbuild(body), target: target);
     }
   }
 
@@ -1150,7 +1136,8 @@
             iterator,
             Selectors.moveNext,
             elements.getMoveNextTypeMask(node),
-            <ir.Primitive>[]);
+            <ir.Primitive>[],
+            sourceInformationBuilder.buildForInMoveNext(node));
         return builder.addPrimitive(new ir.Await(moveNext));
       }
 
@@ -1160,30 +1147,37 @@
               iterator,
               Selectors.current,
               elements.getCurrentTypeMask(node),
-              <ir.Primitive>[]);
+              <ir.Primitive>[],
+              sourceInformationBuilder.buildForInCurrent(node));
           Element variable = elements.getForInVariable(node);
+          SourceInformation sourceInformation =
+              sourceInformationBuilder.buildForInSet(node);
           if (Elements.isLocal(variable)) {
             if (node.declaredIdentifier.asVariableDefinitions() != null) {
               irBuilder.declareLocalVariable(variable);
             }
-            irBuilder.buildLocalVariableSet(variable, current);
+            irBuilder.buildLocalVariableSet(
+                variable, current, sourceInformation);
           } else if (Elements.isError(variable) ||
-                     Elements.isMalformed(variable)) {
+              Elements.isMalformed(variable)) {
             Selector selector =
                 new Selector.setter(new Name(variable.name, variable.library));
             List<ir.Primitive> args = <ir.Primitive>[current];
             // Note the comparison below.  It can be the case that an element
             // isError and isMalformed.
             if (Elements.isError(variable)) {
-              irBuilder.buildStaticNoSuchMethod(selector, args);
+              irBuilder.buildStaticNoSuchMethod(
+                  selector, args, sourceInformation);
             } else {
-              irBuilder.buildErroneousInvocation(variable, selector, args);
+              irBuilder.buildErroneousInvocation(
+                  variable, selector, args, sourceInformation);
             }
           } else if (Elements.isStaticOrTopLevel(variable)) {
             if (variable.isField) {
               irBuilder.addPrimitive(new ir.SetStatic(variable, current));
             } else {
-              irBuilder.buildStaticSetterSet(variable, current);
+              irBuilder.buildStaticSetterSet(
+                  variable, current, sourceInformation);
             }
           } else {
             ir.Primitive receiver = irBuilder.buildThis();
@@ -1192,7 +1186,8 @@
                 receiver,
                 elements.getSelector(identifier),
                 elements.getTypeMask(identifier),
-                current);
+                current,
+                sourceInformation);
           }
           visit(node.body);
         });
@@ -1211,12 +1206,12 @@
           Selectors.cancel,
           backend.dynamicType,
           <ir.Primitive>[],
-          sourceInformation: sourceInformationBuilder.buildGeneric(node));
+          sourceInformationBuilder.buildGeneric(node));
       return builder.addPrimitive(new ir.Await(cancellation));
     }
 
-    irBuilder.buildTryFinally(new TryStatementInfo(), buildTryBody,
-        buildFinallyBody);
+    irBuilder.buildTryFinally(
+        new TryStatementInfo(), buildTryBody, buildFinallyBody);
   }
 
   visitAwait(ast.Await node) {
@@ -1247,9 +1242,17 @@
         variableElement: variableElement,
         variableSelector: selector,
         variableMask: elements.getTypeMask(identifier),
+        variableSetSourceInformation:
+            sourceInformationBuilder.buildForInSet(node),
         currentMask: elements.getCurrentTypeMask(node),
+        currentSourceInformation:
+            sourceInformationBuilder.buildForInCurrent(node),
         moveNextMask: elements.getMoveNextTypeMask(node),
+        moveNextSourceInformation:
+            sourceInformationBuilder.buildForInMoveNext(node),
         iteratorMask: elements.getIteratorTypeMask(node),
+        iteratorSourceInformation:
+            sourceInformationBuilder.buildForInIterator(node),
         buildBody: subbuild(node.body),
         target: elements.getTargetDefinition(node),
         closureScope: getClosureScopeForNode(node));
@@ -1261,7 +1264,7 @@
   /// This is also where we should add type checks in checked mode, but this
   /// is not supported yet.
   ir.Primitive checkType(ir.Primitive value, DartType dartType) {
-    if (!compiler.trustTypeAnnotations) return value;
+    if (!compiler.options.trustTypeAnnotations) return value;
     TypeMask type = typeMaskSystem.subtypesOf(dartType).nullable();
     return irBuilder.addPrimitive(new ir.Refinement(value, type));
   }
@@ -1307,22 +1310,22 @@
       if (nativeBody != null) {
         ast.LiteralString jsCode = nativeBody.asLiteralString();
         String javaScriptCode = jsCode.dartString.slowToString();
-        assert(invariant(nativeBody,
-            !nativeRedirectionRegExp.hasMatch(javaScriptCode),
-          message: "Deprecated syntax, use @JSName('name') instead."));
-        assert(invariant(nativeBody,
-            function.functionSignature.parameterCount == 0,
+        assert(invariant(
+            nativeBody, !nativeRedirectionRegExp.hasMatch(javaScriptCode),
+            message: "Deprecated syntax, use @JSName('name') instead."));
+        assert(invariant(
+            nativeBody, function.functionSignature.parameterCount == 0,
             message: 'native "..." syntax is restricted to '
-              'functions with zero parameters.'));
-        irBuilder.buildNativeFunctionBody(function, javaScriptCode);
+                'functions with zero parameters.'));
+        irBuilder.buildNativeFunctionBody(function, javaScriptCode,
+            sourceInformationBuilder.buildForeignCode(node));
       } else {
-        String name = backend.getFixedBackendName(function);
+        String name = backend.nativeData.getFixedBackendName(function);
         irBuilder.buildRedirectingNativeFunctionBody(function, name, source);
       }
     } else {
       irBuilder.buildReturn(
-          value: build(node.expression),
-          sourceInformation: source);
+          value: build(node.expression), sourceInformation: source);
     }
   }
 
@@ -1418,8 +1421,8 @@
     for (int i = 0; i < continueTargets.length; ++i) {
       // The state value is i, the case's position in the list of recursive
       // cases.
-      irBuilder.state.continueCollectors.add(new GotoJumpCollector(
-          continueTargets[i], stateIndex, i, join));
+      irBuilder.state.continueCollectors
+          .add(new GotoJumpCollector(continueTargets[i], stateIndex, i, join));
     }
 
     // For each non-default case use a pair of functions, one to translate the
@@ -1470,8 +1473,11 @@
               if (condition == null) {
                 condition = buildComparison();
               } else {
-                condition = irBuilder.buildLogicalOperator(condition,
-                    nested(buildComparison), isLazyOr: true);
+                condition = irBuilder.buildLogicalOperator(
+                    condition,
+                    nested(buildComparison),
+                    sourceInformationBuilder.buildSwitchCase(switchCase),
+                    isLazyOr: true);
               }
             }
           }
@@ -1512,7 +1518,8 @@
         };
       }
 
-      cases.add(new SwitchCaseInfo(buildCondition, buildBody));
+      cases.add(new SwitchCaseInfo(buildCondition, buildBody,
+          sourceInformationBuilder.buildSwitchCase(switchCase)));
     }
 
     irBuilder.buildSimpleSwitch(join, cases, buildDefaultBody);
@@ -1533,8 +1540,8 @@
         target: elements.getTargetDefinition(node));
     irBuilder.state.breakCollectors.add(exit);
     for (int i = 0; i < continueTargets.length; ++i) {
-      irBuilder.state.continueCollectors.add(new GotoJumpCollector(
-          continueTargets[i], stateIndex, i, loop));
+      irBuilder.state.continueCollectors
+          .add(new GotoJumpCollector(continueTargets[i], stateIndex, i, loop));
     }
     cases.clear();
     for (int i = 0; i < continueTargets.length; ++i) {
@@ -1566,20 +1573,20 @@
         return null;
       }
 
-      cases.add(new SwitchCaseInfo(buildCondition, buildBody));
+      cases.add(new SwitchCaseInfo(buildCondition, buildBody,
+          sourceInformationBuilder.buildSwitch(node)));
     }
 
     // A loop with a simple switch in the body.
     IrBuilder whileBuilder = irBuilder.makeDelimitedBuilder();
-    whileBuilder.buildWhile(
-        buildCondition: (IrBuilder builder) {
-          ir.Primitive condition = builder.buildIdentical(
-              builder.environment.index2value[stateIndex], initial);
-          return builder.buildNegation(condition);
-        },
-        buildBody: (IrBuilder builder) {
-          builder.buildSimpleSwitch(loop, cases, null);
-        });
+    whileBuilder.buildWhile(buildCondition: (IrBuilder builder) {
+      ir.Primitive condition = builder.buildIdentical(
+          builder.environment.index2value[stateIndex], initial);
+      return builder.buildNegation(
+          condition, sourceInformationBuilder.buildSwitch(node));
+    }, buildBody: (IrBuilder builder) {
+      builder.buildSimpleSwitch(loop, cases, null);
+    });
     // Jump to the exit continuation.  This jump is the body of the loop exit
     // continuation, so the loop exit continuation can be eta-reduced.  The
     // jump is here for simplicity because `buildWhile` does not expose the
@@ -1588,7 +1595,7 @@
     whileBuilder.jumpTo(exit);
     irBuilder.add(new ir.LetCont(exit.continuation, whileBuilder.root));
     irBuilder.environment = exit.environment;
-    irBuilder.environment.discard(1);  // Discard the state variable.
+    irBuilder.environment.discard(1); // Discard the state variable.
     irBuilder.state.breakCollectors.removeLast();
     irBuilder.state.continueCollectors.length -= continueTargets.length;
   }
@@ -1612,7 +1619,8 @@
           type: type,
           exceptionVariable: exceptionVariable,
           stackTraceVariable: stackTraceVariable,
-          buildCatchBlock: subbuild(catchClause.block)));
+          buildCatchBlock: subbuild(catchClause.block),
+          sourceInformation: sourceInformationBuilder.buildCatch(catchClause)));
     }
 
     assert(!node.catchBlocks.isEmpty || node.finallyBlock != null);
@@ -1624,19 +1632,15 @@
       // try { try tryBlock catch (ex, st) catchBlock } finally finallyBlock
       irBuilder.buildTryFinally(tryStatements[node.finallyBlock],
           (IrBuilder inner) {
-            inner.buildTryCatch(tryStatements[node.catchBlocks],
-                subbuild(node.tryBlock),
-                catchClauseInfos);
-          },
-          subbuild(node.finallyBlock));
+        inner.buildTryCatch(tryStatements[node.catchBlocks],
+            subbuild(node.tryBlock), catchClauseInfos);
+      }, subbuild(node.finallyBlock));
     } else if (!node.catchBlocks.isEmpty) {
       irBuilder.buildTryCatch(tryStatements[node.catchBlocks],
-          subbuild(node.tryBlock),
-          catchClauseInfos);
+          subbuild(node.tryBlock), catchClauseInfos);
     } else {
       irBuilder.buildTryFinally(tryStatements[node.finallyBlock],
-          subbuild(node.tryBlock),
-          subbuild(node.finallyBlock));
+          subbuild(node.tryBlock), subbuild(node.finallyBlock));
     }
   }
 
@@ -1645,7 +1649,8 @@
     return irBuilder.buildConditional(
         build(node.condition),
         subbuild(node.thenExpression),
-        subbuild(node.elseExpression));
+        subbuild(node.elseExpression),
+        sourceInformationBuilder.buildIf(node));
   }
 
   // For all simple literals:
@@ -1683,8 +1688,8 @@
     return irBuilder.state.constants.getConstantValueForVariable(element);
   }
 
-  ir.Primitive buildConstantExpression(ConstantExpression expression,
-                                       SourceInformation sourceInformation) {
+  ir.Primitive buildConstantExpression(
+      ConstantExpression expression, SourceInformation sourceInformation) {
     return irBuilder.buildConstant(
         irBuilder.state.constants.getConstantValue(expression),
         sourceInformation: sourceInformation);
@@ -1696,8 +1701,8 @@
   /// allocation site for a List object (a literal list or a call to one
   /// of the List constructors).
   TypeMask getAllocationSiteType(ast.Node node) {
-    return compiler.typesTask.getGuaranteedTypeOfNode(
-        elements.analyzedElement, node);
+    return compiler.typesTask
+        .getGuaranteedTypeOfNode(elements.analyzedElement, node);
   }
 
   ir.Primitive visitLiteralList(ast.LiteralList node) {
@@ -1710,7 +1715,7 @@
     // TODO(sra): In checked mode, the elements must be checked as though
     // operator[]= is called.
     ir.Primitive list = irBuilder.buildListLiteral(type, values,
-          allocationSiteType: allocationSiteType);
+        allocationSiteType: allocationSiteType);
     if (type.treatAsRaw) return list;
     // Call JSArray<E>.typed(allocation) to install the reified type.
     ConstructorElement constructor = helpers.jsArrayTypedConstructor;
@@ -1723,8 +1728,8 @@
 
     if (allocationSiteType == null) return tagged;
 
-    return irBuilder.addPrimitive(
-        new ir.Refinement(tagged, allocationSiteType));
+    return irBuilder
+        .addPrimitive(new ir.Refinement(tagged, allocationSiteType));
   }
 
   ir.Primitive visitLiteralMap(ast.LiteralMap node) {
@@ -1740,7 +1745,7 @@
         return irBuilder.buildStaticFunctionInvocation(
             helpers.mapLiteralUntypedEmptyMaker,
             <ir.Primitive>[],
-            sourceInformation: sourceInformationBuilder.buildNew(node));
+            sourceInformationBuilder.buildNew(node));
       } else {
         ConstructorElement constructor = helpers.mapLiteralConstructorEmpty;
         return irBuilder.buildConstructorInvocation(
@@ -1764,7 +1769,7 @@
       return irBuilder.buildStaticFunctionInvocation(
           helpers.mapLiteralUntypedMaker,
           <ir.Primitive>[keysAndValuesList],
-          sourceInformation: sourceInformationBuilder.buildNew(node));
+          sourceInformationBuilder.buildNew(node));
     } else {
       ConstructorElement constructor = helpers.mapLiteralConstructor;
       return irBuilder.buildConstructorInvocation(
@@ -1781,8 +1786,7 @@
     return translateConstant(node);
   }
 
-  ir.Primitive visitParenthesizedExpression(
-      ast.ParenthesizedExpression node) {
+  ir.Primitive visitParenthesizedExpression(ast.ParenthesizedExpression node) {
     assert(irBuilder.isOpen);
     return visit(node.expression);
   }
@@ -1810,7 +1814,7 @@
   @override
   ir.Primitive visitAssert(ast.Assert node) {
     assert(irBuilder.isOpen);
-    if (compiler.enableUserAssertions) {
+    if (compiler.options.enableUserAssertions) {
       return giveup(node, 'assert in checked mode not implemented');
     } else {
       // The call to assert and its argument expression must be ignored
@@ -1838,7 +1842,7 @@
     return irBuilder.buildStaticFunctionInvocation(
         helpers.checkDeferredIsLoaded,
         <ir.Primitive>[name, uri],
-        sourceInformation: sourceInformation);
+        sourceInformation);
   }
 
   ir.Primitive visitNamedArgument(ast.NamedArgument node) {
@@ -1847,16 +1851,13 @@
   }
 
   @override
-  ir.Primitive visitExpressionInvoke(ast.Send node,
-                                     ast.Node expression,
-                                     ast.NodeList argumentsNode,
-                                     CallStructure callStructure, _) {
+  ir.Primitive visitExpressionInvoke(ast.Send node, ast.Node expression,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
     ir.Primitive receiver = visit(expression);
     List<ir.Primitive> arguments = argumentsNode.nodes.mapToList(visit);
     callStructure = normalizeDynamicArguments(callStructure, arguments);
     return irBuilder.buildCallInvocation(receiver, callStructure, arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, argumentsNode));
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   /// Returns `true` if [node] is a super call.
@@ -1867,10 +1868,9 @@
 
   @override
   ir.Primitive handleConstantGet(
-      ast.Node node,
-      ConstantExpression constant, _) {
-    return buildConstantExpression(constant,
-        sourceInformationBuilder.buildGet(node));
+      ast.Node node, ConstantExpression constant, _) {
+    return buildConstantExpression(
+        constant, sourceInformationBuilder.buildGet(node));
   }
 
   /// If [node] is null, returns this.
@@ -1881,10 +1881,7 @@
 
   @override
   ir.Primitive handleDynamicGet(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      _) {
+      ast.Send node, ast.Node receiver, Name name, _) {
     return irBuilder.buildDynamicGet(
         translateReceiver(receiver),
         new Selector.getter(name),
@@ -1894,10 +1891,7 @@
 
   @override
   ir.Primitive visitIfNotNullDynamicPropertyGet(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      _) {
+      ast.Send node, ast.Node receiver, Name name, _) {
     ir.Primitive target = visit(receiver);
     return irBuilder.buildIfNotNullSend(
         target,
@@ -1905,58 +1899,47 @@
             target,
             new Selector.getter(name),
             elements.getTypeMask(node),
-            sourceInformationBuilder.buildGet(node))));
+            sourceInformationBuilder.buildGet(node))),
+        sourceInformationBuilder.buildIf(node));
   }
 
   @override
   ir.Primitive visitDynamicTypeLiteralGet(
-      ast.Send node,
-      ConstantExpression constant,
-      _) {
-    return buildConstantExpression(constant,
-        sourceInformationBuilder.buildGet(node));
+      ast.Send node, ConstantExpression constant, _) {
+    return buildConstantExpression(
+        constant, sourceInformationBuilder.buildGet(node));
   }
 
   @override
   ir.Primitive visitLocalVariableGet(
-      ast.Send node,
-      LocalVariableElement element,
-      _) {
+      ast.Send node, LocalVariableElement element, _) {
     return element.isConst
         ? irBuilder.buildConstant(getConstantForVariable(element),
             sourceInformation: sourceInformationBuilder.buildGet(node))
         : irBuilder.buildLocalGet(element);
   }
 
-  ir.Primitive handleLocalGet(
-      ast.Send node,
-      LocalElement element,
-      _) {
+  ir.Primitive handleLocalGet(ast.Send node, LocalElement element, _) {
     return irBuilder.buildLocalGet(element);
   }
 
   @override
   ir.Primitive handleStaticFunctionGet(
-      ast.Send node,
-      MethodElement function,
-      _) {
+      ast.Send node, MethodElement function, _) {
     return irBuilder.addPrimitive(new ir.GetStatic(function, isFinal: true));
   }
 
   @override
-  ir.Primitive handleStaticGetterGet(
-      ast.Send node,
-      FunctionElement getter,
-      _) {
-    return buildStaticGetterGet(getter, node);
+  ir.Primitive handleStaticGetterGet(ast.Send node, FunctionElement getter, _) {
+    return buildStaticGetterGet(
+        getter, node, sourceInformationBuilder.buildGet(node));
   }
 
   /// Create a getter invocation of the static getter [getter]. This also
   /// handles the special case where [getter] is the `loadLibrary`
   /// pseudo-function on library prefixes of deferred imports.
-  ir.Primitive buildStaticGetterGet(MethodElement getter, ast.Send node) {
-    SourceInformation sourceInformation =
-        sourceInformationBuilder.buildGet(node);
+  ir.Primitive buildStaticGetterGet(MethodElement getter, ast.Send node,
+      SourceInformation sourceInformation) {
     if (getter.isDeferredLoaderGetter) {
       PrefixElement prefix = getter.enclosingElement;
       ir.Primitive loadId = irBuilder.buildStringConstant(
@@ -1964,52 +1947,47 @@
       return irBuilder.buildStaticFunctionInvocation(
           compiler.loadLibraryFunction,
           <ir.Primitive>[loadId],
-          sourceInformation: sourceInformation);
+          sourceInformation);
     } else {
       return irBuilder.buildStaticGetterGet(getter, sourceInformation);
     }
   }
 
   @override
-  ir.Primitive visitSuperFieldGet(
-      ast.Send node,
-      FieldElement field,
-      _) {
-    return irBuilder.buildSuperFieldGet(field);
+  ir.Primitive visitSuperFieldGet(ast.Send node, FieldElement field, _) {
+    return irBuilder.buildSuperFieldGet(
+        field, sourceInformationBuilder.buildGet(node));
   }
 
   @override
-  ir.Primitive visitSuperGetterGet(
-      ast.Send node,
-      FunctionElement getter,
-      _) {
+  ir.Primitive visitSuperGetterGet(ast.Send node, FunctionElement getter, _) {
     return irBuilder.buildSuperGetterGet(
         getter, sourceInformationBuilder.buildGet(node));
   }
 
   @override
-  ir.Primitive visitSuperMethodGet(
-      ast.Send node,
-      MethodElement method,
-      _) {
-    return irBuilder.buildSuperMethodGet(method);
+  ir.Primitive visitSuperMethodGet(ast.Send node, MethodElement method, _) {
+    return irBuilder.buildSuperMethodGet(
+        method, sourceInformationBuilder.buildGet(node));
   }
 
   @override
-  ir.Primitive visitUnresolvedSuperGet(
-      ast.Send node,
-      Element element, _) {
+  ir.Primitive visitUnresolvedSuperGet(ast.Send node, Element element, _) {
     return buildSuperNoSuchMethod(
-        elements.getSelector(node), elements.getTypeMask(node), []);
+        elements.getSelector(node),
+        elements.getTypeMask(node),
+        [],
+        sourceInformationBuilder.buildGet(node));
   }
 
   @override
   ir.Primitive visitUnresolvedSuperSet(
-      ast.Send node,
-      Element element,
-      ast.Node rhs, _) {
+      ast.Send node, Element element, ast.Node rhs, _) {
     return buildSuperNoSuchMethod(
-        elements.getSelector(node), elements.getTypeMask(node), [visit(rhs)]);
+        elements.getSelector(node),
+        elements.getTypeMask(node),
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
@@ -2024,21 +2002,20 @@
   }
 
   ir.Primitive translateTypeVariableTypeLiteral(
-      TypeVariableElement element,
-      SourceInformation sourceInformation) {
+      TypeVariableElement element, SourceInformation sourceInformation) {
     return irBuilder.buildReifyTypeVariable(element.type, sourceInformation);
   }
 
   @override
-  ir.Primitive visitTypeVariableTypeLiteralGet(ast.Send node,
-                                               TypeVariableElement element, _) {
-    return translateTypeVariableTypeLiteral(element,
-        sourceInformationBuilder.buildGet(node));
+  ir.Primitive visitTypeVariableTypeLiteralGet(
+      ast.Send node, TypeVariableElement element, _) {
+    return translateTypeVariableTypeLiteral(
+        element, sourceInformationBuilder.buildGet(node));
   }
 
   ir.Primitive translateLogicalOperator(ast.Expression left,
-                                        ast.Expression right,
-                                        {bool isLazyOr}) {
+      ast.Expression right, SourceInformation sourceInformation,
+      {bool isLazyOr}) {
     ir.Primitive leftValue = visit(left);
 
     ir.Primitive buildRightValue(IrBuilder rightBuilder) {
@@ -2046,60 +2023,60 @@
     }
 
     return irBuilder.buildLogicalOperator(
-        leftValue, buildRightValue, isLazyOr: isLazyOr);
+        leftValue, buildRightValue, sourceInformation,
+        isLazyOr: isLazyOr);
   }
 
   @override
-  ir.Primitive visitIfNull(
-      ast.Send node, ast.Node left, ast.Node right, _) {
-    return irBuilder.buildIfNull(build(left), subbuild(right));
+  ir.Primitive visitIfNull(ast.Send node, ast.Node left, ast.Node right, _) {
+    return irBuilder.buildIfNull(
+        build(left), subbuild(right), sourceInformationBuilder.buildIf(node));
   }
 
   @override
   ir.Primitive visitLogicalAnd(
       ast.Send node, ast.Node left, ast.Node right, _) {
-    return translateLogicalOperator(left, right, isLazyOr: false);
+    return translateLogicalOperator(
+        left, right, sourceInformationBuilder.buildIf(node),
+        isLazyOr: false);
   }
 
   @override
-  ir.Primitive visitLogicalOr(
-      ast.Send node, ast.Node left, ast.Node right, _) {
-    return translateLogicalOperator(left, right, isLazyOr: true);
+  ir.Primitive visitLogicalOr(ast.Send node, ast.Node left, ast.Node right, _) {
+    return translateLogicalOperator(
+        left, right, sourceInformationBuilder.buildIf(node),
+        isLazyOr: true);
   }
 
   @override
-  ir.Primitive visitAs(
-      ast.Send node,
-      ast.Node expression,
-      DartType type,
-      _) {
+  ir.Primitive visitAs(ast.Send node, ast.Node expression, DartType type, _) {
     ir.Primitive receiver = visit(expression);
-    return irBuilder.buildTypeOperator(receiver, type, isTypeTest: false);
+    return irBuilder.buildTypeOperator(
+        receiver, type, sourceInformationBuilder.buildAs(node),
+        isTypeTest: false);
   }
 
   @override
-  ir.Primitive visitIs(
-      ast.Send node,
-      ast.Node expression,
-      DartType type,
-      _) {
+  ir.Primitive visitIs(ast.Send node, ast.Node expression, DartType type, _) {
     ir.Primitive value = visit(expression);
-    return irBuilder.buildTypeOperator(value, type, isTypeTest: true);
+    return irBuilder.buildTypeOperator(
+        value, type, sourceInformationBuilder.buildIs(node),
+        isTypeTest: true);
   }
 
   @override
-  ir.Primitive visitIsNot(ast.Send node,
-                          ast.Node expression, DartType type, _) {
+  ir.Primitive visitIsNot(
+      ast.Send node, ast.Node expression, DartType type, _) {
     ir.Primitive value = visit(expression);
     ir.Primitive check = irBuilder.buildTypeOperator(
-        value, type, isTypeTest: true);
-    return irBuilder.buildNegation(check);
+        value, type, sourceInformationBuilder.buildIs(node),
+        isTypeTest: true);
+    return irBuilder.buildNegation(
+        check, sourceInformationBuilder.buildIf(node));
   }
 
-  ir.Primitive translateBinary(ast.Send node,
-                               ast.Node left,
-                               op.BinaryOperator operator,
-                               ast.Node right) {
+  ir.Primitive translateBinary(ast.Send node, ast.Node left,
+      op.BinaryOperator operator, ast.Node right) {
     ir.Primitive receiver = visit(left);
     Selector selector = new Selector.binaryOperator(operator.selectorName);
     List<ir.Primitive> arguments = <ir.Primitive>[visit(right)];
@@ -2110,22 +2087,17 @@
         new Selector(selector.kind, selector.memberName, callStructure),
         elements.getTypeMask(node),
         arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, node.selector));
+        sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   @override
-  ir.Primitive visitBinary(ast.Send node,
-                           ast.Node left,
-                           op.BinaryOperator operator,
-                           ast.Node right, _) {
+  ir.Primitive visitBinary(ast.Send node, ast.Node left,
+      op.BinaryOperator operator, ast.Node right, _) {
     return translateBinary(node, left, operator, right);
   }
 
   @override
-  ir.Primitive visitIndex(ast.Send node,
-                          ast.Node receiver,
-                          ast.Node index, _) {
+  ir.Primitive visitIndex(ast.Send node, ast.Node receiver, ast.Node index, _) {
     ir.Primitive target = visit(receiver);
     Selector selector = new Selector.index();
     List<ir.Primitive> arguments = <ir.Primitive>[visit(index)];
@@ -2136,110 +2108,92 @@
         new Selector(selector.kind, selector.memberName, callStructure),
         elements.getTypeMask(node),
         arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(receiver, node.selector));
+        sourceInformationBuilder.buildCall(receiver, node.selector));
   }
 
-  ir.Primitive translateSuperBinary(FunctionElement function,
-                                    op.BinaryOperator operator,
-                                    ast.Node argument) {
-    List<ir.Primitive> arguments = <ir.Primitive>[visit(argument)];
-    return irBuilder.buildSuperMethodInvocation(function,
-        CallStructure.ONE_ARG, arguments);
-  }
-
-  @override
-  ir.Primitive visitSuperBinary(
-      ast.Send node,
+  ir.Primitive translateSuperBinary(
       FunctionElement function,
       op.BinaryOperator operator,
       ast.Node argument,
-      _) {
-    return translateSuperBinary(function, operator, argument);
+      SourceInformation sourceInformation) {
+    List<ir.Primitive> arguments = <ir.Primitive>[visit(argument)];
+    return irBuilder.buildSuperMethodInvocation(
+        function, CallStructure.ONE_ARG, arguments, sourceInformation);
+  }
+
+  @override
+  ir.Primitive visitSuperBinary(ast.Send node, FunctionElement function,
+      op.BinaryOperator operator, ast.Node argument, _) {
+    return translateSuperBinary(function, operator, argument,
+        sourceInformationBuilder.buildBinary(node));
   }
 
   @override
   ir.Primitive visitSuperIndex(
-      ast.Send node,
-      FunctionElement function,
-      ast.Node index,
-      _) {
-    return irBuilder.buildSuperIndex(function, visit(index));
+      ast.Send node, FunctionElement function, ast.Node index, _) {
+    return irBuilder.buildSuperIndex(
+        function, visit(index), sourceInformationBuilder.buildIndex(node));
   }
 
   @override
-  ir.Primitive visitEquals(
-      ast.Send node,
-      ast.Node left,
-      ast.Node right,
-      _) {
+  ir.Primitive visitEquals(ast.Send node, ast.Node left, ast.Node right, _) {
     return translateBinary(node, left, op.BinaryOperator.EQ, right);
   }
 
   @override
   ir.Primitive visitSuperEquals(
-      ast.Send node,
-      FunctionElement function,
-      ast.Node argument,
-      _) {
-    return translateSuperBinary(function, op.BinaryOperator.EQ, argument);
+      ast.Send node, FunctionElement function, ast.Node argument, _) {
+    return translateSuperBinary(function, op.BinaryOperator.EQ, argument,
+        sourceInformationBuilder.buildBinary(node));
   }
 
   @override
-  ir.Primitive visitNot(
-      ast.Send node,
-      ast.Node expression,
-      _) {
-    return irBuilder.buildNegation(visit(expression));
-  }
-
-  @override
-  ir.Primitive visitNotEquals(
-      ast.Send node,
-      ast.Node left,
-      ast.Node right,
-      _) {
+  ir.Primitive visitNot(ast.Send node, ast.Node expression, _) {
     return irBuilder.buildNegation(
-        translateBinary(node, left, op.BinaryOperator.NOT_EQ, right));
+        visit(expression), sourceInformationBuilder.buildIf(node));
+  }
+
+  @override
+  ir.Primitive visitNotEquals(ast.Send node, ast.Node left, ast.Node right, _) {
+    return irBuilder.buildNegation(
+        translateBinary(node, left, op.BinaryOperator.NOT_EQ, right),
+        sourceInformationBuilder.buildIf(node));
   }
 
   @override
   ir.Primitive visitSuperNotEquals(
-      ast.Send node,
-      FunctionElement function,
-      ast.Node argument,
-      _) {
+      ast.Send node, FunctionElement function, ast.Node argument, _) {
     return irBuilder.buildNegation(
-        translateSuperBinary(function, op.BinaryOperator.NOT_EQ, argument));
+        translateSuperBinary(function, op.BinaryOperator.NOT_EQ, argument,
+            sourceInformationBuilder.buildBinary(node)),
+        sourceInformationBuilder.buildIf(node));
   }
 
   @override
-  ir.Primitive visitUnary(ast.Send node,
-                          op.UnaryOperator operator, ast.Node expression, _) {
+  ir.Primitive visitUnary(
+      ast.Send node, op.UnaryOperator operator, ast.Node expression, _) {
     // TODO(johnniwinther): Clean up the creation of selectors.
     Selector selector = operator.selector;
     ir.Primitive receiver = translateReceiver(expression);
     return irBuilder.buildDynamicInvocation(
-        receiver, selector, elements.getTypeMask(node), const [],
-        sourceInformation: sourceInformationBuilder.buildCall(
-            expression, node));
+        receiver,
+        selector,
+        elements.getTypeMask(node),
+        const [],
+        sourceInformationBuilder.buildCall(expression, node));
   }
 
   @override
   ir.Primitive visitSuperUnary(
-      ast.Send node,
-      op.UnaryOperator operator,
-      FunctionElement function,
-      _) {
-    return irBuilder.buildSuperMethodInvocation(
-        function, CallStructure.NO_ARGS, const []);
+      ast.Send node, op.UnaryOperator operator, FunctionElement function, _) {
+    return irBuilder.buildSuperMethodInvocation(function, CallStructure.NO_ARGS,
+        const [], sourceInformationBuilder.buildCall(node, node));
   }
 
   // TODO(johnniwinther): Handle this in the [IrBuilder] to ensure the correct
   // semantic correlation between arguments and invocation.
   CallStructure translateDynamicArguments(ast.NodeList nodeList,
-                                          CallStructure callStructure,
-                                          List<ir.Primitive> arguments) {
+      CallStructure callStructure, List<ir.Primitive> arguments) {
     assert(arguments.isEmpty);
     for (ast.Node node in nodeList) arguments.add(visit(node));
     return normalizeDynamicArguments(callStructure, arguments);
@@ -2247,35 +2201,30 @@
 
   // TODO(johnniwinther): Handle this in the [IrBuilder] to ensure the correct
   // semantic correlation between arguments and invocation.
-  CallStructure translateStaticArguments(ast.NodeList nodeList,
-                                         Element element,
-                                         CallStructure callStructure,
-                                         List<ir.Primitive> arguments) {
+  CallStructure translateStaticArguments(ast.NodeList nodeList, Element element,
+      CallStructure callStructure, List<ir.Primitive> arguments) {
     assert(arguments.isEmpty);
     for (ast.Node node in nodeList) arguments.add(visit(node));
     return normalizeStaticArguments(callStructure, element, arguments);
   }
 
-  ir.Primitive translateCallInvoke(ir.Primitive target,
-                                   ast.NodeList argumentsNode,
-                                   CallStructure callStructure,
-                                   SourceInformation sourceInformation) {
+  ir.Primitive translateCallInvoke(
+      ir.Primitive target,
+      ast.NodeList argumentsNode,
+      CallStructure callStructure,
+      SourceInformation sourceInformation) {
     List<ir.Primitive> arguments = <ir.Primitive>[];
     callStructure =
         translateDynamicArguments(argumentsNode, callStructure, arguments);
-    return irBuilder.buildCallInvocation(target, callStructure, arguments,
-        sourceInformation: sourceInformation);
+    return irBuilder.buildCallInvocation(
+        target, callStructure, arguments, sourceInformation);
   }
 
   @override
-  ir.Primitive handleConstantInvoke(
-      ast.Send node,
-      ConstantExpression constant,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    ir.Primitive target = buildConstantExpression(constant,
-        sourceInformationBuilder.buildGet(node));
+  ir.Primitive handleConstantInvoke(ast.Send node, ConstantExpression constant,
+      ast.NodeList arguments, CallStructure callStructure, _) {
+    ir.Primitive target = buildConstantExpression(
+        constant, sourceInformationBuilder.buildGet(node));
     return translateCallInvoke(target, arguments, callStructure,
         sourceInformationBuilder.buildCall(node, arguments));
   }
@@ -2288,15 +2237,14 @@
       ast.NodeList argumentsNode,
       CallStructure callStructure,
       _) {
-
     // TODO(sigmund): move these checks down after visiting arguments
     // (see issue #25355)
     ast.Send send = node.send;
     // If an allocation refers to a type using a deferred import prefix (e.g.
     // `new lib.A()`), we must ensure that the deferred import has already been
     // loaded.
-    var prefix = compiler.deferredLoadTask.deferredPrefixElement(
-        send, elements);
+    var prefix =
+        compiler.deferredLoadTask.deferredPrefixElement(send, elements);
     if (prefix != null) buildCheckDeferredIsLoaded(prefix, send);
 
     // We also emit deferred import checks when using redirecting factories that
@@ -2311,6 +2259,10 @@
     }
 
     List<ir.Primitive> arguments = argumentsNode.nodes.mapToList(visit);
+    if (constructor.isGenerativeConstructor &&
+        backend.isNativeOrExtendsNative(constructor.enclosingClass)) {
+      arguments.insert(0, irBuilder.buildNullConstant());
+    }
     // Use default values from the effective target, not the immediate target.
     ConstructorElement target;
     if (constructor == compiler.symbolConstructor) {
@@ -2347,12 +2299,8 @@
   }
 
   @override
-  ir.Primitive handleDynamicInvoke(
-      ast.Send node,
-      ast.Node receiver,
-      ast.NodeList argumentsNode,
-      Selector selector,
-      _) {
+  ir.Primitive handleDynamicInvoke(ast.Send node, ast.Node receiver,
+      ast.NodeList argumentsNode, Selector selector, _) {
     ir.Primitive target = translateReceiver(receiver);
     List<ir.Primitive> arguments = <ir.Primitive>[];
     CallStructure callStructure = translateDynamicArguments(
@@ -2362,45 +2310,34 @@
         new Selector(selector.kind, selector.memberName, callStructure),
         elements.getTypeMask(node),
         arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, node.selector));
+        sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   @override
-  ir.Primitive visitIfNotNullDynamicPropertyInvoke(
-      ast.Send node,
-      ast.Node receiver,
-      ast.NodeList argumentsNode,
-      Selector selector,
-      _) {
+  ir.Primitive visitIfNotNullDynamicPropertyInvoke(ast.Send node,
+      ast.Node receiver, ast.NodeList argumentsNode, Selector selector, _) {
     ir.Primitive target = visit(receiver);
-    return irBuilder.buildIfNotNullSend(
-        target,
-        nested(() {
-          List<ir.Primitive> arguments = <ir.Primitive>[];
-          CallStructure callStructure = translateDynamicArguments(
-              argumentsNode, selector.callStructure, arguments);
-          return irBuilder.buildDynamicInvocation(
-              target,
-              new Selector(selector.kind, selector.memberName, callStructure),
-              elements.getTypeMask(node),
-              arguments);
-        }));
+    return irBuilder.buildIfNotNullSend(target, nested(() {
+      List<ir.Primitive> arguments = <ir.Primitive>[];
+      CallStructure callStructure = translateDynamicArguments(
+          argumentsNode, selector.callStructure, arguments);
+      return irBuilder.buildDynamicInvocation(
+          target,
+          new Selector(selector.kind, selector.memberName, callStructure),
+          elements.getTypeMask(node),
+          arguments,
+          sourceInformationBuilder.buildCall(node, node.selector));
+    }), sourceInformationBuilder.buildIf(node));
   }
 
-  ir.Primitive handleLocalInvoke(
-      ast.Send node,
-      LocalElement element,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure,
-      _) {
+  ir.Primitive handleLocalInvoke(ast.Send node, LocalElement element,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
     ir.Primitive function = irBuilder.buildLocalGet(element);
     List<ir.Primitive> arguments = <ir.Primitive>[];
     callStructure =
         translateDynamicArguments(argumentsNode, callStructure, arguments);
     return irBuilder.buildCallInvocation(function, callStructure, arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, argumentsNode));
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   @override
@@ -2409,37 +2346,26 @@
   }
 
   @override
-  ir.Primitive handleStaticFieldInvoke(
-      ast.Send node,
-      FieldElement field,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure,
-      _) {
+  ir.Primitive handleStaticFieldInvoke(ast.Send node, FieldElement field,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
     SourceInformation src = sourceInformationBuilder.buildGet(node);
     ir.Primitive target = buildStaticFieldGet(field, src);
     List<ir.Primitive> arguments = <ir.Primitive>[];
     callStructure =
         translateDynamicArguments(argumentsNode, callStructure, arguments);
-    return irBuilder.buildCallInvocation(
-        target,
-        callStructure,
-        arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, argumentsNode));
+    return irBuilder.buildCallInvocation(target, callStructure, arguments,
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   @override
-  ir.Primitive handleStaticFunctionInvoke(ast.Send node,
-      MethodElement function,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure,
-      _) {
+  ir.Primitive handleStaticFunctionInvoke(ast.Send node, MethodElement function,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
     if (compiler.backend.isForeign(function)) {
       return handleForeignCode(node, function, argumentsNode, callStructure);
     } else {
       List<ir.Primitive> arguments = <ir.Primitive>[];
-      callStructure = translateStaticArguments(argumentsNode, function,
-          callStructure, arguments);
+      callStructure = translateStaticArguments(
+          argumentsNode, function, callStructure, arguments);
       Selector selector = new Selector.call(function.memberName, callStructure);
       return irBuilder.buildInvokeStatic(function, selector, arguments,
           sourceInformationBuilder.buildCall(node, node.selector));
@@ -2451,86 +2377,58 @@
       ast.Send node,
       MethodElement function,
       ast.NodeList arguments,
-      CallStructure callStructure, _) {
+      CallStructure callStructure,
+      _) {
     return irBuilder.buildStaticNoSuchMethod(
         elements.getSelector(node),
-        arguments.nodes.mapToList(visit));
+        arguments.nodes.mapToList(visit),
+        sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   @override
-  ir.Primitive handleStaticGetterInvoke(
-      ast.Send node,
-      FunctionElement getter,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure,
-      _) {
-    ir.Primitive target = buildStaticGetterGet(getter, node);
+  ir.Primitive handleStaticGetterInvoke(ast.Send node, FunctionElement getter,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
+    ir.Primitive target = buildStaticGetterGet(
+        getter, node, sourceInformationBuilder.buildGet(node));
     List<ir.Primitive> arguments = <ir.Primitive>[];
     callStructure =
         translateDynamicArguments(argumentsNode, callStructure, arguments);
-    return irBuilder.buildCallInvocation(
-        target,
-        callStructure,
-        arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, argumentsNode));
+    return irBuilder.buildCallInvocation(target, callStructure, arguments,
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   @override
-  ir.Primitive visitSuperFieldInvoke(
-      ast.Send node,
-      FieldElement field,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure,
-      _) {
-    ir.Primitive target = irBuilder.buildSuperFieldGet(field);
+  ir.Primitive visitSuperFieldInvoke(ast.Send node, FieldElement field,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
+    ir.Primitive target = irBuilder.buildSuperFieldGet(
+        field, sourceInformationBuilder.buildGet(node));
     List<ir.Primitive> arguments = <ir.Primitive>[];
     callStructure =
         translateDynamicArguments(argumentsNode, callStructure, arguments);
-    return irBuilder.buildCallInvocation(
-        target,
-        callStructure,
-        arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, argumentsNode));
+    return irBuilder.buildCallInvocation(target, callStructure, arguments,
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   @override
-  ir.Primitive visitSuperGetterInvoke(
-      ast.Send node,
-      FunctionElement getter,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure,
-      _) {
-    ir.Primitive target = irBuilder.buildSuperGetterGet(getter,
-        sourceInformationBuilder.buildGet(node));
+  ir.Primitive visitSuperGetterInvoke(ast.Send node, FunctionElement getter,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
+    ir.Primitive target = irBuilder.buildSuperGetterGet(
+        getter, sourceInformationBuilder.buildGet(node));
     List<ir.Primitive> arguments = <ir.Primitive>[];
     callStructure =
         translateDynamicArguments(argumentsNode, callStructure, arguments);
-    return irBuilder.buildCallInvocation(
-        target,
-        callStructure,
-        arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, argumentsNode));
+    return irBuilder.buildCallInvocation(target, callStructure, arguments,
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   @override
-  ir.Primitive visitSuperMethodInvoke(
-      ast.Send node,
-      MethodElement method,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure,
-      _) {
+  ir.Primitive visitSuperMethodInvoke(ast.Send node, MethodElement method,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
     List<ir.Primitive> arguments = <ir.Primitive>[];
-    callStructure = translateStaticArguments(argumentsNode, method,
-        callStructure, arguments);
-    return irBuilder.buildSuperMethodInvocation(
-        method,
-        callStructure,
-        arguments,
-        sourceInformation:
-            sourceInformationBuilder.buildCall(node, node.selector));
+    callStructure = translateStaticArguments(
+        argumentsNode, method, callStructure, arguments);
+    return irBuilder.buildSuperMethodInvocation(method, callStructure,
+        arguments, sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   @override
@@ -2538,22 +2436,21 @@
       ast.Send node,
       MethodElement method,
       ast.NodeList arguments,
-      CallStructure callStructure, _) {
+      CallStructure callStructure,
+      _) {
     List<ir.Primitive> normalizedArguments = <ir.Primitive>[];
-    CallStructure normalizedCallStructure =
-      translateDynamicArguments(arguments, callStructure, normalizedArguments);
+    CallStructure normalizedCallStructure = translateDynamicArguments(
+        arguments, callStructure, normalizedArguments);
     return buildSuperNoSuchMethod(
         new Selector.call(method.memberName, normalizedCallStructure),
         elements.getTypeMask(node),
-        normalizedArguments);
+        normalizedArguments,
+        sourceInformationBuilder.buildCall(node, arguments));
   }
 
   @override
-  ir.Primitive visitUnresolvedSuperInvoke(
-      ast.Send node,
-      Element element,
-      ast.NodeList argumentsNode,
-      Selector selector, _) {
+  ir.Primitive visitUnresolvedSuperInvoke(ast.Send node, Element element,
+      ast.NodeList argumentsNode, Selector selector, _) {
     List<ir.Primitive> arguments = <ir.Primitive>[];
     CallStructure callStructure = translateDynamicArguments(
         argumentsNode, selector.callStructure, arguments);
@@ -2562,19 +2459,14 @@
     return buildSuperNoSuchMethod(
         new Selector.call(elements.getSelector(node).memberName, callStructure),
         elements.getTypeMask(node),
-        arguments);
+        arguments,
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   @override
   ir.Primitive visitThisInvoke(
-      ast.Send node,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    return translateCallInvoke(
-        irBuilder.buildThis(),
-        arguments,
-        callStructure,
+      ast.Send node, ast.NodeList arguments, CallStructure callStructure, _) {
+    return translateCallInvoke(irBuilder.buildThis(), arguments, callStructure,
         sourceInformationBuilder.buildCall(node, arguments));
   }
 
@@ -2595,41 +2487,39 @@
 
   @override
   ir.Primitive visitIndexSet(
-       ast.SendSet node,
-       ast.Node receiver,
-       ast.Node index,
-       ast.Node rhs,
-       _) {
+      ast.SendSet node, ast.Node receiver, ast.Node index, ast.Node rhs, _) {
     return irBuilder.buildDynamicIndexSet(
-        visit(receiver), elements.getTypeMask(node), visit(index), visit(rhs));
+        visit(receiver),
+        elements.getTypeMask(node),
+        visit(index),
+        visit(rhs),
+        sourceInformationBuilder.buildIndexSet(node));
   }
 
   @override
-  ir.Primitive visitSuperIndexSet(
-      ast.SendSet node,
-      FunctionElement function,
-      ast.Node index,
-      ast.Node rhs,
-      _) {
-    return irBuilder.buildSuperIndexSet(function, visit(index), visit(rhs));
+  ir.Primitive visitSuperIndexSet(ast.SendSet node, FunctionElement function,
+      ast.Node index, ast.Node rhs, _) {
+    return irBuilder.buildSuperIndexSet(function, visit(index), visit(rhs),
+        sourceInformationBuilder.buildIndexSet(node));
   }
 
-  ir.Primitive translateCompounds(
-      ast.SendSet node,
-      ir.Primitive getValue(),
-      CompoundRhs rhs,
-      void setValue(ir.Primitive value)) {
+  ir.Primitive translateIfNull(ast.SendSet node, ir.Primitive getValue(),
+      ast.Node rhs, void setValue(ir.Primitive value)) {
+    ir.Primitive value = getValue();
+    // Unlike other compound operators if-null conditionally will not do the
+    // assignment operation.
+    return irBuilder.buildIfNull(value, nested(() {
+      ir.Primitive newValue = build(rhs);
+      setValue(newValue);
+      return newValue;
+    }), sourceInformationBuilder.buildIf(node));
+  }
+
+  ir.Primitive translateCompounds(ast.SendSet node, ir.Primitive getValue(),
+      CompoundRhs rhs, void setValue(ir.Primitive value)) {
     ir.Primitive value = getValue();
     op.BinaryOperator operator = rhs.operator;
-    if (operator.kind == op.BinaryOperatorKind.IF_NULL) {
-      // Unlike other compound operators if-null conditionally will not do the
-      // assignment operation.
-      return irBuilder.buildIfNull(value, nested(() {
-        ir.Primitive newValue = build(rhs.rhs);
-        setValue(newValue);
-        return newValue;
-      }));
-    }
+    assert(operator.kind != op.BinaryOperatorKind.IF_NULL);
 
     Selector operatorSelector =
         new Selector.binaryOperator(operator.selectorName);
@@ -2648,20 +2538,17 @@
         sourceInformationBuilder.buildCall(node, node.assignmentOperator);
     ir.Primitive result = irBuilder.buildDynamicInvocation(
         value,
-        new Selector(operatorSelector.kind, operatorSelector.memberName,
-            callStructure),
+        new Selector(
+            operatorSelector.kind, operatorSelector.memberName, callStructure),
         operatorTypeMask,
         arguments,
-        sourceInformation: operatorSourceInformation);
+        operatorSourceInformation);
     setValue(result);
     return rhs.kind == CompoundKind.POSTFIX ? value : result;
   }
 
-  ir.Primitive translateSetIfNull(
-      ast.SendSet node,
-      ir.Primitive getValue(),
-      ast.Node rhs,
-      void setValue(ir.Primitive value)) {
+  ir.Primitive translateSetIfNull(ast.SendSet node, ir.Primitive getValue(),
+      ast.Node rhs, void setValue(ir.Primitive value)) {
     ir.Primitive value = getValue();
     // Unlike other compound operators if-null conditionally will not do the
     // assignment operation.
@@ -2669,30 +2556,87 @@
       ir.Primitive newValue = build(rhs);
       setValue(newValue);
       return newValue;
-    }));
+    }), sourceInformationBuilder.buildIf(node));
+  }
+
+  @override
+  ir.Primitive handleSuperIndexSetIfNull(
+      ast.SendSet node,
+      Element indexFunction,
+      Element indexSetFunction,
+      ast.Node index,
+      ast.Node rhs,
+      arg,
+      {bool isGetterValid,
+      bool isSetterValid}) {
+    return translateSetIfNull(
+        node,
+        () {
+          if (isGetterValid) {
+            return irBuilder.buildSuperMethodGet(
+                indexFunction, sourceInformationBuilder.buildIndex(node));
+          } else {
+            return buildSuperNoSuchGetter(
+                indexFunction,
+                elements.getGetterTypeMaskInComplexSendSet(node),
+                sourceInformationBuilder.buildIndex(node));
+          }
+        },
+        rhs,
+        (ir.Primitive result) {
+          if (isSetterValid) {
+            return irBuilder.buildSuperMethodGet(
+                indexSetFunction, sourceInformationBuilder.buildIndexSet(node));
+          } else {
+            return buildSuperNoSuchSetter(
+                indexSetFunction,
+                elements.getTypeMask(node),
+                result,
+                sourceInformationBuilder.buildIndexSet(node));
+          }
+        });
+  }
+
+  @override
+  ir.Primitive visitIndexSetIfNull(
+      ast.SendSet node, ast.Node receiver, ast.Node index, ast.Node rhs, arg) {
+    ir.Primitive target = visit(receiver);
+    ir.Primitive indexValue = visit(index);
+    return translateSetIfNull(
+        node,
+        () {
+          Selector selector = new Selector.index();
+          List<ir.Primitive> arguments = <ir.Primitive>[indexValue];
+          CallStructure callStructure =
+              normalizeDynamicArguments(selector.callStructure, arguments);
+          return irBuilder.buildDynamicInvocation(
+              target,
+              new Selector(selector.kind, selector.memberName, callStructure),
+              elements.getGetterTypeMaskInComplexSendSet(node),
+              arguments,
+              sourceInformationBuilder.buildCall(receiver, node));
+        },
+        rhs,
+        (ir.Primitive result) {
+          irBuilder.buildDynamicIndexSet(target, elements.getTypeMask(node),
+              indexValue, result, sourceInformationBuilder.buildIndexSet(node));
+        });
   }
 
   @override
   ir.Primitive handleDynamicSet(
-      ast.SendSet node,
-      ast.Node receiver,
-      Name name,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ast.Node receiver, Name name, ast.Node rhs, _) {
     return irBuilder.buildDynamicSet(
         translateReceiver(receiver),
         new Selector.setter(name),
         elements.getTypeMask(node),
-        visit(rhs));
+        visit(rhs),
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitIfNotNullDynamicPropertySet(
-      ast.SendSet node,
-      ast.Node receiver,
-      Name name,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ast.Node receiver, Name name, ast.Node rhs, _) {
     ir.Primitive target = visit(receiver);
     return irBuilder.buildIfNotNullSend(
         target,
@@ -2700,193 +2644,193 @@
             target,
             new Selector.setter(name),
             elements.getTypeMask(node),
-            visit(rhs))));
+            visit(rhs),
+            sourceInformationBuilder.buildAssignment(node))),
+        sourceInformationBuilder.buildIf(node));
   }
 
   @override
   ir.Primitive handleLocalSet(
-      ast.SendSet node,
-      LocalElement element,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, LocalElement element, ast.Node rhs, _) {
     ir.Primitive value = visit(rhs);
     value = checkTypeVsElement(value, element);
-    return irBuilder.buildLocalVariableSet(element, value);
+    return irBuilder.buildLocalVariableSet(
+        element, value, sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive handleStaticFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     ir.Primitive value = visit(rhs);
-    irBuilder.addPrimitive(new ir.SetStatic(field, value));
+    irBuilder.addPrimitive(new ir.SetStatic(
+        field, value, sourceInformationBuilder.buildAssignment(node)));
     return value;
   }
 
   @override
   ir.Primitive visitSuperFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs,
-      _) {
-    return irBuilder.buildSuperFieldSet(field, visit(rhs));
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
+    return irBuilder.buildSuperFieldSet(
+        field, visit(rhs), sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitSuperSetterSet(
-      ast.SendSet node,
-      FunctionElement setter,
-      ast.Node rhs,
-      _) {
-    return irBuilder.buildSuperSetterSet(setter, visit(rhs));
+      ast.SendSet node, FunctionElement setter, ast.Node rhs, _) {
+    return irBuilder.buildSuperSetterSet(
+        setter, visit(rhs), sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitUnresolvedSuperIndexSet(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      ast.Node rhs,
-      arg) {
+      ast.Send node, Element element, ast.Node index, ast.Node rhs, arg) {
     return giveup(node, 'visitUnresolvedSuperIndexSet');
   }
 
   @override
   ir.Primitive handleStaticSetterSet(
-      ast.SendSet node,
-      FunctionElement setter,
-      ast.Node rhs,
-      _) {
-    return irBuilder.buildStaticSetterSet(setter, visit(rhs));
+      ast.SendSet node, FunctionElement setter, ast.Node rhs, _) {
+    return irBuilder.buildStaticSetterSet(
+        setter, visit(rhs), sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive handleTypeLiteralConstantCompounds(
-      ast.SendSet node,
-      ConstantExpression constant,
-      CompoundRhs rhs,
-      arg) {
+      ast.SendSet node, ConstantExpression constant, CompoundRhs rhs, arg) {
     SourceInformation src = sourceInformationBuilder.buildGet(node);
-    return translateCompounds(node, () {
-      return buildConstantExpression(constant, src);
-    }, rhs, (ir.Primitive value) {
-      // The binary operator will throw before this.
-    });
+    return translateCompounds(
+        node,
+        () {
+          return buildConstantExpression(constant, src);
+        },
+        rhs,
+        (ir.Primitive value) {
+          // The binary operator will throw before this.
+        });
   }
 
   @override
   ir.Primitive handleTypeLiteralConstantSetIfNulls(
-      ast.SendSet node,
-      ConstantExpression constant,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ConstantExpression constant, ast.Node rhs, _) {
     // The type literal is never `null`.
-    return buildConstantExpression(constant,
-        sourceInformationBuilder.buildGet(node));
+    return buildConstantExpression(
+        constant, sourceInformationBuilder.buildGet(node));
   }
 
   @override
   ir.Primitive handleDynamicCompounds(
-      ast.SendSet node,
-      ast.Node receiver,
-      Name name,
-      CompoundRhs rhs,
-      arg) {
+      ast.SendSet node, ast.Node receiver, Name name, CompoundRhs rhs, arg) {
     ir.Primitive target = translateReceiver(receiver);
     ir.Primitive helper() {
-      return translateCompounds(node, () {
-        return irBuilder.buildDynamicGet(
-            target,
-            new Selector.getter(name),
-            elements.getGetterTypeMaskInComplexSendSet(node),
-            sourceInformationBuilder.buildGet(node));
-      }, rhs, (ir.Primitive result) {
-        irBuilder.buildDynamicSet(
-            target,
-            new Selector.setter(name),
-            elements.getTypeMask(node),
-            result);
-      });
+      return translateCompounds(
+          node,
+          () {
+            return irBuilder.buildDynamicGet(
+                target,
+                new Selector.getter(name),
+                elements.getGetterTypeMaskInComplexSendSet(node),
+                sourceInformationBuilder.buildGet(node));
+          },
+          rhs,
+          (ir.Primitive result) {
+            irBuilder.buildDynamicSet(
+                target,
+                new Selector.setter(name),
+                elements.getTypeMask(node),
+                result,
+                sourceInformationBuilder.buildAssignment(node));
+          });
     }
     return node.isConditional
-        ? irBuilder.buildIfNotNullSend(target, nested(helper))
+        ? irBuilder.buildIfNotNullSend(
+            target, nested(helper), sourceInformationBuilder.buildIf(node))
         : helper();
   }
 
   @override
   ir.Primitive handleDynamicSetIfNulls(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      ast.Node rhs,
-      _) {
+      ast.Send node, ast.Node receiver, Name name, ast.Node rhs, _) {
     ir.Primitive target = translateReceiver(receiver);
     ir.Primitive helper() {
-      return translateSetIfNull(node, () {
-        return irBuilder.buildDynamicGet(
-            target,
-            new Selector.getter(name),
-            elements.getGetterTypeMaskInComplexSendSet(node),
-            sourceInformationBuilder.buildGet(node));
-      }, rhs, (ir.Primitive result) {
-        irBuilder.buildDynamicSet(
-            target,
-            new Selector.setter(name),
-            elements.getTypeMask(node),
-            result);
-      });
+      return translateSetIfNull(
+          node,
+          () {
+            return irBuilder.buildDynamicGet(
+                target,
+                new Selector.getter(name),
+                elements.getGetterTypeMaskInComplexSendSet(node),
+                sourceInformationBuilder.buildGet(node));
+          },
+          rhs,
+          (ir.Primitive result) {
+            irBuilder.buildDynamicSet(
+                target,
+                new Selector.setter(name),
+                elements.getTypeMask(node),
+                result,
+                sourceInformationBuilder.buildAssignment(node));
+          });
     }
     return node.isConditional
-        ? irBuilder.buildIfNotNullSend(target, nested(helper))
+        ? irBuilder.buildIfNotNullSend(
+            target, nested(helper), sourceInformationBuilder.buildIf(node))
         : helper();
   }
 
-  ir.Primitive buildLocalNoSuchSetter(LocalElement local, ir.Primitive value) {
+  ir.Primitive buildLocalNoSuchSetter(LocalElement local, ir.Primitive value,
+      SourceInformation sourceInformation) {
     Selector selector = new Selector.setter(
         new Name(local.name, local.library, isSetter: true));
-    return irBuilder.buildStaticNoSuchMethod(selector, [value]);
+    return irBuilder.buildStaticNoSuchMethod(
+        selector, [value], sourceInformation);
   }
 
   @override
   ir.Primitive handleLocalCompounds(
-      ast.SendSet node,
-      LocalElement local,
-      CompoundRhs rhs,
-      arg,
+      ast.SendSet node, LocalElement local, CompoundRhs rhs, arg,
       {bool isSetterValid}) {
-    return translateCompounds(node, () {
-      return irBuilder.buildLocalGet(local);
-    }, rhs, (ir.Primitive result) {
-      if (isSetterValid) {
-        irBuilder.buildLocalVariableSet(local, result);
-      } else {
-        Selector selector = new Selector.setter(
-            new Name(local.name, local.library, isSetter: true));
-        irBuilder.buildStaticNoSuchMethod(selector, <ir.Primitive>[result]);
-      }
-    });
+    return translateCompounds(
+        node,
+        () {
+          return irBuilder.buildLocalGet(local);
+        },
+        rhs,
+        (ir.Primitive result) {
+          if (isSetterValid) {
+            irBuilder.buildLocalVariableSet(
+                local, result, sourceInformationBuilder.buildAssignment(node));
+          } else {
+            Selector selector = new Selector.setter(
+                new Name(local.name, local.library, isSetter: true));
+            irBuilder.buildStaticNoSuchMethod(selector, <ir.Primitive>[result],
+                sourceInformationBuilder.buildAssignment(node));
+          }
+        });
   }
 
   @override
   ir.Primitive handleLocalSetIfNulls(
-      ast.SendSet node,
-      LocalElement local,
-      ast.Node rhs,
-      _,
+      ast.SendSet node, LocalElement local, ast.Node rhs, _,
       {bool isSetterValid}) {
-    return translateSetIfNull(node, () {
-      return irBuilder.buildLocalGet(local);
-    }, rhs, (ir.Primitive result) {
-      if (isSetterValid) {
-        irBuilder.buildLocalVariableSet(local, result);
-      } else {
-        Selector selector = new Selector.setter(
-            new Name(local.name, local.library, isSetter: true));
-        irBuilder.buildStaticNoSuchMethod(selector, <ir.Primitive>[result]);
-      }
-    });
+    return translateSetIfNull(
+        node,
+        () {
+          return irBuilder.buildLocalGet(local,
+              sourceInformation: sourceInformationBuilder.buildGet(node));
+        },
+        rhs,
+        (ir.Primitive result) {
+          SourceInformation sourceInformation =
+              sourceInformationBuilder.buildAssignment(node);
+          if (isSetterValid) {
+            irBuilder.buildLocalVariableSet(local, result, sourceInformation);
+          } else {
+            Selector selector = new Selector.setter(
+                new Name(local.name, local.library, isSetter: true));
+            irBuilder.buildStaticNoSuchMethod(
+                selector, <ir.Primitive>[result], sourceInformation);
+          }
+        });
   }
 
   @override
@@ -2898,36 +2842,46 @@
       CompoundSetter setterKind,
       CompoundRhs rhs,
       arg) {
-    return translateCompounds(node, () {
-      switch (getterKind) {
-        case CompoundGetter.FIELD:
-          SourceInformation src = sourceInformationBuilder.buildGet(node);
-          return buildStaticFieldGet(getter, src);
-        case CompoundGetter.GETTER:
-          return buildStaticGetterGet(getter, node);
-        case CompoundGetter.METHOD:
-          return irBuilder.addPrimitive(new ir.GetStatic(getter,
-              isFinal: true));
-        case CompoundGetter.UNRESOLVED:
-          return irBuilder.buildStaticNoSuchMethod(
-              new Selector.getter(new Name(getter.name, getter.library)),
-              <ir.Primitive>[]);
-      }
-    }, rhs, (ir.Primitive result) {
-      switch (setterKind) {
-        case CompoundSetter.FIELD:
-          irBuilder.addPrimitive(new ir.SetStatic(setter, result));
-          return;
-        case CompoundSetter.SETTER:
-          irBuilder.buildStaticSetterSet(setter, result);
-          return;
-        case CompoundSetter.INVALID:
-          irBuilder.buildStaticNoSuchMethod(
-              new Selector.setter(new Name(setter.name, setter.library)),
-              <ir.Primitive>[result]);
-          return;
-      }
-    });
+    return translateCompounds(
+        node,
+        () {
+          SourceInformation sourceInformation =
+              sourceInformationBuilder.buildGet(node);
+          switch (getterKind) {
+            case CompoundGetter.FIELD:
+              return buildStaticFieldGet(getter, sourceInformation);
+            case CompoundGetter.GETTER:
+              return buildStaticGetterGet(getter, node, sourceInformation);
+            case CompoundGetter.METHOD:
+              return irBuilder.addPrimitive(new ir.GetStatic(getter,
+                  sourceInformation: sourceInformation, isFinal: true));
+            case CompoundGetter.UNRESOLVED:
+              return irBuilder.buildStaticNoSuchMethod(
+                  new Selector.getter(new Name(getter.name, getter.library)),
+                  <ir.Primitive>[],
+                  sourceInformation);
+          }
+        },
+        rhs,
+        (ir.Primitive result) {
+          SourceInformation sourceInformation =
+              sourceInformationBuilder.buildAssignment(node);
+          switch (setterKind) {
+            case CompoundSetter.FIELD:
+              irBuilder.addPrimitive(
+                  new ir.SetStatic(setter, result, sourceInformation));
+              return;
+            case CompoundSetter.SETTER:
+              irBuilder.buildStaticSetterSet(setter, result, sourceInformation);
+              return;
+            case CompoundSetter.INVALID:
+              irBuilder.buildStaticNoSuchMethod(
+                  new Selector.setter(new Name(setter.name, setter.library)),
+                  <ir.Primitive>[result],
+                  sourceInformation);
+              return;
+          }
+        });
   }
 
   @override
@@ -2939,52 +2893,64 @@
       CompoundSetter setterKind,
       ast.Node rhs,
       _) {
-    return translateSetIfNull(node, () {
-      switch (getterKind) {
-        case CompoundGetter.FIELD:
-          SourceInformation src = sourceInformationBuilder.buildGet(node);
-          return buildStaticFieldGet(getter, src);
-        case CompoundGetter.GETTER:
-          return buildStaticGetterGet(getter, node);
-        case CompoundGetter.METHOD:
-          return irBuilder.addPrimitive(new ir.GetStatic(getter,
-              isFinal: true));
-        case CompoundGetter.UNRESOLVED:
-          return irBuilder.buildStaticNoSuchMethod(
-              new Selector.getter(new Name(getter.name, getter.library)),
-              <ir.Primitive>[]);
-      }
-    }, rhs, (ir.Primitive result) {
-      switch (setterKind) {
-        case CompoundSetter.FIELD:
-          irBuilder.addPrimitive(new ir.SetStatic(setter, result));
-          return;
-        case CompoundSetter.SETTER:
-          irBuilder.buildStaticSetterSet(setter, result);
-          return;
-        case CompoundSetter.INVALID:
-          irBuilder.buildStaticNoSuchMethod(
-              new Selector.setter(new Name(setter.name, setter.library)),
-              <ir.Primitive>[result]);
-          return;
-      }
-    });
+    return translateSetIfNull(
+        node,
+        () {
+          SourceInformation sourceInformation =
+              sourceInformationBuilder.buildGet(node);
+          switch (getterKind) {
+            case CompoundGetter.FIELD:
+              return buildStaticFieldGet(getter, sourceInformation);
+            case CompoundGetter.GETTER:
+              return buildStaticGetterGet(getter, node, sourceInformation);
+            case CompoundGetter.METHOD:
+              return irBuilder.addPrimitive(new ir.GetStatic(getter,
+                  sourceInformation: sourceInformation, isFinal: true));
+            case CompoundGetter.UNRESOLVED:
+              return irBuilder.buildStaticNoSuchMethod(
+                  new Selector.getter(new Name(getter.name, getter.library)),
+                  <ir.Primitive>[],
+                  sourceInformation);
+          }
+        },
+        rhs,
+        (ir.Primitive result) {
+          SourceInformation sourceInformation =
+              sourceInformationBuilder.buildAssignment(node);
+          switch (setterKind) {
+            case CompoundSetter.FIELD:
+              irBuilder.addPrimitive(
+                  new ir.SetStatic(setter, result, sourceInformation));
+              return;
+            case CompoundSetter.SETTER:
+              irBuilder.buildStaticSetterSet(setter, result, sourceInformation);
+              return;
+            case CompoundSetter.INVALID:
+              irBuilder.buildStaticNoSuchMethod(
+                  new Selector.setter(new Name(setter.name, setter.library)),
+                  <ir.Primitive>[result],
+                  sourceInformation);
+              return;
+          }
+        });
   }
 
-  ir.Primitive buildSuperNoSuchGetter(Element element, TypeMask mask) {
+  ir.Primitive buildSuperNoSuchGetter(
+      Element element, TypeMask mask, SourceInformation sourceInformation) {
     return buildSuperNoSuchMethod(
         new Selector.getter(new Name(element.name, element.library)),
         mask,
-        const <ir.Primitive>[]);
+        const <ir.Primitive>[],
+        sourceInformation);
   }
 
-  ir.Primitive buildSuperNoSuchSetter(Element element,
-                                      TypeMask mask,
-                                      ir.Primitive value) {
+  ir.Primitive buildSuperNoSuchSetter(Element element, TypeMask mask,
+      ir.Primitive value, SourceInformation sourceInformation) {
     return buildSuperNoSuchMethod(
         new Selector.setter(new Name(element.name, element.library)),
         mask,
-        <ir.Primitive>[value]);
+        <ir.Primitive>[value],
+        sourceInformation);
   }
 
   @override
@@ -2996,33 +2962,43 @@
       CompoundSetter setterKind,
       CompoundRhs rhs,
       arg) {
-    return translateCompounds(node, () {
-      switch (getterKind) {
-        case CompoundGetter.FIELD:
-          return irBuilder.buildSuperFieldGet(getter);
-        case CompoundGetter.GETTER:
-          return irBuilder.buildSuperGetterGet(
-              getter, sourceInformationBuilder.buildGet(node));
-        case CompoundGetter.METHOD:
-          return irBuilder.buildSuperMethodGet(getter);
-        case CompoundGetter.UNRESOLVED:
-          return buildSuperNoSuchGetter(
-              getter, elements.getGetterTypeMaskInComplexSendSet(node));
-      }
-    }, rhs, (ir.Primitive result) {
-      switch (setterKind) {
-        case CompoundSetter.FIELD:
-          irBuilder.buildSuperFieldSet(setter, result);
-          return;
-        case CompoundSetter.SETTER:
-          irBuilder.buildSuperSetterSet(setter, result);
-          return;
-        case CompoundSetter.INVALID:
-          buildSuperNoSuchSetter(
-              setter, elements.getTypeMask(node), result);
-          return;
-      }
-    });
+    return translateCompounds(
+        node,
+        () {
+          switch (getterKind) {
+            case CompoundGetter.FIELD:
+              return irBuilder.buildSuperFieldGet(
+                  getter, sourceInformationBuilder.buildGet(node));
+            case CompoundGetter.GETTER:
+              return irBuilder.buildSuperGetterGet(
+                  getter, sourceInformationBuilder.buildGet(node));
+            case CompoundGetter.METHOD:
+              return irBuilder.buildSuperMethodGet(
+                  getter, sourceInformationBuilder.buildGet(node));
+            case CompoundGetter.UNRESOLVED:
+              return buildSuperNoSuchGetter(
+                  getter,
+                  elements.getGetterTypeMaskInComplexSendSet(node),
+                  sourceInformationBuilder.buildGet(node));
+          }
+        },
+        rhs,
+        (ir.Primitive result) {
+          switch (setterKind) {
+            case CompoundSetter.FIELD:
+              irBuilder.buildSuperFieldSet(setter, result,
+                  sourceInformationBuilder.buildAssignment(node));
+              return;
+            case CompoundSetter.SETTER:
+              irBuilder.buildSuperSetterSet(setter, result,
+                  sourceInformationBuilder.buildAssignment(node));
+              return;
+            case CompoundSetter.INVALID:
+              buildSuperNoSuchSetter(setter, elements.getTypeMask(node), result,
+                  sourceInformationBuilder.buildAssignment(node));
+              return;
+          }
+        });
   }
 
   @override
@@ -3034,90 +3010,92 @@
       CompoundSetter setterKind,
       ast.Node rhs,
       _) {
-    return translateSetIfNull(node, () {
-      switch (getterKind) {
-        case CompoundGetter.FIELD:
-          return irBuilder.buildSuperFieldGet(getter);
-        case CompoundGetter.GETTER:
-          return irBuilder.buildSuperGetterGet(
-              getter, sourceInformationBuilder.buildGet(node));
-        case CompoundGetter.METHOD:
-          return irBuilder.buildSuperMethodGet(getter);
-        case CompoundGetter.UNRESOLVED:
-          return buildSuperNoSuchGetter(
-              getter,
-              elements.getGetterTypeMaskInComplexSendSet(node));
-      }
-    }, rhs, (ir.Primitive result) {
-      switch (setterKind) {
-        case CompoundSetter.FIELD:
-          irBuilder.buildSuperFieldSet(setter, result);
-          return;
-        case CompoundSetter.SETTER:
-          irBuilder.buildSuperSetterSet(setter, result);
-          return;
-        case CompoundSetter.INVALID:
-          buildSuperNoSuchSetter(
-              setter, elements.getTypeMask(node), result);
-          return;
-      }
-    });
+    return translateSetIfNull(
+        node,
+        () {
+          switch (getterKind) {
+            case CompoundGetter.FIELD:
+              return irBuilder.buildSuperFieldGet(
+                  getter, sourceInformationBuilder.buildGet(node));
+            case CompoundGetter.GETTER:
+              return irBuilder.buildSuperGetterGet(
+                  getter, sourceInformationBuilder.buildGet(node));
+            case CompoundGetter.METHOD:
+              return irBuilder.buildSuperMethodGet(
+                  getter, sourceInformationBuilder.buildGet(node));
+            case CompoundGetter.UNRESOLVED:
+              return buildSuperNoSuchGetter(
+                  getter,
+                  elements.getGetterTypeMaskInComplexSendSet(node),
+                  sourceInformationBuilder.buildGet(node));
+          }
+        },
+        rhs,
+        (ir.Primitive result) {
+          switch (setterKind) {
+            case CompoundSetter.FIELD:
+              irBuilder.buildSuperFieldSet(setter, result,
+                  sourceInformationBuilder.buildAssignment(node));
+              return;
+            case CompoundSetter.SETTER:
+              irBuilder.buildSuperSetterSet(setter, result,
+                  sourceInformationBuilder.buildAssignment(node));
+              return;
+            case CompoundSetter.INVALID:
+              buildSuperNoSuchSetter(setter, elements.getTypeMask(node), result,
+                  sourceInformationBuilder.buildAssignment(node));
+              return;
+          }
+        });
   }
 
   @override
-  ir.Primitive handleTypeVariableTypeLiteralCompounds(
-      ast.SendSet node,
-      TypeVariableElement typeVariable,
-      CompoundRhs rhs,
-      arg) {
-    return translateCompounds(node, () {
-      return irBuilder.buildReifyTypeVariable(
-          typeVariable.type,
-          sourceInformationBuilder.buildGet(node));
-    }, rhs, (ir.Primitive value) {
-      // The binary operator will throw before this.
-    });
+  ir.Primitive handleTypeVariableTypeLiteralCompounds(ast.SendSet node,
+      TypeVariableElement typeVariable, CompoundRhs rhs, arg) {
+    return translateCompounds(
+        node,
+        () {
+          return irBuilder.buildReifyTypeVariable(
+              typeVariable.type, sourceInformationBuilder.buildGet(node));
+        },
+        rhs,
+        (ir.Primitive value) {
+          // The binary operator will throw before this.
+        });
   }
 
   @override
   ir.Primitive visitTypeVariableTypeLiteralSetIfNull(
-      ast.Send node,
-      TypeVariableElement element,
-      ast.Node rhs,
-      _) {
+      ast.Send node, TypeVariableElement element, ast.Node rhs, _) {
     // The type variable is never `null`.
-    return translateTypeVariableTypeLiteral(element,
-        sourceInformationBuilder.buildGet(node));
+    return translateTypeVariableTypeLiteral(
+        element, sourceInformationBuilder.buildGet(node));
   }
 
   @override
-  ir.Primitive handleIndexCompounds(
-      ast.SendSet node,
-      ast.Node receiver,
-      ast.Node index,
-      CompoundRhs rhs,
-      arg) {
+  ir.Primitive handleIndexCompounds(ast.SendSet node, ast.Node receiver,
+      ast.Node index, CompoundRhs rhs, arg) {
     ir.Primitive target = visit(receiver);
     ir.Primitive indexValue = visit(index);
-    return translateCompounds(node, () {
-      Selector selector = new Selector.index();
-      List<ir.Primitive> arguments = <ir.Primitive>[indexValue];
-      CallStructure callStructure =
-          normalizeDynamicArguments(selector.callStructure, arguments);
-      return irBuilder.buildDynamicInvocation(
-          target,
-          new Selector(selector.kind, selector.memberName, callStructure),
-          elements.getGetterTypeMaskInComplexSendSet(node),
-          arguments,
-          sourceInformation:
-          sourceInformationBuilder.buildCall(receiver, node));
-    }, rhs, (ir.Primitive result) {
-      irBuilder.buildDynamicIndexSet(
-          target,
-          elements.getTypeMask(node),
-          indexValue,
-          result);
-    });
+    return translateCompounds(
+        node,
+        () {
+          Selector selector = new Selector.index();
+          List<ir.Primitive> arguments = <ir.Primitive>[indexValue];
+          CallStructure callStructure =
+              normalizeDynamicArguments(selector.callStructure, arguments);
+          return irBuilder.buildDynamicInvocation(
+              target,
+              new Selector(selector.kind, selector.memberName, callStructure),
+              elements.getGetterTypeMaskInComplexSendSet(node),
+              arguments,
+              sourceInformationBuilder.buildCall(receiver, node));
+        },
+        rhs,
+        (ir.Primitive result) {
+          irBuilder.buildDynamicIndexSet(target, elements.getTypeMask(node),
+              indexValue, result, sourceInformationBuilder.buildIndexSet(node));
+        });
   }
 
   @override
@@ -3129,34 +3107,41 @@
       CompoundRhs rhs,
       arg,
       {bool isGetterValid,
-       bool isSetterValid}) {
+      bool isSetterValid}) {
     ir.Primitive indexValue = visit(index);
-    return translateCompounds(node, () {
-      return isGetterValid
-          ? irBuilder.buildSuperIndex(indexFunction, indexValue)
-          : buildSuperNoSuchMethod(
-              new Selector.index(),
-              elements.getGetterTypeMaskInComplexSendSet(node),
-              <ir.Primitive>[indexValue]);
-    }, rhs, (ir.Primitive result) {
-      if (isSetterValid) {
-        irBuilder.buildSuperIndexSet(indexSetFunction, indexValue, result);
-      } else {
-        buildSuperNoSuchMethod(
-            new Selector.indexSet(),
-            elements.getTypeMask(node),
-            <ir.Primitive>[indexValue, result]);
-      }
-    });
+    return translateCompounds(
+        node,
+        () {
+          if (isGetterValid) {
+            return irBuilder.buildSuperIndex(indexFunction, indexValue,
+                sourceInformationBuilder.buildIndex(node));
+          } else {
+            return buildSuperNoSuchMethod(
+                new Selector.index(),
+                elements.getGetterTypeMaskInComplexSendSet(node),
+                <ir.Primitive>[indexValue],
+                sourceInformationBuilder.buildIndex(node));
+          }
+        },
+        rhs,
+        (ir.Primitive result) {
+          if (isSetterValid) {
+            irBuilder.buildSuperIndexSet(indexSetFunction, indexValue, result,
+                sourceInformationBuilder.buildIndexSet(node));
+          } else {
+            buildSuperNoSuchMethod(
+                new Selector.indexSet(),
+                elements.getTypeMask(node),
+                <ir.Primitive>[indexValue, result],
+                sourceInformationBuilder.buildIndexSet(node));
+          }
+        });
   }
 
   /// Build code to handle foreign code, that is, native JavaScript code, or
   /// builtin values and operations of the backend.
-  ir.Primitive handleForeignCode(ast.Send node,
-      MethodElement function,
-      ast.NodeList argumentList,
-      CallStructure callStructure) {
-
+  ir.Primitive handleForeignCode(ast.Send node, MethodElement function,
+      ast.NodeList argumentList, CallStructure callStructure) {
     void validateArgumentCount({int minimum, int exactly}) {
       assert((minimum == null) != (exactly == null));
       int count = 0;
@@ -3178,15 +3163,14 @@
 
     /// Call a helper method from the isolate library. The isolate library uses
     /// its own isolate structure, that encapsulates dart2js's isolate.
-    ir.Primitive buildIsolateHelperInvocation(MethodElement element,
-        CallStructure callStructure) {
+    ir.Primitive buildIsolateHelperInvocation(
+        MethodElement element, CallStructure callStructure) {
       if (element == null) {
-        reporter.internalError(node,
-            'Isolate library and compiler mismatch.');
+        reporter.internalError(node, 'Isolate library and compiler mismatch.');
       }
       List<ir.Primitive> arguments = <ir.Primitive>[];
-      callStructure = translateStaticArguments(argumentList, element,
-          callStructure, arguments);
+      callStructure = translateStaticArguments(
+          argumentList, element, callStructure, arguments);
       Selector selector = new Selector.call(element.memberName, callStructure);
       return irBuilder.buildInvokeStatic(element, selector, arguments,
           sourceInformationBuilder.buildCall(node, node.selector));
@@ -3195,11 +3179,12 @@
     /// Lookup the value of the enum described by [node].
     getEnumValue(ast.Node node, EnumClassElement enumClass, List values) {
       Element element = elements[node];
-      if (element is! FieldElement || element.enclosingClass != enumClass) {
+      if (element is! EnumConstantElement ||
+          element.enclosingClass != enumClass) {
         internalError(node, 'expected a JsBuiltin enum value');
       }
-
-      int index = enumClass.enumValues.indexOf(element);
+      EnumConstantElement enumConstant = element;
+      int index = enumConstant.index;
       return values[index];
     }
 
@@ -3215,9 +3200,9 @@
       }
     }
 
-    Link<ast.Node> argumentNodes  = argumentList.nodes;
+    Link<ast.Node> argumentNodes = argumentList.nodes;
     NativeBehavior behavior =
-    compiler.enqueuer.resolution.nativeEnqueuer.getNativeBehaviorOf(node);
+        compiler.enqueuer.resolution.nativeEnqueuer.getNativeBehaviorOf(node);
     switch (function.name) {
       case 'JS':
         validateArgumentCount(minimum: 2);
@@ -3225,13 +3210,12 @@
         // which already have been analyzed by the resolver and can be retrieved
         // using [NativeBehavior]. We can ignore these arguments in the backend.
         List<ir.Primitive> arguments =
-        argumentNodes.skip(2).mapToList(visit, growable: false);
+            argumentNodes.skip(2).mapToList(visit, growable: false);
         if (behavior.codeTemplate.positionalArgumentCount != arguments.length) {
-          reporter.reportErrorMessage(
-              node, MessageKind.GENERIC,
-              {'text':
-              'Mismatch between number of placeholders'
-                  ' and number of arguments.'});
+          reporter.reportErrorMessage(node, MessageKind.GENERIC, {
+            'text': 'Mismatch between number of placeholders'
+                ' and number of arguments.'
+          });
           return irBuilder.buildNullConstant();
         }
 
@@ -3241,7 +3225,7 @@
         }
 
         return irBuilder.buildForeignCode(behavior.codeTemplate, arguments,
-            behavior);
+            behavior, sourceInformationBuilder.buildForeignCode(node));
 
       case 'DART_CLOSURE_TO_JS':
       // TODO(ahe): This should probably take care to wrap the closure in
@@ -3252,44 +3236,46 @@
         ast.Node argument = node.arguments.single;
         FunctionElement closure = elements[argument].implementation;
         if (!Elements.isStaticOrTopLevelFunction(closure)) {
-          internalError(argument,
-              'only static or toplevel function supported');
+          internalError(argument, 'only static or toplevel function supported');
         }
         if (closure.functionSignature.hasOptionalParameters) {
-          internalError(argument,
-              'closures with optional parameters not supported');
+          internalError(
+              argument, 'closures with optional parameters not supported');
         }
         return irBuilder.buildForeignCode(
             js.js.expressionTemplateYielding(
                 backend.emitter.staticFunctionAccess(closure)),
             <ir.Primitive>[],
             NativeBehavior.PURE,
+            sourceInformationBuilder.buildForeignCode(node),
             dependency: closure);
 
       case 'JS_BUILTIN':
-      // The first argument is a description of the type and effect of the
-      // builtin, which has already been analyzed in the frontend.  The second
-      // argument must be a [JsBuiltin] value.  All other arguments are
-      // values used by the JavaScript template that is associated with the
-      // builtin.
+        // The first argument is a description of the type and effect of the
+        // builtin, which has already been analyzed in the frontend.  The second
+        // argument must be a [JsBuiltin] value.  All other arguments are
+        // values used by the JavaScript template that is associated with the
+        // builtin.
         validateArgumentCount(minimum: 2);
 
         ast.Node builtin = argumentNodes.tail.head;
-        JsBuiltin value = getEnumValue(builtin, helpers.jsBuiltinEnum,
-            JsBuiltin.values);
+        JsBuiltin value =
+            getEnumValue(builtin, helpers.jsBuiltinEnum, JsBuiltin.values);
         js.Template template = backend.emitter.builtinTemplateFor(value);
         List<ir.Primitive> arguments =
-        argumentNodes.skip(2).mapToList(visit, growable: false);
-        return irBuilder.buildForeignCode(template, arguments, behavior);
+            argumentNodes.skip(2).mapToList(visit, growable: false);
+        return irBuilder.buildForeignCode(template, arguments, behavior,
+            sourceInformationBuilder.buildForeignCode(node));
 
       case 'JS_EMBEDDED_GLOBAL':
         validateArgumentCount(exactly: 2);
 
         String name = expectStringConstant(argumentNodes.tail.head);
         js.Expression access =
-        backend.emitter.generateEmbeddedGlobalAccess(name);
+            backend.emitter.generateEmbeddedGlobalAccess(name);
         js.Template template = js.js.expressionTemplateYielding(access);
-        return irBuilder.buildForeignCode(template, <ir.Primitive>[], behavior);
+        return irBuilder.buildForeignCode(template, <ir.Primitive>[], behavior,
+            sourceInformationBuilder.buildForeignCode(node));
 
       case 'JS_INTERCEPTOR_CONSTANT':
         validateArgumentCount(exactly: 1);
@@ -3299,7 +3285,7 @@
         if (argumentValue is ir.Constant && argumentValue.value.isType) {
           TypeConstantValue constant = argumentValue.value;
           ConstantValue interceptorValue =
-          new InterceptorConstantValue(constant.representedType);
+              new InterceptorConstantValue(constant.representedType);
           return irBuilder.buildConstant(interceptorValue);
         }
         return internalError(argument, 'expected Type as argument');
@@ -3311,12 +3297,11 @@
         validateArgumentCount(exactly: 1);
 
         ast.Node argument = argumentNodes.head;
-        JsGetName id = getEnumValue(argument, helpers.jsGetNameEnum,
-            JsGetName.values);
+        JsGetName id =
+            getEnumValue(argument, helpers.jsGetNameEnum, JsGetName.values);
         js.Name name = backend.namer.getNameForJsGetName(argument, id);
-        ConstantValue nameConstant =
-        new SyntheticConstantValue(SyntheticConstantKind.NAME,
-            js.js.quoteName(name));
+        ConstantValue nameConstant = new SyntheticConstantValue(
+            SyntheticConstantKind.NAME, js.js.quoteName(name));
 
         return irBuilder.buildConstant(nameConstant);
 
@@ -3330,7 +3315,7 @@
             value = backend.mustRetainMetadata;
             break;
           case 'USE_CONTENT_SECURITY_POLICY':
-            value = compiler.useContentSecurityPolicy;
+            value = compiler.options.useContentSecurityPolicy;
             break;
           default:
             internalError(node, 'Unknown internal flag "$name".');
@@ -3340,7 +3325,8 @@
       case 'JS_STRING_CONCAT':
         validateArgumentCount(exactly: 2);
         List<ir.Primitive> arguments = argumentNodes.mapToList(visit);
-        return irBuilder.buildStringConcatenation(arguments);
+        return irBuilder.buildStringConcatenation(
+            arguments, sourceInformationBuilder.buildForeignCode(node));
 
       case 'JS_CURRENT_ISOLATE_CONTEXT':
         validateArgumentCount(exactly: 0);
@@ -3350,8 +3336,8 @@
           // to fetch the current isolate.
           continue getStaticState;
         }
-        return buildIsolateHelperInvocation(helpers.currentIsolate,
-            CallStructure.NO_ARGS);
+        return buildIsolateHelperInvocation(
+            helpers.currentIsolate, CallStructure.NO_ARGS);
 
       getStaticState: case 'JS_GET_STATIC_STATE':
         validateArgumentCount(exactly: 0);
@@ -3359,7 +3345,8 @@
         return irBuilder.buildForeignCode(
             js.js.parseForeignJS(backend.namer.staticStateHolder),
             const <ir.Primitive>[],
-            NativeBehavior.DEPENDS_OTHER);
+            NativeBehavior.DEPENDS_OTHER,
+            sourceInformationBuilder.buildForeignCode(node));
 
       case 'JS_SET_STATIC_STATE':
         validateArgumentCount(exactly: 1);
@@ -3369,18 +3356,22 @@
         return irBuilder.buildForeignCode(
             js.js.parseForeignJS("$isolateName = #"),
             <ir.Primitive>[value],
-            NativeBehavior.CHANGES_OTHER);
+            NativeBehavior.CHANGES_OTHER,
+            sourceInformationBuilder.buildForeignCode(node));
 
       case 'JS_CALL_IN_ISOLATE':
         validateArgumentCount(exactly: 2);
 
         if (!compiler.hasIsolateSupport) {
           ir.Primitive closure = visit(argumentNodes.tail.head);
-          return irBuilder.buildCallInvocation(closure, CallStructure.NO_ARGS,
-              const <ir.Primitive>[]);
+          return irBuilder.buildCallInvocation(
+              closure,
+              CallStructure.NO_ARGS,
+              const <ir.Primitive>[],
+              sourceInformationBuilder.buildForeignCode(node));
         }
-        return buildIsolateHelperInvocation(helpers.callInIsolate,
-            CallStructure.TWO_ARGS);
+        return buildIsolateHelperInvocation(
+            helpers.callInIsolate, CallStructure.TWO_ARGS);
 
       default:
         return giveup(node, 'unplemented native construct: ${function.name}');
@@ -3411,7 +3402,8 @@
       ir.Primitive value = visit(node);
       accumulator.add(irBuilder.buildStaticFunctionInvocation(
           helpers.stringInterpolationHelper,
-          <ir.Primitive>[value]));
+          <ir.Primitive>[value],
+          sourceInformationBuilder.buildStringInterpolation(node)));
     }
   }
 
@@ -3419,20 +3411,21 @@
     assert(irBuilder.isOpen);
     List<ir.Primitive> parts = <ir.Primitive>[];
     buildStringParts(node, parts);
-    return irBuilder.buildStringConcatenation(parts);
+    return irBuilder.buildStringConcatenation(
+        parts, sourceInformationBuilder.buildStringInterpolation(node));
   }
 
   ir.Primitive visitStringInterpolation(ast.StringInterpolation node) {
     assert(irBuilder.isOpen);
     List<ir.Primitive> parts = <ir.Primitive>[];
     buildStringParts(node, parts);
-    return irBuilder.buildStringConcatenation(parts);
+    return irBuilder.buildStringConcatenation(
+        parts, sourceInformationBuilder.buildStringInterpolation(node));
   }
 
   ir.Primitive translateConstant(ast.Node node) {
     assert(irBuilder.isOpen);
-    return irBuilder.buildConstant(
-        getConstantForNode(node),
+    return irBuilder.buildConstant(getConstantForNode(node),
         sourceInformation: sourceInformationBuilder.buildGet(node));
   }
 
@@ -3443,30 +3436,28 @@
     return irBuilder.buildNonTailThrow(visit(node.expression));
   }
 
-  ir.Primitive buildSuperNoSuchMethod(Selector selector,
-      TypeMask mask,
-      List<ir.Primitive> arguments) {
+  ir.Primitive buildSuperNoSuchMethod(Selector selector, TypeMask mask,
+      List<ir.Primitive> arguments, SourceInformation sourceInformation) {
     ClassElement cls = elements.analyzedElement.enclosingClass;
     MethodElement element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
     if (!Selectors.noSuchMethod_.signatureApplies(element)) {
-      element = compiler.coreClasses.objectClass.lookupMember(
-          Identifiers.noSuchMethod_);
+      element = compiler.coreClasses.objectClass
+          .lookupMember(Identifiers.noSuchMethod_);
     }
     return irBuilder.buildSuperMethodInvocation(
         element,
         Selectors.noSuchMethod_.callStructure,
-        [irBuilder.buildInvocationMirror(selector, arguments)]);
+        [irBuilder.buildInvocationMirror(selector, arguments)],
+        sourceInformation);
   }
 
   @override
-  ir.Primitive visitUnresolvedCompound(
-      ast.Send node,
-      Element element,
-      op.AssignmentOperator operator,
-      ast.Node rhs, _) {
-    // TODO(asgerf): What is unresolved? The getter and/or the setter?
-    //               If it was the setter, we must evaluate the right-hand side.
-    return irBuilder.buildStaticNoSuchMethod(elements.getSelector(node), []);
+  ir.Primitive visitUnresolvedCompound(ast.Send node, Element element,
+      op.AssignmentOperator operator, ast.Node rhs, _) {
+    return irBuilder.buildStaticNoSuchMethod(
+        new Selector.getter(new Name(element.name, element.library)),
+        [],
+        sourceInformationBuilder.buildGet(node));
   }
 
   @override
@@ -3475,13 +3466,13 @@
       Element element,
       DartType type,
       ast.NodeList arguments,
-      Selector selector, _) {
+      Selector selector,
+      _) {
     // If the class is missing it's a runtime error.
     ir.Primitive message =
         irBuilder.buildStringConstant("Unresolved class: '${element.name}'");
-    return irBuilder.buildStaticFunctionInvocation(
-        helpers.throwRuntimeError,
-        <ir.Primitive>[message]);
+    return irBuilder.buildStaticFunctionInvocation(helpers.throwRuntimeError,
+        <ir.Primitive>[message], sourceInformationBuilder.buildNew(node));
   }
 
   @override
@@ -3490,14 +3481,16 @@
       Element constructor,
       DartType type,
       ast.NodeList argumentsNode,
-      Selector selector, _) {
+      Selector selector,
+      _) {
     // If the class is there but the constructor is missing, it's an NSM error.
     List<ir.Primitive> arguments = <ir.Primitive>[];
     CallStructure callStructure = translateDynamicArguments(
         argumentsNode, selector.callStructure, arguments);
     return irBuilder.buildStaticNoSuchMethod(
         new Selector(selector.kind, selector.memberName, callStructure),
-        arguments);
+        arguments,
+        sourceInformationBuilder.buildNew(node));
   }
 
   @override
@@ -3506,38 +3499,40 @@
       ConstructorElement constructor,
       DartType type,
       ast.NodeList argumentsNode,
-      CallStructure callStructure, _) {
+      CallStructure callStructure,
+      _) {
     List<ir.Primitive> arguments = <ir.Primitive>[];
     callStructure =
         translateDynamicArguments(argumentsNode, callStructure, arguments);
     return irBuilder.buildStaticNoSuchMethod(
-        new Selector.call(constructor.memberName, callStructure), arguments);
+        new Selector.call(constructor.memberName, callStructure),
+        arguments,
+        sourceInformationBuilder.buildNew(node));
   }
 
   @override
-  ir.Primitive visitUnresolvedGet(
-      ast.Send node,
-      Element element, _) {
-    return irBuilder.buildStaticNoSuchMethod(elements.getSelector(node), []);
+  ir.Primitive visitUnresolvedGet(ast.Send node, Element element, _) {
+    return irBuilder.buildStaticNoSuchMethod(elements.getSelector(node), [],
+        sourceInformationBuilder.buildGet(node));
   }
 
   @override
-  ir.Primitive visitUnresolvedInvoke(
-      ast.Send node,
-      Element element,
-      ast.NodeList arguments,
-      Selector selector, _) {
-    return irBuilder.buildStaticNoSuchMethod(elements.getSelector(node),
-        arguments.nodes.mapToList(visit));
+  ir.Primitive visitUnresolvedInvoke(ast.Send node, Element element,
+      ast.NodeList arguments, Selector selector, _) {
+    return irBuilder.buildStaticNoSuchMethod(
+        elements.getSelector(node),
+        arguments.nodes.mapToList(visit),
+        sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   @override
   ir.Primitive visitUnresolvedRedirectingFactoryConstructorInvoke(
-       ast.NewExpression node,
-       ConstructorElement constructor,
-       InterfaceType type,
-       ast.NodeList argumentsNode,
-       CallStructure callStructure, _) {
+      ast.NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      ast.NodeList argumentsNode,
+      CallStructure callStructure,
+      _) {
     String nameString = Elements.reconstructConstructorName(constructor);
     Name name = new Name(nameString, constructor.library);
     List<ir.Primitive> arguments = <ir.Primitive>[];
@@ -3545,47 +3540,46 @@
         translateDynamicArguments(argumentsNode, callStructure, arguments);
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.call(name, callStructure),
-        arguments);
+        arguments,
+        sourceInformationBuilder.buildNew(node));
   }
 
   @override
   ir.Primitive visitUnresolvedSet(
-      ast.Send node,
-      Element element,
-      ast.Node rhs, _) {
+      ast.Send node, Element element, ast.Node rhs, _) {
     return irBuilder.buildStaticNoSuchMethod(elements.getSelector(node),
-        [visit(rhs)]);
+        [visit(rhs)], sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitUnresolvedSuperIndex(
-      ast.Send node,
-      Element function,
-      ast.Node index, _) {
+      ast.Send node, Element function, ast.Node index, _) {
     // Assume the index getter is missing.
     return buildSuperNoSuchMethod(
-        new Selector.index(), elements.getTypeMask(node), [visit(index)]);
+        new Selector.index(),
+        elements.getTypeMask(node),
+        [visit(index)],
+        sourceInformationBuilder.buildIndex(node));
   }
 
   @override
-  ir.Primitive visitUnresolvedSuperBinary(
-      ast.Send node,
-      Element element,
-      op.BinaryOperator operator,
-      ast.Node argument, _) {
+  ir.Primitive visitUnresolvedSuperBinary(ast.Send node, Element element,
+      op.BinaryOperator operator, ast.Node argument, _) {
     return buildSuperNoSuchMethod(
         elements.getSelector(node),
         elements.getTypeMask(node),
-        [visit(argument)]);
+        [visit(argument)],
+        sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   @override
   ir.Primitive visitUnresolvedSuperUnary(
-      ast.Send node,
-      op.UnaryOperator operator,
-      Element element, _) {
+      ast.Send node, op.UnaryOperator operator, Element element, _) {
     return buildSuperNoSuchMethod(
-        elements.getSelector(node), elements.getTypeMask(node), []);
+        elements.getSelector(node),
+        elements.getTypeMask(node),
+        [],
+        sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   @override
@@ -3600,44 +3594,42 @@
 
   @override
   ir.Primitive visitClassTypeLiteralSet(
-      ast.SendSet node,
-      TypeConstantExpression constant,
-      ast.Node rhs, _) {
+      ast.SendSet node, TypeConstantExpression constant, ast.Node rhs, _) {
     InterfaceType type = constant.type;
     ClassElement element = type.element;
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.setter(element.memberName),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitTypedefTypeLiteralSet(
-      ast.SendSet node,
-      TypeConstantExpression constant,
-      ast.Node rhs, _) {
+      ast.SendSet node, TypeConstantExpression constant, ast.Node rhs, _) {
     TypedefType type = constant.type;
     TypedefElement element = type.element;
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.setter(element.memberName),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitTypeVariableTypeLiteralSet(
-      ast.SendSet node,
-      TypeVariableElement element,
-      ast.Node rhs, _) {
+      ast.SendSet node, TypeVariableElement element, ast.Node rhs, _) {
     return irBuilder.buildStaticNoSuchMethod(
-        new Selector.setter(element.memberName), [visit(rhs)]);
+        new Selector.setter(element.memberName),
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitDynamicTypeLiteralSet(
-      ast.SendSet node,
-      ConstantExpression constant,
-      ast.Node rhs, _) {
+      ast.SendSet node, ConstantExpression constant, ast.Node rhs, _) {
     return irBuilder.buildStaticNoSuchMethod(
-        new Selector.setter(Names.dynamic_), [visit(rhs)]);
+        new Selector.setter(Names.dynamic_),
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
@@ -3646,145 +3638,129 @@
       ConstructorElement element,
       InterfaceType type,
       ast.NodeList arguments,
-      CallStructure callStructure, _) {
+      CallStructure callStructure,
+      _) {
     for (ast.Node argument in arguments) visit(argument);
     ir.Primitive name =
         irBuilder.buildStringConstant(element.enclosingClass.name);
     return irBuilder.buildStaticFunctionInvocation(
         helpers.throwAbstractClassInstantiationError,
-        <ir.Primitive>[name]);
+        <ir.Primitive>[name],
+        sourceInformationBuilder.buildNew(node));
   }
 
   @override
   ir.Primitive handleFinalStaticFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs, _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     // TODO(asgerf): Include class name somehow for static class members?
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.setter(field.memberName),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitFinalSuperFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs, _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     return buildSuperNoSuchMethod(
         new Selector.setter(field.memberName),
         elements.getTypeMask(node),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive handleImmutableLocalSet(
-      ast.SendSet node,
-      LocalElement local,
-      ast.Node rhs, _) {
+      ast.SendSet node, LocalElement local, ast.Node rhs, _) {
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.setter(new Name(local.name, local.library)),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive handleStaticFunctionSet(
-      ast.Send node,
-      MethodElement function,
-      ast.Node rhs,
-      _) {
+      ast.Send node, MethodElement function, ast.Node rhs, _) {
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.setter(function.memberName),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive handleStaticGetterSet(
-      ast.SendSet node,
-      GetterElement getter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, GetterElement getter, ast.Node rhs, _) {
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.setter(getter.memberName),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
-  ir.Primitive handleStaticSetterGet(
-      ast.Send node,
-      SetterElement setter,
-      _) {
+  ir.Primitive handleStaticSetterGet(ast.Send node, SetterElement setter, _) {
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.getter(setter.memberName),
-        []);
+        [],
+        sourceInformationBuilder.buildGet(node));
   }
 
   @override
-  ir.Primitive handleStaticSetterInvoke(
-      ast.Send node,
-      SetterElement setter,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure, _) {
+  ir.Primitive handleStaticSetterInvoke(ast.Send node, SetterElement setter,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
     // Translate as a method call.
     List<ir.Primitive> arguments = argumentsNode.nodes.mapToList(visit);
     return irBuilder.buildStaticNoSuchMethod(
         new Selector.call(setter.memberName, callStructure),
-        arguments);
+        arguments,
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   @override
   ir.Primitive visitSuperGetterSet(
-      ast.SendSet node,
-      GetterElement getter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, GetterElement getter, ast.Node rhs, _) {
     return buildSuperNoSuchMethod(
         new Selector.setter(getter.memberName),
         elements.getTypeMask(node),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
   ir.Primitive visitSuperMethodSet(
-      ast.Send node,
-      MethodElement method,
-      ast.Node rhs,
-      _) {
+      ast.Send node, MethodElement method, ast.Node rhs, _) {
     return buildSuperNoSuchMethod(
         new Selector.setter(method.memberName),
         elements.getTypeMask(node),
-        [visit(rhs)]);
+        [visit(rhs)],
+        sourceInformationBuilder.buildAssignment(node));
   }
 
   @override
-  ir.Primitive visitSuperSetterGet(
-      ast.Send node,
-      SetterElement setter, _) {
+  ir.Primitive visitSuperSetterGet(ast.Send node, SetterElement setter, _) {
     return buildSuperNoSuchMethod(
-        new Selector.setter(setter.memberName),
+        new Selector.getter(setter.memberName),
         elements.getTypeMask(node),
-        []);
+        [],
+        sourceInformationBuilder.buildGet(node));
   }
 
   @override
-  ir.Primitive visitSuperSetterInvoke(
-      ast.Send node,
-      SetterElement setter,
-      ast.NodeList argumentsNode,
-      CallStructure callStructure, _) {
+  ir.Primitive visitSuperSetterInvoke(ast.Send node, SetterElement setter,
+      ast.NodeList argumentsNode, CallStructure callStructure, _) {
     List<ir.Primitive> arguments = <ir.Primitive>[];
     callStructure =
         translateDynamicArguments(argumentsNode, callStructure, arguments);
     return buildSuperNoSuchMethod(
         new Selector.call(setter.memberName, callStructure),
         elements.getTypeMask(node),
-        arguments);
+        arguments,
+        sourceInformationBuilder.buildCall(node, argumentsNode));
   }
 
   ir.FunctionDefinition nullIfGiveup(ir.FunctionDefinition action()) {
     try {
       return action();
-    } catch(e) {
+    } catch (e) {
       if (e == ABORT_IRNODE_BUILDER) {
         return null;
       }
@@ -4013,7 +3989,7 @@
   }
 
   TypeMask getTypeMaskForNativeFunction(FunctionElement function) {
-    return  _compiler.typesTask.getGuaranteedReturnTypeOfElement(function);
+    return _compiler.typesTask.getGuaranteedReturnTypeOfElement(function);
   }
 
   FieldElement locateSingleField(Selector selector, TypeMask type) {
@@ -4033,20 +4009,20 @@
   }
 
   bool get trustJSInteropTypeAnnotations =>
-      _compiler.trustJSInteropTypeAnnotations;
+      _compiler.options.trustJSInteropTypeAnnotations;
 
   bool isNative(ClassElement element) => _backend.isNative(element);
 
   bool isJsInterop(FunctionElement element) => _backend.isJsInterop(element);
 
   bool isJsInteropAnonymous(FunctionElement element) =>
-    _backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass);
+      _backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass);
 
   String getJsInteropTargetPath(FunctionElement element) {
     return '${_backend.namer.fixedBackendPath(element)}.'
-      '${_backend.getFixedBackendName(element)}';
+        '${_backend.nativeData.getFixedBackendName(element)}';
   }
 
   DartType get jsJavascriptObjectType =>
-    _backend.helpers.jsJavaScriptObjectClass.thisType;
+      _backend.helpers.jsJavaScriptObjectClass.thisType;
 }
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_integrity.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_integrity.dart
index 8fb65a2..cee7a1e 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_integrity.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_integrity.dart
@@ -27,7 +27,6 @@
 /// - Each reference object occurs only once in the IR (no sharing).
 ///
 class CheckCpsIntegrity extends TrampolineRecursiveVisitor {
-
   FunctionDefinition topLevelNode;
   final Map<Definition, ScopeType> inScope = <Definition, ScopeType>{};
   final List<Definition> definitions = [];
@@ -40,13 +39,16 @@
     int i = 0;
     for (Reference ref = def.firstRef; ref != null; ref = ref.next) {
       if (ref.definition != def) {
-        error('Reference to ${ref.definition} found in '
-              'reference chain for $def', def);
+        error(
+            'Reference to ${ref.definition} found in '
+            'reference chain for $def',
+            def);
       }
       if (ref == anchor) {
         error('Cyclic reference chain for $def', def);
       }
-      if (i & ++i == 0) { // Move the anchor every 2^Nth step.
+      if (i & ++i == 0) {
+        // Move the anchor every 2^Nth step.
         anchor = ref;
       }
     }
@@ -134,9 +136,13 @@
 
   @override
   visitFunctionDefinition(FunctionDefinition node) {
-    if (node.thisParameter != null) {
-      handleDeclaration(node.thisParameter);
-      enterScope([node.thisParameter]);
+    if (node.interceptorParameter != null) {
+      handleDeclaration(node.interceptorParameter);
+      enterScope([node.interceptorParameter]);
+    }
+    if (node.receiverParameter != null) {
+      handleDeclaration(node.receiverParameter);
+      enterScope([node.receiverParameter]);
     }
     node.parameters.forEach(handleDeclaration);
     enterScope(node.parameters);
@@ -181,6 +187,19 @@
     }
   }
 
+  @override
+  processInvokeMethod(InvokeMethod node) {
+    if (node.callingConvention == CallingConvention.Intercepted) {
+      if (node.interceptorRef == null) {
+        error('No interceptor on intercepted call', node);
+      }
+    } else {
+      if (node.interceptorRef != null) {
+        error('Interceptor on call with ${node.callingConvention}', node);
+      }
+    }
+  }
+
   void checkReferenceChain(Definition def) {
     Reference previous = null;
     for (Reference ref = def.firstRef; ref != null; ref = ref.next) {
@@ -208,9 +227,9 @@
       sexpr = '(Set DUMP_IR flag to enable SExpr dump)';
     }
     throw 'CPS integrity violation\n'
-          'After \'$previousPass\' on ${topLevelNode.element}\n'
-          '$message\n\n'
-          '$sexpr\n';
+        'After \'$previousPass\' on ${topLevelNode.element}\n'
+        '$message\n\n'
+        '$sexpr\n';
   }
 }
 
@@ -243,7 +262,7 @@
     _worklist.add(node);
     if (node.parent != _parent) {
       error('Parent pointer on $node is ${node.parent} but should be $_parent',
-            node);
+          node);
     }
   }
 
@@ -251,7 +270,7 @@
   processReference(Reference node) {
     if (node.parent != _parent) {
       error('Parent pointer on $node is ${node.parent} but should be $_parent',
-            node);
+          node);
     }
   }
 }
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
index 61a5ddd..3e82f93 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -12,7 +12,6 @@
 import '../io/source_information.dart' show SourceInformation;
 import '../types/types.dart' show TypeMask;
 import '../universe/selector.dart' show Selector;
-import '../universe/side_effects.dart';
 
 import 'builtin_operator.dart';
 export 'builtin_operator.dart';
@@ -65,14 +64,15 @@
   ///
   /// Avoid using nodes as keys if there is a chance that two keys are the
   /// same node.
-  String debugString([Map annotations]) {
+  String debugString([Map annotations = const {}]) {
     return new SExpressionStringifier()
         .withAnnotations(annotations)
+        .withTypes()
         .visit(this);
   }
 
   /// Prints the result of [debugString].
-  void debugPrint([Map annotations]) {
+  void debugPrint([Map annotations = const {}]) {
     print(debugString(annotations));
   }
 }
@@ -416,18 +416,22 @@
 /// continuation to invoke when returning from the function.
 class FunctionDefinition extends InteriorNode {
   final ExecutableElement element;
-  final Parameter thisParameter;
+  Parameter interceptorParameter;
+  final Parameter receiverParameter;
   final List<Parameter> parameters;
   final Continuation returnContinuation;
+  final SourceInformation sourceInformation;
   Expression body;
 
-  FunctionDefinition(this.element, this.thisParameter, this.parameters,
-      this.returnContinuation, this.body);
+  FunctionDefinition(this.element, this.receiverParameter, this.parameters,
+      this.returnContinuation, this.body,
+      {this.interceptorParameter, this.sourceInformation});
 
   accept(BlockVisitor visitor) => visitor.visitFunctionDefinition(this);
 
   void setParentPointers() {
-    if (thisParameter != null) thisParameter.parent = this;
+    if (interceptorParameter != null) interceptorParameter.parent = this;
+    if (receiverParameter != null) receiverParameter.parent = this;
     _setParentsOnNodes(parameters, this);
     returnContinuation.parent = this;
     if (body != null) body.parent = this;
@@ -491,6 +495,9 @@
 ///
 /// This class defines the common interface of function invocations.
 abstract class InvocationPrimitive extends UnsafePrimitive {
+  Reference<Primitive> get interceptorRef => null;
+  Primitive get interceptor => interceptorRef?.definition;
+
   Reference<Primitive> get receiverRef => null;
   Primitive get receiver => receiverRef?.definition;
 
@@ -498,30 +505,8 @@
   Primitive argument(int n) => argumentRefs[n].definition;
   Iterable<Primitive> get arguments => _dereferenceList(argumentRefs);
 
-  Reference<Primitive> get dartReceiverRef => null;
-  Primitive get dartReceiver => dartReceiverRef?.definition;
-
   CallingConvention get callingConvention => CallingConvention.Normal;
 
-  Reference<Primitive> dartArgumentReference(int n) {
-    switch (callingConvention) {
-      case CallingConvention.Normal:
-      case CallingConvention.OneShotIntercepted:
-        return argumentRefs[n];
-
-      case CallingConvention.Intercepted:
-      case CallingConvention.DummyIntercepted:
-        return argumentRefs[n + 1];
-    }
-  }
-
-  Primitive dartArgument(int n) => dartArgumentReference(n).definition;
-
-  int get dartArgumentsLength =>
-      argumentRefs.length -
-      (callingConvention == CallingConvention.Intercepted ||
-          callingConvention == CallingConvention.DummyIntercepted ? 1 : 0);
-
   SourceInformation get sourceInformation;
 }
 
@@ -565,35 +550,56 @@
 /// The [selector] records the names of named arguments. The value of named
 /// arguments occur at the end of the [arguments] list, in normalized order.
 class InvokeMethod extends InvocationPrimitive {
+  Reference<Primitive> interceptorRef;
   Reference<Primitive> receiverRef;
   Selector selector;
   TypeMask mask;
   final List<Reference<Primitive>> argumentRefs;
   final SourceInformation sourceInformation;
+  CallingConvention _callingConvention;
 
-  CallingConvention callingConvention = CallingConvention.Normal;
-
-  Reference<Primitive> get dartReceiverRef {
-    return callingConvention == CallingConvention.Intercepted
-        ? argumentRefs[0]
-        : receiverRef;
-  }
+  CallingConvention get callingConvention => _callingConvention;
 
   InvokeMethod(
       Primitive receiver, this.selector, this.mask, List<Primitive> arguments,
       {this.sourceInformation,
-      this.callingConvention: CallingConvention.Normal})
+      CallingConvention callingConvention,
+      Primitive interceptor})
       : this.receiverRef = new Reference<Primitive>(receiver),
-        this.argumentRefs = _referenceList(arguments);
+        this.argumentRefs = _referenceList(arguments),
+        this.interceptorRef = _optionalReference(interceptor),
+        this._callingConvention = callingConvention ??
+            (interceptor != null
+                ? CallingConvention.Intercepted
+                : CallingConvention.Normal);
 
   accept(Visitor visitor) => visitor.visitInvokeMethod(this);
 
   bool get hasValue => true;
 
   void setParentPointers() {
+    interceptorRef?.parent = this;
     receiverRef.parent = this;
     _setParentsOnList(argumentRefs, this);
   }
+
+  void makeIntercepted(Primitive interceptor) {
+    interceptorRef?.unlink();
+    interceptorRef = new Reference<Primitive>(interceptor)..parent = this;
+    _callingConvention = CallingConvention.Intercepted;
+  }
+
+  void makeOneShotIntercepted() {
+    interceptorRef?.unlink();
+    interceptorRef = null;
+    _callingConvention = CallingConvention.OneShotIntercepted;
+  }
+
+  void makeDummyIntercepted() {
+    interceptorRef?.unlink();
+    interceptorRef = null;
+    _callingConvention = CallingConvention.DummyIntercepted;
+  }
 }
 
 /// Invoke [target] on [receiver], bypassing dispatch and override semantics.
@@ -616,37 +622,37 @@
 /// All optional arguments declared by [target] are passed in explicitly, and
 /// occur at the end of [arguments] list, in normalized order.
 class InvokeMethodDirectly extends InvocationPrimitive {
+  Reference<Primitive> interceptorRef;
   Reference<Primitive> receiverRef;
   final FunctionElement target;
   final Selector selector;
   final List<Reference<Primitive>> argumentRefs;
   final SourceInformation sourceInformation;
 
-  CallingConvention callingConvention;
-
-  Reference<Primitive> get dartReceiverRef {
-    return callingConvention == CallingConvention.Intercepted
-        ? argumentRefs[0]
-        : receiverRef;
-  }
-
   InvokeMethodDirectly(Primitive receiver, this.target, this.selector,
       List<Primitive> arguments, this.sourceInformation,
-      {this.callingConvention: CallingConvention.Normal})
+      {Primitive interceptor})
       : this.receiverRef = new Reference<Primitive>(receiver),
-        this.argumentRefs = _referenceList(arguments);
+        this.argumentRefs = _referenceList(arguments),
+        this.interceptorRef = _optionalReference(interceptor);
 
   accept(Visitor visitor) => visitor.visitInvokeMethodDirectly(this);
 
   bool get hasValue => true;
 
   void setParentPointers() {
+    interceptorRef?.parent = this;
     receiverRef.parent = this;
     _setParentsOnList(argumentRefs, this);
   }
 
   bool get isConstructorBodyCall => target is ConstructorBodyElement;
   bool get isTearOff => selector.isGetter && !target.isGetter;
+
+  void makeIntercepted(Primitive interceptor) {
+    interceptorRef?.unlink();
+    interceptorRef = new Reference<Primitive>(interceptor)..parent = this;
+  }
 }
 
 /// Non-const call to a constructor.
@@ -1101,10 +1107,11 @@
 ///
 class GetMutable extends Primitive {
   final Reference<MutableVariable> variableRef;
+  final SourceInformation sourceInformation;
 
   MutableVariable get variable => variableRef.definition;
 
-  GetMutable(MutableVariable variable)
+  GetMutable(MutableVariable variable, {this.sourceInformation})
       : this.variableRef = new Reference<MutableVariable>(variable);
 
   accept(Visitor visitor) => visitor.visitGetMutable(this);
@@ -1127,11 +1134,13 @@
 class SetMutable extends Primitive {
   final Reference<MutableVariable> variableRef;
   final Reference<Primitive> valueRef;
+  final SourceInformation sourceInformation;
 
   MutableVariable get variable => variableRef.definition;
   Primitive get value => valueRef.definition;
 
-  SetMutable(MutableVariable variable, Primitive value)
+  SetMutable(MutableVariable variable, Primitive value,
+      {this.sourceInformation})
       : this.variableRef = new Reference<MutableVariable>(variable),
         this.valueRef = new Reference<Primitive>(value);
 
@@ -1153,6 +1162,7 @@
 class GetField extends Primitive {
   final Reference<Primitive> objectRef;
   FieldElement field;
+  final SourceInformation sourceInformation;
 
   /// True if the field never changes value.
   final bool isFinal;
@@ -1164,7 +1174,8 @@
 
   Primitive get object => objectRef.definition;
 
-  GetField(Primitive object, this.field, {this.isFinal: false})
+  GetField(Primitive object, this.field,
+      {this.sourceInformation, this.isFinal: false})
       : this.objectRef = new Reference<Primitive>(object);
 
   accept(Visitor visitor) => visitor.visitGetField(this);
@@ -1187,11 +1198,13 @@
   final Reference<Primitive> objectRef;
   FieldElement field;
   final Reference<Primitive> valueRef;
+  final SourceInformation sourceInformation;
 
   Primitive get object => objectRef.definition;
   Primitive get value => valueRef.definition;
 
-  SetField(Primitive object, this.field, Primitive value)
+  SetField(Primitive object, this.field, Primitive value,
+      {this.sourceInformation})
       : this.objectRef = new Reference<Primitive>(object),
         this.valueRef = new Reference<Primitive>(value);
 
@@ -1422,7 +1435,7 @@
   /// May be `null` to indicate that no type information is needed because the
   /// compiler determined that the type information for instances of this class
   /// is not needed at runtime.
-  final Reference<Primitive> typeInformationRef;
+  Reference<Primitive> typeInformationRef;
 
   final SourceInformation sourceInformation;
 
@@ -1516,13 +1529,14 @@
   final TypeMask storedType;
   final List<Reference<Primitive>> argumentRefs;
   final native.NativeBehavior nativeBehavior;
+  final SourceInformation sourceInformation;
   final FunctionElement dependency;
 
   Primitive argument(int n) => argumentRefs[n].definition;
   Iterable<Primitive> get arguments => _dereferenceList(argumentRefs);
 
   ForeignCode(this.codeTemplate, this.storedType, List<Primitive> arguments,
-      this.nativeBehavior,
+      this.nativeBehavior, this.sourceInformation,
       {this.dependency})
       : this.argumentRefs = _referenceList(arguments) {
     effects = Effects.from(nativeBehavior.sideEffects);
@@ -2040,6 +2054,7 @@
   final Reference<Primitive> conditionRef;
   final Reference<Continuation> trueContinuationRef;
   final Reference<Continuation> falseContinuationRef;
+  final SourceInformation sourceInformation;
 
   Primitive get condition => conditionRef.definition;
   Continuation get trueContinuation => trueContinuationRef.definition;
@@ -2053,6 +2068,7 @@
   bool isStrictCheck;
 
   Branch(Primitive condition, Continuation trueCont, Continuation falseCont,
+      this.sourceInformation,
       {bool strict})
       : this.conditionRef = new Reference<Primitive>(condition),
         trueContinuationRef = new Reference<Continuation>(trueCont),
@@ -2061,13 +2077,13 @@
     assert(strict != null);
   }
 
-  Branch.strict(
-      Primitive condition, Continuation trueCont, Continuation falseCont)
-      : this(condition, trueCont, falseCont, strict: true);
+  Branch.strict(Primitive condition, Continuation trueCont,
+      Continuation falseCont, SourceInformation sourceInformation)
+      : this(condition, trueCont, falseCont, sourceInformation, strict: true);
 
-  Branch.loose(
-      Primitive condition, Continuation trueCont, Continuation falseCont)
-      : this(condition, trueCont, falseCont, strict: false);
+  Branch.loose(Primitive condition, Continuation trueCont,
+      Continuation falseCont, SourceInformation sourceInformation)
+      : this(condition, trueCont, falseCont, sourceInformation, strict: false);
 
   accept(BlockVisitor visitor) => visitor.visitBranch(this);
 
@@ -2273,7 +2289,8 @@
   processFunctionDefinition(FunctionDefinition node) {}
   visitFunctionDefinition(FunctionDefinition node) {
     processFunctionDefinition(node);
-    if (node.thisParameter != null) visit(node.thisParameter);
+    if (node.interceptorParameter != null) visit(node.interceptorParameter);
+    if (node.receiverParameter != null) visit(node.receiverParameter);
     node.parameters.forEach(visit);
     visit(node.body);
   }
@@ -2331,6 +2348,9 @@
   processInvokeMethod(InvokeMethod node) {}
   visitInvokeMethod(InvokeMethod node) {
     processInvokeMethod(node);
+    if (node.interceptorRef != null) {
+      processReference(node.interceptorRef);
+    }
     processReference(node.receiverRef);
     node.argumentRefs.forEach(processReference);
   }
@@ -2338,6 +2358,9 @@
   processInvokeMethodDirectly(InvokeMethodDirectly node) {}
   visitInvokeMethodDirectly(InvokeMethodDirectly node) {
     processInvokeMethodDirectly(node);
+    if (node.interceptorRef != null) {
+      processReference(node.interceptorRef);
+    }
     processReference(node.receiverRef);
     node.argumentRefs.forEach(processReference);
   }
@@ -2626,7 +2649,8 @@
 
   visitFunctionDefinition(FunctionDefinition node) {
     processFunctionDefinition(node);
-    if (node.thisParameter != null) visit(node.thisParameter);
+    if (node.interceptorParameter != null) visit(node.interceptorParameter);
+    if (node.receiverParameter != null) visit(node.receiverParameter);
     node.parameters.forEach(visit);
     visit(node.body);
   }
@@ -2775,13 +2799,14 @@
     return new InvokeMethod(getCopy(node.receiverRef), node.selector, node.mask,
         getList(node.argumentRefs),
         sourceInformation: node.sourceInformation,
-        callingConvention: node.callingConvention);
+        callingConvention: node.callingConvention,
+        interceptor: getCopyOrNull(node.interceptorRef));
   }
 
   Definition visitInvokeMethodDirectly(InvokeMethodDirectly node) {
     return new InvokeMethodDirectly(getCopy(node.receiverRef), node.target,
         node.selector, getList(node.argumentRefs), node.sourceInformation,
-        callingConvention: node.callingConvention);
+        interceptor: getCopyOrNull(node.interceptorRef));
   }
 
   Definition visitInvokeConstructor(InvokeConstructor node) {
@@ -2799,7 +2824,8 @@
   }
 
   Definition visitSetMutable(SetMutable node) {
-    return new SetMutable(getCopy(node.variableRef), getCopy(node.valueRef));
+    return new SetMutable(getCopy(node.variableRef), getCopy(node.valueRef),
+        sourceInformation: node.sourceInformation);
   }
 
   Definition visitSetStatic(SetStatic node) {
@@ -2809,7 +2835,8 @@
 
   Definition visitSetField(SetField node) {
     return new SetField(
-        getCopy(node.objectRef), node.field, getCopy(node.valueRef));
+        getCopy(node.objectRef), node.field, getCopy(node.valueRef),
+        sourceInformation: node.sourceInformation);
   }
 
   Definition visitGetLazyStatic(GetLazyStatic node) {
@@ -2835,7 +2862,8 @@
   }
 
   Definition visitGetMutable(GetMutable node) {
-    return new GetMutable(getCopy(node.variableRef));
+    return new GetMutable(getCopy(node.variableRef),
+        sourceInformation: node.sourceInformation);
   }
 
   Definition visitParameter(Parameter node) {
@@ -2950,7 +2978,7 @@
 
   Definition visitForeignCode(ForeignCode node) {
     return new ForeignCode(node.codeTemplate, node.storedType,
-        getList(node.argumentRefs), node.nativeBehavior,
+        getList(node.argumentRefs), node.nativeBehavior, node.sourceInformation,
         dependency: node.dependency);
   }
 }
@@ -3007,9 +3035,12 @@
     _first = _current = null;
     // Definitions are copied where they are bound, before processing
     // expressions in the scope of their binding.
-    Parameter thisParameter = node.thisParameter == null
+    Parameter thisParameter = node.receiverParameter == null
         ? null
-        : _definitions.copy(node.thisParameter);
+        : _definitions.copy(node.receiverParameter);
+    Parameter interceptorParameter = node.interceptorParameter == null
+        ? null
+        : _definitions.copy(node.interceptorParameter);
     List<Parameter> parameters =
         node.parameters.map(_definitions.copy).toList();
     // Though the return continuation's parameter does not have any uses,
@@ -3022,7 +3053,9 @@
 
     visit(node.body);
     FunctionDefinition copy = new FunctionDefinition(
-        node.element, thisParameter, parameters, returnContinuation, _first);
+        node.element, thisParameter, parameters, returnContinuation, _first,
+        interceptorParameter: interceptorParameter,
+        sourceInformation: node.sourceInformation);
     _first = _current = null;
     return copy;
   }
@@ -3084,7 +3117,8 @@
     plug(new Branch.loose(
         _definitions.getCopy(node.conditionRef),
         _copies[node.trueContinuation],
-        _copies[node.falseContinuation])..isStrictCheck = node.isStrictCheck);
+        _copies[node.falseContinuation],
+        node.sourceInformation)..isStrictCheck = node.isStrictCheck);
   }
 
   visitUnreachable(Unreachable node) {
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
index 4c39e16..185f011 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
@@ -7,8 +7,7 @@
 import '../constants/values.dart';
 import '../util/util.dart';
 import 'cps_ir_nodes.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
+import '../universe/call_structure.dart' show CallStructure;
 
 /// A [Decorator] is a function used by [SExpressionStringifier] to augment the
 /// output produced for a node or reference.  It can be provided to the
@@ -98,18 +97,21 @@
     return decorator(node, s);
   }
 
-  String formatThisParameter(Parameter thisParameter) {
-    return thisParameter == null ? '()' : '(${visit(thisParameter)})';
+  String formatOptionalParameter(Parameter parameter) {
+    return parameter == null ? '()' : '(${visit(parameter)})';
   }
 
   String visitFunctionDefinition(FunctionDefinition node) {
     String name = node.element.name;
-    String thisParameter = formatThisParameter(node.thisParameter);
+    String interceptorParameter =
+        formatOptionalParameter(node.interceptorParameter);
+    String thisParameter = formatOptionalParameter(node.receiverParameter);
     String parameters = node.parameters.map(visit).join(' ');
     namer.setReturnContinuation(node.returnContinuation);
     String body = indentBlock(() => visit(node.body));
     return '$indentation'
-        '(FunctionDefinition $name $thisParameter ($parameters) return\n'
+        '(FunctionDefinition $name $interceptorParameter $thisParameter '
+        '($parameters) return\n'
         '$body)';
   }
 
@@ -175,14 +177,10 @@
     return '$indentation(LetMutable ($name $value)\n$body)';
   }
 
-  String formatArguments(CallStructure call,
-      List<Reference<Primitive>> arguments,
+  String formatArguments(
+      CallStructure call, List<Reference<Primitive>> arguments,
       [CallingConvention callingConvention = CallingConvention.Normal]) {
     int positionalArgumentCount = call.positionalArgumentCount;
-    if (callingConvention == CallingConvention.Intercepted ||
-        callingConvention == CallingConvention.DummyIntercepted) {
-      ++positionalArgumentCount;
-    }
     List<String> args =
         arguments.take(positionalArgumentCount).map(access).toList();
     List<String> argumentNames = call.getOrderedNamedArguments();
@@ -192,32 +190,35 @@
       args.add("($name: $arg)");
     }
     // Constructors can have type parameter after the named arguments.
-    args.addAll(
-        arguments.skip(positionalArgumentCount + argumentNames.length)
-            .map(access));
+    args.addAll(arguments
+        .skip(positionalArgumentCount + argumentNames.length)
+        .map(access));
     return '(${args.join(' ')})';
   }
 
   String visitInvokeStatic(InvokeStatic node) {
     String name = node.target.name;
-    String args = formatArguments(node.selector.callStructure, node.argumentRefs);
+    String args =
+        formatArguments(node.selector.callStructure, node.argumentRefs);
     return '(InvokeStatic $name $args)';
   }
 
   String visitInvokeMethod(InvokeMethod node) {
     String name = node.selector.name;
-    String rcv = access(node.receiverRef);
-    String args = formatArguments(node.selector.callStructure, node.argumentRefs,
-        node.callingConvention);
-    return '(InvokeMethod $rcv $name $args)';
+    String interceptor = optionalAccess(node.interceptorRef);
+    String receiver = access(node.receiverRef);
+    String arguments = formatArguments(
+        node.selector.callStructure, node.argumentRefs, node.callingConvention);
+    return '(InvokeMethod $interceptor $receiver $name $arguments)';
   }
 
   String visitInvokeMethodDirectly(InvokeMethodDirectly node) {
+    String interceptor = optionalAccess(node.interceptorRef);
     String receiver = access(node.receiverRef);
     String name = node.selector.name;
-    String args = formatArguments(node.selector.callStructure, node.argumentRefs,
-        node.callingConvention);
-    return '(InvokeMethodDirectly $receiver $name $args)';
+    String arguments = formatArguments(
+        node.selector.callStructure, node.argumentRefs, node.callingConvention);
+    return '(InvokeMethodDirectly $interceptor $receiver $name $arguments)';
   }
 
   String visitInvokeConstructor(InvokeConstructor node) {
@@ -231,7 +232,8 @@
     if (!node.target.name.isEmpty) {
       name = '${name}.${node.target.name}';
     }
-    String args = formatArguments(node.selector.callStructure, node.argumentRefs);
+    String args =
+        formatArguments(node.selector.callStructure, node.argumentRefs);
     return '(InvokeConstructor $name $args)';
   }
 
@@ -240,7 +242,7 @@
     if (node.isRecursive) name = 'rec $name';
     String args = node.argumentRefs == null
         ? '**** NULL ****'
-	: node.argumentRefs.map(access).join(' ');
+        : node.argumentRefs.map(access).join(' ');
     String escaping = node.isEscapingTry ? ' escape' : '';
     return '$indentation(InvokeContinuation $name ($args)$escaping)';
   }
@@ -258,10 +260,8 @@
     String condition = access(node.conditionRef);
     assert(isBranchTarget(node.trueContinuation));
     assert(isBranchTarget(node.falseContinuation));
-    String trueCont =
-        indentBlock(() => visit(node.trueContinuation));
-    String falseCont =
-        indentBlock(() => visit(node.falseContinuation));
+    String trueCont = indentBlock(() => visit(node.trueContinuation));
+    String falseCont = indentBlock(() => visit(node.falseContinuation));
     String strict = node.isStrictCheck ? 'Strict' : 'NonStrict';
     return '$indentation(Branch $strict $condition\n$trueCont\n$falseCont)';
   }
@@ -493,7 +493,7 @@
 
   String visitList(ListConstantValue constant, _) {
     String entries =
-      constant.entries.map((entry) => entry.accept(this, _)).join(' ');
+        constant.entries.map((entry) => entry.accept(this, _)).join(' ');
     return '(List $entries)';
   }
 
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
index 1c7779b..7b7e1e4 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
@@ -52,7 +52,6 @@
     throw 'The IR tracer reached an unexpected IR instruction: $node';
   }
 
-
   int countUses(cps_ir.Definition definition) {
     int count = 0;
     cps_ir.Reference ref = definition.firstRef;
@@ -84,11 +83,14 @@
           return '${names.name(param)} ${param.type}';
         }
         if (entryPoint != null) {
-          String thisParam = entryPoint.thisParameter != null
-              ? formatParameter(entryPoint.thisParameter)
+          String thisParam = entryPoint.receiverParameter != null
+              ? formatParameter(entryPoint.receiverParameter)
               : 'no receiver';
+          String interceptorParam = entryPoint.interceptorParameter != null
+              ? formatParameter(entryPoint.interceptorParameter)
+              : 'no interceptor';
           String params = entryPoint.parameters.map(formatParameter).join(', ');
-          printStmt('x0', 'Entry ($thisParam) ($params)');
+          printStmt('x0', 'Entry ($interceptorParam) ($thisParam) ($params)');
         }
         String params = block.parameters.map(formatParameter).join(', ');
         printStmt('x0', 'Parameters ($params)');
@@ -304,7 +306,7 @@
 
   visitInterceptor(cps_ir.Interceptor node) {
     return 'Interceptor(${formatReference(node.inputRef)}, '
-           '${node.interceptedClasses})';
+        '${node.interceptedClasses})';
   }
 
   visitGetMutable(cps_ir.GetMutable node) {
@@ -358,8 +360,8 @@
   visitForeignCode(cps_ir.ForeignCode node) {
     String id = names.name(node);
     String arguments = node.argumentRefs.map(formatReference).join(', ');
-    printStmt(id,
-        "ForeignCode ${node.type} ${node.codeTemplate.source} $arguments");
+    printStmt(
+        id, "ForeignCode ${node.type} ${node.codeTemplate.source} $arguments");
   }
 
   visitGetLength(cps_ir.GetLength node) {
@@ -388,12 +390,10 @@
 
   visitBoundsCheck(cps_ir.BoundsCheck node) {
     String object = formatReference(node.objectRef);
-    String index = node.indexRef == null
-        ? 'no-index'
-        : formatReference(node.indexRef);
-    String length = node.lengthRef == null
-        ? 'no-length'
-        : formatReference(node.lengthRef);
+    String index =
+        node.indexRef == null ? 'no-index' : formatReference(node.indexRef);
+    String length =
+        node.lengthRef == null ? 'no-length' : formatReference(node.lengthRef);
     return 'BoundsCheck $object $index $length ${node.checkString}';
   }
 
@@ -413,13 +413,7 @@
  */
 class Names {
   final Map<Object, String> names = {};
-  final Map<String, int> counters = {
-    'r': 0,
-    'B': 0,
-    'v': 0,
-    'x': 0,
-    'c': 0
-  };
+  final Map<String, int> counters = {'r': 0, 'B': 0, 'v': 0, 'x': 0, 'c': 0};
 
   String prefix(x) {
     if (x is cps_ir.Parameter) return 'r';
@@ -529,14 +523,11 @@
     unexpectedNode(node);
   }
 
-  visitThrow(cps_ir.Throw exp) {
-  }
+  visitThrow(cps_ir.Throw exp) {}
 
-  visitRethrow(cps_ir.Rethrow exp) {
-  }
+  visitRethrow(cps_ir.Rethrow exp) {}
 
-  visitUnreachable(cps_ir.Unreachable node) {
-  }
+  visitUnreachable(cps_ir.Unreachable node) {}
 
   visitGetLazyStatic(cps_ir.GetLazyStatic node) {
     unexpectedNode(node);
diff --git a/pkg/compiler/lib/src/cps_ir/eagerly_load_statics.dart b/pkg/compiler/lib/src/cps_ir/eagerly_load_statics.dart
index e03f9ca..60a7977 100644
--- a/pkg/compiler/lib/src/cps_ir/eagerly_load_statics.dart
+++ b/pkg/compiler/lib/src/cps_ir/eagerly_load_statics.dart
@@ -23,7 +23,7 @@
       <Continuation, Map<FieldElement, Primitive>>{};
 
   static Map<FieldElement, Primitive> cloneFieldMap(
-        Map<FieldElement, Primitive> map) {
+      Map<FieldElement, Primitive> map) {
     return new Map<FieldElement, Primitive>.from(map);
   }
 
@@ -62,9 +62,8 @@
       // No reason to create a GetStatic when the field is final.
       node.replaceWithFragment(new CpsFragment(), initializer);
     } else if (initializer != null) {
-      GetStatic newNode = new GetStatic.witnessed(node.element,
-          initializer, sourceInformation: node.sourceInformation)
-          ..type = node.type;
+      GetStatic newNode = new GetStatic.witnessed(node.element, initializer,
+          sourceInformation: node.sourceInformation)..type = node.type;
       node.replaceWith(newNode);
     } else {
       initializerFor[node.element] = node;
diff --git a/pkg/compiler/lib/src/cps_ir/effects.dart b/pkg/compiler/lib/src/cps_ir/effects.dart
index 9ab55cd..29d3172 100644
--- a/pkg/compiler/lib/src/cps_ir/effects.dart
+++ b/pkg/compiler/lib/src/cps_ir/effects.dart
@@ -30,8 +30,7 @@
   static const int changesIndexableLength = _changes << _indexableLength;
   static const int changesOther = _changes << _other;
 
-  static const int changesAll =
-      changesStaticField |
+  static const int changesAll = changesStaticField |
       changesInstanceField |
       changesIndexableContent |
       changesIndexableLength |
@@ -45,8 +44,7 @@
   static const int dependsOnIndexableLength = _depends << _indexableLength;
   static const int dependsOnOther = _depends << _other;
 
-  static const int dependsOnAll =
-      dependsOnStaticField |
+  static const int dependsOnAll = dependsOnStaticField |
       dependsOnInstanceField |
       dependsOnIndexableContent |
       dependsOnIndexableLength |
@@ -131,9 +129,9 @@
     return new EffectNumbers._zero().._effectNumbers.setAll(0, _effectNumbers);
   }
 
-  int operator[](int i) => _effectNumbers[i];
+  int operator [](int i) => _effectNumbers[i];
 
-  void operator[]=(int i, int value) {
+  void operator []=(int i, int value) {
     _effectNumbers[i] = value;
   }
 
@@ -146,15 +144,19 @@
   void set staticField(int n) {
     _effectNumbers[Effects._staticField] = n;
   }
+
   void set instanceField(int n) {
     _effectNumbers[Effects._instanceField] = n;
   }
+
   void set indexableContent(int n) {
     _effectNumbers[Effects._indexableContent] = n;
   }
+
   void set indexableLength(int n) {
     _effectNumbers[Effects._indexableLength] = n;
   }
+
   void set other(int n) {
     _effectNumbers[Effects._other] = n;
   }
diff --git a/pkg/compiler/lib/src/cps_ir/finalize.dart b/pkg/compiler/lib/src/cps_ir/finalize.dart
index 9376800..e583f49 100644
--- a/pkg/compiler/lib/src/cps_ir/finalize.dart
+++ b/pkg/compiler/lib/src/cps_ir/finalize.dart
@@ -38,18 +38,22 @@
   CpsFragment visitBoundsCheck(BoundsCheck node) {
     CpsFragment cps = new CpsFragment(node.sourceInformation);
     if (node.hasNoChecks) {
-      node..replaceUsesWith(node.object)..destroy();
+      node
+        ..replaceUsesWith(node.object)
+        ..destroy();
       return cps;
     }
     Continuation fail = cps.letCont();
     Primitive index = node.index;
     if (node.hasIntegerCheck) {
-      cps.ifTruthy(cps.applyBuiltin(BuiltinOperator.IsNotUnsigned32BitInteger,
-          [index, index]))
+      cps
+          .ifTruthy(cps.applyBuiltin(
+              BuiltinOperator.IsNotUnsigned32BitInteger, [index, index]))
           .invokeContinuation(fail);
     } else if (node.hasLowerBoundCheck) {
-      cps.ifTruthy(cps.applyBuiltin(BuiltinOperator.NumLt,
-          [index, cps.makeZero()]))
+      cps
+          .ifTruthy(
+              cps.applyBuiltin(BuiltinOperator.NumLt, [index, cps.makeZero()]))
           .invokeContinuation(fail);
     }
     if (node.hasUpperBoundCheck) {
@@ -63,25 +67,29 @@
         lengthBinding.remove();
         cps.letPrim(length);
       }
-      cps.ifTruthy(cps.applyBuiltin(BuiltinOperator.NumGe,
-          [index, length]))
+      cps
+          .ifTruthy(cps.applyBuiltin(BuiltinOperator.NumGe, [index, length]))
           .invokeContinuation(fail);
     }
     if (node.hasEmptinessCheck) {
-      cps.ifTruthy(cps.applyBuiltin(BuiltinOperator.StrictEq,
-          [node.length, cps.makeZero()]))
+      cps
+          .ifTruthy(cps.applyBuiltin(
+              BuiltinOperator.StrictEq, [node.length, cps.makeZero()]))
           .invokeContinuation(fail);
     }
     cps.insideContinuation(fail).invokeStaticThrower(
-          helpers.throwIndexOutOfRangeException,
-          [node.object, index]);
-    node..replaceUsesWith(node.object)..destroy();
+        helpers.throwIndexOutOfRangeException, [node.object, index]);
+    node
+      ..replaceUsesWith(node.object)
+      ..destroy();
     return cps;
   }
 
   void visitGetStatic(GetStatic node) {
     if (node.witnessRef != null) {
-      node..witnessRef.unlink()..witnessRef = null;
+      node
+        ..witnessRef.unlink()
+        ..witnessRef = null;
     }
   }
 
@@ -93,7 +101,7 @@
       // after allocation.  After the finalize pass, this assumption is no
       // longer needed, so we can replace the remaining idenitity templates.
       Refinement refinement = new Refinement(node.argument(0), node.type)
-          ..type = node.type;
+        ..type = node.type;
       node.replaceWith(refinement);
     }
   }
diff --git a/pkg/compiler/lib/src/cps_ir/gvn.dart b/pkg/compiler/lib/src/cps_ir/gvn.dart
index 8bf896d..8970f5c 100644
--- a/pkg/compiler/lib/src/cps_ir/gvn.dart
+++ b/pkg/compiler/lib/src/cps_ir/gvn.dart
@@ -5,7 +5,6 @@
 library dart2js.cps_ir.gvn;
 
 import 'cps_ir_nodes.dart';
-import '../universe/side_effects.dart';
 import '../elements/elements.dart';
 import 'optimizers.dart' show Pass;
 import 'loop_hierarchy.dart';
@@ -13,7 +12,6 @@
 import '../world.dart';
 import '../compiler.dart' show Compiler;
 import '../js_backend/js_backend.dart' show JavaScriptBackend;
-import '../constants/values.dart';
 import 'type_mask_system.dart';
 import 'effects.dart';
 
@@ -97,10 +95,10 @@
     // GetLazyStatic cannot have side effects because the field has already
     // been initialized.
     return prim.isSafeForElimination ||
-           prim is GetField ||
-           prim is GetLength ||
-           prim is GetIndex ||
-           prim is GetLazyStatic;
+        prim is GetField ||
+        prim is GetLength ||
+        prim is GetIndex ||
+        prim is GetLazyStatic;
   }
 
   @override
@@ -152,7 +150,9 @@
         Interceptor interceptor = existing;
         interceptor.interceptedClasses.addAll(prim.interceptedClasses);
       }
-      prim..replaceUsesWith(existing)..destroy();
+      prim
+        ..replaceUsesWith(existing)
+        ..destroy();
       node.remove();
       return next;
     }
@@ -249,7 +249,7 @@
     Continuation enclosingLoop = currentLoopHeader;
     Continuation hoistTarget = null;
     while (loopHierarchy.getDepth(enclosingLoop) > hoistDepth &&
-           canHoistHeapDependencyOutOfLoop(prim, enclosingLoop)) {
+        canHoistHeapDependencyOutOfLoop(prim, enclosingLoop)) {
       hoistTarget = enclosingLoop;
       enclosingLoop = loopHierarchy.getEnclosingLoop(enclosingLoop);
     }
@@ -296,17 +296,14 @@
 
     // Put the primitive in the environment while processing the loop.
     environment[gvn] = prim;
-    loopHoistedBindings
-        .putIfAbsent(hoistTarget, () => <int>[])
-        .add(gvn);
+    loopHoistedBindings.putIfAbsent(hoistTarget, () => <int>[]).add(gvn);
     return true;
   }
 
   /// If the given primitive is a trivial primitive that should be hoisted
   /// on-demand, hoist it and its dependent values above [loopBinding].
-  void hoistTrivialPrimitive(Primitive prim,
-                             LetCont loopBinding,
-                             Continuation enclosingLoop) {
+  void hoistTrivialPrimitive(
+      Primitive prim, LetCont loopBinding, Continuation enclosingLoop) {
     assert(isFastConstant(prim));
 
     // The primitive might already be bound in an outer scope.  Do not relocate
@@ -441,9 +438,11 @@
   final List vector;
   final int hashCode;
 
-  GvnEntry(List vector) : vector = vector, hashCode = computeHashCode(vector);
+  GvnEntry(List vector)
+      : vector = vector,
+        hashCode = computeHashCode(vector);
 
-  bool operator==(other) {
+  bool operator ==(other) {
     if (other is! GvnEntry) return false;
     GvnEntry entry = other;
     List otherVector = entry.vector;
@@ -463,7 +462,7 @@
       hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
       hash = hash ^ (hash >> 6);
     }
-    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) <<  3));
+    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
     hash = hash ^ (hash >> 11);
     return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
   }
@@ -578,7 +577,7 @@
   }
 
   processTypeExpression(TypeExpression node) {
-    vector = [GvnCode.TYPE_EXPRESSION, node.dartType];
+    vector = [GvnCode.TYPE_EXPRESSION, node.kind.index, node.dartType];
   }
 
   processInterceptor(Interceptor node) {
@@ -602,6 +601,7 @@
 }
 
 typedef ReferenceCallback(Reference ref);
+
 class InputVisitor extends DeepRecursiveVisitor {
   ReferenceCallback callback;
 
diff --git a/pkg/compiler/lib/src/cps_ir/inline.dart b/pkg/compiler/lib/src/cps_ir/inline.dart
index 6c9f30c..cbb673d 100644
--- a/pkg/compiler/lib/src/cps_ir/inline.dart
+++ b/pkg/compiler/lib/src/cps_ir/inline.dart
@@ -14,8 +14,8 @@
 import '../elements/elements.dart';
 import '../js_backend/js_backend.dart' show JavaScriptBackend;
 import '../js_backend/codegen/task.dart' show CpsFunctionCompiler;
-import '../types/types.dart' show
-    FlatTypeMask, ForwardingTypeMask, TypeMask, UnionTypeMask;
+import '../types/types.dart'
+    show FlatTypeMask, ForwardingTypeMask, TypeMask, UnionTypeMask;
 import '../universe/call_structure.dart' show CallStructure;
 import '../universe/selector.dart' show Selector;
 import 'package:js_ast/js_ast.dart' as js;
@@ -62,7 +62,7 @@
     if (callStructure == null) {
       if (otherCallStructure != null) return false;
     } else if (otherCallStructure == null ||
-               !callStructure.match(otherCallStructure)) {
+        !callStructure.match(otherCallStructure)) {
       return false;
     }
 
@@ -97,20 +97,23 @@
   // copied because the compiler passes will mutate them.
   final CopyingVisitor copier = new CopyingVisitor();
 
-  void _putInternal(ExecutableElement element, CallStructure callStructure,
+  void _putInternal(
+      ExecutableElement element,
+      CallStructure callStructure,
       TypeMask receiver,
       List<TypeMask> arguments,
       bool decision,
       FunctionDefinition function) {
-    map.putIfAbsent(element, () => <CacheEntry>[])
-        .add(new CacheEntry(callStructure, receiver, arguments, decision,
-            function));
+    map.putIfAbsent(element, () => <CacheEntry>[]).add(
+        new CacheEntry(callStructure, receiver, arguments, decision, function));
   }
 
   /// Put a positive inlining decision in the cache.
   ///
   /// A positive inlining decision maps to an IR function definition.
-  void putPositive(ExecutableElement element, CallStructure callStructure,
+  void putPositive(
+      ExecutableElement element,
+      CallStructure callStructure,
       TypeMask receiver,
       List<TypeMask> arguments,
       FunctionDefinition function) {
@@ -119,10 +122,8 @@
   }
 
   /// Put a negative inlining decision in the cache.
-  void putNegative(ExecutableElement element,
-      CallStructure callStructure,
-      TypeMask receiver,
-      List<TypeMask> arguments) {
+  void putNegative(ExecutableElement element, CallStructure callStructure,
+      TypeMask receiver, List<TypeMask> arguments) {
     _putInternal(element, callStructure, receiver, arguments, false, null);
   }
 
@@ -185,8 +186,14 @@
   Inliner(this.functionCompiler);
 
   bool isCalledOnce(Element element) {
-    return functionCompiler.compiler.typesTask.typesInferrer.isCalledOnce(
-        element);
+    if (element is ConstructorBodyElement) {
+      ClassElement class_ = element.enclosingClass;
+      return !functionCompiler.compiler.world.hasAnyStrictSubclass(class_) &&
+              class_.constructors.tail?.isEmpty ??
+          false;
+    }
+    return functionCompiler.compiler.typesTask.typesInferrer
+        .isCalledOnce(element);
   }
 
   void rewrite(FunctionDefinition node, [CallStructure callStructure]) {
@@ -222,14 +229,12 @@
 class SizeVisitor extends TrampolineRecursiveVisitor {
   int size = 0;
 
-  void countArgument(Reference<Primitive> argument, Parameter parameter) {
+  void countArgument(Primitive argument, Parameter parameter) {
     // If a parameter is unused and the corresponding argument has only the
     // one use at the invocation, then inlining the call might enable
     // elimination of the argument.  This 'pays for itself' by decreasing the
     // cost of inlining at the call site.
-    if (argument != null &&
-        argument.definition.hasExactlyOneUse &&
-        parameter.hasNoUses) {
+    if (argument != null && argument.hasExactlyOneUse && parameter.hasNoUses) {
       --size;
     }
   }
@@ -237,9 +242,15 @@
   static int sizeOf(InvocationPrimitive invoke, FunctionDefinition function) {
     SizeVisitor visitor = new SizeVisitor();
     visitor.visit(function);
-    visitor.countArgument(invoke.receiverRef, function.thisParameter);
+    if (invoke.callingConvention == CallingConvention.Intercepted) {
+      // Note that if the invocation is a dummy-intercepted call, then the
+      // target has an unused interceptor parameter, but the caller provides
+      // no interceptor argument.
+      visitor.countArgument(invoke.interceptor, function.interceptorParameter);
+    }
+    visitor.countArgument(invoke.receiver, function.receiverParameter);
     for (int i = 0; i < invoke.argumentRefs.length; ++i) {
-      visitor.countArgument(invoke.argumentRefs[i], function.parameters[i]);
+      visitor.countArgument(invoke.argument(i), function.parameters[i]);
     }
     return visitor.size;
   }
@@ -285,7 +296,6 @@
   }
 }
 
-
 class InliningVisitor extends TrampolineRecursiveVisitor {
   final Inliner _inliner;
 
@@ -328,34 +338,29 @@
     return next;
   }
 
-  TypeMask abstractType(Reference<Primitive> ref) {
-    return ref.definition.type ?? typeSystem.dynamicType;
+  TypeMask abstractType(Primitive def) {
+    return def.type ?? typeSystem.dynamicType;
   }
 
   /// Build the IR term for the function that adapts a call site targeting a
   /// function that takes optional arguments not passed at the call site.
   FunctionDefinition buildAdapter(InvokeMethod node, FunctionElement target) {
     Parameter thisParameter = new Parameter(new ThisParameterLocal(target))
-        ..type = node.receiver.type;
-    List<Parameter> parameters = new List<Parameter>.generate(
-        node.argumentRefs.length,
-        (int index) {
-          // TODO(kmillikin): Use a hint for the parameter names.
-          return new Parameter(null)
-              ..type = node.argument(index).type;
-        });
+      ..type = node.receiver.type;
+    Parameter interceptorParameter =
+        node.interceptorRef != null ? new Parameter(null) : null;
+    List<Parameter> parameters =
+        new List<Parameter>.generate(node.argumentRefs.length, (int index) {
+      // TODO(kmillikin): Use a hint for the parameter names.
+      return new Parameter(null)..type = node.argument(index).type;
+    });
     Continuation returnContinuation = new Continuation.retrn();
     CpsFragment cps = new CpsFragment();
 
     FunctionSignature signature = target.functionSignature;
     int requiredParameterCount = signature.requiredParameterCount;
-    if (node.callingConvention == CallingConvention.Intercepted ||
-        node.callingConvention == CallingConvention.DummyIntercepted) {
-      ++requiredParameterCount;
-    }
     List<Primitive> arguments = new List<Primitive>.generate(
-        requiredParameterCount,
-        (int index) => parameters[index]);
+        requiredParameterCount, (int index) => parameters[index]);
 
     int parameterIndex = requiredParameterCount;
     CallStructure newCallStructure;
@@ -393,17 +398,18 @@
       newCallStructure = new CallStructure(signature.parameterCount);
     }
 
-    Selector newSelector =
-        new Selector(node.selector.kind, node.selector.memberName,
-            newCallStructure);
-    Primitive result = cps.invokeMethod(thisParameter, newSelector, node.mask,
-        arguments, node.callingConvention);
+    Selector newSelector = new Selector(
+        node.selector.kind, node.selector.memberName, newCallStructure);
+    Primitive result = cps.invokeMethod(
+        thisParameter, newSelector, node.mask, arguments,
+        interceptor: interceptorParameter,
+        callingConvention: node.callingConvention);
     result.type = typeSystem.getInvokeReturnType(node.selector, node.mask);
     returnContinuation.parameters.single.type = result.type;
     cps.invokeContinuation(returnContinuation, <Primitive>[result]);
-    return new FunctionDefinition(target, thisParameter, parameters,
-        returnContinuation,
-        cps.root);
+    return new FunctionDefinition(
+        target, thisParameter, parameters, returnContinuation, cps.root,
+        interceptorParameter: interceptorParameter);
   }
 
   // Given an invocation and a known target, possibly perform inlining.
@@ -415,7 +421,7 @@
   // if the call was inlined, and the inlined function body is available in
   // [_fragment].  If the call was not inlined, null is returned.
   Primitive tryInlining(InvocationPrimitive invoke, FunctionElement target,
-                        CallStructure callStructure) {
+      CallStructure callStructure) {
     // Quick checks: do not inline or even cache calls to targets without an
     // AST node, targets that are asynchronous or generator functions, or
     // targets containing a try statement.
@@ -431,7 +437,7 @@
 
     // Don't inline methods that never return. They are usually helper functions
     // that throw an exception.
-    if (invoke.type.isEmpty && !invoke.type.isNullable) {
+    if (invoke.type.isEmpty) {
       // TODO(sra): It would be ok to inline if doing so was shrinking.
       return null;
     }
@@ -444,21 +450,20 @@
       return null;
     }
 
-    Reference<Primitive> dartReceiver = invoke.dartReceiverRef;
+    Primitive receiver = invoke.receiver;
     TypeMask abstractReceiver =
-        dartReceiver == null ? null : abstractType(dartReceiver);
+        receiver == null ? null : abstractType(receiver);
     // The receiver is non-null in a method body, unless the receiver is known
     // to be `null` (isEmpty covers `null` and unreachable).
     TypeMask abstractReceiverInMethod = abstractReceiver == null
         ? null
-        : abstractReceiver.isEmpty
+        : abstractReceiver.isEmptyOrNull
             ? abstractReceiver
             : abstractReceiver.nonNullable();
     List<TypeMask> abstractArguments =
-        invoke.argumentRefs.map(abstractType).toList();
-    var cachedResult = _inliner.cache.get(target, callStructure,
-        abstractReceiverInMethod,
-        abstractArguments);
+        invoke.arguments.map(abstractType).toList();
+    var cachedResult = _inliner.cache.get(
+        target, callStructure, abstractReceiverInMethod, abstractArguments);
 
     // Negative inlining result in the cache.
     if (cachedResult == InliningCache.NO_INLINE) return null;
@@ -469,17 +474,12 @@
       List<Primitive> arguments = invoke.arguments.toList();
       // Add a null check to the inlined function body if necessary.  The
       // cached function body does not contain the null check.
-      if (dartReceiver != null && abstractReceiver.isNullable) {
-        Primitive check = nullReceiverGuard(
-            invoke, _fragment, dartReceiver.definition, abstractReceiver);
-        if (invoke.callingConvention == CallingConvention.Intercepted) {
-          arguments[0] = check;
-        } else {
-          receiver = check;
-        }
+      if (receiver != null && abstractReceiver.isNullable) {
+        receiver =
+            nullReceiverGuard(invoke, _fragment, receiver, abstractReceiver);
       }
       return _fragment.inlineFunction(function, receiver, arguments,
-          hint: invoke.hint);
+          interceptor: invoke.interceptor, hint: invoke.hint);
     }
 
     // Positive inlining result in the cache.
@@ -513,22 +513,11 @@
       }
     } else {
       function = compileToCpsIr(target);
-      void setValue(Variable variable, Reference<Primitive> value) {
-        variable.type = value.definition.type;
+      if (function.receiverParameter != null) {
+        function.receiverParameter.type = abstractReceiverInMethod;
       }
-      if (invoke.callingConvention == CallingConvention.Intercepted) {
-        setValue(function.thisParameter, invoke.receiverRef);
-        function.parameters[0].type = abstractReceiverInMethod;
-        for (int i = 1; i < invoke.argumentRefs.length; ++i) {
-          setValue(function.parameters[i], invoke.argumentRefs[i]);
-        }
-      } else {
-        if (invoke.receiverRef != null) {
-          function.thisParameter.type = abstractReceiverInMethod;
-        }
-        for (int i = 0; i < invoke.argumentRefs.length; ++i) {
-          setValue(function.parameters[i], invoke.argumentRefs[i]);
-        }
+      for (int i = 0; i < invoke.argumentRefs.length; ++i) {
+        function.parameters[i].type = invoke.argument(i).type;
       }
       optimizeBeforeInlining(function);
     }
@@ -546,35 +535,30 @@
     return finish(function);
   }
 
-  Primitive nullReceiverGuard(InvocationPrimitive invoke,
-                              CpsFragment fragment,
-                              Primitive dartReceiver,
-                              TypeMask abstractReceiver) {
+  Primitive nullReceiverGuard(InvocationPrimitive invoke, CpsFragment fragment,
+      Primitive dartReceiver, TypeMask abstractReceiver) {
     if (invoke is! InvokeMethod) return dartReceiver;
     InvokeMethod invokeMethod = invoke;
     Selector selector = invokeMethod.selector;
     if (typeSystem.isDefinitelyNum(abstractReceiver, allowNull: true)) {
-      Primitive condition = _fragment.letPrim(
-          new ApplyBuiltinOperator(BuiltinOperator.IsNotNumber,
-                                   <Primitive>[dartReceiver],
-                                   invoke.sourceInformation));
+      Primitive condition = _fragment.letPrim(new ApplyBuiltinOperator(
+          BuiltinOperator.IsNotNumber,
+          <Primitive>[dartReceiver],
+          invoke.sourceInformation));
       condition.type = typeSystem.boolType;
-      Primitive check = _fragment.letPrim(
-          new ReceiverCheck.nullCheck(dartReceiver, selector,
-              invoke.sourceInformation,
-              condition: condition));
+      Primitive check = _fragment.letPrim(new ReceiverCheck.nullCheck(
+          dartReceiver, selector, invoke.sourceInformation,
+          condition: condition));
       check.type = abstractReceiver.nonNullable();
       return check;
     }
 
-    Primitive check = _fragment.letPrim(
-        new ReceiverCheck.nullCheck(dartReceiver, selector,
-            invoke.sourceInformation));
+    Primitive check = _fragment.letPrim(new ReceiverCheck.nullCheck(
+        dartReceiver, selector, invoke.sourceInformation));
     check.type = abstractReceiver.nonNullable();
     return check;
   }
 
-
   @override
   Primitive visitInvokeStatic(InvokeStatic node) {
     return tryInlining(node, node.target, null);
@@ -582,15 +566,15 @@
 
   @override
   Primitive visitInvokeMethod(InvokeMethod node) {
-    Primitive receiver = node.dartReceiver;
+    Primitive receiver = node.receiver;
     Element element = world.locateSingleElement(node.selector, receiver.type);
     if (element == null || element is! FunctionElement) return null;
     if (node.selector.isGetter != element.isGetter) return null;
     if (node.selector.isSetter != element.isSetter) return null;
     if (node.selector.name != element.name) return null;
 
-    return tryInlining(node, element.asFunctionElement(),
-        node.selector.callStructure);
+    return tryInlining(
+        node, element.asFunctionElement(), node.selector.callStructure);
   }
 
   @override
@@ -617,8 +601,8 @@
     ClassElement enclosingClass = target.enclosingClass;
     if (target.isOperator &&
         (enclosingClass == backend.helpers.jsNumberClass ||
-         enclosingClass == backend.helpers.jsDoubleClass ||
-         enclosingClass == backend.helpers.jsIntClass)) {
+            enclosingClass == backend.helpers.jsDoubleClass ||
+            enclosingClass == backend.helpers.jsIntClass)) {
       // These should be handled by operator specialization.
       return true;
     }
diff --git a/pkg/compiler/lib/src/cps_ir/insert_refinements.dart b/pkg/compiler/lib/src/cps_ir/insert_refinements.dart
index ef291b1..28d013f 100644
--- a/pkg/compiler/lib/src/cps_ir/insert_refinements.dart
+++ b/pkg/compiler/lib/src/cps_ir/insert_refinements.dart
@@ -73,10 +73,6 @@
     let.insertAbove(use);
   }
 
-  Primitive unfoldInterceptor(Primitive prim) {
-    return prim is Interceptor ? prim.input : prim;
-  }
-
   /// Sets [refined] to be the current refinement for its value, and pushes an
   /// action that will restore the original scope again.
   ///
@@ -115,22 +111,21 @@
 
     // Note: node.dartArgumentsLength is shorter when the call doesn't include
     // some optional arguments.
-    int length = min(argumentSuccessTypes.length, node.dartArgumentsLength);
+    int length = min(argumentSuccessTypes.length, node.argumentRefs.length);
     for (int i = 0; i < length; i++) {
       TypeMask argSuccessType = argumentSuccessTypes[i];
 
       // Skip arguments that provide no refinement.
       if (argSuccessType == types.dynamicType) continue;
 
-      applyRefinement(node.parent,
-          new Refinement(node.dartArgument(i), argSuccessType));
+      applyRefinement(
+          node.parent, new Refinement(node.argument(i), argSuccessType));
     }
   }
 
   void visitInvokeStatic(InvokeStatic node) {
     node.argumentRefs.forEach(processReference);
-    _refineArguments(node,
-        _getSuccessTypesForStaticMethod(types, node.target));
+    _refineArguments(node, _getSuccessTypesForStaticMethod(types, node.target));
   }
 
   void visitInvokeMethod(InvokeMethod node) {
@@ -140,7 +135,7 @@
 
     // If the call is intercepted, we want to refine the actual receiver,
     // not the interceptor.
-    Primitive receiver = unfoldInterceptor(node.receiver);
+    Primitive receiver = node.receiver;
 
     // Do not try to refine the receiver of closure calls; the class world
     // does not know about closure classes.
@@ -154,8 +149,8 @@
 
       // Refine arguments of methods on numbers which we know will throw on
       // invalid argument values.
-      _refineArguments(node,
-          _getSuccessTypesForInstanceMethod(types, type, selector));
+      _refineArguments(
+          node, _getSuccessTypesForInstanceMethod(types, type, selector));
     }
   }
 
@@ -216,10 +211,8 @@
     // This can happen either for calls to `==` or `identical` calls, such
     // as the ones inserted by the unsugaring pass.
 
-    void refineEquality(Primitive first,
-                        Primitive second,
-                        Continuation trueCont,
-                        Continuation falseCont) {
+    void refineEquality(Primitive first, Primitive second,
+        Continuation trueCont, Continuation falseCont) {
       if (second is Constant && second.value.isNull) {
         Refinement refinedTrue = new Refinement(first, types.nullType);
         Refinement refinedFalse = new Refinement(first, types.nonNullType);
@@ -237,19 +230,15 @@
     }
 
     if (condition is InvokeMethod && condition.selector == Selectors.equals) {
-      refineEquality(condition.dartReceiver,
-                     condition.dartArgument(0),
-                     trueCont,
-                     falseCont);
+      refineEquality(
+          condition.receiver, condition.argument(0), trueCont, falseCont);
       return;
     }
 
     if (condition is ApplyBuiltinOperator &&
         condition.operator == BuiltinOperator.Identical) {
-      refineEquality(condition.argument(0),
-                     condition.argument(1),
-                     trueCont,
-                     falseCont);
+      refineEquality(
+          condition.argument(0), condition.argument(1), trueCont, falseCont);
       return;
     }
 
@@ -296,7 +285,7 @@
         return [types.intType];
 
       case 'modPow':
-       return [types.intType, types.intType];
+        return [types.intType, types.intType];
     }
     // Note: num methods on int values are handled below.
   }
@@ -304,13 +293,13 @@
   if (types.isDefinitelyNum(receiver)) {
     switch (selector.name) {
       case 'clamp':
-          return [types.numType, types.numType];
+        return [types.numType, types.numType];
       case 'toStringAsFixed':
       case 'toStringAsPrecision':
       case 'toRadixString':
-          return [types.intType];
+        return [types.intType];
       case 'toStringAsExponential':
-          return [types.intType.nullable()];
+        return [types.intType.nullable()];
       case 'compareTo':
       case 'remainder':
       case '+':
@@ -328,7 +317,7 @@
       case '>':
       case '<=':
       case '>=':
-          return [types.numType];
+        return [types.numType];
       default:
         return null;
     }
@@ -389,7 +378,7 @@
       case 'sublist':
         return [types.uintType, types.uintType.nullable()];
       case 'length':
-         return selector.isSetter ? [types.uintType] : null;
+        return selector.isSetter ? [types.uintType] : null;
       case '[]':
       case '[]=':
         return [types.uintType];
@@ -414,7 +403,7 @@
   }
 
   if (lib.isPlatformLibrary && '${lib.canonicalUri}' == 'dart:math') {
-    switch(target.name) {
+    switch (target.name) {
       case 'sqrt':
       case 'sin':
       case 'cos':
diff --git a/pkg/compiler/lib/src/cps_ir/loop_effects.dart b/pkg/compiler/lib/src/cps_ir/loop_effects.dart
index 4a73e5d..d7c3c6f 100644
--- a/pkg/compiler/lib/src/cps_ir/loop_effects.dart
+++ b/pkg/compiler/lib/src/cps_ir/loop_effects.dart
@@ -85,7 +85,8 @@
         if (inner == null) {
           // The shrinking reductions pass must run before any pass that relies
           // on computing loop side effects.
-          world.compiler.reporter.internalError(null,
+          world.compiler.reporter.internalError(
+              null,
               'Unreachable continuations must be removed before computing '
               'loop side effects.');
         }
diff --git a/pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart b/pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart
index 57d71207..35d9b76 100644
--- a/pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart
+++ b/pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart
@@ -123,8 +123,7 @@
         target = loopTarget[node.continuation];
       }
     } else if (node is Branch) {
-      target = _markInnerLoop(
-          loopTarget[node.trueContinuation],
+      target = _markInnerLoop(loopTarget[node.trueContinuation],
           loopTarget[node.falseContinuation]);
     } else if (node == null) {
       // If the code ends abruptly, use the exit loop provided in [update].
@@ -166,8 +165,7 @@
   /// [catchLoop] is the loop target for the catch clause of the try/catch
   /// surrounding the inserted fragment.
   void update(CpsFragment fragment,
-              {Continuation exitLoop,
-               Continuation catchLoop}) {
+      {Continuation exitLoop, Continuation catchLoop}) {
     if (fragment.isEmpty) return;
     _exitLoop = exitLoop;
     _currentDepth = getDepth(exitLoop);
diff --git a/pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart b/pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart
index 98df30a..95ee597 100644
--- a/pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart
+++ b/pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart
@@ -121,7 +121,8 @@
       Node use = ref.parent;
       if (use is InvokeContinuation) {
         for (Parameter loopParam in parameters) {
-          use.argumentRefs.add(new Reference<Primitive>(loopParam)..parent = use);
+          use.argumentRefs
+              .add(new Reference<Primitive>(loopParam)..parent = use);
         }
       }
     }
@@ -148,7 +149,7 @@
       hoistedCase = trueCont;
       loopCase = falseCont;
     } else if (loopHierarchy.getLoopHeader(falseCont) != loop &&
-               loopHierarchy.getLoopHeader(trueCont) == loop) {
+        loopHierarchy.getLoopHeader(trueCont) == loop) {
       hoistedCase = falseCont;
       loopCase = trueCont;
     } else {
@@ -211,13 +212,12 @@
     //     branch b newTrue newFalse
     //
     InvokeContinuation loopEntry = loopBinding.body;
-    List<Primitive> loopArgs =
-        loopEntry.arguments.toList();
+    List<Primitive> loopArgs = loopEntry.arguments.toList();
     CpsFragment cps = new CpsFragment();
-    cps.branch(condition,
-          strict: branch.isStrictCheck,
-          negate: hoistedCase == falseCont)
-       .invokeContinuation(hoistedCase, loopArgs);
+    cps
+        .branch(condition,
+            strict: branch.isStrictCheck, negate: hoistedCase == falseCont)
+        .invokeContinuation(hoistedCase, loopArgs);
 
     // The continuations created in the fragment need to have their loop header
     // set so the loop hierarchy remains intact
diff --git a/pkg/compiler/lib/src/cps_ir/mutable_ssa.dart b/pkg/compiler/lib/src/cps_ir/mutable_ssa.dart
index 0c86696..ee44978 100644
--- a/pkg/compiler/lib/src/cps_ir/mutable_ssa.dart
+++ b/pkg/compiler/lib/src/cps_ir/mutable_ssa.dart
@@ -110,8 +110,7 @@
   }
 
   bool isJoinContinuation(Continuation cont) {
-    return !cont.hasExactlyOneUse ||
-           cont.firstRef.parent is InvokeContinuation;
+    return !cont.hasExactlyOneUse || cont.firstRef.parent is InvokeContinuation;
   }
 
   /// If some useful source information is attached to exactly one of the
@@ -131,8 +130,8 @@
   /// will be mutated during the processing.
   ///
   /// Continuations to be processed are put on the stack for later processing.
-  void processBlock(Expression node,
-                    Map<MutableVariable, Primitive> environment) {
+  void processBlock(
+      Expression node, Map<MutableVariable, Primitive> environment) {
     Expression next = node.next;
     for (; node is! TailExpression; node = next, next = node.next) {
       if (node is LetMutable && shouldRewrite(node.variable)) {
@@ -221,12 +220,9 @@
       // Enqueue both branches with the current environment.
       // Clone the environments once so the processing of one branch does not
       // mutate the environment needed to process the other branch.
-      stack.add(new ContinuationItem(
-          node.trueContinuation,
+      stack.add(new ContinuationItem(node.trueContinuation,
           new Map<MutableVariable, Primitive>.from(environment)));
-      stack.add(new ContinuationItem(
-          node.falseContinuation,
-          environment));
+      stack.add(new ContinuationItem(node.falseContinuation, environment));
     } else {
       assert(node is Throw || node is Unreachable);
     }
diff --git a/pkg/compiler/lib/src/cps_ir/octagon.dart b/pkg/compiler/lib/src/cps_ir/octagon.dart
index 691c15d..83feb77 100644
--- a/pkg/compiler/lib/src/cps_ir/octagon.dart
+++ b/pkg/compiler/lib/src/cps_ir/octagon.dart
@@ -72,8 +72,8 @@
     SignedVariable v1 = new SignedVariable._make();
     if (min != null) {
       // v1 >= min   <==>   -v1 - v1 <= -2 * min
-      v1.negated._constraints.add(
-          new Constraint(v1.negated, v1.negated, -2 * min));
+      v1.negated._constraints
+          .add(new Constraint(v1.negated, v1.negated, -2 * min));
     }
     if (max != null) {
       // v1 <= max   <==>   v1 + v1 <= 2 * max
diff --git a/pkg/compiler/lib/src/cps_ir/optimize_interceptors.dart b/pkg/compiler/lib/src/cps_ir/optimize_interceptors.dart
index d9c59b6..65500a5 100644
--- a/pkg/compiler/lib/src/cps_ir/optimize_interceptors.dart
+++ b/pkg/compiler/lib/src/cps_ir/optimize_interceptors.dart
@@ -59,10 +59,10 @@
 
   bool hasNoFalsyValues(ClassElement class_) {
     return class_ != helpers.jsInterceptorClass &&
-       class_ != helpers.jsNullClass &&
-       class_ != helpers.jsBoolClass &&
-       class_ != helpers.jsStringClass &&
-       !class_.isSubclassOf(helpers.jsNumberClass);
+        class_ != helpers.jsNullClass &&
+        class_ != helpers.jsBoolClass &&
+        class_ != helpers.jsStringClass &&
+        !class_.isSubclassOf(helpers.jsNumberClass);
   }
 
   Continuation getCurrentOuterLoop({Continuation scope}) {
@@ -79,10 +79,10 @@
   /// The constant will be hoisted out of loops, and shared with other requests
   /// for the same constant as long as it is in scope.
   Primitive makeConstantFor(ConstantValue constant,
-                            {Expression useSite,
-                             TypeMask type,
-                             SourceInformation sourceInformation,
-                             Entity hint}) {
+      {Expression useSite,
+      TypeMask type,
+      SourceInformation sourceInformation,
+      Entity hint}) {
     Constant prim =
         new Constant(constant, sourceInformation: sourceInformation);
     prim.hint = hint;
@@ -104,11 +104,11 @@
     for (Reference ref = interceptor.firstRef; ref != null; ref = ref.next) {
       Node use = ref.parent;
       if (use is InvokeMethod) {
-        TypeMask type = use.dartReceiver.type;
+        TypeMask type = use.receiver.type;
         bool canOccurAsReceiver(ClassElement elem) {
           return classWorld.isInstantiated(elem) &&
-              !typeSystem.areDisjoint(type,
-                  typeSystem.getInterceptorSubtypes(elem));
+              !typeSystem.areDisjoint(
+                  type, typeSystem.getInterceptorSubtypes(elem));
         }
         Iterable<ClassElement> classes =
             backend.getInterceptedClassesOn(use.selector.name);
@@ -137,7 +137,7 @@
     for (Reference ref = node.firstRef; ref != null; ref = ref.next) {
       if (ref.parent is InvokeMethod) {
         InvokeMethod invoke = ref.parent;
-        if (invoke.receiverRef != ref) return false;
+        if (invoke.interceptorRef != ref) return false;
         var interceptedClasses =
             backend.getInterceptedClassesOn(invoke.selector.name);
         if (interceptedClasses.contains(helpers.jsDoubleClass)) return false;
@@ -157,7 +157,7 @@
       Node use = ref.parent;
       if (use is InvokeMethod) {
         if (selectorsOnNull.contains(use.selector) &&
-            use.dartReceiver.type.isNullable) {
+            use.receiver.type.isNullable) {
           return true;
         }
       } else {
@@ -210,7 +210,9 @@
           type: interceptor.type,
           sourceInformation: interceptor.sourceInformation);
       constantPrim.useElementAsHint(interceptor.hint);
-      interceptor..replaceUsesWith(constantPrim)..destroy();
+      interceptor
+        ..replaceUsesWith(constantPrim)
+        ..destroy();
       let.remove();
     } else {
       Primitive constantPrim = makeConstantFor(constant,
@@ -226,15 +228,16 @@
         cps.ifFalsy(input).invokeContinuation(cont, [input]);
       } else {
         // If there are other falsy values compile as "x == null ? x : CONST".
-        Primitive condition = cps.applyBuiltin(
-            BuiltinOperator.LooseEq,
-            [input, cps.makeNull()]);
+        Primitive condition =
+            cps.applyBuiltin(BuiltinOperator.LooseEq, [input, cps.makeNull()]);
         cps.ifTruthy(condition).invokeContinuation(cont, [input]);
       }
       cps.invokeContinuation(cont, [constantPrim]);
       cps.context = cont;
       cps.insertAbove(let);
-      interceptor..replaceUsesWith(param)..destroy();
+      interceptor
+        ..replaceUsesWith(param)
+        ..destroy();
       let.remove();
     }
     return true;
@@ -261,7 +264,7 @@
   @override
   void visitInvokeMethod(InvokeMethod node) {
     if (node.callingConvention != CallingConvention.Intercepted) return;
-    Primitive interceptor = node.receiver;
+    Primitive interceptor = node.interceptor;
     if (interceptor is! Interceptor ||
         interceptor.hasMultipleUses ||
         loopHeaderFor[interceptor] != currentLoopHeader) {
@@ -269,8 +272,7 @@
     }
     // TODO(asgerf): Consider heuristics for when to use one-shot interceptors.
     //   E.g. using only one-shot interceptors with a fast path.
-    node.callingConvention = CallingConvention.OneShotIntercepted;
-    node..receiverRef.unlink()..receiverRef = node.argumentRefs.removeAt(0);
+    node.makeOneShotIntercepted();
   }
 
   @override
@@ -304,7 +306,9 @@
       Constant existing = sharedConstantFor[prim.value];
       if (existing != null) {
         existing.useElementAsHint(prim.hint);
-        prim..replaceUsesWith(existing)..destroy();
+        prim
+          ..replaceUsesWith(existing)
+          ..destroy();
         node.remove();
         return next;
       }
diff --git a/pkg/compiler/lib/src/cps_ir/optimizers.dart b/pkg/compiler/lib/src/cps_ir/optimizers.dart
index 2b248fe..8af5154 100644
--- a/pkg/compiler/lib/src/cps_ir/optimizers.dart
+++ b/pkg/compiler/lib/src/cps_ir/optimizers.dart
@@ -42,7 +42,7 @@
 /// Returns true if [value] is false, null, 0, -0, NaN, or the empty string.
 bool isFalsyConstant(ConstantValue value) {
   return value.isFalse ||
-      value.isNull  ||
+      value.isNull ||
       value.isZero ||
       value.isMinusZero ||
       value.isNaN ||
@@ -59,6 +59,10 @@
 
 /// Selectors that do not throw when invoked on the null value.
 final List<Selector> selectorsOnNull = <Selector>[
-    Selectors.equals, Selectors.hashCode_, Selectors.runtimeType_,
-    Selectors.toString_, Selectors.toStringGetter,
-    Selectors.noSuchMethodGetter];
+  Selectors.equals,
+  Selectors.hashCode_,
+  Selectors.runtimeType_,
+  Selectors.toString_,
+  Selectors.toStringGetter,
+  Selectors.noSuchMethodGetter
+];
diff --git a/pkg/compiler/lib/src/cps_ir/parent_visitor.dart b/pkg/compiler/lib/src/cps_ir/parent_visitor.dart
index 33896e0..bb98c33 100644
--- a/pkg/compiler/lib/src/cps_ir/parent_visitor.dart
+++ b/pkg/compiler/lib/src/cps_ir/parent_visitor.dart
@@ -40,4 +40,3 @@
     node.parent = _parent;
   }
 }
-
diff --git a/pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart b/pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart
index aed13e6..933111e 100644
--- a/pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart
+++ b/pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart
@@ -7,10 +7,6 @@
 import 'optimizers.dart';
 import 'cps_fragment.dart';
 import '../js_backend/js_backend.dart';
-import '../constants/values.dart';
-import '../elements/elements.dart';
-import '../universe/selector.dart';
-import '../types/types.dart';
 import 'type_mask_system.dart';
 
 /// Optimizations based on intraprocedural forward dataflow analysis, taking
@@ -63,8 +59,7 @@
 // TODO(asgerf): Could be more precise if GVN shared expressions that are not
 // in direct scope of one another, e.g. by using phis pass the shared value.
 //
-class PathBasedOptimizer extends TrampolineRecursiveVisitor
-                         implements Pass {
+class PathBasedOptimizer extends TrampolineRecursiveVisitor implements Pass {
   String get passName => 'Path-based optimizations';
 
   // Classification of all values.
@@ -157,27 +152,23 @@
   }
 
   void visitInvokeMethod(InvokeMethod node) {
-    int receiverValue = valueOf[node.dartReceiver] ?? ANY;
+    int receiverValue = valueOf[node.receiver] ?? ANY;
     if (!backend.isInterceptedSelector(node.selector)) {
       // Only self-interceptors can respond to a non-intercepted selector.
-      valueOf[node.dartReceiver] = receiverValue & SELF_INTERCEPTOR;
+      valueOf[node.receiver] = receiverValue & SELF_INTERCEPTOR;
     } else if (receiverValue & ~SELF_INTERCEPTOR == 0 &&
-               node.callingConvention == CallingConvention.Intercepted) {
+        node.callingConvention == CallingConvention.Intercepted) {
       // This is an intercepted call whose receiver is definitely a
       // self-interceptor.
       // TODO(25646): If TypeMasks could represent "any self-interceptor" this
       //   optimization should be subsumed by type propagation.
-      node.receiverRef.changeTo(node.dartReceiver);
+      node.interceptorRef.changeTo(node.receiver);
 
       // Replace the extra receiver argument with a dummy value if the
       // target definitely does not use it.
-      if (typeSystem.targetIgnoresReceiverArgument(node.dartReceiver.type,
-            node.selector)) {
-        Constant dummy = new Constant(new IntConstantValue(0))
-            ..type = typeSystem.intType;
-        new LetPrim(dummy).insertAbove(node.parent);
-        node.argumentRefs[0].changeTo(dummy);
-        node.callingConvention = CallingConvention.DummyIntercepted;
+      if (typeSystem.targetIgnoresReceiverArgument(
+          node.receiver.type, node.selector)) {
+        node.makeDummyIntercepted();
       }
     }
   }
diff --git a/pkg/compiler/lib/src/cps_ir/redundant_join.dart b/pkg/compiler/lib/src/cps_ir/redundant_join.dart
index 59cac26..3ba1d61 100644
--- a/pkg/compiler/lib/src/cps_ir/redundant_join.dart
+++ b/pkg/compiler/lib/src/cps_ir/redundant_join.dart
@@ -20,7 +20,7 @@
 /// meaningless during this pass, until repaired by [AlphaRenamer] at
 /// the end.
 class RedundantJoinEliminator extends TrampolineRecursiveVisitor
-      implements Pass {
+    implements Pass {
   String get passName => 'Redundant join elimination';
 
   final Set<Branch> workSet = new Set<Branch>();
@@ -110,7 +110,7 @@
     // replacing a boolean variable with a labeled break.
     // TODO(asgerf): The labeled break might be better? Evaluate.
     if (!(trueHits == 1 && !trueCall.isEscapingTry ||
-          falseHits == 1 && !falseCall.isEscapingTry)) {
+        falseHits == 1 && !falseCall.isEscapingTry)) {
       return;
     }
 
@@ -140,8 +140,8 @@
           Expression use = ref.parent;
           if (use is InvokeContinuation) {
             for (Parameter param in branchCont.parameters) {
-              use.argumentRefs.add(
-                  new Reference<Primitive>(param)..parent = use);
+              use.argumentRefs
+                  .add(new Reference<Primitive>(param)..parent = use);
             }
           } else {
             // The branch will be eliminated, so don't worry about updating it.
diff --git a/pkg/compiler/lib/src/cps_ir/redundant_phi.dart b/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
index b612d13..96e6431 100644
--- a/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
+++ b/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
@@ -15,7 +15,8 @@
 /// (except for feedback). Redundant parameters are removed from the
 /// continuation signature, all invocations, and replaced within the
 /// continuation body.
-class RedundantPhiEliminator extends TrampolineRecursiveVisitor implements Pass {
+class RedundantPhiEliminator extends TrampolineRecursiveVisitor
+    implements Pass {
   String get passName => 'Redundant phi elimination';
 
   final Set<Continuation> workSet = new Set<Continuation>();
@@ -122,8 +123,8 @@
       // Add continuations of about-to-be modified invokes to worklist since
       // we might introduce new optimization opportunities.
       for (Reference ref = oldDefinition.firstRef;
-           ref != null;
-           ref = ref.next) {
+          ref != null;
+          ref = ref.next) {
         Node parent = ref.parent;
         if (parent is InvokeContinuation) {
           Continuation thatCont = parent.continuation;
diff --git a/pkg/compiler/lib/src/cps_ir/redundant_refinement.dart b/pkg/compiler/lib/src/cps_ir/redundant_refinement.dart
index cff47d6..8cd13b3 100644
--- a/pkg/compiler/lib/src/cps_ir/redundant_refinement.dart
+++ b/pkg/compiler/lib/src/cps_ir/redundant_refinement.dart
@@ -28,7 +28,7 @@
 /// Ideally, this pass should go away and GVN should handle refinements
 /// directly.
 class RedundantRefinementEliminator extends TrampolineRecursiveVisitor
-                                    implements Pass {
+    implements Pass {
   String get passName => 'Redundant refinement elimination';
 
   TypeMaskSystem typeSystem;
@@ -45,7 +45,9 @@
       Refinement refinement = node.primitive;
       Primitive value = refinement.value.definition;
       if (typeSystem.isMorePreciseOrEqual(value.type, refinement.refineType)) {
-        refinement..replaceUsesWith(value)..destroy();
+        refinement
+          ..replaceUsesWith(value)
+          ..destroy();
         node.remove();
         return next;
       }
diff --git a/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart b/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
index 5eb8156..a913f08 100644
--- a/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
+++ b/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
@@ -8,8 +8,7 @@
 import 'dart:collection' show Queue;
 
 import '../common.dart';
-import '../compiler.dart' as dart2js show
-    Compiler;
+import '../compiler.dart' as dart2js show Compiler;
 import '../constants/values.dart';
 import '../elements/elements.dart';
 import '../types/types.dart';
@@ -44,7 +43,6 @@
  * can create new candidates, iterate until all scalar replacements are done.
  */
 class ScalarReplacementVisitor extends TrampolineRecursiveVisitor {
-
   final InternalErrorFunction internalError;
   final World classWorld;
   ScalarReplacementRemovalVisitor removalVisitor;
@@ -71,7 +69,6 @@
   }
 
   void tryScalarReplacement(Primitive allocation) {
-
     // We can do scalar replacement of an aggregate if all uses of an allocation
     // are reads or writes.
     for (Reference ref = allocation.firstRef; ref != null; ref = ref.next) {
@@ -101,11 +98,10 @@
     if (allocation is CreateInstance) {
       int i = 0;
       allocation.classElement.forEachInstanceField(
-        (ClassElement enclosingClass, FieldElement field) {
-          Primitive argument = allocation.argument(i++);
-          fieldInitialValues[field] = argument;
-        },
-        includeSuperAndInjectedMembers: true);
+          (ClassElement enclosingClass, FieldElement field) {
+        Primitive argument = allocation.argument(i++);
+        fieldInitialValues[field] = argument;
+      }, includeSuperAndInjectedMembers: true);
     }
 
     // Create [MutableVariable]s for each written field. Initialize the
@@ -113,7 +109,7 @@
     // `null` constant if there is not initial value.
     Map<FieldElement, MutableVariable> cells =
         <FieldElement, MutableVariable>{};
-    InteriorNode insertionPoint = allocation.parent;  // LetPrim
+    InteriorNode insertionPoint = allocation.parent; // LetPrim
     for (FieldElement field in writes) {
       MutableVariable variable = new MutableVariable(field);
       variable.type = new TypeMask.nonNullEmpty();
@@ -214,7 +210,6 @@
   }
 }
 
-
 /// Visit a just-deleted subterm and unlink all [Reference]s in it.  Reconsider
 /// allocations for scalar replacement.
 class ScalarReplacementRemovalVisitor extends TrampolineRecursiveVisitor {
diff --git a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
index 1c84ca6..3e3fd94 100644
--- a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
+++ b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
@@ -39,9 +39,8 @@
   void _debugWorklist(FunctionDefinition root) {
     while (_worklist.isNotEmpty) {
       _ReductionTask task = _worklist.removeLast();
-      String irBefore = root.debugString({
-        task.node: '${task.kind} applied here'
-      });
+      String irBefore =
+          root.debugString({task.node: '${task.kind} applied here'});
       _processTask(task);
       Set seenRedexes = _worklist.where(isValidTask).toSet();
       Set actualRedexes = (new _RedexVisitor([])..visit(root)).worklist.toSet();
@@ -51,9 +50,7 @@
         print('\nBEFORE $task:\n');
         print(irBefore);
         print('\nAFTER $task:\n');
-        root.debugPrint({
-          missedTask.node: 'MISSED ${missedTask.kind}'
-        });
+        root.debugPrint({missedTask.node: 'MISSED ${missedTask.kind}'});
         throw 'Missed $missedTask after processing $task';
       }
     }
@@ -79,7 +76,7 @@
   /// Removes the given node from the CPS graph, replacing it with its body
   /// and marking it as deleted. The node's parent must be a [[InteriorNode]].
   void _removeNode(InteriorNode node) {
-    Node body           = node.body;
+    Node body = node.body;
     InteriorNode parent = node.parent;
     assert(parent.body == node);
 
@@ -291,8 +288,7 @@
       return;
     }
 
-    InvokeContinuation invoke = new InvokeContinuation(
-        target, <Primitive>[]
+    InvokeContinuation invoke = new InvokeContinuation(target, <Primitive>[]
         // TODO(sra): Add sourceInformation.
         /*, sourceInformation: branch.sourceInformation*/);
     branch.parent.body = invoke;
@@ -356,8 +352,8 @@
 
   void _checkUselessBranchTarget(Continuation continuation) {
     if (_isBranchTargetOfUselessIf(continuation)) {
-      _worklist.add(new _ReductionTask(_ReductionKind.BRANCH,
-          continuation.firstRef.parent));
+      _worklist.add(new _ReductionTask(
+          _ReductionKind.BRANCH, continuation.firstRef.parent));
     }
   }
 
@@ -375,8 +371,8 @@
     primitive = primitive.unrefined;
     if (primitive is Parameter) {
       if (_isDeadParameter(primitive)) {
-        _worklist.add(new _ReductionTask(_ReductionKind.DEAD_PARAMETER,
-                                         primitive));
+        _worklist
+            .add(new _ReductionTask(_ReductionKind.DEAD_PARAMETER, primitive));
       }
     } else if (primitive.parent is LetPrim) {
       LetPrim letPrim = primitive.parent;
@@ -400,15 +396,15 @@
 /// preventing it from being eliminated.
 bool _isDeadVal(LetPrim node) {
   return !_isRemoved(node) &&
-         node.primitive.hasNoRefinedUses &&
-         node.primitive.isSafeForElimination;
+      node.primitive.hasNoRefinedUses &&
+      node.primitive.isSafeForElimination;
 }
 
 /// Returns true iff the continuation is unused.
 bool _isDeadCont(Continuation cont) {
   return !_isRemoved(cont) &&
-         !cont.isReturnContinuation &&
-         !cont.hasAtLeastOneUse;
+      !cont.isReturnContinuation &&
+      !cont.hasAtLeastOneUse;
 }
 
 /// Returns true iff the continuation has a body (i.e., it is not the return
@@ -541,8 +537,7 @@
   if (falseBody is! InvokeContinuation) return false;
   InvokeContinuation trueInvoke = trueBody;
   InvokeContinuation falseInvoke = falseBody;
-  if (trueInvoke.continuation !=
-      falseInvoke.continuation) {
+  if (trueInvoke.continuation != falseInvoke.continuation) {
     return false;
   }
   // Matching zero arguments should be adequate, since isomorphic true and false
@@ -607,7 +602,7 @@
     // detect it.
     if (_isDeadCont(node)) {
       worklist.add(new _ReductionTask(_ReductionKind.DEAD_CONT, node));
-    } else if (_isBetaContLin(node)){
+    } else if (_isBetaContLin(node)) {
       worklist.add(new _ReductionTask(_ReductionKind.BETA_CONT_LIN, node));
     } else if (_isEtaCont(node)) {
       worklist.add(new _ReductionTask(_ReductionKind.ETA_CONT, node));
@@ -655,8 +650,8 @@
       if (parent is LetPrim && _isDeadVal(parent)) {
         worklist.add(new _ReductionTask(_ReductionKind.DEAD_VAL, parent));
       } else if (primitive is Parameter && _isDeadParameter(primitive)) {
-        worklist.add(new _ReductionTask(_ReductionKind.DEAD_PARAMETER,
-            primitive));
+        worklist
+            .add(new _ReductionTask(_ReductionKind.DEAD_PARAMETER, primitive));
       }
     } else if (reference.definition is Continuation) {
       Continuation cont = reference.definition;
@@ -703,11 +698,13 @@
   }
 
   _ReductionTask(this.kind, this.node) {
-    assert(node is Continuation || node is LetPrim || node is Parameter ||
-           node is Branch);
+    assert(node is Continuation ||
+        node is LetPrim ||
+        node is Parameter ||
+        node is Branch);
   }
 
-  bool operator==(_ReductionTask that) {
+  bool operator ==(_ReductionTask that) {
     return (that.kind == this.kind && that.node == this.node);
   }
 
diff --git a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
index 2042320..c77bd02 100644
--- a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
@@ -104,9 +104,8 @@
           new TypeMask.nonNullSubtype(classWorld.stringClass, classWorld);
       TypeMask anyBool =
           new TypeMask.nonNullSubtype(classWorld.boolClass, classWorld);
-      _numStringBoolType =
-          new TypeMask.unionOf(<TypeMask>[anyNum, anyString, anyBool],
-              classWorld);
+      _numStringBoolType = new TypeMask.unionOf(
+          <TypeMask>[anyNum, anyString, anyBool], classWorld);
     }
     return _numStringBoolType;
   }
@@ -114,8 +113,10 @@
   @override
   TypeMask get fixedLengthType {
     if (_fixedLengthType == null) {
-      List<TypeMask> fixedLengthTypes =
-          <TypeMask>[stringType, backend.fixedArrayType];
+      List<TypeMask> fixedLengthTypes = <TypeMask>[
+        stringType,
+        backend.fixedArrayType
+      ];
       if (classWorld.isInstantiated(helpers.typedArrayClass)) {
         fixedLengthTypes.add(nonNullSubclass(helpers.typedArrayClass));
       }
@@ -128,13 +129,14 @@
   TypeMask get interceptorType {
     if (_interceptorType == null) {
       _interceptorType =
-        new TypeMask.nonNullSubtype(helpers.jsInterceptorClass, classWorld);
+          new TypeMask.nonNullSubtype(helpers.jsInterceptorClass, classWorld);
     }
     return _interceptorType;
   }
 
   @override
-  TypeMask get interceptedTypes { // Does not include null.
+  TypeMask get interceptedTypes {
+    // Does not include null.
     if (_interceptedTypes == null) {
       // We redundantly include subtypes of num/string/bool as intercepted
       // types, because the type system does not infer that their
@@ -154,9 +156,8 @@
           new TypeMask.nonNullSubtype(helpers.jsIndexableClass, classWorld);
       TypeMask anyString =
           new TypeMask.nonNullSubtype(classWorld.stringClass, classWorld);
-      __indexableTypeTest = new TypeMask.unionOf(
-          <TypeMask>[indexable, anyString],
-          classWorld);
+      __indexableTypeTest =
+          new TypeMask.unionOf(<TypeMask>[indexable, anyString], classWorld);
     }
     return __indexableTypeTest;
   }
@@ -169,15 +170,14 @@
   TypeMaskSystem(dart2js.Compiler compiler)
       : inferrer = compiler.typesTask,
         classWorld = compiler.world,
-        backend = compiler.backend {
-  }
+        backend = compiler.backend {}
 
   @override
   bool methodIgnoresReceiverArgument(FunctionElement function) {
     assert(backend.isInterceptedMethod(function));
     ClassElement clazz = function.enclosingClass.declaration;
     return !clazz.isSubclassOf(helpers.jsInterceptorClass) &&
-           !classWorld.isUsedAsMixin(clazz);
+        !classWorld.isUsedAsMixin(clazz);
   }
 
   @override
@@ -191,7 +191,7 @@
       if (target is! FunctionElement) return false;
       FunctionElement function = target;
       return selector.isGetter && !function.isGetter ||
-             !methodIgnoresReceiverArgument(function);
+          !methodIgnoresReceiverArgument(function);
     }
     return !classWorld.allFunctions.filter(selector, type).any(needsReceiver);
   }
@@ -271,8 +271,8 @@
     return a.intersection(b, classWorld);
   }
 
-  void associateConstantValueWithElement(ConstantValue constant,
-                                         Element element) {
+  void associateConstantValueWithElement(
+      ConstantValue constant, Element element) {
     // TODO(25093): Replace this code with an approach that works for anonymous
     // constants and non-constant literals.
     if (constant is ListConstantValue || constant is MapConstantValue) {
@@ -281,7 +281,7 @@
       TypeMask computed = computeTypeMask(inferrer.compiler, constant);
       TypeMask inferred = inferrer.getGuaranteedTypeOfElement(element);
       TypeMask best = intersection(inferred, computed);
-      assert(!best.isEmpty);
+      assert(!best.isEmptyOrNull);
       _constantMasks[constant] = best;
     }
   }
@@ -289,13 +289,13 @@
   @override
   TypeMask getTypeOf(ConstantValue constant) {
     return _constantMasks[constant] ??
-           computeTypeMask(inferrer.compiler, constant);
+        computeTypeMask(inferrer.compiler, constant);
   }
 
   @override
   ConstantValue getConstantOf(TypeMask mask) {
     if (!mask.isValue) return null;
-    if (mask.isNullable) return null;  // e.g. 'true or null'.
+    if (mask.isNullable) return null; // e.g. 'true or null'.
     ValueTypeMask valueMask = mask;
     if (valueMask.value.isBool) return valueMask.value;
     // TODO(sra): Consider other values. Be careful with large strings.
@@ -420,8 +420,9 @@
   @override
   bool isDefinitelyExtendableArray(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return t.nonNullable().satisfies(helpers.jsExtendableArrayClass,
-                                     classWorld);
+    return t
+        .nonNullable()
+        .satisfies(helpers.jsExtendableArrayClass, classWorld);
   }
 
   @override
@@ -433,8 +434,9 @@
   @override
   bool isDefinitelyMutableIndexable(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return t.nonNullable().satisfies(helpers.jsMutableIndexableClass,
-        classWorld);
+    return t
+        .nonNullable()
+        .satisfies(helpers.jsMutableIndexableClass, classWorld);
   }
 
   @override
@@ -480,9 +482,8 @@
   }
 
   @override
-  AbstractBool isSubtypeOf(TypeMask value,
-                           types.DartType type,
-                           {bool allowNull}) {
+  AbstractBool isSubtypeOf(TypeMask value, types.DartType type,
+      {bool allowNull}) {
     assert(allowNull != null);
     if (type is types.DynamicType) {
       return AbstractBool.True;
@@ -543,8 +544,7 @@
       if (element == classWorld.stringClass) {
         return stringType;
       }
-      if (element == classWorld.numClass ||
-          element == classWorld.doubleClass) {
+      if (element == classWorld.numClass || element == classWorld.doubleClass) {
         return numType;
       }
       if (element == classWorld.intClass) {
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index 6b09771..50a73e0 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -5,35 +5,23 @@
 
 import 'optimizers.dart';
 
-import '../closure.dart' show
-    ClosureClassElement;
+import '../closure.dart' show ClosureClassElement;
 import '../common.dart';
-import '../common/names.dart' show
-    Identifiers,
-    Selectors;
-import '../compiler.dart' as dart2js show
-    Compiler;
+import '../common/names.dart' show Identifiers, Selectors;
+import '../compiler.dart' as dart2js show Compiler;
 import '../constants/constant_system.dart';
 import '../constants/values.dart';
 import '../dart_types.dart' as types;
 import '../elements/elements.dart';
-import '../io/source_information.dart' show
-    SourceInformation;
-import '../js_backend/backend_helpers.dart' show
-    BackendHelpers;
-import '../js_backend/js_backend.dart' show
-    JavaScriptBackend;
-import '../js_backend/codegen/task.dart' show
-    CpsFunctionCompiler;
-import '../resolution/access_semantics.dart';
+import '../io/source_information.dart' show SourceInformation;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart' show JavaScriptBackend;
+import '../js_backend/codegen/task.dart' show CpsFunctionCompiler;
 import '../resolution/operators.dart';
-import '../resolution/send_structure.dart';
 import '../tree/tree.dart' as ast;
 import '../types/types.dart';
-import '../types/abstract_value_domain.dart' show
-    AbstractBool;
-import '../universe/selector.dart' show
-    Selector;
+import '../types/abstract_value_domain.dart' show AbstractBool;
+import '../universe/selector.dart' show Selector;
 import '../world.dart' show World;
 import 'cps_fragment.dart';
 import 'cps_ir_nodes.dart';
@@ -51,17 +39,17 @@
   final AbstractConstantValue falseValue;
 
   ConstantPropagationLattice(CpsFunctionCompiler functionCompiler)
-    : typeSystem = functionCompiler.typeSystem,
-      constantSystem = functionCompiler.compiler.backend.constantSystem,
-      dartTypes = functionCompiler.compiler.types,
-      anything = new AbstractConstantValue.nonConstant(
-          functionCompiler.typeSystem.dynamicType),
-      nullValue = new AbstractConstantValue.constantValue(
-          new NullConstantValue(), new TypeMask.empty()),
-      trueValue = new AbstractConstantValue.constantValue(
-          new TrueConstantValue(), functionCompiler.typeSystem.boolType),
-      falseValue = new AbstractConstantValue.constantValue(
-          new FalseConstantValue(), functionCompiler.typeSystem.boolType);
+      : typeSystem = functionCompiler.typeSystem,
+        constantSystem = functionCompiler.compiler.backend.constantSystem,
+        dartTypes = functionCompiler.compiler.types,
+        anything = new AbstractConstantValue.nonConstant(
+            functionCompiler.typeSystem.dynamicType),
+        nullValue = new AbstractConstantValue.constantValue(
+            new NullConstantValue(), new TypeMask.empty()),
+        trueValue = new AbstractConstantValue.constantValue(
+            new TrueConstantValue(), functionCompiler.typeSystem.boolType),
+        falseValue = new AbstractConstantValue.constantValue(
+            new FalseConstantValue(), functionCompiler.typeSystem.boolType);
 
   AbstractConstantValue constant(ConstantValue value, [TypeMask type]) {
     if (type == null) type = typeSystem.getTypeOf(value);
@@ -93,33 +81,33 @@
   /// True if all members of this value are booleans.
   bool isDefinitelyBool(AbstractConstantValue value, {bool allowNull: false}) {
     return value.isNothing ||
-      typeSystem.isDefinitelyBool(value.type, allowNull: allowNull);
+        typeSystem.isDefinitelyBool(value.type, allowNull: allowNull);
   }
 
   /// True if all members of this value are numbers.
   bool isDefinitelyNum(AbstractConstantValue value, {bool allowNull: false}) {
     return value.isNothing ||
-      typeSystem.isDefinitelyNum(value.type, allowNull: allowNull);
+        typeSystem.isDefinitelyNum(value.type, allowNull: allowNull);
   }
 
   /// True if all members of this value are strings.
   bool isDefinitelyString(AbstractConstantValue value,
-                          {bool allowNull: false}) {
+      {bool allowNull: false}) {
     return value.isNothing ||
-      typeSystem.isDefinitelyString(value.type, allowNull: allowNull);
+        typeSystem.isDefinitelyString(value.type, allowNull: allowNull);
   }
 
   /// True if all members of this value are numbers, strings, or booleans.
   bool isDefinitelyNumStringBool(AbstractConstantValue value,
-                                 {bool allowNull: false}) {
+      {bool allowNull: false}) {
     return value.isNothing ||
-      typeSystem.isDefinitelyNumStringBool(value.type, allowNull: allowNull);
+        typeSystem.isDefinitelyNumStringBool(value.type, allowNull: allowNull);
   }
 
   /// True if this value cannot be a string, number, or boolean.
   bool isDefinitelyNotNumStringBool(AbstractConstantValue value) {
     return value.isNothing ||
-      typeSystem.isDefinitelyNotNumStringBool(value.type);
+        typeSystem.isDefinitelyNotNumStringBool(value.type);
   }
 
   /// True if this value cannot be a non-integer double.
@@ -128,63 +116,58 @@
   /// it is a whole number and is not NaN, Infinity, or minus Infinity.
   bool isDefinitelyNotNonIntegerDouble(AbstractConstantValue value) {
     return value.isNothing ||
-      value.isConstant && !value.constant.isDouble ||
-      typeSystem.isDefinitelyNotNonIntegerDouble(value.type);
+        value.isConstant && !value.constant.isDouble ||
+        typeSystem.isDefinitelyNotNonIntegerDouble(value.type);
   }
 
-  bool isDefinitelyInt(AbstractConstantValue value,
-                       {bool allowNull: false}) {
+  bool isDefinitelyInt(AbstractConstantValue value, {bool allowNull: false}) {
     return value.isNothing ||
         typeSystem.isDefinitelyInt(value.type, allowNull: allowNull);
   }
 
   bool isDefinitelyUint31(AbstractConstantValue value,
-                          {bool allowNull: false}) {
+      {bool allowNull: false}) {
     return value.isNothing ||
         typeSystem.isDefinitelyUint31(value.type, allowNull: allowNull);
   }
 
   bool isDefinitelyUint32(AbstractConstantValue value,
-                          {bool allowNull: false}) {
+      {bool allowNull: false}) {
     return value.isNothing ||
         typeSystem.isDefinitelyUint32(value.type, allowNull: allowNull);
   }
 
-  bool isDefinitelyUint(AbstractConstantValue value,
-                       {bool allowNull: false}) {
+  bool isDefinitelyUint(AbstractConstantValue value, {bool allowNull: false}) {
     return value.isNothing ||
         typeSystem.isDefinitelyUint(value.type, allowNull: allowNull);
   }
 
-  bool isDefinitelyArray(AbstractConstantValue value,
-                              {bool allowNull: false}) {
+  bool isDefinitelyArray(AbstractConstantValue value, {bool allowNull: false}) {
     return value.isNothing ||
         typeSystem.isDefinitelyArray(value.type, allowNull: allowNull);
   }
 
   bool isDefinitelyMutableArray(AbstractConstantValue value,
-                                     {bool allowNull: false}) {
+      {bool allowNull: false}) {
     return value.isNothing ||
-         typeSystem.isDefinitelyMutableArray(value.type,
-                                                  allowNull: allowNull);
+        typeSystem.isDefinitelyMutableArray(value.type, allowNull: allowNull);
   }
 
   bool isDefinitelyFixedArray(AbstractConstantValue value,
-                              {bool allowNull: false}) {
+      {bool allowNull: false}) {
     return value.isNothing ||
-        typeSystem.isDefinitelyFixedArray(value.type,
-                                          allowNull: allowNull);
+        typeSystem.isDefinitelyFixedArray(value.type, allowNull: allowNull);
   }
 
   bool isDefinitelyExtendableArray(AbstractConstantValue value,
-                                   {bool allowNull: false}) {
+      {bool allowNull: false}) {
     return value.isNothing ||
         typeSystem.isDefinitelyExtendableArray(value.type,
-                                               allowNull: allowNull);
+            allowNull: allowNull);
   }
 
   bool isDefinitelyIndexable(AbstractConstantValue value,
-                             {bool allowNull: false}) {
+      {bool allowNull: false}) {
     return value.isNothing ||
         typeSystem.isDefinitelyIndexable(value.type, allowNull: allowNull);
   }
@@ -212,9 +195,8 @@
   /// If [allowNull] is true, `null` is considered an instance of anything,
   /// otherwise it is only considered an instance of [Object], [dynamic], and
   /// [Null].
-  AbstractBool isSubtypeOf(AbstractConstantValue value,
-                           types.DartType type,
-                           {bool allowNull}) {
+  AbstractBool isSubtypeOf(AbstractConstantValue value, types.DartType type,
+      {bool allowNull}) {
     assert(allowNull != null);
     if (value.isNothing) {
       return AbstractBool.Nothing;
@@ -234,8 +216,8 @@
       }
       if (type == dartTypes.coreTypes.intType) {
         return constantSystem.isInt(value.constant)
-          ? AbstractBool.True
-          : AbstractBool.False;
+            ? AbstractBool.True
+            : AbstractBool.False;
       }
       types.DartType valueType = value.constant.getType(dartTypes.coreTypes);
       if (constantSystem.isSubtype(dartTypes, valueType, type)) {
@@ -258,8 +240,8 @@
   ///
   /// This method returns `null` if a good result could not be found. In that
   /// case, it is best to fall back on interprocedural type information.
-  AbstractConstantValue unaryOp(UnaryOperator operator,
-                                AbstractConstantValue value) {
+  AbstractConstantValue unaryOp(
+      UnaryOperator operator, AbstractConstantValue value) {
     switch (operator.kind) {
       case UnaryOperatorKind.COMPLEMENT:
         return bitNotSpecial(value);
@@ -291,8 +273,7 @@
   /// This method returns `null` if a good result could not be found. In that
   /// case, it is best to fall back on interprocedural type information.
   AbstractConstantValue binaryOp(BinaryOperator operator,
-                         AbstractConstantValue left,
-                         AbstractConstantValue right) {
+      AbstractConstantValue left, AbstractConstantValue right) {
     switch (operator.kind) {
       case BinaryOperatorKind.ADD:
         return addSpecial(left, right);
@@ -357,8 +338,8 @@
     return null; // The caller will use return type from type inference.
   }
 
-  AbstractConstantValue foldUnary(UnaryOperation operation,
-                                  AbstractConstantValue value) {
+  AbstractConstantValue foldUnary(
+      UnaryOperation operation, AbstractConstantValue value) {
     if (value.isNothing) return nothing;
     if (value.isConstant) {
       ConstantValue result = operation.fold(value.constant);
@@ -380,7 +361,6 @@
     return null;
   }
 
-
   AbstractConstantValue foldBinary(BinaryOperation operation,
       AbstractConstantValue left, AbstractConstantValue right) {
     if (left.isNothing || right.isNothing) return nothing;
@@ -391,8 +371,8 @@
     return null;
   }
 
-  AbstractConstantValue closedOnInt(AbstractConstantValue left,
-                                    AbstractConstantValue right) {
+  AbstractConstantValue closedOnInt(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (isDefinitelyInt(left, allowNull: true) &&
         isDefinitelyInt(right, allowNull: true)) {
       return nonConstant(typeSystem.intType);
@@ -400,8 +380,8 @@
     return null;
   }
 
-  AbstractConstantValue closedOnUint(AbstractConstantValue left,
-                                     AbstractConstantValue right) {
+  AbstractConstantValue closedOnUint(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (isDefinitelyUint(left, allowNull: true) &&
         isDefinitelyUint(right, allowNull: true)) {
       return nonConstant(typeSystem.uintType);
@@ -409,8 +389,8 @@
     return null;
   }
 
-  AbstractConstantValue closedOnUint31(AbstractConstantValue left,
-                                       AbstractConstantValue right) {
+  AbstractConstantValue closedOnUint31(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (isDefinitelyUint31(left, allowNull: true) &&
         isDefinitelyUint31(right, allowNull: true)) {
       return nonConstant(typeSystem.uint31Type);
@@ -418,8 +398,8 @@
     return null;
   }
 
-  AbstractConstantValue addSpecial(AbstractConstantValue left,
-                                   AbstractConstantValue right) {
+  AbstractConstantValue addSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded = foldBinary(constantSystem.add, left, right);
     if (folded != null) return folded;
     if (isDefinitelyNum(left, allowNull: true)) {
@@ -432,22 +412,22 @@
     return null;
   }
 
-  AbstractConstantValue subtractSpecial(AbstractConstantValue left,
-                                        AbstractConstantValue right) {
+  AbstractConstantValue subtractSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded =
         foldBinary(constantSystem.subtract, left, right);
     return folded ?? closedOnInt(left, right);
   }
 
-  AbstractConstantValue multiplySpecial(AbstractConstantValue left,
-                                        AbstractConstantValue right) {
+  AbstractConstantValue multiplySpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded =
         foldBinary(constantSystem.multiply, left, right);
     return folded ?? closedOnUint(left, right) ?? closedOnInt(left, right);
   }
 
-  AbstractConstantValue divideSpecial(AbstractConstantValue left,
-                                      AbstractConstantValue right) {
+  AbstractConstantValue divideSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     return foldBinary(constantSystem.divide, left, right);
   }
 
@@ -478,42 +458,41 @@
     return null;
   }
 
-  AbstractConstantValue moduloSpecial(AbstractConstantValue left,
-                                      AbstractConstantValue right) {
+  AbstractConstantValue moduloSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded =
         foldBinary(constantSystem.modulo, left, right);
     return folded ?? closedOnUint(left, right) ?? closedOnInt(left, right);
   }
 
-  AbstractConstantValue remainderSpecial(AbstractConstantValue left,
-                                         AbstractConstantValue right) {
+  AbstractConstantValue remainderSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (left.isNothing || right.isNothing) return nothing;
-    AbstractConstantValue folded = null;  // Remainder not in constant system.
+    AbstractConstantValue folded = null; // Remainder not in constant system.
     return folded ?? closedOnUint(left, right) ?? closedOnInt(left, right);
   }
 
-  AbstractConstantValue codeUnitAtSpecial(AbstractConstantValue left,
-                                          AbstractConstantValue right) {
+  AbstractConstantValue codeUnitAtSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     return foldBinary(constantSystem.codeUnitAt, left, right);
   }
 
-  AbstractConstantValue equalSpecial(AbstractConstantValue left,
-                                     AbstractConstantValue right) {
+  AbstractConstantValue equalSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded =
         foldBinary(constantSystem.equal, left, right);
     if (folded != null) return folded;
     bool behavesLikeIdentity =
         isDefinitelyNumStringBool(left, allowNull: true) ||
-        right.isNullConstant;
-    if (behavesLikeIdentity &&
-        typeSystem.areDisjoint(left.type, right.type)) {
+            right.isNullConstant;
+    if (behavesLikeIdentity && typeSystem.areDisjoint(left.type, right.type)) {
       return constant(new FalseConstantValue());
     }
     return null;
   }
 
-  AbstractConstantValue andSpecial(AbstractConstantValue left,
-                                   AbstractConstantValue right) {
+  AbstractConstantValue andSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded =
         foldBinary(constantSystem.bitAnd, left, right);
     if (folded != null) return folded;
@@ -527,27 +506,27 @@
     return null;
   }
 
-  AbstractConstantValue orSpecial(AbstractConstantValue left,
-                                  AbstractConstantValue right) {
+  AbstractConstantValue orSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded =
         foldBinary(constantSystem.bitOr, left, right);
     return folded ?? closedOnUint31(left, right);
   }
 
-  AbstractConstantValue xorSpecial(AbstractConstantValue left,
-                                   AbstractConstantValue right) {
+  AbstractConstantValue xorSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded =
         foldBinary(constantSystem.bitXor, left, right);
     return folded ?? closedOnUint31(left, right);
   }
 
-  AbstractConstantValue shiftLeftSpecial(AbstractConstantValue left,
-                                         AbstractConstantValue right) {
+  AbstractConstantValue shiftLeftSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     return foldBinary(constantSystem.shiftLeft, left, right);
   }
 
-  AbstractConstantValue shiftRightSpecial(AbstractConstantValue left,
-                                          AbstractConstantValue right) {
+  AbstractConstantValue shiftRightSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     AbstractConstantValue folded =
         foldBinary(constantSystem.shiftRight, left, right);
     if (folded != null) return folded;
@@ -563,8 +542,8 @@
     return null;
   }
 
-  AbstractConstantValue lessSpecial(AbstractConstantValue left,
-                                    AbstractConstantValue right) {
+  AbstractConstantValue lessSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (isDefinitelyUint(left) && right.isZeroOrNegativeConstant) {
       return falseValue; // "uint < 0" is false.
     } else if (left.isNegativeConstant && isDefinitelyUint(right)) {
@@ -573,8 +552,8 @@
     return foldBinary(constantSystem.less, left, right);
   }
 
-  AbstractConstantValue lessEqualSpecial(AbstractConstantValue left,
-                                         AbstractConstantValue right) {
+  AbstractConstantValue lessEqualSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (isDefinitelyUint(left) && right.isNegativeConstant) {
       return falseValue; // "uint <= -1" is false.
     } else if (left.isZeroOrNegativeConstant && isDefinitelyUint(right)) {
@@ -583,8 +562,8 @@
     return foldBinary(constantSystem.lessEqual, left, right);
   }
 
-  AbstractConstantValue greaterSpecial(AbstractConstantValue left,
-                                       AbstractConstantValue right) {
+  AbstractConstantValue greaterSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (left.isZeroOrNegativeConstant && isDefinitelyUint(right)) {
       return falseValue; // "0 > uint" is false
     } else if (isDefinitelyUint(left) && right.isNegativeConstant) {
@@ -593,8 +572,8 @@
     return foldBinary(constantSystem.greater, left, right);
   }
 
-  AbstractConstantValue greaterEqualSpecial(AbstractConstantValue left,
-                                            AbstractConstantValue right) {
+  AbstractConstantValue greaterEqualSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (left.isNegativeConstant && isDefinitelyUint(right)) {
       return falseValue; // "-1 >= uint" is false
     } else if (isDefinitelyUint(left) && right.isZeroOrNegativeConstant) {
@@ -620,15 +599,15 @@
     if (length != null) {
       return intConstant(length);
     }
-    return null;  // The caller will use return type from type inference.
+    return null; // The caller will use return type from type inference.
   }
 
   AbstractConstantValue stringConstant(String value) {
     return constant(new StringConstantValue(new ast.DartString.literal(value)));
   }
 
-  AbstractConstantValue indexSpecial(AbstractConstantValue left,
-                                     AbstractConstantValue right) {
+  AbstractConstantValue indexSpecial(
+      AbstractConstantValue left, AbstractConstantValue right) {
     if (left.isNothing || right.isNothing) return nothing;
     if (right.isConstant) {
       ConstantValue index = right.constant;
@@ -641,7 +620,7 @@
             if (0 <= indexValue && indexValue < stringValue.length) {
               return stringConstant(stringValue[indexValue]);
             } else {
-              return nothing;  // Will throw.
+              return nothing; // Will throw.
             }
           }
         } else if (receiver is ListConstantValue) {
@@ -650,7 +629,7 @@
             if (0 <= indexValue && indexValue < receiver.length) {
               return constant(receiver.entries[indexValue]);
             } else {
-              return nothing;  // Will throw.
+              return nothing; // Will throw.
             }
           }
         } else if (receiver is MapConstantValue) {
@@ -666,7 +645,7 @@
     }
     // TODO(asgerf): Handle case where 'left' is a List or Map constant but
     //               the index is unknown.
-    return null;  // The caller will use return type from type inference.
+    return null; // The caller will use return type from type inference.
   }
 
   AbstractConstantValue stringify(AbstractConstantValue value) {
@@ -728,8 +707,8 @@
     return nonConstant(value.type.nonNullable());
   }
 
-  AbstractConstantValue intersectWithType(AbstractConstantValue value,
-        TypeMask type) {
+  AbstractConstantValue intersectWithType(
+      AbstractConstantValue value, TypeMask type) {
     if (value.isNothing || typeSystem.areDisjoint(value.type, type)) {
       return nothing;
     } else if (value.isConstant) {
@@ -763,7 +742,7 @@
   String get passName => 'Type propagation';
 
   final CpsFunctionCompiler _functionCompiler;
-  final Map<Variable, ConstantValue> _values= <Variable, ConstantValue>{};
+  final Map<Variable, ConstantValue> _values = <Variable, ConstantValue>{};
   final ConstantPropagationLattice _lattice;
   final bool recomputeAll;
 
@@ -779,10 +758,8 @@
   void rewrite(FunctionDefinition root) {
     // Analyze. In this phase, the entire term is analyzed for reachability
     // and the abstract value of each expression.
-    TypePropagationVisitor analyzer = new TypePropagationVisitor(
-        _lattice,
-        _values,
-        _internalError);
+    TypePropagationVisitor analyzer =
+        new TypePropagationVisitor(_lattice, _values, _internalError);
 
     analyzer.analyze(root, recomputeAll);
 
@@ -790,28 +767,24 @@
     // replace branches with fixed targets and side-effect-free expressions
     // with constant results or existing values that are in scope.
     TransformingVisitor transformer = new TransformingVisitor(
-        _compiler,
-        _functionCompiler,
-        _lattice,
-        analyzer,
-        _internalError);
+        _compiler, _functionCompiler, _lattice, analyzer, _internalError);
     transformer.transform(root);
   }
 }
 
 final Map<String, BuiltinOperator> NumBinaryBuiltins =
-  const <String, BuiltinOperator>{
-    '+':  BuiltinOperator.NumAdd,
-    '-':  BuiltinOperator.NumSubtract,
-    '*':  BuiltinOperator.NumMultiply,
-    '/':  BuiltinOperator.NumDivide,
-    '&':  BuiltinOperator.NumAnd,
-    '|':  BuiltinOperator.NumOr,
-    '^':  BuiltinOperator.NumXor,
-    '<':  BuiltinOperator.NumLt,
-    '<=': BuiltinOperator.NumLe,
-    '>':  BuiltinOperator.NumGt,
-    '>=': BuiltinOperator.NumGe
+    const <String, BuiltinOperator>{
+  '+': BuiltinOperator.NumAdd,
+  '-': BuiltinOperator.NumSubtract,
+  '*': BuiltinOperator.NumMultiply,
+  '/': BuiltinOperator.NumDivide,
+  '&': BuiltinOperator.NumAnd,
+  '|': BuiltinOperator.NumOr,
+  '^': BuiltinOperator.NumXor,
+  '<': BuiltinOperator.NumLt,
+  '<=': BuiltinOperator.NumLe,
+  '>': BuiltinOperator.NumGt,
+  '>=': BuiltinOperator.NumGe
 };
 
 /**
@@ -837,14 +810,10 @@
 
   TypeCheckOperator checkIsNumber;
 
-  TransformingVisitor(this.compiler,
-                      this.functionCompiler,
-                      this.lattice,
-                      this.analyzer,
-                      this.internalError) {
+  TransformingVisitor(this.compiler, this.functionCompiler, this.lattice,
+      this.analyzer, this.internalError) {
     checkIsNumber = new ClassTypeCheckOperator(
-        helpers.jsNumberClass,
-        BuiltinOperator.IsNotNumber);
+        helpers.jsNumberClass, BuiltinOperator.IsNotNumber);
   }
 
   void transform(FunctionDefinition root) {
@@ -856,8 +825,8 @@
       if (getValue(param).isNothing) {
         // Replace with `throw "Unreachable";`
         CpsFragment cps = new CpsFragment(null);
-        Primitive message = cps.makeConstant(
-            new StringConstantValue.fromString("Unreachable"));
+        Primitive message =
+            cps.makeConstant(new StringConstantValue.fromString("Unreachable"));
         cps.put(new Throw(message));
         replaceSubtree(root.body, cps.result);
         return;
@@ -968,7 +937,7 @@
     }
     // If a primitive has a value, but can't return anything, it must throw
     // or diverge.
-    return prim.hasValue && prim.type.isEmpty && !prim.type.isNullable;
+    return prim.hasValue && prim.type.isEmpty;
   }
 
   void visitContinuation(Continuation node) {
@@ -1160,17 +1129,17 @@
   /// Returns `true` if the node was replaced.
   specializeOperatorCall(InvokeMethod node) {
     if (!backend.isInterceptedSelector(node.selector)) return null;
-    if (node.dartArgumentsLength > 1) return null;
+    if (node.argumentRefs.length > 1) return null;
     if (node.callingConvention == CallingConvention.OneShotIntercepted) {
       return null;
     }
 
-    bool trustPrimitives = compiler.trustPrimitives;
+    bool trustPrimitives = compiler.options.trustPrimitives;
 
     /// Check that the receiver and argument satisfy the given type checks, and
     /// throw a [NoSuchMethodError] or [ArgumentError] if the check fails.
     CpsFragment makeGuard(TypeCheckOperator receiverGuard,
-                          [TypeCheckOperator argumentGuard]) {
+        [TypeCheckOperator argumentGuard]) {
       CpsFragment cps = new CpsFragment(node.sourceInformation);
 
       // Make no guards if trusting primitives.
@@ -1178,11 +1147,10 @@
 
       // Determine which guards are needed.
       ChecksNeeded receiverChecks =
-          receiverGuard.getChecksNeeded(node.dartReceiver, classWorld);
+          receiverGuard.getChecksNeeded(node.receiver, classWorld);
       bool needReceiverGuard = receiverChecks != ChecksNeeded.None;
-      bool needArgumentGuard =
-          argumentGuard != null &&
-          argumentGuard.needsCheck(node.dartArgument(0), classWorld);
+      bool needArgumentGuard = argumentGuard != null &&
+          argumentGuard.needsCheck(node.argument(0), classWorld);
 
       if (!needReceiverGuard && !needArgumentGuard) return cps;
 
@@ -1193,15 +1161,12 @@
       //   if (typeof receiver !== "number") return receiver.$lt();
       //
       if (!needArgumentGuard) {
-        Primitive condition = receiverGuard.makeCheck(cps, node.dartReceiver);
+        Primitive condition = receiverGuard.makeCheck(cps, node.receiver);
         cps.letPrim(new ReceiverCheck(
-            node.dartReceiver,
-            node.selector,
-            node.sourceInformation,
+            node.receiver, node.selector, node.sourceInformation,
             condition: condition,
             useSelector: true,
-            isNullCheck: receiverChecks == ChecksNeeded.Null
-        ));
+            isNullCheck: receiverChecks == ChecksNeeded.Null));
         return cps;
       }
 
@@ -1214,9 +1179,10 @@
       //   if (typeof argument !== "number") return H.iae(argument);
       //
       if (!needReceiverGuard) {
-        cps.ifTruthy(argumentGuard.makeCheck(cps, node.dartArgument(0)))
-           .invokeStaticThrower(helpers.throwIllegalArgumentException,
-              [node.dartArgument(0)]);
+        cps
+            .ifTruthy(argumentGuard.makeCheck(cps, node.argument(0)))
+            .invokeStaticThrower(
+                helpers.throwIllegalArgumentException, [node.argument(0)]);
         return cps;
       }
 
@@ -1228,15 +1194,18 @@
       //       return J.$lt(receiver, argument);
       //
       Continuation fail = cps.letCont();
-      cps.ifTruthy(receiverGuard.makeCheck(cps, node.dartReceiver))
-         .invokeContinuation(fail);
-      cps.ifTruthy(argumentGuard.makeCheck(cps, node.dartArgument(0)))
-         .invokeContinuation(fail);
+      cps
+          .ifTruthy(receiverGuard.makeCheck(cps, node.receiver))
+          .invokeContinuation(fail);
+      cps
+          .ifTruthy(argumentGuard.makeCheck(cps, node.argument(0)))
+          .invokeContinuation(fail);
 
       cps.insideContinuation(fail)
-         ..invokeMethod(node.dartReceiver, node.selector, node.mask,
-             [node.dartArgument(0)], CallingConvention.OneShotIntercepted)
-         ..put(new Unreachable());
+        ..invokeMethod(
+            node.receiver, node.selector, node.mask, [node.argument(0)],
+            callingConvention: CallingConvention.OneShotIntercepted)
+        ..put(new Unreachable());
 
       return cps;
     }
@@ -1247,11 +1216,10 @@
     /// If [guard] is given, the receiver and argument are both checked using
     /// that operator.
     CpsFragment makeBinary(BuiltinOperator operator,
-                           {TypeCheckOperator guard: TypeCheckOperator.none}) {
+        {TypeCheckOperator guard: TypeCheckOperator.none}) {
       CpsFragment cps = makeGuard(guard, guard);
-      Primitive left = guard.makeRefinement(cps, node.dartReceiver, classWorld);
-      Primitive right =
-          guard.makeRefinement(cps, node.dartArgument(0), classWorld);
+      Primitive left = guard.makeRefinement(cps, node.receiver, classWorld);
+      Primitive right = guard.makeRefinement(cps, node.argument(0), classWorld);
       Primitive result = cps.applyBuiltin(operator, [left, right]);
       result.hint = node.hint;
       node.replaceUsesWith(result);
@@ -1261,10 +1229,9 @@
     /// Like [makeBinary] but for unary operators with the receiver as the
     /// argument.
     CpsFragment makeUnary(BuiltinOperator operator,
-                          {TypeCheckOperator guard: TypeCheckOperator.none}) {
+        {TypeCheckOperator guard: TypeCheckOperator.none}) {
       CpsFragment cps = makeGuard(guard);
-      Primitive argument =
-          guard.makeRefinement(cps, node.dartReceiver, classWorld);
+      Primitive argument = guard.makeRefinement(cps, node.receiver, classWorld);
       Primitive result = cps.applyBuiltin(operator, [argument]);
       result.hint = node.hint;
       node.replaceUsesWith(result);
@@ -1279,20 +1246,19 @@
 
     /// Replaces the call with a call to [name] with the same inputs.
     InvokeMethod makeRenamedInvoke(String name) {
-      return new InvokeMethod(node.receiver,
-          renameToOptimizedSelector(name),
-          node.mask,
-          node.arguments.toList(),
+      return new InvokeMethod(node.receiver, renameToOptimizedSelector(name),
+          node.mask, node.arguments.toList(),
           sourceInformation: node.sourceInformation,
-          callingConvention: node.callingConvention);
+          callingConvention: node.callingConvention,
+          interceptor: node.interceptor);
     }
 
     TypeMask successType =
-        typeSystem.receiverTypeFor(node.selector, node.dartReceiver.type);
+        typeSystem.receiverTypeFor(node.selector, node.receiver.type);
 
-    if (node.selector.isOperator && node.dartArgumentsLength == 1) {
-      Primitive leftArg = node.dartReceiver;
-      Primitive rightArg = node.dartArgument(0);
+    if (node.selector.isOperator && node.argumentRefs.length == 1) {
+      Primitive leftArg = node.receiver;
+      Primitive rightArg = node.argument(0);
       AbstractConstantValue left = getValue(leftArg);
       AbstractConstantValue right = getValue(rightArg);
 
@@ -1348,13 +1314,13 @@
                 lattice.isDefinitelyIntInRange(right, min: 0, max: 31)) {
               return makeBinary(BuiltinOperator.NumShr, guard: checkIsNumber);
             } else if (lattice.isDefinitelyUint(left) &&
-                       lattice.isDefinitelyUint(right)) {
+                lattice.isDefinitelyUint(right)) {
               return makeRenamedInvoke('_shrBothPositive');
             } else if (lattice.isDefinitelyUint(left) &&
-                       lattice.isDefinitelyNum(right)) {
+                lattice.isDefinitelyNum(right)) {
               return makeRenamedInvoke('_shrReceiverPositive');
             } else if (lattice.isDefinitelyNum(left) &&
-                       lattice.isDefinitelyUint(right)) {
+                lattice.isDefinitelyUint(right)) {
               return makeRenamedInvoke('_shrOtherPositive');
             }
           }
@@ -1383,7 +1349,7 @@
         }
       }
     }
-    if (node.selector.isOperator && node.dartArgumentsLength == 0) {
+    if (node.selector.isOperator && node.argumentRefs.length == 0) {
       if (typeSystem.isDefinitelyNum(successType)) {
         String opname = node.selector.name;
         if (opname == '~') {
@@ -1396,11 +1362,11 @@
     }
     if (node.selector.isCall) {
       String name = node.selector.name;
-      Primitive receiver = node.dartReceiver;
+      Primitive receiver = node.receiver;
       AbstractConstantValue receiverValue = getValue(receiver);
       if (name == 'remainder') {
-        if (node.dartArgumentsLength == 1) {
-          Primitive arg = node.dartArgument(0);
+        if (node.argumentRefs.length == 1) {
+          Primitive arg = node.argument(0);
           AbstractConstantValue argValue = getValue(arg);
           if (lattice.isDefinitelyInt(receiverValue, allowNull: true) &&
               lattice.isDefinitelyInt(argValue) &&
@@ -1410,15 +1376,14 @@
           }
         }
       } else if (name == 'codeUnitAt') {
-        if (node.dartArgumentsLength == 1) {
-          Primitive index = node.dartArgument(0);
+        if (node.argumentRefs.length == 1) {
+          Primitive index = node.argument(0);
           if (lattice.isDefinitelyString(receiverValue) &&
               lattice.isDefinitelyInt(getValue(index))) {
             CpsFragment cps = new CpsFragment(node.sourceInformation);
             receiver = makeBoundsCheck(cps, receiver, index);
-            ApplyBuiltinOperator get =
-                cps.applyBuiltin(BuiltinOperator.CharCodeAt,
-                                 <Primitive>[receiver, index]);
+            ApplyBuiltinOperator get = cps.applyBuiltin(
+                BuiltinOperator.CharCodeAt, <Primitive>[receiver, index]);
             node.replaceUsesWith(get);
             get.hint = node.hint;
             return cps;
@@ -1443,9 +1408,8 @@
   /// invocation with a direct access to a field.
   ///
   /// Returns `true` if the node was replaced.
-  Primitive specializeFieldAccess(InvokeMethod node) {
-    if (!node.selector.isGetter && !node.selector.isSetter) return null;
-    AbstractConstantValue receiver = getValue(node.dartReceiver);
+  specializeFieldAccess(InvokeMethod node) {
+    AbstractConstantValue receiver = getValue(node.receiver);
     Element target =
         typeSystem.locateSingleElement(receiver.type, node.selector);
     if (target is! FieldElement) return null;
@@ -1455,13 +1419,23 @@
       return null;
     }
     if (node.selector.isGetter) {
-      return new GetField(node.dartReceiver, target);
-    } else {
+      return new GetField(node.receiver, target);
+    } else if (node.selector.isSetter) {
       if (target.isFinal) return null;
       assert(node.hasNoUses);
-      return new SetField(node.dartReceiver,
-                          target,
-                          node.dartArgument(0));
+      return new SetField(node.receiver, target, node.argument(0));
+    } else if (node.selector.isCall) {
+      CpsFragment cps = new CpsFragment(node.sourceInformation);
+      Primitive fieldValue = cps.letPrim(new GetField(node.receiver, target));
+      Primitive result = cps.invokeMethod(
+          fieldValue,
+          new Selector.callClosureFrom(node.selector),
+          typeSystem.getFieldType(target),
+          node.arguments.toList());
+      node.replaceUsesWith(result);
+      return cps;
+    } else {
+      return null;
     }
   }
 
@@ -1471,17 +1445,15 @@
   ///
   /// Returns a CPS fragment whose context is the branch where no error
   /// was thrown.
-  Primitive makeBoundsCheck(CpsFragment cps,
-        Primitive list,
-        Primitive index,
-        [int checkKind = BoundsCheck.BOTH_BOUNDS | BoundsCheck.INTEGER]) {
-    if (compiler.trustPrimitives) {
+  Primitive makeBoundsCheck(CpsFragment cps, Primitive list, Primitive index,
+      [int checkKind = BoundsCheck.BOTH_BOUNDS | BoundsCheck.INTEGER]) {
+    if (compiler.options.trustPrimitives) {
       return cps.letPrim(new BoundsCheck.noCheck(list, cps.sourceInformation));
     } else {
       GetLength length = cps.letPrim(new GetLength(list));
       list = cps.refine(list, typeSystem.nonNullType);
-      BoundsCheck check = cps.letPrim(new BoundsCheck(list, index, length,
-          checkKind, cps.sourceInformation));
+      BoundsCheck check = cps.letPrim(new BoundsCheck(
+          list, index, length, checkKind, cps.sourceInformation));
       if (check.hasIntegerCheck) {
         if (typeSystem.isDefinitelyInt(index.type)) {
           check.checks &= ~BoundsCheck.INTEGER;
@@ -1498,16 +1470,13 @@
   ///
   /// Returns a CPS fragment whose context is the branch where no error
   /// was thrown.
-  CpsFragment makeConcurrentModificationCheck(Primitive list,
-                                              Primitive originalLength,
-                                              SourceInformation sourceInfo) {
+  CpsFragment makeConcurrentModificationCheck(
+      Primitive list, Primitive originalLength, SourceInformation sourceInfo) {
     CpsFragment cps = new CpsFragment(sourceInfo);
-    Primitive lengthChanged = cps.applyBuiltin(
-        BuiltinOperator.StrictNeq,
+    Primitive lengthChanged = cps.applyBuiltin(BuiltinOperator.StrictNeq,
         <Primitive>[originalLength, cps.letPrim(new GetLength(list))]);
     cps.ifTruthy(lengthChanged).invokeStaticThrower(
-        helpers.throwConcurrentModificationError,
-        <Primitive>[list]);
+        helpers.throwConcurrentModificationError, <Primitive>[list]);
     return cps;
   }
 
@@ -1515,10 +1484,10 @@
   ///
   /// Returns `true` if the node was replaced.
   specializeIndexableAccess(InvokeMethod node) {
-    Primitive receiver = node.dartReceiver;
+    Primitive receiver = node.receiver;
     AbstractConstantValue receiverValue = getValue(receiver);
     if (!typeSystem.isDefinitelyIndexable(receiverValue.type,
-            allowNull: true)) {
+        allowNull: true)) {
       return null;
     }
     switch (node.selector.name) {
@@ -1528,26 +1497,23 @@
         }
         if (node.selector.isSetter) {
           if (!typeSystem.isDefinitelyExtendableArray(receiver.type,
-                allowNull: true)) {
+              allowNull: true)) {
             return null;
           }
           CpsFragment cps = new CpsFragment(node.sourceInformation);
-          Primitive newLength = node.dartArgument(0);
+          Primitive newLength = node.argument(0);
           if (!typeSystem.isDefinitelyUint(newLength.type)) {
             // TODO(asgerf): We could let the SetLength instruction throw for
             // negative right-hand sides (see length setter in js_array.dart).
-            if (compiler.trustPrimitives) {
+            if (compiler.options.trustPrimitives) {
               newLength = cps.refine(newLength, typeSystem.uint32Type);
               newLength.type = typeSystem.uint32Type;
             } else {
               return null;
             }
           }
-          cps.letPrim(new ApplyBuiltinMethod(
-              BuiltinMethod.SetLength,
-              receiver,
-              [newLength],
-              node.sourceInformation));
+          cps.letPrim(new ApplyBuiltinMethod(BuiltinMethod.SetLength, receiver,
+              [newLength], node.sourceInformation));
           if (!typeSystem.isDefinitelyUint32(newLength.type)) {
             // If the setter succeeded, the length must have been a uint32.
             cps.refine(newLength, typeSystem.uint32Type);
@@ -1557,7 +1523,7 @@
         return null;
 
       case '[]':
-        Primitive index = node.dartArgument(0);
+        Primitive index = node.argument(0);
         CpsFragment cps = new CpsFragment(node.sourceInformation);
         receiver = makeBoundsCheck(cps, receiver, index);
         GetIndex get = cps.letPrim(new GetIndex(receiver, index));
@@ -1568,11 +1534,11 @@
 
       case '[]=':
         if (!typeSystem.isDefinitelyMutableIndexable(receiverValue.type,
-                allowNull: true)) {
+            allowNull: true)) {
           return null;
         }
-        Primitive index = node.dartArgument(0);
-        Primitive value = node.dartArgument(1);
+        Primitive index = node.argument(0);
+        Primitive value = node.argument(1);
         CpsFragment cps = new CpsFragment(node.sourceInformation);
         receiver = makeBoundsCheck(cps, receiver, index);
         cps.letPrim(new SetIndex(receiver, index, value));
@@ -1584,8 +1550,8 @@
         CpsFragment cps = new CpsFragment(node.sourceInformation);
         Primitive length = cps.letPrim(new GetLength(receiver));
         Constant zero = cps.makeZero();
-        ApplyBuiltinOperator op = cps.applyBuiltin(BuiltinOperator.StrictEq,
-                                                   [length, zero]);
+        ApplyBuiltinOperator op =
+            cps.applyBuiltin(BuiltinOperator.StrictEq, [length, zero]);
         node.replaceUsesWith(op);
         op.hint = node.hint;
         return cps;
@@ -1595,8 +1561,8 @@
         CpsFragment cps = new CpsFragment(node.sourceInformation);
         Primitive length = cps.letPrim(new GetLength(receiver));
         Constant zero = cps.makeZero();
-        ApplyBuiltinOperator op = cps.applyBuiltin(BuiltinOperator.StrictNeq,
-                                                   [length, zero]);
+        ApplyBuiltinOperator op =
+            cps.applyBuiltin(BuiltinOperator.StrictNeq, [length, zero]);
         node.replaceUsesWith(op);
         op.hint = node.hint;
         return cps;
@@ -1610,7 +1576,7 @@
   ///
   /// Returns `true` if the node was replaced.
   CpsFragment specializeArrayAccess(InvokeMethod node) {
-    Primitive list = node.dartReceiver;
+    Primitive list = node.receiver;
     AbstractConstantValue listValue = getValue(list);
     // Ensure that the object is a native list or null.
     if (!lattice.isDefinitelyArray(listValue, allowNull: true)) {
@@ -1629,39 +1595,34 @@
           return null;
         }
         if (!isExtendable) return null;
-        Primitive addedItem = node.dartArgument(0);
+        Primitive addedItem = node.argument(0);
         CpsFragment cps = new CpsFragment(sourceInfo);
-        cps.invokeBuiltin(BuiltinMethod.Push,
-            list,
-            <Primitive>[addedItem]);
+        cps.invokeBuiltin(BuiltinMethod.Push, list, <Primitive>[addedItem]);
         if (node.hasAtLeastOneUse) {
           node.replaceUsesWith(cps.makeNull());
         }
         return cps;
 
       case 'removeLast':
-        if (!node.selector.isCall ||
-            node.selector.argumentCount != 0) {
+        if (!node.selector.isCall || node.selector.argumentCount != 0) {
           return null;
         }
         if (!isExtendable) return null;
         CpsFragment cps = new CpsFragment(sourceInfo);
-        list = makeBoundsCheck(cps, list, cps.makeMinusOne(),
-            BoundsCheck.EMPTINESS);
-        Primitive removedItem = cps.invokeBuiltin(BuiltinMethod.Pop,
-            list,
-            <Primitive>[]);
+        list = makeBoundsCheck(
+            cps, list, cps.makeMinusOne(), BoundsCheck.EMPTINESS);
+        Primitive removedItem =
+            cps.invokeBuiltin(BuiltinMethod.Pop, list, <Primitive>[]);
         removedItem.hint = node.hint;
         node.replaceUsesWith(removedItem);
         return cps;
 
       case 'addAll':
-        if (!node.selector.isCall ||
-            node.selector.argumentCount != 1) {
+        if (!node.selector.isCall || node.selector.argumentCount != 1) {
           return null;
         }
         if (!isExtendable) return null;
-        Primitive addedList = node.dartArgument(0);
+        Primitive addedList = node.argument(0);
         // Rewrite addAll([x1, ..., xN]) to push(x1), ..., push(xN).
         // Ensure that the list is not mutated between creation and use.
         // We aim for the common case where this is the only use of the list,
@@ -1672,9 +1633,8 @@
         LiteralList addedLiteral = addedList;
         CpsFragment cps = new CpsFragment(sourceInfo);
         for (Reference value in addedLiteral.valueRefs) {
-          cps.invokeBuiltin(BuiltinMethod.Push,
-              list,
-              <Primitive>[value.definition]);
+          cps.invokeBuiltin(
+              BuiltinMethod.Push, list, <Primitive>[value.definition]);
         }
         if (node.hasAtLeastOneUse) {
           node.replaceUsesWith(cps.makeNull());
@@ -1688,7 +1648,7 @@
           return null;
         }
         if (listValue.isNullable) return null;
-        Primitive index = node.dartArgument(0);
+        Primitive index = node.argument(0);
         if (!lattice.isDefinitelyInt(getValue(index))) return null;
         CpsFragment cps = new CpsFragment(node.sourceInformation);
         list = makeBoundsCheck(cps, list, index);
@@ -1700,18 +1660,16 @@
       case 'forEach':
         Element element =
             compiler.world.locateSingleElement(node.selector, listValue.type);
-        if (element == null ||
-            !element.isFunction ||
-            !node.selector.isCall) return null;
+        if (element == null || !element.isFunction || !node.selector.isCall)
+          return null;
         assert(node.selector.positionalArgumentCount == 1);
         assert(node.selector.namedArgumentCount == 0);
         FunctionDefinition target = functionCompiler.compileToCpsIr(element);
 
         CpsFragment cps = new CpsFragment(node.sourceInformation);
-        Primitive result = cps.inlineFunction(target,
-            node.receiver,
-            node.arguments.toList(),
-            hint: node.hint);
+        Primitive result = cps.inlineFunction(
+            target, node.receiver, node.arguments.toList(),
+            interceptor: node.interceptor, hint: node.hint);
         node.replaceUsesWith(result);
         return cps;
 
@@ -1753,7 +1711,7 @@
             }
             use.replaceWith(new GetMutable(current));
           } else {
-            assert (use.selector == Selectors.moveNext);
+            assert(use.selector == Selectors.moveNext);
             // Rewrite iterator.moveNext() to:
             //
             //   if (index < list.length) {
@@ -1806,8 +1764,8 @@
                 // TODO(asgerf): Do this in a continuation so multiple
                 //               continues can share the same code.
                 for (Reference ref = parent.firstRef;
-                     ref != null;
-                     ref = ref.next) {
+                    ref != null;
+                    ref = ref.next) {
                   Expression invocationCaller = ref.parent;
                   if (getEffectiveParent(invocationCaller) == iteratorBinding) {
                     // No need to check for concurrent modification immediately
@@ -1825,8 +1783,7 @@
             }
 
             // Check if there are more elements.
-            Primitive hasMore = cps.applyBuiltin(
-                BuiltinOperator.NumLt,
+            Primitive hasMore = cps.applyBuiltin(BuiltinOperator.NumLt,
                 [cps.getMutable(index), cps.letPrim(new GetLength(list))]);
 
             // Return false if there are no more.
@@ -1839,9 +1796,10 @@
             current.type = typeSystem.elementTypeOfIndexable(listValue.type);
             cps.setMutable(current,
                 cps.letPrim(new GetIndex(list, cps.getMutable(index))));
-            cps.setMutable(index, cps.applyBuiltin(
-                BuiltinOperator.NumAdd,
-                [cps.getMutable(index), cps.makeOne()]));
+            cps.setMutable(
+                index,
+                cps.applyBuiltin(BuiltinOperator.NumAdd,
+                    [cps.getMutable(index), cps.makeOne()]));
             cps.invokeContinuation(moveNextCont, [cps.makeTrue()]);
 
             reanalyzeFragment(cps);
@@ -1851,7 +1809,9 @@
             cps.context = moveNextCont;
             cps.insertBelow(let);
             let.remove();
-            use..replaceUsesWith(result)..destroy();
+            use
+              ..replaceUsesWith(result)
+              ..destroy();
           }
         }
 
@@ -1898,7 +1858,7 @@
     assert(!isInterceptedSelector(call));
     assert(call.argumentCount == node.argumentRefs.length);
 
-    Primitive tearOff = node.dartReceiver.effectiveDefinition;
+    Primitive tearOff = node.receiver.effectiveDefinition;
     // Note: We don't know if [tearOff] is actually a tear-off.
     // We name variables based on the pattern we are trying to match.
 
@@ -1915,10 +1875,8 @@
 
       // Replace with InvokeStatic.
       // The tear-off will be cleaned up by shrinking reductions.
-      return new InvokeStatic(target,
-          new Selector.fromElement(target),
-          node.arguments.toList(),
-          node.sourceInformation);
+      return new InvokeStatic(target, new Selector.fromElement(target),
+          node.arguments.toList(), node.sourceInformation);
     }
     if (tearOff is InvokeMethod && tearOff.selector.isGetter) {
       Selector getter = tearOff.selector;
@@ -1960,12 +1918,13 @@
       }
 
       InvokeMethod invoke = new InvokeMethod(
-        object,
-        new Selector.call(getter.memberName, call.callStructure),
-        type,
-        node.arguments.toList(),
-        sourceInformation: node.sourceInformation);
-      node.receiverRef.changeTo(new Parameter(null)); // Remove the tear off use.
+          object,
+          new Selector.call(getter.memberName, call.callStructure),
+          type,
+          node.arguments.toList(),
+          sourceInformation: node.sourceInformation);
+      node.receiverRef
+          .changeTo(new Parameter(null)); // Remove the tear off use.
 
       if (tearOff.hasNoRefinedUses) {
         // Eliminate the getter call if it has no more uses.
@@ -1996,13 +1955,13 @@
     assert(call.argumentCount == node.argumentRefs.length);
 
     Primitive receiver = node.receiver;
-    if (receiver is !CreateInstance) return null;
+    if (receiver is! CreateInstance) return null;
     CreateInstance createInstance = receiver;
     if (!createInstance.hasExactlyOneUse) return null;
 
     // Inline only closures. This avoids inlining the 'call' method of a class
     // that has many allocation sites.
-    if (createInstance.classElement is !ClosureClassElement) return null;
+    if (createInstance.classElement is! ClosureClassElement) return null;
 
     ClosureClassElement closureClassElement = createInstance.classElement;
     Element element = closureClassElement.localLookup(Identifiers.call);
@@ -2028,9 +1987,9 @@
     // Accesses to closed-over values are field access primitives.  We we don't
     // inline if there are other uses of 'this' since that could be an escape or
     // a recursive call.
-    for (Reference ref = target.thisParameter.firstRef;
-         ref != null;
-         ref = ref.next) {
+    for (Reference ref = target.receiverParameter.firstRef;
+        ref != null;
+        ref = ref.next) {
       Node use = ref.parent;
       if (use is GetField) continue;
       // Closures do not currently have writable fields, but closure conversion
@@ -2040,9 +1999,8 @@
     }
 
     CpsFragment cps = new CpsFragment(node.sourceInformation);
-    Primitive returnValue = cps.inlineFunction(target,
-        node.receiver,
-        node.arguments.toList(),
+    Primitive returnValue = cps.inlineFunction(
+        target, node.receiver, node.arguments.toList(),
         hint: node.hint);
     node.replaceUsesWith(returnValue);
     return cps;
@@ -2072,21 +2030,19 @@
       ConstructorBodyElement constructorBody = target;
       target = constructorBody.constructor;
     }
-    node.effects =
-        Effects.from(compiler.world.getSideEffectsOfElement(target));
-    TypeMask receiverType = node.dartReceiver.type;
+    node.effects = Effects.from(compiler.world.getSideEffectsOfElement(target));
+    TypeMask receiverType = node.receiver.type;
     if (node.callingConvention == CallingConvention.Intercepted &&
         typeSystem.areDisjoint(receiverType, typeSystem.interceptorType)) {
       // Some direct calls take an interceptor because the target class is
       // mixed into a native class.  If it is known at the call site that the
       // receiver is non-intercepted, get rid of the interceptor.
-      node.receiverRef.changeTo(node.dartReceiver);
+      node.interceptorRef.changeTo(node.receiver);
     }
   }
 
   visitInvokeMethod(InvokeMethod node) {
-    var specialized =
-        specializeOperatorCall(node) ??
+    var specialized = specializeOperatorCall(node) ??
         specializeFieldAccess(node) ??
         specializeIndexableAccess(node) ??
         specializeArrayAccess(node) ??
@@ -2094,31 +2050,27 @@
         specializeClosureCall(node);
     if (specialized != null) return specialized;
 
-    TypeMask receiverType = node.dartReceiver.type;
+    TypeMask receiverType = node.receiver.type;
     node.mask = typeSystem.intersection(node.mask, receiverType);
 
     node.effects = Effects.from(
         compiler.world.getSideEffectsOfSelector(node.selector, node.mask));
 
     bool canBeNonThrowingCallOnNull =
-        selectorsOnNull.contains(node.selector) &&
-        receiverType.isNullable;
+        selectorsOnNull.contains(node.selector) && receiverType.isNullable;
 
     if (node.callingConvention == CallingConvention.Intercepted &&
         !canBeNonThrowingCallOnNull &&
         typeSystem.areDisjoint(receiverType, typeSystem.interceptorType)) {
       // Use the Dart receiver as the JS receiver. This changes the wording of
       // the error message when the receiver is null, but we accept this.
-      node.receiverRef.changeTo(node.dartReceiver);
+      node.interceptorRef.changeTo(node.receiver);
 
       // Replace the extra receiver argument with a dummy value if the
       // target definitely does not use it.
-      if (typeSystem.targetIgnoresReceiverArgument(receiverType,
-            node.selector)) {
-        Constant dummy = makeConstantPrimitive(new IntConstantValue(0));
-        new LetPrim(dummy).insertAbove(node.parent);
-        node.argumentRefs[0].changeTo(dummy);
-        node.callingConvention = CallingConvention.DummyIntercepted;
+      if (typeSystem.targetIgnoresReceiverArgument(
+          receiverType, node.selector)) {
+        node.makeDummyIntercepted();
       }
     }
   }
@@ -2151,15 +2103,13 @@
         node.replaceUsesWith(argument);
         return new CpsFragment();
       } else if (typeSystem.isDefinitelySelfInterceptor(value.type)) {
-        TypeMask toStringReturn = typeSystem.getInvokeReturnType(
-            Selectors.toString_, value.type);
+        TypeMask toStringReturn =
+            typeSystem.getInvokeReturnType(Selectors.toString_, value.type);
         if (typeSystem.isDefinitelyString(toStringReturn)) {
           CpsFragment cps = new CpsFragment(node.sourceInformation);
-          Primitive invoke = cps.invokeMethod(argument,
-              Selectors.toString_,
-              value.type,
-              [cps.makeZero()],
-              CallingConvention.DummyIntercepted);
+          Primitive invoke = cps.invokeMethod(
+              argument, Selectors.toString_, value.type, [],
+              callingConvention: CallingConvention.DummyIntercepted);
           node.replaceUsesWith(invoke);
           return cps;
         }
@@ -2167,16 +2117,15 @@
     } else if (node.target == compiler.identicalFunction) {
       if (node.argumentRefs.length == 2) {
         return new ApplyBuiltinOperator(BuiltinOperator.Identical,
-            [node.argument(0), node.argument(1)],
-            node.sourceInformation);
+            [node.argument(0), node.argument(1)], node.sourceInformation);
       }
     }
     return null;
   }
 
   visitInvokeStatic(InvokeStatic node) {
-    node.effects = Effects.from(
-        compiler.world.getSideEffectsOfElement(node.target));
+    node.effects =
+        Effects.from(compiler.world.getSideEffectsOfElement(node.target));
     return specializeInternalMethodCall(node);
   }
 
@@ -2189,7 +2138,6 @@
     return new AbstractConstantValue.nonConstant(node.type);
   }
 
-
   /*************************** PRIMITIVES **************************/
   //
   // The visit method for a primitive may return one of the following:
@@ -2220,9 +2168,8 @@
           AbstractConstantValue secondValue = getValue(node.argument(i++));
           if (!secondValue.isConstant) continue;
 
-          ast.DartString string =
-              new ast.ConsDartString(getString(firstValue),
-                                     getString(secondValue));
+          ast.DartString string = new ast.ConsDartString(
+              getString(firstValue), getString(secondValue));
 
           // We found a sequence of at least two constants.
           // Look for the end of the sequence.
@@ -2270,22 +2217,21 @@
           // This is not safe when we might compare JS null and JS undefined.
           newOperator = BuiltinOperator.StrictEq;
         } else if (lattice.isDefinitelyNum(left, allowNull: true) &&
-                   lattice.isDefinitelyNum(right, allowNull: true)) {
+            lattice.isDefinitelyNum(right, allowNull: true)) {
           // If both operands can be null, but otherwise are of the same type,
           // we can use `==` for comparison.
           // This is not safe e.g. for comparing strings against numbers.
           newOperator = BuiltinOperator.LooseEq;
         } else if (lattice.isDefinitelyString(left, allowNull: true) &&
-                   lattice.isDefinitelyString(right, allowNull: true)) {
+            lattice.isDefinitelyString(right, allowNull: true)) {
           newOperator = BuiltinOperator.LooseEq;
         } else if (lattice.isDefinitelyBool(left, allowNull: true) &&
-                   lattice.isDefinitelyBool(right, allowNull: true)) {
+            lattice.isDefinitelyBool(right, allowNull: true)) {
           newOperator = BuiltinOperator.LooseEq;
         }
         if (newOperator != null) {
-          return new ApplyBuiltinOperator(newOperator,
-              node.arguments.toList(),
-              node.sourceInformation);
+          return new ApplyBuiltinOperator(
+              newOperator, node.arguments.toList(), node.sourceInformation);
         }
         break;
 
@@ -2293,8 +2239,7 @@
       case BuiltinOperator.LooseEq:
       case BuiltinOperator.StrictNeq:
       case BuiltinOperator.LooseNeq:
-        bool negated =
-            node.operator == BuiltinOperator.StrictNeq ||
+        bool negated = node.operator == BuiltinOperator.StrictNeq ||
             node.operator == BuiltinOperator.LooseNeq;
         for (int firstIndex in [0, 1]) {
           int secondIndex = 1 - firstIndex;
@@ -2314,9 +2259,7 @@
             // (x === false) ==> !x
             // (x !== true) ==> !x
             return new ApplyBuiltinOperator(
-                BuiltinOperator.IsFalsy,
-                [firstArg],
-                node.sourceInformation);
+                BuiltinOperator.IsFalsy, [firstArg], node.sourceInformation);
           }
         }
         break;
@@ -2326,8 +2269,7 @@
     return null;
   }
 
-  void visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
-  }
+  void visitApplyBuiltinMethod(ApplyBuiltinMethod node) {}
 
   visitTypeTest(TypeTest node) {
     Primitive prim = node.value;
@@ -2349,27 +2291,21 @@
       // Compile as typeof x === 'number' && Math.floor(x) === x
       if (lattice.isDefinitelyNum(value, allowNull: true)) {
         // If value is null or a number, we can skip the typeof test.
-        return new ApplyBuiltinOperator(
-            BuiltinOperator.IsFloor,
-            <Primitive>[prim, prim],
-            node.sourceInformation);
+        return new ApplyBuiltinOperator(BuiltinOperator.IsFloor,
+            <Primitive>[prim, prim], node.sourceInformation);
       }
       if (lattice.isDefinitelyNotNonIntegerDouble(value)) {
         // If the value cannot be a non-integer double, but might not be a
         // number at all, we can skip the Math.floor test.
         return unaryBuiltinOperator(BuiltinOperator.IsNumber);
       }
-      return new ApplyBuiltinOperator(
-          BuiltinOperator.IsInteger,
-          <Primitive>[prim, prim, prim],
-          node.sourceInformation);
+      return new ApplyBuiltinOperator(BuiltinOperator.IsInteger,
+          <Primitive>[prim, prim, prim], node.sourceInformation);
     }
     if (node.dartType == dartTypes.coreTypes.numType ||
         node.dartType == dartTypes.coreTypes.doubleType) {
       return new ApplyBuiltinOperator(
-          BuiltinOperator.IsNumber,
-          <Primitive>[prim],
-          node.sourceInformation);
+          BuiltinOperator.IsNumber, <Primitive>[prim], node.sourceInformation);
     }
 
     AbstractBool isNullableSubtype =
@@ -2384,10 +2320,8 @@
       // 'typeof' expressions might give the VM some more useful information.
       Primitive nullConst = makeConstantPrimitive(new NullConstantValue());
       new LetPrim(nullConst).insertAbove(node.parent);
-      return new ApplyBuiltinOperator(
-          BuiltinOperator.LooseNeq,
-          <Primitive>[prim, nullConst],
-          node.sourceInformation);
+      return new ApplyBuiltinOperator(BuiltinOperator.LooseNeq,
+          <Primitive>[prim, nullConst], node.sourceInformation);
     }
 
     if (dartType.element == functionCompiler.glue.jsFixedArrayClass) {
@@ -2438,9 +2372,8 @@
     if (node.hasNoChecks) return;
     Primitive indexPrim = node.index;
     int index = lattice.intValue(getValue(indexPrim));
-    int length = node.lengthRef == null
-        ? null
-        : lattice.intValue(getValue(node.length));
+    int length =
+        node.lengthRef == null ? null : lattice.intValue(getValue(node.length));
     if (index != null && length != null && index < length) {
       node.checks &= ~BoundsCheck.UPPER_BOUND;
     }
@@ -2454,7 +2387,9 @@
       node.checks &= ~BoundsCheck.INTEGER;
     }
     if (!node.lengthUsedInCheck && node.lengthRef != null) {
-      node..lengthRef.unlink()..lengthRef = null;
+      node
+        ..lengthRef.unlink()
+        ..lengthRef = null;
     }
     if (node.checks == BoundsCheck.NONE) {
       // We can't remove the bounds check node because it may still be used to
@@ -2465,7 +2400,9 @@
       //     restrict code motion.  However, if we want to run this pass after
       //     [BoundsChecker] that would not be safe any more, so for now we
       //     keep the node for forward compatibilty.
-      node..indexRef.unlink()..indexRef = null;
+      node
+        ..indexRef.unlink()
+        ..indexRef = null;
     }
   }
 
@@ -2473,7 +2410,7 @@
     Primitive input = node.value;
     if (!input.type.isNullable &&
         (node.isNullCheck ||
-         !input.type.needsNoSuchMethodHandling(node.selector, classWorld))) {
+            !input.type.needsNoSuchMethodHandling(node.selector, classWorld))) {
       node.replaceUsesWith(input);
       return new CpsFragment();
     }
@@ -2481,8 +2418,8 @@
   }
 
   visitGetLength(GetLength node) {
-    node.isFinal = typeSystem.isDefinitelyFixedLengthIndexable(
-        node.object.type, allowNull: true);
+    node.isFinal = typeSystem.isDefinitelyFixedLengthIndexable(node.object.type,
+        allowNull: true);
   }
 
   visitReadTypeVariable(ReadTypeVariable node) {
@@ -2506,12 +2443,12 @@
         TypeExpression typeExpression = instance.typeInformation;
         assert(typeExpression.kind == TypeExpressionKind.INSTANCE);
         ClassElement context = node.variable.element.enclosingClass;
+        ClassElement createdClass = instance.classElement;
         // In the general case, a substitution could generate a large type
         // term. Avoid this by restricting to direct indexing.
         // TODO(sra): Also include cases that require substitution but the end
         // result is the same as some indexing or a simple constant type.
-        if (!functionCompiler.glue.needsSubstitutionForTypeVariableAccess(
-                context)) {
+        if (backend.rti.isTrivialSubstitution(createdClass, context)) {
           int index = functionCompiler.glue.getTypeVariableIndex(node.variable);
           if (0 <= index && index < typeExpression.argumentRefs.length) {
             node.replaceUsesWith(typeExpression.argument(index));
@@ -2522,6 +2459,18 @@
     }
     return null;
   }
+
+  bool isNullConstant(Primitive prim) => prim is Constant && prim.value.isNull;
+
+  visitCreateInstance(CreateInstance node) {
+    Primitive typeInformation = node.typeInformation;
+    if (typeInformation is TypeExpression &&
+        typeInformation.arguments.every(isNullConstant)) {
+      node
+        ..typeInformationRef.unlink()
+        ..typeInformationRef = null;
+    }
+  }
 }
 
 /**
@@ -2571,9 +2520,7 @@
   // Access through [getValue] and [setValue].
   final Map<Variable, ConstantValue> values;
 
-  TypePropagationVisitor(this.lattice,
-                         this.values,
-                         this.internalError);
+  TypePropagationVisitor(this.lattice, this.values, this.internalError);
 
   void analyze(FunctionDefinition root, bool recomputeAll) {
     reachableContinuations.clear();
@@ -2610,7 +2557,7 @@
           visit(ref.parent);
         }
       } else {
-        break;  // Both worklists empty.
+        break; // Both worklists empty.
       }
     }
   }
@@ -2664,9 +2611,8 @@
   ///
   /// If [updateValue] is a constant and [canReplace] is true, the primitive
   /// is also marked as safe for elimination, so it can be constant-folded.
-  void setResult(UnsafePrimitive prim,
-                 AbstractConstantValue updateValue,
-                 {bool canReplace: false}) {
+  void setResult(UnsafePrimitive prim, AbstractConstantValue updateValue,
+      {bool canReplace: false}) {
     // TODO(asgerf): Separate constant folding from side effect analysis.
     setValue(prim, updateValue);
     prim.isSafeForElimination = canReplace && updateValue.isConstant;
@@ -2677,44 +2623,34 @@
   }
 
   // -------------------------- Visitor overrides ------------------------------
-  void visit(Node node) { node.accept(this); }
+  void visit(Node node) {
+    node.accept(this);
+  }
 
   void visitFunctionDefinition(FunctionDefinition node) {
-    bool isIntercepted = backend.isInterceptedMethod(node.element);
-
+    if (node.interceptorParameter != null) {
+      setValue(node.interceptorParameter, nonConstant(typeSystem.nonNullType));
+    }
     // If the abstract value of the function parameters is Nothing, use the
     // inferred parameter type.  Otherwise (e.g., when inlining) do not
     // change the abstract value.
-    if (node.thisParameter != null && getValue(node.thisParameter).isNothing) {
-      if (isIntercepted &&
-          !typeSystem.methodIgnoresReceiverArgument(node.element)) {
-        setValue(node.thisParameter, nonConstant(typeSystem.nonNullType));
-      } else {
-        setValue(node.thisParameter,
-            nonConstant(typeSystem.getReceiverType(node.element)));
-      }
-    }
-    if (isIntercepted && getValue(node.parameters[0]).isNothing) {
-      if (typeSystem.methodIgnoresReceiverArgument(node.element)) {
-        setValue(node.parameters[0], nonConstant());
-      } else {
-        setValue(node.parameters[0],
-            nonConstant(typeSystem.getReceiverType(node.element)));
-      }
+    if (node.receiverParameter != null &&
+        getValue(node.receiverParameter).isNothing) {
+      setValue(node.receiverParameter,
+          nonConstant(typeSystem.getReceiverType(node.element)));
     }
     bool hasParameterWithoutValue = false;
-    for (Parameter param in node.parameters.skip(isIntercepted ? 1 : 0)) {
+    for (Parameter param in node.parameters) {
       if (getValue(param).isNothing) {
         TypeMask type = param.hint is ParameterElement
             ? typeSystem.getParameterType(param.hint)
             : typeSystem.dynamicType;
         setValue(param, lattice.fromMask(type));
-        if (type.isEmpty && !type.isNullable) {
-          hasParameterWithoutValue = true;
-        }
+        if (type.isEmpty) hasParameterWithoutValue = true;
       }
     }
-    if (!hasParameterWithoutValue) { // Don't analyze unreachable code.
+    if (!hasParameterWithoutValue) {
+      // Don't analyze unreachable code.
       push(node.body);
     }
   }
@@ -2775,7 +2711,7 @@
   }
 
   void visitInvokeMethod(InvokeMethod node) {
-    AbstractConstantValue receiver = getValue(node.dartReceiver);
+    AbstractConstantValue receiver = getValue(node.receiver);
     if (receiver.isNothing) {
       return setResult(node, lattice.nothing);
     }
@@ -2801,7 +2737,7 @@
 
     if (node.selector.isCall) {
       if (node.selector == Selectors.codeUnitAt) {
-        AbstractConstantValue right = getValue(node.dartArgument(0));
+        AbstractConstantValue right = getValue(node.argument(0));
         AbstractConstantValue result =
             lattice.codeUnitAtSpecial(receiver, right);
         return finish(result, canReplace: !receiver.isNullable);
@@ -2810,7 +2746,7 @@
     }
 
     if (node.selector == Selectors.index) {
-      AbstractConstantValue right = getValue(node.dartArgument(0));
+      AbstractConstantValue right = getValue(node.argument(0));
       AbstractConstantValue result = lattice.indexSpecial(receiver, right);
       return finish(result, canReplace: !receiver.isNullable);
     }
@@ -2821,7 +2757,7 @@
 
     // Calculate the resulting constant if possible.
     String opname = node.selector.name;
-    if (node.dartArgumentsLength == 0) {
+    if (node.argumentRefs.length == 0) {
       // Unary operator.
       if (opname == "unary-") {
         opname = "-";
@@ -2829,9 +2765,9 @@
       UnaryOperator operator = UnaryOperator.parse(opname);
       AbstractConstantValue result = lattice.unaryOp(operator, receiver);
       return finish(result, canReplace: !receiver.isNullable);
-    } else if (node.dartArgumentsLength == 1) {
+    } else if (node.argumentRefs.length == 1) {
       // Binary operator.
-      AbstractConstantValue right = getValue(node.dartArgument(0));
+      AbstractConstantValue right = getValue(node.argument(0));
       BinaryOperator operator = BinaryOperator.parse(opname);
       AbstractConstantValue result =
           lattice.binaryOp(operator, receiver, right);
@@ -2841,7 +2777,6 @@
   }
 
   void visitApplyBuiltinOperator(ApplyBuiltinOperator node) {
-
     void unaryOp(
         AbstractConstantValue operation(AbstractConstantValue argument),
         TypeMask defaultType) {
@@ -2850,8 +2785,8 @@
     }
 
     void binaryOp(
-        AbstractConstantValue operation(AbstractConstantValue left,
-                                        AbstractConstantValue right),
+        AbstractConstantValue operation(
+            AbstractConstantValue left, AbstractConstantValue right),
         TypeMask defaultType) {
       AbstractConstantValue left = getValue(node.argument(0));
       AbstractConstantValue right = getValue(node.argument(1));
@@ -2859,20 +2794,20 @@
     }
 
     void binaryNumOp(
-        AbstractConstantValue operation(AbstractConstantValue left,
-                                        AbstractConstantValue right)) {
+        AbstractConstantValue operation(
+            AbstractConstantValue left, AbstractConstantValue right)) {
       binaryOp(operation, typeSystem.numType);
     }
 
     void binaryUint32Op(
-        AbstractConstantValue operation(AbstractConstantValue left,
-                                        AbstractConstantValue right)) {
+        AbstractConstantValue operation(
+            AbstractConstantValue left, AbstractConstantValue right)) {
       binaryOp(operation, typeSystem.uint32Type);
     }
 
     void binaryBoolOp(
-        AbstractConstantValue operation(AbstractConstantValue left,
-                                        AbstractConstantValue right)) {
+        AbstractConstantValue operation(
+            AbstractConstantValue left, AbstractConstantValue right)) {
       binaryOp(operation, typeSystem.boolType);
     }
 
@@ -2885,8 +2820,8 @@
             setValue(node, lattice.nothing);
             return; // And come back later
           } else if (value.isConstant &&
-                     value.constant.isString &&
-                     stringValue != null) {
+              value.constant.isString &&
+              stringValue != null) {
             StringConstantValue constant = value.constant;
             stringValue =
                 new ast.ConsDartString(stringValue, constant.primitiveValue);
@@ -2911,8 +2846,7 @@
       case BuiltinOperator.StrictNeq:
       case BuiltinOperator.LooseEq:
       case BuiltinOperator.LooseNeq:
-        bool negated =
-            node.operator == BuiltinOperator.StrictNeq ||
+        bool negated = node.operator == BuiltinOperator.StrictNeq ||
             node.operator == BuiltinOperator.LooseNeq;
         AbstractConstantValue left = getValue(node.argument(0));
         AbstractConstantValue right = getValue(node.argument(1));
@@ -2921,8 +2855,8 @@
           return;
         }
         if (left.isConstant && right.isConstant) {
-          ConstantValue equal = lattice.constantSystem.identity.fold(
-              left.constant, right.constant);
+          ConstantValue equal = lattice.constantSystem.identity
+              .fold(left.constant, right.constant);
           if (equal != null && equal.isBool) {
             ConstantValue result =
                 new BoolConstantValue(equal.isTrue == !negated);
@@ -3031,8 +2965,8 @@
   void visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
     AbstractConstantValue receiver = getValue(node.receiver);
     if (node.method == BuiltinMethod.Pop) {
-      setValue(node, nonConstant(
-          typeSystem.elementTypeOfIndexable(receiver.type)));
+      setValue(
+          node, nonConstant(typeSystem.elementTypeOfIndexable(receiver.type)));
     } else {
       setValue(node, nonConstant());
     }
@@ -3056,14 +2990,11 @@
     }
   }
 
-  void visitThrow(Throw node) {
-  }
+  void visitThrow(Throw node) {}
 
-  void visitRethrow(Rethrow node) {
-  }
+  void visitRethrow(Rethrow node) {}
 
-  void visitUnreachable(Unreachable node) {
-  }
+  void visitUnreachable(Unreachable node) {}
 
   void visitBranch(Branch node) {
     AbstractConstantValue conditionCell = getValue(node.condition);
@@ -3101,7 +3032,7 @@
   void handleTypeTest(
       Primitive node, AbstractConstantValue input, types.DartType dartType) {
     TypeMask boolType = typeSystem.boolType;
-    switch(lattice.isSubtypeOf(input, dartType, allowNull: false)) {
+    switch (lattice.isSubtypeOf(input, dartType, allowNull: false)) {
       case AbstractBool.Nothing:
         break; // And come back later.
 
@@ -3137,8 +3068,7 @@
       case AbstractBool.Maybe:
         // Narrow type of output to those that survive the cast.
         TypeMask type = input.type.intersection(
-            typeSystem.subtypesOf(node.dartType).nullable(),
-            classWorld);
+            typeSystem.subtypesOf(node.dartType).nullable(), classWorld);
         setValue(node, nonConstant(type));
         break;
     }
@@ -3170,11 +3100,9 @@
     setValue(node, getValue(node.variable));
   }
 
-  void visitMutableVariable(MutableVariable node) {
-  }
+  void visitMutableVariable(MutableVariable node) {}
 
-  void visitParameter(Parameter node) {
-  }
+  void visitParameter(Parameter node) {}
 
   void visitContinuation(Continuation node) {
     node.parameters.forEach(visit);
@@ -3270,7 +3198,8 @@
   void visitForeignCode(ForeignCode node) {
     bool firstArgumentIsNullable = false;
     if (node.argumentRefs.length > 0) {
-      AbstractConstantValue first = getValue(node.argumentRefs.first.definition);
+      AbstractConstantValue first =
+          getValue(node.argumentRefs.first.definition);
       if (first.isNothing) {
         setValue(node, nothing);
         return;
@@ -3280,9 +3209,9 @@
     setValue(node, nonConstant(node.storedType));
     node.isSafeForElimination =
         !node.nativeBehavior.sideEffects.hasSideEffects() &&
-        (!node.nativeBehavior.throwBehavior.canThrow ||
-         (!firstArgumentIsNullable &&
-          node.nativeBehavior.throwBehavior.isOnlyNullNSMGuard));
+            (!node.nativeBehavior.throwBehavior.canThrow ||
+                (!firstArgumentIsNullable &&
+                    node.nativeBehavior.throwBehavior.isOnlyNullNSMGuard));
   }
 
   @override
@@ -3306,7 +3235,8 @@
       setValue(node, nothing);
     } else {
       node.objectIsNotNull = object.isDefinitelyNotNull;
-      setValue(node, nonConstant(typeSystem.elementTypeOfIndexable(object.type)));
+      setValue(
+          node, nonConstant(typeSystem.elementTypeOfIndexable(object.type)));
     }
   }
 
@@ -3325,9 +3255,10 @@
 
   @override
   void visitRefinement(Refinement node) {
-    setValue(node, lattice.intersectWithType(
-        getValue(node.value.definition),
-        node.refineType));
+    setValue(
+        node,
+        lattice.intersectWithType(
+            getValue(node.value.definition), node.refineType));
   }
 
   @override
@@ -3362,7 +3293,7 @@
 ///             and the type of the constant is in the [type] field.
 ///   NONCONST: not a constant, but [type] may hold some information.
 class AbstractConstantValue {
-  static const int NOTHING  = 0;
+  static const int NOTHING = 0;
   static const int CONSTANT = 1;
   static const int NONCONST = 2;
 
@@ -3383,17 +3314,16 @@
 
   factory AbstractConstantValue.nonConstant(TypeMask type) {
     if (type.isEmpty) {
-      if (type.isNullable)
-        return new AbstractConstantValue.constantValue(
-            new NullConstantValue(), type);
-      else
-        return new AbstractConstantValue.nothing();
+      return new AbstractConstantValue.nothing();
+    } else if (type.isNull) {
+      return new AbstractConstantValue.constantValue(
+          new NullConstantValue(), type);
     } else {
       return new AbstractConstantValue._internal(NONCONST, null, type);
     }
   }
 
-  bool get isNothing  => (kind == NOTHING);
+  bool get isNothing => (kind == NOTHING);
   bool get isConstant => (kind == CONSTANT);
   bool get isNonConst => (kind == NONCONST);
   bool get isNullConstant => kind == CONSTANT && constant.isNull;
@@ -3405,6 +3335,7 @@
     PrimitiveConstantValue value = constant;
     return value.primitiveValue <= 0;
   }
+
   bool get isNegativeConstant {
     if (kind != CONSTANT || !constant.isNum) return false;
     PrimitiveConstantValue value = constant;
@@ -3421,16 +3352,20 @@
 
   bool operator ==(AbstractConstantValue that) {
     return that.kind == this.kind &&
-           that.constant == this.constant &&
-           that.type == this.type;
+        that.constant == this.constant &&
+        that.type == this.type;
   }
 
   String toString() {
     switch (kind) {
-      case NOTHING: return "Nothing";
-      case CONSTANT: return "Constant: ${constant.unparse()}: $type";
-      case NONCONST: return "Non-constant: $type";
-      default: assert(false);
+      case NOTHING:
+        return "Nothing";
+      case CONSTANT:
+        return "Constant: ${constant.unparse()}: $type";
+      case NONCONST:
+        return "Non-constant: $type";
+      default:
+        assert(false);
     }
     return null;
   }
diff --git a/pkg/compiler/lib/src/cps_ir/update_refinements.dart b/pkg/compiler/lib/src/cps_ir/update_refinements.dart
index 313f2cb..09f5d7a 100644
--- a/pkg/compiler/lib/src/cps_ir/update_refinements.dart
+++ b/pkg/compiler/lib/src/cps_ir/update_refinements.dart
@@ -44,7 +44,9 @@
         node.type = typeSystem.receiverTypeFor(node.selector, value.type);
       } else {
         // Check is no longer needed.
-        node..replaceUsesWith(value)..destroy();
+        node
+          ..replaceUsesWith(value)
+          ..destroy();
         LetPrim letPrim = node.parent;
         letPrim.remove();
         return;
@@ -62,8 +64,8 @@
   visitRefinement(Refinement node) {
     if (refine(node.value)) {
       // Update the type if the input has changed.
-      node.type = typeSystem.intersection(node.value.definition.type,
-          node.refineType);
+      node.type =
+          typeSystem.intersection(node.value.definition.type, node.refineType);
     }
     Primitive value = node.effectiveDefinition;
     Primitive old = refinementFor[value];
@@ -75,8 +77,7 @@
 
   visitBoundsCheck(BoundsCheck node) {
     super.visitBoundsCheck(node);
-    if (node.hasIntegerCheck &&
-        typeSystem.isDefinitelyInt(node.index.type)) {
+    if (node.hasIntegerCheck && typeSystem.isDefinitelyInt(node.index.type)) {
       node.checks &= ~BoundsCheck.INTEGER;
     }
   }
diff --git a/pkg/compiler/lib/src/cps_ir/use_field_initializers.dart b/pkg/compiler/lib/src/cps_ir/use_field_initializers.dart
index ca510f7..1b218af 100644
--- a/pkg/compiler/lib/src/cps_ir/use_field_initializers.dart
+++ b/pkg/compiler/lib/src/cps_ir/use_field_initializers.dart
@@ -12,7 +12,7 @@
 /// the field initializer of a [CreateInstance] instruction.
 ///
 /// This compensates for a somewhat common pattern where fields are initialized
-/// in the constructor body instead of using intializers. For example:
+/// in the constructor body instead of using initializers. For example:
 ///
 ///     class Foo {
 ///       var x, y;
@@ -74,21 +74,27 @@
   void visitContinuation(Continuation node) {
     endBasicBlock();
   }
+
   void visitLetHandler(LetHandler node) {
     endBasicBlock();
   }
+
   void visitInvokeContinuation(InvokeContinuation node) {
     endBasicBlock();
   }
+
   void visitBranch(Branch node) {
     endBasicBlock();
   }
+
   void visitRethrow(Rethrow node) {
     endBasicBlock();
   }
+
   void visitThrow(Throw node) {
     endBasicBlock();
   }
+
   void visitUnreachable(Unreachable node) {
     endBasicBlock();
   }
@@ -109,7 +115,9 @@
   void sinkLetConts() {
     if (letContSinkTarget != null) {
       for (LetCont letCont in letConts.reversed) {
-        letCont..remove()..insertBelow(letContSinkTarget);
+        letCont
+          ..remove()
+          ..insertBelow(letContSinkTarget);
       }
       letContSinkTarget = null;
     }
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index f46ad8d..0518e488 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -4,12 +4,18 @@
 
 library dart2js.cmdline;
 
-import 'dart:async'
-    show Future, EventSink;
+import 'dart:async' show Future, EventSink;
 import 'dart:convert' show UTF8, LineSplitter;
 import 'dart:io'
-    show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException,
-         stdin, stderr;
+    show
+        exit,
+        File,
+        FileMode,
+        Platform,
+        RandomAccessFile,
+        FileSystemException,
+        stdin,
+        stderr;
 
 import '../compiler.dart' as api;
 import 'commandline_options.dart';
@@ -173,7 +179,10 @@
         out = currentDirectory.resolve('out.dart');
         sourceMapOut = currentDirectory.resolve('out.dart.map');
       }
-      diagnosticHandler(null, null, null,
+      diagnosticHandler(
+          null,
+          null,
+          null,
           "--output-type=dart is deprecated. It will remain available "
           "in Dart 1.11, but will be removed in Dart 1.12.",
           api.Diagnostic.WARNING);
@@ -257,7 +266,7 @@
       for (String category in categories) {
         if (!["Client", "Server"].contains(category)) {
           fail('Unsupported library category "$category", '
-               'supported categories are: Client, Server, all');
+              'supported categories are: Client, Server, all');
         }
       }
     }
@@ -304,8 +313,8 @@
       passThrough(Flags.suppressWarnings);
     }),
     new OptionHandler(Flags.fatalWarnings, passThrough),
-    new OptionHandler(Flags.suppressHints,
-                      (_) => diagnosticHandler.showHints = false),
+    new OptionHandler(
+        Flags.suppressHints, (_) => diagnosticHandler.showHints = false),
     new OptionHandler(
         '--output-type=dart|--output-type=dart-multi|--output-type=js',
         setOutputType),
@@ -317,25 +326,24 @@
     new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true),
     new OptionHandler(Flags.allowMockCompilation, passThrough),
     new OptionHandler(Flags.fastStartup, passThrough),
-    new OptionHandler(Flags.conditionalDirectives, passThrough),
+    new OptionHandler(Flags.genericMethodSyntax, passThrough),
     new OptionHandler('${Flags.minify}|-m', implyCompilation),
     new OptionHandler(Flags.preserveUris, passThrough),
     new OptionHandler('--force-strip=.*', setStrip),
     new OptionHandler(Flags.disableDiagnosticColors,
-                      (_) => diagnosticHandler.enableColors = false),
+        (_) => diagnosticHandler.enableColors = false),
     new OptionHandler(Flags.enableDiagnosticColors,
-                      (_) => diagnosticHandler.enableColors = true),
+        (_) => diagnosticHandler.enableColors = true),
     new OptionHandler('--enable[_-]checked[_-]mode|--checked',
-                      (_) => setCheckedMode(Flags.enableCheckedMode)),
+        (_) => setCheckedMode(Flags.enableCheckedMode)),
     new OptionHandler(Flags.trustTypeAnnotations,
-                      (_) => setTrustTypeAnnotations(
-                          Flags.trustTypeAnnotations)),
+        (_) => setTrustTypeAnnotations(Flags.trustTypeAnnotations)),
     new OptionHandler(Flags.trustPrimitives,
-                      (_) => setTrustPrimitives(
-                          Flags.trustPrimitives)),
-    new OptionHandler(Flags.trustJSInteropTypeAnnotations,
-                      (_) => setTrustJSInteropTypeAnnotations(
-                          Flags.trustJSInteropTypeAnnotations)),
+        (_) => setTrustPrimitives(Flags.trustPrimitives)),
+    new OptionHandler(
+        Flags.trustJSInteropTypeAnnotations,
+        (_) => setTrustJSInteropTypeAnnotations(
+            Flags.trustJSInteropTypeAnnotations)),
     new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
     new OptionHandler('--packages=.+', setPackageConfig),
     new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
@@ -349,19 +357,23 @@
     new OptionHandler(Flags.terse, passThrough),
     new OptionHandler('--deferred-map=.+', implyCompilation),
     new OptionHandler(Flags.dumpInfo, setDumpInfo),
-    new OptionHandler('--disallow-unsafe-eval',
-                      (_) => hasDisallowUnsafeEval = true),
+    new OptionHandler(
+        '--disallow-unsafe-eval', (_) => hasDisallowUnsafeEval = true),
     new OptionHandler(Option.showPackageWarnings, passThrough),
     new OptionHandler(Flags.useContentSecurityPolicy, passThrough),
     new OptionHandler(Flags.enableExperimentalMirrors, passThrough),
     new OptionHandler(Flags.enableAssertMessage, passThrough),
+    // TODO(floitsch): remove conditional directives flag.
+    // We don't provide the info-message yet, since we haven't publicly
+    // launched the feature yet.
+    new OptionHandler(Flags.conditionalDirectives, (_) {}),
     new OptionHandler('--enable-async', (_) {
       diagnosticHandler.info(
           "Option '--enable-async' is no longer needed. "
           "Async-await is supported by default.",
           api.Diagnostic.HINT);
     }),
-    new OptionHandler('--enable-null-aware-operators',  (_) {
+    new OptionHandler('--enable-null-aware-operators', (_) {
       diagnosticHandler.info(
           "Option '--enable-null-aware-operators' is no longer needed. "
           "Null aware operators are supported by default.",
@@ -393,18 +405,18 @@
   }
 
   if (hasDisallowUnsafeEval) {
-    String precompiledName =
-        relativize(currentDirectory,
-                   RandomAccessFileOutputProvider.computePrecompiledUri(out),
-                   Platform.isWindows);
+    String precompiledName = relativize(
+        currentDirectory,
+        RandomAccessFileOutputProvider.computePrecompiledUri(out),
+        Platform.isWindows);
     helpAndFail("Option '--disallow-unsafe-eval' has been removed."
-                " Instead, the compiler generates a file named"
-                " '$precompiledName'.");
+        " Instead, the compiler generates a file named"
+        " '$precompiledName'.");
   }
 
   if (outputLanguage != OUTPUT_LANGUAGE_DART && stripArgumentSet) {
     helpAndFail("Option '--force-strip' may only be used with "
-                "'--output-type=dart'.");
+        "'--output-type=dart'.");
   }
   if (arguments.isEmpty) {
     helpAndFail('No Dart file specified.');
@@ -416,7 +428,7 @@
 
   if (checkedMode && trustTypeAnnotations) {
     helpAndFail("Option '${Flags.trustTypeAnnotations}' may not be used in "
-                "checked mode.");
+        "checked mode.");
   }
 
   if (packageRoot != null && packageConfig != null) {
@@ -438,33 +450,33 @@
   if (!analyzeOnly) {
     if (allowNativeExtensions) {
       helpAndFail("Option '${Flags.allowNativeExtensions}' is only supported "
-                  "in combination with the '${Flags.analyzeOnly}' option.");
+          "in combination with the '${Flags.analyzeOnly}' option.");
     }
   }
   if (dumpInfo && outputLanguage == OUTPUT_LANGUAGE_DART) {
     helpAndFail("Option '${Flags.dumpInfo}' is not supported in "
-                "combination with the '--output-type=dart' option.");
+        "combination with the '--output-type=dart' option.");
   }
 
   options.add('--out=$out');
   options.add('--source-map=$sourceMapOut');
 
   RandomAccessFileOutputProvider outputProvider =
-      new RandomAccessFileOutputProvider(
-          out, sourceMapOut, onInfo: diagnosticHandler.info, onFailure: fail);
+      new RandomAccessFileOutputProvider(out, sourceMapOut,
+          onInfo: diagnosticHandler.info, onFailure: fail);
 
   api.CompilationResult compilationDone(api.CompilationResult result) {
     if (analyzeOnly) return result;
     if (!result.isSuccess) {
       fail('Compilation failed.');
     }
-    writeString(Uri.parse('$out.deps'),
-                getDepsOutput(inputProvider.sourceFiles));
-    diagnosticHandler.info(
-         'Compiled ${inputProvider.dartCharactersRead} characters Dart '
-         '-> ${outputProvider.totalCharactersWritten} characters '
-         '$outputLanguage in '
-         '${relativize(currentDirectory, out, Platform.isWindows)}');
+    writeString(
+        Uri.parse('$out.deps'), getDepsOutput(inputProvider.sourceFiles));
+    diagnosticHandler
+        .info('Compiled ${inputProvider.dartCharactersRead} characters Dart '
+            '-> ${outputProvider.totalCharactersWritten} characters '
+            '$outputLanguage in '
+            '${relativize(currentDirectory, out, Platform.isWindows)}');
     if (diagnosticHandler.verbose) {
       String input = uriPathToNative(arguments[0]);
       print('Dart file ($input) compiled to $outputLanguage.');
@@ -481,10 +493,18 @@
   }
 
   Uri uri = currentDirectory.resolve(arguments[0]);
-  return compileFunc(uri, libraryRoot, packageRoot, inputProvider,
-                     diagnosticHandler, options, outputProvider, environment,
-                     packageConfig, findPackages)
-            .then(compilationDone);
+  return compileFunc(
+          uri,
+          libraryRoot,
+          packageRoot,
+          inputProvider,
+          diagnosticHandler,
+          options,
+          outputProvider,
+          environment,
+          packageConfig,
+          findPackages)
+      .then(compilationDone);
 }
 
 class AbortLeg {
@@ -504,8 +524,7 @@
 
 void fail(String message) {
   if (diagnosticHandler != null) {
-    diagnosticHandler.report(
-        null, null, -1, -1, message, api.Diagnostic.ERROR);
+    diagnosticHandler.report(null, null, -1, -1, message, api.Diagnostic.ERROR);
   } else {
     print('Error: $message');
   }
@@ -515,7 +534,7 @@
 Future<api.CompilationResult> compilerMain(List<String> arguments) {
   var root = uriPathToNative("/$LIBRARY_ROOT");
   arguments = <String>['--library-root=${Platform.script.toFilePath()}$root']
-      ..addAll(arguments);
+    ..addAll(arguments);
   return compile(arguments);
 }
 
@@ -660,14 +679,13 @@
   --no-frequency-based-minification
     Experimental.  Disabled the new frequency based minifying namer and use the
     old namer instead.
-'''.trim());
+'''
+      .trim());
 }
 
 void helpAndExit(bool wantHelp, bool wantVersion, bool verbose) {
   if (wantVersion) {
-    var version = (BUILD_ID == null)
-        ? '<non-SDK build>'
-        : BUILD_ID;
+    var version = (BUILD_ID == null) ? '<non-SDK build>' : BUILD_ID;
     print('Dart-to-JavaScript compiler (dart2js) version: $version');
   }
   if (wantHelp) {
@@ -762,7 +780,7 @@
     }).whenComplete(() {
       // The testing framework waits for a status line on stdout and
       // stderr before moving to the next test.
-      if (exitCode == 0){
+      if (exitCode == 0) {
         print(">>> TEST OK");
       } else if (exitCode == 253) {
         print(">>> TEST CRASH");
diff --git a/pkg/compiler/lib/src/dart2js_profile_many.dart b/pkg/compiler/lib/src/dart2js_profile_many.dart
index e7ad871..e29ec46 100644
--- a/pkg/compiler/lib/src/dart2js_profile_many.dart
+++ b/pkg/compiler/lib/src/dart2js_profile_many.dart
@@ -7,8 +7,7 @@
 import 'dart2js.dart' as cmdline;
 import 'dart:async';
 
-const String USAGE =
-"""
+const String USAGE = """
 Usage: dart2js_profile_many.dart [OPTIONS] [FILES]
 
 Invokes dart2js separately for each file using the given options.
@@ -20,7 +19,6 @@
 }
 
 void main(List<String> args) {
-
   List options = [];
   List files = [];
 
@@ -45,10 +43,8 @@
     List subargs = [];
     subargs.addAll(options);
     subargs.add(file);
-    return cmdline.compilerMain(subargs).catchError((e) {  });
+    return cmdline.compilerMain(subargs).catchError((e) {});
   }).then((_) {
     print("Done");
   });
-
-
 }
diff --git a/pkg/compiler/lib/src/dart2js_stress.dart b/pkg/compiler/lib/src/dart2js_stress.dart
index 7daedea..453d95c 100644
--- a/pkg/compiler/lib/src/dart2js_stress.dart
+++ b/pkg/compiler/lib/src/dart2js_stress.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 library dart2js.stress;
+
 import "dart2js.dart" as dart2js;
 
 const ITERATIONS_FLAG_PREFIX = "--iterations=";
@@ -16,23 +17,21 @@
   }
   if (maxCount == null) {
     print("Running indefinitely.\n"
-          "Use '$ITERATIONS_FLAG_PREFIX<count>' to set a repetition count"
-          " (as first flag).");
+        "Use '$ITERATIONS_FLAG_PREFIX<count>' to set a repetition count"
+        " (as first flag).");
   }
   args = ["--suppress-warnings", "--suppress-hints"]..addAll(args);
   void iterate() {
     count++;
     sw.reset();
     sw.start();
-    dart2js.internalMain(args)
-      .then((_) {
-        print("$count: ${sw.elapsedMilliseconds}ms");
-      })
-      .then((_) {
-        if (maxCount == null || count < maxCount) {
-          iterate();
-        }
-      });
+    dart2js.internalMain(args).then((_) {
+      print("$count: ${sw.elapsedMilliseconds}ms");
+    }).then((_) {
+      if (maxCount == null || count < maxCount) {
+        iterate();
+      }
+    });
   }
   iterate();
 }
diff --git a/pkg/compiler/lib/src/dart_backend/backend.dart b/pkg/compiler/lib/src/dart_backend/backend.dart
index 7d99b21..8d9d0cc 100644
--- a/pkg/compiler/lib/src/dart_backend/backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend.dart
@@ -52,11 +52,10 @@
       new Set<ClassElement>();
 
   bool enableCodegenWithErrorsIfSupported(Spannable node) {
-    reporter.reportHintMessage(
-        node,
-        MessageKind.GENERIC,
-        {'text': "Generation of code with compile time errors is not "
-                 "supported for dart2dart."});
+    reporter.reportHintMessage(node, MessageKind.GENERIC, {
+      'text': "Generation of code with compile time errors is not "
+          "supported for dart2dart."
+    });
     return false;
   }
 
@@ -73,14 +72,14 @@
       Map<ClassElement, Iterable<Element>> classMembers) {
     ClassElement typeErrorElement = compiler.coreLibrary.find('TypeError');
     if (classMembers.containsKey(typeErrorElement) ||
-        compiler.resolverWorld.isChecks.any(
-            (DartType type) => type.element == typeErrorElement)) {
+        compiler.resolverWorld.isChecks
+            .any((DartType type) => type.element == typeErrorElement)) {
       return false;
     }
     Set<DartType> processedTypes = new Set<DartType>();
     List<DartType> workQueue = new List<DartType>();
-    workQueue.addAll(
-        classMembers.keys.map((classElement) => classElement.thisType));
+    workQueue
+        .addAll(classMembers.keys.map((classElement) => classElement.thisType));
     workQueue.addAll(compiler.resolverWorld.isChecks);
 
     while (!workQueue.isEmpty) {
@@ -111,12 +110,11 @@
             compiler.reporter, compiler.outputProvider,
             forceStripTypes: strips.indexOf('types') != -1,
             multiFile: multiFile,
-            enableMinification: compiler.enableMinification),
+            enableMinification: compiler.options.enableMinification),
         super(compiler) {
     impactTransformer = new DartImpactTransformer(this);
   }
 
-
   DiagnosticReporter get reporter => compiler.reporter;
 
   Resolution get resolution => compiler.resolution;
@@ -128,7 +126,12 @@
     // Right now resolver doesn't always resolve interfaces needed
     // for literals, so force them. TODO(antonm): fix in the resolver.
     final LITERAL_TYPE_NAMES = const [
-      'Map', 'List', 'num', 'int', 'double', 'bool'
+      'Map',
+      'List',
+      'num',
+      'int',
+      'double',
+      'bool'
     ];
     final coreLibrary = compiler.coreLibrary;
     for (final name in LITERAL_TYPE_NAMES) {
@@ -138,12 +141,10 @@
     // Enqueue the methods that the VM might invoke on user objects because
     // we don't trust the resolution to always get these included.
     world.registerDynamicUse(new DynamicUse(Selectors.toString_, null));
-    world.registerDynamicUse(
-        new DynamicUse(Selectors.hashCode_, null));
+    world.registerDynamicUse(new DynamicUse(Selectors.hashCode_, null));
     world.registerDynamicUse(
         new DynamicUse(new Selector.binaryOperator('=='), null));
-    world.registerDynamicUse(
-        new DynamicUse(Selectors.compareTo, null));
+    world.registerDynamicUse(new DynamicUse(Selectors.compareTo, null));
   }
 
   WorldImpact codegen(CodegenWorkItem work) {
@@ -158,27 +159,25 @@
   bool shouldOutput(Element element) {
     return (!element.library.isPlatformLibrary &&
             !element.isSynthesized &&
-            element is! AbstractFieldElement)
-        || mirrorRenamer.isMirrorHelperLibrary(element.library);
+            element is! AbstractFieldElement) ||
+        mirrorRenamer.isMirrorHelperLibrary(element.library);
   }
 
   int assembleProgram() {
     ElementAst computeElementAst(AstElement element) {
-      return new ElementAst(element.resolvedAst.node,
-                            element.resolvedAst.elements);
+      return new ElementAst(
+          element.resolvedAst.node, element.resolvedAst.elements);
     }
 
     // TODO(johnniwinther): Remove the need for this method.
-    void postProcessElementAst(
-        AstElement element, ElementAst elementAst,
-        newTypedefElementCallback,
-        newClassElementCallback) {
-      ReferencedElementCollector collector =
-          new ReferencedElementCollector(reporter,
-                                         element,
-                                         elementAst,
-                                         newTypedefElementCallback,
-                                         newClassElementCallback);
+    void postProcessElementAst(AstElement element, ElementAst elementAst,
+        newTypedefElementCallback, newClassElementCallback) {
+      ReferencedElementCollector collector = new ReferencedElementCollector(
+          reporter,
+          element,
+          elementAst,
+          newTypedefElementCallback,
+          newClassElementCallback);
       collector.collect();
     }
 
@@ -194,21 +193,18 @@
         sortElements: Elements.sortedByPosition,
         mirrorRenamer: mirrorRenamer,
         mainFunction: compiler.mainFunction,
-        outputUri: compiler.outputUri);
+        outputUri: compiler.options.outputUri);
 
     // Output verbose info about size ratio of resulting bundle to all
     // referenced non-platform sources.
-    logResultBundleSizeInfo(
-        outputter.libraryInfo.userLibraries,
-        outputter.elementInfo.topLevelElements,
-        totalSize);
+    logResultBundleSizeInfo(outputter.libraryInfo.userLibraries,
+        outputter.elementInfo.topLevelElements, totalSize);
 
     return totalSize;
   }
 
   void logResultBundleSizeInfo(Iterable<LibraryElement> userLibraries,
-                               Iterable<Element> topLevelElements,
-                               int totalOutputSize) {
+      Iterable<Element> topLevelElements, int totalOutputSize) {
     // Sum total size of scripts in each referenced library.
     int nonPlatformSize = 0;
     for (LibraryElement lib in userLibraries) {
@@ -239,11 +235,12 @@
     });
     if (useMirrorHelperLibrary &&
         loadedLibraries.containsLibrary(Uris.dart_mirrors)) {
-      return compiler.libraryLoader.loadLibrary(
-          compiler.translateResolvedUri(
+      return compiler.libraryLoader
+          .loadLibrary(compiler.translateResolvedUri(
               loadedLibraries.getLibrary(Uris.dart_mirrors),
-              MirrorRenamerImpl.DART_MIRROR_HELPER, null)).
-          then((LibraryElement library) {
+              MirrorRenamerImpl.DART_MIRROR_HELPER,
+              null))
+          .then((LibraryElement library) {
         mirrorRenamer = new MirrorRenamerImpl(compiler, this, library);
       });
     }
@@ -261,21 +258,18 @@
   }
 
   @override
-  void registerInstantiatedType(InterfaceType type,
-                                Enqueuer enqueuer,
-                                Registry registry,
-                                {bool mirrorUsage: false}) {
+  void registerInstantiatedType(
+      InterfaceType type, Enqueuer enqueuer, Registry registry,
+      {bool mirrorUsage: false}) {
     registerPlatformMembers(type, registerUse: registry.registerDynamicUse);
-    super.registerInstantiatedType(
-        type, enqueuer, registry, mirrorUsage: mirrorUsage);
+    super.registerInstantiatedType(type, enqueuer, registry,
+        mirrorUsage: mirrorUsage);
   }
 
   /// Register dynamic access of members of [type] that implement members
   /// of types defined in the platform libraries.
-  void registerPlatformMembers(
-      InterfaceType type,
+  void registerPlatformMembers(InterfaceType type,
       {void registerUse(DynamicUse dynamicUse)}) {
-
     // Without patching, dart2dart has no way of performing sound tree-shaking
     // in face external functions. Therefore we employ another scheme:
     //
@@ -310,8 +304,8 @@
     ClassElement cls = type.element;
     if (!cls.library.isPlatformLibrary) {
       for (Link<DartType> link = cls.allSupertypes;
-           !link.isEmpty;
-           link = link.tail) {
+          !link.isEmpty;
+          link = link.tail) {
         InterfaceType supertype = link.head;
         ClassElement superclass = supertype.element;
         LibraryElement library = superclass.library;
@@ -326,8 +320,7 @@
               FunctionElement function = element.asFunctionElement();
               element.computeType(resolution);
               Selector selector = new Selector.fromElement(element);
-              registerUse(
-                  new DynamicUse(selector, null));
+              registerUse(new DynamicUse(selector, null));
             });
           }
         }
@@ -402,7 +395,6 @@
   }
 }
 
-
 /**
  * Some elements are not recorded by resolver now,
  * for example, typedefs or classes which are only
@@ -416,11 +408,8 @@
   final newTypedefElementCallback;
   final newClassElementCallback;
 
-  ReferencedElementCollector(this.reporter,
-                             this.element,
-                             this.elementAst,
-                             this.newTypedefElementCallback,
-                             this.newClassElementCallback);
+  ReferencedElementCollector(this.reporter, this.element, this.elementAst,
+      this.newTypedefElementCallback, this.newClassElementCallback);
 
   visitNode(Node node) {
     node.visitChildren(this);
@@ -466,8 +455,8 @@
   final DartConstantCompiler constantCompiler;
 
   DartConstantTask(Compiler compiler)
-    : this.constantCompiler = new DartConstantCompiler(compiler),
-      super(compiler);
+      : this.constantCompiler = new DartConstantCompiler(compiler),
+        super(compiler);
 
   String get name => 'ConstantHandler';
 
@@ -526,9 +515,7 @@
   }
 
   @override
-  ConstantExpression compileNode(
-      Node node,
-      TreeElements elements,
+  ConstantExpression compileNode(Node node, TreeElements elements,
       {bool enforceConst: true}) {
     return measure(() {
       return constantCompiler.compileNodeWithDefinitions(node, elements,
@@ -538,9 +525,7 @@
 
   @override
   ConstantExpression compileMetadata(
-      MetadataAnnotation metadata,
-      Node node,
-      TreeElements elements) {
+      MetadataAnnotation metadata, Node node, TreeElements elements) {
     return measure(() {
       return constantCompiler.compileMetadata(metadata, node, elements);
     });
@@ -550,7 +535,7 @@
   // expressions.
   @override
   void copyConstantValues(DartConstantTask task) {
-    constantCompiler.constantValueMap.addAll(
-        task.constantCompiler.constantValueMap);
+    constantCompiler.constantValueMap
+        .addAll(task.constantCompiler.constantValueMap);
   }
 }
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
index 10b056d..fd7a45f 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
@@ -9,13 +9,11 @@
 import '../elements/elements.dart';
 
 class TypeGenerator {
-
   /// TODO(johnniwinther): Remove this when issue 21283 has been resolved.
   static int pseudoNameCounter = 0;
 
   static Parameter emitParameter(DartType type,
-                                 {String name,
-                                  Element element}) {
+      {String name, Element element}) {
     if (name == null && element != null) {
       name = element.name;
     }
@@ -26,8 +24,7 @@
     if (type.isFunctionType) {
       FunctionType functionType = type;
       TypeAnnotation returnType = createOptionalType(functionType.returnType);
-      Parameters innerParameters =
-          createParametersFromType(functionType);
+      Parameters innerParameters = createParametersFromType(functionType);
       parameter = new Parameter.function(name, returnType, innerParameters);
     } else {
       TypeAnnotation typeAnnotation = createOptionalType(type);
@@ -40,31 +37,26 @@
   static Parameters createParametersFromType(FunctionType functionType) {
     pseudoNameCounter = 0;
     if (functionType.namedParameters.isEmpty) {
-      return new Parameters(
-          createParameters(functionType.parameterTypes),
-          createParameters(functionType.optionalParameterTypes),
-          false);
+      return new Parameters(createParameters(functionType.parameterTypes),
+          createParameters(functionType.optionalParameterTypes), false);
     } else {
       return new Parameters(
           createParameters(functionType.parameterTypes),
           createParameters(functionType.namedParameterTypes,
-                         names: functionType.namedParameters),
+              names: functionType.namedParameters),
           true);
     }
   }
 
-  static List<Parameter> createParameters(
-      Iterable<DartType> parameterTypes,
+  static List<Parameter> createParameters(Iterable<DartType> parameterTypes,
       {Iterable<String> names: const <String>[],
-       Iterable<Element> elements: const <Element>[]}) {
+      Iterable<Element> elements: const <Element>[]}) {
     Iterator<String> name = names.iterator;
     Iterator<Element> element = elements.iterator;
     return parameterTypes.map((DartType type) {
       name.moveNext();
       element.moveNext();
-      return emitParameter(type,
-                           name: name.current,
-                           element: element.current);
+      return emitParameter(type, name: name.current, element: element.current);
     }).toList();
   }
 
@@ -83,22 +75,17 @@
       if (type.treatAsRaw) {
         return new TypeAnnotation(type.element.name)..dartType = type;
       }
-      return new TypeAnnotation(
-          type.element.name,
-          type.typeArguments.map(createType).toList(growable:false))
-          ..dartType = type;
+      return new TypeAnnotation(type.element.name,
+          type.typeArguments.map(createType).toList(growable: false))
+        ..dartType = type;
     } else if (type is VoidType) {
-      return new TypeAnnotation('void')
-          ..dartType = type;
+      return new TypeAnnotation('void')..dartType = type;
     } else if (type is TypeVariableType) {
-      return new TypeAnnotation(type.name)
-          ..dartType = type;
+      return new TypeAnnotation(type.name)..dartType = type;
     } else if (type is DynamicType) {
-      return new TypeAnnotation("dynamic")
-          ..dartType = type;
+      return new TypeAnnotation("dynamic")..dartType = type;
     } else if (type is MalformedType) {
-      return new TypeAnnotation(type.name)
-          ..dartType = type;
+      return new TypeAnnotation(type.name)..dartType = type;
     } else {
       throw "Unsupported type annotation: $type";
     }
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
index d4e86e6..81c17c3 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
@@ -68,7 +68,6 @@
 
 // STATEMENTS
 
-
 class Block extends Statement {
   final List<Statement> statements;
 
@@ -108,9 +107,9 @@
 
   /// Initializer must be [VariableDeclarations] or [Expression] or null.
   For(this.initializer, this.condition, this.updates, this.body) {
-    assert(initializer == null
-        || initializer is VariableDeclarations
-        || initializer is Expression);
+    assert(initializer == null ||
+        initializer is VariableDeclarations ||
+        initializer is Expression);
   }
 }
 
@@ -124,10 +123,10 @@
   /// initializer.
   ForIn(Node leftHandValue, this.expression, this.body)
       : this.leftHandValue = leftHandValue {
-    assert(leftHandValue is Identifier
-        || (leftHandValue is VariableDeclarations
-            && leftHandValue.declarations.length == 1
-            && leftHandValue.declarations[0].initializer == null));
+    assert(leftHandValue is Identifier ||
+        (leftHandValue is VariableDeclarations &&
+            leftHandValue.declarations.length == 1 &&
+            leftHandValue.declarations[0].initializer == null));
   }
 }
 
@@ -160,8 +159,7 @@
   LabeledStatement(this.label, this.statement);
 }
 
-class Rethrow extends Statement {
-}
+class Rethrow extends Statement {}
 
 class Return extends Statement {
   final Expression expression;
@@ -229,9 +227,7 @@
   final List<VariableDeclaration> declarations;
 
   VariableDeclarations(this.declarations,
-                      { this.type,
-                        this.isFinal: false,
-                        this.isConst: false }) {
+      {this.type, this.isFinal: false, this.isConst: false}) {
     // Cannot be both final and const.
     assert(!isFinal || !isConst);
   }
@@ -246,7 +242,6 @@
   VariableDeclaration(this.name, [this.initializer]);
 }
 
-
 class FunctionDeclaration extends Statement {
   final FunctionExpression function;
 
@@ -264,14 +259,13 @@
   final bool hasNamedParameters;
 
   Parameters(this.requiredParameters,
-             [ this.optionalParameters,
-               this.hasNamedParameters = false ]);
+      [this.optionalParameters, this.hasNamedParameters = false]);
 
   Parameters.named(this.requiredParameters, this.optionalParameters)
       : hasNamedParameters = true;
 
   Parameters.positional(this.requiredParameters, this.optionalParameters)
-        : hasNamedParameters = false;
+      : hasNamedParameters = false;
 
   bool get hasOptionalParameters =>
       optionalParameters != null && optionalParameters.length > 0;
@@ -290,13 +284,11 @@
 
   elements.FormalElement element;
 
-  Parameter(this.name, {this.type, this.defaultValue})
-      : parameters = null;
+  Parameter(this.name, {this.type, this.defaultValue}) : parameters = null;
 
-  Parameter.function(this.name,
-                     TypeAnnotation returnType,
-                     this.parameters,
-                     [ this.defaultValue ]) : type = returnType {
+  Parameter.function(this.name, TypeAnnotation returnType, this.parameters,
+      [this.defaultValue])
+      : type = returnType {
     assert(parameters != null);
   }
 
@@ -332,12 +324,11 @@
 
   elements.FunctionElement element;
 
-  FunctionExpression(this.parameters,
-                     this.body,
-                     { this.name,
-                       this.returnType,
-                       this.isGetter: false,
-                       this.isSetter: false }) {
+  FunctionExpression(this.parameters, this.body,
+      {this.name,
+      this.returnType,
+      this.isGetter: false,
+      this.isSetter: false}) {
     // Function must have a name if it has a return type
     assert(returnType == null || name != null);
   }
@@ -348,7 +339,7 @@
   final bool isConst;
 
   ConstructorDefinition(Parameters parameters, Statement body,
-                        this.initializers, String name, this.isConst)
+      this.initializers, String name, this.isConst)
       : super(parameters, body, name: name);
 }
 
@@ -389,7 +380,7 @@
   final TypeAnnotation typeArgument;
   final List<Expression> values;
 
-  LiteralList(this.values, { this.typeArgument, this.isConst: false });
+  LiteralList(this.values, {this.typeArgument, this.isConst: false});
 }
 
 class LiteralMap extends Expression {
@@ -397,10 +388,10 @@
   final List<TypeAnnotation> typeArguments;
   final List<LiteralMapEntry> entries;
 
-  LiteralMap(this.entries, { this.typeArguments, this.isConst: false }) {
-    assert(this.typeArguments == null
-        || this.typeArguments.length == 0
-        || this.typeArguments.length == 2);
+  LiteralMap(this.entries, {this.typeArguments, this.isConst: false}) {
+    assert(this.typeArguments == null ||
+        this.typeArguments.length == 0 ||
+        this.typeArguments.length == 2);
   }
 }
 
@@ -504,10 +495,8 @@
   elements.FunctionElement constructor;
   types.DartType dartType;
 
-  CallNew(this.type,
-          this.arguments,
-         { this.constructorName,
-           this.isConst: false });
+  CallNew(this.type, this.arguments,
+      {this.constructorName, this.isConst: false});
 }
 
 /// Expression of form `T.f(..)`.
@@ -550,9 +539,7 @@
   final TypeAnnotation type;
 
   TypeOperator(this.expression, this.operator, this.type) {
-    assert(operator == 'is'
-        || operator == 'as'
-        || operator == 'is!');
+    assert(operator == 'is' || operator == 'as' || operator == 'is!');
   }
 }
 
@@ -574,9 +561,20 @@
 }
 
 class Assignment extends Expression {
-  static final _operators =
-      new Set.from(['=', '|=', '^=', '&=', '<<=', '>>=',
-                    '+=', '-=', '*=', '/=', '%=', '~/=']);
+  static final _operators = new Set.from([
+    '=',
+    '|=',
+    '^=',
+    '&=',
+    '<<=',
+    '>>=',
+    '+=',
+    '-=',
+    '*=',
+    '/=',
+    '%=',
+    '~/='
+  ]);
 
   final Expression left;
   final String operator;
@@ -606,9 +604,11 @@
 bool isUnaryOperator(String op) {
   return op == '!' || op == '-' || op == '~';
 }
+
 bool isBinaryOperator(String op) {
   return BINARY_PRECEDENCE.containsKey(op);
 }
+
 /// True if the given operator can be converted to a compound assignment.
 bool isCompoundableOperator(String op) {
   switch (BINARY_PRECEDENCE[op]) {
@@ -624,7 +624,6 @@
   }
 }
 
-
 // Precedence levels
 const int EXPRESSION = 1;
 const int CONDITIONAL = 2;
@@ -646,28 +645,22 @@
 /// Precedence level required for the callee in a [FunctionCall].
 const int CALLEE = 21;
 
-const Map<String,int> BINARY_PRECEDENCE = const {
+const Map<String, int> BINARY_PRECEDENCE = const {
   '&&': LOGICAL_AND,
   '||': LOGICAL_OR,
-
   '==': EQUALITY,
   '!=': EQUALITY,
-
   '>': RELATIONAL,
   '>=': RELATIONAL,
   '<': RELATIONAL,
   '<=': RELATIONAL,
-
   '|': BITWISE_OR,
   '^': BITWISE_XOR,
   '&': BITWISE_AND,
-
   '>>': SHIFT,
   '<<': SHIFT,
-
   '+': ADDITIVE,
   '-': ADDITIVE,
-
   '*': MULTIPLICATIVE,
   '%': MULTIPLICATIVE,
   '/': MULTIPLICATIVE,
@@ -687,9 +680,9 @@
     return false;
   }
   return (characters.$0 <= x && x <= characters.$9) ||
-         (characters.$A <= x && x <= characters.$Z) ||
-         (characters.$a <= x && x <= characters.$z) ||
-         (x == characters.$_);
+      (characters.$A <= x && x <= characters.$Z) ||
+      (characters.$a <= x && x <= characters.$z) ||
+      (x == characters.$_);
 }
 
 /// The unparser will apply the following syntactic rewritings:
@@ -727,7 +720,6 @@
 
   Unparser(this.output);
 
-
   void write(String s) {
     output.write(s);
   }
@@ -786,7 +778,7 @@
   /// using parentheses if necessary to raise the precedence level.
   /// Abusing terminology slightly, the function accepts a [Receiver] which
   /// may also be the [SuperReceiver] object.
-  void writeExp(Receiver e, int minPrecedence, {beginStmt:false}) {
+  void writeExp(Receiver e, int minPrecedence, {beginStmt: false}) {
     void withPrecedence(int actual, void action()) {
       if (actual < minPrecedence) {
         write("(");
@@ -842,8 +834,7 @@
     } else if (e is Literal) {
       if (e.value.isString) {
         writeStringLiteral(e);
-      }
-      else if (e.value.isDouble) {
+      } else if (e.value.isDouble) {
         double v = e.value.primitiveValue;
         if (v == double.INFINITY) {
           withPrecedence(MULTIPLICATIVE, () {
@@ -875,8 +866,7 @@
       write('[');
       writeEach(',', e.values, writeExpression);
       write(']');
-    }
-    else if (e is LiteralMap) {
+    } else if (e is LiteralMap) {
       // The curly brace can be mistaken for a block statement if we
       // are at the beginning of a statement.
       bool needParen = beginStmt;
@@ -920,7 +910,8 @@
       Receiver operand = e.operand;
       // !(x == y) ==> x != y.
       if (e.operatorName == '!' &&
-          operand is BinaryOperator && operand.operator == '==') {
+          operand is BinaryOperator &&
+          operand.operator == '==') {
         withPrecedence(EQUALITY, () {
           writeExp(operand.left, RELATIONAL);
           writeOperator('!=');
@@ -929,14 +920,14 @@
       }
       // !(x is T) ==> x is!T
       else if (e.operatorName == '!' &&
-          operand is TypeOperator && operand.operator == 'is') {
+          operand is TypeOperator &&
+          operand.operator == 'is') {
         withPrecedence(RELATIONAL, () {
           writeExp(operand.expression, BITWISE_OR, beginStmt: beginStmt);
           write(' is!');
           writeType(operand.type);
         });
-      }
-      else {
+      } else {
         withPrecedence(UNARY, () {
           writeOperator(e.operatorName);
           writeExp(e.operand, UNARY);
@@ -1100,7 +1091,7 @@
     } else if (stmt is EmptyStatement) {
       write(';');
     } else if (stmt is ExpressionStatement) {
-      writeExp(stmt.expression, EXPRESSION, beginStmt:true);
+      writeExp(stmt.expression, EXPRESSION, beginStmt: true);
       write(';');
     } else if (stmt is For) {
       write('for(');
@@ -1246,8 +1237,7 @@
   void writeVariableDefinitions(VariableDeclarations vds) {
     if (vds.isConst)
       write('const ');
-    else if (vds.isFinal)
-      write('final ');
+    else if (vds.isFinal) write('final ');
     if (vds.type != null) {
       writeType(vds.type);
       write(' ');
@@ -1307,10 +1297,10 @@
   // Ignore multiline quotings for now. Would need to make sure that no
   // newline (potentially prefixed by whitespace) follows the quoting.
   static const _QUOTINGS = const <tree.StringQuoting>[
-      const tree.StringQuoting(characters.$DQ, raw: false, leftQuoteLength: 1),
-      const tree.StringQuoting(characters.$DQ, raw: true, leftQuoteLength: 1),
-      const tree.StringQuoting(characters.$SQ, raw: false, leftQuoteLength: 1),
-      const tree.StringQuoting(characters.$SQ, raw: true, leftQuoteLength: 1),
+    const tree.StringQuoting(characters.$DQ, raw: false, leftQuoteLength: 1),
+    const tree.StringQuoting(characters.$DQ, raw: true, leftQuoteLength: 1),
+    const tree.StringQuoting(characters.$SQ, raw: false, leftQuoteLength: 1),
+    const tree.StringQuoting(characters.$SQ, raw: true, leftQuoteLength: 1),
   ];
 
   static StringLiteralOutput analyzeStringLiteral(Expression node) {
@@ -1371,24 +1361,20 @@
       }
     }
 
-
     /// Applies additional cost to each track in [penalized], and considers
     /// switching from each [penalized] to a [nonPenalized] track.
-    void penalize(List<int> penalized,
-                  List<int> nonPenalized,
-                  int endIndex,
-                  num cost(tree.StringQuoting q)) {
+    void penalize(List<int> penalized, List<int> nonPenalized, int endIndex,
+        num cost(tree.StringQuoting q)) {
       for (int j in penalized) {
         // Check if another track can benefit from switching from this track.
         for (int k in nonPenalized) {
-          num newCost = best[j].cost
-                      + 1             // Whitespace in string juxtaposition
-                      + getQuoteCost(best[k].quoting);
+          num newCost = best[j].cost +
+              1 // Whitespace in string juxtaposition
+              +
+              getQuoteCost(best[k].quoting);
           if (newCost < best[k].cost) {
             best[k] = new OpenStringChunk(
-                best[j].end(endIndex),
-                best[k].quoting,
-                newCost);
+                best[j].end(endIndex), best[k].quoting, newCost);
           }
         }
         best[j].cost += cost(best[j].quoting);
@@ -1433,18 +1419,18 @@
         if (part is Identifier &&
             !part.name.contains(r'$') &&
             i + 1 < parts.length &&
-            isIdentifierPartNoDollar(parts[i+1])) {
+            isIdentifierPartNoDollar(parts[i + 1])) {
           for (int j in nonRaws) {
             for (int k = 0; k < best.length; k++) {
-              num newCost = best[j].cost
-                          + 1             // Whitespace in string juxtaposition
-                          - 2             // Save two curly braces
-                          + getQuoteCost(best[k].quoting);
+              num newCost = best[j].cost +
+                  1 // Whitespace in string juxtaposition
+                  -
+                  2 // Save two curly braces
+                  +
+                  getQuoteCost(best[k].quoting);
               if (newCost < best[k].cost) {
                 best[k] = new OpenStringChunk(
-                    best[j].end(i+1),
-                    best[k].quoting,
-                    newCost);
+                    best[j].end(i + 1), best[k].quoting, newCost);
               }
             }
           }
@@ -1481,15 +1467,15 @@
       write(chunk.quoting.quoteChar);
       bool raw = chunk.quoting.raw;
       int quoteCode = chunk.quoting.quote;
-      for (int i=startIndex; i<chunk.endIndex; i++) {
+      for (int i = startIndex; i < chunk.endIndex; i++) {
         var part = parts[i];
         if (part is int) {
           int char = part;
           write(getEscapedCharacter(char, quoteCode, raw));
         } else if (part is Identifier &&
-                   !part.name.contains(r'$') &&
-                   (i == chunk.endIndex - 1 ||
-                    !isIdentifierPartNoDollar(parts[i+1]))) {
+            !part.name.contains(r'$') &&
+            (i == chunk.endIndex - 1 ||
+                !isIdentifierPartNoDollar(parts[i + 1]))) {
           write(r'$');
           write(part.name);
         } else {
@@ -1531,7 +1517,6 @@
         return new String.fromCharCode(char);
     }
   }
-
 }
 
 /// The contents of a string literal together with a strategy for printing it.
@@ -1544,7 +1529,6 @@
   StringLiteralOutput(this.parts, this.chunk);
 }
 
-
 /// Strategy for printing a prefix of a string literal.
 /// A chunk represents the substring going from [:previous.endIndex:] to
 /// [endIndex] (or from 0 to [endIndex] if [previous] is null).
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart
index 2500c44..1ab7882 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart
@@ -8,8 +8,7 @@
 import '../constants/values.dart' as values;
 import '../dart_types.dart' as types;
 import '../elements/elements.dart' as elements;
-import '../resolution/tree_elements.dart' show
-    TreeElementMapping;
+import '../resolution/tree_elements.dart' show TreeElementMapping;
 import '../tokens/token.dart';
 import '../tokens/token_constants.dart';
 import '../tokens/precedence.dart';
@@ -20,8 +19,7 @@
 import 'backend_ast_emitter.dart' show TypeGenerator;
 
 /// Translates the backend AST to Dart frontend AST.
-tree.Node emit(TreeElementMapping treeElements,
-               RootNode root) {
+tree.Node emit(TreeElementMapping treeElements, RootNode root) {
   return new TreePrinter(treeElements).makeDefinition(root);
 }
 
@@ -52,10 +50,11 @@
       setElement(definition, node.element, node);
       return new tree.VariableDefinitions(
           null, // TODO(sigurdm): Type
-          makeVarModifiers(useVar: true,
-                           isFinal: node.element.isFinal,
-                           isStatic: node.element.isStatic,
-                           isConst: node.element.isConst),
+          makeVarModifiers(
+              useVar: true,
+              isFinal: node.element.isFinal,
+              isStatic: node.element.isStatic,
+              isConst: node.element.isConst),
           makeList(null, [definition], close: semicolon));
     } else if (node is FunctionExpression) {
       return makeExpression(node);
@@ -90,12 +89,12 @@
     return openTok;
   }
 
-  final BeginGroupToken openParen = makeGroup(OPEN_PAREN_INFO,
-                                              CLOSE_PAREN_INFO);
-  final BeginGroupToken openBrace = makeGroup(OPEN_CURLY_BRACKET_INFO,
-                                              CLOSE_CURLY_BRACKET_INFO);
-  final BeginGroupToken openBracket = makeGroup(OPEN_SQUARE_BRACKET_INFO,
-                                                CLOSE_SQUARE_BRACKET_INFO);
+  final BeginGroupToken openParen =
+      makeGroup(OPEN_PAREN_INFO, CLOSE_PAREN_INFO);
+  final BeginGroupToken openBrace =
+      makeGroup(OPEN_CURLY_BRACKET_INFO, CLOSE_CURLY_BRACKET_INFO);
+  final BeginGroupToken openBracket =
+      makeGroup(OPEN_SQUARE_BRACKET_INFO, CLOSE_SQUARE_BRACKET_INFO);
   final BeginGroupToken lt = makeGroup(LT_INFO, GT_INFO);
 
   Token get closeParen => openParen.endGroup;
@@ -116,6 +115,7 @@
   static Token makeIdToken(String text) {
     return new StringToken.fromString(IDENTIFIER_INFO, text, -1);
   }
+
   final Token newToken = makeIdToken('new');
   final Token constToken = makeIdToken('const');
   final Token throwToken = makeIdToken('throw');
@@ -168,27 +168,32 @@
   tree.NodeList blankList() {
     return new tree.NodeList(null, makeLink([]), null, '');
   }
+
   tree.NodeList singleton(tree.Node node) {
     return new tree.NodeList(null, makeLink([node]), null, '');
   }
-  tree.NodeList makeList(String delimiter,
-                         Iterable<tree.Node> nodes,
-                         { Token open,
-                           Token close }) {
+
+  tree.NodeList makeList(String delimiter, Iterable<tree.Node> nodes,
+      {Token open, Token close}) {
     return new tree.NodeList(open, makeLink(nodes), close, delimiter);
   }
+
   tree.NodeList parenList(String delimiter, Iterable<tree.Node> nodes) {
     return makeList(delimiter, nodes, open: openParen, close: closeParen);
   }
+
   tree.NodeList bracketList(String delimiter, Iterable<tree.Node> nodes) {
     return makeList(delimiter, nodes, open: openBracket, close: closeBracket);
   }
+
   tree.NodeList braceList(String delimiter, Iterable<tree.Node> nodes) {
     return makeList(delimiter, nodes, open: openBrace, close: closeBrace);
   }
+
   tree.NodeList argList(Iterable<tree.Node> nodes) {
     return parenList(',', nodes);
   }
+
   tree.NodeList typeArgList(Iterable<tree.Node> nodes) {
     return makeList(',', nodes, open: lt, close: gt);
   }
@@ -198,7 +203,7 @@
     if (name == null) {
       return null;
     }
-    List<String> names = name.split('.').toList(growable:false);
+    List<String> names = name.split('.').toList(growable: false);
     tree.Node node = makeIdentifier(names[0]);
     for (int i = 1; i < names.length; i++) {
       node = new tree.Send(node, makeIdentifier(names[i]));
@@ -208,18 +213,30 @@
 
   static Token assignmentToken(String operatorName) {
     switch (operatorName) {
-      case '=': return new SymbolToken(EQ_INFO, -1);
-      case '+=': return new SymbolToken(PLUS_EQ_INFO, -1);
-      case '-=': return new SymbolToken(MINUS_EQ_INFO, -1);
-      case '*=': return new SymbolToken(STAR_EQ_INFO, -1);
-      case '/=': return new SymbolToken(SLASH_EQ_INFO, -1);
-      case '~/=': return new SymbolToken(TILDE_SLASH_EQ_INFO, -1);
-      case '%=': return new SymbolToken(PERCENT_EQ_INFO, -1);
-      case '&=': return new SymbolToken(AMPERSAND_EQ_INFO, -1);
-      case '^=': return new SymbolToken(CARET_EQ_INFO, -1);
-      case '|=': return new SymbolToken(BAR_EQ_INFO, -1);
-      case '>>=': return new SymbolToken(GT_GT_EQ_INFO, -1);
-      case '<<=': return new SymbolToken(LT_LT_EQ_INFO, -1);
+      case '=':
+        return new SymbolToken(EQ_INFO, -1);
+      case '+=':
+        return new SymbolToken(PLUS_EQ_INFO, -1);
+      case '-=':
+        return new SymbolToken(MINUS_EQ_INFO, -1);
+      case '*=':
+        return new SymbolToken(STAR_EQ_INFO, -1);
+      case '/=':
+        return new SymbolToken(SLASH_EQ_INFO, -1);
+      case '~/=':
+        return new SymbolToken(TILDE_SLASH_EQ_INFO, -1);
+      case '%=':
+        return new SymbolToken(PERCENT_EQ_INFO, -1);
+      case '&=':
+        return new SymbolToken(AMPERSAND_EQ_INFO, -1);
+      case '^=':
+        return new SymbolToken(CARET_EQ_INFO, -1);
+      case '|=':
+        return new SymbolToken(BAR_EQ_INFO, -1);
+      case '>>=':
+        return new SymbolToken(GT_GT_EQ_INFO, -1);
+      case '<<=':
+        return new SymbolToken(LT_LT_EQ_INFO, -1);
       default:
         throw "Unrecognized assignment operator: $operatorName";
     }
@@ -227,25 +244,44 @@
 
   static Token binopToken(String operatorName) {
     switch (operatorName) {
-      case '+': return new SymbolToken(PLUS_INFO, -1);
-      case '-': return new SymbolToken(MINUS_INFO, -1);
-      case '*': return new SymbolToken(STAR_INFO, -1);
-      case '/': return new SymbolToken(SLASH_INFO, -1);
-      case '~/': return new SymbolToken(TILDE_SLASH_INFO, -1);
-      case '%': return new SymbolToken(PERCENT_INFO, -1);
-      case '&': return new SymbolToken(AMPERSAND_INFO, -1);
-      case '^': return new SymbolToken(CARET_INFO, -1);
-      case '|': return new SymbolToken(BAR_INFO, -1);
-      case '>>': return new SymbolToken(GT_GT_INFO, -1);
-      case '<<': return new SymbolToken(LT_LT_INFO, -1);
-      case '==': return new SymbolToken(EQ_EQ_INFO, -1);
-      case '!=': return new SymbolToken(BANG_EQ_INFO, -1);
-      case '>': return new SymbolToken(GT_INFO, -1);
-      case '>=': return new SymbolToken(GT_EQ_INFO, -1);
-      case '<': return new SymbolToken(LT_INFO, -1);
-      case '<=': return new SymbolToken(LT_EQ_INFO, -1);
-      case '&&': return new SymbolToken(AMPERSAND_AMPERSAND_INFO, -1);
-      case '||': return new SymbolToken(BAR_BAR_INFO, -1);
+      case '+':
+        return new SymbolToken(PLUS_INFO, -1);
+      case '-':
+        return new SymbolToken(MINUS_INFO, -1);
+      case '*':
+        return new SymbolToken(STAR_INFO, -1);
+      case '/':
+        return new SymbolToken(SLASH_INFO, -1);
+      case '~/':
+        return new SymbolToken(TILDE_SLASH_INFO, -1);
+      case '%':
+        return new SymbolToken(PERCENT_INFO, -1);
+      case '&':
+        return new SymbolToken(AMPERSAND_INFO, -1);
+      case '^':
+        return new SymbolToken(CARET_INFO, -1);
+      case '|':
+        return new SymbolToken(BAR_INFO, -1);
+      case '>>':
+        return new SymbolToken(GT_GT_INFO, -1);
+      case '<<':
+        return new SymbolToken(LT_LT_INFO, -1);
+      case '==':
+        return new SymbolToken(EQ_EQ_INFO, -1);
+      case '!=':
+        return new SymbolToken(BANG_EQ_INFO, -1);
+      case '>':
+        return new SymbolToken(GT_INFO, -1);
+      case '>=':
+        return new SymbolToken(GT_EQ_INFO, -1);
+      case '<':
+        return new SymbolToken(LT_INFO, -1);
+      case '<=':
+        return new SymbolToken(LT_EQ_INFO, -1);
+      case '&&':
+        return new SymbolToken(AMPERSAND_AMPERSAND_INFO, -1);
+      case '||':
+        return new SymbolToken(BAR_BAR_INFO, -1);
       default:
         throw "Unrecognized binary operator: $operatorName";
     }
@@ -253,17 +289,22 @@
 
   static Token incrementToken(String operatorName) {
     switch (operatorName) {
-      case '++': return new SymbolToken(PLUS_PLUS_INFO, -1);
-      case '--': return new SymbolToken(MINUS_MINUS_INFO, -1);
+      case '++':
+        return new SymbolToken(PLUS_PLUS_INFO, -1);
+      case '--':
+        return new SymbolToken(MINUS_MINUS_INFO, -1);
       default:
         throw "Unrecognized increment operator: $operatorName";
     }
   }
 
   static Token typeOpToken(String operatorName) {
-    switch (operatorName) { // "is!" is not an operator in the frontend AST.
-      case 'is': return new SymbolToken(IS_INFO, -1);
-      case 'as': return new SymbolToken(AS_INFO, -1);
+    switch (operatorName) {
+      // "is!" is not an operator in the frontend AST.
+      case 'is':
+        return new SymbolToken(IS_INFO, -1);
+      case 'as':
+        return new SymbolToken(AS_INFO, -1);
       default:
         throw 'Unrecognized type operator: $operatorName';
     }
@@ -271,9 +312,12 @@
 
   Token unopToken(String operatorName) {
     switch (operatorName) {
-      case '-': return new SymbolToken(MINUS_INFO, -1);
-      case '~': return new SymbolToken(TILDE_INFO, -1);
-      case '!': return bang;
+      case '-':
+        return new SymbolToken(MINUS_INFO, -1);
+      case '~':
+        return new SymbolToken(TILDE_INFO, -1);
+      case '!':
+        return bang;
       default:
         throw "Unrecognized unary operator: $operatorName";
     }
@@ -283,9 +327,7 @@
     if (treeElements == null) return null;
     if (element.isStatic) {
       elements.ClassElement enclosingClass = element.enclosingClass;
-      tree.Send send = new tree.Send(
-          null,
-          makeIdentifier(enclosingClass.name));
+      tree.Send send = new tree.Send(null, makeIdentifier(enclosingClass.name));
       treeElements[send] = enclosingClass;
       return send;
     } else {
@@ -298,9 +340,7 @@
       return makeExpression(arg);
     } else if (arg is NamedArgument) {
       return new tree.NamedArgument(
-          makeIdentifier(arg.name),
-          colon,
-          makeExpression(arg.expression));
+          makeIdentifier(arg.name), colon, makeExpression(arg.expression));
     } else {
       throw "Unrecognized argument type: ${arg}";
     }
@@ -338,8 +378,8 @@
       } else if (left is IndexExpression) {
         receiver = makeExp(left.object, PRIMARY, beginStmt: beginStmt);
         selector = new tree.Operator(indexToken);
-        arguments = bracketList(',',
-            [makeExpression(left.index), makeExpression(exp.right)]);
+        arguments = bracketList(
+            ',', [makeExpression(left.index), makeExpression(exp.right)]);
       } else {
         throw "Unexpected left-hand side of assignment: ${left}";
       }
@@ -358,8 +398,8 @@
       // class B { var x; B() : x = (() {return a;}) {}}
       // Not the invalid:
       // class B { var x; B() : x = () {return a;} {}}
-      result = new tree.SendSet(receiver, selector, op,
-                                singleton(makeExp(exp.body, CALLEE)));
+      result = new tree.SendSet(
+          receiver, selector, op, singleton(makeExp(exp.body, CALLEE)));
       setElement(result, exp.element, exp);
     } else if (exp is SuperInitializer) {
       precedence = EXPRESSION;
@@ -369,9 +409,8 @@
       if (exp.target.name == "") {
         result = new tree.Send(null, receiver, arguments);
       } else {
-        result = new tree.Send(receiver,
-                               makeIdentifier(exp.target.name),
-                               arguments);
+        result =
+            new tree.Send(receiver, makeIdentifier(exp.target.name), arguments);
       }
       setElement(result, exp.target, exp);
     } else if (exp is BinaryOperator) {
@@ -395,9 +434,7 @@
         selector = makeExp(callee, CALLEE, beginStmt: beginStmt);
       }
       result = new tree.Send(
-          receiver,
-          selector,
-          argList(exp.arguments.map(makeArgument)));
+          receiver, selector, argList(exp.arguments.map(makeArgument)));
       if (callee is Identifier) {
         setElement(result, element, exp);
       }
@@ -406,31 +443,23 @@
       // TODO(sra): Elide receiver when This, but only if not in a scope that
       // shadows the method (e.g. constructor body).
       tree.Node receiver = makeExp(exp.object, PRIMARY, beginStmt: beginStmt);
-      result = new tree.Send(
-          receiver,
-          makeIdentifier(exp.methodName),
+      result = new tree.Send(receiver, makeIdentifier(exp.methodName),
           argList(exp.arguments.map(makeArgument)));
     } else if (exp is CallNew) {
       precedence = CALLEE;
       tree.Node selector = makeName(exp.type.name);
       if (exp.type.typeArguments.length > 0) {
         selector = new tree.TypeAnnotation(
-            selector,
-            typeArgList(exp.type.typeArguments.map(makeType)));
+            selector, typeArgList(exp.type.typeArguments.map(makeType)));
         setType(selector, exp.dartType, exp);
       }
       if (exp.constructorName != null) {
-        selector = new tree.Send(
-            selector,
-            makeIdentifier(exp.constructorName));
+        selector = new tree.Send(selector, makeIdentifier(exp.constructorName));
       }
       tree.Send send = new tree.Send(
-          null,
-          selector,
-          argList(exp.arguments.map(makeArgument)));
-      result = new tree.NewExpression(
-          exp.isConst ? constToken : newToken,
-          send);
+          null, selector, argList(exp.arguments.map(makeArgument)));
+      result =
+          new tree.NewExpression(exp.isConst ? constToken : newToken, send);
       setType(result, exp.dartType, exp);
       setElement(send, exp.constructor, exp);
     } else if (exp is CallStatic) {
@@ -459,18 +488,19 @@
       tree.NodeList parameters = makeParameters(exp.parameters);
       tree.NodeList initializers =
           exp.initializers == null || exp.initializers.isEmpty
-          ? null
-          : makeList(",", exp.initializers.map(makeExpression).toList());
+              ? null
+              : makeList(",", exp.initializers.map(makeExpression).toList());
       tree.Node body = exp.isConst || exp.body == null
           ? new tree.EmptyStatement(semicolon)
           : makeFunctionBody(exp.body);
-      result = new tree.FunctionExpression(constructorName(exp),
+      result = new tree.FunctionExpression(
+          constructorName(exp),
           parameters,
           body,
-          null,  // return type
+          null, // return type
           makeFunctionModifiers(exp),
           initializers,
-          null,  // get/set
+          null, // get/set
           null); // async modifier
       setElement(result, exp.element, exp);
     } else if (exp is FunctionExpression) {
@@ -478,33 +508,27 @@
       if (beginStmt && exp.name != null) {
         needParen = true; // Do not mistake for function declaration.
       }
-      Token getOrSet = exp.isGetter
-          ? getToken
-          : exp.isSetter
-              ? setToken
-              : null;
-      tree.NodeList parameters = exp.isGetter
-          ? makeList("", [])
-          : makeParameters(exp.parameters);
+      Token getOrSet = exp.isGetter ? getToken : exp.isSetter ? setToken : null;
+      tree.NodeList parameters =
+          exp.isGetter ? makeList("", []) : makeParameters(exp.parameters);
       tree.Node body = makeFunctionBody(exp.body);
       result = new tree.FunctionExpression(
           functionName(exp),
           parameters,
           body,
           exp.returnType == null || exp.element.isConstructor
-            ? null
-            : makeType(exp.returnType),
+              ? null
+              : makeType(exp.returnType),
           makeFunctionModifiers(exp),
-          null,  // initializers
-          getOrSet,  // get/set
-          null);  // async modifier
+          null, // initializers
+          getOrSet, // get/set
+          null); // async modifier
       elements.Element element = exp.element;
       if (element != null) setElement(result, element, exp);
     } else if (exp is Identifier) {
       precedence = CALLEE;
       result = new tree.Send(
-          makeStaticReceiver(exp.element),
-          makeIdentifier(exp.name));
+          makeStaticReceiver(exp.element), makeIdentifier(exp.name));
       setElement(result, exp.element, exp);
     } else if (exp is Increment) {
       Expression lvalue = exp.expression;
@@ -597,8 +621,7 @@
     } else if (exp is LiteralSymbol) {
       precedence = PRIMARY;
       result = new tree.LiteralSymbol(
-          hash,
-          makeList('.', exp.id.split('.').map(makeIdentifier)));
+          hash, makeList('.', exp.id.split('.').map(makeIdentifier)));
     } else if (exp is LiteralType) {
       precedence = TYPE_LITERAL;
       elements.Element optionalElement = exp.type.element;
@@ -606,14 +629,13 @@
           optionalElement == null ? null : makeStaticReceiver(optionalElement),
           makeIdentifier(exp.name));
       treeElements.setType(result, exp.type);
-      if (optionalElement != null) { // dynamic does not have an element
+      if (optionalElement != null) {
+        // dynamic does not have an element
         setElement(result, optionalElement, exp);
       }
     } else if (exp is ReifyTypeVar) {
       precedence = PRIMARY;
-      result = new tree.Send(
-          null,
-          makeIdentifier(exp.name));
+      result = new tree.Send(null, makeIdentifier(exp.name));
       setElement(result, exp.element, exp);
       setType(result, exp.element.type, exp);
     } else if (exp is StringConcat) {
@@ -624,9 +646,7 @@
       result = makeIdentifier('this');
     } else if (exp is Throw) {
       precedence = EXPRESSION; // ???
-      result = new tree.Throw(
-          makeExpression(exp.expression),
-          throwToken,
+      result = new tree.Throw(makeExpression(exp.expression), throwToken,
           throwToken); // endToken not used by unparser
     } else if (exp is TypeOperator) {
       precedence = RELATIONAL;
@@ -634,10 +654,8 @@
       tree.Node rightOperand = makeType(exp.type);
       if (exp.operator == 'is!') {
         operator = new tree.Operator(typeOpToken('is'));
-        rightOperand = new tree.Send(
-            rightOperand,
-            new tree.Operator(bang),
-            blankList());
+        rightOperand =
+            new tree.Send(rightOperand, new tree.Operator(bang), blankList());
       } else {
         operator = new tree.Operator(typeOpToken(exp.operator));
       }
@@ -647,8 +665,7 @@
           singleton(rightOperand));
     } else if (exp is UnaryOperator) {
       precedence = UNARY;
-      result = new tree.Send.prefix(
-          makeExp(exp.operand, UNARY),
+      result = new tree.Send.prefix(makeExp(exp.operand, UNARY),
           new tree.Operator(unopToken(exp.operatorName)));
     } else {
       throw "Unknown expression type: ${exp}";
@@ -672,9 +689,7 @@
 
   tree.LiteralMapEntry makeLiteralMapEntry(LiteralMapEntry en) {
     return new tree.LiteralMapEntry(
-        makeExpression(en.key),
-        colon,
-        makeExpression(en.value));
+        makeExpression(en.key), colon, makeExpression(en.value));
   }
 
   /// A comment token to be inserted when [INSERT_NEW_BACKEND_COMMENT] is true.
@@ -684,8 +699,8 @@
 
   tree.Node makeFunctionBody(Statement stmt) {
     if (INSERT_NEW_BACKEND_COMMENT) {
-      return new tree.Block(makeList('', [makeBlock(stmt)],
-                                     open: newBackendComment));
+      return new tree.Block(
+          makeList('', [makeBlock(stmt)], open: newBackendComment));
     } else {
       return makeBlock(stmt);
     }
@@ -717,7 +732,7 @@
   /// True if [stmt] is equivalent to an empty statement.
   bool isEmptyStatement(Statement stmt) {
     return stmt is EmptyStatement ||
-          (stmt is Block && stmt.statements.every(isEmptyStatement));
+        (stmt is Block && stmt.statements.every(isEmptyStatement));
   }
 
   tree.Node makeStatement(Statement stmt, {bool shortIf: true}) {
@@ -748,8 +763,7 @@
       return new tree.EmptyStatement(semicolon);
     } else if (stmt is ExpressionStatement) {
       return new tree.ExpressionStatement(
-          makeExp(stmt.expression, EXPRESSION, beginStmt: true),
-          semicolon);
+          makeExp(stmt.expression, EXPRESSION, beginStmt: true), semicolon);
     } else if (stmt is For) {
       tree.Node initializer;
       if (stmt.initializer is VariableDeclarations) {
@@ -762,8 +776,7 @@
       tree.Node condition;
       if (stmt.condition != null) {
         condition = new tree.ExpressionStatement(
-            makeExpression(stmt.condition),
-            semicolon);
+            makeExpression(stmt.condition), semicolon);
       } else {
         condition = new tree.EmptyStatement(semicolon);
       }
@@ -780,12 +793,8 @@
       } else {
         left = makeVariableDeclarations(stmt.leftHandValue);
       }
-      return new tree.SyncForIn(
-          left,
-          makeExpression(stmt.expression),
-          makeStatement(stmt.body, shortIf: shortIf),
-          forToken,
-          inToken);
+      return new tree.SyncForIn(left, makeExpression(stmt.expression),
+          makeStatement(stmt.body, shortIf: shortIf), forToken, inToken);
     } else if (stmt is FunctionDeclaration) {
       tree.FunctionExpression function = new tree.FunctionExpression(
           stmt.name != null ? makeIdentifier(stmt.name) : null,
@@ -793,8 +802,8 @@
           makeFunctionBody(stmt.body),
           stmt.returnType != null ? makeType(stmt.returnType) : null,
           makeEmptyModifiers(),
-          null,  // initializers
-          null,  // get/set
+          null, // initializers
+          null, // get/set
           null); // async modifier
       setElement(function, stmt.function.element, stmt);
       return new tree.FunctionDeclaration(function);
@@ -827,14 +836,11 @@
         inner = lbl.statement;
       }
       return new tree.LabeledStatement(
-          makeList('', labels),
-          makeStatement(inner, shortIf: shortIf));
+          makeList('', labels), makeStatement(inner, shortIf: shortIf));
     } else if (stmt is Rethrow) {
       return new tree.Rethrow(rethrowToken, semicolon);
     } else if (stmt is Return) {
-      return new tree.Return(
-          returnToken,
-          semicolon,
+      return new tree.Return(returnToken, semicolon,
           stmt.expression == null ? null : makeExpression(stmt.expression));
     } else if (stmt is Switch) {
       return new tree.SwitchStatement(
@@ -851,10 +857,8 @@
     } else if (stmt is VariableDeclarations) {
       return makeVariableDeclarations(stmt, useVar: true, endToken: semicolon);
     } else if (stmt is While) {
-      return new tree.While(
-          parenthesize(makeExpression(stmt.condition)),
-          makeStatement(stmt.body, shortIf: shortIf),
-          whileToken);
+      return new tree.While(parenthesize(makeExpression(stmt.condition)),
+          makeStatement(stmt.body, shortIf: shortIf), whileToken);
     } else {
       throw "Unrecognized statement: ${stmt}";
     }
@@ -866,11 +870,8 @@
     if (vd.initializer == null) {
       return id;
     }
-    tree.Node send = new tree.SendSet(
-          null,
-          id,
-          new tree.Operator(eq),
-          singleton(makeExpression(vd.initializer)));
+    tree.Node send = new tree.SendSet(null, id, new tree.Operator(eq),
+        singleton(makeExpression(vd.initializer)));
     setElement(send, vd.element, vd);
     return send;
   }
@@ -879,15 +880,14 @@
   /// if no other modifiers are present.
   /// [endToken] will be used to terminate the declaration list.
   tree.Node makeVariableDeclarations(VariableDeclarations decl,
-                                      { bool useVar: false,
-                                        Token endToken: null }) {
+      {bool useVar: false, Token endToken: null}) {
     return new tree.VariableDefinitions(
         decl.type == null ? null : makeType(decl.type),
-        makeVarModifiers(isConst: decl.isConst,
-                          isFinal: decl.isFinal,
-                          useVar: useVar && decl.type == null),
-        makeList(',',
-            decl.declarations.map(makeVariableDeclaration),
+        makeVarModifiers(
+            isConst: decl.isConst,
+            isFinal: decl.isFinal,
+            useVar: useVar && decl.type == null),
+        makeList(',', decl.declarations.map(makeVariableDeclaration),
             close: endToken));
   }
 
@@ -897,17 +897,13 @@
       tree.Node exceptionName = makeIdentifier(block.exceptionVar.name);
       setElement(exceptionName, block.exceptionVar.element, block.exceptionVar);
       formals.add(new tree.VariableDefinitions(
-          null,
-          makeEmptyModifiers(),
-          singleton(exceptionName)));
+          null, makeEmptyModifiers(), singleton(exceptionName)));
     }
     if (block.stackVar != null) {
       tree.Node stackTraceName = makeIdentifier(block.stackVar.name);
       setElement(stackTraceName, block.stackVar.element, block.stackVar);
       formals.add(new tree.VariableDefinitions(
-          null,
-          makeEmptyModifiers(),
-          singleton(stackTraceName)));
+          null, makeEmptyModifiers(), singleton(stackTraceName)));
     }
     return new tree.CatchBlock(
         block.onType == null ? null : makeType(block.onType),
@@ -958,7 +954,7 @@
       Token open = params.hasNamedParameters ? openBrace : openBracket;
       Token close = params.hasNamedParameters ? closeBrace : closeBracket;
       Iterable<tree.Node> opt =
-          params.optionalParameters.map((p) => makeParameter(p,assign));
+          params.optionalParameters.map((p) => makeParameter(p, assign));
       nodes.add(new tree.NodeList(open, makeLink(opt), close, ','));
     }
     return argList(nodes);
@@ -971,10 +967,10 @@
           makeIdentifier(param.name),
           makeParameters(param.parameters),
           null, // body
-          param.type == null ? null : makeType(param.type),
+              param.type == null ? null : makeType(param.type),
           makeEmptyModifiers(), // TODO: Function parameter modifiers?
-          null,  // initializers
-          null,  // get/set
+          null, // initializers
+          null, // get/set
           null); // async modifier
       if (param.element != null) {
         setElement(definition, param.element, param);
@@ -987,9 +983,7 @@
             singleton(makeExpression(param.defaultValue)));
       }
       return new tree.VariableDefinitions(
-          null,
-          makeEmptyModifiers(),
-          singleton(definition));
+          null, makeEmptyModifiers(), singleton(definition));
     } else {
       tree.Node definition;
       if (param.defaultValue != null) {
@@ -1015,13 +1009,14 @@
     return new tree.Modifiers(blankList());
   }
 
-  tree.Modifiers makeModifiers({bool isExternal: false,
-                                bool isStatic: false,
-                                bool isAbstract: false,
-                                bool isFactory: false,
-                                bool isConst: false,
-                                bool isFinal: false,
-                                bool isVar: false}) {
+  tree.Modifiers makeModifiers(
+      {bool isExternal: false,
+      bool isStatic: false,
+      bool isAbstract: false,
+      bool isFactory: false,
+      bool isConst: false,
+      bool isFinal: false,
+      bool isVar: false}) {
     List<tree.Node> nodes = [];
     if (isExternal) {
       nodes.add(makeIdentifier('external'));
@@ -1047,22 +1042,25 @@
     return new tree.Modifiers(makeList(' ', nodes));
   }
 
-  tree.Modifiers makeVarModifiers({bool isConst: false,
-                                   bool isFinal: false,
-                                   bool useVar: false,
-                                   bool isStatic: false}) {
-    return makeModifiers(isStatic: isStatic,
-                         isConst: isConst,
-                         isFinal: isFinal,
-                         isVar: useVar && !(isConst || isFinal));
+  tree.Modifiers makeVarModifiers(
+      {bool isConst: false,
+      bool isFinal: false,
+      bool useVar: false,
+      bool isStatic: false}) {
+    return makeModifiers(
+        isStatic: isStatic,
+        isConst: isConst,
+        isFinal: isFinal,
+        isVar: useVar && !(isConst || isFinal));
   }
 
   tree.Modifiers makeFunctionModifiers(FunctionExpression exp) {
     if (exp.element == null) return makeEmptyModifiers();
-    return makeModifiers(isExternal: exp.element.isExternal,
-                         isStatic: exp.element.isStatic,
-                         isFactory: exp.element.isFactoryConstructor,
-                         isConst: exp.element.isConst);
+    return makeModifiers(
+        isExternal: exp.element.isExternal,
+        isStatic: exp.element.isStatic,
+        isFactory: exp.element.isFactoryConstructor,
+        isConst: exp.element.isConst);
   }
 
   tree.Node makeNodeForClassElement(elements.ClassElement cls) {
@@ -1089,8 +1087,8 @@
     final Token typedefKeyword = typedefToken;
     final Token endToken = semicolon;
 
-    return new tree.Typedef(returnType, name, typeParameters, formals,
-          typedefKeyword, endToken);
+    return new tree.Typedef(
+        returnType, name, typeParameters, formals, typedefKeyword, endToken);
   }
 
   /// Create a [tree.NodeList] containing the type variable declarations in
@@ -1126,17 +1124,17 @@
   /// differs between [tree.NamedMixinApplication] and [tree.ClassNode].
   // TODO(johnniwinther): Normalize interfaces on[tree.NamedMixinApplication]
   // and [tree.ClassNode].
-  tree.NodeList makeInterfaces(Link<types.DartType> interfaces,
-                               Set<types.DartType> mixinTypes,
-                               {bool forNamedMixinApplication: false}) {
+  tree.NodeList makeInterfaces(
+      Link<types.DartType> interfaces, Set<types.DartType> mixinTypes,
+      {bool forNamedMixinApplication: false}) {
     Link<tree.Node> typeAnnotations = const Link<tree.Node>();
     for (Link<types.DartType> link = interfaces;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       types.DartType interface = link.head;
       if (!mixinTypes.contains(interface)) {
-        typeAnnotations = typeAnnotations.prepend(
-            makeType(TypeGenerator.createType(interface)));
+        typeAnnotations = typeAnnotations
+            .prepend(makeType(TypeGenerator.createType(interface)));
       }
     }
     if (typeAnnotations.isEmpty) {
@@ -1144,7 +1142,9 @@
     } else {
       return new tree.NodeList(
           forNamedMixinApplication ? null : implementsToken,
-          typeAnnotations, null, ',');
+          typeAnnotations,
+          null,
+          ',');
     }
   }
 
@@ -1152,11 +1152,10 @@
   // TODO(johnniwinther): Unify creation of mixin lists between
   // [NamedMixinApplicationElement] and [ClassElement].
   tree.NamedMixinApplication makeNamedMixinApplication(
-       elements.MixinApplicationElement cls) {
-
+      elements.MixinApplicationElement cls) {
     assert(invariant(cls, !cls.isUnnamedMixinApplication,
         message: "Cannot create ClassNode for unnamed mixin application "
-                 "$cls."));
+            "$cls."));
     tree.Modifiers modifiers = makeModifiers(isAbstract: cls.isAbstract);
     tree.Identifier name = makeIdentifier(cls.name);
     tree.NodeList typeParameters = makeTypeParameters(cls.typeVariables);
@@ -1183,12 +1182,11 @@
     tree.Node supernode = new tree.MixinApplication(
         superclass, new tree.NodeList(null, mixins, null, ','));
 
-    tree.NodeList interfaces = makeInterfaces(
-        cls.interfaces, mixinTypes, forNamedMixinApplication: true);
+    tree.NodeList interfaces = makeInterfaces(cls.interfaces, mixinTypes,
+        forNamedMixinApplication: true);
 
-    return new tree.NamedMixinApplication(
-        name, typeParameters, modifiers, supernode,
-        interfaces, classToken, semicolon);
+    return new tree.NamedMixinApplication(name, typeParameters, modifiers,
+        supernode, interfaces, classToken, semicolon);
   }
 
   tree.Enum makeEnum(elements.EnumClassElement cls) {
@@ -1196,14 +1194,14 @@
         enumToken,
         makeIdentifier(cls.name),
         makeList(',', cls.enumValues.map((e) => makeIdentifier(e.name)),
-                 open: openBrace, close: closeBrace));
+            open: openBrace, close: closeBrace));
   }
 
   /// Creates a [tree.ClassNode] node for [cls].
   tree.ClassNode makeClassNode(elements.ClassElement cls) {
     assert(invariant(cls, !cls.isUnnamedMixinApplication,
         message: "Cannot create ClassNode for unnamed mixin application "
-                 "$cls."));
+            "$cls."));
     tree.Modifiers modifiers = makeModifiers(isAbstract: cls.isAbstract);
     tree.Identifier name = makeIdentifier(cls.name);
     tree.NodeList typeParameters = makeTypeParameters(cls.typeVariables);
@@ -1232,13 +1230,17 @@
         supernode = makeType(TypeGenerator.createType(supertype));
       }
     }
-    tree.NodeList interfaces = makeInterfaces(
-        cls.interfaces, mixinTypes);
+    tree.NodeList interfaces = makeInterfaces(cls.interfaces, mixinTypes);
 
     Token extendsKeyword = supernode != null ? extendsToken : null;
     return new tree.ClassNode(
-        modifiers, name, typeParameters, supernode,
-        interfaces, openBrace, extendsKeyword,
+        modifiers,
+        name,
+        typeParameters,
+        supernode,
+        interfaces,
+        openBrace,
+        extendsKeyword,
         null, // No body.
         closeBrace);
   }
@@ -1246,9 +1248,8 @@
   tree.Node constructorName(ConstructorDefinition exp) {
     String name = exp.name;
     tree.Identifier className = makeIdentifier(exp.element.enclosingClass.name);
-    tree.Node result = name == ""
-        ? className
-        : new tree.Send(className, makeIdentifier(name));
+    tree.Node result =
+        name == "" ? className : new tree.Send(className, makeIdentifier(name));
     setElement(result, exp.element, exp);
     return result;
   }
@@ -1296,9 +1297,8 @@
           // Finish the previous string interpolation, if there is one.
           tree.LiteralString lit = makeVerbatimStringLiteral(sb.toString());
           if (currentInterpolation != null) {
-            literalParts.add(new tree.StringInterpolationPart(
-                currentInterpolation,
-                lit));
+            literalParts.add(
+                new tree.StringInterpolationPart(currentInterpolation, lit));
           } else {
             firstLiteral = lit;
           }
@@ -1322,24 +1322,20 @@
       if (firstLiteral == null) {
         node = lit;
       } else {
-        literalParts.add(new tree.StringInterpolationPart(
-            currentInterpolation,
-            lit));
+        literalParts
+            .add(new tree.StringInterpolationPart(currentInterpolation, lit));
         node = new tree.StringInterpolation(
-            firstLiteral,
-            makeList('', literalParts));
+            firstLiteral, makeList('', literalParts));
       }
 
       // Juxtapose with the previous string chunks, if any.
       if (chunk.previous != null) {
         return new tree.StringJuxtaposition(
-            printStringChunk(chunk.previous),
-            node);
+            printStringChunk(chunk.previous), node);
       } else {
         return node;
       }
     }
     return printStringChunk(output.chunk);
   }
-
 }
diff --git a/pkg/compiler/lib/src/dart_backend/dart_backend.dart b/pkg/compiler/lib/src/dart_backend/dart_backend.dart
index ee653f0..729091f 100644
--- a/pkg/compiler/lib/src/dart_backend/dart_backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/dart_backend.dart
@@ -7,53 +7,30 @@
 import 'dart:async' show Future;
 import 'dart:math' show max;
 
-import '../../compiler.dart' show
-    CompilerOutputProvider;
+import '../../compiler.dart' show CompilerOutputProvider;
 import '../common.dart';
-import '../common/backend_api.dart' show
-    Backend,
-    ImpactTransformer;
-import '../common/codegen.dart' show
-    CodegenWorkItem;
-import '../common/names.dart' show
-    Selectors,
-    Uris;
-import '../common/registry.dart' show
-    Registry;
-import '../common/resolution.dart' show
-    Resolution,
-    ResolutionImpact;
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
+import '../common/backend_api.dart' show Backend, ImpactTransformer;
+import '../common/codegen.dart' show CodegenWorkItem;
+import '../common/names.dart' show Selectors, Uris;
+import '../common/registry.dart' show Registry;
+import '../common/resolution.dart' show Resolution, ResolutionImpact;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
 import '../compile_time_constants.dart';
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
 import '../constants/values.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../enqueue.dart' show
-    Enqueuer,
-    ResolutionEnqueuer;
-import '../library_loader.dart' show
-    LoadedLibraries;
+import '../enqueue.dart' show Enqueuer, ResolutionEnqueuer;
+import '../library_loader.dart' show LoadedLibraries;
 import '../mirror_renamer/mirror_renamer.dart';
-import '../resolution/tree_elements.dart' show
-    TreeElements,
-    TreeElementMapping;
-import '../tokens/keyword.dart' show
-    Keyword;
+import '../resolution/tree_elements.dart' show TreeElements, TreeElementMapping;
+import '../tokens/keyword.dart' show Keyword;
 import '../tree/tree.dart';
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/use.dart' show
-    DynamicUse,
-    TypeUse,
-    TypeUseKind;
-import '../universe/world_impact.dart' show
-    WorldImpact,
-    TransformedWorldImpact;
+import '../universe/selector.dart' show Selector;
+import '../universe/use.dart' show DynamicUse, TypeUse, TypeUseKind;
+import '../universe/world_impact.dart' show WorldImpact, TransformedWorldImpact;
 import '../util/util.dart';
 import 'backend_ast_to_frontend_ast.dart' as backend2frontend;
 
diff --git a/pkg/compiler/lib/src/dart_backend/outputter.dart b/pkg/compiler/lib/src/dart_backend/outputter.dart
index 3e6f564..ce9022a 100644
--- a/pkg/compiler/lib/src/dart_backend/outputter.dart
+++ b/pkg/compiler/lib/src/dart_backend/outputter.dart
@@ -8,7 +8,8 @@
     Map<ClassElement, Iterable<Element>> classMembers);
 typedef void ElementCallback<E>(E element);
 typedef void ElementPostProcessFunction(
-    AstElement element, ElementAst elementAst,
+    AstElement element,
+    ElementAst elementAst,
     ElementCallback<TypedefElement> typedefCallback,
     ElementCallback<ClassElement> classCallback);
 typedef ElementAst ComputeElementAstFunction(AstElement element);
@@ -38,9 +39,9 @@
 
   // TODO(johnniwinther): Support recompilation.
   DartOutputter(this.reporter, this.outputProvider,
-                {bool this.forceStripTypes: false,
-                 bool this.enableMinification: false,
-                 bool this.multiFile: false});
+      {bool this.forceStripTypes: false,
+      bool this.enableMinification: false,
+      bool this.multiFile: false});
 
   /// Generate Dart code for the program starting at [mainFunction].
   ///
@@ -57,8 +58,8 @@
   /// [resolvedElements] in the generated output.
   ///
   /// Returns the total size of the generated code.
-  int assembleProgram({
-      MirrorRenamer mirrorRenamer: const MirrorRenamer(),
+  int assembleProgram(
+      {MirrorRenamer mirrorRenamer: const MirrorRenamer(),
       Iterable<LibraryElement> libraries,
       Iterable<Element> instantiatedClasses,
       Iterable<Element> resolvedElements,
@@ -70,7 +71,6 @@
       ElementFilter shouldOutput,
       IsSafeToRemoveTypeDeclarations isSafeToRemoveTypeDeclarations,
       ElementSorter sortElements}) {
-
     assert(invariant(NO_LOCATION_SPANNABLE, libraries != null,
         message: "'libraries' must be non-null."));
     assert(invariant(NO_LOCATION_SPANNABLE, instantiatedClasses != null,
@@ -83,8 +83,8 @@
         message: "'computeElementAst' must be non-null."));
     assert(invariant(NO_LOCATION_SPANNABLE, shouldOutput != null,
         message: "'shouldOutput' must be non-null."));
-    assert(invariant(NO_LOCATION_SPANNABLE,
-        isSafeToRemoveTypeDeclarations != null,
+    assert(invariant(
+        NO_LOCATION_SPANNABLE, isSafeToRemoveTypeDeclarations != null,
         message: "'isSafeToRemoveTypeDeclarations' must be non-null."));
 
     if (sortElements == null) {
@@ -96,29 +96,20 @@
       };
     }
 
-    libraryInfo = LibraryInfo.processLibraries(
-        reporter, libraries, resolvedElements);
+    libraryInfo =
+        LibraryInfo.processLibraries(reporter, libraries, resolvedElements);
 
     elementInfo = ElementInfoProcessor.createElementInfo(
-        instantiatedClasses,
-        resolvedElements,
-        usedTypeLiterals,
+        instantiatedClasses, resolvedElements, usedTypeLiterals,
         postProcessElementAst: postProcessElementAst,
         parseElementAst: computeElementAst,
         shouldOutput: shouldOutput,
         sortElements: sortElements);
 
     PlaceholderCollector collector = collectPlaceholders(
-        reporter,
-        mirrorRenamer,
-        mainFunction,
-        libraryInfo,
-        elementInfo);
+        reporter, mirrorRenamer, mainFunction, libraryInfo, elementInfo);
 
-    renamer = createRenamer(
-        collector,
-        libraryInfo,
-        elementInfo,
+    renamer = createRenamer(collector, libraryInfo, elementInfo,
         enableMinification: enableMinification,
         forceStripTypes: forceStripTypes,
         isSafeToRemoveTypeDeclarations: isSafeToRemoveTypeDeclarations);
@@ -126,20 +117,13 @@
     if (outputAst) {
       String code = astOutput(reporter, elementInfo);
       outputProvider("", "dart")
-                 ..add(code)
-                 ..close();
+        ..add(code)
+        ..close();
       return code.length;
     } else {
       output = new MainOutputGenerator();
-      return output.generateCode(
-          libraryInfo,
-          elementInfo,
-          collector,
-          renamer,
-          mainFunction,
-          outputUri,
-          outputProvider,
-          mirrorRenamer,
+      return output.generateCode(libraryInfo, elementInfo, collector, renamer,
+          mainFunction, outputUri, outputProvider, mirrorRenamer,
           multiFile: multiFile,
           forceStripTypes: forceStripTypes,
           enableMinification: enableMinification);
@@ -171,17 +155,15 @@
     return collector;
   }
 
-  static PlaceholderRenamer createRenamer(
-      PlaceholderCollector collector,
-      LibraryInfo libraryInfo,
-      ElementInfo elementInfo,
+  static PlaceholderRenamer createRenamer(PlaceholderCollector collector,
+      LibraryInfo libraryInfo, ElementInfo elementInfo,
       {bool enableMinification: false,
-       bool forceStripTypes: false,
-       isSafeToRemoveTypeDeclarations}) {
+      bool forceStripTypes: false,
+      isSafeToRemoveTypeDeclarations}) {
     // Create renames.
-    bool shouldCutDeclarationTypes = forceStripTypes
-        || (enableMinification
-            && isSafeToRemoveTypeDeclarations(elementInfo.classMembers));
+    bool shouldCutDeclarationTypes = forceStripTypes ||
+        (enableMinification &&
+            isSafeToRemoveTypeDeclarations(elementInfo.classMembers));
 
     PlaceholderRenamer placeholderRenamer = new PlaceholderRenamer(
         libraryInfo.fixedDynamicNames,
@@ -194,8 +176,8 @@
     return placeholderRenamer;
   }
 
-  static String astOutput(DiagnosticReporter reporter,
-                          ElementInfo elementInfo) {
+  static String astOutput(
+      DiagnosticReporter reporter, ElementInfo elementInfo) {
     // TODO(antonm): Ideally XML should be a separate backend.
     // TODO(antonm): obey renames and minification, at least as an option.
     StringBuffer sb = new StringBuffer();
@@ -223,10 +205,8 @@
   final Map<Element, LibraryElement> reexportingLibraries;
   final List<LibraryElement> userLibraries;
 
-  LibraryInfo(this.fixedStaticNames,
-              this.fixedDynamicNames,
-              this.reexportingLibraries,
-              this.userLibraries);
+  LibraryInfo(this.fixedStaticNames, this.fixedDynamicNames,
+      this.reexportingLibraries, this.userLibraries);
 
   static LibraryInfo processLibraries(
       DiagnosticReporter reporter,
@@ -235,7 +215,7 @@
     Set<String> fixedStaticNames = new Set<String>();
     Set<String> fixedDynamicNames = new Set<String>();
     Map<Element, LibraryElement> reexportingLibraries =
-          <Element, LibraryElement>{};
+        <Element, LibraryElement>{};
     List<LibraryElement> userLibraries = <LibraryElement>[];
     // Conservatively traverse all platform libraries and collect member names.
     // TODO(antonm): ideally we should only collect names of used members,
@@ -268,8 +248,7 @@
       });
 
       library.forEachExport((Element export) {
-        if (!library.isInternalLibrary &&
-            export.library.isInternalLibrary) {
+        if (!library.isInternalLibrary && export.library.isInternalLibrary) {
           // If an element of an internal library is reexported by a platform
           // library, we have to import the reexporting library instead of the
           // internal library, because the internal library is an
@@ -300,17 +279,15 @@
             enumClassMap.putIfAbsent(cls.name, () => cls);
         if (existingEnumClass != cls) {
           reporter.reportError(
-              reporter.createMessage(
-                  cls,
-                  MessageKind.GENERIC,
-                  {'text': "Duplicate enum names are not supported "
-                           "in dart2dart."}),
-          <DiagnosticMessage>[
-              reporter.createMessage(
-                  existingEnumClass,
-                  MessageKind.GENERIC,
-                  {'text': "This is the other declaration of '${cls.name}'."}),
-          ]);
+              reporter.createMessage(cls, MessageKind.GENERIC, {
+                'text': "Duplicate enum names are not supported "
+                    "in dart2dart."
+              }),
+              <DiagnosticMessage>[
+                reporter.createMessage(existingEnumClass, MessageKind.GENERIC, {
+                  'text': "This is the other declaration of '${cls.name}'."
+                }),
+              ]);
         }
       }
     }
@@ -321,8 +298,7 @@
     // that are invoked as functions. Make sure to not rename that.
     fixedDynamicNames.add('call');
 
-    return new LibraryInfo(
-        fixedStaticNames, fixedDynamicNames,
+    return new LibraryInfo(fixedStaticNames, fixedDynamicNames,
         reexportingLibraries, userLibraries);
   }
 }
@@ -333,10 +309,8 @@
   final Map<ClassElement, Iterable<Element>> classMembers;
   final Iterable<ClassElement> emitNoMembersFor;
 
-  ElementInfo(this.elementAsts,
-              this.topLevelElements,
-              this.classMembers,
-              this.emitNoMembersFor);
+  ElementInfo(this.elementAsts, this.topLevelElements, this.classMembers,
+      this.emitNoMembersFor);
 }
 
 class ElementInfoProcessor implements ElementInfo {
@@ -350,18 +324,16 @@
   final ElementFilter shouldOutput;
 
   ElementInfoProcessor(
-      {this.postProcessElementAst,
-       this.parseElementAst,
-       this.shouldOutput});
+      {this.postProcessElementAst, this.parseElementAst, this.shouldOutput});
 
   static ElementInfo createElementInfo(
       Iterable<ClassElement> instantiatedClasses,
       Iterable<AstElement> resolvedElements,
       Iterable<ClassElement> usedTypeLiterals,
       {ElementPostProcessFunction postProcessElementAst,
-       ComputeElementAstFunction parseElementAst,
-       ElementFilter shouldOutput,
-       ElementSorter sortElements}) {
+      ComputeElementAstFunction parseElementAst,
+      ElementFilter shouldOutput,
+      ElementSorter sortElements}) {
     ElementInfoProcessor processor = new ElementInfoProcessor(
         postProcessElementAst: postProcessElementAst,
         parseElementAst: parseElementAst,
@@ -371,10 +343,11 @@
         sortElements: sortElements);
   }
 
-  ElementInfo process(Iterable<ClassElement> instantiatedClasses,
-                      Iterable<AstElement> resolvedElements,
-                      Iterable<ClassElement> usedTypeLiterals,
-                      {ElementSorter sortElements}) {
+  ElementInfo process(
+      Iterable<ClassElement> instantiatedClasses,
+      Iterable<AstElement> resolvedElements,
+      Iterable<ClassElement> usedTypeLiterals,
+      {ElementSorter sortElements}) {
     // Build all top level elements to emit and necessary class members.
     instantiatedClasses.where(shouldOutput).forEach(addClass);
     resolvedElements.where(shouldOutput).forEach(addMember);
@@ -402,9 +375,8 @@
 
   void processElement(Element element, ElementAst elementAst) {
     if (postProcessElementAst != null) {
-      postProcessElementAst(element, elementAst,
-                            newTypedefElementCallback,
-                            newClassElementCallback);
+      postProcessElementAst(element, elementAst, newTypedefElementCallback,
+          newClassElementCallback);
     }
     elementAsts[element] = elementAst;
   }
@@ -459,7 +431,7 @@
 /// [CompilerOutputProvider].
 class MainOutputGenerator {
   final Map<ClassNode, List<Node>> memberNodes =
-       new Map<ClassNode, List<Node>>();
+      new Map<ClassNode, List<Node>>();
   final List<Node> topLevelNodes = <Node>[];
 
   /// Generates the code and returns the total size.
@@ -473,8 +445,8 @@
       CompilerOutputProvider outputProvider,
       MirrorRenamer mirrorRenamer,
       {bool multiFile: false,
-       bool forceStripTypes: false,
-       bool enableMinification: false}) {
+      bool forceStripTypes: false,
+      bool enableMinification: false}) {
     for (Element element in elementInfo.topLevelElements) {
       topLevelNodes.add(elementInfo.elementAsts[element].ast);
       if (element.isClass) {
@@ -490,8 +462,8 @@
       }
     }
 
-    mirrorRenamer.addRenames(placeholderRenamer.renames,
-                             topLevelNodes, collector);
+    mirrorRenamer.addRenames(
+        placeholderRenamer.renames, topLevelNodes, collector);
 
     Map<LibraryElement, String> outputPaths = new Map<LibraryElement, String>();
     Map<LibraryElement, EmitterUnparser> unparsers =
@@ -501,8 +473,7 @@
     EmitterUnparser mainUnparser = multiFile
         ? null
         : new EmitterUnparser(placeholderRenamer.renames,
-            stripTypes: forceStripTypes,
-            minify: enableMinification);
+            stripTypes: forceStripTypes, minify: enableMinification);
 
     if (multiFile) {
       // TODO(sigurdm): Factor handling of library-paths out from emitting.
@@ -511,7 +482,7 @@
           ? mainName.substring(0, mainName.length - 5)
           : mainName;
       // Map each library to a path based on the uri of the original
-      // library and [compiler.outputUri].
+      // library and [compiler.options.outputUri].
       Set<String> usedLibraryPaths = new Set<String>();
       for (LibraryElement library in libraryInfo.userLibraries) {
         if (library == mainFunction.library) {
@@ -528,7 +499,7 @@
       }
 
       /// Rewrites imports/exports to refer to the paths given in [outputPaths].
-      for(LibraryElement outputLibrary in libraryInfo.userLibraries) {
+      for (LibraryElement outputLibrary in libraryInfo.userLibraries) {
         EmitterUnparser unparser = new EmitterUnparser(
             placeholderRenamer.renames,
             stripTypes: forceStripTypes,
@@ -553,8 +524,8 @@
         }
       }
     } else {
-      placeholderRenamer.platformImports.forEach(
-          (LibraryElement library, String prefix) {
+      placeholderRenamer.platformImports
+          .forEach((LibraryElement library, String prefix) {
         assert(library.isPlatformLibrary && !library.isInternalLibrary);
         mainUnparser.unparseImportTag(library.canonicalUri.toString());
         if (prefix != null) {
@@ -562,7 +533,7 @@
           // it to avoid shadowing.
           // TODO(johnniwinther): Avoid prefix-less import if not needed.
           mainUnparser.unparseImportTag(library.canonicalUri.toString(),
-                                        prefix: prefix);
+              prefix: prefix);
         }
       });
     }
@@ -582,24 +553,24 @@
 
     int totalSize = 0;
     if (multiFile) {
-      for(LibraryElement outputLibrary in libraryInfo.userLibraries) {
+      for (LibraryElement outputLibrary in libraryInfo.userLibraries) {
         // TODO(sigurdm): Make the unparser output directly into the buffer
         // instead of caching in `.result`.
         String code = unparsers[outputLibrary].result;
         totalSize += code.length;
         outputProvider(outputPaths[outputLibrary], "dart")
-             ..add(code)
-             ..close();
+          ..add(code)
+          ..close();
       }
     } else {
       String code = mainUnparser.result;
       outputProvider("", "dart")
-           ..add(code)
-           ..close();
+        ..add(code)
+        ..close();
 
       totalSize = code.length;
     }
 
     return totalSize;
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
index 0a2d0e1..e6656a7 100644
--- a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
+++ b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
@@ -9,8 +9,7 @@
   final Set<Node> nodes;
   LocalPlaceholder(this.identifier) : nodes = new Set<Node>();
   int get hashCode => identifier.hashCode;
-  String toString() =>
-      'local_placeholder[id($identifier), nodes($nodes)]';
+  String toString() => 'local_placeholder[id($identifier), nodes($nodes)]';
 }
 
 class FunctionScope {
@@ -18,7 +17,7 @@
   final Set<LocalPlaceholder> localPlaceholders;
   FunctionScope()
       : parameterIdentifiers = new Set<String>(),
-      localPlaceholders = new Set<LocalPlaceholder>();
+        localPlaceholders = new Set<LocalPlaceholder>();
   void registerParameter(Identifier node) {
     parameterIdentifiers.add(node.source);
   }
@@ -133,18 +132,17 @@
 
   visitStaticSend(Send node) {
     Element element = elements[node];
-    collector.mirrorRenamer.registerStaticSend(
-        collector.currentElement, element, node);
+    collector.mirrorRenamer
+        .registerStaticSend(collector.currentElement, element, node);
 
-    if (Elements.isUnresolved(element)
-        || element.isDeferredLoaderGetter) {
+    if (Elements.isUnresolved(element) || element.isDeferredLoaderGetter) {
       return;
     }
     if (element.isConstructor || element.isFactoryConstructor) {
       // Rename named constructor in redirection position:
       // class C { C.named(); C.redirecting() : this.named(); }
-      if (node.receiver is Identifier
-          && node.receiver.asIdentifier().isThis()) {
+      if (node.receiver is Identifier &&
+          node.receiver.asIdentifier().isThis()) {
         assert(node.selector is Identifier);
         collector.tryMakeConstructorPlaceholder(node, element);
       }
@@ -178,16 +176,16 @@
   final Set<Node> prefixNodesToErase = new Set<Node>();
   final Set<Node> unresolvedNodes = new Set<Node>();
   final Map<Element, Set<Node>> elementNodes = new Map<Element, Set<Node>>();
-  final Map<FunctionElement, FunctionScope> functionScopes
-      = new Map<FunctionElement, FunctionScope>();
+  final Map<FunctionElement, FunctionScope> functionScopes =
+      new Map<FunctionElement, FunctionScope>();
   final Map<LibraryElement, Set<Identifier>> privateNodes =
       new Map<LibraryElement, Set<Identifier>>();
-  final List<DeclarationTypePlaceholder> declarationTypePlaceholders
-      = new List<DeclarationTypePlaceholder>();
-  final Map<String, Set<Identifier>> memberPlaceholders
-      = new Map<String, Set<Identifier>>();
-  final List<ConstructorPlaceholder> constructorPlaceholders
-      = new List<ConstructorPlaceholder>();
+  final List<DeclarationTypePlaceholder> declarationTypePlaceholders =
+      new List<DeclarationTypePlaceholder>();
+  final Map<String, Set<Identifier>> memberPlaceholders =
+      new Map<String, Set<Identifier>>();
+  final List<ConstructorPlaceholder> constructorPlaceholders =
+      new List<ConstructorPlaceholder>();
   Map<String, LocalPlaceholder> currentLocalPlaceholders;
   Element currentElement;
   FunctionElement topmostEnclosingFunction;
@@ -196,9 +194,8 @@
   get currentFunctionScope => functionScopes.putIfAbsent(
       topmostEnclosingFunction, () => new FunctionScope());
 
-  PlaceholderCollector(this.reporter, this.mirrorRenamer,
-                       this.fixedMemberNames, this.elementAsts,
-                       this.mainFunction);
+  PlaceholderCollector(this.reporter, this.mirrorRenamer, this.fixedMemberNames,
+      this.elementAsts, this.mainFunction);
 
   void collectFunctionDeclarationPlaceholders(
       FunctionElement element, FunctionExpression node) {
@@ -212,8 +209,7 @@
         FunctionElement redirectTarget = constructor.immediateRedirectionTarget;
         assert(redirectTarget != null && redirectTarget != element);
         tryMakeConstructorPlaceholder(
-            bodyAsRedirectingFactoryBody.constructorReference,
-            redirectTarget);
+            bodyAsRedirectingFactoryBody.constructorReference, redirectTarget);
       }
     } else if (Elements.isStaticOrTopLevel(element)) {
       // Note: this code should only rename private identifiers for class'
@@ -281,7 +277,8 @@
       }
       return false;
     }
-    if (element.isParameter && !isTypedefParameter(element) &&
+    if (element.isParameter &&
+        !isTypedefParameter(element) &&
         isNamedOptionalParameter()) {
       currentFunctionScope.registerParameter(node);
     } else if (Elements.isLocal(element) && !isTypedefParameter(element)) {
@@ -294,8 +291,9 @@
     if (node is Operator) return;
     String identifier = node.source;
     if (fixedMemberNames.contains(identifier)) return;
-    memberPlaceholders.putIfAbsent(
-        identifier, () => new Set<Identifier>()).add(node);
+    memberPlaceholders
+        .putIfAbsent(identifier, () => new Set<Identifier>())
+        .add(node);
   }
 
   void makeTypePlaceholder(Node node, DartType type) {
@@ -324,8 +322,8 @@
 
   void makeOmitDeclarationTypePlaceholder(TypeAnnotation type) {
     if (type == null) return;
-    declarationTypePlaceholders.add(
-        new DeclarationTypePlaceholder(type, false));
+    declarationTypePlaceholders
+        .add(new DeclarationTypePlaceholder(type, false));
   }
 
   void makeVarDeclarationTypePlaceholder(VariableDefinitions node) {
@@ -335,8 +333,8 @@
     // and/or catch syntax changes.
     if (node.type == null) return;
     bool requiresVar = !node.modifiers.isFinalOrConst;
-    declarationTypePlaceholders.add(
-        new DeclarationTypePlaceholder(node.type, requiresVar));
+    declarationTypePlaceholders
+        .add(new DeclarationTypePlaceholder(node.type, requiresVar));
   }
 
   /// Marks [node] to be erased in the output.
@@ -378,8 +376,9 @@
         !Elements.isStaticOrTopLevel(element) &&
         !Elements.isLocal(element) &&
         Name.isPrivateName(node.source)) {
-      privateNodes.putIfAbsent(
-          currentElement.library, () => new Set<Identifier>()).add(node);
+      privateNodes
+          .putIfAbsent(currentElement.library, () => new Set<Identifier>())
+          .add(node);
     }
   }
 
@@ -429,7 +428,7 @@
         Send receiver = node.receiver;
         // prefix.ClassName.constructorName()
         assert(treeElements[receiver.receiver] != null &&
-               treeElements[receiver.receiver].isPrefix);
+            treeElements[receiver.receiver].isPrefix);
         prefix = receiver.receiver;
         className = receiver.selector;
         constructorName = node.selector;
@@ -468,8 +467,8 @@
 
     if (constructorName != null) {
       Element definingConstructor = findDefiningConstructor(element);
-      constructorPlaceholders.add(new ConstructorPlaceholder(constructorName,
-          definingConstructor));
+      constructorPlaceholders.add(
+          new ConstructorPlaceholder(constructorName, definingConstructor));
       tryMakePrivateIdentifier(constructorName, element);
     }
   }
@@ -480,7 +479,9 @@
 
   visit(Node node) => (node == null) ? null : node.accept(this);
 
-  visitNode(Node node) { node.visitChildren(this); }  // We must go deeper.
+  visitNode(Node node) {
+    node.visitChildren(this);
+  } // We must go deeper.
 
   visitNewExpression(NewExpression node) {
     Send send = node.send;
@@ -544,10 +545,13 @@
       if (Elements.isStaticOrTopLevel(element)) {
         // TODO(smok): Worth investigating why sometimes we get getter/setter
         // here and sometimes abstract field.
-        assert(element.isClass || element is VariableElement ||
-               element.isAccessor || element.isAbstractField ||
-               element.isFunction || element.isTypedef ||
-               element is TypeVariableElement);
+        assert(element.isClass ||
+            element is VariableElement ||
+            element.isAccessor ||
+            element.isAbstractField ||
+            element.isFunction ||
+            element.isTypedef ||
+            element is TypeVariableElement);
         makeElementPlaceholder(send.selector, element);
       } else {
         Identifier identifier = send.selector.asIdentifier();
@@ -600,9 +604,7 @@
       Identifier identifier = definition is Identifier
           ? definition
           : definition is Send
-              ? (send.selector is Identifier
-                  ? send.selector
-                  : null)
+              ? (send.selector is Identifier ? send.selector : null)
               : null;
 
       tryMakePrivateIdentifier(identifier, definitionElement);
@@ -619,8 +621,7 @@
         } else {
           assert(send.selector is FunctionExpression);
           if (definitionElement.isInitializingFormal) {
-            tryMakeMemberPlaceholder(
-                send.selector.asFunctionExpression().name);
+            tryMakeMemberPlaceholder(send.selector.asFunctionExpression().name);
           }
         }
       } else if (definition is Identifier) {
diff --git a/pkg/compiler/lib/src/dart_backend/renamer.dart b/pkg/compiler/lib/src/dart_backend/renamer.dart
index 6465af8..29b26d7 100644
--- a/pkg/compiler/lib/src/dart_backend/renamer.dart
+++ b/pkg/compiler/lib/src/dart_backend/renamer.dart
@@ -4,8 +4,7 @@
 
 part of dart_backend;
 
-Comparator get _compareNodes =>
-    compareBy((n) => n.getBeginToken().charOffset);
+Comparator get _compareNodes => compareBy((n) => n.getBeginToken().charOffset);
 
 abstract class Renamable implements Comparable {
   final int RENAMABLE_TYPE_ELEMENT = 1;
@@ -31,8 +30,7 @@
 class GlobalRenamable extends Renamable {
   final Entity entity;
 
-  GlobalRenamable(this.entity, Set<Node> nodes)
-      : super(nodes);
+  GlobalRenamable(this.entity, Set<Node> nodes) : super(nodes);
 
   int compareInternals(GlobalRenamable other) =>
       compareElements(this.entity, other.entity);
@@ -44,8 +42,7 @@
 
 class MemberRenamable extends Renamable {
   final String identifier;
-  MemberRenamable(this.identifier, Set<Node> nodes)
-      : super(nodes);
+  MemberRenamable(this.identifier, Set<Node> nodes) : super(nodes);
   int compareInternals(MemberRenamable other) =>
       this.identifier.compareTo(other.identifier);
   int get kind => RENAMABLE_TYPE_MEMBER;
@@ -55,11 +52,10 @@
 }
 
 class LocalRenamable extends Renamable {
-  LocalRenamable(Set<Node> nodes)
-      : super(nodes);
-  int compareInternals(LocalRenamable other) =>
-      _compareNodes(sorted(this.nodes, _compareNodes)[0],
-          sorted(other.nodes, _compareNodes)[0]);
+  LocalRenamable(Set<Node> nodes) : super(nodes);
+  int compareInternals(LocalRenamable other) => _compareNodes(
+      sorted(this.nodes, _compareNodes)[0],
+      sorted(other.nodes, _compareNodes)[0]);
   int get kind => RENAMABLE_TYPE_LOCAL;
   String createNewName(PlaceholderRenamer placeholderRenamer) {
     return placeholderRenamer._generateUniqueTopLevelName("");
@@ -72,6 +68,7 @@
 class PlaceholderRenamer {
   /// After running [computeRenames] this will contain the computed renames.
   final Map<Node, String> renames = new Map<Node, String>();
+
   /// After running [computeRenames] this will map the used platform
   /// libraries to their respective prefixes.
   final Map<LibraryElement, String> platformImports =
@@ -94,10 +91,9 @@
 
   Generator _generator;
 
-  PlaceholderRenamer(this.fixedDynamicNames,
-                     this.fixedStaticNames,
-                     this.reexportingLibraries,
-                     {this.enableMinification, this.cutDeclarationTypes});
+  PlaceholderRenamer(
+      this.fixedDynamicNames, this.fixedStaticNames, this.reexportingLibraries,
+      {this.enableMinification, this.cutDeclarationTypes});
 
   void _renameNodes(Iterable<Node> nodes, String renamer(Node node)) {
     for (Node node in sorted(nodes, _compareNodes)) {
@@ -108,7 +104,7 @@
   String _generateUniqueTopLevelName(String originalName) {
     String newName = _generator.generate(originalName, (name) {
       return _forbiddenIdentifiers.contains(name) ||
-             _allNamedParameterIdentifiers.contains(name);
+          _allNamedParameterIdentifiers.contains(name);
     });
     _forbiddenIdentifiers.add(newName);
     return newName;
@@ -121,9 +117,10 @@
   /// Looks up [originalName] in the [_privateCache] cache of [library].
   /// If [originalName] was not renamed before, generate a new name.
   String _getPrivateName(LibraryElement library, String originalName) {
-    return _privateCache.putIfAbsent(library, () => new Map<String, String>())
-        .putIfAbsent(originalName,
-                     () => _generateUniqueTopLevelName(originalName));
+    return _privateCache
+        .putIfAbsent(library, () => new Map<String, String>())
+        .putIfAbsent(
+            originalName, () => _generateUniqueTopLevelName(originalName));
   }
 
   String _renameConstructor(ConstructorPlaceholder placeholder) {
@@ -135,9 +132,9 @@
 
   String _renameGlobal(Entity entity) {
     assert(entity is! Element ||
-           Elements.isMalformed(entity) ||
-           Elements.isStaticOrTopLevel(entity) ||
-           entity is TypeVariableElement);
+        Elements.isMalformed(entity) ||
+        Elements.isStaticOrTopLevel(entity) ||
+        entity is TypeVariableElement);
     // TODO(smok): We may want to reuse class static field and method names.
     if (entity is Element) {
       LibraryElement library = entity.library;
@@ -148,14 +145,14 @@
         // TODO(johnniwinther): Handle prefixes for dart:core.
         if (library.canonicalUri == Uris.dart_core) return entity.name;
         if (library.isInternalLibrary) {
-          throw new SpannableAssertionFailure(entity,
+          throw new SpannableAssertionFailure(
+              entity,
               "Internal library $library should never have been imported from "
               "the code compiled by dart2dart.");
         }
 
         String prefix = platformImports.putIfAbsent(library, () => null);
-        if (entity.isTopLevel &&
-            fixedDynamicNames.contains(entity.name)) {
+        if (entity.isTopLevel && fixedDynamicNames.contains(entity.name)) {
           if (prefix == null) {
             prefix = _generateUniqueTopLevelName('');
             platformImports[library] = prefix;
@@ -165,8 +162,8 @@
         return entity.name;
       }
     }
-    String name = _renamedCache.putIfAbsent(entity,
-            () => _generateUniqueTopLevelName(entity.name));
+    String name = _renamedCache.putIfAbsent(
+        entity, () => _generateUniqueTopLevelName(entity.name));
     // Look up in [_renamedCache] for a name for [entity] .
     // If it was not renamed before, generate a new name.
     return name;
@@ -178,22 +175,23 @@
     // Build a list sorted by usage of local nodes that will be renamed to
     // the same identifier. So the top-used local variables in all functions
     // will be renamed first and will all share the same new identifier.
-    int maxLength = placeholderCollector.functionScopes.values.fold(0,
-        (a, b) => max(a, b.localPlaceholders.length));
+    int maxLength = placeholderCollector.functionScopes.values
+        .fold(0, (a, b) => max(a, b.localPlaceholders.length));
 
-    List<Set<Node>> allLocals = new List<Set<Node>>
-        .generate(maxLength, (_) => new Set<Node>());
+    List<Set<Node>> allLocals =
+        new List<Set<Node>>.generate(maxLength, (_) => new Set<Node>());
 
     for (FunctionScope functionScope
         in placeholderCollector.functionScopes.values) {
       // Add current sorted local identifiers to the whole sorted list
       // of all local identifiers for all functions.
-      List<LocalPlaceholder> currentSortedPlaceholders =
-          sorted(functionScope.localPlaceholders,
-              compareBy((LocalPlaceholder ph) => -ph.nodes.length));
+      List<LocalPlaceholder> currentSortedPlaceholders = sorted(
+          functionScope.localPlaceholders,
+          compareBy((LocalPlaceholder ph) => -ph.nodes.length));
 
       List<Set<Node>> currentSortedNodes = currentSortedPlaceholders
-          .map((LocalPlaceholder ph) => ph.nodes).toList();
+          .map((LocalPlaceholder ph) => ph.nodes)
+          .toList();
 
       for (int i = 0; i < currentSortedNodes.length; i++) {
         allLocals[i].addAll(currentSortedNodes[i]);
@@ -204,12 +202,12 @@
     // count, otherwise when we rename elements first there will be no good
     // identifiers left for members even if they are used often.
     List<Renamable> renamables = new List<Renamable>();
-    placeholderCollector.elementNodes.forEach(
-        (Element element, Set<Node> nodes) {
+    placeholderCollector.elementNodes
+        .forEach((Element element, Set<Node> nodes) {
       renamables.add(new GlobalRenamable(element, nodes));
     });
-    placeholderCollector.memberPlaceholders.forEach(
-        (String memberName, Set<Identifier> identifiers) {
+    placeholderCollector.memberPlaceholders
+        .forEach((String memberName, Set<Identifier> identifiers) {
       renamables.add(new MemberRenamable(memberName, identifiers));
     });
     for (Set<Node> localIdentifiers in allLocals) {
@@ -225,30 +223,28 @@
   void _computeNonMinifiedRenames(PlaceholderCollector placeholderCollector) {
     _generator = new ConservativeGenerator();
     // Rename elements.
-    placeholderCollector.elementNodes.forEach(
-        (Element element, Set<Node> nodes) {
+    placeholderCollector.elementNodes
+        .forEach((Element element, Set<Node> nodes) {
       _renameNodes(nodes, (_) => _renameGlobal(element));
     });
 
     // Rename locals.
-    placeholderCollector.functionScopes.forEach(
-        (functionElement, functionScope) {
-
+    placeholderCollector.functionScopes
+        .forEach((functionElement, functionScope) {
       Set<String> memberIdentifiers = new Set<String>();
       Set<LocalPlaceholder> placeholders = functionScope.localPlaceholders;
       if (functionElement != null && functionElement.enclosingClass != null) {
-        functionElement.enclosingClass.forEachMember(
-            (enclosingClass, member) {
-              memberIdentifiers.add(member.name);
-            });
+        functionElement.enclosingClass.forEachMember((enclosingClass, member) {
+          memberIdentifiers.add(member.name);
+        });
       }
       Set<String> usedLocalIdentifiers = new Set<String>();
       for (LocalPlaceholder placeholder in placeholders) {
         String nextId = _generator.generate(placeholder.identifier, (name) {
-          return functionScope.parameterIdentifiers.contains(name)
-              || _forbiddenIdentifiers.contains(name)
-              || usedLocalIdentifiers.contains(name)
-              || memberIdentifiers.contains(name);
+          return functionScope.parameterIdentifiers.contains(name) ||
+              _forbiddenIdentifiers.contains(name) ||
+              usedLocalIdentifiers.contains(name) ||
+              memberIdentifiers.contains(name);
         });
         usedLocalIdentifiers.add(nextId);
         _renameNodes(placeholder.nodes, (_) => nextId);
@@ -268,8 +264,8 @@
   /// Also adds to [platformImports] all the platform-libraries that are used.
   void computeRenames(PlaceholderCollector placeholderCollector) {
     _allNamedParameterIdentifiers = new Set<String>();
-    for (FunctionScope functionScope in
-        placeholderCollector.functionScopes.values) {
+    for (FunctionScope functionScope
+        in placeholderCollector.functionScopes.values) {
       _allNamedParameterIdentifiers.addAll(functionScope.parameterIdentifiers);
     }
 
@@ -285,15 +281,15 @@
     }
 
     // Rename constructors.
-    for (ConstructorPlaceholder placeholder in
-        placeholderCollector.constructorPlaceholders) {
-      renames[placeholder.node] =
-          _renameConstructor(placeholder);
-    };
+    for (ConstructorPlaceholder placeholder
+        in placeholderCollector.constructorPlaceholders) {
+      renames[placeholder.node] = _renameConstructor(placeholder);
+    }
+    ;
 
     // Rename private identifiers uniquely for each library.
-    placeholderCollector.privateNodes.forEach(
-        (LibraryElement library, Set<Identifier> identifiers) {
+    placeholderCollector.privateNodes
+        .forEach((LibraryElement library, Set<Identifier> identifiers) {
       for (Identifier identifier in identifiers) {
         renames[identifier] = _getPrivateName(library, identifier.source);
       }
@@ -310,8 +306,8 @@
     }
 
     if (cutDeclarationTypes) {
-      for (DeclarationTypePlaceholder placeholder in
-           placeholderCollector.declarationTypePlaceholders) {
+      for (DeclarationTypePlaceholder placeholder
+          in placeholderCollector.declarationTypePlaceholders) {
         renames[placeholder.typeNode] = placeholder.requiresVar ? 'var' : '';
       }
     }
@@ -332,7 +328,7 @@
   if (index < firstCharAlphabet.length) return firstCharAlphabet[index];
   StringBuffer resultBuilder = new StringBuffer();
   resultBuilder.writeCharCode(
-     firstCharAlphabet.codeUnitAt(index % firstCharAlphabet.length));
+      firstCharAlphabet.codeUnitAt(index % firstCharAlphabet.length));
   index ~/= firstCharAlphabet.length;
   int length = otherCharsAlphabet.length;
   while (index >= length) {
@@ -352,7 +348,8 @@
   String generate(String originalName, bool isForbidden(String name)) {
     String result = originalName;
     int index = 0;
-    while (isForbidden(result) ){ //|| result == originalName) {
+    while (isForbidden(result)) {
+      //|| result == originalName) {
       result = '${originalName}_${generateMiniId(index++)}';
     }
     return result;
@@ -372,4 +369,4 @@
     } while (isForbidden(result));
     return result;
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index db02d23..41ce1e5 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -7,20 +7,13 @@
 import 'dart:math' show min;
 
 import 'common.dart';
-import 'common/resolution.dart' show
-    Resolution;
-import 'compiler.dart' show
-    Compiler;
+import 'common/resolution.dart' show Resolution;
 import 'core_types.dart';
-import 'elements/modelx.dart' show
-    LibraryElementX,
-    TypeDeclarationElementX,
-    TypedefElementX;
+import 'elements/modelx.dart'
+    show LibraryElementX, TypeDeclarationElementX, TypedefElementX;
 import 'elements/elements.dart';
-import 'ordered_typeset.dart' show
-    OrderedTypeSet;
-import 'util/util.dart' show
-    equalElements;
+import 'ordered_typeset.dart' show OrderedTypeSet;
+import 'util/util.dart' show equalElements;
 
 enum TypeKind {
   FUNCTION,
@@ -81,7 +74,6 @@
   // TODO(johnniwinther): Maybe move this to [TypedefType].
   void computeUnaliased(Resolution resolution) {}
 
-
   /// Returns the unaliased type of this type.
   ///
   /// The unaliased type of a typedef'd type is the unaliased type to which its
@@ -167,8 +159,8 @@
 
   void visitChildren(DartTypeVisitor visitor, var argument) {}
 
-  static void visitList(List<DartType> types,
-                        DartTypeVisitor visitor, var argument) {
+  static void visitList(
+      List<DartType> types, DartTypeVisitor visitor, var argument) {
     for (DartType type in types) {
       type.accept(visitor, argument);
     }
@@ -236,7 +228,7 @@
   int get hashCode => 17 * element.hashCode;
 
   bool operator ==(other) {
-    if (other is !TypeVariableType) return false;
+    if (other is! TypeVariableType) return false;
     return identical(other.element, element);
   }
 
@@ -308,7 +300,7 @@
   static int nextHash = 43765;
 
   MalformedType(this.element, this.userProvidedBadType,
-                [this.typeArguments = null]);
+      [this.typeArguments = null]);
 
   TypeKind get kind => TypeKind.MALFORMED_TYPE;
 
@@ -350,19 +342,21 @@
   final TypeDeclarationElement element;
   final List<DartType> typeArguments;
 
-  GenericType(TypeDeclarationElement element,
-              this.typeArguments,
-              {bool checkTypeArgumentCount: true})
+  GenericType(TypeDeclarationElement element, this.typeArguments,
+      {bool checkTypeArgumentCount: true})
       : this.element = element {
+    assert(invariant(CURRENT_ELEMENT_SPANNABLE, element != null,
+        message: "Missing element for generic type."));
     assert(invariant(element, () {
-        if (!checkTypeArgumentCount) return true;
-        if (element is TypeDeclarationElementX) {
-          return element.thisTypeCache == null ||
-                 typeArguments.length == element.typeVariables.length;
-        }
-        return true;
-    }, message: () => 'Invalid type argument count on ${element.thisType}. '
-                      'Provided type arguments: $typeArguments.'));
+      if (!checkTypeArgumentCount) return true;
+      if (element is TypeDeclarationElementX) {
+        return element.thisTypeCache == null ||
+            typeArguments.length == element.typeVariables.length;
+      }
+      return true;
+    },
+        message: () => 'Invalid type argument count on ${element.thisType}. '
+            'Provided type arguments: $typeArguments.'));
   }
 
   /// Creates a new instance of this type using the provided type arguments.
@@ -422,10 +416,10 @@
   }
 
   bool operator ==(other) {
-    if (other is !GenericType) return false;
-    return kind == other.kind
-        && element == other.element
-        && equalElements(typeArguments, other.typeArguments);
+    if (other is! GenericType) return false;
+    return kind == other.kind &&
+        element == other.element &&
+        equalElements(typeArguments, other.typeArguments);
   }
 
   /// Returns `true` if the declaration of this type has type variables.
@@ -445,14 +439,15 @@
 }
 
 class InterfaceType extends GenericType {
+  int _hashCode;
+
   InterfaceType(ClassElement element,
-                [List<DartType> typeArguments = const <DartType>[]])
+      [List<DartType> typeArguments = const <DartType>[]])
       : super(element, typeArguments) {
     assert(invariant(element, element.isDeclaration));
   }
 
-  InterfaceType.forUserProvidedBadType(
-      ClassElement element,
+  InterfaceType.forUserProvidedBadType(ClassElement element,
       [List<DartType> typeArguments = const <DartType>[]])
       : super(element, typeArguments, checkTypeArgumentCount: false);
 
@@ -479,9 +474,8 @@
     if (element == other) return this;
     InterfaceType supertype = element.asInstanceOf(other);
     if (supertype != null) {
-      List<DartType> arguments = Types.substTypes(supertype.typeArguments,
-                                                  typeArguments,
-                                                  element.typeVariables);
+      List<DartType> arguments = Types.substTypes(
+          supertype.typeArguments, typeArguments, element.typeVariables);
       return new InterfaceType(supertype.element, arguments);
     }
     return null;
@@ -503,7 +497,7 @@
     return member;
   }
 
-  int get hashCode => super.hashCode;
+  int get hashCode => _hashCode ??= super.hashCode;
 
   InterfaceType asRaw() => super.asRaw();
 
@@ -528,8 +522,7 @@
 class BadInterfaceType extends InterfaceType {
   final InterfaceType userProvidedBadType;
 
-  BadInterfaceType(ClassElement element,
-                   InterfaceType this.userProvidedBadType)
+  BadInterfaceType(ClassElement element, InterfaceType this.userProvidedBadType)
       : super(element, element.rawType.typeArguments);
 
   String toString() {
@@ -537,7 +530,6 @@
   }
 }
 
-
 /**
  * Special subclass of [TypedefType] used for generic typedef types created
  * with the wrong number of type arguments.
@@ -547,8 +539,7 @@
 class BadTypedefType extends TypedefType {
   final TypedefType userProvidedBadType;
 
-  BadTypedefType(TypedefElement element,
-                 TypedefType this.userProvidedBadType)
+  BadTypedefType(TypedefElement element, TypedefType this.userProvidedBadType)
       : super(element, element.rawType.typeArguments);
 
   String toString() {
@@ -573,39 +564,36 @@
    */
   final List<DartType> namedParameterTypes;
 
-  factory FunctionType(
-      FunctionTypedElement element,
+  factory FunctionType(FunctionTypedElement element,
       [DartType returnType = const DynamicType(),
-       List<DartType> parameterTypes = const <DartType>[],
-       List<DartType> optionalParameterTypes = const <DartType>[],
-       List<String> namedParameters = const <String>[],
-       List<DartType> namedParameterTypes = const <DartType>[]]) {
+      List<DartType> parameterTypes = const <DartType>[],
+      List<DartType> optionalParameterTypes = const <DartType>[],
+      List<String> namedParameters = const <String>[],
+      List<DartType> namedParameterTypes = const <DartType>[]]) {
     assert(invariant(CURRENT_ELEMENT_SPANNABLE, element != null));
     assert(invariant(element, element.isDeclaration));
-    return new FunctionType.internal(element,
-        returnType, parameterTypes, optionalParameterTypes,
-        namedParameters, namedParameterTypes);
+    return new FunctionType.internal(element, returnType, parameterTypes,
+        optionalParameterTypes, namedParameters, namedParameterTypes);
   }
 
   factory FunctionType.synthesized(
       [DartType returnType = const DynamicType(),
-       List<DartType> parameterTypes = const <DartType>[],
-       List<DartType> optionalParameterTypes = const <DartType>[],
-       List<String> namedParameters = const <String>[],
-       List<DartType> namedParameterTypes = const <DartType>[]]) {
-    return new FunctionType.internal(null,
-        returnType, parameterTypes, optionalParameterTypes,
-        namedParameters, namedParameterTypes);
+      List<DartType> parameterTypes = const <DartType>[],
+      List<DartType> optionalParameterTypes = const <DartType>[],
+      List<String> namedParameters = const <String>[],
+      List<DartType> namedParameterTypes = const <DartType>[]]) {
+    return new FunctionType.internal(null, returnType, parameterTypes,
+        optionalParameterTypes, namedParameters, namedParameterTypes);
   }
 
   FunctionType.internal(FunctionTypedElement this.element,
-                        [DartType this.returnType = const DynamicType(),
-                         this.parameterTypes = const <DartType>[],
-                         this.optionalParameterTypes = const <DartType>[],
-                         this.namedParameters = const <String>[],
-                         this.namedParameterTypes = const <DartType>[]]) {
-    assert(invariant(CURRENT_ELEMENT_SPANNABLE,
-        element == null || element.isDeclaration));
+      [DartType this.returnType = const DynamicType(),
+      this.parameterTypes = const <DartType>[],
+      this.optionalParameterTypes = const <DartType>[],
+      this.namedParameters = const <String>[],
+      this.namedParameterTypes = const <DartType>[]]) {
+    assert(invariant(
+        CURRENT_ELEMENT_SPANNABLE, element == null || element.isDeclaration));
     // Assert that optional and named parameters are not used at the same time.
     assert(optionalParameterTypes.isEmpty || namedParameterTypes.isEmpty);
     assert(namedParameters.length == namedParameterTypes.length);
@@ -638,18 +626,19 @@
         Types.substTypes(namedParameterTypes, arguments, parameters);
     if (!changed &&
         (!identical(parameterTypes, newParameterTypes) ||
-         !identical(optionalParameterTypes, newOptionalParameterTypes) ||
-         !identical(namedParameterTypes, newNamedParameterTypes))) {
+            !identical(optionalParameterTypes, newOptionalParameterTypes) ||
+            !identical(namedParameterTypes, newNamedParameterTypes))) {
       changed = true;
     }
     if (changed) {
       // Create a new type only if necessary.
-      return new FunctionType.internal(element,
-                                       newReturnType,
-                                       newParameterTypes,
-                                       newOptionalParameterTypes,
-                                       namedParameters,
-                                       newNamedParameterTypes);
+      return new FunctionType.internal(
+          element,
+          newReturnType,
+          newParameterTypes,
+          newOptionalParameterTypes,
+          namedParameters,
+          newNamedParameterTypes);
     }
     return this;
   }
@@ -685,10 +674,10 @@
   }
 
   void visitChildren(DartTypeVisitor visitor, var argument) {
-   returnType.accept(visitor, argument);
-   DartType.visitList(parameterTypes, visitor, argument);
-   DartType.visitList(optionalParameterTypes, visitor, argument);
-   DartType.visitList(namedParameterTypes, visitor, argument);
+    returnType.accept(visitor, argument);
+    DartType.visitList(parameterTypes, visitor, argument);
+    DartType.visitList(optionalParameterTypes, visitor, argument);
+    DartType.visitList(namedParameterTypes, visitor, argument);
   }
 
   String toString() {
@@ -717,7 +706,7 @@
         }
         sb.write(namedParameterTypes[i]);
         sb.write(' ');
-          sb.write(namedParameters[i]);
+        sb.write(namedParameters[i]);
         first = false;
       }
       sb.write('}');
@@ -732,23 +721,23 @@
 
   int get hashCode {
     int hash = 3 * returnType.hashCode;
-    for (DartType parameter  in parameterTypes) {
+    for (DartType parameter in parameterTypes) {
       hash = 17 * hash + 5 * parameter.hashCode;
     }
-    for (DartType parameter  in optionalParameterTypes) {
+    for (DartType parameter in optionalParameterTypes) {
       hash = 19 * hash + 7 * parameter.hashCode;
     }
-    for (String name  in namedParameters) {
+    for (String name in namedParameters) {
       hash = 23 * hash + 11 * name.hashCode;
     }
-    for (DartType parameter  in namedParameterTypes) {
+    for (DartType parameter in namedParameterTypes) {
       hash = 29 * hash + 13 * parameter.hashCode;
     }
     return hash;
   }
 
   bool operator ==(other) {
-    if (other is !FunctionType) return false;
+    if (other is! FunctionType) return false;
     return returnType == other.returnType &&
         equalElements(parameterTypes, other.parameterTypes) &&
         equalElements(optionalParameterTypes, other.optionalParameterTypes) &&
@@ -761,12 +750,11 @@
   DartType _unaliased;
 
   TypedefType(TypedefElement element,
-              [List<DartType> typeArguments = const <DartType>[]])
+      [List<DartType> typeArguments = const <DartType>[]])
       : super(element, typeArguments);
 
   TypedefType.forUserProvidedBadType(TypedefElement element,
-                                     [List<DartType> typeArguments =
-                                         const <DartType>[]])
+      [List<DartType> typeArguments = const <DartType>[]])
       : super(element, typeArguments, checkTypeArgumentCount: false);
 
   TypedefElement get element => super.element;
@@ -825,6 +813,8 @@
     return visitor.visitDynamicType(this, argument);
   }
 
+  int get hashCode => 91;
+
   String toString() => name;
 }
 
@@ -896,8 +886,7 @@
   R visitType(DartType type, A argument);
 
   @override
-  R visitVoidType(VoidType type, A argument) =>
-      visitType(type, argument);
+  R visitVoidType(VoidType type, A argument) => visitType(type, argument);
 
   @override
   R visitTypeVariableType(TypeVariableType type, A argument) =>
@@ -915,8 +904,7 @@
   R visitStatementType(StatementType type, A argument) =>
       visitType(type, argument);
 
-  R visitGenericType(GenericType type, A argument) =>
-      visitType(type, argument);
+  R visitGenericType(GenericType type, A argument) => visitType(type, argument);
 
   @override
   R visitInterfaceType(InterfaceType type, A argument) =>
@@ -927,8 +915,7 @@
       visitGenericType(type, argument);
 
   @override
-  R visitDynamicType(DynamicType type, A argument) =>
-      visitType(type, argument);
+  R visitDynamicType(DynamicType type, A argument) => visitType(type, argument);
 }
 
 /**
@@ -964,7 +951,6 @@
   bool visitMalformedType(MalformedType t, DartType s) => true;
 
   bool visitInterfaceType(InterfaceType t, DartType s) {
-
     // TODO(johnniwinther): Currently needed since literal types like int,
     // double, bool etc. might not have been resolved yet.
     t.element.ensureResolved(resolution);
@@ -993,7 +979,7 @@
     if (s == coreTypes.functionType) {
       return true;
     }
-    if (s is !FunctionType) return false;
+    if (s is! FunctionType) return false;
     FunctionType tf = t;
     FunctionType sf = s;
     if (invalidFunctionReturnTypes(tf.returnType, sf.returnType)) {
@@ -1032,7 +1018,7 @@
       return false;
     }
     if (!sf.namedParameters.isEmpty) {
-        // We must have [: len(t.p) == len(s.p) :].
+      // We must have [: len(t.p) == len(s.p) :].
       if (sNotEmpty) {
         return false;
       }
@@ -1162,7 +1148,6 @@
  * Type visitor that determines the subtype relation two types.
  */
 class SubtypeVisitor extends MoreSpecificVisitor {
-
   SubtypeVisitor(Resolution resolution) : super(resolution);
 
   bool isSubtype(DartType t, DartType s) {
@@ -1207,10 +1192,8 @@
  * substitute for the bound of [typeVariable]. [bound] holds the bound against
  * which [typeArgument] should be checked.
  */
-typedef void CheckTypeVariableBound(GenericType type,
-                                    DartType typeArgument,
-                                    TypeVariableType typeVariable,
-                                    DartType bound);
+typedef void CheckTypeVariableBound(GenericType type, DartType typeArgument,
+    TypeVariableType typeVariable, DartType bound);
 
 /// Basic interface for the Dart type system.
 abstract class DartTypes {
@@ -1323,8 +1306,8 @@
    * declared on [element]. Calls [checkTypeVariableBound] on each type
    * argument and bound.
    */
-  void checkTypeVariableBounds(GenericType type,
-                               CheckTypeVariableBound checkTypeVariableBound) {
+  void checkTypeVariableBounds(
+      GenericType type, CheckTypeVariableBound checkTypeVariableBound) {
     TypeDeclarationElement element = type.element;
     List<DartType> typeArguments = type.typeArguments;
     List<DartType> typeVariables = element.typeVariables;
@@ -1344,8 +1327,7 @@
    * instead of a newly created list.
    */
   static List<DartType> substTypes(List<DartType> types,
-                                   List<DartType> arguments,
-                                   List<DartType> parameters) {
+      List<DartType> arguments, List<DartType> parameters) {
     bool changed = false;
     List<DartType> result = new List<DartType>.generate(types.length, (index) {
       DartType type = types[index];
@@ -1405,9 +1387,7 @@
       return 1;
     }
     bool isDefinedByDeclaration(DartType type) {
-      return type.isInterfaceType ||
-             type.isTypedef ||
-             type.isTypeVariable;
+      return type.isInterfaceType || type.isTypedef || type.isTypeVariable;
     }
 
     if (isDefinedByDeclaration(a)) {
@@ -1424,7 +1404,7 @@
             return -1;
           } else {
             return compareList((a as GenericType).typeArguments,
-                               (b as GenericType).typeArguments);
+                (b as GenericType).typeArguments);
           }
         }
       } else {
@@ -1445,8 +1425,8 @@
         if (result != 0) return result;
         result = compareList(aFunc.parameterTypes, bFunc.parameterTypes);
         if (result != 0) return result;
-        result = compareList(aFunc.optionalParameterTypes,
-                             bFunc.optionalParameterTypes);
+        result = compareList(
+            aFunc.optionalParameterTypes, bFunc.optionalParameterTypes);
         if (result != 0) return result;
         // TODO(karlklose): reuse [compareList].
         Iterator<String> aNames = aFunc.namedParameters.iterator;
@@ -1462,8 +1442,8 @@
           // [bNames] is longer that [aNames] => a < b.
           return -1;
         }
-        return compareList(aFunc.namedParameterTypes,
-                           bFunc.namedParameterTypes);
+        return compareList(
+            aFunc.namedParameterTypes, bFunc.namedParameterTypes);
       } else {
         // [b] is a malformed or statement type => a < b.
         return -1;
@@ -1483,8 +1463,8 @@
       // [a] is a malformed type => a < b.
       return -1;
     }
-    assert (a.isMalformed);
-    assert (b.isMalformed);
+    assert(a.isMalformed);
+    assert(b.isMalformed);
     // TODO(johnniwinther): Can we do this better?
     return Elements.compareByPosition(a.element, b.element);
   }
@@ -1507,9 +1487,8 @@
   }
 
   /// Computes the least upper bound of two interface types [a] and [b].
-  InterfaceType computeLeastUpperBoundInterfaces(InterfaceType a,
-                                                 InterfaceType b) {
-
+  InterfaceType computeLeastUpperBoundInterfaces(
+      InterfaceType a, InterfaceType b) {
     /// Returns the set of supertypes of [type] at depth [depth].
     Set<DartType> getSupertypesAtDepth(InterfaceType type, int depth) {
       OrderedTypeSet types = type.element.allSupertypesAndSelf;
@@ -1539,8 +1518,8 @@
 
   /// Computes the least upper bound of the types in the longest prefix of [a]
   /// and [b].
-  List<DartType> computeLeastUpperBoundsTypes(List<DartType> a,
-                                              List<DartType> b) {
+  List<DartType> computeLeastUpperBoundsTypes(
+      List<DartType> a, List<DartType> b) {
     if (a.isEmpty || b.isEmpty) return const <DartType>[];
     int prefixLength = min(a.length, b.length);
     List<DartType> types = new List<DartType>(prefixLength);
@@ -1561,17 +1540,15 @@
   /// bound of the longest common prefix of the optional parameters of [a] and
   /// [b], and the named parameters are the least upper bound of those common to
   /// [a] and [b].
-  DartType computeLeastUpperBoundFunctionTypes(FunctionType a,
-                                               FunctionType b) {
+  DartType computeLeastUpperBoundFunctionTypes(FunctionType a, FunctionType b) {
     if (a.parameterTypes.length != b.parameterTypes.length) {
       return coreTypes.functionType;
     }
     DartType returnType = computeLeastUpperBound(a.returnType, b.returnType);
     List<DartType> parameterTypes =
         computeLeastUpperBoundsTypes(a.parameterTypes, b.parameterTypes);
-    List<DartType> optionalParameterTypes =
-        computeLeastUpperBoundsTypes(a.optionalParameterTypes,
-                                     b.optionalParameterTypes);
+    List<DartType> optionalParameterTypes = computeLeastUpperBoundsTypes(
+        a.optionalParameterTypes, b.optionalParameterTypes);
     List<String> namedParameters = <String>[];
     List<String> aNamedParameters = a.namedParameters;
     List<String> bNamedParameters = b.namedParameters;
@@ -1580,8 +1557,8 @@
     List<DartType> bNamedParameterTypes = b.namedParameterTypes;
     int aIndex = 0;
     int bIndex = 0;
-    while (aIndex < aNamedParameters.length &&
-           bIndex < bNamedParameters.length) {
+    while (
+        aIndex < aNamedParameters.length && bIndex < bNamedParameters.length) {
       String aNamedParameter = aNamedParameters[aIndex];
       String bNamedParameter = bNamedParameters[bIndex];
       int result = aNamedParameter.compareTo(bNamedParameter);
@@ -1597,18 +1574,15 @@
         bIndex++;
       }
     }
-    return new FunctionType.synthesized(
-        returnType,
-        parameterTypes, optionalParameterTypes,
-        namedParameters, namedParameterTypes);
+    return new FunctionType.synthesized(returnType, parameterTypes,
+        optionalParameterTypes, namedParameters, namedParameterTypes);
   }
 
   /// Computes the least upper bound of two types of which at least one is a
   /// type variable. The least upper bound of a type variable is defined in
   /// terms of its bound, but to ensure reflexivity we need to check for common
   /// bounds transitively.
-  DartType computeLeastUpperBoundTypeVariableTypes(DartType a,
-                                                   DartType b) {
+  DartType computeLeastUpperBoundTypeVariableTypes(DartType a, DartType b) {
     Set<DartType> typeVariableBounds = new Set<DartType>();
     while (a.isTypeVariable) {
       if (a == b) return a;
@@ -1684,9 +1658,7 @@
   ///     unaliasedBound(U) = unaliasedBound(Baz) = ()->dynamic
   ///     unaliasedBound(X) = unaliasedBound(Y) = `Object`
   ///
-  static DartType computeUnaliasedBound(
-      Resolution resolution,
-      DartType type) {
+  static DartType computeUnaliasedBound(Resolution resolution, DartType type) {
     DartType originalType = type;
     while (type.isTypeVariable) {
       TypeVariableType variable = type;
@@ -1730,8 +1702,7 @@
   /// used to lookup the existence and type of `foo`.
   ///
   static InterfaceType computeInterfaceType(
-      Resolution resolution,
-      DartType type) {
+      Resolution resolution, DartType type) {
     type = computeUnaliasedBound(resolution, type);
     if (type.treatAsDynamic) {
       return null;
@@ -1779,8 +1750,8 @@
   ///
   /// Note that this computation is a heuristic. It does not find a suggestion
   /// in all possible cases.
-  InterfaceType computeMoreSpecific(ClassElement element,
-                                    InterfaceType supertype) {
+  InterfaceType computeMoreSpecific(
+      ClassElement element, InterfaceType supertype) {
     InterfaceType supertypeInstance =
         element.thisType.asInstanceOf(supertype.element);
     if (supertypeInstance == null) return null;
@@ -1811,16 +1782,14 @@
   }
 
   bool visitTypeVariableType(TypeVariableType type, DartType argument) {
-    DartType constraint =
-        types.getMostSpecific(constraintMap[type], argument);
+    DartType constraint = types.getMostSpecific(constraintMap[type], argument);
     constraintMap[type] = constraint;
     return constraint != null;
   }
 
   bool visitFunctionType(FunctionType type, DartType argument) {
     if (argument is FunctionType) {
-      if (type.parameterTypes.length !=
-          argument.parameterTypes.length) {
+      if (type.parameterTypes.length != argument.parameterTypes.length) {
         return false;
       }
       if (type.optionalParameterTypes.length !=
@@ -1835,8 +1804,8 @@
       if (visitTypes(type.parameterTypes, argument.parameterTypes)) {
         return false;
       }
-      if (visitTypes(type.optionalParameterTypes,
-                     argument.optionalParameterTypes)) {
+      if (visitTypes(
+          type.optionalParameterTypes, argument.optionalParameterTypes)) {
         return false;
       }
       return visitTypes(type.namedParameterTypes, argument.namedParameterTypes);
@@ -1960,4 +1929,3 @@
     sb.write(')');
   }
 }
-
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index c24ecbf..0d377aa 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -5,63 +5,52 @@
 library deferred_load;
 
 import 'common.dart';
-import 'common/backend_api.dart' show
-    Backend;
-import 'common/tasks.dart' show
-    CompilerTask;
-import 'compiler.dart' show
-    Compiler;
-import 'constants/values.dart' show
-    ConstantValue,
-    ConstructedConstantValue,
-    DeferredConstantValue,
-    StringConstantValue;
+import 'common/backend_api.dart' show Backend;
+import 'common/tasks.dart' show CompilerTask;
+import 'compiler.dart' show Compiler;
+import 'constants/values.dart'
+    show
+        ConstantValue,
+        ConstructedConstantValue,
+        DeferredConstantValue,
+        StringConstantValue;
 import 'dart_types.dart';
-import 'elements/elements.dart' show
-    AccessorElement,
-    AstElement,
-    ClassElement,
-    Element,
-    ElementKind,
-    Elements,
-    ExportElement,
-    FunctionElement,
-    ImportElement,
-    LibraryElement,
-    LocalFunctionElement,
-    MetadataAnnotation,
-    PrefixElement,
-    ScopeContainerElement,
-    TypedefElement;
-import 'js_backend/js_backend.dart' show
-    JavaScriptBackend;
-import 'resolution/resolution.dart' show
-    AnalyzableElementX;
-import 'resolution/tree_elements.dart' show
-    TreeElements;
+import 'elements/elements.dart'
+    show
+        AccessorElement,
+        AstElement,
+        ClassElement,
+        Element,
+        ElementKind,
+        Elements,
+        ExportElement,
+        FunctionElement,
+        ImportElement,
+        LibraryElement,
+        LocalFunctionElement,
+        MetadataAnnotation,
+        PrefixElement,
+        ScopeContainerElement,
+        TypedefElement;
+import 'js_backend/js_backend.dart' show JavaScriptBackend;
+import 'resolution/resolution.dart' show AnalyzableElementX;
+import 'resolution/tree_elements.dart' show TreeElements;
 import 'tree/tree.dart' as ast;
-import 'tree/tree.dart' show
-    Import,
-    LibraryTag,
-    LibraryDependency,
-    LiteralDartString,
-    LiteralString,
-    NewExpression,
-    Node;
-import 'universe/use.dart' show
-    DynamicUse,
-    StaticUse,
-    TypeUse,
-    TypeUseKind;
-import 'universe/world_impact.dart' show
-    ImpactUseCase,
-    WorldImpact,
-    WorldImpactVisitorImpl;
-import 'util/setlet.dart' show
-    Setlet;
+import 'tree/tree.dart'
+    show
+        Import,
+        LibraryTag,
+        LibraryDependency,
+        LiteralDartString,
+        LiteralString,
+        NewExpression,
+        Node;
+import 'universe/use.dart' show DynamicUse, StaticUse, TypeUse, TypeUseKind;
+import 'universe/world_impact.dart'
+    show ImpactUseCase, WorldImpact, WorldImpactVisitorImpl;
+import 'util/setlet.dart' show Setlet;
 import 'util/uri_extras.dart' as uri_extras;
-import 'util/util.dart' show
-    Link, makeUnique;
+import 'util/util.dart' show Link, makeUnique;
 
 /// A "hunk" of the program that will be loaded whenever one of its [imports]
 /// are loaded.
@@ -88,7 +77,7 @@
 
   String toString() => "OutputUnit($name)";
 
-  bool operator==(OutputUnit other) {
+  bool operator ==(OutputUnit other) {
     return imports.length == other.imports.length &&
         imports.containsAll(other.imports);
   }
@@ -96,7 +85,7 @@
   int get hashCode {
     int sum = 0;
     for (_DeferredImport import in imports) {
-      sum = (sum + import.hashCode) & 0x3FFFFFFF;  // Stay in 30 bit range.
+      sum = (sum + import.hashCode) & 0x3FFFFFFF; // Stay in 30 bit range.
     }
     return sum;
   }
@@ -229,8 +218,8 @@
     return outputUnitTo.imports.containsAll(outputUnitFrom.imports);
   }
 
-  void registerConstantDeferredUse(DeferredConstantValue constant,
-                                   PrefixElement prefix) {
+  void registerConstantDeferredUse(
+      DeferredConstantValue constant, PrefixElement prefix) {
     OutputUnit outputUnit = new OutputUnit();
     outputUnit.imports.add(new _DeclaredDeferredImport(prefix.deferredImport));
     _constantToOutputUnit[constant] = outputUnit;
@@ -265,12 +254,8 @@
   /// (not the transitive closure.)
   ///
   /// Adds the results to [elements] and [constants].
-  void _collectAllElementsAndConstantsResolvedFrom(
-      Element element,
-      Set<Element> elements,
-      Set<ConstantValue> constants,
-      isMirrorUsage) {
-
+  void _collectAllElementsAndConstantsResolvedFrom(Element element,
+      Set<Element> elements, Set<ConstantValue> constants, isMirrorUsage) {
     if (element.isMalformed) {
       // Malformed elements are ignored.
       return;
@@ -327,32 +312,30 @@
         compiler.impactStrategy.visitImpact(
             analyzableElement,
             worldImpact,
-            new WorldImpactVisitorImpl(
-                visitStaticUse: (StaticUse staticUse) {
-                  elements.add(staticUse.element);
-                },
-                visitTypeUse: (TypeUse typeUse) {
-                  DartType type = typeUse.type;
-                  switch (typeUse.kind) {
-                    case TypeUseKind.TYPE_LITERAL:
-                      if (type.isTypedef || type.isInterfaceType) {
-                        elements.add(type.element);
-                      }
-                      break;
-                    case TypeUseKind.INSTANTIATION:
-                    case TypeUseKind.IS_CHECK:
-                    case TypeUseKind.AS_CAST:
-                    case TypeUseKind.CATCH_TYPE:
-                      collectTypeDependencies(type);
-                      break;
-                    case TypeUseKind.CHECKED_MODE_CHECK:
-                      if (compiler.enableTypeAssertions) {
-                        collectTypeDependencies(type);
-                      }
-                      break;
+            new WorldImpactVisitorImpl(visitStaticUse: (StaticUse staticUse) {
+              elements.add(staticUse.element);
+            }, visitTypeUse: (TypeUse typeUse) {
+              DartType type = typeUse.type;
+              switch (typeUse.kind) {
+                case TypeUseKind.TYPE_LITERAL:
+                  if (type.isTypedef || type.isInterfaceType) {
+                    elements.add(type.element);
                   }
-                }),
-             IMPACT_USE);
+                  break;
+                case TypeUseKind.INSTANTIATION:
+                case TypeUseKind.IS_CHECK:
+                case TypeUseKind.AS_CAST:
+                case TypeUseKind.CATCH_TYPE:
+                  collectTypeDependencies(type);
+                  break;
+                case TypeUseKind.CHECKED_MODE_CHECK:
+                  if (compiler.options.enableTypeAssertions) {
+                    collectTypeDependencies(type);
+                  }
+                  break;
+              }
+            }),
+            IMPACT_USE);
 
         TreeElements treeElements = analyzableElement.resolvedAst.elements;
         assert(treeElements != null);
@@ -403,8 +386,7 @@
         elements.add(type.element.implementation);
       }
       elements.add(cls.implementation);
-    } else if (Elements.isStaticOrTopLevel(element) ||
-               element.isConstructor) {
+    } else if (Elements.isStaticOrTopLevel(element) || element.isConstructor) {
       elements.add(element);
       collectDependencies(element);
     }
@@ -412,8 +394,7 @@
       // When instantiating a class, we record a reference to the
       // constructor, not the class itself.  We must add all the
       // instance members of the constructor's class.
-      ClassElement implementation =
-          element.enclosingClass.implementation;
+      ClassElement implementation = element.enclosingClass.implementation;
       _collectAllElementsAndConstantsResolvedFrom(
           implementation, elements, constants, isMirrorUsage);
     }
@@ -457,10 +438,10 @@
   }
 
   /// Add all dependencies of [constant] to the mapping of [import].
-  void _mapConstantDependencies(ConstantValue constant,
-                                _DeferredImport import) {
-    Set<ConstantValue> constants = _constantsDeferredBy.putIfAbsent(import,
-        () => new Set<ConstantValue>());
+  void _mapConstantDependencies(
+      ConstantValue constant, _DeferredImport import) {
+    Set<ConstantValue> constants = _constantsDeferredBy.putIfAbsent(
+        import, () => new Set<ConstantValue>());
     if (constants.contains(constant)) return;
     constants.add(constant);
     if (constant is ConstructedConstantValue) {
@@ -475,13 +456,10 @@
   /// or [constant], mapping deferred imports to each dependency it needs in the
   /// sets [_importedDeferredBy] and [_constantsDeferredBy].
   /// Only one of [element] and [constant] should be given.
-  void _mapDependencies({Element element,
-                         _DeferredImport import,
-                         isMirrorUsage: false}) {
-
-    Set<Element> elements = _importedDeferredBy.putIfAbsent(import,
-        () => new Set<Element>());
-
+  void _mapDependencies(
+      {Element element, _DeferredImport import, isMirrorUsage: false}) {
+    Set<Element> elements =
+        _importedDeferredBy.putIfAbsent(import, () => new Set<Element>());
 
     Set<Element> dependentElements = new Set<Element>();
     Set<ConstantValue> dependentConstants = new Set<ConstantValue>();
@@ -497,7 +475,6 @@
       if (import != _fakeMainImport && _mainElements.contains(element)) return;
       elements.add(element);
 
-
       // This call can modify [dependentElements] and [dependentConstants].
       _collectAllElementsAndConstantsResolvedFrom(
           element, dependentElements, dependentConstants, isMirrorUsage);
@@ -508,7 +485,8 @@
     for (Element dependency in dependentElements) {
       if (_isExplicitlyDeferred(dependency, library)) {
         for (ImportElement deferredImport in _getImports(dependency, library)) {
-          _mapDependencies(element: dependency,
+          _mapDependencies(
+              element: dependency,
               import: new _DeclaredDeferredImport(deferredImport));
         }
       } else {
@@ -530,8 +508,8 @@
   ///
   /// The elements are added with [_mapDependencies].
   void _addMirrorElements() {
-    void mapDependenciesIfResolved(Element element,
-                                   _DeferredImport deferredImport) {
+    void mapDependenciesIfResolved(
+        Element element, _DeferredImport deferredImport) {
       // If an element is the target of a MirrorsUsed annotation but never used
       // It will not be resolved, and we should not call isNeededForReflection.
       // TODO(sigurdm): Unresolved elements should just answer false when
@@ -568,8 +546,8 @@
 
     for (_DeferredImport deferredImport in _allDeferredImports.keys) {
       LibraryElement deferredLibrary = _allDeferredImports[deferredImport];
-      for (LibraryElement library in
-          _nonDeferredReachableLibraries(deferredLibrary)) {
+      for (LibraryElement library
+          in _nonDeferredReachableLibraries(deferredLibrary)) {
         handleLibrary(library, deferredImport);
       }
     }
@@ -642,7 +620,6 @@
     _importedDeferredBy[_fakeMainImport] = _mainElements;
 
     measureElement(mainLibrary, () {
-
       // Starting from main, traverse the program and find all dependencies.
       _mapDependencies(element: compiler.mainFunction, import: _fakeMainImport);
 
@@ -676,7 +653,8 @@
           } else {
             elementToOutputUnitBuilder
                 .putIfAbsent(element, () => new OutputUnit())
-                .imports.add(import);
+                .imports
+                .add(import);
           }
         }
       }
@@ -689,7 +667,8 @@
           } else {
             constantToOutputUnitBuilder
                 .putIfAbsent(constant, () => new OutputUnit())
-                .imports.add(import);
+                .imports
+                .add(import);
           }
         }
       }
@@ -700,8 +679,8 @@
 
       // Find all the output units elements/constants have been mapped to, and
       // canonicalize them.
-      elementToOutputUnitBuilder.forEach(
-          (Element element, OutputUnit outputUnit) {
+      elementToOutputUnitBuilder
+          .forEach((Element element, OutputUnit outputUnit) {
         OutputUnit representative = allOutputUnits.lookup(outputUnit);
         if (representative == null) {
           representative = outputUnit;
@@ -709,8 +688,8 @@
         }
         _elementToOutputUnit[element] = representative;
       });
-      constantToOutputUnitBuilder.forEach(
-          (ConstantValue constant, OutputUnit outputUnit) {
+      constantToOutputUnitBuilder
+          .forEach((ConstantValue constant, OutputUnit outputUnit) {
         OutputUnit representative = allOutputUnits.lookup(outputUnit);
         if (representative == null) {
           representative = outputUnit;
@@ -768,15 +747,13 @@
                   compiler.constants.getConstantValue(metadata.constant);
               Element element = value.getType(compiler.coreTypes).element;
               if (element == deferredLibraryClass) {
-                 reporter.reportErrorMessage(
-                     import, MessageKind.DEFERRED_OLD_SYNTAX);
+                reporter.reportErrorMessage(
+                    import, MessageKind.DEFERRED_OLD_SYNTAX);
               }
             }
           }
 
-          String prefix = (import.prefix != null)
-              ? import.prefix.name
-              : null;
+          String prefix = (import.prefix != null) ? import.prefix.name : null;
           // The last import we saw with the same prefix.
           ImportElement previousDeferredImport = prefixDeferredImport[prefix];
           if (import.isDeferred) {
@@ -786,8 +763,7 @@
 
             if (prefix == null) {
               reporter.reportErrorMessage(
-                  import,
-                  MessageKind.DEFERRED_LIBRARY_WITHOUT_PREFIX);
+                  import, MessageKind.DEFERRED_LIBRARY_WITHOUT_PREFIX);
             } else {
               prefixDeferredImport[prefix] = import;
               _deferredImportDescriptions[key] =
@@ -802,8 +778,7 @@
               ImportElement failingImport = (previousDeferredImport != null)
                   ? previousDeferredImport
                   : import;
-              reporter.reportErrorMessage(
-                  failingImport.prefix,
+              reporter.reportErrorMessage(failingImport.prefix,
                   MessageKind.DEFERRED_LIBRARY_DUPLICATE_PREFIX);
             }
             usedPrefixes.add(prefix);
@@ -813,7 +788,7 @@
     }
     if (isProgramSplit) {
       isProgramSplit = compiler.backend.enableDeferredLoadingIfSupported(
-            lastDeferred, compiler.globalDependencies);
+          lastDeferred, compiler.globalDependencies);
     }
   }
 
@@ -893,15 +868,17 @@
     _deferredImportDescriptions.keys.forEach((_DeferredImport import) {
       List<OutputUnit> outputUnits = hunksToLoad[importDeferName[import]];
       ImportDescription description = _deferredImportDescriptions[import];
-      Map<String, dynamic> libraryMap =
-          mapping.putIfAbsent(description.importingUri,
-              () => <String, dynamic>{"name": description.importingLibraryName,
-                                      "imports": <String, List<String>>{}});
+      Map<String, dynamic> libraryMap = mapping.putIfAbsent(
+          description.importingUri,
+          () => <String, dynamic>{
+                "name": description.importingLibraryName,
+                "imports": <String, List<String>>{}
+              });
 
-      libraryMap["imports"][importDeferName[import]] = outputUnits.map(
-            (OutputUnit outputUnit) {
-          return backend.deferredPartFileName(outputUnit.name);
-        }).toList();
+      libraryMap["imports"][importDeferName[import]] =
+          outputUnits.map((OutputUnit outputUnit) {
+        return backend.deferredPartFileName(outputUnit.name);
+      }).toList();
     });
     return mapping;
   }
@@ -909,13 +886,13 @@
   /// Creates a textual representation of the output unit content.
   String dump() {
     Map<OutputUnit, List<String>> elementMap = <OutputUnit, List<String>>{};
-    Map<OutputUnit, List<String>> constantMap =
-        <OutputUnit, List<String>>{};
+    Map<OutputUnit, List<String>> constantMap = <OutputUnit, List<String>>{};
     _elementToOutputUnit.forEach((Element element, OutputUnit output) {
       elementMap.putIfAbsent(output, () => <String>[]).add('$element');
     });
     _constantToOutputUnit.forEach((ConstantValue value, OutputUnit output) {
-      constantMap.putIfAbsent(output, () => <String>[])
+      constantMap
+          .putIfAbsent(output, () => <String>[])
           .add(value.toStructuredString());
     });
 
@@ -939,28 +916,27 @@
     }
     return sb.toString();
   }
-
 }
 
 class ImportDescription {
   /// Relative uri to the importing library.
   final String importingUri;
+
   /// The prefix this import is imported as.
   final String prefix;
   final LibraryElement _importingLibrary;
 
-  ImportDescription(ImportElement import,
-                    LibraryElement importingLibrary,
-                    Compiler compiler)
-      : importingUri = uri_extras.relativize(
-          compiler.mainApp.canonicalUri,
-          importingLibrary.canonicalUri, false),
+  ImportDescription(
+      ImportElement import, LibraryElement importingLibrary, Compiler compiler)
+      : importingUri = uri_extras.relativize(compiler.mainApp.canonicalUri,
+            importingLibrary.canonicalUri, false),
         prefix = import.prefix.name,
         _importingLibrary = importingLibrary;
 
   String get importingLibraryName {
     return _importingLibrary.hasLibraryName
-        ? _importingLibrary.libraryName : "<unnamed>";
+        ? _importingLibrary.libraryName
+        : "<unnamed>";
   }
 }
 
diff --git a/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
index 8d5baac..3cb959f 100644
--- a/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
+++ b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
@@ -4,65 +4,15 @@
 
 library dart2js.diagnostic_listener;
 
-import 'source_span.dart' show
-    SourceSpan;
-import 'spannable.dart' show
-    Spannable;
-import '../elements/elements.dart' show
-    Element;
+import '../options.dart' show DiagnosticOptions;
+import 'source_span.dart' show SourceSpan;
+import 'spannable.dart' show Spannable;
+import '../elements/elements.dart' show Element;
 import 'messages.dart';
 
-class DiagnosticOptions {
-  /// Emit terse diagnostics without howToFix.
-  final bool terseDiagnostics;
-
-  /// List of packages for which warnings and hints are reported. If `null`,
-  /// no package warnings or hints are reported. If empty, all warnings and
-  /// hints are reported.
-  final List<String> _shownPackageWarnings;
-
-  /// If `true`, warnings are not reported.
-  final bool suppressWarnings;
-
-  /// If `true`, warnings cause the compilation to fail.
-  final bool fatalWarnings;
-
-  /// If `true`, hints are not reported.
-  final bool suppressHints;
-
-  const DiagnosticOptions({
-    this.suppressWarnings: false,
-    this.fatalWarnings: false,
-    this.suppressHints: false,
-    this.terseDiagnostics: false,
-    List<String> shownPackageWarnings: null})
-      : _shownPackageWarnings = shownPackageWarnings;
-
-
-  /// Returns `true` if warnings and hints are shown for all packages.
-  bool get showAllPackageWarnings {
-    return _shownPackageWarnings != null && _shownPackageWarnings.isEmpty;
-  }
-
-  /// Returns `true` if warnings and hints are hidden for all packages.
-  bool get hidePackageWarnings => _shownPackageWarnings == null;
-
-  /// Returns `true` if warnings should be should for [uri].
-  bool showPackageWarningsFor(Uri uri) {
-    if (showAllPackageWarnings) {
-      return true;
-    }
-    if (_shownPackageWarnings != null) {
-      return uri.scheme == 'package' &&
-          _shownPackageWarnings.contains(uri.pathSegments.first);
-    }
-    return false;
-  }
-}
-
 // TODO(johnniwinther): Rename and cleanup this interface. Add severity enum.
 abstract class DiagnosticReporter {
-  DiagnosticOptions get options => const DiagnosticOptions();
+  DiagnosticOptions get options;
 
   // TODO(karlklose): rename log to something like reportInfo.
   void log(message);
@@ -76,51 +26,39 @@
   /// element.
   SourceSpan spanFromSpannable(Spannable node);
 
-  void reportErrorMessage(
-      Spannable spannable,
-      MessageKind messageKind,
+  void reportErrorMessage(Spannable spannable, MessageKind messageKind,
       [Map arguments = const {}]) {
     reportError(createMessage(spannable, messageKind, arguments));
   }
 
-  void reportError(
-      DiagnosticMessage message,
+  void reportError(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]);
 
-  void reportWarningMessage(
-      Spannable spannable,
-      MessageKind messageKind,
+  void reportWarningMessage(Spannable spannable, MessageKind messageKind,
       [Map arguments = const {}]) {
     reportWarning(createMessage(spannable, messageKind, arguments));
   }
 
-  void reportWarning(
-      DiagnosticMessage message,
+  void reportWarning(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]);
 
-  void reportHintMessage(
-      Spannable spannable,
-      MessageKind messageKind,
+  void reportHintMessage(Spannable spannable, MessageKind messageKind,
       [Map arguments = const {}]) {
     reportHint(createMessage(spannable, messageKind, arguments));
   }
 
-  void reportHint(
-      DiagnosticMessage message,
+  void reportHint(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]);
 
-
   @deprecated
   void reportInfo(Spannable node, MessageKind errorCode,
-                  [Map arguments = const {}]);
+      [Map arguments = const {}]);
 
   /// Set current element of this reporter to [element]. This is used for
   /// creating [SourceSpan] in [spanFromSpannable].
   withCurrentElement(Element element, f());
 
-  DiagnosticMessage createMessage(
-      Spannable spannable,
-      MessageKind messageKind,
+  DiagnosticMessage createMessage(Spannable spannable, MessageKind messageKind,
       [Map arguments = const {}]);
 }
 
@@ -130,4 +68,4 @@
   final Message message;
 
   DiagnosticMessage(this.sourceSpan, this.spannable, this.message);
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart b/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
index 13d4c95..a18ce66 100644
--- a/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
@@ -12,10 +12,10 @@
 import '../messages.dart' show MessageKind, MessageTemplate;
 
 const Map<MessageKind, MessageTemplate> TEMPLATES = const <MessageKind, MessageTemplate>{ 
-  MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY: const MessageTemplate(
-    MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY,
-    "Const constructor or factory can't have a body.",
-    howToFix: "Remove the 'const' keyword or the body.",
+  MessageKind.CONST_CONSTRUCTOR_WITH_BODY: const MessageTemplate(
+    MessageKind.CONST_CONSTRUCTOR_WITH_BODY,
+    "Const constructor can't have a body.",
+    howToFix: "Try removing the 'const' keyword or the body.",
     examples: const [
       r"""
          class C {
@@ -23,6 +23,13 @@
          }
 
          main() => new C();""",
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.CONST_FACTORY: const MessageTemplate(
+    MessageKind.CONST_FACTORY,
+    "Only redirecting factory constructors can be declared to be 'const'.",
+    howToFix: "Try removing the 'const' keyword or replacing the body with '=' followed by a valid target.",
+    examples: const [
       r"""
          class C {
            const factory C() {}
@@ -67,7 +74,7 @@
   ),  // Generated. Don't edit.
   MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE: const MessageTemplate(
     MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE,
-    "Constructors can't have a return type",
+    "Constructors can't have a return type.",
     howToFix: "Try removing the return type.",
     examples: const [
       "class A { int A() {} } main() { new A(); }",
@@ -84,7 +91,7 @@
   ),  // Generated. Don't edit.
   MessageKind.RETHROW_OUTSIDE_CATCH: const MessageTemplate(
     MessageKind.RETHROW_OUTSIDE_CATCH,
-    "Rethrow must be inside of catch clause",
+    "Rethrow must be inside of catch clause.",
     howToFix: "Try moving the expression into a catch clause, or using a 'throw' expression.",
     examples: const [
       "main() { rethrow; }",
@@ -108,7 +115,7 @@
   MessageKind.RETURN_IN_GENERATOR: const MessageTemplate(
     MessageKind.RETURN_IN_GENERATOR,
     "Can't return a value from a generator function (using the '#{modifier}' modifier).",
-    howToFix: "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier",
+    howToFix: "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier.",
     examples: const [
       r"""
         foo() async* { return 0; }
@@ -120,4 +127,113 @@
         """,
     ]
   ),  // Generated. Don't edit.
+  MessageKind.NOT_ASSIGNABLE: const MessageTemplate(
+    MessageKind.NOT_ASSIGNABLE,
+    "'#{fromType}' is not assignable to '#{toType}'."  ),  // Generated. Don't edit.
+  MessageKind.FORIN_NOT_ASSIGNABLE: const MessageTemplate(
+    MessageKind.FORIN_NOT_ASSIGNABLE,
+    "The element type '#{currentType}' of '#{expressionType}' is not assignable to '#{elementType}'.",
+    examples: const [
+      r"""
+        main() {
+          List<int> list = <int>[1, 2];
+          for (String x in list) x;
+        }
+        """,
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.CANNOT_RESOLVE: const MessageTemplate(
+    MessageKind.CANNOT_RESOLVE,
+    "Can't resolve '#{name}'."  ),  // Generated. Don't edit.
+  MessageKind.UNDEFINED_METHOD: const MessageTemplate(
+    MessageKind.UNDEFINED_METHOD,
+    "The method '#{memberName}' is not defined for the class '#{className}'.",
+    examples: const [
+      r"""
+        class A {
+          foo() { bar(); }
+        }
+        main() { new A().foo(); }
+        """,
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.UNDEFINED_GETTER: const MessageTemplate(
+    MessageKind.UNDEFINED_GETTER,
+    "The getter '#{memberName}' is not defined for the class '#{className}'.",
+    examples: const [
+      "class A {} main() { new A().x; }",
+      "class A {} main() { A.x; }",
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.UNDEFINED_INSTANCE_GETTER_BUT_SETTER: const MessageTemplate(
+    MessageKind.UNDEFINED_INSTANCE_GETTER_BUT_SETTER,
+    "The setter '#{memberName}' in class '#{className}' can not be used as a getter.",
+    examples: const [
+      "class A { set x(y) {} } main() { new A().x; }",
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.UNDEFINED_OPERATOR: const MessageTemplate(
+    MessageKind.UNDEFINED_OPERATOR,
+    "The operator '#{memberName}' is not defined for the class '#{className}'.",
+    examples: const [
+      "class A {} main() { new A() + 3; }",
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.UNDEFINED_SETTER: const MessageTemplate(
+    MessageKind.UNDEFINED_SETTER,
+    "The setter '#{memberName}' is not defined for the class '#{className}'.",
+    examples: const [
+      "class A {} main() { new A().x = 499; }",
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.NO_SUCH_SUPER_MEMBER: const MessageTemplate(
+    MessageKind.NO_SUCH_SUPER_MEMBER,
+    "Can't resolve '#{memberName}' in a superclass of '#{className}'."  ),  // Generated. Don't edit.
+  MessageKind.UNDEFINED_SUPER_SETTER: const MessageTemplate(
+    MessageKind.UNDEFINED_SUPER_SETTER,
+    "The setter '#{memberName}' is not defined in a superclass of '#{className}'.",
+    examples: const [
+      r"""
+        class A {}
+        class B extends A {
+          foo() { super.x = 499; }
+        }
+        main() { new B().foo(); }
+        """,
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.UNDEFINED_STATIC_GETTER_BUT_SETTER: const MessageTemplate(
+    MessageKind.UNDEFINED_STATIC_GETTER_BUT_SETTER,
+    "Cannot resolve getter '#{name}'.",
+    examples: const [
+      "set foo(x) {}  main() { foo; }",
+    ]
+  ),  // Generated. Don't edit.
+  MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER: const MessageTemplate(
+    MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER,
+    "Cannot resolve setter '#{name}'.",
+    examples: const [
+      r"""
+        main() {
+          final x = 1;
+          x = 2;
+        }""",
+      r"""
+        main() {
+          const x = 1;
+          x = 2;
+        }
+        """,
+      r"""
+        final x = 1;
+        main() { x = 3; }
+        """,
+      r"""
+        const x = 1;
+        main() { x = 3; }
+        """,
+      "get foo => null  main() { foo = 5; }",
+      "const foo = 0  main() { foo = 5; }",
+    ]
+  ),  // Generated. Don't edit.
 };
diff --git a/pkg/compiler/lib/src/diagnostics/invariant.dart b/pkg/compiler/lib/src/diagnostics/invariant.dart
index 349d89b..7ad6f35 100644
--- a/pkg/compiler/lib/src/diagnostics/invariant.dart
+++ b/pkg/compiler/lib/src/diagnostics/invariant.dart
@@ -46,7 +46,7 @@
     throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE,
         "Spannable was null for invariant. Use CURRENT_ELEMENT_SPANNABLE.");
   }
-  if (condition is Function){
+  if (condition is Function) {
     condition = condition();
     if (condition is String) {
       message = condition;
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index 84e9cc2..f442dd1 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.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.
 
-
 /**
  * The messages in this file should meet the following guide lines:
  *
@@ -63,14 +62,10 @@
 
 library dart2js.messages;
 
-import '../tokens/token.dart' show
-    ErrorToken,
-    Token;
+import '../tokens/token.dart' show ErrorToken, Token;
 
-import 'invariant.dart' show
-    invariant;
-import 'spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE;
+import 'invariant.dart' show invariant;
+import 'spannable.dart' show CURRENT_ELEMENT_SPANNABLE;
 
 import 'generated/shared_messages.dart' as shared_messages;
 
@@ -132,9 +127,9 @@
   CANNOT_RESOLVE_AWAIT_IN_CLOSURE,
   CANNOT_RESOLVE_CONSTRUCTOR,
   CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT,
-  CANNOT_RESOLVE_GETTER,
+  UNDEFINED_STATIC_GETTER_BUT_SETTER,
   CANNOT_RESOLVE_IN_INITIALIZER,
-  CANNOT_RESOLVE_SETTER,
+  UNDEFINED_STATIC_SETTER_BUT_GETTER,
   CANNOT_RESOLVE_TYPE,
   RETURN_IN_GENERATIVE_CONSTRUCTOR,
   CLASS_NAME_EXPECTED,
@@ -144,10 +139,11 @@
   CONSIDER_ANALYZE_ALL,
   CONST_CALLS_NON_CONST,
   CONST_CALLS_NON_CONST_FOR_IMPLICIT,
-  CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY,
+  CONST_CONSTRUCTOR_WITH_BODY,
   CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS,
   CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR,
   CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD,
+  CONST_FACTORY,
   CONST_LOOP_VARIABLE,
   CONST_MAP_KEY_OVERRIDES_EQUALS,
   CONST_WITHOUT_INITIALIZER,
@@ -212,7 +208,7 @@
   FUNCTION_WITH_INITIALIZER,
   GENERIC,
   GETTER_MISMATCH,
-  GETTER_NOT_FOUND,
+  UNDEFINED_INSTANCE_GETTER_BUT_SETTER,
   HEX_DIGIT_EXPECTED,
   HIDDEN_HINTS,
   HIDDEN_IMPLICIT_IMPORT,
@@ -300,10 +296,10 @@
   MAIN_NOT_A_FUNCTION,
   MAIN_WITH_EXTRA_PARAMETER,
   MALFORMED_STRING_LITERAL,
-  MEMBER_NOT_FOUND,
+  UNDEFINED_GETTER,
   MEMBER_NOT_STATIC,
   MEMBER_USES_CLASS_NAME,
-  METHOD_NOT_FOUND,
+  UNDEFINED_METHOD,
   MINUS_OPERATOR_BAD_ARITY,
   MIRROR_BLOAT,
   MIRROR_IMPORT,
@@ -359,7 +355,7 @@
   NULL_NOT_ALLOWED,
   ONLY_ONE_LIBRARY_TAG,
   OPERATOR_NAMED_PARAMETERS,
-  OPERATOR_NOT_FOUND,
+  UNDEFINED_OPERATOR,
   OPERATOR_OPTIONAL_PARAMETERS,
   OPTIONAL_PARAMETER_IN_CATCH,
   OVERRIDE_EQUALS_NOT_HASH_CODE,
@@ -412,8 +408,8 @@
   RETURN_NOTHING,
   RETURN_VALUE_IN_VOID,
   SETTER_MISMATCH,
-  SETTER_NOT_FOUND,
-  SETTER_NOT_FOUND_IN_SUPER,
+  UNDEFINED_SETTER,
+  UNDEFINED_SUPER_SETTER,
   STATIC_FUNCTION_BLOAT,
   STRING_EXPECTED,
   SUPER_CALL_TO_FACTORY,
@@ -497,188 +493,150 @@
   /// Additional options needed for the examples to work.
   final List<String> options;
 
-  const MessageTemplate(
-      this.kind,
-      this.template,
-      {this.howToFix,
-       this.examples,
-       this.options: const <String>[]});
+  const MessageTemplate(this.kind, this.template,
+      {this.howToFix, this.examples, this.options: const <String>[]});
 
   /// All templates used by the compiler.
   ///
   /// The map is complete mapping from [MessageKind] to their corresponding
   /// [MessageTemplate].
   // The key type is a union of MessageKind and SharedMessageKind.
-  static final Map<dynamic, MessageTemplate> TEMPLATES =
-      <dynamic, MessageTemplate>{}
+  static final Map<dynamic, MessageTemplate> TEMPLATES = <dynamic,
+      MessageTemplate>{}
     ..addAll(shared_messages.TEMPLATES)
-    ..addAll(const<MessageKind, MessageTemplate>{
+    ..addAll(const <MessageKind, MessageTemplate>{
       /// Do not use this. It is here for legacy and debugging. It violates item
       /// 4 of the guide lines for error messages in the beginning of the file.
       MessageKind.GENERIC:
-        const MessageTemplate(MessageKind.GENERIC, '#{text}'),
+          const MessageTemplate(MessageKind.GENERIC, '#{text}'),
 
-      MessageKind.NOT_ASSIGNABLE:
-        const MessageTemplate(MessageKind.NOT_ASSIGNABLE,
-          "'#{fromType}' is not assignable to '#{toType}'."),
+      MessageKind.VOID_EXPRESSION: const MessageTemplate(
+          MessageKind.VOID_EXPRESSION, "Expression does not yield a value."),
 
-      MessageKind.FORIN_NOT_ASSIGNABLE:
-        const MessageTemplate(MessageKind.FORIN_NOT_ASSIGNABLE,
-          "The element type '#{currentType}' of '#{expressionType}' "
-          "is not assignable to '#{elementType}'."),
+      MessageKind.VOID_VARIABLE: const MessageTemplate(
+          MessageKind.VOID_VARIABLE, "Variable cannot be of type void."),
 
-      MessageKind.VOID_EXPRESSION:
-        const MessageTemplate(MessageKind.VOID_EXPRESSION,
-          "Expression does not yield a value."),
-
-      MessageKind.VOID_VARIABLE:
-        const MessageTemplate(MessageKind.VOID_VARIABLE,
-          "Variable cannot be of type void."),
-
-      MessageKind.RETURN_VALUE_IN_VOID:
-        const MessageTemplate(MessageKind.RETURN_VALUE_IN_VOID,
+      MessageKind.RETURN_VALUE_IN_VOID: const MessageTemplate(
+          MessageKind.RETURN_VALUE_IN_VOID,
           "Cannot return value from void function."),
 
-      MessageKind.RETURN_NOTHING:
-        const MessageTemplate(MessageKind.RETURN_NOTHING,
+      MessageKind.RETURN_NOTHING: const MessageTemplate(
+          MessageKind.RETURN_NOTHING,
           "Value of type '#{returnType}' expected."),
 
-      MessageKind.MISSING_ARGUMENT:
-        const MessageTemplate(MessageKind.MISSING_ARGUMENT,
+      MessageKind.MISSING_ARGUMENT: const MessageTemplate(
+          MessageKind.MISSING_ARGUMENT,
           "Missing argument of type '#{argumentType}'."),
 
-      MessageKind.ADDITIONAL_ARGUMENT:
-        const MessageTemplate(MessageKind.ADDITIONAL_ARGUMENT,
-          "Additional argument."),
+      MessageKind.ADDITIONAL_ARGUMENT: const MessageTemplate(
+          MessageKind.ADDITIONAL_ARGUMENT, "Additional argument."),
 
-      MessageKind.NAMED_ARGUMENT_NOT_FOUND:
-        const MessageTemplate(MessageKind.NAMED_ARGUMENT_NOT_FOUND,
+      MessageKind.NAMED_ARGUMENT_NOT_FOUND: const MessageTemplate(
+          MessageKind.NAMED_ARGUMENT_NOT_FOUND,
           "No named argument '#{argumentName}' found on method."),
 
-      MessageKind.MEMBER_NOT_FOUND:
-        const MessageTemplate(MessageKind.MEMBER_NOT_FOUND,
-          "No member named '#{memberName}' in class '#{className}'."),
-
-      MessageKind.AWAIT_MEMBER_NOT_FOUND:
-        const MessageTemplate(MessageKind.AWAIT_MEMBER_NOT_FOUND,
+      MessageKind.AWAIT_MEMBER_NOT_FOUND: const MessageTemplate(
+          MessageKind.AWAIT_MEMBER_NOT_FOUND,
           "No member named 'await' in class '#{className}'.",
           howToFix: "Did you mean to add the 'async' marker "
-                    "to '#{functionName}'?",
-          examples: const ["""
+              "to '#{functionName}'?",
+          examples: const [
+            """
 class A {
   m() => await -3;
 }
 main() => new A().m();
-"""]),
+"""
+          ]),
 
-      MessageKind.AWAIT_MEMBER_NOT_FOUND_IN_CLOSURE:
-        const MessageTemplate(MessageKind.AWAIT_MEMBER_NOT_FOUND_IN_CLOSURE,
+      MessageKind.AWAIT_MEMBER_NOT_FOUND_IN_CLOSURE: const MessageTemplate(
+          MessageKind.AWAIT_MEMBER_NOT_FOUND_IN_CLOSURE,
           "No member named 'await' in class '#{className}'.",
           howToFix: "Did you mean to add the 'async' marker "
-                    "to the enclosing function?",
-          examples: const ["""
+              "to the enclosing function?",
+          examples: const [
+            """
 class A {
   m() => () => await -3;
 }
 main() => new A().m();
-"""]),
+"""
+          ]),
 
-      MessageKind.METHOD_NOT_FOUND:
-        const MessageTemplate(MessageKind.METHOD_NOT_FOUND,
-          "No method named '#{memberName}' in class '#{className}'."),
+      MessageKind.NOT_CALLABLE: const MessageTemplate(
+          MessageKind.NOT_CALLABLE, "'#{elementName}' is not callable."),
 
-      MessageKind.OPERATOR_NOT_FOUND:
-        const MessageTemplate(MessageKind.OPERATOR_NOT_FOUND,
-          "No operator '#{memberName}' in class '#{className}'."),
-
-      MessageKind.SETTER_NOT_FOUND:
-        const MessageTemplate(MessageKind.SETTER_NOT_FOUND,
-          "No setter named '#{memberName}' in class '#{className}'."),
-
-      MessageKind.SETTER_NOT_FOUND_IN_SUPER:
-        const MessageTemplate(MessageKind.SETTER_NOT_FOUND_IN_SUPER,
-          "No setter named '#{name}' in superclass of '#{className}'."),
-
-      MessageKind.GETTER_NOT_FOUND:
-        const MessageTemplate(MessageKind.GETTER_NOT_FOUND,
-          "No getter named '#{memberName}' in class '#{className}'."),
-
-      MessageKind.NOT_CALLABLE:
-        const MessageTemplate(MessageKind.NOT_CALLABLE,
-          "'#{elementName}' is not callable."),
-
-      MessageKind.MEMBER_NOT_STATIC:
-        const MessageTemplate(MessageKind.MEMBER_NOT_STATIC,
+      MessageKind.MEMBER_NOT_STATIC: const MessageTemplate(
+          MessageKind.MEMBER_NOT_STATIC,
           "'#{className}.#{memberName}' is not static."),
 
-      MessageKind.NO_INSTANCE_AVAILABLE:
-        const MessageTemplate(MessageKind.NO_INSTANCE_AVAILABLE,
+      MessageKind.NO_INSTANCE_AVAILABLE: const MessageTemplate(
+          MessageKind.NO_INSTANCE_AVAILABLE,
           "'#{name}' is only available in instance methods."),
 
-      MessageKind.NO_THIS_AVAILABLE:
-        const MessageTemplate(MessageKind.NO_THIS_AVAILABLE,
+      MessageKind.NO_THIS_AVAILABLE: const MessageTemplate(
+          MessageKind.NO_THIS_AVAILABLE,
           "'this' is only available in instance methods."),
 
-      MessageKind.PRIVATE_ACCESS:
-        const MessageTemplate(MessageKind.PRIVATE_ACCESS,
+      MessageKind.PRIVATE_ACCESS: const MessageTemplate(
+          MessageKind.PRIVATE_ACCESS,
           "'#{name}' is declared private within library "
           "'#{libraryName}'."),
 
-      MessageKind.THIS_IS_THE_DECLARATION:
-        const MessageTemplate(MessageKind.THIS_IS_THE_DECLARATION,
+      MessageKind.THIS_IS_THE_DECLARATION: const MessageTemplate(
+          MessageKind.THIS_IS_THE_DECLARATION,
           "This is the declaration of '#{name}'."),
 
-      MessageKind.THIS_IS_THE_METHOD:
-        const MessageTemplate(MessageKind.THIS_IS_THE_METHOD,
-          "This is the method declaration."),
+      MessageKind.THIS_IS_THE_METHOD: const MessageTemplate(
+          MessageKind.THIS_IS_THE_METHOD, "This is the method declaration."),
 
-      MessageKind.CANNOT_RESOLVE:
-        const MessageTemplate(MessageKind.CANNOT_RESOLVE,
-          "Cannot resolve '#{name}'."),
+      MessageKind.CANNOT_RESOLVE: const MessageTemplate(
+          MessageKind.CANNOT_RESOLVE, "Cannot resolve '#{name}'."),
 
-      MessageKind.CANNOT_RESOLVE_AWAIT:
-        const MessageTemplate(MessageKind.CANNOT_RESOLVE_AWAIT,
-          "Cannot resolve '#{name}'.",
+      MessageKind.CANNOT_RESOLVE_AWAIT: const MessageTemplate(
+          MessageKind.CANNOT_RESOLVE_AWAIT, "Cannot resolve '#{name}'.",
           howToFix: "Did you mean to add the 'async' marker "
-                    "to '#{functionName}'?",
+              "to '#{functionName}'?",
           examples: const [
-              "main() => await -3;",
-              "foo() => await -3; main() => foo();"
+            "main() => await -3;",
+            "foo() => await -3; main() => foo();"
           ]),
 
-      MessageKind.CANNOT_RESOLVE_AWAIT_IN_CLOSURE:
-        const MessageTemplate(MessageKind.CANNOT_RESOLVE_AWAIT_IN_CLOSURE,
+      MessageKind.CANNOT_RESOLVE_AWAIT_IN_CLOSURE: const MessageTemplate(
+          MessageKind.CANNOT_RESOLVE_AWAIT_IN_CLOSURE,
           "Cannot resolve '#{name}'.",
           howToFix: "Did you mean to add the 'async' marker "
-                    "to the enclosing function?",
-          examples: const [
-              "main() { (() => await -3)(); }",
-          ]),
+              "to the enclosing function?",
+          examples: const ["main() { (() => await -3)(); }",]),
 
-      MessageKind.CANNOT_RESOLVE_IN_INITIALIZER:
-        const MessageTemplate(MessageKind.CANNOT_RESOLVE_IN_INITIALIZER,
+      MessageKind.CANNOT_RESOLVE_IN_INITIALIZER: const MessageTemplate(
+          MessageKind.CANNOT_RESOLVE_IN_INITIALIZER,
           "Cannot resolve '#{name}'. It would be implicitly looked up on this "
           "instance, but instances are not available in initializers.",
           howToFix: "Try correcting the unresolved reference or move the "
               "initialization to a constructor body.",
-          examples: const ["""
+          examples: const [
+            """
 class A {
   var test = unresolvedName;
 }
 main() => new A();
-"""]),
+"""
+          ]),
 
-      MessageKind.CANNOT_RESOLVE_CONSTRUCTOR:
-        const MessageTemplate(MessageKind.CANNOT_RESOLVE_CONSTRUCTOR,
+      MessageKind.CANNOT_RESOLVE_CONSTRUCTOR: const MessageTemplate(
+          MessageKind.CANNOT_RESOLVE_CONSTRUCTOR,
           "Cannot resolve constructor '#{constructorName}'."),
 
       MessageKind.CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT:
-        const MessageTemplate(
-          MessageKind.CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT,
-          "cannot resolve constructor '#{constructorName}' "
-          "for implicit super call.",
-          howToFix: "Try explicitly invoking a constructor of the super class",
-          examples: const ["""
+          const MessageTemplate(
+              MessageKind.CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT,
+              "cannot resolve constructor '#{constructorName}' "
+              "for implicit super call.",
+              howToFix:
+                  "Try explicitly invoking a constructor of the super class",
+              examples: const [
+            """
 class A {
   A.foo() {}
 }
@@ -686,25 +644,27 @@
   B();
 }
 main() => new B();
-"""]),
+"""
+          ]),
 
-      MessageKind.INVALID_UNNAMED_CONSTRUCTOR_NAME:
-        const MessageTemplate(MessageKind.INVALID_UNNAMED_CONSTRUCTOR_NAME,
+      MessageKind.INVALID_UNNAMED_CONSTRUCTOR_NAME: const MessageTemplate(
+          MessageKind.INVALID_UNNAMED_CONSTRUCTOR_NAME,
           "Unnamed constructor name must be '#{name}'."),
 
-      MessageKind.INVALID_CONSTRUCTOR_NAME:
-        const MessageTemplate(MessageKind.INVALID_CONSTRUCTOR_NAME,
+      MessageKind.INVALID_CONSTRUCTOR_NAME: const MessageTemplate(
+          MessageKind.INVALID_CONSTRUCTOR_NAME,
           "Constructor name must start with '#{name}'."),
 
-      MessageKind.CANNOT_RESOLVE_TYPE:
-        const MessageTemplate(MessageKind.CANNOT_RESOLVE_TYPE,
+      MessageKind.CANNOT_RESOLVE_TYPE: const MessageTemplate(
+          MessageKind.CANNOT_RESOLVE_TYPE,
           "Cannot resolve type '#{typeName}'."),
 
-      MessageKind.DUPLICATE_DEFINITION:
-        const MessageTemplate(MessageKind.DUPLICATE_DEFINITION,
+      MessageKind.DUPLICATE_DEFINITION: const MessageTemplate(
+          MessageKind.DUPLICATE_DEFINITION,
           "Duplicate definition of '#{name}'.",
           howToFix: "Try to rename or remove this definition.",
-          examples: const ["""
+          examples: const [
+            """
 class C {
   void f() {}
   int get f => 1;
@@ -714,127 +674,106 @@
   new C();
 }
 
-"""]),
+"""
+          ]),
 
-      MessageKind.EXISTING_DEFINITION:
-        const MessageTemplate(MessageKind.EXISTING_DEFINITION,
-          "Existing definition of '#{name}'."),
+      MessageKind.EXISTING_DEFINITION: const MessageTemplate(
+          MessageKind.EXISTING_DEFINITION, "Existing definition of '#{name}'."),
 
-      MessageKind.DUPLICATE_IMPORT:
-        const MessageTemplate(MessageKind.DUPLICATE_IMPORT,
-          "Duplicate import of '#{name}'."),
+      MessageKind.DUPLICATE_IMPORT: const MessageTemplate(
+          MessageKind.DUPLICATE_IMPORT, "Duplicate import of '#{name}'."),
 
-      MessageKind.HIDDEN_IMPORT:
-        const MessageTemplate(MessageKind.HIDDEN_IMPORT,
+      MessageKind.HIDDEN_IMPORT: const MessageTemplate(
+          MessageKind.HIDDEN_IMPORT,
           "'#{name}' from library '#{hiddenUri}' is hidden by '#{name}' "
           "from library '#{hidingUri}'.",
           howToFix:
-            "Try adding 'hide #{name}' to the import of '#{hiddenUri}'.",
+              "Try adding 'hide #{name}' to the import of '#{hiddenUri}'.",
           examples: const [
-              const {
-'main.dart':
-"""
+            const {
+              'main.dart': """
 import 'dart:async'; // This imports a class Future.
 import 'future.dart';
 
 void main() => new Future();""",
-
-'future.dart':
-"""
+              'future.dart': """
 library future;
 
-class Future {}"""},
-
-          const {
-'main.dart':
-"""
+class Future {}"""
+            },
+            const {
+              'main.dart': """
 import 'future.dart';
 import 'dart:async'; // This imports a class Future.
 
 void main() => new Future();""",
-
-'future.dart':
-"""
+              'future.dart': """
 library future;
 
-class Future {}"""},
-
-          const {
-'main.dart':
-"""
+class Future {}"""
+            },
+            const {
+              'main.dart': """
 import 'export.dart';
 import 'dart:async'; // This imports a class Future.
 
 void main() => new Future();""",
-
-'future.dart':
-"""
+              'future.dart': """
 library future;
 
 class Future {}""",
-
-'export.dart':
-"""
+              'export.dart': """
 library export;
 
-export 'future.dart';"""},
-
-         const {
-'main.dart':
-"""
+export 'future.dart';"""
+            },
+            const {
+              'main.dart': """
 import 'future.dart' as prefix;
 import 'dart:async' as prefix; // This imports a class Future.
 
 void main() => new prefix.Future();""",
-
-'future.dart':
-"""
+              'future.dart': """
 library future;
 
-class Future {}"""}]),
+class Future {}"""
+            }
+          ]),
 
-
-      MessageKind.HIDDEN_IMPLICIT_IMPORT:
-        const MessageTemplate(MessageKind.HIDDEN_IMPLICIT_IMPORT,
+      MessageKind.HIDDEN_IMPLICIT_IMPORT: const MessageTemplate(
+          MessageKind.HIDDEN_IMPLICIT_IMPORT,
           "'#{name}' from library '#{hiddenUri}' is hidden by '#{name}' "
           "from library '#{hidingUri}'.",
           howToFix: "Try adding an explicit "
-                    "'import \"#{hiddenUri}\" hide #{name}'.",
+              "'import \"#{hiddenUri}\" hide #{name}'.",
           examples: const [
-              const {
-'main.dart':
-"""
+            const {
+              'main.dart': """
 // This hides the implicit import of class Type from dart:core.
 import 'type.dart';
 
 void main() => new Type();""",
-
-'type.dart':
-"""
+              'type.dart': """
 library type;
 
-class Type {}"""},
-          const {
-'conflictsWithDart.dart':
-"""
+class Type {}"""
+            },
+            const {
+              'conflictsWithDart.dart': """
 library conflictsWithDart;
 
 class Duration {
   static var x = 100;
 }
 """,
-
-'conflictsWithDartAsWell.dart':
-"""
+              'conflictsWithDartAsWell.dart': """
 library conflictsWithDartAsWell;
 
 class Duration {
   static var x = 100;
 }
 """,
-
-'main.dart':
-r"""
+              'main.dart': r"""
 library testDartConflicts;
 
 import 'conflictsWithDart.dart';
@@ -843,166 +782,169 @@
 main() {
   print("Hail Caesar ${Duration.x}");
 }
-"""}]),
+"""
+            }
+          ]),
 
-      MessageKind.DUPLICATE_EXPORT:
-        const MessageTemplate(MessageKind.DUPLICATE_EXPORT,
-          "Duplicate export of '#{name}'.",
+      MessageKind.DUPLICATE_EXPORT: const MessageTemplate(
+          MessageKind.DUPLICATE_EXPORT, "Duplicate export of '#{name}'.",
           howToFix: "Try adding 'hide #{name}' to one of the exports.",
-          examples: const [const {
-'main.dart': """
+          examples: const [
+            const {
+              'main.dart': """
 export 'decl1.dart';
 export 'decl2.dart';
 
 main() {}""",
-'decl1.dart': "class Class {}",
-'decl2.dart': "class Class {}"}]),
+              'decl1.dart': "class Class {}",
+              'decl2.dart': "class Class {}"
+            }
+          ]),
 
-      MessageKind.DUPLICATE_EXPORT_CONT:
-        const MessageTemplate(MessageKind.DUPLICATE_EXPORT_CONT,
+      MessageKind.DUPLICATE_EXPORT_CONT: const MessageTemplate(
+          MessageKind.DUPLICATE_EXPORT_CONT,
           "This is another export of '#{name}'."),
 
-      MessageKind.DUPLICATE_EXPORT_DECL:
-        const MessageTemplate(MessageKind.DUPLICATE_EXPORT_DECL,
+      MessageKind.DUPLICATE_EXPORT_DECL: const MessageTemplate(
+          MessageKind.DUPLICATE_EXPORT_DECL,
           "The exported '#{name}' from export #{uriString} is defined here."),
 
-      MessageKind.EMPTY_HIDE:
-        const MessageTemplate(MessageKind.EMPTY_HIDE,
-            "Library '#{uri}' doesn't export a '#{name}' declaration.",
-      howToFix: "Try removing '#{name}' the 'hide' clause.",
-      examples: const [
-        const {
-            'main.dart': """
+      MessageKind.EMPTY_HIDE: const MessageTemplate(MessageKind.EMPTY_HIDE,
+          "Library '#{uri}' doesn't export a '#{name}' declaration.",
+          howToFix: "Try removing '#{name}' the 'hide' clause.",
+          examples: const [
+            const {
+              'main.dart': """
 import 'dart:core' hide Foo;
 
-main() {}"""},
-        const {
-'main.dart': """
+main() {}"""
+            },
+            const {
+              'main.dart': """
 export 'dart:core' hide Foo;
 
-main() {}"""},
-]),
+main() {}"""
+            },
+          ]),
 
-      MessageKind.EMPTY_SHOW:
-        const MessageTemplate(MessageKind.EMPTY_SHOW,
-            "Library '#{uri}' doesn't export a '#{name}' declaration.",
-      howToFix: "Try removing '#{name}' from the 'show' clause.",
-      examples: const [
-        const {
-            'main.dart': """
+      MessageKind.EMPTY_SHOW: const MessageTemplate(MessageKind.EMPTY_SHOW,
+          "Library '#{uri}' doesn't export a '#{name}' declaration.",
+          howToFix: "Try removing '#{name}' from the 'show' clause.",
+          examples: const [
+            const {
+              'main.dart': """
 import 'dart:core' show Foo;
 
-main() {}"""},
-        const {
-'main.dart': """
+main() {}"""
+            },
+            const {
+              'main.dart': """
 export 'dart:core' show Foo;
 
-main() {}"""},
-]),
+main() {}"""
+            },
+          ]),
 
-      MessageKind.NOT_A_TYPE:
-        const MessageTemplate(MessageKind.NOT_A_TYPE,
-          "'#{node}' is not a type."),
+      MessageKind.NOT_A_TYPE: const MessageTemplate(
+          MessageKind.NOT_A_TYPE, "'#{node}' is not a type."),
 
-      MessageKind.NOT_A_PREFIX:
-        const MessageTemplate(MessageKind.NOT_A_PREFIX,
-          "'#{node}' is not a prefix."),
+      MessageKind.NOT_A_PREFIX: const MessageTemplate(
+          MessageKind.NOT_A_PREFIX, "'#{node}' is not a prefix."),
 
-      MessageKind.PREFIX_AS_EXPRESSION:
-        const MessageTemplate(MessageKind.PREFIX_AS_EXPRESSION,
+      MessageKind.PREFIX_AS_EXPRESSION: const MessageTemplate(
+          MessageKind.PREFIX_AS_EXPRESSION,
           "Library prefix '#{prefix}' is not a valid expression."),
 
-      MessageKind.CANNOT_FIND_CONSTRUCTOR:
-        const MessageTemplate(MessageKind.CANNOT_FIND_CONSTRUCTOR,
+      MessageKind.CANNOT_FIND_CONSTRUCTOR: const MessageTemplate(
+          MessageKind.CANNOT_FIND_CONSTRUCTOR,
           "Cannot find constructor '#{constructorName}' in class "
           "'#{className}'."),
 
-      MessageKind.CANNOT_FIND_UNNAMED_CONSTRUCTOR:
-        const MessageTemplate(MessageKind.CANNOT_FIND_UNNAMED_CONSTRUCTOR,
+      MessageKind.CANNOT_FIND_UNNAMED_CONSTRUCTOR: const MessageTemplate(
+          MessageKind.CANNOT_FIND_UNNAMED_CONSTRUCTOR,
           "Cannot find unnamed constructor in class "
           "'#{className}'."),
 
-      MessageKind.CYCLIC_CLASS_HIERARCHY:
-        const MessageTemplate(MessageKind.CYCLIC_CLASS_HIERARCHY,
+      MessageKind.CYCLIC_CLASS_HIERARCHY: const MessageTemplate(
+          MessageKind.CYCLIC_CLASS_HIERARCHY,
           "'#{className}' creates a cycle in the class hierarchy."),
 
-      MessageKind.CYCLIC_REDIRECTING_FACTORY:
-        const MessageTemplate(MessageKind.CYCLIC_REDIRECTING_FACTORY,
+      MessageKind.CYCLIC_REDIRECTING_FACTORY: const MessageTemplate(
+          MessageKind.CYCLIC_REDIRECTING_FACTORY,
           'Redirecting factory leads to a cyclic redirection.'),
 
-      MessageKind.INVALID_RECEIVER_IN_INITIALIZER:
-        const MessageTemplate(MessageKind.INVALID_RECEIVER_IN_INITIALIZER,
+      MessageKind.INVALID_RECEIVER_IN_INITIALIZER: const MessageTemplate(
+          MessageKind.INVALID_RECEIVER_IN_INITIALIZER,
           "Field initializer expected."),
 
-      MessageKind.NO_SUPER_IN_STATIC:
-        const MessageTemplate(MessageKind.NO_SUPER_IN_STATIC,
+      MessageKind.NO_SUPER_IN_STATIC: const MessageTemplate(
+          MessageKind.NO_SUPER_IN_STATIC,
           "'super' is only available in instance methods."),
 
-      MessageKind.DUPLICATE_INITIALIZER:
-        const MessageTemplate(MessageKind.DUPLICATE_INITIALIZER,
+      MessageKind.DUPLICATE_INITIALIZER: const MessageTemplate(
+          MessageKind.DUPLICATE_INITIALIZER,
           "Field '#{fieldName}' is initialized more than once."),
 
-      MessageKind.ALREADY_INITIALIZED:
-        const MessageTemplate(MessageKind.ALREADY_INITIALIZED,
+      MessageKind.ALREADY_INITIALIZED: const MessageTemplate(
+          MessageKind.ALREADY_INITIALIZED,
           "'#{fieldName}' was already initialized here."),
 
-      MessageKind.INIT_STATIC_FIELD:
-        const MessageTemplate(MessageKind.INIT_STATIC_FIELD,
+      MessageKind.INIT_STATIC_FIELD: const MessageTemplate(
+          MessageKind.INIT_STATIC_FIELD,
           "Cannot initialize static field '#{fieldName}'."),
 
-      MessageKind.NOT_A_FIELD:
-        const MessageTemplate(MessageKind.NOT_A_FIELD,
-          "'#{fieldName}' is not a field."),
+      MessageKind.NOT_A_FIELD: const MessageTemplate(
+          MessageKind.NOT_A_FIELD, "'#{fieldName}' is not a field."),
 
-      MessageKind.CONSTRUCTOR_CALL_EXPECTED:
-        const MessageTemplate(MessageKind.CONSTRUCTOR_CALL_EXPECTED,
+      MessageKind.CONSTRUCTOR_CALL_EXPECTED: const MessageTemplate(
+          MessageKind.CONSTRUCTOR_CALL_EXPECTED,
           "only call to 'this' or 'super' constructor allowed."),
 
-      MessageKind.INVALID_FOR_IN:
-        const MessageTemplate(MessageKind.INVALID_FOR_IN,
-          "Invalid for-in variable declaration."),
+      MessageKind.INVALID_FOR_IN: const MessageTemplate(
+          MessageKind.INVALID_FOR_IN, "Invalid for-in variable declaration."),
 
-      MessageKind.INVALID_INITIALIZER:
-        const MessageTemplate(MessageKind.INVALID_INITIALIZER,
-          "Invalid initializer."),
+      MessageKind.INVALID_INITIALIZER: const MessageTemplate(
+          MessageKind.INVALID_INITIALIZER, "Invalid initializer."),
 
-      MessageKind.FUNCTION_WITH_INITIALIZER:
-        const MessageTemplate(MessageKind.FUNCTION_WITH_INITIALIZER,
+      MessageKind.FUNCTION_WITH_INITIALIZER: const MessageTemplate(
+          MessageKind.FUNCTION_WITH_INITIALIZER,
           "Only constructors can have initializers."),
 
-      MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE:
-        const MessageTemplate(MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE,
+      MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE: const MessageTemplate(
+          MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE,
           "Cyclic constructor redirection."),
 
-      MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY:
-        const MessageTemplate(MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY,
+      MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY: const MessageTemplate(
+          MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY,
           "Redirecting constructor can't have a body."),
 
       MessageKind.REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER:
-        const MessageTemplate(
-          MessageKind.REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER,
-          "Redirecting constructor cannot have other initializers."),
+          const MessageTemplate(
+              MessageKind.REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER,
+              "Redirecting constructor cannot have other initializers."),
 
-      MessageKind.SUPER_INITIALIZER_IN_OBJECT:
-        const MessageTemplate(MessageKind.SUPER_INITIALIZER_IN_OBJECT,
+      MessageKind.SUPER_INITIALIZER_IN_OBJECT: const MessageTemplate(
+          MessageKind.SUPER_INITIALIZER_IN_OBJECT,
           "'Object' cannot have a super initializer."),
 
-      MessageKind.DUPLICATE_SUPER_INITIALIZER:
-        const MessageTemplate(MessageKind.DUPLICATE_SUPER_INITIALIZER,
+      MessageKind.DUPLICATE_SUPER_INITIALIZER: const MessageTemplate(
+          MessageKind.DUPLICATE_SUPER_INITIALIZER,
           "Cannot have more than one super initializer."),
 
-      MessageKind.SUPER_CALL_TO_FACTORY:
-        const MessageTemplate(MessageKind.SUPER_CALL_TO_FACTORY,
+      MessageKind.SUPER_CALL_TO_FACTORY: const MessageTemplate(
+          MessageKind.SUPER_CALL_TO_FACTORY,
           "The target of the superinitializer must be a generative "
           "constructor.",
           howToFix: "Try calling another constructor on the superclass.",
-          examples: const ["""
+          examples: const [
+            """
 class Super {
   factory Super() => null;
 }
 class Class extends Super {}
 main() => new Class();
-""", """
+""",
+            """
 class Super {
   factory Super() => null;
 }
@@ -1010,7 +952,8 @@
   Class();
 }
 main() => new Class();
-""", """
+""",
+            """
 class Super {
   factory Super() => null;
 }
@@ -1018,7 +961,8 @@
   Class() : super();
 }
 main() => new Class();
-""", """
+""",
+            """
 class Super {
   factory Super.foo() => null;
 }
@@ -1026,52 +970,57 @@
   Class() : super.foo();
 }
 main() => new Class();
-"""]),
+"""
+          ]),
 
-      MessageKind.THIS_CALL_TO_FACTORY:
-        const MessageTemplate(MessageKind.THIS_CALL_TO_FACTORY,
+      MessageKind.THIS_CALL_TO_FACTORY: const MessageTemplate(
+          MessageKind.THIS_CALL_TO_FACTORY,
           "The target of the redirection clause must be a generative "
           "constructor",
-        howToFix: "Try redirecting to another constructor.",
-        examples: const ["""
+          howToFix: "Try redirecting to another constructor.",
+          examples: const [
+            """
 class Class {
   factory Class() => null;
   Class.foo() : this();
 }
 main() => new Class.foo();
-""", """
+""",
+            """
 class Class {
   factory Class.foo() => null;
   Class() : this.foo();
 }
 main() => new Class();
-"""]),
+"""
+          ]),
 
-      MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS:
-        const MessageTemplate(MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS,
+      MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS: const MessageTemplate(
+          MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS,
           "Arguments do not match the expected parameters of constructor "
           "'#{constructorName}'."),
 
-      MessageKind.NO_MATCHING_CONSTRUCTOR:
-        const MessageTemplate(MessageKind.NO_MATCHING_CONSTRUCTOR,
+      MessageKind.NO_MATCHING_CONSTRUCTOR: const MessageTemplate(
+          MessageKind.NO_MATCHING_CONSTRUCTOR,
           "'super' call arguments and constructor parameters do not match."),
 
-      MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT:
-        const MessageTemplate(MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT,
-              "Implicit 'super' call arguments and constructor parameters "
-              "do not match."),
+      MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT: const MessageTemplate(
+          MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT,
+          "Implicit 'super' call arguments and constructor parameters "
+          "do not match."),
 
-      MessageKind.CONST_CALLS_NON_CONST:
-        const MessageTemplate(MessageKind.CONST_CALLS_NON_CONST,
+      MessageKind.CONST_CALLS_NON_CONST: const MessageTemplate(
+          MessageKind.CONST_CALLS_NON_CONST,
           "'const' constructor cannot call a non-const constructor."),
 
-      MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT:
-        const MessageTemplate(MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT,
-              "'const' constructor cannot call a non-const constructor. "
-              "This constructor has an implicit call to a "
-              "super non-const constructor.",
-              howToFix: "Try making the super constructor const.",
-              examples: const ["""
+      MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT: const MessageTemplate(
+          MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT,
+          "'const' constructor cannot call a non-const constructor. "
+          "This constructor has an implicit call to a "
+          "super non-const constructor.",
+          howToFix: "Try making the super constructor const.",
+          examples: const [
+            """
 class C {
   C(); // missing const
 }
@@ -1079,123 +1028,119 @@
   final d;
   const D(this.d);
 }
-main() => new D(0);"""]),
+main() => new D(0);"""
+          ]),
 
-      MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS:
-        const MessageTemplate(
+      MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS: const MessageTemplate(
           MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS,
           "Can't declare constructor 'const' on class #{className} "
           "because the class contains non-final instance fields.",
           howToFix: "Try making all fields final.",
-          examples: const ["""
+          examples: const [
+            """
 class C {
   // 'a' must be declared final to allow for the const constructor.
   var a;
   const C(this.a);
 }
 
-main() => new C(0);"""]),
+main() => new C(0);"""
+          ]),
 
       MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD:
-        const MessageTemplate(
-          MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD,
-          "This non-final field prevents using const constructors."),
+          const MessageTemplate(
+              MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD,
+              "This non-final field prevents using const constructors."),
 
       MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR:
-        const MessageTemplate(
-          MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR,
-          "This const constructor is not allowed due to "
-          "non-final fields."),
+          const MessageTemplate(
+              MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR,
+              "This const constructor is not allowed due to "
+              "non-final fields."),
 
-
-      MessageKind.INITIALIZING_FORMAL_NOT_ALLOWED:
-        const MessageTemplate(MessageKind.INITIALIZING_FORMAL_NOT_ALLOWED,
+      MessageKind.INITIALIZING_FORMAL_NOT_ALLOWED: const MessageTemplate(
+          MessageKind.INITIALIZING_FORMAL_NOT_ALLOWED,
           "Initializing formal parameter only allowed in generative "
           "constructor."),
 
-      MessageKind.INVALID_PARAMETER:
-        const MessageTemplate(MessageKind.INVALID_PARAMETER,
-          "Cannot resolve parameter."),
+      MessageKind.INVALID_PARAMETER: const MessageTemplate(
+          MessageKind.INVALID_PARAMETER, "Cannot resolve parameter."),
 
-      MessageKind.NOT_INSTANCE_FIELD:
-        const MessageTemplate(MessageKind.NOT_INSTANCE_FIELD,
+      MessageKind.NOT_INSTANCE_FIELD: const MessageTemplate(
+          MessageKind.NOT_INSTANCE_FIELD,
           "'#{fieldName}' is not an instance field."),
 
-      MessageKind.THIS_PROPERTY:
-        const MessageTemplate(MessageKind.THIS_PROPERTY,
-          "Expected an identifier."),
+      MessageKind.THIS_PROPERTY: const MessageTemplate(
+          MessageKind.THIS_PROPERTY, "Expected an identifier."),
 
-      MessageKind.NO_CATCH_NOR_FINALLY:
-        const MessageTemplate(MessageKind.NO_CATCH_NOR_FINALLY,
-          "Expected 'catch' or 'finally'."),
+      MessageKind.NO_CATCH_NOR_FINALLY: const MessageTemplate(
+          MessageKind.NO_CATCH_NOR_FINALLY, "Expected 'catch' or 'finally'."),
 
-      MessageKind.EMPTY_CATCH_DECLARATION:
-        const MessageTemplate(MessageKind.EMPTY_CATCH_DECLARATION,
+      MessageKind.EMPTY_CATCH_DECLARATION: const MessageTemplate(
+          MessageKind.EMPTY_CATCH_DECLARATION,
           "Expected an identifier in catch declaration."),
 
-      MessageKind.EXTRA_CATCH_DECLARATION:
-        const MessageTemplate(MessageKind.EXTRA_CATCH_DECLARATION,
+      MessageKind.EXTRA_CATCH_DECLARATION: const MessageTemplate(
+          MessageKind.EXTRA_CATCH_DECLARATION,
           "Extra parameter in catch declaration."),
 
-      MessageKind.PARAMETER_WITH_TYPE_IN_CATCH:
-        const MessageTemplate(MessageKind.PARAMETER_WITH_TYPE_IN_CATCH,
+      MessageKind.PARAMETER_WITH_TYPE_IN_CATCH: const MessageTemplate(
+          MessageKind.PARAMETER_WITH_TYPE_IN_CATCH,
           "Cannot use type annotations in catch."),
 
-      MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH:
-        const MessageTemplate(MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH,
+      MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH: const MessageTemplate(
+          MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH,
           "Cannot use modifiers in catch."),
 
-      MessageKind.OPTIONAL_PARAMETER_IN_CATCH:
-        const MessageTemplate(MessageKind.OPTIONAL_PARAMETER_IN_CATCH,
+      MessageKind.OPTIONAL_PARAMETER_IN_CATCH: const MessageTemplate(
+          MessageKind.OPTIONAL_PARAMETER_IN_CATCH,
           "Cannot use optional parameters in catch."),
 
-      MessageKind.UNBOUND_LABEL:
-        const MessageTemplate(MessageKind.UNBOUND_LABEL,
-          "Cannot resolve label '#{labelName}'."),
+      MessageKind.UNBOUND_LABEL: const MessageTemplate(
+          MessageKind.UNBOUND_LABEL, "Cannot resolve label '#{labelName}'."),
 
-      MessageKind.NO_BREAK_TARGET:
-        const MessageTemplate(MessageKind.NO_BREAK_TARGET,
+      MessageKind.NO_BREAK_TARGET: const MessageTemplate(
+          MessageKind.NO_BREAK_TARGET,
           "'break' statement not inside switch or loop."),
 
-      MessageKind.NO_CONTINUE_TARGET:
-        const MessageTemplate(MessageKind.NO_CONTINUE_TARGET,
+      MessageKind.NO_CONTINUE_TARGET: const MessageTemplate(
+          MessageKind.NO_CONTINUE_TARGET,
           "'continue' statement not inside loop."),
 
-      MessageKind.EXISTING_LABEL:
-        const MessageTemplate(MessageKind.EXISTING_LABEL,
+      MessageKind.EXISTING_LABEL: const MessageTemplate(
+          MessageKind.EXISTING_LABEL,
           "Original declaration of duplicate label '#{labelName}'."),
 
-      MessageKind.DUPLICATE_LABEL:
-        const MessageTemplate(MessageKind.DUPLICATE_LABEL,
+      MessageKind.DUPLICATE_LABEL: const MessageTemplate(
+          MessageKind.DUPLICATE_LABEL,
           "Duplicate declaration of label '#{labelName}'."),
 
-      MessageKind.UNUSED_LABEL:
-        const MessageTemplate(MessageKind.UNUSED_LABEL,
-          "Unused label '#{labelName}'."),
+      MessageKind.UNUSED_LABEL: const MessageTemplate(
+          MessageKind.UNUSED_LABEL, "Unused label '#{labelName}'."),
 
-      MessageKind.INVALID_CONTINUE:
-        const MessageTemplate(MessageKind.INVALID_CONTINUE,
+      MessageKind.INVALID_CONTINUE: const MessageTemplate(
+          MessageKind.INVALID_CONTINUE,
           "Target of continue is not a loop or switch case."),
 
-      MessageKind.INVALID_BREAK:
-        const MessageTemplate(MessageKind.INVALID_BREAK,
-          "Target of break is not a statement."),
+      MessageKind.INVALID_BREAK: const MessageTemplate(
+          MessageKind.INVALID_BREAK, "Target of break is not a statement."),
 
-      MessageKind.DUPLICATE_TYPE_VARIABLE_NAME:
-        const MessageTemplate(MessageKind.DUPLICATE_TYPE_VARIABLE_NAME,
+      MessageKind.DUPLICATE_TYPE_VARIABLE_NAME: const MessageTemplate(
+          MessageKind.DUPLICATE_TYPE_VARIABLE_NAME,
           "Type variable '#{typeVariableName}' already declared."),
 
-      MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER:
-        const MessageTemplate(MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
-              "Cannot refer to type variable '#{typeVariableName}' "
-              "within a static member."),
+      MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER: const MessageTemplate(
+          MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+          "Cannot refer to type variable '#{typeVariableName}' "
+          "within a static member."),
 
-      MessageKind.TYPE_VARIABLE_IN_CONSTANT:
-        const MessageTemplate(MessageKind.TYPE_VARIABLE_IN_CONSTANT,
+      MessageKind.TYPE_VARIABLE_IN_CONSTANT: const MessageTemplate(
+          MessageKind.TYPE_VARIABLE_IN_CONSTANT,
           "Constant expressions can't refer to type variables.",
           howToFix: "Try removing the type variable or replacing it with a "
-                    "concrete type.",
-          examples: const ["""
+              "concrete type.",
+          examples: const [
+            """
 class C<T> {
   const C();
 
@@ -1204,194 +1149,209 @@
 
 void main() => new C().m(null);
 """
-]),
+          ]),
 
-      MessageKind.INVALID_TYPE_VARIABLE_BOUND:
-        const MessageTemplate(MessageKind.INVALID_TYPE_VARIABLE_BOUND,
+      MessageKind.INVALID_TYPE_VARIABLE_BOUND: const MessageTemplate(
+          MessageKind.INVALID_TYPE_VARIABLE_BOUND,
           "'#{typeArgument}' is not a subtype of bound '#{bound}' for "
           "type variable '#{typeVariable}' of type '#{thisType}'.",
           howToFix: "Try to change or remove the type argument.",
-          examples: const ["""
+          examples: const [
+            """
 class C<T extends num> {}
 
 // 'String' is not a valid instantiation of T with bound num.'.
 main() => new C<String>();
-"""]),
+"""
+          ]),
 
-      MessageKind.INVALID_USE_OF_SUPER:
-        const MessageTemplate(MessageKind.INVALID_USE_OF_SUPER,
-          "'super' not allowed here."),
+      MessageKind.INVALID_USE_OF_SUPER: const MessageTemplate(
+          MessageKind.INVALID_USE_OF_SUPER, "'super' not allowed here."),
 
-      MessageKind.INVALID_CASE_DEFAULT:
-        const MessageTemplate(MessageKind.INVALID_CASE_DEFAULT,
+      MessageKind.INVALID_CASE_DEFAULT: const MessageTemplate(
+          MessageKind.INVALID_CASE_DEFAULT,
           "'default' only allowed on last case of a switch."),
 
-      MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL:
-        const MessageTemplate(MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL,
+      MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL: const MessageTemplate(
+          MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL,
           "'case' expressions do not all have type '#{type}'."),
 
-      MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE:
-        const MessageTemplate(MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
+      MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE: const MessageTemplate(
+          MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
           "'case' expression of type '#{type}'."),
 
-      MessageKind.SWITCH_CASE_FORBIDDEN:
-        const MessageTemplate(MessageKind.SWITCH_CASE_FORBIDDEN,
+      MessageKind.SWITCH_CASE_FORBIDDEN: const MessageTemplate(
+          MessageKind.SWITCH_CASE_FORBIDDEN,
           "'case' expression may not be of type '#{type}'."),
 
-      MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS:
-        const MessageTemplate(MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
-              "'case' expression type '#{type}' overrides 'operator =='."),
+      MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS: const MessageTemplate(
+          MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
+          "'case' expression type '#{type}' overrides 'operator =='."),
 
-      MessageKind.INVALID_ARGUMENT_AFTER_NAMED:
-        const MessageTemplate(MessageKind.INVALID_ARGUMENT_AFTER_NAMED,
+      MessageKind.INVALID_ARGUMENT_AFTER_NAMED: const MessageTemplate(
+          MessageKind.INVALID_ARGUMENT_AFTER_NAMED,
           "Unnamed argument after named argument."),
 
-      MessageKind.INVALID_AWAIT_FOR_IN:
-        const MessageTemplate(MessageKind.INVALID_AWAIT_FOR_IN,
+      MessageKind.INVALID_AWAIT_FOR_IN: const MessageTemplate(
+          MessageKind.INVALID_AWAIT_FOR_IN,
           "'await' is only supported in methods with an 'async' or "
-              "'async*' body modifier.",
+          "'async*' body modifier.",
           howToFix: "Try adding 'async' or 'async*' to the method body or "
               "removing the 'await' keyword.",
           examples: const [
             """
 main(o) sync* {
   await for (var e in o) {}
-}"""]),
+}"""
+          ]),
 
-      MessageKind.INVALID_AWAIT:
-        const MessageTemplate(MessageKind.INVALID_AWAIT,
+      MessageKind.INVALID_AWAIT: const MessageTemplate(
+          MessageKind.INVALID_AWAIT,
           "'await' is only supported in methods with an 'async' or "
-              "'async*' body modifier.",
+          "'async*' body modifier.",
           howToFix: "Try adding 'async' or 'async*' to the method body.",
           examples: const [
-          """
+            """
 main(o) sync* {
   await null;
-}"""]),
+}"""
+          ]),
 
-      MessageKind.INVALID_YIELD:
-        const MessageTemplate(MessageKind.INVALID_YIELD,
+      MessageKind.INVALID_YIELD: const MessageTemplate(
+          MessageKind.INVALID_YIELD,
           "'yield' is only supported in methods with a 'sync*' or "
-              "'async*' body modifier.",
+          "'async*' body modifier.",
           howToFix: "Try adding 'sync*' or 'async*' to the method body.",
           examples: const [
             """
 main(o) async {
   yield 0;
-}"""]),
+}"""
+          ]),
 
-      MessageKind.NOT_A_COMPILE_TIME_CONSTANT:
-        const MessageTemplate(MessageKind.NOT_A_COMPILE_TIME_CONSTANT,
+      MessageKind.NOT_A_COMPILE_TIME_CONSTANT: const MessageTemplate(
+          MessageKind.NOT_A_COMPILE_TIME_CONSTANT,
           "Not a compile-time constant."),
 
-      MessageKind.DEFERRED_COMPILE_TIME_CONSTANT:
-        const MessageTemplate(MessageKind.DEFERRED_COMPILE_TIME_CONSTANT,
+      MessageKind.DEFERRED_COMPILE_TIME_CONSTANT: const MessageTemplate(
+          MessageKind.DEFERRED_COMPILE_TIME_CONSTANT,
           "A deferred value cannot be used as a compile-time constant."),
 
       MessageKind.DEFERRED_COMPILE_TIME_CONSTANT_CONSTRUCTION:
-        const MessageTemplate(
-          MessageKind.DEFERRED_COMPILE_TIME_CONSTANT_CONSTRUCTION,
-          "A deferred class cannot be used to create a "
-          "compile-time constant."),
+          const MessageTemplate(
+              MessageKind.DEFERRED_COMPILE_TIME_CONSTANT_CONSTRUCTION,
+              "A deferred class cannot be used to create a "
+              "compile-time constant."),
 
-      MessageKind.CYCLIC_COMPILE_TIME_CONSTANTS:
-        const MessageTemplate(MessageKind.CYCLIC_COMPILE_TIME_CONSTANTS,
+      MessageKind.CYCLIC_COMPILE_TIME_CONSTANTS: const MessageTemplate(
+          MessageKind.CYCLIC_COMPILE_TIME_CONSTANTS,
           "Cycle in the compile-time constant computation."),
 
-      MessageKind.CONSTRUCTOR_IS_NOT_CONST:
-        const MessageTemplate(MessageKind.CONSTRUCTOR_IS_NOT_CONST,
+      MessageKind.CONSTRUCTOR_IS_NOT_CONST: const MessageTemplate(
+          MessageKind.CONSTRUCTOR_IS_NOT_CONST,
           "Constructor is not a 'const' constructor."),
 
-      MessageKind.CONST_MAP_KEY_OVERRIDES_EQUALS:
-        const MessageTemplate(MessageKind.CONST_MAP_KEY_OVERRIDES_EQUALS,
-              "Const-map key type '#{type}' overrides 'operator =='."),
+      MessageKind.CONST_MAP_KEY_OVERRIDES_EQUALS: const MessageTemplate(
+          MessageKind.CONST_MAP_KEY_OVERRIDES_EQUALS,
+          "Const-map key type '#{type}' overrides 'operator =='."),
 
-      MessageKind.NO_SUCH_LIBRARY_MEMBER:
-        const MessageTemplate(MessageKind.NO_SUCH_LIBRARY_MEMBER,
+      MessageKind.NO_SUCH_LIBRARY_MEMBER: const MessageTemplate(
+          MessageKind.NO_SUCH_LIBRARY_MEMBER,
           "'#{libraryName}' has no member named '#{memberName}'."),
 
-      MessageKind.CANNOT_INSTANTIATE_TYPEDEF:
-        const MessageTemplate(MessageKind.CANNOT_INSTANTIATE_TYPEDEF,
+      MessageKind.CANNOT_INSTANTIATE_TYPEDEF: const MessageTemplate(
+          MessageKind.CANNOT_INSTANTIATE_TYPEDEF,
           "Cannot instantiate typedef '#{typedefName}'."),
 
-      MessageKind.REQUIRED_PARAMETER_WITH_DEFAULT:
-        const MessageTemplate(MessageKind.REQUIRED_PARAMETER_WITH_DEFAULT,
+      MessageKind.REQUIRED_PARAMETER_WITH_DEFAULT: const MessageTemplate(
+          MessageKind.REQUIRED_PARAMETER_WITH_DEFAULT,
           "Non-optional parameters can't have a default value.",
           howToFix:
-            "Try removing the default value or making the parameter optional.",
-          examples: const ["""
+              "Try removing the default value or making the parameter optional.",
+          examples: const [
+            """
 main() {
   foo(a: 1) => print(a);
   foo(2);
-}""", """
+}""",
+            """
 main() {
   foo(a = 1) => print(a);
   foo(2);
-}"""]),
+}"""
+          ]),
 
-      MessageKind.NAMED_PARAMETER_WITH_EQUALS:
-        const MessageTemplate(MessageKind.NAMED_PARAMETER_WITH_EQUALS,
+      MessageKind.NAMED_PARAMETER_WITH_EQUALS: const MessageTemplate(
+          MessageKind.NAMED_PARAMETER_WITH_EQUALS,
           "Named optional parameters can't use '=' to specify a default "
           "value.",
           howToFix: "Try replacing '=' with ':'.",
-          examples: const ["""
+          examples: const [
+            """
 main() {
   foo({a = 1}) => print(a);
   foo(a: 2);
-}"""]),
+}"""
+          ]),
 
-      MessageKind.POSITIONAL_PARAMETER_WITH_EQUALS:
-        const MessageTemplate(MessageKind.POSITIONAL_PARAMETER_WITH_EQUALS,
+      MessageKind.POSITIONAL_PARAMETER_WITH_EQUALS: const MessageTemplate(
+          MessageKind.POSITIONAL_PARAMETER_WITH_EQUALS,
           "Positional optional parameters can't use ':' to specify a "
           "default value.",
           howToFix: "Try replacing ':' with '='.",
-          examples: const ["""
+          examples: const [
+            """
 main() {
   foo([a: 1]) => print(a);
   foo(2);
-}"""]),
+}"""
+          ]),
 
-      MessageKind.TYPEDEF_FORMAL_WITH_DEFAULT:
-        const MessageTemplate(MessageKind.TYPEDEF_FORMAL_WITH_DEFAULT,
+      MessageKind.TYPEDEF_FORMAL_WITH_DEFAULT: const MessageTemplate(
+          MessageKind.TYPEDEF_FORMAL_WITH_DEFAULT,
           "A parameter of a typedef can't specify a default value.",
-          howToFix:
-            "Try removing the default value.",
-          examples: const ["""
+          howToFix: "Try removing the default value.",
+          examples: const [
+            """
 typedef void F([int arg = 0]);
 
 main() {
   F f;
-}""", """
+}""",
+            """
 typedef void F({int arg: 0});
 
 main() {
   F f;
-}"""]),
+}"""
+          ]),
 
-      MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT:
-        const MessageTemplate(MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT,
+      MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT: const MessageTemplate(
+          MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT,
           "A function type parameter can't specify a default value.",
-          howToFix:
-            "Try removing the default value.",
-          examples: const ["""
+          howToFix: "Try removing the default value.",
+          examples: const [
+            """
 foo(f(int i, [a = 1])) {}
 
 main() {
   foo(1, 2);
-}""", """
+}""",
+            """
 foo(f(int i, {a: 1})) {}
 
 main() {
   foo(1, a: 2);
-}"""]),
+}"""
+          ]),
 
-      MessageKind.REDIRECTING_FACTORY_WITH_DEFAULT:
-        const MessageTemplate(MessageKind.REDIRECTING_FACTORY_WITH_DEFAULT,
+      MessageKind.REDIRECTING_FACTORY_WITH_DEFAULT: const MessageTemplate(
+          MessageKind.REDIRECTING_FACTORY_WITH_DEFAULT,
           "A parameter of a redirecting factory constructor can't specify a "
           "default value.",
-          howToFix:
-            "Try removing the default value.",
-          examples: const ["""
+          howToFix: "Try removing the default value.",
+          examples: const [
+            """
 class A {
   A([a]);
   factory A.foo([a = 1]) = A;
@@ -1399,7 +1359,8 @@
 
 main() {
   new A.foo(1);
-}""", """
+}""",
+            """
 class A {
   A({a});
   factory A.foo({a: 1}) = A;
@@ -1407,849 +1368,879 @@
 
 main() {
   new A.foo(a: 1);
-}"""]),
+}"""
+          ]),
 
-      MessageKind.FORMAL_DECLARED_CONST:
-        const MessageTemplate(MessageKind.FORMAL_DECLARED_CONST,
+      MessageKind.FORMAL_DECLARED_CONST: const MessageTemplate(
+          MessageKind.FORMAL_DECLARED_CONST,
           "A formal parameter can't be declared const.",
           howToFix: "Try removing 'const'.",
-          examples: const ["""
+          examples: const [
+            """
 foo(const x) {}
 main() => foo(42);
-""", """
+""",
+            """
 foo({const x}) {}
 main() => foo(42);
-""", """
+""",
+            """
 foo([const x]) {}
 main() => foo(42);
-"""]),
+"""
+          ]),
 
-      MessageKind.FORMAL_DECLARED_STATIC:
-        const MessageTemplate(MessageKind.FORMAL_DECLARED_STATIC,
+      MessageKind.FORMAL_DECLARED_STATIC: const MessageTemplate(
+          MessageKind.FORMAL_DECLARED_STATIC,
           "A formal parameter can't be declared static.",
           howToFix: "Try removing 'static'.",
-          examples: const ["""
+          examples: const [
+            """
 foo(static x) {}
 main() => foo(42);
-""", """
+""",
+            """
 foo({static x}) {}
 main() => foo(42);
-""", """
+""",
+            """
 foo([static x]) {}
 main() => foo(42);
-"""]),
+"""
+          ]),
 
-      MessageKind.FINAL_FUNCTION_TYPE_PARAMETER:
-        const MessageTemplate(MessageKind.FINAL_FUNCTION_TYPE_PARAMETER,
+      MessageKind.FINAL_FUNCTION_TYPE_PARAMETER: const MessageTemplate(
+          MessageKind.FINAL_FUNCTION_TYPE_PARAMETER,
           "A function type parameter can't be declared final.",
           howToFix: "Try removing 'final'.",
-          examples: const ["""
+          examples: const [
+            """
 foo(final int x(int a)) {}
 main() => foo((y) => 42);
-""", """
+""",
+            """
 foo({final int x(int a)}) {}
 main() => foo((y) => 42);
-""", """
+""",
+            """
 foo([final int x(int a)]) {}
 main() => foo((y) => 42);
-"""]),
+"""
+          ]),
 
-      MessageKind.VAR_FUNCTION_TYPE_PARAMETER:
-        const MessageTemplate(MessageKind.VAR_FUNCTION_TYPE_PARAMETER,
+      MessageKind.VAR_FUNCTION_TYPE_PARAMETER: const MessageTemplate(
+          MessageKind.VAR_FUNCTION_TYPE_PARAMETER,
           "A function type parameter can't be declared with 'var'.",
           howToFix: "Try removing 'var'.",
-          examples: const ["""
+          examples: const [
+            """
 foo(var int x(int a)) {}
 main() => foo((y) => 42);
-""", """
+""",
+            """
 foo({var int x(int a)}) {}
 main() => foo((y) => 42);
-""", """
+""",
+            """
 foo([var int x(int a)]) {}
 main() => foo((y) => 42);
-"""]),
+"""
+          ]),
 
-      MessageKind.CANNOT_INSTANTIATE_TYPE_VARIABLE:
-        const MessageTemplate(MessageKind.CANNOT_INSTANTIATE_TYPE_VARIABLE,
+      MessageKind.CANNOT_INSTANTIATE_TYPE_VARIABLE: const MessageTemplate(
+          MessageKind.CANNOT_INSTANTIATE_TYPE_VARIABLE,
           "Cannot instantiate type variable '#{typeVariableName}'."),
 
-      MessageKind.CYCLIC_TYPE_VARIABLE:
-        const MessageTemplate(MessageKind.CYCLIC_TYPE_VARIABLE,
+      MessageKind.CYCLIC_TYPE_VARIABLE: const MessageTemplate(
+          MessageKind.CYCLIC_TYPE_VARIABLE,
           "Type variable '#{typeVariableName}' is a supertype of itself."),
 
-      MessageKind.CYCLIC_TYPEDEF:
-        const MessageTemplate(MessageKind.CYCLIC_TYPEDEF,
-          "A typedef can't refer to itself.",
+      MessageKind.CYCLIC_TYPEDEF: const MessageTemplate(
+          MessageKind.CYCLIC_TYPEDEF, "A typedef can't refer to itself.",
           howToFix: "Try removing all references to '#{typedefName}' "
-                    "in the definition of '#{typedefName}'.",
-          examples: const ["""
+              "in the definition of '#{typedefName}'.",
+          examples: const [
+            """
 typedef F F(); // The return type 'F' is a self-reference.
-main() { F f = null; }"""]),
+main() { F f = null; }"""
+          ]),
 
-      MessageKind.CYCLIC_TYPEDEF_ONE:
-        const MessageTemplate(MessageKind.CYCLIC_TYPEDEF_ONE,
+      MessageKind.CYCLIC_TYPEDEF_ONE: const MessageTemplate(
+          MessageKind.CYCLIC_TYPEDEF_ONE,
           "A typedef can't refer to itself through another typedef.",
-          howToFix:
-            "Try removing all references to "
-            "'#{otherTypedefName}' in the definition of '#{typedefName}'.",
-          examples: const ["""
+          howToFix: "Try removing all references to "
+              "'#{otherTypedefName}' in the definition of '#{typedefName}'.",
+          examples: const [
+            """
 typedef G F(); // The return type 'G' is a self-reference through typedef 'G'.
 typedef F G(); // The return type 'F' is a self-reference through typedef 'F'.
 main() { F f = null; }""",
-"""
+            """
 typedef G F(); // The return type 'G' creates a self-reference.
 typedef H G(); // The return type 'H' creates a self-reference.
 typedef H(F f); // The argument type 'F' creates a self-reference.
-main() { F f = null; }"""]),
+main() { F f = null; }"""
+          ]),
 
-      MessageKind.CLASS_NAME_EXPECTED:
-        const MessageTemplate(MessageKind.CLASS_NAME_EXPECTED,
-          "Class name expected."),
+      MessageKind.CLASS_NAME_EXPECTED: const MessageTemplate(
+          MessageKind.CLASS_NAME_EXPECTED, "Class name expected."),
 
-      MessageKind.CANNOT_EXTEND:
-        const MessageTemplate(MessageKind.CANNOT_EXTEND,
-          "'#{type}' cannot be extended."),
+      MessageKind.CANNOT_EXTEND: const MessageTemplate(
+          MessageKind.CANNOT_EXTEND, "'#{type}' cannot be extended."),
 
-      MessageKind.CANNOT_IMPLEMENT:
-        const MessageTemplate(MessageKind.CANNOT_IMPLEMENT,
-          "'#{type}' cannot be implemented."),
+      MessageKind.CANNOT_IMPLEMENT: const MessageTemplate(
+          MessageKind.CANNOT_IMPLEMENT, "'#{type}' cannot be implemented."),
 
       // TODO(johnnwinther): Split messages into reasons for malformedness.
-      MessageKind.CANNOT_EXTEND_MALFORMED:
-        const MessageTemplate(MessageKind.CANNOT_EXTEND_MALFORMED,
+      MessageKind.CANNOT_EXTEND_MALFORMED: const MessageTemplate(
+          MessageKind.CANNOT_EXTEND_MALFORMED,
           "Class '#{className}' can't extend the type '#{malformedType}' "
           "because it is malformed.",
           howToFix:
-            "Try correcting the malformed type annotation or removing the "
-            "'extends' clause.",
-          examples: const ["""
+              "Try correcting the malformed type annotation or removing the "
+              "'extends' clause.",
+          examples: const [
+            """
 class A extends Malformed {}
-main() => new A();"""]),
+main() => new A();"""
+          ]),
 
-      MessageKind.CANNOT_IMPLEMENT_MALFORMED:
-        const MessageTemplate(MessageKind.CANNOT_IMPLEMENT_MALFORMED,
+      MessageKind.CANNOT_IMPLEMENT_MALFORMED: const MessageTemplate(
+          MessageKind.CANNOT_IMPLEMENT_MALFORMED,
           "Class '#{className}' can't implement the type '#{malformedType}' "
           "because it is malformed.",
           howToFix:
-            "Try correcting the malformed type annotation or removing the "
-            "type from the 'implements' clause.",
-          examples: const ["""
+              "Try correcting the malformed type annotation or removing the "
+              "type from the 'implements' clause.",
+          examples: const [
+            """
 class A implements Malformed {}
-main() => new A();"""]),
+main() => new A();"""
+          ]),
 
-      MessageKind.CANNOT_MIXIN_MALFORMED:
-        const MessageTemplate(MessageKind.CANNOT_MIXIN_MALFORMED,
+      MessageKind.CANNOT_MIXIN_MALFORMED: const MessageTemplate(
+          MessageKind.CANNOT_MIXIN_MALFORMED,
           "Class '#{className}' can't mixin the type '#{malformedType}' "
           "because it is malformed.",
           howToFix:
-            "Try correcting the malformed type annotation or removing the "
-            "type from the 'with' clause.",
-          examples: const ["""
+              "Try correcting the malformed type annotation or removing the "
+              "type from the 'with' clause.",
+          examples: const [
+            """
 class A extends Object with Malformed {}
-main() => new A();"""]),
+main() => new A();"""
+          ]),
 
-      MessageKind.CANNOT_MIXIN:
-        const MessageTemplate(MessageKind.CANNOT_MIXIN,
-          "The type '#{type}' can't be mixed in.",
+      MessageKind.CANNOT_MIXIN: const MessageTemplate(
+          MessageKind.CANNOT_MIXIN, "The type '#{type}' can't be mixed in.",
           howToFix: "Try removing '#{type}' from the 'with' clause.",
-          examples: const ["""
+          examples: const [
+            """
 class C extends Object with String {}
 
 main() => new C();
-""", """
+""",
+            """
 typedef C = Object with String;
 
 main() => new C();
-"""]),
+"""
+          ]),
 
-      MessageKind.CANNOT_EXTEND_ENUM:
-        const MessageTemplate(MessageKind.CANNOT_EXTEND_ENUM,
+      MessageKind.CANNOT_EXTEND_ENUM: const MessageTemplate(
+          MessageKind.CANNOT_EXTEND_ENUM,
           "Class '#{className}' can't extend the type '#{enumType}' because "
           "it is declared by an enum.",
           howToFix: "Try making '#{enumType}' a normal class or removing the "
-            "'extends' clause.",
-          examples: const ["""
+              "'extends' clause.",
+          examples: const [
+            """
 enum Enum { A }
 class B extends Enum {}
-main() => new B();"""]),
+main() => new B();"""
+          ]),
 
-      MessageKind.CANNOT_IMPLEMENT_ENUM:
-        const MessageTemplate(MessageKind.CANNOT_IMPLEMENT_ENUM,
+      MessageKind.CANNOT_IMPLEMENT_ENUM: const MessageTemplate(
+          MessageKind.CANNOT_IMPLEMENT_ENUM,
           "Class '#{className}' can't implement the type '#{enumType}' "
           "because it is declared by an enum.",
           howToFix: "Try making '#{enumType}' a normal class or removing the "
-            "type from the 'implements' clause.",
-          examples: const ["""
+              "type from the 'implements' clause.",
+          examples: const [
+            """
 enum Enum { A }
 class B implements Enum {}
-main() => new B();"""]),
+main() => new B();"""
+          ]),
 
-      MessageKind.CANNOT_MIXIN_ENUM:
-        const MessageTemplate(MessageKind.CANNOT_MIXIN_ENUM,
+      MessageKind.CANNOT_MIXIN_ENUM: const MessageTemplate(
+          MessageKind.CANNOT_MIXIN_ENUM,
           "Class '#{className}' can't mixin the type '#{enumType}' because it "
           "is declared by an enum.",
           howToFix: "Try making '#{enumType}' a normal class or removing the "
-            "type from the 'with' clause.",
-          examples: const ["""
+              "type from the 'with' clause.",
+          examples: const [
+            """
 enum Enum { A }
 class B extends Object with Enum {}
-main() => new B();"""]),
+main() => new B();"""
+          ]),
 
-      MessageKind.CANNOT_INSTANTIATE_ENUM:
-        const MessageTemplate(MessageKind.CANNOT_INSTANTIATE_ENUM,
+      MessageKind.CANNOT_INSTANTIATE_ENUM: const MessageTemplate(
+          MessageKind.CANNOT_INSTANTIATE_ENUM,
           "Enum type '#{enumName}' cannot be instantiated.",
           howToFix: "Try making '#{enumType}' a normal class or use an enum "
-                    "constant.",
-          examples: const ["""
+              "constant.",
+          examples: const [
+            """
 enum Enum { A }
-main() => new Enum(0);""", """
+main() => new Enum(0);""",
+            """
 enum Enum { A }
-main() => const Enum(0);"""]),
+main() => const Enum(0);"""
+          ]),
 
-      MessageKind.EMPTY_ENUM_DECLARATION:
-        const MessageTemplate(MessageKind.EMPTY_ENUM_DECLARATION,
+      MessageKind.EMPTY_ENUM_DECLARATION: const MessageTemplate(
+          MessageKind.EMPTY_ENUM_DECLARATION,
           "Enum '#{enumName}' must contain at least one value.",
           howToFix: "Try adding an enum constant or making #{enumName} a "
-                    "normal class.",
-          examples: const ["""
+              "normal class.",
+          examples: const [
+            """
 enum Enum {}
-main() { Enum e; }"""]),
+main() { Enum e; }"""
+          ]),
 
-      MessageKind.MISSING_ENUM_CASES:
-        const MessageTemplate(MessageKind.MISSING_ENUM_CASES,
+      MessageKind.MISSING_ENUM_CASES: const MessageTemplate(
+          MessageKind.MISSING_ENUM_CASES,
           "Missing enum constants in switch statement: #{enumValues}.",
           howToFix: "Try adding the missing constants or a default case.",
-          examples: const ["""
+          examples: const [
+            """
 enum Enum { A, B }
 main() {
   switch (Enum.A) {
   case Enum.B: break;
   }
-}""", """
+}""",
+            """
 enum Enum { A, B, C }
 main() {
   switch (Enum.A) {
   case Enum.B: break;
   }
-}"""]),
+}"""
+          ]),
 
-      MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS:
-        const MessageTemplate(MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS,
+      MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS: const MessageTemplate(
+          MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS,
           "'#{type}' can not be both extended and implemented."),
 
-      MessageKind.DUPLICATE_IMPLEMENTS:
-        const MessageTemplate(MessageKind.DUPLICATE_IMPLEMENTS,
+      MessageKind.DUPLICATE_IMPLEMENTS: const MessageTemplate(
+          MessageKind.DUPLICATE_IMPLEMENTS,
           "'#{type}' must not occur more than once "
           "in the implements clause."),
 
-      MessageKind.MULTI_INHERITANCE:
-        const MessageTemplate(MessageKind.MULTI_INHERITANCE,
+      MessageKind.MULTI_INHERITANCE: const MessageTemplate(
+          MessageKind.MULTI_INHERITANCE,
           "Dart2js does not currently support inheritance of the same class "
           "with different type arguments: Both #{firstType} and #{secondType} "
           "are supertypes of #{thisType}."),
 
-      MessageKind.ILLEGAL_SUPER_SEND:
-        const MessageTemplate(MessageKind.ILLEGAL_SUPER_SEND,
+      MessageKind.ILLEGAL_SUPER_SEND: const MessageTemplate(
+          MessageKind.ILLEGAL_SUPER_SEND,
           "'#{name}' cannot be called on super."),
 
-      MessageKind.NO_SUCH_SUPER_MEMBER:
-        const MessageTemplate(MessageKind.NO_SUCH_SUPER_MEMBER,
-          "Cannot resolve '#{memberName}' in a superclass of '#{className}'."),
+      MessageKind.ADDITIONAL_TYPE_ARGUMENT: const MessageTemplate(
+          MessageKind.ADDITIONAL_TYPE_ARGUMENT, "Additional type argument."),
 
-      MessageKind.ADDITIONAL_TYPE_ARGUMENT:
-        const MessageTemplate(MessageKind.ADDITIONAL_TYPE_ARGUMENT,
-          "Additional type argument."),
-
-      MessageKind.MISSING_TYPE_ARGUMENT:
-        const MessageTemplate(MessageKind.MISSING_TYPE_ARGUMENT,
-          "Missing type argument."),
+      MessageKind.MISSING_TYPE_ARGUMENT: const MessageTemplate(
+          MessageKind.MISSING_TYPE_ARGUMENT, "Missing type argument."),
 
       // TODO(johnniwinther): Use ADDITIONAL_TYPE_ARGUMENT or
       // MISSING_TYPE_ARGUMENT instead.
-      MessageKind.TYPE_ARGUMENT_COUNT_MISMATCH:
-        const MessageTemplate(MessageKind.TYPE_ARGUMENT_COUNT_MISMATCH,
+      MessageKind.TYPE_ARGUMENT_COUNT_MISMATCH: const MessageTemplate(
+          MessageKind.TYPE_ARGUMENT_COUNT_MISMATCH,
           "Incorrect number of type arguments on '#{type}'."),
 
-      MessageKind.GETTER_MISMATCH:
-        const MessageTemplate(MessageKind.GETTER_MISMATCH,
-          "Setter disagrees on: '#{modifiers}'."),
+      MessageKind.GETTER_MISMATCH: const MessageTemplate(
+          MessageKind.GETTER_MISMATCH, "Setter disagrees on: '#{modifiers}'."),
 
-      MessageKind.SETTER_MISMATCH:
-        const MessageTemplate(MessageKind.SETTER_MISMATCH,
-          "Getter disagrees on: '#{modifiers}'."),
+      MessageKind.SETTER_MISMATCH: const MessageTemplate(
+          MessageKind.SETTER_MISMATCH, "Getter disagrees on: '#{modifiers}'."),
 
-      MessageKind.ILLEGAL_SETTER_FORMALS:
-        const MessageTemplate(MessageKind.ILLEGAL_SETTER_FORMALS,
+      MessageKind.ILLEGAL_SETTER_FORMALS: const MessageTemplate(
+          MessageKind.ILLEGAL_SETTER_FORMALS,
           "A setter must have exactly one argument."),
 
-      MessageKind.NO_STATIC_OVERRIDE:
-        const MessageTemplate(MessageKind.NO_STATIC_OVERRIDE,
+      MessageKind.NO_STATIC_OVERRIDE: const MessageTemplate(
+          MessageKind.NO_STATIC_OVERRIDE,
           "Static member cannot override instance member '#{memberName}' of "
           "'#{className}'."),
 
-      MessageKind.NO_STATIC_OVERRIDE_CONT:
-        const MessageTemplate(MessageKind.NO_STATIC_OVERRIDE_CONT,
+      MessageKind.NO_STATIC_OVERRIDE_CONT: const MessageTemplate(
+          MessageKind.NO_STATIC_OVERRIDE_CONT,
           "This is the instance member that cannot be overridden "
           "by a static member."),
 
-      MessageKind.INSTANCE_STATIC_SAME_NAME:
-        const MessageTemplate(MessageKind.INSTANCE_STATIC_SAME_NAME,
+      MessageKind.INSTANCE_STATIC_SAME_NAME: const MessageTemplate(
+          MessageKind.INSTANCE_STATIC_SAME_NAME,
           "Instance member '#{memberName}' and static member of "
           "superclass '#{className}' have the same name."),
 
-      MessageKind.INSTANCE_STATIC_SAME_NAME_CONT:
-        const MessageTemplate(MessageKind.INSTANCE_STATIC_SAME_NAME_CONT,
+      MessageKind.INSTANCE_STATIC_SAME_NAME_CONT: const MessageTemplate(
+          MessageKind.INSTANCE_STATIC_SAME_NAME_CONT,
           "This is the static member with the same name."),
 
-      MessageKind.INVALID_OVERRIDE_METHOD:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDE_METHOD,
+      MessageKind.INVALID_OVERRIDE_METHOD: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDE_METHOD,
           "The type '#{declaredType}' of method '#{name}' declared in "
           "'#{class}' is not a subtype of the overridden method type "
           "'#{inheritedType}' inherited from '#{inheritedClass}'."),
 
-      MessageKind.INVALID_OVERRIDDEN_METHOD:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDDEN_METHOD,
+      MessageKind.INVALID_OVERRIDDEN_METHOD: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDDEN_METHOD,
           "This is the overridden method '#{name}' declared in class "
           "'#{class}'."),
 
-      MessageKind.INVALID_OVERRIDE_GETTER:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDE_GETTER,
+      MessageKind.INVALID_OVERRIDE_GETTER: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDE_GETTER,
           "The type '#{declaredType}' of getter '#{name}' declared in "
           "'#{class}' is not assignable to the type '#{inheritedType}' of the "
           "overridden getter inherited from '#{inheritedClass}'."),
 
-      MessageKind.INVALID_OVERRIDDEN_GETTER:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDDEN_GETTER,
+      MessageKind.INVALID_OVERRIDDEN_GETTER: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDDEN_GETTER,
           "This is the overridden getter '#{name}' declared in class "
           "'#{class}'."),
 
-      MessageKind.INVALID_OVERRIDE_GETTER_WITH_FIELD:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDE_GETTER_WITH_FIELD,
+      MessageKind.INVALID_OVERRIDE_GETTER_WITH_FIELD: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDE_GETTER_WITH_FIELD,
           "The type '#{declaredType}' of field '#{name}' declared in "
           "'#{class}' is not assignable to the type '#{inheritedType}' of the "
           "overridden getter inherited from '#{inheritedClass}'."),
 
-      MessageKind.INVALID_OVERRIDE_FIELD_WITH_GETTER:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDE_FIELD_WITH_GETTER,
+      MessageKind.INVALID_OVERRIDE_FIELD_WITH_GETTER: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDE_FIELD_WITH_GETTER,
           "The type '#{declaredType}' of getter '#{name}' declared in "
           "'#{class}' is not assignable to the type '#{inheritedType}' of the "
           "overridden field inherited from '#{inheritedClass}'."),
 
-      MessageKind.INVALID_OVERRIDE_SETTER:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDE_SETTER,
+      MessageKind.INVALID_OVERRIDE_SETTER: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDE_SETTER,
           "The type '#{declaredType}' of setter '#{name}' declared in "
           "'#{class}' is not assignable to the type '#{inheritedType}' of the "
           "overridden setter inherited from '#{inheritedClass}'."),
 
-      MessageKind.INVALID_OVERRIDDEN_SETTER:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDDEN_SETTER,
+      MessageKind.INVALID_OVERRIDDEN_SETTER: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDDEN_SETTER,
           "This is the overridden setter '#{name}' declared in class "
           "'#{class}'."),
 
-      MessageKind.INVALID_OVERRIDE_SETTER_WITH_FIELD:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDE_SETTER_WITH_FIELD,
+      MessageKind.INVALID_OVERRIDE_SETTER_WITH_FIELD: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDE_SETTER_WITH_FIELD,
           "The type '#{declaredType}' of field '#{name}' declared in "
           "'#{class}' is not assignable to the type '#{inheritedType}' of the "
           "overridden setter inherited from '#{inheritedClass}'."),
 
-      MessageKind.INVALID_OVERRIDE_FIELD_WITH_SETTER:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDE_FIELD_WITH_SETTER,
+      MessageKind.INVALID_OVERRIDE_FIELD_WITH_SETTER: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDE_FIELD_WITH_SETTER,
           "The type '#{declaredType}' of setter '#{name}' declared in "
           "'#{class}' is not assignable to the type '#{inheritedType}' of the "
           "overridden field inherited from '#{inheritedClass}'."),
 
-      MessageKind.INVALID_OVERRIDE_FIELD:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDE_FIELD,
+      MessageKind.INVALID_OVERRIDE_FIELD: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDE_FIELD,
           "The type '#{declaredType}' of field '#{name}' declared in "
           "'#{class}' is not assignable to the type '#{inheritedType}' of the "
           "overridden field inherited from '#{inheritedClass}'."),
 
-      MessageKind.INVALID_OVERRIDDEN_FIELD:
-        const MessageTemplate(MessageKind.INVALID_OVERRIDDEN_FIELD,
+      MessageKind.INVALID_OVERRIDDEN_FIELD: const MessageTemplate(
+          MessageKind.INVALID_OVERRIDDEN_FIELD,
           "This is the overridden field '#{name}' declared in class "
           "'#{class}'."),
 
-      MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD:
-        const MessageTemplate(MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD,
+      MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD: const MessageTemplate(
+          MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD,
           "Method '#{name}' in '#{class}' can't override field from "
           "'#{inheritedClass}'."),
 
-      MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT:
-        const MessageTemplate(
+      MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT: const MessageTemplate(
           MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT,
           "This is the field that cannot be overridden by a method."),
 
-      MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD:
-        const MessageTemplate(
+      MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD: const MessageTemplate(
           MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD,
           "Field '#{name}' in '#{class}' can't override method from "
           "'#{inheritedClass}'."),
 
-      MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT:
-        const MessageTemplate(
+      MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT: const MessageTemplate(
           MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT,
           "This is the method that cannot be overridden by a field."),
 
-      MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD:
-        const MessageTemplate(MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD,
-              "Method '#{name}' in '#{class}' can't override getter from "
-              "'#{inheritedClass}'."),
+      MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD: const MessageTemplate(
+          MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD,
+          "Method '#{name}' in '#{class}' can't override getter from "
+          "'#{inheritedClass}'."),
 
       MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD_CONT:
-        const MessageTemplate(
-          MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD_CONT,
-          "This is the getter that cannot be overridden by a method."),
+          const MessageTemplate(
+              MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD_CONT,
+              "This is the getter that cannot be overridden by a method."),
 
-      MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER:
-        const MessageTemplate(MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER,
+      MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER: const MessageTemplate(
+          MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER,
           "Getter '#{name}' in '#{class}' can't override method from "
           "'#{inheritedClass}'."),
 
       MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER_CONT:
-        const MessageTemplate(
-          MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER_CONT,
-          "This is the method that cannot be overridden by a getter."),
+          const MessageTemplate(
+              MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER_CONT,
+              "This is the method that cannot be overridden by a getter."),
 
-      MessageKind.MISSING_FORMALS:
-        const MessageTemplate(MessageKind.MISSING_FORMALS,
-          "Formal parameters are missing."),
+      MessageKind.MISSING_FORMALS: const MessageTemplate(
+          MessageKind.MISSING_FORMALS, "Formal parameters are missing."),
 
-      MessageKind.EXTRA_FORMALS:
-        const MessageTemplate(MessageKind.EXTRA_FORMALS,
-          "Formal parameters are not allowed here."),
+      MessageKind.EXTRA_FORMALS: const MessageTemplate(
+          MessageKind.EXTRA_FORMALS, "Formal parameters are not allowed here."),
 
-      MessageKind.UNARY_OPERATOR_BAD_ARITY:
-        const MessageTemplate(MessageKind.UNARY_OPERATOR_BAD_ARITY,
+      MessageKind.UNARY_OPERATOR_BAD_ARITY: const MessageTemplate(
+          MessageKind.UNARY_OPERATOR_BAD_ARITY,
           "Operator '#{operatorName}' must have no parameters."),
 
-      MessageKind.MINUS_OPERATOR_BAD_ARITY:
-        const MessageTemplate(MessageKind.MINUS_OPERATOR_BAD_ARITY,
+      MessageKind.MINUS_OPERATOR_BAD_ARITY: const MessageTemplate(
+          MessageKind.MINUS_OPERATOR_BAD_ARITY,
           "Operator '-' must have 0 or 1 parameters."),
 
-      MessageKind.BINARY_OPERATOR_BAD_ARITY:
-        const MessageTemplate(MessageKind.BINARY_OPERATOR_BAD_ARITY,
+      MessageKind.BINARY_OPERATOR_BAD_ARITY: const MessageTemplate(
+          MessageKind.BINARY_OPERATOR_BAD_ARITY,
           "Operator '#{operatorName}' must have exactly 1 parameter."),
 
-      MessageKind.TERNARY_OPERATOR_BAD_ARITY:
-        const MessageTemplate(MessageKind.TERNARY_OPERATOR_BAD_ARITY,
+      MessageKind.TERNARY_OPERATOR_BAD_ARITY: const MessageTemplate(
+          MessageKind.TERNARY_OPERATOR_BAD_ARITY,
           "Operator '#{operatorName}' must have exactly 2 parameters."),
 
-      MessageKind.OPERATOR_OPTIONAL_PARAMETERS:
-        const MessageTemplate(MessageKind.OPERATOR_OPTIONAL_PARAMETERS,
+      MessageKind.OPERATOR_OPTIONAL_PARAMETERS: const MessageTemplate(
+          MessageKind.OPERATOR_OPTIONAL_PARAMETERS,
           "Operator '#{operatorName}' cannot have optional parameters."),
 
-      MessageKind.OPERATOR_NAMED_PARAMETERS:
-        const MessageTemplate(MessageKind.OPERATOR_NAMED_PARAMETERS,
+      MessageKind.OPERATOR_NAMED_PARAMETERS: const MessageTemplate(
+          MessageKind.OPERATOR_NAMED_PARAMETERS,
           "Operator '#{operatorName}' cannot have named parameters."),
 
-      MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER:
-        const MessageTemplate(MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER,
+      MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER: const MessageTemplate(
+          MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER,
           "Cannot have final modifier on method."),
 
-      MessageKind.ILLEGAL_CONST_FIELD_MODIFIER:
-        const MessageTemplate(MessageKind.ILLEGAL_CONST_FIELD_MODIFIER,
+      MessageKind.ILLEGAL_CONST_FIELD_MODIFIER: const MessageTemplate(
+          MessageKind.ILLEGAL_CONST_FIELD_MODIFIER,
           "Cannot have const modifier on non-static field.",
           howToFix:
-            "Try adding a static modifier, or removing the const modifier.",
-          examples: const ["""
+              "Try adding a static modifier, or removing the const modifier.",
+          examples: const [
+            """
 class C {
   const int a = 1;
 }
 
-main() => new C();"""]),
+main() => new C();"""
+          ]),
 
-      MessageKind.ILLEGAL_CONSTRUCTOR_MODIFIERS:
-        const MessageTemplate(MessageKind.ILLEGAL_CONSTRUCTOR_MODIFIERS,
+      MessageKind.ILLEGAL_CONSTRUCTOR_MODIFIERS: const MessageTemplate(
+          MessageKind.ILLEGAL_CONSTRUCTOR_MODIFIERS,
           "Illegal constructor modifiers: '#{modifiers}'."),
 
-      MessageKind.ILLEGAL_MIXIN_APPLICATION_MODIFIERS:
-        const MessageTemplate(MessageKind.ILLEGAL_MIXIN_APPLICATION_MODIFIERS,
-              "Illegal mixin application modifiers: '#{modifiers}'."),
+      MessageKind.ILLEGAL_MIXIN_APPLICATION_MODIFIERS: const MessageTemplate(
+          MessageKind.ILLEGAL_MIXIN_APPLICATION_MODIFIERS,
+          "Illegal mixin application modifiers: '#{modifiers}'."),
 
-      MessageKind.ILLEGAL_MIXIN_SUPERCLASS:
-        const MessageTemplate(MessageKind.ILLEGAL_MIXIN_SUPERCLASS,
+      MessageKind.ILLEGAL_MIXIN_SUPERCLASS: const MessageTemplate(
+          MessageKind.ILLEGAL_MIXIN_SUPERCLASS,
           "Class used as mixin must have Object as superclass."),
 
-      MessageKind.ILLEGAL_MIXIN_OBJECT:
-        const MessageTemplate(MessageKind.ILLEGAL_MIXIN_OBJECT,
-          "Cannot use Object as mixin."),
+      MessageKind.ILLEGAL_MIXIN_OBJECT: const MessageTemplate(
+          MessageKind.ILLEGAL_MIXIN_OBJECT, "Cannot use Object as mixin."),
 
-      MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR:
-        const MessageTemplate(MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR,
+      MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR: const MessageTemplate(
+          MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR,
           "Class used as mixin cannot have non-factory constructor."),
 
-      MessageKind.ILLEGAL_MIXIN_CYCLE:
-        const MessageTemplate(MessageKind.ILLEGAL_MIXIN_CYCLE,
+      MessageKind.ILLEGAL_MIXIN_CYCLE: const MessageTemplate(
+          MessageKind.ILLEGAL_MIXIN_CYCLE,
           "Class used as mixin introduces mixin cycle: "
           "'#{mixinName1}' <-> '#{mixinName2}'."),
 
-      MessageKind.ILLEGAL_MIXIN_WITH_SUPER:
-        const MessageTemplate(MessageKind.ILLEGAL_MIXIN_WITH_SUPER,
+      MessageKind.ILLEGAL_MIXIN_WITH_SUPER: const MessageTemplate(
+          MessageKind.ILLEGAL_MIXIN_WITH_SUPER,
           "Cannot use class '#{className}' as a mixin because it uses "
           "'super'."),
 
-      MessageKind.ILLEGAL_MIXIN_SUPER_USE:
-        const MessageTemplate(MessageKind.ILLEGAL_MIXIN_SUPER_USE,
+      MessageKind.ILLEGAL_MIXIN_SUPER_USE: const MessageTemplate(
+          MessageKind.ILLEGAL_MIXIN_SUPER_USE,
           "Use of 'super' in class used as mixin."),
 
-      MessageKind.PARAMETER_NAME_EXPECTED:
-        const MessageTemplate(MessageKind.PARAMETER_NAME_EXPECTED,
-          "parameter name expected."),
+      MessageKind.PARAMETER_NAME_EXPECTED: const MessageTemplate(
+          MessageKind.PARAMETER_NAME_EXPECTED, "parameter name expected."),
 
-      MessageKind.CANNOT_RESOLVE_GETTER:
-        const MessageTemplate(MessageKind.CANNOT_RESOLVE_GETTER,
-          "Cannot resolve getter."),
-
-      MessageKind.CANNOT_RESOLVE_SETTER:
-        const MessageTemplate(MessageKind.CANNOT_RESOLVE_SETTER,
+      MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER: const MessageTemplate(
+          MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER,
           "Cannot resolve setter."),
 
-      MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER:
-        const MessageTemplate(MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
+      MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER: const MessageTemplate(
+          MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
           "Cannot assign a value to final field '#{name}' "
           "in superclass '#{superclassName}'."),
 
-      MessageKind.ASSIGNING_METHOD:
-        const MessageTemplate(MessageKind.ASSIGNING_METHOD,
-          "Cannot assign a value to a method."),
+      MessageKind.ASSIGNING_METHOD: const MessageTemplate(
+          MessageKind.ASSIGNING_METHOD, "Cannot assign a value to a method."),
 
-      MessageKind.ASSIGNING_METHOD_IN_SUPER:
-        const MessageTemplate(MessageKind.ASSIGNING_METHOD_IN_SUPER,
+      MessageKind.ASSIGNING_METHOD_IN_SUPER: const MessageTemplate(
+          MessageKind.ASSIGNING_METHOD_IN_SUPER,
           "Cannot assign a value to method '#{name}' "
           "in superclass '#{superclassName}'."),
 
-      MessageKind.ASSIGNING_TYPE:
-        const MessageTemplate(MessageKind.ASSIGNING_TYPE,
-          "Cannot assign a value to a type."),
+      MessageKind.ASSIGNING_TYPE: const MessageTemplate(
+          MessageKind.ASSIGNING_TYPE, "Cannot assign a value to a type."),
 
-      MessageKind.IF_NULL_ASSIGNING_TYPE:
-        const MessageTemplate(MessageKind.IF_NULL_ASSIGNING_TYPE,
+      MessageKind.IF_NULL_ASSIGNING_TYPE: const MessageTemplate(
+          MessageKind.IF_NULL_ASSIGNING_TYPE,
           "Cannot assign a value to a type. Note that types are never null, "
           "so this ??= assignment has no effect.",
           howToFix: "Try removing the '??=' assignment.",
-          examples: const [
-              "class A {} main() { print(A ??= 3);}",
-          ]),
+          examples: const ["class A {} main() { print(A ??= 3);}",]),
 
-      MessageKind.VOID_NOT_ALLOWED:
-        const MessageTemplate(MessageKind.VOID_NOT_ALLOWED,
+      MessageKind.VOID_NOT_ALLOWED: const MessageTemplate(
+          MessageKind.VOID_NOT_ALLOWED,
           "Type 'void' can't be used here because it isn't a return type.",
           howToFix:
-            "Try removing 'void' keyword or replace it with 'var', 'final', "
-            "or a type.",
+              "Try removing 'void' keyword or replace it with 'var', 'final', "
+              "or a type.",
           examples: const [
-              "void x; main() {}",
-              "foo(void x) {} main() { foo(null); }",
+            "void x; main() {}",
+            "foo(void x) {} main() { foo(null); }",
           ]),
 
-      MessageKind.NULL_NOT_ALLOWED:
-        const MessageTemplate(MessageKind.NULL_NOT_ALLOWED,
-          "`null` can't be used here."),
+      MessageKind.NULL_NOT_ALLOWED: const MessageTemplate(
+          MessageKind.NULL_NOT_ALLOWED, "`null` can't be used here."),
 
-      MessageKind.BEFORE_TOP_LEVEL:
-        const MessageTemplate(MessageKind.BEFORE_TOP_LEVEL,
+      MessageKind.BEFORE_TOP_LEVEL: const MessageTemplate(
+          MessageKind.BEFORE_TOP_LEVEL,
           "Part header must come before top-level definitions."),
 
-      MessageKind.IMPORT_PART_OF:
-        const MessageTemplate(MessageKind.IMPORT_PART_OF,
+      MessageKind.IMPORT_PART_OF: const MessageTemplate(
+          MessageKind.IMPORT_PART_OF,
           "The imported library must not have a 'part-of' directive.",
           howToFix: "Try removing the 'part-of' directive or replacing the "
-                    "import of the library with a 'part' directive.",
-          examples: const [const {
-'main.dart': """
+              "import of the library with a 'part' directive.",
+          examples: const [
+            const {
+              'main.dart': """
 library library;
 
 import 'part.dart';
 
 main() {}
 """,
-
-'part.dart': """
+              'part.dart': """
 part of library;
-"""}]),
+"""
+            }
+          ]),
 
-      MessageKind.IMPORT_PART_OF_HERE:
-        const MessageTemplate(MessageKind.IMPORT_PART_OF_HERE,
-          "The library is imported here."),
+      MessageKind.IMPORT_PART_OF_HERE: const MessageTemplate(
+          MessageKind.IMPORT_PART_OF_HERE, "The library is imported here."),
 
-      MessageKind.MAIN_HAS_PART_OF:
-        const MessageTemplate(MessageKind.MAIN_HAS_PART_OF,
+      MessageKind.MAIN_HAS_PART_OF: const MessageTemplate(
+          MessageKind.MAIN_HAS_PART_OF,
           "The main application file must not have a 'part-of' directive.",
-          howToFix:  "Try removing the 'part-of' directive or starting "
+          howToFix: "Try removing the 'part-of' directive or starting "
               "compilation from another file.",
-          examples: const [const {
-'main.dart': """
+          examples: const [
+            const {
+              'main.dart': """
 part of library;
 
 main() {}
-"""}]),
+"""
+            }
+          ]),
 
-      MessageKind.LIBRARY_NAME_MISMATCH:
-        const MessageTemplate(MessageKind.LIBRARY_NAME_MISMATCH,
+      MessageKind.LIBRARY_NAME_MISMATCH: const MessageTemplate(
+          MessageKind.LIBRARY_NAME_MISMATCH,
           "Expected part of library name '#{libraryName}'.",
           howToFix: "Try changing the directive to 'part of #{libraryName};'.",
-          examples: const [const {
-'main.dart': """
+          examples: const [
+            const {
+              'main.dart': """
 library lib.foo;
 
 part 'part.dart';
 
 main() {}
 """,
-
-'part.dart': """
+              'part.dart': """
 part of lib.bar;
-"""}]),
+"""
+            }
+          ]),
 
-      MessageKind.MISSING_LIBRARY_NAME:
-        const MessageTemplate(MessageKind.MISSING_LIBRARY_NAME,
+      MessageKind.MISSING_LIBRARY_NAME: const MessageTemplate(
+          MessageKind.MISSING_LIBRARY_NAME,
           "Library has no name. Part directive expected library name "
           "to be '#{libraryName}'.",
           howToFix: "Try adding 'library #{libraryName};' to the library.",
-          examples: const [const {
-'main.dart': """
+          examples: const [
+            const {
+              'main.dart': """
 part 'part.dart';
 
 main() {}
 """,
-
-'part.dart': """
+              'part.dart': """
 part of lib.foo;
-"""}]),
+"""
+            }
+          ]),
 
-      MessageKind.THIS_IS_THE_PART_OF_TAG:
-        const MessageTemplate(MessageKind.THIS_IS_THE_PART_OF_TAG,
+      MessageKind.THIS_IS_THE_PART_OF_TAG: const MessageTemplate(
+          MessageKind.THIS_IS_THE_PART_OF_TAG,
           "This is the part of directive."),
 
-      MessageKind.MISSING_PART_OF_TAG:
-        const MessageTemplate(MessageKind.MISSING_PART_OF_TAG,
+      MessageKind.MISSING_PART_OF_TAG: const MessageTemplate(
+          MessageKind.MISSING_PART_OF_TAG,
           "This file has no part-of tag, but it is being used as a part."),
 
-      MessageKind.DUPLICATED_PART_OF:
-        const MessageTemplate(MessageKind.DUPLICATED_PART_OF,
-          "Duplicated part-of directive."),
+      MessageKind.DUPLICATED_PART_OF: const MessageTemplate(
+          MessageKind.DUPLICATED_PART_OF, "Duplicated part-of directive."),
 
-      MessageKind.DUPLICATED_LIBRARY_NAME:
-        const MessageTemplate(MessageKind.DUPLICATED_LIBRARY_NAME,
+      MessageKind.DUPLICATED_LIBRARY_NAME: const MessageTemplate(
+          MessageKind.DUPLICATED_LIBRARY_NAME,
           "Duplicated library name '#{libraryName}'."),
 
-      MessageKind.DUPLICATED_RESOURCE:
-        const MessageTemplate(MessageKind.DUPLICATED_RESOURCE,
+      MessageKind.DUPLICATED_RESOURCE: const MessageTemplate(
+          MessageKind.DUPLICATED_RESOURCE,
           "The resource '#{resourceUri}' is loaded through both "
           "'#{canonicalUri1}' and '#{canonicalUri2}'."),
 
-      MessageKind.DUPLICATED_LIBRARY_RESOURCE:
-        const MessageTemplate(MessageKind.DUPLICATED_LIBRARY_RESOURCE,
+      MessageKind.DUPLICATED_LIBRARY_RESOURCE: const MessageTemplate(
+          MessageKind.DUPLICATED_LIBRARY_RESOURCE,
           "The library '#{libraryName}' in '#{resourceUri}' is loaded through "
           "both '#{canonicalUri1}' and '#{canonicalUri2}'."),
 
       // This is used as an exception.
-      MessageKind.INVALID_SOURCE_FILE_LOCATION:
-        const MessageTemplate(MessageKind.INVALID_SOURCE_FILE_LOCATION, '''
+      MessageKind.INVALID_SOURCE_FILE_LOCATION: const MessageTemplate(
+          MessageKind.INVALID_SOURCE_FILE_LOCATION,
+          '''
 Invalid offset (#{offset}) in source map.
 File: #{fileName}
 Length: #{length}'''),
 
-      MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC:
-        const MessageTemplate(MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC,
-              "Top-level variable cannot be declared static."),
+      MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC: const MessageTemplate(
+          MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC,
+          "Top-level variable cannot be declared static."),
 
-      MessageKind.REFERENCE_IN_INITIALIZATION:
-        const MessageTemplate(MessageKind.REFERENCE_IN_INITIALIZATION,
-           "Variable '#{variableName}' is referenced during its "
-           "initialization.",
-           howToFix:
-             "If you are trying to reference a shadowed variable, rename "
-             "one of the variables.",
-           examples: const ["""
+      MessageKind.REFERENCE_IN_INITIALIZATION: const MessageTemplate(
+          MessageKind.REFERENCE_IN_INITIALIZATION,
+          "Variable '#{variableName}' is referenced during its "
+          "initialization.",
+          howToFix:
+              "If you are trying to reference a shadowed variable, rename "
+              "one of the variables.",
+          examples: const [
+            """
 foo(t) {
   var t = t;
   return t;
 }
 
 main() => foo(1);
-"""]),
+"""
+          ]),
 
-      MessageKind.CONST_WITHOUT_INITIALIZER:
-        const MessageTemplate(MessageKind.CONST_WITHOUT_INITIALIZER,
+      MessageKind.CONST_WITHOUT_INITIALIZER: const MessageTemplate(
+          MessageKind.CONST_WITHOUT_INITIALIZER,
           "A constant variable must be initialized.",
           howToFix: "Try adding an initializer or "
-                    "removing the 'const' modifier.",
-          examples: const ["""
+              "removing the 'const' modifier.",
+          examples: const [
+            """
 void main() {
   const c; // This constant variable must be initialized.
-}"""]),
+}"""
+          ]),
 
-      MessageKind.FINAL_WITHOUT_INITIALIZER:
-        const MessageTemplate(MessageKind.FINAL_WITHOUT_INITIALIZER,
+      MessageKind.FINAL_WITHOUT_INITIALIZER: const MessageTemplate(
+          MessageKind.FINAL_WITHOUT_INITIALIZER,
           "A final variable must be initialized.",
           howToFix: "Try adding an initializer or "
-                    "removing the 'final' modifier.",
+              "removing the 'final' modifier.",
           examples: const [
-              "class C { static final field; } main() => C.field;"]),
+            "class C { static final field; } main() => C.field;"
+          ]),
 
-      MessageKind.CONST_LOOP_VARIABLE:
-        const MessageTemplate(MessageKind.CONST_LOOP_VARIABLE,
+      MessageKind.CONST_LOOP_VARIABLE: const MessageTemplate(
+          MessageKind.CONST_LOOP_VARIABLE,
           "A loop variable cannot be constant.",
           howToFix: "Try remove the 'const' modifier or "
-                    "replacing it with a 'final' modifier.",
-          examples: const ["""
+              "replacing it with a 'final' modifier.",
+          examples: const [
+            """
 void main() {
   for (const c in []) {}
-}"""]),
+}"""
+          ]),
 
-      MessageKind.MEMBER_USES_CLASS_NAME:
-        const MessageTemplate(MessageKind.MEMBER_USES_CLASS_NAME,
+      MessageKind.MEMBER_USES_CLASS_NAME: const MessageTemplate(
+          MessageKind.MEMBER_USES_CLASS_NAME,
           "Member variable can't have the same name as the class it is "
           "declared in.",
           howToFix: "Try renaming the variable.",
-          examples: const ["""
+          examples: const [
+            """
 class A { var A; }
 main() {
   var a = new A();
   a.A = 1;
 }
-""", """
+""",
+            """
 class A { static var A; }
 main() => A.A = 1;
-"""]),
+"""
+          ]),
 
-      MessageKind.WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT:
-        const MessageTemplate(
+      MessageKind.WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT: const MessageTemplate(
           MessageKind.WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT,
           "Wrong number of arguments to assert. Should be 1, but given "
           "#{argumentCount}."),
 
-      MessageKind.ASSERT_IS_GIVEN_NAMED_ARGUMENTS:
-        const MessageTemplate(MessageKind.ASSERT_IS_GIVEN_NAMED_ARGUMENTS,
+      MessageKind.ASSERT_IS_GIVEN_NAMED_ARGUMENTS: const MessageTemplate(
+          MessageKind.ASSERT_IS_GIVEN_NAMED_ARGUMENTS,
           "'assert' takes no named arguments, but given #{argumentCount}."),
 
-      MessageKind.FACTORY_REDIRECTION_IN_NON_FACTORY:
-        const MessageTemplate(MessageKind.FACTORY_REDIRECTION_IN_NON_FACTORY,
+      MessageKind.FACTORY_REDIRECTION_IN_NON_FACTORY: const MessageTemplate(
+          MessageKind.FACTORY_REDIRECTION_IN_NON_FACTORY,
           "Factory redirection only allowed in factories."),
 
-      MessageKind.MISSING_FACTORY_KEYWORD:
-        const MessageTemplate(MessageKind.MISSING_FACTORY_KEYWORD,
+      MessageKind.MISSING_FACTORY_KEYWORD: const MessageTemplate(
+          MessageKind.MISSING_FACTORY_KEYWORD,
           "Did you forget a factory keyword here?"),
 
-      MessageKind.NO_SUCH_METHOD_IN_NATIVE:
-        const MessageTemplate(MessageKind.NO_SUCH_METHOD_IN_NATIVE,
+      MessageKind.NO_SUCH_METHOD_IN_NATIVE: const MessageTemplate(
+          MessageKind.NO_SUCH_METHOD_IN_NATIVE,
           "'NoSuchMethod' is not supported for classes that extend native "
           "classes."),
 
-      MessageKind.DEFERRED_LIBRARY_DART_2_DART:
-        const MessageTemplate(MessageKind.DEFERRED_LIBRARY_DART_2_DART,
+      MessageKind.DEFERRED_LIBRARY_DART_2_DART: const MessageTemplate(
+          MessageKind.DEFERRED_LIBRARY_DART_2_DART,
           "Deferred loading is not supported by the dart backend yet. "
           "The output will not be split."),
 
-      MessageKind.DEFERRED_LIBRARY_WITHOUT_PREFIX:
-        const MessageTemplate(MessageKind.DEFERRED_LIBRARY_WITHOUT_PREFIX,
+      MessageKind.DEFERRED_LIBRARY_WITHOUT_PREFIX: const MessageTemplate(
+          MessageKind.DEFERRED_LIBRARY_WITHOUT_PREFIX,
           "This import is deferred but there is no prefix keyword.",
           howToFix: "Try adding a prefix to the import."),
 
-      MessageKind.DEFERRED_OLD_SYNTAX:
-        const MessageTemplate(MessageKind.DEFERRED_OLD_SYNTAX,
+      MessageKind.DEFERRED_OLD_SYNTAX: const MessageTemplate(
+          MessageKind.DEFERRED_OLD_SYNTAX,
           "The DeferredLibrary annotation is obsolete.",
           howToFix:
-            "Use the \"import 'lib.dart' deferred as prefix\" syntax instead."),
+              "Use the \"import 'lib.dart' deferred as prefix\" syntax instead."),
 
-      MessageKind.DEFERRED_LIBRARY_DUPLICATE_PREFIX:
-        const MessageTemplate(MessageKind.DEFERRED_LIBRARY_DUPLICATE_PREFIX,
+      MessageKind.DEFERRED_LIBRARY_DUPLICATE_PREFIX: const MessageTemplate(
+          MessageKind.DEFERRED_LIBRARY_DUPLICATE_PREFIX,
           "The prefix of this deferred import is not unique.",
           howToFix: "Try changing the import prefix."),
 
-      MessageKind.DEFERRED_TYPE_ANNOTATION:
-        const MessageTemplate(MessageKind.DEFERRED_TYPE_ANNOTATION,
+      MessageKind.DEFERRED_TYPE_ANNOTATION: const MessageTemplate(
+          MessageKind.DEFERRED_TYPE_ANNOTATION,
           "The type #{node} is deferred. "
           "Deferred types are not valid as type annotations.",
-          howToFix:
-            "Try using a non-deferred abstract class as an interface."),
+          howToFix: "Try using a non-deferred abstract class as an interface."),
 
-      MessageKind.ILLEGAL_STATIC:
-        const MessageTemplate(MessageKind.ILLEGAL_STATIC,
+      MessageKind.ILLEGAL_STATIC: const MessageTemplate(
+          MessageKind.ILLEGAL_STATIC,
           "Modifier static is only allowed on functions declared in "
           "a class."),
 
-      MessageKind.STATIC_FUNCTION_BLOAT:
-        const MessageTemplate(MessageKind.STATIC_FUNCTION_BLOAT,
+      MessageKind.STATIC_FUNCTION_BLOAT: const MessageTemplate(
+          MessageKind.STATIC_FUNCTION_BLOAT,
           "Using '#{class}.#{name}' may lead to unnecessarily large "
           "generated code.",
-          howToFix:
-              "Try adding '@MirrorsUsed(...)' as described at "
+          howToFix: "Try adding '@MirrorsUsed(...)' as described at "
               "https://goo.gl/Akrrog."),
 
-      MessageKind.NON_CONST_BLOAT:
-        const MessageTemplate(MessageKind.NON_CONST_BLOAT,
+      MessageKind.NON_CONST_BLOAT: const MessageTemplate(
+          MessageKind.NON_CONST_BLOAT,
           "Using 'new #{name}' may lead to unnecessarily large generated "
           "code.",
           howToFix:
               "Try using 'const #{name}' or adding '@MirrorsUsed(...)' as "
               "described at https://goo.gl/Akrrog."),
 
-      MessageKind.STRING_EXPECTED:
-        const MessageTemplate(MessageKind.STRING_EXPECTED,
+      MessageKind.STRING_EXPECTED: const MessageTemplate(
+          MessageKind.STRING_EXPECTED,
           "Expected a 'String', but got an instance of '#{type}'."),
 
-      MessageKind.PRIVATE_IDENTIFIER:
-        const MessageTemplate(MessageKind.PRIVATE_IDENTIFIER,
+      MessageKind.PRIVATE_IDENTIFIER: const MessageTemplate(
+          MessageKind.PRIVATE_IDENTIFIER,
           "'#{value}' is not a valid Symbol name because it starts with "
           "'_'."),
 
-      MessageKind.PRIVATE_NAMED_PARAMETER:
-        const MessageTemplate(MessageKind.PRIVATE_NAMED_PARAMETER,
+      MessageKind.PRIVATE_NAMED_PARAMETER: const MessageTemplate(
+          MessageKind.PRIVATE_NAMED_PARAMETER,
           "Named optional parameter can't have a library private name.",
           howToFix:
-            "Try removing the '_' or making the parameter positional or "
-            "required.",
+              "Try removing the '_' or making the parameter positional or "
+              "required.",
           examples: const ["""foo({int _p}) {} main() => foo();"""]),
 
-      MessageKind.UNSUPPORTED_LITERAL_SYMBOL:
-        const MessageTemplate(MessageKind.UNSUPPORTED_LITERAL_SYMBOL,
+      MessageKind.UNSUPPORTED_LITERAL_SYMBOL: const MessageTemplate(
+          MessageKind.UNSUPPORTED_LITERAL_SYMBOL,
           "Symbol literal '##{value}' is currently unsupported by dart2js."),
 
-      MessageKind.INVALID_SYMBOL:
-        const MessageTemplate(MessageKind.INVALID_SYMBOL, '''
+      MessageKind.INVALID_SYMBOL: const MessageTemplate(
+          MessageKind.INVALID_SYMBOL,
+          '''
 '#{value}' is not a valid Symbol name because is not:
  * an empty String,
  * a user defined operator,
  * a qualified non-private identifier optionally followed by '=', or
  * a qualified non-private identifier followed by '.' and a user-defined '''
-"operator."),
+          "operator."),
 
-      MessageKind.AMBIGUOUS_REEXPORT:
-        const MessageTemplate(MessageKind.AMBIGUOUS_REEXPORT,
+      MessageKind.AMBIGUOUS_REEXPORT: const MessageTemplate(
+          MessageKind.AMBIGUOUS_REEXPORT,
           "'#{name}' is (re)exported by multiple libraries."),
 
-      MessageKind.AMBIGUOUS_LOCATION:
-        const MessageTemplate(MessageKind.AMBIGUOUS_LOCATION,
-          "'#{name}' is defined here."),
+      MessageKind.AMBIGUOUS_LOCATION: const MessageTemplate(
+          MessageKind.AMBIGUOUS_LOCATION, "'#{name}' is defined here."),
 
-      MessageKind.IMPORTED_HERE:
-        const MessageTemplate(MessageKind.IMPORTED_HERE,
-          "'#{name}' is imported here."),
+      MessageKind.IMPORTED_HERE: const MessageTemplate(
+          MessageKind.IMPORTED_HERE, "'#{name}' is imported here."),
 
-      MessageKind.OVERRIDE_EQUALS_NOT_HASH_CODE:
-        const MessageTemplate(MessageKind.OVERRIDE_EQUALS_NOT_HASH_CODE,
+      MessageKind.OVERRIDE_EQUALS_NOT_HASH_CODE: const MessageTemplate(
+          MessageKind.OVERRIDE_EQUALS_NOT_HASH_CODE,
           "The class '#{class}' overrides 'operator==', "
           "but not 'get hashCode'."),
 
-      MessageKind.INTERNAL_LIBRARY_FROM:
-        const MessageTemplate(MessageKind.INTERNAL_LIBRARY_FROM,
+      MessageKind.INTERNAL_LIBRARY_FROM: const MessageTemplate(
+          MessageKind.INTERNAL_LIBRARY_FROM,
           "Internal library '#{resolvedUri}' is not accessible from "
           "'#{importingUri}'."),
 
-      MessageKind.INTERNAL_LIBRARY:
-        const MessageTemplate(MessageKind.INTERNAL_LIBRARY,
+      MessageKind.INTERNAL_LIBRARY: const MessageTemplate(
+          MessageKind.INTERNAL_LIBRARY,
           "Internal library '#{resolvedUri}' is not accessible."),
 
       MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS:
-        const MessageTemplate(
-          MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS,
-          "Js-interop class '#{cls}' cannot extend from the non js-interop "
-          "class '#{superclass}'.",
-          howToFix: "Annotate the superclass with @JS.",
-          examples: const [
-              """
+          const MessageTemplate(
+              MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS,
+              "Js-interop class '#{cls}' cannot extend from the non js-interop "
+              "class '#{superclass}'.",
+              howToFix: "Annotate the superclass with @JS.",
+              examples: const [
+            """
               import 'package:js/js.dart';
 
               class Foo { }
@@ -2260,15 +2251,15 @@
               main() {
                 new Bar();
               }
-              """]),
+              """
+          ]),
 
-      MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER:
-        const MessageTemplate(
+      MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER: const MessageTemplate(
           MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
           "Member '#{member}' in js-interop class '#{cls}' is not external.",
           howToFix: "Mark all interop methods external",
           examples: const [
-              """
+            """
               import 'package:js/js.dart';
 
               @JS()
@@ -2279,18 +2270,18 @@
               main() {
                 new Foo().bar();
               }
-              """]),
+              """
+          ]),
 
-      MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS:
-        const MessageTemplate(
+      MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS: const MessageTemplate(
           MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
           "Js-interop method '#{method}' has named arguments but is not "
           "a factory constructor of an @anonymous @JS class.",
           howToFix: "Remove all named arguments from js-interop method or "
-                    "in the case of a factory constructor annotate the class "
-                    "as @anonymous.",
+              "in the case of a factory constructor annotate the class "
+              "as @anonymous.",
           examples: const [
-              """
+            """
               import 'package:js/js.dart';
 
               @JS()
@@ -2301,15 +2292,15 @@
               main() {
                 new Foo().bar(4, baz: 5);
               }
-              """]),
-      MessageKind.JS_INTEROP_INDEX_NOT_SUPPORTED:
-        const MessageTemplate(
-           MessageKind.JS_INTEROP_INDEX_NOT_SUPPORTED,
-           "Js-interop does not support [] and []= operator methods.",
-           howToFix: "Try replacing [] and []= operator methods with normal "
-                     "methods.",
-           examples: const [
-               """
+              """
+          ]),
+      MessageKind.JS_INTEROP_INDEX_NOT_SUPPORTED: const MessageTemplate(
+          MessageKind.JS_INTEROP_INDEX_NOT_SUPPORTED,
+          "Js-interop does not support [] and []= operator methods.",
+          howToFix: "Try replacing [] and []= operator methods with normal "
+              "methods.",
+          examples: const [
+            """
         import 'package:js/js.dart';
 
         @JS()
@@ -2320,7 +2311,8 @@
         main() {
           new Foo()[0];
         }
-        """, """
+        """,
+            """
         import 'package:js/js.dart';
 
         @JS()
@@ -2331,18 +2323,20 @@
         main() {
           new Foo()[0] = 1;
         }
-        """]),
+        """
+          ]),
 
       MessageKind.JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS:
-        const MessageTemplate(
-          MessageKind.JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
-          "Parameter '#{parameter}' in anonymous js-interop class '#{cls}' "
-          "object literal constructor is positional instead of named."
-          ".",
-          howToFix: "Make all arguments in external factory object literal "
-                    "constructors named.",
-          examples: const [
-              """
+          const MessageTemplate(
+              MessageKind
+                  .JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
+              "Parameter '#{parameter}' in anonymous js-interop class '#{cls}' "
+              "object literal constructor is positional instead of named."
+              ".",
+              howToFix: "Make all arguments in external factory object literal "
+                  "constructors named.",
+              examples: const [
+            """
               import 'package:js/js.dart';
 
               @anonymous
@@ -2354,63 +2348,65 @@
               main() {
                 new Foo(5, baz: 5);
               }
-              """]),
+              """
+          ]),
 
-      MessageKind.LIBRARY_NOT_FOUND:
-        const MessageTemplate(MessageKind.LIBRARY_NOT_FOUND,
-          "Library not found '#{resolvedUri}'."),
+      MessageKind.LIBRARY_NOT_FOUND: const MessageTemplate(
+          MessageKind.LIBRARY_NOT_FOUND, "Library not found '#{resolvedUri}'."),
 
-      MessageKind.LIBRARY_NOT_SUPPORTED:
-        const MessageTemplate(MessageKind.LIBRARY_NOT_SUPPORTED,
+      MessageKind.LIBRARY_NOT_SUPPORTED: const MessageTemplate(
+          MessageKind.LIBRARY_NOT_SUPPORTED,
           "Library not supported '#{resolvedUri}'.",
           howToFix: "Try removing the dependency or enabling support using "
-                    "the '--categories' option.",
-          examples: const [/*
+              "the '--categories' option.",
+          examples: const [
+            /*
               """
               import 'dart:io';
               main() {}
               """
-          */]),
-          // TODO(johnniwinther): Enable example when message_kind_test.dart
-          // supports library loader callbacks.
+          */
+          ]),
+      // TODO(johnniwinther): Enable example when message_kind_test.dart
+      // supports library loader callbacks.
 
-      MessageKind.UNSUPPORTED_EQ_EQ_EQ:
-        const MessageTemplate(MessageKind.UNSUPPORTED_EQ_EQ_EQ,
+      MessageKind.UNSUPPORTED_EQ_EQ_EQ: const MessageTemplate(
+          MessageKind.UNSUPPORTED_EQ_EQ_EQ,
           "'===' is not an operator. "
           "Did you mean '#{lhs} == #{rhs}' or 'identical(#{lhs}, #{rhs})'?"),
 
-      MessageKind.UNSUPPORTED_BANG_EQ_EQ:
-        const MessageTemplate(MessageKind.UNSUPPORTED_BANG_EQ_EQ,
+      MessageKind.UNSUPPORTED_BANG_EQ_EQ: const MessageTemplate(
+          MessageKind.UNSUPPORTED_BANG_EQ_EQ,
           "'!==' is not an operator. "
           "Did you mean '#{lhs} != #{rhs}' or '!identical(#{lhs}, #{rhs})'?"),
 
-      MessageKind.UNSUPPORTED_PREFIX_PLUS:
-        const MessageTemplate(MessageKind.UNSUPPORTED_PREFIX_PLUS,
-          "'+' is not a prefix operator. ",
+      MessageKind.UNSUPPORTED_PREFIX_PLUS: const MessageTemplate(
+          MessageKind.UNSUPPORTED_PREFIX_PLUS, "'+' is not a prefix operator. ",
           howToFix: "Try removing '+'.",
           examples: const [
-              "main() => +2;  // No longer a valid way to write '2'"
+            "main() => +2;  // No longer a valid way to write '2'"
           ]),
 
-      MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX:
-        const MessageTemplate(MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX,
+      MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX: const MessageTemplate(
+          MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX,
           "'typedef' not allowed here. ",
           howToFix: "Try replacing 'typedef' with 'class'.",
           examples: const [
-              """
+            """
 class B { }
 class M1 {  }
 typedef C = B with M1;  // Need to replace 'typedef' with 'class'.
 main() { new C(); }
-"""]),
+"""
+          ]),
 
-      MessageKind.MIRRORS_EXPECTED_STRING:
-        const MessageTemplate(MessageKind.MIRRORS_EXPECTED_STRING,
+      MessageKind.MIRRORS_EXPECTED_STRING: const MessageTemplate(
+          MessageKind.MIRRORS_EXPECTED_STRING,
           "Can't use '#{name}' here because it's an instance of '#{type}' "
           "and a 'String' value is expected.",
           howToFix: "Did you forget to add quotes?",
           examples: const [
-              """
+            """
 // 'Foo' is a type literal, not a string.
 @MirrorsUsed(symbols: const [Foo])
 import 'dart:mirrors';
@@ -2418,29 +2414,31 @@
 class Foo {}
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.MIRRORS_EXPECTED_STRING_OR_TYPE:
-        const MessageTemplate(MessageKind.MIRRORS_EXPECTED_STRING_OR_TYPE,
+      MessageKind.MIRRORS_EXPECTED_STRING_OR_TYPE: const MessageTemplate(
+          MessageKind.MIRRORS_EXPECTED_STRING_OR_TYPE,
           "Can't use '#{name}' here because it's an instance of '#{type}' "
           "and a 'String' or 'Type' value is expected.",
           howToFix: "Did you forget to add quotes?",
           examples: const [
-              """
+            """
 // 'main' is a method, not a class.
 @MirrorsUsed(targets: const [main])
 import 'dart:mirrors';
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.MIRRORS_EXPECTED_STRING_OR_LIST:
-        const MessageTemplate(MessageKind.MIRRORS_EXPECTED_STRING_OR_LIST,
+      MessageKind.MIRRORS_EXPECTED_STRING_OR_LIST: const MessageTemplate(
+          MessageKind.MIRRORS_EXPECTED_STRING_OR_LIST,
           "Can't use '#{name}' here because it's an instance of '#{type}' "
           "and a 'String' or 'List' value is expected.",
           howToFix: "Did you forget to add quotes?",
           examples: const [
-              """
+            """
 // 'Foo' is not a string.
 @MirrorsUsed(symbols: Foo)
 import 'dart:mirrors';
@@ -2448,68 +2446,71 @@
 class Foo {}
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.MIRRORS_EXPECTED_STRING_TYPE_OR_LIST:
-        const MessageTemplate(MessageKind.MIRRORS_EXPECTED_STRING_TYPE_OR_LIST,
+      MessageKind.MIRRORS_EXPECTED_STRING_TYPE_OR_LIST: const MessageTemplate(
+          MessageKind.MIRRORS_EXPECTED_STRING_TYPE_OR_LIST,
           "Can't use '#{name}' here because it's an instance of '#{type}' "
           "but a 'String', 'Type', or 'List' value is expected.",
           howToFix: "Did you forget to add quotes?",
           examples: const [
-              """
+            """
 // '1' is not a string.
 @MirrorsUsed(targets: 1)
 import 'dart:mirrors';
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.MIRRORS_CANNOT_RESOLVE_IN_CURRENT_LIBRARY:
-        const MessageTemplate(
+      MessageKind.MIRRORS_CANNOT_RESOLVE_IN_CURRENT_LIBRARY: const MessageTemplate(
           MessageKind.MIRRORS_CANNOT_RESOLVE_IN_CURRENT_LIBRARY,
           "Can't find '#{name}' in the current library.",
           // TODO(ahe): The closest identifiers in edit distance would be nice.
           howToFix: "Did you forget to add an import?",
           examples: const [
-              """
+            """
 // 'window' is not in scope because dart:html isn't imported.
 @MirrorsUsed(targets: 'window')
 import 'dart:mirrors';
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.MIRRORS_CANNOT_RESOLVE_IN_LIBRARY:
-        const MessageTemplate(MessageKind.MIRRORS_CANNOT_RESOLVE_IN_LIBRARY,
+      MessageKind.MIRRORS_CANNOT_RESOLVE_IN_LIBRARY: const MessageTemplate(
+          MessageKind.MIRRORS_CANNOT_RESOLVE_IN_LIBRARY,
           "Can't find '#{name}' in the library '#{library}'.",
           // TODO(ahe): The closest identifiers in edit distance would be nice.
           howToFix: "Is '#{name}' spelled right?",
           examples: const [
-              """
+            """
 // 'List' is misspelled.
 @MirrorsUsed(targets: 'dart.core.Lsit')
 import 'dart:mirrors';
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.MIRRORS_CANNOT_FIND_IN_ELEMENT:
-        const MessageTemplate(MessageKind.MIRRORS_CANNOT_FIND_IN_ELEMENT,
+      MessageKind.MIRRORS_CANNOT_FIND_IN_ELEMENT: const MessageTemplate(
+          MessageKind.MIRRORS_CANNOT_FIND_IN_ELEMENT,
           "Can't find '#{name}' in '#{element}'.",
           // TODO(ahe): The closest identifiers in edit distance would be nice.
           howToFix: "Is '#{name}' spelled right?",
           examples: const [
-              """
+            """
 // 'addAll' is misspelled.
 @MirrorsUsed(targets: 'dart.core.List.addAl')
 import 'dart:mirrors';
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.INVALID_URI:
-        const MessageTemplate(MessageKind.INVALID_URI,
-          "'#{uri}' is not a valid URI.",
+      MessageKind.INVALID_URI: const MessageTemplate(
+          MessageKind.INVALID_URI, "'#{uri}' is not a valid URI.",
           howToFix: DONT_KNOW_HOW_TO_FIX,
           examples: const [
             """
@@ -2517,17 +2518,17 @@
 import '../../Udyn[mic ils/expect.dart';
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.INVALID_PACKAGE_CONFIG:
-          const MessageTemplate(MessageKind.INVALID_PACKAGE_CONFIG,
-            """Package config file '#{uri}' is invalid.
+      MessageKind.INVALID_PACKAGE_CONFIG: const MessageTemplate(
+          MessageKind.INVALID_PACKAGE_CONFIG,
+          """Package config file '#{uri}' is invalid.
 #{exception}""",
-            howToFix: DONT_KNOW_HOW_TO_FIX
-      ),
+          howToFix: DONT_KNOW_HOW_TO_FIX),
 
-      MessageKind.INVALID_PACKAGE_URI:
-        const MessageTemplate(MessageKind.INVALID_PACKAGE_URI,
+      MessageKind.INVALID_PACKAGE_URI: const MessageTemplate(
+          MessageKind.INVALID_PACKAGE_URI,
           "'#{uri}' is not a valid package URI (#{exception}).",
           howToFix: DONT_KNOW_HOW_TO_FIX,
           examples: const [
@@ -2536,157 +2537,158 @@
 import 'package:foo.dart';
 
 main() {}
-""", """
+""",
+            """
 // can't have 2 slashes
 import 'package://foo/foo.dart';
 
 main() {}
-""", """
+""",
+            """
 // package name must be valid
 import 'package:not\valid/foo.dart';
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.READ_SCRIPT_ERROR:
-        const MessageTemplate(MessageKind.READ_SCRIPT_ERROR,
-          "Can't read '#{uri}' (#{exception}).",
+      MessageKind.READ_SCRIPT_ERROR: const MessageTemplate(
+          MessageKind.READ_SCRIPT_ERROR, "Can't read '#{uri}' (#{exception}).",
           // Don't know how to fix since the underlying error is unknown.
           howToFix: DONT_KNOW_HOW_TO_FIX,
           examples: const [
-              """
+            """
 // 'foo.dart' does not exist.
 import 'foo.dart';
 
 main() {}
-"""]),
+"""
+          ]),
 
       MessageKind.READ_SELF_ERROR:
-        const MessageTemplate(MessageKind.READ_SELF_ERROR,
-          "#{exception}",
-          // Don't know how to fix since the underlying error is unknown.
-          howToFix: DONT_KNOW_HOW_TO_FIX),
+          const MessageTemplate(MessageKind.READ_SELF_ERROR, "#{exception}",
+              // Don't know how to fix since the underlying error is unknown.
+              howToFix: DONT_KNOW_HOW_TO_FIX),
 
-      MessageKind.ABSTRACT_CLASS_INSTANTIATION:
-        const MessageTemplate(MessageKind.ABSTRACT_CLASS_INSTANTIATION,
+      MessageKind.ABSTRACT_CLASS_INSTANTIATION: const MessageTemplate(
+          MessageKind.ABSTRACT_CLASS_INSTANTIATION,
           "Can't instantiate abstract class.",
           howToFix: DONT_KNOW_HOW_TO_FIX,
           examples: const ["abstract class A {} main() { new A(); }"]),
 
-      MessageKind.BODY_EXPECTED:
-        const MessageTemplate(MessageKind.BODY_EXPECTED,
-          "Expected a function body or '=>'.",
+      MessageKind.BODY_EXPECTED: const MessageTemplate(
+          MessageKind.BODY_EXPECTED, "Expected a function body or '=>'.",
           // TODO(ahe): In some scenarios, we can suggest removing the 'static'
           // keyword.
           howToFix: "Try adding {}.",
-          examples: const [
-              "main();"]),
+          examples: const ["main();"]),
 
-      MessageKind.MIRROR_BLOAT:
-        const MessageTemplate(MessageKind.MIRROR_BLOAT,
+      MessageKind.MIRROR_BLOAT: const MessageTemplate(
+          MessageKind.MIRROR_BLOAT,
           "#{count} methods retained for use by dart:mirrors out of #{total}"
           " total methods (#{percentage}%)."),
 
-      MessageKind.MIRROR_IMPORT:
-        const MessageTemplate(MessageKind.MIRROR_IMPORT,
-          "Import of 'dart:mirrors'."),
+      MessageKind.MIRROR_IMPORT: const MessageTemplate(
+          MessageKind.MIRROR_IMPORT, "Import of 'dart:mirrors'."),
 
-      MessageKind.MIRROR_IMPORT_NO_USAGE:
-        const MessageTemplate(MessageKind.MIRROR_IMPORT_NO_USAGE,
+      MessageKind.MIRROR_IMPORT_NO_USAGE: const MessageTemplate(
+          MessageKind.MIRROR_IMPORT_NO_USAGE,
           "This import is not annotated with @MirrorsUsed, which may lead to "
           "unnecessarily large generated code.",
-          howToFix:
-              "Try adding '@MirrorsUsed(...)' as described at "
+          howToFix: "Try adding '@MirrorsUsed(...)' as described at "
               "https://goo.gl/Akrrog."),
 
-      MessageKind.JS_PLACEHOLDER_CAPTURE:
-        const MessageTemplate(
-            MessageKind.JS_PLACEHOLDER_CAPTURE,
-            "JS code must not use '#' placeholders inside functions.",
-            howToFix:
-            "Use an immediately called JavaScript function to capture the"
-            " the placeholder values as JavaScript function parameters."),
+      MessageKind.JS_PLACEHOLDER_CAPTURE: const MessageTemplate(
+          MessageKind.JS_PLACEHOLDER_CAPTURE,
+          "JS code must not use '#' placeholders inside functions.",
+          howToFix:
+              "Use an immediately called JavaScript function to capture the"
+              " the placeholder values as JavaScript function parameters."),
 
       MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT:
-        const MessageTemplate(
-          MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
-          "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."),
+          const MessageTemplate(
+              MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
+              "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."),
 
-      MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD:
-        const MessageTemplate(MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD,
-              "'#{keyword}' is a reserved word and can't be used here.",
-              howToFix: "Try using a different name.",
-              examples: const ["do() {} main() {}"]),
+      MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD: const MessageTemplate(
+          MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD,
+          "'#{keyword}' is a reserved word and can't be used here.",
+          howToFix: "Try using a different name.",
+          examples: const ["do() {} main() {}"]),
 
-      MessageKind. NAMED_FUNCTION_EXPRESSION:
-        const MessageTemplate(MessageKind.NAMED_FUNCTION_EXPRESSION,
+      MessageKind.NAMED_FUNCTION_EXPRESSION: const MessageTemplate(
+          MessageKind.NAMED_FUNCTION_EXPRESSION,
           "Function expression '#{name}' cannot be named.",
           howToFix: "Try removing the name.",
           examples: const ["main() { var f = func() {}; }"]),
 
-      MessageKind.UNUSED_METHOD:
-        const MessageTemplate(MessageKind.UNUSED_METHOD,
-          "The method '#{name}' is never called.",
+      MessageKind.UNUSED_METHOD: const MessageTemplate(
+          MessageKind.UNUSED_METHOD, "The method '#{name}' is never called.",
           howToFix: "Consider deleting it.",
           examples: const ["deadCode() {} main() {}"]),
 
-      MessageKind.UNUSED_CLASS:
-        const MessageTemplate(MessageKind.UNUSED_CLASS,
-          "The class '#{name}' is never used.",
+      MessageKind.UNUSED_CLASS: const MessageTemplate(
+          MessageKind.UNUSED_CLASS, "The class '#{name}' is never used.",
           howToFix: "Consider deleting it.",
           examples: const ["class DeadCode {} main() {}"]),
 
-      MessageKind.UNUSED_TYPEDEF:
-        const MessageTemplate(MessageKind.UNUSED_TYPEDEF,
-          "The typedef '#{name}' is never used.",
+      MessageKind.UNUSED_TYPEDEF: const MessageTemplate(
+          MessageKind.UNUSED_TYPEDEF, "The typedef '#{name}' is never used.",
           howToFix: "Consider deleting it.",
           examples: const ["typedef DeadCode(); main() {}"]),
 
-      MessageKind.ABSTRACT_METHOD:
-        const MessageTemplate(MessageKind.ABSTRACT_METHOD,
+      MessageKind.ABSTRACT_METHOD: const MessageTemplate(
+          MessageKind.ABSTRACT_METHOD,
           "The method '#{name}' has no implementation in "
           "class '#{class}'.",
           howToFix: "Try adding a body to '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 class Class {
   method();
 }
 main() => new Class().method();
-"""]),
+"""
+          ]),
 
-      MessageKind.ABSTRACT_GETTER:
-        const MessageTemplate(MessageKind.ABSTRACT_GETTER,
+      MessageKind.ABSTRACT_GETTER: const MessageTemplate(
+          MessageKind.ABSTRACT_GETTER,
           "The getter '#{name}' has no implementation in "
           "class '#{class}'.",
           howToFix: "Try adding a body to '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 class Class {
   get getter;
 }
 main() => new Class();
-"""]),
+"""
+          ]),
 
-      MessageKind.ABSTRACT_SETTER:
-        const MessageTemplate(MessageKind.ABSTRACT_SETTER,
+      MessageKind.ABSTRACT_SETTER: const MessageTemplate(
+          MessageKind.ABSTRACT_SETTER,
           "The setter '#{name}' has no implementation in "
           "class '#{class}'.",
           howToFix: "Try adding a body to '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 class Class {
   set setter(_);
 }
 main() => new Class();
-"""]),
+"""
+          ]),
 
-      MessageKind.INHERIT_GETTER_AND_METHOD:
-        const MessageTemplate(MessageKind.INHERIT_GETTER_AND_METHOD,
+      MessageKind.INHERIT_GETTER_AND_METHOD: const MessageTemplate(
+          MessageKind.INHERIT_GETTER_AND_METHOD,
           "The class '#{class}' can't inherit both getters and methods "
           "by the named '#{name}'.",
           howToFix: DONT_KNOW_HOW_TO_FIX,
-          examples: const ["""
+          examples: const [
+            """
 class A {
   get member => null;
 }
@@ -2696,49 +2698,54 @@
 class Class implements A, B {
 }
 main() => new Class();
-"""]),
+"""
+          ]),
 
-      MessageKind.INHERITED_METHOD:
-        const MessageTemplate(MessageKind.INHERITED_METHOD,
+      MessageKind.INHERITED_METHOD: const MessageTemplate(
+          MessageKind.INHERITED_METHOD,
           "The inherited method '#{name}' is declared here in class "
           "'#{class}'."),
 
-      MessageKind.INHERITED_EXPLICIT_GETTER:
-        const MessageTemplate(MessageKind.INHERITED_EXPLICIT_GETTER,
+      MessageKind.INHERITED_EXPLICIT_GETTER: const MessageTemplate(
+          MessageKind.INHERITED_EXPLICIT_GETTER,
           "The inherited getter '#{name}' is declared here in class "
           "'#{class}'."),
 
-      MessageKind.INHERITED_IMPLICIT_GETTER:
-        const MessageTemplate(MessageKind.INHERITED_IMPLICIT_GETTER,
+      MessageKind.INHERITED_IMPLICIT_GETTER: const MessageTemplate(
+          MessageKind.INHERITED_IMPLICIT_GETTER,
           "The inherited getter '#{name}' is implicitly declared by this "
           "field in class '#{class}'."),
 
-      MessageKind.UNIMPLEMENTED_METHOD_ONE:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_METHOD_ONE,
+      MessageKind.UNIMPLEMENTED_METHOD_ONE: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_METHOD_ONE,
           "'#{class}' doesn't implement '#{method}' "
           "declared in '#{declarer}'.",
           howToFix: "Try adding an implementation of '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 abstract class I {
   m();
 }
 class C implements I {}
 main() => new C();
-""", """
+""",
+            """
 abstract class I {
   m();
 }
 class C extends I {}
 main() => new C();
-"""]),
+"""
+          ]),
 
-      MessageKind.UNIMPLEMENTED_METHOD:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_METHOD,
+      MessageKind.UNIMPLEMENTED_METHOD: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_METHOD,
           "'#{class}' doesn't implement '#{method}'.",
           howToFix: "Try adding an implementation of '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 abstract class I {
   m();
 }
@@ -2752,7 +2759,8 @@
 main() {
  new C();
 }
-""", """
+""",
+            """
 abstract class I {
   m();
 }
@@ -2766,19 +2774,21 @@
 main() {
  new C();
 }
-"""]),
+"""
+          ]),
 
-      MessageKind.UNIMPLEMENTED_METHOD_CONT:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_METHOD_CONT,
+      MessageKind.UNIMPLEMENTED_METHOD_CONT: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_METHOD_CONT,
           "The method '#{name}' is declared here in class '#{class}'."),
 
-      MessageKind.UNIMPLEMENTED_SETTER_ONE:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_SETTER_ONE,
+      MessageKind.UNIMPLEMENTED_SETTER_ONE: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_SETTER_ONE,
           "'#{class}' doesn't implement the setter '#{name}' "
           "declared in '#{declarer}'.",
           howToFix: "Try adding an implementation of '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 abstract class I {
   set m(_);
 }
@@ -2790,14 +2800,16 @@
  new D().m = 0;
  new C();
 }
-"""]),
+"""
+          ]),
 
-      MessageKind.UNIMPLEMENTED_SETTER:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_SETTER,
+      MessageKind.UNIMPLEMENTED_SETTER: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_SETTER,
           "'#{class}' doesn't implement the setter '#{name}'.",
           howToFix: "Try adding an implementation of '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 abstract class I {
   set m(_);
 }
@@ -2806,7 +2818,8 @@
 }
 class C implements I, J {}
 main() => new C();
-""", """
+""",
+            """
 abstract class I {
   set m(_);
 }
@@ -2815,43 +2828,48 @@
 }
 class C extends I implements J {}
 main() => new C();
-"""]),
+"""
+          ]),
 
-      MessageKind.UNIMPLEMENTED_EXPLICIT_SETTER:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_EXPLICIT_SETTER,
+      MessageKind.UNIMPLEMENTED_EXPLICIT_SETTER: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_EXPLICIT_SETTER,
           "The setter '#{name}' is declared here in class '#{class}'."),
 
-      MessageKind.UNIMPLEMENTED_IMPLICIT_SETTER:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_IMPLICIT_SETTER,
+      MessageKind.UNIMPLEMENTED_IMPLICIT_SETTER: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_IMPLICIT_SETTER,
           "The setter '#{name}' is implicitly declared by this field "
           "in class '#{class}'."),
 
-      MessageKind.UNIMPLEMENTED_GETTER_ONE:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_GETTER_ONE,
+      MessageKind.UNIMPLEMENTED_GETTER_ONE: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_GETTER_ONE,
           "'#{class}' doesn't implement the getter '#{name}' "
           "declared in '#{declarer}'.",
           howToFix: "Try adding an implementation of '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 abstract class I {
   get m;
 }
 class C implements I {}
 main() => new C();
-""", """
+""",
+            """
 abstract class I {
   get m;
 }
 class C extends I {}
 main() => new C();
-"""]),
+"""
+          ]),
 
-      MessageKind.UNIMPLEMENTED_GETTER:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_GETTER,
+      MessageKind.UNIMPLEMENTED_GETTER: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_GETTER,
           "'#{class}' doesn't implement the getter '#{name}'.",
           howToFix: "Try adding an implementation of '#{name}' or declaring "
-                    "'#{class}' to be 'abstract'.",
-          examples: const ["""
+              "'#{class}' to be 'abstract'.",
+          examples: const [
+            """
 abstract class I {
   get m;
 }
@@ -2860,7 +2878,8 @@
 }
 class C implements I, J {}
 main() => new C();
-""", """
+""",
+            """
 abstract class I {
   get m;
 }
@@ -2869,239 +2888,248 @@
 }
 class C extends I implements J {}
 main() => new C();
-"""]),
+"""
+          ]),
 
-      MessageKind.UNIMPLEMENTED_EXPLICIT_GETTER:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_EXPLICIT_GETTER,
+      MessageKind.UNIMPLEMENTED_EXPLICIT_GETTER: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_EXPLICIT_GETTER,
           "The getter '#{name}' is declared here in class '#{class}'."),
 
-      MessageKind.UNIMPLEMENTED_IMPLICIT_GETTER:
-        const MessageTemplate(MessageKind.UNIMPLEMENTED_IMPLICIT_GETTER,
+      MessageKind.UNIMPLEMENTED_IMPLICIT_GETTER: const MessageTemplate(
+          MessageKind.UNIMPLEMENTED_IMPLICIT_GETTER,
           "The getter '#{name}' is implicitly declared by this field "
           "in class '#{class}'."),
 
-      MessageKind.INVALID_METADATA:
-        const MessageTemplate(MessageKind.INVALID_METADATA,
+      MessageKind.INVALID_METADATA: const MessageTemplate(
+          MessageKind.INVALID_METADATA,
           "A metadata annotation must be either a reference to a compile-time "
           "constant variable or a call to a constant constructor.",
           howToFix:
-            "Try using a different constant value or referencing it through a "
-            "constant variable.",
-          examples: const [
-'@Object main() {}',
-'@print main() {}']),
+              "Try using a different constant value or referencing it through a "
+              "constant variable.",
+          examples: const ['@Object main() {}', '@print main() {}']),
 
-      MessageKind.INVALID_METADATA_GENERIC:
-        const MessageTemplate(MessageKind.INVALID_METADATA_GENERIC,
+      MessageKind.INVALID_METADATA_GENERIC: const MessageTemplate(
+          MessageKind.INVALID_METADATA_GENERIC,
           "A metadata annotation using a constant constructor cannot use type "
           "arguments.",
           howToFix:
-            "Try removing the type arguments or referencing the constant "
-            "through a constant variable.",
-          examples: const ['''
+              "Try removing the type arguments or referencing the constant "
+              "through a constant variable.",
+          examples: const [
+            '''
 class C<T> {
   const C();
 }
 @C<int>() main() {}
-''']),
+'''
+          ]),
 
-      MessageKind.EQUAL_MAP_ENTRY_KEY:
-        const MessageTemplate(MessageKind.EQUAL_MAP_ENTRY_KEY,
+      MessageKind.EQUAL_MAP_ENTRY_KEY: const MessageTemplate(
+          MessageKind.EQUAL_MAP_ENTRY_KEY,
           "An entry with the same key already exists in the map.",
           howToFix:
-            "Try removing the previous entry or changing the key in one "
-            "of the entries.",
-          examples: const ["""
+              "Try removing the previous entry or changing the key in one "
+              "of the entries.",
+          examples: const [
+            """
 main() {
   var m = const {'foo': 1, 'foo': 2};
-}"""]),
+}"""
+          ]),
 
-      MessageKind.BAD_INPUT_CHARACTER:
-        const MessageTemplate(MessageKind.BAD_INPUT_CHARACTER,
+      MessageKind.BAD_INPUT_CHARACTER: const MessageTemplate(
+          MessageKind.BAD_INPUT_CHARACTER,
           "Character U+#{characterHex} isn't allowed here.",
           howToFix: DONT_KNOW_HOW_TO_FIX,
-          examples: const ["""
+          examples: const [
+            """
 main() {
   String x = ç;
 }
-"""]),
+"""
+          ]),
 
-      MessageKind.UNTERMINATED_STRING:
-        const MessageTemplate(MessageKind.UNTERMINATED_STRING,
-          "String must end with #{quote}.",
+      MessageKind.UNTERMINATED_STRING: const MessageTemplate(
+          MessageKind.UNTERMINATED_STRING, "String must end with #{quote}.",
           howToFix: DONT_KNOW_HOW_TO_FIX,
-          examples: const ["""
+          examples: const [
+            """
 main() {
   return '
 ;
 }
 """,
-"""
+            """
 main() {
   return \"
 ;
 }
 """,
-"""
+            """
 main() {
   return r'
 ;
 }
 """,
-"""
+            """
 main() {
   return r\"
 ;
 }
 """,
-"""
+            """
 main() => '''
 """,
-"""
+            """
 main() => \"\"\"
 """,
-"""
+            """
 main() => r'''
 """,
-"""
+            """
 main() => r\"\"\"
-"""]),
+"""
+          ]),
 
-      MessageKind.UNMATCHED_TOKEN:
-        const MessageTemplate(MessageKind.UNMATCHED_TOKEN,
+      MessageKind.UNMATCHED_TOKEN: const MessageTemplate(
+          MessageKind.UNMATCHED_TOKEN,
           "Can't find '#{end}' to match '#{begin}'.",
           howToFix: DONT_KNOW_HOW_TO_FIX,
-          examples: const[
-              "main(",
-              "main(){",
-              "main(){]}",
-            ]),
+          examples: const ["main(", "main(){", "main(){]}",]),
 
-      MessageKind.UNTERMINATED_TOKEN:
-        const MessageTemplate(MessageKind.UNTERMINATED_TOKEN,
+      MessageKind.UNTERMINATED_TOKEN: const MessageTemplate(
+          MessageKind.UNTERMINATED_TOKEN,
           // This is a fall-back message that shouldn't happen.
           "Incomplete token."),
 
-      MessageKind.EXPONENT_MISSING:
-        const MessageTemplate(MessageKind.EXPONENT_MISSING,
+      MessageKind.EXPONENT_MISSING: const MessageTemplate(
+          MessageKind.EXPONENT_MISSING,
           "Numbers in exponential notation should always contain an exponent"
           " (an integer number with an optional sign).",
-          howToFix:
-            "Make sure there is an exponent, and remove any whitespace "
-            "before it.",
-          examples: const ["""
+          howToFix: "Make sure there is an exponent, and remove any whitespace "
+              "before it.",
+          examples: const [
+            """
 main() {
   var i = 1e;
 }
-"""]),
+"""
+          ]),
 
-      MessageKind.HEX_DIGIT_EXPECTED:
-        const MessageTemplate(MessageKind.HEX_DIGIT_EXPECTED,
+      MessageKind.HEX_DIGIT_EXPECTED: const MessageTemplate(
+          MessageKind.HEX_DIGIT_EXPECTED,
           "A hex digit (0-9 or A-F) must follow '0x'.",
           howToFix:
-            DONT_KNOW_HOW_TO_FIX, // Seems obvious from the error message.
-          examples: const ["""
+              DONT_KNOW_HOW_TO_FIX, // Seems obvious from the error message.
+          examples: const [
+            """
 main() {
   var i = 0x;
 }
-"""]),
+"""
+          ]),
 
-      MessageKind.MALFORMED_STRING_LITERAL:
-        const MessageTemplate(MessageKind.MALFORMED_STRING_LITERAL,
+      MessageKind.MALFORMED_STRING_LITERAL: const MessageTemplate(
+          MessageKind.MALFORMED_STRING_LITERAL,
           r"A '$' has special meaning inside a string, and must be followed by "
           "an identifier or an expression in curly braces ({}).",
           howToFix: r"Try adding a backslash (\) to escape the '$'.",
-          examples: const [r"""
+          examples: const [
+            r"""
 main() {
   return '$';
 }
 """,
-r'''
+            r'''
 main() {
   return "$";
 }
 ''',
-r"""
+            r"""
 main() {
   return '''$''';
 }
 """,
-r'''
+            r'''
 main() {
   return """$""";
 }
-''']),
+'''
+          ]),
 
-      MessageKind.UNTERMINATED_COMMENT:
-        const MessageTemplate(MessageKind.UNTERMINATED_COMMENT,
+      MessageKind.UNTERMINATED_COMMENT: const MessageTemplate(
+          MessageKind.UNTERMINATED_COMMENT,
           "Comment starting with '/*' must end with '*/'.",
           howToFix: DONT_KNOW_HOW_TO_FIX,
-          examples: const [r"""
+          examples: const [
+            r"""
 main() {
 }
-/*"""]),
+/*"""
+          ]),
 
-      MessageKind.MISSING_TOKEN_BEFORE_THIS:
-        const MessageTemplate(MessageKind.MISSING_TOKEN_BEFORE_THIS,
+      MessageKind.MISSING_TOKEN_BEFORE_THIS: const MessageTemplate(
+          MessageKind.MISSING_TOKEN_BEFORE_THIS,
           "Expected '#{token}' before this.",
           // Consider the second example below: the parser expects a ')' before
           // 'y', but a ',' would also have worked. We don't have enough
           // information to give a good suggestion.
           howToFix: DONT_KNOW_HOW_TO_FIX,
           examples: const [
-              "main() => true ? 1;",
-              "main() => foo(x: 1 y: 2);",
-            ]),
+            "main() => true ? 1;",
+            "main() => foo(x: 1 y: 2);",
+          ]),
 
-      MessageKind.MISSING_TOKEN_AFTER_THIS:
-        const MessageTemplate(MessageKind.MISSING_TOKEN_AFTER_THIS,
+      MessageKind.MISSING_TOKEN_AFTER_THIS: const MessageTemplate(
+          MessageKind.MISSING_TOKEN_AFTER_THIS,
           "Expected '#{token}' after this.",
           // See [MISSING_TOKEN_BEFORE_THIS], we don't have enough information
           // to give a good suggestion.
           howToFix: DONT_KNOW_HOW_TO_FIX,
           examples: const [
-              "main(x) {x}",
-"""
+            "main(x) {x}",
+            """
 class S1 {}
 class S2 {}
 class S3 {}
 class A = S1 with S2, S3
 main() => new A();
 """
-]),
+          ]),
 
-      MessageKind.CONSIDER_ANALYZE_ALL:
-        const MessageTemplate(MessageKind.CONSIDER_ANALYZE_ALL,
+      MessageKind.CONSIDER_ANALYZE_ALL: const MessageTemplate(
+          MessageKind.CONSIDER_ANALYZE_ALL,
           "Could not find '#{main}'.  Nothing will be analyzed.",
           howToFix: "Try using '--analyze-all' to analyze everything.",
           examples: const ['']),
 
-      MessageKind.MISSING_MAIN:
-        const MessageTemplate(MessageKind.MISSING_MAIN,
-          "Could not find '#{main}'.",
+      MessageKind.MISSING_MAIN: const MessageTemplate(
+          MessageKind.MISSING_MAIN, "Could not find '#{main}'.",
           howToFix: "Try adding a method named '#{main}' to your program."
           /* No example, test uses '--analyze-only' which will produce the above
            * message [CONSIDER_ANALYZE_ALL].  An example for a human operator
-           * would be an empty file.*/),
+           * would be an empty file.*/
+          ),
 
-      MessageKind.MAIN_NOT_A_FUNCTION:
-        const MessageTemplate(MessageKind.MAIN_NOT_A_FUNCTION,
-          "'#{main}' is not a function.",
+      MessageKind.MAIN_NOT_A_FUNCTION: const MessageTemplate(
+          MessageKind.MAIN_NOT_A_FUNCTION, "'#{main}' is not a function.",
           howToFix: DONT_KNOW_HOW_TO_FIX, /* Don't state the obvious. */
           examples: const ['var main;']),
 
-      MessageKind.MAIN_WITH_EXTRA_PARAMETER:
-        const MessageTemplate(MessageKind.MAIN_WITH_EXTRA_PARAMETER,
+      MessageKind.MAIN_WITH_EXTRA_PARAMETER: const MessageTemplate(
+          MessageKind.MAIN_WITH_EXTRA_PARAMETER,
           "'#{main}' cannot have more than two parameters.",
           howToFix: DONT_KNOW_HOW_TO_FIX, /* Don't state the obvious. */
           examples: const ['main(a, b, c) {}']),
 
-      MessageKind.COMPILER_CRASHED:
-        const MessageTemplate(MessageKind.COMPILER_CRASHED,
+      MessageKind.COMPILER_CRASHED: const MessageTemplate(
+          MessageKind.COMPILER_CRASHED,
           "The compiler crashed when compiling this element."),
 
-      MessageKind.PLEASE_REPORT_THE_CRASH:
-        const MessageTemplate(MessageKind.PLEASE_REPORT_THE_CRASH, '''
+      MessageKind.PLEASE_REPORT_THE_CRASH: const MessageTemplate(
+          MessageKind.PLEASE_REPORT_THE_CRASH,
+          '''
 The compiler is broken.
 
 When compiling the above element, the compiler crashed. It is not
@@ -3121,105 +3149,104 @@
   below as well as the source location above).
 '''),
 
-      MessageKind.POTENTIAL_MUTATION:
-        const MessageTemplate(MessageKind.POTENTIAL_MUTATION,
+      MessageKind.POTENTIAL_MUTATION: const MessageTemplate(
+          MessageKind.POTENTIAL_MUTATION,
           "Variable '#{variableName}' is not known to be of type "
           "'#{shownType}' because it is potentially mutated in the scope for "
           "promotion."),
 
-      MessageKind.POTENTIAL_MUTATION_HERE:
-        const MessageTemplate(MessageKind.POTENTIAL_MUTATION_HERE,
+      MessageKind.POTENTIAL_MUTATION_HERE: const MessageTemplate(
+          MessageKind.POTENTIAL_MUTATION_HERE,
           "Variable '#{variableName}' is potentially mutated here."),
 
-      MessageKind.POTENTIAL_MUTATION_IN_CLOSURE:
-        const MessageTemplate(MessageKind.POTENTIAL_MUTATION_IN_CLOSURE,
+      MessageKind.POTENTIAL_MUTATION_IN_CLOSURE: const MessageTemplate(
+          MessageKind.POTENTIAL_MUTATION_IN_CLOSURE,
           "Variable '#{variableName}' is not known to be of type "
           "'#{shownType}' because it is potentially mutated within a closure."),
 
-      MessageKind.POTENTIAL_MUTATION_IN_CLOSURE_HERE:
-        const MessageTemplate(MessageKind.POTENTIAL_MUTATION_IN_CLOSURE_HERE,
-              "Variable '#{variableName}' is potentially mutated in a "
-              "closure here."),
+      MessageKind.POTENTIAL_MUTATION_IN_CLOSURE_HERE: const MessageTemplate(
+          MessageKind.POTENTIAL_MUTATION_IN_CLOSURE_HERE,
+          "Variable '#{variableName}' is potentially mutated in a "
+          "closure here."),
 
-      MessageKind.ACCESSED_IN_CLOSURE:
-        const MessageTemplate(MessageKind.ACCESSED_IN_CLOSURE,
+      MessageKind.ACCESSED_IN_CLOSURE: const MessageTemplate(
+          MessageKind.ACCESSED_IN_CLOSURE,
           "Variable '#{variableName}' is not known to be of type "
           "'#{shownType}' because it is accessed by a closure in the scope for "
           "promotion and potentially mutated in the scope of "
           "'#{variableName}'."),
 
-      MessageKind.ACCESSED_IN_CLOSURE_HERE:
-        const MessageTemplate(MessageKind.ACCESSED_IN_CLOSURE_HERE,
+      MessageKind.ACCESSED_IN_CLOSURE_HERE: const MessageTemplate(
+          MessageKind.ACCESSED_IN_CLOSURE_HERE,
           "Variable '#{variableName}' is accessed in a closure here."),
 
-      MessageKind.NOT_MORE_SPECIFIC:
-        const MessageTemplate(MessageKind.NOT_MORE_SPECIFIC,
+      MessageKind.NOT_MORE_SPECIFIC: const MessageTemplate(
+          MessageKind.NOT_MORE_SPECIFIC,
           "Variable '#{variableName}' is not shown to have type "
           "'#{shownType}' because '#{shownType}' is not more specific than the "
           "known type '#{knownType}' of '#{variableName}'."),
 
-      MessageKind.NOT_MORE_SPECIFIC_SUBTYPE:
-        const MessageTemplate(MessageKind.NOT_MORE_SPECIFIC_SUBTYPE,
+      MessageKind.NOT_MORE_SPECIFIC_SUBTYPE: const MessageTemplate(
+          MessageKind.NOT_MORE_SPECIFIC_SUBTYPE,
           "Variable '#{variableName}' is not shown to have type "
           "'#{shownType}' because '#{shownType}' is not a subtype of the "
           "known type '#{knownType}' of '#{variableName}'."),
 
-      MessageKind.NOT_MORE_SPECIFIC_SUGGESTION:
-        const MessageTemplate(MessageKind.NOT_MORE_SPECIFIC_SUGGESTION,
+      MessageKind.NOT_MORE_SPECIFIC_SUGGESTION: const MessageTemplate(
+          MessageKind.NOT_MORE_SPECIFIC_SUGGESTION,
           "Variable '#{variableName}' is not shown to have type "
           "'#{shownType}' because '#{shownType}' is not more specific than the "
           "known type '#{knownType}' of '#{variableName}'.",
           howToFix:
-            "Try replacing '#{shownType}' with '#{shownTypeSuggestion}'."),
+              "Try replacing '#{shownType}' with '#{shownTypeSuggestion}'."),
 
-      MessageKind.NO_COMMON_SUBTYPES:
-        const MessageTemplate(MessageKind.NO_COMMON_SUBTYPES,
-           "Types '#{left}' and '#{right}' have no common subtypes."),
+      MessageKind.NO_COMMON_SUBTYPES: const MessageTemplate(
+          MessageKind.NO_COMMON_SUBTYPES,
+          "Types '#{left}' and '#{right}' have no common subtypes."),
 
-      MessageKind.HIDDEN_WARNINGS_HINTS:
-        const MessageTemplate(MessageKind.HIDDEN_WARNINGS_HINTS,
+      MessageKind.HIDDEN_WARNINGS_HINTS: const MessageTemplate(
+          MessageKind.HIDDEN_WARNINGS_HINTS,
           "#{warnings} warning(s) and #{hints} hint(s) suppressed in #{uri}."),
 
-      MessageKind.HIDDEN_WARNINGS:
-        const MessageTemplate(MessageKind.HIDDEN_WARNINGS,
+      MessageKind.HIDDEN_WARNINGS: const MessageTemplate(
+          MessageKind.HIDDEN_WARNINGS,
           "#{warnings} warning(s) suppressed in #{uri}."),
 
-      MessageKind.HIDDEN_HINTS:
-        const MessageTemplate(MessageKind.HIDDEN_HINTS,
-          "#{hints} hint(s) suppressed in #{uri}."),
+      MessageKind.HIDDEN_HINTS: const MessageTemplate(
+          MessageKind.HIDDEN_HINTS, "#{hints} hint(s) suppressed in #{uri}."),
 
-      MessageKind.PREAMBLE:
-        const MessageTemplate(MessageKind.PREAMBLE,
-        "When run on the command-line, the compiled output might"
-        " require a preamble file located in:\n"
-        "  <sdk>/lib/_internal/js_runtime/lib/preambles."),
+      MessageKind.PREAMBLE: const MessageTemplate(
+          MessageKind.PREAMBLE,
+          "When run on the command-line, the compiled output might"
+          " require a preamble file located in:\n"
+          "  <sdk>/lib/_internal/js_runtime/lib/preambles."),
 
-      MessageKind.INVALID_SYNC_MODIFIER:
-        const MessageTemplate(MessageKind.INVALID_SYNC_MODIFIER,
-          "Invalid modifier 'sync'.",
+      MessageKind.INVALID_SYNC_MODIFIER: const MessageTemplate(
+          MessageKind.INVALID_SYNC_MODIFIER, "Invalid modifier 'sync'.",
           howToFix: "Try replacing 'sync' with 'sync*'.",
-          examples: const [
-            "main() sync {}"
-          ]),
+          examples: const ["main() sync {}"]),
 
-      MessageKind.INVALID_AWAIT_FOR:
-        const MessageTemplate(MessageKind.INVALID_AWAIT_FOR,
+      MessageKind.INVALID_AWAIT_FOR: const MessageTemplate(
+          MessageKind.INVALID_AWAIT_FOR,
           "'await' is only supported on for-in loops.",
           howToFix: "Try rewriting the loop as a for-in loop or removing the "
-                    "'await' keyword.",
-          examples: const ["""
+              "'await' keyword.",
+          examples: const [
+            """
 main() async* {
   await for (int i = 0; i < 10; i++) {}
 }
-"""]),
+"""
+          ]),
 
-      MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD:
-        const MessageTemplate(MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD,
+      MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD: const MessageTemplate(
+          MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD,
           "The modifier '#{modifier}' is not allowed on an abstract method.",
           options: const ['--enable-async'],
           howToFix: "Try removing the '#{modifier}' modifier or adding a "
-                    "body to the method.",
-          examples: const ["""
+              "body to the method.",
+          examples: const [
+            """
 abstract class A {
   method() async;
 }
@@ -3230,300 +3257,316 @@
   A a = new B();
   a.method();
 }
-"""]),
+"""
+          ]),
 
-      MessageKind.ASYNC_MODIFIER_ON_CONSTRUCTOR:
-        const MessageTemplate(MessageKind.ASYNC_MODIFIER_ON_CONSTRUCTOR,
-              "The modifier '#{modifier}' is not allowed on constructors.",
-              options: const ['--enable-async'],
-              howToFix: "Try removing the '#{modifier}' modifier.",
-              examples: const ["""
+      MessageKind.ASYNC_MODIFIER_ON_CONSTRUCTOR: const MessageTemplate(
+          MessageKind.ASYNC_MODIFIER_ON_CONSTRUCTOR,
+          "The modifier '#{modifier}' is not allowed on constructors.",
+          options: const ['--enable-async'],
+          howToFix: "Try removing the '#{modifier}' modifier.",
+          examples: const [
+            """
 class A {
   A() async;
 }
 main() => new A();""",
-
-"""
+            """
 class A {
   A();
   factory A.a() async* {}
 }
-main() => new A.a();"""]),
+main() => new A.a();"""
+          ]),
 
-      MessageKind.ASYNC_MODIFIER_ON_SETTER:
-        const MessageTemplate(MessageKind.ASYNC_MODIFIER_ON_SETTER,
-              "The modifier '#{modifier}' is not allowed on setters.",
-              options: const ['--enable-async'],
-              howToFix: "Try removing the '#{modifier}' modifier.",
-              examples: const ["""
+      MessageKind.ASYNC_MODIFIER_ON_SETTER: const MessageTemplate(
+          MessageKind.ASYNC_MODIFIER_ON_SETTER,
+          "The modifier '#{modifier}' is not allowed on setters.",
+          options: const ['--enable-async'],
+          howToFix: "Try removing the '#{modifier}' modifier.",
+          examples: const [
+            """
 class A {
   set foo(v) async {}
 }
-main() => new A().foo = 0;"""]),
+main() => new A().foo = 0;"""
+          ]),
 
-      MessageKind.YIELDING_MODIFIER_ON_ARROW_BODY:
-        const MessageTemplate(MessageKind.YIELDING_MODIFIER_ON_ARROW_BODY,
+      MessageKind.YIELDING_MODIFIER_ON_ARROW_BODY: const MessageTemplate(
+          MessageKind.YIELDING_MODIFIER_ON_ARROW_BODY,
           "The modifier '#{modifier}' is not allowed on methods implemented "
           "using '=>'.",
           options: const ['--enable-async'],
           howToFix: "Try removing the '#{modifier}' modifier or implementing "
-                    "the method body using a block: '{ ... }'.",
+              "the method body using a block: '{ ... }'.",
           examples: const ["main() sync* => null;", "main() async* => null;"]),
 
       // TODO(johnniwinther): Check for 'async' as identifier.
-      MessageKind.ASYNC_KEYWORD_AS_IDENTIFIER:
-        const MessageTemplate(MessageKind.ASYNC_KEYWORD_AS_IDENTIFIER,
+      MessageKind.ASYNC_KEYWORD_AS_IDENTIFIER: const MessageTemplate(
+          MessageKind.ASYNC_KEYWORD_AS_IDENTIFIER,
           "'#{keyword}' cannot be used as an identifier in a function body "
           "marked with '#{modifier}'.",
           options: const ['--enable-async'],
           howToFix: "Try removing the '#{modifier}' modifier or renaming the "
-                    "identifier.",
-          examples: const ["""
+              "identifier.",
+          examples: const [
+            """
 main() async {
  var await;
 }""",
-"""
+            """
 main() async* {
  var yield;
 }""",
-"""
+            """
 main() sync* {
  var yield;
-}"""]),
+}"""
+          ]),
 
-      MessageKind.NATIVE_NOT_SUPPORTED:
-        const MessageTemplate(MessageKind.NATIVE_NOT_SUPPORTED,
+      MessageKind.NATIVE_NOT_SUPPORTED: const MessageTemplate(
+          MessageKind.NATIVE_NOT_SUPPORTED,
           "'native' modifier is not supported.",
           howToFix: "Try removing the 'native' implementation or analyzing the "
-                    "code with the --allow-native-extensions option.",
-          examples: const ["""
+              "code with the --allow-native-extensions option.",
+          examples: const [
+            """
 main() native "Main";
-"""]),
+"""
+          ]),
 
-      MessageKind.DART_EXT_NOT_SUPPORTED:
-        const MessageTemplate(MessageKind.DART_EXT_NOT_SUPPORTED,
+      MessageKind.DART_EXT_NOT_SUPPORTED: const MessageTemplate(
+          MessageKind.DART_EXT_NOT_SUPPORTED,
           "The 'dart-ext' scheme is not supported.",
           howToFix: "Try analyzing the code with the --allow-native-extensions "
-                    "option.",
-          examples: const ["""
+              "option.",
+          examples: const [
+            """
 import 'dart-ext:main';
 
 main() {}
-"""]),
+"""
+          ]),
 
-      MessageKind.LIBRARY_TAG_MUST_BE_FIRST:
-        const MessageTemplate(MessageKind.LIBRARY_TAG_MUST_BE_FIRST,
+      MessageKind.LIBRARY_TAG_MUST_BE_FIRST: const MessageTemplate(
+          MessageKind.LIBRARY_TAG_MUST_BE_FIRST,
           "The library declaration should come before other declarations.",
           howToFix: "Try moving the declaration to the top of the file.",
           examples: const [
-"""
+            """
 import 'dart:core';
 library foo;
 main() {}
 """,
-      ]),
+          ]),
 
-      MessageKind.ONLY_ONE_LIBRARY_TAG:
-        const MessageTemplate(MessageKind.ONLY_ONE_LIBRARY_TAG,
+      MessageKind.ONLY_ONE_LIBRARY_TAG: const MessageTemplate(
+          MessageKind.ONLY_ONE_LIBRARY_TAG,
           "There can only be one library declaration.",
           howToFix: "Try removing all other library declarations.",
           examples: const [
-"""
+            """
 library foo;
 library bar;
 main() {}
 """,
-"""
+            """
 library foo;
 import 'dart:core';
 library bar;
 main() {}
 """,
-      ]),
+          ]),
 
-      MessageKind.IMPORT_BEFORE_PARTS:
-        const MessageTemplate(MessageKind.IMPORT_BEFORE_PARTS,
+      MessageKind.IMPORT_BEFORE_PARTS: const MessageTemplate(
+          MessageKind.IMPORT_BEFORE_PARTS,
           "Import declarations should come before parts.",
           howToFix: "Try moving this import further up in the file.",
           examples: const [
-              const <String, String>{
-                'main.dart': """
+            const <String, String>{
+              'main.dart': """
 library test.main;
 part 'part.dart';
 import 'dart:core';
 main() {}
 """,
-                'part.dart': """
+              'part.dart': """
 part of test.main;
 """,
-          }]),
+            }
+          ]),
 
-      MessageKind.EXPORT_BEFORE_PARTS:
-        const MessageTemplate(MessageKind.EXPORT_BEFORE_PARTS,
+      MessageKind.EXPORT_BEFORE_PARTS: const MessageTemplate(
+          MessageKind.EXPORT_BEFORE_PARTS,
           "Export declarations should come before parts.",
           howToFix: "Try moving this export further up in the file.",
           examples: const [
-              const <String, String>{
-                'main.dart': """
+            const <String, String>{
+              'main.dart': """
 library test.main;
 part 'part.dart';
 export 'dart:core';
 main() {}
 """,
-               'part.dart': """
+              'part.dart': """
 part of test.main;
 """,
-          }]),
+            }
+          ]),
 
-  //////////////////////////////////////////////////////////////////////////////
-  // Patch errors start.
-  //////////////////////////////////////////////////////////////////////////////
+      //////////////////////////////////////////////////////////////////////////////
+      // Patch errors start.
+      //////////////////////////////////////////////////////////////////////////////
 
-      MessageKind.PATCH_RETURN_TYPE_MISMATCH:
-        const MessageTemplate(MessageKind.PATCH_RETURN_TYPE_MISMATCH,
+      MessageKind.PATCH_RETURN_TYPE_MISMATCH: const MessageTemplate(
+          MessageKind.PATCH_RETURN_TYPE_MISMATCH,
           "Patch return type '#{patchReturnType}' does not match "
           "'#{originReturnType}' on origin method '#{methodName}'."),
 
-      MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH:
-        const MessageTemplate(
+      MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH: const MessageTemplate(
           MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH,
           "Required parameter count of patch method "
           "(#{patchParameterCount}) does not match parameter count on origin "
           "method '#{methodName}' (#{originParameterCount})."),
 
-      MessageKind.PATCH_OPTIONAL_PARAMETER_COUNT_MISMATCH:
-        const MessageTemplate(
+      MessageKind.PATCH_OPTIONAL_PARAMETER_COUNT_MISMATCH: const MessageTemplate(
           MessageKind.PATCH_OPTIONAL_PARAMETER_COUNT_MISMATCH,
           "Optional parameter count of patch method "
           "(#{patchParameterCount}) does not match parameter count on origin "
           "method '#{methodName}' (#{originParameterCount})."),
 
       MessageKind.PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH:
-        const MessageTemplate(
-          MessageKind.PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH,
-          "Optional parameters of origin and patch method "
-          "'#{methodName}' must both be either named or positional."),
+          const MessageTemplate(
+              MessageKind.PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH,
+              "Optional parameters of origin and patch method "
+              "'#{methodName}' must both be either named or positional."),
 
-      MessageKind.PATCH_PARAMETER_MISMATCH:
-        const MessageTemplate(MessageKind.PATCH_PARAMETER_MISMATCH,
+      MessageKind.PATCH_PARAMETER_MISMATCH: const MessageTemplate(
+          MessageKind.PATCH_PARAMETER_MISMATCH,
           "Patch method parameter '#{patchParameter}' does not match "
           "'#{originParameter}' on origin method '#{methodName}'."),
 
-      MessageKind.PATCH_PARAMETER_TYPE_MISMATCH:
-        const MessageTemplate(MessageKind.PATCH_PARAMETER_TYPE_MISMATCH,
+      MessageKind.PATCH_PARAMETER_TYPE_MISMATCH: const MessageTemplate(
+          MessageKind.PATCH_PARAMETER_TYPE_MISMATCH,
           "Patch method parameter '#{parameterName}' type "
           "'#{patchParameterType}' does not match '#{originParameterType}' on "
           "origin method '#{methodName}'."),
 
-      MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION:
-        const MessageTemplate(MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION,
+      MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION: const MessageTemplate(
+          MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION,
           "External method without an implementation."),
 
-      MessageKind.PATCH_POINT_TO_FUNCTION:
-        const MessageTemplate(MessageKind.PATCH_POINT_TO_FUNCTION,
+      MessageKind.PATCH_POINT_TO_FUNCTION: const MessageTemplate(
+          MessageKind.PATCH_POINT_TO_FUNCTION,
           "This is the function patch '#{functionName}'."),
 
-      MessageKind.PATCH_POINT_TO_CLASS:
-        const MessageTemplate(MessageKind.PATCH_POINT_TO_CLASS,
+      MessageKind.PATCH_POINT_TO_CLASS: const MessageTemplate(
+          MessageKind.PATCH_POINT_TO_CLASS,
           "This is the class patch '#{className}'."),
 
-      MessageKind.PATCH_POINT_TO_GETTER:
-        const MessageTemplate(MessageKind.PATCH_POINT_TO_GETTER,
+      MessageKind.PATCH_POINT_TO_GETTER: const MessageTemplate(
+          MessageKind.PATCH_POINT_TO_GETTER,
           "This is the getter patch '#{getterName}'."),
 
-      MessageKind.PATCH_POINT_TO_SETTER:
-        const MessageTemplate(MessageKind.PATCH_POINT_TO_SETTER,
+      MessageKind.PATCH_POINT_TO_SETTER: const MessageTemplate(
+          MessageKind.PATCH_POINT_TO_SETTER,
           "This is the setter patch '#{setterName}'."),
 
-      MessageKind.PATCH_POINT_TO_CONSTRUCTOR:
-        const MessageTemplate(MessageKind.PATCH_POINT_TO_CONSTRUCTOR,
+      MessageKind.PATCH_POINT_TO_CONSTRUCTOR: const MessageTemplate(
+          MessageKind.PATCH_POINT_TO_CONSTRUCTOR,
           "This is the constructor patch '#{constructorName}'."),
 
-      MessageKind.PATCH_POINT_TO_PARAMETER:
-        const MessageTemplate(MessageKind.PATCH_POINT_TO_PARAMETER,
+      MessageKind.PATCH_POINT_TO_PARAMETER: const MessageTemplate(
+          MessageKind.PATCH_POINT_TO_PARAMETER,
           "This is the patch parameter '#{parameterName}'."),
 
-      MessageKind.PATCH_NON_EXISTING:
-        const MessageTemplate(MessageKind.PATCH_NON_EXISTING,
+      MessageKind.PATCH_NON_EXISTING: const MessageTemplate(
+          MessageKind.PATCH_NON_EXISTING,
           "Origin does not exist for patch '#{name}'."),
 
       // TODO(ahe): Eventually, this error should be removed as it will be
       // handled by the regular parser.
-      MessageKind.PATCH_NONPATCHABLE:
-        const MessageTemplate(MessageKind.PATCH_NONPATCHABLE,
+      MessageKind.PATCH_NONPATCHABLE: const MessageTemplate(
+          MessageKind.PATCH_NONPATCHABLE,
           "Only classes and functions can be patched."),
 
-      MessageKind.PATCH_NON_EXTERNAL:
-        const MessageTemplate(MessageKind.PATCH_NON_EXTERNAL,
+      MessageKind.PATCH_NON_EXTERNAL: const MessageTemplate(
+          MessageKind.PATCH_NON_EXTERNAL,
           "Only external functions can be patched."),
 
-      MessageKind.PATCH_NON_CLASS:
-        const MessageTemplate(MessageKind.PATCH_NON_CLASS,
+      MessageKind.PATCH_NON_CLASS: const MessageTemplate(
+          MessageKind.PATCH_NON_CLASS,
           "Patching non-class with class patch '#{className}'."),
 
-      MessageKind.PATCH_NON_GETTER:
-        const MessageTemplate(MessageKind.PATCH_NON_GETTER,
+      MessageKind.PATCH_NON_GETTER: const MessageTemplate(
+          MessageKind.PATCH_NON_GETTER,
           "Cannot patch non-getter '#{name}' with getter patch."),
 
-      MessageKind.PATCH_NO_GETTER:
-        const MessageTemplate(MessageKind.PATCH_NO_GETTER,
+      MessageKind.PATCH_NO_GETTER: const MessageTemplate(
+          MessageKind.PATCH_NO_GETTER,
           "No getter found for getter patch '#{getterName}'."),
 
-      MessageKind.PATCH_NON_SETTER:
-        const MessageTemplate(MessageKind.PATCH_NON_SETTER,
+      MessageKind.PATCH_NON_SETTER: const MessageTemplate(
+          MessageKind.PATCH_NON_SETTER,
           "Cannot patch non-setter '#{name}' with setter patch."),
 
-      MessageKind.PATCH_NO_SETTER:
-        const MessageTemplate(MessageKind.PATCH_NO_SETTER,
+      MessageKind.PATCH_NO_SETTER: const MessageTemplate(
+          MessageKind.PATCH_NO_SETTER,
           "No setter found for setter patch '#{setterName}'."),
 
-      MessageKind.PATCH_NON_CONSTRUCTOR:
-        const MessageTemplate(MessageKind.PATCH_NON_CONSTRUCTOR,
+      MessageKind.PATCH_NON_CONSTRUCTOR: const MessageTemplate(
+          MessageKind.PATCH_NON_CONSTRUCTOR,
           "Cannot patch non-constructor with constructor patch "
           "'#{constructorName}'."),
 
-      MessageKind.PATCH_NON_FUNCTION:
-        const MessageTemplate(MessageKind.PATCH_NON_FUNCTION,
+      MessageKind.PATCH_NON_FUNCTION: const MessageTemplate(
+          MessageKind.PATCH_NON_FUNCTION,
           "Cannot patch non-function with function patch "
           "'#{functionName}'."),
 
-      MessageKind.INJECTED_PUBLIC_MEMBER:
-        const MessageTemplate(MessageKind.INJECTED_PUBLIC_MEMBER,
-            "Non-patch members in patch libraries must be private."),
+      MessageKind.INJECTED_PUBLIC_MEMBER: const MessageTemplate(
+          MessageKind.INJECTED_PUBLIC_MEMBER,
+          "Non-patch members in patch libraries must be private."),
 
-      MessageKind.EXTERNAL_WITH_BODY:
-        const MessageTemplate(MessageKind.EXTERNAL_WITH_BODY,
+      MessageKind.EXTERNAL_WITH_BODY: const MessageTemplate(
+          MessageKind.EXTERNAL_WITH_BODY,
           "External function '#{functionName}' cannot have a function body.",
           options: const ["--output-type=dart"],
           howToFix:
-            "Try removing the 'external' modifier or the function body.",
-          examples: const ["""
+              "Try removing the 'external' modifier or the function body.",
+          examples: const [
+            """
 external foo() => 0;
 main() => foo();
-""", """
+""",
+            """
 external foo() {}
 main() => foo();
-"""]),
+"""
+          ]),
 
-  //////////////////////////////////////////////////////////////////////////////
-  // Patch errors end.
-  //////////////////////////////////////////////////////////////////////////////
+      //////////////////////////////////////////////////////////////////////////////
+      // Patch errors end.
+      //////////////////////////////////////////////////////////////////////////////
 
-      MessageKind.EXPERIMENTAL_ASSERT_MESSAGE:
-        const MessageTemplate(MessageKind.EXPERIMENTAL_ASSERT_MESSAGE,
+      MessageKind.EXPERIMENTAL_ASSERT_MESSAGE: const MessageTemplate(
+          MessageKind.EXPERIMENTAL_ASSERT_MESSAGE,
           "Experimental language feature 'assertion with message'"
           " is not supported.",
           howToFix:
-            "Use option '--assert-message' to use assertions with messages.",
-          examples: const [r'''
+              "Use option '--assert-message' to use assertions with messages.",
+          examples: const [
+            r'''
 main() {
   int n = -7;
   assert(n > 0, 'must be positive: $n');
 }
-''']),
+'''
+          ]),
 
-      MessageKind.IMPORT_EXPERIMENTAL_MIRRORS:
-        const MessageTemplate(MessageKind.IMPORT_EXPERIMENTAL_MIRRORS, r'''
+      MessageKind.IMPORT_EXPERIMENTAL_MIRRORS: const MessageTemplate(
+          MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
+          r'''
 
 ****************************************************************
 * WARNING: dart:mirrors support in dart2js is experimental,
@@ -3532,7 +3575,8 @@
 *          and often greatly increases the size of the generated
 *          JavaScript code.
 *
-* Your app imports dart:mirrors via:''''''
+* Your app imports dart:mirrors via:'''
+          '''
 $IMPORT_EXPERIMENTAL_MIRRORS_PADDING#{importChain}
 *
 * You can disable this message by using the --enable-experimental-mirrors
@@ -3543,57 +3587,58 @@
 ****************************************************************
 '''),
 
-      MessageKind.DISALLOWED_LIBRARY_IMPORT:
-        const MessageTemplate(MessageKind.DISALLOWED_LIBRARY_IMPORT, '''
+      MessageKind.DISALLOWED_LIBRARY_IMPORT: const MessageTemplate(
+          MessageKind.DISALLOWED_LIBRARY_IMPORT,
+          '''
 Your app imports the unsupported library '#{uri}' via:
-''''''
+'''
+          '''
 $DISALLOWED_LIBRARY_IMPORT_PADDING#{importChain}
 
 Use the --categories option to support import of '#{uri}'.
 '''),
 
-      MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND:
-        const MessageTemplate(
+      MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND: const MessageTemplate(
           MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND,
           """
 dart:mirrors library is not supported when using this backend.
 
-Your app imports dart:mirrors via:""""""
+Your app imports dart:mirrors via:"""
+          """
 $MIRRORS_NOT_SUPPORTED_BY_BACKEND_PADDING#{importChain}"""),
 
-      MessageKind.CALL_NOT_SUPPORTED_ON_NATIVE_CLASS:
-        const MessageTemplate(MessageKind.CALL_NOT_SUPPORTED_ON_NATIVE_CLASS,
+      MessageKind.CALL_NOT_SUPPORTED_ON_NATIVE_CLASS: const MessageTemplate(
+          MessageKind.CALL_NOT_SUPPORTED_ON_NATIVE_CLASS,
           "Non-supported 'call' member on a native class, or a "
           "subclass of a native class."),
 
-      MessageKind.DIRECTLY_THROWING_NSM:
-        const MessageTemplate(MessageKind.DIRECTLY_THROWING_NSM,
+      MessageKind.DIRECTLY_THROWING_NSM: const MessageTemplate(
+          MessageKind.DIRECTLY_THROWING_NSM,
           "This 'noSuchMethod' implementation is guaranteed to throw an "
           "exception. The generated code will be smaller if it is "
           "rewritten.",
           howToFix: "Rewrite to "
-                    "'noSuchMethod(Invocation i) => super.noSuchMethod(i);'."),
+              "'noSuchMethod(Invocation i) => super.noSuchMethod(i);'."),
 
-      MessageKind.COMPLEX_THROWING_NSM:
-        const MessageTemplate(MessageKind.COMPLEX_THROWING_NSM,
+      MessageKind.COMPLEX_THROWING_NSM: const MessageTemplate(
+          MessageKind.COMPLEX_THROWING_NSM,
           "This 'noSuchMethod' implementation is guaranteed to throw an "
           "exception. The generated code will be smaller and the compiler "
           "will be able to perform more optimizations if it is rewritten.",
           howToFix: "Rewrite to "
-                    "'noSuchMethod(Invocation i) => super.noSuchMethod(i);'."),
+              "'noSuchMethod(Invocation i) => super.noSuchMethod(i);'."),
 
-      MessageKind.COMPLEX_RETURNING_NSM:
-        const MessageTemplate(MessageKind.COMPLEX_RETURNING_NSM,
+      MessageKind.COMPLEX_RETURNING_NSM: const MessageTemplate(
+          MessageKind.COMPLEX_RETURNING_NSM,
           "Overriding 'noSuchMethod' causes the compiler to generate "
           "more code and prevents the compiler from doing some optimizations.",
           howToFix: "Consider removing this 'noSuchMethod' implementation."),
 
-      MessageKind.UNRECOGNIZED_VERSION_OF_LOOKUP_MAP:
-        const MessageTemplate(MessageKind.UNRECOGNIZED_VERSION_OF_LOOKUP_MAP,
+      MessageKind.UNRECOGNIZED_VERSION_OF_LOOKUP_MAP: const MessageTemplate(
+          MessageKind.UNRECOGNIZED_VERSION_OF_LOOKUP_MAP,
           "Unsupported version of package:lookup_map.",
           howToFix: DONT_KNOW_HOW_TO_FIX),
-
-  }); // End of TEMPLATES.
+    }); // End of TEMPLATES.
 
   /// Padding used before and between import chains in the message for
   /// [MessageKind.IMPORT_EXPERIMENTAL_MIRRORS].
@@ -3623,7 +3668,10 @@
   String message;
 
   Message(this.template, this.arguments, this.terse) {
-    assert(() { computeMessage(); return true; });
+    assert(() {
+      computeMessage();
+      return true;
+    });
   }
 
   MessageKind get kind => template.kind;
@@ -3637,7 +3685,7 @@
       assert(invariant(
           CURRENT_ELEMENT_SPANNABLE,
           kind == MessageKind.GENERIC ||
-            !message.contains(new RegExp(r'#\{.+\}')),
+              !message.contains(new RegExp(r'#\{.+\}')),
           message: 'Missing arguments in error message: "$message"'));
       if (!terse && template.hasHowToFix) {
         String howToFix = template.howToFix;
@@ -3654,8 +3702,8 @@
     return computeMessage();
   }
 
-  bool operator==(other) {
-    if (other is !Message) return false;
+  bool operator ==(other) {
+    if (other is! Message) return false;
     return (template == other.template) && (toString() == other.toString());
   }
 
diff --git a/pkg/compiler/lib/src/diagnostics/source_span.dart b/pkg/compiler/lib/src/diagnostics/source_span.dart
index 25bdc6c..d53ebae 100644
--- a/pkg/compiler/lib/src/diagnostics/source_span.dart
+++ b/pkg/compiler/lib/src/diagnostics/source_span.dart
@@ -4,12 +4,9 @@
 
 library dart2js.diagnostics.source_span;
 
-import '../tokens/token.dart' show
-    Token;
-import '../tree/tree.dart' show
-    Node;
-import 'spannable.dart' show
-    Spannable;
+import '../tokens/token.dart' show Token;
+import '../tree/tree.dart' show Node;
+import 'spannable.dart' show Spannable;
 
 class SourceSpan implements Spannable {
   final Uri uri;
@@ -34,17 +31,13 @@
   }
 
   int get hashCode {
-    return 13 * uri.hashCode +
-           17 * begin.hashCode +
-           19 * end.hashCode;
+    return 13 * uri.hashCode + 17 * begin.hashCode + 19 * end.hashCode;
   }
 
   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;
+    return uri == other.uri && begin == other.begin && end == other.end;
   }
 
   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 ea9ae1f..3c8b6d1 100644
--- a/pkg/compiler/lib/src/diagnostics/spannable.dart
+++ b/pkg/compiler/lib/src/diagnostics/spannable.dart
@@ -28,8 +28,7 @@
 /// Sentinel spannable used to mark that there might be no location for the
 /// diagnostic. Use this only when it is not an error not to have a current
 /// element.
-const Spannable NO_LOCATION_SPANNABLE =
-    const _SpannableSentinel("No location");
+const Spannable NO_LOCATION_SPANNABLE = const _SpannableSentinel("No location");
 
 class SpannableAssertionFailure {
   final Spannable node;
@@ -37,5 +36,5 @@
   SpannableAssertionFailure(this.node, this.message);
 
   String toString() => 'Assertion failure'
-                       '${message != null ? ': $message' : ''}';
+      '${message != null ? ': $message' : ''}';
 }
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index d909a47..726d914 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -4,41 +4,26 @@
 
 library dump_info;
 
-import 'dart:convert' show
-    ChunkedConversionSink,
-    HtmlEscape,
-    JsonEncoder,
-    StringConversionSink;
+import 'dart:convert'
+    show ChunkedConversionSink, HtmlEscape, JsonEncoder, StringConversionSink;
 
 import 'package:dart2js_info/info.dart';
 
 import 'common.dart';
-import 'common/tasks.dart' show
-    CompilerTask;
-import 'constants/values.dart' show
-    ConstantValue,
-    InterceptorConstantValue;
-import 'compiler.dart' show
-    Compiler;
-import 'deferred_load.dart' show
-    OutputUnit;
+import 'common/tasks.dart' show CompilerTask;
+import 'constants/values.dart' show ConstantValue, InterceptorConstantValue;
+import 'compiler.dart' show Compiler;
+import 'deferred_load.dart' show OutputUnit;
 import 'elements/elements.dart';
 import 'elements/visitor.dart';
-import 'info/send_info.dart' show
-    collectSendMeasurements;
-import 'js_backend/js_backend.dart' show
-    JavaScriptBackend;
-import 'js_emitter/full_emitter/emitter.dart' as full show
-    Emitter;
+import 'info/send_info.dart' show collectSendMeasurements;
+import 'js_backend/js_backend.dart' show JavaScriptBackend;
+import 'js_emitter/full_emitter/emitter.dart' as full show Emitter;
 import 'js/js.dart' as jsAst;
-import 'types/types.dart' show
-    TypeMask;
-import 'universe/universe.dart' show
-    ReceiverConstraint;
-import 'universe/world_impact.dart' show
-    ImpactUseCase,
-    WorldImpact,
-    WorldImpactVisitorImpl;
+import 'types/types.dart' show TypeMask;
+import 'universe/universe.dart' show ReceiverConstraint;
+import 'universe/world_impact.dart'
+    show ImpactUseCase, WorldImpact, WorldImpactVisitorImpl;
 
 class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
   final Compiler compiler;
@@ -431,7 +416,7 @@
   }
 
   void registerImpact(Element element, WorldImpact impact) {
-    if (compiler.dumpInfo) {
+    if (compiler.options.dumpInfo) {
       impacts[element] = impact;
     }
   }
@@ -453,16 +438,13 @@
     compiler.impactStrategy.visitImpact(
         element,
         impact,
-        new WorldImpactVisitorImpl(
-            visitDynamicUse: (dynamicUse) {
-              selections.addAll(compiler.world.allFunctions
-                        .filter(dynamicUse.selector, dynamicUse.mask)
-                        .map((e) => new Selection(e, dynamicUse.mask)));
-            },
-            visitStaticUse: (staticUse) {
-              selections.add(new Selection(staticUse.element, null));
-            }
-        ),
+        new WorldImpactVisitorImpl(visitDynamicUse: (dynamicUse) {
+          selections.addAll(compiler.world.allFunctions
+              .filter(dynamicUse.selector, dynamicUse.mask)
+              .map((e) => new Selection(e, dynamicUse.mask)));
+        }, visitStaticUse: (staticUse) {
+          selections.add(new Selection(staticUse.element, null));
+        }),
         IMPACT_USE);
     return selections;
   }
@@ -470,7 +452,7 @@
   // Returns true if we care about tracking the size of
   // this node.
   bool isTracking(jsAst.Node code) {
-    if (compiler.dumpInfo) {
+    if (compiler.options.dumpInfo) {
       return _tracking.contains(code);
     } else {
       return false;
@@ -480,7 +462,7 @@
   // Registers that a javascript AST node `code` was produced by the
   // dart Element `element`.
   void registerElementAst(Element element, jsAst.Node code) {
-    if (compiler.dumpInfo) {
+    if (compiler.options.dumpInfo) {
       _elementToNodes
           .putIfAbsent(element, () => new List<jsAst.Node>())
           .add(code);
@@ -489,7 +471,7 @@
   }
 
   void registerConstantAst(ConstantValue constant, jsAst.Node code) {
-    if (compiler.dumpInfo) {
+    if (compiler.options.dumpInfo) {
       assert(_constantToNode[constant] == null ||
           _constantToNode[constant] == code);
       _constantToNode[constant] = code;
@@ -594,13 +576,14 @@
     result.program = new ProgramInfo(
         entrypoint: infoCollector._elementToInfo[compiler.mainFunction],
         size: _programSize,
-        dart2jsVersion: compiler.hasBuildId ? compiler.buildId : null,
+        dart2jsVersion:
+            compiler.options.hasBuildId ? compiler.options.buildId : null,
         compilationMoment: new DateTime.now(),
         compilationDuration: compiler.totalCompileTime.elapsed,
         toJsonDuration: stopwatch.elapsedMilliseconds,
         dumpInfoDuration: this.timing,
         noSuchMethodEnabled: compiler.backend.enabledNoSuchMethod,
-        minified: compiler.enableMinification);
+        minified: compiler.options.enableMinification);
 
     ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
         new StringConversionSink.fromStringSink(buffer));
diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
index 1e24ff0..bbc682a 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -6,15 +6,10 @@
 
 library elements.common;
 
-import '../common/names.dart' show
-    Names,
-    Uris;
-import '../dart_types.dart' show
-    DartType,
-    InterfaceType,
-    FunctionType;
-import '../util/util.dart' show
-    Link;
+import '../common/names.dart' show Names, Uris;
+import '../core_types.dart' show CoreClasses;
+import '../dart_types.dart' show DartType, InterfaceType, FunctionType;
+import '../util/util.dart' show Link;
 
 import 'elements.dart';
 
@@ -50,7 +45,7 @@
   bool get isSetter => kind == ElementKind.SETTER;
 
   @override
-  bool get isConstructor => isGenerativeConstructor ||  isFactoryConstructor;
+  bool get isConstructor => isGenerativeConstructor || isFactoryConstructor;
 
   @override
   bool get isGenerativeConstructor =>
@@ -60,8 +55,7 @@
   bool get isGenerativeConstructorBody =>
       kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY;
 
-  bool get isFactoryConstructor =>
-      kind == ElementKind.FACTORY_CONSTRUCTOR;
+  bool get isFactoryConstructor => kind == ElementKind.FACTORY_CONSTRUCTOR;
 
   @override
   bool get isVariable => kind == ElementKind.VARIABLE;
@@ -123,6 +117,19 @@
   Element get origin {
     throw new UnsupportedError('origin is not supported on $this');
   }
+
+  @override
+  ClassElement get contextClass {
+    ClassElement cls;
+    for (Element e = this; e != null; e = e.enclosingElement) {
+      if (e.isClass) {
+        // Record [e] instead of returning it directly. We need the last class
+        // in the chain since the first classes might be closure classes.
+        cls = e.declaration;
+      }
+    }
+    return cls;
+  }
 }
 
 abstract class LibraryElementCommon implements LibraryElement {
@@ -163,7 +170,6 @@
 }
 
 abstract class ClassElementCommon implements ClassElement {
-
   @override
   Link<DartType> get allSupertypes => allSupertypesAndSelf.supertypes;
 
@@ -182,7 +188,6 @@
     return result != null && result.isConstructor ? result : null;
   }
 
-
   /**
    * Find the first member in the class chain with the given [memberName].
    *
@@ -206,8 +211,8 @@
     bool isPrivate = memberName.isPrivate;
     LibraryElement library = memberName.library;
     for (ClassElement current = isSuperLookup ? superclass : this;
-         current != null;
-         current = current.superclass) {
+        current != null;
+        current = current.superclass) {
       Element member = current.lookupLocalMember(name);
       if (member == null && current.isPatched) {
         // Doing lookups on selectors is done after resolution, so it
@@ -236,7 +241,7 @@
             return getter;
           }
         }
-      // Abstract members can be defined in a super class.
+        // Abstract members can be defined in a super class.
       } else if (!member.isAbstract) {
         return member;
       }
@@ -280,8 +285,8 @@
    * This will ignore constructors.
    */
   @override
-  Element lookupSuperMemberInLibrary(String memberName,
-                                     LibraryElement library) {
+  Element lookupSuperMemberInLibrary(
+      String memberName, LibraryElement library) {
     bool isPrivate = Name.isPrivateName(memberName);
     for (ClassElement s = superclass; s != null; s = s.superclass) {
       // Private members from a different library are not visible.
@@ -317,8 +322,7 @@
   // TODO(johnniwinther): Clean up lookup to get rid of the include predicates.
   @override
   void forEachMember(void f(ClassElement enclosingClass, Element member),
-                     {includeBackendMembers: false,
-                      includeSuperAndInjectedMembers: false}) {
+      {includeBackendMembers: false, includeSuperAndInjectedMembers: false}) {
     bool includeInjectedMembers = includeSuperAndInjectedMembers || isPatch;
     ClassElement classElement = declaration;
     do {
@@ -331,15 +335,14 @@
         classElement.forEachBackendMember((e) => f(classElement, e));
       }
       if (includeInjectedMembers) {
-        if (classElement.patch != null) {
+        if (classElement.isPatched) {
           classElement.patch.forEachLocalMember((e) {
             if (!e.isPatch) f(classElement, e);
           });
         }
       }
-      classElement = includeSuperAndInjectedMembers
-          ? classElement.superclass
-          : null;
+      classElement =
+          includeSuperAndInjectedMembers ? classElement.superclass : null;
     } while (classElement != null);
   }
 
@@ -353,9 +356,9 @@
    * origin and in the patch are included.
    */
   @override
-  void forEachInstanceField(void f(ClassElement enclosingClass,
-                                   FieldElement field),
-                            {bool includeSuperAndInjectedMembers: false}) {
+  void forEachInstanceField(
+      void f(ClassElement enclosingClass, FieldElement field),
+      {bool includeSuperAndInjectedMembers: false}) {
     // Filters so that [f] is only invoked with instance fields.
     void fieldFilter(ClassElement enclosingClass, Element member) {
       if (member.isInstanceMember && member.kind == ElementKind.FIELD) {
@@ -417,6 +420,11 @@
   }
 
   @override
+  bool implementsFunction(CoreClasses coreClasses) {
+    return asInstanceOf(coreClasses.functionClass) != null || callType != null;
+  }
+
+  @override
   bool isSubclassOf(ClassElement cls) {
     // Use [declaration] for both [this] and [cls], because
     // declaration classes hold the superclass hierarchy.
@@ -477,8 +485,8 @@
       if (requiredParameterCount != signature.requiredParameterCount) {
         return false;
       }
-      Set<String> names = optionalParameters.map(
-          (Element element) => element.name).toSet();
+      Set<String> names =
+          optionalParameters.map((Element element) => element.name).toSet();
       for (Element namedParameter in signature.optionalParameters) {
         if (!names.contains(namedParameter.name)) {
           return false;
@@ -491,9 +499,42 @@
       // optional parameters is not a problem, they simply are never provided
       // by call sites of a call to a method with the other signature.
       int otherTotalCount = signature.parameterCount;
-      return requiredParameterCount <= otherTotalCount
-          && parameterCount >= otherTotalCount;
+      return requiredParameterCount <= otherTotalCount &&
+          parameterCount >= otherTotalCount;
     }
     return true;
   }
 }
+
+abstract class MixinApplicationElementCommon
+    implements MixinApplicationElement {
+  Link<ConstructorElement> get constructors {
+    throw new UnsupportedError('Unimplemented $this.constructors');
+  }
+
+  FunctionElement _lookupLocalConstructor(String name) {
+    for (Link<Element> link = constructors; !link.isEmpty; link = link.tail) {
+      if (link.head.name == name) return link.head;
+    }
+    return null;
+  }
+
+  @override
+  Element localLookup(String name) {
+    Element constructor = _lookupLocalConstructor(name);
+    if (constructor != null) return constructor;
+    if (mixin == null) return null;
+    Element mixedInElement = mixin.localLookup(name);
+    if (mixedInElement == null) return null;
+    return mixedInElement.isInstanceMember ? mixedInElement : null;
+  }
+
+  @override
+  void forEachLocalMember(void f(Element member)) {
+    constructors.forEach(f);
+    if (mixin != null)
+      mixin.forEachLocalMember((Element mixedInElement) {
+      if (mixedInElement.isInstanceMember) f(mixedInElement);
+    });
+  }
+}
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index 469081c..86a5f41 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -5,25 +5,18 @@
 library elements;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Resolution;
-import '../compiler.dart' show
-    Compiler;
+import '../common/resolution.dart' show Resolution;
+import '../compiler.dart' show Compiler;
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
-import '../core_types.dart' show
-    CoreClasses;
+import '../core_types.dart' show CoreClasses;
 import '../dart_types.dart';
-import '../resolution/scope.dart' show
-    Scope;
-import '../resolution/tree_elements.dart' show
-    TreeElements;
+import '../resolution/scope.dart' show Scope;
+import '../resolution/tree_elements.dart' show TreeElements;
 import '../ordered_typeset.dart' show OrderedTypeSet;
 import '../script.dart';
-import '../tokens/token.dart' show
-    Token,
-    isUserDefinableOperator,
-    isMinusOperator;
+import '../tokens/token.dart'
+    show Token, isUserDefinableOperator, isMinusOperator;
 import '../tree/tree.dart';
 import '../util/characters.dart' show $_;
 import '../util/util.dart';
@@ -430,9 +423,8 @@
   }
 
   /// Unwraps [element] reporting any warnings attached to it, if any.
-  static Element unwrap(Element element,
-                        DiagnosticReporter listener,
-                        Spannable spannable) {
+  static Element unwrap(
+      Element element, DiagnosticReporter listener, Spannable spannable) {
     if (element != null && element.isWarnOnUse) {
       WarnOnUseElement wrappedElement = element;
       element = wrappedElement.unwrap(listener, spannable);
@@ -450,11 +442,11 @@
   }
 
   static bool isInstanceField(Element element) {
-    return !Elements.isUnresolved(element)
-           && element.isInstanceMember
-           && (identical(element.kind, ElementKind.FIELD)
-               || identical(element.kind, ElementKind.GETTER)
-               || identical(element.kind, ElementKind.SETTER));
+    return !Elements.isUnresolved(element) &&
+        element.isInstanceMember &&
+        (identical(element.kind, ElementKind.FIELD) ||
+            identical(element.kind, ElementKind.GETTER) ||
+            identical(element.kind, ElementKind.SETTER));
   }
 
   static bool isStaticOrTopLevel(Element element) {
@@ -464,14 +456,14 @@
     // `element.isTopLevel` is true.
     if (Elements.isUnresolved(element)) return false;
     if (element.isStatic || element.isTopLevel) return true;
-    return !element.isAmbiguous
-           && !element.isInstanceMember
-           && !element.isPrefix
-           && element.enclosingElement != null
-           && (element.enclosingElement.kind == ElementKind.CLASS ||
-               element.enclosingElement.kind == ElementKind.COMPILATION_UNIT ||
-               element.enclosingElement.kind == ElementKind.LIBRARY ||
-               element.enclosingElement.kind == ElementKind.PREFIX);
+    return !element.isAmbiguous &&
+        !element.isInstanceMember &&
+        !element.isPrefix &&
+        element.enclosingElement != null &&
+        (element.enclosingElement.kind == ElementKind.CLASS ||
+            element.enclosingElement.kind == ElementKind.COMPILATION_UNIT ||
+            element.enclosingElement.kind == ElementKind.LIBRARY ||
+            element.enclosingElement.kind == ElementKind.PREFIX);
   }
 
   static bool isInStaticContext(Element element) {
@@ -495,10 +487,10 @@
   }
 
   static bool isStaticOrTopLevelField(Element element) {
-    return isStaticOrTopLevel(element)
-           && (identical(element.kind, ElementKind.FIELD)
-               || identical(element.kind, ElementKind.GETTER)
-               || identical(element.kind, ElementKind.SETTER));
+    return isStaticOrTopLevel(element) &&
+        (identical(element.kind, ElementKind.FIELD) ||
+            identical(element.kind, ElementKind.GETTER) ||
+            identical(element.kind, ElementKind.SETTER));
   }
 
   static bool isStaticOrTopLevelFunction(Element element) {
@@ -506,9 +498,9 @@
   }
 
   static bool isInstanceMethod(Element element) {
-    return !Elements.isUnresolved(element)
-           && element.isInstanceMember
-           && (identical(element.kind, ElementKind.FUNCTION));
+    return !Elements.isUnresolved(element) &&
+        element.isInstanceMember &&
+        (identical(element.kind, ElementKind.FUNCTION));
   }
 
   /// Also returns true for [ConstructorBodyElement]s and getters/setters.
@@ -526,8 +518,8 @@
     Element element = elements[send];
     if (element == null) return !isClosureSend(send, element);
     return isInstanceMethod(element) ||
-           isInstanceField(element) ||
-           (send.isConditional && !element.isStatic);
+        isInstanceField(element) ||
+        (send.isConditional && !element.isStatic);
   }
 
   static bool isClosureSend(Send send, Element element) {
@@ -561,8 +553,8 @@
     }
   }
 
-  static String constructorNameForDiagnostics(String className,
-                                              String constructorName) {
+  static String constructorNameForDiagnostics(
+      String className, String constructorName) {
     String classNameString = className;
     String constructorNameString = constructorName;
     return (constructorName == '')
@@ -644,8 +636,10 @@
 
   static String constructOperatorName(String op, bool isUnary) {
     String operatorName = constructOperatorNameOrNull(op, isUnary);
-    if (operatorName == null) throw 'Unhandled operator: $op';
-    else return operatorName;
+    if (operatorName == null)
+      throw 'Unhandled operator: $op';
+    else
+      return operatorName;
   }
 
   static String mapToUserOperatorOrNull(String op) {
@@ -706,49 +700,46 @@
     return elements.toList()..sort(compareByPosition);
   }
 
-  static bool isFixedListConstructorCall(Element element,
-                                         Send node,
-                                         Compiler compiler) {
-    return element == compiler.unnamedListConstructor
-        && node.isCall
-        && !node.arguments.isEmpty
-        && node.arguments.tail.isEmpty;
+  static bool isFixedListConstructorCall(
+      Element element, Send node, Compiler compiler) {
+    return element == compiler.unnamedListConstructor &&
+        node.isCall &&
+        !node.arguments.isEmpty &&
+        node.arguments.tail.isEmpty;
   }
 
-  static bool isGrowableListConstructorCall(Element element,
-                                            Send node,
-                                            Compiler compiler) {
-    return element == compiler.unnamedListConstructor
-        && node.isCall
-        && node.arguments.isEmpty;
+  static bool isGrowableListConstructorCall(
+      Element element, Send node, Compiler compiler) {
+    return element == compiler.unnamedListConstructor &&
+        node.isCall &&
+        node.arguments.isEmpty;
   }
 
-  static bool isFilledListConstructorCall(Element element,
-                                          Send node,
-                                          Compiler compiler) {
-    return element == compiler.filledListConstructor
-        && node.isCall
-        && !node.arguments.isEmpty
-        && !node.arguments.tail.isEmpty
-        && node.arguments.tail.tail.isEmpty;
+  static bool isFilledListConstructorCall(
+      Element element, Send node, Compiler compiler) {
+    return element == compiler.filledListConstructor &&
+        node.isCall &&
+        !node.arguments.isEmpty &&
+        !node.arguments.tail.isEmpty &&
+        node.arguments.tail.tail.isEmpty;
   }
 
-  static bool isConstructorOfTypedArraySubclass(Element element,
-                                                Compiler compiler) {
+  static bool isConstructorOfTypedArraySubclass(
+      Element element, Compiler compiler) {
     if (compiler.typedDataLibrary == null) return false;
     if (!element.isConstructor) return false;
     ConstructorElement constructor = element.implementation;
     constructor = constructor.effectiveTarget;
     ClassElement cls = constructor.enclosingClass;
-    return cls.library == compiler.typedDataLibrary
-        && compiler.backend.isNative(cls)
-        && compiler.world.isSubtypeOf(cls, compiler.typedDataClass)
-        && compiler.world.isSubtypeOf(cls, compiler.coreClasses.listClass)
-        && constructor.name == '';
+    return cls.library == compiler.typedDataLibrary &&
+        compiler.backend.isNative(cls) &&
+        compiler.world.isSubtypeOf(cls, compiler.typedDataClass) &&
+        compiler.world.isSubtypeOf(cls, compiler.coreClasses.listClass) &&
+        constructor.name == '';
   }
 
-  static bool switchStatementHasContinue(SwitchStatement node,
-                                         TreeElements elements) {
+  static bool switchStatementHasContinue(
+      SwitchStatement node, TreeElements elements) {
     for (SwitchCase switchCase in node.cases) {
       for (Node labelOrCase in switchCase.labelsAndCases) {
         Node label = labelOrCase.asLabel();
@@ -946,7 +937,6 @@
 /// A type alias definition.
 abstract class TypedefElement extends Element
     implements AstElement, TypeDeclarationElement, FunctionTypedElement {
-
   /// The type defined by this typedef with the type variables as its type
   /// arguments.
   ///
@@ -997,8 +987,7 @@
 
 /// A function, variable or parameter defined in an executable context.
 abstract class LocalElement extends Element
-    implements AstElement, TypedElement, Local {
-}
+    implements AstElement, TypedElement, Local {}
 
 /// A top level, static or instance field, a formal parameter or local variable.
 abstract class VariableElement extends ExecutableElement {
@@ -1033,12 +1022,10 @@
 /// The executable context is the [ExecutableElement] in which this variable
 /// is defined.
 abstract class LocalVariableElement extends VariableElement
-    implements LocalElement {
-}
+    implements LocalElement {}
 
 /// A top-level, static or instance field.
-abstract class FieldElement extends VariableElement implements MemberElement {
-}
+abstract class FieldElement extends VariableElement implements MemberElement {}
 
 /// A parameter-like element of a function signature.
 ///
@@ -1086,8 +1073,7 @@
 /// A formal parameter on a function or constructor that introduces a local
 /// variable in the scope of the function or constructor.
 abstract class LocalParameterElement extends ParameterElement
-    implements LocalVariableElement {
-}
+    implements LocalVariableElement {}
 
 /// A formal parameter in a constructor that directly initializes a field.
 ///
@@ -1138,10 +1124,11 @@
 /// A top level, static or instance method, constructor, local function, or
 /// closure (anonymous local function).
 abstract class FunctionElement extends Element
-    implements AstElement,
-               TypedElement,
-               FunctionTypedElement,
-               ExecutableElement {
+    implements
+        AstElement,
+        TypedElement,
+        FunctionTypedElement,
+        ExecutableElement {
   FunctionExpression get node;
 
   FunctionElement get patch;
@@ -1212,14 +1199,11 @@
 }
 
 /// A top level, static or instance function.
-abstract class MethodElement extends FunctionElement
-    implements MemberElement {
-}
+abstract class MethodElement extends FunctionElement implements MemberElement {}
 
 /// A local function or closure (anonymous local function).
 abstract class LocalFunctionElement extends FunctionElement
-    implements LocalElement {
-}
+    implements LocalElement {}
 
 /// A constructor.
 abstract class ConstructorElement extends FunctionElement
@@ -1466,19 +1450,18 @@
   Element lookupBackendMember(String memberName);
   Element lookupSuperMember(String memberName);
 
-  Element lookupSuperMemberInLibrary(String memberName,
-                                     LibraryElement library);
+  Element lookupSuperMemberInLibrary(String memberName, LibraryElement library);
 
   ConstructorElement lookupDefaultConstructor();
   ConstructorElement lookupConstructor(String name);
 
   void forEachMember(void f(ClassElement enclosingClass, Element member),
-                     {bool includeBackendMembers: false,
-                      bool includeSuperAndInjectedMembers: false});
+      {bool includeBackendMembers: false,
+      bool includeSuperAndInjectedMembers: false});
 
-  void forEachInstanceField(void f(ClassElement enclosingClass,
-                                   FieldElement field),
-                            {bool includeSuperAndInjectedMembers: false});
+  void forEachInstanceField(
+      void f(ClassElement enclosingClass, FieldElement field),
+      {bool includeSuperAndInjectedMembers: false});
 
   /// Similar to [forEachInstanceField] but visits static fields.
   void forEachStaticField(void f(ClassElement enclosingClass, Element field));
@@ -1505,14 +1488,21 @@
 abstract class MixinApplicationElement extends ClassElement {
   ClassElement get mixin;
   InterfaceType get mixinType;
-  void set mixinType(InterfaceType value);
-  void addConstructor(FunctionElement constructor);
 }
 
 /// Enum declaration.
 abstract class EnumClassElement extends ClassElement {
   /// The static fields implied by the enum values.
-  List<FieldElement> get enumValues;
+  List<EnumConstantElement> get enumValues;
+}
+
+/// An enum constant value.
+abstract class EnumConstantElement extends FieldElement {
+  /// The enum that declared this constant.
+  EnumClassElement get enclosingClass;
+
+  /// The index of this constant within the values of the enum.
+  int get index;
 }
 
 /// The label entity defined by a labeled statement.
@@ -1725,4 +1715,3 @@
   /// if any. Otherwise [implementation] points to the member itself.
   Member get implementation;
 }
-
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 121a882..fe64aec 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -5,47 +5,29 @@
 library elements.modelx;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Resolution,
-    Parsing;
-import '../compiler.dart' show
-    Compiler;
+import '../common/resolution.dart' show Resolution, Parsing;
+import '../compiler.dart' show Compiler;
 import '../constants/constant_constructors.dart';
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
-import '../core_types.dart' show
-    CoreClasses;
 import '../dart_types.dart';
-import '../diagnostics/messages.dart' show
-    MessageTemplate;
-import '../ordered_typeset.dart' show
-    OrderedTypeSet;
-import '../resolution/class_members.dart' show
-    ClassMemberMixin;
-import '../resolution/scope.dart' show
-    ClassScope,
-    LibraryScope,
-    Scope,
-    TypeDeclarationScope;
-import '../resolution/resolution.dart' show
-    AnalyzableElementX;
-import '../resolution/tree_elements.dart' show
-    TreeElements;
-import '../resolution/typedefs.dart' show
-    TypedefCyclicVisitor;
+import '../diagnostics/messages.dart' show MessageTemplate;
+import '../ordered_typeset.dart' show OrderedTypeSet;
+import '../resolution/class_members.dart' show ClassMemberMixin;
+import '../resolution/scope.dart'
+    show ClassScope, LibraryScope, Scope, TypeDeclarationScope;
+import '../resolution/resolution.dart' show AnalyzableElementX;
+import '../resolution/tree_elements.dart' show TreeElements;
+import '../resolution/typedefs.dart' show TypedefCyclicVisitor;
 import '../script.dart';
-import '../tokens/token.dart' show
-    ErrorToken,
-    Token;
-import '../tokens/token_constants.dart' as Tokens show
-    EOF_TOKEN;
+import '../tokens/token.dart' show ErrorToken, Token;
+import '../tokens/token_constants.dart' as Tokens show EOF_TOKEN;
 import '../tree/tree.dart';
 import '../util/util.dart';
 
 import 'common.dart';
 import 'elements.dart';
-import 'visitor.dart' show
-    ElementVisitor;
+import 'visitor.dart' show ElementVisitor;
 
 /// Object that identifies a declaration site.
 ///
@@ -53,8 +35,7 @@
 /// where multi-declarations like `var a, b, c` are allowed, the declaration
 /// site is a separate object.
 // TODO(johnniwinther): Add [beginToken] and [endToken] getters.
-abstract class DeclarationSite {
-}
+abstract class DeclarationSite {}
 
 abstract class ElementX extends Element with ElementCommon {
   static int elementHashCode = 0;
@@ -72,8 +53,7 @@
   Modifiers get modifiers => Modifiers.EMPTY;
 
   Node parseNode(Parsing parsing) {
-    parsing.reporter.internalError(this,
-        'parseNode not implemented on $this.');
+    parsing.reporter.internalError(this, 'parseNode not implemented on $this.');
     return null;
   }
 
@@ -92,12 +72,13 @@
         return metadataInternal;
       } else {
         return <MetadataAnnotation>[]
-            ..addAll(origin.metadata)
-            ..addAll(metadataInternal);
+          ..addAll(origin.metadata)
+          ..addAll(metadataInternal);
       }
     }
     return metadataInternal != null
-        ? metadataInternal : const <MetadataAnnotation>[];
+        ? metadataInternal
+        : const <MetadataAnnotation>[];
   }
 
   bool get isClosure => false;
@@ -105,6 +86,7 @@
     // Check that this element is defined in the scope of a Class.
     return enclosingElement != null && enclosingElement.isClass;
   }
+
   bool get isInstanceMember => false;
   bool get isDeferredLoaderGetter => false;
 
@@ -146,8 +128,8 @@
     return findNameToken(token, isConstructor, name, enclosingElement.name);
   }
 
-  static Token findNameToken(Token token, bool isConstructor, String name,
-                             String enclosingClassName) {
+  static Token findNameToken(
+      Token token, bool isConstructor, String name, String enclosingClassName) {
     // We search for the token that has the name of this element.
     // For constructors, that doesn't work because they may have
     // named formed out of multiple tokens (named constructors) so
@@ -156,7 +138,7 @@
     // The unary '-' operator has a special element name (specified).
     if (needle == 'unary-') needle = '-';
     for (Token t = token; Tokens.EOF_TOKEN != t.kind; t = t.next) {
-      if (t is !ErrorToken && needle == t.value) return t;
+      if (t is! ErrorToken && needle == t.value) return t;
     }
     return token;
   }
@@ -189,7 +171,7 @@
   }
 
   Element get enclosingClassOrCompilationUnit {
-   for (Element e = this; e != null; e = e.enclosingElement) {
+    for (Element e = this; e != null; e = e.enclosingElement) {
       if (e.isClass || e.isCompilationUnit) return e;
     }
     return null;
@@ -208,18 +190,6 @@
     return null;
   }
 
-  ClassElement get contextClass {
-    ClassElement cls;
-    for (Element e = this; e != null; e = e.enclosingElement) {
-      if (e.isClass) {
-        // Record [e] instead of returning it directly. We need the last class
-        // in the chain since the first classes might be closure classes.
-        cls = e.declaration;
-      }
-    }
-    return cls;
-  }
-
   /**
    * Creates the scope for this element.
    */
@@ -264,8 +234,8 @@
   final MessageKind messageKind;
   final Map messageArguments;
 
-  ErroneousElementX(this.messageKind, this.messageArguments,
-                    String name, Element enclosing)
+  ErroneousElementX(
+      this.messageKind, this.messageArguments, String name, Element enclosing)
       : super(name, ElementKind.ERROR, enclosing);
 
   bool get isTopLevel => false;
@@ -320,7 +290,8 @@
 
   String get message {
     return MessageTemplate.TEMPLATES[messageKind]
-        .message(messageArguments).toString();
+        .message(messageArguments)
+        .toString();
   }
 
   String toString() => '<$name: $message>';
@@ -340,19 +311,17 @@
 
 /// A constructor that was synthesized to recover from a compile-time error.
 class ErroneousConstructorElementX extends ErroneousElementX
-    with PatchMixin<FunctionElement>,
-         AnalyzableElementX,
-         ConstantConstructorMixin
+    with
+        PatchMixin<FunctionElement>,
+        AnalyzableElementX,
+        ConstantConstructorMixin
     implements ConstructorElementX {
   // TODO(ahe): Instead of subclassing [ErroneousElementX], this class should
   // be more like [ErroneousFieldElementX]. In particular, its kind should be
   // [ElementKind.GENERATIVE_CONSTRUCTOR], and it shouldn't throw as much.
 
-  ErroneousConstructorElementX(
-      MessageKind messageKind,
-      Map messageArguments,
-      String name,
-      Element enclosing)
+  ErroneousConstructorElementX(MessageKind messageKind, Map messageArguments,
+      String name, Element enclosing)
       : super(messageKind, messageArguments, name, enclosing);
 
   @override
@@ -422,9 +391,8 @@
   }
 
   @override
-  void setEffectiveTarget(ConstructorElement target,
-                            InterfaceType type,
-                            {bool isMalformed: false}) {
+  void setEffectiveTarget(ConstructorElement target, InterfaceType type,
+      {bool isMalformed: false}) {
     throw new UnsupportedError("setEffectiveTarget");
   }
 
@@ -514,7 +482,7 @@
   final Element wrappedElement;
 
   WarnOnUseElementX(WrappedMessage this.warning, WrappedMessage this.info,
-                    Element enclosingElement, Element wrappedElement)
+      Element enclosingElement, Element wrappedElement)
       : this.wrappedElement = wrappedElement,
         super(wrappedElement.name, ElementKind.WARN_ON_USE, enclosingElement);
 
@@ -584,8 +552,8 @@
     return set;
   }
 
-  List<DiagnosticMessage> computeInfos(Element context,
-                                       DiagnosticReporter reporter) {
+  List<DiagnosticMessage> computeInfos(
+      Element context, DiagnosticReporter reporter) {
     return const <DiagnosticMessage>[];
   }
 
@@ -600,20 +568,18 @@
 
 /// Element synthesized to diagnose an ambiguous import.
 class AmbiguousImportX extends AmbiguousElementX {
-  AmbiguousImportX(
-      MessageKind messageKind,
-      Map messageArguments,
+  AmbiguousImportX(MessageKind messageKind, Map messageArguments,
       Element enclosingElement, Element existingElement, Element newElement)
       : super(messageKind, messageArguments, enclosingElement, existingElement,
-              newElement);
+            newElement);
 
   List<DiagnosticMessage> computeInfos(
-      Element context,
-      DiagnosticReporter reporter) {
+      Element context, DiagnosticReporter reporter) {
     List<DiagnosticMessage> infos = <DiagnosticMessage>[];
     Setlet ambiguousElements = flatten();
     MessageKind code = (ambiguousElements.length == 1)
-        ? MessageKind.AMBIGUOUS_REEXPORT : MessageKind.AMBIGUOUS_LOCATION;
+        ? MessageKind.AMBIGUOUS_REEXPORT
+        : MessageKind.AMBIGUOUS_LOCATION;
     LibraryElementX importer = context.library;
     for (Element element in ambiguousElements) {
       Map arguments = {'name': element.name};
@@ -631,12 +597,10 @@
 
 /// Element synthesized to recover from a duplicated member of an element.
 class DuplicatedElementX extends AmbiguousElementX {
-  DuplicatedElementX(
-      MessageKind messageKind,
-      Map messageArguments,
+  DuplicatedElementX(MessageKind messageKind, Map messageArguments,
       Element enclosingElement, Element existingElement, Element newElement)
       : super(messageKind, messageArguments, enclosingElement, existingElement,
-              newElement);
+            newElement);
 
   bool get isMalformed => true;
 }
@@ -660,14 +624,10 @@
       if (!identical(existing, element)) {
         reporter.reportError(
             reporter.createMessage(
-                element,
-                MessageKind.DUPLICATE_DEFINITION,
-                {'name': name}),
+                element, MessageKind.DUPLICATE_DEFINITION, {'name': name}),
             <DiagnosticMessage>[
-                reporter.createMessage(
-                    existing,
-                    MessageKind.EXISTING_DEFINITION,
-                    {'name': name}),
+              reporter.createMessage(
+                  existing, MessageKind.EXISTING_DEFINITION, {'name': name}),
             ]);
       }
     }
@@ -686,25 +646,23 @@
    * element, they are enclosed by the class or compilation unit, as is the
    * abstract field.
    */
-  void addAccessor(AccessorElementX accessor,
-                   Element existing,
-                   DiagnosticReporter reporter) {
+  void addAccessor(AccessorElementX accessor, Element existing,
+      DiagnosticReporter reporter) {
     void reportError(Element other) {
       reporter.reportError(
-          reporter.createMessage(
-              accessor,
-              MessageKind.DUPLICATE_DEFINITION,
+          reporter.createMessage(accessor, MessageKind.DUPLICATE_DEFINITION,
               {'name': accessor.name}),
           <DiagnosticMessage>[
-              reporter.createMessage(
-                  other,
-                  MessageKind.EXISTING_DEFINITION,
-                  {'name': accessor.name}),
+            reporter.createMessage(other, MessageKind.EXISTING_DEFINITION,
+                {'name': accessor.name}),
           ]);
 
       contents[accessor.name] = new DuplicatedElementX(
-          MessageKind.DUPLICATE_DEFINITION, {'name': accessor.name},
-          accessor.memberContext.enclosingElement, other, accessor);
+          MessageKind.DUPLICATE_DEFINITION,
+          {'name': accessor.name},
+          accessor.memberContext.enclosingElement,
+          other,
+          accessor);
     }
 
     if (existing != null) {
@@ -752,10 +710,8 @@
   Link<Element> localMembers = const Link<Element>();
 
   CompilationUnitElementX(Script script, LibraryElementX library)
-    : this.script = script,
-      super(script.name,
-            ElementKind.COMPILATION_UNIT,
-            library) {
+      : this.script = script,
+        super(script.name, ElementKind.COMPILATION_UNIT, library) {
     library.addCompilationUnit(this);
   }
 
@@ -799,8 +755,7 @@
       return;
     }
     if (!localMembers.isEmpty) {
-      reporter.reportErrorMessage(
-          tag, MessageKind.BEFORE_TOP_LEVEL);
+      reporter.reportErrorMessage(tag, MessageKind.BEFORE_TOP_LEVEL);
       return;
     }
     if (partTag != null) {
@@ -813,21 +768,16 @@
     if (libraryTag != null) {
       String expectedName = libraryTag.name.toString();
       if (expectedName != actualName) {
-        reporter.reportWarningMessage(
-            tag.name,
-            MessageKind.LIBRARY_NAME_MISMATCH,
-            {'libraryName': expectedName});
+        reporter.reportWarningMessage(tag.name,
+            MessageKind.LIBRARY_NAME_MISMATCH, {'libraryName': expectedName});
       }
     } else {
       reporter.reportWarning(
-          reporter.createMessage(
-              library,
-              MessageKind.MISSING_LIBRARY_NAME,
+          reporter.createMessage(library, MessageKind.MISSING_LIBRARY_NAME,
               {'libraryName': actualName}),
           <DiagnosticMessage>[
-              reporter.createMessage(
-                  tag.name,
-                  MessageKind.THIS_IS_THE_PART_OF_TAG),
+            reporter.createMessage(
+                tag.name, MessageKind.THIS_IS_THE_PART_OF_TAG),
           ]);
     }
   }
@@ -871,8 +821,7 @@
    * Addition to the map is performed by [addImport]. Lookup is done trough
    * [find].
    */
-  final Map<String, Element> importScope =
-      new Map<String, Element>();
+  final Map<String, Element> importScope = new Map<String, Element>();
 
   /**
    * Adds [element] to the import scope of this library.
@@ -881,10 +830,8 @@
    * [ErroneousElement] will be put in the imported scope, allowing for
    * detection of ambiguous uses of imported names.
    */
-  void addImport(Element enclosingElement,
-                 Element element,
-                 ImportElement import,
-                 DiagnosticReporter reporter) {
+  void addImport(Element enclosingElement, Element element,
+      ImportElement import, DiagnosticReporter reporter) {
     LibraryElementX library = enclosingElement.library;
     Importers importers = library.importers;
 
@@ -898,10 +845,8 @@
     Element existing = importScope.putIfAbsent(name, () => element);
     importers.registerImport(element, import);
 
-    void registerWarnOnUseElement(ImportElement import,
-                                  MessageKind messageKind,
-                                  Element hidingElement,
-                                  Element hiddenElement) {
+    void registerWarnOnUseElement(ImportElement import, MessageKind messageKind,
+        Element hidingElement, Element hiddenElement) {
       Uri hiddenUri = hiddenElement.library.canonicalUri;
       Uri hidingUri = hidingElement.library.canonicalUri;
       Element element = new WarnOnUseElementX(
@@ -909,11 +854,10 @@
               null, // Report on reference to [hidingElement].
               messageKind,
               {'name': name, 'hiddenUri': hiddenUri, 'hidingUri': hidingUri}),
-          new WrappedMessage(
-              reporter.spanFromSpannable(import),
-              MessageKind.IMPORTED_HERE,
-              {'name': name}),
-          enclosingElement, hidingElement);
+          new WrappedMessage(reporter.spanFromSpannable(import),
+              MessageKind.IMPORTED_HERE, {'name': name}),
+          enclosingElement,
+          hidingElement);
       importScope[name] = element;
       importers.registerImport(element, import);
     }
@@ -926,21 +870,23 @@
         registerWarnOnUseElement(
             import, MessageKind.HIDDEN_IMPORT, element, existing);
       } else if (!existing.library.isPlatformLibrary &&
-                 element.library.isPlatformLibrary) {
+          element.library.isPlatformLibrary) {
         // [element] is implicitly hidden.
         if (import.isSynthesized) {
           // [element] is imported implicitly (probably through dart:core).
-          registerWarnOnUseElement(
-              existingImport, MessageKind.HIDDEN_IMPLICIT_IMPORT,
-              existing, element);
+          registerWarnOnUseElement(existingImport,
+              MessageKind.HIDDEN_IMPLICIT_IMPORT, existing, element);
         } else {
           registerWarnOnUseElement(
               import, MessageKind.HIDDEN_IMPORT, existing, element);
         }
       } else {
         Element ambiguousElement = new AmbiguousImportX(
-            MessageKind.DUPLICATE_IMPORT, {'name': name},
-            enclosingElement, existing, element);
+            MessageKind.DUPLICATE_IMPORT,
+            {'name': name},
+            enclosingElement,
+            existing,
+            element);
         importScope[name] = ambiguousElement;
         importers.registerImport(ambiguousElement, import);
         importers.registerImport(ambiguousElement, existingImport);
@@ -959,9 +905,7 @@
   LibraryElement libraryDependency;
 
   LibraryDependencyElementX(CompilationUnitElement enclosingElement,
-                            ElementKind kind,
-                            this.node,
-                            this.uri)
+      ElementKind kind, this.node, this.uri)
       : super('', kind, enclosingElement);
 
   @override
@@ -1023,10 +967,8 @@
   SourceSpan get sourcePosition => library.sourcePosition;
 }
 
-
 class ExportElementX extends LibraryDependencyElementX
     implements ExportElement {
-
   ExportElementX(CompilationUnitElement enclosingElement, Export node, Uri uri)
       : super(enclosingElement, ElementKind.EXPORT, node, uri);
 
@@ -1039,11 +981,8 @@
   accept(ElementVisitor visitor, arg) => visitor.visitExportElement(this, arg);
 }
 
-class LibraryElementX
-    extends ElementX
-    with LibraryElementCommon,
-         AnalyzableElementX,
-         PatchMixin<LibraryElementX>
+class LibraryElementX extends ElementX
+    with LibraryElementCommon, AnalyzableElementX, PatchMixin<LibraryElementX>
     implements LibraryElement {
   final Uri canonicalUri;
 
@@ -1079,12 +1018,11 @@
   final Map<LibraryDependency, LibraryElement> tagMapping =
       new Map<LibraryDependency, LibraryElement>();
 
-  LibraryElementX(Script script,
-                  [Uri canonicalUri, LibraryElementX origin])
-    : this.canonicalUri =
-          ((canonicalUri == null) ? script.readableUri : canonicalUri),
-      this.isSynthesized = script.isSynthesized,
-      super(script.name, ElementKind.LIBRARY, null) {
+  LibraryElementX(Script script, [Uri canonicalUri, LibraryElementX origin])
+      : this.canonicalUri =
+            ((canonicalUri == null) ? script.readableUri : canonicalUri),
+        this.isSynthesized = script.isSynthesized,
+        super(script.name, ElementKind.LIBRARY, null) {
     entryCompilationUnit = new CompilationUnitElementX(script, this);
     if (origin != null) {
       origin.applyPatch(this);
@@ -1113,8 +1051,8 @@
 
   void addTag(LibraryTag tag, DiagnosticReporter reporter) {
     if (tagsCache != null) {
-      reporter.internalError(tag,
-          "Library tags for $this have already been computed.");
+      reporter.internalError(
+          tag, "Library tags for $this have already been computed.");
     }
     tagsBuilder.addLast(tag);
   }
@@ -1146,9 +1084,8 @@
    * [ErroneousElement] will be put in the imported scope, allowing for
    * detection of ambiguous uses of imported names.
    */
-  void addImport(Element element,
-                 ImportElement import,
-                 DiagnosticReporter reporter) {
+  void addImport(
+      Element element, ImportElement import, DiagnosticReporter reporter) {
     importScope.addImport(this, element, import, reporter);
   }
 
@@ -1227,7 +1164,7 @@
 
   Element findExported(String elementName) {
     assert(invariant(this, exportsHandled,
-                     message: 'Exports not handled on $this'));
+        message: 'Exports not handled on $this'));
     for (Link link = slotForExports; !link.isEmpty; link = link.tail) {
       Element element = link.head;
       if (element.name == elementName) return element;
@@ -1237,7 +1174,7 @@
 
   void forEachExport(f(Element element)) {
     assert(invariant(this, exportsHandled,
-                     message: 'Exports not handled on $this'));
+        message: 'Exports not handled on $this'));
     slotForExports.forEach((Element e) => f(e));
   }
 
@@ -1320,10 +1257,8 @@
   // Only needed for deferred imports.
   final ImportElement deferredImport;
 
-  PrefixElementX(String prefix,
-                 Element enclosing,
-                 this.firstPosition,
-                 this.deferredImport)
+  PrefixElementX(
+      String prefix, Element enclosing, this.firstPosition, this.deferredImport)
       : super(prefix, ElementKind.PREFIX, enclosing);
 
   bool get isTopLevel => false;
@@ -1334,9 +1269,8 @@
 
   Token get position => firstPosition;
 
-  void addImport(Element element,
-                 ImportElement import,
-                 DiagnosticReporter reporter) {
+  void addImport(
+      Element element, ImportElement import, DiagnosticReporter reporter) {
     importScope.addImport(this, element, import, reporter);
   }
 
@@ -1348,9 +1282,10 @@
 }
 
 class TypedefElementX extends ElementX
-    with AstElementMixin,
-         AnalyzableElementX,
-         TypeDeclarationElementX<TypedefType>
+    with
+        AstElementMixin,
+        AnalyzableElementX,
+        TypeDeclarationElementX<TypedefType>
     implements TypedefElement {
   Typedef cachedNode;
 
@@ -1448,7 +1383,8 @@
 
   Iterable<MetadataAnnotation> get metadata {
     return metadataInternal != null
-        ? metadataInternal : const <MetadataAnnotation>[];
+        ? metadataInternal
+        : const <MetadataAnnotation>[];
   }
 
   void set metadata(List<MetadataAnnotation> metadata) {
@@ -1491,12 +1427,11 @@
       originVariable.constant = value;
       return;
     }
-    assert(invariant(
-        this, constantCache == null || constantCache == value,
+    assert(invariant(this, constantCache == null || constantCache == value,
         message: "Constant has already been computed for $this. "
-                 "Existing constant: "
-                 "${constantCache != null ? constantCache.getText() : ''}, "
-                 "New constant: ${value != null ? value.getText() : ''}."));
+            "Existing constant: "
+            "${constantCache != null ? constantCache.getText() : ''}, "
+            "New constant: ${value != null ? value.getText() : ''}."));
     constantCache = value;
   }
 }
@@ -1511,13 +1446,10 @@
 
   Modifiers get modifiers => variables.modifiers;
 
-  VariableElementX(String name,
-                   ElementKind kind,
-                   Element enclosingElement,
-                   VariableList variables,
-                   this.token)
-    : this.variables = variables,
-      super(name, kind, enclosingElement);
+  VariableElementX(String name, ElementKind kind, Element enclosingElement,
+      VariableList variables, this.token)
+      : this.variables = variables,
+        super(name, kind, enclosingElement);
 
   // TODO(johnniwinther): Ensure that the [TreeElements] for this variable hold
   // the mappings for all its metadata.
@@ -1562,7 +1494,8 @@
     Expression node;
     int count = 0;
     for (Link<Node> link = definitions.definitions.nodes;
-         !link.isEmpty; link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       Expression initializedIdentifier = link.head;
       Identifier identifier = initializedIdentifier.asIdentifier();
       if (identifier == null) {
@@ -1583,8 +1516,10 @@
     } else {
       // Create a [VariableDefinitions] node for the single definition of
       // [node].
-      definitionsCache = new VariableDefinitions(definitions.type,
-          definitions.modifiers, new NodeList(
+      definitionsCache = new VariableDefinitions(
+          definitions.type,
+          definitions.modifiers,
+          new NodeList(
               definitions.definitions.beginToken,
               const Link<Node>().prepend(node),
               definitions.definitions.endToken));
@@ -1611,19 +1546,13 @@
   // cases, for example, for function typed parameters.
   Token get position => token;
 
-  accept(ElementVisitor visitor, arg) {
-    return visitor.visitVariableElement(this, arg);
-  }
-
   DeclarationSite get declarationSite => variables;
 }
 
 class LocalVariableElementX extends VariableElementX
     implements LocalVariableElement {
-  LocalVariableElementX(String name,
-                        ExecutableElement enclosingElement,
-                        VariableList variables,
-                        Token token)
+  LocalVariableElementX(String name, ExecutableElement enclosingElement,
+      VariableList variables, Token token)
       : super(name, ElementKind.VARIABLE, enclosingElement, variables, token) {
     createDefinitions(variables.definitions);
   }
@@ -1633,17 +1562,21 @@
   MemberElement get memberContext => executableContext.memberContext;
 
   bool get isLocal => true;
+
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitLocalVariableElement(this, arg);
+  }
 }
 
 class FieldElementX extends VariableElementX
-    with AnalyzableElementX implements FieldElement {
+    with AnalyzableElementX
+    implements FieldElement {
   List<FunctionElement> nestedClosures = new List<FunctionElement>();
 
-  FieldElementX(Identifier name,
-                Element enclosingElement,
-                VariableList variables)
-    : super(name.source, ElementKind.FIELD, enclosingElement,
-            variables, name.token);
+  FieldElementX(
+      Identifier name, Element enclosingElement, VariableList variables)
+      : super(name.source, ElementKind.FIELD, enclosingElement, variables,
+            name.token);
 
   accept(ElementVisitor visitor, arg) {
     return visitor.visitFieldElement(this, arg);
@@ -1664,14 +1597,15 @@
 
 /// A field that was synthesized to recover from a compile-time error.
 class ErroneousFieldElementX extends ElementX
-    with ConstantVariableMixin implements FieldElementX {
+    with ConstantVariableMixin
+    implements FieldElementX {
   final VariableList variables;
 
   ErroneousFieldElementX(Identifier name, Element enclosingElement)
       : variables = new VariableList(Modifiers.EMPTY)
-            ..definitions = new VariableDefinitions(
-                null, Modifiers.EMPTY, new NodeList.singleton(name))
-            ..type = const DynamicType(),
+          ..definitions = new VariableDefinitions(
+              null, Modifiers.EMPTY, new NodeList.singleton(name))
+          ..type = const DynamicType(),
         super(name.source, ElementKind.FIELD, enclosingElement);
 
   VariableDefinitions get definitionsCache => variables.definitions;
@@ -1755,10 +1689,8 @@
    */
   FunctionSignature _functionSignatureCache;
 
-  FormalElementX(ElementKind elementKind,
-                 FunctionTypedElement enclosingElement,
-                 this.definitions,
-                 Identifier identifier)
+  FormalElementX(ElementKind elementKind, FunctionTypedElement enclosingElement,
+      this.definitions, Identifier identifier)
       : this.identifier = identifier,
         super(identifier.source, elementKind, enclosingElement);
 
@@ -1778,8 +1710,8 @@
 
   DartType get type {
     assert(invariant(this, typeCache != null,
-            message: "Parameter type has not been set for $this."));
-        return typeCache;
+        message: "Parameter type has not been set for $this."));
+    return typeCache;
   }
 
   FunctionSignature get functionSignature {
@@ -1816,20 +1748,20 @@
 /// to ensure that default values on parameters are computed once (on the
 /// origin parameter) but can be found through both the origin and the patch.
 abstract class ParameterElementX extends FormalElementX
-    with PatchMixin<ParameterElement>,
-         ConstantVariableMixin
+    with PatchMixin<ParameterElement>, ConstantVariableMixin
     implements ParameterElement {
   final Expression initializer;
   final bool isOptional;
   final bool isNamed;
 
-  ParameterElementX(ElementKind elementKind,
-                    FunctionElement functionDeclaration,
-                    VariableDefinitions definitions,
-                    Identifier identifier,
-                    this.initializer,
-                    {this.isOptional: false,
-                     this.isNamed: false})
+  ParameterElementX(
+      ElementKind elementKind,
+      FunctionElement functionDeclaration,
+      VariableDefinitions definitions,
+      Identifier identifier,
+      this.initializer,
+      {this.isOptional: false,
+      this.isNamed: false})
       : super(elementKind, functionDeclaration, definitions, identifier);
 
   FunctionElement get functionDeclaration => enclosingElement;
@@ -1856,17 +1788,16 @@
 
 class LocalParameterElementX extends ParameterElementX
     implements LocalParameterElement {
-
-
-  LocalParameterElementX(FunctionElement functionDeclaration,
-                         VariableDefinitions definitions,
-                         Identifier identifier,
-                         Expression initializer,
-                         {bool isOptional: false,
-                          bool isNamed: false})
-      : super(ElementKind.PARAMETER, functionDeclaration,
-              definitions, identifier, initializer,
-              isOptional: isOptional, isNamed: isNamed);
+  LocalParameterElementX(
+      FunctionElement functionDeclaration,
+      VariableDefinitions definitions,
+      Identifier identifier,
+      Expression initializer,
+      {bool isOptional: false,
+      bool isNamed: false})
+      : super(ElementKind.PARAMETER, functionDeclaration, definitions,
+            identifier, initializer,
+            isOptional: isOptional, isNamed: isNamed);
 }
 
 /// Parameters in constructors that directly initialize fields. For example:
@@ -1875,16 +1806,17 @@
     implements InitializingFormalElement {
   final FieldElement fieldElement;
 
-  InitializingFormalElementX(ConstructorElement constructorDeclaration,
-                             VariableDefinitions variables,
-                             Identifier identifier,
-                             Expression initializer,
-                             this.fieldElement,
-                             {bool isOptional: false,
-                              bool isNamed: false})
+  InitializingFormalElementX(
+      ConstructorElement constructorDeclaration,
+      VariableDefinitions variables,
+      Identifier identifier,
+      Expression initializer,
+      this.fieldElement,
+      {bool isOptional: false,
+      bool isNamed: false})
       : super(ElementKind.INITIALIZING_FORMAL, constructorDeclaration,
-              variables, identifier, initializer,
-              isOptional: isOptional, isNamed: isNamed);
+            variables, identifier, initializer,
+            isOptional: isOptional, isNamed: isNamed);
 
   accept(ElementVisitor visitor, arg) {
     return visitor.visitFieldParameterElement(this, arg);
@@ -1900,13 +1832,11 @@
   final ErroneousFieldElementX fieldElement;
 
   ErroneousInitializingFormalElementX(
-      Identifier identifier,
-      Element enclosingElement)
+      Identifier identifier, Element enclosingElement)
       : this.fieldElement =
             new ErroneousFieldElementX(identifier, enclosingElement),
-        super(
-            ElementKind.INITIALIZING_FORMAL,
-            enclosingElement, null, identifier, null);
+        super(ElementKind.INITIALIZING_FORMAL, enclosingElement, null,
+            identifier, null);
 
   VariableDefinitions get definitions => fieldElement.node;
 
@@ -1944,8 +1874,7 @@
     //
     // We need to make sure that the position returned is relative to
     // the compilation unit of the abstract element.
-    if (getter != null
-        && identical(getter.compilationUnit, compilationUnit)) {
+    if (getter != null && identical(getter.compilationUnit, compilationUnit)) {
       return getter.position;
     } else {
       return setter.position;
@@ -1955,12 +1884,10 @@
   Modifiers get modifiers {
     // The resolver ensures that the flags match (ignoring abstract).
     if (getter != null) {
-      return new Modifiers.withFlags(
-          getter.modifiers.nodes,
+      return new Modifiers.withFlags(getter.modifiers.nodes,
           getter.modifiers.flags | Modifiers.FLAG_ABSTRACT);
     } else {
-      return new Modifiers.withFlags(
-          setter.modifiers.nodes,
+      return new Modifiers.withFlags(setter.modifiers.nodes,
           setter.modifiers.flags | Modifiers.FLAG_ABSTRACT);
     }
   }
@@ -1974,8 +1901,8 @@
   }
 
   bool get isAbstract {
-    return getter != null && getter.isAbstract
-        || setter != null && setter.isAbstract;
+    return getter != null && getter.isAbstract ||
+        setter != null && setter.isAbstract;
   }
 }
 
@@ -1993,19 +1920,20 @@
   final FunctionType type;
   final bool hasOptionalParameters;
 
-  FunctionSignatureX({this.requiredParameters: const <Element>[],
-                      this.requiredParameterCount: 0,
-                      List<Element> optionalParameters: const <Element>[],
-                      this.optionalParameterCount: 0,
-                      this.optionalParametersAreNamed: false,
-                      this.orderedOptionalParameters: const <Element>[],
-                      this.type})
+  FunctionSignatureX(
+      {this.requiredParameters: const <Element>[],
+      this.requiredParameterCount: 0,
+      List<Element> optionalParameters: const <Element>[],
+      this.optionalParameterCount: 0,
+      this.optionalParametersAreNamed: false,
+      this.orderedOptionalParameters: const <Element>[],
+      this.type})
       : optionalParameters = optionalParameters,
         hasOptionalParameters = !optionalParameters.isEmpty;
 }
 
-abstract class BaseFunctionElementX
-    extends ElementX with PatchMixin<FunctionElement>, AstElementMixin
+abstract class BaseFunctionElementX extends ElementX
+    with PatchMixin<FunctionElement>, AstElementMixin
     implements FunctionElement {
   DartType typeCache;
   final Modifiers modifiers;
@@ -2016,10 +1944,8 @@
 
   AsyncMarker asyncMarker = AsyncMarker.SYNC;
 
-  BaseFunctionElementX(String name,
-                       ElementKind kind,
-                       Modifiers this.modifiers,
-                       Element enclosing)
+  BaseFunctionElementX(String name, ElementKind kind, Modifiers this.modifiers,
+      Element enclosing)
       : super(name, kind, enclosing) {
     assert(modifiers != null);
   }
@@ -2027,9 +1953,7 @@
   bool get isExternal => modifiers.isExternal;
 
   bool get isInstanceMember {
-    return isClassMember
-           && !isConstructor
-           && !isStatic;
+    return isClassMember && !isConstructor && !isStatic;
   }
 
   bool get hasFunctionSignature => _functionSignatureCache != null;
@@ -2090,21 +2014,15 @@
 
   bool get isAbstract => false;
 
-  accept(ElementVisitor visitor, arg) {
-    return visitor.visitFunctionElement(this, arg);
-  }
-
   // A function is defined by the implementation element.
   AstElement get definingElement => implementation;
 }
 
 abstract class FunctionElementX extends BaseFunctionElementX
-    with AnalyzableElementX implements MethodElement {
-
-  FunctionElementX(String name,
-                   ElementKind kind,
-                   Modifiers modifiers,
-                   Element enclosing)
+    with AnalyzableElementX
+    implements MethodElement {
+  FunctionElementX(
+      String name, ElementKind kind, Modifiers modifiers, Element enclosing)
       : super(name, kind, modifiers, enclosing);
 
   MemberElement get memberContext => this;
@@ -2132,61 +2050,62 @@
 abstract class MethodElementX extends FunctionElementX {
   final bool hasBody;
 
-  MethodElementX(String name,
-                 ElementKind kind,
-                 Modifiers modifiers,
-                 Element enclosing,
-                 // TODO(15101): Make this a named parameter.
-                 this.hasBody)
+  MethodElementX(
+      String name,
+      ElementKind kind,
+      Modifiers modifiers,
+      Element enclosing,
+      // TODO(15101): Make this a named parameter.
+      this.hasBody)
       : super(name, kind, modifiers, enclosing);
 
   @override
   bool get isAbstract {
     return !modifiers.isExternal && !hasBody;
   }
+
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitMethodElement(this, arg);
+  }
 }
 
 abstract class AccessorElementX extends MethodElementX
     implements AccessorElement {
   AbstractFieldElement abstractField;
 
-  AccessorElementX(String name,
-                   ElementKind kind,
-                   Modifiers modifiers,
-                   Element enclosing,
-                   bool hasBody)
+  AccessorElementX(String name, ElementKind kind, Modifiers modifiers,
+      Element enclosing, bool hasBody)
       : super(name, kind, modifiers, enclosing, hasBody);
 }
 
 abstract class GetterElementX extends AccessorElementX
     implements GetterElement {
-
-  GetterElementX(String name,
-                 Modifiers modifiers,
-                 Element enclosing,
-                 bool hasBody)
+  GetterElementX(
+      String name, Modifiers modifiers, Element enclosing, bool hasBody)
       : super(name, ElementKind.GETTER, modifiers, enclosing, hasBody);
+
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitGetterElement(this, arg);
+  }
 }
 
 abstract class SetterElementX extends AccessorElementX
     implements SetterElement {
-
-  SetterElementX(String name,
-                 Modifiers modifiers,
-                 Element enclosing,
-                 bool hasBody)
+  SetterElementX(
+      String name, Modifiers modifiers, Element enclosing, bool hasBody)
       : super(name, ElementKind.SETTER, modifiers, enclosing, hasBody);
+
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitSetterElement(this, arg);
+  }
 }
 
 class LocalFunctionElementX extends BaseFunctionElementX
     implements LocalFunctionElement {
   final FunctionExpression node;
 
-  LocalFunctionElementX(String name,
-                        FunctionExpression this.node,
-                        ElementKind kind,
-                        Modifiers modifiers,
-                        ExecutableElement enclosing)
+  LocalFunctionElementX(String name, FunctionExpression this.node,
+      ElementKind kind, Modifiers modifiers, ExecutableElement enclosing)
       : super(name, kind, modifiers, enclosing);
 
   ExecutableElement get executableContext => enclosingElement;
@@ -2207,6 +2126,10 @@
   }
 
   bool get isLocal => true;
+
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitLocalFunctionElement(this, arg);
+  }
 }
 
 abstract class ConstantConstructorMixin implements ConstructorElement {
@@ -2231,36 +2154,35 @@
     } else {
       assert(invariant(this, isConst,
           message: "Constant constructor set on non-constant "
-                   "constructor $this."));
+              "constructor $this."));
       assert(invariant(this, !isFromEnvironmentConstructor,
           message: "Constant constructor set on fromEnvironment "
-                   "constructor: $this."));
-      assert(invariant(this,
-          _constantConstructor == null || _constantConstructor == value,
+              "constructor: $this."));
+      assert(invariant(
+          this, _constantConstructor == null || _constantConstructor == value,
           message: "Constant constructor already computed for $this:"
-                   "Existing: $_constantConstructor, new: $value"));
+              "Existing: $_constantConstructor, new: $value"));
       _constantConstructor = value;
     }
   }
 
   bool get isFromEnvironmentConstructor {
     return name == 'fromEnvironment' &&
-           library.isDartCore &&
-           (enclosingClass.name == 'bool' ||
+        library.isDartCore &&
+        (enclosingClass.name == 'bool' ||
             enclosingClass.name == 'int' ||
             enclosingClass.name == 'String');
   }
 }
 
 abstract class ConstructorElementX extends FunctionElementX
-    with ConstantConstructorMixin implements ConstructorElement {
+    with ConstantConstructorMixin
+    implements ConstructorElement {
   bool isRedirectingGenerative = false;
 
-  ConstructorElementX(String name,
-                      ElementKind kind,
-                      Modifiers modifiers,
-                      Element enclosing)
-        : super(name, kind, modifiers, enclosing);
+  ConstructorElementX(
+      String name, ElementKind kind, Modifiers modifiers, Element enclosing)
+      : super(name, kind, modifiers, enclosing);
 
   FunctionElement immediateRedirectionTarget;
   PrefixElement redirectionDeferredPrefix;
@@ -2276,9 +2198,8 @@
   DartType _effectiveTargetType;
   bool _isEffectiveTargetMalformed;
 
-  void setEffectiveTarget(ConstructorElement target,
-                          DartType type,
-                          {bool isMalformed: false}) {
+  void setEffectiveTarget(ConstructorElement target, DartType type,
+      {bool isMalformed: false}) {
     assert(invariant(this, target != null,
         message: 'No effective target provided for $this.'));
     assert(invariant(this, effectiveTargetInternal == null,
@@ -2316,7 +2237,7 @@
   bool get isEffectiveTargetMalformed {
     if (!isRedirectingFactory) return false;
     assert(invariant(this, _isEffectiveTargetMalformed != null,
-            message: 'Malformedness has not yet been computed for $this.'));
+        message: 'Malformedness has not yet been computed for $this.'));
     return _isEffectiveTargetMalformed == true;
   }
 
@@ -2335,10 +2256,7 @@
 
   DeferredLoaderGetterElementX(PrefixElement prefix)
       : this.prefix = prefix,
-        super("loadLibrary",
-              Modifiers.EMPTY,
-              prefix,
-              false) {
+        super("loadLibrary", Modifiers.EMPTY, prefix, false) {
     functionSignature = new FunctionSignatureX(type: new FunctionType(this));
   }
 
@@ -2369,10 +2287,8 @@
 
   ConstructorBodyElementX(ConstructorElementX constructor)
       : this.constructor = constructor,
-        super(constructor.name,
-              ElementKind.GENERATIVE_CONSTRUCTOR_BODY,
-              Modifiers.EMPTY,
-              constructor.enclosingElement) {
+        super(constructor.name, ElementKind.GENERATIVE_CONSTRUCTOR_BODY,
+            Modifiers.EMPTY, constructor.enclosingElement) {
     functionSignature = constructor.functionSignature;
   }
 
@@ -2414,22 +2330,17 @@
   final ConstructorElement definingConstructor;
   final bool isDefaultConstructor;
 
-  SynthesizedConstructorElementX.notForDefault(String name,
-                                               this.definingConstructor,
-                                               Element enclosing)
+  SynthesizedConstructorElementX.notForDefault(
+      String name, this.definingConstructor, Element enclosing)
       : isDefaultConstructor = false,
-        super(name,
-              ElementKind.GENERATIVE_CONSTRUCTOR,
-              Modifiers.EMPTY,
-              enclosing) ;
+        super(name, ElementKind.GENERATIVE_CONSTRUCTOR, Modifiers.EMPTY,
+            enclosing);
 
-  SynthesizedConstructorElementX.forDefault(this.definingConstructor,
-                                            Element enclosing)
+  SynthesizedConstructorElementX.forDefault(
+      this.definingConstructor, Element enclosing)
       : isDefaultConstructor = true,
-        super('',
-              ElementKind.GENERATIVE_CONSTRUCTOR,
-              Modifiers.EMPTY,
-              enclosing) {
+        super('', ElementKind.GENERATIVE_CONSTRUCTOR, Modifiers.EMPTY,
+            enclosing) {
     functionSignature = new FunctionSignatureX(
         type: new FunctionType.synthesized(enclosingClass.thisType));
   }
@@ -2508,13 +2419,13 @@
 
   T get thisType {
     assert(invariant(this, thisTypeCache != null,
-                     message: 'This type has not been computed for $this'));
+        message: 'This type has not been computed for $this'));
     return thisTypeCache;
   }
 
   T get rawType {
     assert(invariant(this, rawTypeCache != null,
-                     message: 'Raw type has not been computed for $this'));
+        message: 'Raw type has not been computed for $this'));
     return rawTypeCache;
   }
 
@@ -2567,12 +2478,13 @@
 }
 
 abstract class BaseClassElementX extends ElementX
-    with AstElementMixin,
-         AnalyzableElementX,
-         ClassElementCommon,
-         TypeDeclarationElementX<InterfaceType>,
-         PatchMixin<ClassElement>,
-         ClassMemberMixin
+    with
+        AstElementMixin,
+        AnalyzableElementX,
+        ClassElementCommon,
+        TypeDeclarationElementX<InterfaceType>,
+        PatchMixin<ClassElement>,
+        ClassMemberMixin
     implements ClassElement {
   final int id;
 
@@ -2589,10 +2501,7 @@
 
   OrderedTypeSet allSupertypesAndSelf;
 
-  BaseClassElementX(String name,
-                    Element enclosing,
-                    this.id,
-                    int initialState)
+  BaseClassElementX(String name, Element enclosing, this.id, int initialState)
       : supertypeLoadState = initialState,
         resolutionState = initialState,
         super(name, ElementKind.CLASS, enclosing);
@@ -2618,8 +2527,8 @@
     return thisTypeCache;
   }
 
-  void computeThisAndRawType(Resolution resolution,
-                             List<DartType> typeVariables) {
+  void computeThisAndRawType(
+      Resolution resolution, List<DartType> typeVariables) {
     if (thisTypeCache == null) {
       if (origin == null) {
         setThisAndRawTypes(typeVariables);
@@ -2650,8 +2559,8 @@
     }
   }
 
-  void setDefaultConstructor(FunctionElement constructor,
-                             DiagnosticReporter reporter);
+  void setDefaultConstructor(
+      FunctionElement constructor, DiagnosticReporter reporter);
 
   void addBackendMember(Element member) {
     // TODO(ngeoffray): Deprecate this method.
@@ -2701,11 +2610,6 @@
     backendMembers.forEach(f);
   }
 
-  bool implementsFunction(CoreClasses coreClasses) {
-    return asInstanceOf(coreClasses.functionClass) != null ||
-        callType != null;
-  }
-
   // TODO(johnniwinther): Remove these when issue 18630 is fixed.
   ClassElement get patch => super.patch;
   ClassElement get origin => super.origin;
@@ -2741,8 +2645,7 @@
 
   void addToScope(Element element, DiagnosticReporter reporter) {
     if (element.isField && element.name == name) {
-      reporter.reportErrorMessage(
-          element, MessageKind.MEMBER_USES_CLASS_NAME);
+      reporter.reportErrorMessage(element, MessageKind.MEMBER_USES_CLASS_NAME);
     }
     localScope.add(element, reporter);
   }
@@ -2767,8 +2670,8 @@
     return false;
   }
 
-  void setDefaultConstructor(FunctionElement constructor,
-                             DiagnosticReporter reporter) {
+  void setDefaultConstructor(
+      FunctionElement constructor, DiagnosticReporter reporter) {
     // The default constructor, although synthetic, is part of a class' API.
     addMember(constructor, reporter);
   }
@@ -2837,28 +2740,29 @@
 class EnumConstructorElementX extends ConstructorElementX {
   final FunctionExpression node;
 
-  EnumConstructorElementX(EnumClassElementX enumClass,
-                          Modifiers modifiers,
-                          this.node)
-      : super('', // Name.
-              ElementKind.GENERATIVE_CONSTRUCTOR,
-              modifiers,
-              enumClass);
+  EnumConstructorElementX(
+      EnumClassElementX enumClass, Modifiers modifiers, this.node)
+      : super(
+            '', // Name.
+            ElementKind.GENERATIVE_CONSTRUCTOR,
+            modifiers,
+            enumClass);
 
   @override
   bool get hasNode => true;
 
   @override
   FunctionExpression parseNode(Parsing parsing) => node;
+
+  @override
+  SourceSpan get sourcePosition => enclosingClass.sourcePosition;
 }
 
 class EnumMethodElementX extends MethodElementX {
   final FunctionExpression node;
 
-  EnumMethodElementX(String name,
-                     EnumClassElementX enumClass,
-                     Modifiers modifiers,
-                     this.node)
+  EnumMethodElementX(
+      String name, EnumClassElementX enumClass, Modifiers modifiers, this.node)
       : super(name, ElementKind.FUNCTION, modifiers, enumClass, true);
 
   @override
@@ -2866,35 +2770,63 @@
 
   @override
   FunctionExpression parseNode(Parsing parsing) => node;
+
+  @override
+  SourceSpan get sourcePosition => enclosingClass.sourcePosition;
 }
 
 class EnumFormalElementX extends InitializingFormalElementX {
-  EnumFormalElementX(ConstructorElement constructor,
-                     VariableDefinitions variables,
-                     Identifier identifier,
-                     EnumFieldElementX fieldElement)
+  EnumFormalElementX(
+      ConstructorElement constructor,
+      VariableDefinitions variables,
+      Identifier identifier,
+      EnumFieldElementX fieldElement)
       : super(constructor, variables, identifier, null, fieldElement) {
     typeCache = fieldElement.type;
   }
+
+  @override
+  SourceSpan get sourcePosition => enclosingClass.sourcePosition;
 }
 
 class EnumFieldElementX extends FieldElementX {
-
-  EnumFieldElementX(Identifier name,
-                    EnumClassElementX enumClass,
-                    VariableList variableList,
-                    Node definition,
-                    [Expression initializer])
+  EnumFieldElementX(Identifier name, EnumClassElementX enumClass,
+      VariableList variableList, Node definition,
+      [Expression initializer])
       : super(name, enumClass, variableList) {
-    definitionsCache = new VariableDefinitions(null,
-        variableList.modifiers, new NodeList.singleton(definition));
+    definitionsCache = new VariableDefinitions(
+        null, variableList.modifiers, new NodeList.singleton(definition));
     initializerCache = initializer;
   }
+
+  @override
+  SourceSpan get sourcePosition => enclosingClass.sourcePosition;
+}
+
+class EnumConstantElementX extends EnumFieldElementX
+    implements EnumConstantElement {
+  final int index;
+
+  EnumConstantElementX(
+      Identifier name,
+      EnumClassElementX enumClass,
+      VariableList variableList,
+      Node definition,
+      Expression initializer,
+      this.index)
+      : super(name, enumClass, variableList, definition, initializer);
+
+  @override
+  SourceSpan get sourcePosition {
+    return new SourceSpan(
+        enclosingClass.sourcePosition.uri,
+        position.charOffset, position.charEnd);
+  }
 }
 
 abstract class MixinApplicationElementX extends BaseClassElementX
+    with MixinApplicationElementCommon
     implements MixinApplicationElement {
-
   Link<ConstructorElement> constructors = new Link<ConstructorElement>();
 
   InterfaceType mixinType;
@@ -2918,31 +2850,6 @@
 
   Node parseNode(Parsing parsing) => node;
 
-  FunctionElement lookupLocalConstructor(String name) {
-    for (Link<Element> link = constructors;
-         !link.isEmpty;
-         link = link.tail) {
-      if (link.head.name == name) return link.head;
-    }
-    return null;
-  }
-
-  Element localLookup(String name) {
-    Element constructor = lookupLocalConstructor(name);
-    if (constructor != null) return constructor;
-    if (mixin == null) return null;
-    Element mixedInElement = mixin.localLookup(name);
-    if (mixedInElement == null) return null;
-    return mixedInElement.isInstanceMember ? mixedInElement : null;
-  }
-
-  void forEachLocalMember(void f(Element member)) {
-    constructors.forEach(f);
-    if (mixin != null) mixin.forEachLocalMember((Element mixedInElement) {
-      if (mixedInElement.isInstanceMember) f(mixedInElement);
-    });
-  }
-
   void addMember(Element element, DiagnosticReporter reporter) {
     throw new UnsupportedError("Cannot add member to $this.");
   }
@@ -2955,8 +2862,8 @@
     constructors = constructors.prepend(constructor);
   }
 
-  void setDefaultConstructor(FunctionElement constructor,
-                             DiagnosticReporter reporter) {
+  void setDefaultConstructor(
+      FunctionElement constructor, DiagnosticReporter reporter) {
     assert(!hasConstructor);
     addConstructor(constructor);
   }
@@ -2964,7 +2871,8 @@
   List<DartType> computeTypeParameters(Parsing parsing) {
     NamedMixinApplication named = node.asNamedMixinApplication();
     if (named == null) {
-      throw new SpannableAssertionFailure(node,
+      throw new SpannableAssertionFailure(
+          node,
           "Type variables on unnamed mixin applications must be set on "
           "creation.");
     }
@@ -2981,10 +2889,7 @@
   final NamedMixinApplication node;
 
   NamedMixinApplicationElementX(
-      String name,
-      CompilationUnitElement enclosing,
-      int id,
-      this.node)
+      String name, CompilationUnitElement enclosing, int id, this.node)
       : super(name, enclosing, id);
 
   Modifiers get modifiers => node.modifiers;
@@ -2996,10 +2901,7 @@
   final Node node;
 
   UnnamedMixinApplicationElementX(
-      String name,
-      CompilationUnitElement enclosing,
-      int id,
-      this.node)
+      String name, CompilationUnitElement enclosing, int id, this.node)
       : super(name, enclosing, id);
 
   bool get isAbstract => true;
@@ -3060,18 +2962,17 @@
   String toString() => 'Target:$statement';
 }
 
-class TypeVariableElementX extends ElementX with AstElementMixin
+class TypeVariableElementX extends ElementX
+    with AstElementMixin
     implements TypeVariableElement {
   final int index;
   final Node node;
   TypeVariableType typeCache;
   DartType boundCache;
 
-  TypeVariableElementX(String name,
-                       TypeDeclarationElement enclosing,
-                       this.index,
-                       this.node)
-    : super(name, ElementKind.TYPE_VARIABLE, enclosing);
+  TypeVariableElementX(
+      String name, TypeDeclarationElement enclosing, this.index, this.node)
+      : super(name, ElementKind.TYPE_VARIABLE, enclosing);
 
   TypeDeclarationElement get typeDeclaration => enclosingElement;
 
@@ -3181,8 +3082,8 @@
 /// See [:patch_parser.dart:] for a description of the terminology.
 abstract class PatchMixin<E extends Element> implements Element {
   // TODO(johnniwinther): Use type variables when issue 18630 is fixed.
-  Element/*E*/ patch = null;
-  Element/*E*/ origin = null;
+  Element /*E*/ patch = null;
+  Element /*E*/ origin = null;
 
   bool get isPatch => origin != null;
   bool get isPatched => patch != null;
@@ -3190,19 +3091,19 @@
   bool get isImplementation => !isPatched;
   bool get isDeclaration => !isPatch;
 
-  Element/*E*/ get implementation => isPatched ? patch : this;
-  Element/*E*/ get declaration => isPatch ? origin : this;
+  Element /*E*/ get implementation => isPatched ? patch : this;
+  Element /*E*/ get declaration => isPatch ? origin : this;
 
   /// Applies a patch to this element. This method must be called at most once.
   void applyPatch(PatchMixin<E> patch) {
     assert(invariant(this, this.patch == null,
-                     message: "Element is patched twice."));
+        message: "Element is patched twice."));
     assert(invariant(this, this.origin == null,
-                     message: "Origin element is a patch."));
+        message: "Origin element is a patch."));
     assert(invariant(patch, patch.origin == null,
-                     message: "Element is patched twice."));
+        message: "Element is patched twice."));
     assert(invariant(patch, patch.patch == null,
-                     message: "Patch element is patched."));
+        message: "Patch element is patched."));
     this.patch = patch;
     patch.origin = this;
   }
@@ -3220,11 +3121,12 @@
   /// itself.
   AstElement get definingElement;
 
-  bool get hasResolvedAst => definingElement.hasTreeElements;
-
-  ResolvedAst get resolvedAst {
-    return new ResolvedAst(declaration,
-        definingElement.node, definingElement.treeElements);
+  bool get hasResolvedAst {
+    return definingElement.hasNode && definingElement.hasTreeElements;
   }
 
+  ResolvedAst get resolvedAst {
+    return new ResolvedAst(
+        declaration, definingElement.node, definingElement.treeElements);
+  }
 }
diff --git a/pkg/compiler/lib/src/elements/names.dart b/pkg/compiler/lib/src/elements/names.dart
index 314a94b..e38def0 100644
--- a/pkg/compiler/lib/src/elements/names.dart
+++ b/pkg/compiler/lib/src/elements/names.dart
@@ -49,7 +49,6 @@
 
   LibraryElement get library;
 
-
   /// Returns `true` when [s] is private if used as an identifier.
   static bool isPrivateName(String s) => !s.isEmpty && s.codeUnitAt(0) == $_;
 
@@ -107,7 +106,7 @@
 
   bool operator ==(other) {
     if (other is! PrivateName) return false;
-    return super==(other) && library == other.library;
+    return super == (other) && library == other.library;
   }
 
   String toString() => '${library.libraryName}#${super.toString()}';
diff --git a/pkg/compiler/lib/src/elements/visitor.dart b/pkg/compiler/lib/src/elements/visitor.dart
index 23d5263..2a1c917 100644
--- a/pkg/compiler/lib/src/elements/visitor.dart
+++ b/pkg/compiler/lib/src/elements/visitor.dart
@@ -6,9 +6,7 @@
 
 import 'elements.dart';
 import '../closure.dart'
-    show BoxFieldElement,
-         ClosureClassElement,
-         ClosureFieldElement;
+    show BoxFieldElement, ClosureClassElement, ClosureFieldElement;
 
 abstract class ElementVisitor<R, A> {
   const ElementVisitor();
@@ -24,13 +22,16 @@
   R visitExportElement(ExportElement e, A arg) => null;
   R visitPrefixElement(PrefixElement e, A arg) => null;
   R visitTypedefElement(TypedefElement e, A arg) => null;
-  R visitVariableElement(VariableElement e, A arg) => null;
+  R visitLocalVariableElement(LocalVariableElement e, A arg) => null;
   R visitParameterElement(ParameterElement e, A arg) => null;
   R visitFormalElement(FormalElement e, A arg) => null;
   R visitFieldElement(FieldElement e, A arg) => null;
   R visitFieldParameterElement(InitializingFormalElement e, A arg) => null;
   R visitAbstractFieldElement(AbstractFieldElement e, A arg) => null;
-  R visitFunctionElement(FunctionElement e, A arg) => null;
+  R visitMethodElement(FunctionElement e, A arg) => null;
+  R visitGetterElement(GetterElement e, A arg) => null;
+  R visitSetterElement(SetterElement e, A arg) => null;
+  R visitLocalFunctionElement(LocalFunctionElement e, A arg) => null;
   R visitConstructorElement(ConstructorElement e, A arg) => null;
   R visitConstructorBodyElement(ConstructorBodyElement e, A arg) => null;
   R visitClassElement(ClassElement e, A arg) => null;
@@ -42,7 +43,6 @@
   R visitClosureFieldElement(ClosureFieldElement e, A arg) => null;
 }
 
-
 abstract class BaseElementVisitor<R, A> extends ElementVisitor<R, A> {
   const BaseElementVisitor();
 
@@ -97,12 +97,16 @@
     return visitElement(e, arg);
   }
 
-  @override
   R visitVariableElement(VariableElement e, A arg) {
     return visitElement(e, arg);
   }
 
   @override
+  R visitLocalVariableElement(LocalVariableElement e, A arg) {
+    return visitVariableElement(e, arg);
+  }
+
+  @override
   R visitParameterElement(ParameterElement e, A arg) {
     return visitVariableElement(e, arg);
   }
@@ -127,12 +131,31 @@
     return visitElement(e, arg);
   }
 
-  @override
   R visitFunctionElement(FunctionElement e, A arg) {
     return visitElement(e, arg);
   }
 
   @override
+  R visitMethodElement(MethodElement e, A arg) {
+    return visitFunctionElement(e, arg);
+  }
+
+  @override
+  R visitGetterElement(GetterElement e, A arg) {
+    return visitFunctionElement(e, arg);
+  }
+
+  @override
+  R visitSetterElement(SetterElement e, A arg) {
+    return visitFunctionElement(e, arg);
+  }
+
+  @override
+  R visitLocalFunctionElement(LocalFunctionElement e, A arg) {
+    return visitFunctionElement(e, arg);
+  }
+
+  @override
   R visitConstructorElement(ConstructorElement e, A arg) {
     return visitFunctionElement(e, arg);
   }
@@ -180,4 +203,4 @@
   R visitClosureFieldElement(ClosureFieldElement e, A arg) {
     return visitVariableElement(e, arg);
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 2c7403f..ff3c21c 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -4,66 +4,44 @@
 
 library dart2js.enqueue;
 
-import 'dart:collection' show
-    Queue;
+import 'dart:collection' show Queue;
 
 import 'common.dart';
-import 'common/names.dart' show
-    Identifiers;
-import 'common/resolution.dart' show
-    Resolution;
-import 'common/work.dart' show
-    ItemCompilationContext,
-    WorkItem;
-import 'common/tasks.dart' show
-    CompilerTask,
-    DeferredAction,
-    DeferredTask;
-import 'common/codegen.dart' show
-    CodegenWorkItem;
-import 'common/resolution.dart' show
-    ResolutionWorkItem;
-import 'compiler.dart' show
-    Compiler;
-import 'dart_types.dart' show
-    DartType,
-    InterfaceType;
-import 'elements/elements.dart' show
-    AnalyzableElement,
-    AstElement,
-    ClassElement,
-    ConstructorElement,
-    Element,
-    Elements,
-    FunctionElement,
-    LibraryElement,
-    LocalFunctionElement,
-    Member,
-    MemberElement,
-    MethodElement,
-    Name,
-    TypedElement,
-    TypedefElement;
+import 'common/names.dart' show Identifiers;
+import 'common/resolution.dart' show Resolution;
+import 'common/work.dart' show ItemCompilationContext, WorkItem;
+import 'common/tasks.dart' show CompilerTask, DeferredAction, DeferredTask;
+import 'common/codegen.dart' show CodegenWorkItem;
+import 'common/resolution.dart' show ResolutionWorkItem;
+import 'compiler.dart' show Compiler;
+import 'dart_types.dart' show DartType, InterfaceType;
+import 'elements/elements.dart'
+    show
+        AnalyzableElement,
+        AstElement,
+        ClassElement,
+        ConstructorElement,
+        Element,
+        Elements,
+        FunctionElement,
+        LibraryElement,
+        LocalFunctionElement,
+        Member,
+        MemberElement,
+        MethodElement,
+        Name,
+        TypedElement,
+        TypedefElement;
 import 'js/js.dart' as js;
 import 'native/native.dart' as native;
-import 'types/types.dart' show
-    TypeMaskStrategy;
-import 'universe/selector.dart' show
-    Selector;
+import 'types/types.dart' show TypeMaskStrategy;
+import 'universe/selector.dart' show Selector;
 import 'universe/universe.dart';
-import 'universe/use.dart' show
-    DynamicUse,
-    StaticUse,
-    StaticUseKind,
-    TypeUse,
-    TypeUseKind;
-import 'universe/world_impact.dart' show
-    ImpactUseCase,
-    WorldImpact,
-    WorldImpactVisitor;
-import 'util/util.dart' show
-    Link,
-    Setlet;
+import 'universe/use.dart'
+    show DynamicUse, StaticUse, StaticUseKind, TypeUse, TypeUseKind;
+import 'universe/world_impact.dart'
+    show ImpactUseCase, WorldImpact, WorldImpactVisitor;
+import 'util/util.dart' show Link, Setlet;
 
 typedef ItemCompilationContext ItemCompilationContextCreator();
 
@@ -74,14 +52,17 @@
   String get name => 'Enqueue';
 
   EnqueueTask(Compiler compiler)
-    : resolution = new ResolutionEnqueuer(
-          compiler, compiler.backend.createItemCompilationContext,
-          compiler.analyzeOnly && compiler.analyzeMain
-              ? const EnqueuerStrategy() : const TreeShakingEnqueuerStrategy()),
-      codegen = new CodegenEnqueuer(
-          compiler, compiler.backend.createItemCompilationContext,
-          const TreeShakingEnqueuerStrategy()),
-      super(compiler) {
+      : resolution = new ResolutionEnqueuer(
+            compiler,
+            compiler.backend.createItemCompilationContext,
+            compiler.options.analyzeOnly && compiler.options.analyzeMain
+                ? const EnqueuerStrategy()
+                : const TreeShakingEnqueuerStrategy()),
+        codegen = new CodegenEnqueuer(
+            compiler,
+            compiler.backend.createItemCompilationContext,
+            const TreeShakingEnqueuerStrategy()),
+        super(compiler) {
     codegen.task = this;
     resolution.task = this;
 
@@ -101,10 +82,10 @@
   final Compiler compiler; // TODO(ahe): Remove this dependency.
   final EnqueuerStrategy strategy;
   final ItemCompilationContextCreator itemCompilationContextCreator;
-  final Map<String, Set<Element>> instanceMembersByName
-      = new Map<String, Set<Element>>();
-  final Map<String, Set<Element>> instanceFunctionsByName
-      = new Map<String, Set<Element>>();
+  final Map<String, Set<Element>> instanceMembersByName =
+      new Map<String, Set<Element>>();
+  final Map<String, Set<Element>> instanceFunctionsByName =
+      new Map<String, Set<Element>>();
   final Set<ClassElement> _processedClasses = new Set<ClassElement>();
   Set<ClassElement> recentClasses = new Setlet<ClassElement>();
   final Universe universe = new Universe(const TypeMaskStrategy());
@@ -114,17 +95,15 @@
 
   bool queueIsClosed = false;
   EnqueueTask task;
-  native.NativeEnqueuer nativeEnqueuer;  // Set by EnqueueTask
+  native.NativeEnqueuer nativeEnqueuer; // Set by EnqueueTask
 
   bool hasEnqueuedReflectiveElements = false;
   bool hasEnqueuedReflectiveStaticFields = false;
 
   WorldImpactVisitor impactVisitor;
 
-  Enqueuer(this.name,
-           this.compiler,
-           this.itemCompilationContextCreator,
-           this.strategy) {
+  Enqueuer(this.name, this.compiler, this.itemCompilationContextCreator,
+      this.strategy) {
     impactVisitor = new _EnqueuerImpactVisitor(this);
   }
 
@@ -157,11 +136,11 @@
    */
   void addToWorkList(Element element) {
     assert(invariant(element, element.isDeclaration));
-    if (internalAddToWorkList(element) && compiler.dumpInfo) {
+    if (internalAddToWorkList(element) && compiler.options.dumpInfo) {
       // TODO(sigmund): add other missing dependencies (internals, selectors
       // enqueued after allocations), also enable only for the codegen enqueuer.
-      compiler.dumpInfoTask.registerDependency(
-          compiler.currentElement, element);
+      compiler.dumpInfoTask
+          .registerDependency(compiler.currentElement, element);
     }
   }
 
@@ -174,23 +153,20 @@
 
   /// Apply the [worldImpact] of processing [element] to this enqueuer.
   void applyImpact(Element element, WorldImpact worldImpact) {
-    compiler.impactStrategy.visitImpact(
-        element, worldImpact, impactVisitor, impactUse);
+    compiler.impactStrategy
+        .visitImpact(element, worldImpact, impactVisitor, impactUse);
   }
 
-  void registerInstantiatedType(InterfaceType type,
-                                {bool mirrorUsage: false}) {
+  void registerInstantiatedType(InterfaceType type, {bool mirrorUsage: false}) {
     task.measure(() {
       ClassElement cls = type.element;
       cls.ensureResolved(resolution);
       bool isNative = compiler.backend.isNative(cls);
-      universe.registerTypeInstantiation(
-          type,
+      universe.registerTypeInstantiation(type,
           isNative: isNative,
-          byMirrors: mirrorUsage,
-          onImplemented: (ClassElement cls) {
-        compiler.backend.registerImplementedClass(
-                    cls, this, compiler.globalDependencies);
+          byMirrors: mirrorUsage, onImplemented: (ClassElement cls) {
+        compiler.backend
+            .registerImplementedClass(cls, this, compiler.globalDependencies);
       });
       // TODO(johnniwinther): Share this reasoning with [Universe].
       if (!cls.isAbstract || isNative || mirrorUsage) {
@@ -260,8 +236,7 @@
       if (function.name == Identifiers.noSuchMethod_) {
         registerNoSuchMethod(function);
       }
-      if (function.name == Identifiers.call &&
-          !cls.typeVariables.isEmpty) {
+      if (function.name == Identifiers.call && !cls.typeVariables.isEmpty) {
         registerCallMethodWithFreeTypeVariables(function);
       }
       // If there is a property access with the same name as a method we
@@ -273,7 +248,8 @@
       }
       // Store the member in [instanceFunctionsByName] to catch
       // getters on the function.
-      instanceFunctionsByName.putIfAbsent(memberName, () => new Set<Element>())
+      instanceFunctionsByName
+          .putIfAbsent(memberName, () => new Set<Element>())
           .add(member);
       if (universe.hasInvocation(function, compiler.world)) {
         addToWorkList(function);
@@ -303,7 +279,8 @@
 
     // The element is not yet used. Add it to the list of instance
     // members to still be processed.
-    instanceMembersByName.putIfAbsent(memberName, () => new Set<Element>())
+    instanceMembersByName
+        .putIfAbsent(memberName, () => new Set<Element>())
         .add(member);
   }
 
@@ -368,7 +345,7 @@
    * The actual implementation depends on the current compiler phase.
    */
   bool shouldIncludeElementDueToMirrors(Element element,
-                                        {bool includedEnclosing});
+      {bool includedEnclosing});
 
   void logEnqueueReflectiveAction(action, [msg = ""]) {
     if (TRACE_MIRROR_ENQUEUING) {
@@ -380,16 +357,14 @@
   ///
   /// [enclosingWasIncluded] provides a hint whether the enclosing element was
   /// needed for reflection.
-  void enqueueReflectiveConstructor(ConstructorElement ctor,
-                                    bool enclosingWasIncluded) {
+  void enqueueReflectiveConstructor(
+      ConstructorElement ctor, bool enclosingWasIncluded) {
     if (shouldIncludeElementDueToMirrors(ctor,
         includedEnclosing: enclosingWasIncluded)) {
       logEnqueueReflectiveAction(ctor);
       ClassElement cls = ctor.declaration.enclosingClass;
       compiler.backend.registerInstantiatedType(
-          cls.rawType,
-          this,
-          compiler.mirrorDependencies,
+          cls.rawType, this, compiler.mirrorDependencies,
           mirrorUsage: true);
       registerStaticUse(new StaticUse.foreignUse(ctor.declaration));
     }
@@ -401,7 +376,7 @@
   /// needed for reflection.
   void enqueueReflectiveMember(Element element, bool enclosingWasIncluded) {
     if (shouldIncludeElementDueToMirrors(element,
-            includedEnclosing: enclosingWasIncluded)) {
+        includedEnclosing: enclosingWasIncluded)) {
       logEnqueueReflectiveAction(element);
       if (element.isTypedef) {
         TypedefElement typedef = element;
@@ -413,13 +388,14 @@
         // We need to enqueue all members matching this one in subclasses, as
         // well.
         // TODO(herhut): Use TypedSelector.subtype for enqueueing
-        DynamicUse dynamicUse = new DynamicUse(
-            new Selector.fromElement(element), null);
+        DynamicUse dynamicUse =
+            new DynamicUse(new Selector.fromElement(element), null);
         registerDynamicUse(dynamicUse);
         if (element.isField) {
           DynamicUse dynamicUse = new DynamicUse(
-              new Selector.setter(new Name(
-                  element.name, element.library, isSetter: true)), null);
+              new Selector.setter(
+                  new Name(element.name, element.library, isSetter: true)),
+              null);
           registerDynamicUse(dynamicUse);
         }
       }
@@ -431,8 +407,7 @@
   /// [enclosingWasIncluded] provides a hint whether the enclosing element was
   /// needed for reflection.
   void enqueueReflectiveElementsInClass(ClassElement cls,
-                                        Iterable<ClassElement> recents,
-                                        bool enclosingWasIncluded) {
+      Iterable<ClassElement> recents, bool enclosingWasIncluded) {
     if (cls.library.isInternalLibrary || cls.isInjected) return;
     bool includeClass = shouldIncludeElementDueToMirrors(cls,
         includedEnclosing: enclosingWasIncluded);
@@ -441,9 +416,7 @@
       ClassElement decl = cls.declaration;
       decl.ensureResolved(resolution);
       compiler.backend.registerInstantiatedType(
-          decl.rawType,
-          this,
-          compiler.mirrorDependencies,
+          decl.rawType, this, compiler.mirrorDependencies,
           mirrorUsage: true);
     }
     // If the class is never instantiated, we know nothing of it can possibly
@@ -475,9 +448,7 @@
         logEnqueueReflectiveAction(cls);
         cls.ensureResolved(resolution);
         compiler.backend.registerInstantiatedType(
-            cls.rawType,
-            this,
-            compiler.mirrorDependencies,
+            cls.rawType, this, compiler.mirrorDependencies,
             mirrorUsage: true);
       }
     }
@@ -485,10 +456,10 @@
 
   /// Enqeue all local members of the library [lib] if they are required for
   /// reflection.
-  void enqueueReflectiveElementsInLibrary(LibraryElement lib,
-                                          Iterable<ClassElement> recents) {
-    bool includeLibrary = shouldIncludeElementDueToMirrors(lib,
-        includedEnclosing: false);
+  void enqueueReflectiveElementsInLibrary(
+      LibraryElement lib, Iterable<ClassElement> recents) {
+    bool includeLibrary =
+        shouldIncludeElementDueToMirrors(lib, includedEnclosing: false);
     lib.forEachLocalMember((Element member) {
       if (member.isClass) {
         enqueueReflectiveElementsInClass(member, recents, includeLibrary);
@@ -522,7 +493,9 @@
       // Keep looking at new classes until fixpoint is reached.
       logEnqueueReflectiveAction("!START enqueueRecents");
       recents.forEach((ClassElement cls) {
-        enqueueReflectiveElementsInClass(cls, recents,
+        enqueueReflectiveElementsInClass(
+            cls,
+            recents,
             shouldIncludeElementDueToMirrors(cls.library,
                 includedEnclosing: false));
       });
@@ -541,9 +514,7 @@
   }
 
   void processSet(
-      Map<String, Set<Element>> map,
-      String memberName,
-      bool f(Element e)) {
+      Map<String, Set<Element>> map, String memberName, bool f(Element e)) {
     Set<Element> members = map[memberName];
     if (members == null) return;
     // [f] might add elements to [: map[memberName] :] during the loop below
@@ -577,7 +548,8 @@
         if (member.isFunction && selector.isGetter) {
           registerClosurizedMember(member);
         }
-        if (member.isField && compiler.backend.isNative(member.enclosingClass)) {
+        if (member.isField &&
+            compiler.backend.isNative(member.enclosingClass)) {
           if (selector.isGetter || selector.isCall) {
             nativeEnqueuer.registerFieldLoad(member);
             // We have to also handle storing to the field because we only get
@@ -663,7 +635,7 @@
         _registerIsCheck(type);
         break;
       case TypeUseKind.CHECKED_MODE_CHECK:
-        if (compiler.enableTypeAssertions) {
+        if (compiler.options.enableTypeAssertions) {
           _registerIsCheck(type);
         }
         break;
@@ -677,8 +649,7 @@
     // Even in checked mode, type annotations for return type and argument
     // types do not imply type checks, so there should never be a check
     // against the type variable of a typedef.
-    assert(!type.isTypeVariable ||
-           !type.element.enclosingElement.isTypedef);
+    assert(!type.isTypeVariable || !type.element.enclosingElement.isTypedef);
   }
 
   void registerCallMethodWithFreeTypeVariables(Element element) {
@@ -748,17 +719,17 @@
    */
   final Queue<DeferredTask> deferredTaskQueue;
 
-  static const ImpactUseCase IMPACT_USE = const ImpactUseCase('ResolutionEnqueuer');
+  static const ImpactUseCase IMPACT_USE =
+      const ImpactUseCase('ResolutionEnqueuer');
 
   ImpactUseCase get impactUse => IMPACT_USE;
 
-  ResolutionEnqueuer(Compiler compiler,
-                     ItemCompilationContext itemCompilationContextCreator(),
-                     EnqueuerStrategy strategy)
-      : super('resolution enqueuer',
-              compiler,
-              itemCompilationContextCreator,
-              strategy),
+  ResolutionEnqueuer(
+      Compiler compiler,
+      ItemCompilationContext itemCompilationContextCreator(),
+      EnqueuerStrategy strategy)
+      : super('resolution enqueuer', compiler, itemCompilationContextCreator,
+            strategy),
         processedElements = new Set<AstElement>(),
         queue = new Queue<ResolutionWorkItem>(),
         deferredTaskQueue = new Queue<DeferredTask>();
@@ -786,8 +757,9 @@
    * yet.
    */
   bool shouldIncludeElementDueToMirrors(Element element,
-                                        {bool includedEnclosing}) {
-    return includedEnclosing || compiler.backend.requiredByMirrorSystem(element);
+      {bool includedEnclosing}) {
+    return includedEnclosing ||
+        compiler.backend.requiredByMirrorSystem(element);
   }
 
   bool internalAddToWorkList(Element element) {
@@ -797,28 +769,21 @@
         message: 'Element $element is not analyzable.'));
     if (hasBeenProcessed(element)) return false;
     if (queueIsClosed) {
-      throw new SpannableAssertionFailure(element,
-          "Resolution work list is closed. Trying to add $element.");
+      throw new SpannableAssertionFailure(
+          element, "Resolution work list is closed. Trying to add $element.");
     }
 
     compiler.world.registerUsedElement(element);
 
-    ResolutionWorkItem workItem;
-    if (compiler.serialization.isDeserialized(element)) {
-      workItem = compiler.serialization.createResolutionWorkItem(
-          element, itemCompilationContextCreator());
-    } else {
-      workItem = new ResolutionWorkItem(
-          element, itemCompilationContextCreator());
-    }
+    ResolutionWorkItem workItem = compiler.resolution
+        .createWorkItem(element, itemCompilationContextCreator());
     queue.add(workItem);
 
     // Enable isolate support if we start using something from the isolate
     // library, or timers for the async library.  We exclude constant fields,
     // which are ending here because their initializing expression is compiled.
     LibraryElement library = element.library;
-    if (!compiler.hasIsolateSupport &&
-        (!element.isField || !element.isConst)) {
+    if (!compiler.hasIsolateSupport && (!element.isField || !element.isConst)) {
       String uri = library.canonicalUri.toString();
       if (uri == 'dart:isolate') {
         enableIsolateSupport();
@@ -867,7 +832,8 @@
    */
   void addDeferredAction(Element element, DeferredAction action) {
     if (queueIsClosed) {
-      throw new SpannableAssertionFailure(element,
+      throw new SpannableAssertionFailure(
+          element,
           "Resolution work list is closed. "
           "Trying to add deferred action for $element");
     }
@@ -907,18 +873,20 @@
 
   bool enabledNoSuchMethod = false;
 
-  static const ImpactUseCase IMPACT_USE = const ImpactUseCase('CodegenEnqueuer');
+  static const ImpactUseCase IMPACT_USE =
+      const ImpactUseCase('CodegenEnqueuer');
 
   ImpactUseCase get impactUse => IMPACT_USE;
 
-  CodegenEnqueuer(Compiler compiler,
-                  ItemCompilationContext itemCompilationContextCreator(),
-                  EnqueuerStrategy strategy)
+  CodegenEnqueuer(
+      Compiler compiler,
+      ItemCompilationContext itemCompilationContextCreator(),
+      EnqueuerStrategy strategy)
       : queue = new Queue<CodegenWorkItem>(),
         newlyEnqueuedElements = compiler.cacheStrategy.newSet(),
         newlySeenSelectors = compiler.cacheStrategy.newSet(),
         super('codegen enqueuer', compiler, itemCompilationContextCreator,
-              strategy);
+            strategy);
 
   bool isProcessed(Element member) =>
       member.isAbstract || generatedCode.containsKey(member);
@@ -931,7 +899,7 @@
    * subtyping constraints into account.
    */
   bool shouldIncludeElementDueToMirrors(Element element,
-                                        {bool includedEnclosing}) {
+      {bool includedEnclosing}) {
     return compiler.backend.isAccessibleByReflection(element);
   }
 
@@ -942,22 +910,22 @@
     // Codegen inlines field initializers. It only needs to generate
     // code for checked setters.
     if (element.isField && element.isInstanceMember) {
-      if (!compiler.enableTypeAssertions
-          || element.enclosingElement.isClosure) {
+      if (!compiler.options.enableTypeAssertions ||
+          element.enclosingElement.isClosure) {
         return false;
       }
     }
 
-    if (compiler.hasIncrementalSupport && !isProcessed(element)) {
+    if (compiler.options.hasIncrementalSupport && !isProcessed(element)) {
       newlyEnqueuedElements.add(element);
     }
 
     if (queueIsClosed) {
-      throw new SpannableAssertionFailure(element,
-          "Codegen work list is closed. Trying to add $element");
+      throw new SpannableAssertionFailure(
+          element, "Codegen work list is closed. Trying to add $element");
     }
-    CodegenWorkItem workItem = new CodegenWorkItem(
-        compiler, element, itemCompilationContextCreator());
+    CodegenWorkItem workItem =
+        new CodegenWorkItem(compiler, element, itemCompilationContextCreator());
     queue.add(workItem);
     return true;
   }
@@ -986,7 +954,7 @@
   }
 
   void handleUnseenSelector(DynamicUse dynamicUse) {
-    if (compiler.hasIncrementalSupport) {
+    if (compiler.options.hasIncrementalSupport) {
       newlySeenSelectors.add(dynamicUse);
     }
     super.handleUnseenSelector(dynamicUse);
@@ -998,11 +966,11 @@
   bool checkNoEnqueuedInvokedInstanceMethods(Enqueuer enqueuer) {
     enqueuer.task.measure(() {
       // Run through the classes and see if we need to compile methods.
-      for (ClassElement classElement in
-               enqueuer.universe.directlyInstantiatedClasses) {
+      for (ClassElement classElement
+          in enqueuer.universe.directlyInstantiatedClasses) {
         for (ClassElement currentClass = classElement;
-             currentClass != null;
-             currentClass = currentClass.superclass) {
+            currentClass != null;
+            currentClass = currentClass.superclass) {
           enqueuer.processInstantiatedClassMembers(currentClass);
         }
       }
diff --git a/pkg/compiler/lib/src/environment.dart b/pkg/compiler/lib/src/environment.dart
new file mode 100644
index 0000000..29c9861
--- /dev/null
+++ b/pkg/compiler/lib/src/environment.dart
@@ -0,0 +1,16 @@
+// 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.
+
+/// Collects definitions provided to the compiler via the `-D` flag.
+///
+/// Environment variables can be used in the user code in two ways. From
+/// conditional imports, and from `const String.fromEnvironment` and
+/// other similar constructors.
+abstract class Environment {
+  /// Return the string value of the given key.
+  ///
+  /// Note that `bool.fromEnvironment` and `int.fromEnvironment` are also
+  /// implemented in terms of `String.fromEnvironment`.
+  String valueOf(String key);
+}
diff --git a/pkg/compiler/lib/src/hash/sha1.dart b/pkg/compiler/lib/src/hash/sha1.dart
index 02eae83..8e5eec2 100644
--- a/pkg/compiler/lib/src/hash/sha1.dart
+++ b/pkg/compiler/lib/src/hash/sha1.dart
@@ -54,15 +54,11 @@
    *
    */
   String _bytesToBase64(List<int> bytes,
-                              {bool urlSafe : false,
-                               bool addLineSeparator : false}) {
-    return _CryptoUtils.bytesToBase64(bytes,
-                                      urlSafe,
-                                      addLineSeparator);
+      {bool urlSafe: false, bool addLineSeparator: false}) {
+    return _CryptoUtils.bytesToBase64(bytes, urlSafe, addLineSeparator);
   }
 }
 
-
 // Constants.
 const _MASK_8 = 0xff;
 const _MASK_32 = 0xffffffff;
@@ -73,9 +69,9 @@
 
 // Rotate left limiting to unsigned 32-bit values.
 int _rotl32(int val, int shift) {
-var mod_shift = shift & 31;
-return ((val << mod_shift) & _MASK_32) |
-   ((val & _MASK_32) >> (32 - mod_shift));
+  var mod_shift = shift & 31;
+  return ((val << mod_shift) & _MASK_32) |
+      ((val & _MASK_32) >> (32 - mod_shift));
 }
 
 // Base class encapsulating common behavior for cryptographic hash
@@ -90,9 +86,8 @@
   List<int> _pendingData;
   bool _digestCalled = false;
 
-  _HashBase(int chunkSizeInWords,
-            int digestSizeInWords,
-            bool this._bigEndianWords)
+  _HashBase(
+      int chunkSizeInWords, int digestSizeInWords, bool this._bigEndianWords)
       : _pendingData = [],
         _currentChunk = new List(chunkSizeInWords),
         _h = new List(digestSizeInWords),
@@ -101,13 +96,13 @@
 
   // Update the hasher with more data.
   void add(List<int> data) {
-     if (_digestCalled) {
-       throw new StateError(
-           'Hash update method called after digest was retrieved');
-     }
-     _lengthInBytes += data.length;
-     _pendingData.addAll(data);
-     _iterate();
+    if (_digestCalled) {
+      throw new StateError(
+          'Hash update method called after digest was retrieved');
+    }
+    _lengthInBytes += data.length;
+    _pendingData.addAll(data);
+    _iterate();
   }
 
   // Finish the hash computation and return the digest string.
@@ -124,7 +119,7 @@
 
   // Returns the block size of the hash in bytes.
   int get blockSize {
-   return _chunkSizeInWords * _BYTES_PER_WORD;
+    return _chunkSizeInWords * _BYTES_PER_WORD;
   }
 
   // One round of the hash computation.
@@ -209,7 +204,6 @@
   }
 }
 
-
 /**
  * Interface for cryptographic hash functions.
  *
@@ -252,7 +246,9 @@
   final List<int> _w;
 
   // Construct a SHA1 hasher object.
-  SHA1() : _w = new List(80), super(16, 5, true) {
+  SHA1()
+      : _w = new List(80),
+        super(16, 5, true) {
     _h[0] = 0x67452301;
     _h[1] = 0xEFCDAB89;
     _h[2] = 0x98BADCFE;
@@ -305,10 +301,9 @@
 }
 
 abstract class _CryptoUtils {
-
   static const int PAD = 61; // '='
-  static const int CR = 13;  // '\r'
-  static const int LF = 10;  // '\n'
+  static const int CR = 13; // '\r'
+  static const int LF = 10; // '\n'
   static const int LINE_LENGTH = 76;
 
   static const String _encodeTable =
@@ -318,8 +313,7 @@
       "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
 
   static String bytesToBase64(List<int> bytes,
-                              [bool urlSafe = false,
-                               bool addLineSeparator = false]) {
+      [bool urlSafe = false, bool addLineSeparator = false]) {
     int len = bytes.length;
     if (len == 0) {
       return "";
@@ -340,11 +334,11 @@
     int j = 0, i = 0, c = 0;
     while (i < chunkLength) {
       int x = ((bytes[i++] << 16) & 0xFFFFFF) |
-              ((bytes[i++] << 8) & 0xFFFFFF) |
-                bytes[i++];
+          ((bytes[i++] << 8) & 0xFFFFFF) |
+          bytes[i++];
       out[j++] = lookup.codeUnitAt(x >> 18);
       out[j++] = lookup.codeUnitAt((x >> 12) & 0x3F);
-      out[j++] = lookup.codeUnitAt((x >> 6)  & 0x3F);
+      out[j++] = lookup.codeUnitAt((x >> 6) & 0x3F);
       out[j++] = lookup.codeUnitAt(x & 0x3f);
       // Add optional line separator for each 76 char output.
       if (addLineSeparator && ++c == 19 && j < outputLen - 2) {
diff --git a/pkg/compiler/lib/src/helpers/debug_collection.dart b/pkg/compiler/lib/src/helpers/debug_collection.dart
index 8ff4be2..c0276cf 100644
--- a/pkg/compiler/lib/src/helpers/debug_collection.dart
+++ b/pkg/compiler/lib/src/helpers/debug_collection.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.
 
-part of dart2js.helpers;
-
 typedef void DebugCallback(String methodName, var arg1, var arg2);
 
 class DebugMap<K, V> implements Map<K, V> {
@@ -85,8 +83,8 @@
 
   E reduce(E combine(E value, E element)) => iterable.reduce(combine);
 
-  dynamic fold(var initialValue,
-               dynamic combine(var previousValue, E element)) {
+  dynamic fold(
+      var initialValue, dynamic combine(var previousValue, E element)) {
     return iterable.fold(initialValue, combine);
   }
 
@@ -96,7 +94,7 @@
 
   bool any(bool test(E element)) => iterable.any(test);
 
-  List<E> toList({ bool growable: true }) {
+  List<E> toList({bool growable: true}) {
     return iterable.toList(growable: growable);
   }
 
@@ -122,7 +120,7 @@
 
   E get single => iterable.single;
 
-  E firstWhere(bool test(E element), { E orElse() }) {
+  E firstWhere(bool test(E element), {E orElse()}) {
     return iterable.firstWhere(test, orElse: orElse);
   }
 
@@ -133,7 +131,6 @@
   E singleWhere(bool test(E element)) => iterable.singleWhere(test);
 
   E elementAt(int index) => iterable.elementAt(index);
-
 }
 
 class DebugList<E> extends DebugIterable<E> implements List<E> {
@@ -269,11 +266,11 @@
 /// at the call site by running test programs and adding to [runtimeTypes] when
 /// new type are found.
 void assertType(String name, List<String> runtimeTypes, var object,
-                {bool showObjects: false}) {
+    {bool showObjects: false}) {
   String runtimeType = '${object.runtimeType}';
   if (runtimeTypes != null && runtimeTypes.contains(runtimeType)) return;
   throw '$name: $runtimeType'
-        '${showObjects ? ' ($object)' : ''}';
+      '${showObjects ? ' ($object)' : ''}';
 }
 
 /// Callback for the [addCallback] of [DebugMap] that throws an exception if
@@ -288,7 +285,7 @@
   final bool showObjects;
 
   const MapTypeAsserter(this.name, this.runtimeTypes,
-                       {bool this.showObjects: false});
+      {bool this.showObjects: false});
 
   void call(String methodName, var key, var value) {
     check(key, value, '$methodName: ');
@@ -300,7 +297,7 @@
     List<String> valuesTypes = runtimeTypes[keyType];
     if (valuesTypes != null && valuesTypes.contains(valueType)) return;
     throw '$name: $text$keyType => $valueType'
-          '${showObjects ? ' ($key => $value)' : ''}';
+        '${showObjects ? ' ($key => $value)' : ''}';
   }
 }
 
@@ -316,7 +313,7 @@
   final bool showObjects;
 
   const CollectionTypeAsserter(this.name, this.runtimeTypes,
-                       {bool this.showObjects: false});
+      {bool this.showObjects: false});
 
   void call(String methodName, var element, _) {
     check(element, '$methodName: ');
@@ -326,6 +323,6 @@
     String elementType = '${element.runtimeType}';
     if (runtimeTypes.contains(elementType)) return;
     throw '$name: $text$elementType'
-          '${showObjects ? ' ($element)' : ''}';
+        '${showObjects ? ' ($element)' : ''}';
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/helpers/expensive_map.dart b/pkg/compiler/lib/src/helpers/expensive_map.dart
index 1a6e5e8..8b382d9 100644
--- a/pkg/compiler/lib/src/helpers/expensive_map.dart
+++ b/pkg/compiler/lib/src/helpers/expensive_map.dart
@@ -2,15 +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.
 
-part of dart2js.helpers;
-
 /**
  * The expensive map is a data structure useful for tracking down
  * excessive memory usage due to large maps. It acts as an ordinary
  * hash map, but it uses 10 times more memory (by default).
  */
 class ExpensiveMap<K, V> implements Map<K, V> {
-
   final List _maps;
 
   ExpensiveMap([int copies = 10]) : _maps = new List(copies) {
@@ -30,13 +27,13 @@
   bool containsKey(K key) => _maps[0].containsKey(key);
   bool containsValue(V value) => _maps[0].containsValue(value);
 
-  V operator[](K key) => _maps[0][key];
+  V operator [](K key) => _maps[0][key];
 
   void forEach(void action(K key, V value)) {
     _maps[0].forEach(action);
   }
 
-  void operator[]=(K key, V value) {
+  void operator []=(K key, V value) {
     for (int i = 0; i < _maps.length; i++) {
       _maps[i][key] = value;
     }
diff --git a/pkg/compiler/lib/src/helpers/expensive_set.dart b/pkg/compiler/lib/src/helpers/expensive_set.dart
index b57db8a..2b34cfb 100644
--- a/pkg/compiler/lib/src/helpers/expensive_set.dart
+++ b/pkg/compiler/lib/src/helpers/expensive_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.
 
-part of dart2js.helpers;
+import 'dart:collection';
 
 /**
  * The expensive set is a data structure useful for tracking down
@@ -10,7 +10,6 @@
  * hash set, but it uses 10 times more memory (by default).
  */
 class ExpensiveSet<E> extends IterableBase<E> implements Set<E> {
-
   final List _sets;
 
   ExpensiveSet([int copies = 10]) : _sets = new List(copies) {
diff --git a/pkg/compiler/lib/src/helpers/helpers.dart b/pkg/compiler/lib/src/helpers/helpers.dart
index f956850..6c4cc63 100644
--- a/pkg/compiler/lib/src/helpers/helpers.dart
+++ b/pkg/compiler/lib/src/helpers/helpers.dart
@@ -7,25 +7,18 @@
 
 library dart2js.helpers;
 
-import 'dart:async' show
-    EventSink;
-import 'dart:collection';
-import 'dart:convert';
-
-import '../../compiler.dart';
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
-import '../diagnostics/invariant.dart' show
-    DEBUG_MODE;
+import '../diagnostics/invariant.dart' show DEBUG_MODE;
 import '../util/util.dart';
 
-part 'debug_collection.dart';
-part 'trace.dart';
-part 'expensive_map.dart';
-part 'expensive_set.dart';
-part 'stats.dart';
-part 'track_map.dart';
+import 'trace.dart';
+
+export 'debug_collection.dart';
+export 'trace.dart';
+export 'expensive_map.dart';
+export 'expensive_set.dart';
+export 'stats.dart';
+export 'track_map.dart';
 
 /// Global flag to enable [debugPrint]. This should always be `true` by default
 /// and be set to `false` as a means to temporarily turn off all debugging
@@ -42,6 +35,7 @@
 class _DebugIndentation extends Indentation {
   final String indentationUnit = " ";
 }
+
 _DebugIndentation _indentation = new _DebugIndentation();
 
 /// Function signature of [debugPrint].
@@ -85,9 +79,8 @@
 }
 
 /// Function signature of [reportHere].
-typedef ReportHere(DiagnosticReporter reporter,
-                   Spannable node,
-                   String debugMessage);
+typedef ReportHere(
+    DiagnosticReporter reporter, Spannable node, String debugMessage);
 
 /// Print a message with a source location.
 ReportHere get reportHere {
@@ -97,8 +90,8 @@
 
 /// Implementation of [reportHere]
 _reportHere(DiagnosticReporter reporter, Spannable node, String debugMessage) {
-  reporter.reportInfo(node,
-      MessageKind.GENERIC, {'text': 'HERE: $debugMessage'});
+  reporter
+      .reportInfo(node, MessageKind.GENERIC, {'text': 'HERE: $debugMessage'});
 }
 
 /// Set of tracked objects used by [track] and [ifTracked].
diff --git a/pkg/compiler/lib/src/helpers/stats.dart b/pkg/compiler/lib/src/helpers/stats.dart
index d7f6b5d..c8f6c0da0 100644
--- a/pkg/compiler/lib/src/helpers/stats.dart
+++ b/pkg/compiler/lib/src/helpers/stats.dart
@@ -2,7 +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.
 
-part of dart2js.helpers;
+import 'dart:async' show EventSink;
+import 'dart:collection';
+import 'dart:convert';
+
+import '../../compiler.dart';
+import '../common.dart';
+import '../compiler.dart' show Compiler;
+import '../util/util.dart';
 
 // Helper methods for statistics.
 
@@ -27,11 +34,12 @@
 /// If [xml] is `true`, stats output is formatted as XML with a default
 /// extension of 'xml', otherwise the output is indented text with a default
 /// extension of 'log'.
-void enableStatsOutput({CompilerOutputProvider outputProvider,
-                        bool xml: true,
-                        String name: 'stats',
-                        String extension,
-                        int examples: 10}) {
+void enableStatsOutput(
+    {CompilerOutputProvider outputProvider,
+    bool xml: true,
+    String name: 'stats',
+    String extension,
+    int examples: 10}) {
   if (_stats != null) {
     throw new StateError('Stats have already been initialized.');
   }
@@ -187,7 +195,7 @@
   /// elements are looked up in [dataA] or [dataB] using [dataA] as the primary
   /// source.
   void dumpCorrelation(idA, Iterable a, idB, Iterable b,
-                       {Map dataA, Map dataB}) {}
+      {Map dataA, Map dataB}) {}
 }
 
 /// Interface for printing output data.
@@ -240,13 +248,13 @@
 
   /// Start a stat entry for [id] with additional [data].
   void open(String id,
-            [Map<String, dynamic> data = const <String, dynamic>{}]) {}
+      [Map<String, dynamic> data = const <String, dynamic>{}]) {}
 
   /// Create a stat entry for [id] with additional [data] and content created by
   /// [createChildContent].
   void child(String id,
-             [Map<String, dynamic> data = const <String, dynamic>{},
-              void createChildContent()]) {
+      [Map<String, dynamic> data = const <String, dynamic>{},
+      void createChildContent()]) {
     open(id, data);
     if (createChildContent != null) createChildContent();
     close(id);
@@ -267,8 +275,7 @@
   final int examples;
   final StatsOutput output;
 
-  BasePrinter({this.output: const DebugOutput(),
-               this.examples: 10}) {
+  BasePrinter({this.output: const DebugOutput(), this.examples: 10}) {
     indentationUnit = " ";
   }
 }
@@ -277,12 +284,11 @@
 class ConsolePrinter extends BasePrinter {
   int extraLevel = 0;
 
-  ConsolePrinter({StatsOutput output: const DebugOutput(),
-                  int examples: 10})
+  ConsolePrinter({StatsOutput output: const DebugOutput(), int examples: 10})
       : super(output: output, examples: examples);
 
   void open(String id,
-            [Map<String, dynamic> data = const <String, dynamic>{}]) {
+      [Map<String, dynamic> data = const <String, dynamic>{}]) {
     if (extraLevel > 0) return;
 
     StringBuffer sb = new StringBuffer();
@@ -331,8 +337,7 @@
   static const HtmlEscape escape = const HtmlEscape();
   bool opened = false;
 
-  XMLPrinter({output: const DebugOutput(),
-              int examples: 10})
+  XMLPrinter({output: const DebugOutput(), int examples: 10})
       : super(output: output, examples: examples);
 
   void start(String id) {
@@ -348,7 +353,7 @@
   }
 
   void open(String id,
-            [Map<String, dynamic> data = const <String, dynamic>{}]) {
+      [Map<String, dynamic> data = const <String, dynamic>{}]) {
     StringBuffer sb = new StringBuffer();
     sb.write(indentation);
     sb.write('<$id');
@@ -390,9 +395,8 @@
   _StackTraceNode.leaf(StackTraceLines stackTrace)
       : this(stackTrace.lines, 1, const []);
 
-  _StackTraceNode.node(List<StackTraceLine> commonPrefix,
-                       _StackTraceNode first,
-                       _StackTraceNode second)
+  _StackTraceNode.node(List<StackTraceLine> commonPrefix, _StackTraceNode first,
+      _StackTraceNode second)
       : this(commonPrefix, first.count + second.count, [first, second]);
 
   void add(StackTraceLines stackTrace) {
@@ -493,7 +497,8 @@
     printer.open('trace', {
       'id': id,
       'totalCount': totalCount,
-      'sampleFrequency': sampleFrequency});
+      'sampleFrequency': sampleFrequency
+    });
     dumpSubtraces(printer);
     printer.close('trace');
   }
@@ -566,9 +571,9 @@
     if (sampleFrequency == null) {
       sampleFrequency = stackTraceSampleFrequency;
     }
-    traceMap.putIfAbsent(key,
-        () => new _StackTraceTree(key, sampleFrequency)).sample();
-
+    traceMap
+        .putIfAbsent(key, () => new _StackTraceTree(key, sampleFrequency))
+        .sample();
   }
 
   Iterable getList(String key) {
@@ -596,7 +601,6 @@
             limit: printer.examples, dataMap: set);
       });
     });
-
   }
 
   void dumpFrequencies() {
@@ -657,14 +661,11 @@
           (examplesLimit == 0 || !hasData(examples.first))) {
         printer.child('examples', {'count': count, 'example': examples.first});
       } else {
-        printer.child('examples',
-            {'count': count, 'examples': examples.length},
+        printer.child('examples', {'count': count, 'examples': examples.length},
             () {
           examples.forEach((example) {
-            dumpIterable(
-                'examples', '$example', map[example],
-                limit: examplesLimit,
-                includeCount: false);
+            dumpIterable('examples', '$example', map[example],
+                limit: examplesLimit, includeCount: false);
           });
         });
       }
@@ -688,22 +689,22 @@
   }
 
   void dumpCorrelation(keyA, Iterable a, keyB, Iterable b,
-                       {Map dataA, Map dataB}) {
+      {Map dataA, Map dataB}) {
     printer.child('correlations', {'title': '$keyA vs $keyB'}, () {
       List aAndB = a.where((e) => e != null && b.contains(e)).toList();
       List aAndNotB = a.where((e) => e != null && !b.contains(e)).toList();
       List notAandB = b.where((e) => e != null && !a.contains(e)).toList();
-      dumpIterable('correlation', '$keyA && $keyB', aAndB, dataMap: dataA,
-          limit: printer.examples);
-      dumpIterable('correlation', '$keyA && !$keyB', aAndNotB, dataMap: dataA,
-          limit: printer.examples);
-      dumpIterable('correlation', '!$keyA && $keyB', notAandB, dataMap: dataB,
-          limit: printer.examples);
+      dumpIterable('correlation', '$keyA && $keyB', aAndB,
+          dataMap: dataA, limit: printer.examples);
+      dumpIterable('correlation', '$keyA && !$keyB', aAndNotB,
+          dataMap: dataA, limit: printer.examples);
+      dumpIterable('correlation', '!$keyA && $keyB', notAandB,
+          dataMap: dataB, limit: printer.examples);
     });
   }
 
   void dumpIterable(String tag, String title, Iterable iterable,
-                    {int limit, Map dataMap, bool includeCount: true}) {
+      {int limit, Map dataMap, bool includeCount: true}) {
     if (limit == 0) return;
 
     Map childData = {};
@@ -748,9 +749,9 @@
 /// If [isValidKey] is provided, this is used to determine with a value of [map]
 /// is a potential key of the inversion map.
 Map<dynamic, Set> inverseMap(Map map,
-                             {bool equals(key1, key2),
-                              int hashCode(key),
-                              bool isValidKey(potentialKey)}) {
+    {bool equals(key1, key2),
+    int hashCode(key),
+    bool isValidKey(potentialKey)}) {
   Map<dynamic, Set> result = new LinkedHashMap<dynamic, Set>(
       equals: equals, hashCode: hashCode, isValidKey: isValidKey);
   map.forEach((k, v) {
@@ -778,11 +779,10 @@
 
 /// Returns a new map in which the keys of [map] are sorted using [compare].
 /// If [compare] is null, the keys must be [Comparable].
-Map sortMap(Map map, [int compare(a,b)]) {
+Map sortMap(Map map, [int compare(a, b)]) {
   List keys = map.keys.toList();
   keys.sort(compare);
   Map sortedMap = new Map();
   keys.forEach((k) => sortedMap[k] = map[k]);
   return sortedMap;
 }
-
diff --git a/pkg/compiler/lib/src/helpers/trace.dart b/pkg/compiler/lib/src/helpers/trace.dart
index 0889efd..021ba97 100644
--- a/pkg/compiler/lib/src/helpers/trace.dart
+++ b/pkg/compiler/lib/src/helpers/trace.dart
@@ -2,13 +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.
 
-part of dart2js.helpers;
+import '../common.dart';
+import '../util/util.dart';
 
 /// Function signature for [trace].
 typedef void Trace(String message,
-                   {bool condition(String stackTrace),
-                    int limit,
-                    bool throwOnPrint});
+    {bool condition(String stackTrace), int limit, bool throwOnPrint});
 
 /**
  * Helper method for printing stack traces for debugging.
@@ -32,15 +31,15 @@
   return _trace;
 }
 
-void _trace(String message, {bool condition(String stackTrace), int limit,
-                             bool throwOnPrint: false}) {
+void _trace(String message,
+    {bool condition(String stackTrace), int limit, bool throwOnPrint: false}) {
   try {
     throw '';
   } catch (e, s) {
     String stackTrace;
     try {
-      stackTrace = prettifyStackTrace(
-          s, rangeStart: 1, rangeEnd: limit, filePrefix: stackTraceFilePrefix);
+      stackTrace = prettifyStackTrace(s,
+          rangeStart: 1, rangeEnd: limit, filePrefix: stackTraceFilePrefix);
     } catch (e) {
       print(e);
       stackTrace = '$s';
@@ -60,12 +59,9 @@
 }
 
 /// Function signature of [traceAndReport].
-typedef void TraceAndReport(DiagnosticReporter reporter,
-                            Spannable node,
-                            String message,
-                            {bool condition(String stackTrace),
-                             int limit,
-                             bool throwOnPrint});
+typedef void TraceAndReport(
+    DiagnosticReporter reporter, Spannable node, String message,
+    {bool condition(String stackTrace), int limit, bool throwOnPrint});
 
 /// Calls [reportHere] and [trace] with the same message.
 TraceAndReport get traceAndReport {
@@ -77,14 +73,11 @@
 TraceAndReport get reportAndTrace => traceAndReport;
 
 /// Implementation of [traceAndReport].
-void _traceAndReport(DiagnosticReporter reporter,
-                     Spannable node,
-                     String message,
-                     {bool condition(String stackTrace), int limit,
-                      bool throwOnPrint: false}) {
-
+void _traceAndReport(
+    DiagnosticReporter reporter, Spannable node, String message,
+    {bool condition(String stackTrace), int limit, bool throwOnPrint: false}) {
   trace(message, limit: limit, throwOnPrint: throwOnPrint,
-        condition: (String stackTrace) {
+      condition: (String stackTrace) {
     bool result = condition != null ? condition(stackTrace) : true;
     if (result) {
       reportHere(reporter, node, message);
@@ -98,15 +91,15 @@
 /// Use [offset] to discard the first [offset] calls of the call stack. Defaults
 /// to `1`, that is, discard the call to [stackTrace] itself. Use [limit] to
 /// limit the length of the stack trace lines.
-StackTraceLines stackTrace({int offset: 1,
-                            int limit: null}) {
+StackTraceLines stackTrace({int offset: 1, int limit: null}) {
   int rangeStart = offset;
   int rangeEnd = limit == null ? null : rangeStart + limit;
   try {
     throw '';
   } catch (_, stackTrace) {
     return new StackTraceLines.fromTrace(stackTrace,
-        rangeStart: offset, rangeEnd: rangeEnd,
+        rangeStart: offset,
+        rangeEnd: rangeEnd,
         filePrefix: stackTraceFilePrefix);
   }
   return null;
@@ -120,10 +113,7 @@
   final int maxColumnNoLength;
 
   factory StackTraceLines.fromTrace(StackTrace s,
-                                    {int rangeStart,
-                                     int rangeEnd,
-                                     String filePrefix,
-                                     String lambda: r'?'}) {
+      {int rangeStart, int rangeEnd, String filePrefix, String lambda: r'?'}) {
     final RegExp indexPattern = new RegExp(r'#\d+\s*');
     int index = -1;
     int maxFileLength = 0;
@@ -152,13 +142,13 @@
         int leftParenPos = line.indexOf('(');
         int rightParenPos = line.indexOf(')', leftParenPos);
         int lastColon = line.lastIndexOf(':', rightParenPos);
-        int nextToLastColon = line.lastIndexOf(':', lastColon-1);
+        int nextToLastColon = line.lastIndexOf(':', lastColon - 1);
 
         String lineNo;
         String columnNo;
         if (nextToLastColon != -1) {
-          lineNo = line.substring(nextToLastColon+1, lastColon);
-          columnNo = line.substring(lastColon+1, rightParenPos);
+          lineNo = line.substring(nextToLastColon + 1, lastColon);
+          columnNo = line.substring(lastColon + 1, rightParenPos);
           try {
             int.parse(columnNo);
             try {
@@ -176,7 +166,7 @@
             nextToLastColon = rightParenPos;
           }
         } else {
-          lineNo = line.substring(lastColon+1, rightParenPos);
+          lineNo = line.substring(lastColon + 1, rightParenPos);
           columnNo = '';
           try {
             int.parse(lineNo);
@@ -196,14 +186,14 @@
           maxColumnNoLength = columnNo.length;
         }
 
-        String file = line.substring(leftParenPos+1, nextToLastColon);
+        String file = line.substring(leftParenPos + 1, nextToLastColon);
         if (filePrefix != null && file.startsWith(filePrefix)) {
           file = file.substring(filePrefix.length);
         }
         if (file.length > maxFileLength) {
           maxFileLength = file.length;
         }
-        String method = line.substring(0, leftParenPos-1);
+        String method = line.substring(0, leftParenPos - 1);
         if (lambda != null) {
           method = method.replaceAll('<anonymous closure>', lambda);
         }
@@ -216,31 +206,25 @@
         lines, maxFileLength, maxLineNoLength, maxColumnNoLength);
   }
 
-  StackTraceLines.fromLines(this.lines,
-                            this.maxFileLength,
-                            this.maxLineNoLength,
-                            this.maxColumnNoLength);
+  StackTraceLines.fromLines(this.lines, this.maxFileLength,
+      this.maxLineNoLength, this.maxColumnNoLength);
 
   StackTraceLines subtrace(int offset) {
-    return new StackTraceLines.fromLines(
-        lines.sublist(offset),
-        maxFileLength,
-        maxLineNoLength,
-        maxColumnNoLength);
+    return new StackTraceLines.fromLines(lines.sublist(offset), maxFileLength,
+        maxLineNoLength, maxColumnNoLength);
   }
 
-  String prettify({bool showColumnNo: false,
-                   bool showDots: true}) {
+  String prettify({bool showColumnNo: false, bool showDots: true}) {
     StringBuffer sb = new StringBuffer();
     bool dots = true;
     for (StackTraceLine line in lines) {
       sb.write('  ');
       line.printOn(sb,
-        fileLength: maxFileLength,
-        padding: showDots && dots ? ' .' : ' ',
-        lineNoLength: maxLineNoLength,
-        showColumnNo: showColumnNo,
-        columnNoLength: maxColumnNoLength);
+          fileLength: maxFileLength,
+          padding: showDots && dots ? ' .' : ' ',
+          lineNoLength: maxLineNoLength,
+          showColumnNo: showColumnNo,
+          columnNoLength: maxColumnNoLength);
 
       dots = !dots;
     }
@@ -260,15 +244,15 @@
   final String columnNo;
   final String method;
 
-  StackTraceLine(this.index, this.file, this.lineNo,
-                  this.columnNo, this.method);
+  StackTraceLine(
+      this.index, this.file, this.lineNo, this.columnNo, this.method);
 
   void printOn(StringBuffer sb,
-               {String padding: ' ',
-                int fileLength,
-                int lineNoLength,
-                int columnNoLength,
-                bool showColumnNo: false}) {
+      {String padding: ' ',
+      int fileLength,
+      int lineNoLength,
+      int columnNoLength,
+      bool showColumnNo: false}) {
     String fileText = '${file} ';
     if (fileLength != null) {
       fileText = pad(fileText, fileLength, dots: padding);
@@ -277,29 +261,29 @@
     if (lineNoLength != null) {
       lineNoText = pad(lineNoText, lineNoLength, padLeft: true);
     }
-    String columnNoText = showColumnNo ? '': columnNo;
+    String columnNoText = showColumnNo ? '' : columnNo;
     if (columnNoLength != null) {
-        columnNoText = ':${pad(columnNoText, columnNoLength)}';
+      columnNoText = ':${pad(columnNoText, columnNoLength)}';
     }
     sb.write('$fileText $lineNoText$columnNoText $method\n');
   }
 
   int get hashCode {
     return 13 * index +
-           17 * file.hashCode +
-           19 * lineNo.hashCode +
-           23 * columnNo.hashCode +
-           29 * method.hashCode;
+        17 * file.hashCode +
+        19 * lineNo.hashCode +
+        23 * columnNo.hashCode +
+        29 * method.hashCode;
   }
 
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! StackTraceLine) return false;
     return index == other.index &&
-           file == other.file &&
-           lineNo == other.lineNo &&
-           columnNo == other.columnNo &&
-           method == other.method;
+        file == other.file &&
+        lineNo == other.lineNo &&
+        columnNo == other.columnNo &&
+        method == other.method;
   }
 
   String toString() => "$method @ $file [$lineNo:$columnNo]";
@@ -323,16 +307,18 @@
  * If [lambda] is non-null, anonymous closures are printed as [lambda].
  */
 String prettifyStackTrace(StackTrace stackTrace,
-                          {int rangeStart,
-                           int rangeEnd,
-                           bool showColumnNo: false,
-                           bool showDots: true,
-                           String filePrefix,
-                           String lambda: r'?'}) {
+    {int rangeStart,
+    int rangeEnd,
+    bool showColumnNo: false,
+    bool showDots: true,
+    String filePrefix,
+    String lambda: r'?'}) {
   return new StackTraceLines.fromTrace(stackTrace,
-      rangeStart: rangeStart, rangeEnd: rangeEnd,
-      filePrefix: filePrefix, lambda: lambda)
-    .prettify(showColumnNo: showColumnNo, showDots: showDots);
+          rangeStart: rangeStart,
+          rangeEnd: rangeEnd,
+          filePrefix: filePrefix,
+          lambda: lambda)
+      .prettify(showColumnNo: showColumnNo, showDots: showDots);
 }
 
 /**
@@ -342,7 +328,7 @@
  * A repetition of the [dots] text is used for padding.
  */
 String pad(String text, int intendedLength,
-           {bool padLeft: false, String dots: ' '}) {
+    {bool padLeft: false, String dots: ' '}) {
   if (text.length == intendedLength) return text;
   if (text.length > intendedLength) return text.substring(0, intendedLength);
   if (dots == null || dots.isEmpty) dots = ' ';
@@ -351,7 +337,7 @@
   if (!padLeft) {
     sb.write(text);
   }
-  for (int index = text.length ; index < intendedLength ; index ++) {
+  for (int index = text.length; index < intendedLength; index++) {
     int dotsIndex = index % dotsLength;
     sb.write(dots.substring(dotsIndex, dotsIndex + 1));
   }
diff --git a/pkg/compiler/lib/src/helpers/track_map.dart b/pkg/compiler/lib/src/helpers/track_map.dart
index 5f827a6..8445efe 100644
--- a/pkg/compiler/lib/src/helpers/track_map.dart
+++ b/pkg/compiler/lib/src/helpers/track_map.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.
 
-part of dart2js.helpers;
-
 /**
  * The track map is a simple wrapper around a map that keeps track
  * of the 'final' size of maps grouped by description. It allows
@@ -23,7 +21,7 @@
   TrackMap._internal(this._counts) : _map = new Map<K, V>();
 
   factory TrackMap(String description) {
-    List counts = _countsMap.putIfAbsent(description, () => [ 0 ]);
+    List counts = _countsMap.putIfAbsent(description, () => [0]);
     Map result = new TrackMap<K, V>._internal(counts);
     counts[0]++;
     return result;
@@ -62,14 +60,14 @@
   bool containsKey(K key) => _map.containsKey(key);
   bool containsValue(V value) => _map.containsValue(value);
 
-  V operator[](K key) => _map[key];
+  V operator [](K key) => _map[key];
   String toString() => _map.toString();
 
   void forEach(void action(K key, V value)) {
     _map.forEach(action);
   }
 
-  void operator[]=(K key, V value) {
+  void operator []=(K key, V value) {
     if (!_map.containsKey(key)) {
       _notifyLengthChanged(1);
       _map[key] = value;
diff --git a/pkg/compiler/lib/src/id_generator.dart b/pkg/compiler/lib/src/id_generator.dart
new file mode 100644
index 0000000..4c92ea9
--- /dev/null
+++ b/pkg/compiler/lib/src/id_generator.dart
@@ -0,0 +1,13 @@
+// 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.
+
+/// A generator of globally unique identifiers.
+class IdGenerator {
+  int _nextFreeId = 0;
+
+  /// Returns the next free identifier.
+  ///
+  /// This identifier is guaranteed to be unique.
+  int getNextFreeId() => _nextFreeId++;
+}
\ No newline at end of file
diff --git a/pkg/compiler/lib/src/inferrer/closure_tracer.dart b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
index b7d1ef7..ed2d198 100644
--- a/pkg/compiler/lib/src/inferrer/closure_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
@@ -12,7 +12,6 @@
 import 'type_graph_nodes.dart';
 import 'debug.dart' as debug;
 
-
 class ClosureTracerVisitor extends TracerVisitor<ApplyableTypeInformation> {
   final Iterable<FunctionElement> tracedElements;
   final List<CallSiteTypeInformation> _callsToAnalyze =
@@ -25,7 +24,7 @@
     analyze();
     if (!continueAnalyzing) return;
     _callsToAnalyze.forEach(_analyzeCall);
-    for(FunctionElement e in tracedElements) {
+    for (FunctionElement e in tracedElements) {
       e.functionSignature.forEachParameter((Element parameter) {
         ElementTypeInformation info =
             inferrer.types.getInferredTypeOf(parameter);
@@ -50,8 +49,9 @@
     TypeMask mask = info.mask;
     tracedElements.forEach((FunctionElement functionElement) {
       if (!selector.signatureApplies(functionElement)) return;
-      inferrer.updateParameterAssignments(info, functionElement, info.arguments,
-          selector, mask, remove: false, addToQueue: false);
+      inferrer.updateParameterAssignments(
+          info, functionElement, info.arguments, selector, mask,
+          remove: false, addToQueue: false);
     });
   }
 
@@ -75,10 +75,10 @@
         bailout('Used in JS ${info.call}');
       }
     }
-    if (called.isGetter
-        && info.selector != null
-        && info.selector.isCall
-        && inferrer.types.getInferredTypeOf(called) == currentUser) {
+    if (called.isGetter &&
+        info.selector != null &&
+        info.selector.isCall &&
+        inferrer.types.getInferredTypeOf(called) == currentUser) {
       // This node can be a closure call as well. For example, `foo()`
       // where `foo` is a getter.
       _registerCallForLaterAnalysis(info);
@@ -125,9 +125,9 @@
   @override
   visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
     super.visitStaticCallSiteTypeInformation(info);
-    if (info.calledElement == tracedElements.first
-        && info.selector != null
-        && info.selector.isGetter) {
+    if (info.calledElement == tracedElements.first &&
+        info.selector != null &&
+        info.selector.isGetter) {
       addNewEscapeInformation(info);
     }
   }
diff --git a/pkg/compiler/lib/src/inferrer/debug.dart b/pkg/compiler/lib/src/inferrer/debug.dart
index 502f966..8c29448 100644
--- a/pkg/compiler/lib/src/inferrer/debug.dart
+++ b/pkg/compiler/lib/src/inferrer/debug.dart
@@ -5,7 +5,7 @@
 /// Values used only for debugging type inference.
 library compiler.src.inferrer.debug;
 
-bool VERBOSE = false;
-bool PRINT_SUMMARY = false;
-final ANOMALY_WARN = false;
-
+const bool VERBOSE = false;
+const bool PRINT_SUMMARY = false;
+const bool ANOMALY_WARN = false;
+const bool PRINT_GRAPH = false;
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
index fbb7880..5d4623a 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
@@ -4,32 +4,24 @@
 
 library inferrer_visitor;
 
-import 'dart:collection' show
-    IterableMixin;
+import 'dart:collection' show IterableMixin;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
 import '../resolution/operators.dart';
 import '../resolution/semantic_visitor.dart';
-import '../resolution/tree_elements.dart' show
-    TreeElements;
+import '../resolution/tree_elements.dart' show TreeElements;
 import '../tree/tree.dart';
-import '../types/types.dart' show
-    TypeMask;
-import '../types/constants.dart' show
-    computeTypeMask;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
+import '../types/types.dart' show TypeMask;
+import '../types/constants.dart' show computeTypeMask;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
 import '../util/util.dart';
-import '../world.dart' show
-    ClassWorld;
+import '../world.dart' show ClassWorld;
 
 /**
  * The interface [InferrerVisitor] will use when working on types.
@@ -67,13 +59,11 @@
   bool isNull(T type);
   TypeMask newTypedSelector(T receiver, TypeMask mask);
 
-  T allocateList(T type,
-                 Node node,
-                 Element enclosing,
-                 [T elementType, int length]);
+  T allocateList(T type, Node node, Element enclosing,
+      [T elementType, int length]);
 
-  T allocateMap(T type, Node node, Element element, [List<T> keyType,
-                                                     List<T> valueType]);
+  T allocateMap(T type, Node node, Element element,
+      [List<T> keyType, List<T> valueType]);
 
   T allocateClosure(Node node, Element element);
 
@@ -106,7 +96,6 @@
    */
   T allocatePhi(Node node, Local variable, T inputType);
 
-
   /**
    * Returns a new type for holding the potential types of [element].
    * [inputType] is the first incoming type of the phi. [allocateLoopPhi]
@@ -143,10 +132,8 @@
    * conditional send (e.g.  `a?.selector`), in which case the returned type may
    * be null.
    */
-  T refineReceiver(Selector selector,
-                   TypeMask mask,
-                   T receiverType,
-                   bool isConditional);
+  T refineReceiver(
+      Selector selector, TypeMask mask, T receiverType, bool isConditional);
 
   /**
    * Returns the internal inferrer representation for [mask].
@@ -211,9 +198,8 @@
     variables.forEach(f);
   }
 
-  void forEachLocalUntilNode(Node node,
-                             void f(Local variable, T type),
-                             [Setlet<Local> seenLocals]) {
+  void forEachLocalUntilNode(Node node, void f(Local variable, T type),
+      [Setlet<Local> seenLocals]) {
     if (seenLocals == null) seenLocals = new Setlet<Local>();
     if (variables != null) {
       variables.forEach((variable, type) {
@@ -273,7 +259,7 @@
   }
 
   void mergeDiamondFlow(FieldInitializationScope<T> thenScope,
-                        FieldInitializationScope<T> elseScope) {
+      FieldInitializationScope<T> elseScope) {
     // Quick bailout check. If [isThisExposed] is true, we know the
     // code following won't do anything.
     if (isThisExposed) return;
@@ -297,12 +283,14 @@
   final List<T> positional;
   final Map<String, T> named;
   ArgumentsTypes(this.positional, named)
-    : this.named = (named == null || named.isEmpty) ? const {} : named {
+      : this.named = (named == null || named.isEmpty) ? const {} : named {
     assert(this.positional.every((T type) => type != null));
     assert(this.named.values.every((T type) => type != null));
   }
 
-  ArgumentsTypes.empty() : positional = const [], named = const {};
+  ArgumentsTypes.empty()
+      : positional = const [],
+        named = const {};
 
   int get length => positional.length + named.length;
 
@@ -310,7 +298,7 @@
 
   String toString() => "{ positional = $positional, named = $named }";
 
-  bool operator==(other) {
+  bool operator ==(other) {
     if (positional.length != other.positional.length) return false;
     if (named.length != other.named.length) return false;
     for (int i = 0; i < positional.length; i++) {
@@ -366,7 +354,6 @@
   }
 }
 
-
 abstract class MinimalInferrerEngine<T> {
   /**
    * Returns the type of [element].
@@ -408,21 +395,18 @@
   bool get aborts {
     return seenReturnOrThrow || seenBreakOrContinue;
   }
+
   bool get inTryBlock => tryBlock != null;
 
-  LocalsHandler(this.inferrer,
-                this.types,
-                this.compiler,
-                Node block,
-                [this.fieldScope])
+  LocalsHandler(this.inferrer, this.types, this.compiler, Node block,
+      [this.fieldScope])
       : locals = new VariableScope<T>(block),
         captured = new Map<Local, Element>(),
         capturedAndBoxed = new Map<Local, Element>(),
         tryBlock = null;
 
-  LocalsHandler.from(LocalsHandler<T> other,
-                     Node block,
-                     {bool useOtherTryBlock: true})
+  LocalsHandler.from(LocalsHandler<T> other, Node block,
+      {bool useOtherTryBlock: true})
       : locals = new VariableScope<T>(block, other.locals),
         fieldScope = new FieldInitializationScope<T>.from(other.fieldScope),
         captured = other.captured,
@@ -466,7 +450,8 @@
 
   void update(LocalElement local, T type, Node node) {
     assert(type != null);
-    if (compiler.trustTypeAnnotations || compiler.enableTypeAssertions) {
+    if (compiler.options.trustTypeAnnotations ||
+        compiler.options.enableTypeAssertions) {
       type = types.narrowType(type, local.type);
     }
     updateLocal() {
@@ -478,8 +463,8 @@
         // narrowed to non-null.
         type = types.addPhiInput(
             local,
-            types.allocatePhi(locals.block, local,
-                              types.narrowNotNull(currentType)),
+            types.allocatePhi(
+                locals.block, local, types.narrowNotNull(currentType)),
             type);
       }
       locals[local] = type;
@@ -488,8 +473,7 @@
       }
     }
     if (capturedAndBoxed.containsKey(local)) {
-      inferrer.recordTypeOfNonFinalField(
-          node, capturedAndBoxed[local], type);
+      inferrer.recordTypeOfNonFinalField(node, capturedAndBoxed[local], type);
     } else if (inTryBlock) {
       // We don't know if an assignment in a try block
       // will be executed, so all assigments in that block are
@@ -518,17 +502,17 @@
     capturedAndBoxed[local] = field;
   }
 
-  void mergeDiamondFlow(LocalsHandler<T> thenBranch,
-                        LocalsHandler<T> elseBranch) {
+  void mergeDiamondFlow(
+      LocalsHandler<T> thenBranch, LocalsHandler<T> elseBranch) {
     if (fieldScope != null && elseBranch != null) {
       fieldScope.mergeDiamondFlow(thenBranch.fieldScope, elseBranch.fieldScope);
     }
-    seenReturnOrThrow = thenBranch.seenReturnOrThrow
-        && elseBranch != null
-        && elseBranch.seenReturnOrThrow;
-    seenBreakOrContinue = thenBranch.seenBreakOrContinue
-        && elseBranch != null
-        && elseBranch.seenBreakOrContinue;
+    seenReturnOrThrow = thenBranch.seenReturnOrThrow &&
+        elseBranch != null &&
+        elseBranch.seenReturnOrThrow;
+    seenBreakOrContinue = thenBranch.seenBreakOrContinue &&
+        elseBranch != null &&
+        elseBranch.seenBreakOrContinue;
     if (aborts) return;
 
     void mergeOneBranch(LocalsHandler<T> other) {
@@ -611,7 +595,7 @@
    * labeled statement that do not break out.
    */
   void mergeAfterBreaks(List<LocalsHandler<T>> handlers,
-                        {bool keepOwnLocals: true}) {
+      {bool keepOwnLocals: true}) {
     Node level = locals.block;
     // Use a separate locals handler to perform the merge in, so that Phi
     // creation does not invalidate previous type knowledge while we might
@@ -630,9 +614,8 @@
       for (Local variable in seenLocals) {
         T originalType = locals[variable];
         if (originalType != null) {
-          merged.locals[variable] = types.addPhiInput(variable,
-                                                      merged.locals[variable],
-                                                      originalType);
+          merged.locals[variable] = types.addPhiInput(
+              variable, merged.locals[variable], originalType);
         }
       }
     }
@@ -641,8 +624,8 @@
     merged.locals.forEachOwnLocal((Local variable, T type) {
       locals[variable] = types.simplifyPhi(level, variable, type);
     });
-    seenReturnOrThrow = allBranchesAbort &&
-                        (!keepOwnLocals || seenReturnOrThrow);
+    seenReturnOrThrow =
+        allBranchesAbort && (!keepOwnLocals || seenReturnOrThrow);
   }
 
   /**
@@ -710,14 +693,15 @@
 
 abstract class InferrerVisitor<T, E extends MinimalInferrerEngine<T>>
     extends Visitor<T>
-    with SemanticSendResolvedMixin<T, dynamic>,
-         CompoundBulkMixin<T, dynamic>,
-         SetIfNullBulkMixin<T, dynamic>,
-         PrefixBulkMixin<T, dynamic>,
-         PostfixBulkMixin<T, dynamic>,
-         ErrorBulkMixin<T, dynamic>,
-         NewBulkMixin<T, dynamic>,
-         SetBulkMixin<T, dynamic>
+    with
+        SemanticSendResolvedMixin<T, dynamic>,
+        CompoundBulkMixin<T, dynamic>,
+        SetIfNullBulkMixin<T, dynamic>,
+        PrefixBulkMixin<T, dynamic>,
+        PostfixBulkMixin<T, dynamic>,
+        ErrorBulkMixin<T, dynamic>,
+        NewBulkMixin<T, dynamic>,
+        SetBulkMixin<T, dynamic>
     implements SemanticSendVisitor<T, dynamic> {
   final Compiler compiler;
   final AstElement analyzedElement;
@@ -742,20 +726,19 @@
         ? locals.fieldScope.isThisExposed
         : true;
   }
+
   void set isThisExposed(value) {
     if (analyzedElement.isGenerativeConstructor) {
       locals.fieldScope.isThisExposed = value;
     }
   }
 
-  InferrerVisitor(AstElement analyzedElement,
-                  this.inferrer,
-                  this.types,
-                  this.compiler,
-                  [LocalsHandler<T> handler])
-    : this.analyzedElement = analyzedElement,
-      this.locals = handler,
-      this.elements = analyzedElement.resolvedAst.elements {
+  InferrerVisitor(
+      AstElement analyzedElement, this.inferrer, this.types, this.compiler,
+      [LocalsHandler<T> handler])
+      : this.analyzedElement = analyzedElement,
+        this.locals = handler,
+        this.elements = analyzedElement.resolvedAst.elements {
     if (handler != null) return;
     Node node = analyzedElement.node;
     FieldInitializationScope<T> fieldScope =
@@ -779,7 +762,7 @@
 
   T visitAssert(Assert node) {
     // Avoid pollution from assert statement unless enabled.
-    if (compiler.enableUserAssertions) {
+    if (compiler.options.enableUserAssertions) {
       super.visitAssert(node);
     }
     return null;
@@ -904,91 +887,55 @@
     return types.dynamicType;
   }
 
-
   @override
   T bulkHandleNode(Node node, String message, _) {
     return internalError(node, message.replaceAll('#', '$node'));
   }
 
   @override
-  T visitConstantGet(
-      Send node,
-      ConstantExpression constant,
-      _) {
+  T visitConstantGet(Send node, ConstantExpression constant, _) {
     return bulkHandleNode(node, "Constant read `#` unhandled.", _);
   }
 
   @override
-  T visitConstantInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitConstantInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, _) {
     return bulkHandleNode(node, "Constant invoke `#` unhandled.", _);
   }
 
-  T visitClassTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      _) {
+  T visitClassTypeLiteralGet(Send node, ConstantExpression constant, _) {
     return handleTypeLiteralGet();
   }
 
-  T visitClassTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitClassTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, _) {
     return handleTypeLiteralInvoke(arguments);
   }
 
-  T visitTypedefTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      _) {
+  T visitTypedefTypeLiteralGet(Send node, ConstantExpression constant, _) {
     return handleTypeLiteralGet();
   }
 
-  T visitTypedefTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitTypedefTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, _) {
     return handleTypeLiteralInvoke(arguments);
   }
 
-  T visitTypeVariableTypeLiteralGet(
-      Send node,
-      TypeVariableElement element,
-      _) {
+  T visitTypeVariableTypeLiteralGet(Send node, TypeVariableElement element, _) {
     return handleTypeLiteralGet();
   }
 
-  T visitTypeVariableTypeLiteralInvoke(
-      Send node,
-      TypeVariableElement element,
-      NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitTypeVariableTypeLiteralInvoke(Send node, TypeVariableElement element,
+      NodeList arguments, CallStructure callStructure, _) {
     return handleTypeLiteralInvoke(arguments);
   }
 
-  T visitDynamicTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      _) {
+  T visitDynamicTypeLiteralGet(Send node, ConstantExpression constant, _) {
     return handleTypeLiteralGet();
   }
 
-  T visitDynamicTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitDynamicTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, _) {
     return handleTypeLiteralInvoke(arguments);
   }
 
@@ -1013,8 +960,8 @@
   T _superType;
   T get superType {
     if (_superType != null) return _superType;
-    return _superType = types.nonNullExact(
-        outermostElement.enclosingClass.superclass);
+    return _superType =
+        types.nonNullExact(outermostElement.enclosingClass.superclass);
   }
 
   @override
@@ -1072,8 +1019,8 @@
         Element receiverElement = elements[node.receiver];
         Element argumentElement = elements[node.arguments.first];
         String operator = node.selector.asOperator().source;
-        if ((operator == '==' && usePositive)
-            || (operator == '!=' && !usePositive)) {
+        if ((operator == '==' && usePositive) ||
+            (operator == '!=' && !usePositive)) {
           // Type the elements as null.
           if (Elements.isLocal(receiverElement)) {
             locals.update(receiverElement, types.nullType, node);
@@ -1102,30 +1049,19 @@
 
   @override
   T visitDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      _) {
+      Send node, Node receiver, NodeList arguments, Selector selector, _) {
     return handleDynamicInvoke(node);
   }
 
   @override
   T visitIfNotNullDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      _) {
+      Send node, Node receiver, NodeList arguments, Selector selector, _) {
     return handleDynamicInvoke(node);
   }
 
   @override
   T visitThisPropertyInvoke(
-      Send node,
-      NodeList arguments,
-      Selector selector,
-      _) {
+      Send node, NodeList arguments, Selector selector, _) {
     return handleDynamicInvoke(node);
   }
 
@@ -1158,8 +1094,7 @@
     }
     visit(right);
     if (oldAccumulateIsChecks) {
-
-      bool invalidatedInRightHandSide (Send test) {
+      bool invalidatedInRightHandSide(Send test) {
         Element receiver = elements[test.receiver];
         if (receiver is LocalElement) {
           return narrowed.locals[receiver] != locals.locals[receiver];
@@ -1266,8 +1201,8 @@
 
   T visitVariableDefinitions(VariableDefinitions node) {
     for (Link<Node> link = node.definitions.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       Node definition = link.head;
       if (definition is Identifier) {
         locals.update(elements[definition], types.nullType, node);
@@ -1352,8 +1287,7 @@
     loopLevel--;
     saved.endLoop(node);
     bool keepOwnLocals = node.asDoWhile() == null;
-    saved.mergeAfterBreaks(
-        getBreaks(target), keepOwnLocals: keepOwnLocals);
+    saved.mergeAfterBreaks(getBreaks(target), keepOwnLocals: keepOwnLocals);
     locals = saved;
     clearBreaksAndContinues(target);
     return null;
@@ -1390,8 +1324,7 @@
 
   T visitTryStatement(TryStatement node) {
     LocalsHandler<T> saved = locals;
-    locals = new LocalsHandler<T>.from(
-        locals, node, useOtherTryBlock: false);
+    locals = new LocalsHandler<T>.from(locals, node, useOtherTryBlock: false);
     visit(node.tryBlock);
     saved.mergeDiamondFlow(locals, null);
     locals = saved;
@@ -1416,9 +1349,7 @@
     Node exception = node.exception;
     if (exception != null) {
       DartType type = elements.getType(node.type);
-      T mask = type == null ||
-               type.treatAsDynamic ||
-               type.isTypeVariable
+      T mask = type == null || type.treatAsDynamic || type.isTypeVariable
           ? types.dynamicType
           : types.nonNullSubtype(type.element);
       locals.update(elements[exception], mask, node);
@@ -1447,9 +1378,9 @@
 
   T visitLabeledStatement(LabeledStatement node) {
     Statement body = node.statement;
-    if (body is Loop
-        || body is SwitchStatement
-        || Elements.isUnusedLabel(node, elements)) {
+    if (body is Loop ||
+        body is SwitchStatement ||
+        Elements.isUnusedLabel(node, elements)) {
       // Loops and switches handle their own labels.
       visit(body);
     } else {
diff --git a/pkg/compiler/lib/src/inferrer/list_tracer.dart b/pkg/compiler/lib/src/inferrer/list_tracer.dart
index a57087f..83f2e8b 100644
--- a/pkg/compiler/lib/src/inferrer/list_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/list_tracer.dart
@@ -16,122 +16,119 @@
  * change the element type of the list, or let the list escape to code
  * that might change the element type.
  */
-Set<String> okListSelectorsSet = new Set<String>.from(
-  const <String>[
-    // From Object.
-    '==',
-    'hashCode',
-    'toString',
-    'noSuchMethod',
-    'runtimeType',
+Set<String> okListSelectorsSet = 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 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 List.
-    '[]',
-    'length',
-    'reversed',
-    'sort',
-    'indexOf',
-    'lastIndexOf',
-    'clear',
-    'remove',
-    'removeAt',
-    'removeLast',
-    'removeWhere',
-    'retainWhere',
-    'sublist',
-    'getRange',
-    'removeRange',
-    'asMap',
+  // From List.
+  '[]',
+  'length',
+  'reversed',
+  'sort',
+  'indexOf',
+  'lastIndexOf',
+  'clear',
+  'remove',
+  'removeAt',
+  'removeLast',
+  'removeWhere',
+  'retainWhere',
+  'sublist',
+  'getRange',
+  'removeRange',
+  'asMap',
 
-    // From JSArray.
-    'checkMutable',
-    'checkGrowable',
-  ]);
+  // From JSArray.
+  'checkMutable',
+  'checkGrowable',
+]);
 
-Set<String> doNotChangeLengthSelectorsSet = new Set<String>.from(
-  const <String>[
-    // From Object.
-    '==',
-    'hashCode',
-    'toString',
-    'noSuchMethod',
-    'runtimeType',
+Set<String> doNotChangeLengthSelectorsSet = 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 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 List.
-    '[]',
-    '[]=',
-    'length',
-    'reversed',
-    'sort',
-    'indexOf',
-    'lastIndexOf',
-    'sublist',
-    'getRange',
-    'asMap',
+  // From List.
+  '[]',
+  '[]=',
+  'length',
+  'reversed',
+  'sort',
+  'indexOf',
+  'lastIndexOf',
+  'sublist',
+  'getRange',
+  'asMap',
 
-    // From JSArray.
-    'checkMutable',
-    'checkGrowable',
-  ]);
-
+  // From JSArray.
+  'checkMutable',
+  'checkGrowable',
+]);
 
 class ListTracerVisitor extends TracerVisitor<ListTypeInformation> {
   // The [Set] of found assignments to the list.
@@ -208,7 +205,7 @@
         assignments.add(inferrer.types.nullType);
       }
     } else if (selector.isCall &&
-               !info.targets.every((element) => element.isFunction)) {
+        !info.targets.every((element) => element.isFunction)) {
       bailout('Passed to a closure');
       return;
     }
diff --git a/pkg/compiler/lib/src/inferrer/map_tracer.dart b/pkg/compiler/lib/src/inferrer/map_tracer.dart
index 1ab3c24..3bd0e41 100644
--- a/pkg/compiler/lib/src/inferrer/map_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/map_tracer.dart
@@ -10,26 +10,26 @@
 import 'node_tracer.dart';
 import 'type_graph_nodes.dart';
 
-Set<String> okMapSelectorsSet = new Set.from(
-    const <String>[
-      // From Object.
-      "==",
-      "hashCode",
-      "toString",
-      "noSuchMethod",
-      "runtimeType",
-      // From Map
-      "[]",
-      "isEmpty",
-      "isNotEmpty",
-      "keys",
-      "length",
-      "values",
-      "clear",
-      "containsKey",
-      "containsValue",
-      "forEach",
-      "remove"]);
+Set<String> okMapSelectorsSet = new Set.from(const <String>[
+  // From Object.
+  "==",
+  "hashCode",
+  "toString",
+  "noSuchMethod",
+  "runtimeType",
+  // From Map
+  "[]",
+  "isEmpty",
+  "isNotEmpty",
+  "keys",
+  "length",
+  "values",
+  "clear",
+  "containsKey",
+  "containsValue",
+  "forEach",
+  "remove"
+]);
 
 class MapTracerVisitor extends TracerVisitor<MapTypeInformation> {
   // These lists are used to keep track of newly discovered assignments to
@@ -121,7 +121,7 @@
         }
       }
     } else if (selector.isCall &&
-               !info.targets.every((element) => element.isFunction)) {
+        !info.targets.every((element) => element.isFunction)) {
       bailout('Passed to a closure');
       return;
     }
diff --git a/pkg/compiler/lib/src/inferrer/node_tracer.dart b/pkg/compiler/lib/src/inferrer/node_tracer.dart
index 174ae56..c50929d 100644
--- a/pkg/compiler/lib/src/inferrer/node_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/node_tracer.dart
@@ -16,63 +16,61 @@
 
 // A set of selectors we know do not escape the elements inside the
 // list.
-Set<String> doesNotEscapeListSet = new Set<String>.from(
-  const <String>[
-    // From Object.
-    '==',
-    'hashCode',
-    'toString',
-    'noSuchMethod',
-    'runtimeType',
+Set<String> doesNotEscapeListSet = new Set<String>.from(const <String>[
+  // From Object.
+  '==',
+  'hashCode',
+  'toString',
+  'noSuchMethod',
+  'runtimeType',
 
-    // From Iterable.
-    'isEmpty',
-    'isNotEmpty',
-    'length',
-    'contains',
-    'join',
+  // From Iterable.
+  'isEmpty',
+  'isNotEmpty',
+  'length',
+  'contains',
+  'join',
 
-    // From List.
-    'add',
-    'addAll',
-    'clear',
-    'fillRange',
-    'indexOf',
-    'insert',
-    'insertAll',
-    'lastIndexOf',
-    'remove',
-    'removeRange',
-    'replaceRange',
-    'setAll',
-    'setRange',
-    'shuffle',
-    '[]=',
+  // From List.
+  'add',
+  'addAll',
+  'clear',
+  'fillRange',
+  'indexOf',
+  'insert',
+  'insertAll',
+  'lastIndexOf',
+  'remove',
+  'removeRange',
+  'replaceRange',
+  'setAll',
+  'setRange',
+  'shuffle',
+  '[]=',
 
-    // From JSArray.
-    'checkMutable',
-    'checkGrowable',
-  ]);
+  // From JSArray.
+  'checkMutable',
+  'checkGrowable',
+]);
 
-Set<String> doesNotEscapeMapSet = new Set<String>.from(
-  const <String>[
-    // From Object.
-    '==',
-    'hashCode',
-    'toString',
-    'noSuchMethod',
-    'runtimeType',
-    // from Map.
-    'isEmpty',
-    'isNotEmpty',
-    'length',
-    'clear',
-    'containsKey',
-    'containsValue',
-    '[]=',
-    // [keys] only allows key values to escape, which we do not track.
-    'keys'
-  ]);
+Set<String> doesNotEscapeMapSet = new Set<String>.from(const <String>[
+  // From Object.
+  '==',
+  'hashCode',
+  'toString',
+  'noSuchMethod',
+  'runtimeType',
+  // from Map.
+  'isEmpty',
+  'isNotEmpty',
+  'length',
+  'clear',
+  'containsKey',
+  'containsValue',
+  '[]=',
+  // [keys] only allows key values to escape, which we do not track.
+  'keys'
+]);
 
 /// Common logic to trace a value through the type inference graph nodes.
 abstract class TracerVisitor<T extends TypeInformation>
@@ -85,7 +83,8 @@
   final Setlet<Element> analyzedElements = new Setlet<Element>();
 
   TracerVisitor(this.tracedType, TypeGraphInferrerEngine inferrer)
-      : this.inferrer = inferrer, this.compiler = inferrer.compiler;
+      : this.inferrer = inferrer,
+        this.compiler = inferrer.compiler;
 
   // Work list that gets populated with [TypeInformation] that could
   // contain the container.
@@ -94,8 +93,7 @@
   // 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>[];
+  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.
@@ -186,6 +184,7 @@
   void visitMapTypeInformation(MapTypeInformation info) {
     mapsToAnalyze.add(info);
   }
+
   void visitConcreteTypeInformation(ConcreteTypeInformation info) {}
 
   void visitStringLiteralTypeInformation(StringLiteralTypeInformation info) {}
@@ -211,7 +210,7 @@
     } else {
       list.flowsInto.forEach((flow) {
         flow.users.forEach((user) {
-          if (user is !DynamicCallSiteTypeInformation) return;
+          if (user is! DynamicCallSiteTypeInformation) return;
           if (user.receiver != flow) return;
           if (inferrer.returnsListElementTypeSet.contains(user.selector)) {
             addNewEscapeInformation(user);
@@ -230,7 +229,7 @@
     } else {
       map.flowsInto.forEach((flow) {
         flow.users.forEach((user) {
-          if (user is !DynamicCallSiteTypeInformation) return;
+          if (user is! DynamicCallSiteTypeInformation) return;
           if (user.receiver != flow) return;
           if (user.selector.isIndex) {
             addNewEscapeInformation(user);
@@ -253,9 +252,9 @@
     if (!receiverType.isContainer) return false;
     String selectorName = info.selector.name;
     List<TypeInformation> arguments = info.arguments.positional;
-    return (selectorName == '[]=' && currentUser == arguments[1])
-        || (selectorName == 'insert' && currentUser == arguments[1])
-        || (selectorName == 'add' && currentUser == arguments[0]);
+    return (selectorName == '[]=' && currentUser == arguments[1]) ||
+        (selectorName == 'insert' && currentUser == arguments[1]) ||
+        (selectorName == 'add' && currentUser == arguments[0]);
   }
 
   bool isIndexSetOnMap(DynamicCallSiteTypeInformation info) {
@@ -271,8 +270,7 @@
    * [isParameterOfMapAddingMethod].
    */
   bool isValueAddedToMap(DynamicCallSiteTypeInformation info) {
-     return isIndexSetOnMap(info) &&
-         currentUser == info.arguments.positional[1];
+    return isIndexSetOnMap(info) && currentUser == info.arguments.positional[1];
   }
 
   /**
@@ -281,8 +279,7 @@
    * [isParameterOfMapAddingMethod].
    */
   bool isKeyAddedToMap(DynamicCallSiteTypeInformation info) {
-    return isIndexSetOnMap(info) &&
-        currentUser == info.arguments.positional[0];
+    return isIndexSetOnMap(info) && currentUser == info.arguments.positional[0];
   }
 
   void visitDynamicCallSiteTypeInformation(
@@ -341,9 +338,9 @@
       return false;
     }
     Element method = element.enclosingElement;
-    return (method.name == '[]=')
-        || (method.name == 'add')
-        || (method.name == 'insert');
+    return (method.name == '[]=') ||
+        (method.name == 'add') ||
+        (method.name == 'insert');
   }
 
   /**
@@ -362,13 +359,13 @@
 
   bool isClosure(Element element) {
     if (!element.isFunction) return false;
+
     /// Creating an instance of a class that implements [Function] also
     /// closurizes the corresponding [call] member. We do not currently
     /// track these, thus the check for [isClosurized] on such a method will
     /// return false. Instead we catch that case here for now.
     // TODO(herhut): Handle creation of closures from instances of Function.
-    if (element.isInstanceMember &&
-        element.name == Identifiers.call) {
+    if (element.isInstanceMember && element.name == Identifiers.call) {
       return true;
     }
     Element outermost = element.outermostEnclosingMemberOrTopLevel;
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 9628684..e3b2327c 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -4,49 +4,32 @@
 
 library simple_types_inferrer;
 
-import '../closure.dart' show
-    ClosureClassMap,
-    ClosureScope;
+import '../closure.dart' show ClosureClassMap, ClosureScope;
 import '../common.dart';
-import '../common/names.dart' show
-    Selectors;
-import '../compiler.dart' show
-    Compiler;
-import '../constants/values.dart' show
-    ConstantValue,
-    IntConstantValue;
-import '../core_types.dart' show
-    CoreClasses,
-    CoreTypes;
-import '../cps_ir/cps_ir_nodes.dart' as cps_ir show
-    Node;
-import '../dart_types.dart' show
-    DartType,
-    FunctionType,
-    InterfaceType,
-    TypeKind;
+import '../common/names.dart' show Selectors;
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart' show ConstantValue, IntConstantValue;
+import '../core_types.dart' show CoreClasses, CoreTypes;
+import '../cps_ir/cps_ir_nodes.dart' as cps_ir show Node;
+import '../dart_types.dart'
+    show DartType, FunctionType, InterfaceType, TypeKind;
 import '../elements/elements.dart';
 import '../js_backend/js_backend.dart' as js;
 import '../native/native.dart' as native;
-import '../resolution/tree_elements.dart' show
-    TreeElements;
+import '../resolution/tree_elements.dart' show TreeElements;
 import '../resolution/operators.dart' as op;
 import '../tree/tree.dart' as ast;
-import '../types/types.dart' show
-    TypesInferrer,
-    FlatTypeMask,
-    TypeMask,
-    ContainerTypeMask,
-    ValueTypeMask;
-import '../util/util.dart' show
-    Link,
-    Setlet;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/side_effects.dart' show
-    SideEffects;
+import '../types/types.dart'
+    show
+        TypesInferrer,
+        FlatTypeMask,
+        TypeMask,
+        ContainerTypeMask,
+        ValueTypeMask;
+import '../util/util.dart' show Link, Setlet;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/side_effects.dart' show SideEffects;
 import '../world.dart' show ClassWorld;
 
 import 'inferrer_visitor.dart';
@@ -102,10 +85,8 @@
    *
    * [nodeHolder] is the element holder of [node].
    */
-  void recordTypeOfFinalField(ast.Node node,
-                              Element nodeHolder,
-                              Element field,
-                              T type);
+  void recordTypeOfFinalField(
+      ast.Node node, Element nodeHolder, Element field, T type);
 
   /**
    * Records that [node] sets non-final field [element] to be of type
@@ -133,14 +114,15 @@
    *
    * [inLoop] tells whether the call happens in a loop.
    */
-  T registerCalledElement(Spannable node,
-                          Selector selector,
-                          TypeMask mask,
-                          Element caller,
-                          Element callee,
-                          ArgumentsTypes<T> arguments,
-                          SideEffects sideEffects,
-                          bool inLoop);
+  T registerCalledElement(
+      Spannable node,
+      Selector selector,
+      TypeMask mask,
+      Element caller,
+      Element callee,
+      ArgumentsTypes<T> arguments,
+      SideEffects sideEffects,
+      bool inLoop);
 
   /**
    * Registers that [caller] calls [selector] with [receiverType] as
@@ -151,14 +133,15 @@
    *
    * [inLoop] tells whether the call happens in a loop.
    */
-  T registerCalledSelector(ast.Node node,
-                           Selector selector,
-                           TypeMask mask,
-                           T receiverType,
-                           Element caller,
-                           ArgumentsTypes<T> arguments,
-                           SideEffects sideEffects,
-                           bool inLoop);
+  T registerCalledSelector(
+      ast.Node node,
+      Selector selector,
+      TypeMask mask,
+      T receiverType,
+      Element caller,
+      ArgumentsTypes<T> arguments,
+      SideEffects sideEffects,
+      bool inLoop);
 
   /**
    * Registers that [caller] calls [closure] with [arguments].
@@ -168,14 +151,15 @@
    *
    * [inLoop] tells whether the call happens in a loop.
    */
-  T registerCalledClosure(ast.Node node,
-                          Selector selector,
-                          TypeMask mask,
-                          T closure,
-                          Element caller,
-                          ArgumentsTypes<T> arguments,
-                          SideEffects sideEffects,
-                          bool inLoop);
+  T registerCalledClosure(
+      ast.Node node,
+      Selector selector,
+      TypeMask mask,
+      T closure,
+      Element caller,
+      ArgumentsTypes<T> arguments,
+      SideEffects sideEffects,
+      bool inLoop);
 
   /**
    * Registers a call to await with an expression of type [argumentType] as
@@ -196,9 +180,8 @@
    * Applies [f] to all elements in the universe that match
    * [selector] and [mask]. If [f] returns false, aborts the iteration.
    */
-  void forEachElementMatching(Selector selector,
-                              TypeMask mask,
-                              bool f(Element element)) {
+  void forEachElementMatching(
+      Selector selector, TypeMask mask, bool f(Element element)) {
     Iterable<Element> elements =
         compiler.world.allFunctions.filter(selector, mask);
     for (Element e in elements) {
@@ -210,9 +193,8 @@
    * Update [sideEffects] with the side effects of [callee] being
    * called with [selector].
    */
-  void updateSideEffects(SideEffects sideEffects,
-                         Selector selector,
-                         Element callee) {
+  void updateSideEffects(
+      SideEffects sideEffects, Selector selector, Element callee) {
     if (callee.isField) {
       if (callee.isInstanceMember) {
         if (selector.isSetter) {
@@ -258,8 +240,7 @@
         mappedType = types.stringType;
       } else if (type == coreTypes.intType) {
         mappedType = types.intType;
-      } else if (type == coreTypes.numType ||
-                 type == coreTypes.doubleType) {
+      } else if (type == coreTypes.numType || type == coreTypes.doubleType) {
         // Note: the backend double class is specifically for non-integer
         // doubles, and a native behavior returning 'double' does not guarantee
         // a non-integer return type, so we return the number type for those.
@@ -317,9 +298,9 @@
 
   bool isNativeElement(Element element) {
     if (compiler.backend.isNative(element)) return true;
-    return element.isClassMember
-        && compiler.backend.isNative(element.enclosingClass)
-        && element.isField;
+    return element.isClassMember &&
+        compiler.backend.isNative(element.enclosingClass) &&
+        element.isField;
   }
 
   void analyze(Element element, ArgumentsTypes arguments);
@@ -357,23 +338,21 @@
   final InferrerEngine<T, TypeSystem<T>> inferrer;
   final Setlet<Entity> capturedVariables = new Setlet<Entity>();
 
-  SimpleTypeInferrerVisitor.internal(analyzedElement,
-                                     this.outermostElement,
-                                     inferrer,
-                                     compiler,
-                                     locals)
-    : super(analyzedElement, inferrer, inferrer.types, compiler, locals),
-      this.inferrer = inferrer {
+  SimpleTypeInferrerVisitor.internal(
+      analyzedElement, this.outermostElement, inferrer, compiler, locals)
+      : super(analyzedElement, inferrer, inferrer.types, compiler, locals),
+        this.inferrer = inferrer {
     assert(outermostElement != null);
   }
 
-  SimpleTypeInferrerVisitor(Element element,
-                            Compiler compiler,
-                            InferrerEngine<T, TypeSystem<T>> inferrer,
-                            [LocalsHandler<T> handler])
-    : this.internal(element,
-        element.outermostEnclosingMemberOrTopLevel.implementation,
-        inferrer, compiler, handler);
+  SimpleTypeInferrerVisitor(Element element, Compiler compiler,
+      InferrerEngine<T, TypeSystem<T>> inferrer, [LocalsHandler<T> handler])
+      : this.internal(
+            element,
+            element.outermostEnclosingMemberOrTopLevel.implementation,
+            inferrer,
+            compiler,
+            handler);
 
   void analyzeSuperConstructorCall(Element target, ArgumentsTypes arguments) {
     inferrer.analyze(target, arguments);
@@ -396,9 +375,8 @@
     // be handled specially, in that we are computing their LUB at
     // each update, and reading them yields the type that was found in a
     // previous analysis of [outermostElement].
-    ClosureClassMap closureData =
-        compiler.closureToClassMapper.computeClosureToClassMapping(
-            analyzedElement, node, elements);
+    ClosureClassMap closureData = compiler.closureToClassMapper
+        .computeClosureToClassMapping(analyzedElement, node, elements);
     closureData.forEachCapturedVariable((variable, field) {
       locals.setCaptured(variable, field);
     });
@@ -445,17 +423,12 @@
         if (element.isInitializingFormal) {
           InitializingFormalElement initializingFormal = element;
           if (initializingFormal.fieldElement.isFinal) {
-            inferrer.recordTypeOfFinalField(
-                node,
-                analyzedElement,
-                initializingFormal.fieldElement,
-                parameterType);
+            inferrer.recordTypeOfFinalField(node, analyzedElement,
+                initializingFormal.fieldElement, parameterType);
           } else {
             locals.updateField(initializingFormal.fieldElement, parameterType);
-            inferrer.recordTypeOfNonFinalField(
-                initializingFormal.node,
-                initializingFormal.fieldElement,
-                parameterType);
+            inferrer.recordTypeOfNonFinalField(initializingFormal.node,
+                initializingFormal.fieldElement, parameterType);
           }
         }
         locals.update(element, parameterType, node);
@@ -484,20 +457,14 @@
         // a call to the default super constructor (the one that takes
         // no argument). Resolution ensures that such a constructor
         // exists.
-        if (!isConstructorRedirect
-            && !seenSuperConstructorCall
-            && !cls.isObject) {
+        if (!isConstructorRedirect &&
+            !seenSuperConstructorCall &&
+            !cls.isObject) {
           FunctionElement target = cls.superclass.lookupDefaultConstructor();
           ArgumentsTypes arguments = new ArgumentsTypes([], {});
           analyzeSuperConstructorCall(target, arguments);
-          inferrer.registerCalledElement(node,
-                                         null,
-                                         null,
-                                         outermostElement,
-                                         target.implementation,
-                                         arguments,
-                                         sideEffects,
-                                         inLoop);
+          inferrer.registerCalledElement(node, null, null, outermostElement,
+              target.implementation, arguments, sideEffects, inLoop);
         }
         visit(node.body);
         inferrer.recordExposesThis(analyzedElement, isThisExposed);
@@ -519,7 +486,7 @@
           returnType = types.nonNullExact(cls);
         } else if (compiler.world.isIndirectlyInstantiated(cls)) {
           returnType = types.nonNullSubclass(cls);
-        } else  {
+        } else {
           // TODO(johnniwinther): Avoid analyzing [analyzedElement] in this
           // case; it's never called.
           returnType = types.nonNullEmpty();
@@ -537,7 +504,7 @@
           if (returnType == null) {
             // No return in the body.
             returnType = locals.seenReturnOrThrow
-                ? types.nonNullEmpty()  // Body always throws.
+                ? types.nonNullEmpty() // Body always throws.
                 : types.nullType;
           } else if (!locals.seenReturnOrThrow) {
             // We haven't seen returns on all branches. So the method may
@@ -556,12 +523,12 @@
 
         case AsyncMarker.ASYNC:
           returnType = inferrer.addReturnTypeFor(
-                analyzedElement, returnType, types.asyncFutureType);
+              analyzedElement, returnType, types.asyncFutureType);
           break;
 
         case AsyncMarker.ASYNC_STAR:
           returnType = inferrer.addReturnTypeFor(
-                analyzedElement, returnType, types.asyncStarStreamType);
+              analyzedElement, returnType, types.asyncStarStreamType);
           break;
       }
     }
@@ -582,8 +549,8 @@
     // We don't put the closure in the work queue of the
     // inferrer, because it will share information with its enclosing
     // method, like for example the types of local variables.
-    LocalsHandler closureLocals = new LocalsHandler<T>.from(
-        locals, node, useOtherTryBlock: false);
+    LocalsHandler closureLocals =
+        new LocalsHandler<T>.from(locals, node, useOtherTryBlock: false);
     SimpleTypeInferrerVisitor visitor = new SimpleTypeInferrerVisitor<T>(
         element, compiler, inferrer, closureLocals);
     visitor.run();
@@ -612,7 +579,8 @@
   }
 
   T visitFunctionDeclaration(ast.FunctionDeclaration node) {
-    LocalFunctionElement element = elements.getFunctionDefinition(node.function);
+    LocalFunctionElement element =
+        elements.getFunctionDefinition(node.function);
     T type = inferrer.concreteTypes.putIfAbsent(node.function, () {
       return types.allocateClosure(node.function, element);
     });
@@ -650,15 +618,10 @@
       elementType = elementType == null
           ? types.nonNullEmpty()
           : types.simplifyPhi(null, null, elementType);
-      T containerType = node.isConst
-          ? types.constListType
-          : types.growableListType;
+      T containerType =
+          node.isConst ? types.constListType : types.growableListType;
       return types.allocateList(
-          containerType,
-          node,
-          outermostElement,
-          elementType,
-          length);
+          containerType, node, outermostElement, elementType, length);
     });
   }
 
@@ -674,11 +637,8 @@
       }
 
       T type = node.isConst ? types.constMapType : types.mapType;
-      return types.allocateMap(type,
-                               node,
-                               outermostElement,
-                               keyTypes,
-                               valueTypes);
+      return types.allocateMap(
+          type, node, outermostElement, keyTypes, valueTypes);
     });
   }
 
@@ -694,17 +654,16 @@
     if (isThisExposed) return;
     inferrer.forEachElementMatching(selector, mask, (element) {
       if (element.isField) {
-        if (!selector.isSetter
-            && isInClassOrSubclass(element)
-            && !element.modifiers.isFinal
-            && locals.fieldScope.readField(element) == null
-            && element.initializer == null) {
+        if (!selector.isSetter &&
+            isInClassOrSubclass(element) &&
+            !element.modifiers.isFinal &&
+            locals.fieldScope.readField(element) == null &&
+            element.initializer == null) {
           // If the field is being used before this constructor
           // actually had a chance to initialize it, say it can be
           // null.
           inferrer.recordTypeOfNonFinalField(
-              analyzedElement.node, element,
-              types.nullType);
+              analyzedElement.node, element, types.nullType);
         }
         // Accessing a field does not expose [:this:].
         return true;
@@ -717,13 +676,13 @@
   }
 
   bool get inInstanceContext {
-    return (outermostElement.isInstanceMember && !outermostElement.isField)
-        || outermostElement.isGenerativeConstructor;
+    return (outermostElement.isInstanceMember && !outermostElement.isField) ||
+        outermostElement.isGenerativeConstructor;
   }
 
   bool treatAsInstanceMember(Element element) {
-    return (Elements.isUnresolved(element) && inInstanceContext)
-        || (element != null && element.isInstanceMember);
+    return (Elements.isUnresolved(element) && inInstanceContext) ||
+        (element != null && element.isInstanceMember);
   }
 
   @override
@@ -734,12 +693,9 @@
       return types.dynamicType;
     }
 
-    Selector getterSelector =
-        elements.getGetterSelectorInComplexSendSet(node);
-    TypeMask getterMask =
-        elements.getGetterTypeMaskInComplexSendSet(node);
-    TypeMask operatorMask =
-        elements.getOperatorTypeMaskInComplexSendSet(node);
+    Selector getterSelector = elements.getGetterSelectorInComplexSendSet(node);
+    TypeMask getterMask = elements.getGetterTypeMaskInComplexSendSet(node);
+    TypeMask operatorMask = elements.getOperatorTypeMaskInComplexSendSet(node);
     Selector setterSelector = elements.getSelector(node);
     TypeMask setterMask = elements.getTypeMask(node);
 
@@ -785,12 +741,10 @@
       }
       if (!isThisExposed && isCallOnThis) {
         checkIfExposesThis(
-            setterSelector,
-            types.newTypedSelector(receiverType, setterMask));
+            setterSelector, types.newTypedSelector(receiverType, setterMask));
         if (getterSelector != null) {
           checkIfExposesThis(
-              getterSelector,
-              types.newTypedSelector(receiverType, getterMask));
+              getterSelector, types.newTypedSelector(receiverType, getterMask));
         }
       }
     }
@@ -798,9 +752,8 @@
     if (node.isIndex) {
       return internalError(node, "Unexpected index operation");
     } else if (op == '=') {
-      return handlePlainAssignment(
-          node, element, setterSelector, setterMask, receiverType, rhsType,
-          node.arguments.head);
+      return handlePlainAssignment(node, element, setterSelector, setterMask,
+          receiverType, rhsType, node.arguments.head);
     } else {
       // [foo ??= bar], [: foo++ :] or [: foo += 1 :].
       T getterType;
@@ -812,9 +765,9 @@
         Element getterElement = elements[node.selector];
         getterType = handleStaticSend(
             node, getterSelector, getterMask, getterElement, null);
-      } else if (Elements.isUnresolved(element)
-                 || element.isSetter
-                 || element.isField) {
+      } else if (Elements.isUnresolved(element) ||
+          element.isSetter ||
+          element.isField) {
         getterType = handleDynamicSend(
             node, getterSelector, getterMask, receiverType, null);
       } else if (element.isLocal) {
@@ -829,21 +782,19 @@
         newType = types.allocateDiamondPhi(getterType, rhsType);
       } else {
         Selector operatorSelector =
-          elements.getOperatorSelectorInComplexSendSet(node);
-        newType = handleDynamicSend(
-            node, operatorSelector, operatorMask,
+            elements.getOperatorSelectorInComplexSendSet(node);
+        newType = handleDynamicSend(node, operatorSelector, operatorMask,
             getterType, new ArgumentsTypes<T>([rhsType], null));
       }
 
       if (Elements.isStaticOrTopLevelField(element)) {
-        handleStaticSend(
-            node, setterSelector, setterMask, element,
+        handleStaticSend(node, setterSelector, setterMask, element,
             new ArgumentsTypes<T>([newType], null));
-      } else if (Elements.isUnresolved(element)
-                 || element.isSetter
-                 || element.isField) {
+      } else if (Elements.isUnresolved(element) ||
+          element.isSetter ||
+          element.isField) {
         handleDynamicSend(node, setterSelector, setterMask, receiverType,
-                          new ArgumentsTypes<T>([newType], null));
+            new ArgumentsTypes<T>([newType], null));
       } else if (element.isLocal) {
         locals.update(element, newType, node);
       }
@@ -854,44 +805,26 @@
 
   /// Handle compound index set, like `foo[0] += 42` or `foo[0]++`.
   T handleCompoundIndexSet(
-      ast.SendSet node,
-      T receiverType,
-      T indexType,
-      T rhsType) {
-    Selector getterSelector =
-        elements.getGetterSelectorInComplexSendSet(node);
-    TypeMask getterMask =
-        elements.getGetterTypeMaskInComplexSendSet(node);
+      ast.SendSet node, T receiverType, T indexType, T rhsType) {
+    Selector getterSelector = elements.getGetterSelectorInComplexSendSet(node);
+    TypeMask getterMask = elements.getGetterTypeMaskInComplexSendSet(node);
     Selector operatorSelector =
         elements.getOperatorSelectorInComplexSendSet(node);
-    TypeMask operatorMask =
-        elements.getOperatorTypeMaskInComplexSendSet(node);
+    TypeMask operatorMask = elements.getOperatorTypeMaskInComplexSendSet(node);
     Selector setterSelector = elements.getSelector(node);
     TypeMask setterMask = elements.getTypeMask(node);
 
-    T getterType = handleDynamicSend(
-        node,
-        getterSelector,
-        getterMask,
-        receiverType,
-        new ArgumentsTypes<T>([indexType], null));
+    T getterType = handleDynamicSend(node, getterSelector, getterMask,
+        receiverType, new ArgumentsTypes<T>([indexType], null));
 
     T returnType;
     if (node.isIfNullAssignment) {
       returnType = types.allocateDiamondPhi(getterType, rhsType);
     } else {
-      returnType = handleDynamicSend(
-          node,
-          operatorSelector,
-          operatorMask,
-          getterType,
-          new ArgumentsTypes<T>([rhsType], null));
+      returnType = handleDynamicSend(node, operatorSelector, operatorMask,
+          getterType, new ArgumentsTypes<T>([rhsType], null));
     }
-    handleDynamicSend(
-        node,
-        setterSelector,
-        setterMask,
-        receiverType,
+    handleDynamicSend(node, setterSelector, setterMask, receiverType,
         new ArgumentsTypes<T>([indexType, returnType], null));
 
     if (node.isPostfix) {
@@ -902,46 +835,30 @@
   }
 
   /// Handle compound prefix/postfix operations, like `a[0]++`.
-  T handleCompoundPrefixPostfix(
-      ast.Send node,
-      T receiverType,
-      T indexType) {
+  T handleCompoundPrefixPostfix(ast.Send node, T receiverType, T indexType) {
     return handleCompoundIndexSet(
         node, receiverType, indexType, types.uint31Type);
   }
 
   @override
-  T visitIndexPostfix(
-      ast.Send node,
-      ast.Node receiver,
-      ast.Node index,
-      op.IncDecOperator operator,
-      _) {
+  T visitIndexPostfix(ast.Send node, ast.Node receiver, ast.Node index,
+      op.IncDecOperator operator, _) {
     T receiverType = visit(receiver);
     T indexType = visit(index);
     return handleCompoundPrefixPostfix(node, receiverType, indexType);
   }
 
   @override
-  T visitIndexPrefix(
-      ast.Send node,
-      ast.Node receiver,
-      ast.Node index,
-      op.IncDecOperator operator,
-      _) {
+  T visitIndexPrefix(ast.Send node, ast.Node receiver, ast.Node index,
+      op.IncDecOperator operator, _) {
     T receiverType = visit(receiver);
     T indexType = visit(index);
     return handleCompoundPrefixPostfix(node, receiverType, indexType);
   }
 
   @override
-  T visitCompoundIndexSet(
-      ast.SendSet node,
-      ast.Node receiver,
-      ast.Node index,
-      op.AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  T visitCompoundIndexSet(ast.SendSet node, ast.Node receiver, ast.Node index,
+      op.AssignmentOperator operator, ast.Node rhs, _) {
     T receiverType = visit(receiver);
     T indexType = visit(index);
     T rhsType = visit(rhs);
@@ -949,34 +866,31 @@
   }
 
   @override
-  T visitSuperIndexPrefix(
-      ast.Send node,
-      MethodElement getter,
-      MethodElement setter,
-      ast.Node index,
-      op.IncDecOperator operator,
-      _) {
+  T visitIndexSetIfNull(
+      ast.SendSet node, ast.Node receiver, ast.Node index, ast.Node rhs, _) {
+    T receiverType = visit(receiver);
+    T indexType = visit(index);
+    T rhsType = visit(rhs);
+    return handleCompoundIndexSet(node, receiverType, indexType, rhsType);
+  }
+
+  @override
+  T visitSuperIndexPrefix(ast.Send node, MethodElement getter,
+      MethodElement setter, ast.Node index, op.IncDecOperator operator, _) {
     T indexType = visit(index);
     return handleCompoundPrefixPostfix(node, superType, indexType);
   }
 
   @override
-  T visitSuperIndexPostfix(
-      ast.Send node,
-      MethodElement getter,
-      MethodElement setter,
-      ast.Node index,
-      op.IncDecOperator operator,
-      _) {
+  T visitSuperIndexPostfix(ast.Send node, MethodElement getter,
+      MethodElement setter, ast.Node index, op.IncDecOperator operator, _) {
     T indexType = visit(index);
     return handleCompoundPrefixPostfix(node, superType, indexType);
   }
 
   /// Handle compound super index set, like `super[42] =+ 2`.
   T handleSuperCompoundIndexSet(
-      ast.SendSet node,
-      ast.Node index,
-      ast.Node rhs) {
+      ast.SendSet node, ast.Node index, ast.Node rhs) {
     T receiverType = superType;
     T indexType = visit(index);
     T rhsType = visit(rhs);
@@ -996,13 +910,20 @@
   }
 
   @override
-  T visitUnresolvedSuperCompoundIndexSet(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      op.AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  T visitSuperIndexSetIfNull(ast.SendSet node, MethodElement getter,
+      MethodElement setter, ast.Node index, ast.Node rhs, _) {
+    return handleSuperCompoundIndexSet(node, index, rhs);
+  }
+
+  @override
+  T visitUnresolvedSuperCompoundIndexSet(ast.Send node, Element element,
+      ast.Node index, op.AssignmentOperator operator, ast.Node rhs, _) {
+    return handleSuperCompoundIndexSet(node, index, rhs);
+  }
+
+  @override
+  T visitUnresolvedSuperIndexSetIfNull(
+      ast.Send node, Element element, ast.Node index, ast.Node rhs, _) {
     return handleSuperCompoundIndexSet(node, index, rhs);
   }
 
@@ -1019,6 +940,12 @@
   }
 
   @override
+  T visitUnresolvedSuperGetterIndexSetIfNull(ast.SendSet node, Element element,
+      MethodElement setter, ast.Node index, ast.Node rhs, _) {
+    return handleSuperCompoundIndexSet(node, index, rhs);
+  }
+
+  @override
   T visitUnresolvedSuperSetterCompoundIndexSet(
       ast.SendSet node,
       MethodElement getter,
@@ -1031,24 +958,21 @@
   }
 
   @override
-  T visitUnresolvedSuperIndexPrefix(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      op.IncDecOperator operator,
-      _) {
+  T visitUnresolvedSuperSetterIndexSetIfNull(ast.SendSet node,
+      MethodElement getter, Element element, ast.Node index, ast.Node rhs, _) {
+    return handleSuperCompoundIndexSet(node, index, rhs);
+  }
+
+  @override
+  T visitUnresolvedSuperIndexPrefix(ast.Send node, Element element,
+      ast.Node index, op.IncDecOperator operator, _) {
     T indexType = visit(index);
     return handleCompoundPrefixPostfix(node, superType, indexType);
   }
 
   @override
-  T visitUnresolvedSuperGetterIndexPrefix(
-      ast.SendSet node,
-      Element element,
-      MethodElement setter,
-      ast.Node index,
-      op.IncDecOperator operator,
-      _) {
+  T visitUnresolvedSuperGetterIndexPrefix(ast.SendSet node, Element element,
+      MethodElement setter, ast.Node index, op.IncDecOperator operator, _) {
     T indexType = visit(index);
     return handleCompoundPrefixPostfix(node, superType, indexType);
   }
@@ -1066,24 +990,15 @@
   }
 
   @override
-  T visitUnresolvedSuperIndexPostfix(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      op.IncDecOperator operator,
-      _) {
+  T visitUnresolvedSuperIndexPostfix(ast.Send node, Element element,
+      ast.Node index, op.IncDecOperator operator, _) {
     T indexType = visit(index);
     return handleCompoundPrefixPostfix(node, superType, indexType);
   }
 
   @override
-  T visitUnresolvedSuperGetterIndexPostfix(
-      ast.SendSet node,
-      Element element,
-      MethodElement setter,
-      ast.Node index,
-      op.IncDecOperator operator,
-      _) {
+  T visitUnresolvedSuperGetterIndexPostfix(ast.SendSet node, Element element,
+      MethodElement setter, ast.Node index, op.IncDecOperator operator, _) {
     T indexType = visit(index);
     return handleCompoundPrefixPostfix(node, superType, indexType);
   }
@@ -1104,22 +1019,14 @@
   T handleIndexSet(ast.SendSet node, T receiverType, T indexType, T rhsType) {
     Selector setterSelector = elements.getSelector(node);
     TypeMask setterMask = elements.getTypeMask(node);
-    handleDynamicSend(
-        node,
-        setterSelector,
-        setterMask,
-        receiverType,
+    handleDynamicSend(node, setterSelector, setterMask, receiverType,
         new ArgumentsTypes<T>([indexType, rhsType], null));
     return rhsType;
   }
 
   @override
   T visitIndexSet(
-      ast.SendSet node,
-      ast.Node receiver,
-      ast.Node index,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ast.Node receiver, ast.Node index, ast.Node rhs, _) {
     T receiverType = visit(receiver);
     T indexType = visit(index);
     T rhsType = visit(rhs);
@@ -1127,10 +1034,7 @@
   }
 
   /// Handle super index set, like `super[42] = true`.
-  T handleSuperIndexSet(
-      ast.SendSet node,
-      ast.Node index,
-      ast.Node rhs) {
+  T handleSuperIndexSet(ast.SendSet node, ast.Node index, ast.Node rhs) {
     T receiverType = superType;
     T indexType = visit(index);
     T rhsType = visit(rhs);
@@ -1138,45 +1042,37 @@
   }
 
   @override
-  T visitSuperIndexSet(
-      ast.SendSet node,
-      FunctionElement function,
-      ast.Node index,
-      ast.Node rhs,
-      _) {
+  T visitSuperIndexSet(ast.SendSet node, FunctionElement function,
+      ast.Node index, ast.Node rhs, _) {
     return handleSuperIndexSet(node, index, rhs);
   }
 
   @override
   T visitUnresolvedSuperIndexSet(
-      ast.SendSet node,
-      Element element,
-      ast.Node index,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, Element element, ast.Node index, ast.Node rhs, _) {
     return handleSuperIndexSet(node, index, rhs);
   }
 
-  T handlePlainAssignment(ast.Node node,
-                          Element element,
-                          Selector setterSelector,
-                          TypeMask setterMask,
-                          T receiverType,
-                          T rhsType,
-                          ast.Node rhs) {
+  T handlePlainAssignment(
+      ast.Node node,
+      Element element,
+      Selector setterSelector,
+      TypeMask setterMask,
+      T receiverType,
+      T rhsType,
+      ast.Node rhs) {
     ArgumentsTypes arguments = new ArgumentsTypes<T>([rhsType], null);
     if (Elements.isMalformed(element)) {
       // Code will always throw.
     } else if (Elements.isStaticOrTopLevelField(element)) {
       handleStaticSend(node, setterSelector, setterMask, element, arguments);
     } else if (Elements.isUnresolved(element) || element.isSetter) {
-      if (analyzedElement.isGenerativeConstructor
-          && (node.asSendSet() != null)
-          && (node.asSendSet().receiver != null)
-          && node.asSendSet().receiver.isThis()) {
+      if (analyzedElement.isGenerativeConstructor &&
+          (node.asSendSet() != null) &&
+          (node.asSendSet().receiver != null) &&
+          node.asSendSet().receiver.isThis()) {
         Iterable<Element> targets = compiler.world.allFunctions.filter(
-            setterSelector,
-            types.newTypedSelector(thisType, setterMask));
+            setterSelector, types.newTypedSelector(thisType, setterMask));
         // We just recognized a field initialization of the form:
         // `this.foo = 42`. If there is only one target, we can update
         // its type.
@@ -1212,9 +1108,8 @@
 
   /// Handle a super access or invocation that results in a `noSuchMethod` call.
   T handleErroneousSuperSend(ast.Send node) {
-    ArgumentsTypes arguments = node.isPropertyAccess
-        ? null
-        : analyzeArguments(node.arguments);
+    ArgumentsTypes arguments =
+        node.isPropertyAccess ? null : analyzeArguments(node.arguments);
     Selector selector = elements.getSelector(node);
     TypeMask mask = elements.getTypeMask(node);
     // TODO(herhut): We could do better here if we knew what we
@@ -1228,9 +1123,7 @@
   /// Handle a .call invocation on the values retrieved from the super
   /// [element]. For instance `super.foo(bar)` where `foo` is a field or getter.
   T handleSuperClosureCall(
-      ast.Send node,
-      Element element,
-      ast.NodeList arguments) {
+      ast.Send node, Element element, ast.NodeList arguments) {
     ArgumentsTypes argumentTypes = analyzeArguments(arguments.nodes);
     Selector selector = elements.getSelector(node);
     TypeMask mask = elements.getTypeMask(node);
@@ -1238,188 +1131,130 @@
     // are calling does not expose this.
     isThisExposed = true;
     return inferrer.registerCalledClosure(
-        node, selector, mask, inferrer.typeOfElement(element),
-        outermostElement, argumentTypes, sideEffects, inLoop);
+        node,
+        selector,
+        mask,
+        inferrer.typeOfElement(element),
+        outermostElement,
+        argumentTypes,
+        sideEffects,
+        inLoop);
   }
 
   /// Handle an invocation of super [method].
-  T handleSuperMethodInvoke(ast.Send node,
-                            MethodElement method,
-                            ArgumentsTypes arguments) {
+  T handleSuperMethodInvoke(
+      ast.Send node, MethodElement method, ArgumentsTypes arguments) {
     // TODO(herhut): We could do better here if we knew what we
     // are calling does not expose this.
     isThisExposed = true;
     Selector selector = elements.getSelector(node);
     TypeMask mask = elements.getTypeMask(node);
-    return handleStaticSend(
-        node, selector, mask, method, arguments);
+    return handleStaticSend(node, selector, mask, method, arguments);
   }
 
   /// Handle access to a super field or getter [element].
-  T handleSuperGet(ast.Send node,
-                   Element element) {
+  T handleSuperGet(ast.Send node, Element element) {
     // TODO(herhut): We could do better here if we knew what we
     // are calling does not expose this.
     isThisExposed = true;
     Selector selector = elements.getSelector(node);
     TypeMask mask = elements.getTypeMask(node);
-    return handleStaticSend(
-        node, selector, mask, element, null);
+    return handleStaticSend(node, selector, mask, element, null);
   }
 
   @override
   T visitUnresolvedSuperIndex(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      _) {
+      ast.Send node, Element element, ast.Node index, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
   T visitUnresolvedSuperUnary(
-      ast.Send node,
-      op.UnaryOperator operator,
-      Element element,
-      _) {
+      ast.Send node, op.UnaryOperator operator, Element element, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
-  T visitUnresolvedSuperBinary(
-      ast.Send node,
-      Element element,
-      op.BinaryOperator operator,
-      ast.Node argument,
-      _) {
+  T visitUnresolvedSuperBinary(ast.Send node, Element element,
+      op.BinaryOperator operator, ast.Node argument, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
-  T visitUnresolvedSuperGet(
-      ast.Send node,
-      Element element,
-      _) {
+  T visitUnresolvedSuperGet(ast.Send node, Element element, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
-  T visitSuperSetterGet(
-      ast.Send node,
-      MethodElement setter,
-      _) {
+  T visitSuperSetterGet(ast.Send node, MethodElement setter, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
-  T visitSuperGetterSet(
-      ast.Send node,
-      MethodElement getter,
-      ast.Node rhs,
-      _) {
+  T visitSuperGetterSet(ast.Send node, MethodElement getter, ast.Node rhs, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
-  T visitUnresolvedSuperSet(
-      ast.Send node,
-      Element element,
-      ast.Node rhs,
-      _) {
+  T visitUnresolvedSuperSet(ast.Send node, Element element, ast.Node rhs, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
   T visitUnresolvedSuperInvoke(
-      ast.Send node,
-      Element element,
-      ast.Node argument,
-      Selector selector,
-      _) {
+      ast.Send node, Element element, ast.Node argument, Selector selector, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
-  T visitSuperFieldGet(
-      ast.Send node,
-      FieldElement field,
-      _) {
+  T visitSuperFieldGet(ast.Send node, FieldElement field, _) {
     return handleSuperGet(node, field);
   }
 
   @override
-  T visitSuperGetterGet(
-      ast.Send node,
-      MethodElement method,
-      _) {
+  T visitSuperGetterGet(ast.Send node, MethodElement method, _) {
     return handleSuperGet(node, method);
   }
 
   @override
-  T visitSuperMethodGet(
-      ast.Send node,
-      MethodElement method,
-      _) {
+  T visitSuperMethodGet(ast.Send node, MethodElement method, _) {
     return handleSuperGet(node, method);
   }
 
   @override
-  T visitSuperFieldInvoke(
-      ast.Send node,
-      FieldElement field,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitSuperFieldInvoke(ast.Send node, FieldElement field,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleSuperClosureCall(node, field, arguments);
   }
 
   @override
-  T visitSuperGetterInvoke(
-      ast.Send node,
-      MethodElement getter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitSuperGetterInvoke(ast.Send node, MethodElement getter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleSuperClosureCall(node, getter, arguments);
   }
 
   @override
-  T visitSuperMethodInvoke(
-      ast.Send node,
-      MethodElement method,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitSuperMethodInvoke(ast.Send node, MethodElement method,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleSuperMethodInvoke(
         node, method, analyzeArguments(arguments.nodes));
   }
 
   @override
-  T visitSuperSetterInvoke(
-      ast.Send node,
-      FunctionElement setter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitSuperSetterInvoke(ast.Send node, FunctionElement setter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleErroneousSuperSend(node);
   }
 
   @override
-  T visitSuperIndex(
-      ast.Send node,
-      MethodElement method,
-      ast.Node index,
-      _) {
+  T visitSuperIndex(ast.Send node, MethodElement method, ast.Node index, _) {
     return handleSuperMethodInvoke(
         node, method, analyzeArguments(node.arguments));
   }
 
   @override
   T visitSuperEquals(
-      ast.Send node,
-      MethodElement method,
-      ast.Node argument,
-      _) {
+      ast.Send node, MethodElement method, ast.Node argument, _) {
     // TODO(johnniwinther): Special case ==.
     return handleSuperMethodInvoke(
         node, method, analyzeArguments(node.arguments));
@@ -1427,43 +1262,29 @@
 
   @override
   T visitSuperNotEquals(
-      ast.Send node,
-      MethodElement method,
-      ast.Node argument,
-      _) {
+      ast.Send node, MethodElement method, ast.Node argument, _) {
     // TODO(johnniwinther): Special case !=.
     return handleSuperMethodInvoke(
         node, method, analyzeArguments(node.arguments));
   }
 
   @override
-  T visitSuperBinary(
-      ast.Send node,
-      MethodElement method,
-      op.BinaryOperator operator,
-      ast.Node argument,
-      _) {
+  T visitSuperBinary(ast.Send node, MethodElement method,
+      op.BinaryOperator operator, ast.Node argument, _) {
     return handleSuperMethodInvoke(
         node, method, analyzeArguments(node.arguments));
   }
 
   @override
   T visitSuperUnary(
-      ast.Send node,
-      op.UnaryOperator operator,
-      MethodElement method,
-      _) {
+      ast.Send node, op.UnaryOperator operator, MethodElement method, _) {
     return handleSuperMethodInvoke(
         node, method, analyzeArguments(node.arguments));
   }
 
   @override
-  T visitSuperMethodIncompatibleInvoke(
-      ast.Send node,
-      MethodElement method,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitSuperMethodIncompatibleInvoke(ast.Send node, MethodElement method,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleErroneousSuperSend(node);
   }
 
@@ -1474,10 +1295,10 @@
     ast.LiteralInt length = firstArgument.asLiteralInt();
     if (length != null) {
       return length.value;
-    } else if (element != null
-               && element.isField
-               && Elements.isStaticOrTopLevelField(element)
-               && compiler.world.fieldNeverChanges(element)) {
+    } else if (element != null &&
+        element.isField &&
+        Elements.isStaticOrTopLevelField(element) &&
+        compiler.world.fieldNeverChanges(element)) {
       ConstantValue value =
           compiler.backend.constants.getConstantValueForVariable(element);
       if (value != null && value.isInt) {
@@ -1538,12 +1359,12 @@
     T returnType = handleStaticSend(node, selector, mask, target, arguments);
     if (Elements.isGrowableListConstructorCall(constructor, node, compiler)) {
       return inferrer.concreteTypes.putIfAbsent(
-          node, () => types.allocateList(
-              types.growableListType, node, outermostElement,
-              types.nonNullEmpty(), 0));
-    } else if (Elements.isFixedListConstructorCall(constructor, node, compiler)
-        || Elements.isFilledListConstructorCall(constructor, node, compiler)) {
-
+          node,
+          () => types.allocateList(types.growableListType, node,
+              outermostElement, types.nonNullEmpty(), 0));
+    } else if (Elements.isFixedListConstructorCall(
+            constructor, node, compiler) ||
+        Elements.isFilledListConstructorCall(constructor, node, compiler)) {
       int length = findLength(node);
       T elementType =
           Elements.isFixedListConstructorCall(constructor, node, compiler)
@@ -1551,18 +1372,18 @@
               : arguments.positional[1];
 
       return inferrer.concreteTypes.putIfAbsent(
-          node, () => types.allocateList(
-              types.fixedListType, node, outermostElement,
+          node,
+          () => types.allocateList(types.fixedListType, node, outermostElement,
               elementType, length));
-    } else if (
-        Elements.isConstructorOfTypedArraySubclass(constructor, compiler)) {
+    } else if (Elements.isConstructorOfTypedArraySubclass(
+        constructor, compiler)) {
       int length = findLength(node);
-      T elementType = inferrer.returnTypeOfElement(
-          target.enclosingClass.lookupMember('[]'));
+      T elementType = inferrer
+          .returnTypeOfElement(target.enclosingClass.lookupMember('[]'));
       return inferrer.concreteTypes.putIfAbsent(
-        node, () => types.allocateList(
-          types.nonNullExact(target.enclosingClass), node,
-          outermostElement, elementType, length));
+          node,
+          () => types.allocateList(types.nonNullExact(target.enclosingClass),
+              node, outermostElement, elementType, length));
     } else {
       return returnType;
     }
@@ -1575,13 +1396,8 @@
   }
 
   @override
-  T errorNonConstantConstructorInvoke(
-      ast.NewExpression node,
-      Element element,
-      DartType type,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T errorNonConstantConstructorInvoke(ast.NewExpression node, Element element,
+      DartType type, ast.NodeList arguments, CallStructure callStructure, _) {
     return bulkHandleNew(node, _);
   }
 
@@ -1592,8 +1408,14 @@
     TypeMask mask = elements.getTypeMask(node);
     handleStaticSend(node, selector, mask, element, arguments);
     return inferrer.registerCalledClosure(
-              node, selector, mask, inferrer.typeOfElement(element),
-              outermostElement, arguments, sideEffects, inLoop);
+        node,
+        selector,
+        mask,
+        inferrer.typeOfElement(element),
+        outermostElement,
+        arguments,
+        sideEffects,
+        inLoop);
   }
 
   /// Handle invocation of a top level or static [function].
@@ -1615,62 +1437,38 @@
   }
 
   @override
-  T visitStaticFieldInvoke(
-      ast.Send node,
-      FieldElement field,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitStaticFieldInvoke(ast.Send node, FieldElement field,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleStaticFieldOrGetterInvoke(node, field);
   }
 
   @override
-  T visitStaticFunctionInvoke(
-      ast.Send node,
-      MethodElement function,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitStaticFunctionInvoke(ast.Send node, MethodElement function,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleStaticFunctionInvoke(node, function);
   }
 
   @override
-  T visitStaticFunctionIncompatibleInvoke(
-      ast.Send node,
-      MethodElement function,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitStaticFunctionIncompatibleInvoke(ast.Send node, MethodElement function,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleInvalidStaticInvoke(node);
   }
 
   @override
-  T visitStaticGetterInvoke(
-      ast.Send node,
-      FunctionElement getter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitStaticGetterInvoke(ast.Send node, FunctionElement getter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleStaticFieldOrGetterInvoke(node, getter);
   }
 
   @override
-  T visitTopLevelFieldInvoke(
-      ast.Send node,
-      FieldElement field,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitTopLevelFieldInvoke(ast.Send node, FieldElement field,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleStaticFieldOrGetterInvoke(node, field);
   }
 
   @override
-  T visitTopLevelFunctionInvoke(
-      ast.Send node,
-      MethodElement function,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitTopLevelFunctionInvoke(ast.Send node, MethodElement function,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleStaticFunctionInvoke(node, function);
   }
 
@@ -1685,42 +1483,26 @@
   }
 
   @override
-  T visitTopLevelGetterInvoke(
-      ast.Send node,
-      FunctionElement getter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitTopLevelGetterInvoke(ast.Send node, FunctionElement getter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleStaticFieldOrGetterInvoke(node, getter);
   }
 
   @override
-  T visitStaticSetterInvoke(
-      ast.Send node,
-      MethodElement setter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitStaticSetterInvoke(ast.Send node, MethodElement setter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleInvalidStaticInvoke(node);
   }
 
   @override
-  T visitTopLevelSetterInvoke(
-      ast.Send node,
-      MethodElement setter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitTopLevelSetterInvoke(ast.Send node, MethodElement setter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleInvalidStaticInvoke(node);
   }
 
   @override
-  T visitUnresolvedInvoke(
-      ast.Send node,
-      Element element,
-      ast.NodeList arguments,
-      Selector selector,
-      _) {
+  T visitUnresolvedInvoke(ast.Send node, Element element,
+      ast.NodeList arguments, Selector selector, _) {
     return handleInvalidStaticInvoke(node);
   }
 
@@ -1790,124 +1572,78 @@
   }
 
   @override
-  T visitDynamicPropertyGet(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      _) {
+  T visitDynamicPropertyGet(ast.Send node, ast.Node receiver, Name name, _) {
     return handleDynamicGet(node);
   }
 
   @override
   T visitIfNotNullDynamicPropertyGet(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      _) {
+      ast.Send node, ast.Node receiver, Name name, _) {
     return handleDynamicGet(node);
   }
 
   @override
-  T visitLocalVariableGet(
-      ast.Send node,
-      LocalVariableElement variable,
-      _) {
+  T visitLocalVariableGet(ast.Send node, LocalVariableElement variable, _) {
     return handleLocalGet(node, variable);
   }
 
   @override
-  T visitParameterGet(
-      ast.Send node,
-      ParameterElement parameter,
-      _) {
+  T visitParameterGet(ast.Send node, ParameterElement parameter, _) {
     return handleLocalGet(node, parameter);
   }
 
   @override
-  T visitLocalFunctionGet(
-      ast.Send node,
-      LocalFunctionElement function,
-      _) {
+  T visitLocalFunctionGet(ast.Send node, LocalFunctionElement function, _) {
     return handleLocalGet(node, function);
   }
 
   @override
-  T visitStaticFieldGet(
-      ast.Send node,
-      FieldElement field,
-      _) {
+  T visitStaticFieldGet(ast.Send node, FieldElement field, _) {
     return handleStaticFieldGet(node, field);
   }
 
   @override
-  T visitStaticFunctionGet(
-      ast.Send node,
-      MethodElement function,
-      _) {
+  T visitStaticFunctionGet(ast.Send node, MethodElement function, _) {
     return handleStaticFunctionGet(node, function);
   }
 
   @override
-  T visitStaticGetterGet(
-      ast.Send node,
-      FunctionElement getter,
-      _) {
+  T visitStaticGetterGet(ast.Send node, FunctionElement getter, _) {
     return handleStaticGetterGet(node, getter);
   }
 
   @override
-  T visitThisPropertyGet(
-      ast.Send node,
-      Name name,
-      _) {
+  T visitThisPropertyGet(ast.Send node, Name name, _) {
     return handleDynamicGet(node);
   }
 
   @override
-  T visitTopLevelFieldGet(
-      ast.Send node,
-      FieldElement field,
-      _) {
+  T visitTopLevelFieldGet(ast.Send node, FieldElement field, _) {
     return handleStaticFieldGet(node, field);
   }
 
   @override
-  T visitTopLevelFunctionGet(
-      ast.Send node,
-      MethodElement function,
-      _) {
+  T visitTopLevelFunctionGet(ast.Send node, MethodElement function, _) {
     return handleStaticFunctionGet(node, function);
   }
 
   @override
-  T visitTopLevelGetterGet(
-      ast.Send node,
-      FunctionElement getter,
-      _) {
+  T visitTopLevelGetterGet(ast.Send node, FunctionElement getter, _) {
     return handleStaticGetterGet(node, getter);
   }
 
   @override
-  T visitStaticSetterGet(
-      ast.Send node,
-      MethodElement setter,
-      _) {
+  T visitStaticSetterGet(ast.Send node, MethodElement setter, _) {
     return types.dynamicType;
   }
 
   @override
-  T visitTopLevelSetterGet(
-      ast.Send node,
-      MethodElement setter,
-      _) {
+  T visitTopLevelSetterGet(ast.Send node, MethodElement setter, _) {
     return types.dynamicType;
   }
 
   @override
-  T visitUnresolvedGet(
-      ast.Send node,
-      Element element,
-      _) {
+  T visitUnresolvedGet(ast.Send node, Element element, _) {
     return types.dynamicType;
   }
 
@@ -1916,66 +1652,45 @@
     ArgumentsTypes arguments = analyzeArguments(node.arguments);
     Selector selector = elements.getSelector(node);
     TypeMask mask = elements.getTypeMask(node);
-    return inferrer.registerCalledClosure(
-        node, selector, mask, closure, outermostElement, arguments,
-        sideEffects, inLoop);
+    return inferrer.registerCalledClosure(node, selector, mask, closure,
+        outermostElement, arguments, sideEffects, inLoop);
   }
 
   @override
-  T visitExpressionInvoke(
-      ast.Send node,
-      ast.Node expression,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitExpressionInvoke(ast.Send node, ast.Node expression,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleCallInvoke(node, expression.accept(this));
-   }
+  }
 
   @override
   T visitThisInvoke(
-      ast.Send node,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+      ast.Send node, ast.NodeList arguments, CallStructure callStructure, _) {
     return handleCallInvoke(node, thisType);
   }
 
   @override
-  T visitParameterInvoke(
-      ast.Send node,
-      ParameterElement parameter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitParameterInvoke(ast.Send node, ParameterElement parameter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleCallInvoke(node, locals.use(parameter));
   }
 
   @override
-  T visitLocalVariableInvoke(
-      ast.Send node,
-      LocalVariableElement variable,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitLocalVariableInvoke(ast.Send node, LocalVariableElement variable,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     return handleCallInvoke(node, locals.use(variable));
   }
 
   @override
-  T visitLocalFunctionInvoke(
-      ast.Send node,
-      LocalFunctionElement function,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  T visitLocalFunctionInvoke(ast.Send node, LocalFunctionElement function,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     ArgumentsTypes argumentTypes = analyzeArguments(node.arguments);
     Selector selector = elements.getSelector(node);
     TypeMask mask = elements.getTypeMask(node);
     // This only works for function statements. We need a
     // more sophisticated type system with function types to support
     // more.
-    return inferrer.registerCalledElement(
-        node, selector, mask, outermostElement, function, argumentTypes,
-        sideEffects, inLoop);
+    return inferrer.registerCalledElement(node, selector, mask,
+        outermostElement, function, argumentTypes, sideEffects, inLoop);
   }
 
   @override
@@ -1989,28 +1704,21 @@
     return types.dynamicType;
   }
 
-  T handleStaticSend(ast.Node node,
-                     Selector selector,
-                     TypeMask mask,
-                     Element element,
-                     ArgumentsTypes arguments) {
+  T handleStaticSend(ast.Node node, Selector selector, TypeMask mask,
+      Element element, ArgumentsTypes arguments) {
     assert(!element.isFactoryConstructor ||
-           !(element as ConstructorElement).isRedirectingFactory);
+        !(element as ConstructorElement).isRedirectingFactory);
     // Erroneous elements may be unresolved, for example missing getters.
     if (Elements.isUnresolved(element)) return types.dynamicType;
     // TODO(herhut): should we follow redirecting constructors here? We would
     // need to pay attention if the constructor is pointing to an erroneous
     // element.
-    return inferrer.registerCalledElement(
-        node, selector, mask, outermostElement, element, arguments,
-        sideEffects, inLoop);
+    return inferrer.registerCalledElement(node, selector, mask,
+        outermostElement, element, arguments, sideEffects, inLoop);
   }
 
-  T handleDynamicSend(ast.Node node,
-                      Selector selector,
-                      TypeMask mask,
-                      T receiverType,
-                      ArgumentsTypes arguments) {
+  T handleDynamicSend(ast.Node node, Selector selector, TypeMask mask,
+      T receiverType, ArgumentsTypes arguments) {
     assert(receiverType != null);
     if (types.selectorNeedsUpdate(receiverType, mask)) {
       mask = receiverType == types.dynamicType
@@ -2035,9 +1743,8 @@
       }
     }
 
-    return inferrer.registerCalledSelector(
-        node, selector, mask, receiverType, outermostElement, arguments,
-        sideEffects, inLoop);
+    return inferrer.registerCalledSelector(node, selector, mask, receiverType,
+        outermostElement, arguments, sideEffects, inLoop);
   }
 
   T handleDynamicInvoke(ast.Send node) {
@@ -2069,11 +1776,9 @@
       checkIfExposesThis(selector, types.newTypedSelector(receiverType, mask));
     }
 
-    ArgumentsTypes arguments = node.isPropertyAccess
-        ? null
-        : analyzeArguments(node.arguments);
-    if (selector.name == '==' ||
-        selector.name == '!=') {
+    ArgumentsTypes arguments =
+        node.isPropertyAccess ? null : analyzeArguments(node.arguments);
+    if (selector.name == '==' || selector.name == '!=') {
       if (types.isNull(receiverType)) {
         potentiallyAddNullCheck(node, node.arguments.head);
         return types.boolType;
@@ -2117,14 +1822,8 @@
     }
 
     ArgumentsTypes arguments = new ArgumentsTypes<T>(unnamed, named);
-    return inferrer.registerCalledElement(node,
-                                          null,
-                                          null,
-                                          outermostElement,
-                                          element,
-                                          arguments,
-                                          sideEffects,
-                                          inLoop);
+    return inferrer.registerCalledElement(node, null, null, outermostElement,
+        element, arguments, sideEffects, inLoop);
   }
 
   T visitRedirectingFactoryBody(ast.RedirectingFactoryBody node) {
@@ -2145,25 +1844,18 @@
 
   T visitReturn(ast.Return node) {
     ast.Node expression = node.expression;
-    recordReturnType(expression == null
-        ? types.nullType
-        : expression.accept(this));
+    recordReturnType(
+        expression == null ? types.nullType : expression.accept(this));
     locals.seenReturnOrThrow = true;
     return null;
   }
 
-  T handleForInLoop(ast.ForIn node,
-                    T iteratorType,
-                    Selector currentSelector,
-                    TypeMask currentMask,
-                    Selector moveNextSelector,
-                    TypeMask moveNextMask) {
-    handleDynamicSend(
-        node, moveNextSelector, moveNextMask, iteratorType,
+  T handleForInLoop(ast.ForIn node, T iteratorType, Selector currentSelector,
+      TypeMask currentMask, Selector moveNextSelector, TypeMask moveNextMask) {
+    handleDynamicSend(node, moveNextSelector, moveNextMask, iteratorType,
         new ArgumentsTypes<T>.empty());
-    T currentType = handleDynamicSend(
-        node, currentSelector, currentMask, iteratorType,
-        new ArgumentsTypes<T>.empty());
+    T currentType = handleDynamicSend(node, currentSelector, currentMask,
+        iteratorType, new ArgumentsTypes<T>.empty());
 
     if (node.expression.isThis()) {
       // Any reasonable implementation of an iterator would expose
@@ -2183,9 +1875,8 @@
       receiverType = types.dynamicType;
     }
 
-    handlePlainAssignment(identifier, element, selector, mask,
-                          receiverType, currentType,
-                          node.expression);
+    handlePlainAssignment(identifier, element, selector, mask, receiverType,
+        currentType, node.expression);
     return handleLoop(node, () {
       visit(node.body);
     });
@@ -2203,12 +1894,11 @@
     Element ctor = backend.helpers.streamIteratorConstructor;
 
     /// Synthesize a call to the [StreamIterator] constructor.
-    T iteratorType = handleStaticSend(node, null, null, ctor,
-                                      new ArgumentsTypes<T>([expressionType],
-                                                            null));
+    T iteratorType = handleStaticSend(
+        node, null, null, ctor, new ArgumentsTypes<T>([expressionType], null));
 
     return handleForInLoop(node, iteratorType, currentSelector, currentMask,
-                           moveNextSelector, moveNextMask);
+        moveNextSelector, moveNextMask);
   }
 
   T visitSyncForIn(ast.SyncForIn node) {
@@ -2220,11 +1910,10 @@
     Selector moveNextSelector = Selectors.moveNext;
     TypeMask moveNextMask = elements.getMoveNextTypeMask(node);
 
-    T iteratorType = handleDynamicSend(
-        node, iteratorSelector, iteratorMask, expressionType,
-        new ArgumentsTypes<T>.empty());
+    T iteratorType = handleDynamicSend(node, iteratorSelector, iteratorMask,
+        expressionType, new ArgumentsTypes<T>.empty());
 
     return handleForInLoop(node, iteratorType, currentSelector, currentMask,
-                           moveNextSelector, moveNextMask);
+        moveNextSelector, moveNextMask);
   }
 }
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
new file mode 100644
index 0000000..a651852
--- /dev/null
+++ b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
@@ -0,0 +1,441 @@
+// 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 dart2js.inferrer.type_graph_dump;
+
+import 'dart:async';
+import 'type_graph_nodes.dart';
+import 'type_graph_inferrer.dart';
+import '../elements/elements.dart';
+import '../types/types.dart';
+
+/// Dumps the type inference graph in Graphviz Dot format into the `typegraph`
+/// subfolder of the current working directory. Each function body is dumped in
+/// a separate file.
+///
+/// The resulting .dot files must be processed using the Graphviz `dot` command,
+/// which can be obtained from `http://www.graphviz.org`, or installed using
+/// most package managers (search for `graphviz` or `dot`).
+///
+/// Example commands:
+///
+///     dot -Tpng -O typegraph/main.dot
+///     open typegraph/main.dot.png
+///
+///     dot -Tpng -O typegraph/dart._internal.Sort._dualPivotQuicksort.dot
+///     open typegraph/dart._internal.Sort._dualPivotQuicksort.dot.png
+///
+class TypeGraphDump {
+  static const String outputDir = 'typegraph';
+
+  final TypeGraphInferrerEngine inferrer;
+  final Map<TypeInformation, Set<TypeInformation>> assignmentsBeforeAnalysis =
+      <TypeInformation, Set<TypeInformation>>{};
+  final Map<TypeInformation, Set<TypeInformation>> assignmentsBeforeTracing =
+      <TypeInformation, Set<TypeInformation>>{};
+  final Set<String> usedFilenames = new Set<String>();
+
+  TypeGraphDump(this.inferrer);
+
+  /// Take a copy of the assignment set for each node, since that may change
+  /// during the analysis.
+  void beforeAnalysis() {
+    for (TypeInformation node in inferrer.types.allTypes) {
+      Set<TypeInformation> copy = node.assignments.toSet();
+      if (!copy.isEmpty) {
+        assignmentsBeforeAnalysis[node] = copy;
+      }
+    }
+  }
+
+  /// Like [beforeAnalysis], takes a copy of the assignment sets.
+  void beforeTracing() {
+    for (TypeInformation node in inferrer.types.allTypes) {
+      Set<TypeInformation> copy = node.assignments.toSet();
+      if (!copy.isEmpty) {
+        assignmentsBeforeTracing[node] = copy;
+      }
+    }
+  }
+
+  /// Dumps the entire graph.
+  void afterAnalysis() {
+    // Group all the type nodes by their context member.
+    Map<Element, List<TypeInformation>> nodes =
+        <Element, List<TypeInformation>>{};
+    for (TypeInformation node in inferrer.types.allTypes) {
+      if (node.contextMember != null) {
+        nodes
+            .putIfAbsent(node.contextMember, () => <TypeInformation>[])
+            .add(node);
+      }
+    }
+    // Print every group separately.
+    for (Element element in nodes.keys) {
+      EventSink<String> output;
+      try {
+        String name = filenameFromElement(element);
+        output = inferrer.compiler.outputProvider('$outputDir/$name', 'dot');
+        _GraphGenerator visitor = new _GraphGenerator(this, element, output);
+        for (TypeInformation node in nodes[element]) {
+          node.accept(visitor);
+        }
+        visitor.addMissingNodes();
+        visitor.finish();
+      } finally {
+        if (output != null) {
+          output.close();
+        }
+      }
+    }
+  }
+
+  /// Returns the filename (without extension) in which to dump the type
+  /// graph for [element].
+  ///
+  /// Will never return the a given filename more than once, even if called with
+  /// the same element.
+  String filenameFromElement(Element element) {
+    // The toString method of elements include characters that are unsuitable
+    // for URIs and file systems.
+    List<String> parts = <String>[];
+    parts.add(element.library?.libraryName);
+    parts.add(element.enclosingClass?.name);
+    Element namedElement =
+        element is LocalElement ? element.executableContext : element;
+    if (namedElement.isGetter) {
+      parts.add('get-${namedElement.name}');
+    } else if (namedElement.isSetter) {
+      parts.add('set-${namedElement.name}');
+    } else if (namedElement.isConstructor) {
+      if (namedElement.name.isEmpty) {
+        parts.add('-constructor');
+      } else {
+        parts.add(namedElement.name);
+      }
+    } else if (namedElement.isOperator) {
+      parts.add(Elements
+          .operatorNameToIdentifier(namedElement.name)
+          .replaceAll(r'$', '-'));
+    } else {
+      parts.add(namedElement.name);
+    }
+    if (namedElement != element) {
+      if (element.name.isEmpty) {
+        parts.add('anon${element.sourcePosition.begin}');
+      } else {
+        parts.add(element.name);
+      }
+    }
+    String filename = parts.where((x) => x != null && x != '').join('.');
+    if (usedFilenames.add(filename)) return filename;
+    // The filename has already been used by another method. Append a serial
+    // number to ensure we don't overwrite it.
+    int serialNumber = 2;
+    while (!usedFilenames.add('$filename-$serialNumber')) {
+      ++serialNumber;
+    }
+    return '$filename-$serialNumber';
+  }
+}
+
+/// Builds the Graphviz Dot file for one function body.
+class _GraphGenerator extends TypeInformationVisitor {
+  final TypeGraphDump global;
+  final Set<TypeInformation> seen = new Set<TypeInformation>();
+  final List<TypeInformation> worklist = new List<TypeInformation>();
+  final Map<TypeInformation, int> nodeId = <TypeInformation, int>{};
+  int usedIds = 0;
+  final EventSink<String> output;
+  final Element element;
+  TypeInformation returnValue;
+
+  _GraphGenerator(this.global, this.element, this.output) {
+    returnValue = global.inferrer.types.getInferredTypeOf(element);
+    getNode(returnValue); // Ensure return value is part of graph.
+    append('digraph {');
+  }
+
+  void finish() {
+    append('}');
+  }
+
+  /// Ensures that all nodes which have been referenced are generated.
+  ///
+  /// Sometimes an input to a TypeInformation node does not belong to the same
+  /// function body, and the graph looks confusing if they are missing.
+  void addMissingNodes() {
+    while (worklist.isNotEmpty) {
+      TypeInformation node = worklist.removeLast();
+      assert(nodeId.containsKey(node));
+      if (seen.contains(node)) continue;
+      node.accept(this);
+    }
+  }
+
+  void append(String string) {
+    output..add(string)..add('\n');
+  }
+
+  String shorten(String text) {
+    if (text.length > 40) {
+      return text.substring(0, 19) + '...' + text.substring(text.length - 18);
+    }
+    return text;
+  }
+
+  int getFreshId() => ++usedIds;
+
+  /// Obtains a unique ID for the node representing [info].
+  String getNode(TypeInformation info) {
+    int id = nodeId.putIfAbsent(info, () {
+      worklist.add(info); // Ensure that the referenced node is generated.
+      return getFreshId();
+    });
+    return '$id';
+  }
+
+  final RegExp escapeRegexp = new RegExp('["{}<>|]');
+
+  /// Escapes characters in [text] so it can be used as part of a label.
+  String escapeLabel(String text) {
+    return text.replaceAllMapped(escapeRegexp, (m) => '\\${m.group(0)}');
+  }
+
+  /// Creates an edge from [src] to [dst].
+  ///
+  /// If [dst] is a record type node, [port] may refer to one of the fields
+  /// defined in that record (e.g. `obj`, `arg0`, `arg1`, etc)
+  void addEdge(TypeInformation src, TypeInformation dst,
+      {String port, String color: 'black'}) {
+    if (isExternal(src) && isExternal(dst)) {
+      return; // Do not add edges between external nodes.
+    }
+    String dstText = getNode(dst);
+    if (port != null) {
+      dstText += ':$port';
+    }
+    if (src is ConcreteTypeInformation) {
+      // Concrete types can have a huge number of uses which will flood the
+      // graph with very long hard-to-follow edges. Copy the concrete nodes
+      // for every use to enhance readability.
+      int id = getFreshId();
+      String type = escapeLabel('${formatType(src.type)}');
+      String text = 'Concrete';
+      String label = '{$text|<returnType> $type}';
+      append('$id [shape=record,style=dotted,label="$label"]');
+      append('$id -> $dstText [color="$color"]');
+    } else {
+      append('${getNode(src)}:returnType -> $dstText [color="$color"]');
+    }
+  }
+
+  // Some graphs are flooded by a huge number of phi and narrow nodes.
+  // We color the nodes so the "interesting" nodes stand out more.
+  static const String defaultNodeColor = '#eeffee';
+  static const String phiColor = '#eeffff';
+  static const String narrowColor = phiColor;
+  static const String callColor = '#ffffee';
+
+  // Colors for edges based on whether they were added or removed during the
+  // analysis.
+  static const String unchangedEdge = 'black';
+  static const String addedEdge = 'green4';
+  static const String removedEdge = 'red3';
+  static const String temporaryEdge = 'orange'; // Added and then removed again.
+
+  bool isExternal(TypeInformation node) {
+    return node != returnValue && node.contextMember != element;
+  }
+
+  String getStyleForNode(TypeInformation node, String color) {
+    return isExternal(node)
+        ? 'style=dotted'
+        : 'style=filled,fillcolor="$color"';
+  }
+
+  /// Adds details that are not specific to a subclass of [TypeInformation].
+  String appendDetails(TypeInformation node, String text) {
+    if (node == returnValue) {
+      return '$text\n(return value)';
+    }
+    if (node.contextMember != null && node.contextMember != element) {
+      return '$text\n(from ${node.contextMember})';
+    }
+    return text;
+  }
+
+  /// Creates a node for [node] displaying the given [text] in its box.
+  ///
+  /// [inputs] specify named inputs to the node. If omitted, edges will be
+  /// based on [node.assignments].
+  void addNode(TypeInformation node, String text,
+      {String color: defaultNodeColor, Map<String, TypeInformation> inputs}) {
+    seen.add(node);
+    String style = getStyleForNode(node, color);
+    text = appendDetails(node, text);
+    text = escapeLabel(text);
+    String id = getNode(node);
+    String returnType = escapeLabel(formatType(node.type));
+    if (inputs != null) {
+      Iterable<String> keys = inputs.keys.where((key) => inputs[key] != null);
+      String header = keys.map((key) => '<a$key> $key').join('|');
+      String label = '{{$header}|$text|<returnType> $returnType}';
+      append('$id [shape=record,label="$label",$style]');
+      for (String key in keys) {
+        addEdge(inputs[key], node, port: 'a$key');
+      }
+    } else {
+      String label = '{$text|<returnType> $returnType}';
+      append('$id [shape=record,label="$label",$style]');
+      // Add assignment edges. Color the edges based on whether they were
+      // added, removed, temporary, or unchanged.
+      var originalSet = global.assignmentsBeforeAnalysis[node] ?? const [];
+      var tracerSet = global.assignmentsBeforeTracing[node] ?? const [];
+      var currentSet = node.assignments.toSet();
+      for (TypeInformation assignment in currentSet) {
+        String color =
+            originalSet.contains(assignment) ? unchangedEdge : addedEdge;
+        addEdge(assignment, node, color: color);
+      }
+      for (TypeInformation assignment in originalSet) {
+        if (!currentSet.contains(assignment)) {
+          addEdge(assignment, node, color: removedEdge);
+        }
+      }
+      for (TypeInformation assignment in tracerSet) {
+        if (!currentSet.contains(assignment) &&
+            !originalSet.contains(assignment)) {
+          addEdge(assignment, node, color: temporaryEdge);
+        }
+      }
+    }
+  }
+
+  void visitNarrowTypeInformation(NarrowTypeInformation info) {
+    addNode(info, 'Narrow\n${formatType(info.typeAnnotation)}',
+        color: narrowColor);
+  }
+
+  void visitPhiElementTypeInformation(PhiElementTypeInformation info) {
+    addNode(info, 'Phi ${info.variable?.name ?? ''}', color: phiColor);
+  }
+
+  void visitElementInContainerTypeInformation(
+      ElementInContainerTypeInformation info) {
+    addNode(info, 'ElementInContainer');
+  }
+
+  void visitKeyInMapTypeInformation(KeyInMapTypeInformation info) {
+    addNode(info, 'KeyInMap');
+  }
+
+  void visitValueInMapTypeInformation(ValueInMapTypeInformation info) {
+    addNode(info, 'ValueInMap');
+  }
+
+  void visitListTypeInformation(ListTypeInformation info) {
+    addNode(info, 'List');
+  }
+
+  void visitMapTypeInformation(MapTypeInformation info) {
+    addNode(info, 'Map');
+  }
+
+  void visitConcreteTypeInformation(ConcreteTypeInformation info) {
+    addNode(info, 'Concrete');
+  }
+
+  void visitStringLiteralTypeInformation(StringLiteralTypeInformation info) {
+    String text = shorten(info.value.slowToString()).replaceAll('\n', '\\n');
+    addNode(info, 'StringLiteral\n"$text"');
+  }
+
+  void visitBoolLiteralTypeInformation(BoolLiteralTypeInformation info) {
+    addNode(info, 'BoolLiteral\n${info.value}');
+  }
+
+  void handleCall(CallSiteTypeInformation info, String text, Map inputs) {
+    String sourceCode = shorten('${info.call}');
+    text = '$text\n$sourceCode';
+    if (info.arguments != null) {
+      for (int i = 0; i < info.arguments.positional.length; ++i) {
+        inputs['arg$i'] = info.arguments.positional[i];
+      }
+      for (String argName in info.arguments.named.keys) {
+        inputs[argName] = info.arguments.named[argName];
+      }
+    }
+    addNode(info, text, color: callColor, inputs: inputs);
+  }
+
+  void visitClosureCallSiteTypeInformation(
+      ClosureCallSiteTypeInformation info) {
+    handleCall(info, 'ClosureCallSite', {});
+  }
+
+  void visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
+    handleCall(info, 'StaticCallSite', {});
+  }
+
+  void visitDynamicCallSiteTypeInformation(
+      DynamicCallSiteTypeInformation info) {
+    handleCall(info, 'DynamicCallSite', {'obj': info.receiver});
+  }
+
+  void visitMemberTypeInformation(MemberTypeInformation info) {
+    addNode(info, 'Member\n${info.element}');
+  }
+
+  void visitParameterTypeInformation(ParameterTypeInformation info) {
+    addNode(info, 'Parameter ${info.element?.name ?? ''}');
+  }
+
+  void visitClosureTypeInformation(ClosureTypeInformation info) {
+    String text = shorten('${info.node}');
+    addNode(info, 'Closure\n$text');
+  }
+
+  void visitAwaitTypeInformation(AwaitTypeInformation info) {
+    String text = shorten('${info.node}');
+    addNode(info, 'Await\n$text');
+  }
+}
+
+/// Convert the given TypeMask to a compact string format.
+///
+/// The default format is too verbose for the graph format since long strings
+/// create oblong nodes that obstruct the graph layout.
+String formatType(TypeMask type) {
+  if (type is FlatTypeMask) {
+    // TODO(asgerf): Disambiguate classes whose name is not unique. Using the
+    //     library name for all classes is not a good idea, since library names
+    //     can be really long and mess up the layout.
+    // Capitalize Null to emphasize that it's the null type mask and not
+    // a null value we accidentally printed out.
+    if (type.isEmptyOrNull) return type.isNullable ? 'Null' : 'Empty';
+    String nullFlag = type.isNullable ? '?' : '';
+    String subFlag = type.isExact ? '' : type.isSubclass ? '+' : '*';
+    return '${type.base.name}$nullFlag$subFlag';
+  }
+  if (type is UnionTypeMask) {
+    return type.disjointMasks.map(formatType).join(' | ');
+  }
+  if (type is ContainerTypeMask) {
+    String container = formatType(type.forwardTo);
+    String member = formatType(type.elementType);
+    return '$container<$member>';
+  }
+  if (type is MapTypeMask) {
+    String container = formatType(type.forwardTo);
+    String key = formatType(type.keyType);
+    String value = formatType(type.valueType);
+    return '$container<$key,$value>';
+  }
+  if (type is ValueTypeMask) {
+    String baseType = formatType(type.forwardTo);
+    String value = type.value.toStructuredString();
+    return '$baseType=$value';
+  }
+  return '$type'; // Fall back on toString if not supported here.
+}
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index 4ff72ab..e19436f 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -7,61 +7,35 @@
 import 'dart:collection' show Queue;
 
 import '../common.dart';
-import '../common/names.dart' show
-    Identifiers,
-    Names;
-import '../compiler.dart' show
-    Compiler;
+import '../common/names.dart' show Identifiers, Names;
+import '../compiler.dart' show Compiler;
 import '../constants/values.dart';
-import '../dart_types.dart' show
-    DartType,
-    FunctionType,
-    InterfaceType,
-    TypeKind;
+import '../dart_types.dart'
+    show DartType, FunctionType, InterfaceType, TypeKind;
 import '../elements/elements.dart';
-import '../js_backend/js_backend.dart' show
-    Annotations,
-    JavaScriptBackend;
-import '../resolution/tree_elements.dart' show
-    TreeElementMapping;
-import '../tree/tree.dart' as ast show
-    DartString,
-    Node,
-    LiteralBool,
-    Send,
-    SendSet,
-    TryStatement;
-import '../types/types.dart' show
-    ContainerTypeMask,
-    MapTypeMask,
-    TypeMask,
-    TypesInferrer;
-import '../types/constants.dart' show
-    computeTypeMask;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/side_effects.dart' show
-    SideEffects;
-import '../util/util.dart' show
-    ImmutableEmptySet,
-    Setlet;
-import '../world.dart' show
-    ClassWorld;
+import '../js_backend/js_backend.dart' show Annotations, JavaScriptBackend;
+import '../resolution/tree_elements.dart' show TreeElementMapping;
+import '../tree/tree.dart' as ast
+    show DartString, Node, LiteralBool, Send, SendSet, TryStatement;
+import '../types/types.dart'
+    show ContainerTypeMask, MapTypeMask, TypeMask, TypesInferrer;
+import '../types/constants.dart' show computeTypeMask;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/side_effects.dart' show SideEffects;
+import '../util/util.dart' show ImmutableEmptySet, Setlet;
+import '../world.dart' show ClassWorld;
 
-import 'inferrer_visitor.dart' show
-    ArgumentsTypes,
-    TypeSystem;
+import 'inferrer_visitor.dart' show ArgumentsTypes, TypeSystem;
 import 'simple_types_inferrer.dart';
 
 import 'closure_tracer.dart';
 import 'list_tracer.dart';
 import 'map_tracer.dart';
 import 'type_graph_nodes.dart';
+import 'type_graph_dump.dart';
 import 'debug.dart' as debug;
 
-
 class TypeInformationSystem extends TypeSystem<TypeInformation> {
   final Compiler compiler;
   final ClassWorld classWorld;
@@ -89,6 +63,15 @@
   /// narrowing, phis, and containers).
   final List<TypeInformation> allocatedTypes = <TypeInformation>[];
 
+  Iterable<TypeInformation> get allTypes => [
+        typeInformations.values,
+        allocatedLists.values,
+        allocatedMaps.values,
+        allocatedClosures,
+        concreteTypes.values,
+        allocatedTypes
+      ].expand((x) => x);
+
   TypeInformationSystem(Compiler compiler)
       : this.compiler = compiler,
         this.classWorld = compiler.world {
@@ -255,8 +238,8 @@
     return new BoolLiteralTypeInformation(value, compiler.typesTask.boolType);
   }
 
-  TypeInformation computeLUB(TypeInformation firstType,
-                             TypeInformation secondType) {
+  TypeInformation computeLUB(
+      TypeInformation firstType, TypeInformation secondType) {
     if (firstType == null) return secondType;
     if (firstType == secondType) return firstType;
     if (firstType == nonNullEmptyType) return secondType;
@@ -272,11 +255,8 @@
     return info.type != mask;
   }
 
-  TypeInformation refineReceiver(
-      Selector selector,
-      TypeMask mask,
-      TypeInformation receiver,
-      bool isConditional) {
+  TypeInformation refineReceiver(Selector selector, TypeMask mask,
+      TypeInformation receiver, bool isConditional) {
     if (receiver.type.isExact) return receiver;
     TypeMask otherType =
         compiler.world.allFunctions.receiverType(selector, mask);
@@ -298,9 +278,8 @@
     return newType;
   }
 
-  TypeInformation narrowType(TypeInformation type,
-                             DartType annotation,
-                             {bool isNullable: true}) {
+  TypeInformation narrowType(TypeInformation type, DartType annotation,
+      {bool isNullable: true}) {
     if (annotation.treatAsDynamic) return type;
     if (annotation.isVoid) return nullType;
     if (annotation.element == classWorld.objectClass && isNullable) return type;
@@ -387,24 +366,21 @@
     return type == nullType;
   }
 
-  TypeInformation allocateList(TypeInformation type,
-                               ast.Node node,
-                               Element enclosing,
-                               [TypeInformation elementType, int length]) {
-    bool isTypedArray =
-        compiler.typedDataClass != null &&
+  TypeInformation allocateList(
+      TypeInformation type, ast.Node node, Element enclosing,
+      [TypeInformation elementType, int length]) {
+    bool isTypedArray = compiler.typedDataClass != null &&
         classWorld.isInstantiated(compiler.typedDataClass) &&
         type.type.satisfies(compiler.typedDataClass, classWorld);
     bool isConst = (type.type == compiler.typesTask.constListType);
     bool isFixed = (type.type == compiler.typesTask.fixedListType) ||
-                   isConst ||
-                   isTypedArray;
+        isConst ||
+        isTypedArray;
     bool isElementInferred = isConst || isTypedArray;
 
     int inferredLength = isFixed ? length : null;
-    TypeMask elementTypeMask = isElementInferred
-        ? elementType.type
-        : dynamicType.type;
+    TypeMask elementTypeMask =
+        isElementInferred ? elementType.type : dynamicType.type;
     ContainerTypeMask mask = new ContainerTypeMask(
         type.type, node, enclosing, elementTypeMask, inferredLength);
     ElementInContainerTypeInformation element =
@@ -423,11 +399,9 @@
     return result;
   }
 
-  TypeInformation allocateMap(ConcreteTypeInformation type,
-                              ast.Node node,
-                              Element element,
-                              [List<TypeInformation> keyTypes,
-                               List<TypeInformation> valueTypes]) {
+  TypeInformation allocateMap(
+      ConcreteTypeInformation type, ast.Node node, Element element,
+      [List<TypeInformation> keyTypes, List<TypeInformation> valueTypes]) {
     assert(keyTypes.length == valueTypes.length);
     bool isFixed = (type.type == compiler.typesTask.constMapType);
 
@@ -440,11 +414,8 @@
     } else {
       keyType = valueType = dynamicType.type;
     }
-    MapTypeMask mask = new MapTypeMask(type.type,
-                                       node,
-                                       element,
-                                       keyType,
-                                       valueType);
+    MapTypeMask mask =
+        new MapTypeMask(type.type, node, element, keyType, valueType);
 
     TypeInformation keyTypeInfo =
         new KeyInMapTypeInformation(currentMember, null);
@@ -477,8 +448,8 @@
     return info.isConcrete ? info.type : mask;
   }
 
-  TypeInformation allocateDiamondPhi(TypeInformation firstInput,
-                                     TypeInformation secondInput) {
+  TypeInformation allocateDiamondPhi(
+      TypeInformation firstInput, TypeInformation secondInput) {
     PhiElementTypeInformation result =
         new PhiElementTypeInformation(currentMember, null, false, null);
     result.addAssignment(firstInput);
@@ -487,10 +458,8 @@
     return result;
   }
 
-  PhiElementTypeInformation _addPhi(ast.Node node,
-                                    Local variable,
-                                    inputType,
-                                    bool isLoop) {
+  PhiElementTypeInformation _addPhi(
+      ast.Node node, Local variable, inputType, bool isLoop) {
     PhiElementTypeInformation result =
         new PhiElementTypeInformation(currentMember, node, isLoop, variable);
     allocatedTypes.add(result);
@@ -498,9 +467,8 @@
     return result;
   }
 
-  PhiElementTypeInformation allocatePhi(ast.Node node,
-                                        Local variable,
-                                        inputType) {
+  PhiElementTypeInformation allocatePhi(
+      ast.Node node, Local variable, inputType) {
     // Check if [inputType] is a phi for a local updated in
     // the try/catch block [node]. If it is, no need to allocate a new
     // phi.
@@ -512,23 +480,20 @@
     return _addPhi(node, variable, inputType, false);
   }
 
-  PhiElementTypeInformation allocateLoopPhi(ast.Node node,
-                                            Local variable,
-                                            inputType) {
+  PhiElementTypeInformation allocateLoopPhi(
+      ast.Node node, Local variable, inputType) {
     return _addPhi(node, variable, inputType, true);
   }
 
-  TypeInformation simplifyPhi(ast.Node node,
-                              Local variable,
-                              PhiElementTypeInformation phiType) {
+  TypeInformation simplifyPhi(
+      ast.Node node, Local variable, PhiElementTypeInformation phiType) {
     assert(phiType.branchNode == node);
     if (phiType.assignments.length == 1) return phiType.assignments.first;
     return phiType;
   }
 
   PhiElementTypeInformation addPhiInput(Local variable,
-                                        PhiElementTypeInformation phiType,
-                                        TypeInformation newType) {
+      PhiElementTypeInformation phiType, TypeInformation newType) {
     phiType.addAssignment(newType);
     return phiType;
   }
@@ -553,7 +518,7 @@
     }
 
     TypeMask newType = null;
-    for (TypeMask mask in masks) {
+    for (TypeMask mask in list) {
       newType = newType == null ? mask : newType.union(mask, classWorld);
       // Likewise - stop early if we already reach dynamic.
       if (newType.containsAll(classWorld)) return dynamicType;
@@ -619,7 +584,7 @@
   int addedInGraph = 0;
 
   TypeGraphInferrerEngine(Compiler compiler, this.mainElement)
-        : super(compiler, new TypeInformationSystem(compiler));
+      : super(compiler, new TypeInformationSystem(compiler));
 
   JavaScriptBackend get backend => compiler.backend;
   Annotations get annotations => backend.annotations;
@@ -629,28 +594,26 @@
    * A set of selector names that [List] implements, that we know return
    * their element type.
    */
-  final Set<Selector> returnsListElementTypeSet = new Set<Selector>.from(
-    <Selector>[
-      new Selector.getter(const PublicName('first')),
-      new Selector.getter(const PublicName('last')),
-      new Selector.getter(const PublicName('single')),
-      new Selector.call(const PublicName('singleWhere'), CallStructure.ONE_ARG),
-      new Selector.call(const PublicName('elementAt'), CallStructure.ONE_ARG),
-      new Selector.index(),
-      new Selector.call(const PublicName('removeAt'), CallStructure.ONE_ARG),
-      new Selector.call(const PublicName('removeLast'), CallStructure.NO_ARGS)
-    ]);
+  final Set<Selector> returnsListElementTypeSet =
+      new Set<Selector>.from(<Selector>[
+    new Selector.getter(const PublicName('first')),
+    new Selector.getter(const PublicName('last')),
+    new Selector.getter(const PublicName('single')),
+    new Selector.call(const PublicName('singleWhere'), CallStructure.ONE_ARG),
+    new Selector.call(const PublicName('elementAt'), CallStructure.ONE_ARG),
+    new Selector.index(),
+    new Selector.call(const PublicName('removeAt'), CallStructure.ONE_ARG),
+    new Selector.call(const PublicName('removeLast'), CallStructure.NO_ARGS)
+  ]);
 
   bool returnsListElementType(Selector selector, TypeMask mask) {
     return mask != null &&
-           mask.isContainer &&
-           returnsListElementTypeSet.contains(selector);
+        mask.isContainer &&
+        returnsListElementTypeSet.contains(selector);
   }
 
   bool returnsMapValueType(Selector selector, TypeMask mask) {
-    return mask != null &&
-           mask.isMap &&
-           selector.isIndex;
+    return mask != null && mask.isMap && selector.isIndex;
   }
 
   void analyzeListAndEnqueue(ListTypeInformation info) {
@@ -700,7 +663,7 @@
 
   void runOverAllElements() {
     if (compiler.disableTypeInference) return;
-    if (compiler.verbose) {
+    if (compiler.options.verbose) {
       compiler.progress.reset();
     }
     sortResolvedElements().forEach((Element element) {
@@ -715,6 +678,9 @@
     });
     reporter.log('Added $addedInGraph elements in inferencing graph.');
 
+    TypeGraphDump dump = debug.PRINT_GRAPH ? new TypeGraphDump(this) : null;
+
+    dump?.beforeAnalysis();
     buildWorkQueue();
     refine();
 
@@ -733,18 +699,17 @@
 
     // Trace closures to potentially infer argument types.
     types.allocatedClosures.forEach((info) {
-
-      void trace(Iterable<FunctionElement> elements,
-                 ClosureTracerVisitor tracer) {
+      void trace(
+          Iterable<FunctionElement> elements, ClosureTracerVisitor tracer) {
         tracer.run();
         if (!tracer.continueAnalyzing) {
           elements.forEach((FunctionElement e) {
             compiler.world.registerMightBePassedToApply(e);
             if (debug.VERBOSE) print("traced closure $e as ${true} (bail)");
             e.functionSignature.forEachParameter((parameter) {
-              types.getInferredTypeOf(parameter).giveUp(
-                  this,
-                  clearAssignments: false);
+              types
+                  .getInferredTypeOf(parameter)
+                  .giveUp(this, clearAssignments: false);
             });
           });
           bailedOutOn.addAll(elements);
@@ -760,7 +725,8 @@
           });
           if (tracer.tracedType.mightBePassedToFunctionApply) {
             compiler.world.registerMightBePassedToApply(e);
-          };
+          }
+          ;
           if (debug.VERBOSE) {
             print("traced closure $e as "
                 "${compiler.world.getMightBePassedToApply(e)}");
@@ -787,9 +753,8 @@
           // We only are interested in functions here, as other targets
           // of this closure call are not a root to trace but an intermediate
           // for some other function.
-          Iterable<FunctionElement> elements =
-              new List<FunctionElement>.from(
-                  info.callees.where((e) => e.isFunction));
+          Iterable<FunctionElement> elements = new List<FunctionElement>.from(
+              info.callees.where((e) => e.isFunction));
           trace(elements, new ClosureTracerVisitor(elements, info, this));
         }
       } else {
@@ -799,6 +764,8 @@
       }
     });
 
+    dump?.beforeTracing();
+
     // Reset all nodes that use lists/maps that have been inferred, as well
     // as nodes that use elements fetched from these lists/maps. The
     // workset for a new run of the analysis will be these nodes.
@@ -818,23 +785,23 @@
     if (debug.PRINT_SUMMARY) {
       types.allocatedLists.values.forEach((ListTypeInformation info) {
         print('${info.type} '
-              'for ${info.originalType.allocationNode} '
-              'at ${info.originalType.allocationElement} '
-              'after ${info.refineCount}');
+            'for ${info.originalType.allocationNode} '
+            'at ${info.originalType.allocationElement} '
+            'after ${info.refineCount}');
       });
       types.allocatedMaps.values.forEach((MapTypeInformation info) {
         print('${info.type} '
-              'for ${info.originalType.allocationNode} '
-              'at ${info.originalType.allocationElement} '
-              'after ${info.refineCount}');
+            'for ${info.originalType.allocationNode} '
+            'at ${info.originalType.allocationElement} '
+            'after ${info.refineCount}');
       });
       types.allocatedClosures.forEach((TypeInformation info) {
         if (info is ElementTypeInformation) {
           print('${types.getInferredSignatureOf(info.element)} for '
-                '${info.element}');
+              '${info.element}');
         } else if (info is ClosureTypeInformation) {
           print('${types.getInferredSignatureOf(info.element)} for '
-                '${info.element}');
+              '${info.element}');
         } else if (info is DynamicCallSiteTypeInformation) {
           for (Element target in info.targets) {
             if (target is FunctionElement) {
@@ -856,6 +823,7 @@
         print('${elem} :: ${type} from ${type.assignments} ');
       });
     }
+    dump?.afterAnalysis();
 
     reporter.log('Inferred $overallRefineCount types.');
 
@@ -885,8 +853,8 @@
           if (type is! ListTypeInformation && type is! MapTypeInformation) {
             // For non-container types, the constant handler does
             // constant folding that could give more precise results.
-            ConstantValue value = compiler.backend.constants
-                .getConstantValueForVariable(element);
+            ConstantValue value =
+                compiler.backend.constants.getConstantValueForVariable(element);
             if (value != null) {
               if (value.isFunction) {
                 FunctionConstantValue functionConstant = value;
@@ -936,8 +904,7 @@
       if (!info.inLoop) return;
       if (info is StaticCallSiteTypeInformation) {
         compiler.world.addFunctionCalledInLoop(info.calledElement);
-      } else if (info.mask != null &&
-                 !info.mask.containsAll(compiler.world)) {
+      } else if (info.mask != null && !info.mask.containsAll(compiler.world)) {
         // For instance methods, we only register a selector called in a
         // loop if it is a typed selector, to avoid marking too many
         // methods as being called from within a loop. This cuts down
@@ -990,12 +957,9 @@
    * wheter assignments must be added or removed. If [init] is false,
    * parameters are added to the work queue.
    */
-  void updateParameterAssignments(TypeInformation caller,
-                                  Element callee,
-                                  ArgumentsTypes arguments,
-                                  Selector selector,
-                                  TypeMask mask,
-                                  {bool remove, bool addToQueue: true}) {
+  void updateParameterAssignments(TypeInformation caller, Element callee,
+      ArgumentsTypes arguments, Selector selector, TypeMask mask,
+      {bool remove, bool addToQueue: true}) {
     if (callee.name == Identifiers.noSuchMethod_) return;
     if (callee.isField) {
       if (selector.isSetter) {
@@ -1045,10 +1009,10 @@
         TypeInformation type = visitingRequiredParameter
             ? arguments.positional[parameterIndex]
             : signature.optionalParametersAreNamed
-              ? arguments.named[parameter.name]
-              : parameterIndex < arguments.positional.length
-                  ? arguments.positional[parameterIndex]
-                  : null;
+                ? arguments.named[parameter.name]
+                : parameterIndex < arguments.positional.length
+                    ? arguments.positional[parameterIndex]
+                    : null;
         if (type == null) type = getDefaultTypeOfParameter(parameter);
         TypeInformation info = types.getInferredTypeOf(parameter);
         if (remove) {
@@ -1068,8 +1032,8 @@
    * a [PlaceholderTypeInformation], which will be replaced. All its uses are
    * updated.
    */
-  void setDefaultTypeOfParameter(ParameterElement parameter,
-                                 TypeInformation type) {
+  void setDefaultTypeOfParameter(
+      ParameterElement parameter, TypeInformation type) {
     assert(parameter.functionDeclaration.isImplementation);
     TypeInformation existing = defaultTypeOfParameter[parameter];
     defaultTypeOfParameter[parameter] = type;
@@ -1126,20 +1090,17 @@
   }
 
   TypeInformation returnTypeOfElement(Element element) {
-    if (element is !FunctionElement) return types.dynamicType;
+    if (element is! FunctionElement) return types.dynamicType;
     return types.getInferredTypeOf(element);
   }
 
-  void recordTypeOfFinalField(Spannable node,
-                              Element analyzed,
-                              Element element,
-                              TypeInformation type) {
+  void recordTypeOfFinalField(
+      Spannable node, Element analyzed, Element element, TypeInformation type) {
     types.getInferredTypeOf(element).addAssignment(type);
   }
 
-  void recordTypeOfNonFinalField(Spannable node,
-                                 Element element,
-                                 TypeInformation type) {
+  void recordTypeOfNonFinalField(
+      Spannable node, Element element, TypeInformation type) {
     types.getInferredTypeOf(element).addAssignment(type);
   }
 
@@ -1159,9 +1120,8 @@
     if (info.assignments.isEmpty) info.addAssignment(type);
   }
 
-  TypeInformation addReturnTypeFor(Element element,
-                                   TypeInformation unused,
-                                   TypeInformation newType) {
+  TypeInformation addReturnTypeFor(
+      Element element, TypeInformation unused, TypeInformation newType) {
     TypeInformation type = types.getInferredTypeOf(element);
     // TODO(ngeoffray): Clean up. We do this check because
     // [SimpleTypesInferrer] deals with two different inferrers.
@@ -1170,17 +1130,24 @@
     return type;
   }
 
-  TypeInformation registerCalledElement(Spannable node,
-                                        Selector selector,
-                                        TypeMask mask,
-                                        Element caller,
-                                        Element callee,
-                                        ArgumentsTypes arguments,
-                                        SideEffects sideEffects,
-                                        bool inLoop) {
+  TypeInformation registerCalledElement(
+      Spannable node,
+      Selector selector,
+      TypeMask mask,
+      Element caller,
+      Element callee,
+      ArgumentsTypes arguments,
+      SideEffects sideEffects,
+      bool inLoop) {
     CallSiteTypeInformation info = new StaticCallSiteTypeInformation(
-          types.currentMember, node, caller, callee, selector, mask, arguments,
-          inLoop);
+        types.currentMember,
+        node,
+        caller,
+        callee,
+        selector,
+        mask,
+        arguments,
+        inLoop);
     // If this class has a 'call' method then we have essentially created a
     // closure here. Register it as such so that it is traced.
     if (selector != null && selector.isCall && callee.isConstructor) {
@@ -1195,18 +1162,18 @@
     return info;
   }
 
-  TypeInformation registerCalledSelector(ast.Node node,
-                                         Selector selector,
-                                         TypeMask mask,
-                                         TypeInformation receiverType,
-                                         Element caller,
-                                         ArgumentsTypes arguments,
-                                         SideEffects sideEffects,
-                                         bool inLoop) {
+  TypeInformation registerCalledSelector(
+      ast.Node node,
+      Selector selector,
+      TypeMask mask,
+      TypeInformation receiverType,
+      Element caller,
+      ArgumentsTypes arguments,
+      SideEffects sideEffects,
+      bool inLoop) {
     if (selector.isClosureCall) {
-      return registerCalledClosure(
-          node, selector, mask, receiverType,
-          caller, arguments, sideEffects, inLoop);
+      return registerCalledClosure(node, selector, mask, receiverType, caller,
+          arguments, sideEffects, inLoop);
     }
 
     compiler.world.allFunctions.filter(selector, mask).forEach((callee) {
@@ -1214,8 +1181,14 @@
     });
 
     CallSiteTypeInformation info = new DynamicCallSiteTypeInformation(
-          types.currentMember, node, caller, selector, mask,
-          receiverType, arguments, inLoop);
+        types.currentMember,
+        node,
+        caller,
+        selector,
+        mask,
+        receiverType,
+        arguments,
+        inLoop);
 
     info.addToGraph(this);
     allocatedCalls.add(info);
@@ -1223,26 +1196,33 @@
   }
 
   TypeInformation registerAwait(ast.Node node, TypeInformation argument) {
-    AwaitTypeInformation info = new AwaitTypeInformation(types.currentMember,
-                                                         node);
+    AwaitTypeInformation info =
+        new AwaitTypeInformation(types.currentMember, node);
     info.addAssignment(argument);
     types.allocatedTypes.add(info);
     return info;
   }
 
-  TypeInformation registerCalledClosure(ast.Node node,
-                                        Selector selector,
-                                        TypeMask mask,
-                                        TypeInformation closure,
-                                        Element caller,
-                                        ArgumentsTypes arguments,
-                                        SideEffects sideEffects,
-                                        bool inLoop) {
+  TypeInformation registerCalledClosure(
+      ast.Node node,
+      Selector selector,
+      TypeMask mask,
+      TypeInformation closure,
+      Element caller,
+      ArgumentsTypes arguments,
+      SideEffects sideEffects,
+      bool inLoop) {
     sideEffects.setDependsOnSomething();
     sideEffects.setAllSideEffects();
     CallSiteTypeInformation info = new ClosureCallSiteTypeInformation(
-          types.currentMember, node, caller, selector, mask, closure, arguments,
-          inLoop);
+        types.currentMember,
+        node,
+        caller,
+        selector,
+        mask,
+        closure,
+        arguments,
+        inLoop);
     info.addToGraph(this);
     allocatedCalls.add(info);
     return info;
@@ -1254,28 +1234,30 @@
   Iterable<Element> sortResolvedElements() {
     int max = 0;
     Map<int, Setlet<Element>> methodSizes = new Map<int, Setlet<Element>>();
-    compiler.enqueuer.resolution.processedElements.forEach((AstElement element) {
-        // TODO(ngeoffray): Not sure why the resolver would put a null
-        // mapping.
-        if (!compiler.enqueuer.resolution.hasBeenProcessed(element)) return;
-        TreeElementMapping mapping = element.resolvedAst.elements;
-        element = element.implementation;
-        if (element.impliesType) return;
-        assert(invariant(element,
-            element.isField ||
-            element.isFunction ||
-            element.isConstructor ||
-            element.isGetter ||
-            element.isSetter,
-            message: 'Unexpected element kind: ${element.kind}'));
-        if (element.isAbstract) return;
-        // Put the other operators in buckets by length, later to be added in
-        // length order.
-        int length = mapping.getSelectorCount();
-        max = length > max ? length : max;
-        Setlet<Element> set = methodSizes.putIfAbsent(
-            length, () => new Setlet<Element>());
-        set.add(element);
+    compiler.enqueuer.resolution.processedElements
+        .forEach((AstElement element) {
+      // TODO(ngeoffray): Not sure why the resolver would put a null
+      // mapping.
+      if (!compiler.enqueuer.resolution.hasBeenProcessed(element)) return;
+      TreeElementMapping mapping = element.resolvedAst.elements;
+      element = element.implementation;
+      if (element.impliesType) return;
+      assert(invariant(
+          element,
+          element.isField ||
+              element.isFunction ||
+              element.isConstructor ||
+              element.isGetter ||
+              element.isSetter,
+          message: 'Unexpected element kind: ${element.kind}'));
+      if (element.isAbstract) return;
+      // Put the other operators in buckets by length, later to be added in
+      // length order.
+      int length = mapping.getSelectorCount();
+      max = length > max ? length : max;
+      Setlet<Element> set =
+          methodSizes.putIfAbsent(length, () => new Setlet<Element>());
+      set.add(element);
     });
 
     List<Element> result = <Element>[];
@@ -1287,14 +1269,28 @@
   }
 
   void clear() {
+    void cleanup(TypeInformation info) => info.cleanup();
+
+    allocatedCalls.forEach(cleanup);
     allocatedCalls.clear();
+
     defaultTypeOfParameter.clear();
-    types.typeInformations.values.forEach((info) => info.clear());
+
+    types.typeInformations.values.forEach(cleanup);
+
+    types.allocatedTypes.forEach(cleanup);
     types.allocatedTypes.clear();
+
     types.concreteTypes.clear();
+
+    types.allocatedClosures.forEach(cleanup);
     types.allocatedClosures.clear();
+
     analyzedElements.clear();
     generativeConstructorsExposingThis.clear();
+
+    types.allocatedMaps.values.forEach(cleanup);
+    types.allocatedLists.values.forEach(cleanup);
   }
 
   Iterable<Element> getCallersOf(Element element) {
@@ -1309,8 +1305,8 @@
   /**
    * Returns the type of [element] when being called with [selector].
    */
-  TypeInformation typeOfElementWithSelector(Element element,
-                                            Selector selector) {
+  TypeInformation typeOfElementWithSelector(
+      Element element, Selector selector) {
     if (element.name == Identifiers.noSuchMethod_ &&
         selector.name != element.name) {
       // An invocation can resolve to a [noSuchMethod], in which case
@@ -1397,8 +1393,7 @@
     if (inferrer.returnsMapValueType(selector, mask)) {
       MapTypeMask mapTypeMask = mask;
       TypeMask valueType = mapTypeMask.valueType;
-      return valueType == null ? compiler.typesTask.dynamicType
-                               : valueType;
+      return valueType == null ? compiler.typesTask.dynamicType : valueType;
     }
 
     TypeMask result = const TypeMask.nonNullEmpty();
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index cbc662c..1815539 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -11,34 +11,26 @@
 import '../compiler.dart' show Compiler;
 import '../constants/values.dart';
 import '../cps_ir/cps_ir_nodes.dart' as cps_ir show Node;
-import '../dart_types.dart' show
-    DartType,
-    FunctionType,
-    InterfaceType,
-    TypeKind;
+import '../dart_types.dart'
+    show DartType, FunctionType, InterfaceType, TypeKind;
 import '../elements/elements.dart';
 import '../native/native.dart' as native;
-import '../tree/tree.dart' as ast show
-    DartString,
-    Node,
-    LiteralBool,
-    Send,
-    SendSet,
-    TryStatement;
-import '../types/types.dart' show
-    ContainerTypeMask,
-    DictionaryTypeMask,
-    MapTypeMask,
-    TypeMask,
-    ValueTypeMask;
+import '../tree/tree.dart' as ast
+    show DartString, Node, LiteralBool, Send, SendSet, TryStatement;
+import '../types/types.dart'
+    show
+        ContainerTypeMask,
+        DictionaryTypeMask,
+        MapTypeMask,
+        TypeMask,
+        ValueTypeMask;
 import '../universe/selector.dart' show Selector;
 import '../util/util.dart' show ImmutableEmptySet, Setlet;
 import '../world.dart' show ClassWorld;
 
 import 'inferrer_visitor.dart' show ArgumentsTypes;
-import 'type_graph_inferrer.dart' show
-    TypeGraphInferrerEngine,
-    TypeInformationSystem;
+import 'type_graph_inferrer.dart'
+    show TypeGraphInferrerEngine, TypeInformationSystem;
 import 'debug.dart' as debug;
 
 /**
@@ -69,7 +61,7 @@
   final MemberTypeInformation context;
 
   /// The element this [TypeInformation] node belongs to.
-  MemberElement get contextMember => context == null ? null : context.element;
+  TypedElement get contextMember => context == null ? null : context.element;
 
   Iterable<TypeInformation> get assignments => _assignments;
 
@@ -105,8 +97,9 @@
 
   bool get isConcrete => false;
 
-  TypeInformation(this.context) : _assignments = <TypeInformation>[],
-                                  users = new Setlet<TypeInformation>();
+  TypeInformation(this.context)
+      : _assignments = <TypeInformation>[],
+        users = new Setlet<TypeInformation>();
 
   TypeInformation.noAssignments(this.context)
       : _assignments = const <TypeInformation>[],
@@ -220,7 +213,9 @@
   }
 
   void removeAndClearReferences(TypeGraphInferrerEngine inferrer) {
-    assignments.forEach((info) { info.removeUser(this); });
+    assignments.forEach((info) {
+      info.removeUser(this);
+    });
   }
 
   void stabilize(TypeGraphInferrerEngine inferrer) {
@@ -237,6 +232,12 @@
     abandonInferencing = false;
     doNotEnqueue = false;
   }
+
+  /// Destroys information not needed after type inference.
+  void cleanup() {
+    users = null;
+    _assignments = null;
+  }
 }
 
 abstract class ApplyableTypeInformation implements TypeInformation {
@@ -273,8 +274,7 @@
  * called.
  */
 class ParameterAssignments extends IterableBase<TypeInformation> {
-  final Map<TypeInformation, int> assignments =
-      new Map<TypeInformation, int>();
+  final Map<TypeInformation, int> assignments = new Map<TypeInformation, int>();
 
   void remove(TypeInformation info) {
     int existing = assignments[info];
@@ -359,8 +359,8 @@
 
   ElementTypeInformation._internal(MemberTypeInformation context, this.element)
       : super(context);
-  ElementTypeInformation._withAssignments(MemberTypeInformation context,
-      this.element, assignments)
+  ElementTypeInformation._withAssignments(
+      MemberTypeInformation context, this.element, assignments)
       : super.withAssignments(context, assignments);
 }
 
@@ -385,6 +385,10 @@
    */
   int closurizedCount = 0;
 
+  // Strict `bool` value is computed in cleanup(). Also used as a flag to see if
+  // cleanup has been called.
+  bool _isCalledOnce = null;
+
   /**
    * This map contains the callers of [element]. It stores all unique call sites
    * to enable counting the global number of call sites of [element].
@@ -392,18 +396,23 @@
    * A call site is either an AST [ast.Node], a [cps_ir.Node] or in the case of
    * synthesized calls, an [Element] (see uses of [synthesizeForwardingCall]
    * in [SimpleTypeInferrerVisitor]).
+   *
+   * The global information is summarized in [cleanup], after which [_callers]
+   * is set to `null`.
    */
-  final Map<Element, Setlet<Spannable>> _callers = new Map<Element, Setlet>();
+  Map<Element, Setlet<Spannable>> _callers;
 
   MemberTypeInformation._internal(Element element)
       : super._internal(null, element);
 
   void addCall(Element caller, Spannable node) {
     assert(node is ast.Node || node is cps_ir.Node || node is Element);
+    _callers ??= <Element, Setlet>{};
     _callers.putIfAbsent(caller, () => new Setlet()).add(node);
   }
 
   void removeCall(Element caller, node) {
+    if (_callers == null) return;
     Setlet calls = _callers[caller];
     if (calls == null) return;
     calls.remove(node);
@@ -412,9 +421,27 @@
     }
   }
 
-  Iterable<Element> get callers => _callers.keys;
+  Iterable<Element> get callers {
+    // TODO(sra): This is called only from an unused API and a test. If it
+    // becomes used, [cleanup] will need to copy `_caller.keys`.
+
+    // `simple_inferrer_callers_test.dart` ensures that cleanup has not
+    // happened.
+    return _callers.keys;
+  }
 
   bool isCalledOnce() {
+    // If this assert fires it means that this MemberTypeInformation for the
+    // element was not part of type inference. This happens for
+    // ConstructorBodyElements, so guard the call with a test for
+    // ConstructorBodyElement. For other elements, investigate why the element
+    // was not present for type inference.
+    assert(_isCalledOnce != null);
+    return _isCalledOnce ?? false;
+  }
+
+  bool _computeIsCalledOnce() {
+    if (_callers == null) return false;
     int count = 0;
     for (var set in _callers.values) {
       count += set.length;
@@ -434,7 +461,7 @@
   TypeMask handleSpecialCases(TypeGraphInferrerEngine inferrer) {
     if (element.isField &&
         (!inferrer.backend.canBeUsedForGlobalOptimizations(element) ||
-         inferrer.annotations.assumeDynamic(element))) {
+            inferrer.annotations.assumeDynamic(element))) {
       // Do not infer types for fields that have a corresponding annotation or
       // are assigned by synthesized calls
 
@@ -447,20 +474,24 @@
       // goes in the work queue.
       giveUp(inferrer);
       if (element.isField) {
-        return inferrer.typeOfNativeBehavior(
-            native.NativeBehavior.ofFieldLoad(element, inferrer.compiler)).type;
+        return inferrer
+            .typeOfNativeBehavior(
+                native.NativeBehavior.ofFieldLoad(element, inferrer.compiler))
+            .type;
       } else {
         assert(element.isFunction ||
-               element.isGetter ||
-               element.isSetter ||
-               element.isConstructor);
+            element.isGetter ||
+            element.isSetter ||
+            element.isConstructor);
         TypedElement typedElement = element;
         var elementType = typedElement.type;
         if (elementType.kind != TypeKind.FUNCTION) {
           return safeType(inferrer);
         } else {
-          return inferrer.typeOfNativeBehavior(
-              native.NativeBehavior.ofMethod(element, inferrer.compiler)).type;
+          return inferrer
+              .typeOfNativeBehavior(
+                  native.NativeBehavior.ofMethod(element, inferrer.compiler))
+              .type;
         }
       }
     }
@@ -479,24 +510,22 @@
     return null;
   }
 
-  TypeMask potentiallyNarrowType(TypeMask mask,
-                                 TypeGraphInferrerEngine inferrer) {
+  TypeMask potentiallyNarrowType(
+      TypeMask mask, TypeGraphInferrerEngine inferrer) {
     Compiler compiler = inferrer.compiler;
-    if (!compiler.trustTypeAnnotations &&
-        !compiler.enableTypeAssertions &&
+    if (!compiler.options.trustTypeAnnotations &&
+        !compiler.options.enableTypeAssertions &&
         !inferrer.annotations.trustTypeAnnotations(element)) {
       return mask;
     }
-    if (element.isGenerativeConstructor ||
-        element.isSetter) {
+    if (element.isGenerativeConstructor || element.isSetter) {
       return mask;
     }
     if (element.isField) {
       return _narrowType(compiler, mask, element.type);
     }
-    assert(element.isFunction ||
-           element.isGetter ||
-           element.isFactoryConstructor);
+    assert(
+        element.isFunction || element.isGetter || element.isFactoryConstructor);
 
     FunctionType type = element.type;
     return _narrowType(compiler, mask, type.returnType);
@@ -530,6 +559,14 @@
 
     return super.hasStableType(inferrer);
   }
+
+  void cleanup() {
+    // This node is on multiple lists so cleanup() can be called twice.
+    if (_isCalledOnce != null) return;
+    _isCalledOnce = _computeIsCalledOnce();
+    _callers = null;
+    super.cleanup();
+  }
 }
 
 /**
@@ -545,19 +582,19 @@
   ParameterElement get element => super.element;
   FunctionElement get declaration => element.functionDeclaration;
 
-  ParameterTypeInformation._internal(ParameterElement element,
-                                     TypeInformationSystem types)
-      : super._internal(types.getInferredTypeOf(element.functionDeclaration),
-                        element) {
+  ParameterTypeInformation._internal(
+      ParameterElement element, TypeInformationSystem types)
+      : super._internal(
+            types.getInferredTypeOf(element.functionDeclaration), element) {
     assert(!element.functionDeclaration.isInstanceMember);
   }
 
-  ParameterTypeInformation._instanceMember(ParameterElement element,
-                                           TypeInformationSystem types)
+  ParameterTypeInformation._instanceMember(
+      ParameterElement element, TypeInformationSystem types)
       : super._withAssignments(
-          types.getInferredTypeOf(element.functionDeclaration),
-          element,
-          new ParameterAssignments()) {
+            types.getInferredTypeOf(element.functionDeclaration),
+            element,
+            new ParameterAssignments()) {
     assert(element.functionDeclaration.isInstanceMember);
   }
 
@@ -596,8 +633,8 @@
     }
     if (declaration.isInstanceMember &&
         (declaration.name == Identifiers.noSuchMethod_ ||
-        (declaration.name == Identifiers.call &&
-         disableInferenceForClosures))) {
+            (declaration.name == Identifiers.call &&
+                disableInferenceForClosures))) {
       // Do not infer types for parameters of [noSuchMethod] and
       // [call] instance methods.
       giveUp(inferrer);
@@ -620,25 +657,25 @@
     return null;
   }
 
-  TypeMask potentiallyNarrowType(TypeMask mask,
-                                 TypeGraphInferrerEngine inferrer) {
+  TypeMask potentiallyNarrowType(
+      TypeMask mask, TypeGraphInferrerEngine inferrer) {
     Compiler compiler = inferrer.compiler;
-    if (!compiler.trustTypeAnnotations &&
+    if (!compiler.options.trustTypeAnnotations &&
         !inferrer.annotations.trustTypeAnnotations(declaration)) {
       return mask;
     }
     // When type assertions are enabled (aka checked mode), we have to always
     // ignore type annotations to ensure that the checks are actually inserted
     // into the function body and retained until runtime.
-    assert(!compiler.enableTypeAssertions);
+    assert(!compiler.options.enableTypeAssertions);
     return _narrowType(compiler, mask, element.type);
   }
 
   TypeMask computeType(TypeGraphInferrerEngine inferrer) {
     TypeMask special = handleSpecialCases(inferrer);
     if (special != null) return special;
-    return potentiallyNarrowType(inferrer.types.computeTypeMask(assignments),
-                                 inferrer);
+    return potentiallyNarrowType(
+        inferrer.types.computeTypeMask(assignments), inferrer);
   }
 
   TypeMask safeType(TypeGraphInferrerEngine inferrer) {
@@ -680,14 +717,9 @@
   final ArgumentsTypes arguments;
   final bool inLoop;
 
-  CallSiteTypeInformation(
-      MemberTypeInformation context,
-      this.call,
-      this.caller,
-      this.selector,
-      this.mask,
-      this.arguments,
-      this.inLoop) : super.noAssignments(context);
+  CallSiteTypeInformation(MemberTypeInformation context, this.call, this.caller,
+      this.selector, this.mask, this.arguments, this.inLoop)
+      : super.noAssignments(context);
 
   String toString() => 'Call site $call $type';
 
@@ -721,8 +753,8 @@
       arguments.forEach((info) => info.addUser(this));
     }
     inferrer.updateParameterAssignments(
-        this, calledElement, arguments, selector, mask, remove: false,
-        addToQueue: false);
+        this, calledElement, arguments, selector, mask,
+        remove: false, addToQueue: false);
   }
 
   bool get isSynthesized {
@@ -767,6 +799,7 @@
 
 class DynamicCallSiteTypeInformation extends CallSiteTypeInformation {
   final TypeInformation receiver;
+
   /// Cached targets of this call.
   Iterable<Element> targets;
 
@@ -794,8 +827,8 @@
       callee.addCall(caller, call);
       callee.addUser(this);
       inferrer.updateParameterAssignments(
-          this, element, arguments, selector, typeMask, remove: false,
-          addToQueue: false);
+          this, element, arguments, selector, typeMask,
+          remove: false, addToQueue: false);
     }
   }
 
@@ -806,7 +839,8 @@
 
     if (mask != receiverType) {
       return receiverType == inferrer.compiler.typesTask.dynamicType
-          ? null : receiverType;
+          ? null
+          : receiverType;
     } else {
       return mask;
     }
@@ -815,9 +849,9 @@
   bool targetsIncludeComplexNoSuchMethod(TypeGraphInferrerEngine inferrer) {
     return targets.any((Element e) {
       return e is FunctionElement &&
-             e.isInstanceMember &&
-             e.name == Identifiers.noSuchMethod_ &&
-             inferrer.backend.isComplexNoSuchMethod(e);
+          e.isInstanceMember &&
+          e.name == Identifiers.noSuchMethod_ &&
+          inferrer.backend.isComplexNoSuchMethod(e);
     });
   }
 
@@ -827,12 +861,10 @@
    * example, we know int + int returns an int. The Dart code for
    * [int.operator+] only says it returns a [num].
    */
-  TypeInformation handleIntrisifiedSelector(Selector selector,
-                                            TypeMask mask,
-                                            TypeGraphInferrerEngine inferrer) {
+  TypeInformation handleIntrisifiedSelector(
+      Selector selector, TypeMask mask, TypeGraphInferrerEngine inferrer) {
     ClassWorld classWorld = inferrer.classWorld;
     if (!classWorld.backend.intImplementation.isResolved) return null;
-    TypeMask emptyType = const TypeMask.nonNullEmpty();
     if (mask == null) return null;
     if (!mask.containsOnlyInt(classWorld)) {
       return null;
@@ -843,13 +875,13 @@
 
     ClassElement uint31Implementation = classWorld.backend.uint31Implementation;
     bool isInt(info) => info.type.containsOnlyInt(classWorld);
-    bool isEmpty(info) => info.type == emptyType;
+    bool isEmpty(info) => info.type.isEmpty;
     bool isUInt31(info) {
       return info.type.satisfies(uint31Implementation, classWorld);
     }
     bool isPositiveInt(info) {
-      return info.type.satisfies(
-          classWorld.backend.positiveIntImplementation, classWorld);
+      return info.type
+          .satisfies(classWorld.backend.positiveIntImplementation, classWorld);
     }
 
     String name = selector.name;
@@ -857,12 +889,16 @@
     // Dart code, for example:
     // int + int -> int
     // uint31 | uint31 -> uint31
-    if (name == '*' || name == '+' || name == '%' || name == 'remainder' ||
+    if (name == '*' ||
+        name == '+' ||
+        name == '%' ||
+        name == 'remainder' ||
         name == '~/') {
       if (isPositiveInt(receiver) &&
           arguments.hasOnePositionalArgumentThatMatches(isPositiveInt)) {
         // uint31 + uint31 -> uint32
-        if (name == '+' && isUInt31(receiver) &&
+        if (name == '+' &&
+            isUInt31(receiver) &&
             arguments.hasOnePositionalArgumentThatMatches(isUInt31)) {
           return inferrer.types.uint32Type;
         } else {
@@ -914,8 +950,7 @@
     Compiler compiler = inferrer.compiler;
     TypeMask maskToUse =
         compiler.world.extendMaskIfReachesAll(selector, typeMask);
-    bool canReachAll = compiler.enabledInvokeOn &&
-        (maskToUse != typeMask);
+    bool canReachAll = compiler.enabledInvokeOn && (maskToUse != typeMask);
 
     // If this call could potentially reach all methods that satisfy
     // the untyped selector (through noSuchMethod's `Invocation`
@@ -926,28 +961,34 @@
         ? compiler.world.allFunctions.filter(selector, typeMask)
         : targets;
 
-    // Add calls to new targets to the graph.
-    targets.where((target) => !oldTargets.contains(target)).forEach((element) {
-      MemberTypeInformation callee =
-          inferrer.types.getInferredTypeOf(element);
-      callee.addCall(caller, call);
-      callee.addUser(this);
-      inferrer.updateParameterAssignments(
-          this, element, arguments, selector, typeMask, remove: false,
-          addToQueue: true);
-    });
+    // Update the call graph if the targets could have changed.
+    if (!identical(targets, oldTargets)) {
+      // Add calls to new targets to the graph.
+      targets
+          .where((target) => !oldTargets.contains(target))
+          .forEach((element) {
+        MemberTypeInformation callee =
+            inferrer.types.getInferredTypeOf(element);
+        callee.addCall(caller, call);
+        callee.addUser(this);
+        inferrer.updateParameterAssignments(
+            this, element, arguments, selector, typeMask,
+            remove: false, addToQueue: true);
+      });
 
-    // Walk over the old targets, and remove calls that cannot happen
-    // anymore.
-    oldTargets.where((target) => !targets.contains(target)).forEach((element) {
-      MemberTypeInformation callee =
-          inferrer.types.getInferredTypeOf(element);
-      callee.removeCall(caller, call);
-      callee.removeUser(this);
-      inferrer.updateParameterAssignments(
-          this, element, arguments, selector, typeMask, remove: true,
-          addToQueue: true);
-    });
+      // Walk over the old targets, and remove calls that cannot happen anymore.
+      oldTargets
+          .where((target) => !targets.contains(target))
+          .forEach((element) {
+        MemberTypeInformation callee =
+            inferrer.types.getInferredTypeOf(element);
+        callee.removeCall(caller, call);
+        callee.removeUser(this);
+        inferrer.updateParameterAssignments(
+            this, element, arguments, selector, typeMask,
+            remove: true, addToQueue: true);
+      });
+    }
 
     // Walk over the found targets, and compute the joined union type mask
     // for all these targets.
@@ -974,7 +1015,7 @@
           if (dictionaryTypeMask.typeMap.containsKey(key)) {
             if (debug.VERBOSE) {
               print("Dictionary lookup for $key yields "
-                    "${dictionaryTypeMask.typeMap[key]}.");
+                  "${dictionaryTypeMask.typeMap[key]}.");
             }
             return dictionaryTypeMask.typeMap[key];
           } else {
@@ -988,8 +1029,7 @@
         }
         MapTypeMask mapTypeMask = typeMask;
         if (debug.VERBOSE) {
-          print(
-              "Map lookup for $selector yields ${mapTypeMask.valueType}.");
+          print("Map lookup for $selector yields ${mapTypeMask.valueType}.");
         }
         return mapTypeMask.valueType;
       } else {
@@ -1021,8 +1061,8 @@
               inferrer.types.getInferredTypeOf(element);
           callee.addCall(caller, call);
           inferrer.updateParameterAssignments(
-              this, element, arguments, selector, mask, remove: false,
-              addToQueue: true);
+              this, element, arguments, selector, mask,
+              remove: false, addToQueue: true);
         }
       }
     }
@@ -1125,8 +1165,7 @@
     // needs to notify its users.
   }
 
-  void removeUser(TypeInformation user) {
-  }
+  void removeUser(TypeInformation user) {}
 
   void addAssignment(TypeInformation assignment) {
     throw "Not supported";
@@ -1215,8 +1254,8 @@
 
   TypeMask computeType(TypeGraphInferrerEngine inferrer) {
     TypeMask input = assignments.first.type;
-    TypeMask intersection = input.intersection(typeAnnotation,
-        inferrer.classWorld);
+    TypeMask intersection =
+        input.intersection(typeAnnotation, inferrer.classWorld);
     if (debug.ANOMALY_WARN) {
       if (!input.containsMask(intersection, inferrer.classWorld) ||
           !typeAnnotation.containsMask(intersection, inferrer.classWorld)) {
@@ -1246,8 +1285,8 @@
   /** Whether the element type in that container has been inferred. */
   bool inferred = false;
 
-  InferredTypeInformation(MemberTypeInformation context,
-                          TypeInformation parentType)
+  InferredTypeInformation(
+      MemberTypeInformation context, TypeInformation parentType)
       : super(context) {
     if (parentType != null) addAssignment(parentType);
   }
@@ -1266,8 +1305,7 @@
  * A [ListTypeInformation] is a [TypeInformation] created
  * for each `List` instantiations.
  */
-class ListTypeInformation extends TypeInformation
-    with TracedTypeInformation {
+class ListTypeInformation extends TypeInformation with TracedTypeInformation {
   final ElementInContainerTypeInformation elementType;
 
   /** The container type before it is inferred. */
@@ -1285,10 +1323,8 @@
    */
   bool checksGrowable = true;
 
-  ListTypeInformation(MemberTypeInformation context,
-                      this.originalType,
-                      this.elementType,
-                      this.originalLength)
+  ListTypeInformation(MemberTypeInformation context, this.originalType,
+      this.elementType, this.originalLength)
       : super(context) {
     type = originalType;
     inferredLength = originalType.length;
@@ -1310,16 +1346,23 @@
     if (!mask.isContainer ||
         mask.elementType != elementType.type ||
         mask.length != inferredLength) {
-      return new ContainerTypeMask(originalType.forwardTo,
-                                   originalType.allocationNode,
-                                   originalType.allocationElement,
-                                   elementType.type,
-                                   inferredLength);
+      return new ContainerTypeMask(
+          originalType.forwardTo,
+          originalType.allocationNode,
+          originalType.allocationElement,
+          elementType.type,
+          inferredLength);
     }
     return mask;
   }
 
   TypeMask safeType(TypeGraphInferrerEngine inferrer) => originalType;
+
+  void cleanup() {
+    super.cleanup();
+    elementType.cleanup();
+    _flowsInto = null;
+  }
 }
 
 /**
@@ -1327,8 +1370,7 @@
  * elements in a [ListTypeInformation].
  */
 class ElementInContainerTypeInformation extends InferredTypeInformation {
-  ElementInContainerTypeInformation(MemberTypeInformation context,
-      elementType)
+  ElementInContainerTypeInformation(MemberTypeInformation context, elementType)
       : super(context, elementType);
 
   String toString() => 'Element in container $type';
@@ -1342,8 +1384,7 @@
  * A [MapTypeInformation] is a [TypeInformation] created
  * for maps.
  */
-class MapTypeInformation extends TypeInformation
-    with TracedTypeInformation {
+class MapTypeInformation extends TypeInformation with TracedTypeInformation {
   // When in Dictionary mode, this map tracks the type of the values that
   // have been assigned to a specific [String] key.
   final Map<String, ValueInMapTypeInformation> typeInfoMap = {};
@@ -1357,25 +1398,22 @@
 
   bool get inDictionaryMode => !bailedOut && _allKeysAreStrings;
 
-  MapTypeInformation(MemberTypeInformation context,
-                     this.originalType,
-                     this.keyType,
-                     this.valueType)
+  MapTypeInformation(MemberTypeInformation context, this.originalType,
+      this.keyType, this.valueType)
       : super(context) {
     keyType.addUser(this);
     valueType.addUser(this);
     type = originalType;
   }
 
-  TypeInformation addEntryAssignment(TypeInformation key,
-                                     TypeInformation value,
-                                     [bool nonNull = false]) {
+  TypeInformation addEntryAssignment(TypeInformation key, TypeInformation value,
+      [bool nonNull = false]) {
     TypeInformation newInfo = null;
     if (_allKeysAreStrings && key is StringLiteralTypeInformation) {
       String keyString = key.asString();
       typeInfoMap.putIfAbsent(keyString, () {
-          newInfo = new ValueInMapTypeInformation(context, null, nonNull);
-          return newInfo;
+        newInfo = new ValueInMapTypeInformation(context, null, nonNull);
+        return newInfo;
       });
       typeInfoMap[keyString].addAssignment(value);
     } else {
@@ -1430,18 +1468,20 @@
       for (var key in typeInfoMap.keys) {
         mappings[key] = typeInfoMap[key].type;
       }
-      return new DictionaryTypeMask(originalType.forwardTo,
-                                    originalType.allocationNode,
-                                    originalType.allocationElement,
-                                    keyType.type,
-                                    valueType.type,
-                                    mappings);
+      return new DictionaryTypeMask(
+          originalType.forwardTo,
+          originalType.allocationNode,
+          originalType.allocationElement,
+          keyType.type,
+          valueType.type,
+          mappings);
     } else {
-      return new MapTypeMask(originalType.forwardTo,
-                             originalType.allocationNode,
-                             originalType.allocationElement,
-                             keyType.type,
-                             valueType.type);
+      return new MapTypeMask(
+          originalType.forwardTo,
+          originalType.allocationNode,
+          originalType.allocationElement,
+          keyType.type,
+          valueType.type);
     }
   }
 
@@ -1464,8 +1504,7 @@
       }
     } else if (type.isMap) {
       MapTypeMask mask = type;
-      if (mask.keyType != keyType.type ||
-          mask.valueType != valueType.type) {
+      if (mask.keyType != keyType.type || mask.valueType != valueType.type) {
         return toTypeMask(inferrer);
       }
     } else {
@@ -1479,8 +1518,18 @@
 
   bool hasStableType(TypeGraphInferrerEngine inferrer) {
     return keyType.isStable &&
-           valueType.isStable &&
-           super.hasStableType(inferrer);
+        valueType.isStable &&
+        super.hasStableType(inferrer);
+  }
+
+  void cleanup() {
+    super.cleanup();
+    keyType.cleanup();
+    valueType.cleanup();
+    for (TypeInformation info in typeInfoMap.values) {
+      info.cleanup();
+    }
+    _flowsInto = null;
   }
 
   String toString() {
@@ -1493,8 +1542,8 @@
  * for the keys in a [MapTypeInformation]
  */
 class KeyInMapTypeInformation extends InferredTypeInformation {
-  KeyInMapTypeInformation(MemberTypeInformation context,
-      TypeInformation keyType)
+  KeyInMapTypeInformation(
+      MemberTypeInformation context, TypeInformation keyType)
       : super(context, keyType);
 
   accept(TypeInformationVisitor visitor) {
@@ -1514,8 +1563,9 @@
   // mode can ever be marked as [nonNull].
   final bool nonNull;
 
-  ValueInMapTypeInformation(MemberTypeInformation context,
-      TypeInformation valueType, [this.nonNull = false])
+  ValueInMapTypeInformation(
+      MemberTypeInformation context, TypeInformation valueType,
+      [this.nonNull = false])
       : super(context, valueType);
 
   accept(TypeInformationVisitor visitor) {
@@ -1523,8 +1573,9 @@
   }
 
   TypeMask computeType(TypeGraphInferrerEngine inferrer) {
-    return nonNull ? super.computeType(inferrer)
-                   : super.computeType(inferrer).nullable();
+    return nonNull
+        ? super.computeType(inferrer)
+        : super.computeType(inferrer).nullable();
   }
 
   String toString() => 'Value in Map $type';
@@ -1540,7 +1591,7 @@
   final Local variable;
 
   PhiElementTypeInformation(MemberTypeInformation context, this.branchNode,
-                            this.isLoopPhi, this.variable)
+      this.isLoopPhi, this.variable)
       : super(context);
 
   TypeMask computeType(TypeGraphInferrerEngine inferrer) {
@@ -1559,8 +1610,7 @@
   final ast.Node node;
   final Element element;
 
-  ClosureTypeInformation(MemberTypeInformation context, this.node,
-                         this.element)
+  ClosureTypeInformation(MemberTypeInformation context, this.node, this.element)
       : super(context);
 
   TypeMask computeType(TypeGraphInferrerEngine inferrer) => safeType(inferrer);
@@ -1586,6 +1636,7 @@
 abstract class TracedTypeInformation implements TypeInformation {
   /// Set to false once analysis has succeeded.
   bool bailedOut = true;
+
   /// Set to true once analysis is completed.
   bool analyzed = false;
 
@@ -1596,8 +1647,9 @@
    * flow in.
    */
   Set<TypeInformation> get flowsInto {
-    return (_flowsInto == null) ? const ImmutableEmptySet<TypeInformation>()
-                                : _flowsInto;
+    return (_flowsInto == null)
+        ? const ImmutableEmptySet<TypeInformation>()
+        : _flowsInto;
   }
 
   /**
diff --git a/pkg/compiler/lib/src/info/naive_analysis_result.dart b/pkg/compiler/lib/src/info/naive_analysis_result.dart
index 0061be4..d18dc91 100644
--- a/pkg/compiler/lib/src/info/naive_analysis_result.dart
+++ b/pkg/compiler/lib/src/info/naive_analysis_result.dart
@@ -17,9 +17,9 @@
   NaiveAnalysisResult();
 
   ReceiverInfo infoForReceiver(Node receiver) =>
-    new NaiveReceiverInfo(receiver);
+      new NaiveReceiverInfo(receiver);
   SelectorInfo infoForSelector(Node receiver, Selector selector) =>
-    new NaiveSelectorInfo(receiver, selector);
+      new NaiveSelectorInfo(receiver, selector);
 }
 
 class NaiveReceiverInfo implements ReceiverInfo {
diff --git a/pkg/compiler/lib/src/info/send_info.dart b/pkg/compiler/lib/src/info/send_info.dart
index 96e0e98..b0f5f1e 100644
--- a/pkg/compiler/lib/src/info/send_info.dart
+++ b/pkg/compiler/lib/src/info/send_info.dart
@@ -5,33 +5,23 @@
 /// Computes measurements about sends in a function.
 library compiler.src.info.send_info;
 
-import 'dart:convert';
-
 import 'package:dart2js_info/src/measurements.dart';
-import 'package:dart2js_info/src/util.dart' show
-    recursiveDiagnosticString;
+import 'package:dart2js_info/src/util.dart' show recursiveDiagnosticString;
 
 import '../common.dart';
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../dart_types.dart';
 import '../closure.dart';
 import '../elements/elements.dart';
-import '../elements/visitor.dart' show
-    ElementVisitor;
+import '../elements/visitor.dart' show ElementVisitor;
 import '../resolution/operators.dart';
 import '../resolution/semantic_visitor.dart';
 import '../resolution/tree_elements.dart';
 import '../constants/expressions.dart';
-import '../parser/partial_elements.dart' show
-    PartialElement;
+import '../parser/partial_elements.dart' show PartialElement;
 import '../tree/tree.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
 
 import 'analysis_result.dart';
 import 'naive_analysis_result.dart';
@@ -39,8 +29,7 @@
 
 /// Collects a set of [Measurements] about send expressions in the function [f].
 // TODO(sigmund): collect information on initializers too.
-Measurements collectSendMeasurements(FunctionElement f,
-                                     Compiler compiler) {
+Measurements collectSendMeasurements(FunctionElement f, Compiler compiler) {
   DiagnosticReporter reporter = compiler.reporter;
   return reporter.withCurrentElement(f, () {
     // TODO(sigmund): enable for platform too.
@@ -48,7 +37,7 @@
     var name = _qualifiedName(f);
     if (!f.hasNode) {
       if (f is PartialElement) return const Measurements.unreachableFunction();
-      assert (f is ConstructorElement && f.isSynthesized);
+      assert(f is ConstructorElement && f.isSynthesized);
       // TODO(sigmund): measure synthethic forwarding sends, measure
       // initializers
       return new Measurements.reachableFunction();
@@ -64,12 +53,11 @@
     }
     var def = resolvedAst.elements.getFunctionDefinition(resolvedAst.node);
     if (def == null) {
-      assert (f is PartialElement);
+      assert(f is PartialElement);
       return const Measurements.unreachableFunction();
     }
 
-    var visitor = new _StatsTraversalVisitor(
-        compiler, resolvedAst.elements,
+    var visitor = new _StatsTraversalVisitor(compiler, resolvedAst.elements,
         reporter.spanFromSpannable(resolvedAst.node).uri);
     resolvedAst.node.accept(visitor);
     return visitor.measurements;
@@ -85,7 +73,6 @@
 class _StatsVisitor<T> extends Visitor
     with SemanticSendResolvedMixin<dynamic, T>
     implements SemanticSendVisitor<dynamic, T> {
-
   // TODO(sigmund): consider passing in several AnalysisResults at once, so we
   // can compute the different metrics together.
   /// Information we know about the program from static analysis.
@@ -112,9 +99,9 @@
     measurements.record(Metric.send, span.begin, span.end);
     if (node is SendSet) {
       if ((node.assignmentOperator != null &&
-                node.assignmentOperator.source != '=') ||
-            node.isPrefix ||
-            node.isPostfix) {
+              node.assignmentOperator.source != '=') ||
+          node.isPrefix ||
+          node.isPostfix) {
         assert(!node.isIfNullAssignment);
         // We count get and set separately in case one of them is defined by the
         // other could be a nSM error.
@@ -228,11 +215,13 @@
     measurements.record(Metric.monomorphicSend, span.begin, span.end);
     measurements.record(Metric.superSend, span.begin, span.end);
   }
+
   handleTypeVariable(Node node) {
     var span = reporter.spanFromSpannable(node);
     measurements.record(Metric.monomorphicSend, span.begin, span.end);
     measurements.record(Metric.typeVariableSend, span.begin, span.end);
   }
+
   handleStatic(Node node) {
     var span = reporter.spanFromSpannable(node);
     measurements.record(Metric.monomorphicSend, span.begin, span.end);
@@ -292,7 +281,7 @@
     Boolish usesInterceptor = selectorInfo.usesInterceptor;
     if (hasSelector == Boolish.yes) {
       if (selectorInfo.isAccurate && selectorInfo.possibleTargets == 1) {
-        assert (usesInterceptor != Boolish.maybe);
+        assert(usesInterceptor != Boolish.maybe);
         if (usesInterceptor == Boolish.yes) {
           handleSingleInterceptor(node);
         } else {
@@ -334,9 +323,13 @@
 
   // Constructors
 
-  void visitAbstractClassConstructorInvoke(NewExpression node,
-      ConstructorElement element, InterfaceType type, NodeList arguments,
-      CallStructure callStructure, T arg) {
+  void visitAbstractClassConstructorInvoke(
+      NewExpression node,
+      ConstructorElement element,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleConstructor(node);
   }
 
@@ -350,9 +343,13 @@
     handleConstructor(node);
   }
 
-  void visitGenerativeConstructorInvoke(NewExpression node,
-      ConstructorElement constructor, InterfaceType type, NodeList arguments,
-      CallStructure callStructure, T arg) {
+  void visitGenerativeConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleConstructor(node);
   }
 
@@ -361,16 +358,25 @@
     handleConstructor(node);
   }
 
-  void visitRedirectingFactoryConstructorInvoke(NewExpression node,
-      ConstructorElement constructor, InterfaceType type,
-      ConstructorElement effectiveTarget, InterfaceType effectiveTargetType,
-      NodeList arguments, CallStructure callStructure, T arg) {
+  void visitRedirectingFactoryConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      ConstructorElement effectiveTarget,
+      InterfaceType effectiveTargetType,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleConstructor(node);
   }
 
-  void visitRedirectingGenerativeConstructorInvoke(NewExpression node,
-      ConstructorElement constructor, InterfaceType type, NodeList arguments,
-      CallStructure callStructure, T arg) {
+  void visitRedirectingGenerativeConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleConstructor(node);
   }
 
@@ -381,7 +387,6 @@
 
   // Dynamic sends
 
-
   // TODO(sigmund): many many things to add:
   // -- support for operators, indexers, etc.
   // -- logic about nullables
@@ -400,16 +405,14 @@
     handleIndex(node); // receiver[index] = t2
   }
 
-  void visitDynamicPropertyCompound(Send node, Node receiver,
-      Name name, AssignmentOperator operator, Node rhs, T arg) {
+  void visitDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, T arg) {
     handleDynamicProperty(node, receiver, new Selector.getter(name));
     handleOperator(node);
     handleDynamicProperty(node, receiver, new Selector.setter(name));
   }
 
-
-  void visitDynamicPropertyGet(
-      Send node, Node receiver, Name name, T arg) {
+  void visitDynamicPropertyGet(Send node, Node receiver, Name name, T arg) {
     handleDynamicProperty(node, receiver, new Selector.getter(name));
   }
 
@@ -418,15 +421,15 @@
     handleDynamicProperty(node, receiver, selector);
   }
 
-  void visitDynamicPropertyPostfix(Send node, Node receiver,
-       Name name, IncDecOperator operator, T arg) {
+  void visitDynamicPropertyPostfix(
+      Send node, Node receiver, Name name, IncDecOperator operator, T arg) {
     handleDynamicProperty(node, receiver, new Selector.getter(name));
     handleOperator(node);
     handleDynamicProperty(node, receiver, new Selector.setter(name));
   }
 
-  void visitDynamicPropertyPrefix(Send node, Node receiver, Name name,
-      IncDecOperator operator, T arg) {
+  void visitDynamicPropertyPrefix(
+      Send node, Node receiver, Name name, IncDecOperator operator, T arg) {
     handleDynamicProperty(node, receiver, new Selector.getter(name));
     handleOperator(node);
     handleDynamicProperty(node, receiver, new Selector.setter(name));
@@ -470,15 +473,15 @@
     handleDynamicProperty(node, receiver, selector);
   }
 
-  void visitIfNotNullDynamicPropertyPostfix(Send node, Node receiver, Name name,
-      IncDecOperator operator, T arg) {
+  void visitIfNotNullDynamicPropertyPostfix(
+      Send node, Node receiver, Name name, IncDecOperator operator, T arg) {
     handleDynamicProperty(node, receiver, new Selector.getter(name));
     handleOperator(node);
     handleDynamicProperty(node, receiver, new Selector.setter(name));
   }
 
-  void visitIfNotNullDynamicPropertyPrefix(Send node, Node receiver, Name name,
-      IncDecOperator operator, T arg) {
+  void visitIfNotNullDynamicPropertyPrefix(
+      Send node, Node receiver, Name name, IncDecOperator operator, T arg) {
     handleDynamicProperty(node, receiver, new Selector.getter(name));
     handleOperator(node);
     handleDynamicProperty(node, receiver, new Selector.setter(name));
@@ -653,9 +656,8 @@
     handleSuper(node);
   }
 
-  void visitSuperFieldFieldSetIfNull(
-      Send node, FieldElement readField, FieldElement writtenField, Node rhs,
-      T arg) {
+  void visitSuperFieldFieldSetIfNull(Send node, FieldElement readField,
+      FieldElement writtenField, Node rhs, T arg) {
     handleSuper(node);
     handleNSMSuper(node, readField.enclosingClass);
   }
@@ -700,8 +702,8 @@
     handleSuper(node);
   }
 
-  void visitSuperFieldSetterSetIfNull(Send node, FieldElement field,
-      FunctionElement setter, Node rhs, T arg) {
+  void visitSuperFieldSetterSetIfNull(
+      Send node, FieldElement field, FunctionElement setter, Node rhs, T arg) {
     handleSuper(node);
     handleSuper(node);
   }
@@ -727,8 +729,8 @@
     handleSuper(node);
   }
 
-  void visitSuperGetterFieldSetIfNull(Send node, FunctionElement getter,
-      FieldElement field, Node rhs, T arg) {
+  void visitSuperGetterFieldSetIfNull(
+      Send node, FunctionElement getter, FieldElement field, Node rhs, T arg) {
     handleSuper(node);
     handleSuper(node);
   }
@@ -765,16 +767,24 @@
     handleSuper(node);
   }
 
-  void visitSuperIndexPostfix(Send node, MethodElement indexFunction,
-      MethodElement indexSetFunction, Node index, IncDecOperator operator,
+  void visitSuperIndexPostfix(
+      Send node,
+      MethodElement indexFunction,
+      MethodElement indexSetFunction,
+      Node index,
+      IncDecOperator operator,
       T arg) {
     handleSuper(node);
     handleOperator(node);
     handleSuper(node);
   }
 
-  void visitSuperIndexPrefix(Send node, MethodElement indexFunction,
-      MethodElement indexSetFunction, Node index, IncDecOperator operator,
+  void visitSuperIndexPrefix(
+      Send node,
+      MethodElement indexFunction,
+      MethodElement indexSetFunction,
+      Node index,
+      IncDecOperator operator,
       T arg) {
     handleSuper(node);
     handleOperator(node);
@@ -808,8 +818,8 @@
     handleSuper(node);
   }
 
-  void visitThisPropertyCompound(Send node, Name name,
-      AssignmentOperator operator, Node rhs, T arg) {
+  void visitThisPropertyCompound(
+      Send node, Name name, AssignmentOperator operator, Node rhs, T arg) {
     handleThisProperty(node, new Selector.getter(name));
     handleOperator(node);
     handleThisProperty(node, new Selector.setter(name));
@@ -820,15 +830,15 @@
     handleThisProperty(node, selector);
   }
 
-  void visitThisPropertyPostfix(Send node, Name name, IncDecOperator operator,
-      T arg) {
+  void visitThisPropertyPostfix(
+      Send node, Name name, IncDecOperator operator, T arg) {
     handleThisProperty(node, new Selector.getter(name));
     handleOperator(node);
     handleThisProperty(node, new Selector.setter(name));
   }
 
-  void visitThisPropertyPrefix(Send node, Name name, IncDecOperator operator,
-      T arg) {
+  void visitThisPropertyPrefix(
+      Send node, Name name, IncDecOperator operator, T arg) {
     handleThisProperty(node, new Selector.getter(name));
     handleOperator(node);
     handleThisProperty(node, new Selector.setter(name));
@@ -1001,9 +1011,13 @@
 
   // Statically known "no such method" sends
 
-  void visitConstructorIncompatibleInvoke(NewExpression node,
-      ConstructorElement constructor, InterfaceType type, NodeList arguments,
-      CallStructure callStructure, T arg) {
+  void visitConstructorIncompatibleInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleNSMError(node);
   }
 
@@ -1103,8 +1117,8 @@
     handleNSMError(node);
   }
 
-  void visitFinalSuperFieldSetIfNull(Send node, FieldElement field,
-      Node rhs, T arg) {
+  void visitFinalSuperFieldSetIfNull(
+      Send node, FieldElement field, Node rhs, T arg) {
     handleSuper(node);
     handleNSMSuper(node, field.enclosingClass);
   }
@@ -1179,15 +1193,18 @@
     handleStatic(node);
   }
 
-  void visitTopLevelMethodSetIfNull(Send node, FunctionElement method,
-      Node rhs, T arg) {
+  void visitTopLevelMethodSetIfNull(
+      Send node, FunctionElement method, Node rhs, T arg) {
     handleStatic(node);
     handleNSMError(node);
   }
 
-  void visitLocalFunctionIncompatibleInvoke(Send node,
-      LocalFunctionElement function, NodeList arguments,
-      CallStructure callStructure, T arg) {
+  void visitLocalFunctionIncompatibleInvoke(
+      Send node,
+      LocalFunctionElement function,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleNSMError(node);
   }
 
@@ -1331,8 +1348,11 @@
     handleNSMSuper(node, setter.enclosingClass);
   }
 
-  void visitTopLevelFunctionIncompatibleInvoke(Send node,
-      MethodElement function, NodeList arguments, CallStructure callStructure,
+  void visitTopLevelFunctionIncompatibleInvoke(
+      Send node,
+      MethodElement function,
+      NodeList arguments,
+      CallStructure callStructure,
       T arg) {
     handleNSMError(node);
   }
@@ -1398,8 +1418,11 @@
     handleNSMError(node);
   }
 
-  void visitTypeVariableTypeLiteralCompound(Send node,
-      TypeVariableElement element, AssignmentOperator operator, Node rhs,
+  void visitTypeVariableTypeLiteralCompound(
+      Send node,
+      TypeVariableElement element,
+      AssignmentOperator operator,
+      Node rhs,
       T arg) {
     handleTypeVariable(node);
     handleNSMError(node); // operator on a method closure yields nSM
@@ -1411,9 +1434,12 @@
     handleTypeVariable(node);
   }
 
-  void visitTypeVariableTypeLiteralInvoke(Send node,
-      TypeVariableElement element, NodeList arguments,
-      CallStructure callStructure, T arg) {
+  void visitTypeVariableTypeLiteralInvoke(
+      Send node,
+      TypeVariableElement element,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleNSMError(node);
   }
 
@@ -1484,8 +1510,12 @@
     handleNSMError(node);
   }
 
-  void visitUnresolvedClassConstructorInvoke(NewExpression node,
-      Element element, DartType type, NodeList arguments, Selector selector,
+  void visitUnresolvedClassConstructorInvoke(
+      NewExpression node,
+      Element element,
+      DartType type,
+      NodeList arguments,
+      Selector selector,
       T arg) {
     handleNSMError(node);
   }
@@ -1525,9 +1555,13 @@
     handleNoSend(node);
   }
 
-  void visitUnresolvedRedirectingFactoryConstructorInvoke(NewExpression node,
-      ConstructorElement constructor, InterfaceType type, NodeList arguments,
-      CallStructure callStructure, T arg) {
+  void visitUnresolvedRedirectingFactoryConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleNSMError(node);
   }
 
@@ -1561,8 +1595,8 @@
     handleNoSend(node);
   }
 
-  void visitUnresolvedStaticGetterSetIfNull(Send node, Element element,
-      MethodElement setter, Node rhs, T arg) {
+  void visitUnresolvedStaticGetterSetIfNull(
+      Send node, Element element, MethodElement setter, Node rhs, T arg) {
     handleNSMError(node);
     handleNoSend(node);
   }
@@ -1588,8 +1622,8 @@
     handleNoSend(node);
   }
 
-  void visitUnresolvedStaticSetterSetIfNull(Send node, MethodElement getter,
-      Element element, Node rhs, T arg) {
+  void visitUnresolvedStaticSetterSetIfNull(
+      Send node, MethodElement getter, Element element, Node rhs, T arg) {
     handleNSMError(node);
     handleNoSend(node);
   }
@@ -1636,8 +1670,13 @@
     handleSuper(node);
   }
 
-  void visitUnresolvedSuperGetterCompoundIndexSet(Send node, Element element,
-      MethodElement setter, Node index, AssignmentOperator operator, Node rhs,
+  void visitUnresolvedSuperGetterCompoundIndexSet(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node index,
+      AssignmentOperator operator,
+      Node rhs,
       T arg) {
     handleNSMSuper(node, element.enclosingClass);
     handleOperator(node);
@@ -1672,8 +1711,8 @@
     handleSuper(node);
   }
 
-  void visitUnresolvedSuperGetterSetIfNull(Send node, Element element,
-      MethodElement setter, Node rhs, T arg) {
+  void visitUnresolvedSuperGetterSetIfNull(
+      Send node, Element element, MethodElement setter, Node rhs, T arg) {
     handleNSMSuper(node, element.enclosingClass);
     handleSuper(node);
   }
@@ -1728,25 +1767,38 @@
     handleNSMSuper(node, element.enclosingClass);
   }
 
-  void visitUnresolvedSuperSetterCompoundIndexSet(Send node,
-      MethodElement getter, Element element, Node index,
-      AssignmentOperator operator, Node rhs, T arg) {
+  void visitUnresolvedSuperSetterCompoundIndexSet(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node index,
+      AssignmentOperator operator,
+      Node rhs,
+      T arg) {
     handleSuper(node);
     handleOperator(node);
     handleNSMSuper(node, element.enclosingClass);
   }
 
-  void visitUnresolvedSuperSetterIndexPostfix(Send node,
-      MethodElement indexFunction, Element element, Node index,
-      IncDecOperator operator, T arg) {
+  void visitUnresolvedSuperSetterIndexPostfix(
+      Send node,
+      MethodElement indexFunction,
+      Element element,
+      Node index,
+      IncDecOperator operator,
+      T arg) {
     handleSuper(node);
     handleOperator(node);
     handleNSMSuper(node, element.enclosingClass);
   }
 
-  void visitUnresolvedSuperSetterIndexPrefix(Send node,
-      MethodElement indexFunction, Element element, Node index,
-      IncDecOperator operator, T arg) {
+  void visitUnresolvedSuperSetterIndexPrefix(
+      Send node,
+      MethodElement indexFunction,
+      Element element,
+      Node index,
+      IncDecOperator operator,
+      T arg) {
     handleSuper(node);
     handleOperator(node);
     handleNSMSuper(node, element.enclosingClass);
@@ -1766,8 +1818,8 @@
     handleNSMSuper(node, element.enclosingClass);
   }
 
-  void visitUnresolvedSuperSetterSetIfNull(Send node, MethodElement getter,
-      Element element, Node rhs, T arg) {
+  void visitUnresolvedSuperSetterSetIfNull(
+      Send node, MethodElement getter, Element element, Node rhs, T arg) {
     handleSuper(node);
     handleNSMSuper(node, element.enclosingClass);
   }
@@ -1798,8 +1850,8 @@
     handleNoSend(node);
   }
 
-  void visitUnresolvedTopLevelGetterSetIfNull(Send node, Element element,
-      MethodElement setter, Node rhs, T arg) {
+  void visitUnresolvedTopLevelGetterSetIfNull(
+      Send node, Element element, MethodElement setter, Node rhs, T arg) {
     handleNSMError(node);
     handleNoSend(node);
   }
@@ -1825,8 +1877,8 @@
     handleNoSend(node);
   }
 
-  void visitUnresolvedTopLevelSetterSetIfNull(Send node, MethodElement getter,
-      Element element, Node rhs, T arg) {
+  void visitUnresolvedTopLevelSetterSetIfNull(
+      Send node, MethodElement getter, Element element, Node rhs, T arg) {
     handleNSMError(node);
     handleNoSend(node);
   }
@@ -1842,9 +1894,13 @@
     handleStatic(node);
   }
 
-  void visitFactoryConstructorInvoke(NewExpression node,
-      ConstructorElement constructor, InterfaceType type, NodeList arguments,
-      CallStructure callStructure, T arg) {
+  void visitFactoryConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      T arg) {
     handleStatic(node);
   }
 
@@ -1885,31 +1941,20 @@
     handleStatic(node);
   }
 
-  void visitStaticGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      T arg) {
+  void visitStaticGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, T arg) {
     handleStatic(node);
     handleStatic(node);
   }
 
   void visitStaticMethodSetterSetIfNull(
-      Send node,
-      MethodElement method,
-      MethodElement setter,
-      Node rhs,
-      T arg) {
+      Send node, MethodElement method, MethodElement setter, Node rhs, T arg) {
     handleStatic(node);
     handleStatic(node);
   }
 
   void visitStaticMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      T arg) {
+      Send node, FunctionElement method, Node rhs, T arg) {
     handleStatic(node);
     handleNSMError(node);
   }
@@ -1949,8 +1994,13 @@
 
   // Virtual
 
-  void visitSuperCompoundIndexSet(SendSet node, MethodElement getter,
-      MethodElement setter, Node index, AssignmentOperator operator, Node rhs,
+  void visitSuperCompoundIndexSet(
+      SendSet node,
+      MethodElement getter,
+      MethodElement setter,
+      Node index,
+      AssignmentOperator operator,
+      Node rhs,
       T arg) {
     handleSuper(node);
     handleOperator(node);
@@ -1997,27 +2047,16 @@
     handleNoSend(node);
   }
 
-  void errorInvalidGet(
-      Send node,
-      ErroneousElement error,
-      T arg) {
+  void errorInvalidGet(Send node, ErroneousElement error, T arg) {
     handleNoSend(node);
   }
 
-  void errorInvalidInvoke(
-      Send node,
-      ErroneousElement error,
-      NodeList arguments,
-      Selector selector,
-      T arg) {
+  void errorInvalidInvoke(Send node, ErroneousElement error, NodeList arguments,
+      Selector selector, T arg) {
     handleNoSend(node);
   }
 
-  void errorInvalidSet(
-      Send node,
-      ErroneousElement error,
-      Node rhs,
-      T arg) {
+  void errorInvalidSet(Send node, ErroneousElement error, Node rhs, T arg) {
     handleNoSend(node);
   }
 
@@ -2027,120 +2066,70 @@
     handleNoSend(node);
   }
 
-
   void errorInvalidPrefix(
-      Send node,
-      ErroneousElement error,
-      IncDecOperator operator,
-      T arg) {
+      Send node, ErroneousElement error, IncDecOperator operator, T arg) {
     handleNoSend(node);
   }
 
   void errorInvalidPostfix(
-      Send node,
-      ErroneousElement error,
-      IncDecOperator operator,
-      T arg) {
+      Send node, ErroneousElement error, IncDecOperator operator, T arg) {
     handleNoSend(node);
   }
 
-  void errorInvalidCompound(
-      Send node,
-      ErroneousElement error,
-      AssignmentOperator operator,
-      Node rhs,
-      T arg) {
+  void errorInvalidCompound(Send node, ErroneousElement error,
+      AssignmentOperator operator, Node rhs, T arg) {
     handleNoSend(node);
   }
 
   void errorInvalidUnary(
-      Send node,
-      UnaryOperator operator,
-      ErroneousElement error,
-      T arg) {
+      Send node, UnaryOperator operator, ErroneousElement error, T arg) {
     handleNoSend(node);
   }
 
   void errorInvalidEquals(
-      Send node,
-      ErroneousElement error,
-      Node right,
-      T arg) {
+      Send node, ErroneousElement error, Node right, T arg) {
     handleNoSend(node);
   }
 
   void errorInvalidNotEquals(
-      Send node,
-      ErroneousElement error,
-      Node right,
-      T arg) {
+      Send node, ErroneousElement error, Node right, T arg) {
     handleNoSend(node);
   }
 
-  void errorInvalidBinary(
-      Send node,
-      ErroneousElement error,
-      BinaryOperator operator,
-      Node right,
-      T arg) {
+  void errorInvalidBinary(Send node, ErroneousElement error,
+      BinaryOperator operator, Node right, T arg) {
     handleNoSend(node);
   }
 
-  void errorInvalidIndex(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      T arg) {
+  void errorInvalidIndex(Send node, ErroneousElement error, Node index, T arg) {
     handleNoSend(node);
   }
 
   void errorInvalidIndexSet(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      Node rhs,
-      T arg) {
+      Send node, ErroneousElement error, Node index, Node rhs, T arg) {
     handleNoSend(node);
   }
 
-  void errorInvalidCompoundIndexSet(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      T arg) {
+  void errorInvalidCompoundIndexSet(Send node, ErroneousElement error,
+      Node index, AssignmentOperator operator, Node rhs, T arg) {
     handleNoSend(node);
     handleNoSend(node);
     handleNoSend(node);
   }
 
-  void errorInvalidIndexPrefix(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      IncDecOperator operator,
-      T arg) {
+  void errorInvalidIndexPrefix(Send node, ErroneousElement error, Node index,
+      IncDecOperator operator, T arg) {
     handleNoSend(node);
     handleNoSend(node);
   }
 
-  void errorInvalidIndexPostfix(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      IncDecOperator operator,
-      T arg) {
+  void errorInvalidIndexPostfix(Send node, ErroneousElement error, Node index,
+      IncDecOperator operator, T arg) {
     handleNoSend(node);
     handleNoSend(node);
   }
 
-  void previsitDeferredAccess(
-      Send node,
-      PrefixElement prefix,
-      T arg) {
-  }
-
+  void previsitDeferredAccess(Send node, PrefixElement prefix, T arg) {}
 
   void visitAs(Send node, Node expression, DartType type, T arg) {
     handleNoSend(node);
@@ -2229,6 +2218,47 @@
     handleNSMError(node);
   }
 
+  @override
+  errorInvalidIndexSetIfNull(
+      SendSet node, ErroneousElement error, Node index, Node rhs, T arg) {
+    handleNoSend(node);
+  }
+
+  @override
+  visitIndexSetIfNull(
+      SendSet node, Node receiver, Node index, Node rhs, T arg) {
+    handleIndex(node); // t1 = receiver[index]
+    handleIndex(node); // receiver[index] = t2
+  }
+
+  @override
+  visitSuperIndexSetIfNull(SendSet node, MethodElement getter,
+      MethodElement setter, Node index, Node rhs, T arg) {
+    handleSuper(node); // t1 = super[index]
+    handleSuper(node); // super[index] = t2
+  }
+
+  @override
+  visitUnresolvedSuperGetterIndexSetIfNull(Send node, Element element,
+      MethodElement setter, Node index, Node rhs, T arg) {
+    handleNSMSuper(node, element.enclosingClass);
+    handleNSMSuper(node, element.enclosingClass);
+  }
+
+  @override
+  visitUnresolvedSuperIndexSetIfNull(
+      Send node, Element element, Node index, Node rhs, T arg) {
+    handleNSMSuper(node, element.enclosingClass);
+    handleNSMSuper(node, element.enclosingClass);
+  }
+
+  @override
+  visitUnresolvedSuperSetterIndexSetIfNull(Send node, MethodElement getter,
+      Element element, Node index, Node rhs, T arg) {
+    handleSuper(node); // t1 = super[index]
+    handleNSMSuper(node, element.enclosingClass);
+  }
+
   void visitIfNull(Send node, Node left, Node right, T arg) {
     handleNoSend(node);
   }
@@ -2259,8 +2289,8 @@
     if (!measurements.checkInvariant(Metric.send) ||
         !measurements.checkInvariant(Metric.monomorphicSend) ||
         !measurements.checkInvariant(Metric.polymorphicSend)) {
-      reporter.reportErrorMessage(node,
-          MessageKind.GENERIC, {'text': 'bad\n-- $msg\nlast:\n-- $last\n'});
+      reporter.reportErrorMessage(node, MessageKind.GENERIC,
+          {'text': 'bad\n-- $msg\nlast:\n-- $last\n'});
       last = msg;
     } else {
       last = msg;
@@ -2277,12 +2307,14 @@
   _StatsTraversalVisitor(
       Compiler compiler, TreeElements elements, Uri sourceUri)
       : reporter = compiler.reporter,
-        statsVisitor = new _StatsVisitor(compiler.reporter, elements,
-            // TODO(sigmund): accept a list of analyses, so we can compare them
-            // together.
-            true
-            ? new TrustTypesAnalysisResult(elements, compiler.world)
-            : new NaiveAnalysisResult(),
+        statsVisitor = new _StatsVisitor(
+            compiler.reporter,
+            elements,
+                // TODO(sigmund): accept a list of analyses, so we can compare them
+                // together.
+                true
+                ? new TrustTypesAnalysisResult(elements, compiler.world)
+                : new NaiveAnalysisResult(),
             sourceUri),
         super(elements);
 
@@ -2290,8 +2322,8 @@
     try {
       node.accept(statsVisitor);
     } catch (e, t) {
-      reporter.reportErrorMessage(
-          node, MessageKind.GENERIC, {'text': '$e\n$t'});
+      reporter
+          .reportErrorMessage(node, MessageKind.GENERIC, {'text': '$e\n$t'});
     }
     super.visitSend(node);
   }
@@ -2300,8 +2332,8 @@
     try {
       node.accept(statsVisitor);
     } catch (e, t) {
-      reporter.reportErrorMessage(
-          node, MessageKind.GENERIC, {'text': '$e\n$t'});
+      reporter
+          .reportErrorMessage(node, MessageKind.GENERIC, {'text': '$e\n$t'});
     }
     super.visitNewExpression(node);
   }
@@ -2310,7 +2342,6 @@
 /// Helper to visit elements recursively
 // TODO(sigmund): maybe generalize and move to elements/visitor.dart?
 abstract class RecursiveElementVisitor<R, A> extends ElementVisitor<R, A> {
-
   @override
   R visitWarnOnUseElement(WarnOnUseElement e, A arg) =>
       e.wrappedElement.accept(this, arg);
diff --git a/pkg/compiler/lib/src/info/trusted_types_analysis_result.dart b/pkg/compiler/lib/src/info/trusted_types_analysis_result.dart
index 8de59ae..5653f2e 100644
--- a/pkg/compiler/lib/src/info/trusted_types_analysis_result.dart
+++ b/pkg/compiler/lib/src/info/trusted_types_analysis_result.dart
@@ -21,11 +21,11 @@
 
   TrustTypesAnalysisResult(this.elements, this.world);
 
-  ReceiverInfo infoForReceiver(Node receiver) =>
-    new TrustTypesReceiverInfo(receiver, elements.typesCache[receiver], world);
+  ReceiverInfo infoForReceiver(Node receiver) => new TrustTypesReceiverInfo(
+      receiver, elements.typesCache[receiver], world);
   SelectorInfo infoForSelector(Node receiver, Selector selector) =>
-    new TrustTypesSelectorInfo(
-        receiver, elements.typesCache[receiver], selector, world);
+      new TrustTypesSelectorInfo(
+          receiver, elements.typesCache[receiver], selector, world);
 }
 
 class _SelectorLookupResult {
@@ -37,7 +37,8 @@
   _SelectorLookupResult(this.exists, this.possibleTargets);
 
   const _SelectorLookupResult.dontKnow()
-    : exists = Boolish.maybe, possibleTargets = -1;
+      : exists = Boolish.maybe,
+        possibleTargets = -1;
 }
 
 _SelectorLookupResult _lookupSelector(
@@ -48,17 +49,19 @@
   var uniqueTargets = new Set();
   for (var cls in world.subtypesOf(type.element)) {
     var member = cls.lookupMember(selectorName);
-    if (member != null && !member.isAbstract
+    if (member != null &&
+        !member.isAbstract
         // Don't match nsm in Object
-        && (!isNsm || !member.enclosingClass.isObject)) {
+        &&
+        (!isNsm || !member.enclosingClass.isObject)) {
       uniqueTargets.add(member);
     } else {
       notFound = true;
     }
   }
   Boolish exists = uniqueTargets.length > 0
-        ? (notFound ? Boolish.maybe : Boolish.yes)
-        : Boolish.no;
+      ? (notFound ? Boolish.maybe : Boolish.yes)
+      : Boolish.no;
   return new _SelectorLookupResult(exists, uniqueTargets.length);
 }
 
@@ -72,12 +75,12 @@
       Node receiver, InterfaceType type, ClassWorld world) {
     // TODO(sigmund): refactor, maybe just store nsm as a SelectorInfo
     var res = _lookupSelector('noSuchMethod', type, world);
-    return new TrustTypesReceiverInfo._(receiver,
-        res.exists, res.possibleTargets);
+    return new TrustTypesReceiverInfo._(
+        receiver, res.exists, res.possibleTargets);
   }
 
-  TrustTypesReceiverInfo._(this.receiver, this.hasNoSuchMethod,
-      this.possibleNsmTargets);
+  TrustTypesReceiverInfo._(
+      this.receiver, this.hasNoSuchMethod, this.possibleNsmTargets);
 }
 
 class TrustTypesSelectorInfo implements SelectorInfo {
@@ -89,16 +92,13 @@
   final int possibleTargets;
   final bool isAccurate;
 
-  factory TrustTypesSelectorInfo(Node receiver, InterfaceType type,
-      Selector selector, ClassWorld world) {
-    var res = _lookupSelector(
-        selector != null ? selector.name : null, type, world);
+  factory TrustTypesSelectorInfo(
+      Node receiver, InterfaceType type, Selector selector, ClassWorld world) {
+    var res =
+        _lookupSelector(selector != null ? selector.name : null, type, world);
     return new TrustTypesSelectorInfo._(receiver, selector, res.exists,
-        res.usesInterceptor, res.possibleTargets,
-        res.exists != Boolish.maybe);
+        res.usesInterceptor, res.possibleTargets, res.exists != Boolish.maybe);
   }
-  TrustTypesSelectorInfo._(
-      this.receiver, this.selector, this.exists, this.usesInterceptor,
-      this.possibleTargets, this.isAccurate);
+  TrustTypesSelectorInfo._(this.receiver, this.selector, this.exists,
+      this.usesInterceptor, this.possibleTargets, this.isAccurate);
 }
-
diff --git a/pkg/compiler/lib/src/io/code_output.dart b/pkg/compiler/lib/src/io/code_output.dart
index 7f5b996..e43cbbb 100644
--- a/pkg/compiler/lib/src/io/code_output.dart
+++ b/pkg/compiler/lib/src/io/code_output.dart
@@ -23,8 +23,8 @@
   void addSourceLocation(int targetOffset, SourceLocation sourcePosition);
 
   /// Applies [f] to every target offset and associated source location.
-  void forEachSourceLocation(void f(int targetOffset,
-                                    SourceLocation sourceLocation));
+  void forEachSourceLocation(
+      void f(int targetOffset, SourceLocation sourceLocation));
 }
 
 abstract class CodeOutput implements SourceLocations {
@@ -66,9 +66,10 @@
   @override
   void addBuffer(CodeBuffer other) {
     if (other.markers.length > 0) {
-      other.markers.forEach(
-          (int targetOffset, List<SourceLocation> sourceLocations) {
-        markers.putIfAbsent(length + targetOffset, () => <SourceLocation>[])
+      other.markers
+          .forEach((int targetOffset, List<SourceLocation> sourceLocations) {
+        markers
+            .putIfAbsent(length + targetOffset, () => <SourceLocation>[])
             .addAll(sourceLocations);
       });
     }
@@ -78,8 +79,7 @@
     _addInternal(other.getText());
   }
 
-  void addSourceLocation(int targetOffset,
-                         SourceLocation sourceLocation) {
+  void addSourceLocation(int targetOffset, SourceLocation sourceLocation) {
     assert(targetOffset <= length);
     List<SourceLocation> sourceLocations =
         markers.putIfAbsent(targetOffset, () => <SourceLocation>[]);
diff --git a/pkg/compiler/lib/src/io/position_information.dart b/pkg/compiler/lib/src/io/position_information.dart
index 8966763..83460d5 100644
--- a/pkg/compiler/lib/src/io/position_information.dart
+++ b/pkg/compiler/lib/src/io/position_information.dart
@@ -8,20 +8,13 @@
 library dart2js.source_information.position;
 
 import '../common.dart';
-import '../elements/elements.dart' show
-    AstElement,
-    FieldElement,
-    LocalElement;
+import '../elements/elements.dart' show AstElement, FieldElement, LocalElement;
 import '../js/js.dart' as js;
 import '../js/js_source_mapping.dart';
 import '../js/js_debug.dart';
-import '../tree/tree.dart' show
-    FunctionExpression,
-    Node,
-    Send;
+import '../tree/tree.dart' show FunctionExpression, Node, Send;
 
-import 'code_output.dart' show
-    CodeBuffer;
+import 'code_output.dart' show CodeBuffer;
 import 'source_file.dart';
 import 'source_information.dart';
 
@@ -34,8 +27,7 @@
   @override
   final SourceLocation closingPosition;
 
-  PositionSourceInformation(this.startPosition,
-                            [this.closingPosition]);
+  PositionSourceInformation(this.startPosition, [this.closingPosition]);
 
   @override
   List<SourceLocation> get sourceLocations {
@@ -60,14 +52,14 @@
 
   int get hashCode {
     return 0x7FFFFFFF &
-           (startPosition.hashCode * 17 + closingPosition.hashCode * 19);
+        (startPosition.hashCode * 17 + closingPosition.hashCode * 19);
   }
 
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! PositionSourceInformation) return false;
     return startPosition == other.startPosition &&
-           closingPosition == other.closingPosition;
+        closingPosition == other.closingPosition;
   }
 
   /// Create a textual representation of the source information using [uriText]
@@ -78,11 +70,11 @@
     // Use 1-based line/column info to match usual dart tool output.
     if (startPosition != null) {
       sb.write('[${startPosition.line + 1},'
-                '${startPosition.column + 1}]');
+          '${startPosition.column + 1}]');
     }
     if (closingPosition != null) {
       sb.write('-[${closingPosition.line + 1},'
-                 '${closingPosition.column + 1}]');
+          '${closingPosition.column + 1}]');
     }
     return sb.toString();
   }
@@ -158,12 +150,12 @@
 
   SourceInformation buildDeclaration(AstElement element) {
     if (element.isSynthesized) {
-      return new PositionSourceInformation(
-          new OffsetSourceLocation(
-              sourceFile, element.position.charOffset, name));
+      return new PositionSourceInformation(new OffsetSourceLocation(
+          sourceFile, element.position.charOffset, name));
     } else {
       return new PositionSourceInformation(
-          null,
+          new OffsetSourceLocation(sourceFile,
+              element.resolvedAst.node.getBeginToken().charOffset, name),
           new OffsetSourceLocation(sourceFile,
               element.resolvedAst.node.getEndToken().charOffset, name));
     }
@@ -187,16 +179,13 @@
   @override
   SourceInformation buildImplicitReturn(AstElement element) {
     if (element.isSynthesized) {
-      return new PositionSourceInformation(
-          new OffsetSourceLocation(
-              sourceFile, element.position.charOffset, name));
+      return new PositionSourceInformation(new OffsetSourceLocation(
+          sourceFile, element.position.charOffset, name));
     } else {
-      return new PositionSourceInformation(
-          new OffsetSourceLocation(sourceFile,
-              element.resolvedAst.node.getEndToken().charOffset, name));
+      return new PositionSourceInformation(new OffsetSourceLocation(
+          sourceFile, element.resolvedAst.node.getEndToken().charOffset, name));
     }
- }
-
+  }
 
   @override
   SourceInformation buildLoop(Node node) => buildBegin(node);
@@ -221,6 +210,8 @@
             sourceFile, right.getBeginToken().charOffset, name));
   }
 
+  // TODO(johnniwinther): Clean up the use of this and [buildBinary],
+  // [buildIndex], etc.
   @override
   SourceInformation buildCall(Node receiver, Node call) {
     return new PositionSourceInformation(
@@ -265,6 +256,48 @@
   SourceInformationBuilder forContext(AstElement element) {
     return new PositionSourceInformationBuilder(element);
   }
+
+  @override
+  SourceInformation buildForeignCode(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildStringInterpolation(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildForInIterator(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildForInMoveNext(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildForInCurrent(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildForInSet(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildIndex(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildIndexSet(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildBinary(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildCatch(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildIs(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildAs(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildSwitch(Node node) => buildBegin(node);
+
+  @override
+  SourceInformation buildSwitchCase(Node node) => buildBegin(node);
 }
 
 /// The start, end and closing offsets for a [js.Node].
@@ -288,7 +321,7 @@
 
   String toString() {
     return 'CodePosition(start=$startPosition,'
-           'end=$endPosition,closing=$closingPosition)';
+        'end=$endPosition,closing=$closingPosition)';
   }
 }
 
@@ -302,12 +335,10 @@
   Map<js.Node, CodePosition> _codePositionMap =
       new Map<js.Node, CodePosition>.identity();
 
-  void registerPositions(js.Node node,
-                         int startPosition,
-                         int endPosition,
-                         int closingPosition) {
-    registerCodePosition(node,
-        new CodePosition(startPosition, endPosition, closingPosition));
+  void registerPositions(
+      js.Node node, int startPosition, int endPosition, int closingPosition) {
+    registerCodePosition(
+        node, new CodePosition(startPosition, endPosition, closingPosition));
   }
 
   void registerCodePosition(js.Node node, CodePosition codePosition) {
@@ -351,8 +382,7 @@
   INNER,
 }
 
-SourceLocation getSourceLocation(
-    SourceInformation sourceInformation,
+SourceLocation getSourceLocation(SourceInformation sourceInformation,
     [SourcePositionKind sourcePositionKind = SourcePositionKind.START]) {
   if (sourceInformation == null) return null;
   switch (sourcePositionKind) {
@@ -404,12 +434,11 @@
   CodePositionMap codePositionMap;
   List<TraceListener> traceListeners;
 
-  PositionSourceInformationProcessor(
-      SourceMapper sourceMapper,
+  PositionSourceInformationProcessor(SourceMapper sourceMapper,
       [Coverage coverage]) {
     codePositionMap = coverage != null
-              ? new CodePositionCoverage(codePositionRecorder, coverage)
-              : codePositionRecorder;
+        ? new CodePositionCoverage(codePositionRecorder, coverage)
+        : codePositionRecorder;
     traceListeners = [new PositionTraceListener(sourceMapper)];
     if (coverage != null) {
       traceListeners.add(new CoverageListener(coverage));
@@ -421,10 +450,8 @@
   }
 
   @override
-  void onPositions(js.Node node,
-                   int startPosition,
-                   int endPosition,
-                   int closingPosition) {
+  void onPositions(
+      js.Node node, int startPosition, int endPosition, int closingPosition) {
     codePositionRecorder.registerPositions(
         node, startPosition, endPosition, closingPosition);
   }
@@ -479,7 +506,6 @@
     }
     return visit(node.value);
   }
-
 }
 
 /// Mixin that add support for computing [SourceInformation] for a [js.Node].
@@ -490,8 +516,8 @@
 }
 
 /// [TraceListener] that register [SourceLocation]s with a [SourceMapper].
-class PositionTraceListener extends TraceListener with
-    NodeToSourceInformationMixin {
+class PositionTraceListener extends TraceListener
+    with NodeToSourceInformationMixin {
   final SourceMapper sourceMapper;
 
   PositionTraceListener(this.sourceMapper);
@@ -500,16 +526,30 @@
   void onStep(js.Node node, Offset offset, StepKind kind) {
     SourceInformation sourceInformation = computeSourceInformation(node);
     if (sourceInformation == null) return;
+    int codeLocation = offset.subexpressionOffset;
+    if (codeLocation == null) return;
 
-    SourcePositionKind sourcePositionKind = SourcePositionKind.START;
+    void registerPosition(SourcePositionKind sourcePositionKind) {
+      SourceLocation sourceLocation =
+          getSourceLocation(sourceInformation, sourcePositionKind);
+      if (sourceLocation != null) {
+        sourceMapper.register(node, codeLocation, sourceLocation);
+      }
+    }
+
     switch (kind) {
-      case StepKind.FUN:
-        sourcePositionKind = SourcePositionKind.INNER;
+      case StepKind.FUN_ENTRY:
+        // TODO(johnniwinther): Remove this when fully transitioned to the
+        // new source info system.
+        registerPosition(SourcePositionKind.START);
+        break;
+      case StepKind.FUN_EXIT:
+        registerPosition(SourcePositionKind.INNER);
         break;
       case StepKind.CALL:
         CallPosition callPosition =
             CallPosition.getSemanticPositionForCall(node);
-        sourcePositionKind = callPosition.sourcePositionKind;
+        registerPosition(callPosition.sourcePositionKind);
         break;
       case StepKind.NEW:
       case StepKind.RETURN:
@@ -524,14 +564,9 @@
       case StepKind.WHILE_CONDITION:
       case StepKind.DO_CONDITION:
       case StepKind.SWITCH_EXPRESSION:
+        registerPosition(SourcePositionKind.START);
         break;
     }
-    int codeLocation = offset.subexpressionOffset;
-    SourceLocation sourceLocation =
-        getSourceLocation(sourceInformation, sourcePositionKind);
-    if (codeLocation != null && sourceLocation != null) {
-      sourceMapper.register(node, codeLocation, sourceLocation);
-    }
   }
 }
 
@@ -563,47 +598,35 @@
         // a.m()   this.m()  a.b.c.d.m()
         // ^       ^         ^
         return new CallPosition(
-            node,
-            CodePositionKind.START,
-            SourcePositionKind.START);
+            node, CodePositionKind.START, SourcePositionKind.START);
       } else {
         // *.m()  *.a.b.c.d.m()
         //   ^              ^
         return new CallPosition(
-            access.selector,
-            CodePositionKind.START,
-            SourcePositionKind.INNER);
+            access.selector, CodePositionKind.START, SourcePositionKind.INNER);
       }
     } else if (node.target is js.VariableUse) {
       // m()
       // ^
       return new CallPosition(
-          node,
-          CodePositionKind.START,
-          SourcePositionKind.START);
+          node, CodePositionKind.START, SourcePositionKind.START);
     } else if (node.target is js.Fun || node.target is js.New) {
       // function(){}()  new Function("...")()
       //             ^                      ^
       return new CallPosition(
-          node.target,
-          CodePositionKind.END,
-          SourcePositionKind.INNER);
+          node.target, CodePositionKind.END, SourcePositionKind.INNER);
     } else if (node.target is js.Binary || node.target is js.Call) {
       // (0,a)()   m()()
       //      ^       ^
       return new CallPosition(
-          node.target,
-          CodePositionKind.END,
-          SourcePositionKind.INNER);
+          node.target, CodePositionKind.END, SourcePositionKind.INNER);
     } else {
       assert(invariant(NO_LOCATION_SPANNABLE, false,
           message: "Unexpected property access ${nodeToString(node)}:\n"
-                   "${DebugPrinter.prettyPrint(node)}"));
+              "${DebugPrinter.prettyPrint(node)}"));
       // Don't know....
       return new CallPosition(
-          node,
-          CodePositionKind.START,
-          SourcePositionKind.START);
+          node, CodePositionKind.START, SourcePositionKind.START);
     }
   }
 }
@@ -654,7 +677,8 @@
   ///
   final int leftToRightOffset;
 
-  Offset(this.statementOffset, this.leftToRightOffset, this.subexpressionOffset);
+  Offset(
+      this.statementOffset, this.leftToRightOffset, this.subexpressionOffset);
 
   String toString() {
     return 'Offset[statementOffset=$statementOffset,'
@@ -663,16 +687,11 @@
   }
 }
 
-enum BranchKind {
-  CONDITION,
-  LOOP,
-  CATCH,
-  FINALLY,
-  CASE,
-}
+enum BranchKind { CONDITION, LOOP, CATCH, FINALLY, CASE, }
 
 enum StepKind {
-  FUN,
+  FUN_ENTRY,
+  FUN_EXIT,
   CALL,
   NEW,
   RETURN,
@@ -712,7 +731,7 @@
 
 /// Visitor that computes the [js.Node]s the are part of the JavaScript
 /// steppable execution and thus needs source mapping locations.
-class JavaScriptTracer extends js.BaseVisitor  {
+class JavaScriptTracer extends js.BaseVisitor {
   final CodePositionMap codePositions;
   final List<TraceListener> listeners;
 
@@ -730,9 +749,7 @@
 
   bool active;
 
-  JavaScriptTracer(this.codePositions,
-           this.listeners,
-           {this.active: false});
+  JavaScriptTracer(this.codePositions, this.listeners, {this.active: false});
 
   void notifyStart(js.Node node) {
     listeners.forEach((listener) => listener.onStart(node));
@@ -797,11 +814,17 @@
     if (!active) {
       active = node.sourceInformation != null;
     }
+    leftToRightOffset =
+        statementOffset = getSyntaxOffset(node, kind: CodePositionKind.START);
+    Offset entryOffset = getOffsetForNode(node, statementOffset);
+    notifyStep(node, entryOffset, StepKind.FUN_ENTRY);
+
     visit(node.body);
-    leftToRightOffset = statementOffset =
-        getSyntaxOffset(node, kind: CodePositionKind.CLOSING);
-    Offset offset = getOffsetForNode(node, statementOffset);
-    notifyStep(node, offset, StepKind.FUN);
+
+    leftToRightOffset =
+        statementOffset = getSyntaxOffset(node, kind: CodePositionKind.CLOSING);
+    Offset exitOffset = getOffsetForNode(node, statementOffset);
+    notifyStep(node, exitOffset, StepKind.FUN_EXIT);
     active = activeBefore;
   }
 
@@ -813,7 +836,7 @@
   }
 
   int getSyntaxOffset(js.Node node,
-                      {CodePositionKind kind: CodePositionKind.START}) {
+      {CodePositionKind kind: CodePositionKind.START}) {
     CodePosition codePosition = codePositions[node];
     if (codePosition != null) {
       return codePosition.getPosition(kind);
@@ -821,18 +844,14 @@
     return null;
   }
 
-  visitSubexpression(js.Node parent,
-                     js.Expression child,
-                     int codeOffset,
-                     StepKind kind) {
+  visitSubexpression(
+      js.Node parent, js.Expression child, int codeOffset, StepKind kind) {
     var oldSteps = steps;
     steps = [];
     offsetPosition = codeOffset;
     visit(child);
     if (steps.isEmpty) {
-      notifyStep(parent,
-          getOffsetForNode(parent, offsetPosition),
-          kind);
+      notifyStep(parent, getOffsetForNode(parent, offsetPosition), kind);
       // The [offsetPosition] should only be used by the first subexpression.
       offsetPosition = null;
     }
@@ -843,8 +862,7 @@
   visitExpressionStatement(js.ExpressionStatement node) {
     statementOffset = getSyntaxOffset(node);
     visitSubexpression(
-        node, node.expression, statementOffset,
-        StepKind.EXPRESSION_STATEMENT);
+        node, node.expression, statementOffset, StepKind.EXPRESSION_STATEMENT);
     statementOffset = null;
     leftToRightOffset = null;
   }
@@ -859,11 +877,10 @@
     offsetPosition = null;
     visitList(node.arguments);
     offsetPosition = oldPosition;
-    CallPosition callPosition =
-        CallPosition.getSemanticPositionForCall(node);
+    CallPosition callPosition = CallPosition.getSemanticPositionForCall(node);
     js.Node positionNode = callPosition.node;
-    int callOffset = getSyntaxOffset(
-        positionNode, kind: callPosition.codePositionKind);
+    int callOffset =
+        getSyntaxOffset(positionNode, kind: callPosition.codePositionKind);
     if (offsetPosition == null) {
       // Use the call offset if this is not the first subexpression.
       offsetPosition = callOffset;
@@ -882,8 +899,7 @@
       // Use the syntax offset if this is not the first subexpression.
       offsetPosition = getSyntaxOffset(node);
     }
-    notifyStep(
-        node, getOffsetForNode(node, offsetPosition), StepKind.NEW);
+    notifyStep(node, getOffsetForNode(node, offsetPosition), StepKind.NEW);
     steps.add(node);
     offsetPosition = null;
   }
@@ -935,8 +951,8 @@
   @override
   visitIf(js.If node) {
     statementOffset = getSyntaxOffset(node);
-    visitSubexpression(node, node.condition, statementOffset,
-        StepKind.IF_CONDITION);
+    visitSubexpression(
+        node, node.condition, statementOffset, StepKind.IF_CONDITION);
     statementOffset = null;
     visit(node.then, BranchKind.CONDITION, true);
     visit(node.otherwise, BranchKind.CONDITION, false);
@@ -948,8 +964,8 @@
     statementOffset = offset;
     leftToRightOffset = null;
     if (node.init != null) {
-      visitSubexpression(node, node.init, getSyntaxOffset(node),
-          StepKind.FOR_INITIALIZER);
+      visitSubexpression(
+          node, node.init, getSyntaxOffset(node), StepKind.FOR_INITIALIZER);
     }
 
     if (node.condition != null) {
@@ -962,8 +978,8 @@
 
     statementOffset = offset;
     if (node.update != null) {
-      visitSubexpression(node, node.update, getSyntaxOffset(node.update),
-          StepKind.FOR_UPDATE);
+      visitSubexpression(
+          node, node.update, getSyntaxOffset(node.update), StepKind.FOR_UPDATE);
     }
 
     notifyPopBranch();
@@ -1089,8 +1105,8 @@
   @override
   visitSwitch(js.Switch node) {
     statementOffset = getSyntaxOffset(node);
-    visitSubexpression(node, node.key, getSyntaxOffset(node),
-        StepKind.SWITCH_EXPRESSION);
+    visitSubexpression(
+        node, node.key, getSyntaxOffset(node), StepKind.SWITCH_EXPRESSION);
     statementOffset = null;
     leftToRightOffset = null;
     for (int i = 0; i < node.cases.length; i++) {
@@ -1141,7 +1157,6 @@
   }
 }
 
-
 class Coverage {
   Set<js.Node> _nodesWithInfo = new Set<js.Node>();
   int _nodesWithInfoCount = 0;
@@ -1176,8 +1191,7 @@
             node.expression.runtimeType, () => 0);
         _nodesWithoutInfoCountByType[node.expression.runtimeType]++;
       } else {
-        _nodesWithoutInfoCountByType.putIfAbsent(
-            node.runtimeType, () => 0);
+        _nodesWithoutInfoCountByType.putIfAbsent(node.runtimeType, () => 0);
         _nodesWithoutInfoCountByType[node.runtimeType]++;
       }
     }
@@ -1213,8 +1227,8 @@
       sb.write(') by runtime type:');
       List<Type> types = _nodesWithoutInfoCountByType.keys.toList();
       types.sort((a, b) {
-        return -_nodesWithoutInfoCountByType[a].compareTo(
-            _nodesWithoutInfoCountByType[b]);
+        return -_nodesWithoutInfoCountByType[a]
+            .compareTo(_nodesWithoutInfoCountByType[b]);
       });
 
       types.forEach((Type type) {
@@ -1270,7 +1284,7 @@
     CodePosition codePosition = codePositions[node];
     if (codePosition == null) {
       coverage.registerNodesWithoutOffset(node);
-   }
+    }
     return codePosition;
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/io/source_file.dart b/pkg/compiler/lib/src/io/source_file.dart
index f2058ad..93e6189 100644
--- a/pkg/compiler/lib/src/io/source_file.dart
+++ b/pkg/compiler/lib/src/io/source_file.dart
@@ -89,7 +89,7 @@
     List<int> starts = lineStarts;
     if (position < 0 || starts.last <= position) {
       throw 'bad position #$position in file $filename with '
-            'length ${length}.';
+          'length ${length}.';
     }
     int first = 0;
     int count = starts.length;
@@ -132,8 +132,7 @@
    * escape codes.
    */
   String getLocationMessage(String message, int start, int end,
-                            {bool includeSourceLine: true,
-                             String colorize(String text)}) {
+      {bool includeSourceLine: true, String colorize(String text)}) {
     if (colorize == null) {
       colorize = (text) => text;
     }
@@ -158,7 +157,7 @@
       if (lineStart == lineEnd) {
         String textLine = getLineText(lineStart);
 
-        int toColumn = min(columnStart + (end-start), textLine.length);
+        int toColumn = min(columnStart + (end - start), textLine.length);
         buf.write(textLine.substring(0, columnStart));
         buf.write(colorize(textLine.substring(columnStart, toColumn)));
         buf.write(textLine.substring(toColumn));
@@ -196,7 +195,7 @@
   String getLineText(int index) {
     // +1 for 0-indexing, +1 again to avoid the last line of the file
     if ((index + 2) < lineStarts.length) {
-      return slowSubstring(lineStarts[index], lineStarts[index+1]);
+      return slowSubstring(lineStarts[index], lineStarts[index + 1]);
     } else if ((index + 1) < lineStarts.length) {
       return '${slowSubstring(lineStarts[index], length)}\n';
     } else {
@@ -226,12 +225,12 @@
    * the constructor clones the content and adds a trailing 0.
    */
   Utf8BytesSourceFile(this.uri, List<int> content)
-    : this.zeroTerminatedContent = _zeroTerminateIfNecessary(content);
+      : this.zeroTerminatedContent = _zeroTerminateIfNecessary(content);
 
   String slowText() {
     // Don't convert the trailing zero byte.
-    return UTF8.decoder.convert(
-        zeroTerminatedContent, 0, zeroTerminatedContent.length - 1);
+    return UTF8.decoder
+        .convert(zeroTerminatedContent, 0, zeroTerminatedContent.length - 1);
   }
 
   List<int> slowUtf8ZeroTerminatedBytes() => zeroTerminatedContent;
@@ -249,6 +248,7 @@
     }
     return lengthCache;
   }
+
   set length(int v) => lengthCache = v;
   int lengthCache = -1;
 }
@@ -282,7 +282,7 @@
       : this(new Uri(path: filename), filename, text);
 
   int get length => text.length;
-  set length(int v) { }
+  set length(int v) {}
 
   String slowText() => text;
 
diff --git a/pkg/compiler/lib/src/io/source_information.dart b/pkg/compiler/lib/src/io/source_information.dart
index da46d43..ec2b933 100644
--- a/pkg/compiler/lib/src/io/source_information.dart
+++ b/pkg/compiler/lib/src/io/source_information.dart
@@ -5,19 +5,11 @@
 library dart2js.source_information;
 
 import '../common.dart';
-import '../elements/elements.dart' show
-    AstElement,
-    LocalElement;
-import '../tree/tree.dart' show
-    Node,
-    Send;
-import '../js/js.dart' show
-    JavaScriptNodeSourceInformation;
+import '../elements/elements.dart' show AstElement, LocalElement;
+import '../tree/tree.dart' show Node, Send;
+import '../js/js.dart' show JavaScriptNodeSourceInformation;
 import 'source_file.dart';
 
-bool useNewSourceInfo =
-    const bool.fromEnvironment('USE_NEW_SOURCE_INFO', defaultValue: false);
-
 /// Interface for passing source information, for instance for use in source
 /// maps, through the backend.
 abstract class SourceInformation extends JavaScriptNodeSourceInformation {
@@ -108,6 +100,48 @@
   /// Generate [SourceInformation] for the variable declaration inserted as
   /// first statement of a function.
   SourceInformation buildVariableDeclaration() => null;
+
+  /// Generate [SourceInformation] for an invocation of a foreign method.
+  SourceInformation buildForeignCode(Node node) => null;
+
+  /// Generate [SourceInformation] for a string interpolation of [node].
+  SourceInformation buildStringInterpolation(Node node) => null;
+
+  /// Generate [SourceInformation] for the for-in `iterator` access in [node].
+  SourceInformation buildForInIterator(Node node) => null;
+
+  /// Generate [SourceInformation] for the for-in `moveNext` call in [node].
+  SourceInformation buildForInMoveNext(Node node) => null;
+
+  /// Generate [SourceInformation] for the for-in `current` access in [node].
+  SourceInformation buildForInCurrent(Node node) => null;
+
+  /// Generate [SourceInformation] for the for-in variable assignment in [node].
+  SourceInformation buildForInSet(Node node) => null;
+
+  /// Generate [SourceInformation] for the operator `[]` access in [node].
+  SourceInformation buildIndex(Node node) => null;
+
+  /// Generate [SourceInformation] for the operator `[]=` assignment in [node].
+  SourceInformation buildIndexSet(Node node) => null;
+
+  /// Generate [SourceInformation] for the binary operation in [node].
+  SourceInformation buildBinary(Node node) => null;
+
+  /// Generate [SourceInformation] for the unary operator in [node].
+  SourceInformation buildCatch(Node node) => null;
+
+  /// Generate [SourceInformation] for the is-test in [node].
+  SourceInformation buildIs(Node node) => null;
+
+  /// Generate [SourceInformation] for the as-cast in [node].
+  SourceInformation buildAs(Node node) => null;
+
+  /// Generate [SourceInformation] for the switch statement [node].
+  SourceInformation buildSwitch(Node node) => null;
+
+  /// Generate [SourceInformation] for the switch case in [node].
+  SourceInformation buildSwitchCase(Node node) => null;
 }
 
 /// A location in a source file.
@@ -142,16 +176,16 @@
 
   int get hashCode {
     return sourceUri.hashCode * 17 +
-           offset.hashCode * 17 +
-           sourceName.hashCode * 23;
+        offset.hashCode * 17 +
+        sourceName.hashCode * 23;
   }
 
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! SourceLocation) return false;
     return sourceUri == other.sourceUri &&
-           offset == other.offset &&
-           sourceName == other.sourceName;
+        offset == other.offset &&
+        sourceName == other.sourceName;
   }
 
   String get shortText {
diff --git a/pkg/compiler/lib/src/io/source_map_builder.dart b/pkg/compiler/lib/src/io/source_map_builder.dart
index 28b52a5..f6fa478 100644
--- a/pkg/compiler/lib/src/io/source_map_builder.dart
+++ b/pkg/compiler/lib/src/io/source_map_builder.dart
@@ -10,18 +10,17 @@
 import 'source_information.dart' show SourceLocation;
 
 class SourceMapBuilder {
-
   /// The URI of the source map file.
   final Uri sourceMapUri;
+
   /// The URI of the target language file.
   final Uri targetFileUri;
 
   final LineColumnProvider lineColumnProvider;
   final List<SourceMapEntry> entries = new List<SourceMapEntry>();
 
-  SourceMapBuilder(this.sourceMapUri,
-                   this.targetFileUri,
-                   this.lineColumnProvider);
+  SourceMapBuilder(
+      this.sourceMapUri, this.targetFileUri, this.lineColumnProvider);
 
   void addMapping(int targetOffset, SourceLocation sourceLocation) {
     entries.add(new SourceMapEntry(sourceLocation, targetOffset));
@@ -41,7 +40,6 @@
   }
 
   String build() {
-
     LineColumnMap<SourceMapEntry> lineColumnMap =
         new LineColumnMap<SourceMapEntry>();
     Map<Uri, LineColumnMap<SourceMapEntry>> sourceLocationMap =
@@ -55,8 +53,8 @@
       SourceLocation location = sourceMapEntry.sourceLocation;
       if (location != null) {
         LineColumnMap<SourceMapEntry> sourceLineColumnMap =
-            sourceLocationMap.putIfAbsent(location.sourceUri,
-                () => new LineColumnMap<SourceMapEntry>());
+            sourceLocationMap.putIfAbsent(
+                location.sourceUri, () => new LineColumnMap<SourceMapEntry>());
         sourceLineColumnMap.add(location.line, location.column, sourceMapEntry);
       }
     });
@@ -92,8 +90,8 @@
     buffer.write('  "sources": ');
     Iterable<String> relativeSourceUriList = const <String>[];
     if (sourceMapUri != null) {
-      relativeSourceUriList = uriMap.elements
-          .map((u) => relativize(sourceMapUri, u, false));
+      relativeSourceUriList =
+          uriMap.elements.map((u) => relativize(sourceMapUri, u, false));
     }
     printStringListOn(relativeSourceUriList, buffer);
     buffer.write(',\n');
@@ -106,10 +104,8 @@
     return buffer.toString();
   }
 
-  void writeEntries(LineColumnMap<SourceMapEntry> entries,
-                    IndexMap<Uri> uriMap,
-                    IndexMap<String> nameMap,
-                    StringBuffer output) {
+  void writeEntries(LineColumnMap<SourceMapEntry> entries, IndexMap<Uri> uriMap,
+      IndexMap<String> nameMap, StringBuffer output) {
     SourceLocation previousSourceLocation;
     int previousTargetLine = 0;
     DeltaEncoder targetColumnEncoder = new DeltaEncoder();
@@ -119,9 +115,7 @@
     DeltaEncoder sourceColumnEncoder = new DeltaEncoder();
     DeltaEncoder sourceNameIndexEncoder = new DeltaEncoder();
 
-    entries.forEach((int targetLine,
-                     int targetColumn,
-                     SourceMapEntry entry) {
+    entries.forEach((int targetLine, int targetColumn, SourceMapEntry entry) {
       SourceLocation sourceLocation = entry.sourceLocation;
       if (sourceLocation == previousSourceLocation) {
         return;
@@ -184,7 +178,7 @@
   static const int VLQ_CONTINUATION_BIT = 1 << 5;
   static const int VLQ_CONTINUATION_MASK = 1 << 5;
   static const String BASE64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn'
-                                      'opqrstuvwxyz0123456789+/';
+      'opqrstuvwxyz0123456789+/';
 
   /// Writes the VLQ of delta between [value] and [offset] into [output] and
   /// return [value].
diff --git a/pkg/compiler/lib/src/io/start_end_information.dart b/pkg/compiler/lib/src/io/start_end_information.dart
index 8cae566..b08477f 100644
--- a/pkg/compiler/lib/src/io/start_end_information.dart
+++ b/pkg/compiler/lib/src/io/start_end_information.dart
@@ -8,11 +8,8 @@
 library dart2js.source_information.start_end;
 
 import '../common.dart';
-import '../diagnostics/messages.dart' show
-    MessageTemplate;
-import '../elements/elements.dart' show
-    AstElement,
-    LocalElement;
+import '../diagnostics/messages.dart' show MessageTemplate;
+import '../elements/elements.dart' show AstElement, LocalElement;
 import '../js/js.dart' as js;
 import '../js/js_source_mapping.dart';
 import '../tokens/token.dart' show Token;
@@ -51,21 +48,20 @@
 
   int get hashCode {
     return 0x7FFFFFFF &
-           (startPosition.hashCode * 17 + endPosition.hashCode * 19);
+        (startPosition.hashCode * 17 + endPosition.hashCode * 19);
   }
 
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! StartEndSourceInformation) return false;
     return startPosition == other.startPosition &&
-           endPosition == other.endPosition;
+        endPosition == other.endPosition;
   }
 
   // TODO(johnniwinther): Inline this in
   // [StartEndSourceInformationBuilder.buildDeclaration].
   static StartEndSourceInformation _computeSourceInformation(
       AstElement element) {
-
     AstElement implementation = element.implementation;
     SourceFile sourceFile = implementation.compilationUnit.script.file;
     String name = computeElementNameForSourceMaps(element);
@@ -140,10 +136,8 @@
   StartEndSourceInformationProcessor(this.sourceMapper);
 
   @override
-  void onPositions(js.Node node,
-                   int startPosition,
-                   int endPosition,
-                   int closingPosition) {
+  void onPositions(
+      js.Node node, int startPosition, int endPosition, int closingPosition) {
     if (node.sourceInformation != null) {
       StartEndSourceInformation sourceInformation = node.sourceInformation;
       sourceMapper.register(
@@ -183,10 +177,11 @@
       SourceLocation location, SourceFile sourceFile, int offset) {
     if (!location.isValid) {
       throw MessageTemplate.TEMPLATES[MessageKind.INVALID_SOURCE_FILE_LOCATION]
-          .message(
-              {'offset': offset,
-               'fileName': sourceFile.filename,
-               'length': sourceFile.length});
+          .message({
+        'offset': offset,
+        'fileName': sourceFile.filename,
+        'length': sourceFile.length
+      });
     }
   }
 
@@ -224,11 +219,8 @@
   SourceInformation buildIf(Node node) => buildGeneric(node);
 
   @override
-  SourceInformationBuilder forContext(
-      AstElement element, {SourceInformation sourceInformation}) {
+  SourceInformationBuilder forContext(AstElement element,
+      {SourceInformation sourceInformation}) {
     return new StartEndSourceInformationBuilder(element);
   }
 }
-
-
-
diff --git a/pkg/compiler/lib/src/js/js.dart b/pkg/compiler/lib/src/js/js.dart
index df510a8..cefac18 100644
--- a/pkg/compiler/lib/src/js/js.dart
+++ b/pkg/compiler/lib/src/js/js.dart
@@ -8,26 +8,19 @@
 export 'package:js_ast/js_ast.dart';
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
-import '../dump_info.dart' show
-    DumpInfoTask;
-import '../io/code_output.dart' show
-    CodeBuffer,
-    CodeOutput;
-import '../js_emitter/js_emitter.dart' show
-    USE_LAZY_EMITTER;
+import '../compiler.dart' show Compiler;
+import '../dump_info.dart' show DumpInfoTask;
+import '../io/code_output.dart' show CodeBuffer, CodeOutput;
+import '../js_emitter/js_emitter.dart' show USE_LAZY_EMITTER;
 
 import 'js_source_mapping.dart';
 
-String prettyPrint(
-    Node node,
-    Compiler compiler,
+String prettyPrint(Node node, Compiler compiler,
     {bool allowVariableMinification: true,
-     Renamer renamerForNames: JavaScriptPrintingOptions.identityRenamer}) {
+    Renamer renamerForNames: JavaScriptPrintingOptions.identityRenamer}) {
   // TODO(johnniwinther): Do we need all the options here?
   JavaScriptPrintingOptions options = new JavaScriptPrintingOptions(
-      shouldCompressOutput: compiler.enableMinification,
+      shouldCompressOutput: compiler.options.enableMinification,
       minifyLocalVariables: allowVariableMinification,
       preferSemicolonToNewlineInMinifiedOutput: USE_LAZY_EMITTER,
       renamerForNames: renamerForNames);
@@ -38,23 +31,21 @@
   return context.getText();
 }
 
-CodeBuffer createCodeBuffer(
-    Node node,
-    Compiler compiler,
+CodeBuffer createCodeBuffer(Node node, Compiler compiler,
     {DumpInfoTask monitor,
-     bool allowVariableMinification: true,
-     Renamer renamerForNames: JavaScriptPrintingOptions.identityRenamer}) {
+    bool allowVariableMinification: true,
+    Renamer renamerForNames: JavaScriptPrintingOptions.identityRenamer}) {
   JavaScriptSourceInformationStrategy sourceInformationFactory =
       compiler.backend.sourceInformationStrategy;
   JavaScriptPrintingOptions options = new JavaScriptPrintingOptions(
-      shouldCompressOutput: compiler.enableMinification,
+      shouldCompressOutput: compiler.options.enableMinification,
       minifyLocalVariables: allowVariableMinification,
       preferSemicolonToNewlineInMinifiedOutput: USE_LAZY_EMITTER,
       renamerForNames: renamerForNames);
   CodeBuffer outBuffer = new CodeBuffer();
   SourceInformationProcessor sourceInformationProcessor =
-        sourceInformationFactory.createProcessor(
-            new SourceLocationsMapper(outBuffer));
+      sourceInformationFactory
+          .createProcessor(new SourceLocationsMapper(outBuffer));
   Dart2JSJavaScriptPrintingContext context =
       new Dart2JSJavaScriptPrintingContext(
           compiler.reporter, monitor, outBuffer, sourceInformationProcessor);
@@ -71,10 +62,7 @@
   final CodePositionListener codePositionListener;
 
   Dart2JSJavaScriptPrintingContext(
-      this.reporter,
-      this.monitor,
-      this.outBuffer,
-      this.codePositionListener);
+      this.reporter, this.monitor, this.outBuffer, this.codePositionListener);
 
   @override
   void error(String message) {
@@ -90,10 +78,8 @@
   void enterNode(Node, int startPosition) {}
 
   @override
-  void exitNode(Node node,
-                int startPosition,
-                int endPosition,
-                int closingPosition) {
+  void exitNode(
+      Node node, int startPosition, int endPosition, int closingPosition) {
     if (monitor != null) {
       monitor.recordAstSize(node, endPosition - startPosition);
     }
@@ -142,8 +128,7 @@
 ///
 /// This is used when generated code needs to be represented as a string,
 /// for example by the lazy emitter or when generating code generators.
-class UnparsedNode extends DeferredString
-                   implements AstContainer {
+class UnparsedNode extends DeferredString implements AstContainer {
   @override
   final Node tree;
   final Compiler _compiler;
@@ -167,8 +152,7 @@
         if (tree is LiteralExpression) {
           LiteralExpression literalExpression = tree;
           String template = literalExpression.template;
-          if (template.startsWith("function ") ||
-          template.startsWith("{")) {
+          if (template.startsWith("function ") || template.startsWith("{")) {
             text = '($text)';
           }
         }
diff --git a/pkg/compiler/lib/src/js/js_debug.dart b/pkg/compiler/lib/src/js/js_debug.dart
index c8cbd0de..8851aa6 100644
--- a/pkg/compiler/lib/src/js/js_debug.dart
+++ b/pkg/compiler/lib/src/js/js_debug.dart
@@ -8,19 +8,15 @@
 
 import 'package:js_ast/js_ast.dart';
 
-import '../io/code_output.dart' show
-    BufferedCodeOutput;
-import '../util/util.dart' show
-    Indentation,
-    Tagging;
+import '../io/code_output.dart' show BufferedCodeOutput;
+import '../util/util.dart' show Indentation, Tagging;
 
 /// Unparse the JavaScript [node].
 String nodeToString(Node node) {
   JavaScriptPrintingOptions options = new JavaScriptPrintingOptions(
       shouldCompressOutput: true,
       preferSemicolonToNewlineInMinifiedOutput: true);
-  LenientPrintingContext printingContext =
-      new LenientPrintingContext();
+  LenientPrintingContext printingContext = new LenientPrintingContext();
   new Printer(options, printingContext).visit(node);
   return printingContext.getText();
 }
diff --git a/pkg/compiler/lib/src/js/js_source_mapping.dart b/pkg/compiler/lib/src/js/js_source_mapping.dart
index cd72e35..86b2601 100644
--- a/pkg/compiler/lib/src/js/js_source_mapping.dart
+++ b/pkg/compiler/lib/src/js/js_source_mapping.dart
@@ -5,19 +5,14 @@
 library js.source_mapping;
 
 import 'js.dart';
-import '../io/code_output.dart' show
-    BufferedCodeOutput,
-    CodeBuffer,
-    SourceLocations;
-import '../io/source_information.dart' show
-    SourceLocation,
-    SourceInformation,
-    SourceInformationStrategy;
+import '../io/code_output.dart'
+    show BufferedCodeOutput, CodeBuffer, SourceLocations;
+import '../io/source_information.dart'
+    show SourceLocation, SourceInformation, SourceInformationStrategy;
 
 /// [SourceInformationStrategy] that can associate source information with
 /// JavaScript output.
-class JavaScriptSourceInformationStrategy
-    extends SourceInformationStrategy {
+class JavaScriptSourceInformationStrategy extends SourceInformationStrategy {
   const JavaScriptSourceInformationStrategy();
 
   /// Creates a processor that can associate source information on [Node] with
@@ -34,10 +29,7 @@
   /// Called to associate [node] with the provided start, end and closing
   /// positions.
   void onPositions(
-      Node node,
-      int startPosition,
-      int endPosition,
-      int closingPosition) {}
+      Node node, int startPosition, int endPosition, int closingPosition) {}
 }
 
 /// An interface for mapping code offsets with [SourceLocation]s for JavaScript
diff --git a/pkg/compiler/lib/src/js/placeholder_safety.dart b/pkg/compiler/lib/src/js/placeholder_safety.dart
index b103489..62140ea 100644
--- a/pkg/compiler/lib/src/js/placeholder_safety.dart
+++ b/pkg/compiler/lib/src/js/placeholder_safety.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.
 
-
 library js.safety;
 
 import "js.dart" as js;
@@ -29,8 +28,8 @@
   // exceptions. The possible values of expressions are represented by
   // integers. Small non-negative integers 0, 1, 2, ... represent the values of
   // the placeholders. Other values are:
-  static const int NONNULL_VALUE = -1;  // Unknown but not null.
-  static const int UNKNOWN_VALUE = -2;  // Unknown and might be null.
+  static const int NONNULL_VALUE = -1; // Unknown but not null.
+  static const int UNKNOWN_VALUE = -2; // Unknown and might be null.
 
   PlaceholderSafetyAnalysis._(this.isNullableInput);
 
@@ -147,14 +146,14 @@
       safe = false;
       return leftToRight();
     }
-    
+
     // Assignment operators dereference the LHS before evaluating the RHS.
     if (node.op != null) return leftToRight();
 
     // Assignment (1) evaluates the LHS as a Reference `lval`, (2) evaluates the
     // RHS as a value, (3) dereferences the `lval` in PutValue.
     if (left is js.VariableReference) {
-      int value = visit(right); 
+      int value = visit(right);
       // Assignment could change an observed global or cause a ReferenceError.
       safe = false;
       return value;
@@ -213,7 +212,7 @@
       case "|":
         int left = visit(node.left);
         int right = visit(node.right);
-        return NONNULL_VALUE;  // Number, String, Boolean.
+        return NONNULL_VALUE; // Number, String, Boolean.
 
       case ',':
         int left = visit(node.left);
@@ -258,7 +257,7 @@
       // "typeof a" first evaluates to a Reference. If the Reference is to a
       // variable that is not present, "undefined" is returned without
       // dereferencing.
-      if (node.argument is js.VariableUse) return NONNULL_VALUE;  // A string.
+      if (node.argument is js.VariableUse) return NONNULL_VALUE; // A string.
     }
 
     visit(node.argument);
@@ -273,14 +272,14 @@
         return NONNULL_VALUE;
 
       case 'typeof':
-        return NONNULL_VALUE;  // Always a string.
+        return NONNULL_VALUE; // Always a string.
 
       case 'void':
         return UNKNOWN_VALUE;
 
       case '--':
       case '++':
-        return NONNULL_VALUE;  // Always a number.
+        return NONNULL_VALUE; // Always a number.
 
       default:
         safe = false;
@@ -291,7 +290,7 @@
   int visitPostfix(js.Postfix node) {
     assert(node.op == '--' || node.op == '++');
     visit(node.argument);
-    return NONNULL_VALUE;  // Always a number, even for "(a=null, a++)".
+    return NONNULL_VALUE; // Always a number, even for "(a=null, a++)".
   }
 
   int visitVariableUse(js.VariableUse node) {
diff --git a/pkg/compiler/lib/src/js/rewrite_async.dart b/pkg/compiler/lib/src/js/rewrite_async.dart
index bbac37f..2a9d8bf 100644
--- a/pkg/compiler/lib/src/js/rewrite_async.dart
+++ b/pkg/compiler/lib/src/js/rewrite_async.dart
@@ -7,14 +7,12 @@
 import "dart:math" show max;
 import 'dart:collection';
 
-import 'package:js_runtime/shared/async_await_error_codes.dart'
-    as error_codes;
+import 'package:js_runtime/shared/async_await_error_codes.dart' as error_codes;
 
 import "js.dart" as js;
 
 import '../common.dart';
-import '../util/util.dart' show
-    Pair;
+import '../util/util.dart' show Pair;
 
 /// Rewrites a [js.Fun] with async/sync*/async* functions and await and yield
 /// (with dart-like semantics) to an equivalent function without these.
@@ -25,9 +23,9 @@
 /// parameters to sync* functions that are mutated in the body must be boxed.
 /// (Currently handled in closure.dart).
 ///
-/// Look at [visitFun], [visitDartYield] and [visitAwait] for more explanation.
+/// Look at [rewriteFunction], [visitDartYield] and [visitAwait] for more
+/// explanation.
 abstract class AsyncRewriterBase extends js.NodeVisitor {
-
   // Local variables are hoisted to the top of the function, so they are
   // collected here.
   List<js.VariableDeclaration> localVariables =
@@ -175,10 +173,8 @@
   bool get isSyncStar => false;
   bool get isAsyncStar => false;
 
-  AsyncRewriterBase(this.reporter,
-                    this._spannable,
-                    this.safeVariableName,
-                    this.bodyName);
+  AsyncRewriterBase(
+      this.reporter, this._spannable, this.safeVariableName, this.bodyName);
 
   /// Initialize names used by the subClass.
   void initializeNames();
@@ -207,12 +203,12 @@
     // Initialize names specific to the subclass.
     initializeNames();
 
-    return node.accept(this);
+    return rewriteFunction(node);
   }
 
   js.Expression get currentErrorHandler {
-    return js.number(handlerLabels[jumpTargets.lastWhere(
-        (node) => handlerLabels[node] != null)]);
+    return js.number(handlerLabels[
+        jumpTargets.lastWhere((node) => handlerLabels[node] != null)]);
   }
 
   int allocateTempVar() {
@@ -348,8 +344,7 @@
   }
 
   void unreachable(js.Node node) {
-    reporter.internalError(
-        spannable, "Internal error, trying to visit $node");
+    reporter.internalError(spannable, "Internal error, trying to visit $node");
   }
 
   visitStatement(js.Statement node) {
@@ -372,7 +367,6 @@
     return node.accept(this);
   }
 
-
   /// Calls [fn] with the value of evaluating [node1] and [node2].
   ///
   /// Both nodes are evaluated in order.
@@ -428,8 +422,8 @@
   /// evaluation order we can write:
   ///     temp = <receiver>;
   ///     temp.m();
-  withCallTargetExpression(js.Expression node,
-                           fn(js.Expression result), {bool store}) {
+  withCallTargetExpression(js.Expression node, fn(js.Expression result),
+      {bool store}) {
     int oldTempVarIndex = currentTempVarIndex;
     js.Expression visited = visitExpression(node);
     js.Expression selector;
@@ -454,7 +448,6 @@
     return result;
   }
 
-
   /// Calls [fn] with the value of evaluating [node1] and [node2].
   ///
   /// If `shouldTransform(node2)` the first expression is stored in a temporary
@@ -524,9 +517,10 @@
   }
 
   /// Returns the rewritten function.
-  js.Fun finishFunction(List<js.Parameter> parameters,
-                          js.Statement rewrittenBody,
-                          js.VariableDeclarationList variableDeclarations);
+  js.Fun finishFunction(
+      List<js.Parameter> parameters,
+      js.Statement rewrittenBody,
+      js.VariableDeclarationList variableDeclarations);
 
   Iterable<js.VariableInitialization> variableInitializations();
 
@@ -665,8 +659,7 @@
   ///   }
   /// }
   ///
-  @override
-  js.Expression visitFun(js.Fun node) {
+  js.Expression rewriteFunction(js.Fun node) {
     beginLabel(newLabel("Function start"));
     // AsyncStar needs a returnlabel for its handling of cancelation. See
     // [visitDartYield].
@@ -684,8 +677,7 @@
     List<js.SwitchClause> clauses = labelledParts.keys.map((label) {
       return new js.Case(js.number(label), new js.Block(labelledParts[label]));
     }).toList();
-    js.Statement rewrittenBody =
-        new js.Switch(goto, clauses);
+    js.Statement rewrittenBody = new js.Switch(goto, clauses);
     if (hasJumpThoughOuterLabel) {
       rewrittenBody = new js.LabeledStatement(outerLabelName, rewrittenBody);
     }
@@ -695,20 +687,18 @@
 
     variables.add(_makeVariableInitializer(goto, js.number(0)));
     variables.addAll(variableInitializations());
-    variables.add(
-        _makeVariableInitializer(handler, js.number(rethrowLabel)));
+    variables.add(_makeVariableInitializer(handler, js.number(rethrowLabel)));
     variables.add(_makeVariableInitializer(currentError, null));
     if (analysis.hasFinally || (isAsyncStar && analysis.hasYield)) {
-      variables.add(_makeVariableInitializer(next,
-          new js.ArrayInitializer(<js.Expression>[])));
+      variables.add(_makeVariableInitializer(
+          next, new js.ArrayInitializer(<js.Expression>[])));
     }
     if (analysis.hasThis && !isSyncStar) {
       // Sync* functions must remember `this` on the level of the outer
       // function.
       variables.add(_makeVariableInitializer(self, js.js('this')));
     }
-    variables.addAll(localVariables.map(
-        (js.VariableDeclaration declaration) {
+    variables.addAll(localVariables.map((js.VariableDeclaration declaration) {
       return new js.VariableInitialization(declaration, null);
     }));
     variables.addAll(new Iterable.generate(tempVarHighWaterMark,
@@ -720,6 +710,18 @@
   }
 
   @override
+  js.Expression visitFun(js.Fun node) {
+    if (node.asyncModifier.isAsync || node.asyncModifier.isYielding) {
+      // The translation does not handle nested functions that are generators
+      // or asynchronous.  These functions should only be ones that are
+      // introduced by JS foreign code from our own libraries.
+      reporter.internalError(
+          spannable, 'Nested function is a generator or asynchronous.');
+    }
+    return node;
+  }
+
+  @override
   js.Expression visitAccess(js.PropertyAccess node) {
     return withExpression2(node.receiver, node.selector,
         (receiver, selector) => js.js('#[#]', [receiver, selector]));
@@ -749,18 +751,16 @@
         // A non-compound [js.Assignment] has `op==null`. So it works out to
         // use [js.Assignment.compound] for all cases.
         // Visit the [js.VariableUse] to ensure renaming is done correctly.
-        return new js.Assignment.compound(visitExpression(leftHandSide),
-                                          node.op,
-                                          value);
+        return new js.Assignment.compound(
+            visitExpression(leftHandSide), node.op, value);
       }, store: false);
     } else if (leftHandSide is js.PropertyAccess) {
-      return withExpressions([
-        leftHandSide.receiver,
-        leftHandSide.selector,
-        node.value
-      ], (evaluated) {
+      return withExpressions(
+          [leftHandSide.receiver, leftHandSide.selector, node.value],
+          (evaluated) {
         return new js.Assignment.compound(
-            new js.PropertyAccess(evaluated[0], evaluated[1]), node.op,
+            new js.PropertyAccess(evaluated[0], evaluated[1]),
+            node.op,
             evaluated[2]);
       });
     } else {
@@ -772,7 +772,7 @@
 
   /// An await is translated to an [awaitStatement].
   ///
-  /// See the comments of [visitFun] for an example.
+  /// See the comments of [rewriteFunction] for an example.
   @override
   js.Expression visitAwait(js.Await node) {
     assert(isAsync || isAsyncStar);
@@ -875,9 +875,11 @@
   @override
   js.Expression visitConditional(js.Conditional node) {
     if (!shouldTransform(node.then) && !shouldTransform(node.otherwise)) {
-      return js.js('# ? # : #', [visitExpression(node.condition),
-                                 visitExpression(node.then),
-                                 visitExpression(node.otherwise)]);
+      return js.js('# ? # : #', [
+        visitExpression(node.condition),
+        visitExpression(node.then),
+        visitExpression(node.otherwise)
+      ]);
     }
     int thenLabel = newLabel("then");
     int joinLabel = newLabel("join");
@@ -929,7 +931,7 @@
   /// It is necessary to run all nesting finally-handlers between the jump and
   /// the target. For that [next] is used as a stack of places to go.
   ///
-  /// See also [visitFun].
+  /// See also [rewriteFunction].
   void translateJump(js.Node target, int targetLabel) {
     // Compute a stack of all the 'finally' nodes that must be visited before
     // the jump.
@@ -965,8 +967,7 @@
       bool oldInsideUntranslatedBreakable = insideUntranslatedBreakable;
       insideUntranslatedBreakable = true;
       addStatement(js.js.statement('do {#} while (#)',
-                                   [translateInBlock(node.body),
-                                    visitExpression(node.condition)]));
+          [translateInBlock(node.body), visitExpression(node.condition)]));
       insideUntranslatedBreakable = oldInsideUntranslatedBreakable;
       return;
     }
@@ -986,8 +987,8 @@
 
     beginLabel(continueLabel);
     withExpression(node.condition, (js.Expression condition) {
-      addStatement(js.js.statement('if (#) #',
-          [condition, gotoAndBreak(startLabel)]));
+      addStatement(
+          js.js.statement('if (#) #', [condition, gotoAndBreak(startLabel)]));
     }, store: false);
     beginLabel(afterLabel);
   }
@@ -997,7 +998,6 @@
     addStatement(node);
   }
 
-
   @override
   void visitExpressionStatement(js.ExpressionStatement node) {
     visitExpressionIgnoreResult(node.expression);
@@ -1010,13 +1010,10 @@
       insideUntranslatedBreakable = true;
       // Note that node.init, node.condition, node.update all can be null, but
       // withExpressions handles that.
-      withExpressions([
-        node.init,
-        node.condition,
-        node.update
-      ], (List<js.Expression> transformed) {
+      withExpressions([node.init, node.condition, node.update],
+          (List<js.Expression> transformed) {
         addStatement(new js.For(transformed[0], transformed[1], transformed[2],
-             translateInBlock(node.body)));
+            translateInBlock(node.body)));
       });
       insideUntranslatedBreakable = oldInsideUntranslated;
       return;
@@ -1088,18 +1085,14 @@
     }
     int thenLabel = newLabel("then");
     int joinLabel = newLabel("join");
-    int elseLabel = (node.otherwise is js.EmptyStatement)
-        ? joinLabel
-        : newLabel("else");
+    int elseLabel =
+        (node.otherwise is js.EmptyStatement) ? joinLabel : newLabel("else");
 
     withExpression(node.condition, (js.Expression condition) {
-      addExpressionStatement(
-          new js.Assignment(
-              goto,
-              new js.Conditional(
-                  condition,
-                  js.number(thenLabel),
-                  js.number(elseLabel))));
+      addExpressionStatement(new js.Assignment(
+          goto,
+          new js.Conditional(
+              condition, js.number(thenLabel), js.number(elseLabel))));
     }, store: false);
     addBreak();
     beginLabel(thenLabel);
@@ -1283,7 +1276,7 @@
   void visitReturn(js.Return node) {
     js.Node target = analysis.targets[node];
     if (node.value != null) {
-      if(isSyncStar || isAsyncStar) {
+      if (isSyncStar || isAsyncStar) {
         // Even though `return expr;` is not allowed in the dart sync* and
         // async*  code, the backend sometimes generates code like this, but
         // only when it is known that the 'expr' throws, and the return is just
@@ -1365,15 +1358,14 @@
       for (js.SwitchClause clause in node.cases) {
         if (clause is js.Case) {
           labels[i] = newLabel("case");
-          clauses.add(new js.Case(visitExpression(clause.expression),
-                                  gotoAndBreak(labels[i])));
+          clauses.add(new js.Case(
+              visitExpression(clause.expression), gotoAndBreak(labels[i])));
         } else if (clause is js.Default) {
           labels[i] = newLabel("default");
           clauses.add(new js.Default(gotoAndBreak(labels[i])));
           hasDefault = true;
         } else {
-          reporter.internalError(
-              spannable, "Unknown clause type $clause");
+          reporter.internalError(spannable, "Unknown clause type $clause");
         }
         i++;
       }
@@ -1409,10 +1401,9 @@
   }
 
   setErrorHandler([int errorHandler]) {
-    js.Expression label = (errorHandler == null)
-        ? currentErrorHandler
-        : js.number(errorHandler);
-    addStatement(js.js.statement('# = #;',[handler, label]));
+    js.Expression label =
+        (errorHandler == null) ? currentErrorHandler : js.number(errorHandler);
+    addStatement(js.js.statement('# = #;', [handler, label]));
   }
 
   List<int> _finalliesUpToAndEnclosingHandler() {
@@ -1432,7 +1423,7 @@
     return result.reversed.toList();
   }
 
-  /// See the comments of [visitFun] for more explanation.
+  /// See the comments of [rewriteFunction] for more explanation.
   void visitTry(js.Try node) {
     if (!shouldTransform(node)) {
       js.Block body = translateInBlock(node.body);
@@ -1449,9 +1440,8 @@
 
     hasTryBlocks = true;
     int uncaughtLabel = newLabel("uncaught");
-    int handlerLabel = (node.catchPart == null)
-        ? uncaughtLabel
-        : newLabel("catch");
+    int handlerLabel =
+        (node.catchPart == null) ? uncaughtLabel : newLabel("catch");
 
     int finallyLabel = newLabel("finally");
     int afterFinallyLabel = newLabel("after finally");
@@ -1502,9 +1492,8 @@
       if (node.finallyPart != null) {
         // The error has been caught, so after the finally, continue after the
         // try.
-        addStatement(
-            js.js.statement("#.push(#);",
-                            [next, js.number(afterFinallyLabel)]));
+        addStatement(js.js
+            .statement("#.push(#);", [next, js.number(afterFinallyLabel)]));
         addGoto(finallyLabel);
       } else {
         addGoto(afterFinallyLabel);
@@ -1523,9 +1512,10 @@
     if (enclosingFinallies.isNotEmpty) {
       // [enclosingFinallies] can be empty if there is no surrounding finally
       // blocks. Then [nextLabel] will be [rethrowLabel].
-      addStatement(
-          js.js.statement("# = #;", [next, new js.ArrayInitializer(
-              enclosingFinallies.map(js.number).toList())]));
+      addStatement(js.js.statement("# = #;", [
+        next,
+        new js.ArrayInitializer(enclosingFinallies.map(js.number).toList())
+      ]));
     }
     if (node.finallyPart == null) {
       // The finally-block belonging to [node] will be visited because of
@@ -1574,7 +1564,8 @@
   @override
   js.Expression visitVariableUse(js.VariableUse node) {
     Pair<String, String> renaming = variableRenamings.lastWhere(
-        (Pair renaming) => renaming.a == node.name, orElse: () => null);
+        (Pair renaming) => renaming.a == node.name,
+        orElse: () => null);
     if (renaming == null) return node;
     return new js.VariableUse(renaming.b);
   }
@@ -1627,8 +1618,8 @@
   }
 }
 
-js.VariableInitialization
-    _makeVariableInitializer(dynamic variable, js.Expression initValue) {
+js.VariableInitialization _makeVariableInitializer(
+    dynamic variable, js.Expression initValue) {
   js.VariableDeclaration declaration;
   if (variable is js.VariableUse) {
     declaration = new js.VariableDeclaration(variable.name);
@@ -1642,7 +1633,6 @@
 }
 
 class AsyncRewriter extends AsyncRewriterBase {
-
   bool get isAsync => true;
 
   /// The Completer that will finish an async function.
@@ -1679,32 +1669,28 @@
 
   final js.Expression wrapBody;
 
-  AsyncRewriter(DiagnosticReporter reporter,
-                Spannable spannable,
-                {this.asyncHelper,
-                 this.newCompleter,
-                 this.wrapBody,
-                 String safeVariableName(String proposedName),
-                 js.Name bodyName})
-        : super(reporter,
-                spannable,
-                safeVariableName,
-                bodyName);
+  AsyncRewriter(DiagnosticReporter reporter, Spannable spannable,
+      {this.asyncHelper,
+      this.newCompleter,
+      this.wrapBody,
+      String safeVariableName(String proposedName),
+      js.Name bodyName})
+      : super(reporter, spannable, safeVariableName, bodyName);
 
   @override
   void addYield(js.DartYield node, js.Expression expression) {
-    reporter.internalError(spannable,
-        "Yield in non-generating async function");
+    reporter.internalError(spannable, "Yield in non-generating async function");
   }
 
   void addErrorExit() {
     beginLabel(rethrowLabel);
     addStatement(js.js.statement(
         "return #thenHelper(#currentError, #errorCode, #completer);", {
-          "thenHelper": asyncHelper,
-          "errorCode": js.number(error_codes.ERROR),
-          "currentError": currentError,
-          "completer": completer}));
+      "thenHelper": asyncHelper,
+      "errorCode": js.number(error_codes.ERROR),
+      "currentError": currentError,
+      "completer": completer
+    }));
   }
 
   /// Returning from an async method calls [asyncStarHelper] with the result.
@@ -1718,21 +1704,22 @@
     }
     addStatement(js.js.statement(
         "return #runtimeHelper(#returnValue, #successCode, "
-            "#completer, null);", {
-         "runtimeHelper": asyncHelper,
-         "successCode": js.number(error_codes.SUCCESS),
-         "returnValue": analysis.hasExplicitReturns
-             ? returnValue
-             : new js.LiteralNull(),
-         "completer": completer}));
+        "#completer, null);",
+        {
+          "runtimeHelper": asyncHelper,
+          "successCode": js.number(error_codes.SUCCESS),
+          "returnValue":
+              analysis.hasExplicitReturns ? returnValue : new js.LiteralNull(),
+          "completer": completer
+        }));
   }
 
   @override
   Iterable<js.VariableInitialization> variableInitializations() {
     List<js.VariableInitialization> variables =
         new List<js.VariableInitialization>();
-    variables.add(_makeVariableInitializer(completer,
-                                        new js.New(newCompleter, [])));
+    variables
+        .add(_makeVariableInitializer(completer, new js.New(newCompleter, [])));
     if (analysis.hasExplicitReturns) {
       variables.add(_makeVariableInitializer(returnValue, null));
     }
@@ -1746,22 +1733,27 @@
 
   @override
   js.Statement awaitStatement(js.Expression value) {
-    return js.js.statement("""
+    return js.js.statement(
+        """
           return #asyncHelper(#value,
                               #bodyName,
                               #completer);
-          """, {
-            "asyncHelper": asyncHelper,
-            "value": value,
-            "bodyName": bodyName,
-            "completer": completer});
+          """,
+        {
+          "asyncHelper": asyncHelper,
+          "value": value,
+          "bodyName": bodyName,
+          "completer": completer
+        });
   }
 
   @override
-  js.Fun finishFunction(List<js.Parameter> parameters,
-                        js.Statement rewrittenBody,
-                        js.VariableDeclarationList variableDeclarations) {
-    return js.js("""
+  js.Fun finishFunction(
+      List<js.Parameter> parameters,
+      js.Statement rewrittenBody,
+      js.VariableDeclarationList variableDeclarations) {
+    return js.js(
+        """
         function (#parameters) {
           #variableDeclarations;
           var #bodyName = #wrapBody(function (#errorCode, #result) {
@@ -1772,7 +1764,8 @@
             #rewrittenBody;
           });
           return #asyncHelper(null, #bodyName, #completer, null);
-        }""", {
+        }""",
+        {
           "parameters": parameters,
           "variableDeclarations": variableDeclarations,
           "ERROR": js.number(error_codes.ERROR),
@@ -1791,7 +1784,6 @@
 }
 
 class SyncStarRewriter extends AsyncRewriterBase {
-
   bool get isSyncStar => true;
 
   /// Contructor creating the Iterable for a sync* method. Called with
@@ -1811,18 +1803,14 @@
   /// Used by sync* functions to throw exeptions.
   final js.Expression uncaughtErrorExpression;
 
-  SyncStarRewriter(DiagnosticReporter diagnosticListener,
-                spannable,
-                {this.endOfIteration,
-                 this.newIterable,
-                 this.yieldStarExpression,
-                 this.uncaughtErrorExpression,
-                 String safeVariableName(String proposedName),
-                 js.Name bodyName})
-        : super(diagnosticListener,
-                spannable,
-                safeVariableName,
-                bodyName);
+  SyncStarRewriter(DiagnosticReporter diagnosticListener, spannable,
+      {this.endOfIteration,
+      this.newIterable,
+      this.yieldStarExpression,
+      this.uncaughtErrorExpression,
+      String safeVariableName(String proposedName),
+      js.Name bodyName})
+      : super(diagnosticListener, spannable, safeVariableName, bodyName);
 
   /// Translates a yield/yield* in an sync*.
   ///
@@ -1839,9 +1827,10 @@
   }
 
   @override
-  js.Fun finishFunction(List<js.Parameter> parameters,
-                        js.Statement rewrittenBody,
-                        js.VariableDeclarationList variableDeclarations) {
+  js.Fun finishFunction(
+      List<js.Parameter> parameters,
+      js.Statement rewrittenBody,
+      js.VariableDeclarationList variableDeclarations) {
     // Each iterator invocation on the iterable should work on its own copy of
     // the parameters.
     // TODO(sigurdm): We only need to do this copying for parameters that are
@@ -1853,13 +1842,13 @@
       String name = parameter.name;
       String renamedName = freshName(name);
       renamedParameters.add(new js.Parameter(renamedName));
-      declarations.add(
-          new js.VariableInitialization(new js.VariableDeclaration(name),
-                                        new js.VariableUse(renamedName)));
+      declarations.add(new js.VariableInitialization(
+          new js.VariableDeclaration(name), new js.VariableUse(renamedName)));
     }
     js.VariableDeclarationList copyParameters =
         new js.VariableDeclarationList(declarations);
-    return js.js("""
+    return js.js(
+        """
           function (#renamedParameters) {
             if (#needsThis)
               var #self = this;
@@ -1877,29 +1866,30 @@
               };
             });
           }
-          """, {
-            "renamedParameters": renamedParameters,
-            "needsThis": analysis.hasThis,
-            "helperBody": rewrittenBody,
-            "hasParameters": parameters.isNotEmpty,
-            "copyParameters": copyParameters,
-            "varDecl": variableDeclarations,
-            "errorCode": errorCodeName,
-            "newIterable": newIterable,
-            "body": bodyName,
-            "self": selfName,
-            "result": resultName,
-            "goto": goto,
-            "handler": handler,
-            "currentError": currentErrorName,
-            "ERROR": js.number(error_codes.ERROR),
-          });
+          """,
+        {
+          "renamedParameters": renamedParameters,
+          "needsThis": analysis.hasThis,
+          "helperBody": rewrittenBody,
+          "hasParameters": parameters.isNotEmpty,
+          "copyParameters": copyParameters,
+          "varDecl": variableDeclarations,
+          "errorCode": errorCodeName,
+          "newIterable": newIterable,
+          "body": bodyName,
+          "self": selfName,
+          "result": resultName,
+          "goto": goto,
+          "handler": handler,
+          "currentError": currentErrorName,
+          "ERROR": js.number(error_codes.ERROR),
+        });
   }
 
   void addErrorExit() {
     beginLabel(rethrowLabel);
-    addStatement(js.js.statement('return #(#);',
-                 [uncaughtErrorExpression, currentError]));
+    addStatement(js.js
+        .statement('return #(#);', [uncaughtErrorExpression, currentError]));
   }
 
   /// Returning from a sync* function returns an [endOfIteration] marker.
@@ -1921,8 +1911,8 @@
 
   @override
   js.Statement awaitStatement(js.Expression value) {
-    throw reporter.internalError(spannable,
-        "Sync* functions cannot contain await statements.");
+    throw reporter.internalError(
+        spannable, "Sync* functions cannot contain await statements.");
   }
 
   @override
@@ -1930,7 +1920,6 @@
 }
 
 class AsyncStarRewriter extends AsyncRewriterBase {
-
   bool get isAsyncStar => true;
 
   /// The stack of labels of finally blocks to assign to [next] if the
@@ -1938,6 +1927,7 @@
   js.VariableUse get nextWhenCanceled {
     return new js.VariableUse(nextWhenCanceledName);
   }
+
   String nextWhenCanceledName;
 
   /// The StreamController that controls an async* function.
@@ -1982,21 +1972,16 @@
 
   final js.Expression wrapBody;
 
-  AsyncStarRewriter(DiagnosticReporter reporter,
-                    Spannable spannable,
-                    {this.asyncStarHelper,
-                     this.streamOfController,
-                     this.newController,
-                     this.yieldExpression,
-                     this.yieldStarExpression,
-                     this.wrapBody,
-                     String safeVariableName(String proposedName),
-                     js.Name bodyName})
-        : super(reporter,
-                spannable,
-                safeVariableName,
-                bodyName);
-
+  AsyncStarRewriter(DiagnosticReporter reporter, Spannable spannable,
+      {this.asyncStarHelper,
+      this.streamOfController,
+      this.newController,
+      this.yieldExpression,
+      this.yieldStarExpression,
+      this.wrapBody,
+      String safeVariableName(String proposedName),
+      js.Name bodyName})
+      : super(reporter, spannable, safeVariableName, bodyName);
 
   /// Translates a yield/yield* in an async* function.
   ///
@@ -2015,25 +2000,31 @@
     enclosingFinallyLabels.addAll(jumpTargets
         .where((js.Node node) => finallyLabels[node] != null)
         .map((js.Block node) => finallyLabels[node]));
-    addStatement(js.js.statement("# = #;",
-        [nextWhenCanceled, new js.ArrayInitializer(
-            enclosingFinallyLabels.map(js.number).toList())]));
-    addStatement(js.js.statement("""
+    addStatement(js.js.statement("# = #;", [
+      nextWhenCanceled,
+      new js.ArrayInitializer(enclosingFinallyLabels.map(js.number).toList())
+    ]));
+    addStatement(js.js.statement(
+        """
         return #asyncStarHelper(#yieldExpression(#expression), #bodyName,
-            #controller);""", {
-      "asyncStarHelper": asyncStarHelper,
-      "yieldExpression": node.hasStar ? yieldStarExpression : yieldExpression,
-      "expression": expression,
-      "bodyName": bodyName,
-      "controller": controllerName,
-    }));
+            #controller);""",
+        {
+          "asyncStarHelper": asyncStarHelper,
+          "yieldExpression":
+              node.hasStar ? yieldStarExpression : yieldExpression,
+          "expression": expression,
+          "bodyName": bodyName,
+          "controller": controllerName,
+        }));
   }
 
   @override
-  js.Fun finishFunction(List<js.Parameter> parameters,
-                        js.Statement rewrittenBody,
-                        js.VariableDeclarationList variableDeclarations) {
-    return js.js("""
+  js.Fun finishFunction(
+      List<js.Parameter> parameters,
+      js.Statement rewrittenBody,
+      js.VariableDeclarationList variableDeclarations) {
+    return js.js(
+        """
         function (#parameters) {
           var #bodyName = #wrapBody(function (#errorCode, #result) {
             if (#hasYield) {
@@ -2056,7 +2047,8 @@
           });
           #variableDeclarations;
           return #streamOfController(#controller);
-        }""", {
+        }""",
+        {
           "parameters": parameters,
           "variableDeclarations": variableDeclarations,
           "STREAM_WAS_CANCELED": js.number(error_codes.STREAM_WAS_CANCELED),
@@ -2082,10 +2074,11 @@
     beginLabel(rethrowLabel);
     addStatement(js.js.statement(
         "return #asyncHelper(#currentError, #errorCode, #controller);", {
-          "asyncHelper": asyncStarHelper,
-          "errorCode": js.number(error_codes.ERROR),
-          "currentError": currentError,
-          "controller": controllerName}));
+      "asyncHelper": asyncStarHelper,
+      "errorCode": js.number(error_codes.ERROR),
+      "currentError": currentError,
+      "controller": controllerName
+    }));
   }
 
   /// Returning from an async* function calls the [streamHelper] with an
@@ -2094,20 +2087,20 @@
   void addSuccesExit() {
     beginLabel(exitLabel);
 
-    addStatement(js.js.statement(
-      "return #streamHelper(null, #successCode, #controller);", {
+    addStatement(js.js
+        .statement("return #streamHelper(null, #successCode, #controller);", {
       "streamHelper": asyncStarHelper,
       "successCode": js.number(error_codes.SUCCESS),
-      "controller": controllerName}));
+      "controller": controllerName
+    }));
   }
 
   @override
   Iterable<js.VariableInitialization> variableInitializations() {
     List<js.VariableInitialization> variables =
         new List<js.VariableInitialization>();
-    variables.add(_makeVariableInitializer(controller,
-                         js.js('#(#)',
-                               [newController, bodyName])));
+    variables.add(_makeVariableInitializer(
+        controller, js.js('#(#)', [newController, bodyName])));
     if (analysis.hasYield) {
       variables.add(_makeVariableInitializer(nextWhenCanceled, null));
     }
@@ -2122,15 +2115,18 @@
 
   @override
   js.Statement awaitStatement(js.Expression value) {
-    return js.js.statement("""
+    return js.js.statement(
+        """
           return #asyncHelper(#value,
                               #bodyName,
                               #controller);
-          """, {
-            "asyncHelper": asyncStarHelper,
-            "value": value,
-            "bodyName": bodyName,
-            "controller": controllerName});
+          """,
+        {
+          "asyncHelper": asyncStarHelper,
+          "value": value,
+          "bodyName": bodyName,
+          "controller": controllerName
+        });
   }
 }
 
@@ -2232,8 +2228,8 @@
   @override
   bool visitBreak(js.Break node) {
     if (node.targetLabel != null) {
-      targets[node] = labelledStatements.lastWhere(
-          (js.LabeledStatement statement) {
+      targets[node] =
+          labelledStatements.lastWhere((js.LabeledStatement statement) {
         return statement.label == node.targetLabel;
       });
     } else {
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 14d1f6e..7f751db 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -107,7 +107,8 @@
     if (insideLoop) {
       switch (oldDecision) {
         case _mustNotInline:
-          throw new SpannableAssertionFailure(element,
+          throw new SpannableAssertionFailure(
+              element,
               "Can't mark a function as non-inlinable and inlinable at the "
               "same time.");
 
@@ -133,7 +134,8 @@
         case _mustNotInline:
         case _mayInlineInLoopMustNotOutside:
         case _canInlineInLoopMustNotOutside:
-          throw new SpannableAssertionFailure(element,
+          throw new SpannableAssertionFailure(
+              element,
               "Can't mark a function as non-inlinable and inlinable at the "
               "same time.");
 
@@ -146,7 +148,6 @@
         case _mustInline:
           // Do nothing.
           break;
-
       }
     }
   }
@@ -164,7 +165,8 @@
         case _canInlineInLoopMayInlineOutside:
         case _canInline:
         case _mustInline:
-          throw new SpannableAssertionFailure(element,
+          throw new SpannableAssertionFailure(
+              element,
               "Can't mark a function as non-inlinable and inlinable at the "
               "same time.");
 
@@ -181,7 +183,8 @@
       switch (oldDecision) {
         case _canInline:
         case _mustInline:
-          throw new SpannableAssertionFailure(element,
+          throw new SpannableAssertionFailure(
+              element,
               "Can't mark a function as non-inlinable and inlinable at the "
               "same time.");
 
@@ -215,7 +218,7 @@
 enum SyntheticConstantKind {
   DUMMY_INTERCEPTOR,
   EMPTY_VALUE,
-  TYPEVARIABLE_REFERENCE,  // Reference to a type in reflection data.
+  TYPEVARIABLE_REFERENCE, // Reference to a type in reflection data.
   NAME
 }
 
@@ -226,7 +229,6 @@
 
   final Annotations annotations;
 
-
   /// Set of classes that need to be considered for reflection although not
   /// otherwise visible during resolution.
   Iterable<ClassElement> get classesRequiredForReflection {
@@ -253,7 +255,7 @@
   /// information will be sent to a server via a POST request.
   static const String TRACE_METHOD = const String.fromEnvironment('traceCalls');
   static const bool TRACE_CALLS =
-    TRACE_METHOD == 'post' || TRACE_METHOD == 'console';
+      TRACE_METHOD == 'post' || TRACE_METHOD == 'console';
   Element traceHelper;
 
   TypeMask get stringType => compiler.typesTask.stringType;
@@ -271,8 +273,8 @@
   TypeMask _indexablePrimitiveTypeCache;
   TypeMask get indexablePrimitiveType {
     if (_indexablePrimitiveTypeCache == null) {
-      _indexablePrimitiveTypeCache = new TypeMask.nonNullSubtype(
-          helpers.jsIndexableClass, compiler.world);
+      _indexablePrimitiveTypeCache =
+          new TypeMask.nonNullSubtype(helpers.jsIndexableClass, compiler.world);
     }
     return _indexablePrimitiveTypeCache;
   }
@@ -280,8 +282,8 @@
   TypeMask _readableArrayTypeCache;
   TypeMask get readableArrayType {
     if (_readableArrayTypeCache == null) {
-      _readableArrayTypeCache = new TypeMask.nonNullSubclass(
-          helpers.jsArrayClass, compiler.world);
+      _readableArrayTypeCache =
+          new TypeMask.nonNullSubclass(helpers.jsArrayClass, compiler.world);
     }
     return _readableArrayTypeCache;
   }
@@ -298,8 +300,8 @@
   TypeMask _fixedArrayTypeCache;
   TypeMask get fixedArrayType {
     if (_fixedArrayTypeCache == null) {
-      _fixedArrayTypeCache = new TypeMask.nonNullExact(
-          helpers.jsFixedArrayClass, compiler.world);
+      _fixedArrayTypeCache =
+          new TypeMask.nonNullExact(helpers.jsFixedArrayClass, compiler.world);
     }
     return _fixedArrayTypeCache;
   }
@@ -325,8 +327,7 @@
   TypeMask _nonNullTypeCache;
   TypeMask get nonNullType {
     if (_nonNullTypeCache == null) {
-      _nonNullTypeCache =
-          compiler.typesTask.dynamicType.nonNullable();
+      _nonNullTypeCache = compiler.typesTask.dynamicType.nonNullable();
     }
     return _nonNullTypeCache;
   }
@@ -472,8 +473,7 @@
 
   // Checked mode helpers indexed by name.
   Map<String, CheckedModeHelper> checkedModeHelperByName =
-      new Map<String, CheckedModeHelper>.fromIterable(
-          checkedModeHelpers,
+      new Map<String, CheckedModeHelper>.fromIterable(checkedModeHelpers,
           key: (helper) => helper.name);
 
   TypeVariableHandler typeVariableHandler;
@@ -504,12 +504,17 @@
 
   SourceInformationStrategy sourceInformationStrategy;
 
+  JavaScriptBackendSerialization serialization;
+
+  final NativeData nativeData = new NativeData();
+
   final BackendHelpers helpers;
   final BackendImpacts impacts;
 
   JavaScriptBackend(Compiler compiler,
-                    {bool generateSourceMap: true,
-                     bool useStartupEmitter: false})
+      {bool generateSourceMap: true,
+      bool useStartupEmitter: false,
+      bool useNewSourceInfo: false})
       : namer = determineNamer(compiler),
         oneShotInterceptors = new Map<jsAst.Name, Selector>(),
         interceptedElements = new Map<String, Set<Element>>(),
@@ -517,12 +522,11 @@
         rtiEncoder = new _RuntimeTypesEncoder(compiler),
         specializedGetInterceptors = new Map<jsAst.Name, Set<ClassElement>>(),
         annotations = new Annotations(compiler),
-        this.sourceInformationStrategy =
-            generateSourceMap
-                ? (useNewSourceInfo
-                     ? new PositionSourceInformationStrategy()
-                     : const StartEndSourceInformationStrategy())
-                : const JavaScriptSourceInformationStrategy(),
+        this.sourceInformationStrategy = generateSourceMap
+            ? (useNewSourceInfo
+                ? new PositionSourceInformationStrategy()
+                : const StartEndSourceInformationStrategy())
+            : const JavaScriptSourceInformationStrategy(),
         helpers = new BackendHelpers(compiler),
         impacts = new BackendImpacts(compiler),
         super(compiler) {
@@ -537,10 +541,10 @@
     constantCompilerTask = new JavaScriptConstantTask(compiler);
     impactTransformer = new JavaScriptImpactTransformer(this);
     patchResolverTask = new PatchResolverTask(compiler);
-    functionCompiler = compiler.useCpsIr
-         ? new CpsFunctionCompiler(
-             compiler, this, sourceInformationStrategy)
-         : new SsaFunctionCompiler(this, sourceInformationStrategy);
+    functionCompiler = compiler.options.useCpsIr
+        ? new CpsFunctionCompiler(compiler, this, sourceInformationStrategy)
+        : new SsaFunctionCompiler(this, sourceInformationStrategy);
+    serialization = new JavaScriptBackendSerialization(this);
   }
 
   ConstantSystem get constantSystem => constants.constantSystem;
@@ -563,11 +567,11 @@
     if (isForeign(element)) {
       return element;
     }
-    if (isJsInterop(element))  {
+    if (isJsInterop(element)) {
       if (element.memberName == const PublicName('[]') ||
           element.memberName == const PublicName('[]=')) {
-        reporter.reportErrorMessage(element,
-            MessageKind.JS_INTEROP_INDEX_NOT_SUPPORTED);
+        reporter.reportErrorMessage(
+            element, MessageKind.JS_INTEROP_INDEX_NOT_SUPPORTED);
       }
       return element;
     }
@@ -580,15 +584,15 @@
 
   bool isBackendLibrary(LibraryElement library) {
     return library == helpers.interceptorsLibrary ||
-           library == helpers.jsHelperLibrary;
+        library == helpers.jsHelperLibrary;
   }
 
   static Namer determineNamer(Compiler compiler) {
-    return compiler.enableMinification ?
-        compiler.useFrequencyNamer ?
-            new FrequencyBasedNamer(compiler) :
-            new MinifyNamer(compiler) :
-        new Namer(compiler);
+    return compiler.options.enableMinification
+        ? compiler.options.useFrequencyNamer
+            ? new FrequencyBasedNamer(compiler)
+            : new MinifyNamer(compiler)
+        : new Namer(compiler);
   }
 
   /// The backend must *always* call this method when enqueuing an
@@ -599,48 +603,53 @@
   // TODO(johnniwinther): Replace this with a more precise modelling; type
   // inference of these elements is disabled.
   Element registerBackendUse(Element element) {
-    if (element != null) {
-      bool registerUse = false;
-      if (element == helpers.streamIteratorConstructor ||
-          element == helpers.compiler.symbolConstructor ||
-          element == helpers.compiler.symbolValidatedConstructor ||
-          element == helpers.syncCompleterConstructor ||
-          element == coreClasses.symbolClass ||
-          element == helpers.objectNoSuchMethod) {
-        // TODO(johnniwinther): These are valid but we could be more precise.
-        registerUse = true;
-      } else if (element.implementationLibrary.isPatch ||
-                 element.library == helpers.jsHelperLibrary ||
-                 element.library == helpers.interceptorsLibrary ||
-                 element.library == helpers.isolateHelperLibrary) {
-        // TODO(johnniwinther): We should be more precise about these.
-        registerUse = true;
-      } else if (element == coreClasses.listClass ||
-                 element == helpers.mapLiteralClass ||
-                 element == coreClasses.functionClass ||
-                 element == coreClasses.stringClass) {
-        // TODO(johnniwinther): Avoid these.
-        registerUse = true;
-      }
-      if (!registerUse) {
-        assert(invariant(element, false,
-            message: "Backend use of $element is not allowed."));
-        return element;
-      }
-      helpersUsed.add(element.declaration);
-      if (element.isClass && element.isPatched) {
-        // Both declaration and implementation may declare fields, so we
-        // add both to the list of helpers.
-        helpersUsed.add(element.implementation);
-      }
+    if (element == null) return null;
+    assert(invariant(element, _isValidBackendUse(element),
+        message: "Backend use of $element is not allowed."));
+    helpersUsed.add(element.declaration);
+    if (element.isClass && element.isPatched) {
+      // Both declaration and implementation may declare fields, so we
+      // add both to the list of helpers.
+      helpersUsed.add(element.implementation);
     }
     return element;
   }
 
+  bool _isValidBackendUse(Element element) {
+    assert(invariant(element, element.isDeclaration, message: ""));
+    if (element == helpers.streamIteratorConstructor ||
+        element == helpers.compiler.symbolConstructor ||
+        element == helpers.compiler.symbolValidatedConstructor ||
+        element == helpers.syncCompleterConstructor ||
+        element == coreClasses.symbolClass ||
+        element == helpers.objectNoSuchMethod) {
+      // TODO(johnniwinther): These are valid but we could be more precise.
+      return true;
+    } else if (element.implementationLibrary.isPatch ||
+        // Needed to detect deserialized injected elements, that is
+        // element declared in patch files.
+        (element.library.isPlatformLibrary &&
+            element.sourcePosition.uri.path
+                .contains('_internal/js_runtime/lib/')) ||
+        element.library == helpers.jsHelperLibrary ||
+        element.library == helpers.interceptorsLibrary ||
+        element.library == helpers.isolateHelperLibrary) {
+      // TODO(johnniwinther): We should be more precise about these.
+      return true;
+    } else if (element == coreClasses.listClass ||
+        element == helpers.mapLiteralClass ||
+        element == coreClasses.functionClass ||
+        element == coreClasses.stringClass) {
+      // TODO(johnniwinther): Avoid these.
+      return true;
+    }
+    return false;
+  }
+
   bool usedByBackend(Element element) {
-    if (element.isParameter
-        || element.isInitializingFormal
-        || element.isField) {
+    if (element.isParameter ||
+        element.isInitializingFormal ||
+        element.isField) {
       if (usedByBackend(element.enclosingElement)) return true;
     }
     return helpersUsed.contains(element.declaration);
@@ -653,8 +662,8 @@
     }
 
     if (element.isField) {
-      if (Elements.isStaticOrTopLevel(element)
-          && (element.isFinal || element.isConst)) {
+      if (Elements.isStaticOrTopLevel(element) &&
+          (element.isFinal || element.isConst)) {
         return false;
       }
     }
@@ -701,7 +710,7 @@
   }
 
   bool canUseAliasedSuperMember(Element member, Selector selector) {
-    return !selector.isGetter && !compiler.hasIncrementalSupport;
+    return !selector.isGetter && !compiler.options.hasIncrementalSupport;
   }
 
   /**
@@ -711,161 +720,16 @@
     return aliasedSuperMembers.contains(member);
   }
 
-  /// The JavaScript names for elements implemented via typed JavaScript
-  /// interop.
-  Map<Element, String> jsInteropNames = <Element, String>{};
-
-  /// The JavaScript names for native JavaScript elements implemented.
-  Map<Element, String> nativeMemberName = <Element, String>{};
-
-  /// Tag info for native JavaScript classes names. See
-  /// [setNativeClassTagInfo].
-  Map<ClassElement, String> nativeClassTagInfo = <ClassElement, String>{};
-
-  /// Returns `true` if [element] is explicitly marked as part of JsInterop.
-  bool _isJsInterop(Element element) {
-    return jsInteropNames.containsKey(element.declaration);
-  }
-
-  /// Returns [element] as an explicit part of JsInterop. The js interop name is
-  /// expected to be computed later.
-  void markAsJsInterop(Element element) {
-    jsInteropNames[element.declaration] = null;
-  }
-
-  /// Sets the explicit js interop [name] for [element].
-  void setJsInteropName(Element element, String name) {
-    assert(invariant(element,
-        isJsInterop(element),
-        message:
-          'Element $element is not js interop but given a js interop name.'));
-    jsInteropNames[element.declaration] = name;
-  }
-
-  /// Returns the explicit js interop name for [element].
-  String getJsInteropName(Element element) {
-    return jsInteropNames[element.declaration];
-  }
-
   /// Returns `true` if [element] is part of JsInterop.
   @override
-  bool isJsInterop(Element element) {
-    // An function is part of JsInterop in the following cases:
-    // * It has a jsInteropName annotation
-    // * It is external member of a class or library tagged as JsInterop.
-    if (element.isFunction || element.isConstructor || element.isAccessor) {
-      FunctionElement function = element;
-      if (!function.isExternal) return false;
-
-      if (_isJsInterop(function)) return true;
-      if (function.isClassMember) return isJsInterop(function.contextClass);
-      if (function.isTopLevel) return isJsInterop(function.library);
-      return false;
-    } else {
-      return _isJsInterop(element);
-    }
-  }
-
-  /// Returns `true` if the name of [element] is fixed for the generated
-  /// JavaScript.
-  bool hasFixedBackendName(Element element) {
-    return isJsInterop(element) ||
-        nativeMemberName.containsKey(element.declaration);
-  }
-
-  String _jsNameHelper(Element element) {
-    String jsInteropName = jsInteropNames[element.declaration];
-    assert(invariant(element,
-        !(_isJsInterop(element) && jsInteropName == null),
-        message:
-            'Element $element is js interop but js interop name has not yet '
-            'been computed.'));
-    if (jsInteropName != null && jsInteropName.isNotEmpty) {
-      return jsInteropName;
-    }
-    return element.isLibrary ? 'self' : element.name;
-  }
-
-  /// Computes the name for [element] to use in the generated JavaScript. This
-  /// is either given through a native annotation or a js interop annotation.
-  String getFixedBackendName(Element element) {
-    String name = nativeMemberName[element.declaration];
-    if (name == null && isJsInterop(element)) {
-      // If an element isJsInterop but _isJsInterop is false that means it is
-      // considered interop as the parent class is interop.
-      name = _jsNameHelper(
-          element.isConstructor ? element.enclosingClass : element);
-      nativeMemberName[element.declaration] = name;
-    }
-    return name;
-  }
+  bool isJsInterop(Element element) => nativeData.isJsInterop(element);
 
   /// Whether [element] corresponds to a native JavaScript construct either
   /// through the native mechanism (`@Native(...)` or the `native` pseudo
   /// keyword) which is only allowed for internal libraries or via the typed
   /// JavaScriptInterop mechanism which is allowed for user libraries.
   @override
-  bool isNative(Element element) {
-    if (isJsInterop(element)) return true;
-    if (element.isClass) {
-      return nativeClassTagInfo.containsKey(element.declaration);
-    } else {
-      return nativeMemberName.containsKey(element.declaration);
-    }
-  }
-
-  /// Sets the native [name] for the member [element]. This name is used for
-  /// [element] in the generated JavaScript.
-  void setNativeMemberName(MemberElement element, String name) {
-    // TODO(johnniwinther): Avoid setting this more than once. The enqueuer
-    // might enqueue [element] several times (before processing it) and computes
-    // name on each call to `internalAddToWorkList`.
-    assert(invariant(element,
-        nativeMemberName[element.declaration] == null ||
-        nativeMemberName[element.declaration] == name,
-        message:
-          "Native member name set inconsistently on $element: "
-          "Existing name '${nativeMemberName[element.declaration]}', "
-          "new name '$name'."));
-    nativeMemberName[element.declaration] = name;
-  }
-
-  /// 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 `!`.
-  void setNativeClassTagInfo(ClassElement cls, String tagInfo) {
-    // TODO(johnniwinther): Assert that this is only called once. The memory
-    // compiler copies pre-processed elements into a new compiler through
-    // [Compiler.onLibraryScanned] and thereby causes multiple calls to this
-    // method.
-    assert(invariant(cls,
-        nativeClassTagInfo[cls.declaration] == null ||
-        nativeClassTagInfo[cls.declaration] == tagInfo,
-        message:
-          "Native tag info set inconsistently on $cls: "
-          "Existing tag info '${nativeClassTagInfo[cls.declaration]}', "
-          "new tag info '$tagInfo'."));
-    nativeClassTagInfo[cls.declaration] = tagInfo;
-  }
-
-  /// Returns the list of native tag words for [cls].
-  List<String> getNativeTagsOfClassRaw(ClassElement cls) {
-    String quotedName = nativeClassTagInfo[cls.declaration];
-    return quotedName.substring(1, quotedName.length - 1).split(',');
-  }
-
-  /// Returns the list of non-directive native tag words for [cls].
-  List<String> getNativeTagsOfClass(ClassElement cls) {
-    return getNativeTagsOfClassRaw(cls).where(
-        (s) => !s.startsWith('!')).toList();
-  }
-
-  /// Returns `true` if [cls] has a `!nonleaf` tag word.
-  bool hasNativeTagsForcedNonLeaf(ClassElement cls) {
-    return getNativeTagsOfClassRaw(cls).contains('!nonleaf');
-  }
+  bool isNative(Element element) => nativeData.isNative(element);
 
   bool isNativeOrExtendsNative(ClassElement element) {
     if (element == null) return false;
@@ -908,23 +772,21 @@
    * explicit receiver' optimization.
    */
   bool isInterceptedMixinSelector(Selector selector, TypeMask mask) {
-    Set<Element> elements = interceptedMixinElements.putIfAbsent(
-        selector.name,
-        () {
-          Set<Element> elements = interceptedElements[selector.name];
-          if (elements == null) return null;
-          return elements
-              .where((element) =>
-                  classesMixedIntoInterceptedClasses.contains(
-                      element.enclosingClass))
-              .toSet();
-        });
+    Set<Element> elements =
+        interceptedMixinElements.putIfAbsent(selector.name, () {
+      Set<Element> elements = interceptedElements[selector.name];
+      if (elements == null) return null;
+      return elements
+          .where((element) => classesMixedIntoInterceptedClasses
+              .contains(element.enclosingClass))
+          .toSet();
+    });
 
     if (elements == null) return false;
     if (elements.isEmpty) return false;
     return elements.any((element) {
       return selector.applies(element, compiler.world) &&
-             (mask == null || mask.canHit(element, selector, compiler.world));
+          (mask == null || mask.canHit(element, selector, compiler.world));
     });
   }
 
@@ -932,12 +794,12 @@
   /// and never exists at runtime.
   bool isCompileTimeOnlyClass(ClassElement class_) {
     return class_ == helpers.jsPositiveIntClass ||
-           class_ == helpers.jsUInt32Class ||
-           class_ == helpers.jsUInt31Class ||
-           class_ == helpers.jsFixedArrayClass ||
-           class_ == helpers.jsUnmodifiableArrayClass ||
-           class_ == helpers.jsMutableArrayClass ||
-           class_ == helpers.jsExtendableArrayClass;
+        class_ == helpers.jsUInt32Class ||
+        class_ == helpers.jsUInt31Class ||
+        class_ == helpers.jsFixedArrayClass ||
+        class_ == helpers.jsUnmodifiableArrayClass ||
+        class_ == helpers.jsMutableArrayClass ||
+        class_ == helpers.jsExtendableArrayClass;
   }
 
   /// Maps compile-time classes to their runtime class.  The runtime class is
@@ -965,8 +827,8 @@
       for (Element element in intercepted) {
         ClassElement classElement = element.enclosingClass;
         if (isCompileTimeOnlyClass(classElement)) continue;
-        if (isNativeOrExtendsNative(classElement)
-            || interceptedClasses.contains(classElement)) {
+        if (isNativeOrExtendsNative(classElement) ||
+            interceptedClasses.contains(classElement)) {
           result.add(classElement);
         }
         if (classesMixedIntoInterceptedClasses.contains(classElement)) {
@@ -995,8 +857,7 @@
   }
 
   bool operatorEqHandlesNullArgument(FunctionElement operatorEqfunction) {
-    return specialOperatorEqClasses.contains(
-        operatorEqfunction.enclosingClass);
+    return specialOperatorEqClasses.contains(operatorEqfunction.enclosingClass);
   }
 
   void validateInterceptorImplementsAllObjectMethods(
@@ -1008,7 +869,12 @@
       Element interceptorMember = interceptorClass.lookupMember(member.name);
       // Interceptors must override all Object methods due to calling convention
       // differences.
-      assert(interceptorMember.enclosingClass == interceptorClass);
+      assert(invariant(interceptorMember,
+          interceptorMember.enclosingClass == interceptorClass,
+          message:
+              "Member ${member.name} not overridden in ${interceptorClass}. "
+              "Found $interceptorMember from "
+              "${interceptorMember.enclosingClass}."));
     });
   }
 
@@ -1019,8 +885,7 @@
       cls.forEachMember((ClassElement classElement, Element member) {
         if (member.name == Identifiers.call) {
           reporter.reportErrorMessage(
-              member,
-              MessageKind.CALL_NOT_SUPPORTED_ON_NATIVE_CLASS);
+              member, MessageKind.CALL_NOT_SUPPORTED_ON_NATIVE_CLASS);
           return;
         }
         if (member.isSynthesized) return;
@@ -1029,8 +894,7 @@
         Set<Element> set = interceptedElements.putIfAbsent(
             member.name, () => new Set<Element>());
         set.add(member);
-      },
-      includeSuperAndInjectedMembers: true);
+      }, includeSuperAndInjectedMembers: true);
 
       // Walk superclass chain to find mixins.
       for (; cls != null; cls = cls.superclass) {
@@ -1042,21 +906,18 @@
     }
   }
 
-  void addInterceptors(ClassElement cls,
-                       Enqueuer enqueuer,
-                       Registry registry) {
+  void addInterceptors(ClassElement cls, Enqueuer enqueuer, Registry registry) {
     if (enqueuer.isResolutionQueue) {
       _interceptedClasses.add(helpers.jsInterceptorClass);
       _interceptedClasses.add(cls);
       cls.ensureResolved(resolution);
       cls.forEachMember((ClassElement classElement, Element member) {
-          // All methods on [Object] are shadowed by [Interceptor].
-          if (classElement == coreClasses.objectClass) return;
-          Set<Element> set = interceptedElements.putIfAbsent(
-              member.name, () => new Set<Element>());
-          set.add(member);
-        },
-        includeSuperAndInjectedMembers: true);
+        // All methods on [Object] are shadowed by [Interceptor].
+        if (classElement == coreClasses.objectClass) return;
+        Set<Element> set = interceptedElements.putIfAbsent(
+            member.name, () => new Set<Element>());
+        set.add(member);
+      }, includeSuperAndInjectedMembers: true);
     }
     enqueueClass(enqueuer, cls, registry);
   }
@@ -1080,8 +941,7 @@
   void registerCompileTimeConstant(ConstantValue constant, Registry registry) {
     registerCompileTimeConstantInternal(constant, registry);
 
-    if (!registry.isForResolution &&
-        lookupMapAnalysis.isLookupMap(constant)) {
+    if (!registry.isForResolution && lookupMapAnalysis.isLookupMap(constant)) {
       // Note: internally, this registration will temporarily remove the
       // constant dependencies and add them later on-demand.
       lookupMapAnalysis.registerLookupMapReference(constant);
@@ -1096,8 +956,8 @@
     constants.addCompileTimeConstantForEmission(constant);
   }
 
-  void registerCompileTimeConstantInternal(ConstantValue constant,
-                                           Registry registry) {
+  void registerCompileTimeConstantInternal(
+      ConstantValue constant, Registry registry) {
     DartType type = constant.getType(compiler.coreTypes);
     registerInstantiatedConstantType(type, registry);
 
@@ -1121,51 +981,46 @@
     if (type is InterfaceType) {
       registry.registerInstantiation(instantiatedType);
       if (!type.treatAsRaw && classNeedsRti(type.element)) {
-        registry.registerStaticUse(
-            new StaticUse.staticInvoke(
-                // TODO(johnniwinther): Find the right [CallStructure].
-                helpers.setRuntimeTypeInfo, null));
+        registry.registerStaticUse(new StaticUse.staticInvoke(
+            // TODO(johnniwinther): Find the right [CallStructure].
+            helpers.setRuntimeTypeInfo,
+            null));
       }
       if (type.element == typeImplementation) {
         // If we use a type literal in a constant, the compile time
         // constant emitter will generate a call to the createRuntimeType
         // helper so we register a use of that.
-        registry.registerStaticUse(
-            new StaticUse.staticInvoke(
-                // TODO(johnniwinther): Find the right [CallStructure].
+        registry.registerStaticUse(new StaticUse.staticInvoke(
+            // TODO(johnniwinther): Find the right [CallStructure].
 
-                helpers.createRuntimeType, null));
+            helpers.createRuntimeType,
+            null));
       }
     }
   }
 
   void registerMetadataConstant(MetadataAnnotation metadata,
-                                Element annotatedElement,
-                                Registry registry) {
+      Element annotatedElement, Registry registry) {
     assert(registry.isForResolution);
     ConstantValue constant = constants.getConstantValueForMetadata(metadata);
     registerCompileTimeConstant(constant, registry);
     metadataConstants.add(new Dependency(constant, annotatedElement));
   }
 
-  void registerInstantiatedClass(ClassElement cls,
-                                 Enqueuer enqueuer,
-                                 Registry registry) {
+  void registerInstantiatedClass(
+      ClassElement cls, Enqueuer enqueuer, Registry registry) {
     _processClass(cls, enqueuer, registry);
   }
 
-  void registerImplementedClass(ClassElement cls,
-                                Enqueuer enqueuer,
-                                Registry registry) {
+  void registerImplementedClass(
+      ClassElement cls, Enqueuer enqueuer, Registry registry) {
     _processClass(cls, enqueuer, registry);
   }
 
-  void _processClass(ClassElement cls,
-                     Enqueuer enqueuer,
-                     Registry registry) {
+  void _processClass(ClassElement cls, Enqueuer enqueuer, Registry registry) {
     if (!cls.typeVariables.isEmpty) {
-      typeVariableHandler.registerClassWithTypeVariables(cls, enqueuer,
-                                                         registry);
+      typeVariableHandler.registerClassWithTypeVariables(
+          cls, enqueuer, registry);
     }
 
     // Register any helper that will be needed by the backend.
@@ -1177,7 +1032,7 @@
         // `iae` helper directly.
         enqueue(enqueuer, helpers.throwIllegalArgumentException, registry);
       } else if (cls == coreClasses.listClass ||
-                 cls == coreClasses.stringClass) {
+          cls == coreClasses.stringClass) {
         // The backend will try to optimize array and string access and use the
         // `ioore` and `iae` helpers directly.
         enqueue(enqueuer, helpers.throwIndexOutOfRangeException, registry);
@@ -1197,8 +1052,8 @@
         enqueueClass(enqueuer, helpers.boundClosureClass, registry);
       } else if (isNativeOrExtendsNative(cls)) {
         enqueue(enqueuer, helpers.getNativeInterceptorMethod, registry);
-        enqueueClass(enqueuer, helpers.jsInterceptorClass,
-            compiler.globalDependencies);
+        enqueueClass(
+            enqueuer, helpers.jsInterceptorClass, compiler.globalDependencies);
         enqueueClass(enqueuer, helpers.jsJavaScriptObjectClass, registry);
         enqueueClass(enqueuer, helpers.jsPlainJavaScriptObjectClass, registry);
         enqueueClass(enqueuer, helpers.jsJavaScriptFunctionClass, registry);
@@ -1208,11 +1063,11 @@
         Element getFactory(String name, int arity) {
           // The constructor is on the patch class, but dart2js unit tests don't
           // have a patch class.
-          ClassElement implementation = cls.patch != null ? cls.patch : cls;
+          ClassElement implementation = cls.implementation;
           ConstructorElement ctor = implementation.lookupConstructor(name);
           if (ctor == null ||
               (Name.isPrivateName(name) &&
-               ctor.library != helpers.mapLiteralClass.library)) {
+                  ctor.library != helpers.mapLiteralClass.library)) {
             reporter.internalError(
                 helpers.mapLiteralClass,
                 "Map literal class ${helpers.mapLiteralClass} missing "
@@ -1224,10 +1079,11 @@
         Element getMember(String name) {
           // The constructor is on the patch class, but dart2js unit tests don't
           // have a patch class.
-          ClassElement implementation = cls.patch != null ? cls.patch : cls;
+          ClassElement implementation = cls.implementation;
           Element element = implementation.lookupLocalMember(name);
           if (element == null || !element.isFunction || !element.isStatic) {
-            reporter.internalError(helpers.mapLiteralClass,
+            reporter.internalError(
+                helpers.mapLiteralClass,
                 "Map literal class ${helpers.mapLiteralClass} missing "
                 "'$name' static member function");
           }
@@ -1247,14 +1103,13 @@
     if (cls == helpers.closureClass) {
       enqueue(enqueuer, helpers.closureFromTearOff, registry);
     }
-    if (cls == coreClasses.stringClass ||
-        cls == helpers.jsStringClass) {
+    if (cls == coreClasses.stringClass || cls == helpers.jsStringClass) {
       addInterceptors(helpers.jsStringClass, enqueuer, registry);
     } else if (cls == coreClasses.listClass ||
-               cls == helpers.jsArrayClass ||
-               cls == helpers.jsFixedArrayClass ||
-               cls == helpers.jsExtendableArrayClass ||
-               cls == helpers.jsUnmodifiableArrayClass) {
+        cls == helpers.jsArrayClass ||
+        cls == helpers.jsFixedArrayClass ||
+        cls == helpers.jsExtendableArrayClass ||
+        cls == helpers.jsUnmodifiableArrayClass) {
       addInterceptors(helpers.jsArrayClass, enqueuer, registry);
       addInterceptors(helpers.jsMutableArrayClass, enqueuer, registry);
       addInterceptors(helpers.jsFixedArrayClass, enqueuer, registry);
@@ -1264,25 +1119,20 @@
       enqueueInResolution(helpers.jsArrayTypedConstructor, registry);
       enqueueInResolution(helpers.setRuntimeTypeInfo, registry);
       enqueueInResolution(helpers.getTypeArgumentByIndex, registry);
-    } else if (cls == coreClasses.intClass ||
-               cls == helpers.jsIntClass) {
+    } else if (cls == coreClasses.intClass || cls == helpers.jsIntClass) {
       addInterceptors(helpers.jsIntClass, enqueuer, registry);
       addInterceptors(helpers.jsPositiveIntClass, enqueuer, registry);
       addInterceptors(helpers.jsUInt32Class, enqueuer, registry);
       addInterceptors(helpers.jsUInt31Class, enqueuer, registry);
       addInterceptors(helpers.jsNumberClass, enqueuer, registry);
-    } else if (cls == coreClasses.doubleClass ||
-               cls == helpers.jsDoubleClass) {
+    } else if (cls == coreClasses.doubleClass || cls == helpers.jsDoubleClass) {
       addInterceptors(helpers.jsDoubleClass, enqueuer, registry);
       addInterceptors(helpers.jsNumberClass, enqueuer, registry);
-    } else if (cls == coreClasses.boolClass ||
-               cls == helpers.jsBoolClass) {
+    } else if (cls == coreClasses.boolClass || cls == helpers.jsBoolClass) {
       addInterceptors(helpers.jsBoolClass, enqueuer, registry);
-    } else if (cls == coreClasses.nullClass ||
-               cls == helpers.jsNullClass) {
+    } else if (cls == coreClasses.nullClass || cls == helpers.jsNullClass) {
       addInterceptors(helpers.jsNullClass, enqueuer, registry);
-    } else if (cls == coreClasses.numClass ||
-               cls == helpers.jsNumberClass) {
+    } else if (cls == coreClasses.numClass || cls == helpers.jsNumberClass) {
       addInterceptors(helpers.jsIntClass, enqueuer, registry);
       addInterceptors(helpers.jsPositiveIntClass, enqueuer, registry);
       addInterceptors(helpers.jsUInt32Class, enqueuer, registry);
@@ -1294,7 +1144,8 @@
     } else if (cls == helpers.jsPlainJavaScriptObjectClass) {
       addInterceptors(helpers.jsPlainJavaScriptObjectClass, enqueuer, registry);
     } else if (cls == helpers.jsUnknownJavaScriptObjectClass) {
-      addInterceptors(helpers.jsUnknownJavaScriptObjectClass, enqueuer, registry);
+      addInterceptors(
+          helpers.jsUnknownJavaScriptObjectClass, enqueuer, registry);
     } else if (cls == helpers.jsJavaScriptFunctionClass) {
       addInterceptors(helpers.jsJavaScriptFunctionClass, enqueuer, registry);
     } else if (isNativeOrExtendsNative(cls)) {
@@ -1312,13 +1163,12 @@
     }
   }
 
-  void registerInstantiatedType(InterfaceType type,
-                                Enqueuer enqueuer,
-                                Registry registry,
-                                {bool mirrorUsage: false}) {
+  void registerInstantiatedType(
+      InterfaceType type, Enqueuer enqueuer, Registry registry,
+      {bool mirrorUsage: false}) {
     lookupMapAnalysis.registerInstantiatedType(type, registry);
-    super.registerInstantiatedType(
-        type, enqueuer, registry, mirrorUsage: mirrorUsage);
+    super.registerInstantiatedType(type, enqueuer, registry,
+        mirrorUsage: mirrorUsage);
   }
 
   void registerUseInterceptor(Enqueuer enqueuer) {
@@ -1344,7 +1194,7 @@
     // will instantiate those two classes.
     addInterceptors(helpers.jsBoolClass, world, registry);
     addInterceptors(helpers.jsNullClass, world, registry);
-    if (compiler.enableTypeAssertions) {
+    if (compiler.options.enableTypeAssertions) {
       // Unconditionally register the helper that checks if the
       // expression in an if/while/for is a boolean.
       // TODO(ngeoffray): Should we have the resolver register those instead?
@@ -1354,7 +1204,8 @@
 
     if (TRACE_CALLS) {
       traceHelper = TRACE_METHOD == 'console'
-          ? helpers.consoleTraceHelper : helpers.postTraceHelper;
+          ? helpers.consoleTraceHelper
+          : helpers.postTraceHelper;
       assert(traceHelper != null);
       enqueueInResolution(traceHelper, registry);
     }
@@ -1375,24 +1226,18 @@
 
   void registerGetRuntimeTypeArgument(Registry registry) {
     enqueueImpact(
-        compiler.enqueuer.resolution,
-        impacts.getRuntimeTypeArgument,
-        registry);
+        compiler.enqueuer.resolution, impacts.getRuntimeTypeArgument, registry);
   }
 
   void registerCallMethodWithFreeTypeVariables(
-      Element callMethod,
-      Enqueuer enqueuer,
-      Registry registry) {
+      Element callMethod, Enqueuer enqueuer, Registry registry) {
     if (enqueuer.isResolutionQueue || methodNeedsRti(callMethod)) {
       registerComputeSignature(enqueuer, registry);
     }
   }
 
   void registerClosureWithFreeTypeVariables(
-      Element closure,
-      Enqueuer enqueuer,
-      Registry registry) {
+      Element closure, Enqueuer enqueuer, Registry registry) {
     if (enqueuer.isResolutionQueue || methodNeedsRti(closure)) {
       registerComputeSignature(enqueuer, registry);
     }
@@ -1411,9 +1256,7 @@
   void registerGetOfStaticFunction(Enqueuer enqueuer) {
     helpers.closureClass.ensureResolved(resolution);
     registerInstantiatedType(
-        helpers.closureClass.rawType,
-        enqueuer,
-        compiler.globalDependencies);
+        helpers.closureClass.rawType, enqueuer, compiler.globalDependencies);
   }
 
   void registerComputeSignature(Enqueuer enqueuer, Registry registry) {
@@ -1431,8 +1274,8 @@
     enqueueClass(enqueuer, coreClasses.listClass, registry);
   }
 
-  void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
-                                              DartType bound) {
+  void registerTypeVariableBoundsSubtypeCheck(
+      DartType typeArgument, DartType bound) {
     rti.registerTypeVariableBoundsSubtypeCheck(typeArgument, bound);
   }
 
@@ -1448,10 +1291,8 @@
   }
 
   /// Called when resolving a call to a foreign function.
-  void registerForeignCall(Send node,
-                           Element element,
-                           CallStructure callStructure,
-                           ForeignResolver resolver) {
+  void registerForeignCall(Send node, Element element,
+      CallStructure callStructure, ForeignResolver resolver) {
     native.NativeResolutionEnqueuer nativeEnqueuer =
         compiler.enqueuer.resolution.nativeEnqueuer;
     if (element.name == 'JS') {
@@ -1476,15 +1317,13 @@
         }
       }
       reporter.reportErrorMessage(
-          node,
-          MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT);
+          node, MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT);
     }
   }
 
   void enableNoSuchMethod(Enqueuer world) {
     enqueue(world, helpers.createInvocationMirror, compiler.globalDependencies);
-    world.registerDynamicUse(
-        new DynamicUse(Selectors.noSuchMethod_, null));
+    world.registerDynamicUse(new DynamicUse(Selectors.noSuchMethod_, null));
   }
 
   void enableIsolateSupport(Enqueuer enqueuer) {
@@ -1502,7 +1341,6 @@
           new StaticUse.staticTearOff(compiler.mainFunction));
     }
     if (enqueuer.isResolutionQueue) {
-
       void enqueue(Element element) {
         enqueuer.addToWorkList(element);
         compiler.globalDependencies.registerDependency(element);
@@ -1523,19 +1361,19 @@
   }
 
   bool isComplexNoSuchMethod(FunctionElement element) =>
-    noSuchMethodRegistry.isComplex(element);
+      noSuchMethodRegistry.isComplex(element);
 
   bool isDefaultEqualityImplementation(Element element) {
     assert(element.name == '==');
     ClassElement classElement = element.enclosingClass;
-    return classElement == coreClasses.objectClass
-        || classElement == helpers.jsInterceptorClass
-        || classElement == helpers.jsNullClass;
+    return classElement == coreClasses.objectClass ||
+        classElement == helpers.jsInterceptorClass ||
+        classElement == helpers.jsNullClass;
   }
 
   bool methodNeedsRti(FunctionElement function) {
     return rti.methodsNeedingRti.contains(function) ||
-           compiler.enabledRuntimeType;
+        compiler.enabledRuntimeType;
   }
 
   /// Enqueue [e] in [enqueuer].
@@ -1586,9 +1424,8 @@
     registerInstantiatedType(type, enqueuer, registry);
   }
 
-  void enqueueImpact(Enqueuer enqueuer,
-                     BackendImpact impact,
-                     Registry registry) {
+  void enqueueImpact(
+      Enqueuer enqueuer, BackendImpact impact, Registry registry) {
     for (Element staticUse in impact.staticUses) {
       enqueue(enqueuer, staticUse, registry);
     }
@@ -1629,17 +1466,16 @@
         // variables. For instance variables, we may need to generate
         // the checked setter.
         if (Elements.isStaticOrTopLevel(element)) {
-          return impactTransformer.transformCodegenImpact(
-              work.registry.worldImpact);
+          return impactTransformer
+              .transformCodegenImpact(work.registry.worldImpact);
         }
       } 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.
-        compiler.enqueuer.codegen.registerStaticUse(
-            new StaticUse.staticInvoke(
-                helpers.cyclicThrowHelper, CallStructure.ONE_ARG));
+        compiler.enqueuer.codegen.registerStaticUse(new StaticUse.staticInvoke(
+            helpers.cyclicThrowHelper, CallStructure.ONE_ARG));
       }
     }
 
@@ -1669,7 +1505,8 @@
     }
     // Native classes inherit from Interceptor.
     return isNative(element)
-        ? helpers.jsInterceptorClass : coreClasses.objectClass;
+        ? helpers.jsInterceptorClass
+        : coreClasses.objectClass;
   }
 
   /**
@@ -1689,11 +1526,12 @@
     if (totalMethodCount != preMirrorsMethodCount) {
       int mirrorCount = totalMethodCount - preMirrorsMethodCount;
       double percentage = (mirrorCount / totalMethodCount) * 100;
-      DiagnosticMessage hint = reporter.createMessage(
-          compiler.mainApp, MessageKind.MIRROR_BLOAT,
-          {'count': mirrorCount,
-           'total': totalMethodCount,
-           'percentage': percentage.round()});
+      DiagnosticMessage hint =
+          reporter.createMessage(compiler.mainApp, MessageKind.MIRROR_BLOAT, {
+        'count': mirrorCount,
+        'total': totalMethodCount,
+        'percentage': percentage.round()
+      });
 
       List<DiagnosticMessage> infos = <DiagnosticMessage>[];
       for (LibraryElement library in compiler.libraryLoader.libraries) {
@@ -1703,8 +1541,8 @@
           if (importedLibrary != compiler.mirrorsLibrary) continue;
           MessageKind kind =
               compiler.mirrorUsageAnalyzerTask.hasMirrorUsage(library)
-              ? MessageKind.MIRROR_IMPORT
-              : MessageKind.MIRROR_IMPORT_NO_USAGE;
+                  ? MessageKind.MIRROR_IMPORT
+                  : MessageKind.MIRROR_IMPORT_NO_USAGE;
           reporter.withCurrentElement(library, () {
             infos.add(reporter.createMessage(import, kind));
           });
@@ -1731,8 +1569,8 @@
    * backend with implementation types (JSInt, JSString, ...).
    */
   CheckedModeHelper getCheckedModeHelper(DartType type, {bool typeCast}) {
-    return getCheckedModeHelperInternal(
-        type, typeCast: typeCast, nativeCheckOnly: false);
+    return getCheckedModeHelperInternal(type,
+        typeCast: typeCast, nativeCheckOnly: false);
   }
 
   /**
@@ -1741,8 +1579,8 @@
    * [type], [:null:] is returned.
    */
   CheckedModeHelper getNativeCheckedModeHelper(DartType type, {bool typeCast}) {
-    return getCheckedModeHelperInternal(
-        type, typeCast: typeCast, nativeCheckOnly: true);
+    return getCheckedModeHelperInternal(type,
+        typeCast: typeCast, nativeCheckOnly: true);
   }
 
   /**
@@ -1750,8 +1588,7 @@
    * [nativeCheckOnly] is [:true:], only names for native helpers are returned.
    */
   CheckedModeHelper getCheckedModeHelperInternal(DartType type,
-                                                 {bool typeCast,
-                                                  bool nativeCheckOnly}) {
+      {bool typeCast, bool nativeCheckOnly}) {
     String name = getCheckedModeHelperNameInternal(type,
         typeCast: typeCast, nativeCheckOnly: nativeCheckOnly);
     if (name == null) return null;
@@ -1761,8 +1598,7 @@
   }
 
   String getCheckedModeHelperNameInternal(DartType type,
-                                          {bool typeCast,
-                                           bool nativeCheckOnly}) {
+      {bool typeCast, bool nativeCheckOnly}) {
     assert(type.kind != TypeKind.TYPEDEF);
     if (type.isMalformed) {
       // The same error is thrown for type test and type cast of a malformed
@@ -1770,8 +1606,8 @@
       return 'checkMalformedType';
     }
     Element element = type.element;
-    bool nativeCheck = nativeCheckOnly ||
-        emitter.nativeEmitter.requiresNativeIsCheck(element);
+    bool nativeCheck =
+        nativeCheckOnly || emitter.nativeEmitter.requiresNativeIsCheck(element);
 
     // TODO(13955), TODO(9731).  The test for non-primitive types should use an
     // interceptor.  The interceptor should be an argument to HTypeConversion so
@@ -1783,38 +1619,28 @@
       if (nativeCheckOnly) return null;
       return 'voidTypeCheck';
     } else if (element == helpers.jsStringClass ||
-               element == coreClasses.stringClass) {
+        element == coreClasses.stringClass) {
       if (nativeCheckOnly) return null;
-      return typeCast
-          ? 'stringTypeCast'
-          : 'stringTypeCheck';
+      return typeCast ? 'stringTypeCast' : 'stringTypeCheck';
     } else if (element == helpers.jsDoubleClass ||
-               element == coreClasses.doubleClass) {
+        element == coreClasses.doubleClass) {
       if (nativeCheckOnly) return null;
-      return typeCast
-          ? 'doubleTypeCast'
-          : 'doubleTypeCheck';
+      return typeCast ? 'doubleTypeCast' : 'doubleTypeCheck';
     } else if (element == helpers.jsNumberClass ||
-               element == coreClasses.numClass) {
+        element == coreClasses.numClass) {
       if (nativeCheckOnly) return null;
-      return typeCast
-          ? 'numTypeCast'
-          : 'numTypeCheck';
+      return typeCast ? 'numTypeCast' : 'numTypeCheck';
     } else if (element == helpers.jsBoolClass ||
-               element == coreClasses.boolClass) {
+        element == coreClasses.boolClass) {
       if (nativeCheckOnly) return null;
-      return typeCast
-          ? 'boolTypeCast'
-          : 'boolTypeCheck';
+      return typeCast ? 'boolTypeCast' : 'boolTypeCheck';
     } else if (element == helpers.jsIntClass ||
-               element == coreClasses.intClass ||
-               element == helpers.jsUInt32Class ||
-               element == helpers.jsUInt31Class ||
-               element == helpers.jsPositiveIntClass) {
+        element == coreClasses.intClass ||
+        element == helpers.jsUInt32Class ||
+        element == helpers.jsUInt31Class ||
+        element == helpers.jsPositiveIntClass) {
       if (nativeCheckOnly) return null;
-      return typeCast
-          ? 'intTypeCast'
-          : 'intTypeCheck';
+      return typeCast ? 'intTypeCast' : 'intTypeCheck';
     } else if (Elements.isNumberOrStringSupertype(element, compiler)) {
       if (nativeCheck) {
         return typeCast
@@ -1822,8 +1648,8 @@
             : 'numberOrStringSuperNativeTypeCheck';
       } else {
         return typeCast
-          ? 'numberOrStringSuperTypeCast'
-          : 'numberOrStringSuperTypeCheck';
+            ? 'numberOrStringSuperTypeCast'
+            : 'numberOrStringSuperTypeCheck';
       }
     } else if (Elements.isStringOnlySupertype(element, compiler)) {
       if (nativeCheck) {
@@ -1831,17 +1657,13 @@
             ? 'stringSuperNativeTypeCast'
             : 'stringSuperNativeTypeCheck';
       } else {
-        return typeCast
-            ? 'stringSuperTypeCast'
-            : 'stringSuperTypeCheck';
+        return typeCast ? 'stringSuperTypeCast' : 'stringSuperTypeCheck';
       }
     } else if ((element == coreClasses.listClass ||
-                element == helpers.jsArrayClass) &&
-               type.treatAsRaw) {
+            element == helpers.jsArrayClass) &&
+        type.treatAsRaw) {
       if (nativeCheckOnly) return null;
-      return typeCast
-          ? 'listTypeCast'
-          : 'listTypeCheck';
+      return typeCast ? 'listTypeCast' : 'listTypeCheck';
     } else {
       if (Elements.isListSupertype(element, compiler)) {
         if (nativeCheck) {
@@ -1849,15 +1671,11 @@
               ? 'listSuperNativeTypeCast'
               : 'listSuperNativeTypeCheck';
         } else {
-          return typeCast
-              ? 'listSuperTypeCast'
-              : 'listSuperTypeCheck';
+          return typeCast ? 'listSuperTypeCast' : 'listSuperTypeCheck';
         }
       } else {
         if (type.isInterfaceType && !type.treatAsRaw) {
-          return typeCast
-              ? 'subtypeCast'
-              : 'assertSubtype';
+          return typeCast ? 'subtypeCast' : 'assertSubtype';
         } else if (type.isTypeVariable) {
           return typeCast
               ? 'subtypeOfRuntimeTypeCast'
@@ -1868,13 +1686,9 @@
           if (nativeCheck) {
             // TODO(karlklose): can we get rid of this branch when we use
             // interceptors?
-            return typeCast
-                ? 'interceptedTypeCast'
-                : 'interceptedTypeCheck';
+            return typeCast ? 'interceptedTypeCast' : 'interceptedTypeCheck';
           } else {
-            return typeCast
-                ? 'propertyTypeCast'
-                : 'propertyTypeCheck';
+            return typeCast ? 'propertyTypeCast' : 'propertyTypeCheck';
           }
         }
       }
@@ -1943,14 +1757,13 @@
 
   void registerStaticUse(Element element, Enqueuer enqueuer) {
     if (element == helpers.disableTreeShakingMarker) {
-      compiler.disableTypeInferenceForMirrors = true;
       isTreeShakingDisabled = true;
     } else if (element == helpers.preserveNamesMarker) {
       mustPreserveNames = true;
     } else if (element == helpers.preserveMetadataMarker) {
       mustRetainMetadata = true;
     } else if (element == helpers.preserveUrisMarker) {
-      if (compiler.preserveUris) mustPreserveUris = true;
+      if (compiler.options.preserveUris) mustPreserveUris = true;
     } else if (element == helpers.preserveLibraryNamesMarker) {
       mustRetainLibraryNames = true;
     } else if (element == helpers.getIsolateAffinityTagMarker) {
@@ -1959,8 +1772,8 @@
       // TODO(sigurdm): Create a function registerLoadLibraryAccess.
       if (compiler.loadLibraryFunction == null) {
         compiler.loadLibraryFunction = helpers.loadLibraryWrapper;
-        enqueueInResolution(compiler.loadLibraryFunction,
-                            compiler.globalDependencies);
+        enqueueInResolution(
+            compiler.loadLibraryFunction, compiler.globalDependencies);
       }
     } else if (element == helpers.requiresPreambleMarker) {
       requiresPreamble = true;
@@ -1977,8 +1790,7 @@
   }
 
   /// Called when [:new Symbol(...):] is seen.
-  void registerNewSymbol(Registry registry) {
-  }
+  void registerNewSymbol(Registry registry) {}
 
   /// Should [element] (a getter) that would normally not be generated due to
   /// treeshaking be retained for reflection?
@@ -2058,13 +1870,13 @@
     implementationClasses[coreClasses.nullClass] = helpers.jsNullClass;
 
     // These methods are overwritten with generated versions.
-    inlineCache.markAsNonInlinable(
-        helpers.getInterceptorMethod, insideLoop: true);
+    inlineCache.markAsNonInlinable(helpers.getInterceptorMethod,
+        insideLoop: true);
 
     specialOperatorEqClasses
-        ..add(coreClasses.objectClass)
-        ..add(helpers.jsInterceptorClass)
-        ..add(helpers.jsNullClass);
+      ..add(coreClasses.objectClass)
+      ..add(helpers.jsInterceptorClass)
+      ..add(helpers.jsNullClass);
 
     validateInterceptorImplementsAllObjectMethods(helpers.jsInterceptorClass);
     // The null-interceptor must also implement *all* methods.
@@ -2073,9 +1885,8 @@
     return new Future.value();
   }
 
-  void registerMirrorUsage(Set<String> symbols,
-                           Set<Element> targets,
-                           Set<Element> metaTargets) {
+  void registerMirrorUsage(
+      Set<String> symbols, Set<Element> targets, Set<Element> metaTargets) {
     if (symbols == null && targets == null && metaTargets == null) {
       // The user didn't specify anything, or there are imports of
       // 'dart:mirrors' without @MirrorsUsed.
@@ -2120,8 +1931,8 @@
    */
   bool requiredByMirrorSystem(Element element) {
     return hasInsufficientMirrorsUsed && isTreeShakingDisabled ||
-           matchesMirrorsMetaTarget(element) ||
-           targetsUsed.contains(element);
+        matchesMirrorsMetaTarget(element) ||
+        targetsUsed.contains(element);
   }
 
   /**
@@ -2133,9 +1944,9 @@
     Element enclosing = recursive ? element.enclosingElement : null;
 
     return hasInsufficientMirrorsUsed ||
-           matchesMirrorsMetaTarget(element) ||
-           targetsUsed.contains(element) ||
-           (enclosing != null && referencedFromMirrorSystem(enclosing));
+        matchesMirrorsMetaTarget(element) ||
+        targetsUsed.contains(element) ||
+        (enclosing != null && referencedFromMirrorSystem(enclosing));
   }
 
   /**
@@ -2308,8 +2119,8 @@
     _membersNeededForReflection.add(globalizedElement);
   }
 
-  jsAst.Call generateIsJsIndexableCall(jsAst.Expression use1,
-                                       jsAst.Expression use2) {
+  jsAst.Call generateIsJsIndexableCall(
+      jsAst.Expression use1, jsAst.Expression use2) {
     String dispatchPropertyName = embeddedNames.DISPATCH_PROPERTY_NAME;
     jsAst.Expression dispatchProperty =
         emitter.generateEmbeddedGlobalAccess(dispatchPropertyName);
@@ -2330,8 +2141,7 @@
     // Just checking for [:TypedData:] is not sufficient, as it is an
     // abstract class any user-defined class can implement. So we also
     // check for the interface [JavaScriptIndexingBehavior].
-    return
-        compiler.typedDataClass != null &&
+    return compiler.typedDataClass != null &&
         compiler.world.isInstantiated(compiler.typedDataClass) &&
         mask.satisfies(compiler.typedDataClass, compiler.world) &&
         mask.satisfies(helpers.jsIndexingBehaviorInterface, compiler.world);
@@ -2342,13 +2152,14 @@
         !type1.intersection(type2, compiler.world).isEmpty;
     // TODO(herhut): Maybe cache the TypeMask for typedDataClass and
     //               jsIndexingBehaviourInterface.
-    return
-        compiler.typedDataClass != null &&
+    return compiler.typedDataClass != null &&
         compiler.world.isInstantiated(compiler.typedDataClass) &&
         intersects(mask,
             new TypeMask.subtype(compiler.typedDataClass, compiler.world)) &&
-        intersects(mask,
-            new TypeMask.subtype(helpers.jsIndexingBehaviorInterface, compiler.world));
+        intersects(
+            mask,
+            new TypeMask.subtype(
+                helpers.jsIndexingBehaviorInterface, compiler.world));
   }
 
   /// Returns all static fields that are referenced through [targetsUsed].
@@ -2388,12 +2199,12 @@
     noSuchMethodRegistry.onQueueEmpty();
     if (!enabledNoSuchMethod &&
         (noSuchMethodRegistry.hasThrowingNoSuchMethod ||
-         noSuchMethodRegistry.hasComplexNoSuchMethod)) {
+            noSuchMethodRegistry.hasComplexNoSuchMethod)) {
       enableNoSuchMethod(enqueuer);
       enabledNoSuchMethod = true;
     }
 
-    if (compiler.hasIncrementalSupport) {
+    if (compiler.options.hasIncrementalSupport) {
       // Always enable tear-off closures during incremental compilation.
       Element e = helpers.closureFromTearOff;
       if (e != null && !enqueuer.isProcessed(e)) {
@@ -2422,8 +2233,7 @@
 
       compiler.libraryLoader.libraries.forEach(retainMetadataOf);
       for (Dependency dependency in metadataConstants) {
-        registerCompileTimeConstant(
-            dependency.constant,
+        registerCompileTimeConstant(dependency.constant,
             new EagerRegistry('EagerRegistry for ${dependency}', enqueuer));
       }
       if (!enqueuer.isResolutionQueue) {
@@ -2471,53 +2281,46 @@
         hasForceInline = true;
         if (VERBOSE_OPTIMIZER_HINTS) {
           reporter.reportHintMessage(
-              element,
-              MessageKind.GENERIC,
-              {'text': "Must inline"});
+              element, MessageKind.GENERIC, {'text': "Must inline"});
         }
         inlineCache.markAsMustInline(element);
       } else if (cls == helpers.noInlineClass) {
         hasNoInline = true;
         if (VERBOSE_OPTIMIZER_HINTS) {
           reporter.reportHintMessage(
-              element,
-              MessageKind.GENERIC,
-              {'text': "Cannot inline"});
+              element, MessageKind.GENERIC, {'text': "Cannot inline"});
         }
         inlineCache.markAsNonInlinable(element);
       } else if (cls == helpers.noThrowsClass) {
         hasNoThrows = true;
         if (!Elements.isStaticOrTopLevelFunction(element) &&
             !element.isFactoryConstructor) {
-          reporter.internalError(element,
+          reporter.internalError(
+              element,
               "@NoThrows() is currently limited to top-level"
               " or static functions and factory constructors.");
         }
         if (VERBOSE_OPTIMIZER_HINTS) {
           reporter.reportHintMessage(
-              element,
-              MessageKind.GENERIC,
-              {'text': "Cannot throw"});
+              element, MessageKind.GENERIC, {'text': "Cannot throw"});
         }
         compiler.world.registerCannotThrow(element);
       } else if (cls == helpers.noSideEffectsClass) {
         hasNoSideEffects = true;
         if (VERBOSE_OPTIMIZER_HINTS) {
           reporter.reportHintMessage(
-              element,
-              MessageKind.GENERIC,
-              {'text': "Has no side effects"});
+              element, MessageKind.GENERIC, {'text': "Has no side effects"});
         }
         compiler.world.registerSideEffectsFree(element);
       }
     }
     if (hasForceInline && hasNoInline) {
-      reporter.internalError(element,
-          "@ForceInline() must not be used with @NoInline.");
+      reporter.internalError(
+          element, "@ForceInline() must not be used with @NoInline.");
     }
     if (hasNoThrows && !hasNoInline) {
-      reporter.internalError(element,
-          "@NoThrows() should always be combined with @NoInline.");
+      reporter.internalError(
+          element, "@NoThrows() should always be combined with @NoInline.");
     }
     if (hasNoSideEffects && !hasNoInline) {
       reporter.internalError(element,
@@ -2527,6 +2330,7 @@
       compiler.enabledInvokeOn = true;
     }
   }
+
 /*
   CodeBuffer codeOf(Element element) {
     return generatedCode.containsKey(element)
@@ -2560,8 +2364,8 @@
   /// If [addExtension] is false, the ".part.js" suffix is left out.
   String deferredPartFileName(String name, {bool addExtension: true}) {
     assert(name != "");
-    String outPath = compiler.outputUri != null
-        ? compiler.outputUri.path
+    String outPath = compiler.options.outputUri != null
+        ? compiler.options.outputUri.path
         : "out";
     String outName = outPath.substring(outPath.lastIndexOf('/') + 1);
     String extension = addExtension ? ".part.js" : "";
@@ -2576,68 +2380,57 @@
 
   @override
   bool enableCodegenWithErrorsIfSupported(Spannable node) {
-    if (compiler.useCpsIr) {
+    if (compiler.options.useCpsIr) {
       // TODO(25747): Support code generation with compile-time errors.
-      reporter.reportHintMessage(
-          node,
-          MessageKind.GENERIC,
-          {'text': "Generation of code with compile time errors is currently "
-                   "not supported with the CPS IR."});
+      reporter.reportHintMessage(node, MessageKind.GENERIC, {
+        'text': "Generation of code with compile time errors is currently "
+            "not supported with the CPS IR."
+      });
       return false;
     }
     return true;
   }
 
-  jsAst.Expression rewriteAsync(FunctionElement element,
-                                jsAst.Expression code) {
+  jsAst.Expression rewriteAsync(
+      FunctionElement element, jsAst.Expression code) {
     AsyncRewriterBase rewriter = null;
     jsAst.Name name = namer.methodPropertyName(element);
     switch (element.asyncMarker) {
       case AsyncMarker.ASYNC:
-        rewriter = new AsyncRewriter(
-            reporter,
-            element,
-            asyncHelper:
-                emitter.staticFunctionAccess(helpers.asyncHelper),
-            wrapBody:
-                emitter.staticFunctionAccess(helpers.wrapBody),
-            newCompleter: emitter.staticFunctionAccess(
-                helpers.syncCompleterConstructor),
+        rewriter = new AsyncRewriter(reporter, element,
+            asyncHelper: emitter.staticFunctionAccess(helpers.asyncHelper),
+            wrapBody: emitter.staticFunctionAccess(helpers.wrapBody),
+            newCompleter:
+                emitter.staticFunctionAccess(helpers.syncCompleterConstructor),
             safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
             bodyName: namer.deriveAsyncBodyName(name));
         break;
       case AsyncMarker.SYNC_STAR:
-        rewriter = new SyncStarRewriter(
-            reporter,
-            element,
-            endOfIteration: emitter.staticFunctionAccess(
-                helpers.endOfIteration),
-            newIterable: emitter.staticFunctionAccess(
-                helpers.syncStarIterableConstructor),
-            yieldStarExpression: emitter.staticFunctionAccess(
-                helpers.yieldStar),
-            uncaughtErrorExpression: emitter.staticFunctionAccess(
-                helpers.syncStarUncaughtError),
+        rewriter = new SyncStarRewriter(reporter, element,
+            endOfIteration:
+                emitter.staticFunctionAccess(helpers.endOfIteration),
+            newIterable: emitter
+                .staticFunctionAccess(helpers.syncStarIterableConstructor),
+            yieldStarExpression:
+                emitter.staticFunctionAccess(helpers.yieldStar),
+            uncaughtErrorExpression:
+                emitter.staticFunctionAccess(helpers.syncStarUncaughtError),
             safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
             bodyName: namer.deriveAsyncBodyName(name));
-         break;
+        break;
       case AsyncMarker.ASYNC_STAR:
-        rewriter = new AsyncStarRewriter(
-            reporter,
-            element,
-            asyncStarHelper: emitter.staticFunctionAccess(
-                helpers.asyncStarHelper),
-            streamOfController: emitter.staticFunctionAccess(
-                helpers.streamOfController),
-            wrapBody:
-                emitter.staticFunctionAccess(helpers.wrapBody),
-            newController: emitter.staticFunctionAccess(
-                helpers.asyncStarControllerConstructor),
+        rewriter = new AsyncStarRewriter(reporter, element,
+            asyncStarHelper:
+                emitter.staticFunctionAccess(helpers.asyncStarHelper),
+            streamOfController:
+                emitter.staticFunctionAccess(helpers.streamOfController),
+            wrapBody: emitter.staticFunctionAccess(helpers.wrapBody),
+            newController: emitter
+                .staticFunctionAccess(helpers.asyncStarControllerConstructor),
             safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
-            yieldExpression: emitter.staticFunctionAccess(
-                helpers.yieldSingle),
-            yieldStarExpression: emitter.staticFunctionAccess(
-                helpers.yieldStar),
+            yieldExpression: emitter.staticFunctionAccess(helpers.yieldSingle),
+            yieldStarExpression:
+                emitter.staticFunctionAccess(helpers.yieldStar),
             bodyName: namer.deriveAsyncBodyName(name));
         break;
       default:
@@ -2650,7 +2443,7 @@
   /// The locations of js patch-files relative to the sdk-descriptors.
   static const _patchLocations = const <String, String>{
     "async": "_internal/js_runtime/lib/async_patch.dart",
-    "collection":  "_internal/js_runtime/lib/collection_patch.dart",
+    "collection": "_internal/js_runtime/lib/collection_patch.dart",
     "convert": "_internal/js_runtime/lib/convert_patch.dart",
     "core": "_internal/js_runtime/lib/core_patch.dart",
     "developer": "_internal/js_runtime/lib/developer_patch.dart",
@@ -2672,12 +2465,12 @@
   @override
   ImpactStrategy createImpactStrategy(
       {bool supportDeferredLoad: true,
-       bool supportDumpInfo: true}) {
-    return new JavaScriptImpactStrategy(
-        resolution,
-        compiler.dumpInfoTask,
+      bool supportDumpInfo: true,
+      bool supportSerialization: true}) {
+    return new JavaScriptImpactStrategy(resolution, compiler.dumpInfoTask,
         supportDeferredLoad: supportDeferredLoad,
-        supportDumpInfo: supportDumpInfo);
+        supportDumpInfo: supportDumpInfo,
+        supportSerialization: supportSerialization);
   }
 }
 
@@ -2791,7 +2584,7 @@
           registerBackendImpact(transformed, impacts.catchStatement);
           break;
         case Feature.COMPILE_TIME_ERROR:
-          if (backend.compiler.generateCodeWithCompileTimeErrors) {
+          if (backend.compiler.options.generateCodeWithCompileTimeErrors) {
             // TODO(johnniwinther): This should have its own uncatchable error.
             registerBackendImpact(transformed, impacts.throwRuntimeError);
           }
@@ -2857,7 +2650,7 @@
           hasAsCast = true;
           break;
         case TypeUseKind.CHECKED_MODE_CHECK:
-          if (backend.compiler.enableTypeAssertions) {
+          if (backend.compiler.options.enableTypeAssertions) {
             onIsCheck(type, transformed);
           }
           break;
@@ -2884,8 +2677,8 @@
     }
 
     if (hasTypeLiteral) {
-      transformed.registerTypeUse(new TypeUse.instantiation(
-          backend.compiler.coreTypes.typeType));
+      transformed.registerTypeUse(
+          new TypeUse.instantiation(backend.compiler.coreTypes.typeType));
       registerBackendImpact(transformed, impacts.typeLiteral);
     }
 
@@ -2895,8 +2688,8 @@
       if (mapLiteralUse.isConstant) {
         registerBackendImpact(transformed, impacts.constantMapLiteral);
       } else {
-        transformed.registerTypeUse(
-            new TypeUse.instantiation(mapLiteralUse.type));
+        transformed
+            .registerTypeUse(new TypeUse.instantiation(mapLiteralUse.type));
       }
       registerRequiredType(mapLiteralUse.type);
     }
@@ -2904,8 +2697,8 @@
     for (ListLiteralUse listLiteralUse in worldImpact.listLiterals) {
       // TODO(johnniwinther): Use the [isConstant] and [isEmpty] property when
       // factory constructors are registered directly.
-      transformed.registerTypeUse(
-          new TypeUse.instantiation(listLiteralUse.type));
+      transformed
+          .registerTypeUse(new TypeUse.instantiation(listLiteralUse.type));
       registerRequiredType(listLiteralUse.type);
     }
 
@@ -2922,7 +2715,8 @@
         LocalFunctionElement closure = staticUse.element;
         if (closure.type.containsTypeVariables) {
           backend.compiler.enqueuer.resolution.universe
-              .closuresWithFreeTypeVariables.add(closure);
+              .closuresWithFreeTypeVariables
+              .add(closure);
           registerBackendImpact(transformed, impacts.computeSignature);
         }
       }
@@ -2954,8 +2748,8 @@
     return transformed;
   }
 
-  void registerBackendImpact(TransformedWorldImpact worldImpact,
-                             BackendImpact backendImpact) {
+  void registerBackendImpact(
+      TransformedWorldImpact worldImpact, BackendImpact backendImpact) {
     for (Element staticUse in backendImpact.staticUses) {
       assert(staticUse != null);
       backend.registerBackendUse(staticUse);
@@ -2965,14 +2759,12 @@
     }
     for (InterfaceType instantiatedType in backendImpact.instantiatedTypes) {
       backend.registerBackendUse(instantiatedType.element);
-      worldImpact.registerTypeUse(
-          new TypeUse.instantiation(instantiatedType));
+      worldImpact.registerTypeUse(new TypeUse.instantiation(instantiatedType));
     }
     for (ClassElement cls in backendImpact.instantiatedClasses) {
       cls.ensureResolved(backend.resolution);
       backend.registerBackendUse(cls);
-      worldImpact.registerTypeUse(
-          new TypeUse.instantiation(cls.rawType));
+      worldImpact.registerTypeUse(new TypeUse.instantiation(cls.rawType));
     }
     for (BackendImpact otherImpact in backendImpact.otherImpacts) {
       registerBackendImpact(worldImpact, otherImpact);
@@ -2999,7 +2791,7 @@
     type = type.unaliased;
     registerBackendImpact(transformed, impacts.typeCheck);
 
-    bool inCheckedMode = backend.compiler.enableTypeAssertions;
+    bool inCheckedMode = backend.compiler.options.enableTypeAssertions;
     if (inCheckedMode) {
       registerBackendImpact(transformed, impacts.checkedModeTypeCheck);
     }
@@ -3014,8 +2806,8 @@
       if (type.isTypeVariable) {
         registerBackendImpact(transformed, impacts.typeVariableTypeCheck);
         if (inCheckedMode) {
-          registerBackendImpact(transformed,
-              impacts.typeVariableCheckedModeTypeCheck);
+          registerBackendImpact(
+              transformed, impacts.typeVariableCheckedModeTypeCheck);
         }
       }
     }
@@ -3031,7 +2823,7 @@
     type = type.unaliased;
     registerBackendImpact(transformed, impacts.typeCheck);
 
-    bool inCheckedMode = backend.compiler.enableTypeAssertions;
+    bool inCheckedMode = backend.compiler.options.enableTypeAssertions;
     // [registerIsCheck] is also called for checked mode checks, so we
     // need to register checked mode helpers.
     if (inCheckedMode) {
@@ -3089,18 +2881,17 @@
       backend.addCompileTimeConstantForEmission(constant);
     }
 
-    for (Pair<DartType, DartType> check in
-            impact.typeVariableBoundsSubtypeChecks) {
+    for (Pair<DartType, DartType> check
+        in impact.typeVariableBoundsSubtypeChecks) {
       backend.registerTypeVariableBoundsSubtypeCheck(check.a, check.b);
     }
 
-
     for (StaticUse staticUse in impact.staticUses) {
       if (staticUse.kind == StaticUseKind.CLOSURE) {
         LocalFunctionElement closure = staticUse.element;
         if (backend.methodNeedsRti(closure)) {
-           registerBackendImpact(transformed, impacts.computeSignature);
-         }
+          registerBackendImpact(transformed, impacts.computeSignature);
+        }
       }
     }
 
@@ -3153,20 +2944,19 @@
   final DumpInfoTask dumpInfoTask;
   final bool supportDeferredLoad;
   final bool supportDumpInfo;
+  final bool supportSerialization;
 
-  JavaScriptImpactStrategy(this.resolution,
-                           this.dumpInfoTask,
-                           {this.supportDeferredLoad,
-                            this.supportDumpInfo});
+  JavaScriptImpactStrategy(this.resolution, this.dumpInfoTask,
+      {this.supportDeferredLoad,
+      this.supportDumpInfo,
+      this.supportSerialization});
 
   @override
-  void visitImpact(Element element,
-                   WorldImpact impact,
-                   WorldImpactVisitor visitor,
-                   ImpactUseCase impactUse) {
+  void visitImpact(Element element, WorldImpact impact,
+      WorldImpactVisitor visitor, ImpactUseCase impactUse) {
     // TODO(johnniwinther): Compute the application strategy once for each use.
     if (impactUse == ResolutionEnqueuer.IMPACT_USE) {
-      if (supportDeferredLoad) {
+      if (supportDeferredLoad || supportSerialization) {
         impact.apply(visitor);
       } else {
         impact.apply(visitor);
@@ -3185,7 +2975,9 @@
 
   @override
   void onImpactUsed(ImpactUseCase impactUse) {
-    if (impactUse == DeferredLoadTask.IMPACT_USE) {
+    if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) {
+      // TODO(johnniwinther): Allow emptying when serialization has been
+      // performed.
       resolution.emptyCache();
     }
   }
diff --git a/pkg/compiler/lib/src/js_backend/backend_helpers.dart b/pkg/compiler/lib/src/js_backend/backend_helpers.dart
index 804594c..aac308d 100644
--- a/pkg/compiler/lib/src/js_backend/backend_helpers.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_helpers.dart
@@ -5,26 +5,21 @@
 library dart2js.js_backend.helpers;
 
 import '../common.dart';
-import '../common/names.dart' show
-    Identifiers,
-    Uris;
-import '../common/resolution.dart' show
-    Resolution;
-import '../compiler.dart' show
-    Compiler;
-import '../core_types.dart' show
-    CoreClasses;
-import '../elements/elements.dart' show
-    AbstractFieldElement,
-    ClassElement,
-    ConstructorElement,
-    Element,
-    EnumClassElement,
-    FunctionElement,
-    LibraryElement,
-    MethodElement;
-import '../library_loader.dart' show
-    LoadedLibraries;
+import '../common/names.dart' show Identifiers, Uris;
+import '../common/resolution.dart' show Resolution;
+import '../compiler.dart' show Compiler;
+import '../core_types.dart' show CoreClasses;
+import '../elements/elements.dart'
+    show
+        AbstractFieldElement,
+        ClassElement,
+        ConstructorElement,
+        Element,
+        EnumClassElement,
+        FunctionElement,
+        LibraryElement,
+        MethodElement;
+import '../library_loader.dart' show LoadedLibraries;
 
 import 'js_backend.dart';
 
@@ -37,14 +32,12 @@
       new Uri(scheme: 'dart', path: '_foreign_helper');
   static final Uri DART_JS_MIRRORS =
       new Uri(scheme: 'dart', path: '_js_mirrors');
-  static final Uri DART_JS_NAMES =
-      new Uri(scheme: 'dart', path: '_js_names');
+  static final Uri DART_JS_NAMES = new Uri(scheme: 'dart', path: '_js_names');
   static final Uri DART_EMBEDDED_NAMES =
       new Uri(scheme: 'dart', path: '_js_embedded_names');
   static final Uri DART_ISOLATE_HELPER =
       new Uri(scheme: 'dart', path: '_isolate_helper');
-  static final Uri PACKAGE_JS =
-         new Uri(scheme: 'package', path: 'js/js.dart');
+  static final Uri PACKAGE_JS = new Uri(scheme: 'package', path: 'js/js.dart');
 
   static const String INVOKE_ON = '_getCachedInvocation';
   static const String START_ROOT_ISOLATE = 'startRootIsolate';
@@ -67,7 +60,6 @@
   MethodElement assertThrow;
   MethodElement assertHelper;
 
-
   LibraryElement jsHelperLibrary;
   LibraryElement asyncLibrary;
   LibraryElement interceptorsLibrary;
@@ -203,9 +195,9 @@
       asyncLibrary = library;
     } else if (uri == Uris.dart__internal) {
       internalLibrary = library;
-    } else if (uri ==  DART_INTERCEPTORS) {
+    } else if (uri == DART_INTERCEPTORS) {
       interceptorsLibrary = library;
-    } else if (uri ==  DART_FOREIGN_HELPER) {
+    } else if (uri == DART_FOREIGN_HELPER) {
       foreignLibrary = library;
     } else if (uri == DART_ISOLATE_HELPER) {
       isolateHelperLibrary = library;
@@ -225,7 +217,8 @@
     boundClosureClass = lookupHelperClass('BoundClosure');
     closureClass = lookupHelperClass('Closure');
     if (!missingHelperClasses.isEmpty) {
-      reporter.internalError(jsHelperLibrary,
+      reporter.internalError(
+          jsHelperLibrary,
           'dart:_js_helper library does not contain required classes: '
           '$missingHelperClasses');
     }
@@ -309,7 +302,6 @@
     }
   }
 
-
   void onLibrariesLoaded(LoadedLibraries loadedLibraries) {
     assert(loadedLibraries.containsLibrary(Uris.dart_core));
     assert(loadedLibraries.containsLibrary(DART_INTERCEPTORS));
@@ -340,8 +332,7 @@
     }
 
     jsIndexableClass.ensureResolved(resolution);
-    jsIndexableLength = compiler.lookupElementIn(
-        jsIndexableClass, 'length');
+    jsIndexableLength = compiler.lookupElementIn(jsIndexableClass, 'length');
     if (jsIndexableLength != null && jsIndexableLength.isAbstractField) {
       AbstractFieldElement element = jsIndexableLength;
       jsIndexableLength = element.getter;
@@ -396,7 +387,6 @@
     return findHelper('isJsIndexable');
   }
 
-
   Element get throwIllegalArgumentException {
     return findHelper('iae');
   }
@@ -608,8 +598,7 @@
   }
 
   Element get asyncStarController {
-    ClassElement classElement =
-        findAsyncHelper("_AsyncStarStreamController");
+    ClassElement classElement = findAsyncHelper("_AsyncStarStreamController");
     classElement.ensureResolved(resolution);
     return classElement;
   }
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
index 29e6743..3edac4f 100644
--- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -4,17 +4,10 @@
 
 library dart2js.js_helpers.impact;
 
-import '../common/names.dart' show
-    Identifiers;
-import '../compiler.dart' show
-    Compiler;
-import '../core_types.dart' show
-    CoreClasses;
-import '../dart_types.dart' show
-    InterfaceType;
-import '../elements/elements.dart' show
-    ClassElement,
-    Element;
+import '../compiler.dart' show Compiler;
+import '../core_types.dart' show CoreClasses;
+import '../dart_types.dart' show InterfaceType;
+import '../elements/elements.dart' show ClassElement, Element;
 
 import 'backend_helpers.dart';
 import 'constant_system_javascript.dart';
@@ -27,10 +20,11 @@
   final List<ClassElement> instantiatedClasses;
   final List<BackendImpact> otherImpacts;
 
-  BackendImpact({this.staticUses: const <Element>[],
-                 this.instantiatedTypes: const <InterfaceType>[],
-                 this.instantiatedClasses: const <ClassElement>[],
-                 this.otherImpacts: const <BackendImpact>[]});
+  BackendImpact(
+      {this.staticUses: const <Element>[],
+      this.instantiatedTypes: const <InterfaceType>[],
+      this.instantiatedClasses: const <ClassElement>[],
+      this.otherImpacts: const <BackendImpact>[]});
 }
 
 /// The JavaScript backend dependencies for various features.
@@ -49,11 +43,11 @@
 
   BackendImpact get getRuntimeTypeArgument {
     if (_getRuntimeTypeArgument == null) {
-      _getRuntimeTypeArgument = new BackendImpact(
-          staticUses: [
-            helpers.getRuntimeTypeArgument,
-            helpers.getTypeArgumentByIndex,
-            helpers.copyTypeArguments]);
+      _getRuntimeTypeArgument = new BackendImpact(staticUses: [
+        helpers.getRuntimeTypeArgument,
+        helpers.getTypeArgumentByIndex,
+        helpers.copyTypeArguments
+      ]);
     }
     return _getRuntimeTypeArgument;
   }
@@ -62,14 +56,14 @@
 
   BackendImpact get computeSignature {
     if (_computeSignature == null) {
-      _computeSignature = new BackendImpact(
-          staticUses: [
-            helpers.setRuntimeTypeInfo,
-            helpers.getRuntimeTypeInfo,
-            helpers.computeSignature,
-            helpers.getRuntimeTypeArguments],
-          otherImpacts: [
-            listValues]);
+      _computeSignature = new BackendImpact(staticUses: [
+        helpers.setRuntimeTypeInfo,
+        helpers.getRuntimeTypeInfo,
+        helpers.computeSignature,
+        helpers.getRuntimeTypeArguments
+      ], otherImpacts: [
+        listValues
+      ]);
     }
     return _computeSignature;
   }
@@ -78,12 +72,12 @@
 
   BackendImpact get asyncBody {
     if (_asyncBody == null) {
-      _asyncBody = new BackendImpact(
-          staticUses: [
-            helpers.asyncHelper,
-            helpers.syncCompleterConstructor,
-            helpers.streamIteratorConstructor,
-            helpers.wrapBody]);
+      _asyncBody = new BackendImpact(staticUses: [
+        helpers.asyncHelper,
+        helpers.syncCompleterConstructor,
+        helpers.streamIteratorConstructor,
+        helpers.wrapBody
+      ]);
     }
     return _asyncBody;
   }
@@ -92,14 +86,14 @@
 
   BackendImpact get syncStarBody {
     if (_syncStarBody == null) {
-      _syncStarBody = new BackendImpact(
-          staticUses: [
-            helpers.syncStarIterableConstructor,
-            helpers.endOfIteration,
-            helpers.yieldStar,
-            helpers.syncStarUncaughtError],
-          instantiatedClasses: [
-            helpers.syncStarIterable]);
+      _syncStarBody = new BackendImpact(staticUses: [
+        helpers.syncStarIterableConstructor,
+        helpers.endOfIteration,
+        helpers.yieldStar,
+        helpers.syncStarUncaughtError
+      ], instantiatedClasses: [
+        helpers.syncStarIterable
+      ]);
     }
     return _syncStarBody;
   }
@@ -108,17 +102,17 @@
 
   BackendImpact get asyncStarBody {
     if (_asyncStarBody == null) {
-      _asyncStarBody = new BackendImpact(
-          staticUses: [
-            helpers.asyncStarHelper,
-            helpers.streamOfController,
-            helpers.yieldSingle,
-            helpers.yieldStar,
-            helpers.asyncStarControllerConstructor,
-            helpers.streamIteratorConstructor,
-            helpers.wrapBody],
-          instantiatedClasses: [
-            helpers.asyncStarController]);
+      _asyncStarBody = new BackendImpact(staticUses: [
+        helpers.asyncStarHelper,
+        helpers.streamOfController,
+        helpers.yieldSingle,
+        helpers.yieldStar,
+        helpers.asyncStarControllerConstructor,
+        helpers.streamIteratorConstructor,
+        helpers.wrapBody
+      ], instantiatedClasses: [
+        helpers.asyncStarController
+      ]);
     }
     return _asyncStarBody;
   }
@@ -128,9 +122,7 @@
   BackendImpact get typeVariableBoundCheck {
     if (_typeVariableBoundCheck == null) {
       _typeVariableBoundCheck = new BackendImpact(
-          staticUses: [
-            helpers.throwTypeError,
-            helpers.assertIsSubtype]);
+          staticUses: [helpers.throwTypeError, helpers.assertIsSubtype]);
     }
     return _typeVariableBoundCheck;
   }
@@ -140,10 +132,8 @@
   BackendImpact get abstractClassInstantiation {
     if (_abstractClassInstantiation == null) {
       _abstractClassInstantiation = new BackendImpact(
-          staticUses: [
-            helpers.throwAbstractClassInstantiationError],
-          otherImpacts: [
-            _needsString('Needed to encode the message.')]);
+          staticUses: [helpers.throwAbstractClassInstantiationError],
+          otherImpacts: [_needsString('Needed to encode the message.')]);
     }
     return _abstractClassInstantiation;
   }
@@ -152,9 +142,8 @@
 
   BackendImpact get fallThroughError {
     if (_fallThroughError == null) {
-      _fallThroughError = new BackendImpact(
-          staticUses: [
-            helpers.fallThroughError]);
+      _fallThroughError =
+          new BackendImpact(staticUses: [helpers.fallThroughError]);
     }
     return _fallThroughError;
   }
@@ -163,9 +152,7 @@
 
   BackendImpact get asCheck {
     if (_asCheck == null) {
-      _asCheck = new BackendImpact(
-          staticUses: [
-            helpers.throwRuntimeError]);
+      _asCheck = new BackendImpact(staticUses: [helpers.throwRuntimeError]);
     }
     return _asCheck;
   }
@@ -174,15 +161,14 @@
 
   BackendImpact get throwNoSuchMethod {
     if (_throwNoSuchMethod == null) {
-      _throwNoSuchMethod = new BackendImpact(
-          staticUses: [
-            helpers.throwNoSuchMethod],
-          otherImpacts: [
-            // Also register the types of the arguments passed to this method.
-            _needsList(
-                'Needed to encode the arguments for throw NoSuchMethodError.'),
-            _needsString(
-                'Needed to encode the name for throw NoSuchMethodError.')]);
+      _throwNoSuchMethod = new BackendImpact(staticUses: [
+        helpers.throwNoSuchMethod
+      ], otherImpacts: [
+        // Also register the types of the arguments passed to this method.
+        _needsList(
+            'Needed to encode the arguments for throw NoSuchMethodError.'),
+        _needsString('Needed to encode the name for throw NoSuchMethodError.')
+      ]);
     }
     return _throwNoSuchMethod;
   }
@@ -191,9 +177,8 @@
 
   BackendImpact get stringValues {
     if (_stringValues == null) {
-      _stringValues = new BackendImpact(
-          instantiatedClasses: [
-            helpers.jsStringClass]);
+      _stringValues =
+          new BackendImpact(instantiatedClasses: [helpers.jsStringClass]);
     }
     return _stringValues;
   }
@@ -202,14 +187,14 @@
 
   BackendImpact get numValues {
     if (_numValues == null) {
-      _numValues = new BackendImpact(
-          instantiatedClasses: [
-            helpers.jsIntClass,
-            helpers.jsPositiveIntClass,
-            helpers.jsUInt32Class,
-            helpers.jsUInt31Class,
-            helpers.jsNumberClass,
-            helpers.jsDoubleClass]);
+      _numValues = new BackendImpact(instantiatedClasses: [
+        helpers.jsIntClass,
+        helpers.jsPositiveIntClass,
+        helpers.jsUInt32Class,
+        helpers.jsUInt31Class,
+        helpers.jsNumberClass,
+        helpers.jsDoubleClass
+      ]);
     }
     return _numValues;
   }
@@ -222,9 +207,8 @@
 
   BackendImpact get boolValues {
     if (_boolValues == null) {
-      _boolValues = new BackendImpact(
-          instantiatedClasses: [
-            helpers.jsBoolClass]);
+      _boolValues =
+          new BackendImpact(instantiatedClasses: [helpers.jsBoolClass]);
     }
     return _boolValues;
   }
@@ -233,9 +217,8 @@
 
   BackendImpact get nullValue {
     if (_nullValue == null) {
-      _nullValue = new BackendImpact(
-          instantiatedClasses: [
-            helpers.jsNullClass]);
+      _nullValue =
+          new BackendImpact(instantiatedClasses: [helpers.jsNullClass]);
     }
     return _nullValue;
   }
@@ -244,13 +227,13 @@
 
   BackendImpact get listValues {
     if (_listValues == null) {
-      _listValues = new BackendImpact(
-          instantiatedClasses: [
-            helpers.jsArrayClass,
-            helpers.jsMutableArrayClass,
-            helpers.jsFixedArrayClass,
-            helpers.jsExtendableArrayClass,
-            helpers.jsUnmodifiableArrayClass]);
+      _listValues = new BackendImpact(instantiatedClasses: [
+        helpers.jsArrayClass,
+        helpers.jsMutableArrayClass,
+        helpers.jsFixedArrayClass,
+        helpers.jsExtendableArrayClass,
+        helpers.jsUnmodifiableArrayClass
+      ]);
     }
     return _listValues;
   }
@@ -259,12 +242,12 @@
 
   BackendImpact get throwRuntimeError {
     if (_throwRuntimeError == null) {
-      _throwRuntimeError = new BackendImpact(
-          staticUses: [
-            helpers.throwRuntimeError],
-          otherImpacts: [
-            // Also register the types of the arguments passed to this method.
-            stringValues]);
+      _throwRuntimeError = new BackendImpact(staticUses: [
+        helpers.throwRuntimeError
+      ], otherImpacts: [
+        // Also register the types of the arguments passed to this method.
+        stringValues
+      ]);
     }
     return _throwRuntimeError;
   }
@@ -273,17 +256,15 @@
 
   BackendImpact get superNoSuchMethod {
     if (_superNoSuchMethod == null) {
-      _superNoSuchMethod = new BackendImpact(
-          staticUses: [
-            helpers.createInvocationMirror,
-            helpers.objectNoSuchMethod],
-          otherImpacts: [
-            _needsInt(
-                'Needed to encode the invocation kind of super.noSuchMethod.'),
-            _needsList(
-                'Needed to encode the arguments of super.noSuchMethod.'),
-            _needsString(
-                'Needed to encode the name of super.noSuchMethod.')]);
+      _superNoSuchMethod = new BackendImpact(staticUses: [
+        helpers.createInvocationMirror,
+        helpers.objectNoSuchMethod
+      ], otherImpacts: [
+        _needsInt(
+            'Needed to encode the invocation kind of super.noSuchMethod.'),
+        _needsList('Needed to encode the arguments of super.noSuchMethod.'),
+        _needsString('Needed to encode the name of super.noSuchMethod.')
+      ]);
     }
     return _superNoSuchMethod;
   }
@@ -292,17 +273,16 @@
 
   BackendImpact get constantMapLiteral {
     if (_constantMapLiteral == null) {
-
       ClassElement find(String name) {
         return helpers.find(helpers.jsHelperLibrary, name);
       }
 
-      _constantMapLiteral = new BackendImpact(
-          instantiatedClasses: [
-            find(JavaScriptMapConstant.DART_CLASS),
-            find(JavaScriptMapConstant.DART_PROTO_CLASS),
-            find(JavaScriptMapConstant.DART_STRING_CLASS),
-            find(JavaScriptMapConstant.DART_GENERAL_CLASS)]);
+      _constantMapLiteral = new BackendImpact(instantiatedClasses: [
+        find(JavaScriptMapConstant.DART_CLASS),
+        find(JavaScriptMapConstant.DART_PROTO_CLASS),
+        find(JavaScriptMapConstant.DART_STRING_CLASS),
+        find(JavaScriptMapConstant.DART_GENERAL_CLASS)
+      ]);
     }
     return _constantMapLiteral;
   }
@@ -312,8 +292,7 @@
   BackendImpact get symbolConstructor {
     if (_symbolConstructor == null) {
       _symbolConstructor = new BackendImpact(
-        staticUses: [
-          helpers.compiler.symbolValidatedConstructor]);
+          staticUses: [helpers.compiler.symbolValidatedConstructor]);
     }
     return _symbolConstructor;
   }
@@ -323,10 +302,8 @@
   BackendImpact get constSymbol {
     if (_constSymbol == null) {
       _constSymbol = new BackendImpact(
-        instantiatedClasses: [
-          coreClasses.symbolClass],
-        staticUses: [
-          compiler.symbolConstructor.declaration]);
+          instantiatedClasses: [coreClasses.symbolClass],
+          staticUses: [compiler.symbolConstructor.declaration]);
     }
     return _constSymbol;
   }
@@ -363,9 +340,8 @@
 
   BackendImpact get assertWithoutMessage {
     if (_assertWithoutMessage == null) {
-      _assertWithoutMessage = new BackendImpact(
-          staticUses: [
-            helpers.assertHelper]);
+      _assertWithoutMessage =
+          new BackendImpact(staticUses: [helpers.assertHelper]);
     }
     return _assertWithoutMessage;
   }
@@ -375,9 +351,7 @@
   BackendImpact get assertWithMessage {
     if (_assertWithMessage == null) {
       _assertWithMessage = new BackendImpact(
-          staticUses: [
-            helpers.assertTest,
-            helpers.assertThrow]);
+          staticUses: [helpers.assertTest, helpers.assertThrow]);
     }
     return _assertWithMessage;
   }
@@ -386,9 +360,8 @@
 
   BackendImpact get asyncForIn {
     if (_asyncForIn == null) {
-      _asyncForIn = new BackendImpact(
-          staticUses: [
-            helpers.streamIteratorConstructor]);
+      _asyncForIn =
+          new BackendImpact(staticUses: [helpers.streamIteratorConstructor]);
     }
     return _asyncForIn;
   }
@@ -398,10 +371,8 @@
   BackendImpact get stringInterpolation {
     if (_stringInterpolation == null) {
       _stringInterpolation = new BackendImpact(
-          staticUses: [
-            helpers.stringInterpolationHelper],
-          otherImpacts: [
-            _needsString('Strings are created.')]);
+          staticUses: [helpers.stringInterpolationHelper],
+          otherImpacts: [_needsString('Strings are created.')]);
     }
     return _stringInterpolation;
   }
@@ -429,12 +400,12 @@
 
   BackendImpact get catchStatement {
     if (_catchStatement == null) {
-      _catchStatement = new BackendImpact(
-          staticUses: [
-            helpers.exceptionUnwrapper],
-          instantiatedClasses: [
-            helpers.jsPlainJavaScriptObjectClass,
-            helpers.jsUnknownJavaScriptObjectClass]);
+      _catchStatement = new BackendImpact(staticUses: [
+        helpers.exceptionUnwrapper
+      ], instantiatedClasses: [
+        helpers.jsPlainJavaScriptObjectClass,
+        helpers.jsUnknownJavaScriptObjectClass
+      ]);
     }
     return _catchStatement;
   }
@@ -449,7 +420,8 @@
           // here, even though we may not need the throwExpression helper.
           staticUses: [
             helpers.wrapExceptionHelper,
-            helpers.throwExpressionHelper]);
+            helpers.throwExpressionHelper
+          ]);
     }
     return _throwExpression;
   }
@@ -458,9 +430,7 @@
 
   BackendImpact get lazyField {
     if (_lazyField == null) {
-      _lazyField = new BackendImpact(
-          staticUses: [
-            helpers.cyclicThrowHelper]);
+      _lazyField = new BackendImpact(staticUses: [helpers.cyclicThrowHelper]);
     }
     return _lazyField;
   }
@@ -470,10 +440,8 @@
   BackendImpact get typeLiteral {
     if (_typeLiteral == null) {
       _typeLiteral = new BackendImpact(
-          instantiatedClasses: [
-            backend.typeImplementation],
-          staticUses: [
-            helpers.createRuntimeType]);
+          instantiatedClasses: [backend.typeImplementation],
+          staticUses: [helpers.createRuntimeType]);
     }
     return _typeLiteral;
   }
@@ -483,10 +451,8 @@
   BackendImpact get stackTraceInCatch {
     if (_stackTraceInCatch == null) {
       _stackTraceInCatch = new BackendImpact(
-          instantiatedClasses: [
-            helpers.stackTraceClass],
-          staticUses: [
-            helpers.traceFromException]);
+          instantiatedClasses: [helpers.stackTraceClass],
+          staticUses: [helpers.traceFromException]);
     }
     return _stackTraceInCatch;
   }
@@ -498,8 +464,7 @@
       _syncForIn = new BackendImpact(
           // The SSA builder recognizes certain for-in loops and can generate
           // calls to throwConcurrentModificationError.
-          staticUses: [
-            helpers.checkConcurrentModificationError]);
+          staticUses: [helpers.checkConcurrentModificationError]);
     }
     return _syncForIn;
   }
@@ -508,17 +473,16 @@
 
   BackendImpact get typeVariableExpression {
     if (_typeVariableExpression == null) {
-      _typeVariableExpression = new BackendImpact(
-          staticUses: [
-            helpers.setRuntimeTypeInfo,
-            helpers.getRuntimeTypeInfo,
-            helpers.runtimeTypeToString,
-            helpers.createRuntimeType],
-          otherImpacts: [
-            listValues,
-            getRuntimeTypeArgument,
-            _needsInt('Needed for accessing a type variable literal on this.')
-          ]);
+      _typeVariableExpression = new BackendImpact(staticUses: [
+        helpers.setRuntimeTypeInfo,
+        helpers.getRuntimeTypeInfo,
+        helpers.runtimeTypeToString,
+        helpers.createRuntimeType
+      ], otherImpacts: [
+        listValues,
+        getRuntimeTypeArgument,
+        _needsInt('Needed for accessing a type variable literal on this.')
+      ]);
     }
     return _typeVariableExpression;
   }
@@ -527,9 +491,7 @@
 
   BackendImpact get typeCheck {
     if (_typeCheck == null) {
-      _typeCheck = new BackendImpact(
-          otherImpacts: [
-            boolValues]);
+      _typeCheck = new BackendImpact(otherImpacts: [boolValues]);
     }
     return _typeCheck;
   }
@@ -538,9 +500,8 @@
 
   BackendImpact get checkedModeTypeCheck {
     if (_checkedModeTypeCheck == null) {
-      _checkedModeTypeCheck = new BackendImpact(
-          staticUses: [
-            helpers.throwRuntimeError]);
+      _checkedModeTypeCheck =
+          new BackendImpact(staticUses: [helpers.throwRuntimeError]);
     }
     return _checkedModeTypeCheck;
   }
@@ -549,9 +510,8 @@
 
   BackendImpact get malformedTypeCheck {
     if (_malformedTypeCheck == null) {
-      _malformedTypeCheck = new BackendImpact(
-          staticUses: [
-            helpers.throwTypeError]);
+      _malformedTypeCheck =
+          new BackendImpact(staticUses: [helpers.throwTypeError]);
     }
     return _malformedTypeCheck;
   }
@@ -560,15 +520,15 @@
 
   BackendImpact get genericTypeCheck {
     if (_genericTypeCheck == null) {
-      _genericTypeCheck = new BackendImpact(
-          staticUses: [
-            helpers.checkSubtype,
-            // TODO(johnniwinther): Investigate why this is needed.
-            helpers.setRuntimeTypeInfo,
-            helpers.getRuntimeTypeInfo],
-          otherImpacts: [
-            listValues,
-            getRuntimeTypeArgument]);
+      _genericTypeCheck = new BackendImpact(staticUses: [
+        helpers.checkSubtype,
+        // TODO(johnniwinther): Investigate why this is needed.
+        helpers.setRuntimeTypeInfo,
+        helpers.getRuntimeTypeInfo
+      ], otherImpacts: [
+        listValues,
+        getRuntimeTypeArgument
+      ]);
     }
     return _genericTypeCheck;
   }
@@ -577,9 +537,7 @@
 
   BackendImpact get genericIsCheck {
     if (_genericIsCheck == null) {
-      _genericIsCheck = new BackendImpact(
-          otherImpacts: [
-            intValues]);
+      _genericIsCheck = new BackendImpact(otherImpacts: [intValues]);
     }
     return _genericIsCheck;
   }
@@ -588,9 +546,8 @@
 
   BackendImpact get genericCheckedModeTypeCheck {
     if (_genericCheckedModeTypeCheck == null) {
-      _genericCheckedModeTypeCheck = new BackendImpact(
-          staticUses: [
-            helpers.assertSubtype]);
+      _genericCheckedModeTypeCheck =
+          new BackendImpact(staticUses: [helpers.assertSubtype]);
     }
     return _genericCheckedModeTypeCheck;
   }
@@ -599,9 +556,8 @@
 
   BackendImpact get typeVariableTypeCheck {
     if (_typeVariableTypeCheck == null) {
-      _typeVariableTypeCheck = new BackendImpact(
-          staticUses: [
-            helpers.checkSubtypeOfRuntimeType]);
+      _typeVariableTypeCheck =
+          new BackendImpact(staticUses: [helpers.checkSubtypeOfRuntimeType]);
     }
     return _typeVariableTypeCheck;
   }
@@ -610,9 +566,8 @@
 
   BackendImpact get typeVariableCheckedModeTypeCheck {
     if (_typeVariableCheckedModeTypeCheck == null) {
-      _typeVariableCheckedModeTypeCheck = new BackendImpact(
-        staticUses: [
-          helpers.assertSubtypeOfRuntimeType]);
+      _typeVariableCheckedModeTypeCheck =
+          new BackendImpact(staticUses: [helpers.assertSubtypeOfRuntimeType]);
     }
     return _typeVariableCheckedModeTypeCheck;
   }
@@ -621,9 +576,8 @@
 
   BackendImpact get functionTypeCheck {
     if (_functionTypeCheck == null) {
-      _functionTypeCheck = new BackendImpact(
-          staticUses: [
-            helpers.functionTypeTestMetaHelper]);
+      _functionTypeCheck =
+          new BackendImpact(staticUses: [helpers.functionTypeTestMetaHelper]);
     }
     return _functionTypeCheck;
   }
@@ -632,12 +586,12 @@
 
   BackendImpact get nativeTypeCheck {
     if (_nativeTypeCheck == null) {
-      _nativeTypeCheck = new BackendImpact(
-          staticUses: [
-            // We will neeed to add the "$is" and "$as" properties on the
-            // JavaScript object prototype, so we make sure
-            // [:defineProperty:] is compiled.
-            helpers.defineProperty]);
+      _nativeTypeCheck = new BackendImpact(staticUses: [
+        // We will neeed to add the "$is" and "$as" properties on the
+        // JavaScript object prototype, so we make sure
+        // [:defineProperty:] is compiled.
+        helpers.defineProperty
+      ]);
     }
     return _nativeTypeCheck;
   }
@@ -646,9 +600,8 @@
 
   BackendImpact get closure {
     if (_closure == null) {
-      _closure = new BackendImpact(
-          instantiatedClasses: [
-            coreClasses.functionClass]);
+      _closure =
+          new BackendImpact(instantiatedClasses: [coreClasses.functionClass]);
     }
     return _closure;
   }
diff --git a/pkg/compiler/lib/src/js_backend/backend_serialization.dart b/pkg/compiler/lib/src/js_backend/backend_serialization.dart
new file mode 100644
index 0000000..c7c2039
--- /dev/null
+++ b/pkg/compiler/lib/src/js_backend/backend_serialization.dart
@@ -0,0 +1,55 @@
+// 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 js_backend.serialization;
+
+import '../common/backend_api.dart' show BackendSerialization;
+import '../elements/elements.dart';
+import '../serialization/serialization.dart'
+    show DeserializerPlugin, ObjectDecoder, ObjectEncoder, SerializerPlugin;
+import '../serialization/keys.dart';
+import 'js_backend.dart';
+
+const String _BACKEND_DATA_TAG = 'jsBackendData';
+
+class JavaScriptBackendSerialization implements BackendSerialization {
+  final JavaScriptBackendSerializer serializer;
+  final JavaScriptBackendDeserializer deserializer;
+
+  JavaScriptBackendSerialization(JavaScriptBackend backend)
+      : serializer = new JavaScriptBackendSerializer(backend),
+        deserializer = new JavaScriptBackendDeserializer(backend);
+}
+
+class JavaScriptBackendSerializer implements SerializerPlugin {
+  final JavaScriptBackend backend;
+
+  JavaScriptBackendSerializer(this.backend);
+
+  @override
+  void onElement(Element element, ObjectEncoder createEncoder(String tag)) {
+    // TODO(johnniwinther): Add more data, e.g. js-interop names, native tags,
+    // etc.
+    String nativeName = backend.nativeData.nativeMemberName[element];
+    if (nativeName != null) {
+      ObjectEncoder encoder = createEncoder(_BACKEND_DATA_TAG);
+      encoder.setString(Key.NAME, nativeName);
+    }
+  }
+}
+
+class JavaScriptBackendDeserializer implements DeserializerPlugin {
+  final JavaScriptBackend backend;
+
+  JavaScriptBackendDeserializer(this.backend);
+
+  @override
+  void onElement(Element element, ObjectDecoder getDecoder(String tag)) {
+    ObjectDecoder decoder = getDecoder(_BACKEND_DATA_TAG);
+    if (decoder != null) {
+      String nativeName = decoder.getString(Key.NAME);
+      backend.nativeData.nativeMemberName[element] = nativeName;
+    }
+  }
+}
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 a40caad..409c44d 100644
--- a/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
+++ b/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
@@ -17,8 +17,8 @@
 
   CallStructure get callStructure => CallStructure.ONE_ARG;
 
-  jsAst.Expression generateCall(SsaCodeGenerator codegen,
-                                HTypeConversion node) {
+  jsAst.Expression generateCall(
+      SsaCodeGenerator codegen, HTypeConversion node) {
     StaticUse staticUse = getStaticUse(codegen.compiler);
     codegen.registry.registerStaticUse(staticUse);
     List<jsAst.Expression> arguments = <jsAst.Expression>[];
@@ -31,46 +31,46 @@
   }
 
   void generateAdditionalArguments(SsaCodeGenerator codegen,
-                                   HTypeConversion node,
-                                   List<jsAst.Expression> arguments) {
+      HTypeConversion node, List<jsAst.Expression> arguments) {
     // No additional arguments needed.
   }
 
-  static const List<CheckedModeHelper> helpers = const <CheckedModeHelper> [
-      const MalformedCheckedModeHelper('checkMalformedType'),
-      const CheckedModeHelper('voidTypeCheck'),
-      const CheckedModeHelper('stringTypeCast'),
-      const CheckedModeHelper('stringTypeCheck'),
-      const CheckedModeHelper('doubleTypeCast'),
-      const CheckedModeHelper('doubleTypeCheck'),
-      const CheckedModeHelper('numTypeCast'),
-      const CheckedModeHelper('numTypeCheck'),
-      const CheckedModeHelper('boolTypeCast'),
-      const CheckedModeHelper('boolTypeCheck'),
-      const CheckedModeHelper('intTypeCast'),
-      const CheckedModeHelper('intTypeCheck'),
-      const PropertyCheckedModeHelper('numberOrStringSuperNativeTypeCast'),
-      const PropertyCheckedModeHelper('numberOrStringSuperNativeTypeCheck'),
-      const PropertyCheckedModeHelper('numberOrStringSuperTypeCast'),
-      const PropertyCheckedModeHelper('numberOrStringSuperTypeCheck'),
-      const PropertyCheckedModeHelper('stringSuperNativeTypeCast'),
-      const PropertyCheckedModeHelper('stringSuperNativeTypeCheck'),
-      const PropertyCheckedModeHelper('stringSuperTypeCast'),
-      const PropertyCheckedModeHelper('stringSuperTypeCheck'),
-      const CheckedModeHelper('listTypeCast'),
-      const CheckedModeHelper('listTypeCheck'),
-      const PropertyCheckedModeHelper('listSuperNativeTypeCast'),
-      const PropertyCheckedModeHelper('listSuperNativeTypeCheck'),
-      const PropertyCheckedModeHelper('listSuperTypeCast'),
-      const PropertyCheckedModeHelper('listSuperTypeCheck'),
-      const PropertyCheckedModeHelper('interceptedTypeCast'),
-      const PropertyCheckedModeHelper('interceptedTypeCheck'),
-      const SubtypeCheckedModeHelper('subtypeCast'),
-      const SubtypeCheckedModeHelper('assertSubtype'),
-      const TypeVariableCheckedModeHelper('subtypeOfRuntimeTypeCast'),
-      const TypeVariableCheckedModeHelper('assertSubtypeOfRuntimeType'),
-      const PropertyCheckedModeHelper('propertyTypeCast'),
-      const PropertyCheckedModeHelper('propertyTypeCheck')];
+  static const List<CheckedModeHelper> helpers = const <CheckedModeHelper>[
+    const MalformedCheckedModeHelper('checkMalformedType'),
+    const CheckedModeHelper('voidTypeCheck'),
+    const CheckedModeHelper('stringTypeCast'),
+    const CheckedModeHelper('stringTypeCheck'),
+    const CheckedModeHelper('doubleTypeCast'),
+    const CheckedModeHelper('doubleTypeCheck'),
+    const CheckedModeHelper('numTypeCast'),
+    const CheckedModeHelper('numTypeCheck'),
+    const CheckedModeHelper('boolTypeCast'),
+    const CheckedModeHelper('boolTypeCheck'),
+    const CheckedModeHelper('intTypeCast'),
+    const CheckedModeHelper('intTypeCheck'),
+    const PropertyCheckedModeHelper('numberOrStringSuperNativeTypeCast'),
+    const PropertyCheckedModeHelper('numberOrStringSuperNativeTypeCheck'),
+    const PropertyCheckedModeHelper('numberOrStringSuperTypeCast'),
+    const PropertyCheckedModeHelper('numberOrStringSuperTypeCheck'),
+    const PropertyCheckedModeHelper('stringSuperNativeTypeCast'),
+    const PropertyCheckedModeHelper('stringSuperNativeTypeCheck'),
+    const PropertyCheckedModeHelper('stringSuperTypeCast'),
+    const PropertyCheckedModeHelper('stringSuperTypeCheck'),
+    const CheckedModeHelper('listTypeCast'),
+    const CheckedModeHelper('listTypeCheck'),
+    const PropertyCheckedModeHelper('listSuperNativeTypeCast'),
+    const PropertyCheckedModeHelper('listSuperNativeTypeCheck'),
+    const PropertyCheckedModeHelper('listSuperTypeCast'),
+    const PropertyCheckedModeHelper('listSuperTypeCheck'),
+    const PropertyCheckedModeHelper('interceptedTypeCast'),
+    const PropertyCheckedModeHelper('interceptedTypeCheck'),
+    const SubtypeCheckedModeHelper('subtypeCast'),
+    const SubtypeCheckedModeHelper('assertSubtype'),
+    const TypeVariableCheckedModeHelper('subtypeOfRuntimeTypeCast'),
+    const TypeVariableCheckedModeHelper('assertSubtypeOfRuntimeType'),
+    const PropertyCheckedModeHelper('propertyTypeCast'),
+    const PropertyCheckedModeHelper('propertyTypeCheck')
+  ];
 }
 
 class MalformedCheckedModeHelper extends CheckedModeHelper {
@@ -79,8 +79,7 @@
   CallStructure get callStructure => CallStructure.TWO_ARGS;
 
   void generateAdditionalArguments(SsaCodeGenerator codegen,
-                                   HTypeConversion node,
-                                   List<jsAst.Expression> arguments) {
+      HTypeConversion node, List<jsAst.Expression> arguments) {
     ErroneousElement element = node.typeExpression.element;
     arguments.add(js.escapedString(element.message));
   }
@@ -92,8 +91,7 @@
   CallStructure get callStructure => CallStructure.TWO_ARGS;
 
   void generateAdditionalArguments(SsaCodeGenerator codegen,
-                                   HTypeConversion node,
-                                   List<jsAst.Expression> arguments) {
+      HTypeConversion node, List<jsAst.Expression> arguments) {
     DartType type = node.typeExpression;
     jsAst.Name additionalArgument = codegen.backend.namer.operatorIsType(type);
     arguments.add(js.quoteName(additionalArgument));
@@ -106,8 +104,7 @@
   CallStructure get callStructure => CallStructure.TWO_ARGS;
 
   void generateAdditionalArguments(SsaCodeGenerator codegen,
-                                   HTypeConversion node,
-                                   List<jsAst.Expression> arguments) {
+      HTypeConversion node, List<jsAst.Expression> arguments) {
     assert(node.typeExpression.isTypeVariable);
     codegen.use(node.typeRepresentation);
     arguments.add(codegen.pop());
@@ -120,8 +117,7 @@
   CallStructure get callStructure => const CallStructure.unnamed(4);
 
   void generateAdditionalArguments(SsaCodeGenerator codegen,
-                                   HTypeConversion node,
-                                   List<jsAst.Expression> arguments) {
+      HTypeConversion node, List<jsAst.Expression> arguments) {
     DartType type = node.typeExpression;
     Element element = type.element;
     jsAst.Name isField = codegen.backend.namer.operatorIs(element);
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index 4d0f497..d2c539d 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -6,32 +6,20 @@
 
 import 'glue.dart';
 
-import '../../closure.dart' show
-    ClosureClassElement;
-import '../../common.dart';
-import '../../common/codegen.dart' show
-    CodegenRegistry;
+import '../../closure.dart' show ClosureClassElement;
+import '../../common/codegen.dart' show CodegenRegistry;
 import '../../constants/values.dart';
 import '../../dart_types.dart';
 import '../../elements/elements.dart';
-import '../../io/source_information.dart' show
-    SourceInformation;
+import '../../io/source_information.dart' show SourceInformation;
 import '../../js/js.dart' as js;
 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
-import '../../tree_ir/tree_ir_nodes.dart' show
-    BuiltinMethod,
-    BuiltinOperator,
-    isCompoundableOperator;
-import '../../types/types.dart' show
-    TypeMask;
-import '../../universe/call_structure.dart' show
-    CallStructure;
-import '../../universe/selector.dart' show
-    Selector;
-import '../../universe/use.dart' show
-    DynamicUse,
-    StaticUse,
-    TypeUse;
+import '../../tree_ir/tree_ir_nodes.dart'
+    show BuiltinMethod, BuiltinOperator, isCompoundableOperator;
+import '../../types/types.dart' show TypeMask;
+import '../../universe/call_structure.dart' show CallStructure;
+import '../../universe/selector.dart' show Selector;
+import '../../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
 import '../../util/maplet.dart';
 
 class CodegenBailout {
@@ -44,7 +32,7 @@
 }
 
 class CodeGenerator extends tree_ir.StatementVisitor
-                    with tree_ir.ExpressionVisitor<js.Expression> {
+    with tree_ir.ExpressionVisitor<js.Expression> {
   final CodegenRegistry registry;
 
   final Glue glue;
@@ -66,8 +54,7 @@
   /// Stacks whose top element is the current target of an unlabeled break
   /// or continue. For continues, this is the loop node itself.
   final tree_ir.FallthroughStack shortBreak = new tree_ir.FallthroughStack();
-  final tree_ir.FallthroughStack shortContinue =
-      new tree_ir.FallthroughStack();
+  final tree_ir.FallthroughStack shortContinue = new tree_ir.FallthroughStack();
 
   /// When the top element is true, [Unreachable] statements will be emitted
   /// as [Return]s, otherwise they are emitted as empty because they are
@@ -131,8 +118,7 @@
       if (!declaredVariables.add(use.name)) break;
 
       js.VariableInitialization jsVariable = new js.VariableInitialization(
-        new js.VariableDeclaration(use.name),
-        assign.value);
+          new js.VariableDeclaration(use.name), assign.value);
       jsVariables.add(jsVariable);
 
       ++accumulatorIndex;
@@ -140,8 +126,7 @@
 
     // If the last statement is a for loop with an initializer expression, try
     // to pull that expression into an initializer as well.
-    pullFromForLoop:
-    if (accumulatorIndex < accumulator.length &&
+    pullFromForLoop: if (accumulatorIndex < accumulator.length &&
         accumulator[accumulatorIndex] is js.For) {
       js.For forLoop = accumulator[accumulatorIndex];
       if (forLoop.init is! js.Assignment) break pullFromForLoop;
@@ -157,8 +142,7 @@
       if (!declaredVariables.add(use.name)) break pullFromForLoop;
 
       js.VariableInitialization jsVariable = new js.VariableInitialization(
-        new js.VariableDeclaration(use.name),
-        assign.value);
+          new js.VariableDeclaration(use.name), assign.value);
       jsVariables.add(jsVariable);
 
       // Remove the initializer from the for loop.
@@ -175,16 +159,17 @@
     for (tree_ir.Variable variable in variableNames.keys) {
       String name = getVariableName(variable);
       if (declaredVariables.contains(name)) continue;
-      js.VariableInitialization jsVariable = new js.VariableInitialization(
-        new js.VariableDeclaration(name),
-        null);
+      js.VariableInitialization jsVariable =
+          new js.VariableInitialization(new js.VariableDeclaration(name), null);
       jsVariables.add(jsVariable);
     }
 
     if (jsVariables.length > 0) {
       // Would be nice to avoid inserting at the beginning of list.
-      accumulator.insert(0, new js.ExpressionStatement(
-          new js.VariableDeclarationList(jsVariables)));
+      accumulator.insert(
+          0,
+          new js.ExpressionStatement(new js.VariableDeclarationList(jsVariables)
+              .withSourceInformation(function.sourceInformation)));
     }
     return new js.Fun(parameters, new js.Block(accumulator));
   }
@@ -213,9 +198,8 @@
     // Synthesize a variable name that isn't used elsewhere.
     String prefix = variable.element == null ? 'v' : variable.element.name;
     int counter = 0;
-    name = glue.safeVariableName(variable.element == null
-        ? '$prefix$counter'
-        : variable.element.name);
+    name = glue.safeVariableName(
+        variable.element == null ? '$prefix$counter' : variable.element.name);
     while (!usedVariableNames.add(name)) {
       ++counter;
       name = '$prefix$counter';
@@ -235,7 +219,7 @@
   }
 
   giveup(tree_ir.Node node,
-         [String reason = 'unimplemented in CodeGenerator']) {
+      [String reason = 'unimplemented in CodeGenerator']) {
     throw new CodegenBailout(node, reason);
   }
 
@@ -248,32 +232,28 @@
   }
 
   js.Expression buildConstant(ConstantValue constant,
-                              {SourceInformation sourceInformation}) {
+      {SourceInformation sourceInformation}) {
     registry.registerCompileTimeConstant(constant);
-    return glue.constantReference(constant)
+    return glue
+        .constantReference(constant)
         .withSourceInformation(sourceInformation);
   }
 
   @override
   js.Expression visitConstant(tree_ir.Constant node) {
-    return buildConstant(
-        node.value,
-        sourceInformation: node.sourceInformation);
+    return buildConstant(node.value, sourceInformation: node.sourceInformation);
   }
 
-  js.Expression buildStaticInvoke(Element target,
-                                  List<js.Expression> arguments,
-                                  {SourceInformation sourceInformation}) {
+  js.Expression buildStaticInvoke(Element target, List<js.Expression> arguments,
+      {SourceInformation sourceInformation}) {
     if (target.isConstructor) {
       // TODO(johnniwinther): Avoid dependency on [isGenerativeConstructor] by
       // using backend-specific [StatisUse] classes.
-      registry.registerStaticUse(
-          new StaticUse.constructorInvoke(target.declaration,
-              new CallStructure.unnamed(arguments.length)));
+      registry.registerStaticUse(new StaticUse.constructorInvoke(
+          target.declaration, new CallStructure.unnamed(arguments.length)));
     } else {
-      registry.registerStaticUse(
-          new StaticUse.staticInvoke(target.declaration,
-              new CallStructure.unnamed(arguments.length)));
+      registry.registerStaticUse(new StaticUse.staticInvoke(
+          target.declaration, new CallStructure.unnamed(arguments.length)));
     }
     js.Expression elementAccess = glue.staticFunctionAccess(target);
     return new js.Call(elementAccess, arguments,
@@ -287,9 +267,7 @@
     registry.registerInstantiation(node.type);
     FunctionElement target = node.target;
     List<js.Expression> arguments = visitExpressionList(node.arguments);
-    return buildStaticInvoke(
-        target,
-        arguments,
+    return buildStaticInvoke(target, arguments,
         sourceInformation: node.sourceInformation);
   }
 
@@ -306,9 +284,11 @@
   js.Expression visitInvokeMethod(tree_ir.InvokeMethod node) {
     TypeMask mask = glue.extendMaskIfReachesAll(node.selector, node.mask);
     registerMethodInvoke(node.selector, mask);
-    return js.propertyCall(visitExpression(node.receiver),
-                           glue.invocationName(node.selector),
-                           visitExpressionList(node.arguments))
+    return js
+        .propertyCall(
+            visitExpression(node.receiver),
+            glue.invocationName(node.selector),
+            visitExpressionList(node.arguments))
         .withSourceInformation(node.sourceInformation);
   }
 
@@ -317,7 +297,7 @@
     FunctionElement target = node.target;
     List<js.Expression> arguments = visitExpressionList(node.arguments);
     return buildStaticInvoke(target, arguments,
-          sourceInformation: node.sourceInformation);
+        sourceInformation: node.sourceInformation);
   }
 
   @override
@@ -327,44 +307,43 @@
       // will be created, and that this tear-off must bypass ordinary
       // dispatch to ensure the super method is invoked.
       registry.registerStaticUse(new StaticUse.staticInvoke(
-          glue.closureFromTearOff, new CallStructure.unnamed(
-            glue.closureFromTearOff.parameters.length)));
+          glue.closureFromTearOff,
+          new CallStructure.unnamed(
+              glue.closureFromTearOff.parameters.length)));
       registry.registerStaticUse(new StaticUse.superTearOff(node.target));
     }
     if (node.target is ConstructorBodyElement) {
-      registry.registerStaticUse(
-          new StaticUse.constructorBodyInvoke(
-              node.target.declaration,
-              new CallStructure.unnamed(node.arguments.length)));
+      registry.registerStaticUse(new StaticUse.constructorBodyInvoke(
+          node.target.declaration,
+          new CallStructure.unnamed(node.arguments.length)));
       // A constructor body cannot be overriden or intercepted, so we can
       // use the short form for this invocation.
-      return js.js('#.#(#)',
-          [visitExpression(node.receiver),
-           glue.instanceMethodName(node.target),
-           visitExpressionList(node.arguments)])
-          .withSourceInformation(node.sourceInformation);
+      return js.js('#.#(#)', [
+        visitExpression(node.receiver),
+        glue.instanceMethodName(node.target),
+        visitExpressionList(node.arguments)
+      ]).withSourceInformation(node.sourceInformation);
     }
-    registry.registerStaticUse(
-        new StaticUse.superInvoke(
-            node.target.declaration,
-            new CallStructure.unnamed(node.arguments.length)));
-    return js.js('#.#.call(#, #)',
-        [glue.prototypeAccess(node.target.enclosingClass),
-         glue.invocationName(node.selector),
-         visitExpression(node.receiver),
-         visitExpressionList(node.arguments)])
-        .withSourceInformation(node.sourceInformation);
+    registry.registerStaticUse(new StaticUse.superInvoke(
+        node.target.declaration,
+        new CallStructure.unnamed(node.arguments.length)));
+    return js.js('#.#.call(#, #)', [
+      glue.prototypeAccess(node.target.enclosingClass),
+      glue.invocationName(node.selector),
+      visitExpression(node.receiver),
+      visitExpressionList(node.arguments)
+    ]).withSourceInformation(node.sourceInformation);
   }
 
   @override
   js.Expression visitOneShotInterceptor(tree_ir.OneShotInterceptor node) {
     registerMethodInvoke(node.selector, node.mask);
     registry.registerUseInterceptor();
-    return js.js('#.#(#)',
-        [glue.getInterceptorLibrary(),
-         glue.registerOneShotInterceptor(node.selector),
-         visitExpressionList(node.arguments)])
-        .withSourceInformation(node.sourceInformation);
+    return js.js('#.#(#)', [
+      glue.getInterceptorLibrary(),
+      glue.registerOneShotInterceptor(node.selector),
+      visitExpressionList(node.arguments)
+    ]).withSourceInformation(node.sourceInformation);
   }
 
   @override
@@ -377,9 +356,7 @@
   @override
   js.Expression visitLogicalOperator(tree_ir.LogicalOperator node) {
     return new js.Binary(
-        node.operator,
-        visitExpression(node.left),
-        visitExpression(node.right));
+        node.operator, visitExpression(node.left), visitExpression(node.right));
   }
 
   @override
@@ -431,9 +408,9 @@
         }
         // TODO(sra): Implement fast cast via calling 'boolTypeCast'.
       } else if (node.isTypeTest &&
-                 node.typeArguments.isEmpty &&
-                 glue.mayGenerateInstanceofCheck(type) &&
-                 tryRegisterInstanceofCheck(clazz)) {
+          node.typeArguments.isEmpty &&
+          glue.mayGenerateInstanceofCheck(type) &&
+          tryRegisterInstanceofCheck(clazz)) {
         return js.js('# instanceof #', [value, glue.constructorAccess(clazz)]);
       }
 
@@ -449,9 +426,8 @@
       //
       // Any of the last two arguments may be null if there are no type
       // arguments, and/or if no substitution is required.
-      Element function = node.isTypeTest
-          ? glue.getCheckSubtype()
-          : glue.getSubtypeCast();
+      Element function =
+          node.isTypeTest ? glue.getCheckSubtype() : glue.getSubtypeCast();
 
       js.Expression isT = js.quoteName(glue.getTypeTestTag(type));
 
@@ -464,8 +440,7 @@
           : new js.LiteralNull();
 
       return buildStaticHelperInvocation(
-          function,
-          <js.Expression>[value, isT, typeArgumentArray, asT]);
+          function, <js.Expression>[value, isT, typeArgumentArray, asT]);
     } else if (type is TypeVariableType || type is FunctionType) {
       registry.registerTypeUse(new TypeUse.isCheck(type));
 
@@ -477,8 +452,7 @@
       js.Expression typeValue = typeArguments.single;
 
       return buildStaticHelperInvocation(
-          function,
-          <js.Expression>[value, typeValue]);
+          function, <js.Expression>[value, typeValue]);
     }
     return giveup(node, 'type check unimplemented for $type.');
   }
@@ -496,7 +470,8 @@
 
   @override
   js.Expression visitVariableUse(tree_ir.VariableUse node) {
-    return buildVariableAccess(node.variable);
+    return buildVariableAccess(node.variable)
+        .withSourceInformation(node.sourceInformation);
   }
 
   js.Expression buildVariableAccess(tree_ir.Variable variable) {
@@ -525,31 +500,33 @@
 
   bool isCompoundableBuiltin(tree_ir.Expression exp) {
     return exp is tree_ir.ApplyBuiltinOperator &&
-           exp.arguments.length == 2 &&
-           isCompoundableOperator(exp.operator);
+        exp.arguments.length == 2 &&
+        isCompoundableOperator(exp.operator);
   }
 
   bool isOneConstant(tree_ir.Expression exp) {
     return exp is tree_ir.Constant && exp.value.isOne;
   }
 
-  js.Expression makeAssignment(
-      js.Expression leftHand,
-      tree_ir.Expression value,
-      {BuiltinOperator compound}) {
+  js.Expression makeAssignment(js.Expression leftHand, tree_ir.Expression value,
+      {SourceInformation sourceInformation, BuiltinOperator compound}) {
     if (isOneConstant(value)) {
       if (compound == BuiltinOperator.NumAdd) {
-        return new js.Prefix('++', leftHand);
+        return new js.Prefix('++', leftHand)
+            .withSourceInformation(sourceInformation);
       }
       if (compound == BuiltinOperator.NumSubtract) {
-        return new js.Prefix('--', leftHand);
+        return new js.Prefix('--', leftHand)
+            .withSourceInformation(sourceInformation);
       }
     }
     if (compound != null) {
-      return new js.Assignment.compound(leftHand,
-          getAsCompoundOperator(compound), visitExpression(value));
+      return new js.Assignment.compound(
+              leftHand, getAsCompoundOperator(compound), visitExpression(value))
+          .withSourceInformation(sourceInformation);
     }
-    return new js.Assignment(leftHand, visitExpression(value));
+    return new js.Assignment(leftHand, visitExpression(value))
+        .withSourceInformation(sourceInformation);
   }
 
   @override
@@ -560,10 +537,12 @@
       tree_ir.Expression left = rhs.arguments[0];
       tree_ir.Expression right = rhs.arguments[1];
       if (left is tree_ir.VariableUse && left.variable == node.variable) {
-        return makeAssignment(variable, right, compound: rhs.operator);
+        return makeAssignment(variable, right,
+            compound: rhs.operator, sourceInformation: node.sourceInformation);
       }
     }
-    return makeAssignment(variable, node.value);
+    return makeAssignment(variable, node.value,
+        sourceInformation: node.sourceInformation);
   }
 
   @override
@@ -586,14 +565,14 @@
   /// target. This means jumping to [other] is equivalent to executing [node].
   bool isEffectiveBreakTarget(tree_ir.Break node, tree_ir.Statement other) {
     return node.target.binding.next == other ||
-           other is tree_ir.Break && node.target == other.target;
+        other is tree_ir.Break && node.target == other.target;
   }
 
   /// True if the given break is equivalent to an unlabeled continue.
   bool isShortContinue(tree_ir.Break node) {
     tree_ir.Statement next = node.target.binding.next;
     return next is tree_ir.Continue &&
-           next.target.binding == shortContinue.target;
+        next.target.binding == shortContinue.target;
   }
 
   @override
@@ -619,7 +598,9 @@
     js.Expression exp = visitExpression(node.expression);
     if (node.next is tree_ir.Unreachable && emitUnreachableAsReturn.last) {
       // Emit as 'return exp' to assist local analysis in the VM.
-      accumulator.add(new js.Return(exp));
+      SourceInformation sourceInformation = node.expression.sourceInformation;
+      accumulator
+          .add(new js.Return(exp).withSourceInformation(sourceInformation));
       return null;
     } else {
       accumulator.add(new js.ExpressionStatement(exp));
@@ -633,7 +614,7 @@
 
   bool isEndOfMethod(tree_ir.Statement node) {
     return isNullReturn(node) ||
-           node is tree_ir.Break && isNullReturn(node.target.binding.next);
+        node is tree_ir.Break && isNullReturn(node.target.binding.next);
   }
 
   @override
@@ -648,12 +629,14 @@
     bool thenHasFallthrough = (fallthrough.useCount > usesBefore);
     if (thenHasFallthrough) {
       js.Statement elseBody = buildBodyStatement(node.elseStatement);
-      accumulator.add(new js.If(condition, thenBody, elseBody));
+      accumulator.add(new js.If(condition, thenBody, elseBody)
+          .withSourceInformation(node.sourceInformation));
       return null;
     } else {
       // The 'then' body cannot complete normally, so emit a short 'if'
       // and put the 'else' body after it.
-      accumulator.add(new js.If.noElse(condition, thenBody));
+      accumulator.add(new js.If.noElse(condition, thenBody)
+          .withSourceInformation(node.sourceInformation));
       return node.elseStatement;
     }
   }
@@ -716,7 +699,7 @@
   }
 
   js.Expression makeSequence(List<tree_ir.Expression> list) {
-    return list.map(visitExpression).reduce((x,y) => new js.Binary(',', x, y));
+    return list.map(visitExpression).reduce((x, y) => new js.Binary(',', x, y));
   }
 
   @override
@@ -734,7 +717,8 @@
     js.Statement loopNode;
     if (node.updates.isEmpty) {
       loopNode = new js.While(condition, body);
-    } else { // Compile as a for loop.
+    } else {
+      // Compile as a for loop.
       js.Expression init;
       if (accumulator.isNotEmpty &&
           accumulator.last is js.ExpressionStatement) {
@@ -766,8 +750,8 @@
       fallthrough.use();
     }
     shortBreak.pop();
-    accumulator.add(
-        insertLabel(node.label, new js.For(null, null, null, jsBody)));
+    accumulator
+        .add(insertLabel(node.label, new js.For(null, null, null, jsBody)));
   }
 
   bool isNull(tree_ir.Expression node) {
@@ -782,7 +766,7 @@
       fallthrough.use();
     } else {
       accumulator.add(new js.Return(visitExpression(node.value))
-            .withSourceInformation(node.sourceInformation));
+          .withSourceInformation(node.sourceInformation));
     }
   }
 
@@ -826,8 +810,7 @@
     if (classElement is ClosureClassElement) {
       registry.registerInstantiatedClosure(classElement.methodElement);
     }
-    js.Expression instance = new js.New(
-            glue.constructorAccess(classElement),
+    js.Expression instance = new js.New(glue.constructorAccess(classElement),
             visitExpressionList(node.arguments))
         .withSourceInformation(node.sourceInformation);
 
@@ -835,8 +818,8 @@
     if (typeInformation != null) {
       FunctionElement helper = glue.getAddRuntimeTypeInformation();
       js.Expression typeArguments = visitExpression(typeInformation);
-      return buildStaticHelperInvocation(helper,
-          <js.Expression>[instance, typeArguments],
+      return buildStaticHelperInvocation(
+          helper, <js.Expression>[instance, typeArguments],
           sourceInformation: node.sourceInformation);
     } else {
       return instance;
@@ -850,8 +833,8 @@
     js.Expression internalName =
         js.quoteName(glue.invocationName(node.selector));
     js.Expression kind = js.number(node.selector.invocationMirrorKind);
-    js.Expression arguments = new js.ArrayInitializer(
-        visitExpressionList(node.arguments));
+    js.Expression arguments =
+        new js.ArrayInitializer(visitExpressionList(node.arguments));
     js.Expression argumentNames = new js.ArrayInitializer(
         node.selector.namedArguments.map(js.string).toList(growable: false));
     return buildStaticHelperInvocation(glue.createInvocationMirrorMethod,
@@ -869,27 +852,29 @@
     registry.registerSpecializedGetInterceptor(interceptedClasses);
     js.Name helperName = glue.getInterceptorName(interceptedClasses);
     js.Expression globalHolder = glue.getInterceptorLibrary();
-    return js.js('#.#(#)',
-        [globalHolder, helperName, visitExpression(node.input)])
-            .withSourceInformation(node.sourceInformation);
+    return js.js('#.#(#)', [
+      globalHolder,
+      helperName,
+      visitExpression(node.input)
+    ]).withSourceInformation(node.sourceInformation);
   }
 
   @override
   js.Expression visitGetField(tree_ir.GetField node) {
     registry.registerStaticUse(new StaticUse.fieldGet(node.field));
-    return new js.PropertyAccess(
-        visitExpression(node.object),
-        glue.instanceFieldPropertyName(node.field));
+    return new js.PropertyAccess(visitExpression(node.object),
+            glue.instanceFieldPropertyName(node.field))
+        .withSourceInformation(node.sourceInformation);
   }
 
   @override
   js.Expression visitSetField(tree_ir.SetField node) {
     registry.registerStaticUse(new StaticUse.fieldSet(node.field));
-    js.PropertyAccess field =
-        new js.PropertyAccess(
-            visitExpression(node.object),
-            glue.instanceFieldPropertyName(node.field));
-    return makeAssignment(field, node.value, compound: node.compound);
+    js.PropertyAccess field = new js.PropertyAccess(
+        visitExpression(node.object),
+        glue.instanceFieldPropertyName(node.field));
+    return makeAssignment(field, node.value,
+        compound: node.compound, sourceInformation: node.sourceInformation);
   }
 
   @override
@@ -899,7 +884,9 @@
       // Tear off a method.
       registry.registerStaticUse(
           new StaticUse.staticTearOff(node.element.declaration));
-      return glue.isolateStaticClosureAccess(node.element);
+      return glue
+          .isolateStaticClosureAccess(node.element)
+          .withSourceInformation(node.sourceInformation);
     }
     if (node.useLazyGetter) {
       // Read a lazily initialized field.
@@ -910,18 +897,21 @@
           sourceInformation: node.sourceInformation);
     }
     // Read an eagerly initialized field.
-    registry.registerStaticUse(
-        new StaticUse.staticGet(node.element.declaration));
-    return glue.staticFieldAccess(node.element);
+    registry
+        .registerStaticUse(new StaticUse.staticGet(node.element.declaration));
+    return glue
+        .staticFieldAccess(node.element)
+        .withSourceInformation(node.sourceInformation);
   }
 
   @override
   js.Expression visitSetStatic(tree_ir.SetStatic node) {
     assert(node.element is FieldElement);
-    registry.registerStaticUse(
-        new StaticUse.staticSet(node.element.declaration));
+    registry
+        .registerStaticUse(new StaticUse.staticSet(node.element.declaration));
     js.Expression field = glue.staticFieldAccess(node.element);
-    return makeAssignment(field, node.value, compound: node.compound);
+    return makeAssignment(field, node.value,
+        compound: node.compound, sourceInformation: node.sourceInformation);
   }
 
   @override
@@ -932,8 +922,7 @@
   @override
   js.Expression visitGetIndex(tree_ir.GetIndex node) {
     return new js.PropertyAccess(
-        visitExpression(node.object),
-        visitExpression(node.index));
+        visitExpression(node.object), visitExpression(node.index));
   }
 
   @override
@@ -944,24 +933,21 @@
   }
 
   js.Expression buildStaticHelperInvocation(
-      FunctionElement helper,
-      List<js.Expression> arguments,
+      FunctionElement helper, List<js.Expression> arguments,
       {SourceInformation sourceInformation}) {
     registry.registerStaticUse(new StaticUse.staticInvoke(
         helper, new CallStructure.unnamed(arguments.length)));
-    return buildStaticInvoke(
-        helper, arguments, sourceInformation: sourceInformation);
+    return buildStaticInvoke(helper, arguments,
+        sourceInformation: sourceInformation);
   }
 
   @override
   js.Expression visitReifyRuntimeType(tree_ir.ReifyRuntimeType node) {
     js.Expression typeToString = buildStaticHelperInvocation(
-        glue.getRuntimeTypeToString(),
-        [visitExpression(node.value)],
+        glue.getRuntimeTypeToString(), [visitExpression(node.value)],
         sourceInformation: node.sourceInformation);
     return buildStaticHelperInvocation(
-        glue.getCreateRuntimeType(),
-        [typeToString],
+        glue.getCreateRuntimeType(), [typeToString],
         sourceInformation: node.sourceInformation);
   }
 
@@ -971,14 +957,12 @@
     js.Expression index = js.number(glue.getTypeVariableIndex(node.variable));
     if (glue.needsSubstitutionForTypeVariableAccess(context)) {
       js.Expression typeName = glue.getRuntimeTypeName(context);
-      return buildStaticHelperInvocation(
-          glue.getRuntimeTypeArgument(),
+      return buildStaticHelperInvocation(glue.getRuntimeTypeArgument(),
           [visitExpression(node.target), typeName, index],
           sourceInformation: node.sourceInformation);
     } else {
       return buildStaticHelperInvocation(
-          glue.getTypeArgumentByIndex(),
-          [visitExpression(node.target), index],
+          glue.getTypeArgumentByIndex(), [visitExpression(node.target), index],
           sourceInformation: node.sourceInformation);
     }
   }
@@ -992,8 +976,8 @@
             node.dartType, arguments, registry);
       case tree_ir.TypeExpressionKind.INSTANCE:
         // We expect only flat types for the INSTANCE representation.
-        assert(node.dartType ==
-               (node.dartType.element as ClassElement).thisType);
+        assert(
+            node.dartType == (node.dartType.element as ClassElement).thisType);
         registry.registerInstantiatedClass(glue.listClass);
         return new js.ArrayInitializer(arguments);
     }
@@ -1003,14 +987,14 @@
     if (node.dependency != null) {
       // Dependency is only used if [node] calls a Dart function. Currently only
       // through foreign function `RAW_DART_FUNCTION_REF`.
-      registry.registerStaticUse(
-          new StaticUse.staticInvoke(
-              node.dependency,
-              new CallStructure.unnamed(node.arguments.length)));
+      registry.registerStaticUse(new StaticUse.staticInvoke(
+          node.dependency, new CallStructure.unnamed(node.arguments.length)));
     }
     // TODO(sra,johnniwinther): Should this be in CodegenRegistry?
     glue.registerNativeBehavior(node.nativeBehavior, node);
-    return node.codeTemplate.instantiate(visitExpressionList(node.arguments));
+    return node.codeTemplate
+        .instantiate(visitExpressionList(node.arguments))
+        .withSourceInformation(node.sourceInformation);
   }
 
   @override
@@ -1062,92 +1046,97 @@
   @override
   js.Expression visitApplyBuiltinOperator(tree_ir.ApplyBuiltinOperator node) {
     List<js.Expression> args = visitExpressionList(node.arguments);
-    switch (node.operator) {
-      case BuiltinOperator.NumAdd:
-        return new js.Binary('+', args[0], args[1]);
-      case BuiltinOperator.NumSubtract:
-        return new js.Binary('-', args[0], args[1]);
-      case BuiltinOperator.NumMultiply:
-        return new js.Binary('*', args[0], args[1]);
-      case BuiltinOperator.NumDivide:
-        return new js.Binary('/', args[0], args[1]);
-      case BuiltinOperator.NumRemainder:
-        return new js.Binary('%', args[0], args[1]);
-      case BuiltinOperator.NumTruncatingDivideToSigned32:
-        return js.js('(# / #) | 0', args);
-      case BuiltinOperator.NumAnd:
-        return normalizeBitOp(js.js('# & #', args), node);
-      case BuiltinOperator.NumOr:
-        return normalizeBitOp(js.js('# | #', args), node);
-      case BuiltinOperator.NumXor:
-        return normalizeBitOp(js.js('# ^ #', args), node);
-      case BuiltinOperator.NumLt:
-        return new js.Binary('<', args[0], args[1]);
-      case BuiltinOperator.NumLe:
-        return new js.Binary('<=', args[0], args[1]);
-      case BuiltinOperator.NumGt:
-        return new js.Binary('>', args[0], args[1]);
-      case BuiltinOperator.NumGe:
-        return new js.Binary('>=', args[0], args[1]);
-      case BuiltinOperator.NumShl:
-        return normalizeBitOp(js.js('# << #', args), node);
-      case BuiltinOperator.NumShr:
-        // No normalization required since output is always uint32.
-        return js.js('# >>> #', args);
-      case BuiltinOperator.NumBitNot:
-        return js.js('(~#) >>> 0', args);
-      case BuiltinOperator.NumNegate:
-        return js.js('-#', args);
-      case BuiltinOperator.StringConcatenate:
-        if (args.isEmpty) return js.string('');
-        return args.reduce((e1,e2) => new js.Binary('+', e1, e2));
-      case BuiltinOperator.CharCodeAt:
-        return js.js('#.charCodeAt(#)', args);
-      case BuiltinOperator.Identical:
-        registry.registerStaticUse(new StaticUse.staticInvoke(
-            glue.identicalFunction, new CallStructure.unnamed(args.length)));
-        return buildStaticHelperInvocation(glue.identicalFunction, args);
-      case BuiltinOperator.StrictEq:
-        return new js.Binary('===', args[0], args[1]);
-      case BuiltinOperator.StrictNeq:
-        return new js.Binary('!==', args[0], args[1]);
-      case BuiltinOperator.LooseEq:
-        return new js.Binary('==', args[0], args[1]);
-      case BuiltinOperator.LooseNeq:
-        return new js.Binary('!=', args[0], args[1]);
-      case BuiltinOperator.IsFalsy:
-        return new js.Prefix('!', args[0]);
-      case BuiltinOperator.IsNumber:
-        return js.js('typeof # === "number"', args);
-      case BuiltinOperator.IsNotNumber:
-        return js.js('typeof # !== "number"', args);
-      case BuiltinOperator.IsFloor:
-        return js.js('Math.floor(#) === #', args);
-      case BuiltinOperator.IsInteger:
-        return js.js('typeof # === "number" && Math.floor(#) === #', args);
-      case BuiltinOperator.IsNotInteger:
-        return js.js('typeof # !== "number" || Math.floor(#) !== #', args);
-      case BuiltinOperator.IsUnsigned32BitInteger:
-        return js.js('# >>> 0 === #', args);
-      case BuiltinOperator.IsNotUnsigned32BitInteger:
-        return js.js('# >>> 0 !== #', args);
-      case BuiltinOperator.IsFixedLengthJSArray:
-        // TODO(sra): Remove boolify (i.e. !!).
-        return js.js(r'!!#.fixed$length', args);
-      case BuiltinOperator.IsExtendableJSArray:
-        return js.js(r'!#.fixed$length', args);
-      case BuiltinOperator.IsModifiableJSArray:
-        return js.js(r'!#.immutable$list', args);
-      case BuiltinOperator.IsUnmodifiableJSArray:
-        // TODO(sra): Remove boolify (i.e. !!).
-        return js.js(r'!!#.immutable$list', args);
+
+    js.Expression createExpression() {
+      switch (node.operator) {
+        case BuiltinOperator.NumAdd:
+          return new js.Binary('+', args[0], args[1]);
+        case BuiltinOperator.NumSubtract:
+          return new js.Binary('-', args[0], args[1]);
+        case BuiltinOperator.NumMultiply:
+          return new js.Binary('*', args[0], args[1]);
+        case BuiltinOperator.NumDivide:
+          return new js.Binary('/', args[0], args[1]);
+        case BuiltinOperator.NumRemainder:
+          return new js.Binary('%', args[0], args[1]);
+        case BuiltinOperator.NumTruncatingDivideToSigned32:
+          return js.js('(# / #) | 0', args);
+        case BuiltinOperator.NumAnd:
+          return normalizeBitOp(js.js('# & #', args), node);
+        case BuiltinOperator.NumOr:
+          return normalizeBitOp(js.js('# | #', args), node);
+        case BuiltinOperator.NumXor:
+          return normalizeBitOp(js.js('# ^ #', args), node);
+        case BuiltinOperator.NumLt:
+          return new js.Binary('<', args[0], args[1]);
+        case BuiltinOperator.NumLe:
+          return new js.Binary('<=', args[0], args[1]);
+        case BuiltinOperator.NumGt:
+          return new js.Binary('>', args[0], args[1]);
+        case BuiltinOperator.NumGe:
+          return new js.Binary('>=', args[0], args[1]);
+        case BuiltinOperator.NumShl:
+          return normalizeBitOp(js.js('# << #', args), node);
+        case BuiltinOperator.NumShr:
+          // No normalization required since output is always uint32.
+          return js.js('# >>> #', args);
+        case BuiltinOperator.NumBitNot:
+          return js.js('(~#) >>> 0', args);
+        case BuiltinOperator.NumNegate:
+          return js.js('-#', args);
+        case BuiltinOperator.StringConcatenate:
+          if (args.isEmpty) return js.string('');
+          return args.reduce((e1, e2) => new js.Binary('+', e1, e2));
+        case BuiltinOperator.CharCodeAt:
+          return js.js('#.charCodeAt(#)', args);
+        case BuiltinOperator.Identical:
+          registry.registerStaticUse(new StaticUse.staticInvoke(
+              glue.identicalFunction, new CallStructure.unnamed(args.length)));
+          return buildStaticHelperInvocation(glue.identicalFunction, args);
+        case BuiltinOperator.StrictEq:
+          return new js.Binary('===', args[0], args[1]);
+        case BuiltinOperator.StrictNeq:
+          return new js.Binary('!==', args[0], args[1]);
+        case BuiltinOperator.LooseEq:
+          return new js.Binary('==', args[0], args[1]);
+        case BuiltinOperator.LooseNeq:
+          return new js.Binary('!=', args[0], args[1]);
+        case BuiltinOperator.IsFalsy:
+          return new js.Prefix('!', args[0]);
+        case BuiltinOperator.IsNumber:
+          return js.js('typeof # === "number"', args);
+        case BuiltinOperator.IsNotNumber:
+          return js.js('typeof # !== "number"', args);
+        case BuiltinOperator.IsFloor:
+          return js.js('Math.floor(#) === #', args);
+        case BuiltinOperator.IsInteger:
+          return js.js('typeof # === "number" && Math.floor(#) === #', args);
+        case BuiltinOperator.IsNotInteger:
+          return js.js('typeof # !== "number" || Math.floor(#) !== #', args);
+        case BuiltinOperator.IsUnsigned32BitInteger:
+          return js.js('# >>> 0 === #', args);
+        case BuiltinOperator.IsNotUnsigned32BitInteger:
+          return js.js('# >>> 0 !== #', args);
+        case BuiltinOperator.IsFixedLengthJSArray:
+          // TODO(sra): Remove boolify (i.e. !!).
+          return js.js(r'!!#.fixed$length', args);
+        case BuiltinOperator.IsExtendableJSArray:
+          return js.js(r'!#.fixed$length', args);
+        case BuiltinOperator.IsModifiableJSArray:
+          return js.js(r'!#.immutable$list', args);
+        case BuiltinOperator.IsUnmodifiableJSArray:
+          // TODO(sra): Remove boolify (i.e. !!).
+          return js.js(r'!!#.immutable$list', args);
+      }
     }
+
+    return createExpression().withSourceInformation(node.sourceInformation);
   }
 
   /// Add a uint32 normalization `op >>> 0` to [op] if it is not in 31-bit
   /// range.
-  js.Expression normalizeBitOp(js.Expression op,
-                               tree_ir.ApplyBuiltinOperator node) {
+  js.Expression normalizeBitOp(
+      js.Expression op, tree_ir.ApplyBuiltinOperator node) {
     const MAX_UINT31 = 0x7fffffff;
     const MAX_UINT32 = 0xffffffff;
 
diff --git a/pkg/compiler/lib/src/js_backend/codegen/glue.dart b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
index 46ef1a5..eafef0e 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/glue.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
@@ -4,32 +4,21 @@
 
 library code_generator_dependencies;
 
-import '../backend_helpers.dart' show
-    BackendHelpers;
+import '../backend_helpers.dart' show BackendHelpers;
 import '../js_backend.dart';
 
 import '../../common.dart';
-import '../../common/registry.dart' show
-    Registry;
-import '../../common/codegen.dart' show
-    CodegenRegistry;
-import '../../compiler.dart' show
-    Compiler;
+import '../../common/codegen.dart' show CodegenRegistry;
+import '../../compiler.dart' show Compiler;
 import '../../constants/values.dart';
-import '../../dart_types.dart' show
-    DartType,
-    TypeVariableType,
-    InterfaceType;
-import '../../enqueue.dart' show
-    CodegenEnqueuer;
+import '../../dart_types.dart' show DartType, TypeVariableType, InterfaceType;
+import '../../enqueue.dart' show CodegenEnqueuer;
 import '../../elements/elements.dart';
 import '../../js_emitter/js_emitter.dart';
 import '../../js/js.dart' as js;
 import '../../native/native.dart' show NativeBehavior;
-import '../../universe/selector.dart' show
-    Selector;
-import '../../world.dart' show
-    ClassWorld;
+import '../../universe/selector.dart' show Selector;
+import '../../world.dart' show ClassWorld;
 import '../../types/types.dart';
 
 /// Encapsulates the dependencies of the function-compiler to the compiler,
@@ -150,7 +139,7 @@
   }
 
   js.Expression prototypeAccess(ClassElement e,
-                                {bool hasBeenInstantiated: false}) {
+      {bool hasBeenInstantiated: false}) {
     return _emitter.prototypeAccess(e,
         hasBeenInstantiated: hasBeenInstantiated);
   }
@@ -234,12 +223,10 @@
   }
 
   js.Expression generateTypeRepresentation(DartType dartType,
-                                           List<js.Expression> arguments,
-                                           CodegenRegistry registry) {
+      List<js.Expression> arguments, CodegenRegistry registry) {
     int variableIndex = 0;
-    js.Expression representation = _backend.rtiEncoder.getTypeRepresentation(
-        dartType,
-        (_) => arguments[variableIndex++]);
+    js.Expression representation = _backend.rtiEncoder
+        .getTypeRepresentation(dartType, (_) => arguments[variableIndex++]);
     assert(variableIndex == arguments.length);
     // Representation contains JavaScript Arrays.
     registry.registerInstantiatedClass(_helpers.jsArrayClass);
@@ -299,4 +286,10 @@
   bool mayGenerateInstanceofCheck(DartType type) {
     return _backend.mayGenerateInstanceofCheck(type);
   }
+
+  bool methodUsesReceiverArgument(FunctionElement function) {
+    assert(isInterceptedMethod(function));
+    ClassElement class_ = function.enclosingClass.declaration;
+    return isInterceptorClass(class_) || isUsedAsMixin(class_);
+  }
 }
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index edc7c55..061e44a 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -12,13 +12,9 @@
 import '../js_backend.dart';
 
 import '../../common.dart';
-import '../../common/codegen.dart' show
-    CodegenWorkItem;
-import '../../common/tasks.dart' show
-    CompilerTask,
-    GenericTask;
-import '../../compiler.dart' show
-    Compiler;
+import '../../common/codegen.dart' show CodegenWorkItem;
+import '../../common/tasks.dart' show CompilerTask, GenericTask;
+import '../../compiler.dart' show Compiler;
 import '../../constants/constant_system.dart';
 import '../../cps_ir/cps_ir_builder_task.dart';
 import '../../cps_ir/cps_ir_nodes.dart' as cps;
@@ -28,13 +24,11 @@
 import '../../cps_ir/optimizers.dart' as cps_opt;
 import '../../cps_ir/type_mask_system.dart';
 import '../../cps_ir/finalize.dart' show Finalize;
-import '../../diagnostics/invariant.dart' show
-    DEBUG_MODE;
+import '../../diagnostics/invariant.dart' show DEBUG_MODE;
 import '../../elements/elements.dart';
 import '../../js/js.dart' as js;
 import '../../js_backend/codegen/codegen.dart';
-import '../../io/source_information.dart' show
-    SourceInformationStrategy;
+import '../../io/source_information.dart' show SourceInformationStrategy;
 import '../../tree_ir/tree_ir_builder.dart' as tree_builder;
 import '../../tracer.dart';
 import '../../ssa/ssa.dart' as ssa;
@@ -42,11 +36,8 @@
 import '../../tree_ir/optimization/optimization.dart' as tree_opt;
 import '../../tree_ir/tree_ir_integrity.dart';
 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
-import '../../types/types.dart' show
-    FlatTypeMask,
-    ForwardingTypeMask,
-    TypeMask,
-    UnionTypeMask;
+import '../../types/types.dart'
+    show FlatTypeMask, ForwardingTypeMask, TypeMask, UnionTypeMask;
 
 class CpsFunctionCompiler implements FunctionCompiler {
   final ConstantSystem constantSystem;
@@ -69,7 +60,7 @@
   Inliner inliner;
 
   CpsFunctionCompiler(Compiler compiler, JavaScriptBackend backend,
-                      SourceInformationStrategy sourceInformationFactory)
+      SourceInformationStrategy sourceInformationFactory)
       : fallbackCompiler =
             new ssa.SsaFunctionCompiler(backend, sourceInformationFactory),
         cpsBuilderTask = new IrBuilderTask(compiler, sourceInformationFactory),
@@ -79,7 +70,7 @@
         glue = new Glue(compiler),
         cpsOptimizationTask = new GenericTask('CPS optimization', compiler),
         treeBuilderTask = new GenericTask('Tree builder', compiler),
-      treeOptimizationTask = new GenericTask('Tree optimization', compiler) {
+        treeOptimizationTask = new GenericTask('Tree optimization', compiler) {
     inliner = new Inliner(this);
   }
 
@@ -144,9 +135,8 @@
   ///
   /// If [targetName] is given, functions whose name contains that substring
   /// will be dumped out if the idempotency test fails.
-  void debugCpsPass(cps_opt.Pass makePass(),
-                    cps.FunctionDefinition cpsFunction,
-                    [String targetName]) {
+  void debugCpsPass(cps_opt.Pass makePass(), cps.FunctionDefinition cpsFunction,
+      [String targetName]) {
     String original = stringify(cpsFunction);
     cps_opt.Pass pass = makePass();
     pass.rewrite(cpsFunction);
@@ -165,9 +155,15 @@
         print(before);
         print('\n-->\n');
         print(after);
-        compiler.outputProvider('original', 'dump')..add(original)..close();
-        compiler.outputProvider('before', 'dump')..add(before)..close();
-        compiler.outputProvider('after', 'dump')..add(after)..close();
+        compiler.outputProvider('original', 'dump')
+          ..add(original)
+          ..close();
+        compiler.outputProvider('before', 'dump')
+          ..add(before)
+          ..close();
+        compiler.outputProvider('after', 'dump')
+          ..add(after)
+          ..close();
       }
     }
     traceGraph(pass.passName, cpsFunction);
@@ -216,9 +212,8 @@
     if (type is UnionTypeMask) {
       return '[${type.disjointMasks.map(formatTypeMask).join(', ')}]';
     } else if (type is FlatTypeMask) {
-      if (type.isEmpty) {
-        return "null";
-      }
+      if (type.isEmpty) return "empty";
+      if (type.isNull) return "null";
       String suffix = (type.isExact ? "" : "+") + (type.isNullable ? "?" : "!");
       return '${type.base.name}$suffix';
     } else if (type is ForwardingTypeMask) {
@@ -231,9 +226,8 @@
     if (PRINT_TYPED_IR_FILTER != null &&
         PRINT_TYPED_IR_FILTER.matchAsPrefix(cpsFunction.element.name) != null) {
       String printType(nodeOrRef, String s) {
-        cps.Node node = nodeOrRef is cps.Reference
-            ? nodeOrRef.definition
-            : nodeOrRef;
+        cps.Node node =
+            nodeOrRef is cps.Reference ? nodeOrRef.definition : nodeOrRef;
         return node is cps.Variable && node.type != null
             ? '$s:${formatTypeMask(node.type)}'
             : s;
@@ -295,8 +289,8 @@
 
   tree_ir.FunctionDefinition compileToTreeIr(cps.FunctionDefinition cpsNode) {
     applyCpsPass(new Finalize(backend), cpsNode);
-    tree_builder.Builder builder = new tree_builder.Builder(
-        reporter.internalError);
+    tree_builder.Builder builder =
+        new tree_builder.Builder(reporter.internalError, glue);
     tree_ir.FunctionDefinition treeNode =
         treeBuilderTask.measure(() => builder.buildFunction(cpsNode));
     assert(treeNode != null);
@@ -323,7 +317,8 @@
 
     treeOptimizationTask.measure(() {
       applyTreePass(new StatementRewriter());
-      applyTreePass(new VariableMerger(minifying: compiler.enableMinification));
+      applyTreePass(
+          new VariableMerger(minifying: compiler.options.enableMinification));
       applyTreePass(new LoopRewriter());
       applyTreePass(new LogicalRewriter());
       applyTreePass(new PullIntoInitializers());
@@ -332,8 +327,8 @@
     return node;
   }
 
-  js.Fun compileToJavaScript(CodegenWorkItem work,
-                             tree_ir.FunctionDefinition definition) {
+  js.Fun compileToJavaScript(
+      CodegenWorkItem work, tree_ir.FunctionDefinition definition) {
     CodeGenerator codeGen = new CodeGenerator(glue, work.registry);
     Element element = work.element;
     js.Fun code = codeGen.buildFunction(definition);
@@ -346,16 +341,16 @@
 
   Iterable<CompilerTask> get tasks {
     return <CompilerTask>[
-        cpsBuilderTask,
-        cpsOptimizationTask,
-        treeBuilderTask,
-        treeOptimizationTask]
-      ..addAll(fallbackCompiler.tasks);
+      cpsBuilderTask,
+      cpsOptimizationTask,
+      treeBuilderTask,
+      treeOptimizationTask
+    ]..addAll(fallbackCompiler.tasks);
   }
 
   js.Node attachPosition(js.Node node, AstElement element) {
-    return node.withSourceInformation(
-        sourceInformationFactory.createBuilderForContext(element)
-            .buildDeclaration(element));
+    return node.withSourceInformation(sourceInformationFactory
+        .createBuilderForContext(element)
+        .buildDeclaration(element));
   }
 }
diff --git a/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart b/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
index 4ca64fa..3c0f485 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
@@ -7,7 +7,6 @@
 import '../../elements/elements.dart';
 import '../../js_backend/codegen/glue.dart';
 import '../../universe/selector.dart' show Selector;
-import '../../cps_ir/cps_ir_builder.dart' show ThisParameterLocal;
 import '../../cps_ir/cps_fragment.dart';
 import '../../common/names.dart';
 
@@ -38,8 +37,13 @@
 class UnsugarVisitor extends TrampolineRecursiveVisitor implements Pass {
   Glue _glue;
 
-  Parameter thisParameter;
-  Parameter explicitReceiverParameter;
+  FunctionDefinition function;
+
+  Parameter get receiverParameter => function.receiverParameter;
+
+  /// The interceptor of the receiver.  For some methods, this is the receiver
+  /// itself, for others, it is the interceptor parameter.
+  Parameter receiverInterceptor;
 
   // In a catch block, rethrow implicitly throws the block's exception
   // parameter.  This is the exception parameter when nested in a catch
@@ -50,15 +54,8 @@
 
   String get passName => 'Unsugaring';
 
-  bool methodUsesReceiverArgument(FunctionElement function) {
-    assert(_glue.isInterceptedMethod(function));
-    ClassElement clazz = function.enclosingClass.declaration;
-    return _glue.isInterceptorClass(clazz) ||
-           _glue.isUsedAsMixin(clazz);
-  }
-
   void rewrite(FunctionDefinition function) {
-    thisParameter = function.thisParameter;
+    this.function = function;
     bool inInterceptedMethod = _glue.isInterceptedMethod(function.element);
 
     if (function.element.name == '==' &&
@@ -70,15 +67,16 @@
     }
 
     if (inInterceptedMethod) {
-      ThisParameterLocal holder = thisParameter.hint;
-      explicitReceiverParameter = new Parameter(
-          new ExplicitReceiverParameterEntity(holder.executableContext));
-      explicitReceiverParameter.parent = function;
-      function.parameters.insert(0, explicitReceiverParameter);
-    }
-
-    if (inInterceptedMethod && methodUsesReceiverArgument(function.element)) {
-      thisParameter.replaceUsesWith(explicitReceiverParameter);
+      function.interceptorParameter = new Parameter(null)..parent = function;
+      // Since the receiver won't be compiled to "this", set a hint on it
+      // so the parameter gets a meaningful name.
+      function.receiverParameter.hint =
+          new ExplicitReceiverParameterEntity(function.element);
+      // If we need an interceptor for the receiver, use the receiver itself
+      // if possible, otherwise the interceptor argument.
+      receiverInterceptor = _glue.methodUsesReceiverArgument(function.element)
+          ? function.interceptorParameter
+          : receiverParameter;
     }
 
     visit(function);
@@ -109,18 +107,17 @@
     //       body;
     //
     CpsFragment cps = new CpsFragment();
-    Primitive isNull = cps.applyBuiltin(
-        BuiltinOperator.Identical,
+    Primitive isNull = cps.applyBuiltin(BuiltinOperator.Identical,
         <Primitive>[function.parameters.single, cps.makeNull()]);
     CpsFragment trueBranch = cps.ifTruthy(isNull);
-    trueBranch.invokeContinuation(function.returnContinuation,
-        <Primitive>[trueBranch.makeFalse()]);
+    trueBranch.invokeContinuation(
+        function.returnContinuation, <Primitive>[trueBranch.makeFalse()]);
     cps.insertAbove(function.body);
   }
 
   /// Insert a static call to [function] immediately above [node].
-  Primitive insertStaticCallAbove(FunctionElement function,
-      List<Primitive> arguments, Expression node) {
+  Primitive insertStaticCallAbove(
+      FunctionElement function, List<Primitive> arguments, Expression node) {
     // TODO(johnniwinther): Come up with an implementation of SourceInformation
     // for calls such as this one that don't appear in the original source.
     InvokeStatic invoke = new InvokeStatic(
@@ -154,9 +151,7 @@
 
       if (stackTraceParameter.hasAtLeastOneUse) {
         InvokeStatic stackTraceValue = insertStaticCallAbove(
-            _glue.getTraceFromException(),
-            [_exceptionParameter],
-            body);
+            _glue.getTraceFromException(), [_exceptionParameter], body);
         stackTraceParameter.replaceUsesWith(stackTraceValue);
       }
     }
@@ -173,9 +168,7 @@
   processThrow(Throw node) {
     // The subexpression of throw is wrapped in the JavaScript output.
     Primitive wrappedException = insertStaticCallAbove(
-        _glue.getWrapExceptionHelper(),
-        [node.value],
-        node);
+        _glue.getWrapExceptionHelper(), [node.value], node);
     node.valueRef.changeTo(wrappedException);
   }
 
@@ -203,53 +196,50 @@
     if (node.selector == Selectors.equals &&
         node.argumentRefs.length == 1 &&
         isNullConstant(node.argument(0))) {
-      node.replaceWith(new ApplyBuiltinOperator(
-          BuiltinOperator.Identical,
-          [node.receiver, node.argument(0)],
-          node.sourceInformation));
+      node.replaceWith(new ApplyBuiltinOperator(BuiltinOperator.Identical,
+          [node.receiver, node.argument(0)], node.sourceInformation));
       return;
     }
 
     Primitive receiver = node.receiver;
-    Primitive newReceiver;
+    Primitive interceptor;
 
-    if (receiver == explicitReceiverParameter) {
-      // If the receiver is the explicit receiver, we are calling a method in
+    if (receiver == receiverParameter && receiverInterceptor != null) {
+      // TODO(asgerf): This could be done by GVN.
+      // If the receiver is 'this', we are calling a method in
       // the same interceptor:
       //  Change 'receiver.foo()'  to  'this.foo(receiver)'.
-      newReceiver = thisParameter;
+      interceptor = receiverInterceptor;
     } else {
-      newReceiver = new Interceptor(receiver, node.sourceInformation);
+      interceptor = new Interceptor(receiver, node.sourceInformation);
       if (receiver.hint != null) {
-        newReceiver.hint = new InterceptorEntity(receiver.hint);
+        interceptor.hint = new InterceptorEntity(receiver.hint);
       }
-      new LetPrim(newReceiver).insertAbove(node.parent);
+      new LetPrim(interceptor).insertAbove(node.parent);
     }
-    node.argumentRefs.insert(0, node.receiverRef);
-    node.receiverRef = new Reference<Primitive>(newReceiver)..parent = node;
-    node.callingConvention = CallingConvention.Intercepted;
+    assert(node.interceptorRef == null);
+    node.makeIntercepted(interceptor);
   }
 
   processInvokeMethodDirectly(InvokeMethodDirectly node) {
     if (!_glue.isInterceptedMethod(node.target)) return;
 
     Primitive receiver = node.receiver;
-    Primitive newReceiver;
+    Primitive interceptor;
 
-    if (receiver == explicitReceiverParameter) {
-      // If the receiver is the explicit receiver, we are calling a method in
+    if (receiver == receiverParameter && receiverInterceptor != null) {
+      // If the receiver is 'this', we are calling a method in
       // the same interceptor:
       //  Change 'receiver.foo()'  to  'this.foo(receiver)'.
-      newReceiver = thisParameter;
+      interceptor = receiverInterceptor;
     } else {
-      newReceiver = new Interceptor(receiver, node.sourceInformation);
+      interceptor = new Interceptor(receiver, node.sourceInformation);
       if (receiver.hint != null) {
-        newReceiver.hint = new InterceptorEntity(receiver.hint);
+        interceptor.hint = new InterceptorEntity(receiver.hint);
       }
-      new LetPrim(newReceiver).insertAbove(node.parent);
+      new LetPrim(interceptor).insertAbove(node.parent);
     }
-    node.argumentRefs.insert(0, node.receiverRef);
-    node.receiverRef = new Reference<Primitive>(newReceiver)..parent = node;
-    node.callingConvention = CallingConvention.Intercepted;
+    assert(node.interceptorRef == null);
+    node.makeIntercepted(interceptor);
   }
 }
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index 0550d8d..fc53cb4 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -15,13 +15,11 @@
  * (if there are some). It is hence up to that function to decide which
  * constants should be inlined or not.
  */
-class ConstantEmitter
-    implements ConstantValueVisitor<jsAst.Expression, Null> {
-
+class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
   // Matches blank lines, comment lines and trailing comments that can't be part
   // of a string.
   static final RegExp COMMENT_RE =
-      new RegExp(r'''^ *(//.*)?\n|  *//[^''"\n]*$''' , multiLine: true);
+      new RegExp(r'''^ *(//.*)?\n|  *//[^''"\n]*$''', multiLine: true);
 
   final Compiler compiler;
   final Namer namer;
@@ -66,12 +64,11 @@
     return new jsAst.LiteralNull();
   }
 
-  static final _exponentialRE = new RegExp(
-      '^'
-      '\([-+]?\)'         // 1: sign
-      '\([0-9]+\)'        // 2: leading digit(s)
+  static final _exponentialRE = new RegExp('^'
+      '\([-+]?\)' // 1: sign
+      '\([0-9]+\)' // 2: leading digit(s)
       '\(\.\([0-9]*\)\)?' // 4: fraction digits
-      'e\([-+]?[0-9]+\)'  // 5: exponent with sign
+      'e\([-+]?[0-9]+\)' // 5: exponent with sign
       r'$');
 
   /// Reduces the size of exponential representations when minification is
@@ -105,7 +102,7 @@
     // digits are lost anyway.
     String representation = primitiveValue.toString();
     String alternative = null;
-    int cutoff = compiler.enableMinification ? 10000 : 1e10.toInt();
+    int cutoff = compiler.options.enableMinification ? 10000 : 1e10.toInt();
     if (primitiveValue.abs() >= cutoff) {
       alternative = _shortenExponentialRepresentation(
           primitiveValue.toStringAsExponential());
@@ -133,7 +130,7 @@
 
   @override
   jsAst.Expression visitBool(BoolConstantValue constant, [_]) {
-    if (compiler.enableMinification) {
+    if (compiler.options.enableMinification) {
       if (constant.isTrue) {
         // Use !0 for true.
         return js("!0");
@@ -154,7 +151,7 @@
   @override
   jsAst.Expression visitString(StringConstantValue constant, [_]) {
     return js.escapedString(constant.primitiveValue.slowToString(),
-                            ascii: true);
+        ascii: true);
   }
 
   @override
@@ -189,7 +186,8 @@
     jsAst.Expression jsGeneralMap() {
       List<jsAst.Expression> data = <jsAst.Expression>[];
       for (int i = 0; i < constant.keys.length; i++) {
-        jsAst.Expression keyExpression = constantReferenceGenerator(constant.keys[i]);
+        jsAst.Expression keyExpression =
+            constantReferenceGenerator(constant.keys[i]);
         jsAst.Expression valueExpression =
             constantReferenceGenerator(constant.values[i]);
         data.add(keyExpression);
@@ -208,32 +206,32 @@
     int emittedArgumentCount = 0;
     classElement.implementation.forEachInstanceField(
         (ClassElement enclosing, Element field) {
-          if (field.name == JavaScriptMapConstant.LENGTH_NAME) {
-            arguments.add(
-                new jsAst.LiteralNumber('${constant.keyList.entries.length}'));
-          } else if (field.name == JavaScriptMapConstant.JS_OBJECT_NAME) {
-            arguments.add(jsMap());
-          } else if (field.name == JavaScriptMapConstant.KEYS_NAME) {
-            arguments.add(constantReferenceGenerator(constant.keyList));
-          } else if (field.name == JavaScriptMapConstant.PROTO_VALUE) {
-            assert(constant.protoValue != null);
-            arguments.add(constantReferenceGenerator(constant.protoValue));
-          } else if (field.name == JavaScriptMapConstant.JS_DATA_NAME) {
-            arguments.add(jsGeneralMap());
-          } else {
-            reporter.internalError(field,
-                "Compiler has unexpected field ${field.name} for "
-                "${className}.");
-          }
-          emittedArgumentCount++;
-        },
-        includeSuperAndInjectedMembers: true);
+      if (field.name == JavaScriptMapConstant.LENGTH_NAME) {
+        arguments
+            .add(new jsAst.LiteralNumber('${constant.keyList.entries.length}'));
+      } else if (field.name == JavaScriptMapConstant.JS_OBJECT_NAME) {
+        arguments.add(jsMap());
+      } else if (field.name == JavaScriptMapConstant.KEYS_NAME) {
+        arguments.add(constantReferenceGenerator(constant.keyList));
+      } else if (field.name == JavaScriptMapConstant.PROTO_VALUE) {
+        assert(constant.protoValue != null);
+        arguments.add(constantReferenceGenerator(constant.protoValue));
+      } else if (field.name == JavaScriptMapConstant.JS_DATA_NAME) {
+        arguments.add(jsGeneralMap());
+      } else {
+        reporter.internalError(
+            field,
+            "Compiler has unexpected field ${field.name} for "
+            "${className}.");
+      }
+      emittedArgumentCount++;
+    }, includeSuperAndInjectedMembers: true);
     if ((className == JavaScriptMapConstant.DART_STRING_CLASS &&
-         emittedArgumentCount != 3) ||
+            emittedArgumentCount != 3) ||
         (className == JavaScriptMapConstant.DART_PROTO_CLASS &&
-         emittedArgumentCount != 4) ||
+            emittedArgumentCount != 4) ||
         (className == JavaScriptMapConstant.DART_GENERAL_CLASS &&
-         emittedArgumentCount != 1)) {
+            emittedArgumentCount != 1)) {
       reporter.internalError(classElement,
           "Compiler and ${className} disagree on number of fields.");
     }
@@ -255,7 +253,7 @@
     DartType type = constant.representedType;
     jsAst.Name typeName = namer.runtimeTypeName(type.element);
     return new jsAst.Call(getHelperProperty(backend.helpers.createRuntimeType),
-                          [js.quoteName(typeName)]);
+        [js.quoteName(typeName)]);
   }
 
   @override
@@ -275,7 +273,7 @@
         return constant.payload;
       default:
         reporter.internalError(NO_LOCATION_SPANNABLE,
-                               "Unexpected DummyConstantKind ${constant.kind}");
+            "Unexpected DummyConstantKind ${constant.kind}");
         return null;
     }
   }
@@ -283,16 +281,15 @@
   @override
   jsAst.Expression visitConstructed(ConstructedConstantValue constant, [_]) {
     Element element = constant.type.element;
-    if (backend.isForeign(element)
-        && element.name == 'JS_CONST') {
+    if (backend.isForeign(element) && element.name == 'JS_CONST') {
       StringConstantValue str = constant.fields.values.single;
       String value = str.primitiveValue.slowToString();
       return new jsAst.LiteralExpression(stripComments(value));
     }
     jsAst.Expression constructor =
         backend.emitter.constructorAccess(constant.type.element);
-    List<jsAst.Expression> fields =
-        constant.fields.values.map(constantReferenceGenerator)
+    List<jsAst.Expression> fields = constant.fields.values
+        .map(constantReferenceGenerator)
         .toList(growable: false);
     jsAst.New instantiation = new jsAst.New(constructor, fields);
     return maybeAddTypeArguments(constant.type, instantiation);
@@ -302,16 +299,16 @@
     return rawJavaScript.replaceAll(COMMENT_RE, '');
   }
 
-  jsAst.Expression maybeAddTypeArguments(InterfaceType type,
-                                         jsAst.Expression value) {
+  jsAst.Expression maybeAddTypeArguments(
+      InterfaceType type, jsAst.Expression value) {
     if (type is InterfaceType &&
         !type.treatAsRaw &&
         backend.classNeedsRti(type.element)) {
       InterfaceType interface = type;
       RuntimeTypesEncoder rtiEncoder = backend.rtiEncoder;
-      Iterable<jsAst.Expression> arguments = interface.typeArguments
-          .map((DartType type) =>
-              rtiEncoder.getTypeRepresentationWithPlaceholders(type, (_){}));
+      Iterable<jsAst.Expression> arguments = interface.typeArguments.map(
+          (DartType type) =>
+              rtiEncoder.getTypeRepresentationWithPlaceholders(type, (_) {}));
       jsAst.Expression argumentList =
           new jsAst.ArrayInitializer(arguments.toList());
       return new jsAst.Call(
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 dcb5661..f300312 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -17,8 +17,7 @@
 
   JavaScriptConstantTask(Compiler compiler)
       : this.dartConstantCompiler = new DartConstantCompiler(compiler),
-        this.jsConstantCompiler =
-            new JavaScriptConstantCompiler(compiler),
+        this.jsConstantCompiler = new JavaScriptConstantCompiler(compiler),
         super(compiler);
 
   String get name => 'ConstantHandler';
@@ -66,20 +65,18 @@
   }
 
   ConstantExpression compileNode(Node node, TreeElements elements,
-                                 {bool enforceConst: true}) {
+      {bool enforceConst: true}) {
     return measure(() {
-      ConstantExpression result =
-          dartConstantCompiler.compileNode(node, elements,
-                                           enforceConst: enforceConst);
+      ConstantExpression result = dartConstantCompiler
+          .compileNode(node, elements, enforceConst: enforceConst);
       jsConstantCompiler.compileNode(node, elements,
           enforceConst: enforceConst);
       return result;
     });
   }
 
-  ConstantExpression compileMetadata(MetadataAnnotation metadata,
-                           Node node,
-                           TreeElements elements) {
+  ConstantExpression compileMetadata(
+      MetadataAnnotation metadata, Node node, TreeElements elements) {
     return measure(() {
       ConstantExpression constant =
           dartConstantCompiler.compileMetadata(metadata, node, elements);
@@ -92,10 +89,10 @@
   // expressions.
   @override
   void copyConstantValues(JavaScriptConstantTask task) {
-    jsConstantCompiler.constantValueMap.addAll(
-        task.jsConstantCompiler.constantValueMap);
-    dartConstantCompiler.constantValueMap.addAll(
-        task.dartConstantCompiler.constantValueMap);
+    jsConstantCompiler.constantValueMap
+        .addAll(task.jsConstantCompiler.constantValueMap);
+    dartConstantCompiler.constantValueMap
+        .addAll(task.dartConstantCompiler.constantValueMap);
   }
 }
 
@@ -106,7 +103,6 @@
  */
 class JavaScriptConstantCompiler extends ConstantCompilerBase
     implements BackendConstantEnvironment {
-
   /** Set of all registered compiled constants. */
   final Set<ConstantValue> compiledConstants = new Set<ConstantValue>();
 
@@ -125,15 +121,15 @@
   JavaScriptConstantCompiler(Compiler compiler)
       : super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM);
 
-  ConstantExpression compileVariableWithDefinitions(VariableElement element,
-                                          TreeElements definitions,
-                                          {bool isConst: false,
-                                           bool checkType: true}) {
+  ConstantExpression compileVariableWithDefinitions(
+      VariableElement element, TreeElements definitions,
+      {bool isConst: false, bool checkType: true}) {
     if (!isConst && lazyStatics.contains(element)) {
       return null;
     }
     ConstantExpression value = super.compileVariableWithDefinitions(
-        element, definitions, isConst: isConst, checkType: checkType);
+        element, definitions,
+        isConst: isConst, checkType: checkType);
     if (!isConst && value == null) {
       lazyStatics.add(element);
     }
@@ -152,10 +148,10 @@
   Iterable<VariableElement> getStaticNonFinalFieldsForEmission() {
     return initialVariableValues.keys.where((element) {
       return element.kind == ElementKind.FIELD &&
-             !element.isInstanceMember &&
-             !element.modifiers.isFinal &&
-             // The const fields are all either emitted elsewhere or inlined.
-             !element.modifiers.isConst;
+          !element.isInstanceMember &&
+          !element.modifiers.isFinal &&
+          // The const fields are all either emitted elsewhere or inlined.
+          !element.modifiers.isConst;
     });
   }
 
@@ -202,13 +198,13 @@
   }
 
   ConstantExpression compileNode(Node node, TreeElements elements,
-                                 {bool enforceConst: true}) {
+      {bool enforceConst: true}) {
     return compileNodeWithDefinitions(node, elements, isConst: enforceConst);
   }
 
-  ConstantExpression compileNodeWithDefinitions(Node node,
-                                      TreeElements definitions,
-                                      {bool isConst: true}) {
+  ConstantExpression compileNodeWithDefinitions(
+      Node node, TreeElements definitions,
+      {bool isConst: true}) {
     ConstantExpression constant = nodeConstantMap[node];
     if (constant != null && getConstantValue(constant) != null) {
       return constant;
@@ -238,9 +234,7 @@
   }
 
   ConstantExpression compileMetadata(
-      MetadataAnnotation metadata,
-      Node node,
-      TreeElements elements) {
+      MetadataAnnotation metadata, Node node, TreeElements elements) {
     ConstantExpression constant =
         super.compileMetadata(metadata, node, elements);
     metadataConstantMap[metadata] = constant;
@@ -269,8 +263,8 @@
     }
   }
 
-  void visitFunctionElement(FunctionElement e,
-                            JavaScriptConstantCompiler constants) {
+  void visitFunctionElement(
+      FunctionElement e, JavaScriptConstantCompiler constants) {
     super.visitFunctionElement(e, constants);
     if (e.hasFunctionSignature) {
       e.functionSignature.forEachParameter((p) => visit(p, constants));
@@ -288,12 +282,12 @@
     constants.nodeConstantMap.remove(node);
 
     // TODO(ahe): This doesn't belong here. Rename this class and generalize.
-    var closureClassMap =
-        constants.compiler.closureToClassMapper.closureMappingCache
+    var closureClassMap = constants
+        .compiler.closureToClassMapper.closureMappingCache
         .remove(node);
     if (closureClassMap != null) {
-      closureClassMap.removeMyselfFrom(
-          constants.compiler.enqueuer.codegen.universe);
+      closureClassMap
+          .removeMyselfFrom(constants.compiler.enqueuer.codegen.universe);
     }
   }
 }
diff --git a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
index f6ebd07..add7563 100644
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
@@ -4,19 +4,14 @@
 
 library dart2js.constant_system.js;
 
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../constants/constant_system.dart';
 import '../constants/values.dart';
 import '../constant_system_dart.dart';
-import '../core_types.dart' show
-    CoreTypes;
+import '../core_types.dart' show CoreTypes;
 import '../dart_types.dart';
-import '../elements/elements.dart' show
-    ClassElement;
-import '../tree/tree.dart' show
-    DartString,
-    LiteralDartString;
+import '../elements/elements.dart' show ClassElement;
+import '../tree/tree.dart' show DartString, LiteralDartString;
 import 'js_backend.dart';
 
 const JAVA_SCRIPT_CONSTANT_SYSTEM = const JavaScriptConstantSystem();
@@ -30,8 +25,8 @@
       if (constant.isMinusZero) constant = DART_CONSTANT_SYSTEM.createInt(0);
       IntConstantValue intConstant = constant;
       // We convert the result of bit-operations to 32 bit unsigned integers.
-      return
-          JAVA_SCRIPT_CONSTANT_SYSTEM.createInt32(~intConstant.primitiveValue);
+      return JAVA_SCRIPT_CONSTANT_SYSTEM
+          .createInt32(~intConstant.primitiveValue);
     }
     return null;
   }
@@ -236,7 +231,8 @@
     } else if (constant.isDouble) {
       DoubleConstantValue doubleResult = constant;
       double doubleValue = doubleResult.primitiveValue;
-      if (!doubleValue.isInfinite && !doubleValue.isNaN &&
+      if (!doubleValue.isInfinite &&
+          !doubleValue.isNaN &&
           !constant.isMinusZero) {
         int intValue = doubleValue.truncate();
         if (intValue == doubleValue) {
@@ -253,24 +249,23 @@
   }
 
   NumConstantValue createInt32(int i) => new IntConstantValue(i & BITS32);
-  NumConstantValue createDouble(double d)
-      => convertToJavaScriptConstant(new DoubleConstantValue(d));
+  NumConstantValue createDouble(double d) =>
+      convertToJavaScriptConstant(new DoubleConstantValue(d));
   StringConstantValue createString(DartString string) {
     return new StringConstantValue(string);
   }
+
   BoolConstantValue createBool(bool value) => new BoolConstantValue(value);
   NullConstantValue createNull() => new NullConstantValue();
 
   @override
-  ListConstantValue createList(InterfaceType type,
-                               List<ConstantValue> values) {
+  ListConstantValue createList(InterfaceType type, List<ConstantValue> values) {
     return new ListConstantValue(type, values);
   }
 
   @override
   ConstantValue createType(Compiler compiler, DartType type) {
-    return new TypeConstantValue(
-        type,
+    return new TypeConstantValue(type,
         compiler.backend.typeImplementation.computeType(compiler.resolution));
   }
 
@@ -281,12 +276,14 @@
   //
   // We consistently match that runtime semantics at compile time as well.
   bool isInt(ConstantValue constant) {
-    return constant.isInt || constant.isMinusZero ||
+    return constant.isInt ||
+        constant.isMinusZero ||
         constant.isPositiveInfinity ||
         constant.isNegativeInfinity;
   }
-  bool isDouble(ConstantValue constant)
-      => constant.isDouble && !constant.isMinusZero;
+
+  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;
@@ -302,16 +299,14 @@
     return types.isSubtype(s, t);
   }
 
-  MapConstantValue createMap(Compiler compiler,
-                             InterfaceType sourceType,
-                             List<ConstantValue> keys,
-                             List<ConstantValue> values) {
+  MapConstantValue createMap(Compiler compiler, InterfaceType sourceType,
+      List<ConstantValue> keys, List<ConstantValue> values) {
     JavaScriptBackend backend = compiler.backend;
     CoreTypes coreTypes = compiler.coreTypes;
 
     bool onlyStringKeys = true;
     ConstantValue protoValue = null;
-    for (int i = 0; i < keys.length ; i++) {
+    for (int i = 0; i < keys.length; i++) {
       var key = keys[i];
       if (key.isString) {
         if (key.primitiveValue == JavaScriptMapConstant.PROTO_PROPERTY) {
@@ -334,8 +329,9 @@
     }
     ListConstantValue keysList = new ListConstantValue(keysType, keys);
     String className = onlyStringKeys
-        ? (hasProtoKey ? JavaScriptMapConstant.DART_PROTO_CLASS
-                       : JavaScriptMapConstant.DART_STRING_CLASS)
+        ? (hasProtoKey
+            ? JavaScriptMapConstant.DART_PROTO_CLASS
+            : JavaScriptMapConstant.DART_STRING_CLASS)
         : JavaScriptMapConstant.DART_GENERAL_CLASS;
     ClassElement classElement = backend.helpers.jsHelperLibrary.find(className);
     classElement.ensureResolved(compiler.resolution);
@@ -348,7 +344,6 @@
     }
     return new JavaScriptMapConstant(
         type, keysList, values, protoValue, onlyStringKeys);
-
   }
 }
 
@@ -375,11 +370,8 @@
   final ConstantValue protoValue;
   final bool onlyStringKeys;
 
-  JavaScriptMapConstant(InterfaceType type,
-                        ListConstantValue keyList,
-                        List<ConstantValue> values,
-                        this.protoValue,
-                        this.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;
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 1a5e287..450b826 100644
--- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
@@ -120,7 +120,6 @@
       codegenJoin.computeEscapingConstructors(classElement);
 }
 
-
 class CustomElementsAnalysisJoin {
   final JavaScriptBackend backend;
   Compiler get compiler => backend.compiler;
@@ -200,8 +199,7 @@
       }
     }
     classElement.forEachMember(selectGenerativeConstructors,
-        includeBackendMembers: false,
-        includeSuperAndInjectedMembers: false);
+        includeBackendMembers: false, includeSuperAndInjectedMembers: false);
     return result;
   }
 }
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 0a89b42..cfc0136 100644
--- a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
+++ b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
@@ -14,8 +14,9 @@
   // this could be because the field belongs to a mixin. In such a case this
   // will return `null` and a normal field name has to be used.
   jsAst.Name _minifiedInstanceFieldPropertyName(Element element) {
-    if (backend.hasFixedBackendName(element)) {
-      return new StringBackedName(backend.getFixedBackendName(element));
+    if (backend.nativeData.hasFixedBackendName(element)) {
+      return new StringBackedName(
+          backend.nativeData.getFixedBackendName(element));
     }
 
     _FieldNamingScope names;
@@ -145,8 +146,8 @@
   }
 
   factory _FieldNamingScope.forBox(Local box, _FieldNamingRegistry registry) {
-    return registry.scopes.putIfAbsent(
-        box, () => new _BoxFieldNamingScope(box, registry));
+    return registry.scopes
+        .putIfAbsent(box, () => new _BoxFieldNamingScope(box, registry));
   }
 
   _FieldNamingScope.rootScope(this.container, this.registry)
diff --git a/pkg/compiler/lib/src/js_backend/frequency_namer.dart b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
index fa3b79b..7698c3d 100644
--- a/pkg/compiler/lib/src/js_backend/frequency_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
@@ -4,8 +4,9 @@
 
 part of js_backend;
 
-class FrequencyBasedNamer extends Namer with _MinifiedFieldNamer,
-    _MinifiedOneShotInterceptorNamer implements jsAst.TokenFinalizer {
+class FrequencyBasedNamer extends Namer
+    with _MinifiedFieldNamer, _MinifiedOneShotInterceptorNamer
+    implements jsAst.TokenFinalizer {
   _FieldNamingRegistry fieldRegistry;
   List<TokenName> tokens = new List<TokenName>();
 
@@ -45,19 +46,15 @@
 
   @override
   jsAst.Name getFreshName(NamingScope scope, String proposedName,
-                          {bool sanitizeForNatives: false,
-                           bool sanitizeForAnnotations: false}) {
+      {bool sanitizeForNatives: false, bool sanitizeForAnnotations: false}) {
     // Grab the scope for this token
-    TokenScope tokenScope = _tokenScopes.putIfAbsent(scope,
-                                                     () => newScopeFor(scope));
+    TokenScope tokenScope =
+        _tokenScopes.putIfAbsent(scope, () => newScopeFor(scope));
 
     // Get the name the normal namer would use as a key.
-    String proposed = _generateFreshStringForName(proposedName,
-                                                  scope,
-                                                  sanitizeForNatives:
-                                                  sanitizeForNatives,
-                                                  sanitizeForAnnotations:
-                                                  sanitizeForAnnotations);
+    String proposed = _generateFreshStringForName(proposedName, scope,
+        sanitizeForNatives: sanitizeForNatives,
+        sanitizeForAnnotations: sanitizeForAnnotations);
 
     TokenName name = new TokenName(tokenScope, proposed);
     tokens.add(name);
@@ -136,9 +133,8 @@
       proposal = new String.fromCharCodes(_nextName);
       _incrementName();
     } while (MinifyNamer._hasBannedPrefix(proposal) ||
-             illegalNames.contains(proposal));
+        illegalNames.contains(proposal));
 
     return proposal;
   }
 }
-
diff --git a/pkg/compiler/lib/src/js_backend/js_backend.dart b/pkg/compiler/lib/src/js_backend/js_backend.dart
index 4431a10..ca13518 100644
--- a/pkg/compiler/lib/src/js_backend/js_backend.dart
+++ b/pkg/compiler/lib/src/js_backend/js_backend.dart
@@ -12,110 +12,78 @@
 
 import '../closure.dart';
 import '../common.dart';
-import '../common/backend_api.dart' show
-    Backend,
-    ImpactTransformer,
-    ForeignResolver;
-import '../common/codegen.dart' show
-    CodegenImpact,
-    CodegenRegistry,
-    CodegenWorkItem;
-import '../common/names.dart' show
-    Identifiers,
-    Names,
-    Selectors,
-    Uris;
-import '../common/registry.dart' show
-    EagerRegistry,
-    Registry;
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../common/resolution.dart' show
-    Feature,
-    ListLiteralUse,
-    MapLiteralUse,
-    Resolution,
-    ResolutionImpact;
-import '../common/work.dart' show
-    ItemCompilationContext;
-import '../compiler.dart' show
-    Compiler;
+import '../common/backend_api.dart'
+    show Backend, BackendSerialization, ImpactTransformer, ForeignResolver;
+import '../common/codegen.dart'
+    show CodegenImpact, CodegenRegistry, CodegenWorkItem;
+import '../common/names.dart' show Identifiers, Names, Selectors, Uris;
+import '../common/registry.dart' show EagerRegistry, Registry;
+import '../common/tasks.dart' show CompilerTask;
+import '../common/resolution.dart'
+    show Feature, ListLiteralUse, MapLiteralUse, Resolution, ResolutionImpact;
+import '../common/work.dart' show ItemCompilationContext;
+import '../compiler.dart' show Compiler;
 import '../compile_time_constants.dart';
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
 import '../constants/values.dart';
-import '../core_types.dart' show
-    CoreClasses,
-    CoreTypes;
+import '../core_types.dart' show CoreClasses, CoreTypes;
 import '../dart_types.dart';
-import '../deferred_load.dart' show
-    DeferredLoadTask;
-import '../diagnostics/invariant.dart' show
-    DEBUG_MODE;
-import '../dump_info.dart' show
-    DumpInfoTask;
+import '../deferred_load.dart' show DeferredLoadTask;
+import '../diagnostics/invariant.dart' show DEBUG_MODE;
+import '../dump_info.dart' show DumpInfoTask;
 import '../elements/elements.dart';
-import '../elements/visitor.dart' show
-    BaseElementVisitor;
-import '../enqueue.dart' show
-    Enqueuer,
-    ResolutionEnqueuer;
+import '../elements/visitor.dart' show BaseElementVisitor;
+import '../enqueue.dart' show Enqueuer, ResolutionEnqueuer;
 import '../io/code_output.dart';
-import '../io/source_information.dart' show
-    SourceInformationStrategy,
-    useNewSourceInfo;
-import '../io/position_information.dart' show
-    PositionSourceInformationStrategy;
-import '../io/start_end_information.dart' show
-    StartEndSourceInformationStrategy;
+import '../io/source_information.dart' show SourceInformationStrategy;
+import '../io/position_information.dart' show PositionSourceInformationStrategy;
+import '../io/start_end_information.dart'
+    show StartEndSourceInformationStrategy;
 import '../js/js.dart' as jsAst;
 import '../js/js.dart' show js;
-import '../js/js_source_mapping.dart' show
-    JavaScriptSourceInformationStrategy;
+import '../js/js_source_mapping.dart' show JavaScriptSourceInformationStrategy;
 import '../js/rewrite_async.dart';
-import '../js_emitter/js_emitter.dart' show
-    CodeEmitterTask,
-    Emitter,
-    MetadataCollector,
-    Placeholder,
-    USE_LAZY_EMITTER;
+import '../js_emitter/js_emitter.dart'
+    show
+        CodeEmitterTask,
+        Emitter,
+        MetadataCollector,
+        Placeholder,
+        USE_LAZY_EMITTER;
 import '../library_loader.dart' show LibraryLoader, LoadedLibraries;
 import '../native/native.dart' as native;
-import '../resolution/tree_elements.dart' show
-    TreeElements;
-import '../ssa/ssa.dart';
+import '../resolution/tree_elements.dart' show TreeElements;
+import '../ssa/builder.dart' show SsaFunctionCompiler;
+import '../ssa/nodes.dart' show HTypeConversion, HInstruction;
+import '../ssa/codegen.dart' show SsaCodeGenerator;
 import '../tree/tree.dart';
 import '../types/types.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector,
-    SelectorKind;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector, SelectorKind;
 import '../universe/universe.dart';
-import '../universe/use.dart' show
-    DynamicUse,
-    StaticUse,
-    StaticUseKind,
-    TypeUse,
-    TypeUseKind;
-import '../universe/world_impact.dart' show
-    ImpactStrategy,
-    ImpactUseCase,
-    TransformedWorldImpact,
-    WorldImpact,
-    WorldImpactVisitor;
+import '../universe/use.dart'
+    show DynamicUse, StaticUse, StaticUseKind, TypeUse, TypeUseKind;
+import '../universe/world_impact.dart'
+    show
+        ImpactStrategy,
+        ImpactUseCase,
+        TransformedWorldImpact,
+        WorldImpact,
+        WorldImpactVisitor;
 import '../util/characters.dart';
 import '../util/util.dart';
-import '../world.dart' show
-    ClassWorld;
+import '../world.dart' show ClassWorld;
 
 import 'backend_helpers.dart';
 import 'backend_impact.dart';
+import 'backend_serialization.dart' show JavaScriptBackendSerialization;
 import 'codegen/task.dart';
 import 'constant_system_javascript.dart';
-import 'patch_resolver.dart';
+import 'native_data.dart' show NativeData;
 import 'js_interop_analysis.dart' show JsInteropAnalysis;
 import 'lookup_map_analysis.dart' show LookupMapAnalysis;
+import 'patch_resolver.dart';
 
 part 'backend.dart';
 part 'checked_mode_helpers.dart';
diff --git a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
index ad5c04c..2798ac3 100644
--- a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
@@ -5,8 +5,6 @@
 /// Analysis to determine how to generate code for typed JavaScript interop.
 library compiler.src.js_backend.js_interop_analysis;
 
-import '../common/names.dart' show Identifiers;
-import '../compiler.dart' show Compiler;
 import '../diagnostics/messages.dart' show MessageKind;
 import '../constants/values.dart'
     show
@@ -64,19 +62,19 @@
 
   void processJsInteropAnnotation(Element e) {
     for (MetadataAnnotation annotation in e.implementation.metadata) {
-      ConstantValue constant = backend.compiler.constants.getConstantValue(
-          annotation.constant);
+      ConstantValue constant =
+          backend.compiler.constants.getConstantValue(annotation.constant);
       if (constant == null || constant is! ConstructedConstantValue) continue;
       ConstructedConstantValue constructedConstant = constant;
       if (constructedConstant.type.element == helpers.jsAnnotationClass) {
         ConstantValue value = constructedConstant.fields[nameField];
         if (value.isString) {
           StringConstantValue stringValue = value;
-          backend.setJsInteropName(
-              e, stringValue.primitiveValue.slowToString());
+          backend.nativeData
+              .setJsInteropName(e, stringValue.primitiveValue.slowToString());
         } else {
           // TODO(jacobr): report a warning if the value is not a String.
-          backend.setJsInteropName(e, '');
+          backend.nativeData.setJsInteropName(e, '');
         }
         enabledJsInterop = true;
         return;
@@ -87,10 +85,10 @@
   bool hasAnonymousAnnotation(Element element) {
     if (backend.helpers.jsAnonymousClass == null) return false;
     return element.metadata.any((MetadataAnnotation annotation) {
-      ConstantValue constant = backend.compiler.constants.getConstantValue(
-          annotation.constant);
-      if (constant == null ||
-          constant is! ConstructedConstantValue) return false;
+      ConstantValue constant =
+          backend.compiler.constants.getConstantValue(annotation.constant);
+      if (constant == null || constant is! ConstructedConstantValue)
+        return false;
       ConstructedConstantValue constructedConstant = constant;
       return constructedConstant.type.element ==
           backend.helpers.jsAnonymousClass;
@@ -100,10 +98,10 @@
   void _checkFunctionParameters(FunctionElement fn) {
     if (fn.hasFunctionSignature &&
         fn.functionSignature.optionalParametersAreNamed) {
-      backend.reporter.reportErrorMessage(fn,
-          MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS, {
-            'method': fn.name
-          });
+      backend.reporter.reportErrorMessage(
+          fn,
+          MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
+          {'method': fn.name});
     }
   }
 
@@ -124,8 +122,7 @@
       // when all of jsinterop types are unreachable from main.
       if (!backend.compiler.world.isImplemented(classElement)) return;
 
-      if (!classElement
-          .implementsInterface(helpers.jsJavaScriptObjectClass)) {
+      if (!classElement.implementsInterface(helpers.jsJavaScriptObjectClass)) {
         backend.reporter.reportErrorMessage(classElement,
             MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, {
           'cls': classElement.name,
@@ -133,15 +130,16 @@
         });
       }
 
-      classElement.forEachMember(
-          (ClassElement classElement, Element member) {
+      classElement.forEachMember((ClassElement classElement, Element member) {
         processJsInteropAnnotation(member);
 
         if (!member.isSynthesized &&
             backend.isJsInterop(classElement) &&
             member is FunctionElement) {
           FunctionElement fn = member;
-          if (!fn.isExternal && !fn.isAbstract && !fn.isConstructor &&
+          if (!fn.isExternal &&
+              !fn.isAbstract &&
+              !fn.isConstructor &&
               !fn.isStatic) {
             backend.reporter.reportErrorMessage(
                 fn,
@@ -150,16 +148,14 @@
           }
 
           if (fn.isFactoryConstructor && hasAnonymousAnnotation(classElement)) {
-              fn.functionSignature.orderedForEachParameter(
-                  (ParameterElement parameter) {
-                if (!parameter.isNamed) {
-                  backend.reporter.reportErrorMessage(parameter,
+            fn.functionSignature
+                .orderedForEachParameter((ParameterElement parameter) {
+              if (!parameter.isNamed) {
+                backend.reporter.reportErrorMessage(
+                    parameter,
                     MessageKind
                         .JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
-                    {
-                      'parameter': parameter.name,
-                      'cls': classElement.name
-                    });
+                    {'parameter': parameter.name, 'cls': classElement.name});
               }
             });
           } else {
@@ -181,7 +177,7 @@
           if (selector.namedArgumentCount > 0) return;
           int argumentCount = selector.argumentCount;
           var candidateParameterNames =
-              'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMOPQRSTUVWXYZ';
+              'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
           var parameters = new List<String>.generate(
               argumentCount, (i) => candidateParameterNames[i]);
 
diff --git a/pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart b/pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart
index 111eb22..a1543bd 100644
--- a/pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart
@@ -8,23 +8,25 @@
 import '../common.dart';
 import '../common/registry.dart' show Registry;
 import '../compiler.dart' show Compiler;
-import '../constants/values.dart' show
-    ConstantValue,
-    ConstructedConstantValue,
-    ListConstantValue,
-    NullConstantValue,
-    StringConstantValue,
-    TypeConstantValue;
+import '../constants/values.dart'
+    show
+        ConstantValue,
+        ConstructedConstantValue,
+        ListConstantValue,
+        NullConstantValue,
+        StringConstantValue,
+        TypeConstantValue;
 import '../dart_types.dart' show DartType;
-import '../elements/elements.dart' show
-    ClassElement,
-    Element,
-    Elements,
-    FieldElement,
-    FunctionElement,
-    FunctionSignature,
-    LibraryElement,
-    VariableElement;
+import '../elements/elements.dart'
+    show
+        ClassElement,
+        Element,
+        Elements,
+        FieldElement,
+        FunctionElement,
+        FunctionSignature,
+        LibraryElement,
+        VariableElement;
 import 'js_backend.dart' show JavaScriptBackend;
 import '../dart_types.dart' show DynamicType, InterfaceType;
 import 'package:pub_semver/pub_semver.dart';
@@ -143,11 +145,11 @@
     // the lookup_map package. We otherwise produce a warning.
     lookupMapVersionVariable = library.implementation.findLocal('_version');
     if (lookupMapVersionVariable == null) {
-      reporter.reportInfo(library,
-          MessageKind.UNRECOGNIZED_VERSION_OF_LOOKUP_MAP);
+      reporter.reportInfo(
+          library, MessageKind.UNRECOGNIZED_VERSION_OF_LOOKUP_MAP);
     } else {
-      backend.compiler.enqueuer.resolution.addToWorkList(
-          lookupMapVersionVariable);
+      backend.compiler.enqueuer.resolution
+          .addToWorkList(lookupMapVersionVariable);
     }
   }
 
@@ -199,16 +201,16 @@
   void registerLookupMapReference(ConstantValue lookupMap) {
     if (!_isEnabled || !_inCodegen) return;
     assert(isLookupMap(lookupMap));
-    _lookupMaps.putIfAbsent(lookupMap,
-        () => new _LookupMapInfo(lookupMap, this).._updateUsed());
+    _lookupMaps.putIfAbsent(
+        lookupMap, () => new _LookupMapInfo(lookupMap, this).._updateUsed());
   }
 
   /// Whether [key] is a constant value whose type overrides equals.
   bool _overridesEquals(ConstantValue key) {
     if (key is ConstructedConstantValue) {
       ClassElement element = key.type.element;
-      return _typesWithEquals.putIfAbsent(element, () =>
-          !element.lookupMember('==').enclosingClass.isObject);
+      return _typesWithEquals.putIfAbsent(
+          element, () => !element.lookupMember('==').enclosingClass.isObject);
     }
     return false;
   }
@@ -299,7 +301,7 @@
     if (!_isEnabled || !_inCodegen) return;
 
     _lookupMaps.values.forEach((info) {
-      assert (!info.emitted);
+      assert(!info.emitted);
       info.emitted = true;
       info._prepareForEmission();
     });
@@ -307,7 +309,7 @@
     // When --verbose is passed, we show the total number and set of keys that
     // were tree-shaken from lookup maps.
     Compiler compiler = backend.compiler;
-    if (compiler.verbose) {
+    if (compiler.options.verbose) {
       var sb = new StringBuffer();
       int count = 0;
       for (var info in _lookupMaps.values) {
@@ -356,11 +358,11 @@
   /// Entries in the lookup map whose keys have not been seen in the rest of the
   /// program.
   Map<ConstantValue, ConstantValue> unusedEntries =
-      <ConstantValue, ConstantValue> {};
+      <ConstantValue, ConstantValue>{};
 
   /// Entries that have been used, and thus will be part of the generated code.
   Map<ConstantValue, ConstantValue> usedEntries =
-      <ConstantValue, ConstantValue> {};
+      <ConstantValue, ConstantValue>{};
 
   /// Creates and initializes the information containing all keys of the
   /// original map marked as unused.
@@ -412,8 +414,8 @@
     assert(!usedEntries.containsKey(key));
     ConstantValue constant = unusedEntries.remove(key);
     usedEntries[key] = constant;
-    analysis.backend.registerCompileTimeConstant(constant,
-        analysis.backend.compiler.globalDependencies);
+    analysis.backend.registerCompileTimeConstant(
+        constant, analysis.backend.compiler.globalDependencies);
   }
 
   /// Restores [original] to contain all of the entries marked as possibly used.
@@ -428,7 +430,7 @@
 
     // Note: we are restoring the entries here, see comment in [original].
     if (singlePair) {
-      assert (keyValuePairs.length == 0 || keyValuePairs.length == 2);
+      assert(keyValuePairs.length == 0 || keyValuePairs.length == 2);
       if (keyValuePairs.length == 2) {
         original.fields[analysis.keyField] = keyValuePairs[0];
         original.fields[analysis.valueField] = keyValuePairs[1];
@@ -440,5 +442,4 @@
   }
 }
 
-final _validLookupMapVersionConstraint =
-    new VersionConstraint.parse('^0.0.1');
+final _validLookupMapVersionConstraint = new VersionConstraint.parse('^0.0.1');
diff --git a/pkg/compiler/lib/src/js_backend/minify_namer.dart b/pkg/compiler/lib/src/js_backend/minify_namer.dart
index 0ba2e4e..ff76d87 100644
--- a/pkg/compiler/lib/src/js_backend/minify_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/minify_namer.dart
@@ -7,8 +7,11 @@
 /**
  * Assigns JavaScript identifiers to Dart variables, class-names and members.
  */
-class MinifyNamer extends Namer with _MinifiedFieldNamer,
-    _MinifyConstructorBodyNamer, _MinifiedOneShotInterceptorNamer {
+class MinifyNamer extends Namer
+    with
+        _MinifiedFieldNamer,
+        _MinifyConstructorBodyNamer,
+        _MinifiedOneShotInterceptorNamer {
   MinifyNamer(Compiler compiler) : super(compiler) {
     reserveBackendNames();
     fieldRegistry = new _FieldNamingRegistry(this);
@@ -24,8 +27,8 @@
   final String setterPrefix = 's';
   final String callPrefix = ''; // this will create function names $<n>
 
-  final ALPHABET_CHARACTERS = 52;  // a-zA-Z.
-  final ALPHANUMERIC_CHARACTERS = 62;  // a-zA-Z0-9.
+  final ALPHABET_CHARACTERS = 52; // a-zA-Z.
+  final ALPHANUMERIC_CHARACTERS = 62; // a-zA-Z0-9.
 
   /// You can pass an invalid identifier to this and unlike its non-minifying
   /// counterpart it will never return the proposedName as the new fresh name.
@@ -33,10 +36,8 @@
   /// [sanitizeForNatives] and [sanitizeForAnnotations] are ignored because the
   /// minified names will always avoid clashing with annotated names or natives.
   @override
-  String _generateFreshStringForName(String proposedName,
-      NamingScope scope,
-      {bool sanitizeForNatives: false,
-       bool sanitizeForAnnotations: false}) {
+  String _generateFreshStringForName(String proposedName, NamingScope scope,
+      {bool sanitizeForNatives: false, bool sanitizeForAnnotations: false}) {
     String freshName;
     String suggestion = scope.suggestName(proposedName);
     if (suggestion != null && scope.isUnused(suggestion)) {
@@ -53,28 +54,29 @@
   // OK to use them as fields, as we only access fields directly if we know
   // the receiver type.
   static const List<String> _reservedNativeProperties = const <String>[
-      'a', 'b', 'c', 'd', 'e', 'f', 'r', 'x', 'y', 'z', 'Q',
-      // 2-letter:
-      'ch', 'cx', 'cy', 'db', 'dx', 'dy', 'fr', 'fx', 'fy', 'go', 'id', 'k1',
-      'k2', 'k3', 'k4', 'r1', 'r2', 'rx', 'ry', 'x1', 'x2', 'y1', 'y2',
-      // 3-letter:
-      'add', 'all', 'alt', 'arc', 'CCW', 'cmp', 'dir', 'end', 'get', 'in1',
-      'in2', 'INT', 'key', 'log', 'low', 'm11', 'm12', 'm13', 'm14', 'm21',
-      'm22', 'm23', 'm24', 'm31', 'm32', 'm33', 'm34', 'm41', 'm42', 'm43',
-      'm44', 'max', 'min', 'now', 'ONE', 'put', 'red', 'rel', 'rev', 'RGB',
-      'sdp', 'set', 'src', 'tag', 'top', 'uid', 'uri', 'url', 'URL',
-      // 4-letter:
-      'abbr', 'atob', 'Attr', 'axes', 'axis', 'back', 'BACK', 'beta', 'bias',
-      'Blob', 'blue', 'blur', 'BLUR', 'body', 'BOOL', 'BOTH', 'btoa', 'BYTE',
-      'cite', 'clip', 'code', 'cols', 'cues', 'data', 'DECR', 'DONE', 'face',
-      'file', 'File', 'fill', 'find', 'font', 'form', 'gain', 'hash', 'head',
-      'high', 'hint', 'host', 'href', 'HRTF', 'IDLE', 'INCR', 'info', 'INIT',
-      'isId', 'item', 'KEEP', 'kind', 'knee', 'lang', 'left', 'LESS', 'line',
-      'link', 'list', 'load', 'loop', 'mode', 'name', 'Node', 'None', 'NONE',
-      'only', 'open', 'OPEN', 'ping', 'play', 'port', 'rect', 'Rect', 'refX',
-      'refY', 'RGBA', 'root', 'rows', 'save', 'seed', 'seek', 'self', 'send',
-      'show', 'SINE', 'size', 'span', 'stat', 'step', 'stop', 'tags', 'text',
-      'Text', 'time', 'type', 'view', 'warn', 'wrap', 'ZERO'];
+    'a', 'b', 'c', 'd', 'e', 'f', 'r', 'x', 'y', 'z', 'Q',
+    // 2-letter:
+    'ch', 'cx', 'cy', 'db', 'dx', 'dy', 'fr', 'fx', 'fy', 'go', 'id', 'k1',
+    'k2', 'k3', 'k4', 'r1', 'r2', 'rx', 'ry', 'x1', 'x2', 'y1', 'y2',
+    // 3-letter:
+    'add', 'all', 'alt', 'arc', 'CCW', 'cmp', 'dir', 'end', 'get', 'in1',
+    'in2', 'INT', 'key', 'log', 'low', 'm11', 'm12', 'm13', 'm14', 'm21',
+    'm22', 'm23', 'm24', 'm31', 'm32', 'm33', 'm34', 'm41', 'm42', 'm43',
+    'm44', 'max', 'min', 'now', 'ONE', 'put', 'red', 'rel', 'rev', 'RGB',
+    'sdp', 'set', 'src', 'tag', 'top', 'uid', 'uri', 'url', 'URL',
+    // 4-letter:
+    'abbr', 'atob', 'Attr', 'axes', 'axis', 'back', 'BACK', 'beta', 'bias',
+    'Blob', 'blue', 'blur', 'BLUR', 'body', 'BOOL', 'BOTH', 'btoa', 'BYTE',
+    'cite', 'clip', 'code', 'cols', 'cues', 'data', 'DECR', 'DONE', 'face',
+    'file', 'File', 'fill', 'find', 'font', 'form', 'gain', 'hash', 'head',
+    'high', 'hint', 'host', 'href', 'HRTF', 'IDLE', 'INCR', 'info', 'INIT',
+    'isId', 'item', 'KEEP', 'kind', 'knee', 'lang', 'left', 'LESS', 'line',
+    'link', 'list', 'load', 'loop', 'mode', 'name', 'Node', 'None', 'NONE',
+    'only', 'open', 'OPEN', 'ping', 'play', 'port', 'rect', 'Rect', 'refX',
+    'refY', 'RGBA', 'root', 'rows', 'save', 'seed', 'seek', 'self', 'send',
+    'show', 'SINE', 'size', 'span', 'stat', 'step', 'stop', 'tags', 'text',
+    'Text', 'time', 'type', 'view', 'warn', 'wrap', 'ZERO'
+  ];
 
   void reserveBackendNames() {
     for (String name in _reservedNativeProperties) {
@@ -98,43 +100,89 @@
     // individually per program, but that would mean that the output of the
     // minifier was less stable from version to version of the program being
     // minified.
-    _populateSuggestedNames(
-        instanceScope,
-        const <String>[
-            r'$add', r'add$1', r'$and',
-            r'$or',
-            r'current', r'$shr', r'$eq', r'$ne',
-            r'$index', r'$indexSet',
-            r'$xor', r'clone$0',
-            r'iterator', r'length',
-            r'$lt', r'$gt', r'$le', r'$ge',
-            r'moveNext$0', r'node', r'on', r'$negate', r'push', r'self',
-            r'start', r'target', r'$shl', r'value', r'width', r'style',
-            r'noSuchMethod$1', r'$mul', r'$div', r'$sub', r'$not', r'$mod',
-            r'$tdiv', r'toString$0']);
+    _populateSuggestedNames(instanceScope, const <String>[
+      r'$add',
+      r'add$1',
+      r'$and',
+      r'$or',
+      r'current',
+      r'$shr',
+      r'$eq',
+      r'$ne',
+      r'$index',
+      r'$indexSet',
+      r'$xor',
+      r'clone$0',
+      r'iterator',
+      r'length',
+      r'$lt',
+      r'$gt',
+      r'$le',
+      r'$ge',
+      r'moveNext$0',
+      r'node',
+      r'on',
+      r'$negate',
+      r'push',
+      r'self',
+      r'start',
+      r'target',
+      r'$shl',
+      r'value',
+      r'width',
+      r'style',
+      r'noSuchMethod$1',
+      r'$mul',
+      r'$div',
+      r'$sub',
+      r'$not',
+      r'$mod',
+      r'$tdiv',
+      r'toString$0'
+    ]);
 
-    _populateSuggestedNames(
-        globalScope,
-        const <String>[
-            r'Object', 'wrapException', r'$eq', r'S', r'ioore',
-            r'UnsupportedError$', r'length', r'$sub',
-            r'$add', r'$gt', r'$ge', r'$lt', r'$le', r'add',
-            r'iae',
-            r'ArgumentError$', r'BoundClosure', r'Closure', r'StateError$',
-            r'getInterceptor', r'max', r'$mul',
-            r'Map', r'Key_Key', r'$div',
-            r'List_List$from',
-            r'LinkedHashMap_LinkedHashMap$_empty',
-            r'LinkedHashMap_LinkedHashMap$_literal',
-            r'min',
-            r'RangeError$value', r'JSString', r'JSNumber',
-            r'JSArray', r'createInvocationMirror', r'String',
-            r'setRuntimeTypeInfo', r'createRuntimeType'
-            ]);
+    _populateSuggestedNames(globalScope, const <String>[
+      r'Object',
+      'wrapException',
+      r'$eq',
+      r'S',
+      r'ioore',
+      r'UnsupportedError$',
+      r'length',
+      r'$sub',
+      r'$add',
+      r'$gt',
+      r'$ge',
+      r'$lt',
+      r'$le',
+      r'add',
+      r'iae',
+      r'ArgumentError$',
+      r'BoundClosure',
+      r'Closure',
+      r'StateError$',
+      r'getInterceptor',
+      r'max',
+      r'$mul',
+      r'Map',
+      r'Key_Key',
+      r'$div',
+      r'List_List$from',
+      r'LinkedHashMap_LinkedHashMap$_empty',
+      r'LinkedHashMap_LinkedHashMap$_literal',
+      r'min',
+      r'RangeError$value',
+      r'JSString',
+      r'JSNumber',
+      r'JSArray',
+      r'createInvocationMirror',
+      r'String',
+      r'setRuntimeTypeInfo',
+      r'createRuntimeType'
+    ]);
   }
 
-  void _populateSuggestedNames(NamingScope scope,
-                               List<String> suggestions) {
+  void _populateSuggestedNames(NamingScope scope, List<String> suggestions) {
     int c = $a - 1;
     String letter;
     for (String name in suggestions) {
@@ -148,7 +196,6 @@
     }
   }
 
-
   // This gets a minified name based on a hash of the proposed name.  This
   // is slightly less efficient than just getting the next name in a series,
   // but it means that small changes in the input program will give smallish
@@ -156,7 +203,7 @@
   String _getUnusedName(String proposedName, NamingScope scope) {
     int hash = _calculateHash(proposedName);
     // Avoid very small hashes that won't try many names.
-    hash = hash < 1000 ? hash * 314159 : hash;  // Yes, it's prime.
+    hash = hash < 1000 ? hash * 314159 : hash; // Yes, it's prime.
 
     // Try other n-character names based on the hash.  We try one to three
     // character identifiers.  For each length we try around 10 different names
@@ -275,16 +322,16 @@
         _startIndex = 0,
         _constructors = cls.constructors.toList(growable: false);
 
-  _ConstructorBodyNamingScope.forClass(ClassElement cls,
-                                       _ConstructorBodyNamingScope superScope)
+  _ConstructorBodyNamingScope.forClass(
+      ClassElement cls, _ConstructorBodyNamingScope superScope)
       : _superScope = superScope,
         _startIndex = superScope._startIndex + superScope.numberOfConstructors,
         _constructors = cls.constructors.toList(growable: false);
 
   // Mixin Applications have constructors but we never generate code for them,
   // so they do not count in the inheritance chain.
-  _ConstructorBodyNamingScope.forMixinApplication(ClassElement cls,
-      _ConstructorBodyNamingScope superScope)
+  _ConstructorBodyNamingScope.forMixinApplication(
+      ClassElement cls, _ConstructorBodyNamingScope superScope)
       : _superScope = superScope,
         _startIndex = superScope._startIndex + superScope.numberOfConstructors,
         _constructors = const [];
@@ -295,11 +342,11 @@
       if (cls.superclass == null) {
         return new _ConstructorBodyNamingScope.rootScope(cls);
       } else if (cls.isMixinApplication) {
-        return new _ConstructorBodyNamingScope.forMixinApplication(cls,
-            new _ConstructorBodyNamingScope(cls.superclass, registry));
+        return new _ConstructorBodyNamingScope.forMixinApplication(
+            cls, new _ConstructorBodyNamingScope(cls.superclass, registry));
       } else {
-        return new _ConstructorBodyNamingScope.forClass(cls,
-            new _ConstructorBodyNamingScope(cls.superclass, registry));
+        return new _ConstructorBodyNamingScope.forClass(
+            cls, new _ConstructorBodyNamingScope(cls.superclass, registry));
       }
     });
   }
@@ -317,12 +364,11 @@
 
   @override
   jsAst.Name constructorBodyName(FunctionElement method) {
-    _ConstructorBodyNamingScope scope =
-        new _ConstructorBodyNamingScope(method.enclosingClass,
-                                        _constructorBodyScopes);
+    _ConstructorBodyNamingScope scope = new _ConstructorBodyNamingScope(
+        method.enclosingClass, _constructorBodyScopes);
     String key = scope.constructorBodyKeyFor(method);
-    return _disambiguateMemberByKey(key,
-        () => _proposeNameForConstructorBody(method));
+    return _disambiguateMemberByKey(
+        key, () => _proposeNameForConstructorBody(method));
   }
 }
 
@@ -330,20 +376,18 @@
   /// Property name used for the one-shot interceptor method for the given
   /// [selector] and return-type specialization.
   @override
-  jsAst.Name nameForGetOneShotInterceptor(Selector selector,
-      Iterable<ClassElement> classes) {
+  jsAst.Name nameForGetOneShotInterceptor(
+      Selector selector, Iterable<ClassElement> classes) {
     String root = selector.isOperator
         ? operatorNameToIdentifier(selector.name)
         : privateName(selector.memberName);
-    String prefix = selector.isGetter
-        ? r"$get"
-        : selector.isSetter ? r"$set" : "";
-    String callSuffix =
-        selector.isCall ? callSuffixForStructure(selector.callStructure).join()
-                        : "";
+    String prefix =
+        selector.isGetter ? r"$get" : selector.isSetter ? r"$set" : "";
+    String callSuffix = selector.isCall
+        ? callSuffixForStructure(selector.callStructure).join()
+        : "";
     String suffix = suffixForGetInterceptor(classes);
     String fullName = "\$intercepted$prefix\$$root$callSuffix\$$suffix";
     return _disambiguateInternalGlobal(fullName);
   }
 }
-
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index bd55710..70d7eb7 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -102,7 +102,6 @@
  * must be disambiguated elsewhere.
  */
 class Namer {
-
   static const List<String> javaScriptKeywords = const <String>[
     // These are current keywords.
     "break", "delete", "function", "return", "typeof", "case", "do", "if",
@@ -118,13 +117,13 @@
     "long", "short", "volatile"
   ];
 
-  static const List<String> reservedPropertySymbols =
-      const <String>[
-        "__proto__", "prototype", "constructor", "call",
-        // "use strict" disallows the use of "arguments" and "eval" as
-        // variable names or property names. See ECMA-262, Edition 5.1,
-        // section 11.1.5 (for the property names).
-        "eval", "arguments"];
+  static const List<String> reservedPropertySymbols = const <String>[
+    "__proto__", "prototype", "constructor", "call",
+    // "use strict" disallows the use of "arguments" and "eval" as
+    // variable names or property names. See ECMA-262, Edition 5.1,
+    // section 11.1.5 (for the property names).
+    "eval", "arguments"
+  ];
 
   // Symbols that we might be using in our JS snippets.
   static const List<String> reservedGlobalSymbols = const <String>[
@@ -251,48 +250,49 @@
   ];
 
   static const List<String> reservedGlobalObjectNames = const <String>[
-      "A",
-      "B",
-      "C", // Global object for *C*onstants.
-      "D",
-      "E",
-      "F",
-      "G",
-      "H", // Global object for internal (*H*elper) libraries.
-      // I is used for used for the Isolate function.
-      "J", // Global object for the interceptor library.
-      "K",
-      "L",
-      "M",
-      "N",
-      "O",
-      "P", // Global object for other *P*latform libraries.
-      "Q",
-      "R",
-      "S",
-      "T",
-      "U",
-      "V",
-      "W", // Global object for *W*eb libraries (dart:html).
-      "X",
-      "Y",
-      "Z",
+    "A",
+    "B",
+    "C", // Global object for *C*onstants.
+    "D",
+    "E",
+    "F",
+    "G",
+    "H", // Global object for internal (*H*elper) libraries.
+    // I is used for used for the Isolate function.
+    "J", // Global object for the interceptor library.
+    "K",
+    "L",
+    "M",
+    "N",
+    "O",
+    "P", // Global object for other *P*latform libraries.
+    "Q",
+    "R",
+    "S",
+    "T",
+    "U",
+    "V",
+    "W", // Global object for *W*eb libraries (dart:html).
+    "X",
+    "Y",
+    "Z",
   ];
 
   static const List<String> reservedGlobalHelperFunctions = const <String>[
-      "init",
-      "Isolate",
+    "init",
+    "Isolate",
   ];
 
   static final List<String> userGlobalObjects =
       new List.from(reservedGlobalObjectNames)
-      ..remove('C')
-      ..remove('H')
-      ..remove('J')
-      ..remove('P')
-      ..remove('W');
+        ..remove('C')
+        ..remove('H')
+        ..remove('J')
+        ..remove('P')
+        ..remove('W');
 
   Set<String> _jsReserved = null;
+
   /// Names that cannot be used by members, top level and static
   /// methods.
   Set<String> get jsReserved {
@@ -305,6 +305,7 @@
   }
 
   Set<String> _jsVariableReserved = null;
+
   /// Names that cannot be used by local variables and parameters.
   Set<String> get jsVariableReserved {
     if (_jsVariableReserved == null) {
@@ -456,33 +457,48 @@
   bool get shouldMinify => false;
 
   NamingScope _getPrivateScopeFor(PrivatelyNamedJSEntity entity) {
-    return _privateNamingScopes.putIfAbsent(entity.rootOfScope,
-                                            () => new NamingScope());
+    return _privateNamingScopes.putIfAbsent(
+        entity.rootOfScope, () => new NamingScope());
   }
 
   /// Returns the string that is to be used as the result of a call to
   /// [JS_GET_NAME] at [node] with argument [name].
   jsAst.Name getNameForJsGetName(Node node, JsGetName name) {
     switch (name) {
-      case JsGetName.GETTER_PREFIX: return asName(getterPrefix);
-      case JsGetName.SETTER_PREFIX: return asName(setterPrefix);
-      case JsGetName.CALL_PREFIX: return asName(callPrefix);
-      case JsGetName.CALL_PREFIX0: return asName('${callPrefix}\$0');
-      case JsGetName.CALL_PREFIX1: return asName('${callPrefix}\$1');
-      case JsGetName.CALL_PREFIX2: return asName('${callPrefix}\$2');
-      case JsGetName.CALL_PREFIX3: return asName('${callPrefix}\$3');
-      case JsGetName.CALL_CATCH_ALL: return asName(callCatchAllName);
-      case JsGetName.REFLECTABLE: return asName(reflectableField);
+      case JsGetName.GETTER_PREFIX:
+        return asName(getterPrefix);
+      case JsGetName.SETTER_PREFIX:
+        return asName(setterPrefix);
+      case JsGetName.CALL_PREFIX:
+        return asName(callPrefix);
+      case JsGetName.CALL_PREFIX0:
+        return asName('${callPrefix}\$0');
+      case JsGetName.CALL_PREFIX1:
+        return asName('${callPrefix}\$1');
+      case JsGetName.CALL_PREFIX2:
+        return asName('${callPrefix}\$2');
+      case JsGetName.CALL_PREFIX3:
+        return asName('${callPrefix}\$3');
+      case JsGetName.CALL_CATCH_ALL:
+        return asName(callCatchAllName);
+      case JsGetName.REFLECTABLE:
+        return asName(reflectableField);
       case JsGetName.CLASS_DESCRIPTOR_PROPERTY:
         return asName(classDescriptorProperty);
       case JsGetName.REQUIRED_PARAMETER_PROPERTY:
         return asName(requiredParameterField);
-      case JsGetName.DEFAULT_VALUES_PROPERTY: return asName(defaultValuesField);
-      case JsGetName.CALL_NAME_PROPERTY: return asName(callNameField);
-      case JsGetName.DEFERRED_ACTION_PROPERTY: return asName(deferredAction);
-      case JsGetName.OPERATOR_AS_PREFIX: return asName(operatorAsPrefix);
-      case JsGetName.SIGNATURE_NAME: return asName(operatorSignature);
-      case JsGetName.TYPEDEF_TAG: return asName(typedefTag);
+      case JsGetName.DEFAULT_VALUES_PROPERTY:
+        return asName(defaultValuesField);
+      case JsGetName.CALL_NAME_PROPERTY:
+        return asName(callNameField);
+      case JsGetName.DEFERRED_ACTION_PROPERTY:
+        return asName(deferredAction);
+      case JsGetName.OPERATOR_AS_PREFIX:
+        return asName(operatorAsPrefix);
+      case JsGetName.SIGNATURE_NAME:
+        return asName(operatorSignature);
+      case JsGetName.TYPEDEF_TAG:
+        return asName(typedefTag);
       case JsGetName.FUNCTION_TYPE_VOID_RETURN_TAG:
         return asName(functionTypeVoidReturnTag);
       case JsGetName.FUNCTION_TYPE_RETURN_TYPE_TAG:
@@ -502,10 +518,8 @@
       case JsGetName.FUNCTION_CLASS_TYPE_NAME:
         return runtimeTypeName(coreClasses.functionClass);
       default:
-        reporter.reportErrorMessage(
-          node,
-          MessageKind.GENERIC,
-          {'text': 'Error: Namer has no name for "$name".'});
+        reporter.reportErrorMessage(node, MessageKind.GENERIC,
+            {'text': 'Error: Namer has no name for "$name".'});
         return asName('BROKEN');
     }
   }
@@ -539,8 +553,8 @@
   String constantLongName(ConstantValue constant) {
     String longName = constantLongNames[constant];
     if (longName == null) {
-      longName = new ConstantNamingVisitor(compiler, constantHasher)
-          .getName(constant);
+      longName =
+          new ConstantNamingVisitor(compiler, constantHasher).getName(constant);
       constantLongNames[constant] = longName;
     }
     return longName;
@@ -611,8 +625,8 @@
 
   /// Name for a constructor body.
   jsAst.Name constructorBodyName(FunctionElement ctor) {
-    return _disambiguateInternalMember(ctor,
-        () => _proposeNameForConstructorBody(ctor));
+    return _disambiguateInternalMember(
+        ctor, () => _proposeNameForConstructorBody(ctor));
   }
 
   /// Annotated name for [method] encoding arity and named parameters.
@@ -624,9 +638,8 @@
   }
 
   String _jsNameHelper(Element e) {
-    String jsInteropName = backend.getJsInteropName(e);
-    if (jsInteropName != null && jsInteropName.isNotEmpty)
-      return jsInteropName;
+    String jsInteropName = backend.nativeData.getJsInteropName(e);
+    if (jsInteropName != null && jsInteropName.isNotEmpty) return jsInteropName;
     return e.isLibrary ? 'self' : e.name;
   }
 
@@ -694,13 +707,11 @@
   jsAst.Name invocationName(Selector selector) {
     switch (selector.kind) {
       case SelectorKind.GETTER:
-        jsAst.Name disambiguatedName =
-            _disambiguateMember(selector.memberName);
+        jsAst.Name disambiguatedName = _disambiguateMember(selector.memberName);
         return deriveGetterName(disambiguatedName);
 
       case SelectorKind.SETTER:
-        jsAst.Name disambiguatedName =
-            _disambiguateMember(selector.memberName);
+        jsAst.Name disambiguatedName = _disambiguateMember(selector.memberName);
         return deriveSetterName(disambiguatedName);
 
       case SelectorKind.OPERATOR:
@@ -721,8 +732,7 @@
         return disambiguatedName; // Methods other than call are not annotated.
 
       default:
-        reporter.internalError(
-            CURRENT_ELEMENT_SPANNABLE,
+        reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
             'Unexpected selector kind: ${selector.kind}');
         return null;
     }
@@ -731,8 +741,8 @@
   /**
    * Returns the internal name used for an invocation mirror of this selector.
    */
-  jsAst.Name invocationMirrorInternalName(Selector selector)
-      => invocationName(selector);
+  jsAst.Name invocationMirrorInternalName(Selector selector) =>
+      invocationName(selector);
 
   /**
    * Returns the disambiguated name for the given field, used for constructing
@@ -779,8 +789,9 @@
   jsAst.Name instanceFieldPropertyName(FieldElement element) {
     ClassElement enclosingClass = element.enclosingClass;
 
-    if (backend.hasFixedBackendName(element)) {
-      return new StringBackedName(backend.getFixedBackendName(element));
+    if (backend.nativeData.hasFixedBackendName(element)) {
+      return new StringBackedName(
+          backend.nativeData.getFixedBackendName(element));
     }
 
     // Some elements, like e.g. instances of BoxFieldElement are special.
@@ -792,8 +803,8 @@
     // apply. So we can directly grab a name.
     Entity asEntity = element;
     if (asEntity is JSEntity) {
-      return _disambiguateInternalMember(element,
-                                         () => asEntity.declaredEntity.name);
+      return _disambiguateInternalMember(
+          element, () => asEntity.declaredEntity.name);
     }
 
     // If the name of the field might clash with another field,
@@ -824,7 +835,7 @@
   /// True if [class_] is a non-native class that inherits from a native class.
   bool _isUserClassExtendingNative(ClassElement class_) {
     return !backend.isNative(class_) &&
-           backend.isNativeOrExtendsNative(class_.superclass);
+        backend.isNativeOrExtendsNative(class_.superclass);
   }
 
   /// Annotated name for the setter of [element].
@@ -900,7 +911,7 @@
       int counter = 0;
       String key = keyBase;
       while (_libraryKeys.values.contains(key)) {
-        key ="$keyBase${counter++}";
+        key = "$keyBase${counter++}";
       }
       return key;
     });
@@ -939,11 +950,10 @@
   /// to the ([originalName], [suffixes]) pair within the instance-member
   /// namespace.
   jsAst.Name _disambiguateMember(Name originalName,
-                                 [List<String> suffixes = const []]) {
+      [List<String> suffixes = const []]) {
     // Build a string encoding the library name, if the name is private.
-    String libraryKey = originalName.isPrivate
-            ? _generateLibraryKey(originalName.library)
-            : '';
+    String libraryKey =
+        originalName.isPrivate ? _generateLibraryKey(originalName.library) : '';
 
     // In the unique key, separate the name parts by '@'.
     // This avoids clashes since the original names cannot contain that symbol.
@@ -957,7 +967,7 @@
         proposedName += r'$' + suffixes.join(r'$');
       }
       newName = getFreshName(instanceScope, proposedName,
-                             sanitizeForAnnotations: true);
+          sanitizeForAnnotations: true);
       userInstanceMembers[key] = newName;
     }
     return _newReference(newName);
@@ -979,8 +989,7 @@
     jsAst.Name newName = userInstanceMembers[key];
     if (newName == null) {
       String name = proposeName();
-      newName = getFreshName(instanceScope, name,
-                             sanitizeForAnnotations: true);
+      newName = getFreshName(instanceScope, name, sanitizeForAnnotations: true);
       userInstanceMembers[key] = newName;
     }
     return _newReference(newName);
@@ -994,8 +1003,7 @@
   ///
   /// Using [_disambiguateMember] with the given [originalName] and no suffixes
   /// will subsequently return [disambiguatedName].
-  void reservePublicMemberName(String originalName,
-                               String disambiguatedName) {
+  void reservePublicMemberName(String originalName, String disambiguatedName) {
     // Build a key that corresponds to the one built in disambiguateMember.
     String libraryPrefix = ''; // Public names have an empty library prefix.
     String suffix = ''; // We don't need any suffixes.
@@ -1012,8 +1020,8 @@
   /// constructor bodies, and super-accessors.
   ///
   /// The resulting name is unique within the instance-member namespace.
-  jsAst.Name _disambiguateInternalMember(Element element,
-                                         String proposeName()) {
+  jsAst.Name _disambiguateInternalMember(
+      Element element, String proposeName()) {
     jsAst.Name newName = internalInstanceMembers[element];
     if (newName == null) {
       String name = proposeName();
@@ -1022,15 +1030,13 @@
       if (asEntity is PrivatelyNamedJSEntity) {
         NamingScope scope = _getPrivateScopeFor(asEntity);
         newName = getFreshName(scope, name,
-                               sanitizeForAnnotations: true,
-                               sanitizeForNatives: false);
+            sanitizeForAnnotations: true, sanitizeForNatives: false);
         internalInstanceMembers[element] = newName;
       } else {
         bool mayClashNative =
             _isUserClassExtendingNative(element.enclosingClass);
         newName = getFreshName(instanceScope, name,
-                               sanitizeForAnnotations: true,
-                               sanitizeForNatives: mayClashNative);
+            sanitizeForAnnotations: true, sanitizeForNatives: mayClashNative);
         internalInstanceMembers[element] = newName;
       }
     }
@@ -1052,10 +1058,8 @@
     return _newReference(newName);
   }
 
-  String _generateFreshStringForName(String proposedName,
-      NamingScope scope,
-      {bool sanitizeForAnnotations: false,
-       bool sanitizeForNatives: false}) {
+  String _generateFreshStringForName(String proposedName, NamingScope scope,
+      {bool sanitizeForAnnotations: false, bool sanitizeForNatives: false}) {
     if (sanitizeForAnnotations) {
       proposedName = _sanitizeForAnnotations(proposedName);
     }
@@ -1091,16 +1095,11 @@
   ///
   /// Note that [MinifyNamer] overrides this method with one that produces
   /// minified names.
-  jsAst.Name getFreshName(NamingScope scope,
-                          String proposedName,
-                          {bool sanitizeForAnnotations: false,
-                           bool sanitizeForNatives: false}) {
-    String candidate =
-        _generateFreshStringForName(proposedName,
-                                    scope,
-                                    sanitizeForAnnotations:
-                                        sanitizeForAnnotations,
-                                    sanitizeForNatives: sanitizeForNatives);
+  jsAst.Name getFreshName(NamingScope scope, String proposedName,
+      {bool sanitizeForAnnotations: false, bool sanitizeForNatives: false}) {
+    String candidate = _generateFreshStringForName(proposedName, scope,
+        sanitizeForAnnotations: sanitizeForAnnotations,
+        sanitizeForNatives: sanitizeForNatives);
     return new StringBackedName(candidate);
   }
 
@@ -1151,7 +1150,7 @@
     String name;
     if (element.isGenerativeConstructor) {
       name = "${element.enclosingClass.name}\$"
-             "${element.name}";
+          "${element.name}";
     } else if (element.isFactoryConstructor) {
       // TODO(johnniwinther): Change factory name encoding as to not include
       // the class-name twice.
@@ -1161,7 +1160,7 @@
       if (element.isClassMember) {
         ClassElement enclosingClass = element.enclosingClass;
         name = "${enclosingClass.name}_"
-               "${element.name}";
+            "${element.name}";
       } else {
         name = element.name.replaceAll('+', '_');
       }
@@ -1183,14 +1182,15 @@
       if (!IDENTIFIER.hasMatch(name)) {
         name = name.replaceAllMapped(NON_IDENTIFIER_CHAR,
             (match) => match[0].codeUnitAt(0).toRadixString(16));
-        if (!IDENTIFIER.hasMatch(name)) {  // e.g. starts with digit.
+        if (!IDENTIFIER.hasMatch(name)) {
+          // e.g. starts with digit.
           name = 'lib_$name';
         }
       }
       // Names constructed based on a libary name will be further disambiguated.
       // However, as names from the same libary should have the same libary
       // name part, we disambiguate the library name here.
-      String disambiguated  = name;
+      String disambiguated = name;
       for (int c = 0; libraryLongNames.containsValue(disambiguated); c++) {
         disambiguated = "$name$c";
       }
@@ -1247,8 +1247,8 @@
 
   /// Property name used for the one-shot interceptor method for the given
   /// [selector] and return-type specialization.
-  jsAst.Name nameForGetOneShotInterceptor(Selector selector,
-                                          Iterable<ClassElement> classes) {
+  jsAst.Name nameForGetOneShotInterceptor(
+      Selector selector, Iterable<ClassElement> classes) {
     // The one-shot name is a global name derived from the invocation name.  To
     // avoid instability we would like the names to be unique and not clash with
     // other global names.
@@ -1263,8 +1263,8 @@
       return new CompoundName([root, _literalDollar]);
     } else {
       String suffix = suffixForGetInterceptor(classes);
-      return new CompoundName([root, _literalDollar,
-                               new StringBackedName(suffix)]);
+      return new CompoundName(
+          [root, _literalDollar, new StringBackedName(suffix)]);
     }
   }
 
@@ -1353,11 +1353,11 @@
         // other elements, such as bound closures also live in
         // [staticStateHolder].
         !element.isAccessor &&
-        !element.isClass &&
-        !element.isTypedef &&
-        !element.isConstructor &&
-        !element.isFunction &&
-        !element.isLibrary;
+            !element.isClass &&
+            !element.isTypedef &&
+            !element.isConstructor &&
+            !element.isFunction &&
+            !element.isLibrary;
   }
 
   /// Returns [staticStateHolder] or one of [reservedGlobalObjectNames].
@@ -1388,8 +1388,8 @@
 
   jsAst.Name staticClosureName(Element element) {
     assert(Elements.isStaticOrTopLevelFunction(element));
-    String enclosing = element.enclosingClass == null
-        ? "" : element.enclosingClass.name;
+    String enclosing =
+        element.enclosingClass == null ? "" : element.enclosingClass.name;
     String library = _proposeNameForGlobal(element.library);
     return _disambiguateInternalGlobal(
         "${library}_${enclosing}_${element.name}\$closure");
@@ -1439,17 +1439,19 @@
   jsAst.Name operatorIsType(DartType type) {
     if (type.isFunctionType) {
       // TODO(erikcorry): Reduce from $isx to ix when we are minifying.
-      return new CompoundName([new StringBackedName(operatorIsPrefix),
-                               _literalUnderscore,
-                               getFunctionTypeName(type)]);
+      return new CompoundName([
+        new StringBackedName(operatorIsPrefix),
+        _literalUnderscore,
+        getFunctionTypeName(type)
+      ]);
     }
     return operatorIs(type.element);
   }
 
   jsAst.Name operatorIs(ClassElement element) {
     // TODO(erikcorry): Reduce from $isx to ix when we are minifying.
-    return new CompoundName([new StringBackedName(operatorIsPrefix),
-                             runtimeTypeName(element)]);
+    return new CompoundName(
+        [new StringBackedName(operatorIsPrefix), runtimeTypeName(element)]);
   }
 
   /// Returns a name that does not clash with reserved JS keywords.
@@ -1462,8 +1464,8 @@
   }
 
   jsAst.Name substitutionName(Element element) {
-    return new CompoundName([new StringBackedName(operatorAsPrefix),
-                             runtimeTypeName(element)]);
+    return new CompoundName(
+        [new StringBackedName(operatorAsPrefix), runtimeTypeName(element)]);
   }
 
   /// Translates a [String] into the corresponding [Name] data structure as
@@ -1474,13 +1476,11 @@
   jsAst.Name asName(String name) {
     if (name.startsWith(getterPrefix) && name.length > getterPrefix.length) {
       return new GetterName(_literalGetterPrefix,
-                           new StringBackedName(
-                               name.substring(getterPrefix.length)));
+          new StringBackedName(name.substring(getterPrefix.length)));
     }
     if (name.startsWith(setterPrefix) && name.length > setterPrefix.length) {
       return new GetterName(_literalSetterPrefix,
-                            new StringBackedName(
-                                name.substring(setterPrefix.length)));
+          new StringBackedName(name.substring(setterPrefix.length)));
     }
 
     return new StringBackedName(name);
@@ -1588,7 +1588,6 @@
  *
  */
 class ConstantNamingVisitor implements ConstantValueVisitor {
-
   static final RegExp IDENTIFIER = new RegExp(r'^[A-Za-z_$][A-Za-z0-9_$]*$');
   static const MAX_FRAGMENTS = 5;
   static const MAX_EXTRA_LENGTH = 30;
@@ -1597,8 +1596,8 @@
   final Compiler compiler;
   final ConstantCanonicalHasher hasher;
 
-  String root = null;     // First word, usually a type name.
-  bool failed = false;    // Failed to generate something pretty.
+  String root = null; // First word, usually a type name.
+  bool failed = false; // Failed to generate something pretty.
   List<String> fragments = <String>[];
   int length = 0;
 
@@ -1622,8 +1621,8 @@
     StringBuffer sb = new StringBuffer();
     for (int i = 0; i < length; i++) {
       int digit = hash % 62;
-      sb.write('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
-          [digit]);
+      sb.write('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'[
+          digit]);
       hash ~/= 62;
       if (hash == 0) break;
     }
@@ -1741,7 +1740,8 @@
     addRoot('Type');
     DartType type = constant.representedType;
     String name = type.element?.name;
-    if (name == null) {  // e.g. DartType 'dynamic' has no element.
+    if (name == null) {
+      // e.g. DartType 'dynamic' has no element.
       JavaScriptBackend backend = compiler.backend;
       name = backend.rtiEncoder.getTypeRepresentationForTypeConstant(type);
     }
@@ -1768,8 +1768,8 @@
         add('name');
         break;
       default:
-        reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
-                               "Unexpected SyntheticConstantValue");
+        reporter.internalError(
+            CURRENT_ELEMENT_SPANNABLE, "Unexpected SyntheticConstantValue");
     }
   }
 
@@ -1788,11 +1788,9 @@
  * their hashCodes.
  */
 class ConstantCanonicalHasher implements ConstantValueVisitor<int, Null> {
-
   static const _MASK = 0x1fffffff;
   static const _UINT32_LIMIT = 4 * 1024 * 1024 * 1024;
 
-
   final Compiler compiler;
   final Map<ConstantValue, int> hashes = new Map<ConstantValue, int>();
 
@@ -1925,7 +1923,8 @@
   static int _hashDouble(double value) {
     double magnitude = value.abs();
     int sign = value < 0 ? 1 : 0;
-    if (magnitude < _UINT32_LIMIT) {  // 2^32
+    if (magnitude < _UINT32_LIMIT) {
+      // 2^32
       int intValue = value.toInt();
       // Integer valued doubles in 32-bit range hash to the same values as ints.
       int hash = _hashInt(intValue);
@@ -1963,7 +1962,7 @@
   }
 
   static int _finish(int hash) {
-    hash = _MASK & (hash + (((_MASK >> 3) & hash) <<  3));
+    hash = _MASK & (hash + (((_MASK >> 3) & hash) << 3));
     hash = hash & (hash >> 11);
     return _MASK & (hash + (((_MASK >> 15) & hash) << 15));
   }
@@ -2003,7 +2002,7 @@
       visit(parameter);
     }
     bool first = false;
-    for (DartType parameter in  type.optionalParameterTypes) {
+    for (DartType parameter in type.optionalParameterTypes) {
       if (!first) {
         sb.write('_');
       }
@@ -2025,7 +2024,6 @@
   }
 }
 
-
 class NamingScope {
   /// Maps proposed names to *suggested* disambiguated names.
   ///
@@ -2046,6 +2044,7 @@
     assert(!_suggestedNames.containsKey(original));
     _suggestedNames[original] = suggestion;
   }
+
   bool hasSuggestion(String original) => _suggestedNames.containsKey(original);
   bool isSuggestion(String candidate) {
     return _suggestedNames.containsValue(candidate);
diff --git a/pkg/compiler/lib/src/js_backend/namer_names.dart b/pkg/compiler/lib/src/js_backend/namer_names.dart
index 31a1747..4baffb5 100644
--- a/pkg/compiler/lib/src/js_backend/namer_names.dart
+++ b/pkg/compiler/lib/src/js_backend/namer_names.dart
@@ -16,14 +16,7 @@
   }
 }
 
-enum _NamerNameKinds {
-  StringBacked,
-  Getter,
-  Setter,
-  Async,
-  Compound,
-  Token
-}
+enum _NamerNameKinds { StringBacked, Getter, Setter, Async, Compound, Token }
 
 class StringBackedName extends _NamerName {
   final String name;
@@ -33,7 +26,7 @@
 
   String get key => name;
 
-  operator==(other) {
+  operator ==(other) {
     if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
     return (other is StringBackedName) && other.name == name;
@@ -61,7 +54,7 @@
 
   String get key => prefix.key + base.key;
 
-  bool operator==(other) {
+  bool operator ==(other) {
     if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
     if (other is! _PrefixedName) return false;
@@ -125,7 +118,7 @@
 
   String get key => _parts.map((_NamerName name) => name.key).join();
 
-  bool operator==(other) {
+  bool operator ==(other) {
     if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
     if (other is! CompoundName) return false;
@@ -188,7 +181,7 @@
   markSeen(jsAst.TokenCounter counter) => _rc++;
 
   @override
-  bool operator==(other) {
+  bool operator ==(other) {
     if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
     return false;
@@ -220,8 +213,8 @@
   int compareTo(_NamerName other) => _target.compareTo(other);
 
   @override
-  bool operator==(other) => _target == other;
+  bool operator ==(other) => _target == other;
 
   @override
   int get hashCode => _target.hashCode;
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/js_backend/native_data.dart b/pkg/compiler/lib/src/js_backend/native_data.dart
new file mode 100644
index 0000000..49a207d
--- /dev/null
+++ b/pkg/compiler/lib/src/js_backend/native_data.dart
@@ -0,0 +1,166 @@
+// 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 js_backend.native_data;
+
+import '../common.dart';
+import '../elements/elements.dart'
+    show ClassElement, Element, FunctionElement, MemberElement;
+
+/// Additional element information for native classes and methods and js-interop
+/// methods.
+class NativeData {
+  /// The JavaScript names for elements implemented via typed JavaScript
+  /// interop.
+  Map<Element, String> jsInteropNames = <Element, String>{};
+
+  /// The JavaScript names for native JavaScript elements implemented.
+  Map<Element, String> nativeMemberName = <Element, String>{};
+
+  /// Tag info for native JavaScript classes names. See
+  /// [setNativeClassTagInfo].
+  Map<ClassElement, String> nativeClassTagInfo = <ClassElement, String>{};
+
+  /// Returns `true` if [element] is explicitly marked as part of JsInterop.
+  bool _isJsInterop(Element element) {
+    return jsInteropNames.containsKey(element.declaration);
+  }
+
+  /// Returns [element] as an explicit part of JsInterop. The js interop name is
+  /// expected to be computed later.
+  void markAsJsInterop(Element element) {
+    jsInteropNames[element.declaration] = null;
+  }
+
+  /// Sets the explicit js interop [name] for [element].
+  void setJsInteropName(Element element, String name) {
+    assert(invariant(element, isJsInterop(element),
+        message:
+            'Element $element is not js interop but given a js interop name.'));
+    jsInteropNames[element.declaration] = name;
+  }
+
+  /// Returns the explicit js interop name for [element].
+  String getJsInteropName(Element element) {
+    return jsInteropNames[element.declaration];
+  }
+
+  /// Returns `true` if [element] is part of JsInterop.
+  bool isJsInterop(Element element) {
+    // An function is part of JsInterop in the following cases:
+    // * It has a jsInteropName annotation
+    // * It is external member of a class or library tagged as JsInterop.
+    if (element.isFunction || element.isConstructor || element.isAccessor) {
+      FunctionElement function = element;
+      if (!function.isExternal) return false;
+
+      if (_isJsInterop(function)) return true;
+      if (function.isClassMember) return isJsInterop(function.contextClass);
+      if (function.isTopLevel) return isJsInterop(function.library);
+      return false;
+    } else {
+      return _isJsInterop(element);
+    }
+  }
+
+  /// Returns `true` if the name of [element] is fixed for the generated
+  /// JavaScript.
+  bool hasFixedBackendName(Element element) {
+    return isJsInterop(element) ||
+        nativeMemberName.containsKey(element.declaration);
+  }
+
+  String _jsNameHelper(Element element) {
+    String jsInteropName = jsInteropNames[element.declaration];
+    assert(invariant(element, !(_isJsInterop(element) && jsInteropName == null),
+        message:
+            'Element $element is js interop but js interop name has not yet '
+            'been computed.'));
+    if (jsInteropName != null && jsInteropName.isNotEmpty) {
+      return jsInteropName;
+    }
+    return element.isLibrary ? 'self' : element.name;
+  }
+
+  /// Computes the name for [element] to use in the generated JavaScript. This
+  /// is either given through a native annotation or a js interop annotation.
+  String getFixedBackendName(Element element) {
+    String name = nativeMemberName[element.declaration];
+    if (name == null && isJsInterop(element)) {
+      // If an element isJsInterop but _isJsInterop is false that means it is
+      // considered interop as the parent class is interop.
+      name = _jsNameHelper(
+          element.isConstructor ? element.enclosingClass : element);
+      nativeMemberName[element.declaration] = name;
+    }
+    return name;
+  }
+
+  /// Whether [element] corresponds to a native JavaScript construct either
+  /// through the native mechanism (`@Native(...)` or the `native` pseudo
+  /// keyword) which is only allowed for internal libraries or via the typed
+  /// JavaScriptInterop mechanism which is allowed for user libraries.
+  bool isNative(Element element) {
+    if (isJsInterop(element)) return true;
+    if (element.isClass) {
+      return nativeClassTagInfo.containsKey(element.declaration);
+    } else {
+      return nativeMemberName.containsKey(element.declaration);
+    }
+  }
+
+  /// Sets the native [name] for the member [element]. This name is used for
+  /// [element] in the generated JavaScript.
+  void setNativeMemberName(MemberElement element, String name) {
+    // TODO(johnniwinther): Avoid setting this more than once. The enqueuer
+    // might enqueue [element] several times (before processing it) and computes
+    // name on each call to `internalAddToWorkList`.
+    assert(invariant(
+        element,
+        nativeMemberName[element.declaration] == null ||
+            nativeMemberName[element.declaration] == name,
+        message: "Native member name set inconsistently on $element: "
+            "Existing name '${nativeMemberName[element.declaration]}', "
+            "new name '$name'."));
+    nativeMemberName[element.declaration] = name;
+  }
+
+  /// 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 `!`.
+  void setNativeClassTagInfo(ClassElement cls, String tagInfo) {
+    // TODO(johnniwinther): Assert that this is only called once. The memory
+    // compiler copies pre-processed elements into a new compiler through
+    // [Compiler.onLibraryScanned] and thereby causes multiple calls to this
+    // method.
+    assert(invariant(
+        cls,
+        nativeClassTagInfo[cls.declaration] == null ||
+            nativeClassTagInfo[cls.declaration] == tagInfo,
+        message: "Native tag info set inconsistently on $cls: "
+            "Existing tag info '${nativeClassTagInfo[cls.declaration]}', "
+            "new tag info '$tagInfo'."));
+    nativeClassTagInfo[cls.declaration] = tagInfo;
+  }
+
+  /// Returns the list of native tag words for [cls].
+  List<String> getNativeTagsOfClassRaw(ClassElement cls) {
+    String quotedName = nativeClassTagInfo[cls.declaration];
+    return quotedName.substring(1, quotedName.length - 1).split(',');
+  }
+
+  /// Returns the list of non-directive native tag words for [cls].
+  List<String> getNativeTagsOfClass(ClassElement cls) {
+    return getNativeTagsOfClassRaw(cls)
+        .where((s) => !s.startsWith('!'))
+        .toList();
+  }
+
+  /// Returns `true` if [cls] has a `!nonleaf` tag word.
+  bool hasNativeTagsForcedNonLeaf(ClassElement cls) {
+    return getNativeTagsOfClassRaw(cls).contains('!nonleaf');
+  }
+}
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 4db2387..4bc5384 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
@@ -44,15 +44,19 @@
 class NoSuchMethodRegistry {
   /// The implementations that fall into category A, described above.
   final Set<FunctionElement> defaultImpls = new Set<FunctionElement>();
+
   /// The implementations that fall into category B, described above.
   final Set<FunctionElement> throwingImpls = new Set<FunctionElement>();
+
   /// The implementations that fall into category C, described above.
   final Set<FunctionElement> notApplicableImpls = new Set<FunctionElement>();
+
   /// The implementations that fall into category D, described above.
   final Set<FunctionElement> otherImpls = new Set<FunctionElement>();
 
   /// The implementations that fall into category D1
   final Set<FunctionElement> complexNoReturnImpls = new Set<FunctionElement>();
+
   /// The implementations that fall into category D2
   final Set<FunctionElement> complexReturningImpls = new Set<FunctionElement>();
 
@@ -90,23 +94,20 @@
   /// Emits a diagnostic
   void emitDiagnostic() {
     throwingImpls.forEach((e) {
-        if (!_hasForwardingSyntax(e)) {
-          reporter.reportHintMessage(
-              e, MessageKind.DIRECTLY_THROWING_NSM);
-        }
-      });
+      if (!_hasForwardingSyntax(e)) {
+        reporter.reportHintMessage(e, MessageKind.DIRECTLY_THROWING_NSM);
+      }
+    });
     complexNoReturnImpls.forEach((e) {
-        if (!_hasForwardingSyntax(e)) {
-          reporter.reportHintMessage(
-              e, MessageKind.COMPLEX_THROWING_NSM);
-        }
-      });
+      if (!_hasForwardingSyntax(e)) {
+        reporter.reportHintMessage(e, MessageKind.COMPLEX_THROWING_NSM);
+      }
+    });
     complexReturningImpls.forEach((e) {
-        if (!_hasForwardingSyntax(e)) {
-          reporter.reportHintMessage(
-              e, MessageKind.COMPLEX_RETURNING_NSM);
-        }
-      });
+      if (!_hasForwardingSyntax(e)) {
+        reporter.reportHintMessage(e, MessageKind.COMPLEX_RETURNING_NSM);
+      }
+    });
   }
 
   /// Returns [true] if the given element is a complex [noSuchMethod]
@@ -154,7 +155,7 @@
       Element superCall =
           element.enclosingClass.lookupSuperByName(Names.noSuchMethod_);
       NsmCategory category = _categorizeImpl(superCall);
-      switch(category) {
+      switch (category) {
         case NsmCategory.DEFAULT:
           defaultImpls.add(element);
           break;
@@ -183,9 +184,9 @@
 
   bool _isDefaultNoSuchMethodImplementation(FunctionElement element) {
     ClassElement classElement = element.enclosingClass;
-    return classElement == _compiler.coreClasses.objectClass
-        || classElement == _backend.helpers.jsInterceptorClass
-        || classElement == _backend.helpers.jsNullClass;
+    return classElement == _compiler.coreClasses.objectClass ||
+        classElement == _backend.helpers.jsInterceptorClass ||
+        classElement == _backend.helpers.jsNullClass;
   }
 
   bool _hasForwardingSyntax(FunctionElement element) {
@@ -240,9 +241,4 @@
   }
 }
 
-enum NsmCategory {
-  DEFAULT,
-  THROWING,
-  NOT_APPLICABLE,
-  OTHER,
-}
+enum NsmCategory { DEFAULT, THROWING, NOT_APPLICABLE, OTHER, }
diff --git a/pkg/compiler/lib/src/js_backend/patch_resolver.dart b/pkg/compiler/lib/src/js_backend/patch_resolver.dart
index 60573ed..521dd2d 100644
--- a/pkg/compiler/lib/src/js_backend/patch_resolver.dart
+++ b/pkg/compiler/lib/src/js_backend/patch_resolver.dart
@@ -5,12 +5,9 @@
 library dart2js.js_backend.patch_resolver;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Resolution;
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
+import '../common/resolution.dart' show Resolution;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
 import '../dart_types.dart';
 import '../elements/elements.dart';
 import '../elements/modelx.dart';
@@ -33,15 +30,13 @@
       element = patch;
     } else if (!compiler.backend.isJsInterop(element)) {
       reporter.reportErrorMessage(
-         element, MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION);
+          element, MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION);
     }
     return element;
   }
 
   void checkMatchingPatchParameters(FunctionElement origin,
-                                    List<Element> originParameters,
-                                    List<Element> patchParameters) {
-
+      List<Element> originParameters, List<Element> patchParameters) {
     assert(originParameters.length == patchParameters.length);
     for (int index = 0; index < originParameters.length; index++) {
       ParameterElementX originParameter = originParameters[index];
@@ -52,19 +47,19 @@
         originParameter.applyPatch(patchParameter);
       } else {
         assert(invariant(origin, originParameter.patch == patchParameter,
-               message: "Inconsistent repatch of $originParameter."));
+            message: "Inconsistent repatch of $originParameter."));
       }
       DartType originParameterType = originParameter.computeType(resolution);
       DartType patchParameterType = patchParameter.computeType(resolution);
       if (originParameterType != patchParameterType) {
         reporter.reportError(
             reporter.createMessage(
-                originParameter,
-                MessageKind.PATCH_PARAMETER_TYPE_MISMATCH,
-                {'methodName': origin.name,
-                 'parameterName': originParameter.name,
-                 'originParameterType': originParameterType,
-                 'patchParameterType': patchParameterType}),
+                originParameter, MessageKind.PATCH_PARAMETER_TYPE_MISMATCH, {
+              'methodName': origin.name,
+              'parameterName': originParameter.name,
+              'originParameterType': originParameterType,
+              'patchParameterType': patchParameterType
+            }),
             <DiagnosticMessage>[
               reporter.createMessage(
                   patchParameter,
@@ -83,28 +78,28 @@
         if (originParameterText != patchParameterText
             // We special case the list constructor because of the
             // optional parameter.
-            && origin != compiler.unnamedListConstructor) {
+            &&
+            origin != compiler.unnamedListConstructor) {
           reporter.reportError(
               reporter.createMessage(
-                  originParameter,
-                  MessageKind.PATCH_PARAMETER_MISMATCH,
-                  {'methodName': origin.name,
-                   'originParameter': originParameterText,
-                   'patchParameter': patchParameterText}),
+                  originParameter, MessageKind.PATCH_PARAMETER_MISMATCH, {
+                'methodName': origin.name,
+                'originParameter': originParameterText,
+                'patchParameter': patchParameterText
+              }),
               <DiagnosticMessage>[
-                  reporter.createMessage(
-                      patchParameter,
-                      MessageKind.PATCH_POINT_TO_PARAMETER,
-                      {'parameterName': patchParameter.name}),
+                reporter.createMessage(
+                    patchParameter,
+                    MessageKind.PATCH_POINT_TO_PARAMETER,
+                    {'parameterName': patchParameter.name}),
               ]);
-
         }
       }
     }
   }
 
-  void checkMatchingPatchSignatures(FunctionElement origin,
-                                    FunctionElement patch) {
+  void checkMatchingPatchSignatures(
+      FunctionElement origin, FunctionElement patch) {
     // TODO(johnniwinther): Show both origin and patch locations on errors.
     FunctionSignature originSignature = origin.functionSignature;
     FunctionExpression patchTree = patch.node;
@@ -115,26 +110,26 @@
         Node errorNode =
             patchTree.returnType != null ? patchTree.returnType : patchTree;
         reporter.reportErrorMessage(
-            errorNode, MessageKind.PATCH_RETURN_TYPE_MISMATCH,
-            {'methodName': origin.name,
-             'originReturnType': originSignature.type.returnType,
-             'patchReturnType': patchSignature.type.returnType});
+            errorNode, MessageKind.PATCH_RETURN_TYPE_MISMATCH, {
+          'methodName': origin.name,
+          'originReturnType': originSignature.type.returnType,
+          'patchReturnType': patchSignature.type.returnType
+        });
       });
     }
     if (originSignature.requiredParameterCount !=
         patchSignature.requiredParameterCount) {
       reporter.withCurrentElement(patch, () {
         reporter.reportErrorMessage(
-            patchTree,
-            MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH,
-            {'methodName': origin.name,
-             'originParameterCount': originSignature.requiredParameterCount,
-             'patchParameterCount': patchSignature.requiredParameterCount});
+            patchTree, MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH, {
+          'methodName': origin.name,
+          'originParameterCount': originSignature.requiredParameterCount,
+          'patchParameterCount': patchSignature.requiredParameterCount
+        });
       });
     } else {
-      checkMatchingPatchParameters(origin,
-                                   originSignature.requiredParameters,
-                                   patchSignature.requiredParameters);
+      checkMatchingPatchParameters(origin, originSignature.requiredParameters,
+          patchSignature.requiredParameters);
     }
     if (originSignature.optionalParameterCount != 0 &&
         patchSignature.optionalParameterCount != 0) {
@@ -152,17 +147,15 @@
         patchSignature.optionalParameterCount) {
       reporter.withCurrentElement(patch, () {
         reporter.reportErrorMessage(
-            patchTree,
-            MessageKind.PATCH_OPTIONAL_PARAMETER_COUNT_MISMATCH,
-            {'methodName': origin.name,
-             'originParameterCount': originSignature.optionalParameterCount,
-             'patchParameterCount': patchSignature.optionalParameterCount});
+            patchTree, MessageKind.PATCH_OPTIONAL_PARAMETER_COUNT_MISMATCH, {
+          'methodName': origin.name,
+          'originParameterCount': originSignature.optionalParameterCount,
+          'patchParameterCount': patchSignature.optionalParameterCount
+        });
       });
     } else {
-      checkMatchingPatchParameters(origin,
-                                   originSignature.optionalParameters,
-                                   patchSignature.optionalParameters);
+      checkMatchingPatchParameters(origin, originSignature.optionalParameters,
+          patchSignature.optionalParameters);
     }
   }
-
 }
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 1501a93..036e52a 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -7,9 +7,10 @@
 /// For each class, stores the possible class subtype tests that could succeed.
 abstract class TypeChecks {
   /// Get the set of checks required for class [element].
-  Iterable<TypeCheck> operator[](ClassElement element);
-  /// Get the iterator for all classes that need type checks.
-  Iterator<ClassElement> get iterator;
+  Iterable<TypeCheck> operator [](ClassElement element);
+
+  /// Get the iterable for all classes that need type checks.
+  Iterable<ClassElement> get classes;
 }
 
 typedef jsAst.Expression OnVariableCallback(TypeVariableType variable);
@@ -28,24 +29,24 @@
 
   void registerClassUsingTypeVariableExpression(ClassElement cls);
   void registerRtiDependency(Element element, Element dependency);
-  void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
-                                              DartType bound);
+  void registerTypeVariableBoundsSubtypeCheck(
+      DartType typeArgument, DartType bound);
 
-  Set<ClassElement> getClassesUsedInSubstitutions(JavaScriptBackend backend,
-                                                  TypeChecks checks);
+  Set<ClassElement> getClassesUsedInSubstitutions(
+      JavaScriptBackend backend, TypeChecks checks);
   void computeClassesNeedingRti();
 
   /// Compute the required type checkes and substitutions for the given
   /// instantitated and checked classes.
-  TypeChecks computeChecks(Set<ClassElement> instantiated,
-                           Set<ClassElement> checked);
+  TypeChecks computeChecks(
+      Set<ClassElement> instantiated, Set<ClassElement> checked);
 
   /// Compute type arguments of classes that use one of their type variables in
   /// is-checks and add the is-checks that they imply.
   ///
   /// This function must be called after all is-checks have been registered.
-  void addImplicitChecks(Universe universe,
-                         Iterable<ClassElement> classesUsingChecks);
+  void addImplicitChecks(
+      Universe universe, Iterable<ClassElement> classesUsingChecks);
 
   /// Return all classes that are referenced in the type of the function, i.e.,
   /// in the return type or the argument types.
@@ -73,8 +74,7 @@
   jsAst.Expression getSignatureEncoding(DartType type, jsAst.Expression this_);
 
   jsAst.Expression getSubstitutionRepresentation(
-        List<DartType> types,
-        OnVariableCallback onVariable);
+      List<DartType> types, OnVariableCallback onVariable);
   jsAst.Expression getSubstitutionCode(Substitution substitution);
   jsAst.Expression getSubstitutionCodeForVariable(
       Substitution substitution, int index);
@@ -89,9 +89,8 @@
   jsAst.Name get getFunctionThatReturnsNullName;
 
   jsAst.Expression getTypeRepresentation(
-        DartType type,
-        OnVariableCallback onVariable,
-        [ShouldEncodeTypedefCallback shouldEncodeTypedef]);
+      DartType type, OnVariableCallback onVariable,
+      [ShouldEncodeTypedefCallback shouldEncodeTypedef]);
   /**
    * Returns a [jsAst.Expression] representing the given [type]. Type
    * variables are replaced by placeholders in the ast.
@@ -100,8 +99,9 @@
    * This is useful if the returned [jsAst.Expression] is only part of a
    * larger template. By default, indexing starts with 0.
    */
-  jsAst.Expression getTypeRepresentationWithPlaceholders(DartType type,
-        OnVariableCallback onVariable, {int firstPlaceholderIndex : 0});
+  jsAst.Expression getTypeRepresentationWithPlaceholders(
+      DartType type, OnVariableCallback onVariable,
+      {int firstPlaceholderIndex: 0});
 
   String getTypeRepresentationForTypeConstant(DartType type);
 }
@@ -157,8 +157,8 @@
   }
 
   @override
-  void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
-                                              DartType bound) {
+  void registerTypeVariableBoundsSubtypeCheck(
+      DartType typeArgument, DartType bound) {
     checkedTypeArguments.add(typeArgument);
     checkedBounds.add(bound);
   }
@@ -178,8 +178,8 @@
    * immutable datastructure.
    */
   @override
-  void addImplicitChecks(Universe universe,
-                         Iterable<ClassElement> classesUsingChecks) {
+  void addImplicitChecks(
+      Universe universe, Iterable<ClassElement> classesUsingChecks) {
     // If there are no classes that use their variables in checks, there is
     // nothing to do.
     if (classesUsingChecks.isEmpty) return;
@@ -293,14 +293,14 @@
               methodsNeedingRti.add(method);
             }
           }
-          compiler.resolverWorld.closuresWithFreeTypeVariables.forEach(
-              analyzeMethod);
-          compiler.resolverWorld.callMethodsWithFreeTypeVariables.forEach(
-              analyzeMethod);
+          compiler.resolverWorld.closuresWithFreeTypeVariables
+              .forEach(analyzeMethod);
+          compiler.resolverWorld.callMethodsWithFreeTypeVariables
+              .forEach(analyzeMethod);
         }
       }
     });
-    if (compiler.enableTypeAssertions) {
+    if (compiler.options.enableTypeAssertions) {
       void analyzeMethod(TypedElement method) {
         DartType memberType = method.type;
         ClassElement contextClass = Types.getClassContext(memberType);
@@ -309,10 +309,10 @@
           methodsNeedingRti.add(method);
         }
       }
-      compiler.resolverWorld.closuresWithFreeTypeVariables.forEach(
-          analyzeMethod);
-      compiler.resolverWorld.callMethodsWithFreeTypeVariables.forEach(
-          analyzeMethod);
+      compiler.resolverWorld.closuresWithFreeTypeVariables
+          .forEach(analyzeMethod);
+      compiler.resolverWorld.callMethodsWithFreeTypeVariables
+          .forEach(analyzeMethod);
     }
     // Add the classes that need RTI because they use a type variable as
     // expression.
@@ -329,8 +329,8 @@
   }
 
   @override
-  TypeChecks computeChecks(Set<ClassElement> instantiated,
-                           Set<ClassElement> checked) {
+  TypeChecks computeChecks(
+      Set<ClassElement> instantiated, Set<ClassElement> checked) {
     // Run through the combination of instantiated and checked
     // arguments and record all combination where the element of a checked
     // argument is a superclass of the element of an instantiated type.
@@ -342,7 +342,7 @@
       // Find all supertypes of [element] in [checkedArguments] and add checks
       // and precompute the substitutions for them.
       assert(invariant(element, element.allSupertypes != null,
-             message: 'Supertypes have not been computed for $element.'));
+          message: 'Supertypes have not been computed for $element.'));
       for (DartType supertype in element.allSupertypes) {
         ClassElement superelement = supertype.element;
         if (checked.contains(superelement)) {
@@ -398,8 +398,8 @@
    * have a type check against this supertype that includes a check against
    * the type arguments.
    */
-  void computeInstantiatedArguments(Set<DartType> instantiatedTypes,
-                                    Set<DartType> isChecks) {
+  void computeInstantiatedArguments(
+      Set<DartType> instantiatedTypes, Set<DartType> isChecks) {
     ArgumentCollector superCollector = new ArgumentCollector(backend);
     ArgumentCollector directCollector = new ArgumentCollector(backend);
     FunctionArgumentCollector functionArgumentCollector =
@@ -416,7 +416,7 @@
     collectFunctionTypeArguments(checkedBounds);
 
     void collectTypeArguments(Iterable<DartType> types,
-                              {bool isTypeArgument: false}) {
+        {bool isTypeArgument: false}) {
       for (DartType type in types) {
         directCollector.collect(type, isTypeArgument: isTypeArgument);
         if (type.isInterfaceType) {
@@ -436,15 +436,15 @@
       }
     }
 
-    directlyInstantiatedArguments =
-        directCollector.classes..addAll(functionArgumentCollector.classes);
-    allInstantiatedArguments =
-        superCollector.classes..addAll(directlyInstantiatedArguments);
+    directlyInstantiatedArguments = directCollector.classes
+      ..addAll(functionArgumentCollector.classes);
+    allInstantiatedArguments = superCollector.classes
+      ..addAll(directlyInstantiatedArguments);
   }
 
   /// Collects all type arguments used in is-checks.
-  void computeCheckedArguments(Set<DartType> instantiatedTypes,
-                               Set<DartType> isChecks) {
+  void computeCheckedArguments(
+      Set<DartType> instantiatedTypes, Set<DartType> isChecks) {
     ArgumentCollector collector = new ArgumentCollector(backend);
     FunctionArgumentCollector functionArgumentCollector =
         new FunctionArgumentCollector(backend);
@@ -461,7 +461,7 @@
     collectFunctionTypeArguments(checkedTypeArguments);
 
     void collectTypeArguments(Iterable<DartType> types,
-                              {bool isTypeArgument: false}) {
+        {bool isTypeArgument: false}) {
       for (DartType type in types) {
         collector.collect(type, isTypeArgument: isTypeArgument);
       }
@@ -469,16 +469,16 @@
     collectTypeArguments(isChecks);
     collectTypeArguments(checkedBounds, isTypeArgument: true);
 
-    checkedArguments =
-        collector.classes..addAll(functionArgumentCollector.classes);
+    checkedArguments = collector.classes
+      ..addAll(functionArgumentCollector.classes);
   }
 
   @override
-  Set<ClassElement> getClassesUsedInSubstitutions(JavaScriptBackend backend,
-                                                  TypeChecks checks) {
+  Set<ClassElement> getClassesUsedInSubstitutions(
+      JavaScriptBackend backend, TypeChecks checks) {
     Set<ClassElement> instantiated = new Set<ClassElement>();
     ArgumentCollector collector = new ArgumentCollector(backend);
-    for (ClassElement target in checks) {
+    for (ClassElement target in checks.classes) {
       instantiated.add(target);
       for (TypeCheck check in checks[target]) {
         Substitution substitution = check.substitution;
@@ -492,12 +492,11 @@
 
   @override
   Set<ClassElement> getRequiredArgumentClasses(JavaScriptBackend backend) {
-    Set<ClassElement> requiredArgumentClasses =
-        new Set<ClassElement>.from(
-            getClassesUsedInSubstitutions(backend, requiredChecks));
+    Set<ClassElement> requiredArgumentClasses = new Set<ClassElement>.from(
+        getClassesUsedInSubstitutions(backend, requiredChecks));
     return requiredArgumentClasses
-        ..addAll(directlyInstantiatedArguments)
-        ..addAll(checkedArguments);
+      ..addAll(directlyInstantiatedArguments)
+      ..addAll(checkedArguments);
   }
 
   @override
@@ -558,7 +557,7 @@
   }
 
   Substitution computeSubstitution(ClassElement cls, ClassElement check,
-                                   { bool alwaysGenerateFunction: false }) {
+      {bool alwaysGenerateFunction: false}) {
     if (isTrivialSubstitution(cls, check)) return null;
 
     // Unnamed mixin application classes do not need substitutions, because they
@@ -602,16 +601,16 @@
 
   @override
   jsAst.Expression getTypeRepresentation(
-      DartType type,
-      OnVariableCallback onVariable,
+      DartType type, OnVariableCallback onVariable,
       [ShouldEncodeTypedefCallback shouldEncodeTypedef]) {
     return representationGenerator.getTypeRepresentation(
         type, onVariable, shouldEncodeTypedef);
   }
 
   @override
-  jsAst.Expression getTypeRepresentationWithPlaceholders(DartType type,
-      OnVariableCallback onVariable, {int firstPlaceholderIndex : 0}) {
+  jsAst.Expression getTypeRepresentationWithPlaceholders(
+      DartType type, OnVariableCallback onVariable,
+      {int firstPlaceholderIndex: 0}) {
     // Create a type representation.  For type variables call the original
     // callback for side effects and return a template placeholder.
     int positions = firstPlaceholderIndex;
@@ -624,8 +623,7 @@
 
   @override
   jsAst.Expression getSubstitutionRepresentation(
-      List<DartType> types,
-      OnVariableCallback onVariable) {
+      List<DartType> types, OnVariableCallback onVariable) {
     List<jsAst.Expression> elements = types
         .map((DartType type) => getTypeRepresentation(type, onVariable))
         .toList(growable: false);
@@ -633,11 +631,12 @@
   }
 
   jsAst.Expression getTypeEncoding(DartType type,
-                                   {bool alwaysGenerateFunction: false}) {
+      {bool alwaysGenerateFunction: false}) {
     ClassElement contextClass = Types.getClassContext(type);
     jsAst.Expression onVariable(TypeVariableType v) {
       return new jsAst.VariableUse(v.name);
-    };
+    }
+    ;
     jsAst.Expression encoding = getTypeRepresentation(type, onVariable);
     if (contextClass == null && !alwaysGenerateFunction) {
       return encoding;
@@ -645,7 +644,7 @@
       List<String> parameters = const <String>[];
       if (contextClass != null) {
         parameters = contextClass.typeVariables.map((type) {
-            return type.toString();
+          return type.toString();
         }).toList();
       }
       return js('function(#) { return # }', [parameters, encoding]);
@@ -660,10 +659,12 @@
     if (contextClass != null) {
       JavaScriptBackend backend = compiler.backend;
       jsAst.Name contextName = backend.namer.className(contextClass);
-      return js('function () { return #(#, #, #); }',
-          [ backend.emitter.staticFunctionAccess(
-                backend.helpers.computeSignature),
-              encoding, this_, js.quoteName(contextName) ]);
+      return js('function () { return #(#, #, #); }', [
+        backend.emitter.staticFunctionAccess(backend.helpers.computeSignature),
+        encoding,
+        this_,
+        js.quoteName(contextName)
+      ]);
     } else {
       return encoding;
     }
@@ -709,8 +710,8 @@
   }
 
   @override
-  jsAst.Expression getSubstitutionCodeForVariable(Substitution substitution,
-                                                  int index) {
+  jsAst.Expression getSubstitutionCodeForVariable(
+      Substitution substitution, int index) {
     jsAst.Expression declaration(TypeVariableType variable) {
       return new jsAst.Parameter(getVariableName(variable.name));
     }
@@ -735,8 +736,8 @@
   }
 
   @override
-  jsAst.Name get getFunctionThatReturnsNullName
-      => backend.namer.internalGlobal('functionThatReturnsNull');
+  jsAst.Name get getFunctionThatReturnsNullName =>
+      backend.namer.internalGlobal('functionThatReturnsNull');
 
   @override
   String getTypeRepresentationForTypeConstant(DartType type) {
@@ -753,8 +754,7 @@
     // names, it would result in more readable names if the final string was a
     // legal JavaScript identifer.
     if (variables.isEmpty) return name;
-    String arguments =
-        new List.filled(variables.length, 'dynamic').join(', ');
+    String arguments = new List.filled(variables.length, 'dynamic').join(', ');
     return '$name<$arguments>';
   }
 
@@ -763,7 +763,7 @@
     if (!type.returnType.isDynamic) return false;
     if (!type.optionalParameterTypes.isEmpty) return false;
     if (!type.namedParameterTypes.isEmpty) return false;
-    for (DartType parameter in type.parameterTypes ) {
+    for (DartType parameter in type.parameterTypes) {
       if (!parameter.isDynamic) return false;
     }
     return true;
@@ -845,8 +845,8 @@
   jsAst.Template get templateForCreateFunctionType {
     // The value of the functionTypeTag can be anything. We use "dynaFunc" for
     // easier debugging.
-    return jsAst.js.expressionTemplateFor(
-        '{ ${namer.functionTypeTag}: "dynafunc" }');
+    return jsAst.js
+        .expressionTemplateFor('{ ${namer.functionTypeTag}: "dynafunc" }');
   }
 
   visitFunctionType(FunctionType type, _) {
@@ -866,11 +866,11 @@
     }
     if (!type.parameterTypes.isEmpty) {
       addProperty(namer.functionTypeRequiredParametersTag,
-                  visitList(type.parameterTypes));
+          visitList(type.parameterTypes));
     }
     if (!type.optionalParameterTypes.isEmpty) {
       addProperty(namer.functionTypeOptionalParametersTag,
-                  visitList(type.optionalParameterTypes));
+          visitList(type.optionalParameterTypes));
     }
     if (!type.namedParameterTypes.isEmpty) {
       List<jsAst.Property> namedArguments = <jsAst.Property>[];
@@ -882,7 +882,7 @@
         namedArguments.add(new jsAst.Property(name, visit(types[index])));
       }
       addProperty(namer.functionTypeNamedParametersTag,
-                  new jsAst.ObjectInitializer(namedArguments));
+          new jsAst.ObjectInitializer(namedArguments));
     }
     return new jsAst.ObjectInitializer(properties);
   }
@@ -917,17 +917,16 @@
   }
 
   visitStatementType(StatementType type, _) {
-    reporter.internalError(NO_LOCATION_SPANNABLE,
-        'Unexpected type: $type (${type.kind}).');
+    reporter.internalError(
+        NO_LOCATION_SPANNABLE, 'Unexpected type: $type (${type.kind}).');
   }
 }
 
-
 class TypeCheckMapping implements TypeChecks {
   final Map<ClassElement, Set<TypeCheck>> map =
       new Map<ClassElement, Set<TypeCheck>>();
 
-  Iterable<TypeCheck> operator[](ClassElement element) {
+  Iterable<TypeCheck> operator [](ClassElement element) {
     Set<TypeCheck> result = map[element];
     return result != null ? result : const <TypeCheck>[];
   }
@@ -937,11 +936,11 @@
     map[cls].add(new TypeCheck(check, substitution));
   }
 
-  Iterator<ClassElement> get iterator => map.keys.iterator;
+  Iterable<ClassElement> get classes => map.keys;
 
   String toString() {
     StringBuffer sb = new StringBuffer();
-    for (ClassElement holder in this) {
+    for (ClassElement holder in classes) {
       for (ClassElement check in [holder]) {
         sb.write('${holder.name}.' '${check.name}, ');
       }
@@ -1035,8 +1034,7 @@
       : isFunction = false,
         parameters = const <DartType>[];
 
-  Substitution.function(this.arguments, this.parameters)
-      : isFunction = true;
+  Substitution.function(this.arguments, this.parameters) : isFunction = true;
 }
 
 /**
diff --git a/pkg/compiler/lib/src/js_backend/type_variable_handler.dart b/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
index 3fb220a..b3b4354 100644
--- a/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
+++ b/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
@@ -38,8 +38,8 @@
   JavaScriptBackend get _backend => _compiler.backend;
   DiagnosticReporter get reporter => _compiler.reporter;
 
-  void registerClassWithTypeVariables(ClassElement cls, Enqueuer enqueuer,
-                                      Registry registry) {
+  void registerClassWithTypeVariables(
+      ClassElement cls, Enqueuer enqueuer, Registry registry) {
     if (enqueuer.isResolutionQueue) {
       // On first encounter, we have to ensure that the support classes get
       // resolved.
@@ -55,10 +55,9 @@
         _backend.enqueueInResolution(_typeVariableConstructor, registry);
         _backend.registerInstantiatedType(
             _typeVariableClass.rawType, enqueuer, registry);
-        enqueuer.registerStaticUse(
-            new StaticUse.staticInvoke(
-                _backend.registerBackendUse(_backend.helpers.createRuntimeType),
-                CallStructure.ONE_ARG));
+        enqueuer.registerStaticUse(new StaticUse.staticInvoke(
+            _backend.registerBackendUse(_backend.helpers.createRuntimeType),
+            CallStructure.ONE_ARG));
         _seenClassesWithTypeVariables = true;
       }
     } else {
@@ -82,21 +81,16 @@
           typeVariableElement,
           typeVariableElement.node,
           new StringConstantExpression(currentTypeVariable.name),
-          _backend.constantSystem.createString(
-              new DartString.literal(currentTypeVariable.name)));
+          _backend.constantSystem
+              .createString(new DartString.literal(currentTypeVariable.name)));
       jsAst.Expression boundIndex =
           _metadataCollector.reifyType(typeVariableElement.bound);
-      ConstantValue boundValue =
-          new SyntheticConstantValue(
-              SyntheticConstantKind.TYPEVARIABLE_REFERENCE,
-              boundIndex);
+      ConstantValue boundValue = new SyntheticConstantValue(
+          SyntheticConstantKind.TYPEVARIABLE_REFERENCE, boundIndex);
       ConstantExpression boundExpression =
           new SyntheticConstantExpression(boundValue);
-      AstConstant bound = new AstConstant(
-          typeVariableElement,
-          typeVariableElement.node,
-          boundExpression,
-          boundValue);
+      AstConstant bound = new AstConstant(typeVariableElement,
+          typeVariableElement.node, boundExpression, boundValue);
       AstConstant type = new AstConstant(
           typeVariableElement,
           typeVariableElement.node,
@@ -123,8 +117,8 @@
       _backend.registerCompileTimeConstant(value, _compiler.globalDependencies);
       _backend.addCompileTimeConstantForEmission(value);
       _backend.constants.addCompileTimeConstantForEmission(value);
-      constants.add(
-          _reifyTypeVariableConstant(value, currentTypeVariable.element));
+      constants
+          .add(_reifyTypeVariableConstant(value, currentTypeVariable.element));
     }
     _typeVariables[cls] = constants;
   }
@@ -137,8 +131,8 @@
    * entry in the list has already been reserved and the constant is added
    * there, otherwise a new entry for [c] is created.
    */
-  jsAst.Expression _reifyTypeVariableConstant(ConstantValue c,
-                                              TypeVariableElement variable) {
+  jsAst.Expression _reifyTypeVariableConstant(
+      ConstantValue c, TypeVariableElement variable) {
     jsAst.Expression name = _task.constantReference(c);
     jsAst.Expression result = _metadataCollector.reifyExpression(name);
     if (_typeVariableConstants.containsKey(variable)) {
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 87f9d41..447710d 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -11,8 +11,8 @@
 
   ClassStubGenerator(this.compiler, this.namer, this.backend);
 
-  jsAst.Expression generateClassConstructor(ClassElement classElement,
-                                            Iterable<jsAst.Name> fields) {
+  jsAst.Expression generateClassConstructor(
+      ClassElement classElement, Iterable<jsAst.Name> fields) {
     // TODO(sra): Implement placeholders in VariableDeclaration position:
     //
     //     String constructorName = namer.getNameOfClass(classElement);
@@ -20,10 +20,11 @@
     //        [ constructorName, fields,
     //            fields.map(
     //                (name) => js('this.# = #', [name, name]))]));
-    return js('function(#) { #; this.#();}',
-        [fields,
-         fields.map((name) => js('this.# = #', [name, name])),
-         namer.deferredAction]);
+    return js('function(#) { #; this.#();}', [
+      fields,
+      fields.map((name) => js('this.# = #', [name, name])),
+      namer.deferredAction
+    ]);
   }
 
   jsAst.Expression generateGetter(Element member, jsAst.Name fieldName) {
@@ -38,8 +39,8 @@
     String receiver = backend.isInterceptorClass(cls) ? 'receiver' : 'this';
     List<String> args = backend.isInterceptedMethod(member) ? ['receiver'] : [];
     // TODO(floitsch): remove 'return'?
-    return js('function(#, v) { return #.# = v; }',
-        [args, receiver, fieldName]);
+    return js(
+        'function(#, v) { return #.# = v; }', [args, receiver, fieldName]);
   }
 
   /**
@@ -54,8 +55,7 @@
     // If the method is intercepted, the stub gets the
     // receiver explicitely and we need to pass it to the getter call.
     bool isInterceptedMethod = backend.isInterceptedMethod(member);
-    bool isInterceptorClass =
-        backend.isInterceptorClass(member.enclosingClass);
+    bool isInterceptorClass = backend.isInterceptorClass(member.enclosingClass);
 
     const String receiverArgumentName = r'$receiver';
 
@@ -75,7 +75,7 @@
     }
 
     Map<jsAst.Name, jsAst.Expression> generatedStubs =
-      <jsAst.Name, jsAst.Expression>{};
+        <jsAst.Name, jsAst.Expression>{};
 
     // Two selectors may match but differ only in type.  To avoid generating
     // identical stubs for each we track untyped selectors which already have
@@ -103,9 +103,8 @@
           arguments.add(js('#', name));
         }
 
-        jsAst.Fun function = js(
-            'function(#) { return #.#(#); }',
-            [ parameters, buildGetter(), closureCallName, arguments]);
+        jsAst.Fun function = js('function(#) { return #.#(#); }',
+            [parameters, buildGetter(), closureCallName, arguments]);
 
         generatedStubs[invocationName] = function;
       }
@@ -115,7 +114,6 @@
   }
 
   Map<jsAst.Name, Selector> computeSelectorsForNsmHandlers() {
-
     Map<jsAst.Name, Selector> jsNames = <jsAst.Name, Selector>{};
 
     // Do not generate no such method handlers if there is no class.
@@ -123,8 +121,8 @@
       return jsNames;
     }
 
-    void addNoSuchMethodHandlers(String ignore,
-                                 Map<Selector, SelectorConstraints> selectors) {
+    void addNoSuchMethodHandlers(
+        String ignore, Map<Selector, SelectorConstraints> selectors) {
       for (Selector selector in selectors.keys) {
         SelectorConstraints maskSet = selectors[selector];
         if (maskSet.needsNoSuchMethodHandling(selector, compiler.world)) {
@@ -140,47 +138,47 @@
     return jsNames;
   }
 
-  StubMethod generateStubForNoSuchMethod(jsAst.Name name,
-                                         Selector selector) {
+  StubMethod generateStubForNoSuchMethod(jsAst.Name name, Selector selector) {
     // Values match JSInvocationMirror in js-helper library.
     int type = selector.invocationMirrorKind;
     List<String> parameterNames =
         new List.generate(selector.argumentCount, (i) => '\$$i');
 
-    List<jsAst.Expression> argNames =
-        selector.callStructure.getOrderedNamedArguments().map((String name) =>
-            js.string(name)).toList();
+    List<jsAst.Expression> argNames = selector.callStructure
+        .getOrderedNamedArguments()
+        .map((String name) => js.string(name))
+        .toList();
 
     jsAst.Name methodName = namer.asName(selector.invocationMirrorMemberName);
     jsAst.Name internalName = namer.invocationMirrorInternalName(selector);
 
     assert(backend.isInterceptedName(Identifiers.noSuchMethod_));
     bool isIntercepted = backend.isInterceptedName(selector.name);
-    jsAst.Expression expression =
-        js('''this.#noSuchMethodName(#receiver,
+    jsAst.Expression expression = js(
+        '''this.#noSuchMethodName(#receiver,
                     #createInvocationMirror(#methodName,
                                             #internalName,
                                             #type,
                                             #arguments,
                                             #namedArguments))''',
-           {'receiver': isIntercepted ? r'$receiver' : 'this',
-            'noSuchMethodName': namer.noSuchMethodName,
-            'createInvocationMirror':
-                backend.emitter.staticFunctionAccess(
-                    backend.helpers.createInvocationMirror),
-            'methodName':
-                js.quoteName(compiler.enableMinification
-                    ? internalName : methodName),
-            'internalName': js.quoteName(internalName),
-            'type': js.number(type),
-            'arguments':
-                new jsAst.ArrayInitializer(parameterNames.map(js).toList()),
-            'namedArguments': new jsAst.ArrayInitializer(argNames)});
+        {
+          'receiver': isIntercepted ? r'$receiver' : 'this',
+          'noSuchMethodName': namer.noSuchMethodName,
+          'createInvocationMirror': backend.emitter
+              .staticFunctionAccess(backend.helpers.createInvocationMirror),
+          'methodName': js.quoteName(
+              compiler.options.enableMinification ? internalName : methodName),
+          'internalName': js.quoteName(internalName),
+          'type': js.number(type),
+          'arguments':
+              new jsAst.ArrayInitializer(parameterNames.map(js).toList()),
+          'namedArguments': new jsAst.ArrayInitializer(argNames)
+        });
 
     jsAst.Expression function;
     if (isIntercepted) {
-      function = js(r'function($receiver, #) { return # }',
-                              [parameterNames, expression]);
+      function = js(
+          r'function($receiver, #) { return # }', [parameterNames, expression]);
     } else {
       function = js(r'function(#) { return # }', [parameterNames, expression]);
     }
@@ -219,18 +217,19 @@
         js.string(namer.globalObjectFor(closureFromTearOff));
   } else {
     // Default values for mocked-up test libraries.
-    tearOffAccessExpression = js(
-        r'''function() { throw "Helper 'closureFromTearOff' missing." }''');
+    tearOffAccessExpression =
+        js(r'''function() { throw "Helper 'closureFromTearOff' missing." }''');
     tearOffGlobalObjectString = js.string('MissingHelperFunction');
     tearOffGlobalObject = js(
         r'''(function() { throw "Helper 'closureFromTearOff' missing." })()''');
   }
 
   jsAst.Statement tearOffGetter;
-  if (!compiler.useContentSecurityPolicy) {
+  if (!compiler.options.useContentSecurityPolicy) {
     jsAst.Expression tearOffAccessText =
         new jsAst.UnparsedNode(tearOffAccessExpression, compiler, false);
-    tearOffGetter = js.statement('''
+    tearOffGetter = js.statement(
+        '''
 function tearOffGetter(funcs, reflectionInfo, name, isIntercepted) {
   return isIntercepted
       ? new Function("funcs", "reflectionInfo", "name",
@@ -247,11 +246,15 @@
                 "this, funcs, reflectionInfo, false, [], name);" +
                 "return new c(this, funcs[0], null, name);" +
                 "}")(funcs, reflectionInfo, name, #tearOffGlobalObject, null);
-}''', {'tearOffAccessText': tearOffAccessText,
-       'tearOffGlobalObject': tearOffGlobalObject,
-       'tearOffGlobalObjectString': tearOffGlobalObjectString});
+}''',
+        {
+          'tearOffAccessText': tearOffAccessText,
+          'tearOffGlobalObject': tearOffGlobalObject,
+          'tearOffGlobalObjectString': tearOffGlobalObjectString
+        });
   } else {
-    tearOffGetter = js.statement('''
+    tearOffGetter = js.statement(
+        '''
       function tearOffGetter(funcs, reflectionInfo, name, isIntercepted) {
         var cache = null;
         return isIntercepted
@@ -265,10 +268,12 @@
                     this, funcs, reflectionInfo, false, [], name);
                 return new cache(this, funcs[0], null, name);
               };
-      }''', [tearOffAccessExpression, tearOffAccessExpression]);
+      }''',
+        [tearOffAccessExpression, tearOffAccessExpression]);
   }
 
-  jsAst.Statement tearOff = js.statement('''
+  jsAst.Statement tearOff = js.statement(
+      '''
     function tearOff(funcs, reflectionInfo, isStatic, name, isIntercepted) {
       var cache;
       return isStatic
@@ -278,7 +283,8 @@
               return cache;
             }
           : tearOffGetter(funcs, reflectionInfo, name, isIntercepted);
-    }''',  {'tearOff': tearOffAccessExpression});
+    }''',
+      {'tearOff': tearOffAccessExpression});
 
   return <jsAst.Statement>[tearOffGetter, tearOff];
 }
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 bea4320..28583fc 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -34,7 +34,7 @@
   Set<ClassElement> neededClasses;
 
   CodeEmitterTask(Compiler compiler, Namer namer, bool generateSourceMap,
-                  bool useStartupEmitter)
+      bool useStartupEmitter)
       : super(compiler),
         this.namer = namer,
         this.typeTestRegistry = new TypeTestRegistry(compiler) {
@@ -98,7 +98,7 @@
 
   /// Returns the JS prototype of the given class [e].
   jsAst.Expression prototypeAccess(ClassElement e,
-                                   {bool hasBeenInstantiated: false}) {
+      {bool hasBeenInstantiated: false}) {
     return emitter.prototypeAccess(e, hasBeenInstantiated);
   }
 
@@ -141,8 +141,8 @@
       emitter.invalidateCaches();
 
       Set<ClassElement> rtiNeededClasses = _finalizeRti();
-      ProgramBuilder programBuilder = new ProgramBuilder(
-          compiler, namer, this, emitter, rtiNeededClasses);
+      ProgramBuilder programBuilder =
+          new ProgramBuilder(compiler, namer, this, emitter, rtiNeededClasses);
       int size = emitter.emitProgram(programBuilder);
       // TODO(floitsch): we shouldn't need the `neededClasses` anymore.
       neededClasses = programBuilder.collector.neededClasses;
diff --git a/pkg/compiler/lib/src/js_emitter/constant_ordering.dart b/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
index 8e574c8..a2a0d7d 100644
--- a/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
+++ b/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
@@ -6,13 +6,8 @@
 
 import '../constants/values.dart';
 
-import '../common.dart';
-//import '../core_types.dart';
 import '../dart_types.dart';
-import '../elements/elements.dart'
-    show Element,
-         Elements,
-         FieldElement;
+import '../elements/elements.dart' show Element, Elements, FieldElement;
 import '../tree/tree.dart' show DartString;
 import '../js_backend/js_backend.dart' show SyntheticConstantKind;
 
@@ -66,8 +61,8 @@
     if (a is GenericType) {
       GenericType aGeneric = a;
       GenericType bGeneric = b;
-      r = compareLists(compareDartTypes,
-                       aGeneric.typeArguments, bGeneric.typeArguments);
+      r = compareLists(
+          compareDartTypes, aGeneric.typeArguments, bGeneric.typeArguments);
       if (r != 0) return r;
     }
     throw 'unexpected compareDartTypes  $a  $b';
@@ -127,7 +122,8 @@
     r = compareLists(compareElements, aFields, bFields);
     if (r != 0) return r;
 
-    return compareLists(compareValues,
+    return compareLists(
+        compareValues,
         aFields.map((field) => a.fields[field]).toList(),
         aFields.map((field) => b.fields[field]).toList());
   }
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/class_builder.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/class_builder.dart
index 6220c4e..2e0cb0e 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/class_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/class_builder.dart
@@ -79,9 +79,8 @@
     List<jsAst.Property> fieldsAndProperties;
     if (emitClassDescriptor) {
       fieldsAndProperties = <jsAst.Property>[];
-      fieldsAndProperties.add(
-          new jsAst.Property(
-              js.string(namer.classDescriptorProperty), classData));
+      fieldsAndProperties.add(new jsAst.Property(
+          js.string(namer.classDescriptorProperty), classData));
       fieldsAndProperties.addAll(properties);
     } else {
       fieldsAndProperties = properties;
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
index 06aa189..0538a2d 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
@@ -5,7 +5,6 @@
 part of dart2js.js_emitter.full_emitter;
 
 class ClassEmitter extends CodeEmitterHelper {
-
   ClassStubGenerator get _stubGenerator =>
       new ClassStubGenerator(compiler, namer, backend);
 
@@ -28,8 +27,7 @@
     if (cls.isMixinApplication) {
       MixinApplication mixinApplication = cls;
       jsAst.Name mixinName = mixinApplication.mixinClass.name;
-      superName =
-          new CompoundName([superName, Namer.literalPlus, mixinName]);
+      superName = new CompoundName([superName, Namer.literalPlus, mixinName]);
       emitter.needsMixinSupport = true;
     }
 
@@ -53,16 +51,17 @@
       builder.addProperty(name, function);
     }
 
-    emitClassBuilderWithReflectionData(cls, builder, enclosingBuilder,
-        fragment);
+    emitClassBuilderWithReflectionData(
+        cls, builder, enclosingBuilder, fragment);
   }
+
   /**
   * Emits the precompiled constructor when in CSP mode.
   */
   void emitConstructorsForCSP(Class cls) {
     List<jsAst.Name> fieldNames = <jsAst.Name>[];
 
-    if (!compiler.useContentSecurityPolicy) return;
+    if (!compiler.options.useContentSecurityPolicy) return;
 
     if (!cls.onlyForRti && !cls.isNative) {
       fieldNames = cls.fields.map((Field field) => field.name).toList();
@@ -81,10 +80,8 @@
   }
 
   /// Returns `true` if fields added.
-  bool emitFields(FieldContainer container,
-                  ClassBuilder builder,
-                  { bool classIsNative: false,
-                    bool emitStatics: false }) {
+  bool emitFields(FieldContainer container, ClassBuilder builder,
+      {bool classIsNative: false, bool emitStatics: false}) {
     Iterable<Field> fields;
     if (container is Class) {
       if (emitStatics) {
@@ -111,7 +108,7 @@
       bool needsGetter = field.needsGetter;
       bool needsSetter = field.needsUncheckedSetter;
 
-        // Ignore needsCheckedSetter - that is handled below.
+      // Ignore needsCheckedSetter - that is handled below.
       bool needsAccessor = (needsGetter || needsSetter);
       // We need to output the fields for non-native classes so we can auto-
       // generate the constructor.  For native classes there are no
@@ -143,21 +140,21 @@
           }
           fieldNameParts.add(name);
           if (field.needsInterceptedGetter) {
-            emitter.interceptorEmitter.interceptorInvocationNames.add(
-                namer.getterForElement(fieldElement));
+            emitter.interceptorEmitter.interceptorInvocationNames
+                .add(namer.getterForElement(fieldElement));
           }
           // TODO(16168): The setter creator only looks at the getter-name.
           // Even though the setter could avoid the interceptor convention we
           // currently still need to add the additional argument.
           if (field.needsInterceptedGetter || field.needsInterceptedSetter) {
-            emitter.interceptorEmitter.interceptorInvocationNames.add(
-                namer.setterForElement(fieldElement));
+            emitter.interceptorEmitter.interceptorInvocationNames
+                .add(namer.setterForElement(fieldElement));
           }
 
           int code = field.getterFlags + (field.setterFlags << 2);
           if (code == 0) {
-            reporter.internalError(fieldElement,
-                'Field code is 0 ($fieldElement).');
+            reporter.internalError(
+                fieldElement, 'Field code is 0 ($fieldElement).');
           }
           fieldNameParts.add(
               js.stringPart(FIELD_CODE_CHARACTERS[code - FIRST_FIELD_CODE]));
@@ -198,17 +195,16 @@
       assert(member != null);
       jsAst.Expression code = method.code;
       jsAst.Name setterName = method.name;
-      compiler.dumpInfoTask.registerElementAst(member,
-          builder.addProperty(setterName, code));
-      generateReflectionDataForFieldGetterOrSetter(
-          member, setterName, builder, isGetter: false);
+      compiler.dumpInfoTask
+          .registerElementAst(member, builder.addProperty(setterName, code));
+      generateReflectionDataForFieldGetterOrSetter(member, setterName, builder,
+          isGetter: false);
     }
   }
 
   /// Emits getters/setters for fields if compiling in CSP mode.
   void emitClassGettersSettersForCSP(Class cls, ClassBuilder builder) {
-
-    if (!compiler.useContentSecurityPolicy || cls.onlyForRti) return;
+    if (!compiler.options.useContentSecurityPolicy || cls.onlyForRti) return;
 
     for (Field field in cls.fields) {
       Element member = field.element;
@@ -235,8 +231,7 @@
    *
    * Invariant: [classElement] must be a declaration element.
    */
-  void emitInstanceMembers(Class cls,
-                           ClassBuilder builder) {
+  void emitInstanceMembers(Class cls, ClassBuilder builder) {
     ClassElement classElement = cls.element;
     assert(invariant(classElement, classElement.isDeclaration));
 
@@ -281,10 +276,8 @@
     }
   }
 
-  void emitClassBuilderWithReflectionData(Class cls,
-                                          ClassBuilder classBuilder,
-                                          ClassBuilder enclosingBuilder,
-                                          Fragment fragment) {
+  void emitClassBuilderWithReflectionData(Class cls, ClassBuilder classBuilder,
+      ClassBuilder enclosingBuilder, Fragment fragment) {
     ClassElement classElement = cls.element;
     jsAst.Name className = cls.name;
 
@@ -295,15 +288,15 @@
 
     if (backend.isAccessibleByReflection(classElement)) {
       List<DartType> typeVars = classElement.typeVariables;
-      Iterable typeVariableProperties = emitter.typeVariableHandler
-          .typeVariablesOf(classElement);
+      Iterable typeVariableProperties =
+          emitter.typeVariableHandler.typeVariablesOf(classElement);
 
       ClassElement superclass = classElement.superclass;
       bool hasSuper = superclass != null;
       if ((!typeVariableProperties.isEmpty && !hasSuper) ||
           (hasSuper && !equalElements(superclass.typeVariables, typeVars))) {
-        classBuilder.addPropertyByName('<>',
-            new jsAst.ArrayInitializer(typeVariableProperties.toList()));
+        classBuilder.addPropertyByName(
+            '<>', new jsAst.ArrayInitializer(typeVariableProperties.toList()));
       }
     }
 
@@ -312,9 +305,8 @@
         new ClassBuilder.forStatics(classElement, namer);
     if (emitFields(cls, staticsBuilder, emitStatics: true)) {
       jsAst.ObjectInitializer initializer =
-        staticsBuilder.toObjectInitializer();
-      compiler.dumpInfoTask.registerElementAst(classElement,
-        initializer);
+          staticsBuilder.toObjectInitializer();
+      compiler.dumpInfoTask.registerElementAst(classElement, initializer);
       jsAst.Node property = initializer.properties.single;
       compiler.dumpInfoTask.registerElementAst(classElement, property);
       statics.add(property);
@@ -334,9 +326,9 @@
     }
 
     // TODO(ahe): This method (generateClass) should return a jsAst.Expression.
-    jsAst.ObjectInitializer propertyValue =
-        classBuilder.toObjectInitializer();
-    compiler.dumpInfoTask.registerElementAst(classBuilder.element, propertyValue);
+    jsAst.ObjectInitializer propertyValue = classBuilder.toObjectInitializer();
+    compiler.dumpInfoTask
+        .registerElementAst(classBuilder.element, propertyValue);
     enclosingBuilder.addProperty(className, propertyValue);
 
     String reflectionName = emitter.getReflectionName(classElement, className);
@@ -353,33 +345,29 @@
           types.add(task.metadataCollector.reifyType(interface));
         }
         // TODO(herhut): Fix use of reflection name here.
-        enclosingBuilder.addPropertyByName("+$reflectionName",
-            new jsAst.ArrayInitializer(types));
+        enclosingBuilder.addPropertyByName(
+            "+$reflectionName", new jsAst.ArrayInitializer(types));
       }
     }
   }
 
-  void recordMangledField(Element member,
-                          jsAst.Name accessorName,
-                          String memberName) {
+  void recordMangledField(
+      Element member, jsAst.Name accessorName, String memberName) {
     if (!backend.shouldRetainGetter(member)) return;
     String previousName;
     if (member.isInstanceMember) {
-      previousName = emitter.mangledFieldNames.putIfAbsent(
-          namer.deriveGetterName(accessorName),
-          () => memberName);
+      previousName = emitter.mangledFieldNames
+          .putIfAbsent(namer.deriveGetterName(accessorName), () => memberName);
     } else {
-      previousName = emitter.mangledGlobalFieldNames.putIfAbsent(
-          accessorName,
-          () => memberName);
+      previousName = emitter.mangledGlobalFieldNames
+          .putIfAbsent(accessorName, () => memberName);
     }
     assert(invariant(member, previousName == memberName,
-                     message: '$previousName != ${memberName}'));
+        message: '$previousName != ${memberName}'));
   }
 
   void emitGetterForCSP(Element member, jsAst.Name fieldName,
-                        jsAst.Name accessorName,
-                        ClassBuilder builder) {
+      jsAst.Name accessorName, ClassBuilder builder) {
     jsAst.Expression function =
         _stubGenerator.generateGetter(member, fieldName);
 
@@ -388,18 +376,18 @@
     jsAst.Name className = namer.className(cls);
     OutputUnit outputUnit =
         compiler.deferredLoadTask.outputUnitForElement(member);
-    emitter.cspPrecompiledFunctionFor(outputUnit).add(
-        js('#.prototype.# = #', [className, getterName, function]));
+    emitter
+        .cspPrecompiledFunctionFor(outputUnit)
+        .add(js('#.prototype.# = #', [className, getterName, function]));
     if (backend.isAccessibleByReflection(member)) {
-      emitter.cspPrecompiledFunctionFor(outputUnit).add(
-          js('#.prototype.#.${namer.reflectableField} = 1',
-              [className, getterName]));
+      emitter.cspPrecompiledFunctionFor(outputUnit).add(js(
+          '#.prototype.#.${namer.reflectableField} = 1',
+          [className, getterName]));
     }
   }
 
   void emitSetterForCSP(Element member, jsAst.Name fieldName,
-                        jsAst.Name accessorName,
-                        ClassBuilder builder) {
+      jsAst.Name accessorName, ClassBuilder builder) {
     jsAst.Expression function =
         _stubGenerator.generateSetter(member, fieldName);
 
@@ -408,22 +396,21 @@
     jsAst.Name className = namer.className(cls);
     OutputUnit outputUnit =
         compiler.deferredLoadTask.outputUnitForElement(member);
-    emitter.cspPrecompiledFunctionFor(outputUnit).add(
-        js('#.prototype.# = #', [className, setterName, function]));
+    emitter
+        .cspPrecompiledFunctionFor(outputUnit)
+        .add(js('#.prototype.# = #', [className, setterName, function]));
     if (backend.isAccessibleByReflection(member)) {
-      emitter.cspPrecompiledFunctionFor(outputUnit).add(
-          js('#.prototype.#.${namer.reflectableField} = 1',
-              [className, setterName]));
+      emitter.cspPrecompiledFunctionFor(outputUnit).add(js(
+          '#.prototype.#.${namer.reflectableField} = 1',
+          [className, setterName]));
     }
   }
 
-  void generateReflectionDataForFieldGetterOrSetter(Element member,
-                                                    jsAst.Name name,
-                                                    ClassBuilder builder,
-                                                    {bool isGetter}) {
+  void generateReflectionDataForFieldGetterOrSetter(
+      Element member, jsAst.Name name, ClassBuilder builder,
+      {bool isGetter}) {
     Selector selector = isGetter
-        ? new Selector.getter(
-            new Name(member.name, member.library))
+        ? new Selector.getter(new Name(member.name, member.library))
         : new Selector.setter(
             new Name(member.name, member.library, isSetter: true));
     String reflectionName = emitter.getReflectionName(selector, name);
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/container_builder.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/container_builder.dart
index ebd7d1a..d0c0d93 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/container_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/container_builder.dart
@@ -9,7 +9,6 @@
 /// Initially, it is just a placeholder for code that is moved from
 /// [CodeEmitterTask].
 class ContainerBuilder extends CodeEmitterHelper {
-
   void addMemberMethod(DartMethod method, ClassBuilder builder) {
     MethodElement member = method.element;
     jsAst.Name name = method.name;
@@ -31,8 +30,8 @@
     emitter.interceptorEmitter.recordMangledNameOfMemberMethod(member, name);
 
     if (!needStructuredInfo) {
-      compiler.dumpInfoTask.registerElementAst(member,
-          builder.addProperty(name, code));
+      compiler.dumpInfoTask
+          .registerElementAst(member, builder.addProperty(name, code));
 
       for (ParameterStubMethod stub in method.parameterStubs) {
         assert(stub.callName == null);
@@ -87,9 +86,9 @@
 
     if (onlyNeedsSuperAlias) {
       jsAst.ArrayInitializer arrayInit =
-            new jsAst.ArrayInitializer(expressions);
-          compiler.dumpInfoTask.registerElementAst(member,
-              builder.addProperty(name, arrayInit));
+          new jsAst.ArrayInitializer(expressions);
+      compiler.dumpInfoTask
+          .registerElementAst(member, builder.addProperty(name, arrayInit));
       return;
     }
 
@@ -126,13 +125,14 @@
     }
 
     expressions
-        ..addAll(tearOffInfo)
-        ..add((tearOffName == null || member.isAccessor)
-              ? js("null") : js.quoteName(tearOffName))
-        ..add(js.number(requiredParameterCount))
-        ..add(js.number(optionalParameterCount))
-        ..add(memberTypeExpression == null ? js("null") : memberTypeExpression)
-        ..addAll(task.metadataCollector.reifyDefaultArguments(member));
+      ..addAll(tearOffInfo)
+      ..add((tearOffName == null || member.isAccessor)
+          ? js("null")
+          : js.quoteName(tearOffName))
+      ..add(js.number(requiredParameterCount))
+      ..add(js.number(optionalParameterCount))
+      ..add(memberTypeExpression == null ? js("null") : memberTypeExpression)
+      ..addAll(task.metadataCollector.reifyDefaultArguments(member));
 
     if (canBeReflected || canBeApplied) {
       parameters.forEachParameter((Element parameter) {
@@ -155,24 +155,22 @@
         // TODO(herhut): This registers name as a mangled name. Do we need this
         //               given that we use a different name below?
         emitter.getReflectionName(member, name);
-        reflectionName =
-            new jsAst.LiteralString(
-                '"new ${Elements.reconstructConstructorName(member)}"');
+        reflectionName = new jsAst.LiteralString(
+            '"new ${Elements.reconstructConstructorName(member)}"');
       } else {
-        reflectionName =
-            js.string(namer.privateName(member.memberName));
+        reflectionName = js.string(namer.privateName(member.memberName));
       }
       expressions
-          ..add(reflectionName)
-          ..addAll(task.metadataCollector.computeMetadata(member));
+        ..add(reflectionName)
+        ..addAll(task.metadataCollector.computeMetadata(member));
     } else if (isClosure && canBeApplied) {
       expressions.add(js.string(namer.privateName(member.memberName)));
     }
 
     jsAst.ArrayInitializer arrayInit =
-      new jsAst.ArrayInitializer(expressions.toList());
-    compiler.dumpInfoTask.registerElementAst(member,
-        builder.addProperty(name, arrayInit));
+        new jsAst.ArrayInitializer(expressions.toList());
+    compiler.dumpInfoTask
+        .registerElementAst(member, builder.addProperty(name, arrayInit));
   }
 
   void addMemberField(Field field, ClassBuilder builder) {
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/declarations.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/declarations.dart
index 0bc38d3..ac14c66 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/declarations.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/declarations.dart
@@ -10,8 +10,8 @@
 /**
  * Call-back for adding property with [name] and [value].
  */
-typedef jsAst.Property AddPropertyFunction(jsAst.Name name,
-                                           jsAst.Expression value);
+typedef jsAst.Property AddPropertyFunction(
+    jsAst.Name name, jsAst.Expression value);
 
 // Compact field specifications.  The format of the field specification is
 // <accessorName>:<fieldName><suffix> where the suffix and accessor name
@@ -29,9 +29,9 @@
 const FIELD_CODE_CHARACTERS = r"<=>?@{|}~%&'()*";
 const NO_FIELD_CODE = 0;
 const FIRST_FIELD_CODE = 1;
-const RANGE1_FIRST = 0x3c;   //  <=>?@    encodes 1..5
+const RANGE1_FIRST = 0x3c; //  <=>?@    encodes 1..5
 const RANGE1_LAST = 0x40;
-const RANGE2_FIRST = 0x7b;   //  {|}~     encodes 6..9
+const RANGE2_FIRST = 0x7b; //  {|}~     encodes 6..9
 const RANGE2_LAST = 0x7e;
-const RANGE3_FIRST = 0x25;   //  %&'()*+  encodes 10..16
+const RANGE3_FIRST = 0x25; //  %&'()*+  encodes 10..16
 const RANGE3_LAST = 0x2b;
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index f2c1ded..cb4dc4f 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -8,9 +8,8 @@
 import 'dart:collection' show HashMap;
 
 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
-import 'package:js_runtime/shared/embedded_names.dart' show
-    JsBuiltin,
-    JsGetName;
+import 'package:js_runtime/shared/embedded_names.dart'
+    show JsBuiltin, JsGetName;
 
 import '../headers.dart';
 import '../js_emitter.dart' hide Emitter;
@@ -20,77 +19,60 @@
 import '../constant_ordering.dart' show deepCompareConstants;
 
 import '../../common.dart';
-import '../../common/names.dart' show
-    Names;
-import '../../compiler.dart' show
-    Compiler;
+import '../../common/names.dart' show Names;
+import '../../compiler.dart' show Compiler;
 import '../../constants/values.dart';
-import '../../core_types.dart' show
-    CoreClasses;
-import '../../dart_types.dart' show
-    DartType;
+import '../../core_types.dart' show CoreClasses;
+import '../../dart_types.dart' show DartType;
 import '../../deferred_load.dart' show OutputUnit;
-import '../../elements/elements.dart' show
-    ClassElement,
-    ConstructorBodyElement,
-    Element,
-    Elements,
-    ElementKind,
-    FieldElement,
-    FunctionElement,
-    FunctionSignature,
-    LibraryElement,
-    MetadataAnnotation,
-    MethodElement,
-    MemberElement,
-    Name,
-    ParameterElement,
-    TypedefElement,
-    TypeVariableElement,
-    VariableElement;
+import '../../elements/elements.dart'
+    show
+        ClassElement,
+        ConstructorBodyElement,
+        Element,
+        Elements,
+        ElementKind,
+        FieldElement,
+        FunctionElement,
+        FunctionSignature,
+        LibraryElement,
+        MetadataAnnotation,
+        MethodElement,
+        MemberElement,
+        Name,
+        ParameterElement,
+        TypedefElement,
+        TypeVariableElement,
+        VariableElement;
 import '../../hash/sha1.dart' show Hasher;
 import '../../io/code_output.dart';
-import '../../io/line_column_provider.dart' show
-    LineColumnCollector,
-    LineColumnProvider;
-import '../../io/source_map_builder.dart' show
-    SourceMapBuilder;
+import '../../io/line_column_provider.dart'
+    show LineColumnCollector, LineColumnProvider;
+import '../../io/source_map_builder.dart' show SourceMapBuilder;
 import '../../js/js.dart' as jsAst;
 import '../../js/js.dart' show js;
-import '../../js_backend/backend_helpers.dart' show
-    BackendHelpers;
-import '../../js_backend/js_backend.dart' show
-    CheckedModeHelper,
-    CompoundName,
-    ConstantEmitter,
-    CustomElementsAnalysis,
-    GetterName,
-    JavaScriptBackend,
-    JavaScriptConstantCompiler,
-    Namer,
-    RuntimeTypes,
-    SetterName,
-    Substitution,
-    TypeCheck,
-    TypeChecks,
-    TypeVariableHandler;
-import '../../js/js_debug.dart';
-import '../../universe/call_structure.dart' show
-    CallStructure;
-import '../../universe/selector.dart' show
-    Selector;
-import '../../util/characters.dart' show
-    $$,
-    $A,
-    $HASH,
-    $PERIOD,
-    $Z,
-    $a,
-    $z;
-import '../../util/uri_extras.dart' show
-    relativize;
-import '../../util/util.dart' show
-    equalElements;
+import '../../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../../js_backend/js_backend.dart'
+    show
+        CheckedModeHelper,
+        CompoundName,
+        ConstantEmitter,
+        CustomElementsAnalysis,
+        GetterName,
+        JavaScriptBackend,
+        JavaScriptConstantCompiler,
+        Namer,
+        RuntimeTypes,
+        SetterName,
+        Substitution,
+        TypeCheck,
+        TypeChecks,
+        TypeVariableHandler;
+import '../../universe/call_structure.dart' show CallStructure;
+import '../../universe/selector.dart' show Selector;
+import '../../util/characters.dart' show $$, $A, $HASH, $PERIOD, $Z, $a, $z;
+import '../../util/uri_extras.dart' show relativize;
+import '../../util/util.dart' show equalElements;
 
 part 'class_builder.dart';
 part 'class_emitter.dart';
@@ -102,7 +84,6 @@
 part 'nsm_emitter.dart';
 part 'setup_program_builder.dart';
 
-
 class Emitter implements js_emitter.Emitter {
   final Compiler compiler;
   final CodeEmitterTask task;
@@ -153,9 +134,9 @@
   TypeVariableHandler get typeVariableHandler => backend.typeVariableHandler;
 
   String get _ => space;
-  String get space => compiler.enableMinification ? "" : " ";
-  String get n => compiler.enableMinification ? "" : "\n";
-  String get N => compiler.enableMinification ? "\n" : ";\n";
+  String get space => compiler.options.enableMinification ? "" : " ";
+  String get n => compiler.options.enableMinification ? "" : "\n";
+  String get N => compiler.options.enableMinification ? "\n" : ";\n";
 
   /**
    * List of expressions and statements that will be included in the
@@ -203,15 +184,13 @@
 
   List<jsAst.Node> cspPrecompiledFunctionFor(OutputUnit outputUnit) {
     return _cspPrecompiledFunctions.putIfAbsent(
-        outputUnit,
-        () => new List<jsAst.Node>());
+        outputUnit, () => new List<jsAst.Node>());
   }
 
   List<jsAst.Expression> cspPrecompiledConstructorNamesFor(
       OutputUnit outputUnit) {
     return _cspPrecompiledConstructorNames.putIfAbsent(
-        outputUnit,
-        () => new List<jsAst.Expression>());
+        outputUnit, () => new List<jsAst.Expression>());
   }
 
   /// Erases the precompiled information for csp mode for all output units.
@@ -226,9 +205,9 @@
 
   @override
   bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) {
-    if (constant.isFunction) return true;    // Already emitted.
-    if (constant.isPrimitive) return true;   // Inlined.
-    if (constant.isDummy) return true;       // Inlined.
+    if (constant.isFunction) return true; // Already emitted.
+    if (constant.isPrimitive) return true; // Inlined.
+    if (constant.isDummy) return true; // Inlined.
     // The name is null when the constant is already a JS constant.
     // TODO(floitsch): every constant should be registered, so that we can
     // share the ones that take up too much space (like some strings).
@@ -271,8 +250,8 @@
     if (isConstantInlinedOrAlreadyEmitted(value)) {
       return constantEmitter.generate(value);
     }
-    return js('#.#', [namer.globalObjectForConstant(value),
-                      namer.constantName(value)]);
+    return js('#.#',
+        [namer.globalObjectForConstant(value), namer.constantName(value)]);
   }
 
   jsAst.Expression constantInitializerExpression(ConstantValue value) {
@@ -281,18 +260,17 @@
 
   String get name => 'CodeEmitter';
 
-  String get finishIsolateConstructorName
-      => '${namer.isolateName}.\$finishIsolateConstructor';
-  String get isolatePropertiesName
-      => '${namer.isolateName}.${namer.isolatePropertiesName}';
-  String get lazyInitializerProperty
-      => r'$lazy';
-  String get lazyInitializerName
-      => '${namer.isolateName}.${lazyInitializerProperty}';
+  String get finishIsolateConstructorName =>
+      '${namer.isolateName}.\$finishIsolateConstructor';
+  String get isolatePropertiesName =>
+      '${namer.isolateName}.${namer.isolatePropertiesName}';
+  String get lazyInitializerProperty => r'$lazy';
+  String get lazyInitializerName =>
+      '${namer.isolateName}.${lazyInitializerProperty}';
   String get initName => 'init';
 
-  jsAst.Name get makeConstListProperty
-      => namer.internalGlobal('makeConstantList');
+  jsAst.Name get makeConstListProperty =>
+      namer.internalGlobal('makeConstantList');
 
   /// The name of the property that contains all field names.
   ///
@@ -322,22 +300,21 @@
   jsAst.PropertyAccess globalPropertyAccess(Element element) {
     jsAst.Name name = namer.globalPropertyName(element);
     jsAst.PropertyAccess pa = new jsAst.PropertyAccess(
-        new jsAst.VariableUse(namer.globalObjectFor(element)),
-        name);
+        new jsAst.VariableUse(namer.globalObjectFor(element)), name);
     return pa;
   }
 
   @override
   jsAst.Expression isolateLazyInitializerAccess(FieldElement element) {
-     return jsAst.js('#.#', [namer.globalObjectFor(element),
-                             namer.lazyInitializerName(element)]);
-   }
+    return jsAst.js('#.#',
+        [namer.globalObjectFor(element), namer.lazyInitializerName(element)]);
+  }
 
   @override
   jsAst.Expression isolateStaticClosureAccess(FunctionElement element) {
-     return jsAst.js('#.#()',
-         [namer.globalObjectFor(element), namer.staticClosureName(element)]);
-   }
+    return jsAst.js('#.#()',
+        [namer.globalObjectFor(element), namer.staticClosureName(element)]);
+  }
 
   @override
   jsAst.PropertyAccess staticFieldAccess(FieldElement element) {
@@ -355,8 +332,8 @@
   }
 
   @override
-  jsAst.PropertyAccess prototypeAccess(ClassElement element,
-                                       bool hasBeenInstantiated) {
+  jsAst.PropertyAccess prototypeAccess(
+      ClassElement element, bool hasBeenInstantiated) {
     return jsAst.js('#.prototype', constructorAccess(element));
   }
 
@@ -374,8 +351,8 @@
   jsAst.Template templateForBuiltin(JsBuiltin builtin) {
     switch (builtin) {
       case JsBuiltin.dartObjectConstructor:
-        return jsAst.js.expressionTemplateYielding(
-            typeAccess(coreClasses.objectClass));
+        return jsAst.js
+            .expressionTemplateYielding(typeAccess(coreClasses.objectClass));
 
       case JsBuiltin.isCheckPropertyToJsConstructorName:
         int isPrefixLength = namer.operatorIsPrefix.length;
@@ -397,8 +374,8 @@
         // TODO(floitsch): move this closer to where is-check properties are
         // built.
         String isPrefix = namer.operatorIsPrefix;
-        return jsAst.js.expressionTemplateFor(
-            "('$isPrefix' + #) in #.prototype");
+        return jsAst.js
+            .expressionTemplateFor("('$isPrefix' + #) in #.prototype");
 
       case JsBuiltin.isGivenTypeRti:
         return jsAst.js.expressionTemplateFor('#.$typeNameProperty === #');
@@ -421,13 +398,13 @@
         return jsAst.js.expressionTemplateFor("$functionGettersMap[#]()");
 
       default:
-        reporter.internalError(NO_LOCATION_SPANNABLE,
-            "Unhandled Builtin: $builtin");
+        reporter.internalError(
+            NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin");
         return null;
     }
   }
 
-  List<jsAst.Statement> buildTrivialNsmHandlers(){
+  List<jsAst.Statement> buildTrivialNsmHandlers() {
     return nsmEmitter.buildTrivialNsmHandlers();
   }
 
@@ -438,9 +415,7 @@
       jsAst.Expression interceptorsByTagAccess,
       jsAst.Expression leafTagsAccess) {
     return NativeGenerator.buildNativeInfoHandler(infoAccess, constructorAccess,
-                                                  subclassReadGenerator,
-                                                  interceptorsByTagAccess,
-                                                  leafTagsAccess);
+        subclassReadGenerator, interceptorsByTagAccess, leafTagsAccess);
   }
 
   jsAst.ObjectInitializer generateInterceptedNamesSet() {
@@ -451,12 +426,12 @@
   bool _isNativeTypeNeedingReflectionName(Element element) {
     if (!element.isClass) return false;
     return (element == coreClasses.intClass ||
-            element == coreClasses.doubleClass ||
-            element == coreClasses.numClass ||
-            element == coreClasses.stringClass ||
-            element == coreClasses.boolClass ||
-            element == coreClasses.nullClass ||
-            element == coreClasses.listClass);
+        element == coreClasses.doubleClass ||
+        element == coreClasses.numClass ||
+        element == coreClasses.stringClass ||
+        element == coreClasses.boolClass ||
+        element == coreClasses.nullClass ||
+        element == coreClasses.listClass);
   }
 
   /// Returns the "reflection name" of an [Element] or [Selector].
@@ -474,12 +449,11 @@
     String name = elementOrSelector.name;
     if (backend.shouldRetainName(name) ||
         elementOrSelector is Element &&
-        // Make sure to retain names of unnamed constructors, and
-        // for common native types.
-        ((name == '' &&
-          backend.isAccessibleByReflection(elementOrSelector)) ||
-         _isNativeTypeNeedingReflectionName(elementOrSelector))) {
-
+            // Make sure to retain names of unnamed constructors, and
+            // for common native types.
+            ((name == '' &&
+                    backend.isAccessibleByReflection(elementOrSelector)) ||
+                _isNativeTypeNeedingReflectionName(elementOrSelector))) {
       // TODO(ahe): Enable the next line when I can tell the difference between
       // an instance method and a global.  They may have the same mangled name.
       // if (recordedMangledNames.contains(mangledName)) return null;
@@ -489,8 +463,7 @@
     return null;
   }
 
-  String getReflectionNameInternal(elementOrSelector,
-                                   jsAst.Name mangledName) {
+  String getReflectionNameInternal(elementOrSelector, jsAst.Name mangledName) {
     String name = namer.privateName(elementOrSelector.memberName);
     if (elementOrSelector.isGetter) return name;
     if (elementOrSelector.isSetter) {
@@ -512,9 +485,9 @@
       // with each other.
       return " $name";
     }
-    if (elementOrSelector is Selector
-        || elementOrSelector.isFunction
-        || elementOrSelector.isConstructor) {
+    if (elementOrSelector is Selector ||
+        elementOrSelector.isFunction ||
+        elementOrSelector.isConstructor) {
       int positionalParameterCount;
       String namedArguments = '';
       bool isConstructor = false;
@@ -560,8 +533,8 @@
     } else if (element.isTypedef) {
       return element.name;
     }
-    throw reporter.internalError(element,
-        'Do not know how to reflect on this $element.');
+    throw reporter.internalError(
+        element, 'Do not know how to reflect on this $element.');
   }
 
   String namedParametersAsReflectionNames(CallStructure structure) {
@@ -570,43 +543,45 @@
     return ':$names';
   }
 
-  jsAst.Statement buildCspPrecompiledFunctionFor(
-      OutputUnit outputUnit) {
-    if (compiler.useContentSecurityPolicy) {
+  jsAst.Statement buildCspPrecompiledFunctionFor(OutputUnit outputUnit) {
+    if (compiler.options.useContentSecurityPolicy) {
       // TODO(ahe): Compute a hash code.
       // TODO(sigurdm): Avoid this precompiled function. Generated
       // constructor-functions and getter/setter functions can be stored in the
       // library-description table. Setting properties on these can be moved to
       // finishClasses.
-      return js.statement(r"""
+      return js.statement(
+          r"""
         #precompiled = function ($collectedClasses$) {
           #norename;
           var $desc;
           #functions;
           return #result;
         };""",
-        {'norename': new jsAst.Comment("// ::norenaming:: "),
-         'precompiled': generateEmbeddedGlobalAccess(embeddedNames.PRECOMPILED),
-         'functions': cspPrecompiledFunctionFor(outputUnit),
-         'result': new jsAst.ArrayInitializer(
-               cspPrecompiledConstructorNamesFor(outputUnit))});
+          {
+            'norename': new jsAst.Comment("// ::norenaming:: "),
+            'precompiled':
+                generateEmbeddedGlobalAccess(embeddedNames.PRECOMPILED),
+            'functions': cspPrecompiledFunctionFor(outputUnit),
+            'result': new jsAst.ArrayInitializer(
+                cspPrecompiledConstructorNamesFor(outputUnit))
+          });
     } else {
       return js.comment("Constructors are generated at runtime.");
     }
   }
 
-  void assembleClass(Class cls, ClassBuilder enclosingBuilder,
-                     Fragment fragment) {
+  void assembleClass(
+      Class cls, ClassBuilder enclosingBuilder, Fragment fragment) {
     ClassElement classElement = cls.element;
     reporter.withCurrentElement(classElement, () {
-      if (compiler.hasIncrementalSupport) {
+      if (compiler.options.hasIncrementalSupport) {
         ClassBuilder cachedBuilder =
             cachedClassBuilders.putIfAbsent(classElement, () {
-              ClassBuilder builder =
-                  new ClassBuilder.forClass(classElement, namer);
-              classEmitter.emitClass(cls, builder, fragment);
-              return builder;
-            });
+          ClassBuilder builder = new ClassBuilder.forClass(classElement, namer);
+          classEmitter.emitClass(cls, builder, fragment);
+          return builder;
+        });
         invariant(classElement, cachedBuilder.fields.isEmpty);
         invariant(classElement, cachedBuilder.superName == null);
         invariant(classElement, cachedBuilder.functionType == null);
@@ -618,8 +593,8 @@
     });
   }
 
-  void assembleStaticFunctions(Iterable<Method> staticFunctions,
-                               Fragment fragment) {
+  void assembleStaticFunctions(
+      Iterable<Method> staticFunctions, Fragment fragment) {
     if (staticFunctions == null) return;
 
     for (Method method in staticFunctions) {
@@ -629,17 +604,18 @@
       if (element == null) continue;
       ClassBuilder builder = new ClassBuilder.forStatics(element, namer);
       containerBuilder.addMemberMethod(method, builder);
-      getElementDescriptor(element, fragment).properties
+      getElementDescriptor(element, fragment)
+          .properties
           .addAll(builder.properties);
     }
   }
 
   jsAst.Statement buildStaticNonFinalFieldInitializations(
       OutputUnit outputUnit) {
-    jsAst.Statement buildInitialization(Element element,
-                                       jsAst.Expression initialValue) {
+    jsAst.Statement buildInitialization(
+        Element element, jsAst.Expression initialValue) {
       return js.statement('${namer.staticStateHolder}.# = #',
-                          [namer.globalPropertyName(element), initialValue]);
+          [namer.globalPropertyName(element), initialValue]);
     }
 
     bool inMainUnit = (outputUnit == compiler.deferredLoadTask.mainOutputUnit);
@@ -663,7 +639,7 @@
       // variables, so that `isolateProperties` stays a fast object.
       outputStaticNonFinalFieldLists.forEach(
           (OutputUnit fieldsOutputUnit, Iterable<VariableElement> fields) {
-        if (fieldsOutputUnit == outputUnit) return;  // Skip the main unit.
+        if (fieldsOutputUnit == outputUnit) return; // Skip the main unit.
         for (Element element in fields) {
           reporter.withCurrentElement(element, () {
             parts.add(buildInitialization(element, jsAst.number(0)));
@@ -676,12 +652,14 @@
   }
 
   jsAst.Statement buildLazilyInitializedStaticFields(
-      Iterable<StaticField> lazyFields, {bool isMainFragment: true}) {
+      Iterable<StaticField> lazyFields,
+      {bool isMainFragment: true}) {
     if (lazyFields.isNotEmpty) {
       needsLazyInitializer = true;
       List<jsAst.Expression> laziesInfo =
           buildLaziesInfo(lazyFields, isMainFragment);
-      return js.statement('''
+      return js.statement(
+          '''
       (function(lazies) {
         for (var i = 0; i < lazies.length; ) {
           var fieldName = lazies[i++];
@@ -712,11 +690,14 @@
           }
         }
       })(#laziesInfo)
-      ''', {'notMinified': !compiler.enableMinification,
+      ''',
+          {
+            'notMinified': !compiler.options.enableMinification,
             'laziesInfo': new jsAst.ArrayInitializer(laziesInfo),
             'lazy': js(lazyInitializerName),
             'isMainFragment': isMainFragment,
-            'isDeferredFragment': !isMainFragment});
+            'isDeferredFragment': !isMainFragment
+          });
     } else {
       return js.comment("No lazy statics.");
     }
@@ -729,7 +710,7 @@
       laziesInfo.add(js.quoteName(field.name));
       laziesInfo.add(js.quoteName(namer.deriveLazyInitializerName(field.name)));
       laziesInfo.add(field.code);
-      if (!compiler.enableMinification) {
+      if (!compiler.options.enableMinification) {
         laziesInfo.add(js.quoteName(field.name));
       }
       if (!isMainFragment) {
@@ -740,8 +721,8 @@
   }
 
   // TODO(sra): Remove this unused function.
-  jsAst.Expression buildLazilyInitializedStaticField(
-      VariableElement element, {String isolateProperties}) {
+  jsAst.Expression buildLazilyInitializedStaticField(VariableElement element,
+      {String isolateProperties}) {
     jsAst.Expression code = backend.generatedCode[element];
     // The code is null if we ended up not needing the lazily
     // initialized field after all because of constant folding
@@ -755,28 +736,31 @@
     if (isolateProperties != null) {
       // This is currently only used in incremental compilation to patch
       // in new lazy values.
-      return js('#(#,#,#,#,#)',
-          [js(lazyInitializerName),
-           js.quoteName(namer.globalPropertyName(element)),
-           js.quoteName(namer.lazyInitializerName(element)),
-           code,
-           js.string(element.name),
-           isolateProperties]);
+      return js('#(#,#,#,#,#)', [
+        js(lazyInitializerName),
+        js.quoteName(namer.globalPropertyName(element)),
+        js.quoteName(namer.lazyInitializerName(element)),
+        code,
+        js.string(element.name),
+        isolateProperties
+      ]);
     }
 
-    if (compiler.enableMinification) {
-      return js('#(#,#,#)',
-          [js(lazyInitializerName),
-           js.quoteName(namer.globalPropertyName(element)),
-           js.quoteName(namer.lazyInitializerName(element)),
-           code]);
+    if (compiler.options.enableMinification) {
+      return js('#(#,#,#)', [
+        js(lazyInitializerName),
+        js.quoteName(namer.globalPropertyName(element)),
+        js.quoteName(namer.lazyInitializerName(element)),
+        code
+      ]);
     } else {
-      return js('#(#,#,#,#)',
-          [js(lazyInitializerName),
-           js.quoteName(namer.globalPropertyName(element)),
-           js.quoteName(namer.lazyInitializerName(element)),
-           code,
-           js.string(element.name)]);
+      return js('#(#,#,#,#)', [
+        js(lazyInitializerName),
+        js.quoteName(namer.globalPropertyName(element)),
+        js.quoteName(namer.lazyInitializerName(element)),
+        code,
+        js.string(element.name)
+      ]);
     }
   }
 
@@ -791,27 +775,27 @@
       jsAst.Expression typesAccess =
           generateEmbeddedGlobalAccess(embeddedNames.TYPES);
 
-      parts..add(js.statement('# = #;', [metadataAccess, program.metadata]))
-           ..add(js.statement('# = #;', [typesAccess, types]));
+      parts
+        ..add(js.statement('# = #;', [metadataAccess, program.metadata]))
+        ..add(js.statement('# = #;', [typesAccess, types]));
     } else if (types != null) {
-      parts.add(js.statement('var ${namer.deferredTypesName} = #;',
-                             types));
+      parts.add(js.statement('var ${namer.deferredTypesName} = #;', types));
     }
     return new jsAst.Block(parts);
   }
 
   jsAst.Statement buildCompileTimeConstants(List<Constant> constants,
-                                           {bool isMainFragment}) {
+      {bool isMainFragment}) {
     assert(isMainFragment != null);
 
     if (constants.isEmpty) return js.comment("No constants in program.");
     List<jsAst.Statement> parts = <jsAst.Statement>[];
-    if (compiler.hasIncrementalSupport && isMainFragment) {
+    if (compiler.options.hasIncrementalSupport && isMainFragment) {
       parts = cachedEmittedConstantsAst;
     }
     for (Constant constant in constants) {
       ConstantValue constantValue = constant.value;
-      if (compiler.hasIncrementalSupport && isMainFragment) {
+      if (compiler.options.hasIncrementalSupport && isMainFragment) {
         if (cachedEmittedConstants.contains(constantValue)) continue;
         cachedEmittedConstants.add(constantValue);
       }
@@ -823,9 +807,11 @@
 
   jsAst.Statement buildConstantInitializer(ConstantValue constant) {
     jsAst.Name name = namer.constantName(constant);
-    jsAst.Statement initializer = js.statement('#.# = #',
-                        [namer.globalObjectForConstant(constant), name,
-                         constantInitializerExpression(constant)]);
+    jsAst.Statement initializer = js.statement('#.# = #', [
+      namer.globalObjectForConstant(constant),
+      name,
+      constantInitializerExpression(constant)
+    ]);
     compiler.dumpInfoTask.registerConstantAst(constant, initializer);
     return initializer;
   }
@@ -837,7 +823,8 @@
 
   jsAst.Statement buildMakeConstantList(bool outputContainsConstantList) {
     if (outputContainsConstantList) {
-      return js.statement(r'''
+      return js.statement(
+          r'''
           // Functions are stored in the hidden class and not as properties in
           // the object. We never actually look at the value, but only want
           // to know if the property exists.
@@ -854,13 +841,12 @@
 
   jsAst.Statement buildFunctionThatReturnsNull() {
     return js.statement('#.# = function() {}',
-                        [namer.isolateName,
-                         backend.rtiEncoder.getFunctionThatReturnsNullName]);
+        [namer.isolateName, backend.rtiEncoder.getFunctionThatReturnsNullName]);
   }
 
   jsAst.Expression generateFunctionThatReturnsNull() {
-    return js("#.#", [namer.isolateName,
-                      backend.rtiEncoder.getFunctionThatReturnsNullName]);
+    return js("#.#",
+        [namer.isolateName, backend.rtiEncoder.getFunctionThatReturnsNullName]);
   }
 
   buildMain(jsAst.Statement invokeMain) {
@@ -869,23 +855,25 @@
     List<jsAst.Statement> parts = <jsAst.Statement>[];
 
     if (NativeGenerator.needsIsolateAffinityTagInitialization(backend)) {
-      parts.add(
-          NativeGenerator.generateIsolateAffinityTagInitialization(
-              backend,
-              generateEmbeddedGlobalAccess,
-              js("""
+      parts.add(NativeGenerator.generateIsolateAffinityTagInitialization(
+          backend,
+          generateEmbeddedGlobalAccess,
+          js(
+              """
         // On V8, the 'intern' function converts a string to a symbol, which
         // makes property access much faster.
         function (s) {
           var o = {};
           o[s] = 1;
           return Object.keys(convertToFastObject(o))[0];
-        }""", [])));
+        }""",
+              [])));
     }
 
-    parts..add(js.comment('BEGIN invoke [main].'))
-         ..add(invokeMain)
-         ..add(js.comment('END invoke [main].'));
+    parts
+      ..add(js.comment('BEGIN invoke [main].'))
+      ..add(invokeMain)
+      ..add(js.comment('END invoke [main].'));
 
     return new jsAst.Block(parts);
   }
@@ -906,7 +894,8 @@
     jsAst.Expression laziesAccess =
         generateEmbeddedGlobalAccess(embeddedNames.LAZIES);
 
-    return js.statement('''
+    return js.statement(
+        '''
       function init() {
         $isolatePropertiesName = Object.create(null);
         #allClasses = map();
@@ -1016,20 +1005,24 @@
           return Isolate;
       }
 
-      }''', {'allClasses': allClassesAccess,
-            'getTypeFromName': getTypeFromNameAccess,
-            'interceptorsByTag': interceptorsByTagAccess,
-            'leafTags': leafTagsAccess,
-            'finishedClasses': finishedClassesAccess,
-            'needsLazyInitializer': needsLazyInitializer,
-            'lazies': laziesAccess, 'cyclicThrow': cyclicThrow,
-            'isolatePropertiesName': namer.isolatePropertiesName,
-            'outputContainsConstantList': outputContainsConstantList,
-            'makeConstListProperty': makeConstListProperty,
-            'functionThatReturnsNullProperty':
-                backend.rtiEncoder.getFunctionThatReturnsNullName,
-            'hasIncrementalSupport': compiler.hasIncrementalSupport,
-            'lazyInitializerProperty': lazyInitializerProperty,});
+      }''',
+        {
+          'allClasses': allClassesAccess,
+          'getTypeFromName': getTypeFromNameAccess,
+          'interceptorsByTag': interceptorsByTagAccess,
+          'leafTags': leafTagsAccess,
+          'finishedClasses': finishedClassesAccess,
+          'needsLazyInitializer': needsLazyInitializer,
+          'lazies': laziesAccess,
+          'cyclicThrow': cyclicThrow,
+          'isolatePropertiesName': namer.isolatePropertiesName,
+          'outputContainsConstantList': outputContainsConstantList,
+          'makeConstListProperty': makeConstListProperty,
+          'functionThatReturnsNullProperty':
+              backend.rtiEncoder.getFunctionThatReturnsNullName,
+          'hasIncrementalSupport': compiler.options.hasIncrementalSupport,
+          'lazyInitializerProperty': lazyInitializerProperty,
+        });
   }
 
   jsAst.Statement buildConvertToFastObjectFunction() {
@@ -1048,7 +1041,8 @@
         }'''));
     }
 
-    return js.statement(r'''
+    return js.statement(
+        r'''
       function convertToFastObject(properties) {
         // Create an instance that uses 'properties' as prototype. This should
         // make 'properties' a fast object.
@@ -1057,7 +1051,8 @@
         new MyClass();
         #;
         return properties;
-      }''', [debugCode]);
+      }''',
+        [debugCode]);
   }
 
   jsAst.Statement buildConvertToSlowObjectFunction() {
@@ -1074,7 +1069,7 @@
   jsAst.Statement buildSupportsDirectProtoAccess() {
     jsAst.Statement supportsDirectProtoAccess;
 
-    if (compiler.hasIncrementalSupport) {
+    if (compiler.options.hasIncrementalSupport) {
       supportsDirectProtoAccess = js.statement(r'''
         var supportsDirectProtoAccess = false;
       ''');
@@ -1093,20 +1088,19 @@
     return supportsDirectProtoAccess;
   }
 
-  jsAst.Expression generateLibraryDescriptor(LibraryElement library,
-                                             Fragment fragment) {
+  jsAst.Expression generateLibraryDescriptor(
+      LibraryElement library, Fragment fragment) {
     var uri = "";
-    if (!compiler.enableMinification || backend.mustPreserveUris) {
+    if (!compiler.options.enableMinification || backend.mustPreserveUris) {
       uri = library.canonicalUri;
-      if (uri.scheme == 'file' && compiler.outputUri != null) {
-        uri = relativize(compiler.outputUri, library.canonicalUri, false);
+      if (uri.scheme == 'file' && compiler.options.outputUri != null) {
+        uri =
+            relativize(compiler.options.outputUri, library.canonicalUri, false);
       }
     }
 
-    String libraryName =
-        (!compiler.enableMinification || backend.mustRetainLibraryNames) ?
-        library.libraryName :
-        "";
+    String libraryName = (!compiler.options.enableMinification ||
+        backend.mustRetainLibraryNames) ? library.libraryName : "";
 
     jsAst.Fun metadata = task.metadataCollector.buildMetadataFunction(library);
 
@@ -1127,11 +1121,12 @@
     compiler.dumpInfoTask.registerElementAst(library, initializer);
 
     List<jsAst.Expression> parts = <jsAst.Expression>[];
-    parts..add(js.string(libraryName))
-         ..add(js.string(uri.toString()))
-         ..add(metadata == null ? new jsAst.ArrayHole() : metadata)
-         ..add(js('#', namer.globalObjectFor(library)))
-         ..add(initializer);
+    parts
+      ..add(js.string(libraryName))
+      ..add(js.string(uri.toString()))
+      ..add(metadata == null ? new jsAst.ArrayHole() : metadata)
+      ..add(js('#', namer.globalObjectFor(library)))
+      ..add(initializer);
     if (library == compiler.mainApp) {
       parts.add(js.number(1));
     }
@@ -1139,12 +1134,13 @@
     return new jsAst.ArrayInitializer(parts);
   }
 
-  void assemblePrecompiledConstructor(OutputUnit outputUnit,
-                                      jsAst.Name constructorName,
-                                      jsAst.Expression constructorAst,
-                                      List<jsAst.Name> fields) {
-    cspPrecompiledFunctionFor(outputUnit).add(
-        new jsAst.FunctionDeclaration(constructorName, constructorAst));
+  void assemblePrecompiledConstructor(
+      OutputUnit outputUnit,
+      jsAst.Name constructorName,
+      jsAst.Expression constructorAst,
+      List<jsAst.Name> fields) {
+    cspPrecompiledFunctionFor(outputUnit)
+        .add(new jsAst.FunctionDeclaration(constructorName, constructorAst));
 
     String fieldNamesProperty = FIELD_NAMES_PROPERTY_NAME;
     bool hasIsolateSupport = compiler.hasIsolateSupport;
@@ -1156,7 +1152,8 @@
       fieldNamesArray = new jsAst.LiteralNull();
     }
 
-    cspPrecompiledFunctionFor(outputUnit).add(js.statement(r'''
+    cspPrecompiledFunctionFor(outputUnit).add(js.statement(
+        r'''
         {
           #constructorName.#typeNameProperty = #constructorNameString;
           // IE does not have a name property.
@@ -1169,11 +1166,13 @@
             #constructorName.$fieldNamesProperty = #fieldNamesArray;
           }
         }''',
-        {"constructorName": constructorName,
-         "typeNameProperty": typeNameProperty,
-         "constructorNameString": js.quoteName(constructorName),
-         "hasIsolateSupport": hasIsolateSupport,
-         "fieldNamesArray": fieldNamesArray}));
+        {
+          "constructorName": constructorName,
+          "typeNameProperty": typeNameProperty,
+          "constructorNameString": js.quoteName(constructorName),
+          "hasIsolateSupport": hasIsolateSupport,
+          "fieldNamesArray": fieldNamesArray
+        }));
 
     cspPrecompiledConstructorNamesFor(outputUnit).add(js('#', constructorName));
   }
@@ -1194,10 +1193,10 @@
       jsAst.Expression typeIndex =
           task.metadataCollector.reifyType(type, ignoreTypeVariables: true);
       ClassBuilder builder = new ClassBuilder.forStatics(typedef, namer);
-      builder.addPropertyByName(embeddedNames.TYPEDEF_TYPE_PROPERTY_NAME,
-                                typeIndex);
-      builder.addPropertyByName(embeddedNames.TYPEDEF_PREDICATE_PROPERTY_NAME,
-                                js.boolean(true));
+      builder.addPropertyByName(
+          embeddedNames.TYPEDEF_TYPE_PROPERTY_NAME, typeIndex);
+      builder.addPropertyByName(
+          embeddedNames.TYPEDEF_PREDICATE_PROPERTY_NAME, js.boolean(true));
 
       // We can be pretty sure that the objectClass is initialized, since
       // typedefs are only emitted with reflection, which requires lots of
@@ -1208,16 +1207,14 @@
       jsAst.Name mangledName = namer.globalPropertyName(typedef);
       String reflectionName = getReflectionName(typedef, mangledName);
       getElementDescriptor(library, mainFragment)
-          ..addProperty(mangledName, declaration)
-          ..addPropertyByName("+$reflectionName", js.string(''));
+        ..addProperty(mangledName, declaration)
+        ..addPropertyByName("+$reflectionName", js.string(''));
       // Also emit a trivial constructor for CSP mode.
       jsAst.Name constructorName = mangledName;
       jsAst.Expression constructorAst = js('function() {}');
       List<jsAst.Name> fieldNames = [];
-      assemblePrecompiledConstructor(mainOutputUnit,
-                                     constructorName,
-                                     constructorAst,
-                                     fieldNames);
+      assemblePrecompiledConstructor(
+          mainOutputUnit, constructorName, constructorAst, fieldNames);
     }
   }
 
@@ -1236,13 +1233,12 @@
       if (isProgramSplit) {
         String template =
             "var #globalObject = #globalsHolder.#globalObject = map();";
-        parts.add(js.statement(template, {"globalObject": globalObject,
-                                          "globalsHolder": globalsHolder}));
+        parts.add(js.statement(template,
+            {"globalObject": globalObject, "globalsHolder": globalsHolder}));
       } else {
-        parts.add(js.statement("var #globalObject = map();",
-                               {"globalObject": globalObject}));
+        parts.add(js.statement(
+            "var #globalObject = map();", {"globalObject": globalObject}));
       }
-
     }
 
     return new jsAst.Block(parts);
@@ -1294,13 +1290,15 @@
        '''));
 
       for (String object in Namer.userGlobalObjects) {
-        parts.add(js.statement('''
+        parts.add(js.statement(
+            '''
           if (typeof print === "function") {
             print("Size of " + #objectString + ": "
                   + String(Object.getOwnPropertyNames(#object).length)
                   + ", fast properties " + HasFastProperties(#object));
           }
-        ''', {"object": object, "objectString": js.string(object)}));
+        ''',
+            {"object": object, "objectString": js.string(object)}));
       }
     }
 
@@ -1325,8 +1323,7 @@
     }
 
     if (!mangledGlobalFieldNames.isEmpty) {
-      List<jsAst.Name> keys = mangledGlobalFieldNames.keys.toList()
-          ..sort();
+      List<jsAst.Name> keys = mangledGlobalFieldNames.keys.toList()..sort();
       List<jsAst.Property> properties = <jsAst.Property>[];
       for (jsAst.Name key in keys) {
         jsAst.Literal value = js.string(mangledGlobalFieldNames[key]);
@@ -1343,18 +1340,17 @@
 
   void checkEverythingEmitted(Iterable<Element> elements) {
     List<Element> pendingStatics;
-    if (!compiler.hasIncrementalSupport) {
+    if (!compiler.options.hasIncrementalSupport) {
       pendingStatics =
           Elements.sortedByPosition(elements.where((e) => !e.isLibrary));
 
-      pendingStatics.forEach((element) =>
-          reporter.reportInfo(
-              element, MessageKind.GENERIC, {'text': 'Pending statics.'}));
+      pendingStatics.forEach((element) => reporter.reportInfo(
+          element, MessageKind.GENERIC, {'text': 'Pending statics.'}));
     }
 
     if (pendingStatics != null && !pendingStatics.isEmpty) {
-      reporter.internalError(pendingStatics.first,
-          'Pending statics (see above).');
+      reporter.internalError(
+          pendingStatics.first, 'Pending statics (see above).');
     }
   }
 
@@ -1386,9 +1382,10 @@
     /// variable. The deferred hunks will add their initialization to this.
     /// The semicolon is important in minified mode, without it the
     /// following parenthesis looks like a call to the object literal.
-    return js.statement('self.#deferredInitializers = '
-                        'self.#deferredInitializers || Object.create(null);',
-                        {'deferredInitializers': deferredInitializers});
+    return js.statement(
+        'self.#deferredInitializers = '
+        'self.#deferredInitializers || Object.create(null);',
+        {'deferredInitializers': deferredInitializers});
   }
 
   jsAst.Program buildOutputAstForMain(Program program,
@@ -1399,8 +1396,7 @@
 
     List<jsAst.Statement> statements = <jsAst.Statement>[];
 
-    statements..add(buildGeneratedBy())
-              ..add(js.comment(HOOKS_API_USAGE));
+    statements..add(buildGeneratedBy())..add(js.comment(HOOKS_API_USAGE));
 
     if (isProgramSplit) {
       statements.add(buildDeferredHeader());
@@ -1422,15 +1418,15 @@
     }
 
     if (descriptors.isNotEmpty) {
-      List<Element> remainingLibraries = descriptors.keys
-      .where((Element e) => e is LibraryElement)
-      .toList();
+      List<Element> remainingLibraries =
+          descriptors.keys.where((Element e) => e is LibraryElement).toList();
 
       // The remaining descriptors are only accessible through reflection.
       // The program builder does not collect libraries that only
       // contain typedefs that are used for reflection.
       for (LibraryElement element in remainingLibraries) {
-        assert(element is LibraryElement || compiler.hasIncrementalSupport);
+        assert(element is LibraryElement ||
+            compiler.options.hasIncrementalSupport);
         if (element is LibraryElement) {
           parts.add(generateLibraryDescriptor(element, mainFragment));
           descriptors.remove(element);
@@ -1441,7 +1437,8 @@
 
     // Using a named function here produces easier to read stack traces in
     // Chrome/V8.
-    statements.add(js.statement("""
+    statements.add(js.statement(
+        """
     (function() {
        // No renaming in the top-level function to save the locals for the
        // nested context where they will be used more. We have to put the
@@ -1551,47 +1548,52 @@
 
        #main;
     })();
-    """, {
-      "disableVariableRenaming": js.comment("/* ::norenaming:: */"),
-      "hasIncrementalSupport": compiler.hasIncrementalSupport,
-      "helper": js('this.#', [namer.incrementalHelperName]),
-      "schemaChange": buildSchemaChangeFunction(),
-      "addMethod": buildIncrementalAddMethod(),
-      "isProgramSplit": isProgramSplit,
-      "supportsDirectProtoAccess": buildSupportsDirectProtoAccess(),
-      "globalsHolder": globalsHolder,
-      "globalObjectSetup": buildGlobalObjectSetup(isProgramSplit),
-      "isolateName": namer.isolateName,
-      "isolatePropertiesName": js(isolatePropertiesName),
-      "initName": initName,
-      "functionThatReturnsNull": buildFunctionThatReturnsNull(),
-      "mangledNames": buildMangledNames(),
-      "setupProgram": buildSetupProgram(program, compiler, backend, namer, this),
-      "setupProgramName": setupProgramName,
-      "descriptors": descriptorsAst,
-      "cspPrecompiledFunctions": buildCspPrecompiledFunctionFor(mainOutputUnit),
-      "getInterceptorMethods": interceptorEmitter.buildGetInterceptorMethods(),
-      "oneShotInterceptors": interceptorEmitter.buildOneShotInterceptors(),
-      "makeConstantList":
-          buildMakeConstantList(program.outputContainsConstantList),
-      "compileTimeConstants":  buildCompileTimeConstants(mainFragment.constants,
-                                                         isMainFragment: true),
-      "deferredBoilerPlate": buildDeferredBoilerPlate(deferredLoadHashes),
-      "staticNonFinalInitializers": buildStaticNonFinalFieldInitializations(
-          mainOutputUnit),
-      "typeToInterceptorMap":
-          interceptorEmitter.buildTypeToInterceptorMap(program),
-      "lazyStaticFields": buildLazilyInitializedStaticFields(
-          mainFragment.staticLazilyInitializedFields),
-      "metadata": buildMetadata(program, mainOutputUnit),
-      "convertToFastObject": buildConvertToFastObjectFunction(),
-      "convertToSlowObject": buildConvertToSlowObjectFunction(),
-      "convertGlobalObjectsToFastObjects":
-          buildConvertGlobalObjectToFastObjects(),
-      "debugFastObjects": buildDebugFastObjectCode(),
-      "init": buildInitFunction(program.outputContainsConstantList),
-      "main": buildMain(mainFragment.invokeMain)
-    }));
+    """,
+        {
+          "disableVariableRenaming": js.comment("/* ::norenaming:: */"),
+          "hasIncrementalSupport": compiler.options.hasIncrementalSupport,
+          "helper": js('this.#', [namer.incrementalHelperName]),
+          "schemaChange": buildSchemaChangeFunction(),
+          "addMethod": buildIncrementalAddMethod(),
+          "isProgramSplit": isProgramSplit,
+          "supportsDirectProtoAccess": buildSupportsDirectProtoAccess(),
+          "globalsHolder": globalsHolder,
+          "globalObjectSetup": buildGlobalObjectSetup(isProgramSplit),
+          "isolateName": namer.isolateName,
+          "isolatePropertiesName": js(isolatePropertiesName),
+          "initName": initName,
+          "functionThatReturnsNull": buildFunctionThatReturnsNull(),
+          "mangledNames": buildMangledNames(),
+          "setupProgram":
+              buildSetupProgram(program, compiler, backend, namer, this),
+          "setupProgramName": setupProgramName,
+          "descriptors": descriptorsAst,
+          "cspPrecompiledFunctions":
+              buildCspPrecompiledFunctionFor(mainOutputUnit),
+          "getInterceptorMethods":
+              interceptorEmitter.buildGetInterceptorMethods(),
+          "oneShotInterceptors": interceptorEmitter.buildOneShotInterceptors(),
+          "makeConstantList":
+              buildMakeConstantList(program.outputContainsConstantList),
+          "compileTimeConstants": buildCompileTimeConstants(
+              mainFragment.constants,
+              isMainFragment: true),
+          "deferredBoilerPlate": buildDeferredBoilerPlate(deferredLoadHashes),
+          "staticNonFinalInitializers":
+              buildStaticNonFinalFieldInitializations(mainOutputUnit),
+          "typeToInterceptorMap":
+              interceptorEmitter.buildTypeToInterceptorMap(program),
+          "lazyStaticFields": buildLazilyInitializedStaticFields(
+              mainFragment.staticLazilyInitializedFields),
+          "metadata": buildMetadata(program, mainOutputUnit),
+          "convertToFastObject": buildConvertToFastObjectFunction(),
+          "convertToSlowObject": buildConvertToSlowObjectFunction(),
+          "convertGlobalObjectsToFastObjects":
+              buildConvertGlobalObjectToFastObjects(),
+          "debugFastObjects": buildDebugFastObjectCode(),
+          "init": buildInitFunction(program.outputContainsConstantList),
+          "main": buildMain(mainFragment.invokeMain)
+        }));
 
     return new jsAst.Program(statements);
   }
@@ -1604,36 +1606,34 @@
       codeOutputListeners = <CodeOutputListener>[lineColumnCollector];
     }
 
-    CodeOutput mainOutput =
-        new StreamCodeOutput(compiler.outputProvider('', 'js'),
-                             codeOutputListeners);
+    CodeOutput mainOutput = new StreamCodeOutput(
+        compiler.outputProvider('', 'js'), codeOutputListeners);
     outputBuffers[mainOutputUnit] = mainOutput;
 
+    mainOutput.addBuffer(jsAst.createCodeBuffer(program, compiler,
+        monitor: compiler.dumpInfoTask));
 
-    mainOutput.addBuffer(jsAst.createCodeBuffer(
-        program, compiler, monitor: compiler.dumpInfoTask));
-
-    if (compiler.deferredMapUri != null) {
+    if (compiler.options.deferredMapUri != null) {
       outputDeferredMap();
     }
 
     if (generateSourceMap) {
-      mainOutput.add(
-          generateSourceMapTag(compiler.sourceMapUri, compiler.outputUri));
+      mainOutput.add(generateSourceMapTag(
+          compiler.options.sourceMapUri, compiler.options.outputUri));
     }
 
     mainOutput.close();
 
     if (generateSourceMap) {
       outputSourceMap(mainOutput, lineColumnCollector, '',
-          compiler.sourceMapUri, compiler.outputUri);
+          compiler.options.sourceMapUri, compiler.options.outputUri);
     }
   }
 
   /// Used by incremental compilation to patch up the prototype of
   /// [oldConstructor] for use as prototype of [newConstructor].
   jsAst.Fun buildSchemaChangeFunction() {
-    if (!compiler.hasIncrementalSupport) return null;
+    if (!compiler.options.hasIncrementalSupport) return null;
     return js('''
 function(newConstructor, oldConstructor, superclass) {
   // Invariant: newConstructor.prototype has no interesting properties besides
@@ -1666,7 +1666,7 @@
   /// top-level). [globalFunctionsAccess] is a reference to
   /// [embeddedNames.GLOBAL_FUNCTIONS].
   jsAst.Fun buildIncrementalAddMethod() {
-    if (!compiler.hasIncrementalSupport) return null;
+    if (!compiler.options.hasIncrementalSupport) return null;
     return js(r"""
 function(originalDescriptor, name, holder, isStatic, globalFunctionsAccess) {
   var arrayOrFunction = originalDescriptor[name];
@@ -1775,8 +1775,8 @@
     return outputs;
   }
 
-  void finalizeTokensInAst(jsAst.Program main,
-                           Iterable<jsAst.Program> deferredParts) {
+  void finalizeTokensInAst(
+      jsAst.Program main, Iterable<jsAst.Program> deferredParts) {
     jsAst.TokenCounter counter = new jsAst.TokenCounter();
     counter.countTokens(main);
     deferredParts.forEach(counter.countTokens);
@@ -1795,7 +1795,7 @@
         programBuilder.collector.outputStaticNonFinalFieldLists;
     outputLibraryLists = programBuilder.collector.outputLibraryLists;
     typedefsNeededForReflection =
-       programBuilder.collector.typedefsNeededForReflection;
+        programBuilder.collector.typedefsNeededForReflection;
 
     assembleProgram(program);
 
@@ -1805,11 +1805,9 @@
 
     Map<OutputUnit, _DeferredOutputUnitHash> deferredHashTokens =
         new Map<OutputUnit, _DeferredOutputUnitHash>.fromIterables(
-          deferredParts.keys,
-          deferredParts.keys.map((OutputUnit unit) {
-            return new _DeferredOutputUnitHash(unit);
-          })
-        );
+            deferredParts.keys, deferredParts.keys.map((OutputUnit unit) {
+      return new _DeferredOutputUnitHash(unit);
+    }));
 
     jsAst.Program mainOutput =
         buildOutputAstForMain(program, deferredHashTokens);
@@ -1829,10 +1827,8 @@
     });
     emitMainOutputUnit(program.mainFragment.outputUnit, mainOutput);
 
-    if (backend.requiresPreamble &&
-        !backend.htmlLibraryIsLoaded) {
-      reporter.reportHintMessage(
-          NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE);
+    if (backend.requiresPreamble && !backend.htmlLibraryIsLoaded) {
+      reporter.reportHintMessage(NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE);
     }
     // Return the total program size.
     return outputBuffers.values.fold(0, (a, b) => a + b.length);
@@ -1857,8 +1853,7 @@
       // For static (not top level) elements, record their code in a buffer
       // specific to the class. For now, not supported for native classes and
       // native elements.
-      ClassElement cls =
-          element.enclosingClassOrCompilationUnit.declaration;
+      ClassElement cls = element.enclosingClassOrCompilationUnit.declaration;
       if (compiler.codegenWorld.directlyInstantiatedClasses.contains(cls) &&
           !backend.isNative(cls) &&
           compiler.deferredLoadTask.outputUnitForElement(element) ==
@@ -1872,8 +1867,8 @@
     return elementDescriptors
         .putIfAbsent(fragment, () => new Map<Element, ClassBuilder>())
         .putIfAbsent(owner, () {
-          return new ClassBuilder(owner, namer, owner.isClass);
-        });
+      return new ClassBuilder(owner, namer, owner.isClass);
+    });
   }
 
   /// Emits support-code for deferred loading into [output].
@@ -1881,7 +1876,8 @@
       Map<OutputUnit, _DeferredOutputUnitHash> deferredLoadHashes) {
     List<jsAst.Statement> parts = <jsAst.Statement>[];
 
-    parts.add(js.statement('''
+    parts.add(js.statement(
+        '''
         {
           // Function for checking if a hunk is loaded given its hash.
           #isHunkLoaded = function(hunkHash) {
@@ -1899,15 +1895,18 @@
             #deferredInitialized[hunkHash] = true;
           };
         }
-        ''', {"globalsHolder": globalsHolder,
-              "isHunkLoaded": generateEmbeddedGlobalAccess(
-                  embeddedNames.IS_HUNK_LOADED),
-              "isHunkInitialized": generateEmbeddedGlobalAccess(
-                  embeddedNames.IS_HUNK_INITIALIZED),
-              "initializeLoadedHunk": generateEmbeddedGlobalAccess(
-                  embeddedNames.INITIALIZE_LOADED_HUNK),
-              "deferredInitialized": generateEmbeddedGlobalAccess(
-                  embeddedNames.DEFERRED_INITIALIZED)}));
+        ''',
+        {
+          "globalsHolder": globalsHolder,
+          "isHunkLoaded":
+              generateEmbeddedGlobalAccess(embeddedNames.IS_HUNK_LOADED),
+          "isHunkInitialized":
+              generateEmbeddedGlobalAccess(embeddedNames.IS_HUNK_INITIALIZED),
+          "initializeLoadedHunk": generateEmbeddedGlobalAccess(
+              embeddedNames.INITIALIZE_LOADED_HUNK),
+          "deferredInitialized":
+              generateEmbeddedGlobalAccess(embeddedNames.DEFERRED_INITIALIZED)
+        }));
 
     // Write a javascript mapping from Deferred import load ids (derrived
     // from the import prefix.) to a list of lists of uris of hunks to load,
@@ -1917,15 +1916,15 @@
         new Map<String, List<jsAst.LiteralString>>();
     Map<String, List<_DeferredOutputUnitHash>> deferredLibraryHashes =
         new Map<String, List<_DeferredOutputUnitHash>>();
-    compiler.deferredLoadTask.hunksToLoad.forEach(
-                  (String loadId, List<OutputUnit>outputUnits) {
+    compiler.deferredLoadTask.hunksToLoad
+        .forEach((String loadId, List<OutputUnit> outputUnits) {
       List<jsAst.LiteralString> uris = new List<jsAst.LiteralString>();
       List<_DeferredOutputUnitHash> hashes =
           new List<_DeferredOutputUnitHash>();
       deferredLibraryHashes[loadId] = new List<_DeferredOutputUnitHash>();
       for (OutputUnit outputUnit in outputUnits) {
-        uris.add(js.escapedString(
-            backend.deferredPartFileName(outputUnit.name)));
+        uris.add(
+            js.escapedString(backend.deferredPartFileName(outputUnit.name)));
         hashes.add(deferredLoadHashes[outputUnit]);
       }
 
@@ -1936,8 +1935,8 @@
     void emitMapping(String name, Map<String, List<jsAst.Expression>> mapping) {
       List<jsAst.Property> properties = new List<jsAst.Property>();
       mapping.forEach((String key, List<jsAst.Expression> values) {
-        properties.add(new jsAst.Property(js.escapedString(key),
-            new jsAst.ArrayInitializer(values)));
+        properties.add(new jsAst.Property(
+            js.escapedString(key), new jsAst.ArrayInitializer(values)));
       });
       jsAst.Node initializer =
           new jsAst.ObjectInitializer(properties, isOneLiner: true);
@@ -1947,13 +1946,12 @@
     }
 
     emitMapping(embeddedNames.DEFERRED_LIBRARY_URIS, deferredLibraryUris);
-    emitMapping(embeddedNames.DEFERRED_LIBRARY_HASHES,
-                deferredLibraryHashes);
+    emitMapping(embeddedNames.DEFERRED_LIBRARY_HASHES, deferredLibraryHashes);
 
     return new jsAst.Block(parts);
   }
 
-  Map <OutputUnit, jsAst.Program> buildOutputAstForDeferredCode(
+  Map<OutputUnit, jsAst.Program> buildOutputAstForDeferredCode(
       Program program) {
     if (!program.isSplit) return const <OutputUnit, jsAst.Program>{};
 
@@ -1974,17 +1972,19 @@
 
       for (String globalObject in Namer.reservedGlobalObjectNames) {
         body.add(js.statement('var #object = #globalsHolder.#object;',
-                              {'globalsHolder': globalsHolder,
-                               'object': globalObject}));
+            {'globalsHolder': globalsHolder, 'object': globalObject}));
       }
-      body..add(js.statement('var init = #globalsHolder.init;',
-                             {'globalsHolder': globalsHolder}))
-          ..add(js.statement('var $setupProgramName = '
-                             '#globalsHolder.$setupProgramName;',
-                             {'globalsHolder': globalsHolder}))
-          ..add(js.statement('var ${namer.isolateName} = '
-                             '#globalsHolder.${namer.isolateName};',
-                             {'globalsHolder': globalsHolder}));
+      body
+        ..add(js.statement('var init = #globalsHolder.init;',
+            {'globalsHolder': globalsHolder}))
+        ..add(js.statement(
+            'var $setupProgramName = '
+            '#globalsHolder.$setupProgramName;',
+            {'globalsHolder': globalsHolder}))
+        ..add(js.statement(
+            'var ${namer.isolateName} = '
+            '#globalsHolder.${namer.isolateName};',
+            {'globalsHolder': globalsHolder}));
       String typesAccess =
           generateEmbeddedGlobalAccessString(embeddedNames.TYPES);
       if (libraryDescriptor != null) {
@@ -1993,33 +1993,37 @@
         // in stack traces and profile entries.
         body.add(js.statement('var dart = #', libraryDescriptor));
 
-        if (compiler.useContentSecurityPolicy) {
+        if (compiler.options.useContentSecurityPolicy) {
           body.add(buildCspPrecompiledFunctionFor(outputUnit));
         }
         body.add(
             js.statement('$setupProgramName(dart, ${typesAccess}.length);'));
       }
 
-      body..add(buildMetadata(program, outputUnit))
-          ..add(js.statement('${typesAccess}.push.apply(${typesAccess}, '
-                             '${namer.deferredTypesName});'));
+      body
+        ..add(buildMetadata(program, outputUnit))
+        ..add(js.statement('${typesAccess}.push.apply(${typesAccess}, '
+            '${namer.deferredTypesName});'));
 
-      body.add(buildCompileTimeConstants(fragment.constants,
-                                         isMainFragment: false));
+      body.add(
+          buildCompileTimeConstants(fragment.constants, isMainFragment: false));
       body.add(buildStaticNonFinalFieldInitializations(outputUnit));
       body.add(buildLazilyInitializedStaticFields(
-          fragment.staticLazilyInitializedFields, isMainFragment: false));
+          fragment.staticLazilyInitializedFields,
+          isMainFragment: false));
 
       List<jsAst.Statement> statements = <jsAst.Statement>[];
 
       statements
-          ..add(buildGeneratedBy())
-          ..add(buildDeferredHeader())
-          ..add(js.statement('${deferredInitializers}.current = '
-                             """function (#, ${namer.staticStateHolder}) {
+        ..add(buildGeneratedBy())
+        ..add(buildDeferredHeader())
+        ..add(js.statement(
+            '${deferredInitializers}.current = '
+            """function (#, ${namer.staticStateHolder}) {
                                   #
                                 }
-                             """, [globalsHolder, body]));
+                             """,
+            [globalsHolder, body]));
 
       result[outputUnit] = new jsAst.Program(statements);
     }
@@ -2033,7 +2037,6 @@
   /// itself.
   Map<OutputUnit, String> emitDeferredOutputUnits(
       Map<OutputUnit, jsAst.Program> outputAsts) {
-
     Map<OutputUnit, String> hunkHashes = new Map<OutputUnit, String>();
 
     for (OutputUnit outputUnit in outputAsts.keys) {
@@ -2050,13 +2053,12 @@
       String partPrefix =
           backend.deferredPartFileName(outputUnit.name, addExtension: false);
       CodeOutput output = new StreamCodeOutput(
-          compiler.outputProvider(partPrefix, 'part.js'),
-          outputListeners);
+          compiler.outputProvider(partPrefix, 'part.js'), outputListeners);
 
       outputBuffers[outputUnit] = output;
 
-      output.addBuffer(jsAst.createCodeBuffer(
-          outputAsts[outputUnit], compiler, monitor: compiler.dumpInfoTask));
+      output.addBuffer(jsAst.createCodeBuffer(outputAsts[outputUnit], compiler,
+          monitor: compiler.dumpInfoTask));
 
       // Make a unique hash of the code (before the sourcemaps are added)
       // This will be used to retrieve the initializing function from the global
@@ -2064,12 +2066,12 @@
       String hash = hasher.getHash();
 
       output.add('$N${deferredInitializers}["$hash"]$_=$_'
-                       '${deferredInitializers}.current$N');
+          '${deferredInitializers}.current$N');
 
       if (generateSourceMap) {
         Uri mapUri, partUri;
-        Uri sourceMapUri = compiler.sourceMapUri;
-        Uri outputUri = compiler.outputUri;
+        Uri sourceMapUri = compiler.options.sourceMapUri;
+        Uri outputUri = compiler.options.outputUri;
 
         String partName = "$partPrefix.part";
 
@@ -2077,20 +2079,21 @@
           String mapFileName = partName + ".js.map";
           List<String> mapSegments = sourceMapUri.pathSegments.toList();
           mapSegments[mapSegments.length - 1] = mapFileName;
-          mapUri = compiler.sourceMapUri.replace(pathSegments: mapSegments);
+          mapUri =
+              compiler.options.sourceMapUri.replace(pathSegments: mapSegments);
         }
 
         if (outputUri != null) {
           String partFileName = partName + ".js";
           List<String> partSegments = outputUri.pathSegments.toList();
           partSegments[partSegments.length - 1] = partFileName;
-          partUri = compiler.outputUri.replace(pathSegments: partSegments);
+          partUri =
+              compiler.options.outputUri.replace(pathSegments: partSegments);
         }
 
         output.add(generateSourceMapTag(mapUri, partUri));
         output.close();
-        outputSourceMap(output, lineColumnCollector, partName,
-                        mapUri, partUri);
+        outputSourceMap(output, lineColumnCollector, partName, mapUri, partUri);
       } else {
         output.close();
       }
@@ -2103,25 +2106,23 @@
   jsAst.Comment buildGeneratedBy() {
     List<String> options = [];
     if (compiler.mirrorsLibrary != null) options.add('mirrors');
-    if (compiler.useContentSecurityPolicy) options.add("CSP");
+    if (compiler.options.useContentSecurityPolicy) options.add("CSP");
     return new jsAst.Comment(generatedBy(compiler, flavor: options.join(", ")));
   }
 
-  void outputSourceMap(CodeOutput output,
-                       LineColumnProvider lineColumnProvider,
-                       String name,
-                       [Uri sourceMapUri,
-                        Uri fileUri]) {
+  void outputSourceMap(
+      CodeOutput output, LineColumnProvider lineColumnProvider, String name,
+      [Uri sourceMapUri, Uri fileUri]) {
     if (!generateSourceMap) return;
     // Create a source file for the compilation output. This allows using
     // [:getLine:] to transform offsets to line numbers in [SourceMapBuilder].
     SourceMapBuilder sourceMapBuilder =
-            new SourceMapBuilder(sourceMapUri, fileUri, lineColumnProvider);
+        new SourceMapBuilder(sourceMapUri, fileUri, lineColumnProvider);
     output.forEachSourceLocation(sourceMapBuilder.addMapping);
     String sourceMap = sourceMapBuilder.build();
     compiler.outputProvider(name, 'js.map')
-        ..add(sourceMap)
-        ..close();
+      ..add(sourceMap)
+      ..close();
   }
 
   void outputDeferredMap() {
@@ -2131,20 +2132,20 @@
     mapping["_comment"] = "This mapping shows which compiled `.js` files are "
         "needed for a given deferred library import.";
     mapping.addAll(compiler.deferredLoadTask.computeDeferredMap());
-    compiler.outputProvider(compiler.deferredMapUri.path, 'deferred_map')
-        ..add(const JsonEncoder.withIndent("  ").convert(mapping))
-        ..close();
+    compiler.outputProvider(
+        compiler.options.deferredMapUri.path, 'deferred_map')
+      ..add(const JsonEncoder.withIndent("  ").convert(mapping))
+      ..close();
   }
 
   void invalidateCaches() {
-    if (!compiler.hasIncrementalSupport) return;
+    if (!compiler.options.hasIncrementalSupport) return;
     if (cachedElements.isEmpty) return;
     for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
       if (element.isInstanceMember) {
         cachedClassBuilders.remove(element.enclosingClass);
 
         nativeEmitter.cachedBuilders.remove(element.enclosingClass);
-
       }
     }
   }
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
index 573dc34..51f06f8 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
@@ -5,18 +5,17 @@
 part of dart2js.js_emitter.full_emitter;
 
 class InterceptorEmitter extends CodeEmitterHelper {
-  final Set<jsAst.Name> interceptorInvocationNames =
-      new Set<jsAst.Name>();
+  final Set<jsAst.Name> interceptorInvocationNames = new Set<jsAst.Name>();
 
-  void recordMangledNameOfMemberMethod(FunctionElement member,
-                                       jsAst.Name name) {
+  void recordMangledNameOfMemberMethod(
+      FunctionElement member, jsAst.Name name) {
     if (backend.isInterceptedMethod(member)) {
       interceptorInvocationNames.add(name);
     }
   }
 
-  jsAst.Expression buildGetInterceptorMethod(jsAst.Name key,
-                                             Set<ClassElement> classes) {
+  jsAst.Expression buildGetInterceptorMethod(
+      jsAst.Name key, Set<ClassElement> classes) {
     InterceptorStubGenerator stubGenerator =
         new InterceptorStubGenerator(compiler, namer, backend);
     jsAst.Expression function =
@@ -35,15 +34,14 @@
 
     Map<jsAst.Name, Set<ClassElement>> specializedGetInterceptors =
         backend.specializedGetInterceptors;
-    List<jsAst.Name> names = specializedGetInterceptors.keys.toList()
-        ..sort();
+    List<jsAst.Name> names = specializedGetInterceptors.keys.toList()..sort();
     for (jsAst.Name name in names) {
       Set<ClassElement> classes = specializedGetInterceptors[name];
-      parts.add(
-          js.statement('#.# = #',
-              [namer.globalObjectFor(backend.helpers.interceptorsLibrary),
-               name,
-               buildGetInterceptorMethod(name, classes)]));
+      parts.add(js.statement('#.# = #', [
+        namer.globalObjectFor(backend.helpers.interceptorsLibrary),
+        name,
+        buildGetInterceptorMethod(name, classes)
+      ]));
     }
 
     return new jsAst.Block(parts);
@@ -52,7 +50,7 @@
   jsAst.Statement buildOneShotInterceptors() {
     List<jsAst.Statement> parts = <jsAst.Statement>[];
     Iterable<jsAst.Name> names = backend.oneShotInterceptors.keys.toList()
-        ..sort();
+      ..sort();
 
     InterceptorStubGenerator stubGenerator =
         new InterceptorStubGenerator(compiler, namer, backend);
@@ -81,7 +79,8 @@
     if (!compiler.enabledInvokeOn) return null;
 
     Iterable<jsAst.Name> invocationNames = interceptorInvocationNames.toList()
-        ..sort();;
+      ..sort();
+    ;
     List<jsAst.Property> properties = invocationNames.map((jsAst.Name name) {
       return new jsAst.Property(js.quoteName(name), js.number(1));
     }).toList();
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/nsm_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/nsm_emitter.dart
index f8911bd..906eb73 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/nsm_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/nsm_emitter.dart
@@ -19,22 +19,20 @@
   static const MAX_MINIFIED_LENGTH_FOR_DIFF_ENCODING = 4;
 
   void emitNoSuchMethodHandlers(AddPropertyFunction addProperty) {
-
     ClassStubGenerator generator =
         new ClassStubGenerator(compiler, namer, backend);
 
     // Keep track of the JavaScript names we've already added so we
     // do not introduce duplicates (bad for code size).
-    Map<jsAst.Name, Selector> addedJsNames
-        = generator.computeSelectorsForNsmHandlers();
+    Map<jsAst.Name, Selector> addedJsNames =
+        generator.computeSelectorsForNsmHandlers();
 
     // Set flag used by generateMethod helper below.  If we have very few
     // handlers we use addProperty for them all, rather than try to generate
     // them at runtime.
     bool haveVeryFewNoSuchMemberHandlers =
         (addedJsNames.length < VERY_FEW_NO_SUCH_METHOD_HANDLERS);
-    List<jsAst.Name> names = addedJsNames.keys.toList()
-        ..sort();
+    List<jsAst.Name> names = addedJsNames.keys.toList()..sort();
     for (jsAst.Name jsName in names) {
       Selector selector = addedJsNames[jsName];
       String reflectionName = emitter.getReflectionName(selector, jsName);
@@ -43,9 +41,10 @@
         emitter.mangledFieldNames[jsName] = reflectionName;
       }
 
-      List<jsAst.Expression> argNames =
-          selector.callStructure.getOrderedNamedArguments().map((String name) =>
-              js.string(name)).toList();
+      List<jsAst.Expression> argNames = selector.callStructure
+          .getOrderedNamedArguments()
+          .map((String name) => js.string(name))
+          .toList();
       int type = selector.invocationMirrorKind;
       if (!haveVeryFewNoSuchMemberHandlers &&
           isTrivialNsmHandler(type, argNames, selector, jsName) &&
@@ -56,11 +55,11 @@
             generator.generateStubForNoSuchMethod(jsName, selector);
         addProperty(method.name, method.code);
         if (reflectionName != null) {
-          bool accessible =
-              compiler.world.allFunctions.filter(selector, null).any(
-              (Element e) => backend.isAccessibleByReflection(e));
-          addProperty(namer.asName('+$reflectionName'),
-                      js(accessible ? '2' : '0'));
+          bool accessible = compiler.world.allFunctions
+              .filter(selector, null)
+              .any((Element e) => backend.isAccessibleByReflection(e));
+          addProperty(
+              namer.asName('+$reflectionName'), js(accessible ? '2' : '0'));
         }
       }
     }
@@ -122,15 +121,15 @@
     List<jsAst.Statement> statements = <jsAst.Statement>[];
     if (trivialNsmHandlers.length == 0) return statements;
 
-    bool minify = compiler.enableMinification;
+    bool minify = compiler.options.enableMinification;
     bool useDiffEncoding = minify && trivialNsmHandlers.length > 30;
 
     // Find out how many selectors there are with the special calling
     // convention.
-    Iterable<Selector> interceptedSelectors = trivialNsmHandlers.where(
-            (Selector s) => backend.isInterceptedName(s.name));
-    Iterable<Selector> ordinarySelectors = trivialNsmHandlers.where(
-            (Selector s) => !backend.isInterceptedName(s.name));
+    Iterable<Selector> interceptedSelectors = trivialNsmHandlers
+        .where((Selector s) => backend.isInterceptedName(s.name));
+    Iterable<Selector> ordinarySelectors = trivialNsmHandlers
+        .where((Selector s) => !backend.isInterceptedName(s.name));
 
     // Get the short names (JS names, perhaps minified).
     Iterable<jsAst.Name> interceptedShorts =
@@ -142,20 +141,19 @@
     Iterable<String> sortedLongs;
     if (useDiffEncoding) {
       assert(minify);
-      sortedShorts = new _DiffEncodedListOfNames(
-          [interceptedShorts, ordinaryShorts]);
+      sortedShorts =
+          new _DiffEncodedListOfNames([interceptedShorts, ordinaryShorts]);
     } else {
       Iterable<Selector> sorted =
           [interceptedSelectors, ordinarySelectors].expand((e) => (e));
       sortedShorts = js.concatenateStrings(
-          js.joinLiterals(
-              sorted.map(namer.invocationMirrorInternalName),
+          js.joinLiterals(sorted.map(namer.invocationMirrorInternalName),
               js.stringPart(",")),
           addQuotes: true);
 
       if (!minify) {
-        sortedLongs = sorted.map((selector) =>
-            selector.invocationMirrorMemberName);
+        sortedLongs =
+            sorted.map((selector) => selector.invocationMirrorMemberName);
       }
     }
     // Startup code that loops over the method names and puts handlers on the
@@ -164,7 +162,8 @@
     jsAst.Expression createInvocationMirror = backend.emitter
         .staticFunctionAccess(backend.helpers.createInvocationMirror);
     if (useDiffEncoding) {
-      statements.add(js.statement('''{
+      statements.add(js.statement(
+          '''{
           var objectClassObject = processedClasses.collected[#objectClass],
               nameSequences = #diffEncoding.split("."),
               shortNames = [];
@@ -204,32 +203,37 @@
               Array.prototype.push.apply(shortNames, sequence.shift());
             }
           }
-        }''', {'objectClass': js.quoteName(namer.className(objectClass)),
-               'diffEncoding': sortedShorts}));
+        }''',
+          {
+            'objectClass': js.quoteName(namer.className(objectClass)),
+            'diffEncoding': sortedShorts
+          }));
     } else {
       // No useDiffEncoding version.
       statements.add(js.statement(
           'var objectClassObject = processedClasses.collected[#objectClass],'
           '    shortNames = #diffEncoding.split(",")',
-          {'objectClass': js.quoteName(namer.className(objectClass)),
-           'diffEncoding': sortedShorts}));
+          {
+            'objectClass': js.quoteName(namer.className(objectClass)),
+            'diffEncoding': sortedShorts
+          }));
       if (!minify) {
         statements.add(js.statement('var longNames = #longs.split(",")',
-                {'longs': js.string(sortedLongs.join(','))}));
+            {'longs': js.string(sortedLongs.join(','))}));
       }
-      statements.add(js.statement(
-          'if (objectClassObject instanceof Array)'
+      statements.add(js.statement('if (objectClassObject instanceof Array)'
           '  objectClassObject = objectClassObject[1];'));
     }
 
-    dynamic isIntercepted =  // jsAst.Expression or bool.
+    dynamic isIntercepted = // jsAst.Expression or bool.
         interceptedSelectors.isEmpty
         ? false
         : ordinarySelectors.isEmpty
             ? true
             : js('j < #', js.number(interceptedSelectors.length));
 
-    statements.add(js.statement('''
+    statements.add(js.statement(
+        '''
       // If we are loading a deferred library the object class will not be in
       // the collectedClasses so objectClassObject is undefined, and we skip
       // setting up the names.
@@ -276,11 +280,13 @@
                  })(#names[j], shortName, type);
           }
         }
-      }''', {
+      }''',
+        {
           'noSuchMethodName': namer.noSuchMethodName,
           'createInvocationMirror': createInvocationMirror,
           'names': minify ? 'shortNames' : 'longNames',
-          'isIntercepted': isIntercepted}));
+          'isIntercepted': isIntercepted
+        }));
 
     return statements;
   }
@@ -291,7 +297,7 @@
 ///
 /// See [buildTrivialNsmHandlers].
 class _DiffEncodedListOfNames extends jsAst.DeferredString
-                              implements jsAst.AstContainer {
+    implements jsAst.AstContainer {
   String _cachedValue;
   List<jsAst.ArrayInitializer> ast;
 
@@ -300,12 +306,13 @@
   _DiffEncodedListOfNames(Iterable<Iterable<jsAst.Name>> names) {
     // Store the names in ArrayInitializer nodes to make them discoverable
     // by traversals of the ast.
-    ast = names.map((Iterable i) => new jsAst.ArrayInitializer(i.toList()))
-               .toList();
+    ast = names
+        .map((Iterable i) => new jsAst.ArrayInitializer(i.toList()))
+        .toList();
   }
 
-  void _computeDiffEncodingForList(Iterable<jsAst.Name> names,
-                                   StringBuffer diffEncoding) {
+  void _computeDiffEncodingForList(
+      Iterable<jsAst.Name> names, StringBuffer diffEncoding) {
     // Treat string as a number in base 88 with digits in ASCII order from # to
     // z.  The short name sorting is based on length, and uses ASCII order for
     // equal length strings so this means that names are ascending.  The hash
@@ -344,10 +351,8 @@
       return a.compareTo(b);
     }
 
-    List<String> shorts =
-        names.map((jsAst.Name name) => name.name)
-        .toList()
-        ..sort(compare);
+    List<String> shorts = names.map((jsAst.Name name) => name.name).toList()
+      ..sort(compare);
 
     int previous = 0;
     for (String short in shorts) {
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
index ecd8a4b..3eb4c8c 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
@@ -16,21 +16,18 @@
 
 const RANGE1_SIZE = RANGE1_LAST - RANGE1_FIRST + 1;
 const RANGE2_SIZE = RANGE2_LAST - RANGE2_FIRST + 1;
-const RANGE1_ADJUST = - (FIRST_FIELD_CODE - RANGE1_FIRST);
-const RANGE2_ADJUST = - (FIRST_FIELD_CODE + RANGE1_SIZE - RANGE2_FIRST);
+const RANGE1_ADJUST = -(FIRST_FIELD_CODE - RANGE1_FIRST);
+const RANGE2_ADJUST = -(FIRST_FIELD_CODE + RANGE1_SIZE - RANGE2_FIRST);
 const RANGE3_ADJUST =
-    - (FIRST_FIELD_CODE + RANGE1_SIZE + RANGE2_SIZE - RANGE3_FIRST);
+    -(FIRST_FIELD_CODE + RANGE1_SIZE + RANGE2_SIZE - RANGE3_FIRST);
 
-const String setupProgramName ='setupProgram';
+const String setupProgramName = 'setupProgram';
 // TODO(floitsch): make sure this property can't clash with anything. It's
 //   unlikely since it lives on types, but still.
 const String typeNameProperty = r'builtin$cls';
 
 jsAst.Statement buildSetupProgram(Program program, Compiler compiler,
-                                JavaScriptBackend backend,
-                                Namer namer,
-                                Emitter emitter) {
-
+    JavaScriptBackend backend, Namer namer, Emitter emitter) {
   jsAst.Expression typeInformationAccess =
       emitter.generateEmbeddedGlobalAccess(embeddedNames.TYPE_INFORMATION);
   jsAst.Expression globalFunctionsAccess =
@@ -61,15 +58,12 @@
       emitter.generateEmbeddedGlobalAccess(embeddedNames.INTERCEPTORS_BY_TAG);
   jsAst.Expression leafTagsAccess =
       emitter.generateEmbeddedGlobalAccess(embeddedNames.LEAF_TAGS);
-  jsAst.Expression initializeEmptyInstanceAccess =
-      emitter.generateEmbeddedGlobalAccess(
-            embeddedNames.INITIALIZE_EMPTY_INSTANCE);
-  jsAst.Expression classFieldsExtractorAccess =
-      emitter.generateEmbeddedGlobalAccess(
-          embeddedNames.CLASS_FIELDS_EXTRACTOR);
-  jsAst.Expression instanceFromClassIdAccess =
-      emitter.generateEmbeddedGlobalAccess(
-          embeddedNames.INSTANCE_FROM_CLASS_ID);
+  jsAst.Expression initializeEmptyInstanceAccess = emitter
+      .generateEmbeddedGlobalAccess(embeddedNames.INITIALIZE_EMPTY_INSTANCE);
+  jsAst.Expression classFieldsExtractorAccess = emitter
+      .generateEmbeddedGlobalAccess(embeddedNames.CLASS_FIELDS_EXTRACTOR);
+  jsAst.Expression instanceFromClassIdAccess = emitter
+      .generateEmbeddedGlobalAccess(embeddedNames.INSTANCE_FROM_CLASS_ID);
 
   String reflectableField = namer.reflectableField;
   String reflectionInfoField = namer.reflectionInfoField;
@@ -81,72 +75,76 @@
   String unmangledNameIndex = backend.mustRetainMetadata
       ? ' 3 * optionalParameterCount + 2 * requiredParameterCount + 3'
       : ' 2 * optionalParameterCount + requiredParameterCount + 3';
-  String receiverParamName = compiler.enableMinification ? "r" : "receiver";
-  String valueParamName = compiler.enableMinification ? "v" : "value";
-  String space = compiler.enableMinification ? "" : " ";
+  String receiverParamName =
+      compiler.options.enableMinification ? "r" : "receiver";
+  String valueParamName = compiler.options.enableMinification ? "v" : "value";
+  String space = compiler.options.enableMinification ? "" : " ";
   String _ = space;
 
-  String specProperty = '"${namer.nativeSpecProperty}"';  // "%"
+  String specProperty = '"${namer.nativeSpecProperty}"'; // "%"
   jsAst.Expression nativeInfoAccess = js('prototype[$specProperty]', []);
   jsAst.Expression constructorAccess = js('constructor', []);
   Function subclassReadGenerator =
       (jsAst.Expression subclass) => js('allClasses[#]', subclass);
-  jsAst.Statement nativeInfoHandler = emitter.
-      buildNativeInfoHandler(nativeInfoAccess, constructorAccess,
-                             subclassReadGenerator, interceptorsByTagAccess,
-                             leafTagsAccess);
+  jsAst.Statement nativeInfoHandler = emitter.buildNativeInfoHandler(
+      nativeInfoAccess,
+      constructorAccess,
+      subclassReadGenerator,
+      interceptorsByTagAccess,
+      leafTagsAccess);
 
-  Map<String, dynamic> holes =
-    {'needsClassSupport': emitter.needsClassSupport,
-     'libraries': librariesAccess,
-     'mangledNames': mangledNamesAccess,
-     'mangledGlobalNames': mangledGlobalNamesAccess,
-     'statics': staticsAccess,
-     'staticsPropertyName': namer.staticsPropertyName,
-     'staticsPropertyNameString': js.quoteName(namer.staticsPropertyName),
-     'typeInformation': typeInformationAccess,
-     'globalFunctions': globalFunctionsAccess,
-     'enabledInvokeOn': compiler.enabledInvokeOn,
-     'interceptedNames': interceptedNamesAccess,
-     'interceptedNamesSet': emitter.generateInterceptedNamesSet(),
-     'notInCspMode': !compiler.useContentSecurityPolicy,
-     'inCspMode': compiler.useContentSecurityPolicy,
-     'deferredAction': namer.deferredAction,
-     'hasIsolateSupport': program.hasIsolateSupport,
-     'fieldNamesProperty': js.string(Emitter.FIELD_NAMES_PROPERTY_NAME),
-     'hasIncrementalSupport': compiler.hasIncrementalSupport,
-     'incrementalHelper': namer.accessIncrementalHelper,
-     'createNewIsolateFunction': createNewIsolateFunctionAccess,
-     'isolateName': namer.isolateName,
-     'classIdExtractor': classIdExtractorAccess,
-     'classFieldsExtractor': classFieldsExtractorAccess,
-     'instanceFromClassId': instanceFromClassIdAccess,
-     'initializeEmptyInstance': initializeEmptyInstanceAccess,
-     'allClasses': allClassesAccess,
-     'debugFastObjects': DEBUG_FAST_OBJECTS,
-     'isTreeShakingDisabled': backend.isTreeShakingDisabled,
-     'precompiled': precompiledAccess,
-     'finishedClassesAccess': finishedClassesAccess,
-     'needsMixinSupport': emitter.needsMixinSupport,
-     'needsNativeSupport': program.needsNativeSupport,
-     'enabledJsInterop': backend.jsInteropAnalysis.enabledJsInterop,
-     'jsInteropBoostrap':backend.jsInteropAnalysis.buildJsInteropBootstrap(),
-     'isInterceptorClass': namer.operatorIs(backend.helpers.jsInterceptorClass),
-     'isObject' : namer.operatorIs(compiler.coreClasses.objectClass),
-     'specProperty': js.string(namer.nativeSpecProperty),
-     'trivialNsmHandlers': emitter.buildTrivialNsmHandlers(),
-     'hasRetainedMetadata': backend.hasRetainedMetadata,
-     'types': typesAccess,
-     'objectClassName': js.quoteName(
-         namer.runtimeTypeName(compiler.coreClasses.objectClass)),
-     'needsStructuredMemberInfo': emitter.needsStructuredMemberInfo,
-     'usesMangledNames':
-          compiler.mirrorsLibrary != null || compiler.enabledFunctionApply,
-     'tearOffCode': buildTearOffCode(backend),
-     'nativeInfoHandler': nativeInfoHandler,
-     'operatorIsPrefix' : js.string(namer.operatorIsPrefix),
-     'deferredActionString': js.string(namer.deferredAction)};
-   String skeleton = '''
+  Map<String, dynamic> holes = {
+    'needsClassSupport': emitter.needsClassSupport,
+    'libraries': librariesAccess,
+    'mangledNames': mangledNamesAccess,
+    'mangledGlobalNames': mangledGlobalNamesAccess,
+    'statics': staticsAccess,
+    'staticsPropertyName': namer.staticsPropertyName,
+    'staticsPropertyNameString': js.quoteName(namer.staticsPropertyName),
+    'typeInformation': typeInformationAccess,
+    'globalFunctions': globalFunctionsAccess,
+    'enabledInvokeOn': compiler.enabledInvokeOn,
+    'interceptedNames': interceptedNamesAccess,
+    'interceptedNamesSet': emitter.generateInterceptedNamesSet(),
+    'notInCspMode': !compiler.options.useContentSecurityPolicy,
+    'inCspMode': compiler.options.useContentSecurityPolicy,
+    'deferredAction': namer.deferredAction,
+    'hasIsolateSupport': program.hasIsolateSupport,
+    'fieldNamesProperty': js.string(Emitter.FIELD_NAMES_PROPERTY_NAME),
+    'hasIncrementalSupport': compiler.options.hasIncrementalSupport,
+    'incrementalHelper': namer.accessIncrementalHelper,
+    'createNewIsolateFunction': createNewIsolateFunctionAccess,
+    'isolateName': namer.isolateName,
+    'classIdExtractor': classIdExtractorAccess,
+    'classFieldsExtractor': classFieldsExtractorAccess,
+    'instanceFromClassId': instanceFromClassIdAccess,
+    'initializeEmptyInstance': initializeEmptyInstanceAccess,
+    'allClasses': allClassesAccess,
+    'debugFastObjects': DEBUG_FAST_OBJECTS,
+    'isTreeShakingDisabled': backend.isTreeShakingDisabled,
+    'precompiled': precompiledAccess,
+    'finishedClassesAccess': finishedClassesAccess,
+    'needsMixinSupport': emitter.needsMixinSupport,
+    'needsNativeSupport': program.needsNativeSupport,
+    'enabledJsInterop': backend.jsInteropAnalysis.enabledJsInterop,
+    'jsInteropBoostrap': backend.jsInteropAnalysis.buildJsInteropBootstrap(),
+    'isInterceptorClass': namer.operatorIs(backend.helpers.jsInterceptorClass),
+    'isObject': namer.operatorIs(compiler.coreClasses.objectClass),
+    'specProperty': js.string(namer.nativeSpecProperty),
+    'trivialNsmHandlers': emitter.buildTrivialNsmHandlers(),
+    'hasRetainedMetadata': backend.hasRetainedMetadata,
+    'types': typesAccess,
+    'objectClassName':
+        js.quoteName(namer.runtimeTypeName(compiler.coreClasses.objectClass)),
+    'needsStructuredMemberInfo': emitter.needsStructuredMemberInfo,
+    'usesMangledNames':
+        compiler.mirrorsLibrary != null || compiler.enabledFunctionApply,
+    'tearOffCode': buildTearOffCode(backend),
+    'nativeInfoHandler': nativeInfoHandler,
+    'operatorIsPrefix': js.string(namer.operatorIsPrefix),
+    'deferredActionString': js.string(namer.deferredAction)
+  };
+  String skeleton = '''
 function $setupProgramName(programData, typesOffset) {
   "use strict";
   if (#needsClassSupport) {
@@ -834,14 +832,16 @@
 
 String readInt(String array, String index) {
   return readChecked(
-      array, index,
+      array,
+      index,
       'result != null && (typeof result != "number" || (result|0) !== result)',
       'int');
 }
 
 String readFunctionType(String array, String index) {
   return readChecked(
-      array, index,
+      array,
+      index,
       'result != null && '
       '(typeof result != "number" || (result|0) !== result) && '
       'typeof result != "function"',
diff --git a/pkg/compiler/lib/src/js_emitter/headers.dart b/pkg/compiler/lib/src/js_emitter/headers.dart
index 67fd4a2..2bdb761 100644
--- a/pkg/compiler/lib/src/js_emitter/headers.dart
+++ b/pkg/compiler/lib/src/js_emitter/headers.dart
@@ -3,11 +3,14 @@
 // BSD-style license that can be found in the LICENSE file.
 
 library dart2js.js_emitter.headers;
+
 import '../compiler.dart' show Compiler;
 
 String generatedBy(Compiler compiler, {String flavor: ""}) {
   String suffix = '';
-  if (compiler.hasBuildId) suffix = ' version: ${compiler.buildId}';
+  if (compiler.options.hasBuildId) {
+    suffix = ' version: ${compiler.options.buildId}';
+  }
   if (flavor != "") flavor = " ($flavor)";
   return '// Generated by dart2js$flavor, '
       'the Dart to JavaScript compiler$suffix.';
diff --git a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
index 3d3270c..1ccb101 100644
--- a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
@@ -30,13 +30,13 @@
       if (cls == helpers.jsBoolClass) {
         condition = js('(typeof receiver) == "boolean"');
       } else if (cls == helpers.jsIntClass ||
-                 cls == helpers.jsDoubleClass ||
-                 cls == helpers.jsNumberClass) {
+          cls == helpers.jsDoubleClass ||
+          cls == helpers.jsNumberClass) {
         throw 'internal error';
       } else if (cls == helpers.jsArrayClass ||
-                 cls == helpers.jsMutableArrayClass ||
-                 cls == helpers.jsFixedArrayClass ||
-                 cls == helpers.jsExtendableArrayClass) {
+          cls == helpers.jsMutableArrayClass ||
+          cls == helpers.jsFixedArrayClass ||
+          cls == helpers.jsExtendableArrayClass) {
         condition = js('receiver.constructor == Array');
       } else if (cls == helpers.jsStringClass) {
         condition = js('(typeof receiver) == "string"');
@@ -56,20 +56,27 @@
     bool hasNumber = false;
     bool hasString = false;
     bool hasNative = false;
-    bool anyNativeClasses = compiler.enqueuer.codegen.nativeEnqueuer
-          .hasInstantiatedNativeClasses();
+    bool anyNativeClasses =
+        compiler.enqueuer.codegen.nativeEnqueuer.hasInstantiatedNativeClasses();
 
     for (ClassElement cls in classes) {
       if (cls == helpers.jsArrayClass ||
           cls == helpers.jsMutableArrayClass ||
           cls == helpers.jsFixedArrayClass ||
-          cls == helpers.jsExtendableArrayClass) hasArray = true;
-      else if (cls == helpers.jsBoolClass) hasBool = true;
-      else if (cls == helpers.jsDoubleClass) hasDouble = true;
-      else if (cls == helpers.jsIntClass) hasInt = true;
-      else if (cls == helpers.jsNullClass) hasNull = true;
-      else if (cls == helpers.jsNumberClass) hasNumber = true;
-      else if (cls == helpers.jsStringClass) hasString = true;
+          cls == helpers.jsExtendableArrayClass)
+        hasArray = true;
+      else if (cls == helpers.jsBoolClass)
+        hasBool = true;
+      else if (cls == helpers.jsDoubleClass)
+        hasDouble = true;
+      else if (cls == helpers.jsIntClass)
+        hasInt = true;
+      else if (cls == helpers.jsNullClass)
+        hasNull = true;
+      else if (cls == helpers.jsNumberClass)
+        hasNumber = true;
+      else if (cls == helpers.jsStringClass)
+        hasString = true;
       else {
         // The set of classes includes classes mixed-in to interceptor classes
         // and user extensions of native classes.
@@ -108,15 +115,17 @@
           hasDouble ? helpers.jsDoubleClass : helpers.jsNumberClass);
 
       if (hasInt) {
-        whenNumber = js.statement('''{
+        whenNumber = js.statement(
+            '''{
             if (Math.floor(receiver) == receiver) return #;
             return #;
-        }''', [interceptorFor(helpers.jsIntClass), interceptorForNumber]);
+        }''',
+            [interceptorFor(helpers.jsIntClass), interceptorForNumber]);
       } else {
         whenNumber = js.statement('return #', interceptorForNumber);
       }
-      statements.add(
-          js.statement('if (typeof receiver == "number") #;', whenNumber));
+      statements
+          .add(js.statement('if (typeof receiver == "number") #;', whenNumber));
     }
 
     if (hasString) {
@@ -128,8 +137,7 @@
       // Returning "undefined" or "null" here will provoke a JavaScript
       // TypeError which is later identified as a null-error by
       // [unwrapException] in js_helper.dart.
-      statements.add(
-          js.statement('if (receiver == null) return receiver'));
+      statements.add(js.statement('if (receiver == null) return receiver'));
     }
     if (hasBool) {
       statements.add(buildInterceptorCheck(helpers.jsBoolClass));
@@ -141,28 +149,29 @@
     }
 
     if (hasNative) {
-      statements.add(js.statement(r'''{
+      statements.add(js.statement(
+          r'''{
           if (typeof receiver != "object") {
               if (typeof receiver == "function" ) return #;
               return receiver;
           }
           if (receiver instanceof #) return receiver;
           return #(receiver);
-      }''', [
-          interceptorFor(helpers.jsJavaScriptFunctionClass),
-          backend.emitter.constructorAccess(compiler.coreClasses.objectClass),
-          backend.emitter
-              .staticFunctionAccess(helpers.getNativeInterceptorMethod)]));
-
+      }''',
+          [
+            interceptorFor(helpers.jsJavaScriptFunctionClass),
+            backend.emitter.constructorAccess(compiler.coreClasses.objectClass),
+            backend.emitter
+                .staticFunctionAccess(helpers.getNativeInterceptorMethod)
+          ]));
     } else {
       ClassElement jsUnknown = helpers.jsUnknownJavaScriptObjectClass;
-      if (compiler.codegenWorld
-              .directlyInstantiatedClasses.contains(jsUnknown)) {
-        statements.add(
-            js.statement('if (!(receiver instanceof #)) return #;',
-                [backend.emitter.constructorAccess(
-                     compiler.coreClasses.objectClass),
-                 interceptorFor(jsUnknown)]));
+      if (compiler.codegenWorld.directlyInstantiatedClasses
+          .contains(jsUnknown)) {
+        statements.add(js.statement('if (!(receiver instanceof #)) return #;', [
+          backend.emitter.constructorAccess(compiler.coreClasses.objectClass),
+          interceptorFor(jsUnknown)
+        ]));
       }
 
       statements.add(js.statement('return receiver'));
@@ -174,9 +183,8 @@
   // Returns a statement that takes care of performance critical
   // common case for a one-shot interceptor, or null if there is no
   // fast path.
-  jsAst.Statement _fastPathForOneShotInterceptor(Selector selector,
-                                                 Set<ClassElement> classes) {
-
+  jsAst.Statement _fastPathForOneShotInterceptor(
+      Selector selector, Set<ClassElement> classes) {
     if (selector.isOperator) {
       String name = selector.name;
       if (name == '==') {
@@ -186,9 +194,9 @@
             return a0 != null && receiver === a0;
         }''');
       }
-      if (!classes.contains(helpers.jsIntClass)
-          && !classes.contains(helpers.jsNumberClass)
-          && !classes.contains(helpers.jsDoubleClass)) {
+      if (!classes.contains(helpers.jsIntClass) &&
+          !classes.contains(helpers.jsNumberClass) &&
+          !classes.contains(helpers.jsDoubleClass)) {
         return null;
       }
       if (selector.argumentCount == 1) {
@@ -205,8 +213,8 @@
             '  return #;',
             result);
       } else if (name == 'unary-') {
-        return js.statement(
-            'if (typeof receiver == "number") return -receiver');
+        return js
+            .statement('if (typeof receiver == "number") return -receiver');
       } else {
         assert(name == '~');
         return js.statement('''
@@ -238,15 +246,16 @@
       bool containsArray = classes.contains(helpers.jsArrayClass);
       bool containsString = classes.contains(helpers.jsStringClass);
       bool containsJsIndexable =
-          helpers.jsIndexingBehaviorInterface.isResolved && classes.any((cls) {
-        return compiler.world.isSubtypeOf(cls,
-            helpers.jsIndexingBehaviorInterface);
-      });
+          helpers.jsIndexingBehaviorInterface.isResolved &&
+              classes.any((cls) {
+                return compiler.world
+                    .isSubtypeOf(cls, helpers.jsIndexingBehaviorInterface);
+              });
       // The index set operator requires a check on its set value in
       // checked mode, so we don't optimize the interceptor if the
       // compiler has type assertions enabled.
-      if (selector.isIndexSet
-          && (compiler.enableTypeAssertions || !containsArray)) {
+      if (selector.isIndexSet &&
+          (compiler.options.enableTypeAssertions || !containsArray)) {
         return null;
       }
       if (!containsArray && !containsString) {
@@ -274,12 +283,14 @@
           typeCheck = orExp(typeCheck, indexableCheck);
         }
 
-        return js.statement('''
+        return js.statement(
+            '''
           if (typeof a0 === "number")
             if (#)
               if ((a0 >>> 0) === a0 && a0 < receiver.length)
                 return receiver[a0];
-          ''', typeCheck);
+          ''',
+            typeCheck);
       } else {
         jsAst.Expression typeCheck;
         if (containsArray) {
@@ -290,12 +301,14 @@
           typeCheck = orExp(typeCheck, indexableCheck);
         }
 
-        return js.statement(r'''
+        return js.statement(
+            r'''
           if (typeof a0 === "number")
             if (# && !receiver.immutable$list &&
                 (a0 >>> 0) === a0 && a0 < receiver.length)
               return receiver[a0] = a1;
-          ''', typeCheck);
+          ''',
+            typeCheck);
       }
     }
     return null;
@@ -303,8 +316,7 @@
 
   jsAst.Expression generateOneShotInterceptor(jsAst.Name name) {
     Selector selector = backend.oneShotInterceptors[name];
-    Set<ClassElement> classes =
-        backend.getInterceptedClassesOn(selector.name);
+    Set<ClassElement> classes = backend.getInterceptedClassesOn(selector.name);
     jsAst.Name getInterceptorName = namer.nameForGetInterceptor(classes);
 
     List<String> parameterNames = <String>[];
@@ -325,11 +337,14 @@
         _fastPathForOneShotInterceptor(selector, classes);
     if (optimizedPath == null) optimizedPath = js.statement(';');
 
-    return js(
-        'function(#) { #; return #.#(receiver).#(#) }',
-        [parameterNames,
-         optimizedPath,
-         globalObject, getInterceptorName, invocationName, parameterNames]);
+    return js('function(#) { #; return #.#(receiver).#(#) }', [
+      parameterNames,
+      optimizedPath,
+      globalObject,
+      getInterceptorName,
+      invocationName,
+      parameterNames
+    ]);
   }
 
   jsAst.ArrayInitializer generateTypeToInterceptorMap() {
@@ -369,10 +384,8 @@
           // We expect most of the time the map will be a singleton.
           var properties = [];
           for (Element member in analysis.constructors(classElement)) {
-            properties.add(
-                new jsAst.Property(
-                    js.string(member.name),
-                    backend.emitter.staticFunctionAccess(member)));
+            properties.add(new jsAst.Property(js.string(member.name),
+                backend.emitter.staticFunctionAccess(member)));
           }
 
           var map = new jsAst.ObjectInitializer(properties);
diff --git a/pkg/compiler/lib/src/js_emitter/js_emitter.dart b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
index eb66c1a..0a305ed 100644
--- a/pkg/compiler/lib/src/js_emitter/js_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
@@ -8,77 +8,68 @@
 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
 import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin;
 
-
 import '../common.dart';
-import '../common/names.dart' show
-    Identifiers;
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
+import '../common/names.dart' show Identifiers;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
 import '../constants/values.dart';
-import '../closure.dart' show
-    ClosureClassElement,
-    ClosureClassMap,
-    ClosureFieldElement,
-    CapturedVariable;
-import '../core_types.dart' show
-    CoreClasses;
-import '../dart_types.dart' show
-    DartType,
-    FunctionType,
-    InterfaceType,
-    TypedefType,
-    Types,
-    TypeVariableType;
-import '../deferred_load.dart' show
-    OutputUnit;
-import '../elements/elements.dart' show
-    ClassElement,
-    ConstructorBodyElement,
-    ConstructorElement,
-    Element,
-    Elements,
-    ElementKind,
-    FieldElement,
-    FunctionElement,
-    FunctionSignature,
-    MetadataAnnotation,
-    MethodElement,
-    MemberElement,
-    MixinApplicationElement,
-    ParameterElement,
-    TypeVariableElement;
+import '../closure.dart'
+    show
+        ClosureClassElement,
+        ClosureClassMap,
+        ClosureFieldElement,
+        CapturedVariable;
+import '../core_types.dart' show CoreClasses;
+import '../dart_types.dart'
+    show
+        DartType,
+        FunctionType,
+        InterfaceType,
+        TypedefType,
+        Types,
+        TypeVariableType;
+import '../deferred_load.dart' show OutputUnit;
+import '../elements/elements.dart'
+    show
+        ClassElement,
+        ConstructorBodyElement,
+        ConstructorElement,
+        Element,
+        Elements,
+        ElementKind,
+        FieldElement,
+        FunctionElement,
+        FunctionSignature,
+        MetadataAnnotation,
+        MethodElement,
+        MemberElement,
+        MixinApplicationElement,
+        ParameterElement,
+        TypeVariableElement;
 import '../js/js.dart' as jsAst;
 import '../js/js.dart' show js;
-import '../js_backend/backend_helpers.dart' show
-    BackendHelpers;
-import '../js_backend/js_backend.dart' show
-    CheckedModeHelper,
-    CompoundName,
-    ConstantEmitter,
-    CustomElementsAnalysis,
-    GetterName,
-    JavaScriptBackend,
-    JavaScriptConstantCompiler,
-    Namer,
-    RuntimeTypes,
-    RuntimeTypesEncoder,
-    SetterName,
-    Substitution,
-    TypeCheck,
-    TypeChecks,
-    TypeVariableHandler;
-import '../native/native.dart' as native;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/universe.dart' show
-    SelectorConstraints;
-import '../util/util.dart' show
-    Setlet;
-
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart'
+    show
+        CheckedModeHelper,
+        CompoundName,
+        ConstantEmitter,
+        CustomElementsAnalysis,
+        GetterName,
+        JavaScriptBackend,
+        JavaScriptConstantCompiler,
+        Namer,
+        RuntimeTypes,
+        RuntimeTypesEncoder,
+        SetterName,
+        Substitution,
+        TypeCheck,
+        TypeChecks,
+        TypeVariableHandler;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/universe.dart' show SelectorConstraints;
+import '../util/util.dart' show Setlet;
 
 import 'full_emitter/emitter.dart' as full_js_emitter;
 import 'lazy_emitter/emitter.dart' as lazy_js_emitter;
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
index b2db5ab..e3f287b 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
@@ -4,33 +4,21 @@
 
 library dart2js.js_emitter.lazy_emitter;
 
-import 'package:js_runtime/shared/embedded_names.dart' show
-    JsBuiltin,
-    METADATA,
-    TYPES;
+import 'package:js_runtime/shared/embedded_names.dart'
+    show JsBuiltin, METADATA, TYPES;
 
 import '../../common.dart';
-import '../../compiler.dart' show
-    Compiler;
-import '../../constants/values.dart' show
-    ConstantValue;
-import '../../elements/elements.dart' show
-    ClassElement,
-    Element,
-    FieldElement,
-    FunctionElement;
+import '../../compiler.dart' show Compiler;
+import '../../constants/values.dart' show ConstantValue;
+import '../../elements/elements.dart'
+    show ClassElement, Element, FieldElement, FunctionElement;
 import '../../js/js.dart' as js;
-import '../../js_backend/js_backend.dart' show
-    JavaScriptBackend,
-    Namer;
+import '../../js_backend/js_backend.dart' show JavaScriptBackend, Namer;
 
-import '../js_emitter.dart' show
-    NativeEmitter;
-import '../js_emitter.dart' as emitterTask show
-    Emitter;
+import '../js_emitter.dart' show NativeEmitter;
+import '../js_emitter.dart' as emitterTask show Emitter;
 import '../model.dart';
-import '../program_builder/program_builder.dart' show
-    ProgramBuilder;
+import '../program_builder/program_builder.dart' show ProgramBuilder;
 
 import 'model_emitter.dart';
 
@@ -97,8 +85,8 @@
 
   @override
   js.Expression isolateLazyInitializerAccess(FieldElement element) {
-    return js.js('#.#', [namer.globalObjectFor(element),
-                         namer.lazyInitializerName(element)]);
+    return js.js('#.#',
+        [namer.globalObjectFor(element), namer.lazyInitializerName(element)]);
   }
 
   @override
@@ -122,8 +110,8 @@
   }
 
   @override
-  js.PropertyAccess prototypeAccess(ClassElement element,
-                                    bool hasBeenInstantiated) {
+  js.PropertyAccess prototypeAccess(
+      ClassElement element, bool hasBeenInstantiated) {
     js.Expression constructor =
         hasBeenInstantiated ? constructorAccess(element) : typeAccess(element);
     return js.js('#.prototype', constructor);
@@ -187,13 +175,12 @@
         throw new UnsupportedError('createDartClosureFromNameOfStaticFunction');
 
       default:
-        reporter.internalError(NO_LOCATION_SPANNABLE,
-                                "Unhandled Builtin: $builtin");
+        reporter.internalError(
+            NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin");
         return null;
     }
   }
 
   @override
-  void invalidateCaches() {
-  }
+  void invalidateCaches() {}
 }
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
index a0b9b48..138062e 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
@@ -4,39 +4,32 @@
 
 library dart2js.js_emitter.lazy_emitter.model_emitter;
 
-import '../../compiler.dart' show
-    Compiler;
-import '../../constants/values.dart' show
-    ConstantValue,
-    FunctionConstantValue;
-import '../../core_types.dart' show
-    CoreClasses;
-import '../../elements/elements.dart' show
-    ClassElement,
-    FunctionElement;
+import '../../compiler.dart' show Compiler;
+import '../../constants/values.dart' show ConstantValue, FunctionConstantValue;
+import '../../core_types.dart' show CoreClasses;
+import '../../elements/elements.dart' show ClassElement, FunctionElement;
 import '../../js/js.dart' as js;
-import '../../js_backend/js_backend.dart' show
-    JavaScriptBackend,
-    Namer,
-    ConstantEmitter;
+import '../../js_backend/js_backend.dart'
+    show JavaScriptBackend, Namer, ConstantEmitter;
 
 import '../js_emitter.dart' show NativeEmitter;
 import '../constant_ordering.dart' show deepCompareConstants;
 
-import 'package:js_runtime/shared/embedded_names.dart' show
-    CREATE_NEW_ISOLATE,
-    DEFERRED_LIBRARY_URIS,
-    DEFERRED_LIBRARY_HASHES,
-    GET_TYPE_FROM_NAME,
-    INITIALIZE_LOADED_HUNK,
-    INTERCEPTORS_BY_TAG,
-    IS_HUNK_INITIALIZED,
-    IS_HUNK_LOADED,
-    LEAF_TAGS,
-    MANGLED_GLOBAL_NAMES,
-    METADATA,
-    TYPE_TO_INTERCEPTOR_MAP,
-    TYPES;
+import 'package:js_runtime/shared/embedded_names.dart'
+    show
+        CREATE_NEW_ISOLATE,
+        DEFERRED_LIBRARY_URIS,
+        DEFERRED_LIBRARY_HASHES,
+        GET_TYPE_FROM_NAME,
+        INITIALIZE_LOADED_HUNK,
+        INTERCEPTORS_BY_TAG,
+        IS_HUNK_INITIALIZED,
+        IS_HUNK_LOADED,
+        LEAF_TAGS,
+        MANGLED_GLOBAL_NAMES,
+        METADATA,
+        TYPE_TO_INTERCEPTOR_MAP,
+        TYPES;
 
 import '../js_emitter.dart' show NativeGenerator, buildTearOffCode;
 import '../model.dart';
@@ -60,10 +53,8 @@
   ModelEmitter(Compiler compiler, Namer namer, this.nativeEmitter)
       : this.compiler = compiler,
         this.namer = namer {
-
     this.constantEmitter = new ConstantEmitter(
-        compiler, namer, this.generateConstantReference,
-        constantListGenerator);
+        compiler, namer, this.generateConstantReference, constantListGenerator);
   }
 
   js.Expression constantListGenerator(js.Expression array) {
@@ -81,9 +72,9 @@
   }
 
   bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) {
-    if (constant.isFunction) return true;    // Already emitted.
-    if (constant.isPrimitive) return true;   // Inlined.
-    if (constant.isDummy) return true;       // Inlined.
+    if (constant.isFunction) return true; // Already emitted.
+    if (constant.isPrimitive) return true; // Inlined.
+    if (constant.isDummy) return true; // Inlined.
     // The name is null when the constant is already a JS constant.
     // TODO(floitsch): every constant should be registered, so that we can
     // share the ones that take up too much space (like some strings).
@@ -130,8 +121,8 @@
     if (isConstantInlinedOrAlreadyEmitted(value)) {
       return constantEmitter.generate(value);
     }
-    return js.js('#.#()', [namer.globalObjectForConstant(value),
-                           namer.constantName(value)]);
+    return js.js('#.#()',
+        [namer.globalObjectForConstant(value), namer.constantName(value)]);
   }
 
   int emitProgram(Program program) {
@@ -144,8 +135,8 @@
     // We have to emit the deferred fragments first, since we need their
     // deferred hash (which depends on the output) when emitting the main
     // fragment.
-    List<js.Expression> fragmentsCode = deferredFragments.map(
-            (DeferredFragment deferredUnit) {
+    List<js.Expression> fragmentsCode =
+        deferredFragments.map((DeferredFragment deferredUnit) {
       js.Expression types =
           program.metadataTypesForOutputUnit(deferredUnit.outputUnit);
       return emitDeferredFragment(types, deferredUnit, program.holders);
@@ -163,16 +154,17 @@
     for (int i = 0; i < fragmentsCode.length; ++i) {
       String code = js.createCodeBuffer(fragmentsCode[i], compiler).getText();
       totalSize += code.length;
-      compiler.outputProvider(fragments[i+1].outputFileName, deferredExtension)
+      compiler.outputProvider(
+          fragments[i + 1].outputFileName, deferredExtension)
         ..add(code)
         ..close();
     }
 
     String mainCode = js.createCodeBuffer(mainAst, compiler).getText();
     compiler.outputProvider(mainFragment.outputFileName, 'js')
-        ..add(buildGeneratedBy(compiler))
-        ..add(mainCode)
-        ..close();
+      ..add(buildGeneratedBy(compiler))
+      ..add(mainCode)
+      ..close();
     totalSize += mainCode.length;
 
     return totalSize;
@@ -187,13 +179,15 @@
   ///
   /// See [_UnparsedNode] for details.
   js.Literal unparse(Compiler compiler, js.Node value,
-                     {bool protectForEval: true}) {
+      {bool protectForEval: true}) {
     return new js.UnparsedNode(value, compiler, protectForEval);
   }
 
   String buildGeneratedBy(compiler) {
     var suffix = '';
-    if (compiler.hasBuildId) suffix = ' version: ${compiler.buildId}';
+    if (compiler.options.hasBuildId) {
+      suffix = ' version: ${compiler.options.buildId}';
+    }
     return '// Generated by dart2js, the Dart to JavaScript compiler$suffix.\n';
   }
 
@@ -206,31 +200,31 @@
 
     js.Expression code = new js.ArrayInitializer(elements);
 
-    Map<String, dynamic> holes =
-      {'deferredInitializer': emitDeferredInitializerGlobal(program.loadMap),
-       'holders': emitHolders(program.holders),
-       'tearOff': buildTearOffCode(backend),
-       'parseFunctionDescriptor':
-           js.js.statement(parseFunctionDescriptorBoilerplate,
-               {'argumentCount': js.string(namer.requiredParameterField),
-                'defaultArgumentValues': js.string(namer.defaultValuesField),
-                'callName': js.string(namer.callNameField)}),
-
-       'cyclicThrow':
-           backend.emitter.staticFunctionAccess(
-               backend.helpers.cyclicThrowHelper),
-       'outputContainsConstantList': program.outputContainsConstantList,
-       'embeddedGlobals': emitEmbeddedGlobals(program),
-       'readMetadataTypeFunction': readMetadataTypeFunction,
-       'staticNonFinals':
-            emitStaticNonFinalFields(fragment.staticNonFinalFields),
-       'operatorIsPrefix': js.string(namer.operatorIsPrefix),
-       'callName': js.string(namer.callNameField),
-       'argumentCount': js.string(namer.requiredParameterField),
-       'defaultArgumentValues': js.string(namer.defaultValuesField),
-       'eagerClasses': emitEagerClassInitializations(fragment.libraries),
-       'invokeMain': fragment.invokeMain,
-       'code': code};
+    Map<String, dynamic> holes = {
+      'deferredInitializer': emitDeferredInitializerGlobal(program.loadMap),
+      'holders': emitHolders(program.holders),
+      'tearOff': buildTearOffCode(backend),
+      'parseFunctionDescriptor':
+          js.js.statement(parseFunctionDescriptorBoilerplate, {
+        'argumentCount': js.string(namer.requiredParameterField),
+        'defaultArgumentValues': js.string(namer.defaultValuesField),
+        'callName': js.string(namer.callNameField)
+      }),
+      'cyclicThrow': backend.emitter
+          .staticFunctionAccess(backend.helpers.cyclicThrowHelper),
+      'outputContainsConstantList': program.outputContainsConstantList,
+      'embeddedGlobals': emitEmbeddedGlobals(program),
+      'readMetadataTypeFunction': readMetadataTypeFunction,
+      'staticNonFinals':
+          emitStaticNonFinalFields(fragment.staticNonFinalFields),
+      'operatorIsPrefix': js.string(namer.operatorIsPrefix),
+      'callName': js.string(namer.callNameField),
+      'argumentCount': js.string(namer.requiredParameterField),
+      'defaultArgumentValues': js.string(namer.defaultValuesField),
+      'eagerClasses': emitEagerClassInitializations(fragment.libraries),
+      'invokeMain': fragment.invokeMain,
+      'code': code
+    };
 
     holes.addAll(nativeHoles(program));
 
@@ -254,7 +248,6 @@
     nativeHoles['nativeIsolateAffinityTagInitialization'] =
         nativeIsolateAffinityTagInitialization;
 
-
     js.Expression nativeInfoAccess = js.js('nativeInfo', []);
     js.Expression constructorAccess = js.js('constructor', []);
     Function subclassReadGenerator = (js.Expression subclass) {
@@ -262,8 +255,7 @@
     };
     js.Expression interceptorsByTagAccess =
         generateEmbeddedGlobalAccess(INTERCEPTORS_BY_TAG);
-    js.Expression leafTagsAccess =
-        generateEmbeddedGlobalAccess(LEAF_TAGS);
+    js.Expression leafTagsAccess = generateEmbeddedGlobalAccess(LEAF_TAGS);
     js.Statement nativeInfoHandler = NativeGenerator.buildNativeInfoHandler(
         nativeInfoAccess,
         constructorAccess,
@@ -290,15 +282,17 @@
     // that covers the entire program.
 
     List<js.Statement> statements = [
-        new js.ExpressionStatement(
-            new js.VariableDeclarationList(holders.map((e) =>
-                new js.VariableInitialization(
-                    new js.VariableDeclaration(e.name, allowRename: false),
-                    new js.ObjectInitializer(const []))).toList())),
-        js.js.statement('var holders = #', new js.ArrayInitializer(
-            holders.map((e) => new js.VariableUse(e.name))
-                   .toList(growable: false))),
-        js.js.statement('var holdersMap = Object.create(null)')
+      new js.ExpressionStatement(new js.VariableDeclarationList(holders
+          .map((e) => new js.VariableInitialization(
+              new js.VariableDeclaration(e.name, allowRename: false),
+              new js.ObjectInitializer(const [])))
+          .toList())),
+      js.js.statement(
+          'var holders = #',
+          new js.ArrayInitializer(holders
+              .map((e) => new js.VariableUse(e.name))
+              .toList(growable: false))),
+      js.js.statement('var holdersMap = Object.create(null)')
     ];
     return new js.Block(statements);
   }
@@ -311,15 +305,14 @@
     }
 
     if (program.typeToInterceptorMap != null) {
-      globals.add(new js.Property(js.string(TYPE_TO_INTERCEPTOR_MAP),
-                                  program.typeToInterceptorMap));
+      globals.add(new js.Property(
+          js.string(TYPE_TO_INTERCEPTOR_MAP), program.typeToInterceptorMap));
     }
 
     if (program.hasIsolateSupport) {
       String isolateName = namer.staticStateHolder;
-      globals.add(
-          new js.Property(js.string(CREATE_NEW_ISOLATE),
-                          js.js('function () { return $isolateName; }')));
+      globals.add(new js.Property(js.string(CREATE_NEW_ISOLATE),
+          js.js('function () { return $isolateName; }')));
       // TODO(floitsch): add remaining isolate functions.
     }
 
@@ -330,20 +323,21 @@
     globals.addAll(emitMetadata(program));
 
     if (program.needsNativeSupport) {
-      globals.add(new js.Property(js.string(INTERCEPTORS_BY_TAG),
-                                  js.js('Object.create(null)', [])));
-      globals.add(new js.Property(js.string(LEAF_TAGS),
-                                  js.js('Object.create(null)', [])));
+      globals.add(new js.Property(
+          js.string(INTERCEPTORS_BY_TAG), js.js('Object.create(null)', [])));
+      globals.add(new js.Property(
+          js.string(LEAF_TAGS), js.js('Object.create(null)', [])));
     }
 
     js.ObjectInitializer globalsObject = new js.ObjectInitializer(globals);
 
-    List<js.Statement> statements =
-        [new js.ExpressionStatement(
-            new js.VariableDeclarationList(
-                [new js.VariableInitialization(
-                    new js.VariableDeclaration("init", allowRename: false),
-                    globalsObject)]))];
+    List<js.Statement> statements = [
+      new js.ExpressionStatement(new js.VariableDeclarationList([
+        new js.VariableInitialization(
+            new js.VariableDeclaration("init", allowRename: false),
+            globalsObject)
+      ]))
+    ];
     return new js.Block(statements);
   }
 
@@ -353,17 +347,22 @@
     CoreClasses coreClasses = compiler.coreClasses;
     // We want to keep the original names for the most common core classes when
     // calling toString on them.
-    List<ClassElement> nativeClassesNeedingUnmangledName =
-        [coreClasses.intClass, coreClasses.doubleClass, coreClasses.numClass,
-         coreClasses.stringClass, coreClasses.boolClass, coreClasses.nullClass,
-         coreClasses.listClass];
+    List<ClassElement> nativeClassesNeedingUnmangledName = [
+      coreClasses.intClass,
+      coreClasses.doubleClass,
+      coreClasses.numClass,
+      coreClasses.stringClass,
+      coreClasses.boolClass,
+      coreClasses.nullClass,
+      coreClasses.listClass
+    ];
     nativeClassesNeedingUnmangledName.forEach((element) {
-        names.add(new js.Property(js.quoteName(namer.className(element)),
-                                  js.string(element.name)));
+      names.add(new js.Property(
+          js.quoteName(namer.className(element)), js.string(element.name)));
     });
 
-    return new js.Property(js.string(MANGLED_GLOBAL_NAMES),
-                           new js.ObjectInitializer(names));
+    return new js.Property(
+        js.string(MANGLED_GLOBAL_NAMES), new js.ObjectInitializer(names));
   }
 
   js.Statement emitDeferredInitializerGlobal(Map loadMap) {
@@ -376,7 +375,6 @@
 
   Iterable<js.Property> emitEmbeddedGlobalsForDeferredLoading(
       Map<String, List<Fragment>> loadMap) {
-
     List<js.Property> globals = <js.Property>[];
 
     js.ArrayInitializer fragmentUris(List<Fragment> fragments) {
@@ -400,44 +398,44 @@
       count++;
     });
 
-    globals.add(new js.Property(js.string(DEFERRED_LIBRARY_URIS),
-                                new js.ObjectInitializer(uris)));
-    globals.add(new js.Property(js.string(DEFERRED_LIBRARY_HASHES),
-                                new js.ObjectInitializer(hashes)));
+    globals.add(new js.Property(
+        js.string(DEFERRED_LIBRARY_URIS), new js.ObjectInitializer(uris)));
+    globals.add(new js.Property(
+        js.string(DEFERRED_LIBRARY_HASHES), new js.ObjectInitializer(hashes)));
 
     js.Expression isHunkLoadedFunction =
         js.js("function(hash) { return !!$deferredInitializersGlobal[hash]; }");
-    globals.add(new js.Property(js.string(IS_HUNK_LOADED),
-                                isHunkLoadedFunction));
+    globals
+        .add(new js.Property(js.string(IS_HUNK_LOADED), isHunkLoadedFunction));
 
     js.Expression isHunkInitializedFunction =
         js.js("function(hash) { return false; }");
-    globals.add(new js.Property(js.string(IS_HUNK_INITIALIZED),
-                                isHunkInitializedFunction));
+    globals.add(new js.Property(
+        js.string(IS_HUNK_INITIALIZED), isHunkInitializedFunction));
 
     js.Expression typesAccess = generateEmbeddedGlobalAccess(TYPES);
 
     /// See [emitEmbeddedGlobalsForDeferredLoading] for the format of the
     /// deferred hunk.
-    js.Expression initializeLoadedHunkFunction =
-        js.js("""
+    js.Expression initializeLoadedHunkFunction = js.js(
+        """
           function(hash) {
             var hunk = $deferredInitializersGlobal[hash];
             $setupProgramName(hunk[0], #typesAccess.length);
             eval(hunk[1]);
             var deferredTypes = eval(hunk[2]);
             #typesAccess.push.apply(#typesAccess, deferredTypes);
-          }""", {'typesAccess': typesAccess});
+          }""",
+        {'typesAccess': typesAccess});
 
-    globals.add(new js.Property(js.string(INITIALIZE_LOADED_HUNK),
-                                initializeLoadedHunkFunction));
+    globals.add(new js.Property(
+        js.string(INITIALIZE_LOADED_HUNK), initializeLoadedHunkFunction));
 
     return globals;
   }
 
   js.Property emitGetTypeFromName() {
-    js.Expression function =
-        js.js( """function(name) {
+    js.Expression function = js.js("""function(name) {
                     return holdersMap[name][name].ensureResolved();
                   }""");
     return new js.Property(js.string(GET_TYPE_FROM_NAME), function);
@@ -449,14 +447,16 @@
     // Types are non-evaluated and must be compiled at first use.
     // Compiled strings are guaranteed not to be strings, and it's thus safe
     // to use a type-test to determine if a type has already been compiled.
-    return js.js.statement('''function $readMetadataTypeName(index) {
+    return js.js.statement(
+        '''function $readMetadataTypeName(index) {
       var type = #typesAccess[index];
       if (typeof type == 'string') {
         type = expressionCompile(type);
         #typesAccess[index] = type;
       }
       return type;
-    }''', {"typesAccess": generateEmbeddedGlobalAccess(TYPES)});
+    }''',
+        {"typesAccess": generateEmbeddedGlobalAccess(TYPES)});
   }
 
   js.Template get templateForReadType {
@@ -472,17 +472,19 @@
     // Types are non-evaluated and must be compiled at first use.
     // Compiled strings are guaranteed not to be strings, and it's thus safe
     // to use a type-test to determine if a type has already been compiled.
-    return js.js.statement('''function $readMetadataName(index) {
+    return js.js.statement(
+        '''function $readMetadataName(index) {
       var lazyMetadata = #lazyMetadataAccess[index];
       if (typeof lazyMetadata == 'string') {
         #metadataAccess[index] = expressionCompile(lazyMetadata);
         #lazyMetadataAccess[index] = null;
       }
       return #metadataAccess[index];
-    }''', {
-      "lazyMetadataAccess": generateEmbeddedGlobalAccess(lazyMetadataName),
-      "metadataAccess": generateEmbeddedGlobalAccess(METADATA)
-    });
+    }''',
+        {
+          "lazyMetadataAccess": generateEmbeddedGlobalAccess(lazyMetadataName),
+          "metadataAccess": generateEmbeddedGlobalAccess(METADATA)
+        });
   }
 
   js.Template get templateForReadMetadata {
@@ -507,8 +509,7 @@
   }
 
   js.Expression emitDeferredFragment(js.Expression deferredTypes,
-                                     DeferredFragment fragment,
-                                     List<Holder> holders) {
+      DeferredFragment fragment, List<Holder> holders) {
     // TODO(floitsch): initialize eager classes.
     // TODO(floitsch): the hash must depend on the output.
     int hash = fragment.hashCode;
@@ -525,15 +526,14 @@
     // This is the code that must be evaluated after all deferred classes have
     // been setup.
     js.Statement immediateCode = new js.Block([
-        emitStaticNonFinalFields(fragment.staticNonFinalFields),
-        emitEagerClassInitializations(fragment.libraries)]);
-
+      emitStaticNonFinalFields(fragment.staticNonFinalFields),
+      emitEagerClassInitializations(fragment.libraries)
+    ]);
 
     js.Literal immediateString = unparse(compiler, immediateCode);
 
-    js.ArrayInitializer hunk =
-        new js.ArrayInitializer([deferredArray, immediateString,
-                                 deferredTypes]);
+    js.ArrayInitializer hunk = new js.ArrayInitializer(
+        [deferredArray, immediateString, deferredTypes]);
 
     return js.js("$deferredInitializersGlobal[$hash] = #", hunk);
   }
@@ -561,18 +561,19 @@
 
   js.Block emitStaticNonFinalFields(List<StaticField> fields) {
     Iterable<js.Statement> statements = fields.map((StaticField field) {
-      return js.js.statement("#.# = #;",
-                             [field.holder.name, field.name, field.code]);
+      return js.js
+          .statement("#.# = #;", [field.holder.name, field.name, field.code]);
     });
     return new js.Block(statements.toList());
   }
 
   js.Expression emitLazilyInitializedStatics(List<StaticField> fields) {
-    Iterable fieldDescriptors = fields.expand((field) =>
-        [ js.quoteName(field.name),
+    Iterable fieldDescriptors = fields.expand((field) => [
+          js.quoteName(field.name),
           js.quoteName(namer.deriveLazyInitializerName(field.name)),
           js.number(field.holder.index),
-          emitLazyInitializer(field) ]);
+          emitLazyInitializer(field)
+        ]);
     return new js.ArrayInitializer(fieldDescriptors.toList(growable: false));
   }
 
@@ -581,18 +582,17 @@
       return js.js.statement('new #.#()', [cls.holder.name, cls.name]);
     }
 
-    List<js.Statement> instantiations =
-        libraries.expand((Library library) => library.classes)
-                 .where((Class cls) => cls.isEager)
-                 .map(createInstantiation)
-                 .toList(growable: false);
+    List<js.Statement> instantiations = libraries
+        .expand((Library library) => library.classes)
+        .where((Class cls) => cls.isEager)
+        .map(createInstantiation)
+        .toList(growable: false);
     return new js.Block(instantiations);
   }
 
   // This string should be referenced wherever JavaScript code makes assumptions
   // on the mixin format.
-  static final String nativeInfoDescription =
-      "A class is encoded as follows:"
+  static final String nativeInfoDescription = "A class is encoded as follows:"
       "   [name, class-code, holder-index], or "
       "   [name, class-code, native-info, holder-index].";
 
@@ -630,8 +630,8 @@
     js.Name name = cls.name;
 
     Iterable<js.Name> assignments = fieldNames.map((js.Name field) {
-        return js.js("this.#field = #field", {"field": field});
-      });
+      return js.js("this.#field = #field", {"field": field});
+    });
 
     return js.js('function #(#) { # }', [name, fieldNames, assignments]);
   }
@@ -639,9 +639,12 @@
   Method _generateGetter(Field field) {
     String getterTemplateFor(int flags) {
       switch (flags) {
-        case 1: return "function() { return this[#]; }";
-        case 2: return "function(receiver) { return receiver[#]; }";
-        case 3: return "function(receiver) { return this[#]; }";
+        case 1:
+          return "function() { return this[#]; }";
+        case 2:
+          return "function(receiver) { return receiver[#]; }";
+        case 3:
+          return "function(receiver) { return this[#]; }";
       }
       return null;
     }
@@ -655,9 +658,12 @@
   Method _generateSetter(Field field) {
     String setterTemplateFor(int flags) {
       switch (flags) {
-        case 1: return "function(val) { return this[#] = val; }";
-        case 2: return "function(receiver, val) { return receiver[#] = val; }";
-        case 3: return "function(receiver, val) { return this[#] = val; }";
+        case 1:
+          return "function(val) { return this[#] = val; }";
+        case 2:
+          return "function(receiver, val) { return receiver[#] = val; }";
+        case 3:
+          return "function(receiver, val) { return this[#] = val; }";
       }
       return null;
     }
@@ -687,8 +693,10 @@
       "reference.";
 
   js.Expression emitClass(Class cls) {
-    List elements = [js.quoteName(cls.superclassName, allowNull: true),
-                     js.number(cls.superclassHolderIndex)];
+    List elements = [
+      js.quoteName(cls.superclassName, allowNull: true),
+      js.number(cls.superclassHolderIndex)
+    ];
 
     if (cls.isMixinApplication) {
       MixinApplication mixin = cls;
@@ -706,9 +714,14 @@
     Iterable<Method> typeVariableReaderStubs = cls.typeVariableReaderStubs;
     Iterable<Method> noSuchMethodStubs = cls.noSuchMethodStubs;
     Iterable<Method> gettersSetters = _generateGettersSetters(cls);
-    Iterable<Method> allMethods =
-        [methods, isChecks, callStubs, typeVariableReaderStubs,
-         noSuchMethodStubs, gettersSetters].expand((x) => x);
+    Iterable<Method> allMethods = [
+      methods,
+      isChecks,
+      callStubs,
+      typeVariableReaderStubs,
+      noSuchMethodStubs,
+      gettersSetters
+    ].expand((x) => x);
     elements.addAll(allMethods.expand(emitInstanceMethod));
 
     return unparse(compiler, new js.ArrayInitializer(elements));
@@ -811,15 +824,14 @@
           method.optionalParameterDefaultValues;
       List<js.Property> properties = <js.Property>[];
       defaultValues.forEach((String name, ConstantValue value) {
-        properties.add(new js.Property(js.string(name),
-            generateConstantReference(value)));
+        properties.add(
+            new js.Property(js.string(name), generateConstantReference(value)));
       });
       return new js.ObjectInitializer(properties);
     }
   }
 
   Iterable<js.Expression> emitInstanceMethod(Method method) {
-
     List<js.Expression> makeNameCodePair(Method method) {
       return [js.quoteName(method.name), method.code];
     }
@@ -903,8 +915,11 @@
           data.add(js.number(method.requiredParameterCount));
           data.add(_encodeOptionalParameterDefaultValues(method));
         }
-        return [js.quoteName(method.name), holderIndex,
-                new js.ArrayInitializer(data)];
+        return [
+          js.quoteName(method.name),
+          holderIndex,
+          new js.ArrayInitializer(data)
+        ];
       } else {
         method.parameterStubs.forEach(_addMethod);
       }
@@ -1255,5 +1270,4 @@
 
 })(Date.now(), #code)
 }""";
-
 }
diff --git a/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
index d3204e9..b38e403 100644
--- a/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
@@ -15,8 +15,8 @@
 
   /// Returns the code equivalent to:
   ///   `function(args) { $.startRootIsolate(X.main$closure(), args); }`
-  jsAst.Expression _buildIsolateSetupClosure(Element appMain,
-                                             Element isolateMain) {
+  jsAst.Expression _buildIsolateSetupClosure(
+      Element appMain, Element isolateMain) {
     jsAst.Expression mainAccess =
         emitterTask.isolateStaticClosureAccess(appMain);
     // Since we pass the closurized version of the main method to
@@ -30,12 +30,11 @@
     jsAst.Expression mainCallClosure = null;
     if (compiler.hasIsolateSupport) {
       Element isolateMain =
-        helpers.isolateHelperLibrary.find(BackendHelpers.START_ROOT_ISOLATE);
+          helpers.isolateHelperLibrary.find(BackendHelpers.START_ROOT_ISOLATE);
       mainCallClosure = _buildIsolateSetupClosure(main, isolateMain);
-    } else if (compiler.hasIncrementalSupport) {
+    } else if (compiler.options.hasIncrementalSupport) {
       mainCallClosure = js(
-          'function() { return #(); }',
-          emitterTask.staticFunctionAccess(main));
+          'function() { return #(); }', emitterTask.staticFunctionAccess(main));
     } else {
       mainCallClosure = emitterTask.staticFunctionAccess(main);
     }
@@ -47,7 +46,8 @@
     // onload event of all script tags and getting the first script which
     // finishes. Since onload is called immediately after execution this should
     // not substantially change execution order.
-    return js.statement('''
+    return js.statement(
+        '''
       (function (callback) {
         if (typeof document === "undefined") {
           callback(null);
@@ -79,7 +79,9 @@
           #mainCallClosure([]);
         }
       })''',
-      {'currentScript': currentScriptAccess,
-       'mainCallClosure': mainCallClosure});
+        {
+          'currentScript': currentScriptAccess,
+          'mainCallClosure': mainCallClosure
+        });
   }
 }
diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
index fdea7ff..0fc56db 100644
--- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
@@ -63,9 +63,9 @@
   _ForwardingMetadataEntry([this.debug]);
 
   _MetadataEntry get forwardTo {
-     assert(isBound);
-     return _forwardTo;
-   }
+    assert(isBound);
+    return _forwardTo;
+  }
 
   jsAst.Expression get entry {
     assert(isBound);
@@ -172,8 +172,8 @@
         }
       }
       if (metadata.isEmpty) return null;
-      return js('function() { return # }',
-          new jsAst.ArrayInitializer(metadata));
+      return js(
+          'function() { return # }', new jsAst.ArrayInitializer(metadata));
     });
   }
 
@@ -193,7 +193,7 @@
 
       ConstructorElement constructor = function;
       while (constructor.isRedirectingFactory &&
-             !constructor.isCyclicRedirection) {
+          !constructor.isCyclicRedirection) {
         // TODO(sra): Remove the loop once effectiveTarget forwards to patches.
         constructor = constructor.effectiveTarget.implementation;
       }
@@ -222,8 +222,7 @@
     return defaultValues;
   }
 
-  Map<ParameterElement, ParameterElement>
-  mapRedirectingFactoryConstructorOptionalParameters(
+  Map<ParameterElement, ParameterElement> mapRedirectingFactoryConstructorOptionalParameters(
       FunctionSignature source, FunctionSignature target) {
     var map = <ParameterElement, ParameterElement>{};
 
@@ -247,8 +246,8 @@
       int i = source.requiredParameterCount;
       for (ParameterElement element in source.orderedOptionalParameters) {
         if (i >= target.requiredParameterCount && i < target.parameterCount) {
-          map[element] =
-              target.orderedOptionalParameters[i - target.requiredParameterCount];
+          map[element] = target.orderedOptionalParameters[
+              i - target.requiredParameterCount];
         }
         ++i;
       }
@@ -267,16 +266,15 @@
   }
 
   jsAst.Expression reifyType(DartType type, {ignoreTypeVariables: false}) {
-    return reifyTypeForOutputUnit(type,
-                                  _compiler.deferredLoadTask.mainOutputUnit,
-                                  ignoreTypeVariables: ignoreTypeVariables);
+    return reifyTypeForOutputUnit(
+        type, _compiler.deferredLoadTask.mainOutputUnit,
+        ignoreTypeVariables: ignoreTypeVariables);
   }
 
-  jsAst.Expression reifyTypeForOutputUnit(DartType type,
-                                          OutputUnit outputUnit,
-                                          {ignoreTypeVariables: false}) {
+  jsAst.Expression reifyTypeForOutputUnit(DartType type, OutputUnit outputUnit,
+      {ignoreTypeVariables: false}) {
     return addTypeInOutputUnit(type, outputUnit,
-                               ignoreTypeVariables: ignoreTypeVariables);
+        ignoreTypeVariables: ignoreTypeVariables);
   }
 
   jsAst.Expression reifyName(String name) {
@@ -293,11 +291,11 @@
 
   _MetadataEntry _addGlobalMetadata(jsAst.Node node) {
     String nameToKey(jsAst.Name name) => "${name.key}";
-    String printed = jsAst.prettyPrint(
-        node, _compiler, renamerForNames: nameToKey);
+    String printed =
+        jsAst.prettyPrint(node, _compiler, renamerForNames: nameToKey);
     return _globalMetadataMap.putIfAbsent(printed, () {
       _BoundMetadataEntry result = new _BoundMetadataEntry(node);
-      if (_compiler.hasIncrementalSupport) {
+      if (_compiler.options.hasIncrementalSupport) {
         result.finalize(_globalMetadataCounter++);
       }
       return result;
@@ -305,16 +303,14 @@
   }
 
   jsAst.Expression _computeTypeRepresentation(DartType type,
-                                              {ignoreTypeVariables: false}) {
-    jsAst.Expression representation = _backend.rtiEncoder.getTypeRepresentation(
-        type,
-        (variable) {
-          if (ignoreTypeVariables) return new jsAst.LiteralNull();
-          return _typeVariableHandler.reifyTypeVariable(variable.element);
-        },
-        (TypedefType typedef) {
-          return _backend.isAccessibleByReflection(typedef.element);
-        });
+      {ignoreTypeVariables: false}) {
+    jsAst.Expression representation =
+        _backend.rtiEncoder.getTypeRepresentation(type, (variable) {
+      if (ignoreTypeVariables) return new jsAst.LiteralNull();
+      return _typeVariableHandler.reifyTypeVariable(variable.element);
+    }, (TypedefType typedef) {
+      return _backend.isAccessibleByReflection(typedef.element);
+    });
 
     if (representation is jsAst.LiteralString) {
       // We don't want the representation to be a string, since we use
@@ -324,20 +320,18 @@
     }
 
     return representation;
-
   }
 
-  jsAst.Expression addTypeInOutputUnit(DartType type,
-                                       OutputUnit outputUnit,
-                                       {ignoreTypeVariables: false}) {
+  jsAst.Expression addTypeInOutputUnit(DartType type, OutputUnit outputUnit,
+      {ignoreTypeVariables: false}) {
     if (_typesMap[outputUnit] == null) {
       _typesMap[outputUnit] = new Map<DartType, _BoundMetadataEntry>();
     }
     return _typesMap[outputUnit].putIfAbsent(type, () {
       _BoundMetadataEntry result = new _BoundMetadataEntry(
           _computeTypeRepresentation(type,
-                                     ignoreTypeVariables: ignoreTypeVariables));
-      if (_compiler.hasIncrementalSupport) {
+              ignoreTypeVariables: ignoreTypeVariables));
+      if (_compiler.options.hasIncrementalSupport) {
         result.finalize(_globalTypesCounter++);
       }
       return result;
@@ -369,14 +363,15 @@
     }
     void countTokensInTypes(Iterable<_BoundMetadataEntry> entries) {
       jsAst.TokenCounter counter = new jsAst.TokenCounter();
-      entries.where((_BoundMetadataEntry e) => e._rc > 0)
-             .map((_BoundMetadataEntry e) => e.entry)
-             .forEach(counter.countTokens);
+      entries
+          .where((_BoundMetadataEntry e) => e._rc > 0)
+          .map((_BoundMetadataEntry e) => e.entry)
+          .forEach(counter.countTokens);
     }
 
     jsAst.ArrayInitializer finalizeMap(Map<dynamic, _BoundMetadataEntry> map) {
       // When in incremental mode, we allocate entries eagerly.
-      if (_compiler.hasIncrementalSupport) {
+      if (_compiler.options.hasIncrementalSupport) {
         return new jsAst.ArrayInitializer(map.values.toList());
       }
 
@@ -394,7 +389,7 @@
       List<jsAst.Node> values =
           entries.map((_BoundMetadataEntry e) => e.entry).toList();
 
-       return new jsAst.ArrayInitializer(values);
+      return new jsAst.ArrayInitializer(values);
     }
 
     _globalMetadata.setExpression(finalizeMap(_globalMetadataMap));
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index 29ad8ae..c7adf76 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -4,19 +4,11 @@
 
 library dart2js.new_js_emitter.model;
 
-import '../common.dart';
-import '../constants/values.dart' show
-    ConstantValue;
-import '../deferred_load.dart' show
-    OutputUnit;
-import '../elements/elements.dart' show
-    Element;
-import '../js/js.dart' as js show
-    Expression,
-    Literal,
-    Name,
-    Statement,
-    TokenFinalizer;
+import '../constants/values.dart' show ConstantValue;
+import '../deferred_load.dart' show OutputUnit;
+import '../elements/elements.dart' show Element;
+import '../js/js.dart' as js
+    show Expression, Literal, Name, Statement, TokenFinalizer;
 
 import 'js_emitter.dart' show MetadataCollector;
 
@@ -26,8 +18,10 @@
   final bool outputContainsConstantList;
   final bool needsNativeSupport;
   final bool hasIsolateSupport;
+
   /// A map from load id to the list of fragments that need to be loaded.
   final Map<String, List<Fragment>> loadMap;
+
   /// A map from names to strings.
   ///
   /// This map is needed to support `const Symbol` expressions;
@@ -42,16 +36,11 @@
   final MetadataCollector _metadataCollector;
   final Iterable<js.TokenFinalizer> finalizers;
 
-  Program(this.fragments,
-          this.holders,
-          this.loadMap,
-          this.symbolsMap,
-          this.typeToInterceptorMap,
-          this._metadataCollector,
-          this.finalizers,
-          {this.needsNativeSupport,
-           this.outputContainsConstantList,
-           this.hasIsolateSupport}) {
+  Program(this.fragments, this.holders, this.loadMap, this.symbolsMap,
+      this.typeToInterceptorMap, this._metadataCollector, this.finalizers,
+      {this.needsNativeSupport,
+      this.outputContainsConstantList,
+      this.hasIsolateSupport}) {
     assert(needsNativeSupport != null);
     assert(outputContainsConstantList != null);
     assert(hasIsolateSupport != null);
@@ -122,12 +111,13 @@
   /// Output file name without extension.
   final String outputFileName;
 
-  Fragment(this.outputUnit,
-           this.outputFileName,
-           this.libraries,
-           this.staticNonFinalFields,
-           this.staticLazilyInitializedFields,
-           this.constants);
+  Fragment(
+      this.outputUnit,
+      this.outputFileName,
+      this.libraries,
+      this.staticNonFinalFields,
+      this.staticLazilyInitializedFields,
+      this.constants);
 
   bool get isMainFragment;
 }
@@ -141,19 +131,16 @@
 class MainFragment extends Fragment {
   final js.Statement invokeMain;
 
-  MainFragment(OutputUnit outputUnit,
-               String outputFileName,
-               this.invokeMain,
-               List<Library> libraries,
-               List<StaticField> staticNonFinalFields,
-               List<StaticField> staticLazilyInitializedFields,
-               List<Constant> constants)
-      : super(outputUnit,
-              outputFileName,
-              libraries,
-              staticNonFinalFields,
-              staticLazilyInitializedFields,
-              constants);
+  MainFragment(
+      OutputUnit outputUnit,
+      String outputFileName,
+      this.invokeMain,
+      List<Library> libraries,
+      List<StaticField> staticNonFinalFields,
+      List<StaticField> staticLazilyInitializedFields,
+      List<Constant> constants)
+      : super(outputUnit, outputFileName, libraries, staticNonFinalFields,
+            staticLazilyInitializedFields, constants);
 
   bool get isMainFragment => true;
 }
@@ -164,19 +151,16 @@
 class DeferredFragment extends Fragment {
   final String name;
 
-  DeferredFragment(OutputUnit outputUnit,
-                   String outputFileName,
-                   this.name,
-                   List<Library> libraries,
-                   List<StaticField> staticNonFinalFields,
-                   List<StaticField> staticLazilyInitializedFields,
-                   List<Constant> constants)
-      : super(outputUnit,
-              outputFileName,
-              libraries,
-              staticNonFinalFields,
-              staticLazilyInitializedFields,
-              constants);
+  DeferredFragment(
+      OutputUnit outputUnit,
+      String outputFileName,
+      this.name,
+      List<Library> libraries,
+      List<StaticField> staticNonFinalFields,
+      List<StaticField> staticLazilyInitializedFields,
+      List<Constant> constants)
+      : super(outputUnit, outputFileName, libraries, staticNonFinalFields,
+            staticLazilyInitializedFields, constants);
 
   bool get isMainFragment => false;
 }
@@ -205,7 +189,7 @@
   final List<Field> staticFieldsForReflection;
 
   Library(this.element, this.uri, this.statics, this.classes,
-          this.staticFieldsForReflection);
+      this.staticFieldsForReflection);
 }
 
 class StaticField {
@@ -221,9 +205,8 @@
   final bool isFinal;
   final bool isLazy;
 
-  StaticField(this.element,
-              this.name, this.holder, this.code,
-              this.isFinal, this.isLazy);
+  StaticField(this.element, this.name, this.holder, this.code, this.isFinal,
+      this.isLazy);
 }
 
 class Class implements FieldContainer {
@@ -268,19 +251,22 @@
   /// Native extensions. See [NativeEmitter.prepareNativeClasses].
   List<Class> nativeExtensions;
 
-  Class(this.element, this.name, this.holder,
-        this.methods,
-        this.fields,
-        this.staticFieldsForReflection,
-        this.callStubs,
-        this.typeVariableReaderStubs,
-        this.noSuchMethodStubs,
-        this.checkedSetters,
-        this.isChecks,
-        this.functionTypeIndex,
-        {this.onlyForRti,
-         this.isDirectlyInstantiated,
-         this.isNative}) {
+  Class(
+      this.element,
+      this.name,
+      this.holder,
+      this.methods,
+      this.fields,
+      this.staticFieldsForReflection,
+      this.callStubs,
+      this.typeVariableReaderStubs,
+      this.noSuchMethodStubs,
+      this.checkedSetters,
+      this.isChecks,
+      this.functionTypeIndex,
+      {this.onlyForRti,
+      this.isDirectlyInstantiated,
+      this.isNative}) {
     assert(onlyForRti != null);
     assert(isDirectlyInstantiated != null);
     assert(isNative != null);
@@ -293,40 +279,44 @@
     _superclass = superclass;
   }
 
-  js.Name get superclassName
-      => superclass == null ? null : superclass.name;
+  js.Name get superclassName => superclass == null ? null : superclass.name;
 
-  int get superclassHolderIndex
-      => (superclass == null) ? 0 : superclass.holder.index;
+  int get superclassHolderIndex =>
+      (superclass == null) ? 0 : superclass.holder.index;
 }
 
 class MixinApplication extends Class {
   Class _mixinClass;
 
-  MixinApplication(Element element, js.Name name, Holder holder,
-                   List<Field> instanceFields,
-                   List<Field> staticFieldsForReflection,
-                   List<StubMethod> callStubs,
-                   List<StubMethod> typeVariableReaderStubs,
-                   List<StubMethod> checkedSetters,
-                   List<StubMethod> isChecks,
-                   js.Expression functionTypeIndex,
-                   {bool onlyForRti,
-                    bool isDirectlyInstantiated})
-      : super(element,
-              name, holder,
-              const <Method>[],
-              instanceFields,
-              staticFieldsForReflection,
-              callStubs,
-              typeVariableReaderStubs,
-              const <StubMethod>[],
-              checkedSetters,
-              isChecks,
-              functionTypeIndex,
-              onlyForRti: onlyForRti,
-              isDirectlyInstantiated: isDirectlyInstantiated,
-              isNative: false);
+  MixinApplication(
+      Element element,
+      js.Name name,
+      Holder holder,
+      List<Field> instanceFields,
+      List<Field> staticFieldsForReflection,
+      List<StubMethod> callStubs,
+      List<StubMethod> typeVariableReaderStubs,
+      List<StubMethod> checkedSetters,
+      List<StubMethod> isChecks,
+      js.Expression functionTypeIndex,
+      {bool onlyForRti,
+      bool isDirectlyInstantiated})
+      : super(
+            element,
+            name,
+            holder,
+            const <Method>[],
+            instanceFields,
+            staticFieldsForReflection,
+            callStubs,
+            typeVariableReaderStubs,
+            const <StubMethod>[],
+            checkedSetters,
+            isChecks,
+            functionTypeIndex,
+            onlyForRti: onlyForRti,
+            isDirectlyInstantiated: isDirectlyInstantiated,
+            isNative: false);
 
   bool get isMixinApplication => true;
   Class get mixinClass => _mixinClass;
@@ -363,9 +353,8 @@
   final bool needsCheckedSetter;
 
   // TODO(floitsch): support renamed fields.
-  Field(this.element, this.name, this.accessorName,
-        this.getterFlags, this.setterFlags,
-        this.needsCheckedSetter);
+  Field(this.element, this.name, this.accessorName, this.getterFlags,
+      this.setterFlags, this.needsCheckedSetter);
 
   bool get needsGetter => getterFlags != 0;
   bool get needsUncheckedSetter => setterFlags != 0;
@@ -384,6 +373,7 @@
   /// The element should only be used during the transition to the new model.
   /// Uses indicate missing information in the model.
   final Element element;
+
   /// The name of the method. If the method is a [ParameterStubMethod] for a
   /// static function, then the name can be `null`. In that case, only the
   /// [ParameterStubMethod.callName] should be used.
@@ -419,17 +409,21 @@
   final js.Name callName;
 
   DartMethod(Element element, js.Name name, js.Expression code,
-             this.parameterStubs, this.callName,
-             {this.needsTearOff, this.tearOffName, this.canBeApplied,
-              this.canBeReflected, this.requiredParameterCount,
-              this.optionalParameterDefaultValues, this.functionType})
+      this.parameterStubs, this.callName,
+      {this.needsTearOff,
+      this.tearOffName,
+      this.canBeApplied,
+      this.canBeReflected,
+      this.requiredParameterCount,
+      this.optionalParameterDefaultValues,
+      this.functionType})
       : super(element, name, code) {
     assert(needsTearOff != null);
     assert(!needsTearOff || tearOffName != null);
     assert(canBeApplied != null);
     assert(canBeReflected != null);
     assert((!canBeReflected && !canBeApplied) ||
-           (requiredParameterCount != null &&
+        (requiredParameterCount != null &&
             optionalParameterDefaultValues != null));
   }
 
@@ -448,27 +442,25 @@
   /// functions that can be torn off.
   final bool isClosureCallMethod;
 
-
   InstanceMethod(Element element, js.Name name, js.Expression code,
-                 List<ParameterStubMethod> parameterStubs,
-                 js.Name callName,
-                 {bool needsTearOff,
-                  js.Name tearOffName,
-                  this.aliasName,
-                  bool canBeApplied,
-                  bool canBeReflected,
-                  int requiredParameterCount,
-                  /* List | Map */ optionalParameterDefaultValues,
-                  this.isClosureCallMethod,
-                  js.Expression functionType})
+      List<ParameterStubMethod> parameterStubs, js.Name callName,
+      {bool needsTearOff,
+      js.Name tearOffName,
+      this.aliasName,
+      bool canBeApplied,
+      bool canBeReflected,
+      int requiredParameterCount,
+      /* List | Map */ optionalParameterDefaultValues,
+      this.isClosureCallMethod,
+      js.Expression functionType})
       : super(element, name, code, parameterStubs, callName,
-              needsTearOff: needsTearOff,
-              tearOffName: tearOffName,
-              canBeApplied: canBeApplied,
-              canBeReflected: canBeReflected,
-              requiredParameterCount: requiredParameterCount,
-              optionalParameterDefaultValues: optionalParameterDefaultValues,
-              functionType: functionType) {
+            needsTearOff: needsTearOff,
+            tearOffName: tearOffName,
+            canBeApplied: canBeApplied,
+            canBeReflected: canBeReflected,
+            requiredParameterCount: requiredParameterCount,
+            optionalParameterDefaultValues: optionalParameterDefaultValues,
+            functionType: functionType) {
     assert(isClosureCallMethod != null);
   }
 
@@ -479,8 +471,7 @@
 /// to a method in the original Dart program. Examples are getter and setter
 /// stubs and stubs to dispatch calls to methods with optional parameters.
 class StubMethod extends Method {
-  StubMethod(js.Name name, js.Expression code,
-             {Element element})
+  StubMethod(js.Name name, js.Expression code, {Element element})
       : super(element, name, code);
 }
 
@@ -512,22 +503,28 @@
 class StaticDartMethod extends DartMethod implements StaticMethod {
   final Holder holder;
 
-  StaticDartMethod(Element element, js.Name name, this.holder,
-                   js.Expression code, List<ParameterStubMethod> parameterStubs,
-                   js.Name callName,
-                   {bool needsTearOff, js.Name tearOffName,
-                    bool canBeApplied, bool canBeReflected,
-                    int requiredParameterCount,
-                    /* List | Map */ optionalParameterDefaultValues,
-                    js.Expression functionType})
+  StaticDartMethod(
+      Element element,
+      js.Name name,
+      this.holder,
+      js.Expression code,
+      List<ParameterStubMethod> parameterStubs,
+      js.Name callName,
+      {bool needsTearOff,
+      js.Name tearOffName,
+      bool canBeApplied,
+      bool canBeReflected,
+      int requiredParameterCount,
+      /* List | Map */ optionalParameterDefaultValues,
+      js.Expression functionType})
       : super(element, name, code, parameterStubs, callName,
-              needsTearOff: needsTearOff,
-              tearOffName : tearOffName,
-              canBeApplied : canBeApplied,
-              canBeReflected : canBeReflected,
-              requiredParameterCount: requiredParameterCount,
-              optionalParameterDefaultValues: optionalParameterDefaultValues,
-              functionType: functionType);
+            needsTearOff: needsTearOff,
+            tearOffName: tearOffName,
+            canBeApplied: canBeApplied,
+            canBeReflected: canBeReflected,
+            requiredParameterCount: requiredParameterCount,
+            optionalParameterDefaultValues: optionalParameterDefaultValues,
+            functionType: functionType);
 
   bool get isStatic => true;
 }
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index 378b4a53..6377d27 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -5,7 +5,6 @@
 part of dart2js.js_emitter;
 
 class NativeEmitter {
-
   // TODO(floitsch): the native-emitter should not know about ClassBuilders.
   final Map<Element, full_js_emitter.ClassBuilder> cachedBuilders;
 
@@ -71,7 +70,8 @@
    * [classesModifiedByEmitRTISupport] contains the list of classes that must
    * exist, because runtime-type support adds information to the class.
    */
-  Set<Class> prepareNativeClasses(List<Class> classes,
+  Set<Class> prepareNativeClasses(
+      List<Class> classes,
       Set<ClassElement> interceptorClassesNeededByConstants,
       Set<ClassElement> classesModifiedByEmitRTISupport) {
     assert(classes.every((Class cls) => cls != null));
@@ -137,9 +137,9 @@
         needed = true;
       }
       if (backend.isJsInterop(classElement)) {
-        needed = true;  // TODO(jacobr): we don't need all interop classes.
+        needed = true; // TODO(jacobr): we don't need all interop classes.
       } else if (cls.isNative &&
-                 backend.hasNativeTagsForcedNonLeaf(classElement)) {
+          backend.nativeData.hasNativeTagsForcedNonLeaf(classElement)) {
         needed = true;
         nonLeafClasses.add(cls);
       }
@@ -159,10 +159,10 @@
     for (Class cls in classes) {
       if (!cls.isNative) continue;
       if (backend.isJsInterop(cls.element)) continue;
-      List<String> nativeTags = backend.getNativeTagsOfClass(cls.element);
+      List<String> nativeTags =
+          backend.nativeData.getNativeTagsOfClass(cls.element);
 
-      if (nonLeafClasses.contains(cls) ||
-          extensionPoints.containsKey(cls)) {
+      if (nonLeafClasses.contains(cls) || extensionPoints.containsKey(cls)) {
         nonleafTags
             .putIfAbsent(cls, () => new Set<String>())
             .addAll(nativeTags);
@@ -236,9 +236,7 @@
       if (cls.isNative) continue;
       Class nativeAncestor = nativeAncestorOf(cls);
       if (nativeAncestor != null) {
-        map
-          .putIfAbsent(nativeAncestor, () => <Class>[])
-          .add(cls);
+        map.putIfAbsent(nativeAncestor, () => <Class>[]).add(cls);
       }
     }
     return map;
@@ -251,18 +249,15 @@
           field.needsCheckedSetter;
     }
 
-    return
-        cls.methods.isEmpty &&
+    return cls.methods.isEmpty &&
         cls.isChecks.isEmpty &&
         cls.callStubs.isEmpty &&
         !cls.superclass.isMixinApplication &&
         !cls.fields.any(needsAccessor);
   }
 
-  void potentiallyConvertDartClosuresToJs(
-      List<jsAst.Statement> statements,
-      FunctionElement member,
-      List<jsAst.Parameter> stubParameters) {
+  void potentiallyConvertDartClosuresToJs(List<jsAst.Statement> statements,
+      FunctionElement member, List<jsAst.Parameter> stubParameters) {
     FunctionSignature parameters = member.functionSignature;
     Element converter = helpers.closureConverter;
     jsAst.Expression closureConverter =
@@ -279,9 +274,8 @@
             // typedef(s).
             FunctionType functionType = type;
             int arity = functionType.computeArity();
-            statements.add(
-                js.statement('# = #(#, $arity)',
-                    [name, closureConverter, name]));
+            statements.add(js
+                .statement('# = #(#, $arity)', [name, closureConverter, name]));
             break;
           }
         }
@@ -315,17 +309,17 @@
     assert(invariant(member, nativeMethods.contains(member)));
     // When calling a JS method, we call it with the native name, and only the
     // arguments up until the last one provided.
-    target = backend.getFixedBackendName(member);
+    target = backend.nativeData.getFixedBackendName(member);
 
     if (isInterceptedMethod) {
       receiver = argumentsBuffer[0];
-      arguments = argumentsBuffer.sublist(1,
-          indexOfLastOptionalArgumentInParameters + 1);
+      arguments = argumentsBuffer.sublist(
+          1, indexOfLastOptionalArgumentInParameters + 1);
     } else {
       // Native methods that are not intercepted must be static.
       assert(invariant(member, member.isStatic));
-      arguments = argumentsBuffer.sublist(0,
-          indexOfLastOptionalArgumentInParameters + 1);
+      arguments = argumentsBuffer.sublist(
+          0, indexOfLastOptionalArgumentInParameters + 1);
       if (backend.isJsInterop(member)) {
         // fixedBackendPath is allowed to have the form foo.bar.baz for
         // interop. This template is uncached to avoid possibly running out of
@@ -333,14 +327,15 @@
         // caching these templates causing an issue  is very low as each class
         // and library that uses typed JavaScript interop will create only 1
         // unique template.
-        receiver = js.uncachedExpressionTemplate(
-            backend.namer.fixedBackendPath(member)).instantiate([]);
+        receiver = js
+            .uncachedExpressionTemplate(backend.namer.fixedBackendPath(member))
+            .instantiate([]);
       } else {
         receiver = js('this');
       }
     }
-    statements.add(
-        js.statement('return #.#(#)', [receiver, target, arguments]));
+    statements
+        .add(js.statement('return #.#(#)', [receiver, target, arguments]));
 
     return statements;
   }
@@ -365,4 +360,4 @@
     if (backend.isNativeOrExtendsNative(cls)) return true;
     return isSupertypeOfNativeClass(element);
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/js_emitter/native_generator.dart b/pkg/compiler/lib/src/js_emitter/native_generator.dart
index fd15d8a..4dfa36c 100644
--- a/pkg/compiler/lib/src/js_emitter/native_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_generator.dart
@@ -5,7 +5,6 @@
 part of dart2js.js_emitter;
 
 class NativeGenerator {
-
   static bool needsIsolateAffinityTagInitialization(JavaScriptBackend backend) {
     return backend.needToInitializeIsolateAffinityTag;
   }
@@ -27,7 +26,8 @@
     jsAst.Expression dispatchPropertyNameAccess =
         generateEmbeddedGlobalAccess(embeddedNames.DISPATCH_PROPERTY_NAME);
 
-    return js.statement('''
+    return js.statement(
+        '''
       !function() {
         var intern = #internStringFunction;
 
@@ -56,11 +56,14 @@
         }
       }();
     ''',
-    {'initializeDispatchProperty': backend.needToInitializeDispatchProperty,
-     'internStringFunction': internStringFunction,
-     'getIsolateTag': getIsolateTagAccess,
-     'isolateTag': isolateTagAccess,
-     'dispatchPropertyName': dispatchPropertyNameAccess});
+        {
+          'initializeDispatchProperty':
+              backend.needToInitializeDispatchProperty,
+          'internStringFunction': internStringFunction,
+          'getIsolateTag': getIsolateTagAccess,
+          'isolateTag': isolateTagAccess,
+          'dispatchPropertyName': dispatchPropertyNameAccess
+        });
   }
 
   static String generateIsolateTagRoot() {
@@ -83,8 +86,7 @@
 
     String formatTags(Iterable<String> tags) {
       if (tags == null) return '';
-      return (tags.toList()
-        ..sort()).join('|');
+      return (tags.toList()..sort()).join('|');
     }
 
     String leafStr = formatTags(leafTags);
@@ -92,9 +94,7 @@
 
     StringBuffer sb = new StringBuffer(leafStr);
     if (nonLeafStr != '') {
-      sb
-        ..write(';')
-        ..write(nonLeafStr);
+      sb..write(';')..write(nonLeafStr);
     }
 
     String encoding = sb.toString();
@@ -104,9 +104,8 @@
       if (extensions != null) {
         parts
           ..add(js.stringPart(';'))
-          ..addAll(
-            js.joinLiterals(extensions.map((Class cls) => cls.name),
-            js.stringPart('|')));
+          ..addAll(js.joinLiterals(
+              extensions.map((Class cls) => cls.name), js.stringPart('|')));
       }
       return jsAst.concatenateStrings(parts, addQuotes: true);
     }
@@ -148,7 +147,8 @@
       jsAst.Expression leafTagsAccess) {
     jsAst.Expression subclassRead =
         subclassReadGenerator(js('subclasses[i]', []));
-    return js.statement('''
+    return js.statement(
+        '''
           // The native info looks like this:
           //
           // HtmlElement: {
@@ -196,12 +196,15 @@
               }
             }
           }
-    ''', {'info': infoAccess,
+    ''',
+        {
+          'info': infoAccess,
           'constructor': constructorAccess,
           'subclassRead': subclassRead,
           'interceptorsByTagAccess': interceptorsByTagAccess,
           'leafTagsAccess': leafTagsAccess,
           'nativeSuperclassTagName': embeddedNames.NATIVE_SUPERCLASS_TAG_NAME,
-          'allowNativesSubclassing': true});
+          'allowNativesSubclassing': true
+        });
   }
 }
diff --git a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
index c006e05..bc1de29 100644
--- a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
@@ -18,7 +18,7 @@
   DiagnosticReporter get reporter => compiler.reporter;
 
   bool needsSuperGetter(FunctionElement element) =>
-    compiler.codegenWorld.methodsNeedingSuperGetter.contains(element);
+      compiler.codegenWorld.methodsNeedingSuperGetter.contains(element);
 
   /**
    * Generates stubs to handle invocation of methods with optional
@@ -36,9 +36,8 @@
    * name [ParameterStubMethod.name] and [ParameterStubMethod.callName] set if
    * the input selector is non-null (and the member needs a stub).
    */
-  ParameterStubMethod generateParameterStub(FunctionElement member,
-                                            Selector selector,
-                                            Selector callSelector) {
+  ParameterStubMethod generateParameterStub(
+      FunctionElement member, Selector selector, Selector callSelector) {
     CallStructure callStructure = selector.callStructure;
     FunctionSignature parameters = member.functionSignature;
     int positionalArgumentCount = callStructure.positionalArgumentCount;
@@ -69,9 +68,8 @@
     List<jsAst.Parameter> parametersBuffer =
         new List<jsAst.Parameter>(selector.argumentCount + extraArgumentCount);
     // The arguments that will be passed to the real method.
-    List<jsAst.Expression> argumentsBuffer =
-        new List<jsAst.Expression>(
-            parameters.parameterCount + extraArgumentCount);
+    List<jsAst.Expression> argumentsBuffer = new List<jsAst.Expression>(
+        parameters.parameterCount + extraArgumentCount);
 
     int count = 0;
     if (isInterceptedMethod) {
@@ -117,11 +115,14 @@
       count++;
     });
 
-    var body;  // List or jsAst.Statement.
-    if (backend.hasFixedBackendName(member)) {
+    var body; // List or jsAst.Statement.
+    if (backend.nativeData.hasFixedBackendName(member)) {
       body = emitterTask.nativeEmitter.generateParameterStubStatements(
-          member, isInterceptedMethod, namer.invocationName(selector),
-          parametersBuffer, argumentsBuffer,
+          member,
+          isInterceptedMethod,
+          namer.invocationName(selector),
+          parametersBuffer,
+          argumentsBuffer,
           indexOfLastOptionalArgumentInParameters);
     } else if (member.isInstanceMember) {
       if (needsSuperGetter(member)) {
@@ -131,15 +132,14 @@
         // We thus can't just invoke `this.foo$1.call(filledInArguments)`.
         // Instead we need to call the statically resolved target.
         //   `<class>.prototype.bar$1.call(this, argument0, ...)`.
-        body = js.statement(
-            'return #.#.call(this, #);',
-            [backend.emitter.prototypeAccess(superClass,
-                                             hasBeenInstantiated: true),
-             methodName,
-             argumentsBuffer]);
+        body = js.statement('return #.#.call(this, #);', [
+          backend.emitter
+              .prototypeAccess(superClass, hasBeenInstantiated: true),
+          methodName,
+          argumentsBuffer
+        ]);
       } else {
-        body = js.statement(
-            'return this.#(#);',
+        body = js.statement('return this.#(#);',
             [namer.instanceMethodName(member), argumentsBuffer]);
       }
     } else {
@@ -187,7 +187,7 @@
   // (2) foo$3$c(a, b, c) => MyClass.foo$4$c$d(this, a, b, c, null);
   // (3) foo$3$d(a, b, d) => MyClass.foo$4$c$d(this, a, b, null, d);
   List<ParameterStubMethod> generateParameterStubs(MethodElement member,
-                                                   {bool canTearOff: true}) {
+      {bool canTearOff: true}) {
     if (member.enclosingElement.isClosure) {
       ClosureClassElement cls = member.enclosingElement;
       if (cls.supertype.element == backend.helpers.boundClosureClass) {
@@ -212,7 +212,7 @@
 
     // Only instance members (not static methods) need stubs.
     if (member.isInstanceMember) {
-        selectors = compiler.codegenWorld.invocationsByName(member.name);
+      selectors = compiler.codegenWorld.invocationsByName(member.name);
     }
 
     if (canTearOff) {
@@ -222,8 +222,8 @@
 
     assert(emptySelectorSet.isEmpty);
     if (selectors == null) selectors = const <Selector, SelectorConstraints>{};
-    if (callSelectors == null) callSelectors =
-        const <Selector, SelectorConstraints>{};
+    if (callSelectors == null)
+      callSelectors = const <Selector, SelectorConstraints>{};
 
     List<ParameterStubMethod> stubs = <ParameterStubMethod>[];
 
@@ -244,9 +244,8 @@
     // Start with the callSelectors since they imply the generation of the
     // non-call version.
     for (Selector selector in callSelectors.keys) {
-      Selector renamedSelector = new Selector.call(
-          member.memberName,
-          selector.callStructure);
+      Selector renamedSelector =
+          new Selector.call(member.memberName, selector.callStructure);
       renamedCallSelectors.add(renamedSelector);
 
       if (!renamedSelector.appliesUnnamed(member, compiler.world)) continue;
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 268d671..6c76418 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart
@@ -76,19 +76,18 @@
     // Go over specialized interceptors and then constants to know which
     // interceptors are needed.
     Set<ClassElement> needed = new Set<ClassElement>();
-    backend.specializedGetInterceptors.forEach(
-        (_, Iterable<ClassElement> elements) {
-          needed.addAll(elements);
-        }
-    );
+    backend.specializedGetInterceptors
+        .forEach((_, Iterable<ClassElement> elements) {
+      needed.addAll(elements);
+    });
 
     // Add interceptors referenced by constants.
     needed.addAll(computeInterceptorsReferencedFromConstants());
 
     // Add unneeded interceptors to the [unneededClasses] set.
     for (ClassElement interceptor in backend.interceptedClasses) {
-      if (!needed.contains(interceptor)
-          && interceptor != coreClasses.objectClass) {
+      if (!needed.contains(interceptor) &&
+          interceptor != coreClasses.objectClass) {
         unneededClasses.add(interceptor);
       }
     }
@@ -117,11 +116,12 @@
         if (backend.isAccessibleByReflection(element)) {
           bool shouldRetainMetadata = backend.retainMetadataOf(element);
           if (shouldRetainMetadata &&
-              (element.isFunction || element.isConstructor ||
-               element.isSetter)) {
+              (element.isFunction ||
+                  element.isConstructor ||
+                  element.isSetter)) {
             FunctionElement function = element;
-            function.functionSignature.forEachParameter(
-                backend.retainMetadataOf);
+            function.functionSignature
+                .forEachParameter(backend.retainMetadataOf);
           }
         }
       }
@@ -130,12 +130,8 @@
         if (!onlyForRti) {
           backend.retainMetadataOf(cls);
           new FieldVisitor(compiler, namer).visitFields(cls, false,
-              (Element member,
-               js.Name name,
-               js.Name accessorName,
-               bool needsGetter,
-               bool needsSetter,
-               bool needsCheckedSetter) {
+              (Element member, js.Name name, js.Name accessorName,
+                  bool needsGetter, bool needsSetter, bool needsCheckedSetter) {
             bool needsAccessor = needsGetter || needsSetter;
             if (needsAccessor && backend.isAccessibleByReflection(member)) {
               backend.retainMetadataOf(member);
@@ -147,8 +143,8 @@
     }
 
     JavaScriptConstantCompiler handler = backend.constants;
-    List<ConstantValue> constants = handler.getConstantsForEmission(
-        compiler.hasIncrementalSupport ? null : emitter.compareConstants);
+    List<ConstantValue> constants = handler.getConstantsForEmission(compiler
+        .options.hasIncrementalSupport ? null : emitter.compareConstants);
     for (ConstantValue constant in constants) {
       if (emitter.isConstantInlinedOrAlreadyEmitted(constant)) continue;
 
@@ -162,23 +158,25 @@
         // TODO(sigurdm): We should track those constants.
         constantUnit = compiler.deferredLoadTask.mainOutputUnit;
       }
-      outputConstantLists.putIfAbsent(
-          constantUnit, () => new List<ConstantValue>()).add(constant);
+      outputConstantLists
+          .putIfAbsent(constantUnit, () => new List<ConstantValue>())
+          .add(constant);
     }
   }
 
   /// Compute all the classes and typedefs that must be emitted.
   void computeNeededDeclarations() {
     // Compute needed typedefs.
-    typedefsNeededForReflection = Elements.sortedByPosition(
-        compiler.world.allTypedefs
-            .where(backend.isAccessibleByReflection)
-            .toList());
+    typedefsNeededForReflection = Elements.sortedByPosition(compiler
+        .world.allTypedefs
+        .where(backend.isAccessibleByReflection)
+        .toList());
 
     // Compute needed classes.
-    Set<ClassElement> instantiatedClasses =
-        compiler.codegenWorld.directlyInstantiatedClasses
-            .where(computeClassFilter()).toSet();
+    Set<ClassElement> instantiatedClasses = compiler
+        .codegenWorld.directlyInstantiatedClasses
+        .where(computeClassFilter())
+        .toSet();
 
     void addClassWithSuperclasses(ClassElement cls) {
       neededClasses.add(cls);
@@ -244,14 +242,17 @@
           !classesOnlyNeededForRti.contains(element)) {
         // For now, native classes and related classes cannot be deferred.
         nativeClassesAndSubclasses.add(element);
-        assert(invariant(element,
-                         !compiler.deferredLoadTask.isDeferred(element)));
-        outputClassLists.putIfAbsent(compiler.deferredLoadTask.mainOutputUnit,
-            () => new List<ClassElement>()).add(element);
+        assert(
+            invariant(element, !compiler.deferredLoadTask.isDeferred(element)));
+        outputClassLists
+            .putIfAbsent(compiler.deferredLoadTask.mainOutputUnit,
+                () => new List<ClassElement>())
+            .add(element);
       } else {
-        outputClassLists.putIfAbsent(
-            compiler.deferredLoadTask.outputUnitForElement(element),
-            () => new List<ClassElement>())
+        outputClassLists
+            .putIfAbsent(
+                compiler.deferredLoadTask.outputUnitForElement(element),
+                () => new List<ClassElement>())
             .add(element);
       }
     }
@@ -277,7 +278,7 @@
     addToOutputUnit(Element element) {
       List<VariableElement> list = outputStaticNonFinalFieldLists.putIfAbsent(
           compiler.deferredLoadTask.outputUnitForElement(element),
-              () => new List<VariableElement>());
+          () => new List<VariableElement>());
       list.add(element);
     }
 
@@ -299,7 +300,8 @@
     void addSurroundingLibraryToSet(Element element) {
       OutputUnit unit = compiler.deferredLoadTask.outputUnitForElement(element);
       LibraryElement library = element.library;
-      outputLibraryLists.putIfAbsent(unit, () => new Set<LibraryElement>())
+      outputLibraryLists
+          .putIfAbsent(unit, () => new Set<LibraryElement>())
           .add(library);
     }
 
@@ -314,4 +316,4 @@
     computeNeededStaticNonFinalFields();
     computeNeededLibraries();
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart b/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
index 894bd92..935fa5f 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
@@ -22,13 +22,13 @@
  * case, [needsSetter] is always false. [needsCheckedSetter] is only true when
  * type assertions are enabled (checked mode).
  */
-typedef void AcceptField(VariableElement member,
-                         js.Name name,
-                         js.Name accessorName,
-                         bool needsGetter,
-                         bool needsSetter,
-                         bool needsCheckedSetter);
-
+typedef void AcceptField(
+    VariableElement member,
+    js.Name name,
+    js.Name accessorName,
+    bool needsGetter,
+    bool needsSetter,
+    bool needsCheckedSetter);
 
 class FieldVisitor {
   final Compiler compiler;
@@ -93,15 +93,15 @@
         needsSetter = fieldNeedsSetter(field);
       }
 
-      if ((isInstantiated && !backend.isNative(holder))
-          || needsGetter
-          || needsSetter) {
+      if ((isInstantiated && !backend.isNative(holder)) ||
+          needsGetter ||
+          needsSetter) {
         js.Name accessorName = namer.fieldAccessorName(field);
         js.Name fieldName = namer.fieldPropertyName(field);
         bool needsCheckedSetter = false;
-        if (compiler.enableTypeAssertions
-            && needsSetter
-            && !canAvoidGeneratedCheckedSetter(field)) {
+        if (compiler.options.enableTypeAssertions &&
+            needsSetter &&
+            !canAvoidGeneratedCheckedSetter(field)) {
           needsCheckedSetter = true;
           needsSetter = false;
         }
@@ -130,8 +130,8 @@
       // generate the field getter/setter dynamically. Since this is only
       // allowed on fields that are in [element] we don't need to visit
       // superclasses for non-instantiated classes.
-      cls.implementation.forEachInstanceField(
-          visitField, includeSuperAndInjectedMembers: isInstantiated);
+      cls.implementation.forEachInstanceField(visitField,
+          includeSuperAndInjectedMembers: isInstantiated);
     }
   }
 
@@ -140,7 +140,7 @@
     if (fieldAccessNeverThrows(field)) return false;
     if (backend.shouldRetainGetter(field)) return true;
     return field.isClassMember &&
-    compiler.codegenWorld.hasInvokedGetter(field, compiler.world);
+        compiler.codegenWorld.hasInvokedGetter(field, compiler.world);
   }
 
   bool fieldNeedsSetter(VariableElement field) {
@@ -154,11 +154,11 @@
 
   static bool fieldAccessNeverThrows(VariableElement field) {
     return
-      // We never access a field in a closure (a captured variable) without
-      // knowing that it is there.  Therefore we don't need to use a getter
-      // (that will throw if the getter method is missing), but can always
-      // access the field directly.
-      field is ClosureFieldElement;
+        // We never access a field in a closure (a captured variable) without
+        // knowing that it is there.  Therefore we don't need to use a getter
+        // (that will throw if the getter method is missing), but can always
+        // access the field directly.
+        field is ClosureFieldElement;
   }
 
   bool canAvoidGeneratedCheckedSetter(VariableElement member) {
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 42f7138..5d5afe6 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
@@ -4,65 +4,49 @@
 
 library dart2js.js_emitter.program_builder;
 
-import '../js_emitter.dart' show
-    ClassStubGenerator,
-    CodeEmitterTask,
-    computeMixinClass,
-    Emitter,
-    InterceptorStubGenerator,
-    MainCallStubGenerator,
-    ParameterStubGenerator,
-    RuntimeTypeGenerator,
-    TypeTestProperties;
+import '../js_emitter.dart'
+    show
+        ClassStubGenerator,
+        CodeEmitterTask,
+        computeMixinClass,
+        Emitter,
+        InterceptorStubGenerator,
+        MainCallStubGenerator,
+        ParameterStubGenerator,
+        RuntimeTypeGenerator,
+        TypeTestProperties;
 import '../model.dart';
 
-import '../../closure.dart' show
-    ClosureFieldElement;
+import '../../closure.dart' show ClosureFieldElement;
 import '../../common.dart';
-import '../../common/names.dart' show
-    Names,
-    Selectors;
-import '../../compiler.dart' show
-    Compiler;
-import '../../constants/values.dart' show
-    ConstantValue,
-    InterceptorConstantValue;
-import '../../core_types.dart' show
-    CoreClasses;
-import '../../dart_types.dart' show
-    DartType,
-    FunctionType,
-    TypedefType;
-import '../../elements/elements.dart' show
-    ClassElement,
-    Element,
-    Elements,
-    FieldElement,
-    FunctionElement,
-    FunctionSignature,
-    GetterElement,
-    LibraryElement,
-    MethodElement,
-    Name,
-    ParameterElement,
-    TypedefElement,
-    VariableElement;
+import '../../common/names.dart' show Names, Selectors;
+import '../../compiler.dart' show Compiler;
+import '../../constants/values.dart'
+    show ConstantValue, InterceptorConstantValue;
+import '../../core_types.dart' show CoreClasses;
+import '../../dart_types.dart' show DartType, FunctionType, TypedefType;
+import '../../elements/elements.dart'
+    show
+        ClassElement,
+        Element,
+        Elements,
+        FieldElement,
+        FunctionElement,
+        FunctionSignature,
+        GetterElement,
+        LibraryElement,
+        MethodElement,
+        Name,
+        ParameterElement,
+        TypedefElement,
+        VariableElement;
 import '../../js/js.dart' as js;
-import '../../js_backend/backend_helpers.dart' show
-    BackendHelpers;
-import '../../js_backend/js_backend.dart' show
-    Namer,
-    JavaScriptBackend,
-    JavaScriptConstantCompiler,
-    StringBackedName;
-import '../../universe/selector.dart' show
-    Selector;
-import '../../universe/universe.dart' show
-    Universe,
-    SelectorConstraints;
-import '../../deferred_load.dart' show
-    DeferredLoadTask,
-    OutputUnit;
+import '../../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../../js_backend/js_backend.dart'
+    show Namer, JavaScriptBackend, JavaScriptConstantCompiler, StringBackedName;
+import '../../universe/selector.dart' show Selector;
+import '../../universe/universe.dart' show Universe, SelectorConstraints;
+import '../../deferred_load.dart' show DeferredLoadTask, OutputUnit;
 
 part 'collector.dart';
 part 'registry.dart';
@@ -87,11 +71,8 @@
   /// True if the program should store function types in the metadata.
   bool _storeFunctionTypesInMetadata = false;
 
-  ProgramBuilder(Compiler compiler,
-                 Namer namer,
-                 this._task,
-                 Emitter emitter,
-                 Set<ClassElement> rtiNeededClasses)
+  ProgramBuilder(Compiler compiler, Namer namer, this._task, Emitter emitter,
+      Set<ClassElement> rtiNeededClasses)
       : this._compiler = compiler,
         this.namer = namer,
         this.collector =
@@ -130,13 +111,13 @@
     // Note: In rare cases (mostly tests) output units can be empty. This
     // happens when the deferred code is dead-code eliminated but we still need
     // to check that the library has been loaded.
-    _compiler.deferredLoadTask.allOutputUnits.forEach(
-        _registry.registerOutputUnit);
+    _compiler.deferredLoadTask.allOutputUnits
+        .forEach(_registry.registerOutputUnit);
     collector.outputClassLists.forEach(_registry.registerElements);
     collector.outputStaticLists.forEach(_registry.registerElements);
     collector.outputConstantLists.forEach(_registerConstants);
-    collector.outputStaticNonFinalFieldLists.forEach(
-        _registry.registerElements);
+    collector.outputStaticNonFinalFieldLists
+        .forEach(_registry.registerElements);
 
     // We always add the current isolate holder.
     _registerStaticStateHolder();
@@ -144,7 +125,8 @@
     // We need to run the native-preparation before we build the output. The
     // preparation code, in turn needs the classes to be set up.
     // We thus build the classes before building their containers.
-    collector.outputClassLists.forEach((OutputUnit _, List<ClassElement> classes) {
+    collector.outputClassLists
+        .forEach((OutputUnit _, List<ClassElement> classes) {
       classes.forEach(_buildClass);
     });
 
@@ -169,9 +151,9 @@
     Set<ClassElement> classesModifiedByEmitRTISupport =
         _task.typeTestRegistry.computeClassesModifiedByEmitRuntimeTypeSupport();
 
-
     _unneededNativeClasses = _task.nativeEmitter.prepareNativeClasses(
-        nativeClasses, interceptorClassesNeededByConstants,
+        nativeClasses,
+        interceptorClassesNeededByConstants,
         classesModifiedByEmitRTISupport);
 
     _addJsInteropStubs(_registry.mainLibrariesMap);
@@ -199,14 +181,8 @@
       finalizers.add(namingFinalizer);
     }
 
-    return new Program(
-        fragments,
-        holders,
-        _buildLoadMap(),
-        _symbolsMap,
-        _buildTypeToInterceptorMap(),
-        _task.metadataCollector,
-        finalizers,
+    return new Program(fragments, holders, _buildLoadMap(), _symbolsMap,
+        _buildTypeToInterceptorMap(), _task.metadataCollector, finalizers,
         needsNativeSupport: needsNativeSupport,
         outputContainsConstantList: collector.outputContainsConstantList,
         hasIsolateSupport: _compiler.hasIsolateSupport);
@@ -238,7 +214,7 @@
     // Construct the main output from the libraries and the registered holders.
     MainFragment result = new MainFragment(
         librariesMap.outputUnit,
-        "",  // The empty string is the name for the main output file.
+        "", // The empty string is the name for the main output file.
         _buildInvokeMain(),
         _buildLibraries(librariesMap),
         _buildStaticNonFinalFields(librariesMap),
@@ -260,7 +236,7 @@
     DeferredFragment result = new DeferredFragment(
         librariesMap.outputUnit,
         backend.deferredPartFileName(librariesMap.name, addExtension: false),
-                                     librariesMap.name,
+        librariesMap.name,
         _buildLibraries(librariesMap),
         _buildStaticNonFinalFields(librariesMap),
         _buildStaticLazilyInitializedFields(librariesMap),
@@ -273,18 +249,17 @@
     List<ConstantValue> constantValues =
         collector.outputConstantLists[librariesMap.outputUnit];
     if (constantValues == null) return const <Constant>[];
-    return constantValues.map((ConstantValue value) => _constants[value])
+    return constantValues
+        .map((ConstantValue value) => _constants[value])
         .toList(growable: false);
   }
 
   List<StaticField> _buildStaticNonFinalFields(LibrariesMap librariesMap) {
     List<VariableElement> staticNonFinalFields =
-         collector.outputStaticNonFinalFieldLists[librariesMap.outputUnit];
+        collector.outputStaticNonFinalFieldLists[librariesMap.outputUnit];
     if (staticNonFinalFields == null) return const <StaticField>[];
 
-    return staticNonFinalFields
-        .map(_buildStaticField)
-        .toList(growable: false);
+    return staticNonFinalFields.map(_buildStaticField).toList(growable: false);
   }
 
   StaticField _buildStaticField(Element element) {
@@ -292,8 +267,8 @@
     ConstantValue initialValue = handler.getInitialValueFor(element);
     // TODO(zarah): The holder should not be registered during building of
     // a static field.
-    _registry.registerHolder(
-        namer.globalObjectForConstant(initialValue), isConstantsHolder: true);
+    _registry.registerHolder(namer.globalObjectForConstant(initialValue),
+        isConstantsHolder: true);
     js.Expression code = _task.emitter.constantReference(initialValue);
     js.Name name = namer.globalPropertyName(element);
     bool isFinal = false;
@@ -303,9 +278,8 @@
     // 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, _registerStaticStateHolder(), code,
-                           isFinal, isLazy);
+    return new StaticField(
+        element, name, _registerStaticStateHolder(), code, isFinal, isLazy);
   }
 
   List<StaticField> _buildStaticLazilyInitializedFields(
@@ -316,9 +290,10 @@
         .getLazilyInitializedFieldsForEmission()
         .where((element) =>
             loadTask.outputUnitForElement(element) == librariesMap.outputUnit);
-    return Elements.sortedByPosition(lazyFields)
+    return Elements
+        .sortedByPosition(lazyFields)
         .map(_buildLazyField)
-        .where((field) => field != null)  // Happens when the field was unused.
+        .where((field) => field != null) // Happens when the field was unused.
         .toList(growable: false);
   }
 
@@ -336,9 +311,8 @@
     // 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, _registerStaticStateHolder(), code,
-                           isFinal, isLazy);
+    return new StaticField(
+        element, name, _registerStaticStateHolder(), code, isFinal, isLazy);
   }
 
   List<Library> _buildLibraries(LibrariesMap librariesMap) {
@@ -356,8 +330,7 @@
       // TODO(jacobr): register toString as used so that it is always accessible
       // from JavaScript.
       _classes[_compiler.coreClasses.objectClass].callStubs.add(
-          _buildStubMethod(
-              new StringBackedName("toString"),
+          _buildStubMethod(new StringBackedName("toString"),
               js.js('function() { return this.#(this) }', toStringInvocation)));
     }
 
@@ -382,10 +355,8 @@
                 for (var selector in selectors.keys) {
                   var stubName = namer.invocationName(selector);
                   if (stubNames.add(stubName.key)) {
-                    interceptorClass.callStubs.add(_buildStubMethod(
-                        stubName,
-                        js.js(
-                            'function(obj) { return obj.# }', [member.name]),
+                    interceptorClass.callStubs.add(_buildStubMethod(stubName,
+                        js.js('function(obj) { return obj.# }', [member.name]),
                         element: member));
                   }
                 }
@@ -416,14 +387,14 @@
               FunctionElement fn = member;
               functionType = fn.type;
             } else if (member.isGetter) {
-              if (_compiler.trustTypeAnnotations) {
+              if (_compiler.options.trustTypeAnnotations) {
                 GetterElement getter = member;
                 DartType returnType = getter.type.returnType;
                 if (returnType.isFunctionType) {
                   functionType = returnType;
                 } else if (returnType.treatAsDynamic ||
-                    _compiler.types.isSubtype(returnType,
-                        backend.coreTypes.functionType)) {
+                    _compiler.types.isSubtype(
+                        returnType, backend.coreTypes.functionType)) {
                   if (returnType.isTypedef) {
                     TypedefType typedef = returnType;
                     // TODO(jacobr): can we just use typdef.unaliased instead?
@@ -464,8 +435,8 @@
                   if (argumentCount > maxArgs) break;
                   var stubName = namer.invocationName(selector);
                   if (!stubNames.add(stubName.key)) break;
-                  var parameters = new List<String>.generate(argumentCount,
-                      (i) => 'p$i');
+                  var parameters =
+                      new List<String>.generate(argumentCount, (i) => 'p$i');
 
                   // We intentionally generate the same stub method for direct
                   // calls and call-throughs of getters so that calling a
@@ -514,15 +485,15 @@
     bool visitStatics = true;
     List<Field> staticFieldsForReflection = _buildFields(library, visitStatics);
 
-    return new Library(library, uri, statics, classes,
-                       staticFieldsForReflection);
+    return new Library(
+        library, uri, statics, classes, staticFieldsForReflection);
   }
 
   /// HACK for Incremental Compilation.
   ///
   /// Returns a class that contains the fields of a class.
   Class buildFieldsHackForIncrementalCompilation(ClassElement element) {
-    assert(_compiler.hasIncrementalSupport);
+    assert(_compiler.options.hasIncrementalSupport);
 
     List<Field> instanceFields = _buildFields(element, false);
     js.Name name = namer.className(element);
@@ -563,7 +534,6 @@
         Map<Selector, SelectorConstraints> selectors =
             _compiler.codegenWorld.invocationsByName(member.name);
         if (selectors != null && !selectors.isEmpty) {
-
           Map<js.Name, js.Expression> callStubsForMember =
               classStubGenerator.generateCallStubsForGetter(member, selectors);
           callStubsForMember.forEach((js.Name name, js.Expression code) {
@@ -588,9 +558,8 @@
         if (backend.symbolsUsed.contains(selectorName)) {
           _symbolsMap[name] = selectorName;
         }
-        noSuchMethodStubs
-            .add(classStubGenerator.generateStubForNoSuchMethod(name,
-                                                                selector));
+        noSuchMethodStubs.add(
+            classStubGenerator.generateStubForNoSuchMethod(name, selector));
       });
     }
 
@@ -615,17 +584,16 @@
     List<Field> staticFieldsForReflection =
         onlyForRti ? const <Field>[] : _buildFields(element, true);
 
-    TypeTestProperties typeTests =
-        runtimeTypeGenerator.generateIsTests(
-            element,
-            storeFunctionTypeInMetadata: _storeFunctionTypesInMetadata);
+    TypeTestProperties typeTests = runtimeTypeGenerator.generateIsTests(element,
+        storeFunctionTypeInMetadata: _storeFunctionTypesInMetadata);
 
     List<StubMethod> checkedSetters = <StubMethod>[];
     List<StubMethod> isChecks = <StubMethod>[];
     if (backend.isJsInterop(element)) {
       typeTests.properties.forEach((js.Name name, js.Node code) {
-        _classes[helpers.jsInterceptorClass].isChecks.add(
-            _buildStubMethod(name, code));
+        _classes[helpers.jsInterceptorClass]
+            .isChecks
+            .add(_buildStubMethod(name, code));
       });
     } else {
       for (Field field in instanceFields) {
@@ -657,30 +625,36 @@
       assert(!backend.isNative(element));
       assert(methods.isEmpty);
 
-      result = new MixinApplication(element,
-                                    name, holder,
-                                    instanceFields,
-                                    staticFieldsForReflection,
-                                    callStubs,
-                                    typeVariableReaderStubs,
-                                    checkedSetters,
-                                    isChecks,
-                                    typeTests.functionTypeIndex,
-                                    isDirectlyInstantiated: isInstantiated,
-                                    onlyForRti: onlyForRti);
+      result = new MixinApplication(
+          element,
+          name,
+          holder,
+          instanceFields,
+          staticFieldsForReflection,
+          callStubs,
+          typeVariableReaderStubs,
+          checkedSetters,
+          isChecks,
+          typeTests.functionTypeIndex,
+          isDirectlyInstantiated: isInstantiated,
+          onlyForRti: onlyForRti);
     } else {
-      result = new Class(element,
-                         name, holder, methods, instanceFields,
-                         staticFieldsForReflection,
-                         callStubs,
-                         typeVariableReaderStubs,
-                         noSuchMethodStubs,
-                         checkedSetters,
-                         isChecks,
-                         typeTests.functionTypeIndex,
-                         isDirectlyInstantiated: isInstantiated,
-                         onlyForRti: onlyForRti,
-                         isNative: backend.isNative(element));
+      result = new Class(
+          element,
+          name,
+          holder,
+          methods,
+          instanceFields,
+          staticFieldsForReflection,
+          callStubs,
+          typeVariableReaderStubs,
+          noSuchMethodStubs,
+          checkedSetters,
+          isChecks,
+          typeTests.functionTypeIndex,
+          isDirectlyInstantiated: isInstantiated,
+          onlyForRti: onlyForRti,
+          isNative: backend.isNative(element));
     }
     _classes[element] = result;
     return result;
@@ -694,7 +668,7 @@
     return backend.isAccessibleByReflection(method) ||
         // During incremental compilation, we have to assume that reflection
         // *might* get enabled.
-        _compiler.hasIncrementalSupport;
+        _compiler.options.hasIncrementalSupport;
   }
 
   bool _methodCanBeApplied(FunctionElement method) {
@@ -704,7 +678,7 @@
 
   // TODO(herhut): Refactor incremental compilation and remove method.
   Method buildMethodHackForIncrementalCompilation(FunctionElement element) {
-    assert(_compiler.hasIncrementalSupport);
+    assert(_compiler.options.hasIncrementalSupport);
     if (element.isInstanceMember) {
       return _buildMethod(element);
     } else {
@@ -762,7 +736,7 @@
         canTearOff = universe.hasInvokedGetter(element, _compiler.world) ||
             (canBeReflected && !element.isOperator);
         assert(canTearOff ||
-               !universe.methodsNeedingSuperGetter.contains(element));
+            !universe.methodsNeedingSuperGetter.contains(element));
         tearOffName = namer.getterForElement(element);
       }
     }
@@ -809,9 +783,12 @@
 
     return new InstanceMethod(element, name, code,
         _generateParameterStubs(element, canTearOff), callName,
-        needsTearOff: canTearOff, tearOffName: tearOffName,
-        isClosureCallMethod: isClosureCallMethod, aliasName: aliasName,
-        canBeApplied: canBeApplied, canBeReflected: canBeReflected,
+        needsTearOff: canTearOff,
+        tearOffName: tearOffName,
+        isClosureCallMethod: isClosureCallMethod,
+        aliasName: aliasName,
+        canBeApplied: canBeApplied,
+        canBeReflected: canBeReflected,
         requiredParameterCount: requiredParameterCount,
         optionalParameterDefaultValues: optionalParameterDefaultValues,
         functionType: functionType);
@@ -827,9 +804,8 @@
     }
   }
 
-  List<ParameterStubMethod> _generateParameterStubs(MethodElement element,
-                                                    bool canTearOff) {
-
+  List<ParameterStubMethod> _generateParameterStubs(
+      MethodElement element, bool canTearOff) {
     if (!_methodNeedsStubs(element)) return const <ParameterStubMethod>[];
 
     ParameterStubGenerator generator =
@@ -841,8 +817,7 @@
   ///
   /// Stub methods may have an element that can be used for code-size
   /// attribution.
-  Method _buildStubMethod(js.Name name, js.Expression code,
-                          {Element element}) {
+  Method _buildStubMethod(js.Name name, js.Expression code, {Element element}) {
     return new StubMethod(name, code, element: element);
   }
 
@@ -881,13 +856,9 @@
 
   List<Field> _buildFields(Element holder, bool visitStatics) {
     List<Field> fields = <Field>[];
-    new FieldVisitor(_compiler, namer).visitFields(
-        holder, visitStatics, (VariableElement field,
-                               js.Name name,
-                               js.Name accessorName,
-                               bool needsGetter,
-                               bool needsSetter,
-                               bool needsCheckedSetter) {
+    new FieldVisitor(_compiler, namer).visitFields(holder, visitStatics,
+        (VariableElement field, js.Name name, js.Name accessorName,
+            bool needsGetter, bool needsSetter, bool needsCheckedSetter) {
       assert(invariant(field, field.isDeclaration));
 
       int getterFlags = 0;
@@ -917,9 +888,8 @@
         }
       }
 
-      fields.add(new Field(field, name, accessorName,
-                           getterFlags, setterFlags,
-                           needsCheckedSetter));
+      fields.add(new Field(field, name, accessorName, getterFlags, setterFlags,
+          needsCheckedSetter));
     });
 
     return fields;
@@ -957,7 +927,6 @@
     js.Name tearOffName =
         needsTearOff ? namer.staticClosureName(element) : null;
 
-
     js.Name callName = null;
     if (needsTearOff) {
       Selector callSelector =
@@ -983,22 +952,19 @@
 
     // TODO(floitsch): we shouldn't update the registry in the middle of
     // building a static method.
-    return new StaticDartMethod(element,
-                                name, _registry.registerHolder(holder), code,
-                                _generateParameterStubs(element, needsTearOff),
-                                callName,
-                                needsTearOff: needsTearOff,
-                                tearOffName: tearOffName,
-                                canBeApplied: canBeApplied,
-                                canBeReflected: canBeReflected,
-                                requiredParameterCount: requiredParameterCount,
-                                optionalParameterDefaultValues:
-                                  optionalParameterDefaultValues,
-                                functionType: functionType);
+    return new StaticDartMethod(element, name, _registry.registerHolder(holder),
+        code, _generateParameterStubs(element, needsTearOff), callName,
+        needsTearOff: needsTearOff,
+        tearOffName: tearOffName,
+        canBeApplied: canBeApplied,
+        canBeReflected: canBeReflected,
+        requiredParameterCount: requiredParameterCount,
+        optionalParameterDefaultValues: optionalParameterDefaultValues,
+        functionType: functionType);
   }
 
-  void _registerConstants(OutputUnit outputUnit,
-                          Iterable<ConstantValue> constantValues) {
+  void _registerConstants(
+      OutputUnit outputUnit, Iterable<ConstantValue> constantValues) {
     // `constantValues` is null if an outputUnit doesn't contain any constants.
     if (constantValues == null) return;
     for (ConstantValue constantValue in constantValues) {
@@ -1014,7 +980,7 @@
   }
 
   Holder _registerStaticStateHolder() {
-    return _registry.registerHolder(
-        namer.staticStateHolder, isStaticStateHolder: true);
+    return _registry.registerHolder(namer.staticStateHolder,
+        isStaticStateHolder: true);
   }
 }
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart b/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart
index 5614bf9..192f158 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart
@@ -113,12 +113,11 @@
     // Ignore for now.
   }
 
-  Holder registerHolder(
-      String name,
+  Holder registerHolder(String name,
       {bool isStaticStateHolder: false, bool isConstantsHolder: false}) {
     assert(_holdersMap[name] == null ||
         (_holdersMap[name].isStaticStateHolder == isStaticStateHolder &&
-         _holdersMap[name].isConstantsHolder == isConstantsHolder));
+            _holdersMap[name].isConstantsHolder == isConstantsHolder));
 
     return _holdersMap.putIfAbsent(name, () {
       return new Holder(name, _holdersMap.length,
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index 9c48f4d..f2997aa 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -5,8 +5,8 @@
 part of dart2js.js_emitter;
 
 // Function signatures used in the generation of runtime type information.
-typedef void FunctionTypeSignatureEmitter(Element method,
-                                          FunctionType methodType);
+typedef void FunctionTypeSignatureEmitter(
+    Element method, FunctionType methodType);
 
 typedef void SubstitutionEmitter(Element element, {bool emitNull});
 
@@ -37,8 +37,7 @@
   TypeTestRegistry get typeTestRegistry => emitterTask.typeTestRegistry;
   CoreClasses get coreClasses => compiler.coreClasses;
 
-  Set<ClassElement> get checkedClasses =>
-      typeTestRegistry.checkedClasses;
+  Set<ClassElement> get checkedClasses => typeTestRegistry.checkedClasses;
 
   Iterable<ClassElement> get classesUsingTypeVariableTests =>
       typeTestRegistry.classesUsingTypeVariableTests;
@@ -56,9 +55,8 @@
   /// type (if class has one) in the metadata object and stores its index in
   /// the result. This is only possible for function types that do not contain
   /// type variables.
-  TypeTestProperties generateIsTests(
-      ClassElement classElement,
-      { bool storeFunctionTypeInMetadata: true}) {
+  TypeTestProperties generateIsTests(ClassElement classElement,
+      {bool storeFunctionTypeInMetadata: true}) {
     assert(invariant(classElement, classElement.isDeclaration));
 
     TypeTestProperties result = new TypeTestProperties();
@@ -69,14 +67,13 @@
     /// native classes.
     /// TODO(herhut): Generate tests for native classes dynamically, as well.
     void generateIsTest(Element other) {
-      if (backend.isNative(classElement) ||
-          !classElement.isSubclassOf(other)) {
+      if (backend.isNative(classElement) || !classElement.isSubclassOf(other)) {
         result.properties[namer.operatorIs(other)] = js('1');
       }
     }
 
-    void generateFunctionTypeSignature(FunctionElement method,
-                                       FunctionType type) {
+    void generateFunctionTypeSignature(
+        FunctionElement method, FunctionType type) {
       assert(method.isImplementation);
       jsAst.Expression thisAccess = new jsAst.This();
       ClosureClassMap closureData =
@@ -97,8 +94,7 @@
         RuntimeTypesEncoder rtiEncoder = backend.rtiEncoder;
         jsAst.Expression encoding =
             rtiEncoder.getSignatureEncoding(type, thisAccess);
-        jsAst.Name operatorSignature =
-            namer.asName(namer.operatorSignature);
+        jsAst.Name operatorSignature = namer.asName(namer.operatorSignature);
         result.properties[operatorSignature] = encoding;
       }
     }
@@ -134,9 +130,7 @@
     }
 
     _generateIsTestsOn(classElement, generateIsTest,
-        generateFunctionTypeSignature,
-        generateSubstitution,
-        generateTypeCheck);
+        generateFunctionTypeSignature, generateSubstitution, generateTypeCheck);
 
     return result;
   }
@@ -211,7 +205,8 @@
         }
       }
 
-      void emitNothing(_, {emitNull}) {};
+      void emitNothing(_, {emitNull}) {}
+      ;
 
       generateSubstitution = emitNothing;
     }
@@ -230,10 +225,8 @@
         // A superclass might already implement the Function interface. In such
         // a case, we can avoid emiting the is test here.
         if (!cls.superclass.implementsFunction(coreClasses)) {
-          _generateInterfacesIsTests(coreClasses.functionClass,
-                                    generateIsTest,
-                                    generateSubstitution,
-                                    generated);
+          _generateInterfacesIsTests(coreClasses.functionClass, generateIsTest,
+              generateSubstitution, generated);
         }
         FunctionType callType = callFunction.computeType(compiler.resolution);
         generateFunctionTypeSignature(callFunction, callType);
@@ -242,40 +235,42 @@
 
     for (DartType interfaceType in cls.interfaces) {
       _generateInterfacesIsTests(interfaceType.element, generateIsTest,
-                                 generateSubstitution, generated);
+          generateSubstitution, generated);
     }
   }
 
   /**
    * Generate "is tests" where [cls] is being implemented.
    */
-  void _generateInterfacesIsTests(ClassElement cls,
-                                  void generateIsTest(ClassElement element),
-                                  SubstitutionEmitter generateSubstitution,
-                                  Set<Element> alreadyGenerated) {
+  void _generateInterfacesIsTests(
+      ClassElement cls,
+      void generateIsTest(ClassElement element),
+      SubstitutionEmitter generateSubstitution,
+      Set<Element> alreadyGenerated) {
     void tryEmitTest(ClassElement check) {
       if (!alreadyGenerated.contains(check) && checkedClasses.contains(check)) {
         alreadyGenerated.add(check);
         generateIsTest(check);
         generateSubstitution(check);
       }
-    };
+    }
+    ;
 
     tryEmitTest(cls);
 
     for (DartType interfaceType in cls.interfaces) {
       Element element = interfaceType.element;
       tryEmitTest(element);
-      _generateInterfacesIsTests(element, generateIsTest, generateSubstitution,
-                                 alreadyGenerated);
+      _generateInterfacesIsTests(
+          element, generateIsTest, generateSubstitution, alreadyGenerated);
     }
 
     // We need to also emit "is checks" for the superclass and its supertypes.
     ClassElement superclass = cls.superclass;
     if (superclass != null) {
       tryEmitTest(superclass);
-      _generateInterfacesIsTests(superclass, generateIsTest,
-                                 generateSubstitution, alreadyGenerated);
+      _generateInterfacesIsTests(
+          superclass, generateIsTest, generateSubstitution, alreadyGenerated);
     }
   }
 
@@ -283,20 +278,20 @@
     List<StubMethod> stubs = <StubMethod>[];
     ClassElement superclass = classElement;
     while (superclass != null) {
-        for (TypeVariableType parameter in superclass.typeVariables) {
-          if (backend.emitter.readTypeVariables.contains(parameter.element)) {
-            stubs.add(
-                _generateTypeVariableReader(classElement, parameter.element));
-          }
+      for (TypeVariableType parameter in superclass.typeVariables) {
+        if (backend.emitter.readTypeVariables.contains(parameter.element)) {
+          stubs.add(
+              _generateTypeVariableReader(classElement, parameter.element));
         }
-        superclass = superclass.superclass;
       }
+      superclass = superclass.superclass;
+    }
 
     return stubs;
   }
 
-  StubMethod _generateTypeVariableReader(ClassElement cls,
-                                         TypeVariableElement element) {
+  StubMethod _generateTypeVariableReader(
+      ClassElement cls, TypeVariableElement element) {
     jsAst.Name name = namer.nameForReadTypeVariable(element);
     int index = element.index;
     jsAst.Expression computeTypeVariable;
@@ -304,21 +299,22 @@
     Substitution substitution =
         backend.rti.getSubstitution(cls, element.typeDeclaration);
     if (substitution != null) {
-      computeTypeVariable =
-          js(r'#.apply(null, this.$builtinTypeInfo)',
-                 backend.rtiEncoder.getSubstitutionCodeForVariable(
-                     substitution, index));
+      computeTypeVariable = js(
+          r'#.apply(null, this.$builtinTypeInfo)',
+          backend.rtiEncoder
+              .getSubstitutionCodeForVariable(substitution, index));
     } else {
       // TODO(ahe): These can be generated dynamically.
-      computeTypeVariable =
-          js(r'this.$builtinTypeInfo && this.$builtinTypeInfo[#]',
-              js.number(index));
+      computeTypeVariable = js(
+          r'this.$builtinTypeInfo && this.$builtinTypeInfo[#]',
+          js.number(index));
     }
     jsAst.Expression convertRtiToRuntimeType = backend.emitter
-         .staticFunctionAccess(backend.helpers.convertRtiToRuntimeType);
+        .staticFunctionAccess(backend.helpers.convertRtiToRuntimeType);
 
-    return new StubMethod(name,
-                          js('function () { return #(#) }',
-                             [convertRtiToRuntimeType, computeTypeVariable]));
+    return new StubMethod(
+        name,
+        js('function () { return #(#) }',
+            [convertRtiToRuntimeType, computeTypeVariable]));
   }
 }
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 40fd877..072e8cb 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -4,31 +4,19 @@
 
 library dart2js.js_emitter.startup_emitter;
 
-import 'package:js_runtime/shared/embedded_names.dart' show
-    JsBuiltin,
-    METADATA,
-    STATIC_FUNCTION_NAME_TO_CLOSURE,
-    TYPES;
+import 'package:js_runtime/shared/embedded_names.dart'
+    show JsBuiltin, METADATA, STATIC_FUNCTION_NAME_TO_CLOSURE, TYPES;
 
 import '../../common.dart';
-import '../../compiler.dart' show
-    Compiler;
-import '../../constants/values.dart' show
-    ConstantValue;
-import '../../elements/elements.dart' show
-    ClassElement,
-    Element,
-    FieldElement,
-    FunctionElement;
+import '../../compiler.dart' show Compiler;
+import '../../constants/values.dart' show ConstantValue;
+import '../../elements/elements.dart'
+    show ClassElement, Element, FieldElement, FunctionElement;
 import '../../js/js.dart' as js;
-import '../../js_backend/js_backend.dart' show
-    JavaScriptBackend,
-    Namer;
+import '../../js_backend/js_backend.dart' show JavaScriptBackend, Namer;
 
-import '../js_emitter.dart' show
-    NativeEmitter;
-import '../js_emitter.dart' as emitterTask show
-    Emitter;
+import '../js_emitter.dart' show NativeEmitter;
+import '../js_emitter.dart' as emitterTask show Emitter;
 import '../program_builder/program_builder.dart' show ProgramBuilder;
 import '../model.dart';
 
@@ -97,8 +85,8 @@
 
   @override
   js.Expression isolateLazyInitializerAccess(FieldElement element) {
-    return js.js('#.#', [namer.globalObjectFor(element),
-    namer.lazyInitializerName(element)]);
+    return js.js('#.#',
+        [namer.globalObjectFor(element), namer.lazyInitializerName(element)]);
   }
 
   @override
@@ -122,8 +110,8 @@
   }
 
   @override
-  js.PropertyAccess prototypeAccess(ClassElement element,
-                                    bool hasBeenInstantiated) {
+  js.PropertyAccess prototypeAccess(
+      ClassElement element, bool hasBeenInstantiated) {
     js.Expression constructor =
         hasBeenInstantiated ? constructorAccess(element) : typeAccess(element);
     return js.js('#.prototype', constructor);
@@ -165,8 +153,8 @@
         return _backend.rtiEncoder.templateForCreateFunctionType;
 
       case JsBuiltin.isSubtype:
-      // TODO(floitsch): move this closer to where is-check properties are
-      // built.
+        // TODO(floitsch): move this closer to where is-check properties are
+        // built.
         String isPrefix = namer.operatorIsPrefix;
         return js.js.expressionTemplateFor("('$isPrefix' + #) in #.prototype");
 
@@ -179,8 +167,7 @@
         return js.js.expressionTemplateFor("$metadataAccess[#]");
 
       case JsBuiltin.getType:
-        String typesAccess =
-            _emitter.generateEmbeddedGlobalAccessString(TYPES);
+        String typesAccess = _emitter.generateEmbeddedGlobalAccessString(TYPES);
         return js.js.expressionTemplateFor("$typesAccess[#]");
 
       case JsBuiltin.createDartClosureFromNameOfStaticFunction:
@@ -189,13 +176,12 @@
         return js.js.expressionTemplateFor("$functionAccess(#)");
 
       default:
-        reporter.internalError(NO_LOCATION_SPANNABLE,
-            "Unhandled Builtin: $builtin");
+        reporter.internalError(
+            NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin");
         return null;
     }
   }
 
   @override
-  void invalidateCaches() {
-  }
+  void invalidateCaches() {}
 }
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
index 14dea34..48ccd6d 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
@@ -427,54 +427,53 @@
     return js.js('#.#', [cls.holder.name, cls.name]);
   }
 
-  js.Statement emitMainFragment(
-      Program program,
+  js.Statement emitMainFragment(Program program,
       Map<DeferredFragment, _DeferredFragmentHash> deferredLoadHashes) {
     MainFragment fragment = program.fragments.first;
 
-    Iterable<Holder> nonStaticStateHolders = program.holders
-        .where((Holder holder) => !holder.isStaticStateHolder);
+    Iterable<Holder> nonStaticStateHolders =
+        program.holders.where((Holder holder) => !holder.isStaticStateHolder);
 
-    return js.js.statement(mainBoilerplate,
-        {'typeNameProperty': js.string(ModelEmitter.typeNameProperty),
-         'cyclicThrow': backend.emitter.staticFunctionAccess(
-                 backend.helpers.cyclicThrowHelper),
-         'operatorIsPrefix': js.string(namer.operatorIsPrefix),
-         'tearOffCode': new js.Block(buildTearOffCode(backend)),
-         'embeddedTypes': generateEmbeddedGlobalAccess(TYPES),
-         'embeddedInterceptorTags':
-             generateEmbeddedGlobalAccess(INTERCEPTORS_BY_TAG),
-         'embeddedLeafTags': generateEmbeddedGlobalAccess(LEAF_TAGS),
-         'embeddedGlobalsObject': js.js("init"),
-         'holdersList': new js.ArrayInitializer(nonStaticStateHolders
-             .map((holder) => js.js("#", holder.name))
-             .toList(growable: false)),
-         'staticStateDeclaration': new js.VariableDeclaration(
-             namer.staticStateHolder, allowRename: false),
-         'staticState': js.js('#', namer.staticStateHolder),
-         'constantHolderReference': buildConstantHolderReference(program),
-         'holders': emitHolders(program.holders, fragment),
-         'callName': js.string(namer.callNameField),
-         'argumentCount': js.string(namer.requiredParameterField),
-         'defaultArgumentValues': js.string(namer.defaultValuesField),
-         'prototypes': emitPrototypes(fragment),
-         'inheritance': emitInheritance(fragment),
-         'aliases': emitInstanceMethodAliases(fragment),
-         'tearOffs': emitInstallTearOffs(fragment),
-         'constants': emitConstants(fragment),
-         'staticNonFinalFields': emitStaticNonFinalFields(fragment),
-         'lazyStatics': emitLazilyInitializedStatics(fragment),
-         'embeddedGlobals': emitEmbeddedGlobals(program, deferredLoadHashes),
-         'nativeSupport': program.needsNativeSupport
-              ? emitNativeSupport(fragment)
-              : new js.EmptyStatement(),
-         'invokeMain': fragment.invokeMain,
-         });
+    return js.js.statement(mainBoilerplate, {
+      'typeNameProperty': js.string(ModelEmitter.typeNameProperty),
+      'cyclicThrow': backend.emitter
+          .staticFunctionAccess(backend.helpers.cyclicThrowHelper),
+      'operatorIsPrefix': js.string(namer.operatorIsPrefix),
+      'tearOffCode': new js.Block(buildTearOffCode(backend)),
+      'embeddedTypes': generateEmbeddedGlobalAccess(TYPES),
+      'embeddedInterceptorTags':
+          generateEmbeddedGlobalAccess(INTERCEPTORS_BY_TAG),
+      'embeddedLeafTags': generateEmbeddedGlobalAccess(LEAF_TAGS),
+      'embeddedGlobalsObject': js.js("init"),
+      'holdersList': new js.ArrayInitializer(nonStaticStateHolders
+          .map((holder) => js.js("#", holder.name))
+          .toList(growable: false)),
+      'staticStateDeclaration': new js.VariableDeclaration(
+          namer.staticStateHolder,
+          allowRename: false),
+      'staticState': js.js('#', namer.staticStateHolder),
+      'constantHolderReference': buildConstantHolderReference(program),
+      'holders': emitHolders(program.holders, fragment),
+      'callName': js.string(namer.callNameField),
+      'argumentCount': js.string(namer.requiredParameterField),
+      'defaultArgumentValues': js.string(namer.defaultValuesField),
+      'prototypes': emitPrototypes(fragment),
+      'inheritance': emitInheritance(fragment),
+      'aliases': emitInstanceMethodAliases(fragment),
+      'tearOffs': emitInstallTearOffs(fragment),
+      'constants': emitConstants(fragment),
+      'staticNonFinalFields': emitStaticNonFinalFields(fragment),
+      'lazyStatics': emitLazilyInitializedStatics(fragment),
+      'embeddedGlobals': emitEmbeddedGlobals(program, deferredLoadHashes),
+      'nativeSupport': program.needsNativeSupport
+          ? emitNativeSupport(fragment)
+          : new js.EmptyStatement(),
+      'invokeMain': fragment.invokeMain,
+    });
   }
 
   js.Expression emitDeferredFragment(DeferredFragment fragment,
-                                     js.Expression deferredTypes,
-                                     List<Holder> holders) {
+      js.Expression deferredTypes, List<Holder> holders) {
     List<Holder> nonStaticStateHolders = holders
         .where((Holder holder) => !holder.isStaticStateHolder)
         .toList(growable: false);
@@ -484,29 +483,28 @@
       Holder holder = nonStaticStateHolders[i];
       updateHolderAssignments.add(js.js.statement(
           '#holder = updateHolder(holdersList[#index], #holder)',
-          {'index': js.number(i),
-           'holder': new js.VariableUse(holder.name)}));
+          {'index': js.number(i), 'holder': new js.VariableUse(holder.name)}));
     }
 
     // TODO(floitsch): don't just reference 'init'.
-    return js.js(deferredBoilerplate,
-    {'embeddedGlobalsObject': new js.Parameter('init'),
-     'staticState': new js.Parameter(namer.staticStateHolder),
-     'holders': emitHolders(holders, fragment),
-     'deferredHoldersList': new js.ArrayInitializer(nonStaticStateHolders
-         .map((holder) => js.js("#", holder.name))
-         .toList(growable: false)),
-     'updateHolders': new js.Block(updateHolderAssignments),
-     'prototypes': emitPrototypes(fragment),
-     'inheritance': emitInheritance(fragment),
-     'aliases': emitInstanceMethodAliases(fragment),
-     'tearOffs': emitInstallTearOffs(fragment),
-     'constants': emitConstants(fragment),
-     'staticNonFinalFields': emitStaticNonFinalFields(fragment),
-     'lazyStatics': emitLazilyInitializedStatics(fragment),
-     'types': deferredTypes,
-     // TODO(floitsch): only call emitNativeSupport if we need native.
-     'nativeSupport': emitNativeSupport(fragment),
+    return js.js(deferredBoilerplate, {
+      'embeddedGlobalsObject': new js.Parameter('init'),
+      'staticState': new js.Parameter(namer.staticStateHolder),
+      'holders': emitHolders(holders, fragment),
+      'deferredHoldersList': new js.ArrayInitializer(nonStaticStateHolders
+          .map((holder) => js.js("#", holder.name))
+          .toList(growable: false)),
+      'updateHolders': new js.Block(updateHolderAssignments),
+      'prototypes': emitPrototypes(fragment),
+      'inheritance': emitInheritance(fragment),
+      'aliases': emitInstanceMethodAliases(fragment),
+      'tearOffs': emitInstallTearOffs(fragment),
+      'constants': emitConstants(fragment),
+      'staticNonFinalFields': emitStaticNonFinalFields(fragment),
+      'lazyStatics': emitLazilyInitializedStatics(fragment),
+      'types': deferredTypes,
+      // TODO(floitsch): only call emitNativeSupport if we need native.
+      'nativeSupport': emitNativeSupport(fragment),
     });
   }
 
@@ -557,22 +555,22 @@
     //    }
 
     List<js.Statement> statements = [
-      new js.ExpressionStatement(
-          new js.VariableDeclarationList(holders
-              .map(emitHolderInitialization)
-              .toList())),
-      js.js.statement('var holders = #', new js.ArrayInitializer(
-          holders
+      new js.ExpressionStatement(new js.VariableDeclarationList(
+          holders.map(emitHolderInitialization).toList())),
+      js.js.statement(
+          'var holders = #',
+          new js.ArrayInitializer(holders
               .map((holder) => new js.VariableUse(holder.name))
-              .toList(growable: false)))];
+              .toList(growable: false)))
+    ];
     return new js.Block(statements);
   }
 
   /// Returns a reference to the constant holder, or the JS-literal `null`.
   js.Expression buildConstantHolderReference(Program program) {
-    Holder constantHolder = program.holders
-        .firstWhere((Holder holder) => holder.isConstantsHolder,
-                    orElse: () => null);
+    Holder constantHolder = program.holders.firstWhere(
+        (Holder holder) => holder.isConstantsHolder,
+        orElse: () => null);
     if (constantHolder == null) return new js.LiteralNull();
     return new js.VariableUse(constantHolder.name);
   }
@@ -626,8 +624,7 @@
     List<js.Statement> assignments = fragment.libraries
         .expand((Library library) => library.classes)
         .map((Class cls) => js.js.statement(
-            '#.prototype = #;',
-            [classReference(cls), emitPrototype(cls)]))
+            '#.prototype = #;', [classReference(cls), emitPrototype(cls)]))
         .toList(growable: false);
 
     return new js.Block(assignments);
@@ -648,17 +645,23 @@
     Iterable<Method> typeVariableReaderStubs = cls.typeVariableReaderStubs;
     Iterable<Method> noSuchMethodStubs = cls.noSuchMethodStubs;
     Iterable<Method> gettersSetters = generateGettersSetters(cls);
-    Iterable<Method> allMethods =
-        [methods, checkedSetters, isChecks, callStubs, typeVariableReaderStubs,
-         noSuchMethodStubs, gettersSetters].expand((x) => x);
+    Iterable<Method> allMethods = [
+      methods,
+      checkedSetters,
+      isChecks,
+      callStubs,
+      typeVariableReaderStubs,
+      noSuchMethodStubs,
+      gettersSetters
+    ].expand((x) => x);
 
     List<js.Property> properties = <js.Property>[];
 
     if (cls.superclass == null) {
-      properties.add(new js.Property(js.string("constructor"),
-      classReference(cls)));
-      properties.add(new js.Property(namer.operatorIs(cls.element),
-      js.number(1)));
+      properties
+          .add(new js.Property(js.string("constructor"), classReference(cls)));
+      properties
+          .add(new js.Property(namer.operatorIs(cls.element), js.number(1)));
     }
 
     allMethods.forEach((Method method) {
@@ -747,7 +750,7 @@
         properties[js.string(namer.requiredParameterField)] =
             js.number(method.requiredParameterCount);
         properties[js.string(namer.defaultValuesField)] =
-             _encodeOptionalParameterDefaultValues(method);
+            _encodeOptionalParameterDefaultValues(method);
       }
     }
 
@@ -774,8 +777,8 @@
           ? new js.LiteralNull()
           : classReference(superclass);
 
-      inheritCalls.add(js.js('inherit(#, #)',
-          [classReference(cls), superclassReference]));
+      inheritCalls.add(
+          js.js('inherit(#, #)', [classReference(cls), superclassReference]));
 
       emittedClasses.add(cls);
     }
@@ -809,11 +812,12 @@
       for (Class cls in library.classes) {
         for (InstanceMethod method in cls.methods) {
           if (method.aliasName != null) {
-            assignments.add(js.js.statement(
-                '#.prototype.# = #.prototype.#',
-                [classReference(cls), js.quoteName(method.aliasName),
-                 classReference(cls), js.quoteName(method.name)]));
-
+            assignments.add(js.js.statement('#.prototype.# = #.prototype.#', [
+              classReference(cls),
+              js.quoteName(method.aliasName),
+              classReference(cls),
+              js.quoteName(method.name)
+            ]));
           }
         }
       }
@@ -842,11 +846,11 @@
 
       for (String name in names) {
         ConstantValue value = defaultValues[name];
-        properties.add(new js.Property(js.string(name),
-        generateConstantReference(value)));
+        properties.add(
+            new js.Property(js.string(name), generateConstantReference(value)));
       }
-      return js.js('function() { return #; }',
-          new js.ObjectInitializer(properties));
+      return js.js(
+          'function() { return #; }', new js.ObjectInitializer(properties));
     }
   }
 
@@ -899,7 +903,8 @@
           _encodeOptionalParameterDefaultValues(method);
     }
 
-    return js.js.statement('''
+    return js.js.statement(
+        '''
         installTearOff(#container, #getterName, #isStatic, #isIntercepted,
                        #requiredParameterCount, #optionalParameterDefaultValues,
                        #callNames, #funsOrNames, #funType)''',
@@ -951,15 +956,15 @@
       // find the constants that don't have any dependency on other constants
       // and create an object-literal with them (and assign it to the
       // constant-holder variable).
-      assignments.add(js.js.statement('#.# = #',
-          [constant.holder.name,
-           constant.name,
-           constantEmitter.generate(constant.value)]));
+      assignments.add(js.js.statement('#.# = #', [
+        constant.holder.name,
+        constant.name,
+        constantEmitter.generate(constant.value)
+      ]));
     }
     return new js.Block(assignments);
   }
 
-
   /// Emits the static non-final fields section.
   ///
   /// This section initializes all static non-final fields that don't require
@@ -973,8 +978,8 @@
     //    `$.x = $.y = $.z = null;`.
     Iterable<js.Statement> statements = fields.map((StaticField field) {
       assert(field.holder.isStaticStateHolder);
-      return js.js.statement("#.# = #;",
-          [field.holder.name, field.name, field.code]);
+      return js.js
+          .statement("#.# = #;", [field.holder.name, field.name, field.code]);
     });
     return new js.Block(statements.toList());
   }
@@ -987,11 +992,12 @@
     List<StaticField> fields = fragment.staticLazilyInitializedFields;
     Iterable<js.Statement> statements = fields.map((StaticField field) {
       assert(field.holder.isStaticStateHolder);
-      return js.js.statement("lazy(#, #, #, #);",
-          [field.holder.name,
-           js.quoteName(field.name),
-           js.quoteName(namer.deriveLazyInitializerName(field.name)),
-           field.code]);
+      return js.js.statement("lazy(#, #, #, #);", [
+        field.holder.name,
+        js.quoteName(field.name),
+        js.quoteName(namer.deriveLazyInitializerName(field.name)),
+        field.code
+      ]);
     });
 
     return new js.Block(statements.toList());
@@ -1016,10 +1022,9 @@
           "${fragment.outputFileName}.${ModelEmitter.deferredExtension}"));
     }
     js.ArrayInitializer fragmentHashes(List<Fragment> fragments) {
-      return new js.ArrayInitializer(
-          fragments
-              .map((fragment) => deferredLoadHashes[fragment])
-              .toList(growable: false));
+      return new js.ArrayInitializer(fragments
+          .map((fragment) => deferredLoadHashes[fragment])
+          .toList(growable: false));
     }
 
     List<js.Property> uris = new List<js.Property>(loadMap.length);
@@ -1033,38 +1038,41 @@
       count++;
     });
 
-    globals.add(new js.Property(js.string(DEFERRED_LIBRARY_URIS),
-        new js.ObjectInitializer(uris)));
-    globals.add(new js.Property(js.string(DEFERRED_LIBRARY_HASHES),
-        new js.ObjectInitializer(hashes)));
-    globals.add(new js.Property(js.string(DEFERRED_INITIALIZED),
-        js.js("Object.create(null)")));
+    globals.add(new js.Property(
+        js.string(DEFERRED_LIBRARY_URIS), new js.ObjectInitializer(uris)));
+    globals.add(new js.Property(
+        js.string(DEFERRED_LIBRARY_HASHES), new js.ObjectInitializer(hashes)));
+    globals.add(new js.Property(
+        js.string(DEFERRED_INITIALIZED), js.js("Object.create(null)")));
 
     String deferredGlobal = ModelEmitter.deferredInitializersGlobal;
     js.Expression isHunkLoadedFunction =
         js.js("function(hash) { return !!$deferredGlobal[hash]; }");
-    globals.add(new js.Property(js.string(IS_HUNK_LOADED),
-        isHunkLoadedFunction));
+    globals
+        .add(new js.Property(js.string(IS_HUNK_LOADED), isHunkLoadedFunction));
 
-    js.Expression isHunkInitializedFunction =
-        js.js("function(hash) { return !!#deferredInitialized[hash]; }",
-            {'deferredInitialized':
-                generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)});
-    globals.add(new js.Property(js.string(IS_HUNK_INITIALIZED),
-        isHunkInitializedFunction));
+    js.Expression isHunkInitializedFunction = js.js(
+        "function(hash) { return !!#deferredInitialized[hash]; }", {
+      'deferredInitialized': generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)
+    });
+    globals.add(new js.Property(
+        js.string(IS_HUNK_INITIALIZED), isHunkInitializedFunction));
 
     /// See [emitEmbeddedGlobalsForDeferredLoading] for the format of the
     /// deferred hunk.
-    js.Expression initializeLoadedHunkFunction =
-    js.js("""
+    js.Expression initializeLoadedHunkFunction = js.js(
+        """
             function(hash) {
               initializeDeferredHunk($deferredGlobal[hash]);
               #deferredInitialized[hash] = true;
-            }""", {'deferredInitialized':
-                    generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)});
+            }""",
+        {
+          'deferredInitialized':
+              generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)
+        });
 
-    globals.add(new js.Property(js.string(INITIALIZE_LOADED_HUNK),
-                                initializeLoadedHunkFunction));
+    globals.add(new js.Property(
+        js.string(INITIALIZE_LOADED_HUNK), initializeLoadedHunkFunction));
 
     return globals;
   }
@@ -1079,18 +1087,23 @@
     CoreClasses coreClasses = compiler.coreClasses;
     // We want to keep the original names for the most common core classes when
     // calling toString on them.
-    List<ClassElement> nativeClassesNeedingUnmangledName =
-        [coreClasses.intClass, coreClasses.doubleClass, coreClasses.numClass,
-          coreClasses.stringClass, coreClasses.boolClass, coreClasses.nullClass,
-          coreClasses.listClass];
+    List<ClassElement> nativeClassesNeedingUnmangledName = [
+      coreClasses.intClass,
+      coreClasses.doubleClass,
+      coreClasses.numClass,
+      coreClasses.stringClass,
+      coreClasses.boolClass,
+      coreClasses.nullClass,
+      coreClasses.listClass
+    ];
     // TODO(floitsch): this should probably be on a per-fragment basis.
     nativeClassesNeedingUnmangledName.forEach((element) {
-      names.add(new js.Property(js.quoteName(namer.className(element)),
-                                js.string(element.name)));
+      names.add(new js.Property(
+          js.quoteName(namer.className(element)), js.string(element.name)));
     });
 
-    return new js.Property(js.string(MANGLED_GLOBAL_NAMES),
-                           new js.ObjectInitializer(names));
+    return new js.Property(
+        js.string(MANGLED_GLOBAL_NAMES), new js.ObjectInitializer(names));
   }
 
   /// Emits the [GET_TYPE_FROM_NAME] embedded global.
@@ -1122,8 +1135,7 @@
   }
 
   /// Emits all embedded globals.
-  js.Statement emitEmbeddedGlobals(
-      Program program,
+  js.Statement emitEmbeddedGlobals(Program program,
       Map<DeferredFragment, _DeferredFragmentHash> deferredLoadHashes) {
     List<js.Property> globals = <js.Property>[];
 
@@ -1133,8 +1145,8 @@
     }
 
     if (program.typeToInterceptorMap != null) {
-      globals.add(new js.Property(js.string(TYPE_TO_INTERCEPTOR_MAP),
-      program.typeToInterceptorMap));
+      globals.add(new js.Property(
+          js.string(TYPE_TO_INTERCEPTOR_MAP), program.typeToInterceptorMap));
     }
 
     if (program.hasIsolateSupport) {
@@ -1143,9 +1155,8 @@
       // the current static state. Since we don't run multiple isolates in the
       // same JavaScript context (except for testing) this shouldn't have any
       // impact on real-world programs, though.
-      globals.add(
-          new js.Property(js.string(CREATE_NEW_ISOLATE),
-                          js.js('function () { return $staticStateName; }')));
+      globals.add(new js.Property(js.string(CREATE_NEW_ISOLATE),
+          js.js('function () { return $staticStateName; }')));
 
       js.Expression nameToClosureFunction = js.js('''
         // First fetch the static function. From there we can execute its
@@ -1155,12 +1166,11 @@
            var getterFunction = staticFunction.$tearOffPropertyName;
            return getterFunction();
          }''');
-      globals.add(new js.Property(js.string(STATIC_FUNCTION_NAME_TO_CLOSURE),
-                                  nameToClosureFunction));
+      globals.add(new js.Property(
+          js.string(STATIC_FUNCTION_NAME_TO_CLOSURE), nameToClosureFunction));
 
-      globals.add(
-          new js.Property(js.string(CLASS_ID_EXTRACTOR),
-                          js.js('function(o) { return o.constructor.name; }')));
+      globals.add(new js.Property(js.string(CLASS_ID_EXTRACTOR),
+          js.js('function(o) { return o.constructor.name; }')));
 
       js.Expression extractFieldsFunction = js.js('''
       function(o) {
@@ -1178,8 +1188,8 @@
         }
         return result;
       }''');
-      globals.add(new js.Property(js.string(CLASS_FIELDS_EXTRACTOR),
-                                  extractFieldsFunction));
+      globals.add(new js.Property(
+          js.string(CLASS_FIELDS_EXTRACTOR), extractFieldsFunction));
 
       js.Expression createInstanceFromClassIdFunction = js.js('''
         function(name) {
@@ -1188,7 +1198,7 @@
         }
       ''');
       globals.add(new js.Property(js.string(INSTANCE_FROM_CLASS_ID),
-                                  createInstanceFromClassIdFunction));
+          createInstanceFromClassIdFunction));
 
       js.Expression initializeEmptyInstanceFunction = js.js('''
       function(name, o, fields) {
@@ -1205,7 +1215,7 @@
         return o;
       }''');
       globals.add(new js.Property(js.string(INITIALIZE_EMPTY_INSTANCE),
-                                  initializeEmptyInstanceFunction));
+          initializeEmptyInstanceFunction));
     }
 
     globals.add(emitMangledGlobalNames());
@@ -1215,11 +1225,10 @@
     // therefore unused in this emitter.
     List<js.Property> mangledNamesProperties = <js.Property>[];
     program.symbolsMap.forEach((js.Name mangledName, String unmangledName) {
-      mangledNamesProperties.add(
-          new js.Property(mangledName, js.string(unmangledName)));
+      mangledNamesProperties
+          .add(new js.Property(mangledName, js.string(unmangledName)));
     });
-    globals.add(new js.Property(
-        js.string(MANGLED_NAMES),
+    globals.add(new js.Property(js.string(MANGLED_NAMES),
         new js.ObjectInitializer(mangledNamesProperties)));
 
     globals.add(emitGetTypeFromName());
@@ -1227,10 +1236,9 @@
     globals.addAll(emitMetadata(program));
 
     if (program.needsNativeSupport) {
-      globals.add(new js.Property(js.string(INTERCEPTORS_BY_TAG),
-          new js.LiteralNull()));
-      globals.add(new js.Property(js.string(LEAF_TAGS),
-          new js.LiteralNull()));
+      globals.add(new js.Property(
+          js.string(INTERCEPTORS_BY_TAG), new js.LiteralNull()));
+      globals.add(new js.Property(js.string(LEAF_TAGS), new js.LiteralNull()));
     }
 
     js.ObjectInitializer globalsObject = new js.ObjectInitializer(globals);
@@ -1253,16 +1261,18 @@
     if (fragment.isMainFragment &&
         NativeGenerator.needsIsolateAffinityTagInitialization(backend)) {
       statements.add(NativeGenerator.generateIsolateAffinityTagInitialization(
-              backend,
-              generateEmbeddedGlobalAccess,
-              js.js("""
+          backend,
+          generateEmbeddedGlobalAccess,
+          js.js(
+              """
         // On V8, the 'intern' function converts a string to a symbol, which
         // makes property access much faster.
         function (s) {
           var o = {};
           o[s] = 1;
           return Object.keys(convertToFastObject(o))[0];
-        }""", [])));
+        }""",
+              [])));
     }
 
     Map<String, js.Expression> interceptorsByTag = <String, js.Expression>{};
@@ -1286,10 +1296,11 @@
             List<Class> subclasses = cls.nativeExtensions;
             js.Expression value = js.string(cls.nativeNonLeafTags[0]);
             for (Class subclass in subclasses) {
-              value = js.js('#.# = #',
-                  [classReference(subclass),
-                   NATIVE_SUPERCLASS_TAG_NAME,
-                   js.string(cls.nativeNonLeafTags[0])]);
+              value = js.js('#.# = #', [
+                classReference(subclass),
+                NATIVE_SUPERCLASS_TAG_NAME,
+                js.string(cls.nativeNonLeafTags[0])
+              ]);
             }
             subclassAssignment = new js.ExpressionStatement(value);
           }
@@ -1298,8 +1309,8 @@
     }
     statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);",
         js.objectLiteral(interceptorsByTag)));
-    statements.add(js.js.statement("setOrUpdateLeafTags(#);",
-        js.objectLiteral(leafTags)));
+    statements.add(
+        js.js.statement("setOrUpdateLeafTags(#);", js.objectLiteral(leafTags)));
     statements.add(subclassAssignment);
 
     return new js.Block(statements);
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 11826c3..b3be363 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
@@ -6,64 +6,50 @@
 
 import 'dart:convert' show JsonEncoder;
 
-import 'package:js_runtime/shared/embedded_names.dart' show
-    CLASS_FIELDS_EXTRACTOR,
-    CLASS_ID_EXTRACTOR,
-    CREATE_NEW_ISOLATE,
-    DEFERRED_INITIALIZED,
-    DEFERRED_LIBRARY_URIS,
-    DEFERRED_LIBRARY_HASHES,
-    GET_TYPE_FROM_NAME,
-    INITIALIZE_EMPTY_INSTANCE,
-    INITIALIZE_LOADED_HUNK,
-    INSTANCE_FROM_CLASS_ID,
-    INTERCEPTORS_BY_TAG,
-    IS_HUNK_INITIALIZED,
-    IS_HUNK_LOADED,
-    LEAF_TAGS,
-    MANGLED_GLOBAL_NAMES,
-    MANGLED_NAMES,
-    METADATA,
-    NATIVE_SUPERCLASS_TAG_NAME,
-    STATIC_FUNCTION_NAME_TO_CLOSURE,
-    TYPE_TO_INTERCEPTOR_MAP,
-    TYPES;
+import 'package:js_runtime/shared/embedded_names.dart'
+    show
+        CLASS_FIELDS_EXTRACTOR,
+        CLASS_ID_EXTRACTOR,
+        CREATE_NEW_ISOLATE,
+        DEFERRED_INITIALIZED,
+        DEFERRED_LIBRARY_URIS,
+        DEFERRED_LIBRARY_HASHES,
+        GET_TYPE_FROM_NAME,
+        INITIALIZE_EMPTY_INSTANCE,
+        INITIALIZE_LOADED_HUNK,
+        INSTANCE_FROM_CLASS_ID,
+        INTERCEPTORS_BY_TAG,
+        IS_HUNK_INITIALIZED,
+        IS_HUNK_LOADED,
+        LEAF_TAGS,
+        MANGLED_GLOBAL_NAMES,
+        MANGLED_NAMES,
+        METADATA,
+        NATIVE_SUPERCLASS_TAG_NAME,
+        STATIC_FUNCTION_NAME_TO_CLOSURE,
+        TYPE_TO_INTERCEPTOR_MAP,
+        TYPES;
 
 import '../../common.dart';
-import '../../constants/values.dart' show
-    ConstantValue,
-    FunctionConstantValue;
-import '../../compiler.dart' show
-    Compiler;
-import '../../core_types.dart' show
-    CoreClasses;
-import '../../elements/elements.dart' show
-    ClassElement,
-    FunctionElement;
-import '../../hash/sha1.dart' show
-    Hasher;
+import '../../constants/values.dart' show ConstantValue, FunctionConstantValue;
+import '../../compiler.dart' show Compiler;
+import '../../core_types.dart' show CoreClasses;
+import '../../elements/elements.dart' show ClassElement, FunctionElement;
+import '../../hash/sha1.dart' show Hasher;
 import '../../io/code_output.dart';
-import '../../io/line_column_provider.dart' show
-    LineColumnCollector,
-    LineColumnProvider;
-import '../../io/source_map_builder.dart' show
-    SourceMapBuilder;
+import '../../io/line_column_provider.dart'
+    show LineColumnCollector, LineColumnProvider;
+import '../../io/source_map_builder.dart' show SourceMapBuilder;
 import '../../js/js.dart' as js;
-import '../../js_backend/js_backend.dart' show
-    JavaScriptBackend,
-    Namer,
-    ConstantEmitter;
-import '../../util/uri_extras.dart' show
-    relativize;
+import '../../js_backend/js_backend.dart'
+    show JavaScriptBackend, Namer, ConstantEmitter;
+import '../../util/uri_extras.dart' show relativize;
 
 import '../constant_ordering.dart' show deepCompareConstants;
 import '../headers.dart';
-import '../js_emitter.dart' show
-    NativeEmitter;
+import '../js_emitter.dart' show NativeEmitter;
 
-import '../js_emitter.dart' show
-    buildTearOffCode,
-    NativeGenerator;
+import '../js_emitter.dart' show buildTearOffCode, NativeGenerator;
 import '../model.dart';
 
 part 'deferred_fragment_hash.dart';
@@ -79,7 +65,6 @@
   // The full code that is written to each hunk part-file.
   final Map<Fragment, CodeOutput> outputBuffers = <Fragment, CodeOutput>{};
 
-
   JavaScriptBackend get backend => compiler.backend;
 
   /// For deferred loading we communicate the initializers via this global var.
@@ -92,12 +77,11 @@
   static const String typeNameProperty = r"builtin$cls";
 
   ModelEmitter(Compiler compiler, Namer namer, this.nativeEmitter,
-               this.shouldGenerateSourceMap)
+      this.shouldGenerateSourceMap)
       : this.compiler = compiler,
         this.namer = namer {
     this.constantEmitter = new ConstantEmitter(
-        compiler, namer, this.generateConstantReference,
-        constantListGenerator);
+        compiler, namer, this.generateConstantReference, constantListGenerator);
   }
 
   DiagnosticReporter get reporter => compiler.reporter;
@@ -117,9 +101,9 @@
   }
 
   bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) {
-    if (constant.isFunction) return true;    // Already emitted.
-    if (constant.isPrimitive) return true;   // Inlined.
-    if (constant.isDummy) return true;       // Inlined.
+    if (constant.isFunction) return true; // Already emitted.
+    if (constant.isPrimitive) return true; // Inlined.
+    if (constant.isDummy) return true; // Inlined.
     return false;
   }
 
@@ -162,8 +146,8 @@
     if (isConstantInlinedOrAlreadyEmitted(value)) {
       return constantEmitter.generate(value);
     }
-    return js.js('#.#', [namer.globalObjectForConstant(value),
-    namer.constantName(value)]);
+    return js.js('#.#',
+        [namer.globalObjectForConstant(value), namer.constantName(value)]);
   }
 
   int emitProgram(Program program) {
@@ -175,7 +159,7 @@
         new FragmentEmitter(compiler, namer, backend, constantEmitter, this);
 
     Map<DeferredFragment, _DeferredFragmentHash> deferredHashTokens =
-      new Map<DeferredFragment, _DeferredFragmentHash>();
+        new Map<DeferredFragment, _DeferredFragmentHash>();
     for (DeferredFragment fragment in deferredFragments) {
       deferredHashTokens[fragment] = new _DeferredFragmentHash(fragment);
     }
@@ -190,7 +174,7 @@
       js.Expression types =
           program.metadataTypesForOutputUnit(fragment.outputUnit);
       deferredFragmentsCode[fragment] = fragmentEmitter.emitDeferredFragment(
-                fragment, types, program.holders);
+          fragment, types, program.holders);
     }
 
     js.TokenCounter counter = new js.TokenCounter();
@@ -204,21 +188,19 @@
 
     // Now that we have written the deferred hunks, we can update the hash
     // tokens in the main-fragment.
-    deferredHashTokens.forEach((DeferredFragment key,
-                                _DeferredFragmentHash token) {
+    deferredHashTokens
+        .forEach((DeferredFragment key, _DeferredFragmentHash token) {
       token.setHash(hunkHashes[key]);
     });
 
     writeMainFragment(mainFragment, mainCode,
-      isSplit: program.deferredFragments.isNotEmpty);
+        isSplit: program.deferredFragments.isNotEmpty);
 
-    if (backend.requiresPreamble &&
-        !backend.htmlLibraryIsLoaded) {
-      reporter.reportHintMessage(
-          NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE);
+    if (backend.requiresPreamble && !backend.htmlLibraryIsLoaded) {
+      reporter.reportHintMessage(NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE);
     }
 
-    if (compiler.deferredMapUri != null) {
+    if (compiler.options.deferredMapUri != null) {
       writeDeferredMap();
     }
 
@@ -228,7 +210,7 @@
 
   /// Generates a simple header that provides the compiler's build id.
   js.Comment buildGeneratedBy() {
-    String flavor = compiler.useContentSecurityPolicy
+    String flavor = compiler.options.useContentSecurityPolicy
         ? 'fast startup, CSP'
         : 'fast startup';
     return new js.Comment(generatedBy(compiler, flavor: flavor));
@@ -252,7 +234,8 @@
   }
 
   js.Statement buildDeferredInitializerGlobal() {
-    return js.js.statement('self.#deferredInitializers = '
+    return js.js.statement(
+        'self.#deferredInitializers = '
         'self.#deferredInitializers || Object.create(null);',
         {'deferredInitializers': deferredInitializersGlobal});
   }
@@ -270,29 +253,29 @@
     }
 
     CodeOutput mainOutput = new StreamCodeOutput(
-            compiler.outputProvider('', 'js'),
-            codeOutputListeners);
+        compiler.outputProvider('', 'js'), codeOutputListeners);
     outputBuffers[fragment] = mainOutput;
 
     js.Program program = new js.Program([
-        buildGeneratedBy(),
-        new js.Comment(HOOKS_API_USAGE),
-        isSplit ? buildDeferredInitializerGlobal() : new js.Block.empty(),
-        code]);
+      buildGeneratedBy(),
+      new js.Comment(HOOKS_API_USAGE),
+      isSplit ? buildDeferredInitializerGlobal() : new js.Block.empty(),
+      code
+    ]);
 
-    mainOutput.addBuffer(js.createCodeBuffer(program, compiler,
-        monitor: compiler.dumpInfoTask));
+    mainOutput.addBuffer(
+        js.createCodeBuffer(program, compiler, monitor: compiler.dumpInfoTask));
 
     if (shouldGenerateSourceMap) {
-      mainOutput.add(
-          generateSourceMapTag(compiler.sourceMapUri, compiler.outputUri));
+      mainOutput.add(generateSourceMapTag(
+          compiler.options.sourceMapUri, compiler.options.outputUri));
     }
 
     mainOutput.close();
 
     if (shouldGenerateSourceMap) {
       outputSourceMap(mainOutput, lineColumnCollector, '',
-          compiler.sourceMapUri, compiler.outputUri);
+          compiler.options.sourceMapUri, compiler.options.outputUri);
     }
   }
 
@@ -330,12 +313,13 @@
     //   deferredInitializer[<hash>] = deferredInitializer.current;
 
     js.Program program = new js.Program([
-        buildGeneratedBy(),
-        buildDeferredInitializerGlobal(),
-        js.js.statement('$deferredInitializersGlobal.current = #', code)]);
+      buildGeneratedBy(),
+      buildDeferredInitializerGlobal(),
+      js.js.statement('$deferredInitializersGlobal.current = #', code)
+    ]);
 
-    output.addBuffer(js.createCodeBuffer(program, compiler,
-        monitor: compiler.dumpInfoTask));
+    output.addBuffer(
+        js.createCodeBuffer(program, compiler, monitor: compiler.dumpInfoTask));
 
     // Make a unique hash of the code (before the sourcemaps are added)
     // This will be used to retrieve the initializing function from the global
@@ -348,8 +332,8 @@
 
     if (shouldGenerateSourceMap) {
       Uri mapUri, partUri;
-      Uri sourceMapUri = compiler.sourceMapUri;
-      Uri outputUri = compiler.outputUri;
+      Uri sourceMapUri = compiler.options.sourceMapUri;
+      Uri outputUri = compiler.options.outputUri;
       String partName = "$hunkPrefix.$partExtension";
       String hunkFileName = "$hunkPrefix.$deferredExtension";
 
@@ -357,13 +341,15 @@
         String mapFileName = hunkFileName + ".map";
         List<String> mapSegments = sourceMapUri.pathSegments.toList();
         mapSegments[mapSegments.length - 1] = mapFileName;
-        mapUri = compiler.sourceMapUri.replace(pathSegments: mapSegments);
+        mapUri =
+            compiler.options.sourceMapUri.replace(pathSegments: mapSegments);
       }
 
       if (outputUri != null) {
         List<String> partSegments = outputUri.pathSegments.toList();
         partSegments[partSegments.length - 1] = hunkFileName;
-        partUri = compiler.outputUri.replace(pathSegments: partSegments);
+        partUri =
+            compiler.options.outputUri.replace(pathSegments: partSegments);
       }
 
       output.add(generateSourceMapTag(mapUri, partUri));
@@ -387,17 +373,14 @@
     return '';
   }
 
-
-  void outputSourceMap(CodeOutput output,
-                       LineColumnProvider lineColumnProvider,
-                       String name,
-                       [Uri sourceMapUri,
-                       Uri fileUri]) {
+  void outputSourceMap(
+      CodeOutput output, LineColumnProvider lineColumnProvider, String name,
+      [Uri sourceMapUri, Uri fileUri]) {
     if (!shouldGenerateSourceMap) return;
     // Create a source file for the compilation output. This allows using
     // [:getLine:] to transform offsets to line numbers in [SourceMapBuilder].
     SourceMapBuilder sourceMapBuilder =
-    new SourceMapBuilder(sourceMapUri, fileUri, lineColumnProvider);
+        new SourceMapBuilder(sourceMapUri, fileUri, lineColumnProvider);
     output.forEachSourceLocation(sourceMapBuilder.addMapping);
     String sourceMap = sourceMapBuilder.build();
     compiler.outputProvider(name, 'js.map')
@@ -416,7 +399,8 @@
     mapping["_comment"] = "This mapping shows which compiled `.js` files are "
         "needed for a given deferred library import.";
     mapping.addAll(compiler.deferredLoadTask.computeDeferredMap());
-    compiler.outputProvider(compiler.deferredMapUri.path, 'deferred_map')
+    compiler.outputProvider(
+        compiler.options.deferredMapUri.path, 'deferred_map')
       ..add(const JsonEncoder.withIndent("  ").convert(mapping))
       ..close();
   }
diff --git a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
index f329cbf..0a6e271 100644
--- a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
+++ b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
@@ -52,7 +52,7 @@
   Set<ClassElement> computeClassesModifiedByEmitRuntimeTypeSupport() {
     TypeChecks typeChecks = backend.rti.requiredChecks;
     Set<ClassElement> result = new Set<ClassElement>();
-    for (ClassElement cls in typeChecks) {
+    for (ClassElement cls in typeChecks.classes) {
       if (typeChecks[cls].isNotEmpty) result.add(cls);
     }
     return result;
@@ -79,8 +79,7 @@
     // TODO(karlklose): merge this case with 2 when unifying argument and
     // object checks.
     RuntimeTypes rti = backend.rti;
-    rti.getRequiredArgumentClasses(backend)
-       .forEach(addClassWithSuperclasses);
+    rti.getRequiredArgumentClasses(backend).forEach(addClassWithSuperclasses);
 
     // 2.  Add classes that are referenced by substitutions in object checks and
     //     their superclasses.
@@ -106,8 +105,8 @@
         return false;
       } else if (function.isInstanceMember) {
         if (!function.enclosingClass.isClosure) {
-          return compiler.codegenWorld.hasInvokedGetter(
-              function, compiler.world);
+          return compiler.codegenWorld
+              .hasInvokedGetter(function, compiler.world);
         }
       }
       return false;
@@ -144,8 +143,8 @@
   void computeRequiredTypeChecks() {
     assert(checkedClasses == null && checkedFunctionTypes == null);
 
-    backend.rti.addImplicitChecks(compiler.codegenWorld,
-                                  classesUsingTypeVariableTests);
+    backend.rti.addImplicitChecks(
+        compiler.codegenWorld, classesUsingTypeVariableTests);
 
     checkedClasses = new Set<ClassElement>();
     checkedFunctionTypes = new Set<FunctionType>();
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart
index 238d393..b666bfa 100644
--- a/pkg/compiler/lib/src/library_loader.dart
+++ b/pkg/compiler/lib/src/library_loader.dart
@@ -7,35 +7,33 @@
 import 'dart:async';
 
 import 'common.dart';
-import 'common/names.dart' show
-    Uris;
-import 'common/tasks.dart' show
-    CompilerTask;
-import 'compiler.dart' show
-    Compiler;
-import 'elements/elements.dart' show
-    CompilationUnitElement,
-    Element,
-    ImportElement,
-    ExportElement,
-    LibraryElement,
-    PrefixElement;
-import 'elements/modelx.dart' show
-    CompilationUnitElementX,
-    DeferredLoaderGetterElementX,
-    ErroneousElementX,
-    ExportElementX,
-    ImportElementX,
-    LibraryElementX,
-    LibraryDependencyElementX,
-    PrefixElementX,
-    SyntheticImportElement;
-
+import 'common/names.dart' show Uris;
+import 'common/tasks.dart' show CompilerTask;
+import 'compiler.dart' show Compiler;
+import 'elements/elements.dart'
+    show
+        CompilationUnitElement,
+        Element,
+        ImportElement,
+        ExportElement,
+        LibraryElement,
+        PrefixElement;
+import 'elements/modelx.dart'
+    show
+        CompilationUnitElementX,
+        DeferredLoaderGetterElementX,
+        ErroneousElementX,
+        ExportElementX,
+        ImportElementX,
+        LibraryElementX,
+        LibraryDependencyElementX,
+        PrefixElementX,
+        SyntheticImportElement;
+import 'environment.dart';
 import 'script.dart';
+import 'serialization/serialization.dart' show LibraryDeserializer;
 import 'tree/tree.dart';
-import 'util/util.dart' show
-    Link,
-    LinkBuilder;
+import 'util/util.dart' show Link, LinkBuilder;
 
 /**
  * [CompilerTask] for loading libraries and setting up the import/export scopes.
@@ -105,9 +103,9 @@
  * resolved into a readable URI using the library root URI provided from the
  * command line and the list of platform libraries found in
  * 'sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart'. This is done
- * through the [Compiler.translateResolvedUri] method which checks whether a
- * library by that name exists and in case of internal libraries whether access
- * is granted.
+ * through a [ResolvedUriTranslator] provided from the compiler. The translator
+ * checks whether a library by that name exists and in case of internal
+ * libraries whether access is granted.
  *
  * ## Resource URI ##
  *
@@ -132,7 +130,14 @@
  *
  */
 abstract class LibraryLoaderTask implements CompilerTask {
-  factory LibraryLoaderTask(Compiler compiler) = _LibraryLoaderTask;
+  factory LibraryLoaderTask(
+      Compiler compiler,
+      ResolvedUriTranslator uriTranslator,
+      ScriptLoader scriptLoader,
+      ElementScanner scriptScanner,
+      LibraryDeserializer deserializer,
+      LibraryLoaderListener listener,
+      Environment environment) = _LibraryLoaderTask;
 
   /// Returns all libraries that have been loaded.
   Iterable<LibraryElement> get libraries;
@@ -151,8 +156,7 @@
   /// If [skipFileWithPartOfTag] is `true`, `null` is returned if the
   /// compilation unit for [resolvedUri] contains a `part of` tag. This is only
   /// used for analysis through [Compiler.analyzeUri].
-  Future<LibraryElement> loadLibrary(
-      Uri resolvedUri,
+  Future<LibraryElement> loadLibrary(Uri resolvedUri,
       {bool skipFileWithPartOfTag: false});
 
   /// Reset the library loader task to prepare for compilation. If provided,
@@ -259,13 +263,37 @@
   bool exclude(Element element) => excludedNames.contains(element.name);
 }
 
-/**
- * Implementation class for [LibraryLoader]. The distinction between
- * [LibraryLoader] and [LibraryLoaderTask] is made to hide internal members from
- * the [LibraryLoader] interface.
- */
+/// Implementation class for [LibraryLoaderTask]. The distinction between
+/// [LibraryLoaderTask] and [_LibraryLoaderTask] is made to hide internal
+/// members from the [LibraryLoaderTask] interface.
 class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
-  _LibraryLoaderTask(Compiler compiler) : super(compiler);
+  /// Translates internal uris (like dart:core) to a disk location.
+  final ResolvedUriTranslator uriTranslator;
+
+  /// Loads the contents of a script file (a .dart file). Used when loading
+  /// libraries from source.
+  final ScriptLoader scriptLoader;
+
+  /// Provides a diet element model from a script file containing information
+  /// about imports and exports. Used when loading libraries from source.
+  final ElementScanner scanner;
+
+  /// Provides a diet element model for a library. Used when loading libraries
+  /// from a serialized form.
+  final LibraryDeserializer deserializer;
+
+  /// Hooks to inform others about progress done by this loader.
+  // TODO(sigmund): move away from this.
+  final LibraryLoaderListener listener;
+
+  /// Definitions provided via the `-D` command line flags. Used to resolve
+  /// conditional imports.
+  final Environment environment;
+
+  _LibraryLoaderTask(Compiler compiler, this.uriTranslator, this.scriptLoader,
+      this.scanner, this.deserializer, this.listener, this.environment)
+      // TODO(sigmund): make measurements separate from compiler
+      : super(compiler);
 
   String get name => 'LibraryLoader';
 
@@ -290,6 +318,7 @@
 
       Iterable<LibraryElement> reusedLibraries = null;
       if (reuseLibrary != null) {
+        // TODO(sigmund): make measurements separate from compiler
         reusedLibraries = compiler.reuseLibraryTask.measure(() {
           // Call [toList] to force eager calls to [reuseLibrary].
           return libraryCanonicalUriMap.values.where(reuseLibrary).toList();
@@ -316,25 +345,17 @@
     return measure(() {
       assert(currentHandler == null);
 
-      Future<LibraryElement> wrapper(LibraryElement library) {
-        try {
-          return reuseLibrary(library).then(
-              (bool reuse) => reuse ? library : null);
-        } catch (exception, trace) {
-          compiler.diagnoseCrashInUserCode(
-              'Uncaught exception in reuseLibrary', exception, trace);
-          rethrow;
-        }
-      }
-
+      wrapper(lib) => reuseLibrary(lib).then((reuse) => reuse ? lib : null);
       List<Future<LibraryElement>> reusedLibrariesFuture =
+          // TODO(sigmund): make measurements separate from compiler
           compiler.reuseLibraryTask.measure(
               () => libraryCanonicalUriMap.values.map(wrapper).toList());
 
-      return Future.wait(reusedLibrariesFuture).then(
-          (List<LibraryElement> reusedLibraries) {
-            resetImplementation(reusedLibraries.where((e) => e != null));
-          });
+      return Future
+          .wait(reusedLibrariesFuture)
+          .then((List<LibraryElement> reusedLibraries) {
+        resetImplementation(reusedLibraries.where((e) => e != null));
+      });
     });
   }
 
@@ -351,8 +372,7 @@
     }
   }
 
-  Future<LibraryElement> loadLibrary(
-      Uri resolvedUri,
+  Future<LibraryElement> loadLibrary(Uri resolvedUri,
       {bool skipFileWithPartOfTag: false}) {
     return measure(() {
       assert(currentHandler == null);
@@ -360,7 +380,7 @@
       // loading of a library cluster.
       currentHandler = new LibraryDependencyHandler(this);
       return createLibrary(currentHandler, null, resolvedUri,
-          skipFileWithPartOfTag: skipFileWithPartOfTag)
+              skipFileWithPartOfTag: skipFileWithPartOfTag)
           .then((LibraryElement library) {
         if (library == null) {
           currentHandler = null;
@@ -369,10 +389,11 @@
         return reporter.withCurrentElement(library, () {
           return measure(() {
             currentHandler.computeExports();
-            LoadedLibraries loadedLibraries =
-                new _LoadedLibraries(library, currentHandler.nodeMap, this);
+            LoadedLibraries loadedLibraries = new _LoadedLibraries(library,
+                currentHandler.newLibraries, currentHandler.nodeMap, this);
             currentHandler = null;
-            return compiler.onLibrariesLoaded(loadedLibraries)
+            return listener
+                .onLibrariesLoaded(loadedLibraries)
                 .then((_) => library);
           });
         });
@@ -386,8 +407,8 @@
    * The imported/exported libraries are loaded and processed recursively but
    * the import/export scopes are not set up.
    */
-  Future processLibraryTags(LibraryDependencyHandler handler,
-                            LibraryElementX library) {
+  Future processLibraryTags(
+      LibraryDependencyHandler handler, LibraryElementX library) {
     TagState tagState = new TagState();
 
     bool importsDartCore = false;
@@ -397,7 +418,6 @@
 
     return Future.forEach(library.tags, (LibraryTag tag) {
       return reporter.withCurrentElement(library, () {
-
         Uri computeUri(LibraryDependency node) {
           StringNode uriNode = node.uri;
           if (node.conditionalUris != null) {
@@ -406,7 +426,7 @@
               String value = conditionalUri.value == null
                   ? "true"
                   : conditionalUri.value.dartString.slowToString();
-              String actual = compiler.fromEnvironment(key);
+              String actual = environment.valueOf(key);
               if (value == actual) {
                 uriNode = conditionalUri.uri;
                 break;
@@ -418,8 +438,7 @@
             return Uri.parse(tagUriString);
           } on FormatException {
             reporter.reportErrorMessage(
-                node.uri,
-                MessageKind.INVALID_URI, {'uri': tagUriString});
+                node.uri, MessageKind.INVALID_URI, {'uri': tagUriString});
             return null;
           }
         }
@@ -469,7 +488,7 @@
         }
       });
     }).then((_) {
-      return compiler.onLibraryScanned(library, handler);
+      return listener.onLibraryScanned(library, handler);
     }).then((_) {
       return reporter.withCurrentElement(library, () {
         checkDuplicatedLibraryName(library);
@@ -478,7 +497,8 @@
         if (!importsDartCore && library.canonicalUri != Uris.dart_core) {
           return createLibrary(handler, null, Uris.dart_core)
               .then((LibraryElement coreLibrary) {
-            handler.registerDependency(library,
+            handler.registerDependency(
+                library,
                 new SyntheticImportElement(
                     library.entryCompilationUnit, Uris.dart_core),
                 coreLibrary);
@@ -505,36 +525,31 @@
       if (library.hasLibraryName) {
         reporter.withCurrentElement(library, () {
           reporter.reportWarningMessage(
-              library,
-              MessageKind.DUPLICATED_LIBRARY_RESOURCE,
-              {'libraryName': library.libraryName,
-               'resourceUri': resourceUri,
-               'canonicalUri1': library.canonicalUri,
-               'canonicalUri2': existing.canonicalUri});
+              library, MessageKind.DUPLICATED_LIBRARY_RESOURCE, {
+            'libraryName': library.libraryName,
+            'resourceUri': resourceUri,
+            'canonicalUri1': library.canonicalUri,
+            'canonicalUri2': existing.canonicalUri
+          });
         });
       } else {
-        reporter.reportHintMessage(
-            library,
-            MessageKind.DUPLICATED_RESOURCE,
-            {'resourceUri': resourceUri,
-             'canonicalUri1': library.canonicalUri,
-             'canonicalUri2': existing.canonicalUri});
+        reporter.reportHintMessage(library, MessageKind.DUPLICATED_RESOURCE, {
+          'resourceUri': resourceUri,
+          'canonicalUri1': library.canonicalUri,
+          'canonicalUri2': existing.canonicalUri
+        });
       }
     } else if (library.hasLibraryName) {
       String name = library.libraryName;
       existing = libraryNames.putIfAbsent(name, () => library);
       if (!identical(existing, library)) {
         reporter.withCurrentElement(library, () {
-          reporter.reportWarningMessage(
-              library,
-              MessageKind.DUPLICATED_LIBRARY_NAME,
-              {'libraryName': name});
+          reporter.reportWarningMessage(library,
+              MessageKind.DUPLICATED_LIBRARY_NAME, {'libraryName': name});
         });
         reporter.withCurrentElement(existing, () {
-          reporter.reportWarningMessage(
-              existing,
-              MessageKind.DUPLICATED_LIBRARY_NAME,
-              {'libraryName': name});
+          reporter.reportWarningMessage(existing,
+              MessageKind.DUPLICATED_LIBRARY_NAME, {'libraryName': name});
         });
       }
     }
@@ -546,23 +561,13 @@
    */
   Future scanPart(Part part, Uri resolvedUri, LibraryElement library) {
     if (!resolvedUri.isAbsolute) throw new ArgumentError(resolvedUri);
-    Uri readableUri = compiler.translateResolvedUri(library, resolvedUri, part);
+    Uri readableUri = uriTranslator.translate(library, resolvedUri, part);
     if (readableUri == null) return new Future.value();
     return reporter.withCurrentElement(library, () {
-      return compiler.readScript(part, readableUri).
-          then((Script sourceScript) {
-            if (sourceScript == null) return;
-
-            CompilationUnitElementX unit =
-                new CompilationUnitElementX(sourceScript, library);
-            reporter.withCurrentElement(unit, () {
-              compiler.scanner.scan(unit);
-              if (unit.partTag == null && !sourceScript.isSynthesized) {
-                reporter.reportErrorMessage(
-                    unit, MessageKind.MISSING_PART_OF_TAG);
-              }
-            });
-          });
+      return scriptLoader.readScript(readableUri, part).then((Script script) {
+        if (script == null) return;
+        createUnitSync(script, library);
+      });
     });
   }
 
@@ -572,21 +577,18 @@
    * export scope. If the tag does not contain a valid URI, then its dependency
    * is not registered in [handler].
    */
-  Future<Null> registerLibraryFromImportExport(
-      LibraryDependencyHandler handler,
-      LibraryElement library,
-      LibraryDependencyElementX libraryDependency) {
+  Future<Null> registerLibraryFromImportExport(LibraryDependencyHandler handler,
+      LibraryElement library, LibraryDependencyElementX libraryDependency) {
     Uri base = library.canonicalUri;
     Uri resolvedUri = base.resolveUri(libraryDependency.uri);
     return createLibrary(handler, library, resolvedUri, node: libraryDependency)
         .then((LibraryElement loadedLibrary) {
-          if (loadedLibrary == null) return;
-          reporter.withCurrentElement(library, () {
-            libraryDependency.libraryDependency = loadedLibrary;
-            handler.registerDependency(
-                library, libraryDependency, loadedLibrary);
-          });
-        });
+      if (loadedLibrary == null) return;
+      reporter.withCurrentElement(library, () {
+        libraryDependency.libraryDependency = loadedLibrary;
+        handler.registerDependency(library, libraryDependency, loadedLibrary);
+      });
+    });
   }
 
   /// Loads the deserialized [library] with the [handler].
@@ -594,11 +596,10 @@
   /// All libraries imported or exported transitively from [library] will be
   /// loaded as well.
   Future<LibraryElement> loadDeserializedLibrary(
-      LibraryDependencyHandler handler,
-      LibraryElement library) {
-    compiler.onLibraryCreated(library);
+      LibraryDependencyHandler handler, LibraryElement library) {
     libraryCanonicalUriMap[library.canonicalUri] = library;
-    return compiler.onLibraryScanned(library, handler).then((_) {
+    handler.registerNewLibrary(library);
+    return listener.onLibraryScanned(library, handler).then((_) {
       return Future.forEach(library.imports, (ImportElement import) {
         return createLibrary(handler, library, import.uri);
       }).then((_) {
@@ -609,91 +610,102 @@
     });
   }
 
+  Future<Script> _readScript(
+      Spannable spannable, Uri readableUri, Uri resolvedUri) {
+    if (readableUri == null) {
+      return new Future.value(new Script.synthetic(resolvedUri));
+    } else {
+      return scriptLoader.readScript(readableUri, spannable);
+    }
+  }
+
   /**
    * Create (or reuse) a library element for the library specified by the
    * [resolvedUri].
    *
    * If a new library is created, the [handler] is notified.
    */
-  Future<LibraryElement> createLibrary(
-      LibraryDependencyHandler handler,
-      LibraryElement importingLibrary,
-      Uri resolvedUri,
-      {Spannable node,
-       bool skipFileWithPartOfTag: false}) {
+  Future<LibraryElement> createLibrary(LibraryDependencyHandler handler,
+      LibraryElement importingLibrary, Uri resolvedUri,
+      {Spannable node, bool skipFileWithPartOfTag: false}) {
     Uri readableUri =
-        compiler.translateResolvedUri(importingLibrary, resolvedUri, node);
+        uriTranslator.translate(importingLibrary, resolvedUri, node);
     LibraryElement library = libraryCanonicalUriMap[resolvedUri];
     if (library != null) {
       return new Future.value(library);
     }
-    library = compiler.serialization.readLibrary(resolvedUri);
-    if (library != null) {
-      return loadDeserializedLibrary(handler, library);
-    }
-    var readScript = compiler.readScript;
-    if (readableUri == null) {
-      readableUri = resolvedUri;
-      readScript = compiler.synthesizeScript;
-    }
-    return reporter.withCurrentElement(importingLibrary, () {
-      return readScript(node, readableUri).then((Script script) {
-        if (script == null) return null;
-        LibraryElement element =
-            createLibrarySync(handler, script, resolvedUri);
-        CompilationUnitElementX compilationUnit = element.entryCompilationUnit;
-        if (compilationUnit.partTag != null) {
-          if (skipFileWithPartOfTag) {
-            // TODO(johnniwinther): Avoid calling [Compiler.onLibraryCreated]
-            // for this library.
-            libraryCanonicalUriMap.remove(resolvedUri);
-            return null;
+    return deserializer.readLibrary(resolvedUri).then((LibraryElement library) {
+      if (library != null) {
+        return loadDeserializedLibrary(handler, library);
+      }
+      return reporter.withCurrentElement(importingLibrary, () {
+        return _readScript(node, readableUri, resolvedUri)
+            .then((Script script) {
+          if (script == null) return null;
+          LibraryElement element =
+              createLibrarySync(handler, script, resolvedUri);
+          CompilationUnitElementX compilationUnit =
+              element.entryCompilationUnit;
+          if (compilationUnit.partTag != null) {
+            if (skipFileWithPartOfTag) {
+              // TODO(johnniwinther): Avoid calling [listener.onLibraryCreated]
+              // for this library.
+              libraryCanonicalUriMap.remove(resolvedUri);
+              return null;
+            }
+            if (importingLibrary == null) {
+              DiagnosticMessage error = reporter.withCurrentElement(
+                  compilationUnit,
+                  () => reporter.createMessage(
+                      compilationUnit.partTag, MessageKind.MAIN_HAS_PART_OF));
+              reporter.reportError(error);
+            } else {
+              DiagnosticMessage error = reporter.withCurrentElement(
+                  compilationUnit,
+                  () => reporter.createMessage(
+                      compilationUnit.partTag, MessageKind.IMPORT_PART_OF));
+              DiagnosticMessage info = reporter.withCurrentElement(
+                  importingLibrary,
+                  () => reporter.createMessage(
+                      node, MessageKind.IMPORT_PART_OF_HERE));
+              reporter.reportError(error, [info]);
+            }
           }
-          if (importingLibrary == null) {
-            DiagnosticMessage error = reporter.withCurrentElement(
-                compilationUnit,
-                () => reporter.createMessage(
-                    compilationUnit.partTag, MessageKind.MAIN_HAS_PART_OF));
-            reporter.reportError(error);
-          } else {
-            DiagnosticMessage error = reporter.withCurrentElement(
-                compilationUnit,
-                () => reporter.createMessage(
-                    compilationUnit.partTag, MessageKind.IMPORT_PART_OF));
-            DiagnosticMessage info = reporter.withCurrentElement(
-                importingLibrary,
-                () => reporter.createMessage(
-                    node,
-                    MessageKind.IMPORT_PART_OF_HERE));
-            reporter.reportError(error, [info]);
-          }
-        }
-        return processLibraryTags(handler, element).then((_) {
-          reporter.withCurrentElement(element, () {
-            handler.registerLibraryExports(element);
+          return processLibraryTags(handler, element).then((_) {
+            reporter.withCurrentElement(element, () {
+              handler.registerLibraryExports(element);
+            });
+            return element;
           });
-          return element;
         });
       });
     });
   }
 
   LibraryElement createLibrarySync(
-      LibraryDependencyHandler handler,
-      Script script,
-      Uri resolvedUri) {
+      LibraryDependencyHandler handler, Script script, Uri resolvedUri) {
     LibraryElement element = new LibraryElementX(script, resolvedUri);
     return reporter.withCurrentElement(element, () {
       if (handler != null) {
         handler.registerNewLibrary(element);
         libraryCanonicalUriMap[resolvedUri] = element;
       }
-      compiler.scanner.scanLibrary(element);
+      scanner.scanLibrary(element);
       return element;
     });
   }
-}
 
+  CompilationUnitElement createUnitSync(Script script, LibraryElement library) {
+    CompilationUnitElementX unit = new CompilationUnitElementX(script, library);
+    reporter.withCurrentElement(unit, () {
+      scanner.scanUnit(unit);
+      if (unit.partTag == null && !script.isSynthesized) {
+        reporter.reportErrorMessage(unit, MessageKind.MISSING_PART_OF_TAG);
+      }
+    });
+    return unit;
+  }
+}
 
 /// A state machine for checking script tags come in the correct order.
 class TagState {
@@ -716,11 +728,11 @@
 
   /// Encodes transition function for state machine.
   static const List<int> NEXT = const <int>[
-      NO_TAG_SEEN,
-      AFTER_LIBRARY_DECLARATION, // Only one library tag is allowed.
-      IMPORT_OR_EXPORT,
-      IMPORT_OR_EXPORT,
-      PART,
+    NO_TAG_SEEN,
+    AFTER_LIBRARY_DECLARATION, // Only one library tag is allowed.
+    IMPORT_OR_EXPORT,
+    IMPORT_OR_EXPORT,
+    PART,
   ];
 
   int tagState = TagState.NO_TAG_SEEN;
@@ -775,14 +787,12 @@
   /**
    * Imports the library into the [importingLibrary].
    */
-  void importLibrary(DiagnosticReporter reporter,
-                     LibraryElementX importingLibrary) {
-    assert(invariant(importingLibrary,
-                     importedLibrary.exportsHandled,
-                     message: 'Exports not handled on $importedLibrary'));
+  void importLibrary(
+      DiagnosticReporter reporter, LibraryElementX importingLibrary) {
+    assert(invariant(importingLibrary, importedLibrary.exportsHandled,
+        message: 'Exports not handled on $importedLibrary'));
     Import tag = import.node;
-    CombinatorFilter combinatorFilter =
-        new CombinatorFilter.fromTag(tag);
+    CombinatorFilter combinatorFilter = new CombinatorFilter.fromTag(tag);
     if (tag != null && tag.prefix != null) {
       String prefix = tag.prefix.source;
       Element existingElement = importingLibrary.find(prefix);
@@ -804,8 +814,7 @@
       import.prefix = prefixElement;
       if (prefixElement.isDeferred) {
         prefixElement.addImport(
-            new DeferredLoaderGetterElementX(prefixElement),
-            import, reporter);
+            new DeferredLoaderGetterElementX(prefixElement), import, reporter);
       }
     } else {
       importedLibrary.forEachExport((Element element) {
@@ -858,7 +867,6 @@
   final int hashCode = ++hashCodeCounter;
   static int hashCodeCounter = 0;
 
-
   /**
    * A linked list of the import tags that import [library] mapped to the
    * corresponding libraries. This is used to propagate exports into imports
@@ -900,8 +908,8 @@
    * Registers that the library of this node imports [importLibrary] through the
    * [import] tag.
    */
-  void registerImportDependency(ImportElementX import,
-                                LibraryElement importedLibrary) {
+  void registerImportDependency(
+      ImportElementX import, LibraryElement importedLibrary) {
     imports = imports.prepend(new ImportLink(import, importedLibrary));
   }
 
@@ -909,8 +917,8 @@
    * Registers that the library of this node is exported by
    * [exportingLibraryNode] through the [export] tag.
    */
-  void registerExportDependency(ExportElementX export,
-                                LibraryDependencyNode exportingLibraryNode) {
+  void registerExportDependency(
+      ExportElementX export, LibraryDependencyNode exportingLibraryNode) {
     // Register the exported library in the exporting library node.
     exportingLibraryNode.exports =
         exportingLibraryNode.exports.prepend(library);
@@ -936,16 +944,16 @@
   ///
   /// Additionally, check that all names in the show/hide combinators are in the
   /// export scope of [exportedLibraryElement].
-  void registerHandledExports(DiagnosticReporter reporter,
-                              LibraryElement exportedLibraryElement,
-                              ExportElementX export,
-                              CombinatorFilter filter) {
+  void registerHandledExports(
+      DiagnosticReporter reporter,
+      LibraryElement exportedLibraryElement,
+      ExportElementX export,
+      CombinatorFilter filter) {
     assert(invariant(library, exportedLibraryElement.exportsHandled));
     exportedLibraryElement.forEachExport((Element exportedElement) {
       if (!filter.exclude(exportedElement)) {
-        Link<ExportElement> exports =
-            pendingExportMap.putIfAbsent(exportedElement,
-                                         () => const Link<ExportElement>());
+        Link<ExportElement> exports = pendingExportMap.putIfAbsent(
+            exportedElement, () => const Link<ExportElement>());
         pendingExportMap[exportedElement] = exports.prepend(export);
       }
     });
@@ -986,46 +994,38 @@
    * Adds [element] to the export scope for this node. If the [element] name
    * is a duplicate, an error element is inserted into the export scope.
    */
-  Element addElementToExportScope(
-      DiagnosticReporter reporter,
-      Element element,
+  Element addElementToExportScope(DiagnosticReporter reporter, Element element,
       Link<ExportElement> exports) {
     String name = element.name;
     DiagnosticMessage error;
     List<DiagnosticMessage> infos = <DiagnosticMessage>[];
 
     void createDuplicateExportMessage(
-        Element duplicate,
-        Link<ExportElement> duplicateExports) {
+        Element duplicate, Link<ExportElement> duplicateExports) {
       assert(invariant(library, !duplicateExports.isEmpty,
           message: "No export for $duplicate from ${duplicate.library} "
-                   "in $library."));
+              "in $library."));
       reporter.withCurrentElement(library, () {
         for (ExportElement export in duplicateExports) {
           if (error == null) {
             error = reporter.createMessage(
-                export,
-                MessageKind.DUPLICATE_EXPORT,
-                {'name': name});
+                export, MessageKind.DUPLICATE_EXPORT, {'name': name});
           } else {
             infos.add(reporter.createMessage(
-                export,
-                MessageKind.DUPLICATE_EXPORT_CONT,
-                {'name': name}));
+                export, MessageKind.DUPLICATE_EXPORT_CONT, {'name': name}));
           }
         }
       });
     }
 
     void createDuplicateExportDeclMessage(
-        Element duplicate,
-        Link<ExportElement> duplicateExports) {
+        Element duplicate, Link<ExportElement> duplicateExports) {
       assert(invariant(library, !duplicateExports.isEmpty,
           message: "No export for $duplicate from ${duplicate.library} "
-                   "in $library."));
+              "in $library."));
       infos.add(reporter.createMessage(
           duplicate,
-              MessageKind.DUPLICATE_EXPORT_DECL,
+          MessageKind.DUPLICATE_EXPORT_DECL,
           {'name': name, 'uriString': duplicateExports.head.uri}));
     }
 
@@ -1111,10 +1111,8 @@
 
   /// Check that all names in the show/hide combinators of [tag] are in the
   /// export scope of [library].
-  void checkLibraryDependency(
-      DiagnosticReporter reporter,
-      LibraryDependency tag,
-      LibraryElement library) {
+  void checkLibraryDependency(DiagnosticReporter reporter,
+      LibraryDependency tag, LibraryElement library) {
     if (tag == null || tag.combinators == null) return;
     for (Combinator combinator in tag.combinators) {
       for (Identifier identifier in combinator.identifiers) {
@@ -1129,23 +1127,16 @@
               // which case you shouldn't remove the combinator.
               continue;
             }
-            reporter.reportHintMessage(
-                identifier,
-                MessageKind.EMPTY_HIDE,
-                {'uri': library.canonicalUri,
-                 'name': name});
+            reporter.reportHintMessage(identifier, MessageKind.EMPTY_HIDE,
+                {'uri': library.canonicalUri, 'name': name});
           } else {
-            reporter.reportHintMessage(
-                identifier,
-                MessageKind.EMPTY_SHOW,
-                {'uri': library.canonicalUri,
-                 'name': name});
+            reporter.reportHintMessage(identifier, MessageKind.EMPTY_SHOW,
+                {'uri': library.canonicalUri, 'name': name});
           }
         }
       }
     }
   }
-
 }
 
 /**
@@ -1158,6 +1149,7 @@
  */
 class LibraryDependencyHandler implements LibraryLoader {
   final _LibraryLoaderTask task;
+  final List<LibraryElement> _newLibraries = <LibraryElement>[];
 
   /**
    * Newly loaded libraries and their corresponding node in the library
@@ -1170,12 +1162,10 @@
 
   LibraryDependencyHandler(this.task);
 
-  Compiler get compiler => task.compiler;
-
   DiagnosticReporter get reporter => task.reporter;
 
-  /// The libraries loaded with this handler.
-  Iterable<LibraryElement> get loadedLibraries => nodeMap.keys;
+  /// The libraries created with this handler.
+  Iterable<LibraryElement> get newLibraries => _newLibraries;
 
   /**
    * Performs a fixed-point computation on the export scopes of all registered
@@ -1200,7 +1190,7 @@
         tasks[node] = pendingExports;
       });
       tasks.forEach((LibraryDependencyNode node,
-                     Map<Element, Link<ExportElement>> pendingExports) {
+          Map<Element, Link<ExportElement>> pendingExports) {
         pendingExports.forEach((Element element, Link<ExportElement> exports) {
           element = node.addElementToExportScope(reporter, element, exports);
           if (node.propagateElement(element)) {
@@ -1231,9 +1221,10 @@
 
   /// Registers that [library] depends on [loadedLibrary] through
   /// [libraryDependency].
-  void registerDependency(LibraryElementX library,
-                          LibraryDependencyElementX libraryDependency,
-                          LibraryElement loadedLibrary) {
+  void registerDependency(
+      LibraryElementX library,
+      LibraryDependencyElementX libraryDependency,
+      LibraryElement loadedLibrary) {
     if (libraryDependency.isExport) {
       // [loadedLibrary] is exported by [library].
       LibraryDependencyNode exportingNode = nodeMap[library];
@@ -1264,8 +1255,11 @@
    * Registers [library] for the processing of its import/export scope.
    */
   void registerNewLibrary(LibraryElement library) {
-    nodeMap[library] = new LibraryDependencyNode(library);
-    compiler.onLibraryCreated(library);
+    task.listener.onLibraryCreated(library);
+    _newLibraries.add(library);
+    if (!library.exportsHandled) {
+      nodeMap[library] = new LibraryDependencyNode(library);
+    }
   }
 
   /**
@@ -1305,7 +1299,7 @@
   /// [callback] is called once for each chain of imports leading to [uri] until
   /// [callback] returns `false`.
   void forEachImportChain(Uri uri,
-                          {bool callback(Link<Uri> importChainReversed)});
+      {bool callback(Link<Uri> importChainReversed)});
 }
 
 class _LoadedLibraries implements LoadedLibraries {
@@ -1314,8 +1308,9 @@
   final Map<Uri, LibraryElement> loadedLibraries = <Uri, LibraryElement>{};
   final Map<LibraryElement, LibraryDependencyNode> nodeMap;
 
-  _LoadedLibraries(this.rootLibrary, this.nodeMap, this.task) {
-    nodeMap.keys.forEach((LibraryElement loadedLibrary) {
+  _LoadedLibraries(this.rootLibrary, Iterable<LibraryElement> libraries,
+      this.nodeMap, this.task) {
+    libraries.forEach((LibraryElement loadedLibrary) {
       loadedLibraries[loadedLibrary.canonicalUri] = loadedLibrary;
     });
   }
@@ -1329,7 +1324,7 @@
   void forEachLibrary(f(LibraryElement library)) => nodeMap.keys.forEach(f);
 
   void forEachImportChain(Uri targetUri,
-                          {bool callback(Link<Uri> importChainReversed)}) {
+      {bool callback(Link<Uri> importChainReversed)}) {
     bool aborted = false;
 
     /// Map from libraries to the set of (unreversed) paths to [uri].
@@ -1343,8 +1338,7 @@
     ///
     /// For every found suffix it prepends the given [prefix] and the canonical
     /// uri of [library] and invokes the [callback] with the concatenated chain.
-    void computeSuffixes(LibraryElement library,
-                         Link<Uri> prefix) {
+    void computeSuffixes(LibraryElement library, Link<Uri> prefix) {
       if (aborted) return;
 
       Uri canonicalUri = library.canonicalUri;
@@ -1393,7 +1387,8 @@
           processLibrary(exportedLibrary);
           if (aborted) return;
         }
-      } else { // Here `targetUri == canonicalUri`.
+      } else {
+        // Here `targetUri == canonicalUri`.
         if (!callback(prefix)) {
           aborted = true;
           return;
@@ -1406,4 +1401,84 @@
 
     computeSuffixes(rootLibrary, const Link<Uri>());
   }
+
+  String toString() => 'root=$rootLibrary,libraries=${loadedLibraries.keys}';
+}
+
+/// API used by the library loader to translate internal SDK URIs into file
+/// system readable URIs.
+abstract class ResolvedUriTranslator {
+  // TODO(sigmund): move here the comments from library loader.
+  /// Translate the resolved [uri] in the context of [importingLibrary].
+  ///
+  /// Use [spannable] for error reporting.
+  Uri translate(LibraryElement importingLibrary, Uri uri,
+      [Spannable spannable]);
+}
+
+// TODO(sigmund): remove ScriptLoader & ElementScanner. Such abstraction seems
+// rather low-level. It might be more practical to split the library-loading
+// task itself.  The task would continue to do the work of recursively loading
+// dependencies, but it can delegate to a set of subloaders how to do the actual
+// loading. We would then have a list of subloaders that use different
+// implementations: in-memory cache, deserialization, scanning from files.
+//
+// For example, the API might look like this:
+//
+// /// APIs to create [LibraryElement] and [CompilationUnitElements] given it's
+// /// URI.
+// abstract class SubLoader {
+//   /// Return the library corresponding to the script at [uri].
+//   ///
+//   /// Use [spannable] for error reporting.
+//   Future<LibraryElement> createLibrary(Uri uri, [Spannable spannable]);
+//
+//   /// Return the compilation unit at [uri] that is a part of [library].
+//   Future<CompilationUnitElement> createUnit(Uri uri, LibraryElement library,
+//       [Spannable spannable]);
+// }
+//
+// /// A [SubLoader] that parses a serialized form of the element model to
+// /// produce the results.
+// class DeserializingUnitElementCreator implements SubLoader {
+// ...
+// }
+//
+// /// A [SubLoader] that finds the script sources and does a diet parse
+// /// on them to produces the results.
+// class ScanningUnitElementCreator implements SubLoader {
+// ...
+// }
+//
+// Each subloader would internally create what they need (a scanner, a
+// deserializer), and we wouldn't need to create abstractions to pass in
+// something that is only used by the loader.
+
+/// API used by the library loader to request scripts from the compiler system.
+abstract class ScriptLoader {
+  /// Load script from a readable [uri], report any errors using the location of
+  /// the given [spannable].
+  Future<Script> readScript(Uri uri, [Spannable spannable]);
+}
+
+/// API used by the library loader to synchronously scan a library or
+/// compilation unit and ensure that their library tags are computed.
+abstract class ElementScanner {
+  void scanLibrary(LibraryElement library);
+  void scanUnit(CompilationUnitElement unit);
+}
+
+/// TODO(sigmund): remove this abstraction. Ideally the loader can produce the
+/// LoadedLibraries results once, and the compiler and choose what to do with
+/// it instead.
+abstract class LibraryLoaderListener {
+  /// Called after a request to load a library. The [results] will include all
+  /// transitive libraries loaded as a result of the initial request.
+  Future onLibrariesLoaded(LoadedLibraries results);
+
+  /// Called whenever a library element is created.
+  void onLibraryCreated(LibraryElement library);
+
+  /// Called whenever a library is scanned from a script file.
+  Future onLibraryScanned(LibraryElement library, LibraryLoader loader);
 }
diff --git a/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart b/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart
index d157b74..e838f8e 100644
--- a/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart
+++ b/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart
@@ -4,14 +4,11 @@
 
 library mirror_renamer;
 
-import '../compiler.dart' show
-    Compiler;
-import '../dart_backend/dart_backend.dart' show
-    DartBackend,
-    PlaceholderCollector;
+import '../compiler.dart' show Compiler;
+import '../dart_backend/dart_backend.dart'
+    show DartBackend, PlaceholderCollector;
 import '../elements/elements.dart';
-import '../tokens/token.dart' show
-    Token;
+import '../tokens/token.dart' show Token;
 import '../tree/tree.dart';
 
 part 'renamer.dart';
@@ -28,5 +25,5 @@
   void registerStaticSend(Element currentElement, Element target, Node node) {}
 
   void addRenames(Map<Node, String> renames, List<Node> topLevelNodes,
-                  PlaceholderCollector placeholderCollector) {}
+      PlaceholderCollector placeholderCollector) {}
 }
diff --git a/pkg/compiler/lib/src/mirror_renamer/renamer.dart b/pkg/compiler/lib/src/mirror_renamer/renamer.dart
index 4f206c1..5b2daa1 100644
--- a/pkg/compiler/lib/src/mirror_renamer/renamer.dart
+++ b/pkg/compiler/lib/src/mirror_renamer/renamer.dart
@@ -40,10 +40,10 @@
 
   MirrorRenamerImpl(this.compiler, this.backend, LibraryElement library)
       : this.helperLibrary = library,
-        getNameFunction = library.find(
-            MirrorRenamerImpl.MIRROR_HELPER_GET_NAME_FUNCTION),
-        symbolsMapVariable = library.find(
-            MirrorRenamerImpl.MIRROR_HELPER_SYMBOLS_MAP_NAME);
+        getNameFunction =
+            library.find(MirrorRenamerImpl.MIRROR_HELPER_GET_NAME_FUNCTION),
+        symbolsMapVariable =
+            library.find(MirrorRenamerImpl.MIRROR_HELPER_SYMBOLS_MAP_NAME);
 
   bool isMirrorHelperLibrary(LibraryElement element) {
     return element == helperLibrary;
@@ -67,7 +67,7 @@
    * contain all the toplevel ast nodes that will be emitted in the output.
    */
   void addRenames(Map<Node, String> renames, List<Node> topLevelNodes,
-                  PlaceholderCollector placeholderCollector) {
+      PlaceholderCollector placeholderCollector) {
     // Right now we only support instances of MirrorSystem.getName,
     // hence if there are no occurence of these we don't do anything.
     if (mirrorSystemGetNameNodes.isEmpty) {
diff --git a/pkg/compiler/lib/src/mirrors/analyze.dart b/pkg/compiler/lib/src/mirrors/analyze.dart
index ad3c0ea..d6ab956 100644
--- a/pkg/compiler/lib/src/mirrors/analyze.dart
+++ b/pkg/compiler/lib/src/mirrors/analyze.dart
@@ -9,6 +9,7 @@
 import 'source_mirrors.dart';
 import 'dart2js_mirrors.dart' show Dart2JsMirrorSystem;
 import '../../compiler.dart' as api;
+import '../options.dart' show CompilerOptions;
 import '../apiimpl.dart' as apiimpl;
 import '../compiler.dart' show Compiler;
 import '../old_to_new_api.dart';
@@ -22,14 +23,15 @@
  * static inspection of the source code.
  */
 // TODO(johnniwinther): Move this to [compiler/compiler.dart].
-Future<MirrorSystem> analyze(List<Uri> libraries,
-                             Uri libraryRoot,
-                             Uri packageRoot,
-                             api.CompilerInputProvider inputProvider,
-                             api.DiagnosticHandler diagnosticHandler,
-                             [List<String> options = const <String>[],
-                              Uri packageConfig,
-                              api.PackagesDiscoveryProvider findPackages]) {
+Future<MirrorSystem> analyze(
+    List<Uri> libraries,
+    Uri libraryRoot,
+    Uri packageRoot,
+    api.CompilerInputProvider inputProvider,
+    api.DiagnosticHandler diagnosticHandler,
+    [List<String> options = const <String>[],
+    Uri packageConfig,
+    api.PackagesDiscoveryProvider findPackages]) {
   if (!libraryRoot.path.endsWith("/")) {
     throw new ArgumentError("libraryRoot must end with a /");
   }
@@ -45,10 +47,9 @@
   options.add('--allow-native-extensions');
 
   bool compilationFailed = false;
-  void internalDiagnosticHandler(Uri uri, int begin, int end,
-                                 String message, api.Diagnostic kind) {
-    if (kind == api.Diagnostic.ERROR ||
-        kind == api.Diagnostic.CRASH) {
+  void internalDiagnosticHandler(
+      Uri uri, int begin, int end, String message, api.Diagnostic kind) {
+    if (kind == api.Diagnostic.ERROR || kind == api.Diagnostic.CRASH) {
       compilationFailed = true;
     }
     diagnosticHandler(uri, begin, end, message, kind);
@@ -58,12 +59,13 @@
       new LegacyCompilerInput(inputProvider),
       new LegacyCompilerOutput(),
       new LegacyCompilerDiagnostics(internalDiagnosticHandler),
-      libraryRoot,
-      packageRoot,
-      options,
-      const {},
-      packageConfig,
-      findPackages);
+      new CompilerOptions.parse(
+          libraryRoot: libraryRoot,
+          packageRoot: packageRoot,
+          options: options,
+          environment: const {},
+          packageConfig: packageConfig,
+          packagesDiscoveryProvider: findPackages));
   compiler.librariesToAnalyzeWhenRun = libraries;
   return compiler.run(null).then((bool success) {
     if (success && !compilationFailed) {
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_instance_mirrors.dart b/pkg/compiler/lib/src/mirrors/dart2js_instance_mirrors.dart
index 55d8789..039f5af 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_instance_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_instance_mirrors.dart
@@ -13,9 +13,8 @@
     throw new UnsupportedError('ObjectMirror.setField unsupported.');
   }
 
-  InstanceMirror invoke(Symbol memberName,
-                        List positionalArguments,
-                        [Map<Symbol, dynamic> namedArguments]) {
+  InstanceMirror invoke(Symbol memberName, List positionalArguments,
+      [Map<Symbol, dynamic> namedArguments]) {
     throw new UnsupportedError('ObjectMirror.invoke unsupported.');
   }
 
@@ -36,7 +35,6 @@
     Dart2JsMirrorSystem mirrorSystem,
     ConstantExpression constant,
     ConstantValue value) {
-
   if (value.isBool) {
     return new Dart2JsBoolConstantMirror(mirrorSystem, constant, value);
   } else if (value.isNum) {
@@ -56,12 +54,11 @@
   } else if (value.isConstructedObject) {
     return new Dart2JsConstructedConstantMirror(mirrorSystem, constant, value);
   }
-  mirrorSystem.compiler.reporter.internalError(NO_LOCATION_SPANNABLE,
-      "Unexpected constant value $value");
+  mirrorSystem.compiler.reporter
+      .internalError(NO_LOCATION_SPANNABLE, "Unexpected constant value $value");
   return null;
 }
 
-
 ////////////////////////////////////////////////////////////////////////////////
 // Mirrors on constant values used for metadata.
 ////////////////////////////////////////////////////////////////////////////////
@@ -97,8 +94,7 @@
 
 class Dart2JsNullConstantMirror extends Dart2JsConstantMirror {
   Dart2JsNullConstantMirror(Dart2JsMirrorSystem mirrorSystem,
-                            ConstantExpression constant,
-                            NullConstantValue value)
+      ConstantExpression constant, NullConstantValue value)
       : super(mirrorSystem, constant, value);
 
   NullConstantValue get _value => super._value;
@@ -110,14 +106,13 @@
 
 class Dart2JsBoolConstantMirror extends Dart2JsConstantMirror {
   Dart2JsBoolConstantMirror(Dart2JsMirrorSystem mirrorSystem,
-                            ConstantExpression constant,
-                            BoolConstantValue value)
+      ConstantExpression constant, BoolConstantValue value)
       : super(mirrorSystem, constant, value);
 
-  Dart2JsBoolConstantMirror.fromBool(Dart2JsMirrorSystem mirrorSystem,
-                                     bool value)
+  Dart2JsBoolConstantMirror.fromBool(
+      Dart2JsMirrorSystem mirrorSystem, bool value)
       : super(mirrorSystem, null,
-              value ? new TrueConstantValue() : new FalseConstantValue());
+            value ? new TrueConstantValue() : new FalseConstantValue());
 
   BoolConstantValue get _value => super._value;
 
@@ -128,14 +123,13 @@
 
 class Dart2JsStringConstantMirror extends Dart2JsConstantMirror {
   Dart2JsStringConstantMirror(Dart2JsMirrorSystem mirrorSystem,
-                              ConstantExpression constant,
-                              StringConstantValue value)
+      ConstantExpression constant, StringConstantValue value)
       : super(mirrorSystem, constant, value);
 
-  Dart2JsStringConstantMirror.fromString(Dart2JsMirrorSystem mirrorSystem,
-                                         String text)
+  Dart2JsStringConstantMirror.fromString(
+      Dart2JsMirrorSystem mirrorSystem, String text)
       : super(mirrorSystem, null,
-              new StringConstantValue(new DartString.literal(text)));
+            new StringConstantValue(new DartString.literal(text)));
 
   StringConstantValue get _value => super._value;
 
@@ -146,8 +140,7 @@
 
 class Dart2JsNumConstantMirror extends Dart2JsConstantMirror {
   Dart2JsNumConstantMirror(Dart2JsMirrorSystem mirrorSystem,
-                           ConstantExpression constant,
-                           NumConstantValue value)
+      ConstantExpression constant, NumConstantValue value)
       : super(mirrorSystem, constant, value);
 
   NumConstantValue get _value => super._value;
@@ -160,8 +153,7 @@
 class Dart2JsListConstantMirror extends Dart2JsConstantMirror
     implements ListInstanceMirror {
   Dart2JsListConstantMirror(Dart2JsMirrorSystem mirrorSystem,
-                            ConstantExpression constant,
-                            ListConstantValue value)
+      ConstantExpression constant, ListConstantValue value)
       : super(mirrorSystem, constant, value);
 
   ListConstantValue get _value => super._value;
@@ -181,8 +173,7 @@
   List<String> _listCache;
 
   Dart2JsMapConstantMirror(Dart2JsMirrorSystem mirrorSystem,
-                           ConstantExpression constant,
-                           MapConstantValue value)
+      ConstantExpression constant, MapConstantValue value)
       : super(mirrorSystem, constant, value);
 
   MapConstantValue get _value => super._value;
@@ -216,10 +207,8 @@
 
 class Dart2JsTypeConstantMirror extends Dart2JsConstantMirror
     implements TypeInstanceMirror {
-
   Dart2JsTypeConstantMirror(Dart2JsMirrorSystem mirrorSystem,
-                            ConstantExpression constant,
-                            TypeConstantValue value)
+      ConstantExpression constant, TypeConstantValue value)
       : super(mirrorSystem, constant, value);
 
   TypeConstantValue get _value => super._value;
@@ -232,8 +221,7 @@
   Map<String, ConstantValue> _fieldMapCache;
 
   Dart2JsConstructedConstantMirror(Dart2JsMirrorSystem mirrorSystem,
-                                   ConstantExpression constant,
-                                   ConstructedConstantValue value)
+      ConstantExpression constant, ConstructedConstantValue value)
       : super(mirrorSystem, constant, value);
 
   ConstructedConstantValue get _value => super._value;
@@ -262,8 +250,8 @@
 }
 
 class Dart2JsCommentInstanceMirror extends Object
-  with ObjectMirrorMixin, InstanceMirrorMixin
-  implements CommentInstanceMirror {
+    with ObjectMirrorMixin, InstanceMirrorMixin
+    implements CommentInstanceMirror {
   final Dart2JsMirrorSystem mirrorSystem;
   final String text;
   String _trimmedText;
@@ -271,8 +259,8 @@
   Dart2JsCommentInstanceMirror(this.mirrorSystem, this.text);
 
   ClassMirror get type {
-    return mirrorSystem._getTypeDeclarationMirror(
-        mirrorSystem.compiler.documentClass);
+    return mirrorSystem
+        ._getTypeDeclarationMirror(mirrorSystem.compiler.documentClass);
   }
 
   bool get isDocComment => text.startsWith('/**') || text.startsWith('///');
@@ -290,8 +278,8 @@
     } else if (fieldName == #text) {
       return new Dart2JsStringConstantMirror.fromString(mirrorSystem, text);
     } else if (fieldName == #trimmedText) {
-      return new Dart2JsStringConstantMirror.fromString(mirrorSystem,
-                                                        trimmedText);
+      return new Dart2JsStringConstantMirror.fromString(
+          mirrorSystem, trimmedText);
     }
     return super.getField(fieldName);
   }
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart b/pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart
index feaf549..39468d3 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart
@@ -4,8 +4,7 @@
 
 part of dart2js.mirrors;
 
-class Dart2JsLibraryMirror
-    extends Dart2JsElementMirror
+class Dart2JsLibraryMirror extends Dart2JsElementMirror
     with ObjectMirrorMixin, ContainerMixin
     implements LibrarySourceMirror {
   List<LibraryDependencySourceMirror> _libraryDependencies;
@@ -80,7 +79,7 @@
           <LibraryDependency, Dart2JsLibraryDependencyMirror>{};
 
       void addLibraryDependency(LibraryDependency libraryDependency,
-                                LibraryElement targetLibraryElement) {
+          LibraryElement targetLibraryElement) {
         assert(targetLibraryElement != null);
         LibraryMirror targetLibrary =
             mirrorSystem._getLibrary(targetLibraryElement);
@@ -119,14 +118,13 @@
   final Dart2JsLibraryMirror _targetLibrary;
   List<CombinatorMirror> _combinators;
 
-  Dart2JsLibraryDependencyMirror(this._node,
-                                 this._sourceLibrary,
-                                 this._targetLibrary);
+  Dart2JsLibraryDependencyMirror(
+      this._node, this._sourceLibrary, this._targetLibrary);
 
   SourceLocation get location {
     return new Dart2JsSourceLocation(
-      _sourceLibrary._element.entryCompilationUnit.script,
-      _sourceLibrary.mirrorSystem.compiler.reporter.spanFromSpannable(_node));
+        _sourceLibrary._element.entryCompilationUnit.script,
+        _sourceLibrary.mirrorSystem.compiler.reporter.spanFromSpannable(_node));
   }
 
   List<CombinatorMirror> get combinators {
@@ -138,8 +136,8 @@
           for (Identifier identifier in combinator.identifiers.nodes) {
             identifiers.add(identifier.source);
           }
-          _combinators.add(new Dart2JsCombinatorMirror(
-              identifiers, isShow: combinator.isShow));
+          _combinators.add(new Dart2JsCombinatorMirror(identifiers,
+              isShow: combinator.isShow));
         }
       }
     }
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart b/pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart
index bd510c2..88ffbf9 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_member_mirrors.dart
@@ -9,14 +9,12 @@
 //------------------------------------------------------------------------------
 
 abstract class Dart2JsMemberMirror extends Dart2JsElementMirror {
-
   Dart2JsMemberMirror(Dart2JsMirrorSystem system, AstElement element)
       : super(system, element);
 
   bool get isStatic => false;
 }
 
-
 class Dart2JsMethodKind {
   static const Dart2JsMethodKind REGULAR = const Dart2JsMethodKind("regular");
   static const Dart2JsMethodKind GENERATIVE =
@@ -36,21 +34,21 @@
   String toString() => text;
 }
 
-class Dart2JsMethodMirror extends Dart2JsMemberMirror
-    implements MethodMirror {
+class Dart2JsMethodMirror extends Dart2JsMemberMirror implements MethodMirror {
   final Dart2JsDeclarationMirror owner;
   final String _simpleNameString;
   final Dart2JsMethodKind _kind;
 
-  Dart2JsMethodMirror._internal(Dart2JsDeclarationMirror owner,
+  Dart2JsMethodMirror._internal(
+      Dart2JsDeclarationMirror owner,
       FunctionElement function,
       String this._simpleNameString,
       Dart2JsMethodKind this._kind)
       : this.owner = owner,
         super(owner.mirrorSystem, function);
 
-  factory Dart2JsMethodMirror(Dart2JsDeclarationMirror owner,
-                              FunctionElement function) {
+  factory Dart2JsMethodMirror(
+      Dart2JsDeclarationMirror owner, FunctionElement function) {
     String simpleName = function.name;
     // TODO(ahe): This method should not be calling
     // Elements.operatorNameToIdentifier.
@@ -75,8 +73,7 @@
     } else {
       kind = Dart2JsMethodKind.REGULAR;
     }
-    return new Dart2JsMethodMirror._internal(owner, function,
-        simpleName, kind);
+    return new Dart2JsMethodMirror._internal(owner, function, simpleName, kind);
   }
 
   FunctionElement get _function => _element;
@@ -86,21 +83,22 @@
   // TODO(johnniwinther): This seems stale and broken.
   Symbol get constructorName => isConstructor ? simpleName : const Symbol('');
 
-  bool get isConstructor
-      => isGenerativeConstructor || isConstConstructor ||
-         isFactoryConstructor || isRedirectingConstructor;
+  bool get isConstructor =>
+      isGenerativeConstructor ||
+      isConstConstructor ||
+      isFactoryConstructor ||
+      isRedirectingConstructor;
 
   bool get isSynthetic => false;
 
   bool get isStatic => _function.isStatic;
 
   List<ParameterMirror> get parameters {
-    return _parametersFromFunctionSignature(this,
-        _function.functionSignature);
+    return _parametersFromFunctionSignature(this, _function.functionSignature);
   }
 
-  TypeMirror get returnType => owner._getTypeMirror(
-      _function.functionSignature.type.returnType);
+  TypeMirror get returnType =>
+      owner._getTypeMirror(_function.functionSignature.type.returnType);
 
   bool get isAbstract => _function.isAbstract;
 
@@ -140,8 +138,7 @@
   final Dart2JsDeclarationMirror owner;
   VariableElement _variable;
 
-  Dart2JsFieldMirror(Dart2JsDeclarationMirror owner,
-                     VariableElement variable)
+  Dart2JsFieldMirror(Dart2JsDeclarationMirror owner, VariableElement variable)
       : this.owner = owner,
         this._variable = variable,
         super(owner.mirrorSystem, variable);
@@ -155,8 +152,6 @@
   bool get isConst => _variable.isConst;
 
   TypeMirror get type => owner._getTypeMirror(_variable.type);
-
-
 }
 
 class Dart2JsParameterMirror extends Dart2JsMemberMirror
@@ -165,10 +160,9 @@
   final bool isOptional;
   final bool isNamed;
 
-  factory Dart2JsParameterMirror(Dart2JsDeclarationMirror owner,
-                                 FormalElement element,
-                                 {bool isOptional: false,
-                                  bool isNamed: false}) {
+  factory Dart2JsParameterMirror(
+      Dart2JsDeclarationMirror owner, FormalElement element,
+      {bool isOptional: false, bool isNamed: false}) {
     if (element is InitializingFormalElement) {
       return new Dart2JsFieldParameterMirror(
           owner, element, isOptional, isNamed);
@@ -179,11 +173,9 @@
   }
 
   Dart2JsParameterMirror._normal(Dart2JsDeclarationMirror owner,
-                                 FormalElement element,
-                                 this.isOptional,
-                                 this.isNamed)
-    : this.owner = owner,
-      super(owner.mirrorSystem, element);
+      FormalElement element, this.isOptional, this.isNamed)
+      : this.owner = owner,
+        super(owner.mirrorSystem, element);
 
   FormalElement get _element => super._element;
 
@@ -198,13 +190,13 @@
       // TODO(johnniwinther): Get the constant from the [TreeElements]
       // associated with the enclosing method.
       ParameterElement parameter = _element;
-      ConstantExpression constant = mirrorSystem.compiler.constants
-          .getConstantForVariable(parameter);
+      ConstantExpression constant =
+          mirrorSystem.compiler.constants.getConstantForVariable(parameter);
       assert(invariant(parameter, constant != null,
           message: "Missing constant for parameter "
-                   "$parameter with default value."));
-      return _convertConstantToInstanceMirror(mirrorSystem,
-          constant, mirrorSystem.compiler.constants.getConstantValue(constant));
+              "$parameter with default value."));
+      return _convertConstantToInstanceMirror(mirrorSystem, constant,
+          mirrorSystem.compiler.constants.getConstantValue(constant));
     }
     return null;
   }
@@ -223,17 +215,14 @@
 }
 
 class Dart2JsFieldParameterMirror extends Dart2JsParameterMirror {
-
   Dart2JsFieldParameterMirror(Dart2JsDeclarationMirror method,
-                              InitializingFormalElement element,
-                              bool isOptional,
-                              bool isNamed)
+      InitializingFormalElement element, bool isOptional, bool isNamed)
       : super._normal(method, element, isOptional, isNamed);
 
   InitializingFormalElement get _fieldParameterElement => _element;
 
   bool get isInitializingFormal => true;
 
-  VariableMirror get initializedField => new Dart2JsFieldMirror(
-      owner.owner, _fieldParameterElement.fieldElement);
+  VariableMirror get initializedField =>
+      new Dart2JsFieldMirror(owner.owner, _fieldParameterElement.fieldElement);
 }
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart b/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
index 0e64cc3..745712a 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
@@ -7,23 +7,18 @@
 import 'dart:collection' show UnmodifiableListView, UnmodifiableMapView;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../constants/expressions.dart';
 import '../constants/values.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    LibraryElementX;
-import '../resolution/scope.dart' show
-    Scope;
+import '../elements/modelx.dart' show LibraryElementX;
+import '../resolution/scope.dart' show Scope;
 import '../script.dart';
 import '../tokens/token.dart';
 import '../tokens/token_constants.dart' as Tokens;
 import '../tree/tree.dart';
-import '../util/util.dart'
-    show Link,
-         LinkBuilder;
+import '../util/util.dart' show Link, LinkBuilder;
 import '../util/characters.dart' show $CR, $LF;
 
 import 'source_mirrors.dart';
@@ -48,17 +43,16 @@
 }
 
 List<ParameterMirror> _parametersFromFunctionSignature(
-    Dart2JsDeclarationMirror owner,
-    FunctionSignature signature) {
+    Dart2JsDeclarationMirror owner, FunctionSignature signature) {
   var parameters = <ParameterMirror>[];
   signature.requiredParameters.forEach((FormalElement parameter) {
-    parameters.add(new Dart2JsParameterMirror(
-        owner, parameter, isOptional: false, isNamed: false));
+    parameters.add(new Dart2JsParameterMirror(owner, parameter,
+        isOptional: false, isNamed: false));
   });
   bool isNamed = signature.optionalParametersAreNamed;
   signature.optionalParameters.forEach((FormalElement parameter) {
-    parameters.add(new Dart2JsParameterMirror(
-        owner, parameter, isOptional: true, isNamed: isNamed));
+    parameters.add(new Dart2JsParameterMirror(owner, parameter,
+        isOptional: true, isNamed: isNamed));
   });
   return parameters;
 }
@@ -82,7 +76,6 @@
 
 abstract class Dart2JsDeclarationMirror extends Dart2JsMirror
     implements DeclarationSourceMirror {
-
   bool get isTopLevel => owner != null && owner is LibraryMirror;
 
   bool get isPrivate => _isPrivate(_simpleNameString);
@@ -130,8 +123,8 @@
       }
       return members;
     }
-    mirrorSystem.compiler.reporter.internalError(element,
-        "Unexpected member type $element ${element.kind}.");
+    mirrorSystem.compiler.reporter.internalError(
+        element, "Unexpected member type $element ${element.kind}.");
     return null;
   }
 }
@@ -142,8 +135,8 @@
   List<InstanceMirror> _metadata;
 
   Dart2JsElementMirror(this.mirrorSystem, this._element) {
-    assert (mirrorSystem != null);
-    assert (_element != null);
+    assert(mirrorSystem != null);
+    assert(_element != null);
   }
 
   String get _simpleNameString => _element.name;
@@ -203,8 +196,8 @@
       span = new SourceSpan(script.resourceUri, 0, 0);
     } else {
       Token endToken = getEndToken();
-      span = new SourceSpan.fromTokens(
-          script.resourceUri, beginToken, endToken);
+      span =
+          new SourceSpan.fromTokens(script.resourceUri, beginToken, endToken);
     }
     return new Dart2JsSourceLocation(script, span);
   }
@@ -213,8 +206,8 @@
 
   void _appendCommentTokens(Token commentToken) {
     while (commentToken != null && commentToken.kind == Tokens.COMMENT_TOKEN) {
-      _metadata.add(new Dart2JsCommentInstanceMirror(
-          mirrorSystem, commentToken.value));
+      _metadata.add(
+          new Dart2JsCommentInstanceMirror(mirrorSystem, commentToken.value));
       commentToken = commentToken.next;
     }
   }
@@ -227,9 +220,10 @@
             mirrorSystem.compiler.commentMap[metadata.beginToken]);
         metadata.ensureResolved(mirrorSystem.compiler.resolution);
         _metadata.add(_convertConstantToInstanceMirror(
-            mirrorSystem, metadata.constant,
-            mirrorSystem.compiler.constants.getConstantValue(
-                metadata.constant)));
+            mirrorSystem,
+            metadata.constant,
+            mirrorSystem.compiler.constants
+                .getConstantValue(metadata.constant)));
       }
       _appendCommentTokens(mirrorSystem.compiler.commentMap[getBeginToken()]);
     }
@@ -245,7 +239,7 @@
     if (index != -1) {
       // Lookup [: prefix.id :].
       String prefix = name.substring(0, index);
-      String id = name.substring(index+1);
+      String id = name.substring(index + 1);
       result = scope.lookup(prefix);
       if (result != null && result.isPrefix) {
         PrefixElement prefix = result;
@@ -265,8 +259,7 @@
     if (identical(this, other)) return true;
     if (other == null) return false;
     if (other is! Dart2JsElementMirror) return false;
-    return _element == other._element &&
-           owner == other.owner;
+    return _element == other._element && owner == other.owner;
   }
 
   int get hashCode {
@@ -314,11 +307,9 @@
 
   Dart2JsMirrorSystem get mirrorSystem => this;
 
-  TypeMirror get dynamicType =>
-      _convertTypeToTypeMirror(const DynamicType());
+  TypeMirror get dynamicType => _convertTypeToTypeMirror(const DynamicType());
 
-  TypeMirror get voidType =>
-      _convertTypeToTypeMirror(const VoidType());
+  TypeMirror get voidType => _convertTypeToTypeMirror(const VoidType());
 
   TypeMirror _convertTypeToTypeMirror(DartType type) {
     assert(type != null);
@@ -343,8 +334,8 @@
         return new Dart2JsTypedefMirror(this, type);
       }
     }
-    compiler.reporter.internalError(type.element,
-        "Unexpected type $type of kind ${type.kind}.");
+    compiler.reporter.internalError(
+        type.element, "Unexpected type $type of kind ${type.kind}.");
     return null;
   }
 
@@ -367,10 +358,10 @@
       var declarations = <Symbol, DeclarationMirror>{};
       _forEachElement((Element element) {
         for (DeclarationMirror mirror in _getDeclarationMirrors(element)) {
-          assert(invariant(_element,
-              !declarations.containsKey(mirror.simpleName),
-              message: "Declaration name '${nameOf(mirror)}' "
-                       "is not unique in $_element."));
+          assert(
+              invariant(_element, !declarations.containsKey(mirror.simpleName),
+                  message: "Declaration name '${nameOf(mirror)}' "
+                      "is not unique in $_element."));
           declarations[mirror.simpleName] = mirror;
         }
       });
@@ -397,8 +388,8 @@
  * If [element] is an [AbstractFieldElement] the mirror for its getter is
  * returned or, if not present, the mirror for its setter.
  */
-DeclarationMirror _convertElementToDeclarationMirror(Dart2JsMirrorSystem system,
-                                                     Element element) {
+DeclarationMirror _convertElementToDeclarationMirror(
+    Dart2JsMirrorSystem system, Element element) {
   if (element.isTypeVariable) {
     TypeVariableElement typeVariable = element;
     return new Dart2JsTypeVariableMirror(system, typeVariable.type);
@@ -421,8 +412,8 @@
     Dart2JsMethodMirror method = _convertElementMethodToMethodMirror(
         container, element.outermostEnclosingMemberOrTopLevel);
     // TODO(johnniwinther): Find the right info for [isOptional] and [isNamed].
-    return new Dart2JsParameterMirror(
-        method, element, isOptional: false, isNamed: false);
+    return new Dart2JsParameterMirror(method, element,
+        isOptional: false, isNamed: false);
   }
   Iterable<DeclarationMirror> members =
       container._getDeclarationMirrors(element);
@@ -462,8 +453,8 @@
 class BackDoor {
   /// Return the compilation units comprising [library].
   static List<Mirror> compilationUnitsOf(Dart2JsLibraryMirror library) {
-    return library._element.compilationUnits.mapToList(
-        (cu) => new Dart2JsCompilationUnitMirror(cu, library));
+    return library._element.compilationUnits
+        .mapToList((cu) => new Dart2JsCompilationUnitMirror(cu, library));
   }
 
   static Iterable<ConstantExpression> metadataSyntaxOf(
@@ -477,7 +468,7 @@
   }
 
   static ConstantExpression defaultValueSyntaxOf(
-        Dart2JsParameterMirror parameter) {
+      Dart2JsParameterMirror parameter) {
     if (!parameter.hasDefaultValue) return null;
     ParameterElement parameterElement = parameter._element;
     Compiler compiler = parameter.mirrorSystem.compiler;
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_type_mirrors.dart b/pkg/compiler/lib/src/mirrors/dart2js_type_mirrors.dart
index b2a2ea5..6bf227c 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_type_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_type_mirrors.dart
@@ -9,9 +9,9 @@
   Type get reflectedType {
     throw new UnsupportedError("ClassMirror.reflectedType is not supported.");
   }
-  InstanceMirror newInstance(Symbol constructorName,
-                             List positionalArguments,
-                             [Map<Symbol, dynamic> namedArguments]) {
+
+  InstanceMirror newInstance(Symbol constructorName, List positionalArguments,
+      [Map<Symbol, dynamic> namedArguments]) {
     throw new UnsupportedError("ClassMirror.newInstance is not supported.");
   }
 }
@@ -64,19 +64,17 @@
   }
 
   String toString() => _type.toString();
-
 }
 
 /// Base implementations for mirrors on element based types.
-abstract class Dart2JsTypeElementMirror
-    extends Dart2JsElementMirror
+abstract class Dart2JsTypeElementMirror extends Dart2JsElementMirror
     with Dart2JsTypeMirror
     implements TypeSourceMirror {
   final DartType _type;
 
   Dart2JsTypeElementMirror(Dart2JsMirrorSystem system, DartType type)
-    : super(system, type.element),
-      this._type = type;
+      : super(system, type.element),
+        this._type = type;
 
   Dart2JsLibraryMirror get library {
     return mirrorSystem._getLibrary(_type.element.library);
@@ -84,7 +82,6 @@
 }
 
 abstract class DeclarationMixin implements TypeMirror {
-
   bool get isOriginalDeclaration => true;
 
   TypeMirror get originalDeclaration => this;
@@ -124,8 +121,8 @@
     if (_typeVariables == null) {
       _typeVariables = <TypeVariableMirror>[];
       for (TypeVariableType typeVariable in _element.typeVariables) {
-        _typeVariables.add(
-            new Dart2JsTypeVariableMirror(mirrorSystem, typeVariable));
+        _typeVariables
+            .add(new Dart2JsTypeVariableMirror(mirrorSystem, typeVariable));
       }
     }
     return _typeVariables;
@@ -152,8 +149,8 @@
     if (newTypeArguments.isEmpty) return owner._getTypeMirror(_type.asRaw());
     if (newTypeArguments.length != typeVariables.length) {
       throw new ArgumentError('Cannot create generic instantiation of $_type '
-                              'with ${newTypeArguments.length} arguments, '
-                              'expect ${typeVariables.length} arguments.');
+          'with ${newTypeArguments.length} arguments, '
+          'expect ${typeVariables.length} arguments.');
     }
     List<DartType> builder = <DartType>[];
     for (TypeSourceMirror newTypeArgument in newTypeArguments) {
@@ -163,8 +160,7 @@
       if (newTypeArgument is Dart2JsTypeMirror) {
         builder.add(newTypeArgument._type);
       } else {
-        throw new UnsupportedError(
-            'Cannot create instantiation using a type '
+        throw new UnsupportedError('Cannot create instantiation using a type '
             'mirror from a different mirrorSystem implementation.');
       }
     }
@@ -172,19 +168,18 @@
   }
 }
 
-class Dart2JsInterfaceTypeMirror
-    extends Dart2JsGenericTypeMirror
+class Dart2JsInterfaceTypeMirror extends Dart2JsGenericTypeMirror
     with ObjectMirrorMixin, ClassMirrorMixin, ContainerMixin
     implements ClassMirror {
-  Dart2JsInterfaceTypeMirror(Dart2JsMirrorSystem system,
-                             InterfaceType interfaceType)
+  Dart2JsInterfaceTypeMirror(
+      Dart2JsMirrorSystem system, InterfaceType interfaceType)
       : super(system, interfaceType);
 
   ClassElement get _element => super._element;
 
   InterfaceType get _type => super._type;
 
-  bool get isNameSynthetic  {
+  bool get isNameSynthetic {
     if (_element.isMixinApplication) {
       MixinApplicationElement mixinApplication = _element;
       return mixinApplication.isUnnamedMixinApplication;
@@ -206,7 +201,7 @@
   bool isSubclassOf(Mirror other) {
     if (other is Dart2JsTypeMirror) {
       return other._type.element != null &&
-             _element.isSubclassOf(other._type.element);
+          _element.isSubclassOf(other._type.element);
     } else {
       throw new ArgumentError(other);
     }
@@ -251,12 +246,9 @@
   String toString() => 'Mirror on interface type $_type';
 }
 
-class Dart2JsClassDeclarationMirror
-    extends Dart2JsInterfaceTypeMirror
+class Dart2JsClassDeclarationMirror extends Dart2JsInterfaceTypeMirror
     with DeclarationMixin {
-
-  Dart2JsClassDeclarationMirror(Dart2JsMirrorSystem system,
-                                InterfaceType type)
+  Dart2JsClassDeclarationMirror(Dart2JsMirrorSystem system, InterfaceType type)
       : super(system, type);
 
   bool isSubclassOf(ClassMirror other) {
@@ -273,8 +265,7 @@
   String toString() => 'Mirror on class ${_type.name}';
 }
 
-class Dart2JsTypedefMirror
-    extends Dart2JsGenericTypeMirror
+class Dart2JsTypedefMirror extends Dart2JsGenericTypeMirror
     implements TypedefMirror {
   final Dart2JsLibraryMirror _library;
   List<TypeVariableMirror> _typeVariables;
@@ -284,8 +275,8 @@
       : this._library = system._getLibrary(_typedef.element.library),
         super(system, _typedef);
 
-  Dart2JsTypedefMirror.fromLibrary(Dart2JsLibraryMirror library,
-                                   TypedefType _typedef)
+  Dart2JsTypedefMirror.fromLibrary(
+      Dart2JsLibraryMirror library, TypedefType _typedef)
       : this._library = library,
         super(library.mirrorSystem, _typedef);
 
@@ -311,11 +302,9 @@
   String toString() => 'Mirror on typedef $_type';
 }
 
-class Dart2JsTypedefDeclarationMirror
-    extends Dart2JsTypedefMirror
+class Dart2JsTypedefDeclarationMirror extends Dart2JsTypedefMirror
     with DeclarationMixin {
-  Dart2JsTypedefDeclarationMirror(Dart2JsMirrorSystem system,
-                                  TypedefType type)
+  Dart2JsTypedefDeclarationMirror(Dart2JsMirrorSystem system, TypedefType type)
       : super(system, type);
 
   String toString() => 'Mirror on typedef ${_type.name}';
@@ -325,16 +314,16 @@
     implements TypeVariableMirror {
   Dart2JsDeclarationMirror _owner;
 
-  Dart2JsTypeVariableMirror(Dart2JsMirrorSystem system,
-                            TypeVariableType typeVariableType)
-    : super(system, typeVariableType);
+  Dart2JsTypeVariableMirror(
+      Dart2JsMirrorSystem system, TypeVariableType typeVariableType)
+      : super(system, typeVariableType);
 
   TypeVariableType get _type => super._type;
 
   Dart2JsDeclarationMirror get owner {
     if (_owner == null) {
-      _owner = mirrorSystem._getTypeDeclarationMirror(
-          _type.element.typeDeclaration);
+      _owner =
+          mirrorSystem._getTypeDeclarationMirror(_type.element.typeDeclaration);
     }
     return _owner;
   }
@@ -364,10 +353,10 @@
     implements FunctionTypeMirror {
   List<ParameterMirror> _parameters;
 
-  Dart2JsFunctionTypeMirror(Dart2JsMirrorSystem system,
-                            FunctionType functionType)
+  Dart2JsFunctionTypeMirror(
+      Dart2JsMirrorSystem system, FunctionType functionType)
       : super(system, functionType) {
-    assert (functionType.element != null);
+    assert(functionType.element != null);
   }
 
   FunctionType get _type => super._type;
@@ -392,12 +381,10 @@
   bool get isFunction => true;
 
   MethodMirror get callMethod => _convertElementMethodToMethodMirror(
-      mirrorSystem._getLibrary(_type.element.library),
-      _type.element);
+      mirrorSystem._getLibrary(_type.element.library), _type.element);
 
-  ClassMirror get originalDeclaration =>
-      mirrorSystem._getTypeDeclarationMirror(
-          mirrorSystem.compiler.coreClasses.functionClass);
+  ClassMirror get originalDeclaration => mirrorSystem._getTypeDeclarationMirror(
+      mirrorSystem.compiler.coreClasses.functionClass);
 
   // TODO(johnniwinther): Substitute type arguments for type variables.
   ClassMirror get superclass => originalDeclaration.superclass;
@@ -441,8 +428,8 @@
   final Dart2JsMirrorSystem mirrorSystem;
   final DartType _type;
 
-  Dart2JsBuiltinTypeMirror(Dart2JsMirrorSystem this.mirrorSystem,
-                           DartType this._type);
+  Dart2JsBuiltinTypeMirror(
+      Dart2JsMirrorSystem this.mirrorSystem, DartType this._type);
 
   Symbol get qualifiedName => simpleName;
 
diff --git a/pkg/compiler/lib/src/mirrors/mirrors_util.dart b/pkg/compiler/lib/src/mirrors/mirrors_util.dart
index d1d4f5f2..52eb0a9 100644
--- a/pkg/compiler/lib/src/mirrors/mirrors_util.dart
+++ b/pkg/compiler/lib/src/mirrors/mirrors_util.dart
@@ -42,7 +42,7 @@
     String simpleName = nameOf(mirror);
     if (mirror.isSetter) {
       // Remove trailing '='.
-      return simpleName.substring(0, simpleName.length-1);
+      return simpleName.substring(0, simpleName.length - 1);
     } else if (mirror.isOperator) {
       return 'operator ${operatorName(mirror)}';
     } else if (mirror.isConstructor) {
@@ -77,8 +77,8 @@
  * Returns an iterable over the type declarations directly inheriting from
  * the declaration of [type] within [mirrors].
  */
-Iterable<ClassMirror> computeSubdeclarations(MirrorSystem mirrors,
-                                             ClassMirror type) {
+Iterable<ClassMirror> computeSubdeclarations(
+    MirrorSystem mirrors, ClassMirror type) {
   type = type.originalDeclaration;
   var subtypes = <ClassMirror>[];
   mirrors.libraries.forEach((_, library) {
@@ -174,22 +174,19 @@
 
 Iterable<DeclarationMirror> membersOf(
     Map<Symbol, DeclarationMirror> declarations) {
-  return declarations.values.where(
-      (mirror) => mirror is MethodMirror || mirror is VariableMirror);
+  return declarations.values
+      .where((mirror) => mirror is MethodMirror || mirror is VariableMirror);
 }
 
-Iterable<TypeMirror> classesOf(
-    Map<Symbol, DeclarationMirror> declarations) {
+Iterable<TypeMirror> classesOf(Map<Symbol, DeclarationMirror> declarations) {
   return new _TypeOfIterable<ClassMirror>(declarations.values);
 }
 
-Iterable<TypeMirror> typesOf(
-    Map<Symbol, DeclarationMirror> declarations) {
+Iterable<TypeMirror> typesOf(Map<Symbol, DeclarationMirror> declarations) {
   return new _TypeOfIterable<TypeMirror>(declarations.values);
 }
 
-Iterable<MethodMirror> methodsOf(
-    Map<Symbol, DeclarationMirror> declarations) {
+Iterable<MethodMirror> methodsOf(Map<Symbol, DeclarationMirror> declarations) {
   return anyMethodOf(declarations).where((mirror) => mirror.isRegularMethod);
 }
 
@@ -198,13 +195,11 @@
   return anyMethodOf(declarations).where((mirror) => mirror.isConstructor);
 }
 
-Iterable<MethodMirror> settersOf(
-    Map<Symbol, DeclarationMirror> declarations) {
+Iterable<MethodMirror> settersOf(Map<Symbol, DeclarationMirror> declarations) {
   return anyMethodOf(declarations).where((mirror) => mirror.isSetter);
 }
 
-Iterable<MethodMirror> gettersOf(
-    Map<Symbol, DeclarationMirror> declarations) {
+Iterable<MethodMirror> gettersOf(Map<Symbol, DeclarationMirror> declarations) {
   return anyMethodOf(declarations).where((mirror) => mirror.isGetter);
 }
 
@@ -234,7 +229,7 @@
   _TypeOfIterator(this._source);
 
   bool moveNext() {
-    while(_source.moveNext()) {
+    while (_source.moveNext()) {
       if (_source.current is T) {
         return true;
       }
@@ -350,7 +345,7 @@
     comment = match[1];
     var sb = new StringBuffer();
     List<String> lines = comment.split('\n');
-    for (int index = 0 ; index < lines.length ; index++) {
+    for (int index = 0; index < lines.length; index++) {
       String line = lines[index];
       if (index == 0) {
         sb.write(line); // Add the first line unprocessed.
@@ -360,7 +355,7 @@
       match = _multiLineCommentLineStart.firstMatch(line);
       if (match != null) {
         sb.write(match[1]);
-      } else if (index < lines.length-1 || !line.trim().isEmpty) {
+      } else if (index < lines.length - 1 || !line.trim().isEmpty) {
         // Do not add the last line if it only contains white space.
         // This interprets cases like
         //     /*
@@ -388,8 +383,8 @@
  * variable of [:Iterable:] and 'col.Iterable.contains.element' finds the
  * [:element:] parameter of the [:contains:] method on [:Iterable:].
  */
-DeclarationMirror lookupQualifiedInScope(DeclarationSourceMirror declaration,
-                                         String name) {
+DeclarationMirror lookupQualifiedInScope(
+    DeclarationSourceMirror declaration, String name) {
   // TODO(11653): Support lookup of constructors using the [:new Foo:]
   // syntax.
   int offset = 1;
@@ -419,11 +414,12 @@
     if (result != null) return result;
     // Try type variables.
     result = mirror.typeVariables.firstWhere(
-        (TypeVariableMirror v) => v.simpleName == id, orElse: () => null);
+        (TypeVariableMirror v) => v.simpleName == id,
+        orElse: () => null);
   } else if (mirror is MethodMirror) {
     result = mirror.parameters.firstWhere(
-        (ParameterMirror p) => p.simpleName == id, orElse: () => null);
+        (ParameterMirror p) => p.simpleName == id,
+        orElse: () => null);
   }
   return result;
-
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/mirrors/source_mirrors.dart b/pkg/compiler/lib/src/mirrors/source_mirrors.dart
index 14e6c13..6bf555c 100644
--- a/pkg/compiler/lib/src/mirrors/source_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/source_mirrors.dart
@@ -118,8 +118,8 @@
 }
 
 /// A mirror on an import or export declaration.
-abstract class LibraryDependencySourceMirror
-    extends Mirror implements LibraryDependencyMirror {
+abstract class LibraryDependencySourceMirror extends Mirror
+    implements LibraryDependencyMirror {
   /// Is `true` if this dependency is an import.
   bool get isImport;
 
@@ -149,8 +149,8 @@
 }
 
 /// A mirror on a show/hide combinator declared on a library dependency.
-abstract class CombinatorSourceMirror
-    extends Mirror implements CombinatorMirror {
+abstract class CombinatorSourceMirror extends Mirror
+    implements CombinatorMirror {
   /// The list of identifiers on the combinator.
   List/*<String>*/ get identifiers;
 
diff --git a/pkg/compiler/lib/src/mirrors_used.dart b/pkg/compiler/lib/src/mirrors_used.dart
index 1928d10..15f7c6d 100644
--- a/pkg/compiler/lib/src/mirrors_used.dart
+++ b/pkg/compiler/lib/src/mirrors_used.dart
@@ -5,39 +5,30 @@
 library dart2js.mirrors_used;
 
 import 'common.dart';
-import 'common/tasks.dart' show
-    CompilerTask;
-import 'compile_time_constants.dart' show
-    ConstantCompiler;
-import 'compiler.dart' show
-    Compiler;
+import 'common/tasks.dart' show CompilerTask;
+import 'compile_time_constants.dart' show ConstantCompiler;
+import 'compiler.dart' show Compiler;
 import 'constants/expressions.dart';
-import 'constants/values.dart' show
-    ConstantValue,
-    ConstructedConstantValue,
-    ListConstantValue,
-    StringConstantValue,
-    TypeConstantValue;
-import 'dart_types.dart' show
-    DartType,
-    InterfaceType,
-    TypeKind;
-import 'elements/elements.dart' show
-    ClassElement,
-    Element,
-    ImportElement,
-    LibraryElement,
-    MetadataAnnotation,
-    ScopeContainerElement,
-    VariableElement;
-import 'resolution/tree_elements.dart' show
-    TreeElements;
-import 'tree/tree.dart' show
-    Import,
-    LibraryTag,
-    NamedArgument,
-    NewExpression,
-    Node;
+import 'constants/values.dart'
+    show
+        ConstantValue,
+        ConstructedConstantValue,
+        ListConstantValue,
+        StringConstantValue,
+        TypeConstantValue;
+import 'dart_types.dart' show DartType, InterfaceType, TypeKind;
+import 'elements/elements.dart'
+    show
+        ClassElement,
+        Element,
+        ImportElement,
+        LibraryElement,
+        MetadataAnnotation,
+        ScopeContainerElement,
+        VariableElement;
+import 'resolution/tree_elements.dart' show TreeElements;
+import 'tree/tree.dart'
+    show Import, LibraryTag, NamedArgument, NewExpression, Node;
 
 /**
  * Compiler task that analyzes MirrorsUsed annotations.
@@ -91,8 +82,7 @@
   Set<LibraryElement> librariesWithUsage;
   MirrorUsageAnalyzer analyzer;
 
-  MirrorUsageAnalyzerTask(Compiler compiler)
-      : super(compiler) {
+  MirrorUsageAnalyzerTask(Compiler compiler) : super(compiler) {
     analyzer = new MirrorUsageAnalyzer(compiler, this);
   }
 
@@ -117,9 +107,8 @@
   bool hasMirrorUsage(Element element) {
     LibraryElement library = element.library;
     // Internal libraries always have implicit mirror usage.
-    return library.isInternalLibrary
-        || (librariesWithUsage != null
-            && librariesWithUsage.contains(library));
+    return library.isInternalLibrary ||
+        (librariesWithUsage != null && librariesWithUsage.contains(library));
   }
 
   /// Call-back from the resolver to analyze MirorsUsed annotations. The result
@@ -130,14 +119,11 @@
       NamedArgument named = argument.asNamedArgument();
       if (named == null) continue;
       ConstantCompiler constantCompiler = compiler.resolver.constantCompiler;
-      ConstantValue value =
-          constantCompiler.getConstantValue(
-              constantCompiler.compileNode(named.expression, mapping));
+      ConstantValue value = constantCompiler.getConstantValue(
+          constantCompiler.compileNode(named.expression, mapping));
 
-      MirrorUsageBuilder builder =
-          new MirrorUsageBuilder(
-              analyzer, mapping.analyzedElement.library, named.expression,
-              value, mapping);
+      MirrorUsageBuilder builder = new MirrorUsageBuilder(analyzer,
+          mapping.analyzedElement.library, named.expression, value, mapping);
 
       if (named.name.source == 'symbols') {
         analyzer.cachedStrings[value] =
@@ -201,8 +187,7 @@
       if (library.isInternalLibrary) continue;
       for (ImportElement import in library.imports) {
         reporter.withCurrentElement(library, () {
-          List<MirrorUsage> usages =
-              mirrorsUsedOnLibraryTag(library, import);
+          List<MirrorUsage> usages = mirrorsUsedOnLibraryTag(library, import);
           if (usages != null) {
             List<MirrorUsage> existing = result[library];
             if (existing != null) {
@@ -242,8 +227,8 @@
         }
       }
     });
-    propagatedOverrides.forEach((LibraryElement overridden,
-                                 List<MirrorUsage> overriddenUsages) {
+    propagatedOverrides.forEach(
+        (LibraryElement overridden, List<MirrorUsage> overriddenUsages) {
       List<MirrorUsage> usages =
           usageMap.putIfAbsent(overridden, () => <MirrorUsage>[]);
       usages.addAll(overriddenUsages);
@@ -252,8 +237,8 @@
 
   /// Find @MirrorsUsed annotations on the given import [tag] in [library]. The
   /// annotations are represented as [MirrorUsage].
-  List<MirrorUsage> mirrorsUsedOnLibraryTag(LibraryElement library,
-                                            ImportElement import) {
+  List<MirrorUsage> mirrorsUsedOnLibraryTag(
+      LibraryElement library, ImportElement import) {
     LibraryElement importedLibrary = import.importedLibrary;
     if (importedLibrary != compiler.mirrorsLibrary) {
       return null;
@@ -296,8 +281,9 @@
     // TOOO(ahe): Should be an instance method on MirrorUsage.
     if (a.symbols == null && a.targets == null && a.metaTargets == null) {
       return b;
-    } else if (
-        b.symbols == null && b.targets == null && b.metaTargets == null) {
+    } else if (b.symbols == null &&
+        b.targets == null &&
+        b.metaTargets == null) {
       return a;
     }
     // TODO(ahe): Test the following cases.
@@ -326,15 +312,14 @@
   /// that was resolved during [MirrorUsageAnalyzerTask.validate].
   MirrorUsage buildUsage(ConstructedConstantValue constant) {
     Map<Element, ConstantValue> fields = constant.fields;
-    VariableElement symbolsField = compiler.mirrorsUsedClass.lookupLocalMember(
-        'symbols');
-    VariableElement targetsField = compiler.mirrorsUsedClass.lookupLocalMember(
-        'targets');
+    VariableElement symbolsField =
+        compiler.mirrorsUsedClass.lookupLocalMember('symbols');
+    VariableElement targetsField =
+        compiler.mirrorsUsedClass.lookupLocalMember('targets');
     VariableElement metaTargetsField =
-        compiler.mirrorsUsedClass.lookupLocalMember(
-            'metaTargets');
-    VariableElement overrideField = compiler.mirrorsUsedClass.lookupLocalMember(
-        'override');
+        compiler.mirrorsUsedClass.lookupLocalMember('metaTargets');
+    VariableElement overrideField =
+        compiler.mirrorsUsedClass.lookupLocalMember('override');
 
     return new MirrorUsage(
         cachedStrings[fields[symbolsField]],
@@ -354,14 +339,12 @@
   MirrorUsage(this.symbols, this.targets, this.metaTargets, this.override);
 
   String toString() {
-    return
-        'MirrorUsage('
+    return 'MirrorUsage('
         'symbols = $symbols, '
         'targets = $targets, '
         'metaTargets = $metaTargets, '
         'override = $override'
         ')';
-
   }
 }
 
@@ -372,12 +355,8 @@
   final ConstantValue constant;
   final TreeElements elements;
 
-  MirrorUsageBuilder(
-      this.analyzer,
-      this.enclosingLibrary,
-      this.spannable,
-      this.constant,
-      this.elements);
+  MirrorUsageBuilder(this.analyzer, this.enclosingLibrary, this.spannable,
+      this.constant, this.elements);
 
   Compiler get compiler => analyzer.compiler;
 
@@ -391,13 +370,13 @@
   /// [onlyStrings] is true, the returned list is a [:List<String>:] and any
   /// [Type] values are treated as an error (meaning that the value is ignored
   /// and a hint is emitted).
-  List convertConstantToUsageList(
-      ConstantValue constant, { bool onlyStrings: false }) {
+  List convertConstantToUsageList(ConstantValue constant,
+      {bool onlyStrings: false}) {
     if (constant.isNull) {
       return null;
     } else if (constant.isList) {
       ListConstantValue list = constant;
-      List result = onlyStrings ? <String> [] : [];
+      List result = onlyStrings ? <String>[] : [];
       for (ConstantValue entry in list.entries) {
         if (entry.isString) {
           StringConstantValue string = entry;
@@ -443,8 +422,8 @@
       ClassElement cls = type.element;
       cls.ensureResolved(compiler.resolution);
       for (DartType supertype in cls.allSupertypes) {
-        if (supertype.isInterfaceType
-            && !supertype.element.library.isInternalLibrary) {
+        if (supertype.isInterfaceType &&
+            !supertype.element.library.isInternalLibrary) {
           return interface.asInstanceOf(supertype.element);
         }
       }
@@ -482,8 +461,8 @@
               libraryNameCandiate = libraryName;
               break;
             } else if (string.startsWith('$libraryName.')) {
-              if (libraryNameCandiate == null
-                  || libraryNameCandiate.length < libraryName.length) {
+              if (libraryNameCandiate == null ||
+                  libraryNameCandiate.length < libraryName.length) {
                 // Found a better candiate
                 libraryCandiate = l;
                 libraryNameCandiate = libraryName;
@@ -495,8 +474,7 @@
         if (libraryNameCandiate == string) {
           e = libraryCandiate;
         } else if (libraryNameCandiate != null) {
-          e = resolveLocalExpression(
-              libraryCandiate,
+          e = resolveLocalExpression(libraryCandiate,
               string.substring(libraryNameCandiate.length + 1).split('.'));
         } else {
           e = resolveExpression(string);
@@ -532,12 +510,13 @@
         if (current.isLibrary) {
           LibraryElement library = current;
           reporter.reportHintMessage(
-              spannable, MessageKind.MIRRORS_CANNOT_RESOLVE_IN_LIBRARY,
-              {'name': identifiers[0],
-               'library': library.libraryOrScriptName});
+              spannable,
+              MessageKind.MIRRORS_CANNOT_RESOLVE_IN_LIBRARY,
+              {'name': identifiers[0], 'library': library.libraryOrScriptName});
         } else {
           reporter.reportHintMessage(
-              spannable, MessageKind.MIRRORS_CANNOT_FIND_IN_ELEMENT,
+              spannable,
+              MessageKind.MIRRORS_CANNOT_FIND_IN_ELEMENT,
               {'name': identifier, 'element': current.name});
         }
         return current;
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index cd61a71..edca67c 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -2,7 +2,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of native;
+import '../common.dart';
+import '../common/backend_api.dart' show ForeignResolver;
+import '../common/resolution.dart' show Parsing, Resolution;
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart';
+import '../core_types.dart' show CoreTypes;
+import '../dart_types.dart';
+import '../elements/elements.dart';
+import '../js/js.dart' as js;
+import '../js_backend/js_backend.dart';
+import '../tree/tree.dart';
+import '../universe/side_effects.dart' show SideEffects;
+import '../util/util.dart';
+
+import 'enqueue.dart';
+import 'js.dart';
 
 /// This class is a temporary work-around until we get a more powerful DartType.
 class SpecialType {
@@ -88,7 +103,6 @@
  * `null` may be returned.
  */
 class NativeBehavior {
-
   /// [DartType]s or [SpecialType]s returned or yielded by the native element.
   final List typesReturned = [];
 
@@ -114,7 +128,6 @@
   static NativeBehavior get CHANGES_OTHER => NativeBehavior._makeChangesOther();
   static NativeBehavior get DEPENDS_OTHER => NativeBehavior._makeDependsOther();
 
-
   String toString() {
     return 'NativeBehavior('
         'returns: ${typesReturned}'
@@ -217,20 +230,17 @@
   /// latter is used for the type strings of the form '' and 'var'.
   /// [validTags] can be used to restrict which tags are accepted.
   static void processSpecString(
-      DiagnosticReporter reporter,
-      Spannable spannable,
-      String specString,
+      DiagnosticReporter reporter, Spannable spannable, String specString,
       {Iterable<String> validTags,
-       void setSideEffects(SideEffects newEffects),
-       void setThrows(NativeThrowBehavior throwKind),
-       void setIsAllocation(bool isAllocation),
-       void setUseGvn(bool useGvn),
-       dynamic resolveType(String typeString),
-       List typesReturned,
-       List typesInstantiated,
-       objectType, nullType}) {
-
-
+      void setSideEffects(SideEffects newEffects),
+      void setThrows(NativeThrowBehavior throwKind),
+      void setIsAllocation(bool isAllocation),
+      void setUseGvn(bool useGvn),
+      dynamic resolveType(String typeString),
+      List typesReturned,
+      List typesInstantiated,
+      objectType,
+      nullType}) {
     bool seenError = false;
 
     void reportError(String message) {
@@ -240,15 +250,21 @@
     }
 
     const List<String> knownTags = const [
-          'creates', 'returns', 'depends', 'effects',
-          'throws', 'gvn', 'new'];
+      'creates',
+      'returns',
+      'depends',
+      'effects',
+      'throws',
+      'gvn',
+      'new'
+    ];
 
     /// Resolve a type string of one of the three forms:
     /// *  'void' - in which case [onVoid] is called,
     /// *  '' or 'var' - in which case [onVar] is called,
     /// *  'T1|...|Tn' - in which case [onType] is called for each resolved Ti.
     void resolveTypesString(String typesString,
-                            {onVoid(), onVar(), onType(type)}) {
+        {onVoid(), onVar(), onType(type)}) {
       // Various things that are not in fact types.
       if (typesString == 'void') {
         if (onVoid != null) {
@@ -279,13 +295,11 @@
       return;
     }
 
-    List<String> specs = specString.split(';')
-        .map((s) => s.trim())
-        .toList();
-    if (specs.last == "") specs.removeLast();  // Allow separator to terminate.
+    List<String> specs = specString.split(';').map((s) => s.trim()).toList();
+    if (specs.last == "") specs.removeLast(); // Allow separator to terminate.
 
-    assert(validTags == null ||
-           (validTags.toSet()..removeAll(validTags)).isEmpty);
+    assert(
+        validTags == null || (validTags.toSet()..removeAll(validTags)).isEmpty);
     if (validTags == null) validTags = knownTags;
 
     Map<String, String> values = <String, String>{};
@@ -330,42 +344,38 @@
 
     String returns = values['returns'];
     if (returns != null) {
-      resolveTypesString(returns,
-        onVar: () {
-          typesReturned.add(objectType);
-          typesReturned.add(nullType);
-        },
-        onType: (type) {
-          typesReturned.add(type);
-        });
+      resolveTypesString(returns, onVar: () {
+        typesReturned.add(objectType);
+        typesReturned.add(nullType);
+      }, onType: (type) {
+        typesReturned.add(type);
+      });
     }
 
     String creates = values['creates'];
     if (creates != null) {
-      resolveTypesString(creates,
-        onVoid: () {
-          reportError("Invalid type string 'creates:$creates'");
-        },
-        onType: (type) {
-          typesInstantiated.add(type);
-        });
+      resolveTypesString(creates, onVoid: () {
+        reportError("Invalid type string 'creates:$creates'");
+      }, onType: (type) {
+        typesInstantiated.add(type);
+      });
     } else if (returns != null) {
-      resolveTypesString(returns,
-        onType: (type) {
-          typesInstantiated.add(type);
-        });
+      resolveTypesString(returns, onType: (type) {
+        typesInstantiated.add(type);
+      });
     }
 
     const throwsOption = const <String, NativeThrowBehavior>{
       'never': NativeThrowBehavior.NEVER,
       'null(1)': NativeThrowBehavior.MAY_THROW_ONLY_ON_FIRST_ARGUMENT_ACCESS,
       'may': NativeThrowBehavior.MAY,
-      'must': NativeThrowBehavior.MUST };
+      'must': NativeThrowBehavior.MUST
+    };
 
-    const boolOptions = const<String, bool>{'true': true, 'false': false};
+    const boolOptions = const <String, bool>{'true': true, 'false': false};
 
-    SideEffects sideEffects = processEffects(reportError,
-        values['effects'], values['depends']);
+    SideEffects sideEffects =
+        processEffects(reportError, values['effects'], values['depends']);
     NativeThrowBehavior throwsKind = tagValueLookup('throws', throwsOption);
     bool isAllocation = tagValueLookup('new', boolOptions);
     bool useGvn = tagValueLookup('gvn', boolOptions);
@@ -374,7 +384,7 @@
       reportError("'new' and 'gvn' are incompatible");
     }
 
-    if (seenError) return;  // Avoid callbacks.
+    if (seenError) return; // Avoid callbacks.
 
     // TODO(sra): Simplify [throwBehavior] using [sideEffects].
 
@@ -385,10 +395,7 @@
   }
 
   static SideEffects processEffects(
-      void reportError(String message),
-      String effects,
-      String depends) {
-
+      void reportError(String message), String effects, String depends) {
     if (effects == null && depends == null) return null;
 
     if (effects == null || depends == null) {
@@ -452,12 +459,8 @@
     return sideEffects;
   }
 
-  static NativeBehavior ofJsCall(
-      Send jsCall,
-      DiagnosticReporter reporter,
-      Parsing parsing,
-      CoreTypes coreTypes,
-      ForeignResolver resolver) {
+  static NativeBehavior ofJsCall(Send jsCall, DiagnosticReporter reporter,
+      Parsing parsing, CoreTypes coreTypes, ForeignResolver resolver) {
     // The first argument of a JS-call is a string encoding various attributes
     // of the code.
     //
@@ -468,25 +471,21 @@
 
     var argNodes = jsCall.arguments;
     if (argNodes.isEmpty || argNodes.tail.isEmpty) {
-      reporter.reportErrorMessage(
-          jsCall,
-          MessageKind.GENERIC,
+      reporter.reportErrorMessage(jsCall, MessageKind.GENERIC,
           {'text': "JS expression takes two or more arguments."});
       return behavior;
     }
 
     var specArgument = argNodes.head;
-    if (specArgument is !StringNode || specArgument.isInterpolation) {
-      reporter.reportErrorMessage(
-          specArgument, MessageKind.GENERIC,
+    if (specArgument is! StringNode || specArgument.isInterpolation) {
+      reporter.reportErrorMessage(specArgument, MessageKind.GENERIC,
           {'text': "JS first argument must be a string literal."});
       return behavior;
     }
 
     var codeArgument = argNodes.tail.head;
-    if (codeArgument is !StringNode || codeArgument.isInterpolation) {
-      reporter.reportErrorMessage(
-          codeArgument, MessageKind.GENERIC,
+    if (codeArgument is! StringNode || codeArgument.isInterpolation) {
+      reporter.reportErrorMessage(codeArgument, MessageKind.GENERIC,
           {'text': "JS second argument must be a string literal."});
       return behavior;
     }
@@ -525,10 +524,7 @@
       behavior.useGvn = useGvn;
     }
 
-    processSpecString(
-        reporter,
-        specArgument,
-        specString,
+    processSpecString(reporter, specArgument, specString,
         setSideEffects: setSideEffects,
         setThrows: setThrows,
         setIsAllocation: setIsAllocation,
@@ -559,7 +555,7 @@
       CoreTypes coreTypes,
       ForeignResolver resolver,
       {bool isBuiltin,
-       List<String> validTags}) {
+      List<String> validTags}) {
     // The first argument of a JS-embedded global call is a string encoding
     // the type of the code.
     //
@@ -610,10 +606,7 @@
       behavior.sideEffects.setTo(newEffects);
     }
 
-    processSpecString(
-        reporter,
-        jsBuiltinOrEmbeddedGlobalCall,
-        specString,
+    processSpecString(reporter, jsBuiltinOrEmbeddedGlobalCall, specString,
         validTags: validTags,
         resolveType: resolveType,
         setSideEffects: setSideEffects,
@@ -633,12 +626,7 @@
     behavior.sideEffects.setTo(new SideEffects());
 
     _fillNativeBehaviorOfBuiltinOrEmbeddedGlobal(
-        behavior,
-        jsBuiltinCall,
-        reporter,
-        parsing,
-        coreTypes,
-        resolver,
+        behavior, jsBuiltinCall, reporter, parsing, coreTypes, resolver,
         isBuiltin: true);
 
     return behavior;
@@ -658,19 +646,13 @@
     behavior.throwBehavior = NativeThrowBehavior.NEVER;
 
     _fillNativeBehaviorOfBuiltinOrEmbeddedGlobal(
-        behavior,
-        jsEmbeddedGlobalCall,
-        reporter,
-        parsing,
-        coreTypes,
-        resolver,
-        isBuiltin: false,
-        validTags: const ['returns', 'creates']);
+        behavior, jsEmbeddedGlobalCall, reporter, parsing, coreTypes, resolver,
+        isBuiltin: false, validTags: const ['returns', 'creates']);
 
     return behavior;
   }
 
-  static NativeBehavior ofMethod(FunctionElement method,  Compiler compiler) {
+  static NativeBehavior ofMethod(FunctionElement method, Compiler compiler) {
     FunctionType type = method.computeType(compiler.resolution);
     var behavior = new NativeBehavior();
     var returnType = type.returnType;
@@ -685,8 +667,9 @@
     // but otherwise we would include a lot of code by default).
     // TODO(sigmund,sra): consider doing something better for numeric types.
     behavior.typesReturned.add(
-        !isInterop || compiler.trustJSInteropTypeAnnotations ? returnType
-        : const DynamicType());
+        !isInterop || compiler.options.trustJSInteropTypeAnnotations
+            ? returnType
+            : const DynamicType());
     if (!type.returnType.isVoid) {
       // Declared types are nullable.
       behavior.typesReturned.add(compiler.coreTypes.nullType);
@@ -697,10 +680,10 @@
     // TODO(sra): Optional arguments are currently missing from the
     // DartType. This should be fixed so the following work-around can be
     // removed.
-    method.functionSignature.forEachOptionalParameter(
-        (ParameterElement parameter) {
-          behavior._escape(parameter.type, compiler.resolution);
-        });
+    method.functionSignature
+        .forEachOptionalParameter((ParameterElement parameter) {
+      behavior._escape(parameter.type, compiler.resolution);
+    });
 
     behavior._overrideWithAnnotations(method, compiler);
     return behavior;
@@ -713,8 +696,9 @@
     bool isInterop = compiler.backend.isJsInterop(field);
     // TODO(sigmund,sra): consider doing something better for numeric types.
     behavior.typesReturned.add(
-        !isInterop || compiler.trustJSInteropTypeAnnotations ? type
-        : const DynamicType());
+        !isInterop || compiler.options.trustJSInteropTypeAnnotations
+            ? type
+            : const DynamicType());
     // Declared types are nullable.
     behavior.typesReturned.add(resolution.coreTypes.nullType);
     behavior._capture(type, resolution,
@@ -746,16 +730,20 @@
     }
 
     NativeEnqueuer enqueuer = compiler.enqueuer.resolution.nativeEnqueuer;
-    var creates = _collect(element, compiler, enqueuer.annotationCreatesClass,
-                           lookup);
-    var returns = _collect(element, compiler, enqueuer.annotationReturnsClass,
-                           lookup);
+    var creates =
+        _collect(element, compiler, enqueuer.annotationCreatesClass, lookup);
+    var returns =
+        _collect(element, compiler, enqueuer.annotationReturnsClass, lookup);
 
     if (creates != null) {
-      typesInstantiated..clear()..addAll(creates);
+      typesInstantiated
+        ..clear()
+        ..addAll(creates);
     }
     if (returns != null) {
-      typesReturned..clear()..addAll(returns);
+      typesReturned
+        ..clear()
+        ..addAll(returns);
     }
   }
 
@@ -765,7 +753,7 @@
    * Returns `null` if no constraints.
    */
   static _collect(Element element, Compiler compiler, Element annotationClass,
-                  lookup(str)) {
+      lookup(str)) {
     DiagnosticReporter reporter = compiler.reporter;
     var types = null;
     for (MetadataAnnotation annotation in element.implementation.metadata) {
@@ -779,8 +767,8 @@
       Iterable<ConstantValue> fields = constructedObject.fields.values;
       // TODO(sra): Better validation of the constant.
       if (fields.length != 1 || !fields.single.isString) {
-        reporter.internalError(annotation,
-            'Annotations needs one string: ${annotation.node}');
+        reporter.internalError(
+            annotation, 'Annotations needs one string: ${annotation.node}');
       }
       StringConstantValue specStringConstant = fields.single;
       String specString = specStringConstant.toDartString().slowToString();
@@ -838,8 +826,9 @@
           typesInstantiated.add(type);
         }
 
-        if (!compiler.trustJSInteropTypeAnnotations ||
-          type.isDynamic || type.isObject) {
+        if (!compiler.options.trustJSInteropTypeAnnotations ||
+            type.isDynamic ||
+            type.isObject) {
           // By saying that only JS-interop types can be created, we prevent
           // pulling in every other native type (e.g. all of dart:html) when a
           // JS interop API returns dynamic or when we don't trust the type
@@ -860,10 +849,7 @@
   }
 
   static dynamic _parseType(
-      String typeString,
-      Parsing parsing,
-      lookup(name),
-      locationNodeOrElement) {
+      String typeString, Parsing parsing, lookup(name), locationNodeOrElement) {
     DiagnosticReporter reporter = parsing.reporter;
     if (typeString == '=Object') return SpecialType.JsObject;
     if (typeString == 'dynamic') {
@@ -874,21 +860,17 @@
 
     int index = typeString.indexOf('<');
     if (index < 1) {
-      reporter.reportErrorMessage(
-          _errorNode(locationNodeOrElement, parsing),
-          MessageKind.GENERIC,
-          {'text': "Type '$typeString' not found."});
+      reporter.reportErrorMessage(_errorNode(locationNodeOrElement, parsing),
+          MessageKind.GENERIC, {'text': "Type '$typeString' not found."});
       return const DynamicType();
     }
     type = lookup(typeString.substring(0, index));
-    if (type != null)  {
+    if (type != null) {
       // TODO(sra): Parse type parameters.
       return type;
     }
-    reporter.reportErrorMessage(
-        _errorNode(locationNodeOrElement, parsing),
-        MessageKind.GENERIC,
-        {'text': "Type '$typeString' not found."});
+    reporter.reportErrorMessage(_errorNode(locationNodeOrElement, parsing),
+        MessageKind.GENERIC, {'text': "Type '$typeString' not found."});
     return const DynamicType();
   }
 
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart
index c96f7da..03f3fc2 100644
--- a/pkg/compiler/lib/src/native/enqueue.dart
+++ b/pkg/compiler/lib/src/native/enqueue.dart
@@ -2,7 +2,28 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of native;
+import 'dart:collection' show Queue;
+
+import '../common.dart';
+import '../common/backend_api.dart' show ForeignResolver;
+import '../common/registry.dart' show Registry;
+import '../common/resolution.dart' show Parsing, Resolution;
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart';
+import '../core_types.dart' show CoreTypes;
+import '../dart_types.dart';
+import '../enqueue.dart' show Enqueuer, ResolutionEnqueuer;
+import '../elements/elements.dart';
+import '../elements/modelx.dart'
+    show BaseClassElementX, ElementX, FunctionElementX, LibraryElementX;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart';
+import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
+import '../tokens/token.dart' show BeginGroupToken, Token;
+import '../tokens/token_constants.dart' as Tokens show EOF_TOKEN, STRING_TOKEN;
+import '../tree/tree.dart';
+
+import 'behavior.dart';
 
 /**
  * This could be an abstract class but we use it as a stub for the dart_backend.
@@ -43,7 +64,6 @@
   ClassElement get annotationJsNameClass => null;
 }
 
-
 abstract class NativeEnqueuerBase implements NativeEnqueuer {
   static final RegExp _identifier = new RegExp(r'^[a-zA-Z_$][a-zA-Z0-9_$]*$');
 
@@ -102,7 +122,7 @@
   CoreTypes get coreTypes => compiler.coreTypes;
 
   void processNativeClasses(Iterable<LibraryElement> libraries) {
-    if (compiler.hasIncrementalSupport) {
+    if (compiler.options.hasIncrementalSupport) {
       // Since [Set.add] returns bool if an element was added, this restricts
       // [libraries] to ones that haven't already been processed. This saves
       // time during incremental compiles.
@@ -149,10 +169,8 @@
         if (element.isClass) {
           String extendsName = findExtendsNameOfClass(element);
           if (extendsName != null) {
-            Set<ClassElement> potentialSubclasses =
-                potentialExtends.putIfAbsent(
-                    extendsName,
-                    () => new Set<ClassElement>());
+            Set<ClassElement> potentialSubclasses = potentialExtends
+                .putIfAbsent(extendsName, () => new Set<ClassElement>());
             potentialSubclasses.add(element);
           }
         }
@@ -176,9 +194,9 @@
       if (nativeSuperclass != null) {
         nativeClassesAndSubclasses.add(element);
         if (!backend.isNative(element)) {
-          nonNativeSubclasses.putIfAbsent(nativeSuperclass,
-              () => new Set<ClassElement>())
-            .add(element);
+          nonNativeSubclasses
+              .putIfAbsent(nativeSuperclass, () => new Set<ClassElement>())
+              .add(element);
         }
         Set<ClassElement> potentialSubclasses = potentialExtends[element.name];
         if (potentialSubclasses != null) {
@@ -197,7 +215,18 @@
    * Returns the source string of the class named in the extends clause, or
    * `null` if there is no extends clause.
    */
-  String findExtendsNameOfClass(BaseClassElementX classElement) {
+  String findExtendsNameOfClass(ClassElement classElement) {
+    if (classElement.isResolved) {
+      ClassElement superClass = classElement.superclass;
+      while (superClass != null) {
+        if (!superClass.isUnnamedMixinApplication) {
+          return superClass.name;
+        }
+        superClass = superClass.superclass;
+      }
+      return null;
+    }
+
     //  "class B extends A ... {}"  --> "A"
     //  "class B extends foo.A ... {}"  --> "A"
     //  "class B<T> extends foo.A<T,T> with M1, M2 ... {}"  --> "A"
@@ -298,16 +327,16 @@
       Iterable<ConstantValue> fields = constructedObject.fields.values;
       // TODO(sra): Better validation of the constant.
       if (fields.length != 1 || fields.single is! StringConstantValue) {
-        reporter.internalError(annotation,
-            'Annotations needs one string: ${annotation.node}');
+        reporter.internalError(
+            annotation, 'Annotations needs one string: ${annotation.node}');
       }
       StringConstantValue specStringConstant = fields.single;
       String specString = specStringConstant.toDartString().slowToString();
       if (name == null) {
         name = specString;
       } else {
-        reporter.internalError(annotation,
-            'Too many JSName annotations: ${annotation.node}');
+        reporter.internalError(
+            annotation, 'Too many JSName annotations: ${annotation.node}');
       }
     }
     return name;
@@ -317,7 +346,9 @@
     assert(unusedClasses.contains(classElement));
     unusedClasses.remove(classElement);
     pendingClasses.add(classElement);
-    queue.add(() { processClass(classElement, cause); });
+    queue.add(() {
+      processClass(classElement, cause);
+    });
   }
 
   void flushQueue() {
@@ -329,10 +360,10 @@
     flushing = false;
   }
 
-  processClass(BaseClassElementX classElement, cause) {
+  processClass(ClassElement classElement, cause) {
     // TODO(ahe): Fix this assertion to work in incremental compilation.
-    assert(compiler.hasIncrementalSupport ||
-           !registeredClasses.contains(classElement));
+    assert(compiler.options.hasIncrementalSupport ||
+        !registeredClasses.contains(classElement));
 
     bool firstTime = registeredClasses.isEmpty;
     pendingClasses.remove(classElement);
@@ -368,34 +399,40 @@
     });
   }
 
-  handleFieldAnnotations(Element element) {
+  void handleFieldAnnotations(Element element) {
+    if (compiler.serialization.isDeserialized(element)) {
+      return;
+    }
     if (backend.isNative(element.enclosingElement)) {
       // Exclude non-instance (static) fields - they 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.
       if (element.isInstanceMember) {
-        setNativeName(element);
+        _setNativeName(element);
       }
     }
   }
 
-  handleMethodAnnotations(Element method) {
+  void handleMethodAnnotations(Element method) {
+    if (compiler.serialization.isDeserialized(method)) {
+      return;
+    }
     if (isNativeMethod(method)) {
       if (method.isStatic) {
-        setNativeNameForStaticMethod(method);
+        _setNativeNameForStaticMethod(method);
       } else {
-        setNativeName(method);
+        _setNativeName(method);
       }
     }
   }
 
   /// Sets the native name of [element], either from an annotation, or
   /// defaulting to the Dart name.
-  void setNativeName(MemberElement element) {
+  void _setNativeName(MemberElement element) {
     String name = findJsNameFromAnnotation(element);
     if (name == null) name = element.name;
-    backend.setNativeMemberName(element, name);
+    backend.nativeData.setNativeMemberName(element, name);
   }
 
   /// Sets the native name of the static native method [element], using the
@@ -406,20 +443,22 @@
   ///    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(MethodElement element) {
+  void _setNativeNameForStaticMethod(MethodElement element) {
     String name = findJsNameFromAnnotation(element);
     if (name == null) name = element.name;
     if (isIdentifier(name)) {
       List<String> nativeNames =
-          backend.getNativeTagsOfClassRaw(element.enclosingClass);
+          backend.nativeData.getNativeTagsOfClassRaw(element.enclosingClass);
       if (nativeNames.length != 1) {
-        reporter.internalError(element,
+        reporter.internalError(
+            element,
             'Unable to determine a native name for the enclosing class, '
             'options: $nativeNames');
       }
-      backend.setNativeMemberName(element, '${nativeNames[0]}.$name');
+      backend.nativeData
+          .setNativeMemberName(element, '${nativeNames[0]}.$name');
     } else {
-      backend.setNativeMemberName(element, name);
+      backend.nativeData.setNativeMemberName(element, name);
     }
   }
 
@@ -480,16 +519,15 @@
         } else if (type == coreTypes.numType) {
           backend.registerInstantiatedType(
               coreTypes.doubleType, world, registry);
-          backend.registerInstantiatedType(
-              coreTypes.intType, world, registry);
+          backend.registerInstantiatedType(coreTypes.intType, world, registry);
         } else if (type == coreTypes.stringType) {
           backend.registerInstantiatedType(type, world, registry);
         } else if (type == coreTypes.nullType) {
           backend.registerInstantiatedType(type, world, registry);
         } else if (type == coreTypes.boolType) {
           backend.registerInstantiatedType(type, world, registry);
-        } else if (compiler.types.isSubtype(
-                      type, backend.listImplementation.rawType)) {
+        } else if (compiler.types
+            .isSubtype(type, backend.listImplementation.rawType)) {
           backend.registerInstantiatedType(type, world, registry);
         }
       }
@@ -507,9 +545,8 @@
     }
   }
 
-  enqueueUnusedClassesMatching(bool predicate(classElement),
-                               cause,
-                               [String reason]) {
+  enqueueUnusedClassesMatching(bool predicate(classElement), cause,
+      [String reason]) {
     Iterable matches = unusedClasses.where(predicate);
     matches.toList().forEach((c) => enqueueClass(c, cause));
   }
@@ -529,23 +566,20 @@
 
   addNativeExceptions() {
     enqueueUnusedClassesMatching((classElement) {
-        // TODO(sra): Annotate exception classes in dart:html.
-        String name = classElement.name;
-        if (name.contains('Exception')) return true;
-        if (name.contains('Error')) return true;
-        return false;
-      },
-      'native exception');
+      // TODO(sra): Annotate exception classes in dart:html.
+      String name = classElement.name;
+      if (name.contains('Exception')) return true;
+      if (name.contains('Error')) return true;
+      return false;
+    }, 'native exception');
   }
 }
 
-
 class NativeResolutionEnqueuer extends NativeEnqueuerBase {
-
   Map<String, ClassElement> tagOwner = new Map<String, ClassElement>();
 
   NativeResolutionEnqueuer(Enqueuer world, Compiler compiler)
-    : super(world, compiler, compiler.enableNativeLiveTypeAnalysis);
+      : super(world, compiler, compiler.options.enableNativeLiveTypeAnalysis);
 
   void processNativeClass(ClassElement classElement) {
     super.processNativeClass(classElement);
@@ -554,7 +588,7 @@
     if (backend.isJsInterop(classElement)) return;
     // Since we map from dispatch tags to classes, a dispatch tag must be used
     // on only one native class.
-    for (String tag in backend.getNativeTagsOfClass(classElement)) {
+    for (String tag in backend.nativeData.getNativeTagsOfClass(classElement)) {
       ClassElement owner = tagOwner[tag];
       if (owner != null) {
         if (owner != classElement) {
@@ -588,7 +622,6 @@
     nativeBehaviors[node] = behavior;
   }
 
-
   /**
    * Handles JS-embedded global calls, which can be an instantiation point for
    * types.
@@ -605,7 +638,6 @@
     nativeBehaviors[node] = behavior;
   }
 
-
   /**
    * Handles JS-compiler builtin calls, which can be an instantiation point for
    * types.
@@ -623,15 +655,13 @@
   }
 }
 
-
 class NativeCodegenEnqueuer extends NativeEnqueuerBase {
-
   final CodeEmitterTask emitter;
 
   final Set<ClassElement> doneAddSubtypes = new Set<ClassElement>();
 
   NativeCodegenEnqueuer(Enqueuer world, Compiler compiler, this.emitter)
-    : super(world, compiler, compiler.enableNativeLiveTypeAnalysis);
+      : super(world, compiler, compiler.options.enableNativeLiveTypeAnalysis);
 
   void processNativeClasses(Iterable<LibraryElement> libraries) {
     super.processNativeClasses(libraries);
@@ -663,9 +693,8 @@
     addSubtypes(cls.superclass, emitter);
 
     for (DartType type in cls.allSupertypes) {
-      List<Element> subtypes = emitter.subtypes.putIfAbsent(
-          type.element,
-          () => <ClassElement>[]);
+      List<Element> subtypes =
+          emitter.subtypes.putIfAbsent(type.element, () => <ClassElement>[]);
       subtypes.add(cls);
     }
 
@@ -678,9 +707,8 @@
       superclass = superclass.superclass;
     }
 
-    List<Element> directSubtypes = emitter.directSubtypes.putIfAbsent(
-        superclass,
-        () => <ClassElement>[]);
+    List<Element> directSubtypes =
+        emitter.directSubtypes.putIfAbsent(superclass, () => <ClassElement>[]);
     directSubtypes.add(cls);
   }
 
diff --git a/pkg/compiler/lib/src/native/js.dart b/pkg/compiler/lib/src/native/js.dart
index 5d1d37b..1251fe5 100644
--- a/pkg/compiler/lib/src/native/js.dart
+++ b/pkg/compiler/lib/src/native/js.dart
@@ -2,11 +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.
 
-part of native;
+import '../js/js.dart' as js;
+import '../universe/side_effects.dart' show SideEffects;
 
+import 'behavior.dart';
 
 class HasCapturedPlaceholders extends js.BaseVisitor {
-
   HasCapturedPlaceholders._();
 
   static bool check(js.Node node) {
@@ -111,7 +112,6 @@
   }
 }
 
-
 /// ThrowBehaviorVisitor generates a NativeThrowBehavior describing the
 /// exception behavior of a JavaScript expression.
 ///
@@ -126,7 +126,6 @@
 /// in the calling context.
 ///
 class ThrowBehaviorVisitor extends js.BaseVisitor<NativeThrowBehavior> {
-
   ThrowBehaviorVisitor();
 
   NativeThrowBehavior analyze(js.Node node) {
@@ -136,8 +135,8 @@
   // TODO(sra): Add [sequence] functionality to NativeThrowBehavior.
   /// Returns the combined behavior of sequential execution of code having
   /// behavior [first] followed by code having behavior [second].
-  static NativeThrowBehavior sequence(NativeThrowBehavior first,
-      NativeThrowBehavior second) {
+  static NativeThrowBehavior sequence(
+      NativeThrowBehavior first, NativeThrowBehavior second) {
     if (first == NativeThrowBehavior.MUST) return first;
     if (second == NativeThrowBehavior.MUST) return second;
     if (second == NativeThrowBehavior.NEVER) return first;
@@ -149,9 +148,9 @@
   // TODO(sra): Add [choice] functionality to NativeThrowBehavior.
   /// Returns the combined behavior of a choice between two paths with behaviors
   /// [first] and [second].
-  static NativeThrowBehavior choice(NativeThrowBehavior first,
-      NativeThrowBehavior second) {
-    if (first == second) return first;  // Both paths have same behaviour.
+  static NativeThrowBehavior choice(
+      NativeThrowBehavior first, NativeThrowBehavior second) {
+    if (first == second) return first; // Both paths have same behaviour.
     return NativeThrowBehavior.MAY;
   }
 
diff --git a/pkg/compiler/lib/src/native/native.dart b/pkg/compiler/lib/src/native/native.dart
index 487832b..805196a 100644
--- a/pkg/compiler/lib/src/native/native.dart
+++ b/pkg/compiler/lib/src/native/native.dart
@@ -4,78 +4,32 @@
 
 library native;
 
-import 'dart:collection' show Queue;
-
-import '../common.dart';
-import '../common/backend_api.dart' show
-    ForeignResolver;
-import '../common/registry.dart' show
-    Registry;
-import '../common/resolution.dart' show
-    Parsing,
-    Resolution;
-import '../compiler.dart' show
-    Compiler;
-import '../constants/values.dart';
-import '../core_types.dart' show
-    CoreTypes;
-import '../dart_types.dart';
-import '../enqueue.dart' show
-    Enqueuer,
-    ResolutionEnqueuer;
+import '../compiler.dart' show Compiler;
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    BaseClassElementX,
-    ElementX,
-    FunctionElementX,
-    LibraryElementX;
-import '../js/js.dart' as js;
-import '../js_backend/backend_helpers.dart' show
-    BackendHelpers;
-import '../js_backend/js_backend.dart';
-import '../js_emitter/js_emitter.dart' show
-    CodeEmitterTask,
-    NativeEmitter;
-import '../parser/listener.dart' show
-    Listener;
-import '../parser/element_listener.dart' show
-    ElementListener;
-import '../ssa/ssa.dart';
-import '../tokens/token.dart' show
-    BeginGroupToken,
-    Token;
-import '../tokens/token_constants.dart' as Tokens show
-    EOF_TOKEN,
-    STRING_TOKEN;
-import '../tree/tree.dart';
-import '../universe/side_effects.dart' show
-    SideEffects;
-import '../util/util.dart';
 
-part 'behavior.dart';
-part 'enqueue.dart';
-part 'js.dart';
-part 'scanner.dart';
-part 'ssa.dart';
+export 'behavior.dart';
+export 'enqueue.dart';
+export 'js.dart';
+export 'scanner.dart';
+export 'ssa.dart';
 
-bool maybeEnableNative(Compiler compiler,
-                       LibraryElement library) {
+bool maybeEnableNative(Compiler compiler, LibraryElement library) {
   String libraryName = library.canonicalUri.toString();
-  if (library.entryCompilationUnit.script.name.contains(
-          'sdk/tests/compiler/dart2js_native')
-      || library.entryCompilationUnit.script.name.contains(
-          'sdk/tests/compiler/dart2js_extra')
-      || libraryName == 'dart:async'
-      || libraryName == 'dart:html'
-      || libraryName == 'dart:html_common'
-      || libraryName == 'dart:indexed_db'
-      || libraryName == 'dart:js'
-      || libraryName == 'dart:svg'
-      || libraryName == 'dart:_native_typed_data'
-      || libraryName == 'dart:web_audio'
-      || libraryName == 'dart:web_gl'
-      || libraryName == 'dart:web_sql'
-      || compiler.allowNativeExtensions) {
+  if (library.entryCompilationUnit.script.name
+          .contains('sdk/tests/compiler/dart2js_native') ||
+      library.entryCompilationUnit.script.name
+          .contains('sdk/tests/compiler/dart2js_extra') ||
+      libraryName == 'dart:async' ||
+      libraryName == 'dart:html' ||
+      libraryName == 'dart:html_common' ||
+      libraryName == 'dart:indexed_db' ||
+      libraryName == 'dart:js' ||
+      libraryName == 'dart:svg' ||
+      libraryName == 'dart:_native_typed_data' ||
+      libraryName == 'dart:web_audio' ||
+      libraryName == 'dart:web_gl' ||
+      libraryName == 'dart:web_sql' ||
+      compiler.options.allowNativeExtensions) {
     return true;
   }
   return false;
diff --git a/pkg/compiler/lib/src/native/scanner.dart b/pkg/compiler/lib/src/native/scanner.dart
index c18bfa8..f402431 100644
--- a/pkg/compiler/lib/src/native/scanner.dart
+++ b/pkg/compiler/lib/src/native/scanner.dart
@@ -2,7 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of native;
+import '../common.dart';
+import '../parser/listener.dart' show Listener;
+import '../parser/element_listener.dart' show ElementListener;
+import '../tokens/token.dart' show BeginGroupToken, Token;
+import '../tokens/token_constants.dart' as Tokens show EOF_TOKEN, STRING_TOKEN;
 
 void checkAllowedLibrary(ElementListener listener, Token token) {
   if (listener.scannerOptions.canUseNative) return;
diff --git a/pkg/compiler/lib/src/native/ssa.dart b/pkg/compiler/lib/src/native/ssa.dart
index b51c64d..7ab20c5 100644
--- a/pkg/compiler/lib/src/native/ssa.dart
+++ b/pkg/compiler/lib/src/native/ssa.dart
@@ -2,7 +2,18 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of native;
+import '../common.dart';
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart';
+import '../dart_types.dart';
+import '../elements/elements.dart';
+import '../js/js.dart' as js;
+import '../js_backend/js_backend.dart';
+import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
+import '../ssa/builder.dart' show SsaBuilder;
+import '../ssa/nodes.dart' show HInstruction, HForeignCode, HReturn;
+import '../tree/tree.dart';
+import '../universe/side_effects.dart' show SideEffects;
 
 final RegExp nativeRedirectionRegExp = new RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$');
 
@@ -13,8 +24,8 @@
   JavaScriptBackend backend = builder.backend;
   DiagnosticReporter reporter = compiler.reporter;
 
-  HInstruction convertDartClosure(ParameterElement  parameter,
-                                  FunctionType type) {
+  HInstruction convertDartClosure(
+      ParameterElement parameter, FunctionType type) {
     HInstruction local = builder.localsHandler.readLocal(parameter);
     ConstantValue arityConstant =
         builder.constantSystem.createInt(type.computeArity());
@@ -36,7 +47,7 @@
   //      hasBody = true
   bool hasBody = false;
   assert(backend.isNative(element));
-  String nativeMethodName = backend.getFixedBackendName(element);
+  String nativeMethodName = backend.nativeData.getFixedBackendName(element);
   if (nativeBody != null) {
     LiteralString jsCode = nativeBody.asLiteralString();
     String str = jsCode.dartString.slowToString();
@@ -81,25 +92,26 @@
     } else if (element.kind == ElementKind.SETTER) {
       nativeMethodCall = '$receiver$nativeMethodName = $foreignParameters';
     } else {
-      builder.reporter.internalError(element,
-                                     'Unexpected kind: "${element.kind}".');
+      builder.reporter
+          .internalError(element, 'Unexpected kind: "${element.kind}".');
     }
 
-    builder.push(
-        new HForeignCode(
-            // TODO(sra): This could be cached.  The number of templates should
-            // be proportional to the number of native methods, which is bounded
-            // by the dart: libraries.
-            js.js.uncachedExpressionTemplate(nativeMethodCall),
-            backend.dynamicType,
-            inputs, effects: new SideEffects()));
+    builder.push(new HForeignCode(
+        // TODO(sra): This could be cached.  The number of templates should
+        // be proportional to the number of native methods, which is bounded
+        // by the dart: libraries.
+        js.js.uncachedExpressionTemplate(nativeMethodCall),
+        backend.dynamicType,
+        inputs,
+        effects: new SideEffects()));
     // TODO(johnniwinther): Provide source information.
     builder
         .close(new HReturn(builder.pop(), null))
         .addSuccessor(builder.graph.exit);
   } else {
     if (parameters.parameterCount != 0) {
-      reporter.internalError(nativeBody,
+      reporter.internalError(
+          nativeBody,
           'native "..." syntax is restricted to '
           'functions with zero parameters.');
     }
diff --git a/pkg/compiler/lib/src/old_to_new_api.dart b/pkg/compiler/lib/src/old_to_new_api.dart
index 59bbc19..7954091 100644
--- a/pkg/compiler/lib/src/old_to_new_api.dart
+++ b/pkg/compiler/lib/src/old_to_new_api.dart
@@ -31,8 +31,8 @@
   LegacyCompilerDiagnostics(this._handler);
 
   @override
-  void report(var code, Uri uri, int begin, int end,
-              String message, Diagnostic kind) {
+  void report(
+      var code, Uri uri, int begin, int end, String message, Diagnostic kind) {
     _handler(uri, begin, end, message, kind);
   }
 }
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
new file mode 100644
index 0000000..84c8a80
--- /dev/null
+++ b/pkg/compiler/lib/src/options.dart
@@ -0,0 +1,599 @@
+// 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 dart2js.src.options;
+
+import 'commandline_options.dart' show Flags;
+import '../compiler.dart' show PackagesDiscoveryProvider;
+
+/// Options used for parsing.
+///
+/// Use this to conditionally support certain constructs, e.g.,
+/// experimental ones.
+abstract class ParserOptions {
+  const ParserOptions();
+
+  /// Support parsing of generic method declarations, and invocations of
+  /// methods where type arguments are passed.
+  bool get enableGenericMethodSyntax;
+}
+
+/// Options used for controlling diagnostic messages.
+abstract class DiagnosticOptions {
+  const DiagnosticOptions();
+
+  /// If `true`, warnings cause the compilation to fail.
+  bool get fatalWarnings;
+
+  /// Emit terse diagnostics without howToFix.
+  bool get terseDiagnostics;
+
+  /// If `true`, warnings are not reported.
+  bool get suppressWarnings;
+
+  /// If `true`, hints are not reported.
+  bool get suppressHints;
+
+  /// Returns `true` if warnings and hints are shown for all packages.
+  bool get showAllPackageWarnings;
+
+  /// Returns `true` if warnings and hints are hidden for all packages.
+  bool get hidePackageWarnings;
+
+  /// Returns `true` if warnings should be should for [uri].
+  bool showPackageWarningsFor(Uri uri);
+}
+
+/// Object for passing options to the compiler. Superclasses are used to select
+/// subsets of these options, enabling each part of the compiler to depend on
+/// as few as possible.
+class CompilerOptions implements DiagnosticOptions, ParserOptions {
+  /// The entry point of the application that is being compiled.
+  final Uri entryPoint;
+
+  /// Root location where SDK libraries are found.
+  final Uri libraryRoot;
+
+  /// Package root location.
+  ///
+  /// If not null then [packageConfig] should be null.
+  final Uri packageRoot;
+
+  /// Location of the package configuration file.
+  ///
+  /// If not null then [packageRoot] should be null.
+  final Uri packageConfig;
+
+  // TODO(sigmund): Move out of here, maybe to CompilerInput. Options should not
+  // hold code, just configuration options.
+  final PackagesDiscoveryProvider packagesDiscoveryProvider;
+
+  /// Resolved constant "environment" values passed to the compiler via the `-D`
+  /// flags.
+  final Map<String, dynamic> environment;
+
+  /// Whether we allow mocking compilation of libraries such as dart:io and
+  /// dart:html for unit testing purposes.
+  final bool allowMockCompilation;
+
+  /// Whether the native extension syntax is supported by the frontend.
+  final bool allowNativeExtensions;
+
+  /// Whether to resolve all functions in the program, not just those reachable
+  /// from main. This implies [analyzeOnly] is true as well.
+  final bool analyzeAll;
+
+  /// Whether to disable tree-shaking for the main script. This marks all
+  /// functions in the main script as reachable (not just a function named
+  /// `main`).
+  // TODO(sigmund): rename. The current name seems to indicate that only the
+  // main function is retained, which is the opposite of what this does.
+  final bool analyzeMain;
+
+  /// Whether to run the compiler just for the purpose of analysis. That is, to
+  /// run resolution and type-checking alone, but otherwise do not generate any
+  /// code.
+  final bool analyzeOnly;
+
+  /// Whether to skip analysis of method bodies and field initializers. Implies
+  /// [analyzeOnly].
+  final bool analyzeSignaturesOnly;
+
+  /// ID associated with this sdk build.
+  final String buildId;
+
+  /// Whether there is a build-id available so we can use it on error messages
+  /// and in the emitted output of the compiler.
+  bool get hasBuildId => buildId != _UNDETERMINED_BUILD_ID;
+
+  /// Location where to generate a map containing details of how deferred
+  /// libraries are subdivided.
+  final Uri deferredMapUri;
+
+  /// Whether to disable inlining during the backend optimizations.
+  // TODO(sigmund): negate, so all flags are positive
+  final bool disableInlining;
+
+  /// Diagnostic option: If `true`, warnings cause the compilation to fail.
+  final bool fatalWarnings;
+
+  /// Diagnostic option: Emit terse diagnostics without howToFix.
+  final bool terseDiagnostics;
+
+  /// Diagnostic option: If `true`, warnings are not reported.
+  final bool suppressWarnings;
+
+  /// Diagnostic option: If `true`, hints are not reported.
+  final bool suppressHints;
+
+  /// Diagnostic option: List of packages for which warnings and hints are
+  /// reported. If `null`, no package warnings or hints are reported. If
+  /// empty, all warnings and hints are reported.
+  final List<String> _shownPackageWarnings;
+
+  /// Whether to disable global type inference.
+  final bool disableTypeInference;
+
+  /// 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.
+  final bool dumpInfo;
+
+  /// Whether we allow passing an extra argument to `assert`, containing a
+  /// reason for why an assertion fails. (experimental)
+  final bool enableAssertMessage;
+
+  /// Support parsing of generic method declarations, and invocations of
+  /// methods where type arguments are passed.
+  final bool enableGenericMethodSyntax;
+
+  /// Whether the user specified a flag to allow the use of dart:mirrors. This
+  /// silences a warning produced by the compiler.
+  final bool enableExperimentalMirrors;
+
+  /// Whether to enable minification
+  // TODO(sigmund): rename to minify
+  final bool enableMinification;
+
+  /// Whether to model which native classes are live based on annotations on the
+  /// core libraries. If false, all native classes will be included by default.
+  final bool enableNativeLiveTypeAnalysis;
+
+  /// Whether to generate code containing checked-mode assignability checks.
+  final bool enableTypeAssertions;
+
+  /// Whether to generate code containing user's `assert` statements.
+  final bool enableUserAssertions;
+
+  /// Whether to generate output even when there are compile-time errors.
+  final bool generateCodeWithCompileTimeErrors;
+
+  /// Whether to generate a source-map file together with the output program.
+  final bool generateSourceMap;
+
+  /// Whether some values are cached for reuse in incremental compilation.
+  /// Incremental compilation allows calling `Compiler.run` more than once
+  /// (experimental).
+  final bool hasIncrementalSupport;
+
+  /// URI of the main output if the compiler is generating source maps.
+  final Uri outputUri;
+
+  /// Location of the platform configuration file.
+  final Uri platformConfigUri;
+
+  /// Whether to emit URIs in the reflection metadata.
+  final bool preserveUris;
+
+  /// URI where the compiler should generate the output source map file.
+  final Uri sourceMapUri;
+
+  /// The compiler is run from the build bot.
+  final bool testMode;
+
+  /// Whether to trust JS-interop annotations. (experimental)
+  final bool trustJSInteropTypeAnnotations;
+
+  /// Whether to trust primitive types during inference and optimizations.
+  final bool trustPrimitives;
+
+  /// Whether to trust type annotations during inference and optimizations.
+  final bool trustTypeAnnotations;
+
+  /// Whether to generate code compliant with content security policy (CSP).
+  final bool useContentSecurityPolicy;
+
+  /// Use the experimental CPS based backend.
+  final bool useCpsIr;
+
+  /// When obfuscating for minification, whether to use the frequency of a name
+  /// as an heuristic to pick shorter names.
+  final bool useFrequencyNamer;
+
+  /// Whether to use the new source-information implementation for source-maps.
+  /// (experimental)
+  final bool useNewSourceInfo;
+
+  /// Whether the user requested to use the fast startup emitter. The full
+  /// emitter might still be used if the program uses dart:mirrors.
+  final bool useStartupEmitter;
+
+  /// Enable verbose printing during compilation. Includes progress messages
+  /// during each phase and a time-breakdown between phases at the end.
+  final bool verbose;
+
+  // -------------------------------------------------
+  // Options for deprecated features
+  // -------------------------------------------------
+  // TODO(sigmund): delete these as we delete the underlying features
+
+  /// Whether to preserve comments while scanning (only use for dart:mirrors).
+  final bool preserveComments;
+
+  /// Whether to emit JavaScript (false enables dart2dart).
+  final bool emitJavaScript;
+
+  /// When using dart2dart, whether to use the multi file format.
+  final bool dart2dartMultiFile;
+
+  /// Strip option used by dart2dart.
+  final List<String> strips;
+
+  /// Create an options object by parsing flags from [options].
+  factory CompilerOptions.parse(
+      {Uri entryPoint,
+      Uri libraryRoot,
+      Uri packageRoot,
+      Uri packageConfig,
+      PackagesDiscoveryProvider packagesDiscoveryProvider,
+      Map<String, dynamic> environment: const <String, dynamic>{},
+      List<String> options}) {
+    return new CompilerOptions(
+        entryPoint: entryPoint,
+        libraryRoot: libraryRoot,
+        packageRoot: packageRoot,
+        packageConfig: packageConfig,
+        packagesDiscoveryProvider: packagesDiscoveryProvider,
+        environment: environment,
+        allowMockCompilation: _hasOption(options, Flags.allowMockCompilation),
+        allowNativeExtensions: _hasOption(options, Flags.allowNativeExtensions),
+        analyzeAll: _hasOption(options, Flags.analyzeAll),
+        analyzeMain: _hasOption(options, Flags.analyzeMain),
+        analyzeOnly: _hasOption(options, Flags.analyzeOnly),
+        analyzeSignaturesOnly: _hasOption(options, Flags.analyzeSignaturesOnly),
+        buildId: _extractStringOption(
+            options, '--build-id=', _UNDETERMINED_BUILD_ID),
+        dart2dartMultiFile: _hasOption(options, '--output-type=dart-multi'),
+        deferredMapUri: _extractUriOption(options, '--deferred-map='),
+        fatalWarnings: _hasOption(options, Flags.fatalWarnings),
+        terseDiagnostics: _hasOption(options, Flags.terse),
+        suppressWarnings: _hasOption(options, Flags.suppressWarnings),
+        suppressHints: _hasOption(options, Flags.suppressHints),
+        shownPackageWarnings:
+            _extractOptionalCsvOption(options, Flags.showPackageWarnings),
+        disableInlining: _hasOption(options, Flags.disableInlining),
+        disableTypeInference: _hasOption(options, Flags.disableTypeInference),
+        dumpInfo: _hasOption(options, Flags.dumpInfo),
+        emitJavaScript: !(_hasOption(options, '--output-type=dart') ||
+            _hasOption(options, '--output-type=dart-multi')),
+        enableAssertMessage: _hasOption(options, Flags.enableAssertMessage),
+        enableGenericMethodSyntax:
+            _hasOption(options, Flags.genericMethodSyntax),
+        enableExperimentalMirrors:
+            _hasOption(options, Flags.enableExperimentalMirrors),
+        enableMinification: _hasOption(options, Flags.minify),
+        enableNativeLiveTypeAnalysis:
+            !_hasOption(options, Flags.disableNativeLiveTypeAnalysis),
+        enableTypeAssertions: _hasOption(options, Flags.enableCheckedMode),
+        enableUserAssertions: _hasOption(options, Flags.enableCheckedMode),
+        generateCodeWithCompileTimeErrors:
+            _hasOption(options, Flags.generateCodeWithCompileTimeErrors),
+        generateSourceMap: !_hasOption(options, Flags.noSourceMaps),
+        hasIncrementalSupport: _forceIncrementalSupport ||
+            _hasOption(options, Flags.incrementalSupport),
+        outputUri: _extractUriOption(options, '--out='),
+        platformConfigUri:
+            _resolvePlatformConfigFromOptions(libraryRoot, options),
+        preserveComments: _hasOption(options, Flags.preserveComments),
+        preserveUris: _hasOption(options, Flags.preserveUris),
+        sourceMapUri: _extractUriOption(options, '--source-map='),
+        strips: _extractCsvOption(options, '--force-strip='),
+        testMode: _hasOption(options, Flags.testMode),
+        trustJSInteropTypeAnnotations:
+            _hasOption(options, Flags.trustJSInteropTypeAnnotations),
+        trustPrimitives: _hasOption(options, Flags.trustPrimitives),
+        trustTypeAnnotations: _hasOption(options, Flags.trustTypeAnnotations),
+        useContentSecurityPolicy:
+            _hasOption(options, Flags.useContentSecurityPolicy),
+        useCpsIr: _hasOption(options, Flags.useCpsIr),
+        useFrequencyNamer:
+            !_hasOption(options, Flags.noFrequencyBasedMinification),
+        useNewSourceInfo: _hasOption(options, Flags.useNewSourceInfo),
+        useStartupEmitter: _hasOption(options, Flags.fastStartup),
+        verbose: _hasOption(options, Flags.verbose));
+  }
+
+  /// Creates an option object for the compiler.
+  ///
+  /// This validates and normalizes dependent options to be consistent. For
+  /// example, if [analyzeAll] is true, the resulting options object will also
+  /// have [analyzeOnly] as true.
+  factory CompilerOptions(
+      {Uri entryPoint,
+      Uri libraryRoot,
+      Uri packageRoot,
+      Uri packageConfig,
+      PackagesDiscoveryProvider packagesDiscoveryProvider,
+      Map<String, dynamic> environment: const <String, dynamic>{},
+      bool allowMockCompilation: false,
+      bool allowNativeExtensions: false,
+      bool analyzeAll: false,
+      bool analyzeMain: false,
+      bool analyzeOnly: false,
+      bool analyzeSignaturesOnly: false,
+      String buildId: _UNDETERMINED_BUILD_ID,
+      bool dart2dartMultiFile: false,
+      Uri deferredMapUri: null,
+      bool fatalWarnings: false,
+      bool terseDiagnostics: false,
+      bool suppressWarnings: false,
+      bool suppressHints: false,
+      List<String> shownPackageWarnings: null,
+      bool disableInlining: false,
+      bool disableTypeInference: false,
+      bool dumpInfo: false,
+      bool emitJavaScript: true,
+      bool enableAssertMessage: false,
+      bool enableGenericMethodSyntax: false,
+      bool enableExperimentalMirrors: false,
+      bool enableMinification: false,
+      bool enableNativeLiveTypeAnalysis: true,
+      bool enableTypeAssertions: false,
+      bool enableUserAssertions: false,
+      bool generateCodeWithCompileTimeErrors: false,
+      bool generateSourceMap: true,
+      bool hasIncrementalSupport: false,
+      Uri outputUri: null,
+      Uri platformConfigUri: null,
+      bool preserveComments: false,
+      bool preserveUris: false,
+      Uri sourceMapUri: null,
+      List<String> strips: const [],
+      bool testMode: false,
+      bool trustJSInteropTypeAnnotations: false,
+      bool trustPrimitives: false,
+      bool trustTypeAnnotations: false,
+      bool useContentSecurityPolicy: false,
+      bool useCpsIr: false,
+      bool useFrequencyNamer: true,
+      bool useNewSourceInfo: false,
+      bool useStartupEmitter: false,
+      bool verbose: false}) {
+    // TODO(sigmund): should entrypoint be here? should we validate it is not
+    // null? In unittests we use the same compiler to analyze or build multiple
+    // entrypoints.
+    if (libraryRoot == null) {
+      throw new ArgumentError("[libraryRoot] is null.");
+    }
+    if (!libraryRoot.path.endsWith("/")) {
+      throw new ArgumentError("[libraryRoot] must end with a /");
+    }
+    if (packageRoot != null && packageConfig != null) {
+      throw new ArgumentError("Only one of [packageRoot] or [packageConfig] "
+          "may be given.");
+    }
+    if (packageRoot != null && !packageRoot.path.endsWith("/")) {
+      throw new ArgumentError("[packageRoot] must end with a /");
+    }
+    if (!analyzeOnly) {
+      if (allowNativeExtensions) {
+        throw new ArgumentError(
+            "${Flags.allowNativeExtensions} is only supported in combination "
+            "with ${Flags.analyzeOnly}");
+      }
+    }
+    return new CompilerOptions._(entryPoint, libraryRoot, packageRoot,
+        packageConfig, packagesDiscoveryProvider, environment,
+        allowMockCompilation: allowMockCompilation,
+        allowNativeExtensions: allowNativeExtensions,
+        analyzeAll: analyzeAll,
+        analyzeMain: analyzeMain,
+        analyzeOnly: analyzeOnly || analyzeSignaturesOnly || analyzeAll,
+        analyzeSignaturesOnly: analyzeSignaturesOnly,
+        buildId: buildId,
+        dart2dartMultiFile: dart2dartMultiFile,
+        deferredMapUri: deferredMapUri,
+        fatalWarnings: fatalWarnings,
+        terseDiagnostics: terseDiagnostics,
+        suppressWarnings: suppressWarnings,
+        suppressHints: suppressHints,
+        shownPackageWarnings: shownPackageWarnings,
+        disableInlining: disableInlining || hasIncrementalSupport,
+        disableTypeInference: disableTypeInference || !emitJavaScript,
+        dumpInfo: dumpInfo,
+        emitJavaScript: emitJavaScript,
+        enableAssertMessage: enableAssertMessage,
+        enableGenericMethodSyntax: enableGenericMethodSyntax,
+        enableExperimentalMirrors: enableExperimentalMirrors,
+        enableMinification: enableMinification,
+        enableNativeLiveTypeAnalysis: enableNativeLiveTypeAnalysis,
+        enableTypeAssertions: enableTypeAssertions,
+        enableUserAssertions: enableUserAssertions,
+        generateCodeWithCompileTimeErrors: generateCodeWithCompileTimeErrors,
+        generateSourceMap: generateSourceMap,
+        hasIncrementalSupport: hasIncrementalSupport,
+        outputUri: outputUri,
+        platformConfigUri: platformConfigUri ??
+            _resolvePlatformConfig(
+                libraryRoot, null, !emitJavaScript, const []),
+        preserveComments: preserveComments,
+        preserveUris: preserveUris,
+        sourceMapUri: sourceMapUri,
+        strips: strips,
+        testMode: testMode,
+        trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations,
+        trustPrimitives: trustPrimitives,
+        trustTypeAnnotations: trustTypeAnnotations,
+        useContentSecurityPolicy: useContentSecurityPolicy,
+        useCpsIr: useCpsIr,
+        useFrequencyNamer: useFrequencyNamer,
+        useNewSourceInfo: useNewSourceInfo,
+        useStartupEmitter: useStartupEmitter,
+        verbose: verbose);
+  }
+
+  CompilerOptions._(this.entryPoint, this.libraryRoot, this.packageRoot,
+      this.packageConfig, this.packagesDiscoveryProvider, this.environment,
+      {this.allowMockCompilation: false,
+      this.allowNativeExtensions: false,
+      this.analyzeAll: false,
+      this.analyzeMain: false,
+      this.analyzeOnly: false,
+      this.analyzeSignaturesOnly: false,
+      this.buildId: _UNDETERMINED_BUILD_ID,
+      this.dart2dartMultiFile: false,
+      this.deferredMapUri: null,
+      this.fatalWarnings: false,
+      this.terseDiagnostics: false,
+      this.suppressWarnings: false,
+      this.suppressHints: false,
+      List<String> shownPackageWarnings: null,
+      this.disableInlining: false,
+      this.disableTypeInference: false,
+      this.dumpInfo: false,
+      this.emitJavaScript: true,
+      this.enableAssertMessage: false,
+      this.enableGenericMethodSyntax: false,
+      this.enableExperimentalMirrors: false,
+      this.enableMinification: false,
+      this.enableNativeLiveTypeAnalysis: false,
+      this.enableTypeAssertions: false,
+      this.enableUserAssertions: false,
+      this.generateCodeWithCompileTimeErrors: false,
+      this.generateSourceMap: true,
+      this.hasIncrementalSupport: false,
+      this.outputUri: null,
+      this.platformConfigUri: null,
+      this.preserveComments: false,
+      this.preserveUris: false,
+      this.sourceMapUri: null,
+      this.strips: const [],
+      this.testMode: false,
+      this.trustJSInteropTypeAnnotations: false,
+      this.trustPrimitives: false,
+      this.trustTypeAnnotations: false,
+      this.useContentSecurityPolicy: false,
+      this.useCpsIr: false,
+      this.useFrequencyNamer: false,
+      this.useNewSourceInfo: false,
+      this.useStartupEmitter: false,
+      this.verbose: false})
+      : _shownPackageWarnings = shownPackageWarnings;
+
+  /// Returns `true` if warnings and hints are shown for all packages.
+  bool get showAllPackageWarnings {
+    return _shownPackageWarnings != null && _shownPackageWarnings.isEmpty;
+  }
+
+  /// Returns `true` if warnings and hints are hidden for all packages.
+  bool get hidePackageWarnings => _shownPackageWarnings == null;
+
+  /// Returns `true` if warnings should be should for [uri].
+  bool showPackageWarningsFor(Uri uri) {
+    if (showAllPackageWarnings) {
+      return true;
+    }
+    if (_shownPackageWarnings != null) {
+      return uri.scheme == 'package' &&
+          _shownPackageWarnings.contains(uri.pathSegments.first);
+    }
+    return false;
+  }
+}
+
+String _extractStringOption(
+    List<String> options, String prefix, String defaultValue) {
+  for (String option in options) {
+    if (option.startsWith(prefix)) {
+      return option.substring(prefix.length);
+    }
+  }
+  return defaultValue;
+}
+
+Uri _extractUriOption(List<String> options, String prefix) {
+  var option = _extractStringOption(options, prefix, null);
+  return (option == null) ? null : Uri.parse(option);
+}
+
+// CSV: Comma separated values.
+List<String> _extractCsvOption(List<String> options, String prefix) {
+  for (String option in options) {
+    if (option.startsWith(prefix)) {
+      return option.substring(prefix.length).split(',');
+    }
+  }
+  return const <String>[];
+}
+
+bool _hasOption(List<String> options, String option) {
+  return options.indexOf(option) >= 0;
+}
+
+/// Extract list of comma separated values 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<String> _extractOptionalCsvOption(List<String> options, String flag) {
+  String prefix = '$flag=';
+  for (String option in options) {
+    if (option == flag) {
+      return const <String>[];
+    }
+    if (option.startsWith(flag)) {
+      return option.substring(prefix.length).split(',');
+    }
+  }
+  return null;
+}
+
+Uri _resolvePlatformConfig(Uri libraryRoot, String platformConfigPath,
+    bool isDart2Dart, Iterable<String> categories) {
+  if (platformConfigPath != null) {
+    return libraryRoot.resolve(platformConfigPath);
+  } else if (isDart2Dart) {
+    return libraryRoot.resolve(_dart2dartPlatform);
+  } else {
+    if (categories.length == 0) {
+      return libraryRoot.resolve(_clientPlatform);
+    }
+    assert(categories.length <= 2);
+    if (categories.contains("Client")) {
+      if (categories.contains("Server")) {
+        return libraryRoot.resolve(_sharedPlatform);
+      }
+      return libraryRoot.resolve(_clientPlatform);
+    }
+    assert(categories.contains("Server"));
+    return libraryRoot.resolve(_serverPlatform);
+  }
+}
+
+Uri _resolvePlatformConfigFromOptions(Uri libraryRoot, List<String> options) {
+  return _resolvePlatformConfig(
+      libraryRoot,
+      _extractStringOption(options, "--platform-config=", null),
+      _hasOption(options, '--output-type=dart'),
+      _extractCsvOption(options, '--categories='));
+}
+
+/// Locations of the platform descriptor files relative to the library root.
+const String _clientPlatform = "lib/dart_client.platform";
+const String _serverPlatform = "lib/dart_server.platform";
+const String _sharedPlatform = "lib/dart_shared.platform";
+const String _dart2dartPlatform = "lib/dart2dart.platform";
+
+const String _UNDETERMINED_BUILD_ID = "build number could not be determined";
+const bool _forceIncrementalSupport =
+    const bool.fromEnvironment('DART2JS_EXPERIMENTAL_INCREMENTAL_SUPPORT');
diff --git a/pkg/compiler/lib/src/ordered_typeset.dart b/pkg/compiler/lib/src/ordered_typeset.dart
index cd6dd0e..e3cffb5 100644
--- a/pkg/compiler/lib/src/ordered_typeset.dart
+++ b/pkg/compiler/lib/src/ordered_typeset.dart
@@ -5,16 +5,11 @@
 library ordered_typeset;
 
 import 'common.dart';
-import 'compiler.dart' show
-    Compiler;
 import 'dart_types.dart';
-import 'elements/elements.dart' show
-    ClassElement;
-import 'util/util.dart' show
-    Link,
-    LinkBuilder;
-import 'util/util_implementation.dart' show
-    LinkEntry;
+import 'diagnostics/diagnostic_listener.dart' show DiagnosticReporter;
+import 'elements/elements.dart' show ClassElement;
+import 'util/util.dart' show Link, LinkBuilder;
+import 'util/util_implementation.dart' show LinkEntry;
 
 /**
  * An ordered set of the supertypes of a class. The supertypes of a class are
@@ -39,8 +34,7 @@
   final Link<DartType> _supertypes;
 
   OrderedTypeSet.internal(List<Link<DartType>> this._levels,
-                           Link<DartType> this.types,
-                           Link<DartType> this._supertypes);
+      Link<DartType> this.types, Link<DartType> this._supertypes);
 
   factory OrderedTypeSet.singleton(DartType type) {
     Link<DartType> types =
@@ -56,9 +50,8 @@
   OrderedTypeSet extendClass(InterfaceType type) {
     assert(invariant(type.element, types.head.treatAsRaw,
         message: 'Cannot extend generic class ${types.head} using '
-                 'OrderedTypeSet.extendClass'));
-    Link<DartType> extendedTypes =
-        new LinkEntry<DartType>(type, types);
+            'OrderedTypeSet.extendClass'));
+    Link<DartType> extendedTypes = new LinkEntry<DartType>(type, types);
     List<Link<DartType>> list = new List<Link<DartType>>(levels + 1);
     for (int i = 0; i < levels; i++) {
       list[i] = _levels[i];
@@ -151,39 +144,89 @@
   LinkBuilder<DartType> allSupertypes = new LinkBuilder<DartType>();
   int maxDepth = -1;
 
+  final DiagnosticReporter reporter;
   final ClassElement cls;
+  InterfaceType _objectType;
 
-  OrderedTypeSetBuilder(this.cls);
+  // TODO(johnniwinther): Provide access to `Object` in deserialization and
+  // make [objectType] mandatory.
+  OrderedTypeSetBuilder(this.cls, {this.reporter, InterfaceType objectType})
+      : this._objectType = objectType;
 
-  void add(Compiler compiler, InterfaceType type) {
-    if (type.element == cls) {
-      if (type.element != compiler.coreClasses.objectClass) {
-        allSupertypes.addLast(compiler.coreTypes.objectType);
+  OrderedTypeSet createOrderedTypeSet(
+      InterfaceType supertype, Link<DartType> interfaces) {
+    if (_objectType == null) {
+      // Find `Object` through in hierarchy. This is used for serialization
+      // where it is assumed that the hierarchy is valid.
+      _objectType = supertype;
+      while (!_objectType.isObject) {
+        _objectType = _objectType.element.supertype;
       }
-      DiagnosticReporter reporter = compiler.reporter;
-      _addAtDepth(reporter, type, maxDepth + 1);
-    } else {
-      if (type.element != compiler.coreClasses.objectClass) {
-        allSupertypes.addLast(type);
-      }
-      DiagnosticReporter reporter = compiler.reporter;
-      _addAtDepth(reporter, type, type.element.hierarchyDepth);
+    }
+
+    // TODO(15296): Collapse these iterations to one when the order is not
+    // needed.
+    add(supertype);
+    for (Link<DartType> link = interfaces; !link.isEmpty; link = link.tail) {
+      add(link.head);
+    }
+
+    addAllSupertypes(supertype);
+    for (Link<DartType> link = interfaces; !link.isEmpty; link = link.tail) {
+      addAllSupertypes(link.head);
+    }
+    add(cls.thisType);
+    return toTypeSet();
+  }
+
+  /**
+   * Adds [type] and all supertypes of [type] to [allSupertypes] while
+   * substituting type variables.
+   */
+  void addAllSupertypes(InterfaceType type) {
+    ClassElement classElement = type.element;
+    Link<DartType> supertypes = classElement.allSupertypes;
+    assert(invariant(cls, supertypes != null,
+        message: "Supertypes not computed on $classElement "
+            "during resolution of $cls"));
+    while (!supertypes.isEmpty) {
+      DartType supertype = supertypes.head;
+      add(supertype.substByContext(type));
+      supertypes = supertypes.tail;
     }
   }
 
-  void _addAtDepth(DiagnosticReporter reporter, InterfaceType type, int depth) {
+  void add(InterfaceType type) {
+    if (type.element == cls) {
+      if (type != _objectType) {
+        allSupertypes.addLast(_objectType);
+      }
+      _addAtDepth(type, maxDepth + 1);
+    } else {
+      if (type != _objectType) {
+        allSupertypes.addLast(type);
+      }
+      _addAtDepth(type, type.element.hierarchyDepth);
+    }
+  }
+
+  void _addAtDepth(InterfaceType type, int depth) {
     LinkEntry<DartType> prev = null;
     LinkEntry<DartType> link = map[depth];
     while (link != null) {
       DartType existingType = link.head;
       if (existingType == type) return;
       if (existingType.element == type.element) {
-        reporter.reportErrorMessage(
-            cls,
-            MessageKind.MULTI_INHERITANCE,
-            {'thisType': cls.thisType,
-             'firstType': existingType,
-             'secondType': type});
+        if (reporter != null) {
+          reporter.reportErrorMessage(cls, MessageKind.MULTI_INHERITANCE, {
+            'thisType': cls.thisType,
+            'firstType': existingType,
+            'secondType': type
+          });
+        } else {
+          assert(invariant(cls, false,
+              message: 'Invalid ordered typeset for $cls'));
+        }
         return;
       }
       prev = link;
diff --git a/pkg/compiler/lib/src/parser/class_element_parser.dart b/pkg/compiler/lib/src/parser/class_element_parser.dart
index 319cba5..b85114d 100644
--- a/pkg/compiler/lib/src/parser/class_element_parser.dart
+++ b/pkg/compiler/lib/src/parser/class_element_parser.dart
@@ -4,17 +4,15 @@
 
 library dart2js.parser.classes;
 
-import '../tokens/token.dart' show
-    Token;
+import '../tokens/token.dart' show Token;
 
-import 'listener.dart' show
-    Listener;
-import 'partial_parser.dart' show
-    PartialParser;
+import 'listener.dart' show Listener;
+import '../options.dart' show ParserOptions;
+import 'partial_parser.dart' show PartialParser;
 
 class ClassElementParser extends PartialParser {
-  ClassElementParser(Listener listener)
-      : super(listener, enableConditionalDirectives: false);
+  ClassElementParser(Listener listener, ParserOptions options)
+      : super(listener, options);
 
   Token parseClassBody(Token token) => fullParseClassBody(token);
 }
diff --git a/pkg/compiler/lib/src/parser/diet_parser_task.dart b/pkg/compiler/lib/src/parser/diet_parser_task.dart
index 9afc8d4..6d9302e 100644
--- a/pkg/compiler/lib/src/parser/diet_parser_task.dart
+++ b/pkg/compiler/lib/src/parser/diet_parser_task.dart
@@ -5,45 +5,36 @@
 library dart2js.parser.diet.task;
 
 import '../common.dart';
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
-import '../elements/elements.dart' show
-    CompilationUnitElement;
-import '../tokens/token.dart' show
-    Token;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
+import '../elements/elements.dart' show CompilationUnitElement;
+import '../id_generator.dart';
+import '../tokens/token.dart' show Token;
 
-import 'listener.dart' show
-    ParserError;
-import 'element_listener.dart' show
-    ElementListener,
-    ScannerOptions;
-import 'partial_parser.dart' show
-    PartialParser;
+import 'listener.dart' show ParserError;
+import 'element_listener.dart' show ElementListener, ScannerOptions;
+import '../options.dart' show ParserOptions;
+import 'partial_parser.dart' show PartialParser;
 
 class DietParserTask extends CompilerTask {
-  final bool _enableConditionalDirectives;
+  final ParserOptions _parserOptions;
+  final IdGenerator _idGenerator;
 
-  DietParserTask(Compiler compiler, {bool enableConditionalDirectives})
-      : this._enableConditionalDirectives = enableConditionalDirectives,
-        super(compiler);
+  DietParserTask(Compiler compiler, this._parserOptions, this._idGenerator)
+      : super(compiler);
 
   final String name = 'Diet Parser';
 
   dietParse(CompilationUnitElement compilationUnit, Token tokens) {
     measure(() {
-      Function idGenerator = compiler.getNextFreeClassId;
-      ScannerOptions scannerOptions = new ScannerOptions(
-          canUseNative: compiler.backend.canLibraryUseNative(
-              compilationUnit.library));
+      ScannerOptions scannerOptions =
+          new ScannerOptions.from(compiler, compilationUnit.library);
       ElementListener listener = new ElementListener(
-          scannerOptions, compiler.reporter, compilationUnit, idGenerator);
-      PartialParser parser = new PartialParser(
-          listener, enableConditionalDirectives: _enableConditionalDirectives);
+          scannerOptions, compiler.reporter, compilationUnit, _idGenerator);
+      PartialParser parser = new PartialParser(listener, _parserOptions);
       try {
         parser.parseUnit(tokens);
-      } on ParserError catch(_) {
+      } on ParserError catch (_) {
         assert(invariant(compilationUnit, compiler.compilationFailed));
       }
     });
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
index 48bfae31..b089ae5 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -4,64 +4,56 @@
 
 library dart2js.parser.element_listener;
 
+import '../compiler.dart' show Compiler;
 import '../common.dart';
-import '../diagnostics/messages.dart' show
-    MessageTemplate;
-import '../elements/elements.dart' show
-    Element,
-    LibraryElement,
-    MetadataAnnotation;
-import '../elements/modelx.dart' show
-    CompilationUnitElementX,
-    DeclarationSite,
-    ElementX,
-    EnumClassElementX,
-    FieldElementX,
-    LibraryElementX,
-    NamedMixinApplicationElementX,
-    VariableList;
+import '../diagnostics/messages.dart' show MessageTemplate;
+import '../elements/elements.dart'
+    show Element, LibraryElement, MetadataAnnotation;
+import '../elements/modelx.dart'
+    show
+        CompilationUnitElementX,
+        DeclarationSite,
+        ElementX,
+        EnumClassElementX,
+        FieldElementX,
+        LibraryElementX,
+        NamedMixinApplicationElementX,
+        VariableList;
+import '../id_generator.dart';
 import '../native/native.dart' as native;
-import '../string_validator.dart' show
-    StringValidator;
-import '../tokens/keyword.dart' show
-    Keyword;
-import '../tokens/precedence_constants.dart' as Precedence show
-    BAD_INPUT_INFO;
-import '../tokens/token.dart' show
-    BeginGroupToken,
-    ErrorToken,
-    KeywordToken,
-    Token;
-import '../tokens/token_constants.dart' as Tokens show
-    EOF_TOKEN;
+import '../string_validator.dart' show StringValidator;
+import '../tokens/keyword.dart' show Keyword;
+import '../tokens/precedence_constants.dart' as Precedence show BAD_INPUT_INFO;
+import '../tokens/token.dart'
+    show BeginGroupToken, ErrorToken, KeywordToken, Token;
+import '../tokens/token_constants.dart' as Tokens show EOF_TOKEN;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link,
-    LinkBuilder;
+import '../util/util.dart' show Link, LinkBuilder;
 
-import 'partial_elements.dart' show
-    PartialClassElement,
-    PartialElement,
-    PartialFieldList,
-    PartialFunctionElement,
-    PartialMetadataAnnotation,
-    PartialTypedefElement;
-import 'listener.dart' show
-    closeBraceFor,
-    Listener,
-    ParserError,
-    VERBOSE;
-
-typedef int IdGenerator();
+import 'partial_elements.dart'
+    show
+        PartialClassElement,
+        PartialElement,
+        PartialFieldList,
+        PartialFunctionElement,
+        PartialMetadataAnnotation,
+        PartialTypedefElement;
+import 'listener.dart' show closeBraceFor, Listener, ParserError, VERBOSE;
 
 /// Options used for scanning.
 ///
 /// Use this to conditionally support special tokens.
+///
+/// TODO(johnniwinther): This class should be renamed, it is not about options
+/// in the same sense as `CompilerOptions` or `DiagnosticOptions`.
 class ScannerOptions {
   /// If `true` the pseudo keyword `native` is supported.
   final bool canUseNative;
 
   const ScannerOptions({this.canUseNative: false});
+
+  ScannerOptions.from(Compiler compiler, LibraryElement libraryElement)
+      : canUseNative = compiler.backend.canLibraryUseNative(libraryElement);
 }
 
 /**
@@ -94,11 +86,8 @@
 
   bool suppressParseErrors = false;
 
-  ElementListener(
-      this.scannerOptions,
-      DiagnosticReporter reporter,
-      this.compilationUnitElement,
-      this.idGenerator)
+  ElementListener(this.scannerOptions, DiagnosticReporter reporter,
+      this.compilationUnitElement, this.idGenerator)
       : this.reporter = reporter,
         stringValidator = new StringValidator(reporter),
         interpolationScope = const Link<StringQuoting>();
@@ -121,8 +110,8 @@
     StringNode node = popNode();
     // TODO(lrn): Handle interpolations in script tags.
     if (node.isInterpolation) {
-      reporter.internalError(node,
-          "String interpolation not supported in library tags.");
+      reporter.internalError(
+          node, "String interpolation not supported in library tags.");
       return null;
     }
     return node;
@@ -133,17 +122,17 @@
     // in sourced files.
     LibraryElement library = compilationUnitElement.implementationLibrary;
     return !compilationUnitElement.hasMembers &&
-           library.entryCompilationUnit == compilationUnitElement;
+        library.entryCompilationUnit == compilationUnitElement;
   }
 
   void endLibraryName(Token libraryKeyword, Token semicolon) {
     Expression name = popNode();
-    addLibraryTag(new LibraryName(libraryKeyword, name,
-                                  popMetadata(compilationUnitElement)));
+    addLibraryTag(new LibraryName(
+        libraryKeyword, name, popMetadata(compilationUnitElement)));
   }
 
   void endImport(Token importKeyword, Token deferredKeyword, Token asKeyword,
-                 Token semicolon) {
+      Token semicolon) {
     NodeList combinators = popNode();
     bool isDeferred = deferredKeyword != null;
     Identifier prefix;
@@ -152,10 +141,9 @@
     }
     NodeList conditionalUris = popNode();
     StringNode uri = popLiteralString();
-    addLibraryTag(new Import(importKeyword, uri, conditionalUris,
-                             prefix, combinators,
-                             popMetadata(compilationUnitElement),
-                             isDeferred: isDeferred));
+    addLibraryTag(new Import(importKeyword, uri, conditionalUris, prefix,
+        combinators, popMetadata(compilationUnitElement),
+        isDeferred: isDeferred));
   }
 
   void endDottedName(int count, Token token) {
@@ -182,10 +170,10 @@
     NodeList names = makeNodeList(count, enumKeyword.next.next, endBrace, ",");
     Identifier name = popNode();
 
-    int id = idGenerator();
+    int id = idGenerator.getNextFreeId();
     Element enclosing = compilationUnitElement;
-    pushElement(new EnumClassElementX(name.source, enclosing, id,
-        new Enum(enumKeyword, name, names)));
+    pushElement(new EnumClassElementX(
+        name.source, enclosing, id, new Enum(enumKeyword, name, names)));
     rejectBuiltInIdentifier(name);
   }
 
@@ -194,7 +182,7 @@
     NodeList conditionalUris = popNode();
     StringNode uri = popNode();
     addLibraryTag(new Export(exportKeyword, uri, conditionalUris, combinators,
-                             popMetadata(compilationUnitElement)));
+        popMetadata(compilationUnitElement)));
   }
 
   void endCombinators(int count) {
@@ -224,14 +212,14 @@
 
   void endPart(Token partKeyword, Token semicolon) {
     StringNode uri = popLiteralString();
-    addLibraryTag(new Part(partKeyword, uri,
-                           popMetadata(compilationUnitElement)));
+    addLibraryTag(
+        new Part(partKeyword, uri, popMetadata(compilationUnitElement)));
   }
 
   void endPartOf(Token partKeyword, Token semicolon) {
     Expression name = popNode();
-    addPartOfTag(new PartOf(partKeyword, name,
-                            popMetadata(compilationUnitElement)));
+    addPartOfTag(
+        new PartOf(partKeyword, name, popMetadata(compilationUnitElement)));
   }
 
   void addPartOfTag(PartOf tag) {
@@ -248,20 +236,19 @@
 
   void endTopLevelDeclaration(Token token) {
     if (!metadata.isEmpty) {
-      recoverableError(metadata.first.beginToken,
-                       'Metadata not supported here.');
+      recoverableError(
+          metadata.first.beginToken, 'Metadata not supported here.');
       metadata.clear();
     }
   }
 
   void endClassDeclaration(int interfacesCount, Token beginToken,
-                           Token extendsKeyword, Token implementsKeyword,
-                           Token endToken) {
+      Token extendsKeyword, Token implementsKeyword, Token endToken) {
     makeNodeList(interfacesCount, implementsKeyword, null, ","); // interfaces
     popNode(); // superType
     popNode(); // typeParameters
     Identifier name = popNode();
-    int id = idGenerator();
+    int id = idGenerator.getNextFreeId();
     PartialClassElement element = new PartialClassElement(
         name.source, beginToken, endToken, compilationUnitElement, id);
     pushElement(element);
@@ -281,25 +268,28 @@
     popNode(); // TODO(karlklose): do not throw away typeVariables.
     Identifier name = popNode();
     popNode(); // returnType
-    pushElement(
-        new PartialTypedefElement(
-            name.source, compilationUnitElement, typedefKeyword, endToken));
+    pushElement(new PartialTypedefElement(
+        name.source, compilationUnitElement, typedefKeyword, endToken));
     rejectBuiltInIdentifier(name);
   }
 
-  void endNamedMixinApplication(Token classKeyword,
-                                Token implementsKeyword,
-                                Token endToken) {
+  void endNamedMixinApplication(
+      Token classKeyword, Token implementsKeyword, Token endToken) {
     NodeList interfaces = (implementsKeyword != null) ? popNode() : null;
     MixinApplication mixinApplication = popNode();
     Modifiers modifiers = popNode();
     NodeList typeParameters = popNode();
     Identifier name = popNode();
     NamedMixinApplication namedMixinApplication = new NamedMixinApplication(
-        name, typeParameters, modifiers, mixinApplication, interfaces,
-        classKeyword, endToken);
+        name,
+        typeParameters,
+        modifiers,
+        mixinApplication,
+        interfaces,
+        classKeyword,
+        endToken);
 
-    int id = idGenerator();
+    int id = idGenerator.getNextFreeId();
     Element enclosing = compilationUnitElement;
     pushElement(new NamedMixinApplicationElementX(
         name.source, enclosing, id, namedMixinApplication));
@@ -319,12 +309,12 @@
   void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
     bool hasParseError = currentMemberHasParseError;
     memberErrors = memberErrors.tail;
+    popNode(); // typeVariables
     Identifier name = popNode();
     popNode(); // type
     Modifiers modifiers = popNode();
-    PartialFunctionElement element = new PartialFunctionElement(
-        name.source, beginToken, getOrSet, endToken,
-        modifiers, compilationUnitElement);
+    PartialFunctionElement element = new PartialFunctionElement(name.source,
+        beginToken, getOrSet, endToken, modifiers, compilationUnitElement);
     element.hasParseError = hasParseError;
     pushElement(element);
   }
@@ -333,29 +323,28 @@
     bool hasParseError = currentMemberHasParseError;
     memberErrors = memberErrors.tail;
     void buildFieldElement(Identifier name, VariableList fields) {
-      pushElement(
-          new FieldElementX(name, compilationUnitElement, fields));
+      pushElement(new FieldElementX(name, compilationUnitElement, fields));
     }
     NodeList variables = makeNodeList(count, null, null, ",");
     popNode(); // type
     Modifiers modifiers = popNode();
     buildFieldElements(modifiers, variables, compilationUnitElement,
-                       buildFieldElement,
-                       beginToken, endToken, hasParseError);
+        buildFieldElement, beginToken, endToken, hasParseError);
   }
 
-  void buildFieldElements(Modifiers modifiers,
-                          NodeList variables,
-                          Element enclosingElement,
-                          void buildFieldElement(Identifier name,
-                                                 VariableList fields),
-                          Token beginToken, Token endToken,
-                          bool hasParseError) {
+  void buildFieldElements(
+      Modifiers modifiers,
+      NodeList variables,
+      Element enclosingElement,
+      void buildFieldElement(Identifier name, VariableList fields),
+      Token beginToken,
+      Token endToken,
+      bool hasParseError) {
     VariableList fields =
         new PartialFieldList(beginToken, endToken, modifiers, hasParseError);
     for (Link<Node> variableNodes = variables.nodes;
-         !variableNodes.isEmpty;
-         variableNodes = variableNodes.tail) {
+        !variableNodes.isEmpty;
+        variableNodes = variableNodes.tail) {
       Expression initializedIdentifier = variableNodes.head;
       Identifier identifier = initializedIdentifier.asIdentifier();
       if (identifier == null) {
@@ -390,7 +379,7 @@
     pushNode(makeNodeList(count, beginToken, endToken, ','));
   }
 
-  void handleNoTypeVariables(token) {
+  void handleNoTypeVariables(Token token) {
     pushNode(null);
   }
 
@@ -510,15 +499,13 @@
 
   Token expectedIdentifier(Token token) {
     if (token is KeywordToken) {
-      reportError(
-          token, MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD,
+      reportError(token, MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD,
           {'keyword': token.value});
     } else if (token is ErrorToken) {
       reportErrorToken(token);
       return synthesizeIdentifier(token);
     } else {
-      reportFatalError(token,
-          "Expected identifier, but got '${token.value}'.");
+      reportFatalError(token, "Expected identifier, but got '${token.value}'.");
     }
     return token;
   }
@@ -529,8 +516,7 @@
       reportErrorToken(token);
       return synthesizeIdentifier(token);
     } else {
-      reportFatalError(
-          token, "Expected a type, but got '${token.value}'.");
+      reportFatalError(token, "Expected a type, but got '${token.value}'.");
       return skipToEof(token);
     }
   }
@@ -541,8 +527,8 @@
       pushNode(new ErrorExpression(token));
       return token.next;
     } else {
-      reportFatalError(token,
-                       "Expected an expression, but got '${token.value}'.");
+      reportFatalError(
+          token, "Expected an expression, but got '${token.value}'.");
       pushNode(null);
       return skipToEof(token);
     }
@@ -574,8 +560,8 @@
       reportErrorToken(token);
     } else {
       String printString = token.value;
-      reportFatalError(token,
-                       "Expected a function body, but got '$printString'.");
+      reportFatalError(
+          token, "Expected a function body, but got '$printString'.");
     }
     return skipToEof(token);
   }
@@ -584,8 +570,8 @@
     if (token is ErrorToken) {
       reportErrorToken(token);
     } else {
-      reportFatalError(token,
-                       "Expected a class body, but got '${token.value}'.");
+      reportFatalError(
+          token, "Expected a class body, but got '${token.value}'.");
     }
     return skipToEof(token);
   }
@@ -598,8 +584,8 @@
     if (token is ErrorToken) {
       reportErrorToken(token);
     } else {
-      reportFatalError(token,
-                       "Expected a declaration, but got '${token.value}'.");
+      reportFatalError(
+          token, "Expected a declaration, but got '${token.value}'.");
     }
     return skipToEof(token);
   }
@@ -669,8 +655,8 @@
     print(message);
   }
 
-  NodeList makeNodeList(int count, Token beginToken, Token endToken,
-                        String delimiter) {
+  NodeList makeNodeList(
+      int count, Token beginToken, Token endToken, String delimiter) {
     Link<Node> poppedNodes = const Link<Node>();
     for (; count > 0; --count) {
       // This effectively reverses the order of nodes so they end up
@@ -698,17 +684,15 @@
   void endLiteralString(int count) {
     StringQuoting quoting = popQuoting();
 
-    Link<StringInterpolationPart> parts =
-        const Link<StringInterpolationPart>();
+    Link<StringInterpolationPart> parts = const Link<StringInterpolationPart>();
     // Parts of the string interpolation are popped in reverse order,
     // starting with the last literal string part.
     bool isLast = true;
     for (int i = 0; i < count; i++) {
       LiteralString string = popNode();
-      DartString validation =
-          stringValidator.validateInterpolationPart(string.token, quoting,
-                                                    isFirst: false,
-                                                    isLast: isLast);
+      DartString validation = stringValidator.validateInterpolationPart(
+          string.token, quoting,
+          isFirst: false, isLast: isLast);
       // Replace the unvalidated LiteralString with a new LiteralString
       // object that has the validation result included.
       string = new LiteralString(string.token, validation);
@@ -718,10 +702,9 @@
     }
 
     LiteralString string = popNode();
-    DartString validation =
-        stringValidator.validateInterpolationPart(string.token, quoting,
-                                                  isFirst: true,
-                                                  isLast: isLast);
+    DartString validation = stringValidator.validateInterpolationPart(
+        string.token, quoting,
+        isFirst: true, isLast: isLast);
     string = new LiteralString(string.token, validation);
     if (isLast) {
       pushNode(string);
@@ -775,9 +758,8 @@
     throw new ParserError(message);
   }
 
-  void reportError(Spannable spannable,
-                   MessageKind errorCode,
-                   [Map arguments = const {}]) {
+  void reportError(Spannable spannable, MessageKind errorCode,
+      [Map arguments = const {}]) {
     if (currentMemberHasParseError) return; // Error already reported.
     if (suppressParseErrors) return;
     if (!memberErrors.isEmpty) {
diff --git a/pkg/compiler/lib/src/parser/listener.dart b/pkg/compiler/lib/src/parser/listener.dart
index 618b86a..e1e4c3c 100644
--- a/pkg/compiler/lib/src/parser/listener.dart
+++ b/pkg/compiler/lib/src/parser/listener.dart
@@ -5,19 +5,18 @@
 library dart2js.parser.listener;
 
 import '../common.dart';
-import '../diagnostics/messages.dart' show
-    MessageTemplate;
-import '../tokens/precedence_constants.dart' as Precedence show
-    EOF_INFO,
-    IDENTIFIER_INFO;
-import '../tokens/token.dart' show
-    BadInputToken,
-    BeginGroupToken,
-    ErrorToken,
-    StringToken,
-    Token,
-    UnmatchedToken,
-    UnterminatedToken;
+import '../diagnostics/messages.dart' show MessageTemplate;
+import '../tokens/precedence_constants.dart' as Precedence
+    show EOF_INFO, IDENTIFIER_INFO;
+import '../tokens/token.dart'
+    show
+        BadInputToken,
+        BeginGroupToken,
+        ErrorToken,
+        StringToken,
+        Token,
+        UnmatchedToken,
+        UnterminatedToken;
 import '../tree/tree.dart';
 
 const bool VERBOSE = false;
@@ -27,582 +26,404 @@
  * on parser errors.
  */
 class Listener {
-  set suppressParseErrors(bool value) {
-  }
+  set suppressParseErrors(bool value) {}
 
-  void beginArguments(Token token) {
-  }
+  void beginArguments(Token token) {}
 
-  void endArguments(int count, Token beginToken, Token endToken) {
-  }
+  void endArguments(int count, Token beginToken, Token endToken) {}
 
   /// Handle async modifiers `async`, `async*`, `sync`.
-  void handleAsyncModifier(Token asyncToken, Token startToken) {
-  }
+  void handleAsyncModifier(Token asyncToken, Token startToken) {}
 
-  void beginAwaitExpression(Token token) {
-  }
+  void beginAwaitExpression(Token token) {}
 
-  void endAwaitExpression(Token beginToken, Token endToken) {
-  }
+  void endAwaitExpression(Token beginToken, Token endToken) {}
 
-  void beginBlock(Token token) {
-  }
+  void beginBlock(Token token) {}
 
-  void endBlock(int count, Token beginToken, Token endToken) {
-  }
+  void endBlock(int count, Token beginToken, Token endToken) {}
 
-  void beginCascade(Token token) {
-  }
+  void beginCascade(Token token) {}
 
-  void endCascade() {
-  }
+  void endCascade() {}
 
-  void beginClassBody(Token token) {
-  }
+  void beginClassBody(Token token) {}
 
-  void endClassBody(int memberCount, Token beginToken, Token endToken) {
-  }
+  void endClassBody(int memberCount, Token beginToken, Token endToken) {}
 
-  void beginClassDeclaration(Token token) {
-  }
+  void beginClassDeclaration(Token token) {}
 
   void endClassDeclaration(int interfacesCount, Token beginToken,
-                           Token extendsKeyword, Token implementsKeyword,
-                           Token endToken) {
-  }
+      Token extendsKeyword, Token implementsKeyword, Token endToken) {}
 
-  void beginCombinators(Token token) {
-  }
+  void beginCombinators(Token token) {}
 
-  void endCombinators(int count) {
-  }
+  void endCombinators(int count) {}
 
-  void beginCompilationUnit(Token token) {
-  }
+  void beginCompilationUnit(Token token) {}
 
-  void endCompilationUnit(int count, Token token) {
-  }
+  void endCompilationUnit(int count, Token token) {}
 
-  void beginConstructorReference(Token start) {
-  }
+  void beginConstructorReference(Token start) {}
 
-  void endConstructorReference(Token start, Token periodBeforeName,
-                               Token endToken) {
-  }
+  void endConstructorReference(
+      Token start, Token periodBeforeName, Token endToken) {}
 
-  void beginDoWhileStatement(Token token) {
-  }
+  void beginDoWhileStatement(Token token) {}
 
-  void endDoWhileStatement(Token doKeyword, Token whileKeyword,
-                           Token endToken) {
-  }
+  void endDoWhileStatement(
+      Token doKeyword, Token whileKeyword, Token endToken) {}
 
-  void beginEnum(Token enumKeyword) {
-  }
+  void beginEnum(Token enumKeyword) {}
 
-  void endEnum(Token enumKeyword, Token endBrace, int count) {
-  }
+  void endEnum(Token enumKeyword, Token endBrace, int count) {}
 
-  void beginExport(Token token) {
-  }
+  void beginExport(Token token) {}
 
-  void endExport(Token exportKeyword, Token semicolon) {
-  }
+  void endExport(Token exportKeyword, Token semicolon) {}
 
-  void beginExpressionStatement(Token token) {
-  }
+  void beginExpressionStatement(Token token) {}
 
-  void endExpressionStatement(Token token) {
-  }
+  void endExpressionStatement(Token token) {}
 
-  void beginFactoryMethod(Token token) {
-  }
+  void beginFactoryMethod(Token token) {}
 
-  void endFactoryMethod(Token beginToken, Token endToken) {
-  }
+  void endFactoryMethod(Token beginToken, Token endToken) {}
 
-  void beginFormalParameter(Token token) {
-  }
+  void beginFormalParameter(Token token) {}
 
-  void endFormalParameter(Token thisKeyword) {
-  }
+  void endFormalParameter(Token thisKeyword) {}
 
-  void handleNoFormalParameters(Token token) {
-  }
+  void handleNoFormalParameters(Token token) {}
 
-  void beginFormalParameters(Token token) {
-  }
+  void beginFormalParameters(Token token) {}
 
-  void endFormalParameters(int count, Token beginToken, Token endToken) {
-  }
+  void endFormalParameters(int count, Token beginToken, Token endToken) {}
 
-  void endFields(int count, Token beginToken, Token endToken) {
-  }
+  void endFields(int count, Token beginToken, Token endToken) {}
 
-  void beginForStatement(Token token) {
-  }
+  void beginForStatement(Token token) {}
 
-  void endForStatement(int updateExpressionCount,
-                       Token beginToken, Token endToken) {
-  }
+  void endForStatement(
+      int updateExpressionCount, Token beginToken, Token endToken) {}
 
-  void endForIn(Token awaitToken, Token forToken,
-                Token inKeyword, Token endToken) {
-  }
+  void endForIn(
+      Token awaitToken, Token forToken, Token inKeyword, Token endToken) {}
 
-  void beginFunction(Token token) {
-  }
+  void beginFunction(Token token) {}
 
-  void endFunction(Token getOrSet, Token endToken) {
-  }
+  void endFunction(Token getOrSet, Token endToken) {}
 
-  void beginFunctionDeclaration(Token token) {
-  }
+  void beginFunctionDeclaration(Token token) {}
 
-  void endFunctionDeclaration(Token token) {
-  }
+  void endFunctionDeclaration(Token token) {}
 
-  void beginFunctionBody(Token token) {
-  }
+  void beginFunctionBody(Token token) {}
 
-  void endFunctionBody(int count, Token beginToken, Token endToken) {
-  }
+  void endFunctionBody(int count, Token beginToken, Token endToken) {}
 
-  void handleNoFunctionBody(Token token) {
-  }
+  void handleNoFunctionBody(Token token) {}
 
-  void skippedFunctionBody(Token token) {
-  }
+  void skippedFunctionBody(Token token) {}
 
-  void beginFunctionName(Token token) {
-  }
+  void beginFunctionName(Token token) {}
 
-  void endFunctionName(Token token) {
-  }
+  void endFunctionName(Token token) {}
 
-  void beginFunctionTypeAlias(Token token) {
-  }
+  void beginFunctionTypeAlias(Token token) {}
 
-  void endFunctionTypeAlias(Token typedefKeyword, Token endToken) {
-  }
+  void endFunctionTypeAlias(Token typedefKeyword, Token endToken) {}
 
-  void beginMixinApplication(Token token) {
-  }
+  void beginMixinApplication(Token token) {}
 
-  void endMixinApplication() {
-  }
+  void endMixinApplication() {}
 
-  void beginNamedMixinApplication(Token token) {
-  }
+  void beginNamedMixinApplication(Token token) {}
 
-  void endNamedMixinApplication(Token classKeyword,
-                                Token implementsKeyword,
-                                Token endToken) {
-  }
+  void endNamedMixinApplication(
+      Token classKeyword, Token implementsKeyword, Token endToken) {}
 
-  void beginHide(Token hideKeyword) {
-  }
+  void beginHide(Token hideKeyword) {}
 
-  void endHide(Token hideKeyword) {
-  }
+  void endHide(Token hideKeyword) {}
 
-  void beginIdentifierList(Token token) {
-  }
+  void beginIdentifierList(Token token) {}
 
-  void endIdentifierList(int count) {
-  }
+  void endIdentifierList(int count) {}
 
-  void beginTypeList(Token token) {
-  }
+  void beginTypeList(Token token) {}
 
-  void endTypeList(int count) {
-  }
+  void endTypeList(int count) {}
 
-  void beginIfStatement(Token token) {
-  }
+  void beginIfStatement(Token token) {}
 
-  void endIfStatement(Token ifToken, Token elseToken) {
-  }
+  void endIfStatement(Token ifToken, Token elseToken) {}
 
-  void beginImport(Token importKeyword) {
-  }
+  void beginImport(Token importKeyword) {}
 
-  void endImport(Token importKeyword, Token DeferredKeyword,
-                 Token asKeyword, Token semicolon) {
-  }
+  void endImport(Token importKeyword, Token DeferredKeyword, Token asKeyword,
+      Token semicolon) {}
 
-  void beginConditionalUris(Token token) {
-  }
+  void beginConditionalUris(Token token) {}
 
-  void endConditionalUris(int count) {
-  }
+  void endConditionalUris(int count) {}
 
-  void beginConditionalUri(Token ifKeyword) {
-  }
+  void beginConditionalUri(Token ifKeyword) {}
 
-  void endConditionalUri(Token ifKeyword, Token equalitySign) {
-  }
+  void endConditionalUri(Token ifKeyword, Token equalitySign) {}
 
-  void beginDottedName(Token token) {
-  }
+  void beginDottedName(Token token) {}
 
-  void endDottedName(int count, Token firstIdentifier) {
-  }
+  void endDottedName(int count, Token firstIdentifier) {}
 
-  void beginInitializedIdentifier(Token token) {
-  }
+  void beginInitializedIdentifier(Token token) {}
 
-  void endInitializedIdentifier() {
-  }
+  void endInitializedIdentifier() {}
 
-  void beginInitializer(Token token) {
-  }
+  void beginInitializer(Token token) {}
 
-  void endInitializer(Token assignmentOperator) {
-  }
+  void endInitializer(Token assignmentOperator) {}
 
-  void beginInitializers(Token token) {
-  }
+  void beginInitializers(Token token) {}
 
-  void endInitializers(int count, Token beginToken, Token endToken) {
-  }
+  void endInitializers(int count, Token beginToken, Token endToken) {}
 
-  void handleNoInitializers() {
-  }
+  void handleNoInitializers() {}
 
-  void handleLabel(Token token) {
-  }
+  void handleLabel(Token token) {}
 
-  void beginLabeledStatement(Token token, int labelCount) {
-  }
+  void beginLabeledStatement(Token token, int labelCount) {}
 
-  void endLabeledStatement(int labelCount) {
-  }
+  void endLabeledStatement(int labelCount) {}
 
-  void beginLibraryName(Token token) {
-  }
+  void beginLibraryName(Token token) {}
 
-  void endLibraryName(Token libraryKeyword, Token semicolon) {
-  }
+  void endLibraryName(Token libraryKeyword, Token semicolon) {}
 
-  void beginLiteralMapEntry(Token token) {
-  }
+  void beginLiteralMapEntry(Token token) {}
 
-  void endLiteralMapEntry(Token colon, Token endToken) {
-  }
+  void endLiteralMapEntry(Token colon, Token endToken) {}
 
-  void beginLiteralString(Token token) {
-  }
+  void beginLiteralString(Token token) {}
 
-  void endLiteralString(int interpolationCount) {
-  }
+  void endLiteralString(int interpolationCount) {}
 
-  void handleStringJuxtaposition(int literalCount) {
-  }
+  void handleStringJuxtaposition(int literalCount) {}
 
-  void beginMember(Token token) {
-  }
+  void beginMember(Token token) {}
 
-  void endMethod(Token getOrSet, Token beginToken, Token endToken) {
-  }
+  void endMethod(Token getOrSet, Token beginToken, Token endToken) {}
 
-  void beginMetadataStar(Token token) {
-  }
+  void beginMetadataStar(Token token) {}
 
-  void endMetadataStar(int count, bool forParameter) {
-  }
+  void endMetadataStar(int count, bool forParameter) {}
 
-  void beginMetadata(Token token) {
-  }
+  void beginMetadata(Token token) {}
 
-  void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
-  }
+  void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {}
 
-  void beginOptionalFormalParameters(Token token) {
-  }
+  void beginOptionalFormalParameters(Token token) {}
 
-  void endOptionalFormalParameters(int count,
-                                   Token beginToken, Token endToken) {
-  }
+  void endOptionalFormalParameters(
+      int count, Token beginToken, Token endToken) {}
 
-  void beginPart(Token token) {
-  }
+  void beginPart(Token token) {}
 
-  void endPart(Token partKeyword, Token semicolon) {
-  }
+  void endPart(Token partKeyword, Token semicolon) {}
 
-  void beginPartOf(Token token) {
-  }
+  void beginPartOf(Token token) {}
 
-  void endPartOf(Token partKeyword, Token semicolon) {
-  }
+  void endPartOf(Token partKeyword, Token semicolon) {}
 
-  void beginRedirectingFactoryBody(Token token) {
-  }
+  void beginRedirectingFactoryBody(Token token) {}
 
-  void endRedirectingFactoryBody(Token beginToken, Token endToken) {
-  }
+  void endRedirectingFactoryBody(Token beginToken, Token endToken) {}
 
-  void beginReturnStatement(Token token) {
-  }
+  void beginReturnStatement(Token token) {}
 
-  void endReturnStatement(bool hasExpression,
-                          Token beginToken, Token endToken) {
-  }
+  void endReturnStatement(
+      bool hasExpression, Token beginToken, Token endToken) {}
 
-  void beginSend(Token token) {
-  }
+  void beginSend(Token token) {}
 
-  void endSend(Token token) {
-  }
+  void endSend(Token token) {}
 
-  void beginShow(Token showKeyword) {
-  }
+  void beginShow(Token showKeyword) {}
 
-  void endShow(Token showKeyword) {
-  }
+  void endShow(Token showKeyword) {}
 
-  void beginSwitchStatement(Token token) {
-  }
+  void beginSwitchStatement(Token token) {}
 
-  void endSwitchStatement(Token switchKeyword, Token endToken) {
-  }
+  void endSwitchStatement(Token switchKeyword, Token endToken) {}
 
-  void beginSwitchBlock(Token token) {
-  }
+  void beginSwitchBlock(Token token) {}
 
-  void endSwitchBlock(int caseCount, Token beginToken, Token endToken) {
-  }
+  void endSwitchBlock(int caseCount, Token beginToken, Token endToken) {}
 
-  void beginLiteralSymbol(Token token) {
-  }
+  void beginLiteralSymbol(Token token) {}
 
-  void endLiteralSymbol(Token hashToken, int identifierCount) {
-  }
+  void endLiteralSymbol(Token hashToken, int identifierCount) {}
 
-  void beginThrowExpression(Token token) {
-  }
+  void beginThrowExpression(Token token) {}
 
-  void endThrowExpression(Token throwToken, Token endToken) {
-  }
+  void endThrowExpression(Token throwToken, Token endToken) {}
 
-  void beginRethrowStatement(Token token) {
-  }
+  void beginRethrowStatement(Token token) {}
 
-  void endRethrowStatement(Token throwToken, Token endToken) {
-  }
+  void endRethrowStatement(Token throwToken, Token endToken) {}
 
-  void endTopLevelDeclaration(Token token) {
-  }
+  void endTopLevelDeclaration(Token token) {}
 
-  void beginTopLevelMember(Token token) {
-  }
+  void beginTopLevelMember(Token token) {}
 
-  void endTopLevelFields(int count, Token beginToken, Token endToken) {
-  }
+  void endTopLevelFields(int count, Token beginToken, Token endToken) {}
 
-  void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
-  }
+  void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {}
 
-  void beginTryStatement(Token token) {
-  }
+  void beginTryStatement(Token token) {}
 
-  void handleCaseMatch(Token caseKeyword, Token colon) {
-  }
+  void handleCaseMatch(Token caseKeyword, Token colon) {}
 
-  void handleCatchBlock(Token onKeyword, Token catchKeyword) {
-  }
+  void handleCatchBlock(Token onKeyword, Token catchKeyword) {}
 
-  void handleFinallyBlock(Token finallyKeyword) {
-  }
+  void handleFinallyBlock(Token finallyKeyword) {}
 
-  void endTryStatement(int catchCount, Token tryKeyword, Token finallyKeyword) {
-  }
+  void endTryStatement(
+      int catchCount, Token tryKeyword, Token finallyKeyword) {}
 
-  void endType(Token beginToken, Token endToken) {
-  }
+  void endType(Token beginToken, Token endToken) {}
 
-  void beginTypeArguments(Token token) {
-  }
+  void beginTypeArguments(Token token) {}
 
-  void endTypeArguments(int count, Token beginToken, Token endToken) {
-  }
+  void endTypeArguments(int count, Token beginToken, Token endToken) {}
 
-  void handleNoTypeArguments(Token token) {
-  }
+  void handleNoTypeArguments(Token token) {}
 
-  void beginTypeVariable(Token token) {
-  }
+  void beginTypeVariable(Token token) {}
 
-  void endTypeVariable(Token token) {
-  }
+  void endTypeVariable(Token token) {}
 
-  void beginTypeVariables(Token token) {
-  }
+  void beginTypeVariables(Token token) {}
 
-  void endTypeVariables(int count, Token beginToken, Token endToken) {
-  }
+  void endTypeVariables(int count, Token beginToken, Token endToken) {}
 
-  void beginUnnamedFunction(Token token) {
-  }
+  void beginUnnamedFunction(Token token) {}
 
-  void endUnnamedFunction(Token token) {
-  }
+  void endUnnamedFunction(Token token) {}
 
-  void beginVariablesDeclaration(Token token) {
-  }
+  void beginVariablesDeclaration(Token token) {}
 
-  void endVariablesDeclaration(int count, Token endToken) {
-  }
+  void endVariablesDeclaration(int count, Token endToken) {}
 
-  void beginWhileStatement(Token token) {
-  }
+  void beginWhileStatement(Token token) {}
 
-  void endWhileStatement(Token whileKeyword, Token endToken) {
-  }
+  void endWhileStatement(Token whileKeyword, Token endToken) {}
 
   void handleAsOperator(Token operathor, Token endToken) {
     // TODO(ahe): Rename [operathor] to "operator" when VM bug is fixed.
   }
 
-  void handleAssignmentExpression(Token token) {
-  }
+  void handleAssignmentExpression(Token token) {}
 
-  void handleBinaryExpression(Token token) {
-  }
+  void handleBinaryExpression(Token token) {}
 
-  void handleConditionalExpression(Token question, Token colon) {
-  }
+  void handleConditionalExpression(Token question, Token colon) {}
 
-  void handleConstExpression(Token token) {
-  }
+  void handleConstExpression(Token token) {}
 
-  void handleFunctionTypedFormalParameter(Token token) {
-  }
+  void handleFunctionTypedFormalParameter(Token token) {}
 
-  void handleIdentifier(Token token) {
-  }
+  void handleIdentifier(Token token) {}
 
-  void handleIndexedExpression(Token openCurlyBracket,
-                               Token closeCurlyBracket) {
-  }
+  void handleIndexedExpression(
+      Token openCurlyBracket, Token closeCurlyBracket) {}
 
   void handleIsOperator(Token operathor, Token not, Token endToken) {
     // TODO(ahe): Rename [operathor] to "operator" when VM bug is fixed.
   }
 
-  void handleLiteralBool(Token token) {
-  }
+  void handleLiteralBool(Token token) {}
 
-  void handleBreakStatement(bool hasTarget,
-                            Token breakKeyword, Token endToken) {
-  }
+  void handleBreakStatement(
+      bool hasTarget, Token breakKeyword, Token endToken) {}
 
-  void handleContinueStatement(bool hasTarget,
-                               Token continueKeyword, Token endToken) {
-  }
+  void handleContinueStatement(
+      bool hasTarget, Token continueKeyword, Token endToken) {}
 
-  void handleEmptyStatement(Token token) {
-  }
+  void handleEmptyStatement(Token token) {}
 
-  void handleAssertStatement(Token assertKeyword,
-                             Token commaToken, Token semicolonToken) {
-  }
+  void handleAssertStatement(
+      Token assertKeyword, Token commaToken, Token semicolonToken) {}
 
   /** Called with either the token containing a double literal, or
     * an immediately preceding "unary plus" token.
     */
-  void handleLiteralDouble(Token token) {
-  }
+  void handleLiteralDouble(Token token) {}
 
   /** Called with either the token containing an integer literal,
     * or an immediately preceding "unary plus" token.
     */
-  void handleLiteralInt(Token token) {
-  }
+  void handleLiteralInt(Token token) {}
 
-  void handleLiteralList(int count, Token beginToken, Token constKeyword,
-                         Token endToken) {
-  }
+  void handleLiteralList(
+      int count, Token beginToken, Token constKeyword, Token endToken) {}
 
-  void handleLiteralMap(int count, Token beginToken, Token constKeyword,
-                        Token endToken) {
-  }
+  void handleLiteralMap(
+      int count, Token beginToken, Token constKeyword, Token endToken) {}
 
-  void handleLiteralNull(Token token) {
-  }
+  void handleLiteralNull(Token token) {}
 
-  void handleModifier(Token token) {
-  }
+  void handleModifier(Token token) {}
 
-  void handleModifiers(int count) {
-  }
+  void handleModifiers(int count) {}
 
-  void handleNamedArgument(Token colon) {
-  }
+  void handleNamedArgument(Token colon) {}
 
-  void handleNewExpression(Token token) {
-  }
+  void handleNewExpression(Token token) {}
 
-  void handleNoArguments(Token token) {
-  }
+  void handleNoArguments(Token token) {}
 
-  void handleNoExpression(Token token) {
-  }
+  void handleNoExpression(Token token) {}
 
-  void handleNoType(Token token) {
-  }
+  void handleNoType(Token token) {}
 
-  void handleNoTypeVariables(Token token) {
-  }
+  void handleNoTypeVariables(Token token) {}
 
-  void handleOperator(Token token) {
-  }
+  void handleOperator(Token token) {}
 
-  void handleOperatorName(Token operatorKeyword, Token token) {
-  }
+  void handleOperatorName(Token operatorKeyword, Token token) {}
 
-  void handleParenthesizedExpression(BeginGroupToken token) {
-  }
+  void handleParenthesizedExpression(BeginGroupToken token) {}
 
-  void handleQualified(Token period) {
-  }
+  void handleQualified(Token period) {}
 
-  void handleStringPart(Token token) {
-  }
+  void handleStringPart(Token token) {}
 
-  void handleSuperExpression(Token token) {
-  }
+  void handleSuperExpression(Token token) {}
 
-  void handleSwitchCase(int labelCount, int expressionCount,
-                        Token defaultKeyword, int statementCount,
-                        Token firstToken, Token endToken) {
-  }
+  void handleSwitchCase(
+      int labelCount,
+      int expressionCount,
+      Token defaultKeyword,
+      int statementCount,
+      Token firstToken,
+      Token endToken) {}
 
-  void handleThisExpression(Token token) {
-  }
+  void handleThisExpression(Token token) {}
 
-  void handleUnaryPostfixAssignmentExpression(Token token) {
-  }
+  void handleUnaryPostfixAssignmentExpression(Token token) {}
 
-  void handleUnaryPrefixExpression(Token token) {
-  }
+  void handleUnaryPrefixExpression(Token token) {}
 
-  void handleUnaryPrefixAssignmentExpression(Token token) {
-  }
+  void handleUnaryPrefixAssignmentExpression(Token token) {}
 
-  void handleValuedFormalParameter(Token equals, Token token) {
-  }
+  void handleValuedFormalParameter(Token equals, Token token) {}
 
-  void handleVoidKeyword(Token token) {
-  }
+  void handleVoidKeyword(Token token) {}
 
-  void beginYieldStatement(Token token) {
-  }
+  void beginYieldStatement(Token token) {}
 
-  void endYieldStatement(Token yieldToken, Token starToken, Token endToken) {
-  }
+  void endYieldStatement(Token yieldToken, Token starToken, Token endToken) {}
 
   Token expected(String string, Token token) {
     if (token is ErrorToken) {
@@ -614,9 +435,8 @@
   }
 
   Token synthesizeIdentifier(Token token) {
-    Token synthesizedToken =
-        new StringToken.fromString(
-            Precedence.IDENTIFIER_INFO, '?', token.charOffset);
+    Token synthesizedToken = new StringToken.fromString(
+        Precedence.IDENTIFIER_INFO, '?', token.charOffset);
     synthesizedToken.next = token.next;
     return synthesizedToken;
   }
@@ -726,9 +546,8 @@
     throw new ParserError("$message @ ${token.charOffset}");
   }
 
-  void reportError(Spannable spannable,
-                   MessageKind messageKind,
-                   [Map arguments = const {}]) {
+  void reportError(Spannable spannable, MessageKind messageKind,
+      [Map arguments = const {}]) {
     MessageTemplate template = MessageTemplate.TEMPLATES[messageKind];
     String message = template.message(arguments, true).toString();
     Token token;
@@ -795,13 +614,7 @@
 }
 
 String closeBraceFor(String openBrace) {
-  return const {
-    '(': ')',
-    '[': ']',
-    '{': '}',
-    '<': '>',
-    r'${': '}',
-  }[openBrace];
+  return const {'(': ')', '[': ']', '{': '}', '<': '>', r'${': '}',}[openBrace];
 }
 
 class ParserError {
diff --git a/pkg/compiler/lib/src/parser/member_listener.dart b/pkg/compiler/lib/src/parser/member_listener.dart
index 0399d71..a13024c 100644
--- a/pkg/compiler/lib/src/parser/member_listener.dart
+++ b/pkg/compiler/lib/src/parser/member_listener.dart
@@ -5,41 +5,31 @@
 library dart2js.parser.member_listener;
 
 import '../common.dart';
-import '../elements/elements.dart' show
-    Element,
-    ElementKind,
-    Elements,
-    MetadataAnnotation;
-import '../elements/modelx.dart' show
-    ClassElementX,
-    ElementX,
-    FieldElementX,
-    VariableList;
-import '../tokens/token.dart' show
-    Token;
+import '../elements/elements.dart'
+    show Element, ElementKind, Elements, MetadataAnnotation;
+import '../elements/modelx.dart'
+    show ClassElementX, ElementX, FieldElementX, VariableList;
+import '../tokens/token.dart' show Token;
 import '../tree/tree.dart';
 
-import 'element_listener.dart' show
-    ScannerOptions;
-import 'node_listener.dart' show
-    NodeListener;
-import 'partial_elements.dart' show
-    PartialConstructorElement,
-    PartialFunctionElement,
-    PartialMetadataAnnotation;
+import 'element_listener.dart' show ScannerOptions;
+import 'node_listener.dart' show NodeListener;
+import 'partial_elements.dart'
+    show
+        PartialConstructorElement,
+        PartialFunctionElement,
+        PartialMetadataAnnotation;
 
 class MemberListener extends NodeListener {
   final ClassElementX enclosingClass;
 
-  MemberListener(ScannerOptions scannerOptions,
-                 DiagnosticReporter listener,
-                 ClassElementX enclosingElement)
+  MemberListener(ScannerOptions scannerOptions, DiagnosticReporter listener,
+      ClassElementX enclosingElement)
       : this.enclosingClass = enclosingElement,
         super(scannerOptions, listener, enclosingElement.compilationUnit);
 
   bool isConstructorName(Node nameNode) {
-    if (enclosingClass == null ||
-        enclosingClass.kind != ElementKind.CLASS) {
+    if (enclosingClass == null || enclosingClass.kind != ElementKind.CLASS) {
       return false;
     }
     String name;
@@ -90,15 +80,12 @@
       if (getOrSet != null) {
         recoverableError(getOrSet, 'illegal modifier');
       }
-      memberElement = new PartialConstructorElement(
-          name, beginToken, endToken,
-          ElementKind.GENERATIVE_CONSTRUCTOR,
-          method.modifiers,
-          enclosingClass);
+      memberElement = new PartialConstructorElement(name, beginToken, endToken,
+          ElementKind.GENERATIVE_CONSTRUCTOR, method.modifiers, enclosingClass);
     } else {
-      memberElement = new PartialFunctionElement(
-          name, beginToken, getOrSet, endToken,
-          method.modifiers, enclosingClass, hasBody: method.hasBody());
+      memberElement = new PartialFunctionElement(name, beginToken, getOrSet,
+          endToken, method.modifiers, enclosingClass,
+          hasBody: method.hasBody);
     }
     addMember(memberElement);
   }
@@ -118,7 +105,9 @@
       }
     }
     Element memberElement = new PartialConstructorElement(
-        name, beginToken, endToken,
+        name,
+        beginToken,
+        endToken,
         ElementKind.FACTORY_CONSTRUCTOR,
         method.modifiers,
         enclosingClass);
@@ -132,19 +121,16 @@
     Modifiers modifiers = variableDefinitions.modifiers;
     pushNode(null);
     void buildFieldElement(Identifier name, VariableList fields) {
-      Element element =
-          new FieldElementX(name, enclosingClass, fields);
+      Element element = new FieldElementX(name, enclosingClass, fields);
       addMember(element);
     }
     buildFieldElements(modifiers, variableDefinitions.definitions,
-                       enclosingClass,
-                       buildFieldElement, beginToken, endToken,
-                       hasParseError);
+        enclosingClass, buildFieldElement, beginToken, endToken, hasParseError);
   }
 
   void endInitializer(Token assignmentOperator) {
     pushNode(null); // Super expects an expression, but
-                    // ClassElementParser just skips expressions.
+    // ClassElementParser just skips expressions.
     super.endInitializer(assignmentOperator);
   }
 
diff --git a/pkg/compiler/lib/src/parser/node_listener.dart b/pkg/compiler/lib/src/parser/node_listener.dart
index b5f1db2..df288b6 100644
--- a/pkg/compiler/lib/src/parser/node_listener.dart
+++ b/pkg/compiler/lib/src/parser/node_listener.dart
@@ -5,33 +5,21 @@
 library dart2js.parser.node_listener;
 
 import '../common.dart';
-import '../elements/elements.dart' show
-    CompilationUnitElement;
+import '../elements/elements.dart' show CompilationUnitElement;
 import '../native/native.dart' as native;
-import '../tokens/precedence_constants.dart' as Precedence show
-    BAD_INPUT_INFO,
-    EOF_INFO,
-    INDEX_INFO;
-import '../tokens/token.dart' show
-    ErrorToken,
-    StringToken,
-    Token;
+import '../tokens/precedence_constants.dart' as Precedence
+    show BAD_INPUT_INFO, EOF_INFO, INDEX_INFO;
+import '../tokens/token.dart' show ErrorToken, StringToken, Token;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link;
+import '../util/util.dart' show Link;
 
-import 'element_listener.dart' show
-    ElementListener,
-    ScannerOptions;
-import 'partial_elements.dart' show
-    PartialFunctionElement;
+import 'element_listener.dart' show ElementListener, ScannerOptions;
+import 'partial_elements.dart' show PartialFunctionElement;
 
 class NodeListener extends ElementListener {
-  NodeListener(
-      ScannerOptions scannerOptions,
-      DiagnosticReporter reporter,
+  NodeListener(ScannerOptions scannerOptions, DiagnosticReporter reporter,
       CompilationUnitElement element)
-    : super(scannerOptions, reporter, element, null);
+      : super(scannerOptions, reporter, element, null);
 
   void addLibraryTag(LibraryTag tag) {
     pushNode(tag);
@@ -42,8 +30,7 @@
   }
 
   void endClassDeclaration(int interfacesCount, Token beginToken,
-                           Token extendsKeyword, Token implementsKeyword,
-                           Token endToken) {
+      Token extendsKeyword, Token implementsKeyword, Token endToken) {
     NodeList body = popNode();
     NodeList interfaces =
         makeNodeList(interfacesCount, implementsKeyword, null, ",");
@@ -52,8 +39,7 @@
     Identifier name = popNode();
     Modifiers modifiers = popNode();
     pushNode(new ClassNode(modifiers, name, typeParameters, supertype,
-                           interfaces, beginToken, extendsKeyword, body,
-                           endToken));
+        interfaces, beginToken, extendsKeyword, body, endToken));
   }
 
   void endCompilationUnit(int count, Token token) {
@@ -65,22 +51,19 @@
     NodeList typeParameters = popNode();
     Identifier name = popNode();
     TypeAnnotation returnType = popNode();
-    pushNode(new Typedef(returnType, name, typeParameters, formals,
-                         typedefKeyword, endToken));
+    pushNode(new Typedef(
+        returnType, name, typeParameters, formals, typedefKeyword, endToken));
   }
 
-  void endNamedMixinApplication(Token classKeyword,
-                                Token implementsKeyword,
-                                Token endToken) {
+  void endNamedMixinApplication(
+      Token classKeyword, Token implementsKeyword, Token endToken) {
     NodeList interfaces = (implementsKeyword != null) ? popNode() : null;
     Node mixinApplication = popNode();
     Modifiers modifiers = popNode();
     NodeList typeParameters = popNode();
     Identifier name = popNode();
-    pushNode(new NamedMixinApplication(name, typeParameters,
-                                       modifiers, mixinApplication,
-                                       interfaces,
-                                       classKeyword, endToken));
+    pushNode(new NamedMixinApplication(name, typeParameters, modifiers,
+        mixinApplication, interfaces, classKeyword, endToken));
   }
 
   void endEnum(Token enumKeyword, Token endBrace, int count) {
@@ -103,12 +86,12 @@
   void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
     popNode(); // body
     popNode(); // formalParameters
+    popNode(); // typeVariables
     Identifier name = popNode();
     popNode(); // type
     Modifiers modifiers = popNode();
-    PartialFunctionElement element = new PartialFunctionElement(
-        name.source, beginToken, getOrSet, endToken,
-        modifiers, compilationUnitElement);
+    PartialFunctionElement element = new PartialFunctionElement(name.source,
+        beginToken, getOrSet, endToken, modifiers, compilationUnitElement);
     pushElement(element);
   }
 
@@ -145,8 +128,8 @@
     pushNode(null);
   }
 
-  void endConstructorReference(Token start, Token periodBeforeName,
-                               Token endToken) {
+  void endConstructorReference(
+      Token start, Token periodBeforeName, Token endToken) {
     Identifier name = null;
     if (periodBeforeName != null) {
       name = popNode();
@@ -176,13 +159,12 @@
     pushNode(constructor);
   }
 
-  void endRedirectingFactoryBody(Token beginToken,
-                                 Token endToken) {
+  void endRedirectingFactoryBody(Token beginToken, Token endToken) {
     pushNode(new RedirectingFactoryBody(beginToken, endToken, popNode()));
   }
 
-  void endReturnStatement(bool hasExpression,
-                          Token beginToken, Token endToken) {
+  void endReturnStatement(
+      bool hasExpression, Token beginToken, Token endToken) {
     Expression expression = hasExpression ? popNode() : null;
     pushNode(new Return(beginToken, endToken, expression));
   }
@@ -207,8 +189,8 @@
       pushNode(null);
       reportErrorToken(token);
     } else {
-      reportFatalError(token,
-                       "Expected a function body, but got '${token.value}'.");
+      reportFatalError(
+          token, "Expected a function body, but got '${token.value}'.");
     }
     return skipToEof(token);
   }
@@ -218,8 +200,8 @@
       reportErrorToken(token);
       return skipToEof(token);
     } else {
-      reportFatalError(token,
-                       "Expected a class body, but got '${token.value}'.");
+      reportFatalError(
+          token, "Expected a class body, but got '${token.value}'.");
       return skipToEof(token);
     }
   }
@@ -256,27 +238,23 @@
       if (argumentSend == null) {
         // TODO(ahe): The parser should diagnose this problem, not
         // this listener.
-        reportFatalError(argument,
-                         'Expected an identifier.');
+        reportFatalError(argument, 'Expected an identifier.');
       }
       if (argumentSend.receiver != null) internalError(node: argument);
       if (argument is SendSet) internalError(node: argument);
-      pushNode(argument.asSend().copyWithReceiver(receiver,
-            identical(tokenString, '?.')));
+      pushNode(argument
+          .asSend()
+          .copyWithReceiver(receiver, identical(tokenString, '?.')));
     } else {
       NodeList arguments = new NodeList.singleton(argument);
       pushNode(new Send(receiver, new Operator(token), arguments));
     }
     if (identical(tokenString, '===')) {
-      reporter.reportErrorMessage(
-          token,
-          MessageKind.UNSUPPORTED_EQ_EQ_EQ,
+      reporter.reportErrorMessage(token, MessageKind.UNSUPPORTED_EQ_EQ_EQ,
           {'lhs': receiver, 'rhs': argument});
     }
     if (identical(tokenString, '!==')) {
-      reporter.reportErrorMessage(
-          token,
-          MessageKind.UNSUPPORTED_BANG_EQ_EQ,
+      reporter.reportErrorMessage(token, MessageKind.UNSUPPORTED_BANG_EQ_EQ,
           {'lhs': receiver, 'rhs': argument});
     }
   }
@@ -313,15 +291,14 @@
       arguments = new NodeList.singleton(arg);
     }
     Operator op = new Operator(token);
-    pushNode(new SendSet(send.receiver, send.selector, op, arguments,
-        send.isConditional));
+    pushNode(new SendSet(
+        send.receiver, send.selector, op, arguments, send.isConditional));
   }
 
   void reportNotAssignable(Node node) {
     // TODO(ahe): The parser should diagnose this problem, not this
     // listener.
-    reportFatalError(node,
-                     'Not assignable.');
+    reportFatalError(node, 'Not assignable.');
   }
 
   void handleConditionalExpression(Token question, Token colon) {
@@ -334,6 +311,7 @@
 
   void endSend(Token token) {
     NodeList arguments = popNode();
+    popNode(); // typeArguments
     Node selector = popNode();
     // TODO(ahe): Handle receiver.
     pushNode(new Send(null, selector, arguments));
@@ -368,13 +346,13 @@
     AsyncModifier asyncModifier = popNode();
     NodeList initializers = popNode();
     NodeList formals = popNode();
+    popNode(); // typeVariables
     // The name can be an identifier or a send in case of named constructors.
     Expression name = popNode();
     TypeAnnotation type = popNode();
     Modifiers modifiers = popNode();
-    pushNode(new FunctionExpression(name, formals, body, type,
-                                    modifiers, initializers, getOrSet,
-                                    asyncModifier));
+    pushNode(new FunctionExpression(name, formals, body, type, modifiers,
+        initializers, getOrSet, asyncModifier));
   }
 
   void endFunctionDeclaration(Token endToken) {
@@ -406,8 +384,8 @@
     pushNode(new If(condition, thenPart, elsePart, ifToken, elseToken));
   }
 
-  void endForStatement(int updateExpressionCount,
-                       Token beginToken, Token endToken) {
+  void endForStatement(
+      int updateExpressionCount, Token beginToken, Token endToken) {
     Statement body = popNode();
     NodeList updates = makeNodeList(updateExpressionCount, null, null, ',');
     Statement condition = popNode();
@@ -419,8 +397,8 @@
     pushNode(null);
   }
 
-  void endDoWhileStatement(Token doKeyword, Token whileKeyword,
-                           Token endToken) {
+  void endDoWhileStatement(
+      Token doKeyword, Token whileKeyword, Token endToken) {
     Expression condition = popNode();
     Statement body = popNode();
     pushNode(new DoWhile(body, condition, doKeyword, whileKeyword, endToken));
@@ -481,11 +459,11 @@
     Operator op = new Operator(token);
 
     if (isPrefix) {
-      pushNode(new SendSet.prefix(send.receiver, send.selector, op, argument,
-          send.isConditional));
+      pushNode(new SendSet.prefix(
+          send.receiver, send.selector, op, argument, send.isConditional));
     } else {
-      pushNode(new SendSet.postfix(send.receiver, send.selector, op, argument,
-          send.isConditional));
+      pushNode(new SendSet.postfix(
+          send.receiver, send.selector, op, argument, send.isConditional));
     }
   }
 
@@ -517,16 +495,16 @@
     AsyncModifier asyncModifier = popNode();
     NodeList initializers = popNode();
     NodeList formalParameters = popNode();
+    popNode(); // typeVariables
     Expression name = popNode();
     TypeAnnotation returnType = popNode();
     Modifiers modifiers = popNode();
     pushNode(new FunctionExpression(name, formalParameters, body, returnType,
-                                    modifiers, initializers, getOrSet,
-                                    asyncModifier));
+        modifiers, initializers, getOrSet, asyncModifier));
   }
 
-  void handleLiteralMap(int count, Token beginToken, Token constKeyword,
-                        Token endToken) {
+  void handleLiteralMap(
+      int count, Token beginToken, Token constKeyword, Token endToken) {
     NodeList entries = makeNodeList(count, beginToken, endToken, ',');
     NodeList typeArguments = popNode();
     pushNode(new LiteralMap(typeArguments, entries, constKeyword));
@@ -538,19 +516,19 @@
     pushNode(new LiteralMapEntry(key, colon, value));
   }
 
-  void handleLiteralList(int count, Token beginToken, Token constKeyword,
-                         Token endToken) {
+  void handleLiteralList(
+      int count, Token beginToken, Token constKeyword, Token endToken) {
     NodeList elements = makeNodeList(count, beginToken, endToken, ',');
     pushNode(new LiteralList(popNode(), elements, constKeyword));
   }
 
-  void handleIndexedExpression(Token openSquareBracket,
-                               Token closeSquareBracket) {
+  void handleIndexedExpression(
+      Token openSquareBracket, Token closeSquareBracket) {
     NodeList arguments =
         makeNodeList(1, openSquareBracket, closeSquareBracket, null);
     Node receiver = popNode();
-    Token token = new StringToken.fromString(Precedence.INDEX_INFO, '[]',
-                                  openSquareBracket.charOffset);
+    Token token = new StringToken.fromString(
+        Precedence.INDEX_INFO, '[]', openSquareBracket.charOffset);
     Node selector = new Operator(token);
     pushNode(new Send(receiver, selector, arguments));
   }
@@ -581,8 +559,8 @@
     pushNode(new NamedArgument(name, colon, expression));
   }
 
-  void endOptionalFormalParameters(int count,
-                                   Token beginToken, Token endToken) {
+  void endOptionalFormalParameters(
+      int count, Token beginToken, Token endToken) {
     pushNode(makeNodeList(count, beginToken, endToken, ','));
   }
 
@@ -591,15 +569,15 @@
     Identifier name = popNode();
     TypeAnnotation returnType = popNode();
     pushNode(null); // Signal "no type" to endFormalParameter.
-    pushNode(new FunctionExpression(name, formals, null, returnType,
-                                    Modifiers.EMPTY, null, null, null));
+    pushNode(new FunctionExpression(
+        name, formals, null, returnType, Modifiers.EMPTY, null, null, null));
   }
 
   void handleValuedFormalParameter(Token equals, Token token) {
     Expression defaultValue = popNode();
     Expression parameterName = popNode();
     pushNode(new SendSet(null, parameterName, new Operator(equals),
-                         new NodeList.singleton(defaultValue)));
+        new NodeList.singleton(defaultValue)));
   }
 
   void endTryStatement(int catchCount, Token tryKeyword, Token finallyKeyword) {
@@ -609,8 +587,8 @@
     }
     NodeList catchBlocks = makeNodeList(catchCount, null, null, null);
     Block tryBlock = popNode();
-    pushNode(new TryStatement(tryBlock, catchBlocks, finallyBlock,
-                              tryKeyword, finallyKeyword));
+    pushNode(new TryStatement(
+        tryBlock, catchBlocks, finallyBlock, tryKeyword, finallyKeyword));
   }
 
   void handleCaseMatch(Token caseKeyword, Token colon) {
@@ -619,7 +597,7 @@
 
   void handleCatchBlock(Token onKeyword, Token catchKeyword) {
     Block block = popNode();
-    NodeList formals = catchKeyword != null? popNode(): null;
+    NodeList formals = catchKeyword != null ? popNode() : null;
     TypeAnnotation type = onKeyword != null ? popNode() : null;
     pushNode(new CatchBlock(type, formals, block, onKeyword, catchKeyword));
   }
@@ -640,18 +618,17 @@
     pushNode(new NodeList(beginToken, caseNodes, endToken, null));
   }
 
-  void handleSwitchCase(int labelCount, int caseCount,
-                        Token defaultKeyword, int statementCount,
-                        Token firstToken, Token endToken) {
+  void handleSwitchCase(int labelCount, int caseCount, Token defaultKeyword,
+      int statementCount, Token firstToken, Token endToken) {
     NodeList statements = makeNodeList(statementCount, null, null, null);
     NodeList labelsAndCases =
         makeNodeList(labelCount + caseCount, null, null, null);
-    pushNode(new SwitchCase(labelsAndCases, defaultKeyword, statements,
-                            firstToken));
+    pushNode(
+        new SwitchCase(labelsAndCases, defaultKeyword, statements, firstToken));
   }
 
-  void handleBreakStatement(bool hasTarget,
-                            Token breakKeyword, Token endToken) {
+  void handleBreakStatement(
+      bool hasTarget, Token breakKeyword, Token endToken) {
     Identifier target = null;
     if (hasTarget) {
       target = popNode();
@@ -659,8 +636,8 @@
     pushNode(new BreakStatement(target, breakKeyword, endToken));
   }
 
-  void handleContinueStatement(bool hasTarget,
-                               Token continueKeyword, Token endToken) {
+  void handleContinueStatement(
+      bool hasTarget, Token continueKeyword, Token endToken) {
     Identifier target = null;
     if (hasTarget) {
       target = popNode();
@@ -698,21 +675,21 @@
     handleModifiers(modifierCount);
     Modifiers modifiers = popNode();
 
-    pushNode(new FunctionExpression(name, formals, body, null,
-                                    modifiers, null, null, asyncModifier));
+    pushNode(new FunctionExpression(
+        name, formals, body, null, modifiers, null, null, asyncModifier));
   }
 
-  void endForIn(Token awaitToken, Token forToken,
-                Token inKeyword, Token endToken) {
+  void endForIn(
+      Token awaitToken, Token forToken, Token inKeyword, Token endToken) {
     Statement body = popNode();
     Expression expression = popNode();
     Node declaredIdentifier = popNode();
     if (awaitToken == null) {
-      pushNode(new SyncForIn(declaredIdentifier, expression, body,
-                             forToken, inKeyword));
+      pushNode(new SyncForIn(
+          declaredIdentifier, expression, body, forToken, inKeyword));
     } else {
       pushNode(new AsyncForIn(declaredIdentifier, expression, body, awaitToken,
-                              forToken, inKeyword));
+          forToken, inKeyword));
     }
   }
 
@@ -739,8 +716,7 @@
       Node receiver = popNode();
       if (typeArguments != null) {
         receiver = new TypeAnnotation(receiver, typeArguments);
-        recoverableError(typeArguments,
-                         'Type arguments are not allowed here.');
+        recoverableError(typeArguments, 'Type arguments are not allowed here.');
       } else {
         Identifier identifier = receiver.asIdentifier();
         Send send = receiver.asSend();
@@ -760,30 +736,27 @@
       endConstructorReference(beginToken, periodBeforeName, endToken);
       Node constructor = popNode();
       pushNode(new Metadata(beginToken,
-          new NewExpression(null,
-              new Send(null, constructor, arguments))));
+          new NewExpression(null, new Send(null, constructor, arguments))));
     }
   }
 
-  void handleAssertStatement(Token assertKeyword,
-                             Token commaToken, Token semicolonToken) {
+  void handleAssertStatement(
+      Token assertKeyword, Token commaToken, Token semicolonToken) {
     Node message;
     Node condition;
     if (commaToken != null) {
       message = popNode();
     }
     condition = popNode();
-    pushNode(new Assert(assertKeyword, condition,
-                        message, semicolonToken));
+    pushNode(new Assert(assertKeyword, condition, message, semicolonToken));
   }
 
   void endUnnamedFunction(Token token) {
     Statement body = popNode();
     AsyncModifier asyncModifier = popNode();
     NodeList formals = popNode();
-    pushNode(new FunctionExpression(null, formals, body, null,
-                                    Modifiers.EMPTY, null, null,
-                                    asyncModifier));
+    pushNode(new FunctionExpression(
+        null, formals, body, null, Modifiers.EMPTY, null, null, asyncModifier));
   }
 
   void handleIsOperator(Token operathor, Token not, Token endToken) {
diff --git a/pkg/compiler/lib/src/parser/parser.dart b/pkg/compiler/lib/src/parser/parser.dart
index 42e432b..a584afb 100644
--- a/pkg/compiler/lib/src/parser/parser.dart
+++ b/pkg/compiler/lib/src/parser/parser.dart
@@ -4,62 +4,63 @@
 
 library dart2js.parser;
 
+import '../options.dart' show ParserOptions;
 import '../common.dart';
-import '../tokens/keyword.dart' show
-    Keyword;
-import '../tokens/precedence.dart' show
-    PrecedenceInfo;
-import '../tokens/precedence_constants.dart' show
-    AS_INFO,
-    ASSIGNMENT_PRECEDENCE,
-    CASCADE_PRECEDENCE,
-    EQUALITY_PRECEDENCE,
-    GT_INFO,
-    GT_GT_INFO,
-    IS_INFO,
-    MINUS_MINUS_INFO,
-    OPEN_PAREN_INFO,
-    OPEN_SQUARE_BRACKET_INFO,
-    PERIOD_INFO,
-    PLUS_PLUS_INFO,
-    POSTFIX_PRECEDENCE,
-    QUESTION_INFO,
-    QUESTION_PERIOD_INFO,
-    RELATIONAL_PRECEDENCE;
-import '../tokens/token.dart' show
-    BeginGroupToken,
-    isUserDefinableOperator,
-    KeywordToken,
-    SymbolToken,
-    Token;
-import '../tokens/token_constants.dart' show
-    BAD_INPUT_TOKEN,
-    COMMA_TOKEN,
-    DOUBLE_TOKEN,
-    EOF_TOKEN,
-    EQ_TOKEN,
-    FUNCTION_TOKEN,
-    HASH_TOKEN,
-    HEXADECIMAL_TOKEN,
-    IDENTIFIER_TOKEN,
-    INT_TOKEN,
-    KEYWORD_TOKEN,
-    LT_TOKEN,
-    OPEN_CURLY_BRACKET_TOKEN,
-    OPEN_PAREN_TOKEN,
-    OPEN_SQUARE_BRACKET_TOKEN,
-    PERIOD_TOKEN,
-    SEMICOLON_TOKEN,
-    STRING_INTERPOLATION_IDENTIFIER_TOKEN,
-    STRING_INTERPOLATION_TOKEN,
-    STRING_TOKEN;
-import '../util/characters.dart' as Characters show
-    $CLOSE_CURLY_BRACKET;
-import '../util/util.dart' show
-    Link;
+import '../tokens/keyword.dart' show Keyword;
+import '../tokens/precedence.dart' show PrecedenceInfo;
+import '../tokens/precedence_constants.dart'
+    show
+        AS_INFO,
+        ASSIGNMENT_PRECEDENCE,
+        CASCADE_PRECEDENCE,
+        EQUALITY_PRECEDENCE,
+        GT_INFO,
+        GT_GT_INFO,
+        IS_INFO,
+        MINUS_MINUS_INFO,
+        OPEN_PAREN_INFO,
+        OPEN_SQUARE_BRACKET_INFO,
+        PERIOD_INFO,
+        PLUS_PLUS_INFO,
+        POSTFIX_PRECEDENCE,
+        QUESTION_INFO,
+        QUESTION_PERIOD_INFO,
+        RELATIONAL_PRECEDENCE;
+import '../tokens/token.dart'
+    show
+        BeginGroupToken,
+        isUserDefinableOperator,
+        KeywordToken,
+        SymbolToken,
+        Token;
+import '../tokens/token_constants.dart'
+    show
+        BAD_INPUT_TOKEN,
+        COMMA_TOKEN,
+        DOUBLE_TOKEN,
+        EOF_TOKEN,
+        EQ_TOKEN,
+        FUNCTION_TOKEN,
+        GT_TOKEN,
+        GT_GT_TOKEN,
+        HASH_TOKEN,
+        HEXADECIMAL_TOKEN,
+        IDENTIFIER_TOKEN,
+        INT_TOKEN,
+        KEYWORD_TOKEN,
+        LT_TOKEN,
+        OPEN_CURLY_BRACKET_TOKEN,
+        OPEN_PAREN_TOKEN,
+        OPEN_SQUARE_BRACKET_TOKEN,
+        PERIOD_TOKEN,
+        SEMICOLON_TOKEN,
+        STRING_INTERPOLATION_IDENTIFIER_TOKEN,
+        STRING_INTERPOLATION_TOKEN,
+        STRING_TOKEN;
+import '../util/characters.dart' as Characters show $CLOSE_CURLY_BRACKET;
+import '../util/util.dart' show Link;
 
-import 'listener.dart' show
-    Listener;
+import 'listener.dart' show Listener;
 
 class FormalParameterType {
   final String type;
@@ -97,13 +98,16 @@
  */
 class Parser {
   final Listener listener;
+  final ParserOptions parserOptions;
   bool mayParseFunctionExpressions = true;
-  final bool enableConditionalDirectives;
   bool asyncAwaitKeywordsEnabled;
 
-  Parser(this.listener,
-      {this.enableConditionalDirectives: false,
-       this.asyncAwaitKeywordsEnabled: false});
+  final bool enableGenericMethodSyntax;
+
+  Parser(this.listener, ParserOptions parserOptions,
+      {this.asyncAwaitKeywordsEnabled: false}) :
+          parserOptions = parserOptions,
+          enableGenericMethodSyntax = parserOptions.enableGenericMethodSyntax;
 
   Token parseUnit(Token token) {
     listener.beginCompilationUnit(token);
@@ -120,8 +124,8 @@
   Token parseTopLevelDeclaration(Token token) {
     token = parseMetadataStar(token);
     final String value = token.stringValue;
-    if ((identical(value, 'abstract') && optional('class', token.next))
-        || identical(value, 'class')) {
+    if ((identical(value, 'abstract') && optional('class', token.next)) ||
+        identical(value, 'class')) {
       return parseClassOrNamedMixinApplication(token);
     } else if (identical(value, 'enum')) {
       return parseEnum(token);
@@ -180,11 +184,9 @@
   Token parseConditionalUris(Token token) {
     listener.beginConditionalUris(token);
     int count = 0;
-    if (enableConditionalDirectives) {
-      while (optional('if', token)) {
-        count++;
-        token = parseConditionalUri(token);
-      }
+    while (optional('if', token)) {
+      count++;
+      token = parseConditionalUri(token);
     }
     listener.endConditionalUris(count);
     return token;
@@ -469,13 +471,13 @@
       token = parseExpression(token.next);
       listener.handleValuedFormalParameter(equal, token);
       if (type.isRequired) {
-        listener.reportError(equal,
-            MessageKind.REQUIRED_PARAMETER_WITH_DEFAULT);
+        listener.reportError(
+            equal, MessageKind.REQUIRED_PARAMETER_WITH_DEFAULT);
       } else if (type.isNamed && identical('=', value)) {
         listener.reportError(equal, MessageKind.NAMED_PARAMETER_WITH_EQUALS);
       } else if (type.isPositional && identical(':', value)) {
-        listener.reportError(equal,
-            MessageKind.POSITIONAL_PARAMETER_WITH_EQUALS);
+        listener.reportError(
+            equal, MessageKind.POSITIONAL_PARAMETER_WITH_EQUALS);
       }
     }
     listener.endFormalParameter(thisKeyword);
@@ -489,8 +491,8 @@
     int parameterCount = 0;
     do {
       token = token.next;
-      var type = isNamed ? FormalParameterType.NAMED
-                         : FormalParameterType.POSITIONAL;
+      var type =
+          isNamed ? FormalParameterType.NAMED : FormalParameterType.POSITIONAL;
       token = parseFormalParameter(token, type);
       ++parameterCount;
     } while (optional(',', token));
@@ -517,13 +519,88 @@
     if (identical(kind, KEYWORD_TOKEN)) {
       Keyword keyword = (token as KeywordToken).keyword;
       String value = keyword.syntax;
-      return keyword.isPseudo
-          || (identical(value, 'dynamic'))
-          || (identical(value, 'void'));
+      return keyword.isPseudo ||
+          (identical(value, 'dynamic')) ||
+          (identical(value, 'void'));
     }
     return false;
   }
 
+  /// Returns true if [token] matches '<' type (',' type)* '>' '(', and
+  /// otherwise returns false. The final '(' is not part of the grammar
+  /// construct `typeArguments`, but it is required here such that type
+  /// arguments in generic method invocations can be recognized, and as few as
+  /// possible other constructs will pass (e.g., 'a < C, D > 3').
+  bool isValidMethodTypeArguments(Token token) {
+    return tryParseMethodTypeArguments(token) != null;
+  }
+
+  /// Returns token after match if [token] matches '<' type (',' type)* '>' '(',
+  /// and otherwise returns null. Does not produce listener events. With respect
+  /// to the final '(', please see the description of
+  /// [isValidMethodTypeArguments].
+  Token tryParseMethodTypeArguments(Token token) {
+    if (!identical(token.kind, LT_TOKEN)) return null;
+    BeginGroupToken beginToken = token;
+    Token endToken = beginToken.endGroup;
+    if (endToken == null || !identical(endToken.next.kind, OPEN_PAREN_TOKEN)) {
+      return null;
+    }
+    token = tryParseType(token.next);
+    while (token != null && identical(token.kind, COMMA_TOKEN)) {
+      token = tryParseType(token.next);
+    }
+    if (token == null || !identical(token.kind, GT_TOKEN)) return null;
+    return token.next;
+  }
+
+  /// Returns token after match if [token] matches typeName typeArguments?, and
+  /// otherwise returns null. Does not produce listener events.
+  Token tryParseType(Token token) {
+    token = tryParseQualified(token);
+    if (token == null) return null;
+    Token tokenAfterQualified = token;
+    token = tryParseNestedTypeArguments(token);
+    return token == null ? tokenAfterQualified : token;
+  }
+
+  /// Returns token after match if [token] matches identifier ('.' identifier)?,
+  /// and otherwise returns null. Does not produce listener events.
+  Token tryParseQualified(Token token) {
+    if (!identical(token.kind, IDENTIFIER_TOKEN)) return null;
+    token = token.next;
+    if (!identical(token.kind, PERIOD_TOKEN)) return token;
+    token = token.next;
+    if (!identical(token.kind, IDENTIFIER_TOKEN)) return null;
+    return token.next;
+  }
+
+  /// Returns token after match if [token] matches '<' type (',' type)* '>',
+  /// and otherwise returns null. Does not produce listener events. The final
+  /// '>' may be the first character in a '>>' token, in which case a synthetic
+  /// '>' token is created and returned, representing the second '>' in the
+  /// '>>' token.
+  Token tryParseNestedTypeArguments(Token token) {
+    if (!identical(token.kind, LT_TOKEN)) return null;
+    // If the initial '<' matches the first '>' in a '>>' token, we will have
+    // `token.endGroup == null`, so we cannot rely on `token.endGroup == null`
+    // to imply that the match must fail. Hence no `token.endGroup == null`
+    // test here.
+    token = tryParseType(token.next);
+    while (token != null && identical(token.kind, COMMA_TOKEN)) {
+      token = tryParseType(token.next);
+    }
+    if (token == null) return null;
+    if (identical(token.kind, GT_TOKEN)) return token.next;
+    if (!identical(token.kind, GT_GT_TOKEN)) return null;
+    // [token] is '>>' of which the final '>' that we are parsing is the first
+    // character. In order to keep the parsing process on track we must return
+    // a synthetic '>' corresponding to the second character of that '>>'.
+    Token syntheticToken = new SymbolToken(GT_INFO, token.charOffset + 1);
+    syntheticToken.next = token.next;
+    return syntheticToken;
+  }
+
   Token parseQualified(Token token) {
     token = parseIdentifier(token);
     while (optional('.', token)) {
@@ -627,8 +704,7 @@
       implementsKeyword = token;
       token = parseTypeList(token.next);
     }
-    listener.endNamedMixinApplication(
-        classKeyword, implementsKeyword, token);
+    listener.endNamedMixinApplication(classKeyword, implementsKeyword, token);
     return expect(';', token);
   }
 
@@ -657,8 +733,8 @@
       } while (optional(',', token));
     }
     token = parseClassBody(token);
-    listener.endClassDeclaration(interfacesCount, begin, extendsKeyword,
-                                 implementsKeyword, token);
+    listener.endClassDeclaration(
+        interfacesCount, begin, extendsKeyword, implementsKeyword, token);
     return token.next;
   }
 
@@ -711,8 +787,7 @@
    */
   bool isOneOf3(Token token, String value1, String value2, String value3) {
     String stringValue = token.stringValue;
-    return
-        value1 == stringValue ||
+    return value1 == stringValue ||
         value2 == stringValue ||
         value3 == stringValue;
   }
@@ -721,18 +796,18 @@
    * Returns true if the stringValue of the [token] is either [value1],
    * [value2], [value3], or [value4].
    */
-  bool isOneOf4(Token token,
-                String value1, String value2, String value3, String value4) {
+  bool isOneOf4(
+      Token token, String value1, String value2, String value3, String value4) {
     String stringValue = token.stringValue;
     return value1 == stringValue ||
-           value2 == stringValue ||
-           value3 == stringValue ||
-           value4 == stringValue;
+        value2 == stringValue ||
+        value3 == stringValue ||
+        value4 == stringValue;
   }
 
   bool notEofOrValue(String value, Token token) {
     return !identical(token.kind, EOF_TOKEN) &&
-           !identical(value, token.stringValue);
+        !identical(value, token.stringValue);
   }
 
   Token parseType(Token token) {
@@ -749,24 +824,26 @@
   }
 
   Token parseTypeArgumentsOpt(Token token) {
-    return parseStuff(token,
-                      (t) => listener.beginTypeArguments(t),
-                      (t) => parseType(t),
-                      (c, bt, et) => listener.endTypeArguments(c, bt, et),
-                      (t) => listener.handleNoTypeArguments(t));
+    return parseStuff(
+        token,
+        (t) => listener.beginTypeArguments(t),
+        (t) => parseType(t),
+        (c, bt, et) => listener.endTypeArguments(c, bt, et),
+        (t) => listener.handleNoTypeArguments(t));
   }
 
   Token parseTypeVariablesOpt(Token token) {
-    return parseStuff(token,
-                      (t) => listener.beginTypeVariables(t),
-                      (t) => parseTypeVariable(t),
-                      (c, bt, et) => listener.endTypeVariables(c, bt, et),
-                      (t) => listener.handleNoTypeVariables(t));
+    return parseStuff(
+        token,
+        (t) => listener.beginTypeVariables(t),
+        (t) => parseTypeVariable(t),
+        (c, bt, et) => listener.endTypeVariables(c, bt, et),
+        (t) => listener.handleNoTypeVariables(t));
   }
 
   // TODO(ahe): Clean this up.
   Token parseStuff(Token token, Function beginStuff, Function stuffParser,
-                   Function endStuff, Function handleNoStuff) {
+      Function endStuff, Function handleNoStuff) {
     if (optional('<', token)) {
       Token begin = token;
       beginStuff(begin);
@@ -826,8 +903,9 @@
       // Loop to allow the listener to rewrite the token stream for
       // error handling.
       final String value = token.stringValue;
-      if ((identical(value, '(')) || (identical(value, '{'))
-          || (identical(value, '=>'))) {
+      if ((identical(value, '(')) ||
+          (identical(value, '{')) ||
+          (identical(value, '=>'))) {
         isField = false;
         break;
       } else if ((identical(value, '=')) || (identical(value, ','))) {
@@ -856,18 +934,18 @@
 
   bool isVarFinalOrConst(Token token) {
     String value = token.stringValue;
-    return identical('var', value)
-        || identical('final', value)
-        || identical('const', value);
+    return identical('var', value) ||
+        identical('final', value) ||
+        identical('const', value);
   }
 
-  Token expectVarFinalOrConst(Link<Token> modifiers,
-                              bool hasType,
-                              bool allowStatic) {
+  Token expectVarFinalOrConst(
+      Link<Token> modifiers, bool hasType, bool allowStatic) {
     int modifierCount = 0;
     Token staticModifier;
-    if (allowStatic && !modifiers.isEmpty
-        && optional('static', modifiers.head)) {
+    if (allowStatic &&
+        !modifiers.isEmpty &&
+        optional('static', modifiers.head)) {
       staticModifier = modifiers.head;
       modifierCount++;
       parseModifier(staticModifier);
@@ -894,9 +972,9 @@
     Token varFinalOrConst =
         modifierList.firstWhere(isVarFinalOrConst, orElse: () => null);
     if (allowStatic && staticModifier == null) {
-      staticModifier =
-          modifierList.firstWhere(
-              (modifier) => optional('static', modifier), orElse: () => null);
+      staticModifier = modifierList.firstWhere(
+          (modifier) => optional('static', modifier),
+          orElse: () => null);
       if (staticModifier != null) {
         modifierCount++;
         parseModifier(staticModifier);
@@ -920,12 +998,8 @@
     return null;
   }
 
-  Token parseFields(Token start,
-                    Link<Token> modifiers,
-                    Token type,
-                    Token getOrSet,
-                    Token name,
-                    bool isTopLevel) {
+  Token parseFields(Token start, Link<Token> modifiers, Token type,
+      Token getOrSet, Token name, bool isTopLevel) {
     bool hasType = type != null;
     Token varFinalOrConst =
         expectVarFinalOrConst(modifiers, hasType, !isTopLevel);
@@ -954,8 +1028,7 @@
     } else {
       parseType(type);
       if (isVar) {
-        listener.reportError(
-            modifiers.head, MessageKind.EXTRANEOUS_MODIFIER,
+        listener.reportError(modifiers.head, MessageKind.EXTRANEOUS_MODIFIER,
             {'modifier': modifiers.head});
       }
     }
@@ -979,12 +1052,8 @@
     return token;
   }
 
-  Token parseTopLevelMethod(Token start,
-                            Link<Token> modifiers,
-                            Token type,
-                            Token getOrSet,
-                            Token name) {
-
+  Token parseTopLevelMethod(Token start, Link<Token> modifiers, Token type,
+      Token getOrSet, Token name) {
     Token externalModifier;
     // TODO(johnniwinther): Move error reporting to resolution to give more
     // specific error messages.
@@ -1010,6 +1079,11 @@
     }
     Token token = parseIdentifier(name);
 
+    if (enableGenericMethodSyntax && getOrSet == null) {
+      token = parseTypeVariablesOpt(token);
+    } else {
+      listener.handleNoTypeVariables(token);
+    }
     token = parseFormalParametersOpt(token);
     bool previousAsyncAwaitKeywordsEnabled = asyncAwaitKeywordsEnabled;
     token = parseAsyncModifier(token);
@@ -1061,8 +1135,7 @@
       String value = token.stringValue;
       if (value == 'get') {
         isGetter = true;
-      } else if (hasName &&
-                 (value == 'sync' || value == 'async')) {
+      } else if (hasName && (value == 'sync' || value == 'async')) {
         // Skip.
         token = token.next;
         value = token.stringValue;
@@ -1071,15 +1144,11 @@
           token = token.next;
         }
         continue;
-      } else if (value == '(' ||
-                 value == '{' ||
-                 value == '=>') {
+      } else if (value == '(' || value == '{' || value == '=>') {
         // A method.
         identifiers = identifiers.prepend(token);
         return identifiers;
-      } else if (value == '=' ||
-                 value == ';' ||
-                 value == ',') {
+      } else if (value == '=' || value == ';' || value == ',') {
         // A field or abstract getter.
         identifiers = identifiers.prepend(token);
         return identifiers;
@@ -1162,11 +1231,11 @@
   bool isModifier(Token token) {
     final String value = token.stringValue;
     return (identical('final', value)) ||
-           (identical('var', value)) ||
-           (identical('const', value)) ||
-           (identical('abstract', value)) ||
-           (identical('static', value)) ||
-           (identical('external', value));
+        (identical('var', value)) ||
+        (identical('const', value)) ||
+        (identical('abstract', value)) ||
+        (identical('static', value)) ||
+        (identical('external', value));
   }
 
   Token parseModifier(Token token) {
@@ -1194,8 +1263,7 @@
   Token parseModifiers(Token token) {
     int count = 0;
     while (identical(token.kind, KEYWORD_TOKEN)) {
-      if (!isModifier(token))
-        break;
+      if (!isModifier(token)) break;
       token = parseModifier(token);
       count++;
     }
@@ -1317,8 +1385,11 @@
       // Loop to allow the listener to rewrite the token stream for
       // error handling.
       final String value = token.stringValue;
-      if ((identical(value, '(')) || (identical(value, '.'))
-          || (identical(value, '{')) || (identical(value, '=>'))) {
+      if ((identical(value, '(')) ||
+          (identical(value, '.')) ||
+          (identical(value, '{')) ||
+          (identical(value, '=>')) ||
+          (enableGenericMethodSyntax && identical(value, '<'))) {
         isField = false;
         break;
       } else if (identical(value, ';')) {
@@ -1348,14 +1419,10 @@
     return isField
         ? parseFields(start, modifiers, type, getOrSet, name, false)
         : parseMethod(start, modifiers, type, getOrSet, name);
-
   }
 
-  Token parseMethod(Token start,
-                    Link<Token> modifiers,
-                    Token type,
-                    Token getOrSet,
-                    Token name) {
+  Token parseMethod(Token start, Link<Token> modifiers, Token type,
+      Token getOrSet, Token name) {
     Token externalModifier;
     Token staticModifier;
     Token constModifier;
@@ -1368,35 +1435,31 @@
         modifierCount++;
         externalModifier = modifier;
         if (modifierCount != allowedModifierCount) {
-          listener.reportError(
-              modifier,
-              MessageKind.EXTRANEOUS_MODIFIER, {'modifier': modifier});
+          listener.reportError(modifier, MessageKind.EXTRANEOUS_MODIFIER,
+              {'modifier': modifier});
         }
         allowedModifierCount++;
       } else if (staticModifier == null && optional('static', modifier)) {
         modifierCount++;
         staticModifier = modifier;
         if (modifierCount != allowedModifierCount) {
-          listener.reportError(
-              modifier,
-              MessageKind.EXTRANEOUS_MODIFIER, {'modifier': modifier});
+          listener.reportError(modifier, MessageKind.EXTRANEOUS_MODIFIER,
+              {'modifier': modifier});
         }
       } else if (constModifier == null && optional('const', modifier)) {
         modifierCount++;
         constModifier = modifier;
         if (modifierCount != allowedModifierCount) {
-          listener.reportError(
-              modifier,
-              MessageKind.EXTRANEOUS_MODIFIER, {'modifier': modifier});
+          listener.reportError(modifier, MessageKind.EXTRANEOUS_MODIFIER,
+              {'modifier': modifier});
         }
       } else {
         listener.reportError(
             modifier, MessageKind.EXTRANEOUS_MODIFIER, {'modifier': modifier});
       }
     }
-    if (getOrSet != null &&  constModifier != null) {
-      listener.reportError(
-          constModifier, MessageKind.EXTRANEOUS_MODIFIER,
+    if (getOrSet != null && constModifier != null) {
+      listener.reportError(constModifier, MessageKind.EXTRANEOUS_MODIFIER,
           {'modifier': constModifier});
     }
     parseModifierList(modifiers);
@@ -1410,8 +1473,7 @@
     if (optional('operator', name)) {
       token = parseOperatorName(name);
       if (staticModifier != null) {
-        listener.reportError(
-            staticModifier, MessageKind.EXTRANEOUS_MODIFIER,
+        listener.reportError(staticModifier, MessageKind.EXTRANEOUS_MODIFIER,
             {'modifier': staticModifier});
       }
     } else {
@@ -1419,6 +1481,11 @@
     }
 
     token = parseQualifiedRestOpt(token);
+    if (enableGenericMethodSyntax && getOrSet == null) {
+      token = parseTypeVariablesOpt(token);
+    } else {
+      listener.handleNoTypeVariables(token);
+    }
     token = parseFormalParametersOpt(token);
     token = parseInitializersOpt(token);
     bool previousAsyncAwaitKeywordsEnabled = asyncAwaitKeywordsEnabled;
@@ -1505,6 +1572,11 @@
     }
     token = parseQualifiedRestOpt(token);
     listener.endFunctionName(token);
+    if (enableGenericMethodSyntax && getOrSet == null) {
+      token = parseTypeVariablesOpt(token);
+    } else {
+      listener.handleNoTypeVariables(token);
+    }
     token = parseFormalParametersOpt(token);
     token = parseInitializersOpt(token);
     bool previousAsyncAwaitKeywordsEnabled = asyncAwaitKeywordsEnabled;
@@ -1545,6 +1617,11 @@
     listener.beginFunctionName(token);
     token = parseIdentifier(token);
     listener.endFunctionName(token);
+    if (enableGenericMethodSyntax) {
+      token = parseTypeVariablesOpt(token);
+    } else {
+      listener.handleNoTypeVariables(token);
+    }
     token = parseFormalParameters(token);
     listener.handleNoInitializers();
     bool previousAsyncAwaitKeywordsEnabled = asyncAwaitKeywordsEnabled;
@@ -1637,8 +1714,7 @@
         star = token;
         token = token.next;
       } else {
-        listener.reportError(async,
-            MessageKind.INVALID_SYNC_MODIFIER);
+        listener.reportError(async, MessageKind.INVALID_SYNC_MODIFIER);
       }
     }
     listener.handleAsyncModifier(async, star);
@@ -1714,7 +1790,6 @@
     return expectSemicolon(token);
   }
 
-
   Token parseReturnStatement(Token token) {
     Token begin = token;
     listener.beginReturnStatement(begin);
@@ -1869,8 +1944,8 @@
     return token;
   }
 
-  Token parsePrecedenceExpression(Token token, int precedence,
-                                  bool allowCascades) {
+  Token parsePrecedenceExpression(
+      Token token, int precedence, bool allowCascades) {
     assert(precedence >= 1);
     assert(precedence <= POSTFIX_PRECEDENCE);
     token = parseUnaryExpression(token, allowCascades);
@@ -1899,10 +1974,10 @@
             token = parseUnaryExpression(token.next, allowCascades);
             listener.handleBinaryExpression(operator);
           } else if ((identical(info, OPEN_PAREN_INFO)) ||
-                     (identical(info, OPEN_SQUARE_BRACKET_INFO))) {
+              (identical(info, OPEN_SQUARE_BRACKET_INFO))) {
             token = parseArgumentOrIndexStar(token);
           } else if ((identical(info, PLUS_PLUS_INFO)) ||
-                     (identical(info, MINUS_MINUS_INFO))) {
+              (identical(info, MINUS_MINUS_INFO))) {
             listener.handleUnaryPostfixAssignmentExpression(token);
             token = token.next;
           } else {
@@ -1917,8 +1992,8 @@
         } else {
           // Left associative, so we recurse at the next higher
           // precedence level.
-          token = parsePrecedenceExpression(token.next, level + 1,
-                                            allowCascades);
+          token =
+              parsePrecedenceExpression(token.next, level + 1, allowCascades);
           listener.handleBinaryExpression(operator);
         }
         info = token.info;
@@ -1977,21 +2052,21 @@
       listener.reportError(token, MessageKind.UNSUPPORTED_PREFIX_PLUS);
       return parseUnaryExpression(token.next, allowCascades);
     } else if ((identical(value, '!')) ||
-               (identical(value, '-')) ||
-               (identical(value, '~'))) {
+        (identical(value, '-')) ||
+        (identical(value, '~'))) {
       Token operator = token;
       // Right associative, so we recurse at the same precedence
       // level.
-      token = parsePrecedenceExpression(token.next, POSTFIX_PRECEDENCE,
-                                        allowCascades);
+      token = parsePrecedenceExpression(
+          token.next, POSTFIX_PRECEDENCE, allowCascades);
       listener.handleUnaryPrefixExpression(operator);
     } else if ((identical(value, '++')) || identical(value, '--')) {
       // TODO(ahe): Validate this is used correctly.
       Token operator = token;
       // Right associative, so we recurse at the same precedence
       // level.
-      token = parsePrecedenceExpression(token.next, POSTFIX_PRECEDENCE,
-                                        allowCascades);
+      token = parsePrecedenceExpression(
+          token.next, POSTFIX_PRECEDENCE, allowCascades);
       listener.handleUnaryPrefixAssignmentExpression(operator);
     } else {
       token = parsePrimary(token);
@@ -2010,6 +2085,7 @@
         listener.handleIndexedExpression(openSquareBracket, token);
         token = expect(']', token);
       } else if (optional('(', token)) {
+        listener.handleNoTypeArguments(token);
         token = parseArguments(token);
         listener.endSend(token);
       } else {
@@ -2023,8 +2099,7 @@
     final kind = token.kind;
     if (kind == IDENTIFIER_TOKEN) {
       return parseSendOrFunctionLiteral(token);
-    } else if (kind == INT_TOKEN
-        || kind == HEXADECIMAL_TOKEN) {
+    } else if (kind == INT_TOKEN || kind == HEXADECIMAL_TOKEN) {
       return parseLiteralInt(token);
     } else if (kind == DOUBLE_TOKEN) {
       return parseLiteralDouble(token);
@@ -2049,7 +2124,7 @@
       } else if (value == 'void') {
         return parseFunctionExpression(token);
       } else if (asyncAwaitKeywordsEnabled &&
-                 (value == 'yield' || value == 'async')) {
+          (value == 'yield' || value == 'async')) {
         return listener.expectedExpression(token);
       } else if (token.isIdentifier()) {
         return parseSendOrFunctionLiteral(token);
@@ -2059,9 +2134,9 @@
     } else if (kind == OPEN_PAREN_TOKEN) {
       return parseParenthesizedExpressionOrFunctionLiteral(token);
     } else if ((kind == LT_TOKEN) ||
-               (kind == OPEN_SQUARE_BRACKET_TOKEN) ||
-               (kind == OPEN_CURLY_BRACKET_TOKEN) ||
-               token.stringValue == '[]') {
+        (kind == OPEN_SQUARE_BRACKET_TOKEN) ||
+        (kind == OPEN_CURLY_BRACKET_TOKEN) ||
+        token.stringValue == '[]') {
       return parseLiteralListOrMap(token);
     } else {
       return listener.expectedExpression(token);
@@ -2074,9 +2149,9 @@
     int kind = nextToken.kind;
     if (mayParseFunctionExpressions &&
         (identical(kind, FUNCTION_TOKEN) ||
-         identical(kind, OPEN_CURLY_BRACKET_TOKEN) ||
-         (identical(kind, KEYWORD_TOKEN) &&
-             (nextToken.value == 'async' || nextToken.value == 'sync')))) {
+            identical(kind, OPEN_CURLY_BRACKET_TOKEN) ||
+            (identical(kind, KEYWORD_TOKEN) &&
+                (nextToken.value == 'async' || nextToken.value == 'sync')))) {
       return parseUnnamedFunction(token);
     } else {
       bool old = mayParseFunctionExpressions;
@@ -2107,6 +2182,7 @@
     token = token.next;
     if (optional('(', token)) {
       // Constructor forwarding.
+      listener.handleNoTypeArguments(token);
       token = parseArguments(token);
       listener.endSend(token);
     }
@@ -2118,6 +2194,7 @@
     token = token.next;
     if (optional('(', token)) {
       // Super constructor.
+      listener.handleNoTypeArguments(token);
       token = parseArguments(token);
       listener.endSend(token);
     }
@@ -2334,6 +2411,11 @@
   Token parseSend(Token token) {
     listener.beginSend(token);
     token = parseIdentifier(token);
+    if (enableGenericMethodSyntax && isValidMethodTypeArguments(token)) {
+      token = parseTypeArgumentsOpt(token);
+    } else {
+      listener.handleNoTypeArguments(token);
+    }
     token = parseArgumentsOpt(token);
     listener.endSend(token);
     return token;
@@ -2415,8 +2497,8 @@
     return parseVariablesDeclarationMaybeSemicolon(token, false);
   }
 
-  Token parseVariablesDeclarationMaybeSemicolon(Token token,
-                                                bool endWithSemicolon) {
+  Token parseVariablesDeclarationMaybeSemicolon(
+      Token token, bool endWithSemicolon) {
     int count = 1;
     listener.beginVariablesDeclaration(token);
     token = parseModifiers(token);
@@ -2567,8 +2649,7 @@
     Token awaitToken = token;
     listener.beginAwaitExpression(awaitToken);
     token = expect('await', token);
-    token = parsePrecedenceExpression(token, POSTFIX_PRECEDENCE,
-                                      allowCascades);
+    token = parsePrecedenceExpression(token, POSTFIX_PRECEDENCE, allowCascades);
     listener.endAwaitExpression(awaitToken, token);
     return token;
   }
@@ -2731,7 +2812,7 @@
       peek = peekPastLabels(token);
     }
     listener.handleSwitchCase(labelCount, expressionCount, defaultKeyword,
-                              statementCount, begin, token);
+        statementCount, begin, token);
     return token;
   }
 
diff --git a/pkg/compiler/lib/src/parser/parser_task.dart b/pkg/compiler/lib/src/parser/parser_task.dart
index fa715aa..471ebf6 100644
--- a/pkg/compiler/lib/src/parser/parser_task.dart
+++ b/pkg/compiler/lib/src/parser/parser_task.dart
@@ -5,33 +5,22 @@
 library dart2js.parser.task;
 
 import '../common.dart';
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
-import '../elements/modelx.dart' show
-    ElementX;
-import '../tokens/token.dart' show
-    Token;
-import '../tree/tree.dart' show
-    Node;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
+import '../elements/modelx.dart' show ElementX;
+import '../options.dart' show ParserOptions;
+import '../tokens/token.dart' show Token;
+import '../tree/tree.dart' show Node;
 
-import 'element_listener.dart' show
-    ScannerOptions;
-import 'listener.dart' show
-    ParserError;
-import 'node_listener.dart' show
-    NodeListener;
-import 'parser.dart' show
-    Parser;
+import 'element_listener.dart' show ScannerOptions;
+import 'listener.dart' show ParserError;
+import 'node_listener.dart' show NodeListener;
+import 'parser.dart' show Parser;
 
 class ParserTask extends CompilerTask {
-  final bool _enableConditionalDirectives;
+  final ParserOptions parserOptions;
 
-  ParserTask(Compiler compiler,
-             {bool enableConditionalDirectives: false})
-      : this._enableConditionalDirectives = enableConditionalDirectives,
-        super(compiler);
+  ParserTask(Compiler compiler, this.parserOptions) : super(compiler);
 
   String get name => 'Parser';
 
@@ -41,13 +30,12 @@
 
   Node parseCompilationUnit(Token token) {
     return measure(() {
-      NodeListener listener = new NodeListener(
-          const ScannerOptions(), reporter, null);
-      Parser parser = new Parser(
-          listener, enableConditionalDirectives: _enableConditionalDirectives);
+      NodeListener listener =
+          new NodeListener(const ScannerOptions(), reporter, null);
+      Parser parser = new Parser(listener, parserOptions);
       try {
         parser.parseUnit(token);
-      } on ParserError catch(_) {
+      } on ParserError catch (_) {
         assert(invariant(token, compiler.compilationFailed));
         return listener.makeNodeList(0, null, null, '\n');
       }
diff --git a/pkg/compiler/lib/src/parser/partial_elements.dart b/pkg/compiler/lib/src/parser/partial_elements.dart
index d72c6b7..a99ba64 100644
--- a/pkg/compiler/lib/src/parser/partial_elements.dart
+++ b/pkg/compiler/lib/src/parser/partial_elements.dart
@@ -5,60 +5,54 @@
 library dart2js.parser.partial_elements;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Parsing,
-    Resolution;
+import '../common/resolution.dart' show Parsing, Resolution;
 import '../dart_types.dart' show DynamicType;
-import '../elements/elements.dart' show
-    CompilationUnitElement,
-    ConstructorElement,
-    Element,
-    ElementKind,
-    GetterElement,
-    LibraryElement,
-    MetadataAnnotation,
-    MethodElement,
-    SetterElement,
-    STATE_NOT_STARTED,
-    STATE_DONE;
-import '../elements/modelx.dart' show
-    BaseFunctionElementX,
-    ClassElementX,
-    ConstructorElementX,
-    DeclarationSite,
-    ElementX,
-    FieldElementX,
-    GetterElementX,
-    MetadataAnnotationX,
-    MethodElementX,
-    SetterElementX,
-    TypedefElementX,
-    VariableList;
-import '../elements/visitor.dart' show
-    ElementVisitor;
-import '../tokens/token.dart' show
-    BadInputToken,
-    BeginGroupToken,
-    ErrorToken,
-    KeywordToken,
-    StringToken,
-    Token,
-    UnmatchedToken,
-    UnterminatedToken;
-import '../tokens/token_constants.dart' as Tokens show
-    EOF_TOKEN;
+import '../elements/elements.dart'
+    show
+        CompilationUnitElement,
+        ConstructorElement,
+        Element,
+        ElementKind,
+        GetterElement,
+        LibraryElement,
+        MetadataAnnotation,
+        MethodElement,
+        SetterElement,
+        STATE_NOT_STARTED,
+        STATE_DONE;
+import '../elements/modelx.dart'
+    show
+        BaseFunctionElementX,
+        ClassElementX,
+        ConstructorElementX,
+        DeclarationSite,
+        ElementX,
+        FieldElementX,
+        GetterElementX,
+        MetadataAnnotationX,
+        MethodElementX,
+        SetterElementX,
+        TypedefElementX,
+        VariableList;
+import '../elements/visitor.dart' show ElementVisitor;
+import '../tokens/token.dart'
+    show
+        BadInputToken,
+        BeginGroupToken,
+        ErrorToken,
+        KeywordToken,
+        StringToken,
+        Token,
+        UnmatchedToken,
+        UnterminatedToken;
+import '../tokens/token_constants.dart' as Tokens show EOF_TOKEN;
 import '../tree/tree.dart';
 
-import 'class_element_parser.dart' show
-    ClassElementParser;
-import 'parser.dart' show
-    Parser;
-import 'listener.dart' show
-    ParserError;
-import 'member_listener.dart' show
-    MemberListener;
-import 'node_listener.dart' show
-    NodeListener;
+import 'class_element_parser.dart' show ClassElementParser;
+import 'parser.dart' show Parser;
+import 'listener.dart' show ParserError;
+import 'member_listener.dart' show MemberListener;
+import 'node_listener.dart' show NodeListener;
 
 abstract class PartialElement implements DeclarationSite {
   Token beginToken;
@@ -91,7 +85,8 @@
     _position = ElementX.findNameToken(
         beginToken,
         modifiers.isFactory || isGenerativeConstructor,
-        name, enclosingElement.name);
+        name,
+        enclosingElement.name);
   }
 
   bool get hasNode => cachedNode != null;
@@ -126,44 +121,34 @@
 
 abstract class PartialFunctionElement
     implements PartialElement, PartialFunctionMixin {
-
-  factory PartialFunctionElement(
-      String name,
-      Token beginToken,
-      Token getOrSet,
-      Token endToken,
-      Modifiers modifiers,
-      Element enclosingElement,
+  factory PartialFunctionElement(String name, Token beginToken, Token getOrSet,
+      Token endToken, Modifiers modifiers, Element enclosingElement,
       {bool hasBody: true}) {
     if (getOrSet == null) {
       return new PartialMethodElement(
-          name, beginToken, endToken, modifiers,
-          enclosingElement, hasBody: hasBody);
+          name, beginToken, endToken, modifiers, enclosingElement,
+          hasBody: hasBody);
     } else if (identical(getOrSet.stringValue, 'get')) {
       return new PartialGetterElement(
-          name, beginToken, getOrSet, endToken, modifiers,
-          enclosingElement, hasBody: hasBody);
+          name, beginToken, getOrSet, endToken, modifiers, enclosingElement,
+          hasBody: hasBody);
     } else {
       assert(identical(getOrSet.stringValue, 'set'));
       return new PartialSetterElement(
-          name, beginToken, getOrSet, endToken, modifiers,
-          enclosingElement, hasBody: hasBody);
+          name, beginToken, getOrSet, endToken, modifiers, enclosingElement,
+          hasBody: hasBody);
     }
   }
 
   PartialFunctionElement copyWithEnclosing(Element enclosing);
 }
 
-
 class PartialMethodElement extends MethodElementX
     with PartialElement, PartialFunctionMixin
     implements PartialFunctionElement {
-  PartialMethodElement(String name,
-                       Token beginToken,
-                       Token endToken,
-                       Modifiers modifiers,
-                       Element enclosing,
-                       {bool hasBody: true})
+  PartialMethodElement(String name, Token beginToken, Token endToken,
+      Modifiers modifiers, Element enclosing,
+      {bool hasBody: true})
       : super(name, ElementKind.FUNCTION, modifiers, enclosing, hasBody) {
     init(beginToken, null, endToken);
   }
@@ -175,20 +160,17 @@
 
   PartialMethodElement copyWithEnclosing(Element enclosing) {
     return new PartialMethodElement(
-        name, beginToken, endToken, modifiers, enclosing, hasBody: hasBody);
+        name, beginToken, endToken, modifiers, enclosing,
+        hasBody: hasBody);
   }
 }
 
 class PartialGetterElement extends GetterElementX
     with PartialElement, PartialFunctionMixin
-    implements GetterElement, PartialFunctionElement  {
-  PartialGetterElement(String name,
-                       Token beginToken,
-                       Token getToken,
-                       Token endToken,
-                       Modifiers modifiers,
-                       Element enclosing,
-                       {bool hasBody: true})
+    implements GetterElement, PartialFunctionElement {
+  PartialGetterElement(String name, Token beginToken, Token getToken,
+      Token endToken, Modifiers modifiers, Element enclosing,
+      {bool hasBody: true})
       : super(name, modifiers, enclosing, hasBody) {
     init(beginToken, getToken, endToken);
   }
@@ -211,13 +193,9 @@
 class PartialSetterElement extends SetterElementX
     with PartialElement, PartialFunctionMixin
     implements SetterElement, PartialFunctionElement {
-  PartialSetterElement(String name,
-                       Token beginToken,
-                       Token setToken,
-                       Token endToken,
-                       Modifiers modifiers,
-                       Element enclosing,
-                       {bool hasBody: true})
+  PartialSetterElement(String name, Token beginToken, Token setToken,
+      Token endToken, Modifiers modifiers, Element enclosing,
+      {bool hasBody: true})
       : super(name, modifiers, enclosing, hasBody) {
     init(beginToken, setToken, endToken);
   }
@@ -241,12 +219,8 @@
 // [PartialFactoryConstructor] subclasses and make this abstract.
 class PartialConstructorElement extends ConstructorElementX
     with PartialElement, PartialFunctionMixin {
-  PartialConstructorElement(String name,
-                            Token beginToken,
-                            Token endToken,
-                            ElementKind kind,
-                            Modifiers modifiers,
-                            Element enclosing)
+  PartialConstructorElement(String name, Token beginToken, Token endToken,
+      ElementKind kind, Modifiers modifiers, Element enclosing)
       : super(name, kind, modifiers, enclosing) {
     init(beginToken, null, endToken);
   }
@@ -258,10 +232,8 @@
 }
 
 class PartialFieldList extends VariableList with PartialElement {
-  PartialFieldList(Token beginToken,
-                   Token endToken,
-                   Modifiers modifiers,
-                   bool hasParseError)
+  PartialFieldList(
+      Token beginToken, Token endToken, Modifiers modifiers, bool hasParseError)
       : super(modifiers) {
     super.beginToken = beginToken;
     super.endToken = endToken;
@@ -272,8 +244,7 @@
     if (definitions != null) return definitions;
     DiagnosticReporter reporter = parsing.reporter;
     reporter.withCurrentElement(element, () {
-      definitions = parse(
-          parsing, element, declarationSite,
+      definitions = parse(parsing, element, declarationSite,
           (Parser parser) => parser.parseMember(beginToken));
 
       if (!hasParseError &&
@@ -282,11 +253,10 @@
           !definitions.modifiers.isConst &&
           definitions.type == null &&
           !definitions.isErroneous) {
-        reporter.reportErrorMessage(
-            definitions,
-            MessageKind.GENERIC,
-            { 'text': 'A field declaration must start with var, final, '
-                      'const, or a type annotation.' });
+        reporter.reportErrorMessage(definitions, MessageKind.GENERIC, {
+          'text': 'A field declaration must start with var, final, '
+              'const, or a type annotation.'
+        });
       }
     });
     return definitions;
@@ -309,12 +279,8 @@
 }
 
 class PartialTypedefElement extends TypedefElementX with PartialElement {
-
   PartialTypedefElement(
-      String name,
-      Element enclosing,
-      Token beginToken,
-      Token endToken)
+      String name, Element enclosing, Token beginToken, Token endToken)
       : super(name, enclosing) {
     this.beginToken = beginToken;
     this.endToken = endToken;
@@ -324,8 +290,7 @@
 
   Node parseNode(Parsing parsing) {
     if (cachedNode != null) return cachedNode;
-    cachedNode = parse(
-        parsing, this, declarationSite,
+    cachedNode = parse(parsing, this, declarationSite,
         (p) => p.parseTopLevelDeclaration(token));
     return cachedNode;
   }
@@ -366,15 +331,13 @@
 
   Node parseNode(Parsing parsing) {
     if (cachedNode != null) return cachedNode;
-    var metadata = parse(parsing,
-                         annotatedElement,
-                         declarationSite,
-                         (p) => p.parseMetadata(beginToken));
+    var metadata = parse(parsing, annotatedElement, declarationSite,
+        (p) => p.parseMetadata(beginToken));
     if (metadata is Metadata) {
       cachedNode = metadata.expression;
       return cachedNode;
     } else {
-      assert (metadata is ErrorNode);
+      assert(metadata is ErrorNode);
       return metadata;
     }
   }
@@ -390,11 +353,8 @@
 class PartialClassElement extends ClassElementX with PartialElement {
   ClassNode cachedNode;
 
-  PartialClassElement(String name,
-                      Token beginToken,
-                      Token endToken,
-                      Element enclosing,
-                      int id)
+  PartialClassElement(
+      String name, Token beginToken, Token endToken, Element enclosing, int id)
       : super(name, enclosing, id, STATE_NOT_STARTED) {
     this.beginToken = beginToken;
     this.endToken = endToken;
@@ -427,15 +387,13 @@
       parsing.measure(() {
         MemberListener listener = new MemberListener(
             parsing.getScannerOptionsFor(this), reporter, this);
-        Parser parser = new ClassElementParser(listener);
+        Parser parser = new ClassElementParser(listener, parsing.parserOptions);
         try {
           Token token = parser.parseTopLevelDeclaration(beginToken);
           assert(identical(token, endToken.next));
           cachedNode = listener.popNode();
-          assert(
-              invariant(
-                  beginToken, listener.nodes.isEmpty,
-                  message: "Non-empty listener stack: ${listener.nodes}"));
+          assert(invariant(beginToken, listener.nodes.isEmpty,
+              message: "Non-empty listener stack: ${listener.nodes}"));
         } on ParserError {
           // TODO(ahe): Often, a ParserError is thrown while parsing the class
           // body. This means that the stack actually contains most of the
@@ -448,8 +406,15 @@
           Token extendsKeyword = null;
           NodeList body = listener.makeNodeList(0, beginToken, endToken, null);
           cachedNode = new ClassNode(
-              Modifiers.EMPTY, name, typeParameters, supertype, interfaces,
-              beginToken, extendsKeyword, body, endToken);
+              Modifiers.EMPTY,
+              name,
+              typeParameters,
+              supertype,
+              interfaces,
+              beginToken,
+              extendsKeyword,
+              body,
+              endToken);
           hasParseError = true;
         }
       });
@@ -475,10 +440,7 @@
   }
 }
 
-Node parse(
-    Parsing parsing,
-    ElementX element,
-    PartialElement partial,
+Node parse(Parsing parsing, ElementX element, PartialElement partial,
     doParse(Parser parser)) {
   DiagnosticReporter reporter = parsing.reporter;
   return parsing.measure(() {
@@ -491,7 +453,7 @@
         if (partial.hasParseError) {
           listener.suppressParseErrors = true;
         }
-        doParse(new Parser(listener));
+        doParse(new Parser(listener, parsing.parserOptions));
       } on ParserError catch (e) {
         partial.hasParseError = true;
         return new ErrorNode(element.position, e.reason);
diff --git a/pkg/compiler/lib/src/parser/partial_parser.dart b/pkg/compiler/lib/src/parser/partial_parser.dart
index 1c7722f..67f320d 100644
--- a/pkg/compiler/lib/src/parser/partial_parser.dart
+++ b/pkg/compiler/lib/src/parser/partial_parser.dart
@@ -5,24 +5,17 @@
 library dart2js.parser.partial;
 
 import '../common.dart';
-import '../util/characters.dart' as Characters show
-    $CLOSE_CURLY_BRACKET;
-import '../tokens/token.dart' show
-    BeginGroupToken,
-    ErrorToken,
-    Token;
-import '../tokens/token_constants.dart' as Tokens show
-    EOF_TOKEN;
+import '../options.dart' show ParserOptions;
+import '../util/characters.dart' as Characters show $CLOSE_CURLY_BRACKET;
+import '../tokens/token.dart' show BeginGroupToken, ErrorToken, Token;
+import '../tokens/token_constants.dart' as Tokens show EOF_TOKEN;
 
-import 'listener.dart' show
-    Listener;
-import 'parser.dart' show
-    Parser;
+import 'listener.dart' show Listener;
+import 'parser.dart' show Parser;
 
 class PartialParser extends Parser {
-  PartialParser(Listener listener, {bool enableConditionalDirectives})
-      : super(listener,
-          enableConditionalDirectives: enableConditionalDirectives);
+  PartialParser(Listener listener, ParserOptions options)
+      : super(listener, options);
 
   Token parseClassBody(Token token) => skipClassBody(token);
 
diff --git a/pkg/compiler/lib/src/patch_parser.dart b/pkg/compiler/lib/src/patch_parser.dart
index 593b08f..0e9943d 100644
--- a/pkg/compiler/lib/src/patch_parser.dart
+++ b/pkg/compiler/lib/src/patch_parser.dart
@@ -116,64 +116,48 @@
 
 import 'dart:async';
 
-import 'constants/values.dart' show
-    ConstantValue;
+import 'constants/values.dart' show ConstantValue;
 import 'common.dart';
-import 'compiler.dart' show
-    Compiler;
-import 'common/tasks.dart' show
-    CompilerTask;
-import 'dart_types.dart' show
-    DartType;
+import 'compiler.dart' show Compiler;
+import 'common/tasks.dart' show CompilerTask;
+import 'dart_types.dart' show DartType;
 import 'elements/elements.dart';
-import 'elements/modelx.dart' show
-    BaseFunctionElementX,
-    ClassElementX,
-    GetterElementX,
-    LibraryElementX,
-    MetadataAnnotationX,
-    SetterElementX;
-import 'js_backend/js_backend.dart' show
-    JavaScriptBackend;
-import 'library_loader.dart' show
-    LibraryLoader;
-import 'parser/listener.dart' show
-    Listener,
-    ParserError;
-import 'parser/element_listener.dart' show
-    ElementListener;
-import 'parser/member_listener.dart' show
-    MemberListener;
-import 'parser/partial_elements.dart' show
-  PartialClassElement;
-import 'parser/partial_parser.dart' show
-    PartialParser;
-import 'parser/parser.dart' show
-    Parser;
-import 'scanner/scanner.dart' show
-    Scanner;
+import 'elements/modelx.dart'
+    show
+        BaseFunctionElementX,
+        ClassElementX,
+        GetterElementX,
+        LibraryElementX,
+        MetadataAnnotationX,
+        SetterElementX;
+import 'id_generator.dart';
+import 'js_backend/js_backend.dart' show JavaScriptBackend;
+import 'library_loader.dart' show LibraryLoader;
+import 'options.dart' show ParserOptions;
+import 'parser/listener.dart' show Listener, ParserError;
+import 'parser/element_listener.dart' show ElementListener;
+import 'parser/member_listener.dart' show MemberListener;
+import 'parser/partial_elements.dart' show PartialClassElement;
+import 'parser/partial_parser.dart' show PartialParser;
+import 'parser/parser.dart' show Parser;
+import 'scanner/scanner.dart' show Scanner;
 import 'script.dart';
-import 'tokens/token.dart' show
-    StringToken,
-    Token;
+import 'tokens/token.dart' show StringToken, Token;
 
 class PatchParserTask extends CompilerTask {
   final String name = "Patching Parser";
-  final bool _enableConditionalDirectives;
+  final ParserOptions parserOptions;
 
-  PatchParserTask(Compiler compiler, {bool enableConditionalDirectives})
-      : this._enableConditionalDirectives = enableConditionalDirectives,
-        super(compiler);
+  PatchParserTask(Compiler compiler, this.parserOptions) : super(compiler);
 
   /**
    * Scans a library patch file, applies the method patches and
    * injections to the library, and returns a list of class
    * patches.
    */
-  Future patchLibrary(LibraryLoader loader,
-                      Uri patchUri, LibraryElement originLibrary) {
-    return compiler.readScript(originLibrary, patchUri)
-        .then((Script script) {
+  Future patchLibrary(
+      LibraryLoader loader, Uri patchUri, LibraryElement originLibrary) {
+    return compiler.readScript(patchUri, originLibrary).then((Script script) {
       var patchLibrary = new LibraryElementX(script, null, originLibrary);
       return reporter.withCurrentElement(patchLibrary, () {
         loader.registerNewLibrary(patchLibrary);
@@ -193,14 +177,10 @@
       // TODO(johnniwinther): Test that parts and exports are handled correctly.
       Script script = compilationUnit.script;
       Token tokens = new Scanner(script.file).tokenize();
-      Function idGenerator = compiler.getNextFreeClassId;
-      Listener patchListener = new PatchElementListener(compiler,
-                                                        compilationUnit,
-                                                        idGenerator);
+      Listener patchListener =
+          new PatchElementListener(compiler, compilationUnit, compiler);
       try {
-        new PartialParser(patchListener,
-            enableConditionalDirectives: _enableConditionalDirectives)
-            .parseUnit(tokens);
+        new PartialParser(patchListener, parserOptions).parseUnit(tokens);
       } on ParserError catch (e) {
         // No need to recover from a parser error in platform libraries, user
         // will never see this if the libraries are tested correctly.
@@ -216,21 +196,19 @@
     if (cls.cachedNode != null) return;
 
     measure(() => reporter.withCurrentElement(cls, () {
-      MemberListener listener = new PatchMemberListener(compiler, cls);
-      Parser parser = new PatchClassElementParser(
-          listener, enableConditionalDirectives: _enableConditionalDirectives);
-      try {
-        Token token = parser.parseTopLevelDeclaration(cls.beginToken);
-        assert(identical(token, cls.endToken.next));
-      } on ParserError catch (e) {
-        // No need to recover from a parser error in platform libraries, user
-        // will never see this if the libraries are tested correctly.
-        reporter.internalError(
-            cls, "Parser error in patch file: $e");
-      }
-      cls.cachedNode = listener.popNode();
-      assert(listener.nodes.isEmpty);
-    }));
+          MemberListener listener = new PatchMemberListener(compiler, cls);
+          Parser parser = new PatchClassElementParser(listener, parserOptions);
+          try {
+            Token token = parser.parseTopLevelDeclaration(cls.beginToken);
+            assert(identical(token, cls.endToken.next));
+          } on ParserError catch (e) {
+            // No need to recover from a parser error in platform libraries, user
+            // will never see this if the libraries are tested correctly.
+            reporter.internalError(cls, "Parser error in patch file: $e");
+          }
+          cls.cachedNode = listener.popNode();
+          assert(listener.nodes.isEmpty);
+        }));
   }
 }
 
@@ -240,8 +218,7 @@
   PatchMemberListener(Compiler compiler, ClassElement enclosingClass)
       : this.compiler = compiler,
         super(compiler.parsing.getScannerOptionsFor(enclosingClass),
-              compiler.reporter,
-              enclosingClass);
+            compiler.reporter, enclosingClass);
 
   @override
   void addMember(Element patch) {
@@ -270,9 +247,8 @@
  * declarations.
  */
 class PatchClassElementParser extends PartialParser {
-  PatchClassElementParser(Listener listener, {bool enableConditionalDirectives})
-      : super(listener,
-          enableConditionalDirectives: enableConditionalDirectives);
+  PatchClassElementParser(Listener listener, ParserOptions options)
+      : super(listener, options);
 
   Token parseClassBody(Token token) => fullParseClassBody(token);
 }
@@ -283,11 +259,10 @@
 class PatchElementListener extends ElementListener implements Listener {
   final Compiler compiler;
 
-  PatchElementListener(Compiler compiler,
-                       CompilationUnitElement patchElement,
-                       int idGenerator())
-    : this.compiler = compiler,
-      super(compiler.parsing.getScannerOptionsFor(patchElement),
+  PatchElementListener(Compiler compiler, CompilationUnitElement patchElement,
+      IdGenerator idGenerator)
+      : this.compiler = compiler,
+        super(compiler.parsing.getScannerOptionsFor(patchElement),
             compiler.reporter, patchElement, idGenerator);
 
   @override
@@ -314,10 +289,8 @@
   }
 }
 
-void patchElement(Compiler compiler,
-                  DiagnosticReporter reporter,
-                  Element origin,
-                  Element patch) {
+void patchElement(Compiler compiler, DiagnosticReporter reporter,
+    Element origin, Element patch) {
   if (origin == null) {
     reporter.reportErrorMessage(
         patch, MessageKind.PATCH_NON_EXISTING, {'name': patch.name});
@@ -325,9 +298,9 @@
   }
 
   if (!(origin.isClass ||
-        origin.isConstructor ||
-        origin.isFunction ||
-        origin.isAbstractField)) {
+      origin.isConstructor ||
+      origin.isFunction ||
+      origin.isAbstractField)) {
     // TODO(ahe): Remove this error when the parser rejects all bad modifiers.
     reporter.reportErrorMessage(origin, MessageKind.PATCH_NONPATCHABLE);
     return;
@@ -340,7 +313,7 @@
     tryPatchSetter(reporter, origin, patch);
   } else if (patch.isConstructor) {
     tryPatchConstructor(reporter, origin, patch);
-  } else if(patch.isFunction) {
+  } else if (patch.isFunction) {
     tryPatchFunction(reporter, origin, patch);
   } else {
     // TODO(ahe): Remove this error when the parser rejects all bad modifiers.
@@ -348,34 +321,25 @@
   }
 }
 
-void tryPatchClass(Compiler compiler,
-                   DiagnosticReporter reporter,
-                   Element origin,
-                   ClassElement patch) {
+void tryPatchClass(Compiler compiler, DiagnosticReporter reporter,
+    Element origin, ClassElement patch) {
   if (!origin.isClass) {
     reporter.reportError(
         reporter.createMessage(
-            origin,
-            MessageKind.PATCH_NON_CLASS,
-            {'className': patch.name}),
+            origin, MessageKind.PATCH_NON_CLASS, {'className': patch.name}),
         <DiagnosticMessage>[
-            reporter.createMessage(
-                patch,
-                MessageKind.PATCH_POINT_TO_CLASS,
-                {'className': patch.name}),
+          reporter.createMessage(patch, MessageKind.PATCH_POINT_TO_CLASS,
+              {'className': patch.name}),
         ]);
     return;
   }
   patchClass(compiler, reporter, origin, patch);
 }
 
-void patchClass(Compiler compiler,
-                DiagnosticReporter reporter,
-                ClassElementX origin,
-                ClassElementX patch) {
+void patchClass(Compiler compiler, DiagnosticReporter reporter,
+    ClassElementX origin, ClassElementX patch) {
   if (origin.isPatched) {
-    reporter.internalError(origin,
-        "Patching the same class more than once.");
+    reporter.internalError(origin, "Patching the same class more than once.");
   }
   origin.applyPatch(patch);
   checkNativeAnnotation(compiler, patch);
@@ -384,16 +348,15 @@
 /// Check whether [cls] has a `@Native(...)` annotation, and if so, set its
 /// native name from the annotation.
 checkNativeAnnotation(Compiler compiler, ClassElement cls) {
-  EagerAnnotationHandler.checkAnnotation(compiler, cls,
-      const NativeAnnotationHandler());
+  EagerAnnotationHandler.checkAnnotation(
+      compiler, cls, const NativeAnnotationHandler());
 }
 
 checkJsInteropAnnotation(Compiler compiler, element) {
-  EagerAnnotationHandler.checkAnnotation(compiler, element,
-      const JsInteropAnnotationHandler());
+  EagerAnnotationHandler.checkAnnotation(
+      compiler, element, const JsInteropAnnotationHandler());
 }
 
-
 /// Abstract interface for pre-resolution detection of metadata.
 ///
 /// The detection is handled in two steps:
@@ -405,22 +368,16 @@
   /// Checks that [annotation] looks like a matching annotation and optionally
   /// applies actions on [element]. Returns a non-null annotation marker if the
   /// annotation matched and should be validated.
-  T apply(Compiler compiler,
-          Element element,
-          MetadataAnnotation annotation);
+  T apply(Compiler compiler, Element element, MetadataAnnotation annotation);
 
   /// Checks that the annotation value is valid.
-  void validate(Compiler compiler,
-                Element element,
-                MetadataAnnotation annotation,
-                ConstantValue constant);
-
+  void validate(Compiler compiler, Element element,
+      MetadataAnnotation annotation, ConstantValue constant);
 
   /// Checks [element] for metadata matching the [handler]. Return a non-null
   /// annotation marker matching metadata was found.
-  static checkAnnotation(Compiler compiler,
-                         Element element,
-                         EagerAnnotationHandler handler) {
+  static checkAnnotation(
+      Compiler compiler, Element element, EagerAnnotationHandler handler) {
     for (MetadataAnnotation annotation in element.implementation.metadata) {
       var result = handler.apply(compiler, element, annotation);
       if (result != null) {
@@ -428,8 +385,7 @@
         // [Compiler.onLibrariesLoaded].
         compiler.enqueuer.resolution.addDeferredAction(element, () {
           annotation.ensureResolved(compiler.resolution);
-          handler.validate(
-              compiler, element, annotation,
+          handler.validate(compiler, element, annotation,
               compiler.constants.getConstantValue(annotation.constant));
         });
         return result;
@@ -456,24 +412,21 @@
     return null;
   }
 
-  String apply(Compiler compiler,
-             Element element,
-             MetadataAnnotation annotation) {
+  String apply(
+      Compiler compiler, Element element, MetadataAnnotation annotation) {
     if (element.isClass) {
       String native = getNativeAnnotation(annotation);
       if (native != null) {
         JavaScriptBackend backend = compiler.backend;
-        backend.setNativeClassTagInfo(element, native);
+        backend.nativeData.setNativeClassTagInfo(element, native);
         return native;
       }
     }
     return null;
   }
 
-  void validate(Compiler compiler,
-                Element element,
-                MetadataAnnotation annotation,
-                ConstantValue constant) {
+  void validate(Compiler compiler, Element element,
+      MetadataAnnotation annotation, ConstantValue constant) {
     DartType annotationType = constant.getType(compiler.coreTypes);
     if (annotationType.element != compiler.nativeAnnotationClass) {
       DiagnosticReporter reporter = compiler.reporter;
@@ -490,13 +443,12 @@
   bool hasJsNameAnnotation(MetadataAnnotation annotation) =>
       annotation.beginToken != null && annotation.beginToken.next.value == 'JS';
 
-  bool apply(Compiler compiler,
-             Element element,
-             MetadataAnnotation annotation) {
+  bool apply(
+      Compiler compiler, Element element, MetadataAnnotation annotation) {
     bool hasJsInterop = hasJsNameAnnotation(annotation);
     if (hasJsInterop) {
       JavaScriptBackend backend = compiler.backend;
-      backend.markAsJsInterop(element);
+      backend.nativeData.markAsJsInterop(element);
     }
     // Due to semantics of apply in the baseclass we have to return null to
     // indicate that no match was found.
@@ -504,14 +456,13 @@
   }
 
   @override
-  void validate(Compiler compiler,
-                Element element,
-                MetadataAnnotation annotation,
-                ConstantValue constant) {
+  void validate(Compiler compiler, Element element,
+      MetadataAnnotation annotation, ConstantValue constant) {
     JavaScriptBackend backend = compiler.backend;
     if (constant.getType(compiler.coreTypes).element !=
         backend.helpers.jsAnnotationClass) {
-      compiler.reporter.internalError(annotation, 'Invalid @JS(...) annotation.');
+      compiler.reporter
+          .internalError(annotation, 'Invalid @JS(...) annotation.');
     }
   }
 }
@@ -536,17 +487,14 @@
   }
 
   @override
-  PatchVersion apply(Compiler compiler,
-                     Element element,
-                     MetadataAnnotation annotation) {
+  PatchVersion apply(
+      Compiler compiler, Element element, MetadataAnnotation annotation) {
     return getPatchVersion(annotation);
   }
 
   @override
-  void validate(Compiler compiler,
-                Element element,
-                MetadataAnnotation annotation,
-                ConstantValue constant) {
+  void validate(Compiler compiler, Element element,
+      MetadataAnnotation annotation, ConstantValue constant) {
     DartType annotationType = constant.getType(compiler.coreTypes);
     if (annotationType.element != compiler.patchAnnotationClass) {
       DiagnosticReporter reporter = compiler.reporter;
@@ -555,21 +503,15 @@
   }
 }
 
-
-void tryPatchGetter(DiagnosticReporter reporter,
-                    Element origin,
-                    FunctionElement patch) {
+void tryPatchGetter(
+    DiagnosticReporter reporter, Element origin, FunctionElement patch) {
   if (!origin.isAbstractField) {
     reporter.reportError(
         reporter.createMessage(
-            origin,
-            MessageKind.PATCH_NON_GETTER,
-            {'name': origin.name}),
+            origin, MessageKind.PATCH_NON_GETTER, {'name': origin.name}),
         <DiagnosticMessage>[
-            reporter.createMessage(
-                patch,
-                MessageKind.PATCH_POINT_TO_GETTER,
-                {'getterName': patch.name}),
+          reporter.createMessage(patch, MessageKind.PATCH_POINT_TO_GETTER,
+              {'getterName': patch.name}),
         ]);
     return;
   }
@@ -577,14 +519,10 @@
   if (originField.getter == null) {
     reporter.reportError(
         reporter.createMessage(
-            origin,
-            MessageKind.PATCH_NO_GETTER,
-            {'getterName': patch.name}),
+            origin, MessageKind.PATCH_NO_GETTER, {'getterName': patch.name}),
         <DiagnosticMessage>[
-            reporter.createMessage(
-                patch,
-                MessageKind.PATCH_POINT_TO_GETTER,
-                {'getterName': patch.name}),
+          reporter.createMessage(patch, MessageKind.PATCH_POINT_TO_GETTER,
+              {'getterName': patch.name}),
         ]);
     return;
   }
@@ -592,20 +530,15 @@
   patchFunction(reporter, getter, patch);
 }
 
-void tryPatchSetter(DiagnosticReporter reporter,
-                    Element origin,
-                    FunctionElement patch) {
+void tryPatchSetter(
+    DiagnosticReporter reporter, Element origin, FunctionElement patch) {
   if (!origin.isAbstractField) {
     reporter.reportError(
         reporter.createMessage(
-            origin,
-            MessageKind.PATCH_NON_SETTER,
-            {'name': origin.name}),
+            origin, MessageKind.PATCH_NON_SETTER, {'name': origin.name}),
         <DiagnosticMessage>[
-            reporter.createMessage(
-                patch,
-                MessageKind.PATCH_POINT_TO_SETTER,
-                {'setterName': patch.name}),
+          reporter.createMessage(patch, MessageKind.PATCH_POINT_TO_SETTER,
+              {'setterName': patch.name}),
         ]);
     return;
   }
@@ -613,14 +546,10 @@
   if (originField.setter == null) {
     reporter.reportError(
         reporter.createMessage(
-            origin,
-            MessageKind.PATCH_NO_SETTER,
-            {'setterName': patch.name}),
+            origin, MessageKind.PATCH_NO_SETTER, {'setterName': patch.name}),
         <DiagnosticMessage>[
-              reporter.createMessage(
-                  patch,
-                  MessageKind.PATCH_POINT_TO_SETTER,
-                  {'setterName': patch.name}),
+          reporter.createMessage(patch, MessageKind.PATCH_POINT_TO_SETTER,
+              {'setterName': patch.name}),
         ]);
     return;
   }
@@ -628,70 +557,57 @@
   patchFunction(reporter, setter, patch);
 }
 
-void tryPatchConstructor(DiagnosticReporter reporter,
-                         Element origin,
-                         FunctionElement patch) {
+void tryPatchConstructor(
+    DiagnosticReporter reporter, Element origin, FunctionElement patch) {
   if (!origin.isConstructor) {
     reporter.reportError(
-        reporter.createMessage(
-            origin,
-            MessageKind.PATCH_NON_CONSTRUCTOR,
+        reporter.createMessage(origin, MessageKind.PATCH_NON_CONSTRUCTOR,
             {'constructorName': patch.name}),
         <DiagnosticMessage>[
-            reporter.createMessage(
-                patch,
-                MessageKind.PATCH_POINT_TO_CONSTRUCTOR,
-                {'constructorName': patch.name}),
+          reporter.createMessage(patch, MessageKind.PATCH_POINT_TO_CONSTRUCTOR,
+              {'constructorName': patch.name}),
         ]);
     return;
   }
   patchFunction(reporter, origin, patch);
 }
 
-void tryPatchFunction(DiagnosticReporter reporter,
-                      Element origin,
-                      FunctionElement patch) {
+void tryPatchFunction(
+    DiagnosticReporter reporter, Element origin, FunctionElement patch) {
   if (!origin.isFunction) {
     reporter.reportError(
-        reporter.createMessage(
-            origin,
-            MessageKind.PATCH_NON_FUNCTION,
+        reporter.createMessage(origin, MessageKind.PATCH_NON_FUNCTION,
             {'functionName': patch.name}),
         <DiagnosticMessage>[
-            reporter.createMessage(
-                patch,
-                MessageKind.PATCH_POINT_TO_FUNCTION,
-                {'functionName': patch.name}),
+          reporter.createMessage(patch, MessageKind.PATCH_POINT_TO_FUNCTION,
+              {'functionName': patch.name}),
         ]);
     return;
   }
   patchFunction(reporter, origin, patch);
 }
 
-void patchFunction(DiagnosticReporter reporter,
-                   BaseFunctionElementX origin,
-                   BaseFunctionElementX patch) {
+void patchFunction(DiagnosticReporter reporter, BaseFunctionElementX origin,
+    BaseFunctionElementX patch) {
   if (!origin.modifiers.isExternal) {
     reporter.reportError(
         reporter.createMessage(origin, MessageKind.PATCH_NON_EXTERNAL),
         <DiagnosticMessage>[
-              reporter.createMessage(
-                  patch,
-                  MessageKind.PATCH_POINT_TO_FUNCTION,
-                  {'functionName': patch.name}),
+          reporter.createMessage(patch, MessageKind.PATCH_POINT_TO_FUNCTION,
+              {'functionName': patch.name}),
         ]);
     return;
   }
   if (origin.isPatched) {
-    reporter.internalError(origin,
-        "Trying to patch a function more than once.");
+    reporter.internalError(
+        origin, "Trying to patch a function more than once.");
   }
   origin.applyPatch(patch);
 }
 
 PatchVersion getPatchVersion(Compiler compiler, Element element) {
-  return EagerAnnotationHandler.checkAnnotation(compiler, element,
-      const PatchAnnotationHandler());
+  return EagerAnnotationHandler.checkAnnotation(
+      compiler, element, const PatchAnnotationHandler());
 }
 
 class PatchVersion {
diff --git a/pkg/compiler/lib/src/platform_configuration.dart b/pkg/compiler/lib/src/platform_configuration.dart
index 41da852..56a48df 100644
--- a/pkg/compiler/lib/src/platform_configuration.dart
+++ b/pkg/compiler/lib/src/platform_configuration.dart
@@ -75,8 +75,9 @@
           error("Section heading lines must end with ']'", endOfHeader + 1);
         }
         int startOfSectionName = startOfLine + 1;
-        String sectionName = new String.fromCharCodes(
-            source, startOfSectionName, endOfHeader).trim();
+        String sectionName =
+            new String.fromCharCodes(source, startOfSectionName, endOfHeader)
+                .trim();
         currentSection = new Map<String, String>();
         if (result.containsKey(sectionName)) {
           error("Duplicate section name '$sectionName'", startOfSectionName);
diff --git a/pkg/compiler/lib/src/resolution/access_semantics.dart b/pkg/compiler/lib/src/resolution/access_semantics.dart
index baead69..fdd8410 100644
--- a/pkg/compiler/lib/src/resolution/access_semantics.dart
+++ b/pkg/compiler/lib/src/resolution/access_semantics.dart
@@ -149,33 +149,41 @@
 enum CompoundAccessKind {
   /// Read from a static getter and write to a static setter.
   STATIC_GETTER_SETTER,
+
   /// Read from a static method (closurize) and write to a static setter.
   STATIC_METHOD_SETTER,
 
   /// Read from an unresolved static getter and write to a static setter.
   UNRESOLVED_STATIC_GETTER,
+
   /// Read from a static getter and write to an unresolved static setter.
   UNRESOLVED_STATIC_SETTER,
 
   /// Read from a top level getter and write to a top level setter.
   TOPLEVEL_GETTER_SETTER,
+
   /// Read from a top level method (closurize) and write to top level setter.
   TOPLEVEL_METHOD_SETTER,
 
   /// Read from an unresolved top level getter and write to a top level setter.
   UNRESOLVED_TOPLEVEL_GETTER,
+
   /// Read from a top level getter and write to an unresolved top level setter.
   UNRESOLVED_TOPLEVEL_SETTER,
 
   /// Read from one superclass field and write to another.
   SUPER_FIELD_FIELD,
+
   /// Read from a superclass field and write to a superclass setter.
   SUPER_FIELD_SETTER,
+
   /// Read from a superclass getter and write to a superclass setter.
   SUPER_GETTER_SETTER,
+
   /// Read from a superclass method (closurize) and write to a superclass
   /// setter.
   SUPER_METHOD_SETTER,
+
   /// Read from a superclass getter and write to a superclass field.
   SUPER_GETTER_FIELD,
 
@@ -183,6 +191,7 @@
   // TODO(johnniwinther): Use [AccessKind.SUPER_GETTER] when the erroneous
   // element is no longer needed.
   UNRESOLVED_SUPER_GETTER,
+
   /// Read from a superclass getter and write to an unresolved setter.
   // TODO(johnniwinther): Use [AccessKind.SUPER_SETTER] when the erroneous
   // element is no longer needed.
@@ -243,7 +252,6 @@
   }
 }
 
-
 class DynamicAccess extends AccessSemantics {
   final Name name;
 
@@ -268,8 +276,7 @@
 class ConstantAccess extends AccessSemantics {
   final ConstantExpression constant;
 
-  ConstantAccess(AccessKind kind, this.constant)
-      : super._(kind);
+  ConstantAccess(AccessKind kind, this.constant) : super._(kind);
 
   ConstantAccess.classTypeLiteral(this.constant)
       : super._(AccessKind.CLASS_TYPE_LITERAL);
@@ -284,8 +291,7 @@
 class StaticAccess extends AccessSemantics {
   final Element element;
 
-  StaticAccess._(AccessKind kind, this.element)
-      : super._(kind);
+  StaticAccess.internal(AccessKind kind, this.element) : super._(kind);
 
   StaticAccess.superSetter(MethodElement this.element)
       : super._(AccessKind.SUPER_SETTER);
@@ -350,14 +356,12 @@
   StaticAccess.topLevelSetter(MethodElement this.element)
       : super._(AccessKind.TOPLEVEL_SETTER);
 
-  StaticAccess.unresolved(this.element)
-      : super._(AccessKind.UNRESOLVED);
+  StaticAccess.unresolved(this.element) : super._(AccessKind.UNRESOLVED);
 
   StaticAccess.unresolvedSuper(this.element)
       : super._(AccessKind.UNRESOLVED_SUPER);
 
-  StaticAccess.invalid(this.element)
-      : super._(AccessKind.INVALID);
+  StaticAccess.invalid(this.element) : super._(AccessKind.INVALID);
 }
 
 class CompoundAccessSemantics extends AccessSemantics {
@@ -365,9 +369,7 @@
   final Element getter;
   final Element setter;
 
-  CompoundAccessSemantics(this.compoundAccessKind,
-                          this.getter,
-                          this.setter)
+  CompoundAccessSemantics(this.compoundAccessKind, this.getter, this.setter)
       : super._(AccessKind.COMPOUND);
 
   Element get element => setter;
diff --git a/pkg/compiler/lib/src/resolution/class_hierarchy.dart b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
index f46b9fdc..25893e2 100644
--- a/pkg/compiler/lib/src/resolution/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
@@ -5,57 +5,44 @@
 library dart2js.resolution.class_hierarchy;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Feature;
-import '../compiler.dart' show
-    Compiler;
-import '../core_types.dart' show
-    CoreClasses,
-    CoreTypes;
+import '../common/resolution.dart' show Feature;
+import '../compiler.dart' show Compiler;
+import '../core_types.dart' show CoreClasses, CoreTypes;
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    BaseClassElementX,
-    ErroneousElementX,
-    MixinApplicationElementX,
-    SynthesizedConstructorElementX,
-    TypeVariableElementX,
-    UnnamedMixinApplicationElementX;
-import '../ordered_typeset.dart' show
-    OrderedTypeSet,
-    OrderedTypeSetBuilder;
+import '../elements/modelx.dart'
+    show
+        BaseClassElementX,
+        ErroneousElementX,
+        MixinApplicationElementX,
+        SynthesizedConstructorElementX,
+        TypeVariableElementX,
+        UnnamedMixinApplicationElementX;
+import '../ordered_typeset.dart' show OrderedTypeSet, OrderedTypeSetBuilder;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link,
-    Setlet;
-import '../universe/call_structure.dart' show
-    CallStructure;
+import '../util/util.dart' show Link, Setlet;
+import '../universe/call_structure.dart' show CallStructure;
 
 import 'enum_creator.dart';
-import 'members.dart' show
-    lookupInScope;
-import 'registry.dart' show
-    ResolutionRegistry;
-import 'resolution_common.dart' show
-    CommonResolverVisitor,
-    MappingVisitor;
-import 'scope.dart' show
-    Scope,
-    TypeDeclarationScope;
+import 'members.dart' show lookupInScope;
+import 'registry.dart' show ResolutionRegistry;
+import 'resolution_common.dart' show CommonResolverVisitor, MappingVisitor;
+import 'scope.dart' show Scope, TypeDeclarationScope;
 
 class TypeDefinitionVisitor extends MappingVisitor<DartType> {
   Scope scope;
   final TypeDeclarationElement enclosingElement;
   TypeDeclarationElement get element => enclosingElement;
 
-  TypeDefinitionVisitor(Compiler compiler,
-                        TypeDeclarationElement element,
-                        ResolutionRegistry registry)
+  TypeDefinitionVisitor(Compiler compiler, TypeDeclarationElement element,
+      ResolutionRegistry registry)
       : this.enclosingElement = element,
         scope = Scope.buildEnclosingScope(element),
         super(compiler, registry);
 
-  DartType get objectType => compiler.coreTypes.objectType;
+  CoreTypes get coreTypes => compiler.coreTypes;
+
+  DartType get objectType => coreTypes.objectType;
 
   void resolveTypeVariableBounds(NodeList node) {
     if (node == null) return;
@@ -80,8 +67,8 @@
 
       TypeVariableElementX variableElement = typeVariable.element;
       if (typeNode.bound != null) {
-        DartType boundType = typeResolver.resolveTypeAnnotation(
-            this, typeNode.bound);
+        DartType boundType =
+            typeResolver.resolveTypeAnnotation(this, typeNode.bound);
         variableElement.boundCache = boundType;
 
         void checkTypeVariableBound() {
@@ -131,18 +118,17 @@
 class ClassResolverVisitor extends TypeDefinitionVisitor {
   BaseClassElementX get element => enclosingElement;
 
-  ClassResolverVisitor(Compiler compiler,
-                       ClassElement classElement,
-                       ResolutionRegistry registry)
-    : super(compiler, classElement, registry);
+  ClassResolverVisitor(
+      Compiler compiler, ClassElement classElement, ResolutionRegistry registry)
+      : super(compiler, classElement, registry);
 
   DartType visitClassNode(ClassNode node) {
     if (element == null) {
       throw reporter.internalError(node, 'element is null');
     }
     if (element.resolutionState != STATE_STARTED) {
-      throw reporter.internalError(element,
-          'cyclic resolution of class $element');
+      throw reporter.internalError(
+          element, 'cyclic resolution of class $element');
     }
 
     element.computeType(resolution);
@@ -160,8 +146,8 @@
         DartType supertype = resolveSupertype(element, superMixin.superclass);
         Link<Node> link = superMixin.mixins.nodes;
         while (!link.isEmpty) {
-          supertype = applyMixin(supertype,
-                                 checkMixinType(link.head), link.head);
+          supertype =
+              applyMixin(supertype, checkMixinType(link.head), link.head);
           link = link.tail;
         }
         element.supertype = supertype;
@@ -178,8 +164,8 @@
       // Avoid making the superclass (usually Object) extend itself.
       if (element != superElement) {
         if (superElement == null) {
-          reporter.internalError(node,
-              "Cannot resolve default superclass for $element.");
+          reporter.internalError(
+              node, "Cannot resolve default superclass for $element.");
         } else {
           superElement.ensureResolved(resolution);
         }
@@ -202,23 +188,21 @@
         // TODO(ahe): Why is this a compile-time error? Or if it is an error,
         // why do we bother to registerThrowNoSuchMethod below?
         reporter.reportErrorMessage(node, kind, arguments);
-        superMember = new ErroneousElementX(
-            kind, arguments, '', element);
+        superMember = new ErroneousElementX(kind, arguments, '', element);
         registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
       } else if (!superMember.isGenerativeConstructor) {
-          MessageKind kind = MessageKind.SUPER_CALL_TO_FACTORY;
-          Map arguments = {'className': element.superclass.name};
-          // TODO(ahe): Why is this a compile-time error? Or if it is an error,
-          // why do we bother to registerThrowNoSuchMethod below?
-          reporter.reportErrorMessage(node, kind, arguments);
-          superMember = new ErroneousElementX(
-              kind, arguments, '', element);
-          registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
+        MessageKind kind = MessageKind.SUPER_CALL_TO_FACTORY;
+        Map arguments = {'className': element.superclass.name};
+        // TODO(ahe): Why is this a compile-time error? Or if it is an error,
+        // why do we bother to registerThrowNoSuchMethod below?
+        reporter.reportErrorMessage(node, kind, arguments);
+        superMember = new ErroneousElementX(kind, arguments, '', element);
+        registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
       } else {
         ConstructorElement superConstructor = superMember;
         superConstructor.computeType(resolution);
-        if (!CallStructure.NO_ARGS.signatureApplies(
-                superConstructor.functionSignature)) {
+        if (!CallStructure.NO_ARGS
+            .signatureApplies(superConstructor.functionSignature)) {
           MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT;
           reporter.reportErrorMessage(node, kind);
           superMember = new ErroneousElementX(kind, {}, '', element);
@@ -240,20 +224,18 @@
       throw reporter.internalError(node, 'element is null');
     }
     if (element.resolutionState != STATE_STARTED) {
-      throw reporter.internalError(element,
-          'cyclic resolution of class $element');
+      throw reporter.internalError(
+          element, 'cyclic resolution of class $element');
     }
 
     InterfaceType enumType = element.computeType(resolution);
-    element.supertype = compiler.coreTypes.objectType;
+    element.supertype = objectType;
     element.interfaces = const Link<DartType>();
     calculateAllSupertypes(element);
 
     if (node.names.nodes.isEmpty) {
       reporter.reportErrorMessage(
-          node,
-          MessageKind.EMPTY_ENUM_DECLARATION,
-          {'enumName': element.name});
+          node, MessageKind.EMPTY_ENUM_DECLARATION, {'enumName': element.name});
     }
 
     EnumCreator creator =
@@ -268,22 +250,14 @@
     DartType mixinType = resolveType(mixinNode);
     if (isBlackListed(mixinType)) {
       reporter.reportErrorMessage(
-          mixinNode,
-          MessageKind.CANNOT_MIXIN,
-          {'type': mixinType});
+          mixinNode, MessageKind.CANNOT_MIXIN, {'type': mixinType});
     } else if (mixinType.isTypeVariable) {
-      reporter.reportErrorMessage(
-          mixinNode,
-          MessageKind.CLASS_NAME_EXPECTED);
+      reporter.reportErrorMessage(mixinNode, MessageKind.CLASS_NAME_EXPECTED);
     } else if (mixinType.isMalformed) {
-      reporter.reportErrorMessage(
-          mixinNode,
-          MessageKind.CANNOT_MIXIN_MALFORMED,
+      reporter.reportErrorMessage(mixinNode, MessageKind.CANNOT_MIXIN_MALFORMED,
           {'className': element.name, 'malformedType': mixinType});
     } else if (mixinType.isEnumType) {
-      reporter.reportErrorMessage(
-          mixinNode,
-          MessageKind.CANNOT_MIXIN_ENUM,
+      reporter.reportErrorMessage(mixinNode, MessageKind.CANNOT_MIXIN_ENUM,
           {'className': element.name, 'enumType': mixinType});
     }
     return mixinType;
@@ -294,16 +268,15 @@
       throw reporter.internalError(node, 'element is null');
     }
     if (element.resolutionState != STATE_STARTED) {
-      throw reporter.internalError(element,
-          'cyclic resolution of class $element');
+      throw reporter.internalError(
+          element, 'cyclic resolution of class $element');
     }
 
     if (identical(node.classKeyword.stringValue, 'typedef')) {
       // TODO(aprelev@gmail.com): Remove this deprecation diagnostic
       // together with corresponding TODO in parser.dart.
       reporter.reportWarningMessage(
-          node.classKeyword,
-          MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX);
+          node.classKeyword, MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX);
     }
 
     element.computeType(resolution);
@@ -326,11 +299,8 @@
     String superName = supertype.name;
     String mixinName = mixinType.name;
     MixinApplicationElementX mixinApplication =
-        new UnnamedMixinApplicationElementX(
-          "${superName}+${mixinName}",
-          element.compilationUnit,
-          compiler.getNextFreeClassId(),
-          node);
+        new UnnamedMixinApplicationElementX("${superName}+${mixinName}",
+            element.compilationUnit, compiler.getNextFreeId(), node);
     // Create synthetic type variables for the mixin application.
     List<DartType> typeVariables = <DartType>[];
     int index = 0;
@@ -361,8 +331,8 @@
     // Replace the synthetic type variables by the original type variables in
     // the returned type (which should be the type actually extended).
     InterfaceType mixinThisType = mixinApplication.thisType;
-    return mixinThisType.subst(element.typeVariables,
-                               mixinThisType.typeArguments);
+    return mixinThisType.subst(
+        element.typeVariables, mixinThisType.typeArguments);
   }
 
   bool isDefaultConstructor(FunctionElement constructor) {
@@ -371,8 +341,8 @@
     return constructor.functionSignature.parameterCount == 0;
   }
 
-  FunctionElement createForwardingConstructor(ConstructorElement target,
-                                              ClassElement enclosing) {
+  FunctionElement createForwardingConstructor(
+      ConstructorElement target, ClassElement enclosing) {
     FunctionElement constructor =
         new SynthesizedConstructorElementX.notForDefault(
             target.name, target, enclosing);
@@ -380,10 +350,8 @@
     return constructor;
   }
 
-  void doApplyMixinTo(
-      MixinApplicationElementX mixinApplication,
-      DartType supertype,
-      DartType mixinType) {
+  void doApplyMixinTo(MixinApplicationElementX mixinApplication,
+      DartType supertype, DartType mixinType) {
     Node node = mixinApplication.parseNode(resolution.parsing);
 
     if (mixinApplication.supertype != null) {
@@ -399,8 +367,8 @@
     NamedMixinApplication namedMixinApplication =
         node.asNamedMixinApplication();
     Link<DartType> interfaces = (namedMixinApplication != null)
-        ? resolveInterfaces(namedMixinApplication.interfaces,
-                            namedMixinApplication.superclass)
+        ? resolveInterfaces(
+            namedMixinApplication.interfaces, namedMixinApplication.superclass)
         : const Link<DartType>();
 
     // The class that is the result of a mixin application implements
@@ -413,8 +381,8 @@
       }
       mixinApplication.interfaces = interfaces;
     } else {
-      assert(invariant(mixinApplication,
-          mixinApplication.hasIncompleteHierarchy));
+      assert(
+          invariant(mixinApplication, mixinApplication.hasIncompleteHierarchy));
     }
 
     ClassElement superclass = supertype.element;
@@ -446,13 +414,13 @@
     calculateAllSupertypes(mixinApplication);
   }
 
-  InterfaceType resolveMixinFor(MixinApplicationElement mixinApplication,
-                                DartType mixinType) {
+  InterfaceType resolveMixinFor(
+      MixinApplicationElement mixinApplication, DartType mixinType) {
     ClassElement mixin = mixinType.element;
     mixin.ensureResolved(resolution);
 
     // Check for cycles in the mixin chain.
-    ClassElement previous = mixinApplication;  // For better error messages.
+    ClassElement previous = mixinApplication; // For better error messages.
     ClassElement current = mixin;
     while (current != null && current.isMixinApplication) {
       MixinApplicationElement currentMixinApplication = current;
@@ -487,21 +455,16 @@
             {'className': element.name, 'malformedType': supertype});
         return objectType;
       } else if (supertype.isEnumType) {
-        reporter.reportErrorMessage(
-            superclass,
-            MessageKind.CANNOT_EXTEND_ENUM,
+        reporter.reportErrorMessage(superclass, MessageKind.CANNOT_EXTEND_ENUM,
             {'className': element.name, 'enumType': supertype});
         return objectType;
       } else if (!supertype.isInterfaceType) {
         reporter.reportErrorMessage(
-            superclass.typeName,
-            MessageKind.CLASS_NAME_EXPECTED);
+            superclass.typeName, MessageKind.CLASS_NAME_EXPECTED);
         return objectType;
       } else if (isBlackListed(supertype)) {
         reporter.reportErrorMessage(
-            superclass,
-            MessageKind.CANNOT_EXTEND,
-            {'type': supertype});
+            superclass, MessageKind.CANNOT_EXTEND, {'type': supertype});
         return objectType;
       }
     }
@@ -541,16 +504,12 @@
                 {'type': interfaceType});
           }
           if (result.contains(interfaceType)) {
-            reporter.reportErrorMessage(
-                link.head,
-                MessageKind.DUPLICATE_IMPLEMENTS,
-                {'type': interfaceType});
+            reporter.reportErrorMessage(link.head,
+                MessageKind.DUPLICATE_IMPLEMENTS, {'type': interfaceType});
           }
           result = result.prepend(interfaceType);
           if (isBlackListed(interfaceType)) {
-            reporter.reportErrorMessage(
-                link.head,
-                MessageKind.CANNOT_IMPLEMENT,
+            reporter.reportErrorMessage(link.head, MessageKind.CANNOT_IMPLEMENT,
                 {'type': interfaceType});
           }
         }
@@ -579,24 +538,9 @@
     if (cls.allSupertypesAndSelf != null) return;
     final DartType supertype = cls.supertype;
     if (supertype != null) {
-      OrderedTypeSetBuilder allSupertypes = new OrderedTypeSetBuilder(cls);
-      // TODO(15296): Collapse these iterations to one when the order is not
-      // needed.
-      allSupertypes.add(compiler, supertype);
-      for (Link<DartType> interfaces = cls.interfaces;
-           !interfaces.isEmpty;
-           interfaces = interfaces.tail) {
-        allSupertypes.add(compiler, interfaces.head);
-      }
-
-      addAllSupertypes(allSupertypes, supertype);
-      for (Link<DartType> interfaces = cls.interfaces;
-           !interfaces.isEmpty;
-           interfaces = interfaces.tail) {
-        addAllSupertypes(allSupertypes, interfaces.head);
-      }
-      allSupertypes.add(compiler, cls.computeType(resolution));
-      cls.allSupertypesAndSelf = allSupertypes.toTypeSet();
+      cls.allSupertypesAndSelf = new OrderedTypeSetBuilder(cls,
+              reporter: reporter, objectType: coreTypes.objectType)
+          .createOrderedTypeSet(supertype, cls.interfaces);
     } else {
       assert(cls == compiler.coreClasses.objectClass);
       cls.allSupertypesAndSelf =
@@ -604,37 +548,17 @@
     }
   }
 
-  /**
-   * Adds [type] and all supertypes of [type] to [allSupertypes] while
-   * substituting type variables.
-   */
-  void addAllSupertypes(OrderedTypeSetBuilder allSupertypes,
-                        InterfaceType type) {
-    ClassElement classElement = type.element;
-    Link<DartType> supertypes = classElement.allSupertypes;
-    assert(invariant(element, supertypes != null,
-        message: "Supertypes not computed on $classElement "
-                 "during resolution of $element"));
-    while (!supertypes.isEmpty) {
-      DartType supertype = supertypes.head;
-      allSupertypes.add(compiler, supertype.substByContext(type));
-      supertypes = supertypes.tail;
-    }
-  }
-
   isBlackListed(DartType type) {
     LibraryElement lib = element.library;
-    CoreTypes coreTypes = compiler.coreTypes;
-    return
-      !identical(lib, compiler.coreLibrary) &&
-      !compiler.backend.isBackendLibrary(lib) &&
-      (type.isDynamic ||
-       type == coreTypes.boolType ||
-       type == coreTypes.numType ||
-       type == coreTypes.intType ||
-       type == coreTypes.doubleType ||
-       type == coreTypes.stringType ||
-       type == coreTypes.nullType);
+    return !identical(lib, compiler.coreLibrary) &&
+        !compiler.backend.isBackendLibrary(lib) &&
+        (type.isDynamic ||
+            type == coreTypes.boolType ||
+            type == coreTypes.numType ||
+            type == coreTypes.intType ||
+            type == coreTypes.doubleType ||
+            type == coreTypes.stringType ||
+            type == coreTypes.nullType);
   }
 }
 
@@ -643,9 +567,9 @@
   ClassElement classElement;
 
   ClassSupertypeResolver(Compiler compiler, ClassElement cls)
-    : context = Scope.buildEnclosingScope(cls),
-      this.classElement = cls,
-      super(compiler);
+      : context = Scope.buildEnclosingScope(cls),
+        this.classElement = cls,
+        super(compiler);
 
   CoreClasses get coreClasses => compiler.coreClasses;
 
@@ -718,10 +642,8 @@
     Identifier selector = node.selector.asIdentifier();
     var e = prefixElement.lookupLocalMember(selector.source);
     if (e == null || !e.impliesType) {
-      reporter.reportErrorMessage(
-          node.selector,
-          MessageKind.CANNOT_RESOLVE_TYPE,
-          {'typeName': node.selector});
+      reporter.reportErrorMessage(node.selector,
+          MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector});
       return;
     }
     loadSupertype(e, node);
diff --git a/pkg/compiler/lib/src/resolution/class_members.dart b/pkg/compiler/lib/src/resolution/class_members.dart
index 36feaa4..eb993bd 100644
--- a/pkg/compiler/lib/src/resolution/class_members.dart
+++ b/pkg/compiler/lib/src/resolution/class_members.dart
@@ -5,24 +5,21 @@
 library dart2js.resolution.compute_members;
 
 import '../common.dart';
-import '../common/names.dart' show
-    Identifiers,
-    Names;
-import '../common/resolution.dart' show
-    Resolution;
-import '../compiler.dart' show
-    Compiler;
+import '../common/names.dart' show Identifiers, Names;
+import '../common/resolution.dart' show Resolution;
+import '../compiler.dart' show Compiler;
 import '../dart_types.dart';
-import '../elements/elements.dart' show
-    ClassElement,
-    Element,
-    LibraryElement,
-    Member,
-    MemberElement,
-    MemberSignature,
-    MixinApplicationElement,
-    Name,
-    PublicName;
+import '../elements/elements.dart'
+    show
+        ClassElement,
+        Element,
+        LibraryElement,
+        Member,
+        MemberElement,
+        MemberSignature,
+        MixinApplicationElement,
+        Name,
+        PublicName;
 import '../util/util.dart';
 
 part 'member_impl.dart';
@@ -34,13 +31,14 @@
   final Iterable<String> computedMemberNames;
   final Map<Name, Member> classMembers;
 
-  Map<dynamic/* Member | Element */, Set<MessageKind>> reportedMessages =
+  Map<dynamic /* Member | Element */, Set<MessageKind>> reportedMessages =
       new Map<dynamic, Set<MessageKind>>();
 
-  MembersCreator(Compiler this.compiler,
-                 ClassElement this.cls,
-                 Iterable<String> this.computedMemberNames,
-                 Map<Name, Member> this.classMembers) {
+  MembersCreator(
+      Compiler this.compiler,
+      ClassElement this.cls,
+      Iterable<String> this.computedMemberNames,
+      Map<Name, Member> this.classMembers) {
     assert(invariant(cls, cls.isDeclaration,
         message: "Members may only be computed on declarations."));
   }
@@ -51,8 +49,7 @@
 
   void reportMessage(var marker, MessageKind kind, report()) {
     Set<MessageKind> messages =
-        reportedMessages.putIfAbsent(marker,
-            () => new Set<MessageKind>());
+        reportedMessages.putIfAbsent(marker, () => new Set<MessageKind>());
     if (messages.add(kind)) {
       report();
     }
@@ -60,13 +57,12 @@
 
   bool shouldSkipMember(MemberSignature member) {
     return member == null || shouldSkipName(member.name.text);
-
   }
 
   bool shouldSkipName(String name) {
     return computedMemberNames != null &&
-           // 'call' is implicitly contained in [computedMemberNames].
-           (name == Identifiers.call || computedMemberNames.contains(name));
+        // 'call' is implicitly contained in [computedMemberNames].
+        (name == Identifiers.call || computedMemberNames.contains(name));
   }
 
   /// Compute all members of [cls] with the given names.
@@ -159,8 +155,8 @@
         }
 
         if (names != null) {
-          _computeClassMember(compiler, mixinApplication.mixin,
-                              nameText, names);
+          _computeClassMember(
+              compiler, mixinApplication.mixin, nameText, names);
           for (Name memberName in names) {
             inheritMixinMember(
                 mixinApplication.mixin.lookupClassMember(memberName));
@@ -180,14 +176,13 @@
         if (shouldSkipName(elementName)) return;
         if (nameText != null && elementName != nameText) return;
 
-        void addDeclaredMember(Name name,
-                               DartType type, FunctionType functionType) {
+        void addDeclaredMember(
+            Name name, DartType type, FunctionType functionType) {
           DeclaredMember inherited = classMembers[name];
           DeclaredMember declared;
           if (element.isAbstract) {
             declared = new DeclaredAbstractMember(
-                name, element, thisType, type, functionType,
-                inherited);
+                name, element, thisType, type, functionType, inherited);
           } else {
             declared =
                 new DeclaredMember(name, element, thisType, type, functionType);
@@ -202,10 +197,11 @@
           DartType type = element.computeType(resolution);
           addDeclaredMember(name, type, new FunctionType.synthesized(type));
           if (!element.isConst && !element.isFinal) {
-            addDeclaredMember(name.setter, type,
+            addDeclaredMember(
+                name.setter,
+                type,
                 new FunctionType.synthesized(
-                                 const VoidType(),
-                                 <DartType>[type]));
+                    const VoidType(), <DartType>[type]));
           }
         } else if (element.isGetter) {
           FunctionType functionType = element.computeType(resolution);
@@ -242,9 +238,8 @@
   }
 
   /// Checks that [classMember] is a valid implementation for [interfaceMember].
-  void checkInterfaceMember(Name name,
-                            MemberSignature interfaceMember,
-                            Member classMember) {
+  void checkInterfaceMember(
+      Name name, MemberSignature interfaceMember, Member classMember) {
     if (classMember != null) {
       // TODO(johnniwinther): Check that the class member is a valid override
       // of the interface member.
@@ -259,54 +254,56 @@
       } else if (interfaceMember.isGetter) {
         kind = MessageKind.ABSTRACT_GETTER;
       }
-      reportMessage(
-          interfaceMember.element, MessageKind.ABSTRACT_METHOD, () {
-        reporter.reportWarningMessage(
-            interfaceMember.element, kind,
+      reportMessage(interfaceMember.element, MessageKind.ABSTRACT_METHOD, () {
+        reporter.reportWarningMessage(interfaceMember.element, kind,
             {'class': cls.name, 'name': name.text});
       });
     } else {
-       reportWarning(MessageKind singleKind,
-                     MessageKind multipleKind,
-                     MessageKind explicitlyDeclaredKind,
-                     [MessageKind implicitlyDeclaredKind]) {
+      reportWarning(MessageKind singleKind, MessageKind multipleKind,
+          MessageKind explicitlyDeclaredKind,
+          [MessageKind implicitlyDeclaredKind]) {
         Member inherited = interfaceMember.declarations.first;
-        reportMessage(
-            interfaceMember, MessageKind.UNIMPLEMENTED_METHOD, () {
+        reportMessage(interfaceMember, MessageKind.UNIMPLEMENTED_METHOD, () {
           DiagnosticMessage warning = reporter.createMessage(
               cls,
               interfaceMember.declarations.length == 1
-                  ? singleKind : multipleKind,
-              {'class': cls.name,
-               'name': name.text,
-               'method': interfaceMember,
-               'declarer': inherited.declarer});
+                  ? singleKind
+                  : multipleKind,
+              {
+                'class': cls.name,
+                'name': name.text,
+                'method': interfaceMember,
+                'declarer': inherited.declarer
+              });
           List<DiagnosticMessage> infos = <DiagnosticMessage>[];
           for (Member inherited in interfaceMember.declarations) {
             infos.add(reporter.createMessage(
                 inherited.element,
-                inherited.isDeclaredByField ?
-                    implicitlyDeclaredKind : explicitlyDeclaredKind,
-                {'class': inherited.declarer.name,
-                 'name': name.text}));
+                inherited.isDeclaredByField
+                    ? implicitlyDeclaredKind
+                    : explicitlyDeclaredKind,
+                {'class': inherited.declarer.name, 'name': name.text}));
           }
           reporter.reportWarning(warning, infos);
         });
       }
       if (interfaceMember.isSetter) {
-        reportWarning(MessageKind.UNIMPLEMENTED_SETTER_ONE,
-                      MessageKind.UNIMPLEMENTED_SETTER,
-                      MessageKind.UNIMPLEMENTED_EXPLICIT_SETTER,
-                      MessageKind.UNIMPLEMENTED_IMPLICIT_SETTER);
+        reportWarning(
+            MessageKind.UNIMPLEMENTED_SETTER_ONE,
+            MessageKind.UNIMPLEMENTED_SETTER,
+            MessageKind.UNIMPLEMENTED_EXPLICIT_SETTER,
+            MessageKind.UNIMPLEMENTED_IMPLICIT_SETTER);
       } else if (interfaceMember.isGetter) {
-        reportWarning(MessageKind.UNIMPLEMENTED_GETTER_ONE,
-                      MessageKind.UNIMPLEMENTED_GETTER,
-                      MessageKind.UNIMPLEMENTED_EXPLICIT_GETTER,
-                      MessageKind.UNIMPLEMENTED_IMPLICIT_GETTER);
+        reportWarning(
+            MessageKind.UNIMPLEMENTED_GETTER_ONE,
+            MessageKind.UNIMPLEMENTED_GETTER,
+            MessageKind.UNIMPLEMENTED_EXPLICIT_GETTER,
+            MessageKind.UNIMPLEMENTED_IMPLICIT_GETTER);
       } else if (interfaceMember.isMethod) {
-        reportWarning(MessageKind.UNIMPLEMENTED_METHOD_ONE,
-                      MessageKind.UNIMPLEMENTED_METHOD,
-                      MessageKind.UNIMPLEMENTED_METHOD_CONT);
+        reportWarning(
+            MessageKind.UNIMPLEMENTED_METHOD_ONE,
+            MessageKind.UNIMPLEMENTED_METHOD,
+            MessageKind.UNIMPLEMENTED_METHOD_CONT);
       }
     }
     // TODO(johnniwinther): If [cls] is not abstract, check that for all
@@ -326,13 +323,12 @@
     if (compiler.backend.isBackendLibrary(cls.library)) return;
 
     reportMessage(functionClass, MessageKind.UNIMPLEMENTED_METHOD, () {
-      reporter.reportWarningMessage(
-          cls,
-          MessageKind.UNIMPLEMENTED_METHOD_ONE,
-          {'class': cls.name,
-           'name': Identifiers.call,
-           'method': Identifiers.call,
-           'declarer': functionClass.name});
+      reporter.reportWarningMessage(cls, MessageKind.UNIMPLEMENTED_METHOD_ONE, {
+        'class': cls.name,
+        'name': Identifiers.call,
+        'method': Identifiers.call,
+        'declarer': functionClass.name
+      });
     });
   }
 
@@ -346,23 +342,20 @@
       if (!declared.isStatic) {
         ClassElement superclass = cls.superclass;
         while (superclass != null) {
-          Member superMember =
-              superclass.lookupClassMember(declared.name);
+          Member superMember = superclass.lookupClassMember(declared.name);
           if (superMember != null && superMember.isStatic) {
             reportMessage(superMember, MessageKind.INSTANCE_STATIC_SAME_NAME,
                 () {
               reporter.reportWarning(
                   reporter.createMessage(
-                      declared.element,
-                      MessageKind.INSTANCE_STATIC_SAME_NAME,
-                      {'memberName': declared.name,
-                       'className': superclass.name}),
+                      declared.element, MessageKind.INSTANCE_STATIC_SAME_NAME, {
+                    'memberName': declared.name,
+                    'className': superclass.name
+                  }),
                   <DiagnosticMessage>[
-                      reporter.createMessage(
-                          superMember.element,
-                          MessageKind.INSTANCE_STATIC_SAME_NAME_CONT),
+                    reporter.createMessage(superMember.element,
+                        MessageKind.INSTANCE_STATIC_SAME_NAME_CONT),
                   ]);
-
             });
             break;
           }
@@ -380,11 +373,12 @@
             continue;
           }
 
-          reportMessage(
-              inherited.element, MessageKind.NO_STATIC_OVERRIDE, () {
+          reportMessage(inherited.element, MessageKind.NO_STATIC_OVERRIDE, () {
             reportErrorWithContext(
-                declared.element, MessageKind.NO_STATIC_OVERRIDE,
-                inherited.element, MessageKind.NO_STATIC_OVERRIDE_CONT);
+                declared.element,
+                MessageKind.NO_STATIC_OVERRIDE,
+                inherited.element,
+                MessageKind.NO_STATIC_OVERRIDE_CONT);
           });
         }
       }
@@ -398,105 +392,102 @@
           // An error should already have been reported.
           assert(invariant(declared.element, compiler.compilationFailed,
               message: "Member $inherited inherited from its "
-                       "declaring class: ${cls}."));
+                  "declaring class: ${cls}."));
           continue;
         }
 
         void reportError(MessageKind errorKind, MessageKind infoKind) {
-          reportMessage(
-              inherited.element, MessageKind.INVALID_OVERRIDE_METHOD, () {
+          reportMessage(inherited.element, MessageKind.INVALID_OVERRIDE_METHOD,
+              () {
             reporter.reportError(
-                reporter.createMessage(
-                    declared.element,
-                    errorKind,
-                    {'name': declared.name.text,
-                     'class': cls.thisType,
-                     'inheritedClass': inherited.declarer}),
+                reporter.createMessage(declared.element, errorKind, {
+                  'name': declared.name.text,
+                  'class': cls.thisType,
+                  'inheritedClass': inherited.declarer
+                }),
                 <DiagnosticMessage>[
-                    reporter.createMessage(
-                        inherited.element,
-                        infoKind,
-                        {'name': declared.name.text,
-                         'class': inherited.declarer}),
+                  reporter.createMessage(inherited.element, infoKind, {
+                    'name': declared.name.text,
+                    'class': inherited.declarer
+                  }),
                 ]);
           });
         }
 
         if (declared.isDeclaredByField && inherited.isMethod) {
           reportError(MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD,
-                      MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT);
+              MessageKind.CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT);
         } else if (declared.isMethod && inherited.isDeclaredByField) {
           reportError(MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD,
-                      MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT);
+              MessageKind.CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT);
         } else if (declared.isGetter && inherited.isMethod) {
           reportError(MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER,
-                      MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER_CONT);
+              MessageKind.CANNOT_OVERRIDE_METHOD_WITH_GETTER_CONT);
         } else if (declared.isMethod && inherited.isGetter) {
           reportError(MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD,
-                      MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD_CONT);
+              MessageKind.CANNOT_OVERRIDE_GETTER_WITH_METHOD_CONT);
         } else {
           DartType inheritedType = inherited.functionType;
           if (!compiler.types.isSubtype(declaredType, inheritedType)) {
-            void reportWarning(var marker,
-                               MessageKind warningKind,
-                               MessageKind infoKind) {
+            void reportWarning(
+                var marker, MessageKind warningKind, MessageKind infoKind) {
               reportMessage(marker, MessageKind.INVALID_OVERRIDE_METHOD, () {
                 reporter.reportWarning(
-                    reporter.createMessage(
-                        declared.element,
-                        warningKind,
-                        {'declaredType': declared.type,
-                         'name': declared.name.text,
-                         'class': cls.thisType,
-                         'inheritedType': inherited.type,
-                         'inheritedClass': inherited.declarer}),
+                    reporter.createMessage(declared.element, warningKind, {
+                      'declaredType': declared.type,
+                      'name': declared.name.text,
+                      'class': cls.thisType,
+                      'inheritedType': inherited.type,
+                      'inheritedClass': inherited.declarer
+                    }),
                     <DiagnosticMessage>[
-                        reporter.createMessage(
-                            inherited.element,
-                            infoKind,
-                            {'name': declared.name.text,
-                             'class': inherited.declarer}),
+                      reporter.createMessage(inherited.element, infoKind, {
+                        'name': declared.name.text,
+                        'class': inherited.declarer
+                      }),
                     ]);
               });
             }
             if (declared.isDeclaredByField) {
               if (inherited.isDeclaredByField) {
-                reportWarning(inherited.element,
-                              MessageKind.INVALID_OVERRIDE_FIELD,
-                              MessageKind.INVALID_OVERRIDDEN_FIELD);
+                reportWarning(
+                    inherited.element,
+                    MessageKind.INVALID_OVERRIDE_FIELD,
+                    MessageKind.INVALID_OVERRIDDEN_FIELD);
               } else if (inherited.isGetter) {
-                reportWarning(inherited,
-                              MessageKind.INVALID_OVERRIDE_GETTER_WITH_FIELD,
-                              MessageKind.INVALID_OVERRIDDEN_GETTER);
+                reportWarning(
+                    inherited,
+                    MessageKind.INVALID_OVERRIDE_GETTER_WITH_FIELD,
+                    MessageKind.INVALID_OVERRIDDEN_GETTER);
               } else if (inherited.isSetter) {
-                reportWarning(inherited,
-                              MessageKind.INVALID_OVERRIDE_SETTER_WITH_FIELD,
-                              MessageKind.INVALID_OVERRIDDEN_SETTER);
+                reportWarning(
+                    inherited,
+                    MessageKind.INVALID_OVERRIDE_SETTER_WITH_FIELD,
+                    MessageKind.INVALID_OVERRIDDEN_SETTER);
               }
             } else if (declared.isGetter) {
               if (inherited.isDeclaredByField) {
-                reportWarning(inherited,
-                              MessageKind.INVALID_OVERRIDE_FIELD_WITH_GETTER,
-                              MessageKind.INVALID_OVERRIDDEN_FIELD);
+                reportWarning(
+                    inherited,
+                    MessageKind.INVALID_OVERRIDE_FIELD_WITH_GETTER,
+                    MessageKind.INVALID_OVERRIDDEN_FIELD);
               } else {
-                reportWarning(inherited,
-                              MessageKind.INVALID_OVERRIDE_GETTER,
-                              MessageKind.INVALID_OVERRIDDEN_GETTER);
+                reportWarning(inherited, MessageKind.INVALID_OVERRIDE_GETTER,
+                    MessageKind.INVALID_OVERRIDDEN_GETTER);
               }
             } else if (declared.isSetter) {
               if (inherited.isDeclaredByField) {
-                reportWarning(inherited,
-                              MessageKind.INVALID_OVERRIDE_FIELD_WITH_SETTER,
-                              MessageKind.INVALID_OVERRIDDEN_FIELD);
+                reportWarning(
+                    inherited,
+                    MessageKind.INVALID_OVERRIDE_FIELD_WITH_SETTER,
+                    MessageKind.INVALID_OVERRIDDEN_FIELD);
               } else {
-                reportWarning(inherited,
-                              MessageKind.INVALID_OVERRIDE_SETTER,
-                              MessageKind.INVALID_OVERRIDDEN_SETTER);
+                reportWarning(inherited, MessageKind.INVALID_OVERRIDE_SETTER,
+                    MessageKind.INVALID_OVERRIDDEN_SETTER);
               }
             } else {
-              reportWarning(inherited,
-                            MessageKind.INVALID_OVERRIDE_METHOD,
-                            MessageKind.INVALID_OVERRIDDEN_METHOD);
+              reportWarning(inherited, MessageKind.INVALID_OVERRIDE_METHOD,
+                  MessageKind.INVALID_OVERRIDDEN_METHOD);
             }
           }
         }
@@ -504,36 +495,37 @@
     }
   }
 
-  void reportErrorWithContext(Element errorneousElement,
-                              MessageKind errorMessage,
-                              Element contextElement,
-                              MessageKind contextMessage) {
+  void reportErrorWithContext(
+      Element errorneousElement,
+      MessageKind errorMessage,
+      Element contextElement,
+      MessageKind contextMessage) {
     reporter.reportError(
-        reporter.createMessage(
-            errorneousElement,
-            errorMessage,
-            {'memberName': contextElement.name,
-             'className': contextElement.enclosingClass.name}),
+        reporter.createMessage(errorneousElement, errorMessage, {
+          'memberName': contextElement.name,
+          'className': contextElement.enclosingClass.name
+        }),
         <DiagnosticMessage>[
-            reporter.createMessage(contextElement, contextMessage),
+          reporter.createMessage(contextElement, contextMessage),
         ]);
   }
 
   /// Compute all class and interface names by the [name] in [cls].
-  static void computeClassMembersByName(Compiler compiler,
-                                        ClassMemberMixin cls,
-                                        String name) {
+  static void computeClassMembersByName(
+      Compiler compiler, ClassMemberMixin cls, String name) {
     if (cls.isMemberComputed(name)) return;
     LibraryElement library = cls.library;
-    _computeClassMember(compiler, cls, name,
-        new Setlet<Name>()..add(new Name(name, library))
-                          ..add(new Name(name, library, isSetter: true)));
+    _computeClassMember(
+        compiler,
+        cls,
+        name,
+        new Setlet<Name>()
+          ..add(new Name(name, library))
+          ..add(new Name(name, library, isSetter: true)));
   }
 
-  static void _computeClassMember(Compiler compiler,
-                                  ClassMemberMixin cls,
-                                  String name,
-                                  Setlet<Name> names) {
+  static void _computeClassMember(Compiler compiler, ClassMemberMixin cls,
+      String name, Setlet<Name> names) {
     cls.computeClassMember(compiler, name, names);
   }
 
@@ -546,10 +538,8 @@
 /// Class member creator for classes where the interface members are known to
 /// be a subset of the class members.
 class ClassMembersCreator extends MembersCreator {
-  ClassMembersCreator(Compiler compiler,
-                      ClassElement cls,
-                      Iterable<String> computedMemberNames,
-                      Map<Name, Member> classMembers)
+  ClassMembersCreator(Compiler compiler, ClassElement cls,
+      Iterable<String> computedMemberNames, Map<Name, Member> classMembers)
       : super(compiler, cls, computedMemberNames, classMembers);
 
   Map<Name, Member> computeMembers(String name, Setlet<Name> names) {
@@ -565,7 +555,7 @@
     LibraryElement library = cls.library;
     classMembers.forEach((Name name, Member classMember) {
       if (!name.isAccessibleFrom(library)) return;
-     checkInterfaceMember(name, classMember, classMember.implementation);
+      checkInterfaceMember(name, classMember, classMember.implementation);
     });
   }
 }
@@ -575,11 +565,12 @@
 class InterfaceMembersCreator extends MembersCreator {
   final Map<Name, MemberSignature> interfaceMembers;
 
-  InterfaceMembersCreator(Compiler compiler,
-                          ClassElement cls,
-                          Iterable<String> computedMemberNames,
-                          Map<Name, Member> classMembers,
-                          Map<Name, MemberSignature> this.interfaceMembers)
+  InterfaceMembersCreator(
+      Compiler compiler,
+      ClassElement cls,
+      Iterable<String> computedMemberNames,
+      Map<Name, Member> classMembers,
+      Map<Name, MemberSignature> this.interfaceMembers)
       : super(compiler, cls, computedMemberNames, classMembers);
 
   Map<Name, Member> computeMembers(String name, Setlet<Name> names) {
@@ -596,16 +587,14 @@
   ///
   /// If [name] and [names] are not null, the computation is restricted to
   /// members with these names.
-  Map<Name, Setlet<Member>> computeSuperMembers(String name,
-                                                Setlet<Name> names) {
+  Map<Name, Setlet<Member>> computeSuperMembers(
+      String name, Setlet<Name> names) {
     computeSuperClassMembers(name, names);
     return computeSuperInterfaceMembers(name, names);
   }
 
-  Map<Name, Setlet<Member>> computeSuperInterfaceMembers(String name,
-                                                         Setlet<Name> names) {
-
-
+  Map<Name, Setlet<Member>> computeSuperInterfaceMembers(
+      String name, Setlet<Name> names) {
     InterfaceType supertype = cls.supertype;
     assert(invariant(cls, supertype != null,
         message: "Interface members computed for $cls."));
@@ -614,12 +603,11 @@
     Map<Name, Setlet<Member>> inheritedInterfaceMembers =
         new Map<Name, Setlet<Member>>();
 
-    void inheritInterfaceMember(InterfaceType supertype,
-                                MemberSignature member) {
+    void inheritInterfaceMember(
+        InterfaceType supertype, MemberSignature member) {
       if (shouldSkipMember(member)) return;
-      Setlet<Member> members =
-          inheritedInterfaceMembers.putIfAbsent(
-              member.name, () => new Setlet<Member>());
+      Setlet<Member> members = inheritedInterfaceMembers.putIfAbsent(
+          member.name, () => new Setlet<Member>());
       for (DeclaredMember declaredMember in member.declarations) {
         members.add(declaredMember.inheritFrom(supertype));
       }
@@ -633,8 +621,8 @@
 
     if (names != null) {
       for (Name memberName in names) {
-        inheritInterfaceMember(supertype,
-            superclass.lookupInterfaceMember(memberName));
+        inheritInterfaceMember(
+            supertype, superclass.lookupInterfaceMember(memberName));
       }
     } else {
       inheritInterfaceMembers(supertype);
@@ -642,8 +630,8 @@
 
     // Inherit interface members from superinterfaces.
     for (Link<DartType> link = cls.interfaces;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       InterfaceType superinterface = link.head;
       if (names != null) {
         MembersCreator._computeClassMember(
@@ -677,14 +665,14 @@
   /// interface members [inheritedInterfaceMembers] and declared members
   /// [declaredMembers]. The computed members are stored in [interfaceMembers].
   void computeInterfaceMembers(
-        Map<Name, Setlet<Member>> inheritedInterfaceMembers,
-        Map<Name, Member> declaredMembers) {
+      Map<Name, Setlet<Member>> inheritedInterfaceMembers,
+      Map<Name, Member> declaredMembers) {
     InterfaceType thisType = cls.thisType;
     // Compute the interface members by overriding the inherited members with
     // a declared member or by computing a single, possibly synthesized,
     // inherited member.
-    inheritedInterfaceMembers.forEach(
-        (Name name, Setlet<Member> inheritedMembers) {
+    inheritedInterfaceMembers
+        .forEach((Name name, Setlet<Member> inheritedMembers) {
       Member declared = declaredMembers[name];
       if (declared != null) {
         // Check that [declaredMember] is a valid override
@@ -710,19 +698,20 @@
             if (someAreGetters) break outer;
           }
           for (MemberSignature other in inheritedMembers) {
-            if (!compiler.types.isSubtype(inherited.functionType,
-                                          other.functionType)) {
+            if (!compiler.types
+                .isSubtype(inherited.functionType, other.functionType)) {
               continue outer;
             }
           }
-          subtypesOfAllInherited.putIfAbsent(inherited.functionType,
-              () => new Setlet<Member>()).add(inherited);
+          subtypesOfAllInherited
+              .putIfAbsent(inherited.functionType, () => new Setlet<Member>())
+              .add(inherited);
         }
         if (someAreGetters && !allAreGetters) {
           DiagnosticMessage warning = reporter.createMessage(
               cls,
               MessageKind.INHERIT_GETTER_AND_METHOD,
-              {'class': thisType, 'name': name.text });
+              {'class': thisType, 'name': name.text});
           List<DiagnosticMessage> infos = <DiagnosticMessage>[];
           for (Member inherited in inheritedMembers) {
             MessageKind kind;
@@ -731,16 +720,14 @@
             } else {
               assert(invariant(cls, inherited.isGetter,
                   message: 'Conflicting member is neither a method nor a '
-                           'getter.'));
+                      'getter.'));
               if (inherited.isDeclaredByField) {
                 kind = MessageKind.INHERITED_IMPLICIT_GETTER;
               } else {
                 kind = MessageKind.INHERITED_EXPLICIT_GETTER;
               }
             }
-            infos.add(reporter.createMessage(
-                inherited.element,
-                kind,
+            infos.add(reporter.createMessage(inherited.element, kind,
                 {'class': inherited.declarer, 'name': name.text}));
           }
           reporter.reportWarning(warning, infos);
@@ -771,8 +758,7 @@
   }
 
   /// Create and inherit a synthesized member for [inheritedMembers].
-  void _inheritedSynthesizedMember(Name name,
-                                   Setlet<Member> inheritedMembers) {
+  void _inheritedSynthesizedMember(Name name, Setlet<Member> inheritedMembers) {
     // Multiple signatures with different types => create the synthesized
     // version.
     int minRequiredParameters;
@@ -786,8 +772,7 @@
       }
       if (member.type.isFunctionType) {
         FunctionType type = member.type;
-        type.namedParameters.forEach(
-            (String name) => names.add(name));
+        type.namedParameters.forEach((String name) => names.add(name));
         requiredParameters = type.parameterTypes.length;
         optionalParameters = type.optionalParameterTypes.length;
       }
@@ -801,8 +786,7 @@
         maxPositionalParameters = positionalParameters;
       }
     }
-    int optionalParameters =
-        maxPositionalParameters - minRequiredParameters;
+    int optionalParameters = maxPositionalParameters - minRequiredParameters;
     // TODO(johnniwinther): Support function types with both optional
     // and named parameters?
     if (optionalParameters == 0 || names.isEmpty) {
@@ -811,18 +795,18 @@
           new List.filled(minRequiredParameters, dynamic);
       List<DartType> optionalParameterTypes =
           new List.filled(optionalParameters, dynamic);
-      List<String> namedParameters =
-          names.toList()..sort((a, b) => a.compareTo(b));
+      List<String> namedParameters = names.toList()
+        ..sort((a, b) => a.compareTo(b));
       List<DartType> namedParameterTypes =
           new List.filled(namedParameters.length, dynamic);
       FunctionType memberType = new FunctionType.synthesized(
           const DynamicType(),
           requiredParameterTypes,
           optionalParameterTypes,
-          namedParameters, namedParameterTypes);
+          namedParameters,
+          namedParameterTypes);
       DartType type = memberType;
-      if (inheritedMembers.first.isGetter ||
-          inheritedMembers.first.isSetter) {
+      if (inheritedMembers.first.isGetter || inheritedMembers.first.isSetter) {
         type = const DynamicType();
       }
       interfaceMembers[name] =
@@ -858,9 +842,9 @@
       if (interfaceMembersAreClassMembers) {
         ClassMemberMixin superclass = this.superclass;
         if ((superclass != null &&
-             (!superclass.interfaceMembersAreClassMembers ||
-              superclass.isMixinApplication)) ||
-             !interfaces.isEmpty) {
+                (!superclass.interfaceMembersAreClassMembers ||
+                    superclass.isMixinApplication)) ||
+            !interfaces.isEmpty) {
           interfaceMembersAreClassMembers = false;
         }
       }
@@ -869,10 +853,10 @@
       }
     }
     return interfaceMembersAreClassMembers
-        ? new ClassMembersCreator(compiler, this,
-            computedMemberNames, classMembers)
-        : new InterfaceMembersCreator(compiler, this,
-            computedMemberNames, classMembers, interfaceMembers);
+        ? new ClassMembersCreator(
+            compiler, this, computedMemberNames, classMembers)
+        : new InterfaceMembersCreator(compiler, this, computedMemberNames,
+            classMembers, interfaceMembers);
   }
 
   static Iterable<String> _EMPTY_MEMBERS_NAMES = const <String>[];
@@ -883,8 +867,9 @@
   void computeClassMember(Compiler compiler, String name, Setlet<Name> names) {
     if (isMemberComputed(name)) return;
     if (Name.isPrivateName(name)) {
-      names..add(new Name(name, library))
-           ..add(new Name(name, library, isSetter: true));
+      names
+        ..add(new Name(name, library))
+        ..add(new Name(name, library, isSetter: true));
     }
     MembersCreator creator = _prepareCreator(compiler);
     creator.computeMembersByName(name, names);
@@ -918,14 +903,12 @@
     if (computedMemberNames == null) {
       return classMembers != null;
     } else {
-      return name == Identifiers.call ||
-             computedMemberNames.contains(name);
+      return name == Identifiers.call || computedMemberNames.contains(name);
     }
   }
 
   Member lookupClassMember(Name name) {
-    assert(invariant(this,
-        isMemberComputed(name.text),
+    assert(invariant(this, isMemberComputed(name.text),
         message: "Member ${name} has not been computed for $this."));
     return classMembers[name];
   }
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart
index aa70072..9e40cff 100644
--- a/pkg/compiler/lib/src/resolution/constructors.dart
+++ b/pkg/compiler/lib/src/resolution/constructors.dart
@@ -5,39 +5,32 @@
 library dart2js.resolution.constructors;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Feature;
-import '../compiler.dart' show
-    Compiler;
-import '../constants/constructors.dart' show
-    GenerativeConstantConstructor,
-    RedirectingGenerativeConstantConstructor;
+import '../common/resolution.dart' show Feature;
+import '../compiler.dart' show Compiler;
+import '../constants/constructors.dart'
+    show
+        GenerativeConstantConstructor,
+        RedirectingGenerativeConstantConstructor;
 import '../constants/expressions.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    ConstructorElementX,
-    ErroneousConstructorElementX,
-    ErroneousElementX,
-    ErroneousFieldElementX,
-    FieldElementX,
-    InitializingFormalElementX,
-    ParameterElementX;
+import '../elements/modelx.dart'
+    show
+        ConstructorElementX,
+        ErroneousConstructorElementX,
+        ErroneousElementX,
+        ErroneousFieldElementX,
+        FieldElementX,
+        InitializingFormalElementX,
+        ParameterElementX;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/use.dart' show
-    StaticUse;
+import '../util/util.dart' show Link;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/use.dart' show StaticUse;
 
-import 'members.dart' show
-    lookupInScope,
-    ResolverVisitor;
-import 'registry.dart' show
-    ResolutionRegistry;
-import 'resolution_common.dart' show
-    CommonResolverVisitor;
+import 'members.dart' show lookupInScope, ResolverVisitor;
+import 'registry.dart' show ResolutionRegistry;
+import 'resolution_common.dart' show CommonResolverVisitor;
 import 'resolution_result.dart';
 
 class InitializerResolver {
@@ -66,19 +59,14 @@
     return node.receiver.asIdentifier().isThis();
   }
 
-  reportDuplicateInitializerError(Element field,
-                                  Node init,
-                                  Spannable existing) {
+  reportDuplicateInitializerError(
+      Element field, Node init, Spannable existing) {
     reporter.reportError(
         reporter.createMessage(
-            init,
-            MessageKind.DUPLICATE_INITIALIZER,
-            {'fieldName': field.name}),
+            init, MessageKind.DUPLICATE_INITIALIZER, {'fieldName': field.name}),
         <DiagnosticMessage>[
-            reporter.createMessage(
-                existing,
-                MessageKind.ALREADY_INITIALIZED,
-                {'fieldName': field.name}),
+          reporter.createMessage(existing, MessageKind.ALREADY_INITIALIZED,
+              {'fieldName': field.name}),
         ]);
     isValidAsConstant = false;
   }
@@ -92,9 +80,11 @@
       field.parseNode(visitor.resolution.parsing);
       Expression initializer = field.initializer;
       if (initializer != null) {
-        reportDuplicateInitializerError(field, init,
-            reporter.withCurrentElement(field,
-                () => reporter.spanFromSpannable(initializer)));
+        reportDuplicateInitializerError(
+            field,
+            init,
+            reporter.withCurrentElement(
+                field, () => reporter.spanFromSpannable(initializer)));
       }
     }
     initialized[field] = init;
@@ -137,8 +127,7 @@
       registry.registerStaticUse(new StaticUse.fieldInit(field));
     }
     // Resolve initializing value.
-    ResolutionResult result = visitor.visitInStaticContext(
-        init.arguments.head,
+    ResolutionResult result = visitor.visitInStaticContext(init.arguments.head,
         inConstantInitializer: isConst);
     if (isConst) {
       if (result.isConstant && field != null) {
@@ -151,7 +140,7 @@
   }
 
   InterfaceType getSuperOrThisLookupTarget(Node diagnosticNode,
-                                           {bool isSuperCall}) {
+      {bool isSuperCall}) {
     if (isSuperCall) {
       // Calculate correct lookup target and constructor name.
       if (constructor.enclosingClass.isObject) {
@@ -179,17 +168,14 @@
     ClassElement lookupTarget = targetType.element;
     String constructorName =
         visitor.getRedirectingThisOrSuperConstructorName(node).text;
-    ConstructorElement foundConstructor = findConstructor(
-        constructor.library, lookupTarget, constructorName);
+    ConstructorElement foundConstructor =
+        findConstructor(constructor.library, lookupTarget, constructorName);
 
     final bool isImplicitSuperCall = false;
     final String className = lookupTarget.name;
     CallStructure callStructure = argumentsResult.callStructure;
     ConstructorElement calledConstructor = verifyThatConstructorMatchesCall(
-        node,
-        foundConstructor,
-        callStructure,
-        className,
+        node, foundConstructor, callStructure, className,
         constructorName: constructorName,
         isThisCall: !isSuperCall,
         isImplicitSuperCall: false);
@@ -197,9 +183,8 @@
     // [InitializerStructure].
     registry.useElement(node, calledConstructor);
     if (!calledConstructor.isError) {
-      registry.registerStaticUse(
-          new StaticUse.superConstructorInvoke(
-              calledConstructor, callStructure));
+      registry.registerStaticUse(new StaticUse.superConstructorInvoke(
+          calledConstructor, callStructure));
     }
     if (isConst) {
       if (isValidAsConstant &&
@@ -209,10 +194,7 @@
         return new ConstantResult(
             node,
             new ConstructedConstantExpression(
-                targetType,
-                calledConstructor,
-                callStructure,
-                arguments),
+                targetType, calledConstructor, callStructure, arguments),
             element: calledConstructor);
       } else {
         isValidAsConstant = false;
@@ -238,10 +220,7 @@
       final String className = lookupTarget.name;
       CallStructure callStructure = CallStructure.NO_ARGS;
       ConstructorElement result = verifyThatConstructorMatchesCall(
-          functionNode,
-          calledConstructor,
-          callStructure,
-          className,
+          functionNode, calledConstructor, callStructure, className,
           isImplicitSuperCall: true);
       if (!result.isError) {
         registry.registerStaticUse(
@@ -249,24 +228,17 @@
       }
 
       if (isConst && isValidAsConstant) {
-        return new ConstructedConstantExpression(
-            targetType,
-            result,
-            CallStructure.NO_ARGS,
-            const <ConstantExpression>[]);
+        return new ConstructedConstantExpression(targetType, result,
+            CallStructure.NO_ARGS, const <ConstantExpression>[]);
       }
     }
     return null;
   }
 
   ConstructorElement reportAndCreateErroneousConstructor(
-      Spannable diagnosticNode,
-      String name,
-      MessageKind kind,
-      Map arguments) {
+      Spannable diagnosticNode, String name, MessageKind kind, Map arguments) {
     isValidAsConstant = false;
-    reporter.reportErrorMessage(
-        diagnosticNode, kind, arguments);
+    reporter.reportErrorMessage(diagnosticNode, kind, arguments);
     return new ErroneousConstructorElementX(
         kind, arguments, name, visitor.currentClass);
   }
@@ -282,8 +254,8 @@
       CallStructure callStructure,
       String className,
       {String constructorName: '',
-       bool isImplicitSuperCall: false,
-       bool isThisCall: false}) {
+      bool isImplicitSuperCall: false,
+      bool isThisCall: false}) {
     Element result = lookedupConstructor;
     if (lookedupConstructor == null) {
       String fullConstructorName =
@@ -291,19 +263,18 @@
       MessageKind kind = isImplicitSuperCall
           ? MessageKind.CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT
           : MessageKind.CANNOT_RESOLVE_CONSTRUCTOR;
-      result = reportAndCreateErroneousConstructor(
-          node, constructorName,
-          kind, {'constructorName': fullConstructorName});
+      result = reportAndCreateErroneousConstructor(node, constructorName, kind,
+          {'constructorName': fullConstructorName});
     } else if (!lookedupConstructor.isGenerativeConstructor) {
       MessageKind kind = isThisCall
           ? MessageKind.THIS_CALL_TO_FACTORY
           : MessageKind.SUPER_CALL_TO_FACTORY;
-      result = reportAndCreateErroneousConstructor(
-          node, constructorName, kind, {});
+      result =
+          reportAndCreateErroneousConstructor(node, constructorName, kind, {});
     } else {
       lookedupConstructor.computeType(visitor.resolution);
-      if (!callStructure.signatureApplies(
-               lookedupConstructor.functionSignature)) {
+      if (!callStructure
+          .signatureApplies(lookedupConstructor.functionSignature)) {
         MessageKind kind = isImplicitSuperCall
             ? MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT
             : MessageKind.NO_MATCHING_CONSTRUCTOR;
@@ -325,8 +296,8 @@
    * constructor, the resolved constructor's function element is returned.
    */
   ConstructorElement resolveInitializers() {
-    Map<dynamic/*String|int*/, ConstantExpression> defaultValues =
-        <dynamic/*String|int*/, ConstantExpression>{};
+    Map<dynamic /*String|int*/, ConstantExpression> defaultValues =
+        <dynamic /*String|int*/, ConstantExpression>{};
     ConstructedConstantExpression constructorInvocation;
     // Keep track of all "this.param" parameters specified for constructor so
     // that we can ensure that fields are initialized only once.
@@ -406,7 +377,7 @@
           // Check that there is no body (Language specification 7.5.1).  If the
           // constructor is also const, we already reported an error in
           // [resolveMethodElement].
-          if (functionNode.hasBody() && !constructor.isConst) {
+          if (functionNode.hasBody && !constructor.isConst) {
             reporter.reportErrorMessage(
                 functionNode, MessageKind.REDIRECTING_CONSTRUCTOR_HAS_BODY);
           }
@@ -437,8 +408,7 @@
             if (isConst && isValidAsConstant) {
               constructor.constantConstructor =
                   new RedirectingGenerativeConstantConstructor(
-                      defaultValues,
-                      constructorInvocation);
+                      defaultValues, constructorInvocation);
             }
           }
           return result.element;
@@ -448,8 +418,7 @@
           return null;
         }
       } else {
-        reporter.reportErrorMessage(
-            link.head, MessageKind.INVALID_INITIALIZER);
+        reporter.reportErrorMessage(link.head, MessageKind.INVALID_INITIALIZER);
       }
     }
     if (!resolvedSuper) {
@@ -462,7 +431,7 @@
           fieldInitializers,
           constructorInvocation);
     }
-    return null;  // If there was no redirection always return null.
+    return null; // If there was no redirection always return null.
   }
 }
 
@@ -471,7 +440,7 @@
   final bool inConstContext;
 
   ConstructorResolver(Compiler compiler, this.resolver,
-                      {bool this.inConstContext: false})
+      {bool this.inConstContext: false})
       : super(compiler);
 
   ResolutionRegistry get registry => resolver.registry;
@@ -489,8 +458,8 @@
       MessageKind kind,
       Map arguments,
       {bool isError: false,
-       bool missingConstructor: false,
-       List<DiagnosticMessage> infos: const <DiagnosticMessage>[]}) {
+      bool missingConstructor: false,
+      List<DiagnosticMessage> infos: const <DiagnosticMessage>[]}) {
     if (missingConstructor) {
       registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
     } else {
@@ -503,19 +472,16 @@
     } else {
       reporter.reportWarning(message, infos);
     }
-    ErroneousElement error = new ErroneousConstructorElementX(
-        kind, arguments, name, enclosing);
+    ErroneousElement error =
+        new ErroneousConstructorElementX(kind, arguments, name, enclosing);
     if (type == null) {
       type = new MalformedType(error, null);
     }
     return new ConstructorResult.forError(resultKind, error, type);
   }
 
-  ConstructorResult resolveConstructor(
-      PrefixElement prefix,
-      InterfaceType type,
-      Node diagnosticNode,
-      String constructorName) {
+  ConstructorResult resolveConstructor(PrefixElement prefix, InterfaceType type,
+      Node diagnosticNode, String constructorName) {
     ClassElement cls = type.element;
     cls.ensureResolved(resolution);
     ConstructorElement constructor = findConstructor(
@@ -526,8 +492,11 @@
           : MessageKind.CANNOT_FIND_CONSTRUCTOR;
       return reportAndCreateErroneousConstructorElement(
           diagnosticNode,
-          ConstructorResultKind.UNRESOLVED_CONSTRUCTOR, type,
-          cls, constructorName, kind,
+          ConstructorResultKind.UNRESOLVED_CONSTRUCTOR,
+          type,
+          cls,
+          constructorName,
+          kind,
           {'className': cls.name, 'constructorName': constructorName},
           missingConstructor: true);
     } else if (inConstContext && !constructor.isConst) {
@@ -539,8 +508,10 @@
       if (cls.isEnumClass && resolver.currentClass != cls) {
         return reportAndCreateErroneousConstructorElement(
             diagnosticNode,
-            ConstructorResultKind.INVALID_TYPE, type,
-            cls, constructorName,
+            ConstructorResultKind.INVALID_TYPE,
+            type,
+            cls,
+            constructorName,
             MessageKind.CANNOT_INSTANTIATE_ENUM,
             {'enumName': cls.name},
             isError: true);
@@ -576,9 +547,7 @@
   /// Finishes resolution of a constructor reference and records the
   /// type of the constructed instance on [expression].
   ConstructorResult finishConstructorReference(
-      ConstructorResult result,
-      Node diagnosticNode,
-      Node expression) {
+      ConstructorResult result, Node diagnosticNode, Node expression) {
     assert(invariant(diagnosticNode, result != null,
         message: 'No result returned for $diagnosticNode.'));
 
@@ -591,8 +560,8 @@
     // class.
     if (result.type != null) {
       // The unnamed constructor may not exist, so [e] may become unresolved.
-      result = resolveConstructor(
-          result.prefix, result.type, diagnosticNode, '');
+      result =
+          resolveConstructor(result.prefix, result.type, diagnosticNode, '');
     } else {
       Element element = result.element;
       if (element.isMalformed) {
@@ -600,9 +569,12 @@
       } else {
         result = reportAndCreateErroneousConstructorElement(
             diagnosticNode,
-            ConstructorResultKind.INVALID_TYPE, null,
-            element, element.name,
-            MessageKind.NOT_A_TYPE, {'node': diagnosticNode});
+            ConstructorResultKind.INVALID_TYPE,
+            null,
+            element,
+            element.name,
+            MessageKind.NOT_A_TYPE,
+            {'node': diagnosticNode});
       }
     }
     resolver.registry.setType(expression, result.type);
@@ -612,10 +584,8 @@
   ConstructorResult visitTypeAnnotation(TypeAnnotation node) {
     // This is not really resolving a type-annotation, but the name of the
     // constructor. Therefore we allow deferred types.
-    DartType type = resolver.resolveTypeAnnotation(
-        node,
-        malformedIsError: inConstContext,
-        deferredIsMalformed: false);
+    DartType type = resolver.resolveTypeAnnotation(node,
+        malformedIsError: inConstContext, deferredIsMalformed: false);
     Send send = node.typeName.asSend();
     PrefixElement prefix;
     if (send != null) {
@@ -653,15 +623,18 @@
         // TODO(johnniwinther): Update the message for the different types.
         return reportAndCreateErroneousConstructorElement(
             name,
-            ConstructorResultKind.INVALID_TYPE, null,
-            resolver.enclosingElement, name.source,
-            MessageKind.NOT_A_TYPE, {'node': name});
+            ConstructorResultKind.INVALID_TYPE,
+            null,
+            resolver.enclosingElement,
+            name.source,
+            MessageKind.NOT_A_TYPE,
+            {'node': name});
       }
     } else if (receiver.element.isPrefix) {
       PrefixElement prefix = receiver.element;
       Element member = prefix.lookupLocalMember(name.source);
-      return constructorResultForElement(
-          node, name.source, member, prefix: prefix);
+      return constructorResultForElement(node, name.source, member,
+          prefix: prefix);
     } else {
       return reporter.internalError(
           node.receiver, 'unexpected receiver $receiver');
@@ -678,8 +651,8 @@
   /// Assumed to be called by [resolveRedirectingFactory].
   ConstructorResult visitRedirectingFactoryBody(RedirectingFactoryBody node) {
     Node constructorReference = node.constructorReference;
-    return finishConstructorReference(visit(constructorReference),
-        constructorReference, node);
+    return finishConstructorReference(
+        visit(constructorReference), constructorReference, node);
   }
 
   ConstructorResult constructorResultForElement(
@@ -689,16 +662,20 @@
     if (element == null) {
       return reportAndCreateErroneousConstructorElement(
           node,
-          ConstructorResultKind.INVALID_TYPE, null,
-          resolver.enclosingElement, name,
+          ConstructorResultKind.INVALID_TYPE,
+          null,
+          resolver.enclosingElement,
+          name,
           MessageKind.CANNOT_RESOLVE,
           {'name': name});
     } else if (element.isAmbiguous) {
       AmbiguousElement ambiguous = element;
       return reportAndCreateErroneousConstructorElement(
           node,
-          ConstructorResultKind.INVALID_TYPE, null,
-          resolver.enclosingElement, name,
+          ConstructorResultKind.INVALID_TYPE,
+          null,
+          resolver.enclosingElement,
+          name,
           ambiguous.messageKind,
           ambiguous.messageArguments,
           infos: ambiguous.computeInfos(resolver.enclosingElement, reporter));
@@ -720,30 +697,27 @@
     } else {
       return reportAndCreateErroneousConstructorElement(
           node,
-          ConstructorResultKind.INVALID_TYPE, null,
-          resolver.enclosingElement, name,
-          MessageKind.NOT_A_TYPE, {'node': name});
+          ConstructorResultKind.INVALID_TYPE,
+          null,
+          resolver.enclosingElement,
+          name,
+          MessageKind.NOT_A_TYPE,
+          {'node': name});
     }
   }
 
-  ConstructorResult constructorResultForErroneous(
-      Node node, Element error) {
+  ConstructorResult constructorResultForErroneous(Node node, Element error) {
     if (error is! ErroneousElementX) {
       // Parser error. The error has already been reported.
       error = new ErroneousConstructorElementX(
-          MessageKind.NOT_A_TYPE, {'node': node},
-          error.name, error);
+          MessageKind.NOT_A_TYPE, {'node': node}, error.name, error);
       registry.registerFeature(Feature.THROW_RUNTIME_ERROR);
     }
-    return new ConstructorResult.forError(
-        ConstructorResultKind.INVALID_TYPE,
-        error,
-        new MalformedType(error, null));
+    return new ConstructorResult.forError(ConstructorResultKind.INVALID_TYPE,
+        error, new MalformedType(error, null));
   }
 
-  ConstructorResult constructorResultForType(
-      Node node,
-      DartType type,
+  ConstructorResult constructorResultForType(Node node, DartType type,
       {PrefixElement prefix}) {
     String name = type.name;
     if (type.isMalformed) {
@@ -754,35 +728,44 @@
     } else if (type.isTypedef) {
       return reportAndCreateErroneousConstructorElement(
           node,
-          ConstructorResultKind.INVALID_TYPE, type,
-          resolver.enclosingElement, name,
-          MessageKind.CANNOT_INSTANTIATE_TYPEDEF, {'typedefName': name});
+          ConstructorResultKind.INVALID_TYPE,
+          type,
+          resolver.enclosingElement,
+          name,
+          MessageKind.CANNOT_INSTANTIATE_TYPEDEF,
+          {'typedefName': name});
     } else if (type.isTypeVariable) {
       return reportAndCreateErroneousConstructorElement(
           node,
-          ConstructorResultKind.INVALID_TYPE, type,
-          resolver.enclosingElement, name,
+          ConstructorResultKind.INVALID_TYPE,
+          type,
+          resolver.enclosingElement,
+          name,
           MessageKind.CANNOT_INSTANTIATE_TYPE_VARIABLE,
           {'typeVariableName': name});
     }
     return reporter.internalError(node, "Unexpected constructor type $type");
   }
-
 }
 
 /// The kind of constructor found by the [ConstructorResolver].
 enum ConstructorResultKind {
   /// A generative or redirecting generative constructor.
   GENERATIVE,
+
   /// A factory or redirecting factory constructor.
   FACTORY,
+
   /// A generative or redirecting generative constructor on an abstract class.
   ABSTRACT,
+
   /// No constructor was found because the type was invalid, for instance
   /// unresolved, an enum class, a type variable, a typedef or a non-type.
   INVALID_TYPE,
+
   /// No constructor of the sought name was found on the class.
   UNRESOLVED_CONSTRUCTOR,
+
   /// A non-constant constructor was found for a const constructor invocation.
   NON_CONSTANT,
 }
@@ -808,10 +791,8 @@
 
   /// Creates a fully resolved constructor access where [element] is resolved
   /// to a constructor and [type] to an interface type.
-  ConstructorResult(this.kind,
-                    this.prefix,
-                    ConstructorElement this.element,
-                    InterfaceType this.type);
+  ConstructorResult(this.kind, this.prefix, ConstructorElement this.element,
+      InterfaceType this.type);
 
   /// Creates a fully resolved constructor access where [element] is an
   /// [ErroneousElement].
@@ -862,9 +843,7 @@
 /// Lookup the [constructorName] constructor in [cls] and normalize the result
 /// with respect to privacy and patching.
 ConstructorElement findConstructor(
-    LibraryElement currentLibrary,
-    ClassElement cls,
-    String constructorName) {
+    LibraryElement currentLibrary, ClassElement cls, String constructorName) {
   if (Name.isPrivateName(constructorName) &&
       currentLibrary.library != cls.library) {
     // TODO(johnniwinther): Report a special error on unaccessible private
diff --git a/pkg/compiler/lib/src/resolution/enum_creator.dart b/pkg/compiler/lib/src/resolution/enum_creator.dart
index 953225b..93fb9ec 100644
--- a/pkg/compiler/lib/src/resolution/enum_creator.dart
+++ b/pkg/compiler/lib/src/resolution/enum_creator.dart
@@ -5,13 +5,11 @@
 library dart2js.resolution.enum_creator;
 
 import '../common.dart';
-import '../core_types.dart' show
-    CoreTypes;
+import '../core_types.dart' show CoreTypes;
 import '../dart_types.dart';
 import '../elements/elements.dart';
 import '../elements/modelx.dart';
-import '../tokens/keyword.dart' show
-    Keyword;
+import '../tokens/keyword.dart' show Keyword;
 import '../tokens/precedence.dart';
 import '../tokens/precedence_constants.dart' as Precedence;
 import '../tokens/token.dart';
@@ -24,9 +22,8 @@
 
   AstBuilder(this.charOffset);
 
-  Modifiers modifiers({bool isConst: false,
-                       bool isFinal: false,
-                       bool isStatic: false}) {
+  Modifiers modifiers(
+      {bool isConst: false, bool isFinal: false, bool isStatic: false}) {
     List identifiers = [];
     int flags = 0;
     if (isConst) {
@@ -42,8 +39,7 @@
       flags |= Modifiers.FLAG_STATIC;
     }
     return new Modifiers.withFlags(
-        new NodeList(null, linkedList(identifiers), null, ''),
-        flags);
+        new NodeList(null, linkedList(identifiers), null, ''), flags);
   }
 
   Token keywordToken(String text) {
@@ -78,23 +74,17 @@
 
   NodeList argumentList(List<Node> nodes) {
     return new NodeList(symbolToken(Precedence.OPEN_PAREN_INFO),
-                        linkedList(nodes),
-                        symbolToken(Precedence.CLOSE_PAREN_INFO),
-                        ',');
+        linkedList(nodes), symbolToken(Precedence.CLOSE_PAREN_INFO), ',');
   }
 
   Return returnStatement(Expression expression) {
-    return new Return(
-        keywordToken('return'),
-        symbolToken(Precedence.SEMICOLON_INFO),
-        expression);
+    return new Return(keywordToken('return'),
+        symbolToken(Precedence.SEMICOLON_INFO), expression);
   }
 
-  FunctionExpression functionExpression(Modifiers modifiers,
-                                        String name,
-                                        NodeList argumentList,
-                                        Statement body,
-                                        [TypeAnnotation returnType]) {
+  FunctionExpression functionExpression(
+      Modifiers modifiers, String name, NodeList argumentList, Statement body,
+      [TypeAnnotation returnType]) {
     return new FunctionExpression(
         identifier(name),
         argumentList,
@@ -103,7 +93,7 @@
         modifiers,
         null, // Initializer.
         null, // get/set.
-        null  // Async modifier.
+        null // Async modifier.
         );
   }
 
@@ -116,27 +106,29 @@
   }
 
   LiteralString literalString(String text,
-                              {String prefix: '"',
-                                String suffix: '"'}) {
-    return new LiteralString(stringToken('$prefix$text$suffix'),
-                             new DartString.literal(text));
+      {String prefix: '"', String suffix: '"'}) {
+    return new LiteralString(
+        stringToken('$prefix$text$suffix'), new DartString.literal(text));
   }
 
   LiteralList listLiteral(List<Node> elements, {bool isConst: false}) {
     return new LiteralList(
         null,
-        new NodeList(symbolToken(Precedence.OPEN_SQUARE_BRACKET_INFO),
-                     linkedList(elements),
-                     symbolToken(Precedence.CLOSE_SQUARE_BRACKET_INFO),
-                     ','),
+        new NodeList(
+            symbolToken(Precedence.OPEN_SQUARE_BRACKET_INFO),
+            linkedList(elements),
+            symbolToken(Precedence.CLOSE_SQUARE_BRACKET_INFO),
+            ','),
         isConst ? keywordToken('const') : null);
   }
 
   Node createDefinition(Identifier name, Expression initializer) {
     if (initializer == null) return name;
-    return new SendSet(null, name,
+    return new SendSet(
+        null,
+        name,
         new Operator(symbolToken(Precedence.EQ_INFO)),
-            new NodeList.singleton(initializer));
+        new NodeList.singleton(initializer));
   }
 
   VariableDefinitions initializingFormal(String fieldName) {
@@ -148,9 +140,8 @@
             new Send(identifier('this'), identifier(fieldName))));
   }
 
-  NewExpression newExpression(String typeName,
-                              NodeList arguments,
-                              {bool isConst: false}) {
+  NewExpression newExpression(String typeName, NodeList arguments,
+      {bool isConst: false}) {
     return new NewExpression(keywordToken(isConst ? 'const' : 'new'),
         new Send(null, identifier(typeName), arguments));
   }
@@ -160,9 +151,8 @@
   }
 
   Send indexGet(Expression receiver, Expression index) {
-    return new Send(receiver,
-                    new Operator(symbolToken(Precedence.INDEX_INFO)),
-                    new NodeList.singleton(index));
+    return new Send(receiver, new Operator(symbolToken(Precedence.INDEX_INFO)),
+        new NodeList.singleton(index));
   }
 
   LiteralMapEntry mapLiteralEntry(Expression key, Expression value) {
@@ -172,10 +162,11 @@
   LiteralMap mapLiteral(List<LiteralMapEntry> entries, {bool isConst: false}) {
     return new LiteralMap(
         null, // Type arguments.
-        new NodeList(symbolToken(Precedence.OPEN_CURLY_BRACKET_INFO),
-                     linkedList(entries),
-                     symbolToken(Precedence.CLOSE_CURLY_BRACKET_INFO),
-                     ','),
+        new NodeList(
+            symbolToken(Precedence.OPEN_CURLY_BRACKET_INFO),
+            linkedList(entries),
+            symbolToken(Precedence.CLOSE_CURLY_BRACKET_INFO),
+            ','),
         isConst ? keywordToken('const') : null);
   }
 }
@@ -219,34 +210,27 @@
         builder.emptyStatement());
 
     EnumConstructorElementX constructor = new EnumConstructorElementX(
-        enumClass,
-        builder.modifiers(isConst: true),
-        constructorNode);
+        enumClass, builder.modifiers(isConst: true), constructorNode);
 
-    EnumFormalElementX indexFormal = new EnumFormalElementX(
-        constructor,
-        indexDefinition,
-        builder.identifier('index'),
-        indexVariable);
+    EnumFormalElementX indexFormal = new EnumFormalElementX(constructor,
+        indexDefinition, builder.identifier('index'), indexVariable);
 
     FunctionSignatureX constructorSignature = new FunctionSignatureX(
         requiredParameters: [indexFormal],
         requiredParameterCount: 1,
-        type: new FunctionType(constructor, const VoidType(),
-            <DartType>[intType]));
+        type: new FunctionType(
+            constructor, const VoidType(), <DartType>[intType]));
     constructor.functionSignature = constructorSignature;
     enumClass.addMember(constructor, reporter);
 
-    List<FieldElement> enumValues = <FieldElement>[];
+    List<EnumConstantElement> enumValues = <EnumConstantElement>[];
     VariableList variableList =
         new VariableList(builder.modifiers(isStatic: true, isConst: true));
     variableList.type = enumType;
     int index = 0;
     List<Node> valueReferences = <Node>[];
     List<LiteralMapEntry> mapEntries = <LiteralMapEntry>[];
-    for (Link<Node> link = node.names.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+    for (Link<Node> link = node.names.nodes; !link.isEmpty; link = link.tail) {
       Identifier name = link.head;
       AstBuilder valueBuilder = new AstBuilder(name.token.charOffset);
 
@@ -255,17 +239,16 @@
 
       // Add map entry for `toString` implementation.
       mapEntries.add(valueBuilder.mapLiteralEntry(
-            valueBuilder.literalInt(index),
-            valueBuilder.literalString('${enumClass.name}.${name.source}')));
+          valueBuilder.literalInt(index),
+          valueBuilder.literalString('${enumClass.name}.${name.source}')));
 
-      Expression initializer = valueBuilder.newExpression(
-          enumClass.name,
+      Expression initializer = valueBuilder.newExpression(enumClass.name,
           valueBuilder.argumentList([valueBuilder.literalInt(index)]),
           isConst: true);
       SendSet definition = valueBuilder.createDefinition(name, initializer);
 
-      EnumFieldElementX field = new EnumFieldElementX(
-          name, enumClass, variableList, definition, initializer);
+      EnumConstantElementX field = new EnumConstantElementX(
+          name, enumClass, variableList, definition, initializer, index);
       enumValues.add(field);
       enumClass.addMember(field, reporter);
       index++;
@@ -277,14 +260,13 @@
 
     Identifier valuesIdentifier = builder.identifier('values');
     // TODO(johnniwinther): Add type argument.
-    Expression initializer = builder.listLiteral(
-        valueReferences, isConst: true);
+    Expression initializer =
+        builder.listLiteral(valueReferences, isConst: true);
 
     Node definition = builder.createDefinition(valuesIdentifier, initializer);
 
-    EnumFieldElementX valuesVariable = new EnumFieldElementX(
-        valuesIdentifier, enumClass, valuesVariableList,
-        definition, initializer);
+    EnumFieldElementX valuesVariable = new EnumFieldElementX(valuesIdentifier,
+        enumClass, valuesVariableList, definition, initializer);
 
     enumClass.addMember(valuesVariable, reporter);
 
@@ -294,20 +276,17 @@
         Modifiers.EMPTY,
         'toString',
         builder.argumentList([]),
-        builder.returnStatement(
-              builder.indexGet(
-                  builder.mapLiteral(mapEntries, isConst: true),
-                  builder.reference(builder.identifier('index')))
-            )
-        );
+        builder.returnStatement(builder.indexGet(
+            builder.mapLiteral(mapEntries, isConst: true),
+            builder.reference(builder.identifier('index')))));
 
-    EnumMethodElementX toString = new EnumMethodElementX('toString',
-        enumClass, Modifiers.EMPTY, toStringNode);
-    FunctionSignatureX toStringSignature = new FunctionSignatureX(
-        type: new FunctionType(toString, stringType));
+    EnumMethodElementX toString = new EnumMethodElementX(
+        'toString', enumClass, Modifiers.EMPTY, toStringNode);
+    FunctionSignatureX toStringSignature =
+        new FunctionSignatureX(type: new FunctionType(toString, stringType));
     toString.functionSignature = toStringSignature;
     enumClass.addMember(toString, reporter);
 
     enumClass.enumValues = enumValues;
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/resolution/label_scope.dart b/pkg/compiler/lib/src/resolution/label_scope.dart
index 21aed76..5742481 100644
--- a/pkg/compiler/lib/src/resolution/label_scope.dart
+++ b/pkg/compiler/lib/src/resolution/label_scope.dart
@@ -4,11 +4,8 @@
 
 library dart2js.resolution.label_scope;
 
-import '../elements/elements.dart' show
-    JumpTarget,
-    LabelDefinition;
-import '../util/util.dart' show
-    Link;
+import '../elements/elements.dart' show JumpTarget, LabelDefinition;
+import '../util/util.dart' show Link;
 
 abstract class LabelScope {
   LabelScope get outer;
@@ -65,10 +62,10 @@
   }
 
   JumpTarget currentBreakTarget() =>
-    breakTargetStack.isEmpty ? null : breakTargetStack.head;
+      breakTargetStack.isEmpty ? null : breakTargetStack.head;
 
   JumpTarget currentContinueTarget() =>
-    continueTargetStack.isEmpty ? null : continueTargetStack.head;
+      continueTargetStack.isEmpty ? null : continueTargetStack.head;
 
   void enterLabelScope(Map<String, LabelDefinition> elements) {
     labels = new LabeledStatementLabelScope(labels, elements);
@@ -92,8 +89,8 @@
     continueTargetStack = continueTargetStack.tail;
   }
 
-  void enterSwitch(JumpTarget breakElement,
-                   Map<String, LabelDefinition> continueElements) {
+  void enterSwitch(
+      JumpTarget breakElement, Map<String, LabelDefinition> continueElements) {
     breakTargetStack = breakTargetStack.prepend(breakElement);
     labels = new SwitchLabelScope(labels, continueElements);
     nestingLevel++;
diff --git a/pkg/compiler/lib/src/resolution/member_impl.dart b/pkg/compiler/lib/src/resolution/member_impl.dart
index 9a2d7b0..7597d36 100644
--- a/pkg/compiler/lib/src/resolution/member_impl.dart
+++ b/pkg/compiler/lib/src/resolution/member_impl.dart
@@ -11,9 +11,8 @@
   final DartType type;
   final FunctionType functionType;
 
-  DeclaredMember(this.name, this.element,
-                 this.declarer,
-                 this.type, this.functionType);
+  DeclaredMember(
+      this.name, this.element, this.declarer, this.type, this.functionType);
 
   bool get isStatic => !element.isInstanceMember;
 
@@ -55,8 +54,7 @@
 
   bool operator ==(other) {
     if (other is! Member) return false;
-    return element == other.element &&
-           isSetter == other.isSetter;
+    return element == other.element && isSetter == other.isSetter;
   }
 
   String toString() {
@@ -91,10 +89,8 @@
 class DeclaredAbstractMember extends DeclaredMember {
   final DeclaredMember implementation;
 
-  DeclaredAbstractMember(Name name, Element element,
-                         InterfaceType declarer,
-                         DartType type, FunctionType functionType,
-                         this.implementation)
+  DeclaredAbstractMember(Name name, Element element, InterfaceType declarer,
+      DartType type, FunctionType functionType, this.implementation)
       : super(name, element, declarer, type, functionType);
 
   bool get isAbstract => true;
@@ -109,8 +105,8 @@
   final DeclaredMember declaration;
   final InterfaceType instance;
 
-  InheritedMember(DeclaredMember this.declaration,
-                  InterfaceType this.instance) {
+  InheritedMember(
+      DeclaredMember this.declaration, InterfaceType this.instance) {
     assert(instance.isGeneric);
     assert(!declaration.isStatic);
   }
@@ -153,8 +149,8 @@
   }
 
   InheritedMember _newInheritedMember(InterfaceType newInstance) {
-    return new InheritedMember(declaration,
-                               instance.substByContext(newInstance));
+    return new InheritedMember(
+        declaration, instance.substByContext(newInstance));
   }
 
   Iterable<Member> get declarations => <Member>[this];
@@ -163,8 +159,7 @@
 
   bool operator ==(other) {
     if (other is! InheritedMember) return false;
-    return declaration == other.declaration &&
-           instance == other.instance;
+    return declaration == other.declaration && instance == other.instance;
   }
 
   void printOn(StringBuffer sb, DartType type) {
@@ -182,9 +177,8 @@
 class InheritedAbstractMember extends InheritedMember {
   final DeclaredMember implementation;
 
-  InheritedAbstractMember(DeclaredMember declaration,
-                          InterfaceType instance,
-                          this.implementation)
+  InheritedAbstractMember(
+      DeclaredMember declaration, InterfaceType instance, this.implementation)
       : super(declaration, instance);
 
   bool get isAbstract => true;
@@ -194,11 +188,11 @@
         declaration,
         instance.substByContext(newInstance),
         implementation != null
-            ? implementation.inheritFrom(newInstance) : null);
+            ? implementation.inheritFrom(newInstance)
+            : null);
   }
 }
 
-
 abstract class AbstractSyntheticMember implements MemberSignature {
   final Setlet<Member> inheritedMembers;
 
@@ -211,14 +205,11 @@
   Name get name => member.name;
 }
 
-
 class SyntheticMember extends AbstractSyntheticMember {
   final DartType type;
   final FunctionType functionType;
 
-  SyntheticMember(Setlet<Member> inheritedMembers,
-                  this.type,
-                  this.functionType)
+  SyntheticMember(Setlet<Member> inheritedMembers, this.type, this.functionType)
       : super(inheritedMembers);
 
   bool get isSetter => member.isSetter;
@@ -230,7 +221,7 @@
   bool get isMalformed => false;
 
   String toString() => '${type.getStringAsDeclared('$name')} synthesized '
-                       'from ${inheritedMembers}';
+      'from ${inheritedMembers}';
 }
 
 class ErroneousMember extends AbstractSyntheticMember {
@@ -251,6 +242,5 @@
   bool get isMalformed => true;
 
   String toString() => "erroneous member '$name' synthesized "
-                       "from ${inheritedMembers}";
+      "from ${inheritedMembers}";
 }
-
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index fb5a6f8..bcd4495 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -5,71 +5,51 @@
 library dart2js.resolution.members;
 
 import '../common.dart';
-import '../common/names.dart' show
-    Selectors;
-import '../common/resolution.dart' show
-    Feature;
-import '../compiler.dart' show
-    Compiler;
-import '../constants/constructors.dart' show
-    RedirectingFactoryConstantConstructor;
+import '../common/names.dart' show Selectors;
+import '../common/resolution.dart' show Feature;
+import '../compiler.dart' show Compiler;
+import '../constants/constructors.dart'
+    show RedirectingFactoryConstantConstructor;
 import '../constants/expressions.dart';
 import '../constants/values.dart';
 import '../core_types.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    ConstructorElementX,
-    ErroneousElementX,
-    FunctionElementX,
-    JumpTargetX,
-    LocalFunctionElementX,
-    LocalParameterElementX,
-    LocalVariableElementX,
-    MethodElementX,
-    ParameterElementX,
-    VariableElementX,
-    VariableList;
-import '../tokens/token.dart' show
-    isUserDefinableOperator;
+import '../elements/modelx.dart'
+    show
+        ConstructorElementX,
+        ErroneousElementX,
+        FunctionElementX,
+        JumpTargetX,
+        LocalFunctionElementX,
+        LocalParameterElementX,
+        LocalVariableElementX,
+        MethodElementX,
+        ParameterElementX,
+        VariableElementX,
+        VariableList;
+import '../tokens/token.dart' show isUserDefinableOperator;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/use.dart' show
-    DynamicUse,
-    StaticUse,
-    TypeUse;
+import '../util/util.dart' show Link;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
 
 import 'access_semantics.dart';
 import 'class_members.dart' show MembersCreator;
 import 'operators.dart';
 import 'send_structure.dart';
 
-import 'constructors.dart' show
-    ConstructorResolver,
-    ConstructorResult,
-    ConstructorResultKind;
-import 'label_scope.dart' show
-    StatementScope;
-import 'registry.dart' show
-    ResolutionRegistry;
-import 'resolution.dart' show
-    ResolverTask;
-import 'resolution_common.dart' show
-    MappingVisitor;
+import 'constructors.dart'
+    show ConstructorResolver, ConstructorResult, ConstructorResultKind;
+import 'label_scope.dart' show StatementScope;
+import 'registry.dart' show ResolutionRegistry;
+import 'resolution.dart' show ResolverTask;
+import 'resolution_common.dart' show MappingVisitor;
 import 'resolution_result.dart';
-import 'scope.dart' show
-    BlockScope,
-    MethodScope,
-    Scope;
-import 'signatures.dart' show
-    SignatureResolver;
-import 'variables.dart' show
-    VariableDefinitionsVisitor;
+import 'scope.dart' show BlockScope, MethodScope, Scope;
+import 'signatures.dart' show SignatureResolver;
+import 'variables.dart' show VariableDefinitionsVisitor;
 
 /// The state of constants in resolutions.
 enum ConstantState {
@@ -120,8 +100,9 @@
   bool sendIsMemberAccess = false;
 
   StatementScope statementScope;
-  int allowedCategory = ElementCategory.VARIABLE | ElementCategory.FUNCTION
-      | ElementCategory.IMPLIES_TYPE;
+  int allowedCategory = ElementCategory.VARIABLE |
+      ElementCategory.FUNCTION |
+      ElementCategory.IMPLIES_TYPE;
 
   /// When visiting the type declaration of the variable in a [ForIn] loop,
   /// the initializer of the variable is implicit and we should not emit an
@@ -135,59 +116,60 @@
   bool isPotentiallyMutableTarget(Element target) {
     if (target == null) return false;
     return (target.isVariable || target.isParameter) &&
-      !(target.isFinal || target.isConst);
+        !(target.isFinal || target.isConst);
   }
 
   // TODO(ahe): Find a way to share this with runtime implementation.
   static final RegExp symbolValidationPattern =
       new RegExp(r'^(?:[a-zA-Z$][a-zA-Z$0-9_]*\.)*(?:[a-zA-Z$][a-zA-Z$0-9_]*=?|'
-                 r'-|'
-                 r'unary-|'
-                 r'\[\]=|'
-                 r'~|'
-                 r'==|'
-                 r'\[\]|'
-                 r'\*|'
-                 r'/|'
-                 r'%|'
-                 r'~/|'
-                 r'\+|'
-                 r'<<|'
-                 r'>>|'
-                 r'>=|'
-                 r'>|'
-                 r'<=|'
-                 r'<|'
-                 r'&|'
-                 r'\^|'
-                 r'\|'
-                 r')$');
+          r'-|'
+          r'unary-|'
+          r'\[\]=|'
+          r'~|'
+          r'==|'
+          r'\[\]|'
+          r'\*|'
+          r'/|'
+          r'%|'
+          r'~/|'
+          r'\+|'
+          r'<<|'
+          r'>>|'
+          r'>=|'
+          r'>|'
+          r'<=|'
+          r'<|'
+          r'&|'
+          r'\^|'
+          r'\|'
+          r')$');
 
-  ResolverVisitor(Compiler compiler,
-                  Element element,
-                  ResolutionRegistry registry,
-                  {bool useEnclosingScope: false})
-    : this.enclosingElement = element,
-      // When the element is a field, we are actually resolving its
-      // initial value, which should not have access to instance
-      // fields.
-      inInstanceContext = (element.isInstanceMember && !element.isField)
-          || element.isGenerativeConstructor,
-      this.currentClass = element.isClassMember ? element.enclosingClass
-                                             : null,
-      this.statementScope = new StatementScope(),
-      scope = useEnclosingScope
-          ? Scope.buildEnclosingScope(element) : element.buildScope(),
-      // The type annotations on a typedef do not imply type checks.
-      // TODO(karlklose): clean this up (dartbug.com/8870).
-      inCheckContext = compiler.enableTypeAssertions &&
-          !element.isLibrary &&
-          !element.isTypedef &&
-          !element.enclosingElement.isTypedef,
-      inCatchBlock = false,
-      constantState = element.isConst
-          ? ConstantState.CONSTANT : ConstantState.NON_CONSTANT,
-      super(compiler, registry);
+  ResolverVisitor(
+      Compiler compiler, Element element, ResolutionRegistry registry,
+      {bool useEnclosingScope: false})
+      : this.enclosingElement = element,
+        // When the element is a field, we are actually resolving its
+        // initial value, which should not have access to instance
+        // fields.
+        inInstanceContext = (element.isInstanceMember && !element.isField) ||
+            element.isGenerativeConstructor,
+        this.currentClass =
+            element.isClassMember ? element.enclosingClass : null,
+        this.statementScope = new StatementScope(),
+        scope = useEnclosingScope
+            ? Scope.buildEnclosingScope(element)
+            : element.buildScope(),
+        // The type annotations on a typedef do not imply type checks.
+        // TODO(karlklose): clean this up (dartbug.com/8870).
+        inCheckContext = compiler.options.enableTypeAssertions &&
+            !element.isLibrary &&
+            !element.isTypedef &&
+            !element.enclosingElement.isTypedef,
+        inCatchBlock = false,
+        constantState = element.isConst
+            ? ConstantState.CONSTANT
+            : ConstantState.NON_CONSTANT,
+        super(compiler, registry);
 
   CoreClasses get coreClasses => compiler.coreClasses;
 
@@ -207,17 +189,13 @@
         reporter.reportErrorMessage(
             node, MessageKind.NO_INSTANCE_AVAILABLE, {'name': name});
         return new ErroneousElementX(MessageKind.NO_INSTANCE_AVAILABLE,
-                                     {'name': name},
-                                     name, enclosingElement);
+            {'name': name}, name, enclosingElement);
       } else if (result.isAmbiguous) {
         AmbiguousElement ambiguous = result;
         return reportAndCreateErroneousElement(
-              node,
-              name,
-              ambiguous.messageKind,
-              ambiguous.messageArguments,
-              infos: ambiguous.computeInfos(enclosingElement, reporter),
-              isError: true);
+            node, name, ambiguous.messageKind, ambiguous.messageArguments,
+            infos: ambiguous.computeInfos(enclosingElement, reporter),
+            isError: true);
       }
     }
     return result;
@@ -227,9 +205,8 @@
   JumpTarget getOrDefineTarget(Node statement) {
     JumpTarget element = registry.getTargetDefinition(statement);
     if (element == null) {
-      element = new JumpTargetX(statement,
-                                   statementScope.nestingLevel,
-                                   enclosingElement);
+      element = new JumpTargetX(
+          statement, statementScope.nestingLevel, enclosingElement);
       registry.defineTarget(statement, element);
     }
     return element;
@@ -242,8 +219,7 @@
     return result;
   }
 
-  inStaticContext(action(),
-                  {bool inConstantInitializer: false}) {
+  inStaticContext(action(), {bool inConstantInitializer: false}) {
     bool wasInstanceContext = inInstanceContext;
     ConstantState oldConstantState = constantState;
     constantState = inConstantInitializer
@@ -257,9 +233,8 @@
   }
 
   ResolutionResult visitInStaticContext(Node node,
-                                        {bool inConstantInitializer: false}) {
-    return inStaticContext(
-        () => visit(node),
+      {bool inConstantInitializer: false}) {
+    return inStaticContext(() => visit(node),
         inConstantInitializer: inConstantInitializer);
   }
 
@@ -286,12 +261,9 @@
   }
 
   ErroneousElement reportAndCreateErroneousElement(
-      Node node,
-      String name,
-      MessageKind kind,
-      Map arguments,
+      Node node, String name, MessageKind kind, Map arguments,
       {List<DiagnosticMessage> infos: const <DiagnosticMessage>[],
-       bool isError: false}) {
+      bool isError: false}) {
     if (isError) {
       reporter.reportError(
           reporter.createMessage(node, kind, arguments), infos);
@@ -311,7 +283,7 @@
   ErroneousElement reportCannotResolve(Node node, String name) {
     assert(invariant(node, !inInstanceContext,
         message: "ResolverVisitor.reportCannotResolve must not be called in "
-                 "instance context."));
+            "instance context."));
 
     // We report an error within initializers because `this` is implicitly
     // accessed when unqualified identifiers are not resolved.  For
@@ -320,8 +292,7 @@
     //   ...
     //   If `i` does not occur inside a top level or static function, `i`
     //   is equivalent to `this.id(a1 , ...)`.
-    bool inInitializer =
-        enclosingElement.isGenerativeConstructor ||
+    bool inInitializer = enclosingElement.isGenerativeConstructor ||
         (enclosingElement.isInstanceMember && enclosingElement.isField);
     MessageKind kind;
     Map arguments = {'name': name};
@@ -339,8 +310,8 @@
       kind = MessageKind.CANNOT_RESOLVE;
     }
     registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
-    return reportAndCreateErroneousElement(
-        node, name, kind, arguments, isError: inInitializer);
+    return reportAndCreateErroneousElement(node, name, kind, arguments,
+        isError: inInitializer);
   }
 
   ResolutionResult visitIdentifier(Identifier node) {
@@ -352,12 +323,10 @@
       return const NoneResult();
     } else if (node.isSuper()) {
       if (!inInstanceContext) {
-        reporter.reportErrorMessage(
-            node, MessageKind.NO_SUPER_IN_STATIC);
+        reporter.reportErrorMessage(node, MessageKind.NO_SUPER_IN_STATIC);
       }
       if ((ElementCategory.SUPER & allowedCategory) == 0) {
-        reporter.reportErrorMessage(
-            node, MessageKind.INVALID_USE_OF_SUPER);
+        reporter.reportErrorMessage(node, MessageKind.INVALID_USE_OF_SUPER);
       }
       return const NoneResult();
     } else {
@@ -379,10 +348,10 @@
         // Use the malformed element.
       } else {
         if ((element.kind.category & allowedCategory) == 0) {
-          element = reportAndCreateErroneousElement(
-              node, name, MessageKind.GENERIC,
-              // TODO(ahe): Improve error message. Need UX input.
-              {'text': "is not an expression $element"});
+          element =
+              reportAndCreateErroneousElement(node, name, MessageKind.GENERIC,
+                  // TODO(ahe): Improve error message. Need UX input.
+                  {'text': "is not an expression $element"});
         }
       }
       if (!Elements.isUnresolved(element) && element.isClass) {
@@ -430,8 +399,7 @@
     Link<Node> initializers = node.initializers.nodes;
     if (!initializers.isEmpty &&
         Initializers.isConstructorRedirect(initializers.head)) {
-      Name name =
-          getRedirectingThisOrSuperConstructorName(initializers.head);
+      Name name = getRedirectingThisOrSuperConstructorName(initializers.head);
       final ClassElement classElement = constructor.enclosingClass;
       return classElement.lookupConstructor(name.text);
     }
@@ -440,16 +408,15 @@
 
   void setupFunction(FunctionExpression node, FunctionElement function) {
     Element enclosingElement = function.enclosingElement;
-    if (node.modifiers.isStatic &&
-        enclosingElement.kind != ElementKind.CLASS) {
+    if (node.modifiers.isStatic && enclosingElement.kind != ElementKind.CLASS) {
       reporter.reportErrorMessage(node, MessageKind.ILLEGAL_STATIC);
     }
 
     scope = new MethodScope(scope, function);
     // Put the parameters in scope.
     FunctionSignature functionParameters = function.functionSignature;
-    Link<Node> parameterNodes = (node.parameters == null)
-        ? const Link<Node>() : node.parameters.nodes;
+    Link<Node> parameterNodes =
+        (node.parameters == null) ? const Link<Node>() : node.parameters.nodes;
     functionParameters.forEachParameter((ParameterElementX element) {
       // TODO(karlklose): should be a list of [FormalElement]s, but the actual
       // implementation uses [Element].
@@ -482,8 +449,8 @@
       parameterNodes = parameterNodes.tail;
     });
     addDeferredAction(enclosingElement, () {
-      functionParameters.forEachOptionalParameter(
-          (ParameterElementX parameter) {
+      functionParameters
+          .forEachOptionalParameter((ParameterElementX parameter) {
         parameter.constant =
             compiler.resolver.constantCompiler.compileConstant(parameter);
       });
@@ -496,7 +463,7 @@
   }
 
   ResolutionResult visitAssert(Assert node) {
-    if (!compiler.enableAssertMessage) {
+    if (!compiler.options.enableAssertMessage) {
       if (node.hasMessage) {
         reporter.reportErrorMessage(
             node, MessageKind.EXPERIMENTAL_ASSERT_MESSAGE);
@@ -581,7 +548,6 @@
     return const NoneResult();
   }
 
-
   /// Process a local function declaration or an anonymous function expression.
   ///
   /// [inFunctionDeclaration] is `true` when the current node is the immediate
@@ -589,15 +555,12 @@
   ///
   /// This is used to distinguish local function declarations from anonymous
   /// function expressions.
-  ResolutionResult visitFunctionExpression(
-      FunctionExpression node,
+  ResolutionResult visitFunctionExpression(FunctionExpression node,
       {bool inFunctionDeclaration: false}) {
     bool doAddToScope = inFunctionDeclaration;
     if (!inFunctionDeclaration && node.name != null) {
-      reporter.reportErrorMessage(
-          node.name,
-          MessageKind.NAMED_FUNCTION_EXPRESSION,
-          {'name': node.name});
+      reporter.reportErrorMessage(node.name,
+          MessageKind.NAMED_FUNCTION_EXPRESSION, {'name': node.name});
     }
     visit(node.returnType);
     String name;
@@ -607,15 +570,10 @@
       name = node.name.asIdentifier().source;
     }
     LocalFunctionElementX function = new LocalFunctionElementX(
-        name, node, ElementKind.FUNCTION, Modifiers.EMPTY,
-        enclosingElement);
+        name, node, ElementKind.FUNCTION, Modifiers.EMPTY, enclosingElement);
     ResolverTask.processAsyncMarker(compiler, function, registry);
     function.functionSignature = SignatureResolver.analyze(
-        compiler,
-        node.parameters,
-        node.returnType,
-        function,
-        registry,
+        compiler, node.parameters, node.returnType, function, registry,
         createRealParameters: true,
         isFunctionExpression: !inFunctionDeclaration);
     checkLocalDefinitionName(node, function);
@@ -643,15 +601,14 @@
 
   ResolutionResult visitIf(If node) {
     doInPromotionScope(node.condition.expression, () => visit(node.condition));
-    doInPromotionScope(node.thenPart,
-        () => visitIn(node.thenPart, new BlockScope(scope)));
+    doInPromotionScope(
+        node.thenPart, () => visitIn(node.thenPart, new BlockScope(scope)));
     visitIn(node.elsePart, new BlockScope(scope));
     return const NoneResult();
   }
 
-  static Selector computeSendSelector(Send node,
-                                      LibraryElement library,
-                                      Element element) {
+  static Selector computeSendSelector(
+      Send node, LibraryElement library, Element element) {
     // First determine if this is part of an assignment.
     bool isSet = node.asSendSet() != null;
 
@@ -663,9 +620,12 @@
       String source = node.selector.asOperator().source;
       String string = source;
       if (identical(string, '!') ||
-          identical(string, '&&') || identical(string, '||') ||
-          identical(string, 'is') || identical(string, 'as') ||
-          identical(string, '?') || identical(string, '??')) {
+          identical(string, '&&') ||
+          identical(string, '||') ||
+          identical(string, 'is') ||
+          identical(string, 'as') ||
+          identical(string, '?') ||
+          identical(string, '??')) {
         return null;
       }
       String op = source;
@@ -674,8 +634,7 @@
       }
       if (op == null) {
         // Unsupported operator. An error has been reported during parsing.
-        return new Selector.call(
-            new Name(source, library),
+        return new Selector.call(new Name(source, library),
             new CallStructure.unnamed(node.argumentsNode.slowLength()));
       }
       return node.arguments.isEmpty
@@ -686,8 +645,7 @@
     Identifier identifier = node.selector.asIdentifier();
     if (node.isPropertyAccess) {
       assert(!isSet);
-      return new Selector.getter(
-          new Name(identifier.source, library));
+      return new Selector.getter(new Name(identifier.source, library));
     } else if (isSet) {
       return new Selector.setter(
           new Name(identifier.source, library, isSetter: true));
@@ -716,7 +674,7 @@
     return (identifier == null)
         ? new Selector.callClosure(arity, named)
         : new Selector.call(new Name(identifier.source, library),
-                            new CallStructure(arity, named));
+            new CallStructure(arity, named));
   }
 
   Selector resolveSelector(Send node, Element element) {
@@ -749,9 +707,7 @@
         namedArguments.add(source);
         if (seenNamedArguments.containsKey(source)) {
           reportDuplicateDefinition(
-              source,
-              argument,
-              seenNamedArguments[source]);
+              source, argument, seenNamedArguments[source]);
           isValidAsConstant = false;
         } else {
           seenNamedArguments[source] = namedArgument;
@@ -765,8 +721,7 @@
     }
     sendIsMemberAccess = oldSendIsMemberAccess;
     return new ArgumentsResult(
-        new CallStructure(argumentCount, namedArguments),
-        argumentResults,
+        new CallStructure(argumentCount, namedArguments), argumentResults,
         isValidAsConstant: isValidAsConstant);
   }
 
@@ -775,8 +730,7 @@
   AccessSemantics checkSuperAccess(Send node) {
     if (!inInstanceContext) {
       ErroneousElement error = reportAndCreateErroneousElement(
-          node, 'super',
-          MessageKind.NO_SUPER_IN_STATIC, {},
+          node, 'super', MessageKind.NO_SUPER_IN_STATIC, {},
           isError: true);
       registry.registerFeature(Feature.COMPILE_TIME_ERROR);
       return new StaticAccess.invalid(error);
@@ -784,8 +738,7 @@
     if (node.isConditional) {
       // `super?.foo` is not allowed.
       ErroneousElement error = reportAndCreateErroneousElement(
-          node, 'super',
-          MessageKind.INVALID_USE_OF_SUPER, {},
+          node, 'super', MessageKind.INVALID_USE_OF_SUPER, {},
           isError: true);
       registry.registerFeature(Feature.COMPILE_TIME_ERROR);
       return new StaticAccess.invalid(error);
@@ -793,10 +746,8 @@
     if (currentClass.supertype == null) {
       // This is just to guard against internal errors, so no need
       // for a real error message.
-      ErroneousElement error = reportAndCreateErroneousElement(
-          node, 'super',
-          MessageKind.GENERIC,
-          {'text': "Object has no superclass"},
+      ErroneousElement error = reportAndCreateErroneousElement(node, 'super',
+          MessageKind.GENERIC, {'text': "Object has no superclass"},
           isError: true);
       registry.registerFeature(Feature.COMPILE_TIME_ERROR);
       return new StaticAccess.invalid(error);
@@ -810,8 +761,7 @@
   AccessSemantics checkThisAccess(Send node) {
     if (!inInstanceContext) {
       ErroneousElement error = reportAndCreateErroneousElement(
-          node, 'this',
-          MessageKind.NO_THIS_AVAILABLE, const {},
+          node, 'this', MessageKind.NO_THIS_AVAILABLE, const {},
           isError: true);
       registry.registerFeature(Feature.COMPILE_TIME_ERROR);
       return new StaticAccess.invalid(error);
@@ -843,9 +793,7 @@
   /// Compute the [AccessSemantics] corresponding to a compound super access
   /// reading from [getter] and writing to [setter].
   AccessSemantics computeCompoundSuperAccessSemantics(
-      Spannable node,
-      Element getter,
-      Element setter,
+      Spannable node, Element getter, Element setter,
       {bool isIndex: false}) {
     if (getter.isMalformed) {
       if (setter.isMalformed) {
@@ -854,7 +802,7 @@
         assert(invariant(node, setter.name == '[]=',
             message: "Unexpected super setter '$setter'."));
         return new CompoundAccessSemantics(
-                    CompoundAccessKind.UNRESOLVED_SUPER_GETTER, getter, setter);
+            CompoundAccessKind.UNRESOLVED_SUPER_GETTER, getter, setter);
       } else {
         assert(invariant(node, setter.isSetter,
             message: "Unexpected super setter '$setter'."));
@@ -911,7 +859,7 @@
         assert(invariant(node, getter.name == '[]',
             message: "Unexpected super getter '$getter'."));
         return new CompoundAccessSemantics(
-                    CompoundAccessKind.SUPER_GETTER_SETTER, getter, setter);
+            CompoundAccessKind.SUPER_GETTER_SETTER, getter, setter);
       } else {
         assert(invariant(node, setter.isSetter,
             message: "Unexpected super setter '$setter'."));
@@ -922,8 +870,8 @@
   }
 
   /// Compute the [AccessSemantics] corresponding to a local access of [target].
-  AccessSemantics computeLocalAccessSemantics(Spannable node,
-                                              LocalElement target) {
+  AccessSemantics computeLocalAccessSemantics(
+      Spannable node, LocalElement target) {
     if (target.isParameter) {
       if (target.isFinal || target.isConst) {
         return new StaticAccess.finalParameter(target);
@@ -946,9 +894,7 @@
   /// Compute the [AccessSemantics] corresponding to a static or toplevel access
   /// of [target].
   AccessSemantics computeStaticOrTopLevelAccessSemantics(
-      Spannable node,
-      Element target) {
-
+      Spannable node, Element target) {
     target = target.declaration;
     if (target.isMalformed) {
       // This handles elements with parser errors.
@@ -970,25 +916,25 @@
             message: "Unexpected static target '$target'."));
         return new StaticAccess.staticMethod(target);
       }
-     } else {
-       assert(invariant(node, target.isTopLevel,
-           message: "Unexpected statically resolved target '$target'."));
-       if (target.isGetter) {
-         return new StaticAccess.topLevelGetter(target);
-       } else if (target.isSetter) {
-         return new StaticAccess.topLevelSetter(target);
-       } else if (target.isField) {
-         if (target.isFinal) {
-           return new StaticAccess.finalTopLevelField(target);
-         } else {
-           return new StaticAccess.topLevelField(target);
-         }
-       } else {
-         assert(invariant(node, target.isFunction,
-             message: "Unexpected top level target '$target'."));
-         return new StaticAccess.topLevelMethod(target);
-       }
-     }
+    } else {
+      assert(invariant(node, target.isTopLevel,
+          message: "Unexpected statically resolved target '$target'."));
+      if (target.isGetter) {
+        return new StaticAccess.topLevelGetter(target);
+      } else if (target.isSetter) {
+        return new StaticAccess.topLevelSetter(target);
+      } else if (target.isField) {
+        if (target.isFinal) {
+          return new StaticAccess.finalTopLevelField(target);
+        } else {
+          return new StaticAccess.topLevelField(target);
+        }
+      } else {
+        assert(invariant(node, target.isFunction,
+            message: "Unexpected top level target '$target'."));
+        return new StaticAccess.topLevelMethod(target);
+      }
+    }
   }
 
   /// Compute the [AccessSemantics] for accessing the name of [selector] on the
@@ -1008,10 +954,8 @@
   ///     }
   ///
   AccessSemantics computeSuperAccessSemanticsForSelector(
-      Spannable node,
-      Selector selector,
+      Spannable node, Selector selector,
       {Name alternateName}) {
-
     Name name = selector.memberName;
     // TODO(johnniwinther): Ensure correct behavior if currentClass is a
     // patch.
@@ -1024,12 +968,16 @@
       Element error;
       if (selector.isSetter) {
         error = reportAndCreateErroneousElement(
-          node, name.text, MessageKind.SETTER_NOT_FOUND_IN_SUPER,
-          {'className': currentClass.name, 'name': name});
+            node,
+            name.text,
+            MessageKind.UNDEFINED_SUPER_SETTER,
+            {'className': currentClass.name, 'memberName': name});
       } else {
         error = reportAndCreateErroneousElement(
-          node, name.text, MessageKind.NO_SUCH_SUPER_MEMBER,
-          {'className': currentClass.name, 'memberName': name});
+            node,
+            name.text,
+            MessageKind.NO_SUCH_SUPER_MEMBER,
+            {'className': currentClass.name, 'memberName': name});
       }
       if (target == null) {
         // If a setter wasn't resolved, use the [ErroneousElement].
@@ -1060,9 +1008,7 @@
   ///     }
   ///
   AccessSemantics computeSuperAccessSemanticsForSelectors(
-      Spannable node,
-      Selector getterSelector,
-      Selector setterSelector,
+      Spannable node, Selector getterSelector, Selector setterSelector,
       {bool isIndex: false}) {
     bool getterError = false;
     bool setterError = false;
@@ -1073,7 +1019,9 @@
     // [target] may be null which means invoking noSuchMethod on super.
     if (getter == null) {
       getter = reportAndCreateErroneousElement(
-          node, getterSelector.name, MessageKind.NO_SUCH_SUPER_MEMBER,
+          node,
+          getterSelector.name,
+          MessageKind.NO_SUCH_SUPER_MEMBER,
           {'className': currentClass.name, 'memberName': getterSelector.name});
       getterError = true;
     }
@@ -1081,43 +1029,43 @@
     // [target] may be null which means invoking noSuchMethod on super.
     if (setter == null) {
       setter = reportAndCreateErroneousElement(
-          node, setterSelector.name, MessageKind.NO_SUCH_SUPER_MEMBER,
+          node,
+          setterSelector.name,
+          MessageKind.NO_SUCH_SUPER_MEMBER,
           {'className': currentClass.name, 'memberName': setterSelector.name});
       setterError = true;
     } else if (getter == setter) {
       if (setter.isFunction) {
         setter = reportAndCreateErroneousElement(
-            node, setterSelector.name,
-            MessageKind.ASSIGNING_METHOD_IN_SUPER,
-            {'superclassName': setter.enclosingClass.name,
-             'name': setterSelector.name});
+            node, setterSelector.name, MessageKind.ASSIGNING_METHOD_IN_SUPER, {
+          'superclassName': setter.enclosingClass.name,
+          'name': setterSelector.name
+        });
         setterError = true;
       } else if (setter.isField && setter.isFinal) {
-        setter = reportAndCreateErroneousElement(
-            node, setterSelector.name,
-            MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
-            {'superclassName': setter.enclosingClass.name,
-             'name': setterSelector.name});
+        setter = reportAndCreateErroneousElement(node, setterSelector.name,
+            MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER, {
+          'superclassName': setter.enclosingClass.name,
+          'name': setterSelector.name
+        });
         setterError = true;
       }
     }
     if (getterError) {
       // We still need to register the invocation, because we might
       // call [:super.noSuchMethod:] which calls [JSInvocationMirror._invokeOn].
-      registry.registerDynamicUse(
-          new DynamicUse(getterSelector, null));
+      registry.registerDynamicUse(new DynamicUse(getterSelector, null));
     }
     if (setterError) {
       // We still need to register the invocation, because we might
       // call [:super.noSuchMethod:] which calls [JSInvocationMirror._invokeOn].
-      registry.registerDynamicUse(
-          new DynamicUse(setterSelector, null));
+      registry.registerDynamicUse(new DynamicUse(setterSelector, null));
     }
     if (getterError || setterError) {
       registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
     }
-    return computeCompoundSuperAccessSemantics(
-        node, getter, setter, isIndex: isIndex);
+    return computeCompoundSuperAccessSemantics(node, getter, setter,
+        isIndex: isIndex);
   }
 
   /// Resolve [node] as a subexpression that is _not_ the prefix of a member
@@ -1214,10 +1162,8 @@
         // TODO(johnniwinther): Add information to [AccessSemantics] about
         // whether it is erroneous.
         if (semantics.kind == AccessKind.SUPER_METHOD) {
-          registry.registerStaticUse(
-              new StaticUse.superInvoke(
-                  semantics.element.declaration,
-                  selector.callStructure));
+          registry.registerStaticUse(new StaticUse.superInvoke(
+              semantics.element.declaration, selector.callStructure));
         }
         // TODO(23998): Remove this when all information goes through
         // the [SendStructure].
@@ -1235,17 +1181,15 @@
             expressionConstant.getKnownType(coreTypes);
         switch (operator.kind) {
           case UnaryOperatorKind.COMPLEMENT:
-            isValidConstant =
-                knownExpressionType == coreTypes.intType;
+            isValidConstant = knownExpressionType == coreTypes.intType;
             break;
           case UnaryOperatorKind.NEGATE:
-            isValidConstant =
-                knownExpressionType == coreTypes.intType ||
+            isValidConstant = knownExpressionType == coreTypes.intType ||
                 knownExpressionType == coreTypes.doubleType;
             break;
           case UnaryOperatorKind.NOT:
-            reporter.internalError(node,
-                "Unexpected user definable unary operator: $operator");
+            reporter.internalError(
+                node, "Unexpected user definable unary operator: $operator");
         }
         if (isValidConstant) {
           // TODO(johnniwinther): Handle potentially invalid constant
@@ -1258,8 +1202,8 @@
       }
     }
     if (semantics != null) {
-      registry.registerSendStructure(node,
-          new UnaryStructure(semantics, operator));
+      registry.registerSendStructure(
+          node, new UnaryStructure(semantics, operator));
     }
     return result;
   }
@@ -1303,9 +1247,7 @@
           rightConstant.getKnownType(coreTypes) == coreTypes.boolType) {
         // TODO(johnniwinther): Handle potentially invalid constant expressions.
         ConstantExpression constant = new BinaryConstantExpression(
-            leftConstant,
-            BinaryOperator.LOGICAL_AND,
-            rightConstant);
+            leftConstant, BinaryOperator.LOGICAL_AND, rightConstant);
         registry.setConstant(node, constant);
         return new ConstantResult(node, constant);
       }
@@ -1329,9 +1271,7 @@
           rightConstant.getKnownType(coreTypes) == coreTypes.boolType) {
         // TODO(johnniwinther): Handle potentially invalid constant expressions.
         ConstantExpression constant = new BinaryConstantExpression(
-            leftConstant,
-            BinaryOperator.LOGICAL_OR,
-            rightConstant);
+            leftConstant, BinaryOperator.LOGICAL_OR, rightConstant);
         registry.setConstant(node, constant);
         return new ConstantResult(node, constant);
       }
@@ -1366,8 +1306,8 @@
 
   /// Handle the binary expression of a user definable binary [operator], like
   /// `a + b`, `super + b`, `a == b` and `a != b`.
-  ResolutionResult handleUserDefinableBinary(Send node,
-                                             BinaryOperator operator) {
+  ResolutionResult handleUserDefinableBinary(
+      Send node, BinaryOperator operator) {
     ResolutionResult result = const NoneResult();
     Node left = node.receiver;
     Node right = node.arguments.head;
@@ -1389,10 +1329,8 @@
         // TODO(johnniwinther): Add information to [AccessSemantics] about
         // whether it is erroneous.
         if (semantics.kind == AccessKind.SUPER_METHOD) {
-          registry.registerStaticUse(
-              new StaticUse.superInvoke(
-                  semantics.element.declaration,
-                  selector.callStructure));
+          registry.registerStaticUse(new StaticUse.superInvoke(
+              semantics.element.declaration, selector.callStructure));
         }
         // TODO(23998): Remove this when all information goes through
         // the [SendStructure].
@@ -1414,26 +1352,24 @@
         switch (operator.kind) {
           case BinaryOperatorKind.EQ:
           case BinaryOperatorKind.NOT_EQ:
-            isValidConstant =
-                (knownLeftType == coreTypes.intType ||
-                 knownLeftType == coreTypes.doubleType ||
-                 knownLeftType == coreTypes.stringType ||
-                 knownLeftType == coreTypes.boolType ||
-                 knownLeftType == coreTypes.nullType) &&
+            isValidConstant = (knownLeftType == coreTypes.intType ||
+                    knownLeftType == coreTypes.doubleType ||
+                    knownLeftType == coreTypes.stringType ||
+                    knownLeftType == coreTypes.boolType ||
+                    knownLeftType == coreTypes.nullType) &&
                 (knownRightType == coreTypes.intType ||
-                 knownRightType == coreTypes.doubleType ||
-                 knownRightType == coreTypes.stringType ||
-                 knownRightType == coreTypes.boolType ||
-                 knownRightType == coreTypes.nullType);
+                    knownRightType == coreTypes.doubleType ||
+                    knownRightType == coreTypes.stringType ||
+                    knownRightType == coreTypes.boolType ||
+                    knownRightType == coreTypes.nullType);
             break;
           case BinaryOperatorKind.ADD:
-            isValidConstant =
-                (knownLeftType == coreTypes.intType ||
-                 knownLeftType == coreTypes.doubleType ||
-                 knownLeftType == coreTypes.stringType) &&
+            isValidConstant = (knownLeftType == coreTypes.intType ||
+                    knownLeftType == coreTypes.doubleType ||
+                    knownLeftType == coreTypes.stringType) &&
                 (knownRightType == coreTypes.intType ||
-                 knownRightType == coreTypes.doubleType ||
-                 knownRightType == coreTypes.stringType);
+                    knownRightType == coreTypes.doubleType ||
+                    knownRightType == coreTypes.stringType);
             break;
           case BinaryOperatorKind.SUB:
           case BinaryOperatorKind.MUL:
@@ -1444,19 +1380,17 @@
           case BinaryOperatorKind.GT:
           case BinaryOperatorKind.LTEQ:
           case BinaryOperatorKind.LT:
-            isValidConstant =
-                (knownLeftType == coreTypes.intType ||
-                 knownLeftType == coreTypes.doubleType) &&
+            isValidConstant = (knownLeftType == coreTypes.intType ||
+                    knownLeftType == coreTypes.doubleType) &&
                 (knownRightType == coreTypes.intType ||
-                 knownRightType == coreTypes.doubleType);
+                    knownRightType == coreTypes.doubleType);
             break;
           case BinaryOperatorKind.SHL:
           case BinaryOperatorKind.SHR:
           case BinaryOperatorKind.AND:
           case BinaryOperatorKind.OR:
           case BinaryOperatorKind.XOR:
-            isValidConstant =
-                knownLeftType == coreTypes.intType &&
+            isValidConstant = knownLeftType == coreTypes.intType &&
                 knownRightType == coreTypes.intType;
             break;
           case BinaryOperatorKind.INDEX:
@@ -1473,9 +1407,7 @@
           // TODO(johnniwinther): Handle potentially invalid constant
           // expressions.
           ConstantExpression constant = new BinaryConstantExpression(
-              leftResult.constant,
-              operator,
-              rightResult.constant);
+              leftResult.constant, operator, rightResult.constant);
           registry.setConstant(node, constant);
           result = new ConstantResult(node, constant);
         }
@@ -1527,8 +1459,8 @@
 
   /// Handle an invocation of an expression, like `(){}()` or `(foo)()`.
   ResolutionResult handleExpressionInvoke(Send node) {
-    assert(invariant(node, node.isCall,
-        message: "Unexpected expression: $node"));
+    assert(
+        invariant(node, node.isCall, message: "Unexpected expression: $node"));
     Node expression = node.selector;
     visitExpression(expression);
     CallStructure callStructure =
@@ -1538,8 +1470,8 @@
     // [SendStructure].
     registry.setSelector(node, selector);
     registry.registerDynamicUse(new DynamicUse(selector, null));
-    registry.registerSendStructure(node,
-        new InvokeStructure(const DynamicAccess.expression(), selector));
+    registry.registerSendStructure(
+        node, new InvokeStructure(const DynamicAccess.expression(), selector));
     return const NoneResult();
   }
 
@@ -1570,19 +1502,17 @@
       AccessSemantics accessSemantics = checkThisAccess(node);
       if (accessSemantics == null) {
         accessSemantics = const DynamicAccess.thisAccess();
-        registry.registerDynamicUse(
-            new DynamicUse(selector, null));
+        registry.registerDynamicUse(new DynamicUse(selector, null));
       }
-      registry.registerSendStructure(node,
-          new InvokeStructure(accessSemantics, selector));
+      registry.registerSendStructure(
+          node, new InvokeStructure(accessSemantics, selector));
       // TODO(23998): Remove this when all information goes through
       // the [SendStructure].
       registry.setSelector(node, selector);
       return const NoneResult();
     } else {
       // TODO(johnniwinther): Handle get of `this` when it is a [Send] node.
-      reporter.internalError(
-          node, "Unexpected node '$node'.");
+      reporter.internalError(node, "Unexpected node '$node'.");
     }
     return const NoneResult();
   }
@@ -1600,8 +1530,8 @@
     }
     AccessSemantics semantics = checkSuperAccess(node);
     if (semantics == null) {
-      semantics = computeSuperAccessSemanticsForSelector(
-          node, selector, alternateName: name.setter);
+      semantics = computeSuperAccessSemanticsForSelector(node, selector,
+          alternateName: name.setter);
     }
     if (node.isCall) {
       bool isIncompatibleInvoke = false;
@@ -1609,11 +1539,9 @@
         case AccessKind.SUPER_METHOD:
           MethodElementX superMethod = semantics.element;
           superMethod.computeType(resolution);
-          if (!callStructure.signatureApplies(
-                  superMethod.functionSignature)) {
+          if (!callStructure.signatureApplies(superMethod.functionSignature)) {
             registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
-            registry.registerDynamicUse(
-                new DynamicUse(selector, null));
+            registry.registerDynamicUse(new DynamicUse(selector, null));
             registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
             isIncompatibleInvoke = true;
           } else {
@@ -1624,11 +1552,9 @@
         case AccessKind.SUPER_FIELD:
         case AccessKind.SUPER_FINAL_FIELD:
         case AccessKind.SUPER_GETTER:
-          registry.registerStaticUse(
-              new StaticUse.superGet(semantics.element));
+          registry.registerStaticUse(new StaticUse.superGet(semantics.element));
           selector = callStructure.callSelector;
-          registry.registerDynamicUse(
-              new DynamicUse(selector, null));
+          registry.registerDynamicUse(new DynamicUse(selector, null));
           break;
         case AccessKind.SUPER_SETTER:
         case AccessKind.UNRESOLVED_SUPER:
@@ -1642,7 +1568,8 @@
               node, "Unexpected super property access $semantics.");
           break;
       }
-      registry.registerSendStructure(node,
+      registry.registerSendStructure(
+          node,
           isIncompatibleInvoke
               ? new IncompatibleInvokeStructure(semantics, selector)
               : new InvokeStructure(semantics, selector));
@@ -1651,14 +1578,13 @@
         case AccessKind.SUPER_METHOD:
           // TODO(johnniwinther): Method this should be registered as a
           // closurization.
-          registry.registerStaticUse(
-              new StaticUse.superTearOff(semantics.element));
+          registry
+              .registerStaticUse(new StaticUse.superTearOff(semantics.element));
           break;
         case AccessKind.SUPER_FIELD:
         case AccessKind.SUPER_FINAL_FIELD:
         case AccessKind.SUPER_GETTER:
-          registry.registerStaticUse(
-              new StaticUse.superGet(semantics.element));
+          registry.registerStaticUse(new StaticUse.superGet(semantics.element));
           break;
         case AccessKind.SUPER_SETTER:
         case AccessKind.UNRESOLVED_SUPER:
@@ -1689,7 +1615,7 @@
     String operatorText = node.selector.asOperator().source;
     if (operatorText == 'is') {
       return handleIs(node);
-    } else if (operatorText  == 'as') {
+    } else if (operatorText == 'as') {
       return handleAs(node);
     } else if (node.arguments.isEmpty) {
       UnaryOperator operator = UnaryOperator.parse(operatorText);
@@ -1760,7 +1686,9 @@
     // [resolveSend] to select better warning messages for getters and
     // setters.
     ErroneousElement error = reportAndCreateErroneousElement(
-        node, name.text, MessageKind.MEMBER_NOT_FOUND,
+        node,
+        name.text,
+        MessageKind.UNDEFINED_GETTER,
         {'className': receiverClass.name, 'memberName': name.text});
     // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
     // member access.
@@ -1784,7 +1712,9 @@
 
     // TODO(johnniwinther): Produce a different error for complex update.
     ErroneousElement error = reportAndCreateErroneousElement(
-        node, name.text, MessageKind.MEMBER_NOT_FOUND,
+        node,
+        name.text,
+        MessageKind.UNDEFINED_GETTER,
         {'className': receiverClass.name, 'memberName': name.text});
     // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
     // member access.
@@ -1795,7 +1725,6 @@
   /// `a` is a class and `b` is a non-static member.
   ResolutionResult handleStaticInstanceMemberAccess(
       Send node, Name name, ClassElement receiverClass, Element member) {
-
     registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
     // TODO(johnniwinther): With the simplified [TreeElements] invariant,
     // try to resolve injected elements if [currentClass] is in the patch
@@ -1805,7 +1734,9 @@
     // [resolveSend] to select better warning messages for getters and
     // setters.
     ErroneousElement error = reportAndCreateErroneousElement(
-        node, name.text, MessageKind.MEMBER_NOT_STATIC,
+        node,
+        name.text,
+        MessageKind.MEMBER_NOT_STATIC,
         {'className': receiverClass.name, 'memberName': name});
 
     // TODO(johnniwinther): Add an [AccessSemantics] for statically accessed
@@ -1818,7 +1749,6 @@
   /// where `a` is a class and `b` is a non-static member.
   ResolutionResult handleStaticInstanceMemberUpdate(
       SendSet node, Name name, ClassElement receiverClass, Element member) {
-
     registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
     // TODO(johnniwinther): With the simplified [TreeElements] invariant,
     // try to resolve injected elements if [currentClass] is in the patch
@@ -1826,7 +1756,9 @@
 
     // TODO(johnniwinther): Produce a different error for complex update.
     ErroneousElement error = reportAndCreateErroneousElement(
-        node, name.text, MessageKind.MEMBER_NOT_STATIC,
+        node,
+        name.text,
+        MessageKind.MEMBER_NOT_STATIC,
         {'className': receiverClass.name, 'memberName': name});
 
     // TODO(johnniwinther): Add an [AccessSemantics] for statically accessed
@@ -1841,9 +1773,10 @@
       Send node, Name name, ClassElement receiverClass, Element member) {
     registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
     ErroneousElement error = reportAndCreateErroneousElement(
-        node, name.text, MessageKind.PRIVATE_ACCESS,
-        {'libraryName': member.library.libraryOrScriptName,
-         'name': name});
+        node,
+        name.text,
+        MessageKind.PRIVATE_ACCESS,
+        {'libraryName': member.library.libraryOrScriptName, 'name': name});
     // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
     // member access.
     return handleErroneousAccess(
@@ -1857,9 +1790,10 @@
       SendSet node, Name name, ClassElement receiverClass, Element member) {
     registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
     ErroneousElement error = reportAndCreateErroneousElement(
-        node, name.text, MessageKind.PRIVATE_ACCESS,
-        {'libraryName': member.library.libraryOrScriptName,
-         'name': name});
+        node,
+        name.text,
+        MessageKind.PRIVATE_ACCESS,
+        {'libraryName': member.library.libraryOrScriptName, 'name': name});
     // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
     // member access.
     return handleUpdate(node, name, new StaticAccess.unresolved(error));
@@ -1931,14 +1865,13 @@
   // TODO(johnniwinther): Remove [element] when it is no longer needed for
   // evaluating constants.
   ResolutionResult handleTypeVariableTypeLiteralAccess(
-      Send node,
-      Name name,
-      TypeVariableElement element) {
+      Send node, Name name, TypeVariableElement element) {
     AccessSemantics semantics;
     if (!Elements.hasAccessToTypeVariables(enclosingElement)) {
       // TODO(johnniwinther): Add another access semantics for this.
       ErroneousElement error = reportAndCreateErroneousElement(
-          node, name.text,
+          node,
+          name.text,
           MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
           {'typeVariableName': name},
           isError: true);
@@ -1961,8 +1894,8 @@
       // the [SendStructure].
       registry.setSelector(node, selector);
 
-      registry.registerSendStructure(node,
-          new InvokeStructure(semantics, selector));
+      registry.registerSendStructure(
+          node, new InvokeStructure(semantics, selector));
     } else {
       // TODO(johnniwinther): Avoid the need for a [Selector] here.
       registry.registerSendStructure(node, new GetStructure(semantics));
@@ -1973,14 +1906,13 @@
   /// Handle access to a type literal of type variable [element]. Like `T = b`,
   /// `T++` or `T += b` where 'T' is type variable.
   ResolutionResult handleTypeVariableTypeLiteralUpdate(
-      SendSet node,
-      Name name,
-      TypeVariableElement element) {
+      SendSet node, Name name, TypeVariableElement element) {
     AccessSemantics semantics;
     if (!Elements.hasAccessToTypeVariables(enclosingElement)) {
       // TODO(johnniwinther): Add another access semantics for this.
       ErroneousElement error = reportAndCreateErroneousElement(
-          node, name.text,
+          node,
+          name.text,
           MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
           {'typeVariableName': name},
           isError: true);
@@ -1989,16 +1921,14 @@
     } else {
       ErroneousElement error;
       if (node.isIfNullAssignment) {
-        error = reportAndCreateErroneousElement(
-            node.selector, name.text,
+        error = reportAndCreateErroneousElement(node.selector, name.text,
             MessageKind.IF_NULL_ASSIGNING_TYPE, const {});
         // TODO(23998): Remove these when all information goes through
         // the [SendStructure].
         registry.useElement(node.selector, element);
       } else {
         error = reportAndCreateErroneousElement(
-            node.selector, name.text,
-            MessageKind.ASSIGNING_TYPE, const {});
+            node.selector, name.text, MessageKind.ASSIGNING_TYPE, const {});
       }
 
       // TODO(23998): Remove this when all information goes through
@@ -2017,12 +1947,8 @@
   // the [GetStructure].
   // TODO(johnniwinther): Remove [element] when it is no longer needed for
   // evaluating constants.
-  ResolutionResult handleConstantTypeLiteralAccess(
-      Send node,
-      Name name,
-      TypeDeclarationElement element,
-      DartType type,
-      ConstantAccess semantics) {
+  ResolutionResult handleConstantTypeLiteralAccess(Send node, Name name,
+      TypeDeclarationElement element, DartType type, ConstantAccess semantics) {
     registry.useElement(node, element);
     registry.registerTypeLiteral(node, type);
 
@@ -2039,8 +1965,8 @@
       registry.useElement(node.selector, element);
       analyzeConstantDeferred(node.selector, enforceConst: false);
 
-      registry.registerSendStructure(node,
-          new InvokeStructure(semantics, selector));
+      registry.registerSendStructure(
+          node, new InvokeStructure(semantics, selector));
       return const NoneResult();
     } else {
       analyzeConstantDeferred(node, enforceConst: false);
@@ -2056,20 +1982,14 @@
   // the [GetStructure].
   // TODO(johnniwinther): Remove [element] when it is no longer needed for
   // evaluating constants.
-  ResolutionResult handleConstantTypeLiteralUpdate(
-      SendSet node,
-      Name name,
-      TypeDeclarationElement element,
-      DartType type,
-      ConstantAccess semantics) {
-
+  ResolutionResult handleConstantTypeLiteralUpdate(SendSet node, Name name,
+      TypeDeclarationElement element, DartType type, ConstantAccess semantics) {
     // TODO(johnniwinther): Remove this when all constants are evaluated.
     compiler.resolver.constantCompiler.evaluate(semantics.constant);
 
     ErroneousElement error;
     if (node.isIfNullAssignment) {
-      error = reportAndCreateErroneousElement(
-          node.selector, name.text,
+      error = reportAndCreateErroneousElement(node.selector, name.text,
           MessageKind.IF_NULL_ASSIGNING_TYPE, const {});
       // TODO(23998): Remove these when all information goes through
       // the [SendStructure].
@@ -2077,8 +1997,7 @@
       registry.useElement(node.selector, element);
     } else {
       error = reportAndCreateErroneousElement(
-          node.selector, name.text,
-          MessageKind.ASSIGNING_TYPE, const {});
+          node.selector, name.text, MessageKind.ASSIGNING_TYPE, const {});
     }
 
     // TODO(23998): Remove this when all information goes through
@@ -2093,9 +2012,7 @@
   /// Handle access to a type literal of a typedef. Like `F` or
   /// `F()` where 'F' is typedef.
   ResolutionResult handleTypedefTypeLiteralAccess(
-      Send node,
-      Name name,
-      TypedefElement typdef) {
+      Send node, Name name, TypedefElement typdef) {
     typdef.ensureResolved(resolution);
     DartType type = typdef.rawType;
     ConstantExpression constant = new TypeConstantExpression(type);
@@ -2106,9 +2023,7 @@
   /// Handle access to a type literal of a typedef. Like `F = b`, `F++` or
   /// `F += b` where 'F' is typedef.
   ResolutionResult handleTypedefTypeLiteralUpdate(
-      SendSet node,
-      Name name,
-      TypedefElement typdef) {
+      SendSet node, Name name, TypedefElement typdef) {
     typdef.ensureResolved(resolution);
     DartType type = typdef.rawType;
     ConstantExpression constant = new TypeConstantExpression(type);
@@ -2125,8 +2040,7 @@
         // directly on the constant expressions.
         node.isCall ? coreTypes.typeType : type);
     AccessSemantics semantics = new ConstantAccess.dynamicTypeLiteral(constant);
-    return handleConstantTypeLiteralAccess(
-        node, const PublicName('dynamic'),
+    return handleConstantTypeLiteralAccess(node, const PublicName('dynamic'),
         coreClasses.typeClass, type, semantics);
   }
 
@@ -2137,17 +2051,14 @@
     ConstantExpression constant =
         new TypeConstantExpression(const DynamicType());
     AccessSemantics semantics = new ConstantAccess.dynamicTypeLiteral(constant);
-    return handleConstantTypeLiteralUpdate(
-        node, const PublicName('dynamic'),
+    return handleConstantTypeLiteralUpdate(node, const PublicName('dynamic'),
         coreClasses.typeClass, type, semantics);
   }
 
   /// Handle access to a type literal of a class. Like `C` or
   /// `C()` where 'C' is class.
   ResolutionResult handleClassTypeLiteralAccess(
-      Send node,
-      Name name,
-      ClassElement cls) {
+      Send node, Name name, ClassElement cls) {
     cls.ensureResolved(resolution);
     DartType type = cls.rawType;
     ConstantExpression constant = new TypeConstantExpression(type);
@@ -2158,9 +2069,7 @@
   /// Handle access to a type literal of a class. Like `C = b`, `C++` or
   /// `C += b` where 'C' is class.
   ResolutionResult handleClassTypeLiteralUpdate(
-      SendSet node,
-      Name name,
-      ClassElement cls) {
+      SendSet node, Name name, ClassElement cls) {
     cls.ensureResolved(resolution);
     DartType type = cls.rawType;
     ConstantExpression constant = new TypeConstantExpression(type);
@@ -2171,10 +2080,7 @@
   /// Handle a [Send] that resolves to a [prefix]. Like `prefix` in
   /// `prefix.Class` or `prefix` in `prefix()`, the latter being a compile time
   /// error.
-  ResolutionResult handleClassSend(
-      Send node,
-      Name name,
-      ClassElement cls) {
+  ResolutionResult handleClassSend(Send node, Name name, ClassElement cls) {
     cls.ensureResolved(resolution);
     if (sendIsMemberAccess) {
       registry.useElement(node, cls);
@@ -2187,16 +2093,14 @@
 
   /// Compute a [DeferredPrefixStructure] for [node].
   ResolutionResult handleDeferredAccess(
-      Send node,
-      PrefixElement prefix,
-      ResolutionResult result) {
+      Send node, PrefixElement prefix, ResolutionResult result) {
     assert(invariant(node, prefix.isDeferred,
         message: "Prefix $prefix is not deferred."));
     SendStructure sendStructure = registry.getSendStructure(node);
-    assert(invariant(node, sendStructure !=  null,
+    assert(invariant(node, sendStructure != null,
         message: "No SendStructure for $node."));
-    registry.registerSendStructure(node,
-        new DeferredPrefixStructure(prefix, sendStructure));
+    registry.registerSendStructure(
+        node, new DeferredPrefixStructure(prefix, sendStructure));
     if (result.isConstant) {
       ConstantExpression constant =
           new DeferredConstantExpression(result.constant, prefix);
@@ -2216,7 +2120,9 @@
     if (member == null) {
       registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
       Element error = reportAndCreateErroneousElement(
-          node, name.text, MessageKind.NO_SUCH_LIBRARY_MEMBER,
+          node,
+          name.text,
+          MessageKind.NO_SUCH_LIBRARY_MEMBER,
           {'libraryName': prefix.name, 'memberName': name});
       result = handleUnresolvedAccess(node, name, error);
     } else {
@@ -2228,7 +2134,7 @@
       // called on the parent `prefix.Class.foo` node.
       result = new PrefixResult(prefix, result.element);
     } else if (prefix.isDeferred &&
-               (member == null || !member.isDeferredLoaderGetter)) {
+        (member == null || !member.isDeferredLoaderGetter)) {
       result = handleDeferredAccess(node, prefix, result);
     }
     return result;
@@ -2244,7 +2150,9 @@
     if (member == null) {
       registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
       Element error = reportAndCreateErroneousElement(
-          node, name.text, MessageKind.NO_SUCH_LIBRARY_MEMBER,
+          node,
+          name.text,
+          MessageKind.NO_SUCH_LIBRARY_MEMBER,
           {'libraryName': prefix.name, 'memberName': name});
       return handleUpdate(node, name, new StaticAccess.unresolved(error));
     } else {
@@ -2256,7 +2164,7 @@
       // called on the parent `prefix.Class.foo` node.
       result = new PrefixResult(prefix, result.element);
     } else if (prefix.isDeferred &&
-               (member == null || !member.isDeferredLoaderGetter)) {
+        (member == null || !member.isDeferredLoaderGetter)) {
       result = handleDeferredAccess(node, prefix, result);
     }
     return result;
@@ -2266,19 +2174,13 @@
   /// `prefix.Class` or `prefix` in `prefix()`, the latter being a compile time
   /// error.
   ResolutionResult handleLibraryPrefix(
-      Send node,
-      Name name,
-      PrefixElement prefix) {
+      Send node, Name name, PrefixElement prefix) {
     if ((ElementCategory.PREFIX & allowedCategory) == 0) {
       ErroneousElement error = reportAndCreateErroneousElement(
-          node,
-          name.text,
-          MessageKind.PREFIX_AS_EXPRESSION,
-          {'prefix': name},
+          node, name.text, MessageKind.PREFIX_AS_EXPRESSION, {'prefix': name},
           isError: true);
       registry.registerFeature(Feature.COMPILE_TIME_ERROR);
-      return handleErroneousAccess(
-          node, name, new StaticAccess.invalid(error));
+      return handleErroneousAccess(node, name, new StaticAccess.invalid(error));
     }
     if (prefix.isDeferred) {
       // TODO(23998): Remove this when deferred access is detected
@@ -2340,14 +2242,12 @@
       CallStructure callStructure =
           resolveArguments(node.argumentsNode).callStructure;
       selector = new Selector.call(name, callStructure);
-      registry.registerDynamicUse(
-          new DynamicUse(selector, null));
+      registry.registerDynamicUse(new DynamicUse(selector, null));
       sendStructure = new InvokeStructure(semantics, selector);
     } else {
       assert(invariant(node, node.isPropertyAccess));
       selector = new Selector.getter(name);
-      registry.registerDynamicUse(
-          new DynamicUse(selector, null));
+      registry.registerDynamicUse(new DynamicUse(selector, null));
       sendStructure = new GetStructure(semantics);
     }
     registry.registerSendStructure(node, sendStructure);
@@ -2362,11 +2262,9 @@
       SendSet node, Name name, Element element, AccessSemantics semantics) {
     Selector getterSelector = new Selector.getter(name);
     Selector setterSelector = new Selector.setter(name.setter);
-    registry.registerDynamicUse(
-        new DynamicUse(setterSelector, null));
+    registry.registerDynamicUse(new DynamicUse(setterSelector, null));
     if (node.isComplex) {
-      registry.registerDynamicUse(
-          new DynamicUse(getterSelector, null));
+      registry.registerDynamicUse(new DynamicUse(getterSelector, null));
     }
 
     // TODO(23998): Remove these when elements are only accessed through the
@@ -2391,9 +2289,7 @@
   /// Handle `this` as a qualified property, like `a.this`.
   ResolutionResult handleQualifiedThisAccess(Send node, Name name) {
     ErroneousElement error = reportAndCreateErroneousElement(
-        node.selector,
-        name.text,
-        MessageKind.THIS_PROPERTY, {},
+        node.selector, name.text, MessageKind.THIS_PROPERTY, {},
         isError: true);
     registry.registerFeature(Feature.COMPILE_TIME_ERROR);
     AccessSemantics accessSemantics = new StaticAccess.invalid(error);
@@ -2470,7 +2366,7 @@
 
   /// Handle access unresolved access to [name] in a non-instance context.
   ResolutionResult handleUnresolvedAccess(
-        Send node, Name name, Element element) {
+      Send node, Name name, Element element) {
     // TODO(johnniwinther): Support unresolved top level access as an
     // [AccessSemantics].
     AccessSemantics semantics = new StaticAccess.unresolved(element);
@@ -2504,15 +2400,9 @@
 
   /// Handle access to an ambiguous element, that is, a name imported twice.
   ResolutionResult handleAmbiguousSend(
-      Send node,
-      Name name,
-      AmbiguousElement element) {
-
+      Send node, Name name, AmbiguousElement element) {
     ErroneousElement error = reportAndCreateErroneousElement(
-        node,
-        name.text,
-        element.messageKind,
-        element.messageArguments,
+        node, name.text, element.messageKind, element.messageArguments,
         infos: element.computeInfos(enclosingElement, reporter));
     registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
 
@@ -2523,15 +2413,9 @@
 
   /// Handle update to an ambiguous element, that is, a name imported twice.
   ResolutionResult handleAmbiguousUpdate(
-      SendSet node,
-      Name name,
-      AmbiguousElement element) {
-
+      SendSet node, Name name, AmbiguousElement element) {
     ErroneousElement error = reportAndCreateErroneousElement(
-        node,
-        name.text,
-        element.messageKind,
-        element.messageArguments,
+        node, name.text, element.messageKind, element.messageArguments,
         infos: element.computeInfos(enclosingElement, reporter));
     registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
 
@@ -2543,8 +2427,7 @@
   /// Report access of an instance [member] from a non-instance context.
   AccessSemantics reportStaticInstanceAccess(Send node, Name name) {
     ErroneousElement error = reportAndCreateErroneousElement(
-        node, name.text,
-        MessageKind.NO_INSTANCE_AVAILABLE, {'name': name},
+        node, name.text, MessageKind.NO_INSTANCE_AVAILABLE, {'name': name},
         isError: true);
     // TODO(johnniwinther): Support static instance access as an
     // [AccessSemantics].
@@ -2568,8 +2451,7 @@
           function.computeType(resolution);
           if (!callStructure.signatureApplies(function.functionSignature)) {
             registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
-            registry.registerDynamicUse(
-                new DynamicUse(selector, null));
+            registry.registerDynamicUse(new DynamicUse(selector, null));
             isIncompatibleInvoke = true;
           }
           break;
@@ -2578,15 +2460,14 @@
         case AccessKind.LOCAL_VARIABLE:
         case AccessKind.FINAL_LOCAL_VARIABLE:
           selector = callStructure.callSelector;
-          registry.registerDynamicUse(
-              new DynamicUse(selector, null));
+          registry.registerDynamicUse(new DynamicUse(selector, null));
           break;
         default:
-          reporter.internalError(node,
-              "Unexpected local access $semantics.");
+          reporter.internalError(node, "Unexpected local access $semantics.");
           break;
       }
-      registry.registerSendStructure(node,
+      registry.registerSendStructure(
+          node,
           isIncompatibleInvoke
               ? new IncompatibleInvokeStructure(semantics, selector)
               : new InvokeStructure(semantics, selector));
@@ -2602,15 +2483,14 @@
             ParameterElement parameter = element;
             if (parameter.isNamed) {
               result = new ConstantResult(
-                  node,
-                  new NamedArgumentReference(parameter.name),
+                  node, new NamedArgumentReference(parameter.name),
                   element: element);
             } else {
               result = new ConstantResult(
                   node,
-                  new PositionalArgumentReference(
-                      parameter.functionDeclaration.parameters.indexOf(
-                          parameter)),
+                  new PositionalArgumentReference(parameter
+                      .functionDeclaration.parameters
+                      .indexOf(parameter)),
                   element: element);
             }
           } else {
@@ -2620,16 +2500,14 @@
         case AccessKind.FINAL_LOCAL_VARIABLE:
           if (element.isConst) {
             result = new ConstantResult(
-                node,
-                new VariableConstantExpression(element),
+                node, new VariableConstantExpression(element),
                 element: element);
           } else {
             result = new ElementResult(element);
           }
           break;
         default:
-          reporter.internalError(node,
-              "Unexpected local access $semantics.");
+          reporter.internalError(node, "Unexpected local access $semantics.");
           break;
       }
       selector = new Selector.getter(name);
@@ -2652,18 +2530,16 @@
     ErroneousElement error;
     if (element.isParameter) {
       if (element.isFinal) {
-        error = reportAndCreateErroneousElement(
-            node.selector, name.text,
-            MessageKind.CANNOT_RESOLVE_SETTER, const {});
+        error = reportAndCreateErroneousElement(node.selector, name.text,
+            MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER, {'name': name});
         semantics = new StaticAccess.finalParameter(element);
       } else {
         semantics = new StaticAccess.parameter(element);
       }
     } else if (element.isVariable) {
       if (element.isFinal || element.isConst) {
-        error = reportAndCreateErroneousElement(
-            node.selector, name.text,
-            MessageKind.CANNOT_RESOLVE_SETTER, const {});
+        error = reportAndCreateErroneousElement(node.selector, name.text,
+            MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER, {'name': name});
         semantics = new StaticAccess.finalLocalVariable(element);
       } else {
         semantics = new StaticAccess.localVariable(element);
@@ -2672,8 +2548,7 @@
       assert(invariant(node, element.isFunction,
           message: "Unexpected local $element."));
       error = reportAndCreateErroneousElement(
-          node.selector, name.text,
-          MessageKind.ASSIGNING_METHOD, const {});
+          node.selector, name.text, MessageKind.ASSIGNING_METHOD, const {});
       semantics = new StaticAccess.localFunction(element);
     }
     if (isPotentiallyMutableTarget(element)) {
@@ -2698,7 +2573,7 @@
 
   /// Handle access of a static or top level [element].
   ResolutionResult handleStaticOrTopLevelAccess(
-        Send node, Name name, Element element) {
+      Send node, Name name, Element element) {
     ResolutionResult result = const NoneResult();
     MemberElement member;
     if (element.isAbstractField) {
@@ -2715,21 +2590,20 @@
     // of parse errors to make [element] erroneous. Fix this!
     member.computeType(resolution);
 
-
     if (member == compiler.mirrorSystemGetNameFunction &&
         !compiler.mirrorUsageAnalyzerTask.hasMirrorUsage(enclosingElement)) {
-      reporter.reportHintMessage(
-          node.selector, MessageKind.STATIC_FUNCTION_BLOAT,
-          {'class': compiler.mirrorSystemClass.name,
-           'name': compiler.mirrorSystemGetNameFunction.name});
+      reporter
+          .reportHintMessage(node.selector, MessageKind.STATIC_FUNCTION_BLOAT, {
+        'class': compiler.mirrorSystemClass.name,
+        'name': compiler.mirrorSystemGetNameFunction.name
+      });
     }
 
     Selector selector;
     AccessSemantics semantics =
         computeStaticOrTopLevelAccessSemantics(node, member);
     if (node.isCall) {
-      ArgumentsResult argumentsResult =
-          resolveArguments(node.argumentsNode);
+      ArgumentsResult argumentsResult = resolveArguments(node.argumentsNode);
       CallStructure callStructure = argumentsResult.callStructure;
       selector = new Selector.call(name, callStructure);
 
@@ -2741,8 +2615,7 @@
           method.computeType(resolution);
           if (!callStructure.signatureApplies(method.functionSignature)) {
             registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
-            registry.registerDynamicUse(
-                new DynamicUse(selector, null));
+            registry.registerDynamicUse(new DynamicUse(selector, null));
             isIncompatibleInvoke = true;
           } else {
             registry.registerStaticUse(
@@ -2750,7 +2623,8 @@
             handleForeignCall(node, semantics.element, callStructure);
             if (method == compiler.identicalFunction &&
                 argumentsResult.isValidAsConstant) {
-              result = new ConstantResult(node,
+              result = new ConstantResult(
+                  node,
                   new IdenticalConstantExpression(
                       argumentsResult.argumentResults[0].constant,
                       argumentsResult.argumentResults[1].constant));
@@ -2763,26 +2637,25 @@
         case AccessKind.TOPLEVEL_FIELD:
         case AccessKind.FINAL_TOPLEVEL_FIELD:
         case AccessKind.TOPLEVEL_GETTER:
-          registry.registerStaticUse(
-              new StaticUse.staticGet(semantics.element));
+          registry
+              .registerStaticUse(new StaticUse.staticGet(semantics.element));
           selector = callStructure.callSelector;
-          registry.registerDynamicUse(
-              new DynamicUse(selector, null));
+          registry.registerDynamicUse(new DynamicUse(selector, null));
           break;
         case AccessKind.STATIC_SETTER:
         case AccessKind.TOPLEVEL_SETTER:
         case AccessKind.UNRESOLVED:
           registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
-          member = reportAndCreateErroneousElement(
-              node.selector, name.text,
-              MessageKind.CANNOT_RESOLVE_GETTER, const {});
+          member = reportAndCreateErroneousElement(node.selector, name.text,
+              MessageKind.UNDEFINED_STATIC_GETTER_BUT_SETTER, {'name': name});
           break;
         default:
-          reporter.internalError(node,
-              "Unexpected statically resolved access $semantics.");
+          reporter.internalError(
+              node, "Unexpected statically resolved access $semantics.");
           break;
       }
-      registry.registerSendStructure(node,
+      registry.registerSendStructure(
+          node,
           isIncompatibleInvoke
               ? new IncompatibleInvokeStructure(semantics, selector)
               : new InvokeStructure(semantics, selector));
@@ -2800,27 +2673,26 @@
         case AccessKind.TOPLEVEL_FIELD:
         case AccessKind.FINAL_TOPLEVEL_FIELD:
         case AccessKind.TOPLEVEL_GETTER:
-          registry.registerStaticUse(
-              new StaticUse.staticGet(semantics.element));
+          registry
+              .registerStaticUse(new StaticUse.staticGet(semantics.element));
           break;
         case AccessKind.STATIC_SETTER:
         case AccessKind.TOPLEVEL_SETTER:
         case AccessKind.UNRESOLVED:
           registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
-          member = reportAndCreateErroneousElement(
-              node.selector, name.text,
-              MessageKind.CANNOT_RESOLVE_GETTER, const {});
+          member = reportAndCreateErroneousElement(node.selector, name.text,
+              MessageKind.UNDEFINED_STATIC_GETTER_BUT_SETTER, {'name': name});
           break;
         default:
-          reporter.internalError(node,
-              "Unexpected statically resolved access $semantics.");
+          reporter.internalError(
+              node, "Unexpected statically resolved access $semantics.");
           break;
       }
       registry.registerSendStructure(node, new GetStructure(semantics));
       if (member.isConst) {
         FieldElement field = member;
-        result = new ConstantResult(
-            node, new VariableConstantExpression(field), element: field);
+        result = new ConstantResult(node, new VariableConstantExpression(field),
+            element: field);
       } else {
         result = new ElementResult(member);
       }
@@ -2836,14 +2708,16 @@
 
   /// Handle update of a static or top level [element].
   ResolutionResult handleStaticOrTopLevelUpdate(
-        SendSet node, Name name, Element element) {
+      SendSet node, Name name, Element element) {
     AccessSemantics semantics;
     if (element.isAbstractField) {
       AbstractFieldElement abstractField = element;
       if (abstractField.setter == null) {
         ErroneousElement error = reportAndCreateErroneousElement(
-            node.selector, name.text,
-            MessageKind.CANNOT_RESOLVE_SETTER, const {});
+            node.selector,
+            name.text,
+            MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER,
+            {'name': name});
         registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
 
         if (node.isComplex) {
@@ -2860,13 +2734,15 @@
               ? new StaticAccess.topLevelGetter(abstractField.getter)
               : new StaticAccess.staticGetter(abstractField.getter);
         }
-        registry.registerStaticUse(
-            new StaticUse.staticGet(abstractField.getter));
+        registry
+            .registerStaticUse(new StaticUse.staticGet(abstractField.getter));
       } else if (node.isComplex) {
         if (abstractField.getter == null) {
           ErroneousElement error = reportAndCreateErroneousElement(
-              node.selector, name.text,
-              MessageKind.CANNOT_RESOLVE_GETTER, const {});
+              node.selector,
+              name.text,
+              MessageKind.UNDEFINED_STATIC_GETTER_BUT_SETTER,
+              {'name': name});
           registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
           // `a++` or `a += b` where `a` has no getter.
           semantics = new CompoundAccessSemantics(
@@ -2875,8 +2751,8 @@
                   : CompoundAccessKind.UNRESOLVED_STATIC_GETTER,
               error,
               abstractField.setter);
-          registry.registerStaticUse(
-              new StaticUse.staticSet(abstractField.setter));
+          registry
+              .registerStaticUse(new StaticUse.staticSet(abstractField.setter));
         } else {
           // `a++` or `a += b` where `a` has both a getter and a setter.
           semantics = new CompoundAccessSemantics(
@@ -2885,18 +2761,18 @@
                   : CompoundAccessKind.STATIC_GETTER_SETTER,
               abstractField.getter,
               abstractField.setter);
-          registry.registerStaticUse(
-              new StaticUse.staticGet(abstractField.getter));
-          registry.registerStaticUse(
-              new StaticUse.staticSet(abstractField.setter));
+          registry
+              .registerStaticUse(new StaticUse.staticGet(abstractField.getter));
+          registry
+              .registerStaticUse(new StaticUse.staticSet(abstractField.setter));
         }
       } else {
         // `a = b` where `a` has a setter.
         semantics = element.isTopLevel
             ? new StaticAccess.topLevelSetter(abstractField.setter)
             : new StaticAccess.staticSetter(abstractField.setter);
-        registry.registerStaticUse(
-            new StaticUse.staticSet(abstractField.setter));
+        registry
+            .registerStaticUse(new StaticUse.staticSet(abstractField.setter));
       }
     } else {
       MemberElement member = element;
@@ -2909,13 +2785,11 @@
       } else if (member.isFunction) {
         // `a = b`, `a++` or `a += b` where `a` is a function.
         ErroneousElement error = reportAndCreateErroneousElement(
-            node.selector, name.text,
-            MessageKind.ASSIGNING_METHOD, const {});
+            node.selector, name.text, MessageKind.ASSIGNING_METHOD, const {});
         registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
         if (node.isComplex) {
           // `a++` or `a += b` where `a` is a function.
-          registry.registerStaticUse(
-              new StaticUse.staticTearOff(element));
+          registry.registerStaticUse(new StaticUse.staticTearOff(element));
         }
         semantics = member.isTopLevel
             ? new StaticAccess.topLevelMethod(member)
@@ -2930,8 +2804,10 @@
         }
         if (member.isFinal || member.isConst) {
           ErroneousElement error = reportAndCreateErroneousElement(
-               node.selector, name.text,
-               MessageKind.CANNOT_RESOLVE_SETTER, const {});
+              node.selector,
+              name.text,
+              MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER,
+              {'name': name});
           registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
           semantics = member.isTopLevel
               ? new StaticAccess.finalTopLevelField(member)
@@ -2956,8 +2832,8 @@
       // This handles elements with parser errors.
       assert(invariant(node, element is! ErroneousElement,
           message: "Unexpected erroneous element $element."));
-      return handleErroneousAccess(node, name,
-          new StaticAccess.unresolved(element));
+      return handleErroneousAccess(
+          node, name, new StaticAccess.unresolved(element));
     }
     if (element.isInstanceMember) {
       if (inInstanceContext) {
@@ -2996,7 +2872,7 @@
       // This handles elements with parser errors..
       assert(invariant(node, element is! ErroneousElement,
           message: "Unexpected erroneous element $element."));
-      return handleUpdate(node, name,new StaticAccess.unresolved(element));
+      return handleUpdate(node, name, new StaticAccess.unresolved(element));
     }
     if (element.isInstanceMember) {
       if (inInstanceContext) {
@@ -3017,14 +2893,10 @@
     } else if (element.isPrefix) {
       // `p = b` where `p` is a prefix.
       ErroneousElement error = reportAndCreateErroneousElement(
-           node,
-           name.text,
-           MessageKind.PREFIX_AS_EXPRESSION,
-           {'prefix': name},
-           isError: true);
+          node, name.text, MessageKind.PREFIX_AS_EXPRESSION, {'prefix': name},
+          isError: true);
       registry.registerFeature(Feature.COMPILE_TIME_ERROR);
-      return handleUpdate(
-          node, name, new StaticAccess.invalid(error));
+      return handleUpdate(node, name, new StaticAccess.invalid(error));
     } else if (element.isLocal) {
       return handleLocalUpdate(node, name, element);
     } else if (element.isStatic || element.isTopLevel) {
@@ -3117,9 +2989,8 @@
   }
 
   // TODO(johnniwinther): Move this to the backend resolution callbacks.
-  void handleForeignCall(Send node,
-                         Element target,
-                         CallStructure callStructure) {
+  void handleForeignCall(
+      Send node, Element target, CallStructure callStructure) {
     if (target != null && compiler.backend.isForeign(target)) {
       registry.registerForeignCall(node, target, callStructure, this);
     }
@@ -3157,12 +3028,9 @@
       registry.setSelector(node, setterSelector);
       registry.setOperatorSelectorInComplexSendSet(node, operatorSelector);
 
-      registry.registerDynamicUse(
-          new DynamicUse(getterSelector, null));
-      registry.registerDynamicUse(
-          new DynamicUse(setterSelector, null));
-      registry.registerDynamicUse(
-          new DynamicUse(operatorSelector, null));
+      registry.registerDynamicUse(new DynamicUse(getterSelector, null));
+      registry.registerDynamicUse(new DynamicUse(setterSelector, null));
+      registry.registerDynamicUse(new DynamicUse(operatorSelector, null));
 
       SendStructure sendStructure = node.isPrefix
           ? new IndexPrefixStructure(semantics, operator)
@@ -3181,8 +3049,7 @@
         // TODO(23998): Remove this when selectors are only accessed
         // through the send structure.
         registry.setSelector(node, setterSelector);
-        registry.registerDynamicUse(
-            new DynamicUse(setterSelector, null));
+        registry.registerDynamicUse(new DynamicUse(setterSelector, null));
 
         SendStructure sendStructure = new IndexSetStructure(semantics);
         registry.registerSendStructure(node, sendStructure);
@@ -3200,15 +3067,16 @@
         registry.setSelector(node, setterSelector);
         registry.setOperatorSelectorInComplexSendSet(node, operatorSelector);
 
-        registry.registerDynamicUse(
-            new DynamicUse(getterSelector, null));
-        registry.registerDynamicUse(
-            new DynamicUse(setterSelector, null));
-        registry.registerDynamicUse(
-            new DynamicUse(operatorSelector, null));
+        registry.registerDynamicUse(new DynamicUse(getterSelector, null));
+        registry.registerDynamicUse(new DynamicUse(setterSelector, null));
+        registry.registerDynamicUse(new DynamicUse(operatorSelector, null));
 
-        SendStructure sendStructure =
-            new CompoundIndexSetStructure(semantics, operator);
+        SendStructure sendStructure;
+        if (operator.kind == AssignmentOperatorKind.IF_NULL) {
+          sendStructure = new IndexSetIfNullStructure(semantics);
+        } else {
+          sendStructure = new CompoundIndexSetStructure(semantics, operator);
+        }
         registry.registerSendStructure(node, sendStructure);
         return const NoneResult();
       }
@@ -3240,17 +3108,16 @@
 
       if (semantics == null) {
         semantics = computeSuperAccessSemanticsForSelectors(
-            node, getterSelector, setterSelector, isIndex: true);
+            node, getterSelector, setterSelector,
+            isIndex: true);
 
         if (!semantics.getter.isError) {
-          registry.registerStaticUse(
-              new StaticUse.superInvoke(
-                  semantics.getter, getterSelector.callStructure));
+          registry.registerStaticUse(new StaticUse.superInvoke(
+              semantics.getter, getterSelector.callStructure));
         }
         if (!semantics.setter.isError) {
-          registry.registerStaticUse(
-              new StaticUse.superInvoke(
-                  semantics.setter, setterSelector.callStructure));
+          registry.registerStaticUse(new StaticUse.superInvoke(
+              semantics.setter, setterSelector.callStructure));
         }
 
         // TODO(23998): Remove these when elements are only accessed
@@ -3258,8 +3125,7 @@
         registry.useElement(node, semantics.setter);
         registry.useElement(node.selector, semantics.getter);
       }
-      registry.registerDynamicUse(
-          new DynamicUse(operatorSelector, null));
+      registry.registerDynamicUse(new DynamicUse(operatorSelector, null));
 
       SendStructure sendStructure = node.isPrefix
           ? new IndexPrefixStructure(semantics, operator)
@@ -3287,9 +3153,8 @@
         // through the send structure.
         registry.setSelector(node, setterSelector);
         if (!semantics.setter.isError) {
-          registry.registerStaticUse(
-              new StaticUse.superInvoke(
-                  semantics.setter, setterSelector.callStructure));
+          registry.registerStaticUse(new StaticUse.superInvoke(
+              semantics.setter, setterSelector.callStructure));
         }
 
         SendStructure sendStructure = new IndexSetStructure(semantics);
@@ -3303,17 +3168,16 @@
             new Selector.binaryOperator(operator.selectorName);
         if (semantics == null) {
           semantics = computeSuperAccessSemanticsForSelectors(
-              node, getterSelector, setterSelector, isIndex: true);
+              node, getterSelector, setterSelector,
+              isIndex: true);
 
           if (!semantics.getter.isError) {
-            registry.registerStaticUse(
-                new StaticUse.superInvoke(
-                    semantics.getter, getterSelector.callStructure));
+            registry.registerStaticUse(new StaticUse.superInvoke(
+                semantics.getter, getterSelector.callStructure));
           }
           if (!semantics.setter.isError) {
-            registry.registerStaticUse(
-                new StaticUse.superInvoke(
-                    semantics.setter, setterSelector.callStructure));
+            registry.registerStaticUse(new StaticUse.superInvoke(
+                semantics.setter, setterSelector.callStructure));
           }
 
           // TODO(23998): Remove these when elements are only accessed
@@ -3328,11 +3192,14 @@
         registry.setSelector(node, setterSelector);
         registry.setOperatorSelectorInComplexSendSet(node, operatorSelector);
 
-        registry.registerDynamicUse(
-            new DynamicUse(operatorSelector, null));
+        registry.registerDynamicUse(new DynamicUse(operatorSelector, null));
 
-        SendStructure sendStructure =
-            new CompoundIndexSetStructure(semantics, operator);
+        SendStructure sendStructure;
+        if (operator.kind == AssignmentOperatorKind.IF_NULL) {
+          sendStructure = new IndexSetIfNullStructure(semantics);
+        } else {
+          sendStructure = new CompoundIndexSetStructure(semantics, operator);
+        }
         registry.registerSendStructure(node, sendStructure);
         return const NoneResult();
       }
@@ -3353,8 +3220,8 @@
     void registerStaticUses(AccessSemantics semantics) {
       switch (semantics.kind) {
         case AccessKind.SUPER_METHOD:
-          registry.registerStaticUse(
-              new StaticUse.superTearOff(semantics.element));
+          registry
+              .registerStaticUse(new StaticUse.superTearOff(semantics.element));
           break;
         case AccessKind.SUPER_GETTER:
           registry.registerStaticUse(new StaticUse.superGet(semantics.getter));
@@ -3364,29 +3231,27 @@
               new StaticUse.superSetterSet(semantics.setter));
           break;
         case AccessKind.SUPER_FIELD:
-          registry.registerStaticUse(
-              new StaticUse.superGet(semantics.element));
+          registry.registerStaticUse(new StaticUse.superGet(semantics.element));
           registry.registerStaticUse(
               new StaticUse.superFieldSet(semantics.element));
           break;
         case AccessKind.SUPER_FINAL_FIELD:
-          registry.registerStaticUse(
-              new StaticUse.superGet(semantics.element));
+          registry.registerStaticUse(new StaticUse.superGet(semantics.element));
           break;
         case AccessKind.COMPOUND:
           CompoundAccessSemantics compoundSemantics = semantics;
           switch (compoundSemantics.compoundAccessKind) {
             case CompoundAccessKind.SUPER_GETTER_FIELD:
             case CompoundAccessKind.SUPER_FIELD_FIELD:
-              registry.registerStaticUse(
-                  new StaticUse.superGet(semantics.getter));
+              registry
+                  .registerStaticUse(new StaticUse.superGet(semantics.getter));
               registry.registerStaticUse(
                   new StaticUse.superFieldSet(semantics.setter));
               break;
             case CompoundAccessKind.SUPER_FIELD_SETTER:
             case CompoundAccessKind.SUPER_GETTER_SETTER:
-              registry.registerStaticUse(
-                  new StaticUse.superGet(semantics.getter));
+              registry
+                  .registerStaticUse(new StaticUse.superGet(semantics.getter));
               registry.registerStaticUse(
                   new StaticUse.superSetterSet(semantics.setter));
               break;
@@ -3399,8 +3264,8 @@
                   new StaticUse.superSetterSet(semantics.setter));
               break;
             case CompoundAccessKind.UNRESOLVED_SUPER_SETTER:
-              registry.registerStaticUse(
-                  new StaticUse.superGet(semantics.getter));
+              registry
+                  .registerStaticUse(new StaticUse.superGet(semantics.getter));
               break;
             default:
               break;
@@ -3425,29 +3290,28 @@
       if (operator.kind == AssignmentOperatorKind.ASSIGN) {
         // `super.a = b`.
         if (semantics == null) {
-          semantics =
-              computeSuperAccessSemanticsForSelector(
-                  node, setterSelector, alternateName: name);
+          semantics = computeSuperAccessSemanticsForSelector(
+              node, setterSelector,
+              alternateName: name);
           switch (semantics.kind) {
             case AccessKind.SUPER_FINAL_FIELD:
               reporter.reportWarningMessage(
-                  node,
-                  MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
-                  {'name': name,
-                   'superclassName': semantics.setter.enclosingClass.name});
+                  node, MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER, {
+                'name': name,
+                'superclassName': semantics.setter.enclosingClass.name
+              });
               // TODO(johnniwinther): This shouldn't be needed.
-              registry.registerDynamicUse(
-                  new DynamicUse(setterSelector, null));
+              registry.registerDynamicUse(new DynamicUse(setterSelector, null));
               registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
               break;
             case AccessKind.SUPER_METHOD:
               reporter.reportWarningMessage(
-                  node, MessageKind.ASSIGNING_METHOD_IN_SUPER,
-                  {'name': name,
-                   'superclassName': semantics.setter.enclosingClass.name});
+                  node, MessageKind.ASSIGNING_METHOD_IN_SUPER, {
+                'name': name,
+                'superclassName': semantics.setter.enclosingClass.name
+              });
               // TODO(johnniwinther): This shouldn't be needed.
-              registry.registerDynamicUse(
-                  new DynamicUse(setterSelector, null));
+              registry.registerDynamicUse(new DynamicUse(setterSelector, null));
               registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
               break;
             case AccessKind.SUPER_FIELD:
@@ -3478,9 +3342,7 @@
   /// Handle update of an entity defined by [semantics]. For instance `a = b`,
   /// `a++` or `a += b` where [semantics] describe `a`.
   ResolutionResult handleUpdate(
-      SendSet node,
-      Name name,
-      AccessSemantics semantics) {
+      SendSet node, Name name, AccessSemantics semantics) {
     SendStructure sendStructure;
     String operatorText = node.assignmentOperator.source;
     Selector getterSelector = new Selector.getter(name);
@@ -3502,8 +3364,7 @@
       registry.useElement(node, semantics.setter);
       registry.useElement(node.selector, semantics.getter);
 
-      registry.registerDynamicUse(
-          new DynamicUse(operatorSelector, null));
+      registry.registerDynamicUse(new DynamicUse(operatorSelector, null));
 
       SendStructure sendStructure = node.isPrefix
           ? new PrefixStructure(semantics, operator)
@@ -3544,8 +3405,7 @@
         registry.setSelector(node, setterSelector);
         registry.setOperatorSelectorInComplexSendSet(node, operatorSelector);
 
-        registry.registerDynamicUse(
-            new DynamicUse(operatorSelector, null));
+        registry.registerDynamicUse(new DynamicUse(operatorSelector, null));
 
         SendStructure sendStructure;
         if (operator.kind == AssignmentOperatorKind.IF_NULL) {
@@ -3626,9 +3486,7 @@
     registry.registerConstSymbol(name);
     if (!validateSymbol(node, name, reportError: false)) {
       reporter.reportErrorMessage(
-          node,
-          MessageKind.UNSUPPORTED_LITERAL_SYMBOL,
-          {'value': name});
+          node, MessageKind.UNSUPPORTED_LITERAL_SYMBOL, {'value': name});
     }
     analyzeConstantDeferred(node);
     ConstantExpression constant = new SymbolConstantExpression(name);
@@ -3658,8 +3516,7 @@
 
   ResolutionResult visitRethrow(Rethrow node) {
     if (!inCatchBlock && node.throwToken.stringValue == 'rethrow') {
-      reporter.reportErrorMessage(
-          node, MessageKind.RETHROW_OUTSIDE_CATCH);
+      reporter.reportErrorMessage(node, MessageKind.RETHROW_OUTSIDE_CATCH);
     }
     return const NoneResult();
   }
@@ -3672,12 +3529,9 @@
         // `return e;` appears in a generative constructor.  (Dart Language
         // Specification 13.12.)
         reporter.reportErrorMessage(
-            expression,
-            MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR);
+            expression, MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR);
       } else if (!node.isArrowBody && currentAsyncMarker.isYielding) {
-        reporter.reportErrorMessage(
-            node,
-            MessageKind.RETURN_IN_GENERATOR,
+        reporter.reportErrorMessage(node, MessageKind.RETURN_IN_GENERATOR,
             {'modifier': currentAsyncMarker});
       }
     }
@@ -3709,8 +3563,8 @@
     ConstructorElementX constructor = enclosingElement;
     bool isConstConstructor = constructor.isConst;
     bool isValidAsConstant = isConstConstructor;
-    ConstructorResult result = resolveRedirectingFactory(
-        node, inConstContext: isConstConstructor);
+    ConstructorResult result =
+        resolveRedirectingFactory(node, inConstContext: isConstConstructor);
     ConstructorElement redirectionTarget = result.element;
     constructor.immediateRedirectionTarget = redirectionTarget;
 
@@ -3734,18 +3588,16 @@
       case ConstructorResultKind.UNRESOLVED_CONSTRUCTOR:
       case ConstructorResultKind.NON_CONSTANT:
         isValidAsConstant = false;
-        constructor.setEffectiveTarget(
-            result.element, result.type, isMalformed: true);
+        constructor.setEffectiveTarget(result.element, result.type,
+            isMalformed: true);
         break;
     }
     if (Elements.isUnresolved(redirectionTarget)) {
       registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
       return const NoneResult();
     } else {
-      if (isConstConstructor &&
-          !redirectionTarget.isConst) {
-        reporter.reportErrorMessage(
-            node, MessageKind.CONSTRUCTOR_IS_NOT_CONST);
+      if (isConstConstructor && !redirectionTarget.isConst) {
+        reporter.reportErrorMessage(node, MessageKind.CONSTRUCTOR_IS_NOT_CONST);
         isValidAsConstant = false;
       }
       if (redirectionTarget == constructor) {
@@ -3761,16 +3613,14 @@
     // redirecting constructor.
     ClassElement targetClass = redirectionTarget.enclosingClass;
     InterfaceType type = registry.getType(node);
-    FunctionType targetConstructorType =
-        redirectionTarget.computeType(resolution)
-            .subst(type.typeArguments, targetClass.typeVariables);
+    FunctionType targetConstructorType = redirectionTarget
+        .computeType(resolution)
+        .subst(type.typeArguments, targetClass.typeVariables);
     FunctionType constructorType = constructor.computeType(resolution);
-    bool isSubtype = compiler.types.isSubtype(
-        targetConstructorType, constructorType);
+    bool isSubtype =
+        compiler.types.isSubtype(targetConstructorType, constructorType);
     if (!isSubtype) {
-      reporter.reportWarningMessage(
-          node,
-          MessageKind.NOT_ASSIGNABLE,
+      reporter.reportWarningMessage(node, MessageKind.NOT_ASSIGNABLE,
           {'fromType': targetConstructorType, 'toType': constructorType});
       // TODO(johnniwinther): Handle this (potentially) erroneous case.
       isValidAsConstant = false;
@@ -3790,9 +3640,9 @@
         new StaticUse.constructorRedirect(redirectionTarget));
     // TODO(johnniwinther): Register the effective target type as part of the
     // static use instead.
-    registry.registerTypeUse(new TypeUse.instantiation(
-        redirectionTarget.enclosingClass.thisType
-            .subst(type.typeArguments, targetClass.typeVariables)));
+    registry.registerTypeUse(new TypeUse.instantiation(redirectionTarget
+        .enclosingClass.thisType
+        .subst(type.typeArguments, targetClass.typeVariables)));
     if (enclosingElement == compiler.symbolConstructor) {
       registry.registerFeature(Feature.SYMBOL_CONSTRUCTOR);
     }
@@ -3815,10 +3665,7 @@
       constructor.constantConstructor =
           new RedirectingFactoryConstantConstructor(
               new ConstructedConstantExpression(
-                  type,
-                  redirectionTarget,
-                  callStructure,
-                  arguments));
+                  type, redirectionTarget, callStructure, arguments));
     }
     return const NoneResult();
   }
@@ -3853,16 +3700,15 @@
     void reportExtraModifier(String modifier) {
       Node modifierNode;
       for (Link<Node> nodes = modifiers.nodes.nodes;
-           !nodes.isEmpty;
-           nodes = nodes.tail) {
+          !nodes.isEmpty;
+          nodes = nodes.tail) {
         if (modifier == nodes.head.asIdentifier().source) {
           modifierNode = nodes.head;
           break;
         }
       }
       assert(modifierNode != null);
-      reporter.reportErrorMessage(
-          modifierNode, MessageKind.EXTRANEOUS_MODIFIER,
+      reporter.reportErrorMessage(modifierNode, MessageKind.EXTRANEOUS_MODIFIER,
           {'modifier': modifier});
     }
     if (modifiers.isFinal && (modifiers.isConst || modifiers.isVar)) {
@@ -3897,8 +3743,7 @@
     bool oldSendIsMemberAccess = sendIsMemberAccess;
     sendIsMemberAccess = false;
     var oldCategory = allowedCategory;
-    allowedCategory =
-        ElementCategory.VARIABLE |
+    allowedCategory = ElementCategory.VARIABLE |
         ElementCategory.FUNCTION |
         ElementCategory.IMPLIES_TYPE;
     ResolutionResult result = visit(node.expression);
@@ -3968,7 +3813,8 @@
         break;
       case ConstructorResultKind.UNRESOLVED_CONSTRUCTOR:
         // TODO(johnniwinther): Unify codepaths to only have one return.
-        registry.registerNewStructure(node,
+        registry.registerNewStructure(
+            node,
             new NewInvokeStructure(
                 new ConstructorAccessSemantics(
                     ConstructorAccessKind.UNRESOLVED_CONSTRUCTOR,
@@ -3977,7 +3823,8 @@
                 selector));
         return new ResolutionResult.forElement(constructor);
       case ConstructorResultKind.NON_CONSTANT:
-        registry.registerNewStructure(node,
+        registry.registerNewStructure(
+            node,
             new NewInvokeStructure(
                 new ConstructorAccessSemantics(
                     ConstructorAccessKind.NON_CONSTANT_CONSTRUCTOR,
@@ -3990,29 +3837,26 @@
     if (!isInvalid) {
       // [constructor] might be the implementation element
       // and only declaration elements may be registered.
-      registry.registerStaticUse(
-          new StaticUse.constructorInvoke(
-              constructor.declaration, callStructure));
+      registry.registerStaticUse(new StaticUse.constructorInvoke(
+          constructor.declaration, callStructure));
       // TODO(johniwinther): Avoid registration of `type` in face of redirecting
       // factory constructors.
       registry.registerTypeUse(new TypeUse.instantiation(type));
     }
 
+    ResolutionResult resolutionResult = const NoneResult();
     if (node.isConst) {
       bool isValidAsConstant = !isInvalid && constructor.isConst;
 
       if (constructor == compiler.symbolConstructor) {
         Node argumentNode = node.send.arguments.head;
-        ConstantExpression constant =
-            compiler.resolver.constantCompiler.compileNode(
-                argumentNode, registry.mapping);
+        ConstantExpression constant = compiler.resolver.constantCompiler
+            .compileNode(argumentNode, registry.mapping);
         ConstantValue name = compiler.constants.getConstantValue(constant);
         if (!name.isString) {
           DartType type = name.getType(coreTypes);
           reporter.reportErrorMessage(
-              argumentNode,
-              MessageKind.STRING_EXPECTED,
-              {'type': type});
+              argumentNode, MessageKind.STRING_EXPECTED, {'type': type});
         } else {
           StringConstantValue stringConstant = name;
           String nameString = stringConstant.toDartString().slowToString();
@@ -4028,8 +3872,7 @@
 
       if (type.containsTypeVariables) {
         reporter.reportErrorMessage(
-            node.send.selector,
-            MessageKind.TYPE_VARIABLE_IN_CONSTANT);
+            node.send.selector, MessageKind.TYPE_VARIABLE_IN_CONSTANT);
         isValidAsConstant = false;
         isInvalid = true;
       }
@@ -4038,6 +3881,11 @@
         isValidAsConstant = false;
       }
 
+      // Callback hook for when the compile-time constant evaluator has
+      // analyzed the constant.
+      // TODO(johnniwinther): Remove this when all constants are computed
+      // in resolution.
+      Function onAnalyzed;
       if (isValidAsConstant &&
           argumentsResult.isValidAsConstant &&
           // TODO(johnniwinther): Remove this when all constants are computed
@@ -4048,46 +3896,51 @@
 
         ConstructedConstantExpression constant =
             new ConstructedConstantExpression(
-                type,
-                constructor,
-                callStructure,
-                arguments);
+                type, constructor, callStructure, arguments);
         registry.registerNewStructure(node,
             new ConstInvokeStructure(ConstantInvokeKind.CONSTRUCTED, constant));
-        return new ConstantResult(node, constant);
+        resolutionResult = new ConstantResult(node, constant);
       } else if (isInvalid) {
         // Known to be non-constant.
         kind == ConstructorAccessKind.NON_CONSTANT_CONSTRUCTOR;
-        registry.registerNewStructure(node,
+        registry.registerNewStructure(
+            node,
             new NewInvokeStructure(
                 new ConstructorAccessSemantics(kind, constructor, type),
                 selector));
       } else {
         // Might be valid but we don't know for sure. The compile-time constant
         // evaluator will compute the actual constant as a deferred action.
-        registry.registerNewStructure(node,
-            new LateConstInvokeStructure(registry.mapping));
+        LateConstInvokeStructure structure =
+            new LateConstInvokeStructure(registry.mapping);
+        // TODO(johnniwinther): Avoid registering the
+        // [LateConstInvokeStructure]; it might not be necessary.
+        registry.registerNewStructure(node, structure);
+        onAnalyzed = () {
+          registry.registerNewStructure(node, structure.resolve(node));
+        };
       }
 
+      analyzeConstantDeferred(node, onAnalyzed: onAnalyzed);
     } else {
       // Not constant.
       if (constructor == compiler.symbolConstructor &&
           !compiler.mirrorUsageAnalyzerTask.hasMirrorUsage(enclosingElement)) {
-          reporter.reportHintMessage(
-              node.newToken, MessageKind.NON_CONST_BLOAT,
-              {'name': coreClasses.symbolClass.name});
+        reporter.reportHintMessage(node.newToken, MessageKind.NON_CONST_BLOAT,
+            {'name': coreClasses.symbolClass.name});
       }
-      registry.registerNewStructure(node,
+      registry.registerNewStructure(
+          node,
           new NewInvokeStructure(
               new ConstructorAccessSemantics(kind, constructor, type),
               selector));
     }
 
-    return const NoneResult();
+    return resolutionResult;
   }
 
-  void checkConstMapKeysDontOverrideEquals(Spannable spannable,
-                                           MapConstantValue map) {
+  void checkConstMapKeysDontOverrideEquals(
+      Spannable spannable, MapConstantValue map) {
     for (ConstantValue key in map.keys) {
       if (!key.isObject) continue;
       ObjectConstantValue objectConstant = key;
@@ -4096,18 +3949,15 @@
       if (cls == coreClasses.stringClass) continue;
       Element equals = cls.lookupMember('==');
       if (equals.enclosingClass != coreClasses.objectClass) {
-        reporter.reportErrorMessage(
-            spannable,
-            MessageKind.CONST_MAP_KEY_OVERRIDES_EQUALS,
-            {'type': keyType});
+        reporter.reportErrorMessage(spannable,
+            MessageKind.CONST_MAP_KEY_OVERRIDES_EQUALS, {'type': keyType});
       }
     }
   }
 
   void analyzeConstant(Node node, {enforceConst: true}) {
-    ConstantExpression constant =
-        compiler.resolver.constantCompiler.compileNode(
-            node, registry.mapping, enforceConst: enforceConst);
+    ConstantExpression constant = compiler.resolver.constantCompiler
+        .compileNode(node, registry.mapping, enforceConst: enforceConst);
 
     if (constant == null) {
       assert(invariant(node, compiler.compilationFailed));
@@ -4120,9 +3970,13 @@
     }
   }
 
-  void analyzeConstantDeferred(Node node, {bool enforceConst: true}) {
+  void analyzeConstantDeferred(Node node,
+      {bool enforceConst: true, void onAnalyzed()}) {
     addDeferredAction(enclosingElement, () {
       analyzeConstant(node, enforceConst: enforceConst);
+      if (onAnalyzed != null) {
+        onAnalyzed();
+      }
     });
   }
 
@@ -4151,21 +4005,20 @@
    * [:null:], if there is no corresponding constructor, class or library.
    */
   ConstructorResult resolveConstructor(NewExpression node) {
-    return node.accept(new ConstructorResolver(
-        compiler, this, inConstContext: node.isConst));
+    return node.accept(
+        new ConstructorResolver(compiler, this, inConstContext: node.isConst));
   }
 
   ConstructorResult resolveRedirectingFactory(RedirectingFactoryBody node,
-                                               {bool inConstContext: false}) {
-    return node.accept(new ConstructorResolver(
-        compiler, this, inConstContext: inConstContext));
+      {bool inConstContext: false}) {
+    return node.accept(new ConstructorResolver(compiler, this,
+        inConstContext: inConstContext));
   }
 
   DartType resolveTypeAnnotation(TypeAnnotation node,
-                                 {bool malformedIsError: false,
-                                  bool deferredIsMalformed: true}) {
-    DartType type = typeResolver.resolveTypeAnnotation(
-        this, node, malformedIsError: malformedIsError,
+      {bool malformedIsError: false, bool deferredIsMalformed: true}) {
+    DartType type = typeResolver.resolveTypeAnnotation(this, node,
+        malformedIsError: malformedIsError,
         deferredIsMalformed: deferredIsMalformed);
     if (inCheckContext) {
       registry.registerTypeUse(new TypeUse.checkedModeCheck(type));
@@ -4199,19 +4052,15 @@
     if (typeArgument != null) {
       if (node.isConst && typeArgument.containsTypeVariables) {
         reporter.reportErrorMessage(
-            arguments.nodes.head,
-            MessageKind.TYPE_VARIABLE_IN_CONSTANT);
+            arguments.nodes.head, MessageKind.TYPE_VARIABLE_IN_CONSTANT);
         isValidAsConstant = false;
       }
       listType = coreTypes.listType(typeArgument);
     } else {
       listType = coreTypes.listType();
     }
-    registry.registerLiteralList(
-        node,
-        listType,
-        isConstant: node.isConst,
-        isEmpty: node.elements.isEmpty);
+    registry.registerLiteralList(node, listType,
+        isConstant: node.isConst, isEmpty: node.elements.isEmpty);
     if (node.isConst) {
       List<ConstantExpression> constantExpressions = <ConstantExpression>[];
       inConstantContext(() {
@@ -4237,22 +4086,19 @@
       sendIsMemberAccess = false;
     }
     return const NoneResult();
-
   }
 
   ResolutionResult visitConditional(Conditional node) {
     ResolutionResult conditionResult =
         doInPromotionScope(node.condition, () => visit(node.condition));
-    ResolutionResult thenResult =
-        doInPromotionScope(node.thenExpression, () => visit(node.thenExpression));
+    ResolutionResult thenResult = doInPromotionScope(
+        node.thenExpression, () => visit(node.thenExpression));
     ResolutionResult elseResult = visit(node.elseExpression);
     if (conditionResult.isConstant &&
         thenResult.isConstant &&
         elseResult.isConstant) {
       ConstantExpression constant = new ConditionalConstantExpression(
-          conditionResult.constant,
-          thenResult.constant,
-          elseResult.constant);
+          conditionResult.constant, thenResult.constant, elseResult.constant);
       registry.setConstant(node, constant);
       return new ConstantResult(node, constant);
     }
@@ -4297,8 +4143,7 @@
     if (node.target == null) {
       target = statementScope.currentBreakTarget();
       if (target == null) {
-        reporter.reportErrorMessage(
-            node, MessageKind.NO_BREAK_TARGET);
+        reporter.reportErrorMessage(node, MessageKind.NO_BREAK_TARGET);
         return const NoneResult();
       }
       target.isBreakTarget = true;
@@ -4312,8 +4157,7 @@
       }
       target = label.target;
       if (!target.statement.isValidBreakTarget()) {
-        reporter.reportErrorMessage(
-            node.target, MessageKind.INVALID_BREAK);
+        reporter.reportErrorMessage(node.target, MessageKind.INVALID_BREAK);
         return const NoneResult();
       }
       label.setBreakTarget();
@@ -4328,8 +4172,7 @@
     if (node.target == null) {
       target = statementScope.currentContinueTarget();
       if (target == null) {
-        reporter.reportErrorMessage(
-            node, MessageKind.NO_CONTINUE_TARGET);
+        reporter.reportErrorMessage(node, MessageKind.NO_CONTINUE_TARGET);
         return const NoneResult();
       }
       target.isContinueTarget = true;
@@ -4343,8 +4186,7 @@
       }
       target = label.target;
       if (!target.statement.isValidContinueTarget()) {
-        reporter.reportErrorMessage(
-            node.target, MessageKind.INVALID_CONTINUE);
+        reporter.reportErrorMessage(node.target, MessageKind.INVALID_CONTINUE);
       }
       label.setContinueTarget();
       registry.useLabel(node, label);
@@ -4363,10 +4205,8 @@
           node.awaitToken, MessageKind.INVALID_AWAIT_FOR_IN);
     }
     registry.registerFeature(Feature.ASYNC_FOR_IN);
-    registry.registerDynamicUse(
-        new DynamicUse(Selectors.current, null));
-    registry.registerDynamicUse(
-        new DynamicUse(Selectors.moveNext, null));
+    registry.registerDynamicUse(new DynamicUse(Selectors.current, null));
+    registry.registerDynamicUse(new DynamicUse(Selectors.moveNext, null));
 
     visit(node.expression);
 
@@ -4378,12 +4218,9 @@
 
   ResolutionResult visitSyncForIn(SyncForIn node) {
     registry.registerFeature(Feature.SYNC_FOR_IN);
-    registry.registerDynamicUse(
-        new DynamicUse(Selectors.iterator, null));
-    registry.registerDynamicUse(
-        new DynamicUse(Selectors.current, null));
-    registry.registerDynamicUse(
-        new DynamicUse(Selectors.moveNext, null));
+    registry.registerDynamicUse(new DynamicUse(Selectors.iterator, null));
+    registry.registerDynamicUse(new DynamicUse(Selectors.current, null));
+    registry.registerDynamicUse(new DynamicUse(Selectors.moveNext, null));
 
     visit(node.expression);
 
@@ -4394,9 +4231,7 @@
   }
 
   void visitForInDeclaredIdentifierIn(
-      Node declaration,
-      ForIn node,
-      Scope blockScope) {
+      Node declaration, ForIn node, Scope blockScope) {
     LibraryElement library = enclosingElement.library;
 
     bool oldAllowFinalWithoutInitializer = inLoopVariable;
@@ -4413,15 +4248,13 @@
       loopVariable = registry.getDefinition(send);
       Identifier identifier = send.selector.asIdentifier();
       if (identifier == null) {
-        reporter.reportErrorMessage(
-            send.selector, MessageKind.INVALID_FOR_IN);
+        reporter.reportErrorMessage(send.selector, MessageKind.INVALID_FOR_IN);
       } else {
-        loopVariableSelector = new Selector.setter(
-            new Name(identifier.source, library));
+        loopVariableSelector =
+            new Selector.setter(new Name(identifier.source, library));
       }
       if (send.receiver != null) {
-        reporter.reportErrorMessage(
-            send.receiver, MessageKind.INVALID_FOR_IN);
+        reporter.reportErrorMessage(send.receiver, MessageKind.INVALID_FOR_IN);
       }
     } else if (variableDefinitions != null) {
       Link<Node> nodes = variableDefinitions.definitions.nodes;
@@ -4432,22 +4265,19 @@
       Node first = nodes.head;
       Identifier identifier = first.asIdentifier();
       if (identifier == null) {
-        reporter.reportErrorMessage(
-            first, MessageKind.INVALID_FOR_IN);
+        reporter.reportErrorMessage(first, MessageKind.INVALID_FOR_IN);
       } else {
-        loopVariableSelector = new Selector.setter(
-            new Name(identifier.source, library));
+        loopVariableSelector =
+            new Selector.setter(new Name(identifier.source, library));
         loopVariable = registry.getDefinition(identifier);
       }
     } else {
-      reporter.reportErrorMessage(
-          declaration, MessageKind.INVALID_FOR_IN);
+      reporter.reportErrorMessage(declaration, MessageKind.INVALID_FOR_IN);
     }
     if (loopVariableSelector != null) {
       registry.setSelector(declaration, loopVariableSelector);
       if (loopVariable == null || loopVariable.isInstanceMember) {
-        registry.registerDynamicUse(
-            new DynamicUse(loopVariableSelector, null));
+        registry.registerDynamicUse(new DynamicUse(loopVariableSelector, null));
       } else if (loopVariable.isStatic || loopVariable.isTopLevel) {
         registry.registerStaticUse(
             new StaticUse.staticSet(loopVariable.declaration));
@@ -4484,9 +4314,7 @@
         registry.defineLabel(element.label, element);
       } else {
         reporter.reportWarningMessage(
-            element.label,
-            MessageKind.UNUSED_LABEL,
-            {'labelName': labelName});
+            element.label, MessageKind.UNUSED_LABEL, {'labelName': labelName});
       }
     });
     if (!targetElement.isTarget) {
@@ -4533,15 +4361,11 @@
     }
     if (node.isConst && mapType.containsTypeVariables) {
       reporter.reportErrorMessage(
-          arguments,
-          MessageKind.TYPE_VARIABLE_IN_CONSTANT);
+          arguments, MessageKind.TYPE_VARIABLE_IN_CONSTANT);
       isValidAsConstant = false;
     }
-    registry.registerMapLiteral(
-        node,
-        mapType,
-        isConstant: node.isConst,
-        isEmpty: node.entries.isEmpty);
+    registry.registerMapLiteral(node, mapType,
+        isConstant: node.isConst, isEmpty: node.entries.isEmpty);
 
     if (node.isConst) {
       List<ConstantExpression> keyExpressions = <ConstantExpression>[];
@@ -4609,8 +4433,8 @@
     List<DiagnosticMessage> infos = <DiagnosticMessage>[];
 
     for (Link<Node> cases = node.cases.nodes;
-         !cases.isEmpty;
-         cases = cases.tail) {
+        !cases.isEmpty;
+        cases = cases.tail) {
       SwitchCase switchCase = cases.head;
 
       for (Node labelOrCase in switchCase.labelsAndCases) {
@@ -4624,7 +4448,7 @@
             message: 'No constant computed for $node'));
 
         ConstantValue value = compiler.constants.getConstantValue(constant);
-        DartType caseType = value.getType(coreTypes);//typeOfConstant(value);
+        DartType caseType = value.getType(coreTypes); //typeOfConstant(value);
 
         if (firstCaseType == null) {
           firstCase = caseMatch;
@@ -4639,8 +4463,7 @@
                 {'type': "double"});
           } else if (caseType == coreTypes.functionType) {
             reporter.reportErrorMessage(
-                node, MessageKind.SWITCH_CASE_FORBIDDEN,
-                {'type': "Function"});
+                node, MessageKind.SWITCH_CASE_FORBIDDEN, {'type': "Function"});
           } else if (value.isObject && overridesEquals(caseType)) {
             reporter.reportErrorMessage(
                 firstCase.expression,
@@ -4694,29 +4517,21 @@
           // It's an error if the same label occurs twice in the same switch.
           reporter.reportError(
               reporter.createMessage(
-                  label,
-                  MessageKind.DUPLICATE_LABEL,
-                  {'labelName': labelName}),
+                  label, MessageKind.DUPLICATE_LABEL, {'labelName': labelName}),
               <DiagnosticMessage>[
-                  reporter.createMessage(
-                    existingElement.label,
-                    MessageKind.EXISTING_LABEL,
-                    {'labelName': labelName}),
+                reporter.createMessage(existingElement.label,
+                    MessageKind.EXISTING_LABEL, {'labelName': labelName}),
               ]);
         } else {
           // It's only a warning if it shadows another label.
           existingElement = statementScope.lookupLabel(labelName);
           if (existingElement != null) {
             reporter.reportWarning(
-                reporter.createMessage(
-                    label,
-                    MessageKind.DUPLICATE_LABEL,
+                reporter.createMessage(label, MessageKind.DUPLICATE_LABEL,
                     {'labelName': labelName}),
                 <DiagnosticMessage>[
-                    reporter.createMessage(
-                        existingElement.label,
-                        MessageKind.EXISTING_LABEL,
-                        {'labelName': labelName}),
+                  reporter.createMessage(existingElement.label,
+                      MessageKind.EXISTING_LABEL, {'labelName': labelName}),
                 ]);
           }
         }
@@ -4792,8 +4607,7 @@
     if (node.formals != null) {
       Link<Node> formalsToProcess = node.formals.nodes;
       if (formalsToProcess.isEmpty) {
-        reporter.reportErrorMessage(
-            node, MessageKind.EMPTY_CATCH_DECLARATION);
+        reporter.reportErrorMessage(node, MessageKind.EMPTY_CATCH_DECLARATION);
       } else {
         exceptionDefinition = formalsToProcess.head.asVariableDefinitions();
         formalsToProcess = formalsToProcess.tail;
@@ -4813,8 +4627,8 @@
       // Check that the formals aren't optional and that they have no
       // modifiers or type.
       for (Link<Node> link = node.formals.nodes;
-           !link.isEmpty;
-           link = link.tail) {
+          !link.isEmpty;
+          link = link.tail) {
         // If the formal parameter is a node list, it means that it is a
         // sequence of optional parameters.
         NodeList nodeList = link.head.asNodeList();
@@ -4866,7 +4680,7 @@
 }
 
 /// Looks up [name] in [scope] and unwraps the result.
-Element lookupInScope(DiagnosticReporter reporter, Node node,
-                      Scope scope, String name) {
+Element lookupInScope(
+    DiagnosticReporter reporter, Node node, Scope scope, String name) {
   return Elements.unwrap(scope.lookup(name), reporter, node);
 }
diff --git a/pkg/compiler/lib/src/resolution/operators.dart b/pkg/compiler/lib/src/resolution/operators.dart
index 6486262..06fd468 100644
--- a/pkg/compiler/lib/src/resolution/operators.dart
+++ b/pkg/compiler/lib/src/resolution/operators.dart
@@ -5,17 +5,10 @@
 library dart2js.operators;
 
 import '../elements/elements.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector,
-    SelectorKind;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector, SelectorKind;
 
-enum UnaryOperatorKind {
-  NOT,
-  NEGATE,
-  COMPLEMENT,
-}
+enum UnaryOperatorKind { NOT, NEGATE, COMPLEMENT, }
 
 class UnaryOperator {
   final UnaryOperatorKind kind;
@@ -26,10 +19,8 @@
 
   bool get isUserDefinable => selectorName != null;
 
-  Selector get selector => new Selector(
-      SelectorKind.OPERATOR,
-      new PublicName(selectorName),
-      CallStructure.NO_ARGS);
+  Selector get selector => new Selector(SelectorKind.OPERATOR,
+      new PublicName(selectorName), CallStructure.NO_ARGS);
 
   String toString() => name;
 
@@ -47,18 +38,25 @@
 
   static UnaryOperator parse(String value) {
     switch (value) {
-      case '!': return NOT;
-      case '-': return NEGATE;
-      case '~': return COMPLEMENT;
-      default: return null;
+      case '!':
+        return NOT;
+      case '-':
+        return NEGATE;
+      case '~':
+        return COMPLEMENT;
+      default:
+        return null;
     }
   }
 
   static UnaryOperator fromKind(UnaryOperatorKind kind) {
     switch (kind) {
-      case UnaryOperatorKind.NOT: return NOT;
-      case UnaryOperatorKind.NEGATE: return NEGATE;
-      case UnaryOperatorKind.COMPLEMENT: return COMPLEMENT;
+      case UnaryOperatorKind.NOT:
+        return NOT;
+      case UnaryOperatorKind.NEGATE:
+        return NEGATE;
+      case UnaryOperatorKind.COMPLEMENT:
+        return COMPLEMENT;
     }
   }
 }
@@ -186,54 +184,97 @@
 
   static BinaryOperator parse(String value) {
     switch (value) {
-      case '==': return EQ;
-      case '!=': return NOT_EQ;
-      case '[]': return INDEX;
-      case '*': return MUL;
-      case '/': return DIV;
-      case '%': return MOD;
-      case '~/': return IDIV;
-      case '+': return ADD;
-      case '-': return SUB;
-      case '<<': return SHL;
-      case '>>': return SHR;
-      case '>=': return GTEQ;
-      case '>': return GT;
-      case '<=': return LTEQ;
-      case '<': return LT;
-      case '&': return AND;
-      case '^': return XOR;
-      case '|': return OR;
-      case '&&': return LOGICAL_AND;
-      case '||': return LOGICAL_OR;
-      case '??': return IF_NULL;
-      default: return null;
+      case '==':
+        return EQ;
+      case '!=':
+        return NOT_EQ;
+      case '[]':
+        return INDEX;
+      case '*':
+        return MUL;
+      case '/':
+        return DIV;
+      case '%':
+        return MOD;
+      case '~/':
+        return IDIV;
+      case '+':
+        return ADD;
+      case '-':
+        return SUB;
+      case '<<':
+        return SHL;
+      case '>>':
+        return SHR;
+      case '>=':
+        return GTEQ;
+      case '>':
+        return GT;
+      case '<=':
+        return LTEQ;
+      case '<':
+        return LT;
+      case '&':
+        return AND;
+      case '^':
+        return XOR;
+      case '|':
+        return OR;
+      case '&&':
+        return LOGICAL_AND;
+      case '||':
+        return LOGICAL_OR;
+      case '??':
+        return IF_NULL;
+      default:
+        return null;
     }
   }
 
   static BinaryOperator fromKind(BinaryOperatorKind kind) {
     switch (kind) {
-      case BinaryOperatorKind.EQ: return EQ;
-      case BinaryOperatorKind.NOT_EQ: return NOT_EQ;
-      case BinaryOperatorKind.INDEX: return INDEX;
-      case BinaryOperatorKind.MUL: return MUL;
-      case BinaryOperatorKind.DIV: return DIV;
-      case BinaryOperatorKind.MOD: return MOD;
-      case BinaryOperatorKind.IDIV: return IDIV;
-      case BinaryOperatorKind.ADD: return ADD;
-      case BinaryOperatorKind.SUB: return SUB;
-      case BinaryOperatorKind.SHL: return SHL;
-      case BinaryOperatorKind.SHR: return SHR;
-      case BinaryOperatorKind.GTEQ: return GTEQ;
-      case BinaryOperatorKind.GT: return GT;
-      case BinaryOperatorKind.LTEQ: return LTEQ;
-      case BinaryOperatorKind.LT: return LT;
-      case BinaryOperatorKind.AND: return AND;
-      case BinaryOperatorKind.XOR: return XOR;
-      case BinaryOperatorKind.OR: return OR;
-      case BinaryOperatorKind.LOGICAL_AND: return LOGICAL_AND;
-      case BinaryOperatorKind.LOGICAL_OR: return LOGICAL_OR;
-      case BinaryOperatorKind.IF_NULL: return IF_NULL;
+      case BinaryOperatorKind.EQ:
+        return EQ;
+      case BinaryOperatorKind.NOT_EQ:
+        return NOT_EQ;
+      case BinaryOperatorKind.INDEX:
+        return INDEX;
+      case BinaryOperatorKind.MUL:
+        return MUL;
+      case BinaryOperatorKind.DIV:
+        return DIV;
+      case BinaryOperatorKind.MOD:
+        return MOD;
+      case BinaryOperatorKind.IDIV:
+        return IDIV;
+      case BinaryOperatorKind.ADD:
+        return ADD;
+      case BinaryOperatorKind.SUB:
+        return SUB;
+      case BinaryOperatorKind.SHL:
+        return SHL;
+      case BinaryOperatorKind.SHR:
+        return SHR;
+      case BinaryOperatorKind.GTEQ:
+        return GTEQ;
+      case BinaryOperatorKind.GT:
+        return GT;
+      case BinaryOperatorKind.LTEQ:
+        return LTEQ;
+      case BinaryOperatorKind.LT:
+        return LT;
+      case BinaryOperatorKind.AND:
+        return AND;
+      case BinaryOperatorKind.XOR:
+        return XOR;
+      case BinaryOperatorKind.OR:
+        return OR;
+      case BinaryOperatorKind.LOGICAL_AND:
+        return LOGICAL_AND;
+      case BinaryOperatorKind.LOGICAL_OR:
+        return LOGICAL_OR;
+      case BinaryOperatorKind.IF_NULL:
+        return IF_NULL;
     }
   }
 }
@@ -292,104 +333,121 @@
   final bool isUserDefinable;
 
   const AssignmentOperator._(this.kind, this.name, this.binaryOperator,
-                             {this.isUserDefinable: true});
+      {this.isUserDefinable: true});
 
   String get selectorName {
-    return binaryOperator != null ? binaryOperator.selectorName: null;
+    return binaryOperator != null ? binaryOperator.selectorName : null;
   }
 
   String toString() => name;
 
   /// The = operator.
-  static const AssignmentOperator ASSIGN =
-      const AssignmentOperator._(AssignmentOperatorKind.ASSIGN, '=',
-                                 null, isUserDefinable: false);
+  static const AssignmentOperator ASSIGN = const AssignmentOperator._(
+      AssignmentOperatorKind.ASSIGN, '=', null,
+      isUserDefinable: false);
 
   /// The ??= operator.
-  static const AssignmentOperator IF_NULL =
-      const AssignmentOperator._(AssignmentOperatorKind.IF_NULL, '??=',
-                                 BinaryOperator.IF_NULL,
-                                 isUserDefinable: false);
+  static const AssignmentOperator IF_NULL = const AssignmentOperator._(
+      AssignmentOperatorKind.IF_NULL, '??=', BinaryOperator.IF_NULL,
+      isUserDefinable: false);
 
   /// The += assignment operator.
-  static const AssignmentOperator ADD =
-      const AssignmentOperator._(AssignmentOperatorKind.ADD, '+=',
-                                 BinaryOperator.ADD);
+  static const AssignmentOperator ADD = const AssignmentOperator._(
+      AssignmentOperatorKind.ADD, '+=', BinaryOperator.ADD);
 
   /// The -= assignment operator.
-  static const AssignmentOperator SUB =
-      const AssignmentOperator._(AssignmentOperatorKind.SUB, '-=',
-                                 BinaryOperator.SUB);
+  static const AssignmentOperator SUB = const AssignmentOperator._(
+      AssignmentOperatorKind.SUB, '-=', BinaryOperator.SUB);
 
   /// The *= assignment operator.
-  static const AssignmentOperator MUL =
-      const AssignmentOperator._(AssignmentOperatorKind.MUL, '*=',
-                                 BinaryOperator.MUL);
+  static const AssignmentOperator MUL = const AssignmentOperator._(
+      AssignmentOperatorKind.MUL, '*=', BinaryOperator.MUL);
 
   /// The /= assignment operator.
-  static const AssignmentOperator DIV =
-      const AssignmentOperator._(AssignmentOperatorKind.DIV, '/=',
-                                 BinaryOperator.DIV);
+  static const AssignmentOperator DIV = const AssignmentOperator._(
+      AssignmentOperatorKind.DIV, '/=', BinaryOperator.DIV);
 
   /// The ~/= assignment operator.
-  static const AssignmentOperator IDIV =
-      const AssignmentOperator._(AssignmentOperatorKind.IDIV, '~/=',
-                                 BinaryOperator.IDIV);
+  static const AssignmentOperator IDIV = const AssignmentOperator._(
+      AssignmentOperatorKind.IDIV, '~/=', BinaryOperator.IDIV);
 
   /// The %= assignment operator.
-  static const AssignmentOperator MOD =
-      const AssignmentOperator._(AssignmentOperatorKind.MOD, '%=',
-                                 BinaryOperator.MOD);
+  static const AssignmentOperator MOD = const AssignmentOperator._(
+      AssignmentOperatorKind.MOD, '%=', BinaryOperator.MOD);
 
   /// The <<= assignment operator.
-  static const AssignmentOperator SHL =
-      const AssignmentOperator._(AssignmentOperatorKind.SHL, '<<=',
-                                 BinaryOperator.SHL);
+  static const AssignmentOperator SHL = const AssignmentOperator._(
+      AssignmentOperatorKind.SHL, '<<=', BinaryOperator.SHL);
 
   /// The >>= assignment operator.
-  static const AssignmentOperator SHR =
-      const AssignmentOperator._(AssignmentOperatorKind.SHR, '>>=',
-                                 BinaryOperator.SHR);
+  static const AssignmentOperator SHR = const AssignmentOperator._(
+      AssignmentOperatorKind.SHR, '>>=', BinaryOperator.SHR);
 
   /// The &= assignment operator.
-  static const AssignmentOperator AND =
-      const AssignmentOperator._(AssignmentOperatorKind.AND, '&=',
-                                 BinaryOperator.AND);
+  static const AssignmentOperator AND = const AssignmentOperator._(
+      AssignmentOperatorKind.AND, '&=', BinaryOperator.AND);
 
   /// The |= assignment operator.
-  static const AssignmentOperator OR =
-      const AssignmentOperator._(AssignmentOperatorKind.OR, '|=',
-                                 BinaryOperator.OR);
+  static const AssignmentOperator OR = const AssignmentOperator._(
+      AssignmentOperatorKind.OR, '|=', BinaryOperator.OR);
 
   /// The ^= assignment operator.
-  static const AssignmentOperator XOR =
-      const AssignmentOperator._(AssignmentOperatorKind.XOR, '^=',
-                                 BinaryOperator.XOR);
+  static const AssignmentOperator XOR = const AssignmentOperator._(
+      AssignmentOperatorKind.XOR, '^=', BinaryOperator.XOR);
 
   static AssignmentOperator parse(String value) {
     switch (value) {
-      case '=': return ASSIGN;
-      case '??=': return IF_NULL;
-      case '*=': return MUL;
-      case '/=': return DIV;
-      case '%=': return MOD;
-      case '~/=': return IDIV;
-      case '+=': return ADD;
-      case '-=': return SUB;
-      case '<<=': return SHL;
-      case '>>=': return SHR;
-      case '&=': return AND;
-      case '^=': return XOR;
-      case '|=': return OR;
-      default: return null;
+      case '=':
+        return ASSIGN;
+      case '??=':
+        return IF_NULL;
+      case '*=':
+        return MUL;
+      case '/=':
+        return DIV;
+      case '%=':
+        return MOD;
+      case '~/=':
+        return IDIV;
+      case '+=':
+        return ADD;
+      case '-=':
+        return SUB;
+      case '<<=':
+        return SHL;
+      case '>>=':
+        return SHR;
+      case '&=':
+        return AND;
+      case '^=':
+        return XOR;
+      case '|=':
+        return OR;
+      default:
+        return null;
+    }
+  }
+
+  static AssignmentOperator fromKind(AssignmentOperatorKind kind) {
+    switch (kind) {
+      case AssignmentOperatorKind.ASSIGN: return ASSIGN;
+      case AssignmentOperatorKind.IF_NULL: return IF_NULL;
+      case AssignmentOperatorKind.ADD: return ADD;
+      case AssignmentOperatorKind.SUB: return SUB;
+      case AssignmentOperatorKind.MUL: return MUL;
+      case AssignmentOperatorKind.DIV: return DIV;
+      case AssignmentOperatorKind.IDIV: return IDIV;
+      case AssignmentOperatorKind.MOD: return MOD;
+      case AssignmentOperatorKind.SHL: return SHL;
+      case AssignmentOperatorKind.SHR: return SHR;
+      case AssignmentOperatorKind.AND: return AND;
+      case AssignmentOperatorKind.OR: return OR;
+      case AssignmentOperatorKind.XOR: return XOR;
     }
   }
 }
 
-
-enum IncDecOperatorKind {
-  INC, DEC
-}
+enum IncDecOperatorKind { INC, DEC }
 
 class IncDecOperator {
   final IncDecOperatorKind kind;
@@ -412,9 +470,19 @@
 
   static IncDecOperator parse(String value) {
     switch (value) {
-      case '++': return INC;
-      case '--': return DEC;
-      default: return null;
+      case '++':
+        return INC;
+      case '--':
+        return DEC;
+      default:
+        return null;
+    }
+  }
+
+  static IncDecOperator fromKind(IncDecOperatorKind kind) {
+    switch (kind) {
+      case IncDecOperatorKind.INC: return INC;
+      case IncDecOperatorKind.DEC: return DEC;
     }
   }
 }
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index b3c7686..ed6db6c 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -5,48 +5,29 @@
 library dart2js.resolution.registry;
 
 import '../common.dart';
-import '../common/backend_api.dart' show
-    Backend,
-    ForeignResolver;
-import '../common/resolution.dart' show
-    Feature,
-    ListLiteralUse,
-    MapLiteralUse,
-    ResolutionImpact;
-import '../common/registry.dart' show
-    Registry;
-import '../compiler.dart' show
-    Compiler;
+import '../common/backend_api.dart' show Backend, ForeignResolver;
+import '../common/resolution.dart'
+    show Feature, ListLiteralUse, MapLiteralUse, ResolutionImpact;
+import '../common/registry.dart' show Registry;
+import '../compiler.dart' show Compiler;
 import '../constants/expressions.dart';
 import '../dart_types.dart';
 import '../diagnostics/source_span.dart';
-import '../enqueue.dart' show
-    ResolutionEnqueuer;
+import '../enqueue.dart' show ResolutionEnqueuer;
 import '../elements/elements.dart';
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Setlet;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/use.dart' show
-    DynamicUse,
-    StaticUse,
-    TypeUse;
-import '../universe/world_impact.dart' show
-    WorldImpactBuilder;
-import '../util/enumset.dart' show
-    EnumSet;
-import '../world.dart' show
-    World;
+import '../util/util.dart' show Setlet;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
+import '../universe/world_impact.dart' show WorldImpactBuilder;
+import '../util/enumset.dart' show EnumSet;
+import '../world.dart' show World;
 
 import 'send_structure.dart';
 
-import 'members.dart' show
-    ResolverVisitor;
-import 'tree_elements.dart' show
-    TreeElementMapping;
+import 'members.dart' show ResolverVisitor;
+import 'tree_elements.dart' show TreeElementMapping;
 
 class _ResolutionWorldImpact extends ResolutionImpact with WorldImpactBuilder {
   final String name;
@@ -68,8 +49,7 @@
 
   @override
   Iterable<MapLiteralUse> get mapLiterals {
-    return _mapLiterals != null
-        ? _mapLiterals : const <MapLiteralUse>[];
+    return _mapLiterals != null ? _mapLiterals : const <MapLiteralUse>[];
   }
 
   void registerListLiteral(ListLiteralUse listLiteralUse) {
@@ -82,8 +62,7 @@
 
   @override
   Iterable<ListLiteralUse> get listLiterals {
-    return _listLiterals != null
-        ? _listLiterals : const <ListLiteralUse>[];
+    return _listLiterals != null ? _listLiterals : const <ListLiteralUse>[];
   }
 
   void registerConstSymbolName(String name) {
@@ -95,8 +74,7 @@
 
   @override
   Iterable<String> get constSymbolNames {
-    return _constSymbolNames != null
-        ? _constSymbolNames : const <String>[];
+    return _constSymbolNames != null ? _constSymbolNames : const <String>[];
   }
 
   void registerFeature(Feature feature) {
@@ -109,7 +87,8 @@
   @override
   Iterable<Feature> get features {
     return _features != null
-        ? _features.iterable(Feature.values) : const <Feature>[];
+        ? _features.iterable(Feature.values)
+        : const <Feature>[];
   }
 
   void registerConstantLiteral(ConstantExpression constant) {
@@ -121,7 +100,8 @@
 
   Iterable<ConstantExpression> get constantLiterals {
     return _constantLiterals != null
-        ? _constantLiterals : const <ConstantExpression>[];
+        ? _constantLiterals
+        : const <ConstantExpression>[];
   }
 
   String toString() => '_ResolutionWorldImpact($name)';
@@ -139,8 +119,8 @@
   ResolutionRegistry(Compiler compiler, TreeElementMapping mapping)
       : this.compiler = compiler,
         this.mapping = mapping,
-        this.worldImpact = new _ResolutionWorldImpact(
-            mapping.analyzedElement.toString());
+        this.worldImpact =
+            new _ResolutionWorldImpact(mapping.analyzedElement.toString());
 
   bool get isForResolution => true;
 
@@ -187,8 +167,8 @@
   }
 
   /// Sets the target constructor [node] to be [element].
-  void setRedirectingTargetConstructor(RedirectingFactoryBody node,
-                                       ConstructorElement element) {
+  void setRedirectingTargetConstructor(
+      RedirectingFactoryBody node, ConstructorElement element) {
     useElement(node, element);
   }
 
@@ -283,8 +263,8 @@
   //  Potential access registration.
   //////////////////////////////////////////////////////////////////////////////
 
-  void setAccessedByClosureIn(Node contextNode, VariableElement element,
-                              Node accessNode) {
+  void setAccessedByClosureIn(
+      Node contextNode, VariableElement element, Node accessNode) {
     mapping.setAccessedByClosureIn(contextNode, element, accessNode);
   }
 
@@ -292,13 +272,13 @@
     mapping.registerPotentialMutation(element, mutationNode);
   }
 
-  void registerPotentialMutationInClosure(VariableElement element,
-                                           Node mutationNode) {
+  void registerPotentialMutationInClosure(
+      VariableElement element, Node mutationNode) {
     mapping.registerPotentialMutationInClosure(element, mutationNode);
   }
 
-  void registerPotentialMutationIn(Node contextNode, VariableElement element,
-                                    Node mutationNode) {
+  void registerPotentialMutationIn(
+      Node contextNode, VariableElement element, Node mutationNode) {
     mapping.registerPotentialMutationIn(contextNode, element, mutationNode);
   }
 
@@ -328,30 +308,23 @@
     worldImpact.registerTypeUse(new TypeUse.typeLiteral(type));
   }
 
-  void registerLiteralList(Node node,
-                           InterfaceType type,
-                           {bool isConstant,
-                            bool isEmpty}) {
+  void registerLiteralList(Node node, InterfaceType type,
+      {bool isConstant, bool isEmpty}) {
     setType(node, type);
     worldImpact.registerListLiteral(
         new ListLiteralUse(type, isConstant: isConstant, isEmpty: isEmpty));
   }
 
-  void registerMapLiteral(Node node,
-                          InterfaceType type,
-                          {bool isConstant,
-                           bool isEmpty}) {
+  void registerMapLiteral(Node node, InterfaceType type,
+      {bool isConstant, bool isEmpty}) {
     setType(node, type);
     worldImpact.registerMapLiteral(
         new MapLiteralUse(type, isConstant: isConstant, isEmpty: isEmpty));
   }
 
-  void registerForeignCall(Node node,
-                           Element element,
-                           CallStructure callStructure,
-                           ResolverVisitor visitor) {
-    backend.registerForeignCall(
-        node, element, callStructure,
+  void registerForeignCall(Node node, Element element,
+      CallStructure callStructure, ResolverVisitor visitor) {
+    backend.registerForeignCall(node, element, callStructure,
         new ForeignResolutionResolver(visitor, this));
   }
 
@@ -375,8 +348,8 @@
     return backend.defaultSuperclass(element);
   }
 
-  void registerMixinUse(MixinApplicationElement mixinApplication,
-                        ClassElement mixin) {
+  void registerMixinUse(
+      MixinApplicationElement mixinApplication, ClassElement mixin) {
     universe.registerMixinUse(mixinApplication, mixin);
   }
 
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index ca1d268..7caced4 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -7,62 +7,47 @@
 import 'dart:collection' show Queue;
 
 import '../common.dart';
-import '../common/names.dart' show
-    Identifiers;
-import '../common/resolution.dart' show
-    Feature,
-    Parsing,
-    Resolution,
-    ResolutionImpact;
-import '../common/tasks.dart' show
-    CompilerTask,
-    DeferredAction;
-import '../compiler.dart' show
-    Compiler;
-import '../compile_time_constants.dart' show
-    ConstantCompiler;
-import '../constants/expressions.dart' show
-    ConstantExpression,
-    ConstantExpressionKind,
-    ConstructedConstantExpression,
-    ErroneousConstantExpression;
-import '../constants/values.dart' show
-    ConstantValue;
-import '../core_types.dart' show
-    CoreClasses,
-    CoreTypes;
+import '../common/names.dart' show Identifiers;
+import '../common/resolution.dart'
+    show Feature, Parsing, Resolution, ResolutionImpact;
+import '../common/tasks.dart' show CompilerTask, DeferredAction;
+import '../compiler.dart' show Compiler;
+import '../compile_time_constants.dart' show ConstantCompiler;
+import '../constants/expressions.dart'
+    show
+        ConstantExpression,
+        ConstantExpressionKind,
+        ConstructedConstantExpression,
+        ErroneousConstantExpression;
+import '../constants/values.dart' show ConstantValue;
+import '../core_types.dart' show CoreClasses, CoreTypes;
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    BaseClassElementX,
-    BaseFunctionElementX,
-    ConstructorElementX,
-    FieldElementX,
-    FunctionElementX,
-    GetterElementX,
-    MetadataAnnotationX,
-    MixinApplicationElementX,
-    ParameterMetadataAnnotation,
-    SetterElementX,
-    TypedefElementX;
-import '../tokens/token.dart' show
-    isBinaryOperator,
-    isMinusOperator,
-    isTernaryOperator,
-    isUnaryOperator,
-    isUserDefinableOperator;
+import '../elements/modelx.dart'
+    show
+        BaseClassElementX,
+        BaseFunctionElementX,
+        ConstructorElementX,
+        FieldElementX,
+        FunctionElementX,
+        GetterElementX,
+        MetadataAnnotationX,
+        MixinApplicationElementX,
+        ParameterMetadataAnnotation,
+        SetterElementX,
+        TypedefElementX;
+import '../tokens/token.dart'
+    show
+        isBinaryOperator,
+        isMinusOperator,
+        isTernaryOperator,
+        isUnaryOperator,
+        isUserDefinableOperator;
 import '../tree/tree.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/use.dart' show
-    StaticUse,
-    TypeUse;
-import '../universe/world_impact.dart' show
-    WorldImpact;
-import '../util/util.dart' show
-    Link,
-    LinkBuilder,
-    Setlet;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/use.dart' show StaticUse, TypeUse;
+import '../universe/world_impact.dart' show WorldImpact;
+import '../util/util.dart' show Link, LinkBuilder, Setlet;
 
 import 'class_hierarchy.dart';
 import 'class_members.dart' show MembersCreator;
@@ -128,13 +113,11 @@
     });
   }
 
-  void resolveRedirectingConstructor(InitializerResolver resolver,
-                                     Node node,
-                                     FunctionElement constructor,
-                                     FunctionElement redirection) {
+  void resolveRedirectingConstructor(InitializerResolver resolver, Node node,
+      FunctionElement constructor, FunctionElement redirection) {
     assert(invariant(node, constructor.isImplementation,
         message: 'Redirecting constructors must be resolved on implementation '
-                 'elements.'));
+            'elements.'));
     Setlet<FunctionElement> seen = new Setlet<FunctionElement>();
     seen.add(constructor);
     while (redirection != null) {
@@ -154,18 +137,17 @@
   }
 
   static void processAsyncMarker(Compiler compiler,
-                                 BaseFunctionElementX element,
-                                 ResolutionRegistry registry) {
+      BaseFunctionElementX element, ResolutionRegistry registry) {
     DiagnosticReporter reporter = compiler.reporter;
     Resolution resolution = compiler.resolution;
     CoreClasses coreClasses = compiler.coreClasses;
     FunctionExpression functionExpression = element.node;
     AsyncModifier asyncModifier = functionExpression.asyncModifier;
     if (asyncModifier != null) {
-
       if (asyncModifier.isAsynchronous) {
         element.asyncMarker = asyncModifier.isYielding
-            ? AsyncMarker.ASYNC_STAR : AsyncMarker.ASYNC;
+            ? AsyncMarker.ASYNC_STAR
+            : AsyncMarker.ASYNC;
       } else {
         element.asyncMarker = AsyncMarker.SYNC_STAR;
       }
@@ -185,7 +167,6 @@
               asyncModifier,
               MessageKind.ASYNC_MODIFIER_ON_SETTER,
               {'modifier': element.asyncMarker});
-
         }
         if (functionExpression.body.asReturn() != null &&
             element.asyncMarker.isYielding) {
@@ -196,18 +177,18 @@
         }
       }
       switch (element.asyncMarker) {
-      case AsyncMarker.ASYNC:
-        registry.registerFeature(Feature.ASYNC);
-        coreClasses.futureClass.ensureResolved(resolution);
-        break;
-      case AsyncMarker.ASYNC_STAR:
-        registry.registerFeature(Feature.ASYNC_STAR);
-        coreClasses.streamClass.ensureResolved(resolution);
-        break;
-      case AsyncMarker.SYNC_STAR:
-        registry.registerFeature(Feature.SYNC_STAR);
-        coreClasses.iterableClass.ensureResolved(resolution);
-        break;
+        case AsyncMarker.ASYNC:
+          registry.registerFeature(Feature.ASYNC);
+          coreClasses.futureClass.ensureResolved(resolution);
+          break;
+        case AsyncMarker.ASYNC_STAR:
+          registry.registerFeature(Feature.ASYNC_STAR);
+          coreClasses.streamClass.ensureResolved(resolution);
+          break;
+        case AsyncMarker.SYNC_STAR:
+          registry.registerFeature(Feature.SYNC_STAR);
+          coreClasses.iterableClass.ensureResolved(resolution);
+          break;
       }
     }
   }
@@ -224,10 +205,8 @@
   WorldImpact resolveMethodElementImplementation(
       FunctionElement element, FunctionExpression tree) {
     return reporter.withCurrentElement(element, () {
-      if (element.isExternal && tree.hasBody()) {
-        reporter.reportErrorMessage(
-            element,
-            MessageKind.EXTERNAL_WITH_BODY,
+      if (element.isExternal && tree.hasBody) {
+        reporter.reportErrorMessage(element, MessageKind.EXTERNAL_WITH_BODY,
             {'functionName': element.name});
       }
       if (element.isConstructor) {
@@ -235,11 +214,13 @@
           reporter.reportErrorMessage(
               tree, MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE);
         }
-        if (element.isConst &&
-            tree.hasBody() &&
-            !tree.isRedirectingFactory) {
-          reporter.reportErrorMessage(
-              tree, MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY);
+        if (tree.hasBody && element.isConst) {
+          if (element.isGenerativeConstructor) {
+            reporter.reportErrorMessage(
+                tree, MessageKind.CONST_CONSTRUCTOR_WITH_BODY);
+          } else if (!tree.isRedirectingFactory) {
+            reporter.reportErrorMessage(tree, MessageKind.CONST_FACTORY);
+          }
         }
       }
 
@@ -263,7 +244,8 @@
             tree, MessageKind.FUNCTION_WITH_INITIALIZER);
       }
 
-      if (!compiler.analyzeSignaturesOnly || tree.isRedirectingFactory) {
+      if (!compiler.options.analyzeSignaturesOnly ||
+          tree.isRedirectingFactory) {
         // We need to analyze the redirecting factory bodies to ensure that
         // we can analyze compile-time constants.
         visitor.visit(tree.body);
@@ -291,13 +273,11 @@
           element.isInstanceMember &&
           element.name == Identifiers.noSuchMethod_ &&
           _isNativeClassOrExtendsNativeClass(enclosingClass)) {
-        reporter.reportErrorMessage(
-            tree, MessageKind.NO_SUCH_METHOD_IN_NATIVE);
+        reporter.reportErrorMessage(tree, MessageKind.NO_SUCH_METHOD_IN_NATIVE);
       }
 
       return registry.worldImpact;
     });
-
   }
 
   WorldImpact resolveMethodElement(FunctionElementX element) {
@@ -308,7 +288,7 @@
         // should never be non-null, not even for constructors.
         assert(invariant(element, element.isConstructor,
             message: 'Non-constructor element $element '
-                     'has already been analyzed.'));
+                'has already been analyzed.'));
         return const ResolutionImpact();
       }
       if (element.isSynthesized) {
@@ -322,9 +302,8 @@
           // seeing this element.
           element.computeType(resolution);
           if (!target.isMalformed) {
-            registry.registerStaticUse(
-                new StaticUse.superConstructorInvoke(
-                    target, CallStructure.NO_ARGS));
+            registry.registerStaticUse(new StaticUse.superConstructorInvoke(
+                target, CallStructure.NO_ARGS));
           }
           return registry.worldImpact;
         } else {
@@ -359,9 +338,8 @@
 
   WorldImpact resolveField(FieldElementX element) {
     VariableDefinitions tree = element.parseNode(parsing);
-    if(element.modifiers.isStatic && element.isTopLevel) {
-      reporter.reportErrorMessage(
-          element.modifiers.getStatic(),
+    if (element.modifiers.isStatic && element.isTopLevel) {
+      reporter.reportErrorMessage(element.modifiers.getStatic(),
           MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC);
     }
     ResolverVisitor visitor = visitorFor(element);
@@ -420,8 +398,7 @@
   DartType resolveTypeAnnotation(Element element, TypeAnnotation annotation) {
     DartType type = resolveReturnType(element, annotation);
     if (type.isVoid) {
-      reporter.reportErrorMessage(
-          annotation, MessageKind.VOID_NOT_ALLOWED);
+      reporter.reportErrorMessage(annotation, MessageKind.VOID_NOT_ALLOWED);
     }
     return type;
   }
@@ -436,8 +413,8 @@
     return result;
   }
 
-  void resolveRedirectionChain(ConstructorElementX constructor,
-                               Spannable node) {
+  void resolveRedirectionChain(
+      ConstructorElementX constructor, Spannable node) {
     ConstructorElementX target = constructor;
     InterfaceType targetType;
     List<Element> seen = new List<Element>();
@@ -449,7 +426,7 @@
         targetType = target.effectiveTargetType;
         assert(invariant(target, targetType != null,
             message: 'Redirection target type has not been computed for '
-                     '$target'));
+                '$target'));
         target = target.effectiveTargetInternal;
         break;
       }
@@ -517,14 +494,11 @@
       if (cls.supertypeLoadState == STATE_DONE) return;
       if (cls.supertypeLoadState == STATE_STARTED) {
         reporter.reportErrorMessage(
-            from,
-            MessageKind.CYCLIC_CLASS_HIERARCHY,
-            {'className': cls.name});
+            from, MessageKind.CYCLIC_CLASS_HIERARCHY, {'className': cls.name});
         cls.supertypeLoadState = STATE_DONE;
         cls.hasIncompleteHierarchy = true;
-        cls.allSupertypesAndSelf =
-            coreClasses.objectClass.allSupertypesAndSelf.extendClass(
-                cls.computeType(resolution));
+        cls.allSupertypesAndSelf = coreClasses.objectClass.allSupertypesAndSelf
+            .extendClass(cls.computeType(resolution));
         cls.supertype = cls.allSupertypes.head;
         assert(invariant(from, cls.supertype != null,
             message: 'Missing supertype on cyclic class $cls.'));
@@ -534,8 +508,9 @@
       cls.supertypeLoadState = STATE_STARTED;
       reporter.withCurrentElement(cls, () {
         // TODO(ahe): Cache the node in cls.
-        cls.parseNode(parsing).accept(
-            new ClassSupertypeResolver(compiler, cls));
+        cls
+            .parseNode(parsing)
+            .accept(new ClassSupertypeResolver(compiler, cls));
         if (cls.supertypeLoadState != STATE_DONE) {
           cls.supertypeLoadState = STATE_DONE;
         }
@@ -557,8 +532,8 @@
   /// [element] has been resolved.
   // TODO(johnniwinther): Encapsulate this functionality in a
   // 'TypeDeclarationResolver'.
-  _resolveTypeDeclaration(TypeDeclarationElement element,
-                          resolveTypeDeclaration()) {
+  _resolveTypeDeclaration(
+      TypeDeclarationElement element, resolveTypeDeclaration()) {
     return reporter.withCurrentElement(element, () {
       return measure(() {
         TypeDeclarationElement previousResolvedTypeDeclaration =
@@ -568,7 +543,8 @@
         if (previousResolvedTypeDeclaration == null) {
           do {
             while (!pendingClassesToBeResolved.isEmpty) {
-              pendingClassesToBeResolved.removeFirst()
+              pendingClassesToBeResolved
+                  .removeFirst()
                   .ensureResolved(resolution);
             }
             while (!pendingClassesToBePostProcessed.isEmpty) {
@@ -614,27 +590,30 @@
     }
   }
 
-  void resolveClassInternal(BaseClassElementX element,
-                            ResolutionRegistry registry) {
+  void resolveClassInternal(
+      BaseClassElementX element, ResolutionRegistry registry) {
     if (!element.isPatch) {
-      reporter.withCurrentElement(element, () => measure(() {
-        assert(element.resolutionState == STATE_NOT_STARTED);
-        element.resolutionState = STATE_STARTED;
-        Node tree = element.parseNode(parsing);
-        loadSupertypes(element, tree);
+      reporter.withCurrentElement(
+          element,
+          () => measure(() {
+                assert(element.resolutionState == STATE_NOT_STARTED);
+                element.resolutionState = STATE_STARTED;
+                Node tree = element.parseNode(parsing);
+                loadSupertypes(element, tree);
 
-        ClassResolverVisitor visitor =
-            new ClassResolverVisitor(compiler, element, registry);
-        visitor.visit(tree);
-        element.resolutionState = STATE_DONE;
-        compiler.onClassResolved(element);
-        pendingClassesToBePostProcessed.add(element);
-      }));
+                ClassResolverVisitor visitor =
+                    new ClassResolverVisitor(compiler, element, registry);
+                visitor.visit(tree);
+                element.resolutionState = STATE_DONE;
+                compiler.onClassResolved(element);
+                pendingClassesToBePostProcessed.add(element);
+              }));
       if (element.isPatched) {
         // Ensure handling patch after origin.
         element.patch.ensureResolved(resolution);
       }
-    } else { // Handle patch classes:
+    } else {
+      // Handle patch classes:
       element.resolutionState = STATE_STARTED;
       // Ensure handling origin before patch.
       element.origin.ensureResolved(resolution);
@@ -718,8 +697,7 @@
     // Check that we're not trying to use Object as a mixin.
     if (mixin.superclass == null) {
       reporter.reportErrorMessage(
-          mixinApplication,
-          MessageKind.ILLEGAL_MIXIN_OBJECT);
+          mixinApplication, MessageKind.ILLEGAL_MIXIN_OBJECT);
       // Avoid reporting additional errors for the Object class.
       return;
     }
@@ -731,8 +709,7 @@
 
     // Check that the mixed in class has Object as its superclass.
     if (!mixin.superclass.isObject) {
-      reporter.reportErrorMessage(
-          mixin, MessageKind.ILLEGAL_MIXIN_SUPERCLASS);
+      reporter.reportErrorMessage(mixin, MessageKind.ILLEGAL_MIXIN_SUPERCLASS);
     }
 
     // Check that the mixed in class doesn't have any constructors and
@@ -750,31 +727,25 @@
         // differently.
         if (compiler.enqueuer.resolution.hasBeenProcessed(member)) {
           checkMixinSuperUses(
-              member.resolvedAst.elements,
-              mixinApplication,
-              mixin);
+              member.resolvedAst.elements, mixinApplication, mixin);
         }
       }
     });
   }
 
   void checkMixinSuperUses(TreeElements resolutionTree,
-                           MixinApplicationElement mixinApplication,
-                           ClassElement mixin) {
+      MixinApplicationElement mixinApplication, ClassElement mixin) {
     // TODO(johnniwinther): Avoid the use of [TreeElements] here.
     if (resolutionTree == null) return;
     Iterable<SourceSpan> superUses = resolutionTree.superUses;
     if (superUses.isEmpty) return;
-    DiagnosticMessage error = reporter.createMessage(
-        mixinApplication,
-        MessageKind.ILLEGAL_MIXIN_WITH_SUPER,
-        {'className': mixin.name});
+    DiagnosticMessage error = reporter.createMessage(mixinApplication,
+        MessageKind.ILLEGAL_MIXIN_WITH_SUPER, {'className': mixin.name});
     // Show the user the problematic uses of 'super' in the mixin.
     List<DiagnosticMessage> infos = <DiagnosticMessage>[];
     for (SourceSpan use in superUses) {
-      infos.add(reporter.createMessage(
-          use,
-          MessageKind.ILLEGAL_MIXIN_SUPER_USE));
+      infos.add(
+          reporter.createMessage(use, MessageKind.ILLEGAL_MIXIN_SUPER_USE));
     }
     reporter.reportError(error, infos);
   }
@@ -797,8 +768,7 @@
               member, MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER);
         }
         if (member.isConstructor) {
-          final mismatchedFlagsBits =
-              member.modifiers.flags &
+          final mismatchedFlagsBits = member.modifiers.flags &
               (Modifiers.FLAG_STATIC | Modifiers.FLAG_ABSTRACT);
           if (mismatchedFlagsBits != 0) {
             final mismatchedFlags =
@@ -826,8 +796,8 @@
       });
     });
     if (!constConstructors.isEmpty && !nonFinalInstanceFields.isEmpty) {
-      Spannable span = constConstructors.length > 1
-          ? cls : constConstructors[0];
+      Spannable span =
+          constConstructors.length > 1 ? cls : constConstructors[0];
       DiagnosticMessage error = reporter.createMessage(
           span,
           MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS,
@@ -835,15 +805,13 @@
       List<DiagnosticMessage> infos = <DiagnosticMessage>[];
       if (constConstructors.length > 1) {
         for (Element constructor in constConstructors) {
-          infos.add(reporter.createMessage(
-              constructor,
+          infos.add(reporter.createMessage(constructor,
               MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR));
         }
       }
       for (Element field in nonFinalInstanceFields) {
         infos.add(reporter.createMessage(
-            field,
-            MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD));
+            field, MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD));
       }
       reporter.reportError(error, infos);
     }
@@ -859,12 +827,11 @@
     ClassElement classElement = member.enclosingClass;
     Element lookupElement = classElement.lookupLocalMember(member.name);
     if (lookupElement == null) {
-      reporter.internalError(member,
-          "No abstract field for accessor");
+      reporter.internalError(member, "No abstract field for accessor");
     } else if (!lookupElement.isAbstractField) {
       if (lookupElement.isMalformed || lookupElement.isAmbiguous) return;
-      reporter.internalError(member,
-          "Inaccessible abstract field for accessor");
+      reporter.internalError(
+          member, "Inaccessible abstract field for accessor");
     }
     AbstractFieldElement field = lookupElement;
 
@@ -876,14 +843,10 @@
     int setterFlags = setter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
     if (getterFlags != setterFlags) {
       final mismatchedFlags =
-        new Modifiers.withFlags(null, getterFlags ^ setterFlags);
-      reporter.reportWarningMessage(
-          field.getter,
-          MessageKind.GETTER_MISMATCH,
+          new Modifiers.withFlags(null, getterFlags ^ setterFlags);
+      reporter.reportWarningMessage(field.getter, MessageKind.GETTER_MISMATCH,
           {'modifiers': mismatchedFlags});
-      reporter.reportWarningMessage(
-          field.setter,
-          MessageKind.SETTER_MISMATCH,
+      reporter.reportWarningMessage(field.setter, MessageKind.SETTER_MISMATCH,
           {'modifiers': mismatchedFlags});
     }
   }
@@ -917,8 +880,8 @@
       messageKind = MessageKind.TERNARY_OPERATOR_BAD_ARITY;
       requiredParameterCount = 2;
     } else {
-      reporter.internalError(function,
-          'Unexpected user defined operator $value');
+      reporter.internalError(
+          function, 'Unexpected user defined operator $value');
     }
     checkArity(function, requiredParameterCount, messageKind, isMinus);
   }
@@ -926,17 +889,14 @@
   void checkOverrideHashCode(FunctionElement operatorEquals) {
     if (operatorEquals.isAbstract) return;
     ClassElement cls = operatorEquals.enclosingClass;
-    Element hashCodeImplementation =
-        cls.lookupLocalMember('hashCode');
+    Element hashCodeImplementation = cls.lookupLocalMember('hashCode');
     if (hashCodeImplementation != null) return;
-    reporter.reportHintMessage(
-        operatorEquals, MessageKind.OVERRIDE_EQUALS_NOT_HASH_CODE,
-        {'class': cls.name});
+    reporter.reportHintMessage(operatorEquals,
+        MessageKind.OVERRIDE_EQUALS_NOT_HASH_CODE, {'class': cls.name});
   }
 
-  void checkArity(FunctionElement function,
-                  int requiredParameterCount, MessageKind messageKind,
-                  bool isMinus) {
+  void checkArity(FunctionElement function, int requiredParameterCount,
+      MessageKind messageKind, bool isMinus) {
     FunctionExpression node = function.node;
     FunctionSignature signature = function.functionSignature;
     if (signature.requiredParameterCount != requiredParameterCount) {
@@ -990,22 +950,18 @@
     }
   }
 
-  reportErrorWithContext(Element errorneousElement,
-                         MessageKind errorMessage,
-                         Element contextElement,
-                         MessageKind contextMessage) {
+  reportErrorWithContext(Element errorneousElement, MessageKind errorMessage,
+      Element contextElement, MessageKind contextMessage) {
     reporter.reportError(
-        reporter.createMessage(
-            errorneousElement,
-            errorMessage,
-            {'memberName': contextElement.name,
-             'className': contextElement.enclosingClass.name}),
+        reporter.createMessage(errorneousElement, errorMessage, {
+          'memberName': contextElement.name,
+          'className': contextElement.enclosingClass.name
+        }),
         <DiagnosticMessage>[
-            reporter.createMessage(contextElement, contextMessage),
+          reporter.createMessage(contextElement, contextMessage),
         ]);
   }
 
-
   FunctionSignature resolveSignature(FunctionElementX element) {
     MessageKind defaultValuesError = null;
     if (element.isFactoryConstructor) {
@@ -1017,7 +973,10 @@
     return reporter.withCurrentElement(element, () {
       FunctionExpression node = element.parseNode(parsing);
       return measure(() => SignatureResolver.analyze(
-          compiler, node.parameters, node.returnType, element,
+          compiler,
+          node.parameters,
+          node.returnType,
+          element,
           new ResolutionRegistry(compiler, _ensureTreeElements(element)),
           defaultValuesError: defaultValuesError,
           createRealParameters: true));
@@ -1028,15 +987,15 @@
     if (element.isResolved) return const ResolutionImpact();
     compiler.world.allTypedefs.add(element);
     return _resolveTypeDeclaration(element, () {
-      ResolutionRegistry registry = new ResolutionRegistry(
-          compiler, _ensureTreeElements(element));
+      ResolutionRegistry registry =
+          new ResolutionRegistry(compiler, _ensureTreeElements(element));
       return reporter.withCurrentElement(element, () {
         return measure(() {
           assert(element.resolutionState == STATE_NOT_STARTED);
           element.resolutionState = STATE_STARTED;
           Typedef node = element.parseNode(parsing);
           TypedefResolverVisitor visitor =
-            new TypedefResolverVisitor(compiler, element, registry);
+              new TypedefResolverVisitor(compiler, element, registry);
           visitor.visit(node);
           element.resolutionState = STATE_DONE;
           return registry.worldImpact;
@@ -1046,61 +1005,65 @@
   }
 
   void resolveMetadataAnnotation(MetadataAnnotationX annotation) {
-    reporter.withCurrentElement(annotation.annotatedElement, () => measure(() {
-      assert(annotation.resolutionState == STATE_NOT_STARTED);
-      annotation.resolutionState = STATE_STARTED;
+    reporter.withCurrentElement(
+        annotation.annotatedElement,
+        () => measure(() {
+              assert(annotation.resolutionState == STATE_NOT_STARTED);
+              annotation.resolutionState = STATE_STARTED;
 
-      Node node = annotation.parseNode(parsing);
-      Element annotatedElement = annotation.annotatedElement;
-      AnalyzableElement context = annotatedElement.analyzableElement;
-      ClassElement classElement = annotatedElement.enclosingClass;
-      if (classElement != null) {
-        // The annotation is resolved in the scope of [classElement].
-        classElement.ensureResolved(resolution);
-      }
-      assert(invariant(node, context != null,
-          message: "No context found for metadata annotation "
-                   "on $annotatedElement."));
-      ResolverVisitor visitor = visitorFor(context, useEnclosingScope: true);
-      ResolutionRegistry registry = visitor.registry;
-      node.accept(visitor);
-      // TODO(johnniwinther): Avoid passing the [TreeElements] to
-      // [compileMetadata].
-      ConstantExpression constant = constantCompiler.compileMetadata(
-          annotation, node, registry.mapping);
-      switch (constant.kind) {
-        case ConstantExpressionKind.CONSTRUCTED:
-          ConstructedConstantExpression constructedConstant = constant;
-          if (constructedConstant.type.isGeneric) {
-            // Const constructor calls cannot have type arguments.
-            // TODO(24312): Remove this.
-            reporter.reportErrorMessage(
-                node, MessageKind.INVALID_METADATA_GENERIC);
-            constant = new ErroneousConstantExpression();
-          }
-          break;
-        case ConstantExpressionKind.VARIABLE:
-        case ConstantExpressionKind.ERRONEOUS:
-          break;
-        default:
-          reporter.reportErrorMessage(node, MessageKind.INVALID_METADATA);
-          constant = new ErroneousConstantExpression();
-          break;
-      }
-      annotation.constant = constant;
+              Node node = annotation.parseNode(parsing);
+              Element annotatedElement = annotation.annotatedElement;
+              AnalyzableElement context = annotatedElement.analyzableElement;
+              ClassElement classElement = annotatedElement.enclosingClass;
+              if (classElement != null) {
+                // The annotation is resolved in the scope of [classElement].
+                classElement.ensureResolved(resolution);
+              }
+              assert(invariant(node, context != null,
+                  message: "No context found for metadata annotation "
+                      "on $annotatedElement."));
+              ResolverVisitor visitor =
+                  visitorFor(context, useEnclosingScope: true);
+              ResolutionRegistry registry = visitor.registry;
+              node.accept(visitor);
+              // TODO(johnniwinther): Avoid passing the [TreeElements] to
+              // [compileMetadata].
+              ConstantExpression constant = constantCompiler.compileMetadata(
+                  annotation, node, registry.mapping);
+              switch (constant.kind) {
+                case ConstantExpressionKind.CONSTRUCTED:
+                  ConstructedConstantExpression constructedConstant = constant;
+                  if (constructedConstant.type.isGeneric) {
+                    // Const constructor calls cannot have type arguments.
+                    // TODO(24312): Remove this.
+                    reporter.reportErrorMessage(
+                        node, MessageKind.INVALID_METADATA_GENERIC);
+                    constant = new ErroneousConstantExpression();
+                  }
+                  break;
+                case ConstantExpressionKind.VARIABLE:
+                case ConstantExpressionKind.ERRONEOUS:
+                  break;
+                default:
+                  reporter.reportErrorMessage(
+                      node, MessageKind.INVALID_METADATA);
+                  constant = new ErroneousConstantExpression();
+                  break;
+              }
+              annotation.constant = constant;
 
-      constantCompiler.evaluate(annotation.constant);
-      // TODO(johnniwinther): Register the relation between the annotation
-      // and the annotated element instead. This will allow the backend to
-      // retrieve the backend constant and only register metadata on the
-      // elements for which it is needed. (Issue 17732).
-      registry.registerMetadataConstant(annotation);
-      annotation.resolutionState = STATE_DONE;
-    }));
+              constantCompiler.evaluate(annotation.constant);
+              // TODO(johnniwinther): Register the relation between the annotation
+              // and the annotated element instead. This will allow the backend to
+              // retrieve the backend constant and only register metadata on the
+              // elements for which it is needed. (Issue 17732).
+              registry.registerMetadataConstant(annotation);
+              annotation.resolutionState = STATE_DONE;
+            }));
   }
 
-  List<MetadataAnnotation> resolveMetadata(Element element,
-                                           VariableDefinitions node) {
+  List<MetadataAnnotation> resolveMetadata(
+      Element element, VariableDefinitions node) {
     List<MetadataAnnotation> metadata = <MetadataAnnotation>[];
     for (Metadata annotation in node.metadata.nodes) {
       ParameterMetadataAnnotation metadataAnnotation =
@@ -1125,7 +1088,7 @@
   bool get hasTreeElements => _treeElements != null;
 
   TreeElements get treeElements {
-    assert(invariant(this, _treeElements !=null,
+    assert(invariant(this, _treeElements != null,
         message: "TreeElements have not been computed for $this."));
     return _treeElements;
   }
diff --git a/pkg/compiler/lib/src/resolution/resolution_common.dart b/pkg/compiler/lib/src/resolution/resolution_common.dart
index e1e0d28..3cf5dcb 100644
--- a/pkg/compiler/lib/src/resolution/resolution_common.dart
+++ b/pkg/compiler/lib/src/resolution/resolution_common.dart
@@ -5,21 +5,15 @@
 library dart2js.resolution.common;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Resolution;
-import '../common/tasks.dart' show
-    DeferredAction;
-import '../compiler.dart' show
-    Compiler;
+import '../common/resolution.dart' show Resolution;
+import '../common/tasks.dart' show DeferredAction;
+import '../compiler.dart' show Compiler;
 import '../elements/elements.dart';
 import '../tree/tree.dart';
 
-import 'registry.dart' show
-    ResolutionRegistry;
-import 'scope.dart' show
-    Scope;
-import 'type_resolver.dart' show
-    TypeResolver;
+import 'registry.dart' show ResolutionRegistry;
+import 'scope.dart' show Scope;
+import 'type_resolver.dart' show TypeResolver;
 
 class CommonResolverVisitor<R> extends Visitor<R> {
   final Compiler compiler;
@@ -31,8 +25,8 @@
   Resolution get resolution => compiler.resolution;
 
   R visitNode(Node node) {
-    return reporter.internalError(node,
-        'internal error: Unhandled node: ${node.getObjectDescription()}');
+    return reporter.internalError(
+        node, 'internal error: Unhandled node: ${node.getObjectDescription()}');
   }
 
   R visitEmptyStatement(Node node) => null;
@@ -52,8 +46,10 @@
 abstract class MappingVisitor<T> extends CommonResolverVisitor<T> {
   final ResolutionRegistry registry;
   final TypeResolver typeResolver;
+
   /// The current enclosing element for the visited AST nodes.
   Element get enclosingElement;
+
   /// The current scope of the visitor.
   Scope get scope;
 
@@ -77,9 +73,9 @@
           element.name == 'async' ||
           element.name == 'await') {
         reporter.reportErrorMessage(
-            node, MessageKind.ASYNC_KEYWORD_AS_IDENTIFIER,
-            {'keyword': element.name,
-             'modifier': currentAsyncMarker});
+            node,
+            MessageKind.ASYNC_KEYWORD_AS_IDENTIFIER,
+            {'keyword': element.name, 'modifier': currentAsyncMarker});
       }
     }
   }
@@ -93,19 +89,14 @@
     registry.defineElement(node, element);
   }
 
-  void reportDuplicateDefinition(String name,
-                                 Spannable definition,
-                                 Spannable existing) {
+  void reportDuplicateDefinition(
+      String name, Spannable definition, Spannable existing) {
     reporter.reportError(
         reporter.createMessage(
-            definition,
-            MessageKind.DUPLICATE_DEFINITION,
-            {'name': name}),
+            definition, MessageKind.DUPLICATE_DEFINITION, {'name': name}),
         <DiagnosticMessage>[
-            reporter.createMessage(
-                existing,
-                MessageKind.EXISTING_DEFINITION,
-                {'name': name}),
+          reporter.createMessage(
+              existing, MessageKind.EXISTING_DEFINITION, {'name': name}),
         ]);
   }
 }
diff --git a/pkg/compiler/lib/src/resolution/resolution_result.dart b/pkg/compiler/lib/src/resolution/resolution_result.dart
index 6168025..3e36fa7 100644
--- a/pkg/compiler/lib/src/resolution/resolution_result.dart
+++ b/pkg/compiler/lib/src/resolution/resolution_result.dart
@@ -8,17 +8,9 @@
 import '../dart_types.dart';
 import '../elements/elements.dart';
 import '../tree/tree.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
+import '../universe/call_structure.dart' show CallStructure;
 
-enum ResultKind {
-  NONE,
-  ELEMENT,
-  TYPE,
-  ASSERT,
-  CONSTANT,
-  PREFIX,
-}
+enum ResultKind { NONE, ELEMENT, TYPE, ASSERT, CONSTANT, PREFIX, }
 
 /// The result of resolving a node.
 abstract class ResolutionResult {
@@ -121,9 +113,7 @@
   /// expression.
   final bool isValidAsConstant;
 
-  ArgumentsResult(
-      this.callStructure,
-      this.argumentResults,
+  ArgumentsResult(this.callStructure, this.argumentResults,
       {this.isValidAsConstant});
 
   /// Returns the list of [ConstantExpression]s for each of the arguments. If
diff --git a/pkg/compiler/lib/src/resolution/scope.dart b/pkg/compiler/lib/src/resolution/scope.dart
index c3785f9..41df803 100644
--- a/pkg/compiler/lib/src/resolution/scope.dart
+++ b/pkg/compiler/lib/src/resolution/scope.dart
@@ -21,7 +21,8 @@
 
   static Scope buildEnclosingScope(Element element) {
     return element.enclosingElement != null
-        ? element.enclosingElement.buildScope() : element.buildScope();
+        ? element.enclosingElement.buildScope()
+        : element.buildScope();
   }
 }
 
@@ -67,8 +68,7 @@
 class TypeDeclarationScope extends NestedScope {
   final TypeDeclarationElement element;
 
-  TypeDeclarationScope(parent, this.element)
-      : super(parent) {
+  TypeDeclarationScope(parent, this.element) : super(parent) {
     assert(parent != null);
   }
 
@@ -88,8 +88,7 @@
 
   Element localLookup(String name) => lookupTypeVariable(name);
 
-  String toString() =>
-      'TypeDeclarationScope($element)';
+  String toString() => 'TypeDeclarationScope($element)';
 }
 
 abstract class MutableScope extends NestedScope {
@@ -115,8 +114,7 @@
 class MethodScope extends MutableScope {
   final Element element;
 
-  MethodScope(Scope parent, this.element)
-      : super(parent);
+  MethodScope(Scope parent, this.element) : super(parent);
 
   String toString() => 'MethodScope($element${elements.keys.toList()})';
 }
@@ -136,7 +134,7 @@
   ClassElement get element => super.element;
 
   ClassScope(Scope parentScope, ClassElement element)
-      : super(parentScope, element)  {
+      : super(parentScope, element) {
     assert(parent != null);
   }
 
diff --git a/pkg/compiler/lib/src/resolution/secret_tree_element.dart b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
index c4d2029..635ffe7 100644
--- a/pkg/compiler/lib/src/resolution/secret_tree_element.dart
+++ b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
@@ -31,7 +31,6 @@
 ///
 /// This class is the superclass of all AST nodes.
 abstract class NullTreeElementMixin implements TreeElementMixin, Spannable {
-
   // Deliberately using [Object] here to thwart code completion.
   // You're not really supposed to access this field anyways.
   Object get _element => null;
diff --git a/pkg/compiler/lib/src/resolution/semantic_visitor.dart b/pkg/compiler/lib/src/resolution/semantic_visitor.dart
index e28d3e1..6f0005e 100644
--- a/pkg/compiler/lib/src/resolution/semantic_visitor.dart
+++ b/pkg/compiler/lib/src/resolution/semantic_visitor.dart
@@ -9,10 +9,8 @@
 import '../dart_types.dart';
 import '../tree/tree.dart';
 import '../elements/elements.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
 
 import 'operators.dart';
 import 'send_resolver.dart';
@@ -78,7 +76,6 @@
 /// [SemanticDeclarationVisitor] in a [Visitor].
 abstract class SemanticDeclarationResolvedMixin<R, A>
     implements Visitor<R>, DeclarationResolverMixin {
-
   SemanticDeclarationVisitor<R, A> get declVisitor;
 
   @override
@@ -114,8 +111,7 @@
     // TODO(johnniwinther): Support argument.
     A arg = null;
 
-    computeVariableStructures(
-        definitions,
+    computeVariableStructures(definitions,
         (Node node, VariableStructure structure) {
       if (structure == null) {
         return internalError(node, 'No structure for $node');
@@ -128,9 +124,10 @@
 }
 
 abstract class SemanticVisitor<R, A> extends Visitor<R>
-    with SemanticSendResolvedMixin<R, A>,
-         SemanticDeclarationResolvedMixin<R, A>,
-         DeclarationResolverMixin {
+    with
+        SemanticSendResolvedMixin<R, A>,
+        SemanticDeclarationResolvedMixin<R, A>,
+        DeclarationResolverMixin {
   TreeElements elements;
 
   SemanticVisitor(this.elements);
@@ -147,10 +144,7 @@
   ///
   ///     m(parameter) => parameter;
   ///
-  R visitParameterGet(
-      Send node,
-      ParameterElement parameter,
-      A arg);
+  R visitParameterGet(Send node, ParameterElement parameter, A arg);
 
   /// Assignment of [rhs] to the [parameter].
   ///
@@ -161,10 +155,7 @@
   ///     }
   ///
   R visitParameterSet(
-      SendSet node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg);
+      SendSet node, ParameterElement parameter, Node rhs, A arg);
 
   /// Assignment of [rhs] to the final [parameter].
   ///
@@ -175,10 +166,7 @@
   ///     }
   ///
   R visitFinalParameterSet(
-      SendSet node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg);
+      SendSet node, ParameterElement parameter, Node rhs, A arg);
 
   /// Invocation of the [parameter] with [arguments].
   ///
@@ -188,12 +176,8 @@
   ///       parameter(null, 42);
   ///     }
   ///
-  R visitParameterInvoke(
-      Send node,
-      ParameterElement parameter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitParameterInvoke(Send node, ParameterElement parameter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Read of the local [variable].
   ///
@@ -204,10 +188,7 @@
   ///       return variable;
   ///     }
   ///
-  R visitLocalVariableGet(
-      Send node,
-      LocalVariableElement variable,
-      A arg);
+  R visitLocalVariableGet(Send node, LocalVariableElement variable, A arg);
 
   /// Assignment of [rhs] to the local [variable].
   ///
@@ -219,10 +200,7 @@
   ///     }
   ///
   R visitLocalVariableSet(
-      SendSet node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg);
+      SendSet node, LocalVariableElement variable, Node rhs, A arg);
 
   /// Assignment of [rhs] to the final local [variable].
   ///
@@ -234,10 +212,7 @@
   ///     }
   ///
   R visitFinalLocalVariableSet(
-      SendSet node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg);
+      SendSet node, LocalVariableElement variable, Node rhs, A arg);
 
   /// Invocation of the local variable [variable] with [arguments].
   ///
@@ -248,12 +223,8 @@
   ///       variable(null, 42);
   ///     }
   ///
-  R visitLocalVariableInvoke(
-      Send node,
-      LocalVariableElement variable,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitLocalVariableInvoke(Send node, LocalVariableElement variable,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Closurization of the local [function].
   ///
@@ -264,10 +235,7 @@
   ///       return o;
   ///     }
   ///
-  R visitLocalFunctionGet(
-      Send node,
-      LocalFunctionElement function,
-      A arg);
+  R visitLocalFunctionGet(Send node, LocalFunctionElement function, A arg);
 
   /// Assignment of [rhs] to the local [function].
   ///
@@ -279,10 +247,7 @@
   ///     }
   ///
   R visitLocalFunctionSet(
-      SendSet node,
-      LocalFunctionElement function,
-      Node rhs,
-      A arg);
+      SendSet node, LocalFunctionElement function, Node rhs, A arg);
 
   /// Invocation of the local [function] with [arguments].
   ///
@@ -293,12 +258,8 @@
   ///       return o(null, 42);
   ///     }
   ///
-  R visitLocalFunctionInvoke(
-      Send node,
-      LocalFunctionElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitLocalFunctionInvoke(Send node, LocalFunctionElement function,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Invocation of the local [function] with incompatible [arguments].
   ///
@@ -322,11 +283,7 @@
   ///
   ///     m(receiver) => receiver.foo;
   ///
-  R visitDynamicPropertyGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg);
+  R visitDynamicPropertyGet(Send node, Node receiver, Name name, A arg);
 
   /// Conditional (if not null) getter call on [receiver] of the property
   /// defined by [selector].
@@ -336,10 +293,7 @@
   ///     m(receiver) => receiver?.foo;
   ///
   R visitIfNotNullDynamicPropertyGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg);
+      Send node, Node receiver, Name name, A arg);
 
   /// Setter call on [receiver] with argument [rhs] of the property defined by
   /// [selector].
@@ -351,11 +305,7 @@
   ///     }
   ///
   R visitDynamicPropertySet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg);
+      SendSet node, Node receiver, Name name, Node rhs, A arg);
 
   /// Conditional (if not null) setter call on [receiver] with argument [rhs] of
   /// the property defined by [selector].
@@ -367,11 +317,7 @@
   ///     }
   ///
   R visitIfNotNullDynamicPropertySet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg);
+      SendSet node, Node receiver, Name name, Node rhs, A arg);
 
   /// Invocation of the property defined by [selector] on [receiver] with
   /// [arguments].
@@ -383,11 +329,7 @@
   ///     }
   ///
   R visitDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg);
 
   /// Conditinal invocation of the property defined by [selector] on [receiver]
   /// with [arguments], if [receiver] is not null.
@@ -399,11 +341,7 @@
   ///     }
   ///
   R visitIfNotNullDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg);
 
   /// Getter call on `this` of the property defined by [selector].
   ///
@@ -419,10 +357,7 @@
   ///       m() => foo;
   ///     }
   ///
-  R visitThisPropertyGet(
-      Send node,
-      Name name,
-      A arg);
+  R visitThisPropertyGet(Send node, Name name, A arg);
 
   /// Setter call on `this` with argument [rhs] of the property defined by
   /// [selector].
@@ -439,11 +374,7 @@
   ///       m() { foo = rhs; }
   ///     }
   ///
-  R visitThisPropertySet(
-      SendSet node,
-      Name name,
-      Node rhs,
-      A arg);
+  R visitThisPropertySet(SendSet node, Name name, Node rhs, A arg);
 
   /// Invocation of the property defined by [selector] on `this` with
   /// [arguments].
@@ -462,10 +393,7 @@
   ///
   ///
   R visitThisPropertyInvoke(
-      Send node,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+      Send node, NodeList arguments, Selector selector, A arg);
 
   /// Read of `this`.
   ///
@@ -475,9 +403,7 @@
   ///       m() => this;
   ///     }
   ///
-  R visitThisGet(
-      Identifier node,
-      A arg);
+  R visitThisGet(Identifier node, A arg);
 
   /// Invocation of `this` with [arguments].
   ///
@@ -488,11 +414,7 @@
   ///     }
   ///
   R visitThisInvoke(
-      Send node,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
-
+      Send node, NodeList arguments, CallStructure callStructure, A arg);
 
   /// Read of the super [field].
   ///
@@ -505,10 +427,7 @@
   ///        m() => super.foo;
   ///     }
   ///
-  R visitSuperFieldGet(
-      Send node,
-      FieldElement field,
-      A arg);
+  R visitSuperFieldGet(Send node, FieldElement field, A arg);
 
   /// Assignment of [rhs] to the super [field].
   ///
@@ -521,11 +440,7 @@
   ///        m() { super.foo = rhs; }
   ///     }
   ///
-  R visitSuperFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R visitSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
 
   /// Assignment of [rhs] to the final static [field].
   ///
@@ -538,11 +453,7 @@
   ///        m() { super.foo = rhs; }
   ///     }
   ///
-  R visitFinalSuperFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R visitFinalSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
 
   /// Invocation of the super [field] with [arguments].
   ///
@@ -555,12 +466,8 @@
   ///        m() { super.foo(null, 42); }
   ///     }
   ///
-  R visitSuperFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitSuperFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg);
 
   /// Closurization of the super [method].
   ///
@@ -573,10 +480,7 @@
   ///        m() => super.foo;
   ///     }
   ///
-  R visitSuperMethodGet(
-      Send node,
-      MethodElement method,
-      A arg);
+  R visitSuperMethodGet(Send node, MethodElement method, A arg);
 
   /// Invocation of the super [method] with [arguments].
   ///
@@ -589,12 +493,8 @@
   ///        m() { super.foo(null, 42); }
   ///     }
   ///
-  R visitSuperMethodInvoke(
-      Send node,
-      MethodElement method,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitSuperMethodInvoke(Send node, MethodElement method, NodeList arguments,
+      CallStructure callStructure, A arg);
 
   /// Invocation of the super [method] with incompatible [arguments].
   ///
@@ -607,12 +507,8 @@
   ///        m() { super.foo(null); } // One argument missing.
   ///     }
   ///
-  R visitSuperMethodIncompatibleInvoke(
-      Send node,
-      MethodElement method,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitSuperMethodIncompatibleInvoke(Send node, MethodElement method,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Assignment of [rhs] to the super [method].
   ///
@@ -625,11 +521,7 @@
   ///        m() { super.foo = rhs; }
   ///     }
   ///
-  R visitSuperMethodSet(
-      Send node,
-      MethodElement method,
-      Node rhs,
-      A arg);
+  R visitSuperMethodSet(Send node, MethodElement method, Node rhs, A arg);
 
   /// Getter call to the super [getter].
   ///
@@ -642,10 +534,7 @@
   ///        m() => super.foo;
   ///     }
   ///
-  R visitSuperGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg);
+  R visitSuperGetterGet(Send node, FunctionElement getter, A arg);
 
   /// Getter call the super [setter].
   ///
@@ -658,10 +547,7 @@
   ///        m() => super.foo;
   ///     }
   ///
-  R visitSuperSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg);
+  R visitSuperSetterGet(Send node, FunctionElement setter, A arg);
 
   /// Setter call to the super [setter].
   ///
@@ -674,11 +560,7 @@
   ///        m() { super.foo = rhs; }
   ///     }
   ///
-  R visitSuperSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+  R visitSuperSetterSet(SendSet node, FunctionElement setter, Node rhs, A arg);
 
   /// Assignment of [rhs] to the super [getter].
   ///
@@ -691,11 +573,7 @@
   ///        m() { super.foo = rhs; }
   ///     }
   ///
-  R visitSuperGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg);
+  R visitSuperGetterSet(SendSet node, FunctionElement getter, Node rhs, A arg);
 
   /// Invocation of the super [getter] with [arguments].
   ///
@@ -708,12 +586,8 @@
   ///        m() { super.foo(null, 42; }
   ///     }
   ///
-  R visitSuperGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitSuperGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Invocation of the super [setter] with [arguments].
   ///
@@ -726,12 +600,8 @@
   ///        m() { super.foo(null, 42; }
   ///     }
   ///
-  R visitSuperSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitSuperSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Invocation of a [expression] with [arguments].
   ///
@@ -739,12 +609,8 @@
   ///
   ///     m() => (a, b){}(null, 42);
   ///
-  R visitExpressionInvoke(
-      Send node,
-      Node expression,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitExpressionInvoke(Send node, Node expression, NodeList arguments,
+      CallStructure callStructure, A arg);
 
   /// Read of the static [field].
   ///
@@ -755,10 +621,7 @@
   ///     }
   ///     m() => C.foo;
   ///
-  R visitStaticFieldGet(
-      Send node,
-      FieldElement field,
-      A arg);
+  R visitStaticFieldGet(Send node, FieldElement field, A arg);
 
   /// Assignment of [rhs] to the static [field].
   ///
@@ -769,11 +632,7 @@
   ///     }
   ///     m() { C.foo = rhs; }
   ///
-  R visitStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R visitStaticFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
 
   /// Assignment of [rhs] to the final static [field].
   ///
@@ -784,11 +643,7 @@
   ///     }
   ///     m() { C.foo = rhs; }
   ///
-  R visitFinalStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R visitFinalStaticFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
 
   /// Invocation of the static [field] with [arguments].
   ///
@@ -799,12 +654,8 @@
   ///     }
   ///     m() { C.foo(null, 42); }
   ///
-  R visitStaticFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitStaticFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg);
 
   /// Closurization of the static [function].
   ///
@@ -815,10 +666,7 @@
   ///     }
   ///     m() => C.foo;
   ///
-  R visitStaticFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg);
+  R visitStaticFunctionGet(Send node, MethodElement function, A arg);
 
   /// Invocation of the static [function] with [arguments].
   ///
@@ -829,12 +677,8 @@
   ///     }
   ///     m() { C.foo(null, 42); }
   ///
-  R visitStaticFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitStaticFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Invocation of the static [function] with incompatible [arguments].
   ///
@@ -845,12 +689,8 @@
   ///     }
   ///     m() { C.foo(null); }
   ///
-  R visitStaticFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitStaticFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Assignment of [rhs] to the static [function].
   ///
@@ -861,11 +701,7 @@
   ///     }
   ///     m() { C.foo = rhs; }
   ///
-  R visitStaticFunctionSet(
-      Send node,
-      MethodElement function,
-      Node rhs,
-      A arg);
+  R visitStaticFunctionSet(Send node, MethodElement function, Node rhs, A arg);
 
   /// Getter call to the static [getter].
   ///
@@ -876,10 +712,7 @@
   ///     }
   ///     m() => C.foo;
   ///
-  R visitStaticGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg);
+  R visitStaticGetterGet(Send node, FunctionElement getter, A arg);
 
   /// Getter call the static [setter].
   ///
@@ -890,10 +723,7 @@
   ///     }
   ///     m() => C.foo;
   ///
-  R visitStaticSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg);
+  R visitStaticSetterGet(Send node, FunctionElement setter, A arg);
 
   /// Setter call to the static [setter].
   ///
@@ -904,11 +734,7 @@
   ///     }
   ///     m() { C.foo = rhs; }
   ///
-  R visitStaticSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+  R visitStaticSetterSet(SendSet node, FunctionElement setter, Node rhs, A arg);
 
   /// Assignment of [rhs] to the static [getter].
   ///
@@ -919,11 +745,7 @@
   ///     }
   ///     m() { C.foo = rhs; }
   ///
-  R visitStaticGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg);
+  R visitStaticGetterSet(SendSet node, FunctionElement getter, Node rhs, A arg);
 
   /// Invocation of the static [getter] with [arguments].
   ///
@@ -934,12 +756,8 @@
   ///     }
   ///     m() { C.foo(null, 42; }
   ///
-  R visitStaticGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitStaticGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Invocation of the static [setter] with [arguments].
   ///
@@ -950,12 +768,8 @@
   ///     }
   ///     m() { C.foo(null, 42; }
   ///
-  R visitStaticSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitStaticSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Read of the top level [field].
   ///
@@ -964,10 +778,7 @@
   ///     var foo;
   ///     m() => foo;
   ///
-  R visitTopLevelFieldGet(
-      Send node,
-      FieldElement field,
-      A arg);
+  R visitTopLevelFieldGet(Send node, FieldElement field, A arg);
 
   /// Assignment of [rhs] to the top level [field].
   ///
@@ -976,11 +787,7 @@
   ///     var foo;
   ///     m() { foo = rhs; }
   ///
-  R visitTopLevelFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R visitTopLevelFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
 
   /// Assignment of [rhs] to the final top level [field].
   ///
@@ -990,10 +797,7 @@
   ///     m() { foo = rhs; }
   ///
   R visitFinalTopLevelFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+      SendSet node, FieldElement field, Node rhs, A arg);
 
   /// Invocation of the top level [field] with [arguments].
   ///
@@ -1002,12 +806,8 @@
   ///     var foo;
   ///     m() { foo(null, 42); }
   ///
-  R visitTopLevelFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitTopLevelFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg);
 
   /// Closurization of the top level [function].
   ///
@@ -1016,10 +816,7 @@
   ///     foo(a, b) {};
   ///     m() => foo;
   ///
-  R visitTopLevelFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg);
+  R visitTopLevelFunctionGet(Send node, MethodElement function, A arg);
 
   /// Invocation of the top level [function] with [arguments].
   ///
@@ -1028,12 +825,8 @@
   ///     foo(a, b) {};
   ///     m() { foo(null, 42); }
   ///
-  R visitTopLevelFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitTopLevelFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Invocation of the top level [function] with incompatible [arguments].
   ///
@@ -1044,12 +837,8 @@
   ///     }
   ///     m() { C.foo(null); }
   ///
-  R visitTopLevelFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitTopLevelFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Assignment of [rhs] to the top level [function].
   ///
@@ -1059,10 +848,7 @@
   ///     m() { foo = rhs; }
   ///
   R visitTopLevelFunctionSet(
-      Send node,
-      MethodElement function,
-      Node rhs,
-      A arg);
+      Send node, MethodElement function, Node rhs, A arg);
 
   /// Getter call to the top level [getter].
   ///
@@ -1071,10 +857,7 @@
   ///     get foo => null;
   ///     m() => foo;
   ///
-  R visitTopLevelGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg);
+  R visitTopLevelGetterGet(Send node, FunctionElement getter, A arg);
 
   /// Getter call the top level [setter].
   ///
@@ -1083,10 +866,7 @@
   ///     set foo(_) {}
   ///     m() => foo;
   ///
-  R visitTopLevelSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg);
+  R visitTopLevelSetterGet(Send node, FunctionElement setter, A arg);
 
   /// Setter call to the top level [setter].
   ///
@@ -1096,10 +876,7 @@
   ///     m() { foo = rhs; }
   ///
   R visitTopLevelSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+      SendSet node, FunctionElement setter, Node rhs, A arg);
 
   /// Assignment of [rhs] to the top level [getter].
   ///
@@ -1109,10 +886,7 @@
   ///     m() { foo = rhs; }
   ///
   R visitTopLevelGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg);
+      SendSet node, FunctionElement getter, Node rhs, A arg);
 
   /// Invocation of the top level [getter] with [arguments].
   ///
@@ -1121,12 +895,8 @@
   ///     get foo => null;
   ///     m() { foo(null, 42); }
   ///
-  R visitTopLevelGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitTopLevelGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Invocation of the top level [setter] with [arguments].
   ///
@@ -1135,12 +905,8 @@
   ///     set foo(_) {};
   ///     m() { foo(null, 42); }
   ///
-  R visitTopLevelSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitTopLevelSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Read of the type literal for class [element].
   ///
@@ -1149,10 +915,7 @@
   ///     class C {}
   ///     m() => C;
   ///
-  R visitClassTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg);
+  R visitClassTypeLiteralGet(Send node, ConstantExpression constant, A arg);
 
   /// Invocation of the type literal for class [element] with [arguments].
   ///
@@ -1161,12 +924,8 @@
   ///     class C {}
   ///     m() => C(null, 42);
   ///
-  R visitClassTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitClassTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Assignment of [rhs] to the type literal for class [element].
   ///
@@ -1176,10 +935,7 @@
   ///     m() { C = rhs; }
   ///
   R visitClassTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg);
+      SendSet node, ConstantExpression constant, Node rhs, A arg);
 
   /// Read of the type literal for typedef [element].
   ///
@@ -1188,10 +944,7 @@
   ///     typedef F();
   ///     m() => F;
   ///
-  R visitTypedefTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg);
+  R visitTypedefTypeLiteralGet(Send node, ConstantExpression constant, A arg);
 
   /// Invocation of the type literal for typedef [element] with [arguments].
   ///
@@ -1200,12 +953,8 @@
   ///     typedef F();
   ///     m() => F(null, 42);
   ///
-  R visitTypedefTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitTypedefTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Assignment of [rhs] to the type literal for typedef [element].
   ///
@@ -1215,10 +964,7 @@
   ///     m() { F = rhs; }
   ///
   R visitTypedefTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg);
+      SendSet node, ConstantExpression constant, Node rhs, A arg);
 
   /// Read of the type literal for type variable [element].
   ///
@@ -1229,9 +975,7 @@
   ///     }
   ///
   R visitTypeVariableTypeLiteralGet(
-      Send node,
-      TypeVariableElement element,
-      A arg);
+      Send node, TypeVariableElement element, A arg);
 
   /// Invocation of the type literal for type variable [element] with
   /// [arguments].
@@ -1242,12 +986,8 @@
   ///       m() { T(null, 42); }
   ///     }
   ///
-  R visitTypeVariableTypeLiteralInvoke(
-      Send node,
-      TypeVariableElement element,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitTypeVariableTypeLiteralInvoke(Send node, TypeVariableElement element,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Assignment of [rhs] to the type literal for type variable [element].
   ///
@@ -1258,10 +998,7 @@
   ///     }
   ///
   R visitTypeVariableTypeLiteralSet(
-      SendSet node,
-      TypeVariableElement element,
-      Node rhs,
-      A arg);
+      SendSet node, TypeVariableElement element, Node rhs, A arg);
 
   /// Read of the type literal for `dynamic`.
   ///
@@ -1269,10 +1006,7 @@
   ///
   ///     m() => dynamic;
   ///
-  R visitDynamicTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg);
+  R visitDynamicTypeLiteralGet(Send node, ConstantExpression constant, A arg);
 
   /// Invocation of the type literal for `dynamic` with [arguments].
   ///
@@ -1280,12 +1014,8 @@
   ///
   ///     m() { dynamic(null, 42); }
   ///
-  R visitDynamicTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitDynamicTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Assignment of [rhs] to the type literal for `dynamic`.
   ///
@@ -1294,10 +1024,7 @@
   ///     m() { dynamic = rhs; }
   ///
   R visitDynamicTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg);
+      SendSet node, ConstantExpression constant, Node rhs, A arg);
 
   /// Binary expression `left operator right` where [operator] is a user
   /// definable operator. Binary expressions using operator `==` are handled
@@ -1310,11 +1037,7 @@
   ///     mul(a, b) => a * b;
   ///
   R visitBinary(
-      Send node,
-      Node left,
-      BinaryOperator operator,
-      Node right,
-      A arg);
+      Send node, Node left, BinaryOperator operator, Node right, A arg);
 
   /// Binary expression `super operator argument` where [operator] is a user
   /// definable operator implemented on a superclass by [function]. Binary
@@ -1329,12 +1052,8 @@
   ///       m(a) => super + a;
   ///     }
   ///
-  R visitSuperBinary(
-      Send node,
-      FunctionElement function,
-      BinaryOperator operator,
-      Node argument,
-      A arg);
+  R visitSuperBinary(Send node, FunctionElement function,
+      BinaryOperator operator, Node argument, A arg);
 
   /// Binary operation on the unresolved super [element].
   ///
@@ -1346,12 +1065,8 @@
   ///       m() => super + 42;
   ///     }
   ///
-  R visitUnresolvedSuperBinary(
-      Send node,
-      Element element,
-      BinaryOperator operator,
-      Node argument,
-      A arg);
+  R visitUnresolvedSuperBinary(Send node, Element element,
+      BinaryOperator operator, Node argument, A arg);
 
   /// Index expression `receiver[index]`.
   ///
@@ -1359,11 +1074,7 @@
   ///
   ///     lookup(a, b) => a[b];
   ///
-  R visitIndex(
-      Send node,
-      Node receiver,
-      Node index,
-      A arg);
+  R visitIndex(Send node, Node receiver, Node index, A arg);
 
   /// Prefix operation on an index expression `operator receiver[index]` where
   /// the operation is defined by [operator].
@@ -1373,11 +1084,7 @@
   ///     lookup(a, b) => --a[b];
   ///
   R visitIndexPrefix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg);
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg);
 
   /// Postfix operation on an index expression `receiver[index] operator` where
   /// the operation is defined by [operator].
@@ -1387,11 +1094,7 @@
   ///     lookup(a, b) => a[b]++;
   ///
   R visitIndexPostfix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg);
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg);
 
   /// Index expression `super[index]` where 'operator []' is implemented on a
   /// superclass by [function].
@@ -1405,11 +1108,7 @@
   ///       m(a) => super[a];
   ///     }
   ///
-  R visitSuperIndex(
-      Send node,
-      FunctionElement function,
-      Node index,
-      A arg);
+  R visitSuperIndex(Send node, FunctionElement function, Node index, A arg);
 
   /// Index expression `super[index]` where 'operator []' is unresolved.
   ///
@@ -1420,11 +1119,7 @@
   ///       m(a) => super[a];
   ///     }
   ///
-  R visitUnresolvedSuperIndex(
-      Send node,
-      Element element,
-      Node index,
-      A arg);
+  R visitUnresolvedSuperIndex(Send node, Element element, Node index, A arg);
 
   /// Prefix operation on an index expression `operator super[index]` where
   /// 'operator []' is implemented on a superclass by [indexFunction] and
@@ -1485,13 +1180,8 @@
   ///       m(a) => --super[a];
   ///     }
   ///
-  R visitUnresolvedSuperGetterIndexPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedSuperGetterIndexPrefix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg);
 
   /// Postfix operation on an index expression `super[index] operator` where
   /// 'operator []' is unresolved, 'operator []=' is defined by [setter], and
@@ -1506,13 +1196,8 @@
   ///       m(a) => super[a]++;
   ///     }
   ///
-  R visitUnresolvedSuperGetterIndexPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedSuperGetterIndexPostfix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg);
 
   /// Prefix operation on an index expression `operator super[index]` where
   /// 'operator []' is implemented on a superclass by [indexFunction] and
@@ -1570,11 +1255,7 @@
   ///     }
   ///
   R visitUnresolvedSuperIndexPrefix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg);
+      Send node, Element element, Node index, IncDecOperator operator, A arg);
 
   /// Postfix operation on an index expression `super[index] operator` where
   /// both 'operator []' and 'operator []=' are unresolved and the operation is
@@ -1590,11 +1271,7 @@
   ///     }
   ///
   R visitUnresolvedSuperIndexPostfix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg);
+      Send node, Element element, Node index, IncDecOperator operator, A arg);
 
   /// Binary expression `left == right`.
   ///
@@ -1602,11 +1279,7 @@
   ///
   ///     neq(a, b) => a != b;
   ///
-  R visitNotEquals(
-      Send node,
-      Node left,
-      Node right,
-      A arg);
+  R visitNotEquals(Send node, Node left, Node right, A arg);
 
   /// Binary expression `super != argument` where `==` is implemented on a
   /// superclass by [function].
@@ -1621,10 +1294,7 @@
   ///     }
   ///
   R visitSuperNotEquals(
-      Send node,
-      FunctionElement function,
-      Node argument,
-      A arg);
+      Send node, FunctionElement function, Node argument, A arg);
 
   /// Binary expression `left == right`.
   ///
@@ -1632,11 +1302,7 @@
   ///
   ///     eq(a, b) => a == b;
   ///
-  R visitEquals(
-      Send node,
-      Node left,
-      Node right,
-      A arg);
+  R visitEquals(Send node, Node left, Node right, A arg);
 
   /// Binary expression `super == argument` where `==` is implemented on a
   /// superclass by [function].
@@ -1650,11 +1316,7 @@
   ///       m(a) => super == a;
   ///     }
   ///
-  R visitSuperEquals(
-      Send node,
-      FunctionElement function,
-      Node argument,
-      A arg);
+  R visitSuperEquals(Send node, FunctionElement function, Node argument, A arg);
 
   /// Unary expression `operator expression` where [operator] is a user
   /// definable operator.
@@ -1664,11 +1326,7 @@
   ///     neg(a, b) => -a;
   ///     comp(a, b) => ~a;
   ///
-  R visitUnary(
-      Send node,
-      UnaryOperator operator,
-      Node expression,
-      A arg);
+  R visitUnary(Send node, UnaryOperator operator, Node expression, A arg);
 
   /// Unary expression `operator super` where [operator] is a user definable
   /// operator implemented on a superclass by [function].
@@ -1683,10 +1341,7 @@
   ///     }
   ///
   R visitSuperUnary(
-      Send node,
-      UnaryOperator operator,
-      FunctionElement function,
-      A arg);
+      Send node, UnaryOperator operator, FunctionElement function, A arg);
 
   /// Unary operation on the unresolved super [element].
   ///
@@ -1699,10 +1354,7 @@
   ///     }
   ///
   R visitUnresolvedSuperUnary(
-      Send node,
-      UnaryOperator operator,
-      Element element,
-      A arg);
+      Send node, UnaryOperator operator, Element element, A arg);
 
   /// Unary expression `!expression`.
   ///
@@ -1710,10 +1362,7 @@
   ///
   ///     not(a) => !a;
   ///
-  R visitNot(
-      Send node,
-      Node expression,
-      A arg);
+  R visitNot(Send node, Node expression, A arg);
 
   /// Index set expression `receiver[index] = rhs`.
   ///
@@ -1721,12 +1370,7 @@
   ///
   ///     m(receiver, index, rhs) => receiver[index] = rhs;
   ///
-  R visitIndexSet(
-      SendSet node,
-      Node receiver,
-      Node index,
-      Node rhs,
-      A arg);
+  R visitIndexSet(SendSet node, Node receiver, Node index, Node rhs, A arg);
 
   /// Index set expression `super[index] = rhs` where `operator []=` is defined
   /// on a superclass by [function].
@@ -1741,11 +1385,7 @@
   ///     }
   ///
   R visitSuperIndexSet(
-      SendSet node,
-      FunctionElement function,
-      Node index,
-      Node rhs,
-      A arg);
+      SendSet node, FunctionElement function, Node index, Node rhs, A arg);
 
   /// Index set expression `super[index] = rhs` where `operator []=` is
   /// undefined.
@@ -1759,11 +1399,7 @@
   ///     }
   ///
   R visitUnresolvedSuperIndexSet(
-      Send node,
-      Element element,
-      Node index,
-      Node rhs,
-      A arg);
+      Send node, Element element, Node index, Node rhs, A arg);
 
   /// If-null, ??, expression with operands [left] and [right].
   ///
@@ -1771,11 +1407,7 @@
   ///
   ///     m() => left ?? right;
   ///
-  R visitIfNull(
-      Send node,
-      Node left,
-      Node right,
-      A arg);
+  R visitIfNull(Send node, Node left, Node right, A arg);
 
   /// Logical and, &&, expression with operands [left] and [right].
   ///
@@ -1783,11 +1415,7 @@
   ///
   ///     m() => left && right;
   ///
-  R visitLogicalAnd(
-      Send node,
-      Node left,
-      Node right,
-      A arg);
+  R visitLogicalAnd(Send node, Node left, Node right, A arg);
 
   /// Logical or, ||, expression with operands [left] and [right].
   ///
@@ -1795,11 +1423,7 @@
   ///
   ///     m() => left || right;
   ///
-  R visitLogicalOr(
-      Send node,
-      Node left,
-      Node right,
-      A arg);
+  R visitLogicalOr(Send node, Node left, Node right, A arg);
 
   /// Is test of [expression] against [type].
   ///
@@ -1808,11 +1432,7 @@
   ///     class C {}
   ///     m() => expression is C;
   ///
-  R visitIs(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg);
+  R visitIs(Send node, Node expression, DartType type, A arg);
 
   /// Is not test of [expression] against [type].
   ///
@@ -1821,11 +1441,7 @@
   ///     class C {}
   ///     m() => expression is! C;
   ///
-  R visitIsNot(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg);
+  R visitIsNot(Send node, Node expression, DartType type, A arg);
 
   /// As cast of [expression] to [type].
   ///
@@ -1834,11 +1450,7 @@
   ///     class C {}
   ///     m() => expression as C;
   ///
-  R visitAs(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg);
+  R visitAs(Send node, Node expression, DartType type, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] of the property on
   /// [receiver] whose getter and setter are defined by [getterSelector] and
@@ -1848,13 +1460,8 @@
   ///
   ///     m(receiver, rhs) => receiver.foo += rhs;
   ///
-  R visitDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] of the property on
   /// a possibly null [receiver] whose getter and setter are defined by
@@ -1864,13 +1471,8 @@
   ///
   ///     m(receiver, rhs) => receiver?.foo += rhs;
   ///
-  R visitIfNotNullDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitIfNotNullDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] of the property on
   /// `this` whose getter and setter are defined by [getterSelector] and
@@ -1889,11 +1491,7 @@
   ///     }
   ///
   R visitThisPropertyCompound(
-      Send node,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+      Send node, Name name, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a [parameter].
   ///
@@ -1901,12 +1499,8 @@
   ///
   ///     m(parameter, rhs) => parameter += rhs;
   ///
-  R visitParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a final
   /// [parameter].
@@ -1915,12 +1509,8 @@
   ///
   ///     m(final parameter, rhs) => parameter += rhs;
   ///
-  R visitFinalParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitFinalParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a local
   /// [variable].
@@ -1932,12 +1522,8 @@
   ///       variable += rhs;
   ///     }
   ///
-  R visitLocalVariableCompound(
-      Send node,
-      LocalVariableElement variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a final local
   /// [variable].
@@ -1949,12 +1535,8 @@
   ///       variable += rhs;
   ///     }
   ///
-  R visitFinalLocalVariableCompound(
-      Send node,
-      LocalVariableElement variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitFinalLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a local
   /// [function].
@@ -1966,12 +1548,8 @@
   ///       function += rhs;
   ///     }
   ///
-  R visitLocalFunctionCompound(
-      Send node,
-      LocalFunctionElement function,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitLocalFunctionCompound(Send node, LocalFunctionElement function,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a static
   /// [field].
@@ -1983,12 +1561,8 @@
   ///       m(rhs) => field += rhs;
   ///     }
   ///
-  R visitStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a final static
   /// [field].
@@ -2000,12 +1574,8 @@
   ///       m(rhs) => field += rhs;
   ///     }
   ///
-  R visitFinalStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitFinalStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// static [getter] and writing to a static [setter].
@@ -2018,13 +1588,8 @@
   ///       m(rhs) => o += rhs;
   ///     }
   ///
-  R visitStaticGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitStaticGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// static [method], that is, closurizing [method], and writing to a static
@@ -2038,13 +1603,8 @@
   ///       m(rhs) => o += rhs;
   ///     }
   ///
-  R visitStaticMethodSetterCompound(
-      Send node,
-      MethodElement method,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitStaticMethodSetterCompound(Send node, MethodElement method,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a top level
   /// [field].
@@ -2054,12 +1614,8 @@
   ///     var field;
   ///     m(rhs) => field += rhs;
   ///
-  R visitTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a final top
   /// level [field].
@@ -2069,12 +1625,8 @@
   ///     final field = 0;
   ///     m(rhs) => field += rhs;
   ///
-  R visitFinalTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitFinalTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// top level [getter] and writing to a top level [setter].
@@ -2085,13 +1637,8 @@
   ///     set o(_) {}
   ///     m(rhs) => o += rhs;
   ///
-  R visitTopLevelGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitTopLevelGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// top level [method], that is, closurizing [method], and writing to a top
@@ -2103,13 +1650,8 @@
   ///     set o(_) {}
   ///     m(rhs) => o += rhs;
   ///
-  R visitTopLevelMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitTopLevelMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// top level [method], that is, closurizing [method], and writing to an
@@ -2120,12 +1662,8 @@
   ///     o() {}
   ///     m(rhs) => o += rhs;
   ///
-  R visitTopLevelMethodCompound(
-      Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitTopLevelMethodCompound(Send node, FunctionElement method,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a super
   /// [field].
@@ -2139,12 +1677,8 @@
   ///       m(rhs) => super.field += rhs;
   ///     }
   ///
-  R visitSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a final super
   /// [field].
@@ -2158,12 +1692,8 @@
   ///       m(rhs) => super.field += rhs;
   ///     }
   ///
-  R visitFinalSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitFinalSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the [name] property on
   /// [receiver]. That is, [rhs] is only evaluated and assigned, if the value
@@ -2174,11 +1704,7 @@
   ///     m(receiver, rhs) => receiver.foo ??= rhs;
   ///
   R visitDynamicPropertySetIfNull(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg);
+      Send node, Node receiver, Name name, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the [name] property on
   /// [receiver] if not null. That is, [rhs] is only evaluated and assigned,
@@ -2190,11 +1716,7 @@
   ///     m(receiver, rhs) => receiver?.foo ??= rhs;
   ///
   R visitIfNotNullDynamicPropertySetIfNull(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg);
+      Send node, Node receiver, Name name, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the [name] property on `this`.
   /// That is, [rhs] is only evaluated and assigned, if the value of [name] on
@@ -2212,11 +1734,7 @@
   ///       m(rhs) => foo ??= rhs;
   ///     }
   ///
-  R visitThisPropertySetIfNull(
-      Send node,
-      Name name,
-      Node rhs,
-      A arg);
+  R visitThisPropertySetIfNull(Send node, Name name, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to [parameter]. That is, [rhs] is
   /// only evaluated and assigned, if the value of the [parameter] is `null`.
@@ -2226,10 +1744,7 @@
   ///     m(parameter, rhs) => parameter ??= rhs;
   ///
   R visitParameterSetIfNull(
-      Send node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg);
+      Send node, ParameterElement parameter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the final [parameter]. That is,
   /// [rhs] is only evaluated and assigned, if the value of the [parameter] is
@@ -2240,10 +1755,7 @@
   ///     m(final parameter, rhs) => parameter ??= rhs;
   ///
   R visitFinalParameterSetIfNull(
-      Send node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg);
+      Send node, ParameterElement parameter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the local [variable]. That is,
   /// [rhs] is only evaluated and assigned, if the value of the [variable] is
@@ -2257,10 +1769,7 @@
   ///     }
   ///
   R visitLocalVariableSetIfNull(
-      Send node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg);
+      Send node, LocalVariableElement variable, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the final local [variable]. That
   /// is, [rhs] is only evaluated and assigned, if the value of the [variable]
@@ -2274,10 +1783,7 @@
   ///     }
   ///
   R visitFinalLocalVariableSetIfNull(
-      Send node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg);
+      Send node, LocalVariableElement variable, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the local [function]. That is,
   /// [rhs] is only evaluated and assigned, if the value of the [function] is
@@ -2291,10 +1797,7 @@
   ///     }
   ///
   R visitLocalFunctionSetIfNull(
-      Send node,
-      LocalFunctionElement function,
-      Node rhs,
-      A arg);
+      Send node, LocalFunctionElement function, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the static [field]. That is,
   /// [rhs] is only evaluated and assigned, if the value of the [field] is
@@ -2307,11 +1810,7 @@
   ///       m(rhs) => field ??= rhs;
   ///     }
   ///
-  R visitStaticFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R visitStaticFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the final static [field]. That
   /// is, [rhs] is only evaluated and assigned, if the value of the [field] is
@@ -2325,10 +1824,7 @@
   ///     }
   ///
   R visitFinalStaticFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+      Send node, FieldElement field, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the static property defined by
   /// [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
@@ -2342,12 +1838,8 @@
   ///       m(rhs) => o ??= rhs;
   ///     }
   ///
-  R visitStaticGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+  R visitStaticGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the static property defined by
   /// [method] and [setter]. That is, [rhs] is only evaluated and assigned to
@@ -2363,11 +1855,7 @@
   ///     }
   ///
   R visitStaticMethodSetterSetIfNull(
-      Send node,
-      MethodElement method,
-      MethodElement setter,
-      Node rhs,
-      A arg);
+      Send node, MethodElement method, MethodElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the static [method]. That is,
   /// [rhs] is only evaluated and assigned, if the value of the [method] is
@@ -2379,10 +1867,7 @@
   ///     m(rhs) => o ??= rhs;
   ///
   R visitStaticMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg);
+      Send node, FunctionElement method, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the top level [field]. That is,
   /// [rhs] is only evaluated and assigned, if the value of the [field] is
@@ -2393,11 +1878,7 @@
   ///     var field;
   ///     m(rhs) => field ??= rhs;
   ///
-  R visitTopLevelFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R visitTopLevelFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the final top level [field].
   /// That is, [rhs] is only evaluated and assigned, if the value of the [field]
@@ -2409,10 +1890,7 @@
   ///     m(rhs) => field ??= rhs;
   ///
   R visitFinalTopLevelFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+      Send node, FieldElement field, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the top level property defined
   /// by [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
@@ -2424,12 +1902,8 @@
   ///     set o(_) {}
   ///     m(rhs) => o ??= rhs;
   ///
-  R visitTopLevelGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+  R visitTopLevelGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the top level property defined
   /// by [method] and [setter]. That is, [rhs] is only evaluated and assigned to
@@ -2442,12 +1916,8 @@
   ///     set o(_) {}
   ///     m(rhs) => o ??= rhs;
   ///
-  R visitTopLevelMethodSetterSetIfNull(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+  R visitTopLevelMethodSetterSetIfNull(Send node, FunctionElement method,
+      FunctionElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the top level [method]. That is,
   /// [rhs] is only evaluated and assigned, if the value of the [method] is
@@ -2459,10 +1929,7 @@
   ///     m(rhs) => o ??= rhs;
   ///
   R visitTopLevelMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg);
+      Send node, FunctionElement method, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the super [field]. That is,
   /// [rhs] is only evaluated and assigned, if the value of the [field] is
@@ -2477,11 +1944,7 @@
   ///       m(rhs) => super.field ??= rhs;
   ///     }
   ///
-  R visitSuperFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R visitSuperFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the final super [field]. That
   /// is, [rhs] is only evaluated and assigned, if the value of the [field] is
@@ -2497,10 +1960,7 @@
   ///     }
   ///
   R visitFinalSuperFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+      Send node, FieldElement field, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the super property defined
   /// by [readField] and [writtenField]. That is, [rhs] is only evaluated and
@@ -2518,12 +1978,8 @@
   ///       m() => super.field ??= rhs;
   ///     }
   ///
-  R visitSuperFieldFieldSetIfNull(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      Node rhs,
-      A arg);
+  R visitSuperFieldFieldSetIfNull(Send node, FieldElement readField,
+      FieldElement writtenField, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the super property defined
   /// by [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
@@ -2539,12 +1995,8 @@
   ///       m(rhs) => super.o ??= rhs;
   ///     }
   ///
-  R visitSuperGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+  R visitSuperGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the super property defined
   /// by [method] and [setter]. That is, [rhs] is only evaluated and assigned to
@@ -2561,12 +2013,8 @@
   ///       m(rhs) => super.o ??= rhs;
   ///     }
   ///
-  R visitSuperMethodSetterSetIfNull(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+  R visitSuperMethodSetterSetIfNull(Send node, FunctionElement method,
+      FunctionElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the super [method].
   /// That is, [rhs] is only evaluated and assigned, if the value of
@@ -2583,10 +2031,7 @@
   ///     }
   ///
   R visitSuperMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg);
+      Send node, FunctionElement method, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the super property defined
   /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
@@ -2603,11 +2048,7 @@
   ///     }
   ///
   R visitUnresolvedSuperGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg);
+      Send node, Element element, MethodElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the super property defined
   /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
@@ -2624,11 +2065,7 @@
   ///     }
   ///
   R visitUnresolvedSuperSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg);
+      Send node, MethodElement getter, Element element, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the top level property defined
   /// by [field] and [setter]. That is, [rhs] is only evaluated and assigned to
@@ -2647,11 +2084,7 @@
   ///     }
   ///
   R visitSuperFieldSetterSetIfNull(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+      Send node, FieldElement field, FunctionElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the top level property defined
   /// by [getter] and [field]. That is, [rhs] is only evaluated and assigned to
@@ -2670,11 +2103,7 @@
   ///     }
   ///
   R visitSuperGetterFieldSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      Node rhs,
-      A arg);
+      Send node, FunctionElement getter, FieldElement field, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to an unresolved super property.
   /// That is, [rhs] is only evaluated and assigned, if the value of the
@@ -2689,11 +2118,7 @@
   ///       m(rhs) => super.unresolved ??= rhs;
   ///     }
   ///
-  R visitUnresolvedSuperSetIfNull(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg);
+  R visitUnresolvedSuperSetIfNull(Send node, Element element, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the static property defined
   /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
@@ -2709,11 +2134,7 @@
   ///     m1() => C.foo ??= 42;
   ///
   R visitUnresolvedStaticGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg);
+      Send node, Element element, MethodElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the top level property defined
   /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
@@ -2726,11 +2147,7 @@
   ///     m1() => foo ??= 42;
   ///
   R visitUnresolvedTopLevelGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg);
+      Send node, Element element, MethodElement setter, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the static property defined
   /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
@@ -2745,11 +2162,7 @@
   ///     m1() => C.foo ??= 42;
   ///
   R visitUnresolvedStaticSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg);
+      Send node, MethodElement getter, Element element, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the top level property defined
   /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
@@ -2762,11 +2175,7 @@
   ///     m1() => foo ??= 42;
   ///
   R visitUnresolvedTopLevelSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg);
+      Send node, MethodElement getter, Element element, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to an unresolved property.
   /// That is, [rhs] is only evaluated and assigned, if the value of the
@@ -2780,11 +2189,7 @@
   ///     m2() => C.unresolved ??= 42;
   ///
   // TODO(johnniwinther): Split the cases in which a prefix is resolved.
-  R visitUnresolvedSetIfNull(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg);
+  R visitUnresolvedSetIfNull(Send node, Element element, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to an invalid expression.
   ///
@@ -2794,11 +2199,7 @@
   ///
   ///     m() => p ??= 42;
   ///
-  R errorInvalidSetIfNull(
-      Send node,
-      ErroneousElement error,
-      Node rhs,
-      A arg);
+  R errorInvalidSetIfNull(Send node, ErroneousElement error, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the class type literal
   /// [contant]. That is, [rhs] is only evaluated and assigned, if the value
@@ -2811,10 +2212,7 @@
   ///     m(rhs) => C ??= rhs;
   ///
   R visitClassTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg);
+      Send node, ConstantExpression constant, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the typedef type literal
   /// [constant]. That is, [rhs] is only evaluated and assigned, if the value
@@ -2827,10 +2225,7 @@
   ///     m(rhs) => F ??= rhs;
   ///
   R visitTypedefTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg);
+      Send node, ConstantExpression constant, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the type literal for the type
   /// variable [element]. That is, [rhs] is only evaluated and assigned, if
@@ -2844,10 +2239,7 @@
   ///     }
   ///
   R visitTypeVariableTypeLiteralSetIfNull(
-      Send node,
-      TypeVariableElement element,
-      Node rhs,
-      A arg);
+      Send node, TypeVariableElement element, Node rhs, A arg);
 
   /// If-null assignment expression of [rhs] to the dynamic type literal
   /// [constant]. That is, [rhs] is only evaluated and assigned, if the value
@@ -2859,10 +2251,7 @@
   ///     m(rhs) => dynamic ??= rhs;
   ///
   R visitDynamicTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg);
+      Send node, ConstantExpression constant, Node rhs, A arg);
 
   /// Prefix expression with [operator] on a final super [field].
   ///
@@ -2876,10 +2265,7 @@
   ///     }
   ///
   R visitFinalSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on an unresolved super property.
   ///
@@ -2892,10 +2278,7 @@
   ///     }
   ///
   R visitUnresolvedSuperPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+      Send node, Element element, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on an unresolved super property.
   ///
@@ -2908,10 +2291,7 @@
   ///     }
   ///
   R visitUnresolvedSuperPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+      Send node, Element element, IncDecOperator operator, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on an unresolved
   /// super property.
@@ -2925,11 +2305,7 @@
   ///     }
   ///
   R visitUnresolvedSuperCompound(
-      Send node,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+      Send node, Element element, AssignmentOperator operator, Node rhs, A arg);
 
   /// Postfix expression with [operator] on a final super [field].
   ///
@@ -2943,10 +2319,7 @@
   ///     }
   ///
   R visitFinalSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from the
   /// super field [readField] and writing to the different super field
@@ -2964,13 +2337,8 @@
   ///       m() => super.field += rhs;
   ///     }
   ///
-  R visitSuperFieldFieldCompound(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitSuperFieldFieldCompound(Send node, FieldElement readField,
+      FieldElement writtenField, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// super [getter] and writing to a super [setter].
@@ -2985,13 +2353,8 @@
   ///       m(rhs) => super.o += rhs;
   ///     }
   ///
-  R visitSuperGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitSuperGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// super [method], that is, closurizing [method], and writing to a super
@@ -3007,13 +2370,8 @@
   ///       m(rhs) => super.o += rhs;
   ///     }
   ///
-  R visitSuperMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitSuperMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading the
   /// closurized super [method] and trying to invoke the non-existing setter.
@@ -3027,12 +2385,8 @@
   ///       m(rhs) => super.o += rhs;
   ///     }
   ///
-  R visitSuperMethodCompound(
-      Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitSuperMethodCompound(Send node, FunctionElement method,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from the
   /// non-existing super getter and writing to a super [setter].
@@ -3046,13 +2400,8 @@
   ///       m(rhs) => super.o += rhs;
   ///     }
   ///
-  R visitUnresolvedSuperGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitUnresolvedSuperGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// super [getter] and writing to the non-existing super setter.
@@ -3066,13 +2415,8 @@
   ///       m(rhs) => super.o += rhs;
   ///     }
   ///
-  R visitUnresolvedSuperSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitUnresolvedSuperSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// super [field] and writing to a super [setter].
@@ -3089,13 +2433,8 @@
   ///       m(rhs) => super.o += rhs;
   ///     }
   ///
-  R visitSuperFieldSetterCompound(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitSuperFieldSetterCompound(Send node, FieldElement field,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] reading from a
   /// super [getter] and writing to a super [field].
@@ -3112,13 +2451,8 @@
   ///       m(rhs) => super.o += rhs;
   ///     }
   ///
-  R visitSuperGetterFieldCompound(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitSuperGetterFieldCompound(Send node, FunctionElement getter,
+      FieldElement field, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a type literal
   /// for class [element].
@@ -3128,12 +2462,8 @@
   ///     class C {}
   ///     m(rhs) => C += rhs;
   ///
-  R visitClassTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitClassTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a type literal
   /// for typedef [element].
@@ -3143,12 +2473,8 @@
   ///     typedef F();
   ///     m(rhs) => F += rhs;
   ///
-  R visitTypedefTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitTypedefTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a type literal
   /// for type variable [element].
@@ -3159,12 +2485,8 @@
   ///       m(rhs) => T += rhs;
   ///     }
   ///
-  R visitTypeVariableTypeLiteralCompound(
-      Send node,
-      TypeVariableElement element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitTypeVariableTypeLiteralCompound(Send node, TypeVariableElement element,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on the type
   /// literal for `dynamic`.
@@ -3173,28 +2495,18 @@
   ///
   ///     m(rhs) => dynamic += rhs;
   ///
-  R visitDynamicTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitDynamicTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound index assignment of [rhs] with [operator] to [index] on the
-  /// index operators of [receiver] whose getter and setter are defined by
-  /// [getterSelector] and [setterSelector], respectively.
+  /// index operators of [receiver].
   ///
   /// For instance:
   ///
   ///     m(receiver, index, rhs) => receiver[index] += rhs;
   ///
-  R visitCompoundIndexSet(
-      SendSet node,
-      Node receiver,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitCompoundIndexSet(SendSet node, Node receiver, Node index,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound index assignment of [rhs] with [operator] to [index] on the index
   /// operators of a super class defined by [getter] and [setter].
@@ -3219,8 +2531,8 @@
       A arg);
 
   /// Compound index assignment of [rhs] with [operator] to [index] on a super
-  /// super class where the index getter is undefined and the index setter is
-  /// defined by [setter].
+  /// class where the index getter is undefined and the index setter is defined
+  /// by [setter].
   ///
   /// For instance:
   ///
@@ -3240,8 +2552,8 @@
       A arg);
 
   /// Compound index assignment of [rhs] with [operator] to [index] on a super
-  /// super class where the index getter is defined by [getter] but the index
-  /// setter is undefined.
+  /// class where the index getter is defined by [getter] but the index setter
+  /// is undefined.
   ///
   /// For instance:
   ///
@@ -3262,7 +2574,7 @@
       A arg);
 
   /// Compound index assignment of [rhs] with [operator] to [index] on a super
-  /// super class where the index getter and setter are undefined.
+  /// class where the index getter and setter are undefined.
   ///
   /// For instance:
   ///
@@ -3272,13 +2584,78 @@
   ///       m() => super[1] += 42;
   ///     }
   ///
-  R visitUnresolvedSuperCompoundIndexSet(
-      Send node,
-      Element element,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitUnresolvedSuperCompoundIndexSet(Send node, Element element, Node index,
+      AssignmentOperator operator, Node rhs, A arg);
+
+  /// If-null assignment expression of [rhs] to [index] on the index operators
+  /// of [receiver].
+  ///
+  /// For instance:
+  ///
+  ///     m(receiver, index, rhs) => receiver[index] ??= rhs;
+  ///
+  R visitIndexSetIfNull(
+      SendSet node, Node receiver, Node index, Node rhs, A arg);
+
+  /// If-null assignment expression of [rhs] to [index] on the index operators
+  /// of a super class defined by [getter] and [setter].
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       operator [](index) {}
+  ///       operator [](index, value) {}
+  ///     }
+  ///     class C extends B {
+  ///       m(index, rhs) => super[index] ??= rhs;
+  ///     }
+  ///
+  R visitSuperIndexSetIfNull(SendSet node, MethodElement getter,
+      MethodElement setter, Node index, Node rhs, A arg);
+
+  /// If-null assignment expression of [rhs] to [index] on a super class where
+  /// the index getter is undefined and the index setter is defined by [setter].
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       operator [](index, value) {}
+  ///     }
+  ///     class C extends B {
+  ///       m() => super[1] ??= 42;
+  ///     }
+  ///
+  R visitUnresolvedSuperGetterIndexSetIfNull(Send node, Element element,
+      MethodElement setter, Node index, Node rhs, A arg);
+
+  /// If-null assignment expression of [rhs] to [index] on a super class where
+  /// the index getter is defined by [getter] but the index setter is undefined.
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       operator [](index) => 42;
+  ///     }
+  ///     class C extends B {
+  ///       m() => super[1] ??= 42;
+  ///     }
+  ///
+  R visitUnresolvedSuperSetterIndexSetIfNull(Send node, MethodElement getter,
+      Element element, Node index, Node rhs, A arg);
+
+  /// If-null assignment expression of [rhs] to [index] on a super class where
+  /// the index getter and setter are undefined.
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///     }
+  ///     class C extends B {
+  ///       m() => super[1] ??= 42;
+  ///     }
+  ///
+  R visitUnresolvedSuperIndexSetIfNull(
+      Send node, Element element, Node index, Node rhs, A arg);
 
   /// Prefix expression with [operator] of the property on [receiver] whose
   /// getter and setter are defined by [getterSelector] and [setterSelector],
@@ -3289,11 +2666,7 @@
   ///     m(receiver) => ++receiver.foo;
   ///
   R visitDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] of the property on a possibly null
   /// [receiver] whose getter and setter are defined by [getterSelector] and
@@ -3304,11 +2677,7 @@
   ///     m(receiver) => ++receiver?.foo;
   ///
   R visitIfNotNullDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a [parameter].
   ///
@@ -3317,10 +2686,7 @@
   ///     m(parameter) => ++parameter;
   ///
   R visitParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg);
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a final [parameter].
   ///
@@ -3329,10 +2695,7 @@
   ///     m(final parameter) => ++parameter;
   ///
   R visitFinalParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg);
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a local [variable].
   ///
@@ -3344,10 +2707,7 @@
   ///     }
   ///
   R visitLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg);
+      Send node, LocalVariableElement variable, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a final local [variable].
   ///
@@ -3359,10 +2719,7 @@
   ///     }
   ///
   R visitFinalLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg);
+      Send node, LocalVariableElement variable, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a local [function].
   ///
@@ -3374,11 +2731,7 @@
   ///     }
   ///
   R visitLocalFunctionPrefix(
-      Send node,
-      LocalFunctionElement function,
-      IncDecOperator operator,
-      A arg);
-
+      Send node, LocalFunctionElement function, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] of the property on `this` whose getter
   /// and setter are defined by [getterSelector] and [setterSelector],
@@ -3397,10 +2750,7 @@
   ///     }
   ///
   R visitThisPropertyPrefix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg);
+      Send node, Name name, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a static [field].
   ///
@@ -3412,10 +2762,7 @@
   ///     }
   ///
   R visitStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a final static [field].
   ///
@@ -3427,10 +2774,7 @@
   ///     }
   ///
   R visitFinalStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a static [getter] and
   /// writing to a static [setter].
@@ -3443,13 +2787,8 @@
   ///       m() => ++o;
   ///     }
   ///
-  R visitStaticGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
-
+  R visitStaticGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a static [method], that is,
   /// closurizing [method], and writing to a static [setter].
@@ -3462,12 +2801,8 @@
   ///       m() => ++o;
   ///     }
   ///
-  R visitStaticMethodSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitStaticMethodSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a top level [field].
   ///
@@ -3477,10 +2812,7 @@
   ///     m() => ++field;
   ///
   R visitTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a final top level [field].
   ///
@@ -3490,10 +2822,7 @@
   ///     m() => ++field;
   ///
   R visitFinalTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a top level [getter] and
   /// writing to a top level [setter].
@@ -3504,12 +2833,8 @@
   ///     set o(_) {}
   ///     m() => ++o;
   ///
-  R visitTopLevelGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitTopLevelGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a top level [method], that
   /// is, closurizing [method], and writing to a top level [setter].
@@ -3520,12 +2845,8 @@
   ///     set o(_) {}
   ///     m() => ++o;
   ///
-  R visitTopLevelMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitTopLevelMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a super [field].
   ///
@@ -3539,10 +2860,7 @@
   ///     }
   ///
   R visitSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from the super field [readField]
   /// and writing to the different super field [writtenField].
@@ -3559,12 +2877,8 @@
   ///       m() => ++super.field;
   ///     }
   ///
-  R visitSuperFieldFieldPrefix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg);
+  R visitSuperFieldFieldPrefix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a super [field] and writing
   /// to a super [setter].
@@ -3581,13 +2895,8 @@
   ///       m() => ++super.field;
   ///     }
   ///
-  R visitSuperFieldSetterPrefix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
-
+  R visitSuperFieldSetterPrefix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a super [getter] and
   /// writing to a super [setter].
@@ -3602,12 +2911,8 @@
   ///       m() => ++super.field;
   ///     }
   ///
-  R visitSuperGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitSuperGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a super [getter] and
   /// writing to a super [field].
@@ -3624,12 +2929,8 @@
   ///       m() => ++super.field;
   ///     }
   ///
-  R visitSuperGetterFieldPrefix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+  R visitSuperGetterFieldPrefix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a super [method], that is,
   /// closurizing [method], and writing to a super [setter].
@@ -3644,12 +2945,8 @@
   ///       m() => ++super.o;
   ///     }
   ///
-  R visitSuperMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitSuperMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a super [method], that is,
   /// closurizing [method], and writing to an unresolved super setter.
@@ -3665,10 +2962,7 @@
   ///     }
   ///
   R visitSuperMethodPrefix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg);
+      Send node, FunctionElement method, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from an unresolved super getter
   /// and writing to a super [setter].
@@ -3683,12 +2977,8 @@
   ///     }
   ///
   ///
-  R visitUnresolvedSuperGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedSuperGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a super [getter] and
   /// writing to an unresolved super setter.
@@ -3703,12 +2993,8 @@
   ///     }
   ///
   ///
-  R visitUnresolvedSuperSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedSuperSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a type literal for a class [element].
   ///
@@ -3718,10 +3004,7 @@
   ///     m() => ++C;
   ///
   R visitClassTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a type literal for a typedef
   /// [element].
@@ -3732,10 +3015,7 @@
   ///     m() => ++F;
   ///
   R visitTypedefTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on a type literal for a type variable
   /// [element].
@@ -3747,10 +3027,7 @@
   ///     }
   ///
   R visitTypeVariableTypeLiteralPrefix(
-      Send node,
-      TypeVariableElement element,
-      IncDecOperator operator,
-      A arg);
+      Send node, TypeVariableElement element, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] on the type literal for `dynamic`.
   ///
@@ -3759,10 +3036,7 @@
   ///     m() => ++dynamic;
   ///
   R visitDynamicTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] of the property on [receiver] whose
   /// getter and setter are defined by [getterSelector] and [setterSelector],
@@ -3773,11 +3047,7 @@
   ///     m(receiver) => receiver.foo++;
   ///
   R visitDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] of the property on a possibly null
   /// [receiver] whose getter and setter are defined by [getterSelector] and
@@ -3788,11 +3058,7 @@
   ///     m(receiver) => receiver?.foo++;
   ///
   R visitIfNotNullDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a [parameter].
   ///
@@ -3801,10 +3067,7 @@
   ///     m(parameter) => parameter++;
   ///
   R visitParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg);
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a final [parameter].
   ///
@@ -3813,10 +3076,7 @@
   ///     m(final parameter) => parameter++;
   ///
   R visitFinalParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg);
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a local [variable].
   ///
@@ -3828,10 +3088,7 @@
   ///     }
   ///
   R visitLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg);
+      Send node, LocalVariableElement variable, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a final local [variable].
   ///
@@ -3843,10 +3100,7 @@
   ///     }
   ///
   R visitFinalLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg);
+      Send node, LocalVariableElement variable, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a local [function].
   ///
@@ -3858,11 +3112,7 @@
   ///     }
   ///
   R visitLocalFunctionPostfix(
-      Send node,
-      LocalFunctionElement function,
-      IncDecOperator operator,
-      A arg);
-
+      Send node, LocalFunctionElement function, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] of the property on `this` whose getter
   /// and setter are defined by [getterSelector] and [setterSelector],
@@ -3881,10 +3131,7 @@
   ///     }
   ///
   R visitThisPropertyPostfix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg);
+      Send node, Name name, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a static [field].
   ///
@@ -3896,10 +3143,7 @@
   ///     }
   ///
   R visitStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a final static [field].
   ///
@@ -3911,10 +3155,7 @@
   ///     }
   ///
   R visitFinalStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a static [getter] and
   /// writing to a static [setter].
@@ -3927,13 +3168,8 @@
   ///       m() => o++;
   ///     }
   ///
-  R visitStaticGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
-
+  R visitStaticGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a static [method], that
   /// is, closurizing [method], and writing to a static [setter].
@@ -3946,12 +3182,8 @@
   ///       m() => o++;
   ///     }
   ///
-  R visitStaticMethodSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitStaticMethodSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a top level [field].
   ///
@@ -3961,10 +3193,7 @@
   ///     m() => field++;
   ///
   R visitTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a final top level [field].
   ///
@@ -3974,10 +3203,7 @@
   ///     m() => field++;
   ///
   R visitFinalTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a top level [getter] and
   /// writing to a top level [setter].
@@ -3988,12 +3214,8 @@
   ///     set o(_) {}
   ///     m() => o++;
   ///
-  R visitTopLevelGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitTopLevelGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a top level [method], that
   /// is, closurizing [method], and writing to a top level [setter].
@@ -4004,12 +3226,8 @@
   ///     set o(_) {}
   ///     m() => o++;
   ///
-  R visitTopLevelMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitTopLevelMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a super [field].
   ///
@@ -4023,10 +3241,7 @@
   ///     }
   ///
   R visitSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+      Send node, FieldElement field, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from the super field
   /// [readField] and writing to the different super field [writtenField].
@@ -4043,12 +3258,8 @@
   ///       m() => super.field++;
   ///     }
   ///
-  R visitSuperFieldFieldPostfix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg);
+  R visitSuperFieldFieldPostfix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a super [field] and
   /// writing to a super [setter].
@@ -4065,13 +3276,8 @@
   ///       m() => super.field++;
   ///     }
   ///
-  R visitSuperFieldSetterPostfix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
-
+  R visitSuperFieldSetterPostfix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a super [getter] and
   /// writing to a super [setter].
@@ -4086,12 +3292,8 @@
   ///       m() => super.field++;
   ///     }
   ///
-  R visitSuperGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitSuperGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a super [getter] and
   /// writing to a super [field].
@@ -4108,12 +3310,8 @@
   ///       m() => super.field++;
   ///     }
   ///
-  R visitSuperGetterFieldPostfix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg);
+  R visitSuperGetterFieldPostfix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a super [method], that is,
   /// closurizing [method], and writing to a super [setter].
@@ -4128,12 +3326,8 @@
   ///       m() => super.o++;
   ///     }
   ///
-  R visitSuperMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitSuperMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] reading from a super [method], that is,
   /// closurizing [method], and writing to an unresolved super.
@@ -4149,10 +3343,7 @@
   ///     }
   ///
   R visitSuperMethodPostfix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg);
+      Send node, FunctionElement method, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from an unresolved super getter
   /// and writing to a super [setter].
@@ -4167,12 +3358,8 @@
   ///     }
   ///
   ///
-  R visitUnresolvedSuperGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedSuperGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg);
 
   /// Prefix expression with [operator] reading from a super [getter] and
   /// writing to an unresolved super setter.
@@ -4187,12 +3374,8 @@
   ///     }
   ///
   ///
-  R visitUnresolvedSuperSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedSuperSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a type literal for a class
   /// [element].
@@ -4203,10 +3386,7 @@
   ///     m() => C++;
   ///
   R visitClassTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a type literal for a typedef
   /// [element].
@@ -4217,10 +3397,7 @@
   ///     m() => F++;
   ///
   R visitTypedefTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on a type literal for a type variable
   /// [element].
@@ -4232,10 +3409,7 @@
   ///     }
   ///
   R visitTypeVariableTypeLiteralPostfix(
-      Send node,
-      TypeVariableElement element,
-      IncDecOperator operator,
-      A arg);
+      Send node, TypeVariableElement element, IncDecOperator operator, A arg);
 
   /// Postfix expression with [operator] on the type literal for `dynamic`.
   ///
@@ -4244,10 +3418,7 @@
   ///     m() => dynamic++;
   ///
   R visitDynamicTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg);
 
   /// Read of the [constant].
   ///
@@ -4256,10 +3427,7 @@
   ///     const c = c;
   ///     m() => c;
   ///
-  R visitConstantGet(
-      Send node,
-      ConstantExpression constant,
-      A arg);
+  R visitConstantGet(Send node, ConstantExpression constant, A arg);
 
   /// Invocation of the [constant] with [arguments].
   ///
@@ -4268,12 +3436,8 @@
   ///     const c = null;
   ///     m() => c(null, 42);
   ///
-  R visitConstantInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitConstantInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// Read of the unresolved [element].
   ///
@@ -4293,10 +3457,7 @@
   ///     m11() => unresolved?.Foo?.bar;
   ///
   // TODO(johnniwinther): Split the cases in which a prefix is resolved.
-  R visitUnresolvedGet(
-      Send node,
-      Element element,
-      A arg);
+  R visitUnresolvedGet(Send node, Element element, A arg);
 
   /// Read of the unresolved super [element].
   ///
@@ -4307,10 +3468,7 @@
   ///       m() => super.foo;
   ///     }
   ///
-  R visitUnresolvedSuperGet(
-      Send node,
-      Element element,
-      A arg);
+  R visitUnresolvedSuperGet(Send node, Element element, A arg);
 
   /// Assignment of [rhs] to the unresolved [element].
   ///
@@ -4330,11 +3488,7 @@
   ///     m11() => unresolved?.Foo?.bar = 42;
   ///
   // TODO(johnniwinther): Split the cases in which a prefix is resolved.
-  R visitUnresolvedSet(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg);
+  R visitUnresolvedSet(Send node, Element element, Node rhs, A arg);
 
   ///  Assignment of [rhs] to the unresolved super [element].
   ///
@@ -4345,11 +3499,7 @@
   ///       m() => super.foo = 42;
   ///     }
   ///
-  R visitUnresolvedSuperSet(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg);
+  R visitUnresolvedSuperSet(Send node, Element element, Node rhs, A arg);
 
   /// Invocation of the unresolved [element] with [arguments].
   ///
@@ -4370,11 +3520,7 @@
   ///
   // TODO(johnniwinther): Split the cases in which a prefix is resolved.
   R visitUnresolvedInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+      Send node, Element element, NodeList arguments, Selector selector, A arg);
 
   /// Invocation of the unresolved super [element] with [arguments].
   ///
@@ -4386,11 +3532,7 @@
   ///     }
   ///
   R visitUnresolvedSuperInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+      Send node, Element element, NodeList arguments, Selector selector, A arg);
 
   /// Compound assignment of [rhs] with [operator] reading from the
   /// non-existing static getter and writing to the static [setter].
@@ -4402,13 +3544,8 @@
   ///     }
   ///     m1() => C.foo += 42;
   ///
-  R visitUnresolvedStaticGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitUnresolvedStaticGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment of [rhs] with [operator] reading from the
   /// non-existing top level getter and writing to the top level [setter].
@@ -4418,13 +3555,8 @@
   ///     set foo(_) {}
   ///     m1() => foo += 42;
   ///
-  R visitUnresolvedTopLevelGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitUnresolvedTopLevelGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment of [rhs] with [operator] reading from the static
   /// [getter] and writing to the non-existing static setter.
@@ -4436,13 +3568,8 @@
   ///     }
   ///     m1() => C.foo += 42;
   ///
-  R visitUnresolvedStaticSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitUnresolvedStaticSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment of [rhs] with [operator] reading from the top level
   /// [getter] and writing to the non-existing top level setter.
@@ -4452,13 +3579,8 @@
   ///     get foo => 42;
   ///     m1() => foo += 42;
   ///
-  R visitUnresolvedTopLevelSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitUnresolvedTopLevelSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment of [rhs] with [operator] reading the closurized static
   /// [method] and trying to invoke the non-existing setter.
@@ -4470,12 +3592,8 @@
   ///     }
   ///     m1() => C.foo += 42;
   ///
-  R visitStaticMethodCompound(
-      Send node,
-      MethodElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R visitStaticMethodCompound(Send node, MethodElement method,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Compound assignment of [rhs] where both getter and setter are unresolved.
   ///
@@ -4496,11 +3614,7 @@
   ///
   // TODO(johnniwinther): Split the cases in which a prefix is resolved.
   R visitUnresolvedCompound(
-      Send node,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+      Send node, Element element, AssignmentOperator operator, Node rhs, A arg);
 
   /// Prefix operation of [operator] reading from the non-existing static getter
   /// and writing to the static [setter].
@@ -4512,12 +3626,8 @@
   ///     }
   ///     m1() => ++C.foo;
   ///
-  R visitUnresolvedStaticGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedStaticGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg);
 
   /// Prefix operation of [operator] reading from the non-existing top level
   /// getter and writing to the top level [setter].
@@ -4527,12 +3637,8 @@
   ///     set foo(_) {}
   ///     m1() => ++foo;
   ///
-  R visitUnresolvedTopLevelGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedTopLevelGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg);
 
   /// Prefix operation of [operator] reading from the static [getter] and
   /// writing to the non-existing static setter.
@@ -4544,12 +3650,8 @@
   ///     }
   ///     m1() => ++C.foo;
   ///
-  R visitUnresolvedStaticSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedStaticSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg);
 
   /// Postfix operation of [operator] reading from the top level [getter] and
   /// writing to the non-existing top level setter.
@@ -4559,12 +3661,8 @@
   ///     get foo => 42;
   ///     m1() => ++foo;
   ///
-  R visitUnresolvedTopLevelSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedTopLevelSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg);
 
   /// Prefix operation of [operator] reading the closurized static [method] and
   /// trying to invoke the non-existing setter.
@@ -4577,10 +3675,7 @@
   ///     m1() => ++C.foo;
   ///
   R visitStaticMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg);
+      Send node, MethodElement method, IncDecOperator operator, A arg);
 
   /// Prefix operation of [operator] reading the closurized top level [method]
   /// and trying to invoke the non-existing setter.
@@ -4593,10 +3688,7 @@
   ///     m1() => ++C.foo;
   ///
   R visitTopLevelMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg);
+      Send node, MethodElement method, IncDecOperator operator, A arg);
 
   /// Prefix operation where both getter and setter are unresolved.
   ///
@@ -4617,10 +3709,7 @@
   ///
   // TODO(johnniwinther): Split the cases in which a prefix is resolved.
   R visitUnresolvedPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+      Send node, Element element, IncDecOperator operator, A arg);
 
   /// Postfix operation of [operator] reading from the non-existing static
   /// getter and writing to the static [setter].
@@ -4632,12 +3721,8 @@
   ///     }
   ///     m1() => C.foo++;
   ///
-  R visitUnresolvedStaticGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedStaticGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg);
 
   /// Postfix operation of [operator] reading from the non-existing top level
   /// getter and writing to the top level [setter].
@@ -4647,12 +3732,8 @@
   ///     set foo(_) {}
   ///     m1() => foo++;
   ///
-  R visitUnresolvedTopLevelGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedTopLevelGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg);
 
   /// Postfix operation of [operator] reading from the static [getter] and
   /// writing to the non-existing static setter.
@@ -4664,12 +3745,8 @@
   ///     }
   ///     m1() => C.foo++;
   ///
-  R visitUnresolvedStaticSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedStaticSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg);
 
   /// Postfix operation of [operator] reading from the top level [getter] and
   /// writing to the non-existing top level setter.
@@ -4679,12 +3756,8 @@
   ///     get foo => 42;
   ///     m1() => foo++;
   ///
-  R visitUnresolvedTopLevelSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+  R visitUnresolvedTopLevelSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg);
 
   /// Postfix operation of [operator] reading the closurized static [method] and
   /// trying to invoke the non-existing setter.
@@ -4697,10 +3770,7 @@
   ///     m1() => C.foo++;
   ///
   R visitStaticMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg);
+      Send node, MethodElement method, IncDecOperator operator, A arg);
 
   /// Postfix operation of [operator] reading the closurized top level [method]
   /// and trying to invoke the non-existing setter.
@@ -4713,10 +3783,7 @@
   ///     m1() => C.foo++;
   ///
   R visitTopLevelMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg);
+      Send node, MethodElement method, IncDecOperator operator, A arg);
 
   /// Postfix operation where both getter and setter are unresolved.
   ///
@@ -4737,26 +3804,16 @@
   ///
   // TODO(johnniwinther): Split the cases in which a prefix is resolved.
   R visitUnresolvedPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg);
+      Send node, Element element, IncDecOperator operator, A arg);
 
   /// Invocation of an undefined unary [operator] on [expression].
   R errorUndefinedUnaryExpression(
-      Send node,
-      Operator operator,
-      Node expression,
-      A arg);
+      Send node, Operator operator, Node expression, A arg);
 
   /// Invocation of an undefined unary [operator] with operands
   /// [left] and [right].
   R errorUndefinedBinaryExpression(
-      Send node,
-      Node left,
-      Operator operator,
-      Node right,
-      A arg);
+      Send node, Node left, Operator operator, Node right, A arg);
 
   /// Const invocation of a [constant] constructor.
   ///
@@ -4768,9 +3825,7 @@
   ///     m() => const C<int>(true, 42);
   ///
   R visitConstConstructorInvoke(
-      NewExpression node,
-      ConstructedConstantExpression constant,
-      A arg);
+      NewExpression node, ConstructedConstantExpression constant, A arg);
 
   /// Const invocation of the `bool.fromEnvironment` constructor.
   ///
@@ -4778,10 +3833,8 @@
   ///
   ///     m() => const bool.fromEnvironment('foo', defaultValue: false);
   ///
-  R visitBoolFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      BoolFromEnvironmentConstantExpression constant,
-      A arg);
+  R visitBoolFromEnvironmentConstructorInvoke(NewExpression node,
+      BoolFromEnvironmentConstantExpression constant, A arg);
 
   /// Const invocation of the `int.fromEnvironment` constructor.
   ///
@@ -4790,9 +3843,7 @@
   ///     m() => const int.fromEnvironment('foo', defaultValue: 42);
   ///
   R visitIntFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      IntFromEnvironmentConstantExpression constant,
-      A arg);
+      NewExpression node, IntFromEnvironmentConstantExpression constant, A arg);
 
   /// Const invocation of the `String.fromEnvironment` constructor.
   ///
@@ -4800,10 +3851,8 @@
   ///
   ///     m() => const String.fromEnvironment('foo', defaultValue: 'bar');
   ///
-  R visitStringFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      StringFromEnvironmentConstantExpression constant,
-      A arg);
+  R visitStringFromEnvironmentConstructorInvoke(NewExpression node,
+      StringFromEnvironmentConstantExpression constant, A arg);
 
   /// Invocation of a generative [constructor] on [type] with [arguments].
   ///
@@ -4904,13 +3953,8 @@
   ///
   // TODO(johnniwinther): Change [type] to [InterfaceType] when is it not
   // `dynamic`.
-  R visitUnresolvedConstructorInvoke(
-      NewExpression node,
-      Element constructor,
-      DartType type,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+  R visitUnresolvedConstructorInvoke(NewExpression node, Element constructor,
+      DartType type, NodeList arguments, Selector selector, A arg);
 
   /// Invocation of a constructor on an unresolved [type] with [arguments].
   ///
@@ -4922,13 +3966,8 @@
   ///
   // TODO(johnniwinther): Change [type] to [MalformedType] when is it not
   // `dynamic`.
-  R visitUnresolvedClassConstructorInvoke(
-      NewExpression node,
-      Element element,
-      DartType type,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+  R visitUnresolvedClassConstructorInvoke(NewExpression node, Element element,
+      DartType type, NodeList arguments, Selector selector, A arg);
 
   /// Constant invocation of a non-constant constructor.
   ///
@@ -4939,13 +3978,8 @@
   ///     }
   ///     m() => const C(true, 42);
   ///
-  R errorNonConstantConstructorInvoke(
-      NewExpression node,
-      Element element,
-      DartType type,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R errorNonConstantConstructorInvoke(NewExpression node, Element element,
+      DartType type, NodeList arguments, CallStructure callStructure, A arg);
 
   /// Invocation of a constructor on an abstract [type] with [arguments].
   ///
@@ -5009,11 +4043,7 @@
   ///
   ///     m() => p;
   ///
-  R errorInvalidGet(
-      Send node,
-      ErroneousElement error,
-      A arg);
-
+  R errorInvalidGet(Send node, ErroneousElement error, A arg);
 
   /// Invocation of an invalid expression with [arguments].
   ///
@@ -5023,12 +4053,8 @@
   ///
   ///     m() => p(null, 42);
   ///
-  R errorInvalidInvoke(
-      Send node,
-      ErroneousElement error,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+  R errorInvalidInvoke(Send node, ErroneousElement error, NodeList arguments,
+      Selector selector, A arg);
 
   /// Assignment of [rhs] to an invalid expression.
   ///
@@ -5038,11 +4064,7 @@
   ///
   ///     m() { p = 42; }
   ///
-  R errorInvalidSet(
-      Send node,
-      ErroneousElement error,
-      Node rhs,
-      A arg);
+  R errorInvalidSet(Send node, ErroneousElement error, Node rhs, A arg);
 
   /// Prefix operation on an invalid expression.
   ///
@@ -5053,10 +4075,7 @@
   ///     m() => ++p;
   ///
   R errorInvalidPrefix(
-      Send node,
-      ErroneousElement error,
-      IncDecOperator operator,
-      A arg);
+      Send node, ErroneousElement error, IncDecOperator operator, A arg);
 
   /// Postfix operation on an invalid expression.
   ///
@@ -5067,10 +4086,7 @@
   ///     m() => p--;
   ///
   R errorInvalidPostfix(
-      Send node,
-      ErroneousElement error,
-      IncDecOperator operator,
-      A arg);
+      Send node, ErroneousElement error, IncDecOperator operator, A arg);
 
   /// Compound assignment of [operator] with [rhs] on an invalid expression.
   ///
@@ -5080,12 +4096,20 @@
   ///
   ///     m() => p += 42;
   ///
-  R errorInvalidCompound(
-      Send node,
-      ErroneousElement error,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R errorInvalidCompound(Send node, ErroneousElement error,
+      AssignmentOperator operator, Node rhs, A arg);
+
+  /// If-null assignment expression of [rhs] to [index] on the index operators
+  /// of an invalid expression.
+  ///
+  /// For instance:
+  ///
+  ///     import 'foo.dart' as p;
+  ///
+  ///     m(index, rhs) => p[index] ??= rhs;
+  ///
+  R errorInvalidIndexSetIfNull(
+      SendSet node, ErroneousElement error, Node index, Node rhs, A arg);
 
   /// Unary operation with [operator] on an invalid expression.
   ///
@@ -5096,10 +4120,7 @@
   ///     }
   ///
   R errorInvalidUnary(
-      Send node,
-      UnaryOperator operator,
-      ErroneousElement error,
-      A arg);
+      Send node, UnaryOperator operator, ErroneousElement error, A arg);
 
   /// Equals operation on an invalid left expression.
   ///
@@ -5109,11 +4130,7 @@
   ///       static m() => super == null;
   ///     }
   ///
-  R errorInvalidEquals(
-      Send node,
-      ErroneousElement error,
-      Node right,
-      A arg);
+  R errorInvalidEquals(Send node, ErroneousElement error, Node right, A arg);
 
   /// Not equals operation on an invalid left expression.
   ///
@@ -5123,11 +4140,7 @@
   ///       static m() => super != null;
   ///     }
   ///
-  R errorInvalidNotEquals(
-      Send node,
-      ErroneousElement error,
-      Node right,
-      A arg);
+  R errorInvalidNotEquals(Send node, ErroneousElement error, Node right, A arg);
 
   /// Binary operation with [operator] on an invalid left expression.
   ///
@@ -5137,12 +4150,8 @@
   ///       static m() => super + 0;
   ///     }
   ///
-  R errorInvalidBinary(
-      Send node,
-      ErroneousElement error,
-      BinaryOperator operator,
-      Node right,
-      A arg);
+  R errorInvalidBinary(Send node, ErroneousElement error,
+      BinaryOperator operator, Node right, A arg);
 
   /// Index operation on an invalid expression.
   ///
@@ -5152,11 +4161,7 @@
   ///       static m() => super[0];
   ///     }
   ///
-  R errorInvalidIndex(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      A arg);
+  R errorInvalidIndex(Send node, ErroneousElement error, Node index, A arg);
 
   /// Index set operation on an invalid expression.
   ///
@@ -5167,11 +4172,7 @@
   ///     }
   ///
   R errorInvalidIndexSet(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      Node rhs,
-      A arg);
+      Send node, ErroneousElement error, Node index, Node rhs, A arg);
 
   /// Compound index set operation on an invalid expression.
   ///
@@ -5181,13 +4182,8 @@
   ///       static m() => super[0] += 42;
   ///     }
   ///
-  R errorInvalidCompoundIndexSet(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R errorInvalidCompoundIndexSet(Send node, ErroneousElement error, Node index,
+      AssignmentOperator operator, Node rhs, A arg);
 
   /// Prefix index operation on an invalid expression.
   ///
@@ -5197,12 +4193,8 @@
   ///       static m() => --super[0];
   ///     }
   ///
-  R errorInvalidIndexPrefix(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      IncDecOperator operator,
-      A arg);
+  R errorInvalidIndexPrefix(Send node, ErroneousElement error, Node index,
+      IncDecOperator operator, A arg);
 
   /// Postfix index operation on an invalid expression.
   ///
@@ -5212,12 +4204,8 @@
   ///       static m() => super[0]++;
   ///     }
   ///
-  R errorInvalidIndexPostfix(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      IncDecOperator operator,
-      A arg);
+  R errorInvalidIndexPostfix(Send node, ErroneousElement error, Node index,
+      IncDecOperator operator, A arg);
 
   /// Access of library through a deferred [prefix].
   ///
@@ -5230,10 +4218,7 @@
   /// This visit method is special in that it is called as a pre-step to calling
   /// the visit method for the actual access. Therefore this method cannot
   /// return a result to its caller.
-  void previsitDeferredAccess(
-      Send node,
-      PrefixElement prefix,
-      A arg);
+  void previsitDeferredAccess(Send node, PrefixElement prefix, A arg);
 }
 
 abstract class SemanticDeclarationVisitor<R, A> {
@@ -5252,10 +4237,7 @@
   ///     get m => 42;
   ///
   R visitTopLevelGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg);
+      FunctionExpression node, MethodElement getter, Node body, A arg);
 
   /// A declaration of a top level [setter].
   ///
@@ -5263,12 +4245,8 @@
   ///
   ///     set m(a) {}
   ///
-  R visitTopLevelSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitTopLevelSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, Node body, A arg);
 
   /// A declaration of a top level [function].
   ///
@@ -5276,12 +4254,8 @@
   ///
   ///     m(a) {}
   ///
-  R visitTopLevelFunctionDeclaration(
-      FunctionExpression node,
-      MethodElement function,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitTopLevelFunctionDeclaration(FunctionExpression node,
+      MethodElement function, NodeList parameters, Node body, A arg);
 
   /// A declaration of a static [getter].
   ///
@@ -5292,10 +4266,7 @@
   ///     }
   ///
   R visitStaticGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg);
+      FunctionExpression node, MethodElement getter, Node body, A arg);
 
   /// A declaration of a static [setter].
   ///
@@ -5305,12 +4276,8 @@
   ///       static set m(a) {}
   ///     }
   ///
-  R visitStaticSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitStaticSetterDeclaration(FunctionExpression node, MethodElement setter,
+      NodeList parameters, Node body, A arg);
 
   /// A declaration of a static [function].
   ///
@@ -5320,12 +4287,8 @@
   ///       static m(a) {}
   ///     }
   ///
-  R visitStaticFunctionDeclaration(
-      FunctionExpression node,
-      MethodElement function,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitStaticFunctionDeclaration(FunctionExpression node,
+      MethodElement function, NodeList parameters, Node body, A arg);
 
   /// A declaration of an abstract instance [getter].
   ///
@@ -5336,9 +4299,7 @@
   ///     }
   ///
   R visitAbstractGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      A arg);
+      FunctionExpression node, MethodElement getter, A arg);
 
   /// A declaration of an abstract instance [setter].
   ///
@@ -5348,11 +4309,8 @@
   ///       set m(a);
   ///     }
   ///
-  R visitAbstractSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      A arg);
+  R visitAbstractSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, A arg);
 
   /// A declaration of an abstract instance [method].
   ///
@@ -5362,11 +4320,8 @@
   ///       m(a);
   ///     }
   ///
-  R visitAbstractMethodDeclaration(
-      FunctionExpression node,
-      MethodElement method,
-      NodeList parameters,
-      A arg);
+  R visitAbstractMethodDeclaration(FunctionExpression node,
+      MethodElement method, NodeList parameters, A arg);
 
   /// A declaration of an instance [getter].
   ///
@@ -5377,10 +4332,7 @@
   ///     }
   ///
   R visitInstanceGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg);
+      FunctionExpression node, MethodElement getter, Node body, A arg);
 
   /// A declaration of an instance [setter].
   ///
@@ -5390,12 +4342,8 @@
   ///       set m(a) {}
   ///     }
   ///
-  R visitInstanceSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitInstanceSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, Node body, A arg);
 
   /// A declaration of an instance [method].
   ///
@@ -5405,12 +4353,8 @@
   ///       m(a) {}
   ///     }
   ///
-  R visitInstanceMethodDeclaration(
-      FunctionExpression node,
-      MethodElement method,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitInstanceMethodDeclaration(FunctionExpression node,
+      MethodElement method, NodeList parameters, Node body, A arg);
 
   /// A declaration of a local [function].
   ///
@@ -5420,12 +4364,8 @@
   ///       local(a) {}
   ///     }
   ///
-  R visitLocalFunctionDeclaration(
-      FunctionExpression node,
-      LocalFunctionElement function,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitLocalFunctionDeclaration(FunctionExpression node,
+      LocalFunctionElement function, NodeList parameters, Node body, A arg);
 
   /// A declaration of a [closure].
   ///
@@ -5435,12 +4375,8 @@
   ///       var closure = (a) {};
   ///     }
   ///
-  R visitClosureDeclaration(
-      FunctionExpression node,
-      LocalFunctionElement closure,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitClosureDeclaration(FunctionExpression node,
+      LocalFunctionElement closure, NodeList parameters, Node body, A arg);
 
   /// A declaration of the [index]th [parameter] in a constructor, setter,
   /// method or function.
@@ -5449,12 +4385,8 @@
   ///
   ///     m(a) {}
   ///
-  R visitParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      int index,
-      A arg);
+  R visitParameterDeclaration(VariableDefinitions node, Node definition,
+      ParameterElement parameter, int index, A arg);
 
   /// A declaration of the [index]th optional [parameter] in a constructor,
   /// method or function with the explicit [defaultValue]. If no default value
@@ -5480,12 +4412,8 @@
   ///
   ///     m({a: 42}) {}
   ///
-  R visitNamedParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      ConstantExpression defaultValue,
-      A arg);
+  R visitNamedParameterDeclaration(VariableDefinitions node, Node definition,
+      ParameterElement parameter, ConstantExpression defaultValue, A arg);
 
   /// A declaration of the [index]th [parameter] as an initializing formal in a
   /// constructor.
@@ -5497,12 +4425,8 @@
   ///       C(this.a);
   ///     }
   ///
-  R visitInitializingFormalDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      InitializingFormalElement parameter,
-      int index,
-      A arg);
+  R visitInitializingFormalDeclaration(VariableDefinitions node,
+      Node definition, InitializingFormalElement parameter, int index, A arg);
 
   /// A declaration of the [index]th optional [parameter] as an initializing
   /// formal in a constructor with the explicit [defaultValue]. If no default
@@ -5550,12 +4474,8 @@
   ///       var a = 42;
   ///     }
   ///
-  R visitLocalVariableDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      LocalVariableElement variable,
-      Node initializer,
-      A arg);
+  R visitLocalVariableDeclaration(VariableDefinitions node, Node definition,
+      LocalVariableElement variable, Node initializer, A arg);
 
   /// A declaration of a local constant [variable] initialized to [constant].
   ///
@@ -5565,12 +4485,8 @@
   ///       const a = 42;
   ///     }
   ///
-  R visitLocalConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      LocalVariableElement variable,
-      ConstantExpression constant,
-      A arg);
+  R visitLocalConstantDeclaration(VariableDefinitions node, Node definition,
+      LocalVariableElement variable, ConstantExpression constant, A arg);
 
   /// A declaration of a top level [field] with the explicit [initializer].
   /// If no initializer is declared, [initializer] is `null`.
@@ -5579,12 +4495,8 @@
   ///
   ///     var a = 42;
   ///
-  R visitTopLevelFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg);
+  R visitTopLevelFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg);
 
   /// A declaration of a top level constant [field] initialized to [constant].
   ///
@@ -5592,12 +4504,8 @@
   ///
   ///     const a = 42;
   ///
-  R visitTopLevelConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      ConstantExpression constant,
-      A arg);
+  R visitTopLevelConstantDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, ConstantExpression constant, A arg);
 
   /// A declaration of a static [field] with the explicit [initializer].
   /// If no initializer is declared, [initializer] is `null`.
@@ -5608,12 +4516,8 @@
   ///       static var a = 42;
   ///     }
   ///
-  R visitStaticFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg);
+  R visitStaticFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg);
 
   /// A declaration of a static constant [field] initialized to [constant].
   ///
@@ -5623,12 +4527,8 @@
   ///       static const a = 42;
   ///     }
   ///
-  R visitStaticConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      ConstantExpression constant,
-      A arg);
+  R visitStaticConstantDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, ConstantExpression constant, A arg);
 
   /// A declaration of an instance [field] with the explicit [initializer].
   /// If no initializer is declared, [initializer] is `null`.
@@ -5639,12 +4539,8 @@
   ///       var a = 42;
   ///     }
   ///
-  R visitInstanceFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg);
+  R visitInstanceFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg);
 
   /// A declaration of a generative [constructor] with the explicit constructor
   /// [initializers].
@@ -5693,12 +4589,8 @@
   ///       factory C(a) => null;
   ///     }
   ///
-  R visitFactoryConstructorDeclaration(
-      FunctionExpression node,
-      ConstructorElement constructor,
-      NodeList parameters,
-      Node body,
-      A arg);
+  R visitFactoryConstructorDeclaration(FunctionExpression node,
+      ConstructorElement constructor, NodeList parameters, Node body, A arg);
 
   /// A declaration of a redirecting factory [constructor]. The immediate
   /// redirection target and its type is provided in [redirectionTarget] and
@@ -5733,10 +4625,7 @@
   ///     }
   ///
   R visitFieldInitializer(
-      SendSet node,
-      FieldElement field,
-      Node initializer,
-      A arg);
+      SendSet node, FieldElement field, Node initializer, A arg);
 
   /// An initializer of an unresolved field with [initializer] as found in
   /// generative constructor initializers.
@@ -5748,10 +4637,7 @@
   ///     }
   ///
   R errorUnresolvedFieldInitializer(
-      SendSet node,
-      Element element,
-      Node initializer,
-      A arg);
+      SendSet node, Element element, Node initializer, A arg);
 
   /// An super constructor invocation of [superConstructor] with [arguments] as
   /// found in generative constructor initializers.
@@ -5785,11 +4671,8 @@
   ///       C(); // Implicit super call of B().
   ///     }
   ///
-  R visitImplicitSuperConstructorInvoke(
-      FunctionExpression node,
-      ConstructorElement superConstructor,
-      InterfaceType type,
-      A arg);
+  R visitImplicitSuperConstructorInvoke(FunctionExpression node,
+      ConstructorElement superConstructor, InterfaceType type, A arg);
 
   /// An super constructor invocation of an unresolved with [arguments] as
   /// found in generative constructor initializers.
@@ -5804,11 +4687,7 @@
   ///     }
   ///
   R errorUnresolvedSuperConstructorInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+      Send node, Element element, NodeList arguments, Selector selector, A arg);
 
   /// An this constructor invocation of [thisConstructor] with [arguments] as
   /// found in a redirecting generative constructors initializer.
@@ -5820,12 +4699,8 @@
   ///       C._(a);
   ///     }
   ///
-  R visitThisConstructorInvoke(
-      Send node,
-      ConstructorElement thisConstructor,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R visitThisConstructorInvoke(Send node, ConstructorElement thisConstructor,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   /// An this constructor invocation of an unresolved constructor with
   /// [arguments] as found in a redirecting generative constructors initializer.
@@ -5837,9 +4712,5 @@
   ///     }
   ///
   R errorUnresolvedThisConstructorInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+      Send node, Element element, NodeList arguments, Selector selector, A arg);
 }
diff --git a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
index 75272f3..b9ebd0b 100644
--- a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
+++ b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
@@ -19,7 +19,6 @@
 /// Use this mixin to provide a trivial implementation for all `errorX` methods.
 abstract class ErrorBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   // TODO(johnniwinther): Ensure that all error methods have an
   // [ErroneousElement].
   R bulkHandleError(Node node, ErroneousElement error, A arg) {
@@ -27,183 +26,117 @@
   }
 
   @override
-  R errorNonConstantConstructorInvoke(
-      NewExpression node,
-      Element element,
-      DartType type,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R errorNonConstantConstructorInvoke(NewExpression node, Element element,
+      DartType type, NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleError(node, null, arg);
   }
 
   @override
   R errorUndefinedUnaryExpression(
-      Send node,
-      Operator operator,
-      Node expression,
-      A arg) {
+      Send node, Operator operator, Node expression, A arg) {
     return bulkHandleError(node, null, arg);
   }
 
   @override
   R errorUndefinedBinaryExpression(
-      Send node,
-      Node left,
-      Operator operator,
-      Node right,
-      A arg) {
+      Send node, Node left, Operator operator, Node right, A arg) {
     return bulkHandleError(node, null, arg);
   }
 
   @override
-  R errorInvalidCompound(
-      Send node,
-      ErroneousElement error,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R errorInvalidCompound(Send node, ErroneousElement error,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidGet(
-      Send node,
-      ErroneousElement error,
-      A arg) {
+  R errorInvalidGet(Send node, ErroneousElement error, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidInvoke(
-      Send node,
-      ErroneousElement error,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R errorInvalidInvoke(Send node, ErroneousElement error, NodeList arguments,
+      Selector selector, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
   R errorInvalidPostfix(
-      Send node,
-      ErroneousElement error,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ErroneousElement error, IncDecOperator operator, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
   R errorInvalidPrefix(
-      Send node,
-      ErroneousElement error,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ErroneousElement error, IncDecOperator operator, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidSet(
-      Send node,
-      ErroneousElement error,
-      Node rhs,
-      A arg) {
+  R errorInvalidSet(Send node, ErroneousElement error, Node rhs, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
   R errorInvalidUnary(
-      Send node,
-      UnaryOperator operator,
-      ErroneousElement error,
-      A arg) {
+      Send node, UnaryOperator operator, ErroneousElement error, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidEquals(
-      Send node,
-      ErroneousElement error,
-      Node right,
-      A arg) {
+  R errorInvalidEquals(Send node, ErroneousElement error, Node right, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
   R errorInvalidNotEquals(
-      Send node,
-      ErroneousElement error,
-      Node right,
-      A arg) {
+      Send node, ErroneousElement error, Node right, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidBinary(
-      Send node,
-      ErroneousElement error,
-      BinaryOperator operator,
-      Node right,
-      A arg) {
+  R errorInvalidBinary(Send node, ErroneousElement error,
+      BinaryOperator operator, Node right, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidIndex(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      A arg) {
+  R errorInvalidIndex(Send node, ErroneousElement error, Node index, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
   R errorInvalidIndexSet(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      Node rhs,
-      A arg) {
+      Send node, ErroneousElement error, Node index, Node rhs, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidCompoundIndexSet(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R errorInvalidCompoundIndexSet(Send node, ErroneousElement error, Node index,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidIndexPrefix(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R errorInvalidIndexSetIfNull(
+      SendSet node, ErroneousElement error, Node index, Node rhs, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidIndexPostfix(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R errorInvalidIndexPrefix(Send node, ErroneousElement error, Node index,
+      IncDecOperator operator, A arg) {
     return bulkHandleError(node, error, arg);
   }
 
   @override
-  R errorInvalidSetIfNull(
-      Send node,
-      ErroneousElement error,
-      Node rhs,
-      A arg) {
+  R errorInvalidIndexPostfix(Send node, ErroneousElement error, Node index,
+      IncDecOperator operator, A arg) {
+    return bulkHandleError(node, error, arg);
+  }
+
+  @override
+  R errorInvalidSetIfNull(Send node, ErroneousElement error, Node rhs, A arg) {
     return bulkHandleError(node, error, arg);
   }
 }
@@ -215,133 +148,84 @@
 /// methods.
 abstract class PrefixBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandlePrefix(Send node, A arg) {
     return bulkHandleNode(node, "Prefix expression `#` unhandled.", arg);
   }
 
   @override
   R visitDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   R visitIfNotNullDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitIndexPrefix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalVariablePrefix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitStaticGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitStaticMethodSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticMethodSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitSuperFieldFieldPrefix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPrefix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitSuperFieldSetterPrefix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPrefix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitSuperGetterFieldPrefix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPrefix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitSuperGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
@@ -357,277 +241,176 @@
   }
 
   @override
-  R visitUnresolvedSuperGetterIndexPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterIndexPrefix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperSetterIndexPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterIndexPrefix(Send node, MethodElement getter,
+      Element element, Node index, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitUnresolvedSuperIndexPrefix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, Node index, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitSuperMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitThisPropertyPrefix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Name name, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitTopLevelGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitTopLevelMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitClassTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitDynamicTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitLocalFunctionPrefix(
-      Send node,
-      LocalFunctionElement function,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalFunctionPrefix(Send node, LocalFunctionElement function,
+      IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitTypeVariableTypeLiteralPrefix(
-      Send node,
-      TypeVariableElement element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, TypeVariableElement element, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitTypedefTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitUnresolvedStaticGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitUnresolvedTopLevelGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitUnresolvedStaticSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitUnresolvedTopLevelSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitStaticMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitTopLevelMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitUnresolvedPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitFinalLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitFinalLocalVariablePrefix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitFinalParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitFinalStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitFinalSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitSuperMethodPrefix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FunctionElement method, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitFinalTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
   R visitUnresolvedSuperPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return bulkHandlePrefix(node, arg);
   }
 }
@@ -639,133 +422,84 @@
 /// methods.
 abstract class PostfixBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandlePostfix(Send node, A arg) {
     return bulkHandleNode(node, "Postfix expression `#` unhandled.", arg);
   }
 
   @override
   R visitDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   R visitIndexPostfix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalVariablePostfix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitStaticGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitStaticMethodSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticMethodSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitSuperFieldFieldPostfix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPostfix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitSuperFieldSetterPostfix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPostfix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitSuperGetterFieldPostfix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPostfix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitSuperGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
@@ -781,285 +515,181 @@
   }
 
   @override
-  R visitUnresolvedSuperGetterIndexPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterIndexPostfix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperSetterIndexPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterIndexPostfix(Send node, MethodElement getter,
+      Element element, Node index, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitUnresolvedSuperIndexPostfix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, Node index, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitSuperMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitThisPropertyPostfix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Name name, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitTopLevelGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitTopLevelMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitClassTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitDynamicTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitLocalFunctionPostfix(
-      Send node,
-      LocalFunctionElement function,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalFunctionPostfix(Send node, LocalFunctionElement function,
+      IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitTypeVariableTypeLiteralPostfix(
-      Send node,
-      TypeVariableElement element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, TypeVariableElement element, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitTypedefTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitUnresolvedStaticGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitUnresolvedTopLevelGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitUnresolvedStaticSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitUnresolvedTopLevelSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitStaticMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   R visitToplevelMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitUnresolvedPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitFinalLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitFinalLocalVariablePostfix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitFinalParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitFinalStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitFinalSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitSuperMethodPostfix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FunctionElement method, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitFinalTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitTopLevelMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
   R visitUnresolvedSuperPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return bulkHandlePostfix(node, arg);
   }
 }
@@ -1071,403 +701,235 @@
 /// methods.
 abstract class CompoundBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleCompound(Send node, A arg) {
     return bulkHandleNode(node, "Compound assignment `#` unhandled.", arg);
   }
 
   @override
-  R visitDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitIfNotNullDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitIfNotNullDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitLocalVariableCompound(
-      Send node,
-      LocalVariableElement variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitStaticGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitStaticMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitSuperFieldSetterCompound(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldSetterCompound(Send node, FieldElement field,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitSuperGetterFieldCompound(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterFieldCompound(Send node, FunctionElement getter,
+      FieldElement field, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitSuperGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitSuperMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
   R visitThisPropertyCompound(
-      Send node,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+      Send node, Name name, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitTopLevelGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitTopLevelMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitFinalParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitClassTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitClassTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitDynamicTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitDynamicTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitFinalLocalVariableCompound(
-      Send node,
-      LocalVariableElement
-      variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitFinalStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitFinalSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitFinalTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitLocalFunctionCompound(
-      Send node,
-      LocalFunctionElement function,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitLocalFunctionCompound(Send node, LocalFunctionElement function,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitTypeVariableTypeLiteralCompound(
-      Send node,
-      TypeVariableElement element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTypeVariableTypeLiteralCompound(Send node, TypeVariableElement element,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitTypedefTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTypedefTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitUnresolvedStaticGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedStaticGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitUnresolvedTopLevelGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedTopLevelGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitUnresolvedStaticSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedStaticSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitUnresolvedTopLevelSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedTopLevelSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitStaticMethodCompound(
-      Send node,
-      MethodElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticMethodCompound(Send node, MethodElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitTopLevelMethodCompound(
-      Send node,
-      MethodElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelMethodCompound(Send node, MethodElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitUnresolvedCompound(
-      Send node,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedCompound(Send node, Element element,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitSuperFieldFieldCompound(
-      Send node, FieldElement readField,
-      FieldElement writtenField,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldFieldCompound(Send node, FieldElement readField,
+      FieldElement writtenField, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitSuperMethodCompound(
-      Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodCompound(Send node, FunctionElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperCompound(
-      Send node,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperCompound(Send node, Element element,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperGetterCompound(
-      Send node, Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperSetterCompound(
-      Send node, MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleCompound(node, arg);
   }
 }
@@ -1479,367 +941,260 @@
 /// methods.
 abstract class SetIfNullBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleSetIfNull(Send node, A arg) {
     return bulkHandleNode(node, "If null assignment `#` unhandled.", arg);
   }
 
   @override
   R visitClassTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitDynamicPropertySetIfNull(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      Send node, Node receiver, Name name, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitDynamicTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitFinalLocalVariableSetIfNull(
-      Send node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      Send node, LocalVariableElement variable, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitFinalParameterSetIfNull(
-      Send node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      Send node, ParameterElement parameter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitFinalStaticFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitFinalSuperFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitFinalTopLevelFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertySetIfNull(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      Send node, Node receiver, Name name, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitLocalFunctionSetIfNull(
-      Send node,
-      LocalFunctionElement function,
-      Node rhs,
-      A arg) {
+      Send node, LocalFunctionElement function, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitLocalVariableSetIfNull(
-      Send node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      Send node, LocalVariableElement variable, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitParameterSetIfNull(
-      Send node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      Send node, ParameterElement parameter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitStaticFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitStaticFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitStaticGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitStaticGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitStaticMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
+      Send node, FunctionElement method, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitStaticMethodSetterSetIfNull(
-      Send node,
-      MethodElement method,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement method, MethodElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitSuperFieldFieldSetIfNull(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldFieldSetIfNull(Send node, FieldElement readField,
+      FieldElement writtenField, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitSuperFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitSuperFieldSetterSetIfNull(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitSuperGetterFieldSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FunctionElement getter, FieldElement field, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitSuperGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitSuperMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
+      Send node, FunctionElement method, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitSuperMethodSetterSetIfNull(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodSetterSetIfNull(Send node, FunctionElement method,
+      FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitThisPropertySetIfNull(
-      Send node,
-      Name name,
-      Node rhs,
-      A arg) {
+  R visitThisPropertySetIfNull(Send node, Name name, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitTopLevelFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitTopLevelGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitTopLevelGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitTopLevelMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
+      Send node, FunctionElement method, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitTopLevelMethodSetterSetIfNull(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitTopLevelMethodSetterSetIfNull(Send node, FunctionElement method,
+      FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitTypeVariableTypeLiteralSetIfNull(
-      Send node,
-      TypeVariableElement element,
-      Node rhs,
-      A arg) {
+      Send node, TypeVariableElement element, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitTypedefTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitUnresolvedSetIfNull(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSetIfNull(Send node, Element element, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitUnresolvedStaticGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitUnresolvedStaticSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitUnresolvedSuperGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperSetIfNull(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperSetIfNull(Send node, Element element, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitUnresolvedSuperSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitUnresolvedTopLevelGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 
   @override
   R visitUnresolvedTopLevelSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitIndexSetIfNull(
+      SendSet node, Node receiver, Node index, Node rhs, A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitSuperIndexSetIfNull(SendSet node, MethodElement getter,
+      MethodElement setter, Node index, Node rhs, A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedSuperGetterIndexSetIfNull(Send node, Element element,
+      MethodElement setter, Node index, Node rhs, A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedSuperSetterIndexSetIfNull(Send node, MethodElement getter,
+      Element element, Node index, Node rhs, A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedSuperIndexSetIfNull(
+      Send node, Element element, Node index, Node rhs, A arg) {
     return bulkHandleSetIfNull(node, arg);
   }
 }
@@ -1851,68 +1206,43 @@
 /// methods.
 abstract class InvokeBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleInvoke(Send node, A arg) {
     return bulkHandleNode(node, "Invocation `#` unhandled.", arg);
   }
 
   @override
-  R visitClassTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitClassTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
   R visitDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitDynamicTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitDynamicTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitExpressionInvoke(
-      Send node,
-      Node expression,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitExpressionInvoke(Send node, Node expression, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitLocalFunctionInvoke(
-      Send node,
-      LocalFunctionElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitLocalFunctionInvoke(Send node, LocalFunctionElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
@@ -1927,240 +1257,146 @@
   }
 
   @override
-  R visitLocalVariableInvoke(
-      Send node,
-      LocalVariableElement variable,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitLocalVariableInvoke(Send node, LocalVariableElement variable,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitParameterInvoke(
-      Send node,
-      ParameterElement parameter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitParameterInvoke(Send node, ParameterElement parameter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitStaticFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitStaticFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitStaticFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitStaticGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitSuperFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitSuperGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitSuperMethodInvoke(
-      Send node,
-      MethodElement method,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperMethodInvoke(Send node, MethodElement method, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitSuperMethodIncompatibleInvoke(
-      Send node,
-      MethodElement method,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperMethodIncompatibleInvoke(Send node, MethodElement method,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
   R visitThisInvoke(
-      Send node,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+      Send node, NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
   R visitThisPropertyInvoke(
-      Send node,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, NodeList arguments, Selector selector, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitTopLevelFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitTopLevelFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitTopLevelFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitTopLevelGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitTypeVariableTypeLiteralInvoke(
-      Send node,
-      TypeVariableElement element,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTypeVariableTypeLiteralInvoke(Send node, TypeVariableElement element,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitTypedefTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTypedefTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitConstantInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitConstantInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitUnresolvedInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedInvoke(Send node, Element element, NodeList arguments,
+      Selector selector, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperInvoke(
-      Send node,
-      Element function,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedSuperInvoke(Send node, Element function, NodeList arguments,
+      Selector selector, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitStaticSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitSuperSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 
   @override
-  R visitTopLevelSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInvoke(node, arg);
   }
 }
@@ -2172,114 +1408,73 @@
 /// methods.
 abstract class GetBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleGet(Node node, A arg) {
     return bulkHandleNode(node, "Read `#` unhandled.", arg);
   }
 
   @override
-  R visitClassTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitClassTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitDynamicPropertyGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg) {
+  R visitDynamicPropertyGet(Send node, Node receiver, Name name, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertyGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg) {
+      Send node, Node receiver, Name name, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitDynamicTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitDynamicTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitLocalFunctionGet(
-      Send node,
-      LocalFunctionElement function,
-      A arg) {
+  R visitLocalFunctionGet(Send node, LocalFunctionElement function, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitLocalVariableGet(
-      Send node,
-      LocalVariableElement variable,
-      A arg) {
+  R visitLocalVariableGet(Send node, LocalVariableElement variable, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitParameterGet(
-      Send node,
-      ParameterElement parameter,
-      A arg) {
+  R visitParameterGet(Send node, ParameterElement parameter, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitStaticFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitStaticFieldGet(Send node, FieldElement field, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitStaticFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg) {
+  R visitStaticFunctionGet(Send node, MethodElement function, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitStaticGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitStaticGetterGet(Send node, FunctionElement getter, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitSuperFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitSuperFieldGet(Send node, FieldElement field, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitSuperGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitSuperGetterGet(Send node, FunctionElement getter, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitSuperMethodGet(
-      Send node,
-      MethodElement method,
-      A arg) {
+  R visitSuperMethodGet(Send node, MethodElement method, A arg) {
     return bulkHandleGet(node, arg);
   }
 
@@ -2289,98 +1484,63 @@
   }
 
   @override
-  R visitThisPropertyGet(
-      Send node,
-      Name name,
-      A arg) {
+  R visitThisPropertyGet(Send node, Name name, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitTopLevelFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitTopLevelFieldGet(Send node, FieldElement field, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitTopLevelFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg) {
+  R visitTopLevelFunctionGet(Send node, MethodElement function, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitTopLevelGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitTopLevelGetterGet(Send node, FunctionElement getter, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
   R visitTypeVariableTypeLiteralGet(
-      Send node,
-      TypeVariableElement element,
-      A arg) {
+      Send node, TypeVariableElement element, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitTypedefTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitTypedefTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitConstantGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitConstantGet(Send node, ConstantExpression constant, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitUnresolvedGet(
-      Send node,
-      Element element,
-      A arg) {
+  R visitUnresolvedGet(Send node, Element element, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperGet(
-      Send node,
-      Element element,
-      A arg) {
+  R visitUnresolvedSuperGet(Send node, Element element, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitStaticSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg) {
+  R visitStaticSetterGet(Send node, FunctionElement setter, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitSuperSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg) {
+  R visitSuperSetterGet(Send node, FunctionElement setter, A arg) {
     return bulkHandleGet(node, arg);
   }
 
   @override
-  R visitTopLevelSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg) {
+  R visitTopLevelSetterGet(Send node, FunctionElement setter, A arg) {
     return bulkHandleGet(node, arg);
   }
 }
@@ -2392,271 +1552,170 @@
 /// methods.
 abstract class SetBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleSet(Send node, A arg) {
     return bulkHandleNode(node, "Assignment `#` unhandled.", arg);
   }
 
   @override
   R visitDynamicPropertySet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      SendSet node, Node receiver, Name name, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertySet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      SendSet node, Node receiver, Name name, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitLocalVariableSet(
-      SendSet node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalVariableElement variable, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitParameterSet(
-      SendSet node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      SendSet node, ParameterElement parameter, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitStaticFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitStaticSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitSuperFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitSuperSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitSuperSetterSet(SendSet node, FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitThisPropertySet(
-      SendSet node,
-      Name name,
-      Node rhs,
-      A arg) {
+  R visitThisPropertySet(SendSet node, Name name, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitTopLevelFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitTopLevelFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitTopLevelSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitClassTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      SendSet node, ConstantExpression constant, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitDynamicTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      SendSet node, ConstantExpression constant, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitFinalLocalVariableSet(
-      SendSet node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalVariableElement variable, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitFinalParameterSet(
-      SendSet node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      SendSet node, ParameterElement parameter, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitFinalStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      SendSet node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitFinalSuperFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitFinalSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitFinalTopLevelFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      SendSet node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitLocalFunctionSet(
-      SendSet node,
-      LocalFunctionElement function,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalFunctionElement function, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitStaticFunctionSet(
-      Send node,
-      MethodElement function,
-      Node rhs,
-      A arg) {
+  R visitStaticFunctionSet(Send node, MethodElement function, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitStaticGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement getter, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitSuperGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterSet(SendSet node, FunctionElement getter, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitSuperMethodSet(
-      Send node,
-      MethodElement method,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodSet(Send node, MethodElement method, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitTopLevelFunctionSet(
-      Send node,
-      MethodElement function,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement function, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitTopLevelGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement getter, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitTypeVariableTypeLiteralSet(
-      SendSet node,
-      TypeVariableElement element,
-      Node rhs,
-      A arg) {
+      SendSet node, TypeVariableElement element, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
   R visitTypedefTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      SendSet node, ConstantExpression constant, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitUnresolvedSet(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSet(Send node, Element element, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperSet(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperSet(Send node, Element element, Node rhs, A arg) {
     return bulkHandleSet(node, arg);
   }
 }
@@ -2668,29 +1727,18 @@
 /// methods.
 abstract class IndexSetBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleIndexSet(Send node, A arg) {
     return bulkHandleNode(node, "Index set expression `#` unhandled.", arg);
   }
 
   @override
-  R visitCompoundIndexSet(
-      SendSet node,
-      Node receiver,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitCompoundIndexSet(SendSet node, Node receiver, Node index,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleIndexSet(node, arg);
   }
 
   @override
-  R visitIndexSet(
-      SendSet node,
-      Node receiver,
-      Node index,
-      Node rhs,
-      A arg) {
+  R visitIndexSet(SendSet node, Node receiver, Node index, Node rhs, A arg) {
     return bulkHandleIndexSet(node, arg);
   }
 
@@ -2731,33 +1779,20 @@
   }
 
   @override
-  R visitUnresolvedSuperCompoundIndexSet(
-      SendSet node,
-      Element element,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperCompoundIndexSet(SendSet node, Element element,
+      Node index, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleIndexSet(node, arg);
   }
 
   @override
   R visitSuperIndexSet(
-      SendSet node,
-      FunctionElement function,
-      Node index,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement function, Node index, Node rhs, A arg) {
     return bulkHandleIndexSet(node, arg);
   }
 
   @override
   R visitUnresolvedSuperIndexSet(
-      SendSet node,
-      Element element,
-      Node index,
-      Node rhs,
-      A arg) {
+      SendSet node, Element element, Node index, Node rhs, A arg) {
     return bulkHandleIndexSet(node, arg);
   }
 }
@@ -2769,111 +1804,69 @@
 /// methods.
 abstract class BinaryBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleBinary(Send node, A arg) {
     return bulkHandleNode(node, "Binary expression `#` unhandled.", arg);
   }
 
   @override
   R visitBinary(
-      Send node,
-      Node left,
-      BinaryOperator operator,
-      Node right,
-      A arg) {
+      Send node, Node left, BinaryOperator operator, Node right, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
-  R visitEquals(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitEquals(Send node, Node left, Node right, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
-  R visitNotEquals(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitNotEquals(Send node, Node left, Node right, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
-  R visitIndex(
-      Send node,
-      Node receiver,
-      Node index,
-      A arg) {
+  R visitIndex(Send node, Node receiver, Node index, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
-  R visitSuperBinary(
-      Send node,
-      FunctionElement function,
-      BinaryOperator operator,
-      Node argument,
-      A arg) {
+  R visitSuperBinary(Send node, FunctionElement function,
+      BinaryOperator operator, Node argument, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
   R visitSuperEquals(
-      Send node,
-      FunctionElement function,
-      Node argument,
-      A arg) {
+      Send node, FunctionElement function, Node argument, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
   R visitSuperNotEquals(
-      Send node,
-      FunctionElement function,
-      Node argument,
-      A arg) {
+      Send node, FunctionElement function, Node argument, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
-  R visitSuperIndex(
-      Send node,
-      FunctionElement function,
-      Node index,
-      A arg) {
+  R visitSuperIndex(Send node, FunctionElement function, Node index, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperBinary(
-      Send node,
-      FunctionElement function,
-      BinaryOperator operator,
-      Node argument,
-      A arg) {
+  R visitUnresolvedSuperBinary(Send node, FunctionElement function,
+      BinaryOperator operator, Node argument, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperInvoke(
-      Send node,
-      Element function,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedSuperInvoke(Send node, Element function, NodeList arguments,
+      Selector selector, A arg) {
     return bulkHandleBinary(node, arg);
   }
 
   @override
   R visitUnresolvedSuperIndex(
-      Send node,
-      FunctionElement function,
-      Node index,
-      A arg) {
+      Send node, FunctionElement function, Node index, A arg) {
     return bulkHandleBinary(node, arg);
   }
 }
@@ -2885,43 +1878,29 @@
 /// methods.
 abstract class UnaryBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleUnary(Send node, A arg) {
     return bulkHandleNode(node, "Unary expression `#` unhandled.", arg);
   }
 
   @override
-  R visitNot(
-      Send node,
-      Node expression,
-      A arg) {
+  R visitNot(Send node, Node expression, A arg) {
     return bulkHandleUnary(node, arg);
   }
 
   @override
   R visitSuperUnary(
-      Send node,
-      UnaryOperator operator,
-      FunctionElement function,
-      A arg) {
+      Send node, UnaryOperator operator, FunctionElement function, A arg) {
     return bulkHandleUnary(node, arg);
   }
 
   @override
-  R visitUnary(
-      Send node,
-      UnaryOperator operator,
-      Node expression,
-      A arg) {
+  R visitUnary(Send node, UnaryOperator operator, Node expression, A arg) {
     return bulkHandleUnary(node, arg);
   }
 
   @override
   R visitUnresolvedSuperUnary(
-      Send node,
-      UnaryOperator operator,
-      FunctionElement function,
-      A arg) {
+      Send node, UnaryOperator operator, FunctionElement function, A arg) {
     return bulkHandleUnary(node, arg);
   }
 }
@@ -2933,66 +1912,38 @@
 /// visitor methods.
 abstract class BaseBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   @override
-  R visitAs(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg) {
+  R visitAs(Send node, Node expression, DartType type, A arg) {
     return bulkHandleNode(node, 'As cast `#` unhandled.', arg);
   }
 
   @override
-  R visitIs(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg) {
+  R visitIs(Send node, Node expression, DartType type, A arg) {
     return bulkHandleNode(node, 'Is test `#` unhandled.', arg);
   }
 
   @override
-  R visitIsNot(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg) {
+  R visitIsNot(Send node, Node expression, DartType type, A arg) {
     return bulkHandleNode(node, 'Is not test `#` unhandled.', arg);
   }
 
   @override
-  R visitIfNull(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitIfNull(Send node, Node left, Node right, A arg) {
     return bulkHandleNode(node, 'If-null (Lazy ?? `#`) unhandled.', arg);
   }
 
   @override
-  R visitLogicalAnd(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitLogicalAnd(Send node, Node left, Node right, A arg) {
     return bulkHandleNode(node, 'Lazy and `#` unhandled.', arg);
   }
 
   @override
-  R visitLogicalOr(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitLogicalOr(Send node, Node left, Node right, A arg) {
     return bulkHandleNode(node, 'Lazy or `#` unhandled.', arg);
   }
 
   @override
-  void previsitDeferredAccess(
-      Send node,
-      PrefixElement prefix,
-      A arg) {
+  void previsitDeferredAccess(Send node, PrefixElement prefix, A arg) {
     bulkHandleNode(node, 'Deferred access `#` unhandled.', arg);
   }
 }
@@ -3004,18 +1955,13 @@
 /// visitor methods.
 abstract class SuperBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleSuper(Send node, A arg) {
     return bulkHandleNode(node, "Super call `#` unhandled.", arg);
   }
 
   @override
-  R visitSuperBinary(
-      Send node,
-      FunctionElement function,
-      BinaryOperator operator,
-      Node argument,
-      A arg) {
+  R visitSuperBinary(Send node, FunctionElement function,
+      BinaryOperator operator, Node argument, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
@@ -3033,357 +1979,217 @@
 
   @override
   R visitSuperEquals(
-      Send node,
-      FunctionElement function,
-      Node argument,
-      A arg) {
+      Send node, FunctionElement function, Node argument, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldFieldPostfix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPostfix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldFieldPrefix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPrefix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitSuperFieldGet(Send node, FieldElement field, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
   R visitSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
   R visitSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldSetterCompound(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldSetterCompound(Send node, FieldElement field,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldSetterPostfix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPostfix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperFieldSetterPrefix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPrefix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperGetterFieldCompound(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterFieldCompound(Send node, FunctionElement getter,
+      FieldElement field, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperGetterFieldPostfix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPostfix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperGetterFieldPrefix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPrefix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitSuperGetterGet(Send node, FunctionElement getter, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
   R visitSuperIndexSet(
-      SendSet node,
-      FunctionElement function,
-      Node index,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement function, Node index, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperMethodGet(
-      Send node,
-      MethodElement method,
-      A arg) {
+  R visitSuperMethodGet(Send node, MethodElement method, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperMethodInvoke(
-      Send node,
-      MethodElement method,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperMethodInvoke(Send node, MethodElement method, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperMethodIncompatibleInvoke(
-      Send node,
-      MethodElement method,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperMethodIncompatibleInvoke(Send node, MethodElement method,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
   R visitSuperNotEquals(
-      Send node,
-      FunctionElement function,
-      Node argument,
-      A arg) {
+      Send node, FunctionElement function, Node argument, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitSuperSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitSuperSetterSet(SendSet node, FunctionElement setter, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
   R visitSuperUnary(
-      Send node,
-      UnaryOperator operator,
-      FunctionElement function,
-      A arg) {
+      Send node, UnaryOperator operator, FunctionElement function, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperBinary(
-      Send node,
-      Element element,
-      BinaryOperator operator,
-      Node argument,
-      A arg) {
+  R visitUnresolvedSuperBinary(Send node, Element element,
+      BinaryOperator operator, Node argument, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperGet(
-      Send node,
-      Element element,
-      A arg) {
+  R visitUnresolvedSuperGet(Send node, Element element, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperSet(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperSet(Send node, Element element, Node rhs, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperInvoke(
-      Send node,
-      Element function,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedSuperInvoke(Send node, Element function, NodeList arguments,
+      Selector selector, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
-  R visitUnresolvedSuperIndex(
-      Send node,
-      Element function,
-      Node index,
-      A arg) {
+  R visitUnresolvedSuperIndex(Send node, Element function, Node index, A arg) {
     return bulkHandleSuper(node, arg);
   }
 
   @override
   R visitUnresolvedSuperUnary(
-      Send node,
-      UnaryOperator operator,
-      Element element,
-      A arg) {
+      Send node, UnaryOperator operator, Element element, A arg) {
     return bulkHandleSuper(node, arg);
   }
 }
 
 abstract class NewBulkMixin<R, A>
     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleNew(NewExpression node, A arg) {
-    return bulkHandleNode(
-        node, "Constructor invocation `#` unhandled.", arg);
+    return bulkHandleNode(node, "Constructor invocation `#` unhandled.", arg);
   }
 
   @override
@@ -3399,33 +2205,25 @@
 
   @override
   R visitConstConstructorInvoke(
-      NewExpression node,
-      ConstructedConstantExpression constant,
-      A arg) {
+      NewExpression node, ConstructedConstantExpression constant, A arg) {
     return bulkHandleNew(node, arg);
   }
 
   @override
-  R visitBoolFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      BoolFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitBoolFromEnvironmentConstructorInvoke(NewExpression node,
+      BoolFromEnvironmentConstantExpression constant, A arg) {
     return bulkHandleNew(node, arg);
   }
 
   @override
-  R visitIntFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      IntFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitIntFromEnvironmentConstructorInvoke(NewExpression node,
+      IntFromEnvironmentConstantExpression constant, A arg) {
     return bulkHandleNew(node, arg);
   }
 
   @override
-  R visitStringFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      StringFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitStringFromEnvironmentConstructorInvoke(NewExpression node,
+      StringFromEnvironmentConstantExpression constant, A arg) {
     return bulkHandleNew(node, arg);
   }
 
@@ -3487,35 +2285,25 @@
   }
 
   @override
-  R visitUnresolvedClassConstructorInvoke(
-      NewExpression node,
-      Element element,
-      DartType type,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedClassConstructorInvoke(NewExpression node, Element element,
+      DartType type, NodeList arguments, Selector selector, A arg) {
     return bulkHandleNew(node, arg);
   }
 
   @override
-  R visitUnresolvedConstructorInvoke(
-      NewExpression node,
-      Element constructor,
-      DartType type,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedConstructorInvoke(NewExpression node, Element constructor,
+      DartType type, NodeList arguments, Selector selector, A arg) {
     return bulkHandleNew(node, arg);
   }
 
   @override
   R visitUnresolvedRedirectingFactoryConstructorInvoke(
-       NewExpression node,
-       ConstructorElement constructor,
-       InterfaceType type,
-       NodeList arguments,
-       CallStructure callStructure,
-       A arg) {
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      A arg) {
     return bulkHandleNew(node, arg);
   }
 }
@@ -3526,19 +2314,20 @@
 /// tests that the union of the `BulkX` mixins implement all `visit` and `error`
 /// methods of [SemanticSendVisitor].
 class BulkSendVisitor<R, A> extends SemanticSendVisitor<R, A>
-    with GetBulkMixin<R, A>,
-         SetBulkMixin<R, A>,
-         ErrorBulkMixin<R, A>,
-         InvokeBulkMixin<R, A>,
-         IndexSetBulkMixin<R, A>,
-         CompoundBulkMixin<R, A>,
-         SetIfNullBulkMixin<R, A>,
-         UnaryBulkMixin<R, A>,
-         BaseBulkMixin<R, A>,
-         BinaryBulkMixin<R, A>,
-         PrefixBulkMixin<R, A>,
-         PostfixBulkMixin<R, A>,
-         NewBulkMixin<R, A> {
+    with
+        GetBulkMixin<R, A>,
+        SetBulkMixin<R, A>,
+        ErrorBulkMixin<R, A>,
+        InvokeBulkMixin<R, A>,
+        IndexSetBulkMixin<R, A>,
+        CompoundBulkMixin<R, A>,
+        SetIfNullBulkMixin<R, A>,
+        UnaryBulkMixin<R, A>,
+        BaseBulkMixin<R, A>,
+        BinaryBulkMixin<R, A>,
+        PrefixBulkMixin<R, A>,
+        PostfixBulkMixin<R, A>,
+        NewBulkMixin<R, A> {
   @override
   R apply(Node node, A arg) {
     throw new UnimplementedError("BulkSendVisitor.apply unimplemented");
@@ -3558,19 +2347,13 @@
 /// Use this mixin to provide a trivial implementation for these methods.
 abstract class ParameterBulkMixin<R, A>
     implements SemanticDeclarationVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleParameterDeclaration(VariableDefinitions node, A arg) {
-    return bulkHandleNode(
-        node, "Parameter declaration `#` unhandled.", arg);
+    return bulkHandleNode(node, "Parameter declaration `#` unhandled.", arg);
   }
 
   @override
-  R visitInitializingFormalDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      InitializingFormalElement parameter,
-      int index,
-      A arg) {
+  R visitInitializingFormalDeclaration(VariableDefinitions node,
+      Node definition, InitializingFormalElement parameter, int index, A arg) {
     return bulkHandleParameterDeclaration(node, arg);
   }
 
@@ -3585,12 +2368,8 @@
   }
 
   @override
-  R visitNamedParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      ConstantExpression defaultValue,
-      A arg) {
+  R visitNamedParameterDeclaration(VariableDefinitions node, Node definition,
+      ParameterElement parameter, ConstantExpression defaultValue, A arg) {
     return bulkHandleParameterDeclaration(node, arg);
   }
 
@@ -3617,12 +2396,8 @@
   }
 
   @override
-  R visitParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      int index,
-      A arg) {
+  R visitParameterDeclaration(VariableDefinitions node, Node definition,
+      ParameterElement parameter, int index, A arg) {
     return bulkHandleParameterDeclaration(node, arg);
   }
 }
@@ -3633,19 +2408,13 @@
 /// Use this mixin to provide a trivial implementation for these methods.
 abstract class ConstructorBulkMixin<R, A>
     implements SemanticDeclarationVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleConstructorDeclaration(FunctionExpression node, A arg) {
-    return bulkHandleNode(
-        node, "Constructor declaration `#` unhandled.", arg);
+    return bulkHandleNode(node, "Constructor declaration `#` unhandled.", arg);
   }
 
   @override
-  R visitFactoryConstructorDeclaration(
-      FunctionExpression node,
-      ConstructorElement constructor,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitFactoryConstructorDeclaration(FunctionExpression node,
+      ConstructorElement constructor, NodeList parameters, Node body, A arg) {
     return bulkHandleConstructorDeclaration(node, arg);
   }
 
@@ -3688,47 +2457,31 @@
 /// Use this mixin to provide a trivial implementation for these methods.
 abstract class InitializerBulkMixin<R, A>
     implements SemanticDeclarationVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleInitializer(Node node, A arg) {
-    return bulkHandleNode(
-        node, "Initializer `#` unhandled.", arg);
+    return bulkHandleNode(node, "Initializer `#` unhandled.", arg);
   }
 
   @override
   R errorUnresolvedFieldInitializer(
-      SendSet node,
-      Element element,
-      Node initializer,
-      A arg) {
+      SendSet node, Element element, Node initializer, A arg) {
     return bulkHandleInitializer(node, arg);
   }
 
   @override
-  R errorUnresolvedSuperConstructorInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R errorUnresolvedSuperConstructorInvoke(Send node, Element element,
+      NodeList arguments, Selector selector, A arg) {
     return bulkHandleInitializer(node, arg);
   }
 
   @override
-  R errorUnresolvedThisConstructorInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R errorUnresolvedThisConstructorInvoke(Send node, Element element,
+      NodeList arguments, Selector selector, A arg) {
     return bulkHandleInitializer(node, arg);
   }
 
   @override
   R visitFieldInitializer(
-      SendSet node,
-      FieldElement field,
-      Node initializer,
-      A arg) {
+      SendSet node, FieldElement field, Node initializer, A arg) {
     return bulkHandleInitializer(node, arg);
   }
 
@@ -3744,21 +2497,14 @@
   }
 
   @override
-  R visitImplicitSuperConstructorInvoke(
-      FunctionExpression node,
-      ConstructorElement superConstructor,
-      InterfaceType type,
-      A arg) {
+  R visitImplicitSuperConstructorInvoke(FunctionExpression node,
+      ConstructorElement superConstructor, InterfaceType type, A arg) {
     return bulkHandleInitializer(node, arg);
   }
 
   @override
-  R visitThisConstructorInvoke(
-      Send node,
-      ConstructorElement thisConstructor,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitThisConstructorInvoke(Send node, ConstructorElement thisConstructor,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return bulkHandleInitializer(node, arg);
   }
 }
@@ -3769,142 +2515,91 @@
 /// Use this mixin to provide a trivial implementation for these methods.
 abstract class FunctionBulkMixin<R, A>
     implements SemanticDeclarationVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleFunctionDeclaration(FunctionExpression node, A arg) {
-    return bulkHandleNode(
-        node, "Function declaration `#` unhandled.", arg);
+    return bulkHandleNode(node, "Function declaration `#` unhandled.", arg);
   }
 
   @override
   R visitAbstractGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      A arg) {
+      FunctionExpression node, MethodElement getter, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitAbstractMethodDeclaration(
-      FunctionExpression node,
-      MethodElement method,
-      NodeList parameters,
-      A arg) {
+  R visitAbstractMethodDeclaration(FunctionExpression node,
+      MethodElement method, NodeList parameters, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitAbstractSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      A arg) {
+  R visitAbstractSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitClosureDeclaration(
-      FunctionExpression node,
-      LocalFunctionElement closure,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitClosureDeclaration(FunctionExpression node,
+      LocalFunctionElement closure, NodeList parameters, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
   R visitInstanceGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg) {
+      FunctionExpression node, MethodElement getter, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitInstanceMethodDeclaration(
-      FunctionExpression node,
-      MethodElement method,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitInstanceMethodDeclaration(FunctionExpression node,
+      MethodElement method, NodeList parameters, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitInstanceSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitInstanceSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitLocalFunctionDeclaration(
-      FunctionExpression node,
-      LocalFunctionElement function,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitLocalFunctionDeclaration(FunctionExpression node,
+      LocalFunctionElement function, NodeList parameters, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitStaticFunctionDeclaration(
-      FunctionExpression node,
-      MethodElement function,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitStaticFunctionDeclaration(FunctionExpression node,
+      MethodElement function, NodeList parameters, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
   R visitStaticGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg) {
+      FunctionExpression node, MethodElement getter, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitStaticSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitStaticSetterDeclaration(FunctionExpression node, MethodElement setter,
+      NodeList parameters, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitTopLevelFunctionDeclaration(
-      FunctionExpression node,
-      MethodElement function,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitTopLevelFunctionDeclaration(FunctionExpression node,
+      MethodElement function, NodeList parameters, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
   R visitTopLevelGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg) {
+      FunctionExpression node, MethodElement getter, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 
   @override
-  R visitTopLevelSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitTopLevelSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, Node body, A arg) {
     return bulkHandleFunctionDeclaration(node, arg);
   }
 }
@@ -3915,79 +2610,49 @@
 /// Use this mixin to provide a trivial implementation for these methods.
 abstract class VariableBulkMixin<R, A>
     implements SemanticDeclarationVisitor<R, A>, BulkHandle<R, A> {
-
   R bulkHandleVariableDeclaration(VariableDefinitions node, A arg) {
-    return bulkHandleNode(
-        node, "Variable declaration `#` unhandled.", arg);
+    return bulkHandleNode(node, "Variable declaration `#` unhandled.", arg);
   }
 
   @override
-  R visitInstanceFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg) {
+  R visitInstanceFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg) {
     return bulkHandleVariableDeclaration(node, arg);
   }
 
   @override
-  R visitLocalConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      LocalVariableElement variable,
-      ConstantExpression constant,
-      A arg) {
+  R visitLocalConstantDeclaration(VariableDefinitions node, Node definition,
+      LocalVariableElement variable, ConstantExpression constant, A arg) {
     return bulkHandleVariableDeclaration(node, arg);
   }
 
   @override
-  R visitLocalVariableDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      LocalVariableElement variable,
-      Node initializer,
-      A arg) {
+  R visitLocalVariableDeclaration(VariableDefinitions node, Node definition,
+      LocalVariableElement variable, Node initializer, A arg) {
     return bulkHandleVariableDeclaration(node, arg);
   }
 
   @override
-  R visitStaticConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      ConstantExpression constant,
-      A arg) {
+  R visitStaticConstantDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, ConstantExpression constant, A arg) {
     return bulkHandleVariableDeclaration(node, arg);
   }
 
   @override
-  R visitStaticFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg) {
+  R visitStaticFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg) {
     return bulkHandleVariableDeclaration(node, arg);
   }
 
   @override
-  R visitTopLevelConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      ConstantExpression constant,
-      A arg) {
+  R visitTopLevelConstantDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, ConstantExpression constant, A arg) {
     return bulkHandleVariableDeclaration(node, arg);
   }
 
   @override
-  R visitTopLevelFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg) {
+  R visitTopLevelFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg) {
     return bulkHandleVariableDeclaration(node, arg);
   }
 }
@@ -3999,11 +2664,12 @@
 /// tests that the union of the `BulkX` mixins implement all `visit` and `error`
 /// methods of [SemanticDeclarationVisitor].
 class BulkDeclarationVisitor<R, A> extends SemanticDeclarationVisitor<R, A>
-    with ConstructorBulkMixin<R, A>,
-         FunctionBulkMixin<R, A>,
-         VariableBulkMixin<R, A>,
-         ParameterBulkMixin<R, A>,
-         InitializerBulkMixin<R, A> {
+    with
+        ConstructorBulkMixin<R, A>,
+        FunctionBulkMixin<R, A>,
+        VariableBulkMixin<R, A>,
+        ParameterBulkMixin<R, A>,
+        InitializerBulkMixin<R, A> {
   @override
   R apply(Node node, A arg) {
     throw new UnimplementedError("BulkDeclVisitor.apply unimplemented");
@@ -4028,7 +2694,6 @@
   }
 }
 
-
 /// [SemanticSendVisitor] that visits subnodes.
 class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
   @override
@@ -4037,583 +2702,370 @@
   }
 
   @override
-  void previsitDeferredAccess(
-      Send node,
-      PrefixElement prefix,
-      A arg) {
-  }
+  void previsitDeferredAccess(Send node, PrefixElement prefix, A arg) {}
 
   @override
-  R errorInvalidAssert(
-      Send node,
-      NodeList arguments,
-      A arg) {
-    apply(arguments, arg);
-    return null;
-  }
-
-  @override
-  R errorInvalidCompound(
-      Send node,
-      ErroneousElement error,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R errorInvalidCompound(Send node, ErroneousElement error,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R errorInvalidGet(
-      Send node,
-      ErroneousElement error,
-      A arg) {
+  R errorInvalidGet(Send node, ErroneousElement error, A arg) {
     return null;
   }
 
   @override
-  R errorInvalidInvoke(
-      Send node,
-      ErroneousElement error,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R errorInvalidInvoke(Send node, ErroneousElement error, NodeList arguments,
+      Selector selector, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R errorInvalidPostfix(
-      Send node,
-      ErroneousElement error,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ErroneousElement error, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R errorInvalidPrefix(
-      Send node,
-      ErroneousElement error,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ErroneousElement error, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R errorInvalidSet(
-      Send node,
-      ErroneousElement error,
-      Node rhs,
-      A arg) {
+  R errorInvalidSet(Send node, ErroneousElement error, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R errorInvalidUnary(
-      Send node,
-      UnaryOperator operator,
-      ErroneousElement error,
-      A arg) {
+      Send node, UnaryOperator operator, ErroneousElement error, A arg) {
     return null;
   }
 
   @override
-  R errorInvalidEquals(
-      Send node,
-      ErroneousElement error,
-      Node right,
-      A arg) {
+  R errorInvalidEquals(Send node, ErroneousElement error, Node right, A arg) {
     apply(right, arg);
     return null;
   }
 
   @override
   R errorInvalidNotEquals(
-      Send node,
-      ErroneousElement error,
-      Node right,
-      A arg) {
+      Send node, ErroneousElement error, Node right, A arg) {
     apply(right, arg);
     return null;
   }
 
   @override
-  R errorInvalidBinary(
-      Send node,
-      ErroneousElement error,
-      BinaryOperator operator,
-      Node right,
-      A arg) {
+  R errorInvalidBinary(Send node, ErroneousElement error,
+      BinaryOperator operator, Node right, A arg) {
     apply(right, arg);
     return null;
   }
 
   @override
-  R errorInvalidIndex(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      A arg) {
+  R errorInvalidIndex(Send node, ErroneousElement error, Node index, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
   R errorInvalidIndexSet(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      Node rhs,
-      A arg) {
+      Send node, ErroneousElement error, Node index, Node rhs, A arg) {
     apply(index, arg);
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R errorInvalidCompoundIndexSet(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R errorInvalidCompoundIndexSet(Send node, ErroneousElement error, Node index,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(index, arg);
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R errorInvalidIndexPrefix(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R errorInvalidIndexPrefix(Send node, ErroneousElement error, Node index,
+      IncDecOperator operator, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
-  R errorInvalidIndexPostfix(
-      Send node,
-      ErroneousElement error,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R errorInvalidIndexPostfix(Send node, ErroneousElement error, Node index,
+      IncDecOperator operator, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
   R visitClassTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      SendSet node, ConstantExpression constant, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitDynamicTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      SendSet node, ConstantExpression constant, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitFinalLocalVariableCompound(
-      Send node,
-      LocalVariableElement variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalLocalVariableSet(
-      SendSet node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalVariableElement variable, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitFinalParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalParameterSet(
-      SendSet node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      SendSet node, ParameterElement parameter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitFinalStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      SendSet node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitFinalSuperFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitFinalSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitFinalTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalTopLevelFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      SendSet node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitLocalFunctionCompound(
-      Send node,
-      LocalFunctionElement function,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitLocalFunctionCompound(Send node, LocalFunctionElement function,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitLocalFunctionPostfix(
-      Send node,
-      LocalFunctionElement function,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalFunctionPostfix(Send node, LocalFunctionElement function,
+      IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitLocalFunctionPrefix(
-      Send node,
-      LocalFunctionElement function,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalFunctionPrefix(Send node, LocalFunctionElement function,
+      IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitLocalFunctionSet(
-      SendSet node,
-      LocalFunctionElement function,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalFunctionElement function, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticFunctionSet(
-      Send node,
-      MethodElement function,
-      Node rhs,
-      A arg) {
+  R visitStaticFunctionSet(Send node, MethodElement function, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitStaticGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement getter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg) {
+  R visitStaticSetterGet(Send node, FunctionElement setter, A arg) {
     return null;
   }
 
   @override
-  R visitStaticSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitSuperGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterSet(SendSet node, FunctionElement getter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperMethodSet(
-      Send node,
-      MethodElement method,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodSet(Send node, MethodElement method, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg) {
+  R visitSuperSetterGet(Send node, FunctionElement setter, A arg) {
     return null;
   }
 
   @override
-  R visitSuperSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitTopLevelFunctionSet(
-      Send node,
-      MethodElement function,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement function, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitTopLevelGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement getter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTopLevelSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg) {
+  R visitTopLevelSetterGet(Send node, FunctionElement setter, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitTypeVariableTypeLiteralSet(
-      SendSet node,
-      TypeVariableElement element,
-      Node rhs,
-      A arg) {
+      SendSet node, TypeVariableElement element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitTypedefTypeLiteralSet(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      SendSet node, ConstantExpression constant, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperIndex(
-      Send node,
-      Element function,
-      Node index,
-      A arg) {
+  R visitUnresolvedSuperIndex(Send node, Element function, Node index, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperGet(
-      Send node,
-      Element element,
-      A arg) {
+  R visitUnresolvedSuperGet(Send node, Element element, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedSuperSet(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperSet(Send node, Element element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperInvoke(
-      Send node,
-      Element function,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedSuperInvoke(Send node, Element function, NodeList arguments,
+      Selector selector, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitAs(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg) {
+  R visitAs(Send node, Node expression, DartType type, A arg) {
     apply(expression, arg);
     return null;
   }
 
   @override
   R visitBinary(
-      Send node,
-      Node left,
-      BinaryOperator operator,
-      Node right,
-      A arg) {
+      Send node, Node left, BinaryOperator operator, Node right, A arg) {
     apply(left, arg);
     apply(right, arg);
     return null;
   }
 
   @override
-  R visitClassTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitClassTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitClassTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitClassTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitClassTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitClassTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitClassTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitClassTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitCompoundIndexSet(
-      SendSet node,
-      Node receiver,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitCompoundIndexSet(SendSet node, Node receiver, Node index,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(receiver, arg);
     apply(index, arg);
     apply(rhs, arg);
@@ -4621,77 +3073,49 @@
   }
 
   @override
-  R visitConstantGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitConstantGet(Send node, ConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitConstantInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitConstantInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(receiver, arg);
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitIfNotNullDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitIfNotNullDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(receiver, arg);
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitDynamicPropertyGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg) {
+  R visitDynamicPropertyGet(Send node, Node receiver, Name name, A arg) {
     apply(receiver, arg);
     return null;
   }
 
   @override
   R visitIfNotNullDynamicPropertyGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg) {
+      Send node, Node receiver, Name name, A arg) {
     apply(receiver, arg);
     return null;
   }
 
   @override
   R visitDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg) {
     apply(receiver, arg);
     apply(arguments, arg);
     return null;
@@ -4699,11 +3123,7 @@
 
   @override
   R visitIfNotNullDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg) {
     apply(receiver, arg);
     apply(arguments, arg);
     return null;
@@ -4711,55 +3131,35 @@
 
   @override
   R visitDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
     apply(receiver, arg);
     return null;
   }
 
   @override
   R visitIfNotNullDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
     apply(receiver, arg);
     return null;
   }
 
   @override
   R visitDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
     apply(receiver, arg);
     return null;
   }
 
   @override
   R visitIfNotNullDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
     apply(receiver, arg);
     return null;
   }
 
   @override
   R visitDynamicPropertySet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      SendSet node, Node receiver, Name name, Node rhs, A arg) {
     apply(receiver, arg);
     apply(rhs, arg);
     return null;
@@ -4767,105 +3167,67 @@
 
   @override
   R visitIfNotNullDynamicPropertySet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      SendSet node, Node receiver, Name name, Node rhs, A arg) {
     apply(receiver, arg);
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitDynamicTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitDynamicTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitDynamicTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitDynamicTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitDynamicTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitDynamicTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitDynamicTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitDynamicTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitEquals(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitEquals(Send node, Node left, Node right, A arg) {
     apply(left, arg);
     apply(right, arg);
     return null;
   }
 
   @override
-  R visitExpressionInvoke(
-      Send node,
-      Node expression,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitExpressionInvoke(Send node, Node expression, NodeList arguments,
+      CallStructure callStructure, A arg) {
     apply(expression, arg);
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitIndex(
-      Send node,
-      Node receiver,
-      Node index,
-      A arg) {
+  R visitIndex(Send node, Node receiver, Node index, A arg) {
     apply(receiver, arg);
     apply(index, arg);
     return null;
   }
 
   @override
-  R visitIndexSet(
-      SendSet node,
-      Node receiver,
-      Node index,
-      Node rhs,
-      A arg) {
+  R visitIndexSet(SendSet node, Node receiver, Node index, Node rhs, A arg) {
     apply(receiver, arg);
     apply(index, arg);
     apply(rhs, arg);
@@ -4873,40 +3235,25 @@
   }
 
   @override
-  R visitIs(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg) {
+  R visitIs(Send node, Node expression, DartType type, A arg) {
     apply(expression, arg);
     return null;
   }
 
   @override
-  R visitIsNot(
-      Send node,
-      Node expression,
-      DartType type,
-      A arg) {
+  R visitIsNot(Send node, Node expression, DartType type, A arg) {
     apply(expression, arg);
     return null;
   }
 
   @override
-  R visitLocalFunctionGet(
-      Send node,
-      LocalFunctionElement function,
-      A arg) {
+  R visitLocalFunctionGet(Send node, LocalFunctionElement function, A arg) {
     return null;
   }
 
   @override
-  R visitLocalFunctionInvoke(
-      Send node,
-      LocalFunctionElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitLocalFunctionInvoke(Send node, LocalFunctionElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
@@ -4923,362 +3270,231 @@
   }
 
   @override
-  R visitLocalVariableCompound(
-      Send node,
-      LocalVariableElement variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitLocalVariableGet(
-      Send node,
-      LocalVariableElement variable,
-      A arg) {
+  R visitLocalVariableGet(Send node, LocalVariableElement variable, A arg) {
     return null;
   }
 
   @override
-  R visitLocalVariableInvoke(
-      Send node,
-      LocalVariableElement variable,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitLocalVariableInvoke(Send node, LocalVariableElement variable,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalVariablePostfix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalVariablePrefix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitLocalVariableSet(
-      SendSet node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalVariableElement variable, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitIfNull(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitIfNull(Send node, Node left, Node right, A arg) {
     apply(left, arg);
     apply(right, arg);
     return null;
   }
 
   @override
-  R visitLogicalAnd(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitLogicalAnd(Send node, Node left, Node right, A arg) {
     apply(left, arg);
     apply(right, arg);
     return null;
   }
 
   @override
-  R visitLogicalOr(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitLogicalOr(Send node, Node left, Node right, A arg) {
     apply(left, arg);
     apply(right, arg);
     return null;
   }
 
   @override
-  R visitNot(
-      Send node,
-      Node expression,
-      A arg) {
+  R visitNot(Send node, Node expression, A arg) {
     apply(expression, arg);
     return null;
   }
 
   @override
-  R visitNotEquals(
-      Send node,
-      Node left,
-      Node right,
-      A arg) {
+  R visitNotEquals(Send node, Node left, Node right, A arg) {
     apply(left, arg);
     apply(right, arg);
     return null;
   }
 
   @override
-  R visitParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitParameterGet(
-      Send node,
-      ParameterElement parameter,
-      A arg) {
+  R visitParameterGet(Send node, ParameterElement parameter, A arg) {
     return null;
   }
 
   @override
-  R visitParameterInvoke(
-      Send node,
-      ParameterElement parameter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitParameterInvoke(Send node, ParameterElement parameter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitParameterSet(
-      SendSet node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      SendSet node, ParameterElement parameter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitStaticFieldGet(Send node, FieldElement field, A arg) {
     return null;
   }
 
   @override
-  R visitStaticFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitStaticFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg) {
+  R visitStaticFunctionGet(Send node, MethodElement function, A arg) {
     return null;
   }
 
   @override
-  R visitStaticFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitStaticFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitStaticGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitStaticGetterGet(Send node, FunctionElement getter, A arg) {
     return null;
   }
 
   @override
-  R visitStaticGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitStaticGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitStaticGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitStaticMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticMethodSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticMethodSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitStaticMethodSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticMethodSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitStaticSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperBinary(
-      Send node,
-      FunctionElement function,
-      BinaryOperator operator,
-      Node argument,
-      A arg) {
+  R visitSuperBinary(Send node, FunctionElement function,
+      BinaryOperator operator, Node argument, A arg) {
     apply(argument, arg);
     return null;
   }
@@ -5298,317 +3514,197 @@
 
   @override
   R visitSuperEquals(
-      Send node,
-      FunctionElement function,
-      Node argument,
-      A arg) {
+      Send node, FunctionElement function, Node argument, A arg) {
     apply(argument, arg);
     return null;
   }
 
   @override
-  R visitSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperFieldFieldPostfix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPostfix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperFieldFieldPrefix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPrefix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitSuperFieldGet(Send node, FieldElement field, A arg) {
     return null;
   }
 
   @override
-  R visitSuperFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperFieldSetterCompound(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldSetterCompound(Send node, FieldElement field,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperFieldSetterPostfix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPostfix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperFieldSetterPrefix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPrefix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperGetterFieldCompound(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterFieldCompound(Send node, FunctionElement getter,
+      FieldElement field, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperGetterFieldPostfix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPostfix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperGetterFieldPrefix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPrefix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitSuperGetterGet(Send node, FunctionElement getter, A arg) {
     return null;
   }
 
   @override
-  R visitSuperGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitSuperGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperIndex(
-      Send node,
-      FunctionElement function,
-      Node index,
-      A arg) {
+  R visitSuperIndex(Send node, FunctionElement function, Node index, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
   R visitSuperIndexSet(
-      SendSet node,
-      FunctionElement function,
-      Node index,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement function, Node index, Node rhs, A arg) {
     apply(index, arg);
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperMethodGet(
-      Send node,
-      MethodElement method,
-      A arg) {
+  R visitSuperMethodGet(Send node, MethodElement method, A arg) {
     return null;
   }
 
   @override
-  R visitSuperMethodInvoke(
-      Send node,
-      MethodElement method,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperMethodInvoke(Send node, MethodElement method, NodeList arguments,
+      CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitSuperMethodIncompatibleInvoke(
-      Send node,
-      MethodElement method,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitSuperMethodIncompatibleInvoke(Send node, MethodElement method,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitSuperMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitSuperNotEquals(
-      Send node,
-      FunctionElement function,
-      Node argument,
-      A arg) {
+      Send node, FunctionElement function, Node argument, A arg) {
     apply(argument, arg);
     return null;
   }
 
   @override
-  R visitSuperSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitSuperSetterSet(SendSet node, FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitSuperUnary(
-      Send node,
-      UnaryOperator operator,
-      FunctionElement function,
-      A arg) {
+      Send node, UnaryOperator operator, FunctionElement function, A arg) {
     return null;
   }
 
@@ -5619,423 +3715,270 @@
 
   @override
   R visitThisInvoke(
-      Send node,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+      Send node, NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitThisPropertyCompound(
-      Send node,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+      Send node, Name name, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitThisPropertyGet(
-      Send node,
-      Name name,
-      A arg) {
+  R visitThisPropertyGet(Send node, Name name, A arg) {
     return null;
   }
 
   @override
   R visitThisPropertyInvoke(
-      Send node,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, NodeList arguments, Selector selector, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitThisPropertyPostfix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Name name, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitThisPropertyPrefix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Name name, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitThisPropertySet(
-      SendSet node,
-      Name name,
-      Node rhs,
-      A arg) {
+  R visitThisPropertySet(SendSet node, Name name, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTopLevelFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitTopLevelFieldGet(Send node, FieldElement field, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitTopLevelFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTopLevelFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg) {
+  R visitTopLevelFunctionGet(Send node, MethodElement function, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitTopLevelFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitTopLevelGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitTopLevelGetterGet(Send node, FunctionElement getter, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitTopLevelGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTopLevelGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTopLevelMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitTopLevelSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTypeVariableTypeLiteralCompound(
-      Send node,
-      TypeVariableElement element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTypeVariableTypeLiteralCompound(Send node, TypeVariableElement element,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitTypeVariableTypeLiteralGet(
-      Send node,
-      TypeVariableElement element,
-      A arg) {
+      Send node, TypeVariableElement element, A arg) {
     return null;
   }
 
   @override
-  R visitTypeVariableTypeLiteralInvoke(
-      Send node,
-      TypeVariableElement element,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTypeVariableTypeLiteralInvoke(Send node, TypeVariableElement element,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitTypeVariableTypeLiteralPostfix(
-      Send node,
-      TypeVariableElement element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, TypeVariableElement element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitTypeVariableTypeLiteralPrefix(
-      Send node,
-      TypeVariableElement element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, TypeVariableElement element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitTypedefTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTypedefTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTypedefTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitTypedefTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitTypedefTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTypedefTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitTypedefTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitTypedefTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnary(
-      Send node,
-      UnaryOperator operator,
-      Node expression,
-      A arg) {
+  R visitUnary(Send node, UnaryOperator operator, Node expression, A arg) {
     apply(expression, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedCompound(
-      Send node,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedCompound(Send node, Element element,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedGet(
-      Send node,
-      Element element,
-      A arg) {
+  R visitUnresolvedGet(Send node, Element element, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedInvoke(Send node, Element element, NodeList arguments,
+      Selector selector, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
   R visitUnresolvedPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitUnresolvedPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedSet(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSet(Send node, Element element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R errorUndefinedBinaryExpression(
-      Send node,
-      Node left,
-      Operator operator,
-      Node right,
-      A arg) {
+      Send node, Node left, Operator operator, Node right, A arg) {
     apply(left, arg);
     apply(right, arg);
     return null;
@@ -6043,21 +3986,14 @@
 
   @override
   R errorUndefinedUnaryExpression(
-      Send node,
-      Operator operator,
-      Node expression,
-      A arg) {
+      Send node, Operator operator, Node expression, A arg) {
     apply(expression, arg);
     return null;
   }
 
   @override
   R visitUnresolvedSuperIndexSet(
-      Send node,
-      Element element,
-      Node index,
-      Node rhs,
-      A arg) {
+      Send node, Element element, Node index, Node rhs, A arg) {
     apply(index, arg);
     apply(rhs, arg);
     return null;
@@ -6092,115 +4028,71 @@
   }
 
   @override
-  R visitUnresolvedSuperCompoundIndexSet(
-      SendSet node,
-      Element element,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperCompoundIndexSet(SendSet node, Element element,
+      Node index, AssignmentOperator operator, Node rhs, A arg) {
     apply(index, arg);
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperBinary(
-      Send node,
-      Element element,
-      BinaryOperator operator,
-      Node argument,
-      A arg) {
+  R visitUnresolvedSuperBinary(Send node, Element element,
+      BinaryOperator operator, Node argument, A arg) {
     apply(argument, arg);
     return null;
   }
 
   @override
   R visitUnresolvedSuperUnary(
-      Send node,
-      UnaryOperator operator,
-      Element element,
-      A arg) {
+      Send node, UnaryOperator operator, Element element, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedSuperGetterIndexPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterIndexPostfix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperSetterIndexPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterIndexPostfix(Send node, MethodElement getter,
+      Element element, Node index, IncDecOperator operator, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
   R visitUnresolvedSuperIndexPostfix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, Node index, IncDecOperator operator, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperGetterIndexPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterIndexPrefix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperSetterIndexPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterIndexPrefix(Send node, MethodElement getter,
+      Element element, Node index, IncDecOperator operator, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
   R visitUnresolvedSuperIndexPrefix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, Node index, IncDecOperator operator, A arg) {
     apply(index, arg);
     return null;
   }
 
   @override
   R visitIndexPostfix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg) {
     apply(receiver, arg);
     apply(index, arg);
     return null;
@@ -6208,11 +4100,7 @@
 
   @override
   R visitIndexPrefix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg) {
     apply(receiver, arg);
     apply(index, arg);
     return null;
@@ -6243,32 +4131,21 @@
   }
 
   @override
-  R errorInvalidSetIfNull(
-      Send node,
-      ErroneousElement error,
-      Node rhs,
-      A arg) {
+  R errorInvalidSetIfNull(Send node, ErroneousElement error, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitClassTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitDynamicPropertySetIfNull(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      Send node, Node receiver, Name name, Node rhs, A arg) {
     apply(receiver, arg);
     apply(rhs, arg);
     return null;
@@ -6276,71 +4153,49 @@
 
   @override
   R visitDynamicTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalLocalVariableSetIfNull(
-      Send node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      Send node, LocalVariableElement variable, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalParameterSetIfNull(
-      Send node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      Send node, ParameterElement parameter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalStaticFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalSuperFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalTopLevelFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitIfNotNullDynamicPropertySetIfNull(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      Send node, Node receiver, Name name, Node rhs, A arg) {
     apply(receiver, arg);
     apply(rhs, arg);
     return null;
@@ -6348,338 +4203,223 @@
 
   @override
   R visitLocalFunctionSetIfNull(
-      Send node,
-      LocalFunctionElement function,
-      Node rhs,
-      A arg) {
+      Send node, LocalFunctionElement function, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitLocalVariableSetIfNull(
-      Send node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      Send node, LocalVariableElement variable, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitParameterSetIfNull(
-      Send node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      Send node, ParameterElement parameter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitStaticFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitStaticGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitStaticMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
+      Send node, FunctionElement method, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitStaticMethodSetterSetIfNull(
-      Send node,
-      MethodElement method,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement method, MethodElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperFieldFieldSetIfNull(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldFieldSetIfNull(Send node, FieldElement readField,
+      FieldElement writtenField, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitSuperFieldSetterSetIfNull(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitSuperGetterFieldSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FunctionElement getter, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitSuperGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitSuperMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
+      Send node, FunctionElement method, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitSuperMethodSetterSetIfNull(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodSetterSetIfNull(Send node, FunctionElement method,
+      FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitThisPropertySetIfNull(
-      Send node,
-      Name name,
-      Node rhs,
-      A arg) {
+  R visitThisPropertySetIfNull(Send node, Name name, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitTopLevelFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      Send node, FieldElement field, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTopLevelGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitTopLevelGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitTopLevelMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
+      Send node, FunctionElement method, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitTopLevelMethodSetterSetIfNull(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+  R visitTopLevelMethodSetterSetIfNull(Send node, FunctionElement method,
+      FunctionElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitTypeVariableTypeLiteralSetIfNull(
-      Send node,
-      TypeVariableElement element,
-      Node rhs,
-      A arg) {
+      Send node, TypeVariableElement element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitTypedefTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSetIfNull(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSetIfNull(Send node, Element element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitUnresolvedStaticGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitUnresolvedStaticSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitUnresolvedSuperGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperSetIfNull(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperSetIfNull(Send node, Element element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitUnresolvedSuperSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitUnresolvedTopLevelGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitUnresolvedTopLevelSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitConstConstructorInvoke(
-      NewExpression node,
-      ConstructedConstantExpression constant,
-      A arg) {
+      NewExpression node, ConstructedConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitBoolFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      BoolFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitBoolFromEnvironmentConstructorInvoke(NewExpression node,
+      BoolFromEnvironmentConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitIntFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      IntFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitIntFromEnvironmentConstructorInvoke(NewExpression node,
+      IntFromEnvironmentConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitStringFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      StringFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitStringFromEnvironmentConstructorInvoke(NewExpression node,
+      StringFromEnvironmentConstantExpression constant, A arg) {
     return null;
   }
 
@@ -6708,13 +4448,8 @@
   }
 
   @override
-  R visitUnresolvedConstructorInvoke(
-      NewExpression node,
-      Element constructor,
-      DartType type,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedConstructorInvoke(NewExpression node, Element constructor,
+      DartType type, NodeList arguments, Selector selector, A arg) {
     apply(arguments, arg);
     return null;
   }
@@ -6794,432 +4529,322 @@
   }
 
   @override
-  R errorNonConstantConstructorInvoke(
-      NewExpression node,
-      Element element,
-      DartType type,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R errorNonConstantConstructorInvoke(NewExpression node, Element element,
+      DartType type, NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedStaticGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedStaticGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedTopLevelGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedTopLevelGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedStaticSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedStaticSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedTopLevelSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedTopLevelSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitStaticMethodCompound(
-      Send node,
-      MethodElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticMethodCompound(Send node, MethodElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedStaticGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedTopLevelGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedStaticSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedTopLevelSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitStaticMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitTopLevelMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedStaticGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedTopLevelGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedStaticSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedTopLevelSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitStaticMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitTopLevelMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitFinalLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitFinalLocalVariablePostfix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitFinalLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitFinalLocalVariablePrefix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitFinalParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitFinalParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitFinalStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitFinalStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperFieldFieldCompound(
-      Send node, FieldElement readField,
-      FieldElement writtenField,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldFieldCompound(Send node, FieldElement readField,
+      FieldElement writtenField, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitFinalSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitFinalSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitFinalSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitSuperMethodCompound(
-      Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperMethodCompound(Send node, FunctionElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitSuperMethodPostfix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FunctionElement method, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitSuperMethodPrefix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FunctionElement method, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitFinalTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitFinalTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelMethodCompound(
-      Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelMethodCompound(Send node, FunctionElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperCompound(
-      Send node,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperCompound(Send node, Element element,
+      AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
   R visitUnresolvedSuperPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
   R visitUnresolvedSuperPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedSuperGetterCompound(
-      Send node, Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedSuperGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedSuperSetterCompound(
-      Send node, MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
     apply(rhs, arg);
     return null;
   }
 
   @override
-  R visitUnresolvedSuperSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return null;
   }
 
   @override
-  R visitUnresolvedSuperSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
+    return null;
+  }
+
+  @override
+  R visitIndexSetIfNull(
+      SendSet node, Node receiver, Node index, Node rhs, A arg) {
+    apply(receiver, arg);
+    apply(index, arg);
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitSuperIndexSetIfNull(SendSet node, MethodElement getter,
+      MethodElement setter, Node index, Node rhs, A arg) {
+    apply(index, arg);
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedSuperGetterIndexSetIfNull(Send node, Element element,
+      MethodElement setter, Node index, Node rhs, A arg) {
+    apply(index, arg);
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedSuperSetterIndexSetIfNull(Send node, MethodElement getter,
+      Element element, Node index, Node rhs, A arg) {
+    apply(index, arg);
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedSuperIndexSetIfNull(
+      Send node, Element element, Node index, Node rhs, A arg) {
+    apply(index, arg);
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R errorInvalidIndexSetIfNull(
+      SendSet node, ErroneousElement error, Node index, Node rhs, A arg) {
+    apply(index, arg);
+    apply(rhs, arg);
     return null;
   }
 }
@@ -7245,34 +4870,23 @@
   }
 
   @override
-  R visitAbstractMethodDeclaration(
-      FunctionExpression node,
-      MethodElement method,
-      NodeList parameters,
-      A arg) {
+  R visitAbstractMethodDeclaration(FunctionExpression node,
+      MethodElement method, NodeList parameters, A arg) {
     applyParameters(parameters, arg);
     return null;
   }
 
   @override
-  R visitClosureDeclaration(
-      FunctionExpression node,
-      LocalFunctionElement function,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitClosureDeclaration(FunctionExpression node,
+      LocalFunctionElement function, NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
   }
 
   @override
-  R visitFactoryConstructorDeclaration(
-      FunctionExpression node,
-      ConstructorElement constructor,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitFactoryConstructorDeclaration(FunctionExpression node,
+      ConstructorElement constructor, NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
@@ -7280,10 +4894,7 @@
 
   @override
   R visitFieldInitializer(
-      SendSet node,
-      FieldElement field,
-      Node initializer,
-      A arg) {
+      SendSet node, FieldElement field, Node initializer, A arg) {
     apply(initializer, arg);
     return null;
   }
@@ -7303,24 +4914,16 @@
   }
 
   @override
-  R visitInstanceMethodDeclaration(
-      FunctionExpression node,
-      MethodElement method,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitInstanceMethodDeclaration(FunctionExpression node,
+      MethodElement method, NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
   }
 
   @override
-  R visitLocalFunctionDeclaration(
-      FunctionExpression node,
-      LocalFunctionElement function,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitLocalFunctionDeclaration(FunctionExpression node,
+      LocalFunctionElement function, NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
@@ -7351,12 +4954,8 @@
   }
 
   @override
-  R visitStaticFunctionDeclaration(
-      FunctionExpression node,
-      MethodElement function,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitStaticFunctionDeclaration(FunctionExpression node,
+      MethodElement function, NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
@@ -7375,32 +4974,21 @@
   }
 
   @override
-  R visitImplicitSuperConstructorInvoke(
-      FunctionExpression node,
-      ConstructorElement superConstructor,
-      InterfaceType type,
-      A arg) {
+  R visitImplicitSuperConstructorInvoke(FunctionExpression node,
+      ConstructorElement superConstructor, InterfaceType type, A arg) {
     return null;
   }
 
   @override
-  R visitThisConstructorInvoke(
-      Send node,
-      ConstructorElement thisConstructor,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitThisConstructorInvoke(Send node, ConstructorElement thisConstructor,
+      NodeList arguments, CallStructure callStructure, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitTopLevelFunctionDeclaration(
-      FunctionExpression node,
-      MethodElement function,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitTopLevelFunctionDeclaration(FunctionExpression node,
+      MethodElement function, NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
@@ -7408,43 +4996,28 @@
 
   @override
   R errorUnresolvedFieldInitializer(
-      SendSet node,
-      Element element,
-      Node initializer,
-      A arg) {
+      SendSet node, Element element, Node initializer, A arg) {
     apply(initializer, arg);
     return null;
   }
 
   @override
-  R errorUnresolvedSuperConstructorInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R errorUnresolvedSuperConstructorInvoke(Send node, Element element,
+      NodeList arguments, Selector selector, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R errorUnresolvedThisConstructorInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R errorUnresolvedThisConstructorInvoke(Send node, Element element,
+      NodeList arguments, Selector selector, A arg) {
     apply(arguments, arg);
     return null;
   }
 
   @override
-  R visitLocalVariableDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      LocalVariableElement variable,
-      Node initializer,
-      A arg) {
+  R visitLocalVariableDeclaration(VariableDefinitions node, Node definition,
+      LocalVariableElement variable, Node initializer, A arg) {
     if (initializer != null) {
       apply(initializer, arg);
     }
@@ -7463,12 +5036,8 @@
   }
 
   @override
-  R visitParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      int index,
-      A arg) {
+  R visitParameterDeclaration(VariableDefinitions node, Node definition,
+      ParameterElement parameter, int index, A arg) {
     return null;
   }
 
@@ -7483,12 +5052,8 @@
   }
 
   @override
-  R visitLocalConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      LocalVariableElement variable,
-      ConstantExpression constant,
-      A arg) {
+  R visitLocalConstantDeclaration(VariableDefinitions node, Node definition,
+      LocalVariableElement variable, ConstantExpression constant, A arg) {
     return null;
   }
 
@@ -7503,12 +5068,8 @@
   }
 
   @override
-  R visitNamedParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      ConstantExpression defaultValue,
-      A arg) {
+  R visitNamedParameterDeclaration(VariableDefinitions node, Node definition,
+      ParameterElement parameter, ConstantExpression defaultValue, A arg) {
     return null;
   }
 
@@ -7524,12 +5085,8 @@
   }
 
   @override
-  R visitInstanceFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg) {
+  R visitInstanceFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg) {
     if (initializer != null) {
       apply(initializer, arg);
     }
@@ -7537,22 +5094,14 @@
   }
 
   @override
-  R visitStaticConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      ConstantExpression constant,
-      A arg) {
+  R visitStaticConstantDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, ConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitStaticFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg) {
+  R visitStaticFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg) {
     if (initializer != null) {
       apply(initializer, arg);
     }
@@ -7560,22 +5109,14 @@
   }
 
   @override
-  R visitTopLevelConstantDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      ConstantExpression constant,
-      A arg) {
+  R visitTopLevelConstantDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, ConstantExpression constant, A arg) {
     return null;
   }
 
   @override
-  R visitTopLevelFieldDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      FieldElement field,
-      Node initializer,
-      A arg) {
+  R visitTopLevelFieldDeclaration(VariableDefinitions node, Node definition,
+      FieldElement field, Node initializer, A arg) {
     if (initializer != null) {
       apply(initializer, arg);
     }
@@ -7584,39 +5125,27 @@
 
   @override
   R visitAbstractGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      A arg) {
+      FunctionExpression node, MethodElement getter, A arg) {
     return null;
   }
 
   @override
-  R visitAbstractSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      A arg) {
+  R visitAbstractSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, A arg) {
     applyParameters(parameters, arg);
     return null;
   }
 
   @override
   R visitInstanceGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg) {
+      FunctionExpression node, MethodElement getter, Node body, A arg) {
     apply(body, arg);
     return null;
   }
 
   @override
-  R visitInstanceSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitInstanceSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
@@ -7624,21 +5153,14 @@
 
   @override
   R visitStaticGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg) {
+      FunctionExpression node, MethodElement getter, Node body, A arg) {
     apply(body, arg);
     return null;
   }
 
   @override
-  R visitStaticSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitStaticSetterDeclaration(FunctionExpression node, MethodElement setter,
+      NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
@@ -7646,21 +5168,14 @@
 
   @override
   R visitTopLevelGetterDeclaration(
-      FunctionExpression node,
-      MethodElement getter,
-      Node body,
-      A arg) {
+      FunctionExpression node, MethodElement getter, Node body, A arg) {
     apply(body, arg);
     return null;
   }
 
   @override
-  R visitTopLevelSetterDeclaration(
-      FunctionExpression node,
-      MethodElement setter,
-      NodeList parameters,
-      Node body,
-      A arg) {
+  R visitTopLevelSetterDeclaration(FunctionExpression node,
+      MethodElement setter, NodeList parameters, Node body, A arg) {
     applyParameters(parameters, arg);
     apply(body, arg);
     return null;
@@ -7670,8 +5185,7 @@
 /// AST visitor that visits all normal [Send] and [SendSet] nodes using the
 /// [SemanticVisitor].
 class TraversalVisitor<R, A> extends SemanticVisitor<R, A>
-    with TraversalSendMixin<R, A>,
-         TraversalDeclarationMixin<R, A> {
+    with TraversalSendMixin<R, A>, TraversalDeclarationMixin<R, A> {
   TraversalVisitor(TreeElements elements) : super(elements);
 
   SemanticSendVisitor<R, A> get sendVisitor => this;
@@ -7718,350 +5232,204 @@
 /// class members are handled uniformly.
 abstract class BaseImplementationOfStaticsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-  R handleStaticFieldGet(
-      Send node,
-      FieldElement field,
-      A arg);
+  R handleStaticFieldGet(Send node, FieldElement field, A arg);
 
-  R handleStaticFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R handleStaticFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg);
 
-  R handleStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+  R handleStaticFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
 
-  R handleStaticFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg);
+  R handleStaticFunctionGet(Send node, MethodElement function, A arg);
 
-  R handleStaticFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R handleStaticFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg);
 
-  R handleStaticFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R handleStaticFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg);
 
-  R handleStaticGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg);
+  R handleStaticGetterGet(Send node, FunctionElement getter, A arg);
 
-  R handleStaticGetterSet(
-      Send node,
-      FunctionElement getter,
-      Node rhs,
-      A arg);
+  R handleStaticGetterSet(Send node, FunctionElement getter, Node rhs, A arg);
 
-  R handleStaticGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R handleStaticGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
-  R handleStaticSetterGet(
-      SendSet node,
-      FunctionElement setter,
-      A arg);
+  R handleStaticSetterGet(SendSet node, FunctionElement setter, A arg);
 
   R handleStaticSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg);
+      SendSet node, FunctionElement setter, Node rhs, A arg);
 
-  R handleStaticSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R handleStaticSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   R handleFinalStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg);
+      SendSet node, FieldElement field, Node rhs, A arg);
 
   R handleStaticFunctionSet(
-      SendSet node,
-      MethodElement function,
-      Node rhs,
-      A arg);
+      SendSet node, MethodElement function, Node rhs, A arg);
 
   @override
-  R visitStaticFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitStaticFieldGet(Send node, FieldElement field, A arg) {
     return handleStaticFieldGet(node, field, arg);
   }
 
   @override
-  R visitStaticFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return handleStaticFieldInvoke(node, field, arguments, callStructure, arg);
   }
 
   @override
-  R visitStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitStaticFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     return handleStaticFieldSet(node, field, rhs, arg);
   }
 
   @override
-  R visitStaticFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg) {
+  R visitStaticFunctionGet(Send node, MethodElement function, A arg) {
     return handleStaticFunctionGet(node, function, arg);
   }
 
   @override
-  R visitStaticFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleStaticFunctionInvoke(
         node, function, arguments, callStructure, arg);
   }
 
   @override
-  R visitStaticFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleStaticFunctionIncompatibleInvoke(
         node, function, arguments, callStructure, arg);
   }
 
   @override
-  R visitStaticGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitStaticGetterGet(Send node, FunctionElement getter, A arg) {
     return handleStaticGetterGet(node, getter, arg);
   }
 
   @override
-  R visitStaticGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleStaticGetterInvoke(
         node, getter, arguments, callStructure, arg);
   }
 
   @override
   R visitStaticSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement setter, Node rhs, A arg) {
     return handleStaticSetterSet(node, setter, rhs, arg);
   }
 
   @override
-  R visitTopLevelFieldGet(
-      Send node,
-      FieldElement field,
-      A arg) {
+  R visitTopLevelFieldGet(Send node, FieldElement field, A arg) {
     return handleStaticFieldGet(node, field, arg);
   }
 
   @override
-  R visitTopLevelFieldInvoke(
-      Send node,
-      FieldElement field,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFieldInvoke(Send node, FieldElement field, NodeList arguments,
+      CallStructure callStructure, A arg) {
     return handleStaticFieldInvoke(node, field, arguments, callStructure, arg);
   }
 
   @override
-  R visitTopLevelFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+  R visitTopLevelFieldSet(SendSet node, FieldElement field, Node rhs, A arg) {
     return handleStaticFieldSet(node, field, rhs, arg);
   }
 
   @override
-  R visitTopLevelFunctionGet(
-      Send node,
-      MethodElement function,
-      A arg) {
+  R visitTopLevelFunctionGet(Send node, MethodElement function, A arg) {
     return handleStaticFunctionGet(node, function, arg);
   }
 
   @override
-  R visitTopLevelFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFunctionInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleStaticFunctionInvoke(
         node, function, arguments, callStructure, arg);
   }
 
   @override
-  R visitTopLevelFunctionIncompatibleInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelFunctionIncompatibleInvoke(Send node, MethodElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleStaticFunctionIncompatibleInvoke(
         node, function, arguments, callStructure, arg);
   }
 
   @override
-  R visitTopLevelGetterGet(
-      Send node,
-      FunctionElement getter,
-      A arg) {
+  R visitTopLevelGetterGet(Send node, FunctionElement getter, A arg) {
     return handleStaticGetterGet(node, getter, arg);
   }
 
   @override
   R visitTopLevelGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement getter, Node rhs, A arg) {
     return handleStaticGetterSet(node, getter, rhs, arg);
   }
 
   @override
-  R visitTopLevelGetterInvoke(
-      Send node,
-      FunctionElement getter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelGetterInvoke(Send node, FunctionElement getter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleStaticGetterInvoke(
         node, getter, arguments, callStructure, arg);
   }
 
   @override
   R visitTopLevelSetterSet(
-      SendSet node,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement setter, Node rhs, A arg) {
     return handleStaticSetterSet(node, setter, rhs, arg);
   }
 
   @override
-  R visitStaticSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitStaticSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleStaticSetterInvoke(
         node, setter, arguments, callStructure, arg);
   }
 
   @override
-  R visitTopLevelSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTopLevelSetterInvoke(Send node, FunctionElement setter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleStaticSetterInvoke(
         node, setter, arguments, callStructure, arg);
   }
 
   @override
-  R visitStaticSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg) {
+  R visitStaticSetterGet(Send node, FunctionElement setter, A arg) {
     return handleStaticSetterGet(node, setter, arg);
   }
 
   @override
   R visitStaticGetterSet(
-      SendSet node,
-      FunctionElement getter,
-      Node rhs,
-      A arg) {
+      SendSet node, FunctionElement getter, Node rhs, A arg) {
     return handleStaticGetterSet(node, getter, rhs, arg);
   }
 
   @override
-  R visitTopLevelSetterGet(
-      Send node,
-      FunctionElement setter,
-      A arg) {
+  R visitTopLevelSetterGet(Send node, FunctionElement setter, A arg) {
     return handleStaticSetterGet(node, setter, arg);
   }
 
   @override
   R visitFinalStaticFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      SendSet node, FieldElement field, Node rhs, A arg) {
     return handleFinalStaticFieldSet(node, field, rhs, arg);
   }
 
   @override
   R visitFinalTopLevelFieldSet(
-      SendSet node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
+      SendSet node, FieldElement field, Node rhs, A arg) {
     return handleFinalStaticFieldSet(node, field, rhs, arg);
   }
 
   @override
-  R visitStaticFunctionSet(
-      Send node,
-      MethodElement function,
-      Node rhs,
-      A arg) {
+  R visitStaticFunctionSet(Send node, MethodElement function, Node rhs, A arg) {
     return handleStaticFunctionSet(node, function, rhs, arg);
   }
 
   @override
   R visitTopLevelFunctionSet(
-      Send node,
-      MethodElement function,
-      Node rhs,
-      A arg) {
+      Send node, MethodElement function, Node rhs, A arg) {
     return handleStaticFunctionSet(node, function, rhs, arg);
   }
 }
@@ -8073,436 +5441,271 @@
 /// class members are handled uniformly.
 abstract class BaseImplementationOfStaticCompoundsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-  R handleStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg);
 
   R handleStaticFieldPostfixPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg,
+      Send node, FieldElement field, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleStaticGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleStaticGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
-  R handleStaticGetterSetterPostfixPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg,
+  R handleStaticGetterSetterPostfixPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleStaticMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleStaticMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
-  R handleStaticMethodSetterPostfixPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg,
+  R handleStaticMethodSetterPostfixPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleFinalStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleFinalStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg);
 
   R handleFinalStaticFieldPostfixPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg,
+      Send node, FieldElement field, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleStaticMethodCompound(
-      Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleStaticMethodCompound(Send node, FunctionElement method,
+      AssignmentOperator operator, Node rhs, A arg);
 
   R handleStaticMethodPostfixPrefix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg,
+      Send node, FunctionElement method, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleUnresolvedStaticGetterCompound(
-      Send node,
-      Element element,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleUnresolvedStaticGetterCompound(Send node, Element element,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
 
-  R handleUnresolvedStaticGetterPostfixPrefix(
-      Send node,
-      Element element,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg,
+  R handleUnresolvedStaticGetterPostfixPrefix(Send node, Element element,
+      FunctionElement setter, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleUnresolvedStaticSetterCompound(
-      Send node,
-      FunctionElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleUnresolvedStaticSetterCompound(Send node, FunctionElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg);
 
-  R handleUnresolvedStaticSetterPostfixPrefix(
-      Send node,
-      FunctionElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg,
+  R handleUnresolvedStaticSetterPostfixPrefix(Send node, FunctionElement getter,
+      Element element, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   @override
-  R visitStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticFieldCompound(node, field, operator, rhs, arg);
   }
 
   @override
   R visitStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleStaticFieldPostfixPrefix(
-        node, field, operator, arg, isPrefix: false);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleStaticFieldPostfixPrefix(node, field, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleStaticFieldPostfixPrefix(
-        node, field, operator, arg, isPrefix: true);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleStaticFieldPostfixPrefix(node, field, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitStaticGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticGetterSetterCompound(
         node, getter, setter, operator, rhs, arg);
   }
 
   @override
-  R visitStaticGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticGetterSetterPostfixPrefix(
-        node, getter, setter, operator, arg, isPrefix: false);
+        node, getter, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitStaticGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticGetterSetterPostfixPrefix(
-        node, getter, setter, operator, arg, isPrefix: true);
+        node, getter, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitStaticMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitStaticMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticMethodSetterCompound(
         node, method, setter, operator, rhs, arg);
   }
 
   @override
-  R visitStaticMethodSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticMethodSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticMethodSetterPostfixPrefix(
-        node, getter, setter, operator, arg, isPrefix: false);
+        node, getter, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitStaticMethodSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticMethodSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticMethodSetterPostfixPrefix(
-        node, getter, setter, operator, arg, isPrefix: true);
+        node, getter, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticFieldCompound(node, field, operator, rhs, arg);
   }
 
   @override
   R visitTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleStaticFieldPostfixPrefix(
-        node, field, operator, arg, isPrefix: false);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleStaticFieldPostfixPrefix(node, field, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleStaticFieldPostfixPrefix(
-        node, field, operator, arg, isPrefix: true);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleStaticFieldPostfixPrefix(node, field, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitTopLevelGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticGetterSetterCompound(
         node, getter, setter, operator, rhs, arg);
   }
 
   @override
-  R visitTopLevelGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticGetterSetterPostfixPrefix(
-        node, getter, setter, operator, arg, isPrefix: false);
+        node, getter, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitTopLevelGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticGetterSetterPostfixPrefix(
-        node, getter, setter, operator, arg, isPrefix: true);
+        node, getter, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitTopLevelMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTopLevelMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticMethodSetterCompound(
         node, method, setter, operator, rhs, arg);
   }
 
   @override
-  R visitTopLevelMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticMethodSetterPostfixPrefix(
-        node, method, setter, operator, arg, isPrefix: false);
+        node, method, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitTopLevelMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticMethodSetterPostfixPrefix(
-        node, method, setter, operator, arg, isPrefix: true);
+        node, method, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitFinalStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleFinalStaticFieldCompound(
-        node, field, operator, rhs, arg);
+  R visitFinalStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleFinalStaticFieldCompound(node, field, operator, rhs, arg);
   }
 
   @override
   R visitFinalStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleFinalStaticFieldPostfixPrefix(
-        node, field, operator, arg, isPrefix: false);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleFinalStaticFieldPostfixPrefix(node, field, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitFinalStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleFinalStaticFieldPostfixPrefix(
-        node, field, operator, arg, isPrefix: true);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleFinalStaticFieldPostfixPrefix(node, field, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitStaticMethodCompound(
-      Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticMethodCompound(
-        node, method, operator, rhs, arg);
+  R visitStaticMethodCompound(Send node, FunctionElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticMethodCompound(node, method, operator, rhs, arg);
   }
 
   @override
   R visitStaticMethodPostfix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg) {
-    return handleStaticMethodPostfixPrefix(
-        node, method, operator, arg, isPrefix: false);
+      Send node, FunctionElement method, IncDecOperator operator, A arg) {
+    return handleStaticMethodPostfixPrefix(node, method, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitStaticMethodPrefix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg) {
-    return handleStaticMethodPostfixPrefix(
-        node, method, operator, arg, isPrefix: true);
+      Send node, FunctionElement method, IncDecOperator operator, A arg) {
+    return handleStaticMethodPostfixPrefix(node, method, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitUnresolvedStaticGetterCompound(
-      Send node,
-      Element element,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedStaticGetterCompound(Send node, Element element,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return handleUnresolvedStaticGetterCompound(
         node, element, setter, operator, rhs, arg);
   }
 
   @override
-  R visitUnresolvedStaticGetterPostfix(
-      Send node,
-      Element element,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticGetterPostfix(Send node, Element element,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleUnresolvedStaticGetterPostfixPrefix(
-        node, element, setter, operator, arg, isPrefix: false);
+        node, element, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitUnresolvedStaticGetterPrefix(
-      Send node,
-      Element element,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticGetterPrefix(Send node, Element element,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleUnresolvedStaticGetterPostfixPrefix(
-        node, element, setter, operator, arg, isPrefix: true);
+        node, element, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitUnresolvedStaticSetterCompound(
-      Send node,
-      FunctionElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedStaticSetterCompound(Send node, FunctionElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
     return handleUnresolvedStaticSetterCompound(
         node, getter, element, operator, rhs, arg);
   }
 
   @override
-  R visitUnresolvedStaticSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticSetterPostfix(Send node, FunctionElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleUnresolvedStaticSetterPostfixPrefix(
-        node, getter, element, operator, arg, isPrefix: false);
+        node, getter, element, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitUnresolvedStaticSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticSetterPrefix(Send node, FunctionElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleUnresolvedStaticSetterPostfixPrefix(
-        node, getter, element, operator, arg, isPrefix: true);
+        node, getter, element, operator, arg,
+        isPrefix: true);
   }
 }
 
@@ -8513,45 +5716,24 @@
 /// and local functions, captured or not, are handled uniformly.
 abstract class BaseImplementationOfLocalsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-  R handleLocalGet(
-      Send node,
-      LocalElement element,
-      A arg);
+  R handleLocalGet(Send node, LocalElement element, A arg);
 
-  R handleLocalInvoke(
-      Send node,
-      LocalElement element,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R handleLocalInvoke(Send node, LocalElement element, NodeList arguments,
+      CallStructure callStructure, A arg);
 
-  R handleLocalSet(
-      SendSet node,
-      LocalElement element,
-      Node rhs,
-      A arg);
+  R handleLocalSet(SendSet node, LocalElement element, Node rhs, A arg);
 
   R handleImmutableLocalSet(
-      SendSet node,
-      LocalElement element,
-      Node rhs,
-      A arg);
+      SendSet node, LocalElement element, Node rhs, A arg);
 
   @override
-  R visitLocalFunctionGet(
-      Send node,
-      LocalFunctionElement function,
-      A arg) {
+  R visitLocalFunctionGet(Send node, LocalFunctionElement function, A arg) {
     return handleLocalGet(node, function, arg);
   }
 
   @override
-  R visitLocalFunctionInvoke(
-      Send node,
-      LocalFunctionElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitLocalFunctionInvoke(Send node, LocalFunctionElement function,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleLocalInvoke(node, function, arguments, callStructure, arg);
   }
 
@@ -8566,83 +5748,54 @@
   }
 
   @override
-  R visitLocalVariableGet(
-      Send node,
-      LocalVariableElement variable,
-      A arg) {
+  R visitLocalVariableGet(Send node, LocalVariableElement variable, A arg) {
     return handleLocalGet(node, variable, arg);
   }
 
   @override
-  R visitLocalVariableInvoke(
-      Send node,
-      LocalVariableElement variable,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitLocalVariableInvoke(Send node, LocalVariableElement variable,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleLocalInvoke(node, variable, arguments, callStructure, arg);
   }
 
   @override
   R visitLocalVariableSet(
-      SendSet node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalVariableElement variable, Node rhs, A arg) {
     return handleLocalSet(node, variable, rhs, arg);
   }
 
   @override
-  R visitParameterGet(
-      Send node,
-      ParameterElement parameter,
-      A arg) {
+  R visitParameterGet(Send node, ParameterElement parameter, A arg) {
     return handleLocalGet(node, parameter, arg);
   }
 
   @override
-  R visitParameterInvoke(
-      Send node,
-      ParameterElement parameter,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitParameterInvoke(Send node, ParameterElement parameter,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleLocalInvoke(node, parameter, arguments, callStructure, arg);
   }
 
   @override
   R visitParameterSet(
-      SendSet node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      SendSet node, ParameterElement parameter, Node rhs, A arg) {
     return handleLocalSet(node, parameter, rhs, arg);
   }
 
   @override
   R visitFinalLocalVariableSet(
-      SendSet node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalVariableElement variable, Node rhs, A arg) {
     return handleImmutableLocalSet(node, variable, rhs, arg);
   }
 
   @override
   R visitFinalParameterSet(
-      SendSet node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
+      SendSet node, ParameterElement parameter, Node rhs, A arg) {
     return handleImmutableLocalSet(node, parameter, rhs, arg);
   }
 
   @override
   R visitLocalFunctionSet(
-      SendSet node,
-      LocalFunctionElement function,
-      Node rhs,
-      A arg) {
+      SendSet node, LocalFunctionElement function, Node rhs, A arg) {
     return handleImmutableLocalSet(node, function, rhs, arg);
   }
 }
@@ -8654,78 +5807,51 @@
 /// and local functions, captured or not, are handled uniformly.
 abstract class BaseImplementationOfLocalCompoundsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-  R handleLocalCompound(
-      Send node,
-      LocalElement element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleLocalCompound(Send node, LocalElement element,
+      AssignmentOperator operator, Node rhs, A arg);
 
   R handleLocalPostfixPrefix(
-      Send node,
-      LocalElement element,
-      IncDecOperator operator,
-      A arg,
+      Send node, LocalElement element, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   @override
-  R visitLocalVariableCompound(
-      Send node,
-      LocalVariableElement variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleLocalCompound(node, variable, operator, rhs, arg);
   }
 
   @override
-  R visitLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
-    return handleLocalPostfixPrefix(
-        node, variable, operator, arg, isPrefix: false);
+  R visitLocalVariablePostfix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
+    return handleLocalPostfixPrefix(node, variable, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
-    return handleLocalPostfixPrefix(
-        node, variable, operator, arg, isPrefix: true);
+  R visitLocalVariablePrefix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
+    return handleLocalPostfixPrefix(node, variable, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleLocalCompound(node, parameter, operator, rhs, arg);
   }
 
   @override
   R visitParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
-    return handleLocalPostfixPrefix(
-        node, parameter, operator, arg, isPrefix: false);
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
+    return handleLocalPostfixPrefix(node, parameter, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
-    return handleLocalPostfixPrefix(
-        node, parameter, operator, arg, isPrefix: true);
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
+    return handleLocalPostfixPrefix(node, parameter, operator, arg,
+        isPrefix: true);
   }
 }
 
@@ -8736,119 +5862,76 @@
 /// handled uniformly.
 abstract class BaseImplementationOfConstantsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-  R handleConstantGet(
-      Node node,
-      ConstantExpression constant,
-      A arg);
+  R handleConstantGet(Node node, ConstantExpression constant, A arg);
 
-  R handleConstantInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R handleConstantInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg);
 
   @override
-  R visitClassTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitClassTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return handleConstantGet(node, constant, arg);
   }
 
   @override
-  R visitClassTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitClassTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleConstantInvoke(node, constant, arguments, callStructure, arg);
   }
 
   @override
   R visitConstConstructorInvoke(
-      NewExpression node,
-      ConstructedConstantExpression constant,
-      A arg) {
+      NewExpression node, ConstructedConstantExpression constant, A arg) {
     return handleConstantGet(node, constant, arg);
   }
 
   @override
-  R visitBoolFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      BoolFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitBoolFromEnvironmentConstructorInvoke(NewExpression node,
+      BoolFromEnvironmentConstantExpression constant, A arg) {
     return handleConstantGet(node, constant, arg);
   }
 
   @override
-  R visitIntFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      IntFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitIntFromEnvironmentConstructorInvoke(NewExpression node,
+      IntFromEnvironmentConstantExpression constant, A arg) {
     return handleConstantGet(node, constant, arg);
   }
 
   @override
-  R visitStringFromEnvironmentConstructorInvoke(
-      NewExpression node,
-      StringFromEnvironmentConstantExpression constant,
-      A arg) {
+  R visitStringFromEnvironmentConstructorInvoke(NewExpression node,
+      StringFromEnvironmentConstantExpression constant, A arg) {
     return handleConstantGet(node, constant, arg);
   }
 
   @override
-  R visitConstantGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitConstantGet(Send node, ConstantExpression constant, A arg) {
     return handleConstantGet(node, constant, arg);
   }
 
   @override
-  R visitConstantInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitConstantInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleConstantInvoke(node, constant, arguments, callStructure, arg);
   }
 
   @override
-  R visitDynamicTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitDynamicTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return handleConstantGet(node, constant, arg);
   }
 
   @override
-  R visitDynamicTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitDynamicTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleConstantInvoke(node, constant, arguments, callStructure, arg);
   }
 
   @override
-  R visitTypedefTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      A arg) {
+  R visitTypedefTypeLiteralGet(Send node, ConstantExpression constant, A arg) {
     return handleConstantGet(node, constant, arg);
   }
 
   @override
-  R visitTypedefTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg) {
+  R visitTypedefTypeLiteralInvoke(Send node, ConstantExpression constant,
+      NodeList arguments, CallStructure callStructure, A arg) {
     return handleConstantInvoke(node, constant, arguments, callStructure, arg);
   }
 }
@@ -8861,108 +5944,62 @@
 /// handled uniformly.
 abstract class BaseImplementationOfDynamicsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-  R handleDynamicGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg);
+  R handleDynamicGet(Send node, Node receiver, Name name, A arg);
 
   R handleDynamicInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg);
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg);
 
-  R handleDynamicSet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg);
+  R handleDynamicSet(SendSet node, Node receiver, Name name, Node rhs, A arg);
 
   @override
-  R visitDynamicPropertyGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg) {
+  R visitDynamicPropertyGet(Send node, Node receiver, Name name, A arg) {
     return handleDynamicGet(node, receiver, name, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertyGet(
-      Send node,
-      Node receiver,
-      Name name,
-      A arg) {
+      Send node, Node receiver, Name name, A arg) {
     // TODO(johnniwinther): should these redirect to handleDynamicX?
     return handleDynamicGet(node, receiver, name, arg);
   }
 
   @override
   R visitDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg) {
     return handleDynamicInvoke(node, receiver, arguments, selector, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, Node receiver, NodeList arguments, Selector selector, A arg) {
     return handleDynamicInvoke(node, receiver, arguments, selector, arg);
   }
 
   @override
   R visitDynamicPropertySet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      SendSet node, Node receiver, Name name, Node rhs, A arg) {
     return handleDynamicSet(node, receiver, name, rhs, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertySet(
-      SendSet node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      SendSet node, Node receiver, Name name, Node rhs, A arg) {
     return handleDynamicSet(node, receiver, name, rhs, arg);
   }
 
   @override
-  R visitThisPropertyGet(
-      Send node,
-      Name name,
-      A arg) {
+  R visitThisPropertyGet(Send node, Name name, A arg) {
     return handleDynamicGet(node, null, name, arg);
   }
 
   @override
   R visitThisPropertyInvoke(
-      Send node,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+      Send node, NodeList arguments, Selector selector, A arg) {
     return handleDynamicInvoke(node, null, arguments, selector, arg);
   }
 
   @override
-  R visitThisPropertySet(
-      SendSet node,
-      Name name,
-      Node rhs,
-      A arg) {
+  R visitThisPropertySet(SendSet node, Name name, Node rhs, A arg) {
     return handleDynamicSet(node, null, name, rhs, arg);
   }
 }
@@ -8975,148 +6012,89 @@
 /// handled uniformly.
 abstract class BaseImplementationOfDynamicCompoundsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-  R handleDynamicCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg);
+  R handleDynamicCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg);
 
   R handleDynamicPostfixPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg,
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   R handleDynamicIndexPostfixPrefix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg,
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   @override
-  R visitDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleDynamicCompound(
-        node, receiver, name, operator, rhs, arg);
+  R visitDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleDynamicCompound(node, receiver, name, operator, rhs, arg);
   }
 
   @override
-  R visitIfNotNullDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleDynamicCompound(
-        node, receiver, name, operator, rhs, arg);
+  R visitIfNotNullDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleDynamicCompound(node, receiver, name, operator, rhs, arg);
   }
 
   @override
   R visitDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicPostfixPrefix(
-        node, receiver, name, operator, arg, isPrefix: false);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicPostfixPrefix(node, receiver, name, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitIfNotNullDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicPostfixPrefix(
-        node, receiver, name, operator, arg, isPrefix: false);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicPostfixPrefix(node, receiver, name, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicPostfixPrefix(
-        node, receiver, name, operator, arg, isPrefix: true);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicPostfixPrefix(node, receiver, name, operator, arg,
+        isPrefix: true);
   }
 
   @override
   R visitIfNotNullDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicPostfixPrefix(
-        node, receiver, name, operator, arg, isPrefix: true);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicPostfixPrefix(node, receiver, name, operator, arg,
+        isPrefix: true);
   }
 
   @override
   R visitThisPropertyCompound(
-      Send node,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+      Send node, Name name, AssignmentOperator operator, Node rhs, A arg) {
     return handleDynamicCompound(node, null, name, operator, rhs, arg);
   }
 
   @override
   R visitThisPropertyPostfix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicPostfixPrefix(
-        node, null, name, operator, arg, isPrefix: false);
+      Send node, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicPostfixPrefix(node, null, name, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitThisPropertyPrefix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicPostfixPrefix(
-        node, null, name, operator, arg, isPrefix: true);
+      Send node, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicPostfixPrefix(node, null, name, operator, arg,
+        isPrefix: true);
   }
 
   @override
   R visitIndexPostfix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicIndexPostfixPrefix(
-        node, receiver, index, operator, arg, isPrefix: false);
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg) {
+    return handleDynamicIndexPostfixPrefix(node, receiver, index, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitIndexPrefix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicIndexPostfixPrefix(
-        node, receiver, index, operator, arg, isPrefix: true);
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg) {
+    return handleDynamicIndexPostfixPrefix(node, receiver, index, operator, arg,
+        isPrefix: true);
   }
 }
 
@@ -9200,7 +6178,6 @@
 /// Simplified handling of compound assignments and prefix/postfix expressions.
 abstract class BaseImplementationOfCompoundsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-
   /// Handle a super compounds, like `super.foo += 42` or `--super.bar`.
   R handleSuperCompounds(
       SendSet node,
@@ -9224,1067 +6201,663 @@
   /// Handle a local compounds, like `foo += 42` or `--bar`. If [isSetterValid]
   /// is false [local] is unassignable.
   R handleLocalCompounds(
-      SendSet node,
-      LocalElement local,
-      CompoundRhs rhs,
-      A arg,
+      SendSet node, LocalElement local, CompoundRhs rhs, A arg,
       {bool isSetterValid});
 
   /// Handle a compounds on a type literal constant, like `Object += 42` or
   /// `--Object`.
   R handleTypeLiteralConstantCompounds(
-      SendSet node,
-      ConstantExpression constant,
-      CompoundRhs rhs,
-      A arg);
+      SendSet node, ConstantExpression constant, CompoundRhs rhs, A arg);
 
   /// Handle a compounds on a type variable type literal, like `T += 42` or
   /// `--T`.
   R handleTypeVariableTypeLiteralCompounds(
-      SendSet node,
-      TypeVariableElement typeVariable,
-      CompoundRhs rhs,
-      A arg);
+      SendSet node, TypeVariableElement typeVariable, CompoundRhs rhs, A arg);
 
   /// Handle a dynamic compounds, like `o.foo += 42` or `--o.foo`. [receiver] is
   /// `null` for properties on `this`, like `--this.foo` or `--foo`.
   R handleDynamicCompounds(
-      Send node,
-      Node receiver,
-      Name name,
-      CompoundRhs rhs,
-      A arg);
+      Send node, Node receiver, Name name, CompoundRhs rhs, A arg);
 
-  R visitDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleDynamicCompounds(
-        node,
-        receiver,
-        name,
-        new AssignmentCompound(operator, rhs),
-        arg);
+        node, receiver, name, new AssignmentCompound(operator, rhs), arg);
   }
 
-  R visitIfNotNullDynamicPropertyCompound(
-      Send node,
-      Node receiver,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitIfNotNullDynamicPropertyCompound(Send node, Node receiver, Name name,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleDynamicCompounds(
-        node,
-        receiver,
-        name,
-        new AssignmentCompound(operator, rhs),
-        arg);
+        node, receiver, name, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
   R visitThisPropertyCompound(
-      Send node,
-      Name name,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+      Send node, Name name, AssignmentOperator operator, Node rhs, A arg) {
     return handleDynamicCompounds(
-        node,
-        null,
-        name,
-        new AssignmentCompound(operator, rhs),
-        arg);
+        node, null, name, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleLocalCompounds(
-        node,
-        parameter,
-        new AssignmentCompound(operator, rhs),
-        arg,
+        node, parameter, new AssignmentCompound(operator, rhs), arg,
         isSetterValid: true);
   }
 
   @override
-  R visitFinalParameterCompound(
-      Send node,
-      ParameterElement parameter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalParameterCompound(Send node, ParameterElement parameter,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleLocalCompounds(
-        node,
-        parameter,
-        new AssignmentCompound(operator, rhs),
-        arg,
+        node, parameter, new AssignmentCompound(operator, rhs), arg,
         isSetterValid: false);
   }
 
   @override
-  R visitLocalVariableCompound(
-      Send node,
-      LocalVariableElement variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleLocalCompounds(
-        node,
-        variable,
-        new AssignmentCompound(operator, rhs),
-        arg,
+        node, variable, new AssignmentCompound(operator, rhs), arg,
         isSetterValid: true);
   }
 
   @override
-  R visitFinalLocalVariableCompound(
-      Send node,
-      LocalVariableElement variable,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitFinalLocalVariableCompound(Send node, LocalVariableElement variable,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleLocalCompounds(
-        node,
-        variable,
-        new AssignmentCompound(operator, rhs),
-        arg,
+        node, variable, new AssignmentCompound(operator, rhs), arg,
         isSetterValid: false);
   }
 
   @override
-  R visitLocalFunctionCompound(
-      Send node,
-      LocalFunctionElement function,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitLocalFunctionCompound(Send node, LocalFunctionElement function,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleLocalCompounds(
-        node,
-        function,
-        new AssignmentCompound(operator, rhs),
-        arg,
+        node, function, new AssignmentCompound(operator, rhs), arg,
         isSetterValid: false);
   }
 
   @override
-  R visitStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.FIELD, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitFinalStaticFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        field, CompoundGetter.FIELD,
-        null, CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitFinalStaticFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, field, CompoundGetter.FIELD, null,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitStaticGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitStaticGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, getter, CompoundGetter.GETTER, setter,
+        CompoundSetter.SETTER, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitStaticMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        method, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitStaticMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, method, CompoundGetter.METHOD, setter,
+        CompoundSetter.SETTER, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.FIELD, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitFinalTopLevelFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        field, CompoundGetter.FIELD,
-        null, CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitFinalTopLevelFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, field, CompoundGetter.FIELD, null,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitTopLevelGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitTopLevelGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, getter, CompoundGetter.GETTER, setter,
+        CompoundSetter.SETTER, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitTopLevelMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        method, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitTopLevelMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, method, CompoundGetter.METHOD, setter,
+        CompoundSetter.SETTER, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperCompounds(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.FIELD, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitFinalSuperFieldCompound(
-      Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitFinalSuperFieldCompound(Send node, FieldElement field,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperCompounds(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitSuperGetterSetterCompound(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitSuperGetterSetterCompound(Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperCompounds(node, getter, CompoundGetter.GETTER, setter,
+        CompoundSetter.SETTER, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitSuperMethodSetterCompound(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        method, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitSuperMethodSetterCompound(Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperCompounds(node, method, CompoundGetter.METHOD, setter,
+        CompoundSetter.SETTER, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitSuperFieldSetterCompound(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        field, CompoundGetter.FIELD,
-        setter, CompoundSetter.SETTER,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitSuperFieldSetterCompound(Send node, FieldElement field,
+      FunctionElement setter, AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperCompounds(node, field, CompoundGetter.FIELD, setter,
+        CompoundSetter.SETTER, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitSuperGetterFieldCompound(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        getter, CompoundGetter.GETTER,
-        field, CompoundSetter.FIELD,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitSuperGetterFieldCompound(Send node, FunctionElement getter,
+      FieldElement field, AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperCompounds(node, getter, CompoundGetter.GETTER, field,
+        CompoundSetter.FIELD, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitClassTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitClassTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new AssignmentCompound(operator, rhs),
-        arg);
+        node, constant, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitTypedefTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTypedefTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new AssignmentCompound(operator, rhs),
-        arg);
+        node, constant, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitTypeVariableTypeLiteralCompound(
-      Send node,
-      TypeVariableElement element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitTypeVariableTypeLiteralCompound(Send node, TypeVariableElement element,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleTypeVariableTypeLiteralCompounds(
-        node,
-        element,
-        new AssignmentCompound(operator, rhs),
-        arg);
+        node, element, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitDynamicTypeLiteralCompound(
-      Send node,
-      ConstantExpression constant,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitDynamicTypeLiteralCompound(Send node, ConstantExpression constant,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new AssignmentCompound(operator, rhs),
-        arg);
+        node, constant, new AssignmentCompound(operator, rhs), arg);
   }
 
-
   R visitDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicCompounds(
-        node,
-        receiver,
-        name,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicCompounds(node, receiver, name,
+        new IncDecCompound(CompoundKind.PREFIX, operator), arg);
   }
 
   R visitIfNotNullDynamicPropertyPrefix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicCompounds(
-        node,
-        receiver,
-        name,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicCompounds(node, receiver, name,
+        new IncDecCompound(CompoundKind.PREFIX, operator), arg);
   }
 
   @override
   R visitParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return handleLocalCompounds(
-        node,
-        parameter,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg,
+        node, parameter, new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isSetterValid: true);
   }
 
   @override
-  R visitLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalVariablePrefix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return handleLocalCompounds(
-        node,
-        variable,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg,
+        node, variable, new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isSetterValid: true);
   }
 
   @override
-  R visitLocalFunctionPrefix(
-      Send node,
-      LocalFunctionElement function,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalFunctionPrefix(Send node, LocalFunctionElement function,
+      IncDecOperator operator, A arg) {
     return handleLocalCompounds(
-        node,
-        function,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg,
+        node, function, new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isSetterValid: false);
   }
 
-
   R visitThisPropertyPrefix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicCompounds(
-        node,
-        null,
-        name,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg);
+      Send node, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicCompounds(node, null, name,
+        new IncDecCompound(CompoundKind.PREFIX, operator), arg);
   }
 
   @override
   R visitStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
-  R visitStaticGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
-
-  R visitStaticMethodSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticMethodSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        getter, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
+        getter,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
   R visitTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
-  R visitTopLevelGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
-  R visitTopLevelMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        method, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
+        method,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
   R visitSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
-  R visitSuperFieldFieldPrefix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPrefix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        readField, CompoundGetter.FIELD,
-        writtenField, CompoundSetter.FIELD,
+        readField,
+        CompoundGetter.FIELD,
+        writtenField,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
-  R visitSuperFieldSetterPrefix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPrefix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        field, CompoundGetter.FIELD,
-        setter, CompoundSetter.SETTER,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg);
-  }
-
-
-  R visitSuperGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
+        field,
+        CompoundGetter.FIELD,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
-  R visitSuperGetterFieldPrefix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        getter, CompoundGetter.GETTER,
-        field, CompoundSetter.FIELD,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
-  R visitSuperMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPrefix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        method, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
+        getter,
+        CompoundGetter.GETTER,
+        field,
+        CompoundSetter.FIELD,
+        new IncDecCompound(CompoundKind.PREFIX, operator),
+        arg);
+  }
+
+  @override
+  R visitSuperMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
+    return handleSuperCompounds(
+        node,
+        method,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.PREFIX, operator),
         arg);
   }
 
   @override
   R visitClassTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg);
+        node, constant, new IncDecCompound(CompoundKind.PREFIX, operator), arg);
   }
 
   @override
   R visitTypedefTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg);
+        node, constant, new IncDecCompound(CompoundKind.PREFIX, operator), arg);
   }
 
   @override
   R visitTypeVariableTypeLiteralPrefix(
-      Send node,
-      TypeVariableElement element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, TypeVariableElement element, IncDecOperator operator, A arg) {
     return handleTypeVariableTypeLiteralCompounds(
-        node,
-        element,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg);
+        node, element, new IncDecCompound(CompoundKind.PREFIX, operator), arg);
   }
 
   @override
   R visitDynamicTypeLiteralPrefix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
     return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg);
+        node, constant, new IncDecCompound(CompoundKind.PREFIX, operator), arg);
   }
 
   @override
   R visitDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicCompounds(
-        node,
-        receiver,
-        name,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicCompounds(node, receiver, name,
+        new IncDecCompound(CompoundKind.POSTFIX, operator), arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertyPostfix(
-      Send node,
-      Node receiver,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicCompounds(
-        node,
-        receiver,
-        name,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg);
+      Send node, Node receiver, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicCompounds(node, receiver, name,
+        new IncDecCompound(CompoundKind.POSTFIX, operator), arg);
   }
 
   @override
   R visitParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
-    return handleLocalCompounds(
-        node,
-        parameter,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg,
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
+    return handleLocalCompounds(node, parameter,
+        new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isSetterValid: true);
   }
 
   @override
-  R visitLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalVariablePostfix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return handleLocalCompounds(
-        node,
-        variable,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg,
+        node, variable, new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isSetterValid: true);
   }
 
   @override
-  R visitLocalFunctionPostfix(
-      Send node,
-      LocalFunctionElement function,
-      IncDecOperator operator,
-      A arg) {
+  R visitLocalFunctionPostfix(Send node, LocalFunctionElement function,
+      IncDecOperator operator, A arg) {
     return handleLocalCompounds(
-        node,
-        function,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg,
+        node, function, new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isSetterValid: false);
   }
 
-
   R visitThisPropertyPostfix(
-      Send node,
-      Name name,
-      IncDecOperator operator,
-      A arg) {
-    return handleDynamicCompounds(
-        node,
-        null,
-        name,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg);
+      Send node, Name name, IncDecOperator operator, A arg) {
+    return handleDynamicCompounds(node, null, name,
+        new IncDecCompound(CompoundKind.POSTFIX, operator), arg);
   }
 
   @override
   R visitStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
-  R visitStaticGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
-
-  R visitStaticMethodSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitStaticMethodSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        getter, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
+        getter,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
   R visitTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
-  R visitTopLevelGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
-  R visitTopLevelMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitTopLevelMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
-        method, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
+        method,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
   R visitSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        field, CompoundGetter.FIELD,
-        field, CompoundSetter.FIELD,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
-  R visitSuperFieldFieldPostfix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPostfix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        readField, CompoundGetter.FIELD,
-        writtenField, CompoundSetter.FIELD,
+        readField,
+        CompoundGetter.FIELD,
+        writtenField,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
-  R visitSuperFieldSetterPostfix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPostfix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        field, CompoundGetter.FIELD,
-        setter, CompoundSetter.SETTER,
+        field,
+        CompoundGetter.FIELD,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
-
-  R visitSuperGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        getter, CompoundGetter.GETTER,
-        setter, CompoundSetter.SETTER,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
-  R visitSuperGetterFieldPostfix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPostfix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        getter, CompoundGetter.GETTER,
-        field, CompoundSetter.FIELD,
+        getter,
+        CompoundGetter.GETTER,
+        field,
+        CompoundSetter.FIELD,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
-  R visitSuperMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
-        method, CompoundGetter.METHOD,
-        setter, CompoundSetter.SETTER,
+        method,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
         arg);
   }
 
   @override
   R visitClassTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
-    return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
+    return handleTypeLiteralConstantCompounds(node, constant,
+        new IncDecCompound(CompoundKind.POSTFIX, operator), arg);
   }
 
   @override
   R visitTypedefTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
-    return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
+    return handleTypeLiteralConstantCompounds(node, constant,
+        new IncDecCompound(CompoundKind.POSTFIX, operator), arg);
   }
 
   @override
   R visitTypeVariableTypeLiteralPostfix(
-      Send node,
-      TypeVariableElement element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, TypeVariableElement element, IncDecOperator operator, A arg) {
     return handleTypeVariableTypeLiteralCompounds(
-        node,
-        element,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg);
+        node, element, new IncDecCompound(CompoundKind.POSTFIX, operator), arg);
   }
 
   @override
   R visitDynamicTypeLiteralPostfix(
-      Send node,
-      ConstantExpression constant,
-      IncDecOperator operator,
-      A arg) {
-    return handleTypeLiteralConstantCompounds(
-        node,
-        constant,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg);
+      Send node, ConstantExpression constant, IncDecOperator operator, A arg) {
+    return handleTypeLiteralConstantCompounds(node, constant,
+        new IncDecCompound(CompoundKind.POSTFIX, operator), arg);
   }
 
   @override
-  R visitUnresolvedStaticGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10296,12 +6869,8 @@
   }
 
   @override
-  R visitUnresolvedTopLevelGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10313,12 +6882,8 @@
   }
 
   @override
-  R visitUnresolvedStaticSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         getter,
@@ -10330,12 +6895,8 @@
   }
 
   @override
-  R visitUnresolvedTopLevelSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         getter,
@@ -10348,10 +6909,7 @@
 
   @override
   R visitStaticMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         method,
@@ -10364,10 +6922,7 @@
 
   @override
   R visitTopLevelMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         method,
@@ -10380,10 +6935,7 @@
 
   @override
   R visitUnresolvedPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10395,12 +6947,8 @@
   }
 
   @override
-  R visitUnresolvedStaticGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10412,12 +6960,8 @@
   }
 
   @override
-  R visitUnresolvedTopLevelGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10429,12 +6973,8 @@
   }
 
   @override
-  R visitUnresolvedStaticSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedStaticSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         getter,
@@ -10446,12 +6986,8 @@
   }
 
   @override
-  R visitUnresolvedTopLevelSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedTopLevelSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         getter,
@@ -10464,10 +7000,7 @@
 
   @override
   R visitStaticMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         method,
@@ -10480,10 +7013,7 @@
 
   @override
   R visitTopLevelMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         method,
@@ -10496,10 +7026,7 @@
 
   @override
   R visitUnresolvedPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10511,13 +7038,8 @@
   }
 
   @override
-  R visitUnresolvedStaticGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedStaticGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10529,13 +7051,8 @@
   }
 
   @override
-  R visitUnresolvedTopLevelGetterCompound(
-      Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedTopLevelGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10547,82 +7064,36 @@
   }
 
   @override
-  R visitUnresolvedStaticSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        element,
-        CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitUnresolvedStaticSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, getter, CompoundGetter.GETTER, element,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitUnresolvedTopLevelSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        element,
-        CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitUnresolvedTopLevelSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, getter, CompoundGetter.GETTER, element,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitStaticMethodCompound(
-      Send node,
-      MethodElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        method,
-        CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitStaticMethodCompound(Send node, MethodElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, method, CompoundGetter.METHOD, method,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitTopLevelMethodCompound(
-      Send node,
-      MethodElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleStaticCompounds(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        method,
-        CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitTopLevelMethodCompound(Send node, MethodElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleStaticCompounds(node, method, CompoundGetter.METHOD, method,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitUnresolvedCompound(
-      Send node,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedCompound(Send node, Element element,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleStaticCompounds(
         node,
         element,
@@ -10634,67 +7105,40 @@
   }
 
   @override
-  R visitFinalLocalVariablePostfix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitFinalLocalVariablePostfix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return handleLocalCompounds(
-        node,
-        variable,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg,
+        node, variable, new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isSetterValid: false);
   }
 
   @override
-  R visitFinalLocalVariablePrefix(
-      Send node,
-      LocalVariableElement variable,
-      IncDecOperator operator,
-      A arg) {
+  R visitFinalLocalVariablePrefix(Send node, LocalVariableElement variable,
+      IncDecOperator operator, A arg) {
     return handleLocalCompounds(
-        node,
-        variable,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg,
+        node, variable, new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isSetterValid: false);
   }
 
   @override
   R visitFinalParameterPostfix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
-    return handleLocalCompounds(
-        node,
-        parameter,
-        new IncDecCompound(CompoundKind.POSTFIX, operator),
-        arg,
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
+    return handleLocalCompounds(node, parameter,
+        new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isSetterValid: false);
   }
 
   @override
   R visitFinalParameterPrefix(
-      Send node,
-      ParameterElement parameter,
-      IncDecOperator operator,
-      A arg) {
+      Send node, ParameterElement parameter, IncDecOperator operator, A arg) {
     return handleLocalCompounds(
-        node,
-        parameter,
-        new IncDecCompound(CompoundKind.PREFIX, operator),
-        arg,
+        node, parameter, new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isSetterValid: false);
   }
 
   @override
   R visitFinalStaticFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         field,
@@ -10707,10 +7151,7 @@
 
   @override
   R visitFinalStaticFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         field,
@@ -10722,13 +7163,8 @@
   }
 
   @override
-  R visitSuperFieldFieldCompound(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitSuperFieldFieldCompound(Send node, FieldElement readField,
+      FieldElement writtenField, AssignmentOperator operator, Node rhs, A arg) {
     return handleSuperCompounds(
         node,
         readField,
@@ -10741,10 +7177,7 @@
 
   @override
   R visitFinalSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         field,
@@ -10757,10 +7190,7 @@
 
   @override
   R visitFinalSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         field,
@@ -10772,28 +7202,15 @@
   }
 
   @override
-  R visitSuperMethodCompound(
-      Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        method,
-        CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitSuperMethodCompound(Send node, FunctionElement method,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperCompounds(node, method, CompoundGetter.METHOD, method,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
   R visitSuperMethodPostfix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FunctionElement method, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         method,
@@ -10806,10 +7223,7 @@
 
   @override
   R visitSuperMethodPrefix(
-      Send node,
-      FunctionElement method,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FunctionElement method, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         method,
@@ -10822,10 +7236,7 @@
 
   @override
   R visitFinalTopLevelFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         field,
@@ -10838,10 +7249,7 @@
 
   @override
   R visitFinalTopLevelFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
     return handleStaticCompounds(
         node,
         field,
@@ -10853,12 +7261,8 @@
   }
 
   @override
-  R visitUnresolvedSuperCompound(
-      Send node,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperCompound(Send node, Element element,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleSuperCompounds(
         node,
         element,
@@ -10871,10 +7275,7 @@
 
   @override
   R visitUnresolvedSuperPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         element,
@@ -10887,10 +7288,7 @@
 
   @override
   R visitUnresolvedSuperPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         element,
@@ -10902,12 +7300,8 @@
   }
 
   @override
-  R visitUnresolvedSuperGetterCompound(
-      Send node, Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitUnresolvedSuperGetterCompound(Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, Node rhs, A arg) {
     return handleSuperCompounds(
         node,
         element,
@@ -10919,12 +7313,8 @@
   }
 
   @override
-  R visitUnresolvedSuperGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         element,
@@ -10936,12 +7326,8 @@
   }
 
   @override
-  R visitUnresolvedSuperGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         element,
@@ -10953,30 +7339,15 @@
   }
 
   @override
-  R visitUnresolvedSuperSetterCompound(
-      Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperCompounds(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        element,
-        CompoundSetter.INVALID,
-        new AssignmentCompound(operator, rhs),
-        arg);
+  R visitUnresolvedSuperSetterCompound(Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperCompounds(node, getter, CompoundGetter.GETTER, element,
+        CompoundSetter.INVALID, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
-  R visitUnresolvedSuperSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         getter,
@@ -10988,12 +7359,8 @@
   }
 
   @override
-  R visitUnresolvedSuperSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleSuperCompounds(
         node,
         getter,
@@ -11008,7 +7375,6 @@
 /// Simplified handling of if-null assignments.
 abstract class BaseImplementationOfSetIfNullsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-
   /// Handle a super if-null assignments, like `super.foo ??= 42`.
   R handleSuperSetIfNulls(
       SendSet node,
@@ -11031,565 +7397,264 @@
 
   /// Handle a local if-null assignments, like `foo ??= 42`. If [isSetterValid]
   /// is false [local] is unassignable.
-  R handleLocalSetIfNulls(
-      SendSet node,
-      LocalElement local,
-      Node rhs,
-      A arg,
+  R handleLocalSetIfNulls(SendSet node, LocalElement local, Node rhs, A arg,
       {bool isSetterValid});
 
   /// Handle a if-null assignments on a type literal constant, like
   /// `Object ??= 42`.
   R handleTypeLiteralConstantSetIfNulls(
-      SendSet node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg);
+      SendSet node, ConstantExpression constant, Node rhs, A arg);
 
   /// Handle a dynamic if-null assignments, like `o.foo ??= 42`. [receiver] is
   /// `null` for properties on `this`, like `this.foo ??= 42` or `foo ??= 42`.
   R handleDynamicSetIfNulls(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg);
+      Send node, Node receiver, Name name, Node rhs, A arg);
 
   @override
   R visitClassTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg);
   }
 
   @override
   R visitDynamicPropertySetIfNull(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      Send node, Node receiver, Name name, Node rhs, A arg) {
     return handleDynamicSetIfNulls(node, receiver, name, rhs, arg);
   }
 
   @override
   R visitDynamicTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg);
   }
 
   @override
   R visitFinalLocalVariableSetIfNull(
-      Send node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
-    return handleLocalSetIfNulls(
-        node, variable, rhs, arg, isSetterValid: false);
+      Send node, LocalVariableElement variable, Node rhs, A arg) {
+    return handleLocalSetIfNulls(node, variable, rhs, arg,
+        isSetterValid: false);
   }
 
   @override
   R visitFinalParameterSetIfNull(
-      Send node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
-    return handleLocalSetIfNulls(
-        node, parameter, rhs, arg, isSetterValid: false);
+      Send node, ParameterElement parameter, Node rhs, A arg) {
+    return handleLocalSetIfNulls(node, parameter, rhs, arg,
+        isSetterValid: false);
   }
 
   @override
   R visitFinalStaticFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        field,
-        CompoundGetter.FIELD,
-        field,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, FieldElement field, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
   R visitFinalSuperFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        field,
-        CompoundGetter.FIELD,
-        field,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, FieldElement field, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
   R visitFinalTopLevelFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        field,
-        CompoundGetter.FIELD,
-        field,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, FieldElement field, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertySetIfNull(
-      Send node,
-      Node receiver,
-      Name name,
-      Node rhs,
-      A arg) {
+      Send node, Node receiver, Name name, Node rhs, A arg) {
     return handleDynamicSetIfNulls(node, receiver, name, rhs, arg);
   }
 
   @override
   R visitLocalFunctionSetIfNull(
-      Send node,
-      LocalFunctionElement function,
-      Node rhs,
-      A arg) {
-    return handleLocalSetIfNulls(
-        node, function, rhs, arg, isSetterValid: false);
+      Send node, LocalFunctionElement function, Node rhs, A arg) {
+    return handleLocalSetIfNulls(node, function, rhs, arg,
+        isSetterValid: false);
   }
 
   @override
   R visitLocalVariableSetIfNull(
-      Send node,
-      LocalVariableElement variable,
-      Node rhs,
-      A arg) {
-    return handleLocalSetIfNulls(
-        node, variable, rhs, arg, isSetterValid: true);
+      Send node, LocalVariableElement variable, Node rhs, A arg) {
+    return handleLocalSetIfNulls(node, variable, rhs, arg, isSetterValid: true);
   }
 
   @override
   R visitParameterSetIfNull(
-      Send node,
-      ParameterElement parameter,
-      Node rhs,
-      A arg) {
-    return handleLocalSetIfNulls(
-        node, parameter, rhs, arg, isSetterValid: true);
+      Send node, ParameterElement parameter, Node rhs, A arg) {
+    return handleLocalSetIfNulls(node, parameter, rhs, arg,
+        isSetterValid: true);
   }
 
   @override
-  R visitStaticFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        field,
-        CompoundGetter.FIELD,
-        field,
-        CompoundSetter.FIELD,
-        rhs,
-        arg);
+  R visitStaticFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.FIELD, rhs, arg);
   }
 
   @override
-  R visitStaticGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+  R visitStaticGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, getter, CompoundGetter.GETTER, setter,
+        CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
   R visitStaticMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        method,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, FunctionElement method, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, method, CompoundGetter.METHOD, method,
+        CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
   R visitStaticMethodSetterSetIfNull(
-      Send node,
-      MethodElement method,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+      Send node, MethodElement method, MethodElement setter, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, method, CompoundGetter.METHOD, setter,
+        CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
-  R visitSuperFieldFieldSetIfNull(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        readField,
-        CompoundGetter.FIELD,
-        writtenField,
-        CompoundSetter.FIELD,
-        rhs,
-        arg);
+  R visitSuperFieldFieldSetIfNull(Send node, FieldElement readField,
+      FieldElement writtenField, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, readField, CompoundGetter.FIELD,
+        writtenField, CompoundSetter.FIELD, rhs, arg);
   }
 
   @override
-  R visitSuperFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        field,
-        CompoundGetter.FIELD,
-        field,
-        CompoundSetter.FIELD,
-        rhs,
-        arg);
+  R visitSuperFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.FIELD, rhs, arg);
   }
 
   @override
   R visitSuperFieldSetterSetIfNull(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        field,
-        CompoundGetter.FIELD,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+      Send node, FieldElement field, FunctionElement setter, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, field, CompoundGetter.FIELD, setter,
+        CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
   R visitSuperGetterFieldSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        field,
-        CompoundSetter.FIELD,
-        rhs,
-        arg);
+      Send node, FunctionElement getter, FieldElement field, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, getter, CompoundGetter.GETTER, field,
+        CompoundSetter.FIELD, rhs, arg);
   }
 
   @override
-  R visitSuperGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+  R visitSuperGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, getter, CompoundGetter.GETTER, setter,
+        CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
   R visitSuperMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        method,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, FunctionElement method, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, method, CompoundGetter.METHOD, method,
+        CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
-  R visitSuperMethodSetterSetIfNull(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+  R visitSuperMethodSetterSetIfNull(Send node, FunctionElement method,
+      FunctionElement setter, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, method, CompoundGetter.METHOD, setter,
+        CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
-  R visitThisPropertySetIfNull(
-      Send node,
-      Name name,
-      Node rhs,
-      A arg) {
+  R visitThisPropertySetIfNull(Send node, Name name, Node rhs, A arg) {
     return handleDynamicSetIfNulls(node, null, name, rhs, arg);
   }
 
   @override
   R visitTopLevelFieldSetIfNull(
-      Send node,
-      FieldElement field,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        field,
-        CompoundGetter.FIELD,
-        field,
-        CompoundSetter.FIELD,
-        rhs,
-        arg);
+      Send node, FieldElement field, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, field, CompoundGetter.FIELD, field,
+        CompoundSetter.FIELD, rhs, arg);
   }
 
   @override
-  R visitTopLevelGetterSetterSetIfNull(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+  R visitTopLevelGetterSetterSetIfNull(Send node, FunctionElement getter,
+      FunctionElement setter, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, getter, CompoundGetter.GETTER, setter,
+        CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
   R visitTopLevelMethodSetIfNull(
-      Send node,
-      FunctionElement method,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        method,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, FunctionElement method, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, method, CompoundGetter.METHOD, method,
+        CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
-  R visitTopLevelMethodSetterSetIfNull(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        method,
-        CompoundGetter.METHOD,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+  R visitTopLevelMethodSetterSetIfNull(Send node, FunctionElement method,
+      FunctionElement setter, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, method, CompoundGetter.METHOD, setter,
+        CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
   R visitTypedefTypeLiteralSetIfNull(
-      Send node,
-      ConstantExpression constant,
-      Node rhs,
-      A arg) {
+      Send node, ConstantExpression constant, Node rhs, A arg) {
     return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg);
   }
 
   @override
-  R visitUnresolvedSetIfNull(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        element,
-        CompoundGetter.UNRESOLVED,
-        element,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+  R visitUnresolvedSetIfNull(Send node, Element element, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, element, CompoundGetter.UNRESOLVED,
+        element, CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
   R visitUnresolvedStaticGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        element,
-        CompoundGetter.UNRESOLVED,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, element, CompoundGetter.UNRESOLVED,
+        setter, CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
   R visitUnresolvedStaticSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        element,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, getter, CompoundGetter.GETTER, element,
+        CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
   R visitUnresolvedSuperGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        element,
-        CompoundGetter.UNRESOLVED,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, element, CompoundGetter.UNRESOLVED,
+        setter, CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
-  R visitUnresolvedSuperSetIfNull(
-      Send node,
-      Element element,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        element,
-        CompoundGetter.UNRESOLVED,
-        element,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+  R visitUnresolvedSuperSetIfNull(Send node, Element element, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, element, CompoundGetter.UNRESOLVED,
+        element, CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
   R visitUnresolvedSuperSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
-    return handleSuperSetIfNulls(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        element,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
+    return handleSuperSetIfNulls(node, getter, CompoundGetter.GETTER, element,
+        CompoundSetter.INVALID, rhs, arg);
   }
 
   @override
   R visitUnresolvedTopLevelGetterSetIfNull(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        element,
-        CompoundGetter.UNRESOLVED,
-        setter,
-        CompoundSetter.SETTER,
-        rhs,
-        arg);
+      Send node, Element element, MethodElement setter, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, element, CompoundGetter.UNRESOLVED,
+        setter, CompoundSetter.SETTER, rhs, arg);
   }
 
   @override
   R visitUnresolvedTopLevelSetterSetIfNull(
-      Send node,
-      MethodElement getter,
-      Element element,
-      Node rhs,
-      A arg) {
-    return handleStaticSetIfNulls(
-        node,
-        getter,
-        CompoundGetter.GETTER,
-        element,
-        CompoundSetter.INVALID,
-        rhs,
-        arg);
+      Send node, MethodElement getter, Element element, Node rhs, A arg) {
+    return handleStaticSetIfNulls(node, getter, CompoundGetter.GETTER, element,
+        CompoundSetter.INVALID, rhs, arg);
   }
 }
 
@@ -11597,27 +7662,16 @@
 /// expressions.
 abstract class BaseImplementationOfIndexCompoundsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-
   /// Handle a dynamic index compounds, like `receiver[index] += rhs` or
   /// `--receiver[index]`.
   R handleIndexCompounds(
-      SendSet node,
-      Node receiver,
-      Node index,
-      CompoundRhs rhs,
-      A arg);
+      SendSet node, Node receiver, Node index, CompoundRhs rhs, A arg);
 
   /// Handle a super index compounds, like `super[index] += rhs` or
   /// `--super[index]`.
-  R handleSuperIndexCompounds(
-      SendSet node,
-      Element indexFunction,
-      Element indexSetFunction,
-      Node index,
-      CompoundRhs rhs,
-      A arg,
-      {bool isGetterValid,
-       bool isSetterValid});
+  R handleSuperIndexCompounds(SendSet node, Element indexFunction,
+      Element indexSetFunction, Node index, CompoundRhs rhs, A arg,
+      {bool isGetterValid, bool isSetterValid});
 
   @override
   R visitSuperCompoundIndexSet(
@@ -11628,9 +7682,8 @@
       AssignmentOperator operator,
       Node rhs,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, indexFunction, indexSetFunction, index,
-        new AssignmentCompound(operator, rhs), arg,
+    return handleSuperIndexCompounds(node, indexFunction, indexSetFunction,
+        index, new AssignmentCompound(operator, rhs), arg,
         isGetterValid: true, isSetterValid: true);
   }
 
@@ -11642,9 +7695,8 @@
       Node index,
       IncDecOperator operator,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, indexFunction, indexSetFunction, index,
-        new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
+    return handleSuperIndexCompounds(node, indexFunction, indexSetFunction,
+        index, new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isGetterValid: true, isSetterValid: true);
   }
 
@@ -11656,9 +7708,8 @@
       Node index,
       IncDecOperator operator,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, indexFunction, indexSetFunction, index,
-        new IncDecCompound(CompoundKind.PREFIX, operator), arg,
+    return handleSuperIndexCompounds(node, indexFunction, indexSetFunction,
+        index, new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isGetterValid: true, isSetterValid: true);
   }
 
@@ -11671,9 +7722,8 @@
       AssignmentOperator operator,
       Node rhs,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, indexFunction, indexSetFunction, index,
-        new AssignmentCompound(operator, rhs), arg,
+    return handleSuperIndexCompounds(node, indexFunction, indexSetFunction,
+        index, new AssignmentCompound(operator, rhs), arg,
         isGetterValid: false, isSetterValid: true);
   }
 
@@ -11686,22 +7736,15 @@
       AssignmentOperator operator,
       Node rhs,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, indexFunction, indexSetFunction, index,
-        new AssignmentCompound(operator, rhs), arg,
+    return handleSuperIndexCompounds(node, indexFunction, indexSetFunction,
+        index, new AssignmentCompound(operator, rhs), arg,
         isGetterValid: true, isSetterValid: false);
   }
 
   @override
-  R visitUnresolvedSuperCompoundIndexSet(
-      Send node,
-      Element element,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
-    return handleSuperIndexCompounds(
-        node, element, element, index,
+  R visitUnresolvedSuperCompoundIndexSet(Send node, Element element, Node index,
+      AssignmentOperator operator, Node rhs, A arg) {
+    return handleSuperIndexCompounds(node, element, element, index,
         new AssignmentCompound(operator, rhs), arg,
         isGetterValid: false, isSetterValid: false);
   }
@@ -11714,8 +7757,7 @@
       Node index,
       IncDecOperator operator,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, element, indexSetFunction, index,
+    return handleSuperIndexCompounds(node, element, indexSetFunction, index,
         new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isGetterValid: false, isSetterValid: true);
   }
@@ -11728,8 +7770,7 @@
       Node index,
       IncDecOperator operator,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, element, indexSetFunction, index,
+    return handleSuperIndexCompounds(node, element, indexSetFunction, index,
         new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isGetterValid: false, isSetterValid: true);
   }
@@ -11742,8 +7783,7 @@
       Node index,
       IncDecOperator operator,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, indexFunction, element, index,
+    return handleSuperIndexCompounds(node, indexFunction, element, index,
         new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isGetterValid: true, isSetterValid: false);
   }
@@ -11756,77 +7796,93 @@
       Node index,
       IncDecOperator operator,
       A arg) {
-    return handleSuperIndexCompounds(
-        node, indexFunction, element, index,
+    return handleSuperIndexCompounds(node, indexFunction, element, index,
         new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isGetterValid: true, isSetterValid: false);
   }
 
   @override
   R visitUnresolvedSuperIndexPostfix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
-    return handleSuperIndexCompounds(
-        node, element, element, index,
+      Send node, Element element, Node index, IncDecOperator operator, A arg) {
+    return handleSuperIndexCompounds(node, element, element, index,
         new IncDecCompound(CompoundKind.POSTFIX, operator), arg,
         isGetterValid: false, isSetterValid: false);
   }
 
   @override
   R visitUnresolvedSuperIndexPrefix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
-    return handleSuperIndexCompounds(
-        node, element, element, index,
+      Send node, Element element, Node index, IncDecOperator operator, A arg) {
+    return handleSuperIndexCompounds(node, element, element, index,
         new IncDecCompound(CompoundKind.PREFIX, operator), arg,
         isGetterValid: false, isSetterValid: false);
   }
 
   @override
-  R visitCompoundIndexSet(
-      SendSet node,
-      Node receiver,
-      Node index,
-      AssignmentOperator operator,
-      Node rhs,
-      A arg) {
+  R visitCompoundIndexSet(SendSet node, Node receiver, Node index,
+      AssignmentOperator operator, Node rhs, A arg) {
     return handleIndexCompounds(
-        node, receiver, index,
-        new AssignmentCompound(operator, rhs), arg);
+        node, receiver, index, new AssignmentCompound(operator, rhs), arg);
   }
 
   @override
   R visitIndexPostfix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
-    return handleIndexCompounds(
-        node, receiver, index,
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg) {
+    return handleIndexCompounds(node, receiver, index,
         new IncDecCompound(CompoundKind.POSTFIX, operator), arg);
   }
 
   @override
   R visitIndexPrefix(
-      Send node,
-      Node receiver,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
-    return handleIndexCompounds(
-        node, receiver, index,
+      Send node, Node receiver, Node index, IncDecOperator operator, A arg) {
+    return handleIndexCompounds(node, receiver, index,
         new IncDecCompound(CompoundKind.PREFIX, operator), arg);
   }
 }
 
+/// Simplified handling of super if-null assignments.
+abstract class BaseImplementationOfSuperIndexSetIfNullMixin<R, A>
+    implements SemanticSendVisitor<R, A> {
+  /// Handle a super index if-null assignments, like `super[index] ??= rhs`.
+  R handleSuperIndexSetIfNull(SendSet node, Element indexFunction,
+      Element indexSetFunction, Node index, Node rhs, A arg,
+      {bool isGetterValid, bool isSetterValid});
 
+  @override
+  R visitSuperIndexSetIfNull(Send node, FunctionElement indexFunction,
+      FunctionElement indexSetFunction, Node index, Node rhs, A arg) {
+    return handleSuperIndexSetIfNull(
+        node, indexFunction, indexSetFunction, index, rhs, arg,
+        isGetterValid: true, isSetterValid: true);
+  }
+
+  @override
+  R visitUnresolvedSuperGetterIndexSetIfNull(Send node, Element indexFunction,
+      FunctionElement indexSetFunction, Node index, Node rhs, A arg) {
+    return handleSuperIndexSetIfNull(
+        node, indexFunction, indexSetFunction, index, rhs, arg,
+        isGetterValid: false, isSetterValid: true);
+  }
+
+  @override
+  R visitUnresolvedSuperSetterIndexSetIfNull(
+      Send node,
+      FunctionElement indexFunction,
+      Element indexSetFunction,
+      Node index,
+      Node rhs,
+      A arg) {
+    return handleSuperIndexSetIfNull(
+        node, indexFunction, indexSetFunction, index, rhs, arg,
+        isGetterValid: true, isSetterValid: false);
+  }
+
+  @override
+  R visitUnresolvedSuperIndexSetIfNull(
+      Send node, Element element, Node index, Node rhs, A arg) {
+    return handleSuperIndexSetIfNull(node, element, element, index, rhs, arg,
+        isGetterValid: false, isSetterValid: false);
+  }
+}
 
 /// Mixin that groups all `visitSuperXPrefix`, `visitSuperXPostfix` methods by
 /// delegating calls to `handleSuperXPostfixPrefix` methods.
@@ -11835,44 +7891,24 @@
 /// handled uniformly.
 abstract class BaseImplementationOfSuperIncDecsMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-  R handleSuperFieldFieldPostfixPrefix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg,
+  R handleSuperFieldFieldPostfixPrefix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleSuperFieldSetterPostfixPrefix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg,
+  R handleSuperFieldSetterPostfixPrefix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleSuperGetterFieldPostfixPrefix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg,
+  R handleSuperGetterFieldPostfixPrefix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleSuperGetterSetterPostfixPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg,
+  R handleSuperGetterSetterPostfixPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleSuperMethodSetterPostfixPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg,
+  R handleSuperMethodSetterPostfixPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   R handleSuperIndexPostfixPrefix(
@@ -11884,13 +7920,8 @@
       A arg,
       {bool isPrefix});
 
-  R handleUnresolvedSuperGetterIndexPostfixPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg,
+  R handleUnresolvedSuperGetterIndexPostfixPrefix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   R handleUnresolvedSuperSetterIndexPostfixPrefix(
@@ -11903,178 +7934,121 @@
       {bool isPrefix});
 
   R handleUnresolvedSuperIndexPostfixPrefix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg,
+      Send node, Element element, Node index, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   R handleFinalSuperFieldPostfixPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg,
+      Send node, FieldElement field, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   R handleSuperMethodPostfixPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg,
+      Send node, MethodElement method, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   R handleUnresolvedSuperPostfixPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg,
+      Send node, Element element, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleUnresolvedSuperGetterPostfixPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg,
+  R handleUnresolvedSuperGetterPostfixPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg,
       {bool isPrefix});
 
-  R handleUnresolvedSuperSetterPostfixPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg,
+  R handleUnresolvedSuperSetterPostfixPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg,
       {bool isPrefix});
 
   @override
-  R visitSuperFieldFieldPostfix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPostfix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return handleSuperFieldFieldPostfixPrefix(
-        node, readField, writtenField, operator, arg, isPrefix: false);
+        node, readField, writtenField, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitSuperFieldFieldPrefix(
-      Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldFieldPrefix(Send node, FieldElement readField,
+      FieldElement writtenField, IncDecOperator operator, A arg) {
     return handleSuperFieldFieldPostfixPrefix(
-        node, readField, writtenField, operator, arg, isPrefix: true);
+        node, readField, writtenField, operator, arg,
+        isPrefix: true);
   }
 
   @override
   R visitSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleSuperFieldFieldPostfixPrefix(
-        node, field, field, operator, arg, isPrefix: false);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleSuperFieldFieldPostfixPrefix(node, field, field, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleSuperFieldFieldPostfixPrefix(
-        node, field, field, operator, arg, isPrefix: true);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleSuperFieldFieldPostfixPrefix(node, field, field, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitSuperFieldSetterPostfix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPostfix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperFieldSetterPostfixPrefix(
-        node, field, setter, operator, arg, isPrefix: false);
+        node, field, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitSuperFieldSetterPrefix(
-      Send node,
-      FieldElement field,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperFieldSetterPrefix(Send node, FieldElement field,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperFieldSetterPostfixPrefix(
-        node, field, setter, operator, arg, isPrefix: true);
+        node, field, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitSuperGetterFieldPostfix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPostfix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return handleSuperGetterFieldPostfixPrefix(
-        node, getter, field, operator, arg, isPrefix: false);
+        node, getter, field, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitSuperGetterFieldPrefix(
-      Send node,
-      FunctionElement getter,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterFieldPrefix(Send node, FunctionElement getter,
+      FieldElement field, IncDecOperator operator, A arg) {
     return handleSuperGetterFieldPostfixPrefix(
-        node, getter, field, operator, arg, isPrefix: true);
+        node, getter, field, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitSuperGetterSetterPostfix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPostfix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperGetterSetterPostfixPrefix(
-        node, getter, setter, operator, arg, isPrefix: false);
+        node, getter, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitSuperGetterSetterPrefix(
-      Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperGetterSetterPrefix(Send node, FunctionElement getter,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperGetterSetterPostfixPrefix(
-        node, getter, setter, operator, arg, isPrefix: true);
+        node, getter, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitSuperMethodSetterPostfix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPostfix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperMethodSetterPostfixPrefix(
-        node, method, setter, operator, arg, isPrefix: false);
+        node, method, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitSuperMethodSetterPrefix(
-      Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitSuperMethodSetterPrefix(Send node, FunctionElement method,
+      FunctionElement setter, IncDecOperator operator, A arg) {
     return handleSuperMethodSetterPostfixPrefix(
-        node, method, setter, operator, arg, isPrefix: true);
+        node, method, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
@@ -12086,8 +8060,8 @@
       IncDecOperator operator,
       A arg) {
     return handleSuperIndexPostfixPrefix(
-        node, indexFunction, indexSetFunction,
-        index, operator, arg, isPrefix: false);
+        node, indexFunction, indexSetFunction, index, operator, arg,
+        isPrefix: false);
   }
 
   @override
@@ -12099,32 +8073,24 @@
       IncDecOperator operator,
       A arg) {
     return handleSuperIndexPostfixPrefix(
-        node, indexFunction, indexSetFunction,
-        index, operator, arg, isPrefix: true);
+        node, indexFunction, indexSetFunction, index, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitUnresolvedSuperGetterIndexPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterIndexPostfix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg) {
     return handleUnresolvedSuperGetterIndexPostfixPrefix(
-        node, element, setter, index, operator, arg, isPrefix: false);
+        node, element, setter, index, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitUnresolvedSuperGetterIndexPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterIndexPrefix(Send node, Element element,
+      MethodElement setter, Node index, IncDecOperator operator, A arg) {
     return handleUnresolvedSuperGetterIndexPostfixPrefix(
-        node, element, setter, index, operator, arg, isPrefix: true);
+        node, element, setter, index, operator, arg,
+        isPrefix: true);
   }
 
   @override
@@ -12136,7 +8102,8 @@
       IncDecOperator operator,
       A arg) {
     return handleUnresolvedSuperSetterIndexPostfixPrefix(
-        node, indexFunction, element, index, operator, arg, isPrefix: false);
+        node, indexFunction, element, index, operator, arg,
+        isPrefix: false);
   }
 
   @override
@@ -12148,133 +8115,98 @@
       IncDecOperator operator,
       A arg) {
     return handleUnresolvedSuperSetterIndexPostfixPrefix(
-        node, indexFunction, element, index, operator, arg, isPrefix: true);
+        node, indexFunction, element, index, operator, arg,
+        isPrefix: true);
   }
 
   @override
   R visitUnresolvedSuperIndexPostfix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, Node index, IncDecOperator operator, A arg) {
     return handleUnresolvedSuperIndexPostfixPrefix(
-        node, element, index, operator, arg, isPrefix: false);
+        node, element, index, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitUnresolvedSuperIndexPrefix(
-      Send node,
-      Element element,
-      Node index,
-      IncDecOperator operator,
-      A arg) {
+      Send node, Element element, Node index, IncDecOperator operator, A arg) {
     return handleUnresolvedSuperIndexPostfixPrefix(
-        node, element, index, operator, arg, isPrefix: true);
+        node, element, index, operator, arg,
+        isPrefix: true);
   }
 
   @override
   R visitFinalSuperFieldPostfix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleFinalSuperFieldPostfixPrefix(
-        node, field, operator, arg, isPrefix: false);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleFinalSuperFieldPostfixPrefix(node, field, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitFinalSuperFieldPrefix(
-      Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      A arg) {
-    return handleFinalSuperFieldPostfixPrefix(
-        node, field, operator, arg, isPrefix: true);
+      Send node, FieldElement field, IncDecOperator operator, A arg) {
+    return handleFinalSuperFieldPostfixPrefix(node, field, operator, arg,
+        isPrefix: true);
   }
 
   @override
   R visitSuperMethodPostfix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
-    return handleSuperMethodPostfixPrefix(
-        node, method, operator, arg, isPrefix: false);
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
+    return handleSuperMethodPostfixPrefix(node, method, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitSuperMethodPrefix(
-      Send node,
-      MethodElement method,
-      IncDecOperator operator,
-      A arg) {
-    return handleSuperMethodPostfixPrefix(
-        node, method, operator, arg, isPrefix: true);
+      Send node, MethodElement method, IncDecOperator operator, A arg) {
+    return handleSuperMethodPostfixPrefix(node, method, operator, arg,
+        isPrefix: true);
   }
 
   @override
   R visitUnresolvedSuperPostfix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
-    return handleUnresolvedSuperPostfixPrefix(
-        node, element, operator, arg, isPrefix: false);
+      Send node, Element element, IncDecOperator operator, A arg) {
+    return handleUnresolvedSuperPostfixPrefix(node, element, operator, arg,
+        isPrefix: false);
   }
 
   @override
   R visitUnresolvedSuperPrefix(
-      Send node,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
-    return handleUnresolvedSuperPostfixPrefix(
-        node, element, operator, arg, isPrefix: true);
+      Send node, Element element, IncDecOperator operator, A arg) {
+    return handleUnresolvedSuperPostfixPrefix(node, element, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitUnresolvedSuperGetterPostfix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterPostfix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return handleUnresolvedSuperGetterPostfixPrefix(
-        node, element, setter, operator, arg, isPrefix: false);
+        node, element, setter, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitUnresolvedSuperGetterPrefix(
-      Send node,
-      Element element,
-      MethodElement setter,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperGetterPrefix(Send node, Element element,
+      MethodElement setter, IncDecOperator operator, A arg) {
     return handleUnresolvedSuperGetterPostfixPrefix(
-        node, element, setter, operator, arg, isPrefix: true);
+        node, element, setter, operator, arg,
+        isPrefix: true);
   }
 
   @override
-  R visitUnresolvedSuperSetterPostfix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterPostfix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleUnresolvedSuperSetterPostfixPrefix(
-        node, getter, element, operator, arg, isPrefix: false);
+        node, getter, element, operator, arg,
+        isPrefix: false);
   }
 
   @override
-  R visitUnresolvedSuperSetterPrefix(
-      Send node,
-      MethodElement getter,
-      Element element,
-      IncDecOperator operator,
-      A arg) {
+  R visitUnresolvedSuperSetterPrefix(Send node, MethodElement getter,
+      Element element, IncDecOperator operator, A arg) {
     return handleUnresolvedSuperSetterPostfixPrefix(
-        node, getter, element, operator, arg, isPrefix: true);
+        node, getter, element, operator, arg,
+        isPrefix: true);
   }
 }
 
@@ -12285,14 +8217,8 @@
 /// handled uniformly.
 abstract class BaseImplementationOfNewMixin<R, A>
     implements SemanticSendVisitor<R, A> {
-
-  R handleConstructorInvoke(
-      NewExpression node,
-      ConstructorElement constructor,
-      DartType type,
-      NodeList arguments,
-      CallStructure callStructure,
-      A arg);
+  R handleConstructorInvoke(NewExpression node, ConstructorElement constructor,
+      DartType type, NodeList arguments, CallStructure callStructure, A arg);
 
   R visitGenerativeConstructorInvoke(
       NewExpression node,
@@ -12344,25 +8270,15 @@
   }
 
   @override
-  R visitUnresolvedConstructorInvoke(
-      NewExpression node,
-      Element constructor,
-      DartType type,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedConstructorInvoke(NewExpression node, Element constructor,
+      DartType type, NodeList arguments, Selector selector, A arg) {
     return handleConstructorInvoke(
         node, constructor, type, arguments, selector.callStructure, arg);
   }
 
   @override
-  R visitUnresolvedClassConstructorInvoke(
-      NewExpression node,
-      Element element,
-      DartType type,
-      NodeList arguments,
-      Selector selector,
-      A arg) {
+  R visitUnresolvedClassConstructorInvoke(NewExpression node, Element element,
+      DartType type, NodeList arguments, Selector selector, A arg) {
     return handleConstructorInvoke(
         node, element, type, arguments, selector.callStructure, arg);
   }
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index d592cf4..7ef2a86 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -20,9 +20,8 @@
   DeclStructure(this.element);
 
   /// Calls the matching visit method on [visitor] with [node] and [arg].
-  R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             FunctionExpression node,
-             A arg);
+  R dispatch(
+      SemanticDeclarationVisitor<R, A> visitor, FunctionExpression node, A arg);
 }
 
 enum ConstructorKind {
@@ -38,9 +37,8 @@
   ConstructorDeclStructure(this.kind, ConstructorElement constructor)
       : super(constructor);
 
-  R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             FunctionExpression node,
-             A arg) {
+  R dispatch(SemanticDeclarationVisitor<R, A> visitor, FunctionExpression node,
+      A arg) {
     switch (kind) {
       case ConstructorKind.GENERATIVE:
         return visitor.visitGenerativeConstructorDeclaration(
@@ -54,8 +52,8 @@
       default:
         break;
     }
-    throw new SpannableAssertionFailure(node,
-        "Unhandled constructor declaration kind: ${kind}");
+    throw new SpannableAssertionFailure(
+        node, "Unhandled constructor declaration kind: ${kind}");
   }
 }
 
@@ -64,18 +62,14 @@
   InterfaceType redirectionTargetType;
   ConstructorElement redirectionTarget;
 
-  RedirectingFactoryConstructorDeclStructure(
-      ConstructorElement constructor,
-      this.redirectionTargetType,
-      this.redirectionTarget)
+  RedirectingFactoryConstructorDeclStructure(ConstructorElement constructor,
+      this.redirectionTargetType, this.redirectionTarget)
       : super(constructor);
 
-  R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             FunctionExpression node,
-             A arg) {
-    return visitor.visitRedirectingFactoryConstructorDeclaration(
-        node, element, node.parameters,
-        redirectionTargetType, redirectionTarget, arg);
+  R dispatch(SemanticDeclarationVisitor<R, A> visitor, FunctionExpression node,
+      A arg) {
+    return visitor.visitRedirectingFactoryConstructorDeclaration(node, element,
+        node.parameters, redirectionTargetType, redirectionTarget, arg);
   }
 }
 
@@ -96,16 +90,13 @@
   CLOSURE,
 }
 
-class FunctionDeclStructure<R, A>
-    extends DeclStructure<R, A> {
+class FunctionDeclStructure<R, A> extends DeclStructure<R, A> {
   final FunctionKind kind;
 
-  FunctionDeclStructure(this.kind, FunctionElement function)
-      : super(function);
+  FunctionDeclStructure(this.kind, FunctionElement function) : super(function);
 
-  R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             FunctionExpression node,
-             A arg) {
+  R dispatch(SemanticDeclarationVisitor<R, A> visitor, FunctionExpression node,
+      A arg) {
     switch (kind) {
       case FunctionKind.TOP_LEVEL_GETTER:
         return visitor.visitTopLevelGetterDeclaration(
@@ -126,8 +117,7 @@
         return visitor.visitStaticFunctionDeclaration(
             node, element, node.parameters, node.body, arg);
       case FunctionKind.ABSTRACT_GETTER:
-        return visitor.visitAbstractGetterDeclaration(
-            node, element, arg);
+        return visitor.visitAbstractGetterDeclaration(node, element, arg);
       case FunctionKind.ABSTRACT_SETTER:
         return visitor.visitAbstractSetterDeclaration(
             node, element, node.parameters, arg);
@@ -282,8 +272,8 @@
       if (optionalParameters != null) {
         bool isNamed = optionalParameters.beginToken.stringValue == '{';
         for (Node node in optionalParameters) {
-          list.add(computeParameterStructure(
-              node, index++, isRequired: false, isNamed: isNamed));
+          list.add(computeParameterStructure(node, index++,
+              isRequired: false, isNamed: isNamed));
         }
       } else {
         list.add(computeParameterStructure(node, index++));
@@ -293,8 +283,7 @@
   }
 
   ParameterStructure computeParameterStructure(
-      VariableDefinitions definitions,
-      int index,
+      VariableDefinitions definitions, int index,
       {bool isRequired: true, bool isNamed: false}) {
     Node node = definitions.definitions.nodes.single;
     ParameterElement element = elements[node];
@@ -303,8 +292,7 @@
           node, "No parameter structure for $node.");
     }
     if (isRequired) {
-      return new RequiredParameterStructure(
-          definitions, node, element, index);
+      return new RequiredParameterStructure(definitions, node, element, index);
     } else {
       // TODO(johnniwinther): Should we differentiate between implicit (null)
       // and explicit values? What about optional parameters on redirecting
@@ -319,11 +307,10 @@
     }
   }
 
-  void computeVariableStructures(
-      VariableDefinitions definitions,
+  void computeVariableStructures(VariableDefinitions definitions,
       void callback(Node node, VariableStructure structure)) {
     for (Node node in definitions.definitions) {
-       callback(definitions, computeVariableStructure(node));
+      callback(definitions, computeVariableStructure(node));
     }
   }
 
diff --git a/pkg/compiler/lib/src/resolution/send_structure.dart b/pkg/compiler/lib/src/resolution/send_structure.dart
index 5ff76ef..53c0356 100644
--- a/pkg/compiler/lib/src/resolution/send_structure.dart
+++ b/pkg/compiler/lib/src/resolution/send_structure.dart
@@ -8,13 +8,10 @@
 import '../constants/expressions.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../resolution/tree_elements.dart' show
-    TreeElements;
+import '../resolution/tree_elements.dart' show TreeElements;
 import '../tree/tree.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
 
 import 'access_semantics.dart';
 import 'operators.dart';
@@ -27,6 +24,37 @@
   R dispatch(SemanticSendVisitor<R, A> visitor, Node node, A arg);
 }
 
+enum SendStructureKind {
+  IF_NULL,
+  LOGICAL_AND,
+  LOGICAL_OR,
+  IS,
+  IS_NOT,
+  AS,
+  INVOKE,
+  INCOMPATIBLE_INVOKE,
+  GET,
+  SET,
+  NOT,
+  UNARY,
+  INVALID_UNARY,
+  INDEX,
+  EQUALS,
+  NOT_EQUALS,
+  BINARY,
+  INVALID_BINARY,
+  INDEX_SET,
+  INDEX_PREFIX,
+  INDEX_POSTFIX,
+  COMPOUND,
+  SET_IF_NULL,
+  COMPOUND_INDEX_SET,
+  INDEX_SET_IF_NULL,
+  PREFIX,
+  POSTFIX,
+  DEFERRED_PREFIX,
+}
+
 /// Interface for the structure of the semantics of a [Send] node.
 ///
 /// Subclasses handle each of the [Send] variations; `assert(e)`, `a && b`,
@@ -34,6 +62,8 @@
 abstract class SendStructure<R, A> extends SemanticSendStructure<R, A> {
   /// Calls the matching visit method on [visitor] with [send] and [arg].
   R dispatch(SemanticSendVisitor<R, A> visitor, Send send, A arg);
+
+  SendStructureKind get kind;
 }
 
 /// The structure for a [Send] of the form `a ?? b`.
@@ -41,13 +71,12 @@
   const IfNullStructure();
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
-    return visitor.visitIfNull(
-        node,
-        node.receiver,
-        node.arguments.single,
-        arg);
+    return visitor.visitIfNull(node, node.receiver, node.arguments.single, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.IF_NULL;
+
   String toString() => '??';
 }
 
@@ -57,12 +86,12 @@
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     return visitor.visitLogicalAnd(
-        node,
-        node.receiver,
-        node.arguments.single,
-        arg);
+        node, node.receiver, node.arguments.single, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.LOGICAL_AND;
+
   String toString() => '&&';
 }
 
@@ -72,12 +101,12 @@
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     return visitor.visitLogicalOr(
-        node,
-        node.receiver,
-        node.arguments.single,
-        arg);
+        node, node.receiver, node.arguments.single, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.LOGICAL_OR;
+
   String toString() => '||';
 }
 
@@ -89,13 +118,12 @@
   IsStructure(this.type);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
-    return visitor.visitIs(
-        node,
-        node.receiver,
-        type,
-        arg);
+    return visitor.visitIs(node, node.receiver, type, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.IS;
+
   String toString() => 'is $type';
 }
 
@@ -107,13 +135,12 @@
   IsNotStructure(this.type);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
-    return visitor.visitIsNot(
-        node,
-        node.receiver,
-        type,
-        arg);
+    return visitor.visitIsNot(node, node.receiver, type, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.IS_NOT;
+
   String toString() => 'is! $type';
 }
 
@@ -125,13 +152,12 @@
   AsStructure(this.type);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
-    return visitor.visitAs(
-        node,
-        node.receiver,
-        type,
-        arg);
+    return visitor.visitAs(node, node.receiver, type, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.AS;
+
   String toString() => 'as $type';
 }
 
@@ -150,22 +176,17 @@
 
   InvokeStructure(this.semantics, this.selector);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.INVOKE;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
         return visitor.visitIfNotNullDynamicPropertyInvoke(
-            node,
-            node.receiver,
-            node.argumentsNode,
-            selector,
-            arg);
+            node, node.receiver, node.argumentsNode, selector, arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertyInvoke(
-            node,
-            node.receiver,
-            node.argumentsNode,
-            selector,
-            arg);
+            node, node.receiver, node.argumentsNode, selector, arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionInvoke(
             node,
@@ -198,165 +219,75 @@
       case AccessKind.STATIC_FIELD:
       case AccessKind.FINAL_STATIC_FIELD:
         return visitor.visitStaticFieldInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.STATIC_METHOD:
         return visitor.visitStaticFunctionInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.STATIC_GETTER:
         return visitor.visitStaticGetterInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.STATIC_SETTER:
         return visitor.visitStaticSetterInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.TOPLEVEL_FIELD:
       case AccessKind.FINAL_TOPLEVEL_FIELD:
         return visitor.visitTopLevelFieldInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.TOPLEVEL_METHOD:
         return visitor.visitTopLevelFunctionInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.TOPLEVEL_GETTER:
         return visitor.visitTopLevelGetterInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.TOPLEVEL_SETTER:
         return visitor.visitTopLevelSetterInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.CLASS_TYPE_LITERAL:
         return visitor.visitClassTypeLiteralInvoke(
-            node,
-            semantics.constant,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.constant, node.argumentsNode, callStructure, arg);
       case AccessKind.TYPEDEF_TYPE_LITERAL:
         return visitor.visitTypedefTypeLiteralInvoke(
-            node,
-            semantics.constant,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.constant, node.argumentsNode, callStructure, arg);
       case AccessKind.DYNAMIC_TYPE_LITERAL:
         return visitor.visitDynamicTypeLiteralInvoke(
-            node,
-            semantics.constant,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.constant, node.argumentsNode, callStructure, arg);
       case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
         return visitor.visitTypeVariableTypeLiteralInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.EXPRESSION:
         return visitor.visitExpressionInvoke(
-            node,
-            node.selector,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, node.selector, node.argumentsNode, callStructure, arg);
       case AccessKind.THIS:
         return visitor.visitThisInvoke(
-            node,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, node.argumentsNode, callStructure, arg);
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertyInvoke(
-            node,
-            node.argumentsNode,
-            selector,
-            arg);
+            node, node.argumentsNode, selector, arg);
       case AccessKind.SUPER_FIELD:
       case AccessKind.SUPER_FINAL_FIELD:
         return visitor.visitSuperFieldInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperMethodInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.SUPER_GETTER:
         return visitor.visitSuperGetterInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.SUPER_SETTER:
         return visitor.visitSuperSetterInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.CONSTANT:
         return visitor.visitConstantInvoke(
-            node,
-            semantics.constant,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.constant, node.argumentsNode, callStructure, arg);
       case AccessKind.UNRESOLVED:
         return visitor.visitUnresolvedInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            selector,
-            arg);
+            node, semantics.element, node.argumentsNode, selector, arg);
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            selector,
-            arg);
+            node, semantics.element, node.argumentsNode, selector, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            selector,
-            arg);
+            node, semantics.element, node.argumentsNode, selector, arg);
       case AccessKind.COMPOUND:
         // This is not a valid case.
         break;
@@ -383,37 +314,24 @@
 
   IncompatibleInvokeStructure(this.semantics, this.selector);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.INCOMPATIBLE_INVOKE;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.STATIC_METHOD:
         return visitor.visitStaticFunctionIncompatibleInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperMethodIncompatibleInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.TOPLEVEL_METHOD:
         return visitor.visitTopLevelFunctionIncompatibleInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
+            node, semantics.element, node.argumentsNode, callStructure, arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionIncompatibleInvoke(
-            node,
-            semantics.element,
-            node.argumentsNode,
-            callStructure,
-            arg);
-     default:
+            node, semantics.element, node.argumentsNode, callStructure, arg);
+      default:
         // TODO(johnniwinther): Support more variants of this invoke structure.
         break;
     }
@@ -431,99 +349,54 @@
 
   GetStructure(this.semantics);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.GET;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
         return visitor.visitIfNotNullDynamicPropertyGet(
-            node,
-            node.receiver,
-            semantics.name,
-            arg);
+            node, node.receiver, semantics.name, arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertyGet(
-            node,
-            node.receiver,
-            semantics.name,
-            arg);
+            node, node.receiver, semantics.name, arg);
       case AccessKind.LOCAL_FUNCTION:
-        return visitor.visitLocalFunctionGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitLocalFunctionGet(node, semantics.element, arg);
       case AccessKind.LOCAL_VARIABLE:
       case AccessKind.FINAL_LOCAL_VARIABLE:
-        return visitor.visitLocalVariableGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitLocalVariableGet(node, semantics.element, arg);
       case AccessKind.PARAMETER:
       case AccessKind.FINAL_PARAMETER:
-        return visitor.visitParameterGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitParameterGet(node, semantics.element, arg);
       case AccessKind.STATIC_FIELD:
       case AccessKind.FINAL_STATIC_FIELD:
-        return visitor.visitStaticFieldGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitStaticFieldGet(node, semantics.element, arg);
       case AccessKind.STATIC_METHOD:
-        return visitor.visitStaticFunctionGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitStaticFunctionGet(node, semantics.element, arg);
       case AccessKind.STATIC_GETTER:
-        return visitor.visitStaticGetterGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitStaticGetterGet(node, semantics.element, arg);
       case AccessKind.STATIC_SETTER:
-        return visitor.visitStaticSetterGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitStaticSetterGet(node, semantics.element, arg);
       case AccessKind.TOPLEVEL_FIELD:
       case AccessKind.FINAL_TOPLEVEL_FIELD:
-        return visitor.visitTopLevelFieldGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitTopLevelFieldGet(node, semantics.element, arg);
       case AccessKind.TOPLEVEL_METHOD:
-        return visitor.visitTopLevelFunctionGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitTopLevelFunctionGet(node, semantics.element, arg);
       case AccessKind.TOPLEVEL_GETTER:
-        return visitor.visitTopLevelGetterGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitTopLevelGetterGet(node, semantics.element, arg);
       case AccessKind.TOPLEVEL_SETTER:
-        return visitor.visitTopLevelSetterGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitTopLevelSetterGet(node, semantics.element, arg);
       case AccessKind.CLASS_TYPE_LITERAL:
-        return visitor.visitClassTypeLiteralGet(
-            node,
-            semantics.constant,
-            arg);
+        return visitor.visitClassTypeLiteralGet(node, semantics.constant, arg);
       case AccessKind.TYPEDEF_TYPE_LITERAL:
         return visitor.visitTypedefTypeLiteralGet(
-            node,
-            semantics.constant,
-            arg);
+            node, semantics.constant, arg);
       case AccessKind.DYNAMIC_TYPE_LITERAL:
         return visitor.visitDynamicTypeLiteralGet(
-            node,
-            semantics.constant,
-            arg);
+            node, semantics.constant, arg);
       case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
         return visitor.visitTypeVariableTypeLiteralGet(
-            node,
-            semantics.element,
-            arg);
+            node, semantics.element, arg);
       case AccessKind.EXPRESSION:
         // This is not a valid case.
         break;
@@ -531,51 +404,24 @@
         // TODO(johnniwinther): Handle this when `this` is a [Send].
         break;
       case AccessKind.THIS_PROPERTY:
-        return visitor.visitThisPropertyGet(
-            node,
-            semantics.name,
-            arg);
+        return visitor.visitThisPropertyGet(node, semantics.name, arg);
       case AccessKind.SUPER_FIELD:
       case AccessKind.SUPER_FINAL_FIELD:
-        return visitor.visitSuperFieldGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitSuperFieldGet(node, semantics.element, arg);
       case AccessKind.SUPER_METHOD:
-        return visitor.visitSuperMethodGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitSuperMethodGet(node, semantics.element, arg);
       case AccessKind.SUPER_GETTER:
-        return visitor.visitSuperGetterGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitSuperGetterGet(node, semantics.element, arg);
       case AccessKind.SUPER_SETTER:
-        return visitor.visitSuperSetterGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitSuperSetterGet(node, semantics.element, arg);
       case AccessKind.CONSTANT:
-        return visitor.visitConstantGet(
-            node,
-            semantics.constant,
-            arg);
+        return visitor.visitConstantGet(node, semantics.constant, arg);
       case AccessKind.UNRESOLVED:
-        return visitor.visitUnresolvedGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitUnresolvedGet(node, semantics.element, arg);
       case AccessKind.UNRESOLVED_SUPER:
-        return visitor.visitUnresolvedSuperGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.visitUnresolvedSuperGet(node, semantics.element, arg);
       case AccessKind.INVALID:
-        return visitor.errorInvalidGet(
-            node,
-            semantics.element,
-            arg);
+        return visitor.errorInvalidGet(node, semantics.element, arg);
       case AccessKind.COMPOUND:
         // This is not a valid case.
         break;
@@ -593,136 +439,74 @@
 
   SetStructure(this.semantics);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.SET;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
         return visitor.visitIfNotNullDynamicPropertySet(
-          node,
-          node.receiver,
-          semantics.name,
-          node.arguments.single,
-          arg);
+            node, node.receiver, semantics.name, node.arguments.single, arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertySet(
-          node,
-          node.receiver,
-          semantics.name,
-          node.arguments.single,
-          arg);
+            node, node.receiver, semantics.name, node.arguments.single, arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.LOCAL_VARIABLE:
         return visitor.visitLocalVariableSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.FINAL_LOCAL_VARIABLE:
         return visitor.visitFinalLocalVariableSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.PARAMETER:
         return visitor.visitParameterSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.FINAL_PARAMETER:
         return visitor.visitFinalParameterSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.STATIC_FIELD:
         return visitor.visitStaticFieldSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.FINAL_STATIC_FIELD:
         return visitor.visitFinalStaticFieldSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.STATIC_METHOD:
         return visitor.visitStaticFunctionSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.STATIC_GETTER:
         return visitor.visitStaticGetterSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.STATIC_SETTER:
         return visitor.visitStaticSetterSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.TOPLEVEL_FIELD:
         return visitor.visitTopLevelFieldSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.FINAL_TOPLEVEL_FIELD:
         return visitor.visitFinalTopLevelFieldSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.TOPLEVEL_METHOD:
         return visitor.visitTopLevelFunctionSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.TOPLEVEL_GETTER:
         return visitor.visitTopLevelGetterSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.TOPLEVEL_SETTER:
         return visitor.visitTopLevelSetterSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.CLASS_TYPE_LITERAL:
         return visitor.visitClassTypeLiteralSet(
-            node,
-            semantics.constant,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, node.arguments.single, arg);
       case AccessKind.TYPEDEF_TYPE_LITERAL:
         return visitor.visitTypedefTypeLiteralSet(
-            node,
-            semantics.constant,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, node.arguments.single, arg);
       case AccessKind.DYNAMIC_TYPE_LITERAL:
         return visitor.visitDynamicTypeLiteralSet(
-            node,
-            semantics.constant,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, node.arguments.single, arg);
       case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
         return visitor.visitTypeVariableTypeLiteralSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.EXPRESSION:
         // This is not a valid case.
         break;
@@ -731,61 +515,34 @@
         break;
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertySet(
-            node,
-            semantics.name,
-            node.arguments.single,
-            arg);
+            node, semantics.name, node.arguments.single, arg);
       case AccessKind.SUPER_FIELD:
         return visitor.visitSuperFieldSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.SUPER_FINAL_FIELD:
         return visitor.visitFinalSuperFieldSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperMethodSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.SUPER_GETTER:
         return visitor.visitSuperGetterSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.SUPER_SETTER:
         return visitor.visitSuperSetterSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.CONSTANT:
         // TODO(johnniwinther): Should this be a valid case?
         break;
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.UNRESOLVED:
         return visitor.visitUnresolvedSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidSet(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.COMPOUND:
         // This is not a valid case.
         break;
@@ -801,12 +558,12 @@
   const NotStructure();
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
-    return visitor.visitNot(
-        node,
-        node.receiver,
-        arg);
+    return visitor.visitNot(node, node.receiver, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.NOT;
+
   String toString() => 'not()';
 }
 
@@ -821,32 +578,21 @@
 
   UnaryStructure(this.semantics, this.operator);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.UNARY;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
-        return visitor.visitUnary(
-            node,
-            operator,
-            node.receiver,
-            arg);
+        return visitor.visitUnary(node, operator, node.receiver, arg);
       case AccessKind.SUPER_METHOD:
-        return visitor.visitSuperUnary(
-            node,
-            operator,
-            semantics.element,
-            arg);
+        return visitor.visitSuperUnary(node, operator, semantics.element, arg);
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperUnary(
-            node,
-            operator,
-            semantics.element,
-            arg);
+            node, operator, semantics.element, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidUnary(
-            node,
-            operator,
-            semantics.element,
-            arg);
+            node, operator, semantics.element, arg);
       default:
         // This is not a valid case.
         break;
@@ -865,12 +611,12 @@
   @override
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     return visitor.errorUndefinedUnaryExpression(
-        node,
-        node.selector,
-        node.receiver,
-        arg);
+        node, node.selector, node.receiver, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.INVALID_UNARY;
+
   String toString() => 'invalid unary';
 }
 
@@ -882,32 +628,23 @@
 
   IndexStructure(this.semantics);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.INDEX;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
         return visitor.visitIndex(
-            node,
-            node.receiver,
-            node.arguments.single,
-            arg);
+            node, node.receiver, node.arguments.single, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperIndex(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperIndex(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidIndex(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       default:
         // This is not a valid case.
         break;
@@ -924,26 +661,20 @@
 
   EqualsStructure(this.semantics);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.EQUALS;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
         return visitor.visitEquals(
-            node,
-            node.receiver,
-            node.arguments.single,
-            arg);
+            node, node.receiver, node.arguments.single, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperEquals(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidEquals(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       default:
         // This is not a valid case.
         break;
@@ -962,26 +693,20 @@
 
   NotEqualsStructure(this.semantics);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.NOT_EQUALS;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
         return visitor.visitNotEquals(
-            node,
-            node.receiver,
-            node.arguments.single,
-            arg);
+            node, node.receiver, node.arguments.single, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperNotEquals(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidNotEquals(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       default:
         // This is not a valid case.
         break;
@@ -1004,42 +729,28 @@
 
   BinaryStructure(this.semantics, this.operator);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.BINARY;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
         return visitor.visitBinary(
-            node,
-            node.receiver,
-            operator,
-            node.arguments.single,
-            arg);
+            node, node.receiver, operator, node.arguments.single, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperBinary(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperBinary(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidBinary(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       default:
         // This is not a valid case.
         break;
     }
-    throw new SpannableAssertionFailure(
-        node, "Invalid binary: ${semantics}");
+    throw new SpannableAssertionFailure(node, "Invalid binary: ${semantics}");
   }
 
   String toString() => 'binary($operator,$semantics)';
@@ -1053,13 +764,12 @@
   @override
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     return visitor.errorUndefinedBinaryExpression(
-        node,
-        node.receiver,
-        node.selector,
-        node.arguments.single,
-        arg);
+        node, node.receiver, node.selector, node.arguments.single, arg);
   }
 
+  @override
+  SendStructureKind get kind => SendStructureKind.INVALID_BINARY;
+
   String toString() => 'invalid binary';
 }
 
@@ -1070,37 +780,24 @@
 
   IndexSetStructure(this.semantics);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.INDEX_SET;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
-        return visitor.visitIndexSet(
-            node,
-            node.receiver,
-            node.arguments.first,
-            node.arguments.tail.head,
-            arg);
+        return visitor.visitIndexSet(node, node.receiver, node.arguments.first,
+            node.arguments.tail.head, arg);
       case AccessKind.SUPER_METHOD:
-        return visitor.visitSuperIndexSet(
-            node,
-            semantics.element,
-            node.arguments.first,
-            node.arguments.tail.head,
-            arg);
+        return visitor.visitSuperIndexSet(node, semantics.element,
+            node.arguments.first, node.arguments.tail.head, arg);
       case AccessKind.UNRESOLVED_SUPER:
       case AccessKind.UNRESOLVED:
-        return visitor.visitUnresolvedSuperIndexSet(
-            node,
-            semantics.element,
-            node.arguments.first,
-            node.arguments.tail.head,
-            arg);
+        return visitor.visitUnresolvedSuperIndexSet(node, semantics.element,
+            node.arguments.first, node.arguments.tail.head, arg);
       case AccessKind.INVALID:
-        return visitor.errorInvalidIndexSet(
-            node,
-            semantics.element,
-            node.arguments.first,
-            node.arguments.tail.head,
-            arg);
+        return visitor.errorInvalidIndexSet(node, semantics.element,
+            node.arguments.first, node.arguments.tail.head, arg);
       default:
         // This is not a valid case.
         break;
@@ -1123,40 +820,26 @@
 
   IndexPrefixStructure(this.semantics, this.operator);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.INDEX_PREFIX;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
         return visitor.visitIndexPrefix(
-            node,
-            node.receiver,
-            node.arguments.single,
-            operator,
-            arg);
+            node, node.receiver, node.arguments.single, operator, arg);
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperIndexPrefix(
-            node,
-            semantics.element,
-            node.arguments.single,
-            operator,
-            arg);
+            node, semantics.element, node.arguments.single, operator, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidIndexPrefix(
-            node,
-            semantics.element,
-            node.arguments.single,
-            operator,
-            arg);
+            node, semantics.element, node.arguments.single, operator, arg);
       case AccessKind.COMPOUND:
         CompoundAccessSemantics compoundSemantics = semantics;
         switch (compoundSemantics.compoundAccessKind) {
           case CompoundAccessKind.SUPER_GETTER_SETTER:
-            return visitor.visitSuperIndexPrefix(
-                node,
-                compoundSemantics.getter,
-                compoundSemantics.setter,
-                node.arguments.single,
-                operator,
-                arg);
+            return visitor.visitSuperIndexPrefix(node, compoundSemantics.getter,
+                compoundSemantics.setter, node.arguments.single, operator, arg);
           case CompoundAccessKind.UNRESOLVED_SUPER_GETTER:
             return visitor.visitUnresolvedSuperGetterIndexPrefix(
                 node,
@@ -1198,29 +881,20 @@
 
   IndexPostfixStructure(this.semantics, this.operator);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.INDEX_POSTFIX;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
         return visitor.visitIndexPostfix(
-            node,
-            node.receiver,
-            node.arguments.single,
-            operator,
-            arg);
+            node, node.receiver, node.arguments.single, operator, arg);
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperIndexPostfix(
-            node,
-            semantics.element,
-            node.arguments.single,
-            operator,
-            arg);
+            node, semantics.element, node.arguments.single, operator, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidIndexPostfix(
-            node,
-            semantics.element,
-            node.arguments.single,
-            operator,
-            arg);
+            node, semantics.element, node.arguments.single, operator, arg);
       case AccessKind.COMPOUND:
         CompoundAccessSemantics compoundSemantics = semantics;
         switch (compoundSemantics.compoundAccessKind) {
@@ -1271,8 +945,10 @@
   /// The assignment operator used in the compound assignment.
   final AssignmentOperator operator;
 
-  CompoundStructure(this.semantics,
-                    this.operator);
+  CompoundStructure(this.semantics, this.operator);
+
+  @override
+  SendStructureKind get kind => SendStructureKind.COMPOUND;
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
@@ -1285,69 +961,32 @@
             node.arguments.single,
             arg);
       case AccessKind.DYNAMIC_PROPERTY:
-        return visitor.visitDynamicPropertyCompound(
-            node,
-            node.receiver,
-            semantics.name,
-            operator,
-            node.arguments.single,
-            arg);
+        return visitor.visitDynamicPropertyCompound(node, node.receiver,
+            semantics.name, operator, node.arguments.single, arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.LOCAL_VARIABLE:
         return visitor.visitLocalVariableCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.FINAL_LOCAL_VARIABLE:
         return visitor.visitFinalLocalVariableCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.PARAMETER:
         return visitor.visitParameterCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.FINAL_PARAMETER:
         return visitor.visitFinalParameterCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.STATIC_FIELD:
         return visitor.visitStaticFieldCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.FINAL_STATIC_FIELD:
         return visitor.visitFinalStaticFieldCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.STATIC_METHOD:
         return visitor.visitStaticMethodCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.STATIC_GETTER:
         // This is not a valid case.
         break;
@@ -1356,25 +995,13 @@
         break;
       case AccessKind.TOPLEVEL_FIELD:
         return visitor.visitTopLevelFieldCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.FINAL_TOPLEVEL_FIELD:
         return visitor.visitFinalTopLevelFieldCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.TOPLEVEL_METHOD:
         return visitor.visitTopLevelMethodCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.TOPLEVEL_GETTER:
         // This is not a valid case.
         break;
@@ -1383,32 +1010,16 @@
         break;
       case AccessKind.CLASS_TYPE_LITERAL:
         return visitor.visitClassTypeLiteralCompound(
-            node,
-            semantics.constant,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, operator, node.arguments.single, arg);
       case AccessKind.TYPEDEF_TYPE_LITERAL:
         return visitor.visitTypedefTypeLiteralCompound(
-            node,
-            semantics.constant,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, operator, node.arguments.single, arg);
       case AccessKind.DYNAMIC_TYPE_LITERAL:
         return visitor.visitDynamicTypeLiteralCompound(
-            node,
-            semantics.constant,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, operator, node.arguments.single, arg);
       case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
         return visitor.visitTypeVariableTypeLiteralCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.EXPRESSION:
         // This is not a valid case.
         break;
@@ -1417,32 +1028,16 @@
         break;
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertyCompound(
-            node,
-            semantics.name,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.name, operator, node.arguments.single, arg);
       case AccessKind.SUPER_FIELD:
         return visitor.visitSuperFieldCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.SUPER_FINAL_FIELD:
         return visitor.visitFinalSuperFieldCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperMethodCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.SUPER_GETTER:
         // This is not a valid case.
         break;
@@ -1454,25 +1049,13 @@
         break;
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.UNRESOLVED:
         return visitor.visitUnresolvedCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidCompound(
-            node,
-            semantics.element,
-            operator,
-            node.arguments.single,
-            arg);
+            node, semantics.element, operator, node.arguments.single, arg);
       case AccessKind.COMPOUND:
         CompoundAccessSemantics compoundSemantics = semantics;
         switch (compoundSemantics.compoundAccessKind) {
@@ -1599,8 +1182,8 @@
         }
         break;
     }
-    throw new SpannableAssertionFailure(node,
-        "Invalid compound assigment: ${semantics}");
+    throw new SpannableAssertionFailure(
+        node, "Invalid compound assigment: ${semantics}");
   }
 
   String toString() => 'compound($operator,$semantics)';
@@ -1614,70 +1197,41 @@
 
   SetIfNullStructure(this.semantics);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.SET_IF_NULL;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
         return visitor.visitIfNotNullDynamicPropertySetIfNull(
-            node,
-            node.receiver,
-            semantics.name,
-            node.arguments.single,
-            arg);
+            node, node.receiver, semantics.name, node.arguments.single, arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertySetIfNull(
-            node,
-            node.receiver,
-            semantics.name,
-            node.arguments.single,
-            arg);
+            node, node.receiver, semantics.name, node.arguments.single, arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.LOCAL_VARIABLE:
         return visitor.visitLocalVariableSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.FINAL_LOCAL_VARIABLE:
         return visitor.visitFinalLocalVariableSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.PARAMETER:
         return visitor.visitParameterSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.FINAL_PARAMETER:
         return visitor.visitFinalParameterSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.STATIC_FIELD:
         return visitor.visitStaticFieldSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.FINAL_STATIC_FIELD:
         return visitor.visitFinalStaticFieldSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.STATIC_METHOD:
         return visitor.visitStaticMethodSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.STATIC_GETTER:
         // This is not a valid case.
         break;
@@ -1686,22 +1240,13 @@
         break;
       case AccessKind.TOPLEVEL_FIELD:
         return visitor.visitTopLevelFieldSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.FINAL_TOPLEVEL_FIELD:
         return visitor.visitFinalTopLevelFieldSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.TOPLEVEL_METHOD:
         return visitor.visitTopLevelMethodSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.TOPLEVEL_GETTER:
         // This is not a valid case.
         break;
@@ -1710,28 +1255,16 @@
         break;
       case AccessKind.CLASS_TYPE_LITERAL:
         return visitor.visitClassTypeLiteralSetIfNull(
-            node,
-            semantics.constant,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, node.arguments.single, arg);
       case AccessKind.TYPEDEF_TYPE_LITERAL:
         return visitor.visitTypedefTypeLiteralSetIfNull(
-            node,
-            semantics.constant,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, node.arguments.single, arg);
       case AccessKind.DYNAMIC_TYPE_LITERAL:
         return visitor.visitDynamicTypeLiteralSetIfNull(
-            node,
-            semantics.constant,
-            node.arguments.single,
-            arg);
+            node, semantics.constant, node.arguments.single, arg);
       case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
         return visitor.visitTypeVariableTypeLiteralSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.EXPRESSION:
         // This is not a valid case.
         break;
@@ -1740,28 +1273,16 @@
         break;
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertySetIfNull(
-            node,
-            semantics.name,
-            node.arguments.single,
-            arg);
+            node, semantics.name, node.arguments.single, arg);
       case AccessKind.SUPER_FIELD:
         return visitor.visitSuperFieldSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.SUPER_FINAL_FIELD:
         return visitor.visitFinalSuperFieldSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperMethodSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.SUPER_GETTER:
         // This is not a valid case.
         break;
@@ -1773,22 +1294,13 @@
         break;
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.UNRESOLVED:
         return visitor.visitUnresolvedSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidSetIfNull(
-            node,
-            semantics.element,
-            node.arguments.single,
-            arg);
+            node, semantics.element, node.arguments.single, arg);
       case AccessKind.COMPOUND:
         CompoundAccessSemantics compoundSemantics = semantics;
         switch (compoundSemantics.compoundAccessKind) {
@@ -1900,8 +1412,8 @@
         }
         break;
     }
-    throw new SpannableAssertionFailure(node,
-        "Invalid if-null assigment: ${semantics}");
+    throw new SpannableAssertionFailure(
+        node, "Invalid if-null assigment: ${semantics}");
   }
 
   String toString() => 'ifNull($semantics)';
@@ -1918,16 +1430,14 @@
 
   CompoundIndexSetStructure(this.semantics, this.operator);
 
+  @override
+  SendStructureKind get kind => SendStructureKind.COMPOUND_INDEX_SET;
+
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.EXPRESSION:
-        return visitor.visitCompoundIndexSet(
-            node,
-            node.receiver,
-            node.arguments.first,
-            operator,
-            node.arguments.tail.head,
-            arg);
+        return visitor.visitCompoundIndexSet(node, node.receiver,
+            node.arguments.first, operator, node.arguments.tail.head, arg);
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperCompoundIndexSet(
             node,
@@ -1937,13 +1447,8 @@
             node.arguments.tail.head,
             arg);
       case AccessKind.INVALID:
-        return visitor.errorInvalidCompoundIndexSet(
-            node,
-            semantics.element,
-            node.arguments.first,
-            operator,
-            node.arguments.tail.head,
-            arg);
+        return visitor.errorInvalidCompoundIndexSet(node, semantics.element,
+            node.arguments.first, operator, node.arguments.tail.head, arg);
       case AccessKind.COMPOUND:
         CompoundAccessSemantics compoundSemantics = semantics;
         switch (compoundSemantics.compoundAccessKind) {
@@ -1990,6 +1495,75 @@
   String toString() => 'compound []=($operator,$semantics)';
 }
 
+/// The structure for a [Send] that is a if-null assignment on the index
+/// operator. For instance `a[b] ??= c`.
+class IndexSetIfNullStructure<R, A> implements SendStructure<R, A> {
+  /// The target of the index operations.
+  final AccessSemantics semantics;
+
+  IndexSetIfNullStructure(this.semantics);
+
+  @override
+  SendStructureKind get kind => SendStructureKind.INDEX_SET;
+
+  R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
+    switch (semantics.kind) {
+      case AccessKind.EXPRESSION:
+        return visitor.visitIndexSetIfNull(node, node.receiver,
+            node.arguments.first, node.arguments.tail.head, arg);
+      case AccessKind.UNRESOLVED_SUPER:
+        return visitor.visitUnresolvedSuperIndexSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.first,
+            node.arguments.tail.head,
+            arg);
+      case AccessKind.INVALID:
+        return visitor.errorInvalidIndexSetIfNull(node, semantics.element,
+            node.arguments.first, node.arguments.tail.head, arg);
+      case AccessKind.COMPOUND:
+        CompoundAccessSemantics compoundSemantics = semantics;
+        switch (compoundSemantics.compoundAccessKind) {
+          case CompoundAccessKind.SUPER_GETTER_SETTER:
+            return visitor.visitSuperIndexSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.first,
+                node.arguments.tail.head,
+                arg);
+          case CompoundAccessKind.UNRESOLVED_SUPER_GETTER:
+            return visitor.visitUnresolvedSuperGetterIndexSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.first,
+                node.arguments.tail.head,
+                arg);
+          case CompoundAccessKind.UNRESOLVED_SUPER_SETTER:
+            return visitor.visitUnresolvedSuperSetterIndexSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.first,
+                node.arguments.tail.head,
+                arg);
+          default:
+            // This is not a valid case.
+            break;
+        }
+        break;
+      default:
+        // This is not a valid case.
+        break;
+    }
+    throw new SpannableAssertionFailure(
+        node, "Invalid index set if-null: ${semantics}");
+  }
+
+  String toString() => 'index set if-null []??=($semantics)';
+}
+
 /// The structure for a [Send] that is a prefix operations. For instance
 /// `++a`.
 class PrefixStructure<R, A> implements SendStructure<R, A> {
@@ -1999,73 +1573,43 @@
   /// The `++` or `--` operator used in the operation.
   final IncDecOperator operator;
 
-  PrefixStructure(this.semantics,
-                  this.operator);
+  PrefixStructure(this.semantics, this.operator);
+
+  @override
+  SendStructureKind get kind => SendStructureKind.PREFIX;
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
         return visitor.visitIfNotNullDynamicPropertyPrefix(
-            node,
-            node.receiver,
-            semantics.name,
-            operator,
-            arg);
+            node, node.receiver, semantics.name, operator, arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertyPrefix(
-            node,
-            node.receiver,
-            semantics.name,
-            operator,
-            arg);
+            node, node.receiver, semantics.name, operator, arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.LOCAL_VARIABLE:
         return visitor.visitLocalVariablePrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.FINAL_LOCAL_VARIABLE:
         return visitor.visitFinalLocalVariablePrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.PARAMETER:
         return visitor.visitParameterPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.FINAL_PARAMETER:
         return visitor.visitFinalParameterPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.STATIC_FIELD:
         return visitor.visitStaticFieldPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.FINAL_STATIC_FIELD:
         return visitor.visitFinalStaticFieldPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.STATIC_METHOD:
         return visitor.visitStaticMethodPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.STATIC_GETTER:
         // This is not a valid case.
         break;
@@ -2074,22 +1618,13 @@
         break;
       case AccessKind.TOPLEVEL_FIELD:
         return visitor.visitTopLevelFieldPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.FINAL_TOPLEVEL_FIELD:
         return visitor.visitFinalTopLevelFieldPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.TOPLEVEL_METHOD:
         return visitor.visitTopLevelMethodPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.TOPLEVEL_GETTER:
         // This is not a valid case.
         break;
@@ -2098,28 +1633,16 @@
         break;
       case AccessKind.CLASS_TYPE_LITERAL:
         return visitor.visitClassTypeLiteralPrefix(
-            node,
-            semantics.constant,
-            operator,
-            arg);
+            node, semantics.constant, operator, arg);
       case AccessKind.TYPEDEF_TYPE_LITERAL:
         return visitor.visitTypedefTypeLiteralPrefix(
-            node,
-            semantics.constant,
-            operator,
-            arg);
+            node, semantics.constant, operator, arg);
       case AccessKind.DYNAMIC_TYPE_LITERAL:
         return visitor.visitDynamicTypeLiteralPrefix(
-            node,
-            semantics.constant,
-            operator,
-            arg);
+            node, semantics.constant, operator, arg);
       case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
         return visitor.visitTypeVariableTypeLiteralPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.EXPRESSION:
         // This is not a valid case.
         break;
@@ -2128,28 +1651,16 @@
         break;
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertyPrefix(
-            node,
-            semantics.name,
-            operator,
-            arg);
+            node, semantics.name, operator, arg);
       case AccessKind.SUPER_FIELD:
         return visitor.visitSuperFieldPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.SUPER_FINAL_FIELD:
         return visitor.visitFinalSuperFieldPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperMethodPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.SUPER_GETTER:
         // This is not a valid case.
         break;
@@ -2161,22 +1672,13 @@
         break;
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.UNRESOLVED:
         return visitor.visitUnresolvedPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidPrefix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.COMPOUND:
         CompoundAccessSemantics compoundSemantics = semantics;
         switch (compoundSemantics.compoundAccessKind) {
@@ -2294,8 +1796,8 @@
                 arg);
         }
     }
-    throw new SpannableAssertionFailure(node,
-        "Invalid compound assigment: ${semantics}");
+    throw new SpannableAssertionFailure(
+        node, "Invalid compound assigment: ${semantics}");
   }
 
   String toString() => 'prefix($operator,$semantics)';
@@ -2310,73 +1812,43 @@
   /// The `++` or `--` operator used in the operation.
   final IncDecOperator operator;
 
-  PostfixStructure(this.semantics,
-                   this.operator);
+  PostfixStructure(this.semantics, this.operator);
+
+  @override
+  SendStructureKind get kind => SendStructureKind.POSTFIX;
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
       case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
         return visitor.visitIfNotNullDynamicPropertyPostfix(
-            node,
-            node.receiver,
-            semantics.name,
-            operator,
-            arg);
+            node, node.receiver, semantics.name, operator, arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertyPostfix(
-            node,
-            node.receiver,
-            semantics.name,
-            operator,
-            arg);
+            node, node.receiver, semantics.name, operator, arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.LOCAL_VARIABLE:
         return visitor.visitLocalVariablePostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.FINAL_LOCAL_VARIABLE:
         return visitor.visitFinalLocalVariablePostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.PARAMETER:
         return visitor.visitParameterPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.FINAL_PARAMETER:
         return visitor.visitFinalParameterPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.STATIC_FIELD:
         return visitor.visitStaticFieldPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.FINAL_STATIC_FIELD:
         return visitor.visitFinalStaticFieldPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.STATIC_METHOD:
         return visitor.visitStaticMethodPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.STATIC_GETTER:
         // This is not a valid case.
         break;
@@ -2385,22 +1857,13 @@
         break;
       case AccessKind.TOPLEVEL_FIELD:
         return visitor.visitTopLevelFieldPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.FINAL_TOPLEVEL_FIELD:
         return visitor.visitFinalTopLevelFieldPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.TOPLEVEL_METHOD:
         return visitor.visitTopLevelMethodPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.TOPLEVEL_GETTER:
         // This is not a valid case.
         break;
@@ -2409,28 +1872,16 @@
         break;
       case AccessKind.CLASS_TYPE_LITERAL:
         return visitor.visitClassTypeLiteralPostfix(
-            node,
-            semantics.constant,
-            operator,
-            arg);
+            node, semantics.constant, operator, arg);
       case AccessKind.TYPEDEF_TYPE_LITERAL:
         return visitor.visitTypedefTypeLiteralPostfix(
-            node,
-            semantics.constant,
-            operator,
-            arg);
+            node, semantics.constant, operator, arg);
       case AccessKind.DYNAMIC_TYPE_LITERAL:
         return visitor.visitDynamicTypeLiteralPostfix(
-            node,
-            semantics.constant,
-            operator,
-            arg);
+            node, semantics.constant, operator, arg);
       case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
         return visitor.visitTypeVariableTypeLiteralPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.EXPRESSION:
         // This is not a valid case.
         break;
@@ -2439,28 +1890,16 @@
         break;
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertyPostfix(
-            node,
-            semantics.name,
-            operator,
-            arg);
+            node, semantics.name, operator, arg);
       case AccessKind.SUPER_FIELD:
         return visitor.visitSuperFieldPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.SUPER_FINAL_FIELD:
         return visitor.visitFinalSuperFieldPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.SUPER_METHOD:
         return visitor.visitSuperMethodPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.SUPER_GETTER:
         // This is not a valid case.
         break;
@@ -2472,22 +1911,13 @@
         break;
       case AccessKind.UNRESOLVED_SUPER:
         return visitor.visitUnresolvedSuperPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.UNRESOLVED:
         return visitor.visitUnresolvedPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.INVALID:
         return visitor.errorInvalidPostfix(
-            node,
-            semantics.element,
-            operator,
-            arg);
+            node, semantics.element, operator, arg);
       case AccessKind.COMPOUND:
         CompoundAccessSemantics compoundSemantics = semantics;
         switch (compoundSemantics.compoundAccessKind) {
@@ -2598,14 +2028,13 @@
                 arg);
         }
     }
-    throw new SpannableAssertionFailure(node,
-        "Invalid compound assigment: ${semantics}");
+    throw new SpannableAssertionFailure(
+        node, "Invalid compound assigment: ${semantics}");
   }
 
   String toString() => 'postfix($operator,$semantics)';
 }
 
-
 /// The structure for a [Send] whose prefix is a prefix for a deferred library.
 /// For instance `deferred.a` where `deferred` is a deferred prefix.
 class DeferredPrefixStructure<R, A> implements SendStructure<R, A> {
@@ -2622,17 +2051,23 @@
   }
 
   @override
+  SendStructureKind get kind => SendStructureKind.DEFERRED_PREFIX;
+
+  @override
   R dispatch(SemanticSendVisitor<R, A> visitor, Send send, A arg) {
     visitor.previsitDeferredAccess(send, prefix, arg);
     return sendStructure.dispatch(visitor, send, arg);
   }
 }
 
+enum NewStructureKind { NEW_INVOKE, CONST_INVOKE, LATE_CONST, }
 
 /// The structure for a [NewExpression] of a new invocation.
 abstract class NewStructure<R, A> implements SemanticSendStructure<R, A> {
   /// Calls the matching visit method on [visitor] with [node] and [arg].
   R dispatch(SemanticSendVisitor<R, A> visitor, NewExpression node, A arg);
+
+  NewStructureKind get kind;
 }
 
 /// The structure for a [NewExpression] of a new invocation. For instance
@@ -2643,6 +2078,9 @@
 
   NewInvokeStructure(this.semantics, this.selector);
 
+  @override
+  NewStructureKind get kind => NewStructureKind.NEW_INVOKE;
+
   CallStructure get callStructure => selector.callStructure;
 
   R dispatch(SemanticSendVisitor<R, A> visitor, NewExpression node, A arg) {
@@ -2651,66 +2089,95 @@
         ConstructorElement constructor = semantics.element;
         if (constructor.isRedirectingGenerative) {
           return visitor.visitRedirectingGenerativeConstructorInvoke(
-              node, constructor, semantics.type,
-              node.send.argumentsNode, callStructure, arg);
+              node,
+              constructor,
+              semantics.type,
+              node.send.argumentsNode,
+              callStructure,
+              arg);
         }
-        return visitor.visitGenerativeConstructorInvoke(
-            node, constructor, semantics.type,
-            node.send.argumentsNode, callStructure, arg);
+        return visitor.visitGenerativeConstructorInvoke(node, constructor,
+            semantics.type, node.send.argumentsNode, callStructure, arg);
       case ConstructorAccessKind.FACTORY:
         ConstructorElement constructor = semantics.element;
         if (constructor.isRedirectingFactory) {
           if (constructor.isEffectiveTargetMalformed) {
             return visitor.visitUnresolvedRedirectingFactoryConstructorInvoke(
-                node, semantics.element, semantics.type,
-                node.send.argumentsNode, callStructure, arg);
+                node,
+                semantics.element,
+                semantics.type,
+                node.send.argumentsNode,
+                callStructure,
+                arg);
           }
           ConstructorElement effectiveTarget = constructor.effectiveTarget;
           InterfaceType effectiveTargetType =
               constructor.computeEffectiveTargetType(semantics.type);
-          if (callStructure.signatureApplies(
-                  effectiveTarget.functionSignature)) {
+          if (callStructure
+              .signatureApplies(effectiveTarget.functionSignature)) {
             return visitor.visitRedirectingFactoryConstructorInvoke(
-                node, semantics.element, semantics.type,
-                effectiveTarget, effectiveTargetType,
-                node.send.argumentsNode, callStructure, arg);
+                node,
+                semantics.element,
+                semantics.type,
+                effectiveTarget,
+                effectiveTargetType,
+                node.send.argumentsNode,
+                callStructure,
+                arg);
           } else {
             return visitor.visitUnresolvedRedirectingFactoryConstructorInvoke(
-                            node, semantics.element, semantics.type,
-                            node.send.argumentsNode, callStructure, arg);
+                node,
+                semantics.element,
+                semantics.type,
+                node.send.argumentsNode,
+                callStructure,
+                arg);
           }
         }
         if (callStructure.signatureApplies(constructor.functionSignature)) {
-          return visitor.visitFactoryConstructorInvoke(
-              node, constructor, semantics.type,
-              node.send.argumentsNode, callStructure, arg);
+          return visitor.visitFactoryConstructorInvoke(node, constructor,
+              semantics.type, node.send.argumentsNode, callStructure, arg);
         }
-        return visitor.visitConstructorIncompatibleInvoke(
-            node, constructor, semantics.type,
-            node.send.argumentsNode, callStructure, arg);
+        return visitor.visitConstructorIncompatibleInvoke(node, constructor,
+            semantics.type, node.send.argumentsNode, callStructure, arg);
       case ConstructorAccessKind.ABSTRACT:
         return visitor.visitAbstractClassConstructorInvoke(
-            node, semantics.element, semantics.type,
-            node.send.argumentsNode, callStructure, arg);
+            node,
+            semantics.element,
+            semantics.type,
+            node.send.argumentsNode,
+            callStructure,
+            arg);
       case ConstructorAccessKind.UNRESOLVED_CONSTRUCTOR:
-        return visitor.visitUnresolvedConstructorInvoke(
-            node, semantics.element, semantics.type,
-            node.send.argumentsNode, selector, arg);
+        return visitor.visitUnresolvedConstructorInvoke(node, semantics.element,
+            semantics.type, node.send.argumentsNode, selector, arg);
       case ConstructorAccessKind.UNRESOLVED_TYPE:
         return visitor.visitUnresolvedClassConstructorInvoke(
-            node, semantics.element, semantics.type,
-            node.send.argumentsNode, selector, arg);
+            node,
+            semantics.element,
+            semantics.type,
+            node.send.argumentsNode,
+            selector,
+            arg);
       case ConstructorAccessKind.NON_CONSTANT_CONSTRUCTOR:
         return visitor.errorNonConstantConstructorInvoke(
-            node, semantics.element, semantics.type,
-            node.send.argumentsNode, callStructure, arg);
+            node,
+            semantics.element,
+            semantics.type,
+            node.send.argumentsNode,
+            callStructure,
+            arg);
       case ConstructorAccessKind.INCOMPATIBLE:
         return visitor.visitConstructorIncompatibleInvoke(
-            node, semantics.element, semantics.type,
-            node.send.argumentsNode, callStructure, arg);
+            node,
+            semantics.element,
+            semantics.type,
+            node.send.argumentsNode,
+            callStructure,
+            arg);
     }
-    throw new SpannableAssertionFailure(node,
-        "Unhandled constructor invocation kind: ${semantics.kind}");
+    throw new SpannableAssertionFailure(
+        node, "Unhandled constructor invocation kind: ${semantics.kind}");
   }
 
   String toString() => 'new($semantics,$selector)';
@@ -2726,13 +2193,16 @@
 /// The structure for a [NewExpression] of a constant invocation. For instance
 /// `const C()`.
 class ConstInvokeStructure<R, A> extends NewStructure<R, A> {
-  final ConstantInvokeKind kind;
+  final ConstantInvokeKind constantInvokeKind;
   final ConstantExpression constant;
 
-  ConstInvokeStructure(this.kind, this.constant);
+  ConstInvokeStructure(this.constantInvokeKind, this.constant);
+
+  @override
+  NewStructureKind get kind => NewStructureKind.CONST_INVOKE;
 
   R dispatch(SemanticSendVisitor<R, A> visitor, NewExpression node, A arg) {
-    switch (kind) {
+    switch (constantInvokeKind) {
       case ConstantInvokeKind.CONSTRUCTED:
         return visitor.visitConstConstructorInvoke(node, constant, arg);
       case ConstantInvokeKind.BOOL_FROM_ENVIRONMENT:
@@ -2757,6 +2227,48 @@
 
   LateConstInvokeStructure(this.elements);
 
+  @override
+  NewStructureKind get kind => NewStructureKind.LATE_CONST;
+
+  /// Convert this new structure into a regular new structure using the data
+  /// available in [elements].
+  NewStructure resolve(NewExpression node) {
+    Element element = elements[node.send];
+    Selector selector = elements.getSelector(node.send);
+    DartType type = elements.getType(node);
+    ConstantExpression constant = elements.getConstant(node);
+    if (element.isMalformed ||
+        constant == null ||
+        constant.kind == ConstantExpressionKind.ERRONEOUS) {
+      // This is a non-constant constant constructor invocation, like
+      // `const Const(method())`.
+      return new NewInvokeStructure(
+          new ConstructorAccessSemantics(
+              ConstructorAccessKind.NON_CONSTANT_CONSTRUCTOR, element, type),
+          selector);
+    } else {
+      ConstantInvokeKind kind;
+      switch (constant.kind) {
+        case ConstantExpressionKind.CONSTRUCTED:
+          kind = ConstantInvokeKind.CONSTRUCTED;
+          break;
+        case ConstantExpressionKind.BOOL_FROM_ENVIRONMENT:
+          kind = ConstantInvokeKind.BOOL_FROM_ENVIRONMENT;
+          break;
+        case ConstantExpressionKind.INT_FROM_ENVIRONMENT:
+          kind = ConstantInvokeKind.INT_FROM_ENVIRONMENT;
+          break;
+        case ConstantExpressionKind.STRING_FROM_ENVIRONMENT:
+          kind = ConstantInvokeKind.STRING_FROM_ENVIRONMENT;
+          break;
+        default:
+          throw new SpannableAssertionFailure(
+              node, "Unexpected constant kind $kind: ${constant.getText()}");
+      }
+      return new ConstInvokeStructure(kind, constant);
+    }
+  }
+
   R dispatch(SemanticSendVisitor<R, A> visitor, NewExpression node, A arg) {
     Element element = elements[node.send];
     Selector selector = elements.getSelector(node.send);
@@ -2767,8 +2279,7 @@
         constant.kind == ConstantExpressionKind.ERRONEOUS) {
       // This is a non-constant constant constructor invocation, like
       // `const Const(method())`.
-      return visitor.errorNonConstantConstructorInvoke(
-          node, element, type,
+      return visitor.errorNonConstantConstructorInvoke(node, element, type,
           node.send.argumentsNode, selector.callStructure, arg);
     } else {
       ConstantInvokeKind kind;
@@ -2808,16 +2319,12 @@
 class RequiredParameterStructure<R, A> extends ParameterStructure<R, A> {
   final int index;
 
-  RequiredParameterStructure(
-      VariableDefinitions definitions,
-      Node node,
-      ParameterElement parameter,
-      this.index)
+  RequiredParameterStructure(VariableDefinitions definitions, Node node,
+      ParameterElement parameter, this.index)
       : super(definitions, node, parameter);
 
   @override
-  R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             A arg) {
+  R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) {
     if (parameter.isInitializingFormal) {
       return visitor.visitInitializingFormalDeclaration(
           definitions, node, parameter, index, arg);
@@ -2833,17 +2340,12 @@
   final ConstantExpression defaultValue;
   final int index;
 
-  OptionalParameterStructure(
-       VariableDefinitions definitions,
-       Node node,
-       ParameterElement parameter,
-       this.defaultValue,
-       this.index)
-       : super(definitions, node, parameter);
+  OptionalParameterStructure(VariableDefinitions definitions, Node node,
+      ParameterElement parameter, this.defaultValue, this.index)
+      : super(definitions, node, parameter);
 
-   @override
-   R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             A arg) {
+  @override
+  R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) {
     if (parameter.isInitializingFormal) {
       return visitor.visitOptionalInitializingFormalDeclaration(
           definitions, node, parameter, defaultValue, index, arg);
@@ -2858,16 +2360,12 @@
 class NamedParameterStructure<R, A> extends ParameterStructure<R, A> {
   final ConstantExpression defaultValue;
 
-  NamedParameterStructure(
-      VariableDefinitions definitions,
-      Node node,
-      ParameterElement parameter,
-      this.defaultValue)
+  NamedParameterStructure(VariableDefinitions definitions, Node node,
+      ParameterElement parameter, this.defaultValue)
       : super(definitions, node, parameter);
 
   @override
-  R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             A arg) {
+  R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) {
     if (parameter.isInitializingFormal) {
       return visitor.visitNamedInitializingFormalDeclaration(
           definitions, node, parameter, defaultValue, arg);
@@ -2878,7 +2376,6 @@
   }
 }
 
-
 enum VariableKind {
   TOP_LEVEL_FIELD,
   STATIC_FIELD,
@@ -2894,19 +2391,16 @@
   VariableStructure(this.kind, this.node, this.variable);
 
   R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             VariableDefinitions definitions,
-             A arg);
+      VariableDefinitions definitions, A arg);
 }
 
-class NonConstantVariableStructure<R, A>
-    extends VariableStructure<R, A> {
+class NonConstantVariableStructure<R, A> extends VariableStructure<R, A> {
   NonConstantVariableStructure(
       VariableKind kind, Node node, VariableElement variable)
       : super(kind, node, variable);
 
   R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             VariableDefinitions definitions,
-             A arg) {
+      VariableDefinitions definitions, A arg) {
     switch (kind) {
       case VariableKind.TOP_LEVEL_FIELD:
         return visitor.visitTopLevelFieldDeclaration(
@@ -2924,8 +2418,7 @@
   }
 }
 
-class ConstantVariableStructure<R, A>
-    extends VariableStructure<R, A> {
+class ConstantVariableStructure<R, A> extends VariableStructure<R, A> {
   final ConstantExpression constant;
 
   ConstantVariableStructure(
@@ -2933,8 +2426,7 @@
       : super(kind, node, variable);
 
   R dispatch(SemanticDeclarationVisitor<R, A> visitor,
-             VariableDefinitions definitions,
-             A arg) {
+      VariableDefinitions definitions, A arg) {
     switch (kind) {
       case VariableKind.TOP_LEVEL_FIELD:
         return visitor.visitTopLevelConstantDeclaration(
diff --git a/pkg/compiler/lib/src/resolution/signatures.dart b/pkg/compiler/lib/src/resolution/signatures.dart
index df165a6..7b166d9 100644
--- a/pkg/compiler/lib/src/resolution/signatures.dart
+++ b/pkg/compiler/lib/src/resolution/signatures.dart
@@ -5,33 +5,26 @@
 library dart2js.resolution.signatures;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    ErroneousFieldElementX,
-    ErroneousInitializingFormalElementX,
-    FormalElementX,
-    FunctionElementX,
-    FunctionSignatureX,
-    InitializingFormalElementX,
-    LocalParameterElementX;
+import '../elements/modelx.dart'
+    show
+        ErroneousFieldElementX,
+        ErroneousInitializingFormalElementX,
+        FormalElementX,
+        FunctionElementX,
+        FunctionSignatureX,
+        InitializingFormalElementX,
+        LocalParameterElementX;
 import '../tree/tree.dart';
-import '../universe/use.dart' show
-    TypeUse;
-import '../util/util.dart' show
-    Link,
-    LinkBuilder;
+import '../universe/use.dart' show TypeUse;
+import '../util/util.dart' show Link, LinkBuilder;
 
-import 'members.dart' show
-    ResolverVisitor;
-import 'registry.dart' show
-    ResolutionRegistry;
-import 'resolution_common.dart' show
-    MappingVisitor;
-import 'scope.dart' show
-    Scope;
+import 'members.dart' show ResolverVisitor;
+import 'registry.dart' show ResolutionRegistry;
+import 'resolution_common.dart' show MappingVisitor;
+import 'scope.dart' show Scope;
 
 /**
  * [SignatureResolver] resolves function signatures.
@@ -48,11 +41,9 @@
   bool optionalParametersAreNamed = false;
   VariableDefinitions currentDefinitions;
 
-  SignatureResolver(Compiler compiler,
-                    FunctionTypedElement enclosingElement,
-                    ResolutionRegistry registry,
-                    {this.defaultValuesError,
-                     this.createRealParameters})
+  SignatureResolver(Compiler compiler, FunctionTypedElement enclosingElement,
+      ResolutionRegistry registry,
+      {this.defaultValuesError, this.createRealParameters})
       : this.enclosingElement = enclosingElement,
         this.scope = enclosingElement.buildScope(),
         this.resolver =
@@ -117,11 +108,14 @@
   }
 
   void computeParameterType(FormalElementX element,
-                            [VariableElement fieldElement]) {
+      [VariableElement fieldElement]) {
     void computeFunctionType(FunctionExpression functionExpression) {
       FunctionSignature functionSignature = SignatureResolver.analyze(
-          compiler, functionExpression.parameters,
-          functionExpression.returnType, element, registry,
+          compiler,
+          functionExpression.parameters,
+          functionExpression.returnType,
+          element,
+          registry,
           defaultValuesError: MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT);
       element.functionSignature = functionSignature;
     }
@@ -137,7 +131,7 @@
         // Inline function typed parameter, like `void m(int f(String s))`.
         computeFunctionType(link.head);
       } else if (link.head.asSend() != null &&
-                 link.head.asSend().selector.asFunctionExpression() != null) {
+          link.head.asSend().selector.asFunctionExpression() != null) {
         // Inline function typed initializing formal or
         // parameter with default value, like `C(int this.f(String s))` or
         // `void m([int f(String s) = null])`.
@@ -170,8 +164,8 @@
           functionExpression.name.asIdentifier() != null) {
         return functionExpression.name.asIdentifier();
       } else {
-        reporter.internalError(node,
-            'internal error: unimplemented receiver on parameter send');
+        reporter.internalError(
+            node, 'internal error: unimplemented receiver on parameter send');
         return null;
       }
     }
@@ -188,18 +182,18 @@
     FormalElementX parameter;
     if (createRealParameters) {
       parameter = new LocalParameterElementX(
-        enclosingElement, currentDefinitions, name, initializer,
-        isOptional: isOptionalParameter, isNamed: optionalParametersAreNamed);
+          enclosingElement, currentDefinitions, name, initializer,
+          isOptional: isOptionalParameter, isNamed: optionalParametersAreNamed);
     } else {
       parameter = new FormalElementX(
-        ElementKind.PARAMETER, enclosingElement, currentDefinitions, name);
+          ElementKind.PARAMETER, enclosingElement, currentDefinitions, name);
     }
     computeParameterType(parameter);
     return parameter;
   }
 
-  InitializingFormalElementX createFieldParameter(Send node,
-                                                  Expression initializer) {
+  InitializingFormalElementX createFieldParameter(
+      Send node, Expression initializer) {
     InitializingFormalElementX element;
     Identifier receiver = node.receiver.asIdentifier();
     if (receiver == null || !receiver.isThis()) {
@@ -221,16 +215,16 @@
           !identical(fieldElement.kind, ElementKind.FIELD)) {
         reporter.reportErrorMessage(
             node, MessageKind.NOT_A_FIELD, {'fieldName': name});
-        fieldElement = new ErroneousFieldElementX(
-            name, enclosingElement.enclosingClass);
+        fieldElement =
+            new ErroneousFieldElementX(name, enclosingElement.enclosingClass);
       } else if (!fieldElement.isInstanceMember) {
         reporter.reportErrorMessage(
             node, MessageKind.NOT_INSTANCE_FIELD, {'fieldName': name});
-        fieldElement = new ErroneousFieldElementX(
-            name, enclosingElement.enclosingClass);
+        fieldElement =
+            new ErroneousFieldElementX(name, enclosingElement.enclosingClass);
       }
-      element = new InitializingFormalElementX(enclosingElement,
-          currentDefinitions, name, initializer, fieldElement,
+      element = new InitializingFormalElementX(
+          enclosingElement, currentDefinitions, name, initializer, fieldElement,
           isOptional: isOptionalParameter, isNamed: optionalParametersAreNamed);
       computeParameterType(element, fieldElement);
     }
@@ -243,7 +237,7 @@
     if (node.receiver != null) {
       element = createFieldParameter(node, node.arguments.first);
     } else if (node.selector.asIdentifier() != null ||
-               node.selector.asFunctionExpression() != null) {
+        node.selector.asFunctionExpression() != null) {
       element = createParameter(getParameterName(node), node.arguments.first);
     }
     Node defaultValue = node.arguments.head;
@@ -258,8 +252,7 @@
     Modifiers modifiers = currentDefinitions.modifiers;
     if (modifiers.isFinal) {
       reporter.reportErrorMessage(
-          modifiers,
-          MessageKind.FINAL_FUNCTION_TYPE_PARAMETER);
+          modifiers, MessageKind.FINAL_FUNCTION_TYPE_PARAMETER);
     }
     if (modifiers.isVar) {
       reporter.reportErrorMessage(
@@ -278,7 +271,7 @@
       } else {
         // If parameter is null, the current node should be the last,
         // and a list of optional named parameters.
-        if (!link.tail.isEmpty || (link.head is !NodeList)) {
+        if (!link.tail.isEmpty || (link.head is! NodeList)) {
           reporter.internalError(link.head, "expected optional parameters");
         }
       }
@@ -301,12 +294,13 @@
       FunctionTypedElement element,
       ResolutionRegistry registry,
       {MessageKind defaultValuesError,
-       bool createRealParameters: false,
-       bool isFunctionExpression: false}) {
+      bool createRealParameters: false,
+      bool isFunctionExpression: false}) {
     DiagnosticReporter reporter = compiler.reporter;
 
-    SignatureResolver visitor = new SignatureResolver(compiler, element,
-        registry, defaultValuesError: defaultValuesError,
+    SignatureResolver visitor = new SignatureResolver(
+        compiler, element, registry,
+        defaultValuesError: defaultValuesError,
         createRealParameters: createRealParameters);
     List<Element> parameters = const <Element>[];
     int requiredParameterCount = 0;
@@ -324,17 +318,17 @@
       }
     } else {
       if (element.isGetter) {
-        if (!identical(formalParameters.endToken.next.stringValue,
-                       // TODO(ahe): Remove the check for native keyword.
-                       'native')) {
+        if (!identical(
+            formalParameters.endToken.next.stringValue,
+            // TODO(ahe): Remove the check for native keyword.
+            'native')) {
           reporter.reportErrorMessage(
-              formalParameters,
-              MessageKind.EXTRA_FORMALS);
+              formalParameters, MessageKind.EXTRA_FORMALS);
         }
       }
       LinkBuilder<Element> parametersBuilder =
-        visitor.analyzeNodes(formalParameters.nodes);
-      requiredParameterCount  = parametersBuilder.length;
+          visitor.analyzeNodes(formalParameters.nodes);
+      requiredParameterCount = parametersBuilder.length;
       parameters = parametersBuilder.toList();
     }
     DartType returnType;
@@ -342,7 +336,7 @@
       returnType = element.enclosingClass.thisType;
       // Because there is no type annotation for the return type of
       // this element, we explicitly add one.
-      if (compiler.enableTypeAssertions) {
+      if (compiler.options.enableTypeAssertions) {
         registry.registerTypeUse(new TypeUse.checkedModeCheck(returnType));
       }
     } else {
@@ -354,33 +348,32 @@
         asyncMarker = function.asyncMarker;
       }
       switch (asyncMarker) {
-      case AsyncMarker.SYNC:
-        returnType = visitor.resolveReturnType(returnNode);
-        break;
-      case AsyncMarker.SYNC_STAR:
-        returnType = compiler.coreTypes.iterableType();
-        break;
-      case AsyncMarker.ASYNC:
-        returnType = compiler.coreTypes.futureType();
-        break;
-      case AsyncMarker.ASYNC_STAR:
-        returnType = compiler.coreTypes.streamType();
-        break;
+        case AsyncMarker.SYNC:
+          returnType = visitor.resolveReturnType(returnNode);
+          break;
+        case AsyncMarker.SYNC_STAR:
+          returnType = compiler.coreTypes.iterableType();
+          break;
+        case AsyncMarker.ASYNC:
+          returnType = compiler.coreTypes.futureType();
+          break;
+        case AsyncMarker.ASYNC_STAR:
+          returnType = compiler.coreTypes.streamType();
+          break;
       }
     }
 
-    if (element.isSetter && (requiredParameterCount != 1 ||
-                               visitor.optionalParameterCount != 0)) {
+    if (element.isSetter &&
+        (requiredParameterCount != 1 || visitor.optionalParameterCount != 0)) {
       // If there are no formal parameters, we already reported an error above.
       if (formalParameters != null) {
         reporter.reportErrorMessage(
-            formalParameters,
-            MessageKind.ILLEGAL_SETTER_FORMALS);
+            formalParameters, MessageKind.ILLEGAL_SETTER_FORMALS);
       }
     }
     LinkBuilder<DartType> parameterTypes = new LinkBuilder<DartType>();
     for (FormalElement parameter in parameters) {
-       parameterTypes.addLast(parameter.type);
+      parameterTypes.addLast(parameter.type);
     }
     List<DartType> optionalParameterTypes = const <DartType>[];
     List<String> namedParameters = const <String>[];
@@ -390,7 +383,7 @@
     if (visitor.optionalParametersAreNamed) {
       // TODO(karlklose); replace when [visitor.optinalParameters] is a [List].
       orderedOptionalParameters.sort((Element a, Element b) {
-          return a.name.compareTo(b.name);
+        return a.name.compareTo(b.name);
       });
       LinkBuilder<String> namedParametersBuilder = new LinkBuilder<String>();
       LinkBuilder<DartType> namedParameterTypesBuilder =
@@ -400,8 +393,8 @@
         namedParameterTypesBuilder.addLast(parameter.type);
       }
       namedParameters = namedParametersBuilder.toLink().toList(growable: false);
-      namedParameterTypes = namedParameterTypesBuilder.toLink()
-          .toList(growable: false);
+      namedParameterTypes =
+          namedParameterTypesBuilder.toLink().toList(growable: false);
     } else {
       // TODO(karlklose); replace when [visitor.optinalParameters] is a [List].
       LinkBuilder<DartType> optionalParameterTypesBuilder =
@@ -409,8 +402,8 @@
       for (FormalElement parameter in visitor.optionalParameters) {
         optionalParameterTypesBuilder.addLast(parameter.type);
       }
-      optionalParameterTypes = optionalParameterTypesBuilder.toLink()
-          .toList(growable: false);
+      optionalParameterTypes =
+          optionalParameterTypesBuilder.toLink().toList(growable: false);
     }
     FunctionType type = new FunctionType(
         element.declaration,
diff --git a/pkg/compiler/lib/src/resolution/tree_elements.dart b/pkg/compiler/lib/src/resolution/tree_elements.dart
index a60bb79..1d1ddce 100644
--- a/pkg/compiler/lib/src/resolution/tree_elements.dart
+++ b/pkg/compiler/lib/src/resolution/tree_elements.dart
@@ -9,16 +9,12 @@
 import '../dart_types.dart';
 import '../diagnostics/source_span.dart';
 import '../elements/elements.dart';
-import '../types/types.dart' show
-    TypeMask;
+import '../types/types.dart' show TypeMask;
 import '../tree/tree.dart';
 import '../util/util.dart';
-import '../universe/selector.dart' show
-    Selector;
+import '../universe/selector.dart' show Selector;
 
-import 'secret_tree_element.dart' show
-    getTreeElement,
-    setTreeElement;
+import 'secret_tree_element.dart' show getTreeElement, setTreeElement;
 import 'send_structure.dart';
 
 abstract class TreeElements {
@@ -27,7 +23,7 @@
 
   void forEachConstantNode(f(Node n, ConstantExpression c));
 
-  Element operator[](Node node);
+  Element operator [](Node node);
   Map<Node, DartType> get typesCache;
 
   /// Returns the [SendStructure] that describes the semantics of [node].
@@ -111,7 +107,10 @@
   Map<Spannable, Selector> _selectors;
   Map<Spannable, TypeMask> _typeMasks;
   Map<Node, DartType> _types;
-  Map<Node, DartType> typesCache = <Node, DartType>{};
+
+  Map<Node, DartType> _typesCache;
+  Map<Node, DartType> get typesCache => _typesCache ??= <Node, DartType>{};
+
   Setlet<SourceSpan> _superUses;
   Map<Node, ConstantExpression> _constants;
   Map<VariableElement, List<Node>> _potentiallyMutated;
@@ -284,15 +283,15 @@
     return mutations;
   }
 
-  void registerPotentialMutationIn(Node contextNode, VariableElement element,
-                                    Node mutationNode) {
+  void registerPotentialMutationIn(
+      Node contextNode, VariableElement element, Node mutationNode) {
     if (_potentiallyMutatedIn == null) {
       _potentiallyMutatedIn =
           new Maplet<Node, Map<VariableElement, List<Node>>>();
     }
     Map<VariableElement, List<Node>> mutationMap =
-        _potentiallyMutatedIn.putIfAbsent(contextNode,
-          () => new Maplet<VariableElement, List<Node>>());
+        _potentiallyMutatedIn.putIfAbsent(
+            contextNode, () => new Maplet<VariableElement, List<Node>>());
     mutationMap.putIfAbsent(element, () => <Node>[]).add(mutationNode);
   }
 
@@ -303,13 +302,14 @@
     return mutations;
   }
 
-  void registerPotentialMutationInClosure(VariableElement element,
-                                          Node mutationNode) {
+  void registerPotentialMutationInClosure(
+      VariableElement element, Node mutationNode) {
     if (_potentiallyMutatedInClosure == null) {
       _potentiallyMutatedInClosure = new Maplet<VariableElement, List<Node>>();
     }
-    _potentiallyMutatedInClosure.putIfAbsent(
-        element, () => <Node>[]).add(mutationNode);
+    _potentiallyMutatedInClosure
+        .putIfAbsent(element, () => <Node>[])
+        .add(mutationNode);
   }
 
   List<Node> getAccessesByClosureIn(Node node, VariableElement element) {
@@ -321,14 +321,14 @@
     return accesses;
   }
 
-  void setAccessedByClosureIn(Node contextNode, VariableElement element,
-                              Node accessNode) {
+  void setAccessedByClosureIn(
+      Node contextNode, VariableElement element, Node accessNode) {
     if (_accessedByClosureIn == null) {
       _accessedByClosureIn = new Map<Node, Map<VariableElement, List<Node>>>();
     }
     Map<VariableElement, List<Node>> accessMap =
-        _accessedByClosureIn.putIfAbsent(contextNode,
-          () => new Maplet<VariableElement, List<Node>>());
+        _accessedByClosureIn.putIfAbsent(
+            contextNode, () => new Maplet<VariableElement, List<Node>>());
     accessMap.putIfAbsent(element, () => <Node>[]).add(accessNode);
   }
 
diff --git a/pkg/compiler/lib/src/resolution/type_resolver.dart b/pkg/compiler/lib/src/resolution/type_resolver.dart
index 165790d..832279b 100644
--- a/pkg/compiler/lib/src/resolution/type_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/type_resolver.dart
@@ -5,37 +5,28 @@
 library dart2js.resolution.types;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Feature,
-    Resolution;
-import '../compiler.dart' show
-    Compiler;
-import '../dart_backend/dart_backend.dart' show
-    DartBackend;
+import '../common/resolution.dart' show Feature, Resolution;
+import '../compiler.dart' show Compiler;
+import '../dart_backend/dart_backend.dart' show DartBackend;
 import '../dart_types.dart';
-import '../elements/elements.dart' show
-    AmbiguousElement,
-    ClassElement,
-    Element,
-    Elements,
-    ErroneousElement,
-    PrefixElement,
-    TypedefElement,
-    TypeVariableElement;
-import '../elements/modelx.dart' show
-    ErroneousElementX;
+import '../elements/elements.dart'
+    show
+        AmbiguousElement,
+        ClassElement,
+        Element,
+        Elements,
+        ErroneousElement,
+        PrefixElement,
+        TypedefElement,
+        TypeVariableElement;
+import '../elements/modelx.dart' show ErroneousElementX;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link;
+import '../util/util.dart' show Link;
 
-import 'members.dart' show
-    lookupInScope;
-import 'registry.dart' show
-    ResolutionRegistry;
-import 'resolution_common.dart' show
-    MappingVisitor;
-import 'scope.dart' show
-    Scope;
+import 'members.dart' show lookupInScope;
+import 'registry.dart' show ResolutionRegistry;
+import 'resolution_common.dart' show MappingVisitor;
+import 'scope.dart' show Scope;
 
 class TypeResolver {
   final Compiler compiler;
@@ -47,10 +38,9 @@
   Resolution get resolution => compiler.resolution;
 
   /// Tries to resolve the type name as an element.
-  Element resolveTypeName(Identifier prefixName,
-                          Identifier typeName,
-                          Scope scope,
-                          {bool deferredIsMalformed: true}) {
+  Element resolveTypeName(
+      Identifier prefixName, Identifier typeName, Scope scope,
+      {bool deferredIsMalformed: true}) {
     Element element;
     if (prefixName != null) {
       Element prefixElement =
@@ -66,9 +56,7 @@
             deferredIsMalformed &&
             compiler.backend is! DartBackend) {
           element = new ErroneousElementX(MessageKind.DEFERRED_TYPE_ANNOTATION,
-                                          {'node': typeName},
-                                          element.name,
-                                          element);
+              {'node': typeName}, element.name, element);
         }
       } else {
         // The caller of this method will create the ErroneousElement for
@@ -82,8 +70,7 @@
   }
 
   DartType resolveTypeAnnotation(MappingVisitor visitor, TypeAnnotation node,
-                                 {bool malformedIsError: false,
-                                  bool deferredIsMalformed: true}) {
+      {bool malformedIsError: false, bool deferredIsMalformed: true}) {
     ResolutionRegistry registry = visitor.registry;
 
     Identifier typeName;
@@ -91,13 +78,14 @@
 
     DartType checkNoTypeArguments(DartType type) {
       List<DartType> arguments = new List<DartType>();
-      bool hasTypeArgumentMismatch = resolveTypeArguments(
-          visitor, node, const <DartType>[], arguments);
+      bool hasTypeArgumentMismatch =
+          resolveTypeArguments(visitor, node, const <DartType>[], arguments);
       if (hasTypeArgumentMismatch) {
         return new MalformedType(
             new ErroneousElementX(MessageKind.TYPE_ARGUMENT_COUNT_MISMATCH,
                 {'type': node}, typeName.source, visitor.enclosingElement),
-                type, arguments);
+            type,
+            arguments);
       }
       return type;
     }
@@ -124,34 +112,30 @@
     }
 
     Element element = resolveTypeName(prefixName, typeName, visitor.scope,
-                                      deferredIsMalformed: deferredIsMalformed);
+        deferredIsMalformed: deferredIsMalformed);
 
     DartType reportFailureAndCreateType(
-        MessageKind messageKind,
-        Map messageArguments,
+        MessageKind messageKind, Map messageArguments,
         {DartType userProvidedBadType,
-         Element erroneousElement,
-         List<DiagnosticMessage> infos: const <DiagnosticMessage>[]}) {
+        Element erroneousElement,
+        List<DiagnosticMessage> infos: const <DiagnosticMessage>[]}) {
       if (malformedIsError) {
         reporter.reportError(
-            reporter.createMessage(node, messageKind, messageArguments),
-            infos);
+            reporter.createMessage(node, messageKind, messageArguments), infos);
       } else {
         registry.registerFeature(Feature.THROW_RUNTIME_ERROR);
         reporter.reportWarning(
-            reporter.createMessage(node, messageKind, messageArguments),
-            infos);
+            reporter.createMessage(node, messageKind, messageArguments), infos);
       }
       if (erroneousElement == null) {
         registry.registerFeature(Feature.THROW_RUNTIME_ERROR);
-        erroneousElement = new ErroneousElementX(
-            messageKind, messageArguments, typeName.source,
-            visitor.enclosingElement);
+        erroneousElement = new ErroneousElementX(messageKind, messageArguments,
+            typeName.source, visitor.enclosingElement);
       }
       List<DartType> arguments = <DartType>[];
       resolveTypeArguments(visitor, node, const <DartType>[], arguments);
-      return new MalformedType(erroneousElement,
-              userProvidedBadType, arguments);
+      return new MalformedType(
+          erroneousElement, userProvidedBadType, arguments);
     }
 
     // Try to construct the type from the element.
@@ -161,8 +145,7 @@
     } else if (element.isAmbiguous) {
       AmbiguousElement ambiguous = element;
       type = reportFailureAndCreateType(
-          ambiguous.messageKind,
-          ambiguous.messageArguments,
+          ambiguous.messageKind, ambiguous.messageArguments,
           infos: ambiguous.computeInfos(
               registry.mapping.analyzedElement, reporter));
       ;
@@ -186,12 +169,13 @@
         compiler.resolver.ensureClassWillBeResolvedInternal(cls);
         cls.computeType(resolution);
         List<DartType> arguments = <DartType>[];
-        bool hasTypeArgumentMismatch = resolveTypeArguments(
-            visitor, node, cls.typeVariables, arguments);
+        bool hasTypeArgumentMismatch =
+            resolveTypeArguments(visitor, node, cls.typeVariables, arguments);
         if (hasTypeArgumentMismatch) {
-          type = new BadInterfaceType(cls.declaration,
-              new InterfaceType.forUserProvidedBadType(cls.declaration,
-                                                       arguments));
+          type = new BadInterfaceType(
+              cls.declaration,
+              new InterfaceType.forUserProvidedBadType(
+                  cls.declaration, arguments));
         } else {
           if (arguments.isEmpty) {
             type = cls.rawType;
@@ -237,13 +221,12 @@
         }
         type = checkNoTypeArguments(type);
       } else {
-        reporter.internalError(node,
-            "Unexpected element kind ${element.kind}.");
+        reporter.internalError(
+            node, "Unexpected element kind ${element.kind}.");
       }
       if (addTypeVariableBoundsCheck) {
         registry.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK);
-        visitor.addDeferredAction(
-            visitor.enclosingElement,
+        visitor.addDeferredAction(visitor.enclosingElement,
             () => checkTypeVariableBounds(node, type));
       }
     }
@@ -254,18 +237,18 @@
   /// Checks the type arguments of [type] against the type variable bounds.
   void checkTypeVariableBounds(TypeAnnotation node, GenericType type) {
     void checkTypeVariableBound(_, DartType typeArgument,
-                                   TypeVariableType typeVariable,
-                                   DartType bound) {
+        TypeVariableType typeVariable, DartType bound) {
       if (!compiler.types.isSubtype(typeArgument, bound)) {
         reporter.reportWarningMessage(
-            node,
-            MessageKind.INVALID_TYPE_VARIABLE_BOUND,
-            {'typeVariable': typeVariable,
-             'bound': bound,
-             'typeArgument': typeArgument,
-             'thisType': type.element.thisType});
+            node, MessageKind.INVALID_TYPE_VARIABLE_BOUND, {
+          'typeVariable': typeVariable,
+          'bound': bound,
+          'typeArgument': typeArgument,
+          'thisType': type.element.thisType
+        });
       }
-    };
+    }
+    ;
 
     compiler.types.checkTypeVariableBounds(type, checkTypeVariableBound);
   }
@@ -276,10 +259,8 @@
    * Returns [: true :] if the number of type arguments did not match the
    * number of type variables.
    */
-  bool resolveTypeArguments(MappingVisitor visitor,
-                            TypeAnnotation node,
-                            List<DartType> typeVariables,
-                            List<DartType> arguments) {
+  bool resolveTypeArguments(MappingVisitor visitor, TypeAnnotation node,
+      List<DartType> typeVariables, List<DartType> arguments) {
     if (node.typeArguments == null) {
       return false;
     }
@@ -287,8 +268,8 @@
     int index = 0;
     bool typeArgumentCountMismatch = false;
     for (Link<Node> typeArguments = node.typeArguments.nodes;
-         !typeArguments.isEmpty;
-         typeArguments = typeArguments.tail, index++) {
+        !typeArguments.isEmpty;
+        typeArguments = typeArguments.tail, index++) {
       if (index > expectedVariables - 1) {
         reporter.reportWarningMessage(
             typeArguments.head, MessageKind.ADDITIONAL_TYPE_ARGUMENT);
diff --git a/pkg/compiler/lib/src/resolution/typedefs.dart b/pkg/compiler/lib/src/resolution/typedefs.dart
index 87acbd6..ed6f741 100644
--- a/pkg/compiler/lib/src/resolution/typedefs.dart
+++ b/pkg/compiler/lib/src/resolution/typedefs.dart
@@ -5,36 +5,24 @@
 library dart2js.resolution.typedefs;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../dart_types.dart';
-import '../elements/elements.dart' show
-    FunctionSignature,
-    TypedefElement,
-    TypeVariableElement;
-import '../elements/modelx.dart' show
-    ErroneousElementX,
-    TypedefElementX;
+import '../elements/elements.dart'
+    show FunctionSignature, TypedefElement, TypeVariableElement;
+import '../elements/modelx.dart' show ErroneousElementX, TypedefElementX;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link;
+import '../util/util.dart' show Link;
 
-import 'class_hierarchy.dart' show
-    TypeDefinitionVisitor;
-import 'registry.dart' show
-    ResolutionRegistry;
-import 'scope.dart' show
-    MethodScope,
-    TypeDeclarationScope;
-import 'signatures.dart' show
-    SignatureResolver;
+import 'class_hierarchy.dart' show TypeDefinitionVisitor;
+import 'registry.dart' show ResolutionRegistry;
+import 'scope.dart' show MethodScope, TypeDeclarationScope;
+import 'signatures.dart' show SignatureResolver;
 
 class TypedefResolverVisitor extends TypeDefinitionVisitor {
   TypedefElementX get element => enclosingElement;
 
-  TypedefResolverVisitor(Compiler compiler,
-                         TypedefElement typedefElement,
-                         ResolutionRegistry registry)
+  TypedefResolverVisitor(Compiler compiler, TypedefElement typedefElement,
+      ResolutionRegistry registry)
       : super(compiler, typedefElement, registry);
 
   visitTypedef(Typedef node) {
@@ -88,33 +76,31 @@
         hasCyclicReference = true;
         if (seenTypedefsCount == 1) {
           // Direct cyclicity.
-          reporter.reportErrorMessage(
-              element,
-              MessageKind.CYCLIC_TYPEDEF,
+          reporter.reportErrorMessage(element, MessageKind.CYCLIC_TYPEDEF,
               {'typedefName': element.name});
         } else if (seenTypedefsCount == 2) {
           // Cyclicity through one other typedef.
-          reporter.reportErrorMessage(
-              element,
-              MessageKind.CYCLIC_TYPEDEF_ONE,
-              {'typedefName': element.name,
-               'otherTypedefName': seenTypedefs.head.name});
+          reporter.reportErrorMessage(element, MessageKind.CYCLIC_TYPEDEF_ONE, {
+            'typedefName': element.name,
+            'otherTypedefName': seenTypedefs.head.name
+          });
         } else {
           // Cyclicity through more than one other typedef.
           for (TypedefElement cycle in seenTypedefs) {
             if (!identical(typedefElement, cycle)) {
               reporter.reportErrorMessage(
-                  element,
-                  MessageKind.CYCLIC_TYPEDEF_ONE,
-                  {'typedefName': element.name,
-                   'otherTypedefName': cycle.name});
+                  element, MessageKind.CYCLIC_TYPEDEF_ONE, {
+                'typedefName': element.name,
+                'otherTypedefName': cycle.name
+              });
             }
           }
         }
         ErroneousElementX erroneousElement = new ErroneousElementX(
-              MessageKind.CYCLIC_TYPEDEF,
-              {'typedefName': element.name},
-              element.name, element);
+            MessageKind.CYCLIC_TYPEDEF,
+            {'typedefName': element.name},
+            element.name,
+            element);
         element.aliasCache =
             new MalformedType(erroneousElement, typedefElement.aliasCache);
         element.hasBeenCheckedForCycles = true;
diff --git a/pkg/compiler/lib/src/resolution/variables.dart b/pkg/compiler/lib/src/resolution/variables.dart
index aec67f3..c5609a8 100644
--- a/pkg/compiler/lib/src/resolution/variables.dart
+++ b/pkg/compiler/lib/src/resolution/variables.dart
@@ -5,37 +5,25 @@
 library dart2js.resolution.variables;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
-import '../elements/modelx.dart' show
-    LocalVariableElementX,
-    VariableList;
+import '../compiler.dart' show Compiler;
+import '../elements/modelx.dart' show LocalVariableElementX, VariableList;
 import '../tree/tree.dart';
-import '../universe/use.dart' show
-    TypeUse;
-import '../util/util.dart' show
-    Link;
+import '../universe/use.dart' show TypeUse;
+import '../util/util.dart' show Link;
 
-import 'members.dart' show
-    ResolverVisitor;
-import 'registry.dart' show
-    ResolutionRegistry;
-import 'resolution_common.dart' show
-    CommonResolverVisitor;
-import 'scope.dart' show
-    VariableDefinitionScope;
+import 'members.dart' show ResolverVisitor;
+import 'registry.dart' show ResolutionRegistry;
+import 'resolution_common.dart' show CommonResolverVisitor;
+import 'scope.dart' show VariableDefinitionScope;
 
 class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
   VariableDefinitions definitions;
   ResolverVisitor resolver;
   VariableList variables;
 
-  VariableDefinitionsVisitor(Compiler compiler,
-                             this.definitions,
-                             this.resolver,
-                             this.variables)
-      : super(compiler) {
-  }
+  VariableDefinitionsVisitor(
+      Compiler compiler, this.definitions, this.resolver, this.variables)
+      : super(compiler) {}
 
   ResolutionRegistry get registry => resolver.registry;
 
@@ -47,9 +35,8 @@
         new VariableDefinitionScope(resolver.scope, name);
     resolver.visitIn(node.arguments.head, scope);
     if (scope.variableReferencedInInitializer) {
-      reporter.reportErrorMessage(
-          identifier, MessageKind.REFERENCE_IN_INITIALIZATION,
-          {'variableName': name});
+      reporter.reportErrorMessage(identifier,
+          MessageKind.REFERENCE_IN_INITIALIZATION, {'variableName': name});
     }
     return identifier;
   }
@@ -61,17 +48,14 @@
         new TypeUse.instantiation(compiler.coreTypes.nullType));
     if (definitions.modifiers.isConst) {
       if (resolver.inLoopVariable) {
-        reporter.reportErrorMessage(
-            node, MessageKind.CONST_LOOP_VARIABLE);
+        reporter.reportErrorMessage(node, MessageKind.CONST_LOOP_VARIABLE);
       } else {
         reporter.reportErrorMessage(
             node, MessageKind.CONST_WITHOUT_INITIALIZER);
       }
     }
-    if (definitions.modifiers.isFinal &&
-        !resolver.inLoopVariable) {
-      reporter.reportErrorMessage(
-          node, MessageKind.FINAL_WITHOUT_INITIALIZER);
+    if (definitions.modifiers.isFinal && !resolver.inLoopVariable) {
+      reporter.reportErrorMessage(node, MessageKind.FINAL_WITHOUT_INITIALIZER);
     }
     return node;
   }
@@ -80,8 +64,7 @@
     for (Link<Node> link = node.nodes; !link.isEmpty; link = link.tail) {
       Identifier name = visit(link.head);
       LocalVariableElementX element = new LocalVariableElementX(
-          name.source, resolver.enclosingElement,
-          variables, name.token);
+          name.source, resolver.enclosingElement, variables, name.token);
       resolver.defineLocalVariable(link.head, element);
       resolver.addToScope(element);
       if (definitions.modifiers.isConst) {
diff --git a/pkg/compiler/lib/src/scanner/array_based_scanner.dart b/pkg/compiler/lib/src/scanner/array_based_scanner.dart
index 49461fb..27540a4 100644
--- a/pkg/compiler/lib/src/scanner/array_based_scanner.dart
+++ b/pkg/compiler/lib/src/scanner/array_based_scanner.dart
@@ -4,33 +4,19 @@
 
 library dart2js.scanner.array_based;
 
-import '../io/source_file.dart' show
-    SourceFile;
-import '../tokens/keyword.dart' show
-    Keyword;
-import '../tokens/precedence.dart' show
-    PrecedenceInfo;
-import '../tokens/precedence_constants.dart' as Precedence show
-    COMMENT_INFO,
-    EOF_INFO;
-import '../tokens/token.dart' show
-    BeginGroupToken,
-    ErrorToken,
-    KeywordToken,
-    SymbolToken,
-    Token;
-import '../tokens/token_constants.dart' as Tokens show
-    LT_TOKEN,
-    OPEN_CURLY_BRACKET_TOKEN,
-    STRING_INTERPOLATION_TOKEN;
-import '../util/characters.dart' show
-    $LF,
-    $STX;
-import '../util/util.dart' show
-    Link;
+import '../io/source_file.dart' show SourceFile;
+import '../tokens/keyword.dart' show Keyword;
+import '../tokens/precedence.dart' show PrecedenceInfo;
+import '../tokens/precedence_constants.dart' as Precedence
+    show COMMENT_INFO, EOF_INFO;
+import '../tokens/token.dart'
+    show BeginGroupToken, ErrorToken, KeywordToken, SymbolToken, Token;
+import '../tokens/token_constants.dart' as Tokens
+    show LT_TOKEN, OPEN_CURLY_BRACKET_TOKEN, STRING_INTERPOLATION_TOKEN;
+import '../util/characters.dart' show $LF, $STX;
+import '../util/util.dart' show Link;
 
-import 'scanner.dart' show
-    AbstractScanner;
+import 'scanner.dart' show AbstractScanner;
 
 abstract class ArrayBasedScanner extends AbstractScanner {
   ArrayBasedScanner(SourceFile file, bool includeComments)
@@ -153,7 +139,7 @@
     BeginGroupToken begin = groupingStack.head;
     if (!identical(begin.kind, openKind)) {
       assert(begin.kind == Tokens.STRING_INTERPOLATION_TOKEN &&
-             openKind == Tokens.OPEN_CURLY_BRACKET_TOKEN);
+          openKind == Tokens.OPEN_CURLY_BRACKET_TOKEN);
       // We're ending an interpolated expression.
       begin.endGroup = close;
       groupingStack = groupingStack.tail;
@@ -240,8 +226,8 @@
    * list, like the '=' in the above example.
    */
   void discardOpenLt() {
-    while (!groupingStack.isEmpty
-        && identical(groupingStack.head.kind, Tokens.LT_TOKEN)) {
+    while (!groupingStack.isEmpty &&
+        identical(groupingStack.head.kind, Tokens.LT_TOKEN)) {
       groupingStack = groupingStack.tail;
     }
   }
diff --git a/pkg/compiler/lib/src/scanner/scanner.dart b/pkg/compiler/lib/src/scanner/scanner.dart
index 1a52a64..30d5caf 100644
--- a/pkg/compiler/lib/src/scanner/scanner.dart
+++ b/pkg/compiler/lib/src/scanner/scanner.dart
@@ -4,29 +4,21 @@
 
 library dart2js.scanner;
 
-import '../io/source_file.dart' show
-    SourceFile,
-    Utf8BytesSourceFile;
-import '../tokens/keyword.dart' show
-    Keyword,
-    KeywordState;
+import '../io/source_file.dart' show SourceFile, Utf8BytesSourceFile;
+import '../tokens/keyword.dart' show Keyword, KeywordState;
 import '../tokens/precedence.dart';
 import '../tokens/precedence_constants.dart';
 import '../tokens/token.dart';
 import '../tokens/token_constants.dart';
 import '../util/characters.dart';
 
-import 'string_scanner.dart' show
-    StringScanner;
-import 'utf8_bytes_scanner.dart' show
-    Utf8BytesScanner;
-
+import 'string_scanner.dart' show StringScanner;
+import 'utf8_bytes_scanner.dart' show Utf8BytesScanner;
 
 abstract class Scanner {
   Token tokenize();
 
-  factory Scanner(SourceFile file,
-      {bool includeComments: false}) {
+  factory Scanner(SourceFile file, {bool includeComments: false}) {
     if (file is Utf8BytesSourceFile) {
       return new Utf8BytesScanner(file, includeComments: includeComments);
     } else {
@@ -72,8 +64,7 @@
 
   final List<int> lineStarts = <int>[0];
 
-  AbstractScanner(
-      this.file, this.includeComments) {
+  AbstractScanner(this.file, this.includeComments) {
     this.tail = this.tokens;
   }
 
@@ -166,8 +157,8 @@
    * Note that [extraOffset] can only be used if the covered character(s) are
    * known to be ASCII.
    */
-  void appendSubstringToken(PrecedenceInfo info, int start,
-                            bool asciiOnly, [int extraOffset]);
+  void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly,
+      [int extraOffset]);
 
   /** Documentation in subclass [ArrayBasedScanner]. */
   void appendPrecedenceToken(PrecedenceInfo info);
@@ -236,8 +227,10 @@
 
   int bigSwitch(int next) {
     beginToken();
-    if (identical(next, $SPACE) || identical(next, $TAB)
-        || identical(next, $LF) || identical(next, $CR)) {
+    if (identical(next, $SPACE) ||
+        identical(next, $TAB) ||
+        identical(next, $LF) ||
+        identical(next, $CR)) {
       appendWhiteSpace(next);
       next = advance();
       // Sequences of spaces are common, so advance through them fast.
@@ -354,8 +347,8 @@
     }
 
     if (identical(next, $CLOSE_SQUARE_BRACKET)) {
-      return appendEndGroup(CLOSE_SQUARE_BRACKET_INFO,
-                            OPEN_SQUARE_BRACKET_TOKEN);
+      return appendEndGroup(
+          CLOSE_SQUARE_BRACKET_INFO, OPEN_SQUARE_BRACKET_TOKEN);
     }
 
     if (identical(next, $BACKPING)) {
@@ -369,8 +362,7 @@
     }
 
     if (identical(next, $CLOSE_CURLY_BRACKET)) {
-      return appendEndGroup(CLOSE_CURLY_BRACKET_INFO,
-                            OPEN_CURLY_BRACKET_TOKEN);
+      return appendEndGroup(CLOSE_CURLY_BRACKET_INFO, OPEN_CURLY_BRACKET_TOKEN);
     }
 
     if (identical(next, $SLASH)) {
@@ -394,9 +386,15 @@
     }
 
     // TODO(ahe): Would a range check be faster?
-    if (identical(next, $1) || identical(next, $2) || identical(next, $3)
-        || identical(next, $4) ||  identical(next, $5) || identical(next, $6)
-        || identical(next, $7) || identical(next, $8) || identical(next, $9)) {
+    if (identical(next, $1) ||
+        identical(next, $2) ||
+        identical(next, $3) ||
+        identical(next, $4) ||
+        identical(next, $5) ||
+        identical(next, $6) ||
+        identical(next, $7) ||
+        identical(next, $8) ||
+        identical(next, $9)) {
       return tokenizeNumber(next);
     }
 
@@ -429,8 +427,8 @@
           next = advance();
           if (next > 127) asciiOnly = false;
         } while (!identical(next, $LF) &&
-                 !identical(next, $CR) &&
-                 !identical(next, $EOF));
+            !identical(next, $CR) &&
+            !identical(next, $EOF));
         if (!asciiOnly) handleUnicode(start);
         return next;
       }
@@ -655,9 +653,9 @@
     bool hasDigits = false;
     while (true) {
       next = advance();
-      if (($0 <= next && next <= $9)
-          || ($A <= next && next <= $F)
-          || ($a <= next && next <= $f)) {
+      if (($0 <= next && next <= $9) ||
+          ($A <= next && next <= $F) ||
+          ($a <= next && next <= $f)) {
         hasDigits = true;
       } else {
         if (!hasDigits) {
@@ -766,7 +764,6 @@
     return null;
   }
 
-
   int tokenizeMultiLineComment(int next, int start) {
     bool asciiOnlyComment = true; // Track if the entire comment is ASCII.
     bool asciiOnlyLines = true; // Track ASCII since the last handleUnicode.
@@ -924,8 +921,8 @@
         asciiOnly = true;
         continue;
       }
-      if (next <= $CR
-          && (identical(next, $LF) ||
+      if (next <= $CR &&
+          (identical(next, $LF) ||
               identical(next, $CR) ||
               identical(next, $EOF))) {
         if (!asciiOnly) handleUnicode(start);
@@ -960,7 +957,7 @@
       next = bigSwitch(next);
     }
     if (identical(next, $EOF)) return next;
-    next = advance();  // Move past the $STX.
+    next = advance(); // Move past the $STX.
     beginToken(); // The string interpolation suffix starts here.
     return next;
   }
diff --git a/pkg/compiler/lib/src/scanner/scanner_task.dart b/pkg/compiler/lib/src/scanner/scanner_task.dart
index 17b3dbc..3d694a3 100644
--- a/pkg/compiler/lib/src/scanner/scanner_task.dart
+++ b/pkg/compiler/lib/src/scanner/scanner_task.dart
@@ -4,25 +4,34 @@
 
 library dart2js.scanner.task;
 
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
-import '../elements/elements.dart' show
-    CompilationUnitElement,
-    LibraryElement;
-import '../script.dart' show
-    Script;
-import '../tokens/token.dart' show
-    Token;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
+import '../elements/elements.dart' show CompilationUnitElement, LibraryElement;
+import '../script.dart' show Script;
+import '../parser/diet_parser_task.dart' show DietParserTask;
+import '../tokens/token.dart' show Token;
+import '../tokens/token_constants.dart' as Tokens show COMMENT_TOKEN, EOF_TOKEN;
+import '../tokens/token_map.dart' show TokenMap;
 
-import 'scanner.dart' show
-    Scanner;
-import 'string_scanner.dart' show
-    StringScanner;
+import 'scanner.dart' show Scanner;
+import 'string_scanner.dart' show StringScanner;
 
 class ScannerTask extends CompilerTask {
-  ScannerTask(Compiler compiler) : super(compiler);
+  final DietParserTask _dietParser;
+  final bool _preserveComments;
+  final TokenMap _commentMap;
+
+  ScannerTask(Compiler compiler, this._dietParser,
+      {bool preserveComments: false, TokenMap commentMap})
+      : _preserveComments = preserveComments,
+        _commentMap = commentMap,
+        super(compiler) {
+    if (_preserveComments && _commentMap == null) {
+      throw new ArgumentError(
+          "commentMap must be provided if preserveComments is true");
+    }
+  }
+
   String get name => 'Scanner';
 
   void scanLibrary(LibraryElement library) {
@@ -45,12 +54,12 @@
 
   void scanElements(CompilationUnitElement compilationUnit) {
     Script script = compilationUnit.script;
-    Token tokens = new Scanner(script.file,
-        includeComments: compiler.preserveComments).tokenize();
-    if (compiler.preserveComments) {
-      tokens = compiler.processAndStripComments(tokens);
+    Token tokens =
+        new Scanner(script.file, includeComments: _preserveComments).tokenize();
+    if (_preserveComments) {
+      tokens = processAndStripComments(tokens);
     }
-    compiler.dietParser.dietParse(compilationUnit, tokens);
+    _dietParser.dietParse(compilationUnit, tokens);
   }
 
   /**
@@ -66,4 +75,26 @@
           .tokenize();
     });
   }
+
+  Token processAndStripComments(Token currentToken) {
+    Token firstToken = currentToken;
+    Token prevToken;
+    while (currentToken.kind != Tokens.EOF_TOKEN) {
+      if (identical(currentToken.kind, Tokens.COMMENT_TOKEN)) {
+        Token firstCommentToken = currentToken;
+        while (identical(currentToken.kind, Tokens.COMMENT_TOKEN)) {
+          currentToken = currentToken.next;
+        }
+        _commentMap[currentToken] = firstCommentToken;
+        if (prevToken == null) {
+          firstToken = currentToken;
+        } else {
+          prevToken.next = currentToken;
+        }
+      }
+      prevToken = currentToken;
+      currentToken = currentToken.next;
+    }
+    return firstToken;
+  }
 }
diff --git a/pkg/compiler/lib/src/scanner/string_scanner.dart b/pkg/compiler/lib/src/scanner/string_scanner.dart
index 21bc2bb..5c6604e 100644
--- a/pkg/compiler/lib/src/scanner/string_scanner.dart
+++ b/pkg/compiler/lib/src/scanner/string_scanner.dart
@@ -4,17 +4,11 @@
 
 library dart2js.scanner.string;
 
-import '../io/source_file.dart' show
-    SourceFile;
-import '../tokens/precedence.dart' show
-    PrecedenceInfo;
-import '../tokens/token.dart' show
-    StringToken,
-    Token;
+import '../io/source_file.dart' show SourceFile;
+import '../tokens/precedence.dart' show PrecedenceInfo;
+import '../tokens/token.dart' show StringToken, Token;
 
-import 'array_based_scanner.dart' show
-    ArrayBasedScanner;
-
+import 'array_based_scanner.dart' show ArrayBasedScanner;
 
 /**
  * Scanner that reads from a String and creates tokens that points to
@@ -52,15 +46,16 @@
 
   int currentAsUnicode(int next) => next;
 
-  void handleUnicode(int startScanOffset) { }
+  void handleUnicode(int startScanOffset) {}
 
   Token firstToken() => tokens.next;
   Token previousToken() => tail;
 
-  void appendSubstringToken(PrecedenceInfo info, int start,
-                            bool asciiOnly, [int extraOffset = 0]) {
-    tail.next = new StringToken.fromSubstring(info, string, start,
-        scanOffset + extraOffset, tokenStart, canonicalize: true);
+  void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly,
+      [int extraOffset = 0]) {
+    tail.next = new StringToken.fromSubstring(
+        info, string, start, scanOffset + extraOffset, tokenStart,
+        canonicalize: true);
     tail = tail.next;
   }
 
diff --git a/pkg/compiler/lib/src/scanner/utf8_bytes_scanner.dart b/pkg/compiler/lib/src/scanner/utf8_bytes_scanner.dart
index 4c42bf7..c4b87ed 100644
--- a/pkg/compiler/lib/src/scanner/utf8_bytes_scanner.dart
+++ b/pkg/compiler/lib/src/scanner/utf8_bytes_scanner.dart
@@ -4,20 +4,13 @@
 
 library dart2js.scanner.utf8;
 
-import 'dart:convert' show
-    UNICODE_BOM_CHARACTER_RUNE,
-    UTF8;
+import 'dart:convert' show UNICODE_BOM_CHARACTER_RUNE, UTF8;
 
-import '../io/source_file.dart' show
-    SourceFile;
-import '../tokens/precedence.dart' show
-    PrecedenceInfo;
-import '../tokens/token.dart' show
-    StringToken,
-    Token;
+import '../io/source_file.dart' show SourceFile;
+import '../tokens/precedence.dart' show PrecedenceInfo;
+import '../tokens/token.dart' show StringToken, Token;
 
-import 'array_based_scanner.dart' show
-    ArrayBasedScanner;
+import 'array_based_scanner.dart' show ArrayBasedScanner;
 
 /**
  * Scanner that reads from a UTF-8 encoded list of bytes and creates tokens
@@ -100,7 +93,7 @@
    * scanning.
    */
   Utf8BytesScanner.fromBytes(List<int> zeroTerminatedBytes,
-                             {bool includeComments: false})
+      {bool includeComments: false})
       : this.bytes = zeroTerminatedBytes,
         super(null, includeComments) {
     assert(bytes.last == 0);
@@ -212,7 +205,7 @@
   Token previousToken() => tail;
 
   void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly,
-                            [int extraOffset = 0]) {
+      [int extraOffset = 0]) {
     tail.next = new StringToken.fromUtf8Bytes(
         info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart);
     tail = tail.next;
diff --git a/pkg/compiler/lib/src/script.dart b/pkg/compiler/lib/src/script.dart
index 3dce8e1..403776b 100644
--- a/pkg/compiler/lib/src/script.dart
+++ b/pkg/compiler/lib/src/script.dart
@@ -16,7 +16,6 @@
    */
   final Uri readableUri;
 
-
   /**
    * The resource URI from which this script was loaded.
    *
@@ -27,9 +26,14 @@
   /// This script was synthesized.
   final bool isSynthesized;
 
-  Script(
-      this.readableUri, this.resourceUri, this.file,
-      {this.isSynthesized: false});
+  Script(this.readableUri, this.resourceUri, this.file) : isSynthesized = false;
+
+  Script.synthetic(Uri uri)
+      : readableUri = uri,
+        resourceUri = uri,
+        file = new StringSourceFile.fromUri(
+            uri, "// Synthetic source file generated for '$uri'."),
+        isSynthesized = true;
 
   String get text => (file == null) ? null : file.slowText();
   String get name => (file == null) ? null : file.filename;
diff --git a/pkg/compiler/lib/src/serialization/constant_serialization.dart b/pkg/compiler/lib/src/serialization/constant_serialization.dart
index 3af1b4f..fae8818 100644
--- a/pkg/compiler/lib/src/serialization/constant_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/constant_serialization.dart
@@ -7,11 +7,9 @@
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../elements/elements.dart' show
-    FieldElement;
+import '../elements/elements.dart' show FieldElement;
 import '../resolution/operators.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
+import '../universe/call_structure.dart' show CallStructure;
 import 'serialization.dart';
 import 'keys.dart';
 
@@ -27,30 +25,29 @@
   const ConstantSerializer();
 
   @override
-  void visitBinary(BinaryConstantExpression exp,
-                   ObjectEncoder encoder) {
+  void visitBinary(BinaryConstantExpression exp, ObjectEncoder encoder) {
     encoder.setEnum(Key.OPERATOR, exp.operator.kind);
     encoder.setConstant(Key.LEFT, exp.left);
     encoder.setConstant(Key.RIGHT, exp.right);
   }
 
   @override
-  void visitConcatenate(ConcatenateConstantExpression exp,
-                        ObjectEncoder encoder) {
+  void visitConcatenate(
+      ConcatenateConstantExpression exp, ObjectEncoder encoder) {
     encoder.setConstants(Key.ARGUMENTS, exp.expressions);
   }
 
   @override
-  void visitConditional(ConditionalConstantExpression exp,
-                        ObjectEncoder encoder) {
+  void visitConditional(
+      ConditionalConstantExpression exp, ObjectEncoder encoder) {
     encoder.setConstant(Key.CONDITION, exp.condition);
     encoder.setConstant(Key.TRUE, exp.trueExp);
     encoder.setConstant(Key.FALSE, exp.falseExp);
   }
 
   @override
-  void visitConstructed(ConstructedConstantExpression exp,
-                        ObjectEncoder encoder) {
+  void visitConstructed(
+      ConstructedConstantExpression exp, ObjectEncoder encoder) {
     encoder.setElement(Key.ELEMENT, exp.target);
     encoder.setType(Key.TYPE, exp.type);
     encoder.setStrings(Key.NAMES, exp.callStructure.namedArguments);
@@ -58,14 +55,12 @@
   }
 
   @override
-  void visitFunction(FunctionConstantExpression exp,
-                     ObjectEncoder encoder) {
+  void visitFunction(FunctionConstantExpression exp, ObjectEncoder encoder) {
     encoder.setElement(Key.ELEMENT, exp.element);
   }
 
   @override
-  void visitIdentical(IdenticalConstantExpression exp,
-                      ObjectEncoder encoder) {
+  void visitIdentical(IdenticalConstantExpression exp, ObjectEncoder encoder) {
     encoder.setConstant(Key.LEFT, exp.left);
     encoder.setConstant(Key.RIGHT, exp.right);
   }
@@ -109,34 +104,28 @@
   }
 
   @override
-  void visitSymbol(SymbolConstantExpression exp,
-                   ObjectEncoder encoder) {
-    throw new UnsupportedError(
-        "ConstantSerializer.visitSymbol: ${exp.getText()}");
+  void visitSymbol(SymbolConstantExpression exp, ObjectEncoder encoder) {
+    encoder.setString(Key.NAME, exp.name);
   }
 
   @override
-  void visitType(TypeConstantExpression exp,
-                 ObjectEncoder encoder) {
+  void visitType(TypeConstantExpression exp, ObjectEncoder encoder) {
     encoder.setType(Key.TYPE, exp.type);
   }
 
   @override
-  void visitUnary(UnaryConstantExpression exp,
-                  ObjectEncoder encoder) {
+  void visitUnary(UnaryConstantExpression exp, ObjectEncoder encoder) {
     encoder.setEnum(Key.OPERATOR, exp.operator.kind);
     encoder.setConstant(Key.EXPRESSION, exp.expression);
   }
 
   @override
-  void visitVariable(VariableConstantExpression exp,
-                     ObjectEncoder encoder) {
+  void visitVariable(VariableConstantExpression exp, ObjectEncoder encoder) {
     encoder.setElement(Key.ELEMENT, exp.element);
   }
 
   @override
-  void visitPositional(PositionalArgumentReference exp,
-                       ObjectEncoder encoder) {
+  void visitPositional(PositionalArgumentReference exp, ObjectEncoder encoder) {
     encoder.setInt(Key.INDEX, exp.index);
   }
 
@@ -146,8 +135,8 @@
   }
 
   @override
-  void visitBoolFromEnvironment(BoolFromEnvironmentConstantExpression exp,
-                                ObjectEncoder encoder) {
+  void visitBoolFromEnvironment(
+      BoolFromEnvironmentConstantExpression exp, ObjectEncoder encoder) {
     encoder.setConstant(Key.NAME, exp.name);
     if (exp.defaultValue != null) {
       encoder.setConstant(Key.DEFAULT, exp.defaultValue);
@@ -155,8 +144,8 @@
   }
 
   @override
-  void visitIntFromEnvironment(IntFromEnvironmentConstantExpression exp,
-                               ObjectEncoder encoder) {
+  void visitIntFromEnvironment(
+      IntFromEnvironmentConstantExpression exp, ObjectEncoder encoder) {
     encoder.setConstant(Key.NAME, exp.name);
     if (exp.defaultValue != null) {
       encoder.setConstant(Key.DEFAULT, exp.defaultValue);
@@ -164,8 +153,8 @@
   }
 
   @override
-  void visitStringFromEnvironment(StringFromEnvironmentConstantExpression exp,
-                                  ObjectEncoder encoder) {
+  void visitStringFromEnvironment(
+      StringFromEnvironmentConstantExpression exp, ObjectEncoder encoder) {
     encoder.setConstant(Key.NAME, exp.name);
     if (exp.defaultValue != null) {
       encoder.setConstant(Key.DEFAULT, exp.defaultValue);
@@ -173,15 +162,13 @@
   }
 
   @override
-  void visitStringLength(StringLengthConstantExpression exp,
-                         ObjectEncoder encoder) {
+  void visitStringLength(
+      StringLengthConstantExpression exp, ObjectEncoder encoder) {
     encoder.setConstant(Key.EXPRESSION, exp.expression);
   }
 
-
   @override
-  void visitDeferred(DeferredConstantExpression exp,
-                     ObjectEncoder encoder) {
+  void visitDeferred(DeferredConstantExpression exp, ObjectEncoder encoder) {
     throw new UnsupportedError(
         "ConstantSerializer.visitDeferred: ${exp.getText()}");
   }
@@ -191,7 +178,6 @@
 ///
 /// This is used by the [Deserializer].
 class ConstantDeserializer {
-
   /// Deserializes a [ConstantExpression] from an [ObjectDecoder].
   ///
   /// The class is called from the [Deserializer] when a [ConstantExpression]
@@ -203,15 +189,12 @@
         decoder.getEnum(Key.KIND, ConstantExpressionKind.values);
     switch (kind) {
       case ConstantExpressionKind.BINARY:
-        BinaryOperator operator = BinaryOperator.fromKind(decoder.getEnum(
-            Key.OPERATOR, BinaryOperatorKind.values));
-        return new BinaryConstantExpression(
-            decoder.getConstant(Key.LEFT),
-            operator,
-            decoder.getConstant(Key.RIGHT));
+        BinaryOperator operator = BinaryOperator
+            .fromKind(decoder.getEnum(Key.OPERATOR, BinaryOperatorKind.values));
+        return new BinaryConstantExpression(decoder.getConstant(Key.LEFT),
+            operator, decoder.getConstant(Key.RIGHT));
       case ConstantExpressionKind.BOOL:
-        return new BoolConstantExpression(
-            decoder.getBool(Key.VALUE));
+        return new BoolConstantExpression(decoder.getBool(Key.VALUE));
       case ConstantExpressionKind.BOOL_FROM_ENVIRONMENT:
         return new BoolFromEnvironmentConstantExpression(
             decoder.getConstant(Key.NAME),
@@ -225,10 +208,9 @@
             decoder.getConstant(Key.TRUE),
             decoder.getConstant(Key.FALSE));
       case ConstantExpressionKind.CONSTRUCTED:
-        List<String> names =
-            decoder.getStrings(Key.NAMES, isOptional: true);
+        List<String> names = decoder.getStrings(Key.NAMES, isOptional: true);
         List<ConstantExpression> arguments =
-              decoder.getConstants(Key.ARGUMENTS, isOptional: true);
+            decoder.getConstants(Key.ARGUMENTS, isOptional: true);
         return new ConstructedConstantExpression(
             decoder.getType(Key.TYPE),
             decoder.getElement(Key.ELEMENT),
@@ -239,12 +221,10 @@
       case ConstantExpressionKind.ERRONEOUS:
         break;
       case ConstantExpressionKind.FUNCTION:
-        return new FunctionConstantExpression(
-            decoder.getElement(Key.ELEMENT));
+        return new FunctionConstantExpression(decoder.getElement(Key.ELEMENT));
       case ConstantExpressionKind.IDENTICAL:
         return new IdenticalConstantExpression(
-            decoder.getConstant(Key.LEFT),
-            decoder.getConstant(Key.RIGHT));
+            decoder.getConstant(Key.LEFT), decoder.getConstant(Key.RIGHT));
       case ConstantExpressionKind.INT:
         return new IntConstantExpression(decoder.getInt(Key.VALUE));
       case ConstantExpressionKind.INT_FROM_ENVIRONMENT:
@@ -253,18 +233,14 @@
             decoder.getConstant(Key.DEFAULT, isOptional: true));
       case ConstantExpressionKind.LIST:
         return new ListConstantExpression(
-            decoder.getType(Key.TYPE),
-            decoder.getConstants(Key.VALUES));
+            decoder.getType(Key.TYPE), decoder.getConstants(Key.VALUES));
       case ConstantExpressionKind.MAP:
-        return new MapConstantExpression(
-            decoder.getType(Key.TYPE),
-            decoder.getConstants(Key.KEYS),
-            decoder.getConstants(Key.VALUES));
+        return new MapConstantExpression(decoder.getType(Key.TYPE),
+            decoder.getConstants(Key.KEYS), decoder.getConstants(Key.VALUES));
       case ConstantExpressionKind.NULL:
         return new NullConstantExpression();
       case ConstantExpressionKind.STRING:
-        return new StringConstantExpression(
-            decoder.getString(Key.VALUE));
+        return new StringConstantExpression(decoder.getString(Key.VALUE));
       case ConstantExpressionKind.STRING_FROM_ENVIRONMENT:
         return new StringFromEnvironmentConstantExpression(
             decoder.getConstant(Key.NAME),
@@ -277,26 +253,21 @@
       case ConstantExpressionKind.TYPE:
         return new TypeConstantExpression(decoder.getType(Key.TYPE));
       case ConstantExpressionKind.UNARY:
-        UnaryOperator operator = UnaryOperator.fromKind(
-            decoder.getEnum(Key.OPERATOR, UnaryOperatorKind.values));
+        UnaryOperator operator = UnaryOperator
+            .fromKind(decoder.getEnum(Key.OPERATOR, UnaryOperatorKind.values));
         return new UnaryConstantExpression(
-            operator,
-            decoder.getConstant(Key.EXPRESSION));
+            operator, decoder.getConstant(Key.EXPRESSION));
       case ConstantExpressionKind.VARIABLE:
-        return new VariableConstantExpression(
-            decoder.getElement(Key.ELEMENT));
+        return new VariableConstantExpression(decoder.getElement(Key.ELEMENT));
 
       case ConstantExpressionKind.POSITIONAL_REFERENCE:
-        return new PositionalArgumentReference(
-            decoder.getInt(Key.INDEX));
+        return new PositionalArgumentReference(decoder.getInt(Key.INDEX));
       case ConstantExpressionKind.NAMED_REFERENCE:
-        return new NamedArgumentReference(
-            decoder.getString(Key.NAME));
+        return new NamedArgumentReference(decoder.getString(Key.NAME));
       case ConstantExpressionKind.DEFERRED:
       case ConstantExpressionKind.SYNTHETIC:
     }
-    throw new UnsupportedError(
-        "Unexpected constant kind: ${kind} in $decoder");
+    throw new UnsupportedError("Unexpected constant kind: ${kind} in $decoder");
   }
 }
 
@@ -312,16 +283,14 @@
   const ConstantConstructorSerializer();
 
   @override
-  void visit(ConstantConstructor constantConstructor,
-             ObjectEncoder encoder) {
+  void visit(ConstantConstructor constantConstructor, ObjectEncoder encoder) {
     encoder.setEnum(Key.KIND, constantConstructor.kind);
     constantConstructor.accept(this, encoder);
   }
 
   @override
   void visitGenerative(
-      GenerativeConstantConstructor constructor,
-      ObjectEncoder encoder) {
+      GenerativeConstantConstructor constructor, ObjectEncoder encoder) {
     encoder.setType(Key.TYPE, constructor.type);
     MapEncoder defaults = encoder.createMap(Key.DEFAULTS);
     constructor.defaultValues.forEach((key, e) {
@@ -334,8 +303,8 @@
       fieldSerializer.setConstant(Key.CONSTANT, e);
     });
     if (constructor.superConstructorInvocation != null) {
-      encoder.setConstant(Key.CONSTRUCTOR,
-          constructor.superConstructorInvocation);
+      encoder.setConstant(
+          Key.CONSTRUCTOR, constructor.superConstructorInvocation);
     }
   }
 
@@ -343,8 +312,8 @@
   void visitRedirectingFactory(
       RedirectingFactoryConstantConstructor constructor,
       ObjectEncoder encoder) {
-    encoder.setConstant(Key.CONSTRUCTOR,
-        constructor.targetConstructorInvocation);
+    encoder.setConstant(
+        Key.CONSTRUCTOR, constructor.targetConstructorInvocation);
   }
 
   @override
@@ -355,10 +324,10 @@
     constructor.defaultValues.forEach((key, ConstantExpression e) {
       defaults.setConstant('$key', e);
     });
-    encoder.setConstant(Key.CONSTRUCTOR,
-        constructor.thisConstructorInvocation);
+    encoder.setConstant(Key.CONSTRUCTOR, constructor.thisConstructorInvocation);
   }
 }
+
 /// Utility class for deserializing [ConstantConstructor]s.
 ///
 /// This is used by the [ConstructorElementZ].
@@ -370,7 +339,6 @@
   /// [DartType], and [ConstantExpression] that the deserialized
   /// [ConstantConstructor] depends upon are available.
   static ConstantConstructor deserialize(ObjectDecoder decoder) {
-
     ConstantConstructorKind kind =
         decoder.getEnum(Key.KIND, ConstantConstructorKind.values);
 
@@ -378,7 +346,7 @@
       return decoder.getType(Key.TYPE);
     }
 
-    Map<dynamic/*int|String*/, ConstantExpression> readDefaults() {
+    Map<dynamic /*int|String*/, ConstantExpression> readDefaults() {
       Map<dynamic, ConstantExpression> defaultValues =
           <dynamic, ConstantExpression>{};
       if (decoder.containsKey(Key.DEFAULTS)) {
@@ -416,15 +384,11 @@
 
     switch (kind) {
       case ConstantConstructorKind.GENERATIVE:
-        return new GenerativeConstantConstructor(
-            readType(),
-            readDefaults(),
-            readFields(),
-            readConstructorInvocation());
+        return new GenerativeConstantConstructor(readType(), readDefaults(),
+            readFields(), readConstructorInvocation());
       case ConstantConstructorKind.REDIRECTING_GENERATIVE:
         return new RedirectingGenerativeConstantConstructor(
-            readDefaults(),
-            readConstructorInvocation());
+            readDefaults(), readConstructorInvocation());
       case ConstantConstructorKind.REDIRECTING_FACTORY:
         return new RedirectingFactoryConstantConstructor(
             readConstructorInvocation());
diff --git a/pkg/compiler/lib/src/serialization/element_serialization.dart b/pkg/compiler/lib/src/serialization/element_serialization.dart
index 173dd1e..78228ca 100644
--- a/pkg/compiler/lib/src/serialization/element_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/element_serialization.dart
@@ -19,11 +19,14 @@
   LIBRARY,
   COMPILATION_UNIT,
   CLASS,
+  ENUM,
+  NAMED_MIXIN_APPLICATION,
   GENERATIVE_CONSTRUCTOR,
   FACTORY_CONSTRUCTOR,
   TOPLEVEL_FIELD,
   STATIC_FIELD,
   INSTANCE_FIELD,
+  ENUM_CONSTANT,
   TOPLEVEL_FUNCTION,
   TOPLEVEL_GETTER,
   TOPLEVEL_SETTER,
@@ -33,6 +36,7 @@
   INSTANCE_FUNCTION,
   INSTANCE_GETTER,
   INSTANCE_SETTER,
+  LOCAL_FUNCTION,
   TYPEDEF,
   TYPEVARIABLE,
   PARAMETER,
@@ -40,6 +44,11 @@
   IMPORT,
   EXPORT,
   PREFIX,
+  LOCAL_VARIABLE,
+  EXTERNAL_LIBRARY,
+  EXTERNAL_LIBRARY_MEMBER,
+  EXTERNAL_STATIC_MEMBER,
+  EXTERNAL_CONSTRUCTOR,
 }
 
 /// Set of serializers used to serialize different kinds of elements by
@@ -50,18 +59,19 @@
 /// and [ConstantExpression] that the serialized [Element] depends upon are also
 /// serialized.
 const List<ElementSerializer> ELEMENT_SERIALIZERS = const [
-    const LibrarySerializer(),
-    const CompilationUnitSerializer(),
-    const ClassSerializer(),
-    const ConstructorSerializer(),
-    const FieldSerializer(),
-    const FunctionSerializer(),
-    const TypedefSerializer(),
-    const TypeVariableSerializer(),
-    const ParameterSerializer(),
-    const ImportSerializer(),
-    const ExportSerializer(),
-    const PrefixSerializer(),
+  const LibrarySerializer(),
+  const CompilationUnitSerializer(),
+  const ClassSerializer(),
+  const ConstructorSerializer(),
+  const FieldSerializer(),
+  const FunctionSerializer(),
+  const TypedefSerializer(),
+  const TypeVariableSerializer(),
+  const ParameterSerializer(),
+  const ImportSerializer(),
+  const ExportSerializer(),
+  const PrefixSerializer(),
+  const LocalVariableSerializer(),
 ];
 
 /// Interface for a function that can serialize a set of element kinds.
@@ -72,23 +82,22 @@
 
   /// Serializes [element] into the [encoder] using the [kind] computed
   /// by [getSerializedKind].
-  void serialize(Element element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind);
+  void serialize(
+      Element element, ObjectEncoder encoder, SerializedElementKind kind);
 }
 
 class SerializerUtil {
   /// Serialize the declared members of [element] into [encoder].
-  static void serializeMembers(ScopeContainerElement element,
-                               ObjectEncoder encoder) {
+  static void serializeMembers(
+      Iterable<Element> members, ObjectEncoder encoder) {
     MapEncoder mapEncoder = encoder.createMap(Key.MEMBERS);
-    element.forEachLocalMember((Element member) {
+    for (Element member in members) {
       String name = member.name;
       if (member.isSetter) {
         name = '$name,=';
       }
       mapEncoder.setElement(name, member);
-    });
+    }
   }
 
   /// Serialize the source position of [element] into [encoder].
@@ -108,32 +117,33 @@
   }
 
   /// Serialize the parameters of [element] into [encoder].
-  static void serializeParameters(FunctionElement element,
-                                  ObjectEncoder encoder) {
+  static void serializeParameters(
+      FunctionElement element, ObjectEncoder encoder) {
     FunctionType type = element.type;
     encoder.setType(Key.RETURN_TYPE, type.returnType);
     encoder.setElements(Key.PARAMETERS, element.parameters);
   }
 
   /// Returns a function that adds the underlying declared elements for a
-  /// particular element into [list].
+  /// particular element into [set].
   ///
   /// For instance, for an [AbstractFieldElement] the getter and setter elements
   /// are added, if available.
-  static flattenElements(List<Element> list) {
+  static flattenElements(Set<Element> set) {
     return (Element element) {
+      if (element.isPatch) return;
       // TODO(johnniwinther): Handle ambiguous elements.
       if (element.isAmbiguous) return;
       if (element.isAbstractField) {
         AbstractFieldElement abstractField = element;
         if (abstractField.getter != null) {
-          list.add(abstractField.getter);
+          set.add(abstractField.getter);
         }
         if (abstractField.setter != null) {
-          list.add(abstractField.setter);
+          set.add(abstractField.setter);
         }
       } else {
-        list.add(element);
+        set.add(element);
       }
     };
   }
@@ -149,27 +159,65 @@
     return null;
   }
 
-  void serialize(LibraryElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  static List<Element> getMembers(LibraryElement element) {
+    List<Element> members = <Element>[];
+    element.implementation.forEachLocalMember((Element member) {
+      if (!member.isPatch) {
+        members.add(member);
+      }
+    });
+    return members;
+  }
+
+  static List<CompilationUnitElement> getCompilationUnits(
+      LibraryElement element) {
+    List<CompilationUnitElement> compilationUnits = <CompilationUnitElement>[];
+    compilationUnits.addAll(element.compilationUnits.toList());
+    if (element.isPatched) {
+      compilationUnits.addAll(element.implementation.compilationUnits.toList());
+    }
+    return compilationUnits;
+  }
+
+  static List<ImportElement> getImports(LibraryElement element) {
+    List<ImportElement> imports = <ImportElement>[];
+    imports.addAll(element.imports);
+    if (element.isPatched) {
+      imports.addAll(element.implementation.imports);
+    }
+    return imports;
+  }
+
+  static List<Element> getImportedElements(LibraryElement element) {
+    Set<Element> importedElements = new Set<Element>();
+    element.forEachImport(SerializerUtil.flattenElements(importedElements));
+    if (element.isPatched) {
+      element.implementation
+          .forEachImport(SerializerUtil.flattenElements(importedElements));
+    }
+    return importedElements.toList();
+  }
+
+  static List<Element> getExportedElements(LibraryElement element) {
+    Set<Element> exportedElements = new Set<Element>();
+    element.forEachExport(SerializerUtil.flattenElements(exportedElements));
+    return exportedElements.toList();
+  }
+
+  void serialize(LibraryElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setUri(
         Key.CANONICAL_URI, element.canonicalUri, element.canonicalUri);
     encoder.setString(Key.LIBRARY_NAME, element.libraryName);
-    SerializerUtil.serializeMembers(element, encoder);
+    SerializerUtil.serializeMembers(getMembers(element), encoder);
     encoder.setElement(Key.COMPILATION_UNIT, element.entryCompilationUnit);
-    encoder.setElements(
-        Key.COMPILATION_UNITS, element.compilationUnits.toList());
-    encoder.setElements(Key.IMPORTS, element.imports);
+    encoder.setElements(Key.COMPILATION_UNITS, getCompilationUnits(element));
+    encoder.setElements(Key.IMPORTS, getImports(element));
     encoder.setElements(Key.EXPORTS, element.exports);
 
-    List<Element> importedElements = <Element>[];
-    element.forEachImport(SerializerUtil.flattenElements(importedElements));
-    encoder.setElements(Key.IMPORT_SCOPE, importedElements);
+    encoder.setElements(Key.IMPORT_SCOPE, getImportedElements(element));
 
-    List<Element> exportedElements = <Element>[];
-    element.forEachExport(SerializerUtil.flattenElements(exportedElements));
-    encoder.setElements(Key.EXPORT_SCOPE, exportedElements);
-
+    encoder.setElements(Key.EXPORT_SCOPE, getExportedElements(element));
   }
 }
 
@@ -183,14 +231,17 @@
     return null;
   }
 
-  void serialize(CompilationUnitElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(CompilationUnitElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setElement(Key.LIBRARY, element.library);
     encoder.setUri(
         Key.URI, element.library.canonicalUri, element.script.resourceUri);
     List<Element> elements = <Element>[];
-    element.forEachLocalMember((e) => elements.add(e));
+    element.forEachLocalMember((e) {
+      if (!element.isPatch) {
+        elements.add(e);
+      }
+    });
     encoder.setElements(Key.ELEMENTS, elements);
   }
 }
@@ -200,32 +251,71 @@
 
   SerializedElementKind getSerializedKind(Element element) {
     if (element.isClass) {
-      return SerializedElementKind.CLASS;
+      ClassElement cls = element;
+      if (cls.isEnumClass) {
+        return SerializedElementKind.ENUM;
+      } else if (cls.isMixinApplication) {
+        if (!cls.isUnnamedMixinApplication) {
+          return SerializedElementKind.NAMED_MIXIN_APPLICATION;
+        }
+      } else {
+        return SerializedElementKind.CLASS;
+      }
     }
     return null;
   }
 
-  void serialize(ClassElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  static List<Element> getMembers(ClassElement element) {
+    List<Element> members = <Element>[];
+    element.forEachLocalMember(members.add);
+    if (element.isPatched) {
+      element.implementation.forEachLocalMember((Element member) {
+        if (!member.isPatch) {
+          members.add(member);
+        }
+      });
+    }
+    return members;
+  }
+
+  void serialize(
+      ClassElement element, ObjectEncoder encoder, SerializedElementKind kind) {
     encoder.setElement(Key.LIBRARY, element.library);
     encoder.setElement(Key.COMPILATION_UNIT, element.compilationUnit);
     encoder.setString(Key.NAME, element.name);
     SerializerUtil.serializePosition(element, encoder);
     encoder.setTypes(Key.TYPE_VARIABLES, element.typeVariables);
     encoder.setBool(Key.IS_ABSTRACT, element.isAbstract);
-    if (element.supertype != null) {
-      encoder.setType(Key.SUPERTYPE, element.supertype);
+    SerializerUtil.serializeMembers(getMembers(element), encoder);
+    encoder.setBool(Key.IS_PROXY, element.isProxy);
+    if (kind == SerializedElementKind.ENUM) {
+      EnumClassElement enumClass = element;
+      encoder.setElements(Key.FIELDS, enumClass.enumValues);
     }
-    // TODO(johnniwinther): Make [OrderedTypeSet] easier to (de)serialize.
-    ObjectEncoder supertypes = encoder.createObject(Key.SUPERTYPES);
-    supertypes.setTypes(Key.TYPES,
-        element.allSupertypesAndSelf.types.toList());
-    supertypes.setTypes(Key.SUPERTYPES,
-        element.allSupertypesAndSelf.supertypes.toList());
-    supertypes.setInts(Key.OFFSETS, element.allSupertypesAndSelf.levelOffsets);
+    if (element.isObject) return;
+
+    List<InterfaceType> mixins = <InterfaceType>[];
+    ClassElement superclass = element.superclass;
+    while (superclass.isUnnamedMixinApplication) {
+      MixinApplicationElement mixinElement = superclass;
+      mixins.add(element.thisType.asInstanceOf(mixinElement.mixin));
+      superclass = mixinElement.superclass;
+    }
+    mixins = mixins.reversed.toList();
+    InterfaceType supertype = element.thisType.asInstanceOf(superclass);
+
+    encoder.setType(Key.SUPERTYPE, supertype);
+    encoder.setTypes(Key.MIXINS, mixins);
     encoder.setTypes(Key.INTERFACES, element.interfaces.toList());
-    SerializerUtil.serializeMembers(element, encoder);
+    FunctionType callType = element.declaration.callType;
+    if (callType != null) {
+      encoder.setType(Key.CALL_TYPE, element.callType);
+    }
+
+    if (element.isMixinApplication) {
+      MixinApplicationElement mixinElement = element;
+      encoder.setType(Key.MIXIN, mixinElement.mixinType);
+    }
   }
 }
 
@@ -241,24 +331,21 @@
     return null;
   }
 
-  void serialize(ConstructorElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(ConstructorElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setElement(Key.CLASS, element.enclosingClass);
     encoder.setType(Key.TYPE, element.type);
     encoder.setString(Key.NAME, element.name);
     SerializerUtil.serializePosition(element, encoder);
     SerializerUtil.serializeParameters(element, encoder);
     encoder.setBool(Key.IS_CONST, element.isConst);
-    // TODO(johnniwinther): Handle external constructors.
     encoder.setBool(Key.IS_EXTERNAL, element.isExternal);
     if (element.isExternal) return;
     if (element.isConst && !element.isFromEnvironmentConstructor) {
       ConstantConstructor constantConstructor = element.constantConstructor;
-      ObjectEncoder constantEncoder =
-          encoder.createObject(Key.CONSTRUCTOR);
-      const ConstantConstructorSerializer().visit(
-          constantConstructor, constantEncoder);
+      ObjectEncoder constantEncoder = encoder.createObject(Key.CONSTRUCTOR);
+      const ConstantConstructorSerializer()
+          .visit(constantConstructor, constantEncoder);
     }
   }
 }
@@ -269,15 +356,19 @@
   SerializedElementKind getSerializedKind(Element element) {
     if (element.isField) {
       if (element.isTopLevel) return SerializedElementKind.TOPLEVEL_FIELD;
-      if (element.isStatic) return SerializedElementKind.STATIC_FIELD;
+      if (element.isStatic) {
+        if (element is EnumConstantElement) {
+          return SerializedElementKind.ENUM_CONSTANT;
+        }
+        return SerializedElementKind.STATIC_FIELD;
+      }
       if (element.isInstanceMember) return SerializedElementKind.INSTANCE_FIELD;
     }
     return null;
   }
 
-  void serialize(FieldElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(
+      FieldElement element, ObjectEncoder encoder, SerializedElementKind kind) {
     encoder.setString(Key.NAME, element.name);
     SerializerUtil.serializePosition(element, encoder);
     encoder.setType(Key.TYPE, element.type);
@@ -293,6 +384,10 @@
       encoder.setElement(Key.LIBRARY, element.library);
       encoder.setElement(Key.COMPILATION_UNIT, element.compilationUnit);
     }
+    if (element is EnumConstantElement) {
+      EnumConstantElement enumConstant = element;
+      encoder.setInt(Key.INDEX, enumConstant.index);
+    }
   }
 }
 
@@ -306,6 +401,9 @@
       if (element.isInstanceMember) {
         return SerializedElementKind.INSTANCE_FUNCTION;
       }
+      if (element.isLocal) {
+        return SerializedElementKind.LOCAL_FUNCTION;
+      }
     }
     if (element.isGetter) {
       if (element.isTopLevel) return SerializedElementKind.TOPLEVEL_GETTER;
@@ -324,9 +422,8 @@
     return null;
   }
 
-  void serialize(FunctionElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(FunctionElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setString(Key.NAME, element.name);
     SerializerUtil.serializePosition(element, encoder);
     SerializerUtil.serializeParameters(element, encoder);
@@ -340,6 +437,12 @@
       encoder.setElement(Key.LIBRARY, element.library);
       encoder.setElement(Key.COMPILATION_UNIT, element.compilationUnit);
     }
+    encoder.setBool(Key.IS_EXTERNAL, element.isExternal);
+    if (element.isLocal) {
+      LocalFunctionElement localFunction = element;
+      encoder.setElement(
+          Key.EXECUTABLE_CONTEXT, localFunction.executableContext);
+    }
   }
 }
 
@@ -353,9 +456,8 @@
     return null;
   }
 
-  void serialize(TypedefElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(TypedefElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setString(Key.NAME, element.name);
     SerializerUtil.serializePosition(element, encoder);
     encoder.setType(Key.ALIAS, element.alias);
@@ -375,9 +477,8 @@
     return null;
   }
 
-  void serialize(TypeVariableElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(TypeVariableElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setElement(Key.TYPE_DECLARATION, element.typeDeclaration);
     encoder.setString(Key.NAME, element.name);
     SerializerUtil.serializePosition(element, encoder);
@@ -399,9 +500,8 @@
     return null;
   }
 
-  void serialize(ParameterElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(ParameterElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setElement(Key.FUNCTION, element.functionDeclaration);
     encoder.setString(Key.NAME, element.name);
     SerializerUtil.serializePosition(element, encoder);
@@ -418,6 +518,31 @@
   }
 }
 
+class LocalVariableSerializer implements ElementSerializer {
+  const LocalVariableSerializer();
+
+  SerializedElementKind getSerializedKind(Element element) {
+    if (element.isVariable) {
+      return SerializedElementKind.LOCAL_VARIABLE;
+    }
+    return null;
+  }
+
+  void serialize(LocalVariableElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
+    encoder.setString(Key.NAME, element.name);
+    SerializerUtil.serializePosition(element, encoder);
+    encoder.setType(Key.TYPE, element.type);
+    encoder.setBool(Key.IS_FINAL, element.isFinal);
+    encoder.setBool(Key.IS_CONST, element.isConst);
+    if (element.isConst) {
+      ConstantExpression constant = element.constant;
+      encoder.setConstant(Key.CONSTANT, constant);
+    }
+    encoder.setElement(Key.EXECUTABLE_CONTEXT, element.executableContext);
+  }
+}
+
 class ImportSerializer implements ElementSerializer {
   const ImportSerializer();
 
@@ -428,9 +553,8 @@
     return null;
   }
 
-  void serialize(ImportElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(ImportElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setElement(Key.LIBRARY, element.library);
     encoder.setElement(Key.COMPILATION_UNIT, element.compilationUnit);
     encoder.setElement(Key.LIBRARY_DEPENDENCY, element.importedLibrary);
@@ -453,9 +577,8 @@
     return null;
   }
 
-  void serialize(ExportElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(ExportElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setElement(Key.LIBRARY, element.library);
     encoder.setElement(Key.COMPILATION_UNIT, element.compilationUnit);
     encoder.setElement(Key.LIBRARY_DEPENDENCY, element.exportedLibrary);
@@ -474,9 +597,8 @@
     return null;
   }
 
-  void serialize(PrefixElement element,
-                 ObjectEncoder encoder,
-                 SerializedElementKind kind) {
+  void serialize(PrefixElement element, ObjectEncoder encoder,
+      SerializedElementKind kind) {
     encoder.setString(Key.NAME, element.name);
     encoder.setElement(Key.LIBRARY, element.library);
     encoder.setElement(Key.COMPILATION_UNIT, element.compilationUnit);
@@ -491,16 +613,14 @@
 ///
 /// This is used by the [Deserializer].
 class ElementDeserializer {
-
   /// Deserializes an [Element] from an [ObjectDecoder].
   ///
   /// The class is called from the [Deserializer] when an [Element]
   /// needs deserialization. The [ObjectDecoder] ensures that any [Element],
   /// [DartType], and [ConstantExpression] that the deserialized [Element]
   /// depends upon are available.
-  static Element deserialize(ObjectDecoder decoder) {
-    SerializedElementKind elementKind =
-        decoder.getEnum(Key.KIND, SerializedElementKind.values);
+  static Element deserialize(
+      ObjectDecoder decoder, SerializedElementKind elementKind) {
     switch (elementKind) {
       case SerializedElementKind.LIBRARY:
         return new LibraryElementZ(decoder);
@@ -508,10 +628,16 @@
         return new CompilationUnitElementZ(decoder);
       case SerializedElementKind.CLASS:
         return new ClassElementZ(decoder);
+      case SerializedElementKind.ENUM:
+        return new EnumClassElementZ(decoder);
+      case SerializedElementKind.NAMED_MIXIN_APPLICATION:
+        return new NamedMixinApplicationElementZ(decoder);
       case SerializedElementKind.TOPLEVEL_FIELD:
         return new TopLevelFieldElementZ(decoder);
       case SerializedElementKind.STATIC_FIELD:
         return new StaticFieldElementZ(decoder);
+      case SerializedElementKind.ENUM_CONSTANT:
+        return new EnumConstantElementZ(decoder);
       case SerializedElementKind.INSTANCE_FIELD:
         return new InstanceFieldElementZ(decoder);
       case SerializedElementKind.GENERATIVE_CONSTRUCTOR:
@@ -524,6 +650,8 @@
         return new StaticFunctionElementZ(decoder);
       case SerializedElementKind.INSTANCE_FUNCTION:
         return new InstanceFunctionElementZ(decoder);
+      case SerializedElementKind.LOCAL_FUNCTION:
+        return new LocalFunctionElementZ(decoder);
       case SerializedElementKind.TOPLEVEL_GETTER:
         return new TopLevelGetterElementZ(decoder);
       case SerializedElementKind.STATIC_GETTER:
@@ -550,7 +678,14 @@
         return new ExportElementZ(decoder);
       case SerializedElementKind.PREFIX:
         return new PrefixElementZ(decoder);
+      case SerializedElementKind.LOCAL_VARIABLE:
+        return new LocalVariableElementZ(decoder);
+      case SerializedElementKind.EXTERNAL_LIBRARY:
+      case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER:
+      case SerializedElementKind.EXTERNAL_STATIC_MEMBER:
+      case SerializedElementKind.EXTERNAL_CONSTRUCTOR:
+        break;
     }
     throw new UnsupportedError("Unexpected element kind '${elementKind}.");
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/serialization/equivalence.dart b/pkg/compiler/lib/src/serialization/equivalence.dart
new file mode 100644
index 0000000..d68ce3e
--- /dev/null
+++ b/pkg/compiler/lib/src/serialization/equivalence.dart
@@ -0,0 +1,1624 @@
+// 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.
+
+/// Functions for asserting equivalence across serialization.
+
+library dart2js.serialization.equivalence;
+
+import '../common/resolution.dart';
+import '../constants/expressions.dart';
+import '../dart_types.dart';
+import '../elements/elements.dart';
+import '../elements/visitor.dart';
+import '../resolution/access_semantics.dart';
+import '../resolution/send_structure.dart';
+import '../resolution/tree_elements.dart';
+import '../tokens/token.dart';
+import '../tree/nodes.dart';
+import '../universe/selector.dart';
+import '../universe/use.dart';
+import '../util/util.dart';
+import 'resolved_ast_serialization.dart';
+
+/// Equality based equivalence function.
+bool equality(a, b) => a == b;
+
+/// Returns `true` if the elements in [a] and [b] are pair-wise equivalent
+/// according to [elementEquivalence].
+bool areListsEquivalent(List a, List b,
+    [bool elementEquivalence(a, b) = equality]) {
+  if (a.length != b.length) return false;
+  for (int i = 0; i < a.length && i < b.length; i++) {
+    if (!elementEquivalence(a[i], b[i])) {
+      return false;
+    }
+  }
+  return true;
+}
+
+/// Returns `true` if the elements in [a] and [b] are equivalent as sets using
+/// [elementEquivalence] to determine element equivalence.
+bool areSetsEquivalent(Iterable set1, Iterable set2,
+    [bool elementEquivalence(a, b) = equality]) {
+  Set remaining = set2.toSet();
+  for (var element1 in set1) {
+    bool found = false;
+    for (var element2 in set2) {
+      if (elementEquivalence(element1, element2)) {
+        found = true;
+        remaining.remove(element2);
+        break;
+      }
+    }
+    if (!found) {
+      return false;
+    }
+  }
+  return remaining.isEmpty;
+}
+
+/// Returns `true` if elements [a] and [b] are equivalent.
+bool areElementsEquivalent(Element a, Element b) {
+  if (identical(a, b)) return true;
+  if (a == null || b == null) return false;
+  return const ElementIdentityEquivalence().visit(a, b);
+}
+
+/// Returns `true` if types [a] and [b] are equivalent.
+bool areTypesEquivalent(DartType a, DartType b) {
+  if (identical(a, b)) return true;
+  if (a == null || b == null) return false;
+  return const TypeEquivalence().visit(a, b);
+}
+
+/// Returns `true` if constants [a] and [b] are equivalent.
+bool areConstantsEquivalent(ConstantExpression exp1, ConstantExpression exp2) {
+  if (identical(exp1, exp2)) return true;
+  if (exp1 == null || exp2 == null) return false;
+  return const ConstantEquivalence().visit(exp1, exp2);
+}
+
+/// Returns `true` if the lists of elements, [a] and [b], are equivalent.
+bool areElementListsEquivalent(List<Element> a, List<Element> b) {
+  return areListsEquivalent(a, b, areElementsEquivalent);
+}
+
+/// Returns `true` if the lists of types, [a] and [b], are equivalent.
+bool areTypeListsEquivalent(List<DartType> a, List<DartType> b) {
+  return areListsEquivalent(a, b, areTypesEquivalent);
+}
+
+/// Returns `true` if the lists of constants, [a] and [b], are equivalent.
+bool areConstantListsEquivalent(
+    List<ConstantExpression> a, List<ConstantExpression> b) {
+  return areListsEquivalent(a, b, areConstantsEquivalent);
+}
+
+/// Returns `true` if the selectors [a] and [b] are equivalent.
+bool areSelectorsEquivalent(Selector a, Selector b) {
+  if (identical(a, b)) return true;
+  if (a == null || b == null) return false;
+  return a.kind == b.kind &&
+      a.callStructure == b.callStructure &&
+      areNamesEquivalent(a.memberName, b.memberName);
+}
+
+/// Returns `true` if the names [a] and [b] are equivalent.
+bool areNamesEquivalent(Name a, Name b) {
+  return a.text == b.text &&
+      a.isSetter == b.isSetter &&
+      areElementsEquivalent(a.library, b.library);
+}
+
+/// Returns `true` if the dynamic uses [a] and [b] are equivalent.
+bool areDynamicUsesEquivalent(DynamicUse a, DynamicUse b) {
+  return areSelectorsEquivalent(a.selector, b.selector);
+}
+
+/// Returns `true` if the static uses [a] and [b] are equivalent.
+bool areStaticUsesEquivalent(StaticUse a, StaticUse b) {
+  return a.kind == b.kind && areElementsEquivalent(a.element, b.element);
+}
+
+/// Returns `true` if the type uses [a] and [b] are equivalent.
+bool areTypeUsesEquivalent(TypeUse a, TypeUse b) {
+  return a.kind == b.kind && areTypesEquivalent(a.type, b.type);
+}
+
+/// Returns `true` if the list literal uses [a] and [b] are equivalent.
+bool areListLiteralUsesEquivalent(ListLiteralUse a, ListLiteralUse b) {
+  return areTypesEquivalent(a.type, b.type) &&
+      a.isConstant == b.isConstant &&
+      a.isEmpty == b.isEmpty;
+}
+
+/// Returns `true` if the map literal uses [a] and [b] are equivalent.
+bool areMapLiteralUsesEquivalent(MapLiteralUse a, MapLiteralUse b) {
+  return areTypesEquivalent(a.type, b.type) &&
+      a.isConstant == b.isConstant &&
+      a.isEmpty == b.isEmpty;
+}
+
+/// Returns `true` if the access semantics [a] and [b] are equivalent.
+bool areAccessSemanticsEquivalent(AccessSemantics a, AccessSemantics b) {
+  if (a.kind != b.kind) return false;
+  switch (a.kind) {
+    case AccessKind.EXPRESSION:
+    case AccessKind.THIS:
+      // No additional properties.
+      return true;
+    case AccessKind.THIS_PROPERTY:
+    case AccessKind.DYNAMIC_PROPERTY:
+    case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
+      return areNamesEquivalent(a.name, b.name);
+    case AccessKind.CLASS_TYPE_LITERAL:
+    case AccessKind.TYPEDEF_TYPE_LITERAL:
+    case AccessKind.DYNAMIC_TYPE_LITERAL:
+      return areConstantsEquivalent(a.constant, b.constant);
+    case AccessKind.LOCAL_FUNCTION:
+    case AccessKind.LOCAL_VARIABLE:
+    case AccessKind.FINAL_LOCAL_VARIABLE:
+    case AccessKind.PARAMETER:
+    case AccessKind.FINAL_PARAMETER:
+    case AccessKind.STATIC_FIELD:
+    case AccessKind.FINAL_STATIC_FIELD:
+    case AccessKind.STATIC_METHOD:
+    case AccessKind.STATIC_GETTER:
+    case AccessKind.STATIC_SETTER:
+    case AccessKind.TOPLEVEL_FIELD:
+    case AccessKind.FINAL_TOPLEVEL_FIELD:
+    case AccessKind.TOPLEVEL_METHOD:
+    case AccessKind.TOPLEVEL_GETTER:
+    case AccessKind.TOPLEVEL_SETTER:
+    case AccessKind.SUPER_FIELD:
+    case AccessKind.SUPER_FINAL_FIELD:
+    case AccessKind.SUPER_METHOD:
+    case AccessKind.SUPER_GETTER:
+    case AccessKind.SUPER_SETTER:
+    case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
+    case AccessKind.UNRESOLVED:
+    case AccessKind.UNRESOLVED_SUPER:
+    case AccessKind.INVALID:
+      return areElementsEquivalent(a.element, b.element);
+    case AccessKind.COMPOUND:
+      CompoundAccessSemantics compoundAccess1 = a;
+      CompoundAccessSemantics compoundAccess2 = b;
+      return compoundAccess1.compoundAccessKind ==
+              compoundAccess2.compoundAccessKind &&
+          areElementsEquivalent(
+              compoundAccess1.getter, compoundAccess2.getter) &&
+          areElementsEquivalent(compoundAccess1.setter, compoundAccess2.setter);
+    case AccessKind.CONSTANT:
+      throw new UnsupportedError('Unsupported access kind: ${a.kind}');
+  }
+}
+
+/// Returns `true` if the send structures [a] and [b] are equivalent.
+bool areSendStructuresEquivalent(SendStructure a, SendStructure b) {
+  if (identical(a, b)) return true;
+  if (a == null || b == null) return false;
+  if (a.kind != b.kind) return false;
+
+  var ad = a;
+  var bd = b;
+  switch (a.kind) {
+    case SendStructureKind.IF_NULL:
+    case SendStructureKind.LOGICAL_AND:
+    case SendStructureKind.LOGICAL_OR:
+    case SendStructureKind.NOT:
+    case SendStructureKind.INVALID_UNARY:
+    case SendStructureKind.INVALID_BINARY:
+      // No additional properties.
+      return true;
+
+    case SendStructureKind.IS:
+    case SendStructureKind.IS_NOT:
+    case SendStructureKind.AS:
+      return areTypesEquivalent(ad.type, bd.type);
+
+    case SendStructureKind.INVOKE:
+    case SendStructureKind.INCOMPATIBLE_INVOKE:
+      if (!areSelectorsEquivalent(ad.selector, bd.selector)) return false;
+      continue semantics;
+
+    case SendStructureKind.UNARY:
+    case SendStructureKind.BINARY:
+    case SendStructureKind.PREFIX:
+    case SendStructureKind.POSTFIX:
+    case SendStructureKind.INDEX_PREFIX:
+    case SendStructureKind.INDEX_POSTFIX:
+    case SendStructureKind.COMPOUND:
+    case SendStructureKind.COMPOUND_INDEX_SET:
+      if (ad.operator != bd.operator) return false;
+      continue semantics;
+
+    case SendStructureKind.DEFERRED_PREFIX:
+      return areElementsEquivalent(ad.prefix, bd.prefix) &&
+          areSendStructuresEquivalent(ad.sendStructure, bd.sendStructure);
+
+    semantics: case SendStructureKind.GET:
+    case SendStructureKind.SET:
+    case SendStructureKind.INDEX:
+    case SendStructureKind.INDEX_SET:
+    case SendStructureKind.EQUALS:
+    case SendStructureKind.NOT_EQUALS:
+    case SendStructureKind.SET_IF_NULL:
+    case SendStructureKind.INDEX_SET_IF_NULL:
+      return areAccessSemanticsEquivalent(ad.semantics, bd.semantics);
+  }
+  throw new UnsupportedError('Unexpected send structures $a vs $b');
+}
+
+/// Returns `true` if the new structures [a] and [b] are equivalent.
+bool areNewStructuresEquivalent(NewStructure a, NewStructure b) {
+  if (identical(a, b)) return true;
+  if (a == null || b == null) return false;
+  if (a.kind != b.kind) return false;
+
+  var ad = a;
+  var bd = b;
+  switch (a.kind) {
+    case NewStructureKind.NEW_INVOKE:
+      return ad.semantics.kind == bd.semantics.kind &&
+          areElementsEquivalent(ad.semantics.element, bd.semantics.element) &&
+          areTypesEquivalent(ad.semantics.type, bd.semantics.type) &&
+          areSelectorsEquivalent(ad.selector, bd.selector);
+    case NewStructureKind.CONST_INVOKE:
+      return ad.constantInvokeKind == bd.constantInvokeKind &&
+          areConstantsEquivalent(ad.constant, bd.constant);
+    case NewStructureKind.LATE_CONST:
+      throw new UnsupportedError('Unsupported NewStructure kind ${a.kind}.');
+  }
+}
+
+/// Strategy for testing equivalence.
+///
+/// Use this strategy to determine equivalence without failing on inequivalence.
+class TestStrategy {
+  const TestStrategy();
+
+  bool test(var object1, var object2, String property, var value1, var value2,
+      [bool equivalence(a, b) = equality]) {
+    return equivalence(value1, value2);
+  }
+
+  bool testLists(
+      Object object1, Object object2, String property, List list1, List list2,
+      [bool elementEquivalence(a, b) = equality]) {
+    return areListsEquivalent(list1, list2, elementEquivalence);
+  }
+
+  bool testSets(
+      var object1, var object2, String property, Iterable set1, Iterable set2,
+      [bool elementEquivalence(a, b) = equality]) {
+    return areSetsEquivalent(set1, set2, elementEquivalence);
+  }
+
+  bool testElements(Object object1, Object object2, String property,
+      Element element1, Element element2) {
+    return areElementsEquivalent(element1, element2);
+  }
+
+  bool testTypes(Object object1, Object object2, String property,
+      DartType type1, DartType type2) {
+    return areTypesEquivalent(type1, type2);
+  }
+
+  bool testConstants(Object object1, Object object2, String property,
+      ConstantExpression exp1, ConstantExpression exp2) {
+    return areConstantsEquivalent(exp1, exp2);
+  }
+
+  bool testTypeLists(Object object1, Object object2, String property,
+      List<DartType> list1, List<DartType> list2) {
+    return areTypeListsEquivalent(list1, list2);
+  }
+
+  bool testConstantLists(Object object1, Object object2, String property,
+      List<ConstantExpression> list1, List<ConstantExpression> list2) {
+    return areConstantListsEquivalent(list1, list2);
+  }
+}
+
+/// Visitor that checks for equivalence of [Element]s.
+class ElementIdentityEquivalence extends BaseElementVisitor<bool, Element> {
+  final TestStrategy strategy;
+
+  const ElementIdentityEquivalence([this.strategy = const TestStrategy()]);
+
+  bool visit(Element element1, Element element2) {
+    if (element1 == null && element2 == null) {
+      return true;
+    } else if (element1 == null || element2 == null) {
+      return false;
+    }
+    element1 = element1.declaration;
+    element2 = element2.declaration;
+    if (element1 == element2) {
+      return true;
+    }
+    return strategy.test(
+            element1, element2, 'kind', element1.kind, element2.kind) &&
+        element1.accept(this, element2);
+  }
+
+  @override
+  bool visitElement(Element e, Element arg) {
+    throw new UnsupportedError("Unsupported element $e");
+  }
+
+  @override
+  bool visitLibraryElement(LibraryElement element1, LibraryElement element2) {
+    return strategy.test(element1, element2, 'canonicalUri',
+        element1.canonicalUri, element2.canonicalUri);
+  }
+
+  @override
+  bool visitCompilationUnitElement(
+      CompilationUnitElement element1, CompilationUnitElement element2) {
+    return strategy.test(
+            element1, element2, 'name', element1.name, element2.name) &&
+        visit(element1.library, element2.library);
+  }
+
+  @override
+  bool visitClassElement(ClassElement element1, ClassElement element2) {
+    return strategy.test(
+            element1, element2, 'name', element1.name, element2.name) &&
+        visit(element1.library, element2.library);
+  }
+
+  bool checkMembers(Element element1, Element element2) {
+    if (!strategy.test(
+        element1, element2, 'name', element1.name, element2.name)) {
+      return false;
+    }
+    if (element1.enclosingClass != null || element2.enclosingClass != null) {
+      return visit(element1.enclosingClass, element2.enclosingClass);
+    } else {
+      return visit(element1.library, element2.library);
+    }
+  }
+
+  @override
+  bool visitFieldElement(FieldElement element1, FieldElement element2) {
+    return checkMembers(element1, element2);
+  }
+
+  @override
+  bool visitConstructorElement(
+      ConstructorElement element1, ConstructorElement element2) {
+    return checkMembers(element1, element2);
+  }
+
+  @override
+  bool visitMethodElement(MethodElement element1, MethodElement element2) {
+    return checkMembers(element1, element2);
+  }
+
+  @override
+  bool visitGetterElement(GetterElement element1, GetterElement element2) {
+    return checkMembers(element1, element2);
+  }
+
+  @override
+  bool visitSetterElement(SetterElement element1, SetterElement element2) {
+    return checkMembers(element1, element2);
+  }
+
+  @override
+  bool visitLocalFunctionElement(
+      LocalFunctionElement element1, LocalFunctionElement element2) {
+    // TODO(johnniwinther): Define an equivalence on locals.
+    return checkMembers(element1.memberContext, element2.memberContext);
+  }
+
+  @override
+  bool visitLocalVariableElement(
+      LocalVariableElement element1, LocalVariableElement element2) {
+    // TODO(johnniwinther): Define an equivalence on locals.
+    return checkMembers(element1.memberContext, element2.memberContext);
+  }
+
+  bool visitAbstractFieldElement(
+      AbstractFieldElement element1, AbstractFieldElement element2) {
+    return checkMembers(element1, element2);
+  }
+
+  @override
+  bool visitTypeVariableElement(
+      TypeVariableElement element1, TypeVariableElement element2) {
+    return strategy.test(
+            element1, element2, 'name', element1.name, element2.name) &&
+        visit(element1.typeDeclaration, element2.typeDeclaration);
+  }
+
+  @override
+  bool visitTypedefElement(TypedefElement element1, TypedefElement element2) {
+    return strategy.test(
+            element1, element2, 'name', element1.name, element2.name) &&
+        visit(element1.library, element2.library);
+  }
+
+  @override
+  bool visitParameterElement(
+      ParameterElement element1, ParameterElement element2) {
+    return strategy.test(
+            element1, element2, 'name', element1.name, element2.name) &&
+        visit(element1.functionDeclaration, element2.functionDeclaration);
+  }
+
+  @override
+  bool visitImportElement(ImportElement element1, ImportElement element2) {
+    return visit(element1.importedLibrary, element2.importedLibrary) &&
+        visit(element1.library, element2.library);
+  }
+
+  @override
+  bool visitExportElement(ExportElement element1, ExportElement element2) {
+    return visit(element1.exportedLibrary, element2.exportedLibrary) &&
+        visit(element1.library, element2.library);
+  }
+
+  @override
+  bool visitPrefixElement(PrefixElement element1, PrefixElement element2) {
+    return strategy.test(
+            element1, element2, 'name', element1.name, element2.name) &&
+        visit(element1.library, element2.library);
+  }
+}
+
+/// Visitor that checks for equivalence of [DartType]s.
+class TypeEquivalence implements DartTypeVisitor<bool, DartType> {
+  final TestStrategy strategy;
+
+  const TypeEquivalence([this.strategy = const TestStrategy()]);
+
+  bool visit(DartType type1, DartType type2) {
+    return strategy.test(type1, type2, 'kind', type1.kind, type2.kind) &&
+        type1.accept(this, type2);
+  }
+
+  @override
+  bool visitDynamicType(DynamicType type, DynamicType other) => true;
+
+  @override
+  bool visitFunctionType(FunctionType type, FunctionType other) {
+    return strategy.testTypeLists(type, other, 'parameterTypes',
+            type.parameterTypes, other.parameterTypes) &&
+        strategy.testTypeLists(type, other, 'optionalParameterTypes',
+            type.optionalParameterTypes, other.optionalParameterTypes) &&
+        strategy.testTypeLists(type, other, 'namedParameterTypes',
+            type.namedParameterTypes, other.namedParameterTypes) &&
+        strategy.testLists(type, other, 'namedParameters', type.namedParameters,
+            other.namedParameters);
+  }
+
+  bool visitGenericType(GenericType type, GenericType other) {
+    return strategy.testElements(
+            type, other, 'element', type.element, other.element) &&
+        strategy.testTypeLists(type, other, 'typeArguments', type.typeArguments,
+            other.typeArguments);
+  }
+
+  @override
+  bool visitMalformedType(MalformedType type, MalformedType other) => true;
+
+  @override
+  bool visitStatementType(StatementType type, StatementType other) {
+    throw new UnsupportedError("Unsupported type: $type");
+  }
+
+  @override
+  bool visitTypeVariableType(TypeVariableType type, TypeVariableType other) {
+    return strategy.testElements(
+        type, other, 'element', type.element, other.element);
+  }
+
+  @override
+  bool visitVoidType(VoidType type, VoidType argument) => true;
+
+  @override
+  bool visitInterfaceType(InterfaceType type, InterfaceType other) {
+    return visitGenericType(type, other);
+  }
+
+  @override
+  bool visitTypedefType(TypedefType type, TypedefType other) {
+    return visitGenericType(type, other);
+  }
+}
+
+/// Visitor that checks for structural equivalence of [ConstantExpression]s.
+class ConstantEquivalence
+    implements ConstantExpressionVisitor<bool, ConstantExpression> {
+  final TestStrategy strategy;
+
+  const ConstantEquivalence([this.strategy = const TestStrategy()]);
+
+  @override
+  bool visit(ConstantExpression exp1, ConstantExpression exp2) {
+    if (identical(exp1, exp2)) return true;
+    return strategy.test(exp1, exp2, 'kind', exp1.kind, exp2.kind) &&
+        exp1.accept(this, exp2);
+  }
+
+  @override
+  bool visitBinary(
+      BinaryConstantExpression exp1, BinaryConstantExpression exp2) {
+    return strategy.test(
+            exp1, exp2, 'operator', exp1.operator, exp2.operator) &&
+        strategy.testConstants(exp1, exp2, 'left', exp1.left, exp2.left) &&
+        strategy.testConstants(exp1, exp2, 'right', exp1.right, exp2.right);
+  }
+
+  @override
+  bool visitConcatenate(
+      ConcatenateConstantExpression exp1, ConcatenateConstantExpression exp2) {
+    return strategy.testConstantLists(
+        exp1, exp2, 'expressions', exp1.expressions, exp2.expressions);
+  }
+
+  @override
+  bool visitConditional(
+      ConditionalConstantExpression exp1, ConditionalConstantExpression exp2) {
+    return strategy.testConstants(
+            exp1, exp2, 'condition', exp1.condition, exp2.condition) &&
+        strategy.testConstants(
+            exp1, exp2, 'trueExp', exp1.trueExp, exp2.trueExp) &&
+        strategy.testConstants(
+            exp1, exp2, 'falseExp', exp1.falseExp, exp2.falseExp);
+  }
+
+  @override
+  bool visitConstructed(
+      ConstructedConstantExpression exp1, ConstructedConstantExpression exp2) {
+    return strategy.testTypes(exp1, exp2, 'type', exp1.type, exp2.type) &&
+        strategy.testElements(exp1, exp2, 'target', exp1.target, exp2.target) &&
+        strategy.testConstantLists(
+            exp1, exp2, 'arguments', exp1.arguments, exp2.arguments) &&
+        strategy.test(exp1, exp2, 'callStructure', exp1.callStructure,
+            exp2.callStructure);
+  }
+
+  @override
+  bool visitFunction(
+      FunctionConstantExpression exp1, FunctionConstantExpression exp2) {
+    return strategy.testElements(
+        exp1, exp2, 'element', exp1.element, exp2.element);
+  }
+
+  @override
+  bool visitIdentical(
+      IdenticalConstantExpression exp1, IdenticalConstantExpression exp2) {
+    return strategy.testConstants(exp1, exp2, 'left', exp1.left, exp2.left) &&
+        strategy.testConstants(exp1, exp2, 'right', exp1.right, exp2.right);
+  }
+
+  @override
+  bool visitList(ListConstantExpression exp1, ListConstantExpression exp2) {
+    return strategy.testTypes(exp1, exp2, 'type', exp1.type, exp2.type) &&
+        strategy.testConstantLists(
+            exp1, exp2, 'values', exp1.values, exp2.values);
+  }
+
+  @override
+  bool visitMap(MapConstantExpression exp1, MapConstantExpression exp2) {
+    return strategy.testTypes(exp1, exp2, 'type', exp1.type, exp2.type) &&
+        strategy.testConstantLists(exp1, exp2, 'keys', exp1.keys, exp2.keys) &&
+        strategy.testConstantLists(
+            exp1, exp2, 'values', exp1.values, exp2.values);
+  }
+
+  @override
+  bool visitNamed(NamedArgumentReference exp1, NamedArgumentReference exp2) {
+    return strategy.test(exp1, exp2, 'name', exp1.name, exp2.name);
+  }
+
+  @override
+  bool visitPositional(
+      PositionalArgumentReference exp1, PositionalArgumentReference exp2) {
+    return strategy.test(exp1, exp2, 'index', exp1.index, exp2.index);
+  }
+
+  @override
+  bool visitSymbol(
+      SymbolConstantExpression exp1, SymbolConstantExpression exp2) {
+    // TODO(johnniwinther): Handle private names. Currently not even supported
+    // in resolution.
+    return strategy.test(exp1, exp2, 'name', exp1.name, exp2.name);
+  }
+
+  @override
+  bool visitType(TypeConstantExpression exp1, TypeConstantExpression exp2) {
+    return strategy.testTypes(exp1, exp2, 'type', exp1.type, exp2.type);
+  }
+
+  @override
+  bool visitUnary(UnaryConstantExpression exp1, UnaryConstantExpression exp2) {
+    return strategy.test(
+            exp1, exp2, 'operator', exp1.operator, exp2.operator) &&
+        strategy.testConstants(
+            exp1, exp2, 'expression', exp1.expression, exp2.expression);
+  }
+
+  @override
+  bool visitVariable(
+      VariableConstantExpression exp1, VariableConstantExpression exp2) {
+    return strategy.testElements(
+        exp1, exp2, 'element', exp1.element, exp2.element);
+  }
+
+  @override
+  bool visitBool(BoolConstantExpression exp1, BoolConstantExpression exp2) {
+    return strategy.test(
+        exp1, exp2, 'primitiveValue', exp1.primitiveValue, exp2.primitiveValue);
+  }
+
+  @override
+  bool visitDouble(
+      DoubleConstantExpression exp1, DoubleConstantExpression exp2) {
+    return strategy.test(
+        exp1, exp2, 'primitiveValue', exp1.primitiveValue, exp2.primitiveValue);
+  }
+
+  @override
+  bool visitInt(IntConstantExpression exp1, IntConstantExpression exp2) {
+    return strategy.test(
+        exp1, exp2, 'primitiveValue', exp1.primitiveValue, exp2.primitiveValue);
+  }
+
+  @override
+  bool visitNull(NullConstantExpression exp1, NullConstantExpression exp2) {
+    return true;
+  }
+
+  @override
+  bool visitString(
+      StringConstantExpression exp1, StringConstantExpression exp2) {
+    return strategy.test(
+        exp1, exp2, 'primitiveValue', exp1.primitiveValue, exp2.primitiveValue);
+  }
+
+  @override
+  bool visitBoolFromEnvironment(BoolFromEnvironmentConstantExpression exp1,
+      BoolFromEnvironmentConstantExpression exp2) {
+    return strategy.testConstants(exp1, exp2, 'name', exp1.name, exp2.name) &&
+        strategy.testConstants(
+            exp1, exp2, 'defaultValue', exp1.defaultValue, exp2.defaultValue);
+  }
+
+  @override
+  bool visitIntFromEnvironment(IntFromEnvironmentConstantExpression exp1,
+      IntFromEnvironmentConstantExpression exp2) {
+    return strategy.testConstants(exp1, exp2, 'name', exp1.name, exp2.name) &&
+        strategy.testConstants(
+            exp1, exp2, 'defaultValue', exp1.defaultValue, exp2.defaultValue);
+  }
+
+  @override
+  bool visitStringFromEnvironment(StringFromEnvironmentConstantExpression exp1,
+      StringFromEnvironmentConstantExpression exp2) {
+    return strategy.testConstants(exp1, exp2, 'name', exp1.name, exp2.name) &&
+        strategy.testConstants(
+            exp1, exp2, 'defaultValue', exp1.defaultValue, exp2.defaultValue);
+  }
+
+  @override
+  bool visitStringLength(StringLengthConstantExpression exp1,
+      StringLengthConstantExpression exp2) {
+    return strategy.testConstants(
+        exp1, exp2, 'expression', exp1.expression, exp2.expression);
+  }
+
+  @override
+  bool visitDeferred(
+      DeferredConstantExpression exp1, DeferredConstantExpression exp2) {
+    // TODO(johnniwinther): Implement this.
+    return true;
+  }
+}
+
+/// Tests the equivalence of [impact1] and [impact2] using [strategy].
+bool testResolutionImpactEquivalence(
+    ResolutionImpact impact1, ResolutionImpact impact2,
+    [TestStrategy strategy = const TestStrategy()]) {
+  return strategy.testSets(impact1, impact2, 'constSymbolNames',
+          impact1.constSymbolNames, impact2.constSymbolNames) &&
+      strategy.testSets(
+          impact1,
+          impact2,
+          'constantLiterals',
+          impact1.constantLiterals,
+          impact2.constantLiterals,
+          areConstantsEquivalent) &&
+      strategy.testSets(impact1, impact2, 'dynamicUses', impact1.dynamicUses,
+          impact2.dynamicUses, areDynamicUsesEquivalent) &&
+      strategy.testSets(
+          impact1, impact2, 'features', impact1.features, impact2.features) &&
+      strategy.testSets(impact1, impact2, 'listLiterals', impact1.listLiterals,
+          impact2.listLiterals, areListLiteralUsesEquivalent) &&
+      strategy.testSets(impact1, impact2, 'mapLiterals', impact1.mapLiterals,
+          impact2.mapLiterals, areMapLiteralUsesEquivalent) &&
+      strategy.testSets(impact1, impact2, 'staticUses', impact1.staticUses,
+          impact2.staticUses, areStaticUsesEquivalent) &&
+      strategy.testSets(impact1, impact2, 'typeUses', impact1.typeUses,
+          impact2.typeUses, areTypeUsesEquivalent);
+}
+
+/// Tests the equivalence of [resolvedAst1] and [resolvedAst2] using [strategy].
+bool testResolvedAstEquivalence(
+    ResolvedAst resolvedAst1, ResolvedAst resolvedAst2,
+    [TestStrategy strategy = const TestStrategy()]) {
+  return strategy.testElements(resolvedAst1, resolvedAst2, 'element',
+          resolvedAst1.element, resolvedAst2.element) &&
+      new NodeEquivalenceVisitor(strategy).testNodes(resolvedAst1, resolvedAst2,
+          'node', resolvedAst1.node, resolvedAst2.node) &&
+      testTreeElementsEquivalence(resolvedAst1, resolvedAst2, strategy);
+}
+
+/// Tests the equivalence of the data stored in the [TreeElements] of
+/// [resolvedAst1] and [resolvedAst2] using [strategy].
+bool testTreeElementsEquivalence(
+    ResolvedAst resolvedAst1, ResolvedAst resolvedAst2,
+    [TestStrategy strategy = const TestStrategy()]) {
+  AstIndexComputer indices1 = new AstIndexComputer();
+  resolvedAst1.node.accept(indices1);
+  AstIndexComputer indices2 = new AstIndexComputer();
+  resolvedAst2.node.accept(indices2);
+
+  TreeElements elements1 = resolvedAst1.elements;
+  TreeElements elements2 = resolvedAst2.elements;
+
+  TreeElementsEquivalenceVisitor visitor = new TreeElementsEquivalenceVisitor(
+      indices1, indices2, elements1, elements2, strategy);
+  resolvedAst1.node.accept(visitor);
+  return visitor.success;
+}
+
+/// Visitor that checks the equivalence of [TreeElements] data.
+class TreeElementsEquivalenceVisitor extends Visitor {
+  final TestStrategy strategy;
+  final AstIndexComputer indices1;
+  final AstIndexComputer indices2;
+  final TreeElements elements1;
+  final TreeElements elements2;
+  bool success = true;
+
+  TreeElementsEquivalenceVisitor(
+      this.indices1, this.indices2, this.elements1, this.elements2,
+      [this.strategy = const TestStrategy()]);
+
+  visitNode(Node node1) {
+    if (!success) return;
+    int index = indices1.nodeIndices[node1];
+    Node node2 = indices2.nodeList[index];
+    success = strategy.testElements(
+            node1, node2, '[$index]', elements1[node1], elements2[node2]) &&
+        strategy.testTypes(node1, node2, 'getType($index)',
+            elements1.getType(node1), elements2.getType(node2)) &&
+        strategy.test(
+            node1,
+            node2,
+            'getSelector($index)',
+            elements1.getSelector(node1),
+            elements2.getSelector(node2),
+            areSelectorsEquivalent) &&
+        strategy.testConstants(node1, node2, 'getConstant($index)',
+            elements1.getConstant(node1), elements2.getConstant(node2)) &&
+        strategy.testTypes(node1, node2, 'typesCache[$index]',
+            elements1.typesCache[node1], elements2.typesCache[node2]);
+
+    node1.visitChildren(this);
+  }
+
+  @override
+  visitSend(Send node1) {
+    visitExpression(node1);
+    if (!success) return;
+    int index = indices1.nodeIndices[node1];
+    Send node2 = indices2.nodeList[index];
+    success = strategy.test(node1, node2, 'isTypeLiteral($index)',
+            elements1.isTypeLiteral(node1), elements2.isTypeLiteral(node2)) &&
+        strategy.testTypes(
+            node1,
+            node2,
+            'getTypeLiteralType($index)',
+            elements1.getTypeLiteralType(node1),
+            elements2.getTypeLiteralType(node2)) &&
+        strategy.test(
+            node1,
+            node2,
+            'getSendStructure($index)',
+            elements1.getSendStructure(node1),
+            elements2.getSendStructure(node2),
+            areSendStructuresEquivalent);
+  }
+
+  @override
+  visitNewExpression(NewExpression node1) {
+    visitExpression(node1);
+    if (!success) return;
+    int index = indices1.nodeIndices[node1];
+    NewExpression node2 = indices2.nodeList[index];
+    success = strategy.test(
+        node1,
+        node2,
+        'getNewStructure($index)',
+        elements1.getNewStructure(node1),
+        elements2.getNewStructure(node2),
+        areNewStructuresEquivalent);
+  }
+
+  @override
+  visitSendSet(SendSet node1) {
+    visitSend(node1);
+    if (!success) return;
+    int index = indices1.nodeIndices[node1];
+    SendSet node2 = indices2.nodeList[index];
+    success = strategy.test(
+            node1,
+            node2,
+            'getGetterSelectorInComplexSendSet($index)',
+            elements1.getGetterSelectorInComplexSendSet(node1),
+            elements2.getGetterSelectorInComplexSendSet(node2),
+            areSelectorsEquivalent) &&
+        strategy.test(
+            node1,
+            node2,
+            'getOperatorSelectorInComplexSendSet($index)',
+            elements1.getOperatorSelectorInComplexSendSet(node1),
+            elements2.getOperatorSelectorInComplexSendSet(node2),
+            areSelectorsEquivalent);
+  }
+
+  @override
+  visitFunctionExpression(FunctionExpression node1) {
+    visitNode(node1);
+    if (!success) return;
+    int index = indices1.nodeIndices[node1];
+    FunctionExpression node2 = indices2.nodeList[index];
+    if (elements1[node1] is! FunctionElement) {
+      // [getFunctionDefinition] is currently stored in [] which doesn't always
+      // contain a [FunctionElement].
+      return;
+    }
+    success = strategy.testElements(
+        node1,
+        node2,
+        'getFunctionDefinition($index)',
+        elements1.getFunctionDefinition(node1),
+        elements2.getFunctionDefinition(node2));
+  }
+
+  @override
+  visitForIn(ForIn node1) {
+    visitLoop(node1);
+    if (!success) return;
+    int index = indices1.nodeIndices[node1];
+    ForIn node2 = indices2.nodeList[index];
+    success = strategy.testElements(node1, node2, 'getForInVariable($index)',
+        elements1.getForInVariable(node1), elements2.getForInVariable(node2));
+  }
+
+  @override
+  visitRedirectingFactoryBody(RedirectingFactoryBody node1) {
+    visitStatement(node1);
+    if (!success) return;
+    int index = indices1.nodeIndices[node1];
+    RedirectingFactoryBody node2 = indices2.nodeList[index];
+    success = strategy.testElements(
+        node1,
+        node2,
+        'getRedirectingTargetConstructor($index)',
+        elements1.getRedirectingTargetConstructor(node1),
+        elements2.getRedirectingTargetConstructor(node2));
+  }
+}
+
+class NodeEquivalenceVisitor implements Visitor1<bool, Node> {
+  final TestStrategy strategy;
+
+  const NodeEquivalenceVisitor([this.strategy = const TestStrategy()]);
+
+  bool testNodes(
+      var object1, var object2, String property, Node node1, Node node2) {
+    if (node1 == node2) return true;
+    if (node1 == null || node2 == null) return false;
+    return node1.accept1(this, node2);
+  }
+
+  bool testNodeLists(var object1, var object2, String property,
+      Link<Node> list1, Link<Node> list2) {
+    if (list1 == list2) return true;
+    if (list1 == null || list2 == null) return false;
+    while (list1.isNotEmpty && list2.isNotEmpty) {
+      if (!list1.head.accept1(this, list2.head)) {
+        return false;
+      }
+      list1 = list1.tail;
+      list2 = list2.tail;
+    }
+    return list1.isEmpty && list2.isEmpty;
+  }
+
+  bool testTokens(
+      var object1, var object2, String property, Token token1, Token token2) {
+    if (token1 == token2) return true;
+    if (token1 == null || token2 == null) return false;
+    return token1.hashCode == token2.hashCode;
+  }
+
+  @override
+  bool visitAssert(Assert node1, Assert node2) {
+    return testTokens(node1, node2, 'assertToken', node1.assertToken,
+            node2.assertToken) &&
+        testNodes(
+            node1, node2, 'condition', node1.condition, node2.condition) &&
+        testNodes(node1, node2, 'message', node1.message, node2.message);
+  }
+
+  @override
+  bool visitAsyncForIn(AsyncForIn node1, AsyncForIn node2) {
+    return visitForIn(node1, node2) &&
+        testTokens(
+            node1, node2, 'awaitToken', node1.awaitToken, node2.awaitToken);
+  }
+
+  @override
+  bool visitAsyncModifier(AsyncModifier node1, AsyncModifier node2) {
+    return testTokens(
+            node1, node2, 'asyncToken', node1.asyncToken, node2.asyncToken) &&
+        testTokens(node1, node2, 'starToken', node1.starToken, node2.starToken);
+  }
+
+  @override
+  bool visitAwait(Await node1, Await node2) {
+    return testTokens(
+            node1, node2, 'awaitToken', node1.awaitToken, node2.awaitToken) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitBlock(Block node1, Block node2) {
+    return testNodes(
+        node1, node2, 'statements', node1.statements, node2.statements);
+  }
+
+  @override
+  bool visitBreakStatement(BreakStatement node1, BreakStatement node2) {
+    return testTokens(node1, node2, 'keywordToken', node1.keywordToken,
+            node2.keywordToken) &&
+        testNodes(node1, node2, 'target', node1.target, node2.target);
+  }
+
+  @override
+  bool visitCascade(Cascade node1, Cascade node2) {
+    return testNodes(
+        node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitCascadeReceiver(CascadeReceiver node1, CascadeReceiver node2) {
+    return testTokens(node1, node2, 'cascadeOperator', node1.cascadeOperator,
+            node2.cascadeOperator) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitCaseMatch(CaseMatch node1, CaseMatch node2) {
+    return testTokens(node1, node2, 'caseKeyword', node1.caseKeyword,
+            node2.caseKeyword) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitCatchBlock(CatchBlock node1, CatchBlock node2) {
+    return testTokens(node1, node2, 'catchKeyword', node1.catchKeyword,
+            node2.catchKeyword) &&
+        testTokens(
+            node1, node2, 'onKeyword', node1.onKeyword, node2.onKeyword) &&
+        testNodes(node1, node2, 'type', node1.type, node2.type) &&
+        testNodes(node1, node2, 'formals', node1.formals, node2.formals) &&
+        testNodes(node1, node2, 'block', node1.block, node2.block);
+  }
+
+  @override
+  bool visitClassNode(ClassNode node1, ClassNode node2) {
+    return testTokens(
+            node1, node2, 'beginToken', node1.beginToken, node2.beginToken) &&
+        testTokens(node1, node2, 'extendsKeyword', node1.extendsKeyword,
+            node2.extendsKeyword) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(
+            node1, node2, 'modifiers', node1.modifiers, node2.modifiers) &&
+        testNodes(node1, node2, 'name', node1.name, node2.name) &&
+        testNodes(
+            node1, node2, 'superclass', node1.superclass, node2.superclass) &&
+        testNodes(
+            node1, node2, 'interfaces', node1.interfaces, node2.interfaces) &&
+        testNodes(node1, node2, 'typeParameters', node1.typeParameters,
+            node2.typeParameters) &&
+        testNodes(node1, node2, 'body', node1.body, node2.body);
+  }
+
+  @override
+  bool visitCombinator(Combinator node1, Combinator node2) {
+    return testTokens(node1, node2, 'keywordToken', node1.keywordToken,
+            node2.keywordToken) &&
+        testNodes(
+            node1, node2, 'identifiers', node1.identifiers, node2.identifiers);
+  }
+
+  @override
+  bool visitConditional(Conditional node1, Conditional node2) {
+    return testTokens(node1, node2, 'questionToken', node1.questionToken,
+            node2.questionToken) &&
+        testTokens(
+            node1, node2, 'colonToken', node1.colonToken, node2.colonToken) &&
+        testNodes(
+            node1, node2, 'condition', node1.condition, node2.condition) &&
+        testNodes(node1, node2, 'thenExpression', node1.thenExpression,
+            node2.thenExpression) &&
+        testNodes(node1, node2, 'elseExpression', node1.elseExpression,
+            node2.elseExpression);
+  }
+
+  @override
+  bool visitConditionalUri(ConditionalUri node1, ConditionalUri node2) {
+    return testTokens(node1, node2, 'ifToken', node1.ifToken, node2.ifToken) &&
+        testNodes(node1, node2, 'key', node1.key, node2.key) &&
+        testNodes(node1, node2, 'value', node1.value, node2.value) &&
+        testNodes(node1, node2, 'uri', node1.uri, node2.uri);
+  }
+
+  @override
+  bool visitContinueStatement(
+      ContinueStatement node1, ContinueStatement node2) {
+    return testTokens(node1, node2, 'keywordToken', node1.keywordToken,
+            node2.keywordToken) &&
+        testNodes(node1, node2, 'target', node1.target, node2.target);
+  }
+
+  @override
+  bool visitDoWhile(DoWhile node1, DoWhile node2) {
+    return testTokens(
+            node1, node2, 'doKeyword', node1.doKeyword, node2.doKeyword) &&
+        testTokens(node1, node2, 'whileKeyword', node1.whileKeyword,
+            node2.whileKeyword) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(
+            node1, node2, 'condition', node1.condition, node2.condition) &&
+        testNodes(node1, node2, 'body', node1.body, node2.body);
+  }
+
+  @override
+  bool visitDottedName(DottedName node1, DottedName node2) {
+    return testTokens(node1, node2, 'token', node1.token, node2.token) &&
+        testNodes(
+            node1, node2, 'identifiers', node1.identifiers, node2.identifiers);
+  }
+
+  @override
+  bool visitEmptyStatement(EmptyStatement node1, EmptyStatement node2) {
+    return testTokens(node1, node2, 'semicolonToken', node1.semicolonToken,
+        node2.semicolonToken);
+  }
+
+  @override
+  bool visitEnum(Enum node1, Enum node2) {
+    return testTokens(
+            node1, node2, 'enumToken', node1.enumToken, node2.enumToken) &&
+        testNodes(node1, node2, 'name', node1.name, node2.name) &&
+        testNodes(node1, node2, 'names', node1.names, node2.names);
+  }
+
+  @override
+  bool visitExport(Export node1, Export node2) {
+    return visitLibraryDependency(node1, node2) &&
+        testTokens(node1, node2, 'exportKeyword', node1.exportKeyword,
+            node2.exportKeyword);
+  }
+
+  @override
+  bool visitExpressionStatement(
+      ExpressionStatement node1, ExpressionStatement node2) {
+    return testTokens(
+            node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitFor(For node1, For node2) {
+    return testTokens(
+            node1, node2, 'forToken', node1.forToken, node2.forToken) &&
+        testNodes(node1, node2, 'initializer', node1.initializer,
+            node2.initializer) &&
+        testNodes(node1, node2, 'conditionStatement', node1.conditionStatement,
+            node2.conditionStatement) &&
+        testNodes(node1, node2, 'update', node1.update, node2.update) &&
+        testNodes(node1, node2, 'body', node1.body, node2.body);
+  }
+
+  @override
+  bool visitForIn(ForIn node1, ForIn node2) {
+    return testNodes(
+            node1, node2, 'condition', node1.condition, node2.condition) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression) &&
+        testNodes(node1, node2, 'body', node1.expression, node2.body) &&
+        testNodes(node1, node2, 'declaredIdentifier', node1.declaredIdentifier,
+            node2.declaredIdentifier);
+  }
+
+  @override
+  bool visitFunctionDeclaration(
+      FunctionDeclaration node1, FunctionDeclaration node2) {
+    return testNodes(node1, node2, 'function', node1.function, node2.function);
+  }
+
+  @override
+  bool visitFunctionExpression(
+      FunctionExpression node1, FunctionExpression node2) {
+    return testTokens(
+            node1, node2, 'getOrSet', node1.getOrSet, node2.getOrSet) &&
+        testNodes(node1, node2, 'name', node1.name, node2.name) &&
+        testNodes(
+            node1, node2, 'parameters', node1.parameters, node2.parameters) &&
+        testNodes(node1, node2, 'body', node1.body, node2.body) &&
+        testNodes(
+            node1, node2, 'returnType', node1.returnType, node2.returnType) &&
+        testNodes(
+            node1, node2, 'modifiers', node1.modifiers, node2.modifiers) &&
+        testNodes(node1, node2, 'initializers', node1.initializers,
+            node2.initializers) &&
+        testNodes(node1, node2, 'asyncModifier', node1.asyncModifier,
+            node2.asyncModifier);
+  }
+
+  @override
+  bool visitGotoStatement(GotoStatement node1, GotoStatement node2) {
+    return testTokens(node1, node2, 'keywordToken', node1.keywordToken,
+            node2.keywordToken) &&
+        testTokens(node1, node2, 'semicolonToken', node1.semicolonToken,
+            node2.semicolonToken) &&
+        testNodes(node1, node2, 'target', node1.target, node2.target);
+  }
+
+  @override
+  bool visitIdentifier(Identifier node1, Identifier node2) {
+    return testTokens(node1, node2, 'token', node1.token, node2.token);
+  }
+
+  @override
+  bool visitIf(If node1, If node2) {
+    return testTokens(node1, node2, 'ifToken', node1.ifToken, node2.ifToken) &&
+        testTokens(
+            node1, node2, 'elseToken', node1.elseToken, node2.elseToken) &&
+        testNodes(
+            node1, node2, 'condition', node1.condition, node2.condition) &&
+        testNodes(node1, node2, 'thenPart', node1.thenPart, node2.thenPart) &&
+        testNodes(node1, node2, 'elsePart', node1.elsePart, node2.elsePart);
+  }
+
+  @override
+  bool visitImport(Import node1, Import node2) {
+    return visitLibraryDependency(node1, node2) &&
+        testTokens(node1, node2, 'importKeyword', node1.importKeyword,
+            node2.importKeyword) &&
+        testNodes(node1, node2, 'prefix', node1.prefix, node2.prefix) &&
+        strategy.test(
+            node1, node2, 'isDeferred', node1.isDeferred, node2.isDeferred);
+  }
+
+  @override
+  bool visitLabel(Label node1, Label node2) {
+    return testTokens(
+            node1, node2, 'colonToken', node1.colonToken, node2.colonToken) &&
+        testNodes(
+            node1, node2, 'identifier', node1.identifier, node2.identifier);
+  }
+
+  @override
+  bool visitLabeledStatement(LabeledStatement node1, LabeledStatement node2) {
+    return testNodes(node1, node2, 'labels', node1.labels, node2.labels) &&
+        testNodes(node1, node2, 'statement', node1.statement, node2.statement);
+  }
+
+  @override
+  bool visitLibraryDependency(
+      LibraryDependency node1, LibraryDependency node2) {
+    return visitLibraryTag(node1, node2) &&
+        testNodes(node1, node2, 'uri', node1.uri, node2.uri) &&
+        testNodes(node1, node2, 'conditionalUris', node1.conditionalUris,
+            node2.conditionalUris) &&
+        testNodes(
+            node1, node2, 'combinators', node1.combinators, node2.combinators);
+  }
+
+  @override
+  bool visitLibraryName(LibraryName node1, LibraryName node2) {
+    return visitLibraryTag(node1, node2) &&
+        testTokens(node1, node2, 'libraryKeyword', node1.libraryKeyword,
+            node2.libraryKeyword) &&
+        testNodes(node1, node2, 'name', node1.name, node2.name);
+  }
+
+  @override
+  bool visitLibraryTag(LibraryTag node1, LibraryTag node2) {
+    // TODO(johnniwinther): Check metadata?
+    return true;
+  }
+
+  @override
+  bool visitLiteral(Literal node1, Literal node2) {
+    return testTokens(node1, node2, 'token', node1.token, node2.token);
+  }
+
+  @override
+  bool visitLiteralBool(LiteralBool node1, LiteralBool node2) {
+    return visitLiteral(node1, node2);
+  }
+
+  @override
+  bool visitLiteralDouble(LiteralDouble node1, LiteralDouble node2) {
+    return visitLiteral(node1, node2);
+  }
+
+  @override
+  bool visitLiteralInt(LiteralInt node1, LiteralInt node2) {
+    return visitLiteral(node1, node2);
+  }
+
+  @override
+  bool visitLiteralList(LiteralList node1, LiteralList node2) {
+    return testTokens(node1, node2, 'constKeyword', node1.constKeyword,
+            node2.constKeyword) &&
+        testNodes(node1, node2, 'typeArguments', node1.typeArguments,
+            node2.typeArguments) &&
+        testNodes(node1, node2, 'elements', node1.elements, node2.elements);
+  }
+
+  @override
+  bool visitLiteralMap(LiteralMap node1, LiteralMap node2) {
+    return testTokens(node1, node2, 'constKeyword', node1.constKeyword,
+            node2.constKeyword) &&
+        testNodes(node1, node2, 'typeArguments', node1.typeArguments,
+            node2.typeArguments) &&
+        testNodes(node1, node2, 'entries', node1.entries, node2.entries);
+  }
+
+  @override
+  bool visitLiteralMapEntry(LiteralMapEntry node1, LiteralMapEntry node2) {
+    return testTokens(
+            node1, node2, 'colonToken', node1.colonToken, node2.colonToken) &&
+        testNodes(node1, node2, 'key', node1.key, node2.key) &&
+        testNodes(node1, node2, 'value', node1.value, node2.value);
+  }
+
+  @override
+  bool visitLiteralNull(LiteralNull node1, LiteralNull node2) {
+    return visitLiteral(node1, node2);
+  }
+
+  @override
+  bool visitLiteralString(LiteralString node1, LiteralString node2) {
+    return testTokens(node1, node2, 'token', node1.token, node2.token) &&
+        strategy.test(
+            node1, node2, 'dartString', node1.dartString, node2.dartString);
+  }
+
+  @override
+  bool visitLiteralSymbol(LiteralSymbol node1, LiteralSymbol node2) {
+    return testTokens(
+            node1, node2, 'hashToken', node1.hashToken, node2.hashToken) &&
+        testNodes(
+            node1, node2, 'identifiers', node1.identifiers, node2.identifiers);
+  }
+
+  @override
+  bool visitLoop(Loop node1, Loop node2) {
+    return testNodes(
+            node1, node2, 'condition', node1.condition, node2.condition) &&
+        testNodes(node1, node2, 'body', node1.body, node2.body);
+  }
+
+  @override
+  bool visitMetadata(Metadata node1, Metadata node2) {
+    return testTokens(node1, node2, 'token', node1.token, node2.token) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitMixinApplication(MixinApplication node1, MixinApplication node2) {
+    return testNodes(
+            node1, node2, 'superclass', node1.superclass, node2.superclass) &&
+        testNodes(node1, node2, 'mixins', node1.mixins, node2.mixins);
+  }
+
+  @override
+  bool visitModifiers(Modifiers node1, Modifiers node2) {
+    return strategy.test(node1, node2, 'flags', node1.flags, node2.flags) &&
+        testNodes(node1, node2, 'nodes', node1.nodes, node2.nodes);
+  }
+
+  @override
+  bool visitNamedArgument(NamedArgument node1, NamedArgument node2) {
+    return testTokens(
+            node1, node2, 'colonToken', node1.colonToken, node2.colonToken) &&
+        testNodes(node1, node2, 'name', node1.name, node2.name) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitNamedMixinApplication(
+      NamedMixinApplication node1, NamedMixinApplication node2) {
+    return testTokens(node1, node2, 'classKeyword', node1.classKeyword,
+            node2.classKeyword) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(node1, node2, 'name', node1.name, node2.name) &&
+        testNodes(node1, node2, 'typeParameters', node1.typeParameters,
+            node2.typeParameters) &&
+        testNodes(
+            node1, node2, 'modifiers', node1.modifiers, node2.modifiers) &&
+        testNodes(node1, node2, 'mixinApplication', node1.mixinApplication,
+            node2.mixinApplication) &&
+        testNodes(
+            node1, node2, 'interfaces', node1.interfaces, node2.interfaces);
+  }
+
+  @override
+  bool visitNewExpression(NewExpression node1, NewExpression node2) {
+    return testTokens(
+            node1, node2, 'newToken', node1.newToken, node2.newToken) &&
+        testNodes(node1, node2, 'send', node1.send, node2.send);
+  }
+
+  @override
+  bool visitNodeList(NodeList node1, NodeList node2) {
+    return testTokens(
+            node1, node2, 'beginToken', node1.beginToken, node2.beginToken) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        strategy.test(
+            node1, node2, 'delimiter', node1.delimiter, node2.delimiter) &&
+        testNodeLists(node1, node2, 'nodes', node1.nodes, node2.nodes);
+  }
+
+  @override
+  bool visitOperator(Operator node1, Operator node2) {
+    return visitIdentifier(node1, node2);
+  }
+
+  @override
+  bool visitParenthesizedExpression(
+      ParenthesizedExpression node1, ParenthesizedExpression node2) {
+    return testTokens(
+            node1, node2, 'beginToken', node1.beginToken, node2.beginToken) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitPart(Part node1, Part node2) {
+    return visitLibraryTag(node1, node2) &&
+        testTokens(node1, node2, 'partKeyword', node1.partKeyword,
+            node2.partKeyword) &&
+        testNodes(node1, node2, 'uri', node1.uri, node2.uri);
+  }
+
+  @override
+  bool visitPartOf(PartOf node1, PartOf node2) {
+    // TODO(johnniwinther): Check metadata?
+    return testTokens(node1, node2, 'partKeyword', node1.partKeyword,
+            node2.partKeyword) &&
+        testNodes(node1, node2, 'name', node1.name, node2.name);
+  }
+
+  @override
+  bool visitPostfix(Postfix node1, Postfix node2) {
+    return visitNodeList(node1, node2);
+  }
+
+  @override
+  bool visitPrefix(Prefix node1, Prefix node2) {
+    return visitNodeList(node1, node2);
+  }
+
+  @override
+  bool visitRedirectingFactoryBody(
+      RedirectingFactoryBody node1, RedirectingFactoryBody node2) {
+    return testTokens(
+            node1, node2, 'beginToken', node1.beginToken, node2.beginToken) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(node1, node2, 'constructorReference',
+            node1.constructorReference, node2.constructorReference);
+  }
+
+  @override
+  bool visitRethrow(Rethrow node1, Rethrow node2) {
+    return testTokens(
+            node1, node2, 'throwToken', node1.throwToken, node2.throwToken) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken);
+  }
+
+  @override
+  bool visitReturn(Return node1, Return node2) {
+    return testTokens(
+            node1, node2, 'beginToken', node1.beginToken, node2.beginToken) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitSend(Send node1, Send node2) {
+    return strategy.test(node1, node2, 'isConditional', node1.isConditional,
+            node2.isConditional) &&
+        testNodes(node1, node2, 'receiver', node1.receiver, node2.receiver) &&
+        testNodes(node1, node2, 'selector', node1.selector, node2.selector) &&
+        testNodes(node1, node2, 'argumentsNode', node1.argumentsNode,
+            node2.argumentsNode);
+  }
+
+  @override
+  bool visitSendSet(SendSet node1, SendSet node2) {
+    return visitSend(node1, node2) &&
+        testNodes(node1, node2, 'assignmentOperator', node1.assignmentOperator,
+            node2.assignmentOperator);
+  }
+
+  @override
+  bool visitStringInterpolation(
+      StringInterpolation node1, StringInterpolation node2) {
+    return testNodes(node1, node2, 'string', node1.string, node2.string) &&
+        testNodes(node1, node2, 'parts', node1.parts, node2.parts);
+  }
+
+  @override
+  bool visitStringInterpolationPart(
+      StringInterpolationPart node1, StringInterpolationPart node2) {
+    return testNodes(
+        node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitStringJuxtaposition(
+      StringJuxtaposition node1, StringJuxtaposition node2) {
+    return testNodes(node1, node2, 'first', node1.first, node2.first) &&
+        testNodes(node1, node2, 'second', node1.second, node2.second);
+  }
+
+  @override
+  bool visitSwitchCase(SwitchCase node1, SwitchCase node2) {
+    return testTokens(node1, node2, 'defaultKeyword', node1.defaultKeyword,
+            node2.defaultKeyword) &&
+        testTokens(
+            node1, node2, 'startToken', node1.startToken, node2.startToken) &&
+        testNodes(node1, node2, 'labelsAndCases', node1.labelsAndCases,
+            node2.labelsAndCases) &&
+        testNodes(
+            node1, node2, 'statements', node1.statements, node2.statements);
+  }
+
+  @override
+  bool visitSwitchStatement(SwitchStatement node1, SwitchStatement node2) {
+    return testTokens(node1, node2, 'switchKeyword', node1.switchKeyword,
+            node2.switchKeyword) &&
+        testNodes(node1, node2, 'parenthesizedExpression',
+            node1.parenthesizedExpression, node2.parenthesizedExpression) &&
+        testNodes(node1, node2, 'cases', node1.cases, node2.cases);
+  }
+
+  @override
+  bool visitSyncForIn(SyncForIn node1, SyncForIn node2) {
+    return visitForIn(node1, node2);
+  }
+
+  @override
+  bool visitThrow(Throw node1, Throw node2) {
+    return testTokens(
+            node1, node2, 'throwToken', node1.throwToken, node2.throwToken) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitTryStatement(TryStatement node1, TryStatement node2) {
+    return testTokens(
+            node1, node2, 'tryKeyword', node1.tryKeyword, node2.tryKeyword) &&
+        testTokens(node1, node2, 'finallyKeyword', node1.finallyKeyword,
+            node2.finallyKeyword) &&
+        testNodes(node1, node2, 'tryBlock', node1.tryBlock, node2.tryBlock) &&
+        testNodes(node1, node2, 'catchBlocks', node1.catchBlocks,
+            node2.catchBlocks) &&
+        testNodes(node1, node2, 'finallyBlock', node1.finallyBlock,
+            node2.finallyBlock);
+  }
+
+  @override
+  bool visitTypeAnnotation(TypeAnnotation node1, TypeAnnotation node2) {
+    return testNodes(
+            node1, node2, 'typeName', node1.typeName, node2.typeName) &&
+        testNodes(node1, node2, 'typeArguments', node1.typeArguments,
+            node2.typeArguments);
+  }
+
+  @override
+  bool visitTypeVariable(TypeVariable node1, TypeVariable node2) {
+    return testNodes(node1, node2, 'name', node1.name, node2.name) &&
+        testNodes(node1, node2, 'bound', node1.bound, node2.bound);
+  }
+
+  @override
+  bool visitTypedef(Typedef node1, Typedef node2) {
+    return testTokens(node1, node2, 'typedefKeyword', node1.typedefKeyword,
+            node2.typedefKeyword) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(
+            node1, node2, 'returnType', node1.returnType, node2.returnType) &&
+        testNodes(node1, node2, 'name', node1.name, node2.name) &&
+        testNodes(node1, node2, 'typeParameters', node1.typeParameters,
+            node2.typeParameters) &&
+        testNodes(node1, node2, 'formals', node1.formals, node2.formals);
+  }
+
+  @override
+  bool visitVariableDefinitions(
+      VariableDefinitions node1, VariableDefinitions node2) {
+    return testNodes(
+            node1, node2, 'metadata', node1.metadata, node2.metadata) &&
+        testNodes(node1, node2, 'type', node1.type, node2.type) &&
+        testNodes(
+            node1, node2, 'modifiers', node1.modifiers, node2.modifiers) &&
+        testNodes(
+            node1, node2, 'definitions', node1.definitions, node2.definitions);
+  }
+
+  @override
+  bool visitWhile(While node1, While node2) {
+    return testTokens(node1, node2, 'whileKeyword', node1.whileKeyword,
+            node2.whileKeyword) &&
+        testNodes(
+            node1, node2, 'condition', node1.condition, node2.condition) &&
+        testNodes(node1, node2, 'body', node1.body, node2.body);
+  }
+
+  @override
+  bool visitYield(Yield node1, Yield node2) {
+    return testTokens(
+            node1, node2, 'yieldToken', node1.yieldToken, node2.yieldToken) &&
+        testTokens(
+            node1, node2, 'starToken', node1.starToken, node2.starToken) &&
+        testTokens(node1, node2, 'endToken', node1.endToken, node2.endToken) &&
+        testNodes(
+            node1, node2, 'expression', node1.expression, node2.expression);
+  }
+
+  @override
+  bool visitNode(Node node1, Node node2) {
+    throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
+  }
+
+  @override
+  bool visitExpression(Expression node1, Expression node2) {
+    throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
+  }
+
+  @override
+  bool visitStatement(Statement node1, Statement node2) {
+    throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
+  }
+
+  @override
+  bool visitStringNode(StringNode node1, StringNode node2) {
+    throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
+  }
+}
diff --git a/pkg/compiler/lib/src/serialization/impact_serialization.dart b/pkg/compiler/lib/src/serialization/impact_serialization.dart
new file mode 100644
index 0000000..af3cf5d
--- /dev/null
+++ b/pkg/compiler/lib/src/serialization/impact_serialization.dart
@@ -0,0 +1,191 @@
+// 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 dart2js.serialization.impact;
+
+import '../dart_types.dart';
+import '../common/resolution.dart';
+import '../constants/expressions.dart';
+import '../elements/elements.dart';
+import '../universe/call_structure.dart';
+import '../universe/selector.dart';
+import '../universe/world_impact.dart';
+import '../universe/use.dart';
+import '../util/enumset.dart';
+
+import 'keys.dart';
+import 'serialization.dart';
+import 'serialization_util.dart';
+
+/// Visitor that serializes a [ResolutionImpact] object using an
+/// [ObjectEncoder].
+class ImpactSerializer implements WorldImpactVisitor {
+  final ObjectEncoder objectEncoder;
+  final ListEncoder staticUses;
+  final ListEncoder dynamicUses;
+  final ListEncoder typeUses;
+
+  ImpactSerializer(ObjectEncoder objectEncoder)
+      : this.objectEncoder = objectEncoder,
+        staticUses = objectEncoder.createList(Key.STATIC_USES),
+        dynamicUses = objectEncoder.createList(Key.DYNAMIC_USES),
+        typeUses = objectEncoder.createList(Key.TYPE_USES);
+
+  void serialize(ResolutionImpact resolutionImpact) {
+    resolutionImpact.apply(this);
+    objectEncoder.setStrings(Key.SYMBOLS, resolutionImpact.constSymbolNames);
+    objectEncoder.setConstants(
+        Key.CONSTANTS, resolutionImpact.constantLiterals);
+    objectEncoder.setEnums(Key.FEATURES, resolutionImpact.features);
+    if (resolutionImpact.listLiterals.isNotEmpty) {
+      ListEncoder encoder = objectEncoder.createList(Key.LISTS);
+      for (ListLiteralUse use in resolutionImpact.listLiterals) {
+        ObjectEncoder useEncoder = encoder.createObject();
+        useEncoder.setType(Key.TYPE, use.type);
+        useEncoder.setBool(Key.IS_CONST, use.isConstant);
+        useEncoder.setBool(Key.IS_EMPTY, use.isEmpty);
+      }
+    }
+    if (resolutionImpact.mapLiterals.isNotEmpty) {
+      ListEncoder encoder = objectEncoder.createList(Key.MAPS);
+      for (MapLiteralUse use in resolutionImpact.mapLiterals) {
+        ObjectEncoder useEncoder = encoder.createObject();
+        useEncoder.setType(Key.TYPE, use.type);
+        useEncoder.setBool(Key.IS_CONST, use.isConstant);
+        useEncoder.setBool(Key.IS_EMPTY, use.isEmpty);
+      }
+    }
+  }
+
+  @override
+  void visitDynamicUse(DynamicUse dynamicUse) {
+    ObjectEncoder object = dynamicUses.createObject();
+    serializeSelector(dynamicUse.selector, object);
+  }
+
+  @override
+  void visitStaticUse(StaticUse staticUse) {
+    if (staticUse.element.isGenerativeConstructor &&
+        staticUse.element.enclosingClass.isUnnamedMixinApplication) {
+      // TODO(johnniwinther): Handle static use of forwarding constructors.
+      return;
+    }
+    ObjectEncoder object = staticUses.createObject();
+    object.setEnum(Key.KIND, staticUse.kind);
+    object.setElement(Key.ELEMENT, staticUse.element);
+  }
+
+  @override
+  void visitTypeUse(TypeUse typeUse) {
+    ObjectEncoder object = typeUses.createObject();
+    object.setEnum(Key.KIND, typeUse.kind);
+    object.setType(Key.TYPE, typeUse.type);
+  }
+}
+
+/// A deserialized [WorldImpact] object.
+class DeserializedResolutionImpact extends WorldImpact
+    implements ResolutionImpact {
+  final Iterable<String> constSymbolNames;
+  final Iterable<ConstantExpression> constantLiterals;
+  final Iterable<DynamicUse> dynamicUses;
+  final EnumSet<Feature> _features;
+  final Iterable<ListLiteralUse> listLiterals;
+  final Iterable<MapLiteralUse> mapLiterals;
+  final Iterable<StaticUse> staticUses;
+  final Iterable<TypeUse> typeUses;
+
+  DeserializedResolutionImpact(
+      {this.constSymbolNames,
+      this.constantLiterals,
+      this.dynamicUses,
+      EnumSet<Feature> features,
+      this.listLiterals,
+      this.mapLiterals,
+      this.staticUses,
+      this.typeUses})
+      : this._features = features;
+
+  Iterable<Feature> get features => _features.iterable(Feature.values);
+}
+
+class ImpactDeserializer {
+  /// Deserializes a [WorldImpact] from [objectDecoder].
+  static ResolutionImpact deserializeImpact(ObjectDecoder objectDecoder) {
+    ListDecoder staticUseDecoder = objectDecoder.getList(Key.STATIC_USES);
+    List<StaticUse> staticUses = <StaticUse>[];
+    for (int index = 0; index < staticUseDecoder.length; index++) {
+      ObjectDecoder object = staticUseDecoder.getObject(index);
+      StaticUseKind kind = object.getEnum(Key.KIND, StaticUseKind.values);
+      Element element = object.getElement(Key.ELEMENT);
+      staticUses.add(new StaticUse.internal(element, kind));
+    }
+
+    ListDecoder dynamicUseDecoder = objectDecoder.getList(Key.DYNAMIC_USES);
+    List<DynamicUse> dynamicUses = <DynamicUse>[];
+    for (int index = 0; index < dynamicUseDecoder.length; index++) {
+      ObjectDecoder object = dynamicUseDecoder.getObject(index);
+      Selector selector = deserializeSelector(object);
+      dynamicUses.add(new DynamicUse(selector, null));
+    }
+
+    ListDecoder typeUseDecoder = objectDecoder.getList(Key.TYPE_USES);
+    List<TypeUse> typeUses = <TypeUse>[];
+    for (int index = 0; index < typeUseDecoder.length; index++) {
+      ObjectDecoder object = typeUseDecoder.getObject(index);
+      TypeUseKind kind = object.getEnum(Key.KIND, TypeUseKind.values);
+      DartType type = object.getType(Key.TYPE);
+      typeUses.add(new TypeUse.internal(type, kind));
+    }
+
+    List<String> constSymbolNames =
+        objectDecoder.getStrings(Key.SYMBOLS, isOptional: true);
+
+    List<ConstantExpression> constantLiterals =
+        objectDecoder.getConstants(Key.CONSTANTS, isOptional: true);
+
+    EnumSet<Feature> features =
+        objectDecoder.getEnums(Key.FEATURES, isOptional: true);
+
+    ListDecoder listLiteralDecoder =
+        objectDecoder.getList(Key.LISTS, isOptional: true);
+    List<ListLiteralUse> listLiterals = const <ListLiteralUse>[];
+    if (listLiteralDecoder != null) {
+      listLiterals = <ListLiteralUse>[];
+      for (int i = 0; i < listLiteralDecoder.length; i++) {
+        ObjectDecoder useDecoder = listLiteralDecoder.getObject(i);
+        DartType type = useDecoder.getType(Key.TYPE);
+        bool isConstant = useDecoder.getBool(Key.IS_CONST);
+        bool isEmpty = useDecoder.getBool(Key.IS_EMPTY);
+        listLiterals.add(
+            new ListLiteralUse(type, isConstant: isConstant, isEmpty: isEmpty));
+      }
+    }
+
+    ListDecoder mapLiteralDecoder =
+        objectDecoder.getList(Key.MAPS, isOptional: true);
+    List<MapLiteralUse> mapLiterals = const <MapLiteralUse>[];
+    if (mapLiteralDecoder != null) {
+      mapLiterals = <MapLiteralUse>[];
+      for (int i = 0; i < mapLiteralDecoder.length; i++) {
+        ObjectDecoder useDecoder = mapLiteralDecoder.getObject(i);
+        DartType type = useDecoder.getType(Key.TYPE);
+        bool isConstant = useDecoder.getBool(Key.IS_CONST);
+        bool isEmpty = useDecoder.getBool(Key.IS_EMPTY);
+        mapLiterals.add(
+            new MapLiteralUse(type, isConstant: isConstant, isEmpty: isEmpty));
+      }
+    }
+
+    return new DeserializedResolutionImpact(
+        constSymbolNames: constSymbolNames,
+        constantLiterals: constantLiterals,
+        dynamicUses: dynamicUses,
+        features: features,
+        listLiterals: listLiterals,
+        mapLiterals: mapLiterals,
+        staticUses: staticUses,
+        typeUses: typeUses);
+  }
+}
diff --git a/pkg/compiler/lib/src/serialization/json_serializer.dart b/pkg/compiler/lib/src/serialization/json_serializer.dart
index 399bdbf..55ec647 100644
--- a/pkg/compiler/lib/src/serialization/json_serializer.dart
+++ b/pkg/compiler/lib/src/serialization/json_serializer.dart
@@ -14,8 +14,8 @@
   const JsonSerializationEncoder();
 
   String encode(ObjectValue objectValue) {
-    return new JsonEncoder.withIndent(' ').convert(
-        const JsonValueEncoder().convert(objectValue));
+    return new JsonEncoder.withIndent(' ')
+        .convert(const JsonValueEncoder().convert(objectValue));
   }
 }
 
@@ -120,6 +120,7 @@
   void visitDouble(DoubleValue value, String indentation) {
     buffer.write(value.value);
   }
+
   @override
   void visitElement(ElementValue value, String indentation) {
     buffer.write('Element(${value.id}):${value.element}');
@@ -209,4 +210,4 @@
   void visitUri(UriValue value, String indentation) {
     buffer.write('Uri(${value.value})');
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/serialization/keys.dart b/pkg/compiler/lib/src/serialization/keys.dart
index de1af42..d74c820 100644
--- a/pkg/compiler/lib/src/serialization/keys.dart
+++ b/pkg/compiler/lib/src/serialization/keys.dart
@@ -9,7 +9,9 @@
   static const Key ALIAS = const Key('alias');
   static const Key ARGUMENTS = const Key('arguments');
   static const Key BOUND = const Key('bound');
+  static const Key CACHED_TYPE = const Key('cachedType');
   static const Key CALL_STRUCTURE = const Key('callStructure');
+  static const Key CALL_TYPE = const Key('callType');
   static const Key CANONICAL_URI = const Key('canonicalUri');
   static const Key CLASS = const Key('class');
   static const Key COMPILATION_UNIT = const Key('compilation-unit');
@@ -18,18 +20,25 @@
   static const Key CONSTANT = const Key('constant');
   static const Key CONSTANTS = const Key('constants');
   static const Key CONSTRUCTOR = const Key('constructor');
+  static const Key DATA = const Key('data');
   static const Key DEFAULT = const Key('default');
   static const Key DEFAULTS = const Key('defaults');
+  static const Key DYNAMIC_USES = const Key('dynamic-uses');
   static const Key ELEMENT = const Key('element');
   static const Key ELEMENTS = const Key('elements');
+  static const Key EXECUTABLE_CONTEXT = const Key('executable-context');
   static const Key EXPORTS = const Key('exports');
   static const Key EXPORT_SCOPE = const Key('export-scope');
   static const Key EXPRESSION = const Key('expression');
   static const Key FALSE = const Key('false');
+  static const Key FEATURES = const Key('features');
   static const Key FIELD = const Key('field');
   static const Key FIELDS = const Key('fields');
   static const Key FUNCTION = const Key('function');
+  static const Key GET_OR_SET = const Key('getOrSet');
+  static const Key GETTER = const Key('getter');
   static const Key ID = const Key('id');
+  static const Key IMPACTS = const Key('impacts');
   static const Key IMPORT = const Key('import');
   static const Key IMPORTS = const Key('imports');
   static const Key IMPORT_SCOPE = const Key('import-scope');
@@ -38,11 +47,16 @@
   static const Key IS_ABSTRACT = const Key('isAbstract');
   static const Key IS_CONST = const Key('isConst');
   static const Key IS_DEFERRED = const Key('isDeferred');
+  static const Key IS_EMPTY = const Key('isEmpty');
   static const Key IS_EXTERNAL = const Key('isExternal');
   static const Key IS_FINAL = const Key('isFinal');
   static const Key IS_NAMED = const Key('isNamed');
   static const Key IS_OPERATOR = const Key('isOperator');
   static const Key IS_OPTIONAL = const Key('isOptional');
+  static const Key IS_PROXY = const Key('isProxy');
+  static const Key IS_SETTER = const Key('isSetter');
+  static const Key IS_UNNAMED_MIXIN_APPLICATION =
+      const Key('isUnnamedMixinApplication');
   static const Key KEYS = const Key('keys');
   static const Key KIND = const Key('kind');
   static const Key LEFT = const Key('left');
@@ -50,13 +64,18 @@
   static const Key LIBRARY = const Key('library');
   static const Key LIBRARY_DEPENDENCY = const Key('library-dependency');
   static const Key LIBRARY_NAME = const Key('library-name');
+  static const Key LISTS = const Key('lists');
+  static const Key MAPS = const Key('maps');
   static const Key MEMBERS = const Key('members');
+  static const Key MIXIN = const Key('mixin');
+  static const Key MIXINS = const Key('mixins');
   static const Key NAME = const Key('name');
   static const Key NAMES = const Key('names');
+  static const Key NAMED_ARGUMENTS = const Key('named-arguments');
   static const Key NAMED_PARAMETERS = const Key('named-parameters');
   static const Key NAMED_PARAMETER_TYPES = const Key('named-parameter-types');
+  static const Key NEW_STRUCTURE = const Key('newStructure');
   static const Key OFFSET = const Key('offset');
-  static const Key OFFSETS = const Key('offsets');
   static const Key OPERATOR = const Key('operator');
   static const Key OPTIONAL_PARAMETER_TYPES =
       const Key('optional-parameter-types');
@@ -65,14 +84,22 @@
   static const Key PREFIX = const Key('prefix');
   static const Key RETURN_TYPE = const Key('return-type');
   static const Key RIGHT = const Key('right');
+  static const Key SELECTOR = const Key('selector');
+  static const Key SEMANTICS = const Key('semantics');
+  static const Key SEND_STRUCTURE = const Key('sendStructure');
+  static const Key SETTER = const Key('setter');
+  static const Key STATIC_USES = const Key('static-uses');
+  static const Key SUB_KIND = const Key('subKind');
   static const Key SUPERTYPE = const Key('supertype');
   static const Key SUPERTYPES = const Key('supertypes');
+  static const Key SYMBOLS = const Key('symbols');
   static const Key TAGS = const Key('tags');
   static const Key TRUE = const Key('true');
   static const Key TYPE = const Key('type');
   static const Key TYPES = const Key('types');
   static const Key TYPE_ARGUMENTS = const Key('type-arguments');
   static const Key TYPE_DECLARATION = const Key('type-declaration');
+  static const Key TYPE_USES = const Key('type-uses');
   static const Key TYPE_VARIABLES = const Key('type-variables');
   static const Key URI = const Key('uri');
   static const Key VALUE = const Key('value');
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart
index 23153bf..e06cb03 100644
--- a/pkg/compiler/lib/src/serialization/modelz.dart
+++ b/pkg/compiler/lib/src/serialization/modelz.dart
@@ -10,32 +10,25 @@
 library dart2js.serialization.modelz;
 
 import '../common.dart';
-import '../common/resolution.dart' show
-    Resolution;
+import '../common/resolution.dart' show Resolution;
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
 import '../core_types.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    FunctionSignatureX;
+import '../elements/modelx.dart' show FunctionSignatureX;
 import '../elements/common.dart';
 import '../elements/visitor.dart';
 import '../io/source_file.dart';
 import '../ordered_typeset.dart';
 import '../resolution/class_members.dart' as class_members;
-import '../resolution/tree_elements.dart' show
-    TreeElements;
-import '../resolution/scope.dart' show
-    Scope;
+import '../resolution/tree_elements.dart' show TreeElements;
+import '../resolution/scope.dart' show Scope;
 import '../script.dart';
 import '../serialization/constant_serialization.dart';
-import '../tokens/token.dart' show
-    Token;
+import '../tokens/token.dart' show Token;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link,
-    LinkBuilder;
+import '../util/util.dart' show Link, LinkBuilder;
 
 import 'keys.dart';
 import 'serialization.dart';
@@ -75,14 +68,6 @@
   Scope buildScope() => _unsupported('analyzableElement');
 
   @override
-  CompilationUnitElement get compilationUnit {
-    return _unsupported('compilationUnit');
-  }
-
-  @override
-  ClassElement get contextClass => _unsupported('contextClass');
-
-  @override
   ClassElement get enclosingClass => null;
 
   @override
@@ -91,9 +76,6 @@
   }
 
   @override
-  String get fixedBackendName => _unsupported('fixedBackendName');
-
-  @override
   LibraryElement get implementationLibrary => library;
 
   @override
@@ -270,7 +252,6 @@
   Iterable<Element> get values => _lookupMap.values;
 }
 
-
 abstract class AnalyzableElementMixin implements AnalyzableElement, ElementZ {
   @override
   bool get hasTreeElements => _unsupported('hasTreeElements');
@@ -279,7 +260,6 @@
   TreeElements get treeElements => _unsupported('treeElements');
 }
 
-
 abstract class AstElementMixin implements AstElement, ElementZ {
   @override
   bool get hasNode => _unsupported('hasNode');
@@ -306,8 +286,7 @@
 
   @override
   void forEachLocalMember(f(Element element)) {
-    MapDecoder members =
-        _decoder.getMap(Key.MEMBERS, isOptional: true);
+    MapDecoder members = _decoder.getMap(Key.MEMBERS, isOptional: true);
     if (members == null) return;
     members.forEachKey((String key) {
       Element member = members.getElement(key);
@@ -320,10 +299,21 @@
 
 class AbstractFieldElementZ extends ElementZ implements AbstractFieldElement {
   final String name;
-  final FunctionElement getter;
-  final FunctionElement setter;
+  final GetterElementZ getter;
+  final SetterElementZ setter;
 
-  AbstractFieldElementZ(this.name, this.getter, this.setter);
+  AbstractFieldElementZ(this.name, this.getter, this.setter) {
+    if (getter != null) {
+      getter.abstractField = this;
+      getter.setter = setter;
+    }
+    if (setter != null) {
+      setter.abstractField = this;
+      setter.getter = getter;
+    }
+  }
+
+  FunctionElement get _canonicalElement => getter != null ? getter : setter;
 
   @override
   ElementKind get kind => ElementKind.ABSTRACT_FIELD;
@@ -334,25 +324,25 @@
   }
 
   @override
-  LibraryElement get library {
-    return getter != null ? getter.library : setter.library;
+  LibraryElement get library => _canonicalElement.library;
+
+  @override
+  CompilationUnitElement get compilationUnit {
+    return _canonicalElement.compilationUnit;
   }
 
   @override
-  Element get enclosingElement {
-    return getter != null ? getter.enclosingElement : setter.enclosingElement;
-  }
+  Element get enclosingElement => _canonicalElement.enclosingElement;
 
   @override
-  SourceSpan get sourcePosition {
-    return getter != null ? getter.sourcePosition : setter.sourcePosition;
-  }
+  SourceSpan get sourcePosition => _canonicalElement.sourcePosition;
+
+  @override
+  ClassElement get enclosingClass => _canonicalElement.enclosingClass;
 }
 
 class LibraryElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         ContainerMixin,
-         LibraryElementCommon
+    with AnalyzableElementMixin, ContainerMixin, LibraryElementCommon
     implements LibraryElement {
   Uri _canonicalUri;
   CompilationUnitElement _entryCompilationUnit;
@@ -362,8 +352,7 @@
   ListedContainer _exportsMap;
   ListedContainer _importsMap;
 
-  LibraryElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  LibraryElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   ElementKind get kind => ElementKind.LIBRARY;
@@ -383,6 +372,9 @@
   LibraryElement get library => this;
 
   @override
+  CompilationUnitElement get compilationUnit => entryCompilationUnit;
+
+  @override
   Uri get canonicalUri {
     if (_canonicalUri == null) {
       _canonicalUri = _decoder.getUri(Key.CANONICAL_URI);
@@ -401,8 +393,7 @@
   @override
   Link<CompilationUnitElement> get compilationUnits {
     if (_compilationUnits == null) {
-      _compilationUnits =
-          toLink(_decoder.getElements(Key.COMPILATION_UNITS));
+      _compilationUnits = toLink(_decoder.getElements(Key.COMPILATION_UNITS));
     }
     return _compilationUnits;
   }
@@ -448,7 +439,10 @@
   }
 
   @override
-  Element findExported(String elementName) => _unsupported('findExported');
+  Element findExported(String elementName) {
+    _ensureExports();
+    return _exportsMap.lookup(elementName);
+  }
 
   void _ensureImports() {
     if (_importsMap == null) {
@@ -517,14 +511,12 @@
 }
 
 class CompilationUnitElementZ extends DeserializedElementZ
-    with LibraryMemberMixin,
-         CompilationUnitElementCommon
+    with LibraryMemberMixin, CompilationUnitElementCommon
     implements CompilationUnitElement {
   List<Element> _members;
   Script _script;
 
-  CompilationUnitElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  CompilationUnitElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   ElementKind get kind => ElementKind.COMPILATION_UNIT;
@@ -533,6 +525,9 @@
   CompilationUnitElement get compilationUnit => this;
 
   @override
+  Element get enclosingElement => library;
+
+  @override
   accept(ElementVisitor visitor, arg) {
     return visitor.visitCompilationUnitElement(this, arg);
   }
@@ -540,8 +535,7 @@
   @override
   void forEachLocalMember(f(Element element)) {
     if (_members == null) {
-      _members =
-          _decoder.getElements(Key.ELEMENTS, isOptional: true);
+      _members = _decoder.getElements(Key.ELEMENTS, isOptional: true);
     }
     _members.forEach(f);
   }
@@ -559,7 +553,6 @@
   String get name => script.name;
 }
 
-
 abstract class LibraryMemberMixin implements DeserializedElementZ {
   LibraryElement _library;
   CompilationUnitElement _compilationUnit;
@@ -636,8 +629,7 @@
   bool get isStatic => true;
 }
 
-abstract class TypedElementMixin
-    implements DeserializedElementZ, TypedElement {
+abstract class TypedElementMixin implements DeserializedElementZ, TypedElement {
   DartType _type;
 
   @override
@@ -692,7 +684,7 @@
       }
       if (optionalParametersAreNamed) {
         orderedOptionalParameters.sort((Element a, Element b) {
-            return a.name.compareTo(b.name);
+          return a.name.compareTo(b.name);
         });
       }
 
@@ -726,32 +718,19 @@
 abstract class FunctionTypedElementMixin
     implements FunctionElement, DeserializedElementZ {
   @override
-  AsyncMarker get asyncMarker => _unsupported('');
-
-  @override
-  bool get isExternal => _unsupported('');
+  AsyncMarker get asyncMarker => _unsupported('asyncMarker');
 
   @override
   FunctionElement asFunctionElement() => this;
+
+  @override
+  bool get isExternal {
+    return _decoder.getBool(Key.IS_EXTERNAL,
+        isOptional: true, defaultValue: false);
+  }
 }
 
-class ClassElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         ClassElementCommon,
-         class_members.ClassMemberMixin,
-         ContainerMixin,
-         LibraryMemberMixin,
-         TypeDeclarationMixin<InterfaceType>
-    implements ClassElement {
-  bool _isObject;
-  DartType _supertype;
-  OrderedTypeSet _allSupertypesAndSelf;
-  Link<DartType> _interfaces;
-
-  ClassElementZ(ObjectDecoder decoder)
-      : super(decoder);
-
+abstract class ClassElementMixin implements ElementZ, ClassElement {
   InterfaceType _createType(List<DartType> typeArguments) {
     return new InterfaceType(this, typeArguments);
   }
@@ -760,62 +739,9 @@
   ElementKind get kind => ElementKind.CLASS;
 
   @override
-  accept(ElementVisitor visitor, arg) {
-    return visitor.visitClassElement(this, arg);
-  }
-
-  @override
-  DartType get supertype {
-    if (_isObject == null) {
-      _supertype = _decoder.getType(Key.SUPERTYPE, isOptional: true);
-      _isObject = _supertype == null;
-    }
-    return _supertype;
-  }
-
-  @override
-  bool get isAbstract => _decoder.getBool(Key.IS_ABSTRACT);
-
-  @override
-  bool get isObject {
-    return supertype == null;
-  }
-
-  @override
   void addBackendMember(Element element) => _unsupported('addBackendMember');
 
   @override
-  OrderedTypeSet get allSupertypesAndSelf {
-    if (_allSupertypesAndSelf == null) {
-      ObjectDecoder supertypesDeserializer =
-          _decoder.getObject(Key.SUPERTYPES);
-      List<int> offsets = supertypesDeserializer.getInts(Key.OFFSETS);
-      List<Link<DartType>> levels = new List<Link<DartType>>(offsets.length);
-      LinkBuilder<DartType> typesBuilder = new LinkBuilder<DartType>();
-      int offset = 0;
-      int depth = offsets.length - 1;
-      for (DartType type in supertypesDeserializer.getTypes(Key.TYPES)) {
-        Link<DartType> link = typesBuilder.addLast(type);
-        if (offsets[depth] == offset) {
-          levels[depth] = link;
-          depth--;
-        }
-        offset++;
-      }
-      LinkBuilder<DartType> supertypesBuilder = new LinkBuilder<DartType>();
-      for (DartType supertype in
-          supertypesDeserializer.getTypes(Key.SUPERTYPES, isOptional: true)) {
-        supertypesBuilder.addLast(supertype);
-      }
-      Link<DartType> types = typesBuilder.toLink();
-      Link<DartType> supertypes = supertypesBuilder.toLink();
-      _allSupertypesAndSelf = new OrderedTypeSet.internal(
-          levels, types, supertypes);
-    }
-    return _allSupertypesAndSelf;
-  }
-
-  @override
   void forEachBackendMember(void f(Element member)) {
     _unsupported('forEachBackendMember');
   }
@@ -836,31 +762,9 @@
   bool get hasLocalScopeMembers => _unsupported('hasLocalScopeMembers');
 
   @override
-  bool implementsFunction(CoreClasses coreClasses) {
-    return _unsupported('implementsFunction');
-  }
-
-  @override
-  Link<DartType> get interfaces {
-    if (_interfaces == null) {
-      _interfaces = toLink(
-          _decoder.getTypes(Key.INTERFACES, isOptional: true));
-    }
-    return _interfaces;
-  }
-
-  @override
   bool get isEnumClass => false;
 
   @override
-  bool get isProxy => _unsupported('isProxy');
-
-  @override
-  bool get isUnnamedMixinApplication {
-    return _unsupported('isUnnamedMixinApplication');
-  }
-
-  @override
   Element lookupBackendMember(String memberName) {
     return _unsupported('lookupBackendMember');
   }
@@ -886,19 +790,255 @@
   }
 }
 
+class ClassElementZ extends DeserializedElementZ
+    with
+        AnalyzableElementMixin,
+        AstElementMixin,
+        ClassElementCommon,
+        class_members.ClassMemberMixin,
+        ContainerMixin,
+        LibraryMemberMixin,
+        TypeDeclarationMixin<InterfaceType>,
+        ClassElementMixin
+    implements ClassElement {
+  bool _isObject;
+  DartType _supertype;
+  OrderedTypeSet _allSupertypesAndSelf;
+  Link<DartType> _interfaces;
+  FunctionType _callType;
+
+  ClassElementZ(ObjectDecoder decoder) : super(decoder);
+
+  @override
+  List<DartType> _getTypeVariables() {
+    return _decoder.getTypes(Key.TYPE_VARIABLES, isOptional: true);
+  }
+
+  void _ensureSuperHierarchy() {
+    if (_interfaces == null) {
+      InterfaceType supertype =
+          _decoder.getType(Key.SUPERTYPE, isOptional: true);
+      if (supertype == null) {
+        _isObject = true;
+        _allSupertypesAndSelf = new OrderedTypeSet.singleton(thisType);
+        _interfaces = const Link<DartType>();
+      } else {
+        _isObject = false;
+        _interfaces =
+            toLink(_decoder.getTypes(Key.INTERFACES, isOptional: true));
+        List<InterfaceType> mixins =
+            _decoder.getTypes(Key.MIXINS, isOptional: true);
+        for (InterfaceType mixin in mixins) {
+          MixinApplicationElement mixinElement =
+              new UnnamedMixinApplicationElementZ(this, supertype, mixin);
+          supertype = mixinElement.thisType
+              .subst(typeVariables, mixinElement.typeVariables);
+        }
+        _supertype = supertype;
+        _allSupertypesAndSelf = new OrderedTypeSetBuilder(this)
+            .createOrderedTypeSet(_supertype, _interfaces);
+        _callType = _decoder.getType(Key.CALL_TYPE, isOptional: true);
+      }
+    }
+  }
+
+  @override
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitClassElement(this, arg);
+  }
+
+  @override
+  DartType get supertype {
+    _ensureSuperHierarchy();
+    return _supertype;
+  }
+
+  @override
+  bool get isAbstract => _decoder.getBool(Key.IS_ABSTRACT);
+
+  @override
+  bool get isObject {
+    _ensureSuperHierarchy();
+    return _isObject;
+  }
+
+  @override
+  OrderedTypeSet get allSupertypesAndSelf {
+    _ensureSuperHierarchy();
+    return _allSupertypesAndSelf;
+  }
+
+  @override
+  Link<DartType> get interfaces {
+    _ensureSuperHierarchy();
+    return _interfaces;
+  }
+
+  @override
+  bool get isProxy => _decoder.getBool(Key.IS_PROXY);
+
+  @override
+  bool get isUnnamedMixinApplication => false;
+
+  @override
+  FunctionType get callType {
+    _ensureSuperHierarchy();
+    return _callType;
+  }
+}
+
+abstract class MixinApplicationElementMixin
+    implements ElementZ, MixinApplicationElement {
+  Link<ConstructorElement> _constructors;
+
+  @override
+  bool get isMixinApplication => false;
+
+  @override
+  ClassElement get mixin => mixinType.element;
+
+  Link<ConstructorElement> get constructors {
+    if (_constructors == null) {
+      LinkBuilder<ConstructorElement> builder =
+          new LinkBuilder<ConstructorElement>();
+      for (ConstructorElement definingConstructor in superclass.constructors) {
+        if (definingConstructor.isGenerativeConstructor &&
+            definingConstructor.memberName.isAccessibleFrom(library)) {
+          builder.addLast(
+              new ForwardingConstructorElementZ(this, definingConstructor));
+        }
+      }
+      _constructors = builder.toLink();
+    }
+    return _constructors;
+  }
+}
+
+class NamedMixinApplicationElementZ extends ClassElementZ
+    with MixinApplicationElementCommon, MixinApplicationElementMixin {
+  InterfaceType _mixinType;
+
+  NamedMixinApplicationElementZ(ObjectDecoder decoder) : super(decoder);
+
+  @override
+  InterfaceType get mixinType => _mixinType ??= _decoder.getType(Key.MIXIN);
+}
+
+class UnnamedMixinApplicationElementZ extends ElementZ
+    with
+        ClassElementCommon,
+        ClassElementMixin,
+        class_members.ClassMemberMixin,
+        TypeDeclarationMixin<InterfaceType>,
+        AnalyzableElementMixin,
+        AstElementMixin,
+        MixinApplicationElementCommon,
+        MixinApplicationElementMixin {
+  final String name;
+  final ClassElement _subclass;
+  final InterfaceType supertype;
+  final Link<DartType> interfaces;
+  OrderedTypeSet _allSupertypesAndSelf;
+
+  UnnamedMixinApplicationElementZ(
+      ClassElement subclass, InterfaceType supertype, InterfaceType mixin)
+      : this._subclass = subclass,
+        this.supertype = supertype,
+        this.interfaces = const Link<DartType>().prepend(mixin),
+        this.name = "${supertype.name}+${mixin.name}";
+
+  @override
+  CompilationUnitElement get compilationUnit => _subclass.compilationUnit;
+
+  @override
+  bool get isUnnamedMixinApplication => true;
+
+  @override
+  List<DartType> _getTypeVariables() {
+    // Create synthetic type variables for the mixin application.
+    List<DartType> typeVariables = <DartType>[];
+    int index = 0;
+    for (TypeVariableType type in _subclass.typeVariables) {
+      SyntheticTypeVariableElementZ typeVariableElement =
+          new SyntheticTypeVariableElementZ(this, index, type.name);
+      TypeVariableType typeVariable = new TypeVariableType(typeVariableElement);
+      typeVariables.add(typeVariable);
+      index++;
+    }
+    // Setup bounds on the synthetic type variables.
+    for (TypeVariableType type in _subclass.typeVariables) {
+      TypeVariableType typeVariable = typeVariables[type.element.index];
+      SyntheticTypeVariableElementZ typeVariableElement = typeVariable.element;
+      typeVariableElement._type = typeVariable;
+      typeVariableElement._bound =
+          type.element.bound.subst(typeVariables, _subclass.typeVariables);
+    }
+    return typeVariables;
+  }
+
+  @override
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitMixinApplicationElement(this, arg);
+  }
+
+  @override
+  OrderedTypeSet get allSupertypesAndSelf {
+    if (_allSupertypesAndSelf == null) {
+      _allSupertypesAndSelf = new OrderedTypeSetBuilder(this)
+          .createOrderedTypeSet(supertype, interfaces);
+    }
+    return _allSupertypesAndSelf;
+  }
+
+  @override
+  Element get enclosingElement => _subclass.enclosingElement;
+
+  @override
+  bool get isObject => false;
+
+  @override
+  bool get isProxy => false;
+
+  @override
+  LibraryElement get library => enclosingElement.library;
+
+  @override
+  InterfaceType get mixinType => interfaces.head;
+
+  @override
+  SourceSpan get sourcePosition => _subclass.sourcePosition;
+}
+
+class EnumClassElementZ extends ClassElementZ implements EnumClassElement {
+  List<FieldElement> _enumValues;
+
+  EnumClassElementZ(ObjectDecoder decoder) : super(decoder);
+
+  @override
+  bool get isEnumClass => true;
+
+  @override
+  List<FieldElement> get enumValues {
+    if (_enumValues == null) {
+      _enumValues = _decoder.getElements(Key.FIELDS);
+    }
+    return _enumValues;
+  }
+}
+
 abstract class ConstructorElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         ClassMemberMixin,
-         FunctionTypedElementMixin,
-         ParametersMixin,
-         TypedElementMixin,
-         MemberElementMixin
+    with
+        AnalyzableElementMixin,
+        AstElementMixin,
+        ClassMemberMixin,
+        FunctionTypedElementMixin,
+        ParametersMixin,
+        TypedElementMixin,
+        MemberElementMixin
     implements ConstructorElement {
   ConstantConstructor _constantConstructor;
 
-  ConstructorElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  ConstructorElementZ(ObjectDecoder decoder) : super(decoder);
 
   accept(ElementVisitor visitor, arg) {
     return visitor.visitConstructorElement(this, arg);
@@ -912,8 +1052,8 @@
 
   bool get isFromEnvironmentConstructor {
     return name == 'fromEnvironment' &&
-           library.isDartCore &&
-           (enclosingClass.name == 'bool' ||
+        library.isDartCore &&
+        (enclosingClass.name == 'bool' ||
             enclosingClass.name == 'int' ||
             enclosingClass.name == 'String');
   }
@@ -940,21 +1080,26 @@
   }
 
   @override
-  ConstructorElement get definingConstructor  {
+  ConstructorElement get definingConstructor {
     return _unsupported('definingConstructor');
   }
 
   @override
-  ConstructorElement get effectiveTarget  {
+  ConstructorElement get effectiveTarget {
     return _unsupported('effectiveTarget');
   }
 
   @override
-  ConstructorElement get immediateRedirectionTarget  {
+  ConstructorElement get immediateRedirectionTarget {
     return _unsupported('immediateRedirectionTarget');
   }
 
   @override
+  bool get isEffectiveTargetMalformed {
+    return _unsupported('isEffectiveTargetMalformed');
+  }
+
+  @override
   bool get isRedirectingFactory => _unsupported('isRedirectingFactory');
 
   @override
@@ -964,31 +1109,145 @@
   bool get isCyclicRedirection => _unsupported('isCyclicRedirection');
 
   @override
-  PrefixElement get redirectionDeferredPrefix  {
+  PrefixElement get redirectionDeferredPrefix {
     return _unsupported('redirectionDeferredPrefix');
   }
 }
 
 class GenerativeConstructorElementZ extends ConstructorElementZ {
-  GenerativeConstructorElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  GenerativeConstructorElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   ElementKind get kind => ElementKind.GENERATIVE_CONSTRUCTOR;
+
+  @override
+  bool get isEffectiveTargetMalformed =>
+      _unsupported('isEffectiveTargetMalformed');
 }
 
 class FactoryConstructorElementZ extends ConstructorElementZ {
-
-  FactoryConstructorElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  FactoryConstructorElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   ElementKind get kind => ElementKind.FACTORY_CONSTRUCTOR;
+
+  @override
+  bool get isEffectiveTargetMalformed =>
+      _unsupported('isEffectiveTargetMalformed');
+}
+
+class ForwardingConstructorElementZ extends ElementZ
+    with AnalyzableElementMixin, AstElementMixin
+    implements ConstructorElement {
+  final MixinApplicationElement enclosingClass;
+  final ConstructorElement definingConstructor;
+
+  ForwardingConstructorElementZ(this.enclosingClass, this.definingConstructor);
+
+  @override
+  CompilationUnitElement get compilationUnit => enclosingClass.compilationUnit;
+
+  @override
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitConstructorElement(this, arg);
+  }
+
+  @override
+  AsyncMarker get asyncMarker => AsyncMarker.SYNC;
+
+  @override
+  InterfaceType computeEffectiveTargetType(InterfaceType newType) {
+    return enclosingClass.thisType;
+  }
+
+  @override
+  DartType computeType(Resolution resolution) => type;
+
+  @override
+  bool get isConst => false;
+
+  @override
+  ConstantConstructor get constantConstructor => null;
+
+  @override
+  ConstructorElement get effectiveTarget => this;
+
+  @override
+  Element get enclosingElement => enclosingClass;
+
+  @override
+  FunctionSignature get functionSignature {
+    return _unsupported('functionSignature');
+  }
+
+  @override
+  bool get hasFunctionSignature {
+    return _unsupported('hasFunctionSignature');
+  }
+
+  @override
+  ConstructorElement get immediateRedirectionTarget => null;
+
+  @override
+  bool get isCyclicRedirection => false;
+
+  @override
+  bool get isEffectiveTargetMalformed => false;
+
+  @override
+  bool get isExternal => false;
+
+  @override
+  bool get isFromEnvironmentConstructor => false;
+
+  @override
+  bool get isRedirectingFactory => false;
+
+  @override
+  bool get isRedirectingGenerative => false;
+
+  @override
+  ElementKind get kind => ElementKind.GENERATIVE_CONSTRUCTOR;
+
+  @override
+  LibraryElement get library => enclosingClass.library;
+
+  @override
+  MemberElement get memberContext => this;
+
+  @override
+  Name get memberName => definingConstructor.memberName;
+
+  @override
+  String get name => definingConstructor.name;
+
+  @override
+  List<FunctionElement> get nestedClosures => const <FunctionElement>[];
+
+  @override
+  List<ParameterElement> get parameters {
+    // TODO(johnniwinther): We need to create synthetic parameters that
+    // substitute type variables.
+    return definingConstructor.parameters;
+  }
+
+  // TODO: implement redirectionDeferredPrefix
+  @override
+  PrefixElement get redirectionDeferredPrefix => null;
+
+  @override
+  SourceSpan get sourcePosition => enclosingClass.sourcePosition;
+
+  @override
+  FunctionType get type {
+    // TODO(johnniwinther): Ensure that the function type substitutes type
+    // variables correctly.
+    return definingConstructor.type;
+  }
 }
 
 abstract class MemberElementMixin
     implements DeserializedElementZ, MemberElement {
-
   @override
   MemberElement get memberContext => this;
 
@@ -997,19 +1256,18 @@
 
   @override
   List<FunctionElement> get nestedClosures => const <FunctionElement>[];
-
 }
 
 abstract class FieldElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         TypedElementMixin,
-         MemberElementMixin
+    with
+        AnalyzableElementMixin,
+        AstElementMixin,
+        TypedElementMixin,
+        MemberElementMixin
     implements FieldElement {
   ConstantExpression _constant;
 
-  FieldElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  FieldElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   ElementKind get kind => ElementKind.FIELD;
@@ -1037,41 +1295,44 @@
   Expression get initializer => _unsupported('initializer');
 }
 
-
 class TopLevelFieldElementZ extends FieldElementZ with LibraryMemberMixin {
-  TopLevelFieldElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  TopLevelFieldElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 class StaticFieldElementZ extends FieldElementZ
     with ClassMemberMixin, StaticMemberMixin {
-  StaticFieldElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  StaticFieldElementZ(ObjectDecoder decoder) : super(decoder);
+}
+
+class EnumConstantElementZ extends StaticFieldElementZ
+    implements EnumConstantElement {
+  EnumConstantElementZ(ObjectDecoder decoder) : super(decoder);
+
+  int get index => _decoder.getInt(Key.INDEX);
 }
 
 class InstanceFieldElementZ extends FieldElementZ
     with ClassMemberMixin, InstanceMemberMixin {
-  InstanceFieldElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  InstanceFieldElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 abstract class FunctionElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         ParametersMixin,
-         FunctionTypedElementMixin,
-         TypedElementMixin,
-         MemberElementMixin
+    with
+        AnalyzableElementMixin,
+        AstElementMixin,
+        ParametersMixin,
+        FunctionTypedElementMixin,
+        TypedElementMixin,
+        MemberElementMixin
     implements MethodElement {
-  FunctionElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  FunctionElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   ElementKind get kind => ElementKind.FUNCTION;
 
   @override
   accept(ElementVisitor visitor, arg) {
-    return visitor.visitFunctionElement(this, arg);
+    return visitor.visitMethodElement(this, arg);
   }
 
   @override
@@ -1080,100 +1341,150 @@
 
 class TopLevelFunctionElementZ extends FunctionElementZ
     with LibraryMemberMixin {
-  TopLevelFunctionElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  TopLevelFunctionElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 class StaticFunctionElementZ extends FunctionElementZ
     with ClassMemberMixin, StaticMemberMixin {
-  StaticFunctionElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  StaticFunctionElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 class InstanceFunctionElementZ extends FunctionElementZ
     with ClassMemberMixin, InstanceMemberMixin {
-  InstanceFunctionElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  InstanceFunctionElementZ(ObjectDecoder decoder) : super(decoder);
+}
+
+abstract class LocalExecutableMixin
+    implements DeserializedElementZ, ExecutableElement, LocalElement {
+  ExecutableElement _executableContext;
+
+  @override
+  Element get enclosingElement => executableContext;
+
+  @override
+  ExecutableElement get executableContext {
+    if (_executableContext == null) {
+      _executableContext = _decoder.getElement(Key.EXECUTABLE_CONTEXT);
+    }
+    return _executableContext;
+  }
+
+  @override
+  MemberElement get memberContext => executableContext.memberContext;
+
+  @override
+  bool get isLocal => true;
+
+  @override
+  LibraryElement get library => memberContext.library;
+
+  @override
+  CompilationUnitElement get compilationUnit {
+    return memberContext.compilationUnit;
+  }
+
+  @override
+  bool get hasTreeElements => memberContext.hasTreeElements;
+
+  @override
+  TreeElements get treeElements => memberContext.treeElements;
+}
+
+class LocalFunctionElementZ extends DeserializedElementZ
+    with
+        LocalExecutableMixin,
+        AstElementMixin,
+        ParametersMixin,
+        FunctionTypedElementMixin,
+        TypedElementMixin
+    implements LocalFunctionElement {
+  LocalFunctionElementZ(ObjectDecoder decoder) : super(decoder);
+
+  @override
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitLocalFunctionElement(this, arg);
+  }
+
+  @override
+  ElementKind get kind => ElementKind.FUNCTION;
 }
 
 abstract class GetterElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         FunctionTypedElementMixin,
-         ParametersMixin,
-         TypedElementMixin,
-         MemberElementMixin
-    implements FunctionElement {
+    with
+        AnalyzableElementMixin,
+        AstElementMixin,
+        FunctionTypedElementMixin,
+        ParametersMixin,
+        TypedElementMixin,
+        MemberElementMixin
+    implements GetterElement {
+  AbstractFieldElement abstractField;
+  SetterElement setter;
 
-  GetterElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  GetterElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   ElementKind get kind => ElementKind.GETTER;
 
   @override
   accept(ElementVisitor visitor, arg) {
-    return visitor.visitFunctionElement(this, arg);
+    return visitor.visitGetterElement(this, arg);
   }
 }
 
 class TopLevelGetterElementZ extends GetterElementZ with LibraryMemberMixin {
-  TopLevelGetterElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  TopLevelGetterElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 class StaticGetterElementZ extends GetterElementZ
     with ClassMemberMixin, StaticMemberMixin {
-  StaticGetterElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  StaticGetterElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 class InstanceGetterElementZ extends GetterElementZ
     with ClassMemberMixin, InstanceMemberMixin {
-  InstanceGetterElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  InstanceGetterElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 abstract class SetterElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         FunctionTypedElementMixin,
-         ParametersMixin,
-         TypedElementMixin,
-         MemberElementMixin
-    implements FunctionElement {
+    with
+        AnalyzableElementMixin,
+        AstElementMixin,
+        FunctionTypedElementMixin,
+        ParametersMixin,
+        TypedElementMixin,
+        MemberElementMixin
+    implements SetterElement {
+  AbstractFieldElement abstractField;
+  GetterElement getter;
 
-  SetterElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  SetterElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   ElementKind get kind => ElementKind.SETTER;
 
   @override
   accept(ElementVisitor visitor, arg) {
-    return visitor.visitFunctionElement(this, arg);
+    return visitor.visitSetterElement(this, arg);
   }
 }
 
 class TopLevelSetterElementZ extends SetterElementZ with LibraryMemberMixin {
-  TopLevelSetterElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  TopLevelSetterElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 class StaticSetterElementZ extends SetterElementZ
     with ClassMemberMixin, StaticMemberMixin {
-  StaticSetterElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  StaticSetterElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 class InstanceSetterElementZ extends SetterElementZ
     with ClassMemberMixin, InstanceMemberMixin {
-  InstanceSetterElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  InstanceSetterElementZ(ObjectDecoder decoder) : super(decoder);
 }
 
 abstract class TypeDeclarationMixin<T extends GenericType>
-    implements DeserializedElementZ, TypeDeclarationElement {
+    implements ElementZ, TypeDeclarationElement {
   List<DartType> _typeVariables;
   T _rawType;
   T _thisType;
@@ -1186,10 +1497,11 @@
     return _memberName;
   }
 
+  List<DartType> _getTypeVariables();
+
   void _ensureTypes() {
     if (_typeVariables == null) {
-      _typeVariables = _decoder.getTypes(
-          Key.TYPE_VARIABLES, isOptional: true);
+      _typeVariables = _getTypeVariables();
       _rawType = _createType(new List<DartType>.filled(
           _typeVariables.length, const DynamicType()));
       _thisType = _createType(_typeVariables);
@@ -1224,22 +1536,27 @@
 }
 
 class TypedefElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         LibraryMemberMixin,
-         ParametersMixin,
-         TypeDeclarationMixin<TypedefType>
+    with
+        AnalyzableElementMixin,
+        AstElementMixin,
+        LibraryMemberMixin,
+        ParametersMixin,
+        TypeDeclarationMixin<TypedefType>
     implements TypedefElement {
   DartType _alias;
 
-  TypedefElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  TypedefElementZ(ObjectDecoder decoder) : super(decoder);
 
   TypedefType _createType(List<DartType> typeArguments) {
     return new TypedefType(this, typeArguments);
   }
 
   @override
+  List<DartType> _getTypeVariables() {
+    return _decoder.getTypes(Key.TYPE_VARIABLES, isOptional: true);
+  }
+
+  @override
   ElementKind get kind => ElementKind.TYPEDEF;
 
   @override
@@ -1263,17 +1580,14 @@
 }
 
 class TypeVariableElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         TypedElementMixin
+    with AnalyzableElementMixin, AstElementMixin, TypedElementMixin
     implements TypeVariableElement {
   TypeDeclarationElement _typeDeclaration;
   TypeVariableType _type;
   DartType _bound;
   Name _memberName;
 
-  TypeVariableElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  TypeVariableElementZ(ObjectDecoder decoder) : super(decoder);
 
   Name get memberName {
     if (_memberName == null) {
@@ -1307,8 +1621,7 @@
   @override
   TypeDeclarationElement get typeDeclaration {
     if (_typeDeclaration == null) {
-      _typeDeclaration =
-          _decoder.getElement(Key.TYPE_DECLARATION);
+      _typeDeclaration = _decoder.getElement(Key.TYPE_DECLARATION);
     }
     return _typeDeclaration;
   }
@@ -1324,10 +1637,69 @@
   LibraryElement get library => typeDeclaration.library;
 }
 
+class SyntheticTypeVariableElementZ extends ElementZ
+    with AnalyzableElementMixin, AstElementMixin
+    implements TypeVariableElement {
+  final TypeDeclarationElement typeDeclaration;
+  final int index;
+  final String name;
+  TypeVariableType _type;
+  DartType _bound;
+  Name _memberName;
+
+  SyntheticTypeVariableElementZ(this.typeDeclaration, this.index, this.name);
+
+  Name get memberName {
+    if (_memberName == null) {
+      _memberName = new Name(name, library);
+    }
+    return _memberName;
+  }
+
+  @override
+  ElementKind get kind => ElementKind.TYPE_VARIABLE;
+
+  @override
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitTypeVariableElement(this, arg);
+  }
+
+  @override
+  CompilationUnitElement get compilationUnit {
+    return typeDeclaration.compilationUnit;
+  }
+
+  @override
+  TypeVariableType get type {
+    assert(invariant(this, _type != null,
+        message: "Type variable type has not been set on $this."));
+    return _type;
+  }
+
+  @override
+  TypeVariableType computeType(Resolution resolution) => type;
+
+  @override
+  Element get enclosingElement => typeDeclaration;
+
+  @override
+  Element get enclosingClass => typeDeclaration;
+
+  DartType get bound {
+    assert(invariant(this, _bound != null,
+        message: "Type variable bound has not been set on $this."));
+    return _bound;
+  }
+
+  @override
+  LibraryElement get library => typeDeclaration.library;
+
+  @override
+  SourceSpan get sourcePosition => typeDeclaration.sourcePosition;
+}
+
 class ParameterElementZ extends DeserializedElementZ
-    with AnalyzableElementMixin,
-         AstElementMixin,
-         TypedElementMixin
+    with AnalyzableElementMixin, AstElementMixin, TypedElementMixin
     implements ParameterElement {
   FunctionElement _functionDeclaration;
   ConstantExpression _constant;
@@ -1396,8 +1768,7 @@
     implements InitializingFormalElement {
   FieldElement _fieldElement;
 
-  InitializingFormalElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  InitializingFormalElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   FieldElement get fieldElement {
@@ -1416,15 +1787,56 @@
   ElementKind get kind => ElementKind.INITIALIZING_FORMAL;
 }
 
+class LocalVariableElementZ extends DeserializedElementZ
+    with
+        AnalyzableElementMixin,
+        AstElementMixin,
+        LocalExecutableMixin,
+        TypedElementMixin
+    implements LocalVariableElement {
+  bool _isConst;
+  ConstantExpression _constant;
+
+  LocalVariableElementZ(ObjectDecoder decoder) : super(decoder);
+
+  @override
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitLocalVariableElement(this, arg);
+  }
+
+  @override
+  ElementKind get kind => ElementKind.VARIABLE;
+
+  @override
+  bool get isConst {
+    if (_isConst == null) {
+      _constant = _decoder.getConstant(Key.CONSTANT);
+      _isConst = _constant != null;
+    }
+    return _isConst;
+  }
+
+  @override
+  ConstantExpression get constant {
+    if (isConst) {
+      return _constant;
+    }
+    return null;
+  }
+
+  @override
+  Expression get initializer => _unsupported('initializer');
+}
+
 class ImportElementZ extends DeserializedElementZ
-    with LibraryMemberMixin implements ImportElement {
+    with LibraryMemberMixin
+    implements ImportElement {
   bool _isDeferred;
   PrefixElement _prefix;
   LibraryElement _importedLibrary;
   Uri _uri;
 
-  ImportElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  ImportElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   String get name => '';
@@ -1477,12 +1889,12 @@
 }
 
 class ExportElementZ extends DeserializedElementZ
-    with LibraryMemberMixin implements ExportElement {
+    with LibraryMemberMixin
+    implements ExportElement {
   LibraryElement _exportedLibrary;
   Uri _uri;
 
-  ExportElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  ExportElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   String get name => '';
@@ -1516,12 +1928,12 @@
 }
 
 class PrefixElementZ extends DeserializedElementZ
-    with LibraryMemberMixin implements PrefixElement {
+    with LibraryMemberMixin
+    implements PrefixElement {
   bool _isDeferred;
   ImportElement _deferredImport;
 
-  PrefixElementZ(ObjectDecoder decoder)
-      : super(decoder);
+  PrefixElementZ(ObjectDecoder decoder) : super(decoder);
 
   @override
   accept(ElementVisitor visitor, arg) => visitor.visitPrefixElement(this, arg);
diff --git a/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart b/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
new file mode 100644
index 0000000..d25426e
--- /dev/null
+++ b/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
@@ -0,0 +1,422 @@
+// 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 dart2js.serialization.resolved_ast;
+
+import '../common.dart';
+import '../common/resolution.dart';
+import '../constants/expressions.dart';
+import '../dart_types.dart';
+import '../diagnostics/diagnostic_listener.dart';
+import '../elements/elements.dart';
+import '../parser/parser.dart' show Parser;
+import '../parser/listener.dart' show ParserError;
+import '../parser/node_listener.dart' show NodeListener;
+import '../resolution/enum_creator.dart';
+import '../resolution/send_structure.dart';
+import '../resolution/tree_elements.dart';
+import '../tree/tree.dart';
+import '../tokens/token.dart';
+import '../universe/selector.dart';
+import 'keys.dart';
+import 'serialization.dart';
+import 'serialization_util.dart';
+
+/// Visitor that computes a node-index mapping.
+class AstIndexComputer extends Visitor {
+  final Map<Node, int> nodeIndices = <Node, int>{};
+  final List<Node> nodeList = <Node>[];
+
+  @override
+  visitNode(Node node) {
+    nodeIndices.putIfAbsent(node, () {
+      // Some nodes (like Modifier and empty NodeList) can be reused.
+      nodeList.add(node);
+      return nodeIndices.length;
+    });
+    node.visitChildren(this);
+  }
+}
+
+/// The kind of AST node. Used for determining how to deserialize
+/// [ResolvedAst]s.
+enum AstKind {
+  ENUM_CONSTRUCTOR,
+  ENUM_CONSTANT,
+  ENUM_INDEX_FIELD,
+  ENUM_VALUES_FIELD,
+  ENUM_TO_STRING,
+  FACTORY,
+  FIELD,
+  FUNCTION,
+}
+
+/// Serializer for [ResolvedAst]s.
+class ResolvedAstSerializer extends Visitor {
+  final ObjectEncoder objectEncoder;
+  final ResolvedAst resolvedAst;
+  final AstIndexComputer indexComputer = new AstIndexComputer();
+  final Map<int, ObjectEncoder> nodeData = <int, ObjectEncoder>{};
+  ListEncoder _nodeDataEncoder;
+
+  ResolvedAstSerializer(this.objectEncoder, this.resolvedAst);
+
+  AstElement get element => resolvedAst.element;
+
+  TreeElements get elements => resolvedAst.elements;
+
+  Node get root => resolvedAst.node;
+
+  Map<Node, int> get nodeIndices => indexComputer.nodeIndices;
+  List<Node> get nodeList => indexComputer.nodeList;
+
+  /// Serializes [resolvedAst] into [objectEncoder].
+  void serialize() {
+    objectEncoder.setUri(
+        Key.URI,
+        elements.analyzedElement.compilationUnit.script.resourceUri,
+        elements.analyzedElement.compilationUnit.script.resourceUri);
+    AstKind kind;
+    if (element.enclosingClass is EnumClassElement) {
+      if (element.name == 'index') {
+        kind = AstKind.ENUM_INDEX_FIELD;
+      } else if (element.name == 'values') {
+        kind = AstKind.ENUM_VALUES_FIELD;
+      } else if (element.name == 'toString') {
+        kind = AstKind.ENUM_TO_STRING;
+      } else if (element.isConstructor) {
+        kind = AstKind.ENUM_CONSTRUCTOR;
+      } else {
+        assert(invariant(element, element.isConst,
+            message: "Unexpected enum member: $element"));
+        kind = AstKind.ENUM_CONSTANT;
+      }
+    } else {
+      // [element] has a body that we'll need to re-parse. We store where to
+      // start parsing from.
+      objectEncoder.setInt(Key.OFFSET, root.getBeginToken().charOffset);
+      if (element.isFactoryConstructor) {
+        kind = AstKind.FACTORY;
+      } else if (element.isField) {
+        kind = AstKind.FIELD;
+      } else {
+        kind = AstKind.FUNCTION;
+        FunctionExpression functionExpression = root.asFunctionExpression();
+        if (functionExpression.getOrSet != null) {
+          // Getters/setters need the get/set token to be parsed.
+          objectEncoder.setInt(
+              Key.GET_OR_SET, functionExpression.getOrSet.charOffset);
+        }
+      }
+    }
+    objectEncoder.setEnum(Key.KIND, kind);
+    root.accept(indexComputer);
+    root.accept(this);
+  }
+
+  /// Computes the [ListEncoder] for serializing data for nodes.
+  ListEncoder get nodeDataEncoder {
+    if (_nodeDataEncoder == null) {
+      _nodeDataEncoder = objectEncoder.createList(Key.DATA);
+    }
+    return _nodeDataEncoder;
+  }
+
+  /// Computes the [ObjectEncoder] for serializing data for [node].
+  ObjectEncoder getNodeDataEncoder(Node node) {
+    int id = nodeIndices[node];
+    return nodeData.putIfAbsent(id, () {
+      ObjectEncoder objectEncoder = nodeDataEncoder.createObject();
+      objectEncoder.setInt(Key.ID, id);
+      return objectEncoder;
+    });
+  }
+
+  @override
+  visitNode(Node node) {
+    Element nodeElement = elements[node];
+    if (nodeElement != null) {
+      if (nodeElement.enclosingClass != null &&
+          nodeElement.enclosingClass.isUnnamedMixinApplication) {
+        // TODO(johnniwinther): Handle references to members of unnamed mixin
+        // applications.
+      } else {
+        getNodeDataEncoder(node).setElement(Key.ELEMENT, nodeElement);
+      }
+    }
+    DartType type = elements.getType(node);
+    if (type != null) {
+      getNodeDataEncoder(node).setType(Key.TYPE, type);
+    }
+    Selector selector = elements.getSelector(node);
+    if (selector != null) {
+      serializeSelector(
+          selector, getNodeDataEncoder(node).createObject(Key.SELECTOR));
+    }
+    ConstantExpression constant = elements.getConstant(node);
+    if (constant != null) {
+      getNodeDataEncoder(node).setConstant(Key.CONSTANT, constant);
+    }
+    DartType cachedType = elements.typesCache[node];
+    if (cachedType != null) {
+      getNodeDataEncoder(node).setType(Key.CACHED_TYPE, cachedType);
+    }
+    // TODO(johnniwinther): Serialize [JumpTarget]s.
+    node.visitChildren(this);
+  }
+
+  @override
+  visitSend(Send node) {
+    visitExpression(node);
+    SendStructure structure = elements.getSendStructure(node);
+    if (structure != null) {
+      serializeSendStructure(
+          structure, getNodeDataEncoder(node).createObject(Key.SEND_STRUCTURE));
+    }
+  }
+
+  @override
+  visitNewExpression(NewExpression node) {
+    visitExpression(node);
+    NewStructure structure = elements.getNewStructure(node);
+    if (structure != null) {
+      serializeNewStructure(
+          structure, getNodeDataEncoder(node).createObject(Key.NEW_STRUCTURE));
+    }
+  }
+
+  @override
+  visitGotoStatement(GotoStatement node) {
+    visitStatement(node);
+    // TODO(johnniwinther): Serialize [JumpTarget]s and [LabelDefinition]s.
+  }
+
+  @override
+  visitLabel(Label node) {
+    visitNode(node);
+    // TODO(johnniwinther): Serialize[LabelDefinition]s.
+  }
+}
+
+class ResolvedAstDeserializer {
+  /// Find the [Token] at [offset] searching through successors of [token].
+  static Token findTokenInStream(Token token, int offset) {
+    while (token.charOffset <= offset && token.next != token) {
+      if (token.charOffset == offset) {
+        return token;
+      }
+      token = token.next;
+    }
+    return null;
+  }
+
+  /// Deserializes the [ResolvedAst] for [element] from [objectDecoder].
+  /// [parsing] and [getBeginToken] are used for parsing the [Node] for
+  /// [element] from its source code.
+  static ResolvedAst deserialize(Element element, ObjectDecoder objectDecoder,
+      Parsing parsing, Token getBeginToken(Uri uri, int charOffset)) {
+    CompilationUnitElement compilationUnit = element.compilationUnit;
+    DiagnosticReporter reporter = parsing.reporter;
+
+    /// Returns the first [Token] for parsing the [Node] for [element].
+    Token readBeginToken() {
+      Uri uri = objectDecoder.getUri(Key.URI);
+      int charOffset = objectDecoder.getInt(Key.OFFSET);
+      Token beginToken = getBeginToken(uri, charOffset);
+      if (beginToken == null) {
+        reporter.internalError(
+            element, "No token found for $element in $uri @ $charOffset");
+      }
+      return beginToken;
+    }
+
+    /// Create the [Node] for the element by parsing the source code.
+    Node doParse(parse(Parser parser)) {
+      return parsing.measure(() {
+        return reporter.withCurrentElement(element, () {
+          CompilationUnitElement unit = element.compilationUnit;
+          NodeListener listener = new NodeListener(
+              parsing.getScannerOptionsFor(element), reporter, null);
+          listener.memberErrors = listener.memberErrors.prepend(false);
+          try {
+            Parser parser = new Parser(listener, parsing.parserOptions);
+            parse(parser);
+          } on ParserError catch (e) {
+            reporter.internalError(element, '$e');
+          }
+          return listener.popNode();
+        });
+      });
+    }
+
+    /// Computes the [Node] for the element based on the [AstKind].
+    Node computeNode(AstKind kind) {
+      switch (kind) {
+        case AstKind.ENUM_INDEX_FIELD:
+          AstBuilder builder = new AstBuilder(element.sourcePosition.begin);
+          Identifier identifier = builder.identifier('index');
+          VariableDefinitions node = new VariableDefinitions(
+              null,
+              builder.modifiers(isFinal: true),
+              new NodeList.singleton(identifier));
+          return node;
+        case AstKind.ENUM_VALUES_FIELD:
+          EnumClassElement enumClass = element.enclosingClass;
+          AstBuilder builder = new AstBuilder(element.sourcePosition.begin);
+          List<FieldElement> enumValues = <FieldElement>[];
+          List<Node> valueReferences = <Node>[];
+          for (EnumConstantElement enumConstant in enumClass.enumValues) {
+            AstBuilder valueBuilder =
+                new AstBuilder(enumConstant.sourcePosition.begin);
+            Identifier name = valueBuilder.identifier(enumConstant.name);
+
+            // Add reference for the `values` field.
+            valueReferences.add(valueBuilder.reference(name));
+          }
+
+          Identifier valuesIdentifier = builder.identifier('values');
+          // TODO(johnniwinther): Add type argument.
+          Expression initializer =
+              builder.listLiteral(valueReferences, isConst: true);
+
+          Node definition =
+              builder.createDefinition(valuesIdentifier, initializer);
+          VariableDefinitions node = new VariableDefinitions(
+              null,
+              builder.modifiers(isStatic: true, isConst: true),
+              new NodeList.singleton(definition));
+          return node;
+        case AstKind.ENUM_TO_STRING:
+          EnumClassElement enumClass = element.enclosingClass;
+          AstBuilder builder = new AstBuilder(element.sourcePosition.begin);
+          List<LiteralMapEntry> mapEntries = <LiteralMapEntry>[];
+          for (EnumConstantElement enumConstant in enumClass.enumValues) {
+            AstBuilder valueBuilder =
+                new AstBuilder(enumConstant.sourcePosition.begin);
+            Identifier name = valueBuilder.identifier(enumConstant.name);
+
+            // Add map entry for `toString` implementation.
+            mapEntries.add(valueBuilder.mapLiteralEntry(
+                valueBuilder.literalInt(enumConstant.index),
+                valueBuilder
+                    .literalString('${enumClass.name}.${name.source}')));
+          }
+
+          // TODO(johnniwinther): Support return type. Note `String` might be
+          // prefixed or not imported within the current library.
+          FunctionExpression toStringNode = builder.functionExpression(
+              Modifiers.EMPTY,
+              'toString',
+              builder.argumentList([]),
+              builder.returnStatement(builder.indexGet(
+                  builder.mapLiteral(mapEntries, isConst: true),
+                  builder.reference(builder.identifier('index')))));
+          return toStringNode;
+        case AstKind.ENUM_CONSTRUCTOR:
+          AstBuilder builder = new AstBuilder(element.sourcePosition.begin);
+          VariableDefinitions indexDefinition =
+              builder.initializingFormal('index');
+          FunctionExpression constructorNode = builder.functionExpression(
+              builder.modifiers(isConst: true),
+              element.enclosingClass.name,
+              builder.argumentList([indexDefinition]),
+              builder.emptyStatement());
+          return constructorNode;
+        case AstKind.ENUM_CONSTANT:
+          EnumConstantElement enumConstant = element;
+          EnumClassElement enumClass = element.enclosingClass;
+          int index = enumConstant.index;
+          AstBuilder builder = new AstBuilder(element.sourcePosition.begin);
+          Identifier name = builder.identifier(element.name);
+
+          Expression initializer = builder.newExpression(
+              enumClass.name, builder.argumentList([builder.literalInt(index)]),
+              isConst: true);
+          SendSet definition = builder.createDefinition(name, initializer);
+
+          VariableDefinitions node = new VariableDefinitions(
+              null,
+              builder.modifiers(isStatic: true, isConst: true),
+              new NodeList.singleton(definition));
+          return node;
+        case AstKind.FACTORY:
+          Token beginToken = readBeginToken();
+          return doParse((parser) => parser.parseFactoryMethod(beginToken));
+        case AstKind.FIELD:
+          Token beginToken = readBeginToken();
+          return doParse((parser) => parser.parseMember(beginToken));
+        case AstKind.FUNCTION:
+          Token beginToken = readBeginToken();
+          int getOrSetOffset =
+              objectDecoder.getInt(Key.GET_OR_SET, isOptional: true);
+          Token getOrSet;
+          if (getOrSetOffset != null) {
+            getOrSet = findTokenInStream(beginToken, getOrSetOffset);
+            if (getOrSet == null) {
+              reporter.internalError(
+                  element,
+                  "No token found for $element in "
+                  "${objectDecoder.getUri(Key.URI)} @ $getOrSetOffset");
+            }
+          }
+          return doParse((parser) {
+            parser.parseFunction(beginToken, getOrSet);
+          });
+      }
+    }
+
+    AstKind kind = objectDecoder.getEnum(Key.KIND, AstKind.values);
+    Node root = computeNode(kind);
+    TreeElementMapping elements = new TreeElementMapping(element);
+    AstIndexComputer indexComputer = new AstIndexComputer();
+    Map<Node, int> nodeIndices = indexComputer.nodeIndices;
+    List<Node> nodeList = indexComputer.nodeList;
+    root.accept(indexComputer);
+    ListDecoder dataDecoder = objectDecoder.getList(Key.DATA);
+    if (dataDecoder != null) {
+      for (int i = 0; i < dataDecoder.length; i++) {
+        ObjectDecoder objectDecoder = dataDecoder.getObject(i);
+        int id = objectDecoder.getInt(Key.ID);
+        Node node = nodeList[id];
+        Element nodeElement =
+            objectDecoder.getElement(Key.ELEMENT, isOptional: true);
+        if (nodeElement != null) {
+          elements[node] = nodeElement;
+        }
+        DartType type = objectDecoder.getType(Key.TYPE, isOptional: true);
+        if (type != null) {
+          elements.setType(node, type);
+        }
+        ObjectDecoder selectorDecoder =
+            objectDecoder.getObject(Key.SELECTOR, isOptional: true);
+        if (selectorDecoder != null) {
+          elements.setSelector(node, deserializeSelector(selectorDecoder));
+        }
+        ConstantExpression constant =
+            objectDecoder.getConstant(Key.CONSTANT, isOptional: true);
+        if (constant != null) {
+          elements.setConstant(node, constant);
+        }
+        DartType cachedType =
+            objectDecoder.getType(Key.CACHED_TYPE, isOptional: true);
+        if (cachedType != null) {
+          elements.typesCache[node] = cachedType;
+        }
+        ObjectDecoder sendStructureDecoder =
+            objectDecoder.getObject(Key.SEND_STRUCTURE, isOptional: true);
+        if (sendStructureDecoder != null) {
+          elements.setSendStructure(
+              node, deserializeSendStructure(sendStructureDecoder));
+        }
+        ObjectDecoder newStructureDecoder =
+            objectDecoder.getObject(Key.NEW_STRUCTURE, isOptional: true);
+        if (newStructureDecoder != null) {
+          elements.setNewStructure(
+              node, deserializeNewStructure(newStructureDecoder));
+        }
+      }
+    }
+    return new ResolvedAst(element, root, elements);
+  }
+}
diff --git a/pkg/compiler/lib/src/serialization/serialization.dart b/pkg/compiler/lib/src/serialization/serialization.dart
index 5a818ce..1521f39 100644
--- a/pkg/compiler/lib/src/serialization/serialization.dart
+++ b/pkg/compiler/lib/src/serialization/serialization.dart
@@ -7,14 +7,17 @@
 import '../elements/elements.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
+import '../util/enumset.dart';
 
-import 'element_serialization.dart';
 import 'constant_serialization.dart';
-import 'type_serialization.dart';
-import 'keys.dart';
+import 'element_serialization.dart';
 import 'json_serializer.dart';
+import 'keys.dart';
+import 'type_serialization.dart';
 import 'values.dart';
 
+export 'task.dart' show LibraryDeserializer;
+
 /// An object that supports the encoding an [ObjectValue] for serialization.
 ///
 /// The [ObjectEncoder] ensures that nominality and circularities of
@@ -24,7 +27,7 @@
   /// Creates an [ObjectEncoder] in the scope of [serializer] that uses [map]
   /// as its internal storage.
   ObjectEncoder(Serializer serializer, Map<dynamic, Value> map)
-        : super(serializer, map);
+      : super(serializer, map);
 
   String get _name => 'Object';
 }
@@ -88,12 +91,29 @@
     }
   }
 
+  /// Maps the [key] entry to the [value] in the encoded object.
+  void setValue(K key, Value value) {
+    _checkKey(key);
+    _map[key] = value;
+  }
+
   /// Maps the [key] entry to the enum [value] in the encoded object.
   void setEnum(K key, var value) {
     _checkKey(key);
     _map[key] = new EnumValue(value);
   }
 
+  /// Maps the [key] entry to the set of enum [values] in the encoded object.
+  void setEnums(K key, Iterable values) {
+    setEnumSet(key, new EnumSet.fromValues(values));
+  }
+
+  /// Maps the [key] entry to the enum [set] in the encoded object.
+  void setEnumSet(K key, EnumSet set) {
+    _checkKey(key);
+    _map[key] = new IntValue(set.value);
+  }
+
   /// Maps the [key] entry to the [element] in the encoded object.
   void setElement(K key, Element element) {
     _checkKey(key);
@@ -106,8 +126,8 @@
   void setElements(K key, Iterable<Element> elements) {
     _checkKey(key);
     if (elements.isNotEmpty) {
-      _map[key] = new ListValue(
-          elements.map(_serializer.createElementValue).toList());
+      _map[key] =
+          new ListValue(elements.map(_serializer.createElementValue).toList());
     }
   }
 
@@ -231,8 +251,7 @@
 class ObjectDecoder extends AbstractDecoder<Key> {
   /// Creates an [ObjectDecoder] that decodes [map] into deserialized values
   /// using [deserializer] to create canonicalized values.
-  ObjectDecoder(Deserializer deserializer, Map map)
-      : super(deserializer, map);
+  ObjectDecoder(Deserializer deserializer, Map map) : super(deserializer, map);
 
   @override
   _getKeyValue(Key key) => _deserializer.decoder.getObjectPropertyValue(key);
@@ -312,6 +331,22 @@
     return enumValues[value];
   }
 
+  /// Returns the set of enum values associated with [key] in the decoded
+  /// object.
+  ///
+  /// If no value is associated with [key], then if [isOptional] is `true`,
+  /// [defaultValue] is returned, otherwise an exception is thrown.
+  EnumSet getEnums(K key, {bool isOptional: false}) {
+    int value = _map[_getKeyValue(key)];
+    if (value == null) {
+      if (isOptional) {
+        return const EnumSet.fixed(0);
+      }
+      throw new StateError("enum values '$key' not found in $_map.");
+    }
+    return new EnumSet.fixed(value);
+  }
+
   /// Returns the [Element] value associated with [key] in the decoded object.
   ///
   /// If no value is associated with [key], then if [isOptional] is `true`,
@@ -578,6 +613,11 @@
   Map<Key, Value> get map => objectValue.map;
 }
 
+/// Function used to filter which element serialized.
+typedef bool ElementMatcher(Element element);
+
+bool includeAllElements(Element element) => true;
+
 /// Serializer for the transitive closure of a collection of libraries.
 ///
 /// The serializer creates an [ObjectValue] model of the [Element], [DartType]
@@ -604,26 +644,27 @@
 ///       ],
 ///     }
 ///
-// TODO(johnniwinther): Support per-library serialization and dependencies
-// between serialized subcomponent.
+// TODO(johnniwinther): Support dependencies between serialized subcomponent.
 class Serializer {
-  final SerializationEncoder _encoder;
+  List<SerializerPlugin> plugins = <SerializerPlugin>[];
 
+  Map<Uri, dynamic> _dependencyMap = <Uri, dynamic>{};
   Map<Element, DataObject> _elementMap = <Element, DataObject>{};
   Map<ConstantExpression, DataObject> _constantMap =
       <ConstantExpression, DataObject>{};
   Map<DartType, DataObject> _typeMap = <DartType, DataObject>{};
   List _pendingList = [];
+  ElementMatcher shouldInclude;
 
-  Serializer(this._encoder);
+  // TODO(johnniwinther): Replace [includeElement] with a general strategy.
+  Serializer({this.shouldInclude: includeAllElements});
 
   /// Add the transitive closure of [library] to this serializer.
   void serialize(LibraryElement library) {
-    // Call [_getElementDataObject] for its side-effect: To create a
+    // Call [_getElementId] for its side-effect: To create a
     // [DataObject] for [library]. If not already created, this will
     // put the serialization of [library] in the work queue.
-    _getElementDataObject(library);
-    _emptyWorklist();
+    _getElementId(library);
   }
 
   void _emptyWorklist() {
@@ -632,35 +673,83 @@
     }
   }
 
-  /// Returns the [DataObject] for [element].
+  /// Returns the id [Value] for [element].
   ///
-  /// If [constant] has no [DataObject], a new [DataObject] is created and
-  /// encoding the [ObjectValue] for [constant] is put into the work queue of
+  /// If [element] has no [DataObject], a new [DataObject] is created and
+  /// encoding the [ObjectValue] for [element] is put into the work queue of
   /// this serializer.
-  DataObject _getElementDataObject(Element element) {
+  Value _getElementId(Element element) {
     if (element == null) {
       throw new ArgumentError('Serializer._getElementDataObject(null)');
     }
-    return _elementMap.putIfAbsent(element, () {
-      // Run through [ELEMENT_SERIALIZERS] sequentially to find the one that
-      // deals with [element].
-      for (ElementSerializer serializer in ELEMENT_SERIALIZERS) {
-        SerializedElementKind kind = serializer.getSerializedKind(element);
-        if (kind != null) {
-          DataObject dataObject = new DataObject(
-              new IntValue(_elementMap.length), new EnumValue(kind));
-          // Delay the serialization of the element itself to avoid loops, and
-          // to keep the call stack small.
-          _pendingList.add(() {
-            serializer.serialize(
-                element, new ObjectEncoder(this, dataObject.map), kind);
-          });
-          return dataObject;
+    DataObject dataObject = _elementMap[element];
+    if (dataObject == null) {
+      if (!shouldInclude(element)) {
+        if (element.isLibrary) {
+          LibraryElement library = element;
+          _elementMap[element] = dataObject = new DataObject(
+              new IntValue(_elementMap.length),
+              new EnumValue(SerializedElementKind.EXTERNAL_LIBRARY));
+          ObjectEncoder encoder = new ObjectEncoder(this, dataObject.map);
+          encoder.setUri(Key.URI, library.canonicalUri, library.canonicalUri);
+        } else if (element.isStatic) {
+          Value classId = _getElementId(element.enclosingClass);
+          _elementMap[element] = dataObject = new DataObject(
+              new IntValue(_elementMap.length),
+              new EnumValue(SerializedElementKind.EXTERNAL_STATIC_MEMBER));
+          ObjectEncoder encoder = new ObjectEncoder(this, dataObject.map);
+          encoder.setValue(Key.CLASS, classId);
+          encoder.setString(Key.NAME, element.name);
+        } else if (element.isConstructor) {
+          Value classId = _getElementId(element.enclosingClass);
+          _elementMap[element] = dataObject = new DataObject(
+              new IntValue(_elementMap.length),
+              new EnumValue(SerializedElementKind.EXTERNAL_CONSTRUCTOR));
+          ObjectEncoder encoder = new ObjectEncoder(this, dataObject.map);
+          encoder.setValue(Key.CLASS, classId);
+          encoder.setString(Key.NAME, element.name);
+        } else {
+          Value libraryId = _getElementId(element.library);
+          _elementMap[element] = dataObject = new DataObject(
+              new IntValue(_elementMap.length),
+              new EnumValue(SerializedElementKind.EXTERNAL_LIBRARY_MEMBER));
+          ObjectEncoder encoder = new ObjectEncoder(this, dataObject.map);
+          encoder.setValue(Key.LIBRARY, libraryId);
+          encoder.setString(Key.NAME, element.name);
+        }
+      } else {
+        // Run through [ELEMENT_SERIALIZERS] sequentially to find the one that
+        // deals with [element].
+        for (ElementSerializer serializer in ELEMENT_SERIALIZERS) {
+          SerializedElementKind kind = serializer.getSerializedKind(element);
+          if (kind != null) {
+            _elementMap[element] = dataObject = new DataObject(
+                new IntValue(_elementMap.length), new EnumValue(kind));
+            // Delay the serialization of the element itself to avoid loops, and
+            // to keep the call stack small.
+            _pendingList.add(() {
+              ObjectEncoder encoder = new ObjectEncoder(this, dataObject.map);
+              serializer.serialize(element, encoder, kind);
+
+              MapEncoder pluginData;
+              for (SerializerPlugin plugin in plugins) {
+                plugin.onElement(element, (String tag) {
+                  if (pluginData == null) {
+                    pluginData = encoder.createMap(Key.DATA);
+                  }
+                  return pluginData.createObject(tag);
+                });
+              }
+            });
+          }
         }
       }
+    }
+    if (dataObject == null) {
       throw new UnsupportedError(
           'Unsupported element: $element (${element.kind})');
-    });
+    }
+    return dataObject.id;
   }
 
   /// Creates the [ElementValue] for [element].
@@ -668,15 +757,15 @@
   /// If [element] has not already been serialized, it is added to the work
   /// queue of this serializer.
   ElementValue createElementValue(Element element) {
-    return new ElementValue(element, _getElementDataObject(element).id);
+    return new ElementValue(element, _getElementId(element));
   }
 
-  /// Returns the [DataObject] for [constant].
+  /// Returns the id [Value] for [constant].
   ///
   /// If [constant] has no [DataObject], a new [DataObject] is created and
   /// encoding the [ObjectValue] for [constant] is put into the work queue of
   /// this serializer.
-  DataObject _getConstantDataObject(ConstantExpression constant) {
+  Value _getConstantId(ConstantExpression constant) {
     return _constantMap.putIfAbsent(constant, () {
       DataObject dataObject = new DataObject(
           new IntValue(_constantMap.length), new EnumValue(constant.kind));
@@ -684,13 +773,13 @@
       // keep the call stack small.
       _pendingList.add(() => _encodeConstant(constant, dataObject));
       return dataObject;
-    });
+    }).id;
   }
 
   /// Encodes [constant] into the [ObjectValue] of [dataObject].
   void _encodeConstant(ConstantExpression constant, DataObject dataObject) {
-    const ConstantSerializer().visit(constant,
-        new ObjectEncoder(this, dataObject.map));
+    const ConstantSerializer()
+        .visit(constant, new ObjectEncoder(this, dataObject.map));
   }
 
   /// Creates the [ConstantValue] for [constant].
@@ -698,23 +787,24 @@
   /// If [constant] has not already been serialized, it is added to the work
   /// queue of this serializer.
   ConstantValue createConstantValue(ConstantExpression constant) {
-    return new ConstantValue(constant, _getConstantDataObject(constant).id);
+    return new ConstantValue(constant, _getConstantId(constant));
   }
 
-  /// Returns the [DataObject] for [type].
+  /// Returns the id [Value] for [type].
   ///
   /// If [type] has no [DataObject], a new [DataObject] is created and
   /// encoding the [ObjectValue] for [type] is put into the work queue of this
   /// serializer.
-  DataObject _getTypeDataObject(DartType type) {
-    return _typeMap.putIfAbsent(type, () {
-      DataObject dataObject = new DataObject(
+  Value _getTypeId(DartType type) {
+    DataObject dataObject = _typeMap[type];
+    if (dataObject == null) {
+      _typeMap[type] = dataObject = new DataObject(
           new IntValue(_typeMap.length), new EnumValue(type.kind));
       // Delay the serialization of the type itself to avoid loops, and to keep
       // the call stack small.
       _pendingList.add(() => _encodeType(type, dataObject));
-      return dataObject;
-    });
+    }
+    return dataObject.id;
   }
 
   /// Encodes [type] into the [ObjectValue] of [dataObject].
@@ -727,10 +817,12 @@
   /// If [type] has not already been serialized, it is added to the work
   /// queue of this serializer.
   TypeValue createTypeValue(DartType type) {
-    return new TypeValue(type, _getTypeDataObject(type).id);
+    return new TypeValue(type, _getTypeId(type));
   }
 
   ObjectValue get objectValue {
+    _emptyWorklist();
+
     Map<Key, Value> map = <Key, Value>{};
     map[Key.ELEMENTS] =
         new ListValue(_elementMap.values.map((l) => l.objectValue).toList());
@@ -745,8 +837,8 @@
     return new ObjectValue(map);
   }
 
-  String toText() {
-    return _encoder.encode(objectValue);
+  String toText(SerializationEncoder encoder) {
+    return encoder.encode(objectValue);
   }
 
   String prettyPrint() {
@@ -755,11 +847,53 @@
   }
 }
 
+/// Plugin for serializing additional data for an [Element].
+class SerializerPlugin {
+  const SerializerPlugin();
+
+  /// Called upon the serialization of [element].
+  ///
+  /// Use [creatorEncoder] to create a data object with id [tag] for storing
+  /// additional data for [element].
+  void onElement(Element element, ObjectEncoder createEncoder(String tag)) {}
+}
+
+/// Plugin for deserializing additional data for an [Element].
+class DeserializerPlugin {
+  const DeserializerPlugin();
+
+  /// Called upon the deserialization of [element].
+  ///
+  /// Use [getDecoder] to retrieve the data object with id [tag] stored for
+  /// [element]. If not object is stored for [tag], [getDecoder] returns `null`.
+  void onElement(Element element, ObjectDecoder getDecoder(String tag)) {}
+}
+
+/// Context for parallel deserialization.
+class DeserializationContext {
+  Map<Uri, LibraryElement> _uriMap = <Uri, LibraryElement>{};
+  List<Deserializer> deserializers = <Deserializer>[];
+
+  LibraryElement lookupLibrary(Uri uri) {
+    return _uriMap.putIfAbsent(uri, () {
+      for (Deserializer deserializer in deserializers) {
+        LibraryElement library = deserializer.lookupLibrary(uri);
+        if (library != null) {
+          return library;
+        }
+      }
+      return null;
+    });
+  }
+}
+
 /// Deserializer for a closed collection of libraries.
 // TODO(johnniwinther): Support per-library deserialization and dependencies
 // between deserialized subcomponent.
 class Deserializer {
+  final DeserializationContext context;
   final SerializationDecoder decoder;
+  List<DeserializerPlugin> plugins = <DeserializerPlugin>[];
   ObjectDecoder _headerObject;
   ListDecoder _elementList;
   ListDecoder _typeList;
@@ -768,8 +902,9 @@
   Map<int, DartType> _typeMap = {};
   Map<int, ConstantExpression> _constantMap = {};
 
-  Deserializer.fromText(String text, this.decoder) {
+  Deserializer.fromText(this.context, String text, this.decoder) {
     _headerObject = new ObjectDecoder(this, decoder.decode(text));
+    context.deserializers.add(this);
   }
 
   /// Returns the [ListDecoder] for the [Element]s in this deserializer.
@@ -818,9 +953,52 @@
   /// Returns the deserialized [Element] for [id].
   Element deserializeElement(int id) {
     if (id == null) throw new ArgumentError('Deserializer.getElement(null)');
-    return _elementMap.putIfAbsent(id, () {
-      return ElementDeserializer.deserialize(elements.getObject(id));
-    });
+    Element element = _elementMap[id];
+    if (element == null) {
+      ObjectDecoder decoder = elements.getObject(id);
+      SerializedElementKind elementKind =
+          decoder.getEnum(Key.KIND, SerializedElementKind.values);
+      if (elementKind == SerializedElementKind.EXTERNAL_LIBRARY) {
+        Uri uri = decoder.getUri(Key.URI);
+        element = context.lookupLibrary(uri);
+        if (element == null) {
+          throw new StateError("Missing library for $uri.");
+        }
+      } else if (elementKind == SerializedElementKind.EXTERNAL_LIBRARY_MEMBER) {
+        LibraryElement library = decoder.getElement(Key.LIBRARY);
+        String name = decoder.getString(Key.NAME);
+        element = library.find(name);
+        if (element == null) {
+          throw new StateError("Missing library member for $name in $library.");
+        }
+      } else if (elementKind == SerializedElementKind.EXTERNAL_STATIC_MEMBER) {
+        ClassElement cls = decoder.getElement(Key.CLASS);
+        String name = decoder.getString(Key.NAME);
+        element = cls.lookupLocalMember(name);
+        if (element == null) {
+          throw new StateError("Missing static member for $name in $cls.");
+        }
+      } else if (elementKind == SerializedElementKind.EXTERNAL_CONSTRUCTOR) {
+        ClassElement cls = decoder.getElement(Key.CLASS);
+        String name = decoder.getString(Key.NAME);
+        element = cls.lookupConstructor(name);
+        if (element == null) {
+          throw new StateError("Missing constructor for $name in $cls.");
+        }
+      } else {
+        element = ElementDeserializer.deserialize(decoder, elementKind);
+      }
+      _elementMap[id] = element;
+
+      MapDecoder pluginData = decoder.getMap(Key.DATA, isOptional: true);
+      // Call plugins even when there is no data, so they can take action in
+      // this case.
+      for (DeserializerPlugin plugin in plugins) {
+        plugin.onElement(element,
+            (String tag) => pluginData?.getObject(tag, isOptional: true));
+      }
+    }
+    return element;
   }
 
   /// Returns the deserialized [DartType] for [id].
diff --git a/pkg/compiler/lib/src/serialization/serialization_util.dart b/pkg/compiler/lib/src/serialization/serialization_util.dart
new file mode 100644
index 0000000..cd5e77a
--- /dev/null
+++ b/pkg/compiler/lib/src/serialization/serialization_util.dart
@@ -0,0 +1,481 @@
+// 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 dart2js.serialization.util;
+
+import '../dart_types.dart';
+import '../common/resolution.dart';
+import '../constants/expressions.dart';
+import '../elements/elements.dart';
+import '../resolution/access_semantics.dart';
+import '../resolution/operators.dart';
+import '../resolution/send_structure.dart';
+import '../universe/call_structure.dart';
+import '../universe/selector.dart';
+import '../universe/world_impact.dart';
+import '../universe/use.dart';
+import '../util/enumset.dart';
+
+import 'keys.dart';
+import 'serialization.dart';
+
+/// Serialize [name] into [encoder].
+void serializeName(Name name, ObjectEncoder encoder) {
+  encoder.setString(Key.NAME, name.text);
+  encoder.setBool(Key.IS_SETTER, name.isSetter);
+  if (name.library != null) {
+    encoder.setElement(Key.LIBRARY, name.library);
+  }
+}
+
+/// Deserialize a [Name] from [decoder].
+Name deserializeName(ObjectDecoder decoder) {
+  String name = decoder.getString(Key.NAME);
+  bool isSetter = decoder.getBool(Key.IS_SETTER);
+  LibraryElement library = decoder.getElement(Key.LIBRARY, isOptional: true);
+  return new Name(name, library, isSetter: isSetter);
+}
+
+/// Serialize [selector] into [encoder].
+void serializeSelector(Selector selector, ObjectEncoder encoder) {
+  encoder.setEnum(Key.KIND, selector.kind);
+
+  encoder.setInt(Key.ARGUMENTS, selector.callStructure.argumentCount);
+  encoder.setStrings(
+      Key.NAMED_ARGUMENTS, selector.callStructure.namedArguments);
+  serializeName(selector.memberName, encoder);
+}
+
+/// Deserialize a [Selector] from [decoder].
+Selector deserializeSelector(ObjectDecoder decoder) {
+  SelectorKind kind = decoder.getEnum(Key.KIND, SelectorKind.values);
+  int argumentCount = decoder.getInt(Key.ARGUMENTS);
+  List<String> namedArguments =
+      decoder.getStrings(Key.NAMED_ARGUMENTS, isOptional: true);
+  String name = decoder.getString(Key.NAME);
+  bool isSetter = decoder.getBool(Key.IS_SETTER);
+  LibraryElement library = decoder.getElement(Key.LIBRARY, isOptional: true);
+  return new Selector(kind, deserializeName(decoder),
+      new CallStructure(argumentCount, namedArguments));
+}
+
+/// Serialize [sendStructure] into [encoder].
+void serializeSendStructure(
+    SendStructure sendStructure, ObjectEncoder encoder) {
+  encoder.setEnum(Key.KIND, sendStructure.kind);
+  switch (sendStructure.kind) {
+    case SendStructureKind.IF_NULL:
+    case SendStructureKind.LOGICAL_AND:
+    case SendStructureKind.LOGICAL_OR:
+    case SendStructureKind.NOT:
+    case SendStructureKind.INVALID_UNARY:
+    case SendStructureKind.INVALID_BINARY:
+      // No additional properties.
+      break;
+    case SendStructureKind.IS:
+      IsStructure structure = sendStructure;
+      encoder.setType(Key.TYPE, structure.type);
+      break;
+    case SendStructureKind.IS_NOT:
+      IsNotStructure structure = sendStructure;
+      encoder.setType(Key.TYPE, structure.type);
+      break;
+    case SendStructureKind.AS:
+      AsStructure structure = sendStructure;
+      encoder.setType(Key.TYPE, structure.type);
+      break;
+    case SendStructureKind.INVOKE:
+      InvokeStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      serializeSelector(structure.selector, encoder.createObject(Key.SELECTOR));
+      break;
+    case SendStructureKind.INCOMPATIBLE_INVOKE:
+      IncompatibleInvokeStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      serializeSelector(structure.selector, encoder.createObject(Key.SELECTOR));
+      break;
+    case SendStructureKind.GET:
+      GetStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      break;
+    case SendStructureKind.SET:
+      SetStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      break;
+    case SendStructureKind.UNARY:
+      UnaryStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      encoder.setEnum(Key.OPERATOR, structure.operator.kind);
+      break;
+    case SendStructureKind.INDEX:
+      IndexStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      break;
+    case SendStructureKind.EQUALS:
+      EqualsStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      break;
+    case SendStructureKind.NOT_EQUALS:
+      NotEqualsStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      break;
+    case SendStructureKind.BINARY:
+      BinaryStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      encoder.setEnum(Key.OPERATOR, structure.operator.kind);
+      break;
+    case SendStructureKind.INDEX_SET:
+      IndexSetStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      break;
+    case SendStructureKind.INDEX_PREFIX:
+      IndexPrefixStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      encoder.setEnum(Key.OPERATOR, structure.operator.kind);
+      break;
+    case SendStructureKind.INDEX_POSTFIX:
+      IndexPostfixStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      encoder.setEnum(Key.OPERATOR, structure.operator.kind);
+      break;
+    case SendStructureKind.COMPOUND:
+      CompoundStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      encoder.setEnum(Key.OPERATOR, structure.operator.kind);
+      break;
+    case SendStructureKind.SET_IF_NULL:
+      SetIfNullStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      break;
+    case SendStructureKind.COMPOUND_INDEX_SET:
+      CompoundIndexSetStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      encoder.setEnum(Key.OPERATOR, structure.operator.kind);
+      break;
+    case SendStructureKind.INDEX_SET_IF_NULL:
+      IndexSetIfNullStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      break;
+    case SendStructureKind.PREFIX:
+      PrefixStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      encoder.setEnum(Key.OPERATOR, structure.operator.kind);
+      break;
+    case SendStructureKind.POSTFIX:
+      PostfixStructure structure = sendStructure;
+      serializeAccessSemantics(
+          structure.semantics, encoder.createObject(Key.SEMANTICS));
+      encoder.setEnum(Key.OPERATOR, structure.operator.kind);
+      break;
+    case SendStructureKind.DEFERRED_PREFIX:
+      DeferredPrefixStructure structure = sendStructure;
+      encoder.setElement(Key.PREFIX, structure.prefix);
+      serializeSendStructure(
+          structure.sendStructure, encoder.createObject(Key.SEND_STRUCTURE));
+      break;
+  }
+}
+
+/// Deserialize a [SendStructure] from [decoder].
+SendStructure deserializeSendStructure(ObjectDecoder decoder) {
+  SendStructureKind kind = decoder.getEnum(Key.KIND, SendStructureKind.values);
+  switch (kind) {
+    case SendStructureKind.IF_NULL:
+      return const IfNullStructure();
+    case SendStructureKind.LOGICAL_AND:
+      return const LogicalAndStructure();
+    case SendStructureKind.LOGICAL_OR:
+      return const LogicalOrStructure();
+    case SendStructureKind.IS:
+      return new IsStructure(decoder.getType(Key.TYPE));
+    case SendStructureKind.IS_NOT:
+      return new IsNotStructure(decoder.getType(Key.TYPE));
+    case SendStructureKind.AS:
+      return new AsStructure(decoder.getType(Key.TYPE));
+    case SendStructureKind.INVOKE:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      Selector selector = deserializeSelector(decoder.getObject(Key.SELECTOR));
+      return new InvokeStructure(semantics, selector);
+    case SendStructureKind.INCOMPATIBLE_INVOKE:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      Selector selector = deserializeSelector(decoder.getObject(Key.SELECTOR));
+      return new IncompatibleInvokeStructure(semantics, selector);
+    case SendStructureKind.GET:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new GetStructure(semantics);
+    case SendStructureKind.SET:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new SetStructure(semantics);
+    case SendStructureKind.NOT:
+      return const NotStructure();
+    case SendStructureKind.UNARY:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new UnaryStructure(
+          semantics,
+          UnaryOperator.fromKind(
+              decoder.getEnum(Key.OPERATOR, UnaryOperatorKind.values)));
+    case SendStructureKind.INVALID_UNARY:
+      return new InvalidUnaryStructure();
+    case SendStructureKind.INDEX:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new IndexStructure(semantics);
+    case SendStructureKind.EQUALS:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new EqualsStructure(semantics);
+    case SendStructureKind.NOT_EQUALS:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new NotEqualsStructure(semantics);
+    case SendStructureKind.BINARY:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new BinaryStructure(
+          semantics,
+          BinaryOperator.fromKind(
+              decoder.getEnum(Key.OPERATOR, BinaryOperatorKind.values)));
+    case SendStructureKind.INVALID_BINARY:
+      return const InvalidBinaryStructure();
+    case SendStructureKind.INDEX_SET:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new IndexSetStructure(semantics);
+    case SendStructureKind.INDEX_PREFIX:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new IndexPrefixStructure(
+          semantics,
+          IncDecOperator.fromKind(
+              decoder.getEnum(Key.OPERATOR, IncDecOperatorKind.values)));
+    case SendStructureKind.INDEX_POSTFIX:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new IndexPostfixStructure(
+          semantics,
+          IncDecOperator.fromKind(
+              decoder.getEnum(Key.OPERATOR, IncDecOperatorKind.values)));
+    case SendStructureKind.COMPOUND:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new CompoundStructure(
+          semantics,
+          AssignmentOperator.fromKind(
+              decoder.getEnum(Key.OPERATOR, AssignmentOperatorKind.values)));
+    case SendStructureKind.SET_IF_NULL:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new SetIfNullStructure(semantics);
+    case SendStructureKind.COMPOUND_INDEX_SET:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new CompoundIndexSetStructure(
+          semantics,
+          AssignmentOperator.fromKind(
+              decoder.getEnum(Key.OPERATOR, AssignmentOperatorKind.values)));
+    case SendStructureKind.INDEX_SET_IF_NULL:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new IndexSetIfNullStructure(semantics);
+    case SendStructureKind.PREFIX:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new PrefixStructure(
+          semantics,
+          IncDecOperator.fromKind(
+              decoder.getEnum(Key.OPERATOR, IncDecOperatorKind.values)));
+    case SendStructureKind.POSTFIX:
+      AccessSemantics semantics =
+          deserializeAccessSemantics(decoder.getObject(Key.SEMANTICS));
+      return new PostfixStructure(
+          semantics,
+          IncDecOperator.fromKind(
+              decoder.getEnum(Key.OPERATOR, IncDecOperatorKind.values)));
+    case SendStructureKind.DEFERRED_PREFIX:
+      PrefixElement prefix = decoder.getElement(Key.PREFIX);
+      SendStructure sendStructure =
+          deserializeSendStructure(decoder.getObject(Key.SEND_STRUCTURE));
+      return new DeferredPrefixStructure(prefix, sendStructure);
+  }
+}
+
+/// Serialize [newStructure] into [encoder].
+void serializeNewStructure(NewStructure newStructure, ObjectEncoder encoder) {
+  encoder.setEnum(Key.KIND, newStructure.kind);
+  switch (newStructure.kind) {
+    case NewStructureKind.NEW_INVOKE:
+      NewInvokeStructure structure = newStructure;
+      encoder.setEnum(Key.SUB_KIND, structure.semantics.kind);
+      encoder.setElement(Key.ELEMENT, structure.semantics.element);
+      encoder.setType(Key.TYPE, structure.semantics.type);
+      serializeSelector(structure.selector, encoder.createObject(Key.SELECTOR));
+      break;
+    case NewStructureKind.CONST_INVOKE:
+      ConstInvokeStructure structure = newStructure;
+      encoder.setEnum(Key.SUB_KIND, structure.constantInvokeKind);
+      encoder.setConstant(Key.CONSTANT, structure.constant);
+      break;
+    case NewStructureKind.LATE_CONST:
+      throw new UnsupportedError(
+          'Unsupported NewStructure kind ${newStructure.kind}.');
+  }
+}
+
+/// Deserialize a [NewStructure] from [decoder].
+NewStructure deserializeNewStructure(ObjectDecoder decoder) {
+  NewStructureKind kind = decoder.getEnum(Key.KIND, NewStructureKind.values);
+  switch (kind) {
+    case NewStructureKind.NEW_INVOKE:
+      ConstructorAccessKind constructorAccessKind =
+          decoder.getEnum(Key.SUB_KIND, ConstructorAccessKind.values);
+      Element element = decoder.getElement(Key.ELEMENT);
+      DartType type = decoder.getType(Key.TYPE);
+      ConstructorAccessSemantics semantics =
+          new ConstructorAccessSemantics(constructorAccessKind, element, type);
+      Selector selector = deserializeSelector(decoder.getObject(Key.SELECTOR));
+      return new NewInvokeStructure(semantics, selector);
+
+    case NewStructureKind.CONST_INVOKE:
+      ConstantInvokeKind constantInvokeKind =
+          decoder.getEnum(Key.SUB_KIND, ConstantInvokeKind.values);
+      ConstantExpression constant = decoder.getConstant(Key.CONSTANT);
+      return new ConstInvokeStructure(constantInvokeKind, constant);
+    case NewStructureKind.LATE_CONST:
+      throw new UnsupportedError('Unsupported NewStructure kind $kind.');
+  }
+}
+
+/// Serialize [semantics] into [encoder].
+void serializeAccessSemantics(
+    AccessSemantics semantics, ObjectEncoder encoder) {
+  encoder.setEnum(Key.KIND, semantics.kind);
+  switch (semantics.kind) {
+    case AccessKind.EXPRESSION:
+    case AccessKind.THIS:
+      // No additional properties.
+      break;
+    case AccessKind.THIS_PROPERTY:
+    case AccessKind.DYNAMIC_PROPERTY:
+    case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
+      serializeName(semantics.name, encoder);
+      break;
+    case AccessKind.CLASS_TYPE_LITERAL:
+    case AccessKind.TYPEDEF_TYPE_LITERAL:
+    case AccessKind.DYNAMIC_TYPE_LITERAL:
+      encoder.setConstant(Key.CONSTANT, semantics.constant);
+      break;
+    case AccessKind.LOCAL_FUNCTION:
+    case AccessKind.LOCAL_VARIABLE:
+    case AccessKind.FINAL_LOCAL_VARIABLE:
+    case AccessKind.PARAMETER:
+    case AccessKind.FINAL_PARAMETER:
+    case AccessKind.STATIC_FIELD:
+    case AccessKind.FINAL_STATIC_FIELD:
+    case AccessKind.STATIC_METHOD:
+    case AccessKind.STATIC_GETTER:
+    case AccessKind.STATIC_SETTER:
+    case AccessKind.TOPLEVEL_FIELD:
+    case AccessKind.FINAL_TOPLEVEL_FIELD:
+    case AccessKind.TOPLEVEL_METHOD:
+    case AccessKind.TOPLEVEL_GETTER:
+    case AccessKind.TOPLEVEL_SETTER:
+    case AccessKind.SUPER_FIELD:
+    case AccessKind.SUPER_FINAL_FIELD:
+    case AccessKind.SUPER_METHOD:
+    case AccessKind.SUPER_GETTER:
+    case AccessKind.SUPER_SETTER:
+    case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
+    case AccessKind.UNRESOLVED:
+    case AccessKind.UNRESOLVED_SUPER:
+    case AccessKind.INVALID:
+      encoder.setElement(Key.ELEMENT, semantics.element);
+      break;
+    case AccessKind.COMPOUND:
+      CompoundAccessSemantics compoundAccess = semantics;
+      encoder.setEnum(Key.SUB_KIND, compoundAccess.compoundAccessKind);
+      encoder.setElement(Key.GETTER, semantics.getter);
+      encoder.setElement(Key.SETTER, semantics.setter);
+      break;
+    case AccessKind.CONSTANT:
+      throw new UnsupportedError('Unsupported access kind: ${semantics.kind}');
+  }
+}
+
+/// Deserialize a [AccessSemantics] from [decoder].
+AccessSemantics deserializeAccessSemantics(ObjectDecoder decoder) {
+  AccessKind kind = decoder.getEnum(Key.KIND, AccessKind.values);
+  switch (kind) {
+    case AccessKind.EXPRESSION:
+      return const DynamicAccess.expression();
+    case AccessKind.THIS:
+      return const DynamicAccess.thisAccess();
+    case AccessKind.THIS_PROPERTY:
+      return new DynamicAccess.thisProperty(deserializeName(decoder));
+    case AccessKind.DYNAMIC_PROPERTY:
+      return new DynamicAccess.dynamicProperty(deserializeName(decoder));
+    case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
+      return new DynamicAccess.ifNotNullProperty(deserializeName(decoder));
+    case AccessKind.CLASS_TYPE_LITERAL:
+    case AccessKind.TYPEDEF_TYPE_LITERAL:
+    case AccessKind.DYNAMIC_TYPE_LITERAL:
+      return new ConstantAccess(kind, decoder.getConstant(Key.CONSTANT));
+
+    case AccessKind.LOCAL_FUNCTION:
+    case AccessKind.LOCAL_VARIABLE:
+    case AccessKind.FINAL_LOCAL_VARIABLE:
+    case AccessKind.PARAMETER:
+    case AccessKind.FINAL_PARAMETER:
+    case AccessKind.STATIC_FIELD:
+    case AccessKind.FINAL_STATIC_FIELD:
+    case AccessKind.STATIC_METHOD:
+    case AccessKind.STATIC_GETTER:
+    case AccessKind.STATIC_SETTER:
+    case AccessKind.TOPLEVEL_FIELD:
+    case AccessKind.FINAL_TOPLEVEL_FIELD:
+    case AccessKind.TOPLEVEL_METHOD:
+    case AccessKind.TOPLEVEL_GETTER:
+    case AccessKind.TOPLEVEL_SETTER:
+    case AccessKind.SUPER_FIELD:
+    case AccessKind.SUPER_FINAL_FIELD:
+    case AccessKind.SUPER_METHOD:
+    case AccessKind.SUPER_GETTER:
+    case AccessKind.SUPER_SETTER:
+    case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
+    case AccessKind.UNRESOLVED:
+    case AccessKind.UNRESOLVED_SUPER:
+    case AccessKind.INVALID:
+      return new StaticAccess.internal(kind, decoder.getElement(Key.ELEMENT));
+
+    case AccessKind.COMPOUND:
+      CompoundAccessKind compoundAccessKind =
+          decoder.getEnum(Key.SUB_KIND, CompoundAccessKind.values);
+      Element getter = decoder.getElement(Key.GETTER);
+      Element setter = decoder.getElement(Key.SETTER);
+      return new CompoundAccessSemantics(compoundAccessKind, getter, setter);
+    case AccessKind.CONSTANT:
+      throw new UnsupportedError('Unsupported access kind: $kind');
+  }
+}
diff --git a/pkg/compiler/lib/src/serialization/task.dart b/pkg/compiler/lib/src/serialization/task.dart
index 551ba49..1289b77 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -4,32 +4,40 @@
 
 library dart2js.serialization.task;
 
-import '../common/resolution.dart' show
-    ResolutionWorkItem;
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../common/work.dart' show
-    ItemCompilationContext;
-import '../compiler.dart' show
-    Compiler;
+import 'dart:async' show Future;
+import '../common/resolution.dart' show ResolutionImpact, ResolutionWorkItem;
+import '../common/tasks.dart' show CompilerTask;
+import '../common/work.dart' show ItemCompilationContext;
+import '../compiler.dart' show Compiler;
 import '../elements/elements.dart';
-import '../enqueue.dart' show
-    ResolutionEnqueuer;
-import '../universe/world_impact.dart' show
-    WorldImpact;
+import '../enqueue.dart' show ResolutionEnqueuer;
+import '../universe/world_impact.dart' show WorldImpact;
+
+/// A deserializer that can load a library element by reading it's information
+/// from a serialized form.
+abstract class LibraryDeserializer {
+  /// Loads the [LibraryElement] associated with a library under [uri], or null
+  /// if no serialized information is available for the given library.
+  Future<LibraryElement> readLibrary(Uri uri);
+}
 
 /// Task that supports deserialization of elements.
-class SerializationTask extends CompilerTask {
+class SerializationTask extends CompilerTask implements LibraryDeserializer {
   SerializationTask(Compiler compiler) : super(compiler);
 
   DeserializerSystem deserializer;
 
   String get name => 'Serialization';
 
+  /// If `true`, data must be retained to support serialization.
+  // TODO(johnniwinther): Make this more precise in terms of what needs to be
+  // retained, for instance impacts, resolution data etc.
+  bool supportSerialization = false;
+
   /// Returns the [LibraryElement] for [resolvedUri] if available from
   /// serialization.
-  LibraryElement readLibrary(Uri resolvedUri) {
-    if (deserializer == null) return null;
+  Future<LibraryElement> readLibrary(Uri resolvedUri) {
+    if (deserializer == null) return new Future<LibraryElement>.value();
     return deserializer.readLibrary(resolvedUri);
   }
 
@@ -74,7 +82,9 @@
 /// The interface for a system that supports deserialization of libraries and
 /// elements.
 abstract class DeserializerSystem {
-  LibraryElement readLibrary(Uri resolvedUri);
+  Future<LibraryElement> readLibrary(Uri resolvedUri);
   bool isDeserialized(Element element);
+  ResolvedAst getResolvedAst(Element element);
+  ResolutionImpact getResolutionImpact(Element element);
   WorldImpact computeWorldImpact(Element element);
 }
diff --git a/pkg/compiler/lib/src/serialization/type_serialization.dart b/pkg/compiler/lib/src/serialization/type_serialization.dart
index 7ea60ff..3d4cb9f 100644
--- a/pkg/compiler/lib/src/serialization/type_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/type_serialization.dart
@@ -22,25 +22,20 @@
 
   void visitVoidType(VoidType type, ObjectEncoder encoder) {}
 
-  void visitTypeVariableType(TypeVariableType type,
-                             ObjectEncoder encoder) {
+  void visitTypeVariableType(TypeVariableType type, ObjectEncoder encoder) {
     encoder.setElement(Key.ELEMENT, type.element);
   }
 
-  void visitFunctionType(FunctionType type,
-                         ObjectEncoder encoder) {
+  void visitFunctionType(FunctionType type, ObjectEncoder encoder) {
     // TODO(johnniwinther): Support encoding of `type.element`.
     encoder.setType(Key.RETURN_TYPE, type.returnType);
     encoder.setTypes(Key.PARAMETER_TYPES, type.parameterTypes);
-    encoder.setTypes(
-        Key.OPTIONAL_PARAMETER_TYPES, type.optionalParameterTypes);
+    encoder.setTypes(Key.OPTIONAL_PARAMETER_TYPES, type.optionalParameterTypes);
     encoder.setStrings(Key.NAMED_PARAMETERS, type.namedParameters);
     encoder.setTypes(Key.NAMED_PARAMETER_TYPES, type.namedParameterTypes);
   }
 
-  void visitMalformedType(MalformedType type, ObjectEncoder encoder) {
-
-  }
+  void visitMalformedType(MalformedType type, ObjectEncoder encoder) {}
 
   void visitInterfaceType(InterfaceType type, ObjectEncoder encoder) {
     encoder.setElement(Key.ELEMENT, type.element);
@@ -55,12 +50,10 @@
   void visitDynamicType(DynamicType type, ObjectEncoder encoder) {}
 }
 
-
 /// Utility class for deserializing [DartType]s.
 ///
 /// This is used by the [Deserializer].
 class TypeDeserializer {
-
   /// Deserializes a [DartType] from an [ObjectDecoder].
   ///
   /// The class is called from the [Deserializer] when a [DartType] needs
@@ -70,26 +63,20 @@
     TypeKind typeKind = decoder.getEnum(Key.KIND, TypeKind.values);
     switch (typeKind) {
       case TypeKind.INTERFACE:
-        return new InterfaceType(
-            decoder.getElement(Key.ELEMENT),
+        return new InterfaceType(decoder.getElement(Key.ELEMENT),
             decoder.getTypes(Key.TYPE_ARGUMENTS, isOptional: true));
       case TypeKind.FUNCTION:
         // TODO(johnniwinther): Support decoding of `type.element`.
         return new FunctionType.synthesized(
             decoder.getType(Key.RETURN_TYPE),
             decoder.getTypes(Key.PARAMETER_TYPES, isOptional: true),
-            decoder.getTypes(
-                Key.OPTIONAL_PARAMETER_TYPES, isOptional: true),
-            decoder.getStrings(
-                Key.NAMED_PARAMETERS, isOptional: true),
-            decoder.getTypes(
-                Key.NAMED_PARAMETER_TYPES, isOptional: true));
+            decoder.getTypes(Key.OPTIONAL_PARAMETER_TYPES, isOptional: true),
+            decoder.getStrings(Key.NAMED_PARAMETERS, isOptional: true),
+            decoder.getTypes(Key.NAMED_PARAMETER_TYPES, isOptional: true));
       case TypeKind.TYPE_VARIABLE:
-        return new TypeVariableType(
-            decoder.getElement(Key.ELEMENT));
+        return new TypeVariableType(decoder.getElement(Key.ELEMENT));
       case TypeKind.TYPEDEF:
-        return new TypedefType(
-            decoder.getElement(Key.ELEMENT),
+        return new TypedefType(decoder.getElement(Key.ELEMENT),
             decoder.getTypes(Key.TYPE_ARGUMENTS, isOptional: true));
       case TypeKind.STATEMENT:
       case TypeKind.MALFORMED_TYPE:
@@ -101,4 +88,3 @@
     }
   }
 }
-
diff --git a/pkg/compiler/lib/src/serialization/values.dart b/pkg/compiler/lib/src/serialization/values.dart
index 4e49de4..637123c 100644
--- a/pkg/compiler/lib/src/serialization/values.dart
+++ b/pkg/compiler/lib/src/serialization/values.dart
@@ -48,7 +48,7 @@
   String toString() => element.toString();
 }
 
-class TypeValue implements Value  {
+class TypeValue implements Value {
   final DartType type;
   final Value id;
 
@@ -59,7 +59,7 @@
   String toString() => type.toString();
 }
 
-class ConstantValue implements Value  {
+class ConstantValue implements Value {
   final ConstantExpression constant;
   final Value id;
 
diff --git a/pkg/compiler/lib/src/source_file_provider.dart b/pkg/compiler/lib/src/source_file_provider.dart
index 2269a9e..e5b3a03 100644
--- a/pkg/compiler/lib/src/source_file_provider.dart
+++ b/pkg/compiler/lib/src/source_file_provider.dart
@@ -56,50 +56,46 @@
       source = readAll(resourceUri.toFilePath());
     } on FileSystemException catch (ex) {
       OSError ose = ex.osError;
-      String detail = (ose != null && ose.message != null)
-          ? ' (${ose.message})'
-          : '';
+      String detail =
+          (ose != null && ose.message != null) ? ' (${ose.message})' : '';
       return new Future.error(
           "Error reading '${relativize(cwd, resourceUri, isWindows)}'"
           "$detail");
     }
     dartCharactersRead += source.length;
-    sourceFiles[resourceUri] =
-        new CachingUtf8BytesSourceFile(
-            resourceUri, relativizeUri(resourceUri), source);
+    sourceFiles[resourceUri] = new CachingUtf8BytesSourceFile(
+        resourceUri, relativizeUri(resourceUri), source);
     return new Future.value(source);
   }
 
   Future<List<int>> _readFromHttp(Uri resourceUri) {
     assert(resourceUri.scheme == 'http');
     HttpClient client = new HttpClient();
-    return client.getUrl(resourceUri)
+    return client
+        .getUrl(resourceUri)
         .then((HttpClientRequest request) => request.close())
         .then((HttpClientResponse response) {
-          if (response.statusCode != HttpStatus.OK) {
-            String msg = 'Failure getting $resourceUri: '
-                      '${response.statusCode} ${response.reasonPhrase}';
-            throw msg;
-          }
-          return response.toList();
-        })
-        .then((List<List<int>> splitContent) {
-           int totalLength = splitContent.fold(0, (int old, List list) {
-             return old + list.length;
-           });
-           Uint8List result = new Uint8List(totalLength);
-           int offset = 0;
-           for (List<int> contentPart in splitContent) {
-             result.setRange(
-                 offset, offset + contentPart.length, contentPart);
-             offset += contentPart.length;
-           }
-           dartCharactersRead += totalLength;
-           sourceFiles[resourceUri] =
-               new CachingUtf8BytesSourceFile(
-                   resourceUri, resourceUri.toString(), result);
-           return result;
-         });
+      if (response.statusCode != HttpStatus.OK) {
+        String msg = 'Failure getting $resourceUri: '
+            '${response.statusCode} ${response.reasonPhrase}';
+        throw msg;
+      }
+      return response.toList();
+    }).then((List<List<int>> splitContent) {
+      int totalLength = splitContent.fold(0, (int old, List list) {
+        return old + list.length;
+      });
+      Uint8List result = new Uint8List(totalLength);
+      int offset = 0;
+      for (List<int> contentPart in splitContent) {
+        result.setRange(offset, offset + contentPart.length, contentPart);
+        offset += contentPart.length;
+      }
+      dartCharactersRead += totalLength;
+      sourceFiles[resourceUri] = new CachingUtf8BytesSourceFile(
+          resourceUri, resourceUri.toString(), result);
+      return result;
+    });
   }
 
   // TODO(johnniwinther): Remove this when no longer needed for the old compiler
@@ -140,7 +136,7 @@
 
   FormattingDiagnosticHandler([SourceFileProvider provider])
       : this.provider =
-          (provider == null) ? new CompilerSourceFileProvider() : provider;
+            (provider == null) ? new CompilerSourceFileProvider() : provider;
 
   void info(var message, [api.Diagnostic kind = api.Diagnostic.VERBOSE_INFO]) {
     if (!verbose && kind == api.Diagnostic.VERBOSE_INFO) return;
@@ -171,7 +167,7 @@
 
   @override
   void report(var code, Uri uri, int begin, int end, String message,
-              api.Diagnostic kind) {
+      api.Diagnostic kind) {
     // TODO(ahe): Remove this when source map is handled differently.
     if (identical(kind.name, 'source map')) return;
 
@@ -219,12 +215,12 @@
     } else {
       SourceFile file = provider.sourceFiles[uri];
       if (file != null) {
-        print(file.getLocationMessage(
-          color(message), begin, end, colorize: color));
+        print(file.getLocationMessage(color(message), begin, end,
+            colorize: color));
       } else {
         String position = end - begin > 0 ? '@$begin+${end - begin}' : '';
         print('${provider.relativizeUri(uri)}$position:\n'
-              '${color(message)}');
+            '${color(message)}');
       }
     }
     if (fatal && ++fatalCount >= throwOnErrorCount && throwOnError) {
@@ -251,10 +247,8 @@
   int totalCharactersWritten = 0;
   List<String> allOutputFiles = new List<String>();
 
-  RandomAccessFileOutputProvider(this.out,
-                                 this.sourceMapOut,
-                                 {this.onInfo,
-                                  this.onFailure});
+  RandomAccessFileOutputProvider(this.out, this.sourceMapOut,
+      {this.onInfo, this.onFailure});
 
   static Uri computePrecompiledUri(Uri out) {
     String extension = 'precompiled.js';
@@ -281,7 +275,7 @@
       } else if (extension == 'precompiled.js') {
         uri = computePrecompiledUri(out);
         onInfo("File ($uri) is compatible with header"
-               " \"Content-Security-Policy: script-src 'self'\"");
+            " \"Content-Security-Policy: script-src 'self'\"");
       } else if (extension == 'js.map' || extension == 'dart.map') {
         uri = sourceMapOut;
       } else if (extension == "info.json") {
@@ -301,7 +295,7 @@
     RandomAccessFile output;
     try {
       output = new File(uri.toFilePath()).openSync(mode: FileMode.WRITE);
-    } on FileSystemException catch(e) {
+    } on FileSystemException catch (e) {
       onFailure('$e');
     }
 
@@ -311,7 +305,7 @@
 
     writeStringSync(String data) {
       // Write the data in chunks of 8kb, otherwise we risk running OOM.
-      int chunkSize = 8*1024;
+      int chunkSize = 8 * 1024;
 
       int offset = 0;
       while (offset < data.length) {
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 85fd583..a05158d 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -2,7 +2,48 @@
 // for 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 ssa;
+import 'dart:collection';
+
+import 'package:js_runtime/shared/embedded_names.dart';
+
+import '../closure.dart';
+import '../common.dart';
+import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
+import '../common/names.dart' show Identifiers, Selectors;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
+import '../constants/constant_system.dart';
+import '../constants/expressions.dart';
+import '../constants/values.dart';
+import '../core_types.dart' show CoreClasses;
+import '../dart_types.dart';
+import '../diagnostics/messages.dart' show Message, MessageTemplate;
+import '../elements/elements.dart';
+import '../elements/modelx.dart'
+    show ConstructorBodyElementX, ElementX, VariableElementX;
+import '../io/source_information.dart';
+import '../js/js.dart' as js;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart';
+import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
+import '../native/native.dart' as native;
+import '../resolution/operators.dart';
+import '../resolution/semantic_visitor.dart';
+import '../resolution/tree_elements.dart' show TreeElements;
+import '../tree/tree.dart' as ast;
+import '../types/types.dart';
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/side_effects.dart' show SideEffects;
+import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
+import '../util/util.dart';
+import '../world.dart' show ClassWorld, World;
+import '../dump_info.dart' show InfoReporter;
+
+import 'nodes.dart';
+import 'codegen.dart';
+import 'optimize.dart';
+import 'types.dart';
 
 class SsaFunctionCompiler implements FunctionCompiler {
   final SsaCodeGeneratorTask generator;
@@ -11,7 +52,7 @@
   final JavaScriptBackend backend;
 
   SsaFunctionCompiler(JavaScriptBackend backend,
-                      SourceInformationStrategy sourceInformationFactory)
+      SourceInformationStrategy sourceInformationFactory)
       : generator = new SsaCodeGeneratorTask(backend, sourceInformationFactory),
         builder = new SsaBuilderTask(backend, sourceInformationFactory),
         optimizer = new SsaOptimizerTask(backend),
@@ -56,9 +97,9 @@
   String get name => 'SSA builder';
 
   SsaBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory)
-    : emitter = backend.emitter,
-      backend = backend,
-      super(backend.compiler);
+      : emitter = backend.emitter,
+        backend = backend,
+        super(backend.compiler);
 
   DiagnosticReporter get reporter => compiler.reporter;
 
@@ -66,11 +107,14 @@
     return measure(() {
       Element element = work.element.implementation;
       return reporter.withCurrentElement(element, () {
-        SsaBuilder builder =
-            new SsaBuilder(work.element.implementation,
-                work.resolutionTree, work.compilationContext, work.registry,
-                backend, emitter.nativeEmitter,
-                sourceInformationFactory);
+        SsaBuilder builder = new SsaBuilder(
+            work.element.implementation,
+            work.resolutionTree,
+            work.compilationContext,
+            work.registry,
+            backend,
+            emitter.nativeEmitter,
+            sourceInformationFactory);
         HGraph graph = builder.build();
 
         // Default arguments are handled elsewhere, but we must ensure
@@ -97,15 +141,13 @@
           } else {
             name = "${element.name}";
           }
-          compiler.tracer.traceCompilation(
-              name, work.compilationContext);
+          compiler.tracer.traceCompilation(name, work.compilationContext);
           compiler.tracer.traceGraph('builder', graph);
         }
         return graph;
       });
     });
   }
-
 }
 
 /**
@@ -123,8 +165,7 @@
    * e.g. Element hash codes.  I'd prefer to use a SortedMap but some elements
    * don't have source locations for [Elements.compareByPosition].
    */
-  Map<Local, HInstruction> directLocals =
-      new Map<Local, HInstruction>();
+  Map<Local, HInstruction> directLocals = new Map<Local, HInstruction>();
   Map<Local, CapturedVariable> redirectionMapping =
       new Map<Local, CapturedVariable>();
   SsaBuilder builder;
@@ -159,11 +200,10 @@
     return builder.sourceInformationBuilder;
   }
 
-  LocalsHandler(this.builder, this.executableContext,
-                InterfaceType instanceType)
-      : this.instanceType =
-          instanceType == null || instanceType.containsTypeVariables
-              ? null : instanceType;
+  LocalsHandler(
+      this.builder, this.executableContext, InterfaceType instanceType)
+      : this.instanceType = instanceType == null ||
+            instanceType.containsTypeVariables ? null : instanceType;
 
   /// Substituted type variables occurring in [type] into the context of
   /// [contextClass].
@@ -171,8 +211,7 @@
     if (contextClass != null) {
       ClassElement typeContext = Types.getClassContext(type);
       if (typeContext != null) {
-        type = type.substByContext(
-            contextClass.asInstanceOf(typeContext));
+        type = type.substByContext(contextClass.asInstanceOf(typeContext));
       }
     }
     if (instanceType != null) {
@@ -211,9 +250,7 @@
     // just creating an empty object literal?
     JavaScriptBackend backend = builder.backend;
     HInstruction box = new HForeignCode(
-        js.js.parseForeignJS('{}'),
-        backend.nonNullType,
-        <HInstruction>[],
+        js.js.parseForeignJS('{}'), backend.nonNullType, <HInstruction>[],
         nativeBehavior: native.NativeBehavior.PURE_ALLOCATION);
     builder.add(box);
     return box;
@@ -267,8 +304,8 @@
    * Replaces the current box with a new box and copies over the given list
    * of elements from the old box into the new box.
    */
-  void updateCaptureBox(BoxLocal boxElement,
-                        List<LocalVariableElement> toBeCopiedElements) {
+  void updateCaptureBox(
+      BoxLocal boxElement, List<LocalVariableElement> toBeCopiedElements) {
     // Create a new box and copy over the values from the old box into the
     // new one.
     HInstruction oldBox = readLocal(boxElement);
@@ -292,8 +329,8 @@
   void startFunction(Element element, ast.Node node) {
     assert(invariant(element, element.isImplementation));
     Compiler compiler = builder.compiler;
-    closureData = compiler.closureToClassMapper.computeClosureToClassMapping(
-            element, node, builder.elements);
+    closureData = compiler.closureToClassMapper
+        .computeClosureToClassMapping(element, node, builder.elements);
 
     if (element is FunctionElement) {
       FunctionElement functionElement = element;
@@ -308,8 +345,7 @@
             return;
           }
         }
-        HInstruction parameter = builder.addParameter(
-            parameterElement,
+        HInstruction parameter = builder.addParameter(parameterElement,
             TypeMaskFactory.inferredTypeForElement(parameterElement, compiler));
         builder.parameters[parameterElement] = parameter;
         directLocals[parameterElement] = parameter;
@@ -327,8 +363,8 @@
     JavaScriptBackend backend = compiler.backend;
     if (closureData.isClosure) {
       // Inside closure redirect references to itself to [:this:].
-      HThis thisInstruction = new HThis(closureData.thisLocal,
-                                        backend.nonNullType);
+      HThis thisInstruction =
+          new HThis(closureData.thisLocal, backend.nonNullType);
       builder.graph.thisInstruction = thisInstruction;
       builder.graph.entry.addAtEntry(thisInstruction);
       updateLocal(closureData.closureElement, thisInstruction);
@@ -336,8 +372,8 @@
       // Once closures have been mapped to classes their instance members might
       // not have any thisElement if the closure was created inside a static
       // context.
-      HThis thisInstruction = new HThis(
-          closureData.thisLocal, builder.getTypeOfThis());
+      HThis thisInstruction =
+          new HThis(closureData.thisLocal, builder.getTypeOfThis());
       builder.graph.thisInstruction = thisInstruction;
       builder.graph.entry.addAtEntry(thisInstruction);
       directLocals[closureData.thisLocal] = thisInstruction;
@@ -352,8 +388,8 @@
     // and passed to the generative constructor factory function as a parameter.
     // Instead of allocating and initializing the object, the constructor
     // 'upgrades' the native subclass object by initializing the Dart fields.
-    bool isNativeUpgradeFactory = element.isGenerativeConstructor
-        && backend.isNativeOrExtendsNative(cls);
+    bool isNativeUpgradeFactory =
+        element.isGenerativeConstructor && backend.isNativeOrExtendsNative(cls);
     if (backend.isInterceptedMethod(element)) {
       bool isInterceptorClass = backend.isInterceptorClass(cls.declaration);
       String name = isInterceptorClass ? 'receiver' : '_';
@@ -389,8 +425,8 @@
    */
   bool isAccessedDirectly(Local local) {
     assert(local != null);
-    return !redirectionMapping.containsKey(local)
-        && !closureData.variablesUsedInTryOrGenerator.contains(local);
+    return !redirectionMapping.containsKey(local) &&
+        !closureData.variablesUsedInTryOrGenerator.contains(local);
   }
 
   bool isStoredInClosureField(Local local) {
@@ -416,16 +452,14 @@
    * boxed or stored in a closure then the method generates code to retrieve
    * the value.
    */
-  HInstruction readLocal(Local local,
-                         {SourceInformation sourceInformation}) {
+  HInstruction readLocal(Local local, {SourceInformation sourceInformation}) {
     if (isAccessedDirectly(local)) {
       if (directLocals[local] == null) {
         if (local is TypeVariableElement) {
           builder.reporter.internalError(builder.compiler.currentElement,
               "Runtime type information not available for $local.");
         } else {
-          builder.reporter.internalError(local,
-              "Cannot find value $local.");
+          builder.reporter.internalError(local, "Cannot find value $local.");
         }
       }
       HInstruction value = directLocals[local];
@@ -473,8 +507,7 @@
     return res;
   }
 
-  HLocalValue getLocal(Local local,
-                       {SourceInformation sourceInformation}) {
+  HLocalValue getLocal(Local local, {SourceInformation sourceInformation}) {
     // If the element is a parameter, we already have a
     // HParameterValue for it. We cannot create another one because
     // it could then have another name than the real parameter. And
@@ -485,7 +518,7 @@
     return builder.activationVariables.putIfAbsent(local, () {
       JavaScriptBackend backend = builder.backend;
       HLocalValue localValue = new HLocalValue(local, backend.nonNullType)
-          ..sourceInformation = sourceInformation;
+        ..sourceInformation = sourceInformation;
       builder.graph.entry.addAtExit(localValue);
       return localValue;
     });
@@ -502,7 +535,7 @@
    * closure then the method generates code to set the value.
    */
   void updateLocal(Local local, HInstruction value,
-                   {SourceInformation sourceInformation}) {
+      {SourceInformation sourceInformation}) {
     if (value is HRef) {
       HRef ref = value;
       value = ref.value;
@@ -518,12 +551,12 @@
       // be accessed directly.
       HInstruction box = readLocal(redirect.box);
       builder.add(new HFieldSet(redirect, box, value)
-          ..sourceInformation = sourceInformation);
+        ..sourceInformation = sourceInformation);
     } else {
       assert(isUsedInTryOrGenerator(local));
       HLocalValue localValue = getLocal(local);
       builder.add(new HLocalSet(local, localValue, value)
-          ..sourceInformation = sourceInformation);
+        ..sourceInformation = sourceInformation);
     }
   }
 
@@ -596,13 +629,12 @@
 
     JavaScriptBackend backend = builder.backend;
     // Create phis for all elements in the definitions environment.
-    savedDirectLocals.forEach((Local local,
-                               HInstruction instruction) {
+    savedDirectLocals.forEach((Local local, HInstruction instruction) {
       if (isAccessedDirectly(local)) {
         // We know 'this' cannot be modified.
         if (local != closureData.thisLocal) {
-          HPhi phi = new HPhi.singleInput(
-              local, instruction, backend.dynamicType);
+          HPhi phi =
+              new HPhi.singleInput(local, instruction, backend.dynamicType);
           loopEntry.addPhi(phi);
           directLocals[local] = phi;
         } else {
@@ -662,11 +694,9 @@
     // block. Since variable declarations are scoped the declared
     // variable cannot be alive outside the block. Note: this is only
     // true for nodes where we do joins.
-    Map<Local, HInstruction> joinedLocals =
-        new Map<Local, HInstruction>();
+    Map<Local, HInstruction> joinedLocals = new Map<Local, HInstruction>();
     JavaScriptBackend backend = builder.backend;
-    otherLocals.directLocals.forEach((Local local,
-                                      HInstruction instruction) {
+    otherLocals.directLocals.forEach((Local local, HInstruction instruction) {
       // We know 'this' cannot be modified.
       if (local == closureData.thisLocal) {
         assert(directLocals[local] == instruction);
@@ -694,12 +724,11 @@
    * used for its values, only for its declared variables. This is a way to
    * exclude local values from the result when they are no longer in scope.
    */
-  LocalsHandler mergeMultiple(List<LocalsHandler> localsHandlers,
-                              HBasicBlock joinBlock) {
+  LocalsHandler mergeMultiple(
+      List<LocalsHandler> localsHandlers, HBasicBlock joinBlock) {
     assert(localsHandlers.length > 0);
     if (localsHandlers.length == 1) return localsHandlers[0];
-    Map<Local, HInstruction> joinedLocals =
-        new Map<Local, HInstruction>();
+    Map<Local, HInstruction> joinedLocals = new Map<Local, HInstruction>();
     HInstruction thisValue = null;
     JavaScriptBackend backend = builder.backend;
     directLocals.forEach((Local local, HInstruction instruction) {
@@ -715,8 +744,7 @@
       }
     });
     for (LocalsHandler handler in localsHandlers) {
-      handler.directLocals.forEach((Local local,
-                                    HInstruction instruction) {
+      handler.directLocals.forEach((Local local, HInstruction instruction) {
         HPhi phi = joinedLocals[local];
         if (phi != null) {
           phi.addInput(instruction);
@@ -730,10 +758,9 @@
 
     // Remove locals that are not in all handlers.
     directLocals = new Map<Local, HInstruction>();
-    joinedLocals.forEach((Local local,
-                          HInstruction instruction) {
-      if (local != closureData.thisLocal
-          && instruction.inputs.length != localsHandlers.length) {
+    joinedLocals.forEach((Local local, HInstruction instruction) {
+      if (local != closureData.thisLocal &&
+          instruction.inputs.length != localsHandlers.length) {
         joinBlock.removePhi(instruction);
       } else {
         directLocals[local] = instruction;
@@ -743,7 +770,6 @@
   }
 }
 
-
 // Represents a single break/continue instruction.
 class JumpHandlerEntry {
   final HJump jumpInstruction;
@@ -753,7 +779,6 @@
   JumpHandlerEntry(this.jumpInstruction, this.locals);
 }
 
-
 abstract class JumpHandler {
   factory JumpHandler(SsaBuilder builder, JumpTarget target) {
     return new TargetJumpHandler(builder, target);
@@ -761,8 +786,8 @@
   void generateBreak([LabelDefinition label]);
   void generateContinue([LabelDefinition label]);
   void forEachBreak(void action(HBreak instruction, LocalsHandler locals));
-  void forEachContinue(void action(HContinue instruction,
-                                   LocalsHandler locals));
+  void forEachContinue(
+      void action(HContinue instruction, LocalsHandler locals));
   bool hasAnyContinue();
   bool hasAnyBreak();
   void close();
@@ -788,9 +813,9 @@
         'NullJumpHandler.generateContinue should not be called.');
   }
 
-  void forEachBreak(Function ignored) { }
-  void forEachContinue(Function ignored) { }
-  void close() { }
+  void forEachBreak(Function ignored) {}
+  void forEachContinue(Function ignored) {}
+  void close() {}
   bool hasAnyContinue() => false;
   bool hasAnyBreak() => false;
 
@@ -889,9 +914,8 @@
   /// switch case loop.
   final Map<JumpTarget, int> targetIndexMap = new Map<JumpTarget, int>();
 
-  SwitchCaseJumpHandler(SsaBuilder builder,
-                        JumpTarget target,
-                        ast.SwitchStatement node)
+  SwitchCaseJumpHandler(
+      SsaBuilder builder, JumpTarget target, ast.SwitchStatement node)
       : super(builder, target) {
     // The switch case indices must match those computed in
     // [SsaFromAstMixin.buildSwitchCaseConstants].
@@ -943,9 +967,8 @@
       // [SsaFromAstMixin.buildComplexSwitchStatement] for detail.
 
       assert(label != null);
-      HInstruction value = builder.graph.addConstantInt(
-          targetIndexMap[label.target],
-          builder.compiler);
+      HInstruction value = builder.graph
+          .addConstantInt(targetIndexMap[label.target], builder.compiler);
       builder.localsHandler.updateLocal(target, value);
 
       assert(label.target.labels.contains(label));
@@ -971,13 +994,14 @@
  * This class builds SSA nodes for functions represented in AST.
  */
 class SsaBuilder extends ast.Visitor
-    with BaseImplementationOfCompoundsMixin,
-         BaseImplementationOfSetIfNullsMixin,
-         SemanticSendResolvedMixin,
-         NewBulkMixin,
-         ErrorBulkMixin
+    with
+        BaseImplementationOfCompoundsMixin,
+        BaseImplementationOfSetIfNullsMixin,
+        BaseImplementationOfSuperIndexSetIfNullMixin,
+        SemanticSendResolvedMixin,
+        NewBulkMixin,
+        ErrorBulkMixin
     implements SemanticSendVisitor {
-
   /// The element for which this SSA builder is being used.
   final Element target;
 
@@ -1081,8 +1105,7 @@
    * being updated in try/catch blocks, and should be
    * accessed indirectly through [HLocalGet] and [HLocalSet].
    */
-  Map<Local, HLocalValue> activationVariables =
-      <Local, HLocalValue>{};
+  Map<Local, HLocalValue> activationVariables = <Local, HLocalValue>{};
 
   // We build the Ssa graph by simulating a stack machine.
   List<HInstruction> stack = <HInstruction>[];
@@ -1091,24 +1114,29 @@
   bool get isBuildingAsyncFunction {
     Element element = sourceElement;
     return (element is FunctionElement &&
-            element.asyncMarker == AsyncMarker.ASYNC);
+        element.asyncMarker == AsyncMarker.ASYNC);
   }
 
   // TODO(sigmund): make most args optional
-  SsaBuilder(this.target, this.elements, this.context, this.registry,
-      JavaScriptBackend backend, this.nativeEmitter,
+  SsaBuilder(
+      this.target,
+      this.elements,
+      this.context,
+      this.registry,
+      JavaScriptBackend backend,
+      this.nativeEmitter,
       SourceInformationStrategy sourceInformationFactory)
-    : this.compiler = backend.compiler,
-      this.infoReporter = backend.compiler.dumpInfoTask,
-      this.backend = backend,
-      this.constantSystem = backend.constantSystem,
-      this.rti = backend.rti {
+      : this.compiler = backend.compiler,
+        this.infoReporter = backend.compiler.dumpInfoTask,
+        this.backend = backend,
+        this.constantSystem = backend.constantSystem,
+        this.rti = backend.rti {
     assert(target.isImplementation);
     graph.element = target;
     localsHandler = new LocalsHandler(this, target, null);
     sourceElementStack.add(target);
-    sourceInformationBuilder = sourceInformationFactory.createBuilderForContext(
-            target);
+    sourceInformationBuilder =
+        sourceInformationFactory.createBuilderForContext(target);
     graph.sourceInformation =
         sourceInformationBuilder.buildVariableDeclaration();
   }
@@ -1142,7 +1170,8 @@
   Element get sourceElement => sourceElementStack.last;
 
   bool get _checkOrTrustTypes =>
-      compiler.enableTypeAssertions || compiler.trustTypeAnnotations;
+      compiler.options.enableTypeAssertions ||
+      compiler.options.trustTypeAnnotations;
 
   /// Build the graph for [target].
   HGraph build() {
@@ -1154,14 +1183,14 @@
     if (target.isGenerativeConstructor) {
       result = buildFactory(target);
     } else if (target.isGenerativeConstructorBody ||
-               target.isFactoryConstructor ||
-               target.isFunction ||
-               target.isGetter ||
-               target.isSetter) {
+        target.isFactoryConstructor ||
+        target.isFunction ||
+        target.isGetter ||
+        target.isSetter) {
       result = buildMethod(target);
     } else if (target.isField) {
       if (target.isInstanceMember) {
-        assert(compiler.enableTypeAssertions);
+        assert(compiler.options.enableTypeAssertions);
         result = buildCheckedSetter(target);
       } else {
         result = buildLazyInitializer(target);
@@ -1173,7 +1202,6 @@
     return result;
   }
 
-
   HBasicBlock addNewBlock() {
     HBasicBlock block = graph.addNewBlock();
     // If adding a new block during building of an expression, it is due to
@@ -1244,11 +1272,12 @@
     bool isInstanceMember = function.isInstanceMember;
     // For static calls, [providedArguments] is complete, default arguments
     // have been included if necessary, see [makeStaticArgumentList].
-    if (!isInstanceMember
-        || currentNode == null // In erroneous code, currentNode can be null.
-        || providedArgumentsKnownToBeComplete(currentNode)
-        || function.isGenerativeConstructorBody
-        || selector.isGetter) {
+    if (!isInstanceMember ||
+        currentNode == null // In erroneous code, currentNode can be null.
+        ||
+        providedArgumentsKnownToBeComplete(currentNode) ||
+        function.isGenerativeConstructorBody ||
+        selector.isGetter) {
       // For these cases, the provided argument list is known to be complete.
       return providedArguments;
     } else {
@@ -1271,10 +1300,8 @@
    * the provided named arguments (the named arguments that are defined in the
    * [selector]) in a specific order (see [addDynamicSendArgumentsToList]).
    */
-  List<HInstruction> completeDynamicSendArgumentsList(
-      Selector selector,
-      FunctionElement function,
-      List<HInstruction> providedArguments) {
+  List<HInstruction> completeDynamicSendArgumentsList(Selector selector,
+      FunctionElement function, List<HInstruction> providedArguments) {
     assert(selector.applies(function, compiler.world));
     FunctionSignature signature = function.functionSignature;
     List<HInstruction> compiledArguments = new List<HInstruction>(
@@ -1331,12 +1358,9 @@
    * Try to inline [element] within the currect context of the builder. The
    * insertion point is the state of the builder.
    */
-  bool tryInlineMethod(Element element,
-                       Selector selector,
-                       TypeMask mask,
-                       List<HInstruction> providedArguments,
-                       ast.Node currentNode,
-                       {InterfaceType instanceType}) {
+  bool tryInlineMethod(Element element, Selector selector, TypeMask mask,
+      List<HInstruction> providedArguments, ast.Node currentNode,
+      {InterfaceType instanceType}) {
     // TODO(johnniwinther): Register this on the [registry]. Currently the
     // [CodegenRegistry] calls the enqueuer, but [element] should _not_ be
     // enqueued.
@@ -1362,13 +1386,13 @@
     if (cachedCanBeInlined == false) return false;
 
     bool meetsHardConstraints() {
-      if (compiler.disableInlining) return false;
+      if (compiler.options.disableInlining) return false;
 
       assert(invariant(
           currentNode != null ? currentNode : element,
           selector != null ||
-          Elements.isStaticOrTopLevel(element) ||
-          element.isGenerativeConstructorBody,
+              Elements.isStaticOrTopLevel(element) ||
+              element.isGenerativeConstructorBody,
           message: "Missing selector for inlining of $element."));
       if (selector != null) {
         if (!selector.applies(function, compiler.world)) return false;
@@ -1381,16 +1405,16 @@
 
       // Don't inline operator== methods if the parameter can be null.
       if (element.name == '==') {
-        if (element.enclosingClass != coreClasses.objectClass
-            && providedArguments[1].canBeNull()) {
+        if (element.enclosingClass != coreClasses.objectClass &&
+            providedArguments[1].canBeNull()) {
           return false;
         }
       }
 
       // Generative constructors of native classes should not be called directly
       // and have an extra argument that causes problems with inlining.
-      if (element.isGenerativeConstructor
-          && backend.isNativeOrExtendsNative(element.enclosingClass)) {
+      if (element.isGenerativeConstructor &&
+          backend.isNativeOrExtendsNative(element.enclosingClass)) {
         return false;
       }
 
@@ -1401,9 +1425,7 @@
         // This means that the function always throws an exception.
         TypeMask returnType =
             compiler.typesTask.getGuaranteedReturnTypeOfElement(element);
-        if (returnType != null
-            && returnType.isEmpty
-            && !returnType.isNullable) {
+        if (returnType != null && returnType.isEmpty) {
           isReachable = false;
           return false;
         }
@@ -1415,7 +1437,7 @@
     bool doesNotContainCode() {
       // A function with size 1 does not contain any code.
       return InlineWeeder.canBeInlined(function, 1, true,
-          enableUserAssertions: compiler.enableUserAssertions);
+          enableUserAssertions: compiler.options.enableUserAssertions);
     }
 
     bool reductiveHeuristic() {
@@ -1423,7 +1445,7 @@
       // does not make the program larger.
       if (isCalledOnce(element)) {
         return InlineWeeder.canBeInlined(function, -1, false,
-            enableUserAssertions: compiler.enableUserAssertions);
+            enableUserAssertions: compiler.options.enableUserAssertions);
       }
       // TODO(sra): Measure if inlining would 'reduce' the size.  One desirable
       // case we miss by doing nothing is inlining very simple constructors
@@ -1461,8 +1483,8 @@
         // We may have forced the inlining of some methods. Therefore check
         // if we can inline this method regardless of size.
         assert(InlineWeeder.canBeInlined(function, -1, false,
-                allowLoops: true,
-                enableUserAssertions: compiler.enableUserAssertions));
+            allowLoops: true,
+            enableUserAssertions: compiler.options.enableUserAssertions));
         return true;
       }
 
@@ -1486,7 +1508,7 @@
       bool canInline;
       canInline = InlineWeeder.canBeInlined(
           function, maxInliningNodes, useMaxInliningNodes,
-          enableUserAssertions: compiler.enableUserAssertions);
+          enableUserAssertions: compiler.options.enableUserAssertions);
       if (canInline) {
         backend.inlineCache.markAsInlinable(element, insideLoop: insideLoop);
       } else {
@@ -1504,13 +1526,13 @@
           (mask == null || mask.isNullable)) {
         addWithPosition(
             new HFieldGet(null, providedArguments[0], backend.dynamicType,
-                          isAssignable: false),
+                isAssignable: false),
             currentNode);
       }
       List<HInstruction> compiledArguments = completeSendArgumentsList(
           function, selector, providedArguments, currentNode);
-      enterInlinedMethod(
-          function, currentNode, compiledArguments, instanceType: instanceType);
+      enterInlinedMethod(function, currentNode, compiledArguments,
+          instanceType: instanceType);
       inlinedFrom(function, () {
         if (!isReachable) {
           emitReturn(graph.addConstantNull(compiler), null);
@@ -1535,12 +1557,19 @@
     return inliningStack.isEmpty || inliningStack.last.allFunctionsCalledOnce;
   }
 
-  bool isCalledOnce(Element element) {
-    if (!allInlinedFunctionsCalledOnce) return false;
+  bool isFunctionCalledOnce(Element element) {
+    if (element is ConstructorBodyElement) {
+      // ConstructorBodyElements are not in the type inference graph.
+      return false;
+    }
     TypesInferrer inferrer = compiler.typesTask.typesInferrer;
     return inferrer.isCalledOnce(element);
   }
 
+  bool isCalledOnce(Element element) {
+    return allInlinedFunctionsCalledOnce && isFunctionCalledOnce(element);
+  }
+
   inlinedFrom(Element element, f()) {
     assert(element is FunctionElement || element is VariableElement);
     return reporter.withCurrentElement(element, () {
@@ -1658,8 +1687,8 @@
       push(invokeJsInteropFunction(functionElement, parameters.values.toList(),
           sourceInformationBuilder.buildGeneric(function)));
       var value = pop();
-      closeAndGotoExit(new HReturn(value,
-          sourceInformationBuilder.buildReturn(functionElement.node)));
+      closeAndGotoExit(new HReturn(
+          value, sourceInformationBuilder.buildReturn(functionElement.node)));
       return closeFunction();
     }
     assert(invariant(functionElement, !function.modifiers.isExternal));
@@ -1669,27 +1698,21 @@
     // null check.
     if (name == '==') {
       if (!backend.operatorEqHandlesNullArgument(functionElement)) {
-        handleIf(
-            function,
-            visitCondition: () {
-              HParameterValue parameter = parameters.values.first;
-              push(new HIdentity(
-                  parameter, graph.addConstantNull(compiler), null,
-                  backend.boolType));
-            },
-            visitThen: () {
-              closeAndGotoExit(new HReturn(
-                  graph.addConstantBool(false, compiler),
-                  sourceInformationBuilder
-                      .buildImplicitReturn(functionElement)));
-            },
+        handleIf(function, visitCondition: () {
+          HParameterValue parameter = parameters.values.first;
+          push(new HIdentity(parameter, graph.addConstantNull(compiler), null,
+              backend.boolType));
+        }, visitThen: () {
+          closeAndGotoExit(new HReturn(graph.addConstantBool(false, compiler),
+              sourceInformationBuilder.buildImplicitReturn(functionElement)));
+        },
             visitElse: null,
             sourceInformation: sourceInformationBuilder.buildIf(function.body));
       }
     }
     if (const bool.fromEnvironment('unreachable-throw') == true) {
-      var emptyParameters = parameters.values.where((p) =>
-          p.instructionType.isEmpty && !p.instructionType.isNullable);
+      var emptyParameters =
+          parameters.values.where((p) => p.instructionType.isEmpty);
       if (emptyParameters.length > 0) {
         addComment('${emptyParameters} inferred as [empty]');
         pushInvokeStatic(function.body, helpers.assertUnreachableMethod, []);
@@ -1707,10 +1730,8 @@
   /// having side effects which will inhibit code motion.
   // TODO(sra): Figure out how to keep comment anchored without effects.
   void addComment(String text) {
-    add(new HForeignCode(
-        js.js.statementTemplateYielding(new js.Comment(text)),
-        backend.dynamicType,
-        <HInstruction>[],
+    add(new HForeignCode(js.js.statementTemplateYielding(new js.Comment(text)),
+        backend.dynamicType, <HInstruction>[],
         isStatement: true));
   }
 
@@ -1756,8 +1777,8 @@
     if (constructor.isSynthesized) return null;
     ast.FunctionExpression node = constructor.node;
     // If we know the body doesn't have any code, we don't generate it.
-    if (!node.hasBody()) return null;
-    if (node.hasEmptyBody()) return null;
+    if (!node.hasBody) return null;
+    if (node.hasEmptyBody) return null;
     ClassElement classElement = constructor.enclosingClass;
     ConstructorBodyElement bodyElement;
     classElement.forEachBackendMember((Element backendMember) {
@@ -1808,16 +1829,14 @@
    * updated in the [localsHandler]. This function creates such an element and
    * stores it in the [returnLocal] field.
    */
-  void setupStateForInlining(FunctionElement function,
-                             List<HInstruction> compiledArguments,
-                             {InterfaceType instanceType}) {
+  void setupStateForInlining(
+      FunctionElement function, List<HInstruction> compiledArguments,
+      {InterfaceType instanceType}) {
     localsHandler = new LocalsHandler(this, function, instanceType);
-    localsHandler.closureData =
-        compiler.closureToClassMapper.computeClosureToClassMapping(
-            function, function.node, elements);
+    localsHandler.closureData = compiler.closureToClassMapper
+        .computeClosureToClassMapping(function, function.node, elements);
     returnLocal = new SyntheticLocal("result", function);
-    localsHandler.updateLocal(returnLocal,
-        graph.addConstantNull(compiler));
+    localsHandler.updateLocal(returnLocal, graph.addConstantNull(compiler));
 
     inTryStatement = false; // TODO(lry): why? Document.
 
@@ -1834,8 +1853,8 @@
     });
 
     ClassElement enclosing = function.enclosingClass;
-    if ((function.isConstructor || function.isGenerativeConstructorBody)
-        && backend.classNeedsRti(enclosing)) {
+    if ((function.isConstructor || function.isGenerativeConstructorBody) &&
+        backend.classNeedsRti(enclosing)) {
       enclosing.typeVariables.forEach((TypeVariableType typeVariable) {
         HInstruction argument = compiledArguments[argumentIndex++];
         localsHandler.updateLocal(
@@ -1877,7 +1896,6 @@
     }
   }
 
-
   addInlinedInstantiation(DartType type) {
     if (type != null) {
       currentInlinedInstantiations.add(type);
@@ -1919,11 +1937,12 @@
    *
    * Invariant: [constructors] must contain only implementation elements.
    */
-  void inlineSuperOrRedirect(ConstructorElement callee,
-                             List<HInstruction> compiledArguments,
-                             List<FunctionElement> constructors,
-                             Map<Element, HInstruction> fieldValues,
-                             FunctionElement caller) {
+  void inlineSuperOrRedirect(
+      ConstructorElement callee,
+      List<HInstruction> compiledArguments,
+      List<FunctionElement> constructors,
+      Map<Element, HInstruction> fieldValues,
+      FunctionElement caller) {
     callee = callee.implementation;
     reporter.withCurrentElement(callee, () {
       constructors.add(callee);
@@ -1965,8 +1984,8 @@
       // by the effective target.
       if (!callee.isRedirectingGenerative) {
         inlinedFrom(callee, () {
-          buildFieldInitializers(callee.enclosingClass.implementation,
-                               fieldValues);
+          buildFieldInitializers(
+              callee.enclosingClass.implementation, fieldValues);
         });
       }
 
@@ -1993,9 +2012,8 @@
       elements = resolvedAst.elements;
       ClosureClassMap oldClosureData = localsHandler.closureData;
       ast.Node node = resolvedAst.node;
-      ClosureClassMap newClosureData =
-          compiler.closureToClassMapper.computeClosureToClassMapping(
-              callee, node, elements);
+      ClosureClassMap newClosureData = compiler.closureToClassMapper
+          .computeClosureToClassMapping(callee, node, elements);
       localsHandler.closureData = newClosureData;
       localsHandler.enterScope(node, callee);
       buildInitializers(callee, constructors, fieldValues);
@@ -2014,9 +2032,10 @@
    * Invariant: The [constructor] and elements in [constructors] must all be
    * implementation elements.
    */
-  void buildInitializers(ConstructorElement constructor,
-                         List<FunctionElement> constructors,
-                         Map<Element, HInstruction> fieldValues) {
+  void buildInitializers(
+      ConstructorElement constructor,
+      List<FunctionElement> constructors,
+      Map<Element, HInstruction> fieldValues) {
     assert(invariant(constructor, constructor.isImplementation));
     if (constructor.isSynthesized) {
       List<HInstruction> arguments = <HInstruction>[];
@@ -2040,15 +2059,11 @@
         // forwarding constructor in a mixin application did not match the
         // constructor (which, for example, may happen when the libraries are
         // not compatible for private names, see issue 20394).
-        reporter.internalError(constructor,
-                               'forwarding constructor call does not match');
+        reporter.internalError(
+            constructor, 'forwarding constructor call does not match');
       }
       inlineSuperOrRedirect(
-          target,
-          arguments,
-          constructors,
-          fieldValues,
-          constructor);
+          target, arguments, constructors, fieldValues, constructor);
       return;
     }
     ast.FunctionExpression functionNode = constructor.node;
@@ -2056,14 +2071,16 @@
     bool foundSuperOrRedirect = false;
     if (functionNode.initializers != null) {
       Link<ast.Node> initializers = functionNode.initializers.nodes;
-      for (Link<ast.Node> link = initializers; !link.isEmpty; link = link.tail) {
+      for (Link<ast.Node> link = initializers;
+          !link.isEmpty;
+          link = link.tail) {
         assert(link.head is ast.Send);
-        if (link.head is !ast.SendSet) {
+        if (link.head is! ast.SendSet) {
           // A super initializer or constructor redirection.
           foundSuperOrRedirect = true;
           ast.Send call = link.head;
           assert(ast.Initializers.isSuperConstructorCall(call) ||
-                 ast.Initializers.isConstructorRedirect(call));
+              ast.Initializers.isConstructorRedirect(call));
           FunctionElement target = elements[call].implementation;
           CallStructure callStructure =
               elements.getSelector(call).callStructure;
@@ -2073,11 +2090,8 @@
             compiledArguments =
                 makeStaticArgumentList(callStructure, arguments, target);
           });
-          inlineSuperOrRedirect(target,
-                                compiledArguments,
-                                constructors,
-                                fieldValues,
-                                constructor);
+          inlineSuperOrRedirect(target, compiledArguments, constructors,
+              fieldValues, constructor);
         } else {
           // A field initializer.
           ast.SendSet init = link.head;
@@ -2102,20 +2116,16 @@
         // TODO(johnniwinther): Should we find injected constructors as well?
         FunctionElement target = superClass.lookupDefaultConstructor();
         if (target == null) {
-          reporter.internalError(superClass,
-              "No default constructor available.");
+          reporter.internalError(
+              superClass, "No default constructor available.");
         }
-        List<HInstruction> arguments =
-            CallStructure.NO_ARGS.makeArgumentsList(
-                const Link<ast.Node>(),
-                target.implementation,
-                null,
-                handleConstantForOptionalParameter);
-        inlineSuperOrRedirect(target,
-                              arguments,
-                              constructors,
-                              fieldValues,
-                              constructor);
+        List<HInstruction> arguments = CallStructure.NO_ARGS.makeArgumentsList(
+            const Link<ast.Node>(),
+            target.implementation,
+            null,
+            handleConstantForOptionalParameter);
+        inlineSuperOrRedirect(
+            target, arguments, constructors, fieldValues, constructor);
       }
     }
   }
@@ -2126,36 +2136,36 @@
    *
    * Invariant: [classElement] must be an implementation element.
    */
-  void buildFieldInitializers(ClassElement classElement,
-                              Map<Element, HInstruction> fieldValues) {
+  void buildFieldInitializers(
+      ClassElement classElement, Map<Element, HInstruction> fieldValues) {
     assert(invariant(classElement, classElement.isImplementation));
     classElement.forEachInstanceField(
         (ClassElement enclosingClass, VariableElement member) {
-          if (compiler.elementHasCompileTimeError(member)) return;
-          reporter.withCurrentElement(member, () {
-            TreeElements definitions = member.treeElements;
-            ast.Node node = member.node;
-            ast.Expression initializer = member.initializer;
-            if (initializer == null) {
-              // Unassigned fields of native classes are not initialized to
-              // prevent overwriting pre-initialized native properties.
-              if (!backend.isNativeOrExtendsNative(classElement)) {
-                fieldValues[member] = graph.addConstantNull(compiler);
-              }
-            } else {
-              ast.Node right = initializer;
-              TreeElements savedElements = elements;
-              elements = definitions;
-              // In case the field initializer uses closures, run the
-              // closure to class mapper.
-              compiler.closureToClassMapper.computeClosureToClassMapping(
-                  member, node, elements);
-              inlinedFrom(member, () => right.accept(this));
-              elements = savedElements;
-              fieldValues[member] = pop();
-            }
-          });
-        });
+      if (compiler.elementHasCompileTimeError(member)) return;
+      reporter.withCurrentElement(member, () {
+        TreeElements definitions = member.treeElements;
+        ast.Node node = member.node;
+        ast.Expression initializer = member.initializer;
+        if (initializer == null) {
+          // Unassigned fields of native classes are not initialized to
+          // prevent overwriting pre-initialized native properties.
+          if (!backend.isNativeOrExtendsNative(classElement)) {
+            fieldValues[member] = graph.addConstantNull(compiler);
+          }
+        } else {
+          ast.Node right = initializer;
+          TreeElements savedElements = elements;
+          elements = definitions;
+          // In case the field initializer uses closures, run the
+          // closure to class mapper.
+          compiler.closureToClassMapper
+              .computeClosureToClassMapping(member, node, elements);
+          inlinedFrom(member, () => right.accept(this));
+          elements = savedElements;
+          fieldValues[member] = pop();
+        }
+      });
+    });
   }
 
   /**
@@ -2169,11 +2179,10 @@
    */
   HGraph buildFactory(ConstructorElement functionElement) {
     functionElement = functionElement.implementation;
-    ClassElement classElement =
-        functionElement.enclosingClass.implementation;
+    ClassElement classElement = functionElement.enclosingClass.implementation;
     bool isNativeUpgradeFactory =
-        backend.isNativeOrExtendsNative(classElement)
-            && !backend.isJsInterop(classElement);
+        backend.isNativeOrExtendsNative(classElement) &&
+            !backend.isJsInterop(classElement);
     ast.FunctionExpression function = functionElement.node;
     // Note that constructors (like any other static function) do not need
     // to deal with optional arguments. It is the callers job to provide all
@@ -2200,8 +2209,7 @@
         // If the [element] is a field-parameter then
         // initialize the field element with its value.
         InitializingFormalElement fieldParameter = parameter;
-        HInstruction parameterValue =
-            localsHandler.readLocal(fieldParameter);
+        HInstruction parameterValue = localsHandler.readLocal(fieldParameter);
         fieldValues[fieldParameter.fieldElement] = parameterValue;
       }
     });
@@ -2217,19 +2225,18 @@
 
     classElement.forEachInstanceField(
         (ClassElement enclosingClass, VariableElement member) {
-          HInstruction value = fieldValues[member];
-          if (value == null) {
-            // Uninitialized native fields are pre-initialized by the native
-            // implementation.
-            assert(invariant(
-                member, isNativeUpgradeFactory || compiler.compilationFailed));
-          } else {
-            fields.add(member);
-            DartType type = localsHandler.substInContext(member.type);
-            constructorArguments.add(potentiallyCheckOrTrustType(value, type));
-          }
-        },
-        includeSuperAndInjectedMembers: true);
+      HInstruction value = fieldValues[member];
+      if (value == null) {
+        // Uninitialized native fields are pre-initialized by the native
+        // implementation.
+        assert(invariant(
+            member, isNativeUpgradeFactory || compiler.compilationFailed));
+      } else {
+        fields.add(member);
+        DartType type = localsHandler.substInContext(member.type);
+        constructorArguments.add(potentiallyCheckOrTrustType(value, type));
+      }
+    }, includeSuperAndInjectedMembers: true);
 
     InterfaceType type = classElement.thisType;
     TypeMask ssaType =
@@ -2242,10 +2249,8 @@
 
     HInstruction newObject;
     if (!isNativeUpgradeFactory) {
-      newObject = new HForeignNew(classElement,
-          ssaType,
-          constructorArguments,
-          instantiatedTypes);
+      newObject = new HForeignNew(
+          classElement, ssaType, constructorArguments, instantiatedTypes);
       if (function != null) {
         // TODO(johnniwinther): Provide source information for creation
         // through synthetic constructors.
@@ -2259,8 +2264,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, backend.dynamicType, isAssignable: false));
+      add(new HFieldGet(null, newObject, backend.dynamicType,
+          isAssignable: false));
       for (int i = 0; i < fields.length; i++) {
         add(new HFieldSet(fields[i], newObject, constructorArguments[i]));
       }
@@ -2276,12 +2281,12 @@
       // we can simply copy the list from this.
 
       // These locals are modified by [isIndexedTypeArgumentGet].
-      HThis source;  // The source of the type arguments.
+      HThis source; // The source of the type arguments.
       bool allIndexed = true;
       int expectedIndex = 0;
-      ClassElement contextClass;  // The class of `this`.
-      int remainingTypeVariables;  // The number of 'remaining type variables'
-                                   // of `this`.
+      ClassElement contextClass; // The class of `this`.
+      int remainingTypeVariables; // The number of 'remaining type variables'
+      // of `this`.
 
       /// Helper to identify instructions that read a type variable without
       /// substitution (that is, directly use the index). These instructions
@@ -2323,8 +2328,8 @@
 
       List<HInstruction> typeArguments = <HInstruction>[];
       classElement.typeVariables.forEach((TypeVariableType typeVariable) {
-        HInstruction argument = localsHandler.readLocal(
-            localsHandler.getTypeVariableAsLocal(typeVariable));
+        HInstruction argument = localsHandler
+            .readLocal(localsHandler.getTypeVariableAsLocal(typeVariable));
         if (allIndexed && !isIndexedTypeArgumentGet(argument)) {
           allIndexed = false;
         }
@@ -2388,8 +2393,8 @@
         currentClass.typeVariables.forEach((TypeVariableType argument) {
           // TODO(johnniwinther): Substitute [argument] with
           // `localsHandler.substInContext(argument)`.
-          bodyCallInputs.add(localsHandler.readLocal(
-              localsHandler.getTypeVariableAsLocal(argument)));
+          bodyCallInputs.add(localsHandler
+              .readLocal(localsHandler.getTypeVariableAsLocal(argument)));
         });
       }
 
@@ -2433,11 +2438,11 @@
     // must be done before adding the normal parameters, because their types
     // may contain references to type variables.
     var enclosing = element.enclosingElement;
-    if ((element.isConstructor || element.isGenerativeConstructorBody)
-        && backend.classNeedsRti(enclosing)) {
+    if ((element.isConstructor || element.isGenerativeConstructorBody) &&
+        backend.classNeedsRti(enclosing)) {
       enclosing.typeVariables.forEach((TypeVariableType typeVariable) {
-        HParameterValue param = addParameter(
-            typeVariable.element, backend.nonNullType);
+        HParameterValue param =
+            addParameter(typeVariable.element, backend.nonNullType);
         localsHandler.directLocals[
             localsHandler.getTypeVariableAsLocal(typeVariable)] = param;
       });
@@ -2451,8 +2456,7 @@
       // because that is where the type guards will also be inserted.
       // This way we ensure that a type guard will dominate the type
       // check.
-      ClosureScope scopeData =
-          localsHandler.closureData.capturingScopes[node];
+      ClosureScope scopeData = localsHandler.closureData.capturingScopes[node];
       signature.orderedForEachParameter((ParameterElement parameterElement) {
         if (element.isGenerativeConstructorBody) {
           if (scopeData != null &&
@@ -2499,11 +2503,10 @@
       if (element == backend.traceHelper) return;
       n(e) => e == null ? '' : e.name;
       String name = "${n(element.library)}:${n(element.enclosingClass)}."
-        "${n(element)}";
+          "${n(element)}";
       HConstant nameConstant = addConstantString(name);
-      add(new HInvokeStatic(backend.traceHelper,
-                            <HInstruction>[nameConstant],
-                            backend.dynamicType));
+      add(new HInvokeStatic(backend.traceHelper, <HInstruction>[nameConstant],
+          backend.dynamicType));
     }
   }
 
@@ -2514,8 +2517,7 @@
       HConstant idConstant = graph.addConstantInt(element.hashCode, compiler);
       HConstant nameConstant = addConstantString(element.name);
       add(new HInvokeStatic(backend.traceHelper,
-                            <HInstruction>[idConstant, nameConstant],
-                            backend.dynamicType));
+          <HInstruction>[idConstant, nameConstant], backend.dynamicType));
     }
   }
 
@@ -2524,21 +2526,19 @@
   bool assertTypeInContext(DartType type, [Spannable spannable]) {
     return invariant(spannable == null ? CURRENT_ELEMENT_SPANNABLE : spannable,
         () {
-          ClassElement contextClass = Types.getClassContext(type);
-          return contextClass == null ||
-                 contextClass == localsHandler.contextClass;
-        },
+      ClassElement contextClass = Types.getClassContext(type);
+      return contextClass == null || contextClass == localsHandler.contextClass;
+    },
         message: "Type '$type' is not valid context of "
-                 "${localsHandler.contextClass}.");
+            "${localsHandler.contextClass}.");
   }
 
   /// Build a [HTypeConversion] for convertion [original] to type [type].
   ///
   /// Invariant: [type] must be valid in the context.
   /// See [LocalsHandler.substInContext].
-  HInstruction buildTypeConversion(HInstruction original,
-                                   DartType type,
-                                   int kind) {
+  HInstruction buildTypeConversion(
+      HInstruction original, DartType type, int kind) {
     if (type == null) return original;
     type = type.unaliased;
     assert(assertTypeInContext(type, original));
@@ -2546,19 +2546,21 @@
       TypeMask subtype = new TypeMask.subtype(type.element, compiler.world);
       HInstruction representations = buildTypeArgumentRepresentations(type);
       add(representations);
-      return new HTypeConversion.withTypeRepresentation(type, kind, subtype,
-          original, representations);
+      return new HTypeConversion.withTypeRepresentation(
+          type, kind, subtype, original, representations);
     } else if (type.isTypeVariable) {
       TypeMask subtype = original.instructionType;
       HInstruction typeVariable = addTypeVariableReference(type);
-      return new HTypeConversion.withTypeRepresentation(type, kind, subtype,
-          original, typeVariable);
+      return new HTypeConversion.withTypeRepresentation(
+          type, kind, subtype, original, typeVariable);
     } else if (type.isFunctionType) {
-      String name = kind == HTypeConversion.CAST_TYPE_CHECK
-          ? '_asCheck' : '_assertCheck';
+      String name =
+          kind == HTypeConversion.CAST_TYPE_CHECK ? '_asCheck' : '_assertCheck';
 
-      List<HInstruction> arguments =
-          <HInstruction>[buildFunctionType(type), original];
+      List<HInstruction> arguments = <HInstruction>[
+        buildFunctionType(type),
+        original
+      ];
       pushInvokeDynamic(
           null,
           new Selector.call(
@@ -2573,7 +2575,7 @@
   }
 
   HInstruction _trustType(HInstruction original, DartType type) {
-    assert(compiler.trustTypeAnnotations);
+    assert(compiler.options.trustTypeAnnotations);
     assert(type != null);
     type = localsHandler.substInContext(type);
     type = type.unaliased;
@@ -2587,7 +2589,7 @@
   }
 
   HInstruction _checkType(HInstruction original, DartType type, int kind) {
-    assert(compiler.enableTypeAssertions);
+    assert(compiler.options.enableTypeAssertions);
     assert(type != null);
     type = localsHandler.substInContext(type);
     HInstruction other = buildTypeConversion(original, type, kind);
@@ -2596,12 +2598,12 @@
   }
 
   HInstruction potentiallyCheckOrTrustType(HInstruction original, DartType type,
-      { int kind: HTypeConversion.CHECKED_MODE_CHECK }) {
+      {int kind: HTypeConversion.CHECKED_MODE_CHECK}) {
     if (type == null) return original;
     HInstruction checkedOrTrusted = original;
-    if (compiler.trustTypeAnnotations) {
+    if (compiler.options.trustTypeAnnotations) {
       checkedOrTrusted = _trustType(original, type);
-    } else if (compiler.enableTypeAssertions) {
+    } else if (compiler.options.enableTypeAssertions) {
       checkedOrTrusted = _checkType(original, type, kind);
     }
     if (checkedOrTrusted == original) return original;
@@ -2609,8 +2611,8 @@
     return checkedOrTrusted;
   }
 
-  void assertIsSubtype(ast.Node node, DartType subtype, DartType supertype,
-                       String message) {
+  void assertIsSubtype(
+      ast.Node node, DartType subtype, DartType supertype, String message) {
     HInstruction subtypeInstruction =
         analyzeTypeArgument(localsHandler.substInContext(subtype));
     HInstruction supertypeInstruction =
@@ -2618,10 +2620,13 @@
     HInstruction messageInstruction =
         graph.addConstantString(new ast.DartString.literal(message), compiler);
     Element element = helpers.assertIsSubtype;
-    var inputs = <HInstruction>[subtypeInstruction, supertypeInstruction,
-                                messageInstruction];
-    HInstruction assertIsSubtype = new HInvokeStatic(
-        element, inputs, subtypeInstruction.instructionType);
+    var inputs = <HInstruction>[
+      subtypeInstruction,
+      supertypeInstruction,
+      messageInstruction
+    ];
+    HInstruction assertIsSubtype =
+        new HInvokeStatic(element, inputs, subtypeInstruction.instructionType);
     registry?.registerTypeVariableBoundsSubtypeCheck(subtype, supertype);
     add(assertIsSubtype);
   }
@@ -2653,9 +2658,7 @@
   HInstruction popBoolified() {
     HInstruction value = pop();
     if (_checkOrTrustTypes) {
-      return potentiallyCheckOrTrustType(
-          value,
-          compiler.coreTypes.boolType,
+      return potentiallyCheckOrTrustType(value, compiler.coreTypes.boolType,
           kind: HTypeConversion.BOOLEAN_CONVERSION_CHECK);
     }
     HInstruction result = new HBoolify(value, backend.boolType);
@@ -2681,7 +2684,7 @@
   }
 
   visitAssert(ast.Assert node) {
-    if (!compiler.enableUserAssertions) return;
+    if (!compiler.options.enableUserAssertions) return;
 
     if (!node.hasMessage) {
       // Generate:
@@ -2706,17 +2709,15 @@
       pushInvokeStatic(node, helpers.assertThrow, [pop()]);
       pop();
     }
-    handleIf(node,
-             visitCondition: buildCondition,
-             visitThen: fail);
+    handleIf(node, visitCondition: buildCondition, visitThen: fail);
   }
 
   visitBlock(ast.Block node) {
     assert(!isAborted());
-    if (!isReachable) return;  // This can only happen when inlining.
+    if (!isReachable) return; // This can only happen when inlining.
     for (Link<ast.Node> link = node.statements.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       visit(link.head);
       if (!isReachable) {
         // The block has been aborted by a return or a throw.
@@ -2733,8 +2734,8 @@
   }
 
   visitClassNode(ast.ClassNode node) {
-    reporter.internalError(node,
-        'SsaBuilder.visitClassNode should not be called.');
+    reporter.internalError(
+        node, 'SsaBuilder.visitClassNode should not be called.');
   }
 
   visitThrowExpression(ast.Expression expression) {
@@ -2771,9 +2772,8 @@
     HBasicBlock previousBlock = close(new HGoto());
 
     JumpHandler jumpHandler = createJumpHandler(node, isLoopJump: true);
-    HBasicBlock loopEntry = graph.addNewLoopHeaderBlock(
-        jumpHandler.target,
-        jumpHandler.labels());
+    HBasicBlock loopEntry =
+        graph.addNewLoopHeaderBlock(jumpHandler.target, jumpHandler.labels());
     previousBlock.addSuccessor(loopEntry);
     open(loopEntry);
 
@@ -2794,10 +2794,8 @@
    * no back edge because they abort (throw/return/break in the body and have
    * no continues).
    */
-  void endLoop(HBasicBlock loopEntry,
-               HBasicBlock branchExitBlock,
-               JumpHandler jumpHandler,
-               LocalsHandler savedLocals) {
+  void endLoop(HBasicBlock loopEntry, HBasicBlock branchExitBlock,
+      JumpHandler jumpHandler, LocalsHandler savedLocals) {
     HBasicBlock loopExitBlock = addNewBlock();
 
     List<LocalsHandler> breakHandlers = <LocalsHandler>[];
@@ -2847,11 +2845,8 @@
   // For while loops, initializer and update are null.
   // The condition function must return a boolean result.
   // None of the functions must leave anything on the stack.
-  void handleLoop(ast.Node loop,
-                  void initialize(),
-                  HInstruction condition(),
-                  void update(),
-                  void body()) {
+  void handleLoop(ast.Node loop, void initialize(), HInstruction condition(),
+      void update(), void body()) {
     // Generate:
     //  <initializer>
     //  loop-entry:
@@ -2871,8 +2866,7 @@
       startBlock = initializerBlock;
       initialize();
       assert(!isAborted());
-      initializerGraph =
-          new SubExpression(initializerBlock, current);
+      initializerGraph = new SubExpression(initializerBlock, current);
     }
 
     loopNesting++;
@@ -2915,13 +2909,12 @@
       HBasicBlock updateBlock = addNewBlock();
 
       List<LocalsHandler> continueHandlers = <LocalsHandler>[];
-      jumpHandler.forEachContinue((HContinue instruction,
-                                   LocalsHandler locals) {
+      jumpHandler
+          .forEachContinue((HContinue instruction, LocalsHandler locals) {
         instruction.block.addSuccessor(updateBlock);
         continueHandlers.add(locals);
       });
 
-
       if (bodyBlock != null) {
         continueHandlers.add(localsHandler);
         bodyBlock.addSuccessor(updateBlock);
@@ -2936,15 +2929,13 @@
       if (!labels.isEmpty) {
         beginBodyBlock.setBlockFlow(
             new HLabeledBlockInformation(
-                new HSubGraphBlockInformation(bodyGraph),
-                jumpHandler.labels(),
+                new HSubGraphBlockInformation(bodyGraph), jumpHandler.labels(),
                 isContinue: true),
             updateBlock);
       } else if (target != null && target.isContinueTarget) {
         beginBodyBlock.setBlockFlow(
             new HLabeledBlockInformation.implicit(
-                new HSubGraphBlockInformation(bodyGraph),
-                target,
+                new HSubGraphBlockInformation(bodyGraph), target,
                 isContinue: true),
             updateBlock);
       }
@@ -2967,16 +2958,15 @@
       endLoop(conditionBlock, conditionExitBlock, jumpHandler, savedLocals);
 
       conditionBlock.postProcessLoopHeader();
-      HLoopBlockInformation info =
-          new HLoopBlockInformation(
-              HLoopBlockInformation.loopType(loop),
-              wrapExpressionGraph(initializerGraph),
-              wrapExpressionGraph(conditionExpression),
-              wrapStatementGraph(bodyGraph),
-              wrapExpressionGraph(updateGraph),
-              conditionBlock.loopInformation.target,
-              conditionBlock.loopInformation.labels,
-              sourceInformationBuilder.buildLoop(loop));
+      HLoopBlockInformation info = new HLoopBlockInformation(
+          _loopKind(loop),
+          wrapExpressionGraph(initializerGraph),
+          wrapExpressionGraph(conditionExpression),
+          wrapStatementGraph(bodyGraph),
+          wrapExpressionGraph(updateGraph),
+          conditionBlock.loopInformation.target,
+          conditionBlock.loopInformation.labels,
+          sourceInformationBuilder.buildLoop(loop));
 
       startBlock.setBlockFlow(info, current);
       loopInfo.loopBlockInformation = info;
@@ -3008,11 +2998,10 @@
       conditionEndBlock.addAtExit(new HIf(condition));
       conditionEndBlock.addSuccessor(elseBlock);
       conditionEndBlock.remove(conditionEndBlock.last);
-      HIfBlockInformation info =
-          new HIfBlockInformation(
-              wrapExpressionGraph(conditionExpression),
-              wrapStatementGraph(bodyGraph),
-              wrapStatementGraph(elseGraph));
+      HIfBlockInformation info = new HIfBlockInformation(
+          wrapExpressionGraph(conditionExpression),
+          wrapStatementGraph(bodyGraph),
+          wrapStatementGraph(elseGraph));
 
       conditionEndBlock.setBlockFlow(info, current);
       HIf ifBlock = conditionEndBlock.last;
@@ -3026,8 +3015,8 @@
         label.setBreakTarget();
         SubGraph labelGraph = new SubGraph(conditionBlock, current);
         HLabeledBlockInformation labelInfo = new HLabeledBlockInformation(
-                new HSubGraphBlockInformation(labelGraph),
-                <LabelDefinition>[label]);
+            new HSubGraphBlockInformation(labelGraph),
+            <LabelDefinition>[label]);
 
         conditionBlock.setBlockFlow(labelInfo, current);
 
@@ -3081,11 +3070,9 @@
       visit(node.condition);
       return popBoolified();
     }
-    handleLoop(node,
-               () {},
-               buildCondition,
-               () {},
-               () { visit(node.body); });
+    handleLoop(node, () {}, buildCondition, () {}, () {
+      visit(node.body);
+    });
   }
 
   visitDoWhile(ast.DoWhile node) {
@@ -3129,8 +3116,8 @@
       HBasicBlock conditionBlock = addNewBlock();
 
       List<LocalsHandler> continueHandlers = <LocalsHandler>[];
-      jumpHandler.forEachContinue((HContinue instruction,
-                                   LocalsHandler locals) {
+      jumpHandler
+          .forEachContinue((HContinue instruction, LocalsHandler locals) {
         instruction.block.addSuccessor(conditionBlock);
         continueHandlers.add(locals);
       });
@@ -3149,11 +3136,11 @@
             new HSubGraphBlockInformation(bodyGraph);
         HLabeledBlockInformation info;
         if (!labels.isEmpty) {
-          info = new HLabeledBlockInformation(bodyInfo, labels,
-                                              isContinue: true);
+          info =
+              new HLabeledBlockInformation(bodyInfo, labels, isContinue: true);
         } else {
           info = new HLabeledBlockInformation.implicit(bodyInfo, target,
-                                                       isContinue: true);
+              isContinue: true);
         }
         bodyEntryBlock.setBlockFlow(info, conditionBlock);
       }
@@ -3184,16 +3171,15 @@
 
       loopEntryBlock.postProcessLoopHeader();
       SubGraph bodyGraph = new SubGraph(loopEntryBlock, bodyExitBlock);
-      HLoopBlockInformation loopBlockInfo =
-          new HLoopBlockInformation(
-              HLoopBlockInformation.DO_WHILE_LOOP,
-              null,
-              wrapExpressionGraph(conditionExpression),
-              wrapStatementGraph(bodyGraph),
-              null,
-              loopEntryBlock.loopInformation.target,
-              loopEntryBlock.loopInformation.labels,
-              sourceInformationBuilder.buildLoop(node));
+      HLoopBlockInformation loopBlockInfo = new HLoopBlockInformation(
+          HLoopBlockInformation.DO_WHILE_LOOP,
+          null,
+          wrapExpressionGraph(conditionExpression),
+          wrapStatementGraph(bodyGraph),
+          null,
+          loopEntryBlock.loopInformation.target,
+          loopEntryBlock.loopInformation.labels,
+          sourceInformationBuilder.buildLoop(node));
       loopEntryBlock.setBlockFlow(loopBlockInfo, current);
       loopInfo.loopBlockInformation = loopBlockInfo;
     } else {
@@ -3250,7 +3236,7 @@
     TypeMask type =
         new TypeMask.nonNullExact(closureClassElement, compiler.world);
     push(new HForeignNew(closureClassElement, type, capturedVariables)
-        ..sourceInformation = sourceInformationBuilder.buildCreate(node));
+      ..sourceInformation = sourceInformationBuilder.buildCreate(node));
 
     Element methodElement = nestedClosureData.closureElement;
     registry?.registerInstantiatedClosure(methodElement);
@@ -3273,15 +3259,14 @@
     if (node.isThis()) {
       visitThisGet(node);
     } else {
-      reporter.internalError(node,
-          "SsaFromAstMixin.visitIdentifier on non-this.");
+      reporter.internalError(
+          node, "SsaFromAstMixin.visitIdentifier on non-this.");
     }
   }
 
   visitIf(ast.If node) {
     assert(isReachable);
-    handleIf(
-        node,
+    handleIf(node,
         visitCondition: () => visit(node.condition),
         visitThen: () => visit(node.thenPart),
         visitElse: node.elsePart != null ? () => visit(node.elsePart) : null,
@@ -3289,13 +3274,12 @@
   }
 
   void handleIf(ast.Node diagnosticNode,
-                {void visitCondition(),
-                 void visitThen(),
-                 void visitElse(),
-                 SourceInformation sourceInformation}) {
+      {void visitCondition(),
+      void visitThen(),
+      void visitElse(),
+      SourceInformation sourceInformation}) {
     SsaBranchBuilder branchBuilder = new SsaBranchBuilder(this, diagnosticNode);
-    branchBuilder.handleIf(
-        visitCondition, visitThen, visitElse,
+    branchBuilder.handleIf(visitCondition, visitThen, visitElse,
         sourceInformation: sourceInformation);
   }
 
@@ -3308,19 +3292,17 @@
   @override
   void visitLogicalAnd(ast.Send node, ast.Node left, ast.Node right, _) {
     SsaBranchBuilder branchBuilder = new SsaBranchBuilder(this, node);
-    branchBuilder.handleLogicalAndOrWithLeftNode(
-        left,
-        () { visit(right); },
-        isAnd: true);
+    branchBuilder.handleLogicalAndOrWithLeftNode(left, () {
+      visit(right);
+    }, isAnd: true);
   }
 
   @override
   void visitLogicalOr(ast.Send node, ast.Node left, ast.Node right, _) {
     SsaBranchBuilder branchBuilder = new SsaBranchBuilder(this, node);
-    branchBuilder.handleLogicalAndOrWithLeftNode(
-        left,
-        () { visit(right); },
-        isAnd: false);
+    branchBuilder.handleLogicalAndOrWithLeftNode(left, () {
+      visit(right);
+    }, isAnd: false);
   }
 
   @override
@@ -3330,13 +3312,12 @@
     SourceInformation sourceInformation =
         sourceInformationBuilder.buildGeneric(node);
     push(new HNot(popBoolified(), backend.boolType)
-        ..sourceInformation = sourceInformation);
+      ..sourceInformation = sourceInformation);
   }
 
   @override
-  void visitUnary(ast.Send node,
-                  UnaryOperator operator,
-                  ast.Node expression,_) {
+  void visitUnary(
+      ast.Send node, UnaryOperator operator, ast.Node expression, _) {
     assert(node.argumentsNode is ast.Prefix);
     HInstruction operand = visitAndPop(expression);
 
@@ -3352,18 +3333,13 @@
     }
 
     pushInvokeDynamic(
-        node,
-        elements.getSelector(node),
-        elements.getTypeMask(node),
-        [operand],
+        node, elements.getSelector(node), elements.getTypeMask(node), [operand],
         sourceInformation: sourceInformationBuilder.buildGeneric(node));
   }
 
   @override
-  void visitBinary(ast.Send node,
-                   ast.Node left,
-                   BinaryOperator operator,
-                   ast.Node right, _) {
+  void visitBinary(ast.Send node, ast.Node left, BinaryOperator operator,
+      ast.Node right, _) {
     handleBinary(node, left, right);
   }
 
@@ -3384,24 +3360,17 @@
   }
 
   void handleBinary(ast.Send node, ast.Node left, ast.Node right) {
-    visitBinarySend(
-        visitAndPop(left),
-        visitAndPop(right),
-        elements.getSelector(node),
-        elements.getTypeMask(node),
-        node,
+    visitBinarySend(visitAndPop(left), visitAndPop(right),
+        elements.getSelector(node), elements.getTypeMask(node), node,
         sourceInformation:
             sourceInformationBuilder.buildGeneric(node.selector));
   }
 
   /// TODO(johnniwinther): Merge [visitBinarySend] with [handleBinary] and
   /// remove use of [location] for source information.
-  void visitBinarySend(HInstruction left,
-                       HInstruction right,
-                       Selector selector,
-                       TypeMask mask,
-                       ast.Send send,
-                       {SourceInformation sourceInformation}) {
+  void visitBinarySend(HInstruction left, HInstruction right, Selector selector,
+      TypeMask mask, ast.Send send,
+      {SourceInformation sourceInformation}) {
     pushInvokeDynamic(send, selector, mask, [left, right],
         sourceInformation: sourceInformation);
   }
@@ -3426,10 +3395,7 @@
    * [selector].
    */
   void generateInstanceGetterWithCompiledReceiver(
-      ast.Send send,
-      Selector selector,
-      TypeMask mask,
-      HInstruction receiver) {
+      ast.Send send, Selector selector, TypeMask mask, HInstruction receiver) {
     assert(Elements.isInstanceSend(send, elements));
     assert(selector.isGetter);
     pushInvokeDynamic(send, selector, mask, [receiver],
@@ -3438,8 +3404,8 @@
 
   /// Inserts a call to checkDeferredIsLoaded for [prefixElement].
   /// If [prefixElement] is [null] ndo nothing.
-  void generateIsDeferredLoadedCheckIfNeeded(PrefixElement prefixElement,
-                                             ast.Node location) {
+  void generateIsDeferredLoadedCheckIfNeeded(
+      PrefixElement prefixElement, ast.Node location) {
     if (prefixElement == null) return;
     String loadId =
         compiler.deferredLoadTask.getImportDeferName(location, prefixElement);
@@ -3455,16 +3421,14 @@
   /// resolves to a deferred library.
   void generateIsDeferredLoadedCheckOfSend(ast.Send node) {
     generateIsDeferredLoadedCheckIfNeeded(
-        compiler.deferredLoadTask.deferredPrefixElement(node, elements),
-        node);
+        compiler.deferredLoadTask.deferredPrefixElement(node, elements), node);
   }
 
   void handleInvalidStaticGet(ast.Send node, Element element) {
     SourceInformation sourceInformation =
         sourceInformationBuilder.buildGet(node);
     generateThrowNoSuchMethod(
-        node,
-        noSuchMethodTargetSymbolString(element, 'get'),
+        node, noSuchMethodTargetSymbolString(element, 'get'),
         argumentNodes: const Link<ast.Node>(),
         sourceInformation: sourceInformation);
   }
@@ -3486,32 +3450,27 @@
   }
 
   /// Read a static or top level [field] of constant value.
-  void generateStaticConstGet(
-      ast.Send node,
-      FieldElement field,
-      ConstantExpression constant,
-      SourceInformation sourceInformation) {
+  void generateStaticConstGet(ast.Send node, FieldElement field,
+      ConstantExpression constant, SourceInformation sourceInformation) {
     ConstantValue value = backend.constants.getConstantValue(constant);
     HConstant instruction;
     // Constants that are referred via a deferred prefix should be referred
     // by reference.
-    PrefixElement prefix = compiler.deferredLoadTask
-        .deferredPrefixElement(node, elements);
+    PrefixElement prefix =
+        compiler.deferredLoadTask.deferredPrefixElement(node, elements);
     if (prefix != null) {
       instruction =
           graph.addDeferredConstant(value, prefix, sourceInformation, compiler);
     } else {
-      instruction = graph.addConstant(
-          value, compiler, sourceInformation: sourceInformation);
+      instruction = graph.addConstant(value, compiler,
+          sourceInformation: sourceInformation);
     }
     stack.add(instruction);
     // The inferrer may have found a better type than the constant
     // handler in the case of lists, because the constant handler
     // does not look at elements in the list.
-    TypeMask type =
-        TypeMaskFactory.inferredTypeForElement(field, compiler);
-    if (!type.containsAll(compiler.world) &&
-        !instruction.isConstantNull()) {
+    TypeMask type = TypeMaskFactory.inferredTypeForElement(field, compiler);
+    if (!type.containsAll(compiler.world) && !instruction.isConstantNull()) {
       // TODO(13429): The inferrer should know that an element
       // cannot be null.
       instruction.instructionType = type.nonNullable();
@@ -3537,17 +3496,15 @@
       } else {
         // TODO(5346): Try to avoid the need for calling [declaration] before
         // creating an [HStatic].
-        HInstruction instruction = new HStatic(
-            field.declaration,
+        HInstruction instruction = new HStatic(field.declaration,
             TypeMaskFactory.inferredTypeForElement(field, compiler))
-                ..sourceInformation = sourceInformation;
+          ..sourceInformation = sourceInformation;
         push(instruction);
       }
     } else {
       HInstruction instruction = new HLazyStatic(
-          field,
-          TypeMaskFactory.inferredTypeForElement(field, compiler))
-              ..sourceInformation = sourceInformation;
+          field, TypeMaskFactory.inferredTypeForElement(field, compiler))
+        ..sourceInformation = sourceInformation;
       push(instruction);
     }
   }
@@ -3560,7 +3517,7 @@
       generateDeferredLoaderGet(node, getter, sourceInformation);
     } else {
       pushInvokeStatic(node, getter, <HInstruction>[],
-                       sourceInformation: sourceInformation);
+          sourceInformation: sourceInformation);
     }
   }
 
@@ -3578,13 +3535,13 @@
     SourceInformation sourceInformation =
         sourceInformationBuilder.buildGet(node);
     push(new HStatic(function.declaration, backend.nonNullType)
-        ..sourceInformation = sourceInformation);
+      ..sourceInformation = sourceInformation);
   }
 
   /// Read a local variable, function or parameter.
   void buildLocalGet(LocalElement local, SourceInformation sourceInformation) {
-    stack.add(localsHandler.readLocal(
-              local, sourceInformation: sourceInformation));
+    stack.add(
+        localsHandler.readLocal(local, sourceInformation: sourceInformation));
   }
 
   void handleLocalGet(ast.Send node, LocalElement local) {
@@ -3592,20 +3549,13 @@
   }
 
   @override
-  void visitDynamicPropertyGet(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      _) {
+  void visitDynamicPropertyGet(ast.Send node, ast.Node receiver, Name name, _) {
     generateDynamicGet(node);
   }
 
   @override
   void visitIfNotNullDynamicPropertyGet(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      _) {
+      ast.Send node, ast.Node receiver, Name name, _) {
     // exp?.x compiled as:
     //   t1 = exp;
     //   result = t1 == null ? t1 : t1.x;
@@ -3631,8 +3581,8 @@
 
   /// Pushes a boolean checking [expression] against null.
   pushCheckNull(HInstruction expression) {
-    push(new HIdentity(expression, graph.addConstantNull(compiler),
-          null, backend.boolType));
+    push(new HIdentity(
+        expression, graph.addConstantNull(compiler), null, backend.boolType));
   }
 
   @override
@@ -3651,72 +3601,47 @@
   }
 
   @override
-  void visitStaticFieldGet(
-      ast.Send node,
-      FieldElement field,
-      _) {
+  void visitStaticFieldGet(ast.Send node, FieldElement field, _) {
     generateStaticFieldGet(node, field);
   }
 
   @override
-  void visitStaticFunctionGet(
-      ast.Send node,
-      MethodElement function,
-      _) {
+  void visitStaticFunctionGet(ast.Send node, MethodElement function, _) {
     generateStaticFunctionGet(node, function);
   }
 
   @override
-  void visitStaticGetterGet(
-      ast.Send node,
-      FunctionElement getter,
-      _) {
+  void visitStaticGetterGet(ast.Send node, FunctionElement getter, _) {
     generateStaticGetterGet(node, getter);
   }
 
   @override
-  void visitThisPropertyGet(
-      ast.Send node,
-      Name name,
-      _) {
+  void visitThisPropertyGet(ast.Send node, Name name, _) {
     generateDynamicGet(node);
   }
 
   @override
-  void visitTopLevelFieldGet(
-      ast.Send node,
-      FieldElement field,
-      _) {
+  void visitTopLevelFieldGet(ast.Send node, FieldElement field, _) {
     generateStaticFieldGet(node, field);
   }
 
   @override
-  void visitTopLevelFunctionGet(
-      ast.Send node,
-      MethodElement function,
-      _) {
+  void visitTopLevelFunctionGet(ast.Send node, MethodElement function, _) {
     generateStaticFunctionGet(node, function);
   }
 
   @override
-  void visitTopLevelGetterGet(
-      ast.Send node,
-      FunctionElement getter,
-      _) {
+  void visitTopLevelGetterGet(ast.Send node, FunctionElement getter, _) {
     generateStaticGetterGet(node, getter);
   }
 
-  void generateInstanceSetterWithCompiledReceiver(ast.Send send,
-                                                  HInstruction receiver,
-                                                  HInstruction value,
-                                                  {Selector selector,
-                                                   TypeMask mask,
-                                                   ast.Node location}) {
-    assert(invariant(
-        send == null ? location : send,
+  void generateInstanceSetterWithCompiledReceiver(
+      ast.Send send, HInstruction receiver, HInstruction value,
+      {Selector selector, TypeMask mask, ast.Node location}) {
+    assert(invariant(send == null ? location : send,
         send == null || Elements.isInstanceSend(send, elements),
         message: "Unexpected instance setter"
-                 "${send != null ? " element: ${elements[send]}" : ""}"));
+            "${send != null ? " element: ${elements[send]}" : ""}"));
     if (selector == null) {
       assert(send != null);
       selector = elements.getSelector(send);
@@ -3735,9 +3660,8 @@
     stack.add(value);
   }
 
-  void generateNoSuchSetter(ast.Node location,
-                            Element element,
-                            HInstruction value) {
+  void generateNoSuchSetter(
+      ast.Node location, Element element, HInstruction value) {
     List<HInstruction> arguments =
         value == null ? const <HInstruction>[] : <HInstruction>[value];
     // An erroneous element indicates an unresolved static setter.
@@ -3746,16 +3670,15 @@
         argumentValues: arguments);
   }
 
-  void generateNonInstanceSetter(ast.SendSet send,
-                                 Element element,
-                                 HInstruction value,
-                                 {ast.Node location}) {
+  void generateNonInstanceSetter(
+      ast.SendSet send, Element element, HInstruction value,
+      {ast.Node location}) {
     if (location == null) {
       assert(send != null);
       location = send;
     }
-    assert(invariant(location,
-        send == null || !Elements.isInstanceSend(send, elements),
+    assert(invariant(
+        location, send == null || !Elements.isInstanceSend(send, elements),
         message: "Unexpected non instance setter: $element."));
     if (Elements.isStaticOrTopLevelField(element)) {
       if (element.isSetter) {
@@ -3768,7 +3691,7 @@
       }
       stack.add(value);
     } else if (Elements.isError(element)) {
-      generateNoSuchSetter(location, element,  send == null ? null : value);
+      generateNoSuchSetter(location, element, send == null ? null : value);
     } else if (Elements.isMalformed(element)) {
       // TODO(ahe): Do something like [generateWrongArgumentCountError].
       stack.add(graph.addConstantNull(compiler));
@@ -3819,20 +3742,19 @@
         // each part the generated sub-template's holes match the index of the
         // inputs that are later used to instantiate it. We do this by starting
         // the indexing with the number of inputs from previous sub-templates.
-        templates.add(
-            rtiEncoder.getTypeRepresentationWithPlaceholders(
-                argument, (variable) {
-              HInstruction runtimeType = addTypeVariableReference(variable);
-              inputs.add(runtimeType);
-            }, firstPlaceholderIndex: inputs.length));
+        templates.add(rtiEncoder.getTypeRepresentationWithPlaceholders(argument,
+            (variable) {
+          HInstruction runtimeType = addTypeVariableReference(variable);
+          inputs.add(runtimeType);
+        }, firstPlaceholderIndex: inputs.length));
       }
       // TODO(sra): This is a fresh template each time.  We can't let the
       // template manager build them.
-      js.Template code = new js.Template(null,
-                                         new js.ArrayInitializer(templates));
-      HInstruction representation =
-          new HForeignCode(code, backend.readableArrayType, inputs,
-              nativeBehavior: native.NativeBehavior.PURE_ALLOCATION);
+      js.Template code =
+          new js.Template(null, new js.ArrayInitializer(templates));
+      HInstruction representation = new HForeignCode(
+          code, backend.readableArrayType, inputs,
+          nativeBehavior: native.NativeBehavior.PURE_ALLOCATION);
       return representation;
     }
   }
@@ -3844,10 +3766,8 @@
       ErroneousElement element = type.element;
       generateTypeError(node, element.message);
     } else {
-      HInstruction converted = buildTypeConversion(
-          expressionInstruction,
-          localsHandler.substInContext(type),
-          HTypeConversion.CAST_TYPE_CHECK);
+      HInstruction converted = buildTypeConversion(expressionInstruction,
+          localsHandler.substInContext(type), HTypeConversion.CAST_TYPE_CHECK);
       if (converted != expressionInstruction) add(converted);
       stack.add(converted);
     }
@@ -3867,16 +3787,14 @@
     push(new HNot(instruction, backend.boolType));
   }
 
-  HInstruction buildIsNode(ast.Node node,
-                           DartType type,
-                           HInstruction expression) {
+  HInstruction buildIsNode(
+      ast.Node node, DartType type, HInstruction expression) {
     type = localsHandler.substInContext(type).unaliased;
     if (type.isFunctionType) {
       List arguments = [buildFunctionType(type), expression];
       pushInvokeDynamic(
           node,
-          new Selector.call(
-              new PrivateName('_isTest', helpers.jsHelperLibrary),
+          new Selector.call(new PrivateName('_isTest', helpers.jsHelperLibrary),
               CallStructure.ONE_ARG),
           null,
           arguments);
@@ -3891,18 +3809,19 @@
     } else if (RuntimeTypes.hasTypeArguments(type)) {
       ClassElement element = type.element;
       Element helper = helpers.checkSubtype;
-      HInstruction representations =
-          buildTypeArgumentRepresentations(type);
+      HInstruction representations = buildTypeArgumentRepresentations(type);
       add(representations);
       js.Name operator = backend.namer.operatorIs(element);
       HInstruction isFieldName = addConstantStringFromName(operator);
       HInstruction asFieldName = compiler.world.hasAnyStrictSubtype(element)
           ? addConstantStringFromName(backend.namer.substitutionName(element))
           : graph.addConstantNull(compiler);
-      List<HInstruction> inputs = <HInstruction>[expression,
-                                                 isFieldName,
-                                                 representations,
-                                                 asFieldName];
+      List<HInstruction> inputs = <HInstruction>[
+        expression,
+        isFieldName,
+        representations,
+        asFieldName
+      ];
       pushInvokeStatic(node, helper, inputs, typeMask: backend.boolType);
       HInstruction call = pop();
       return new HIs.compound(type, expression, call, backend.boolType);
@@ -3936,15 +3855,14 @@
       Link<ast.Node> arguments = node.arguments;
       int positionalArgumentCount = callStructure.positionalArgumentCount;
       for (int i = 0;
-           i < positionalArgumentCount;
-           arguments = arguments.tail, i++) {
+          i < positionalArgumentCount;
+          arguments = arguments.tail, i++) {
         visit(arguments.head);
         list.add(pop());
       }
 
       // Visit named arguments and add them into a temporary map.
-      Map<String, HInstruction> instructions =
-          new Map<String, HInstruction>();
+      Map<String, HInstruction> instructions = new Map<String, HInstruction>();
       List<String> namedArguments = callStructure.namedArguments;
       int nameIndex = 0;
       for (; !arguments.isEmpty; arguments = arguments.tail) {
@@ -3969,8 +3887,7 @@
    * Invariant: [element] must be an implementation element.
    */
   List<HInstruction> makeStaticArgumentList(CallStructure callStructure,
-                                            Link<ast.Node> arguments,
-                                            FunctionElement element) {
+      Link<ast.Node> arguments, FunctionElement element) {
     assert(invariant(element, element.isImplementation));
 
     HInstruction compileArgument(ast.Node argument) {
@@ -3982,12 +3899,13 @@
         arguments,
         element,
         compileArgument,
-        backend.isJsInterop(element) ?
-            handleConstantForOptionalParameterJsInterop :
-            handleConstantForOptionalParameter);
+        backend.isJsInterop(element)
+            ? handleConstantForOptionalParameterJsInterop
+            : handleConstantForOptionalParameter);
   }
 
-  void addGenericSendArgumentsToList(Link<ast.Node> link, List<HInstruction> list) {
+  void addGenericSendArgumentsToList(
+      Link<ast.Node> link, List<HInstruction> list) {
     for (; !link.isEmpty; link = link.tail) {
       visit(link.head);
       list.add(pop());
@@ -4011,7 +3929,7 @@
     addDynamicSendArgumentsToList(node, inputs);
 
     pushInvokeDynamic(node, selector, mask, inputs,
-                      sourceInformation: sourceInformation);
+        sourceInformation: sourceInformation);
     if (selector.isSetter || selector.isIndexSet) {
       pop();
       stack.add(inputs.last);
@@ -4019,104 +3937,61 @@
   }
 
   @override
-  visitDynamicPropertyInvoke(
-      ast.Send node,
-      ast.Node receiver,
-      ast.NodeList arguments,
-      Selector selector,
-      _) {
+  visitDynamicPropertyInvoke(ast.Send node, ast.Node receiver,
+      ast.NodeList arguments, Selector selector, _) {
     generateDynamicSend(node);
   }
 
   @override
-  visitIfNotNullDynamicPropertyInvoke(
-      ast.Send node,
-      ast.Node receiver,
-      ast.NodeList arguments,
-      Selector selector,
-      _) {
+  visitIfNotNullDynamicPropertyInvoke(ast.Send node, ast.Node receiver,
+      ast.NodeList arguments, Selector selector, _) {
     /// Desugar `exp?.m()` to `(t1 = exp) == null ? t1 : t1.m()`
     HInstruction receiver;
     SsaBranchBuilder brancher = new SsaBranchBuilder(this, node);
-    brancher.handleConditional(
-        () {
-          receiver = generateInstanceSendReceiver(node);
-          pushCheckNull(receiver);
-        },
-        () => stack.add(receiver),
-        () => _generateDynamicSend(node, receiver));
+    brancher.handleConditional(() {
+      receiver = generateInstanceSendReceiver(node);
+      pushCheckNull(receiver);
+    }, () => stack.add(receiver), () => _generateDynamicSend(node, receiver));
   }
 
   @override
   visitThisPropertyInvoke(
-      ast.Send node,
-      ast.NodeList arguments,
-      Selector selector,
-      _) {
+      ast.Send node, ast.NodeList arguments, Selector selector, _) {
     generateDynamicSend(node);
   }
 
   @override
-  visitExpressionInvoke(
-      ast.Send node,
-      ast.Node expression,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    generateCallInvoke(
-        node,
-        visitAndPop(expression),
+  visitExpressionInvoke(ast.Send node, ast.Node expression,
+      ast.NodeList arguments, CallStructure callStructure, _) {
+    generateCallInvoke(node, visitAndPop(expression),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   @override
   visitThisInvoke(
-      ast.Send node,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    generateCallInvoke(
-        node,
-        localsHandler.readThis(),
+      ast.Send node, ast.NodeList arguments, CallStructure callStructure, _) {
+    generateCallInvoke(node, localsHandler.readThis(),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   @override
-  visitParameterInvoke(
-      ast.Send node,
-      ParameterElement parameter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    generateCallInvoke(
-        node,
-            localsHandler.readLocal(parameter),
+  visitParameterInvoke(ast.Send node, ParameterElement parameter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
+    generateCallInvoke(node, localsHandler.readLocal(parameter),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   @override
-  visitLocalVariableInvoke(
-      ast.Send node,
-      LocalVariableElement variable,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    generateCallInvoke(
-        node,
-        localsHandler.readLocal(variable),
+  visitLocalVariableInvoke(ast.Send node, LocalVariableElement variable,
+      ast.NodeList arguments, CallStructure callStructure, _) {
+    generateCallInvoke(node, localsHandler.readLocal(variable),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   @override
-  visitLocalFunctionInvoke(
-      ast.Send node,
-      LocalFunctionElement function,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    generateCallInvoke(
-        node,
-        localsHandler.readLocal(function),
+  visitLocalFunctionInvoke(ast.Send node, LocalFunctionElement function,
+      ast.NodeList arguments, CallStructure callStructure, _) {
+    generateCallInvoke(node, localsHandler.readLocal(function),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
@@ -4137,8 +4012,8 @@
     // argument, which is the foreign code.
     if (link.isEmpty || link.tail.isEmpty) {
       // We should not get here because the call should be compiled to NSM.
-      reporter.internalError(node.argumentsNode,
-          'At least two arguments expected.');
+      reporter.internalError(
+          node.argumentsNode, 'At least two arguments expected.');
     }
     native.NativeBehavior nativeBehavior =
         compiler.enqueuer.resolution.nativeEnqueuer.getNativeBehaviorOf(node);
@@ -4147,12 +4022,11 @@
     addGenericSendArgumentsToList(link.tail.tail, inputs);
 
     if (nativeBehavior.codeTemplate.positionalArgumentCount != inputs.length) {
-      reporter.reportErrorMessage(
-          node, MessageKind.GENERIC,
-          {'text':
-            'Mismatch between number of placeholders'
-            ' and number of arguments.'});
-      stack.add(graph.addConstantNull(compiler));  // Result expected on stack.
+      reporter.reportErrorMessage(node, MessageKind.GENERIC, {
+        'text': 'Mismatch between number of placeholders'
+            ' and number of arguments.'
+      });
+      stack.add(graph.addConstantNull(compiler)); // Result expected on stack.
       return;
     }
 
@@ -4166,18 +4040,15 @@
     SourceInformation sourceInformation =
         sourceInformationBuilder.buildCall(node, node.argumentsNode);
     if (nativeBehavior.codeTemplate.isExpression) {
-      push(new HForeignCode(
-          nativeBehavior.codeTemplate, ssaType, inputs,
-          effects: nativeBehavior.sideEffects,
-          nativeBehavior: nativeBehavior)
-              ..sourceInformation = sourceInformation);
+      push(new HForeignCode(nativeBehavior.codeTemplate, ssaType, inputs,
+          effects: nativeBehavior.sideEffects, nativeBehavior: nativeBehavior)
+        ..sourceInformation = sourceInformation);
     } else {
-      push(new HForeignCode(
-          nativeBehavior.codeTemplate, ssaType, inputs,
+      push(new HForeignCode(nativeBehavior.codeTemplate, ssaType, inputs,
           isStatement: true,
           effects: nativeBehavior.sideEffects,
           nativeBehavior: nativeBehavior)
-              ..sourceInformation = sourceInformation);
+        ..sourceInformation = sourceInformation);
     }
   }
 
@@ -4187,13 +4058,13 @@
     if (inputs.length != 2) {
       reporter.internalError(node.argumentsNode, 'Two arguments expected.');
     }
-    push(new HStringConcat(inputs[0], inputs[1], node, backend.stringType));
+    push(new HStringConcat(inputs[0], inputs[1], backend.stringType));
   }
 
   void handleForeignJsCurrentIsolateContext(ast.Send node) {
     if (!node.arguments.isEmpty) {
-      reporter.internalError(node,
-          'Too many arguments to JS_CURRENT_ISOLATE_CONTEXT.');
+      reporter.internalError(
+          node, 'Too many arguments to JS_CURRENT_ISOLATE_CONTEXT.');
     }
 
     if (!compiler.hasIsolateSupport) {
@@ -4201,9 +4072,7 @@
       // to fetch the static state.
       String name = backend.namer.staticStateHolder;
       push(new HForeignCode(
-          js.js.parseForeignJS(name),
-          backend.dynamicType,
-          <HInstruction>[],
+          js.js.parseForeignJS(name), backend.dynamicType, <HInstruction>[],
           nativeBehavior: native.NativeBehavior.DEPENDS_OTHER));
     } else {
       // Call a helper method from the isolate library. The isolate
@@ -4211,8 +4080,7 @@
       // Leg's isolate.
       Element element = helpers.currentIsolate;
       if (element == null) {
-        reporter.internalError(node,
-            'Isolate library and compiler mismatch.');
+        reporter.internalError(node, 'Isolate library and compiler mismatch.');
       }
       pushInvokeStatic(null, element, [], typeMask: backend.dynamicType);
     }
@@ -4220,102 +4088,91 @@
 
   void handleForeignJsGetFlag(ast.Send node) {
     List<ast.Node> arguments = node.arguments.toList();
-     ast.Node argument;
-     switch (arguments.length) {
-     case 0:
-       reporter.reportErrorMessage(
-           node, MessageKind.GENERIC,
-           {'text': 'Error: Expected one argument to JS_GET_FLAG.'});
-       return;
-     case 1:
-       argument = arguments[0];
-       break;
-     default:
-       for (int i = 1; i < arguments.length; i++) {
-         reporter.reportErrorMessage(
-             arguments[i], MessageKind.GENERIC,
-             {'text': 'Error: Extra argument to JS_GET_FLAG.'});
-       }
-       return;
-     }
-     ast.LiteralString string = argument.asLiteralString();
-     if (string == null) {
-       reporter.reportErrorMessage(
-           argument, MessageKind.GENERIC,
-           {'text': 'Error: Expected a literal string.'});
-     }
-     String name = string.dartString.slowToString();
-     bool value = false;
-     switch (name) {
-       case 'MUST_RETAIN_METADATA':
-         value = backend.mustRetainMetadata;
-         break;
-       case 'USE_CONTENT_SECURITY_POLICY':
-         value = compiler.useContentSecurityPolicy;
-         break;
-       default:
-         reporter.reportErrorMessage(
-             node, MessageKind.GENERIC,
-             {'text': 'Error: Unknown internal flag "$name".'});
-     }
-     stack.add(graph.addConstantBool(value, compiler));
+    ast.Node argument;
+    switch (arguments.length) {
+      case 0:
+        reporter.reportErrorMessage(node, MessageKind.GENERIC,
+            {'text': 'Error: Expected one argument to JS_GET_FLAG.'});
+        return;
+      case 1:
+        argument = arguments[0];
+        break;
+      default:
+        for (int i = 1; i < arguments.length; i++) {
+          reporter.reportErrorMessage(arguments[i], MessageKind.GENERIC,
+              {'text': 'Error: Extra argument to JS_GET_FLAG.'});
+        }
+        return;
+    }
+    ast.LiteralString string = argument.asLiteralString();
+    if (string == null) {
+      reporter.reportErrorMessage(argument, MessageKind.GENERIC,
+          {'text': 'Error: Expected a literal string.'});
+    }
+    String name = string.dartString.slowToString();
+    bool value = false;
+    switch (name) {
+      case 'MUST_RETAIN_METADATA':
+        value = backend.mustRetainMetadata;
+        break;
+      case 'USE_CONTENT_SECURITY_POLICY':
+        value = compiler.options.useContentSecurityPolicy;
+        break;
+      default:
+        reporter.reportErrorMessage(node, MessageKind.GENERIC,
+            {'text': 'Error: Unknown internal flag "$name".'});
+    }
+    stack.add(graph.addConstantBool(value, compiler));
   }
 
   void handleForeignJsGetName(ast.Send node) {
     List<ast.Node> arguments = node.arguments.toList();
     ast.Node argument;
     switch (arguments.length) {
-    case 0:
-      reporter.reportErrorMessage(
-          node, MessageKind.GENERIC,
-          {'text': 'Error: Expected one argument to JS_GET_NAME.'});
-      return;
-    case 1:
-      argument = arguments[0];
-      break;
-    default:
-      for (int i = 1; i < arguments.length; i++) {
-        reporter.reportErrorMessage(
-            arguments[i], MessageKind.GENERIC,
-            {'text': 'Error: Extra argument to JS_GET_NAME.'});
-      }
-      return;
+      case 0:
+        reporter.reportErrorMessage(node, MessageKind.GENERIC,
+            {'text': 'Error: Expected one argument to JS_GET_NAME.'});
+        return;
+      case 1:
+        argument = arguments[0];
+        break;
+      default:
+        for (int i = 1; i < arguments.length; i++) {
+          reporter.reportErrorMessage(arguments[i], MessageKind.GENERIC,
+              {'text': 'Error: Extra argument to JS_GET_NAME.'});
+        }
+        return;
     }
     Element element = elements[argument];
     if (element == null ||
-        element is! FieldElement ||
+        element is! EnumConstantElement ||
         element.enclosingClass != helpers.jsGetNameEnum) {
-      reporter.reportErrorMessage(
-          argument, MessageKind.GENERIC,
+      reporter.reportErrorMessage(argument, MessageKind.GENERIC,
           {'text': 'Error: Expected a JsGetName enum value.'});
     }
-    EnumClassElement enumClass = element.enclosingClass;
-    int index = enumClass.enumValues.indexOf(element);
-    stack.add(
-        addConstantStringFromName(
-            backend.namer.getNameForJsGetName(
-                argument, JsGetName.values[index])));
+    EnumConstantElement enumConstant = element;
+    int index = enumConstant.index;
+    stack.add(addConstantStringFromName(
+        backend.namer.getNameForJsGetName(argument, JsGetName.values[index])));
   }
 
   void handleForeignJsBuiltin(ast.Send node) {
     List<ast.Node> arguments = node.arguments.toList();
     ast.Node argument;
     if (arguments.length < 2) {
-      reporter.reportErrorMessage(
-          node, MessageKind.GENERIC,
+      reporter.reportErrorMessage(node, MessageKind.GENERIC,
           {'text': 'Error: Expected at least two arguments to JS_BUILTIN.'});
     }
 
     Element builtinElement = elements[arguments[1]];
     if (builtinElement == null ||
-        (builtinElement is! FieldElement) ||
+        (builtinElement is! EnumConstantElement) ||
         builtinElement.enclosingClass != helpers.jsBuiltinEnum) {
-      reporter.reportErrorMessage(
-          argument, MessageKind.GENERIC,
+      reporter.reportErrorMessage(argument, MessageKind.GENERIC,
           {'text': 'Error: Expected a JsBuiltin enum value.'});
     }
-    EnumClassElement enumClass = builtinElement.enclosingClass;
-    int index = enumClass.enumValues.indexOf(builtinElement);
+    EnumConstantElement enumConstant = builtinElement;
+    int index = enumConstant.index;
 
     js.Template template =
         backend.emitter.builtinTemplateFor(JsBuiltin.values[index]);
@@ -4332,42 +4189,38 @@
     TypeMask ssaType =
         TypeMaskFactory.fromNativeBehavior(nativeBehavior, compiler);
 
-    push(new HForeignCode(template,
-                          ssaType,
-                          compiledArguments,
-                          nativeBehavior: nativeBehavior));
+    push(new HForeignCode(template, ssaType, compiledArguments,
+        nativeBehavior: nativeBehavior));
   }
 
   void handleForeignJsEmbeddedGlobal(ast.Send node) {
     List<ast.Node> arguments = node.arguments.toList();
     ast.Node globalNameNode;
     switch (arguments.length) {
-    case 0:
-    case 1:
-      reporter.reportErrorMessage(
-          node, MessageKind.GENERIC,
-          {'text': 'Error: Expected two arguments to JS_EMBEDDED_GLOBAL.'});
-      return;
-    case 2:
-      // The type has been extracted earlier. We are only interested in the
-      // name in this function.
-      globalNameNode = arguments[1];
-      break;
-    default:
-      for (int i = 2; i < arguments.length; i++) {
-        reporter.reportErrorMessage(
-            arguments[i], MessageKind.GENERIC,
-            {'text': 'Error: Extra argument to JS_EMBEDDED_GLOBAL.'});
-      }
-      return;
+      case 0:
+      case 1:
+        reporter.reportErrorMessage(node, MessageKind.GENERIC,
+            {'text': 'Error: Expected two arguments to JS_EMBEDDED_GLOBAL.'});
+        return;
+      case 2:
+        // The type has been extracted earlier. We are only interested in the
+        // name in this function.
+        globalNameNode = arguments[1];
+        break;
+      default:
+        for (int i = 2; i < arguments.length; i++) {
+          reporter.reportErrorMessage(arguments[i], MessageKind.GENERIC,
+              {'text': 'Error: Extra argument to JS_EMBEDDED_GLOBAL.'});
+        }
+        return;
     }
     visit(globalNameNode);
     HInstruction globalNameHNode = pop();
     if (!globalNameHNode.isConstantString()) {
-      reporter.reportErrorMessage(
-          arguments[1], MessageKind.GENERIC,
-          {'text': 'Error: Expected String as second argument '
-                   'to JS_EMBEDDED_GLOBAL.'});
+      reporter.reportErrorMessage(arguments[1], MessageKind.GENERIC, {
+        'text': 'Error: Expected String as second argument '
+            'to JS_EMBEDDED_GLOBAL.'
+      });
       return;
     }
     HConstant hConstant = globalNameHNode;
@@ -4380,7 +4233,7 @@
     TypeMask ssaType =
         TypeMaskFactory.fromNativeBehavior(nativeBehavior, compiler);
     push(new HForeignCode(expr, ssaType, const [],
-            nativeBehavior: nativeBehavior));
+        nativeBehavior: nativeBehavior));
   }
 
   void handleJsInterceptorConstant(ast.Send node) {
@@ -4402,8 +4255,7 @@
       }
     }
     reporter.reportErrorMessage(
-        node,
-        MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT);
+        node, MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT);
     stack.add(graph.addConstantNull(compiler));
   }
 
@@ -4414,14 +4266,12 @@
       // closure.
       visit(link.tail.head);
       push(new HInvokeClosure(new Selector.callClosure(0),
-                              <HInstruction>[pop()],
-                              backend.dynamicType));
+          <HInstruction>[pop()], backend.dynamicType));
     } else {
       // Call a helper method from the isolate library.
       Element element = helpers.callInIsolate;
       if (element == null) {
-        reporter.internalError(node,
-            'Isolate library and compiler mismatch.');
+        reporter.internalError(node, 'Isolate library and compiler mismatch.');
       }
       List<HInstruction> inputs = <HInstruction>[];
       addGenericSendArgumentsToList(link, inputs);
@@ -4431,14 +4281,14 @@
 
   FunctionSignature handleForeignRawFunctionRef(ast.Send node, String name) {
     if (node.arguments.isEmpty || !node.arguments.tail.isEmpty) {
-      reporter.internalError(node.argumentsNode,
-          '"$name" requires exactly one argument.');
+      reporter.internalError(
+          node.argumentsNode, '"$name" requires exactly one argument.');
     }
     ast.Node closure = node.arguments.head;
     Element element = elements[closure];
     if (!Elements.isStaticOrTopLevelFunction(element)) {
-      reporter.internalError(closure,
-          '"$name" requires a static or top-level method.');
+      reporter.internalError(
+          closure, '"$name" requires a static or top-level method.');
     }
     FunctionElement function = element;
     // TODO(johnniwinther): Try to eliminate the need to distinguish declaration
@@ -4447,12 +4297,11 @@
     FunctionElement implementation = function.implementation;
     FunctionSignature params = implementation.functionSignature;
     if (params.optionalParameterCount != 0) {
-      reporter.internalError(closure,
-          '"$name" does not handle closure with optional parameters.');
+      reporter.internalError(
+          closure, '"$name" does not handle closure with optional parameters.');
     }
 
-    registry?.registerStaticUse(
-        new StaticUse.foreignUse(function));
+    registry?.registerStaticUse(new StaticUse.foreignUse(function));
     push(new HForeignCode(
         js.js.expressionTemplateYielding(
             backend.emitter.staticFunctionAccess(function)),
@@ -4471,17 +4320,15 @@
 
   void handleForeignJsSetStaticState(ast.Send node) {
     if (node.arguments.isEmpty || !node.arguments.tail.isEmpty) {
-      reporter.internalError(node.argumentsNode,
-          'Exactly one argument required.');
+      reporter.internalError(
+          node.argumentsNode, 'Exactly one argument required.');
     }
     visit(node.arguments.head);
     String isolateName = backend.namer.staticStateHolder;
     SideEffects sideEffects = new SideEffects.empty();
     sideEffects.setAllSideEffects();
-    push(new HForeignCode(
-        js.js.parseForeignJS("$isolateName = #"),
-        backend.dynamicType,
-        <HInstruction>[pop()],
+    push(new HForeignCode(js.js.parseForeignJS("$isolateName = #"),
+        backend.dynamicType, <HInstruction>[pop()],
         nativeBehavior: native.NativeBehavior.CHANGES_OTHER,
         effects: sideEffects));
   }
@@ -4491,9 +4338,8 @@
       reporter.internalError(node.argumentsNode, 'Too many arguments.');
     }
     push(new HForeignCode(js.js.parseForeignJS(backend.namer.staticStateHolder),
-                          backend.dynamicType,
-                          <HInstruction>[],
-                          nativeBehavior: native.NativeBehavior.DEPENDS_OTHER));
+        backend.dynamicType, <HInstruction>[],
+        nativeBehavior: native.NativeBehavior.DEPENDS_OTHER));
   }
 
   void handleForeignSend(ast.Send node, FunctionElement element) {
@@ -4531,25 +4377,23 @@
     }
   }
 
-  generateDeferredLoaderGet(ast.Send node,
-                            FunctionElement deferredLoader,
-                            SourceInformation sourceInformation) {
+  generateDeferredLoaderGet(ast.Send node, FunctionElement deferredLoader,
+      SourceInformation sourceInformation) {
     // Until now we only handle these as getters.
     invariant(node, deferredLoader.isDeferredLoaderGetter);
     Element loadFunction = compiler.loadLibraryFunction;
     PrefixElement prefixElement = deferredLoader.enclosingElement;
     String loadId =
         compiler.deferredLoadTask.getImportDeferName(node, prefixElement);
-    var inputs = [graph.addConstantString(
-        new ast.DartString.literal(loadId), compiler)];
+    var inputs = [
+      graph.addConstantString(new ast.DartString.literal(loadId), compiler)
+    ];
     push(new HInvokeStatic(loadFunction, inputs, backend.nonNullType,
-                           targetCanThrow: false)
-        ..sourceInformation = sourceInformation);
+        targetCanThrow: false)..sourceInformation = sourceInformation);
   }
 
-  generateSuperNoSuchMethodSend(ast.Send node,
-                                Selector selector,
-                                List<HInstruction> arguments) {
+  generateSuperNoSuchMethodSend(
+      ast.Send node, Selector selector, List<HInstruction> arguments) {
     String name = selector.name;
 
     ClassElement cls = currentNonClosureClass;
@@ -4568,8 +4412,8 @@
     String publicName = name;
     if (selector.isSetter) publicName += '=';
 
-    ConstantValue nameConstant = constantSystem.createString(
-        new ast.DartString.literal(publicName));
+    ConstantValue nameConstant =
+        constantSystem.createString(new ast.DartString.literal(publicName));
 
     js.Name internalName = backend.namer.invocationName(selector);
 
@@ -4589,33 +4433,33 @@
     ConstantValue kindConstant =
         constantSystem.createInt(selector.invocationMirrorKind);
 
-    pushInvokeStatic(null,
-                     createInvocationMirror,
-                     [graph.addConstant(nameConstant, compiler),
-                      graph.addConstantStringFromName(internalName, compiler),
-                      graph.addConstant(kindConstant, compiler),
-                      argumentsInstruction,
-                      argumentNamesInstruction],
-                     typeMask: backend.dynamicType);
+    pushInvokeStatic(
+        null,
+        createInvocationMirror,
+        [
+          graph.addConstant(nameConstant, compiler),
+          graph.addConstantStringFromName(internalName, compiler),
+          graph.addConstant(kindConstant, compiler),
+          argumentsInstruction,
+          argumentNamesInstruction
+        ],
+        typeMask: backend.dynamicType);
 
     var inputs = <HInstruction>[pop()];
     push(buildInvokeSuper(Selectors.noSuchMethod_, element, inputs));
   }
 
   /// Generate a call to a super method or constructor.
-  void generateSuperInvoke(ast.Send node,
-                           FunctionElement function,
-                           SourceInformation sourceInformation) {
+  void generateSuperInvoke(ast.Send node, FunctionElement function,
+      SourceInformation sourceInformation) {
     // TODO(5347): Try to avoid the need for calling [implementation] before
     // calling [makeStaticArgumentList].
     Selector selector = elements.getSelector(node);
-    assert(invariant(node,
-        selector.applies(function.implementation, compiler.world),
+    assert(invariant(
+        node, selector.applies(function.implementation, compiler.world),
         message: "$selector does not apply to ${function.implementation}"));
-    List<HInstruction> inputs =
-        makeStaticArgumentList(selector.callStructure,
-                               node.arguments,
-                               function.implementation);
+    List<HInstruction> inputs = makeStaticArgumentList(
+        selector.callStructure, node.arguments, function.implementation);
     push(buildInvokeSuper(selector, function, inputs, sourceInformation));
   }
 
@@ -4631,22 +4475,17 @@
   /// Invoke .call on the value retrieved from the super [element].
   void handleSuperCallInvoke(ast.Send node, Element element) {
     Selector selector = elements.getSelector(node);
-    HInstruction target = buildInvokeSuper(
-        selector, element, const <HInstruction>[],
-        sourceInformationBuilder.buildGet(node));
+    HInstruction target = buildInvokeSuper(selector, element,
+        const <HInstruction>[], sourceInformationBuilder.buildGet(node));
     add(target);
-    generateCallInvoke(
-        node,
-        target,
+    generateCallInvoke(node, target,
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   /// Invoke super [method].
-  void handleSuperMethodInvoke(
-      ast.Send node,
-      MethodElement method) {
-    generateSuperInvoke(node, method,
-        sourceInformationBuilder.buildCall(node, node.selector));
+  void handleSuperMethodInvoke(ast.Send node, MethodElement method) {
+    generateSuperInvoke(
+        node, method, sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   /// Access an unresolved super property.
@@ -4661,185 +4500,116 @@
 
   @override
   void visitUnresolvedSuperIndex(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      _) {
+      ast.Send node, Element element, ast.Node index, _) {
     handleUnresolvedSuperInvoke(node);
   }
 
   @override
   void visitUnresolvedSuperUnary(
-      ast.Send node,
-      UnaryOperator operator,
-      Element element,
-      _) {
+      ast.Send node, UnaryOperator operator, Element element, _) {
     handleUnresolvedSuperInvoke(node);
   }
 
   @override
-  void visitUnresolvedSuperBinary(
-      ast.Send node,
-      Element element,
-      BinaryOperator operator,
-      ast.Node argument,
-      _) {
+  void visitUnresolvedSuperBinary(ast.Send node, Element element,
+      BinaryOperator operator, ast.Node argument, _) {
     handleUnresolvedSuperInvoke(node);
   }
 
   @override
-  void visitUnresolvedSuperGet(
-      ast.Send node,
-      Element element,
-      _) {
+  void visitUnresolvedSuperGet(ast.Send node, Element element, _) {
     handleUnresolvedSuperInvoke(node);
   }
 
   @override
   void visitUnresolvedSuperSet(
-      ast.Send node,
-      Element element,
-      ast.Node rhs,
-      _) {
+      ast.Send node, Element element, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperSetterGet(
-      ast.Send node,
-      MethodElement setter,
-      _) {
+  void visitSuperSetterGet(ast.Send node, MethodElement setter, _) {
     handleUnresolvedSuperInvoke(node);
   }
 
   @override
   void visitUnresolvedSuperInvoke(
-      ast.Send node,
-      Element element,
-      ast.Node argument,
-      Selector selector,
-      _) {
+      ast.Send node, Element element, ast.Node argument, Selector selector, _) {
     handleUnresolvedSuperInvoke(node);
   }
 
   @override
-  void visitSuperFieldGet(
-      ast.Send node,
-      FieldElement field,
-      _) {
+  void visitSuperFieldGet(ast.Send node, FieldElement field, _) {
     handleSuperGet(node, field);
   }
 
   @override
-  void visitSuperGetterGet(
-      ast.Send node,
-      MethodElement method,
-      _) {
+  void visitSuperGetterGet(ast.Send node, MethodElement method, _) {
     handleSuperGet(node, method);
   }
 
   @override
-  void visitSuperMethodGet(
-      ast.Send node,
-      MethodElement method,
-      _) {
+  void visitSuperMethodGet(ast.Send node, MethodElement method, _) {
     handleSuperGet(node, method);
   }
 
   @override
-  void visitSuperFieldInvoke(
-      ast.Send node,
-      FieldElement field,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitSuperFieldInvoke(ast.Send node, FieldElement field,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     handleSuperCallInvoke(node, field);
   }
 
   @override
-  void visitSuperGetterInvoke(
-      ast.Send node,
-      MethodElement getter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitSuperGetterInvoke(ast.Send node, MethodElement getter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     handleSuperCallInvoke(node, getter);
   }
 
   @override
-  void visitSuperMethodInvoke(
-      ast.Send node,
-      MethodElement method,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitSuperMethodInvoke(ast.Send node, MethodElement method,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     handleSuperMethodInvoke(node, method);
   }
 
   @override
-  void visitSuperIndex(
-      ast.Send node,
-      MethodElement method,
-      ast.Node index,
-      _) {
+  void visitSuperIndex(ast.Send node, MethodElement method, ast.Node index, _) {
     handleSuperMethodInvoke(node, method);
   }
 
   @override
   void visitSuperEquals(
-      ast.Send node,
-      MethodElement method,
-      ast.Node argument,
-      _) {
+      ast.Send node, MethodElement method, ast.Node argument, _) {
     handleSuperMethodInvoke(node, method);
   }
 
   @override
-  void visitSuperBinary(
-      ast.Send node,
-      MethodElement method,
-      BinaryOperator operator,
-      ast.Node argument,
-      _) {
+  void visitSuperBinary(ast.Send node, MethodElement method,
+      BinaryOperator operator, ast.Node argument, _) {
     handleSuperMethodInvoke(node, method);
   }
 
   @override
   void visitSuperNotEquals(
-      ast.Send node,
-      MethodElement method,
-      ast.Node argument,
-      _) {
+      ast.Send node, MethodElement method, ast.Node argument, _) {
     handleSuperMethodInvoke(node, method);
     pushWithPosition(new HNot(popBoolified(), backend.boolType), node.selector);
   }
 
   @override
   void visitSuperUnary(
-      ast.Send node,
-      UnaryOperator operator,
-      MethodElement method,
-      _) {
+      ast.Send node, UnaryOperator operator, MethodElement method, _) {
     handleSuperMethodInvoke(node, method);
   }
 
   @override
-  void visitSuperMethodIncompatibleInvoke(
-      ast.Send node,
-      MethodElement method,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitSuperMethodIncompatibleInvoke(ast.Send node, MethodElement method,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     handleInvalidSuperInvoke(node, arguments);
   }
 
   @override
-  void visitSuperSetterInvoke(
-      ast.Send node,
-      SetterElement setter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitSuperSetterInvoke(ast.Send node, SetterElement setter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     handleInvalidSuperInvoke(node, arguments);
   }
 
@@ -4865,9 +4635,7 @@
    * extract the type argument by the index of the variable in the list of type
    * variables for that class.
    */
-  HInstruction readTypeVariable(
-      ClassElement cls,
-      TypeVariableElement variable,
+  HInstruction readTypeVariable(ClassElement cls, TypeVariableElement variable,
       {SourceInformation sourceInformation}) {
     assert(sourceElement.isInstanceMember);
 
@@ -4879,20 +4647,14 @@
       // string concatenation in the implementation), and may prevent
       // segmentation of '$'.
       js.Name substitutionName = backend.namer.runtimeTypeName(cls);
-      HInstruction substitutionNameInstr = graph.addConstantStringFromName(
-          substitutionName, compiler);
-      pushInvokeStatic(null,
-                       helpers.getRuntimeTypeArgument,
-                       [target, substitutionNameInstr, index],
-                       typeMask: backend.dynamicType,
-                       sourceInformation: sourceInformation);
+      HInstruction substitutionNameInstr =
+          graph.addConstantStringFromName(substitutionName, compiler);
+      pushInvokeStatic(null, helpers.getRuntimeTypeArgument,
+          [target, substitutionNameInstr, index],
+          typeMask: backend.dynamicType, sourceInformation: sourceInformation);
     } else {
-      pushInvokeStatic(
-          null,
-          helpers.getTypeArgumentByIndex,
-          [target, index],
-          typeMask: backend.dynamicType,
-          sourceInformation: sourceInformation);
+      pushInvokeStatic(null, helpers.getTypeArgumentByIndex, [target, index],
+          typeMask: backend.dynamicType, sourceInformation: sourceInformation);
     }
     return pop();
   }
@@ -4902,16 +4664,14 @@
   // fixed.
   bool hasDirectLocal(Local local) {
     return !localsHandler.isAccessedDirectly(local) ||
-            localsHandler.directLocals[local] != null;
+        localsHandler.directLocals[local] != null;
   }
 
   /**
    * Helper to create an instruction that gets the value of a type variable.
    */
-  HInstruction addTypeVariableReference(
-      TypeVariableType type,
+  HInstruction addTypeVariableReference(TypeVariableType type,
       {SourceInformation sourceInformation}) {
-
     assert(assertTypeInContext(type));
     Element member = sourceElement;
     bool isClosure = member.enclosingElement.isClosure;
@@ -4920,8 +4680,8 @@
       member = closureClass.methodElement;
       member = member.outermostEnclosingMemberOrTopLevel;
     }
-    bool isInConstructorContext = member.isConstructor ||
-        member.isGenerativeConstructorBody;
+    bool isInConstructorContext =
+        member.isConstructor || member.isGenerativeConstructorBody;
     Local typeVariableLocal = localsHandler.getTypeVariableAsLocal(type);
     if (isClosure) {
       if (member.isFactoryConstructor ||
@@ -4929,17 +4689,15 @@
         // The type variable is used from a closure in a factory constructor.
         // The value of the type argument is stored as a local on the closure
         // itself.
-        return localsHandler.readLocal(
-            typeVariableLocal, sourceInformation: sourceInformation);
+        return localsHandler.readLocal(typeVariableLocal,
+            sourceInformation: sourceInformation);
       } else if (member.isFunction ||
-                 member.isGetter ||
-                 member.isSetter ||
-                 isInConstructorContext) {
+          member.isGetter ||
+          member.isSetter ||
+          isInConstructorContext) {
         // The type variable is stored on the "enclosing object" and needs to be
         // accessed using the this-reference in the closure.
-        return readTypeVariable(
-            member.enclosingClass,
-            type.element,
+        return readTypeVariable(member.enclosingClass, type.element,
             sourceInformation: sourceInformation);
       } else {
         assert(member.isField);
@@ -4947,32 +4705,28 @@
         return localsHandler.readLocal(typeVariableLocal);
       }
     } else if (isInConstructorContext ||
-               // When [member] is a field, we can be either
-               // generating a checked setter or inlining its
-               // initializer in a constructor. An initializer is
-               // never built standalone, so in that case [target] is not
-               // the [member] itself.
-               (member.isField && member != target)) {
+        // When [member] is a field, we can be either
+        // generating a checked setter or inlining its
+        // initializer in a constructor. An initializer is
+        // never built standalone, so in that case [target] is not
+        // the [member] itself.
+        (member.isField && member != target)) {
       // The type variable is stored in a parameter of the method.
-      return localsHandler.readLocal(
-          typeVariableLocal, sourceInformation: sourceInformation);
+      return localsHandler.readLocal(typeVariableLocal,
+          sourceInformation: sourceInformation);
     } else if (member.isInstanceMember) {
       // The type variable is stored on the object.
-      return readTypeVariable(
-          member.enclosingClass,
-          type.element,
+      return readTypeVariable(member.enclosingClass, type.element,
           sourceInformation: sourceInformation);
     } else {
-      reporter.internalError(type.element,
-          'Unexpected type variable in static context.');
+      reporter.internalError(
+          type.element, 'Unexpected type variable in static context.');
       return null;
     }
   }
 
-  HInstruction analyzeTypeArgument(
-      DartType argument,
+  HInstruction analyzeTypeArgument(DartType argument,
       {SourceInformation sourceInformation}) {
-
     assert(assertTypeInContext(argument));
     if (argument.treatAsDynamic) {
       // Represent [dynamic] as [null].
@@ -4980,16 +4734,16 @@
     }
 
     if (argument.isTypeVariable) {
-      return addTypeVariableReference(
-          argument, sourceInformation: sourceInformation);
+      return addTypeVariableReference(argument,
+          sourceInformation: sourceInformation);
     }
 
     List<HInstruction> inputs = <HInstruction>[];
 
     js.Expression template =
         rtiEncoder.getTypeRepresentationWithPlaceholders(argument, (variable) {
-            inputs.add(addTypeVariableReference(variable));
-        });
+      inputs.add(addTypeVariableReference(variable));
+    });
 
     js.Template code = new js.Template(null, template);
     HInstruction result = new HForeignCode(code, backend.stringType, inputs,
@@ -4998,9 +4752,8 @@
     return result;
   }
 
-  HInstruction handleListConstructor(InterfaceType type,
-                                     ast.Node currentNode,
-                                     HInstruction newObject) {
+  HInstruction handleListConstructor(
+      InterfaceType type, ast.Node currentNode, HInstruction newObject) {
     if (!backend.classNeedsRti(type.element) || type.treatAsRaw) {
       return newObject;
     }
@@ -5022,8 +4775,7 @@
   }
 
   HInstruction callSetRuntimeTypeInfo(ClassElement element,
-                                      List<HInstruction> rtiInputs,
-                                      HInstruction newObject) {
+      List<HInstruction> rtiInputs, HInstruction newObject) {
     if (!backend.classNeedsRti(element) || element.typeVariables.isEmpty) {
       return newObject;
     }
@@ -5034,22 +4786,18 @@
     // Set the runtime type information on the object.
     Element typeInfoSetterElement = helpers.setRuntimeTypeInfo;
     pushInvokeStatic(
-        null,
-        typeInfoSetterElement,
-        <HInstruction>[newObject, typeInfo],
+        null, typeInfoSetterElement, <HInstruction>[newObject, typeInfo],
         typeMask: backend.dynamicType,
         sourceInformation: newObject.sourceInformation);
 
     // The new object will now be referenced through the
     // `setRuntimeTypeInfo` call. We therefore set the type of that
     // instruction to be of the object's type.
-    assert(invariant(
-        CURRENT_ELEMENT_SPANNABLE,
+    assert(invariant(CURRENT_ELEMENT_SPANNABLE,
         stack.last is HInvokeStatic || stack.last == newObject,
-        message:
-          "Unexpected `stack.last`: Found ${stack.last}, "
-          "expected ${newObject} or an HInvokeStatic. "
-          "State: element=$element, rtiInputs=$rtiInputs, stack=$stack."));
+        message: "Unexpected `stack.last`: Found ${stack.last}, "
+            "expected ${newObject} or an HInvokeStatic. "
+            "State: element=$element, rtiInputs=$rtiInputs, stack=$stack."));
     stack.last.instructionType = newObject.instructionType;
     return pop();
   }
@@ -5066,9 +4814,9 @@
 
     TypeMask computeType(element) {
       Element originalElement = elements[send];
-      if (isFixedListConstructorCall
-          || Elements.isFilledListConstructorCall(
-                  originalElement, send, compiler)) {
+      if (isFixedListConstructorCall ||
+          Elements.isFilledListConstructorCall(
+              originalElement, send, compiler)) {
         isFixedList = true;
         TypeMask inferred =
             TypeMaskFactory.inferredForNode(sourceElement, send, compiler);
@@ -5082,7 +4830,7 @@
             ? backend.extendableArrayType
             : inferred;
       } else if (Elements.isConstructorOfTypedArraySubclass(
-                    originalElement, compiler)) {
+          originalElement, compiler)) {
         isFixedList = true;
         TypeMask inferred =
             TypeMaskFactory.inferredForNode(sourceElement, send, compiler);
@@ -5120,10 +4868,10 @@
     if (isSymbolConstructor) {
       constructor = compiler.symbolValidatedConstructor;
       assert(invariant(send, constructor != null,
-                       message: 'Constructor Symbol.validated is missing'));
+          message: 'Constructor Symbol.validated is missing'));
       callStructure = compiler.symbolValidatedConstructorSelector.callStructure;
       assert(invariant(send, callStructure != null,
-                       message: 'Constructor Symbol.validated is missing'));
+          message: 'Constructor Symbol.validated is missing'));
     }
 
     bool isRedirected = constructorDeclaration.isRedirectingFactory;
@@ -5134,8 +4882,7 @@
       while (target.isRedirectingFactory) {
         if (constructorDeclaration.redirectionDeferredPrefix != null) {
           generateIsDeferredLoadedCheckIfNeeded(
-              target.redirectionDeferredPrefix,
-              node);
+              target.redirectionDeferredPrefix, node);
         }
         target = target.immediateRedirectionTarget;
       }
@@ -5171,8 +4918,8 @@
     // calling [makeStaticArgumentList].
     constructorImplementation = constructor.implementation;
     if (constructorImplementation.isMalformed ||
-        !callStructure.signatureApplies(
-            constructorImplementation.functionSignature)) {
+        !callStructure
+            .signatureApplies(constructorImplementation.functionSignature)) {
       generateWrongArgumentCountError(send, constructor, send.arguments);
       return;
     }
@@ -5184,16 +4931,18 @@
       // Native class generative constructors take a pre-constructed object.
       inputs.add(graph.addConstantNull(compiler));
     }
-    inputs.addAll(makeStaticArgumentList(callStructure,
-                                         send.arguments,
-                                         constructorImplementation));
+    inputs.addAll(makeStaticArgumentList(
+        callStructure, send.arguments, constructorImplementation));
 
     TypeMask elementType = computeType(constructor);
     if (isFixedListConstructorCall) {
       if (!inputs[0].isNumber(compiler)) {
         HTypeConversion conversion = new HTypeConversion(
-          null, HTypeConversion.ARGUMENT_TYPE_CHECK, backend.numType,
-          inputs[0], null);
+            null,
+            HTypeConversion.ARGUMENT_TYPE_CHECK,
+            backend.numType,
+            inputs[0],
+            null);
         add(conversion);
         inputs[0] = conversion;
       }
@@ -5222,7 +4971,7 @@
         // We set the instruction as [canThrow] to avoid it being dead code.
         // We need a finer grained side effect.
         add(new HForeignCode(code, backend.nullType, [stack.last],
-                throwBehavior: native.NativeThrowBehavior.MAY));
+            throwBehavior: native.NativeThrowBehavior.MAY));
       }
     } else if (isGrowableListConstructorCall) {
       push(buildLiteralList(<HInstruction>[]));
@@ -5253,8 +5002,9 @@
     // this constructor to have the setRuntimeTypeInfo called where
     // the 'new' is done.
     if (backend.classNeedsRti(coreClasses.listClass) &&
-        (isFixedListConstructorCall || isGrowableListConstructorCall ||
-         isJSArrayTypedConstructor)) {
+        (isFixedListConstructorCall ||
+            isGrowableListConstructorCall ||
+            isJSArrayTypedConstructor)) {
       newInstance = handleListConstructor(type, send, pop());
       stack.add(newInstance);
     }
@@ -5269,38 +5019,36 @@
     }
   }
 
-  void potentiallyAddTypeArguments(List<HInstruction> inputs, ClassElement cls,
-                                   InterfaceType expectedType,
-                                   {SourceInformation sourceInformation}) {
+  void potentiallyAddTypeArguments(
+      List<HInstruction> inputs, ClassElement cls, InterfaceType expectedType,
+      {SourceInformation sourceInformation}) {
     if (!backend.classNeedsRti(cls)) return;
     assert(expectedType.typeArguments.isEmpty ||
         cls.typeVariables.length == expectedType.typeArguments.length);
     expectedType.typeArguments.forEach((DartType argument) {
-      inputs.add(analyzeTypeArgument(
-          argument, sourceInformation: sourceInformation));
+      inputs.add(
+          analyzeTypeArgument(argument, sourceInformation: sourceInformation));
     });
   }
 
   /// In checked mode checks the [type] of [node] to be well-bounded. The method
   /// returns [:true:] if an error can be statically determined.
   bool checkTypeVariableBounds(ast.NewExpression node, InterfaceType type) {
-    if (!compiler.enableTypeAssertions) return false;
+    if (!compiler.options.enableTypeAssertions) return false;
 
     Map<DartType, Set<DartType>> seenChecksMap =
         new Map<DartType, Set<DartType>>();
     bool definitelyFails = false;
 
-    addTypeVariableBoundCheck(GenericType instance,
-                              DartType typeArgument,
-                              TypeVariableType typeVariable,
-                              DartType bound) {
+    addTypeVariableBoundCheck(GenericType instance, DartType typeArgument,
+        TypeVariableType typeVariable, DartType bound) {
       if (definitelyFails) return;
 
-      int subtypeRelation = compiler.types.computeSubtypeRelation(typeArgument, bound);
+      int subtypeRelation =
+          compiler.types.computeSubtypeRelation(typeArgument, bound);
       if (subtypeRelation == Types.IS_SUBTYPE) return;
 
-      String message =
-          "Can't create an instance of malbounded type '$type': "
+      String message = "Can't create an instance of malbounded type '$type': "
           "'${typeArgument}' is not a subtype of bound '${bound}' for "
           "type variable '${typeVariable}' of type "
           "${type == instance
@@ -5328,8 +5076,8 @@
     }
     for (InterfaceType supertype in type.element.allSupertypes) {
       DartType instance = type.asInstanceOf(supertype.element);
-      compiler.types.checkTypeVariableBounds(instance,
-          addTypeVariableBoundCheck);
+      compiler.types
+          .checkTypeVariableBounds(instance, addTypeVariableBoundCheck);
       if (definitelyFails) {
         return true;
       }
@@ -5343,13 +5091,9 @@
 
   /// Generate an invocation to the static or top level [function].
   void generateStaticFunctionInvoke(
-      ast.Send node,
-      FunctionElement function,
-      CallStructure callStructure) {
+      ast.Send node, FunctionElement function, CallStructure callStructure) {
     List<HInstruction> inputs = makeStaticArgumentList(
-        callStructure,
-        node.arguments,
-        function.implementation);
+        callStructure, node.arguments, function.implementation);
 
     if (function == compiler.identicalFunction) {
       pushWithPosition(
@@ -5357,39 +5101,29 @@
       return;
     } else {
       pushInvokeStatic(node, function, inputs,
-          sourceInformation: sourceInformationBuilder.buildCall(
-              node, node.selector));
+          sourceInformation:
+              sourceInformationBuilder.buildCall(node, node.selector));
     }
   }
 
   /// Generate an invocation to a static or top level function with the wrong
   /// number of arguments.
-  void generateStaticFunctionIncompatibleInvoke(ast.Send node,
-                                                Element element) {
+  void generateStaticFunctionIncompatibleInvoke(
+      ast.Send node, Element element) {
     generateWrongArgumentCountError(node, element, node.arguments);
   }
 
   @override
-  void visitStaticFieldInvoke(
-      ast.Send node,
-      FieldElement field,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitStaticFieldInvoke(ast.Send node, FieldElement field,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateStaticFieldGet(node, field);
-    generateCallInvoke(
-        node,
-        pop(),
+    generateCallInvoke(node, pop(),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   @override
-  void visitStaticFunctionInvoke(
-      ast.Send node,
-      MethodElement function,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitStaticFunctionInvoke(ast.Send node, MethodElement function,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateStaticFunctionInvoke(node, function, callStructure);
   }
 
@@ -5404,40 +5138,24 @@
   }
 
   @override
-  void visitStaticGetterInvoke(
-      ast.Send node,
-      FunctionElement getter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitStaticGetterInvoke(ast.Send node, FunctionElement getter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateStaticGetterGet(node, getter);
-    generateCallInvoke(
-        node,
-        pop(),
+    generateCallInvoke(node, pop(),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   @override
-  void visitTopLevelFieldInvoke(
-      ast.Send node,
-      FieldElement field,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitTopLevelFieldInvoke(ast.Send node, FieldElement field,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateStaticFieldGet(node, field);
-    generateCallInvoke(
-        node,
-        pop(),
+    generateCallInvoke(node, pop(),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   @override
-  void visitTopLevelFunctionInvoke(
-      ast.Send node,
-      MethodElement function,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitTopLevelFunctionInvoke(ast.Send node, MethodElement function,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     if (backend.isForeign(function)) {
       handleForeignSend(node, function);
     } else {
@@ -5456,76 +5174,48 @@
   }
 
   @override
-  void visitTopLevelGetterInvoke(
-      ast.Send node,
-      FunctionElement getter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitTopLevelGetterInvoke(ast.Send node, FunctionElement getter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateStaticGetterGet(node, getter);
-    generateCallInvoke(
-        node,
-        pop(),
+    generateCallInvoke(node, pop(),
         sourceInformationBuilder.buildCall(node, node.argumentsNode));
   }
 
   @override
-  void visitTopLevelSetterGet(
-      ast.Send node,
-      MethodElement setter,
-      _) {
+  void visitTopLevelSetterGet(ast.Send node, MethodElement setter, _) {
     handleInvalidStaticGet(node, setter);
   }
 
   @override
-  void visitStaticSetterGet(
-      ast.Send node,
-      MethodElement setter,
-      _) {
+  void visitStaticSetterGet(ast.Send node, MethodElement setter, _) {
     handleInvalidStaticGet(node, setter);
   }
 
   @override
-  void visitUnresolvedGet(
-      ast.Send node,
-      Element element,
-      _) {
+  void visitUnresolvedGet(ast.Send node, Element element, _) {
     generateStaticUnresolvedGet(node, element);
   }
 
   void handleInvalidStaticInvoke(ast.Send node, Element element) {
-    generateThrowNoSuchMethod(node,
-                              noSuchMethodTargetSymbolString(element),
-                              argumentNodes: node.arguments);
+    generateThrowNoSuchMethod(node, noSuchMethodTargetSymbolString(element),
+        argumentNodes: node.arguments);
   }
 
   @override
-  void visitStaticSetterInvoke(
-      ast.Send node,
-      MethodElement setter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitStaticSetterInvoke(ast.Send node, MethodElement setter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     handleInvalidStaticInvoke(node, setter);
   }
 
   @override
-  void visitTopLevelSetterInvoke(
-      ast.Send node,
-      MethodElement setter,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  void visitTopLevelSetterInvoke(ast.Send node, MethodElement setter,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     handleInvalidStaticInvoke(node, setter);
   }
 
   @override
-  void visitUnresolvedInvoke(
-      ast.Send node,
-      Element element,
-      ast.NodeList arguments,
-      Selector selector,
-      _) {
+  void visitUnresolvedInvoke(ast.Send node, Element element,
+      ast.NodeList arguments, Selector selector, _) {
     if (element is ErroneousElement) {
       // An erroneous element indicates that the function could not be
       // resolved (a warning has been issued).
@@ -5546,70 +5236,43 @@
     return graph.addConstantStringFromName(name, compiler);
   }
 
-  visitClassTypeLiteralGet(
-      ast.Send node,
-      ConstantExpression constant,
-      _) {
+  visitClassTypeLiteralGet(ast.Send node, ConstantExpression constant, _) {
     generateConstantTypeLiteral(node);
   }
 
-  visitClassTypeLiteralInvoke(
-      ast.Send node,
-      ConstantExpression constant,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  visitClassTypeLiteralInvoke(ast.Send node, ConstantExpression constant,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateConstantTypeLiteral(node);
     generateTypeLiteralCall(node);
   }
 
-  visitTypedefTypeLiteralGet(
-      ast.Send node,
-      ConstantExpression constant,
-      _) {
+  visitTypedefTypeLiteralGet(ast.Send node, ConstantExpression constant, _) {
     generateConstantTypeLiteral(node);
   }
 
-  visitTypedefTypeLiteralInvoke(
-      ast.Send node,
-      ConstantExpression constant,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  visitTypedefTypeLiteralInvoke(ast.Send node, ConstantExpression constant,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateConstantTypeLiteral(node);
     generateTypeLiteralCall(node);
   }
 
   visitTypeVariableTypeLiteralGet(
-      ast.Send node,
-      TypeVariableElement element,
-      _) {
+      ast.Send node, TypeVariableElement element, _) {
     generateTypeVariableLiteral(node, element.type);
   }
 
-  visitTypeVariableTypeLiteralInvoke(
-      ast.Send node,
-      TypeVariableElement element,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  visitTypeVariableTypeLiteralInvoke(ast.Send node, TypeVariableElement element,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateTypeVariableLiteral(node, element.type);
     generateTypeLiteralCall(node);
   }
 
-  visitDynamicTypeLiteralGet(
-      ast.Send node,
-      ConstantExpression constant,
-      _) {
+  visitDynamicTypeLiteralGet(ast.Send node, ConstantExpression constant, _) {
     generateConstantTypeLiteral(node);
   }
 
-  visitDynamicTypeLiteralInvoke(
-      ast.Send node,
-      ConstantExpression constant,
-      ast.NodeList arguments,
-      CallStructure callStructure,
-      _) {
+  visitDynamicTypeLiteralInvoke(ast.Send node, ConstantExpression constant,
+      ast.NodeList arguments, CallStructure callStructure, _) {
     generateConstantTypeLiteral(node);
     generateTypeLiteralCall(node);
   }
@@ -5627,18 +5290,14 @@
   }
 
   /// Generate the literal for [typeVariable] in the current context.
-  void generateTypeVariableLiteral(ast.Send node,
-                                   TypeVariableType typeVariable) {
+  void generateTypeVariableLiteral(
+      ast.Send node, TypeVariableType typeVariable) {
     DartType type = localsHandler.substInContext(typeVariable);
     HInstruction value = analyzeTypeArgument(type,
         sourceInformation: sourceInformationBuilder.buildGet(node));
-    pushInvokeStatic(node,
-                     helpers.runtimeTypeToString,
-                     [value],
-                     typeMask: backend.stringType);
-    pushInvokeStatic(node,
-                     helpers.createRuntimeType,
-                     [pop()]);
+    pushInvokeStatic(node, helpers.runtimeTypeToString, [value],
+        typeMask: backend.stringType);
+    pushInvokeStatic(node, helpers.createRuntimeType, [pop()]);
   }
 
   /// Generate a call to a type literal.
@@ -5653,16 +5312,14 @@
   }
 
   /// Generate a '.call' invocation on [target].
-  void generateCallInvoke(ast.Send node,
-                          HInstruction target,
-                          SourceInformation sourceInformation) {
+  void generateCallInvoke(
+      ast.Send node, HInstruction target, SourceInformation sourceInformation) {
     Selector selector = elements.getSelector(node);
     List<HInstruction> inputs = <HInstruction>[target];
     addDynamicSendArgumentsToList(node, inputs);
     push(new HInvokeClosure(
-            new Selector.callClosureFrom(selector),
-            inputs, backend.dynamicType)
-        ..sourceInformation = sourceInformation);
+        new Selector.callClosureFrom(selector), inputs, backend.dynamicType)
+      ..sourceInformation = sourceInformation);
   }
 
   visitGetterSend(ast.Send node) {
@@ -5688,17 +5345,14 @@
   }
 
   void generateAbstractClassInstantiationError(ast.Node node, String message) {
-    generateError(node,
-                  message,
-                  helpers.throwAbstractClassInstantiationError);
+    generateError(node, message, helpers.throwAbstractClassInstantiationError);
   }
 
-  void generateThrowNoSuchMethod(ast.Node diagnosticNode,
-                                 String methodName,
-                                 {Link<ast.Node> argumentNodes,
-                                  List<HInstruction> argumentValues,
-                                  List<String> existingArguments,
-                                  SourceInformation sourceInformation}) {
+  void generateThrowNoSuchMethod(ast.Node diagnosticNode, String methodName,
+      {Link<ast.Node> argumentNodes,
+      List<HInstruction> argumentValues,
+      List<String> existingArguments,
+      SourceInformation sourceInformation}) {
     Element helper = helpers.throwNoSuchMethod;
     ConstantValue receiverConstant =
         constantSystem.createString(new ast.DartString.empty());
@@ -5729,10 +5383,9 @@
     } else {
       existingNamesList = graph.addConstantNull(compiler);
     }
-    pushInvokeStatic(diagnosticNode,
-                     helper,
-                     [receiver, name, arguments, existingNamesList],
-                     sourceInformation: sourceInformation);
+    pushInvokeStatic(
+        diagnosticNode, helper, [receiver, name, arguments, existingNamesList],
+        sourceInformation: sourceInformation);
   }
 
   /**
@@ -5741,17 +5394,14 @@
    * arguments.
    */
   void generateWrongArgumentCountError(ast.Node diagnosticNode,
-                                       FunctionElement function,
-                                       Link<ast.Node> argumentNodes) {
+      FunctionElement function, Link<ast.Node> argumentNodes) {
     List<String> existingArguments = <String>[];
     FunctionSignature signature = function.functionSignature;
     signature.forEachParameter((Element parameter) {
       existingArguments.add(parameter.name);
     });
-    generateThrowNoSuchMethod(diagnosticNode,
-                              function.name,
-                              argumentNodes: argumentNodes,
-                              existingArguments: existingArguments);
+    generateThrowNoSuchMethod(diagnosticNode, function.name,
+        argumentNodes: argumentNodes, existingArguments: existingArguments);
   }
 
   @override
@@ -5772,8 +5422,7 @@
       if (error.messageKind == MessageKind.CANNOT_FIND_CONSTRUCTOR ||
           error.messageKind == MessageKind.CANNOT_FIND_UNNAMED_CONSTRUCTOR) {
         generateThrowNoSuchMethod(
-            node.send,
-            noSuchMethodTargetSymbolString(error, 'constructor'),
+            node.send, noSuchMethodTargetSymbolString(error, 'constructor'),
             argumentNodes: node.send.arguments);
       } else {
         MessageTemplate template = MessageTemplate.TEMPLATES[error.messageKind];
@@ -5807,26 +5456,20 @@
     bulkHandleNew(node);
   }
 
-  void pushInvokeDynamic(ast.Node node,
-                         Selector selector,
-                         TypeMask mask,
-                         List<HInstruction> arguments,
-                         {SourceInformation sourceInformation}) {
-
+  void pushInvokeDynamic(ast.Node node, Selector selector, TypeMask mask,
+      List<HInstruction> arguments,
+      {SourceInformation sourceInformation}) {
     // We prefer to not inline certain operations on indexables,
     // because the constant folder will handle them better and turn
     // them into simpler instructions that allow further
     // optimizations.
     bool isOptimizableOperationOnIndexable(Selector selector, Element element) {
-      bool isLength = selector.isGetter
-          && selector.name == "length";
+      bool isLength = selector.isGetter && selector.name == "length";
       if (isLength || selector.isIndex) {
         return compiler.world.isSubtypeOf(
-            element.enclosingClass.declaration,
-            helpers.jsIndexableClass);
+            element.enclosingClass.declaration, helpers.jsIndexableClass);
       } else if (selector.isIndexSet) {
-        return compiler.world.isSubtypeOf(
-            element.enclosingClass.declaration,
+        return compiler.world.isSubtypeOf(element.enclosingClass.declaration,
             helpers.jsMutableIndexableClass);
       } else {
         return false;
@@ -5870,35 +5513,32 @@
     TypeMask type =
         TypeMaskFactory.inferredTypeForSelector(selector, mask, compiler);
     if (selector.isGetter) {
-      push(
-          new HInvokeDynamicGetter(selector, mask, null, inputs, type)
-              ..sourceInformation = sourceInformation);
+      push(new HInvokeDynamicGetter(selector, mask, null, inputs, type)
+        ..sourceInformation = sourceInformation);
     } else if (selector.isSetter) {
-      push(
-          new HInvokeDynamicSetter(selector, mask, null, inputs, type)
-              ..sourceInformation = sourceInformation);
+      push(new HInvokeDynamicSetter(selector, mask, null, inputs, type)
+        ..sourceInformation = sourceInformation);
     } else {
-      push(
-          new HInvokeDynamicMethod(selector, mask, inputs, type, isIntercepted)
-              ..sourceInformation = sourceInformation);
+      push(new HInvokeDynamicMethod(selector, mask, inputs, type, isIntercepted)
+        ..sourceInformation = sourceInformation);
     }
   }
 
   bool _hasNamedParameters(FunctionElement function) {
     FunctionSignature params = function.functionSignature;
-    return params.optionalParameterCount > 0
-        && params.optionalParametersAreNamed;
+    return params.optionalParameterCount > 0 &&
+        params.optionalParametersAreNamed;
   }
 
   HForeignCode invokeJsInteropFunction(FunctionElement element,
-                                       List<HInstruction> arguments,
-                                       SourceInformation sourceInformation) {
+      List<HInstruction> arguments, SourceInformation sourceInformation) {
     assert(backend.isJsInterop(element));
     nativeEmitter.nativeMethods.add(element);
     String templateString;
 
     if (element.isFactoryConstructor &&
-        backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass)) {
+        backend.jsInteropAnalysis
+            .hasAnonymousAnnotation(element.contextClass)) {
       // Factory constructor that is syntactic sugar for creating a JavaScript
       // object literal.
       ConstructorElement constructor = element;
@@ -5910,7 +5550,7 @@
       params.orderedForEachParameter((ParameterElement parameter) {
         // TODO(jacobr): throw if parameter names do not match names of property
         // names in the class.
-        assert (parameter.isNamed);
+        assert(parameter.isNamed);
         HInstruction argument = arguments[i];
         if (argument != null) {
           filteredArguments.add(argument);
@@ -5919,23 +5559,22 @@
         }
         i++;
       });
-      var codeTemplate = new js.Template(null,
-          js.objectLiteral(parameterNameMap));
+      var codeTemplate =
+          new js.Template(null, js.objectLiteral(parameterNameMap));
 
       var nativeBehavior = new native.NativeBehavior()
         ..codeTemplate = codeTemplate;
-      if (compiler.trustJSInteropTypeAnnotations) {
+      if (compiler.options.trustJSInteropTypeAnnotations) {
         nativeBehavior.typesReturned.add(constructor.enclosingClass.thisType);
       }
       return new HForeignCode(
-          codeTemplate,
-          backend.dynamicType, filteredArguments,
+          codeTemplate, backend.dynamicType, filteredArguments,
           nativeBehavior: nativeBehavior)
         ..sourceInformation = sourceInformation;
     }
-    var target = new HForeignCode(js.js.parseForeignJS(
-            "${backend.namer.fixedBackendPath(element)}."
-            "${backend.getFixedBackendName(element)}"),
+    var target = new HForeignCode(
+        js.js.parseForeignJS("${backend.namer.fixedBackendPath(element)}."
+            "${backend.nativeData.getFixedBackendName(element)}"),
         backend.dynamicType,
         <HInstruction>[]);
     add(target);
@@ -5949,13 +5588,14 @@
     var nativeBehavior = new native.NativeBehavior()
       ..sideEffects.setAllSideEffects();
 
-    DartType type = element.isConstructor ?
-        element.enclosingClass.thisType : element.type.returnType;
+    DartType type = element.isConstructor
+        ? element.enclosingClass.thisType
+        : element.type.returnType;
     // Native behavior effects here are similar to native/behavior.dart.
     // The return type is dynamic if we don't trust js-interop type
     // declarations.
-    nativeBehavior.typesReturned.add(
-        compiler.trustJSInteropTypeAnnotations ? type : const DynamicType());
+    nativeBehavior.typesReturned.add(compiler
+        .options.trustJSInteropTypeAnnotations ? type : const DynamicType());
 
     // The allocation effects include the declared type if it is native (which
     // includes js interop types).
@@ -5965,10 +5605,11 @@
 
     // It also includes any other JS interop type if we don't trust the
     // annotation or if is declared too broad.
-    if (!compiler.trustJSInteropTypeAnnotations || type.isObject ||
+    if (!compiler.options.trustJSInteropTypeAnnotations ||
+        type.isObject ||
         type.isDynamic) {
-      nativeBehavior.typesInstantiated.add(
-          backend.helpers.jsJavaScriptObjectClass.thisType);
+      nativeBehavior.typesInstantiated
+          .add(backend.helpers.jsJavaScriptObjectClass.thisType);
     }
 
     String code;
@@ -5983,22 +5624,18 @@
     js.Template codeTemplate = js.js.parseForeignJS(code);
     nativeBehavior.codeTemplate = codeTemplate;
 
-    return new HForeignCode(
-        codeTemplate,
-        backend.dynamicType, inputs,
-        nativeBehavior: nativeBehavior)
-      ..sourceInformation = sourceInformation;
+    return new HForeignCode(codeTemplate, backend.dynamicType, inputs,
+        nativeBehavior: nativeBehavior)..sourceInformation = sourceInformation;
   }
 
-  void pushInvokeStatic(ast.Node location,
-                        Element element,
-                        List<HInstruction> arguments,
-                        {TypeMask typeMask,
-                         InterfaceType instanceType,
-                         SourceInformation sourceInformation}) {
+  void pushInvokeStatic(
+      ast.Node location, Element element, List<HInstruction> arguments,
+      {TypeMask typeMask,
+      InterfaceType instanceType,
+      SourceInformation sourceInformation}) {
     // TODO(johnniwinther): Use [sourceInformation] instead of [location].
     if (tryInlineMethod(element, null, null, arguments, location,
-                        instanceType: instanceType)) {
+        instanceType: instanceType)) {
       return;
     }
 
@@ -6010,17 +5647,16 @@
     // TODO(5346): Try to avoid the need for calling [declaration] before
     var instruction;
     if (backend.isJsInterop(element)) {
-      instruction = invokeJsInteropFunction(element, arguments,
-          sourceInformation);
+      instruction =
+          invokeJsInteropFunction(element, arguments, sourceInformation);
     } else {
       // creating an [HInvokeStatic].
-      instruction = new HInvokeStatic(
-          element.declaration, arguments, typeMask,
+      instruction = new HInvokeStatic(element.declaration, arguments, typeMask,
           targetCanThrow: targetCanThrow)
         ..sourceInformation = sourceInformation;
       if (!currentInlinedInstantiations.isEmpty) {
-        instruction.instantiatedTypes = new List<DartType>.from(
-            currentInlinedInstantiations);
+        instruction.instantiatedTypes =
+            new List<DartType>.from(currentInlinedInstantiations);
       }
       instruction.sideEffects = compiler.world.getSideEffectsOfElement(element);
     }
@@ -6031,10 +5667,9 @@
     }
   }
 
-  HInstruction buildInvokeSuper(Selector selector,
-                                Element element,
-                                List<HInstruction> arguments,
-                                [SourceInformation sourceInformation]) {
+  HInstruction buildInvokeSuper(
+      Selector selector, Element element, List<HInstruction> arguments,
+      [SourceInformation sourceInformation]) {
     HInstruction receiver = localsHandler.readThis();
     // TODO(5346): Try to avoid the need for calling [declaration] before
     // creating an [HStatic].
@@ -6053,22 +5688,16 @@
     } else {
       type = TypeMaskFactory.inferredReturnTypeForElement(element, compiler);
     }
-    HInstruction instruction = new HInvokeSuper(
-        element,
-        currentNonClosureClass,
-        selector,
-        inputs,
-        type,
-        sourceInformation,
+    HInstruction instruction = new HInvokeSuper(element, currentNonClosureClass,
+        selector, inputs, type, sourceInformation,
         isSetter: selector.isSetter || selector.isIndexSet);
     instruction.sideEffects =
         compiler.world.getSideEffectsOfSelector(selector, null);
     return instruction;
   }
 
-  void handleComplexOperatorSend(ast.SendSet node,
-                                 HInstruction receiver,
-                                 Link<ast.Node> arguments) {
+  void handleComplexOperatorSend(
+      ast.SendSet node, HInstruction receiver, Link<ast.Node> arguments) {
     HInstruction rhs;
     if (node.isPrefix || node.isPostfix) {
       rhs = graph.addConstantInt(1, compiler);
@@ -6084,7 +5713,7 @@
         elements.getOperatorTypeMaskInComplexSendSet(node),
         node,
         sourceInformation:
-          sourceInformationBuilder.buildGeneric(node.assignmentOperator));
+            sourceInformationBuilder.buildGeneric(node.assignmentOperator));
   }
 
   void handleSuperSendSet(ast.SendSet node) {
@@ -6092,10 +5721,9 @@
     List<HInstruction> setterInputs = <HInstruction>[];
     void generateSuperSendSet() {
       Selector setterSelector = elements.getSelector(node);
-      if (Elements.isUnresolved(element)
-          || !setterSelector.applies(element, compiler.world)) {
-        generateSuperNoSuchMethodSend(
-            node, setterSelector, setterInputs);
+      if (Elements.isUnresolved(element) ||
+          !setterSelector.applies(element, compiler.world)) {
+        generateSuperNoSuchMethodSend(node, setterSelector, setterInputs);
         pop();
       } else {
         add(buildInvokeSuper(setterSelector, element, setterInputs));
@@ -6124,25 +5752,21 @@
       Selector getterSelector =
           elements.getGetterSelectorInComplexSendSet(node);
       if (Elements.isUnresolved(getter)) {
-        generateSuperNoSuchMethodSend(
-            node,
-            getterSelector,
-            getterInputs);
+        generateSuperNoSuchMethodSend(node, getterSelector, getterInputs);
         getterInstruction = pop();
       } else {
-        getterInstruction = buildInvokeSuper(
-            getterSelector, getter, getterInputs);
+        getterInstruction =
+            buildInvokeSuper(getterSelector, getter, getterInputs);
         add(getterInstruction);
       }
 
       if (node.isIfNullAssignment) {
         SsaBranchBuilder brancher = new SsaBranchBuilder(this, node);
-        brancher.handleIfNull(() => stack.add(getterInstruction),
-            () {
-              addDynamicSendArgumentsToList(node, setterInputs);
-              generateSuperSendSet();
-              stack.add(setterInputs.last);
-            });
+        brancher.handleIfNull(() => stack.add(getterInstruction), () {
+          addDynamicSendArgumentsToList(node, setterInputs);
+          generateSuperSendSet();
+          stack.add(setterInputs.last);
+        });
       } else {
         handleComplexOperatorSend(node, getterInstruction, arguments);
         setterInputs.add(pop());
@@ -6166,66 +5790,43 @@
 
   @override
   void visitFinalSuperFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitSuperFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitSuperGetterSet(
-      ast.SendSet node,
-      FunctionElement getter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FunctionElement getter, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperIndexSet(
-      ast.SendSet node,
-      FunctionElement function,
-      ast.Node index,
-      ast.Node rhs,
-      _) {
+  void visitSuperIndexSet(ast.SendSet node, FunctionElement function,
+      ast.Node index, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitSuperMethodSet(
-      ast.Send node,
-      MethodElement method,
-      ast.Node rhs,
-      _) {
+      ast.Send node, MethodElement method, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitSuperSetterSet(
-      ast.SendSet node,
-      FunctionElement setter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FunctionElement setter, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitUnresolvedSuperIndexSet(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      ast.Node rhs,
-      _) {
+      ast.Send node, Element element, ast.Node index, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
@@ -6252,24 +5853,14 @@
   }
 
   @override
-  void visitUnresolvedSuperGetterIndexPrefix(
-      ast.Send node,
-      Element element,
-      MethodElement setter,
-      ast.Node index,
-      IncDecOperator operator,
-      _) {
+  void visitUnresolvedSuperGetterIndexPrefix(ast.Send node, Element element,
+      MethodElement setter, ast.Node index, IncDecOperator operator, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitUnresolvedSuperGetterIndexPostfix(
-      ast.Send node,
-      Element element,
-      MethodElement setter,
-      ast.Node index,
-      IncDecOperator operator,
-      _) {
+  void visitUnresolvedSuperGetterIndexPostfix(ast.Send node, Element element,
+      MethodElement setter, ast.Node index, IncDecOperator operator, _) {
     handleSuperSendSet(node);
   }
 
@@ -6296,22 +5887,14 @@
   }
 
   @override
-  void visitUnresolvedSuperIndexPrefix(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      IncDecOperator operator,
-      _) {
+  void visitUnresolvedSuperIndexPrefix(ast.Send node, Element element,
+      ast.Node index, IncDecOperator operator, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitUnresolvedSuperIndexPostfix(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      IncDecOperator operator,
-      _) {
+  void visitUnresolvedSuperIndexPostfix(ast.Send node, Element element,
+      ast.Node index, IncDecOperator operator, _) {
     handleSuperSendSet(node);
   }
 
@@ -6352,209 +5935,124 @@
   }
 
   @override
-  void visitUnresolvedSuperCompoundIndexSet(
-      ast.Send node,
-      Element element,
-      ast.Node index,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitUnresolvedSuperCompoundIndexSet(ast.Send node, Element element,
+      ast.Node index, AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperFieldCompound(
-      ast.Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitSuperFieldCompound(ast.Send node, FieldElement field,
+      AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitFinalSuperFieldCompound(
-      ast.Send node,
-      FieldElement field,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitFinalSuperFieldCompound(ast.Send node, FieldElement field,
+      AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitFinalSuperFieldPrefix(
-      ast.Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      _) {
+      ast.Send node, FieldElement field, IncDecOperator operator, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitUnresolvedSuperPrefix(
-      ast.Send node,
-      Element element,
-      IncDecOperator operator,
-      _) {
+      ast.Send node, Element element, IncDecOperator operator, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitUnresolvedSuperPostfix(
-      ast.Send node,
-      Element element,
-      IncDecOperator operator,
-      _) {
+      ast.Send node, Element element, IncDecOperator operator, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitUnresolvedSuperCompound(
-      ast.Send node,
-      Element element,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitUnresolvedSuperCompound(ast.Send node, Element element,
+      AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitFinalSuperFieldPostfix(
-      ast.Send node,
-      FieldElement field,
-      IncDecOperator operator,
-      _) {
+      ast.Send node, FieldElement field, IncDecOperator operator, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperFieldFieldCompound(
-      ast.Send node,
-      FieldElement readField,
-      FieldElement writtenField,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitSuperFieldFieldCompound(ast.Send node, FieldElement readField,
+      FieldElement writtenField, AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperGetterSetterCompound(
-      ast.Send node,
-      FunctionElement getter,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitSuperGetterSetterCompound(ast.Send node, FunctionElement getter,
+      FunctionElement setter, AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperMethodSetterCompound(
-      ast.Send node,
-      FunctionElement method,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitSuperMethodSetterCompound(ast.Send node, FunctionElement method,
+      FunctionElement setter, AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperMethodCompound(
-      ast.Send node,
-      FunctionElement method,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitSuperMethodCompound(ast.Send node, FunctionElement method,
+      AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitUnresolvedSuperGetterCompound(
-      ast.Send node,
-      Element element,
-      MethodElement setter,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitUnresolvedSuperGetterCompound(ast.Send node, Element element,
+      MethodElement setter, AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitUnresolvedSuperSetterCompound(
-      ast.Send node,
-      MethodElement getter,
-      Element element,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitUnresolvedSuperSetterCompound(ast.Send node, MethodElement getter,
+      Element element, AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperFieldSetterCompound(
-      ast.Send node,
-      FieldElement field,
-      FunctionElement setter,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitSuperFieldSetterCompound(ast.Send node, FieldElement field,
+      FunctionElement setter, AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
-  void visitSuperGetterFieldCompound(
-      ast.Send node,
-      FunctionElement getter,
-      FieldElement field,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitSuperGetterFieldCompound(ast.Send node, FunctionElement getter,
+      FieldElement field, AssignmentOperator operator, ast.Node rhs, _) {
     handleSuperSendSet(node);
   }
 
   @override
   void visitIndexSet(
-      ast.SendSet node,
-      ast.Node receiver,
-      ast.Node index,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ast.Node receiver, ast.Node index, ast.Node rhs, _) {
     generateDynamicSend(node);
   }
 
   @override
-  void visitCompoundIndexSet(
-      ast.SendSet node,
-      ast.Node receiver,
-      ast.Node index,
-      AssignmentOperator operator,
-      ast.Node rhs,
-      _) {
+  void visitCompoundIndexSet(ast.SendSet node, ast.Node receiver,
+      ast.Node index, AssignmentOperator operator, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     handleIndexSendSet(node);
   }
 
   @override
-  void visitIndexPrefix(
-      ast.Send node,
-      ast.Node receiver,
-      ast.Node index,
-      IncDecOperator operator,
-      _) {
+  void visitIndexPrefix(ast.Send node, ast.Node receiver, ast.Node index,
+      IncDecOperator operator, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     handleIndexSendSet(node);
   }
 
   @override
-  void visitIndexPostfix(
-      ast.Send node,
-      ast.Node receiver,
-      ast.Node index,
-      IncDecOperator operator,
-      _) {
+  void visitIndexPostfix(ast.Send node, ast.Node receiver, ast.Node index,
+      IncDecOperator operator, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     handleIndexSendSet(node);
   }
@@ -6574,11 +6072,8 @@
         index = pop();
       }
 
-      pushInvokeDynamic(
-          node,
-          elements.getGetterSelectorInComplexSendSet(node),
-          elements.getGetterTypeMaskInComplexSendSet(node),
-          [receiver, index]);
+      pushInvokeDynamic(node, elements.getGetterSelectorInComplexSendSet(node),
+          elements.getGetterTypeMaskInComplexSendSet(node), [receiver, index]);
       HInstruction getterInstruction = pop();
       if (node.isIfNullAssignment) {
         // Compile x[i] ??= e as:
@@ -6587,26 +6082,19 @@
         //      t1 = x[i] = e;
         //   result = t1
         SsaBranchBuilder brancher = new SsaBranchBuilder(this, node);
-        brancher.handleIfNull(() => stack.add(getterInstruction),
-            () {
-              visit(arguments.head);
-              HInstruction value = pop();
-              pushInvokeDynamic(
-                  node,
-                  elements.getSelector(node),
-                  elements.getTypeMask(node),
-                  [receiver, index, value]);
-              pop();
-              stack.add(value);
-            });
+        brancher.handleIfNull(() => stack.add(getterInstruction), () {
+          visit(arguments.head);
+          HInstruction value = pop();
+          pushInvokeDynamic(node, elements.getSelector(node),
+              elements.getTypeMask(node), [receiver, index, value]);
+          pop();
+          stack.add(value);
+        });
       } else {
         handleComplexOperatorSend(node, getterInstruction, arguments);
         HInstruction value = pop();
-        pushInvokeDynamic(
-            node,
-            elements.getSelector(node),
-            elements.getTypeMask(node),
-            [receiver, index, value]);
+        pushInvokeDynamic(node, elements.getSelector(node),
+            elements.getTypeMask(node), [receiver, index, value]);
         pop();
         if (node.isPostfix) {
           stack.add(getterInstruction);
@@ -6618,37 +6106,21 @@
   }
 
   @override
-  void visitThisPropertySet(
-      ast.SendSet node,
-      Name name,
-      ast.Node rhs,
-      _) {
+  void visitThisPropertySet(ast.SendSet node, Name name, ast.Node rhs, _) {
     generateInstanceSetterWithCompiledReceiver(
-        node,
-        localsHandler.readThis(),
-        visitAndPop(rhs));
+        node, localsHandler.readThis(), visitAndPop(rhs));
   }
 
   @override
   void visitDynamicPropertySet(
-      ast.SendSet node,
-      ast.Node receiver,
-      Name name,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ast.Node receiver, Name name, ast.Node rhs, _) {
     generateInstanceSetterWithCompiledReceiver(
-        node,
-        generateInstanceSendReceiver(node),
-        visitAndPop(rhs));
+        node, generateInstanceSendReceiver(node), visitAndPop(rhs));
   }
 
   @override
   void visitIfNotNullDynamicPropertySet(
-      ast.SendSet node,
-      ast.Node receiver,
-      Name name,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ast.Node receiver, Name name, ast.Node rhs, _) {
     // compile e?.x = e2 to:
     //
     // t1 = e
@@ -6666,205 +6138,142 @@
         () => stack.add(receiverInstruction),
         () {
           generateInstanceSetterWithCompiledReceiver(
-              node,
-              receiverInstruction,
-              visitAndPop(rhs));
+              node, receiverInstruction, visitAndPop(rhs));
         });
   }
 
   @override
   void visitParameterSet(
-      ast.SendSet node,
-      ParameterElement parameter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ParameterElement parameter, ast.Node rhs, _) {
     generateNonInstanceSetter(node, parameter, visitAndPop(rhs));
   }
 
   @override
   void visitFinalParameterSet(
-      ast.SendSet node,
-      ParameterElement parameter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, ParameterElement parameter, ast.Node rhs, _) {
     generateNoSuchSetter(node, parameter, visitAndPop(rhs));
   }
 
   @override
   void visitLocalVariableSet(
-      ast.SendSet node,
-      LocalVariableElement variable,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, LocalVariableElement variable, ast.Node rhs, _) {
     generateNonInstanceSetter(node, variable, visitAndPop(rhs));
   }
 
   @override
   void visitFinalLocalVariableSet(
-      ast.SendSet node,
-      LocalVariableElement variable,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, LocalVariableElement variable, ast.Node rhs, _) {
     generateNoSuchSetter(node, variable, visitAndPop(rhs));
   }
 
   @override
   void visitLocalFunctionSet(
-      ast.SendSet node,
-      LocalFunctionElement function,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, LocalFunctionElement function, ast.Node rhs, _) {
     generateNoSuchSetter(node, function, visitAndPop(rhs));
   }
 
   @override
   void visitTopLevelFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNonInstanceSetter(node, field, visitAndPop(rhs));
   }
 
   @override
   void visitFinalTopLevelFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNoSuchSetter(node, field, visitAndPop(rhs));
   }
 
   @override
   void visitTopLevelGetterSet(
-      ast.SendSet node,
-      GetterElement getter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, GetterElement getter, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNoSuchSetter(node, getter, visitAndPop(rhs));
   }
 
   @override
   void visitTopLevelSetterSet(
-      ast.SendSet node,
-      SetterElement setter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, SetterElement setter, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNonInstanceSetter(node, setter, visitAndPop(rhs));
   }
 
   @override
   void visitTopLevelFunctionSet(
-      ast.SendSet node,
-      MethodElement function,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, MethodElement function, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNoSuchSetter(node, function, visitAndPop(rhs));
   }
 
   @override
   void visitStaticFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNonInstanceSetter(node, field, visitAndPop(rhs));
   }
 
   @override
   void visitFinalStaticFieldSet(
-      ast.SendSet node,
-      FieldElement field,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, FieldElement field, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNoSuchSetter(node, field, visitAndPop(rhs));
   }
 
   @override
   void visitStaticGetterSet(
-      ast.SendSet node,
-      GetterElement getter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, GetterElement getter, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNoSuchSetter(node, getter, visitAndPop(rhs));
   }
 
   @override
   void visitStaticSetterSet(
-      ast.SendSet node,
-      SetterElement setter,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, SetterElement setter, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNonInstanceSetter(node, setter, visitAndPop(rhs));
   }
 
   @override
   void visitStaticFunctionSet(
-      ast.SendSet node,
-      MethodElement function,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, MethodElement function, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNoSuchSetter(node, function, visitAndPop(rhs));
   }
 
   @override
-  void visitUnresolvedSet(
-      ast.SendSet node,
-      Element element,
-      ast.Node rhs,
-      _) {
+  void visitUnresolvedSet(ast.SendSet node, Element element, ast.Node rhs, _) {
     generateIsDeferredLoadedCheckOfSend(node);
     generateNonInstanceSetter(node, element, visitAndPop(rhs));
   }
 
   @override
   void visitClassTypeLiteralSet(
-      ast.SendSet node,
-      TypeConstantExpression constant,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, TypeConstantExpression constant, ast.Node rhs, _) {
     generateThrowNoSuchMethod(node, constant.type.name,
-                              argumentNodes: node.arguments);
+        argumentNodes: node.arguments);
   }
 
   @override
   void visitTypedefTypeLiteralSet(
-      ast.SendSet node,
-      TypeConstantExpression constant,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, TypeConstantExpression constant, ast.Node rhs, _) {
     generateThrowNoSuchMethod(node, constant.type.name,
-                              argumentNodes: node.arguments);
+        argumentNodes: node.arguments);
   }
 
   @override
   void visitDynamicTypeLiteralSet(
-      ast.SendSet node,
-      TypeConstantExpression constant,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, TypeConstantExpression constant, ast.Node rhs, _) {
     generateThrowNoSuchMethod(node, constant.type.name,
-                              argumentNodes: node.arguments);
+        argumentNodes: node.arguments);
   }
 
   @override
   void visitTypeVariableTypeLiteralSet(
-      ast.SendSet node,
-      TypeVariableElement element,
-      ast.Node rhs,
-      _) {
+      ast.SendSet node, TypeVariableElement element, ast.Node rhs, _) {
     generateThrowNoSuchMethod(node, element.name,
-                              argumentNodes: node.arguments);
+        argumentNodes: node.arguments);
   }
 
   void handleCompoundSendSet(ast.SendSet node) {
@@ -6878,7 +6287,7 @@
       } else {
         ast.Identifier selector = node.selector;
         generateThrowNoSuchMethod(node, selector.source,
-                                  argumentNodes: node.arguments);
+            argumentNodes: node.arguments);
       }
       return;
     }
@@ -6894,12 +6303,10 @@
         HInstruction getterInstruction = pop();
         if (node.isIfNullAssignment) {
           SsaBranchBuilder brancher = new SsaBranchBuilder(this, node);
-          brancher.handleIfNull(() => stack.add(getterInstruction),
-              () {
-                visit(node.arguments.head);
-                generateInstanceSetterWithCompiledReceiver(
-                    node, receiver, pop());
-              });
+          brancher.handleIfNull(() => stack.add(getterInstruction), () {
+            visit(node.arguments.head);
+            generateInstanceSetterWithCompiledReceiver(node, receiver, pop());
+          });
         } else {
           handleComplexOperatorSend(node, getterInstruction, node.arguments);
           HInstruction value = pop();
@@ -6916,13 +6323,10 @@
         //   t1 == null ? t1 : (t1.x = t1.x op e2);
         HInstruction receiver;
         SsaBranchBuilder brancher = new SsaBranchBuilder(this, node);
-        brancher.handleConditional(
-            () {
-              receiver = generateInstanceSendReceiver(node);
-              pushCheckNull(receiver);
-            },
-            () => stack.add(receiver),
-            () => generateAssignment(receiver));
+        brancher.handleConditional(() {
+          receiver = generateInstanceSendReceiver(node);
+          pushCheckNull(receiver);
+        }, () => stack.add(receiver), () => generateAssignment(receiver));
       } else {
         generateAssignment(generateInstanceSendReceiver(node));
       }
@@ -6945,11 +6349,10 @@
     HInstruction getterInstruction = pop();
     if (node.isIfNullAssignment) {
       SsaBranchBuilder brancher = new SsaBranchBuilder(this, node);
-      brancher.handleIfNull(() => stack.add(getterInstruction),
-          () {
-            visit(node.arguments.head);
-            generateNonInstanceSetter(node, element, pop());
-          });
+      brancher.handleIfNull(() => stack.add(getterInstruction), () {
+        visit(node.arguments.head);
+        generateNonInstanceSetter(node, element, pop());
+      });
     } else {
       handleComplexOperatorSend(node, getterInstruction, node.arguments);
       HInstruction value = pop();
@@ -6963,20 +6366,13 @@
 
   @override
   void handleDynamicCompounds(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      CompoundRhs rhs,
-      _) {
+      ast.Send node, ast.Node receiver, Name name, CompoundRhs rhs, _) {
     handleCompoundSendSet(node);
   }
 
   @override
   void handleLocalCompounds(
-      ast.SendSet node,
-      LocalElement local,
-      CompoundRhs rhs,
-      _,
+      ast.SendSet node, LocalElement local, CompoundRhs rhs, _,
       {bool isSetterValid}) {
     handleCompoundSendSet(node);
   }
@@ -6995,20 +6391,12 @@
 
   @override
   handleDynamicSetIfNulls(
-      ast.Send node,
-      ast.Node receiver,
-      Name name,
-      ast.Node rhs,
-      arg) {
+      ast.Send node, ast.Node receiver, Name name, ast.Node rhs, arg) {
     handleCompoundSendSet(node);
   }
 
   @override
-  handleLocalSetIfNulls(
-      ast.SendSet node,
-      LocalElement local,
-      ast.Node rhs,
-      arg,
+  handleLocalSetIfNulls(ast.SendSet node, LocalElement local, ast.Node rhs, arg,
       {bool isSetterValid}) {
     handleCompoundSendSet(node);
   }
@@ -7038,21 +6426,30 @@
   }
 
   @override
+  handleSuperIndexSetIfNull(ast.SendSet node, Element indexFunction,
+      Element indexSetFunction, ast.Node index, ast.Node rhs, arg,
+      {bool isGetterValid, bool isSetterValid}) {
+    handleCompoundSendSet(node);
+  }
+
+  @override
+  visitIndexSetIfNull(
+      ast.SendSet node, ast.Node receiver, ast.Node index, ast.Node rhs, arg,
+      {bool isGetterValid, bool isSetterValid}) {
+    generateIsDeferredLoadedCheckOfSend(node);
+    handleIndexSendSet(node);
+  }
+
+  @override
   handleTypeLiteralConstantSetIfNulls(
-      ast.SendSet node,
-      ConstantExpression constant,
-      ast.Node rhs,
-      arg) {
+      ast.SendSet node, ConstantExpression constant, ast.Node rhs, arg) {
     // The type variable is never `null`.
     generateConstantTypeLiteral(node);
   }
 
   @override
   visitTypeVariableTypeLiteralSetIfNull(
-      ast.Send node,
-      TypeVariableElement element,
-      ast.Node rhs,
-      arg) {
+      ast.Send node, TypeVariableElement element, ast.Node rhs, arg) {
     // The type variable is never `null`.
     generateTypeVariableLiteral(node, element.type);
   }
@@ -7097,9 +6494,7 @@
     for (Link<ast.Node> link = node.nodes; !link.isEmpty; link = link.tail) {
       if (isAborted()) {
         reporter.reportHintMessage(
-            link.head,
-            MessageKind.GENERIC,
-            {'text': 'dead code'});
+            link.head, MessageKind.GENERIC, {'text': 'dead code'});
       } else {
         visit(link.head);
       }
@@ -7112,8 +6507,8 @@
 
   visitOperator(ast.Operator node) {
     // Operators are intercepted in their surrounding Send nodes.
-    reporter.internalError(node,
-        'SsaBuilder.visitOperator should not be called.');
+    reporter.internalError(
+        node, 'SsaBuilder.visitOperator should not be called.');
   }
 
   visitCascade(ast.Cascade node) {
@@ -7139,14 +6534,12 @@
     HInstruction exception = rethrowableException;
     if (exception == null) {
       exception = graph.addConstantNull(compiler);
-      reporter.internalError(node,
-          'rethrowableException should not be null.');
+      reporter.internalError(node, 'rethrowableException should not be null.');
     }
     handleInTryStatement();
-    closeAndGotoExit(
-        new HThrow(exception,
-                   sourceInformationBuilder.buildThrow(node),
-                   isRethrow: true));
+    closeAndGotoExit(new HThrow(
+        exception, sourceInformationBuilder.buildThrow(node),
+        isRethrow: true));
   }
 
   visitRedirectingFactoryBody(ast.RedirectingFactoryBody node) {
@@ -7159,11 +6552,10 @@
         redirectingConstructor.functionSignature;
 
     List<Element> targetRequireds = targetSignature.requiredParameters;
-    List<Element> redirectingRequireds
-        = redirectingSignature.requiredParameters;
+    List<Element> redirectingRequireds =
+        redirectingSignature.requiredParameters;
 
-    List<Element> targetOptionals =
-        targetSignature.orderedOptionalParameters;
+    List<Element> targetOptionals = targetSignature.orderedOptionalParameters;
     List<Element> redirectingOptionals =
         redirectingSignature.orderedOptionalParameters;
 
@@ -7179,7 +6571,7 @@
       if (position < redirectingRequireds.length) {
         loadLocal(redirectingRequireds[position]);
       } else if (position < redirectingSignature.parameterCount &&
-                 !redirectingSignature.optionalParametersAreNamed) {
+          !redirectingSignature.optionalParametersAreNamed) {
         loadLocal(redirectingOptionals[position - redirectingRequireds.length]);
       } else if (optionalParameter != null) {
         inputs.add(handleConstantForOptionalParameter(optionalParameter));
@@ -7198,10 +6590,8 @@
     if (targetOptionals.isNotEmpty) {
       if (targetSignature.optionalParametersAreNamed) {
         for (ParameterElement parameter in targetOptionals) {
-          ParameterElement redirectingParameter =
-              redirectingOptionals.firstWhere(
-                  (p) => p.name == parameter.name,
-                  orElse: () => null);
+          ParameterElement redirectingParameter = redirectingOptionals
+              .firstWhere((p) => p.name == parameter.name, orElse: () => null);
           if (redirectingParameter == null) {
             inputs.add(handleConstantForOptionalParameter(parameter));
           } else {
@@ -7238,7 +6628,7 @@
   ///
   /// We do not accept the internal Future implementation class.
   bool isValidAsyncReturnType(DartType type) {
-    assert (isBuildingAsyncFunction);
+    assert(isBuildingAsyncFunction);
     // TODO(sigurdm): In an internal library a function could be declared:
     //
     // _FutureImpl foo async => 1;
@@ -7247,9 +6637,8 @@
     // function is a `_FutureImpl`), but currently false is returned in this
     // case.
     return type.isDynamic ||
-           type.isObject ||
-           (type is InterfaceType &&
-               type.element == coreClasses.futureClass);
+        type.isObject ||
+        (type is InterfaceType && type.element == coreClasses.futureClass);
   }
 
   visitReturn(ast.Return node) {
@@ -7264,11 +6653,10 @@
       visit(node.expression);
       value = pop();
       if (isBuildingAsyncFunction) {
-        if (compiler.enableTypeAssertions &&
+        if (compiler.options.enableTypeAssertions &&
             !isValidAsyncReturnType(returnType)) {
-          String message =
-                "Async function returned a Future, "
-                "was declared to return a $returnType.";
+          String message = "Async function returned a Future, "
+              "was declared to return a $returnType.";
           generateTypeError(node, message);
           pop();
           return;
@@ -7302,20 +6690,19 @@
     visit(node.expression);
     HInstruction awaited = pop();
     // TODO(herhut): Improve this type.
-    push(new HAwait(awaited, new TypeMask.subclass(
-        coreClasses.objectClass, compiler.world)));
+    push(new HAwait(awaited,
+        new TypeMask.subclass(coreClasses.objectClass, compiler.world)));
   }
 
   visitTypeAnnotation(ast.TypeAnnotation node) {
-    reporter.internalError(node,
-        'Visiting type annotation in SSA builder.');
+    reporter.internalError(node, 'Visiting type annotation in SSA builder.');
   }
 
   visitVariableDefinitions(ast.VariableDefinitions node) {
     assert(isReachable);
     for (Link<ast.Node> link = node.definitions.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       ast.Node definition = link.head;
       LocalElement local = elements[definition];
       if (definition is ast.Identifier) {
@@ -7325,7 +6712,7 @@
         ast.SendSet node = definition;
         generateNonInstanceSetter(
             node, local, visitAndPop(node.arguments.first));
-        pop();  // Discard value.
+        pop(); // Discard value.
       }
     }
   }
@@ -7352,8 +6739,8 @@
     } else {
       List<HInstruction> inputs = <HInstruction>[];
       for (Link<ast.Node> link = node.elements.nodes;
-           !link.isEmpty;
-           link = link.tail) {
+          !link.isEmpty;
+          link = link.tail) {
         visit(link.head);
         inputs.add(pop());
       }
@@ -7371,8 +6758,7 @@
   visitConditional(ast.Conditional node) {
     SsaBranchBuilder brancher = new SsaBranchBuilder(this, node);
     brancher.handleConditional(() => visit(node.condition),
-                               () => visit(node.thenExpression),
-                               () => visit(node.elseExpression));
+        () => visit(node.thenExpression), () => visit(node.elseExpression));
   }
 
   visitStringInterpolation(ast.StringInterpolation node) {
@@ -7383,8 +6769,8 @@
 
   visitStringInterpolationPart(ast.StringInterpolationPart node) {
     // The parts are iterated in visitStringInterpolation.
-    reporter.internalError(node,
-      'SsaBuilder.visitStringInterpolation should not be called.');
+    reporter.internalError(
+        node, 'SsaBuilder.visitStringInterpolation should not be called.');
   }
 
   visitEmptyStatement(ast.EmptyStatement node) {
@@ -7454,9 +6840,8 @@
 
     visit(node.expression);
     HInstruction expression = pop();
-    pushInvokeStatic(node,
-                     helpers.streamIteratorConstructor,
-                     [expression, graph.addConstantNull(compiler)]);
+    pushInvokeStatic(node, helpers.streamIteratorConstructor,
+        [expression, graph.addConstantNull(compiler)]);
     streamIterator = pop();
 
     void buildInitializer() {}
@@ -7481,41 +6866,30 @@
       TypeMask mask = elements.getTypeMask(identifier);
 
       HInstruction value = pop();
-      if (identifier.asSend() != null
-          && Elements.isInstanceSend(identifier, elements)) {
+      if (identifier.asSend() != null &&
+          Elements.isInstanceSend(identifier, elements)) {
         HInstruction receiver = generateInstanceSendReceiver(identifier);
         assert(receiver != null);
-        generateInstanceSetterWithCompiledReceiver(
-            null,
-            receiver,
-            value,
-            selector: selector,
-            mask: mask,
-            location: identifier);
+        generateInstanceSetterWithCompiledReceiver(null, receiver, value,
+            selector: selector, mask: mask, location: identifier);
       } else {
-        generateNonInstanceSetter(
-            null, variable, value, location: identifier);
+        generateNonInstanceSetter(null, variable, value, location: identifier);
       }
       pop(); // Pop the value pushed by the setter call.
 
       visit(node.body);
     }
 
-    void buildUpdate() {};
+    void buildUpdate() {}
+    ;
 
     buildProtectedByFinally(() {
-      handleLoop(node,
-                 buildInitializer,
-                 buildCondition,
-                 buildUpdate,
-                 buildBody);
+      handleLoop(
+          node, buildInitializer, buildCondition, buildUpdate, buildBody);
     }, () {
-      pushInvokeDynamic(node,
-          Selectors.cancel,
-          null,
-          [streamIterator]);
-      push(new HAwait(pop(), new TypeMask.subclass(
-          coreClasses.objectClass, compiler.world)));
+      pushInvokeDynamic(node, Selectors.cancel, null, [streamIterator]);
+      push(new HAwait(pop(),
+          new TypeMask.subclass(coreClasses.objectClass, compiler.world)));
       pop();
     });
   }
@@ -7592,17 +6966,12 @@
         Elements.isInstanceSend(identifier, elements)) {
       HInstruction receiver = generateInstanceSendReceiver(identifier);
       assert(receiver != null);
-      generateInstanceSetterWithCompiledReceiver(
-          null,
-          receiver,
-          value,
-          selector: selector,
-          mask: mask,
-          location: identifier);
+      generateInstanceSetterWithCompiledReceiver(null, receiver, value,
+          selector: selector, mask: mask, location: identifier);
     } else {
       generateNonInstanceSetter(null, variable, value, location: identifier);
     }
-    pop();  // Discard the value pushed by the setter call.
+    pop(); // Discard the value pushed by the setter call.
   }
 
   buildSyncForInIndexable(ast.ForIn node, TypeMask arrayType) {
@@ -7620,9 +6989,9 @@
     TypeMask boolType = backend.boolType;
 
     // These variables are shared by initializer, condition, body and update.
-    HInstruction array;  // Set in buildInitializer.
-    bool isFixed;  // Set in buildInitializer.
-    HInstruction originalLength = null;  // Set for growable lists.
+    HInstruction array; // Set in buildInitializer.
+    bool isFixed; // Set in buildInitializer.
+    HInstruction originalLength = null; // Set for growable lists.
 
     HInstruction buildGetLength() {
       Element lengthElement = helpers.jsIndexableLength;
@@ -7642,9 +7011,8 @@
       //
       HInstruction length = buildGetLength();
       push(new HIdentity(length, originalLength, null, boolType));
-      pushInvokeStatic(node,
-          helpers.checkConcurrentModificationError,
-          [pop(), array]);
+      pushInvokeStatic(
+          node, helpers.checkConcurrentModificationError, [pop(), array]);
       pop();
     }
 
@@ -7652,8 +7020,8 @@
       visit(node.expression);
       array = pop();
       isFixed = isFixedLength(array.instructionType, compiler);
-      localsHandler.updateLocal(indexVariable,
-          graph.addConstantInt(0, compiler));
+      localsHandler.updateLocal(
+          indexVariable, graph.addConstantInt(0, compiler));
       originalLength = buildGetLength();
     }
 
@@ -7713,9 +7081,9 @@
 
   visitLabeledStatement(ast.LabeledStatement node) {
     ast.Statement body = node.statement;
-    if (body is ast.Loop
-        || body is ast.SwitchStatement
-        || Elements.isUnusedLabel(node, elements)) {
+    if (body is ast.Loop ||
+        body is ast.SwitchStatement ||
+        Elements.isUnusedLabel(node, elements)) {
       // Loops and switches handle their own labels.
       visit(body);
       return;
@@ -7746,8 +7114,8 @@
     if (hasBreak) {
       // There was at least one reachable break, so the label is needed.
       entryBlock.setBlockFlow(
-          new HLabeledBlockInformation(new HSubGraphBlockInformation(bodyGraph),
-                                       handler.labels()),
+          new HLabeledBlockInformation(
+              new HSubGraphBlockInformation(bodyGraph), handler.labels()),
           joinBlock);
     }
     handler.close();
@@ -7760,8 +7128,8 @@
     }
     List<HInstruction> listInputs = <HInstruction>[];
     for (Link<ast.Node> link = node.entries.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       visit(link.head);
       listInputs.add(pop());
       listInputs.add(pop());
@@ -7820,8 +7188,8 @@
     // dart2js unit tests).
     TypeMask mapType =
         new TypeMask.nonNullSubtype(helpers.mapLiteralClass, compiler.world);
-    TypeMask returnTypeMask = TypeMaskFactory.inferredReturnTypeForElement(
-        constructor, compiler);
+    TypeMask returnTypeMask =
+        TypeMaskFactory.inferredReturnTypeForElement(constructor, compiler);
     TypeMask instructionType =
         mapType.intersection(returnTypeMask, compiler.world);
 
@@ -7842,7 +7210,6 @@
 
   Map<ast.CaseMatch, ConstantValue> buildSwitchCaseConstants(
       ast.SwitchStatement node) {
-
     Map<ast.CaseMatch, ConstantValue> constants =
         new Map<ast.CaseMatch, ConstantValue>();
     for (ast.SwitchCase switchCase in node.cases) {
@@ -7896,8 +7263,8 @@
    * Builds a simple switch statement which does not handle uses of continue
    * statements to labeled switch cases.
    */
-  void buildSimpleSwitchStatement(ast.SwitchStatement node,
-                                  Map<ast.CaseMatch, ConstantValue> constants) {
+  void buildSimpleSwitchStatement(
+      ast.SwitchStatement node, Map<ast.CaseMatch, ConstantValue> constants) {
     JumpHandler jumpHandler = createJumpHandler(node, isLoopJump: false);
     HInstruction buildExpression() {
       visit(node.expression);
@@ -7918,13 +7285,8 @@
     void buildSwitchCase(ast.SwitchCase node) {
       visit(node.statements);
     }
-    handleSwitch(node,
-                 jumpHandler,
-                 buildExpression,
-                 node.cases,
-                 getConstants,
-                 isDefaultCase,
-                 buildSwitchCase);
+    handleSwitch(node, jumpHandler, buildExpression, node.cases, getConstants,
+        isDefaultCase, buildSwitchCase);
     jumpHandler.close();
   }
 
@@ -7932,10 +7294,11 @@
    * Builds a switch statement that can handle arbitrary uses of continue
    * statements to labeled switch cases.
    */
-  void buildComplexSwitchStatement(ast.SwitchStatement node,
-                                   Map<ast.CaseMatch, ConstantValue> constants,
-                                   Map<ast.SwitchCase, int> caseIndex,
-                                   bool hasDefault) {
+  void buildComplexSwitchStatement(
+      ast.SwitchStatement node,
+      Map<ast.CaseMatch, ConstantValue> constants,
+      Map<ast.SwitchCase, int> caseIndex,
+      bool hasDefault) {
     // If the switch statement has switch cases targeted by continue
     // statements we create the following encoding:
     //
@@ -8007,17 +7370,11 @@
       }
       jumpTargets[switchTarget].generateBreak();
     }
-    handleSwitch(node,
-                 jumpHandler,
-                 buildExpression,
-                 switchCases,
-                 getConstants,
-                 isDefaultCase,
-                 buildSwitchCase);
+    handleSwitch(node, jumpHandler, buildExpression, switchCases, getConstants,
+        isDefaultCase, buildSwitchCase);
     jumpHandler.close();
 
-    HInstruction buildCondition() =>
-        graph.addConstantBool(true, compiler);
+    HInstruction buildCondition() => graph.addConstantBool(true, compiler);
 
     void buildSwitch() {
       HInstruction buildExpression() {
@@ -8037,19 +7394,18 @@
       // Pass a [NullJumpHandler] because the target for the contained break
       // is not the generated switch statement but instead the loop generated
       // in the call to [handleLoop] below.
-      handleSwitch(node,
-                   new NullJumpHandler(reporter),
-                   buildExpression, node.cases, getConstants,
-                   (_) => false, // No case is default.
-                   buildSwitchCase);
+      handleSwitch(
+          node,
+          new NullJumpHandler(reporter),
+          buildExpression,
+          node.cases,
+          getConstants,
+          (_) => false, // No case is default.
+          buildSwitchCase);
     }
 
     void buildLoop() {
-      handleLoop(node,
-          () {},
-          buildCondition,
-          () {},
-          buildSwitch);
+      handleLoop(node, () {}, buildCondition, () {}, buildSwitch);
     }
 
     if (hasDefault) {
@@ -8060,9 +7416,7 @@
       void buildCondition() {
         js.Template code = js.js.parseForeignJS('#');
         push(new HForeignCode(
-            code,
-            backend.boolType,
-            [localsHandler.readLocal(switchTarget)],
+            code, backend.boolType, [localsHandler.readLocal(switchTarget)],
             nativeBehavior: native.NativeBehavior.PURE));
       }
       handleIf(node,
@@ -8092,7 +7446,6 @@
       Iterable<ConstantValue> getConstants(ast.SwitchCase switchCase),
       bool isDefaultCase(ast.SwitchCase switchCase),
       void buildSwitchCase(ast.SwitchCase switchCase)) {
-
     HBasicBlock expressionStart = openNewBlock();
     HInstruction expression = buildExpression();
     if (switchCases.isEmpty) {
@@ -8158,7 +7511,7 @@
     });
     jumpHandler.forEachContinue((HContinue instruction, LocalsHandler locals) {
       assert(invariant(errorNode, false,
-                       message: 'Continue cannot target a switch.'));
+          message: 'Continue cannot target a switch.'));
     });
     if (!isAborted()) {
       current.close(new HGoto());
@@ -8174,8 +7527,8 @@
       close(new HGoto());
       defaultCase.addSuccessor(joinBlock);
       caseHandlers.add(savedLocals);
-      statements.add(new HSubGraphBlockInformation(new SubGraph(
-          defaultCase, defaultCase)));
+      statements.add(new HSubGraphBlockInformation(
+          new SubGraph(defaultCase, defaultCase)));
     }
     assert(caseHandlers.length == joinBlock.predecessors.length);
     if (caseHandlers.length != 0) {
@@ -8192,13 +7545,11 @@
     }
 
     HSubExpressionBlockInformation expressionInfo =
-        new HSubExpressionBlockInformation(new SubExpression(expressionStart,
-                                                             expressionEnd));
+        new HSubExpressionBlockInformation(
+            new SubExpression(expressionStart, expressionEnd));
     expressionStart.setBlockFlow(
-        new HSwitchBlockInformation(expressionInfo,
-                                    statements,
-                                    jumpHandler.target,
-                                    jumpHandler.labels()),
+        new HSwitchBlockInformation(expressionInfo, statements,
+            jumpHandler.target, jumpHandler.labels()),
         joinBlock);
 
     jumpHandler.close();
@@ -8299,10 +7650,10 @@
     open(exitBlock);
     enterBlock.setBlockFlow(
         new HTryBlockInformation(
-          wrapStatementGraph(bodyGraph),
-          null, // No catch-variable.
-          null, // No catchGraph.
-          wrapStatementGraph(finallyGraph)),
+            wrapStatementGraph(bodyGraph),
+            null, // No catch-variable.
+            null, // No catchGraph.
+            wrapStatementGraph(finallyGraph)),
         exitBlock);
     inTryStatement = oldInTryStatement;
   }
@@ -8392,8 +7743,7 @@
         if (catchBlock.exception != null) {
           LocalVariableElement exceptionVariable =
               elements[catchBlock.exception];
-          localsHandler.updateLocal(exceptionVariable,
-                                    unwrappedException);
+          localsHandler.updateLocal(exceptionVariable, unwrappedException);
         }
         ast.Node trace = catchBlock.trace;
         if (trace != null) {
@@ -8407,24 +7757,20 @@
 
       void visitElse() {
         if (link.isEmpty) {
-          closeAndGotoExit(
-              new HThrow(exception,
-                         exception.sourceInformation,
-                         isRethrow: true));
+          closeAndGotoExit(new HThrow(exception, exception.sourceInformation,
+              isRethrow: true));
         } else {
           ast.CatchBlock newBlock = link.head;
-          handleIf(node,
-                   visitCondition: () { pushCondition(newBlock); },
-                   visitThen: visitThen,
-                   visitElse: visitElse);
+          handleIf(node, visitCondition: () {
+            pushCondition(newBlock);
+          }, visitThen: visitThen, visitElse: visitElse);
         }
       }
 
       ast.CatchBlock firstBlock = link.head;
-      handleIf(node,
-          visitCondition: () { pushCondition(firstBlock); },
-          visitThen: visitThen,
-          visitElse: visitElse);
+      handleIf(node, visitCondition: () {
+        pushCondition(firstBlock);
+      }, visitThen: visitThen, visitElse: visitElse);
       if (!isAborted()) endCatchBlock = close(new HGoto());
 
       rethrowableException = oldRethrowableException;
@@ -8445,7 +7791,9 @@
 
     HBasicBlock exitBlock = graph.addNewBlock();
 
-    addOptionalSuccessor(b1, b2) { if (b2 != null) b1.addSuccessor(b2); }
+    addOptionalSuccessor(b1, b2) {
+      if (b2 != null) b1.addSuccessor(b2);
+    }
     addExitTrySuccessor(successor) {
       if (successor == null) return;
       // Iterate over all blocks created inside this try/catch, and
@@ -8499,11 +7847,8 @@
     localsHandler = savedLocals;
     open(exitBlock);
     enterBlock.setBlockFlow(
-        new HTryBlockInformation(
-          wrapStatementGraph(bodyGraph),
-          exception,
-          wrapStatementGraph(catchGraph),
-          wrapStatementGraph(finallyGraph)),
+        new HTryBlockInformation(wrapStatementGraph(bodyGraph), exception,
+            wrapStatementGraph(catchGraph), wrapStatementGraph(finallyGraph)),
         exitBlock);
     inTryStatement = oldInTryStatement;
   }
@@ -8524,22 +7869,25 @@
    * This method is invoked before inlining the body of [function] into this
    * [SsaBuilder].
    */
-  void enterInlinedMethod(FunctionElement function,
-                          ast.Node _,
-                          List<HInstruction> compiledArguments,
-                          {InterfaceType instanceType}) {
-    TypesInferrer inferrer = compiler.typesTask.typesInferrer;
+  void enterInlinedMethod(FunctionElement function, ast.Node _,
+      List<HInstruction> compiledArguments,
+      {InterfaceType instanceType}) {
     AstInliningState state = new AstInliningState(
-        function, returnLocal, returnType, elements, stack, localsHandler,
+        function,
+        returnLocal,
+        returnType,
+        elements,
+        stack,
+        localsHandler,
         inTryStatement,
-        allInlinedFunctionsCalledOnce && inferrer.isCalledOnce(function));
+        allInlinedFunctionsCalledOnce && isFunctionCalledOnce(function));
     inliningStack.add(state);
 
     // Setting up the state of the (AST) builder is performed even when the
     // inlined function is in IR, because the irInliner uses the [returnElement]
     // of the AST builder.
-    setupStateForInlining(
-        function, compiledArguments, instanceType: instanceType);
+    setupStateForInlining(function, compiledArguments,
+        instanceType: instanceType);
   }
 
   void leaveInlinedMethod() {
@@ -8555,8 +7903,8 @@
 
   void emitReturn(HInstruction value, ast.Node node) {
     if (inliningStack.isEmpty) {
-      closeAndGotoExit(new HReturn(value,
-          sourceInformationBuilder.buildReturn(node)));
+      closeAndGotoExit(
+          new HReturn(value, sourceInformationBuilder.buildReturn(node)));
     } else {
       localsHandler.updateLocal(returnLocal, value);
     }
@@ -8564,19 +7912,13 @@
 
   @override
   void handleTypeLiteralConstantCompounds(
-      ast.SendSet node,
-      ConstantExpression constant,
-      CompoundRhs rhs,
-      _) {
+      ast.SendSet node, ConstantExpression constant, CompoundRhs rhs, _) {
     handleTypeLiteralCompound(node);
   }
 
   @override
   void handleTypeVariableTypeLiteralCompounds(
-      ast.SendSet node,
-      TypeVariableElement typeVariable,
-      CompoundRhs rhs,
-      _) {
+      ast.SendSet node, TypeVariableElement typeVariable, CompoundRhs rhs, _) {
     handleTypeLiteralCompound(node);
   }
 
@@ -8584,43 +7926,29 @@
     generateIsDeferredLoadedCheckOfSend(node);
     ast.Identifier selector = node.selector;
     generateThrowNoSuchMethod(node, selector.source,
-                              argumentNodes: node.arguments);
+        argumentNodes: node.arguments);
   }
 
   @override
-  void visitConstantGet(
-    ast.Send node,
-    ConstantExpression constant,
-    _) {
+  void visitConstantGet(ast.Send node, ConstantExpression constant, _) {
     visitNode(node);
   }
 
   @override
-  void visitConstantInvoke(
-    ast.Send node,
-    ConstantExpression constant,
-    ast.NodeList arguments,
-    CallStructure callStreucture,
-    _) {
+  void visitConstantInvoke(ast.Send node, ConstantExpression constant,
+      ast.NodeList arguments, CallStructure callStreucture, _) {
     visitNode(node);
   }
 
   @override
   void errorUndefinedBinaryExpression(
-      ast.Send node,
-      ast.Node left,
-      ast.Operator operator,
-      ast.Node right,
-      _) {
+      ast.Send node, ast.Node left, ast.Operator operator, ast.Node right, _) {
     visitNode(node);
   }
 
   @override
   void errorUndefinedUnaryExpression(
-      ast.Send node,
-      ast.Operator operator,
-      ast.Node expression,
-      _) {
+      ast.Send node, ast.Operator operator, ast.Node expression, _) {
     visitNode(node);
   }
 
@@ -8678,9 +8006,8 @@
     TypeMask type = TypeMaskFactory.inferredTypeForSelector(
         selector, expression.instructionType, compiler);
     if (type.containsOnlyString(compiler.world)) {
-      builder.pushInvokeDynamic(
-          node, selector,
-          expression.instructionType, <HInstruction>[expression]);
+      builder.pushInvokeDynamic(node, selector, expression.instructionType,
+          <HInstruction>[expression]);
       append(builder.pop());
       return;
     }
@@ -8702,7 +8029,7 @@
   }
 
   void visitNodeList(ast.NodeList node) {
-     node.visitChildren(this);
+    node.visitChildren(this);
   }
 
   void append(HInstruction expression) {
@@ -8710,15 +8037,15 @@
   }
 
   HInstruction concat(HInstruction left, HInstruction right) {
-    HInstruction instruction = new HStringConcat(
-        left, right, diagnosticNode, builder.backend.stringType);
+    HInstruction instruction =
+        new HStringConcat(left, right, builder.backend.stringType);
     builder.add(instruction);
     return instruction;
   }
 
   HInstruction stringify(ast.Node node, HInstruction expression) {
     HInstruction instruction =
-        new HStringify(expression, node, builder.backend.stringType);
+        new HStringify(expression, builder.backend.stringType);
     builder.add(instruction);
     return instruction;
   }
@@ -8746,22 +8073,17 @@
   final bool allowLoops;
   final bool enableUserAssertions;
 
-  InlineWeeder(this.maxInliningNodes,
-               this.useMaxInliningNodes,
-               this.allowLoops,
-               this.enableUserAssertions);
+  InlineWeeder(this.maxInliningNodes, this.useMaxInliningNodes, this.allowLoops,
+      this.enableUserAssertions);
 
-  static bool canBeInlined(FunctionElement function,
-                           int maxInliningNodes,
-                           bool useMaxInliningNodes,
-                           {bool allowLoops: false,
-                            bool enableUserAssertions: null}) {
+  static bool canBeInlined(
+      FunctionElement function, int maxInliningNodes, bool useMaxInliningNodes,
+      {bool allowLoops: false, bool enableUserAssertions: null}) {
     assert(enableUserAssertions is bool); // Ensure we passed it.
     if (function.resolvedAst.elements.containsTryStatement) return false;
 
-    InlineWeeder weeder =
-        new InlineWeeder(maxInliningNodes, useMaxInliningNodes, allowLoops,
-            enableUserAssertions);
+    InlineWeeder weeder = new InlineWeeder(maxInliningNodes,
+        useMaxInliningNodes, allowLoops, enableUserAssertions);
     ast.FunctionExpression functionExpression = function.node;
     weeder.visit(functionExpression.initializers);
     weeder.visit(functionExpression.body);
@@ -8840,8 +8162,7 @@
 
   void visitReturn(ast.Return node) {
     if (!registerNode()) return;
-    if (seenReturn
-        || identical(node.beginToken.stringValue, 'native')) {
+    if (seenReturn || identical(node.beginToken.stringValue, 'native')) {
       tooDifficult = true;
       return;
     }
@@ -8881,14 +8202,15 @@
   final bool inTryStatement;
   final bool allFunctionsCalledOnce;
 
-  AstInliningState(FunctionElement function,
-                   this.oldReturnLocal,
-                   this.oldReturnType,
-                   this.oldElements,
-                   this.oldStack,
-                   this.oldLocalsHandler,
-                   this.inTryStatement,
-                   this.allFunctionsCalledOnce)
+  AstInliningState(
+      FunctionElement function,
+      this.oldReturnLocal,
+      this.oldReturnType,
+      this.oldElements,
+      this.oldStack,
+      this.oldLocalsHandler,
+      this.inTryStatement,
+      this.allFunctionsCalledOnce)
       : super(function);
 }
 
@@ -8916,11 +8238,12 @@
     }
   }
 
-  void buildCondition(void visitCondition(),
-                      SsaBranch conditionBranch,
-                      SsaBranch thenBranch,
-                      SsaBranch elseBranch,
-                      SourceInformation sourceInformation) {
+  void buildCondition(
+      void visitCondition(),
+      SsaBranch conditionBranch,
+      SsaBranch thenBranch,
+      SsaBranch elseBranch,
+      SourceInformation sourceInformation) {
     startBranch(conditionBranch);
     visitCondition();
     checkNotAborted();
@@ -8935,7 +8258,7 @@
     bool conditionBranchLocalsCanBeReused =
         mergeLocals(conditionBranch, thenBranch, mayReuseFromLocals: true);
     mergeLocals(conditionBranch, elseBranch,
-                mayReuseFromLocals: conditionBranchLocalsCanBeReused);
+        mayReuseFromLocals: conditionBranchLocalsCanBeReused);
 
     conditionBranch.graph =
         new SubExpression(conditionBranch.block, conditionExitBlock);
@@ -8946,7 +8269,7 @@
    * return value implies that [mayReuseFromLocals] was set to [:true:].
    */
   bool mergeLocals(SsaBranch fromBranch, SsaBranch toBranch,
-                   {bool mayReuseFromLocals}) {
+      {bool mayReuseFromLocals}) {
     LocalsHandler fromLocals = fromBranch.exitLocals;
     if (toBranch.startLocals == null) {
       if (mayReuseFromLocals) {
@@ -8968,10 +8291,8 @@
     builder.open(branch.block);
   }
 
-  HInstruction buildBranch(SsaBranch branch,
-                           void visitBranch(),
-                           SsaBranch joinBranch,
-                           bool isExpression) {
+  HInstruction buildBranch(SsaBranch branch, void visitBranch(),
+      SsaBranch joinBranch, bool isExpression) {
     startBranch(branch);
     visitBranch();
     branch.graph = new SubGraph(branch.block, builder.lastOpenedBlock);
@@ -8987,10 +8308,8 @@
     return null;
   }
 
-  handleIf(void visitCondition(),
-           void visitThen(),
-           void visitElse(),
-           {SourceInformation sourceInformation}) {
+  handleIf(void visitCondition(), void visitThen(), void visitElse(),
+      {SourceInformation sourceInformation}) {
     if (visitElse == null) {
       // Make sure to have an else part to avoid a critical edge. A
       // critical edge is an edge that connects a block with multiple
@@ -9000,30 +8319,24 @@
       visitElse = () {};
     }
 
-    _handleDiamondBranch(
-        visitCondition, visitThen, visitElse, isExpression: false,
-        sourceInformation: sourceInformation);
+    _handleDiamondBranch(visitCondition, visitThen, visitElse,
+        isExpression: false, sourceInformation: sourceInformation);
   }
 
-  handleConditional(void visitCondition(),
-                    void visitThen(),
-                    void visitElse()) {
+  handleConditional(void visitCondition(), void visitThen(), void visitElse()) {
     assert(visitElse != null);
-    _handleDiamondBranch(
-        visitCondition, visitThen, visitElse, isExpression: true);
+    _handleDiamondBranch(visitCondition, visitThen, visitElse,
+        isExpression: true);
   }
 
   handleIfNull(void left(), void right()) {
     // x ?? y is transformed into: x == null ? y : x
     HInstruction leftExpression;
-    handleConditional(
-        () {
-          left();
-          leftExpression = builder.pop();
-          builder.pushCheckNull(leftExpression);
-        },
-        right,
-        () => builder.stack.add(leftExpression));
+    handleConditional(() {
+      left();
+      leftExpression = builder.pop();
+      builder.pushCheckNull(leftExpression);
+    }, right, () => builder.stack.add(leftExpression));
   }
 
   void handleLogicalAndOr(void left(), void right(), {bool isAnd}) {
@@ -9061,16 +8374,14 @@
     HConstant notIsAnd =
         builder.graph.addConstantBool(!isAnd, builder.compiler);
     JavaScriptBackend backend = builder.backend;
-    HPhi result = new HPhi.manyInputs(null,
-                                      <HInstruction>[boolifiedRight, notIsAnd],
-                                      backend.dynamicType);
+    HPhi result = new HPhi.manyInputs(
+        null, <HInstruction>[boolifiedRight, notIsAnd], backend.dynamicType);
     builder.current.addPhi(result);
     builder.stack.add(result);
   }
 
-  void handleLogicalAndOrWithLeftNode(ast.Node left,
-                                      void visitRight(),
-                                      {bool isAnd}) {
+  void handleLogicalAndOrWithLeftNode(ast.Node left, void visitRight(),
+      {bool isAnd}) {
     // This method is similar to [handleLogicalAndOr] but optimizes the case
     // where left is a logical "and" or logical "or".
     //
@@ -9086,27 +8397,24 @@
     //   result = phi(t3, false);
 
     ast.Send send = left.asSend();
-    if (send != null &&
-        (isAnd ? send.isLogicalAnd : send.isLogicalOr)) {
+    if (send != null && (isAnd ? send.isLogicalAnd : send.isLogicalOr)) {
       ast.Node newLeft = send.receiver;
       Link<ast.Node> link = send.argumentsNode.nodes;
       assert(link.tail.isEmpty);
       ast.Node middle = link.head;
       handleLogicalAndOrWithLeftNode(
           newLeft,
-          () => handleLogicalAndOrWithLeftNode(middle, visitRight,
-                                               isAnd: isAnd),
+          () =>
+              handleLogicalAndOrWithLeftNode(middle, visitRight, isAnd: isAnd),
           isAnd: isAnd);
     } else {
       handleLogicalAndOr(() => builder.visit(left), visitRight, isAnd: isAnd);
     }
   }
 
-  void _handleDiamondBranch(void visitCondition(),
-                            void visitThen(),
-                            void visitElse(),
-                            {bool isExpression,
-                             SourceInformation sourceInformation}) {
+  void _handleDiamondBranch(
+      void visitCondition(), void visitThen(), void visitElse(),
+      {bool isExpression, SourceInformation sourceInformation}) {
     SsaBranch conditionBranch = new SsaBranch(this);
     SsaBranch thenBranch = new SsaBranch(this);
     SsaBranch elseBranch = new SsaBranch(this);
@@ -9116,7 +8424,7 @@
     builder.goto(builder.current, conditionBranch.block);
 
     buildCondition(visitCondition, conditionBranch, thenBranch, elseBranch,
-                   sourceInformation);
+        sourceInformation);
     HInstruction thenValue =
         buildBranch(thenBranch, visitThen, joinBranch, isExpression);
     HInstruction elseValue =
@@ -9138,11 +8446,10 @@
       joinBlock = joinBranch.block;
     }
 
-    HIfBlockInformation info =
-        new HIfBlockInformation(
-          new HSubExpressionBlockInformation(conditionBranch.graph),
-          new HSubGraphBlockInformation(thenBranch.graph),
-          new HSubGraphBlockInformation(elseBranch.graph));
+    HIfBlockInformation info = new HIfBlockInformation(
+        new HSubExpressionBlockInformation(conditionBranch.graph),
+        new HSubGraphBlockInformation(thenBranch.graph),
+        new HSubGraphBlockInformation(elseBranch.graph));
 
     HBasicBlock conditionStartBlock = conditionBranch.block;
     conditionStartBlock.setBlockFlow(info, joinBlock);
@@ -9165,8 +8472,7 @@
     builder.push(new HVoidType(type, new TypeMask.exact(cls, classWorld)));
   }
 
-  void visitTypeVariableType(TypeVariableType type,
-                             SsaBuilder builder) {
+  void visitTypeVariableType(TypeVariableType type, SsaBuilder builder) {
     ClassElement cls = builder.backend.helpers.RuntimeType;
     TypeMask instructionType = new TypeMask.subclass(cls, classWorld);
     if (!builder.sourceElement.enclosingElement.isClosure &&
@@ -9174,9 +8480,8 @@
       HInstruction receiver = builder.localsHandler.readThis();
       builder.push(new HReadTypeVariable(type, receiver, instructionType));
     } else {
-      builder.push(
-          new HReadTypeVariable.noReceiver(
-              type, builder.addTypeVariableReference(type), instructionType));
+      builder.push(new HReadTypeVariable.noReceiver(
+          type, builder.addTypeVariableReference(type), instructionType));
     }
   }
 
@@ -9199,15 +8504,14 @@
     List<String> names = type.namedParameters;
     for (int index = 0; index < names.length; index++) {
       ast.DartString dartString = new ast.DartString.literal(names[index]);
-      inputs.add(
-          builder.graph.addConstantString(dartString, builder.compiler));
+      inputs.add(builder.graph.addConstantString(dartString, builder.compiler));
       namedParameterTypes[index].accept(this, builder);
       inputs.add(builder.pop());
     }
 
     ClassElement cls = builder.backend.helpers.RuntimeFunctionType;
-    builder.push(new HFunctionType(inputs, type,
-        new TypeMask.exact(cls, classWorld)));
+    builder.push(
+        new HFunctionType(inputs, type, new TypeMask.exact(cls, classWorld)));
   }
 
   void visitMalformedType(MalformedType type, SsaBuilder builder) {
@@ -9230,8 +8534,8 @@
     } else {
       cls = builder.backend.helpers.RuntimeTypeGeneric;
     }
-    builder.push(new HInterfaceType(inputs, type,
-        new TypeMask.exact(cls, classWorld)));
+    builder.push(
+        new HInterfaceType(inputs, type, new TypeMask.exact(cls, classWorld)));
   }
 
   void visitTypedefType(TypedefType type, SsaBuilder builder) {
@@ -9246,3 +8550,19 @@
     builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
   }
 }
+
+/// Determine what kind of loop [node] represents. The result is one of the
+/// kinds defined in [HLoopBlockInformation].
+int _loopKind(ast.Node node) => node.accept(const _LoopTypeVisitor());
+
+class _LoopTypeVisitor extends ast.Visitor {
+  const _LoopTypeVisitor();
+  int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP;
+  int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP;
+  int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP;
+  int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP;
+  int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
+  int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
+  int visitSwitchStatement(ast.SwitchStatement node) =>
+      HLoopBlockInformation.SWITCH_CONTINUE_LOOP;
+}
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index fd2050c..3a5d85a 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -2,24 +2,45 @@
 // for 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 ssa;
+import '../common.dart';
+import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
+import '../constants/constant_system.dart';
+import '../constants/values.dart';
+import '../core_types.dart' show CoreClasses;
+import '../dart_types.dart';
+import '../elements/elements.dart';
+import '../io/source_information.dart';
+import '../js/js.dart' as js;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart';
+import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
+import '../native/native.dart' as native;
+import '../types/types.dart';
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
+import '../util/util.dart';
+import '../world.dart' show ClassWorld, World;
+
+import 'nodes.dart';
+import 'codegen_helpers.dart';
+import 'variable_allocator.dart';
 
 class SsaCodeGeneratorTask extends CompilerTask {
-
   final JavaScriptBackend backend;
   final SourceInformationStrategy sourceInformationFactory;
 
-  SsaCodeGeneratorTask(JavaScriptBackend backend,
-                       this.sourceInformationFactory)
+  SsaCodeGeneratorTask(JavaScriptBackend backend, this.sourceInformationFactory)
       : this.backend = backend,
         super(backend.compiler);
 
   String get name => 'SSA code generator';
   NativeEmitter get nativeEmitter => backend.emitter.nativeEmitter;
 
-  js.Fun buildJavaScriptFunction(FunctionElement element,
-                                 List<js.Parameter> parameters,
-                                 js.Block body) {
+  js.Fun buildJavaScriptFunction(
+      FunctionElement element, List<js.Parameter> parameters, js.Block body) {
     js.AsyncModifier asyncModifier = element.asyncMarker.isAsync
         ? (element.asyncMarker.isYielding
             ? const js.AsyncModifier.asyncStar()
@@ -29,9 +50,9 @@
             : const js.AsyncModifier.sync());
 
     return new js.Fun(parameters, body, asyncModifier: asyncModifier)
-        .withSourceInformation(
-            sourceInformationFactory.createBuilderForContext(element)
-                .buildDeclaration(element));
+        .withSourceInformation(sourceInformationFactory
+            .createBuilderForContext(element)
+            .buildDeclaration(element));
   }
 
   js.Expression generateCode(CodegenWorkItem work, HGraph graph) {
@@ -45,9 +66,9 @@
   js.Expression generateLazyInitializer(work, graph) {
     return measure(() {
       compiler.tracer.traceGraph("codegen", graph);
-      SourceInformation sourceInformation =
-          sourceInformationFactory.createBuilderForContext(work.element)
-              .buildDeclaration(work.element);
+      SourceInformation sourceInformation = sourceInformationFactory
+          .createBuilderForContext(work.element)
+          .buildDeclaration(work.element);
       SsaCodeGenerator codegen = new SsaCodeGenerator(backend, work);
       codegen.visitGraph(graph);
       return new js.Fun(codegen.parameters, codegen.body)
@@ -138,18 +159,18 @@
   SubGraph subGraph;
 
   SsaCodeGenerator(this.backend, CodegenWorkItem work,
-                   {SourceInformation sourceInformation})
-    : this.work = work,
-      declaredLocals = new Set<String>(),
-      collectedVariableDeclarations = new Set<String>(),
-      currentContainer = new js.Block.empty(),
-      parameters = <js.Parameter>[],
-      expressionStack = <js.Expression>[],
-      oldContainerStack = <js.Block>[],
-      generateAtUseSite = new Set<HInstruction>(),
-      controlFlowOperators = new Set<HInstruction>(),
-      breakAction = new Map<Entity, EntityAction>(),
-      continueAction = new Map<Entity, EntityAction>();
+      {SourceInformation sourceInformation})
+      : this.work = work,
+        declaredLocals = new Set<String>(),
+        collectedVariableDeclarations = new Set<String>(),
+        currentContainer = new js.Block.empty(),
+        parameters = <js.Parameter>[],
+        expressionStack = <js.Expression>[],
+        oldContainerStack = <js.Block>[],
+        generateAtUseSite = new Set<HInstruction>(),
+        controlFlowOperators = new Set<HInstruction>(),
+        breakAction = new Map<Entity, EntityAction>(),
+        continueAction = new Map<Entity, EntityAction>();
 
   Compiler get compiler => backend.compiler;
 
@@ -209,8 +230,8 @@
    * If the [instruction] is not `null` it will be used to attach the position
    * to the [expression].
    */
-  pushExpressionAsStatement(js.Expression expression,
-                            SourceInformation sourceInformation) {
+  pushExpressionAsStatement(
+      js.Expression expression, SourceInformation sourceInformation) {
     pushStatement(new js.ExpressionStatement(expression)
         .withSourceInformation(sourceInformation));
   }
@@ -232,8 +253,8 @@
     new SsaTypeKnownRemover().visitGraph(graph);
     new SsaTrustedCheckRemover(compiler).visitGraph(graph);
     new SsaInstructionMerger(generateAtUseSite, compiler).visitGraph(graph);
-    new SsaConditionMerger(
-        generateAtUseSite, controlFlowOperators).visitGraph(graph);
+    new SsaConditionMerger(generateAtUseSite, controlFlowOperators)
+        .visitGraph(graph);
     SsaLiveIntervalBuilder intervalBuilder = new SsaLiveIntervalBuilder(
         compiler, generateAtUseSite, controlFlowOperators);
     intervalBuilder.visitGraph(graph);
@@ -269,8 +290,8 @@
               js.VariableInitialization initialization =
                   new js.VariableInitialization(decl, assignment.value);
               currentContainer.statements[0] = new js.ExpressionStatement(
-                  new js.VariableDeclarationList([initialization]))
-                      .withSourceInformation(sourceInformation);
+                      new js.VariableDeclarationList([initialization]))
+                  .withSourceInformation(sourceInformation);
               return;
             }
           }
@@ -285,7 +306,8 @@
             new js.VariableDeclaration(name), null));
       });
       var declarationList = new js.VariableDeclarationList(declarations)
-          .withSourceInformation(sourceInformation);;
+          .withSourceInformation(sourceInformation);
+      ;
       insertStatementAtStart(new js.ExpressionStatement(declarationList));
     }
   }
@@ -375,7 +397,7 @@
     HSubExpressionBlockInformation graph = info;
     SubExpression limits = graph.subExpression;
     return !identical(expressionType(info), TYPE_STATEMENT) &&
-       (limits.end.last is HConditionalBranch);
+        (limits.end.last is HConditionalBranch);
   }
 
   /**
@@ -413,7 +435,7 @@
     if (len == 0) return new js.EmptyStatement();
     if (len == 1) {
       js.Statement result = block.statements[0];
-      if (result is ast.Block) return unwrapStatement(result);
+      if (result is js.Block) return unwrapStatement(result);
       return result;
     }
     return block;
@@ -453,7 +475,7 @@
     * Only visits the arguments starting at inputs[HInvoke.ARGUMENTS_OFFSET].
     */
   List<js.Expression> visitArguments(List<HInstruction> inputs,
-                                     {int start: HInvoke.ARGUMENTS_OFFSET}) {
+      {int start: HInvoke.ARGUMENTS_OFFSET}) {
     assert(inputs.length >= start);
     List<js.Expression> result = new List<js.Expression>(inputs.length - start);
     for (int i = start; i < inputs.length; i++) {
@@ -468,13 +490,19 @@
         collectedVariableDeclarations.contains(variableName);
   }
 
-  js.Expression generateExpressionAssignment(String variableName,
-                                             js.Expression value) {
+  js.Expression generateExpressionAssignment(
+      String variableName, js.Expression value) {
     if (value is js.Binary) {
       js.Binary binary = value;
       String op = binary.op;
-      if (op == '+' || op == '-' || op == '/' || op == '*' || op == '%' ||
-          op == '^' || op == '&' || op == '|') {
+      if (op == '+' ||
+          op == '-' ||
+          op == '/' ||
+          op == '*' ||
+          op == '%' ||
+          op == '^' ||
+          op == '&' ||
+          op == '|') {
         if (binary.left is js.VariableUse &&
             (binary.left as js.VariableUse).name == variableName) {
           // We know now, that we can shorten x = x + y into x += y.
@@ -492,9 +520,8 @@
         .withSourceInformation(value.sourceInformation);
   }
 
-  void assignVariable(String variableName,
-                      js.Expression value,
-                      SourceInformation sourceInformation) {
+  void assignVariable(String variableName, js.Expression value,
+      SourceInformation sourceInformation) {
     if (isGeneratingExpression) {
       // If we are in an expression then we can't declare the variable here.
       // We have no choice, but to use it and then declare it separately.
@@ -505,7 +532,7 @@
       // Otherwise if we are trying to declare inline and we are in a statement
       // then we declare (unless it was already declared).
     } else if (!shouldGroupVarDeclarations &&
-               !declaredLocals.contains(variableName)) {
+        !declaredLocals.contains(variableName)) {
       // It may be necessary to remove it from the ones to be declared later.
       collectedVariableDeclarations.remove(variableName);
       declaredLocals.add(variableName);
@@ -513,8 +540,9 @@
       js.VariableInitialization initialization =
           new js.VariableInitialization(decl, value);
 
-      pushExpressionAsStatement(new js.VariableDeclarationList(
-          <js.VariableInitialization>[initialization]),
+      pushExpressionAsStatement(
+          new js.VariableDeclarationList(
+              <js.VariableInitialization>[initialization]),
           sourceInformation);
     } else {
       // Otherwise we are just going to use it.  If we have not already declared
@@ -523,8 +551,7 @@
         collectedVariableDeclarations.add(variableName);
       }
       pushExpressionAsStatement(
-          generateExpressionAssignment(variableName, value),
-          sourceInformation);
+          generateExpressionAssignment(variableName, value), sourceInformation);
     }
   }
 
@@ -545,10 +572,11 @@
     }
 
     if (needsAssignment &&
-        !instruction.isControlFlow() && variableNames.hasName(instruction)) {
+        !instruction.isControlFlow() &&
+        variableNames.hasName(instruction)) {
       visitExpression(instruction);
       assignVariable(variableNames.getName(instruction), pop(),
-                     instruction.sourceInformation);
+          instruction.sourceInformation);
       return;
     }
 
@@ -599,16 +627,16 @@
   }
 
   void implicitContinueAsBreak(JumpTarget target) {
-    pushStatement(new js.Break(
-        backend.namer.implicitContinueLabelName(target)));
+    pushStatement(
+        new js.Break(backend.namer.implicitContinueLabelName(target)));
   }
 
   void implicitBreakWithLabel(JumpTarget target) {
     pushStatement(new js.Break(backend.namer.implicitBreakLabelName(target)));
   }
 
-  js.Statement wrapIntoLabels(js.Statement result,
-                              List<LabelDefinition> labels) {
+  js.Statement wrapIntoLabels(
+      js.Statement result, List<LabelDefinition> labels) {
     for (LabelDefinition label in labels) {
       if (label.isTarget) {
         String breakLabelString = backend.namer.breakLabelName(label);
@@ -618,7 +646,6 @@
     return result;
   }
 
-
   // The regular [visitIf] method implements the needed logic.
   bool visitIfInfo(HIfBlockInformation info) => false;
 
@@ -641,8 +668,8 @@
 
     js.Block oldContainer = currentContainer;
     for (int inputIndex = 1, statementIndex = 0;
-         inputIndex < inputs.length;
-         statementIndex++) {
+        inputIndex < inputs.length;
+        statementIndex++) {
       HBasicBlock successor = successors[inputIndex - 1];
       // If liveness analysis has figured out that this case is dead,
       // omit the code for it.
@@ -652,15 +679,15 @@
           currentContainer = new js.Block.empty();
           cases.add(new js.Case(pop(), currentContainer));
           inputIndex++;
-        } while ((successors[inputIndex - 1] == successor)
-                 && (inputIndex < inputs.length));
+        } while ((successors[inputIndex - 1] == successor) &&
+            (inputIndex < inputs.length));
 
         generateStatements(info.statements[statementIndex]);
       } else {
         // Skip all the case statements that belong to this
         // block.
-        while ((successors[inputIndex - 1] == successor)
-              && (inputIndex < inputs.length)) {
+        while ((successors[inputIndex - 1] == successor) &&
+            (inputIndex < inputs.length)) {
           ++inputIndex;
         }
       }
@@ -770,7 +797,8 @@
 
         if (isConditionExpression &&
             !hasPhiUpdates &&
-            info.updates != null && isJSExpression(info.updates)) {
+            info.updates != null &&
+            isJSExpression(info.updates)) {
           // If we have an updates graph, and it's expressible as an
           // expression, generate a for-loop.
           js.Expression jsInitialization = null;
@@ -798,8 +826,8 @@
                   }
                 } else if (expression.isCommaOperator) {
                   js.Binary binary = expression;
-                  return allSimpleAssignments(binary.left)
-                      && allSimpleAssignments(binary.right);
+                  return allSimpleAssignments(binary.left) &&
+                      allSimpleAssignments(binary.right);
                 }
                 return false;
               }
@@ -810,8 +838,8 @@
                 for (js.Assignment assignment in assignments) {
                   String id = (assignment.leftHandSide as js.VariableUse).name;
                   js.Node declaration = new js.VariableDeclaration(id);
-                  inits.add(new js.VariableInitialization(declaration,
-                                                          assignment.value));
+                  inits.add(new js.VariableInitialization(
+                      declaration, assignment.value));
                   collectedVariableDeclarations.remove(id);
                   declaredLocals.add(id);
                 }
@@ -886,7 +914,6 @@
         bool hasExitPhiUpdates = !exitAvoidContainer.statements.isEmpty;
         currentContainer = oldContainer;
 
-
         oldContainer = currentContainer;
         js.Block body = new js.Block.empty();
         // If there are phi copies in the block that jumps to the
@@ -921,10 +948,9 @@
           // If the condition is dead code, we turn the do-while into
           // a simpler while because we will never reach the condition
           // at the end of the loop anyway.
-          loop = new js.While(
-              newLiteralBool(true, info.sourceInformation),
-              unwrapStatement(body))
-                  .withSourceInformation(info.sourceInformation);
+          loop = new js.While(newLiteralBool(true, info.sourceInformation),
+                  unwrapStatement(body))
+              .withSourceInformation(info.sourceInformation);
         } else {
           if (hasPhiUpdates || hasExitPhiUpdates) {
             updateBody.statements.add(new js.Continue(null));
@@ -936,8 +962,7 @@
               exitAvoidContainer.statements.add(jsBreak);
               exitLoop = exitAvoidContainer;
             }
-            body.statements.add(
-                new js.If(jsCondition, updateBody, exitLoop));
+            body.statements.add(new js.If(jsCondition, updateBody, exitLoop));
             jsCondition = newLiteralBool(true, info.sourceInformation);
           }
           loop = new js.Do(unwrapStatement(body), jsCondition)
@@ -1103,9 +1128,8 @@
    * Sequentialize a list of conceptually parallel copies. Parallel
    * copies may contain cycles, that this method breaks.
    */
-  void sequentializeCopies(Iterable<Copy> copies,
-                           String tempName,
-                           void doAssignment(String target, String source)) {
+  void sequentializeCopies(Iterable<Copy> copies, String tempName,
+      void doAssignment(String target, String source)) {
     // Map to keep track of the current location (ie the variable that
     // holds the initial value) of a variable.
     Map<String, String> currentLocation = new Map<String, String>();
@@ -1129,7 +1153,6 @@
     }
     copies = prunedCopies;
 
-
     // For each copy, set the current location of the source to
     // itself, and the initial value of the destination to the source.
     // Add the destination to the list of copies to make.
@@ -1170,8 +1193,8 @@
       // If [current] is used as a source, and the assignment has been
       // done, we are done with this variable. Otherwise there is a
       // cycle that we break by using a temporary name.
-      if (currentLocation[current] != null
-          && current != currentLocation[initialValue[current]]) {
+      if (currentLocation[current] != null &&
+          current != currentLocation[initialValue[current]]) {
         doAssignment(tempName, current);
         currentLocation[current] = tempName;
         // [current] can now be safely updated. Copies of [current]
@@ -1188,7 +1211,7 @@
     // Map the instructions to strings.
     Iterable<Copy> copies = handler.copies.map((Copy copy) {
       return new Copy(variableNames.getName(copy.source),
-                      variableNames.getName(copy.destination));
+          variableNames.getName(copy.destination));
     });
 
     sequentializeCopies(copies, variableNames.getSwapTemp(), emitAssignment);
@@ -1212,9 +1235,8 @@
     visit(instruction);
   }
 
-  void handleInvokeBinary(HInvokeBinary node,
-                          String op,
-                          SourceInformation sourceInformation) {
+  void handleInvokeBinary(
+      HInvokeBinary node, String op, SourceInformation sourceInformation) {
     use(node.left);
     js.Expression jsLeft = pop();
     use(node.right);
@@ -1236,14 +1258,14 @@
     visitInvokeBinary(node, op);
     if (op != '>>>' && requiresUintConversion(node)) {
       push(new js.Binary(">>>", pop(), new js.LiteralNumber("0"))
-              .withSourceInformation(node.sourceInformation));
+          .withSourceInformation(node.sourceInformation));
     }
   }
 
   visitInvokeUnary(HInvokeUnary node, String op) {
     use(node.operand);
-    push(new js.Prefix(op, pop())
-        .withSourceInformation(node.sourceInformation));
+    push(
+        new js.Prefix(op, pop()).withSourceInformation(node.sourceInformation));
   }
 
   // We want the outcome of bit-operations to be positive. We use the unsigned
@@ -1256,9 +1278,9 @@
     }
   }
 
-  void emitIdentityComparison(HIdentity instruction,
-                              SourceInformation sourceInformation,
-                              {bool inverse: false}) {
+  void emitIdentityComparison(
+      HIdentity instruction, SourceInformation sourceInformation,
+      {bool inverse: false}) {
     String op = instruction.singleComparisonOp;
     HInstruction left = instruction.left;
     HInstruction right = instruction.right;
@@ -1267,20 +1289,19 @@
       js.Expression jsLeft = pop();
       use(right);
       push(new js.Binary(mapRelationalOperator(op, inverse), jsLeft, pop())
-         .withSourceInformation(sourceInformation));
+          .withSourceInformation(sourceInformation));
     } else {
       assert(NullConstantValue.JsNull == 'null');
       use(left);
       js.Binary leftEqualsNull =
           new js.Binary("==", pop(), new js.LiteralNull());
       use(right);
-      js.Binary rightEqualsNull =
-          new js.Binary(mapRelationalOperator("==", inverse),
-                        pop(), new js.LiteralNull());
+      js.Binary rightEqualsNull = new js.Binary(
+          mapRelationalOperator("==", inverse), pop(), new js.LiteralNull());
       use(right);
       use(left);
-      js.Binary tripleEq = new js.Binary(mapRelationalOperator("===", inverse),
-                                         pop(), pop());
+      js.Binary tripleEq =
+          new js.Binary(mapRelationalOperator("===", inverse), pop(), pop());
 
       push(new js.Conditional(leftEqualsNull, rightEqualsNull, tripleEq)
           .withSourceInformation(sourceInformation));
@@ -1291,15 +1312,15 @@
     emitIdentityComparison(node, node.sourceInformation, inverse: false);
   }
 
-  visitAdd(HAdd node)               => visitInvokeBinary(node, '+');
-  visitDivide(HDivide node)         => visitInvokeBinary(node, '/');
-  visitMultiply(HMultiply node)     => visitInvokeBinary(node, '*');
-  visitSubtract(HSubtract node)     => visitInvokeBinary(node, '-');
-  visitBitAnd(HBitAnd node)         => visitBitInvokeBinary(node, '&');
-  visitBitNot(HBitNot node)         => visitBitInvokeUnary(node, '~');
-  visitBitOr(HBitOr node)           => visitBitInvokeBinary(node, '|');
-  visitBitXor(HBitXor node)         => visitBitInvokeBinary(node, '^');
-  visitShiftLeft(HShiftLeft node)   => visitBitInvokeBinary(node, '<<');
+  visitAdd(HAdd node) => visitInvokeBinary(node, '+');
+  visitDivide(HDivide node) => visitInvokeBinary(node, '/');
+  visitMultiply(HMultiply node) => visitInvokeBinary(node, '*');
+  visitSubtract(HSubtract node) => visitInvokeBinary(node, '-');
+  visitBitAnd(HBitAnd node) => visitBitInvokeBinary(node, '&');
+  visitBitNot(HBitNot node) => visitBitInvokeUnary(node, '~');
+  visitBitOr(HBitOr node) => visitBitInvokeBinary(node, '|');
+  visitBitXor(HBitXor node) => visitBitInvokeBinary(node, '^');
+  visitShiftLeft(HShiftLeft node) => visitBitInvokeBinary(node, '<<');
   visitShiftRight(HShiftRight node) => visitBitInvokeBinary(node, '>>>');
 
   visitTruncatingDivide(HTruncatingDivide node) {
@@ -1317,18 +1338,18 @@
         .withSourceInformation(node.sourceInformation));
   }
 
-  visitNegate(HNegate node)             => visitInvokeUnary(node, '-');
+  visitNegate(HNegate node) => visitInvokeUnary(node, '-');
 
-  visitLess(HLess node)                 => visitRelational(node, '<');
-  visitLessEqual(HLessEqual node)       => visitRelational(node, '<=');
-  visitGreater(HGreater node)           => visitRelational(node, '>');
+  visitLess(HLess node) => visitRelational(node, '<');
+  visitLessEqual(HLessEqual node) => visitRelational(node, '<=');
+  visitGreater(HGreater node) => visitRelational(node, '>');
   visitGreaterEqual(HGreaterEqual node) => visitRelational(node, '>=');
 
   visitBoolify(HBoolify node) {
     assert(node.inputs.length == 1);
     use(node.inputs[0]);
-    push(new js.Binary('===', pop(),
-                       newLiteralBool(true, node.sourceInformation))
+    push(new js.Binary(
+            '===', pop(), newLiteralBool(true, node.sourceInformation))
         .withSourceInformation(node.sourceInformation));
   }
 
@@ -1385,9 +1406,8 @@
     if (node.label != null) {
       LabelDefinition label = node.label;
       if (!tryCallAction(breakAction, label)) {
-        pushStatement(
-            new js.Break(backend.namer.breakLabelName(label))
-                .withSourceInformation(node.sourceInformation));
+        pushStatement(new js.Break(backend.namer.breakLabelName(label))
+            .withSourceInformation(node.sourceInformation));
       }
     } else {
       JumpTarget target = node.target;
@@ -1397,8 +1417,8 @@
               new js.Break(backend.namer.implicitContinueLabelName(target))
                   .withSourceInformation(node.sourceInformation));
         } else {
-          pushStatement(new js.Break(null)
-              .withSourceInformation(node.sourceInformation));
+          pushStatement(
+              new js.Break(null).withSourceInformation(node.sourceInformation));
         }
       }
     }
@@ -1410,14 +1430,13 @@
       LabelDefinition label = node.label;
       if (!tryCallAction(continueAction, label)) {
         // TODO(floitsch): should this really be the breakLabelName?
-        pushStatement(
-            new js.Continue(backend.namer.breakLabelName(label))
-                .withSourceInformation(node.sourceInformation));
+        pushStatement(new js.Continue(backend.namer.breakLabelName(label))
+            .withSourceInformation(node.sourceInformation));
       }
     } else {
       JumpTarget target = node.target;
       if (!tryCallAction(continueAction, target)) {
-        if (target.statement is ast.SwitchStatement) {
+        if (target.isSwitch) {
           pushStatement(
               new js.Continue(backend.namer.implicitContinueLabelName(target))
                   .withSourceInformation(node.sourceInformation));
@@ -1454,8 +1473,8 @@
     // if (condition) i = bar();
     // Usually, the variable name is longer than 'if' and it takes up
     // more space to duplicate the name.
-    if (!atUseSite
-        && variableNames.getName(phi) == variableNames.getName(phi.inputs[1])) {
+    if (!atUseSite &&
+        variableNames.getName(phi) == variableNames.getName(phi.inputs[1])) {
       return false;
     }
     if (!atUseSite) define(phi);
@@ -1530,8 +1549,9 @@
           backend.namer.globalObjectFor(helpers.interceptorsLibrary));
       use(node.receiver);
       List<js.Expression> arguments = <js.Expression>[pop()];
-      push(js.propertyCall(isolate, name, arguments)
-           .withSourceInformation(node.sourceInformation));
+      push(js
+          .propertyCall(isolate, name, arguments)
+          .withSourceInformation(node.sourceInformation));
       registry.registerUseInterceptor();
     }
   }
@@ -1554,12 +1574,13 @@
         // Split returns a List, so we make sure the backend knows the
         // list class is instantiated.
         registry.registerInstantiatedClass(coreClasses.listClass);
-      } else if (backend.isNative(target) && target.isFunction
-                 && !node.isInterceptedCall) {
+      } else if (backend.isNative(target) &&
+          target.isFunction &&
+          !node.isInterceptedCall) {
         // A direct (i.e. non-interceptor) native call is the result of
         // optimization.  The optimization ensures any type checks or
         // conversions have been satisified.
-        methodName = backend.getFixedBackendName(target);
+        methodName = backend.nativeData.getFixedBackendName(target);
       }
     }
 
@@ -1570,8 +1591,9 @@
     } else {
       methodLiteral = backend.namer.asName(methodName);
     }
-    push(js.propertyCall(object, methodLiteral, arguments)
-         .withSourceInformation(node.sourceInformation));
+    push(js
+        .propertyCall(object, methodLiteral, arguments)
+        .withSourceInformation(node.sourceInformation));
   }
 
   void visitInvokeConstructorBody(HInvokeConstructorBody node) {
@@ -1579,11 +1601,11 @@
     js.Expression object = pop();
     js.Name methodName = backend.namer.instanceMethodName(node.element);
     List<js.Expression> arguments = visitArguments(node.inputs);
-    push(js.propertyCall(object, methodName, arguments)
-         .withSourceInformation(node.sourceInformation));
-    registry.registerStaticUse(
-        new StaticUse.constructorBodyInvoke(
-            node.element, new CallStructure.unnamed(arguments.length)));
+    push(js
+        .propertyCall(object, methodName, arguments)
+        .withSourceInformation(node.sourceInformation));
+    registry.registerStaticUse(new StaticUse.constructorBodyInvoke(
+        node.element, new CallStructure.unnamed(arguments.length)));
   }
 
   void visitOneShotInterceptor(HOneShotInterceptor node) {
@@ -1593,7 +1615,8 @@
     Selector selector = node.selector;
     TypeMask mask = getOptimizedSelectorFor(node, selector, node.mask);
     js.Name methodName = backend.registerOneShotInterceptor(selector);
-    push(js.propertyCall(isolate, methodName, arguments)
+    push(js
+        .propertyCall(isolate, methodName, arguments)
         .withSourceInformation(node.sourceInformation));
     if (selector.isGetter) {
       registerGetter(node);
@@ -1605,9 +1628,8 @@
     registry.registerUseInterceptor();
   }
 
-  TypeMask getOptimizedSelectorFor(HInvokeDynamic node,
-                                   Selector selector,
-                                   TypeMask mask) {
+  TypeMask getOptimizedSelectorFor(
+      HInvokeDynamic node, Selector selector, TypeMask mask) {
     if (node.element != null) {
       // Create an artificial type mask to make sure only
       // [node.element] will be enqueued. We're not using the receiver
@@ -1615,14 +1637,13 @@
       // invoke dynamic knows more than the receiver.
       ClassElement enclosing = node.element.enclosingClass;
       if (compiler.world.isInstantiated(enclosing)) {
-        return new TypeMask.nonNullExact(
-            enclosing.declaration, compiler.world);
+        return new TypeMask.nonNullExact(enclosing.declaration, compiler.world);
       } else {
         // The element is mixed in so a non-null subtype mask is the most
         // precise we have.
         assert(invariant(node, compiler.world.isUsedAsMixin(enclosing),
             message: "Element ${node.element} from $enclosing expected "
-                     "to be mixed in."));
+                "to be mixed in."));
         return new TypeMask.nonNullSubtype(
             enclosing.declaration, compiler.world);
       }
@@ -1645,52 +1666,49 @@
       // may know something about the types of closures that need
       // the specific closure call method.
       Selector call = new Selector.callClosureFrom(selector);
-      registry.registerDynamicUse(
-          new DynamicUse(call, null));
+      registry.registerDynamicUse(new DynamicUse(call, null));
     }
-    registry.registerDynamicUse(
-        new DynamicUse(selector, mask));
+    registry.registerDynamicUse(new DynamicUse(selector, mask));
   }
 
   void registerSetter(HInvokeDynamic node) {
     Selector selector = node.selector;
     TypeMask mask = getOptimizedSelectorFor(node, selector, node.mask);
-    registry.registerDynamicUse(
-        new DynamicUse(selector, mask));
+    registry.registerDynamicUse(new DynamicUse(selector, mask));
   }
 
   void registerGetter(HInvokeDynamic node) {
     Selector selector = node.selector;
     TypeMask mask = getOptimizedSelectorFor(node, selector, node.mask);
-    registry.registerDynamicUse(
-        new DynamicUse(selector, mask));
+    registry.registerDynamicUse(new DynamicUse(selector, mask));
   }
 
   visitInvokeDynamicSetter(HInvokeDynamicSetter node) {
     use(node.receiver);
     js.Name name = backend.namer.invocationName(node.selector);
-    push(js.propertyCall(pop(), name, visitArguments(node.inputs))
-         .withSourceInformation(node.sourceInformation));
+    push(js
+        .propertyCall(pop(), name, visitArguments(node.inputs))
+        .withSourceInformation(node.sourceInformation));
     registerSetter(node);
   }
 
   visitInvokeDynamicGetter(HInvokeDynamicGetter node) {
     use(node.receiver);
     js.Name name = backend.namer.invocationName(node.selector);
-    push(js.propertyCall(pop(), name, visitArguments(node.inputs))
-         .withSourceInformation(node.sourceInformation));
+    push(js
+        .propertyCall(pop(), name, visitArguments(node.inputs))
+        .withSourceInformation(node.sourceInformation));
     registerGetter(node);
   }
 
   visitInvokeClosure(HInvokeClosure node) {
     Selector call = new Selector.callClosureFrom(node.selector);
     use(node.receiver);
-    push(js.propertyCall(pop(),
-                         backend.namer.invocationName(call),
-                         visitArguments(node.inputs))
-            .withSourceInformation(node.sourceInformation));
-    registry.registerDynamicUse(
-        new DynamicUse(call, null));
+    push(js
+        .propertyCall(pop(), backend.namer.invocationName(call),
+            visitArguments(node.inputs))
+        .withSourceInformation(node.sourceInformation));
+    registry.registerDynamicUse(new DynamicUse(call, null));
   }
 
   visitInvokeStatic(HInvokeStatic node) {
@@ -1724,38 +1742,34 @@
       // more optimizations available to the loop.  This form is 50% faster on
       // some small loop, almost as fast as loops with no concurrent
       // modification check.
-      push(js.js('# || (0, #)(#)',[
-          arguments[0],
-          backend.emitter.staticFunctionAccess(throwFunction),
-          arguments[1]]));
+      push(js.js('# || (0, #)(#)', [
+        arguments[0],
+        backend.emitter.staticFunctionAccess(throwFunction),
+        arguments[1]
+      ]));
     } else {
       CallStructure callStructure = new CallStructure.unnamed(arguments.length);
-      registry.registerStaticUse(
-          element.isConstructor
-            ? new StaticUse.constructorInvoke(element, callStructure)
-            : new StaticUse.staticInvoke(element, callStructure));
+      registry.registerStaticUse(element.isConstructor
+          ? new StaticUse.constructorInvoke(element, callStructure)
+          : new StaticUse.staticInvoke(element, callStructure));
       push(backend.emitter.staticFunctionAccess(element));
       push(new js.Call(pop(), arguments,
           sourceInformation: node.sourceInformation));
     }
-
   }
 
   visitInvokeSuper(HInvokeSuper node) {
     Element superElement = node.element;
     ClassElement superClass = superElement.enclosingClass;
     if (superElement.isField) {
-      js.Name fieldName =
-          backend.namer.instanceFieldPropertyName(superElement);
+      js.Name fieldName = backend.namer.instanceFieldPropertyName(superElement);
       use(node.inputs[0]);
-      js.PropertyAccess access =
-          new js.PropertyAccess(pop(), fieldName)
-              .withSourceInformation(node.sourceInformation);
+      js.PropertyAccess access = new js.PropertyAccess(pop(), fieldName)
+          .withSourceInformation(node.sourceInformation);
       if (node.isSetter) {
-        registry.registerStaticUse(
-            superElement.isSetter
-                ? new StaticUse.superSetterSet(superElement)
-                : new StaticUse.superFieldSet(superElement));
+        registry.registerStaticUse(superElement.isSetter
+            ? new StaticUse.superSetterSet(superElement)
+            : new StaticUse.superFieldSet(superElement));
         use(node.value);
         push(new js.Assignment(access, pop())
             .withSourceInformation(node.sourceInformation));
@@ -1772,33 +1786,31 @@
           // will be created, and that this tear-off must bypass ordinary
           // dispatch to ensure the super method is invoked.
           FunctionElement helper = backend.helpers.closureFromTearOff;
-          registry.registerStaticUse(new StaticUse.staticInvoke(helper,
-                new CallStructure.unnamed(helper.parameters.length)));
+          registry.registerStaticUse(new StaticUse.staticInvoke(
+              helper, new CallStructure.unnamed(helper.parameters.length)));
           registry.registerStaticUse(new StaticUse.superTearOff(node.element));
           methodName = backend.namer.invocationName(selector);
         } else {
           methodName = backend.namer.instanceMethodName(superElement);
         }
-        registry.registerStaticUse(
-            new StaticUse.superInvoke(
-                superElement,
-                new CallStructure.unnamed(node.inputs.length)));
-        push(js.js('#.#.call(#)',
-                   [backend.emitter.prototypeAccess(superClass,
-                                                    hasBeenInstantiated: true),
-                    methodName, visitArguments(node.inputs, start: 0)])
-                .withSourceInformation(node.sourceInformation));
+        registry.registerStaticUse(new StaticUse.superInvoke(
+            superElement, new CallStructure.unnamed(node.inputs.length)));
+        push(js.js('#.#.call(#)', [
+          backend.emitter
+              .prototypeAccess(superClass, hasBeenInstantiated: true),
+          methodName,
+          visitArguments(node.inputs, start: 0)
+        ]).withSourceInformation(node.sourceInformation));
       } else {
         use(node.receiver);
-        registry.registerStaticUse(
-            new StaticUse.superInvoke(
-                superElement,
-                new CallStructure.unnamed(node.inputs.length - 1)));
-        push(
-          js.js('#.#(#)', [
-            pop(), backend.namer.aliasedSuperMemberPropertyName(superElement),
-            visitArguments(node.inputs, start: 1)]) // Skip receiver argument.
-              .withSourceInformation(node.sourceInformation));
+        registry.registerStaticUse(new StaticUse.superInvoke(
+            superElement, new CallStructure.unnamed(node.inputs.length - 1)));
+        push(js.js('#.#(#)', [
+          pop(),
+          backend.namer.aliasedSuperMemberPropertyName(superElement),
+          visitArguments(node.inputs, start: 1)
+        ]) // Skip receiver argument.
+            .withSourceInformation(node.sourceInformation));
       }
     }
   }
@@ -1863,9 +1875,8 @@
 
   visitLocalSet(HLocalSet node) {
     use(node.value);
-    assignVariable(variableNames.getName(node.receiver),
-                   pop(),
-                   node.sourceInformation);
+    assignVariable(
+        variableNames.getName(node.receiver), pop(), node.sourceInformation);
   }
 
   void registerForeignTypes(HForeign node) {
@@ -1882,7 +1893,8 @@
         use(inputs[i]);
         interpolatedExpressions.add(pop());
       }
-      pushStatement(node.codeTemplate.instantiate(interpolatedExpressions)
+      pushStatement(node.codeTemplate
+          .instantiate(interpolatedExpressions)
           .withSourceInformation(node.sourceInformation));
     } else {
       List<js.Expression> interpolatedExpressions = <js.Expression>[];
@@ -1890,7 +1902,8 @@
         use(inputs[i]);
         interpolatedExpressions.add(pop());
       }
-      push(node.codeTemplate.instantiate(interpolatedExpressions)
+      push(node.codeTemplate
+          .instantiate(interpolatedExpressions)
           .withSourceInformation(node.sourceInformation));
     }
 
@@ -1919,24 +1932,22 @@
     });
   }
 
-  js.Expression newLiteralBool(bool value,
-                               SourceInformation sourceInformation) {
-    if (compiler.enableMinification) {
+  js.Expression newLiteralBool(
+      bool value, SourceInformation sourceInformation) {
+    if (compiler.options.enableMinification) {
       // Use !0 for true, !1 for false.
       return new js.Prefix("!", new js.LiteralNumber(value ? "0" : "1"))
           .withSourceInformation(sourceInformation);
     } else {
-      return new js.LiteralBool(value)
-          .withSourceInformation(sourceInformation);
+      return new js.LiteralBool(value).withSourceInformation(sourceInformation);
     }
   }
 
-  void generateConstant(ConstantValue constant,
-                        SourceInformation sourceInformation) {
+  void generateConstant(
+      ConstantValue constant, SourceInformation sourceInformation) {
     if (constant.isFunction) {
       FunctionConstantValue function = constant;
-      registry.registerStaticUse(
-          new StaticUse.staticTearOff(function.element));
+      registry.registerStaticUse(new StaticUse.staticTearOff(function.element));
     }
     if (constant.isType) {
       // If the type is a web component, we need to ensure the constructors are
@@ -1969,21 +1980,21 @@
 
   static String mapRelationalOperator(String op, bool inverse) {
     Map<String, String> inverseOperator = const <String, String>{
-      "==" : "!=",
-      "!=" : "==",
+      "==": "!=",
+      "!=": "==",
       "===": "!==",
       "!==": "===",
-      "<"  : ">=",
-      "<=" : ">",
-      ">"  : "<=",
-      ">=" : "<"
+      "<": ">=",
+      "<=": ">",
+      ">": "<=",
+      ">=": "<"
     };
     return inverse ? inverseOperator[op] : op;
   }
 
   void generateNot(HInstruction input, SourceInformation sourceInformation) {
     bool canGenerateOptimizedComparison(HInstruction instruction) {
-      if (instruction is !HRelational) return false;
+      if (instruction is! HRelational) return false;
 
       HRelational relational = instruction;
 
@@ -2011,8 +2022,8 @@
         emitIdentityComparison(input, sourceInformation, inverse: true);
       } else if (input is HBoolify) {
         use(input.inputs[0]);
-        push(new js.Binary("!==", pop(),
-                           newLiteralBool(true, input.sourceInformation))
+        push(new js.Binary(
+                "!==", pop(), newLiteralBool(true, input.sourceInformation))
             .withSourceInformation(sourceInformation));
       } else if (canGenerateOptimizedComparison(input)) {
         HRelational relational = input;
@@ -2078,12 +2089,12 @@
     assert(node.inputs.length == 1);
     HInstruction input = node.inputs[0];
     if (input.isConstantNull()) {
-      pushStatement(new js.Return()
-          .withSourceInformation(node.sourceInformation));
+      pushStatement(
+          new js.Return().withSourceInformation(node.sourceInformation));
     } else {
       use(node.inputs[0]);
-      pushStatement(new js.Return(pop())
-          .withSourceInformation(node.sourceInformation));
+      pushStatement(
+          new js.Return(pop()).withSourceInformation(node.sourceInformation));
     }
   }
 
@@ -2094,8 +2105,8 @@
   visitThrow(HThrow node) {
     if (node.isRethrow) {
       use(node.inputs[0]);
-      pushStatement(new js.Throw(pop())
-          .withSourceInformation(node.sourceInformation));
+      pushStatement(
+          new js.Throw(pop()).withSourceInformation(node.sourceInformation));
     } else {
       generateThrowWithHelper(helpers.wrapExceptionHelper, node.inputs[0],
           sourceInformation: node.sourceInformation);
@@ -2104,8 +2115,7 @@
 
   visitAwait(HAwait node) {
     use(node.inputs[0]);
-    push(new js.Await(pop())
-        .withSourceInformation(node.sourceInformation));
+    push(new js.Await(pop()).withSourceInformation(node.sourceInformation));
   }
 
   visitYield(HYield node) {
@@ -2152,9 +2162,7 @@
       assert(over != null || under != null);
       js.Expression underOver = under == null
           ? over
-          : over == null
-              ? under
-              : new js.Binary("||", under, over);
+          : over == null ? under : new js.Binary("||", under, over);
       js.Statement thenBody = new js.Block.empty();
       js.Block oldContainer = currentContainer;
       currentContainer = thenBody;
@@ -2165,13 +2173,13 @@
       pushStatement(new js.If.noElse(underOver, thenBody)
           .withSourceInformation(node.sourceInformation));
     } else {
-      generateThrowWithHelper(helpers.throwIndexOutOfRangeException,
-          [node.array, node.index]);
+      generateThrowWithHelper(
+          helpers.throwIndexOutOfRangeException, [node.array, node.index]);
     }
   }
 
   void generateThrowWithHelper(Element helper, argument,
-                               {SourceInformation sourceInformation}) {
+      {SourceInformation sourceInformation}) {
     js.Expression jsHelper = backend.emitter.staticFunctionAccess(helper);
     List arguments = [];
     var location;
@@ -2186,17 +2194,16 @@
       use(argument);
       arguments.add(pop());
     }
-    registry.registerStaticUse(
-        new StaticUse.staticInvoke(
-            helper, new CallStructure.unnamed(arguments.length)));
+    registry.registerStaticUse(new StaticUse.staticInvoke(
+        helper, new CallStructure.unnamed(arguments.length)));
     js.Call value = new js.Call(jsHelper, arguments.toList(growable: false),
         sourceInformation: sourceInformation);
     // BUG(4906): Using throw/return here adds to the size of the generated code
     // but it has the advantage of explicitly telling the JS engine that
     // this code path will terminate abruptly. Needs more work.
     if (helper == helpers.wrapExceptionHelper) {
-      pushStatement(new js.Throw(value)
-          .withSourceInformation(sourceInformation));
+      pushStatement(
+          new js.Throw(value).withSourceInformation(sourceInformation));
     } else {
       Element element = work.element;
       if (element is FunctionElement && element.asyncMarker.isYielding) {
@@ -2206,8 +2213,8 @@
         pushStatement(new js.ExpressionStatement(value)
             .withSourceInformation(sourceInformation));
       } else {
-        pushStatement(new js.Return(value)
-            .withSourceInformation(sourceInformation));
+        pushStatement(
+            new js.Return(value).withSourceInformation(sourceInformation));
       }
     }
   }
@@ -2234,22 +2241,21 @@
     Element element = node.element;
     assert(element.isFunction || element.isField);
     if (element.isFunction) {
-      push(backend.emitter.isolateStaticClosureAccess(element)
-           .withSourceInformation(node.sourceInformation));
-      registry.registerStaticUse(
-          new StaticUse.staticTearOff(element));
+      push(backend.emitter
+          .isolateStaticClosureAccess(element)
+          .withSourceInformation(node.sourceInformation));
+      registry.registerStaticUse(new StaticUse.staticTearOff(element));
     } else {
-      push(backend.emitter.staticFieldAccess(element)
-           .withSourceInformation(node.sourceInformation));
-      registry.registerStaticUse(
-          new StaticUse.staticGet(element));
+      push(backend.emitter
+          .staticFieldAccess(element)
+          .withSourceInformation(node.sourceInformation));
+      registry.registerStaticUse(new StaticUse.staticGet(element));
     }
   }
 
   void visitLazyStatic(HLazyStatic node) {
     Element element = node.element;
-    registry.registerStaticUse(
-        new StaticUse.staticInit(element));
+    registry.registerStaticUse(new StaticUse.staticInit(element));
     js.Expression lazyGetter =
         backend.emitter.isolateLazyInitializerAccess(element);
     js.Call call = new js.Call(lazyGetter, <js.Expression>[],
@@ -2258,8 +2264,7 @@
   }
 
   void visitStaticStore(HStaticStore node) {
-    registry.registerStaticUse(
-        new StaticUse.staticSet(node.element));
+    registry.registerStaticUse(new StaticUse.staticSet(node.element));
     js.Node variable = backend.emitter.staticFieldAccess(node.element);
     use(node.inputs[0]);
     push(new js.Assignment(variable, pop())
@@ -2282,9 +2287,9 @@
       // JavaScript's + operator with a string for the left operand will convert
       // the right operand to a string, and the conversion result is correct.
       use(input);
-      if (node.usedBy.length == 1
-          && node.usedBy[0] is HStringConcat
-          && node.usedBy[0].inputs[1] == node) {
+      if (node.usedBy.length == 1 &&
+          node.usedBy[0] is HStringConcat &&
+          node.usedBy[0].inputs[1] == node) {
         // The context is already <string> + value.
       } else {
         // Force an empty string for the first operand.
@@ -2299,7 +2304,7 @@
           backend.emitter.staticFunctionAccess(convertToString);
       use(input);
       push(new js.Call(jsHelper, <js.Expression>[pop()],
-                       sourceInformation: node.sourceInformation));
+          sourceInformation: node.sourceInformation));
     }
   }
 
@@ -2343,46 +2348,46 @@
     push(new js.Binary(cmp, left, or0));
   }
 
-  void checkBigInt(HInstruction input, String cmp,
-                   SourceInformation sourceInformation) {
+  void checkBigInt(
+      HInstruction input, String cmp, SourceInformation sourceInformation) {
     use(input);
     js.Expression left = pop();
     use(input);
     js.Expression right = pop();
     // TODO(4984): Deal with infinity and -0.0.
-    push(js.js('Math.floor(#) $cmp #', <js.Expression>[left, right])
-            .withSourceInformation(sourceInformation));
+    push(js.js('Math.floor(#) $cmp #',
+        <js.Expression>[left, right]).withSourceInformation(sourceInformation));
   }
 
   void checkTypeOf(HInstruction input, String cmp, String typeName,
-                   SourceInformation sourceInformation) {
+      SourceInformation sourceInformation) {
     use(input);
     js.Expression typeOf = new js.Prefix("typeof", pop());
     push(new js.Binary(cmp, typeOf, js.string(typeName)));
   }
 
-  void checkNum(HInstruction input, String cmp,
-                SourceInformation sourceInformation) {
+  void checkNum(
+      HInstruction input, String cmp, SourceInformation sourceInformation) {
     return checkTypeOf(input, cmp, 'number', sourceInformation);
   }
 
-  void checkDouble(HInstruction input, String cmp,
-                   SourceInformation sourceInformation) {
+  void checkDouble(
+      HInstruction input, String cmp, SourceInformation sourceInformation) {
     return checkNum(input, cmp, sourceInformation);
   }
 
-  void checkString(HInstruction input, String cmp,
-                   SourceInformation sourceInformation) {
+  void checkString(
+      HInstruction input, String cmp, SourceInformation sourceInformation) {
     return checkTypeOf(input, cmp, 'string', sourceInformation);
   }
 
-  void checkBool(HInstruction input, String cmp,
-                 SourceInformation sourceInformation) {
+  void checkBool(
+      HInstruction input, String cmp, SourceInformation sourceInformation) {
     return checkTypeOf(input, cmp, 'boolean', sourceInformation);
   }
 
-  void checkObject(HInstruction input, String cmp,
-                   SourceInformation sourceInformation) {
+  void checkObject(
+      HInstruction input, String cmp, SourceInformation sourceInformation) {
     assert(NullConstantValue.JsNull == 'null');
     if (cmp == "===") {
       checkTypeOf(input, '===', 'object', sourceInformation);
@@ -2448,13 +2453,12 @@
     push(new js.Binary('!=', pop(), new js.LiteralNull()));
   }
 
-  void checkType(HInstruction input, HInstruction interceptor,
-                 DartType type,
-                 SourceInformation sourceInformation,
-                 {bool negative: false}) {
+  void checkType(HInstruction input, HInstruction interceptor, DartType type,
+      SourceInformation sourceInformation,
+      {bool negative: false}) {
     Element element = type.element;
     if (element == helpers.jsArrayClass) {
-      checkArray(input, negative ? '!==': '===');
+      checkArray(input, negative ? '!==' : '===');
       return;
     } else if (element == helpers.jsMutableArrayClass) {
       if (negative) {
@@ -2487,15 +2491,15 @@
     }
     if (interceptor != null) {
       checkTypeViaProperty(interceptor, type, sourceInformation,
-                           negative: negative);
+          negative: negative);
     } else {
       checkTypeViaProperty(input, type, sourceInformation, negative: negative);
     }
   }
 
-  void checkTypeViaProperty(HInstruction input, DartType type,
-                            SourceInformation sourceInformation,
-                            {bool negative: false}) {
+  void checkTypeViaProperty(
+      HInstruction input, DartType type, SourceInformation sourceInformation,
+      {bool negative: false}) {
     registry.registerTypeUse(new TypeUse.isCheck(type));
 
     use(input);
@@ -2504,18 +2508,15 @@
         new js.PropertyAccess(pop(), backend.namer.operatorIsType(type))
             .withSourceInformation(sourceInformation);
     // We always negate at least once so that the result is boolified.
-    push(new js.Prefix('!', field)
-        .withSourceInformation(sourceInformation));
+    push(new js.Prefix('!', field).withSourceInformation(sourceInformation));
     // If the result is not negated, put another '!' in front.
     if (!negative) {
-      push(new js.Prefix('!', pop())
-          .withSourceInformation(sourceInformation));
+      push(new js.Prefix('!', pop()).withSourceInformation(sourceInformation));
     }
   }
 
   void checkTypeViaInstanceof(
-      HInstruction input, DartType type,
-      SourceInformation sourceInformation,
+      HInstruction input, DartType type, SourceInformation sourceInformation,
       {bool negative: false}) {
     registry.registerTypeUse(new TypeUse.isCheck(type));
 
@@ -2523,23 +2524,23 @@
 
     js.Expression jsClassReference =
         backend.emitter.constructorAccess(type.element);
-    push(js.js('# instanceof #', [pop(), jsClassReference])
-            .withSourceInformation(sourceInformation));
+    push(js.js('# instanceof #',
+        [pop(), jsClassReference]).withSourceInformation(sourceInformation));
     if (negative) {
-      push(new js.Prefix('!', pop())
-          .withSourceInformation(sourceInformation));
+      push(new js.Prefix('!', pop()).withSourceInformation(sourceInformation));
     }
     registry.registerInstantiation(type);
   }
 
-  void handleNumberOrStringSupertypeCheck(HInstruction input,
-                                          HInstruction interceptor,
-                                          DartType type,
-                                          SourceInformation sourceInformation,
-                                          {bool negative: false}) {
+  void handleNumberOrStringSupertypeCheck(
+      HInstruction input,
+      HInstruction interceptor,
+      DartType type,
+      SourceInformation sourceInformation,
+      {bool negative: false}) {
     assert(!identical(type.element, coreClasses.listClass) &&
-           !Elements.isListSupertype(type.element, compiler) &&
-           !Elements.isStringOnlySupertype(type.element, compiler));
+        !Elements.isListSupertype(type.element, compiler) &&
+        !Elements.isStringOnlySupertype(type.element, compiler));
     String relation = negative ? '!==' : '===';
     checkNum(input, relation, sourceInformation);
     js.Expression numberTest = pop();
@@ -2550,22 +2551,21 @@
     checkType(input, interceptor, type, sourceInformation, negative: negative);
     String combiner = negative ? '&&' : '||';
     String combiner2 = negative ? '||' : '&&';
-    push(new js.Binary(combiner,
-                       new js.Binary(combiner, numberTest, stringTest)
-                          .withSourceInformation(sourceInformation),
-                       new js.Binary(combiner2, objectTest, pop())
-                          .withSourceInformation(sourceInformation))
+    push(new js.Binary(
+            combiner,
+            new js.Binary(combiner, numberTest, stringTest)
+                .withSourceInformation(sourceInformation),
+            new js.Binary(combiner2, objectTest, pop())
+                .withSourceInformation(sourceInformation))
         .withSourceInformation(sourceInformation));
   }
 
-  void handleStringSupertypeCheck(HInstruction input,
-                                  HInstruction interceptor,
-                                  DartType type,
-                                  SourceInformation sourceInformation,
-                                  {bool negative: false}) {
-    assert(!identical(type.element, coreClasses.listClass)
-           && !Elements.isListSupertype(type.element, compiler)
-           && !Elements.isNumberOrStringSupertype(type.element, compiler));
+  void handleStringSupertypeCheck(HInstruction input, HInstruction interceptor,
+      DartType type, SourceInformation sourceInformation,
+      {bool negative: false}) {
+    assert(!identical(type.element, coreClasses.listClass) &&
+        !Elements.isListSupertype(type.element, compiler) &&
+        !Elements.isNumberOrStringSupertype(type.element, compiler));
     String relation = negative ? '!==' : '===';
     checkString(input, relation, sourceInformation);
     js.Expression stringTest = pop();
@@ -2573,19 +2573,16 @@
     js.Expression objectTest = pop();
     checkType(input, interceptor, type, sourceInformation, negative: negative);
     String combiner = negative ? '||' : '&&';
-    push(new js.Binary(negative ? '&&' : '||',
-                       stringTest,
-                       new js.Binary(combiner, objectTest, pop())));
+    push(new js.Binary(negative ? '&&' : '||', stringTest,
+        new js.Binary(combiner, objectTest, pop())));
   }
 
-  void handleListOrSupertypeCheck(HInstruction input,
-                                  HInstruction interceptor,
-                                  DartType type,
-                                  SourceInformation sourceInformation,
-                                  { bool negative: false }) {
-    assert(!identical(type.element, coreClasses.stringClass)
-           && !Elements.isStringOnlySupertype(type.element, compiler)
-           && !Elements.isNumberOrStringSupertype(type.element, compiler));
+  void handleListOrSupertypeCheck(HInstruction input, HInstruction interceptor,
+      DartType type, SourceInformation sourceInformation,
+      {bool negative: false}) {
+    assert(!identical(type.element, coreClasses.stringClass) &&
+        !Elements.isStringOnlySupertype(type.element, compiler) &&
+        !Elements.isNumberOrStringSupertype(type.element, compiler));
     String relation = negative ? '!==' : '===';
     checkObject(input, relation, sourceInformation);
     js.Expression objectTest = pop();
@@ -2593,9 +2590,8 @@
     js.Expression arrayTest = pop();
     checkType(input, interceptor, type, sourceInformation, negative: negative);
     String combiner = negative ? '&&' : '||';
-    push(new js.Binary(negative ? '||' : '&&',
-                       objectTest,
-                       new js.Binary(combiner, arrayTest, pop()))
+    push(new js.Binary(negative ? '||' : '&&', objectTest,
+            new js.Binary(combiner, arrayTest, pop()))
         .withSourceInformation(sourceInformation));
   }
 
@@ -2607,7 +2603,7 @@
     emitIsViaInterceptor(node, node.sourceInformation, negative: false);
   }
 
-  void emitIs(HIs node, String relation, SourceInformation sourceInformation)  {
+  void emitIs(HIs node, String relation, SourceInformation sourceInformation) {
     DartType type = node.typeExpression;
     registry.registerTypeUse(new TypeUse.isCheck(type));
     HInstruction input = node.expression;
@@ -2654,53 +2650,44 @@
             .withSourceInformation(sourceInformation));
       } else if (node.useInstanceOf) {
         assert(interceptor == null);
-        checkTypeViaInstanceof(input, type,
-                               sourceInformation,
-                               negative: negative);
+        checkTypeViaInstanceof(input, type, sourceInformation,
+            negative: negative);
       } else if (Elements.isNumberOrStringSupertype(element, compiler)) {
         handleNumberOrStringSupertypeCheck(
-            input, interceptor, type,
-            sourceInformation,
+            input, interceptor, type, sourceInformation,
             negative: negative);
       } else if (Elements.isStringOnlySupertype(element, compiler)) {
-        handleStringSupertypeCheck(
-            input, interceptor, type,
-            sourceInformation,
+        handleStringSupertypeCheck(input, interceptor, type, sourceInformation,
             negative: negative);
       } else if (identical(element, coreClasses.listClass) ||
-                 Elements.isListSupertype(element, compiler)) {
-        handleListOrSupertypeCheck(
-            input, interceptor, type,
-            sourceInformation,
+          Elements.isListSupertype(element, compiler)) {
+        handleListOrSupertypeCheck(input, interceptor, type, sourceInformation,
             negative: negative);
       } else if (type.isFunctionType) {
-        checkType(input, interceptor, type,
-                  sourceInformation,
-                  negative: negative);
-      } else if ((input.canBePrimitive(compiler)
-                  && !input.canBePrimitiveArray(compiler))
-                 || input.canBeNull()) {
+        checkType(input, interceptor, type, sourceInformation,
+            negative: negative);
+      } else if ((input.canBePrimitive(compiler) &&
+              !input.canBePrimitiveArray(compiler)) ||
+          input.canBeNull()) {
         checkObject(input, relation, node.sourceInformation);
         js.Expression objectTest = pop();
-        checkType(input, interceptor, type,
-                  sourceInformation,
-                  negative: negative);
+        checkType(input, interceptor, type, sourceInformation,
+            negative: negative);
         push(new js.Binary(negative ? '||' : '&&', objectTest, pop())
             .withSourceInformation(sourceInformation));
       } else {
-        checkType(input, interceptor, type,
-                  sourceInformation,
-                  negative: negative);
+        checkType(input, interceptor, type, sourceInformation,
+            negative: negative);
       }
     }
   }
 
-  void emitIsViaInterceptor(HIsViaInterceptor node,
-                            SourceInformation sourceInformation,
-                            {bool negative: false}) {
-    checkTypeViaProperty(node.interceptor, node.typeExpression,
-                         sourceInformation,
-                         negative: negative);
+  void emitIsViaInterceptor(
+      HIsViaInterceptor node, SourceInformation sourceInformation,
+      {bool negative: false}) {
+    checkTypeViaProperty(
+        node.interceptor, node.typeExpression, sourceInformation,
+        negative: negative);
   }
 
   js.Expression generateReceiverOrArgumentTypeTest(
@@ -2713,10 +2700,10 @@
     // typeof check so the null check is cheaper.
     bool isIntCheck = checkedType.containsOnlyInt(classWorld);
     bool turnIntoNumCheck = isIntCheck && input.isIntegerOrNull(compiler);
-    bool turnIntoNullCheck = !turnIntoNumCheck
-        && (checkedType.nullable() == inputType)
-        && (isIntCheck
-            || checkedType.satisfies(helpers.jsIndexableClass, classWorld));
+    bool turnIntoNullCheck = !turnIntoNumCheck &&
+        (checkedType.nullable() == inputType) &&
+        (isIntCheck ||
+            checkedType.satisfies(helpers.jsIndexableClass, classWorld));
 
     if (turnIntoNullCheck) {
       use(input);
@@ -2748,9 +2735,9 @@
       ClassWorld classWorld = compiler.world;
       // An int check if the input is not int or null, is not
       // sufficient for doing an argument or receiver check.
-      assert(compiler.trustTypeAnnotations ||
-             !node.checkedType.containsOnlyInt(classWorld) ||
-             node.checkedInput.isIntegerOrNull(compiler));
+      assert(compiler.options.trustTypeAnnotations ||
+          !node.checkedType.containsOnlyInt(classWorld) ||
+          node.checkedInput.isIntegerOrNull(compiler));
       js.Expression test = generateReceiverOrArgumentTypeTest(
           node.checkedInput, node.checkedType);
       js.Block oldContainer = currentContainer;
@@ -2758,8 +2745,7 @@
       currentContainer = body;
       if (node.isArgumentTypeCheck) {
         generateThrowWithHelper(
-            helpers.throwIllegalArgumentException,
-            node.checkedInput,
+            helpers.throwIllegalArgumentException, node.checkedInput,
             sourceInformation: node.sourceInformation);
       } else if (node.isReceiverTypeCheck) {
         use(node.checkedInput);
@@ -2788,8 +2774,7 @@
 
     CheckedModeHelper helper;
     if (node.isBooleanConversionCheck) {
-      helper =
-          const CheckedModeHelper('boolConversionCheck');
+      helper = const CheckedModeHelper('boolConversionCheck');
     } else {
       helper =
           backend.getCheckedModeHelper(type, typeCast: node.isCastTypeCheck);
@@ -2845,9 +2830,10 @@
       push(js.js('#(#)', [accessHelper('buildFunctionType'), arguments]));
     } else {
       var arguments = [
-          returnType,
-          new js.ArrayInitializer(parameterTypes),
-          new js.ObjectInitializer(namedParameters)];
+        returnType,
+        new js.ArrayInitializer(parameterTypes),
+        new js.ObjectInitializer(namedParameters)
+      ];
       push(js.js('#(#)', [accessHelper('buildNamedFunctionType'), arguments]));
     }
   }
@@ -2863,19 +2849,18 @@
       if (backend.isInterceptorClass(element.enclosingClass)) {
         int index = element.index;
         js.Expression receiver = pop();
-        js.Expression helper = backend.emitter
-            .staticFunctionAccess(helperElement);
+        js.Expression helper =
+            backend.emitter.staticFunctionAccess(helperElement);
         push(js.js(r'#(#.$builtinTypeInfo && #.$builtinTypeInfo[#])',
-                [helper, receiver, receiver, js.js.number(index)]));
+            [helper, receiver, receiver, js.js.number(index)]));
       } else {
         backend.emitter.registerReadTypeVariable(element);
-        push(js.js('#.#()',
-                [pop(), backend.namer.nameForReadTypeVariable(element)]));
+        push(js.js(
+            '#.#()', [pop(), backend.namer.nameForReadTypeVariable(element)]));
       }
     } else {
-      push(js.js('#(#)', [
-          backend.emitter.staticFunctionAccess(helperElement),
-          pop()]));
+      push(js.js('#(#)',
+          [backend.emitter.staticFunctionAccess(helperElement), pop()]));
     }
   }
 
@@ -2909,9 +2894,8 @@
       // For mocked-up tests.
       return js.js('(void 0).$name');
     }
-    registry.registerStaticUse(
-        new StaticUse.staticInvoke(helper,
-            new CallStructure.unnamed(argumentCount)));
+    registry.registerStaticUse(new StaticUse.staticInvoke(
+        helper, new CallStructure.unnamed(argumentCount)));
     return backend.emitter.staticFunctionAccess(helper);
   }
 
diff --git a/pkg/compiler/lib/src/ssa/codegen_helpers.dart b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
index bafa560..254e577 100644
--- a/pkg/compiler/lib/src/ssa/codegen_helpers.dart
+++ b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
@@ -2,7 +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.
 
-part of ssa;
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart';
+import '../elements/elements.dart';
+import '../js_backend/js_backend.dart';
+import '../types/types.dart';
+import '../universe/selector.dart' show Selector;
+
+import 'nodes.dart';
 
 /**
  * Replaces some instructions with specialized versions to make codegen easier.
@@ -60,8 +67,8 @@
     if (node.kind == HIs.RAW_CHECK) {
       HInstruction interceptor = node.interceptor;
       if (interceptor != null) {
-        return new HIsViaInterceptor(node.typeExpression, interceptor,
-                                     backend.boolType);
+        return new HIsViaInterceptor(
+            node.typeExpression, interceptor, backend.boolType);
       }
     }
     return node;
@@ -80,8 +87,7 @@
     if (leftType.isNullable && rightType.isNullable) {
       if (left.isConstantNull() ||
           right.isConstantNull() ||
-          (left.isPrimitive(compiler) &&
-           leftType == rightType)) {
+          (left.isPrimitive(compiler) && leftType == rightType)) {
         return '==';
       }
       return null;
@@ -186,14 +192,12 @@
             return replaceOp(rmw, left);
           } else {
             HInstruction rmw = new HReadModifyWrite.assignOp(
-                setter.element,
-                assignOp,
-                receiver, right, op.instructionType);
+                setter.element, assignOp, receiver, right, op.instructionType);
             return replaceOp(rmw, left);
           }
         } else if (op.usedBy.length == 1 &&
-                   right is HConstant &&
-                   right.constant.isOne) {
+            right is HConstant &&
+            right.constant.isOne) {
           HInstruction rmw = new HReadModifyWrite.postOp(
               setter.element, incrementOp, receiver, op.instructionType);
           block.addAfter(left, rmw);
@@ -207,14 +211,12 @@
       return noMatchingRead();
     }
 
-    HInstruction simple(String assignOp,
-                        HInstruction left, HInstruction right) {
+    HInstruction simple(
+        String assignOp, HInstruction left, HInstruction right) {
       if (isMatchingRead(left)) {
         if (left.usedBy.length == 1) {
           HInstruction rmw = new HReadModifyWrite.assignOp(
-              setter.element,
-              assignOp,
-              receiver, right, op.instructionType);
+              setter.element, assignOp, receiver, right, op.instructionType);
           return replaceOp(rmw, left);
         }
       }
@@ -254,7 +256,6 @@
  * analysis easier.
  */
 class SsaTypeKnownRemover extends HBaseVisitor {
-
   void visitGraph(HGraph graph) {
     visitDominatorTree(graph);
   }
@@ -279,12 +280,11 @@
  * mode.
  */
 class SsaTrustedCheckRemover extends HBaseVisitor {
-
   Compiler compiler;
   SsaTrustedCheckRemover(this.compiler);
 
   void visitGraph(HGraph graph) {
-    if (!compiler.trustPrimitives) return;
+    if (!compiler.options.trustPrimitives) return;
     visitDominatorTree(graph);
   }
 
@@ -347,12 +347,12 @@
     List<HInstruction> inputs = user.inputs;
     for (int i = start; i < inputs.length; i++) {
       HInstruction input = inputs[i];
-      if (!generateAtUseSite.contains(input)
-          && !input.isCodeMotionInvariant()
-          && input.usedBy.length == 1
-          && input is !HPhi
-          && input is !HLocalValue
-          && !input.isJsStatement()) {
+      if (!generateAtUseSite.contains(input) &&
+          !input.isCodeMotionInvariant() &&
+          input.usedBy.length == 1 &&
+          input is! HPhi &&
+          input is! HLocalValue &&
+          !input.isJsStatement()) {
         if (input.isPure()) {
           // Only consider a pure input if it is in the same loop.
           // Otherwise, we might move GVN'ed instruction back into the
@@ -434,8 +434,7 @@
   }
 
   void visitTypeConversion(HTypeConversion instruction) {
-    if (!instruction.isArgumentTypeCheck
-        && !instruction.isReceiverTypeCheck) {
+    if (!instruction.isArgumentTypeCheck && !instruction.isReceiverTypeCheck) {
       assert(instruction.isCheckedModeCheck || instruction.isCastTypeCheck);
       // Checked mode checks and cast checks compile to code that
       // only use their input once, so we can safely visit them
@@ -455,8 +454,8 @@
   }
 
   bool isBlockSinglePredecessor(HBasicBlock block) {
-    return block.successors.length == 1
-        && block.successors[0].predecessors.length == 1;
+    return block.successors.length == 1 &&
+        block.successors[0].predecessors.length == 1;
   }
 
   void visitBasicBlock(HBasicBlock block) {
@@ -496,8 +495,8 @@
 
     block.last.accept(this);
     for (HInstruction instruction = block.last.previous;
-         instruction != null;
-         instruction = instruction.previous) {
+        instruction != null;
+        instruction = instruction.previous) {
       if (generateAtUseSite.contains(instruction)) {
         continue;
       }
@@ -578,8 +577,8 @@
       }
     }
 
-    if (block.predecessors.length == 1
-        && isBlockSinglePredecessor(block.predecessors[0])) {
+    if (block.predecessors.length == 1 &&
+        isBlockSinglePredecessor(block.predecessors[0])) {
       assert(block.phis.isEmpty);
       tryMergingExpressions(block.predecessors[0]);
     } else {
@@ -623,8 +622,8 @@
     // If [instruction] is not the last instruction of the block
     // before the control flow instruction, or the last instruction,
     // then we will have to emit a statement for that last instruction.
-    if (instruction != block.last
-        && !identical(instruction, block.last.previous)) return true;
+    if (instruction != block.last &&
+        !identical(instruction, block.last.previous)) return true;
 
     // If one of the instructions in the block until [instruction] is
     // not generated at use site, then we will have to emit a
@@ -632,8 +631,8 @@
     // TODO(ngeoffray): we could generate a comma separated
     // list of expressions.
     for (HInstruction temp = block.first;
-         !identical(temp, instruction);
-         temp = temp.next) {
+        !identical(temp, instruction);
+        temp = temp.next) {
       if (!generateAtUseSite.contains(temp)) return true;
     }
 
@@ -657,7 +656,7 @@
   }
 
   void visitBasicBlock(HBasicBlock block) {
-    if (block.last is !HIf) return;
+    if (block.last is! HIf) return;
     HIf startIf = block.last;
     HBasicBlock end = startIf.joinBlock;
 
@@ -747,9 +746,9 @@
     // If the operation is only used by the first instruction
     // of its block and is safe to be generated at use site, mark it
     // so.
-    if (phi.usedBy.length == 1
-        && phi.usedBy[0] == nextInstruction
-        && isSafeToGenerateAtUseSite(phi.usedBy[0], phi)) {
+    if (phi.usedBy.length == 1 &&
+        phi.usedBy[0] == nextInstruction &&
+        isSafeToGenerateAtUseSite(phi.usedBy[0], phi)) {
       markAsGenerateAtUseSite(phi);
     }
 
diff --git a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
index 8d5e08f..1777d96 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
@@ -2,7 +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.
 
-part of ssa;
+import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
+import '../compiler.dart' show Compiler;
+import '../constants/constant_system.dart';
+import '../constants/values.dart';
+import '../elements/elements.dart';
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart';
+import '../types/types.dart';
+import '../universe/selector.dart' show Selector;
+import '../world.dart' show ClassWorld, World;
+
+import 'nodes.dart';
+import 'optimize.dart';
 
 /**
  * This phase simplifies interceptors in multiple ways:
@@ -84,9 +96,8 @@
     return false;
   }
 
-  bool canUseSelfForInterceptor(HInstruction receiver,
-                                Set<ClassElement> interceptedClasses) {
-
+  bool canUseSelfForInterceptor(
+      HInstruction receiver, Set<ClassElement> interceptedClasses) {
     if (receiver.canBePrimitive(compiler)) {
       // Primitives always need interceptors.
       return false;
@@ -104,8 +115,7 @@
   }
 
   HInstruction tryComputeConstantInterceptor(
-      HInstruction input,
-      Set<ClassElement> interceptedClasses) {
+      HInstruction input, Set<ClassElement> interceptedClasses) {
     if (input == graph.explicitReceiverParameter) {
       // If `explicitReceiverParameter` is set it means the current method is an
       // interceptor method, and `this` is the interceptor.  The caller just did
@@ -131,11 +141,9 @@
   }
 
   ClassElement tryComputeConstantInterceptorFromType(
-      TypeMask type,
-      Set<ClassElement> interceptedClasses) {
-
+      TypeMask type, Set<ClassElement> interceptedClasses) {
     if (type.isNullable) {
-      if (type.isEmpty) {
+      if (type.isNull) {
         return helpers.jsNullClass;
       }
     } else if (type.containsOnlyInt(classWorld)) {
@@ -218,13 +226,13 @@
         node == dominator.receiver &&
         useCount(dominator, node) == 1) {
       interceptedClasses =
-            backend.getInterceptedClassesOn(dominator.selector.name);
+          backend.getInterceptedClassesOn(dominator.selector.name);
 
       // If we found that we need number, we must still go through all
       // uses to check if they require int, or double.
       if (interceptedClasses.contains(helpers.jsNumberClass) &&
           !(interceptedClasses.contains(helpers.jsDoubleClass) ||
-            interceptedClasses.contains(helpers.jsIntClass))) {
+              interceptedClasses.contains(helpers.jsIntClass))) {
         for (HInstruction user in node.usedBy) {
           if (user is! HInvoke) continue;
           Set<ClassElement> intercepted =
@@ -244,14 +252,14 @@
             user.isCallOnInterceptor(compiler) &&
             node == user.receiver &&
             useCount(user, node) == 1) {
-          interceptedClasses.addAll(
-              backend.getInterceptedClassesOn(user.selector.name));
+          interceptedClasses
+              .addAll(backend.getInterceptedClassesOn(user.selector.name));
         } else if (user is HInvokeSuper &&
-                   user.isCallOnInterceptor(compiler) &&
-                   node == user.receiver &&
-                   useCount(user, node) == 1) {
-          interceptedClasses.addAll(
-              backend.getInterceptedClassesOn(user.selector.name));
+            user.isCallOnInterceptor(compiler) &&
+            node == user.receiver &&
+            useCount(user, node) == 1) {
+          interceptedClasses
+              .addAll(backend.getInterceptedClassesOn(user.selector.name));
         } else {
           // Use a most general interceptor for other instructions, example,
           // is-checks and escaping interceptors.
@@ -299,10 +307,9 @@
           ClassElement interceptorClass = tryComputeConstantInterceptorFromType(
               receiver.instructionType.nonNullable(), interceptedClasses);
           if (interceptorClass != null) {
-            HInstruction constantInstruction =
-                graph.addConstant(
-                    new InterceptorConstantValue(interceptorClass.thisType),
-                    compiler);
+            HInstruction constantInstruction = graph.addConstant(
+                new InterceptorConstantValue(interceptorClass.thisType),
+                compiler);
             node.conditionalConstantInterceptor = constantInstruction;
             constantInstruction.usedBy.add(node);
             return false;
@@ -312,7 +319,7 @@
     }
 
     // Try creating a one-shot interceptor or optimized is-check
-    if (compiler.hasIncrementalSupport) return false;
+    if (compiler.options.hasIncrementalSupport) return false;
     if (node.usedBy.length != 1) return false;
     HInstruction user = node.usedBy.single;
 
@@ -346,8 +353,11 @@
         List<HInstruction> inputs = new List<HInstruction>.from(user.inputs);
         inputs[0] = nullConstant;
         HOneShotInterceptor oneShotInterceptor = new HOneShotInterceptor(
-            user.selector, user.mask,
-            inputs, user.instructionType, interceptedClasses);
+            user.selector,
+            user.mask,
+            inputs,
+            user.instructionType,
+            interceptedClasses);
         oneShotInterceptor.sourceInformation = user.sourceInformation;
         oneShotInterceptor.sourceElement = user.sourceElement;
         return replaceUserWith(oneShotInterceptor);
@@ -374,8 +384,8 @@
   }
 
   bool visitOneShotInterceptor(HOneShotInterceptor node) {
-    HInstruction constant = tryComputeConstantInterceptor(
-        node.inputs[1], node.interceptedClasses);
+    HInstruction constant =
+        tryComputeConstantInterceptor(node.inputs[1], node.interceptedClasses);
 
     if (constant == null) return false;
 
@@ -383,12 +393,8 @@
     TypeMask mask = node.mask;
     HInstruction instruction;
     if (selector.isGetter) {
-      instruction = new HInvokeDynamicGetter(
-          selector,
-          mask,
-          node.element,
-          <HInstruction>[constant, node.inputs[1]],
-          node.instructionType);
+      instruction = new HInvokeDynamicGetter(selector, mask, node.element,
+          <HInstruction>[constant, node.inputs[1]], node.instructionType);
     } else if (selector.isSetter) {
       instruction = new HInvokeDynamicSetter(
           selector,
diff --git a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
index 754ed27..ff565f9 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -2,7 +2,18 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of ssa;
+import '../compiler.dart' show Compiler;
+import '../constants/constant_system.dart';
+import '../constants/values.dart';
+import '../elements/elements.dart';
+import '../js_backend/js_backend.dart';
+import '../types/types.dart';
+import '../universe/selector.dart';
+import '../universe/call_structure.dart';
+import '../world.dart' show ClassWorld, World;
+
+import 'nodes.dart';
+import 'types.dart';
 
 /**
  * [InvokeDynamicSpecializer] and its subclasses are helpers to
@@ -13,14 +24,14 @@
 class InvokeDynamicSpecializer {
   const InvokeDynamicSpecializer();
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     return TypeMaskFactory.inferredTypeForSelector(
         instruction.selector, instruction.mask, compiler);
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     return null;
   }
 
@@ -83,18 +94,16 @@
 class IndexAssignSpecializer extends InvokeDynamicSpecializer {
   const IndexAssignSpecializer();
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     if (instruction.inputs[1].isMutableIndexable(compiler)) {
-      if (!instruction.inputs[2].isInteger(compiler)
-          && compiler.enableTypeAssertions) {
+      if (!instruction.inputs[2].isInteger(compiler) &&
+          compiler.options.enableTypeAssertions) {
         // We want the right checked mode error.
         return null;
       }
-      return new HIndexAssign(instruction.inputs[1],
-                              instruction.inputs[2],
-                              instruction.inputs[3],
-                              instruction.selector);
+      return new HIndexAssign(instruction.inputs[1], instruction.inputs[2],
+          instruction.inputs[3], instruction.selector);
     }
     return null;
   }
@@ -103,11 +112,11 @@
 class IndexSpecializer extends InvokeDynamicSpecializer {
   const IndexSpecializer();
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     if (!instruction.inputs[1].isIndexablePrimitive(compiler)) return null;
-    if (!instruction.inputs[2].isInteger(compiler)
-        && compiler.enableTypeAssertions) {
+    if (!instruction.inputs[2].isInteger(compiler) &&
+        compiler.options.enableTypeAssertions) {
       // We want the right checked mode error.
       return null;
     }
@@ -115,8 +124,7 @@
         instruction.getDartReceiver(compiler).instructionType;
     TypeMask type = TypeMaskFactory.inferredTypeForSelector(
         instruction.selector, receiverType, compiler);
-    return new HIndex(
-        instruction.inputs[1], instruction.inputs[2],
+    return new HIndex(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, type);
   }
 }
@@ -128,8 +136,8 @@
     return constantSystem.bitNot;
   }
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     // All bitwise operations on primitive types either produce an
     // integer or throw an error.
     JavaScriptBackend backend = compiler.backend;
@@ -139,12 +147,12 @@
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction input = instruction.inputs[1];
     if (input.isNumber(compiler)) {
       return new HBitNot(input, instruction.selector,
-                         computeTypeFromInputTypes(instruction, compiler));
+          computeTypeFromInputTypes(instruction, compiler));
     }
     return null;
   }
@@ -157,15 +165,15 @@
     return constantSystem.negate;
   }
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     TypeMask operandType = instruction.inputs[1].instructionType;
     if (instruction.inputs[1].isNumberOrNull(compiler)) return operandType;
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction input = instruction.inputs[1];
     if (input.isNumber(compiler)) {
       return new HNegate(input, instruction.selector, input.instructionType);
@@ -177,8 +185,8 @@
 abstract class BinaryArithmeticSpecializer extends InvokeDynamicSpecializer {
   const BinaryArithmeticSpecializer();
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
     JavaScriptBackend backend = compiler.backend;
@@ -195,12 +203,12 @@
   }
 
   bool isBuiltin(HInvokeDynamic instruction, Compiler compiler) {
-    return instruction.inputs[1].isNumber(compiler)
-        && instruction.inputs[2].isNumber(compiler);
+    return instruction.inputs[1].isNumber(compiler) &&
+        instruction.inputs[2].isNumber(compiler);
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     if (isBuiltin(instruction, compiler)) {
       HInstruction builtin = newBuiltinVariant(instruction, compiler);
       if (builtin != null) return builtin;
@@ -221,8 +229,8 @@
   bool inputsArePositiveIntegers(HInstruction instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    return left.isPositiveIntegerOrNull(compiler)
-        && right.isPositiveIntegerOrNull(compiler);
+    return left.isPositiveIntegerOrNull(compiler) &&
+        right.isPositiveIntegerOrNull(compiler);
   }
 
   bool inputsAreUInt31(HInstruction instruction, Compiler compiler) {
@@ -233,9 +241,8 @@
 
   HInstruction newBuiltinVariant(HInvokeDynamic instruction, Compiler compiler);
 
-  Selector renameToOptimizedSelector(String name,
-                                     Selector selector,
-                                     Compiler compiler) {
+  Selector renameToOptimizedSelector(
+      String name, Selector selector, Compiler compiler) {
     if (selector.name == name) return selector;
     JavaScriptBackend backend = compiler.backend;
     return new Selector.call(
@@ -247,8 +254,8 @@
 class AddSpecializer extends BinaryArithmeticSpecializer {
   const AddSpecializer();
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     if (inputsAreUInt31(instruction, compiler)) {
       JavaScriptBackend backend = compiler.backend;
       return backend.uint32Type;
@@ -264,10 +271,9 @@
     return constantSystem.add;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HAdd(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HAdd(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 }
@@ -279,8 +285,8 @@
     return constantSystem.divide;
   }
 
-  TypeMask computeTypeFromInputTypes(HInstruction instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInstruction instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     JavaScriptBackend backend = compiler.backend;
     if (left.isNumberOrNull(compiler)) {
@@ -289,11 +295,10 @@
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
     JavaScriptBackend backend = compiler.backend;
-    return new HDivide(
-        instruction.inputs[1], instruction.inputs[2],
+    return new HDivide(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, backend.doubleType);
   }
 }
@@ -301,8 +306,8 @@
 class ModuloSpecializer extends BinaryArithmeticSpecializer {
   const ModuloSpecializer();
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     if (inputsArePositiveIntegers(instruction, compiler)) {
       JavaScriptBackend backend = compiler.backend;
       return backend.positiveIntType;
@@ -314,8 +319,8 @@
     return constantSystem.modulo;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
     // Modulo cannot be mapped to the native operator (different semantics).
     // TODO(sra): For non-negative values we can use JavaScript's %.
     return null;
@@ -329,8 +334,8 @@
     return constantSystem.multiply;
   }
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     if (inputsArePositiveIntegers(instruction, compiler)) {
       JavaScriptBackend backend = compiler.backend;
       return backend.positiveIntType;
@@ -338,10 +343,9 @@
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HMultiply(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HMultiply(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 }
@@ -353,10 +357,9 @@
     return constantSystem.subtract;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HSubtract(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HSubtract(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 }
@@ -368,8 +371,8 @@
     return constantSystem.truncatingDivide;
   }
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     JavaScriptBackend backend = compiler.backend;
     if (hasUint31Result(instruction, compiler)) {
       return backend.uint31Type;
@@ -410,8 +413,8 @@
     return false;
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction right = instruction.inputs[2];
     if (isBuiltin(instruction, compiler)) {
       if (right.isPositiveInteger(compiler) && isNotZero(right, compiler)) {
@@ -428,10 +431,9 @@
     return null;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HTruncatingDivide(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HTruncatingDivide(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 }
@@ -439,8 +441,8 @@
 abstract class BinaryBitOpSpecializer extends BinaryArithmeticSpecializer {
   const BinaryBitOpSpecializer();
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     // All bitwise operations on primitive types either produce an
     // integer or throw an error.
     HInstruction left = instruction.inputs[1];
@@ -473,8 +475,8 @@
     return constantSystem.shiftLeft;
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
     if (left.isNumber(compiler)) {
@@ -493,10 +495,9 @@
     return null;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HShiftLeft(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HShiftLeft(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 }
@@ -504,15 +505,15 @@
 class ShiftRightSpecializer extends BinaryBitOpSpecializer {
   const ShiftRightSpecializer();
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     if (left.isUInt32(compiler)) return left.instructionType;
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
     if (left.isNumber(compiler)) {
@@ -537,10 +538,9 @@
     return null;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HShiftRight(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HShiftRight(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 
@@ -556,8 +556,8 @@
     return constantSystem.bitOr;
   }
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
     JavaScriptBackend backend = compiler.backend;
@@ -567,10 +567,9 @@
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HBitOr(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HBitOr(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 }
@@ -582,8 +581,8 @@
     return constantSystem.bitAnd;
   }
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
     JavaScriptBackend backend = compiler.backend;
@@ -594,10 +593,9 @@
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HBitAnd(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HBitAnd(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 }
@@ -609,8 +607,8 @@
     return constantSystem.bitXor;
   }
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
     JavaScriptBackend backend = compiler.backend;
@@ -620,10 +618,9 @@
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
-    return new HBitXor(
-        instruction.inputs[1], instruction.inputs[2],
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
+    return new HBitXor(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, computeTypeFromInputTypes(instruction, compiler));
   }
 }
@@ -631,8 +628,8 @@
 abstract class RelationalSpecializer extends InvokeDynamicSpecializer {
   const RelationalSpecializer();
 
-  TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
-                                     Compiler compiler) {
+  TypeMask computeTypeFromInputTypes(
+      HInvokeDynamic instruction, Compiler compiler) {
     JavaScriptBackend backend = compiler.backend;
     if (instruction.inputs[1].isPrimitiveOrNull(compiler)) {
       return backend.boolType;
@@ -640,8 +637,8 @@
     return super.computeTypeFromInputTypes(instruction, compiler);
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
     if (left.isNumber(compiler) && right.isNumber(compiler)) {
@@ -656,8 +653,8 @@
 class EqualsSpecializer extends RelationalSpecializer {
   const EqualsSpecializer();
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
     TypeMask instructionType = left.instructionType;
@@ -666,8 +663,8 @@
     }
     World world = compiler.world;
     JavaScriptBackend backend = compiler.backend;
-    Iterable<Element> matches = world.allFunctions.filter(
-        instruction.selector, instructionType);
+    Iterable<Element> matches =
+        world.allFunctions.filter(instruction.selector, instructionType);
     // This test relies the on `Object.==` and `Interceptor.==` always being
     // implemented because if the selector matches by subtype, it still will be
     // a regular object or an interceptor.
@@ -681,11 +678,10 @@
     return constantSystem.equal;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
     JavaScriptBackend backend = compiler.backend;
-    return new HIdentity(
-        instruction.inputs[1], instruction.inputs[2],
+    return new HIdentity(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, backend.boolType);
   }
 }
@@ -697,11 +693,10 @@
     return constantSystem.less;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
     JavaScriptBackend backend = compiler.backend;
-    return new HLess(
-        instruction.inputs[1], instruction.inputs[2],
+    return new HLess(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, backend.boolType);
   }
 }
@@ -713,11 +708,10 @@
     return constantSystem.greater;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
     JavaScriptBackend backend = compiler.backend;
-    return new HGreater(
-        instruction.inputs[1], instruction.inputs[2],
+    return new HGreater(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, backend.boolType);
   }
 }
@@ -729,11 +723,10 @@
     return constantSystem.greaterEqual;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
     JavaScriptBackend backend = compiler.backend;
-    return new HGreaterEqual(
-        instruction.inputs[1], instruction.inputs[2],
+    return new HGreaterEqual(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, backend.boolType);
   }
 }
@@ -745,11 +738,10 @@
     return constantSystem.lessEqual;
   }
 
-  HInstruction newBuiltinVariant(HInvokeDynamic instruction,
-                                 Compiler compiler) {
+  HInstruction newBuiltinVariant(
+      HInvokeDynamic instruction, Compiler compiler) {
     JavaScriptBackend backend = compiler.backend;
-    return new HLessEqual(
-        instruction.inputs[1], instruction.inputs[2],
+    return new HLessEqual(instruction.inputs[1], instruction.inputs[2],
         instruction.selector, backend.boolType);
   }
 }
@@ -761,8 +753,8 @@
     return constantSystem.codeUnitAt;
   }
 
-  HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
-                                   Compiler compiler) {
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction, Compiler compiler) {
     // TODO(sra): Implement a builtin HCodeUnitAt instruction and the same index
     // bounds checking optimizations as for HIndex.
     return null;
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index c279da9..a779457 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -2,7 +2,28 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of ssa;
+import '../closure.dart';
+import '../common.dart';
+import '../compiler.dart' show Compiler;
+import '../constants/constant_system.dart';
+import '../constants/values.dart';
+import '../dart_types.dart';
+import '../elements/elements.dart';
+import '../io/source_information.dart';
+import '../js/js.dart' as js;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart';
+import '../native/native.dart' as native;
+import '../tree/dartstring.dart' as ast;
+import '../types/constants.dart' show computeTypeMask;
+import '../types/types.dart';
+import '../universe/selector.dart' show Selector;
+import '../universe/side_effects.dart' show SideEffects;
+import '../util/util.dart';
+import '../world.dart' show ClassWorld, World;
+
+import 'validate.dart';
+import 'invoke_dynamic_specializers.dart';
 
 abstract class HVisitor<R> {
   R visitAdd(HAdd node);
@@ -130,10 +151,11 @@
 }
 
 class HGraph {
-  Element element;  // Used for debug printing.
+  Element element; // Used for debug printing.
   HBasicBlock entry;
   HBasicBlock exit;
   HThis thisInstruction;
+
   /// Receiver parameter, set for methods using interceptor calling convention.
   HParameterValue explicitReceiverParameter;
   bool isRecursiveMethod = false;
@@ -165,22 +187,21 @@
     return result;
   }
 
-  HBasicBlock addNewLoopHeaderBlock(JumpTarget target,
-                                    List<LabelDefinition> labels) {
+  HBasicBlock addNewLoopHeaderBlock(
+      JumpTarget target, List<LabelDefinition> labels) {
     HBasicBlock result = addNewBlock();
-    result.loopInformation =
-        new HLoopInformation(result, target, labels);
+    result.loopInformation = new HLoopInformation(result, target, labels);
     return result;
   }
 
   HConstant addConstant(ConstantValue constant, Compiler compiler,
-                        {SourceInformation sourceInformation}) {
+      {SourceInformation sourceInformation}) {
     HConstant result = constants[constant];
     // TODO(johnniwinther): Support source information per constant reference.
     if (result == null) {
       TypeMask type = computeTypeMask(compiler, constant);
       result = new HConstant.internal(constant, type)
-          ..sourceInformation = sourceInformation;
+        ..sourceInformation = sourceInformation;
       entry.addAtExit(result);
       constants[constant] = result;
     } else if (result.block == null) {
@@ -191,8 +212,7 @@
   }
 
   HConstant addDeferredConstant(ConstantValue constant, PrefixElement prefix,
-                                SourceInformation sourceInformation,
-                                Compiler compiler) {
+      SourceInformation sourceInformation, Compiler compiler) {
     // TODO(sigurdm,johnniwinter): These deferred constants should be created
     // by the constant evaluator.
     ConstantValue wrapper = new DeferredConstantValue(constant, prefix);
@@ -209,18 +229,15 @@
         compiler.backend.constantSystem.createDouble(d), compiler);
   }
 
-  HConstant addConstantString(ast.DartString str,
-                              Compiler compiler) {
+  HConstant addConstantString(ast.DartString str, Compiler compiler) {
     return addConstant(
-        compiler.backend.constantSystem.createString(str),
-        compiler);
+        compiler.backend.constantSystem.createString(str), compiler);
   }
 
-  HConstant addConstantStringFromName(js.Name name,
-                                      Compiler compiler) {
+  HConstant addConstantStringFromName(js.Name name, Compiler compiler) {
     return addConstant(
-        new SyntheticConstantValue(SyntheticConstantKind.NAME,
-                                   js.quoteName(name)),
+        new SyntheticConstantValue(
+            SyntheticConstantKind.NAME, js.quoteName(name)),
         compiler);
   }
 
@@ -319,16 +336,15 @@
   visitIndex(HIndex node) => visitInstruction(node);
   visitIndexAssign(HIndexAssign node) => visitInstruction(node);
   visitInterceptor(HInterceptor node) => visitInstruction(node);
-  visitInvokeClosure(HInvokeClosure node)
-      => visitInvokeDynamic(node);
-  visitInvokeConstructorBody(HInvokeConstructorBody node)
-      => visitInvokeStatic(node);
-  visitInvokeDynamicMethod(HInvokeDynamicMethod node)
-      => visitInvokeDynamic(node);
-  visitInvokeDynamicGetter(HInvokeDynamicGetter node)
-      => visitInvokeDynamicField(node);
-  visitInvokeDynamicSetter(HInvokeDynamicSetter node)
-      => visitInvokeDynamicField(node);
+  visitInvokeClosure(HInvokeClosure node) => visitInvokeDynamic(node);
+  visitInvokeConstructorBody(HInvokeConstructorBody node) =>
+      visitInvokeStatic(node);
+  visitInvokeDynamicMethod(HInvokeDynamicMethod node) =>
+      visitInvokeDynamic(node);
+  visitInvokeDynamicGetter(HInvokeDynamicGetter node) =>
+      visitInvokeDynamicField(node);
+  visitInvokeDynamicSetter(HInvokeDynamicSetter node) =>
+      visitInvokeDynamicField(node);
   visitInvokeStatic(HInvokeStatic node) => visitInvoke(node);
   visitInvokeSuper(HInvokeSuper node) => visitInvokeStatic(node);
   visitJump(HJump node) => visitControlFlow(node);
@@ -343,8 +359,7 @@
   visitLoopBranch(HLoopBranch node) => visitConditionalBranch(node);
   visitNegate(HNegate node) => visitInvokeUnary(node);
   visitNot(HNot node) => visitInstruction(node);
-  visitOneShotInterceptor(HOneShotInterceptor node)
-      => visitInvokeDynamic(node);
+  visitOneShotInterceptor(HOneShotInterceptor node) => visitInvokeDynamic(node);
   visitPhi(HPhi node) => visitInstruction(node);
   visitMultiply(HMultiply node) => visitBinaryArithmetic(node);
   visitParameterValue(HParameterValue node) => visitLocalValue(node);
@@ -394,8 +409,7 @@
 }
 
 class SubExpression extends SubGraph {
-  const SubExpression(HBasicBlock start, HBasicBlock end)
-      : super(start, end);
+  const SubExpression(HBasicBlock start, HBasicBlock end) : super(start, end);
 
   /** Find the condition expression if this sub-expression is a condition. */
   HInstruction get conditionExpression {
@@ -523,8 +537,7 @@
   }
 
   bool isLabeledBlock() =>
-    blockFlow != null &&
-    blockFlow.body is HLabeledBlockInformation;
+      blockFlow != null && blockFlow.body is HLabeledBlockInformation;
 
   HBasicBlock get enclosingLoopHeader {
     if (isLoopHeader()) return this;
@@ -543,7 +556,7 @@
   }
 
   void addAtEntry(HInstruction instruction) {
-    assert(instruction is !HPhi);
+    assert(instruction is! HPhi);
     internalAddBefore(first, instruction);
     instruction.notifyAddedToBlock(this);
   }
@@ -551,13 +564,13 @@
   void addAtExit(HInstruction instruction) {
     assert(isClosed());
     assert(last is HControlFlow);
-    assert(instruction is !HPhi);
+    assert(instruction is! HPhi);
     internalAddBefore(last, instruction);
     instruction.notifyAddedToBlock(this);
   }
 
   void moveAtExit(HInstruction instruction) {
-    assert(instruction is !HPhi);
+    assert(instruction is! HPhi);
     assert(instruction.isInBasicBlock());
     assert(isClosed());
     assert(last is HControlFlow);
@@ -567,8 +580,8 @@
   }
 
   void add(HInstruction instruction) {
-    assert(instruction is !HControlFlow);
-    assert(instruction is !HPhi);
+    assert(instruction is! HControlFlow);
+    assert(instruction is! HPhi);
     internalAddAfter(last, instruction);
     instruction.notifyAddedToBlock(this);
   }
@@ -587,16 +600,16 @@
   }
 
   void addAfter(HInstruction cursor, HInstruction instruction) {
-    assert(cursor is !HPhi);
-    assert(instruction is !HPhi);
+    assert(cursor is! HPhi);
+    assert(instruction is! HPhi);
     assert(isOpen() || isClosed());
     internalAddAfter(cursor, instruction);
     instruction.notifyAddedToBlock(this);
   }
 
   void addBefore(HInstruction cursor, HInstruction instruction) {
-    assert(cursor is !HPhi);
-    assert(instruction is !HPhi);
+    assert(cursor is! HPhi);
+    assert(instruction is! HPhi);
     assert(isOpen() || isClosed());
     internalAddBefore(cursor, instruction);
     instruction.notifyAddedToBlock(this);
@@ -604,7 +617,7 @@
 
   void remove(HInstruction instruction) {
     assert(isOpen() || isClosed());
-    assert(instruction is !HPhi);
+    assert(instruction is! HPhi);
     super.remove(instruction);
     assert(instruction.block == this);
     instruction.notifyRemovedFromBlock();
@@ -838,14 +851,17 @@
   static const int IS_VIA_INTERCEPTOR_TYPECODE = 37;
 
   HInstruction(this.inputs, this.instructionType)
-      : id = idCounter++, usedBy = <HInstruction>[] {
+      : id = idCounter++,
+        usedBy = <HInstruction>[] {
     assert(inputs.every((e) => e != null));
   }
 
   int get hashCode => id;
 
   bool useGvn() => _useGvn;
-  void setUseGvn() { _useGvn = true; }
+  void setUseGvn() {
+    _useGvn = true;
+  }
 
   bool get isMovable => useGvn();
 
@@ -855,9 +871,9 @@
    * graph.
    */
   bool isPure() {
-    return !sideEffects.hasSideEffects()
-        && !sideEffects.dependsOnSomething()
-        && !canThrow();
+    return !sideEffects.hasSideEffects() &&
+        !sideEffects.dependsOnSomething() &&
+        !canThrow();
   }
 
   /// An instruction is an 'allocation' is it is the sole alias for an object.
@@ -881,43 +897,34 @@
 
   bool canBeNull() => instructionType.isNullable;
 
-  bool isNull() => instructionType.isEmpty && instructionType.isNullable;
-  bool isConflicting() {
-    return instructionType.isEmpty && !instructionType.isNullable;
-  }
+  bool isNull() => instructionType.isNull;
+
+  bool isConflicting() => instructionType.isEmpty;
 
   /// Returns `true` if [typeMask] contains [cls].
   static bool containsType(
-      TypeMask typeMask,
-      ClassElement cls,
-      ClassWorld classWorld) {
+      TypeMask typeMask, ClassElement cls, ClassWorld classWorld) {
     return classWorld.isInstantiated(cls) && typeMask.contains(cls, classWorld);
   }
 
   /// Returns `true` if [typeMask] contains only [cls].
   static bool containsOnlyType(
-      TypeMask typeMask,
-      ClassElement cls,
-      ClassWorld classWorld) {
-    return classWorld.isInstantiated(cls) &&
-        typeMask.containsOnly(cls);
+      TypeMask typeMask, ClassElement cls, ClassWorld classWorld) {
+    return classWorld.isInstantiated(cls) && typeMask.containsOnly(cls);
   }
 
   /// Returns `true` if [typeMask] is an instance of [cls].
   static bool isInstanceOf(
-      TypeMask typeMask,
-      ClassElement cls,
-      ClassWorld classWorld) {
-    return classWorld.isImplemented(cls) &&
-        typeMask.satisfies(cls, classWorld);
+      TypeMask typeMask, ClassElement cls, ClassWorld classWorld) {
+    return classWorld.isImplemented(cls) && typeMask.satisfies(cls, classWorld);
   }
 
   bool canBePrimitive(Compiler compiler) {
-    return canBePrimitiveNumber(compiler)
-        || canBePrimitiveArray(compiler)
-        || canBePrimitiveBoolean(compiler)
-        || canBePrimitiveString(compiler)
-        || isNull();
+    return canBePrimitiveNumber(compiler) ||
+        canBePrimitiveArray(compiler) ||
+        canBePrimitiveBoolean(compiler) ||
+        canBePrimitiveString(compiler) ||
+        isNull();
   }
 
   bool canBePrimitiveNumber(Compiler compiler) {
@@ -926,12 +933,12 @@
     BackendHelpers helpers = backend.helpers;
     // TODO(sra): It should be possible to test only jsDoubleClass and
     // jsUInt31Class, since all others are superclasses of these two.
-    return containsType(instructionType, helpers.jsNumberClass, classWorld)
-        || containsType(instructionType, helpers.jsIntClass, classWorld)
-        || containsType(instructionType, helpers.jsPositiveIntClass, classWorld)
-        || containsType(instructionType, helpers.jsUInt32Class, classWorld)
-        || containsType(instructionType, helpers.jsUInt31Class, classWorld)
-        || containsType(instructionType, helpers.jsDoubleClass, classWorld);
+    return containsType(instructionType, helpers.jsNumberClass, classWorld) ||
+        containsType(instructionType, helpers.jsIntClass, classWorld) ||
+        containsType(instructionType, helpers.jsPositiveIntClass, classWorld) ||
+        containsType(instructionType, helpers.jsUInt32Class, classWorld) ||
+        containsType(instructionType, helpers.jsUInt31Class, classWorld) ||
+        containsType(instructionType, helpers.jsDoubleClass, classWorld);
   }
 
   bool canBePrimitiveBoolean(Compiler compiler) {
@@ -945,20 +952,20 @@
     ClassWorld classWorld = compiler.world;
     JavaScriptBackend backend = compiler.backend;
     BackendHelpers helpers = backend.helpers;
-    return containsType(instructionType, helpers.jsArrayClass, classWorld)
-        || containsType(instructionType, helpers.jsFixedArrayClass, classWorld)
-        || containsType(
-            instructionType, helpers.jsExtendableArrayClass, classWorld)
-        || containsType(instructionType,
-            helpers.jsUnmodifiableArrayClass, classWorld);
+    return containsType(instructionType, helpers.jsArrayClass, classWorld) ||
+        containsType(instructionType, helpers.jsFixedArrayClass, classWorld) ||
+        containsType(
+            instructionType, helpers.jsExtendableArrayClass, classWorld) ||
+        containsType(
+            instructionType, helpers.jsUnmodifiableArrayClass, classWorld);
   }
 
   bool isIndexablePrimitive(Compiler compiler) {
     ClassWorld classWorld = compiler.world;
     JavaScriptBackend backend = compiler.backend;
     BackendHelpers helpers = backend.helpers;
-    return instructionType.containsOnlyString(classWorld)
-        || isInstanceOf(instructionType, helpers.jsIndexableClass, classWorld);
+    return instructionType.containsOnlyString(classWorld) ||
+        isInstanceOf(instructionType, helpers.jsIndexableClass, classWorld);
   }
 
   bool isFixedArray(Compiler compiler) {
@@ -967,8 +974,8 @@
     BackendHelpers helpers = backend.helpers;
     // TODO(sra): Recognize the union of these types as well.
     return containsOnlyType(
-            instructionType, helpers.jsFixedArrayClass, classWorld)
-        || containsOnlyType(
+            instructionType, helpers.jsFixedArrayClass, classWorld) ||
+        containsOnlyType(
             instructionType, helpers.jsUnmodifiableArrayClass, classWorld);
   }
 
@@ -999,8 +1006,8 @@
     ClassWorld classWorld = compiler.world;
     JavaScriptBackend backend = compiler.backend;
     BackendHelpers helpers = backend.helpers;
-    return isInstanceOf(instructionType,
-        helpers.jsMutableIndexableClass, classWorld);
+    return isInstanceOf(
+        instructionType, helpers.jsMutableIndexableClass, classWorld);
   }
 
   bool isArray(Compiler compiler) => isReadableArray(compiler);
@@ -1014,24 +1021,24 @@
 
   bool isInteger(Compiler compiler) {
     ClassWorld classWorld = compiler.world;
-    return instructionType.containsOnlyInt(classWorld)
-        && !instructionType.isNullable;
+    return instructionType.containsOnlyInt(classWorld) &&
+        !instructionType.isNullable;
   }
 
   bool isUInt32(Compiler compiler) {
     ClassWorld classWorld = compiler.world;
     JavaScriptBackend backend = compiler.backend;
     BackendHelpers helpers = backend.helpers;
-    return !instructionType.isNullable
-        && isInstanceOf(instructionType, helpers.jsUInt32Class, classWorld);
+    return !instructionType.isNullable &&
+        isInstanceOf(instructionType, helpers.jsUInt32Class, classWorld);
   }
 
   bool isUInt31(Compiler compiler) {
     ClassWorld classWorld = compiler.world;
     JavaScriptBackend backend = compiler.backend;
     BackendHelpers helpers = backend.helpers;
-    return !instructionType.isNullable
-        && isInstanceOf(instructionType, helpers.jsUInt31Class, classWorld);
+    return !instructionType.isNullable &&
+        isInstanceOf(instructionType, helpers.jsUInt31Class, classWorld);
   }
 
   bool isPositiveInteger(Compiler compiler) {
@@ -1057,8 +1064,8 @@
 
   bool isNumber(Compiler compiler) {
     ClassWorld classWorld = compiler.world;
-    return instructionType.containsOnlyNum(classWorld)
-        && !instructionType.isNullable;
+    return instructionType.containsOnlyNum(classWorld) &&
+        !instructionType.isNullable;
   }
 
   bool isNumberOrNull(Compiler compiler) {
@@ -1068,8 +1075,8 @@
 
   bool isDouble(Compiler compiler) {
     ClassWorld classWorld = compiler.world;
-    return instructionType.containsOnlyDouble(classWorld)
-        && !instructionType.isNullable;
+    return instructionType.containsOnlyDouble(classWorld) &&
+        !instructionType.isNullable;
   }
 
   bool isDoubleOrNull(Compiler compiler) {
@@ -1079,8 +1086,8 @@
 
   bool isBoolean(Compiler compiler) {
     ClassWorld classWorld = compiler.world;
-    return instructionType.containsOnlyBool(classWorld)
-        && !instructionType.isNullable;
+    return instructionType.containsOnlyBool(classWorld) &&
+        !instructionType.isNullable;
   }
 
   bool isBooleanOrNull(Compiler compiler) {
@@ -1090,8 +1097,8 @@
 
   bool isString(Compiler compiler) {
     ClassWorld classWorld = compiler.world;
-    return instructionType.containsOnlyString(classWorld)
-        && !instructionType.isNullable;
+    return instructionType.containsOnlyString(classWorld) &&
+        !instructionType.isNullable;
   }
 
   bool isStringOrNull(Compiler compiler) {
@@ -1100,15 +1107,15 @@
   }
 
   bool isPrimitive(Compiler compiler) {
-    return (isPrimitiveOrNull(compiler) && !instructionType.isNullable)
-        || isNull();
+    return (isPrimitiveOrNull(compiler) && !instructionType.isNullable) ||
+        isNull();
   }
 
   bool isPrimitiveOrNull(Compiler compiler) {
-    return isIndexablePrimitive(compiler)
-        || isNumberOrNull(compiler)
-        || isBooleanOrNull(compiler)
-        || isNull();
+    return isIndexablePrimitive(compiler) ||
+        isNumberOrNull(compiler) ||
+        isBooleanOrNull(compiler) ||
+        isNull();
   }
 
   /**
@@ -1271,8 +1278,8 @@
     return users;
   }
 
-  void replaceAllUsersDominatedBy(HInstruction cursor,
-                                  HInstruction newInstruction) {
+  void replaceAllUsersDominatedBy(
+      HInstruction cursor, HInstruction newInstruction) {
     Setlet<HInstruction> users = dominatedUsers(cursor);
     for (HInstruction user in users) {
       user.changeUse(this, newInstruction);
@@ -1280,9 +1287,9 @@
   }
 
   void moveBefore(HInstruction other) {
-    assert(this is !HControlFlow);
-    assert(this is !HPhi);
-    assert(other is !HPhi);
+    assert(this is! HControlFlow);
+    assert(this is! HPhi);
+    assert(other is! HPhi);
     block.detach(this);
     other.block.internalAddBefore(other, this);
     block = other.block;
@@ -1346,8 +1353,8 @@
     } else if (kind == HTypeConversion.CHECKED_MODE_CHECK && !type.treatAsRaw) {
       throw 'creating compound check to $type (this = ${this})';
     } else {
-      TypeMask subtype = new TypeMask.subtype(element.declaration,
-                                              compiler.world);
+      TypeMask subtype =
+          new TypeMask.subtype(element.declaration, compiler.world);
       return new HTypeConversion(type, kind, subtype, this);
     }
   }
@@ -1489,8 +1496,7 @@
     // We know it's a selector call if it follows the interceptor
     // calling convention, which adds the actual receiver as a
     // parameter to the call.
-    return (selector != null) &&
-           (inputs.length - 2 == selector.argumentCount);
+    return (selector != null) && (inputs.length - 2 == selector.argumentCount);
   }
 }
 
@@ -1500,17 +1506,14 @@
   TypeMask mask;
   Element element;
 
-  HInvokeDynamic(Selector selector,
-                 this.mask,
-                 this.element,
-                 List<HInstruction> inputs,
-                 TypeMask type,
-                 [bool isIntercepted = false])
-    : super(inputs, type),
-      this.selector = selector,
-      specializer = isIntercepted
-          ? InvokeDynamicSpecializer.lookupSpecializer(selector)
-          : const InvokeDynamicSpecializer();
+  HInvokeDynamic(Selector selector, this.mask, this.element,
+      List<HInstruction> inputs, TypeMask type,
+      [bool isIntercepted = false])
+      : super(inputs, type),
+        this.selector = selector,
+        specializer = isIntercepted
+            ? InvokeDynamicSpecializer.lookupSpecializer(selector)
+            : const InvokeDynamicSpecializer();
   toString() => 'invoke dynamic: selector=$selector, mask=$mask';
   HInstruction get receiver => inputs[0];
   HInstruction getDartReceiver(Compiler compiler) {
@@ -1530,15 +1533,13 @@
     // Use the name and the kind instead of [Selector.operator==]
     // because we don't need to check the arity (already checked in
     // [gvnEquals]), and the receiver types may not be in sync.
-    return selector.name == other.selector.name
-        && selector.kind == other.selector.kind;
+    return selector.name == other.selector.name &&
+        selector.kind == other.selector.kind;
   }
 }
 
 class HInvokeClosure extends HInvokeDynamic {
-  HInvokeClosure(Selector selector,
-                 List<HInstruction> inputs,
-                 TypeMask type)
+  HInvokeClosure(Selector selector, List<HInstruction> inputs, TypeMask type)
       : super(selector, null, null, inputs, type) {
     assert(selector.isClosureCall);
   }
@@ -1546,38 +1547,34 @@
 }
 
 class HInvokeDynamicMethod extends HInvokeDynamic {
-  HInvokeDynamicMethod(Selector selector,
-                       TypeMask mask,
-                       List<HInstruction> inputs,
-                       TypeMask type,
-                       [bool isIntercepted = false])
-    : super(selector, mask, null, inputs, type, isIntercepted);
+  HInvokeDynamicMethod(Selector selector, TypeMask mask,
+      List<HInstruction> inputs, TypeMask type,
+      [bool isIntercepted = false])
+      : super(selector, mask, null, inputs, type, isIntercepted);
 
   String toString() => 'invoke dynamic method: selector=$selector, mask=$mask';
   accept(HVisitor visitor) => visitor.visitInvokeDynamicMethod(this);
 }
 
 abstract class HInvokeDynamicField extends HInvokeDynamic {
-  HInvokeDynamicField(
-      Selector selector, TypeMask mask,
-      Element element, List<HInstruction> inputs,
-      TypeMask type)
+  HInvokeDynamicField(Selector selector, TypeMask mask, Element element,
+      List<HInstruction> inputs, TypeMask type)
       : super(selector, mask, element, inputs, type);
   toString() => 'invoke dynamic field: selector=$selector, mask=$mask';
 }
 
 class HInvokeDynamicGetter extends HInvokeDynamicField {
-  HInvokeDynamicGetter(Selector selector, TypeMask mask,
-      Element element, List<HInstruction> inputs, TypeMask type)
-    : super(selector, mask, element, inputs, type);
+  HInvokeDynamicGetter(Selector selector, TypeMask mask, Element element,
+      List<HInstruction> inputs, TypeMask type)
+      : super(selector, mask, element, inputs, type);
   toString() => 'invoke dynamic getter: selector=$selector, mask=$mask';
   accept(HVisitor visitor) => visitor.visitInvokeDynamicGetter(this);
 }
 
 class HInvokeDynamicSetter extends HInvokeDynamicField {
-  HInvokeDynamicSetter(Selector selector, TypeMask mask,
-      Element element, List<HInstruction> inputs, TypeMask type)
-    : super(selector, mask, element, inputs, type);
+  HInvokeDynamicSetter(Selector selector, TypeMask mask, Element element,
+      List<HInstruction> inputs, TypeMask type)
+      : super(selector, mask, element, inputs, type);
   toString() => 'invoke dynamic setter: selector=$selector, mask=$mask';
   accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this);
 }
@@ -1597,8 +1594,8 @@
 
   /** The first input must be the target. */
   HInvokeStatic(this.element, inputs, TypeMask type,
-                {this.targetCanThrow: true})
-    : super(inputs, type);
+      {this.targetCanThrow: true})
+      : super(inputs, type);
 
   toString() => 'invoke static: $element';
   accept(HVisitor visitor) => visitor.visitInvokeStatic(this);
@@ -1611,13 +1608,9 @@
   final bool isSetter;
   final Selector selector;
 
-  HInvokeSuper(Element element,
-               this.caller,
-               this.selector,
-               inputs,
-               type,
-               SourceInformation sourceInformation,
-               {this.isSetter})
+  HInvokeSuper(Element element, this.caller, this.selector, inputs, type,
+      SourceInformation sourceInformation,
+      {this.isSetter})
       : super(element, inputs, type) {
     this.sourceInformation = sourceInformation;
   }
@@ -1648,8 +1641,7 @@
   // The 'inputs' are
   //     [receiver, arg1, ..., argN] or
   //     [interceptor, receiver, arg1, ... argN].
-  HInvokeConstructorBody(element, inputs, type)
-      : super(element, inputs, type);
+  HInvokeConstructorBody(element, inputs, type) : super(element, inputs, type);
 
   String toString() => 'invoke constructor body: ${element.name}';
   accept(HVisitor visitor) => visitor.visitInvokeConstructorBody(this);
@@ -1659,7 +1651,8 @@
   final Element element;
 
   HFieldAccess(Element element, List<HInstruction> inputs, TypeMask type)
-      : this.element = element, super(inputs, type);
+      : this.element = element,
+        super(inputs, type);
 
   HInstruction get receiver => inputs[0];
 }
@@ -1667,13 +1660,10 @@
 class HFieldGet extends HFieldAccess {
   final bool isAssignable;
 
-  HFieldGet(Element element,
-            HInstruction receiver,
-            TypeMask type,
-            {bool isAssignable})
-      : this.isAssignable = (isAssignable != null)
-            ? isAssignable
-            : element.isAssignable,
+  HFieldGet(Element element, HInstruction receiver, TypeMask type,
+      {bool isAssignable})
+      : this.isAssignable =
+            (isAssignable != null) ? isAssignable : element.isAssignable,
         super(element, <HInstruction>[receiver], type) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
@@ -1711,11 +1701,9 @@
 }
 
 class HFieldSet extends HFieldAccess {
-  HFieldSet(Element element,
-            HInstruction receiver,
-            HInstruction value)
+  HFieldSet(Element element, HInstruction receiver, HInstruction value)
       : super(element, <HInstruction>[receiver, value],
-              const TypeMask.nonNullEmpty()) {
+            const TypeMask.nonNullEmpty()) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     sideEffects.setChangesInstanceProperty();
@@ -1745,7 +1733,7 @@
   final String jsOp;
   final int opKind;
 
-   HReadModifyWrite._(Element this.element, this.jsOp, this.opKind,
+  HReadModifyWrite._(Element this.element, this.jsOp, this.opKind,
       List<HInstruction> inputs, TypeMask type)
       : super(inputs, type) {
     sideEffects.clearAllSideEffects();
@@ -1754,17 +1742,17 @@
     sideEffects.setDependsOnInstancePropertyStore();
   }
 
-  HReadModifyWrite.assignOp(Element element, String jsOp,
-      HInstruction receiver, HInstruction operand, TypeMask type)
-      : this._(element, jsOp, ASSIGN_OP,
-               <HInstruction>[receiver, operand], type);
+  HReadModifyWrite.assignOp(Element element, String jsOp, HInstruction receiver,
+      HInstruction operand, TypeMask type)
+      : this._(
+            element, jsOp, ASSIGN_OP, <HInstruction>[receiver, operand], type);
 
-  HReadModifyWrite.preOp(Element element, String jsOp,
-      HInstruction receiver, TypeMask type)
+  HReadModifyWrite.preOp(
+      Element element, String jsOp, HInstruction receiver, TypeMask type)
       : this._(element, jsOp, PRE_OP, <HInstruction>[receiver], type);
 
-  HReadModifyWrite.postOp(Element element, String jsOp,
-      HInstruction receiver, TypeMask type)
+  HReadModifyWrite.postOp(
+      Element element, String jsOp, HInstruction receiver, TypeMask type)
       : this._(element, jsOp, POST_OP, <HInstruction>[receiver], type);
 
   HInstruction get receiver => inputs[0];
@@ -1798,7 +1786,7 @@
   // No need to use GVN for a [HLocalGet], it is just a local
   // access.
   HLocalGet(Local variable, HLocalValue local, TypeMask type,
-            SourceInformation sourceInformation)
+      SourceInformation sourceInformation)
       : super(variable, <HInstruction>[local], type) {
     this.sourceInformation = sourceInformation;
   }
@@ -1811,7 +1799,7 @@
 class HLocalSet extends HLocalAccess {
   HLocalSet(Local variable, HLocalValue local, HInstruction value)
       : super(variable, <HInstruction>[local, value],
-              const TypeMask.nonNullEmpty());
+            const TypeMask.nonNullEmpty());
 
   accept(HVisitor visitor) => visitor.visitLocalSet(this);
 
@@ -1827,8 +1815,7 @@
   native.NativeBehavior get nativeBehavior => null;
 
   bool canThrow() {
-    return sideEffects.hasSideEffects()
-        || sideEffects.dependsOnSomething();
+    return sideEffects.hasSideEffects() || sideEffects.dependsOnSomething();
   }
 }
 
@@ -1838,13 +1825,11 @@
   final native.NativeBehavior nativeBehavior;
   native.NativeThrowBehavior throwBehavior;
 
-  HForeignCode(this.codeTemplate,
-      TypeMask type,
-      List<HInstruction> inputs,
+  HForeignCode(this.codeTemplate, TypeMask type, List<HInstruction> inputs,
       {this.isStatement: false,
-       SideEffects effects,
-       native.NativeBehavior nativeBehavior,
-       native.NativeThrowBehavior throwBehavior})
+      SideEffects effects,
+      native.NativeBehavior nativeBehavior,
+      native.NativeThrowBehavior throwBehavior})
       : this.nativeBehavior = nativeBehavior,
         this.throwBehavior = throwBehavior,
         super(type, inputs) {
@@ -1863,24 +1848,22 @@
   }
 
   HForeignCode.statement(js.Template codeTemplate, List<HInstruction> inputs,
-      SideEffects effects,
-      native.NativeBehavior nativeBehavior,
-      TypeMask type)
-      : this(codeTemplate, type, inputs, isStatement: true,
-             effects: effects, nativeBehavior: nativeBehavior);
+      SideEffects effects, native.NativeBehavior nativeBehavior, TypeMask type)
+      : this(codeTemplate, type, inputs,
+            isStatement: true,
+            effects: effects,
+            nativeBehavior: nativeBehavior);
 
   accept(HVisitor visitor) => visitor.visitForeignCode(this);
 
   bool isJsStatement() => isStatement;
-  bool canThrow() => canBeNull()
-      ? throwBehavior.canThrow
-      : throwBehavior.onNonNull.canThrow;
+  bool canThrow() =>
+      canBeNull() ? throwBehavior.canThrow : throwBehavior.onNonNull.canThrow;
 
   bool onlyThrowsNSM() => throwBehavior.isOnlyNullNSMGuard;
 
-  bool get isAllocation => nativeBehavior != null &&
-      nativeBehavior.isAllocation &&
-      !canBeNull();
+  bool get isAllocation =>
+      nativeBehavior != null && nativeBehavior.isAllocation && !canBeNull();
 
   String toString() => 'HForeignCode("${codeTemplate.source}",$inputs)';
 }
@@ -1895,7 +1878,7 @@
   List<DartType> instantiatedTypes;
 
   HForeignNew(this.element, TypeMask type, List<HInstruction> inputs,
-              [this.instantiatedTypes])
+      [this.instantiatedTypes])
       : super(type, inputs);
 
   accept(HVisitor visitor) => visitor.visitForeignNew(this);
@@ -1933,8 +1916,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitAdd(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.add;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.add;
   int typeCode() => HInstruction.ADD_TYPECODE;
   bool typeEquals(other) => other is HAdd;
   bool dataEquals(HInstruction other) => true;
@@ -1946,8 +1929,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitDivide(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.divide;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.divide;
   int typeCode() => HInstruction.DIVIDE_TYPECODE;
   bool typeEquals(other) => other is HDivide;
   bool dataEquals(HInstruction other) => true;
@@ -1959,8 +1942,7 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitMultiply(this);
 
-  BinaryOperation operation(ConstantSystem operations)
-      => operations.multiply;
+  BinaryOperation operation(ConstantSystem operations) => operations.multiply;
   int typeCode() => HInstruction.MULTIPLY_TYPECODE;
   bool typeEquals(other) => other is HMultiply;
   bool dataEquals(HInstruction other) => true;
@@ -1972,8 +1954,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitSubtract(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.subtract;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.subtract;
   int typeCode() => HInstruction.SUBTRACT_TYPECODE;
   bool typeEquals(other) => other is HSubtract;
   bool dataEquals(HInstruction other) => true;
@@ -1985,8 +1967,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitTruncatingDivide(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.truncatingDivide;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.truncatingDivide;
   int typeCode() => HInstruction.TRUNCATING_DIVIDE_TYPECODE;
   bool typeEquals(other) => other is HTruncatingDivide;
   bool dataEquals(HInstruction other) => true;
@@ -2027,8 +2009,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitShiftLeft(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.shiftLeft;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.shiftLeft;
   int typeCode() => HInstruction.SHIFT_LEFT_TYPECODE;
   bool typeEquals(other) => other is HShiftLeft;
   bool dataEquals(HInstruction other) => true;
@@ -2040,8 +2022,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitShiftRight(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.shiftRight;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.shiftRight;
   int typeCode() => HInstruction.SHIFT_RIGHT_TYPECODE;
   bool typeEquals(other) => other is HShiftRight;
   bool dataEquals(HInstruction other) => true;
@@ -2053,8 +2035,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitBitOr(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.bitOr;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.bitOr;
   int typeCode() => HInstruction.BIT_OR_TYPECODE;
   bool typeEquals(other) => other is HBitOr;
   bool dataEquals(HInstruction other) => true;
@@ -2066,8 +2048,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitBitAnd(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.bitAnd;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.bitAnd;
   int typeCode() => HInstruction.BIT_AND_TYPECODE;
   bool typeEquals(other) => other is HBitAnd;
   bool dataEquals(HInstruction other) => true;
@@ -2079,8 +2061,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitBitXor(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.bitXor;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.bitXor;
   int typeCode() => HInstruction.BIT_XOR_TYPECODE;
   bool typeEquals(other) => other is HBitXor;
   bool dataEquals(HInstruction other) => true;
@@ -2105,8 +2087,8 @@
       : super(input, selector, type);
   accept(HVisitor visitor) => visitor.visitNegate(this);
 
-  UnaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.negate;
+  UnaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.negate;
   int typeCode() => HInstruction.NEGATE_TYPECODE;
   bool typeEquals(other) => other is HNegate;
   bool dataEquals(HInstruction other) => true;
@@ -2117,8 +2099,8 @@
       : super(input, selector, type);
   accept(HVisitor visitor) => visitor.visitBitNot(this);
 
-  UnaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.bitNot;
+  UnaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.bitNot;
   int typeCode() => HInstruction.BIT_NOT_TYPECODE;
   bool typeEquals(other) => other is HBitNot;
   bool dataEquals(HInstruction other) => true;
@@ -2139,9 +2121,13 @@
 abstract class HJump extends HControlFlow {
   final JumpTarget target;
   final LabelDefinition label;
-  HJump(this.target) : label = null, super(const <HInstruction>[]);
+  HJump(this.target)
+      : label = null,
+        super(const <HInstruction>[]);
   HJump.toLabel(LabelDefinition label)
-      : label = label, target = label.target, super(const <HInstruction>[]);
+      : label = label,
+        target = label.target,
+        super(const <HInstruction>[]);
 }
 
 class HBreak extends HJump {
@@ -2154,7 +2140,8 @@
   HBreak(JumpTarget target, {bool this.breakSwitchContinueLoop: false})
       : super(target);
   HBreak.toLabel(LabelDefinition label)
-      : breakSwitchContinueLoop = false, super.toLabel(label);
+      : breakSwitchContinueLoop = false,
+        super.toLabel(label);
   toString() => (label != null) ? 'break ${label.labelName}' : 'break';
   accept(HVisitor visitor) => visitor.visitBreak(this);
 }
@@ -2268,8 +2255,7 @@
   * value from the start, whereas [HLocalValue]s need to be initialized first.
   */
 class HLocalValue extends HInstruction {
-  HLocalValue(Entity variable, TypeMask type)
-      : super(<HInstruction>[], type) {
+  HLocalValue(Entity variable, TypeMask type) : super(<HInstruction>[], type) {
     sourceElement = variable;
   }
 
@@ -2319,9 +2305,7 @@
       : this(variable, <HInstruction>[], type);
   HPhi.singleInput(Local variable, HInstruction input, TypeMask type)
       : this(variable, <HInstruction>[input], type);
-  HPhi.manyInputs(Local variable,
-                  List<HInstruction> inputs,
-                  TypeMask type)
+  HPhi.manyInputs(Local variable, List<HInstruction> inputs, TypeMask type)
       : this(variable, inputs, type);
 
   void addInput(HInstruction input) {
@@ -2342,13 +2326,13 @@
 
 class HIdentity extends HRelational {
   // Cached codegen decision.
-  String singleComparisonOp;  // null, '===', '=='
+  String singleComparisonOp; // null, '===', '=='
 
   HIdentity(left, right, selector, type) : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitIdentity(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.identity;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.identity;
   int typeCode() => HInstruction.IDENTITY_TYPECODE;
   bool typeEquals(other) => other is HIdentity;
   bool dataEquals(HInstruction other) => true;
@@ -2358,8 +2342,8 @@
   HGreater(left, right, selector, type) : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitGreater(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.greater;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.greater;
   int typeCode() => HInstruction.GREATER_TYPECODE;
   bool typeEquals(other) => other is HGreater;
   bool dataEquals(HInstruction other) => true;
@@ -2370,8 +2354,8 @@
       : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitGreaterEqual(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.greaterEqual;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.greaterEqual;
   int typeCode() => HInstruction.GREATER_EQUAL_TYPECODE;
   bool typeEquals(other) => other is HGreaterEqual;
   bool dataEquals(HInstruction other) => true;
@@ -2381,8 +2365,8 @@
   HLess(left, right, selector, type) : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitLess(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.less;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.less;
   int typeCode() => HInstruction.LESS_TYPECODE;
   bool typeEquals(other) => other is HLess;
   bool dataEquals(HInstruction other) => true;
@@ -2392,8 +2376,8 @@
   HLessEqual(left, right, selector, type) : super(left, right, selector, type);
   accept(HVisitor visitor) => visitor.visitLessEqual(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem)
-      => constantSystem.lessEqual;
+  BinaryOperation operation(ConstantSystem constantSystem) =>
+      constantSystem.lessEqual;
   int typeCode() => HInstruction.LESS_EQUAL_TYPECODE;
   bool typeEquals(other) => other is HLessEqual;
   bool dataEquals(HInstruction other) => true;
@@ -2440,9 +2424,8 @@
 
 class HThrow extends HControlFlow {
   final bool isRethrow;
-  HThrow(HInstruction value,
-         SourceInformation sourceInformation,
-         {this.isRethrow: false})
+  HThrow(HInstruction value, SourceInformation sourceInformation,
+      {this.isRethrow: false})
       : super(<HInstruction>[value]) {
     this.sourceInformation = sourceInformation;
   }
@@ -2486,8 +2469,7 @@
   //     (a && C.JSArray_methods).get$first(a)
   //
 
-  HInterceptor(HInstruction receiver,
-               TypeMask type)
+  HInterceptor(HInstruction receiver, TypeMask type)
       : super(<HInstruction>[receiver], type) {
     this.sourceInformation = receiver.sourceInformation;
     sideEffects.clearAllSideEffects();
@@ -2511,9 +2493,9 @@
   int typeCode() => HInstruction.INTERCEPTOR_TYPECODE;
   bool typeEquals(other) => other is HInterceptor;
   bool dataEquals(HInterceptor other) {
-    return interceptedClasses == other.interceptedClasses
-        || (interceptedClasses.length == other.interceptedClasses.length
-            && interceptedClasses.containsAll(other.interceptedClasses));
+    return interceptedClasses == other.interceptedClasses ||
+        (interceptedClasses.length == other.interceptedClasses.length &&
+            interceptedClasses.containsAll(other.interceptedClasses));
   }
 }
 
@@ -2528,11 +2510,8 @@
  */
 class HOneShotInterceptor extends HInvokeDynamic {
   Set<ClassElement> interceptedClasses;
-  HOneShotInterceptor(Selector selector,
-                      TypeMask mask,
-                      List<HInstruction> inputs,
-                      TypeMask type,
-                      this.interceptedClasses)
+  HOneShotInterceptor(Selector selector, TypeMask mask,
+      List<HInstruction> inputs, TypeMask type, this.interceptedClasses)
       : super(selector, mask, null, inputs, type, true) {
     assert(inputs[0] is HConstant);
     assert(inputs[0].isNull());
@@ -2593,10 +2572,8 @@
  */
 class HIndex extends HInstruction {
   final Selector selector;
-  HIndex(HInstruction receiver,
-         HInstruction index,
-         this.selector,
-         TypeMask type)
+  HIndex(
+      HInstruction receiver, HInstruction index, this.selector, TypeMask type)
       : super(<HInstruction>[receiver, index], type) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
@@ -2625,12 +2602,10 @@
  */
 class HIndexAssign extends HInstruction {
   final Selector selector;
-  HIndexAssign(HInstruction receiver,
-               HInstruction index,
-               HInstruction value,
-               this.selector)
+  HIndexAssign(HInstruction receiver, HInstruction index, HInstruction value,
+      this.selector)
       : super(<HInstruction>[receiver, index, value],
-              const TypeMask.nonNullEmpty()) {
+            const TypeMask.nonNullEmpty()) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     sideEffects.setChangesIndex();
@@ -2650,8 +2625,10 @@
 class HIs extends HInstruction {
   /// A check against a raw type: 'o is int', 'o is A'.
   static const int RAW_CHECK = 0;
+
   /// A check against a type with type arguments: 'o is List<int>', 'o is C<T>'.
   static const int COMPOUND_CHECK = 1;
+
   /// A check against a single type variable: 'o is T'.
   static const int VARIABLE_CHECK = 2;
 
@@ -2659,39 +2636,31 @@
   final int kind;
   final bool useInstanceOf;
 
-  HIs.direct(DartType typeExpression,
-             HInstruction expression,
-             TypeMask type)
+  HIs.direct(DartType typeExpression, HInstruction expression, TypeMask type)
       : this.internal(typeExpression, [expression], RAW_CHECK, type);
 
   // Pre-verified that the check can be done using 'instanceof'.
-  HIs.instanceOf(DartType typeExpression,
-                 HInstruction expression,
-                 TypeMask type)
+  HIs.instanceOf(
+      DartType typeExpression, HInstruction expression, TypeMask type)
       : this.internal(typeExpression, [expression], RAW_CHECK, type,
-          useInstanceOf: true);
+            useInstanceOf: true);
 
-  HIs.raw(DartType typeExpression,
-          HInstruction expression,
-          HInterceptor interceptor,
-          TypeMask type)
+  HIs.raw(DartType typeExpression, HInstruction expression,
+      HInterceptor interceptor, TypeMask type)
       : this.internal(
             typeExpression, [expression, interceptor], RAW_CHECK, type);
 
-  HIs.compound(DartType typeExpression,
-               HInstruction expression,
-               HInstruction call,
-               TypeMask type)
+  HIs.compound(DartType typeExpression, HInstruction expression,
+      HInstruction call, TypeMask type)
       : this.internal(typeExpression, [expression, call], COMPOUND_CHECK, type);
 
-  HIs.variable(DartType typeExpression,
-               HInstruction expression,
-               HInstruction call,
-               TypeMask type)
+  HIs.variable(DartType typeExpression, HInstruction expression,
+      HInstruction call, TypeMask type)
       : this.internal(typeExpression, [expression, call], VARIABLE_CHECK, type);
 
-  HIs.internal(this.typeExpression, List<HInstruction> inputs, this.kind,
-      TypeMask type, {bool this.useInstanceOf: false})
+  HIs.internal(
+      this.typeExpression, List<HInstruction> inputs, this.kind, TypeMask type,
+      {bool this.useInstanceOf: false})
       : super(inputs, type) {
     assert(kind >= RAW_CHECK && kind <= VARIABLE_CHECK);
     setUseGvn();
@@ -2722,8 +2691,7 @@
   bool typeEquals(HInstruction other) => other is HIs;
 
   bool dataEquals(HIs other) {
-    return typeExpression == other.typeExpression
-        && kind == other.kind;
+    return typeExpression == other.typeExpression && kind == other.kind;
   }
 }
 
@@ -2734,9 +2702,9 @@
  */
 class HIsViaInterceptor extends HLateInstruction {
   final DartType typeExpression;
-   HIsViaInterceptor(this.typeExpression, HInstruction interceptor,
-                     TypeMask type)
-       : super(<HInstruction>[interceptor], type) {
+  HIsViaInterceptor(
+      this.typeExpression, HInstruction interceptor, TypeMask type)
+      : super(<HInstruction>[interceptor], type) {
     setUseGvn();
   }
 
@@ -2756,7 +2724,7 @@
   final int kind;
   final Selector receiverTypeCheckSelector;
   final bool contextIsTypeArguments;
-  TypeMask checkedType;  // Not final because we refine it.
+  TypeMask checkedType; // Not final because we refine it.
 
   static const int CHECKED_MODE_CHECK = 0;
   static const int ARGUMENT_TYPE_CHECK = 1;
@@ -2764,33 +2732,30 @@
   static const int BOOLEAN_CONVERSION_CHECK = 3;
   static const int RECEIVER_TYPE_CHECK = 4;
 
-  HTypeConversion(this.typeExpression, this.kind,
-                  TypeMask type, HInstruction input,
-                  [this.receiverTypeCheckSelector])
+  HTypeConversion(
+      this.typeExpression, this.kind, TypeMask type, HInstruction input,
+      [this.receiverTypeCheckSelector])
       : contextIsTypeArguments = false,
         checkedType = type,
         super(<HInstruction>[input], type) {
     assert(!isReceiverTypeCheck || receiverTypeCheckSelector != null);
-    assert(typeExpression == null ||
-           typeExpression.kind != TypeKind.TYPEDEF);
+    assert(typeExpression == null || typeExpression.kind != TypeKind.TYPEDEF);
     sourceElement = input.sourceElement;
   }
 
   HTypeConversion.withTypeRepresentation(this.typeExpression, this.kind,
-                                         TypeMask type, HInstruction input,
-                                         HInstruction typeRepresentation)
+      TypeMask type, HInstruction input, HInstruction typeRepresentation)
       : contextIsTypeArguments = false,
         checkedType = type,
-        super(<HInstruction>[input, typeRepresentation],type),
+        super(<HInstruction>[input, typeRepresentation], type),
         receiverTypeCheckSelector = null {
     assert(typeExpression.kind != TypeKind.TYPEDEF);
     sourceElement = input.sourceElement;
   }
 
-  HTypeConversion.withContext(this.typeExpression, this.kind,
-                              TypeMask type, HInstruction input,
-                              HInstruction context,
-                              {bool this.contextIsTypeArguments})
+  HTypeConversion.withContext(this.typeExpression, this.kind, TypeMask type,
+      HInstruction input, HInstruction context,
+      {bool this.contextIsTypeArguments})
       : super(<HInstruction>[input, context], type),
         checkedType = type,
         receiverTypeCheckSelector = null {
@@ -2801,19 +2766,20 @@
   bool get hasTypeRepresentation {
     return typeExpression.isInterfaceType && inputs.length > 1;
   }
+
   HInstruction get typeRepresentation => inputs[1];
 
   bool get hasContext {
     return typeExpression.isFunctionType && inputs.length > 1;
   }
+
   HInstruction get context => inputs[1];
 
   HInstruction convertType(Compiler compiler, DartType type, int kind) {
     if (typeExpression == type) {
       // Don't omit a boolean conversion (which doesn't allow `null`) unless
       // this type conversion is already a boolean conversion.
-      if (kind != BOOLEAN_CONVERSION_CHECK ||
-          isBooleanConversionCheck) {
+      if (kind != BOOLEAN_CONVERSION_CHECK || isBooleanConversionCheck) {
         return this;
       }
     }
@@ -2821,9 +2787,9 @@
   }
 
   bool get isCheckedModeCheck {
-    return kind == CHECKED_MODE_CHECK
-        || kind == BOOLEAN_CONVERSION_CHECK;
+    return kind == CHECKED_MODE_CHECK || kind == BOOLEAN_CONVERSION_CHECK;
   }
+
   bool get isArgumentTypeCheck => kind == ARGUMENT_TYPE_CHECK;
   bool get isReceiverTypeCheck => kind == RECEIVER_TYPE_CHECK;
   bool get isCastTypeCheck => kind == CAST_TYPE_CHECK;
@@ -2839,10 +2805,10 @@
   bool isCodeMotionInvariant() => false;
 
   bool dataEquals(HTypeConversion other) {
-    return kind == other.kind
-        && typeExpression == other.typeExpression
-        && checkedType == other.checkedType
-        && receiverTypeCheckSelector == other.receiverTypeCheckSelector;
+    return kind == other.kind &&
+        typeExpression == other.typeExpression &&
+        checkedType == other.checkedType &&
+        receiverTypeCheckSelector == other.receiverTypeCheckSelector;
   }
 }
 
@@ -2856,8 +2822,8 @@
         this._isMovable = false,
         super(<HInstruction>[input], knownType);
 
-  HTypeKnown.witnessed(TypeMask knownType, HInstruction input,
-                       HInstruction witness)
+  HTypeKnown.witnessed(
+      TypeMask knownType, HInstruction input, HInstruction witness)
       : this.knownType = knownType,
         this._isMovable = true,
         super(<HInstruction>[input, witness], knownType);
@@ -2877,8 +2843,8 @@
   bool get isMovable => _isMovable && useGvn();
 
   bool dataEquals(HTypeKnown other) {
-    return knownType == other.knownType
-        && instructionType == other.instructionType;
+    return knownType == other.knownType &&
+        instructionType == other.instructionType;
   }
 }
 
@@ -2894,8 +2860,7 @@
 }
 
 class HStringConcat extends HInstruction {
-  final ast.Node node;
-  HStringConcat(HInstruction left, HInstruction right, this.node, TypeMask type)
+  HStringConcat(HInstruction left, HInstruction right, TypeMask type)
       : super(<HInstruction>[left, right], type) {
     // TODO(sra): Until Issue 9293 is fixed, this false dependency keeps the
     // concats bunched with stringified inputs for much better looking code with
@@ -2915,8 +2880,7 @@
  * into a String value.
  */
 class HStringify extends HInstruction {
-  final ast.Node node;
-  HStringify(HInstruction input, this.node, TypeMask type)
+  HStringify(HInstruction input, TypeMask type)
       : super(<HInstruction>[input], type) {
     sideEffects.setAllSideEffects();
     sideEffects.setDependsOnSomething();
@@ -2967,7 +2931,6 @@
   }
 }
 
-
 /**
  * Embedding of a [HBlockInformation] for block-structure based traversal
  * in a dominator based flow traversal by attaching it to a basic block.
@@ -2980,7 +2943,6 @@
   HBlockFlow(this.body, this.continuation);
 }
 
-
 /**
  * Information about a syntactic-like structure.
  */
@@ -2990,7 +2952,6 @@
   bool accept(HBlockInformationVisitor visitor);
 }
 
-
 /**
  * Information about a statement-like structure.
  */
@@ -2998,7 +2959,6 @@
   bool accept(HStatementInformationVisitor visitor);
 }
 
-
 /**
  * Information about an expression-like structure.
  */
@@ -3007,7 +2967,6 @@
   HInstruction get conditionExpression;
 }
 
-
 abstract class HStatementInformationVisitor {
   bool visitLabeledBlockInfo(HLabeledBlockInformation info);
   bool visitLoopInfo(HLoopBlockInformation info);
@@ -3020,17 +2979,13 @@
   bool visitSubGraphInfo(HSubGraphBlockInformation info);
 }
 
-
 abstract class HExpressionInformationVisitor {
   bool visitAndOrInfo(HAndOrBlockInformation info);
   bool visitSubExpressionInfo(HSubExpressionBlockInformation info);
 }
 
-
 abstract class HBlockInformationVisitor
-    implements HStatementInformationVisitor, HExpressionInformationVisitor {
-}
-
+    implements HStatementInformationVisitor, HExpressionInformationVisitor {}
 
 /**
  * Generic class wrapping a [SubGraph] as a block-information until
@@ -3044,7 +2999,7 @@
   HBasicBlock get end => subGraph.end;
 
   bool accept(HStatementInformationVisitor visitor) =>
-    visitor.visitSubGraphInfo(this);
+      visitor.visitSubGraphInfo(this);
 }
 
 /**
@@ -3061,7 +3016,7 @@
   HInstruction get conditionExpression => subExpression.conditionExpression;
 
   bool accept(HExpressionInformationVisitor visitor) =>
-    visitor.visitSubExpressionInfo(this);
+      visitor.visitSubExpressionInfo(this);
 }
 
 /** A sequence of separate statements. */
@@ -3073,7 +3028,7 @@
   HBasicBlock get end => statements.last.end;
 
   bool accept(HStatementInformationVisitor visitor) =>
-    visitor.visitSequenceInfo(this);
+      visitor.visitSequenceInfo(this);
 }
 
 class HLabeledBlockInformation implements HStatementInformation {
@@ -3082,33 +3037,20 @@
   final JumpTarget target;
   final bool isContinue;
 
-  HLabeledBlockInformation(this.body,
-                           List<LabelDefinition> labels,
-                           {this.isContinue: false}) :
-      this.labels = labels, this.target = labels[0].target;
+  HLabeledBlockInformation(this.body, List<LabelDefinition> labels,
+      {this.isContinue: false})
+      : this.labels = labels,
+        this.target = labels[0].target;
 
-  HLabeledBlockInformation.implicit(this.body,
-                                    this.target,
-                                    {this.isContinue: false})
-      : this.labels = const<LabelDefinition>[];
+  HLabeledBlockInformation.implicit(this.body, this.target,
+      {this.isContinue: false})
+      : this.labels = const <LabelDefinition>[];
 
   HBasicBlock get start => body.start;
   HBasicBlock get end => body.end;
 
   bool accept(HStatementInformationVisitor visitor) =>
-    visitor.visitLabeledBlockInfo(this);
-}
-
-class LoopTypeVisitor extends ast.Visitor {
-  const LoopTypeVisitor();
-  int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP;
-  int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP;
-  int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP;
-  int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP;
-  int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
-  int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
-  int visitSwitchStatement(ast.SwitchStatement node) =>
-      HLoopBlockInformation.SWITCH_CONTINUE_LOOP;
+      visitor.visitLabeledBlockInfo(this);
 }
 
 class HLoopBlockInformation implements HStatementInformation {
@@ -3128,14 +3070,8 @@
   final List<LabelDefinition> labels;
   final SourceInformation sourceInformation;
 
-  HLoopBlockInformation(this.kind,
-                        this.initializer,
-                        this.condition,
-                        this.body,
-                        this.updates,
-                        this.target,
-                        this.labels,
-                        this.sourceInformation) {
+  HLoopBlockInformation(this.kind, this.initializer, this.condition, this.body,
+      this.updates, this.target, this.labels, this.sourceInformation) {
     assert(
         (kind == DO_WHILE_LOOP ? body.start : condition.start).isLoopHeader());
   }
@@ -3160,36 +3096,28 @@
     return body.end;
   }
 
-  static int loopType(ast.Node node) {
-    return node.accept(const LoopTypeVisitor());
-  }
-
   bool accept(HStatementInformationVisitor visitor) =>
-    visitor.visitLoopInfo(this);
+      visitor.visitLoopInfo(this);
 }
 
 class HIfBlockInformation implements HStatementInformation {
   final HExpressionInformation condition;
   final HStatementInformation thenGraph;
   final HStatementInformation elseGraph;
-  HIfBlockInformation(this.condition,
-                      this.thenGraph,
-                      this.elseGraph);
+  HIfBlockInformation(this.condition, this.thenGraph, this.elseGraph);
 
   HBasicBlock get start => condition.start;
   HBasicBlock get end => elseGraph == null ? thenGraph.end : elseGraph.end;
 
   bool accept(HStatementInformationVisitor visitor) =>
-    visitor.visitIfInfo(this);
+      visitor.visitIfInfo(this);
 }
 
 class HAndOrBlockInformation implements HExpressionInformation {
   final bool isAnd;
   final HExpressionInformation left;
   final HExpressionInformation right;
-  HAndOrBlockInformation(this.isAnd,
-                         this.left,
-                         this.right);
+  HAndOrBlockInformation(this.isAnd, this.left, this.right);
 
   HBasicBlock get start => left.start;
   HBasicBlock get end => right.end;
@@ -3198,8 +3126,9 @@
   HInstruction get conditionExpression {
     return null;
   }
+
   bool accept(HExpressionInformationVisitor visitor) =>
-    visitor.visitAndOrInfo(this);
+      visitor.visitAndOrInfo(this);
 }
 
 class HTryBlockInformation implements HStatementInformation {
@@ -3207,17 +3136,15 @@
   final HLocalValue catchVariable;
   final HStatementInformation catchBlock;
   final HStatementInformation finallyBlock;
-  HTryBlockInformation(this.body,
-                       this.catchVariable,
-                       this.catchBlock,
-                       this.finallyBlock);
+  HTryBlockInformation(
+      this.body, this.catchVariable, this.catchBlock, this.finallyBlock);
 
   HBasicBlock get start => body.start;
   HBasicBlock get end =>
       finallyBlock == null ? catchBlock.end : finallyBlock.end;
 
   bool accept(HStatementInformationVisitor visitor) =>
-    visitor.visitTryInfo(this);
+      visitor.visitTryInfo(this);
 }
 
 class HSwitchBlockInformation implements HStatementInformation {
@@ -3226,10 +3153,8 @@
   final JumpTarget target;
   final List<LabelDefinition> labels;
 
-  HSwitchBlockInformation(this.expression,
-                          this.statements,
-                          this.target,
-                          this.labels);
+  HSwitchBlockInformation(
+      this.expression, this.statements, this.target, this.labels);
 
   HBasicBlock get start => expression.start;
   HBasicBlock get end {
@@ -3248,17 +3173,15 @@
 
   final bool hasReceiver;
 
-  HReadTypeVariable(this.dartType,
-                    HInstruction receiver,
-                    TypeMask instructionType)
+  HReadTypeVariable(
+      this.dartType, HInstruction receiver, TypeMask instructionType)
       : hasReceiver = true,
         super(<HInstruction>[receiver], instructionType) {
     setUseGvn();
   }
 
-  HReadTypeVariable.noReceiver(this.dartType,
-                               HInstruction typeArgument,
-                               TypeMask instructionType)
+  HReadTypeVariable.noReceiver(
+      this.dartType, HInstruction typeArgument, TypeMask instructionType)
       : hasReceiver = false,
         super(<HInstruction>[typeArgument], instructionType) {
     setUseGvn();
@@ -3272,17 +3195,16 @@
   bool typeEquals(HInstruction other) => other is HReadTypeVariable;
 
   bool dataEquals(HReadTypeVariable other) {
-    return dartType.element == other.dartType.element
-        && hasReceiver == other.hasReceiver;
+    return dartType.element == other.dartType.element &&
+        hasReceiver == other.hasReceiver;
   }
 }
 
 abstract class HRuntimeType extends HInstruction {
   final DartType dartType;
 
-  HRuntimeType(List<HInstruction> inputs,
-               this.dartType,
-               TypeMask instructionType)
+  HRuntimeType(
+      List<HInstruction> inputs, this.dartType, TypeMask instructionType)
       : super(inputs, instructionType) {
     setUseGvn();
   }
@@ -3303,9 +3225,8 @@
 }
 
 class HFunctionType extends HRuntimeType {
-  HFunctionType(List<HInstruction> inputs,
-                FunctionType dartType,
-                TypeMask instructionType)
+  HFunctionType(List<HInstruction> inputs, FunctionType dartType,
+      TypeMask instructionType)
       : super(inputs, dartType, instructionType);
 
   accept(HVisitor visitor) => visitor.visitFunctionType(this);
@@ -3327,9 +3248,8 @@
 }
 
 class HInterfaceType extends HRuntimeType {
-  HInterfaceType(List<HInstruction> inputs,
-                 InterfaceType dartType,
-                 TypeMask instructionType)
+  HInterfaceType(List<HInstruction> inputs, InterfaceType dartType,
+      TypeMask instructionType)
       : super(inputs, dartType, instructionType);
 
   accept(HVisitor visitor) => visitor.visitInterfaceType(this);
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index a8d82ae..4f67597 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -2,7 +2,31 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of ssa;
+import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
+import '../constants/constant_system.dart';
+import '../constants/values.dart';
+import '../core_types.dart' show CoreClasses;
+import '../dart_types.dart';
+import '../elements/elements.dart';
+import '../js/js.dart' as js;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart';
+import '../native/native.dart' as native;
+import '../tree/tree.dart' as ast;
+import '../types/types.dart';
+import '../universe/selector.dart' show Selector;
+import '../universe/side_effects.dart' show SideEffects;
+import '../util/util.dart';
+import '../world.dart' show ClassWorld, World;
+
+import 'nodes.dart';
+import 'types_propagation.dart';
+import 'types.dart';
+import 'value_range_analyzer.dart';
+import 'value_set.dart';
+import 'interceptor_simplifier.dart';
 
 abstract class OptimizationPhase {
   String get name;
@@ -27,43 +51,43 @@
 
     ConstantSystem constantSystem = compiler.backend.constantSystem;
     JavaScriptItemCompilationContext context = work.compilationContext;
-    bool trustPrimitives = compiler.trustPrimitives;
+    bool trustPrimitives = compiler.options.trustPrimitives;
     measure(() {
       List<OptimizationPhase> phases = <OptimizationPhase>[
-          // Run trivial instruction simplification first to optimize
-          // some patterns useful for type conversion.
-          new SsaInstructionSimplifier(constantSystem, backend, this, work),
-          new SsaTypeConversionInserter(compiler),
-          new SsaRedundantPhiEliminator(),
-          new SsaDeadPhiEliminator(),
-          new SsaTypePropagator(compiler),
-          // After type propagation, more instructions can be
-          // simplified.
-          new SsaInstructionSimplifier(constantSystem, backend, this, work),
-          new SsaCheckInserter(
-              trustPrimitives, backend, work, context.boundsChecked),
-          new SsaInstructionSimplifier(constantSystem, backend, this, work),
-          new SsaCheckInserter(
-              trustPrimitives, backend, work, context.boundsChecked),
-          new SsaTypePropagator(compiler),
-          // Run a dead code eliminator before LICM because dead
-          // interceptors are often in the way of LICM'able instructions.
-          new SsaDeadCodeEliminator(compiler, this),
-          new SsaGlobalValueNumberer(compiler),
-          // After GVN, some instructions might need their type to be
-          // updated because they now have different inputs.
-          new SsaTypePropagator(compiler),
-          new SsaCodeMotion(),
-          new SsaLoadElimination(compiler),
-          new SsaRedundantPhiEliminator(),
-          new SsaDeadPhiEliminator(),
-          new SsaTypePropagator(compiler),
-          new SsaValueRangeAnalyzer(compiler, constantSystem, this, work),
-          // Previous optimizations may have generated new
-          // opportunities for instruction simplification.
-          new SsaInstructionSimplifier(constantSystem, backend, this, work),
-          new SsaCheckInserter(
-              trustPrimitives, backend, work, context.boundsChecked),
+        // Run trivial instruction simplification first to optimize
+        // some patterns useful for type conversion.
+        new SsaInstructionSimplifier(constantSystem, backend, this, work),
+        new SsaTypeConversionInserter(compiler),
+        new SsaRedundantPhiEliminator(),
+        new SsaDeadPhiEliminator(),
+        new SsaTypePropagator(compiler),
+        // After type propagation, more instructions can be
+        // simplified.
+        new SsaInstructionSimplifier(constantSystem, backend, this, work),
+        new SsaCheckInserter(
+            trustPrimitives, backend, work, context.boundsChecked),
+        new SsaInstructionSimplifier(constantSystem, backend, this, work),
+        new SsaCheckInserter(
+            trustPrimitives, backend, work, context.boundsChecked),
+        new SsaTypePropagator(compiler),
+        // Run a dead code eliminator before LICM because dead
+        // interceptors are often in the way of LICM'able instructions.
+        new SsaDeadCodeEliminator(compiler, this),
+        new SsaGlobalValueNumberer(compiler),
+        // After GVN, some instructions might need their type to be
+        // updated because they now have different inputs.
+        new SsaTypePropagator(compiler),
+        new SsaCodeMotion(),
+        new SsaLoadElimination(compiler),
+        new SsaRedundantPhiEliminator(),
+        new SsaDeadPhiEliminator(),
+        new SsaTypePropagator(compiler),
+        new SsaValueRangeAnalyzer(compiler, constantSystem, this, work),
+        // Previous optimizations may have generated new
+        // opportunities for instruction simplification.
+        new SsaInstructionSimplifier(constantSystem, backend, this, work),
+        new SsaCheckInserter(
+            trustPrimitives, backend, work, context.boundsChecked),
       ];
       phases.forEach(runPhase);
 
@@ -76,22 +100,22 @@
       runPhase(dce);
       if (dce.eliminatedSideEffects) {
         phases = <OptimizationPhase>[
-            new SsaTypePropagator(compiler),
-            new SsaGlobalValueNumberer(compiler),
-            new SsaCodeMotion(),
-            new SsaValueRangeAnalyzer(compiler, constantSystem, this, work),
-            new SsaInstructionSimplifier(constantSystem, backend, this, work),
-            new SsaCheckInserter(
-                trustPrimitives, backend, work, context.boundsChecked),
-            new SsaSimplifyInterceptors(compiler, constantSystem, work),
-            new SsaDeadCodeEliminator(compiler, this),
+          new SsaTypePropagator(compiler),
+          new SsaGlobalValueNumberer(compiler),
+          new SsaCodeMotion(),
+          new SsaValueRangeAnalyzer(compiler, constantSystem, this, work),
+          new SsaInstructionSimplifier(constantSystem, backend, this, work),
+          new SsaCheckInserter(
+              trustPrimitives, backend, work, context.boundsChecked),
+          new SsaSimplifyInterceptors(compiler, constantSystem, work),
+          new SsaDeadCodeEliminator(compiler, this),
         ];
       } else {
         phases = <OptimizationPhase>[
-            new SsaTypePropagator(compiler),
-            // Run the simplifier to remove unneeded type checks inserted by
-            // type propagation.
-            new SsaInstructionSimplifier(constantSystem, backend, this, work),
+          new SsaTypePropagator(compiler),
+          // Run the simplifier to remove unneeded type checks inserted by
+          // type propagation.
+          new SsaInstructionSimplifier(constantSystem, backend, this, work),
         ];
       }
       phases.forEach(runPhase);
@@ -126,7 +150,6 @@
  */
 class SsaInstructionSimplifier extends HBaseVisitor
     implements OptimizationPhase {
-
   // We don't produce constant-folded strings longer than this unless they have
   // a single use.  This protects against exponentially large constant folded
   // strings.
@@ -140,10 +163,8 @@
   Compiler get compiler => backend.compiler;
   final SsaOptimizerTask optimizer;
 
-  SsaInstructionSimplifier(this.constantSystem,
-                           this.backend,
-                           this.optimizer,
-                           this.work);
+  SsaInstructionSimplifier(
+      this.constantSystem, this.backend, this.optimizer, this.work);
 
   CoreClasses get coreClasses => compiler.coreClasses;
 
@@ -167,12 +188,12 @@
         // might be that an operation thought to return double, can be
         // simplified to an int. For example:
         // `2.5 * 10`.
-        if (!(replacement.isNumberOrNull(compiler)
-              && instruction.isNumberOrNull(compiler))) {
+        if (!(replacement.isNumberOrNull(compiler) &&
+            instruction.isNumberOrNull(compiler))) {
           // If we can replace [instruction] with [replacement], then
           // [replacement]'s type can be narrowed.
-          TypeMask newType = replacement.instructionType.intersection(
-              instruction.instructionType, compiler.world);
+          TypeMask newType = replacement.instructionType
+              .intersection(instruction.instructionType, compiler.world);
           replacement.instructionType = newType;
         }
 
@@ -231,8 +252,8 @@
     // body. If that happens then we should not forward the constant value to
     // its uses since since the uses reachable from the assignment may have
     // values in addition to the constant passed to the function.
-    if (node.usedBy.any((user) =>
-            user is HLocalSet && identical(user.local, node))) {
+    if (node.usedBy
+        .any((user) => user is HLocalSet && identical(user.local, node))) {
       return node;
     }
     propagateConstantValueToUses(node);
@@ -249,8 +270,7 @@
     // there is a throw expression in a short-circuit conditional.  Removing the
     // unreachable HBoolify makes it easier to reconstruct the short-circuit
     // operation.
-    if (input.instructionType.isEmpty && !input.instructionType.isNullable)
-      return input;
+    if (input.instructionType.isEmpty) return input;
 
     // All values that cannot be 'true' are boolified to false.
     TypeMask mask = input.instructionType;
@@ -308,14 +328,13 @@
       TypeMask resultType = backend.positiveIntType;
       // If we already have computed a more specific type, keep that type.
       if (HInstruction.isInstanceOf(
-              actualType, helpers.jsUInt31Class, classWorld)) {
+          actualType, helpers.jsUInt31Class, classWorld)) {
         resultType = backend.uint31Type;
       } else if (HInstruction.isInstanceOf(
-              actualType, helpers.jsUInt32Class, classWorld)) {
+          actualType, helpers.jsUInt32Class, classWorld)) {
         resultType = backend.uint32Type;
       }
-      HFieldGet result = new HFieldGet(
-          element, actualReceiver, resultType,
+      HFieldGet result = new HFieldGet(element, actualReceiver, resultType,
           isAssignable: !isFixed);
       return result;
     } else if (actualReceiver.isConstantMap()) {
@@ -349,7 +368,7 @@
 
     bool applies(Element element) {
       return selector.applies(element, world) &&
-             (mask == null || mask.canHit(element, selector, world));
+          (mask == null || mask.canHit(element, selector, world));
     }
 
     if (selector.isCall || selector.isOperator) {
@@ -360,7 +379,7 @@
         } else if (applies(helpers.jsArrayAdd)) {
           // The codegen special cases array calls, but does not
           // inline argument type checks.
-          if (!compiler.enableTypeAssertions) {
+          if (!compiler.options.enableTypeAssertions) {
             target = helpers.jsArrayAdd;
           }
         }
@@ -375,13 +394,10 @@
           // make sure the receiver and the argument are not null.
           // TODO(sra): Do this via [node.specializer].
           HInstruction argument = node.inputs[2];
-          if (argument.isString(compiler)
-              && !input.canBeNull()) {
-            return new HStringConcat(input, argument, null,
-                                     node.instructionType);
+          if (argument.isString(compiler) && !input.canBeNull()) {
+            return new HStringConcat(input, argument, node.instructionType);
           }
-        } else if (applies(helpers.jsStringToString)
-                   && !input.canBeNull()) {
+        } else if (applies(helpers.jsStringToString) && !input.canBeNull()) {
           return input;
         }
       }
@@ -394,9 +410,8 @@
         // bounds check on removeLast). Once we start inlining, the
         // bounds check will become explicit, so we won't need this
         // optimization.
-        HInvokeDynamicMethod result = new HInvokeDynamicMethod(
-            node.selector, node.mask,
-            node.inputs.sublist(1), node.instructionType);
+        HInvokeDynamicMethod result = new HInvokeDynamicMethod(node.selector,
+            node.mask, node.inputs.sublist(1), node.instructionType);
         result.element = target;
         return result;
       }
@@ -421,11 +436,12 @@
     Element element =
         compiler.world.locateSingleElement(node.selector, receiverType);
     // TODO(ngeoffray): Also fold if it's a getter or variable.
-    if (element != null
-        && element.isFunction
+    if (element != null &&
+        element.isFunction
         // If we found out that the only target is a [:noSuchMethod:],
         // we just ignore it.
-        && element.name == node.selector.name) {
+        &&
+        element.name == node.selector.name) {
       FunctionElement method = element;
 
       if (backend.isNative(method)) {
@@ -436,8 +452,7 @@
         // we should pass the default values.
         FunctionSignature parameters = method.functionSignature;
         if (parameters.optionalParameterCount == 0 ||
-            parameters.parameterCount ==
-                node.selector.argumentCount) {
+            parameters.parameterCount == node.selector.argumentCount) {
           node.element = element;
         }
       }
@@ -445,8 +460,8 @@
     return node;
   }
 
-  HInstruction tryInlineNativeMethod(HInvokeDynamicMethod node,
-                                     FunctionElement method) {
+  HInstruction tryInlineNativeMethod(
+      HInvokeDynamicMethod node, FunctionElement method) {
     // Enable direct calls to a native method only if we don't run in checked
     // mode, where the Dart version may have type annotations on parameters and
     // return type that it should check.
@@ -473,7 +488,7 @@
     // preserve the number of arguments, so check only the actual arguments.
 
     List<HInstruction> inputs = node.inputs.sublist(1);
-    int inputPosition = 1;  // Skip receiver.
+    int inputPosition = 1; // Skip receiver.
     bool canInline = true;
     signature.forEachParameter((ParameterElement element) {
       if (inputPosition++ < inputs.length && canInline) {
@@ -481,7 +496,7 @@
         if (type is FunctionType) {
           canInline = false;
         }
-        if (compiler.enableTypeAssertions) {
+        if (compiler.options.enableTypeAssertions) {
           // TODO(sra): Check if [input] is guaranteed to pass the parameter
           // type check.  Consider using a strengthened type check to avoid
           // passing `null` to primitive types since the native methods usually
@@ -519,9 +534,8 @@
     return node;
   }
 
-  HInstruction foldBinary(BinaryOperation operation,
-                          HInstruction left,
-                          HInstruction right) {
+  HInstruction foldBinary(
+      BinaryOperation operation, HInstruction left, HInstruction right) {
     if (left is HConstant && right is HConstant) {
       HConstant op1 = left;
       HConstant op2 = right;
@@ -618,7 +632,6 @@
       return compareConstant(right, left);
     }
 
-
     if (identical(left.nonCheck(), right.nonCheck())) {
       // Avoid constant-folding `identical(x, x)` when `x` might be double.  The
       // dart2js runtime has not always been consistent with the Dart
@@ -636,9 +649,8 @@
     return newInstruction == null ? super.visitIdentity(node) : newInstruction;
   }
 
-  void simplifyCondition(HBasicBlock block,
-                         HInstruction condition,
-                         bool value) {
+  void simplifyCondition(
+      HBasicBlock block, HInstruction condition, bool value) {
     condition.dominatedUsers(block.first).forEach((user) {
       HInstruction newCondition = graph.addConstantBool(value, compiler);
       user.changeUse(condition, newCondition);
@@ -658,8 +670,8 @@
       // simplify the nested use of the condition in that case, so
       // we look for all dominating negated conditions and replace
       // nested uses of them with true or false.
-      Iterable<HInstruction> dominating = condition.usedBy.where((user) =>
-          user is HNot && user.dominates(node));
+      Iterable<HInstruction> dominating = condition.usedBy
+          .where((user) => user is HNot && user.dominates(node));
       dominating.forEach((hoisted) {
         simplifyCondition(node.thenBlock, hoisted, false);
         simplifyCondition(node.elseBlock, hoisted, true);
@@ -721,13 +733,13 @@
         // type int or double.
       }
     } else if (expression.canBePrimitiveNumber(compiler) &&
-               element == coreClasses.intClass) {
+        element == coreClasses.intClass) {
       // We let the JS semantics decide for that check.
       return node;
-    // We need the [:hasTypeArguments:] check because we don't have
-    // the notion of generics in the backend. For example, [:this:] in
-    // a class [:A<T>:], is currently always considered to have the
-    // raw type.
+      // We need the [:hasTypeArguments:] check because we don't have
+      // the notion of generics in the backend. For example, [:this:] in
+      // a class [:A<T>:], is currently always considered to have the
+      // raw type.
     } else if (!RuntimeTypes.hasTypeArguments(type)) {
       TypeMask expressionMask = expression.instructionType;
       assert(TypeMask.assertIsNormalized(expressionMask, classWorld));
@@ -774,8 +786,8 @@
     return inputType.isInMask(checkedType, classWorld) ? input : node;
   }
 
-  VariableElement findConcreteFieldForDynamicAccess(HInstruction receiver,
-                                                    Selector selector) {
+  VariableElement findConcreteFieldForDynamicAccess(
+      HInstruction receiver, Selector selector) {
     TypeMask receiverType = receiver.instructionType;
     return compiler.world.locateSingleField(selector, receiverType);
   }
@@ -850,8 +862,7 @@
       if (folded != node) return folded;
     }
     HInstruction receiver = node.getDartReceiver(compiler);
-    Element field = findConcreteFieldForDynamicAccess(
-        receiver, node.selector);
+    Element field = findConcreteFieldForDynamicAccess(receiver, node.selector);
     if (field == null) return node;
     return directFieldGet(receiver, field);
   }
@@ -862,14 +873,12 @@
     TypeMask type;
     if (backend.isNative(field.enclosingClass)) {
       type = TypeMaskFactory.fromNativeBehavior(
-          native.NativeBehavior.ofFieldLoad(field, compiler),
-          compiler);
+          native.NativeBehavior.ofFieldLoad(field, compiler), compiler);
     } else {
       type = TypeMaskFactory.inferredTypeForElement(field, compiler);
     }
 
-    return new HFieldGet(
-        field, receiver, type, isAssignable: isAssignable);
+    return new HFieldGet(field, receiver, type, isAssignable: isAssignable);
   }
 
   HInstruction visitInvokeDynamicSetter(HInvokeDynamicSetter node) {
@@ -886,17 +895,15 @@
     // interceptor calling convention, but is not a call on an
     // interceptor.
     HInstruction value = node.inputs.last;
-    if (compiler.enableTypeAssertions) {
+    if (compiler.options.enableTypeAssertions) {
       DartType type = field.type;
       if (!type.treatAsRaw || type.isTypeVariable) {
         // We cannot generate the correct type representation here, so don't
         // inline this access.
         return node;
       }
-      HInstruction other = value.convertType(
-          compiler,
-          type,
-          HTypeConversion.CHECKED_MODE_CHECK);
+      HInstruction other =
+          value.convertType(compiler, type, HTypeConversion.CHECKED_MODE_CHECK);
       if (other != value) {
         node.block.addBefore(node, other);
         value = other;
@@ -963,7 +970,7 @@
             leftString.primitiveValue, rightString.primitiveValue)),
         compiler);
     if (prefix == null) return folded;
-    return new HStringConcat(prefix, folded, node.node, backend.stringType);
+    return new HStringConcat(prefix, folded, backend.stringType);
   }
 
   HInstruction visitStringify(HStringify node) {
@@ -981,8 +988,8 @@
         if (!intConstant.isUInt32()) return node;
       }
       PrimitiveConstantValue primitive = constant.constant;
-      return graph.addConstant(constantSystem.createString(
-          primitive.toDartString()), compiler);
+      return graph.addConstant(
+          constantSystem.createString(primitive.toDartString()), compiler);
     }
     return node;
   }
@@ -1000,10 +1007,8 @@
   final String name = "SsaCheckInserter";
   HGraph graph;
 
-  SsaCheckInserter(this.trustPrimitives,
-                   this.backend,
-                   this.work,
-                   this.boundsChecked);
+  SsaCheckInserter(
+      this.trustPrimitives, this.backend, this.work, this.boundsChecked);
 
   BackendHelpers get helpers => backend.helpers;
 
@@ -1027,9 +1032,8 @@
     }
   }
 
-  HBoundsCheck insertBoundsCheck(HInstruction indexNode,
-                                 HInstruction array,
-                                 HInstruction indexArgument) {
+  HBoundsCheck insertBoundsCheck(
+      HInstruction indexNode, HInstruction array, HInstruction indexArgument) {
     Compiler compiler = backend.compiler;
     HFieldGet length = new HFieldGet(
         helpers.jsIndexableLength, array, backend.positiveIntType,
@@ -1039,8 +1043,7 @@
     TypeMask type = indexArgument.isPositiveInteger(compiler)
         ? indexArgument.instructionType
         : backend.positiveIntType;
-    HBoundsCheck check = new HBoundsCheck(
-        indexArgument, length, array, type);
+    HBoundsCheck check = new HBoundsCheck(indexArgument, length, array, type);
     indexNode.block.addBefore(indexNode, check);
     // If the index input to the bounds check was not known to be an integer
     // then we replace its uses with the bounds check, which is known to be an
@@ -1099,10 +1102,8 @@
   HInstruction get zapInstruction {
     if (zapInstructionCache == null) {
       // A constant with no type does not pollute types at phi nodes.
-      ConstantValue constant =
-          new SyntheticConstantValue(
-              SyntheticConstantKind.EMPTY_VALUE,
-              const TypeMask.nonNullEmpty());
+      ConstantValue constant = new SyntheticConstantValue(
+          SyntheticConstantKind.EMPTY_VALUE, const TypeMask.nonNullEmpty());
       zapInstructionCache = analyzer.graph.addConstant(constant, compiler);
     }
     return zapInstructionCache;
@@ -1149,8 +1150,8 @@
     HInstruction receiver = instruction.getDartReceiver(compiler);
     HInstruction current = instruction.next;
     do {
-      if ((current.getDartReceiver(compiler) == receiver)
-          && current.canThrow()) {
+      if ((current.getDartReceiver(compiler) == receiver) &&
+          current.canThrow()) {
         return true;
       }
       if (current is HForeignCode &&
@@ -1200,15 +1201,15 @@
       }
       return false;
     }
-    return instruction.isAllocation
-        && instruction.isPure()
-        && trivialDeadStoreReceivers.putIfAbsent(instruction,
-            () => instruction.usedBy.every(isDeadUse));
+    return instruction.isAllocation &&
+        instruction.isPure() &&
+        trivialDeadStoreReceivers.putIfAbsent(
+            instruction, () => instruction.usedBy.every(isDeadUse));
   }
 
   bool isTrivialDeadStore(HInstruction instruction) {
-    return instruction is HFieldSet
-        && isTrivialDeadStoreReceiver(instruction.getDartReceiver(compiler));
+    return instruction is HFieldSet &&
+        isTrivialDeadStoreReceiver(instruction.getDartReceiver(compiler));
   }
 
   bool isDeadCode(HInstruction instruction) {
@@ -1220,9 +1221,9 @@
         hasFollowingThrowingNSM(instruction)) {
       return true;
     }
-    return !instruction.canThrow()
-        && instruction is !HParameterValue
-        && instruction is !HLocalSet;
+    return !instruction.canThrow() &&
+        instruction is! HParameterValue &&
+        instruction is! HLocalSet;
   }
 
   void visitGraph(HGraph graph) {
@@ -1240,8 +1241,8 @@
     while (instruction != null) {
       var previous = instruction.previous;
       if (isDeadBlock) {
-        eliminatedSideEffects = eliminatedSideEffects ||
-            instruction.sideEffects.hasSideEffects();
+        eliminatedSideEffects =
+            eliminatedSideEffects || instruction.sideEffects.hasSideEffects();
         removeUsers(instruction);
         block.remove(instruction);
       } else if (isDeadCode(instruction)) {
@@ -1274,8 +1275,8 @@
       // Run through the phis of the block and replace them with their input
       // that comes from the only live predecessor if that dominates the phi.
       block.forEachPhi((HPhi phi) {
-        HInstruction replacement = (indexOfLive >= 0)
-            ? phi.inputs[indexOfLive] : zapInstruction;
+        HInstruction replacement =
+            (indexOfLive >= 0) ? phi.inputs[indexOfLive] : zapInstruction;
         if (replacement.dominates(phi)) {
           block.rewrite(phi, replacement);
           block.removePhi(phi);
@@ -1369,9 +1370,7 @@
           if (!input.isConstantInteger()) continue;
           IntConstantValue constant = input.constant;
           int label = constant.primitiveValue;
-          if (!liveLabels.contains(label) &&
-              label <= upper &&
-              label >= lower) {
+          if (!liveLabels.contains(label) && label <= upper && label >= lower) {
             markBlockLive(node.block.successors[pos - 1]);
             liveLabels.add(label);
           }
@@ -1399,7 +1398,7 @@
     for (final block in graph.blocks) {
       block.forEachPhi((HPhi phi) {
         for (final user in phi.usedBy) {
-          if (user is !HPhi) {
+          if (user is! HPhi) {
             worklist.add(phi);
             livePhis.add(phi);
             break;
@@ -1433,7 +1432,8 @@
         next = current.next;
         if (!livePhis.contains(current)
             // TODO(ahe): Not sure the following is correct.
-            && current.usedBy.isEmpty) {
+            &&
+            current.usedBy.isEmpty) {
           block.removePhi(current);
         }
         current = next;
@@ -1508,8 +1508,9 @@
   void visitGraph(HGraph graph) {
     computeChangesFlags(graph);
     moveLoopInvariantCode(graph);
-    List<GvnWorkItem> workQueue =
-        <GvnWorkItem>[new GvnWorkItem(graph.entry, new ValueSet())];
+    List<GvnWorkItem> workQueue = <GvnWorkItem>[
+      new GvnWorkItem(graph.entry, new ValueSet())
+    ];
     do {
       GvnWorkItem item = workQueue.removeLast();
       visitBasicBlock(item.block, item.valueSet, workQueue);
@@ -1535,9 +1536,8 @@
     }
   }
 
-  void moveLoopInvariantCodeFromBlock(HBasicBlock block,
-                                      HBasicBlock loopHeader,
-                                      int changesFlags) {
+  void moveLoopInvariantCodeFromBlock(
+      HBasicBlock block, HBasicBlock loopHeader, int changesFlags) {
     assert(block.parentLoopHeader == loopHeader || block == loopHeader);
     HBasicBlock preheader = loopHeader.predecessors[0];
     int dependsFlags = SideEffects.computeDependsOnFlags(changesFlags);
@@ -1545,19 +1545,20 @@
     bool isLoopAlwaysTaken() {
       HInstruction instruction = loopHeader.last;
       assert(instruction is HGoto || instruction is HLoopBranch);
-      return instruction is HGoto
-          || instruction.inputs[0].isConstantTrue();
+      return instruction is HGoto || instruction.inputs[0].isConstantTrue();
     }
     bool firstInstructionInLoop = block == loopHeader
         // Compensate for lack of code motion.
-        || (blockChangesFlags[loopHeader.id] == 0
-            && isLoopAlwaysTaken()
-            && loopHeader.successors[0] == block);
+        ||
+        (blockChangesFlags[loopHeader.id] == 0 &&
+            isLoopAlwaysTaken() &&
+            loopHeader.successors[0] == block);
     while (instruction != null) {
       HInstruction next = instruction.next;
-      if (instruction.useGvn() && instruction.isMovable
-          && (!instruction.canThrow() || firstInstructionInLoop)
-          && !instruction.sideEffects.dependsOn(dependsFlags)) {
+      if (instruction.useGvn() &&
+          instruction.isMovable &&
+          (!instruction.canThrow() || firstInstructionInLoop) &&
+          !instruction.sideEffects.dependsOn(dependsFlags)) {
         bool loopInvariantInputs = true;
         List<HInstruction> inputs = instruction.inputs;
         for (int i = 0, length = inputs.length; i < length; i++) {
@@ -1585,8 +1586,7 @@
     }
   }
 
-  bool isInputDefinedAfterDominator(HInstruction input,
-                                    HBasicBlock dominator) {
+  bool isInputDefinedAfterDominator(HInstruction input, HBasicBlock dominator) {
     return input.block.id > dominator.id;
   }
 
@@ -1675,16 +1675,14 @@
       // Propagate loop changes flags upwards.
       HBasicBlock parentLoopHeader = block.parentLoopHeader;
       if (parentLoopHeader != null) {
-        loopChangesFlags[parentLoopHeader.id] |= (block.isLoopHeader())
-            ? loopChangesFlags[id]
-            : changesFlags;
+        loopChangesFlags[parentLoopHeader.id] |=
+            (block.isLoopHeader()) ? loopChangesFlags[id] : changesFlags;
       }
     }
   }
 
   int getChangesFlagsForDominatedBlock(HBasicBlock dominator,
-                                       HBasicBlock dominated,
-                                       List<HBasicBlock> workQueue) {
+      HBasicBlock dominated, List<HBasicBlock> workQueue) {
     int changesFlags = 0;
     List<HBasicBlock> predecessors = dominated.predecessors;
     for (int i = 0, length = predecessors.length; i < length; i++) {
@@ -1819,9 +1817,8 @@
   // to use [TypeKnown] of [input] instead. As the type information depends
   // on the control flow, we mark the inserted [HTypeKnown] nodes as
   // non-movable.
-  void insertTypePropagationForDominatedUsers(HBasicBlock dominator,
-                                              HInstruction input,
-                                              TypeMask convertedType) {
+  void insertTypePropagationForDominatedUsers(
+      HBasicBlock dominator, HInstruction input, TypeMask convertedType) {
     Setlet<HInstruction> dominatedUsers = input.dominatedUsers(dominator.first);
     if (dominatedUsers.isEmpty) return;
 
@@ -1853,14 +1850,14 @@
     HInstruction input = instruction.expression;
 
     for (HIf ifUser in ifUsers) {
-      insertTypePropagationForDominatedUsers(ifUser.thenBlock, input,
-                                             convertedType);
+      insertTypePropagationForDominatedUsers(
+          ifUser.thenBlock, input, convertedType);
       // TODO(ngeoffray): Also change uses for the else block on a type
       // that knows it is not of a specific type.
     }
     for (HIf ifUser in notIfUsers) {
-      insertTypePropagationForDominatedUsers(ifUser.elseBlock, input,
-                                             convertedType);
+      insertTypePropagationForDominatedUsers(
+          ifUser.elseBlock, input, convertedType);
       // TODO(ngeoffray): Also change uses for the then block on a type
       // that knows it is not of a specific type.
     }
@@ -1892,20 +1889,19 @@
     TypeMask nonNullType = input.instructionType.nonNullable();
 
     for (HIf ifUser in ifUsers) {
-      insertTypePropagationForDominatedUsers(ifUser.elseBlock, input,
-                                             nonNullType);
+      insertTypePropagationForDominatedUsers(
+          ifUser.elseBlock, input, nonNullType);
       // Uses in thenBlock are `null`, but probably not common.
     }
     for (HIf ifUser in notIfUsers) {
-      insertTypePropagationForDominatedUsers(ifUser.thenBlock, input,
-                                             nonNullType);
+      insertTypePropagationForDominatedUsers(
+          ifUser.thenBlock, input, nonNullType);
       // Uses in elseBlock are `null`, but probably not common.
     }
   }
 
-  collectIfUsers(HInstruction instruction,
-                 List<HInstruction> ifUsers,
-                 List<HInstruction> notIfUsers) {
+  collectIfUsers(HInstruction instruction, List<HInstruction> ifUsers,
+      List<HInstruction> notIfUsers) {
     for (HInstruction user in instruction.usedBy) {
       if (user is HIf) {
         ifUsers.add(user);
@@ -1950,8 +1946,8 @@
     if (block.predecessors.length == 0) {
       // Entry block.
       memorySet = new MemorySet(compiler);
-    } else if (block.predecessors.length == 1
-               && block.predecessors[0].successors.length == 1) {
+    } else if (block.predecessors.length == 1 &&
+        block.predecessors[0].successors.length == 1) {
       // No need to clone, there is no other successor for
       // `block.predecessors[0]`, and this block has only one
       // predecessor. Since we are not going to visit
@@ -1967,7 +1963,7 @@
       memorySet = memories[block.predecessors[0].id];
       for (int i = 1; i < block.predecessors.length; i++) {
         memorySet = memorySet.intersectionFor(
-          memories[block.predecessors[i].id], block, i);
+            memories[block.predecessors[i].id], block, i);
       }
     }
 
@@ -1983,8 +1979,7 @@
   void visitFieldGet(HFieldGet instruction) {
     if (instruction.isNullCheck) return;
     Element element = instruction.element;
-    HInstruction receiver =
-        instruction.getDartReceiver(compiler).nonCheck();
+    HInstruction receiver = instruction.getDartReceiver(compiler).nonCheck();
     HInstruction existing = memorySet.lookupFieldValue(element, receiver);
     if (existing != null) {
       instruction.block.rewriteWithBetterUser(instruction, existing);
@@ -1995,8 +1990,7 @@
   }
 
   void visitFieldSet(HFieldSet instruction) {
-    HInstruction receiver =
-        instruction.getDartReceiver(compiler).nonCheck();
+    HInstruction receiver = instruction.getDartReceiver(compiler).nonCheck();
     memorySet.registerFieldValueUpdate(
         instruction.element, receiver, instruction.inputs.last);
   }
@@ -2118,13 +2112,13 @@
    * Maps a field to a map of receiver to value.
    */
   final Map<Element, Map<HInstruction, HInstruction>> fieldValues =
-      <Element, Map<HInstruction, HInstruction>> {};
+      <Element, Map<HInstruction, HInstruction>>{};
 
   /**
    * Maps a receiver to a map of keys to value.
    */
   final Map<HInstruction, Map<HInstruction, HInstruction>> keyedValues =
-      <HInstruction, Map<HInstruction, HInstruction>> {};
+      <HInstruction, Map<HInstruction, HInstruction>>{};
 
   /**
    * Set of objects that we know don't escape the current function.
@@ -2152,8 +2146,8 @@
     if (nonEscapingReceivers.contains(second)) return false;
     // Typed arrays of different types might have a shared buffer.
     if (couldBeTypedArray(first) && couldBeTypedArray(second)) return true;
-    return !first.instructionType.isDisjoint(
-        second.instructionType, compiler.world);
+    return !first.instructionType
+        .isDisjoint(second.instructionType, compiler.world);
   }
 
   bool isFinal(Element element) {
@@ -2161,9 +2155,9 @@
   }
 
   bool isConcrete(HInstruction instruction) {
-    return instruction is HForeignNew
-        || instruction is HConstant
-        || instruction is HLiteralList;
+    return instruction is HForeignNew ||
+        instruction is HConstant ||
+        instruction is HLiteralList;
   }
 
   bool couldBeTypedArray(HInstruction receiver) {
@@ -2186,17 +2180,16 @@
    * Sets `receiver.element` to contain [value]. Kills all potential
    * places that may be affected by this update.
    */
-  void registerFieldValueUpdate(Element element,
-                                HInstruction receiver,
-                                HInstruction value) {
+  void registerFieldValueUpdate(
+      Element element, HInstruction receiver, HInstruction value) {
     if (backend.isNative(element)) {
       return; // TODO(14955): Remove this restriction?
     }
     // [value] is being set in some place in memory, we remove it from
     // the non-escaping set.
     nonEscapingReceivers.remove(value);
-    Map<HInstruction, HInstruction> map = fieldValues.putIfAbsent(
-        element, () => <HInstruction, HInstruction> {});
+    Map<HInstruction, HInstruction> map =
+        fieldValues.putIfAbsent(element, () => <HInstruction, HInstruction>{});
     map.forEach((key, value) {
       if (mayAlias(receiver, key)) map[key] = null;
     });
@@ -2206,14 +2199,13 @@
   /**
    * Registers that `receiver.element` is now [value].
    */
-  void registerFieldValue(Element element,
-                          HInstruction receiver,
-                          HInstruction value) {
+  void registerFieldValue(
+      Element element, HInstruction receiver, HInstruction value) {
     if (backend.isNative(element)) {
       return; // TODO(14955): Remove this restriction?
     }
-    Map<HInstruction, HInstruction> map = fieldValues.putIfAbsent(
-        element, () => <HInstruction, HInstruction> {});
+    Map<HInstruction, HInstruction> map =
+        fieldValues.putIfAbsent(element, () => <HInstruction, HInstruction>{});
     map[receiver] = value;
   }
 
@@ -2241,8 +2233,8 @@
       nonEscapingReceivers.remove(input);
     });
 
-    if (instruction.sideEffects.changesInstanceProperty()
-        || instruction.sideEffects.changesStaticProperty()) {
+    if (instruction.sideEffects.changesInstanceProperty() ||
+        instruction.sideEffects.changesStaticProperty()) {
       fieldValues.forEach((element, map) {
         if (isFinal(element)) return;
         map.forEach((receiver, value) {
@@ -2276,11 +2268,10 @@
   /**
    * Registers that `receiver[index]` is now [value].
    */
-  void registerKeyedValue(HInstruction receiver,
-                          HInstruction index,
-                          HInstruction value) {
-    Map<HInstruction, HInstruction> map = keyedValues.putIfAbsent(
-        receiver, () => <HInstruction, HInstruction> {});
+  void registerKeyedValue(
+      HInstruction receiver, HInstruction index, HInstruction value) {
+    Map<HInstruction, HInstruction> map =
+        keyedValues.putIfAbsent(receiver, () => <HInstruction, HInstruction>{});
     map[index] = value;
   }
 
@@ -2288,9 +2279,8 @@
    * Sets `receiver[index]` to contain [value]. Kills all potential
    * places that may be affected by this update.
    */
-  void registerKeyedValueUpdate(HInstruction receiver,
-                                HInstruction index,
-                                HInstruction value) {
+  void registerKeyedValueUpdate(
+      HInstruction receiver, HInstruction index, HInstruction value) {
     nonEscapingReceivers.remove(value);
     keyedValues.forEach((key, values) {
       if (mayAlias(receiver, key)) {
@@ -2308,8 +2298,8 @@
     // Typed arrays may narrow incoming values.
     if (couldBeTypedArray(receiver)) return;
 
-    Map<HInstruction, HInstruction> map = keyedValues.putIfAbsent(
-        receiver, () => <HInstruction, HInstruction> {});
+    Map<HInstruction, HInstruction> map =
+        keyedValues.putIfAbsent(receiver, () => <HInstruction, HInstruction>{});
     map[index] = value;
   }
 
@@ -2318,14 +2308,12 @@
    * returns [first] if [first] and [second] are equal. Otherwise
    * creates or re-uses a phi in [block] that holds [first] and [second].
    */
-  HInstruction findCommonInstruction(HInstruction first,
-                                     HInstruction second,
-                                     HBasicBlock block,
-                                     int predecessorIndex) {
+  HInstruction findCommonInstruction(HInstruction first, HInstruction second,
+      HBasicBlock block, int predecessorIndex) {
     if (first == null || second == null) return null;
     if (first == second) return first;
-    TypeMask phiType = second.instructionType.union(
-          first.instructionType, compiler.world);
+    TypeMask phiType =
+        second.instructionType.union(first.instructionType, compiler.world);
     if (first is HPhi && first.block == block) {
       HPhi phi = first;
       phi.addInput(second);
@@ -2347,9 +2335,8 @@
   /**
    * Returns the intersection between [this] and [other].
    */
-  MemorySet intersectionFor(MemorySet other,
-                            HBasicBlock block,
-                            int predecessorIndex) {
+  MemorySet intersectionFor(
+      MemorySet other, HBasicBlock block, int predecessorIndex) {
     MemorySet result = new MemorySet(compiler);
     if (other == null) return result;
 
diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart
index 5139e5e..555b82c 100644
--- a/pkg/compiler/lib/src/ssa/ssa.dart
+++ b/pkg/compiler/lib/src/ssa/ssa.dart
@@ -4,80 +4,4 @@
 
 library ssa;
 
-import 'dart:collection';
-
-import 'package:js_runtime/shared/embedded_names.dart';
-
-import '../closure.dart';
-import '../common.dart';
-import '../common/codegen.dart' show
-    CodegenRegistry,
-    CodegenWorkItem;
-import '../common/names.dart' show
-    Identifiers,
-    Selectors;
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
-import '../constant_system_dart.dart';
-import '../constants/constant_system.dart';
-import '../constants/expressions.dart';
-import '../constants/values.dart';
-import '../core_types.dart' show
-    CoreClasses;
-import '../dart_types.dart';
-import '../diagnostics/messages.dart' show
-    Message,
-    MessageTemplate;
-import '../elements/elements.dart';
-import '../elements/modelx.dart' show
-    ConstructorBodyElementX,
-    ElementX,
-    VariableElementX;
-import '../io/source_information.dart';
-import '../js/js.dart' as js;
-import '../js_backend/backend_helpers.dart' show
-    BackendHelpers;
-import '../js_backend/js_backend.dart';
-import '../js_emitter/js_emitter.dart' show
-    CodeEmitterTask,
-    NativeEmitter;
-import '../native/native.dart' as native;
-import '../resolution/operators.dart';
-import '../resolution/semantic_visitor.dart';
-import '../resolution/tree_elements.dart' show
-    TreeElements;
-import '../tree/tree.dart' as ast;
-import '../types/types.dart';
-import '../types/constants.dart' show
-    computeTypeMask;
-import '../universe/call_structure.dart' show
-    CallStructure;
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/side_effects.dart' show
-    SideEffects;
-import '../universe/use.dart' show
-    DynamicUse,
-    StaticUse,
-    TypeUse;
-import '../util/util.dart';
-import '../world.dart' show
-    ClassWorld,
-    World;
-import '../dump_info.dart' show InfoReporter;
-
-part 'builder.dart';
-part 'codegen.dart';
-part 'codegen_helpers.dart';
-part 'interceptor_simplifier.dart';
-part 'invoke_dynamic_specializers.dart';
-part 'nodes.dart';
-part 'optimize.dart';
-part 'types.dart';
-part 'types_propagation.dart';
-part 'validate.dart';
-part 'variable_allocator.dart';
-part 'value_range_analyzer.dart';
-part 'value_set.dart';
+export 'builder.dart' show SsaFunctionCompiler;
diff --git a/pkg/compiler/lib/src/ssa/ssa_tracer.dart b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
index 841b0a2..9a6f6c6 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -4,18 +4,15 @@
 
 library ssa.tracer;
 
-import 'dart:async' show
-  EventSink;
+import 'dart:async' show EventSink;
 
-import 'ssa.dart';
-import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
-import '../diagnostics/invariant.dart' show
-    DEBUG_MODE;
+import '../compiler.dart' show Compiler;
+import '../diagnostics/invariant.dart' show DEBUG_MODE;
 import '../js_backend/js_backend.dart';
 import '../tracer.dart';
 
+import 'nodes.dart';
+
 /**
  * Outputs SSA code in a format readable by Hydra IR.
  * Tracing is disabled by default, see ../tracer.dart for how
@@ -62,11 +59,11 @@
     }
   }
 
-  void addInstructions(HInstructionStringifier stringifier,
-                       HInstructionList list) {
+  void addInstructions(
+      HInstructionStringifier stringifier, HInstructionList list) {
     for (HInstruction instruction = list.first;
-         instruction != null;
-         instruction = instruction.next) {
+        instruction != null;
+        instruction = instruction.next) {
       int bci = 0;
       int uses = instruction.usedBy.length;
       String changes = instruction.sideEffects.hasSideEffects() ? '!' : ' ';
@@ -163,29 +160,29 @@
     return "Boolify: ${temporaryId(node.inputs[0])}";
   }
 
-  String handleInvokeBinary(HInvokeBinary node, String op) {
+  String handleInvokeBinary(HInvokeBinary node, String opcode) {
     String left = temporaryId(node.left);
-    String right= temporaryId(node.right);
-    return '$left $op $right';
+    String right = temporaryId(node.right);
+    return '$opcode: $left $right';
   }
 
-  String visitAdd(HAdd node) => handleInvokeBinary(node, '+');
+  String visitAdd(HAdd node) => handleInvokeBinary(node, 'Add');
 
-  String visitBitAnd(HBitAnd node) => handleInvokeBinary(node, '&');
+  String visitBitAnd(HBitAnd node) => handleInvokeBinary(node, 'BitAnd');
 
   String visitBitNot(HBitNot node) {
     String operand = temporaryId(node.operand);
-    return "~$operand";
+    return "BitNot: $operand";
   }
 
-  String visitBitOr(HBitOr node) => handleInvokeBinary(node, '|');
+  String visitBitOr(HBitOr node) => handleInvokeBinary(node, 'BitOr');
 
-  String visitBitXor(HBitXor node) => handleInvokeBinary(node, '^');
+  String visitBitXor(HBitXor node) => handleInvokeBinary(node, 'BitXor');
 
   String visitBoundsCheck(HBoundsCheck node) {
     String lengthId = temporaryId(node.length);
     String indexId = temporaryId(node.index);
-    return "Bounds check: length = $lengthId, index = $indexId";
+    return "BoundsCheck: length = $lengthId, index = $indexId";
   }
 
   String visitBreak(HBreak node) {
@@ -196,7 +193,7 @@
     return "Break: (B${target.id})";
   }
 
-  String visitConstant(HConstant constant) => "Constant ${constant.constant}";
+  String visitConstant(HConstant constant) => "Constant: ${constant.constant}";
 
   String visitContinue(HContinue node) {
     HBasicBlock target = currentBlock.successors[0];
@@ -206,22 +203,22 @@
     return "Continue: (B${target.id})";
   }
 
-  String visitDivide(HDivide node) => handleInvokeBinary(node, '/');
+  String visitDivide(HDivide node) => handleInvokeBinary(node, 'Divide');
 
-  String visitExit(HExit node) => "exit";
+  String visitExit(HExit node) => "Exit";
 
   String visitFieldGet(HFieldGet node) {
     if (node.isNullCheck) {
-      return 'null check on ${temporaryId(node.receiver)}';
+      return 'FieldGet: NullCheck ${temporaryId(node.receiver)}';
     }
     String fieldName = node.element.name;
-    return 'field get ${temporaryId(node.receiver)}.$fieldName';
+    return 'FieldGet: ${temporaryId(node.receiver)}.$fieldName';
   }
 
   String visitFieldSet(HFieldSet node) {
     String valueId = temporaryId(node.value);
     String fieldName = node.element.name;
-    return 'field set ${temporaryId(node.receiver)}.$fieldName to $valueId';
+    return 'FieldSet: ${temporaryId(node.receiver)}.$fieldName to $valueId';
   }
 
   String visitReadModifyWrite(HReadModifyWrite node) {
@@ -230,23 +227,23 @@
     String op = node.jsOp;
     if (node.isAssignOp) {
       String valueId = temporaryId(node.value);
-      return 'field-update $receiverId.$fieldName $op= $valueId';
+      return 'ReadModifyWrite: $receiverId.$fieldName $op= $valueId';
     } else if (node.isPreOp) {
-      return 'field-update $op$receiverId.$fieldName';
+      return 'ReadModifyWrite: $op$receiverId.$fieldName';
     } else {
-      return 'field-update $receiverId.$fieldName$op';
+      return 'ReadModifyWrite: $receiverId.$fieldName$op';
     }
   }
 
   String visitLocalGet(HLocalGet node) {
     String localName = node.variable.name;
-    return 'local get ${temporaryId(node.local)}.$localName';
+    return 'LocalGet: ${temporaryId(node.local)}.$localName';
   }
 
   String visitLocalSet(HLocalSet node) {
     String valueId = temporaryId(node.value);
     String localName = node.variable.name;
-    return 'local set ${temporaryId(node.local)}.$localName to $valueId';
+    return 'LocalSet: ${temporaryId(node.local)}.$localName to $valueId';
   }
 
   String visitGoto(HGoto node) {
@@ -254,11 +251,12 @@
     return "Goto: (B${target.id})";
   }
 
-  String visitGreater(HGreater node) => handleInvokeBinary(node, '>');
+  String visitGreater(HGreater node) => handleInvokeBinary(node, 'Greater');
   String visitGreaterEqual(HGreaterEqual node) {
-    return handleInvokeBinary(node, '>=');
+    return handleInvokeBinary(node, 'GreaterEqual');
   }
-  String visitIdentity(HIdentity node) => handleInvokeBinary(node, '===');
+
+  String visitIdentity(HIdentity node) => handleInvokeBinary(node, 'Identity');
 
   String visitIf(HIf node) {
     HBasicBlock thenBlock = currentBlock.successors[0];
@@ -267,8 +265,8 @@
     return "If ($conditionId): (B${thenBlock.id}) else (B${elseBlock.id})";
   }
 
-  String visitGenericInvoke(String invokeType, String functionName,
-                            List<HInstruction> arguments) {
+  String handleGenericInvoke(
+      String invokeType, String functionName, List<HInstruction> arguments) {
     StringBuffer argumentsString = new StringBuffer();
     for (int i = 0; i < arguments.length; i++) {
       if (i != 0) argumentsString.write(", ");
@@ -296,59 +294,58 @@
       JavaScriptBackend backend = compiler.backend;
       String cls =
           backend.namer.suffixForGetInterceptor(node.interceptedClasses);
-      return "Intercept ($cls): $value";
+      return "Interceptor ($cls): $value";
     }
-    return "Intercept: $value";
+    return "Interceptor: $value";
   }
 
-  String visitInvokeClosure(HInvokeClosure node)
-      => visitInvokeDynamic(node, "closure");
+  String visitInvokeClosure(HInvokeClosure node) =>
+      handleInvokeDynamic(node, "InvokeClosure");
 
-  String visitInvokeDynamic(HInvokeDynamic invoke, String kind) {
+  String handleInvokeDynamic(HInvokeDynamic invoke, String kind) {
     String receiver = temporaryId(invoke.receiver);
     String name = invoke.selector.name;
-    String target = "($kind) $receiver.$name";
+    String target = "$receiver.$name";
     int offset = HInvoke.ARGUMENTS_OFFSET;
     List arguments = invoke.inputs.sublist(offset);
-    return visitGenericInvoke("Invoke", target, arguments) +
-        "(${invoke.mask})";
+    return handleGenericInvoke(kind, target, arguments) + "(${invoke.mask})";
   }
 
-  String visitInvokeDynamicMethod(HInvokeDynamicMethod node)
-      => visitInvokeDynamic(node, "method");
-  String visitInvokeDynamicGetter(HInvokeDynamicGetter node)
-      => visitInvokeDynamic(node, "get");
-  String visitInvokeDynamicSetter(HInvokeDynamicSetter node)
-      => visitInvokeDynamic(node, "set");
+  String visitInvokeDynamicMethod(HInvokeDynamicMethod node) =>
+      handleInvokeDynamic(node, "InvokeDynamicMethod");
+  String visitInvokeDynamicGetter(HInvokeDynamicGetter node) =>
+      handleInvokeDynamic(node, "InvokeDynamicGetter");
+  String visitInvokeDynamicSetter(HInvokeDynamicSetter node) =>
+      handleInvokeDynamic(node, "InvokeDynamicSetter");
 
   String visitInvokeStatic(HInvokeStatic invoke) {
     String target = invoke.element.name;
-    return visitGenericInvoke("Invoke", target, invoke.inputs);
+    return handleGenericInvoke("InvokeStatic", target, invoke.inputs);
   }
 
   String visitInvokeSuper(HInvokeSuper invoke) {
     String target = invoke.element.name;
-    return visitGenericInvoke("Invoke super", target, invoke.inputs);
+    return handleGenericInvoke("InvokeSuper", target, invoke.inputs);
   }
 
   String visitInvokeConstructorBody(HInvokeConstructorBody invoke) {
     String target = invoke.element.name;
-    return visitGenericInvoke("Invoke constructor body", target, invoke.inputs);
+    return handleGenericInvoke("InvokeConstructorBody", target, invoke.inputs);
   }
 
   String visitForeignCode(HForeignCode foreign) {
-    return visitGenericInvoke("Foreign", "${foreign.codeTemplate.ast}",
-                              foreign.inputs);
+    return handleGenericInvoke(
+        "ForeignCode", "${foreign.codeTemplate.ast}", foreign.inputs);
   }
 
   String visitForeignNew(HForeignNew node) {
-    return visitGenericInvoke("New",
-                              "${node.element.name}",
-                              node.inputs);
+    return handleGenericInvoke(
+        "ForeignNew", "${node.element.name}", node.inputs);
   }
 
-  String visitLess(HLess node) => handleInvokeBinary(node, '<');
-  String visitLessEqual(HLessEqual node) => handleInvokeBinary(node, '<=');
+  String visitLess(HLess node) => handleInvokeBinary(node, 'Less');
+  String visitLessEqual(HLessEqual node) =>
+      handleInvokeBinary(node, 'LessEqual');
 
   String visitLiteralList(HLiteralList node) {
     StringBuffer elementsString = new StringBuffer();
@@ -356,65 +353,65 @@
       if (i != 0) elementsString.write(", ");
       elementsString.write(temporaryId(node.inputs[i]));
     }
-    return "Literal list: [$elementsString]";
+    return "LiteralList: [$elementsString]";
   }
 
   String visitLoopBranch(HLoopBranch branch) {
     HBasicBlock bodyBlock = currentBlock.successors[0];
     HBasicBlock exitBlock = currentBlock.successors[1];
     String conditionId = temporaryId(branch.inputs[0]);
-    return "While ($conditionId): (B${bodyBlock.id}) then (B${exitBlock.id})";
+    return "LoopBranch ($conditionId): (B${bodyBlock.id}) then (B${exitBlock.id})";
   }
 
-  String visitMultiply(HMultiply node) => handleInvokeBinary(node, '*');
+  String visitMultiply(HMultiply node) => handleInvokeBinary(node, 'Multiply');
 
   String visitNegate(HNegate node) {
     String operand = temporaryId(node.operand);
-    return "-$operand";
+    return "Negate: $operand";
   }
 
   String visitNot(HNot node) => "Not: ${temporaryId(node.inputs[0])}";
 
   String visitParameterValue(HParameterValue node) {
-    return "p${node.sourceElement.name}";
+    return "ParameterValue: ${node.sourceElement.name}";
   }
 
   String visitLocalValue(HLocalValue node) {
-    return "l${node.sourceElement.name}";
+    return "LocalValue: ${node.sourceElement.name}";
   }
 
   String visitPhi(HPhi phi) {
     StringBuffer buffer = new StringBuffer();
-    buffer.write("Phi(");
+    buffer.write("Phi: ");
     for (int i = 0; i < phi.inputs.length; i++) {
       if (i > 0) buffer.write(", ");
       buffer.write(temporaryId(phi.inputs[i]));
     }
-    buffer.write(")");
     return buffer.toString();
   }
 
   String visitRef(HRef node) {
-    return 'Ref ${temporaryId(node.value)}';
+    return 'Ref: ${temporaryId(node.value)}';
   }
 
-  String visitReturn(HReturn node) => "Return ${temporaryId(node.inputs[0])}";
+  String visitReturn(HReturn node) => "Return: ${temporaryId(node.inputs[0])}";
 
-  String visitShiftLeft(HShiftLeft node) => handleInvokeBinary(node, '<<');
-  String visitShiftRight(HShiftRight node) => handleInvokeBinary(node, '>>');
+  String visitShiftLeft(HShiftLeft node) =>
+      handleInvokeBinary(node, 'ShiftLeft');
+  String visitShiftRight(HShiftRight node) =>
+      handleInvokeBinary(node, 'ShiftRight');
 
-  String visitStatic(HStatic node)
-      => "Static ${node.element.name}";
+  String visitStatic(HStatic node) => "Static: ${node.element.name}";
 
-  String visitLazyStatic(HLazyStatic node)
-      => "LazyStatic ${node.element.name}";
+  String visitLazyStatic(HLazyStatic node) =>
+      "LazyStatic: ${node.element.name}";
 
-  String visitOneShotInterceptor(HOneShotInterceptor node)
-      => visitInvokeDynamic(node, "one shot interceptor");
+  String visitOneShotInterceptor(HOneShotInterceptor node) =>
+      handleInvokeDynamic(node, "OneShotInterceptor");
 
   String visitStaticStore(HStaticStore node) {
     String lhs = node.element.name;
-    return "Static $lhs = ${temporaryId(node.inputs[0])}";
+    return "StaticStore: $lhs = ${temporaryId(node.inputs[0])}";
   }
 
   String visitStringConcat(HStringConcat node) {
@@ -424,10 +421,10 @@
   }
 
   String visitStringify(HStringify node) {
-    return "Stringify ${temporaryId(node.inputs[0])}";
+    return "Stringify: ${temporaryId(node.inputs[0])}";
   }
 
-  String visitSubtract(HSubtract node) => handleInvokeBinary(node, '-');
+  String visitSubtract(HSubtract node) => handleInvokeBinary(node, 'Subtract');
 
   String visitSwitch(HSwitch node) {
     StringBuffer buf = new StringBuffer();
@@ -445,20 +442,20 @@
     return buf.toString();
   }
 
-  String visitThis(HThis node) => "this";
+  String visitThis(HThis node) => "This";
 
-  String visitThrow(HThrow node) => "Throw ${temporaryId(node.inputs[0])}";
+  String visitThrow(HThrow node) => "Throw: ${temporaryId(node.inputs[0])}";
 
   String visitThrowExpression(HThrowExpression node) {
-    return "ThrowExpression ${temporaryId(node.inputs[0])}";
+    return "ThrowExpression: ${temporaryId(node.inputs[0])}";
   }
 
   String visitTruncatingDivide(HTruncatingDivide node) {
-    return handleInvokeBinary(node, '~/');
+    return handleInvokeBinary(node, 'TruncatingDivide');
   }
 
   String visitExitTry(HExitTry node) {
-    return "Exit try";
+    return "ExitTry";
   }
 
   String visitTry(HTry node) {
@@ -480,21 +477,20 @@
 
   String visitIs(HIs node) {
     String type = node.typeExpression.toString();
-    return "TypeTest: ${temporaryId(node.expression)} is $type";
+    return "Is: ${temporaryId(node.expression)} is $type";
   }
 
   String visitIsViaInterceptor(HIsViaInterceptor node) {
     String type = node.typeExpression.toString();
-    return "TypeTest: ${temporaryId(node.inputs[0])} is $type";
+    return "IsViaInterceptor: ${temporaryId(node.inputs[0])} is $type";
   }
 
   String visitTypeConversion(HTypeConversion node) {
     assert(node.inputs.length <= 2);
-    String otherInput = (node.inputs.length == 2)
-        ? temporaryId(node.inputs[1])
-        : '';
+    String otherInput =
+        (node.inputs.length == 2) ? temporaryId(node.inputs[1]) : '';
     return "TypeConversion: ${temporaryId(node.checkedInput)} to "
-      "${node.instructionType} $otherInput";
+        "${node.instructionType} $otherInput";
   }
 
   String visitTypeKnown(HTypeKnown node) {
@@ -532,10 +528,10 @@
   }
 
   String visitAwait(HAwait node) {
-    return "await ${temporaryId(node.inputs[0])}";
+    return "Await: ${temporaryId(node.inputs[0])}";
   }
 
   String visitYield(HYield node) {
-    return "yield${node.hasStar ? "*" : ""} ${temporaryId(node.inputs[0])}";
+    return "Yield${node.hasStar ? "*" : ""}: ${temporaryId(node.inputs[0])}";
   }
 }
diff --git a/pkg/compiler/lib/src/ssa/types.dart b/pkg/compiler/lib/src/ssa/types.dart
index a34e60b..2a7ecff 100644
--- a/pkg/compiler/lib/src/ssa/types.dart
+++ b/pkg/compiler/lib/src/ssa/types.dart
@@ -2,7 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of ssa;
+import '../compiler.dart' show Compiler;
+import '../core_types.dart' show CoreClasses;
+import '../elements/elements.dart';
+import '../js_backend/js_backend.dart';
+import '../native/native.dart' as native;
+import '../tree/tree.dart' as ast;
+import '../types/types.dart';
+import '../universe/selector.dart' show Selector;
+import '../world.dart' show ClassWorld, World;
 
 class TypeMaskFactory {
   static TypeMask fromInferredType(TypeMask mask, Compiler compiler) {
@@ -14,33 +22,29 @@
   static TypeMask inferredReturnTypeForElement(
       Element element, Compiler compiler) {
     return fromInferredType(
-        compiler.typesTask.getGuaranteedReturnTypeOfElement(element),
-        compiler);
+        compiler.typesTask.getGuaranteedReturnTypeOfElement(element), compiler);
   }
 
   static TypeMask inferredTypeForElement(Element element, Compiler compiler) {
     return fromInferredType(
-        compiler.typesTask.getGuaranteedTypeOfElement(element),
-        compiler);
+        compiler.typesTask.getGuaranteedTypeOfElement(element), compiler);
   }
 
-  static TypeMask inferredTypeForSelector(Selector selector,
-                                          TypeMask mask,
-                                          Compiler compiler) {
+  static TypeMask inferredTypeForSelector(
+      Selector selector, TypeMask mask, Compiler compiler) {
     return fromInferredType(
         compiler.typesTask.getGuaranteedTypeOfSelector(selector, mask),
         compiler);
   }
 
-  static TypeMask inferredForNode(Element owner, ast.Node node,
-                                  Compiler compiler) {
+  static TypeMask inferredForNode(
+      Element owner, ast.Node node, Compiler compiler) {
     return fromInferredType(
-        compiler.typesTask.getGuaranteedTypeOfNode(owner, node),
-        compiler);
+        compiler.typesTask.getGuaranteedTypeOfNode(owner, node), compiler);
   }
 
-  static TypeMask fromNativeBehavior(native.NativeBehavior nativeBehavior,
-                                     Compiler compiler) {
+  static TypeMask fromNativeBehavior(
+      native.NativeBehavior nativeBehavior, Compiler compiler) {
     ClassWorld classWorld = compiler.world;
     JavaScriptBackend backend = compiler.backend;
     if (nativeBehavior.typesReturned.isEmpty) return backend.dynamicType;
@@ -48,7 +52,7 @@
     TypeMask result = nativeBehavior.typesReturned
         .map((type) => fromNativeType(type, compiler))
         .reduce((t1, t2) => t1.union(t2, classWorld));
-    assert(!(result.isEmpty && !result.isNullable));
+    assert(!result.isEmpty);
     return result;
   }
 
diff --git a/pkg/compiler/lib/src/ssa/types_propagation.dart b/pkg/compiler/lib/src/ssa/types_propagation.dart
index adda76e..e5ad513 100644
--- a/pkg/compiler/lib/src/ssa/types_propagation.dart
+++ b/pkg/compiler/lib/src/ssa/types_propagation.dart
@@ -2,7 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of ssa;
+import '../compiler.dart' show Compiler;
+import '../elements/elements.dart';
+import '../js_backend/js_backend.dart';
+import '../types/types.dart';
+import '../universe/selector.dart' show Selector;
+import '../world.dart' show ClassWorld, World;
+
+import 'nodes.dart';
+import 'optimize.dart';
 
 class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
   final Map<int, HInstruction> workmap = new Map<int, HInstruction>();
@@ -90,7 +98,6 @@
     } while (!worklist.isEmpty);
   }
 
-
   void addToWorkList(HInstruction instruction) {
     final int id = instruction.id;
 
@@ -167,25 +174,25 @@
       // We must make sure a type conversion for receiver or argument check
       // does not try to do an int check, because an int check is not enough.
       // We only do an int check if the input is integer or null.
-      if (checkedType.containsOnlyNum(classWorld)
-          && !checkedType.containsOnlyDouble(classWorld)
-          && input.isIntegerOrNull(compiler)) {
+      if (checkedType.containsOnlyNum(classWorld) &&
+          !checkedType.containsOnlyDouble(classWorld) &&
+          input.isIntegerOrNull(compiler)) {
         instruction.checkedType = backend.intType;
-      } else if (checkedType.containsOnlyInt(classWorld)
-                 && !input.isIntegerOrNull(compiler)) {
+      } else if (checkedType.containsOnlyInt(classWorld) &&
+          !input.isIntegerOrNull(compiler)) {
         instruction.checkedType = backend.numType;
       }
     }
 
     TypeMask outputType = checkedType.intersection(inputType, classWorld);
-    if (outputType.isEmpty && !outputType.isNullable) {
+    if (outputType.isEmpty) {
       // Intersection of double and integer conflicts (is empty), but JS numbers
       // can be both int and double at the same time.  For example, the input
       // can be a literal double '8.0' that is marked as an integer (because 'is
       // int' will return 'true').  What we really need to do is make the
       // overlap between int and double values explicit in the TypeMask system.
-      if (inputType.containsOnlyInt(classWorld)
-          && checkedType.containsOnlyDouble(classWorld)) {
+      if (inputType.containsOnlyInt(classWorld) &&
+          checkedType.containsOnlyDouble(classWorld)) {
         if (inputType.isNullable && checkedType.isNullable) {
           outputType = backend.doubleType.nullable();
         } else {
@@ -210,22 +217,19 @@
     return outputType;
   }
 
-  void convertInput(HInvokeDynamic instruction,
-                    HInstruction input,
-                    TypeMask type,
-                    int kind) {
+  void convertInput(
+      HInvokeDynamic instruction, HInstruction input, TypeMask type, int kind) {
     Selector selector = (kind == HTypeConversion.RECEIVER_TYPE_CHECK)
         ? instruction.selector
         : null;
-    HTypeConversion converted = new HTypeConversion(
-        null, kind, type, input, selector)
-        ..sourceInformation = instruction.sourceInformation;
+    HTypeConversion converted =
+        new HTypeConversion(null, kind, type, input, selector)
+          ..sourceInformation = instruction.sourceInformation;
     instruction.block.addBefore(instruction, converted);
     input.replaceAllUsersDominatedBy(instruction, converted);
   }
 
-  bool isCheckEnoughForNsmOrAe(HInstruction instruction,
-                               TypeMask type) {
+  bool isCheckEnoughForNsmOrAe(HInstruction instruction, TypeMask type) {
     // In some cases, we want the receiver to be an integer,
     // but that does not mean we will get a NoSuchMethodError
     // if it's not: the receiver could be a double.
@@ -246,20 +250,20 @@
     HInstruction receiver = instruction.inputs[1];
     if (receiver.isNumber(compiler)) return false;
     if (receiver.isNumberOrNull(compiler)) {
-      convertInput(instruction,
-                   receiver,
-                   receiver.instructionType.nonNullable(),
-                   HTypeConversion.RECEIVER_TYPE_CHECK);
+      convertInput(
+          instruction,
+          receiver,
+          receiver.instructionType.nonNullable(),
+          HTypeConversion.RECEIVER_TYPE_CHECK);
       return true;
     } else if (instruction.element == null) {
-      Iterable<Element> targets =
-          compiler.world.allFunctions.filter(
-              instruction.selector, instruction.mask);
+      Iterable<Element> targets = compiler.world.allFunctions
+          .filter(instruction.selector, instruction.mask);
       if (targets.length == 1) {
         Element target = targets.first;
         ClassElement cls = target.enclosingClass;
-        TypeMask type = new TypeMask.nonNullSubclass(
-            cls.declaration, classWorld);
+        TypeMask type =
+            new TypeMask.nonNullSubclass(cls.declaration, classWorld);
         // TODO(ngeoffray): We currently only optimize on primitive
         // types.
         if (!type.satisfies(backend.helpers.jsIndexableClass, classWorld) &&
@@ -269,10 +273,8 @@
         }
         if (!isCheckEnoughForNsmOrAe(receiver, type)) return false;
         instruction.element = target;
-        convertInput(instruction,
-                     receiver,
-                     type,
-                     HTypeConversion.RECEIVER_TYPE_CHECK);
+        convertInput(
+            instruction, receiver, type, HTypeConversion.RECEIVER_TYPE_CHECK);
         return true;
       }
     }
@@ -284,7 +286,7 @@
   // Return true if the argument type check was added.
   bool checkArgument(HInvokeDynamic instruction) {
     // We want the right error in checked mode.
-    if (compiler.enableTypeAssertions) return false;
+    if (compiler.options.enableTypeAssertions) return false;
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
 
@@ -298,10 +300,8 @@
       // variant and will do the check in their method anyway. We
       // still add a check because it allows to GVN these operations,
       // but we should find a better way.
-      convertInput(instruction,
-                   right,
-                   type,
-                   HTypeConversion.ARGUMENT_TYPE_CHECK);
+      convertInput(
+          instruction, right, type, HTypeConversion.ARGUMENT_TYPE_CHECK);
       return true;
     }
     return false;
@@ -331,18 +331,19 @@
       // We cannot do the following optimization now, because we have
       // to wait for the type propagation to be stable. The receiver
       // of [instruction] might move from number to dynamic.
-      pendingOptimizations.putIfAbsent(instruction, () => () {
-        Selector selector = instruction.selector;
-        if (selector.isOperator && selector.name != '==') {
-          if (checkReceiver(instruction)) {
-            addAllUsersBut(instruction, instruction.inputs[1]);
-          }
-          if (!selector.isUnaryOperator &&
-              checkArgument(instruction)) {
-            addAllUsersBut(instruction, instruction.inputs[2]);
-          }
-        }
-      });
+      pendingOptimizations.putIfAbsent(
+          instruction,
+          () => () {
+                Selector selector = instruction.selector;
+                if (selector.isOperator && selector.name != '==') {
+                  if (checkReceiver(instruction)) {
+                    addAllUsersBut(instruction, instruction.inputs[1]);
+                  }
+                  if (!selector.isUnaryOperator && checkArgument(instruction)) {
+                    addAllUsersBut(instruction, instruction.inputs[2]);
+                  }
+                }
+              });
     }
 
     HInstruction receiver = instruction.getDartReceiver(compiler);
@@ -350,10 +351,10 @@
     instruction.mask = receiverType;
 
     // Try to specialize the receiver after this call.
-    if (receiver.dominatedUsers(instruction).length != 1
-        && !instruction.selector.isClosureCall) {
-      TypeMask newType = compiler.world.allFunctions.receiverType(
-              instruction.selector, instruction.mask);
+    if (receiver.dominatedUsers(instruction).length != 1 &&
+        !instruction.selector.isClosureCall) {
+      TypeMask newType = compiler.world.allFunctions
+          .receiverType(instruction.selector, instruction.mask);
       newType = newType.intersection(receiverType, classWorld);
       var next = instruction.next;
       if (next is HTypeKnown && next.checkedInput == receiver) {
@@ -377,7 +378,7 @@
       }
     }
 
-    return instruction.specializer.computeTypeFromInputTypes(
-        instruction, compiler);
+    return instruction.specializer
+        .computeTypeFromInputTypes(instruction, compiler);
   }
 }
diff --git a/pkg/compiler/lib/src/ssa/validate.dart b/pkg/compiler/lib/src/ssa/validate.dart
index 2858204..31e9125 100644
--- a/pkg/compiler/lib/src/ssa/validate.dart
+++ b/pkg/compiler/lib/src/ssa/validate.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.
 
-part of ssa;
+import 'nodes.dart';
 
 class HValidator extends HInstructionVisitor {
   bool isValid = true;
@@ -22,22 +22,22 @@
   // not required to be valid yet.
   void visitBasicBlock(HBasicBlock block) {
     currentBlock = block;
-    if (!isValid) return;  // Don't need to continue if we are already invalid.
+    if (!isValid) return; // Don't need to continue if we are already invalid.
 
     // Test that the last instruction is a branching instruction and that the
     // basic block contains the branch-target.
     if (block.first == null || block.last == null) {
       markInvalid("empty block");
     }
-    if (block.last is !HControlFlow) {
+    if (block.last is! HControlFlow) {
       markInvalid("block ends with non-tail node.");
     }
     if (block.last is HIf && block.successors.length != 2) {
       markInvalid("If node without two successors");
     }
     if (block.last is HConditionalBranch && block.successors.length != 2) {
-        markInvalid("Conditional node without two successors");
-      }
+      markInvalid("Conditional node without two successors");
+    }
     if (block.last is HLoopBranch) {
       // Assert that the block we inserted to avoid critical edges satisfies
       // our assumptions. That is, it must not contain any instructions
@@ -56,7 +56,7 @@
     if ((block.last is HReturn || block.last is HThrow) &&
         (block.successors.length != 1 || !block.successors[0].isExitBlock())) {
       markInvalid("Return or throw node with > 1 successor "
-                  "or not going to exit-block");
+          "or not going to exit-block");
     }
     if (block.last is HExit && !block.successors.isEmpty) {
       markInvalid("Exit block with successor");
@@ -77,8 +77,10 @@
       }
     }
     // Make sure we don't have a critical edge.
-    if (isValid && block.successors.length > 1 &&
-        block.last is! HTry && block.last is! HExitTry &&
+    if (isValid &&
+        block.successors.length > 1 &&
+        block.last is! HTry &&
+        block.last is! HExitTry &&
         block.last is! HSwitch) {
       for (HBasicBlock successor in block.successors) {
         if (!isValid) break;
@@ -131,8 +133,8 @@
   }
 
   /** Returns how often [instruction] is contained in [instructions]. */
-  static int countInstruction(List<HInstruction> instructions,
-                              HInstruction instruction) {
+  static int countInstruction(
+      List<HInstruction> instructions, HInstruction instruction) {
     int result = 0;
     for (int i = 0; i < instructions.length; i++) {
       if (identical(instructions[i], instruction)) result++;
@@ -170,8 +172,8 @@
       bool inBasicBlock = instruction.isInBasicBlock();
       return everyInstruction(instruction.inputs, (input, count) {
         if (inBasicBlock) {
-          return input.isInBasicBlock()
-              && countInstruction(input.usedBy, instruction) == count;
+          return input.isInBasicBlock() &&
+              countInstruction(input.usedBy, instruction) == count;
         } else {
           return countInstruction(input.usedBy, instruction) == 0;
         }
@@ -182,8 +184,8 @@
     bool hasCorrectUses() {
       if (!instruction.isInBasicBlock()) return true;
       return everyInstruction(instruction.usedBy, (use, count) {
-        return use.isInBasicBlock()
-            && countInstruction(use.inputs, instruction) == count;
+        return use.isInBasicBlock() &&
+            countInstruction(use.inputs, instruction) == count;
       });
     }
 
diff --git a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
index 7cd149e..8893e90 100644
--- a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
+++ b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
@@ -2,8 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of ssa;
+import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
+import '../compiler.dart' show Compiler;
+import '../constant_system_dart.dart';
+import '../constants/constant_system.dart';
+import '../constants/values.dart';
+import '../js_backend/js_backend.dart';
 
+import 'nodes.dart';
+import 'optimize.dart';
 
 class ValueRangeInfo {
   final ConstantSystem constantSystem;
@@ -49,9 +56,8 @@
   }
 
   Range newMarkerRange() {
-    return new Range(new MarkerValue(false, this),
-                     new MarkerValue(true, this),
-                     this);
+    return new Range(
+        new MarkerValue(false, this), new MarkerValue(true, this), this);
   }
 }
 
@@ -66,7 +72,7 @@
 
   Value operator +(Value other) => const UnknownValue();
   Value operator -(Value other) => const UnknownValue();
-  Value operator -()  => const UnknownValue();
+  Value operator -() => const UnknownValue();
   Value operator &(Value other) => const UnknownValue();
 
   Value min(Value other) {
@@ -131,7 +137,7 @@
 
   Value operator +(other) {
     if (other.isZero) return this;
-    if (other is !IntValue) return other + this;
+    if (other is! IntValue) return other + this;
     ConstantSystem constantSystem = info.constantSystem;
     var constant = constantSystem.add.fold(
         constantSystem.createInt(value), constantSystem.createInt(other.value));
@@ -141,7 +147,7 @@
 
   Value operator -(other) {
     if (other.isZero) return this;
-    if (other is !IntValue) return -other + this;
+    if (other is! IntValue) return -other + this;
     ConstantSystem constantSystem = info.constantSystem;
     var constant = constantSystem.subtract.fold(
         constantSystem.createInt(value), constantSystem.createInt(other.value));
@@ -152,14 +158,13 @@
   Value operator -() {
     if (isZero) return this;
     ConstantSystem constantSystem = info.constantSystem;
-    var constant = constantSystem.negate.fold(
-        constantSystem.createInt(value));
+    var constant = constantSystem.negate.fold(constantSystem.createInt(value));
     if (!constant.isInt) return const UnknownValue();
     return info.newIntValue(constant.primitiveValue);
   }
 
   Value operator &(other) {
-    if (other is !IntValue) return const UnknownValue();
+    if (other is! IntValue) return const UnknownValue();
     ConstantSystem constantSystem = info.constantSystem;
     var constant = constantSystem.bitAnd.fold(
         constantSystem.createInt(value), constantSystem.createInt(other.value));
@@ -167,17 +172,17 @@
   }
 
   Value min(other) {
-    if (other is !IntValue) return other.min(this);
+    if (other is! IntValue) return other.min(this);
     return this.value < other.value ? this : other;
   }
 
   Value max(other) {
-    if (other is !IntValue) return other.max(this);
+    if (other is! IntValue) return other.max(this);
     return this.value < other.value ? other : this;
   }
 
   bool operator ==(other) {
-    if (other is !IntValue) return false;
+    if (other is! IntValue) return false;
     return this.value == other.value;
   }
 
@@ -245,7 +250,7 @@
   InstructionValue(this.instruction, info) : super(info);
 
   bool operator ==(other) {
-    if (other is !InstructionValue) return false;
+    if (other is! InstructionValue) return false;
     return this.instruction == other.instruction;
   }
 
@@ -312,9 +317,9 @@
   AddValue(left, right, info) : super(left, right, info);
 
   bool operator ==(other) {
-    if (other is !AddValue) return false;
-    return (left == other.left && right == other.right)
-      || (left == other.right && right == other.left);
+    if (other is! AddValue) return false;
+    return (left == other.left && right == other.right) ||
+        (left == other.right && right == other.left);
   }
 
   int get hashCode => throw new UnsupportedError('AddValue.hashCode');
@@ -360,7 +365,7 @@
   SubtractValue(left, right, info) : super(left, right, info);
 
   bool operator ==(other) {
-    if (other is !SubtractValue) return false;
+    if (other is! SubtractValue) return false;
     return left == other.left && right == other.right;
   }
 
@@ -408,7 +413,7 @@
   NegateValue(this.value, info) : super(info);
 
   bool operator ==(other) {
-    if (other is !NegateValue) return false;
+    if (other is! NegateValue) return false;
     return value == other.value;
   }
 
@@ -474,10 +479,9 @@
    * Checks if the given values are unknown, and creates a
    * range that does not have any unknown values.
    */
-  Range.normalize(Value low, Value up, info) : this(
-      low == const UnknownValue() ? const MinIntValue() : low,
-      up == const UnknownValue() ? const MaxIntValue() : up,
-      info);
+  Range.normalize(Value low, Value up, info)
+      : this(low == const UnknownValue() ? const MinIntValue() : low,
+            up == const UnknownValue() ? const MaxIntValue() : up, info);
 
   Range union(Range other) {
     return info.newNormalizedRange(
@@ -490,14 +494,20 @@
     // If we could not compute max or min, pick a value in the two
     // ranges, with priority to [IntValue]s because they are simpler.
     if (low == const UnknownValue()) {
-      if (lower is IntValue) low = lower;
-      else if (other.lower is IntValue) low = other.lower;
-      else low = lower;
+      if (lower is IntValue)
+        low = lower;
+      else if (other.lower is IntValue)
+        low = other.lower;
+      else
+        low = lower;
     }
     if (up == const UnknownValue()) {
-      if (upper is IntValue) up = upper;
-      else if (other.upper is IntValue) up = other.upper;
-      else up = upper;
+      if (upper is IntValue)
+        up = upper;
+      else if (other.upper is IntValue)
+        up = other.upper;
+      else
+        up = upper;
     }
     return info.newNormalizedRange(low, up);
   }
@@ -515,10 +525,10 @@
   }
 
   Range operator &(Range other) {
-    if (isSingleValue
-        && other.isSingleValue
-        && lower is IntValue
-        && other.lower is IntValue) {
+    if (isSingleValue &&
+        other.isSingleValue &&
+        lower is IntValue &&
+        other.lower is IntValue) {
       return info.newNormalizedRange(lower & other.lower, upper & other.upper);
     }
     if (isPositive && other.isPositive) {
@@ -600,10 +610,8 @@
   CodegenWorkItem work;
   HGraph graph;
 
-  SsaValueRangeAnalyzer(this.compiler,
-                        constantSystem,
-                        this.optimizer,
-                        this.work)
+  SsaValueRangeAnalyzer(
+      this.compiler, constantSystem, this.optimizer, this.work)
       : info = new ValueRangeInfo(constantSystem),
         this.constantSystem = constantSystem;
 
@@ -626,7 +634,6 @@
   }
 
   void visitBasicBlock(HBasicBlock block) {
-
     void visit(HInstruction instruction) {
       Range range = instruction.accept(this);
       if (instruction.isInteger(compiler)) {
@@ -725,14 +732,14 @@
     // Check if the index is strictly below the upper bound of the length
     // range.
     Value maxIndex = lengthRange.upper - info.intOne;
-    bool belowLength = maxIndex != const MaxIntValue()
-        && indexRange.upper.min(maxIndex) == indexRange.upper;
+    bool belowLength = maxIndex != const MaxIntValue() &&
+        indexRange.upper.min(maxIndex) == indexRange.upper;
 
     // Check if the index is strictly below the lower bound of the length
     // range.
-    belowLength = belowLength
-        || (indexRange.upper != lengthRange.lower
-            && indexRange.upper.min(lengthRange.lower) == indexRange.upper);
+    belowLength = belowLength ||
+        (indexRange.upper != lengthRange.lower &&
+            indexRange.upper.min(lengthRange.lower) == indexRange.upper);
     if (indexRange.isPositive && belowLength) {
       check.block.rewrite(check, check.index);
       check.block.remove(check);
@@ -752,16 +759,15 @@
       // greater or equal than the lower bound of the index.
       Value low = lengthRange.lower.max(indexRange.lower);
       if (low != const UnknownValue()) {
-        HInstruction instruction =
-            createRangeConversion(next, check.length);
+        HInstruction instruction = createRangeConversion(next, check.length);
         ranges[instruction] = info.newNormalizedRange(low, lengthRange.upper);
       }
     }
 
     // Update the range of the index if using the maximum index
     // narrows it. Use that new range for this instruction as well.
-    Range newIndexRange = indexRange.intersection(
-        info.newNormalizedRange(info.intZero, maxIndex));
+    Range newIndexRange = indexRange
+        .intersection(info.newNormalizedRange(info.intZero, maxIndex));
     if (indexRange == newIndexRange) return indexRange;
     // Explicitly attach the range information to the index instruction,
     // which may be used by other instructions.  Returning the new range will
@@ -783,12 +789,12 @@
     if (relational is HIdentity) {
       handleEqualityCheck(relational);
     } else if (operation.apply(leftRange, rightRange)) {
-      relational.block.rewrite(
-          relational, graph.addConstantBool(true, compiler));
+      relational.block
+          .rewrite(relational, graph.addConstantBool(true, compiler));
       relational.block.remove(relational);
     } else if (negateOperation(operation).apply(leftRange, rightRange)) {
-      relational.block.rewrite(
-          relational, graph.addConstantBool(false, compiler));
+      relational.block
+          .rewrite(relational, graph.addConstantBool(false, compiler));
       relational.block.remove(relational);
     }
     return info.newUnboundRange();
@@ -798,8 +804,7 @@
     Range right = ranges[node.right];
     Range left = ranges[node.left];
     if (left.isSingleValue && right.isSingleValue && left == right) {
-      node.block.rewrite(
-          node, graph.addConstantBool(true, compiler));
+      node.block.rewrite(node, graph.addConstantBool(true, compiler));
       node.block.remove(node);
     }
   }
@@ -813,18 +818,18 @@
       // so special case those.
       if (left.isInteger(compiler) && right.isInteger(compiler)) {
         if (divisor.isPositive) {
-          return info.newNormalizedRange(info.intZero, divisor.upper -
-              info.intOne);
+          return info.newNormalizedRange(
+              info.intZero, divisor.upper - info.intOne);
         } else if (divisor.isNegative) {
-          return info.newNormalizedRange(info.intZero, info.newNegateValue(
-              divisor.lower) - info.intOne);
+          return info.newNormalizedRange(
+              info.intZero, info.newNegateValue(divisor.lower) - info.intOne);
         }
       } else if (left.isNumber(compiler) && right.isNumber(compiler)) {
         if (divisor.isPositive) {
           return info.newNormalizedRange(info.intZero, divisor.upper);
         } else if (divisor.isNegative) {
-          return info.newNormalizedRange(info.intZero, info.newNegateValue(
-              divisor.lower));
+          return info.newNormalizedRange(
+              info.intZero, info.newNegateValue(divisor.lower));
         }
       }
     }
@@ -839,8 +844,9 @@
 
   Range handleBinaryOperation(HBinaryArithmetic instruction) {
     if (!instruction.isInteger(compiler)) return info.newUnboundRange();
-    return instruction.operation(constantSystem).apply(
-        ranges[instruction.left], ranges[instruction.right]);
+    return instruction
+        .operation(constantSystem)
+        .apply(ranges[instruction.left], ranges[instruction.right]);
   }
 
   Range visitAdd(HAdd add) {
@@ -884,8 +890,8 @@
     return ranges[instruction.checkedInput];
   }
 
-  HInstruction createRangeConversion(HInstruction cursor,
-                                     HInstruction instruction) {
+  HInstruction createRangeConversion(
+      HInstruction cursor, HInstruction instruction) {
     JavaScriptBackend backend = compiler.backend;
     HRangeConversion newInstruction =
         new HRangeConversion(instruction, backend.intType);
@@ -925,9 +931,8 @@
     }
   }
 
-  Range computeConstrainedRange(BinaryOperation operation,
-                                Range leftRange,
-                                Range rightRange) {
+  Range computeConstrainedRange(
+      BinaryOperation operation, Range leftRange, Range rightRange) {
     Range range;
     if (operation == const LessOperation()) {
       range = info.newNormalizedRange(
@@ -948,7 +953,7 @@
   Range visitConditionalBranch(HConditionalBranch branch) {
     var condition = branch.condition;
     // TODO(ngeoffray): Handle complex conditions.
-    if (condition is !HRelational) return info.newUnboundRange();
+    if (condition is! HRelational) return info.newUnboundRange();
     if (condition is HIdentity) return info.newUnboundRange();
     HInstruction right = condition.right;
     HInstruction left = condition.left;
diff --git a/pkg/compiler/lib/src/ssa/value_set.dart b/pkg/compiler/lib/src/ssa/value_set.dart
index 07681b6..c990014 100644
--- a/pkg/compiler/lib/src/ssa/value_set.dart
+++ b/pkg/compiler/lib/src/ssa/value_set.dart
@@ -2,7 +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.
 
-part of ssa;
+import '../universe/side_effects.dart' show SideEffects;
+
+import 'nodes.dart';
 
 class ValueSet {
   int size = 0;
diff --git a/pkg/compiler/lib/src/ssa/variable_allocator.dart b/pkg/compiler/lib/src/ssa/variable_allocator.dart
index fb35705..2145d6d 100644
--- a/pkg/compiler/lib/src/ssa/variable_allocator.dart
+++ b/pkg/compiler/lib/src/ssa/variable_allocator.dart
@@ -2,7 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of ssa;
+import '../common.dart';
+import '../compiler.dart' show Compiler;
+import '../js_backend/js_backend.dart';
+
+import 'nodes.dart';
 
 /**
  * The [LiveRange] class covers a range where an instruction is live.
@@ -111,8 +115,8 @@
   final Map<HInstruction, LiveInterval> liveIntervals;
 
   LiveEnvironment(this.liveIntervals, this.endId)
-    : liveInstructions = new Map<HInstruction, int>(),
-      loopMarkers = new Map<HBasicBlock, int>();
+      : liveInstructions = new Map<HInstruction, int>(),
+        loopMarkers = new Map<HBasicBlock, int>();
 
   /**
    * Remove an instruction from the liveIn set. This method also
@@ -120,8 +124,8 @@
    * range: [id, / id contained in [liveInstructions] /].
    */
   void remove(HInstruction instruction, int id) {
-    LiveInterval interval = liveIntervals.putIfAbsent(
-        instruction, () => new LiveInterval());
+    LiveInterval interval =
+        liveIntervals.putIfAbsent(instruction, () => new LiveInterval());
     int lastId = liveInstructions[instruction];
     // If [lastId] is null, then this instruction is not being used.
     interval.add(new LiveRange(id, lastId == null ? id : lastId));
@@ -152,12 +156,14 @@
       // else block have the same end id for an instruction that is
       // being used in the join block and defined before the if/else.
       if (existingId == endId) return;
-      LiveInterval range = liveIntervals.putIfAbsent(
-          instruction, () => new LiveInterval());
+      LiveInterval range =
+          liveIntervals.putIfAbsent(instruction, () => new LiveInterval());
       range.add(new LiveRange(other.startId, existingId));
       liveInstructions[instruction] = endId;
     });
-    other.loopMarkers.forEach((k, v) { loopMarkers[k] = v; });
+    other.loopMarkers.forEach((k, v) {
+      loopMarkers[k] = v;
+    });
   }
 
   void addLoopMarker(HBasicBlock header, int id) {
@@ -206,8 +212,8 @@
 
   SsaLiveIntervalBuilder(
       this.compiler, this.generateAtUseSite, this.controlFlowOperators)
-    : liveInstructions = new Map<HBasicBlock, LiveEnvironment>(),
-      liveIntervals = new Map<HInstruction, LiveInterval>();
+      : liveInstructions = new Map<HBasicBlock, LiveEnvironment>(),
+        liveIntervals = new Map<HInstruction, LiveInterval>();
 
   DiagnosticReporter get reporter => compiler.reporter;
 
@@ -218,8 +224,8 @@
     }
   }
 
-  void markInputsAsLiveInEnvironment(HInstruction instruction,
-                                     LiveEnvironment environment) {
+  void markInputsAsLiveInEnvironment(
+      HInstruction instruction, LiveEnvironment environment) {
     for (int i = 0, len = instruction.inputs.length; i < len; i++) {
       markAsLiveInEnvironment(instruction.inputs[i], environment);
     }
@@ -251,8 +257,8 @@
     return checked;
   }
 
-  void markAsLiveInEnvironment(HInstruction instruction,
-                               LiveEnvironment environment) {
+  void markAsLiveInEnvironment(
+      HInstruction instruction, LiveEnvironment environment) {
     if (generateAtUseSite.contains(instruction)) {
       markInputsAsLiveInEnvironment(instruction, environment);
     } else {
@@ -270,8 +276,8 @@
     }
   }
 
-  void removeFromEnvironment(HInstruction instruction,
-                             LiveEnvironment environment) {
+  void removeFromEnvironment(
+      HInstruction instruction, LiveEnvironment environment) {
     environment.remove(instruction, instructionId);
     // Special case the HCheck instruction to have the same live
     // interval as the instruction it is checking.
@@ -361,8 +367,8 @@
     // Update all instructions that are liveIns in [header] to have a
     // range that covers the loop.
     env.liveInstructions.forEach((HInstruction instruction, int id) {
-      LiveInterval range = env.liveIntervals.putIfAbsent(
-          instruction, () => new LiveInterval());
+      LiveInterval range =
+          env.liveIntervals.putIfAbsent(instruction, () => new LiveInterval());
       range.loopUpdate(env.startId, lastId);
       env.liveInstructions[instruction] = lastId;
     });
@@ -376,7 +382,9 @@
           other.liveInstructions[instruction] = id;
         });
         other.removeLoopMarker(header);
-        env.loopMarkers.forEach((k, v) { other.loopMarkers[k] = v; });
+        env.loopMarkers.forEach((k, v) {
+          other.loopMarkers[k] = v;
+        });
       }
     });
   }
@@ -411,8 +419,8 @@
   final List<Copy> assignments;
 
   CopyHandler()
-    : copies = new List<Copy>(),
-      assignments = new List<Copy>();
+      : copies = new List<Copy>(),
+        assignments = new List<Copy>();
 
   void addCopy(HInstruction source, HInstruction destination) {
     copies.add(new Copy(source, destination));
@@ -449,10 +457,10 @@
   }
 
   VariableNames()
-    : ownName = new Map<HInstruction, String>(),
-      copyHandlers = new Map<HBasicBlock, CopyHandler>(),
-      allUsedNames = new Set<String>(),
-      swapTemp = 't0';
+      : ownName = new Map<HInstruction, String>(),
+        copyHandlers = new Map<HBasicBlock, CopyHandler>(),
+        allUsedNames = new Set<String>(),
+        swapTemp = 't0';
 
   int get numberOfVariables => allUsedNames.length;
 
@@ -494,11 +502,9 @@
   int temporaryIndex = 0;
   static final RegExp regexp = new RegExp('t[0-9]+');
 
-  VariableNamer(LiveEnvironment environment,
-                this.names,
-                this.compiler)
-    : usedNames = new Set<String>(),
-      freeTemporaryNames = new List<String>() {
+  VariableNamer(LiveEnvironment environment, this.names, this.compiler)
+      : usedNames = new Set<String>(),
+        freeTemporaryNames = new List<String>() {
     // [VariableNames.swapTemp] is used when there is a cycle in a copy handler.
     // Therefore we make sure no one uses it.
     usedNames.add(names.swapTemp);
@@ -610,7 +616,6 @@
  * it adds a copy to the CopyHandler of the corresponding predecessor.
  */
 class SsaVariableAllocator extends HBaseVisitor {
-
   final Compiler compiler;
   final Map<HBasicBlock, LiveEnvironment> liveInstructions;
   final Map<HInstruction, LiveInterval> liveIntervals;
@@ -618,19 +623,17 @@
 
   final VariableNames names;
 
-  SsaVariableAllocator(this.compiler,
-                       this.liveInstructions,
-                       this.liveIntervals,
-                       this.generateAtUseSite)
-    : this.names = new VariableNames();
+  SsaVariableAllocator(this.compiler, this.liveInstructions, this.liveIntervals,
+      this.generateAtUseSite)
+      : this.names = new VariableNames();
 
   void visitGraph(HGraph graph) {
     visitDominatorTree(graph);
   }
 
   void visitBasicBlock(HBasicBlock block) {
-    VariableNamer namer = new VariableNamer(
-        liveInstructions[block], names, compiler);
+    VariableNamer namer =
+        new VariableNamer(liveInstructions[block], names, compiler);
 
     block.forEachPhi((HPhi phi) {
       handlePhi(phi, namer);
@@ -663,9 +666,8 @@
     return instructionInterval.diesAt(start);
   }
 
-  void freeUsedNamesAt(HInstruction instruction,
-                       HInstruction at,
-                       VariableNamer namer) {
+  void freeUsedNamesAt(
+      HInstruction instruction, HInstruction at, VariableNamer namer) {
     if (needsName(instruction)) {
       if (diesAt(instruction, at)) {
         namer.freeName(instruction);
diff --git a/pkg/compiler/lib/src/string_validator.dart b/pkg/compiler/lib/src/string_validator.dart
index 60f31dc..70a90b9 100644
--- a/pkg/compiler/lib/src/string_validator.dart
+++ b/pkg/compiler/lib/src/string_validator.dart
@@ -19,18 +19,15 @@
   StringValidator(this.reporter);
 
   DartString validateInterpolationPart(Token token, StringQuoting quoting,
-                                       {bool isFirst: false,
-                                        bool isLast: false}) {
+      {bool isFirst: false, bool isLast: false}) {
     String source = token.value;
     int leftQuote = 0;
     int rightQuote = 0;
     if (isFirst) leftQuote = quoting.leftQuoteLength;
     if (isLast) rightQuote = quoting.rightQuoteLength;
     String content = copyWithoutQuotes(source, leftQuote, rightQuote);
-    return validateString(token,
-                          token.charOffset + leftQuote,
-                          content,
-                          quoting);
+    return validateString(
+        token, token.charOffset + leftQuote, content, quoting);
   }
 
   static StringQuoting quotingFromString(String sourceString) {
@@ -50,7 +47,7 @@
     // and end after the second quote.
     if (source.moveNext() && source.current == quoteChar && source.moveNext()) {
       int code = source.current;
-      assert(code == quoteChar);  // If not, there is a bug in the parser.
+      assert(code == quoteChar); // If not, there is a bug in the parser.
       leftQuoteLength = 3;
 
       // Check if a multiline string starts with optional whitespace followed by
@@ -109,10 +106,8 @@
    * Validates the escape sequences and special characters of a string literal.
    * Returns a DartString if valid, and null if not.
    */
-  DartString validateString(Token token,
-                            int startOffset,
-                            String string,
-                            StringQuoting quoting) {
+  DartString validateString(
+      Token token, int startOffset, String string, StringQuoting quoting) {
     // We need to check for invalid x and u escapes, for line
     // terminators in non-multiline strings, and for invalid Unicode
     // scalar values (either directly or as u-escape values).  We also check
@@ -123,7 +118,7 @@
     bool previousWasLeadSurrogate = false;
     bool invalidUtf16 = false;
     var stringIter = string.codeUnits.iterator;
-    for(HasNextIterator<int> iter = new HasNextIterator(stringIter);
+    for (HasNextIterator<int> iter = new HasNextIterator(stringIter);
         iter.hasNext;
         length++) {
       index++;
@@ -132,7 +127,7 @@
         if (quoting.raw) continue;
         containsEscape = true;
         if (!iter.hasNext) {
-          stringParseError("Incomplete escape sequence",token, index);
+          stringParseError("Incomplete escape sequence", token, index);
           return null;
         }
         index++;
@@ -146,8 +141,8 @@
             index++;
             code = iter.next();
             if (!isHexDigit(code)) {
-              stringParseError("Invalid character in escape sequence",
-                               token, index);
+              stringParseError(
+                  "Invalid character in escape sequence", token, index);
               return null;
             }
           }
@@ -167,8 +162,8 @@
                 break;
               }
               if (!isHexDigit(code)) {
-                stringParseError("Invalid character in escape sequence",
-                                 token, index);
+                stringParseError(
+                    "Invalid character in escape sequence", token, index);
                 return null;
               }
               count++;
@@ -177,8 +172,8 @@
             if (code != $CLOSE_CURLY_BRACKET || count == 0 || count > 6) {
               int errorPosition = index - count;
               if (count > 6) errorPosition += 6;
-              stringParseError("Invalid character in escape sequence",
-                               token, errorPosition);
+              stringParseError(
+                  "Invalid character in escape sequence", token, errorPosition);
               return null;
             }
           } else {
@@ -193,8 +188,8 @@
                 }
               }
               if (!isHexDigit(code)) {
-                stringParseError("Invalid character in escape sequence",
-                                 token, index);
+                stringParseError(
+                    "Invalid character in escape sequence", token, index);
                 return null;
               }
               value = value * 16 + hexDigitValue(code);
diff --git a/pkg/compiler/lib/src/tokens/keyword.dart b/pkg/compiler/lib/src/tokens/keyword.dart
index ce1bc87..ad22ee6 100644
--- a/pkg/compiler/lib/src/tokens/keyword.dart
+++ b/pkg/compiler/lib/src/tokens/keyword.dart
@@ -4,85 +4,82 @@
 
 library dart2js.tokens.keywords;
 
-import '../util/characters.dart' as Characters show
-    $a;
+import '../util/characters.dart' as Characters show $a;
 
-import 'precedence.dart' show
-    PrecedenceInfo;
-import 'precedence_constants.dart' as Precedence show
-    AS_INFO,
-    IS_INFO,
-    KEYWORD_INFO;
+import 'precedence.dart' show PrecedenceInfo;
+import 'precedence_constants.dart' as Precedence
+    show AS_INFO, IS_INFO, KEYWORD_INFO;
 
 /**
  * A keyword in the Dart programming language.
  */
 class Keyword {
-  static const List<Keyword> values = const <Keyword> [
-      const Keyword("assert"),
-      const Keyword("break"),
-      const Keyword("case"),
-      const Keyword("catch"),
-      const Keyword("class"),
-      const Keyword("const"),
-      const Keyword("continue"),
-      const Keyword("default"),
-      const Keyword("do"),
-      const Keyword("else"),
-      const Keyword("enum"),
-      const Keyword("extends"),
-      const Keyword("false"),
-      const Keyword("final"),
-      const Keyword("finally"),
-      const Keyword("for"),
-      const Keyword("if"),
-      const Keyword("in"),
-      const Keyword("new"),
-      const Keyword("null"),
-      const Keyword("rethrow"),
-      const Keyword("return"),
-      const Keyword("super"),
-      const Keyword("switch"),
-      const Keyword("this"),
-      const Keyword("throw"),
-      const Keyword("true"),
-      const Keyword("try"),
-      const Keyword("var"),
-      const Keyword("void"),
-      const Keyword("while"),
-      const Keyword("with"),
+  static const List<Keyword> values = const <Keyword>[
+    const Keyword("assert"),
+    const Keyword("break"),
+    const Keyword("case"),
+    const Keyword("catch"),
+    const Keyword("class"),
+    const Keyword("const"),
+    const Keyword("continue"),
+    const Keyword("default"),
+    const Keyword("do"),
+    const Keyword("else"),
+    const Keyword("enum"),
+    const Keyword("extends"),
+    const Keyword("false"),
+    const Keyword("final"),
+    const Keyword("finally"),
+    const Keyword("for"),
+    const Keyword("if"),
+    const Keyword("in"),
+    const Keyword("new"),
+    const Keyword("null"),
+    const Keyword("rethrow"),
+    const Keyword("return"),
+    const Keyword("super"),
+    const Keyword("switch"),
+    const Keyword("this"),
+    const Keyword("throw"),
+    const Keyword("true"),
+    const Keyword("try"),
+    const Keyword("var"),
+    const Keyword("void"),
+    const Keyword("while"),
+    const Keyword("with"),
 
-      // TODO(ahe): Don't think this is a reserved word.
-      // See: http://dartbug.com/5579
-      const Keyword("is", info: Precedence.IS_INFO),
+    // TODO(ahe): Don't think this is a reserved word.
+    // See: http://dartbug.com/5579
+    const Keyword("is", info: Precedence.IS_INFO),
 
-      const Keyword("abstract", isBuiltIn: true),
-      const Keyword("as", info: Precedence.AS_INFO, isBuiltIn: true),
-      const Keyword("dynamic", isBuiltIn: true),
-      const Keyword("export", isBuiltIn: true),
-      const Keyword("external", isBuiltIn: true),
-      const Keyword("factory", isBuiltIn: true),
-      const Keyword("get", isBuiltIn: true),
-      const Keyword("implements", isBuiltIn: true),
-      const Keyword("import", isBuiltIn: true),
-      const Keyword("library", isBuiltIn: true),
-      const Keyword("operator", isBuiltIn: true),
-      const Keyword("part", isBuiltIn: true),
-      const Keyword("set", isBuiltIn: true),
-      const Keyword("static", isBuiltIn: true),
-      const Keyword("typedef", isBuiltIn: true),
+    const Keyword("abstract", isBuiltIn: true),
+    const Keyword("as", info: Precedence.AS_INFO, isBuiltIn: true),
+    const Keyword("dynamic", isBuiltIn: true),
+    const Keyword("export", isBuiltIn: true),
+    const Keyword("external", isBuiltIn: true),
+    const Keyword("factory", isBuiltIn: true),
+    const Keyword("get", isBuiltIn: true),
+    const Keyword("implements", isBuiltIn: true),
+    const Keyword("import", isBuiltIn: true),
+    const Keyword("library", isBuiltIn: true),
+    const Keyword("operator", isBuiltIn: true),
+    const Keyword("part", isBuiltIn: true),
+    const Keyword("set", isBuiltIn: true),
+    const Keyword("static", isBuiltIn: true),
+    const Keyword("typedef", isBuiltIn: true),
 
-      const Keyword("hide", isPseudo: true),
-      const Keyword("native", isPseudo: true),
-      const Keyword("of", isPseudo: true),
-      const Keyword("on", isPseudo: true),
-      const Keyword("show", isPseudo: true),
-      const Keyword("source", isPseudo: true),
-      const Keyword("deferred", isPseudo: true),
-      const Keyword("async", isPseudo: true),
-      const Keyword("sync", isPseudo: true),
-      const Keyword("await", isPseudo: true),
-      const Keyword("yield", isPseudo: true)];
+    const Keyword("hide", isPseudo: true),
+    const Keyword("native", isPseudo: true),
+    const Keyword("of", isPseudo: true),
+    const Keyword("on", isPseudo: true),
+    const Keyword("show", isPseudo: true),
+    const Keyword("source", isPseudo: true),
+    const Keyword("deferred", isPseudo: true),
+    const Keyword("async", isPseudo: true),
+    const Keyword("sync", isPseudo: true),
+    const Keyword("await", isPseudo: true),
+    const Keyword("yield", isPseudo: true)
+  ];
 
   final String syntax;
   final bool isPseudo;
@@ -98,9 +95,9 @@
   }
 
   const Keyword(this.syntax,
-                {this.isPseudo: false,
-                 this.isBuiltIn: false,
-                 this.info: Precedence.KEYWORD_INFO});
+      {this.isPseudo: false,
+      this.isBuiltIn: false,
+      this.info: Precedence.KEYWORD_INFO});
 
   static Map<String, Keyword> computeKeywordMap() {
     Map<String, Keyword> result = new Map<String, Keyword>();
@@ -125,19 +122,18 @@
   static KeywordState _KEYWORD_STATE;
   static KeywordState get KEYWORD_STATE {
     if (_KEYWORD_STATE == null) {
-      List<String> strings =
-          new List<String>(Keyword.values.length);
+      List<String> strings = new List<String>(Keyword.values.length);
       for (int i = 0; i < Keyword.values.length; i++) {
         strings[i] = Keyword.values[i].syntax;
       }
-      strings.sort((a,b) => a.compareTo(b));
+      strings.sort((a, b) => a.compareTo(b));
       _KEYWORD_STATE = computeKeywordStateTable(0, strings, 0, strings.length);
     }
     return _KEYWORD_STATE;
   }
 
-  static KeywordState computeKeywordStateTable(int start, List<String> strings,
-                                               int offset, int length) {
+  static KeywordState computeKeywordStateTable(
+      int start, List<String> strings, int offset, int length) {
     List<KeywordState> result = new List<KeywordState>(26);
     assert(length != 0);
     int chunk = 0;
@@ -152,9 +148,8 @@
         if (chunk != c) {
           if (chunkStart != -1) {
             assert(result[chunk - Characters.$a] == null);
-            result[chunk - Characters.$a] =
-                computeKeywordStateTable(
-                    start + 1, strings, chunkStart, i - chunkStart);
+            result[chunk - Characters.$a] = computeKeywordStateTable(
+                start + 1, strings, chunkStart, i - chunkStart);
           }
           chunkStart = i;
           chunk = c;
@@ -163,9 +158,8 @@
     }
     if (chunkStart != -1) {
       assert(result[chunk - Characters.$a] == null);
-      result[chunk - Characters.$a] =
-        computeKeywordStateTable(start + 1, strings, chunkStart,
-                                 offset + length - chunkStart);
+      result[chunk - Characters.$a] = computeKeywordStateTable(
+          start + 1, strings, chunkStart, offset + length - chunkStart);
     } else {
       assert(length == 1);
       return new LeafKeywordState(strings[offset]);
@@ -185,7 +179,7 @@
   final List<KeywordState> table;
 
   ArrayKeywordState(List<KeywordState> this.table, String syntax)
-    : super((syntax == null) ? null : Keyword.keywords[syntax]);
+      : super((syntax == null) ? null : Keyword.keywords[syntax]);
 
   KeywordState next(int c) => table[c - Characters.$a];
 
@@ -201,7 +195,7 @@
     for (int i = 0; i < foo.length; i++) {
       if (foo[i] != null) {
         sb.write("${new String.fromCharCodes([i + Characters.$a])}: "
-                 "${foo[i]}; ");
+            "${foo[i]}; ");
       }
     }
     sb.write("]");
diff --git a/pkg/compiler/lib/src/tokens/precedence.dart b/pkg/compiler/lib/src/tokens/precedence.dart
index 1183a0b..c3f4906 100644
--- a/pkg/compiler/lib/src/tokens/precedence.dart
+++ b/pkg/compiler/lib/src/tokens/precedence.dart
@@ -4,8 +4,7 @@
 
 library dart2js.tokens.precedence;
 
-import '../util/util.dart' show
-    computeHashCode;
+import '../util/util.dart' show computeHashCode;
 
 class PrecedenceInfo {
   final String value;
diff --git a/pkg/compiler/lib/src/tokens/precedence_constants.dart b/pkg/compiler/lib/src/tokens/precedence_constants.dart
index f2e44f2..08475ec 100644
--- a/pkg/compiler/lib/src/tokens/precedence_constants.dart
+++ b/pkg/compiler/lib/src/tokens/precedence_constants.dart
@@ -4,18 +4,16 @@
 
 library dart2js.tokens.precedence.constants;
 
-import 'precedence.dart' show
-    PrecedenceInfo;
+import 'precedence.dart' show PrecedenceInfo;
 import 'token_constants.dart';
 
 // TODO(ahe): The following are not tokens in Dart.
 const PrecedenceInfo BACKPING_INFO =
-  const PrecedenceInfo('`', 0, BACKPING_TOKEN);
+    const PrecedenceInfo('`', 0, BACKPING_TOKEN);
 const PrecedenceInfo BACKSLASH_INFO =
-  const PrecedenceInfo('\\', 0, BACKSLASH_TOKEN);
+    const PrecedenceInfo('\\', 0, BACKSLASH_TOKEN);
 const PrecedenceInfo PERIOD_PERIOD_PERIOD_INFO =
-  const PrecedenceInfo('...', 0,
-                       PERIOD_PERIOD_PERIOD_TOKEN);
+    const PrecedenceInfo('...', 0, PERIOD_PERIOD_PERIOD_TOKEN);
 
 /**
  * The cascade operator has the lowest precedence of any operator
@@ -23,219 +21,169 @@
  */
 const int CASCADE_PRECEDENCE = 2;
 const PrecedenceInfo PERIOD_PERIOD_INFO =
-  const PrecedenceInfo('..', CASCADE_PRECEDENCE,
-                       PERIOD_PERIOD_TOKEN);
+    const PrecedenceInfo('..', CASCADE_PRECEDENCE, PERIOD_PERIOD_TOKEN);
 
-const PrecedenceInfo BANG_INFO =
-  const PrecedenceInfo('!', 0, BANG_TOKEN);
-const PrecedenceInfo COLON_INFO =
-  const PrecedenceInfo(':', 0, COLON_TOKEN);
-const PrecedenceInfo INDEX_INFO =
-  const PrecedenceInfo('[]', 0, INDEX_TOKEN);
+const PrecedenceInfo BANG_INFO = const PrecedenceInfo('!', 0, BANG_TOKEN);
+const PrecedenceInfo COLON_INFO = const PrecedenceInfo(':', 0, COLON_TOKEN);
+const PrecedenceInfo INDEX_INFO = const PrecedenceInfo('[]', 0, INDEX_TOKEN);
 const PrecedenceInfo MINUS_MINUS_INFO =
-  const PrecedenceInfo('--', POSTFIX_PRECEDENCE,
-                       MINUS_MINUS_TOKEN);
+    const PrecedenceInfo('--', POSTFIX_PRECEDENCE, MINUS_MINUS_TOKEN);
 const PrecedenceInfo PLUS_PLUS_INFO =
-  const PrecedenceInfo('++', POSTFIX_PRECEDENCE,
-                       PLUS_PLUS_TOKEN);
-const PrecedenceInfo TILDE_INFO =
-  const PrecedenceInfo('~', 0, TILDE_TOKEN);
+    const PrecedenceInfo('++', POSTFIX_PRECEDENCE, PLUS_PLUS_TOKEN);
+const PrecedenceInfo TILDE_INFO = const PrecedenceInfo('~', 0, TILDE_TOKEN);
 
 const PrecedenceInfo FUNCTION_INFO =
-  const PrecedenceInfo('=>', 0, FUNCTION_TOKEN);
-const PrecedenceInfo HASH_INFO =
-  const PrecedenceInfo('#', 0, HASH_TOKEN);
+    const PrecedenceInfo('=>', 0, FUNCTION_TOKEN);
+const PrecedenceInfo HASH_INFO = const PrecedenceInfo('#', 0, HASH_TOKEN);
 const PrecedenceInfo INDEX_EQ_INFO =
-  const PrecedenceInfo('[]=', 0, INDEX_EQ_TOKEN);
+    const PrecedenceInfo('[]=', 0, INDEX_EQ_TOKEN);
 const PrecedenceInfo SEMICOLON_INFO =
-  const PrecedenceInfo(';', 0, SEMICOLON_TOKEN);
-const PrecedenceInfo COMMA_INFO =
-  const PrecedenceInfo(',', 0, COMMA_TOKEN);
+    const PrecedenceInfo(';', 0, SEMICOLON_TOKEN);
+const PrecedenceInfo COMMA_INFO = const PrecedenceInfo(',', 0, COMMA_TOKEN);
 
-const PrecedenceInfo AT_INFO =
-  const PrecedenceInfo('@', 0, AT_TOKEN);
+const PrecedenceInfo AT_INFO = const PrecedenceInfo('@', 0, AT_TOKEN);
 
 // Assignment operators.
 const int ASSIGNMENT_PRECEDENCE = 1;
 const PrecedenceInfo AMPERSAND_EQ_INFO =
-  const PrecedenceInfo('&=',
-                       ASSIGNMENT_PRECEDENCE, AMPERSAND_EQ_TOKEN);
+    const PrecedenceInfo('&=', ASSIGNMENT_PRECEDENCE, AMPERSAND_EQ_TOKEN);
 const PrecedenceInfo BAR_EQ_INFO =
-  const PrecedenceInfo('|=',
-                       ASSIGNMENT_PRECEDENCE, BAR_EQ_TOKEN);
+    const PrecedenceInfo('|=', ASSIGNMENT_PRECEDENCE, BAR_EQ_TOKEN);
 const PrecedenceInfo CARET_EQ_INFO =
-  const PrecedenceInfo('^=',
-                       ASSIGNMENT_PRECEDENCE, CARET_EQ_TOKEN);
+    const PrecedenceInfo('^=', ASSIGNMENT_PRECEDENCE, CARET_EQ_TOKEN);
 const PrecedenceInfo EQ_INFO =
-  const PrecedenceInfo('=',
-                       ASSIGNMENT_PRECEDENCE, EQ_TOKEN);
+    const PrecedenceInfo('=', ASSIGNMENT_PRECEDENCE, EQ_TOKEN);
 const PrecedenceInfo GT_GT_EQ_INFO =
-  const PrecedenceInfo('>>=',
-                       ASSIGNMENT_PRECEDENCE, GT_GT_EQ_TOKEN);
+    const PrecedenceInfo('>>=', ASSIGNMENT_PRECEDENCE, GT_GT_EQ_TOKEN);
 const PrecedenceInfo LT_LT_EQ_INFO =
-  const PrecedenceInfo('<<=',
-                       ASSIGNMENT_PRECEDENCE, LT_LT_EQ_TOKEN);
+    const PrecedenceInfo('<<=', ASSIGNMENT_PRECEDENCE, LT_LT_EQ_TOKEN);
 const PrecedenceInfo MINUS_EQ_INFO =
-  const PrecedenceInfo('-=',
-                       ASSIGNMENT_PRECEDENCE, MINUS_EQ_TOKEN);
+    const PrecedenceInfo('-=', ASSIGNMENT_PRECEDENCE, MINUS_EQ_TOKEN);
 const PrecedenceInfo PERCENT_EQ_INFO =
-  const PrecedenceInfo('%=',
-                       ASSIGNMENT_PRECEDENCE, PERCENT_EQ_TOKEN);
+    const PrecedenceInfo('%=', ASSIGNMENT_PRECEDENCE, PERCENT_EQ_TOKEN);
 const PrecedenceInfo PLUS_EQ_INFO =
-  const PrecedenceInfo('+=',
-                       ASSIGNMENT_PRECEDENCE, PLUS_EQ_TOKEN);
+    const PrecedenceInfo('+=', ASSIGNMENT_PRECEDENCE, PLUS_EQ_TOKEN);
 const PrecedenceInfo SLASH_EQ_INFO =
-  const PrecedenceInfo('/=',
-                       ASSIGNMENT_PRECEDENCE, SLASH_EQ_TOKEN);
+    const PrecedenceInfo('/=', ASSIGNMENT_PRECEDENCE, SLASH_EQ_TOKEN);
 const PrecedenceInfo STAR_EQ_INFO =
-  const PrecedenceInfo('*=',
-                       ASSIGNMENT_PRECEDENCE, STAR_EQ_TOKEN);
+    const PrecedenceInfo('*=', ASSIGNMENT_PRECEDENCE, STAR_EQ_TOKEN);
 const PrecedenceInfo TILDE_SLASH_EQ_INFO =
-  const PrecedenceInfo('~/=',
-                       ASSIGNMENT_PRECEDENCE, TILDE_SLASH_EQ_TOKEN);
-const PrecedenceInfo QUESTION_QUESTION_EQ_INFO =
-  const PrecedenceInfo('??=',
-                       ASSIGNMENT_PRECEDENCE, QUESTION_QUESTION_EQ_TOKEN);
+    const PrecedenceInfo('~/=', ASSIGNMENT_PRECEDENCE, TILDE_SLASH_EQ_TOKEN);
+const PrecedenceInfo QUESTION_QUESTION_EQ_INFO = const PrecedenceInfo(
+    '??=', ASSIGNMENT_PRECEDENCE, QUESTION_QUESTION_EQ_TOKEN);
 
 const PrecedenceInfo QUESTION_INFO =
-  const PrecedenceInfo('?', 3, QUESTION_TOKEN);
+    const PrecedenceInfo('?', 3, QUESTION_TOKEN);
 
 const PrecedenceInfo QUESTION_QUESTION_INFO =
-  const PrecedenceInfo('??', 4, QUESTION_QUESTION_TOKEN);
+    const PrecedenceInfo('??', 4, QUESTION_QUESTION_TOKEN);
 
 const PrecedenceInfo BAR_BAR_INFO =
-  const PrecedenceInfo('||', 5, BAR_BAR_TOKEN);
+    const PrecedenceInfo('||', 5, BAR_BAR_TOKEN);
 
 const PrecedenceInfo AMPERSAND_AMPERSAND_INFO =
-  const PrecedenceInfo('&&', 6, AMPERSAND_AMPERSAND_TOKEN);
+    const PrecedenceInfo('&&', 6, AMPERSAND_AMPERSAND_TOKEN);
 
-const PrecedenceInfo BAR_INFO =
-  const PrecedenceInfo('|', 9, BAR_TOKEN);
+const PrecedenceInfo BAR_INFO = const PrecedenceInfo('|', 9, BAR_TOKEN);
 
-const PrecedenceInfo CARET_INFO =
-  const PrecedenceInfo('^', 10, CARET_TOKEN);
+const PrecedenceInfo CARET_INFO = const PrecedenceInfo('^', 10, CARET_TOKEN);
 
 const PrecedenceInfo AMPERSAND_INFO =
-  const PrecedenceInfo('&', 11, AMPERSAND_TOKEN);
+    const PrecedenceInfo('&', 11, AMPERSAND_TOKEN);
 
 // Equality operators.
 const int EQUALITY_PRECEDENCE = 7;
 const PrecedenceInfo BANG_EQ_EQ_INFO =
-  const PrecedenceInfo('!==',
-                       EQUALITY_PRECEDENCE, BANG_EQ_EQ_TOKEN);
+    const PrecedenceInfo('!==', EQUALITY_PRECEDENCE, BANG_EQ_EQ_TOKEN);
 const PrecedenceInfo BANG_EQ_INFO =
-  const PrecedenceInfo('!=',
-                       EQUALITY_PRECEDENCE, BANG_EQ_TOKEN);
+    const PrecedenceInfo('!=', EQUALITY_PRECEDENCE, BANG_EQ_TOKEN);
 const PrecedenceInfo EQ_EQ_EQ_INFO =
-  const PrecedenceInfo('===',
-                       EQUALITY_PRECEDENCE, EQ_EQ_EQ_TOKEN);
+    const PrecedenceInfo('===', EQUALITY_PRECEDENCE, EQ_EQ_EQ_TOKEN);
 const PrecedenceInfo EQ_EQ_INFO =
-  const PrecedenceInfo('==',
-                       EQUALITY_PRECEDENCE, EQ_EQ_TOKEN);
+    const PrecedenceInfo('==', EQUALITY_PRECEDENCE, EQ_EQ_TOKEN);
 
 // Relational operators.
 const int RELATIONAL_PRECEDENCE = 8;
 const PrecedenceInfo GT_EQ_INFO =
-  const PrecedenceInfo('>=',
-                       RELATIONAL_PRECEDENCE, GT_EQ_TOKEN);
+    const PrecedenceInfo('>=', RELATIONAL_PRECEDENCE, GT_EQ_TOKEN);
 const PrecedenceInfo GT_INFO =
-  const PrecedenceInfo('>',
-                       RELATIONAL_PRECEDENCE, GT_TOKEN);
+    const PrecedenceInfo('>', RELATIONAL_PRECEDENCE, GT_TOKEN);
 const PrecedenceInfo IS_INFO =
-  const PrecedenceInfo('is',
-                       RELATIONAL_PRECEDENCE, KEYWORD_TOKEN);
+    const PrecedenceInfo('is', RELATIONAL_PRECEDENCE, KEYWORD_TOKEN);
 const PrecedenceInfo AS_INFO =
-  const PrecedenceInfo('as',
-                       RELATIONAL_PRECEDENCE, KEYWORD_TOKEN);
+    const PrecedenceInfo('as', RELATIONAL_PRECEDENCE, KEYWORD_TOKEN);
 const PrecedenceInfo LT_EQ_INFO =
-  const PrecedenceInfo('<=',
-                       RELATIONAL_PRECEDENCE, LT_EQ_TOKEN);
+    const PrecedenceInfo('<=', RELATIONAL_PRECEDENCE, LT_EQ_TOKEN);
 const PrecedenceInfo LT_INFO =
-  const PrecedenceInfo('<',
-                       RELATIONAL_PRECEDENCE, LT_TOKEN);
+    const PrecedenceInfo('<', RELATIONAL_PRECEDENCE, LT_TOKEN);
 
 // Shift operators.
-const PrecedenceInfo GT_GT_INFO =
-  const PrecedenceInfo('>>', 12, GT_GT_TOKEN);
-const PrecedenceInfo LT_LT_INFO =
-  const PrecedenceInfo('<<', 12, LT_LT_TOKEN);
+const PrecedenceInfo GT_GT_INFO = const PrecedenceInfo('>>', 12, GT_GT_TOKEN);
+const PrecedenceInfo LT_LT_INFO = const PrecedenceInfo('<<', 12, LT_LT_TOKEN);
 
 // Additive operators.
-const PrecedenceInfo MINUS_INFO =
-  const PrecedenceInfo('-', 13, MINUS_TOKEN);
-const PrecedenceInfo PLUS_INFO =
-  const PrecedenceInfo('+', 13, PLUS_TOKEN);
+const PrecedenceInfo MINUS_INFO = const PrecedenceInfo('-', 13, MINUS_TOKEN);
+const PrecedenceInfo PLUS_INFO = const PrecedenceInfo('+', 13, PLUS_TOKEN);
 
 // Multiplicative operators.
 const PrecedenceInfo PERCENT_INFO =
-  const PrecedenceInfo('%', 14, PERCENT_TOKEN);
-const PrecedenceInfo SLASH_INFO =
-  const PrecedenceInfo('/', 14, SLASH_TOKEN);
-const PrecedenceInfo STAR_INFO =
-  const PrecedenceInfo('*', 14, STAR_TOKEN);
+    const PrecedenceInfo('%', 14, PERCENT_TOKEN);
+const PrecedenceInfo SLASH_INFO = const PrecedenceInfo('/', 14, SLASH_TOKEN);
+const PrecedenceInfo STAR_INFO = const PrecedenceInfo('*', 14, STAR_TOKEN);
 const PrecedenceInfo TILDE_SLASH_INFO =
-  const PrecedenceInfo('~/', 14, TILDE_SLASH_TOKEN);
+    const PrecedenceInfo('~/', 14, TILDE_SLASH_TOKEN);
 
 const int POSTFIX_PRECEDENCE = 15;
 const PrecedenceInfo PERIOD_INFO =
-  const PrecedenceInfo('.', POSTFIX_PRECEDENCE,
-                       PERIOD_TOKEN);
+    const PrecedenceInfo('.', POSTFIX_PRECEDENCE, PERIOD_TOKEN);
 const PrecedenceInfo QUESTION_PERIOD_INFO =
-  const PrecedenceInfo('?.', POSTFIX_PRECEDENCE,
-                       QUESTION_PERIOD_TOKEN);
+    const PrecedenceInfo('?.', POSTFIX_PRECEDENCE, QUESTION_PERIOD_TOKEN);
 
 const PrecedenceInfo KEYWORD_INFO =
-  const PrecedenceInfo('keyword', 0, KEYWORD_TOKEN);
+    const PrecedenceInfo('keyword', 0, KEYWORD_TOKEN);
 
-const PrecedenceInfo EOF_INFO =
-  const PrecedenceInfo('EOF', 0, EOF_TOKEN);
+const PrecedenceInfo EOF_INFO = const PrecedenceInfo('EOF', 0, EOF_TOKEN);
 
 const PrecedenceInfo IDENTIFIER_INFO =
-  const PrecedenceInfo('identifier', 0, IDENTIFIER_TOKEN);
+    const PrecedenceInfo('identifier', 0, IDENTIFIER_TOKEN);
 
 const PrecedenceInfo BAD_INPUT_INFO =
-  const PrecedenceInfo('malformed input', 0,
-                       BAD_INPUT_TOKEN);
+    const PrecedenceInfo('malformed input', 0, BAD_INPUT_TOKEN);
 
 const PrecedenceInfo OPEN_PAREN_INFO =
-  const PrecedenceInfo('(', POSTFIX_PRECEDENCE,
-                       OPEN_PAREN_TOKEN);
+    const PrecedenceInfo('(', POSTFIX_PRECEDENCE, OPEN_PAREN_TOKEN);
 
 const PrecedenceInfo CLOSE_PAREN_INFO =
-  const PrecedenceInfo(')', 0, CLOSE_PAREN_TOKEN);
+    const PrecedenceInfo(')', 0, CLOSE_PAREN_TOKEN);
 
 const PrecedenceInfo OPEN_CURLY_BRACKET_INFO =
-  const PrecedenceInfo('{', 0, OPEN_CURLY_BRACKET_TOKEN);
+    const PrecedenceInfo('{', 0, OPEN_CURLY_BRACKET_TOKEN);
 
 const PrecedenceInfo CLOSE_CURLY_BRACKET_INFO =
-  const PrecedenceInfo('}', 0, CLOSE_CURLY_BRACKET_TOKEN);
+    const PrecedenceInfo('}', 0, CLOSE_CURLY_BRACKET_TOKEN);
 
-const PrecedenceInfo INT_INFO =
-  const PrecedenceInfo('int', 0, INT_TOKEN);
+const PrecedenceInfo INT_INFO = const PrecedenceInfo('int', 0, INT_TOKEN);
 
 const PrecedenceInfo STRING_INFO =
-  const PrecedenceInfo('string', 0, STRING_TOKEN);
+    const PrecedenceInfo('string', 0, STRING_TOKEN);
 
 const PrecedenceInfo OPEN_SQUARE_BRACKET_INFO =
-  const PrecedenceInfo('[', POSTFIX_PRECEDENCE,
-                       OPEN_SQUARE_BRACKET_TOKEN);
+    const PrecedenceInfo('[', POSTFIX_PRECEDENCE, OPEN_SQUARE_BRACKET_TOKEN);
 
 const PrecedenceInfo CLOSE_SQUARE_BRACKET_INFO =
-  const PrecedenceInfo(']', 0, CLOSE_SQUARE_BRACKET_TOKEN);
+    const PrecedenceInfo(']', 0, CLOSE_SQUARE_BRACKET_TOKEN);
 
 const PrecedenceInfo DOUBLE_INFO =
-  const PrecedenceInfo('double', 0, DOUBLE_TOKEN);
+    const PrecedenceInfo('double', 0, DOUBLE_TOKEN);
 
 const PrecedenceInfo STRING_INTERPOLATION_INFO =
-  const PrecedenceInfo('\${', 0,
-                       STRING_INTERPOLATION_TOKEN);
+    const PrecedenceInfo('\${', 0, STRING_INTERPOLATION_TOKEN);
 
 const PrecedenceInfo STRING_INTERPOLATION_IDENTIFIER_INFO =
-  const PrecedenceInfo('\$', 0,
-                       STRING_INTERPOLATION_IDENTIFIER_TOKEN);
+    const PrecedenceInfo('\$', 0, STRING_INTERPOLATION_IDENTIFIER_TOKEN);
 
 const PrecedenceInfo HEXADECIMAL_INFO =
-  const PrecedenceInfo('hexadecimal', 0, HEXADECIMAL_TOKEN);
+    const PrecedenceInfo('hexadecimal', 0, HEXADECIMAL_TOKEN);
 
 const PrecedenceInfo COMMENT_INFO =
-  const PrecedenceInfo('comment', 0, COMMENT_TOKEN);
+    const PrecedenceInfo('comment', 0, COMMENT_TOKEN);
diff --git a/pkg/compiler/lib/src/tokens/token.dart b/pkg/compiler/lib/src/tokens/token.dart
index 1b05a5f..df66bd9 100644
--- a/pkg/compiler/lib/src/tokens/token.dart
+++ b/pkg/compiler/lib/src/tokens/token.dart
@@ -4,23 +4,16 @@
 
 library dart2js.tokens;
 
-import 'dart:convert' show
-    UTF8;
-import 'dart:collection' show
-    HashSet;
+import 'dart:convert' show UTF8;
+import 'dart:collection' show HashSet;
 
 import '../common.dart';
-import '../util/util.dart' show
-    computeHashCode;
+import '../util/util.dart' show computeHashCode;
 
-import 'keyword.dart' show
-    Keyword;
-import 'precedence.dart' show
-    PrecedenceInfo;
-import 'precedence_constants.dart' as Precedence show
-    BAD_INPUT_INFO;
-import 'token_constants.dart' as Tokens show
-    IDENTIFIER_TOKEN;
+import 'keyword.dart' show Keyword;
+import 'precedence.dart' show PrecedenceInfo;
+import 'precedence_constants.dart' as Precedence show BAD_INPUT_INFO;
+import 'token_constants.dart' as Tokens show IDENTIFIER_TOKEN;
 
 /**
  * A token that doubles as a linked list.
@@ -132,7 +125,6 @@
  * Also used for end of file with EOF_INFO.
  */
 class SymbolToken extends Token {
-
   final PrecedenceInfo info;
 
   SymbolToken(this.info, int charOffset) : super(charOffset);
@@ -179,8 +171,7 @@
 }
 
 abstract class ErrorToken extends Token {
-  ErrorToken(int charOffset)
-      : super(charOffset);
+  ErrorToken(int charOffset) : super(charOffset);
 
   PrecedenceInfo get info => Precedence.BAD_INPUT_INFO;
 
@@ -198,8 +189,7 @@
 class BadInputToken extends ErrorToken {
   final int character;
 
-  BadInputToken(this.character, int charOffset)
-      : super(charOffset);
+  BadInputToken(this.character, int charOffset) : super(charOffset);
 
   String toString() => "BadInputToken($character)";
 
@@ -259,7 +249,7 @@
    * is canonicalized before the token is created.
    */
   StringToken.fromString(this.info, String value, int charOffset,
-                         {bool canonicalize : false})
+      {bool canonicalize: false})
       : valueOrLazySubstring = canonicalizedString(value, canonicalize),
         super(charOffset);
 
@@ -267,13 +257,14 @@
    * Creates a lazy string token. If [canonicalize] is true, the string
    * is canonicalized before the token is created.
    */
-  StringToken.fromSubstring(this.info, String data, int start, int end,
-                            int charOffset, {bool canonicalize : false})
+  StringToken.fromSubstring(
+      this.info, String data, int start, int end, int charOffset,
+      {bool canonicalize: false})
       : super(charOffset) {
     int length = end - start;
     if (length <= LAZY_THRESHOLD) {
-      valueOrLazySubstring = canonicalizedString(data.substring(start, end),
-                                                 canonicalize);
+      valueOrLazySubstring =
+          canonicalizedString(data.substring(start, end), canonicalize);
     } else {
       valueOrLazySubstring =
           new LazySubstring(data, start, length, canonicalize);
@@ -285,7 +276,7 @@
    * is passed through a UTF-8 decoder.
    */
   StringToken.fromUtf8Bytes(this.info, List<int> data, int start, int end,
-                            bool asciiOnly, int charOffset)
+      bool asciiOnly, int charOffset)
       : super(charOffset) {
     int length = end - start;
     if (length <= LAZY_THRESHOLD) {
@@ -307,8 +298,8 @@
         valueOrLazySubstring = canonicalizedString(
             data.substring(start, end), valueOrLazySubstring.boolValue);
       } else {
-        valueOrLazySubstring = decodeUtf8(
-            data, start, end, valueOrLazySubstring.boolValue);
+        valueOrLazySubstring =
+            decodeUtf8(data, start, end, valueOrLazySubstring.boolValue);
       }
       return valueOrLazySubstring;
     }
@@ -321,8 +312,7 @@
 
   String toString() => "StringToken($value)";
 
-  static final HashSet<String> canonicalizedSubstrings =
-      new HashSet<String>();
+  static final HashSet<String> canonicalizedSubstrings = new HashSet<String>();
 
   static String canonicalizedString(String s, bool canonicalize) {
     if (!canonicalize) return s;
@@ -409,35 +399,33 @@
 }
 
 bool isUserDefinableOperator(String value) {
-  return
-      isBinaryOperator(value) ||
+  return isBinaryOperator(value) ||
       isMinusOperator(value) ||
       isTernaryOperator(value) ||
       isUnaryOperator(value);
 }
 
-bool isUnaryOperator(String value) => identical(value, '~');
+bool isUnaryOperator(String value) => value == '~';
 
 bool isBinaryOperator(String value) {
-  return
-      (identical(value, '==')) ||
-      (identical(value, '[]')) ||
-      (identical(value, '*')) ||
-      (identical(value, '/')) ||
-      (identical(value, '%')) ||
-      (identical(value, '~/')) ||
-      (identical(value, '+')) ||
-      (identical(value, '<<')) ||
-      (identical(value, '>>')) ||
-      (identical(value, '>=')) ||
-      (identical(value, '>')) ||
-      (identical(value, '<=')) ||
-      (identical(value, '<')) ||
-      (identical(value, '&')) ||
-      (identical(value, '^')) ||
-      (identical(value, '|'));
+  return value == '==' ||
+      value == '[]' ||
+      value == '*' ||
+      value == '/' ||
+      value == '%' ||
+      value == '~/' ||
+      value == '+' ||
+      value == '<<' ||
+      value == '>>' ||
+      value == '>=' ||
+      value == '>' ||
+      value == '<=' ||
+      value == '<' ||
+      value == '&' ||
+      value == '^' ||
+      value == '|';
 }
 
-bool isTernaryOperator(String value) => identical(value, '[]=');
+bool isTernaryOperator(String value) => value == '[]=';
 
-bool isMinusOperator(String value) => identical(value, '-');
+bool isMinusOperator(String value) => value == '-';
diff --git a/pkg/compiler/lib/src/tokens/token_map.dart b/pkg/compiler/lib/src/tokens/token_map.dart
index 55b4d30..e7fc3b5 100644
--- a/pkg/compiler/lib/src/tokens/token_map.dart
+++ b/pkg/compiler/lib/src/tokens/token_map.dart
@@ -4,8 +4,7 @@
 
 library dart2js.tokens.token_map;
 
-import 'token.dart' show
-    Token;
+import 'token.dart' show Token;
 
 /**
  * Key class used in [TokenMap] in which the hash code for a token is based
@@ -15,7 +14,7 @@
   final Token token;
   TokenKey(this.token);
   int get hashCode => token.charOffset;
-  operator==(other) => other is TokenKey && token == other.token;
+  operator ==(other) => other is TokenKey && token == other.token;
 }
 
 /// Map of tokens and the first associated comment.
@@ -33,14 +32,14 @@
  * 6) Storing token/comments pairs in a linked list: ~5400 msec
  */
 class TokenMap {
-  Map<TokenKey,Token> comments = new Map<TokenKey,Token>();
+  Map<TokenKey, Token> comments = new Map<TokenKey, Token>();
 
-  Token operator[] (Token key) {
+  Token operator [](Token key) {
     if (key == null) return null;
     return comments[new TokenKey(key)];
   }
 
-  void operator[]= (Token key, Token value) {
+  void operator []=(Token key, Token value) {
     if (key == null) return;
     comments[new TokenKey(key)] = value;
   }
diff --git a/pkg/compiler/lib/src/tracer.dart b/pkg/compiler/lib/src/tracer.dart
index bc50222..359ea77 100644
--- a/pkg/compiler/lib/src/tracer.dart
+++ b/pkg/compiler/lib/src/tracer.dart
@@ -6,21 +6,15 @@
 
 import 'dart:async' show EventSink;
 import '../compiler.dart' as api;
-import 'common/work.dart' show
-    ItemCompilationContext;
-import 'compiler.dart' show
-    Compiler;
-import 'ssa/ssa.dart' as ssa;
-import 'ssa/ssa_tracer.dart' show
-    HTracer;
+import 'common/work.dart' show ItemCompilationContext;
+import 'compiler.dart' show Compiler;
+import 'ssa/nodes.dart' as ssa show HGraph;
+import 'ssa/ssa_tracer.dart' show HTracer;
 import 'cps_ir/cps_ir_nodes.dart' as cps_ir;
-import 'cps_ir/cps_ir_tracer.dart' show
-    IRTracer;
+import 'cps_ir/cps_ir_tracer.dart' show IRTracer;
 import 'tree_ir/tree_ir_nodes.dart' as tree_ir;
-import 'tree_ir/tree_ir_tracer.dart' show
-    TreeTracer;
-import 'util/util.dart' show
-    Indentation;
+import 'tree_ir/tree_ir_tracer.dart' show TreeTracer;
+import 'util/util.dart' show Indentation;
 
 /**
  * If non-null, we only trace methods whose name match the regexp defined by the
@@ -46,8 +40,8 @@
       : this.compiler = compiler,
         output = TRACE_FILTER != null ? outputProvider('dart', 'cfg') : null;
 
-  void traceCompilation(String methodName,
-                        ItemCompilationContext compilationContext) {
+  void traceCompilation(
+      String methodName, ItemCompilationContext compilationContext) {
     if (!isEnabled) return;
     traceActive = TRACE_FILTER.hasMatch(methodName);
     if (!traceActive) return;
@@ -63,11 +57,9 @@
     if (!traceActive) return;
     if (irObject is ssa.HGraph) {
       new HTracer(output, compiler, context).traceGraph(name, irObject);
-    }
-    else if (irObject is cps_ir.FunctionDefinition) {
+    } else if (irObject is cps_ir.FunctionDefinition) {
       new IRTracer(output).traceGraph(name, irObject);
-    }
-    else if (irObject is tree_ir.FunctionDefinition) {
+    } else if (irObject is tree_ir.FunctionDefinition) {
       new TreeTracer(output).traceGraph(name, irObject);
     }
   }
@@ -79,7 +71,6 @@
   }
 }
 
-
 abstract class TracerUtil {
   EventSink<String> get output;
   final Indentation _ind = new Indentation();
diff --git a/pkg/compiler/lib/src/tree/dartstring.dart b/pkg/compiler/lib/src/tree/dartstring.dart
index 72d0b0c..684f55b 100644
--- a/pkg/compiler/lib/src/tree/dartstring.dart
+++ b/pkg/compiler/lib/src/tree/dartstring.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of tree;
+import 'dart:collection';
+import '../util/characters.dart';
 
 /**
  * The [DartString] type represents a Dart string value as a sequence of Unicode
@@ -42,7 +43,7 @@
   String slowToString();
 
   bool operator ==(var other) {
-    if (other is !DartString) return false;
+    if (other is! DartString) return false;
     DartString otherString = other;
     if (length != otherString.length) return false;
     Iterator it1 = iterator;
@@ -63,7 +64,6 @@
   String toString() => "DartString#${length}:${slowToString()}";
 }
 
-
 /**
  * A [DartString] where the content is represented by an actual [String].
  */
@@ -111,6 +111,7 @@
     if (toStringCache != null) return toStringCache.codeUnits.iterator;
     return new StringEscapeIterator(source);
   }
+
   String slowToString() {
     if (toStringCache != null) return toStringCache;
     StringBuffer buffer = new StringBuffer();
@@ -143,6 +144,7 @@
     toStringCache = left.slowToString() + right.slowToString();
     return toStringCache;
   }
+
   String get source => slowToString();
 }
 
@@ -175,6 +177,7 @@
     }
     return true;
   }
+
   void nextPart() {
     if (right != null) {
       currentIterator = new HasNextIterator<int>(right.iterator);
@@ -187,7 +190,7 @@
 /**
  *Iterator that returns the actual string contents of a string with escapes.
  */
-class StringEscapeIterator implements Iterator<int>{
+class StringEscapeIterator implements Iterator<int> {
   final Iterator<int> source;
   int _current = null;
 
@@ -208,12 +211,24 @@
     source.moveNext();
     code = source.current;
     switch (code) {
-      case $n: _current = $LF; break;
-      case $r: _current = $CR; break;
-      case $t: _current = $TAB; break;
-      case $b: _current = $BS; break;
-      case $f: _current = $FF; break;
-      case $v: _current = $VTAB; break;
+      case $n:
+        _current = $LF;
+        break;
+      case $r:
+        _current = $CR;
+        break;
+      case $t:
+        _current = $TAB;
+        break;
+      case $b:
+        _current = $BS;
+        break;
+      case $f:
+        _current = $FF;
+        break;
+      case $v:
+        _current = $VTAB;
+        break;
       case $x:
         source.moveNext();
         int value = hexDigitValue(source.current);
@@ -248,4 +263,3 @@
     return true;
   }
 }
-
diff --git a/pkg/compiler/lib/src/tree/nodes.dart b/pkg/compiler/lib/src/tree/nodes.dart
index e95497b..9335fef 100644
--- a/pkg/compiler/lib/src/tree/nodes.dart
+++ b/pkg/compiler/lib/src/tree/nodes.dart
@@ -2,7 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of tree;
+import 'dart:collection' show IterableMixin;
+
+import '../common.dart';
+import '../tokens/precedence_constants.dart' as Precedence show FUNCTION_INFO;
+import '../tokens/token.dart' show BeginGroupToken, Token;
+import '../tokens/token_constants.dart' as Tokens
+    show IDENTIFIER_TOKEN, KEYWORD_TOKEN, PLUS_TOKEN;
+import '../util/util.dart';
+import '../util/characters.dart';
+import '../resolution/secret_tree_element.dart'
+    show NullTreeElementMixin, StoredTreeElementMixin;
+import '../elements/elements.dart' show MetadataAnnotation;
+import 'dartstring.dart';
+import 'prettyprint.dart';
+import 'unparser.dart';
 
 abstract class Visitor<R> {
   const Visitor();
@@ -10,7 +24,7 @@
   R visitNode(Node node);
 
   R visitAssert(Assert node) => visitStatement(node);
-  R visitAsyncForIn(AsyncForIn node) => visitLoop(node);
+  R visitAsyncForIn(AsyncForIn node) => visitForIn(node);
   R visitAsyncModifier(AsyncModifier node) => visitNode(node);
   R visitAwait(Await node) => visitExpression(node);
   R visitBlock(Block node) => visitStatement(node);
@@ -32,6 +46,7 @@
   R visitExpression(Expression node) => visitNode(node);
   R visitExpressionStatement(ExpressionStatement node) => visitStatement(node);
   R visitFor(For node) => visitLoop(node);
+  R visitForIn(ForIn node) => visitLoop(node);
   R visitFunctionDeclaration(FunctionDeclaration node) => visitStatement(node);
   R visitFunctionExpression(FunctionExpression node) => visitExpression(node);
   R visitGotoStatement(GotoStatement node) => visitStatement(node);
@@ -53,7 +68,7 @@
   R visitLiteralNull(LiteralNull node) => visitLiteral(node);
   R visitLiteralString(LiteralString node) => visitStringNode(node);
   R visitStringJuxtaposition(StringJuxtaposition node) => visitStringNode(node);
-  R visitSyncForIn(SyncForIn node) => visitLoop(node);
+  R visitSyncForIn(SyncForIn node) => visitForIn(node);
   R visitLoop(Loop node) => visitStatement(node);
   R visitMetadata(Metadata node) => visitNode(node);
   R visitMixinApplication(MixinApplication node) => visitNode(node);
@@ -62,12 +77,14 @@
   R visitNamedMixinApplication(NamedMixinApplication node) {
     return visitMixinApplication(node);
   }
+
   R visitNewExpression(NewExpression node) => visitExpression(node);
   R visitNodeList(NodeList node) => visitNode(node);
   R visitOperator(Operator node) => visitIdentifier(node);
   R visitParenthesizedExpression(ParenthesizedExpression node) {
     return visitExpression(node);
   }
+
   R visitPart(Part node) => visitLibraryTag(node);
   R visitPartOf(PartOf node) => visitNode(node);
   R visitPostfix(Postfix node) => visitNodeList(node);
@@ -75,6 +92,7 @@
   R visitRedirectingFactoryBody(RedirectingFactoryBody node) {
     return visitStatement(node);
   }
+
   R visitRethrow(Rethrow node) => visitStatement(node);
   R visitReturn(Return node) => visitStatement(node);
   R visitSend(Send node) => visitExpression(node);
@@ -85,6 +103,7 @@
   R visitStringInterpolationPart(StringInterpolationPart node) {
     return visitNode(node);
   }
+
   R visitSwitchCase(SwitchCase node) => visitNode(node);
   R visitSwitchStatement(SwitchStatement node) => visitStatement(node);
   R visitLiteralSymbol(LiteralSymbol node) => visitExpression(node);
@@ -98,6 +117,161 @@
   R visitYield(Yield node) => visitStatement(node);
 }
 
+/// Visitor for [Node]s that take an additional argument of type [A] and returns
+/// a value of type [R].
+abstract class Visitor1<R, A> {
+  const Visitor1();
+
+  R visitNode(Node node, A arg);
+
+  R visitAssert(Assert node, A arg) => visitStatement(node, arg);
+  R visitAsyncForIn(AsyncForIn node, A arg) => visitForIn(node, arg);
+  R visitAsyncModifier(AsyncModifier node, A arg) => visitNode(node, arg);
+  R visitAwait(Await node, A arg) => visitExpression(node, arg);
+  R visitBlock(Block node, A arg) => visitStatement(node, arg);
+  R visitBreakStatement(BreakStatement node, A arg) {
+    return visitGotoStatement(node, arg);
+  }
+
+  R visitCascade(Cascade node, A arg) => visitExpression(node, arg);
+  R visitCascadeReceiver(CascadeReceiver node, A arg) {
+    return visitExpression(node, arg);
+  }
+
+  R visitCaseMatch(CaseMatch node, A arg) => visitNode(node, arg);
+  R visitCatchBlock(CatchBlock node, A arg) => visitNode(node, arg);
+  R visitClassNode(ClassNode node, A arg) => visitNode(node, arg);
+  R visitCombinator(Combinator node, A arg) => visitNode(node, arg);
+  R visitConditional(Conditional node, A arg) => visitExpression(node, arg);
+  R visitConditionalUri(ConditionalUri node, A arg) {
+    return visitNode(node, arg);
+  }
+
+  R visitContinueStatement(ContinueStatement node, A arg) {
+    return visitGotoStatement(node, arg);
+  }
+
+  R visitDottedName(DottedName node, A arg) {
+    return visitExpression(node, arg);
+  }
+
+  R visitDoWhile(DoWhile node, A arg) => visitLoop(node, arg);
+  R visitEmptyStatement(EmptyStatement node, A arg) {
+    return visitStatement(node, arg);
+  }
+
+  R visitEnum(Enum node, A arg) => visitNode(node, arg);
+  R visitExport(Export node, A arg) => visitLibraryDependency(node, arg);
+  R visitExpression(Expression node, A arg) => visitNode(node, arg);
+  R visitExpressionStatement(ExpressionStatement node, A arg) {
+    return visitStatement(node, arg);
+  }
+
+  R visitFor(For node, A arg) => visitLoop(node, arg);
+  R visitForIn(ForIn node, A arg) => visitLoop(node, arg);
+  R visitFunctionDeclaration(FunctionDeclaration node, A arg) {
+    return visitStatement(node, arg);
+  }
+
+  R visitFunctionExpression(FunctionExpression node, A arg) {
+    return visitExpression(node, arg);
+  }
+
+  R visitGotoStatement(GotoStatement node, A arg) {
+    return visitStatement(node, arg);
+  }
+
+  R visitIdentifier(Identifier node, A arg) {
+    return visitExpression(node, arg);
+  }
+
+  R visitImport(Import node, A arg) {
+    return visitLibraryDependency(node, arg);
+  }
+
+  R visitIf(If node, A arg) => visitStatement(node, arg);
+  R visitLabel(Label node, A arg) => visitNode(node, arg);
+  R visitLabeledStatement(LabeledStatement node, A arg) {
+    return visitStatement(node, arg);
+  }
+
+  R visitLibraryDependency(LibraryDependency node, A arg) {
+    return visitLibraryTag(node, arg);
+  }
+
+  R visitLibraryName(LibraryName node, A arg) => visitLibraryTag(node, arg);
+  R visitLibraryTag(LibraryTag node, A arg) => visitNode(node, arg);
+  R visitLiteral(Literal node, A arg) => visitExpression(node, arg);
+  R visitLiteralBool(LiteralBool node, A arg) => visitLiteral(node, arg);
+  R visitLiteralDouble(LiteralDouble node, A arg) => visitLiteral(node, arg);
+  R visitLiteralInt(LiteralInt node, A arg) => visitLiteral(node, arg);
+  R visitLiteralList(LiteralList node, A arg) => visitExpression(node, arg);
+  R visitLiteralMap(LiteralMap node, A arg) => visitExpression(node, arg);
+  R visitLiteralMapEntry(LiteralMapEntry node, A arg) => visitNode(node, arg);
+  R visitLiteralNull(LiteralNull node, A arg) => visitLiteral(node, arg);
+  R visitLiteralString(LiteralString node, A arg) => visitStringNode(node, arg);
+  R visitStringJuxtaposition(StringJuxtaposition node, A arg) {
+    return visitStringNode(node, arg);
+  }
+
+  R visitSyncForIn(SyncForIn node, A arg) => visitForIn(node, arg);
+  R visitLoop(Loop node, A arg) => visitStatement(node, arg);
+  R visitMetadata(Metadata node, A arg) => visitNode(node, arg);
+  R visitMixinApplication(MixinApplication node, A arg) => visitNode(node, arg);
+  R visitModifiers(Modifiers node, A arg) => visitNode(node, arg);
+  R visitNamedArgument(NamedArgument node, A arg) => visitExpression(node, arg);
+  R visitNamedMixinApplication(NamedMixinApplication node, A arg) {
+    return visitMixinApplication(node, arg);
+  }
+
+  R visitNewExpression(NewExpression node, A arg) => visitExpression(node, arg);
+  R visitNodeList(NodeList node, A arg) => visitNode(node, arg);
+  R visitOperator(Operator node, A arg) => visitIdentifier(node, arg);
+  R visitParenthesizedExpression(ParenthesizedExpression node, A arg) {
+    return visitExpression(node, arg);
+  }
+
+  R visitPart(Part node, A arg) => visitLibraryTag(node, arg);
+  R visitPartOf(PartOf node, A arg) => visitNode(node, arg);
+  R visitPostfix(Postfix node, A arg) => visitNodeList(node, arg);
+  R visitPrefix(Prefix node, A arg) => visitNodeList(node, arg);
+  R visitRedirectingFactoryBody(RedirectingFactoryBody node, A arg) {
+    return visitStatement(node, arg);
+  }
+
+  R visitRethrow(Rethrow node, A arg) => visitStatement(node, arg);
+  R visitReturn(Return node, A arg) => visitStatement(node, arg);
+  R visitSend(Send node, A arg) => visitExpression(node, arg);
+  R visitSendSet(SendSet node, A arg) => visitSend(node, arg);
+  R visitStatement(Statement node, A arg) => visitNode(node, arg);
+  R visitStringNode(StringNode node, A arg) => visitExpression(node, arg);
+  R visitStringInterpolation(StringInterpolation node, A arg) {
+    return visitStringNode(node, arg);
+  }
+
+  R visitStringInterpolationPart(StringInterpolationPart node, A arg) {
+    return visitNode(node, arg);
+  }
+
+  R visitSwitchCase(SwitchCase node, A arg) => visitNode(node, arg);
+  R visitSwitchStatement(SwitchStatement node, A arg) {
+    return visitStatement(node, arg);
+  }
+
+  R visitLiteralSymbol(LiteralSymbol node, A arg) => visitExpression(node, arg);
+  R visitThrow(Throw node, A arg) => visitExpression(node, arg);
+  R visitTryStatement(TryStatement node, A arg) => visitStatement(node, arg);
+  R visitTypeAnnotation(TypeAnnotation node, A arg) => visitNode(node, arg);
+  R visitTypedef(Typedef node, A arg) => visitNode(node, arg);
+  R visitTypeVariable(TypeVariable node, A arg) => visitNode(node, arg);
+  R visitVariableDefinitions(VariableDefinitions node, A arg) {
+    return visitStatement(node, arg);
+  }
+
+  R visitWhile(While node, A arg) => visitLoop(node, arg);
+  R visitYield(Yield node, A arg) => visitStatement(node, arg);
+}
+
 Token firstBeginToken(Node first, Node second) {
   Token token = null;
   if (first != null) {
@@ -129,8 +303,12 @@
 
   accept(Visitor visitor);
 
+  accept1(Visitor1 visitor, arg);
+
   visitChildren(Visitor visitor);
 
+  visitChildren1(Visitor1 visitor, arg);
+
   /**
    * Returns this node unparsed to Dart source string.
    */
@@ -251,14 +429,23 @@
   final Token extendsKeyword;
   final Token endToken;
 
-  ClassNode(this.modifiers, this.name, this.typeParameters, this.superclass,
-            this.interfaces, this.beginToken,
-            this.extendsKeyword, this.body, this.endToken);
+  ClassNode(
+      this.modifiers,
+      this.name,
+      this.typeParameters,
+      this.superclass,
+      this.interfaces,
+      this.beginToken,
+      this.extendsKeyword,
+      this.body,
+      this.endToken);
 
   ClassNode asClassNode() => this;
 
   accept(Visitor visitor) => visitor.visitClassNode(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitClassNode(this, arg);
+
   visitChildren(Visitor visitor) {
     if (name != null) name.accept(visitor);
     if (typeParameters != null) typeParameters.accept(visitor);
@@ -267,6 +454,14 @@
     if (body != null) body.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (name != null) name.accept1(visitor, arg);
+    if (typeParameters != null) typeParameters.accept1(visitor, arg);
+    if (superclass != null) superclass.accept1(visitor, arg);
+    if (interfaces != null) interfaces.accept1(visitor, arg);
+    if (body != null) body.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => beginToken;
 
   @override
@@ -301,11 +496,18 @@
 
   accept(Visitor visitor) => visitor.visitMixinApplication(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitMixinApplication(this, arg);
+
   visitChildren(Visitor visitor) {
     if (superclass != null) superclass.accept(visitor);
     if (mixins != null) mixins.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (superclass != null) superclass.accept1(visitor, arg);
+    if (mixins != null) mixins.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => superclass.getBeginToken();
   Token getEndToken() => mixins.getEndToken();
 }
@@ -323,9 +525,8 @@
   final Token classKeyword;
   final Token endToken;
 
-  NamedMixinApplication(this.name, this.typeParameters,
-                        this.modifiers, this.mixinApplication, this.interfaces,
-                        this.classKeyword, this.endToken);
+  NamedMixinApplication(this.name, this.typeParameters, this.modifiers,
+      this.mixinApplication, this.interfaces, this.classKeyword, this.endToken);
 
   TypeAnnotation get superclass => mixinApplication.superclass;
   NodeList get mixins => mixinApplication.mixins;
@@ -335,6 +536,10 @@
 
   accept(Visitor visitor) => visitor.visitNamedMixinApplication(this);
 
+  accept1(Visitor1 visitor, arg) {
+    return visitor.visitNamedMixinApplication(this, arg);
+  }
+
   visitChildren(Visitor visitor) {
     name.accept(visitor);
     if (typeParameters != null) typeParameters.accept(visitor);
@@ -343,6 +548,14 @@
     mixinApplication.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    name.accept1(visitor, arg);
+    if (typeParameters != null) typeParameters.accept1(visitor, arg);
+    if (modifiers != null) modifiers.accept1(visitor, arg);
+    if (interfaces != null) interfaces.accept1(visitor, arg);
+    mixinApplication.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => classKeyword;
   Token getEndToken() => endToken;
 }
@@ -351,9 +564,6 @@
   Expression();
 
   Expression asExpression() => this;
-
-  // TODO(ahe): make class abstract instead of adding an abstract method.
-  accept(Visitor visitor);
 }
 
 abstract class Statement extends Node {
@@ -361,16 +571,12 @@
 
   Statement asStatement() => this;
 
-  // TODO(ahe): make class abstract instead of adding an abstract method.
-  accept(Visitor visitor);
-
   bool isValidBreakTarget() => true;
 }
 
 /// Erroneous expression that behaves as a literal null.
 class ErrorExpression extends LiteralNull {
-  ErrorExpression(token)
-      : super(token);
+  ErrorExpression(token) : super(token);
 
   ErrorExpression asErrorExpression() => this;
 
@@ -394,29 +600,39 @@
 
   Link<Node> get arguments => argumentsNode.nodes;
 
-  Send([this.receiver, this.selector, this.argumentsNode,
+  Send(
+      [this.receiver,
+      this.selector,
+      this.argumentsNode,
       this.isConditional = false]);
   Send.postfix(this.receiver, this.selector,
       [Node argument = null, this.isConditional = false])
       : argumentsNode = (argument == null)
-        ? new Postfix()
-        : new Postfix.singleton(argument);
+            ? new Postfix()
+            : new Postfix.singleton(argument);
   Send.prefix(this.receiver, this.selector,
       [Node argument = null, this.isConditional = false])
-      : argumentsNode = (argument == null)
-        ? new Prefix()
-        : new Prefix.singleton(argument);
+      : argumentsNode =
+            (argument == null) ? new Prefix() : new Prefix.singleton(argument);
 
   Send asSend() => this;
 
   accept(Visitor visitor) => visitor.visitSend(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitSend(this, arg);
+
   visitChildren(Visitor visitor) {
     if (receiver != null) receiver.accept(visitor);
     if (selector != null) selector.accept(visitor);
     if (argumentsNode != null) argumentsNode.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (receiver != null) receiver.accept1(visitor, arg);
+    if (selector != null) selector.accept1(visitor, arg);
+    if (argumentsNode != null) argumentsNode.accept1(visitor, arg);
+  }
+
   int argumentCount() {
     return (argumentsNode == null) ? -1 : argumentsNode.slowLength();
   }
@@ -424,6 +640,7 @@
   bool get isSuperCall {
     return receiver != null && receiver.isSuper();
   }
+
   bool get isOperator => selector is Operator;
   bool get isPropertyAccess => argumentsNode == null;
   bool get isFunctionObjectInvocation => selector == null;
@@ -440,13 +657,11 @@
       isOperator && identical(selector.asOperator().source, '??');
 
   bool get isTypeCast {
-    return isOperator
-        && identical(selector.asOperator().source, 'as');
+    return isOperator && identical(selector.asOperator().source, 'as');
   }
 
   bool get isTypeTest {
-    return isOperator
-        && identical(selector.asOperator().source, 'is');
+    return isOperator && identical(selector.asOperator().source, 'is');
   }
 
   bool get isIsNotCheck {
@@ -457,9 +672,7 @@
     assert(isOperator);
     assert(identical(selector.asOperator().source, 'is') ||
         identical(selector.asOperator().source, 'as'));
-    return isIsNotCheck
-        ? arguments.head.asSend().receiver
-        : arguments.head;
+    return isIsNotCheck ? arguments.head.asSend().receiver : arguments.head;
   }
 
   Token getBeginToken() {
@@ -501,38 +714,40 @@
   final Operator assignmentOperator;
   SendSet(receiver, selector, this.assignmentOperator, argumentsNode,
       [bool isConditional = false])
-    : super(receiver, selector, argumentsNode, isConditional);
-  SendSet.postfix(receiver,
-                  selector,
-                  this.assignmentOperator,
-                  [Node argument = null, bool isConditional = false])
+      : super(receiver, selector, argumentsNode, isConditional);
+  SendSet.postfix(receiver, selector, this.assignmentOperator,
+      [Node argument = null, bool isConditional = false])
       : super.postfix(receiver, selector, argument, isConditional);
-  SendSet.prefix(receiver,
-                 selector,
-                 this.assignmentOperator,
-                 [Node argument = null, bool isConditional = false])
+  SendSet.prefix(receiver, selector, this.assignmentOperator,
+      [Node argument = null, bool isConditional = false])
       : super.prefix(receiver, selector, argument, isConditional);
 
   SendSet asSendSet() => this;
 
   accept(Visitor visitor) => visitor.visitSendSet(this);
 
-  /// `true` if this send is not a simple assignment.
-  bool get isComplex => !identical(assignmentOperator.source, '=');
-
-  /// Whether this is an if-null assignment of the form `a ??= b`.
-  bool get isIfNullAssignment =>
-      identical(assignmentOperator.source, '??=');
+  accept1(Visitor1 visitor, arg) => visitor.visitSendSet(this, arg);
 
   visitChildren(Visitor visitor) {
     super.visitChildren(visitor);
     if (assignmentOperator != null) assignmentOperator.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    super.visitChildren1(visitor, arg);
+    if (assignmentOperator != null) assignmentOperator.accept1(visitor, arg);
+  }
+
+  /// `true` if this send is not a simple assignment.
+  bool get isComplex => !identical(assignmentOperator.source, '=');
+
+  /// Whether this is an if-null assignment of the form `a ??= b`.
+  bool get isIfNullAssignment => identical(assignmentOperator.source, '??=');
+
   Send copyWithReceiver(Node newReceiver, bool isConditional) {
     assert(receiver == null);
-    return new SendSet(newReceiver, selector, assignmentOperator,
-                       argumentsNode, isConditional);
+    return new SendSet(newReceiver, selector, assignmentOperator, argumentsNode,
+        isConditional);
   }
 
   Token getBeginToken() {
@@ -559,10 +774,16 @@
 
   accept(Visitor visitor) => visitor.visitNewExpression(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitNewExpression(this, arg);
+
   visitChildren(Visitor visitor) {
     if (send != null) send.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (send != null) send.accept1(visitor, arg);
+  }
+
   bool get isConst {
     return newToken == null || identical(newToken.stringValue, 'const');
   }
@@ -572,7 +793,7 @@
   Token getEndToken() => send.getEndToken();
 }
 
-class NodeList extends Node {
+class NodeList extends Node with IterableMixin<Node> {
   final Link<Node> nodes;
   final Token beginToken;
   final Token endToken;
@@ -588,6 +809,13 @@
 
   NodeList asNodeList() => this;
 
+  // Override [IterableMixin.toString] with same code as [Node.toString].
+  toString() => unparse(this);
+
+  get length {
+    throw new UnsupportedError('use slowLength() instead of get:length');
+  }
+
   int slowLength() {
     int result = 0;
     for (Link<Node> cursor = nodes; !cursor.isEmpty; cursor = cursor.tail) {
@@ -598,6 +826,8 @@
 
   accept(Visitor visitor) => visitor.visitNodeList(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitNodeList(this, arg);
+
   visitChildren(Visitor visitor) {
     if (nodes == null) return;
     for (Link<Node> link = nodes; !link.isEmpty; link = link.tail) {
@@ -605,18 +835,25 @@
     }
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (nodes == null) return;
+    for (Link<Node> link = nodes; !link.isEmpty; link = link.tail) {
+      if (link.head != null) link.head.accept1(visitor, arg);
+    }
+  }
+
   Token getBeginToken() {
     if (beginToken != null) return beginToken;
-     if (nodes != null) {
-       for (Link<Node> link = nodes; !link.isEmpty; link = link.tail) {
-         if (link.head.getBeginToken() != null) {
-           return link.head.getBeginToken();
-         }
-         if (link.head.getEndToken() != null) {
-           return link.head.getEndToken();
-         }
-       }
-     }
+    if (nodes != null) {
+      for (Link<Node> link = nodes; !link.isEmpty; link = link.tail) {
+        if (link.head.getBeginToken() != null) {
+          return link.head.getBeginToken();
+        }
+        if (link.head.getEndToken() != null) {
+          return link.head.getEndToken();
+        }
+      }
+    }
     return endToken;
   }
 
@@ -645,10 +882,16 @@
 
   accept(Visitor visitor) => visitor.visitBlock(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitBlock(this, arg);
+
   visitChildren(Visitor visitor) {
     if (statements != null) statements.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (statements != null) statements.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => statements.getBeginToken();
 
   Token getEndToken() => statements.getEndToken();
@@ -662,8 +905,8 @@
   final Token ifToken;
   final Token elseToken;
 
-  If(this.condition, this.thenPart, this.elsePart,
-     this.ifToken, this.elseToken);
+  If(this.condition, this.thenPart, this.elsePart, this.ifToken,
+      this.elseToken);
 
   If asIf() => this;
 
@@ -671,12 +914,20 @@
 
   accept(Visitor visitor) => visitor.visitIf(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitIf(this, arg);
+
   visitChildren(Visitor visitor) {
     if (condition != null) condition.accept(visitor);
     if (thenPart != null) thenPart.accept(visitor);
     if (elsePart != null) elsePart.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (condition != null) condition.accept1(visitor, arg);
+    if (thenPart != null) thenPart.accept1(visitor, arg);
+    if (elsePart != null) elsePart.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => ifToken;
 
   Token getEndToken() {
@@ -693,19 +944,27 @@
   final Token questionToken;
   final Token colonToken;
 
-  Conditional(this.condition, this.thenExpression,
-              this.elseExpression, this.questionToken, this.colonToken);
+  Conditional(this.condition, this.thenExpression, this.elseExpression,
+      this.questionToken, this.colonToken);
 
   Conditional asConditional() => this;
 
   accept(Visitor visitor) => visitor.visitConditional(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitConditional(this, arg);
+
   visitChildren(Visitor visitor) {
     condition.accept(visitor);
     thenExpression.accept(visitor);
     elseExpression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    condition.accept1(visitor, arg);
+    thenExpression.accept1(visitor, arg);
+    elseExpression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => condition.getBeginToken();
 
   Token getEndToken() => elseExpression.getEndToken();
@@ -721,7 +980,8 @@
   final Token forToken;
 
   For(this.initializer, this.conditionStatement, this.update, body,
-      this.forToken) : super(body);
+      this.forToken)
+      : super(body);
 
   For asFor() => this;
 
@@ -737,6 +997,8 @@
 
   accept(Visitor visitor) => visitor.visitFor(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitFor(this, arg);
+
   visitChildren(Visitor visitor) {
     if (initializer != null) initializer.accept(visitor);
     if (conditionStatement != null) conditionStatement.accept(visitor);
@@ -744,6 +1006,13 @@
     if (body != null) body.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (initializer != null) initializer.accept1(visitor, arg);
+    if (conditionStatement != null) conditionStatement.accept1(visitor, arg);
+    if (update != null) update.accept1(visitor, arg);
+    if (body != null) body.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => forToken;
 
   Token getEndToken() {
@@ -760,8 +1029,12 @@
 
   accept(Visitor visitor) => visitor.visitFunctionDeclaration(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitFunctionDeclaration(this, arg);
+
   visitChildren(Visitor visitor) => function.accept(visitor);
 
+  visitChildren1(Visitor1 visitor, arg) => function.accept1(visitor, arg);
+
   Token getBeginToken() => function.getBeginToken();
 
   @override
@@ -785,8 +1058,12 @@
 
   accept(Visitor visitor) => visitor.visitAsyncModifier(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitAsyncModifier(this, arg);
+
   visitChildren(Visitor visitor) {}
 
+  visitChildren1(Visitor1 visitor, arg) {}
+
   Token getBeginToken() => asyncToken;
 
   Token getEndToken() => starToken != null ? starToken : asyncToken;
@@ -817,8 +1094,7 @@
   final AsyncModifier asyncModifier;
 
   FunctionExpression(this.name, this.parameters, this.body, this.returnType,
-                     this.modifiers, this.initializers, this.getOrSet,
-                     this.asyncModifier) {
+      this.modifiers, this.initializers, this.getOrSet, this.asyncModifier) {
     assert(modifiers != null);
   }
 
@@ -826,6 +1102,8 @@
 
   accept(Visitor visitor) => visitor.visitFunctionExpression(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitFunctionExpression(this, arg);
+
   bool get isRedirectingFactory {
     return body != null && body.asRedirectingFactoryBody() != null;
   }
@@ -840,9 +1118,19 @@
     if (body != null) body.accept(visitor);
   }
 
-  bool hasBody() => body.asEmptyStatement() == null;
+  visitChildren1(Visitor1 visitor, arg) {
+    if (modifiers != null) modifiers.accept1(visitor, arg);
+    if (returnType != null) returnType.accept1(visitor, arg);
+    if (name != null) name.accept1(visitor, arg);
+    if (parameters != null) parameters.accept1(visitor, arg);
+    if (initializers != null) initializers.accept1(visitor, arg);
+    if (asyncModifier != null) asyncModifier.accept1(visitor, arg);
+    if (body != null) body.accept1(visitor, arg);
+  }
 
-  bool hasEmptyBody() {
+  bool get hasBody => body.asEmptyStatement() == null;
+
+  bool get hasEmptyBody {
     Block block = body.asBlock();
     if (block == null) return false;
     return block.statements.isEmpty;
@@ -879,6 +1167,8 @@
 
   visitChildren(Visitor visitor) {}
 
+  visitChildren1(Visitor1 visitor, arg) {}
+
   Token getBeginToken() => token;
 
   Token getEndToken() => token;
@@ -902,11 +1192,13 @@
   }
 
   accept(Visitor visitor) => visitor.visitLiteralInt(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralInt(this, arg);
 }
 
 class LiteralDouble extends Literal<double> {
   LiteralDouble(Token token, DecodeErrorHandler handler)
-    : super(token, handler);
+      : super(token, handler);
 
   LiteralDouble asLiteralDouble() => this;
 
@@ -923,6 +1215,8 @@
   }
 
   accept(Visitor visitor) => visitor.visitLiteralDouble(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralDouble(this, arg);
 }
 
 class LiteralBool extends Literal<bool> {
@@ -938,11 +1232,11 @@
   }
 
   accept(Visitor visitor) => visitor.visitLiteralBool(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralBool(this, arg);
 }
 
-
 class StringQuoting {
-
   /// Cache of common quotings.
   static const List<StringQuoting> _mapping = const <StringQuoting>[
     const StringQuoting($SQ, raw: false, leftQuoteLength: 1),
@@ -978,7 +1272,7 @@
   final bool raw;
   final int leftQuoteCharCount;
   final int quote;
-  const StringQuoting(this.quote, { this.raw, int leftQuoteLength })
+  const StringQuoting(this.quote, {this.raw, int leftQuoteLength})
       : this.leftQuoteCharCount = leftQuoteLength;
   String get quoteChar => identical(quote, $DQ) ? '"' : "'";
 
@@ -1012,14 +1306,18 @@
 
   LiteralString asLiteralString() => this;
 
-  void visitChildren(Visitor visitor) {}
-
   bool get isInterpolation => false;
 
   Token getBeginToken() => token;
   Token getEndToken() => token;
 
   accept(Visitor visitor) => visitor.visitLiteralString(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralString(this, arg);
+
+  void visitChildren(Visitor visitor) {}
+
+  void visitChildren1(Visitor1 visitor, arg) {}
 }
 
 class LiteralNull extends Literal<String> {
@@ -1030,6 +1328,8 @@
   String get value => null;
 
   accept(Visitor visitor) => visitor.visitLiteralNull(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralNull(this, arg);
 }
 
 class LiteralList extends Expression {
@@ -1045,11 +1345,18 @@
   LiteralList asLiteralList() => this;
   accept(Visitor visitor) => visitor.visitLiteralList(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralList(this, arg);
+
   visitChildren(Visitor visitor) {
     if (typeArguments != null) typeArguments.accept(visitor);
     elements.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (typeArguments != null) typeArguments.accept1(visitor, arg);
+    elements.accept1(visitor, arg);
+  }
+
   Token getBeginToken() {
     if (constKeyword != null) return constKeyword;
     return firstBeginToken(typeArguments, elements);
@@ -1067,11 +1374,17 @@
 
   LiteralSymbol asLiteralSymbol() => this;
 
+  accept(Visitor visitor) => visitor.visitLiteralSymbol(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralSymbol(this, arg);
+
   void visitChildren(Visitor visitor) {
     if (identifiers != null) identifiers.accept(visitor);
   }
 
-  accept(Visitor visitor) => visitor.visitLiteralSymbol(this);
+  void visitChildren1(Visitor1 visitor, arg) {
+    if (identifiers != null) identifiers.accept1(visitor, arg);
+  }
 
   Token getBeginToken() => hashToken;
 
@@ -1099,8 +1412,12 @@
 
   accept(Visitor visitor) => visitor.visitIdentifier(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitIdentifier(this, arg);
+
   visitChildren(Visitor visitor) {}
 
+  visitChildren1(Visitor1 visitor, arg) {}
+
   Token getBeginToken() => token;
 
   Token getEndToken() => token;
@@ -1116,11 +1433,17 @@
 
   DottedName asDottedName() => this;
 
+  accept(Visitor visitor) => visitor.visitDottedName(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitDottedName(this, arg);
+
   void visitChildren(Visitor visitor) {
     identifiers.accept(visitor);
   }
 
-  accept(Visitor visitor) => visitor.visitDottedName(this);
+  void visitChildren1(Visitor1 visitor, arg) {
+    identifiers.accept1(visitor, arg);
+  }
 
   Token getBeginToken() => token;
   Token getEndToken() => identifiers.getEndToken();
@@ -1133,9 +1456,22 @@
 }
 
 class Operator extends Identifier {
-  static const COMPLEX_OPERATORS =
-      const ["--", "++", '+=', "-=", "*=", "/=", "%=", "&=", "|=", "~/=", "^=",
-             ">>=", "<<=", "??="];
+  static const COMPLEX_OPERATORS = const [
+    "--",
+    "++",
+    '+=',
+    "-=",
+    "*=",
+    "/=",
+    "%=",
+    "&=",
+    "|=",
+    "~/=",
+    "^=",
+    ">>=",
+    "<<=",
+    "??="
+  ];
 
   static const INCREMENT_OPERATORS = const <String>["++", "--"];
 
@@ -1144,6 +1480,8 @@
   Operator asOperator() => this;
 
   accept(Visitor visitor) => visitor.visitOperator(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitOperator(this, arg);
 }
 
 class Return extends Statement {
@@ -1162,10 +1500,16 @@
 
   accept(Visitor visitor) => visitor.visitReturn(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitReturn(this, arg);
+
   visitChildren(Visitor visitor) {
     if (expression != null) expression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (expression != null) expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => beginToken;
 
   Token getEndToken() {
@@ -1188,10 +1532,16 @@
 
   accept(Visitor visitor) => visitor.visitYield(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitYield(this, arg);
+
   visitChildren(Visitor visitor) {
     expression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => yieldToken;
 
   Token getEndToken() => endToken;
@@ -1202,17 +1552,25 @@
   final Token beginToken;
   final Token endToken;
 
-  RedirectingFactoryBody(this.beginToken, this.endToken,
-                         this.constructorReference);
+  RedirectingFactoryBody(
+      this.beginToken, this.endToken, this.constructorReference);
 
   RedirectingFactoryBody asRedirectingFactoryBody() => this;
 
   accept(Visitor visitor) => visitor.visitRedirectingFactoryBody(this);
 
+  accept1(Visitor1 visitor, arg) {
+    return visitor.visitRedirectingFactoryBody(this, arg);
+  }
+
   visitChildren(Visitor visitor) {
     constructorReference.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    constructorReference.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => beginToken;
 
   Token getEndToken() => endToken;
@@ -1228,10 +1586,16 @@
 
   accept(Visitor visitor) => visitor.visitExpressionStatement(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitExpressionStatement(this, arg);
+
   visitChildren(Visitor visitor) {
     if (expression != null) expression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (expression != null) expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => expression.getBeginToken();
 
   Token getEndToken() => endToken;
@@ -1249,10 +1613,16 @@
 
   accept(Visitor visitor) => visitor.visitThrow(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitThrow(this, arg);
+
   visitChildren(Visitor visitor) {
     expression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => throwToken;
 
   Token getEndToken() => endToken;
@@ -1269,10 +1639,16 @@
 
   accept(Visitor visitor) => visitor.visitAwait(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitAwait(this, arg);
+
   visitChildren(Visitor visitor) {
     expression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => awaitToken;
 
   Token getEndToken() => expression.getEndToken();
@@ -1293,11 +1669,18 @@
 
   accept(Visitor visitor) => visitor.visitAssert(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitAssert(this, arg);
+
   visitChildren(Visitor visitor) {
     condition.accept(visitor);
     if (message != null) message.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    condition.accept1(visitor, arg);
+    if (message != null) message.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => assertToken;
   Token getEndToken() => semicolonToken;
 }
@@ -1311,7 +1694,12 @@
   Rethrow asRethrow() => this;
 
   accept(Visitor visitor) => visitor.visitRethrow(this);
-  visitChildren(Visitor visitor) { }
+
+  accept1(Visitor1 visitor, arg) => visitor.visitRethrow(this, arg);
+
+  visitChildren(Visitor visitor) {}
+
+  visitChildren1(Visitor1 visitor, arg) {}
 
   Token getBeginToken() => throwToken;
   Token getEndToken() => endToken;
@@ -1327,11 +1715,18 @@
 
   accept(Visitor visitor) => visitor.visitTypeAnnotation(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitTypeAnnotation(this, arg);
+
   visitChildren(Visitor visitor) {
     typeName.accept(visitor);
     if (typeArguments != null) typeArguments.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    typeName.accept1(visitor, arg);
+    if (typeArguments != null) typeArguments.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => typeName.getBeginToken();
 
   Token getEndToken() {
@@ -1347,6 +1742,8 @@
 
   accept(Visitor visitor) => visitor.visitTypeVariable(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitTypeVariable(this, arg);
+
   visitChildren(Visitor visitor) {
     name.accept(visitor);
     if (bound != null) {
@@ -1354,6 +1751,13 @@
     }
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    name.accept1(visitor, arg);
+    if (bound != null) {
+      bound.accept1(visitor, arg);
+    }
+  }
+
   TypeVariable asTypeVariable() => this;
 
   Token getBeginToken() => name.getBeginToken();
@@ -1369,18 +1773,14 @@
   final Modifiers modifiers;
   final NodeList definitions;
 
-  VariableDefinitions(this.type,
-                      this.modifiers,
-                      this.definitions)
+  VariableDefinitions(this.type, this.modifiers, this.definitions)
       : this.metadata = null {
     assert(modifiers != null);
   }
 
   // TODO(johnniwinther): Make this its own node type.
-  VariableDefinitions.forParameter(this.metadata,
-                                   this.type,
-                                   this.modifiers,
-                                   this.definitions) {
+  VariableDefinitions.forParameter(
+      this.metadata, this.type, this.modifiers, this.definitions) {
     assert(modifiers != null);
   }
 
@@ -1388,12 +1788,20 @@
 
   accept(Visitor visitor) => visitor.visitVariableDefinitions(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitVariableDefinitions(this, arg);
+
   visitChildren(Visitor visitor) {
     if (metadata != null) metadata.accept(visitor);
     if (type != null) type.accept(visitor);
     if (definitions != null) definitions.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (metadata != null) metadata.accept1(visitor, arg);
+    if (type != null) type.accept1(visitor, arg);
+    if (definitions != null) definitions.accept1(visitor, arg);
+  }
+
   Token getBeginToken() {
     var token = firstBeginToken(modifiers, type);
     if (token == null) {
@@ -1421,19 +1829,26 @@
 
   final Expression condition;
 
-  DoWhile(Statement body, Expression this.condition,
-          Token this.doKeyword, Token this.whileKeyword, Token this.endToken)
-    : super(body);
+  DoWhile(Statement body, Expression this.condition, Token this.doKeyword,
+      Token this.whileKeyword, Token this.endToken)
+      : super(body);
 
   DoWhile asDoWhile() => this;
 
   accept(Visitor visitor) => visitor.visitDoWhile(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitDoWhile(this, arg);
+
   visitChildren(Visitor visitor) {
     if (condition != null) condition.accept(visitor);
     if (body != null) body.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (condition != null) condition.accept1(visitor, arg);
+    if (body != null) body.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => doKeyword;
 
   Token getEndToken() => endToken;
@@ -1443,18 +1858,25 @@
   final Token whileKeyword;
   final Expression condition;
 
-  While(Expression this.condition, Statement body,
-        Token this.whileKeyword) : super(body);
+  While(Expression this.condition, Statement body, Token this.whileKeyword)
+      : super(body);
 
   While asWhile() => this;
 
   accept(Visitor visitor) => visitor.visitWhile(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitWhile(this, arg);
+
   visitChildren(Visitor visitor) {
     if (condition != null) condition.accept(visitor);
     if (body != null) body.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (condition != null) condition.accept1(visitor, arg);
+    if (body != null) body.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => whileKeyword;
 
   Token getEndToken() => body.getEndToken();
@@ -1464,17 +1886,25 @@
   final Expression expression;
   final BeginGroupToken beginToken;
 
-  ParenthesizedExpression(Expression this.expression,
-                          BeginGroupToken this.beginToken);
+  ParenthesizedExpression(
+      Expression this.expression, BeginGroupToken this.beginToken);
 
   ParenthesizedExpression asParenthesizedExpression() => this;
 
   accept(Visitor visitor) => visitor.visitParenthesizedExpression(this);
 
+  accept1(Visitor1 visitor, arg) {
+    return visitor.visitParenthesizedExpression(this, arg);
+  }
+
   visitChildren(Visitor visitor) {
     if (expression != null) expression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (expression != null) expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => beginToken;
 
   Token getEndToken() => beginToken.endGroup;
@@ -1514,14 +1944,22 @@
     int flags = 0;
     for (; !nodes.isEmpty; nodes = nodes.tail) {
       String value = nodes.head.asIdentifier().source;
-      if (identical(value, 'static')) flags |= FLAG_STATIC;
-      else if (identical(value, 'abstract')) flags |= FLAG_ABSTRACT;
-      else if (identical(value, 'final')) flags |= FLAG_FINAL;
-      else if (identical(value, 'var')) flags |= FLAG_VAR;
-      else if (identical(value, 'const')) flags |= FLAG_CONST;
-      else if (identical(value, 'factory')) flags |= FLAG_FACTORY;
-      else if (identical(value, 'external')) flags |= FLAG_EXTERNAL;
-      else throw 'internal error: ${nodes.head}';
+      if (identical(value, 'static'))
+        flags |= FLAG_STATIC;
+      else if (identical(value, 'abstract'))
+        flags |= FLAG_ABSTRACT;
+      else if (identical(value, 'final'))
+        flags |= FLAG_FINAL;
+      else if (identical(value, 'var'))
+        flags |= FLAG_VAR;
+      else if (identical(value, 'const'))
+        flags |= FLAG_CONST;
+      else if (identical(value, 'factory'))
+        flags |= FLAG_FACTORY;
+      else if (identical(value, 'external'))
+        flags |= FLAG_EXTERNAL;
+      else
+        throw 'internal error: ${nodes.head}';
     }
     return flags;
   }
@@ -1530,7 +1968,7 @@
     Link<Node> nodeList = nodes.nodes;
     for (; !nodeList.isEmpty; nodeList = nodeList.tail) {
       String value = nodeList.head.asIdentifier().source;
-      if(identical(value, modifier)) {
+      if (identical(value, modifier)) {
         return nodeList.head;
       }
     }
@@ -1540,9 +1978,15 @@
   Modifiers asModifiers() => this;
   Token getBeginToken() => nodes.getBeginToken();
   Token getEndToken() => nodes.getEndToken();
+
   accept(Visitor visitor) => visitor.visitModifiers(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitModifiers(this, arg);
+
   visitChildren(Visitor visitor) => nodes.accept(visitor);
 
+  visitChildren1(Visitor1 visitor, arg) => nodes.accept1(visitor, arg);
+
   bool get isStatic => (flags & FLAG_STATIC) != 0;
   bool get isAbstract => (flags & FLAG_ABSTRACT) != 0;
   bool get isFinal => (flags & FLAG_FINAL) != 0;
@@ -1560,13 +2004,14 @@
   bool get isFinalOrConst => isFinal || isConst;
 
   String toString() {
-    return modifiersToString(isStatic: isStatic,
-                             isAbstract: isAbstract,
-                             isFinal: isFinal,
-                             isVar: isVar,
-                             isConst: isConst,
-                             isFactory: isFactory,
-                             isExternal: isExternal);
+    return modifiersToString(
+        isStatic: isStatic,
+        isAbstract: isAbstract,
+        isFinal: isFinal,
+        isVar: isVar,
+        isConst: isConst,
+        isFactory: isFactory,
+        isExternal: isExternal);
   }
 }
 
@@ -1583,11 +2028,18 @@
 
   accept(Visitor visitor) => visitor.visitStringInterpolation(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitStringInterpolation(this, arg);
+
   visitChildren(Visitor visitor) {
     string.accept(visitor);
     parts.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    string.accept1(visitor, arg);
+    parts.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => string.getBeginToken();
   Token getEndToken() => parts.getEndToken();
 }
@@ -1602,11 +2054,20 @@
 
   accept(Visitor visitor) => visitor.visitStringInterpolationPart(this);
 
+  accept1(Visitor1 visitor, arg) {
+    return visitor.visitStringInterpolationPart(this, arg);
+  }
+
   visitChildren(Visitor visitor) {
     expression.accept(visitor);
     string.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    expression.accept1(visitor, arg);
+    string.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => expression.getBeginToken();
 
   Token getEndToken() => string.getEndToken();
@@ -1640,7 +2101,7 @@
   bool get isInterpolation {
     if (isInterpolationCache == null) {
       isInterpolationCache = (first.accept(const IsInterpolationVisitor()) ||
-                          second.accept(const IsInterpolationVisitor()));
+          second.accept(const IsInterpolationVisitor()));
     }
     return isInterpolationCache;
   }
@@ -1668,11 +2129,18 @@
 
   accept(Visitor visitor) => visitor.visitStringJuxtaposition(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitStringJuxtaposition(this, arg);
+
   void visitChildren(Visitor visitor) {
     first.accept(visitor);
     second.accept(visitor);
   }
 
+  void visitChildren1(Visitor1 visitor, arg) {
+    first.accept1(visitor, arg);
+    second.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => first.getBeginToken();
 
   Token getEndToken() => second.getEndToken();
@@ -1687,8 +2155,12 @@
 
   accept(Visitor visitor) => visitor.visitEmptyStatement(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitEmptyStatement(this, arg);
+
   visitChildren(Visitor visitor) {}
 
+  visitChildren1(Visitor1 visitor, arg) {}
+
   Token getBeginToken() => semicolonToken;
 
   Token getEndToken() => semicolonToken;
@@ -1708,11 +2180,18 @@
 
   accept(Visitor visitor) => visitor.visitLiteralMap(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralMap(this, arg);
+
   visitChildren(Visitor visitor) {
     if (typeArguments != null) typeArguments.accept(visitor);
     entries.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (typeArguments != null) typeArguments.accept1(visitor, arg);
+    entries.accept1(visitor, arg);
+  }
+
   Token getBeginToken() {
     if (constKeyword != null) return constKeyword;
     return firstBeginToken(typeArguments, entries);
@@ -1733,11 +2212,18 @@
 
   accept(Visitor visitor) => visitor.visitLiteralMapEntry(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitLiteralMapEntry(this, arg);
+
   visitChildren(Visitor visitor) {
     key.accept(visitor);
     value.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    key.accept1(visitor, arg);
+    value.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => key.getBeginToken();
 
   Token getEndToken() => value.getEndToken();
@@ -1755,11 +2241,18 @@
 
   accept(Visitor visitor) => visitor.visitNamedArgument(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitNamedArgument(this, arg);
+
   visitChildren(Visitor visitor) {
     name.accept(visitor);
     expression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    name.accept1(visitor, arg);
+    expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => name.getBeginToken();
 
   Token getEndToken() => expression.getEndToken();
@@ -1771,8 +2264,7 @@
 
   final Token switchKeyword;
 
-  SwitchStatement(this.parenthesizedExpression, this.cases,
-                  this.switchKeyword);
+  SwitchStatement(this.parenthesizedExpression, this.cases, this.switchKeyword);
 
   SwitchStatement asSwitchStatement() => this;
 
@@ -1780,11 +2272,18 @@
 
   accept(Visitor visitor) => visitor.visitSwitchStatement(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitSwitchStatement(this, arg);
+
   visitChildren(Visitor visitor) {
     parenthesizedExpression.accept(visitor);
     cases.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    parenthesizedExpression.accept1(visitor, arg);
+    cases.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => switchKeyword;
 
   Token getEndToken() => cases.getEndToken();
@@ -1799,8 +2298,14 @@
   CaseMatch asCaseMatch() => this;
   Token getBeginToken() => caseKeyword;
   Token getEndToken() => colonToken;
+
   accept(Visitor visitor) => visitor.visitCaseMatch(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitCaseMatch(this, arg);
+
   visitChildren(Visitor visitor) => expression.accept(visitor);
+
+  visitChildren1(Visitor1 visitor, arg) => expression.accept1(visitor, arg);
 }
 
 class SwitchCase extends Node {
@@ -1821,8 +2326,8 @@
 
   final Token startToken;
 
-  SwitchCase(this.labelsAndCases, this.defaultKeyword,
-             this.statements, this.startToken);
+  SwitchCase(this.labelsAndCases, this.defaultKeyword, this.statements,
+      this.startToken);
 
   SwitchCase asSwitchCase() => this;
 
@@ -1832,11 +2337,18 @@
 
   accept(Visitor visitor) => visitor.visitSwitchCase(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitSwitchCase(this, arg);
+
   visitChildren(Visitor visitor) {
     labelsAndCases.accept(visitor);
     statements.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    labelsAndCases.accept1(visitor, arg);
+    statements.accept1(visitor, arg);
+  }
+
   Token getBeginToken() {
     return startToken;
   }
@@ -1867,6 +2379,10 @@
     if (target != null) target.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (target != null) target.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => keywordToken;
 
   Token getEndToken() => semicolonToken;
@@ -1877,20 +2393,24 @@
 
 class BreakStatement extends GotoStatement {
   BreakStatement(Identifier target, Token keywordToken, Token semicolonToken)
-    : super(target, keywordToken, semicolonToken);
+      : super(target, keywordToken, semicolonToken);
 
   BreakStatement asBreakStatement() => this;
 
   accept(Visitor visitor) => visitor.visitBreakStatement(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitBreakStatement(this, arg);
 }
 
 class ContinueStatement extends GotoStatement {
   ContinueStatement(Identifier target, Token keywordToken, Token semicolonToken)
-    : super(target, keywordToken, semicolonToken);
+      : super(target, keywordToken, semicolonToken);
 
   ContinueStatement asContinueStatement() => this;
 
   accept(Visitor visitor) => visitor.visitContinueStatement(this);
+
+  accept1(Visitor1 visitor, arg) => visitor.visitContinueStatement(this, arg);
 }
 
 abstract class ForIn extends Loop {
@@ -1900,8 +2420,8 @@
   final Token forToken;
   final Token inToken;
 
-  ForIn(this.declaredIdentifier, this.expression,
-        Statement body, this.forToken, this.inToken)
+  ForIn(this.declaredIdentifier, this.expression, Statement body, this.forToken,
+      this.inToken)
       : super(body);
 
   Expression get condition => null;
@@ -1919,32 +2439,48 @@
 
   accept(Visitor visitor) => visitor.visitSyncForIn(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitSyncForIn(this, arg);
+
   visitChildren(Visitor visitor) {
     declaredIdentifier.accept(visitor);
     expression.accept(visitor);
     body.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    declaredIdentifier.accept1(visitor, arg);
+    expression.accept1(visitor, arg);
+    body.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => forToken;
 }
 
 class AsyncForIn extends ForIn with StoredTreeElementMixin {
   final Token awaitToken;
 
-  AsyncForIn(declaredIdentifier, expression,
-        Statement body, this.awaitToken, forToken, inToken)
+  AsyncForIn(declaredIdentifier, expression, Statement body, this.awaitToken,
+      forToken, inToken)
       : super(declaredIdentifier, expression, body, forToken, inToken);
 
   AsyncForIn asAsyncForIn() => this;
 
   accept(Visitor visitor) => visitor.visitAsyncForIn(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitAsyncForIn(this, arg);
+
   visitChildren(Visitor visitor) {
     declaredIdentifier.accept(visitor);
     expression.accept(visitor);
     body.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    declaredIdentifier.accept1(visitor, arg);
+    expression.accept1(visitor, arg);
+    body.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => awaitToken;
 }
 
@@ -1960,10 +2496,16 @@
 
   accept(Visitor visitor) => visitor.visitLabel(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitLabel(this, arg);
+
   void visitChildren(Visitor visitor) {
     identifier.accept(visitor);
   }
 
+  void visitChildren1(Visitor1 visitor, arg) {
+    identifier.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => identifier.token;
   Token getEndToken() => colonToken;
 }
@@ -1978,11 +2520,18 @@
 
   accept(Visitor visitor) => visitor.visitLabeledStatement(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitLabeledStatement(this, arg);
+
   visitChildren(Visitor visitor) {
     labels.accept(visitor);
     statement.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    labels.accept1(visitor, arg);
+    statement.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => labels.getBeginToken();
 
   Token getEndToken() => statement.getEndToken();
@@ -2007,10 +2556,8 @@
 
   final Token libraryKeyword;
 
-  LibraryName(this.libraryKeyword,
-              this.name,
-              List<MetadataAnnotation> metadata)
-    : super(metadata);
+  LibraryName(this.libraryKeyword, this.name, List<MetadataAnnotation> metadata)
+      : super(metadata);
 
   bool get isLibraryName => true;
 
@@ -2018,8 +2565,12 @@
 
   accept(Visitor visitor) => visitor.visitLibraryName(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitLibraryName(this, arg);
+
   visitChildren(Visitor visitor) => name.accept(visitor);
 
+  visitChildren1(Visitor1 visitor, arg) => name.accept1(visitor, arg);
+
   Token getBeginToken() => libraryKeyword;
 
   Token getEndToken() => name.getEndToken().next;
@@ -2035,11 +2586,9 @@
   final NodeList conditionalUris;
   final NodeList combinators;
 
-  LibraryDependency(this.uri,
-                    this.conditionalUris,
-                    this.combinators,
-                    List<MetadataAnnotation> metadata)
-    : super(metadata);
+  LibraryDependency(this.uri, this.conditionalUris, this.combinators,
+      List<MetadataAnnotation> metadata)
+      : super(metadata);
 
   LibraryDependency asLibraryDependency() => this;
 
@@ -2059,9 +2608,8 @@
   final bool isDeferred;
 
   Import(this.importKeyword, StringNode uri, NodeList conditionalUris,
-         this.prefix, NodeList combinators,
-         List<MetadataAnnotation> metadata,
-         {this.isDeferred})
+      this.prefix, NodeList combinators, List<MetadataAnnotation> metadata,
+      {this.isDeferred})
       : super(uri, conditionalUris, combinators, metadata);
 
   bool get isImport => true;
@@ -2070,12 +2618,20 @@
 
   accept(Visitor visitor) => visitor.visitImport(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitImport(this, arg);
+
   visitChildren(Visitor visitor) {
     uri.accept(visitor);
     if (prefix != null) prefix.accept(visitor);
     if (combinators != null) combinators.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    uri.accept1(visitor, arg);
+    if (prefix != null) prefix.accept1(visitor, arg);
+    if (combinators != null) combinators.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => importKeyword;
 
   Token getEndToken() {
@@ -2108,12 +2664,20 @@
 
   accept(Visitor visitor) => visitor.visitConditionalUri(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitConditionalUri(this, arg);
+
   visitChildren(Visitor visitor) {
     key.accept(visitor);
     if (value != null) value.accept(visitor);
     uri.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    key.accept1(visitor, arg);
+    if (value != null) value.accept1(visitor, arg);
+    uri.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => ifToken;
 
   Token getEndToken() => uri.getEndToken();
@@ -2137,11 +2701,18 @@
 
   accept(Visitor visitor) => visitor.visitEnum(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitEnum(this, arg);
+
   visitChildren(Visitor visitor) {
     name.accept(visitor);
     if (names != null) names.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    name.accept1(visitor, arg);
+    if (names != null) names.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => enumToken;
   Token getEndToken() => names.getEndToken();
 }
@@ -2156,11 +2727,8 @@
 class Export extends LibraryDependency {
   final Token exportKeyword;
 
-  Export(this.exportKeyword,
-         StringNode uri,
-         NodeList conditionalUris,
-         NodeList combinators,
-         List<MetadataAnnotation> metadata)
+  Export(this.exportKeyword, StringNode uri, NodeList conditionalUris,
+      NodeList combinators, List<MetadataAnnotation> metadata)
       : super(uri, conditionalUris, combinators, metadata);
 
   bool get isExport => true;
@@ -2169,11 +2737,18 @@
 
   accept(Visitor visitor) => visitor.visitExport(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitExport(this, arg);
+
   visitChildren(Visitor visitor) {
     uri.accept(visitor);
     if (combinators != null) combinators.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    uri.accept1(visitor, arg);
+    if (combinators != null) combinators.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => exportKeyword;
 
   Token getEndToken() {
@@ -2189,7 +2764,7 @@
   final Token partKeyword;
 
   Part(this.partKeyword, this.uri, List<MetadataAnnotation> metadata)
-    : super(metadata);
+      : super(metadata);
 
   bool get isPart => true;
 
@@ -2197,8 +2772,12 @@
 
   accept(Visitor visitor) => visitor.visitPart(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitPart(this, arg);
+
   visitChildren(Visitor visitor) => uri.accept(visitor);
 
+  visitChildren1(Visitor1 visitor, arg) => uri.accept1(visitor, arg);
+
   Token getBeginToken() => partKeyword;
 
   Token getEndToken() => uri.getEndToken().next;
@@ -2221,8 +2800,12 @@
 
   accept(Visitor visitor) => visitor.visitPartOf(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitPartOf(this, arg);
+
   visitChildren(Visitor visitor) => name.accept(visitor);
 
+  visitChildren1(Visitor1 visitor, arg) => name.accept1(visitor, arg);
+
   Token getBeginToken() => partKeyword;
 
   Token getEndToken() => name.getEndToken().next;
@@ -2243,8 +2826,12 @@
 
   accept(Visitor visitor) => visitor.visitCombinator(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitCombinator(this, arg);
+
   visitChildren(Visitor visitor) => identifiers.accept(visitor);
 
+  visitChildren1(Visitor1 visitor, arg) => identifiers.accept1(visitor, arg);
+
   Token getBeginToken() => keywordToken;
 
   Token getEndToken() => identifiers.getEndToken();
@@ -2260,12 +2847,14 @@
   final Token endToken;
 
   Typedef(this.returnType, this.name, this.typeParameters, this.formals,
-          this.typedefKeyword, this.endToken);
+      this.typedefKeyword, this.endToken);
 
   Typedef asTypedef() => this;
 
   accept(Visitor visitor) => visitor.visitTypedef(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitTypedef(this, arg);
+
   visitChildren(Visitor visitor) {
     if (returnType != null) returnType.accept(visitor);
     name.accept(visitor);
@@ -2273,6 +2862,13 @@
     formals.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (returnType != null) returnType.accept1(visitor, arg);
+    name.accept1(visitor, arg);
+    if (typeParameters != null) typeParameters.accept1(visitor, arg);
+    formals.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => typedefKeyword;
 
   Token getEndToken() => endToken;
@@ -2287,18 +2883,26 @@
   final Token finallyKeyword;
 
   TryStatement(this.tryBlock, this.catchBlocks, this.finallyBlock,
-               this.tryKeyword, this.finallyKeyword);
+      this.tryKeyword, this.finallyKeyword);
 
   TryStatement asTryStatement() => this;
 
   accept(Visitor visitor) => visitor.visitTryStatement(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitTryStatement(this, arg);
+
   visitChildren(Visitor visitor) {
     tryBlock.accept(visitor);
     catchBlocks.accept(visitor);
     if (finallyBlock != null) finallyBlock.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    tryBlock.accept1(visitor, arg);
+    catchBlocks.accept1(visitor, arg);
+    if (finallyBlock != null) finallyBlock.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => tryKeyword;
 
   Token getEndToken() {
@@ -2315,10 +2919,16 @@
   Cascade asCascade() => this;
   accept(Visitor visitor) => visitor.visitCascade(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitCascade(this, arg);
+
   void visitChildren(Visitor visitor) {
     expression.accept(visitor);
   }
 
+  void visitChildren1(Visitor1 visitor, arg) {
+    expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => expression.getBeginToken();
 
   Token getEndToken() => expression.getEndToken();
@@ -2332,10 +2942,16 @@
   CascadeReceiver asCascadeReceiver() => this;
   accept(Visitor visitor) => visitor.visitCascadeReceiver(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitCascadeReceiver(this, arg);
+
   void visitChildren(Visitor visitor) {
     expression.accept(visitor);
   }
 
+  void visitChildren1(Visitor1 visitor, arg) {
+    expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => expression.getBeginToken();
 
   Token getEndToken() => expression.getEndToken();
@@ -2349,13 +2965,15 @@
   final Token onKeyword;
   final Token catchKeyword;
 
-  CatchBlock(this.type, this.formals, this.block,
-             this.onKeyword, this.catchKeyword);
+  CatchBlock(
+      this.type, this.formals, this.block, this.onKeyword, this.catchKeyword);
 
   CatchBlock asCatchBlock() => this;
 
   accept(Visitor visitor) => visitor.visitCatchBlock(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitCatchBlock(this, arg);
+
   Node get exception {
     if (formals == null || formals.nodes.isEmpty) return null;
     VariableDefinitions declarations = formals.nodes.head;
@@ -2376,6 +2994,12 @@
     block.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    if (type != null) type.accept1(visitor, arg);
+    if (formals != null) formals.accept1(visitor, arg);
+    block.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => onKeyword != null ? onKeyword : catchKeyword;
 
   Token getEndToken() => block.getEndToken();
@@ -2391,10 +3015,16 @@
 
   accept(Visitor visitor) => visitor.visitMetadata(this);
 
+  accept1(Visitor1 visitor, arg) => visitor.visitMetadata(this, arg);
+
   visitChildren(Visitor visitor) {
     expression.accept(visitor);
   }
 
+  visitChildren1(Visitor1 visitor, arg) {
+    expression.accept1(visitor, arg);
+  }
+
   Token getBeginToken() => token;
 
   Token getEndToken() => expression.getEndToken();
@@ -2403,7 +3033,7 @@
 class Initializers {
   static bool isSuperConstructorCall(Send node) {
     return (node.receiver == null && node.selector.isSuper()) ||
-           (node.receiver != null &&
+        (node.receiver != null &&
             node.receiver.isSuper() &&
             !node.isConditional &&
             node.selector.asIdentifier() != null);
@@ -2411,7 +3041,7 @@
 
   static bool isConstructorRedirect(Send node) {
     return (node.receiver == null && node.selector.isThis()) ||
-           (node.receiver != null &&
+        (node.receiver != null &&
             node.receiver.isThis() &&
             !node.isConditional &&
             node.selector.asIdentifier() != null);
@@ -2421,8 +3051,8 @@
 class GetDartStringVisitor extends Visitor<DartString> {
   const GetDartStringVisitor();
   DartString visitNode(Node node) => null;
-  DartString visitStringJuxtaposition(StringJuxtaposition node)
-      => node.dartString;
+  DartString visitStringJuxtaposition(StringJuxtaposition node) =>
+      node.dartString;
   DartString visitLiteralString(LiteralString node) => node.dartString;
 }
 
@@ -2430,15 +3060,14 @@
   const IsInterpolationVisitor();
   bool visitNode(Node node) => false;
   bool visitStringInterpolation(StringInterpolation node) => true;
-  bool visitStringJuxtaposition(StringJuxtaposition node)
-      => node.isInterpolation;
+  bool visitStringJuxtaposition(StringJuxtaposition node) =>
+      node.isInterpolation;
 }
 
 /// Erroneous node used to recover from parser errors.  Implements various
 /// interfaces and provides bare minimum of implementation to avoid unnecessary
 /// messages.
-class ErrorNode
-    extends Node
+class ErrorNode extends Node
     implements FunctionExpression, VariableDefinitions, Typedef {
   final Token token;
   final String reason;
@@ -2449,8 +3078,8 @@
 
   factory ErrorNode(Token token, String reason) {
     Identifier name = new Identifier(token);
-    NodeList definitions = new NodeList(
-        null, const Link<Node>().prepend(name), null, null);
+    NodeList definitions =
+        new NodeList(null, const Link<Node>().prepend(name), null, null);
     return new ErrorNode.internal(token, reason, name, definitions);
   }
 
@@ -2463,8 +3092,12 @@
 
   accept(Visitor visitor) {}
 
+  accept1(Visitor1 visitor, arg) {}
+
   visitChildren(Visitor visitor) {}
 
+  visitChildren1(Visitor1 visitor, arg) {}
+
   bool get isErroneous => true;
 
   // FunctionExpression.
@@ -2476,8 +3109,8 @@
   get initializers => null;
   get getOrSet => null;
   get isRedirectingFactory => false;
-  bool hasBody() => false;
-  bool hasEmptyBody() => false;
+  bool get hasBody => false;
+  bool get hasEmptyBody => false;
 
   // VariableDefinitions.
   get metadata => null;
diff --git a/pkg/compiler/lib/src/tree/prettyprint.dart b/pkg/compiler/lib/src/tree/prettyprint.dart
index 552747e..dceffaf 100644
--- a/pkg/compiler/lib/src/tree/prettyprint.dart
+++ b/pkg/compiler/lib/src/tree/prettyprint.dart
@@ -2,7 +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.
 
-part of tree;
+import '../tokens/token.dart' show BeginGroupToken, Token;
+import '../util/util.dart';
+import 'nodes.dart';
 
 /**
  * Pretty-prints Node tree in XML-like format.
@@ -45,8 +47,7 @@
 
   visitAsyncModifier(AsyncModifier node) {
     openAndCloseNode(node, "AsyncModifier",
-        {'asyncToken': node.asyncToken,
-         'starToken': node.starToken});
+        {'asyncToken': node.asyncToken, 'starToken': node.starToken});
   }
 
   visitBlock(Block node) {
@@ -74,9 +75,8 @@
   }
 
   visitClassNode(ClassNode node) {
-    openNode(node, "ClassNode", {
-      "extendsKeyword" : tokenToStringOrNull(node.extendsKeyword)
-    });
+    openNode(node, "ClassNode",
+        {"extendsKeyword": tokenToStringOrNull(node.extendsKeyword)});
     visitChildNode(node.name, "name");
     visitChildNode(node.superclass, "superclass");
     visitChildNode(node.interfaces, "interfaces");
@@ -122,14 +122,19 @@
     visitNodeWithChildren(node, "For");
   }
 
+  visitForIn(ForIn node) {
+    node.visitChildren(this);
+    closeNode();
+  }
+
   visitAsyncForIn(AsyncForIn node) {
     openNode(node, "AsyncForIn");
+    visitForIn(node);
   }
 
   visitSyncForIn(SyncForIn node) {
-    openNode(node, "ForIn");
-    node.visitChildren(this);
-    closeNode();
+    openNode(node, "SyncForIn");
+    visitForIn(node);
   }
 
   visitFunctionDeclaration(FunctionDeclaration node) {
@@ -137,9 +142,8 @@
   }
 
   visitFunctionExpression(FunctionExpression node) {
-    openNode(node, "FunctionExpression", {
-      "getOrSet" : tokenToStringOrNull(node.getOrSet)
-    });
+    openNode(node, "FunctionExpression",
+        {"getOrSet": tokenToStringOrNull(node.getOrSet)});
     visitChildNode(node.modifiers, "modifiers");
     visitChildNode(node.returnType, "returnType");
     visitChildNode(node.name, "name");
@@ -150,7 +154,7 @@
   }
 
   visitIdentifier(Identifier node) {
-    openAndCloseNode(node, "Identifier", {"token" : node.token});
+    openAndCloseNode(node, "Identifier", {"token": node.token});
   }
 
   visitIf(If node) {
@@ -167,7 +171,7 @@
 
   // Custom.
   printLiteral(Literal node, String type) {
-    openAndCloseNode(node, type, {"value" : node.value.toString()});
+    openAndCloseNode(node, type, {"value": node.value.toString()});
   }
 
   visitLiteralBool(LiteralBool node) {
@@ -186,9 +190,8 @@
   tokenToStringOrNull(Token token) => token == null ? null : token.stringValue;
 
   visitLiteralList(LiteralList node) {
-    openNode(node, "LiteralList", {
-      "constKeyword" : tokenToStringOrNull(node.constKeyword)
-    });
+    openNode(node, "LiteralList",
+        {"constKeyword": tokenToStringOrNull(node.constKeyword)});
     visitChildNode(node.typeArguments, "typeArguments");
     visitChildNode(node.elements, "elements");
     closeNode();
@@ -207,8 +210,7 @@
   }
 
   visitLiteralString(LiteralString node) {
-    openAndCloseNode(node, "LiteralString",
-        {"value" : node.token});
+    openAndCloseNode(node, "LiteralString", {"value": node.token});
   }
 
   visitMixinApplication(MixinApplication node) {
@@ -232,7 +234,7 @@
   }
 
   visitNodeList(NodeList node) {
-    var params = { "delimiter" : node.delimiter };
+    var params = {"delimiter": node.delimiter};
     if (node.isEmpty) {
       openAndCloseNode(node, "NodeList", params);
     } else {
@@ -243,7 +245,7 @@
   }
 
   visitOperator(Operator node) {
-    openAndCloseNode(node, "Operator", {"value" : node.token});
+    openAndCloseNode(node, "Operator", {"value": node.token});
   }
 
   visitParenthesizedExpression(ParenthesizedExpression node) {
@@ -285,9 +287,9 @@
 
   openSendNodeWithFields(Send node, String type) {
     openNode(node, type, {
-        "isPrefix" : "${node.isPrefix}",
-        "isPostfix" : "${node.isPostfix}",
-        "isIndex" : "${node.isIndex}"
+      "isPrefix": "${node.isPrefix}",
+      "isPostfix": "${node.isPostfix}",
+      "isIndex": "${node.isIndex}"
     });
     visitChildNode(node.receiver, "receiver");
     visitChildNode(node.selector, "selector");
@@ -374,16 +376,14 @@
   }
 
   visitMetadata(Metadata node) {
-    openNode(node, "Metadata", {
-      "token": node.token
-    });
+    openNode(node, "Metadata", {"token": node.token});
     visitChildNode(node.expression, "expression");
     closeNode();
   }
 
   visitCombinator(Combinator node) {
-    openNode(node, "Combinator", {"isShow" : "${node.isShow}",
-                                  "isHide" : "${node.isHide}"});
+    openNode(node, "Combinator",
+        {"isShow": "${node.isShow}", "isHide": "${node.isHide}"});
     closeNode();
   }
 
@@ -398,8 +398,7 @@
   }
 
   visitImport(Import node) {
-    openNode(node, "Import", {
-      "isDeferred" : "${node.isDeferred}"});
+    openNode(node, "Import", {"isDeferred": "${node.isDeferred}"});
     visitChildNode(node.uri, "uri");
     if (node.conditionalUris != null) {
       visitChildNode(node.conditionalUris, "conditionalUris");
diff --git a/pkg/compiler/lib/src/tree/tree.dart b/pkg/compiler/lib/src/tree/tree.dart
index 8c65fab..71e9b6d 100644
--- a/pkg/compiler/lib/src/tree/tree.dart
+++ b/pkg/compiler/lib/src/tree/tree.dart
@@ -4,29 +4,7 @@
 
 library tree;
 
-import 'dart:collection';
-
-import '../common.dart';
-import '../tokens/precedence_constants.dart' as Precedence show
-    FUNCTION_INFO;
-import '../tokens/token.dart' show
-    BeginGroupToken,
-    Token;
-import '../tokens/token_constants.dart' as Tokens show
-    IDENTIFIER_TOKEN,
-    KEYWORD_TOKEN,
-    PLUS_TOKEN;
-import '../util/util.dart';
-import '../util/characters.dart';
-
-import '../resolution/secret_tree_element.dart' show
-    NullTreeElementMixin,
-    StoredTreeElementMixin;
-
-import '../elements/elements.dart' show
-    MetadataAnnotation;
-
-part 'dartstring.dart';
-part 'nodes.dart';
-part 'prettyprint.dart';
-part 'unparser.dart';
+export 'dartstring.dart';
+export 'nodes.dart';
+export 'prettyprint.dart';
+export 'unparser.dart';
diff --git a/pkg/compiler/lib/src/tree/unparser.dart b/pkg/compiler/lib/src/tree/unparser.dart
index 807ea05..bb1d38e 100644
--- a/pkg/compiler/lib/src/tree/unparser.dart
+++ b/pkg/compiler/lib/src/tree/unparser.dart
@@ -2,7 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of tree;
+import '../tokens/token.dart' show BeginGroupToken, Token;
+import '../tokens/token_constants.dart' as Tokens
+    show IDENTIFIER_TOKEN, KEYWORD_TOKEN, PLUS_TOKEN;
+import '../util/util.dart';
+import 'nodes.dart';
 
 String unparse(Node node, {minify: true}) {
   Unparser unparser = new Unparser(minify: minify);
@@ -34,8 +38,8 @@
   void addToken(Token token) {
     if (token == null) return;
     write(token.value);
-    if (identical(token.kind, Tokens.KEYWORD_TOKEN)
-        || identical(token.kind, Tokens.IDENTIFIER_TOKEN)) {
+    if (identical(token.kind, Tokens.KEYWORD_TOKEN) ||
+        identical(token.kind, Tokens.IDENTIFIER_TOKEN)) {
       write(' ');
     }
   }
@@ -52,7 +56,9 @@
     onEmptyLine = false;
   }
 
-  unparse(Node node) { visit(node); }
+  unparse(Node node) {
+    visit(node);
+  }
 
   visit(Node node) {
     if (node != null) node.accept(this);
@@ -92,7 +98,6 @@
     }
   }
 
-
   visitCascade(Cascade node) {
     visit(node.expression);
   }
@@ -213,7 +218,7 @@
     // arguments.
     if (name is Send) {
       Send send = name;
-      assert(send is !SendSet);
+      assert(send is! SendSet);
       if (!send.isOperator) {
         // Looks like a factory method.
         visit(send.receiver);
@@ -292,7 +297,7 @@
       space();
       write(node.elseToken.value);
       space();
-      if (node.elsePart is !Block && minify) write(' ');
+      if (node.elsePart is! Block && minify) write(' ');
       visit(node.elsePart);
     }
   }
@@ -423,7 +428,6 @@
     write(node.endToken.value);
   }
 
-
   unparseSendReceiver(Send node, {bool spacesNeeded: false}) {
     if (node.receiver == null) return;
     visit(node.receiver);
@@ -445,7 +449,7 @@
   unparseSendArgument(Send node, {bool spacesNeeded: false}) {
     if (node.argumentsNode == null) return;
 
-    if(node.isIsNotCheck) {
+    if (node.isIsNotCheck) {
       Send argNode = node.arguments.head;
       visit(argNode.selector);
       space();
@@ -466,7 +470,9 @@
     void minusMinusSpace(Node other) {
       if (other != null && opString == '-') {
         Token beginToken = other.getBeginToken();
-        if (beginToken != null && beginToken.stringValue != null && beginToken.stringValue.startsWith('-')) {
+        if (beginToken != null &&
+            beginToken.stringValue != null &&
+            beginToken.stringValue.startsWith('-')) {
           sb.write(' ');
           spacesNeeded = false;
         }
@@ -573,7 +579,7 @@
 
   visitDoWhile(DoWhile node) {
     write(node.doKeyword.value);
-    if (node.body is !Block) {
+    if (node.body is! Block) {
       write(' ');
     } else {
       space();
@@ -633,9 +639,7 @@
     visitGotoStatement(node);
   }
 
-  visitAsyncForIn(AsyncForIn node) {
-    write(node.awaitToken.value);
-    write(' ');
+  visitForIn(ForIn node) {
     write(node.forToken.value);
     space();
     write('(');
@@ -648,24 +652,20 @@
     visit(node.body);
   }
 
+  visitAsyncForIn(AsyncForIn node) {
+    write(node.awaitToken.value);
+    write(' ');
+    visitForIn(node);
+  }
 
   visitSyncForIn(SyncForIn node) {
-    write(node.forToken.value);
-    space();
-    write('(');
-    visit(node.declaredIdentifier);
-    write(' ');
-    addToken(node.inToken);
-    visit(node.expression);
-    write(')');
-    space();
-    visit(node.body);
+    visitForIn(node);
   }
 
   visitLabel(Label node) {
     visit(node.identifier);
     write(node.colonToken.value);
-   }
+  }
 
   visitLabeledStatement(LabeledStatement node) {
     visit(node.labels);
@@ -715,9 +715,10 @@
     newline();
   }
 
-  unparseImportTag(String uri, {String prefix,
-                                List<String> shows: const <String>[],
-                                bool isDeferred: false}) {
+  unparseImportTag(String uri,
+      {String prefix,
+      List<String> shows: const <String>[],
+      bool isDeferred: false}) {
     String deferredString = isDeferred ? ' deferred' : '';
     String prefixString = prefix == null ? '' : ' as $prefix';
     String showString = shows.isEmpty ? '' : ' show ${shows.join(", ")}';
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
index dd44f1d..bfed37d 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
@@ -52,8 +52,7 @@
 ///
 ///   !x ? y : false  ==>  !x && y
 ///
-class LogicalRewriter extends RecursiveTransformer
-                      implements Pass {
+class LogicalRewriter extends RecursiveTransformer implements Pass {
   String get passName => 'Logical rewriter';
 
   @override
@@ -68,20 +67,20 @@
   /// This means it will ultimately translate to an empty statement.
   bool isFallthrough(Statement node) {
     return node is Break && isFallthroughBreak(node) ||
-           node is Continue && isFallthroughContinue(node) ||
-           node is Return && isFallthroughReturn(node);
+        node is Continue && isFallthroughContinue(node) ||
+        node is Return && isFallthroughReturn(node);
   }
 
   bool isFallthroughBreak(Break node) {
     Statement target = fallthrough.target;
     return node.target.binding.next == target ||
-           target is Break && target.target == node.target;
+        target is Break && target.target == node.target;
   }
 
   bool isFallthroughContinue(Continue node) {
     Statement target = fallthrough.target;
     return node.target.binding == target ||
-           target is Continue && target.target == node.target;
+        target is Continue && target.target == node.target;
   }
 
   bool isFallthroughReturn(Return node) {
@@ -90,8 +89,8 @@
 
   bool isTerminator(Statement node) {
     return (node is Jump || node is Return) && !isFallthrough(node) ||
-           (node is ExpressionStatement && node.next is Unreachable) ||
-           node is Throw;
+        (node is ExpressionStatement && node.next is Unreachable) ||
+        node is Throw;
   }
 
   Statement visitIf(If node) {
@@ -123,7 +122,7 @@
       // if (E) {} else {S} ==> if (!E) {S}
       bestThenBranch = ELSE;
     } else if (isFallthrough(node.elseStatement) &&
-               !isFallthrough(node.thenStatement)) {
+        !isFallthrough(node.thenStatement)) {
       // Keep the empty statement in the 'else' branch.
       // if (E) {S} else {}
       bestThenBranch = THEN;
@@ -136,12 +135,12 @@
       // if (E) {S1; return v}; S2
       bestThenBranch = THEN;
     } else if (isTerminator(node.elseStatement) &&
-               !isTerminator(node.thenStatement)) {
+        !isTerminator(node.thenStatement)) {
       // Put early termination in the 'then' branch to reduce nesting depth.
       // if (E) {S}; return v ==> if (!E) return v; S
       bestThenBranch = ELSE;
     } else if (isTerminator(node.thenStatement) &&
-               !isTerminator(node.elseStatement)) {
+        !isTerminator(node.elseStatement)) {
       // Keep early termination in the 'then' branch to reduce nesting depth.
       // if (E) {return v;} S
       bestThenBranch = THEN;
@@ -160,7 +159,7 @@
     //   ==>
     // if (E) S2 else S1
     node.condition = makeCondition(node.condition, true,
-                                   liftNots: bestThenBranch == NEITHER);
+        liftNots: bestThenBranch == NEITHER);
     if (bestThenBranch == NEITHER && node.condition is Not) {
       node.condition = (node.condition as Not).operand;
       Statement tmp = node.thenStatement;
@@ -269,15 +268,13 @@
     // x ? y : 0     ==> x && y  (if x is truthy or zero) (and so on...)
     if (matchesFalsyValue(node.condition, getConstant(node.elseExpression))) {
       return new LogicalOperator.and(
-          visitExpression(node.condition),
-          node.thenExpression);
+          visitExpression(node.condition), node.thenExpression);
     }
     // x ? true : y ==> x || y  (if x is falsy or true)
     // x ? 1    : y ==> x || y  (if x is falsy or one) (and so on...)
     if (matchesTruthyValue(node.condition, getConstant(node.thenExpression))) {
       return new LogicalOperator.or(
-          visitExpression(node.condition),
-          node.elseExpression);
+          visitExpression(node.condition), node.elseExpression);
     }
     // x ? y : true ==> !x || y
     if (isTrue(node.elseExpression)) {
@@ -328,11 +325,11 @@
   /// rewritten anyway.
   bool isBooleanValued(Expression e) {
     return isTrue(e) ||
-           isFalse(e) ||
-           e is Not ||
-           e is LogicalOperator && isBooleanValuedLogicalOperator(e) ||
-           e is ApplyBuiltinOperator && operatorReturnsBool(e.operator) ||
-           e is TypeOperator && isBooleanValuedTypeOperator(e);
+        isFalse(e) ||
+        e is Not ||
+        e is LogicalOperator && isBooleanValuedLogicalOperator(e) ||
+        e is ApplyBuiltinOperator && operatorReturnsBool(e.operator) ||
+        e is TypeOperator && isBooleanValuedTypeOperator(e);
   }
 
   bool isBooleanValuedLogicalOperator(LogicalOperator e) {
@@ -368,14 +365,22 @@
 
   BuiltinOperator negateBuiltin(BuiltinOperator operator) {
     switch (operator) {
-      case BuiltinOperator.StrictEq: return BuiltinOperator.StrictNeq;
-      case BuiltinOperator.StrictNeq: return BuiltinOperator.StrictEq;
-      case BuiltinOperator.LooseEq: return BuiltinOperator.LooseNeq;
-      case BuiltinOperator.LooseNeq: return BuiltinOperator.LooseEq;
-      case BuiltinOperator.IsNumber: return BuiltinOperator.IsNotNumber;
-      case BuiltinOperator.IsNotNumber: return BuiltinOperator.IsNumber;
-      case BuiltinOperator.IsInteger: return BuiltinOperator.IsNotInteger;
-      case BuiltinOperator.IsNotInteger: return BuiltinOperator.IsInteger;
+      case BuiltinOperator.StrictEq:
+        return BuiltinOperator.StrictNeq;
+      case BuiltinOperator.StrictNeq:
+        return BuiltinOperator.StrictEq;
+      case BuiltinOperator.LooseEq:
+        return BuiltinOperator.LooseNeq;
+      case BuiltinOperator.LooseNeq:
+        return BuiltinOperator.LooseEq;
+      case BuiltinOperator.IsNumber:
+        return BuiltinOperator.IsNotNumber;
+      case BuiltinOperator.IsNotNumber:
+        return BuiltinOperator.IsNumber;
+      case BuiltinOperator.IsInteger:
+        return BuiltinOperator.IsNotInteger;
+      case BuiltinOperator.IsNotInteger:
+        return BuiltinOperator.IsInteger;
       case BuiltinOperator.IsUnsigned32BitInteger:
         return BuiltinOperator.IsNotUnsigned32BitInteger;
       case BuiltinOperator.IsNotUnsigned32BitInteger:
@@ -406,7 +411,7 @@
   /// If [polarity] if false, the negated condition will be created instead.
   /// If [liftNots] is true (default) then Not expressions will be lifted toward
   /// the root of the condition so they can be eliminated by the caller.
-  Expression makeCondition(Expression e, bool polarity, {bool liftNots:true}) {
+  Expression makeCondition(Expression e, bool polarity, {bool liftNots: true}) {
     if (e is Not) {
       // !!E ==> E
       return makeCondition(e.operand, !polarity, liftNots: liftNots);
@@ -453,27 +458,23 @@
       }
       // x ? true : y  ==> x || y
       if (isTrue(e.thenExpression)) {
-        return makeOr(makeCondition(e.condition, true),
-                      e.elseExpression,
-                      liftNots: liftNots);
+        return makeOr(makeCondition(e.condition, true), e.elseExpression,
+            liftNots: liftNots);
       }
       // x ? false : y  ==> !x && y
       if (isFalse(e.thenExpression)) {
-        return makeAnd(makeCondition(e.condition, false),
-                       e.elseExpression,
-                       liftNots: liftNots);
+        return makeAnd(makeCondition(e.condition, false), e.elseExpression,
+            liftNots: liftNots);
       }
       // x ? y : true  ==> !x || y
       if (isTrue(e.elseExpression)) {
-        return makeOr(makeCondition(e.condition, false),
-                      e.thenExpression,
-                      liftNots: liftNots);
+        return makeOr(makeCondition(e.condition, false), e.thenExpression,
+            liftNots: liftNots);
       }
       // x ? y : false  ==> x && y
       if (isFalse(e.elseExpression)) {
-        return makeAnd(makeCondition(e.condition, true),
-                       e.thenExpression,
-                       liftNots: liftNots);
+        return makeAnd(makeCondition(e.condition, true), e.thenExpression,
+            liftNots: liftNots);
       }
 
       e.condition = makeCondition(e.condition, true);
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
index 2f5a9fd..e57c938 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
@@ -73,8 +73,7 @@
 /// readability and stack trace usability versus the modest code size
 /// reduction one might get by aggressively moving expressions into the
 /// updates.
-class LoopRewriter extends RecursiveTransformer
-                   implements Pass {
+class LoopRewriter extends RecursiveTransformer implements Pass {
   String get passName => 'Loop rewriter';
 
   Set<Label> usedContinueLabels = new Set<Label>();
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart b/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
index 8840c8e..931368d 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
@@ -57,8 +57,7 @@
 /// [PullIntoInitializers] cannot pull `y` into an initializer because
 /// the impure expressions `foo()` and `bar()` would then be swapped.
 ///
-class PullIntoInitializers extends RecursiveTransformer
-                           implements Pass {
+class PullIntoInitializers extends RecursiveTransformer implements Pass {
   String get passName => 'Pull into initializers';
 
   /// Denotes where each variable is currently assigned.
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
index 3685137..5db310a 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
@@ -368,22 +368,22 @@
     // expressions recursively. Determine if that is a valuable optimization
     // and/or if it is better handled at the CPS level.
     return exp is Constant ||
-           exp is This ||
-           exp is CreateInvocationMirror ||
-           exp is CreateInstance ||
-           exp is CreateBox ||
-           exp is TypeExpression ||
-           exp is GetStatic && exp.element.isFunction ||
-           exp is Interceptor ||
-           exp is ApplyBuiltinOperator ||
-           exp is VariableUse && constantEnvironment.containsKey(exp.variable);
+        exp is This ||
+        exp is CreateInvocationMirror ||
+        exp is CreateInstance ||
+        exp is CreateBox ||
+        exp is TypeExpression ||
+        exp is GetStatic && exp.element.isFunction ||
+        exp is Interceptor ||
+        exp is ApplyBuiltinOperator ||
+        exp is VariableUse && constantEnvironment.containsKey(exp.variable);
   }
 
   /// True if [node] is an assignment that can be propagated as a constant.
   bool isEffectivelyConstantAssignment(Expression node) {
     return node is Assign &&
-           node.variable.writeCount == 1 &&
-           isEffectivelyConstant(node.value);
+        node.variable.writeCount == 1 &&
+        isEffectivelyConstant(node.value);
   }
 
   Statement visitExpressionStatement(ExpressionStatement inputNode) {
@@ -680,9 +680,7 @@
     });
 
     Statement reduced = combineStatementsInBranches(
-        node.thenStatement,
-        node.elseStatement,
-        node.condition);
+        node.thenStatement, node.elseStatement, node.condition);
     if (reduced != null) {
       return reduced;
     }
@@ -746,8 +744,8 @@
 
   bool isCompoundableBuiltin(Expression e) {
     return e is ApplyBuiltinOperator &&
-           e.arguments.length >= 2 &&
-           isCompoundableOperator(e.operator);
+        e.arguments.length >= 2 &&
+        isCompoundableOperator(e.operator);
   }
 
   /// Converts a compoundable operator application into the right-hand side for
@@ -758,7 +756,8 @@
     assert(isCompoundableBuiltin(e));
     if (e.arguments.length > 2) {
       assert(e.operator == BuiltinOperator.StringConcatenate);
-      return new ApplyBuiltinOperator(e.operator, e.arguments.skip(1).toList());
+      return new ApplyBuiltinOperator(
+          e.operator, e.arguments.skip(1).toList(), e.sourceInformation);
     } else {
       return e.arguments[1];
     }
@@ -911,12 +910,17 @@
       // Symmetric operators are their own commutes.
       return operator;
     }
-    switch(operator) {
-      case BuiltinOperator.NumLt: return BuiltinOperator.NumGt;
-      case BuiltinOperator.NumLe: return BuiltinOperator.NumGe;
-      case BuiltinOperator.NumGt: return BuiltinOperator.NumLt;
-      case BuiltinOperator.NumGe: return BuiltinOperator.NumLe;
-      default: return null;
+    switch (operator) {
+      case BuiltinOperator.NumLt:
+        return BuiltinOperator.NumGt;
+      case BuiltinOperator.NumLe:
+        return BuiltinOperator.NumGe;
+      case BuiltinOperator.NumGt:
+        return BuiltinOperator.NumLt;
+      case BuiltinOperator.NumGe:
+        return BuiltinOperator.NumLe;
+      default:
+        return null;
     }
   }
 
@@ -945,8 +949,8 @@
           Expression right = node.arguments[1];
           if (right is This ||
               (right is VariableUse &&
-               propagatableVariable != right.variable &&
-               !constantEnvironment.containsKey(right.variable))) {
+                  propagatableVariable != right.variable &&
+                  !constantEnvironment.containsKey(right.variable))) {
             // An assignment can be propagated if we commute the operator.
             node.operator = commuted;
             node.arguments[0] = right;
@@ -979,9 +983,7 @@
   /// If non-null is returned, the caller MUST discard [s] and [t] and use
   /// the returned statement instead.
   Statement combineStatementsInBranches(
-      Statement s,
-      Statement t,
-      Expression condition) {
+      Statement s, Statement t, Expression condition) {
     if (s is Return && t is Return) {
       return new Return(new Conditional(condition, s.value, t.value));
     }
@@ -1046,9 +1048,7 @@
   ///
   /// The latter form is more compact and can also be inlined.
   CombinedExpressions combineAsConditional(
-      Expression s,
-      Expression t,
-      Expression condition) {
+      Expression s, Expression t, Expression condition) {
     if (s is Assign && t is Assign && s.variable == t.variable) {
       Expression values = new Conditional(condition, s.value, t.value);
       return new CombinedAssigns(s, t, new CombinedExpressions(values));
@@ -1080,7 +1080,8 @@
       if (values != null) {
         // TODO(johnniwinther): Handle multiple source informations.
         SourceInformation sourceInformation = s.sourceInformation != null
-            ? s.sourceInformation : t.sourceInformation;
+            ? s.sourceInformation
+            : t.sourceInformation;
         return new Return(values.combined,
             sourceInformation: sourceInformation);
       }
@@ -1224,7 +1225,7 @@
     bool isNullable(int position) => node.nullableArguments[position];
 
     int safeArguments =
-      PlaceholderSafetyAnalysis.analyze(node.codeTemplate.ast, isNullable);
+        PlaceholderSafetyAnalysis.analyze(node.codeTemplate.ast, isNullable);
     inEmptyEnvironment(() {
       for (int i = node.arguments.length - 1; i >= safeArguments; --i) {
         node.arguments[i] = visitExpression(node.arguments[i]);
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart b/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart
index bcc16ca..273d7a4 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart
@@ -24,7 +24,8 @@
     _computeLiveness(builder.blocks);
     PriorityPairs priority = new PriorityPairs()..build(node);
     Map<Variable, Variable> subst = _computeRegisterAllocation(
-        builder.blocks, node.parameters, priority, minifying: minifying);
+        builder.blocks, node.parameters, priority,
+        minifying: minifying);
     new SubstituteVariables(subst).apply(node);
   }
 }
@@ -276,8 +277,8 @@
     if (value is VariableUse) {
       _prioritize(node.variable, value.variable);
     } else if (value is ApplyBuiltinOperator &&
-               isCompoundableOperator(value.operator) &&
-               value.arguments[0] is VariableUse) {
+        isCompoundableOperator(value.operator) &&
+        value.arguments[0] is VariableUse) {
       VariableUse use = value.arguments[0];
       _prioritize(node.variable, use.variable);
     }
@@ -385,10 +386,9 @@
 ///
 /// We then compute a graph coloring, where the color of a node denotes which
 /// variable it will be substituted by.
-Map<Variable, Variable> _computeRegisterAllocation(List<Block> blocks,
-                                                   List<Variable> parameters,
-                                                   PriorityPairs priority,
-                                                   {bool minifying}) {
+Map<Variable, Variable> _computeRegisterAllocation(
+    List<Block> blocks, List<Variable> parameters, PriorityPairs priority,
+    {bool minifying}) {
   Map<Variable, Set<Variable>> interference = <Variable, Set<Variable>>{};
 
   bool allowUnmotivatedMerge(Variable x, Variable y) {
@@ -407,8 +407,8 @@
     // The presence of the phi implies that the two variables can contain the
     // same value, so it is not that confusing that they get the same name.
     return x.element == null ||
-           y.element == null ||
-           x.element.name == y.element.name;
+        y.element == null ||
+        x.element.name == y.element.name;
   }
 
   Set<Variable> empty = new Set<Variable>();
@@ -423,9 +423,8 @@
       interference.putIfAbsent(variable, () => new Set<Variable>());
     }
     // Get variables that are live at the catch block.
-    Set<Variable> liveCatch = block.catchBlock != null
-        ? block.catchBlock.liveIn
-        : empty;
+    Set<Variable> liveCatch =
+        block.catchBlock != null ? block.catchBlock.liveIn : empty;
     // Add edges for each variable being assigned here.
     for (VariableAccess access in block.accesses.reversed) {
       Variable variable = access.variable;
@@ -509,8 +508,7 @@
     searchPriorityPairs(parameter, parameter);
   }
 
-  v1loop:
-  for (Variable v1 in variables) {
+  v1loop: for (Variable v1 in variables) {
     // Ignore if the variable has already been assigned a register.
     if (subst.containsKey(v1)) continue;
 
@@ -532,7 +530,7 @@
 
     // Find an unused color.
     Set<Variable> potential = new Set<Variable>.from(
-          registers.where((v2) => allowUnmotivatedMerge(v1, v2)));
+        registers.where((v2) => allowUnmotivatedMerge(v1, v2)));
     for (Variable v2 in interferenceSet) {
       Variable v2subst = subst[v2];
       if (v2subst != null) {
@@ -554,7 +552,6 @@
 
 /// Performs variable substitution and removes redundant assignments.
 class SubstituteVariables extends RecursiveTransformer {
-
   Map<Variable, Variable> mapping;
 
   SubstituteVariables(this.mapping);
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index 324f45f..000f610 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -8,7 +8,8 @@
 import '../constants/values.dart';
 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
 import '../elements/elements.dart';
-import 'package:js_ast/js_ast.dart' as js;
+import '../io/source_information.dart';
+import '../js_backend/codegen/glue.dart';
 
 import 'tree_ir_nodes.dart';
 
@@ -48,6 +49,7 @@
  */
 class Builder implements cps_ir.Visitor/*<NodeCallback|Node>*/ {
   final InternalErrorFunction internalError;
+  final Glue glue;
 
   final Map<cps_ir.Primitive, Variable> primitive2variable =
       <cps_ir.Primitive, Variable>{};
@@ -60,17 +62,13 @@
   final Map<cps_ir.Continuation, Label> labels = <cps_ir.Continuation, Label>{};
 
   ExecutableElement currentElement;
-  /// The 'this' Parameter for currentElement or the enclosing method.
+
+  /// The parameter to be translated to 'this'.  This can either be the receiver
+  /// parameter, the interceptor parameter, or null if the method has neither.
   cps_ir.Parameter thisParameter;
   cps_ir.Continuation returnContinuation;
 
-  Builder parent;
-
-  Builder(this.internalError, [this.parent]);
-
-  Builder createInnerBuilder() {
-    return new Builder(internalError, this);
-  }
+  Builder(this.internalError, this.glue);
 
   /// Variable used in [buildPhiAssignments] as a temporary when swapping
   /// variables.
@@ -84,31 +82,30 @@
   }
 
   Variable getMutableVariable(cps_ir.MutableVariable mutableVariable) {
-    if (!mutable2variable.containsKey(mutableVariable)) {
-      return parent.getMutableVariable(mutableVariable)..isCaptured = true;
-    }
     return mutable2variable[mutableVariable];
   }
 
   VariableUse getMutableVariableUse(
-        cps_ir.Reference<cps_ir.MutableVariable> reference) {
+      cps_ir.Reference<cps_ir.MutableVariable> reference,
+      SourceInformation sourceInformation) {
     Variable variable = getMutableVariable(reference.definition);
-    return new VariableUse(variable);
+    return new VariableUse(variable, sourceInformation: sourceInformation);
   }
 
   /// Obtains the variable representing the given primitive. Returns null for
   /// primitives that have no reference and do not need a variable.
   Variable getVariable(cps_ir.Primitive primitive) {
     primitive = primitive.effectiveDefinition;
-    return primitive2variable.putIfAbsent(primitive,
-        () => new Variable(currentElement, primitive.hint));
+    return primitive2variable.putIfAbsent(
+        primitive, () => new Variable(currentElement, primitive.hint));
   }
 
   /// Obtains a reference to the tree Variable corresponding to the IR primitive
   /// referred to by [reference].
   /// This increments the reference count for the given variable, so the
   /// returned expression must be used in the tree.
-  Expression getVariableUse(cps_ir.Reference<cps_ir.Primitive> reference) {
+  Expression getVariableUse(cps_ir.Reference<cps_ir.Primitive> reference,
+      {SourceInformation sourceInformation}) {
     cps_ir.Primitive prim = reference.definition.effectiveDefinition;
     if (prim is cps_ir.Constant && inlinedConstants.contains(prim)) {
       return new Constant(prim.value);
@@ -116,11 +113,12 @@
     if (thisParameter != null && prim == thisParameter) {
       return new This();
     }
-    return new VariableUse(getVariable(prim));
+    return new VariableUse(getVariable(prim),
+        sourceInformation: sourceInformation);
   }
 
   Expression getVariableUseOrNull(
-        cps_ir.Reference<cps_ir.Primitive> reference) {
+      cps_ir.Reference<cps_ir.Primitive> reference) {
     return reference == null ? null : getVariableUse(reference);
   }
 
@@ -128,24 +126,22 @@
     return labels.putIfAbsent(cont, () => new Label());
   }
 
-  Variable addFunctionParameter(cps_ir.Parameter parameter) {
-    return getVariable(parameter);
-  }
-
   FunctionDefinition buildFunction(cps_ir.FunctionDefinition node) {
     currentElement = node.element;
-    if (parent != null) {
-      // Local function's 'this' refers to enclosing method's 'this'
-      thisParameter = parent.thisParameter;
+    List<Variable> parameters = node.parameters.map(getVariable).toList();
+    if (node.interceptorParameter != null) {
+      parameters.insert(0, getVariable(node.receiverParameter));
+      thisParameter = glue.methodUsesReceiverArgument(node.element)
+          ? node.interceptorParameter
+          : node.receiverParameter;
     } else {
-      thisParameter = node.thisParameter;
+      thisParameter = node.receiverParameter;
     }
-    List<Variable> parameters =
-        node.parameters.map(addFunctionParameter).toList();
     returnContinuation = node.returnContinuation;
     phiTempVar = new Variable(node.element, null);
     Statement body = translateExpression(node.body);
-    return new FunctionDefinition(node.element, parameters, body);
+    return new FunctionDefinition(node.element, parameters, body,
+        sourceInformation: node.sourceInformation);
   }
 
   /// Returns a list of variables corresponding to the arguments to a method
@@ -156,17 +152,15 @@
   /// The list will be typed as a list of [Expression] to allow inplace updates
   /// on the list during the rewrite phases.
   List<Expression> translateArguments(List<cps_ir.Reference> args) {
-    return new List<Expression>.generate(args.length,
-         (int index) => getVariableUse(args[index]),
-         growable: false);
+    return new List<Expression>.generate(
+        args.length, (int index) => getVariableUse(args[index]),
+        growable: false);
   }
 
   /// Simultaneously assigns each argument to the corresponding parameter,
   /// then continues at the statement created by [buildRest].
-  Statement buildPhiAssignments(
-      List<cps_ir.Parameter> parameters,
-      List<Expression> arguments,
-      Statement buildRest()) {
+  Statement buildPhiAssignments(List<cps_ir.Parameter> parameters,
+      List<Expression> arguments, Statement buildRest()) {
     assert(parameters.length == arguments.length);
     // We want a parallel assignment to all parameters simultaneously.
     // Since we do not have parallel assignments in dart_tree, we must linearize
@@ -222,7 +216,8 @@
         // The temporary will then be used as right-hand side when the
         // assignment gets added.
         VariableUse source = assignmentSrc[i];
-        if (source.variable != phiTempVar) { // Only move to temporary once.
+        if (source.variable != phiTempVar) {
+          // Only move to temporary once.
           assignmentSrc[i] = new VariableUse(phiTempVar);
           addAssignment(phiTempVar, arg);
         }
@@ -369,30 +364,28 @@
   //     of the non-recursive continuation invocation.
   // See [visitInvokeContinuation] for the implementation.
   NodeCallback visitLetCont(cps_ir.LetCont node) => (Statement next) {
-    for (cps_ir.Continuation continuation in node.continuations) {
-      // This happens after the body of the LetCont has been translated.
-      // Labels are created on-demand if the continuation could not be inlined,
-      // so the existence of the label indicates if a labeled statement should
-      // be emitted.
-      Label label = labels[continuation];
-      if (label != null && !continuation.isRecursive) {
-        // Recursively build the body. We only do this for join continuations,
-        // so we should not risk overly deep recursion.
-        next = new LabeledStatement(
-            label,
-            next,
-            translateExpression(continuation.body));
-      }
-    }
-    return next;
-  };
+        for (cps_ir.Continuation continuation in node.continuations) {
+          // This happens after the body of the LetCont has been translated.
+          // Labels are created on-demand if the continuation could not be inlined,
+          // so the existence of the label indicates if a labeled statement should
+          // be emitted.
+          Label label = labels[continuation];
+          if (label != null && !continuation.isRecursive) {
+            // Recursively build the body. We only do this for join continuations,
+            // so we should not risk overly deep recursion.
+            next = new LabeledStatement(
+                label, next, translateExpression(continuation.body));
+          }
+        }
+        return next;
+      };
 
   NodeCallback visitLetHandler(cps_ir.LetHandler node) => (Statement next) {
-    List<Variable> catchParameters =
-        node.handler.parameters.map(getVariable).toList();
-    Statement catchBody = translateExpression(node.handler.body);
-    return new Try(next, catchParameters, catchBody);
-  };
+        List<Variable> catchParameters =
+            node.handler.parameters.map(getVariable).toList();
+        Statement catchBody = translateExpression(node.handler.body);
+        return new Try(next, catchParameters, catchBody);
+      };
 
   NodeCallback visitLetMutable(cps_ir.LetMutable node) {
     Variable variable = addMutableVariable(node.variable);
@@ -424,43 +417,43 @@
     if (cont == returnContinuation) {
       assert(node.argumentRefs.length == 1);
       return new Return(getVariableUse(node.argumentRefs.single),
-                        sourceInformation: node.sourceInformation);
+          sourceInformation: node.sourceInformation);
     } else {
       List<Expression> arguments = translateArguments(node.argumentRefs);
-      return buildPhiAssignments(cont.parameters, arguments,
-          () {
-            // Translate invocations of recursive and non-recursive
-            // continuations differently.
-            //   * Non-recursive continuations
-            //     - If there is one use, translate the continuation body
-            //       inline at the invocation site.
-            //     - If there are multiple uses, translate to Break.
-            //   * Recursive continuations
-            //     - There is a single non-recursive invocation.  Translate
-            //       the continuation body inline as a labeled loop at the
-            //       invocation site.
-            //     - Translate the recursive invocations to Continue.
-            if (cont.isRecursive) {
-              return node.isRecursive
-                  ? new Continue(getLabel(cont))
-                  : new WhileTrue(getLabel(cont),
-                                  translateExpression(cont.body));
-            } else {
-              return cont.hasExactlyOneUse && !node.isEscapingTry
-                  ? translateExpression(cont.body)
-                  : new Break(getLabel(cont));
-            }
-          });
+      return buildPhiAssignments(cont.parameters, arguments, () {
+        // Translate invocations of recursive and non-recursive
+        // continuations differently.
+        //   * Non-recursive continuations
+        //     - If there is one use, translate the continuation body
+        //       inline at the invocation site.
+        //     - If there are multiple uses, translate to Break.
+        //   * Recursive continuations
+        //     - There is a single non-recursive invocation.  Translate
+        //       the continuation body inline as a labeled loop at the
+        //       invocation site.
+        //     - Translate the recursive invocations to Continue.
+        if (cont.isRecursive) {
+          return node.isRecursive
+              ? new Continue(getLabel(cont))
+              : new WhileTrue(getLabel(cont), translateExpression(cont.body));
+        } else {
+          return cont.hasExactlyOneUse && !node.isEscapingTry
+              ? translateExpression(cont.body)
+              : new Break(getLabel(cont));
+        }
+      });
     }
   }
 
   /// Translates a branch condition to a tree expression.
   Expression translateCondition(cps_ir.Branch branch) {
-    Expression value = getVariableUse(branch.conditionRef);
+    Expression value = getVariableUse(branch.conditionRef,
+        sourceInformation: branch.sourceInformation);
     if (branch.isStrictCheck) {
       return new ApplyBuiltinOperator(
           BuiltinOperator.StrictEq,
-          <Expression>[value, new Constant(new TrueConstantValue())]);
+          <Expression>[value, new Constant(new TrueConstantValue())],
+          branch.sourceInformation);
     } else {
       return value;
     }
@@ -479,25 +472,23 @@
     elseStatement = cont.hasExactlyOneUse
         ? translateExpression(cont.body)
         : new Break(labels[cont]);
-    return new If(condition, thenStatement, elseStatement);
+    return new If(
+        condition, thenStatement, elseStatement, node.sourceInformation);
   }
 
-
   /************************** PRIMITIVES  **************************/
   //
   // Visit methods for primitives must return an expression.
   //
 
   Expression visitSetField(cps_ir.SetField node) {
-    return new SetField(getVariableUse(node.objectRef),
-                        node.field,
-                        getVariableUse(node.valueRef));
+    return new SetField(getVariableUse(node.objectRef), node.field,
+        getVariableUse(node.valueRef), node.sourceInformation);
   }
 
   Expression visitInterceptor(cps_ir.Interceptor node) {
     return new Interceptor(getVariableUse(node.inputRef),
-                           node.interceptedClasses,
-                           node.sourceInformation);
+        node.interceptedClasses, node.sourceInformation);
   }
 
   Expression visitCreateInstance(cps_ir.CreateInstance node) {
@@ -509,7 +500,8 @@
   }
 
   Expression visitGetField(cps_ir.GetField node) {
-    return new GetField(getVariableUse(node.objectRef), node.field,
+    return new GetField(
+        getVariableUse(node.objectRef), node.field, node.sourceInformation,
         objectIsNotNull: !node.object.type.isNullable);
   }
 
@@ -519,18 +511,18 @@
 
   Expression visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) {
     return new CreateInvocationMirror(
-        node.selector,
-        translateArguments(node.argumentRefs));
+        node.selector, translateArguments(node.argumentRefs));
   }
 
   Expression visitGetMutable(cps_ir.GetMutable node) {
-    return getMutableVariableUse(node.variableRef);
+    return getMutableVariableUse(node.variableRef, node.sourceInformation);
   }
 
   Expression visitSetMutable(cps_ir.SetMutable node) {
     Variable variable = getMutableVariable(node.variable);
     Expression value = getVariableUse(node.valueRef);
-    return new Assign(variable, value);
+    return new Assign(variable, value,
+        sourceInformation: node.sourceInformation);
   }
 
   Expression visitConstant(cps_ir.Constant node) {
@@ -538,9 +530,7 @@
   }
 
   Expression visitLiteralList(cps_ir.LiteralList node) {
-    return new LiteralList(
-            node.dartType,
-            translateArguments(node.valueRefs));
+    return new LiteralList(node.dartType, translateArguments(node.valueRefs));
   }
 
   Expression visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) {
@@ -550,15 +540,11 @@
 
   Expression visitReadTypeVariable(cps_ir.ReadTypeVariable node) {
     return new ReadTypeVariable(
-        node.variable,
-        getVariableUse(node.targetRef),
-        node.sourceInformation);
+        node.variable, getVariableUse(node.targetRef), node.sourceInformation);
   }
 
   Expression visitTypeExpression(cps_ir.TypeExpression node) {
-    return new TypeExpression(
-        node.kind,
-        node.dartType,
+    return new TypeExpression(node.kind, node.dartType,
         node.argumentRefs.map(getVariableUse).toList());
   }
 
@@ -580,9 +566,7 @@
 
   Expression visitSetStatic(cps_ir.SetStatic node) {
     return new SetStatic(
-        node.element,
-        getVariableUse(node.valueRef),
-        node.sourceInformation);
+        node.element, getVariableUse(node.valueRef), node.sourceInformation);
   }
 
   Expression visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
@@ -590,12 +574,11 @@
       return new Not(getVariableUse(node.argumentRefs.single));
     }
     return new ApplyBuiltinOperator(node.operator,
-                                    translateArguments(node.argumentRefs));
+        translateArguments(node.argumentRefs), node.sourceInformation);
   }
 
   Expression visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) {
-    return new ApplyBuiltinMethod(node.method,
-        getVariableUse(node.receiverRef),
+    return new ApplyBuiltinMethod(node.method, getVariableUse(node.receiverRef),
         translateArguments(node.argumentRefs),
         receiverIsNotNull: !node.receiver.type.isNullable);
   }
@@ -605,54 +588,95 @@
   }
 
   Expression visitGetIndex(cps_ir.GetIndex node) {
-    return new GetIndex(getVariableUse(node.objectRef),
-                        getVariableUse(node.indexRef));
+    return new GetIndex(
+        getVariableUse(node.objectRef), getVariableUse(node.indexRef));
   }
 
   Expression visitSetIndex(cps_ir.SetIndex node) {
     return new SetIndex(getVariableUse(node.objectRef),
-                        getVariableUse(node.indexRef),
-                        getVariableUse(node.valueRef));
+        getVariableUse(node.indexRef), getVariableUse(node.valueRef));
   }
 
   Expression visitInvokeStatic(cps_ir.InvokeStatic node) {
     List<Expression> arguments = translateArguments(node.argumentRefs);
-    return new InvokeStatic(node.target, node.selector, arguments,
-                                         node.sourceInformation);
+    return new InvokeStatic(
+        node.target, node.selector, arguments, node.sourceInformation);
+  }
+
+  List<Expression> insertReceiverArgument(
+      Expression receiver, List<Expression> arguments) {
+    return new List<Expression>.generate(
+        arguments.length + 1, (n) => n == 0 ? receiver : arguments[n - 1],
+        growable: false);
   }
 
   Expression visitInvokeMethod(cps_ir.InvokeMethod node) {
-    if (node.callingConvention == cps_ir.CallingConvention.OneShotIntercepted) {
-      List<Expression> arguments = new List.generate(
-          1 + node.argumentRefs.length,
-          (n) => getVariableUse(n == 0 ? node.receiverRef : node.argumentRefs[n - 1]),
-          growable: false);
-      return new OneShotInterceptor(node.selector, node.mask, arguments,
-          node.sourceInformation);
+    switch (node.callingConvention) {
+      case cps_ir.CallingConvention.Normal:
+        InvokeMethod invoke = new InvokeMethod(
+            getVariableUse(node.receiverRef),
+            node.selector,
+            node.mask,
+            translateArguments(node.argumentRefs),
+            node.sourceInformation);
+        invoke.receiverIsNotNull = !node.receiver.type.isNullable;
+        return invoke;
+
+      case cps_ir.CallingConvention.Intercepted:
+        List<Expression> arguments = insertReceiverArgument(
+            getVariableUse(node.receiverRef),
+            translateArguments(node.argumentRefs));
+        InvokeMethod invoke = new InvokeMethod(
+            getVariableUse(node.interceptorRef),
+            node.selector,
+            node.mask,
+            arguments,
+            node.sourceInformation);
+        // Sometimes we know the Dart receiver is non-null because it has been
+        // refined, which implies that the JS receiver also can not be null at
+        // the use-site.  Interceptors are not refined, so this information is
+        // not always available on the JS receiver.
+        // Also check the JS receiver's type, however, because sometimes we know
+        // an interceptor is non-null because it intercepts JSNull.
+        invoke.receiverIsNotNull =
+            !node.receiver.type.isNullable || !node.interceptor.type.isNullable;
+        return invoke;
+
+      case cps_ir.CallingConvention.DummyIntercepted:
+        List<Expression> arguments = insertReceiverArgument(
+            new Constant(new IntConstantValue(0)),
+            translateArguments(node.argumentRefs));
+        InvokeMethod invoke = new InvokeMethod(getVariableUse(node.receiverRef),
+            node.selector, node.mask, arguments, node.sourceInformation);
+        invoke.receiverIsNotNull = !node.receiver.type.isNullable;
+        return invoke;
+
+      case cps_ir.CallingConvention.OneShotIntercepted:
+        List<Expression> arguments = insertReceiverArgument(
+            getVariableUse(node.receiverRef),
+            translateArguments(node.argumentRefs));
+        return new OneShotInterceptor(
+            node.selector, node.mask, arguments, node.sourceInformation);
     }
-    InvokeMethod invoke = new InvokeMethod(
-        getVariableUse(node.receiverRef),
-        node.selector,
-        node.mask,
-        translateArguments(node.argumentRefs),
-        node.sourceInformation);
-    // Sometimes we know the Dart receiver is non-null because it has been
-    // refined, which implies that the JS receiver also can not be null at the
-    // use-site.  Interceptors are not refined, so this information is not
-    // always available on the JS receiver.
-    // Also check the JS receiver's type, however, because sometimes we know an
-    // interceptor is non-null because it intercepts JSNull.
-    invoke.receiverIsNotNull =
-        !node.dartReceiver.type.isNullable ||
-        !node.receiver.type.isNullable;
-    return invoke;
   }
 
   Expression visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) {
-    Expression receiver = getVariableUse(node.receiverRef);
-    List<Expression> arguments = translateArguments(node.argumentRefs);
-    return new InvokeMethodDirectly(receiver, node.target,
-        node.selector, arguments, node.sourceInformation);
+    if (node.interceptorRef != null) {
+      return new InvokeMethodDirectly(
+          getVariableUse(node.interceptorRef),
+          node.target,
+          node.selector,
+          insertReceiverArgument(getVariableUse(node.receiverRef),
+              translateArguments(node.argumentRefs)),
+          node.sourceInformation);
+    } else {
+      return new InvokeMethodDirectly(
+          getVariableUse(node.receiverRef),
+          node.target,
+          node.selector,
+          translateArguments(node.argumentRefs),
+          node.sourceInformation);
+    }
   }
 
   Expression visitTypeCast(cps_ir.TypeCast node) {
@@ -663,12 +687,8 @@
 
   Expression visitInvokeConstructor(cps_ir.InvokeConstructor node) {
     List<Expression> arguments = translateArguments(node.argumentRefs);
-    return new InvokeConstructor(
-        node.dartType,
-        node.target,
-        node.selector,
-        arguments,
-        node.sourceInformation);
+    return new InvokeConstructor(node.dartType, node.target, node.selector,
+        arguments, node.sourceInformation);
   }
 
   visitForeignCode(cps_ir.ForeignCode node) {
@@ -684,7 +704,8 @@
           arguments,
           node.nativeBehavior,
           nullableArguments,
-          node.dependency);
+          node.dependency,
+          node.sourceInformation);
     } else {
       return (Statement next) {
         assert(next is Unreachable); // We are not using the `next` statement.
@@ -694,24 +715,25 @@
             arguments,
             node.nativeBehavior,
             nullableArguments,
-            node.dependency);
+            node.dependency,
+            node.sourceInformation);
       };
     }
   }
 
   visitReceiverCheck(cps_ir.ReceiverCheck node) => (Statement next) {
-    // The CPS IR uses 'isNullCheck' because the semantics are important.
-    // In the Tree IR, syntax is more important, so the receiver check uses
-    // "useInvoke" to denote if an invocation should be emitted.
-    return new ReceiverCheck(
-        condition: getVariableUseOrNull(node.conditionRef),
-        value: getVariableUse(node.valueRef),
-        selector: node.selector,
-        useSelector: node.useSelector,
-        useInvoke: !node.isNullCheck,
-        next: next,
-        sourceInformation: node.sourceInformation);
-  };
+        // The CPS IR uses 'isNullCheck' because the semantics are important.
+        // In the Tree IR, syntax is more important, so the receiver check uses
+        // "useInvoke" to denote if an invocation should be emitted.
+        return new ReceiverCheck(
+            condition: getVariableUseOrNull(node.conditionRef),
+            value: getVariableUse(node.valueRef),
+            selector: node.selector,
+            useSelector: node.useSelector,
+            useInvoke: !node.isNullCheck,
+            next: next,
+            sourceInformation: node.sourceInformation);
+      };
 
   Expression visitGetLazyStatic(cps_ir.GetLazyStatic node) {
     return new GetStatic.lazy(node.element, node.sourceInformation);
@@ -743,6 +765,7 @@
   visitFunctionDefinition(cps_ir.FunctionDefinition node) {
     unexpectedNode(node);
   }
+
   visitParameter(cps_ir.Parameter node) => unexpectedNode(node);
   visitContinuation(cps_ir.Continuation node) => unexpectedNode(node);
   visitMutableVariable(cps_ir.MutableVariable node) => unexpectedNode(node);
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
index 691a330..ea40782 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
@@ -89,7 +89,7 @@
 
     if (labelUses[label] != label.useCount) {
       error('Label $label has ${labelUses[label]} uses '
-            'but its reference count is ${label.useCount}');
+          'but its reference count is ${label.useCount}');
     }
   }
 
@@ -152,11 +152,10 @@
       int writes = varWrites.putIfAbsent(variable, () => 0);
       if (reads != variable.readCount || writes != variable.writeCount) {
         error('Invalid reference count for $variable:\n'
-              '- Variable has $reads reads and $writes writes\n'
-              '- Reference count is ${variable.readCount} reads and '
-              '${variable.writeCount} writes');
+            '- Variable has $reads reads and $writes writes\n'
+            '- Reference count is ${variable.readCount} reads and '
+            '${variable.writeCount} writes');
       }
     }
   }
-
 }
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
index ec2e34a..7a11f83 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
@@ -56,6 +56,8 @@
 abstract class Expression extends Node {
   accept(ExpressionVisitor v);
   accept1(ExpressionVisitor1 v, arg);
+
+  SourceInformation get sourceInformation => null;
 }
 
 abstract class Statement extends Node {
@@ -123,9 +125,10 @@
 /// Read the value of a variable.
 class VariableUse extends Expression {
   Variable variable;
+  SourceInformation sourceInformation;
 
   /// Creates a use of [variable] and updates its `readCount`.
-  VariableUse(this.variable) {
+  VariableUse(this.variable, {this.sourceInformation}) {
     variable.readCount++;
   }
 
@@ -138,17 +141,17 @@
 class Assign extends Expression {
   Variable variable;
   Expression value;
+  SourceInformation sourceInformation;
 
-  Assign(this.variable, this.value) {
+  Assign(this.variable, this.value, {this.sourceInformation}) {
     variable.writeCount++;
   }
 
   accept(ExpressionVisitor v) => v.visitAssign(this);
   accept1(ExpressionVisitor1 v, arg) => v.visitAssign(this, arg);
 
-  static ExpressionStatement makeStatement(Variable variable,
-                                           Expression value,
-                                           [Statement next]) {
+  static ExpressionStatement makeStatement(Variable variable, Expression value,
+      [Statement next]) {
     return new ExpressionStatement(new Assign(variable, value), next);
   }
 }
@@ -172,7 +175,7 @@
   final SourceInformation sourceInformation;
 
   InvokeStatic(this.target, this.selector, this.arguments,
-               [this.sourceInformation]);
+      [this.sourceInformation]);
 
   accept(ExpressionVisitor visitor) => visitor.visitInvokeStatic(this);
   accept1(ExpressionVisitor1 visitor, arg) {
@@ -196,11 +199,8 @@
   /// If true, it is known that the receiver cannot be `null`.
   bool receiverIsNotNull = false;
 
-  InvokeMethod(this.receiver,
-               this.selector,
-               this.mask,
-               this.arguments,
-               this.sourceInformation) {
+  InvokeMethod(this.receiver, this.selector, this.mask, this.arguments,
+      this.sourceInformation) {
     assert(receiver != null);
   }
 
@@ -241,12 +241,14 @@
   final List<Expression> arguments;
   final Selector selector;
   final SourceInformation sourceInformation;
+
   /// TODO(karlklose): get rid of this field.  Instead use the constant's
   /// expression to find the constructor to be called in dart2dart.
   final values.ConstantValue constant;
 
   InvokeConstructor(this.type, this.target, this.selector, this.arguments,
-                    this.sourceInformation, [this.constant]);
+      this.sourceInformation,
+      [this.constant]);
 
   ClassElement get targetClass => target.enclosingElement;
 
@@ -268,10 +270,8 @@
   final List<Expression> arguments;
   final SourceInformation sourceInformation;
 
-  OneShotInterceptor(this.selector,
-                     this.mask,
-                     this.arguments,
-                     this.sourceInformation);
+  OneShotInterceptor(
+      this.selector, this.mask, this.arguments, this.sourceInformation);
 
   accept(ExpressionVisitor visitor) => visitor.visitOneShotInterceptor(this);
   accept1(ExpressionVisitor1 visitor, arg) {
@@ -326,7 +326,7 @@
   final bool isTypeTest;
 
   TypeOperator(this.value, this.type, this.typeArguments,
-               {bool this.isTypeTest});
+      {bool this.isTypeTest});
 
   accept(ExpressionVisitor visitor) => visitor.visitTypeOperator(this);
   accept1(ExpressionVisitor1 visitor, arg) {
@@ -345,12 +345,14 @@
 class ApplyBuiltinOperator extends Expression {
   BuiltinOperator operator;
   List<Expression> arguments;
+  SourceInformation sourceInformation;
 
-  ApplyBuiltinOperator(this.operator, this.arguments);
+  ApplyBuiltinOperator(this.operator, this.arguments, this.sourceInformation);
 
   accept(ExpressionVisitor visitor) {
     return visitor.visitApplyBuiltinOperator(this);
   }
+
   accept1(ExpressionVisitor1 visitor, arg) {
     return visitor.visitApplyBuiltinOperator(this, arg);
   }
@@ -363,14 +365,13 @@
 
   bool receiverIsNotNull;
 
-  ApplyBuiltinMethod(this.method,
-                     this.receiver,
-                     this.arguments,
-                     {this.receiverIsNotNull: false});
+  ApplyBuiltinMethod(this.method, this.receiver, this.arguments,
+      {this.receiverIsNotNull: false});
 
   accept(ExpressionVisitor visitor) {
     return visitor.visitApplyBuiltinMethod(this);
   }
+
   accept1(ExpressionVisitor1 visitor, arg) {
     return visitor.visitApplyBuiltinMethod(this, arg);
   }
@@ -390,7 +391,7 @@
   }
 
   String toString() => 'Conditional(condition=$condition,thenExpression='
-                       '$thenExpression,elseExpression=$elseExpression)';
+      '$thenExpression,elseExpression=$elseExpression)';
 }
 
 /// An && or || expression. The operator is internally represented as a boolean
@@ -455,8 +456,7 @@
 }
 
 /// A [WhileTrue] or [For] loop.
-abstract class Loop extends JumpTarget {
-}
+abstract class Loop extends JumpTarget {}
 
 /**
  * A labeled while(true) loop.
@@ -496,11 +496,7 @@
   Statement body;
   Statement next;
 
-  For(this.label,
-      this.condition,
-      this.updates,
-      this.body,
-      this.next) {
+  For(this.label, this.condition, this.updates, this.body, this.next) {
     assert(label.binding == null);
     label.binding = this;
   }
@@ -598,11 +594,13 @@
   Expression condition;
   Statement thenStatement;
   Statement elseStatement;
+  SourceInformation sourceInformation;
 
   Statement get next => null;
   void set next(Statement s) => throw 'UNREACHABLE';
 
-  If(this.condition, this.thenStatement, this.elseStatement);
+  If(this.condition, this.thenStatement, this.elseStatement,
+      this.sourceInformation);
 
   accept(StatementVisitor visitor) => visitor.visitIf(this);
   accept1(StatementVisitor1 visitor, arg) => visitor.visitIf(this, arg);
@@ -654,10 +652,12 @@
 class FunctionDefinition extends Node {
   final ExecutableElement element;
   final List<Variable> parameters;
+  final SourceInformation sourceInformation;
   Statement body;
 
   /// Creates a function definition and updates `writeCount` for [parameters].
-  FunctionDefinition(this.element, this.parameters, this.body) {
+  FunctionDefinition(this.element, this.parameters, this.body,
+      {this.sourceInformation}) {
     for (Variable param in parameters) {
       param.writeCount++; // Being a parameter counts as a write.
     }
@@ -675,8 +675,8 @@
   Expression typeInformation;
   SourceInformation sourceInformation;
 
-  CreateInstance(this.classElement, this.arguments,
-                 this.typeInformation, this.sourceInformation);
+  CreateInstance(this.classElement, this.arguments, this.typeInformation,
+      this.sourceInformation);
 
   accept(ExpressionVisitor visitor) => visitor.visitCreateInstance(this);
   accept1(ExpressionVisitor1 visitor, arg) {
@@ -688,8 +688,10 @@
   Expression object;
   Element field;
   bool objectIsNotNull;
+  SourceInformation sourceInformation;
 
-  GetField(this.object, this.field, {this.objectIsNotNull: false});
+  GetField(this.object, this.field, this.sourceInformation,
+      {this.objectIsNotNull: false});
 
   accept(ExpressionVisitor visitor) => visitor.visitGetField(this);
   accept1(ExpressionVisitor1 visitor, arg) => visitor.visitGetField(this, arg);
@@ -699,18 +701,19 @@
   Expression object;
   Element field;
   Expression value;
+  SourceInformation sourceInformation;
 
   /// If non-null, this is a compound assignment to the field, using the given
   /// operator.  The operator must be a compoundable operator.
   BuiltinOperator compound;
 
-  SetField(this.object, this.field, this.value, {this.compound});
+  SetField(this.object, this.field, this.value, this.sourceInformation,
+      {this.compound});
 
   accept(ExpressionVisitor visitor) => visitor.visitSetField(this);
   accept1(ExpressionVisitor1 visitor, arg) => visitor.visitSetField(this, arg);
 }
 
-
 /// Read the type test property from [object]. The value is truthy/fasly rather
 /// than bool. [object] must not be `null`.
 class GetTypeTestProperty extends Expression {
@@ -719,8 +722,7 @@
 
   GetTypeTestProperty(this.object, this.dartType);
 
-  accept(ExpressionVisitor visitor) =>
-      visitor.visitGetTypeTestProperty(this);
+  accept(ExpressionVisitor visitor) => visitor.visitGetTypeTestProperty(this);
   accept1(ExpressionVisitor1 visitor, arg) =>
       visitor.visitGetTypeTestProperty(this, arg);
 }
@@ -850,23 +852,27 @@
   final types.TypeMask type;
   final List<Expression> arguments;
   final native.NativeBehavior nativeBehavior;
-  final List<bool> nullableArguments;  // One 'bit' per argument.
+  final List<bool> nullableArguments; // One 'bit' per argument.
   final Element dependency;
+  final SourceInformation sourceInformation;
 
   ForeignCode(this.codeTemplate, this.type, this.arguments, this.nativeBehavior,
-      this.nullableArguments, this.dependency) {
+      this.nullableArguments, this.dependency, this.sourceInformation) {
     assert(arguments.length == nullableArguments.length);
   }
 }
 
 class ForeignExpression extends ForeignCode implements Expression {
   ForeignExpression(
-      js.Template codeTemplate, types.TypeMask type,
-      List<Expression> arguments, native.NativeBehavior nativeBehavior,
+      js.Template codeTemplate,
+      types.TypeMask type,
+      List<Expression> arguments,
+      native.NativeBehavior nativeBehavior,
       List<bool> nullableArguments,
-      Element dependency)
+      Element dependency,
+      SourceInformation sourceInformation)
       : super(codeTemplate, type, arguments, nativeBehavior, nullableArguments,
-          dependency);
+            dependency, sourceInformation);
 
   accept(ExpressionVisitor visitor) {
     return visitor.visitForeignExpression(this);
@@ -879,12 +885,15 @@
 
 class ForeignStatement extends ForeignCode implements Statement {
   ForeignStatement(
-      js.Template codeTemplate, types.TypeMask type,
-      List<Expression> arguments, native.NativeBehavior nativeBehavior,
+      js.Template codeTemplate,
+      types.TypeMask type,
+      List<Expression> arguments,
+      native.NativeBehavior nativeBehavior,
       List<bool> nullableArguments,
-      Element dependency)
+      Element dependency,
+      SourceInformation sourceInformation)
       : super(codeTemplate, type, arguments, nativeBehavior, nullableArguments,
-          dependency);
+            dependency, sourceInformation);
 
   accept(StatementVisitor visitor) {
     return visitor.visitForeignStatement(this);
@@ -959,8 +968,14 @@
   Statement next;
   SourceInformation sourceInformation;
 
-  ReceiverCheck({this.condition, this.value, this.selector, this.useSelector,
-      this.useInvoke, this.next, this.sourceInformation});
+  ReceiverCheck(
+      {this.condition,
+      this.value,
+      this.selector,
+      this.useSelector,
+      this.useInvoke,
+      this.next,
+      this.sourceInformation});
 
   accept(StatementVisitor visitor) {
     return visitor.visitReceiverCheck(this);
@@ -1205,8 +1220,7 @@
     visitExpression(node.value);
   }
 
-  visitGetStatic(GetStatic node) {
-  }
+  visitGetStatic(GetStatic node) {}
 
   visitSetStatic(SetStatic node) {
     visitExpression(node.value);
@@ -1216,8 +1230,7 @@
     visitExpression(node.object);
   }
 
-  visitCreateBox(CreateBox node) {
-  }
+  visitCreateBox(CreateBox node) {}
 
   visitCreateInstance(CreateInstance node) {
     node.arguments.forEach(visitExpression);
@@ -1240,8 +1253,7 @@
     node.arguments.forEach(visitExpression);
   }
 
-  visitUnreachable(Unreachable node) {
-  }
+  visitUnreachable(Unreachable node) {}
 
   visitApplyBuiltinOperator(ApplyBuiltinOperator node) {
     node.arguments.forEach(visitExpression);
@@ -1294,10 +1306,10 @@
   }
 }
 
-abstract class Transformer implements ExpressionVisitor<Expression>,
-                                      StatementVisitor<Statement> {
-   Expression visitExpression(Expression e) => e.accept(this);
-   Statement visitStatement(Statement s) => s.accept(this);
+abstract class Transformer
+    implements ExpressionVisitor<Expression>, StatementVisitor<Statement> {
+  Expression visitExpression(Expression e) => e.accept(this);
+  Statement visitStatement(Statement s) => s.accept(this);
 }
 
 class RecursiveTransformer extends Transformer {
@@ -1566,8 +1578,9 @@
 
 /// A stack machine for tracking fallthrough while traversing the Tree IR.
 class FallthroughStack {
-  final List<FallthroughTarget> _stack =
-    <FallthroughTarget>[new FallthroughTarget(null)];
+  final List<FallthroughTarget> _stack = <FallthroughTarget>[
+    new FallthroughTarget(null)
+  ];
 
   /// Set a new fallthrough target.
   void push(Statement newFallthrough) {
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
index 01aed83..39b4bb1 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
@@ -11,6 +11,7 @@
 class Block {
   Label label;
   int index;
+
   /// Mixed list of [Statement] and [Block].
   /// A [Block] represents a synthetic goto statement.
   final List statements = [];
@@ -51,6 +52,7 @@
   void _addStatement(Statement statement) {
     blocks.last.statements.add(statement);
   }
+
   void _addGotoStatement(Block target) {
     blocks.last.statements.add(target);
   }
@@ -230,8 +232,8 @@
           printStatement(null, 'Entry ($params)');
         }
         if (block.label != null) {
-          printStatement(null,
-              "Label ${block.name}, useCount=${block.label.useCount}");
+          printStatement(
+              null, "Label ${block.name}, useCount=${block.label.useCount}");
         }
         if (block.catcher != null) {
           printStatement(null, 'Catch exceptions at ${block.catcher.name}');
@@ -283,8 +285,8 @@
   }
 
   visitContinue(Continue node) {
-    printStatement(null,
-        "continue ${collector.continueTargets[node.target].name}");
+    printStatement(
+        null, "continue ${collector.continueTargets[node.target].name}");
   }
 
   visitIf(If node) {
@@ -305,7 +307,7 @@
     printStatement(null, "while ${expr(node.condition)}");
     printStatement(null, "do $bodyTarget");
     printStatement(null, "updates ($updates)");
-    printStatement(null, "then $nextTarget" );
+    printStatement(null, "then $nextTarget");
   }
 
   visitTry(Try node) {
@@ -424,9 +426,9 @@
 
   static bool usesInfixNotation(Expression node) {
     return node is Conditional ||
-           node is LogicalOperator ||
-           node is Assign ||
-           node is SetField;
+        node is LogicalOperator ||
+        node is Assign ||
+        node is SetField;
   }
 
   String visitConditional(Conditional node) {
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart
index 71a0fc1..9593b10 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -5,53 +5,47 @@
 library dart2js.typechecker;
 
 import 'common.dart';
-import 'common/names.dart' show
-    Identifiers;
-import 'common/resolution.dart' show
-    Resolution;
-import 'common/tasks.dart' show
-    CompilerTask;
-import 'compiler.dart' show
-    Compiler;
+import 'common/names.dart' show Identifiers;
+import 'common/resolution.dart' show Resolution;
+import 'common/tasks.dart' show CompilerTask;
+import 'compiler.dart' show Compiler;
 import 'constants/expressions.dart';
 import 'constants/values.dart';
 import 'core_types.dart';
 import 'dart_types.dart';
-import 'elements/elements.dart' show
-    AbstractFieldElement,
-    AstElement,
-    AsyncMarker,
-    ClassElement,
-    ConstructorElement,
-    Element,
-    Elements,
-    EnumClassElement,
-    ExecutableElement,
-    FieldElement,
-    FunctionElement,
-    GetterElement,
-    InitializingFormalElement,
-    LibraryElement,
-    Member,
-    MemberSignature,
-    Name,
-    ParameterElement,
-    PrivateName,
-    PublicName,
-    ResolvedAst,
-    SetterElement,
-    TypeDeclarationElement,
-    TypedElement,
-    TypedefElement,
-    VariableElement;
-import 'resolution/tree_elements.dart' show
-    TreeElements;
-import 'resolution/class_members.dart' show
-    MembersCreator;
+import 'elements/elements.dart'
+    show
+        AbstractFieldElement,
+        AstElement,
+        AsyncMarker,
+        ClassElement,
+        ConstructorElement,
+        Element,
+        Elements,
+        EnumClassElement,
+        EnumConstantElement,
+        ExecutableElement,
+        FieldElement,
+        FunctionElement,
+        GetterElement,
+        InitializingFormalElement,
+        LibraryElement,
+        Member,
+        MemberSignature,
+        Name,
+        ParameterElement,
+        PrivateName,
+        PublicName,
+        ResolvedAst,
+        SetterElement,
+        TypeDeclarationElement,
+        TypedElement,
+        TypedefElement,
+        VariableElement;
+import 'resolution/tree_elements.dart' show TreeElements;
+import 'resolution/class_members.dart' show MembersCreator;
 import 'tree/tree.dart';
-import 'util/util.dart' show
-    Link,
-    LinkBuilder;
+import 'util/util.dart' show Link, LinkBuilder;
 
 class TypeCheckerTask extends CompilerTask {
   TypeCheckerTask(Compiler compiler) : super(compiler);
@@ -233,7 +227,6 @@
   String toString() => 'TypeLiteralAccess($type)';
 }
 
-
 /// An access to the 'call' method of a function type.
 class FunctionCallAccess implements ElementAccess {
   final Element element;
@@ -250,7 +243,6 @@
   String toString() => 'FunctionAccess($element, $type)';
 }
 
-
 /// An is-expression that potentially promotes a variable.
 class TypePromotion {
   final Send node;
@@ -267,7 +259,7 @@
   }
 
   void addHint(DiagnosticMessage hint,
-               [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
+      [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
     messages.add(new TypePromotionMessage(hint, infos));
   }
 
@@ -332,9 +324,8 @@
 
   void registerKnownTypePromotion(TypePromotion typePromotion) {
     VariableElement variable = typePromotion.variable;
-    Link<TypePromotion> knownTypes =
-        typePromotionsMap.putIfAbsent(variable,
-                                      () => const Link<TypePromotion>());
+    Link<TypePromotion> knownTypes = typePromotionsMap.putIfAbsent(
+        variable, () => const Link<TypePromotion>());
     typePromotionsMap[variable] = knownTypes.prepend(typePromotion);
   }
 
@@ -377,8 +368,8 @@
       : this.elements = elements,
         this.executableContext = elements.analyzedElement,
         this.currentClass = elements.analyzedElement != null
-            ? elements.analyzedElement.enclosingClass : null {
-
+            ? elements.analyzedElement.enclosingClass
+            : null {
     if (currentClass != null) {
       thisType = currentClass.thisType;
       superType = currentClass.supertype;
@@ -392,13 +383,12 @@
   LibraryElement get currentLibrary => elements.analyzedElement.library;
 
   reportTypeWarning(Spannable spannable, MessageKind kind,
-                    [Map arguments = const {}]) {
+      [Map arguments = const {}]) {
     reporter.reportWarningMessage(spannable, kind, arguments);
   }
 
-  reportMessage(Spannable spannable, MessageKind kind,
-                Map arguments,
-                {bool isHint: false}) {
+  reportMessage(Spannable spannable, MessageKind kind, Map arguments,
+      {bool isHint: false}) {
     if (isHint) {
       reporter.reportHintMessage(spannable, kind, arguments);
     } else {
@@ -454,7 +444,7 @@
   }
 
   void checkTypePromotion(Node node, TypePromotion typePromotion,
-                          {bool checkAccesses: false}) {
+      {bool checkAccesses: false}) {
     VariableElement variable = typePromotion.variable;
     String variableName = variable.name;
     List<Node> potentialMutationsIn =
@@ -466,7 +456,8 @@
           {'variableName': variableName, 'shownType': typePromotion.type});
       List<DiagnosticMessage> infos = <DiagnosticMessage>[];
       for (Node mutation in potentialMutationsIn) {
-        infos.add(reporter.createMessage(mutation,
+        infos.add(reporter.createMessage(
+            mutation,
             MessageKind.POTENTIAL_MUTATION_HERE,
             {'variableName': variableName}));
       }
@@ -517,7 +508,7 @@
   /// Show type promotions from [left] and [right] in [node] given that the
   /// promoted variables are not potentially mutated in [right].
   void reshowTypePromotions(Node node, Node left, Node right) {
-    for (TypePromotion typePromotion in  getShownTypePromotionsFor(left)) {
+    for (TypePromotion typePromotion in getShownTypePromotionsFor(left)) {
       typePromotion = typePromotion.copy();
       checkTypePromotion(right, typePromotion);
       showTypePromotion(node, typePromotion);
@@ -533,7 +524,7 @@
   /// Analyze [node] in the context of the known types shown in [context].
   DartType analyzeInPromotedContext(Node context, Node node) {
     Link<TypePromotion> knownForNode = const Link<TypePromotion>();
-    for (TypePromotion typePromotion in  getShownTypePromotionsFor(context)) {
+    for (TypePromotion typePromotion in getShownTypePromotionsFor(context)) {
       typePromotion = typePromotion.copy();
       checkTypePromotion(node, typePromotion, checkAccesses: true);
       knownForNode = knownForNode.prepend(typePromotion);
@@ -556,17 +547,13 @@
    * checked mode, otherwise a warning is issued.
    */
   bool checkAssignable(Spannable spannable, DartType from, DartType to,
-                       {bool isConst: false}) {
+      {bool isConst: false}) {
     if (!types.isAssignable(from, to)) {
-      if (compiler.enableTypeAssertions && isConst) {
-        reporter.reportErrorMessage(
-            spannable,
-            MessageKind.NOT_ASSIGNABLE,
+      if (compiler.options.enableTypeAssertions && isConst) {
+        reporter.reportErrorMessage(spannable, MessageKind.NOT_ASSIGNABLE,
             {'fromType': from, 'toType': to});
       } else {
-        reporter.reportWarningMessage(
-            spannable,
-            MessageKind.NOT_ASSIGNABLE,
+        reporter.reportWarningMessage(spannable, MessageKind.NOT_ASSIGNABLE,
             {'fromType': from, 'toType': to});
       }
       return false;
@@ -645,7 +632,7 @@
     DartType returnType;
     final FunctionElement element = elements.getFunctionDefinition(node);
     assert(invariant(node, element != null,
-                     message: 'FunctionExpression with no element'));
+        message: 'FunctionExpression with no element'));
     if (Elements.isUnresolved(element)) return const DynamicType();
     if (element.isGenerativeConstructor) {
       type = const DynamicType();
@@ -690,9 +677,8 @@
       TypedElement element = elements[node];
       assert(invariant(node, element != null,
           message: 'Missing element for identifier'));
-      assert(invariant(node, element.isVariable ||
-                             element.isParameter ||
-                             element.isField,
+      assert(invariant(
+          node, element.isVariable || element.isParameter || element.isField,
           message: 'Unexpected context element ${element}'));
       return element.computeType(resolution);
     }
@@ -714,19 +700,14 @@
     if (name != null &&
         Name.isPrivateName(name) &&
         element.library != currentLibrary) {
-      reportTypeWarning(
-          node,
-          MessageKind.PRIVATE_ACCESS,
-          {'name': name,
-           'libraryName': element.library.libraryOrScriptName});
+      reportTypeWarning(node, MessageKind.PRIVATE_ACCESS,
+          {'name': name, 'libraryName': element.library.libraryOrScriptName});
     }
-
   }
 
   ElementAccess lookupMember(Node node, DartType receiverType, String name,
-                             MemberKind memberKind, Element receiverElement,
-                             {bool lookupClassMember: false,
-                              bool isHint: false}) {
+      MemberKind memberKind, Element receiverElement,
+      {bool lookupClassMember: false, bool isHint: false}) {
     if (receiverType.treatAsDynamic) {
       return const DynamicAccess();
     }
@@ -745,8 +726,8 @@
 
     // Compute the access of [name] on [type]. This function takes the special
     // 'call' method into account.
-    ElementAccess getAccess(Name name,
-                            DartType unaliasedBound, InterfaceType interface) {
+    ElementAccess getAccess(
+        Name name, DartType unaliasedBound, InterfaceType interface) {
       MemberSignature member = lookupMemberSignature(memberName, interface);
       if (member != null) {
         return new MemberAccess(member);
@@ -809,11 +790,13 @@
           if (memberName.isSimilarTo(member.name)) {
             PrivateName privateName = member.name;
             reportMessage(
-                 node,
-                 MessageKind.PRIVATE_ACCESS,
-                 {'name': name,
-                  'libraryName': privateName.library.libraryOrScriptName},
-                 isHint: isHint);
+                node,
+                MessageKind.PRIVATE_ACCESS,
+                {
+                  'name': name,
+                  'libraryName': privateName.library.libraryOrScriptName
+                },
+                isHint: isHint);
             foundPrivateMember = true;
           }
         }
@@ -824,17 +807,16 @@
         } else {
           interface.element.forEachInterfaceMember(findPrivateMember);
         }
-
       }
       if (!foundPrivateMember) {
         switch (memberKind) {
           case MemberKind.METHOD:
-            reportMessage(node, MessageKind.METHOD_NOT_FOUND,
+            reportMessage(node, MessageKind.UNDEFINED_METHOD,
                 {'className': receiverType.name, 'memberName': name},
                 isHint: isHint);
             break;
           case MemberKind.OPERATOR:
-            reportMessage(node, MessageKind.OPERATOR_NOT_FOUND,
+            reportMessage(node, MessageKind.UNDEFINED_OPERATOR,
                 {'className': receiverType.name, 'memberName': name},
                 isHint: isHint);
             break;
@@ -842,7 +824,9 @@
             if (lookupMemberSignature(memberName.setter, interface) != null) {
               // A setter is present so warn explicitly about the missing
               // getter.
-              reportMessage(node, MessageKind.GETTER_NOT_FOUND,
+              reportMessage(
+                  node,
+                  MessageKind.UNDEFINED_INSTANCE_GETTER_BUT_SETTER,
                   {'className': receiverType.name, 'memberName': name},
                   isHint: isHint);
             } else if (name == 'await') {
@@ -857,13 +841,13 @@
               }
               reportMessage(node, kind, arguments, isHint: isHint);
             } else {
-              reportMessage(node, MessageKind.MEMBER_NOT_FOUND,
+              reportMessage(node, MessageKind.UNDEFINED_GETTER,
                   {'className': receiverType.name, 'memberName': name},
                   isHint: isHint);
             }
             break;
           case MemberKind.SETTER:
-            reportMessage(node, MessageKind.SETTER_NOT_FOUND,
+            reportMessage(node, MessageKind.UNDEFINED_SETTER,
                 {'className': receiverType.name, 'memberName': name},
                 isHint: isHint);
             break;
@@ -873,20 +857,19 @@
     return const DynamicAccess();
   }
 
-  DartType lookupMemberType(Node node, DartType type, String name,
-                            MemberKind memberKind,
-                            {bool isHint: false}) {
+  DartType lookupMemberType(
+      Node node, DartType type, String name, MemberKind memberKind,
+      {bool isHint: false}) {
     return lookupMember(node, type, name, memberKind, null, isHint: isHint)
         .computeType(resolution);
   }
 
   void analyzeArguments(Send send, Element element, DartType type,
-                        [LinkBuilder<DartType> argumentTypes]) {
+      [LinkBuilder<DartType> argumentTypes]) {
     Link<Node> arguments = send.arguments;
     type.computeUnaliased(resolution);
     DartType unaliasedType = type.unaliased;
     if (identical(unaliasedType.kind, TypeKind.FUNCTION)) {
-
       /// Report [warning] including info(s) about the declaration of [element]
       /// or [type].
       void reportWarning(DiagnosticMessage warning) {
@@ -897,10 +880,8 @@
         if (declaration == null) {
           declaration = type.element;
         } else if (type.isTypedef) {
-          infos.add(reporter.createMessage(
-              declaration,
-              MessageKind.THIS_IS_THE_DECLARATION,
-              {'name': element.name}));
+          infos.add(reporter.createMessage(declaration,
+              MessageKind.THIS_IS_THE_DECLARATION, {'name': element.name}));
           declaration = type.element;
         }
         if (declaration != null) {
@@ -912,13 +893,10 @@
 
       /// Report a warning on [node] if [argumentType] is not assignable to
       /// [parameterType].
-      void checkAssignable(Spannable node,
-                           DartType argumentType,
-                           DartType parameterType) {
+      void checkAssignable(
+          Spannable node, DartType argumentType, DartType parameterType) {
         if (!types.isAssignable(argumentType, parameterType)) {
-          reportWarning(reporter.createMessage(
-              node,
-              MessageKind.NOT_ASSIGNABLE,
+          reportWarning(reporter.createMessage(node, MessageKind.NOT_ASSIGNABLE,
               {'fromType': argumentType, 'toType': parameterType}));
         }
       }
@@ -953,7 +931,6 @@
         } else {
           if (!parameterTypes.moveNext()) {
             if (!optionalParameterTypes.moveNext()) {
-
               // TODO(johnniwinther): Provide better information on the
               // called function.
               reportWarning(reporter.createMessage(
@@ -978,12 +955,11 @@
       if (parameterTypes.moveNext()) {
         // TODO(johnniwinther): Provide better information on the called
         // function.
-        reportWarning(reporter.createMessage(
-            send, MessageKind.MISSING_ARGUMENT,
+        reportWarning(reporter.createMessage(send, MessageKind.MISSING_ARGUMENT,
             {'argumentType': parameterTypes.current}));
       }
     } else {
-      while(!arguments.isEmpty) {
+      while (!arguments.isEmpty) {
         DartType argumentType = analyze(arguments.head);
         if (argumentTypes != null) argumentTypes.addLast(argumentType);
         arguments = arguments.tail;
@@ -996,15 +972,15 @@
   // If provided [argumentTypes] is filled with the argument types during
   // analysis.
   DartType analyzeInvocation(Send node, ElementAccess elementAccess,
-                             [LinkBuilder<DartType> argumentTypes]) {
+      [LinkBuilder<DartType> argumentTypes]) {
     DartType type = elementAccess.computeType(resolution);
     if (elementAccess.isCallable(compiler)) {
       analyzeArguments(node, elementAccess.element, type, argumentTypes);
     } else {
-      reportTypeWarning(node, MessageKind.NOT_CALLABLE,
-          {'elementName': elementAccess.name});
-      analyzeArguments(node, elementAccess.element, const DynamicType(),
-                       argumentTypes);
+      reportTypeWarning(
+          node, MessageKind.NOT_CALLABLE, {'elementName': elementAccess.name});
+      analyzeArguments(
+          node, elementAccess.element, const DynamicType(), argumentTypes);
     }
     type.computeUnaliased(resolution);
     type = type.unaliased;
@@ -1020,9 +996,9 @@
    * Computes the [ElementAccess] for [name] on the [node] possibly using the
    * [element] provided for [node] by the resolver.
    */
-  ElementAccess computeAccess(Send node, String name, Element element,
-                              MemberKind memberKind,
-                              {bool lookupClassMember: false}) {
+  ElementAccess computeAccess(
+      Send node, String name, Element element, MemberKind memberKind,
+      {bool lookupClassMember: false}) {
     if (Elements.isMalformed(element)) {
       return const DynamicAccess();
     }
@@ -1044,10 +1020,10 @@
       if (receiverType.treatAsDynamic || receiverType.isVoid) {
         return const DynamicAccess();
       }
-      return lookupMember(node, receiverType, name, memberKind,
-          elements[node.receiver],
-          lookupClassMember: lookupClassMember ||
-              element != null && element.isStatic);
+      return lookupMember(
+          node, receiverType, name, memberKind, elements[node.receiver],
+          lookupClassMember:
+              lookupClassMember || element != null && element.isStatic);
     } else {
       return computeResolvedAccess(node, name, element, memberKind);
     }
@@ -1057,8 +1033,8 @@
    * Computes the [ElementAccess] for [name] on the [node] using the [element]
    * provided for [node] by the resolver.
    */
-  ElementAccess computeResolvedAccess(Send node, String name,
-                                      Element element, MemberKind memberKind) {
+  ElementAccess computeResolvedAccess(
+      Send node, String name, Element element, MemberKind memberKind) {
     if (element == null) {
       // foo() where foo is unresolved.
       return lookupMember(node, thisType, name, memberKind, null);
@@ -1078,22 +1054,19 @@
     } else if (element.isFunction) {
       // foo() where foo is a method in the same class.
       return createResolvedAccess(node, name, element);
-    } else if (element.isVariable ||
-        element.isParameter ||
-        element.isField) {
+    } else if (element.isVariable || element.isParameter || element.isField) {
       // foo() where foo is a field in the same class.
       return createResolvedAccess(node, name, element);
     } else if (element.isGetter || element.isSetter) {
       return createResolvedAccess(node, name, element);
     } else {
-      reporter.internalError(element,
-          'Unexpected element kind ${element.kind}.');
+      reporter.internalError(
+          element, 'Unexpected element kind ${element.kind}.');
       return null;
     }
   }
 
-  ElementAccess createResolvedAccess(Send node, String name,
-                                     Element element) {
+  ElementAccess createResolvedAccess(Send node, String name, Element element) {
     checkPrivateAccess(node, element, name);
     return createPromotedAccess(element);
   }
@@ -1112,12 +1085,12 @@
    * Computes the type of the access of [name] on the [node] possibly using the
    * [element] provided for [node] by the resolver.
    */
-  DartType computeAccessType(Send node, String name, Element element,
-                             MemberKind memberKind,
-                             {bool lookupClassMember: false}) {
-    DartType type =
-        computeAccess(node, name, element, memberKind,
-            lookupClassMember: lookupClassMember).computeType(resolution);
+  DartType computeAccessType(
+      Send node, String name, Element element, MemberKind memberKind,
+      {bool lookupClassMember: false}) {
+    DartType type = computeAccess(node, name, element, memberKind,
+            lookupClassMember: lookupClassMember)
+        .computeType(resolution);
     if (type == null) {
       reporter.internalError(node, 'Type is null on access of $name on $node.');
     }
@@ -1128,8 +1101,7 @@
   /// This is used to provided better hints when trying to promote a supertype
   /// to a raw subtype. For instance trying to promote `Iterable<int>` to `List`
   /// we suggest the use of `List<int>`, which would make promotion valid.
-  DartType computeMoreSpecificType(DartType shownType,
-                                   DartType knownType) {
+  DartType computeMoreSpecificType(DartType shownType, DartType knownType) {
     if (knownType.isInterfaceType &&
         shownType.isInterfaceType &&
         types.isSubtype(shownType.asRaw(), knownType)) {
@@ -1145,8 +1117,8 @@
       // the relation between `A<S, int>` and `A<double, int>`.
       MoreSpecificSubtypeVisitor visitor =
           new MoreSpecificSubtypeVisitor(types);
-      InterfaceType shownTypeGeneric = visitor.computeMoreSpecific(
-          shownClass, knownInterfaceType);
+      InterfaceType shownTypeGeneric =
+          visitor.computeMoreSpecific(shownClass, knownInterfaceType);
 
       if (shownTypeGeneric != null &&
           types.isMoreSpecific(shownTypeGeneric, knownType)) {
@@ -1156,7 +1128,6 @@
       }
     }
     return null;
-
   }
 
   static bool _fyiShown = false;
@@ -1165,7 +1136,8 @@
     if (const bool.fromEnvironment('send_stats') &&
         executableContext != null &&
         // TODO(sigmund): enable also in core libs.
-        !executableContext.library.isPlatformLibrary && !type.isDynamic) {
+        !executableContext.library.isPlatformLibrary &&
+        !type.isDynamic) {
       if (!_fyiShown) {
         print('FYI experiment to collect send stats is on: '
             'caching types of expressions');
@@ -1235,8 +1207,7 @@
           }
         }
 
-        if (variable != null &&
-            (variable.isVariable || variable.isParameter)) {
+        if (variable != null && (variable.isVariable || variable.isParameter)) {
           DartType knownType = getKnownType(variable);
           if (!knownType.isDynamic) {
             DartType shownType = elements.getType(node.arguments.head);
@@ -1246,29 +1217,29 @@
               String variableName = variable.name;
               if (!types.isSubtype(shownType, knownType)) {
                 typePromotion.addHint(reporter.createMessage(
-                    node,
-                    MessageKind.NOT_MORE_SPECIFIC_SUBTYPE,
-                    {'variableName': variableName,
-                     'shownType': shownType,
-                     'knownType': knownType}));
+                    node, MessageKind.NOT_MORE_SPECIFIC_SUBTYPE, {
+                  'variableName': variableName,
+                  'shownType': shownType,
+                  'knownType': knownType
+                }));
               } else {
                 DartType shownTypeSuggestion =
                     computeMoreSpecificType(shownType, knownType);
                 if (shownTypeSuggestion != null) {
                   typePromotion.addHint(reporter.createMessage(
-                      node,
-                      MessageKind.NOT_MORE_SPECIFIC_SUGGESTION,
-                      {'variableName': variableName,
-                       'shownType': shownType,
-                       'shownTypeSuggestion': shownTypeSuggestion,
-                       'knownType': knownType}));
+                      node, MessageKind.NOT_MORE_SPECIFIC_SUGGESTION, {
+                    'variableName': variableName,
+                    'shownType': shownType,
+                    'shownTypeSuggestion': shownTypeSuggestion,
+                    'knownType': knownType
+                  }));
                 } else {
                   typePromotion.addHint(reporter.createMessage(
-                      node,
-                      MessageKind.NOT_MORE_SPECIFIC,
-                      {'variableName': variableName,
-                       'shownType': shownType,
-                       'knownType': knownType}));
+                      node, MessageKind.NOT_MORE_SPECIFIC, {
+                    'variableName': variableName,
+                    'shownType': shownType,
+                    'knownType': knownType
+                  }));
                 }
               }
             }
@@ -1277,15 +1248,19 @@
         }
       }
       return boolType;
-    } if (node.isOperator && identical(name, 'as')) {
+    }
+    if (node.isOperator && identical(name, 'as')) {
       analyze(node.receiver);
       return elements.getType(node.arguments.head);
     } else if (node.isOperator) {
       final Node receiver = node.receiver;
       final DartType receiverType = analyze(receiver);
-      if (identical(name, '==') || identical(name, '!=')
+      if (identical(name, '==') ||
+          identical(name, '!=')
           // TODO(johnniwinther): Remove these.
-          || identical(name, '===') || identical(name, '!==')) {
+          ||
+          identical(name, '===') ||
+          identical(name, '!==')) {
         // Analyze argument.
         analyze(node.arguments.head);
         return boolType;
@@ -1320,24 +1295,34 @@
       if (identical(name, '-') && node.arguments.isEmpty) {
         operatorName = 'unary-';
       }
-      assert(invariant(node,
-                       identical(name, '+') || identical(name, '=') ||
-                       identical(name, '-') || identical(name, '*') ||
-                       identical(name, '/') || identical(name, '%') ||
-                       identical(name, '~/') || identical(name, '|') ||
-                       identical(name, '&') || identical(name, '^') ||
-                       identical(name, '~')|| identical(name, '<<') ||
-                       identical(name, '>>') ||
-                       identical(name, '<') || identical(name, '>') ||
-                       identical(name, '<=') || identical(name, '>=') ||
-                       identical(name, '[]'),
-                       message: 'Unexpected operator $name'));
+      assert(invariant(
+          node,
+          identical(name, '+') ||
+              identical(name, '=') ||
+              identical(name, '-') ||
+              identical(name, '*') ||
+              identical(name, '/') ||
+              identical(name, '%') ||
+              identical(name, '~/') ||
+              identical(name, '|') ||
+              identical(name, '&') ||
+              identical(name, '^') ||
+              identical(name, '~') ||
+              identical(name, '<<') ||
+              identical(name, '>>') ||
+              identical(name, '<') ||
+              identical(name, '>') ||
+              identical(name, '<=') ||
+              identical(name, '>=') ||
+              identical(name, '[]'),
+          message: 'Unexpected operator $name'));
 
       // TODO(karlklose): handle `void` in expression context by calling
       // [analyzeNonVoid] instead of [analyze].
-      ElementAccess access = receiverType.isVoid ? const DynamicAccess()
-          : lookupMember(node, receiverType, operatorName,
-                         MemberKind.OPERATOR, null);
+      ElementAccess access = receiverType.isVoid
+          ? const DynamicAccess()
+          : lookupMember(
+              node, receiverType, operatorName, MemberKind.OPERATOR, null);
       LinkBuilder<DartType> argumentTypesBuilder = new LinkBuilder<DartType>();
       DartType resultType =
           analyzeInvocation(node, access, argumentTypesBuilder);
@@ -1386,10 +1371,8 @@
    * of the result. This method also handles increment/decrement expressions
    * like [: target++ :].
    */
-  DartType checkAssignmentOperator(SendSet node,
-                                   String operatorName,
-                                   Node valueNode,
-                                   DartType value) {
+  DartType checkAssignmentOperator(
+      SendSet node, String operatorName, Node valueNode, DartType value) {
     assert(invariant(node, !node.isIndex));
     Element setterElement = elements[node];
     Element getterElement = elements[node.selector];
@@ -1422,18 +1405,15 @@
    * of the result. This method also handles increment/decrement expressions
    * like [: base[key]++ :].
    */
-  DartType checkIndexAssignmentOperator(SendSet node,
-                                        String operatorName,
-                                        Node valueNode,
-                                        DartType value) {
+  DartType checkIndexAssignmentOperator(
+      SendSet node, String operatorName, Node valueNode, DartType value) {
     assert(invariant(node, node.isIndex));
     final DartType base = analyze(node.receiver);
     final Node keyNode = node.arguments.head;
     final DartType key = analyze(keyNode);
 
     // [indexGet] is the type of operator[] on [base].
-    DartType indexGet = lookupMemberType(
-        node, base, '[]', MemberKind.OPERATOR);
+    DartType indexGet = lookupMemberType(node, base, '[]', MemberKind.OPERATOR);
     if (indexGet is FunctionType) {
       FunctionType indexGetType = indexGet;
       DartType indexGetKey = firstType(indexGetType.parameterTypes);
@@ -1443,8 +1423,8 @@
       // [element] is the type of base[key].
       DartType element = indexGetType.returnType;
       // [operator] is the type of operator o on [element].
-      DartType operator = lookupMemberType(
-          node, element, operatorName, MemberKind.OPERATOR);
+      DartType operator =
+          lookupMemberType(node, element, operatorName, MemberKind.OPERATOR);
       if (operator is FunctionType) {
         FunctionType operatorType = operator;
 
@@ -1456,8 +1436,8 @@
         DartType result = operatorType.returnType;
 
         // [indexSet] is the type of operator[]= on [base].
-        DartType indexSet = lookupMemberType(
-            node, base, '[]=', MemberKind.OPERATOR);
+        DartType indexSet =
+            lookupMemberType(node, base, '[]=', MemberKind.OPERATOR);
         if (indexSet is FunctionType) {
           FunctionType indexSetType = indexSet;
           DartType indexSetKey = firstType(indexSetType.parameterTypes);
@@ -1486,14 +1466,14 @@
     if (identical(name, '=') || identical(name, '??=')) {
       // e1 = value
       if (node.isIndex) {
-         // base[key] = value
+        // base[key] = value
         final DartType base = analyze(node.receiver);
         final Node keyNode = node.arguments.head;
         final DartType key = analyze(keyNode);
         final Node valueNode = node.arguments.tail.head;
         final DartType value = analyze(valueNode);
-        DartType indexSet = lookupMemberType(
-            node, base, '[]=', MemberKind.OPERATOR);
+        DartType indexSet =
+            lookupMemberType(node, base, '[]=', MemberKind.OPERATOR);
         DartType indexSetValue = const DynamicType();
         if (indexSet is FunctionType) {
           FunctionType indexSetType = indexSet;
@@ -1502,7 +1482,8 @@
           indexSetValue = secondType(indexSetType.parameterTypes);
           checkAssignable(node.assignmentOperator, value, indexSetValue);
         }
-        return identical(name, '=') ? value
+        return identical(name, '=')
+            ? value
             : types.computeLeastUpperBound(value, indexSetValue);
       } else {
         // target = value
@@ -1511,8 +1492,9 @@
           // Field declaration `Foo target = value;` or initializer
           // `this.target = value`. Lookup the getter `target` in the class
           // members.
-          target = computeAccessType(node, selector.source, element,
-              MemberKind.GETTER, lookupClassMember: true);
+          target = computeAccessType(
+              node, selector.source, element, MemberKind.GETTER,
+              lookupClassMember: true);
         } else {
           // Normal assignment `target = value`.
           target = computeAccessType(
@@ -1521,7 +1503,8 @@
         final Node valueNode = node.arguments.head;
         final DartType value = analyze(valueNode);
         checkAssignable(node.assignmentOperator, value, target);
-        return identical(name, '=') ? value
+        return identical(name, '=')
+            ? value
             : types.computeLeastUpperBound(value, target);
       }
     } else if (identical(name, '++') || identical(name, '--')) {
@@ -1540,17 +1523,39 @@
       // e1 o= e2 for some operator o.
       String operatorName;
       switch (name) {
-        case '+=': operatorName = '+'; break;
-        case '-=': operatorName = '-'; break;
-        case '*=': operatorName = '*'; break;
-        case '/=': operatorName = '/'; break;
-        case '%=': operatorName = '%'; break;
-        case '~/=': operatorName = '~/'; break;
-        case '&=': operatorName = '&'; break;
-        case '|=': operatorName = '|'; break;
-        case '^=': operatorName = '^'; break;
-        case '<<=': operatorName = '<<'; break;
-        case '>>=': operatorName = '>>'; break;
+        case '+=':
+          operatorName = '+';
+          break;
+        case '-=':
+          operatorName = '-';
+          break;
+        case '*=':
+          operatorName = '*';
+          break;
+        case '/=':
+          operatorName = '/';
+          break;
+        case '%=':
+          operatorName = '%';
+          break;
+        case '~/=':
+          operatorName = '~/';
+          break;
+        case '&=':
+          operatorName = '&';
+          break;
+        case '|=':
+          operatorName = '|';
+          break;
+        case '^=':
+          operatorName = '^';
+          break;
+        case '<<=':
+          operatorName = '<<';
+          break;
+        case '>>=':
+          operatorName = '>>';
+          break;
         default:
           reporter.internalError(node, 'Unexpected assignment operator $name.');
       }
@@ -1599,8 +1604,8 @@
     return coreTypes.symbolType;
   }
 
-  DartType computeConstructorType(ConstructorElement constructor,
-                                  DartType type) {
+  DartType computeConstructorType(
+      ConstructorElement constructor, DartType type) {
     if (Elements.isUnresolved(constructor)) return const DynamicType();
     DartType constructorType = constructor.computeType(resolution);
     if (identical(type.kind, TypeKind.INTERFACE)) {
@@ -1612,8 +1617,8 @@
         while (receiverElement.isMixinApplication) {
           receiverElement = receiverElement.supertype.element;
         }
-        constructorType = constructorType.substByContext(
-            interfaceType.asInstanceOf(receiverElement));
+        constructorType = constructorType
+            .substByContext(interfaceType.asInstanceOf(receiverElement));
       } else {
         constructorType = constructorType.substByContext(type);
       }
@@ -1637,8 +1642,8 @@
     InterfaceType listType = elements.getType(node);
     DartType listElementType = firstType(listType.typeArguments);
     for (Link<Node> link = node.elements.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       Node element = link.head;
       DartType elementType = analyze(element);
       checkAssignable(element, elementType, listElementType,
@@ -1698,8 +1703,8 @@
       // conditions hold:
       // - f is not a generative constructor.
       // - The return type of f may not be assigned to void.
-      reportTypeWarning(node, MessageKind.RETURN_NOTHING,
-                        {'returnType': expectedReturnType});
+      reportTypeWarning(
+          node, MessageKind.RETURN_NOTHING, {'returnType': expectedReturnType});
     }
     return const StatementType();
   }
@@ -1747,8 +1752,9 @@
       reportTypeWarning(node.type, MessageKind.VOID_VARIABLE);
       type = const DynamicType();
     }
-    for (Link<Node> link = node.definitions.nodes; !link.isEmpty;
-         link = link.tail) {
+    for (Link<Node> link = node.definitions.nodes;
+        !link.isEmpty;
+        link = link.tail) {
       Node definition = link.head;
       invariant(definition, definition is Identifier || definition is SendSet,
           message: 'expected identifier or initialization');
@@ -1825,8 +1831,7 @@
     VariableDefinitions declaredIdentifier =
         node.declaredIdentifier.asVariableDefinitions();
     if (declaredIdentifier != null) {
-      return
-          analyzeWithDefault(declaredIdentifier.type, const DynamicType());
+      return analyzeWithDefault(declaredIdentifier.type, const DynamicType());
     } else {
       return analyze(node.declaredIdentifier);
     }
@@ -1837,8 +1842,7 @@
     DartType expressionType = analyze(node.expression);
     DartType streamOfDynamic = coreTypes.streamType();
     if (!types.isAssignable(expressionType, streamOfDynamic)) {
-      reportMessage(node.expression,
-          MessageKind.NOT_ASSIGNABLE,
+      reportMessage(node.expression, MessageKind.NOT_ASSIGNABLE,
           {'fromType': expressionType, 'toType': streamOfDynamic},
           isHint: true);
     } else {
@@ -1850,11 +1854,14 @@
         if (streamType != null) {
           DartType streamElementType = streamType.typeArguments.first;
           if (!types.isAssignable(streamElementType, elementType)) {
-            reportMessage(node.expression,
+            reportMessage(
+                node.expression,
                 MessageKind.FORIN_NOT_ASSIGNABLE,
-                {'currentType': streamElementType,
-                 'expressionType': expressionType,
-                 'elementType': elementType},
+                {
+                  'currentType': streamElementType,
+                  'expressionType': expressionType,
+                  'elementType': elementType
+                },
                 isHint: true);
           }
         }
@@ -1867,17 +1874,20 @@
   visitSyncForIn(SyncForIn node) {
     DartType elementType = computeForInElementType(node);
     DartType expressionType = analyze(node.expression);
-    DartType iteratorType = lookupMemberType(node.expression,
-        expressionType, Identifiers.iterator, MemberKind.GETTER);
-    DartType currentType = lookupMemberType(node.expression,
-              iteratorType, Identifiers.current, MemberKind.GETTER,
-              isHint: true);
+    DartType iteratorType = lookupMemberType(node.expression, expressionType,
+        Identifiers.iterator, MemberKind.GETTER);
+    DartType currentType = lookupMemberType(
+        node.expression, iteratorType, Identifiers.current, MemberKind.GETTER,
+        isHint: true);
     if (!types.isAssignable(currentType, elementType)) {
-      reportMessage(node.expression,
+      reportMessage(
+          node.expression,
           MessageKind.FORIN_NOT_ASSIGNABLE,
-          {'currentType': currentType,
-           'expressionType': expressionType,
-           'elementType': elementType},
+          {
+            'currentType': currentType,
+            'expressionType': expressionType,
+            'elementType': elementType
+          },
           isHint: true);
     }
     analyze(node.body);
@@ -1894,8 +1904,8 @@
     DartType mapValueType = secondType(mapType.typeArguments);
     bool isConst = node.isConst;
     for (Link<Node> link = node.entries.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       LiteralMapEntry entry = link.head;
       DartType keyType = analyze(entry.key);
       checkAssignable(entry.key, keyType, mapKeyType, isConst: isConst);
@@ -1944,7 +1954,7 @@
             <ConstantValue, FieldElement>{};
         List<FieldElement> unreferencedFields = <FieldElement>[];
         EnumClassElement enumClass = expressionType.element;
-        enumClass.enumValues.forEach((FieldElement field) {
+        enumClass.enumValues.forEach((EnumConstantElement field) {
           ConstantValue constantValue =
               compiler.constants.getConstantValueForVariable(field);
           if (constantValue == null) {
@@ -1959,21 +1969,20 @@
           for (Node labelOrCase in switchCase.labelsAndCases) {
             CaseMatch caseMatch = labelOrCase.asCaseMatch();
             if (caseMatch != null) {
-              ConstantExpression caseConstant =
-                  compiler.resolver.constantCompiler.compileNode(
-                      caseMatch.expression, elements);
-              enumValues.remove(
-                  compiler.constants.getConstantValue(caseConstant));
+              ConstantExpression caseConstant = compiler
+                  .resolver.constantCompiler
+                  .compileNode(caseMatch.expression, elements);
+              enumValues
+                  .remove(compiler.constants.getConstantValue(caseConstant));
             }
           }
         }
         unreferencedFields.addAll(enumValues.values);
         if (!unreferencedFields.isEmpty) {
-          reporter.reportWarningMessage(
-              node, MessageKind.MISSING_ENUM_CASES,
-              {'enumType': expressionType,
-               'enumValues': unreferencedFields.map(
-                   (e) => e.name).join(', ')});
+          reporter.reportWarningMessage(node, MessageKind.MISSING_ENUM_CASES, {
+            'enumType': expressionType,
+            'enumValues': unreferencedFields.map((e) => e.name).join(', ')
+          });
         }
       });
     }
diff --git a/pkg/compiler/lib/src/types/abstract_value_domain.dart b/pkg/compiler/lib/src/types/abstract_value_domain.dart
index 73e8ae4..e19da52 100644
--- a/pkg/compiler/lib/src/types/abstract_value_domain.dart
+++ b/pkg/compiler/lib/src/types/abstract_value_domain.dart
@@ -7,16 +7,9 @@
 import '../constants/values.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../native/native.dart' show
-    NativeBehavior;
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/universe.dart' show
-    ReceiverConstraint;
+import '../universe/selector.dart' show Selector;
 
-enum AbstractBool {
-  True, False, Maybe, Nothing
-}
+enum AbstractBool { True, False, Maybe, Nothing }
 
 /// A value in an abstraction of runtime values.
 abstract class AbstractValue {}
@@ -132,7 +125,7 @@
   bool isDefinitelyMutableIndexable(AbstractValue t, {bool allowNull: false});
 
   bool isDefinitelyFixedLengthIndexable(AbstractValue t,
-                                        {bool allowNull: false});
+      {bool allowNull: false});
 
   bool isDefinitelyIntercepted(AbstractValue t, {bool allowNull});
 
@@ -146,9 +139,8 @@
 
   bool isMorePreciseOrEqual(AbstractValue t1, AbstractValue t2);
 
-  AbstractBool isSubtypeOf(AbstractValue value,
-                           DartType type,
-                           {bool allowNull});
+  AbstractBool isSubtypeOf(AbstractValue value, DartType type,
+      {bool allowNull});
 
   /// Returns whether [value] is one of the falsy values: false, 0, -0, NaN,
   /// the empty string, or null.
@@ -172,6 +164,6 @@
 
   /// Returns the type of the entry of [container] at a given index.
   /// Returns `null` if unknown.
-  AbstractValue indexWithConstant(AbstractValue container,
-                                  ConstantValue indexValue);
+  AbstractValue indexWithConstant(
+      AbstractValue container, ConstantValue indexValue);
 }
diff --git a/pkg/compiler/lib/src/types/constants.dart b/pkg/compiler/lib/src/types/constants.dart
index e7ecab1..a3b2faa 100644
--- a/pkg/compiler/lib/src/types/constants.dart
+++ b/pkg/compiler/lib/src/types/constants.dart
@@ -5,11 +5,9 @@
 library types.constants;
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../constants/values.dart';
-import '../js_backend/js_backend.dart' show
-    SyntheticConstantKind;
+import '../js_backend/js_backend.dart' show SyntheticConstantKind;
 import 'types.dart';
 
 /// Computes the [TypeMask] for the constant [value].
@@ -21,8 +19,8 @@
   const ConstantValueTypeMasks();
 
   @override
-  TypeMask visitConstructed(ConstructedConstantValue constant,
-                            Compiler compiler) {
+  TypeMask visitConstructed(
+      ConstructedConstantValue constant, Compiler compiler) {
     if (compiler.backend.isInterceptorClass(constant.type.element)) {
       return compiler.typesTask.nonNullType;
     }
@@ -61,8 +59,8 @@
         return compiler.typesTask.stringType;
       default:
         DiagnosticReporter reporter = compiler.reporter;
-        reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
-                               "Unexpected DummyConstantKind.");
+        reporter.internalError(
+            CURRENT_ELEMENT_SPANNABLE, "Unexpected DummyConstantKind.");
         return null;
     }
   }
@@ -86,8 +84,8 @@
   }
 
   @override
-  TypeMask visitInterceptor(InterceptorConstantValue constant,
-                            Compiler compiler) {
+  TypeMask visitInterceptor(
+      InterceptorConstantValue constant, Compiler compiler) {
     return compiler.typesTask.nonNullType;
   }
 
diff --git a/pkg/compiler/lib/src/types/container_type_mask.dart b/pkg/compiler/lib/src/types/container_type_mask.dart
index 5f22462..6a6ad80 100644
--- a/pkg/compiler/lib/src/types/container_type_mask.dart
+++ b/pkg/compiler/lib/src/types/container_type_mask.dart
@@ -22,29 +22,20 @@
   // The length of the container.
   final int length;
 
-  ContainerTypeMask(this.forwardTo,
-                    this.allocationNode,
-                    this.allocationElement,
-                    this.elementType,
-                    this.length);
+  ContainerTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
+      this.elementType, this.length);
 
   TypeMask nullable() {
     return isNullable
         ? this
-        : new ContainerTypeMask(forwardTo.nullable(),
-                                allocationNode,
-                                allocationElement,
-                                elementType,
-                                length);
+        : new ContainerTypeMask(forwardTo.nullable(), allocationNode,
+            allocationElement, elementType, length);
   }
 
   TypeMask nonNullable() {
     return isNullable
-        ? new ContainerTypeMask(forwardTo.nonNullable(),
-                                allocationNode,
-                                allocationElement,
-                                elementType,
-                                length)
+        ? new ContainerTypeMask(forwardTo.nonNullable(), allocationNode,
+            allocationElement, elementType, length)
         : this;
   }
 
@@ -61,10 +52,8 @@
 
   TypeMask intersection(TypeMask other, ClassWorld classWorld) {
     TypeMask forwardIntersection = forwardTo.intersection(other, classWorld);
-    if (forwardIntersection.isEmpty) return forwardIntersection;
-    return forwardIntersection.isNullable
-        ? nullable()
-        : nonNullable();
+    if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
+    return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
   TypeMask union(other, ClassWorld classWorld) {
@@ -72,11 +61,11 @@
       return this;
     } else if (equalsDisregardNull(other)) {
       return other.isNullable ? other : this;
-    } else if (other.isEmpty) {
+    } else if (other.isEmptyOrNull) {
       return other.isNullable ? this.nullable() : this;
-    } else if (other.isContainer
-               && elementType != null
-               && other.elementType != null) {
+    } else if (other.isContainer &&
+        elementType != null &&
+        other.elementType != null) {
       TypeMask newElementType =
           elementType.union(other.elementType, classWorld);
       int newLength = (length == other.length) ? length : null;
@@ -84,15 +73,17 @@
       return new ContainerTypeMask(
           newForwardTo,
           allocationNode == other.allocationNode ? allocationNode : null,
-          allocationElement == other.allocationElement ? allocationElement
-                                                       : null,
-          newElementType, newLength);
+          allocationElement == other.allocationElement
+              ? allocationElement
+              : null,
+          newElementType,
+          newLength);
     } else {
       return forwardTo.union(other, classWorld);
     }
   }
 
-  bool operator==(other) => super == other;
+  bool operator ==(other) => super == other;
 
   int get hashCode {
     return computeHashCode(
diff --git a/pkg/compiler/lib/src/types/dictionary_type_mask.dart b/pkg/compiler/lib/src/types/dictionary_type_mask.dart
index 27419779..74f9fdd 100644
--- a/pkg/compiler/lib/src/types/dictionary_type_mask.dart
+++ b/pkg/compiler/lib/src/types/dictionary_type_mask.dart
@@ -16,30 +16,21 @@
   // The underlying key/value map of this dictionary.
   final Map<String, TypeMask> typeMap;
 
-  DictionaryTypeMask(forwardTo,
-                     allocationNode,
-                     allocationElement,
-                     keyType, valueType,
-                     this.typeMap) :
-      super(forwardTo, allocationNode, allocationElement, keyType, valueType);
+  DictionaryTypeMask(forwardTo, allocationNode, allocationElement, keyType,
+      valueType, this.typeMap)
+      : super(forwardTo, allocationNode, allocationElement, keyType, valueType);
 
   TypeMask nullable() {
     return isNullable
         ? this
-        : new DictionaryTypeMask(forwardTo.nullable(),
-                                 allocationNode,
-                                 allocationElement,
-                                 keyType, valueType,
-                                 typeMap);
+        : new DictionaryTypeMask(forwardTo.nullable(), allocationNode,
+            allocationElement, keyType, valueType, typeMap);
   }
 
   TypeMask nonNullable() {
     return isNullable
-        ? new DictionaryTypeMask(forwardTo.nonNullable(),
-                                 allocationNode,
-                                 allocationElement,
-                                 keyType, valueType,
-                                 typeMap)
+        ? new DictionaryTypeMask(forwardTo.nonNullable(), allocationNode,
+            allocationElement, keyType, valueType, typeMap)
         : this;
   }
 
@@ -49,20 +40,17 @@
   bool equalsDisregardNull(other) {
     if (other is! DictionaryTypeMask) return false;
     return allocationNode == other.allocationNode &&
-           keyType == other.keyType &&
-           valueType == other.valueType &&
-           typeMap.keys.every((k) => other.typeMap.containsKey(k)) &&
-           other.typeMap.keys.every((k) => typeMap.containsKey(k) &&
-                                           typeMap[k] == other.typeMap[k]);
-
+        keyType == other.keyType &&
+        valueType == other.valueType &&
+        typeMap.keys.every((k) => other.typeMap.containsKey(k)) &&
+        other.typeMap.keys.every(
+            (k) => typeMap.containsKey(k) && typeMap[k] == other.typeMap[k]);
   }
 
   TypeMask intersection(TypeMask other, ClassWorld classWorld) {
     TypeMask forwardIntersection = forwardTo.intersection(other, classWorld);
-    if (forwardIntersection.isEmpty) return forwardIntersection;
-    return forwardIntersection.isNullable
-        ? nullable()
-        : nonNullable();
+    if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
+    return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
   TypeMask union(other, ClassWorld classWorld) {
@@ -70,49 +58,47 @@
       return this;
     } else if (equalsDisregardNull(other)) {
       return other.isNullable ? other : this;
-    } else if (other.isEmpty) {
+    } else if (other.isEmptyOrNull) {
       return other.isNullable ? this.nullable() : this;
     } else if (other.isDictionary) {
       TypeMask newForwardTo = forwardTo.union(other.forwardTo, classWorld);
       TypeMask newKeyType = keyType.union(other.keyType, classWorld);
       TypeMask newValueType = valueType.union(other.valueType, classWorld);
       Map<String, TypeMask> mappings = <String, TypeMask>{};
-      typeMap.forEach((k,v) {
-              if (!other.typeMap.containsKey(k)) {
-                mappings[k] = v.nullable();
-              }
-            });
-      other.typeMap.forEach((k,v) {
+      typeMap.forEach((k, v) {
+        if (!other.typeMap.containsKey(k)) {
+          mappings[k] = v.nullable();
+        }
+      });
+      other.typeMap.forEach((k, v) {
         if (typeMap.containsKey(k)) {
           mappings[k] = v.union(typeMap[k], classWorld);
         } else {
           mappings[k] = v.nullable();
         }
       });
-      return new DictionaryTypeMask(newForwardTo, null, null,
-                                    newKeyType, newValueType, mappings);
+      return new DictionaryTypeMask(
+          newForwardTo, null, null, newKeyType, newValueType, mappings);
     } else if (other.isMap &&
-               (other.keyType != null) &&
-               (other.valueType != null)) {
+        (other.keyType != null) &&
+        (other.valueType != null)) {
       TypeMask newForwardTo = forwardTo.union(other.forwardTo, classWorld);
       TypeMask newKeyType = keyType.union(other.keyType, classWorld);
       TypeMask newValueType = valueType.union(other.valueType, classWorld);
-      return new MapTypeMask(newForwardTo, null, null,
-                             newKeyType, newValueType);
+      return new MapTypeMask(
+          newForwardTo, null, null, newKeyType, newValueType);
     } else {
       return forwardTo.union(other, classWorld);
     }
   }
 
-  bool operator==(other) => super == other;
+  bool operator ==(other) => super == other;
 
   int get hashCode {
-    return computeHashCode(
-        allocationNode, isNullable, typeMap, forwardTo);
+    return computeHashCode(allocationNode, isNullable, typeMap, forwardTo);
   }
 
   String toString() {
-    return
-        'Dictionary mask: [$keyType/$valueType with $typeMap] type: $forwardTo';
+    return 'Dictionary mask: [$keyType/$valueType with $typeMap] type: $forwardTo';
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/types/flat_type_mask.dart b/pkg/compiler/lib/src/types/flat_type_mask.dart
index 914e673..0ad5cd7 100644
--- a/pkg/compiler/lib/src/types/flat_type_mask.dart
+++ b/pkg/compiler/lib/src/types/flat_type_mask.dart
@@ -9,10 +9,10 @@
  * base type.
  */
 class FlatTypeMask implements TypeMask {
-  static const int EMPTY    = 0;
-  static const int EXACT    = 1;
+  static const int EMPTY = 0;
+  static const int EXACT = 1;
   static const int SUBCLASS = 2;
-  static const int SUBTYPE  = 3;
+  static const int SUBTYPE = 3;
 
   final ClassElement base;
   final int flags;
@@ -20,15 +20,18 @@
   FlatTypeMask(ClassElement base, int kind, bool isNullable)
       : this.internal(base, (kind << 1) | (isNullable ? 1 : 0));
 
-  FlatTypeMask.exact(ClassElement base)
-      : this.internal(base, (EXACT << 1) | 1);
+  FlatTypeMask.exact(ClassElement base) : this.internal(base, (EXACT << 1) | 1);
   FlatTypeMask.subclass(ClassElement base)
       : this.internal(base, (SUBCLASS << 1) | 1);
   FlatTypeMask.subtype(ClassElement base)
       : this.internal(base, (SUBTYPE << 1) | 1);
 
-  const FlatTypeMask.nonNullEmpty(): base = null, flags = 0;
-  const FlatTypeMask.empty() : base = null, flags = 1;
+  const FlatTypeMask.nonNullEmpty()
+      : base = null,
+        flags = 0;
+  const FlatTypeMask.empty()
+      : base = null,
+        flags = 1;
 
   FlatTypeMask.nonNullExact(ClassElement base)
       : this.internal(base, EXACT << 1);
@@ -60,14 +63,16 @@
     Map<ClassElement, TypeMask> cachedMasks =
         world.canonicalizedTypeMasks[flags];
     if (cachedMasks == null) {
-      world.canonicalizedTypeMasks[flags] = cachedMasks =
-          <ClassElement, TypeMask>{};
+      world.canonicalizedTypeMasks[flags] =
+          cachedMasks = <ClassElement, TypeMask>{};
     }
-    return cachedMasks.putIfAbsent(base,
-        () => new FlatTypeMask.internal(base, flags));
+    return cachedMasks.putIfAbsent(
+        base, () => new FlatTypeMask.internal(base, flags));
   }
 
-  bool get isEmpty => (flags >> 1) == EMPTY;
+  bool get isEmpty => isEmptyOrNull && !isNullable;
+  bool get isNull => isEmptyOrNull && isNullable;
+  bool get isEmptyOrNull => (flags >> 1) == EMPTY;
   bool get isExact => (flags >> 1) == EXACT;
   bool get isNullable => (flags & 1) != 0;
 
@@ -94,7 +99,7 @@
 
   bool contains(ClassElement type, ClassWorld classWorld) {
     assert(type.isDeclaration);
-    if (isEmpty) {
+    if (isEmptyOrNull) {
       return false;
     } else if (identical(base, type)) {
       return true;
@@ -117,30 +122,29 @@
     Backend backend = classWorld.backend;
     if (containsOnlyString(classWorld)) {
       return cls == classWorld.stringClass ||
-             cls == backend.stringImplementation;
+          cls == backend.stringImplementation;
     }
     if (containsOnlyBool(classWorld)) {
       return cls == classWorld.boolClass || cls == backend.boolImplementation;
     }
     if (containsOnlyInt(classWorld)) {
-      return cls == classWorld.intClass
-          || cls == backend.intImplementation
-          || cls == backend.positiveIntImplementation
-          || cls == backend.uint32Implementation
-          || cls == backend.uint31Implementation;
+      return cls == classWorld.intClass ||
+          cls == backend.intImplementation ||
+          cls == backend.positiveIntImplementation ||
+          cls == backend.uint32Implementation ||
+          cls == backend.uint31Implementation;
     }
     if (containsOnlyDouble(classWorld)) {
-      return cls == classWorld.doubleClass
-          || cls == backend.doubleImplementation;
+      return cls == classWorld.doubleClass ||
+          cls == backend.doubleImplementation;
     }
     return false;
   }
 
   bool isInMask(TypeMask other, ClassWorld classWorld) {
-    // null is treated separately, so the empty mask might still contain it.
-    if (isEmpty) return isNullable ? other.isNullable : true;
+    if (isEmptyOrNull) return isNullable ? other.isNullable : true;
     // The empty type contains no classes.
-    if (other.isEmpty) return false;
+    if (other.isEmptyOrNull) return false;
     // Quick check whether to handle null.
     if (isNullable && !other.isNullable) return false;
     other = TypeMask.nonForwardingMask(other);
@@ -152,8 +156,8 @@
     // If other is exact, it only contains its base.
     // TODO(herhut): Get rid of isSingleImplementationOf.
     if (flatOther.isExact) {
-      return (isExact && base == otherBase)
-          || isSingleImplementationOf(otherBase, classWorld);
+      return (isExact && base == otherBase) ||
+          isSingleImplementationOf(otherBase, classWorld);
     }
     // If other is subclass, this has to be subclass, as well. Unless
     // flatOther.base covers all subtypes of this. Currently, we only
@@ -175,37 +179,36 @@
 
   bool containsOnlyInt(ClassWorld classWorld) {
     Backend backend = classWorld.backend;
-    return base == classWorld.intClass
-        || base == backend.intImplementation
-        || base == backend.positiveIntImplementation
-        || base == backend.uint31Implementation
-        || base == backend.uint32Implementation;
+    return base == classWorld.intClass ||
+        base == backend.intImplementation ||
+        base == backend.positiveIntImplementation ||
+        base == backend.uint31Implementation ||
+        base == backend.uint32Implementation;
   }
 
   bool containsOnlyDouble(ClassWorld classWorld) {
     Backend backend = classWorld.backend;
-    return base == classWorld.doubleClass
-        || base == backend.doubleImplementation;
+    return base == classWorld.doubleClass ||
+        base == backend.doubleImplementation;
   }
 
   bool containsOnlyNum(ClassWorld classWorld) {
     Backend backend = classWorld.backend;
-    return containsOnlyInt(classWorld)
-        || containsOnlyDouble(classWorld)
-        || base == classWorld.numClass
-        || base == backend.numImplementation;
+    return containsOnlyInt(classWorld) ||
+        containsOnlyDouble(classWorld) ||
+        base == classWorld.numClass ||
+        base == backend.numImplementation;
   }
 
   bool containsOnlyBool(ClassWorld classWorld) {
     Backend backend = classWorld.backend;
-    return base == classWorld.boolClass
-        || base == backend.boolImplementation;
+    return base == classWorld.boolClass || base == backend.boolImplementation;
   }
 
   bool containsOnlyString(ClassWorld classWorld) {
     Backend backend = classWorld.backend;
-    return base == classWorld.stringClass
-        || base == backend.stringImplementation;
+    return base == classWorld.stringClass ||
+        base == backend.stringImplementation;
   }
 
   bool containsOnly(ClassElement cls) {
@@ -215,7 +218,7 @@
 
   bool satisfies(ClassElement cls, ClassWorld classWorld) {
     assert(cls.isDeclaration);
-    if (isEmpty) return false;
+    if (isEmptyOrNull) return false;
     if (classWorld.isSubtypeOf(base, cls)) return true;
     return false;
   }
@@ -225,8 +228,8 @@
    * otherwise returns `null`.  This method is conservative.
    */
   ClassElement singleClass(ClassWorld classWorld) {
-    if (isEmpty) return null;
-    if (isNullable) return null;  // It is Null and some other class.
+    if (isEmptyOrNull) return null;
+    if (isNullable) return null; // It is Null and some other class.
     if (isExact) {
       return base;
     } else if (isSubclass) {
@@ -241,7 +244,7 @@
    * Returns whether or not this type mask contains all types.
    */
   bool containsAll(ClassWorld classWorld) {
-    if (isEmpty || isExact) return false;
+    if (isEmptyOrNull || isExact) return false;
     return identical(base, classWorld.objectClass);
   }
 
@@ -251,9 +254,9 @@
     assert(TypeMask.assertIsNormalized(other, classWorld));
     if (other is! FlatTypeMask) return other.union(this, classWorld);
     FlatTypeMask flatOther = other;
-    if (isEmpty) {
+    if (isEmptyOrNull) {
       return isNullable ? flatOther.nullable() : flatOther;
-    } else if (flatOther.isEmpty) {
+    } else if (flatOther.isEmptyOrNull) {
       return flatOther.isNullable ? nullable() : this;
     } else if (base == flatOther.base) {
       return unionSame(flatOther, classWorld);
@@ -339,9 +342,9 @@
     assert(TypeMask.assertIsNormalized(this, classWorld));
     assert(TypeMask.assertIsNormalized(other, classWorld));
     FlatTypeMask flatOther = other;
-    if (isEmpty) {
+    if (isEmptyOrNull) {
       return flatOther.isNullable ? this : nonNullable();
-    } else if (flatOther.isEmpty) {
+    } else if (flatOther.isEmptyOrNull) {
       return isNullable ? flatOther : other.nonNullable();
     } else if (base == flatOther.base) {
       return intersectionSame(flatOther, classWorld);
@@ -363,7 +366,7 @@
     FlatTypeMask flatOther = other;
 
     if (isNullable && flatOther.isNullable) return false;
-    if (isEmpty || flatOther.isEmpty) return true;
+    if (isEmptyOrNull || flatOther.isEmptyOrNull) return true;
     if (base == flatOther.base) return false;
     if (isExact && flatOther.isExact) return true;
 
@@ -391,8 +394,8 @@
     assert(a.isSubclass || a.isSubtype);
     assert(b.isSubtype);
     var elements = a.isSubclass
-      ? classWorld.strictSubclassesOf(a.base)
-      : classWorld.strictSubtypesOf(a.base);
+        ? classWorld.strictSubclassesOf(a.base)
+        : classWorld.strictSubtypesOf(a.base);
     for (var element in elements) {
       if (classWorld.isSubtypeOf(element, b.base)) return false;
     }
@@ -417,8 +420,8 @@
     }
   }
 
-  TypeMask intersectionStrictSubclass(FlatTypeMask other,
-                                      ClassWorld classWorld) {
+  TypeMask intersectionStrictSubclass(
+      FlatTypeMask other, ClassWorld classWorld) {
     assert(base != other.base);
     assert(classWorld.isSubclassOf(other.base, base));
     // If this mask isn't at least a subclass mask, then the
@@ -437,8 +440,8 @@
     }
   }
 
-  TypeMask intersectionStrictSubtype(FlatTypeMask other,
-                                     ClassWorld classWorld) {
+  TypeMask intersectionStrictSubtype(
+      FlatTypeMask other, ClassWorld classWorld) {
     assert(base != other.base);
     assert(classWorld.isSubtypeOf(other.base, base));
     if (!isSubtype) return intersectionHelper(other, classWorld);
@@ -504,7 +507,8 @@
   }
 
   TypeMask intersectionEmpty(FlatTypeMask other) {
-    return isNullable && other.isNullable ? new TypeMask.empty()
+    return isNullable && other.isNullable
+        ? new TypeMask.empty()
         : new TypeMask.nonNullEmpty();
   }
 
@@ -513,9 +517,8 @@
    * invoked on an instance of [cls]. [selector] is used to ensure library
    * privacy is taken into account.
    */
-  static bool hasElementIn(ClassElement cls,
-                           Selector selector,
-                           Element element) {
+  static bool hasElementIn(
+      ClassElement cls, Selector selector, Element element) {
     // Use [:implementation:] of [element]
     // because our function set only stores declarations.
     Element result = findMatchIn(cls, selector);
@@ -524,8 +527,7 @@
         : result.implementation == element.implementation;
   }
 
-  static Element findMatchIn(ClassElement cls,
-                             Selector selector) {
+  static Element findMatchIn(ClassElement cls, Selector selector) {
     // Use the [:implementation] of [cls] in case the found [element]
     // is in the patch class.
     return cls.implementation.lookupByName(selector.memberName);
@@ -539,8 +541,8 @@
   bool canHit(Element element, Selector selector, ClassWorld classWorld) {
     Backend backend = classWorld.backend;
     assert(element.name == selector.name);
-    if (isEmpty) {
-      if (!isNullable) return false;
+    if (isEmpty) return false;
+    if (isNull) {
       return hasElementIn(backend.nullImplementation, selector, element);
     }
 
@@ -560,24 +562,24 @@
       return hasElementIn(self, selector, element);
     } else if (isSubclass) {
       assert(classWorld.isClosed);
-      return hasElementIn(self, selector, element)
-          || other.isSubclassOf(self)
-          || classWorld.hasAnySubclassThatMixes(self, other);
+      return hasElementIn(self, selector, element) ||
+          other.isSubclassOf(self) ||
+          classWorld.hasAnySubclassThatMixes(self, other);
     } else {
       assert(isSubtype);
       assert(classWorld.isClosed);
-      bool result = hasElementIn(self, selector, element)
-          || other.implementsInterface(self)
-          || classWorld.hasAnySubclassThatImplements(other, base)
-          || classWorld.hasAnySubclassOfMixinUseThatImplements(other, base);
+      bool result = hasElementIn(self, selector, element) ||
+          other.implementsInterface(self) ||
+          classWorld.hasAnySubclassThatImplements(other, base) ||
+          classWorld.hasAnySubclassOfMixinUseThatImplements(other, base);
       if (result) return true;
       // If the class is used as a mixin, we have to check if the element
       // can be hit from any of the mixin applications.
       Iterable<ClassElement> mixinUses = classWorld.mixinUsesOf(self);
       return mixinUses.any((mixinApplication) =>
-           hasElementIn(mixinApplication, selector, element)
-        || other.isSubclassOf(mixinApplication)
-        || classWorld.hasAnySubclassThatMixes(mixinApplication, other));
+          hasElementIn(mixinApplication, selector, element) ||
+          other.isSubclassOf(mixinApplication) ||
+          classWorld.hasAnySubclassThatMixes(mixinApplication, other));
     }
   }
 
@@ -585,9 +587,8 @@
    * Returns whether a [selector] call on an instance of [cls]
    * will hit a method at runtime, and not go through [noSuchMethod].
    */
-  static bool hasConcreteMatch(ClassElement cls,
-                               Selector selector,
-                               ClassWorld world) {
+  static bool hasConcreteMatch(
+      ClassElement cls, Selector selector, ClassWorld world) {
     assert(invariant(cls, world.isInstantiated(cls),
         message: '$cls has not been instantiated.'));
     Element element = findMatchIn(cls, selector);
@@ -603,7 +604,7 @@
   bool needsNoSuchMethodHandling(Selector selector, ClassWorld classWorld) {
     // A call on an empty type mask is either dead code, or a call on
     // `null`.
-    if (isEmpty) return false;
+    if (isEmptyOrNull) return false;
     // A call on an exact mask for an abstract class is dead code.
     if (isExact && base.isAbstract) return false;
     // If the receiver is guaranteed to have a member that
@@ -660,8 +661,7 @@
       // instance of them will be created at runtime, and
       // therefore there is no instance that will require
       // [noSuchMethod] handling.
-      return !cls.isAbstract
-          && !hasConcreteMatch(cls, selector, classWorld);
+      return !cls.isAbstract && !hasConcreteMatch(cls, selector, classWorld);
     }
 
     bool baseNeedsNoSuchMethod = needsNoSuchMethod(base);
@@ -678,13 +678,12 @@
     }
 
     return subclassesToCheck != null &&
-           subclassesToCheck.any(needsNoSuchMethod);
+        subclassesToCheck.any(needsNoSuchMethod);
   }
 
-  Element locateSingleElement(Selector selector,
-                              TypeMask mask,
-                              Compiler compiler) {
-    if (isEmpty) return null;
+  Element locateSingleElement(
+      Selector selector, TypeMask mask, Compiler compiler) {
+    if (isEmptyOrNull) return null;
     Iterable<Element> targets =
         compiler.world.allFunctions.filter(selector, mask);
     if (targets.length != 1) return null;
@@ -699,7 +698,7 @@
 
   bool operator ==(var other) {
     if (identical(this, other)) return true;
-    if (other is !FlatTypeMask) return false;
+    if (other is! FlatTypeMask) return false;
     FlatTypeMask otherMask = other;
     return (flags == otherMask.flags) && (base == otherMask.base);
   }
@@ -709,7 +708,7 @@
   }
 
   String toString() {
-    if (isEmpty) return isNullable ? '[null]' : '[empty]';
+    if (isEmptyOrNull) return isNullable ? '[null]' : '[empty]';
     StringBuffer buffer = new StringBuffer();
     if (isNullable) buffer.write('null|');
     if (isExact) buffer.write('exact=');
@@ -719,9 +718,8 @@
     return "[$buffer]";
   }
 
-  static Set<ClassElement> commonContainedClasses(FlatTypeMask x,
-                                                  FlatTypeMask y,
-                                                  ClassWorld classWorld) {
+  static Set<ClassElement> commonContainedClasses(
+      FlatTypeMask x, FlatTypeMask y, ClassWorld classWorld) {
     Iterable<ClassElement> xSubset = containedSubset(x, classWorld);
     if (xSubset == null) return null;
     Iterable<ClassElement> ySubset = containedSubset(y, classWorld);
@@ -729,8 +727,8 @@
     return xSubset.toSet().intersection(ySubset.toSet());
   }
 
-  static Iterable<ClassElement> containedSubset(FlatTypeMask x,
-                                                ClassWorld classWorld) {
+  static Iterable<ClassElement> containedSubset(
+      FlatTypeMask x, ClassWorld classWorld) {
     ClassElement element = x.base;
     if (x.isExact) {
       return null;
diff --git a/pkg/compiler/lib/src/types/forwarding_type_mask.dart b/pkg/compiler/lib/src/types/forwarding_type_mask.dart
index a4400c6..0e30bac 100644
--- a/pkg/compiler/lib/src/types/forwarding_type_mask.dart
+++ b/pkg/compiler/lib/src/types/forwarding_type_mask.dart
@@ -9,13 +9,14 @@
  * implementation methods to it.
  */
 abstract class ForwardingTypeMask implements TypeMask {
-
   TypeMask get forwardTo;
 
   ForwardingTypeMask();
 
+  bool get isEmptyOrNull => forwardTo.isEmptyOrNull;
   bool get isEmpty => forwardTo.isEmpty;
   bool get isNullable => forwardTo.isNullable;
+  bool get isNull => forwardTo.isNull;
   bool get isExact => forwardTo.isExact;
 
   bool get isUnion => false;
@@ -78,7 +79,7 @@
       return this;
     } else if (equalsDisregardNull(other)) {
       return other.isNullable ? other : this;
-    } else if (other.isEmpty) {
+    } else if (other.isEmptyOrNull) {
       return other.isNullable ? this.nullable() : this;
     }
     return forwardTo.union(other, classWorld);
@@ -100,9 +101,8 @@
     return forwardTo.canHit(element, selector, classWorld);
   }
 
-  Element locateSingleElement(Selector selector,
-                              TypeMask mask,
-                              Compiler compiler) {
+  Element locateSingleElement(
+      Selector selector, TypeMask mask, Compiler compiler) {
     return forwardTo.locateSingleElement(selector, mask, compiler);
   }
 
@@ -115,7 +115,7 @@
     }
   }
 
-  bool operator==(other) {
+  bool operator ==(other) {
     return equalsDisregardNull(other) && isNullable == other.isNullable;
   }
 
diff --git a/pkg/compiler/lib/src/types/map_type_mask.dart b/pkg/compiler/lib/src/types/map_type_mask.dart
index 39ed50b..b3fbc96 100644
--- a/pkg/compiler/lib/src/types/map_type_mask.dart
+++ b/pkg/compiler/lib/src/types/map_type_mask.dart
@@ -24,29 +24,20 @@
   // The key type of this map.
   final TypeMask keyType;
 
-  MapTypeMask(this.forwardTo,
-              this.allocationNode,
-              this.allocationElement,
-              this.keyType,
-              this.valueType);
+  MapTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
+      this.keyType, this.valueType);
 
   TypeMask nullable() {
     return isNullable
         ? this
-        : new MapTypeMask(forwardTo.nullable(),
-                          allocationNode,
-                          allocationElement,
-                          keyType,
-                          valueType);
+        : new MapTypeMask(forwardTo.nullable(), allocationNode,
+            allocationElement, keyType, valueType);
   }
 
   TypeMask nonNullable() {
     return isNullable
-        ? new MapTypeMask(forwardTo.nonNullable(),
-                          allocationNode,
-                          allocationElement,
-                          keyType,
-                          valueType)
+        ? new MapTypeMask(forwardTo.nonNullable(), allocationNode,
+            allocationElement, keyType, valueType)
         : this;
   }
 
@@ -64,10 +55,8 @@
 
   TypeMask intersection(TypeMask other, ClassWorld classWorld) {
     TypeMask forwardIntersection = forwardTo.intersection(other, classWorld);
-    if (forwardIntersection.isEmpty) return forwardIntersection;
-    return forwardIntersection.isNullable
-        ? nullable()
-        : nonNullable();
+    if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
+    return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
   TypeMask union(other, ClassWorld classWorld) {
@@ -75,17 +64,15 @@
       return this;
     } else if (equalsDisregardNull(other)) {
       return other.isNullable ? other : this;
-    } else if (other.isEmpty) {
+    } else if (other.isEmptyOrNull) {
       return other.isNullable ? this.nullable() : this;
     } else if (other.isMap &&
-               keyType != null &&
-               other.keyType != null &&
-               valueType != null &&
-               other.valueType != null) {
-      TypeMask newKeyType =
-          keyType.union(other.keyType, classWorld);
-      TypeMask newValueType =
-          valueType.union(other.valueType, classWorld);
+        keyType != null &&
+        other.keyType != null &&
+        valueType != null &&
+        other.valueType != null) {
+      TypeMask newKeyType = keyType.union(other.keyType, classWorld);
+      TypeMask newValueType = valueType.union(other.valueType, classWorld);
       TypeMask newForwardTo = forwardTo.union(other.forwardTo, classWorld);
       return new MapTypeMask(
           newForwardTo, null, null, newKeyType, newValueType);
@@ -93,21 +80,23 @@
       assert(other.keyType == classWorld.compiler.typesTask.stringType);
       TypeMask newKeyType = keyType.union(other.keyType, classWorld);
       TypeMask newValueType =
-          other.typeMap.values.fold(keyType, (p,n) => p.union(n, classWorld));
+          other.typeMap.values.fold(keyType, (p, n) => p.union(n, classWorld));
       TypeMask newForwardTo = forwardTo.union(other.forwardTo, classWorld);
       MapTypeMask newMapTypeMask = new MapTypeMask(
           newForwardTo,
           allocationNode == other.allocationNode ? allocationNode : null,
-          allocationElement == other.allocationElement ? allocationElement
-                                                       : null,
-          newKeyType, newValueType);
+          allocationElement == other.allocationElement
+              ? allocationElement
+              : null,
+          newKeyType,
+          newValueType);
       return newMapTypeMask;
     } else {
       return forwardTo.union(other, classWorld);
     }
   }
 
-  bool operator==(other) => super == other;
+  bool operator ==(other) => super == other;
 
   int get hashCode {
     return computeHashCode(
diff --git a/pkg/compiler/lib/src/types/type_mask.dart b/pkg/compiler/lib/src/types/type_mask.dart
index 736df0d..d444afe 100644
--- a/pkg/compiler/lib/src/types/type_mask.dart
+++ b/pkg/compiler/lib/src/types/type_mask.dart
@@ -24,8 +24,7 @@
   @override
   bool needsNoSuchMethodHandling(Selector selector, ClassWorld world) {
     if (isAll) {
-      TypeMask mask =
-          new TypeMask.subclass(world.objectClass, world);
+      TypeMask mask = new TypeMask.subclass(world.objectClass, world);
       return mask.needsNoSuchMethodHandling(selector, world);
     }
     for (TypeMask mask in _masks) {
@@ -76,10 +75,8 @@
  * yield conservative answers that contain too many classes.
  */
 abstract class TypeMask implements ReceiverConstraint, AbstractValue {
-  factory TypeMask(ClassElement base,
-                   int kind,
-                   bool isNullable,
-                   ClassWorld classWorld) {
+  factory TypeMask(
+      ClassElement base, int kind, bool isNullable, ClassWorld classWorld) {
     return new FlatTypeMask.normalized(
         base, (kind << 1) | (isNullable ? 1 : 0), classWorld);
   }
@@ -89,7 +86,7 @@
   factory TypeMask.exact(ClassElement base, ClassWorld classWorld) {
     assert(invariant(base, classWorld.isInstantiated(base),
         message: () => "Cannot create exact type mask for uninstantiated "
-                       "class $base.\n${classWorld.dump(base)}"));
+            "class $base.\n${classWorld.dump(base)}"));
     return new FlatTypeMask.exact(base);
   }
 
@@ -101,7 +98,7 @@
   factory TypeMask.subclass(ClassElement base, ClassWorld classWorld) {
     assert(invariant(base, classWorld.isInstantiated(base),
         message: () => "Cannot create subclass type mask for uninstantiated "
-                       "class $base.\n${classWorld.dump(base)}"));
+            "class $base.\n${classWorld.dump(base)}"));
     ClassElement topmost = classWorld.getLubOfInstantiatedSubclasses(base);
     if (topmost == null) {
       return new TypeMask.empty();
@@ -132,12 +129,12 @@
   factory TypeMask.nonNullExact(ClassElement base, ClassWorld classWorld) {
     assert(invariant(base, classWorld.isInstantiated(base),
         message: () => "Cannot create exact type mask for uninstantiated "
-                       "class $base.\n${classWorld.dump(base)}"));
+            "class $base.\n${classWorld.dump(base)}"));
     return new FlatTypeMask.nonNullExact(base);
   }
 
-  factory TypeMask.nonNullExactOrEmpty(ClassElement base,
-      ClassWorld classWorld) {
+  factory TypeMask.nonNullExactOrEmpty(
+      ClassElement base, ClassWorld classWorld) {
     if (classWorld.isInstantiated(base)) {
       return new FlatTypeMask.nonNullExact(base);
     }
@@ -147,7 +144,7 @@
   factory TypeMask.nonNullSubclass(ClassElement base, ClassWorld classWorld) {
     assert(invariant(base, classWorld.isInstantiated(base),
         message: () => "Cannot create subclass type mask for uninstantiated "
-                       "class $base.\n${classWorld.dump(base)}"));
+            "class $base.\n${classWorld.dump(base)}"));
     ClassElement topmost = classWorld.getLubOfInstantiatedSubclasses(base);
     if (topmost == null) {
       return new TypeMask.nonNullEmpty();
@@ -204,7 +201,7 @@
   static String getNotNormalizedReason(TypeMask mask, ClassWorld classWorld) {
     mask = nonForwardingMask(mask);
     if (mask is FlatTypeMask) {
-      if (mask.isEmpty) return null;
+      if (mask.isEmptyOrNull) return null;
       if (mask.isExact) {
         if (!classWorld.isInstantiated(mask.base)) {
           return 'Exact ${mask.base} is not instantiated.';
@@ -247,8 +244,20 @@
    */
   TypeMask nonNullable();
 
+  /// Whether nothing matches this mask, not even null.
   bool get isEmpty;
+
+  /// Whether null is a valid value of this mask.
   bool get isNullable;
+
+  /// Whether the only possible value in this mask is Null.
+  bool get isNull;
+
+  /// Whether [isEmpty] or [isNull] is true.
+  bool get isEmptyOrNull;
+
+  /// Whether this mask only includes instances of an exact class, and none of
+  /// it's subclasses or subtypes.
   bool get isExact;
 
   /// Returns true if this mask is a union type.
@@ -285,7 +294,7 @@
    * Note: This may differ from semantic equality in the set containment sense.
    *   Use [containsMask] and [isInMask] for that, instead.
    */
-  bool operator==(other);
+  bool operator ==(other);
 
   /**
    * If this returns `true`, [other] is guaranteed to be a supertype of this
@@ -329,7 +338,6 @@
    */
   TypeMask union(TypeMask other, ClassWorld classWorld);
 
-
   /// Returns whether the intersection of this and [other] is empty.
   bool isDisjoint(TypeMask other, ClassWorld classWorld);
 
@@ -351,7 +359,5 @@
    */
   // TODO(johnniwinther): Move this method to [World].
   Element locateSingleElement(
-      Selector selector,
-      TypeMask mask,
-      Compiler compiler);
+      Selector selector, TypeMask mask, Compiler compiler);
 }
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index b9e5969..fcaf762 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -5,31 +5,23 @@
 library types;
 
 import '../common.dart';
-import '../common/backend_api.dart' show
-    Backend;
-import '../common/tasks.dart' show
-    CompilerTask;
-import '../compiler.dart' show
-    Compiler;
-import '../constants/values.dart' show
-    PrimitiveConstantValue;
+import '../common/backend_api.dart' show Backend;
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart' show PrimitiveConstantValue;
 import '../elements/elements.dart';
-import '../inferrer/type_graph_inferrer.dart' show
-    TypeGraphInferrer;
+import '../inferrer/type_graph_inferrer.dart' show TypeGraphInferrer;
 import '../tree/tree.dart';
 import '../util/util.dart';
-import '../universe/selector.dart' show
-    Selector;
-import '../universe/universe.dart' show
-    ReceiverConstraint,
-    UniverseSelectorConstraints,
-    SelectorConstraintsStrategy;
-import '../world.dart' show
-    ClassWorld,
-    World;
+import '../universe/selector.dart' show Selector;
+import '../universe/universe.dart'
+    show
+        ReceiverConstraint,
+        UniverseSelectorConstraints,
+        SelectorConstraintsStrategy;
+import '../world.dart' show ClassWorld, World;
 
-import 'abstract_value_domain.dart' show
-    AbstractValue;
+import 'abstract_value_domain.dart' show AbstractValue;
 
 part 'container_type_mask.dart';
 part 'dictionary_type_mask.dart';
@@ -58,9 +50,6 @@
  * The types task infers guaranteed types globally.
  */
 class TypesTask extends CompilerTask {
-  static final bool DUMP_BAD_CPA_RESULTS = false;
-  static final bool DUMP_GOOD_CPA_RESULTS = false;
-
   final String name = 'Type inference';
   final ClassWorld classWorld;
   TypesInferrer typesInferrer;
@@ -280,12 +269,6 @@
   /** Computes the intersection of [type1] and [type2] */
   TypeMask intersection(TypeMask type1, TypeMask type2, element) {
     TypeMask result = _intersection(type1, type2);
-    if (DUMP_BAD_CPA_RESULTS && better(type1, type2)) {
-      print("CPA is worse for $element: $type1 /\\ $type2 = $result");
-    }
-    if (DUMP_GOOD_CPA_RESULTS && better(type2, type1)) {
-      print("CPA is better for $element: $type1 /\\ $type2 = $result");
-    }
     return result;
   }
 
@@ -293,12 +276,11 @@
   bool better(TypeMask type1, TypeMask type2) {
     if (type1 == null) return false;
     if (type2 == null) {
-      return (type1 != null) &&
-             (type1 != dynamicType);
+      return (type1 != null) && (type1 != dynamicType);
     }
     return (type1 != type2) &&
-           type2.containsMask(type1, classWorld) &&
-           !type1.containsMask(type2, classWorld);
+        type2.containsMask(type1, classWorld) &&
+        !type1.containsMask(type2, classWorld);
   }
 
   /**
@@ -307,35 +289,30 @@
   void onResolutionComplete(Element mainElement) {
     measure(() {
       typesInferrer.analyzeMain(mainElement);
+      typesInferrer.clear();
     });
-    typesInferrer.clear();
   }
 
   /**
    * Return the (inferred) guaranteed type of [element] or null.
    */
   TypeMask getGuaranteedTypeOfElement(Element element) {
-    return measure(() {
-      // TODO(24489): trust some JsInterop types.
-      if (compiler.backend.isJsInterop(element)) {
-        return dynamicType;
-      }
-      TypeMask guaranteedType = typesInferrer.getTypeOfElement(element);
-      return guaranteedType;
-    });
+    // TODO(24489): trust some JsInterop types.
+    if (compiler.backend.isJsInterop(element)) {
+      return dynamicType;
+    }
+    TypeMask guaranteedType = typesInferrer.getTypeOfElement(element);
+    return guaranteedType;
   }
 
   TypeMask getGuaranteedReturnTypeOfElement(Element element) {
-    return measure(() {
-      // TODO(24489): trust some JsInterop types.
-      if (compiler.backend.isJsInterop(element)) {
-        return dynamicType;
-      }
+    // TODO(24489): trust some JsInterop types.
+    if (compiler.backend.isJsInterop(element)) {
+      return dynamicType;
+    }
 
-      TypeMask guaranteedType =
-          typesInferrer.getReturnTypeOfElement(element);
-      return guaranteedType;
-    });
+    TypeMask guaranteedType = typesInferrer.getReturnTypeOfElement(element);
+    return guaranteedType;
   }
 
   /**
@@ -343,20 +320,15 @@
    * [node] must be an AST node of [owner].
    */
   TypeMask getGuaranteedTypeOfNode(owner, node) {
-    return measure(() {
-      TypeMask guaranteedType = typesInferrer.getTypeOfNode(owner, node);
-      return guaranteedType;
-    });
+    TypeMask guaranteedType = typesInferrer.getTypeOfNode(owner, node);
+    return guaranteedType;
   }
 
   /**
    * Return the (inferred) guaranteed type of [selector] or null.
    */
   TypeMask getGuaranteedTypeOfSelector(Selector selector, TypeMask mask) {
-    return measure(() {
-      TypeMask guaranteedType =
-          typesInferrer.getTypeOfSelector(selector, mask);
-      return guaranteedType;
-    });
+    TypeMask guaranteedType = typesInferrer.getTypeOfSelector(selector, mask);
+    return guaranteedType;
   }
 }
diff --git a/pkg/compiler/lib/src/types/union_type_mask.dart b/pkg/compiler/lib/src/types/union_type_mask.dart
index 6166349..f05880a 100644
--- a/pkg/compiler/lib/src/types/union_type_mask.dart
+++ b/pkg/compiler/lib/src/types/union_type_mask.dart
@@ -20,7 +20,8 @@
   }
 
   static TypeMask unionOf(Iterable<TypeMask> masks, ClassWorld classWorld) {
-    assert(masks.every((mask) => TypeMask.assertIsNormalized(mask, classWorld)));
+    assert(
+        masks.every((mask) => TypeMask.assertIsNormalized(mask, classWorld)));
     List<FlatTypeMask> disjoint = <FlatTypeMask>[];
     unionOfHelper(masks, disjoint, classWorld);
     if (disjoint.isEmpty) return new TypeMask.nonNullEmpty();
@@ -34,8 +35,7 @@
   }
 
   static void unionOfHelper(Iterable<TypeMask> masks,
-                            List<FlatTypeMask> disjoint,
-                            ClassWorld classWorld) {
+      List<FlatTypeMask> disjoint, ClassWorld classWorld) {
     // TODO(johnniwinther): Impose an order on the mask to ensure subclass masks
     // are preferred to subtype masks.
     for (TypeMask mask in masks) {
@@ -43,7 +43,7 @@
       if (mask.isUnion) {
         UnionTypeMask union = mask;
         unionOfHelper(union.disjointMasks, disjoint, classWorld);
-      } else if (mask.isEmpty && !mask.isNullable) {
+      } else if (mask.isEmpty) {
         continue;
       } else {
         FlatTypeMask flatMask = mask;
@@ -103,7 +103,8 @@
     int bestKind;
     int bestSize;
     for (ClassElement candidate in candidates) {
-      bool isInstantiatedStrictSubclass(cls) => cls != candidate &&
+      bool isInstantiatedStrictSubclass(cls) =>
+          cls != candidate &&
           classWorld.isDirectlyInstantiated(cls) &&
           classWorld.isSubclassOf(cls, candidate);
 
@@ -138,8 +139,7 @@
     other = TypeMask.nonForwardingMask(other);
     if (!other.isUnion && disjointMasks.contains(other)) return this;
 
-    List<FlatTypeMask> newList =
-        new List<FlatTypeMask>.from(disjointMasks);
+    List<FlatTypeMask> newList = new List<FlatTypeMask>.from(disjointMasks);
     if (!other.isUnion) {
       newList.add(other);
     } else {
@@ -192,7 +192,9 @@
     return new UnionTypeMask._internal(newIterable);
   }
 
+  bool get isEmptyOrNull => false;
   bool get isEmpty => false;
+  bool get isNull => false;
   bool get isNullable => disjointMasks.any((e) => e.isNullable);
   bool get isExact => false;
   bool get isUnion => true;
@@ -320,17 +322,16 @@
   ClassElement singleClass(ClassWorld classWorld) => null;
 
   bool needsNoSuchMethodHandling(Selector selector, ClassWorld classWorld) {
-    return disjointMasks.any(
-        (e) => e.needsNoSuchMethodHandling(selector, classWorld));
+    return disjointMasks
+        .any((e) => e.needsNoSuchMethodHandling(selector, classWorld));
   }
 
   bool canHit(Element element, Selector selector, ClassWorld classWorld) {
     return disjointMasks.any((e) => e.canHit(element, selector, classWorld));
   }
 
-  Element locateSingleElement(Selector selector,
-                              TypeMask mask,
-                              Compiler compiler) {
+  Element locateSingleElement(
+      Selector selector, TypeMask mask, Compiler compiler) {
     Element candidate;
     for (FlatTypeMask mask in disjointMasks) {
       Element current = mask.locateSingleElement(selector, mask, compiler);
@@ -346,12 +347,13 @@
   }
 
   String toString() {
-    String masksString = (disjointMasks.map((TypeMask mask) => mask.toString())
-        .toList()..sort()).join(", ");
+    String masksString =
+        (disjointMasks.map((TypeMask mask) => mask.toString()).toList()..sort())
+            .join(", ");
     return 'Union of [$masksString]';
   }
 
-  bool operator==(other) {
+  bool operator ==(other) {
     if (identical(this, other)) return true;
 
     bool containsAll() {
@@ -361,10 +363,10 @@
       });
     }
 
-    return other is UnionTypeMask
-        && other.isNullable == isNullable
-        && other.disjointMasks.length == disjointMasks.length
-        && containsAll();
+    return other is UnionTypeMask &&
+        other.isNullable == isNullable &&
+        other.disjointMasks.length == disjointMasks.length &&
+        containsAll();
   }
 
   int get hashCode {
diff --git a/pkg/compiler/lib/src/types/value_type_mask.dart b/pkg/compiler/lib/src/types/value_type_mask.dart
index 72c5af2..ba40f24 100644
--- a/pkg/compiler/lib/src/types/value_type_mask.dart
+++ b/pkg/compiler/lib/src/types/value_type_mask.dart
@@ -11,9 +11,7 @@
   ValueTypeMask(this.forwardTo, this.value);
 
   TypeMask nullable() {
-    return isNullable
-        ? this
-        : new ValueTypeMask(forwardTo.nullable(), value);
+    return isNullable ? this : new ValueTypeMask(forwardTo.nullable(), value);
   }
 
   TypeMask nonNullable() {
@@ -31,13 +29,11 @@
 
   TypeMask intersection(TypeMask other, ClassWorld classWorld) {
     TypeMask forwardIntersection = forwardTo.intersection(other, classWorld);
-    if (forwardIntersection.isEmpty) return forwardIntersection;
-    return forwardIntersection.isNullable
-        ? nullable()
-        : nonNullable();
+    if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
+    return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
-  bool operator==(other) => super == other;
+  bool operator ==(other) => super == other;
 
   int get hashCode {
     return computeHashCode(value, isNullable, forwardTo);
@@ -46,4 +42,4 @@
   String toString() {
     return 'Value mask: [${value.unparse()}] type: $forwardTo';
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/universe/call_structure.dart b/pkg/compiler/lib/src/universe/call_structure.dart
index 727390a..fb9c908 100644
--- a/pkg/compiler/lib/src/universe/call_structure.dart
+++ b/pkg/compiler/lib/src/universe/call_structure.dart
@@ -5,16 +5,12 @@
 library dart2js.call_structure;
 
 import '../common.dart';
-import '../common/names.dart' show
-    Identifiers,
-    Names,
-    Selectors;
+import '../common/names.dart' show Identifiers, Names, Selectors;
 import '../elements/elements.dart';
 import '../tree/tree.dart';
 import '../util/util.dart';
 
-import 'selector.dart' show
-    Selector;
+import 'selector.dart' show Selector;
 
 /// The structure of the arguments at a call-site.
 // TODO(johnniwinther): Should these be cached?
@@ -64,9 +60,9 @@
 
   bool match(CallStructure other) {
     if (identical(this, other)) return true;
-    return this.argumentCount == other.argumentCount
-        && this.namedArgumentCount == other.namedArgumentCount
-        && sameNames(this.namedArguments, other.namedArguments);
+    return this.argumentCount == other.argumentCount &&
+        this.namedArgumentCount == other.namedArgumentCount &&
+        sameNames(this.namedArguments, other.namedArguments);
   }
 
   // TODO(johnniwinther): Cache hash code?
@@ -180,7 +176,7 @@
    * Returns [:true:] if the signature of the [caller] matches the
    * signature of the [callee], [:false:] otherwise.
    */
-  static /*<T>*/ bool addForwardingElementArgumentsToList(
+  static/*<T>*/ bool addForwardingElementArgumentsToList(
       ConstructorElement caller,
       List/*<T>*/ list,
       ConstructorElement callee,
@@ -188,7 +184,7 @@
       /*T*/ compileConstant(ParameterElement element)) {
     assert(invariant(caller, !callee.isMalformed,
         message: "Cannot compute arguments to malformed constructor: "
-                 "$caller calling $callee."));
+            "$caller calling $callee."));
 
     FunctionSignature signature = caller.functionSignature;
     Map<Node, ParameterElement> mapping = <Node, ParameterElement>{};
@@ -236,10 +232,7 @@
       return false;
     }
     list.addAll(callStructure.makeArgumentsList(
-        nodes,
-        callee,
-        internalCompileArgument,
-        compileConstant));
+        nodes, callee, internalCompileArgument, compileConstant));
 
     return true;
   }
diff --git a/pkg/compiler/lib/src/universe/class_set.dart b/pkg/compiler/lib/src/universe/class_set.dart
index 3790a03..038d757 100644
--- a/pkg/compiler/lib/src/universe/class_set.dart
+++ b/pkg/compiler/lib/src/universe/class_set.dart
@@ -4,15 +4,10 @@
 
 library dart2js.world.class_set;
 
-import 'dart:collection' show
-    IterableBase;
-import '../common.dart';
-import '../elements/elements.dart' show
-    ClassElement;
-import '../util/enumset.dart' show
-    EnumSet;
-import '../util/util.dart' show
-    Link;
+import 'dart:collection' show IterableBase;
+import '../elements/elements.dart' show ClassElement;
+import '../util/enumset.dart' show EnumSet;
+import '../util/util.dart' show Link;
 
 /// Enum for the different kinds of instantiation of a class.
 enum Instantiation {
@@ -51,11 +46,10 @@
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
   static final EnumSet<Instantiation> INSTANTIATED =
-      new EnumSet<Instantiation>.fromValues(
-          const <Instantiation>[
-              Instantiation.DIRECTLY_INSTANTIATED,
-              Instantiation.INDIRECTLY_INSTANTIATED],
-          fixed: true);
+      new EnumSet<Instantiation>.fromValues(const <Instantiation>[
+    Instantiation.DIRECTLY_INSTANTIATED,
+    Instantiation.INDIRECTLY_INSTANTIATED
+  ], fixed: true);
 
   /// Enum set for selecting directly instantiated classes in
   /// [ClassHierarchyNode.subclassesByMask],
@@ -69,17 +63,15 @@
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
   static final EnumSet<Instantiation> ALL =
-      new EnumSet<Instantiation>.fromValues(
-          Instantiation.values,
-          fixed: true);
+      new EnumSet<Instantiation>.fromValues(Instantiation.values, fixed: true);
 
   /// Creates an enum set for selecting the returned classes in
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
   static EnumSet<Instantiation> createMask(
       {bool includeDirectlyInstantiated: true,
-       bool includeIndirectlyInstantiated: true,
-       bool includeUninstantiated: true}) {
+      bool includeIndirectlyInstantiated: true,
+      bool includeUninstantiated: true}) {
     EnumSet<Instantiation> mask = new EnumSet<Instantiation>();
     if (includeDirectlyInstantiated) {
       mask.add(Instantiation.DIRECTLY_INSTANTIATED);
@@ -95,9 +87,8 @@
 
   final ClassHierarchyNode parentNode;
   final ClassElement cls;
-  final EnumSet<Instantiation> _mask =
-      new EnumSet<Instantiation>.fromValues(
-          const <Instantiation>[Instantiation.UNINSTANTIATED]);
+  final EnumSet<Instantiation> _mask = new EnumSet<Instantiation>.fromValues(
+      const <Instantiation>[Instantiation.UNINSTANTIATED]);
 
   ClassElement _leastUpperInstantiatedSubclass;
   int _instantiatedSubclassCount = 0;
@@ -182,6 +173,8 @@
     _directSubclasses = _directSubclasses.prepend(subclass);
   }
 
+  Iterable<ClassHierarchyNode> get directSubclasses => _directSubclasses;
+
   /// Returns `true` if [other] is contained in the subtree of this node.
   ///
   /// This means that [other] is a subclass of [cls].
@@ -202,11 +195,9 @@
   /// Subclasses are included if their instantiation properties intersect with
   /// their corresponding [Instantiation] values in [mask]. If [strict] is
   /// `true`, [cls] itself is _not_ returned.
-  Iterable<ClassElement> subclassesByMask(
-      EnumSet<Instantiation> mask,
+  Iterable<ClassElement> subclassesByMask(EnumSet<Instantiation> mask,
       {bool strict: false}) {
-    return new ClassHierarchyNodeIterable(
-        this, mask, includeRoot: !strict);
+    return new ClassHierarchyNodeIterable(this, mask, includeRoot: !strict);
   }
 
   /// Applies [predicate] to each subclass of [cls] matching the criteria
@@ -217,14 +208,12 @@
   /// intersect with their corresponding [Instantiation] values in [mask]. If
   /// [strict] is `true`, [predicate] is _not_ called on [cls] itself.
   bool anySubclass(
-      bool predicate(ClassElement cls),
-      EnumSet<Instantiation> mask,
+      bool predicate(ClassElement cls), EnumSet<Instantiation> mask,
       {bool strict: false}) {
-
-    ForEach wrapper(ClassElement cls) {
-      return predicate(cls) ? ForEach.STOP : ForEach.CONTINUE;
+    IterationStep wrapper(ClassElement cls) {
+      return predicate(cls) ? IterationStep.STOP : IterationStep.CONTINUE;
     }
-    return forEachSubclass(wrapper, mask, strict: strict) == ForEach.STOP;
+    return forEachSubclass(wrapper, mask, strict: strict) == IterationStep.STOP;
   }
 
   /// Applies [f] to each subclass of [cls] matching the criteria specified by
@@ -241,31 +230,29 @@
   /// continues. The return value of the function is either [ForEach.STOP], if
   /// visitation was stopped, or [ForEach.CONTINUE] if visitation continued to
   /// the end.
-  ForEach forEachSubclass(
-      ForEachFunction f,
-      EnumSet<Instantiation> mask,
+  IterationStep forEachSubclass(ForEachFunction f, EnumSet<Instantiation> mask,
       {bool strict: false}) {
-    ForEach forEach;
+    IterationStep nextStep;
     if (!strict && mask.intersects(_mask)) {
-      forEach = f(cls);
+      nextStep = f(cls);
     }
     // Interpret `forEach == null` as `forEach == ForEach.CONTINUE`.
-    forEach ??= ForEach.CONTINUE;
+    nextStep ??= IterationStep.CONTINUE;
 
-    if (forEach == ForEach.CONTINUE) {
+    if (nextStep == IterationStep.CONTINUE) {
       if (mask.contains(Instantiation.UNINSTANTIATED) || isInstantiated) {
         for (ClassHierarchyNode subclass in _directSubclasses) {
-          ForEach subForEach = subclass.forEachSubclass(f, mask);
-          if (subForEach == ForEach.STOP) {
+          IterationStep subForEach = subclass.forEachSubclass(f, mask);
+          if (subForEach == IterationStep.STOP) {
             return subForEach;
           }
         }
       }
     }
-    if (forEach == ForEach.STOP) {
-      return forEach;
+    if (nextStep == IterationStep.STOP) {
+      return nextStep;
     }
-    return ForEach.CONTINUE;
+    return IterationStep.CONTINUE;
   }
 
   /// Returns the most specific subclass of [cls] (including [cls]) that is
@@ -286,8 +273,8 @@
     }
     ClassHierarchyNode subclass;
     for (Link<ClassHierarchyNode> link = _directSubclasses;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       if (link.head.isInstantiated) {
         if (subclass == null) {
           subclass = link.head;
@@ -303,10 +290,9 @@
   }
 
   void printOn(StringBuffer sb, String indentation,
-               {bool instantiatedOnly: false,
-                bool sorted: true,
-                ClassElement withRespectTo}) {
-
+      {bool instantiatedOnly: false,
+      bool sorted: true,
+      ClassElement withRespectTo}) {
     bool isRelatedTo(ClassElement subclass) {
       return subclass == withRespectTo ||
           subclass.implementsInterface(withRespectTo);
@@ -329,9 +315,10 @@
     } else {
       var subclasses = _directSubclasses;
       if (sorted) {
-        subclasses = _directSubclasses.toList()..sort((a, b) {
-          return a.cls.name.compareTo(b.cls.name);
-        });
+        subclasses = _directSubclasses.toList()
+          ..sort((a, b) {
+            return a.cls.name.compareTo(b.cls.name);
+          });
       }
       bool needsComma = false;
       for (ClassHierarchyNode child in subclasses) {
@@ -347,9 +334,7 @@
         } else {
           sb.write('\n');
         }
-        child.printOn(
-            sb,
-            '$indentation  ',
+        child.printOn(sb, '$indentation  ',
             instantiatedOnly: instantiatedOnly,
             sorted: sorted,
             withRespectTo: withRespectTo);
@@ -364,13 +349,13 @@
     }
   }
 
-  String dump({String indentation: '',
-               bool instantiatedOnly: false,
-               ClassElement withRespectTo}) {
+  String dump(
+      {String indentation: '',
+      bool instantiatedOnly: false,
+      ClassElement withRespectTo}) {
     StringBuffer sb = new StringBuffer();
     printOn(sb, indentation,
-        instantiatedOnly: instantiatedOnly,
-        withRespectTo: withRespectTo);
+        instantiatedOnly: instantiatedOnly, withRespectTo: withRespectTo);
     return sb.toString();
   }
 
@@ -425,7 +410,23 @@
   final ClassHierarchyNode node;
   ClassElement _leastUpperInstantiatedSubtype;
 
-  List<ClassHierarchyNode> _directSubtypes;
+  /// A list of the class hierarchy nodes for the subtypes that declare a
+  /// subtype relationship to [cls] either directly or indirectly.
+  ///
+  /// For instance
+  ///
+  ///     class A {}
+  ///     class B extends A {}
+  ///     class C implements B {}
+  ///     class D implements A {}
+  ///     class E extends D {}
+  ///
+  /// The class hierarchy nodes for classes `C` and `D` are in [_subtypes]. `C`
+  /// because it implements `A` through `B` and `D` because it implements `A`
+  /// directly. `E` also implements `A` through its extension of `D` and it is
+  /// therefore included through the class hierarchy node for `D`.
+  ///
+  List<ClassHierarchyNode> _subtypes;
 
   ClassSet(this.node);
 
@@ -434,8 +435,8 @@
   /// Returns the number of directly instantiated subtypes of [cls].
   int get instantiatedSubtypeCount {
     int count = node.instantiatedSubclassCount;
-    if (_directSubtypes != null) {
-      for (ClassHierarchyNode subtypeNode in _directSubtypes) {
+    if (_subtypes != null) {
+      for (ClassHierarchyNode subtypeNode in _subtypes) {
         if (subtypeNode.isDirectlyInstantiated) {
           count++;
         }
@@ -448,8 +449,8 @@
   /// Returns `true` if all instantiated subtypes of [cls] are subclasses of
   /// [cls].
   bool get hasOnlyInstantiatedSubclasses {
-    if (_directSubtypes != null) {
-      for (ClassHierarchyNode subtypeNode in _directSubtypes) {
+    if (_subtypes != null) {
+      for (ClassHierarchyNode subtypeNode in _subtypes) {
         if (subtypeNode.isInstantiated) {
           return false;
         }
@@ -463,8 +464,7 @@
   /// Subclasses are included if their instantiation properties intersect with
   /// their corresponding [Instantiation] values in [mask]. If [strict] is
   /// `true`, [cls] itself is _not_ returned.
-  Iterable<ClassElement> subclassesByMask(
-      EnumSet<Instantiation> mask,
+  Iterable<ClassElement> subclassesByMask(EnumSet<Instantiation> mask,
       {bool strict: false}) {
     return node.subclassesByMask(mask, strict: strict);
   }
@@ -477,12 +477,12 @@
   /// respectively. If [strict] is `true`, [cls] itself is _not_ returned.
   Iterable<ClassElement> subtypes(
       {bool includeDirectlyInstantiated: true,
-       bool includeIndirectlyInstantiated: true,
-       bool includeUninstantiated: true,
-       bool strict: false}) {
+      bool includeIndirectlyInstantiated: true,
+      bool includeUninstantiated: true,
+      bool strict: false}) {
     EnumSet<Instantiation> mask = ClassHierarchyNode.createMask(
         includeDirectlyInstantiated: includeDirectlyInstantiated,
-        includeIndirectlyInstantiated:includeIndirectlyInstantiated,
+        includeIndirectlyInstantiated: includeIndirectlyInstantiated,
         includeUninstantiated: includeUninstantiated);
     return subtypesByMask(mask, strict: strict);
   }
@@ -492,17 +492,13 @@
   /// Subtypes are included if their instantiation properties intersect with
   /// their corresponding [Instantiation] values in [mask]. If [strict] is
   /// `true`, [cls] itself is _not_ returned.
-  Iterable<ClassElement> subtypesByMask(
-      EnumSet<Instantiation> mask,
+  Iterable<ClassElement> subtypesByMask(EnumSet<Instantiation> mask,
       {bool strict: false}) {
-    if (_directSubtypes == null) {
-      return node.subclassesByMask(
-          mask,
-          strict: strict);
+    if (_subtypes == null) {
+      return node.subclassesByMask(mask, strict: strict);
     }
 
-    return new SubtypesIterable.SubtypesIterator(this,
-        mask,
+    return new SubtypesIterable.SubtypesIterator(this, mask,
         includeRoot: !strict);
   }
 
@@ -514,8 +510,7 @@
   /// intersect with their corresponding [Instantiation] values in [mask]. If
   /// [strict] is `true`, [predicate] is _not_ called on [cls] itself.
   bool anySubclass(
-      bool predicate(ClassElement cls),
-      EnumSet<Instantiation> mask,
+      bool predicate(ClassElement cls), EnumSet<Instantiation> mask,
       {bool strict: false}) {
     return node.anySubclass(predicate, mask, strict: strict);
   }
@@ -534,9 +529,7 @@
   /// continues. The return value of the function is either [ForEach.STOP], if
   /// visitation was stopped, or [ForEach.CONTINUE] if visitation continued to
   /// the end.
-  ForEach forEachSubclass(
-      ForEachFunction f,
-      EnumSet<Instantiation> mask,
+  IterationStep forEachSubclass(ForEachFunction f, EnumSet<Instantiation> mask,
       {bool strict: false}) {
     return node.forEachSubclass(f, mask, strict: strict);
   }
@@ -548,15 +541,12 @@
   /// [predicate] is applied to subtypes if their instantiation properties
   /// intersect with their corresponding [Instantiation] values in [mask]. If
   /// [strict] is `true`, [predicate] is _not_ called on [cls] itself.
-  bool anySubtype(
-      bool predicate(ClassElement cls),
-      EnumSet<Instantiation> mask,
+  bool anySubtype(bool predicate(ClassElement cls), EnumSet<Instantiation> mask,
       {bool strict: false}) {
-
-    ForEach wrapper(ClassElement cls) {
-      return predicate(cls) ? ForEach.STOP : ForEach.CONTINUE;
+    IterationStep wrapper(ClassElement cls) {
+      return predicate(cls) ? IterationStep.STOP : IterationStep.CONTINUE;
     }
-    return forEachSubtype(wrapper, mask, strict: strict) == ForEach.STOP;
+    return forEachSubtype(wrapper, mask, strict: strict) == IterationStep.STOP;
   }
 
   /// Applies [f] to each subtype of [cls] matching the criteria specified by
@@ -573,22 +563,20 @@
   /// continues. The return value of the function is either [ForEach.STOP], if
   /// visitation was stopped, or [ForEach.CONTINUE] if visitation continued to
   /// the end.
-  ForEach forEachSubtype(
-      ForEachFunction f,
-      EnumSet<Instantiation> mask,
+  IterationStep forEachSubtype(ForEachFunction f, EnumSet<Instantiation> mask,
       {bool strict: false}) {
-    ForEach forEach = node.forEachSubclass(f, mask, strict: strict);
-    forEach ??= ForEach.CONTINUE;
-    if (forEach == ForEach.CONTINUE && _directSubtypes != null) {
-      for (ClassHierarchyNode subclass in _directSubtypes) {
-        ForEach subForEach = subclass.forEachSubclass(f, mask);
-        if (subForEach == ForEach.STOP) {
+    IterationStep nextStep =
+        node.forEachSubclass(f, mask, strict: strict) ?? IterationStep.CONTINUE;
+    if (nextStep == IterationStep.CONTINUE && _subtypes != null) {
+      for (ClassHierarchyNode subclass in _subtypes) {
+        IterationStep subForEach = subclass.forEachSubclass(f, mask);
+        if (subForEach == IterationStep.STOP) {
           return subForEach;
         }
       }
     }
-    assert(forEach != ForEach.SKIP_SUBCLASSES);
-    return forEach;
+    assert(nextStep != IterationStep.SKIP_SUBCLASSES);
+    return nextStep;
   }
 
   /// Adds [subtype] as a subtype of [cls].
@@ -596,13 +584,13 @@
     if (node.contains(subtype.cls)) {
       return;
     }
-    if (_directSubtypes == null) {
-      _directSubtypes = <ClassHierarchyNode>[subtype];
+    if (_subtypes == null) {
+      _subtypes = <ClassHierarchyNode>[subtype];
     } else {
       int hierarchyDepth = subtype.cls.hierarchyDepth;
       List<ClassHierarchyNode> newSubtypes = <ClassHierarchyNode>[];
       bool added = false;
-      for (ClassHierarchyNode otherSubtype in _directSubtypes) {
+      for (ClassHierarchyNode otherSubtype in _subtypes) {
         int otherHierarchyDepth = otherSubtype.cls.hierarchyDepth;
         if (hierarchyDepth == otherHierarchyDepth) {
           if (subtype == otherSubtype) {
@@ -637,7 +625,7 @@
       if (!added) {
         newSubtypes.add(subtype);
       }
-      _directSubtypes = newSubtypes;
+      _subtypes = newSubtypes;
     }
   }
 
@@ -655,14 +643,14 @@
     if (node.isDirectlyInstantiated) {
       return cls;
     }
-    if (_directSubtypes == null) {
+    if (_subtypes == null) {
       return node.getLubOfInstantiatedSubclasses();
     }
     ClassHierarchyNode subtype;
     if (node.isInstantiated) {
       subtype = node;
     }
-    for (ClassHierarchyNode subnode in _directSubtypes) {
+    for (ClassHierarchyNode subnode in _subtypes) {
       if (subnode.isInstantiated) {
         if (subtype == null) {
           subtype = subnode;
@@ -682,8 +670,8 @@
     sb.write('[\n');
     node.printOn(sb, '  ');
     sb.write('\n');
-    if (_directSubtypes != null) {
-      for (ClassHierarchyNode node in _directSubtypes) {
+    if (_subtypes != null) {
+      for (ClassHierarchyNode node in _subtypes) {
         node.printOn(sb, '  ');
         sb.write('\n');
       }
@@ -699,10 +687,7 @@
   final EnumSet<Instantiation> mask;
   final bool includeRoot;
 
-  ClassHierarchyNodeIterable(
-      this.root,
-      this.mask,
-      {this.includeRoot: true}) {
+  ClassHierarchyNodeIterable(this.root, this.mask, {this.includeRoot: true}) {
     if (root == null) throw new StateError("No root for iterable.");
   }
 
@@ -776,8 +761,8 @@
         continue;
       }
       for (Link<ClassHierarchyNode> link = currentNode._directSubclasses;
-           !link.isEmpty;
-           link = link.tail) {
+          !link.isEmpty;
+          link = link.tail) {
         stack = stack.prepend(link.head);
       }
       if (_isValid(currentNode)) {
@@ -799,9 +784,7 @@
   final EnumSet<Instantiation> mask;
   final bool includeRoot;
 
-  SubtypesIterable.SubtypesIterator(
-      this.subtypeSet,
-      this.mask,
+  SubtypesIterable.SubtypesIterator(this.subtypeSet, this.mask,
       {this.includeRoot: true});
 
   @override
@@ -832,16 +815,16 @@
   bool moveNext() {
     if (elements == null && hierarchyNodes == null) {
       // Initial state. Iterate through subclasses.
-      elements = iterable.subtypeSet.node.subclassesByMask(
-          mask,
-          strict: !includeRoot).iterator;
+      elements = iterable.subtypeSet.node
+          .subclassesByMask(mask, strict: !includeRoot)
+          .iterator;
     }
     if (elements != null && elements.moveNext()) {
       return true;
     }
     if (hierarchyNodes == null) {
       // Start iterating through subtypes.
-      hierarchyNodes = iterable.subtypeSet._directSubtypes.iterator;
+      hierarchyNodes = iterable.subtypeSet._subtypes.iterator;
     }
     while (hierarchyNodes.moveNext()) {
       elements = hierarchyNodes.current.subclassesByMask(mask).iterator;
@@ -856,11 +839,13 @@
 /// Enum values returned from the [ForEachFunction] provided to the `forEachX`
 /// functions of [ClassHierarchyNode] and [ClassSet]. The value is used to
 /// control the continued iteration.
-enum ForEach {
+enum IterationStep {
   /// Iteration continues.
   CONTINUE,
+
   /// Iteration stops immediately.
   STOP,
+
   /// Iteration skips the subclasses of the current class.
   SKIP_SUBCLASSES,
 }
@@ -868,4 +853,4 @@
 /// Visiting function used for the `forEachX` functions of [ClassHierarchyNode]
 /// and [ClassSet]. The return value controls the continued iteration. If `null`
 /// is returned, iteration continues to the end.
-typedef ForEach ForEachFunction(ClassElement cls);
+typedef IterationStep ForEachFunction(ClassElement cls);
diff --git a/pkg/compiler/lib/src/universe/function_set.dart b/pkg/compiler/lib/src/universe/function_set.dart
index 27273341..c225b15 100644
--- a/pkg/compiler/lib/src/universe/function_set.dart
+++ b/pkg/compiler/lib/src/universe/function_set.dart
@@ -4,37 +4,27 @@
 
 library universe.function_set;
 
-import '../common/names.dart' show
-    Identifiers,
-    Selectors;
-import '../compiler.dart' show
-    Compiler;
+import '../common/names.dart' show Identifiers, Selectors;
+import '../compiler.dart' show Compiler;
 import '../elements/elements.dart';
 import '../types/types.dart';
-import '../util/util.dart' show
-    Hashing,
-    Setlet;
-import '../world.dart' show
-    ClassWorld;
+import '../util/util.dart' show Hashing, Setlet;
+import '../world.dart' show ClassWorld;
 
-import 'selector.dart' show
-    Selector;
-import 'universe.dart' show
-    ReceiverConstraint;
+import 'selector.dart' show Selector;
+import 'universe.dart' show ReceiverConstraint;
 
 // TODO(kasperl): This actually holds getters and setters just fine
 // too and stricly they aren't functions. Maybe this needs a better
 // name -- something like ElementSet seems a bit too generic.
 class FunctionSet {
   final Compiler compiler;
-  final Map<String, FunctionSetNode> nodes =
-      new Map<String, FunctionSetNode>();
+  final Map<String, FunctionSetNode> nodes = new Map<String, FunctionSetNode>();
   FunctionSet(this.compiler);
 
   ClassWorld get classWorld => compiler.world;
 
-  FunctionSetNode newNode(String name)
-      => new FunctionSetNode(name);
+  FunctionSetNode newNode(String name) => new FunctionSetNode(name);
 
   void add(Element element) {
     assert(element.isInstanceMember);
@@ -59,9 +49,7 @@
     assert(!element.isAbstract);
     String name = element.name;
     FunctionSetNode node = nodes[name];
-    return (node != null)
-        ? node.contains(element)
-        : false;
+    return (node != null) ? node.contains(element) : false;
   }
 
   /// Returns an object that allows iterating over all the functions
@@ -216,10 +204,8 @@
 
   /// Returns the set of functions that can be the target of [selectorMask]
   /// including no such method handling where applicable.
-  FunctionSetQuery query(SelectorMask selectorMask,
-                         ClassWorld classWorld,
-                         [FunctionSetNode noSuchMethods,
-                          SelectorMask noSuchMethodMask]) {
+  FunctionSetQuery query(SelectorMask selectorMask, ClassWorld classWorld,
+      [FunctionSetNode noSuchMethods, SelectorMask noSuchMethodMask]) {
     assert(selectorMask.name == name);
     FunctionSetQuery result = cache[selectorMask];
     if (result != null) return result;
@@ -293,12 +279,11 @@
   TypeMask computeMask(ClassWorld classWorld) {
     assert(classWorld.hasAnyStrictSubclass(classWorld.objectClass));
     if (_mask != null) return _mask;
-    return _mask = new TypeMask.unionOf(functions
-        .expand((element) {
+    return _mask = new TypeMask.unionOf(
+        functions.expand((element) {
           ClassElement cls = element.enclosingClass;
           return [cls]..addAll(classWorld.mixinUsesOf(cls));
-        })
-        .map((cls) {
+        }).map((cls) {
           if (classWorld.backend.isNullImplementation(cls)) {
             return const TypeMask.empty();
           } else if (classWorld.isInstantiated(cls.declaration)) {
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index f8a44e6..a76db34 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -5,23 +5,20 @@
 library dart2js.selector;
 
 import '../common.dart';
-import '../common/names.dart' show
-    Names;
-import '../elements/elements.dart' show
-    Element,
-    Elements,
-    FunctionElement,
-    FunctionSignature,
-    Name,
-    LibraryElement,
-    PublicName;
-import '../util/util.dart' show
-    Hashing;
-import '../world.dart' show
-    World;
+import '../common/names.dart' show Names;
+import '../elements/elements.dart'
+    show
+        Element,
+        Elements,
+        FunctionElement,
+        FunctionSignature,
+        Name,
+        LibraryElement,
+        PublicName;
+import '../util/util.dart' show Hashing;
+import '../world.dart' show World;
 
-import 'call_structure.dart' show
-    CallStructure;
+import 'call_structure.dart' show CallStructure;
 
 class SelectorKind {
   final String name;
@@ -34,7 +31,17 @@
   static const SelectorKind OPERATOR = const SelectorKind('operator', 3);
   static const SelectorKind INDEX = const SelectorKind('index', 4);
 
+  int get index => hashCode;
+
   String toString() => name;
+
+  static List<SelectorKind> values = const <SelectorKind>[
+    GETTER,
+    SETTER,
+    CALL,
+    OPERATOR,
+    INDEX
+  ];
 }
 
 class Selector {
@@ -53,35 +60,43 @@
 
   LibraryElement get library => memberName.library;
 
-  Selector.internal(this.kind,
-                    this.memberName,
-                    this.callStructure,
-                    this.hashCode) {
-    assert(kind == SelectorKind.INDEX ||
-           (memberName != Names.INDEX_NAME &&
-            memberName != Names.INDEX_SET_NAME));
-    assert(kind == SelectorKind.OPERATOR ||
-           kind == SelectorKind.INDEX ||
-           !Elements.isOperatorName(memberName.text) ||
-           identical(memberName.text, '??'));
-    assert(kind == SelectorKind.CALL ||
-           kind == SelectorKind.GETTER ||
-           kind == SelectorKind.SETTER ||
-           Elements.isOperatorName(memberName.text) ||
-           identical(memberName.text, '??'));
+  Selector.internal(
+      this.kind, this.memberName, this.callStructure, this.hashCode) {
+    assert(invariant(
+        NO_LOCATION_SPANNABLE,
+        kind == SelectorKind.INDEX ||
+            (memberName != Names.INDEX_NAME &&
+                memberName != Names.INDEX_SET_NAME),
+        message: "kind=$kind,memberName=$memberName,"
+            "callStructure:$callStructure"));
+    assert(invariant(
+        NO_LOCATION_SPANNABLE,
+        kind == SelectorKind.OPERATOR ||
+            kind == SelectorKind.INDEX ||
+            !Elements.isOperatorName(memberName.text) ||
+            memberName.text == '??',
+        message: "kind=$kind,memberName=$memberName,"
+            "callStructure:$callStructure"));
+    assert(invariant(
+        NO_LOCATION_SPANNABLE,
+        kind == SelectorKind.CALL ||
+            kind == SelectorKind.GETTER ||
+            kind == SelectorKind.SETTER ||
+            Elements.isOperatorName(memberName.text) ||
+            memberName.text == '??',
+        message: "kind=$kind,memberName=$memberName,"
+            "callStructure:$callStructure"));
   }
 
   // TODO(johnniwinther): Extract caching.
   static Map<int, List<Selector>> canonicalizedValues =
       new Map<int, List<Selector>>();
 
-  factory Selector(SelectorKind kind,
-                   Name name,
-                   CallStructure callStructure) {
+  factory Selector(SelectorKind kind, Name name, CallStructure callStructure) {
     // TODO(johnniwinther): Maybe use equality instead of implicit hashing.
     int hashCode = computeHashCode(kind, name, callStructure);
-    List<Selector> list = canonicalizedValues.putIfAbsent(hashCode,
-        () => <Selector>[]);
+    List<Selector> list =
+        canonicalizedValues.putIfAbsent(hashCode, () => <Selector>[]);
     for (int i = 0; i < list.length; i++) {
       Selector existing = list[i];
       if (existing.match(kind, name, callStructure)) {
@@ -89,8 +104,8 @@
         return existing;
       }
     }
-    Selector result = new Selector.internal(
-        kind, name, callStructure, hashCode);
+    Selector result =
+        new Selector.internal(kind, name, callStructure, hashCode);
     list.add(result);
     return result;
   }
@@ -114,9 +129,7 @@
       if (element.isOperator) {
         // Operators cannot have named arguments, however, that doesn't prevent
         // a user from declaring such an operator.
-        return new Selector(
-            SelectorKind.OPERATOR,
-            name,
+        return new Selector(SelectorKind.OPERATOR, name,
             new CallStructure(arity, namedArguments));
       } else {
         return new Selector.call(
@@ -136,15 +149,11 @@
     }
   }
 
-  factory Selector.getter(Name name)
-      => new Selector(SelectorKind.GETTER,
-                      name.getter,
-                      CallStructure.NO_ARGS);
+  factory Selector.getter(Name name) =>
+      new Selector(SelectorKind.GETTER, name.getter, CallStructure.NO_ARGS);
 
-  factory Selector.setter(Name name)
-      => new Selector(SelectorKind.SETTER,
-                      name.setter,
-                      CallStructure.ONE_ARG);
+  factory Selector.setter(Name name) =>
+      new Selector(SelectorKind.SETTER, name.setter, CallStructure.ONE_ARG);
 
   factory Selector.unaryOperator(String name) => new Selector(
       SelectorKind.OPERATOR,
@@ -156,35 +165,29 @@
       new PublicName(Elements.constructOperatorName(name, false)),
       CallStructure.ONE_ARG);
 
-  factory Selector.index()
-      => new Selector(SelectorKind.INDEX, Names.INDEX_NAME,
-                      CallStructure.ONE_ARG);
+  factory Selector.index() =>
+      new Selector(SelectorKind.INDEX, Names.INDEX_NAME, CallStructure.ONE_ARG);
 
-  factory Selector.indexSet()
-      => new Selector(SelectorKind.INDEX, Names.INDEX_SET_NAME,
-                      CallStructure.TWO_ARGS);
+  factory Selector.indexSet() => new Selector(
+      SelectorKind.INDEX, Names.INDEX_SET_NAME, CallStructure.TWO_ARGS);
 
-  factory Selector.call(Name name, CallStructure callStructure)
-      => new Selector(SelectorKind.CALL, name, callStructure);
+  factory Selector.call(Name name, CallStructure callStructure) =>
+      new Selector(SelectorKind.CALL, name, callStructure);
 
-  factory Selector.callClosure(int arity, [List<String> namedArguments])
-      => new Selector(SelectorKind.CALL, Names.call,
-                      new CallStructure(arity, namedArguments));
+  factory Selector.callClosure(int arity, [List<String> namedArguments]) =>
+      new Selector(SelectorKind.CALL, Names.call,
+          new CallStructure(arity, namedArguments));
 
-  factory Selector.callClosureFrom(Selector selector)
-      => new Selector(SelectorKind.CALL, Names.call, selector.callStructure);
+  factory Selector.callClosureFrom(Selector selector) =>
+      new Selector(SelectorKind.CALL, Names.call, selector.callStructure);
 
   factory Selector.callConstructor(Name name,
-                                   [int arity = 0,
-                                    List<String> namedArguments])
-      => new Selector(SelectorKind.CALL, name,
-                      new CallStructure(arity, namedArguments));
+          [int arity = 0, List<String> namedArguments]) =>
+      new Selector(
+          SelectorKind.CALL, name, new CallStructure(arity, namedArguments));
 
-  factory Selector.callDefaultConstructor()
-      => new Selector(
-          SelectorKind.CALL,
-          const PublicName(''),
-          CallStructure.NO_ARGS);
+  factory Selector.callDefaultConstructor() => new Selector(
+      SelectorKind.CALL, const PublicName(''), CallStructure.NO_ARGS);
 
   bool get isGetter => kind == SelectorKind.GETTER;
   bool get isSetter => kind == SelectorKind.SETTER;
@@ -200,8 +203,7 @@
   /**
    * The member name for invocation mirrors created from this selector.
    */
-  String get invocationMirrorMemberName =>
-      isSetter ? '$name=' : name;
+  String get invocationMirrorMemberName => isSetter ? '$name=' : name;
 
   int get invocationMirrorKind {
     const int METHOD = 0;
@@ -257,17 +259,14 @@
     return appliesUnnamed(element, world);
   }
 
-  bool match(SelectorKind kind,
-             Name memberName,
-             CallStructure callStructure) {
-    return this.kind == kind
-        && this.memberName == memberName
-        && this.callStructure.match(callStructure);
+  bool match(SelectorKind kind, Name memberName, CallStructure callStructure) {
+    return this.kind == kind &&
+        this.memberName == memberName &&
+        this.callStructure.match(callStructure);
   }
 
-  static int computeHashCode(SelectorKind kind,
-                             Name name,
-                             CallStructure callStructure) {
+  static int computeHashCode(
+      SelectorKind kind, Name name, CallStructure callStructure) {
     // Add bits from name and kind.
     int hash = Hashing.mixHashCodeBits(name.hashCode, kind.hashCode);
     // Add bits from the call structure.
diff --git a/pkg/compiler/lib/src/universe/side_effects.dart b/pkg/compiler/lib/src/universe/side_effects.dart
index f7625e4..2c39999 100644
--- a/pkg/compiler/lib/src/universe/side_effects.dart
+++ b/pkg/compiler/lib/src/universe/side_effects.dart
@@ -4,14 +4,12 @@
 
 library universe.side_effects;
 
-import '../common.dart';
-
 class SideEffects {
   // Changes flags.
   static const int FLAG_CHANGES_INDEX = 0;
   static const int FLAG_CHANGES_INSTANCE_PROPERTY = FLAG_CHANGES_INDEX + 1;
-  static const int FLAG_CHANGES_STATIC_PROPERTY
-      = FLAG_CHANGES_INSTANCE_PROPERTY + 1;
+  static const int FLAG_CHANGES_STATIC_PROPERTY =
+      FLAG_CHANGES_INSTANCE_PROPERTY + 1;
   static const int FLAG_CHANGES_COUNT = FLAG_CHANGES_STATIC_PROPERTY + 1;
 
   // Depends flags (one for each changes flag).
@@ -35,13 +33,18 @@
     clearAllSideEffects();
   }
 
-  bool operator==(other) => _flags == other._flags;
+  bool operator ==(other) => _flags == other._flags;
 
   int get hashCode => throw new UnsupportedError('SideEffects.hashCode');
 
   bool _getFlag(int position) => (_flags & (1 << position)) != 0;
-  void _setFlag(int position) { _flags |= (1 << position); }
-  void _clearFlag(int position) { _flags &= ~(1 << position); }
+  void _setFlag(int position) {
+    _flags |= (1 << position);
+  }
+
+  void _clearFlag(int position) {
+    _flags &= ~(1 << position);
+  }
 
   int getChangesFlags() => _flags & ((1 << FLAG_CHANGES_COUNT) - 1);
   int getDependsOnFlags() {
@@ -51,14 +54,19 @@
   bool hasSideEffects() => getChangesFlags() != 0;
   bool dependsOnSomething() => getDependsOnFlags() != 0;
 
-  void setAllSideEffects() { _flags |= ((1 << FLAG_CHANGES_COUNT) - 1); }
+  void setAllSideEffects() {
+    _flags |= ((1 << FLAG_CHANGES_COUNT) - 1);
+  }
 
-  void clearAllSideEffects() { _flags &= ~((1 << FLAG_CHANGES_COUNT) - 1); }
+  void clearAllSideEffects() {
+    _flags &= ~((1 << FLAG_CHANGES_COUNT) - 1);
+  }
 
   void setDependsOnSomething() {
     int count = FLAG_DEPENDS_ON_COUNT - FLAG_CHANGES_COUNT;
     _flags |= (((1 << count) - 1) << FLAG_CHANGES_COUNT);
   }
+
   void clearAllDependencies() {
     int count = FLAG_DEPENDS_ON_COUNT - FLAG_CHANGES_COUNT;
     _flags &= ~(((1 << count) - 1) << FLAG_CHANGES_COUNT);
@@ -67,40 +75,64 @@
   bool dependsOnStaticPropertyStore() {
     return _getFlag(FLAG_DEPENDS_ON_STATIC_PROPERTY_STORE);
   }
+
   void setDependsOnStaticPropertyStore() {
     _setFlag(FLAG_DEPENDS_ON_STATIC_PROPERTY_STORE);
   }
+
   void clearDependsOnStaticPropertyStore() {
     _clearFlag(FLAG_DEPENDS_ON_STATIC_PROPERTY_STORE);
   }
-  void setChangesStaticProperty() { _setFlag(FLAG_CHANGES_STATIC_PROPERTY); }
+
+  void setChangesStaticProperty() {
+    _setFlag(FLAG_CHANGES_STATIC_PROPERTY);
+  }
+
   void clearChangesStaticProperty() {
     _clearFlag(FLAG_CHANGES_STATIC_PROPERTY);
   }
+
   bool changesStaticProperty() => _getFlag(FLAG_CHANGES_STATIC_PROPERTY);
 
   bool dependsOnIndexStore() => _getFlag(FLAG_DEPENDS_ON_INDEX_STORE);
-  void setDependsOnIndexStore() { _setFlag(FLAG_DEPENDS_ON_INDEX_STORE); }
-  void clearDependsOnIndexStore() { _clearFlag(FLAG_DEPENDS_ON_INDEX_STORE); }
-  void setChangesIndex() { _setFlag(FLAG_CHANGES_INDEX); }
-  void clearChangesIndex() { _clearFlag(FLAG_CHANGES_INDEX); }
+  void setDependsOnIndexStore() {
+    _setFlag(FLAG_DEPENDS_ON_INDEX_STORE);
+  }
+
+  void clearDependsOnIndexStore() {
+    _clearFlag(FLAG_DEPENDS_ON_INDEX_STORE);
+  }
+
+  void setChangesIndex() {
+    _setFlag(FLAG_CHANGES_INDEX);
+  }
+
+  void clearChangesIndex() {
+    _clearFlag(FLAG_CHANGES_INDEX);
+  }
+
   bool changesIndex() => _getFlag(FLAG_CHANGES_INDEX);
 
   bool dependsOnInstancePropertyStore() {
     return _getFlag(FLAG_DEPENDS_ON_INSTANCE_PROPERTY_STORE);
   }
+
   void setDependsOnInstancePropertyStore() {
     _setFlag(FLAG_DEPENDS_ON_INSTANCE_PROPERTY_STORE);
   }
+
   void clearDependsOnInstancePropertyStore() {
     _setFlag(FLAG_DEPENDS_ON_INSTANCE_PROPERTY_STORE);
   }
+
   void setChangesInstanceProperty() {
     _setFlag(FLAG_CHANGES_INSTANCE_PROPERTY);
   }
+
   void clearChangesInstanceProperty() {
     _clearFlag(FLAG_CHANGES_INSTANCE_PROPERTY);
   }
+
   bool changesInstanceProperty() => _getFlag(FLAG_CHANGES_INSTANCE_PROPERTY);
 
   static int computeDependsOnFlags(int flags) => flags << FLAG_CHANGES_COUNT;
diff --git a/pkg/compiler/lib/src/universe/universe.dart b/pkg/compiler/lib/src/universe/universe.dart
index 8b2f53e..8f08f6f 100644
--- a/pkg/compiler/lib/src/universe/universe.dart
+++ b/pkg/compiler/lib/src/universe/universe.dart
@@ -7,22 +7,14 @@
 import 'dart:collection';
 
 import '../common.dart';
-import '../compiler.dart' show
-    Compiler;
+import '../compiler.dart' show Compiler;
 import '../elements/elements.dart';
 import '../dart_types.dart';
 import '../util/util.dart';
-import '../world.dart' show
-    ClassWorld,
-    World;
+import '../world.dart' show ClassWorld, World;
 
-import 'selector.dart' show
-    Selector;
-import 'use.dart' show
-    DynamicUse,
-    DynamicUseKind,
-    StaticUse,
-    StaticUseKind;
+import 'selector.dart' show Selector;
+import 'use.dart' show DynamicUse, DynamicUseKind, StaticUse, StaticUseKind;
 
 /// The known constraint on receiver for a dynamic call site.
 ///
@@ -227,9 +219,9 @@
   // subclass and through subtype instantiated types/classes.
   // TODO(johnniwinther): Support unknown type arguments for generic types.
   void registerTypeInstantiation(InterfaceType type,
-                                 {bool byMirrors: false,
-                                  bool isNative: false,
-                                  void onImplemented(ClassElement cls)}) {
+      {bool byMirrors: false,
+      bool isNative: false,
+      void onImplemented(ClassElement cls)}) {
     _instantiatedTypes.add(type);
     ClassElement cls = type.element;
     if (!cls.isAbstract
@@ -237,11 +229,13 @@
         // classes; a native abstract class may have non-abstract subclasses
         // not declared to the program.  Instances of these classes are
         // indistinguishable from the abstract class.
-        || isNative
+        ||
+        isNative
         // Likewise, if this registration comes from the mirror system,
         // all bets are off.
         // TODO(herhut): Track classes required by mirrors seperately.
-        || byMirrors) {
+        ||
+        byMirrors) {
       _directlyInstantiatedClasses.add(cls);
     }
 
@@ -258,8 +252,7 @@
   }
 
   bool _hasMatchingSelector(Map<Selector, SelectorConstraints> selectors,
-                            Element member,
-                            World world) {
+      Element member, World world) {
     if (selectors == null) return false;
     for (Selector selector in selectors.keys) {
       if (selector.appliesUnnamed(member, world)) {
@@ -296,16 +289,15 @@
     }
   }
 
-  bool _registerNewSelector(
-      DynamicUse dynamicUse,
+  bool _registerNewSelector(DynamicUse dynamicUse,
       Map<String, Map<Selector, SelectorConstraints>> selectorMap) {
     Selector selector = dynamicUse.selector;
     String name = selector.name;
     ReceiverConstraint mask = dynamicUse.mask;
     Map<Selector, SelectorConstraints> selectors = selectorMap.putIfAbsent(
         name, () => new Maplet<Selector, SelectorConstraints>());
-    UniverseSelectorConstraints constraints = selectors.putIfAbsent(
-        selector, () {
+    UniverseSelectorConstraints constraints =
+        selectors.putIfAbsent(selector, () {
       return selectorConstraintsStrategy.createSelectorConstraints(selector);
     });
     return constraints.addReceiverConstraint(mask);
@@ -389,12 +381,9 @@
     fieldGetters.remove(element);
     _directlyInstantiatedClasses.remove(element);
     if (element is ClassElement) {
-      assert(invariant(
-          element, element.thisType.isRaw,
+      assert(invariant(element, element.thisType.isRaw,
           message: 'Generic classes not supported (${element.thisType}).'));
-      _instantiatedTypes
-          ..remove(element.rawType)
-          ..remove(element.thisType);
+      _instantiatedTypes..remove(element.rawType)..remove(element.thisType);
     }
   }
 
@@ -404,7 +393,7 @@
     // Return new list to guard against concurrent modifications.
     return new List<LocalFunctionElement>.from(
         allClosures.where((LocalFunctionElement closure) {
-          return closure.executableContext == element;
-        }));
+      return closure.executableContext == element;
+    }));
   }
 }
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index 77c1084..bb6b153 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -7,29 +7,18 @@
 /// method on an unknown class.
 library dart2js.universe.use;
 
-import '../closure.dart' show
-  BoxFieldElement;
+import '../closure.dart' show BoxFieldElement;
 import '../common.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart';
-import '../world.dart' show
-    ClassWorld;
-import '../util/util.dart' show
-    Hashing;
+import '../world.dart' show ClassWorld;
+import '../util/util.dart' show Hashing;
 
-import 'call_structure.dart' show
-    CallStructure;
-import 'selector.dart' show
-    Selector;
-import 'universe.dart' show
-    ReceiverConstraint;
+import 'call_structure.dart' show CallStructure;
+import 'selector.dart' show Selector;
+import 'universe.dart' show ReceiverConstraint;
 
-
-enum DynamicUseKind {
-  INVOKE,
-  GET,
-  SET,
-}
+enum DynamicUseKind { INVOKE, GET, SET, }
 
 /// The use of a dynamic property. [selector] defined the name and kind of the
 /// property and [mask] defines the known constraint for the object on which
@@ -84,52 +73,52 @@
   final StaticUseKind kind;
   final int hashCode;
 
-  StaticUse._(Element element, StaticUseKind kind)
+  StaticUse.internal(Element element, StaticUseKind kind)
       : this.element = element,
         this.kind = kind,
         this.hashCode = Hashing.objectHash(element, Hashing.objectHash(kind)) {
     assert(invariant(element, element.isDeclaration,
         message: "Static use element $element must be "
-                 "the declaration element."));
+            "the declaration element."));
   }
 
   /// Invocation of a static or top-level [element] with the given
   /// [callStructure].
-  factory StaticUse.staticInvoke(MethodElement element,
-                                 CallStructure callStructure) {
+  factory StaticUse.staticInvoke(
+      MethodElement element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static invoke element $element must be a top-level "
-                 "or static method."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+            "or static method."));
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Closurization of a static or top-level function [element].
   factory StaticUse.staticTearOff(MethodElement element) {
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static tear-off element $element must be a top-level "
-                 "or static method."));
-    return new StaticUse._(element, StaticUseKind.STATIC_TEAR_OFF);
+            "or static method."));
+    return new StaticUse.internal(element, StaticUseKind.STATIC_TEAR_OFF);
   }
 
   /// Read access of a static or top-level field or getter [element].
   factory StaticUse.staticGet(MemberElement element) {
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static get element $element must be a top-level "
-                 "or static method."));
+            "or static method."));
     assert(invariant(element, element.isField || element.isGetter,
         message: "Static get element $element must be a field or a getter."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Write access of a static or top-level field or setter [element].
   factory StaticUse.staticSet(MemberElement element) {
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static set element $element must be a top-level "
-                 "or static method."));
+            "or static method."));
     assert(invariant(element, element.isField || element.isSetter,
         message: "Static set element $element must be a field or a setter."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Invocation of the lazy initializer for a static or top-level field
@@ -137,19 +126,19 @@
   factory StaticUse.staticInit(FieldElement element) {
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static init element $element must be a top-level "
-                 "or static method."));
+            "or static method."));
     assert(invariant(element, element.isField,
         message: "Static init element $element must be a field."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Invocation of a super method [element] with the given [callStructure].
-  factory StaticUse.superInvoke(MethodElement element,
-                                CallStructure callStructure) {
+  factory StaticUse.superInvoke(
+      MethodElement element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
     assert(invariant(element, element.isInstanceMember,
         message: "Super invoke element $element must be an instance method."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Read access of a super field or getter [element].
@@ -158,7 +147,7 @@
         message: "Super get element $element must be an instance method."));
     assert(invariant(element, element.isField || element.isGetter,
         message: "Super get element $element must be a field or a getter."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Write access of a super field [element].
@@ -167,7 +156,7 @@
         message: "Super set element $element must be an instance method."));
     assert(invariant(element, element.isField,
         message: "Super set element $element must be a field."));
-    return new StaticUse._(element, StaticUseKind.SUPER_FIELD_SET);
+    return new StaticUse.internal(element, StaticUseKind.SUPER_FIELD_SET);
   }
 
   /// Write access of a super setter [element].
@@ -176,89 +165,87 @@
         message: "Super set element $element must be an instance method."));
     assert(invariant(element, element.isSetter,
         message: "Super set element $element must be a setter."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Closurization of a super method [element].
   factory StaticUse.superTearOff(MethodElement element) {
     assert(invariant(element, element.isInstanceMember && element.isFunction,
         message: "Super invoke element $element must be an instance method."));
-    return new StaticUse._(element, StaticUseKind.SUPER_TEAR_OFF);
+    return new StaticUse.internal(element, StaticUseKind.SUPER_TEAR_OFF);
   }
 
   /// Invocation of a constructor [element] through a this or super
   /// constructor call with the given [callStructure].
-  factory StaticUse.superConstructorInvoke(Element element,
-                                           CallStructure callStructure) {
+  factory StaticUse.superConstructorInvoke(
+      Element element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
-    assert(invariant(element,
-        element.isGenerativeConstructor,
+    assert(invariant(element, element.isGenerativeConstructor,
         message: "Constructor invoke element $element must be a "
-                 "generative constructor."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+            "generative constructor."));
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Invocation of a constructor (body) [element] through a this or super
   /// constructor call with the given [callStructure].
-  factory StaticUse.constructorBodyInvoke(ConstructorBodyElement element,
-                                          CallStructure callStructure) {
+  factory StaticUse.constructorBodyInvoke(
+      ConstructorBodyElement element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Constructor invocation of [element] with the given [callStructure].
-  factory StaticUse.constructorInvoke(ConstructorElement element,
-                                      CallStructure callStructure) {
+  factory StaticUse.constructorInvoke(
+      ConstructorElement element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Constructor redirection to [element].
   factory StaticUse.constructorRedirect(ConstructorElement element) {
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Initialization of an instance field [element].
   factory StaticUse.fieldInit(FieldElement element) {
     assert(invariant(element, element.isInstanceMember,
         message: "Field init element $element must be an instance field."));
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Read access of an instance field or boxed field [element].
   factory StaticUse.fieldGet(Element element) {
-    assert(invariant(element,
-        element.isInstanceMember || element is BoxFieldElement,
+    assert(invariant(
+        element, element.isInstanceMember || element is BoxFieldElement,
         message: "Field init element $element must be an instance "
-                 "or boxed field."));
-    return new StaticUse._(element, StaticUseKind.FIELD_GET);
+            "or boxed field."));
+    return new StaticUse.internal(element, StaticUseKind.FIELD_GET);
   }
 
   /// Write access of an instance field or boxed field [element].
   factory StaticUse.fieldSet(Element element) {
-    assert(invariant(element,
-        element.isInstanceMember || element is BoxFieldElement,
+    assert(invariant(
+        element, element.isInstanceMember || element is BoxFieldElement,
         message: "Field init element $element must be an instance "
-                 "or boxed field."));
-    return new StaticUse._(element, StaticUseKind.FIELD_SET);
+            "or boxed field."));
+    return new StaticUse.internal(element, StaticUseKind.FIELD_SET);
   }
 
   /// Read of a local function [element].
   factory StaticUse.closure(LocalFunctionElement element) {
-    return new StaticUse._(element, StaticUseKind.CLOSURE);
+    return new StaticUse.internal(element, StaticUseKind.CLOSURE);
   }
 
   /// Unknown use of [element].
   @deprecated
   factory StaticUse.foreignUse(Element element) {
-    return new StaticUse._(element, StaticUseKind.GENERAL);
+    return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! StaticUse) return false;
-    return element == other.element &&
-           kind == other.kind;
+    return element == other.element && kind == other.kind;
   }
 
   String toString() => 'StaticUse($element,$kind)';
@@ -279,47 +266,46 @@
   final TypeUseKind kind;
   final int hashCode;
 
-  TypeUse._(DartType type, TypeUseKind kind)
+  TypeUse.internal(DartType type, TypeUseKind kind)
       : this.type = type,
         this.kind = kind,
         this.hashCode = Hashing.objectHash(type, Hashing.objectHash(kind));
 
   /// [type] used in an is check, like `e is T` or `e is! T`.
   factory TypeUse.isCheck(DartType type) {
-    return new TypeUse._(type, TypeUseKind.IS_CHECK);
+    return new TypeUse.internal(type, TypeUseKind.IS_CHECK);
   }
 
   /// [type] used in an as cast, like `e as T`.
   factory TypeUse.asCast(DartType type) {
-    return new TypeUse._(type, TypeUseKind.AS_CAST);
+    return new TypeUse.internal(type, TypeUseKind.AS_CAST);
   }
 
   /// [type] used as a type annotation, like `T foo;`.
   factory TypeUse.checkedModeCheck(DartType type) {
-    return new TypeUse._(type, TypeUseKind.CHECKED_MODE_CHECK);
+    return new TypeUse.internal(type, TypeUseKind.CHECKED_MODE_CHECK);
   }
 
   /// [type] used in a on type catch clause, like `try {} on T catch (e) {}`.
   factory TypeUse.catchType(DartType type) {
-    return new TypeUse._(type, TypeUseKind.CATCH_TYPE);
+    return new TypeUse.internal(type, TypeUseKind.CATCH_TYPE);
   }
 
   /// [type] used as a type literal, like `foo() => T;`.
   factory TypeUse.typeLiteral(DartType type) {
-    return new TypeUse._(type, TypeUseKind.TYPE_LITERAL);
+    return new TypeUse.internal(type, TypeUseKind.TYPE_LITERAL);
   }
 
   /// [type] used in an instantiation, like `new T();`.
   factory TypeUse.instantiation(InterfaceType type) {
-    return new TypeUse._(type, TypeUseKind.INSTANTIATION);
+    return new TypeUse.internal(type, TypeUseKind.INSTANTIATION);
   }
 
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! TypeUse) return false;
-    return type == other.type &&
-           kind == other.kind;
+    return type == other.type && kind == other.kind;
   }
 
   String toString() => 'TypeUse($type,$kind)';
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/universe/world_impact.dart b/pkg/compiler/lib/src/universe/world_impact.dart
index 95980a0..45dcba5 100644
--- a/pkg/compiler/lib/src/universe/world_impact.dart
+++ b/pkg/compiler/lib/src/universe/world_impact.dart
@@ -4,26 +4,16 @@
 
 library dart2js.universe.world_impact;
 
-import '../dart_types.dart' show
-    DartType,
-    InterfaceType;
-import '../elements/elements.dart' show
-    Element,
-    LocalFunctionElement,
-    MethodElement;
-import '../util/util.dart' show
-    Setlet;
+import '../elements/elements.dart'
+    show Element, LocalFunctionElement, MethodElement;
+import '../util/util.dart' show Setlet;
 
-import 'use.dart' show
-    DynamicUse,
-    StaticUse,
-    TypeUse;
+import 'use.dart' show DynamicUse, StaticUse, TypeUse;
 
 class WorldImpact {
   const WorldImpact();
 
-  Iterable<DynamicUse> get dynamicUses =>
-      const <DynamicUse>[];
+  Iterable<DynamicUse> get dynamicUses => const <DynamicUse>[];
 
   Iterable<StaticUse> get staticUses => const <StaticUse>[];
 
@@ -78,8 +68,7 @@
   }
 
   Iterable<DynamicUse> get dynamicUses {
-    return _dynamicUses != null
-        ? _dynamicUses : const <DynamicUse>[];
+    return _dynamicUses != null ? _dynamicUses : const <DynamicUse>[];
   }
 
   void registerTypeUse(TypeUse typeUse) {
@@ -91,8 +80,7 @@
   }
 
   Iterable<TypeUse> get typeUses {
-    return _typeUses != null
-        ? _typeUses : const <TypeUse>[];
+    return _typeUses != null ? _typeUses : const <TypeUse>[];
   }
 
   void registerStaticUse(StaticUse staticUse) {
@@ -121,8 +109,7 @@
 
   @override
   Iterable<DynamicUse> get dynamicUses {
-    return _dynamicUses != null
-        ? _dynamicUses : worldImpact.dynamicUses;
+    return _dynamicUses != null ? _dynamicUses : worldImpact.dynamicUses;
   }
 
   void registerDynamicUse(DynamicUse dynamicUse) {
@@ -143,8 +130,7 @@
 
   @override
   Iterable<TypeUse> get typeUses {
-    return _typeUses != null
-        ? _typeUses : worldImpact.typeUses;
+    return _typeUses != null ? _typeUses : worldImpact.typeUses;
   }
 
   void registerStaticUse(StaticUse staticUse) {
@@ -188,10 +174,8 @@
   const ImpactStrategy();
 
   /// Applies [impact] to [visitor] for the [impactUseCase] of [element].
-  void visitImpact(Element element,
-                   WorldImpact impact,
-                   WorldImpactVisitor visitor,
-                   ImpactUseCase impactUseCase) {
+  void visitImpact(Element element, WorldImpact impact,
+      WorldImpactVisitor visitor, ImpactUseCase impactUseCase) {
     // Apply unconditionally.
     impact.apply(visitor);
   }
@@ -220,8 +204,8 @@
 
   WorldImpactVisitorImpl(
       {VisitUse<StaticUse> visitStaticUse,
-       VisitUse<DynamicUse> visitDynamicUse,
-       VisitUse<TypeUse> visitTypeUse})
+      VisitUse<DynamicUse> visitDynamicUse,
+      VisitUse<TypeUse> visitTypeUse})
       : _visitStaticUse = visitStaticUse,
         _visitDynamicUse = visitDynamicUse,
         _visitTypeUse = visitTypeUse;
@@ -247,4 +231,3 @@
     }
   }
 }
-
diff --git a/pkg/compiler/lib/src/use_unused_api.dart b/pkg/compiler/lib/src/use_unused_api.dart
index 772e231..d3578f7 100644
--- a/pkg/compiler/lib/src/use_unused_api.dart
+++ b/pkg/compiler/lib/src/use_unused_api.dart
@@ -40,14 +40,13 @@
 import 'resolution/operators.dart' as operators;
 import 'script.dart';
 import 'source_file_provider.dart' as source_file_provider;
-import 'ssa/ssa.dart' as ssa;
+import 'ssa/nodes.dart' as ssa;
 import 'tree/tree.dart' as tree;
 import 'util/util.dart' as util;
 import 'world.dart';
 
-import 'parser/partial_elements.dart' show
-    PartialClassElement,
-    PartialFunctionElement;
+import 'parser/partial_elements.dart'
+    show PartialClassElement, PartialFunctionElement;
 
 class ElementVisitor extends elements_visitor.BaseElementVisitor {
   visitElement(e, a) {}
@@ -93,36 +92,33 @@
 class NullConstantConstructorVisitor
     extends constants.ConstantConstructorVisitor {
   @override
-  visitGenerative(constants.GenerativeConstantConstructor constructor, arg) {
-  }
+  visitGenerative(constants.GenerativeConstantConstructor constructor, arg) {}
 
   @override
   visitRedirectingFactory(
-      constants.RedirectingFactoryConstantConstructor constructor, arg) {
-  }
+      constants.RedirectingFactoryConstantConstructor constructor, arg) {}
 
   @override
   visitRedirectingGenerative(
-      constants.RedirectingGenerativeConstantConstructor constructor, arg) {
-  }
+      constants.RedirectingGenerativeConstantConstructor constructor, arg) {}
 }
 
-void useConstant([constants.ConstantValue constant,
-                  constants.ConstantExpression expression,
-                  constants.ConstructedConstantExpression constructedConstant,
-                  constants.ConstantSystem cs,
-                  constants.Environment env]) {
+void useConstant(
+    [constants.ConstantValue constant,
+    constants.ConstantExpression expression,
+    constants.ConstructedConstantExpression constructedConstant,
+    constants.ConstantSystem cs,
+    constants.Environment env]) {
   constant.isObject;
   cs.isBool(constant);
   constructedConstant.computeInstanceType();
   constructedConstant.computeInstanceFields();
   expression.evaluate(null, null);
   new NullConstantConstructorVisitor()
-      ..visit(null, null)
-      ..visitGenerative(null, null)
-      ..visitRedirectingFactory(null, null)
-      ..visitRedirectingGenerative(null, null);
-
+    ..visit(null, null)
+    ..visitGenerative(null, null)
+    ..visitRedirectingFactory(null, null)
+    ..visitRedirectingGenerative(null, null);
 }
 
 void useNode(tree.Node node) {
@@ -246,12 +242,12 @@
   new ssa.HStatementSequenceInformation(null);
 }
 
-useIo([io.LineColumnMap map,
-       io.LineColumnProvider provider]) {
-  map..addFirst(null, null, null)
-     ..forEachLine(null)
-     ..getFirstElementsInLine(null)
-     ..forEachColumn(null, null);
+useIo([io.LineColumnMap map, io.LineColumnProvider provider]) {
+  map
+    ..addFirst(null, null, null)
+    ..forEachLine(null)
+    ..getFirstElementsInLine(null)
+    ..forEachColumn(null, null);
   provider.getOffset(null, null);
 }
 
@@ -275,11 +271,11 @@
 
 useElements(
     [elements.ClassElement e,
-     elements.Name n,
-     modelx.FieldElementX f,
-     PartialClassElement pce,
-     PartialFunctionElement pfe,
-     elements.LibraryElement l]) {
+    elements.Name n,
+    modelx.FieldElementX f,
+    PartialClassElement pce,
+    PartialFunctionElement pfe,
+    elements.LibraryElement l]) {
   e.lookupClassMember(null);
   e.lookupInterfaceMember(null);
   n.isAccessibleFrom(null);
@@ -290,23 +286,20 @@
 }
 
 useIr(ir_builder.IrBuilder builder) {
-  builder
-    ..buildStringConstant(null);
+  builder..buildStringConstant(null);
 }
 
 useCompiler(compiler.Compiler c) {
   c.libraryLoader
-      ..reset()
-      ..resetAsync(null)
-      ..lookupLibrary(null);
+    ..reset()
+    ..resetAsync(null)
+    ..lookupLibrary(null);
   c.forgetElement(null);
   c.backend.constantCompilerTask.copyConstantValues(null);
   c.currentlyInUserCode();
-
 }
 
-useTypes() {
-}
+useTypes() {}
 
 useCodeEmitterTask(js_emitter.CodeEmitterTask codeEmitterTask) {
   full.Emitter fullEmitter = codeEmitterTask.emitter;
@@ -332,7 +325,7 @@
 }
 
 class TreeVisitor1 extends tree_ir.ExpressionVisitor1
-                      with tree_ir.StatementVisitor1 {
+    with tree_ir.StatementVisitor1 {
   noSuchMethod(inv) {}
 }
 
@@ -343,4 +336,4 @@
 
 useDeferred([deferred.DeferredLoadTask task]) {
   task.dump();
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/util/characters.dart b/pkg/compiler/lib/src/util/characters.dart
index 5961d07..60fe4e1 100644
--- a/pkg/compiler/lib/src/util/characters.dart
+++ b/pkg/compiler/lib/src/util/characters.dart
@@ -6,7 +6,7 @@
 
 const int $EOF = 0;
 const int $STX = 2;
-const int $BS  = 8;
+const int $BS = 8;
 const int $TAB = 9;
 const int $LF = 10;
 const int $VTAB = 11;
diff --git a/pkg/compiler/lib/src/util/command_line.dart b/pkg/compiler/lib/src/util/command_line.dart
index 8a32e67..87c38e9 100644
--- a/pkg/compiler/lib/src/util/command_line.dart
+++ b/pkg/compiler/lib/src/util/command_line.dart
@@ -7,16 +7,15 @@
 /// The accepted escapes in the input of the --batch processor.
 ///
 /// Contrary to Dart strings it does not contain hex escapes (\u or \x).
-Map<String, String> ESCAPE_MAPPING =
-    const {
-      "n": "\n",
-      "r": "\r",
-      "t": "\t",
-      "b": "\b",
-      "f": "\f",
-      "v": "\v",
-      "\\": "\\",
-    };
+Map<String, String> ESCAPE_MAPPING = const {
+  "n": "\n",
+  "r": "\r",
+  "t": "\t",
+  "b": "\b",
+  "f": "\f",
+  "v": "\v",
+  "\\": "\\",
+};
 
 /// Splits the line similar to how a shell would split arguments. If [windows]
 /// is `true` escapes will be handled like on the Windows command-line.
@@ -48,7 +47,7 @@
         throw new FormatException("Unfinished escape: $line");
       }
       if (windows) {
-        String next = line[i+1];
+        String next = line[i + 1];
         if (next == '"' || next == r'\') {
           buffer.write(next);
           i++;
@@ -75,4 +74,3 @@
   if (buffer.isNotEmpty) result.add(buffer.toString());
   return result;
 }
-
diff --git a/pkg/compiler/lib/src/util/emptyset.dart b/pkg/compiler/lib/src/util/emptyset.dart
index d70376f..da9942c 100644
--- a/pkg/compiler/lib/src/util/emptyset.dart
+++ b/pkg/compiler/lib/src/util/emptyset.dart
@@ -15,7 +15,7 @@
 
   get _immutableError => throw new UnsupportedError("EmptySet is immutable");
 
-  bool add (E element) => _immutableError;
+  bool add(E element) => _immutableError;
   void addAll(Iterable<E> elements) => _immutableError;
 
   E lookup(E element) => null;
diff --git a/pkg/compiler/lib/src/util/enumset.dart b/pkg/compiler/lib/src/util/enumset.dart
index 953a873..7d2f600 100644
--- a/pkg/compiler/lib/src/util/enumset.dart
+++ b/pkg/compiler/lib/src/util/enumset.dart
@@ -196,4 +196,4 @@
       return _current != null;
     }
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/util/indentation.dart b/pkg/compiler/lib/src/util/indentation.dart
index ddbeafa..9709f78 100644
--- a/pkg/compiler/lib/src/util/indentation.dart
+++ b/pkg/compiler/lib/src/util/indentation.dart
@@ -25,12 +25,12 @@
   /// The indentation unit, defaulting to two spaces. May be overwritten.
   String _indentationUnit = "  ";
   String get indentationUnit => _indentationUnit;
-         set indentationUnit(String value) {
-           if (value != _indentationUnit) {
-             _indentationUnit = value;
-             _indentList = <String>[""];
-           }
-         }
+  set indentationUnit(String value) {
+    if (value != _indentationUnit) {
+      _indentationUnit = value;
+      _indentList = <String>[""];
+    }
+  }
 
   /// Increases the current level of indentation.
   void indentMore() {
@@ -53,7 +53,6 @@
 }
 
 abstract class Tagging<N> implements Indentation {
-
   StringBuffer sb = new StringBuffer();
   Link<String> tagStack = const Link<String>();
 
diff --git a/pkg/compiler/lib/src/util/link.dart b/pkg/compiler/lib/src/util/link.dart
index 3a9c133..58d2cb9 100644
--- a/pkg/compiler/lib/src/util/link.dart
+++ b/pkg/compiler/lib/src/util/link.dart
@@ -4,7 +4,7 @@
 
 part of dart2js.util;
 
-class Link<T> {
+class Link<T> implements Iterable<T> {
   T get head => throw new StateError("no elements");
   Link<T> get tail => null;
 
@@ -16,10 +16,9 @@
 
   Iterator<T> get iterator => new LinkIterator<T>(this);
 
-  void printOn(StringBuffer buffer, [separatedBy]) {
-  }
+  void printOn(StringBuffer buffer, [separatedBy]) {}
 
-  List<T> toList({ bool growable: true }) {
+  List<T> toList({bool growable: true}) {
     List<T> result;
     if (!growable) {
       result = new List<T>(slowLength());
@@ -36,12 +35,12 @@
 
   /// Lazily maps over this linked list, returning an [Iterable].
   Iterable map(dynamic fn(T item)) {
-    return new MappedLinkIterable<T,dynamic>(this, fn);
+    return new MappedLinkIterable<T, dynamic>(this, fn);
   }
 
   /// Invokes `fn` for every item in the linked list and returns the results
   /// in a [List].
-  List mapToList(dynamic fn(T item), { bool growable: true }) {
+  List mapToList(dynamic fn(T item), {bool growable: true}) {
     List result;
     if (!growable) {
       result = new List(slowLength());
@@ -74,7 +73,7 @@
   void forEach(void f(T element)) {}
 
   bool operator ==(other) {
-    if (other is !Link<T>) return false;
+    if (other is! Link<T>) return false;
     return other.isEmpty;
   }
 
@@ -113,13 +112,34 @@
   ///
   /// Returns true for the empty list.
   bool every(bool f(T)) {
-    for (Link<T> link = this; !link.isEmpty; link = link.tail){
+    for (Link<T> link = this; !link.isEmpty; link = link.tail) {
       if (!f(link.head)) return false;
     }
     return true;
   }
 
   Link copyWithout(e) => this;
+
+  //
+  // Unsupported Iterable<T> methods.
+  //
+  bool any(bool f(T e)) => _unsupported('any');
+  T elementAt(int i) => _unsupported('elementAt');
+  Iterable expand(Iterable f(T e)) => _unsupported('expand');
+  T firstWhere(bool f(T e), {T orElse()}) => _unsupported('firstWhere');
+  fold(initialValue, combine(value, T element)) => _unsupported('fold');
+  T get last => _unsupported('get:last');
+  T lastWhere(bool f(T e), {T orElse()}) => _unsupported('lastWhere');
+  String join([separator = '']) => _unsupported('join');
+  T reduce(T combine(T a, T b)) => _unsupported('reduce');
+  T singleWhere(bool f(T e)) => _unsupported('singleWhere');
+  Iterable<T> skipWhile(bool f(T e)) => _unsupported('skipWhile');
+  Iterable<T> take(int n) => _unsupported('take');
+  Iterable<T> takeWhile(bool f(T e)) => _unsupported('takeWhile');
+  Set<T> toSet() => _unsupported('toSet');
+  Iterable<T> where(bool f(T e)) => _unsupported('where');
+
+  _unsupported(String method) => throw new UnsupportedError(method);
 }
 
 /// Builder object for creating linked lists using [Link] or fixed-length [List]
diff --git a/pkg/compiler/lib/src/util/link_implementation.dart b/pkg/compiler/lib/src/util/link_implementation.dart
index 973ef50..ac06c17 100644
--- a/pkg/compiler/lib/src/util/link_implementation.dart
+++ b/pkg/compiler/lib/src/util/link_implementation.dart
@@ -52,7 +52,7 @@
   MappedLinkIterable(this._link, this._transformation);
 
   Iterator<T> get iterator {
-    return new MappedLinkIterator<S,T>(_link, _transformation);
+    return new MappedLinkIterator<S, T>(_link, _transformation);
   }
 }
 
@@ -61,7 +61,7 @@
   Link<T> tail;
 
   LinkEntry(T this.head, [Link<T> tail])
-    : this.tail = ((tail == null) ? new Link<T>() : tail);
+      : this.tail = ((tail == null) ? new Link<T>() : tail);
 
   Link<T> prepend(T element) {
     // TODO(ahe): Use new Link<T>, but this cost 8% performance on VM.
@@ -103,7 +103,7 @@
 
   Link<T> skip(int n) {
     Link<T> link = this;
-    for (int i = 0 ; i < n ; i++) {
+    for (int i = 0; i < n; i++) {
       if (link.isEmpty) {
         throw new RangeError('Index $n out of range');
       }
@@ -122,7 +122,7 @@
   }
 
   bool operator ==(other) {
-    if (other is !Link<T>) return false;
+    if (other is! Link<T>) return false;
     Link<T> myElements = this;
     while (myElements.isNotEmpty && other.isNotEmpty) {
       if (myElements.head != other.head) {
diff --git a/pkg/compiler/lib/src/util/maplet.dart b/pkg/compiler/lib/src/util/maplet.dart
index 455435b..086273c 100644
--- a/pkg/compiler/lib/src/util/maplet.dart
+++ b/pkg/compiler/lib/src/util/maplet.dart
@@ -101,7 +101,7 @@
         list[CAPACITY + 1] = value;
         _key = list;
         _value = null;
-        _extra = 2;  // Two elements.
+        _extra = 2; // Two elements.
       }
     } else if (_MARKER == _extra) {
       _key[key] = value;
@@ -277,4 +277,4 @@
     _current = null;
     return false;
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/util/setlet.dart b/pkg/compiler/lib/src/util/setlet.dart
index f497561e..cd654c1 100644
--- a/pkg/compiler/lib/src/util/setlet.dart
+++ b/pkg/compiler/lib/src/util/setlet.dart
@@ -86,7 +86,7 @@
         list[0] = _contents;
         list[1] = element;
         _contents = list;
-        _extra = 2;  // Two elements.
+        _extra = 2; // Two elements.
         return true;
       }
     } else if (_MARKER == _extra) {
@@ -130,7 +130,9 @@
         // make sure we don't keep extra stuff alive.
         while (copyTo < CAPACITY) _contents[copyTo++] = null;
       } else {
-        _contents = new Set<E>()..addAll(_contents)..add(element);
+        _contents = new Set<E>()
+          ..addAll(_contents)
+          ..add(element);
         _extra = _MARKER;
       }
       return true;
@@ -233,7 +235,8 @@
   bool containsAll(Iterable<E> other) {
     for (E e in other) {
       if (!this.contains(e)) return false;
-    };
+    }
+    ;
     return true;
   }
 
diff --git a/pkg/compiler/lib/src/util/uri_extras.dart b/pkg/compiler/lib/src/util/uri_extras.dart
index aa8cdcf..5164378 100644
--- a/pkg/compiler/lib/src/util/uri_extras.dart
+++ b/pkg/compiler/lib/src/util/uri_extras.dart
@@ -32,13 +32,13 @@
   if (base.userInfo == uri.userInfo &&
       equalsNCS(base.host, uri.host) &&
       base.port == uri.port &&
-      uri.query == "" && uri.fragment == "") {
+      uri.query == "" &&
+      uri.fragment == "") {
     if (normalize(uri.path).startsWith(normalize(base.path))) {
       return uri.path.substring(base.path.lastIndexOf('/') + 1);
     }
 
-    if (!base.path.startsWith('/') ||
-        !uri.path.startsWith('/')) {
+    if (!base.path.startsWith('/') || !uri.path.startsWith('/')) {
       return uri.toString();
     }
 
@@ -47,7 +47,7 @@
     int common = 0;
     int length = min(uriParts.length, baseParts.length);
     while (common < length &&
-           normalize(uriParts[common]) == normalize(baseParts[common])) {
+        normalize(uriParts[common]) == normalize(baseParts[common])) {
       common++;
     }
     if (common == 1 || (isWindows && common == 2)) {
diff --git a/pkg/compiler/lib/src/util/util.dart b/pkg/compiler/lib/src/util/util.dart
index a91f6cd..102ca9e 100644
--- a/pkg/compiler/lib/src/util/util.dart
+++ b/pkg/compiler/lib/src/util/util.dart
@@ -116,9 +116,9 @@
       } else if (code == $LS) {
         // This Unicode line terminator and $PS are invalid in JS string
         // literals.
-        addCodeUnitEscaped(buffer, $LS);  // 0x2028.
+        addCodeUnitEscaped(buffer, $LS); // 0x2028.
       } else if (code == $PS) {
-        addCodeUnitEscaped(buffer, $PS);  // 0x2029.
+        addCodeUnitEscaped(buffer, $PS); // 0x2029.
       } else if (code == $BACKSLASH) {
         buffer.write(r'\\');
       } else {
@@ -143,8 +143,13 @@
 
   for (int i = 0; i < string.length; i++) {
     int code = string.codeUnitAt(i);
-    if (code < 0x20 || code == $DEL || code == $DQ || code == $LS ||
-        code == $PS || code == $BACKSLASH || code >= 0x80) {
+    if (code < 0x20 ||
+        code == $DEL ||
+        code == $DQ ||
+        code == $LS ||
+        code == $PS ||
+        code == $BACKSLASH ||
+        code >= 0x80) {
       writeEscapedOn(string, buffer);
       return;
     }
@@ -153,20 +158,22 @@
 }
 
 int computeHashCode(part1, [part2, part3, part4, part5]) {
-  return (part1.hashCode
-          ^ part2.hashCode
-          ^ part3.hashCode
-          ^ part4.hashCode
-          ^ part5.hashCode) & 0x3fffffff;
+  return (part1.hashCode ^
+          part2.hashCode ^
+          part3.hashCode ^
+          part4.hashCode ^
+          part5.hashCode) &
+      0x3fffffff;
 }
 
-String modifiersToString({bool isStatic: false,
-                          bool isAbstract: false,
-                          bool isFinal: false,
-                          bool isVar: false,
-                          bool isConst: false,
-                          bool isFactory: false,
-                          bool isExternal: false}) {
+String modifiersToString(
+    {bool isStatic: false,
+    bool isAbstract: false,
+    bool isFinal: false,
+    bool isVar: false,
+    bool isConst: false,
+    bool isFactory: false,
+    bool isExternal: false}) {
   LinkBuilder<String> builder = new LinkBuilder<String>();
   if (isStatic) builder.addLast('static');
   if (isAbstract) builder.addLast('abstract');
@@ -197,10 +204,9 @@
   String toString() => '($a,$b)';
 }
 
-
 int longestCommonPrefixLength(List a, List b) {
   int index = 0;
-  for ( ; index < a.length && index < b.length; index++) {
+  for (; index < a.length && index < b.length; index++) {
     if (a[index] != b[index]) {
       break;
     }
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index da08fb6..f217263 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -4,34 +4,27 @@
 
 library dart2js.world;
 
-import 'closure.dart' show
-    SynthesizedCallMethodElementX;
+import 'closure.dart' show SynthesizedCallMethodElementX;
 import 'common.dart';
-import 'common/backend_api.dart' show
-    Backend;
-import 'compiler.dart' show
-    Compiler;
-import 'core_types.dart' show
-    CoreClasses;
+import 'common/backend_api.dart' show Backend;
+import 'compiler.dart' show Compiler;
+import 'core_types.dart' show CoreClasses;
 import 'dart_types.dart';
-import 'elements/elements.dart' show
-    ClassElement,
-    Element,
-    FunctionElement,
-    MixinApplicationElement,
-    TypedefElement,
-    VariableElement;
+import 'elements/elements.dart'
+    show
+        ClassElement,
+        Element,
+        FunctionElement,
+        MixinApplicationElement,
+        TypedefElement,
+        VariableElement;
 import 'ordered_typeset.dart';
 import 'types/types.dart' as ti;
 import 'universe/class_set.dart';
-import 'universe/function_set.dart' show
-    FunctionSet;
-import 'universe/selector.dart' show
-    Selector;
-import 'universe/side_effects.dart' show
-    SideEffects;
-import 'util/util.dart' show
-    Link;
+import 'universe/function_set.dart' show FunctionSet;
+import 'universe/selector.dart' show Selector;
+import 'universe/side_effects.dart' show SideEffects;
+import 'util/util.dart' show Link;
 
 abstract class ClassWorld {
   // TODO(johnniwinther): Refine this into a `BackendClasses` interface.
@@ -99,7 +92,8 @@
 
   /// Applies [f] to each live class that extend [cls] _not_ including [cls]
   /// itself.
-  void forEachStrictSubclassOf(ClassElement cls, ForEach f(ClassElement cls));
+  void forEachStrictSubclassOf(
+      ClassElement cls, IterationStep f(ClassElement cls));
 
   /// Returns `true` if [predicate] applies to any live class that extend [cls]
   /// _not_ including [cls] itself.
@@ -119,7 +113,8 @@
 
   /// Applies [f] to each live class that implements [cls] _not_ including [cls]
   /// itself.
-  void forEachStrictSubtypeOf(ClassElement cls, ForEach f(ClassElement cls));
+  void forEachStrictSubtypeOf(
+      ClassElement cls, IterationStep f(ClassElement cls));
 
   /// Returns `true` if [predicate] applies to any live class that implements
   /// [cls] _not_ including [cls] itself.
@@ -157,8 +152,8 @@
   bool isUsedAsMixin(ClassElement cls);
 
   /// Returns `true` if any live class that mixes in [cls] implements [type].
-  bool hasAnySubclassOfMixinUseThatImplements(ClassElement cls,
-                                              ClassElement type);
+  bool hasAnySubclassOfMixinUseThatImplements(
+      ClassElement cls, ClassElement type);
 
   /// Returns `true` if any live class that mixes in [mixin] is also a subclass
   /// of [superclass].
@@ -193,16 +188,17 @@
       new List<Map<ClassElement, ti.TypeMask>>.filled(8, null);
 
   bool checkInvariants(ClassElement cls, {bool mustBeInstantiated: true}) {
-    return
-      invariant(cls, cls.isDeclaration,
+    return invariant(cls, cls.isDeclaration,
                 message: '$cls must be the declaration.') &&
-      invariant(cls, cls.isResolved,
-                message: '$cls must be resolved.')/* &&
+            invariant(cls, cls.isResolved,
+                message:
+                    '$cls must be resolved.') /* &&
       // TODO(johnniwinther): Reinsert this or similar invariant.
       (!mustBeInstantiated ||
        invariant(cls, isInstantiated(cls),
-                 message: '$cls is not instantiated.'))*/;
- }
+                 message: '$cls is not instantiated.'))*/
+        ;
+  }
 
   /// Returns `true` if [x] is a subtype of [y], that is, if [x] implements an
   /// instance of [y].
@@ -259,8 +255,7 @@
   Iterable<ClassElement> subclassesOf(ClassElement cls) {
     ClassHierarchyNode hierarchy = _classHierarchyNodes[cls.declaration];
     if (hierarchy == null) return const <ClassElement>[];
-    return hierarchy.subclassesByMask(
-        ClassHierarchyNode.DIRECTLY_INSTANTIATED);
+    return hierarchy.subclassesByMask(ClassHierarchyNode.DIRECTLY_INSTANTIATED);
   }
 
   /// Returns an iterable over the directly instantiated classes that extend
@@ -268,8 +263,8 @@
   Iterable<ClassElement> strictSubclassesOf(ClassElement cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls.declaration];
     if (subclasses == null) return const <ClassElement>[];
-    return subclasses.subclassesByMask(
-        ClassHierarchyNode.DIRECTLY_INSTANTIATED, strict: true);
+    return subclasses.subclassesByMask(ClassHierarchyNode.DIRECTLY_INSTANTIATED,
+        strict: true);
   }
 
   /// Returns the number of live classes that extend [cls] _not_
@@ -282,12 +277,11 @@
 
   /// Applies [f] to each live class that extend [cls] _not_ including [cls]
   /// itself.
-  void forEachStrictSubclassOf(ClassElement cls, ForEach f(ClassElement cls)) {
+  void forEachStrictSubclassOf(
+      ClassElement cls, IterationStep f(ClassElement cls)) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls.declaration];
     if (subclasses == null) return;
-    subclasses.forEachSubclass(
-        f,
-        ClassHierarchyNode.DIRECTLY_INSTANTIATED,
+    subclasses.forEachSubclass(f, ClassHierarchyNode.DIRECTLY_INSTANTIATED,
         strict: true);
   }
 
@@ -297,8 +291,7 @@
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls.declaration];
     if (subclasses == null) return false;
     return subclasses.anySubclass(
-        predicate,
-        ClassHierarchyNode.DIRECTLY_INSTANTIATED,
+        predicate, ClassHierarchyNode.DIRECTLY_INSTANTIATED,
         strict: true);
   }
 
@@ -320,8 +313,7 @@
     if (classSet == null) {
       return const <ClassElement>[];
     } else {
-      return classSet.subtypesByMask(
-          ClassHierarchyNode.DIRECTLY_INSTANTIATED,
+      return classSet.subtypesByMask(ClassHierarchyNode.DIRECTLY_INSTANTIATED,
           strict: true);
     }
   }
@@ -336,12 +328,11 @@
 
   /// Applies [f] to each live class that implements [cls] _not_ including [cls]
   /// itself.
-  void forEachStrictSubtypeOf(ClassElement cls, ForEach f(ClassElement cls)) {
+  void forEachStrictSubtypeOf(
+      ClassElement cls, IterationStep f(ClassElement cls)) {
     ClassSet classSet = _classSets[cls.declaration];
     if (classSet == null) return;
-    classSet.forEachSubtype(
-        f,
-        ClassHierarchyNode.DIRECTLY_INSTANTIATED,
+    classSet.forEachSubtype(f, ClassHierarchyNode.DIRECTLY_INSTANTIATED,
         strict: true);
   }
 
@@ -351,8 +342,7 @@
     ClassSet classSet = _classSets[cls.declaration];
     if (classSet == null) return false;
     return classSet.anySubtype(
-        predicate,
-        ClassHierarchyNode.DIRECTLY_INSTANTIATED,
+        predicate, ClassHierarchyNode.DIRECTLY_INSTANTIATED,
         strict: true);
   }
 
@@ -402,14 +392,14 @@
   ClassElement getLubOfInstantiatedSubclasses(ClassElement cls) {
     ClassHierarchyNode hierarchy = _classHierarchyNodes[cls.declaration];
     return hierarchy != null
-        ? hierarchy.getLubOfInstantiatedSubclasses() : null;
+        ? hierarchy.getLubOfInstantiatedSubclasses()
+        : null;
   }
 
   @override
   ClassElement getLubOfInstantiatedSubtypes(ClassElement cls) {
     ClassSet classSet = _classSets[cls.declaration];
-    return classSet != null
-        ? classSet.getLubOfInstantiatedSubtypes() : null;
+    return classSet != null ? classSet.getLubOfInstantiatedSubtypes() : null;
   }
 
   /// Returns an iterable over the common supertypes of the [classes].
@@ -436,8 +426,8 @@
 
     List<ClassElement> commonSupertypes = <ClassElement>[];
     OUTER: for (Link<DartType> link = typeSet[depth];
-                link.head.element != objectClass;
-                link = link.tail) {
+        link.head.element != objectClass;
+        link = link.tail) {
       ClassElement cls = link.head.element;
       for (Link<OrderedTypeSet> link = otherTypeSets;
           !link.isEmpty;
@@ -493,10 +483,10 @@
   }
 
   /// Returns `true` if any live class that mixes in [cls] implements [type].
-  bool hasAnySubclassOfMixinUseThatImplements(ClassElement cls,
-                                              ClassElement type) {
-    return mixinUsesOf(cls).any(
-        (use) => hasAnySubclassThatImplements(use, type));
+  bool hasAnySubclassOfMixinUseThatImplements(
+      ClassElement cls, ClassElement type) {
+    return mixinUsesOf(cls)
+        .any((use) => hasAnySubclassThatImplements(use, type));
   }
 
   /// Returns `true` if any live class that mixes in [mixin] is also a subclass
@@ -506,8 +496,8 @@
   }
 
   /// Returns `true` if any subclass of [superclass] implements [type].
-  bool hasAnySubclassThatImplements(ClassElement superclass,
-                                    ClassElement type) {
+  bool hasAnySubclassThatImplements(
+      ClassElement superclass, ClassElement type) {
     Set<ClassElement> subclasses = typesImplementedBySubclassesOf(superclass);
     if (subclasses == null) return false;
     return subclasses.contains(type);
@@ -532,8 +522,7 @@
   // distinct sets to make class hierarchy analysis faster.
   final Map<ClassElement, ClassHierarchyNode> _classHierarchyNodes =
       <ClassElement, ClassHierarchyNode>{};
-  final Map<ClassElement, ClassSet> _classSets =
-        <ClassElement, ClassSet>{};
+  final Map<ClassElement, ClassSet> _classSets = <ClassElement, ClassSet>{};
 
   final Set<Element> sideEffectsFreeElements = new Set<Element>();
 
@@ -634,8 +623,7 @@
     }
   }
 
-  void _updateClassHierarchyNodeForClass(
-      ClassElement cls,
+  void _updateClassHierarchyNodeForClass(ClassElement cls,
       {bool directlyInstantiated: false}) {
     ClassHierarchyNode node = getClassHierarchyNode(cls);
     _updateSuperClassHierarchyNodeForClass(node);
@@ -649,7 +637,8 @@
     /// properties of the [ClassHierarchyNode] for [cls].
 
     void addSubtypes(ClassElement cls) {
-      if (compiler.hasIncrementalSupport && !alreadyPopulated.add(cls)) {
+      if (compiler.options.hasIncrementalSupport &&
+          !alreadyPopulated.add(cls)) {
         return;
       }
       assert(cls.isDeclaration);
@@ -693,14 +682,13 @@
     return sb.toString();
   }
 
-  void registerMixinUse(MixinApplicationElement mixinApplication,
-                        ClassElement mixin) {
+  void registerMixinUse(
+      MixinApplicationElement mixinApplication, ClassElement mixin) {
     // TODO(johnniwinther): Add map restricted to live classes.
     // We don't support patch classes as mixin.
     assert(mixin.isDeclaration);
-    List<MixinApplicationElement> users =
-        _mixinUses.putIfAbsent(mixin, () =>
-                               new List<MixinApplicationElement>());
+    List<MixinApplicationElement> users = _mixinUses.putIfAbsent(
+        mixin, () => new List<MixinApplicationElement>());
     users.add(mixinApplication);
   }
 
@@ -720,17 +708,14 @@
   }
 
   Element locateSingleElement(Selector selector, ti.TypeMask mask) {
-    mask = mask == null
-        ? compiler.typesTask.dynamicType
-        : mask;
+    mask = mask == null ? compiler.typesTask.dynamicType : mask;
     return mask.locateSingleElement(selector, mask, compiler);
   }
 
   ti.TypeMask extendMaskIfReachesAll(Selector selector, ti.TypeMask mask) {
     bool canReachAll = true;
     if (mask != null) {
-      canReachAll =
-          compiler.enabledInvokeOn &&
+      canReachAll = compiler.enabledInvokeOn &&
           mask.needsNoSuchMethodHandling(selector, this);
     }
     return canReachAll ? compiler.typesTask.dynamicType : mask;
@@ -759,7 +744,7 @@
     }
     if (element.isInstanceMember) {
       return !compiler.resolverWorld.hasInvokedSetter(element, this) &&
-             !compiler.resolverWorld.fieldSetters.contains(element);
+          !compiler.resolverWorld.fieldSetters.contains(element);
     }
     return false;
   }
@@ -837,5 +822,5 @@
     return functionsThatMightBePassedToApply.contains(element);
   }
 
-  bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport;
+  bool get hasClosedWorldAssumption => !compiler.options.hasIncrementalSupport;
 }
diff --git a/pkg/compiler/samples/compile_loop/compile_loop.dart b/pkg/compiler/samples/compile_loop/compile_loop.dart
index 9a2e44e..097d046 100644
--- a/pkg/compiler/samples/compile_loop/compile_loop.dart
+++ b/pkg/compiler/samples/compile_loop/compile_loop.dart
@@ -28,27 +28,24 @@
     // TODO(ahe): Use new Future.error.
     throw new Exception('Error: Cannot read: $uri');
   }
-  void handler(Uri uri, int begin, int end,
-               String message, compiler.Diagnostic kind) {
+  void handler(
+      Uri uri, int begin, int end, String message, compiler.Diagnostic kind) {
     // TODO(ahe): Remove dart:io import from
     // ../../lib/src/source_file_provider.dart and use
     // FormattingDiagnosticHandler instead.
-    print({ 'uri': '$uri',
-            'begin': begin,
-            'end': end,
-            'message': message,
-            'kind': kind.name });
+    print({
+      'uri': '$uri',
+      'begin': begin,
+      'end': end,
+      'message': message,
+      'kind': kind.name
+    });
     if (kind == compiler.Diagnostic.ERROR) {
       throw new Exception('Unexpected error occurred.');
     }
   }
-  return compiler.compile(
-      Uri.parse('memory:/main.dart'),
-      Uri.parse('sdk:/sdk/'),
-      null,
-      inputProvider,
-      handler,
-      []);
+  return compiler.compile(Uri.parse('memory:/main.dart'),
+      Uri.parse('sdk:/sdk/'), null, inputProvider, handler, []);
 }
 
 int iterations = 10;
diff --git a/pkg/compiler/samples/darttags/darttags.dart b/pkg/compiler/samples/darttags/darttags.dart
index 84b7562..0333c69 100644
--- a/pkg/compiler/samples/darttags/darttags.dart
+++ b/pkg/compiler/samples/darttags/darttags.dart
@@ -35,10 +35,8 @@
 import 'package:sdk_library_metadata/libraries.dart'
     show libraries, LibraryInfo;
 
-import 'package:compiler/src/mirrors/analyze.dart'
-    show analyze;
-import 'package:compiler/src/mirrors/dart2js_mirrors.dart'
-    show BackDoor;
+import 'package:compiler/src/mirrors/analyze.dart' show analyze;
+import 'package:compiler/src/mirrors/dart2js_mirrors.dart' show BackDoor;
 import 'package:compiler/src/mirrors/mirrors_util.dart' show nameOf;
 
 import 'package:compiler/src/filenames.dart';
@@ -59,15 +57,12 @@
 Uri outputUri;
 
 main(List<String> arguments) {
-  handler = new FormattingDiagnosticHandler()
-      ..throwOnError = true;
+  handler = new FormattingDiagnosticHandler()..throwOnError = true;
 
-  outputUri =
-      handler.provider.cwd.resolve(nativeToUriPath(arguments.first));
+  outputUri = handler.provider.cwd.resolve(nativeToUriPath(arguments.first));
   output = new File(arguments.first).openSync(mode: FileMode.WRITE);
 
-  Uri myLocation =
-      handler.provider.cwd.resolveUri(Platform.script);
+  Uri myLocation = handler.provider.cwd.resolveUri(Platform.script);
 
   List<Uri> uris = <Uri>[];
 
@@ -87,8 +82,8 @@
   // Prepend "dart:" to the names.
   uris.addAll(names.map((String name) => Uri.parse('dart:$name')));
 
-  Uri platformConfigUri = myLocation.resolve(SDK_ROOT)
-      .resolve("lib/dart2js_shared_sdk");
+  Uri platformConfigUri =
+      myLocation.resolve(SDK_ROOT).resolve("lib/dart2js_shared_sdk");
   Uri packageRoot = Uri.base.resolve(Platform.packageRoot);
 
   analyze(uris, platformConfigUri, packageRoot, handler.provider, handler)
@@ -189,8 +184,7 @@
   }
 
   void writeOn(StringBuffer buffer, String tagname) {
-    buffer.write(
-        '${tag_definition_text}\x7f${tagname}'
+    buffer.write('${tag_definition_text}\x7f${tagname}'
         '\x01${line_number},${byte_offset}\n');
   }
 }
diff --git a/pkg/compiler/samples/jsonify/jsonify.dart b/pkg/compiler/samples/jsonify/jsonify.dart
index 6e1e728..db8020d 100644
--- a/pkg/compiler/samples/jsonify/jsonify.dart
+++ b/pkg/compiler/samples/jsonify/jsonify.dart
@@ -11,10 +11,8 @@
 import 'package:sdk_library_metadata/libraries.dart'
     show libraries, LibraryInfo;
 
-import '../../lib/src/mirrors/analyze.dart'
-    show analyze;
-import '../../lib/src/mirrors/dart2js_mirrors.dart'
-    show BackDoor;
+import '../../lib/src/mirrors/analyze.dart' show analyze;
+import '../../lib/src/mirrors/dart2js_mirrors.dart' show BackDoor;
 
 import '../../lib/src/filenames.dart';
 import '../../lib/src/source_file_provider.dart';
@@ -36,18 +34,14 @@
     const bool.fromEnvironment('outputJson', defaultValue: false);
 
 main(List<String> arguments) {
-  handler = new FormattingDiagnosticHandler()
-      ..throwOnError = true;
+  handler = new FormattingDiagnosticHandler()..throwOnError = true;
 
-  outputUri =
-      handler.provider.cwd.resolve(nativeToUriPath(arguments.first));
+  outputUri = handler.provider.cwd.resolve(nativeToUriPath(arguments.first));
   output = new File(arguments.first).openSync(mode: FileMode.WRITE);
 
-  Uri myLocation =
-      handler.provider.cwd.resolveUri(Platform.script);
+  Uri myLocation = handler.provider.cwd.resolveUri(Platform.script);
 
-  Uri packageRoot =
-      handler.provider.cwd.resolve(Platform.packageRoot);
+  Uri packageRoot = handler.provider.cwd.resolve(Platform.packageRoot);
 
   Uri libraryRoot = myLocation.resolve(SDK_ROOT);
 
@@ -87,9 +81,11 @@
     }
   });
 
-  for (String filename in ["dart_client.platform",
-                           "dart_server.platform",
-                           "dart_shared.platform"]) {
+  for (String filename in [
+    "dart_client.platform",
+    "dart_server.platform",
+    "dart_shared.platform"
+  ]) {
     futures.add(mapUri(sdkRoot.resolve('sdk/lib/$filename')));
   }
 
diff --git a/pkg/compiler/tool/track_memory.dart b/pkg/compiler/tool/track_memory.dart
index effd92f..c5f5d04 100644
--- a/pkg/compiler/tool/track_memory.dart
+++ b/pkg/compiler/tool/track_memory.dart
@@ -63,15 +63,11 @@
 }
 
 /// Send a message to the vm service.
-Future _sendMessage(String method, [Map args= const {}]) {
+Future _sendMessage(String method, [Map args = const {}]) {
   var id = _requestId++;
   _pendingResponses[id] = new Completer();
-  socket.add(JSON.encode({
-      'jsonrpc': '2.0',
-      'id': '$id',
-      'method': '$method',
-      'params': args,
-    }));
+  socket.add(JSON.encode(
+      {'jsonrpc': '2.0', 'id': '$id', 'method': '$method', 'params': args,}));
   return _pendingResponses[id].future;
 }
 
@@ -101,7 +97,8 @@
   var isolateId = json['params']['event']['isolate']['id'];
   if (json['params']['event']['kind'] == 'PauseStart') {
     _resumeIsolate(isolateId);
-  } if (json['params']['event']['kind'] == 'PauseExit') {
+  }
+  if (json['params']['event']['kind'] == 'PauseExit') {
     _resumeIsolate(isolateId);
   }
 }
diff --git a/pkg/dart2js_incremental/lib/caching_compiler.dart b/pkg/dart2js_incremental/lib/caching_compiler.dart
index 4185df1..f7f8f10 100644
--- a/pkg/dart2js_incremental/lib/caching_compiler.dart
+++ b/pkg/dart2js_incremental/lib/caching_compiler.dart
@@ -36,11 +36,11 @@
   CompilerImpl compiler = cachedCompiler;
   if (compiler == null ||
       compiler.libraryRoot != libraryRoot ||
-      !compiler.hasIncrementalSupport ||
+      !compiler.options.hasIncrementalSupport ||
       compiler.hasCrashed ||
       compiler.enqueuer.resolution.hasEnqueuedReflectiveElements ||
       compiler.deferredLoadTask.isProgramSplit) {
-    if (compiler != null && compiler.hasIncrementalSupport) {
+    if (compiler != null && compiler.options.hasIncrementalSupport) {
       print('***FLUSH***');
       if (compiler.hasCrashed) {
         print('Unable to reuse compiler due to crash.');
@@ -57,12 +57,11 @@
         inputProvider,
         outputProvider,
         diagnosticHandler,
-        libraryRoot,
-        packageRoot,
-        options,
-        environment,
-        null,
-        null);
+        new CompilerOptions.parse(
+            libraryRoot: libraryRoot,
+            packageRoot: packageRoot,
+            options: options,
+            environment: environment));
     JavaScriptBackend backend = compiler.backend;
 
     full.Emitter emitter = backend.emitter.emitter;
diff --git a/pkg/dart2js_incremental/lib/dart2js_incremental.dart b/pkg/dart2js_incremental/lib/dart2js_incremental.dart
index 1ce8039..86ef905 100644
--- a/pkg/dart2js_incremental/lib/dart2js_incremental.dart
+++ b/pkg/dart2js_incremental/lib/dart2js_incremental.dart
@@ -20,6 +20,9 @@
     CompilerOutput,
     Diagnostic;
 
+import 'package:compiler/src/options.dart' show
+    CompilerOptions;
+
 import 'package:compiler/src/null_compiler_output.dart' show
     NullCompilerOutput;
 
diff --git a/pkg/dart2js_incremental/lib/library_updater.dart b/pkg/dart2js_incremental/lib/library_updater.dart
index eb4bbd1..a5cdc02 100644
--- a/pkg/dart2js_incremental/lib/library_updater.dart
+++ b/pkg/dart2js_incremental/lib/library_updater.dart
@@ -330,10 +330,10 @@
       Token token = new Scanner(_entrySourceFiles[library]).tokenize();
       _entryUnitTokens[library] = token;
       // Using two parsers to only create the nodes we want ([LibraryTag]).
-      Parser parser = new Parser(new Listener());
+      Parser parser = new Parser(new Listener(), compiler.options);
       NodeListener listener = new NodeListener(
           compiler, library.entryCompilationUnit);
-      Parser nodeParser = new Parser(listener);
+      Parser nodeParser = new Parser(listener, compiler.options);
       Iterator<LibraryTag> tags = library.tags.iterator;
       while (token.kind != EOF_TOKEN) {
         token = parser.parseMetadataStar(token);
@@ -796,7 +796,7 @@
     compiler.phase = Compiler.PHASE_DONE_RESOLVING;
 
     // TODO(ahe): Clean this up. Don't call this method in analyze-only mode.
-    if (compiler.analyzeOnly) return "/* analyze only */";
+    if (compiler.options.analyzeOnly) return "/* analyze only */";
 
     Set<ClassElementX> changedClasses =
         new Set<ClassElementX>.from(_classesWithSchemaChanges);
diff --git a/pkg/dart_messages/bin/publish.dart b/pkg/dart_messages/bin/publish.dart
index d6e3f87..48f0c30 100644
--- a/pkg/dart_messages/bin/publish.dart
+++ b/pkg/dart_messages/bin/publish.dart
@@ -172,6 +172,19 @@
   });
 }
 
+String camlToAllCaps(String input) {
+  StringBuffer out = new StringBuffer();
+  for (int i = 0; i < input.length; i++) {
+    String c = input[i];
+    if (c.toUpperCase() == c) {
+      out.write("_$c");
+    } else {
+      out.write(c.toUpperCase());
+    }
+  }
+  return out.toString();
+}
+
 /// Emits the messages in analyzer format.
 ///
 /// Messages are encoded as instances of `ErrorCode` classes where the
@@ -200,21 +213,25 @@
       "show ParserErrorCode;");
   input.forEach((name, message) {
     if (!message.usedBy.contains(Platform.analyzer)) return;
+    List<Category> categories = message.categories;
+    bool hasMultipleCategories = categories.length != 1;
+    for (Category category in categories) {
+      String className = category.name + "Code";
+      String analyzerName =
+          hasMultipleCategories ? "$name${camlToAllCaps(category.name)}" : name;
+      out.writeln();
+      out.writeln("const $className $analyzerName = const $className(");
+      out.writeln("    '$name',");
 
-    Category category = message.category;
-    String className = category.name + "Code";
-    out.writeln();
-    out.writeln("const $className $name = const $className(");
-    out.writeln("    '$name',");
-
-    String template = message.template;
-    List holeOrder = message.templateHoleOrder;
-    String analyzerTemplate = convertToAnalyzerTemplate(template, holeOrder);
-    out.write("    ");
-    out.write(escapeString(analyzerTemplate));
-    out.write(",\n    ");
-    out.write(escapeString(message.howToFix));
-    out.writeln(");  // Generated. Don't edit.");
+      String template = message.template;
+      List holeOrder = message.templateHoleOrder;
+      String analyzerTemplate = convertToAnalyzerTemplate(template, holeOrder);
+      out.write("    ");
+      out.write(escapeString(analyzerTemplate));
+      out.write(",\n    ");
+      out.write(escapeString(message.howToFix));
+      out.writeln(");  // Generated. Don't edit.");
+    }
   });
 
   new io.File(outPath).writeAsStringSync(out.toString());
diff --git a/pkg/dart_messages/lib/generated/shared_messages.json b/pkg/dart_messages/lib/generated/shared_messages.json
index a40bc3f..f5d61c0 100644
--- a/pkg/dart_messages/lib/generated/shared_messages.json
+++ b/pkg/dart_messages/lib/generated/shared_messages.json
@@ -2,7 +2,9 @@
   "exampleMessage": {
     "id": "use an Id generated by bin/message_id.dart",
     "subId": 0,
-    "category": "AnalysisOptionsError",
+    "categories": [
+      "AnalysisOptionsError"
+    ],
     "template": "#use #named #arguments",
     "templateHoleOrder": [
       "arguments",
@@ -20,32 +22,19 @@
       }
     ]
   },
-  "CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY": {
-    "id": "LGJGHW",
-    "subId": 0,
-    "category": "ParserError",
-    "template": "Const constructor or factory can't have a body.",
-    "templateHoleOrder": null,
-    "howToFix": "Remove the 'const' keyword or the body.",
-    "options": null,
-    "usedBy": [
-      "Platform.dart2js"
-    ],
-    "examples": [
-      "         class C {\n           const C() {}\n         }\n\n         main() => new C();",
-      "         class C {\n           const factory C() {}\n         }\n\n         main() => new C();"
-    ]
-  },
   "CONST_CONSTRUCTOR_WITH_BODY": {
     "id": "LGJGHW",
-    "subId": 1,
-    "category": "ParserError",
+    "subId": 0,
+    "categories": [
+      "ParserError"
+    ],
     "template": "Const constructor can't have a body.",
     "templateHoleOrder": null,
     "howToFix": "Try removing the 'const' keyword or the body.",
     "options": null,
     "usedBy": [
-      "Platform.analyzer"
+      "Platform.analyzer",
+      "Platform.dart2js"
     ],
     "examples": [
       "         class C {\n           const C() {}\n         }\n\n         main() => new C();"
@@ -53,14 +42,17 @@
   },
   "CONST_FACTORY": {
     "id": "LGJGHW",
-    "subId": 2,
-    "category": "ParserError",
+    "subId": 1,
+    "categories": [
+      "ParserError"
+    ],
     "template": "Only redirecting factory constructors can be declared to be 'const'.",
     "templateHoleOrder": null,
     "howToFix": "Try removing the 'const' keyword or replacing the body with '=' followed by a valid target.",
     "options": null,
     "usedBy": [
-      "Platform.analyzer"
+      "Platform.analyzer",
+      "Platform.dart2js"
     ],
     "examples": [
       "         class C {\n           const factory C() {}\n         }\n\n         main() => new C();"
@@ -69,7 +61,9 @@
   "EXTRANEOUS_MODIFIER": {
     "id": "GRKIQE",
     "subId": 0,
-    "category": "ParserError",
+    "categories": [
+      "ParserError"
+    ],
     "template": "Can't have modifier '#{modifier}' here.",
     "templateHoleOrder": null,
     "howToFix": "Try removing '#{modifier}'.",
@@ -99,7 +93,9 @@
   "EXTRANEOUS_MODIFIER_REPLACE": {
     "id": "GRKIQE",
     "subId": 1,
-    "category": "ParserError",
+    "categories": [
+      "ParserError"
+    ],
     "template": "Can't have modifier '#{modifier}' here.",
     "templateHoleOrder": null,
     "howToFix": "Try replacing modifier '#{modifier}' with 'var', 'final', or a type.",
@@ -117,8 +113,10 @@
   "CONST_CLASS": {
     "id": "GRKIQE",
     "subId": 2,
-    "category": "ParserError",
-    "template": "Classes can't be declared to be 'const'",
+    "categories": [
+      "ParserError"
+    ],
+    "template": "Classes can't be declared to be 'const'.",
     "templateHoleOrder": null,
     "howToFix": "Try removing the 'const' keyword or moving to the class' constructor(s).",
     "options": null,
@@ -132,8 +130,10 @@
   "CONST_METHOD": {
     "id": "GRKIQE",
     "subId": 3,
-    "category": "ParserError",
-    "template": "Getters, setters and methods can't be declared to be 'const'",
+    "categories": [
+      "ParserError"
+    ],
+    "template": "Getters, setters and methods can't be declared to be 'const'.",
     "templateHoleOrder": null,
     "howToFix": "Try removing the 'const' keyword.",
     "options": null,
@@ -152,8 +152,10 @@
   "CONST_ENUM": {
     "id": "GRKIQE",
     "subId": 4,
-    "category": "ParserError",
-    "template": "Enums can't be declared to be 'const'",
+    "categories": [
+      "ParserError"
+    ],
+    "template": "Enums can't be declared to be 'const'.",
     "templateHoleOrder": null,
     "howToFix": "Try removing the 'const' keyword.",
     "options": null,
@@ -167,8 +169,10 @@
   "CONST_TYPEDEF": {
     "id": "GRKIQE",
     "subId": 5,
-    "category": "ParserError",
-    "template": "Type aliases can't be declared to be 'const'",
+    "categories": [
+      "ParserError"
+    ],
+    "template": "Type aliases can't be declared to be 'const'.",
     "templateHoleOrder": null,
     "howToFix": "Try removing the 'const' keyword.",
     "options": null,
@@ -182,8 +186,10 @@
   "CONST_AND_FINAL": {
     "id": "GRKIQE",
     "subId": 6,
-    "category": "ParserError",
-    "template": "Members can't be declared to be both 'const' and 'final'",
+    "categories": [
+      "ParserError"
+    ],
+    "template": "Members can't be declared to be both 'const' and 'final'.",
     "templateHoleOrder": null,
     "howToFix": "Try removing either the 'const' or 'final' keyword.",
     "options": null,
@@ -200,8 +206,10 @@
   "CONST_AND_VAR": {
     "id": "GRKIQE",
     "subId": 7,
-    "category": "ParserError",
-    "template": "Members can't be declared to be both 'const' and 'var'",
+    "categories": [
+      "ParserError"
+    ],
+    "template": "Members can't be declared to be both 'const' and 'var'.",
     "templateHoleOrder": null,
     "howToFix": "Try removing either the 'const' or 'var' keyword.",
     "options": null,
@@ -218,7 +226,9 @@
   "CLASS_IN_CLASS": {
     "id": "DOTHQH",
     "subId": 0,
-    "category": "ParserError",
+    "categories": [
+      "ParserError"
+    ],
     "template": "Classes can't be declared inside other classes.",
     "templateHoleOrder": null,
     "howToFix": "Try moving the class to the top-level.",
@@ -233,8 +243,10 @@
   "CONSTRUCTOR_WITH_RETURN_TYPE": {
     "id": "VOJBWY",
     "subId": 0,
-    "category": "ParserError",
-    "template": "Constructors can't have a return type",
+    "categories": [
+      "ParserError"
+    ],
+    "template": "Constructors can't have a return type.",
     "templateHoleOrder": null,
     "howToFix": "Try removing the return type.",
     "options": null,
@@ -249,7 +261,9 @@
   "MISSING_EXPRESSION_IN_THROW": {
     "id": "FTGGMJ",
     "subId": 0,
-    "category": "ParserError",
+    "categories": [
+      "ParserError"
+    ],
     "template": "Missing expression after 'throw'.",
     "templateHoleOrder": null,
     "howToFix": "Did you mean 'rethrow'?",
@@ -266,8 +280,10 @@
   "RETHROW_OUTSIDE_CATCH": {
     "id": "MWETLC",
     "subId": 0,
-    "category": "CompileTimeError",
-    "template": "Rethrow must be inside of catch clause",
+    "categories": [
+      "CompileTimeError"
+    ],
+    "template": "Rethrow must be inside of catch clause.",
     "templateHoleOrder": null,
     "howToFix": "Try moving the expression into a catch clause, or using a 'throw' expression.",
     "options": null,
@@ -282,7 +298,9 @@
   "RETURN_IN_GENERATIVE_CONSTRUCTOR": {
     "id": "UOTDQH",
     "subId": 0,
-    "category": "CompileTimeError",
+    "categories": [
+      "CompileTimeError"
+    ],
     "template": "Constructors can't return values.",
     "templateHoleOrder": null,
     "howToFix": "Try removing the return statement or using a factory constructor.",
@@ -298,10 +316,12 @@
   "RETURN_IN_GENERATOR": {
     "id": "JRUTUQ",
     "subId": 0,
-    "category": "CompileTimeError",
+    "categories": [
+      "CompileTimeError"
+    ],
     "template": "Can't return a value from a generator function (using the '#{modifier}' modifier).",
     "templateHoleOrder": null,
-    "howToFix": "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier",
+    "howToFix": "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier.",
     "options": null,
     "usedBy": [
       "Platform.analyzer",
@@ -311,5 +331,359 @@
       "        foo() async* { return 0; }\n        main() => foo();\n        ",
       "        foo() sync* { return 0; }\n        main() => foo();\n        "
     ]
+  },
+  "NOT_ASSIGNABLE": {
+    "id": "FYQYXB",
+    "subId": 0,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "'#{fromType}' is not assignable to '#{toType}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js"
+    ],
+    "examples": null
+  },
+  "FORIN_NOT_ASSIGNABLE": {
+    "id": "FYQYXB",
+    "subId": 1,
+    "categories": [
+      "Hint"
+    ],
+    "template": "The element type '#{currentType}' of '#{expressionType}' is not assignable to '#{elementType}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js"
+    ],
+    "examples": [
+      "        main() {\n          List<int> list = <int>[1, 2];\n          for (String x in list) x;\n        }\n        "
+    ]
+  },
+  "RETURN_OF_INVALID_TYPE": {
+    "id": "FYQYXB",
+    "subId": 2,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "The return type '#{fromType}' is not a '#{toType}', as defined by the method '#{method}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "int foo() => 'foo'; main() { foo(); }"
+    ]
+  },
+  "ARGUMENT_TYPE_NOT_ASSIGNABLE": {
+    "id": "FYQYXB",
+    "subId": 3,
+    "categories": [
+      "Hint",
+      "StaticWarning"
+    ],
+    "template": "The argument type '#{fromType}' cannot be assigned to the parameter type '#{toType}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "foo(int x) => x; main() { foo('bar'); }"
+    ]
+  },
+  "CANNOT_RESOLVE": {
+    "id": "ERUSKD",
+    "subId": 0,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "Can't resolve '#{name}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js"
+    ],
+    "examples": null
+  },
+  "UNDEFINED_METHOD": {
+    "id": "ERUSKD",
+    "subId": 1,
+    "categories": [
+      "StaticTypeWarning",
+      "Hint"
+    ],
+    "template": "The method '#{memberName}' is not defined for the class '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js",
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "        class A {\n          foo() { bar(); }\n        }\n        main() { new A().foo(); }\n        "
+    ]
+  },
+  "UNDEFINED_METHOD_WITH_CONSTRUCTOR": {
+    "id": "ERUSKD",
+    "subId": 2,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "The method '#{memberName}' is not defined for the class '#{className}', but a constructor with that name is defined.",
+    "templateHoleOrder": null,
+    "howToFix": "Try adding 'new' or 'const' to invoke the constuctor, or change the method name.",
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "        class A {\n          A.bar() {}\n        }\n        main() { A.bar(); }\n        "
+    ]
+  },
+  "UNDEFINED_GETTER": {
+    "id": "ERUSKD",
+    "subId": 3,
+    "categories": [
+      "StaticTypeWarning",
+      "StaticWarning",
+      "Hint"
+    ],
+    "template": "The getter '#{memberName}' is not defined for the class '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js",
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "class A {} main() { new A().x; }",
+      "class A {} main() { A.x; }"
+    ]
+  },
+  "UNDEFINED_ENUM_CONSTANT": {
+    "id": "ERUSKD",
+    "subId": 4,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "There is no constant named '#{memberName}' in '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "        enum E { ONE }\n        E e() { return E.TWO; }\n        main() { e(); }\n       "
+    ]
+  },
+  "UNDEFINED_INSTANCE_GETTER_BUT_SETTER": {
+    "id": "ERUSKD",
+    "subId": 5,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "The setter '#{memberName}' in class '#{className}' can not be used as a getter.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js"
+    ],
+    "examples": [
+      "class A { set x(y) {} } main() { new A().x; }"
+    ]
+  },
+  "UNDEFINED_OPERATOR": {
+    "id": "ERUSKD",
+    "subId": 6,
+    "categories": [
+      "StaticTypeWarning",
+      "Hint"
+    ],
+    "template": "The operator '#{memberName}' is not defined for the class '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js",
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "class A {} main() { new A() + 3; }"
+    ]
+  },
+  "UNDEFINED_SETTER": {
+    "id": "ERUSKD",
+    "subId": 7,
+    "categories": [
+      "StaticTypeWarning",
+      "StaticWarning",
+      "Hint"
+    ],
+    "template": "The setter '#{memberName}' is not defined for the class '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js",
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "class A {} main() { new A().x = 499; }"
+    ]
+  },
+  "NO_SUCH_SUPER_MEMBER": {
+    "id": "ERUSKD",
+    "subId": 8,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "Can't resolve '#{memberName}' in a superclass of '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js"
+    ],
+    "examples": null
+  },
+  "UNDEFINED_SUPER_GETTER": {
+    "id": "ERUSKD",
+    "subId": 9,
+    "categories": [
+      "StaticTypeWarning",
+      "StaticWarning"
+    ],
+    "template": "The getter '#{memberName}' is not defined in a superclass of '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "        class A {}\n        class B extends A {\n          foo() => super.x;\n        }\n        main() { new B().foo(); }\n        "
+    ]
+  },
+  "UNDEFINED_SUPER_METHOD": {
+    "id": "ERUSKD",
+    "subId": 10,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "The method '#{memberName}' is not defined in a superclass of '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "        class A {}\n        class B extends A {\n          foo() => super.x();\n        }\n        main() { new B().foo(); }\n        "
+    ]
+  },
+  "UNDEFINED_SUPER_OPERATOR": {
+    "id": "ERUSKD",
+    "subId": 11,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "The operator '#{memberName}' is not defined in a superclass of '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "        class A {}\n        class B extends A {\n          foo() => super + 499;\n        }\n        main() { new B().foo(); }\n        "
+    ]
+  },
+  "UNDEFINED_SUPER_SETTER": {
+    "id": "ERUSKD",
+    "subId": 12,
+    "categories": [
+      "StaticTypeWarning",
+      "StaticWarning"
+    ],
+    "template": "The setter '#{memberName}' is not defined in a superclass of '#{className}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer",
+      "Platform.dart2js"
+    ],
+    "examples": [
+      "        class A {}\n        class B extends A {\n          foo() { super.x = 499; }\n        }\n        main() { new B().foo(); }\n        "
+    ]
+  },
+  "UNDEFINED_FUNCTION": {
+    "id": "ERUSKD",
+    "subId": 13,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "The function '#{memberName}' is not defined.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.analyzer"
+    ],
+    "examples": [
+      "main() { foo(); }"
+    ]
+  },
+  "UNDEFINED_STATIC_GETTER_BUT_SETTER": {
+    "id": "ERUSKD",
+    "subId": 14,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "Cannot resolve getter '#{name}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js"
+    ],
+    "examples": [
+      "set foo(x) {}  main() { foo; }"
+    ]
+  },
+  "UNDEFINED_STATIC_SETTER_BUT_GETTER": {
+    "id": "ERUSKD",
+    "subId": 15,
+    "categories": [
+      "StaticTypeWarning"
+    ],
+    "template": "Cannot resolve setter '#{name}'.",
+    "templateHoleOrder": null,
+    "howToFix": null,
+    "options": null,
+    "usedBy": [
+      "Platform.dart2js"
+    ],
+    "examples": [
+      "        main() {\n          final x = 1;\n          x = 2;\n        }",
+      "        main() {\n          const x = 1;\n          x = 2;\n        }\n        ",
+      "        final x = 1;\n        main() { x = 3; }\n        ",
+      "        const x = 1;\n        main() { x = 3; }\n        ",
+      "get foo => null  main() { foo = 5; }",
+      "const foo = 0  main() { foo = 5; }"
+    ]
   }
 }
\ No newline at end of file
diff --git a/pkg/dart_messages/lib/shared_messages.dart b/pkg/dart_messages/lib/shared_messages.dart
index ece8895..c2e73c7 100644
--- a/pkg/dart_messages/lib/shared_messages.dart
+++ b/pkg/dart_messages/lib/shared_messages.dart
@@ -77,6 +77,12 @@
 
   static final compileTimeError = new Category("CompileTimeError");
 
+  static final staticTypeWarning = new Category("StaticTypeWarning");
+
+  static final staticWarning = new Category("StaticWarning");
+
+  static final hint = new Category("Hint");
+
   final String name;
 
   Category(this.name);
@@ -100,16 +106,24 @@
   /// This id just needs to be unique within the same [id].
   final int subId;
 
-  /// The error sub-id of which this message is a specialization.
+  /// The error of which this message is a specialization.
   ///
   /// For example, "Const is not allowed on getters" may be a specialization of
   /// "The 'const' keyword is not allowed here".
   ///
   /// Examples of the specialized message, should trigger for the more generic
   /// message, when the platform doesn't support the more specialized message.
-  final int specializationOf;
+  ///
+  /// Specializations must have the same error-id (but not sub-id) as the more
+  /// generic message.
+  final String specializationOf;
 
-  final Category category;
+  /// The categories of this message.
+  ///
+  /// The same message can be used in multiple categories, for example, as
+  /// hint and warning.
+  final List<Category> categories;
+
   final String template;
   // The analyzer fills holes positionally (and not named). The following field
   // overrides the order of the holes.
@@ -127,8 +141,8 @@
   Message(
       {this.id,
       this.subId: 0,
-      this.specializationOf: -1,
-      this.category,
+      this.specializationOf: null,
+      this.categories,
       this.template,
       this.templateHoleOrder,
       this.howToFix,
@@ -143,7 +157,8 @@
     jsonified[name] = {
       'id': message.id,
       'subId': message.subId,
-      'category': message.category.name,
+      'categories':
+          message.categories.map((category) => category.name).toList(),
       'template': message.template,
       'templateHoleOrder': message.templateHoleOrder,
       'howToFix': message.howToFix,
@@ -158,7 +173,7 @@
 final Map<String, Message> MESSAGES = {
   'exampleMessage': new Message(
       id: 'use an Id generated by bin/message_id.dart',
-      category: Category.analysisOptionsError,
+      categories: [Category.analysisOptionsError],
       template: "#use #named #arguments",
       templateHoleOrder: ["arguments", "named", "use"],
       howToFix: "an explanation on how to fix things",
@@ -176,41 +191,14 @@
         }
       ]),
 
-  // Const constructors (factory or not) may not have a body.
-  'CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY': new Message(
-      id: 'LGJGHW',
-      subId: 0,
-      category: Category.parserError,
-      template: "Const constructor or factory can't have a body.",
-      howToFix: "Remove the 'const' keyword or the body.",
-      usedBy: [
-        dart2js
-      ],
-      examples: const [
-        r"""
-         class C {
-           const C() {}
-         }
-
-         main() => new C();""",
-        r"""
-         class C {
-           const factory C() {}
-         }
-
-         main() => new C();"""
-      ]),
   // Const constructors may not have a body.
   'CONST_CONSTRUCTOR_WITH_BODY': new Message(
       id: 'LGJGHW',
-      subId: 1,
-      specializationOf: 0,
-      category: Category.parserError,
+      subId: 0,
+      categories: [Category.parserError],
       template: "Const constructor can't have a body.",
       howToFix: "Try removing the 'const' keyword or the body.",
-      usedBy: [
-        analyzer
-      ],
+      usedBy: [analyzer, dart2js],
       examples: const [
         r"""
          class C {
@@ -222,16 +210,13 @@
   // Const constructor factories may only redirect (and must not have a body).
   'CONST_FACTORY': new Message(
       id: 'LGJGHW',
-      subId: 2,
-      specializationOf: 0,
-      category: Category.parserError,
+      subId: 1,
+      categories: [Category.parserError],
       template: "Only redirecting factory constructors can be declared to "
           "be 'const'.",
       howToFix: "Try removing the 'const' keyword or replacing the body with "
           "'=' followed by a valid target.",
-      usedBy: [
-        analyzer
-      ],
+      usedBy: [analyzer, dart2js],
       examples: const [
         r"""
          class C {
@@ -244,12 +229,10 @@
   'EXTRANEOUS_MODIFIER': new Message(
       id: 'GRKIQE',
       subId: 0,
-      category: Category.parserError,
+      categories: [Category.parserError],
       template: "Can't have modifier '#{modifier}' here.",
       howToFix: "Try removing '#{modifier}'.",
-      usedBy: [
-        dart2js
-      ],
+      usedBy: [dart2js],
       examples: const [
         "var String foo; main(){}",
         // "var get foo; main(){}",
@@ -273,13 +256,11 @@
   'EXTRANEOUS_MODIFIER_REPLACE': new Message(
       id: 'GRKIQE',
       subId: 1,
-      category: Category.parserError,
+      categories: [Category.parserError],
       template: "Can't have modifier '#{modifier}' here.",
       howToFix: "Try replacing modifier '#{modifier}' with 'var', 'final', "
           "or a type.",
-      usedBy: [
-        dart2js
-      ],
+      usedBy: [dart2js],
       examples: const [
         // "get foo; main(){}",
         "set foo; main(){}",
@@ -291,15 +272,14 @@
   'CONST_CLASS': new Message(
       id: 'GRKIQE',
       subId: 2,
-      // The specialization could also be 1, but the example below triggers 0.
-      specializationOf: 0,
-      category: Category.parserError,
-      template: "Classes can't be declared to be 'const'",
+      // The specialization could also be 'EXTRANEOUS_MODIFIER_REPLACE', but the
+      // example below triggers 'EXTRANEOUS_MODIFIER'.
+      specializationOf: 'EXTRANEOUS_MODIFIER',
+      categories: [Category.parserError],
+      template: "Classes can't be declared to be 'const'.",
       howToFix: "Try removing the 'const' keyword or moving to the class'"
           " constructor(s).",
-      usedBy: [
-        analyzer
-      ],
+      usedBy: [analyzer],
       examples: const [
         r"""
         const class C {}
@@ -311,14 +291,13 @@
   'CONST_METHOD': new Message(
       id: 'GRKIQE',
       subId: 3,
-      // The specialization could also be 1, but the example below triggers 0.
-      specializationOf: 0,
-      category: Category.parserError,
-      template: "Getters, setters and methods can't be declared to be 'const'",
+      // The specialization could also be 'EXTRANEOUS_MODIFIER_REPLACE', but the
+      // example below triggers 'EXTRANEOUS_MODIFIER'.
+      specializationOf: 'EXTRANEOUS_MODIFIER',
+      categories: [Category.parserError],
+      template: "Getters, setters and methods can't be declared to be 'const'.",
       howToFix: "Try removing the 'const' keyword.",
-      usedBy: [
-        analyzer
-      ],
+      usedBy: [analyzer],
       examples: const [
         "const int foo() => 499; main() {}",
         "const int get foo => 499; main() {}",
@@ -331,10 +310,11 @@
   'CONST_ENUM': new Message(
       id: 'GRKIQE',
       subId: 4,
-      // The specialization could also be 1, but the example below triggers 0.
-      specializationOf: 0,
-      category: Category.parserError,
-      template: "Enums can't be declared to be 'const'",
+      // The specialization could also be 'EXTRANEOUS_MODIFIER_REPLACE', but the
+      // example below triggers 'EXTRANEOUS_MODIFIER'.
+      specializationOf: 'EXTRANEOUS_MODIFIER',
+      categories: [Category.parserError],
+      template: "Enums can't be declared to be 'const'.",
       howToFix: "Try removing the 'const' keyword.",
       usedBy: [analyzer],
       examples: const ["const enum Foo { x } main() {}",]),
@@ -342,10 +322,11 @@
   'CONST_TYPEDEF': new Message(
       id: 'GRKIQE',
       subId: 5,
-      // The specialization could also be 1, but the example below triggers 0.
-      specializationOf: 0,
-      category: Category.parserError,
-      template: "Type aliases can't be declared to be 'const'",
+      // The specialization could also be 'EXTRANEOUS_MODIFIER_REPLACE', but the
+      // example below triggers 'EXTRANEOUS_MODIFIER'.
+      specializationOf: 'EXTRANEOUS_MODIFIER',
+      categories: [Category.parserError],
+      template: "Type aliases can't be declared to be 'const'.",
       howToFix: "Try removing the 'const' keyword.",
       usedBy: [analyzer],
       examples: const ["const typedef void Foo(); main() {}",]),
@@ -353,14 +334,13 @@
   'CONST_AND_FINAL': new Message(
       id: 'GRKIQE',
       subId: 6,
-      // The specialization could also be 1, but the example below triggers 0.
-      specializationOf: 0,
-      category: Category.parserError,
-      template: "Members can't be declared to be both 'const' and 'final'",
+      // The specialization could also be 'EXTRANEOUS_MODIFIER_REPLACE', but the
+      // example below triggers 'EXTRANEOUS_MODIFIER'.
+      specializationOf: 'EXTRANEOUS_MODIFIER',
+      categories: [Category.parserError],
+      template: "Members can't be declared to be both 'const' and 'final'.",
       howToFix: "Try removing either the 'const' or 'final' keyword.",
-      usedBy: [
-        analyzer
-      ],
+      usedBy: [analyzer],
       examples: const [
         "final const int x = 499; main() {}",
         "const final int x = 499; main() {}",
@@ -371,14 +351,13 @@
   'CONST_AND_VAR': new Message(
       id: 'GRKIQE',
       subId: 7,
-      // The specialization could also be 1, but the example below triggers 0.
-      specializationOf: 0,
-      category: Category.parserError,
-      template: "Members can't be declared to be both 'const' and 'var'",
+      // The specialization could also be 'EXTRANEOUS_MODIFIER_REPLACE', but the
+      // example below triggers 'EXTRANEOUS_MODIFIER'.
+      specializationOf: 'EXTRANEOUS_MODIFIER',
+      categories: [Category.parserError],
+      template: "Members can't be declared to be both 'const' and 'var'.",
       howToFix: "Try removing either the 'const' or 'var' keyword.",
-      usedBy: [
-        analyzer
-      ],
+      usedBy: [analyzer],
       examples: const [
         "var const x = 499; main() {}",
         "const var x = 499; main() {}",
@@ -390,7 +369,7 @@
       // Dart2js currently reports this as an EXTRANEOUS_MODIFIER error.
       // TODO(floitsch): make dart2js use this error instead.
       id: 'DOTHQH',
-      category: Category.parserError,
+      categories: [Category.parserError],
       template: "Classes can't be declared inside other classes.",
       howToFix: "Try moving the class to the top-level.",
       usedBy: [analyzer],
@@ -398,8 +377,8 @@
 
   'CONSTRUCTOR_WITH_RETURN_TYPE': new Message(
       id: 'VOJBWY',
-      category: Category.parserError,
-      template: "Constructors can't have a return type",
+      categories: [Category.parserError],
+      template: "Constructors can't have a return type.",
       howToFix: "Try removing the return type.",
       usedBy: [analyzer, dart2js],
       examples: const ["class A { int A() {} } main() { new A(); }",]),
@@ -407,13 +386,10 @@
   'MISSING_EXPRESSION_IN_THROW': new Message(
       id: 'FTGGMJ',
       subId: 0,
-      category: Category.parserError,
+      categories: [Category.parserError],
       template: "Missing expression after 'throw'.",
       howToFix: "Did you mean 'rethrow'?",
-      usedBy: [
-        analyzer,
-        dart2js
-      ],
+      usedBy: [analyzer, dart2js],
       examples: const [
         'main() { throw; }',
         'main() { try { throw 0; } catch(e) { throw; } }'
@@ -425,8 +401,8 @@
    */
   'RETHROW_OUTSIDE_CATCH': new Message(
       id: 'MWETLC',
-      category: Category.compileTimeError,
-      template: 'Rethrow must be inside of catch clause',
+      categories: [Category.compileTimeError],
+      template: 'Rethrow must be inside of catch clause.',
       howToFix: "Try moving the expression into a catch clause, or "
           "using a 'throw' expression.",
       usedBy: [analyzer, dart2js],
@@ -438,14 +414,11 @@
    */
   'RETURN_IN_GENERATIVE_CONSTRUCTOR': new Message(
       id: 'UOTDQH',
-      category: Category.compileTimeError,
+      categories: [Category.compileTimeError],
       template: "Constructors can't return values.",
       howToFix:
           "Try removing the return statement or using a factory constructor.",
-      usedBy: [
-        analyzer,
-        dart2js
-      ],
+      usedBy: [analyzer, dart2js],
       examples: const [
         """
         class C {
@@ -464,15 +437,12 @@
   'RETURN_IN_GENERATOR': new Message(
       id: 'JRUTUQ',
       subId: 0,
-      category: Category.compileTimeError,
+      categories: [Category.compileTimeError],
       template: "Can't return a value from a generator function "
           "(using the '#{modifier}' modifier).",
       howToFix: "Try removing the value, replacing 'return' with 'yield' or"
-          " changing the method body modifier",
-      usedBy: [
-        analyzer,
-        dart2js
-      ],
+          " changing the method body modifier.",
+      usedBy: [analyzer, dart2js],
       examples: const [
         """
         foo() async* { return 0; }
@@ -483,4 +453,430 @@
         main() => foo();
         """
       ]),
+
+  'NOT_ASSIGNABLE': new Message(
+      id: 'FYQYXB',
+      subId: 0,
+      categories: [Category.staticTypeWarning],
+      template: "'#{fromType}' is not assignable to '#{toType}'.",
+      usedBy: [dart2js]),
+
+  'FORIN_NOT_ASSIGNABLE': new Message(
+      id: 'FYQYXB',
+      subId: 1,
+      categories: [Category.hint],
+      template: "The element type '#{currentType}' of '#{expressionType}' "
+          "is not assignable to '#{elementType}'.",
+      usedBy: [dart2js],
+      examples: const [
+        """
+        main() {
+          List<int> list = <int>[1, 2];
+          for (String x in list) x;
+        }
+        """
+      ]),
+
+  /**
+   * 13.11 Return: It is a static type warning if the type of <i>e</i> may not
+   * be assigned to the declared return type of the immediately enclosing
+   * function.
+   */
+  'RETURN_OF_INVALID_TYPE': new Message(
+      id: 'FYQYXB',
+      subId: 2,
+      specializationOf: 'NOT_ASSIGNABLE',
+      categories: [Category.staticTypeWarning],
+      template: "The return type '#{fromType}' is not a '#{toType}', as "
+          "defined by the method '#{method}'.",
+      usedBy: [analyzer],
+      examples: const ["int foo() => 'foo'; main() { foo(); }"]),
+
+  /**
+   * 12.11.1 New: It is a static warning if the static type of <i>a<sub>i</sub>,
+   * 1 &lt;= i &lt;= n+ k</i> may not be assigned to the type of the
+   * corresponding formal parameter of the constructor <i>T.id</i> (respectively
+   * <i>T</i>).
+   *
+   * 12.11.2 Const: It is a static warning if the static type of
+   * <i>a<sub>i</sub>, 1 &lt;= i &lt;= n+ k</i> may not be assigned to the type
+   * of the corresponding formal parameter of the constructor <i>T.id</i>
+   * (respectively <i>T</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>.
+   *
+   * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub>, 1
+   * &lt;= i &lt;= l</i>, must have a corresponding named parameter in the set
+   * <i>{p<sub>n+1</sub>, &hellip; p<sub>n+k</sub>}</i> or a static warning
+   * occurs. It is a static warning if <i>T<sub>m+j</sub></i> may not be
+   * assigned to <i>S<sub>r</sub></i>, where <i>r = q<sub>j</sub>, 1 &lt;= j
+   * &lt;= l</i>.
+   */
+  'ARGUMENT_TYPE_NOT_ASSIGNABLE': new Message(
+      id: 'FYQYXB',
+      subId: 3,
+      specializationOf: 'NOT_ASSIGNABLE',
+      categories: [Category.hint, Category.staticWarning],
+      template: "The argument type '#{fromType}' cannot be assigned to the "
+          "parameter type '#{toType}'.",
+      usedBy: [analyzer],
+      // TODO(floitsch): support hint warnings and ways to specify which
+      // category an example should trigger for.
+      examples: const ["foo(int x) => x; main() { foo('bar'); }"]),
+
+  'CANNOT_RESOLVE': new Message(
+      id: 'ERUSKD',
+      subId: 0,
+      categories: [Category.staticTypeWarning],
+      template: "Can't resolve '#{name}'.",
+      usedBy: [dart2js]),
+
+  /**
+   * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
+   * It is a static type warning if <i>T</i> does not have an accessible
+   * instance member named <i>m</i>.
+   */
+  'UNDEFINED_METHOD': new Message(
+      id: 'ERUSKD',
+      subId: 1,
+      categories: [Category.staticTypeWarning, Category.hint],
+      template: "The method '#{memberName}' is not defined for the class"
+          " '#{className}'.",
+      usedBy: [dart2js, analyzer],
+      examples: const [
+        """
+        class A {
+          foo() { bar(); }
+        }
+        main() { new A().foo(); }
+        """,
+      ]),
+
+  /**
+   * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
+   * It is a static type warning if <i>T</i> does not have an accessible
+   * instance member named <i>m</i>.
+   */
+  'UNDEFINED_METHOD_WITH_CONSTRUCTOR': new Message(
+      id: 'ERUSKD',
+      subId: 2,
+      specializationOf: "UNDEFINED_METHOD",
+      categories: [Category.staticTypeWarning],
+      template: "The method '#{memberName}' is not defined for the class"
+          " '#{className}', but a constructor with that name is defined.",
+      howToFix: "Try adding 'new' or 'const' to invoke the constuctor, or "
+          "change the method name.",
+      usedBy: [analyzer],
+      examples: const [
+        """
+        class A {
+          A.bar() {}
+        }
+        main() { A.bar(); }
+        """,
+      ]),
+
+  /**
+   * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
+   * a static type warning if <i>T</i> does not have a getter named <i>m</i>.
+   */
+  'UNDEFINED_GETTER': new Message(
+      id: 'ERUSKD',
+      subId: 3,
+      categories: [
+        Category.staticTypeWarning,
+        Category.staticWarning,
+        Category.hint
+      ],
+      template: "The getter '#{memberName}' is not defined for the "
+          "class '#{className}'.",
+      usedBy: [dart2js, analyzer],
+      examples: const [
+        "class A {} main() { new A().x; }",
+        "class A {} main() { A.x; }"
+      ]),
+
+  /**
+   * 12.17 Getter Invocation: It is a static warning if there is no class
+   * <i>C</i> in the enclosing lexical scope of <i>i</i>, or if <i>C</i> does
+   * not declare, implicitly or explicitly, a getter named <i>m</i>.
+   */
+  'UNDEFINED_ENUM_CONSTANT': new Message(
+      id: 'ERUSKD',
+      subId: 4,
+      specializationOf: 'UNDEFINED_GETTER',
+      categories: [Category.staticTypeWarning],
+      template: "There is no constant named '#{memberName}' in '#{className}'.",
+      usedBy: [analyzer],
+      examples: const [
+        """
+        enum E { ONE }
+        E e() { return E.TWO; }
+        main() { e(); }
+       """
+      ]),
+
+  'UNDEFINED_INSTANCE_GETTER_BUT_SETTER': new Message(
+      id: 'ERUSKD',
+      subId: 5,
+      specializationOf: 'UNDEFINED_GETTER',
+      categories: [Category.staticTypeWarning,],
+      template: "The setter '#{memberName}' in class '#{className}' can"
+          " not be used as a getter.",
+      usedBy: [dart2js],
+      examples: const ["class A { set x(y) {} } main() { new A().x; }",]),
+
+  /**
+   * 12.18 Assignment: Evaluation of an assignment of the form
+   * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is
+   * equivalent to the evaluation of the expression (a, i, e){a.[]=(i, e);
+   * return e;} (<i>e<sub>1</sub></i>, <i>e<sub>2</sub></i>,
+   * <i>e<sub>2</sub></i>).
+   *
+   * 12.29 Assignable Expressions: An assignable expression of the form
+   * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method
+   * invocation of the operator method [] on <i>e<sub>1</sub></i> with argument
+   * <i>e<sub>2</sub></i>.
+   *
+   * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
+   * It is a static type warning if <i>T</i> does not have an accessible
+   * instance member named <i>m</i>.
+   */
+  'UNDEFINED_OPERATOR': new Message(
+      id: 'ERUSKD',
+      subId: 6,
+      categories: [Category.staticTypeWarning, Category.hint],
+      template: "The operator '#{memberName}' is not defined for the "
+          "class '#{className}'.",
+      usedBy: [dart2js, analyzer],
+      examples: const ["class A {} main() { new A() + 3; }",]),
+
+  /**
+   * 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
+   * instance setter named <i>v=</i>.
+   *
+   * 12.18 Assignment: It is as static warning if an assignment of the form
+   * <i>v = e</i> occurs inside a top level or static function (be it function,
+   * method, getter, or setter) or variable initializer and there is no
+   * declaration <i>d</i> with name <i>v=</i> in the lexical scope enclosing the
+   * assignment.
+   *
+   * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in
+   * the enclosing lexical scope of the assignment, or if <i>C</i> does not
+   * declare, implicitly or explicitly, a setter <i>v=</i>.
+   */
+  'UNDEFINED_SETTER': new Message(
+      id: 'ERUSKD',
+      subId: 7,
+      categories: [
+        Category.staticTypeWarning,
+        Category.staticWarning,
+        Category.hint
+      ],
+      template: "The setter '#{memberName}' is not defined for the "
+          "class '#{className}'.",
+      usedBy: [dart2js, analyzer],
+      examples: const ["class A {} main() { new A().x = 499; }",]),
+
+  'NO_SUCH_SUPER_MEMBER': new Message(
+      id: 'ERUSKD',
+      subId: 8,
+      categories: [Category.staticTypeWarning],
+      template:
+          "Can't resolve '#{memberName}' in a superclass of '#{className}'.",
+      usedBy: [dart2js]),
+
+  /**
+   * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
+   * a static type warning if <i>T</i> does not have a getter named <i>m</i>.
+   *
+   * 12.17 Getter Invocation: It is a static warning if there is no class
+   * <i>C</i> in the enclosing lexical scope of <i>i</i>, or if <i>C</i> does
+   * not declare, implicitly or explicitly, a getter named <i>m</i>.
+   */
+  'UNDEFINED_SUPER_GETTER': new Message(
+      id: 'ERUSKD',
+      subId: 9,
+      specializationOf: 'NO_SUCH_SUPER_MEMBER',
+      categories: [Category.staticTypeWarning, Category.staticWarning],
+      template: "The getter '#{memberName}' is not defined in a superclass "
+          "of '#{className}'.",
+      usedBy: [analyzer],
+      examples: const [
+        """
+        class A {}
+        class B extends A {
+          foo() => super.x;
+        }
+        main() { new B().foo(); }
+        """
+      ]),
+
+  /**
+   * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
+   * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>:
+   * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a
+   * static type warning if <i>S</i> does not have an accessible instance member
+   * named <i>m</i>.
+   */
+  'UNDEFINED_SUPER_METHOD': new Message(
+      id: 'ERUSKD',
+      subId: 10,
+      specializationOf: 'NO_SUCH_SUPER_MEMBER',
+      categories: [Category.staticTypeWarning],
+      template: "The method '#{memberName}' is not defined in a superclass "
+          "of '#{className}'.",
+      usedBy: [analyzer],
+      examples: const [
+        """
+        class A {}
+        class B extends A {
+          foo() => super.x();
+        }
+        main() { new B().foo(); }
+        """
+      ]),
+
+  /**
+   * 12.18 Assignment: Evaluation of an assignment of the form
+   * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is
+   * equivalent to the evaluation of the expression (a, i, e){a.[]=(i, e);
+   * return e;} (<i>e<sub>1</sub></i>, <i>e<sub>2</sub></i>,
+   * <i>e<sub>2</sub></i>).
+   *
+   * 12.29 Assignable Expressions: An assignable expression of the form
+   * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method
+   * invocation of the operator method [] on <i>e<sub>1</sub></i> with argument
+   * <i>e<sub>2</sub></i>.
+   *
+   * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
+   * It is a static type warning if <i>T</i> does not have an accessible
+   * instance member named <i>m</i>.
+   */
+  'UNDEFINED_SUPER_OPERATOR': new Message(
+      id: 'ERUSKD',
+      subId: 11,
+      specializationOf: 'NO_SUCH_SUPER_MEMBER',
+      categories: [Category.staticTypeWarning],
+      template: "The operator '#{memberName}' is not defined in a superclass "
+          "of '#{className}'.",
+      usedBy: [analyzer],
+      examples: const [
+        """
+        class A {}
+        class B extends A {
+          foo() => super + 499;
+        }
+        main() { new B().foo(); }
+        """
+      ]),
+
+  /**
+   * 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
+   * instance setter named <i>v=</i>.
+   *
+   * 12.18 Assignment: It is as static warning if an assignment of the form
+   * <i>v = e</i> occurs inside a top level or static function (be it function,
+   * method, getter, or setter) or variable initializer and there is no
+   * declaration <i>d</i> with name <i>v=</i> in the lexical scope enclosing the
+   * assignment.
+   *
+   * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in
+   * the enclosing lexical scope of the assignment, or if <i>C</i> does not
+   * declare, implicitly or explicitly, a setter <i>v=</i>.
+
+   */
+  'UNDEFINED_SUPER_SETTER': new Message(
+      id: 'ERUSKD',
+      subId: 12,
+      categories: [Category.staticTypeWarning, Category.staticWarning],
+      template: "The setter '#{memberName}' is not defined in a superclass "
+          "of '#{className}'.",
+      usedBy: [analyzer, dart2js,],
+      examples: const [
+        """
+        class A {}
+        class B extends A {
+          foo() { super.x = 499; }
+        }
+        main() { new B().foo(); }
+        """,
+        // TODO(floitsch): reenable this test.
+        /*
+        """
+        main() => new B().m();
+        class A {
+          get x => 1;
+        }
+        class B extends A {
+          m() { super.x = 2; }
+        }
+        """
+        */
+      ]),
+
+  /**
+   * 12.15.3 Unqualified Invocation: If there exists a lexically visible
+   * declaration named <i>id</i>, let <i>f<sub>id</sub></i> be the innermost
+   * such declaration. Then: [skip]. Otherwise, <i>f<sub>id</sub></i> is
+   * considered equivalent to the ordinary method invocation
+   * <b>this</b>.<i>id</i>(<i>a<sub>1</sub></i>, ..., <i>a<sub>n</sub></i>,
+   * <i>x<sub>n+1</sub></i> : <i>a<sub>n+1</sub></i>, ...,
+   * <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i>).
+   */
+  'UNDEFINED_FUNCTION': new Message(
+      id: 'ERUSKD',
+      subId: 13,
+      specializationOf: 'CANNOT_RESOLVE',
+      categories: [Category.staticTypeWarning],
+      template: "The function '#{memberName}' is not defined.",
+      usedBy: [analyzer],
+      examples: const ["main() { foo(); }",]),
+
+  'UNDEFINED_STATIC_GETTER_BUT_SETTER': new Message(
+      id: 'ERUSKD',
+      subId: 14,
+      specializationOf: 'CANNOT_RESOLVE',
+      categories: [Category.staticTypeWarning],
+      template: "Cannot resolve getter '#{name}'.",
+      usedBy: [dart2js],
+      examples: const ["set foo(x) {}  main() { foo; }",]),
+
+  'UNDEFINED_STATIC_SETTER_BUT_GETTER': new Message(
+      id: 'ERUSKD',
+      subId: 15,
+      specializationOf: 'CANNOT_RESOLVE',
+      categories: [Category.staticTypeWarning],
+      template: "Cannot resolve setter '#{name}'.",
+      usedBy: [dart2js],
+      examples: const [
+        """
+        main() {
+          final x = 1;
+          x = 2;
+        }""",
+        """
+        main() {
+          const x = 1;
+          x = 2;
+        }
+        """,
+        """
+        final x = 1;
+        main() { x = 3; }
+        """,
+        """
+        const x = 1;
+        main() { x = 3; }
+        """,
+        "get foo => null  main() { foo = 5; }",
+        "const foo = 0  main() { foo = 5; }",
+      ]),
 };
diff --git a/pkg/dart_messages/test/dart_messages_test.dart b/pkg/dart_messages/test/dart_messages_test.dart
index b05bc3f..80ecaaf 100644
--- a/pkg/dart_messages/test/dart_messages_test.dart
+++ b/pkg/dart_messages/test/dart_messages_test.dart
@@ -33,7 +33,24 @@
   }
 }
 
+void testSpecializationsAreOfSameId() {
+  for (var entry in MESSAGES.values) {
+    var specializationOf = entry.specializationOf;
+    if (specializationOf == null) continue;
+    var generic = MESSAGES[specializationOf];
+    if (generic == null) {
+      throw "More generic message doesn't exist: $specializationOf";
+    }
+    if (generic.id != entry.id) {
+      var id = "${entry.id}-${entry.subId}";
+      var genericId = "${generic.id}-${generic.subId}";
+      throw "Specialization doesn't have same id: $id - $genericId";
+    }
+  }
+}
+
 void main() {
   testJsonIsUpdated();
   testIdsAreUnique();
+  testSpecializationsAreOfSameId();
 }
diff --git a/pkg/fixnum/lib/src/int64.dart b/pkg/fixnum/lib/src/int64.dart
index 769ef21..7770eb1 100644
--- a/pkg/fixnum/lib/src/int64.dart
+++ b/pkg/fixnum/lib/src/int64.dart
@@ -30,7 +30,7 @@
   static const int _MASK = 4194303; // (1 << _BITS) - 1
   static const int _MASK2 = 1048575; // (1 << _BITS2) - 1
   static const int _SIGN_BIT = 19; // _BITS2 - 1
-  static const int _SIGN_BIT_MASK = 524288; // 1 << _SIGN_BIT
+  static const int _SIGN_BIT_MASK = 1 << _SIGN_BIT;
 
   /**
    * The maximum positive value attainable by an [Int64], namely
diff --git a/pkg/fixnum/lib/src/intx.dart b/pkg/fixnum/lib/src/intx.dart
index 7adbf0c..f132aff 100644
--- a/pkg/fixnum/lib/src/intx.dart
+++ b/pkg/fixnum/lib/src/intx.dart
@@ -128,7 +128,7 @@
   IntX abs();
 
   /** Clamps this integer to be in the range [lowerLimit] - [upperLimit]. */
-  IntX clamp(IntX lowerLimit, IntX upperLimit);
+  IntX clamp(lowerLimit, upperLimit);
 
   /**
    * Returns the minimum number of bits required to store this integer.
diff --git a/pkg/fixnum/test/int_32_test.dart b/pkg/fixnum/test/int_32_test.dart
index 9773deb..e5c8c5f 100644
--- a/pkg/fixnum/test/int_32_test.dart
+++ b/pkg/fixnum/test/int_32_test.dart
@@ -56,8 +56,6 @@
     Int32 n2 = new Int32(9876);
     Int32 n3 = new Int32(-1234);
     Int32 n4 = new Int32(-9876);
-    Int32 n5 = new Int32(0x12345678);
-    Int32 n6 = new Int32(0x22222222);
 
     test("+", () {
       expect(n1 + n2, new Int32(11110));
diff --git a/pkg/meta/CHANGELOG.md b/pkg/meta/CHANGELOG.md
index fc3f06e..b7c6b01 100644
--- a/pkg/meta/CHANGELOG.md
+++ b/pkg/meta/CHANGELOG.md
@@ -1,3 +1,16 @@
+## 0.12.0
+* Introduce `@optionalTypeArgs` annotation for classes whose type arguments are to be treated as optional.
+
+## 0.11.0
+* Added new `Required` constructor with a means to specify a reason to explain why a parameter is required.
+
+## 0.10.0
+* Introduce `@factory` annotation for methods that must either be abstract or
+must return a newly allocated object.
+* Introduce `@literal` annotation that indicates that any invocation of a
+constructor must use the keyword `const` unless one or more of the
+arguments to the constructor is not a compile-time constant.
+
 ## 0.9.0
 * Introduce `@protected` annotation for members that must only be called from
 instance members of subclasses.
diff --git a/pkg/meta/lib/meta.dart b/pkg/meta/lib/meta.dart
index c94fd80..b8142fd 100644
--- a/pkg/meta/lib/meta.dart
+++ b/pkg/meta/lib/meta.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.
 
-/// Constants for use in metadata annotations such as `@protected`.
+/// Constants for use in metadata annotations.
 ///
 /// See also `@deprecated` and `@override` in the `dart:core` library.
 ///
@@ -56,6 +56,12 @@
 ///   without invoking the overridden method.
 const _MustCallSuper mustCallSuper = const _MustCallSuper();
 
+/// Used to annotate a class declaration `C`. Indicates that any type arguments
+/// declared on `C` are to be treated as optional.  Tools such as the analyzer
+/// and linter can use this information to suppress warnings that would
+/// otherwise require type arguments to be provided for instances of `C`.
+const _OptionalTypeArgs optionalTypeArgs = const _OptionalTypeArgs();
+
 /// Used to annotate an instance member (method, getter, setter, operator, or
 /// field) `m` in a class `C`. If the annotation is on a field it applies to the
 /// getter, and setter if appropriate, that are induced by the field. Indicates
@@ -84,7 +90,26 @@
 ///   name that does not have this annotation, or
 /// * an invocation of a method or function does not include an argument
 ///   corresponding to a named parameter that has this annotation.
-const _Required required = const _Required();
+const Required required = const Required();
+
+/// Used to annotate a named parameter `p` in a method or function `f`.
+///
+/// See [required] for more details.
+class Required {
+  /// A human-readable explanation of the reason why the annotated parameter is
+  /// required. For example, the annotation might look like:
+  ///
+  ///     ButtonWidget({
+  ///         Function onHover,
+  ///         @Required('Buttons must do something when pressed')
+  ///         Function onPressed,
+  ///         ...
+  ///     }) ...
+  final String reason;
+
+  /// Initialize a newly created instance to have the given [reason].
+  const Required([this.reason]);
+}
 
 class _Factory {
   const _Factory();
@@ -98,10 +123,10 @@
   const _MustCallSuper();
 }
 
-class _Protected {
-  const _Protected();
+class _OptionalTypeArgs {
+  const _OptionalTypeArgs();
 }
 
-class _Required {
-  const _Required();
+class _Protected {
+  const _Protected();
 }
diff --git a/pkg/meta/pubspec.yaml b/pkg/meta/pubspec.yaml
index 4b20d9c..d2f5506 100644
--- a/pkg/meta/pubspec.yaml
+++ b/pkg/meta/pubspec.yaml
@@ -1,5 +1,5 @@
 name: meta
-version: 0.9.0
+version: 0.12.0
 author: Dart Team <misc@dartlang.org>
 homepage: http://www.dartlang.org
 description: >
diff --git a/pkg/pkg.status b/pkg/pkg.status
index f0e031c..c991ab2 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -44,40 +44,59 @@
 analysis_server/test/search/top_level_declarations_test: Pass, Slow # 19756, 21628
 analysis_server/test/services/index/store/codec_test: Pass, Slow
 analysis_server/test/socket_server_test: Pass, Slow # Issue 19756, 21628
+analyzer/test/context/declared_variables_test: Pass, Slow # Issue 21628
 analyzer/test/dart/element/element_test: Pass, Slow # Issue 24914
 analyzer/test/dart/ast/ast_test: Pass, Slow # Issue 19756, 21628
 analyzer/test/dart/ast/utilities_test: Pass, Slow # Issue 19756, 21628
 analyzer/test/dart/ast/visitor_test: Pass, Slow # Issue 19756, 21628
 analyzer/test/enum_test: Slow, Pass, Fail # Issue 21323
+analyzer/test/non_hint_code_test: Pass, Slow # Issue 21628
+analyzer/test/strong_mode_test: Pass, Slow # Issue 21628
 analyzer/test/generated/all_the_rest_test: Pass, Slow # Issue 21628
+analyzer/test/generated/checked_mode_compile_time_error_code_test: Pass, Slow # Issue 21628
 analyzer/test/generated/ast_test: Pass, Slow # Issue 21628
-analyzer/test/generated/compile_time_error_code_test: Pass, Slow
+analyzer/test/generated/checked_mode_compile_time_error_code_test: Pass, Slow # Issue 21628
 analyzer/test/generated/compile_time_error_code_test: Pass, Slow # Issue 21628
 analyzer/test/generated/constant_test: Pass, Slow # Issue 24914
 analyzer/test/generated/declaration_resolver_test: Pass, Slow # Issue 24914
 analyzer/test/generated/element_test: Pass, Slow # Issue 21628
+analyzer/test/generated/element_resolver_test: Pass, Slow # Issue 21628
 analyzer/test/generated/error_suppression_test: Pass, Slow # Issue 21628
 analyzer/test/generated/engine_test: SkipSlow
+analyzer/test/generated/hint_code_test: Pass, Slow # Issue 21628
+analyzer/test/generated/non_hint_code_test: Pass, Slow # Issue 21628
 analyzer/test/generated/incremental_resolver_test: Pass, Slow # Issue 21628
 analyzer/test/generated/incremental_scanner_test: Pass, Slow # Issue 21628
+analyzer/test/generated/inheritance_manager_test: Pass, Slow # Issue 21628
 analyzer/test/generated/non_error_resolver_test: Pass, Slow # Issue 21628
 analyzer/test/generated/parser_test: Pass, Slow # Issue 21628
 analyzer/test/generated/resolver_test: Pass, Slow # Issue 21628
 analyzer/test/generated/scanner_test: Pass, Slow # Issue 21628
+analyzer/test/generated/simple_resolver_test: Pass, Slow # Issue 21628
 analyzer/test/generated/source_factory_test: Pass, Slow # Issue 21628
+analyzer/test/generated/static_type_analyzer_test: Pass, Slow # Issue 21628
 analyzer/test/generated/static_type_warning_code_test: Pass, Slow
 analyzer/test/generated/static_type_warning_code_test: Pass, Slow # Issue 21628
 analyzer/test/generated/static_warning_code_test: Pass, Slow # Issue 21628
+analyzer/test/generated/strong_mode_test: Pass, Slow # Issue 21628
+analyzer/test/generated/type_system_test: Pass, Slow # Issue 21628
 analyzer/test/generated/utilities_test: Pass, Slow # Issue 21628
 analyzer/test/src/context/cache_test: Pass, Slow # Issue 21628
 analyzer/test/src/context/context_test: Pass, Timeout # dartbug.com/23658
 analyzer/test/src/dart/ast/utilities_test: Pass, Slow # Issue 24914
+analyzer/test/src/dart/constant/evaluation_test: Pass, Slow # Issue 24914
+analyzer/test/src/dart/constant/value_test: Pass, Slow # Issue 24914
 analyzer/test/src/dart/element/element_test: Pass, Slow # Issue 24914
+analyzer/test/src/summary/incremental_cache_test: Pass, Slow # Issue 24914
+analyzer/test/src/summary/index_unit_test: Pass, Slow # Issue 24914
+analyzer/test/src/summary/linker_test: Pass, Slow # Issue 24914
 analyzer/test/src/summary/prelinker_test: Pass, Slow # Issue 24914
+analyzer/test/src/summary/resynthesize_ast_test: Pass, Slow
 analyzer/test/src/summary/resynthesize_strong_test: Pass, Slow
 analyzer/test/src/summary/resynthesize_test: Pass, Slow
 analyzer/test/src/summary/summary_sdk_test: Pass, Slow # Issue 24914
 analyzer/test/src/summary/summarize_ast_test: Pass, Slow # Issue 24914
+analyzer/test/src/summary/summarize_ast_strong_test: Pass, Slow # Issue 24914
 analyzer/test/src/summary/summarize_elements_strong_test: Pass, Slow # Issue 24914
 analyzer/test/src/summary/summarize_elements_test: Pass, Slow # Issue 24914
 analyzer/test/src/task/dart_test: Pass, Slow # Issue 21628
@@ -121,7 +140,8 @@
 analysis_server/index/store/codec_test: Pass, Slow # Issue 19756
 
 [ $runtime == jsshell ]
-async/test/stream_zip_test: RuntimeError, OK # Timers are not supported.
+async/test/stream_zip_test: RuntimeError, OK # Issue 26103. Timers are not supported.
+lookup_map/test/lookup_map_test: RuntimeError, OK # Issue 26103. Timers are not supported.
 
 [ $compiler == dart2js && $runtime == drt ]
 async/test/stream_zip_test: RuntimeError, Pass # Issue 18548
@@ -187,23 +207,46 @@
 analyzer/test/src/task/strong_mode_test: Pass, Slow # Times out due to inlining, but see issue 24485
 
 [ $compiler == dart2js && $cps_ir && $host_checked ]
+analyzer/test/dart/ast/ast_test: Crash # Issue 24485
+analyzer/test/dart/ast/visitor_test: Crash # Issue 24485
+analyzer/test/dart/element/element_test: Crash # Issue 24485
 analyzer/test/enum_test: Crash # Issue 24485
 analyzer/test/generated/all_the_rest_test: Crash # Issue 24485
 analyzer/test/generated/ast_test: Crash # Issue 24485
+analyzer/test/generated/checked_mode_compile_time_error_code_test: Crash # Issue 24485
 analyzer/test/generated/compile_time_error_code_test: Crash # Issue 24485
+analyzer/test/generated/constant_test: Crash # Issue 24485
+analyzer/test/generated/declaration_resolver_test: Crash # Issue 24485
+analyzer/test/generated/element_resolver_test: Crash # Issue 24485
 analyzer/test/generated/element_test: Crash # Issue 24485
+analyzer/test/generated/error_suppression_test: Crash # Issue 24485
+analyzer/test/generated/hint_code_test: Crash # Issue 24485
 analyzer/test/generated/incremental_resolver_test: Crash # Issue 24485
 analyzer/test/generated/incremental_scanner_test: Crash # Issue 24485
+analyzer/test/generated/inheritance_manager_test: Crash # Issue 24485
 analyzer/test/generated/non_error_resolver_test: Crash # Issue 24485
+analyzer/test/generated/non_hint_code_test: Crash # Issue 24485
 analyzer/test/generated/parser_test: Crash # Issue 24485
 analyzer/test/generated/resolver_test: Crash # Issue 24485
 analyzer/test/generated/scanner_test: Crash # Issue 24485
+analyzer/test/generated/simple_resolver_test: Crash # Issue 24485
 analyzer/test/generated/source_factory_test: Crash # Issue 24485
+analyzer/test/generated/static_type_analyzer_test: Crash # Issue 24485
 analyzer/test/generated/static_type_warning_code_test: Crash # Issue 24485
 analyzer/test/generated/static_warning_code_test: Crash # Issue 24485
+analyzer/test/generated/strong_mode_test: Crash # Issue 24485
 analyzer/test/generated/utilities_test: Crash # Issue 24485
 analyzer/test/src/context/cache_test: Crash # Issue 24485
 analyzer/test/src/context/context_test: Crash # Issue 24485
+analyzer/test/src/dart/ast/utilities_test: Crash # Issue 24485
+analyzer/test/src/dart/element/element_test: Crash # Issue 24485
+analyzer/test/src/summary/index_unit_test: Crash # Issue 24485
+analyzer/test/src/summary/prelinker_test: Crash # Issue 24485
+analyzer/test/src/summary/resynthesize_test: Crash # Issue 24485
+analyzer/test/src/summary/resynthesize_strong_test: Crash # Issue 24485
+analyzer/test/src/summary/summarize_ast_test: Crash # Issue 24485
+analyzer/test/src/summary/summarize_elements_test: Crash # Issue 24485
+analyzer/test/src/summary/summarize_elements_strong_test: Crash # Issue 24485
 analyzer/test/src/task/dart_test: Crash # Issue 24485
 analyzer/test/src/task/dart_work_manager_test: Crash # Issue 24485
 analyzer/test/src/task/driver_test: Crash # Issue 24485
@@ -214,9 +257,15 @@
 analyzer/test/src/task/inputs_test: Crash # Issue 24485
 analyzer/test/src/task/manager_test: Crash # Issue 24485
 analyzer/test/src/task/model_test: Crash # Issue 24485
-analyzer/test/src/task/strong/checker_test: Crash # t: Failed assertion: line 88 pos 12: '!variable2index.containsKey(element)' is not true.
-analyzer/test/src/task/strong/inferred_type_test: Crash # t: Failed assertion: line 88 pos 12: '!variable2index.containsKey(element)' is not true.
+analyzer/test/src/task/options_test: Crash # Issue 24485
+analyzer/test/src/task/options_work_manager_test: Crash # Issue 24485
+analyzer/test/src/task/strong/checker_test: Crash # Issue 24485
+analyzer/test/src/task/strong/inferred_type_test: Crash # Issue 24485
 analyzer/test/src/task/strong_mode_test: Crash # Issue 24485
+analyzer/test/src/task/yaml_test: Crash # Issue 24485
 
 [ $noopt || $runtime == dart_precompiled || $runtime == dart_product ]
 *: SkipByDesign # The pkg test framework imports dart:mirrors.
+
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # `assert` not implemented, about 75% tests crash
diff --git a/pkg/typed_data/LICENSE b/pkg/typed_data/LICENSE
deleted file mode 100644
index ee99930..0000000
--- a/pkg/typed_data/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Copyright 2013, the Dart 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.
diff --git a/pkg/typed_data/README.md b/pkg/typed_data/README.md
deleted file mode 100644
index e1e7db5..0000000
--- a/pkg/typed_data/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-Helper libraries for working with typed data lists.
-
-The `typed_data` package contains utility functions and classes that makes working with typed data lists easier.
-
-## Using
-
-The `typed_data` package can be imported as
-
-    import 'package:typed_data/typed_data.dart';
-
-## Typed buffers: Growable typed data lists
-
-Typed buffers are contains growable lists backed by typed arrays.
-These are similar to the growable lists returned by `new List()`, 
-but stores typed data like a typed data list.
\ No newline at end of file
diff --git a/pkg/typed_data/lib/typed_buffers.dart b/pkg/typed_data/lib/typed_buffers.dart
deleted file mode 100644
index 50ed241..0000000
--- a/pkg/typed_data/lib/typed_buffers.dart
+++ /dev/null
@@ -1,235 +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.
-
-/**
- * Growable typed-data lists.
- *
- * These lists works just as a typed-data list, except that they are growable.
- * They use an underlying buffer, and when that buffer becomes too small, it
- * is replaced by a new buffer.
- *
- * That means that using the [TypedDataView.buffer] getter is not guaranteed
- * to return the same result each time it is used, and that the buffer may
- * be larger than what the list is using.
- */
-library dart.pkg.typed_data.typed_buffers;
-
-import "dart:collection" show ListBase;
-import "dart:typed_data";
-
-abstract class _TypedDataBuffer<E> extends ListBase<E> {
-  static const int INITIAL_LENGTH = 8;
-
-  /// This is a Uint8List for Uint8Buffer. It's both a List<E> and a TypedData,
-  /// which we don't have a type for here.
-  var _buffer;
-  /// The length of the list being built.
-  int _length;
-
-  _TypedDataBuffer(List<E> buffer)
-      : this._buffer = buffer, this._length = buffer.length;
-
-  int get length => _length;
-  E operator[](int index) {
-    if (index >= length) throw new RangeError.index(index, this);
-    return _buffer[index];
-  }
-
-  void operator[]=(int index, E value) {
-    if (index >= length) throw new RangeError.index(index, this);
-    _buffer[index] = value;
-  }
-
-  void set length(int newLength) {
-    if (newLength < _length) {
-      E defaultValue = _defaultValue;
-      for (int i = newLength; i < _length; i++) {
-        _buffer[i] = defaultValue;
-      }
-    } else if (newLength > _buffer.length) {
-      List<E> newBuffer;
-      if (_buffer.length == 0) {
-        newBuffer = _createBuffer(newLength);
-      } else {
-        newBuffer = _createBiggerBuffer(newLength);
-      }
-      newBuffer.setRange(0, _length, _buffer);
-      _buffer = newBuffer;
-    }
-    _length = newLength;
-  }
-
-  void _add(E value) {
-    if (_length == _buffer.length) _grow();
-    _buffer[_length++] = value;
-  }
-
-  // We override the default implementation of `add` and `addAll` because
-  // they grow by setting the length in increments of one. We want to grow
-  // by doubling capacity in most cases.
-  void add(E value) { _add(value); }
-
-  void addAll(Iterable<E> values) {
-    for (E value in values) _add(value);
-  }
-
-  void insert(int index, E element) {
-    if (index < 0 || index > _length) {
-      throw new RangeError.range(index, 0, _length);
-    }
-    if (_length < _buffer.length) {
-      _buffer.setRange(index + 1, _length + 1, _buffer, index);
-      _buffer[index] = element;
-      _length++;
-      return;
-    }
-    List<E> newBuffer = _createBiggerBuffer(null);
-    newBuffer.setRange(0, index, _buffer);
-    newBuffer.setRange(index + 1, _length + 1, _buffer, index);
-    newBuffer[index] = element;
-    _length++;
-    _buffer = newBuffer;
-  }
-
-  /**
-   * Create a bigger buffer.
-   *
-   * This method determines how much bigger a bigger buffer should
-   * be. If [requiredLength] is not null, it will be at least that
-   * size. It will always have at least have double the capacity of
-   * the current buffer.
-   */
-  List<E> _createBiggerBuffer(int requiredLength) {
-    int newLength = _buffer.length * 2;
-    if (requiredLength != null && newLength < requiredLength) {
-      newLength = requiredLength;
-    } else if (newLength < INITIAL_LENGTH) {
-      newLength = INITIAL_LENGTH;
-    }
-    return _createBuffer(newLength);
-  }
-
-  void _grow() {
-    _buffer = _createBiggerBuffer(null)..setRange(0, _length, _buffer);
-  }
-
-  void setRange(int start, int end, Iterable<E> source, [int skipCount = 0]) {
-    if (end > _length) throw new RangeError.range(end, 0, _length);
-    if (source is _TypedDataBuffer<E>) {
-      _buffer.setRange(start, end, source._buffer, skipCount);
-    } else {
-      _buffer.setRange(start, end, source, skipCount);
-    }
-  }
-
-  // TypedData.
-
-  int get elementSizeInBytes => _buffer.elementSizeInBytes;
-
-  int get lengthInBytes => _length * _buffer.elementSizeInBytes;
-
-  int get offsetInBytes => _buffer.offsetInBytes;
-
-  /**
-    * Returns the underlying [ByteBuffer].
-    *
-    * The returned buffer may be replaced by operations that change the [length]
-    * of this list.
-    *
-    * The buffer may be larger than [lengthInBytes] bytes, but never smaller.
-    */
-  ByteBuffer get buffer => _buffer.buffer;
-
-  // Specialization for the specific type.
-
-  // Return zero for integers, 0.0 for floats, etc.
-  // Used to fill buffer when changing length.
-  E get _defaultValue;
-
-  // Create a new typed list to use as buffer.
-  List<E> _createBuffer(int size);
-}
-
-abstract class _IntBuffer extends _TypedDataBuffer<int> {
-  _IntBuffer(buffer): super(buffer);
-  int get _defaultValue => 0;
-}
-
-abstract class _FloatBuffer extends _TypedDataBuffer<double> {
-  _FloatBuffer(buffer): super(buffer);
-  double get _defaultValue => 0.0;
-}
-
-class Uint8Buffer extends _IntBuffer {
-  Uint8Buffer([int initialLength = 0]) : super(new Uint8List(initialLength));
-  Uint8List _createBuffer(int size) => new Uint8List(size);
-}
-
-class Int8Buffer extends _IntBuffer {
-  Int8Buffer([int initialLength = 0]) : super(new Int8List(initialLength));
-  Int8List _createBuffer(int size) => new Int8List(size);
-}
-
-class Uint8ClampedBuffer extends _IntBuffer {
-  Uint8ClampedBuffer([int initialLength = 0])
-      : super(new Uint8ClampedList(initialLength));
-  Uint8ClampedList _createBuffer(int size) => new Uint8ClampedList(size);
-}
-
-class Uint16Buffer extends _IntBuffer {
-  Uint16Buffer([int initialLength = 0]) : super(new Uint16List(initialLength));
-  Uint16List _createBuffer(int size) => new Uint16List(size);
-}
-
-class Int16Buffer extends _IntBuffer {
-  Int16Buffer([int initialLength = 0]) : super(new Int16List(initialLength));
-  Int16List _createBuffer(int size) => new Int16List(size);
-}
-
-class Uint32Buffer extends _IntBuffer {
-  Uint32Buffer([int initialLength = 0]) : super(new Uint32List(initialLength));
-  Uint32List _createBuffer(int size) => new Uint32List(size);
-}
-
-class Int32Buffer extends _IntBuffer {
-  Int32Buffer([int initialLength = 0]) : super(new Int32List(initialLength));
-  Int32List _createBuffer(int size) => new Int32List(size);
-}
-
-class Uint64Buffer extends _IntBuffer {
-  Uint64Buffer([int initialLength = 0]) : super(new Uint64List(initialLength));
-  Uint64List _createBuffer(int size) => new Uint64List(size);
-}
-
-class Int64Buffer extends _IntBuffer {
-  Int64Buffer([int initialLength = 0]) : super(new Int64List(initialLength));
-  Int64List _createBuffer(int size) => new Int64List(size);
-}
-
-class Float32Buffer extends _FloatBuffer {
-  Float32Buffer([int initialLength = 0])
-      : super(new Float32List(initialLength));
-  Float32List _createBuffer(int size) => new Float32List(size);
-}
-
-class Float64Buffer extends _FloatBuffer {
-  Float64Buffer([int initialLength = 0])
-      : super(new Float64List(initialLength));
-  Float64List _createBuffer(int size) => new Float64List(size);
-}
-
-class Int32x4Buffer extends _TypedDataBuffer<Int32x4> {
-  static Int32x4 _zero = new Int32x4(0, 0, 0, 0);
-  Int32x4Buffer([int initialLength = 0])
-      : super(new Int32x4List(initialLength));
-  Int32x4 get _defaultValue => _zero;
-  Int32x4List _createBuffer(int size) => new Int32x4List(size);
-}
-
-class Float32x4Buffer extends _TypedDataBuffer<Float32x4> {
-  Float32x4Buffer([int initialLength = 0])
-      : super(new Float32x4List(initialLength));
-  Float32x4 get _defaultValue => new Float32x4.zero();
-  Float32x4List _createBuffer(int size) => new Float32x4List(size);
-}
diff --git a/pkg/typed_data/lib/typed_data.dart b/pkg/typed_data/lib/typed_data.dart
deleted file mode 100644
index b6619ab..0000000
--- a/pkg/typed_data/lib/typed_data.dart
+++ /dev/null
@@ -1,10 +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.
-
-/**
- * Utilities and functionality related to the "dart:typed_data" library.
- */
-library dart.pkg.typed_data;
-
-export "package:typed_data/typed_buffers.dart";
diff --git a/pkg/typed_data/pubspec.yaml b/pkg/typed_data/pubspec.yaml
deleted file mode 100644
index b4c3945..0000000
--- a/pkg/typed_data/pubspec.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-name: typed_data
-version: 1.0.1-dev
-author: Dart Team <misc@dartlang.org>
-description: Utility functions and classes related to the 'dart:typed_data' library.
-homepage: http://www.dartlang.org
-dev_dependencies:
-  unittest: ">=0.9.0 <0.10.0"
-environment:
-  sdk: ">=1.5.0 <2.0.0"
diff --git a/pkg/typed_data/test/typed_buffers_test.dart b/pkg/typed_data/test/typed_buffers_test.dart
deleted file mode 100644
index 1cb37b0..0000000
--- a/pkg/typed_data/test/typed_buffers_test.dart
+++ /dev/null
@@ -1,421 +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.
-
-// Tests typed-data buffer classes.
-
-import "package:typed_data/typed_buffers.dart";
-import "package:unittest/unittest.dart";
-import "dart:typed_data";
-
-main() {
-  testUint(8, (l) => new Uint8Buffer(l));
-  testInt(8, (l) => new Int8Buffer(l));
-  test("Uint8ClampedBuffer", () {
-    testIntBuffer(8, 0, 255, (l) => new Uint8ClampedBuffer(l), clampUint8);
-  });
-  testUint(16, (l) => new Uint16Buffer(l));
-  testInt(16, (l) => new Int16Buffer(l));
-  testUint(32, (l) => new Uint32Buffer(l));  /// 01: ok
-  testInt(32, (l) => new Int32Buffer(l));
-  testUint(64, (l) => new Uint64Buffer(l));  /// 01: continued
-  testInt(64, (l) => new Int64Buffer(l));    /// 01: continued
-
-  testInt32x4Buffer(intSamples);
-
-  List roundedFloatSamples = floatSamples.map(roundToFloat).toList();
-  testFloatBuffer(32, roundedFloatSamples,
-                  () => new Float32Buffer(),
-                  roundToFloat);
-  testFloatBuffer(64, doubleSamples, () => new Float64Buffer(), (x) => x);
-
-  testFloat32x4Buffer(roundedFloatSamples);
-}
-
-double roundToFloat(double value) {
-  return (new Float32List(1)..[0] = value)[0];
-}
-
-typedef int Rounder(int value);
-
-Rounder roundUint(bits) {
-  int halfbits = (1 << (bits ~/ 2)) - 1;
-  int mask = halfbits | (halfbits << (bits ~/ 2));
-  return (int x) => x & mask;
-}
-
-Rounder roundInt(bits) {
-  int highBit = 1 << (bits - 1);
-  int mask = highBit - 1;
-  return (int x) => (x & mask) - (x & highBit);
-}
-
-int clampUint8(x) => x < 0 ? 0 : x > 255 ? 255 : x;
-
-void testUint(int bits, var buffer) {
-  int min = 0;
-  Function round = roundUint(bits);
-  int max = round(-1);
-  test("Uint${bits}Buffer", () {
-    testIntBuffer(bits, min, max, buffer, round);
-  });
-}
-
-void testInt(int bits, var buffer) {
-  int min = -(1 << (bits - 1));
-  int max = -(min + 1);
-  test("Int${bits}Buffer", () {
-    testIntBuffer(bits, min, max, buffer, roundInt(bits));
-  });
-}
-
-const List<int> intSamples = const [
-  0x10000000000000001,
-  0x10000000000000000,  // 2^64
-  0x0ffffffffffffffff,
-  0xaaaaaaaaaaaaaaaa,
-  0x8000000000000001,
-  0x8000000000000000,   // 2^63
-  0x7fffffffffffffff,
-  0x5555555555555555,
-  0x100000001,
-  0x100000000,  // 2^32
-  0x0ffffffff,
-  0xaaaaaaaa,
-  0x80000001,
-  0x80000000,   // 2^31
-  0x7fffffff,
-  0x55555555,
-  0x10001,
-  0x10000,      // 2^16
-  0x0ffff,
-  0xaaaa,
-  0x8001,
-  0x8000,       // 2^15
-  0x7fff,
-  0x5555,
-  0x101,
-  0x100,        // 2^8
-  0x0ff,
-  0xaa,
-  0x81,
-  0x80,         // 2^7
-  0x7f,
-  0x55,
-  0x02,
-  0x01,
-  0x00
-];
-
-// Takes bit-size, min value, max value, function to create a buffer, and
-// the rounding that is applied when storing values outside the valid range
-// into the buffer.
-void testIntBuffer(int bits, int min, int max,
-                   create(int length),
-                   int round(int)) {
-  assert(round(min) == min);
-  assert(round(max) == max);
-  // All int buffers default to the value 0.
-  var buffer = create(0);
-  List<int> list = buffer;  // Check the type.
-  expect(buffer.length, equals(0));
-  var bytes = bits ~/ 8;
-
-  expect(buffer.elementSizeInBytes, equals(bytes));
-  expect(buffer.lengthInBytes, equals(0));
-  expect(buffer.offsetInBytes, equals(0));
-
-  buffer.add(min);
-  expect(buffer.length, equals(1));
-  expect(buffer[0], equals(min));
-
-  expect(buffer.elementSizeInBytes, equals(bytes));
-  expect(buffer.lengthInBytes, equals(bytes));
-  expect(buffer.offsetInBytes, equals(0));
-
-  buffer.length = 0;
-  expect(buffer.length, equals(0));
-
-  List samples = intSamples.toList()..addAll(intSamples.map((x) => -x));
-  for (int value in samples) {
-    int length = buffer.length;
-    buffer.add(value);
-    expect(buffer.length, equals(length + 1));
-    expect(buffer[length], equals(round(value)));
-  }
-  buffer.addAll(samples);  // Add all the values at once.
-  for (int i = 0; i < samples.length; i++) {
-    expect(buffer[samples.length + i], equals(buffer[i]));
-  }
-
-  // Remove range works and changes length.
-  buffer.removeRange(samples.length, buffer.length);
-  expect(buffer.length, equals(samples.length));
-
-  // Both values are in `samples`, but equality is performed without rounding.
-  expect(buffer.contains(min - 1), isFalse);
-  expect(buffer.contains(max + 1), isFalse);
-  expect(buffer.contains(round(min - 1)), isTrue);
-  expect(buffer.contains(round(max + 1)), isTrue);
-
-  // Accessing the underlying buffer works.
-  buffer.length = 2;
-  buffer[0] = min;
-  buffer[1] = max;
-  var byteBuffer = new Uint8List.view(buffer.buffer);
-  int byteSize = buffer.elementSizeInBytes;
-  for (int i = 0; i < byteSize; i++) {
-    int tmp = byteBuffer[i];
-    byteBuffer[i] = byteBuffer[byteSize + i];
-    byteBuffer[byteSize + i] = tmp;
-  }
-  expect(buffer[0], equals(max));
-  expect(buffer[1], equals(min));
-}
-
-const List doubleSamples = const [
-  0.0,
-  5e-324,                    // Minimal denormal value.
-  2.225073858507201e-308,    // Maximal denormal value.
-  2.2250738585072014e-308,   // Minimal normal value.
-  0.9999999999999999,        // Maximum value < 1.
-  1.0,
-  1.0000000000000002,        // Minimum value > 1.
-  4294967295.0,              // 2^32 -1.
-  4294967296.0,              // 2^32.
-  4503599627370495.5,        // Maximal fractional value.
-  9007199254740992.0,        // Maximal exact value (adding one gets lost).
-  1.7976931348623157e+308,   // Maximal value.
-  1.0/0.0,                   // Infinity.
-  0.0/0.0,                   // NaN.
-  0.49999999999999994,       // Round-traps 1-3 (adding 0.5 and rounding towards
-  4503599627370497.0,        // minus infinity will not be the same as rounding
-  9007199254740991.0         // to nearest with 0.5 rounding up).
-];
-
-const List floatSamples = const [
-  0.0,
-  1.4e-45,          // Minimal denormal value.
-  1.1754942E-38,    // Maximal denormal value.
-  1.17549435E-38,   // Minimal normal value.
-  0.99999994,       // Maximal value < 1.
-  1.0,
-  1.0000001,        // Minimal value > 1.
-  8388607.5,        // Maximal fractional value.
-  16777216.0,       // Maximal exact value.
-  3.4028235e+38,    // Maximal value.
-  1.0/0.0,          // Infinity.
-  0.0/0.0,          // NaN.
-  0.99999994,       // Round traps 1-3.
-  8388609.0,
-  16777215.0
-];
-
-void doubleEqual(x, y) {
-  if (y.isNaN) {
-    expect(x.isNaN, isTrue);
-  } else {
-    if (x != y) {
-    }
-    expect(x, equals(y));
-  }
-}
-
-testFloatBuffer(int bitSize, List samples, create(), double round(double v)) {
-  test("Float${bitSize}Buffer", () {
-    var buffer = create();
-    List<double> list = buffer;  // Test type.
-    int byteSize = bitSize ~/ 8;
-
-    expect(buffer.length, equals(0));
-    buffer.add(0.0);
-    expect(buffer.length, equals(1));
-    expect(buffer.removeLast(), equals(0.0));
-    expect(buffer.length, equals(0));
-
-    for (double value in samples) {
-      buffer.add(value);
-      doubleEqual(buffer[buffer.length - 1], round(value));
-    }
-    expect(buffer.length, equals(samples.length));
-
-    buffer.addAll(samples);
-    expect(buffer.length, equals(samples.length * 2));
-    for (int i = 0; i < samples.length; i++) {
-      doubleEqual(buffer[i], buffer[samples.length + i]);
-    }
-
-    buffer.removeRange(samples.length, buffer.length);
-    expect(buffer.length, equals(samples.length));
-
-    buffer.insertAll(0, samples);
-    expect(buffer.length, equals(samples.length * 2));
-    for (int i = 0; i < samples.length; i++) {
-      doubleEqual(buffer[i], buffer[samples.length + i]);
-    }
-
-    buffer.length = samples.length;
-    expect(buffer.length, equals(samples.length));
-
-    // TypedData.
-    expect(buffer.elementSizeInBytes, equals(byteSize));
-    expect(buffer.lengthInBytes, equals(byteSize * buffer.length));
-    expect(buffer.offsetInBytes, equals(0));
-
-    // Accessing the buffer works.
-    // Accessing the underlying buffer works.
-    buffer.length = 2;
-    buffer[0] = samples[0];
-    buffer[1] = samples[1];
-    var bytes = new Uint8List.view(buffer.buffer);
-    for (int i = 0; i < byteSize; i++) {
-      int tmp = bytes[i];
-      bytes[i] = bytes[byteSize + i];
-      bytes[byteSize + i] = tmp;
-    }
-    doubleEqual(buffer[0], round(samples[1]));
-    doubleEqual(buffer[1], round(samples[0]));
-  });
-}
-
-testFloat32x4Buffer(List floatSamples) {
-  List float4Samples = [];
-  for (int i = 0; i < floatSamples.length - 3; i++) {
-    float4Samples.add(new Float32x4(floatSamples[i],
-                                    floatSamples[i + 1],
-                                    floatSamples[i + 2],
-                                    floatSamples[i + 3]));
-  }
-
-  void floatEquals(x, y) {
-    if (y.isNaN) {
-      expect(x.isNaN, isTrue);
-    } else {
-      expect(x, equals(y));
-    }
-  }
-
-  void x4Equals(Float32x4 x, Float32x4 y) {
-    floatEquals(x.x, y.x);
-    floatEquals(x.y, y.y);
-    floatEquals(x.z, y.z);
-    floatEquals(x.w, y.w);
-  }
-
-  test("Float32x4Buffer", () {
-    var buffer = new Float32x4Buffer(5);
-    List<Float32x4> list = buffer;
-
-    expect(buffer.length, equals(5));
-    expect(buffer.elementSizeInBytes, equals(128 ~/ 8));
-    expect(buffer.lengthInBytes, equals(5 * 128 ~/ 8));
-    expect(buffer.offsetInBytes, equals(0));
-
-    x4Equals(buffer[0], new Float32x4.zero());
-    buffer.length = 0;
-    expect(buffer.length, equals(0));
-
-    for (var sample in float4Samples) {
-      buffer.add(sample);
-      x4Equals(buffer[buffer.length - 1], sample);
-    }
-    expect(buffer.length, equals(float4Samples.length));
-
-    buffer.addAll(float4Samples);
-    expect(buffer.length, equals(float4Samples.length * 2));
-    for (int i = 0; i < float4Samples.length; i++) {
-      x4Equals(buffer[i], buffer[float4Samples.length + i]);
-    }
-
-    buffer.removeRange(4, 4 + float4Samples.length);
-    for (int i = 0; i < float4Samples.length; i++) {
-      x4Equals(buffer[i], float4Samples[i]);
-    }
-
-    // Test underlying buffer.
-    buffer.length = 1;
-    buffer[0] = float4Samples[0];  // Does not contain NaN.
-
-    Float32List floats = new Float32List.view(buffer.buffer);
-    expect(floats[0], equals(buffer[0].x));
-    expect(floats[1], equals(buffer[0].y));
-    expect(floats[2], equals(buffer[0].z));
-    expect(floats[3], equals(buffer[0].w));
-  });
-}
-
-void testInt32x4Buffer(intSamples) {
-  test("Int32x4Buffer", () {
-    Function round = roundInt(32);
-    int bits = 128;
-    int bytes = 128 ~/ 8;
-    Matcher equals32x4(Int32x4 expected) => new MatchesInt32x4(expected);
-
-    var buffer = new Int32x4Buffer(0);
-    List<Int32x4> list = buffer;     // It's a List.
-    expect(buffer.length, equals(0));
-
-    expect(buffer.elementSizeInBytes, equals(bytes));
-    expect(buffer.lengthInBytes, equals(0));
-    expect(buffer.offsetInBytes, equals(0));
-
-    Int32x4 sample = new Int32x4(-0x80000000, -1, 0, 0x7fffffff);
-    buffer.add(sample);
-    expect(buffer.length, equals(1));
-    expect(buffer[0], equals32x4(sample));
-
-    expect(buffer.elementSizeInBytes, equals(bytes));
-    expect(buffer.lengthInBytes, equals(bytes));
-    expect(buffer.offsetInBytes, equals(0));
-
-    buffer.length = 0;
-    expect(buffer.length, equals(0));
-
-    var samples = intSamples
-        .where((value) => value == round(value))   // Issue 15130
-        .map((value) => new Int32x4(value, -value, ~value, ~-value))
-        .toList();
-    for (Int32x4 value in samples) {
-      int length = buffer.length;
-      buffer.add(value);
-      expect(buffer.length, equals(length + 1));
-      expect(buffer[length], equals32x4(value));
-    }
-
-    buffer.addAll(samples);  // Add all the values at once.
-    for (int i = 0; i < samples.length; i++) {
-      expect(buffer[samples.length + i], equals32x4(buffer[i]));
-    }
-
-    // Remove range works and changes length.
-    buffer.removeRange(samples.length, buffer.length);
-    expect(buffer.length, equals(samples.length));
-
-    // Accessing the underlying buffer works.
-    buffer.length = 2;
-    buffer[0] = new Int32x4(-80000000, 0x7fffffff, 0, -1);
-    var byteBuffer = new Uint8List.view(buffer.buffer);
-    int halfBytes = bytes ~/ 2;
-    for (int i = 0; i < halfBytes; i++) {
-      int tmp = byteBuffer[i];
-      byteBuffer[i] = byteBuffer[halfBytes + i];
-      byteBuffer[halfBytes + i] = tmp;
-    }
-    var result = new Int32x4(0, -1, -80000000, 0x7fffffff);
-    expect(buffer[0], equals32x4(result));
-  });
-}
-
-class MatchesInt32x4 extends Matcher {
-  Int32x4 result;
-  MatchesInt32x4(this.result);
-  bool matches(item, Map matchState) {
-    if (item is! Int32x4) return false;
-    Int32x4 value = item;
-    return result.x == value.x && result.y == value.y &&
-           result.z == value.z && result.w == value.w;
-  }
-
-  Description describe(Description description) =>
-      description.add('Int32x4.==');
-}
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 62b69fb..6e987c4 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -171,10 +171,6 @@
     "vm/version.h",
     "$target_gen_dir/version.cc",
   ]
-  defines = [
-    # Using DART_SHARED_LIB to export the Dart API entries.
-    "DART_SHARED_LIB",
-  ]
 }
 
 
@@ -203,8 +199,6 @@
     "$target_gen_dir/version.cc",
   ]
   defines = [
-    # Using DART_SHARED_LIB to export the Dart API entries.
-    "DART_SHARED_LIB",
     "DART_PRECOMPILED_RUNTIME",
   ]
 }
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 02ba3c4..20b2a8a 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -191,11 +191,6 @@
     "builtin_gen_snapshot.cc",
     "builtin.cc",
     "builtin.h",
-    "platform_android.cc",
-    "platform_linux.cc",
-    "platform_macos.cc",
-    "platform_win.cc",
-    "platform.h",
     "vmservice_impl.cc",
     "vmservice_impl.h",
     # Include generated source files.
@@ -231,24 +226,13 @@
 source_set("gen_snapshot_dart_io") {
   configs += ["..:dart_config",]
 
-  # Set custom sources assignment filter. The custom filters does three things:
-  # 1) Filters out unnecessary files pulled in from the gypi files.
-  # 2) Filters out secure socket support.
-  # 3) Enables dart:io by filtering out _unsupported.cc implementations.
+  deps = [
+    "//third_party/zlib",
+  ]
+
   custom_sources_filter = [
-    "*net/nss_memio.cc",
-    "*net/nss_memio.h",
-    "*root_certificates.cc",
-    "*secure_socket.cc",
-    "*secure_socket.h",
-    "filter.cc",
-    "*io_service_unsupported.cc",
-    "platform_*.cc",
-    "*io_service.cc",
-    "*io_service.h",
     "*_test.cc",
     "*_test.h",
-    "*dbg*",
     "builtin.cc",
     "builtin_common.cc",
     "builtin_gen_snapshot.cc",
@@ -268,11 +252,6 @@
   sources += [
     "io_natives.cc",
     "io_natives.h",
-    "log_android.cc",
-    "log_linux.cc",
-    "log_macos.cc",
-    "log_win.cc",
-    "log.h",
   ]
 
   include_dirs = [
@@ -286,23 +265,9 @@
 source_set("embedded_dart_io") {
   configs += ["..:dart_config",]
 
-  # Set custom sources assignment filter. The custom filters does three things:
-  # 1) Filters out unnecessary files pulled in from the gypi files.
-  # 2) Filters out secure socket support.
-  # 3) Enables dart:io by filtering out _unsupported.cc implementations.
   custom_sources_filter = [
-    "*net/nss_memio.cc",
-    "*net/nss_memio.h",
-    "*root_certificates.cc",
-    "*secure_socket.cc",
-    "*secure_socket.h",
-    "*filter_unsupported.cc",
-    "*io_service_unsupported.cc",
-    "*io_service.cc",
-    "*io_service.h",
     "*_test.cc",
     "*_test.h",
-    "*dbg*",
     "builtin.cc",
     "builtin_gen_snapshot.cc",
   ]
@@ -315,7 +280,13 @@
   }
   set_sources_assignment_filter(custom_sources_filter)
 
-  defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ]
+  if (is_mac || is_ios) {
+    libs = [
+      "Security.framework",
+    ]
+  } else {
+    defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ]
+  }
 
   sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources
   sources += [
diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi
index 5d7b48e..da8354e 100644
--- a/runtime/bin/bin.gypi
+++ b/runtime/bin/bin.gypi
@@ -15,8 +15,6 @@
     'isolate_snapshot_bin_file': '<(gen_source_dir)/isolate_snapshot_gen.bin',
     'gen_snapshot_stamp_file': '<(gen_source_dir)/gen_snapshot.stamp',
     'resources_cc_file': '<(gen_source_dir)/resources_gen.cc',
-    'bootstrap_resources_cc_file':
-        '<(gen_source_dir)/bootstrap_resources_gen.cc',
     'snapshot_cc_file': '<(gen_source_dir)/snapshot_gen.cc',
     'observatory_assets_cc_file': '<(gen_source_dir)/observatory_assets.cc',
     'observatory_assets_tar_file': '<(gen_source_dir)/observatory_assets.tar',
@@ -147,6 +145,73 @@
         ['exclude', '_test\\.(cc|h)$'],
       ],
       'conditions': [
+        ['dart_io_support==0', {
+          'defines': [
+            'DART_IO_DISABLED',
+          ],
+        }],
+        ['OS=="win"', {
+          'sources/' : [
+            ['exclude', 'fdutils.h'],
+          ],
+          # TODO(antonm): fix the implementation.
+          # Current implementation accepts char* strings
+          # and therefore fails to compile once _UNICODE is
+          # enabled.  That should be addressed using -A
+          # versions of functions and adding necessary conversions.
+          'configurations': {
+            'Common_Base': {
+              'msvs_configuration_attributes': {
+                'CharacterSet': '0',
+              },
+            },
+          },
+        }],
+        ['OS=="linux"', {
+          'link_settings': {
+            'libraries': [
+              '-ldl',
+            ],
+          },
+        }],
+        ['OS=="android"', {
+          'link_settings': {
+            'libraries': [
+              '-ldl',
+            ],
+          },
+        }],
+      ],
+    },
+    # This is the same as libdart_builtin, but the io support libraries are
+    # never disabled, even when dart_io_support==0. This is so that it can
+    # still be usefully linked into gen_snapshot.
+    {
+      'target_name': 'libdart_builtin_no_disable',
+      'type': 'static_library',
+      'toolsets':['host'],
+      'dependencies': [
+        'generate_builtin_cc_file#host',
+        'generate_io_cc_file#host',
+        'generate_io_patch_cc_file#host',
+      ],
+      'include_dirs': [
+        '..',
+      ],
+      'sources': [
+        'log_android.cc',
+        'log_linux.cc',
+        'log_macos.cc',
+        'log_win.cc',
+      ],
+      'includes': [
+        'builtin_impl_sources.gypi',
+        '../platform/platform_sources.gypi',
+      ],
+      'sources/': [
+        ['exclude', '_test\\.(cc|h)$'],
+      ],
+      'conditions': [
         ['OS=="win"', {
           'sources/' : [
             ['exclude', 'fdutils.h'],
@@ -227,12 +292,12 @@
         ['exclude', '_test\\.(cc|h)$'],
       ],
       'conditions': [
-        ['dart_io_support==1 and dart_io_secure_socket==1', {
+        ['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', {
           'dependencies': [
-          '../third_party/boringssl/boringssl_dart.gyp:boringssl',
+            '../third_party/boringssl/boringssl_dart.gyp:boringssl',
           ],
         }],
-        ['dart_io_secure_socket==0', {
+        ['dart_io_secure_socket==0 or dart_io_support==0', {
           'defines': [
             'DART_IO_SECURE_SOCKET_DISABLED'
           ],
@@ -262,6 +327,7 @@
             'libraries': [
               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
               '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
+              '$(SDKROOT)/System/Library/Frameworks/Security.framework',
             ],
           },
         }],
@@ -301,10 +367,10 @@
           'dependencies': [
             'bin/zlib.gyp:zlib_dart',
           ],
-        }],
-        ['dart_io_support==1 and dart_io_secure_socket==1', {
-          'dependencies': [
-            '../third_party/boringssl/boringssl_dart.gyp:boringssl',
+        }, {  # dart_io_support == 0
+          'defines': [
+            'DART_IO_DISABLED',
+            'DART_IO_SECURE_SOCKET_DISABLED',
           ],
         }],
         ['dart_io_secure_socket==0', {
@@ -312,6 +378,11 @@
             'DART_IO_SECURE_SOCKET_DISABLED'
           ],
         }],
+        ['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', {
+          'dependencies': [
+            '../third_party/boringssl/boringssl_dart.gyp:boringssl',
+          ],
+        }],
         ['OS=="win"', {
           'link_settings': {
             'libraries': [ '-liphlpapi.lib' ],
@@ -334,6 +405,67 @@
             'libraries': [
               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
               '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
+              '$(SDKROOT)/System/Library/Frameworks/Security.framework',
+            ],
+          },
+        }],
+      ],
+    },
+    # This is the same as libdart_io, but the io support libraries are
+    # never disabled, even when dart_io_support==0. This is so that it can
+    # still be usefully linked into gen_snapshot.
+    {
+      'target_name': 'libdart_io_no_disable',
+      'type': 'static_library',
+      'toolsets': ['host'],
+      'include_dirs': [
+        '..',
+        '../../third_party',
+      ],
+      'includes': [
+        'io_impl_sources.gypi',
+      ],
+      'sources': [
+        'io_natives.h',
+        'io_natives.cc',
+      ],
+      'dependencies': [
+        'bin/zlib.gyp:zlib_dart',
+      ],
+      'conditions': [
+        ['dart_io_support==0 or dart_io_secure_socket==0', {
+          'defines': [
+            'DART_IO_SECURE_SOCKET_DISABLED',
+          ],
+        }],
+        ['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', {
+          'dependencies': [
+            '../third_party/boringssl/boringssl_dart.gyp:boringssl',
+          ],
+        }],
+        ['OS=="win"', {
+          'link_settings': {
+            'libraries': [ '-liphlpapi.lib' ],
+          },
+          # TODO(antonm): fix the implementation.
+          # Current implementation accepts char* strings
+          # and therefore fails to compile once _UNICODE is
+          # enabled.  That should be addressed using -A
+          # versions of functions and adding necessary conversions.
+          'configurations': {
+            'Common_Base': {
+              'msvs_configuration_attributes': {
+                'CharacterSet': '0',
+              },
+            },
+          },
+        }],
+        ['OS=="mac"', {
+          'link_settings': {
+            'libraries': [
+              '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
+              '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
+              '$(SDKROOT)/System/Library/Frameworks/Security.framework',
             ],
           },
         }],
@@ -377,9 +509,11 @@
       'dependencies': [
         'generate_resources_cc_file#host',
         'generate_observatory_assets_cc_file#host',
-        'libdart_nosnapshot',
-        'libdart_builtin',
-        'libdart_io',
+        'libdart_nosnapshot#host',
+        # If io is disabled for the VM, we still need it for gen snapshot, so
+        # use libdart_builtin and libdart_io that still have io enabled.
+        'libdart_builtin_no_disable#host',
+        'libdart_io_no_disable#host',
       ],
       'include_dirs': [
         '..',
@@ -543,45 +677,11 @@
       ]
     },
     {
-      'target_name': 'generate_bootstrap_resources_cc_file',
-      'type': 'none',
-      'dependencies': [
-        'bin/zlib.gyp:zlib_dart',
-      ],
-      'toolsets':['host'],
-      'includes': [
-        'vmservice/vmservice_sources.gypi',
-      ],
-      'actions': [
-        {
-          'action_name': 'generate_resources_cc',
-          'inputs': [
-            '../tools/create_resources.py',
-            '<@(_sources)',
-          ],
-          'outputs': [
-            '<(bootstrap_resources_cc_file)',
-          ],
-          'action': [
-            'python',
-            'tools/create_resources.py',
-            '--output', '<(bootstrap_resources_cc_file)',
-            '--outer_namespace', 'dart',
-            '--inner_namespace', 'bin',
-            '--table_name', 'service_bin',
-            '--root_prefix', 'bin/',
-            '<@(_sources)'
-          ],
-          'message':
-              'Generating ''<(bootstrap_resources_cc_file)'' file.'
-        },
-      ]
-    },
-    {
       # dart_product binary.
       'target_name': 'dart_product',
       'type': 'executable',
       'dependencies': [
+        'bin/zlib.gyp:zlib_dart',
         'libdart',
         'libdart_builtin',
         'libdart_io',
@@ -595,13 +695,13 @@
       ],
       'sources': [
         'main.cc',
+        'builtin.h',
         'builtin_common.cc',
         'builtin_natives.cc',
         'builtin_nolib.cc',
-        'builtin.h',
         'io_natives.h',
-        'snapshot_empty.cc',
         'observatory_assets_empty.cc',
+        'snapshot_empty.cc',
       ],
       'conditions': [
         ['OS=="win"', {
@@ -616,13 +716,14 @@
       'target_name': 'dart',
       'type': 'executable',
       'dependencies': [
+        'bin/zlib.gyp:zlib_dart',
+        'build_observatory#host',
+        'generate_observatory_assets_cc_file#host',
+        'generate_resources_cc_file#host',
+        'generate_snapshot_file#host',
         'libdart',
         'libdart_builtin',
         'libdart_io',
-        'build_observatory#host',
-        'generate_snapshot_file#host',
-        'generate_resources_cc_file#host',
-        'generate_observatory_assets_cc_file#host',
       ],
       'include_dirs': [
         '..',
@@ -630,16 +731,16 @@
       ],
       'sources': [
         'main.cc',
+        'builtin.h',
         'builtin_common.cc',
         'builtin_natives.cc',
         'builtin_nolib.cc',
-        'builtin.h',
         'io_natives.h',
         'vmservice_impl.cc',
         'vmservice_impl.h',
-        '<(snapshot_cc_file)',
-        '<(resources_cc_file)',
         '<(observatory_assets_cc_file)',
+        '<(resources_cc_file)',
+        '<(snapshot_cc_file)',
       ],
       'conditions': [
         ['OS=="win"', {
@@ -671,30 +772,29 @@
       'target_name': 'dart_noopt',
       'type': 'executable',
       'dependencies': [
-        'libdart_noopt',
+        'build_observatory#host',
+        'generate_observatory_assets_cc_file#host',
+        'generate_resources_cc_file#host',
+        'generate_snapshot_file#host',
         'libdart_builtin',
         'libdart_io',
-        'build_observatory#host',
-        'generate_snapshot_file#host',
-        'generate_resources_cc_file#host',
-        'generate_observatory_assets_cc_file#host',
+        'libdart_noopt',
       ],
       'include_dirs': [
         '..',
-        '../../third_party/', # Zlib
       ],
       'sources': [
         'main.cc',
+        'builtin.h',
         'builtin_common.cc',
         'builtin_natives.cc',
         'builtin_nolib.cc',
-        'builtin.h',
         'io_natives.h',
         'vmservice_impl.cc',
         'vmservice_impl.h',
-        '<(snapshot_cc_file)',
-        '<(resources_cc_file)',
         '<(observatory_assets_cc_file)',
+        '<(resources_cc_file)',
+        '<(snapshot_cc_file)',
       ],
       'defines': [
         'DART_PRECOMPILER',
@@ -728,12 +828,13 @@
       'target_name': 'dart_precompiled_runtime',
       'type': 'executable',
       'dependencies': [
-        'libdart_precompiled_runtime',
+        'bin/zlib.gyp:zlib_dart',
+        'build_observatory#host',
+        'generate_observatory_assets_cc_file#host',
+        'generate_resources_cc_file#host',
         'libdart_builtin',
         'libdart_io',
-        'build_observatory#host',
-        'generate_resources_cc_file#host',
-        'generate_observatory_assets_cc_file#host',
+        'libdart_precompiled_runtime',
       ],
       'include_dirs': [
         '..',
@@ -741,16 +842,16 @@
       ],
       'sources': [
         'main.cc',
+        'builtin.h',
         'builtin_common.cc',
         'builtin_natives.cc',
         'builtin_nolib.cc',
-        'builtin.h',
         'io_natives.h',
+        'snapshot_empty.cc',
         'vmservice_impl.cc',
         'vmservice_impl.h',
-        'snapshot_empty.cc',
-        '<(resources_cc_file)',
         '<(observatory_assets_cc_file)',
+        '<(resources_cc_file)',
       ],
       'defines': [
         'DART_PRECOMPILED_RUNTIME',
@@ -777,78 +878,23 @@
       'type': 'executable',
       'toolsets':['host'],
       'dependencies': [
-        'libdart_nosnapshot',
+        'generate_resources_cc_file#host',
         'libdart_builtin',
         'libdart_io',
-        'generate_bootstrap_resources_cc_file#host',
+        'libdart_nosnapshot',
       ],
       'include_dirs': [
         '..',
-        '../../third_party/', # Zlib
       ],
       'sources': [
         'main.cc',
-        'builtin_common.cc',
-        'builtin_natives.cc',
         'builtin.cc',
         'builtin.h',
+        'builtin_common.cc',
+        'builtin_natives.cc',
         'io_natives.h',
-        'vmservice_impl.cc',
-        'vmservice_impl.h',
-        # Include generated source files.
-        '<(builtin_cc_file)',
-        '<(io_cc_file)',
-        '<(io_patch_cc_file)',
-        '<(bootstrap_resources_cc_file)',
         'observatory_assets_empty.cc',
         'snapshot_empty.cc',
-      ],
-      'conditions': [
-        ['OS=="win"', {
-          'link_settings': {
-            'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ],
-          },
-          # Generate an import library on Windows, by exporting a function.
-          # Extensions use this import library to link to the API in dart.exe.
-          'msvs_settings': {
-            'VCLinkerTool': {
-              'AdditionalOptions': [ '/EXPORT:Dart_True' ],
-            },
-          },
-        }],
-      ],
-      'configurations': {
-        'Dart_Linux_Base': {
-          # Have the linker add all symbols to the dynamic symbol table
-          # so that extensions can look them up dynamically in the binary.
-          'ldflags': [
-            '-rdynamic',
-          ],
-        },
-      },
-    },
-    {
-      # dart binary without any snapshot built in.
-      'target_name': 'dart_no_snapshot',
-      'type': 'executable',
-      'dependencies': [
-        'libdart_nosnapshot',
-        'libdart_builtin',
-        'libdart_io',
-        'generate_resources_cc_file#host',
-        'generate_observatory_assets_cc_file#host',
-      ],
-      'include_dirs': [
-        '..',
-        '../../third_party/', # Zlib
-      ],
-      'sources': [
-        'main.cc',
-        'builtin_common.cc',
-        'builtin_natives.cc',
-        'builtin.cc',
-        'builtin.h',
-        'io_natives.h',
         'vmservice_impl.cc',
         'vmservice_impl.h',
         # Include generated source files.
@@ -856,8 +902,6 @@
         '<(io_cc_file)',
         '<(io_patch_cc_file)',
         '<(resources_cc_file)',
-        '<(observatory_assets_cc_file)',
-        'snapshot_empty.cc',
       ],
       'defines': [
         'DART_NO_SNAPSHOT',
diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc
index 021140b..272976f 100644
--- a/runtime/bin/builtin.cc
+++ b/runtime/bin/builtin.cc
@@ -38,10 +38,9 @@
 
     // Prepend the patch library URI to form a unique script URI for the patch.
     intptr_t len = snprintf(NULL, 0, "%s/%s", patch_uri, patch_files[j]);
-    char* patch_filename = reinterpret_cast<char*>(malloc(len + 1));
+    char* patch_filename = DartUtils::ScopedCString(len + 1);
     snprintf(patch_filename, len + 1, "%s/%s", patch_uri, patch_files[j]);
     Dart_Handle patch_file_uri = DartUtils::NewString(patch_filename);
-    free(patch_filename);
 
     DART_CHECK_VALID(Dart_LibraryLoadPatch(library, patch_file_uri, patch_src));
   }
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 9a34b51..2f64b77 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -295,7 +295,18 @@
     if (mapping == null) {
       throw "No mapping for '$packageName' package when resolving '$uri'.";
     }
-    var path = uri.path.substring(packageName.length + 1);
+    var path;
+    if (uri.path.length > packageName.length) {
+      path = uri.path.substring(packageName.length + 1);
+    } else {
+      // Handle naked package resolution to the default package name:
+      // package:foo is equivalent to package:foo/foo.dart
+      assert(uri.path.length == packageName.length);
+      path = "$packageName.dart";
+    }
+    if (_traceLoading) {
+      _log("Path to be resolved in package: $path");
+    }
     resolvedUri = mapping.resolve(path);
   }
   if (_traceLoading) {
@@ -754,7 +765,17 @@
   }
   assert(_packagesReady);
 
-  var result = _resolvePackageUri(packageUri);
+  var result;
+  try {
+    result = _resolvePackageUri(packageUri);
+  } catch (e, s) {
+    // Any error during resolution will resolve this package as not mapped,
+    // which is indicated by a null return.
+    if (_traceLoading) {
+      _log("Exception ($e) when resolving package URI: $packageUri");
+    }
+    result = null;
+  }
   if (_traceLoading) {
     _log("Resolved '$packageUri' to '$result'");
   }
diff --git a/runtime/bin/builtin_gen_snapshot.cc b/runtime/bin/builtin_gen_snapshot.cc
index c1263bd..17d4a57 100644
--- a/runtime/bin/builtin_gen_snapshot.cc
+++ b/runtime/bin/builtin_gen_snapshot.cc
@@ -41,7 +41,7 @@
   int num_entries = sizeof(BuiltinEntries) / sizeof(struct NativeEntries);
   for (int i = 0; i < num_entries; i++) {
     struct NativeEntries* entry = &(BuiltinEntries[i]);
-    if (!strcmp(function_name, entry->name_) &&
+    if ((strcmp(function_name, entry->name_) == 0) &&
         (entry->argument_count_ == argument_count)) {
       return reinterpret_cast<Dart_NativeFunction>(entry->function_);
     }
diff --git a/runtime/bin/builtin_impl_sources.gypi b/runtime/bin/builtin_impl_sources.gypi
index 054ec9b..eb90ddf 100644
--- a/runtime/bin/builtin_impl_sources.gypi
+++ b/runtime/bin/builtin_impl_sources.gypi
@@ -21,6 +21,7 @@
     'directory_android.cc',
     'directory_linux.cc',
     'directory_macos.cc',
+    'directory_unsupported.cc',
     'directory_win.cc',
     'eventhandler_test.cc',
     'extensions.h',
@@ -29,17 +30,19 @@
     'extensions_linux.cc',
     'extensions_macos.cc',
     'extensions_win.cc',
+    'fdutils.h',
+    'fdutils_android.cc',
+    'fdutils_linux.cc',
+    'fdutils_macos.cc',
     'file.cc',
     'file.h',
     'file_android.cc',
     'file_linux.cc',
     'file_macos.cc',
-    'file_win.cc',
+    'file_support.cc',
+    'file_unsupported.cc',
     'file_test.cc',
-    'fdutils.h',
-    'fdutils_android.cc',
-    'fdutils_linux.cc',
-    'fdutils_macos.cc',
+    'file_win.cc',
     'hashmap_test.cc',
     'io_buffer.cc',
     'io_buffer.h',
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index 5ba5637..ba45a73 100644
--- a/runtime/bin/builtin_natives.cc
+++ b/runtime/bin/builtin_natives.cc
@@ -60,7 +60,7 @@
   int num_entries = sizeof(BuiltinEntries) / sizeof(struct NativeEntries);
   for (int i = 0; i < num_entries; i++) {
     struct NativeEntries* entry = &(BuiltinEntries[i]);
-    if (!strcmp(function_name, entry->name_) &&
+    if ((strcmp(function_name, entry->name_) == 0) &&
         (entry->argument_count_ == argument_count)) {
       return reinterpret_cast<Dart_NativeFunction>(entry->function_);
     }
@@ -88,7 +88,9 @@
   uint8_t* chars = NULL;
   Dart_Handle str = Dart_GetNativeArgument(args, 0);
   Dart_Handle result = Dart_StringToUTF8(str, &chars, &length);
-  if (Dart_IsError(result)) Dart_PropagateError(result);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
 
   // Uses fwrite to support printing NUL bytes.
   intptr_t res = fwrite(chars, 1, length, stdout);
diff --git a/runtime/bin/builtin_nolib.cc b/runtime/bin/builtin_nolib.cc
index fb4cf02..428927f 100644
--- a/runtime/bin/builtin_nolib.cc
+++ b/runtime/bin/builtin_nolib.cc
@@ -10,7 +10,6 @@
 #include "bin/dartutils.h"
 #include "bin/io_natives.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/crypto.cc b/runtime/bin/crypto.cc
index 6becae8..ec4840f 100644
--- a/runtime/bin/crypto.cc
+++ b/runtime/bin/crypto.cc
@@ -7,7 +7,6 @@
 
 #include "include/dart_api.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -23,23 +22,20 @@
     Dart_ThrowException(error);
   }
   intptr_t count = static_cast<intptr_t>(count64);
-  uint8_t* buffer = new uint8_t[count];
+  uint8_t* buffer = Dart_ScopeAllocate(count);
   ASSERT(buffer != NULL);
   if (!Crypto::GetRandomBytes(count, buffer)) {
-    delete[] buffer;
     Dart_ThrowException(DartUtils::NewDartOSError());
     UNREACHABLE();
   }
   Dart_Handle result = Dart_NewTypedData(Dart_TypedData_kUint8, count);
   if (Dart_IsError(result)) {
-    delete[] buffer;
     Dart_Handle error = DartUtils::NewString("Failed to allocate storage.");
     Dart_ThrowException(error);
     UNREACHABLE();
   }
   Dart_ListSetAsBytes(result, 0, buffer, count);
   Dart_SetReturnValue(args, result);
-  delete[] buffer;
 }
 
 }  // namespace bin
diff --git a/runtime/bin/crypto.h b/runtime/bin/crypto.h
index 1feaf9c..b82fc4f 100644
--- a/runtime/bin/crypto.h
+++ b/runtime/bin/crypto.h
@@ -8,7 +8,6 @@
 #include "bin/builtin.h"
 #include "bin/utils.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/crypto_android.cc b/runtime/bin/crypto_android.cc
index 4b55b91..7a970d0 100644
--- a/runtime/bin/crypto_android.cc
+++ b/runtime/bin/crypto_android.cc
@@ -8,12 +8,10 @@
 #include <errno.h>  // NOLINT
 #include <fcntl.h>  // NOLINT
 
-#include "bin/fdutils.h"
 #include "bin/crypto.h"
-
+#include "bin/fdutils.h"
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -21,7 +19,9 @@
   ThreadSignalBlocker signal_blocker(SIGPROF);
   intptr_t fd = TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(
       open("/dev/urandom", O_RDONLY));
-  if (fd < 0) return false;
+  if (fd < 0) {
+    return false;
+  }
   intptr_t bytes_read = 0;
   do {
     int res = TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(
diff --git a/runtime/bin/crypto_linux.cc b/runtime/bin/crypto_linux.cc
index cf3062d..c2e4ccd 100644
--- a/runtime/bin/crypto_linux.cc
+++ b/runtime/bin/crypto_linux.cc
@@ -8,11 +8,10 @@
 #include <errno.h>  // NOLINT
 #include <fcntl.h>  // NOLINT
 
-#include "bin/fdutils.h"
 #include "bin/crypto.h"
+#include "bin/fdutils.h"
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -20,7 +19,9 @@
   ThreadSignalBlocker signal_blocker(SIGPROF);
   intptr_t fd = TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(
       open("/dev/urandom", O_RDONLY));
-  if (fd < 0) return false;
+  if (fd < 0) {
+    return false;
+  }
   intptr_t bytes_read = 0;
   do {
     int res = TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(
diff --git a/runtime/bin/crypto_macos.cc b/runtime/bin/crypto_macos.cc
index 7d98daf..7bea2ae 100644
--- a/runtime/bin/crypto_macos.cc
+++ b/runtime/bin/crypto_macos.cc
@@ -8,11 +8,10 @@
 #include <errno.h>  // NOLINT
 #include <fcntl.h>  // NOLINT
 
-#include "bin/fdutils.h"
 #include "bin/crypto.h"
+#include "bin/fdutils.h"
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/crypto_win.cc b/runtime/bin/crypto_win.cc
index 95aead8..0208d95 100644
--- a/runtime/bin/crypto_win.cc
+++ b/runtime/bin/crypto_win.cc
@@ -11,7 +11,6 @@
 
 #include "bin/crypto.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index f592f2c..764c00e 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -4,22 +4,21 @@
 
 #include "bin/dartutils.h"
 
-#include "include/dart_api.h"
-#include "include/dart_tools_api.h"
-#include "include/dart_native_api.h"
-
-#include "platform/assert.h"
-#include "platform/globals.h"
-
 #include "bin/crypto.h"
 #include "bin/directory.h"
 #include "bin/extensions.h"
 #include "bin/file.h"
 #include "bin/io_buffer.h"
 #include "bin/platform.h"
-#include "bin/socket.h"
 #include "bin/utils.h"
 
+#include "include/dart_api.h"
+#include "include/dart_native_api.h"
+#include "include/dart_tools_api.h"
+
+#include "platform/assert.h"
+#include "platform/globals.h"
+
 // Return the error from the containing function if handle is in error handle.
 #define RETURN_IF_ERROR(handle)                                                \
   {                                                                            \
@@ -499,10 +498,12 @@
 
 
 Dart_Handle DartUtils::LoadScript(const char* script_uri) {
+  Dart_TimelineEvent("LoadScript",
+                     Dart_TimelineGetMicros(),
+                     Dart_GetMainPortId(),
+                     Dart_Timeline_Event_Async_Begin,
+                     0, NULL, NULL);
   Dart_Handle uri = Dart_NewStringFromCString(script_uri);
-  IsolateData* isolate_data =
-      reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData());
-  Dart_TimelineAsyncBegin("LoadScript", &(isolate_data->load_async_id));
   return LoadDataAsync_Invoke(Dart_Null(), uri, Dart_Null());
 }
 
@@ -630,10 +631,9 @@
 
 
 void FUNCTION_NAME(Builtin_GetCurrentDirectory)(Dart_NativeArguments args) {
-  char* current = Directory::Current();
+  const char* current = Directory::Current();
   if (current != NULL) {
     Dart_SetReturnValue(args, DartUtils::NewString(current));
-    free(current);
   } else {
     Dart_Handle err = DartUtils::NewError("Failed to get current directory.");
     Dart_PropagateError(err);
@@ -952,7 +952,7 @@
 
 
 bool DartUtils::SetOriginalWorkingDirectory() {
-  original_working_directory = Directory::Current();
+  original_working_directory = Directory::CurrentNoScope();
   return original_working_directory != NULL;
 }
 
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index 1d18b5f9..f9a6d50 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -5,14 +5,12 @@
 #ifndef BIN_DARTUTILS_H_
 #define BIN_DARTUTILS_H_
 
+#include "bin/isolate_data.h"
 #include "include/dart_api.h"
 #include "include/dart_native_api.h"
-
 #include "platform/assert.h"
 #include "platform/globals.h"
 
-#include "bin/isolate_data.h"
-
 namespace dart {
 namespace bin {
 
@@ -165,6 +163,23 @@
                                   strlen(str));
   }
 
+  // Allocate length bytes for a C string with Dart_ScopeAllocate.
+  static char* ScopedCString(intptr_t length) {
+    char* result = NULL;
+    result = reinterpret_cast<char*>(
+        Dart_ScopeAllocate(length * sizeof(*result)));
+    return result;
+  }
+
+  // Copy str into a buffer allocated with Dart_ScopeAllocate.
+  static char* ScopedCopyCString(const char* str) {
+    size_t str_len = strlen(str);
+    char* result = ScopedCString(str_len + 1);
+    memmove(result, str, str_len);
+    result[str_len] = '\0';
+    return result;
+  }
+
   // Create a new Dart InternalError object with the provided message.
   static Dart_Handle NewError(const char* format, ...);
   static Dart_Handle NewInternalError(const char* message);
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc
index a28b01c..982a4be 100644
--- a/runtime/bin/directory.cc
+++ b/runtime/bin/directory.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "bin/directory.h"
 
 #include "bin/dartutils.h"
 #include "include/dart_api.h"
 #include "platform/assert.h"
 
-
 namespace dart {
 namespace bin {
 
 void FUNCTION_NAME(Directory_Current)(Dart_NativeArguments args) {
-  char* current = Directory::Current();
+  const char* current = Directory::Current();
   if (current != NULL) {
     Dart_SetReturnValue(args, DartUtils::NewString(current));
-    free(current);
   } else {
     Dart_SetReturnValue(args, DartUtils::NewDartOSError());
   }
@@ -29,7 +29,7 @@
   if (argc == 1) {
     path = Dart_GetNativeArgument(args, 0);
   }
-  if (argc != 1 || !Dart_IsString(path)) {
+  if ((argc != 1) || !Dart_IsString(path)) {
     Dart_SetReturnValue(args, DartUtils::NewDartArgumentError(NULL));
   } else {
     if (Directory::SetCurrent(DartUtils::GetStringValue(path))) {
@@ -67,11 +67,9 @@
 }
 
 
-void FUNCTION_NAME(Directory_SystemTemp)(
-    Dart_NativeArguments args) {
-  char* result = Directory::SystemTemp();
+void FUNCTION_NAME(Directory_SystemTemp)(Dart_NativeArguments args) {
+  const char* result = Directory::SystemTemp();
   Dart_SetReturnValue(args, DartUtils::NewString(result));
-  free(result);
 }
 
 
@@ -82,10 +80,10 @@
         "Prefix argument of CreateSystemTempSync is not a String"));
     return;
   }
-  char* result = Directory::CreateTemp(DartUtils::GetStringValue(path));
+  const char* result =
+      Directory::CreateTemp(DartUtils::GetStringValue(path));
   if (result != NULL) {
     Dart_SetReturnValue(args, DartUtils::NewString(result));
-    free(result);
   } else {
     Dart_SetReturnValue(args, DartUtils::NewDartOSError());
   }
@@ -129,7 +127,9 @@
                Dart_Null(),
                0,
                NULL);
-  if (Dart_IsError(results)) Dart_PropagateError(results);
+  if (Dart_IsError(results)) {
+    Dart_PropagateError(results);
+  }
   SyncDirectoryListing sync_listing(results,
                                     DartUtils::GetStringValue(path),
                                     DartUtils::GetBooleanValue(recursive),
@@ -140,7 +140,7 @@
 
 
 CObject* Directory::CreateRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString path(request[0]);
     if (Directory::Create(path.CString())) {
       return CObject::True();
@@ -153,7 +153,8 @@
 
 
 CObject* Directory::DeleteRequest(const CObjectArray& request) {
-  if (request.Length() == 2 && request[0]->IsString() && request[1]->IsBool()) {
+  if ((request.Length() == 2) &&
+       request[0]->IsString() && request[1]->IsBool()) {
     CObjectString path(request[0]);
     CObjectBool recursive(request[1]);
     if (Directory::Delete(path.CString(), recursive.Value())) {
@@ -169,7 +170,7 @@
 CObject* Directory::ExistsRequest(const CObjectArray& request) {
   static const int kExists = 1;
   static const int kDoesNotExist = 0;
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString path(request[0]);
     Directory::ExistsResult result = Directory::Exists(path.CString());
     if (result == Directory::EXISTS) {
@@ -185,12 +186,11 @@
 
 
 CObject* Directory::CreateTempRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString path(request[0]);
-    char* result = Directory::CreateTemp(path.CString());
+    const char* result = Directory::CreateTemp(path.CString());
     if (result != NULL) {
       CObject* temp_dir = new CObjectString(CObject::NewString(result));
-      free(result);
       return temp_dir;
     } else {
       return CObject::NewOSError();
@@ -212,7 +212,7 @@
 
 
 CObject* Directory::ListStartRequest(const CObjectArray& request) {
-  if (request.Length() == 3 &&
+  if ((request.Length() == 3) &&
       request[0]->IsString() &&
       request[1]->IsBool() &&
       request[2]->IsBool()) {
@@ -243,8 +243,7 @@
 
 
 CObject* Directory::ListNextRequest(const CObjectArray& request) {
-  if (request.Length() == 1 &&
-      request[0]->IsIntptr()) {
+  if ((request.Length() == 1) && request[0]->IsIntptr()) {
     CObjectIntptr ptr(request[0]);
     AsyncDirectoryListing* dir_listing =
         reinterpret_cast<AsyncDirectoryListing*>(ptr.Value());
@@ -265,7 +264,7 @@
 
 
 CObject* Directory::ListStopRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsIntptr()) {
+  if ((request.Length() == 1) && request[0]->IsIntptr()) {
     CObjectIntptr ptr(request[0]);
     AsyncDirectoryListing* dir_listing =
         reinterpret_cast<AsyncDirectoryListing*>(ptr.Value());
@@ -277,13 +276,15 @@
 
 
 CObject* Directory::RenameRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsString() &&
       request[1]->IsString()) {
     CObjectString path(request[0]);
     CObjectString new_path(request[1]);
     bool completed = Directory::Rename(path.CString(), new_path.CString());
-    if (completed) return CObject::True();
+    if (completed) {
+      return CObject::True();
+    }
     return CObject::NewOSError();
   }
   return CObject::IllegalArgumentError();
@@ -291,7 +292,7 @@
 
 
 bool AsyncDirectoryListing::AddFileSystemEntityToResponse(Response type,
-                                                          char* arg) {
+                                                          const char* arg) {
   array_->SetAt(index_++, new CObjectInt32(CObject::NewInt32(type)));
   if (arg != NULL) {
     array_->SetAt(index_++, new CObjectString(CObject::NewString(arg)));
@@ -302,37 +303,42 @@
 }
 
 
-bool AsyncDirectoryListing::HandleDirectory(char* dir_name) {
+bool AsyncDirectoryListing::HandleDirectory(const char* dir_name) {
   return AddFileSystemEntityToResponse(kListDirectory, dir_name);
 }
 
 
-bool AsyncDirectoryListing::HandleFile(char* file_name) {
+bool AsyncDirectoryListing::HandleFile(const char* file_name) {
   return AddFileSystemEntityToResponse(kListFile, file_name);
 }
 
 
-bool AsyncDirectoryListing::HandleLink(char* link_name) {
+bool AsyncDirectoryListing::HandleLink(const char* link_name) {
   return AddFileSystemEntityToResponse(kListLink, link_name);
 }
 
+
 void AsyncDirectoryListing::HandleDone() {
   AddFileSystemEntityToResponse(kListDone, NULL);
 }
 
 
-bool AsyncDirectoryListing::HandleError(const char* dir_name) {
+bool AsyncDirectoryListing::HandleError() {
   CObject* err = CObject::NewOSError();
   array_->SetAt(index_++, new CObjectInt32(CObject::NewInt32(kListError)));
   CObjectArray* response = new CObjectArray(CObject::NewArray(3));
   response->SetAt(0, new CObjectInt32(CObject::NewInt32(kListError)));
-  response->SetAt(1, new CObjectString(CObject::NewString(dir_name)));
+  // Delay calling CurrentPath() until after CObject::NewOSError() in case
+  // CurrentPath() pollutes the OS error code.
+  response->SetAt(1, new CObjectString(CObject::NewString(
+      error() ? "Invalid path" : CurrentPath())));
   response->SetAt(2, err);
   array_->SetAt(index_++, response);
   return index_ < length_;
 }
 
-bool SyncDirectoryListing::HandleDirectory(char* dir_name) {
+
+bool SyncDirectoryListing::HandleDirectory(const char* dir_name) {
   Dart_Handle dir_name_dart = DartUtils::NewString(dir_name);
   Dart_Handle dir =
       Dart_New(directory_type_, Dart_Null(), 1, &dir_name_dart);
@@ -340,7 +346,8 @@
   return true;
 }
 
-bool SyncDirectoryListing::HandleLink(char* link_name) {
+
+bool SyncDirectoryListing::HandleLink(const char* link_name) {
   Dart_Handle link_name_dart = DartUtils::NewString(link_name);
   Dart_Handle link =
       Dart_New(link_type_, Dart_Null(), 1, &link_name_dart);
@@ -348,7 +355,8 @@
   return true;
 }
 
-bool SyncDirectoryListing::HandleFile(char* file_name) {
+
+bool SyncDirectoryListing::HandleFile(const char* file_name) {
   Dart_Handle file_name_dart = DartUtils::NewString(file_name);
   Dart_Handle file =
       Dart_New(file_type_, Dart_Null(), 1, &file_name_dart);
@@ -356,11 +364,12 @@
   return true;
 }
 
-bool SyncDirectoryListing::HandleError(const char* dir_name) {
+
+bool SyncDirectoryListing::HandleError() {
   Dart_Handle dart_os_error = DartUtils::NewDartOSError();
   Dart_Handle args[3];
   args[0] = DartUtils::NewString("Directory listing failed");
-  args[1] = DartUtils::NewString(dir_name);
+  args[1] = DartUtils::NewString(error() ? "Invalid path" : CurrentPath());
   args[2] = dart_os_error;
   Dart_ThrowException(Dart_New(
       DartUtils::GetDartType(DartUtils::kIOLibURL, "FileSystemException"),
@@ -386,7 +395,7 @@
       return listing->HandleDirectory(listing->CurrentPath());
 
     case kListError:
-      return listing->HandleError(listing->CurrentPath());
+      return listing->HandleError();
 
     case kListDone:
       listing->Pop();
@@ -403,9 +412,10 @@
   return false;
 }
 
+
 void Directory::List(DirectoryListing* listing) {
   if (listing->error()) {
-    listing->HandleError("Invalid path");
+    listing->HandleError();
     listing->HandleDone();
   } else {
     while (ListNext(listing)) {}
@@ -414,3 +424,5 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/directory.h b/runtime/bin/directory.h
index 9402031..7a1c5d1 100644
--- a/runtime/bin/directory.h
+++ b/runtime/bin/directory.h
@@ -10,7 +10,6 @@
 #include "bin/thread.h"
 #include "platform/globals.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -25,9 +24,7 @@
 class PathBuffer {
  public:
   PathBuffer();
-  ~PathBuffer() {
-    free(data_);
-  }
+  ~PathBuffer();
 
   bool Add(const char* name);
   bool AddW(const wchar_t* name);
@@ -35,15 +32,18 @@
   char* AsString() const;
   wchar_t* AsStringW() const;
 
-  void Reset(int new_length);
+  // Makes a scope allocated copy of the string.
+  const char* AsScopedString() const;
 
-  int length() const {
+  void Reset(intptr_t new_length);
+
+  intptr_t length() const {
     return length_;
   }
 
  private:
   void* data_;
-  int length_;
+  intptr_t length_;
 
   DISALLOW_COPY_AND_ASSIGN(PathBuffer);
 };
@@ -112,10 +112,10 @@
     }
   }
 
-  virtual bool HandleDirectory(char* dir_name) = 0;
-  virtual bool HandleFile(char* file_name) = 0;
-  virtual bool HandleLink(char* link_name) = 0;
-  virtual bool HandleError(const char* dir_name) = 0;
+  virtual bool HandleDirectory(const char* dir_name) = 0;
+  virtual bool HandleFile(const char* file_name) = 0;
+  virtual bool HandleLink(const char* link_name) = 0;
+  virtual bool HandleError() = 0;
   virtual void HandleDone() {}
 
   void Push(DirectoryListingEntry* directory) {
@@ -145,8 +145,8 @@
     return follow_links_;
   }
 
-  char* CurrentPath() {
-    return path_buffer_.AsString();
+  const char* CurrentPath() {
+    return path_buffer_.AsScopedString();
   }
 
   PathBuffer& path_buffer() {
@@ -182,10 +182,10 @@
       : DirectoryListing(dir_name, recursive, follow_links) {}
 
   virtual ~AsyncDirectoryListing() {}
-  virtual bool HandleDirectory(char* dir_name);
-  virtual bool HandleFile(char* file_name);
-  virtual bool HandleLink(char* file_name);
-  virtual bool HandleError(const char* dir_name);
+  virtual bool HandleDirectory(const char* dir_name);
+  virtual bool HandleFile(const char* file_name);
+  virtual bool HandleLink(const char* file_name);
+  virtual bool HandleError();
   virtual void HandleDone();
 
   void SetArray(CObjectArray* array, intptr_t length) {
@@ -200,7 +200,7 @@
   }
 
  private:
-  bool AddFileSystemEntityToResponse(Response response, char* arg);
+  bool AddFileSystemEntityToResponse(Response response, const char* arg);
   CObjectArray* array_;
   intptr_t index_;
   intptr_t length_;
@@ -226,10 +226,10 @@
         DartUtils::GetDartType(DartUtils::kIOLibURL, "Link");
   }
   virtual ~SyncDirectoryListing() {}
-  virtual bool HandleDirectory(char* dir_name);
-  virtual bool HandleFile(char* file_name);
-  virtual bool HandleLink(char* file_name);
-  virtual bool HandleError(const char* dir_name);
+  virtual bool HandleDirectory(const char* dir_name);
+  virtual bool HandleFile(const char* file_name);
+  virtual bool HandleLink(const char* file_name);
+  virtual bool HandleError();
 
  private:
   Dart_Handle results_;
@@ -252,11 +252,18 @@
 
   static void List(DirectoryListing* listing);
   static ExistsResult Exists(const char* path);
-  static char* Current();
+
+  // Returns the current working directory. The caller must call
+  // free() on the result.
+  static char* CurrentNoScope();
+
+  // Returns the current working directory. The returned string is allocated
+  // with Dart_ScopeAllocate(). It lasts only as long as the current API scope.
+  static const char* Current();
+  static const char* SystemTemp();
+  static const char* CreateTemp(const char* path);
   static bool SetCurrent(const char* path);
   static bool Create(const char* path);
-  static char* SystemTemp();
-  static char* CreateTemp(const char* path);
   static bool Delete(const char* path, bool recursive);
   static bool Rename(const char* path, const char* new_path);
 
diff --git a/runtime/bin/directory_android.cc b/runtime/bin/directory_android.cc
index 5d24649..95f42da 100644
--- a/runtime/bin/directory_android.cc
+++ b/runtime/bin/directory_android.cc
@@ -14,34 +14,46 @@
 #include <sys/stat.h>  // NOLINT
 #include <unistd.h>  // NOLINT
 
+#include "bin/dartutils.h"
 #include "bin/file.h"
 #include "bin/platform.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
-
 PathBuffer::PathBuffer() : length_(0) {
-  data_ = calloc(PATH_MAX + 1,  sizeof(char));  // NOLINT
+  data_ = calloc(PATH_MAX + 1, sizeof(char));  // NOLINT
 }
 
+
+PathBuffer::~PathBuffer() {
+  free(data_);
+}
+
+
 bool PathBuffer::AddW(const wchar_t* name) {
   UNREACHABLE();
   return false;
 }
 
+
 char* PathBuffer::AsString() const {
   return reinterpret_cast<char*>(data_);
 }
 
+
 wchar_t* PathBuffer::AsStringW() const {
   UNREACHABLE();
   return NULL;
 }
 
+
+const char* PathBuffer::AsScopedString() const {
+  return DartUtils::ScopedCopyCString(AsString());
+}
+
+
 bool PathBuffer::Add(const char* name) {
   char* data = AsString();
   int written = snprintf(data + length_,
@@ -49,9 +61,9 @@
                          "%s",
                          name);
   data[PATH_MAX] = '\0';
-  if (written <= PATH_MAX - length_ &&
-      written >= 0 &&
-      static_cast<size_t>(written) == strnlen(name, PATH_MAX + 1)) {
+  if ((written <= PATH_MAX - length_) &&
+      (written >= 0) &&
+      (static_cast<size_t>(written) == strnlen(name, PATH_MAX + 1))) {
     length_ += written;
     return true;
   } else {
@@ -60,7 +72,8 @@
   }
 }
 
-void PathBuffer::Reset(int new_length) {
+
+void PathBuffer::Reset(intptr_t new_length) {
   length_ = new_length;
   AsString()[length_] = '\0';
 }
@@ -69,8 +82,8 @@
 // A linked list of symbolic links, with their unique file system identifiers.
 // These are scanned to detect loops while doing a recursive directory listing.
 struct LinkList {
-  dev_t dev;
-  ino_t ino;
+  uint64_t dev;
+  uint64_t ino;
   LinkList* next;
 };
 
@@ -84,7 +97,7 @@
     do {
       lister_ = reinterpret_cast<intptr_t>(
           opendir(listing->path_buffer().AsString()));
-    } while (lister_ == 0 && errno == EINTR);
+    } while ((lister_ == 0) && (errno == EINTR));
 
     if (lister_ == 0) {
       done_ = true;
@@ -106,18 +119,19 @@
   int status = 0;
   dirent entry;
   dirent* result;
-  if ((status = NO_RETRY_EXPECTED(readdir_r(reinterpret_cast<DIR*>(lister_),
-                                            &entry,
-                                            &result))) == 0 &&
-      result != NULL) {
+  status = NO_RETRY_EXPECTED(readdir_r(
+      reinterpret_cast<DIR*>(lister_), &entry, &result));
+  if ((status == 0) && (result != NULL)) {
     if (!listing->path_buffer().Add(entry.d_name)) {
       done_ = true;
       return kListError;
     }
     switch (entry.d_type) {
       case DT_DIR:
-        if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-        if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+        if ((strcmp(entry.d_name, ".") == 0) ||
+            (strcmp(entry.d_name, "..") == 0)) {
+          return Next(listing);
+        }
         return kListDirectory;
       case DT_REG:
         return kListFile;
@@ -146,8 +160,8 @@
                                     link_ };
           LinkList* previous = link_;
           while (previous != NULL) {
-            if (previous->dev == current_link.dev &&
-                previous->ino == current_link.ino) {
+            if ((previous->dev == current_link.dev) &&
+                (previous->ino == current_link.ino)) {
               // Report the looping link as a link, rather than following it.
               return kListLink;
             }
@@ -163,14 +177,18 @@
             // Recurse into the subdirectory with current_link added to the
             // linked list of seen file system links.
             link_ = new LinkList(current_link);
-            if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-            if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+            if ((strcmp(entry.d_name, ".") == 0) ||
+                (strcmp(entry.d_name, "..") == 0)) {
+              return Next(listing);
+            }
             return kListDirectory;
           }
         }
         if (S_ISDIR(entry_info.st_mode)) {
-          if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-          if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+          if ((strcmp(entry.d_name, ".") == 0) ||
+              (strcmp(entry.d_name, "..") == 0)) {
+            return Next(listing);
+          }
           return kListDirectory;
         } else if (S_ISREG(entry_info.st_mode)) {
           return kListFile;
@@ -203,7 +221,7 @@
 
 
 void DirectoryListingEntry::ResetLink() {
-  if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
+  if ((link_ != NULL) && ((parent_ == NULL) || (parent_->link_ != link_))) {
     delete link_;
     link_ = NULL;
   }
@@ -218,14 +236,15 @@
 
 static bool DeleteFile(char* file_name,
                        PathBuffer* path) {
-  return path->Add(file_name) && unlink(path->AsString()) == 0;
+  return path->Add(file_name) && (unlink(path->AsString()) == 0);
 }
 
 
 static bool DeleteDir(char* dir_name,
                       PathBuffer* path) {
-  if (strcmp(dir_name, ".") == 0) return true;
-  if (strcmp(dir_name, "..") == 0) return true;
+  if ((strcmp(dir_name, ".") == 0) || (strcmp(dir_name, "..") == 0)) {
+    return true;
+  }
   return path->Add(dir_name) && DeleteRecursively(path);
 }
 
@@ -240,14 +259,16 @@
     return (unlink(path->AsString()) == 0);
   }
 
-  if (!path->Add(File::PathSeparator())) return false;
+  if (!path->Add(File::PathSeparator())) {
+    return false;
+  }
 
   // Not a link. Attempt to open as a directory and recurse into the
   // directory.
   DIR* dir_pointer;
   do {
     dir_pointer = opendir(path->AsString());
-  } while (dir_pointer == NULL && errno == EINTR);
+  } while ((dir_pointer == NULL) && (errno == EINTR));
   if (dir_pointer == NULL) {
     return false;
   }
@@ -323,31 +344,30 @@
       return DOES_NOT_EXIST;
     }
   } else {
-    if (errno == EACCES ||
-        errno == EBADF ||
-        errno == EFAULT ||
-        errno == ENOMEM ||
-        errno == EOVERFLOW) {
+    if ((errno == EACCES) ||
+        (errno == EBADF) ||
+        (errno == EFAULT) ||
+        (errno == ENOMEM) ||
+        (errno == EOVERFLOW)) {
       // Search permissions denied for one of the directories in the
       // path or a low level error occured. We do not know if the
       // directory exists.
       return UNKNOWN;
     }
-    ASSERT(errno == ELOOP ||
-           errno == ENAMETOOLONG ||
-           errno == ENOENT ||
-           errno == ENOTDIR);
+    ASSERT((errno == ELOOP) ||
+           (errno == ENAMETOOLONG) ||
+           (errno == ENOENT) ||
+           (errno == ENOTDIR));
     return DOES_NOT_EXIST;
   }
 }
 
 
-char* Directory::Current() {
+char* Directory::CurrentNoScope() {
   // Android's getcwd adheres closely to the POSIX standard. It won't
   // allocate memory. We need to make our own copy.
-
   char buffer[PATH_MAX];
-  if (NULL == getcwd(buffer, PATH_MAX)) {
+  if (getcwd(buffer, PATH_MAX) == NULL) {
     return NULL;
   }
 
@@ -355,9 +375,18 @@
 }
 
 
+const char* Directory::Current() {
+  char buffer[PATH_MAX];
+  if (getcwd(buffer, PATH_MAX) == NULL) {
+    return NULL;
+  }
+  return DartUtils::ScopedCopyCString(buffer);
+}
+
+
 bool Directory::SetCurrent(const char* path) {
   int result = NO_RETRY_EXPECTED(chdir(path));
-  return result == 0;
+  return (result == 0);
 }
 
 
@@ -366,27 +395,14 @@
   // process umask.
   int result = NO_RETRY_EXPECTED(mkdir(dir_name, 0777));
   // If the directory already exists, treat it as a success.
-  if (result == -1 && errno == EEXIST) {
+  if ((result == -1) && (errno == EEXIST)) {
     return (Exists(dir_name) == EXISTS);
   }
   return (result == 0);
 }
 
 
-// Android doesn't currently provide mkdtemp.  Once Android provied mkdtemp,
-// remove this function in favor of calling mkdtemp directly.
-static char* MakeTempDirectory(char* path_template) {
-  if (mktemp(path_template) == NULL) {
-    return NULL;
-  }
-  if (mkdir(path_template, 0700) != 0) {
-    return NULL;
-  }
-  return path_template;
-}
-
-
-char* Directory::SystemTemp() {
+const char* Directory::SystemTemp() {
   // Android does not have a /tmp directory. A partial substitute,
   // suitable for bring-up work and tests, is to create a tmp
   // directory in /data/local/tmp.
@@ -399,36 +415,38 @@
   if (stat(ANDROID_TEMP_DIR, &st) != 0) {
     mkdir(ANDROID_TEMP_DIR, 0777);
   }
-  return strdup(ANDROID_TEMP_DIR);
+  return ANDROID_TEMP_DIR;
 }
 
 
-char* Directory::CreateTemp(const char* prefix) {
+const char* Directory::CreateTemp(const char* prefix) {
   // Returns a new, unused directory name, adding characters to the end
   // of prefix.  Creates the directory with the permissions specified
   // by the process umask.
-  // The return value must be freed by the caller.
+  // The return value is Dart_ScopeAllocated.
   PathBuffer path;
-  path.Add(prefix);
+  if (!path.Add(prefix)) {
+    return NULL;
+  }
   if (!path.Add("XXXXXX")) {
     // Pattern has overflowed.
     return NULL;
   }
   char* result;
   do {
-    result = MakeTempDirectory(path.AsString());
-  } while (result == NULL && errno == EINTR);
+    result = mkdtemp(path.AsString());
+  } while ((result == NULL) && (errno == EINTR));
   if (result == NULL) {
     return NULL;
   }
-  return strdup(result);
+  return path.AsScopedString();
 }
 
 
 bool Directory::Delete(const char* dir_name, bool recursive) {
   if (!recursive) {
-    if (File::GetType(dir_name, false) == File::kIsLink &&
-        File::GetType(dir_name, true) == File::kIsDirectory) {
+    if ((File::GetType(dir_name, false) == File::kIsLink) &&
+        (File::GetType(dir_name, true) == File::kIsDirectory)) {
       return (NO_RETRY_EXPECTED(unlink(dir_name)) == 0);
     }
     return (NO_RETRY_EXPECTED(rmdir(dir_name)) == 0);
@@ -444,7 +462,9 @@
 
 bool Directory::Rename(const char* path, const char* new_path) {
   ExistsResult exists = Exists(path);
-  if (exists != EXISTS) return false;
+  if (exists != EXISTS) {
+    return false;
+  }
   return (NO_RETRY_EXPECTED(rename(path, new_path)) == 0);
 }
 
diff --git a/runtime/bin/directory_linux.cc b/runtime/bin/directory_linux.cc
index d150bf2..d099b0e 100644
--- a/runtime/bin/directory_linux.cc
+++ b/runtime/bin/directory_linux.cc
@@ -15,33 +15,46 @@
 #include <sys/stat.h>  // NOLINT
 #include <unistd.h>  // NOLINT
 
-#include "platform/signal_blocker.h"
+#include "bin/dartutils.h"
 #include "bin/file.h"
 #include "bin/platform.h"
-
+#include "platform/signal_blocker.h"
 
 namespace dart {
 namespace bin {
 
-
 PathBuffer::PathBuffer() : length_(0) {
-  data_ = calloc(PATH_MAX + 1,  sizeof(char));  // NOLINT
+  data_ = calloc(PATH_MAX + 1, sizeof(char));  // NOLINT
 }
 
+
+PathBuffer::~PathBuffer() {
+  free(data_);
+}
+
+
 bool PathBuffer::AddW(const wchar_t* name) {
   UNREACHABLE();
   return false;
 }
 
+
 char* PathBuffer::AsString() const {
   return reinterpret_cast<char*>(data_);
 }
 
+
 wchar_t* PathBuffer::AsStringW() const {
   UNREACHABLE();
   return NULL;
 }
 
+
+const char* PathBuffer::AsScopedString() const {
+  return DartUtils::ScopedCopyCString(AsString());
+}
+
+
 bool PathBuffer::Add(const char* name) {
   char* data = AsString();
   int written = snprintf(data + length_,
@@ -49,9 +62,9 @@
                          "%s",
                          name);
   data[PATH_MAX] = '\0';
-  if (written <= PATH_MAX - length_ &&
-      written >= 0 &&
-      static_cast<size_t>(written) == strnlen(name, PATH_MAX + 1)) {
+  if ((written <= PATH_MAX - length_) &&
+      (written >= 0) &&
+      (static_cast<size_t>(written) == strnlen(name, PATH_MAX + 1))) {
     length_ += written;
     return true;
   } else {
@@ -60,7 +73,8 @@
   }
 }
 
-void PathBuffer::Reset(int new_length) {
+
+void PathBuffer::Reset(intptr_t new_length) {
   length_ = new_length;
   AsString()[length_] = '\0';
 }
@@ -84,7 +98,7 @@
     do {
       lister_ = reinterpret_cast<intptr_t>(
           opendir(listing->path_buffer().AsString()));
-    } while (lister_ == 0 && errno == EINTR);
+    } while ((lister_ == 0) && (errno == EINTR));
 
     if (lister_ == 0) {
       done_ = true;
@@ -106,18 +120,19 @@
   int status = 0;
   dirent entry;
   dirent* result;
-  if ((status = NO_RETRY_EXPECTED(readdir_r(reinterpret_cast<DIR*>(lister_),
-                                  &entry,
-                                  &result))) == 0 &&
-      result != NULL) {
+  status = NO_RETRY_EXPECTED(readdir_r(
+      reinterpret_cast<DIR*>(lister_), &entry, &result));
+  if ((status == 0) && (result != NULL)) {
     if (!listing->path_buffer().Add(entry.d_name)) {
       done_ = true;
       return kListError;
     }
     switch (entry.d_type) {
       case DT_DIR:
-        if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-        if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+        if ((strcmp(entry.d_name, ".") == 0) ||
+            (strcmp(entry.d_name, "..") == 0)) {
+          return Next(listing);
+        }
         return kListDirectory;
       case DT_REG:
         return kListFile;
@@ -146,8 +161,8 @@
                                     link_ };
           LinkList* previous = link_;
           while (previous != NULL) {
-            if (previous->dev == current_link.dev &&
-                previous->ino == current_link.ino) {
+            if ((previous->dev == current_link.dev) &&
+                (previous->ino == current_link.ino)) {
               // Report the looping link as a link, rather than following it.
               return kListLink;
             }
@@ -163,14 +178,18 @@
             // Recurse into the subdirectory with current_link added to the
             // linked list of seen file system links.
             link_ = new LinkList(current_link);
-            if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-            if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+            if ((strcmp(entry.d_name, ".") == 0) ||
+                (strcmp(entry.d_name, "..") == 0)) {
+              return Next(listing);
+            }
             return kListDirectory;
           }
         }
         if (S_ISDIR(entry_info.st_mode)) {
-          if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-          if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+          if ((strcmp(entry.d_name, ".") == 0) ||
+              (strcmp(entry.d_name, "..") == 0)) {
+            return Next(listing);
+          }
           return kListDirectory;
         } else if (S_ISREG(entry_info.st_mode)) {
           return kListFile;
@@ -203,7 +222,7 @@
 
 
 void DirectoryListingEntry::ResetLink() {
-  if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
+  if ((link_ != NULL) && ((parent_ == NULL) || (parent_->link_ != link_))) {
     delete link_;
     link_ = NULL;
   }
@@ -219,14 +238,15 @@
 static bool DeleteFile(char* file_name,
                        PathBuffer* path) {
   return path->Add(file_name) &&
-      NO_RETRY_EXPECTED(unlink(path->AsString())) == 0;
+      (NO_RETRY_EXPECTED(unlink(path->AsString())) == 0);
 }
 
 
 static bool DeleteDir(char* dir_name,
                       PathBuffer* path) {
-  if (strcmp(dir_name, ".") == 0) return true;
-  if (strcmp(dir_name, "..") == 0) return true;
+  if ((strcmp(dir_name, ".") == 0) || (strcmp(dir_name, "..") == 0)) {
+    return true;
+  }
   return path->Add(dir_name) && DeleteRecursively(path);
 }
 
@@ -241,14 +261,16 @@
     return (NO_RETRY_EXPECTED(unlink(path->AsString())) == 0);
   }
 
-  if (!path->Add(File::PathSeparator())) return false;
+  if (!path->Add(File::PathSeparator())) {
+    return false;
+  }
 
   // Not a link. Attempt to open as a directory and recurse into the
   // directory.
   DIR* dir_pointer;
   do {
     dir_pointer = opendir(path->AsString());
-  } while (dir_pointer == NULL && errno == EINTR);
+  } while ((dir_pointer == NULL) && (errno == EINTR));
   if (dir_pointer == NULL) {
     return false;
   }
@@ -260,8 +282,8 @@
   while (NO_RETRY_EXPECTED(readdir_r(dir_pointer, &entry, &result)) == 0) {
     if (result == NULL) {
       // End of directory.
-      return NO_RETRY_EXPECTED(closedir(dir_pointer)) == 0 &&
-          NO_RETRY_EXPECTED(remove(path->AsString())) == 0;
+      return (NO_RETRY_EXPECTED(closedir(dir_pointer)) == 0) &&
+             (NO_RETRY_EXPECTED(remove(path->AsString())) == 0);
     }
     bool ok = false;
     switch (entry.d_type) {
@@ -324,43 +346,41 @@
       return DOES_NOT_EXIST;
     }
   } else {
-    if (errno == EACCES ||
-        errno == EBADF ||
-        errno == EFAULT ||
-        errno == ENOMEM ||
-        errno == EOVERFLOW) {
+    if ((errno == EACCES) ||
+        (errno == EBADF) ||
+        (errno == EFAULT) ||
+        (errno == ENOMEM) ||
+        (errno == EOVERFLOW)) {
       // Search permissions denied for one of the directories in the
       // path or a low level error occured. We do not know if the
       // directory exists.
       return UNKNOWN;
     }
-    ASSERT(errno == ELOOP ||
-           errno == ENAMETOOLONG ||
-           errno == ENOENT ||
-           errno == ENOTDIR);
+    ASSERT((errno == ELOOP) ||
+           (errno == ENAMETOOLONG) ||
+           (errno == ENOENT) ||
+           (errno == ENOTDIR));
     return DOES_NOT_EXIST;
   }
 }
 
 
-char* Directory::Current() {
-  size_t size = PATH_MAX;
-  char* buffer = NULL;
-  for (char* result = NULL; result == NULL; size *= 2) {
-    if ((buffer = reinterpret_cast<char*>(realloc(buffer, size))) == NULL) {
-      return NULL;
-    }
-    result = getcwd(buffer, size);
-    if (result == NULL && errno != ERANGE) {
-      return NULL;
-    }
+char* Directory::CurrentNoScope() {
+  return getcwd(NULL, 0);
+}
+
+
+const char* Directory::Current() {
+  char buffer[PATH_MAX];
+  if (getcwd(buffer, PATH_MAX) == NULL) {
+    return NULL;
   }
-  return buffer;
+  return DartUtils::ScopedCopyCString(buffer);
 }
 
 
 bool Directory::SetCurrent(const char* path) {
-  return NO_RETRY_EXPECTED(chdir(path)) == 0;
+  return (NO_RETRY_EXPECTED(chdir(path)) == 0);
 }
 
 
@@ -369,14 +389,15 @@
   // process umask.
   int result = NO_RETRY_EXPECTED(mkdir(dir_name, 0777));
   // If the directory already exists, treat it as a success.
-  if (result == -1 && errno == EEXIST) {
+  if ((result == -1) && (errno == EEXIST)) {
     return (Exists(dir_name) == EXISTS);
   }
   return (result == 0);
 }
 
 
-char* Directory::SystemTemp() {
+const char* Directory::SystemTemp() {
+  PathBuffer path;
   const char* temp_dir = getenv("TMPDIR");
   if (temp_dir == NULL) {
     temp_dir = getenv("TMP");
@@ -384,23 +405,29 @@
   if (temp_dir == NULL) {
     temp_dir = "/tmp";
   }
-  char* result = strdup(temp_dir);
+  if (!path.Add(temp_dir)) {
+    return NULL;
+  }
+
   // Remove any trailing slash.
+  char* result = path.AsString();
   int length = strlen(result);
-  if (length > 1 && result[length - 1] == '/') {
+  if ((length > 1) && (result[length - 1] == '/')) {
     result[length - 1] = '\0';
   }
-  return result;
+  return path.AsScopedString();
 }
 
 
-char* Directory::CreateTemp(const char* prefix) {
+const char* Directory::CreateTemp(const char* prefix) {
   // Returns a new, unused directory name, adding characters to the end
   // of prefix.  Creates the directory with the permissions specified
   // by the process umask.
-  // The return value must be freed by the caller.
+  // The return value is Dart_ScopeAllocated.
   PathBuffer path;
-  path.Add(prefix);
+  if (!path.Add(prefix)) {
+    return NULL;
+  }
   if (!path.Add("XXXXXX")) {
     // Pattern has overflowed.
     return NULL;
@@ -408,18 +435,18 @@
   char* result;
   do {
     result = mkdtemp(path.AsString());
-  } while (result == NULL && errno == EINTR);
+  } while ((result == NULL) && (errno == EINTR));
   if (result == NULL) {
     return NULL;
   }
-  return strdup(result);
+  return path.AsScopedString();
 }
 
 
 bool Directory::Delete(const char* dir_name, bool recursive) {
   if (!recursive) {
-    if (File::GetType(dir_name, false) == File::kIsLink &&
-        File::GetType(dir_name, true) == File::kIsDirectory) {
+    if ((File::GetType(dir_name, false) == File::kIsLink) &&
+        (File::GetType(dir_name, true) == File::kIsDirectory)) {
       return NO_RETRY_EXPECTED(unlink(dir_name)) == 0;
     }
     return NO_RETRY_EXPECTED(rmdir(dir_name)) == 0;
@@ -435,8 +462,10 @@
 
 bool Directory::Rename(const char* path, const char* new_path) {
   ExistsResult exists = Exists(path);
-  if (exists != EXISTS) return false;
-  return NO_RETRY_EXPECTED(rename(path, new_path)) == 0;
+  if (exists != EXISTS) {
+    return false;
+  }
+  return (NO_RETRY_EXPECTED(rename(path, new_path)) == 0);
 }
 
 }  // namespace bin
diff --git a/runtime/bin/directory_macos.cc b/runtime/bin/directory_macos.cc
index 55994aa..5c0f5a6 100644
--- a/runtime/bin/directory_macos.cc
+++ b/runtime/bin/directory_macos.cc
@@ -14,34 +14,46 @@
 #include <sys/stat.h>  // NOLINT
 #include <unistd.h>  // NOLINT
 
+#include "bin/dartutils.h"
 #include "bin/file.h"
 #include "bin/platform.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
-
 PathBuffer::PathBuffer() : length_(0) {
-  data_ = calloc(PATH_MAX + 1,  sizeof(char));  // NOLINT
+  data_ = calloc(PATH_MAX + 1, sizeof(char));  // NOLINT
 }
 
+
+PathBuffer::~PathBuffer() {
+  free(data_);
+}
+
+
 bool PathBuffer::AddW(const wchar_t* name) {
   UNREACHABLE();
   return false;
 }
 
+
 char* PathBuffer::AsString() const {
   return reinterpret_cast<char*>(data_);
 }
 
+
 wchar_t* PathBuffer::AsStringW() const {
   UNREACHABLE();
   return NULL;
 }
 
+
+const char* PathBuffer::AsScopedString() const {
+  return DartUtils::ScopedCopyCString(AsString());
+}
+
+
 bool PathBuffer::Add(const char* name) {
   char* data = AsString();
   int written = snprintf(data + length_,
@@ -49,9 +61,9 @@
                          "%s",
                          name);
   data[PATH_MAX] = '\0';
-  if (written <= PATH_MAX - length_ &&
-      written >= 0 &&
-      static_cast<size_t>(written) == strlen(name)) {
+  if ((written <= PATH_MAX - length_) &&
+      (written >= 0) &&
+      (static_cast<size_t>(written) == strlen(name))) {
     length_ += written;
     return true;
   } else {
@@ -60,7 +72,8 @@
   }
 }
 
-void PathBuffer::Reset(int new_length) {
+
+void PathBuffer::Reset(intptr_t new_length) {
   length_ = new_length;
   AsString()[length_] = '\0';
 }
@@ -84,7 +97,7 @@
     do {
       lister_ = reinterpret_cast<intptr_t>(
           opendir(listing->path_buffer().AsString()));
-    } while (lister_ == 0 && errno == EINTR);
+    } while ((lister_ == 0) && (errno == EINTR));
 
     if (lister_ == 0) {
       done_ = true;
@@ -106,18 +119,19 @@
   int status = 0;
   dirent entry;
   dirent* result;
-  if ((status = NO_RETRY_EXPECTED(readdir_r(reinterpret_cast<DIR*>(lister_),
-                                            &entry,
-                                            &result))) == 0 &&
-      result != NULL) {
+  status = NO_RETRY_EXPECTED(readdir_r(
+      reinterpret_cast<DIR*>(lister_), &entry, &result));
+  if ((status == 0) && (result != NULL)) {
     if (!listing->path_buffer().Add(entry.d_name)) {
       done_ = true;
       return kListError;
     }
     switch (entry.d_type) {
       case DT_DIR:
-        if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-        if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+        if ((strcmp(entry.d_name, ".") == 0) ||
+            (strcmp(entry.d_name, "..") == 0)) {
+          return Next(listing);
+        }
         return kListDirectory;
       case DT_REG:
         return kListFile;
@@ -146,8 +160,8 @@
                                     link_ };
           LinkList* previous = link_;
           while (previous != NULL) {
-            if (previous->dev == current_link.dev &&
-                previous->ino == current_link.ino) {
+            if ((previous->dev == current_link.dev) &&
+                (previous->ino == current_link.ino)) {
               // Report the looping link as a link, rather than following it.
               return kListLink;
             }
@@ -163,14 +177,18 @@
             // Recurse into the subdirectory with current_link added to the
             // linked list of seen file system links.
             link_ = new LinkList(current_link);
-            if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-            if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+            if ((strcmp(entry.d_name, ".") == 0) ||
+                (strcmp(entry.d_name, "..") == 0)) {
+              return Next(listing);
+            }
             return kListDirectory;
           }
         }
         if (S_ISDIR(entry_info.st_mode)) {
-          if (strcmp(entry.d_name, ".") == 0) return Next(listing);
-          if (strcmp(entry.d_name, "..") == 0) return Next(listing);
+          if ((strcmp(entry.d_name, ".") == 0) ||
+              (strcmp(entry.d_name, "..") == 0)) {
+            return Next(listing);
+          }
           return kListDirectory;
         } else if (S_ISREG(entry_info.st_mode)) {
           return kListFile;
@@ -203,7 +221,7 @@
 
 
 void DirectoryListingEntry::ResetLink() {
-  if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
+  if ((link_ != NULL) && ((parent_ == NULL) || (parent_->link_ != link_))) {
     delete link_;
     link_ = NULL;
   }
@@ -218,14 +236,15 @@
 
 static bool DeleteFile(char* file_name,
                        PathBuffer* path) {
-  return path->Add(file_name) && unlink(path->AsString()) == 0;
+  return path->Add(file_name) && (unlink(path->AsString()) == 0);
 }
 
 
 static bool DeleteDir(char* dir_name,
                       PathBuffer* path) {
-  if (strcmp(dir_name, ".") == 0) return true;
-  if (strcmp(dir_name, "..") == 0) return true;
+  if ((strcmp(dir_name, ".") == 0) || (strcmp(dir_name, "..") == 0)) {
+    return true;
+  }
   return path->Add(dir_name) && DeleteRecursively(path);
 }
 
@@ -240,14 +259,16 @@
     return (unlink(path->AsString()) == 0);
   }
 
-  if (!path->Add(File::PathSeparator())) return false;
+  if (!path->Add(File::PathSeparator())) {
+    return false;
+  }
 
   // Not a link. Attempt to open as a directory and recurse into the
   // directory.
   DIR* dir_pointer;
   do {
     dir_pointer = opendir(path->AsString());
-  } while (dir_pointer == NULL && errno == EINTR);
+  } while ((dir_pointer == NULL) && (errno == EINTR));
   if (dir_pointer == NULL) {
     return false;
   }
@@ -259,8 +280,8 @@
   while (NO_RETRY_EXPECTED(readdir_r(dir_pointer, &entry, &result)) == 0) {
     if (result == NULL) {
       // End of directory.
-      return NO_RETRY_EXPECTED(closedir(dir_pointer)) == 0 &&
-          NO_RETRY_EXPECTED(remove(path->AsString())) == 0;
+      return (NO_RETRY_EXPECTED(closedir(dir_pointer)) == 0) &&
+             (NO_RETRY_EXPECTED(remove(path->AsString())) == 0);
     }
     bool ok = false;
     switch (entry.d_type) {
@@ -323,33 +344,42 @@
       return DOES_NOT_EXIST;
     }
   } else {
-    if (errno == EACCES ||
-        errno == EBADF ||
-        errno == EFAULT ||
-        errno == ENOMEM ||
-        errno == EOVERFLOW) {
+    if ((errno == EACCES) ||
+        (errno == EBADF) ||
+        (errno == EFAULT) ||
+        (errno == ENOMEM) ||
+        (errno == EOVERFLOW)) {
       // Search permissions denied for one of the directories in the
       // path or a low level error occured. We do not know if the
       // directory exists.
       return UNKNOWN;
     }
-    ASSERT(errno == ELOOP ||
-           errno == ENAMETOOLONG ||
-           errno == ENOENT ||
-           errno == ENOTDIR);
+    ASSERT((errno == ELOOP) ||
+           (errno == ENAMETOOLONG) ||
+           (errno == ENOENT) ||
+           (errno == ENOTDIR));
     return DOES_NOT_EXIST;
   }
 }
 
 
-char* Directory::Current() {
+char* Directory::CurrentNoScope() {
   return getcwd(NULL, 0);
 }
 
 
+const char* Directory::Current() {
+  char buffer[PATH_MAX];
+  if (getcwd(buffer, PATH_MAX) == NULL) {
+    return NULL;
+  }
+  return DartUtils::ScopedCopyCString(buffer);
+}
+
+
 bool Directory::SetCurrent(const char* path) {
   int result = NO_RETRY_EXPECTED(chdir(path));
-  return result == 0;
+  return (result == 0);
 }
 
 
@@ -358,14 +388,15 @@
   // process umask.
   int result = NO_RETRY_EXPECTED(mkdir(dir_name, 0777));
   // If the directory already exists, treat it as a success.
-  if (result == -1 && errno == EEXIST) {
+  if ((result == -1) && (errno == EEXIST)) {
     return (Exists(dir_name) == EXISTS);
   }
   return (result == 0);
 }
 
 
-char* Directory::SystemTemp() {
+const char* Directory::SystemTemp() {
+  PathBuffer path;
   const char* temp_dir = getenv("TMPDIR");
   if (temp_dir == NULL) {
     temp_dir = getenv("TMP");
@@ -373,23 +404,28 @@
   if (temp_dir == NULL) {
     temp_dir = "/tmp";
   }
-  char* result = strdup(temp_dir);
+  if (!path.Add(temp_dir)) {
+    return NULL;
+  }
   // Remove any trailing slash.
+  char* result = path.AsString();
   int length = strlen(result);
-  if (length > 1 && result[length - 1] == '/') {
+  if ((length > 1) && (result[length - 1] == '/')) {
     result[length - 1] = '\0';
   }
-  return result;
+  return path.AsScopedString();
 }
 
 
-char* Directory::CreateTemp(const char* prefix) {
+const char* Directory::CreateTemp(const char* prefix) {
   // Returns a new, unused directory name, adding characters to the end
   // of prefix.  Creates the directory with the permissions specified
   // by the process umask.
-  // The return value must be freed by the caller.
+  // The return value is Dart_ScopeAllocated.
   PathBuffer path;
-  path.Add(prefix);
+  if (!path.Add(prefix)) {
+    return NULL;
+  }
   if (!path.Add("XXXXXX")) {
     // Pattern has overflowed.
     return NULL;
@@ -397,18 +433,18 @@
   char* result;
   do {
     result = mkdtemp(path.AsString());
-  } while (result == NULL && errno == EINTR);
+  } while ((result == NULL) && (errno == EINTR));
   if (result == NULL) {
     return NULL;
   }
-  return strdup(result);
+  return path.AsScopedString();
 }
 
 
 bool Directory::Delete(const char* dir_name, bool recursive) {
   if (!recursive) {
-    if (File::GetType(dir_name, false) == File::kIsLink &&
-        File::GetType(dir_name, true) == File::kIsDirectory) {
+    if ((File::GetType(dir_name, false) == File::kIsLink) &&
+        (File::GetType(dir_name, true) == File::kIsDirectory)) {
       return (NO_RETRY_EXPECTED(unlink(dir_name)) == 0);
     }
     return (NO_RETRY_EXPECTED(rmdir(dir_name)) == 0);
@@ -424,7 +460,9 @@
 
 bool Directory::Rename(const char* path, const char* new_path) {
   ExistsResult exists = Exists(path);
-  if (exists != EXISTS) return false;
+  if (exists != EXISTS) {
+    return false;
+  }
   return (NO_RETRY_EXPECTED(rename(path, new_path)) == 0);
 }
 
diff --git a/runtime/bin/directory_unsupported.cc b/runtime/bin/directory_unsupported.cc
new file mode 100644
index 0000000..7e82bdd
--- /dev/null
+++ b/runtime/bin/directory_unsupported.cc
@@ -0,0 +1,70 @@
+// 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.
+
+#if defined(DART_IO_DISABLED)
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+
+namespace dart {
+namespace bin {
+
+void FUNCTION_NAME(Directory_Current)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Directory_SetCurrent)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Directory_Exists)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Directory_Create)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Directory_SystemTemp)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Directory_CreateTemp)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Directory_Delete)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Directory_Rename)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Directory_List)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Directory is not supported on this platform"));
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // defined(DART_IO_DISABLED)
diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc
index 40bfb9b..efaaaf9 100644
--- a/runtime/bin/directory_win.cc
+++ b/runtime/bin/directory_win.cc
@@ -13,6 +13,7 @@
 #include <errno.h>  // NOLINT
 #include <sys/stat.h>  // NOLINT
 
+#include "bin/dartutils.h"
 #include "bin/log.h"
 
 #undef DeleteFile
@@ -23,24 +24,37 @@
 namespace bin {
 
 PathBuffer::PathBuffer() : length_(0) {
-  data_ = calloc(MAX_LONG_PATH + 1,  sizeof(wchar_t));  // NOLINT
+  data_ = calloc(MAX_LONG_PATH + 1, sizeof(wchar_t));  // NOLINT
 }
 
-char* PathBuffer::AsString() const {
-  return StringUtilsWin::WideToUtf8(AsStringW());
+
+PathBuffer::~PathBuffer() {
+  free(data_);
 }
 
+
+char* PathBuffer::AsString() const {
+  UNREACHABLE();
+  return NULL;
+}
+
+
 wchar_t* PathBuffer::AsStringW() const {
   return reinterpret_cast<wchar_t*>(data_);
 }
 
+
+const char* PathBuffer::AsScopedString() const {
+  return StringUtilsWin::WideToUtf8(AsStringW());
+}
+
+
 bool PathBuffer::Add(const char* name) {
   const wchar_t* wide_name = StringUtilsWin::Utf8ToWide(name);
-  bool success = AddW(wide_name);
-  free(const_cast<wchar_t*>(wide_name));
-  return success;
+  return AddW(wide_name);
 }
 
+
 bool PathBuffer::AddW(const wchar_t* name) {
   wchar_t* data = AsStringW();
   int written = _snwprintf(data + length_,
@@ -48,9 +62,9 @@
                            L"%s",
                            name);
   data[MAX_LONG_PATH] = L'\0';
-  if (written <= MAX_LONG_PATH - length_ &&
-      written >= 0 &&
-      static_cast<size_t>(written) == wcsnlen(name, MAX_LONG_PATH + 1)) {
+  if ((written <= MAX_LONG_PATH - length_) &&
+      (written >= 0) &&
+      (static_cast<size_t>(written) == wcsnlen(name, MAX_LONG_PATH + 1))) {
     length_ += written;
     return true;
   } else {
@@ -59,11 +73,13 @@
   }
 }
 
-void PathBuffer::Reset(int new_length) {
+
+void PathBuffer::Reset(intptr_t new_length) {
   length_ = new_length;
   AsStringW()[length_] = L'\0';
 }
 
+
 // If link_name points to a link, IsBrokenLink will return true if link_name
 // points to an invalid target.
 static bool IsBrokenLink(const wchar_t* link_name) {
@@ -83,6 +99,7 @@
   }
 }
 
+
 // A linked list structure holding a link target's unique file system ID.
 // Used to detect loops in the file system when listing recursively.
 struct LinkList {
@@ -98,7 +115,7 @@
 
 static ListType HandleFindFile(DirectoryListing* listing,
                                DirectoryListingEntry* entry,
-                               WIN32_FIND_DATAW& find_file_data) {
+                               const WIN32_FIND_DATAW& find_file_data) {
   if (!listing->path_buffer().AddW(find_file_data.cFileName)) {
     return kListError;
   }
@@ -137,17 +154,17 @@
       current_link.next = entry->link();
       LinkList* previous = entry->link();
       while (previous != NULL) {
-        if (previous->volume == current_link.volume &&
-            previous->id_low == current_link.id_low &&
-            previous->id_high == current_link.id_high) {
+        if ((previous->volume == current_link.volume) &&
+            (previous->id_low == current_link.id_low) &&
+            (previous->id_high == current_link.id_high)) {
           // Report the looping link as a link, rather than following it.
           return kListLink;
         }
         previous = previous->next;
       }
       // Recurse into the directory, adding current link to the seen links list.
-      if (wcscmp(find_file_data.cFileName, L".") == 0 ||
-          wcscmp(find_file_data.cFileName, L"..") == 0) {
+      if ((wcscmp(find_file_data.cFileName, L".") == 0) ||
+          (wcscmp(find_file_data.cFileName, L"..") == 0)) {
         return entry->Next(listing);
       }
       entry->set_link(new LinkList(current_link));
@@ -155,8 +172,8 @@
     }
   }
   if ((attributes & FILE_ATTRIBUTE_DIRECTORY) != 0) {
-    if (wcscmp(find_file_data.cFileName, L".") == 0 ||
-        wcscmp(find_file_data.cFileName, L"..") == 0) {
+    if ((wcscmp(find_file_data.cFileName, L".") == 0) ||
+        (wcscmp(find_file_data.cFileName, L"..") == 0)) {
       return entry->Next(listing);
     }
     return kListDirectory;
@@ -165,6 +182,7 @@
   }
 }
 
+
 ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
   if (done_) {
     return kListDone;
@@ -223,7 +241,7 @@
 
 
 void DirectoryListingEntry::ResetLink() {
-  if (link_ != NULL && (parent_ == NULL || parent_->link_ != link_)) {
+  if ((link_ != NULL) && ((parent_ == NULL) || (parent_->link_ != link_))) {
     delete link_;
     link_ = NULL;
   }
@@ -234,7 +252,9 @@
 
 
 static bool DeleteFile(wchar_t* file_name, PathBuffer* path) {
-  if (!path->AddW(file_name)) return false;
+  if (!path->AddW(file_name)) {
+    return false;
+  }
 
   if (DeleteFileW(path->AsStringW()) != 0) {
     return true;
@@ -265,8 +285,10 @@
 
 
 static bool DeleteDir(wchar_t* dir_name, PathBuffer* path) {
-  if (wcscmp(dir_name, L".") == 0) return true;
-  if (wcscmp(dir_name, L"..") == 0) return true;
+  if ((wcscmp(dir_name, L".") == 0) ||
+      (wcscmp(dir_name, L"..") == 0)) {
+    return true;
+  }
   return path->AddW(dir_name) && DeleteRecursively(path);
 }
 
@@ -284,7 +306,7 @@
 
 static bool DeleteRecursively(PathBuffer* path) {
   DWORD attributes = GetFileAttributesW(path->AsStringW());
-  if ((attributes == INVALID_FILE_ATTRIBUTES)) {
+  if (attributes == INVALID_FILE_ATTRIBUTES) {
     return false;
   }
   // If the directory is a junction, it's pointing to some other place in the
@@ -298,7 +320,9 @@
     return DeleteFile(L"", path);
   }
 
-  if (!path->AddW(L"\\*")) return false;
+  if (!path->AddW(L"\\*")) {
+    return false;
+  }
 
   WIN32_FIND_DATAW find_file_data;
   HANDLE find_handle = FindFirstFileW(path->AsStringW(), &find_file_data);
@@ -336,8 +360,8 @@
   DWORD attributes = GetFileAttributesW(dir_name);
   if (attributes == INVALID_FILE_ATTRIBUTES) {
     DWORD last_error = GetLastError();
-    if (last_error == ERROR_FILE_NOT_FOUND ||
-        last_error == ERROR_PATH_NOT_FOUND) {
+    if ((last_error == ERROR_FILE_NOT_FOUND) ||
+        (last_error == ERROR_PATH_NOT_FOUND)) {
       return Directory::DOES_NOT_EXIST;
     } else {
       // We might not be able to get the file attributes for other
@@ -354,27 +378,42 @@
 
 Directory::ExistsResult Directory::Exists(const char* dir_name) {
   const wchar_t* system_name = StringUtilsWin::Utf8ToWide(dir_name);
-  Directory::ExistsResult result = ExistsHelper(system_name);
-  free(const_cast<wchar_t*>(system_name));
+  return ExistsHelper(system_name);
+}
+
+
+char* Directory::CurrentNoScope() {
+  int length = GetCurrentDirectoryW(0, NULL);
+  if (length == 0) {
+    return NULL;
+  }
+  wchar_t* current = new wchar_t[length + 1];
+  GetCurrentDirectoryW(length + 1, current);
+  int utf8_len = WideCharToMultiByte(
+      CP_UTF8, 0, current, -1, NULL, 0, NULL, NULL);
+  char* result = reinterpret_cast<char*>(malloc(utf8_len));
+  WideCharToMultiByte(CP_UTF8, 0, current, -1, result, utf8_len, NULL, NULL);
+  delete[] current;
   return result;
 }
 
 
-char* Directory::Current() {
+const char* Directory::Current() {
   int length = GetCurrentDirectoryW(0, NULL);
-  if (length == 0) return NULL;
-  wchar_t* current = new wchar_t[length + 1];
+  if (length == 0) {
+    return NULL;
+  }
+  wchar_t* current;
+  current = reinterpret_cast<wchar_t*>(
+      Dart_ScopeAllocate((length + 1) * sizeof(*current)));
   GetCurrentDirectoryW(length + 1, current);
-  char* result = StringUtilsWin::WideToUtf8(current);
-  delete[] current;
-  return result;
+  return StringUtilsWin::WideToUtf8(current);
 }
 
 
 bool Directory::SetCurrent(const char* path) {
   const wchar_t* system_path = StringUtilsWin::Utf8ToWide(path);
   bool result = SetCurrentDirectoryW(system_path) != 0;
-  free(const_cast<wchar_t*>(system_path));
   return result;
 }
 
@@ -383,35 +422,34 @@
   const wchar_t* system_name = StringUtilsWin::Utf8ToWide(dir_name);
   int create_status = CreateDirectoryW(system_name, NULL);
   // If the directory already existed, treat it as a success.
-  if (create_status == 0 &&
-      GetLastError() == ERROR_ALREADY_EXISTS &&
-      ExistsHelper(system_name) == EXISTS) {
-    free(const_cast<wchar_t*>(system_name));
+  if ((create_status == 0) &&
+      (GetLastError() == ERROR_ALREADY_EXISTS) &&
+      (ExistsHelper(system_name) == EXISTS)) {
     return true;
   }
-  free(const_cast<wchar_t*>(system_name));
   return (create_status != 0);
 }
 
 
-char* Directory::SystemTemp() {
+const char* Directory::SystemTemp() {
   PathBuffer path;
   // Remove \ at end.
   path.Reset(GetTempPathW(MAX_LONG_PATH, path.AsStringW()) - 1);
-  return path.AsString();
+  return path.AsScopedString();
 }
 
 
-char* Directory::CreateTemp(const char* prefix) {
+const char* Directory::CreateTemp(const char* prefix) {
   // Returns a new, unused directory name, adding characters to the
   // end of prefix.
   // Creates this directory, with a default security
   // descriptor inherited from its parent directory.
-  // The return value must be freed by the caller.
+  // The return value is Dart_ScopeAllocated.
   PathBuffer path;
   const wchar_t* system_prefix = StringUtilsWin::Utf8ToWide(prefix);
-  path.AddW(system_prefix);
-  free(const_cast<wchar_t*>(system_prefix));
+  if (!path.AddW(system_prefix)) {
+    return NULL;
+  }
 
   // Length of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx is 36.
   if (path.length() > MAX_LONG_PATH - 36) {
@@ -420,7 +458,7 @@
 
   UUID uuid;
   RPC_STATUS status = UuidCreateSequential(&uuid);
-  if (status != RPC_S_OK && status != RPC_S_UUID_LOCAL_ONLY) {
+  if ((status != RPC_S_OK) && (status != RPC_S_UUID_LOCAL_ONLY)) {
     return NULL;
   }
   RPC_WSTR uuid_string;
@@ -430,13 +468,14 @@
   }
 
   // RPC_WSTR is an unsigned short*, so we cast to wchar_t*.
-  path.AddW(reinterpret_cast<wchar_t*>(uuid_string));
+  if (!path.AddW(reinterpret_cast<wchar_t*>(uuid_string))) {
+    return NULL;
+  }
   RpcStringFreeW(&uuid_string);
   if (!CreateDirectoryW(path.AsStringW(), NULL)) {
     return NULL;
   }
-  char* result = path.AsString();
-  return result;
+  return path.AsScopedString();
 }
 
 
@@ -455,7 +494,6 @@
       result = DeleteRecursively(&path);
     }
   }
-  free(const_cast<wchar_t*>(system_dir_name));
   return result;
 }
 
@@ -464,20 +502,22 @@
   const wchar_t* system_path = StringUtilsWin::Utf8ToWide(path);
   const wchar_t* system_new_path = StringUtilsWin::Utf8ToWide(new_path);
   ExistsResult exists = ExistsHelper(system_path);
-  if (exists != EXISTS) return false;
+  if (exists != EXISTS) {
+    return false;
+  }
   ExistsResult new_exists = ExistsHelper(system_new_path);
   // MoveFile does not allow replacing exising directories. Therefore,
   // if the new_path is currently a directory we need to delete it
   // first.
   if (new_exists == EXISTS) {
     bool success = Delete(new_path, true);
-    if (!success) return false;
+    if (!success) {
+      return false;
+    }
   }
   DWORD flags = MOVEFILE_WRITE_THROUGH;
   int move_status =
       MoveFileExW(system_path, system_new_path, flags);
-  free(const_cast<wchar_t*>(system_path));
-  free(const_cast<wchar_t*>(system_new_path));
   return (move_status != 0);
 }
 
diff --git a/runtime/bin/embedded_dart_io.h b/runtime/bin/embedded_dart_io.h
index 4d7dbae..a5b069d 100644
--- a/runtime/bin/embedded_dart_io.h
+++ b/runtime/bin/embedded_dart_io.h
@@ -23,7 +23,6 @@
 // Should Stderr events be captured?
 bool ShouldCaptureStderr();
 
-
 }  // namespace bin
 }  // namespace dart
 
diff --git a/runtime/bin/eventhandler.cc b/runtime/bin/eventhandler.cc
index bb9a7fe..8ce45b2 100644
--- a/runtime/bin/eventhandler.cc
+++ b/runtime/bin/eventhandler.cc
@@ -2,19 +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.
 
-#include "bin/dartutils.h"
+#if !defined(DART_IO_DISABLED)
+
 #include "bin/eventhandler.h"
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
 #include "bin/lockers.h"
 #include "bin/socket.h"
 #include "bin/thread.h"
 
 #include "include/dart_api.h"
 
-
 namespace dart {
 namespace bin {
 
-
 void TimeoutQueue::UpdateTimeout(Dart_Port port, int64_t timeout) {
   // Find port if present.
   Timeout* last = NULL;
@@ -47,8 +49,8 @@
   next_timeout_ = NULL;
   current = timeouts_;
   while (current != NULL) {
-    if (next_timeout_ == NULL ||
-        current->timeout() < next_timeout_->timeout()) {
+    if ((next_timeout_ == NULL) ||
+        (current->timeout() < next_timeout_->timeout())) {
       next_timeout_ = current;
     }
     current = current->next();
@@ -78,7 +80,9 @@
 
 
 void EventHandler::Stop() {
-  if (event_handler == NULL) return;
+  if (event_handler == NULL) {
+    return;
+  }
 
   // Wait until it has stopped.
   {
@@ -101,7 +105,9 @@
 
 
 EventHandlerImplementation* EventHandler::delegate() {
-  if (event_handler == NULL) return NULL;
+  if (event_handler == NULL) {
+    return NULL;
+  }
   return &event_handler->delegate_;
 }
 
@@ -140,3 +146,5 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/eventhandler.h b/runtime/bin/eventhandler.h
index c110d34..34f6c65 100644
--- a/runtime/bin/eventhandler.h
+++ b/runtime/bin/eventhandler.h
@@ -108,6 +108,8 @@
  private:
   Timeout* next_timeout_;
   Timeout* timeouts_;
+
+  DISALLOW_COPY_AND_ASSIGN(TimeoutQueue);
 };
 
 
@@ -221,6 +223,8 @@
   };
 
   Entry* head_;
+
+  DISALLOW_COPY_AND_ASSIGN(CircularLinkedList);
 };
 
 
@@ -268,6 +272,9 @@
 
  protected:
   intptr_t fd_;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoBase);
 };
 
 
@@ -281,7 +288,7 @@
   static const int kTokenCount = 16;
 
  public:
-  explicit DescriptorInfoSingleMixin(intptr_t fd, bool disable_tokens)
+  DescriptorInfoSingleMixin(intptr_t fd, bool disable_tokens)
       : DI(fd), port_(0), tokens_(kTokenCount), mask_(0),
         disable_tokens_(disable_tokens) {}
 
@@ -356,6 +363,8 @@
   int tokens_;
   intptr_t mask_;
   bool disable_tokens_;
+
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoSingleMixin);
 };
 
 
@@ -400,7 +409,7 @@
   };
 
  public:
-  explicit DescriptorInfoMultipleMixin(intptr_t fd, bool disable_tokens)
+  DescriptorInfoMultipleMixin(intptr_t fd, bool disable_tokens)
       : DI(fd), tokens_map_(&SamePortValue, kTokenCount),
         disable_tokens_(disable_tokens) {}
 
@@ -541,7 +550,7 @@
         pentry->token_count--;
       }
 
-      if (was_ready && pentry->token_count <= 0) {
+      if (was_ready && (pentry->token_count <= 0)) {
         active_readers_.Remove(pentry);
       }
     }
@@ -586,8 +595,9 @@
   HashMap tokens_map_;
 
   bool disable_tokens_;
-};
 
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoMultipleMixin);
+};
 
 }  // namespace bin
 }  // namespace dart
@@ -610,6 +620,7 @@
 
 class EventHandler {
  public:
+  EventHandler() {}
   void SendData(intptr_t id, Dart_Port dart_port, int64_t data) {
     delegate_.SendData(id, dart_port, data);
   }
@@ -635,6 +646,8 @@
  private:
   friend class EventHandlerImplementation;
   EventHandlerImplementation delegate_;
+
+  DISALLOW_COPY_AND_ASSIGN(EventHandler);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc
index 6fdabfb..1b7bbdb 100644
--- a/runtime/bin/eventhandler_android.cc
+++ b/runtime/bin/eventhandler_android.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_ANDROID)
 
@@ -9,13 +11,13 @@
 #include "bin/eventhandler_android.h"
 
 #include <errno.h>  // NOLINT
+#include <fcntl.h>  // NOLINT
 #include <pthread.h>  // NOLINT
 #include <stdio.h>  // NOLINT
 #include <string.h>  // NOLINT
 #include <sys/epoll.h>  // NOLINT
 #include <sys/stat.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#include <fcntl.h>  // NOLINT
 
 #include "bin/dartutils.h"
 #include "bin/fdutils.h"
@@ -27,17 +29,14 @@
 #include "platform/hashmap.h"
 #include "platform/utils.h"
 
-
 // Android doesn't define EPOLLRDHUP.
 #if !defined(EPOLLRDHUP)
 #define EPOLLRDHUP 0x2000
 #endif  // !defined(EPOLLRDHUP)
 
-
 namespace dart {
 namespace bin {
 
-
 intptr_t DescriptorInfo::GetPollEvents() {
   // Do not ask for EPOLLERR and EPOLLHUP explicitly as they are
   // triggered anyway.
@@ -129,11 +128,11 @@
 void EventHandlerImplementation::UpdateEpollInstance(intptr_t old_mask,
                                                      DescriptorInfo *di) {
   intptr_t new_mask = di->Mask();
-  if (old_mask != 0 && new_mask == 0) {
+  if ((old_mask != 0) && (new_mask == 0)) {
     RemoveFromEpollInstance(epoll_fd_, di);
-  } else if (old_mask == 0 && new_mask != 0) {
+  } else if ((old_mask == 0) && (new_mask != 0)) {
     AddToEpollInstance(epoll_fd_, di);
-  } else if (old_mask != 0 && new_mask != 0 && old_mask != new_mask) {
+  } else if ((old_mask != 0) && (new_mask != 0) && (old_mask != new_mask)) {
     ASSERT(!di->IsListeningSocket());
     RemoveFromEpollInstance(epoll_fd_, di);
     AddToEpollInstance(epoll_fd_, di);
@@ -264,15 +263,28 @@
   }
 }
 
+
 #ifdef DEBUG_POLL
 static void PrintEventMask(intptr_t fd, intptr_t events) {
   Log::Print("%d ", fd);
-  if ((events & EPOLLIN) != 0) Log::Print("EPOLLIN ");
-  if ((events & EPOLLPRI) != 0) Log::Print("EPOLLPRI ");
-  if ((events & EPOLLOUT) != 0) Log::Print("EPOLLOUT ");
-  if ((events & EPOLLERR) != 0) Log::Print("EPOLLERR ");
-  if ((events & EPOLLHUP) != 0) Log::Print("EPOLLHUP ");
-  if ((events & EPOLLRDHUP) != 0) Log::Print("EPOLLRDHUP ");
+  if ((events & EPOLLIN) != 0) {
+    Log::Print("EPOLLIN ");
+  }
+  if ((events & EPOLLPRI) != 0) {
+    Log::Print("EPOLLPRI ");
+  }
+  if ((events & EPOLLOUT) != 0) {
+    Log::Print("EPOLLOUT ");
+  }
+  if ((events & EPOLLERR) != 0) {
+    Log::Print("EPOLLERR ");
+  }
+  if ((events & EPOLLHUP) != 0) {
+    Log::Print("EPOLLHUP ");
+  }
+  if ((events & EPOLLRDHUP) != 0) {
+    Log::Print("EPOLLRDHUP ");
+  }
   int all_events = EPOLLIN | EPOLLPRI | EPOLLOUT |
       EPOLLERR | EPOLLHUP | EPOLLRDHUP;
   if ((events & ~all_events) != 0) {
@@ -284,19 +296,26 @@
 }
 #endif
 
+
 intptr_t EventHandlerImplementation::GetPollEvents(intptr_t events,
                                                    DescriptorInfo* di) {
 #ifdef DEBUG_POLL
   PrintEventMask(di->fd(), events);
 #endif
-  if (events & EPOLLERR) {
+  if ((events & EPOLLERR) != 0) {
     // Return error only if EPOLLIN is present.
-    return (events & EPOLLIN) ? (1 << kErrorEvent) : 0;
+    return ((events & EPOLLIN) != 0) ? (1 << kErrorEvent) : 0;
   }
   intptr_t event_mask = 0;
-  if (events & EPOLLIN) event_mask |= (1 << kInEvent);
-  if (events & EPOLLOUT) event_mask |= (1 << kOutEvent);
-  if (events & (EPOLLHUP | EPOLLRDHUP)) event_mask |= (1 << kCloseEvent);
+  if ((events & EPOLLIN) != 0) {
+    event_mask |= (1 << kInEvent);
+  }
+  if ((events & EPOLLOUT) != 0) {
+    event_mask |= (1 << kOutEvent);
+  }
+  if ((events & (EPOLLHUP | EPOLLRDHUP)) != 0) {
+    event_mask |= (1 << kCloseEvent);
+  }
   return event_mask;
 }
 
@@ -360,8 +379,10 @@
 
   while (!handler_impl->shutdown_) {
     int64_t millis = handler_impl->GetTimeout();
-    ASSERT(millis == kInfinityTimeout || millis >= 0);
-    if (millis > kMaxInt32) millis = kMaxInt32;
+    ASSERT((millis == kInfinityTimeout) || (millis >= 0));
+    if (millis > kMaxInt32) {
+      millis = kMaxInt32;
+    }
     intptr_t result = TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(
         epoll_wait(handler_impl->epoll_fd_, events, kMaxEvents, millis));
     ASSERT(EAGAIN == EWOULDBLOCK);
@@ -414,3 +435,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_ANDROID)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/eventhandler_android.h b/runtime/bin/eventhandler_android.h
index ee10016..8841861 100644
--- a/runtime/bin/eventhandler_android.h
+++ b/runtime/bin/eventhandler_android.h
@@ -18,7 +18,6 @@
 #include "platform/hashmap.h"
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -34,6 +33,9 @@
     VOID_TEMP_FAILURE_RETRY(close(fd_));
     fd_ = -1;
   }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfo);
 };
 
 
@@ -43,6 +45,9 @@
   explicit DescriptorInfoSingle(intptr_t fd)
       : DescriptorInfoSingleMixin(fd, false) {}
   virtual ~DescriptorInfoSingle() {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoSingle);
 };
 
 
@@ -52,6 +57,9 @@
   explicit DescriptorInfoMultiple(intptr_t fd)
       : DescriptorInfoMultipleMixin(fd, false) {}
   virtual ~DescriptorInfoMultiple() {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoMultiple);
 };
 
 
@@ -86,6 +94,8 @@
   bool shutdown_;
   int interrupt_fds_[2];
   int epoll_fd_;
+
+  DISALLOW_COPY_AND_ASSIGN(EventHandlerImplementation);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 4c605ce..59cbdcd 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_LINUX)
 
@@ -9,6 +11,7 @@
 #include "bin/eventhandler_linux.h"
 
 #include <errno.h>  // NOLINT
+#include <fcntl.h>  // NOLINT
 #include <pthread.h>  // NOLINT
 #include <stdio.h>  // NOLINT
 #include <string.h>  // NOLINT
@@ -16,7 +19,6 @@
 #include <sys/stat.h>  // NOLINT
 #include <sys/timerfd.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#include <fcntl.h>  // NOLINT
 
 #include "bin/dartutils.h"
 #include "bin/fdutils.h"
@@ -26,11 +28,9 @@
 #include "bin/thread.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
-
 intptr_t DescriptorInfo::GetPollEvents() {
   // Do not ask for EPOLLERR and EPOLLHUP explicitly as they are
   // triggered anyway.
@@ -138,11 +138,11 @@
 void EventHandlerImplementation::UpdateEpollInstance(intptr_t old_mask,
                                                      DescriptorInfo *di) {
   intptr_t new_mask = di->Mask();
-  if (old_mask != 0 && new_mask == 0) {
+  if ((old_mask != 0) && (new_mask == 0)) {
     RemoveFromEpollInstance(epoll_fd_, di);
-  } else if (old_mask == 0 && new_mask != 0) {
+  } else if ((old_mask == 0) && (new_mask != 0)) {
     AddToEpollInstance(epoll_fd_, di);
-  } else if (old_mask != 0 && new_mask != 0 && old_mask != new_mask) {
+  } else if ((old_mask != 0) && (new_mask != 0) && (old_mask != new_mask)) {
     ASSERT(!di->IsListeningSocket());
     RemoveFromEpollInstance(epoll_fd_, di);
     AddToEpollInstance(epoll_fd_, di);
@@ -156,8 +156,7 @@
   HashMap::Entry* entry = socket_map_.Lookup(
       GetHashmapKeyFromFd(fd), GetHashmapHashFromFd(fd), true);
   ASSERT(entry != NULL);
-  DescriptorInfo* di =
-      reinterpret_cast<DescriptorInfo*>(entry->value);
+  DescriptorInfo* di = reinterpret_cast<DescriptorInfo*>(entry->value);
   if (di == NULL) {
     // If there is no data in the hash map for this file descriptor a
     // new DescriptorInfo for the file descriptor is inserted.
@@ -282,15 +281,28 @@
   }
 }
 
+
 #ifdef DEBUG_POLL
 static void PrintEventMask(intptr_t fd, intptr_t events) {
   Log::Print("%d ", fd);
-  if ((events & EPOLLIN) != 0) Log::Print("EPOLLIN ");
-  if ((events & EPOLLPRI) != 0) Log::Print("EPOLLPRI ");
-  if ((events & EPOLLOUT) != 0) Log::Print("EPOLLOUT ");
-  if ((events & EPOLLERR) != 0) Log::Print("EPOLLERR ");
-  if ((events & EPOLLHUP) != 0) Log::Print("EPOLLHUP ");
-  if ((events & EPOLLRDHUP) != 0) Log::Print("EPOLLRDHUP ");
+  if ((events & EPOLLIN) != 0) {
+    Log::Print("EPOLLIN ");
+  }
+  if ((events & EPOLLPRI) != 0) {
+    Log::Print("EPOLLPRI ");
+  }
+  if ((events & EPOLLOUT) != 0) {
+    Log::Print("EPOLLOUT ");
+  }
+  if ((events & EPOLLERR) != 0) {
+    Log::Print("EPOLLERR ");
+  }
+  if ((events & EPOLLHUP) != 0) {
+    Log::Print("EPOLLHUP ");
+  }
+  if ((events & EPOLLRDHUP) != 0) {
+    Log::Print("EPOLLRDHUP ");
+  }
   int all_events = EPOLLIN | EPOLLPRI | EPOLLOUT |
       EPOLLERR | EPOLLHUP | EPOLLRDHUP;
   if ((events & ~all_events) != 0) {
@@ -302,19 +314,26 @@
 }
 #endif
 
+
 intptr_t EventHandlerImplementation::GetPollEvents(intptr_t events,
                                                    DescriptorInfo* di) {
 #ifdef DEBUG_POLL
   PrintEventMask(di->fd(), events);
 #endif
-  if (events & EPOLLERR) {
+  if ((events & EPOLLERR) != 0) {
     // Return error only if EPOLLIN is present.
-    return (events & EPOLLIN) ? (1 << kErrorEvent) : 0;
+    return ((events & EPOLLIN) != 0) ? (1 << kErrorEvent) : 0;
   }
   intptr_t event_mask = 0;
-  if (events & EPOLLIN) event_mask |= (1 << kInEvent);
-  if (events & EPOLLOUT) event_mask |= (1 << kOutEvent);
-  if (events & (EPOLLHUP | EPOLLRDHUP)) event_mask |= (1 << kCloseEvent);
+  if ((events & EPOLLIN) != 0) {
+    event_mask |= (1 << kInEvent);
+  }
+  if ((events & EPOLLOUT) != 0) {
+    event_mask |= (1 << kOutEvent);
+  }
+  if ((events & (EPOLLHUP | EPOLLRDHUP)) != 0) {
+    event_mask |= (1 << kCloseEvent);
+  }
   return event_mask;
 }
 
@@ -420,3 +439,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_LINUX)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/eventhandler_linux.h b/runtime/bin/eventhandler_linux.h
index 099bef5..dd87c22 100644
--- a/runtime/bin/eventhandler_linux.h
+++ b/runtime/bin/eventhandler_linux.h
@@ -33,6 +33,9 @@
     VOID_TEMP_FAILURE_RETRY(close(fd_));
     fd_ = -1;
   }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfo);
 };
 
 
@@ -42,6 +45,9 @@
   explicit DescriptorInfoSingle(intptr_t fd)
       : DescriptorInfoSingleMixin(fd, false) {}
   virtual ~DescriptorInfoSingle() {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoSingle);
 };
 
 
@@ -51,6 +57,9 @@
   explicit DescriptorInfoMultiple(intptr_t fd)
       : DescriptorInfoMultipleMixin(fd, false) {}
   virtual ~DescriptorInfoMultiple() {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoMultiple);
 };
 
 
@@ -84,6 +93,8 @@
   int interrupt_fds_[2];
   int epoll_fd_;
   int timer_fd_;
+
+  DISALLOW_COPY_AND_ASSIGN(EventHandlerImplementation);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
index faf471b..c2b7833 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_MACOS)
 
@@ -9,12 +11,12 @@
 #include "bin/eventhandler_macos.h"
 
 #include <errno.h>  // NOLINT
+#include <fcntl.h>  // NOLINT
 #include <pthread.h>  // NOLINT
 #include <stdio.h>  // NOLINT
 #include <string.h>  // NOLINT
 #include <sys/event.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#include <fcntl.h>  // NOLINT
 
 #include "bin/dartutils.h"
 #include "bin/fdutils.h"
@@ -26,11 +28,9 @@
 #include "platform/hashmap.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
-
 bool DescriptorInfo::HasReadEvent() {
   return (Mask() & (1 << kInEvent)) != 0;
 }
@@ -43,7 +43,9 @@
 
 // Unregister the file descriptor for a SocketData structure with kqueue.
 static void RemoveFromKqueue(intptr_t kqueue_fd_, DescriptorInfo* di) {
-  if (!di->tracked_by_kqueue()) return;
+  if (!di->tracked_by_kqueue()) {
+    return;
+  }
   static const intptr_t kMaxChanges = 2;
   struct kevent events[kMaxChanges];
   EV_SET(events, di->fd(), EVFILT_READ, EV_DELETE, 0, 0, NULL);
@@ -150,9 +152,9 @@
   intptr_t new_mask = di->Mask();
   if (old_mask != 0 && new_mask == 0) {
     RemoveFromKqueue(kqueue_fd_, di);
-  } else if (old_mask == 0 && new_mask != 0) {
+  } else if ((old_mask == 0) && (new_mask != 0)) {
     AddToKqueue(kqueue_fd_, di);
-  } else if (old_mask != 0 && new_mask != 0 && old_mask != new_mask) {
+  } else if ((old_mask != 0) && (new_mask != 0) && (old_mask != new_mask)) {
     ASSERT(!di->IsListeningSocket());
     RemoveFromKqueue(kqueue_fd_, di);
     AddToKqueue(kqueue_fd_, di);
@@ -281,22 +283,39 @@
   }
 }
 
+
 #ifdef DEBUG_KQUEUE
 static void PrintEventMask(intptr_t fd, struct kevent* event) {
   Log::Print("%d ", static_cast<int>(fd));
+
   Log::Print("filter=0x%x:", event->filter);
-  if (event->filter == EVFILT_READ) Log::Print("EVFILT_READ ");
-  if (event->filter == EVFILT_WRITE) Log::Print("EVFILT_WRITE ");
+  if (event->filter == EVFILT_READ) {
+    Log::Print("EVFILT_READ ");
+  }
+  if (event->filter == EVFILT_WRITE) {
+    Log::Print("EVFILT_WRITE ");
+  }
+
   Log::Print("flags: %x: ", event->flags);
-  if ((event->flags & EV_EOF) != 0) Log::Print("EV_EOF ");
-  if ((event->flags & EV_ERROR) != 0) Log::Print("EV_ERROR ");
-  if ((event->flags & EV_CLEAR) != 0) Log::Print("EV_CLEAR ");
-  if ((event->flags & EV_ADD) != 0) Log::Print("EV_ADD ");
-  if ((event->flags & EV_DELETE) != 0) Log::Print("EV_DELETE ");
+  if ((event->flags & EV_EOF) != 0) {
+    Log::Print("EV_EOF ");
+  }
+  if ((event->flags & EV_ERROR) != 0) {
+    Log::Print("EV_ERROR ");
+  }
+  if ((event->flags & EV_CLEAR) != 0) {
+    Log::Print("EV_CLEAR ");
+  }
+  if ((event->flags & EV_ADD) != 0) {
+    Log::Print("EV_ADD ");
+  }
+  if ((event->flags & EV_DELETE) != 0) {
+    Log::Print("EV_DELETE ");
+  }
+
   Log::Print("- fflags: %d ", event->fflags);
   Log::Print("- data: %ld ", event->data);
-  Log::Print("(available %d) ",
-      static_cast<int>(FDUtils::AvailableBytes(fd)));
+  Log::Print("(available %d) ", static_cast<int>(FDUtils::AvailableBytes(fd)));
   Log::Print("\n");
 }
 #endif
@@ -319,7 +338,9 @@
           event_mask |= (1 << kCloseEvent);
         }
       }
-      if (event_mask == 0) event_mask |= (1 << kInEvent);
+      if (event_mask == 0) {
+        event_mask |= (1 << kInEvent);
+      }
     } else {
       UNREACHABLE();
     }
@@ -421,7 +442,9 @@
   while (!handler_impl->shutdown_) {
     int64_t millis = handler_impl->GetTimeout();
     ASSERT(millis == kInfinityTimeout || millis >= 0);
-    if (millis > kMaxInt32) millis = kMaxInt32;
+    if (millis > kMaxInt32) {
+      millis = kMaxInt32;
+    }
     // NULL pointer timespec for infinite timeout.
     ASSERT(kInfinityTimeout < 0);
     struct timespec* timeout = NULL;
@@ -488,3 +511,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_MACOS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/eventhandler_macos.h b/runtime/bin/eventhandler_macos.h
index 48b0b96..b846594 100644
--- a/runtime/bin/eventhandler_macos.h
+++ b/runtime/bin/eventhandler_macos.h
@@ -47,6 +47,9 @@
 
  protected:
   bool tracked_by_kqueue_;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfo);
 };
 
 
@@ -56,6 +59,9 @@
   explicit DescriptorInfoSingle(intptr_t fd)
       : DescriptorInfoSingleMixin(fd, false) {}
   virtual ~DescriptorInfoSingle() {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoSingle);
 };
 
 
@@ -65,6 +71,9 @@
   explicit DescriptorInfoMultiple(intptr_t fd)
       : DescriptorInfoMultipleMixin(fd, false) {}
   virtual ~DescriptorInfoMultiple() {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DescriptorInfoMultiple);
 };
 
 
@@ -99,6 +108,8 @@
   bool shutdown_;
   int interrupt_fds_[2];
   int kqueue_fd_;
+
+  DISALLOW_COPY_AND_ASSIGN(EventHandlerImplementation);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/eventhandler_unsupported.cc b/runtime/bin/eventhandler_unsupported.cc
new file mode 100644
index 0000000..c79ad24
--- /dev/null
+++ b/runtime/bin/eventhandler_unsupported.cc
@@ -0,0 +1,39 @@
+// 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.
+
+#if defined(DART_IO_DISABLED)
+
+#include "bin/eventhandler.h"
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+
+namespace dart {
+namespace bin {
+
+void EventHandler::Start() {
+}
+
+
+void EventHandler::Stop() {
+}
+
+
+void FUNCTION_NAME(EventHandler_SendData)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "EventHandler is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(EventHandler_TimerMillisecondClock)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "EventHandler is not supported on this platform"));
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // defined(DART_IO_DISABLED)
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index 8e0adc5..dfd4985 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -2,17 +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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_WINDOWS)
 
 #include "bin/eventhandler.h"
 #include "bin/eventhandler_win.h"
 
+#include <fcntl.h>  // NOLINT
+#include <io.h>  // NOLINT
+#include <mswsock.h>  // NOLINT
 #include <winsock2.h>  // NOLINT
 #include <ws2tcpip.h>  // NOLINT
-#include <mswsock.h>  // NOLINT
-#include <io.h>  // NOLINT
-#include <fcntl.h>  // NOLINT
 
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
@@ -140,10 +142,7 @@
                                             completion_port,
                                             reinterpret_cast<ULONG_PTR>(this),
                                             0);
-  if (completion_port_ == NULL) {
-    return false;
-  }
-  return true;
+  return (completion_port_ != NULL);
 }
 
 
@@ -307,7 +306,7 @@
                        buffer->GetBufferSize(),
                        NULL,
                        buffer->GetCleanOverlapped());
-    if (ok || GetLastError() == ERROR_IO_PENDING) {
+    if (ok || (GetLastError() == ERROR_IO_PENDING)) {
       // Completing asynchronously.
       pending_read_ = buffer;
       return true;
@@ -347,7 +346,7 @@
                       buffer->GetBufferSize(),
                       NULL,
                       buffer->GetCleanOverlapped());
-  if (ok || GetLastError() == ERROR_IO_PENDING) {
+  if (ok || (GetLastError() == ERROR_IO_PENDING)) {
     // Completing asynchronously.
     pending_write_ = buffer;
     return true;
@@ -394,7 +393,7 @@
 void FileHandle::EnsureInitialized(EventHandlerImplementation* event_handler) {
   MonitorLocker ml(monitor_);
   event_handler_ = event_handler;
-  if (SupportsOverlappedIO() && completion_port_ == INVALID_HANDLE_VALUE) {
+  if (SupportsOverlappedIO() && (completion_port_ == INVALID_HANDLE_VALUE)) {
     CreateCompletionPort(event_handler_->completion_port());
   }
 }
@@ -416,14 +415,16 @@
 
 
 bool DirectoryWatchHandle::IsClosed() {
-  return IsClosing() && pending_read_ == NULL;
+  return IsClosing() && (pending_read_ == NULL);
 }
 
 
 bool DirectoryWatchHandle::IssueRead() {
   // It may have been started before, as we start the directory-handler when
   // we create it.
-  if (pending_read_ != NULL || data_ready_ != NULL) return true;
+  if ((pending_read_ != NULL) || (data_ready_ != NULL)) {
+    return true;
+  }
   OverlappedBuffer* buffer = OverlappedBuffer::AllocateReadBuffer(kBufferSize);
   ASSERT(completion_port_ != INVALID_HANDLE_VALUE);
   BOOL ok = ReadDirectoryChangesW(handle_,
@@ -434,7 +435,7 @@
                                   NULL,
                                   buffer->GetCleanOverlapped(),
                                   NULL);
-  if (ok || GetLastError() == ERROR_IO_PENDING) {
+  if (ok || (GetLastError() == ERROR_IO_PENDING)) {
     // Completing asynchronously.
     pending_read_ = buffer;
     return true;
@@ -481,10 +482,7 @@
                         &bytes,
                         NULL,
                         NULL);
-  if (status == SOCKET_ERROR) {
-    return false;
-  }
-  return true;
+  return (status != SOCKET_ERROR);
 }
 
 
@@ -603,7 +601,9 @@
   if (accepted_head_ != NULL) {
     result = accepted_head_;
     accepted_head_ = accepted_head_->next();
-    if (accepted_head_ == NULL) accepted_tail_ = NULL;
+    if (accepted_head_ == NULL) {
+      accepted_tail_ = NULL;
+    }
     result->set_next(NULL);
     accepted_count_--;
   }
@@ -641,7 +641,9 @@
 
 intptr_t Handle::Available() {
   MonitorLocker ml(monitor_);
-  if (data_ready_ == NULL) return 0;
+  if (data_ready_ == NULL) {
+    return 0;
+  }
   ASSERT(!data_ready_->IsEmpty());
   return data_ready_->GetRemainingLength();
 }
@@ -649,13 +651,17 @@
 
 intptr_t Handle::Read(void* buffer, intptr_t num_bytes) {
   MonitorLocker ml(monitor_);
-  if (data_ready_ == NULL) return 0;
+  if (data_ready_ == NULL) {
+    return 0;
+  }
   num_bytes = data_ready_->Read(
       buffer, Utils::Minimum<intptr_t>(num_bytes, INT_MAX));
   if (data_ready_->IsEmpty()) {
     OverlappedBuffer::DisposeBuffer(data_ready_);
     data_ready_ = NULL;
-    if (!IsClosing() && !IsClosedRead()) IssueRead();
+    if (!IsClosing() && !IsClosedRead()) {
+      IssueRead();
+    }
   }
   return num_bytes;
 }
@@ -664,7 +670,9 @@
 intptr_t Handle::RecvFrom(
     void* buffer, intptr_t num_bytes, struct sockaddr* sa, socklen_t sa_len) {
   MonitorLocker ml(monitor_);
-  if (data_ready_ == NULL) return 0;
+  if (data_ready_ == NULL) {
+    return 0;
+  }
   num_bytes = data_ready_->Read(
       buffer, Utils::Minimum<intptr_t>(num_bytes, INT_MAX));
   if (data_ready_->from()->sa_family == AF_INET) {
@@ -679,21 +687,31 @@
   // entirety to match how recvfrom works in a socket.
   OverlappedBuffer::DisposeBuffer(data_ready_);
   data_ready_ = NULL;
-  if (!IsClosing() && !IsClosedRead()) IssueRecvFrom();
+  if (!IsClosing() && !IsClosedRead()) {
+    IssueRecvFrom();
+  }
   return num_bytes;
 }
 
 
 intptr_t Handle::Write(const void* buffer, intptr_t num_bytes) {
   MonitorLocker ml(monitor_);
-  if (pending_write_ != NULL) return 0;
-  if (num_bytes > kBufferSize) num_bytes = kBufferSize;
+  if (pending_write_ != NULL) {
+    return 0;
+  }
+  if (num_bytes > kBufferSize) {
+    num_bytes = kBufferSize;
+  }
   ASSERT(SupportsOverlappedIO());
-  if (completion_port_ == INVALID_HANDLE_VALUE) return 0;
+  if (completion_port_ == INVALID_HANDLE_VALUE) {
+    return 0;
+  }
   int truncated_bytes = Utils::Minimum<intptr_t>(num_bytes, INT_MAX);
   pending_write_ = OverlappedBuffer::AllocateWriteBuffer(truncated_bytes);
   pending_write_->Write(buffer, truncated_bytes);
-  if (!IssueWrite()) return -1;
+  if (!IssueWrite()) {
+    return -1;
+  }
   return truncated_bytes;
 }
 
@@ -703,13 +721,21 @@
                         struct sockaddr* sa,
                         socklen_t sa_len) {
   MonitorLocker ml(monitor_);
-  if (pending_write_ != NULL) return 0;
-  if (num_bytes > kBufferSize) num_bytes = kBufferSize;
+  if (pending_write_ != NULL) {
+    return 0;
+  }
+  if (num_bytes > kBufferSize) {
+    num_bytes = kBufferSize;
+  }
   ASSERT(SupportsOverlappedIO());
-  if (completion_port_ == INVALID_HANDLE_VALUE) return 0;
+  if (completion_port_ == INVALID_HANDLE_VALUE) {
+    return 0;
+  }
   pending_write_ = OverlappedBuffer::AllocateSendToBuffer(num_bytes);
   pending_write_->Write(buffer, num_bytes);
-  if (!IssueSendTo(sa, sa_len)) return -1;
+  if (!IssueSendTo(sa, sa_len)) {
+    return -1;
+  }
   return num_bytes;
 }
 
@@ -765,15 +791,21 @@
 
 intptr_t StdHandle::Write(const void* buffer, intptr_t num_bytes) {
   MonitorLocker ml(monitor_);
-  if (pending_write_ != NULL) return 0;
-  if (num_bytes > kBufferSize) num_bytes = kBufferSize;
+  if (pending_write_ != NULL) {
+    return 0;
+  }
+  if (num_bytes > kBufferSize) {
+    num_bytes = kBufferSize;
+  }
   // In the case of stdout and stderr, OverlappedIO is not supported.
   // Here we'll instead use a thread, to make it async.
   // This code is actually never exposed to the user, as stdout and stderr is
   // not available as a RawSocket, but only wrapped in a Socket.
   // Note that we return '0', unless a thread have already completed a write.
   if (thread_wrote_ > 0) {
-    if (num_bytes > thread_wrote_) num_bytes = thread_wrote_;
+    if (num_bytes > thread_wrote_) {
+      num_bytes = thread_wrote_;
+    }
     thread_wrote_ -= num_bytes;
     return num_bytes;
   }
@@ -826,17 +858,18 @@
                         &bytes,
                         NULL,
                         NULL);
-  if (status == SOCKET_ERROR) {
-    return false;
-  }
-  return true;
+  return (status != SOCKET_ERROR);
 }
 
 
 void ClientSocket::Shutdown(int how) {
   int rc = shutdown(socket(), how);
-  if (how == SD_RECEIVE) MarkClosedRead();
-  if (how == SD_SEND) MarkClosedWrite();
+  if (how == SD_RECEIVE) {
+    MarkClosedRead();
+  }
+  if (how == SD_SEND) {
+    MarkClosedWrite();
+  }
   if (how == SD_BOTH) {
     MarkClosedRead();
     MarkClosedWrite();
@@ -870,7 +903,7 @@
                    &flags,
                    buffer->GetCleanOverlapped(),
                    NULL);
-  if (rc == NO_ERROR || WSAGetLastError() == WSA_IO_PENDING) {
+  if ((rc == NO_ERROR) || (WSAGetLastError() == WSA_IO_PENDING)) {
     pending_read_ = buffer;
     return true;
   }
@@ -894,7 +927,7 @@
                    0,
                    pending_write_->GetCleanOverlapped(),
                    NULL);
-  if (rc == NO_ERROR || WSAGetLastError() == WSA_IO_PENDING) {
+  if ((rc == NO_ERROR) || (WSAGetLastError() == WSA_IO_PENDING)) {
     return true;
   }
   OverlappedBuffer::DisposeBuffer(pending_write_);
@@ -910,7 +943,7 @@
     socket(), buffer->GetCleanOverlapped(), TF_REUSE_SOCKET, 0);
   // DisconnectEx works like other OverlappedIO APIs, where we can get either an
   // immediate success or delayed operation by WSA_IO_PENDING being set.
-  if (ok || WSAGetLastError() != WSA_IO_PENDING) {
+  if (ok || (WSAGetLastError() != WSA_IO_PENDING)) {
     DisconnectComplete(buffer);
   }
   NotifyAllDartPorts(1 << kDestroyedEvent);
@@ -975,7 +1008,7 @@
                      sa_len,
                      pending_write_->GetCleanOverlapped(),
                      NULL);
-  if (rc == NO_ERROR || WSAGetLastError() == WSA_IO_PENDING) {
+  if ((rc == NO_ERROR) || (WSAGetLastError() == WSA_IO_PENDING)) {
     return true;
   }
   OverlappedBuffer::DisposeBuffer(pending_write_);
@@ -1004,7 +1037,7 @@
                        buffer->from_len_addr(),
                        buffer->GetCleanOverlapped(),
                        NULL);
-  if (rc == NO_ERROR || WSAGetLastError() == WSA_IO_PENDING) {
+  if ((rc == NO_ERROR) || (WSAGetLastError() == WSA_IO_PENDING)) {
     pending_read_ = buffer;
     return true;
   }
@@ -1174,8 +1207,8 @@
   if (!listen_socket->IsClosing() && listen_socket->CanAccept()) {
     intptr_t event_mask = 1 << kInEvent;
     for (int i = 0;
-         i < listen_socket->accepted_count() &&
-         listen_socket->Mask() == event_mask;
+         (i < listen_socket->accepted_count()) &&
+         (listen_socket->Mask() == event_mask);
          i++) {
       Dart_Port port = listen_socket->NextNotifyDartPort(event_mask);
       DartUtils::PostInt32(port, event_mask);
@@ -1280,7 +1313,9 @@
 
 
 void EventHandlerImplementation::HandleTimeout() {
-  if (!timeout_queue_.HasTimeout()) return;
+  if (!timeout_queue_.HasTimeout()) {
+    return;
+  }
   DartUtils::PostNull(timeout_queue_.CurrentPort());
   timeout_queue_.RemoveCurrent();
 }
@@ -1389,7 +1424,9 @@
     OVERLAPPED* overlapped;
     int64_t millis = handler_impl->GetTimeout();
     ASSERT(millis == kInfinityTimeout || millis >= 0);
-    if (millis > kMaxInt32) millis = kMaxInt32;
+    if (millis > kMaxInt32) {
+      millis = kMaxInt32;
+    }
     ASSERT(sizeof(int32_t) == sizeof(DWORD));
     BOOL ok = GetQueuedCompletionStatus(handler_impl->completion_port(),
                                         &bytes,
@@ -1397,7 +1434,7 @@
                                         &overlapped,
                                         static_cast<DWORD>(millis));
 
-    if (!ok && overlapped == NULL) {
+    if (!ok && (overlapped == NULL)) {
       if (GetLastError() == ERROR_ABANDONED_WAIT_0) {
         // The completion port should never be closed.
         Log::Print("Completion port closed\n");
@@ -1413,10 +1450,10 @@
       // ERROR_NETNAME_DELETED occurs when the client closes
       // the socket it is reading from.
       DWORD last_error = GetLastError();
-      if (last_error == ERROR_CONNECTION_ABORTED ||
-          last_error == ERROR_OPERATION_ABORTED ||
-          last_error == ERROR_NETNAME_DELETED ||
-          last_error == ERROR_BROKEN_PIPE) {
+      if ((last_error == ERROR_CONNECTION_ABORTED) ||
+          (last_error == ERROR_OPERATION_ABORTED) ||
+          (last_error == ERROR_NETNAME_DELETED) ||
+          (last_error == ERROR_BROKEN_PIPE)) {
         ASSERT(bytes == 0);
         handler_impl->HandleIOCompletion(bytes, key, overlapped);
       } else if (last_error == ERROR_MORE_DATA) {
@@ -1470,3 +1507,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_WINDOWS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/eventhandler_win.h b/runtime/bin/eventhandler_win.h
index 38509dd..edb5c48 100644
--- a/runtime/bin/eventhandler_win.h
+++ b/runtime/bin/eventhandler_win.h
@@ -9,14 +9,13 @@
 #error Do not include eventhandler_win.h directly; use eventhandler.h instead.
 #endif
 
+#include <mswsock.h>
 #include <winsock2.h>
 #include <ws2tcpip.h>
-#include <mswsock.h>
 
 #include "bin/builtin.h"
 #include "bin/thread.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -28,7 +27,6 @@
 class ClientSocket;
 class ListenSocket;
 
-
 // An OverlappedBuffer encapsulates the OVERLAPPED structure and the
 // associated data buffer. For accept it also contains the pre-created
 // socket for the client.
@@ -149,6 +147,8 @@
   // object as the object is allocated larger than it's definition
   // indicate to extend this array.
   uint8_t buffer_data_[1];
+
+  DISALLOW_COPY_AND_ASSIGN(OverlappedBuffer);
 };
 
 
@@ -273,6 +273,8 @@
   void NotifyReadThreadFinished();
 
   int flags_;
+
+  DISALLOW_COPY_AND_ASSIGN(Handle);
 };
 
 
@@ -285,6 +287,9 @@
 
   virtual void EnsureInitialized(EventHandlerImplementation* event_handler);
   virtual bool IsClosed();
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(FileHandle);
 };
 
 
@@ -310,6 +315,8 @@
   intptr_t thread_wrote_;
   bool write_thread_exists_;
   bool write_thread_running_;
+
+  DISALLOW_COPY_AND_ASSIGN(StdHandle);
 };
 
 
@@ -332,6 +339,8 @@
  private:
   int events_;
   bool recursive_;
+
+  DISALLOW_COPY_AND_ASSIGN(DirectoryWatchHandle);
 };
 
 
@@ -348,6 +357,8 @@
 
  private:
   const SOCKET socket_;
+
+  DISALLOW_COPY_AND_ASSIGN(SocketHandle);
 };
 
 
@@ -403,6 +414,8 @@
   // The number of accepted connections which are waiting to be removed from
   // this queue and processed by dart isolates.
   int accepted_count_;
+
+  DISALLOW_COPY_AND_ASSIGN(ListenSocket);
 };
 
 
@@ -460,6 +473,8 @@
   ClientSocket* next_;
   bool connected_;
   bool closed_;
+
+  DISALLOW_COPY_AND_ASSIGN(ClientSocket);
 };
 
 
@@ -482,8 +497,12 @@
   virtual void EnsureInitialized(EventHandlerImplementation* event_handler);
   virtual void DoClose();
   virtual bool IsClosed();
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(DatagramSocket);
 };
 
+
 // Event handler.
 class EventHandlerImplementation {
  public:
@@ -523,6 +542,8 @@
   TimeoutQueue timeout_queue_;  // Time for next timeout.
   bool shutdown_;
   HANDLE completion_port_;
+
+  DISALLOW_COPY_AND_ASSIGN(EventHandlerImplementation);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/extensions.cc b/runtime/bin/extensions.cc
index eaed7bb..7fa06fd 100644
--- a/runtime/bin/extensions.cc
+++ b/runtime/bin/extensions.cc
@@ -6,12 +6,11 @@
 
 #include <stdio.h>
 
+#include "bin/dartutils.h"
+#include "bin/file.h"
 #include "include/dart_api.h"
 #include "platform/assert.h"
 #include "platform/globals.h"
-#include "bin/dartutils.h"
-#include "bin/file.h"
-
 
 namespace dart {
 namespace bin {
@@ -25,17 +24,15 @@
     return Dart_NewApiError("Cannot load native extensions over http:");
   }
   const char* library_strings[] = { extension_directory, extension_file, NULL };
-  char* library_file = Concatenate(library_strings);
+  const char* library_file = Concatenate(library_strings);
   void* library_handle = LoadExtensionLibrary(library_file);
-  free(library_file);
   if (library_handle == NULL) {
     return GetError();
   }
 
   const char* strings[] = { extension_name, "_Init", NULL };
-  char* init_function_name = Concatenate(strings);
+  const char* init_function_name = Concatenate(strings);
   void* init_function = ResolveSymbol(library_handle, init_function_name);
-  free(init_function_name);
   Dart_Handle result = GetError();
   if (Dart_IsError(result)) {
     return result;
@@ -48,13 +45,13 @@
 
 
 // Concatenates a NULL terminated array of strings.
-// The returned string must be freed.
-char* Extensions::Concatenate(const char** strings) {
+// The returned string is scope allocated.
+const char* Extensions::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*>(malloc(size));
+  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]);
diff --git a/runtime/bin/extensions.h b/runtime/bin/extensions.h
index 8c172b8..da18615 100644
--- a/runtime/bin/extensions.h
+++ b/runtime/bin/extensions.h
@@ -8,7 +8,6 @@
 #include "include/dart_api.h"
 #include "platform/globals.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -28,8 +27,8 @@
  private:
   static Dart_Handle GetError();
 
-  // The returned string must be freed.
-  static char* Concatenate(const char** strings);
+  // The returned string is scope allocated.
+  static const char* Concatenate(const char** strings);
 
   DISALLOW_ALLOCATION();
   DISALLOW_IMPLICIT_CONSTRUCTORS(Extensions);
diff --git a/runtime/bin/extensions_android.cc b/runtime/bin/extensions_android.cc
index e33c195..c34902c 100644
--- a/runtime/bin/extensions_android.cc
+++ b/runtime/bin/extensions_android.cc
@@ -8,7 +8,6 @@
 #include "bin/extensions.h"
 #include <dlfcn.h>  // NOLINT
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/extensions_linux.cc b/runtime/bin/extensions_linux.cc
index 54a88a4..8a25cba 100644
--- a/runtime/bin/extensions_linux.cc
+++ b/runtime/bin/extensions_linux.cc
@@ -8,7 +8,6 @@
 #include "bin/extensions.h"
 #include <dlfcn.h>  // NOLINT
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/extensions_macos.cc b/runtime/bin/extensions_macos.cc
index 0edb6b5..9910f10 100644
--- a/runtime/bin/extensions_macos.cc
+++ b/runtime/bin/extensions_macos.cc
@@ -8,7 +8,6 @@
 #include "bin/extensions.h"
 #include <dlfcn.h>  // NOLINT
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/extensions_win.cc b/runtime/bin/extensions_win.cc
index 224bcdf..493acad 100644
--- a/runtime/bin/extensions_win.cc
+++ b/runtime/bin/extensions_win.cc
@@ -9,7 +9,6 @@
 #include "bin/utils.h"
 #include "bin/utils_win.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/fdutils.h b/runtime/bin/fdutils.h
index da4fcf5..93bebfb 100644
--- a/runtime/bin/fdutils.h
+++ b/runtime/bin/fdutils.h
@@ -8,7 +8,6 @@
 #include "bin/builtin.h"
 #include "platform/globals.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/fdutils_android.cc b/runtime/bin/fdutils_android.cc
index ba28199..3c22a04 100644
--- a/runtime/bin/fdutils_android.cc
+++ b/runtime/bin/fdutils_android.cc
@@ -5,15 +5,14 @@
 #include "platform/globals.h"
 #if defined(TARGET_OS_ANDROID)
 
-#include <errno.h>  // NOLINT
-#include <fcntl.h>  // NOLINT
-#include <unistd.h>  // NOLINT
-#include <sys/ioctl.h>  // NOLINT
-
 #include "bin/fdutils.h"
 
-#include "platform/signal_blocker.h"
+#include <errno.h>  // NOLINT
+#include <fcntl.h>  // NOLINT
+#include <sys/ioctl.h>  // NOLINT
+#include <unistd.h>  // NOLINT
 
+#include "platform/signal_blocker.h"
 
 namespace dart {
 namespace bin {
@@ -73,9 +72,7 @@
   if (result < 0) {
     return result;
   }
-#ifdef DEBUG
   ASSERT(available >= 0);
-#endif
   return static_cast<intptr_t>(available);
 }
 
@@ -99,7 +96,7 @@
       ASSERT(errno != EWOULDBLOCK);
       return -1;
     } else {
-      ASSERT((bytes_read > 0));
+      ASSERT(bytes_read > 0);
       remaining -= bytes_read;
       buffer_pos += bytes_read;
     }
diff --git a/runtime/bin/fdutils_linux.cc b/runtime/bin/fdutils_linux.cc
index e8984dd..f80356e 100644
--- a/runtime/bin/fdutils_linux.cc
+++ b/runtime/bin/fdutils_linux.cc
@@ -5,15 +5,15 @@
 #include "platform/globals.h"
 #if defined(TARGET_OS_LINUX)
 
+#include "bin/fdutils.h"
+
 #include <errno.h>  // NOLINT
 #include <fcntl.h>  // NOLINT
-#include <unistd.h>  // NOLINT
 #include <sys/ioctl.h>  // NOLINT
+#include <unistd.h>  // NOLINT
 
-#include "bin/fdutils.h"
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -72,9 +72,7 @@
   if (result < 0) {
     return result;
   }
-#ifdef DEBUG
   ASSERT(available >= 0);
-#endif
   return static_cast<intptr_t>(available);
 }
 
@@ -98,7 +96,7 @@
       ASSERT(errno != EWOULDBLOCK);
       return -1;
     } else {
-      ASSERT((bytes_read > 0));
+      ASSERT(bytes_read > 0);
       remaining -= bytes_read;
       buffer_pos += bytes_read;
     }
diff --git a/runtime/bin/fdutils_macos.cc b/runtime/bin/fdutils_macos.cc
index 2ecf600..41f1d24 100644
--- a/runtime/bin/fdutils_macos.cc
+++ b/runtime/bin/fdutils_macos.cc
@@ -5,15 +5,14 @@
 #include "platform/globals.h"
 #if defined(TARGET_OS_MACOS)
 
-#include <errno.h>  // NOLINT
-#include <fcntl.h>  // NOLINT
-#include <unistd.h>  // NOLINT
-#include <sys/ioctl.h>  // NOLINT
-
 #include "bin/fdutils.h"
 
-#include "platform/signal_blocker.h"
+#include <errno.h>  // NOLINT
+#include <fcntl.h>  // NOLINT
+#include <sys/ioctl.h>  // NOLINT
+#include <unistd.h>  // NOLINT
 
+#include "platform/signal_blocker.h"
 
 namespace dart {
 namespace bin {
@@ -73,9 +72,7 @@
   if (result < 0) {
     return result;
   }
-#ifdef DEBUG
   ASSERT(available >= 0);
-#endif
   return static_cast<intptr_t>(available);
 }
 
@@ -99,7 +96,7 @@
       ASSERT(errno != EWOULDBLOCK);
       return -1;
     } else {
-      ASSERT((bytes_read > 0));
+      ASSERT(bytes_read > 0);
       remaining -= bytes_read;
       buffer_pos += bytes_read;
     }
diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
index a1efe42..e730b172 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "bin/file.h"
 
 #include "bin/builtin.h"
@@ -18,34 +20,6 @@
 
 static const int kMSPerSecond = 1000;
 
-// Are we capturing output from stdout for the VM service?
-static bool capture_stdout = false;
-
-// Are we capturing output from stderr for the VM service?
-static bool capture_stderr = false;
-
-
-void SetCaptureStdout(bool value) {
-  capture_stdout = value;
-}
-
-
-void SetCaptureStderr(bool value) {
-  capture_stderr = value;
-}
-
-
-bool ShouldCaptureStdout() {
-  return capture_stdout;
-}
-
-
-bool ShouldCaptureStderr() {
-  return capture_stderr;
-}
-
-
-
 // The file pointer has been passed into Dart as an intptr_t and it is safe
 // to pull it out of Dart as a 64-bit integer, cast it to an intptr_t and
 // from there to a File pointer.
@@ -55,70 +29,6 @@
 }
 
 
-bool File::ReadFully(void* buffer, int64_t num_bytes) {
-  int64_t remaining = num_bytes;
-  char* current_buffer = reinterpret_cast<char*>(buffer);
-  while (remaining > 0) {
-    int64_t bytes_read = Read(current_buffer, remaining);
-    if (bytes_read <= 0) {
-      return false;
-    }
-    remaining -= bytes_read;  // Reduce the number of remaining bytes.
-    current_buffer += bytes_read;  // Move the buffer forward.
-  }
-  return true;
-}
-
-
-bool File::WriteFully(const void* buffer, int64_t num_bytes) {
-  int64_t remaining = num_bytes;
-  const char* current_buffer = reinterpret_cast<const char*>(buffer);
-  while (remaining > 0) {
-    int64_t bytes_written = Write(current_buffer, remaining);
-    if (bytes_written < 0) {
-      return false;
-    }
-    remaining -= bytes_written;  // Reduce the number of remaining bytes.
-    current_buffer += bytes_written;  // Move the buffer forward.
-  }
-  if (capture_stdout || capture_stderr) {
-    intptr_t fd = GetFD();
-    if (fd == STDOUT_FILENO && capture_stdout) {
-      Dart_ServiceSendDataEvent("Stdout", "WriteEvent",
-                                reinterpret_cast<const uint8_t*>(buffer),
-                                num_bytes);
-    } else if (fd == STDERR_FILENO && capture_stderr) {
-      Dart_ServiceSendDataEvent("Stderr", "WriteEvent",
-                                reinterpret_cast<const uint8_t*>(buffer),
-                                num_bytes);
-    }
-  }
-  return true;
-}
-
-
-File::FileOpenMode File::DartModeToFileMode(DartFileOpenMode mode) {
-  ASSERT(mode == File::kDartRead ||
-         mode == File::kDartWrite ||
-         mode == File::kDartAppend ||
-         mode == File::kDartWriteOnly ||
-         mode == File::kDartWriteOnlyAppend);
-  if (mode == File::kDartWrite) {
-    return File::kWriteTruncate;
-  }
-  if (mode == File::kDartAppend) {
-    return File::kWrite;
-  }
-  if (mode == File::kDartWriteOnly) {
-    return File::kWriteOnlyTruncate;
-  }
-  if (mode == File::kDartWriteOnlyAppend) {
-    return File::kWriteOnly;
-  }
-  return File::kRead;
-}
-
-
 void FUNCTION_NAME(File_Open)(Dart_NativeArguments args) {
   const char* filename =
       DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
@@ -131,7 +41,7 @@
   // files. Directories can be opened for reading using the posix
   // 'open' call.
   File* file = NULL;
-  file = File::Open(filename, file_mode);
+  file = File::ScopedOpen(filename, file_mode);
   if (file != NULL) {
     Dart_SetReturnValue(args,
                         Dart_NewInteger(reinterpret_cast<intptr_t>(file)));
@@ -219,7 +129,9 @@
         // TODO(sgjesse): Cache the _makeUint8ListView function somewhere.
         Dart_Handle io_lib =
             Dart_LookupLibrary(DartUtils::NewString("dart:io"));
-        if (Dart_IsError(io_lib)) Dart_PropagateError(io_lib);
+        if (Dart_IsError(io_lib)) {
+          Dart_PropagateError(io_lib);
+        }
         Dart_Handle array_view =
             Dart_Invoke(io_lib,
                         DartUtils::NewString("_makeUint8ListView"),
@@ -253,9 +165,11 @@
   intptr_t length = end - start;
   intptr_t array_len = 0;
   Dart_Handle result = Dart_ListLength(buffer_obj, &array_len);
-  if (Dart_IsError(result)) Dart_PropagateError(result);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
   ASSERT(end <= array_len);
-  uint8_t* buffer = new uint8_t[length];
+  uint8_t* buffer = Dart_ScopeAllocate(length);
   int64_t bytes_read = file->Read(reinterpret_cast<void*>(buffer), length);
   if (bytes_read >= 0) {
     result = Dart_ListSetAsBytes(buffer_obj, start, buffer, bytes_read);
@@ -267,7 +181,6 @@
   } else {
     Dart_SetReturnValue(args, DartUtils::NewDartOSError());
   }
-  delete[] buffer;
 }
 
 
@@ -294,7 +207,9 @@
   void* buffer = NULL;
   Dart_Handle result =
       Dart_TypedDataAcquireData(buffer_obj, &type, &buffer, &buffer_len);
-  if (Dart_IsError(result)) Dart_PropagateError(result);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
 
   ASSERT(type == Dart_TypedData_kUint8 || type == Dart_TypedData_kInt8);
   ASSERT(end <= buffer_len);
@@ -305,7 +220,9 @@
 
   // Release the direct pointer acquired above.
   result = Dart_TypedDataReleaseData(buffer_obj);
-  if (Dart_IsError(result)) Dart_PropagateError(result);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
 
   if (!success) {
     Dart_SetReturnValue(args, DartUtils::NewDartOSError());
@@ -466,12 +383,11 @@
   if (Dart_IsString(Dart_GetNativeArgument(args, 0))) {
     const char* name =
         DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
-    char* target = File::LinkTarget(name);
+    const char* target = File::LinkTarget(name);
     if (target == NULL) {
       Dart_SetReturnValue(args, DartUtils::NewDartOSError());
     } else {
       Dart_SetReturnValue(args, DartUtils::NewString(target));
-      free(target);
     }
   } else {
     Dart_Handle err = DartUtils::NewDartArgumentError(
@@ -550,10 +466,9 @@
 void FUNCTION_NAME(File_ResolveSymbolicLinks)(Dart_NativeArguments args) {
   const char* str =
       DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
-  char* path = File::GetCanonicalPath(str);
+  const char* path = File::GetCanonicalPath(str);
   if (path != NULL) {
     Dart_SetReturnValue(args, DartUtils::NewString(path));
-    free(path);
   } else {
     Dart_SetReturnValue(args, DartUtils::NewDartOSError());
   }
@@ -562,7 +477,9 @@
 
 void FUNCTION_NAME(File_OpenStdio)(Dart_NativeArguments args) {
   int64_t fd = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 0));
-  ASSERT(fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO);
+  ASSERT((fd == STDIN_FILENO) ||
+         (fd == STDOUT_FILENO) ||
+         (fd == STDERR_FILENO));
   File* file = File::OpenStdio(static_cast<int>(fd));
   Dart_SetReturnValue(args, Dart_NewInteger(reinterpret_cast<intptr_t>(file)));
 }
@@ -570,7 +487,9 @@
 
 void FUNCTION_NAME(File_GetStdioHandleType)(Dart_NativeArguments args) {
   int64_t fd = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 0));
-  ASSERT(fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO);
+  ASSERT((fd == STDIN_FILENO) ||
+         (fd == STDOUT_FILENO) ||
+         (fd == STDERR_FILENO));
   File::StdioHandleType type = File::GetStdioHandleType(static_cast<int>(fd));
   Dart_SetReturnValue(args, Dart_NewInteger(type));
 }
@@ -605,7 +524,9 @@
     } else {
       Dart_Handle returned_data = Dart_NewTypedData(Dart_TypedData_kInt64,
                                                     File::kStatSize);
-      if (Dart_IsError(returned_data)) Dart_PropagateError(returned_data);
+      if (Dart_IsError(returned_data)) {
+        Dart_PropagateError(returned_data);
+      }
       Dart_TypedData_Type data_type_unused;
       void* data_location;
       intptr_t data_length_unused;
@@ -613,10 +534,14 @@
                                                      &data_type_unused,
                                                      &data_location,
                                                      &data_length_unused);
-      if (Dart_IsError(status)) Dart_PropagateError(status);
+      if (Dart_IsError(status)) {
+        Dart_PropagateError(status);
+      }
       memmove(data_location, stat_data, File::kStatSize * sizeof(int64_t));
       status = Dart_TypedDataReleaseData(returned_data);
-      if (Dart_IsError(status)) Dart_PropagateError(status);
+      if (Dart_IsError(status)) {
+        Dart_PropagateError(status);
+      }
       Dart_SetReturnValue(args, returned_data);
     }
   } else {
@@ -669,7 +594,7 @@
 
 
 CObject* File::ExistsRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString filename(request[0]);
     bool result = File::Exists(filename.CString());
     return CObject::Bool(result);
@@ -679,7 +604,7 @@
 
 
 CObject* File::CreateRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString filename(request[0]);
     bool result = File::Create(filename.CString());
     if (result) {
@@ -691,9 +616,10 @@
   return CObject::IllegalArgumentError();
 }
 
+
 CObject* File::OpenRequest(const CObjectArray& request) {
   File* file = NULL;
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsString() &&
       request[1]->IsInt32()) {
     CObjectString filename(request[0]);
@@ -701,7 +627,7 @@
     File::DartFileOpenMode dart_file_mode =
         static_cast<File::DartFileOpenMode>(mode.Value());
     File::FileOpenMode file_mode = File::DartModeToFileMode(dart_file_mode);
-    file = File::Open(filename.CString(), file_mode);
+    file = File::ScopedOpen(filename.CString(), file_mode);
     if (file != NULL) {
       return new CObjectIntptr(
           CObject::NewIntptr(reinterpret_cast<intptr_t>(file)));
@@ -714,7 +640,7 @@
 
 
 CObject* File::DeleteRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString filename(request[0]);
     bool result = File::Delete(filename.CString());
     if (result) {
@@ -728,13 +654,15 @@
 
 
 CObject* File::RenameRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsString() &&
       request[1]->IsString()) {
     CObjectString old_path(request[0]);
     CObjectString new_path(request[1]);
     bool completed = File::Rename(old_path.CString(), new_path.CString());
-    if (completed) return CObject::True();
+    if (completed) {
+      return CObject::True();
+    }
     return CObject::NewOSError();
   }
   return CObject::IllegalArgumentError();
@@ -742,13 +670,15 @@
 
 
 CObject* File::CopyRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsString() &&
       request[1]->IsString()) {
     CObjectString old_path(request[0]);
     CObjectString new_path(request[1]);
     bool completed = File::Copy(old_path.CString(), new_path.CString());
-    if (completed) return CObject::True();
+    if (completed) {
+      return CObject::True();
+    }
     return CObject::NewOSError();
   }
   return CObject::IllegalArgumentError();
@@ -756,12 +686,11 @@
 
 
 CObject* File::ResolveSymbolicLinksRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString filename(request[0]);
-    char* result = File::GetCanonicalPath(filename.CString());
+    const char* result = File::GetCanonicalPath(filename.CString());
     if (result != NULL) {
       CObject* path = new CObjectString(CObject::NewString(result));
-      free(result);
       return path;
     } else {
       return CObject::NewOSError();
@@ -773,7 +702,7 @@
 
 CObject* File::CloseRequest(const CObjectArray& request) {
   intptr_t return_value = -1;
-  if (request.Length() == 1 && request[0]->IsIntptr()) {
+  if ((request.Length() == 1) && request[0]->IsIntptr()) {
     File* file = CObjectToFilePointer(request[0]);
     ASSERT(file != NULL);
     delete file;
@@ -784,7 +713,7 @@
 
 
 CObject* File::PositionRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsIntptr()) {
+  if ((request.Length() == 1) && request[0]->IsIntptr()) {
     File* file = CObjectToFilePointer(request[0]);
     ASSERT(file != NULL);
     if (!file->IsClosed()) {
@@ -803,7 +732,7 @@
 
 
 CObject* File::SetPositionRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsIntptr() &&
       request[1]->IsInt32OrInt64()) {
     File* file = CObjectToFilePointer(request[0]);
@@ -824,7 +753,7 @@
 
 
 CObject* File::TruncateRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsIntptr() &&
       request[1]->IsInt32OrInt64()) {
     File* file = CObjectToFilePointer(request[0]);
@@ -845,7 +774,7 @@
 
 
 CObject* File::LengthRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsIntptr()) {
+  if ((request.Length() == 1) && request[0]->IsIntptr()) {
     File* file = CObjectToFilePointer(request[0]);
     ASSERT(file != NULL);
     if (!file->IsClosed()) {
@@ -864,7 +793,7 @@
 
 
 CObject* File::LengthFromPathRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString filepath(request[0]);
     int64_t return_value = File::LengthFromPath(filepath.CString());
     if (return_value >= 0) {
@@ -878,7 +807,7 @@
 
 
 CObject* File::LastModifiedRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString filepath(request[0]);
     int64_t return_value = File::LastModified(filepath.CString());
     if (return_value >= 0) {
@@ -892,7 +821,7 @@
 
 
 CObject* File::FlushRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsIntptr()) {
+  if ((request.Length() == 1) && request[0]->IsIntptr()) {
     File* file = CObjectToFilePointer(request[0]);
     ASSERT(file != NULL);
     if (!file->IsClosed()) {
@@ -910,7 +839,7 @@
 
 
 CObject* File::ReadByteRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsIntptr()) {
+  if ((request.Length() == 1) && request[0]->IsIntptr()) {
     File* file = CObjectToFilePointer(request[0]);
     ASSERT(file != NULL);
     if (!file->IsClosed()) {
@@ -932,7 +861,7 @@
 
 
 CObject* File::WriteByteRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsIntptr() &&
       request[1]->IsInt32OrInt64()) {
     File* file = CObjectToFilePointer(request[0]);
@@ -955,7 +884,7 @@
 
 
 CObject* File::ReadRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsIntptr() &&
       request[1]->IsInt32OrInt64()) {
     File* file = CObjectToFilePointer(request[0]);
@@ -987,7 +916,7 @@
 
 
 CObject* File::ReadIntoRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsIntptr() &&
       request[1]->IsInt32OrInt64()) {
     File* file = CObjectToFilePointer(request[0]);
@@ -1045,7 +974,7 @@
 
 
 CObject* File::WriteFromRequest(const CObjectArray& request) {
-  if (request.Length() == 4 &&
+  if ((request.Length() == 4) &&
       request[0]->IsIntptr() &&
       (request[1]->IsTypedData() || request[1]->IsArray()) &&
       request[2]->IsInt32OrInt64() &&
@@ -1064,14 +993,13 @@
         buffer_start = typed_data.Buffer() + start;
       } else {
         CObjectArray array(request[1]);
-        buffer_start = new uint8_t[length];
+        buffer_start = Dart_ScopeAllocate(length);
         for (int i = 0; i < length; i++) {
           if (array[i + start]->IsInt32OrInt64()) {
             int64_t value = CObjectInt32OrInt64ToInt64(array[i + start]);
             buffer_start[i] = static_cast<uint8_t>(value & 0xFF);
           } else {
             // Unsupported type.
-            delete[] buffer_start;
             return CObject::IllegalArgumentError();
           }
         }
@@ -1079,9 +1007,6 @@
       }
       bool success =
           file->WriteFully(reinterpret_cast<void*>(buffer_start), length);
-      if (!request[1]->IsTypedData()) {
-        delete[] buffer_start;
-      }
       if (success) {
         return new CObjectInt64(CObject::NewInt64(length));
       } else {
@@ -1096,7 +1021,7 @@
 
 
 CObject* File::CreateLinkRequest(const CObjectArray& request) {
-  if (request.Length() != 2 ||
+  if ((request.Length() != 2) ||
       !request[0]->IsString() ||
       !request[1]->IsString()) {
     return CObject::IllegalArgumentError();
@@ -1112,7 +1037,7 @@
 
 
 CObject* File::DeleteLinkRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString link_path(request[0]);
     bool result = File::DeleteLink(link_path.CString());
     if (result) {
@@ -1126,13 +1051,15 @@
 
 
 CObject* File::RenameLinkRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsString() &&
       request[1]->IsString()) {
     CObjectString old_path(request[0]);
     CObjectString new_path(request[1]);
     bool completed = File::RenameLink(old_path.CString(), new_path.CString());
-    if (completed) return CObject::True();
+    if (completed) {
+      return CObject::True();
+    }
     return CObject::NewOSError();
   }
   return CObject::IllegalArgumentError();
@@ -1140,12 +1067,11 @@
 
 
 CObject* File::LinkTargetRequest(const CObjectArray& request) {
-  if (request.Length() == 1 && request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     CObjectString link_path(request[0]);
-    char* target = File::LinkTarget(link_path.CString());
+    const char* target = File::LinkTarget(link_path.CString());
     if (target != NULL) {
       CObject* result = new CObjectString(CObject::NewString(target));
-      free(target);
       return result;
     } else {
       return CObject::NewOSError();
@@ -1156,7 +1082,7 @@
 
 
 CObject* File::TypeRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsString() &&
       request[1]->IsBool()) {
     CObjectString path(request[0]);
@@ -1169,7 +1095,7 @@
 
 
 CObject* File::IdenticalRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsString() &&
       request[1]->IsString()) {
     CObjectString path1(request[0]);
@@ -1189,8 +1115,7 @@
 
 
 CObject* File::StatRequest(const CObjectArray& request) {
-  if (request.Length() == 1 &&
-      request[0]->IsString()) {
+  if ((request.Length() == 1) && request[0]->IsString()) {
     int64_t data[File::kStatSize];
     CObjectString path(request[0]);
     File::Stat(path.CString(), data);
@@ -1212,7 +1137,7 @@
 
 
 CObject* File::LockRequest(const CObjectArray& request) {
-  if (request.Length() == 4 &&
+  if ((request.Length() == 4) &&
       request[0]->IsIntptr() &&
       request[1]->IsInt32OrInt64() &&
       request[2]->IsInt32OrInt64() &&
@@ -1237,3 +1162,5 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/file.h b/runtime/bin/file.h
index 633c006..3c8255f 100644
--- a/runtime/bin/file.h
+++ b/runtime/bin/file.h
@@ -5,15 +5,14 @@
 #ifndef BIN_FILE_H_
 #define BIN_FILE_H_
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdio.h>
 #include <sys/types.h>
 
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -129,7 +128,10 @@
   // reading. If mode contains kWrite the file is opened for both
   // reading and writing. If mode contains kWrite and the file does
   // not exist the file is created. The file is truncated to length 0 if
-  // mode contains kTruncate.
+  // mode contains kTruncate. Assumes we are in an API scope.
+  static File* ScopedOpen(const char* path, FileOpenMode mode);
+
+  // Like ScopedOpen(), but no API scope is needed.
   static File* Open(const char* path, FileOpenMode mode);
 
   // Create a file object for the specified stdio file descriptor
@@ -147,9 +149,9 @@
   static int64_t LengthFromPath(const char* path);
   static void Stat(const char* path, int64_t* data);
   static time_t LastModified(const char* path);
-  static char* LinkTarget(const char* pathname);
+  static const char* LinkTarget(const char* pathname);
   static bool IsAbsolutePath(const char* path);
-  static char* GetCanonicalPath(const char* path);
+  static const char* GetCanonicalPath(const char* path);
   static const char* PathSeparator();
   static const char* StringEscapedPathSeparator();
   static Type GetType(const char* path, bool follow_links);
@@ -191,6 +193,8 @@
   explicit File(FileHandle* handle) : handle_(handle) { }
   void Close();
 
+  static File* FileOpenW(const wchar_t* system_name, FileOpenMode mode);
+
   static const int kClosedFd = -1;
 
   // FileHandle is an OS specific class which stores data about the file.
diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc
index cc29740..a115715 100644
--- a/runtime/bin/file_android.cc
+++ b/runtime/bin/file_android.cc
@@ -9,11 +9,11 @@
 
 #include <errno.h>  // NOLINT
 #include <fcntl.h>  // NOLINT
+#include <libgen.h>  // NOLINT
+#include <sys/sendfile.h>  // NOLINT
 #include <sys/stat.h>  // NOLINT
 #include <sys/types.h>  // NOLINT
-#include <sys/sendfile.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#include <libgen.h>  // NOLINT
 
 #include "bin/builtin.h"
 #include "bin/log.h"
@@ -21,7 +21,6 @@
 #include "platform/signal_blocker.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -114,7 +113,7 @@
 
 bool File::Lock(File::LockType lock, int64_t start, int64_t end) {
   ASSERT(handle_->fd() >= 0);
-  ASSERT(end == -1 || end > start);
+  ASSERT((end == -1) || (end > start));
   struct flock fl;
   switch (lock) {
     case File::kLockUnlock:
@@ -148,7 +147,13 @@
 }
 
 
-File* File::Open(const char* name, FileOpenMode mode) {
+File* File::FileOpenW(const wchar_t* system_name, FileOpenMode mode) {
+  UNREACHABLE();
+  return NULL;
+}
+
+
+File* File::ScopedOpen(const char* name, FileOpenMode mode) {
   // Report errors for non-regular files.
   struct stat st;
   if (NO_RETRY_EXPECTED(stat(name, &st)) == 0) {
@@ -185,8 +190,16 @@
 }
 
 
+File* File::Open(const char* path, FileOpenMode mode) {
+  // ScopedOpen doesn't actually need a scope.
+  return ScopedOpen(path, mode);
+}
+
+
 File* File::OpenStdio(int fd) {
-  if (fd < 0 || 2 < fd) return NULL;
+  if ((fd < 0) || (2 < fd)) {
+    return NULL;
+  }
   return new File(new FileHandle(fd));
 }
 
@@ -292,7 +305,7 @@
     // From sendfile man pages:
     //   Applications may wish to fall back to read(2)/write(2) in the case
     //   where sendfile() fails with EINVAL or ENOSYS.
-    if (result < 0 && (errno == EINVAL || errno == ENOSYS)) {
+    if ((result < 0) && ((errno == EINVAL) || (errno == ENOSYS))) {
       const intptr_t kBufferSize = 8 * KB;
       uint8_t buffer[kBufferSize];
       while ((result = TEMP_FAILURE_RETRY(
@@ -363,18 +376,20 @@
 }
 
 
-char* File::LinkTarget(const char* pathname) {
+const char* File::LinkTarget(const char* pathname) {
   struct stat link_stats;
-  if (lstat(pathname, &link_stats) != 0) return NULL;
+  if (lstat(pathname, &link_stats) != 0) {
+    return NULL;
+  }
   if (!S_ISLNK(link_stats.st_mode)) {
     errno = ENOENT;
     return NULL;
   }
   size_t target_size = link_stats.st_size;
-  char* target_name = reinterpret_cast<char*>(malloc(target_size + 1));
+  char* target_name = DartUtils::ScopedCString(target_size + 1);
+  ASSERT(target_name != NULL);
   size_t read_size = readlink(pathname, target_name, target_size + 1);
   if (read_size != target_size) {
-    free(target_name);
     return NULL;
   }
   target_name[target_size] = '\0';
@@ -383,24 +398,20 @@
 
 
 bool File::IsAbsolutePath(const char* pathname) {
-  return (pathname != NULL && pathname[0] == '/');
+  return ((pathname != NULL) && (pathname[0] == '/'));
 }
 
 
-char* File::GetCanonicalPath(const char* pathname) {
+const char* File::GetCanonicalPath(const char* pathname) {
   char* abs_path = NULL;
   if (pathname != NULL) {
-    // A null second argument to realpath crashes Android.  Fixed in Mar 2013,
-    // but not in earlier releases of Android.
-    char* resolved = reinterpret_cast<char*>(malloc(PATH_MAX));
-    if (resolved == NULL) return NULL;
+    char* resolved_path = DartUtils::ScopedCString(PATH_MAX + 1);
+    ASSERT(resolved_path != NULL);
     do {
-      abs_path = realpath(pathname, resolved);
-    } while (abs_path == NULL && errno == EINTR);
-    ASSERT(abs_path == NULL || IsAbsolutePath(abs_path));
-    if (abs_path != resolved) {
-      free(resolved);
-    }
+      abs_path = realpath(pathname, resolved_path);
+    } while ((abs_path == NULL) && (errno == EINTR));
+    ASSERT((abs_path == NULL) || IsAbsolutePath(abs_path));
+    ASSERT((abs_path == NULL) || (abs_path == resolved_path));
   }
   return abs_path;
 }
@@ -417,7 +428,7 @@
 
 
 File::StdioHandleType File::GetStdioHandleType(int fd) {
-  ASSERT(0 <= fd && fd <= 2);
+  ASSERT((0 <= fd) && (fd <= 2));
   struct stat buf;
   int result = fstat(fd, &buf);
   if (result == -1) {
@@ -426,10 +437,18 @@
     Utils::StrError(errno, error_message, kBufferSize);
     FATAL2("Failed stat on file descriptor %d: %s", fd, error_message);
   }
-  if (S_ISCHR(buf.st_mode)) return kTerminal;
-  if (S_ISFIFO(buf.st_mode)) return kPipe;
-  if (S_ISSOCK(buf.st_mode)) return kSocket;
-  if (S_ISREG(buf.st_mode)) return kFile;
+  if (S_ISCHR(buf.st_mode)) {
+    return kTerminal;
+  }
+  if (S_ISFIFO(buf.st_mode)) {
+    return kPipe;
+  }
+  if (S_ISSOCK(buf.st_mode)) {
+    return kSocket;
+  }
+  if (S_ISREG(buf.st_mode)) {
+    return kFile;
+  }
   return kOther;
 }
 
@@ -442,10 +461,18 @@
   } else {
     stat_success = NO_RETRY_EXPECTED(lstat(pathname, &entry_info));
   }
-  if (stat_success == -1) return File::kDoesNotExist;
-  if (S_ISDIR(entry_info.st_mode)) return File::kIsDirectory;
-  if (S_ISREG(entry_info.st_mode)) return File::kIsFile;
-  if (S_ISLNK(entry_info.st_mode)) return File::kIsLink;
+  if (stat_success == -1) {
+    return File::kDoesNotExist;
+  }
+  if (S_ISDIR(entry_info.st_mode)) {
+    return File::kIsDirectory;
+  }
+  if (S_ISREG(entry_info.st_mode)) {
+    return File::kIsFile;
+  }
+  if (S_ISLNK(entry_info.st_mode)) {
+    return File::kIsLink;
+  }
   return File::kDoesNotExist;
 }
 
@@ -453,12 +480,12 @@
 File::Identical File::AreIdentical(const char* file_1, const char* file_2) {
   struct stat file_1_info;
   struct stat file_2_info;
-  if (NO_RETRY_EXPECTED(lstat(file_1, &file_1_info)) == -1 ||
-      NO_RETRY_EXPECTED(lstat(file_2, &file_2_info)) == -1) {
+  if ((NO_RETRY_EXPECTED(lstat(file_1, &file_1_info)) == -1) ||
+      (NO_RETRY_EXPECTED(lstat(file_2, &file_2_info)) == -1)) {
     return File::kError;
   }
-  return (file_1_info.st_ino == file_2_info.st_ino &&
-          file_1_info.st_dev == file_2_info.st_dev) ?
+  return ((file_1_info.st_ino == file_2_info.st_ino) &&
+          (file_1_info.st_dev == file_2_info.st_dev)) ?
       File::kIdentical :
       File::kDifferent;
 }
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc
index d289c21..3099715 100644
--- a/runtime/bin/file_linux.cc
+++ b/runtime/bin/file_linux.cc
@@ -9,18 +9,17 @@
 
 #include <errno.h>  // NOLINT
 #include <fcntl.h>  // NOLINT
+#include <libgen.h>  // NOLINT
+#include <sys/sendfile.h>  // NOLINT
 #include <sys/stat.h>  // NOLINT
 #include <sys/types.h>  // NOLINT
-#include <sys/sendfile.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#include <libgen.h>  // NOLINT
 
 #include "bin/builtin.h"
 #include "bin/log.h"
 #include "platform/signal_blocker.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -112,7 +111,7 @@
 
 bool File::Lock(File::LockType lock, int64_t start, int64_t end) {
   ASSERT(handle_->fd() >= 0);
-  ASSERT(end == -1 || end > start);
+  ASSERT((end == -1) || (end > start));
   struct flock fl;
   switch (lock) {
     case File::kLockUnlock:
@@ -146,7 +145,13 @@
 }
 
 
-File* File::Open(const char* name, FileOpenMode mode) {
+File* File::FileOpenW(const wchar_t* system_name, FileOpenMode mode) {
+  UNREACHABLE();
+  return NULL;
+}
+
+
+File* File::ScopedOpen(const char* name, FileOpenMode mode) {
   // Report errors for non-regular files.
   struct stat64 st;
   if (TEMP_FAILURE_RETRY(stat64(name, &st)) == 0) {
@@ -184,8 +189,16 @@
 }
 
 
+File* File::Open(const char* path, FileOpenMode mode) {
+  // ScopedOpen doesn't actually need a scope.
+  return ScopedOpen(path, mode);
+}
+
+
 File* File::OpenStdio(int fd) {
-  if (fd < 0 || 2 < fd) return NULL;
+  if ((fd < 0) || (2 < fd)) {
+    return NULL;
+  }
   return new File(new FileHandle(fd));
 }
 
@@ -291,7 +304,7 @@
     // From sendfile man pages:
     //   Applications may wish to fall back to read(2)/write(2) in the case
     //   where sendfile() fails with EINVAL or ENOSYS.
-    if (result < 0 && (errno == EINVAL || errno == ENOSYS)) {
+    if ((result < 0) && ((errno == EINVAL) || (errno == ENOSYS))) {
       const intptr_t kBufferSize = 8 * KB;
       uint8_t buffer[kBufferSize];
       while ((result = TEMP_FAILURE_RETRY(
@@ -368,9 +381,11 @@
 }
 
 
-char* File::LinkTarget(const char* pathname) {
+const char* File::LinkTarget(const char* pathname) {
   struct stat64 link_stats;
-  if (TEMP_FAILURE_RETRY(lstat64(pathname, &link_stats)) != 0) return NULL;
+  if (TEMP_FAILURE_RETRY(lstat64(pathname, &link_stats)) != 0) {
+    return NULL;
+  }
   if (!S_ISLNK(link_stats.st_mode)) {
     errno = ENOENT;
     return NULL;
@@ -385,10 +400,8 @@
   if (target_size <= 0) {
     return NULL;
   }
-  char* target_name = reinterpret_cast<char*>(malloc(target_size + 1));
-  if (target_name == NULL) {
-    return NULL;
-  }
+  char* target_name = DartUtils::ScopedCString(target_size + 1);
+  ASSERT(target_name != NULL);
   memmove(target_name, target, target_size);
   target_name[target_size] = '\0';
   return target_name;
@@ -400,13 +413,16 @@
 }
 
 
-char* File::GetCanonicalPath(const char* pathname) {
+const char* File::GetCanonicalPath(const char* pathname) {
   char* abs_path = NULL;
   if (pathname != NULL) {
+    char* resolved_path = DartUtils::ScopedCString(PATH_MAX + 1);
+    ASSERT(resolved_path != NULL);
     do {
-      abs_path = realpath(pathname, NULL);
+      abs_path = realpath(pathname, resolved_path);
     } while (abs_path == NULL && errno == EINTR);
     ASSERT(abs_path == NULL || IsAbsolutePath(abs_path));
+    ASSERT(abs_path == NULL || (abs_path == resolved_path));
   }
   return abs_path;
 }
@@ -423,7 +439,7 @@
 
 
 File::StdioHandleType File::GetStdioHandleType(int fd) {
-  ASSERT(0 <= fd && fd <= 2);
+  ASSERT((0 <= fd) && (fd <= 2));
   struct stat64 buf;
   int result = TEMP_FAILURE_RETRY(fstat64(fd, &buf));
   if (result == -1) {
@@ -432,10 +448,18 @@
     FATAL2("Failed stat on file descriptor %d: %s", fd,
            Utils::StrError(errno, error_buf, kBufferSize));
   }
-  if (S_ISCHR(buf.st_mode)) return kTerminal;
-  if (S_ISFIFO(buf.st_mode)) return kPipe;
-  if (S_ISSOCK(buf.st_mode)) return kSocket;
-  if (S_ISREG(buf.st_mode)) return kFile;
+  if (S_ISCHR(buf.st_mode)) {
+    return kTerminal;
+  }
+  if (S_ISFIFO(buf.st_mode)) {
+    return kPipe;
+  }
+  if (S_ISSOCK(buf.st_mode)) {
+    return kSocket;
+  }
+  if (S_ISREG(buf.st_mode)) {
+    return kFile;
+  }
   return kOther;
 }
 
@@ -448,10 +472,18 @@
   } else {
     stat_success = TEMP_FAILURE_RETRY(lstat64(pathname, &entry_info));
   }
-  if (stat_success == -1) return File::kDoesNotExist;
-  if (S_ISDIR(entry_info.st_mode)) return File::kIsDirectory;
-  if (S_ISREG(entry_info.st_mode)) return File::kIsFile;
-  if (S_ISLNK(entry_info.st_mode)) return File::kIsLink;
+  if (stat_success == -1) {
+    return File::kDoesNotExist;
+  }
+  if (S_ISDIR(entry_info.st_mode)) {
+    return File::kIsDirectory;
+  }
+  if (S_ISREG(entry_info.st_mode)) {
+    return File::kIsFile;
+  }
+  if (S_ISLNK(entry_info.st_mode)) {
+    return File::kIsLink;
+  }
   return File::kDoesNotExist;
 }
 
@@ -459,12 +491,12 @@
 File::Identical File::AreIdentical(const char* file_1, const char* file_2) {
   struct stat64 file_1_info;
   struct stat64 file_2_info;
-  if (TEMP_FAILURE_RETRY(lstat64(file_1, &file_1_info)) == -1 ||
-      TEMP_FAILURE_RETRY(lstat64(file_2, &file_2_info)) == -1) {
+  if ((TEMP_FAILURE_RETRY(lstat64(file_1, &file_1_info)) == -1) ||
+      (TEMP_FAILURE_RETRY(lstat64(file_2, &file_2_info)) == -1)) {
     return File::kError;
   }
-  return (file_1_info.st_ino == file_2_info.st_ino &&
-          file_1_info.st_dev == file_2_info.st_dev) ?
+  return ((file_1_info.st_ino == file_2_info.st_ino) &&
+          (file_1_info.st_dev == file_2_info.st_dev)) ?
       File::kIdentical :
       File::kDifferent;
 }
diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
index 6187e94..81412f6 100644
--- a/runtime/bin/file_macos.cc
+++ b/runtime/bin/file_macos.cc
@@ -7,13 +7,13 @@
 
 #include "bin/file.h"
 
+#include <copyfile.h>  // NOLINT
 #include <errno.h>  // NOLINT
 #include <fcntl.h>  // NOLINT
-#include <copyfile.h>  // NOLINT
-#include <sys/stat.h>  // NOLINT
-#include <unistd.h>  // NOLINT
 #include <libgen.h>  // NOLINT
 #include <limits.h>  // NOLINT
+#include <sys/stat.h>  // NOLINT
+#include <unistd.h>  // NOLINT
 
 #include "bin/builtin.h"
 #include "bin/fdutils.h"
@@ -114,7 +114,7 @@
 
 bool File::Lock(File::LockType lock, int64_t start, int64_t end) {
   ASSERT(handle_->fd() >= 0);
-  ASSERT(end == -1 || end > start);
+  ASSERT((end == -1) || (end > start));
   struct flock fl;
   switch (lock) {
     case File::kLockUnlock:
@@ -148,7 +148,13 @@
 }
 
 
-File* File::Open(const char* name, FileOpenMode mode) {
+File* File::FileOpenW(const wchar_t* system_name, FileOpenMode mode) {
+  UNREACHABLE();
+  return NULL;
+}
+
+
+File* File::ScopedOpen(const char* name, FileOpenMode mode) {
   // Report errors for non-regular files.
   struct stat st;
   if (NO_RETRY_EXPECTED(stat(name, &st)) == 0) {
@@ -186,8 +192,16 @@
 }
 
 
+File* File::Open(const char* path, FileOpenMode mode) {
+  // ScopedOpen doesn't actually need a scope.
+  return ScopedOpen(path, mode);
+}
+
+
 File* File::OpenStdio(int fd) {
-  if (fd < 0 || 2 < fd) return NULL;
+  if ((fd < 0) || (2 < fd)) {
+    return NULL;
+  }
   return new File(new FileHandle(fd));
 }
 
@@ -329,9 +343,11 @@
 }
 
 
-char* File::LinkTarget(const char* pathname) {
+const char* File::LinkTarget(const char* pathname) {
   struct stat link_stats;
-  if (lstat(pathname, &link_stats) != 0) return NULL;
+  if (lstat(pathname, &link_stats) != 0) {
+    return NULL;
+  }
   if (!S_ISLNK(link_stats.st_mode)) {
     errno = ENOENT;
     return NULL;
@@ -345,10 +361,8 @@
   if (target_size <= 0) {
     return NULL;
   }
-  char* target_name = reinterpret_cast<char*>(malloc(target_size + 1));
-  if (target_name == NULL) {
-    return NULL;
-  }
+  char* target_name = DartUtils::ScopedCString(target_size + 1);
+  ASSERT(target_name != NULL);
   memmove(target_name, target, target_size);
   target_name[target_size] = '\0';
   return target_name;
@@ -360,19 +374,19 @@
 }
 
 
-char* File::GetCanonicalPath(const char* pathname) {
+const char* File::GetCanonicalPath(const char* pathname) {
   char* abs_path = NULL;
   if (pathname != NULL) {
     // On some older MacOs versions the default behaviour of realpath allocating
     // space for the resolved_path when a NULL is passed in does not seem to
-    // work, so we explicitly allocate space. The caller is responsible for
-    // freeing this space as in a regular realpath call.
-    char* resolved_path = reinterpret_cast<char*>(malloc(PATH_MAX + 1));
+    // work, so we explicitly allocate space.
+    char* resolved_path = DartUtils::ScopedCString(PATH_MAX + 1);
     ASSERT(resolved_path != NULL);
     do {
-      abs_path = realpath(pathname, NULL);
-    } while (abs_path == NULL && errno == EINTR);
-    ASSERT(abs_path == NULL || IsAbsolutePath(abs_path));
+      abs_path = realpath(pathname, resolved_path);
+    } while ((abs_path == NULL) && (errno == EINTR));
+    ASSERT((abs_path == NULL) || IsAbsolutePath(abs_path));
+    ASSERT((abs_path == NULL) || (abs_path == resolved_path));
   }
   return abs_path;
 }
@@ -389,7 +403,7 @@
 
 
 File::StdioHandleType File::GetStdioHandleType(int fd) {
-  ASSERT(0 <= fd && fd <= 2);
+  ASSERT((0 <= fd) && (fd <= 2));
   struct stat buf;
   int result = fstat(fd, &buf);
   if (result == -1) {
@@ -398,10 +412,18 @@
     Utils::StrError(errno, error_message, kBufferSize);
     FATAL2("Failed stat on file descriptor %d: %s", fd, error_message);
   }
-  if (S_ISCHR(buf.st_mode)) return kTerminal;
-  if (S_ISFIFO(buf.st_mode)) return kPipe;
-  if (S_ISSOCK(buf.st_mode)) return kSocket;
-  if (S_ISREG(buf.st_mode)) return kFile;
+  if (S_ISCHR(buf.st_mode)) {
+    return kTerminal;
+  }
+  if (S_ISFIFO(buf.st_mode)) {
+    return kPipe;
+  }
+  if (S_ISSOCK(buf.st_mode)) {
+    return kSocket;
+  }
+  if (S_ISREG(buf.st_mode)) {
+    return kFile;
+  }
   return kOther;
 }
 
@@ -414,10 +436,18 @@
   } else {
     stat_success = NO_RETRY_EXPECTED(lstat(pathname, &entry_info));
   }
-  if (stat_success == -1) return File::kDoesNotExist;
-  if (S_ISDIR(entry_info.st_mode)) return File::kIsDirectory;
-  if (S_ISREG(entry_info.st_mode)) return File::kIsFile;
-  if (S_ISLNK(entry_info.st_mode)) return File::kIsLink;
+  if (stat_success == -1) {
+    return File::kDoesNotExist;
+  }
+  if (S_ISDIR(entry_info.st_mode)) {
+    return File::kIsDirectory;
+  }
+  if (S_ISREG(entry_info.st_mode)) {
+    return File::kIsFile;
+  }
+  if (S_ISLNK(entry_info.st_mode)) {
+    return File::kIsLink;
+  }
   return File::kDoesNotExist;
 }
 
@@ -425,12 +455,12 @@
 File::Identical File::AreIdentical(const char* file_1, const char* file_2) {
   struct stat file_1_info;
   struct stat file_2_info;
-  if (NO_RETRY_EXPECTED(lstat(file_1, &file_1_info)) == -1 ||
-      NO_RETRY_EXPECTED(lstat(file_2, &file_2_info)) == -1) {
+  if ((NO_RETRY_EXPECTED(lstat(file_1, &file_1_info)) == -1) ||
+      (NO_RETRY_EXPECTED(lstat(file_2, &file_2_info)) == -1)) {
     return File::kError;
   }
-  return (file_1_info.st_ino == file_2_info.st_ino &&
-          file_1_info.st_dev == file_2_info.st_dev) ?
+  return ((file_1_info.st_ino == file_2_info.st_ino) &&
+          (file_1_info.st_dev == file_2_info.st_dev)) ?
       File::kIdentical :
       File::kDifferent;
 }
diff --git a/runtime/bin/file_support.cc b/runtime/bin/file_support.cc
new file mode 100644
index 0000000..0ad5edc
--- /dev/null
+++ b/runtime/bin/file_support.cc
@@ -0,0 +1,109 @@
+// 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.
+
+#include "bin/file.h"
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "bin/embedded_dart_io.h"
+#include "bin/io_buffer.h"
+#include "bin/utils.h"
+
+#include "include/dart_api.h"
+#include "include/dart_tools_api.h"
+
+namespace dart {
+namespace bin {
+
+// Are we capturing output from stdout for the VM service?
+static bool capture_stdout = false;
+
+// Are we capturing output from stderr for the VM service?
+static bool capture_stderr = false;
+
+void SetCaptureStdout(bool value) {
+  capture_stdout = value;
+}
+
+
+void SetCaptureStderr(bool value) {
+  capture_stderr = value;
+}
+
+
+bool ShouldCaptureStdout() {
+  return capture_stdout;
+}
+
+
+bool ShouldCaptureStderr() {
+  return capture_stderr;
+}
+
+
+bool File::ReadFully(void* buffer, int64_t num_bytes) {
+  int64_t remaining = num_bytes;
+  char* current_buffer = reinterpret_cast<char*>(buffer);
+  while (remaining > 0) {
+    int64_t bytes_read = Read(current_buffer, remaining);
+    if (bytes_read <= 0) {
+      return false;
+    }
+    remaining -= bytes_read;  // Reduce the number of remaining bytes.
+    current_buffer += bytes_read;  // Move the buffer forward.
+  }
+  return true;
+}
+
+
+bool File::WriteFully(const void* buffer, int64_t num_bytes) {
+  int64_t remaining = num_bytes;
+  const char* current_buffer = reinterpret_cast<const char*>(buffer);
+  while (remaining > 0) {
+    int64_t bytes_written = Write(current_buffer, remaining);
+    if (bytes_written < 0) {
+      return false;
+    }
+    remaining -= bytes_written;  // Reduce the number of remaining bytes.
+    current_buffer += bytes_written;  // Move the buffer forward.
+  }
+  if (capture_stdout || capture_stderr) {
+    intptr_t fd = GetFD();
+    if ((fd == STDOUT_FILENO) && capture_stdout) {
+      Dart_ServiceSendDataEvent("Stdout", "WriteEvent",
+                                reinterpret_cast<const uint8_t*>(buffer),
+                                num_bytes);
+    } else if ((fd == STDERR_FILENO) && capture_stderr) {
+      Dart_ServiceSendDataEvent("Stderr", "WriteEvent",
+                                reinterpret_cast<const uint8_t*>(buffer),
+                                num_bytes);
+    }
+  }
+  return true;
+}
+
+
+File::FileOpenMode File::DartModeToFileMode(DartFileOpenMode mode) {
+  ASSERT((mode == File::kDartRead) ||
+         (mode == File::kDartWrite) ||
+         (mode == File::kDartAppend) ||
+         (mode == File::kDartWriteOnly) ||
+         (mode == File::kDartWriteOnlyAppend));
+  if (mode == File::kDartWrite) {
+    return File::kWriteTruncate;
+  }
+  if (mode == File::kDartAppend) {
+    return File::kWrite;
+  }
+  if (mode == File::kDartWriteOnly) {
+    return File::kWriteOnlyTruncate;
+  }
+  if (mode == File::kDartWriteOnlyAppend) {
+    return File::kWriteOnly;
+  }
+  return File::kRead;
+}
+
+}  // namespace bin
+}  // namespace dart
diff --git a/runtime/bin/file_system_watcher.cc b/runtime/bin/file_system_watcher.cc
index 5d8c0b8..317f59f 100644
--- a/runtime/bin/file_system_watcher.cc
+++ b/runtime/bin/file_system_watcher.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "bin/file_system_watcher.h"
 
 #include "bin/builtin.h"
@@ -73,3 +75,5 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/file_system_watcher.h b/runtime/bin/file_system_watcher.h
index 6a6164a..5026da7 100644
--- a/runtime/bin/file_system_watcher.h
+++ b/runtime/bin/file_system_watcher.h
@@ -5,15 +5,18 @@
 #ifndef BIN_FILE_SYSTEM_WATCHER_H_
 #define BIN_FILE_SYSTEM_WATCHER_H_
 
+#if defined(DART_IO_DISABLED)
+#error "file_system_watcher.h can only be included on builds with IO enabled"
+#endif
+
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdio.h>
 #include <sys/types.h>
 
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/file_system_watcher_android.cc b/runtime/bin/file_system_watcher_android.cc
index ac2ad5f..4c0380e 100644
--- a/runtime/bin/file_system_watcher_android.cc
+++ b/runtime/bin/file_system_watcher_android.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_ANDROID)
 
@@ -11,10 +13,8 @@
 #include <sys/inotify.h>  // NOLINT
 
 #include "bin/fdutils.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -46,10 +46,18 @@
                                       int events,
                                       bool recursive) {
   int list_events = IN_DELETE_SELF | IN_MOVE_SELF;
-  if (events & kCreate) list_events |= IN_CREATE;
-  if (events & kModifyContent) list_events |= IN_CLOSE_WRITE | IN_ATTRIB;
-  if (events & kDelete) list_events |= IN_DELETE;
-  if (events & kMove) list_events |= IN_MOVE;
+  if ((events & kCreate) != 0) {
+    list_events |= IN_CREATE;
+  }
+  if ((events & kModifyContent) != 0) {
+    list_events |= IN_CLOSE_WRITE | IN_ATTRIB;
+  }
+  if ((events & kDelete) != 0) {
+    list_events |= IN_DELETE;
+  }
+  if ((events & kMove) != 0) {
+    list_events |= IN_MOVE;
+  }
   int path_id = NO_RETRY_EXPECTED(inotify_add_watch(id, path, list_events));
   if (path_id < 0) {
     return -1;
@@ -69,6 +77,33 @@
 }
 
 
+static int InotifyEventToMask(struct inotify_event* e) {
+  int mask = 0;
+  if ((e->mask & IN_CLOSE_WRITE) != 0) {
+    mask |= FileSystemWatcher::kModifyContent;
+  }
+  if ((e->mask & IN_ATTRIB) != 0) {
+    mask |= FileSystemWatcher::kModefyAttribute;
+  }
+  if ((e->mask & IN_CREATE) != 0) {
+    mask |= FileSystemWatcher::kCreate;
+  }
+  if ((e->mask & IN_MOVE) != 0) {
+    mask |= FileSystemWatcher::kMove;
+  }
+  if ((e->mask & IN_DELETE) != 0) {
+    mask |= FileSystemWatcher::kDelete;
+  }
+  if ((e->mask & (IN_DELETE_SELF | IN_MOVE_SELF)) != 0) {
+    mask |= FileSystemWatcher::kDeleteSelf;
+  }
+  if ((e->mask & IN_ISDIR) != 0) {
+    mask |= FileSystemWatcher::kIsDir;
+  }
+  return mask;
+}
+
+
 Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
   USE(path_id);
   const intptr_t kEventSize = sizeof(struct inotify_event);
@@ -87,14 +122,7 @@
         reinterpret_cast<struct inotify_event*>(buffer + offset);
     if ((e->mask & IN_IGNORED) == 0) {;
       Dart_Handle event = Dart_NewList(5);
-      int mask = 0;
-      if (e->mask & IN_CLOSE_WRITE) mask |= kModifyContent;
-      if (e->mask & IN_ATTRIB) mask |= kModefyAttribute;
-      if (e->mask & IN_CREATE) mask |= kCreate;
-      if (e->mask & IN_MOVE) mask |= kMove;
-      if (e->mask & IN_DELETE) mask |= kDelete;
-      if (e->mask & (IN_DELETE_SELF | IN_MOVE_SELF)) mask |= kDeleteSelf;
-      if (e->mask & IN_ISDIR) mask |= kIsDir;
+      int mask = InotifyEventToMask(e);
       Dart_ListSetAt(event, 0, Dart_NewInteger(mask));
       Dart_ListSetAt(event, 1, Dart_NewInteger(e->cookie));
       if (e->len > 0) {
@@ -118,3 +146,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_ANDROID)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/file_system_watcher_linux.cc b/runtime/bin/file_system_watcher_linux.cc
index 48c7323..ef4eaef 100644
--- a/runtime/bin/file_system_watcher_linux.cc
+++ b/runtime/bin/file_system_watcher_linux.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_LINUX)
 
@@ -12,10 +14,8 @@
 
 #include "bin/fdutils.h"
 #include "bin/socket.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -26,7 +26,9 @@
 
 intptr_t FileSystemWatcher::Init() {
   int id = NO_RETRY_EXPECTED(inotify_init1(IN_CLOEXEC));
-  if (id < 0) return -1;
+  if (id < 0) {
+    return -1;
+  }
   // Some systems dosn't support setting this as non-blocking. Since watching
   // internals are kept away from the user, we know it's possible to continue,
   // even if setting non-blocking fails.
@@ -45,10 +47,18 @@
                                       int events,
                                       bool recursive) {
   int list_events = IN_DELETE_SELF | IN_MOVE_SELF;
-  if (events & kCreate) list_events |= IN_CREATE;
-  if (events & kModifyContent) list_events |= IN_CLOSE_WRITE | IN_ATTRIB;
-  if (events & kDelete) list_events |= IN_DELETE;
-  if (events & kMove) list_events |= IN_MOVE;
+  if ((events & kCreate) != 0) {
+    list_events |= IN_CREATE;
+  }
+  if ((events & kModifyContent) != 0) {
+    list_events |= IN_CLOSE_WRITE | IN_ATTRIB;
+  }
+  if ((events & kDelete) != 0) {
+    list_events |= IN_DELETE;
+  }
+  if ((events & kMove) != 0) {
+    list_events |= IN_MOVE;
+  }
   int path_id = NO_RETRY_EXPECTED(inotify_add_watch(id, path, list_events));
   if (path_id < 0) {
     return -1;
@@ -68,6 +78,33 @@
 }
 
 
+static int InotifyEventToMask(struct inotify_event* e) {
+  int mask = 0;
+  if ((e->mask & IN_CLOSE_WRITE) != 0) {
+    mask |= FileSystemWatcher::kModifyContent;
+  }
+  if ((e->mask & IN_ATTRIB) != 0) {
+    mask |= FileSystemWatcher::kModefyAttribute;
+  }
+  if ((e->mask & IN_CREATE) != 0) {
+    mask |= FileSystemWatcher::kCreate;
+  }
+  if ((e->mask & IN_MOVE) != 0) {
+    mask |= FileSystemWatcher::kMove;
+  }
+  if ((e->mask & IN_DELETE) != 0) {
+    mask |= FileSystemWatcher::kDelete;
+  }
+  if ((e->mask & (IN_DELETE_SELF | IN_MOVE_SELF)) != 0) {
+    mask |= FileSystemWatcher::kDeleteSelf;
+  }
+  if ((e->mask & IN_ISDIR) != 0) {
+    mask |= FileSystemWatcher::kIsDir;
+  }
+  return mask;
+}
+
+
 Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
   USE(path_id);
   const intptr_t kEventSize = sizeof(struct inotify_event);
@@ -86,14 +123,7 @@
         reinterpret_cast<struct inotify_event*>(buffer + offset);
     if ((e->mask & IN_IGNORED) == 0) {;
       Dart_Handle event = Dart_NewList(5);
-      int mask = 0;
-      if (e->mask & IN_CLOSE_WRITE) mask |= kModifyContent;
-      if (e->mask & IN_ATTRIB) mask |= kModefyAttribute;
-      if (e->mask & IN_CREATE) mask |= kCreate;
-      if (e->mask & IN_MOVE) mask |= kMove;
-      if (e->mask & IN_DELETE) mask |= kDelete;
-      if (e->mask & (IN_DELETE_SELF | IN_MOVE_SELF)) mask |= kDeleteSelf;
-      if (e->mask & IN_ISDIR) mask |= kIsDir;
+      int mask = InotifyEventToMask(e);
       Dart_ListSetAt(event, 0, Dart_NewInteger(mask));
       Dart_ListSetAt(event, 1, Dart_NewInteger(e->cookie));
       if (e->len > 0) {
@@ -117,3 +147,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_LINUX)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index 5c0d430..7bc0e0c 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_MACOS)
 
@@ -19,10 +21,8 @@
 #include "bin/file.h"
 #include "bin/socket.h"
 #include "bin/thread.h"
-
 #include "platform/signal_blocker.h"
 
-
 #ifndef MAC_OS_X_VERSION_10_7
 enum {
   kFSEventStreamCreateFlagFileEvents = 0x00000010
@@ -42,7 +42,6 @@
 };
 #endif
 
-
 namespace dart {
 namespace bin {
 
@@ -55,6 +54,7 @@
   uint8_t bytes[PATH_MAX + 8];
 };
 
+
 class FSEventsWatcher {
  public:
   class Node {
@@ -180,6 +180,8 @@
     int write_fd_;
     bool recursive_;
     FSEventStreamRef ref_;
+
+    DISALLOW_COPY_AND_ASSIGN(Node);
   };
 
 
@@ -287,15 +289,21 @@
                            Thread::GetCurrentThreadId()));
     // `ready` is set on same thread as this callback is invoked, so we don't
     // need to lock here.
-    if (!node->ready()) return;
+    if (!node->ready()) {
+      return;
+    }
     for (size_t i = 0; i < num_events; i++) {
       char *path = reinterpret_cast<char**>(event_paths)[i];
       FSEvent event;
       event.data.exists = File::GetType(path, false) != File::kDoesNotExist;
       path += node->base_path_length();
       // If path is longer the base, skip next character ('/').
-      if (path[0] != '\0') path += 1;
-      if (!node->recursive() && strstr(path, "/") != NULL) continue;
+      if (path[0] != '\0') {
+        path += 1;
+      }
+      if (!node->recursive() && (strstr(path, "/") != NULL)) {
+        continue;
+      }
       event.data.flags = event_flags[i];
       memmove(event.data.path, path, strlen(path) + 1);
       write(node->write_fd(), event.bytes, sizeof(event));
@@ -305,6 +313,8 @@
   Monitor monitor_;
   CFRunLoopRef run_loop_;
   ThreadId threadId_;
+
+  DISALLOW_COPY_AND_ASSIGN(FSEventsWatcher);
 };
 
 
@@ -348,7 +358,9 @@
   intptr_t fd = GetSocketId(id, path_id);
   intptr_t avail = FDUtils::AvailableBytes(fd);
   int count = avail / sizeof(FSEvent);
-  if (count <= 0) return Dart_NewList(0);
+  if (count <= 0) {
+    return Dart_NewList(0);
+  }
   Dart_Handle events = Dart_NewList(count);
   FSEvent e;
   for (int i = 0; i < count; i++) {
@@ -360,7 +372,7 @@
     Dart_Handle event = Dart_NewList(5);
     int flags = e.data.flags;
     int mask = 0;
-    if (flags & kFSEventStreamEventFlagItemRenamed) {
+    if ((flags & kFSEventStreamEventFlagItemRenamed) != 0) {
       if (path_len == 0) {
         // The moved path is the path being watched.
         mask |= kDeleteSelf;
@@ -368,11 +380,19 @@
         mask |= e.data.exists ? kCreate : kDelete;
       }
     }
-    if (flags & kFSEventStreamEventFlagItemModified) mask |= kModifyContent;
-    if (flags & kFSEventStreamEventFlagItemXattrMod) mask |= kModefyAttribute;
-    if (flags & kFSEventStreamEventFlagItemCreated) mask |= kCreate;
-    if (flags & kFSEventStreamEventFlagItemIsDir) mask |= kIsDir;
-    if (flags & kFSEventStreamEventFlagItemRemoved) {
+    if ((flags & kFSEventStreamEventFlagItemModified) != 0) {
+      mask |= kModifyContent;
+    }
+    if ((flags & kFSEventStreamEventFlagItemXattrMod) != 0) {
+      mask |= kModefyAttribute;
+    }
+    if ((flags & kFSEventStreamEventFlagItemCreated) != 0) {
+      mask |= kCreate;
+    }
+    if ((flags & kFSEventStreamEventFlagItemIsDir) != 0) {
+      mask |= kIsDir;
+    }
+    if ((flags & kFSEventStreamEventFlagItemRemoved) != 0) {
       if (path_len == 0) {
         // The removed path is the path being watched.
         mask |= kDeleteSelf;
@@ -404,24 +424,30 @@
   return DartUtils::NewDartOSError();
 }
 
+
 intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) {
   return -1;
 }
 
+
 bool FileSystemWatcher::IsSupported() {
   return false;
 }
 
+
 void FileSystemWatcher::UnwatchPath(intptr_t id, intptr_t path_id) {
 }
 
+
 intptr_t FileSystemWatcher::Init() {
   return -1;
 }
 
+
 void FileSystemWatcher::Close(intptr_t id) {
 }
 
+
 intptr_t FileSystemWatcher::WatchPath(intptr_t id,
                                       const char* path,
                                       int events,
@@ -433,5 +459,6 @@
 }  // namespace dart
 
 #endif  // !TARGET_OS_IOS
-
 #endif  // defined(TARGET_OS_MACOS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/file_system_watcher_unsupported.cc b/runtime/bin/file_system_watcher_unsupported.cc
new file mode 100644
index 0000000..7803215
--- /dev/null
+++ b/runtime/bin/file_system_watcher_unsupported.cc
@@ -0,0 +1,58 @@
+// 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.
+
+#if defined(DART_IO_DISABLED)
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+
+namespace dart {
+namespace bin {
+
+void FUNCTION_NAME(FileSystemWatcher_IsSupported)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "FileSystemWatcher is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(FileSystemWatcher_InitWatcher)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "FileSystemWatcher is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(FileSystemWatcher_CloseWatcher)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "FileSystemWatcher is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(FileSystemWatcher_WatchPath)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "FileSystemWatcher is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(FileSystemWatcher_UnwatchPath)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "FileSystemWatcher is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(FileSystemWatcher_ReadEvents)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "FileSystemWatcher is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(FileSystemWatcher_GetSocketId)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "FileSystemWatcher is not supported on this platform"));
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // defined(DART_IO_DISABLED)
diff --git a/runtime/bin/file_system_watcher_win.cc b/runtime/bin/file_system_watcher_win.cc
index 98642ab..698b049 100644
--- a/runtime/bin/file_system_watcher_win.cc
+++ b/runtime/bin/file_system_watcher_win.cc
@@ -2,20 +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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_WINDOWS)
 
 #include "bin/file_system_watcher.h"
-#include "bin/eventhandler.h"
 
 #include <WinIoCtl.h>  // NOLINT
 
 #include "bin/builtin.h"
+#include "bin/eventhandler.h"
 #include "bin/log.h"
 #include "bin/utils.h"
 #include "bin/utils_win.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -49,18 +50,19 @@
                            OPEN_EXISTING,
                            FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED,
                            NULL);
-  free(const_cast<wchar_t*>(name));
 
   if (dir == INVALID_HANDLE_VALUE) {
     return -1;
   }
 
   int list_events = 0;
-  if (events & (kCreate | kMove | kDelete)) {
+  if ((events & (kCreate | kMove | kDelete)) != 0) {
     list_events |= FILE_NOTIFY_CHANGE_FILE_NAME |
                    FILE_NOTIFY_CHANGE_DIR_NAME;
   }
-  if (events & kModifyContent) list_events |= FILE_NOTIFY_CHANGE_LAST_WRITE;
+  if ((events & kModifyContent) != 0) {
+    list_events |= FILE_NOTIFY_CHANGE_LAST_WRITE;
+  }
 
   DirectoryWatchHandle* handle =
       new DirectoryWatchHandle(dir, list_events, recursive);
@@ -93,7 +95,7 @@
   intptr_t available = dir->Available();
   intptr_t max_count = available / kEventSize + 1;
   Dart_Handle events = Dart_NewList(max_count);
-  uint8_t* buffer = new uint8_t[available];
+  uint8_t* buffer = Dart_ScopeAllocate(available);
   intptr_t bytes = dir->Read(buffer, available);
   intptr_t offset = 0;
   intptr_t i = 0;
@@ -103,11 +105,21 @@
 
     Dart_Handle event = Dart_NewList(5);
     int mask = 0;
-    if (e->Action == FILE_ACTION_ADDED) mask |= kCreate;
-    if (e->Action == FILE_ACTION_REMOVED) mask |= kDelete;
-    if (e->Action == FILE_ACTION_MODIFIED) mask |= kModifyContent;
-    if (e->Action == FILE_ACTION_RENAMED_OLD_NAME) mask |= kMove;
-    if (e->Action == FILE_ACTION_RENAMED_NEW_NAME) mask |= kMove;
+    if (e->Action == FILE_ACTION_ADDED) {
+      mask |= kCreate;
+    }
+    if (e->Action == FILE_ACTION_REMOVED) {
+      mask |= kDelete;
+    }
+    if (e->Action == FILE_ACTION_MODIFIED) {
+      mask |= kModifyContent;
+    }
+    if (e->Action == FILE_ACTION_RENAMED_OLD_NAME) {
+      mask |= kMove;
+    }
+    if (e->Action == FILE_ACTION_RENAMED_NEW_NAME) {
+      mask |= kMove;
+    }
     Dart_ListSetAt(event, 0, Dart_NewInteger(mask));
     // Move events come in pairs. Just 'enable' by default.
     Dart_ListSetAt(event, 1, Dart_NewInteger(1));
@@ -117,10 +129,11 @@
     Dart_ListSetAt(event, 4, Dart_NewInteger(path_id));
     Dart_ListSetAt(events, i, event);
     i++;
-    if (e->NextEntryOffset == 0) break;
+    if (e->NextEntryOffset == 0) {
+      break;
+    }
     offset += e->NextEntryOffset;
   }
-  delete[] buffer;
   return events;
 }
 
@@ -128,3 +141,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_WINDOWS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/file_test.cc b/runtime/bin/file_test.cc
index 20c6bf7..518e6e5 100644
--- a/runtime/bin/file_test.cc
+++ b/runtime/bin/file_test.cc
@@ -7,7 +7,6 @@
 #include "platform/globals.h"
 #include "vm/unit_test.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -23,7 +22,7 @@
 }
 
 
-UNIT_TEST_CASE(Read) {
+TEST_CASE(Read) {
   const char* kFilename = GetFileName("runtime/bin/file_test.cc");
   File* file = File::Open(kFilename, File::kRead);
   EXPECT(file != NULL);
@@ -37,7 +36,7 @@
 }
 
 
-UNIT_TEST_CASE(FileLength) {
+TEST_CASE(FileLength) {
   const char* kFilename =
       GetFileName("runtime/tests/vm/data/fixed_length_file");
   File* file = File::Open(kFilename, File::kRead);
@@ -47,7 +46,7 @@
 }
 
 
-UNIT_TEST_CASE(FilePosition) {
+TEST_CASE(FilePosition) {
   char buf[42];
   const char* kFilename =
       GetFileName("runtime/tests/vm/data/fixed_length_file");
diff --git a/runtime/bin/file_unsupported.cc b/runtime/bin/file_unsupported.cc
new file mode 100644
index 0000000..2655f77
--- /dev/null
+++ b/runtime/bin/file_unsupported.cc
@@ -0,0 +1,202 @@
+// 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.
+
+#if defined(DART_IO_DISABLED)
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+
+namespace dart {
+namespace bin {
+
+void FUNCTION_NAME(File_Open)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Exists)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Close)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_GetFD)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_ReadByte)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_WriteByte)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Read)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_ReadInto)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_WriteFrom)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Position)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_SetPosition)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Truncate)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Length)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_LengthFromPath)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_LastModified)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Flush)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Lock)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Create)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_CreateLink)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_LinkTarget)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Delete)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_DeleteLink)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Rename)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_RenameLink)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Copy)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_ResolveSymbolicLinks)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_OpenStdio)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_GetStdioHandleType)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_GetType)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_Stat)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(File_AreIdentical)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "File is not supported on this platform"));
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index 54cd64d..054370a 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -20,7 +20,6 @@
 #include "bin/utils_win.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -46,7 +45,8 @@
 
 void File::Close() {
   ASSERT(handle_->fd() >= 0);
-  if (handle_->fd() == _fileno(stdout) || handle_->fd() == _fileno(stderr)) {
+  if ((handle_->fd() == _fileno(stdout)) ||
+      (handle_->fd() == _fileno(stderr))) {
     int fd = _open("NUL", _O_WRONLY);
     ASSERT(fd >= 0);
     _dup2(fd, handle_->fd());
@@ -109,7 +109,7 @@
 
 bool File::Lock(File::LockType lock, int64_t start, int64_t end) {
   ASSERT(handle_->fd() >= 0);
-  ASSERT(end == -1 || end > start);
+  ASSERT((end == -1) || (end > start));
   HANDLE handle = reinterpret_cast<HANDLE>(_get_osfhandle(handle_->fd()));
   OVERLAPPED overlapped;
   ZeroMemory(&overlapped, sizeof(OVERLAPPED));
@@ -118,11 +118,12 @@
   overlapped.OffsetHigh = Utils::High32Bits(start);
 
   int64_t length = end == -1 ? 0 : end - start;
-  if (length == 0) length = kMaxInt64;
+  if (length == 0) {
+    length = kMaxInt64;
+  }
   int32_t length_low = Utils::Low32Bits(length);
   int32_t length_high = Utils::High32Bits(length);
 
-
   BOOL rc;
   switch (lock) {
     case File::kLockUnlock:
@@ -155,7 +156,7 @@
 }
 
 
-File* File::Open(const char* name, FileOpenMode mode) {
+File* File::FileOpenW(const wchar_t* system_name, FileOpenMode mode) {
   int flags = O_RDONLY | O_BINARY | O_NOINHERIT;
   if ((mode & kWrite) != 0) {
     ASSERT((mode & kWriteOnly) == 0);
@@ -168,9 +169,7 @@
   if ((mode & kTruncate) != 0) {
     flags = flags | O_TRUNC;
   }
-  const wchar_t* system_name = StringUtilsWin::Utf8ToWide(name);
   int fd = _wopen(system_name, flags, 0666);
-  free(const_cast<wchar_t*>(system_name));
   if (fd < 0) {
     return NULL;
   }
@@ -185,6 +184,25 @@
 }
 
 
+File* File::ScopedOpen(const char* name, FileOpenMode mode) {
+  const wchar_t* system_name = StringUtilsWin::Utf8ToWide(name);
+  return FileOpenW(system_name, mode);
+}
+
+
+File* File::Open(const char* path, FileOpenMode mode) {
+  int path_len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
+  wchar_t* system_name = new wchar_t[path_len];
+  if (system_name == NULL) {
+    return NULL;
+  }
+  MultiByteToWideChar(CP_UTF8, 0, path, -1, system_name, path_len);
+  File* file = FileOpenW(system_name, mode);
+  delete[] system_name;
+  return file;
+}
+
+
 File* File::OpenStdio(int fd) {
   switch (fd) {
     case 1:
@@ -205,7 +223,6 @@
   struct __stat64 st;
   const wchar_t* system_name = StringUtilsWin::Utf8ToWide(name);
   bool stat_status = _wstat64(system_name, &st);
-  free(const_cast<wchar_t*>(system_name));
   if (stat_status == 0) {
     return ((st.st_mode & S_IFMT) == S_IFREG);
   } else {
@@ -217,7 +234,6 @@
 bool File::Create(const char* name) {
   const wchar_t* system_name = StringUtilsWin::Utf8ToWide(name);
   int fd = _wopen(system_name, O_RDONLY | O_CREAT, 0666);
-  free(const_cast<wchar_t*>(system_name));
   if (fd < 0) {
     return false;
   }
@@ -264,10 +280,9 @@
   const wchar_t* name = StringUtilsWin::Utf8ToWide(utf8_name);
   int create_status = CreateDirectoryW(name, NULL);
   // If the directory already existed, treat it as a success.
-  if (create_status == 0 &&
-      (GetLastError() != ERROR_ALREADY_EXISTS ||
-       (GetFileAttributesW(name) & FILE_ATTRIBUTE_DIRECTORY) != 0)) {
-    free(const_cast<wchar_t*>(name));
+  if ((create_status == 0) &&
+      ((GetLastError() != ERROR_ALREADY_EXISTS) ||
+       ((GetFileAttributesW(name) & FILE_ATTRIBUTE_DIRECTORY) != 0))) {
     return false;
   }
 
@@ -279,7 +294,6 @@
       OPEN_EXISTING,
       FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
       NULL);
-  free(const_cast<wchar_t*>(name));
   if (dir_handle == INVALID_HANDLE_VALUE) {
     return false;
   }
@@ -287,7 +301,6 @@
   const wchar_t* target = StringUtilsWin::Utf8ToWide(utf8_target);
   int target_len = wcslen(target);
   if (target_len > MAX_PATH - 1) {
-    free(const_cast<wchar_t*>(target));
     CloseHandle(dir_handle);
     return false;
   }
@@ -295,7 +308,8 @@
   int reparse_data_buffer_size =
       sizeof REPARSE_DATA_BUFFER + 2 * MAX_PATH * sizeof WCHAR;
   REPARSE_DATA_BUFFER* reparse_data_buffer =
-      static_cast<REPARSE_DATA_BUFFER*>(calloc(reparse_data_buffer_size, 1));
+      reinterpret_cast<REPARSE_DATA_BUFFER*>(Dart_ScopeAllocate(
+          reparse_data_buffer_size));
   reparse_data_buffer->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
   wcscpy(reparse_data_buffer->MountPointReparseBuffer.PathBuffer, target);
   wcscpy(
@@ -320,9 +334,9 @@
       0,
       &dummy_received_bytes,
       NULL);
-  if (CloseHandle(dir_handle) == 0) return false;
-  free(const_cast<wchar_t*>(target));
-  free(reparse_data_buffer);
+  if (CloseHandle(dir_handle) == 0) {
+    return false;
+  }
   return (result != 0);
 }
 
@@ -330,7 +344,6 @@
 bool File::Delete(const char* name) {
   const wchar_t* system_name = StringUtilsWin::Utf8ToWide(name);
   int status = _wremove(system_name);
-  free(const_cast<wchar_t*>(system_name));
   return status != -1;
 }
 
@@ -346,7 +359,6 @@
   } else {
     SetLastError(ERROR_NOT_A_REPARSE_POINT);
   }
-  free(const_cast<wchar_t*>(system_name));
   return result;
 }
 
@@ -359,8 +371,6 @@
     DWORD flags = MOVEFILE_WRITE_THROUGH | MOVEFILE_REPLACE_EXISTING;
     int move_status =
         MoveFileExW(system_old_path, system_new_path, flags);
-    free(const_cast<wchar_t*>(system_old_path));
-    free(const_cast<wchar_t*>(system_new_path));
     return (move_status != 0);
   } else {
     SetLastError(ERROR_FILE_NOT_FOUND);
@@ -377,8 +387,6 @@
     DWORD flags = MOVEFILE_WRITE_THROUGH | MOVEFILE_REPLACE_EXISTING;
     int move_status =
         MoveFileExW(system_old_path, system_new_path, flags);
-    free(const_cast<wchar_t*>(system_old_path));
-    free(const_cast<wchar_t*>(system_new_path));
     return (move_status != 0);
   } else {
     SetLastError(ERROR_FILE_NOT_FOUND);
@@ -398,8 +406,6 @@
                                NULL,
                                NULL,
                                0) != 0;
-    free(const_cast<wchar_t*>(system_old_path));
-    free(const_cast<wchar_t*>(system_new_path));
     return success;
   } else {
     SetLastError(ERROR_FILE_NOT_FOUND);
@@ -412,7 +418,6 @@
   struct __stat64 st;
   const wchar_t* system_name = StringUtilsWin::Utf8ToWide(name);
   int stat_status = _wstat64(system_name, &st);
-  free(const_cast<wchar_t*>(system_name));
   if (stat_status == 0) {
     return st.st_size;
   }
@@ -420,7 +425,7 @@
 }
 
 
-char* File::LinkTarget(const char* pathname) {
+const char* File::LinkTarget(const char* pathname) {
   const wchar_t* name = StringUtilsWin::Utf8ToWide(pathname);
   HANDLE dir_handle = CreateFileW(
       name,
@@ -430,15 +435,14 @@
       OPEN_EXISTING,
       FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
       NULL);
-  free(const_cast<wchar_t*>(name));
   if (dir_handle == INVALID_HANDLE_VALUE) {
     return NULL;
   }
 
   int buffer_size =
       sizeof REPARSE_DATA_BUFFER + 2 * (MAX_PATH + 1) * sizeof WCHAR;
-  REPARSE_DATA_BUFFER* buffer =
-      static_cast<REPARSE_DATA_BUFFER*>(calloc(buffer_size, 1));
+  REPARSE_DATA_BUFFER* buffer = reinterpret_cast<REPARSE_DATA_BUFFER*>(
+      Dart_ScopeAllocate(buffer_size));
   DWORD received_bytes;  // Value is not used.
   int result = DeviceIoControl(
       dir_handle,
@@ -453,11 +457,9 @@
     DWORD error = GetLastError();
     CloseHandle(dir_handle);
     SetLastError(error);
-    free(buffer);
     return NULL;
   }
   if (CloseHandle(dir_handle) == 0) {
-    free(buffer);
     return NULL;
   }
 
@@ -473,7 +475,6 @@
     target_offset = buffer->SymbolicLinkReparseBuffer.SubstituteNameOffset;
     target_length = buffer->SymbolicLinkReparseBuffer.SubstituteNameLength;
   } else {  // Not a junction or a symbolic link.
-    free(buffer);
     SetLastError(ERROR_NOT_A_REPARSE_POINT);
     return NULL;
   }
@@ -482,7 +483,7 @@
   target_length /= sizeof(wchar_t);
   target += target_offset;
   // Remove "\??\" from beginning of target.
-  if (target_length > 4 && wcsncmp(L"\\??\\", target, 4) == 0) {
+  if ((target_length > 4) && (wcsncmp(L"\\??\\", target, 4) == 0)) {
     target += 4;
     target_length -= 4;
   }
@@ -494,7 +495,7 @@
                                         0,
                                         NULL,
                                         NULL);
-  char* utf8_target = reinterpret_cast<char*>(malloc(utf8_length + 1));
+  char* utf8_target = DartUtils::ScopedCString(utf8_length + 1);
   if (0 == WideCharToMultiByte(CP_UTF8,
                                0,
                                target,
@@ -503,12 +504,9 @@
                                utf8_length,
                                NULL,
                                NULL)) {
-    free(buffer);
-    free(utf8_target);
     return NULL;
   }
   utf8_target[utf8_length] = '\0';
-  free(buffer);
   return utf8_target;
 }
 
@@ -520,7 +518,6 @@
     struct _stat64 st;
     const wchar_t* system_name = StringUtilsWin::Utf8ToWide(name);
     int stat_status = _wstat64(system_name, &st);
-    free(const_cast<wchar_t*>(system_name));
     if (stat_status == 0) {
       data[kCreatedTime] = st.st_ctime * 1000;
       data[kModifiedTime] = st.st_mtime * 1000;
@@ -538,7 +535,6 @@
   struct __stat64 st;
   const wchar_t* system_name = StringUtilsWin::Utf8ToWide(name);
   int stat_status = _wstat64(system_name, &st);
-  free(const_cast<wchar_t*>(system_name));
   if (stat_status == 0) {
     return st.st_mtime;
   }
@@ -548,14 +544,16 @@
 
 bool File::IsAbsolutePath(const char* pathname) {
   // Should we consider network paths?
-  if (pathname == NULL) return false;
-  return (strlen(pathname) > 2) &&
+  if (pathname == NULL) {
+    return false;
+  }
+  return ((strlen(pathname) > 2) &&
       (pathname[1] == ':') &&
-      (pathname[2] == '\\' || pathname[2] == '/');
+      ((pathname[2] == '\\') || (pathname[2] == '/')));
 }
 
 
-char* File::GetCanonicalPath(const char* pathname) {
+const char* File::GetCanonicalPath(const char* pathname) {
   const wchar_t* system_name = StringUtilsWin::Utf8ToWide(pathname);
   HANDLE file_handle = CreateFileW(
         system_name,
@@ -566,7 +564,6 @@
         FILE_FLAG_BACKUP_SEMANTICS,
         NULL);
   if (file_handle == INVALID_HANDLE_VALUE) {
-    free(const_cast<wchar_t*>(system_name));
     return NULL;
   }
   wchar_t dummy_buffer[1];
@@ -575,14 +572,14 @@
                                                0,
                                                VOLUME_NAME_DOS);
   if (required_size == 0) {
-    free(const_cast<wchar_t*>(system_name));
     DWORD error = GetLastError();
     CloseHandle(file_handle);
     SetLastError(error);
     return NULL;
   }
-  wchar_t* path =
-      static_cast<wchar_t*>(malloc(required_size * sizeof(wchar_t)));
+  wchar_t* path;
+  path = reinterpret_cast<wchar_t*>(
+      Dart_ScopeAllocate(required_size * sizeof(*path)));
   int result_size = GetFinalPathNameByHandle(file_handle,
                                              path,
                                              required_size,
@@ -590,16 +587,14 @@
   ASSERT(result_size <= required_size - 1);
   // Remove leading \\?\ if possible, unless input used it.
   char* result;
-  if (result_size < MAX_PATH - 1 + 4 &&
-      result_size > 4 &&
-      wcsncmp(path, L"\\\\?\\", 4) == 0 &&
-      wcsncmp(system_name, L"\\\\?\\", 4) != 0) {
+  if ((result_size < MAX_PATH - 1 + 4) &&
+      (result_size > 4) &&
+      (wcsncmp(path, L"\\\\?\\", 4) == 0) &&
+      (wcsncmp(system_name, L"\\\\?\\", 4) != 0)) {
     result = StringUtilsWin::WideToUtf8(path + 4);
   } else {
     result = StringUtilsWin::WideToUtf8(path);
   }
-  free(const_cast<wchar_t*>(system_name));
-  free(path);
   CloseHandle(file_handle);
   return result;
 }
@@ -652,7 +647,6 @@
   } else if ((attributes & FILE_ATTRIBUTE_DIRECTORY) != 0) {
     result = kIsDirectory;
   }
-  free(const_cast<wchar_t*>(name));
   return result;
 }
 
@@ -671,10 +665,8 @@
         FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
         NULL);
     if (file_handle == INVALID_HANDLE_VALUE) {
-      free(const_cast<wchar_t*>(wide_name));
       return File::kError;
     }
-    free(const_cast<wchar_t*>(wide_name));
     int result = GetFileInformationByHandle(file_handle, &file_info[i]);
     if (result == 0) {
       DWORD error = GetLastError();
@@ -686,9 +678,10 @@
       return File::kError;
     }
   }
-  if (file_info[0].dwVolumeSerialNumber == file_info[1].dwVolumeSerialNumber &&
-      file_info[0].nFileIndexHigh == file_info[1].nFileIndexHigh &&
-      file_info[0].nFileIndexLow == file_info[1].nFileIndexLow) {
+  if ((file_info[0].dwVolumeSerialNumber ==
+          file_info[1].dwVolumeSerialNumber) &&
+      (file_info[0].nFileIndexHigh == file_info[1].nFileIndexHigh) &&
+      (file_info[0].nFileIndexLow == file_info[1].nFileIndexLow)) {
     return kIdentical;
   } else {
     return kDifferent;
diff --git a/runtime/bin/filter.cc b/runtime/bin/filter.cc
index 5e87f62..60887ef 100644
--- a/runtime/bin/filter.cc
+++ b/runtime/bin/filter.cc
@@ -2,8 +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.
 
-#include "bin/dartutils.h"
+#if !defined(DART_IO_DISABLED)
+
 #include "bin/filter.h"
+
+#include "bin/dartutils.h"
 #include "bin/io_buffer.h"
 
 #include "include/dart_api.h"
@@ -16,90 +19,103 @@
 
 static const int kFilterPointerNativeField = 0;
 
-static Filter* GetFilter(Dart_Handle filter_obj) {
-  Filter* filter;
-  Dart_Handle result = Filter::GetFilterPointerNativeField(filter_obj, &filter);
-  if (Dart_IsError(result)) {
-    Dart_PropagateError(result);
+static Dart_Handle GetFilter(Dart_Handle filter_obj, Filter** filter) {
+  ASSERT(filter != NULL);
+  Filter* result;
+  Dart_Handle err = Filter::GetFilterNativeField(filter_obj, &result);
+  if (Dart_IsError(err)) {
+    return err;
   }
-  if (filter == NULL) {
-    Dart_ThrowException(DartUtils::NewInternalError("Filter destroyed"));
+  if (result == NULL) {
+    return Dart_NewApiError("Filter was destroyed");
   }
-  return filter;
+
+  *filter = result;
+  return Dart_Null();
 }
 
-static void EndFilter(Dart_Handle filter_obj, Filter* filter) {
-  Filter::SetFilterPointerNativeField(filter_obj, NULL);
-  delete filter;
-}
 
-static uint8_t* copyDictionary(Dart_Handle dictionary_obj) {
+static Dart_Handle CopyDictionary(Dart_Handle dictionary_obj,
+                                  uint8_t** dictionary) {
+  ASSERT(dictionary != NULL);
   uint8_t* src = NULL;
   intptr_t size;
   Dart_TypedData_Type type;
 
-  if (Dart_IsError(Dart_ListLength(dictionary_obj, &size))) {
-    Dart_ThrowException(DartUtils::NewInternalError(
-        "Failed to get the zlib dictionary length"));
+  Dart_Handle err = Dart_ListLength(dictionary_obj, &size);
+  if (Dart_IsError(err)) {
+    return err;
   }
 
-  uint8_t* dictionary = new uint8_t[size];
-
-  if (dictionary == NULL) {
-    Dart_ThrowException(DartUtils::NewInternalError(
-        "Failed to allocate buffer for the zlib dictionary"));
+  uint8_t* result = new uint8_t[size];
+  if (result == NULL) {
+    return Dart_NewApiError("Could not allocate new dictionary");
   }
 
-  Dart_Handle result = Dart_TypedDataAcquireData(
+  err = Dart_TypedDataAcquireData(
       dictionary_obj, &type, reinterpret_cast<void**>(&src), &size);
-  if (!Dart_IsError(result)) {
-    memmove(dictionary, src, size);
+  if (!Dart_IsError(err)) {
+    memmove(result, src, size);
     Dart_TypedDataReleaseData(dictionary_obj);
   } else {
-    if (Dart_IsError(Dart_ListGetAsBytes(dictionary_obj, 0, dictionary,
-                                         size))) {
-      Dart_ThrowException(DartUtils::NewInternalError(
-          "Failed to get the zlib dictionary"));
+    err = Dart_ListGetAsBytes(dictionary_obj, 0, result, size);
+    if (Dart_IsError(err)) {
+      delete[] result;
+      return err;
     }
   }
 
-  return dictionary;
+  *dictionary = result;
+  return Dart_Null();
 }
 
+
 void FUNCTION_NAME(Filter_CreateZLibInflate)(Dart_NativeArguments args) {
   Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
   Dart_Handle window_bits_obj = Dart_GetNativeArgument(args, 1);
   int64_t window_bits = DartUtils::GetIntegerValue(window_bits_obj);
   Dart_Handle dict_obj = Dart_GetNativeArgument(args, 2);
+  Dart_Handle raw_obj = Dart_GetNativeArgument(args, 3);
+  bool raw = DartUtils::GetBooleanValue(raw_obj);
+
+  Dart_Handle err;
   uint8_t* dictionary = NULL;
   intptr_t dictionary_length = 0;
   if (!Dart_IsNull(dict_obj)) {
-    dictionary = copyDictionary(dict_obj);
-    if (dictionary != NULL) {
-      dictionary_length = 0;
-      Dart_ListLength(dict_obj, &dictionary_length);
+    err = CopyDictionary(dict_obj, &dictionary);
+    if (Dart_IsError(err)) {
+      Dart_PropagateError(err);
+    }
+    ASSERT(dictionary != NULL);
+    dictionary_length = 0;
+    err = Dart_ListLength(dict_obj, &dictionary_length);
+    if (Dart_IsError(err)) {
+      delete[] dictionary;
+      Dart_PropagateError(err);
     }
   }
-  Dart_Handle raw_obj = Dart_GetNativeArgument(args, 3);
-  bool raw;
-  if (Dart_IsError(Dart_BooleanValue(raw_obj, &raw))) {
-    Dart_ThrowException(DartUtils::NewInternalError(
-        "Failed to get 'raw' parameter"));
+
+  ZLibInflateFilter* filter = new ZLibInflateFilter(
+      static_cast<int32_t>(window_bits), dictionary, dictionary_length, raw);
+  if (filter == NULL) {
+    delete[] dictionary;
+    Dart_PropagateError(Dart_NewApiError(
+        "Could not allocate ZLibInflateFilter"));
   }
-  Filter* filter = new ZLibInflateFilter(static_cast<int32_t>(window_bits),
-                                         dictionary, dictionary_length, raw);
   if (!filter->Init()) {
     delete filter;
     Dart_ThrowException(DartUtils::NewInternalError(
         "Failed to create ZLibInflateFilter"));
   }
-  Dart_Handle result = Filter::SetFilterPointerNativeField(filter_obj, filter);
-  if (Dart_IsError(result)) {
+  err = Filter::SetFilterAndCreateFinalizer(
+      filter_obj, filter, sizeof(*filter) + dictionary_length);
+  if (Dart_IsError(err)) {
     delete filter;
-    Dart_PropagateError(result);
+    Dart_PropagateError(err);
   }
 }
 
+
 void FUNCTION_NAME(Filter_CreateZLibDeflate)(Dart_NativeArguments args) {
   Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
   Dart_Handle gzip_obj = Dart_GetNativeArgument(args, 1);
@@ -114,37 +130,54 @@
   Dart_Handle strategy_obj = Dart_GetNativeArgument(args, 5);
   int64_t strategy = DartUtils::GetIntegerValue(strategy_obj);
   Dart_Handle dict_obj = Dart_GetNativeArgument(args, 6);
+  Dart_Handle raw_obj = Dart_GetNativeArgument(args, 7);
+  bool raw = DartUtils::GetBooleanValue(raw_obj);
+
+  Dart_Handle err;
   uint8_t* dictionary = NULL;
   intptr_t dictionary_length = 0;
   if (!Dart_IsNull(dict_obj)) {
-    dictionary = copyDictionary(dict_obj);
-    if (dictionary != NULL) {
-      dictionary_length = 0;
-      Dart_ListLength(dict_obj, &dictionary_length);
+    err = CopyDictionary(dict_obj, &dictionary);
+    if (Dart_IsError(err)) {
+      Dart_PropagateError(err);
+    }
+    ASSERT(dictionary != NULL);
+    dictionary_length = 0;
+    err = Dart_ListLength(dict_obj, &dictionary_length);
+    if (Dart_IsError(err)) {
+      delete[] dictionary;
+      Dart_PropagateError(err);
     }
   }
-  Dart_Handle raw_obj = Dart_GetNativeArgument(args, 7);
-  bool raw = DartUtils::GetBooleanValue(raw_obj);
-  Filter* filter = new ZLibDeflateFilter(gzip, static_cast<int32_t>(level),
-                                         static_cast<int32_t>(window_bits),
-                                         static_cast<int32_t>(mem_level),
-                                         static_cast<int32_t>(strategy),
-                                         dictionary, dictionary_length, raw);
+
+  ZLibDeflateFilter* filter = new ZLibDeflateFilter(
+      gzip,
+      static_cast<int32_t>(level),
+      static_cast<int32_t>(window_bits),
+      static_cast<int32_t>(mem_level),
+      static_cast<int32_t>(strategy),
+      dictionary, dictionary_length, raw);
+  if (filter == NULL) {
+    delete[] dictionary;
+    Dart_PropagateError(Dart_NewApiError(
+        "Could not allocate ZLibDeflateFilter"));
+  }
   if (!filter->Init()) {
     delete filter;
     Dart_ThrowException(DartUtils::NewInternalError(
         "Failed to create ZLibDeflateFilter"));
   }
-  Dart_Handle result = Filter::SetFilterPointerNativeField(filter_obj, filter);
+  Dart_Handle result = Filter::SetFilterAndCreateFinalizer(
+      filter_obj, filter, sizeof(*filter) + dictionary_length);
   if (Dart_IsError(result)) {
     delete filter;
     Dart_PropagateError(result);
   }
 }
 
+
 void FUNCTION_NAME(Filter_Process)(Dart_NativeArguments args) {
   Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
-  Filter* filter = GetFilter(filter_obj);
   Dart_Handle data_obj = Dart_GetNativeArgument(args, 1);
   intptr_t start = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 2));
   intptr_t end = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 3));
@@ -152,9 +185,15 @@
   intptr_t length;
   Dart_TypedData_Type type;
   uint8_t* buffer = NULL;
+
+  Filter* filter = NULL;
+  Dart_Handle err = GetFilter(filter_obj, &filter);
+  if (Dart_IsError(err)) {
+    Dart_PropagateError(err);
+  }
+
   Dart_Handle result = Dart_TypedDataAcquireData(
       data_obj, &type, reinterpret_cast<void**>(&buffer), &length);
-
   if (!Dart_IsError(result)) {
     ASSERT(type == Dart_TypedData_kUint8 || type == Dart_TypedData_kInt8);
     if (type != Dart_TypedData_kUint8 && type != Dart_TypedData_kInt8) {
@@ -165,29 +204,30 @@
     uint8_t* zlib_buffer = new uint8_t[chunk_length];
     if (zlib_buffer == NULL) {
       Dart_TypedDataReleaseData(data_obj);
-      Dart_ThrowException(DartUtils::NewInternalError(
-          "Failed to allocate buffer for zlib"));
+      Dart_PropagateError(Dart_NewApiError("Could not allocate zlib buffer"));
     }
+
     memmove(zlib_buffer, buffer + start, chunk_length);
     Dart_TypedDataReleaseData(data_obj);
     buffer = zlib_buffer;
   } else {
-    if (Dart_IsError(Dart_ListLength(data_obj, &length))) {
-      Dart_ThrowException(DartUtils::NewInternalError(
-          "Failed to get list length"));
+    err = Dart_ListLength(data_obj, &length);
+    if (Dart_IsError(err)) {
+      Dart_PropagateError(err);
     }
     buffer = new uint8_t[chunk_length];
-    if (Dart_IsError(Dart_ListGetAsBytes(
-            data_obj, start, buffer, chunk_length))) {
+    if (buffer == NULL) {
+      Dart_PropagateError(Dart_NewApiError("Could not allocate buffer"));
+    }
+    err = Dart_ListGetAsBytes(data_obj, start, buffer, chunk_length);
+    if (Dart_IsError(err)) {
       delete[] buffer;
-      Dart_ThrowException(DartUtils::NewInternalError(
-          "Failed to get list bytes"));
+      Dart_PropagateError(err);
     }
   }
   // Process will take ownership of buffer, if successful.
   if (!filter->Process(buffer, chunk_length)) {
     delete[] buffer;
-    EndFilter(filter_obj, filter);
     Dart_ThrowException(DartUtils::NewInternalError(
         "Call to Process while still processing data"));
   }
@@ -196,26 +236,22 @@
 
 void FUNCTION_NAME(Filter_Processed)(Dart_NativeArguments args) {
   Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
-  Filter* filter = GetFilter(filter_obj);
   Dart_Handle flush_obj = Dart_GetNativeArgument(args, 1);
-  bool flush;
-  if (Dart_IsError(Dart_BooleanValue(flush_obj, &flush))) {
-    Dart_ThrowException(DartUtils::NewInternalError(
-        "Failed to get 'flush' parameter"));
-  }
+  bool flush = DartUtils::GetBooleanValue(flush_obj);
   Dart_Handle end_obj = Dart_GetNativeArgument(args, 2);
-  bool end;
-  if (Dart_IsError(Dart_BooleanValue(end_obj, &end))) {
-    Dart_ThrowException(DartUtils::NewInternalError(
-        "Failed to get 'end' parameter"));
+  bool end = DartUtils::GetBooleanValue(end_obj);
+
+  Filter* filter = NULL;
+  Dart_Handle err = GetFilter(filter_obj, &filter);
+  if (Dart_IsError(err)) {
+    Dart_PropagateError(err);
   }
+
   intptr_t read = filter->Processed(filter->processed_buffer(),
                                     filter->processed_buffer_size(),
                                     flush,
                                     end);
   if (read < 0) {
-    // Error, end filter.
-    EndFilter(filter_obj, filter);
     Dart_ThrowException(DartUtils::NewInternalError(
         "Filter error, bad data"));
   } else if (read == 0) {
@@ -229,24 +265,35 @@
 }
 
 
-void FUNCTION_NAME(Filter_End)(Dart_NativeArguments args) {
-  Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
-  Filter* filter = GetFilter(filter_obj);
-  EndFilter(filter_obj, filter);
+static void DeleteFilter(
+    void* isolate_data,
+    Dart_WeakPersistentHandle handle,
+    void* filter_pointer) {
+  Filter* filter = reinterpret_cast<Filter*>(filter_pointer);
+  delete filter;
 }
 
 
-Dart_Handle Filter::SetFilterPointerNativeField(Dart_Handle filter,
-                                                Filter* filter_pointer) {
-  return Dart_SetNativeInstanceField(
+Dart_Handle Filter::SetFilterAndCreateFinalizer(Dart_Handle filter,
+                                                Filter* filter_pointer,
+                                                intptr_t size) {
+  Dart_Handle err = Dart_SetNativeInstanceField(
       filter,
       kFilterPointerNativeField,
       reinterpret_cast<intptr_t>(filter_pointer));
+  if (Dart_IsError(err)) {
+    return err;
+  }
+  Dart_NewWeakPersistentHandle(filter,
+                               reinterpret_cast<void*>(filter_pointer),
+                               size,
+                               DeleteFilter);
+  return err;
 }
 
 
-Dart_Handle Filter::GetFilterPointerNativeField(Dart_Handle filter,
-                                                Filter** filter_pointer) {
+Dart_Handle Filter::GetFilterNativeField(Dart_Handle filter,
+                                         Filter** filter_pointer) {
   return Dart_GetNativeInstanceField(
       filter,
       kFilterPointerNativeField,
@@ -257,7 +304,9 @@
 ZLibDeflateFilter::~ZLibDeflateFilter() {
   delete[] dictionary_;
   delete[] current_buffer_;
-  if (initialized()) deflateEnd(&stream_);
+  if (initialized()) {
+    deflateEnd(&stream_);
+  }
 }
 
 
@@ -277,7 +326,7 @@
   if (result != Z_OK) {
     return false;
   }
-  if (dictionary_ != NULL && !gzip_ && !raw_) {
+  if ((dictionary_ != NULL) && !gzip_ && !raw_) {
     result = deflateSetDictionary(&stream_, dictionary_, dictionary_length_);
     delete[] dictionary_;
     dictionary_ = NULL;
@@ -291,7 +340,9 @@
 
 
 bool ZLibDeflateFilter::Process(uint8_t* data, intptr_t length) {
-  if (current_buffer_ != NULL) return false;
+  if (current_buffer_ != NULL) {
+    return false;
+  }
   stream_.avail_in = length;
   stream_.next_in = current_buffer_ = data;
   return true;
@@ -331,7 +382,9 @@
 ZLibInflateFilter::~ZLibInflateFilter() {
   delete[] dictionary_;
   delete[] current_buffer_;
-  if (initialized()) inflateEnd(&stream_);
+  if (initialized()) {
+    inflateEnd(&stream_);
+  }
 }
 
 
@@ -355,7 +408,9 @@
 
 
 bool ZLibInflateFilter::Process(uint8_t* data, intptr_t length) {
-  if (current_buffer_ != NULL) return false;
+  if (current_buffer_ != NULL) {
+    return false;
+  }
   stream_.avail_in = length;
   stream_.next_in = current_buffer_ = data;
   return true;
@@ -413,3 +468,5 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/filter.h b/runtime/bin/filter.h
index 2dad3ca..28c229f 100644
--- a/runtime/bin/filter.h
+++ b/runtime/bin/filter.h
@@ -5,12 +5,15 @@
 #ifndef BIN_FILTER_H_
 #define BIN_FILTER_H_
 
+#if defined(DART_IO_DISABLED)
+#error "filter.h can only be included on builds with IO enabled"
+#endif
+
 #include "bin/builtin.h"
 #include "bin/utils.h"
 
 #include "zlib/zlib.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -29,10 +32,11 @@
   virtual intptr_t Processed(uint8_t* buffer, intptr_t length, bool finish,
                              bool end) = 0;
 
-  static Dart_Handle SetFilterPointerNativeField(Dart_Handle filter,
-                                                 Filter* filter_pointer);
-  static Dart_Handle GetFilterPointerNativeField(Dart_Handle filter,
-                                                 Filter** filter_pointer);
+  static Dart_Handle SetFilterAndCreateFinalizer(Dart_Handle filter,
+                                                 Filter* filter_pointer,
+                                                 intptr_t filter_size);
+  static Dart_Handle GetFilterNativeField(Dart_Handle filter,
+                                          Filter** filter_pointer);
 
   bool initialized() const { return initialized_; }
   void set_initialized(bool value) { initialized_ = value; }
diff --git a/runtime/bin/filter_patch.dart b/runtime/bin/filter_patch.dart
index 3a32170..a5626bb 100644
--- a/runtime/bin/filter_patch.dart
+++ b/runtime/bin/filter_patch.dart
@@ -8,8 +8,6 @@
 
   List<int> processed({bool flush: true, bool end: false})
       native "Filter_Processed";
-
-  void end() native "Filter_End";
 }
 
 class _ZLibInflateFilter extends _FilterImpl {
diff --git a/runtime/bin/filter_unsupported.cc b/runtime/bin/filter_unsupported.cc
index 1742559..37d7b6f 100644
--- a/runtime/bin/filter_unsupported.cc
+++ b/runtime/bin/filter_unsupported.cc
@@ -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.
 
+#if defined(DART_IO_DISABLED)
+
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
-
 #include "include/dart_api.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -16,19 +16,25 @@
         "ZLibInflater and Deflater not supported on this platform"));
 }
 
+
 void FUNCTION_NAME(Filter_CreateZLibDeflate)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "ZLibInflater and Deflater not supported on this platform"));
 }
 
+
 void FUNCTION_NAME(Filter_Process)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "ZLibInflater and Deflater not supported on this platform"));
 }
 
 
 void FUNCTION_NAME(Filter_Processed)(Dart_NativeArguments args) {
-}
-
-
-void FUNCTION_NAME(Filter_End)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "ZLibInflater and Deflater not supported on this platform"));
 }
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // defined(DART_IO_DISABLED)
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index ea9f3d7..258b9a7 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -5,14 +5,12 @@
 // Generate a snapshot file after loading all the scripts specified on the
 // command line.
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdio.h>
 
 #include <cstdarg>
 
-#include "include/dart_api.h"
-
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
 #include "bin/eventhandler.h"
@@ -22,8 +20,9 @@
 #include "bin/utils.h"
 #include "bin/vmservice_impl.h"
 
-#include "platform/globals.h"
+#include "include/dart_api.h"
 
+#include "platform/globals.h"
 
 namespace dart {
 namespace bin {
@@ -181,16 +180,16 @@
     return -1;
   }
 
-  if (instructions_snapshot_filename != NULL &&
-      embedder_entry_points_manifest == NULL) {
+  if ((instructions_snapshot_filename != NULL) &&
+      (embedder_entry_points_manifest == NULL)) {
     Log::PrintErr(
         "Specifying an instructions snapshot filename indicates precompilation"
         ". But no embedder entry points manifest was specified.\n\n");
     return -1;
   }
 
-  if (embedder_entry_points_manifest != NULL &&
-      instructions_snapshot_filename == NULL) {
+  if ((embedder_entry_points_manifest != NULL) &&
+      (instructions_snapshot_filename == NULL)) {
     Log::PrintErr(
         "Specifying the embedder entry points manifest indicates "
         "precompilation. But no instuctions snapshot was specified.\n\n");
@@ -828,7 +827,7 @@
 static Dart_QualifiedFunctionName* ParseEntryPointsManifestIfPresent() {
   Dart_QualifiedFunctionName* entries =
       ParseEntryPointsManifestFile(embedder_entry_points_manifest);
-  if (entries == NULL && IsSnapshottingForPrecompilation()) {
+  if ((entries == NULL) && IsSnapshottingForPrecompilation()) {
     Log::PrintErr(
         "Could not find native embedder entry points during precompilation\n");
     exit(255);
@@ -1031,12 +1030,15 @@
 
   // Initialize the Dart VM.
   // Note: We don't expect isolates to be created from dart code during
-  // snapshot generation.
+  // 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.
   char* error = Dart_Initialize(
       NULL,
       NULL,
       NULL,
-      CreateServiceIsolate,
+      (app_script_name != NULL) ? CreateServiceIsolate : NULL,
+      NULL,
       NULL,
       NULL,
       NULL,
@@ -1142,6 +1144,11 @@
     SetupForGenericSnapshotCreation();
     CreateAndWriteSnapshot();
   }
+  error = Dart_Cleanup();
+  if (error != NULL) {
+    Log::PrintErr("VM cleanup failed: %s\n", error);
+    free(error);
+  }
   EventHandler::Stop();
   return 0;
 }
diff --git a/runtime/bin/io_buffer.cc b/runtime/bin/io_buffer.cc
index c69d9c7..2317afa 100644
--- a/runtime/bin/io_buffer.cc
+++ b/runtime/bin/io_buffer.cc
@@ -4,7 +4,6 @@
 
 #include "bin/io_buffer.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/io_buffer.h b/runtime/bin/io_buffer.h
index 386402d..fe38932 100644
--- a/runtime/bin/io_buffer.h
+++ b/runtime/bin/io_buffer.h
@@ -5,10 +5,8 @@
 #ifndef BIN_IO_BUFFER_H_
 #define BIN_IO_BUFFER_H_
 
-#include "platform/globals.h"
-
 #include "include/dart_api.h"
-
+#include "platform/globals.h"
 
 namespace dart {
 namespace bin {
diff --git a/runtime/bin/io_impl_sources.gypi b/runtime/bin/io_impl_sources.gypi
index 03d20d4..ccb050c 100644
--- a/runtime/bin/io_impl_sources.gypi
+++ b/runtime/bin/io_impl_sources.gypi
@@ -14,6 +14,7 @@
     'eventhandler_linux.h',
     'eventhandler_macos.cc',
     'eventhandler_macos.h',
+    'eventhandler_unsupported.cc',
     'eventhandler_win.cc',
     'eventhandler_win.h',
     'file_system_watcher.cc',
@@ -21,6 +22,7 @@
     'file_system_watcher_android.cc',
     'file_system_watcher_linux.cc',
     'file_system_watcher_macos.cc',
+    'file_system_watcher_unsupported.cc',
     'file_system_watcher_win.cc',
     'filter.cc',
     'filter.h',
@@ -35,16 +37,23 @@
     'platform_android.cc',
     'platform_linux.cc',
     'platform_macos.cc',
+    'platform_unsupported.cc',
     'platform_win.cc',
     'process.cc',
     'process.h',
     'process_android.cc',
     'process_linux.cc',
     'process_macos.cc',
+    'process_unsupported.cc',
     'process_win.cc',
     '../../third_party/root_certificates/root_certificates.cc',
-    'secure_socket.cc',
+    'root_certificates_unsupported.cc',
     'secure_socket.h',
+    'secure_socket_boringssl.cc',
+    'secure_socket_boringssl.h',
+    'secure_socket_ios.cc',
+    'secure_socket_macos.cc',
+    'secure_socket_macos.h',
     'secure_socket_unsupported.cc',
     'socket.cc',
     'socket.h',
@@ -54,6 +63,7 @@
     'socket_linux.h',
     'socket_macos.cc',
     'socket_macos.h',
+    'socket_unsupported.cc',
     'socket_win.cc',
     'socket_win.h',
     'stdio.cc',
@@ -61,43 +71,7 @@
     'stdio_android.cc',
     'stdio_linux.cc',
     'stdio_macos.cc',
+    'stdio_unsupported.cc',
     'stdio_win.cc',
   ],
-  'conditions': [
-    ['dart_io_support==1', {
-      'conditions': [
-        ['dart_io_secure_socket==1', {
-          'sources!' : [
-            'io_service_no_ssl.cc',
-            'io_service_no_ssl.h',
-            'secure_socket_unsupported.cc',
-          ],
-        }, {  # else dart_io_secure_socket == 0
-          'sources!' : [
-            '../../third_party/root_certificates/root_certificates.cc',
-            'io_service.cc',
-            'io_service.h',
-            'secure_socket.cc',
-            'secure_socket.h',
-          ],
-        }],
-      ],
-      'sources!' : [
-        'filter_unsupported.cc',
-        'io_service_unsupported.cc',
-      ],
-    },{  # else dart_io_support == 0
-      'sources!' : [
-        'filter.cc',
-        'filter.h',
-        'io_service.cc',
-        'io_service.h',
-        'io_service_no_ssl.cc',
-        'io_service_no_ssl.h',
-        '../../third_party/root_certificates/root_certificates.cc',
-        'secure_socket.cc',
-        'secure_socket.h',
-      ],
-    }],
-  ],
 }
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
index 51b1d56..39946a7 100644
--- a/runtime/bin/io_natives.cc
+++ b/runtime/bin/io_natives.cc
@@ -12,7 +12,6 @@
 #include "include/dart_api.h"
 #include "platform/assert.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -72,7 +71,6 @@
   V(FileSystemWatcher_WatchPath, 4)                                            \
   V(Filter_CreateZLibDeflate, 8)                                               \
   V(Filter_CreateZLibInflate, 4)                                               \
-  V(Filter_End, 1)                                                             \
   V(Filter_Process, 4)                                                         \
   V(Filter_Processed, 3)                                                       \
   V(InternetAddress_Parse, 1)                                                  \
@@ -108,6 +106,7 @@
   V(SecureSocket_Renegotiate, 4)                                               \
   V(SecurityContext_Allocate, 1)                                               \
   V(SecurityContext_UsePrivateKeyBytes, 3)                                     \
+  V(SecurityContext_AlpnSupported, 0)                                          \
   V(SecurityContext_SetAlpnProtocols, 3)                                       \
   V(SecurityContext_SetClientAuthoritiesBytes, 3)                              \
   V(SecurityContext_SetTrustedCertificatesBytes, 3)                            \
@@ -170,7 +169,7 @@
   int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries);
   for (int i = 0; i < num_entries; i++) {
     struct NativeEntries* entry = &(IOEntries[i]);
-    if (!strcmp(function_name, entry->name_) &&
+    if ((strcmp(function_name, entry->name_) == 0) &&
         (entry->argument_count_ == argument_count)) {
       return reinterpret_cast<Dart_NativeFunction>(entry->function_);
     }
diff --git a/runtime/bin/io_natives.h b/runtime/bin/io_natives.h
index d44f839..c17dce5 100644
--- a/runtime/bin/io_natives.h
+++ b/runtime/bin/io_natives.h
@@ -7,7 +7,6 @@
 
 #include "include/dart_api.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/io_service.cc b/runtime/bin/io_service.cc
index 77b722c..491fa29 100644
--- a/runtime/bin/io_service.cc
+++ b/runtime/bin/io_service.cc
@@ -2,20 +2,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
+
+#include "bin/io_service.h"
+
 #include "bin/dartutils.h"
 #include "bin/directory.h"
 #include "bin/file.h"
 #include "bin/io_buffer.h"
-#include "bin/io_service.h"
 #include "bin/secure_socket.h"
 #include "bin/socket.h"
 #include "bin/utils.h"
 
-#include "platform/globals.h"
-#include "platform/utils.h"
-
 #include "include/dart_api.h"
 
+#include "platform/globals.h"
+#include "platform/utils.h"
 
 namespace dart {
 namespace bin {
@@ -30,8 +32,8 @@
   Dart_Port reply_port_id = ILLEGAL_PORT;
   CObject* response = CObject::IllegalArgumentError();
   CObjectArray request(message);
-  if (message->type == Dart_CObject_kArray &&
-      request.Length() == 4 &&
+  if ((message->type == Dart_CObject_kArray) &&
+      (request.Length() == 4) &&
       request[0]->IsInt32() &&
       request[1]->IsSendPort() &&
       request[2]->IsInt32() &&
@@ -57,10 +59,7 @@
 
 
 Dart_Port IOService::GetServicePort() {
-  Dart_Port result = Dart_NewNativePort("IOService",
-                                        IOServiceCallback,
-                                        true);
-  return result;
+  return Dart_NewNativePort("IOService", IOServiceCallback, true);
 }
 
 
@@ -74,6 +73,8 @@
   }
 }
 
-
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED) &&
+        // !defined(DART_IO_SECURE_SOCKET_DISABLED)
diff --git a/runtime/bin/io_service.h b/runtime/bin/io_service.h
index 87810d0..209561a 100644
--- a/runtime/bin/io_service.h
+++ b/runtime/bin/io_service.h
@@ -5,10 +5,13 @@
 #ifndef BIN_IO_SERVICE_H_
 #define BIN_IO_SERVICE_H_
 
+#if defined(DART_IO_DISABLED) || defined(DART_IO_SECURE_SOCKET_DISABLED)
+#error "io_service.h can only be included on builds with IO and SSL enabled"
+#endif
+
 #include "bin/builtin.h"
 #include "bin/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -65,6 +68,10 @@
   };
 
   static Dart_Port GetServicePort();
+
+ private:
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(IOService);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/io_service_no_ssl.cc b/runtime/bin/io_service_no_ssl.cc
index b63f8c8..ece9ab8 100644
--- a/runtime/bin/io_service_no_ssl.cc
+++ b/runtime/bin/io_service_no_ssl.cc
@@ -2,19 +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.
 
+#if !defined(DART_IO_DISABLED) && defined(DART_IO_SECURE_SOCKET_DISABLED)
+
+#include "bin/io_service_no_ssl.h"
+
 #include "bin/dartutils.h"
 #include "bin/directory.h"
 #include "bin/file.h"
 #include "bin/io_buffer.h"
-#include "bin/io_service_no_ssl.h"
 #include "bin/socket.h"
 #include "bin/utils.h"
 
-#include "platform/globals.h"
-#include "platform/utils.h"
-
 #include "include/dart_api.h"
 
+#include "platform/globals.h"
+#include "platform/utils.h"
 
 namespace dart {
 namespace bin {
@@ -29,8 +31,8 @@
   Dart_Port reply_port_id = ILLEGAL_PORT;
   CObject* response = CObject::IllegalArgumentError();
   CObjectArray request(message);
-  if (message->type == Dart_CObject_kArray &&
-      request.Length() == 4 &&
+  if ((message->type == Dart_CObject_kArray) &&
+      (request.Length() == 4) &&
       request[0]->IsInt32() &&
       request[1]->IsSendPort() &&
       request[2]->IsInt32() &&
@@ -56,10 +58,7 @@
 
 
 Dart_Port IOService::GetServicePort() {
-  Dart_Port result = Dart_NewNativePort("IOService",
-                                        IOServiceCallback,
-                                        true);
-  return result;
+  return Dart_NewNativePort("IOService", IOServiceCallback, true);
 }
 
 
@@ -73,6 +72,7 @@
   }
 }
 
-
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED) && defined(DART_IO_SECURE_SOCKET_DISABLED)
diff --git a/runtime/bin/io_service_no_ssl.h b/runtime/bin/io_service_no_ssl.h
index 9cc7fc1..b8cb545 100644
--- a/runtime/bin/io_service_no_ssl.h
+++ b/runtime/bin/io_service_no_ssl.h
@@ -5,10 +5,13 @@
 #ifndef BIN_IO_SERVICE_NO_SSL_H_
 #define BIN_IO_SERVICE_NO_SSL_H_
 
+#if defined(DART_IO_DISABLED) || !defined(DART_IO_SECURE_SOCKET_DISABLED)
+#error "io_service_no_ssl.h can only be included on builds with IO enabled"
+#endif
+
 #include "bin/builtin.h"
 #include "bin/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -66,6 +69,10 @@
   };
 
   static Dart_Port GetServicePort();
+
+ private:
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(IOService);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/io_service_unsupported.cc b/runtime/bin/io_service_unsupported.cc
index 9e51ca1..b8211e7 100644
--- a/runtime/bin/io_service_unsupported.cc
+++ b/runtime/bin/io_service_unsupported.cc
@@ -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.
 
+#if defined(DART_IO_DISABLED)
+
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
-
 #include "include/dart_api.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -19,3 +19,4 @@
 }  // namespace bin
 }  // namespace dart
 
+#endif  // defined(DART_IO_DISABLED)
diff --git a/runtime/bin/isolate_data.h b/runtime/bin/isolate_data.h
index d3f411f..6532fbc 100644
--- a/runtime/bin/isolate_data.h
+++ b/runtime/bin/isolate_data.h
@@ -9,7 +9,6 @@
 #include "platform/assert.h"
 #include "platform/globals.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -28,7 +27,6 @@
         package_root(NULL),
         packages_file(NULL),
         udp_receive_buffer(NULL),
-        load_async_id(-1),
         builtin_lib_(NULL) {
     if (package_root != NULL) {
       ASSERT(packages_file == NULL);
@@ -68,7 +66,6 @@
   char* package_root;
   char* packages_file;
   uint8_t* udp_receive_buffer;
-  int64_t load_async_id;
 
  private:
   Dart_Handle builtin_lib_;
diff --git a/runtime/bin/lockers.h b/runtime/bin/lockers.h
index 87e44e8..0aefd99 100644
--- a/runtime/bin/lockers.h
+++ b/runtime/bin/lockers.h
@@ -8,7 +8,6 @@
 #include "bin/thread.h"
 #include "platform/assert.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/log.h b/runtime/bin/log.h
index 10629d5..51a4379 100644
--- a/runtime/bin/log.h
+++ b/runtime/bin/log.h
@@ -9,7 +9,6 @@
 
 #include "platform/globals.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -34,6 +33,7 @@
 
   static void VPrintErr(const char* format, va_list args);
 
+ private:
   DISALLOW_ALLOCATION();
   DISALLOW_IMPLICIT_CONSTRUCTORS(Log);
 };
diff --git a/runtime/bin/log_android.cc b/runtime/bin/log_android.cc
index e8d8e68..6e5a621 100644
--- a/runtime/bin/log_android.cc
+++ b/runtime/bin/log_android.cc
@@ -7,9 +7,8 @@
 
 #include "bin/log.h"
 
-#include <stdio.h>  // NOLINT
 #include <android/log.h>  // NOLINT
-
+#include <stdio.h>  // NOLINT
 
 namespace dart {
 namespace bin {
diff --git a/runtime/bin/log_linux.cc b/runtime/bin/log_linux.cc
index f398c9e..abb19832 100644
--- a/runtime/bin/log_linux.cc
+++ b/runtime/bin/log_linux.cc
@@ -9,7 +9,6 @@
 
 #include <stdio.h>  // NOLINT
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/log_macos.cc b/runtime/bin/log_macos.cc
index 3711245..913a60d 100644
--- a/runtime/bin/log_macos.cc
+++ b/runtime/bin/log_macos.cc
@@ -9,7 +9,6 @@
 
 #include <stdio.h>  // NOLINT
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/log_win.cc b/runtime/bin/log_win.cc
index 9fb69cf..d8dfe96 100644
--- a/runtime/bin/log_win.cc
+++ b/runtime/bin/log_win.cc
@@ -9,7 +9,6 @@
 
 #include <stdio.h>  // NOLINT
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index bb21b9f..fdf6248 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -26,7 +26,9 @@
 #include "platform/globals.h"
 #include "platform/hashmap.h"
 #include "platform/text_buffer.h"
+#if !defined(DART_PRECOMPILER)
 #include "zlib/zlib.h"
+#endif
 
 namespace dart {
 namespace bin {
@@ -45,7 +47,7 @@
  * A full application snapshot can be generated and run using the following
  * commands
  * - Generating a full application snapshot :
- * dart_no_snapshot --full-snapshot-after-run=<filename> --package-root=<dirs>
+ * dart_bootstrap --full-snapshot-after-run=<filename> --package-root=<dirs>
  *   <script_uri> [<script_options>]
  * - Running the full application snapshot generated above :
  * dart --run-full-snapshot=<filename> <script_uri> [<script_options>]
@@ -218,7 +220,7 @@
 static bool ProcessPackagesOption(const char* arg,
                                      CommandLineOptions* vm_options) {
   ASSERT(arg != NULL);
-  if (*arg == '\0' || *arg == '-') {
+  if ((*arg == '\0') || (*arg == '-')) {
     return false;
   }
   commandline_packages_file = arg;
@@ -327,12 +329,11 @@
 static bool ProcessGenPrecompiledSnapshotOption(
     const char* arg,
     CommandLineOptions* vm_options) {
-  // Ensure that we are not already running using a full snapshot.
-  if (isolate_snapshot_buffer != NULL) {
-    Log::PrintErr("Precompiled snapshots must be generated with"
-                  " dart_no_snapshot.\n");
-    return false;
-  }
+#if !defined(DART_PRECOMPILER)
+  Log::PrintErr("Precompiled snapshots must be generated with "
+                "dart_bootstrap.\n");
+  return false;
+#else  // defined(DART_PRECOMPILER)
   ASSERT(arg != NULL);
   if ((arg[0] == '=') || (arg[0] == ':')) {
     precompiled_snapshot_directory = &arg[1];
@@ -340,11 +341,9 @@
     precompiled_snapshot_directory = arg;
   }
   gen_precompiled_snapshot = true;
-#if !defined(DART_PRECOMPILED_RUNTIME)
-  // The precompiled runtime has FLAG_precompilation set as const.
   vm_options->AddArgument("--precompilation");
-#endif
   return true;
+#endif  // defined(DART_PRECOMPILER)
 }
 
 
@@ -358,10 +357,7 @@
     precompiled_snapshot_directory = &precompiled_snapshot_directory[1];
   }
   run_precompiled_snapshot = true;
-#if !defined(DART_PRECOMPILED_RUNTIME)
-  // The precompiled runtime has FLAG_precompilation set as const.
   vm_options->AddArgument("--precompilation");
-#endif
   return true;
 }
 
@@ -401,10 +397,10 @@
   if ((filename == NULL) || (strlen(filename) == 0)) {
     return false;
   }
-  // Ensure that we are running 'dart_no_snapshot'.
+  // Ensure that we are running 'dart_bootstrap'.
   if (isolate_snapshot_buffer != NULL) {
     Log::PrintErr("Full Application snapshots must be generated with"
-                  " dart_no_snapshot\n");
+                  " dart_bootstrap\n");
     return false;
   }
   return ProcessSnapshotOptionHelper(filename,
@@ -749,31 +745,31 @@
                                                 char** error,
                                                 int* exit_code) {
   ASSERT(script_uri != NULL);
-#if defined(DART_PRODUCT_BINARY)
-  if (strcmp(script_uri, DART_VM_SERVICE_ISOLATE_NAME) == 0) {
-    // No service isolate support.
-    return NULL;
-  }
-#endif  // defined(DART_PRODUCT_BINARY)
 
-  if (run_full_snapshot &&
+#if defined(DART_PRODUCT_BINARY)
+  const bool run_service_isolate = false;
+#elif defined(PRODUCT)
+  const bool run_service_isolate = !run_full_snapshot &&
+                                   !run_precompiled_snapshot;
+#else
+  const bool run_service_isolate = !run_full_snapshot;
+#endif
+  if (!run_service_isolate &&
       (strcmp(script_uri, DART_VM_SERVICE_ISOLATE_NAME) == 0)) {
     // We do not create a service isolate when running a full application
-    // snapshot.
+    // snapshot or a precompiled snapshot in product mode.
     return NULL;
   }
+
   IsolateData* isolate_data = new IsolateData(script_uri,
                                               package_root,
                                               packages_config);
-  Dart_Isolate isolate = NULL;
-
-  isolate = Dart_CreateIsolate(script_uri,
-                               main,
-                               isolate_snapshot_buffer,
-                               flags,
-                               isolate_data,
-                               error);
-
+  Dart_Isolate isolate = Dart_CreateIsolate(script_uri,
+                                            main,
+                                            isolate_snapshot_buffer,
+                                            flags,
+                                            isolate_data,
+                                            error);
   if (isolate == NULL) {
     delete isolate_data;
     return NULL;
@@ -818,9 +814,12 @@
   result = DartUtils::PrepareForScriptLoading(false, trace_loading);
   CHECK_RESULT(result);
 
-  if (!run_full_snapshot) {
+  if (!run_precompiled_snapshot && !run_full_snapshot) {
     // Set up the load port provided by the service isolate so that we can
     // load scripts.
+    // With a full snapshot or a precompiled snapshot in product mode, there is
+    // no service isolate. A precompiled snapshot in release or debug mode does
+    // have the service isolate, but it doesn't use it for loading.
     result = DartUtils::SetupServiceLoadPort();
     CHECK_RESULT(result);
   }
@@ -841,9 +840,11 @@
     result = Dart_RunLoop();
     CHECK_RESULT(result);
 
-    if (isolate_data->load_async_id >= 0) {
-      Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id);
-    }
+    Dart_TimelineEvent("LoadScript",
+                       Dart_TimelineGetMicros(),
+                       Dart_GetMainPortId(),
+                       Dart_Timeline_Event_Async_End,
+                       0, NULL, NULL);
 
     result = DartUtils::SetupIOLibrary(script_uri);
     CHECK_RESULT(result);
@@ -1082,7 +1083,7 @@
                               const intptr_t size) {
   char* concat = NULL;
   const char* qualified_filename;
-  if ((snapshot_directory != NULL) && strlen(snapshot_directory) > 0) {
+  if ((snapshot_directory != NULL) && (strlen(snapshot_directory) > 0)) {
     intptr_t len = snprintf(NULL, 0, "%s/%s", snapshot_directory, filename);
     concat = new char[len + 1];
     snprintf(concat, len + 1, "%s/%s", snapshot_directory, filename);
@@ -1116,7 +1117,7 @@
                              const uint8_t** buffer) {
   char* concat = NULL;
   const char* qualified_filename;
-  if ((snapshot_directory != NULL) && strlen(snapshot_directory) > 0) {
+  if ((snapshot_directory != NULL) && (strlen(snapshot_directory) > 0)) {
     intptr_t len = snprintf(NULL, 0, "%s/%s", snapshot_directory, filename);
     concat = new char[len + 1];
     snprintf(concat, len + 1, "%s/%s", snapshot_directory, filename);
@@ -1135,7 +1136,7 @@
   }
   intptr_t len = -1;
   DartUtils::ReadFile(buffer, &len, file);
-  if (*buffer == NULL || len == -1) {
+  if ((*buffer == NULL) || (len == -1)) {
     fprintf(stderr,
             "Error: Unable to read snapshot file %s\n", qualified_filename);
     fflush(stderr);
@@ -1148,10 +1149,22 @@
 }
 
 
-static void* LoadLibrarySymbol(const char* libname, const char* symname) {
-  void* library = Extensions::LoadExtensionLibrary(libname);
+static void* LoadLibrarySymbol(const char* snapshot_directory,
+                               const char* libname,
+                               const char* symname) {
+  char* concat = NULL;
+  const char* qualified_libname;
+  if ((snapshot_directory != NULL) && (strlen(snapshot_directory) > 0)) {
+    intptr_t len = snprintf(NULL, 0, "%s/%s", snapshot_directory, libname);
+    concat = new char[len + 1];
+    snprintf(concat, len + 1, "%s/%s", snapshot_directory, libname);
+    qualified_libname = concat;
+  } else {
+    qualified_libname = libname;
+  }
+  void* library = Extensions::LoadExtensionLibrary(qualified_libname);
   if (library == NULL) {
-    Log::PrintErr("Error: Failed to load library '%s'\n", libname);
+    Log::PrintErr("Error: Failed to load library '%s'\n", qualified_libname);
     Platform::Exit(kErrorExitCode);
   }
   void* symbol = Extensions::ResolveSymbol(library, symname);
@@ -1159,6 +1172,9 @@
     Log::PrintErr("Error: Failed to load symbol '%s'\n", symname);
     Platform::Exit(kErrorExitCode);
   }
+  if (concat != NULL) {
+    delete concat;
+  }
   return symbol;
 }
 
@@ -1188,6 +1204,7 @@
   snprintf(*isolate_snapshot_fname, len + 1, "%s.%s", filename, kIsolateSuffix);
 }
 
+
 static void GenerateFullSnapshot() {
   // Create a full snapshot of the script.
   Dart_Handle result;
@@ -1290,7 +1307,7 @@
         reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate));
     result = Dart_LibraryImportLibrary(
         isolate_data->builtin_lib(), root_lib, Dart_Null());
-#ifndef DART_PRODUCT_BINARY
+#if !defined(DART_PRODUCT_BINARY) && !defined(PRODUCT)
     if (is_noopt || gen_precompiled_snapshot) {
       // Load the embedder's portion of the VM service's Dart code so it will
       // be included in the precompiled snapshot.
@@ -1338,7 +1355,9 @@
         { "dart:io", "_ProcessStartStatus", "set:_errorMessage" },
         { "dart:io", "_SecureFilterImpl", "get:ENCRYPTED_SIZE" },
         { "dart:io", "_SecureFilterImpl", "get:SIZE" },
+#if !defined(PRODUCT)
         { "dart:vmservice_io", "::", "main" },
+#endif  // !PRODUCT
         { NULL, NULL, NULL }  // Must be terminated with NULL entries.
       };
 
@@ -1427,6 +1446,9 @@
 
 #undef CHECK_RESULT
 
+
+// Observatory assets are only needed in the regular dart binary.
+#if !defined(DART_PRECOMPILER)
 extern unsigned int observatory_assets_archive_len;
 extern const uint8_t* observatory_assets_archive;
 
@@ -1508,6 +1530,9 @@
   free(decompressed);
   return tar_file;
 }
+#else  // !defined(DART_PRECOMPILER)
+static Dart_GetVMServiceAssetsArchive GetVMServiceAssetsArchiveCallback = NULL;
+#endif  // !defined(DART_PRECOMPILER)
 
 
 void main(int argc, char** argv) {
@@ -1587,10 +1612,12 @@
   const uint8_t* data_snapshot = NULL;
   if (run_precompiled_snapshot) {
     instructions_snapshot = reinterpret_cast<const uint8_t*>(
-        LoadLibrarySymbol(kPrecompiledLibraryName,
+        LoadLibrarySymbol(precompiled_snapshot_directory,
+                          kPrecompiledLibraryName,
                           kPrecompiledInstructionsSymbolName));
     data_snapshot = reinterpret_cast<const uint8_t*>(
-        LoadLibrarySymbol(kPrecompiledLibraryName,
+        LoadLibrarySymbol(precompiled_snapshot_directory,
+                          kPrecompiledLibraryName,
                           kPrecompiledDataSymbolName));
     ReadSnapshotFile(precompiled_snapshot_directory,
                      kPrecompiledVmIsolateName,
@@ -1618,6 +1645,7 @@
   char* error = Dart_Initialize(
       vm_isolate_snapshot_buffer, instructions_snapshot, data_snapshot,
       CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate,
+      NULL,
       DartUtils::OpenFile,
       DartUtils::ReadFile,
       DartUtils::WriteFile,
@@ -1658,7 +1686,9 @@
 
   // Free copied argument strings if converted.
   if (argv_converted) {
-    for (int i = 0; i < argc; i++) free(argv[i]);
+    for (int i = 0; i < argc; i++) {
+      free(argv[i]);
+    }
   }
 
   // Free environment if any.
diff --git a/runtime/bin/platform.cc b/runtime/bin/platform.cc
index f2f16be..2099ebb 100644
--- a/runtime/bin/platform.cc
+++ b/runtime/bin/platform.cc
@@ -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.
 
-#include "bin/platform.h"
+#if !defined(DART_IO_DISABLED)
 
-#include "include/dart_api.h"
+#include "bin/platform.h"
 
 #include "bin/file.h"
 #include "bin/utils.h"
+#include "include/dart_api.h"
 
 namespace dart {
 namespace bin {
 
-const char* Platform::executable_name_ = NULL;
-const char* Platform::resolved_executable_name_ = NULL;
-int Platform::script_index_ = 1;
-char** Platform::argv_ = NULL;
-
 void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) {
   Dart_SetReturnValue(args, Dart_NewInteger(Platform::NumberOfProcessors()));
 }
@@ -102,22 +98,18 @@
   } else {
     Dart_Handle result = Dart_NewList(count);
     if (Dart_IsError(result)) {
-      Platform::FreeEnvironment(env, count);
       Dart_PropagateError(result);
     }
     for (intptr_t i = 0; i < count; i++) {
       Dart_Handle str = DartUtils::NewString(env[i]);
       if (Dart_IsError(str)) {
-        Platform::FreeEnvironment(env, count);
         Dart_PropagateError(str);
       }
       Dart_Handle error = Dart_ListSetAt(result, i, str);
       if (Dart_IsError(error)) {
-        Platform::FreeEnvironment(env, count);
         Dart_PropagateError(error);
       }
     }
-    Platform::FreeEnvironment(env, count);
     Dart_SetReturnValue(args, result);
   }
 }
@@ -129,3 +121,5 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/platform.h b/runtime/bin/platform.h
index 4dec601..79cb7be 100644
--- a/runtime/bin/platform.h
+++ b/runtime/bin/platform.h
@@ -7,7 +7,6 @@
 
 #include "bin/builtin.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -32,14 +31,12 @@
   // Extracts the local hostname.
   static bool LocalHostname(char* buffer, intptr_t buffer_length);
 
-  // Extracts the environment variables for the current process.  The
-  // array of strings returned must be deallocated using
-  // FreeEnvironment. The number of elements in the array is returned
-  // in the count argument.
+  // Extracts the environment variables for the current process.  The array of
+  // strings is Dart_ScopeAllocated. The number of elements in the array is
+  // returned in the count argument.
   static char** Environment(intptr_t* count);
-  static void FreeEnvironment(char** env, intptr_t count);
 
-  static char* ResolveExecutablePath();
+  static const char* ResolveExecutablePath();
 
   // Stores the executable name.
   static void SetExecutableName(const char* executable_name) {
@@ -51,7 +48,7 @@
   static const char* GetResolvedExecutableName() {
     if (resolved_executable_name_ == NULL) {
       // Try to resolve the executable path using platform specific APIs.
-      resolved_executable_name_ = Platform::ResolveExecutablePath();
+      resolved_executable_name_ = strdup(Platform::ResolveExecutablePath());
     }
     return resolved_executable_name_;
   }
@@ -74,7 +71,7 @@
   // The path to the executable.
   static const char* executable_name_;
   // The path to the resolved executable.
-  static const char* resolved_executable_name_;
+  static char* resolved_executable_name_;
 
   static int script_index_;
   static char** argv_;  // VM flags are argv_[1 ... script_index_ - 1]
diff --git a/runtime/bin/platform_android.cc b/runtime/bin/platform_android.cc
index 3c44c04..1f29b21 100644
--- a/runtime/bin/platform_android.cc
+++ b/runtime/bin/platform_android.cc
@@ -5,7 +5,6 @@
 #include "platform/globals.h"
 #if defined(TARGET_OS_ANDROID)
 
-#include "bin/file.h"
 #include "bin/platform.h"
 
 #include <signal.h>  // NOLINT
@@ -13,11 +12,16 @@
 #include <unistd.h>  // NOLINT
 
 #include "bin/fdutils.h"
-
+#include "bin/file.h"
 
 namespace dart {
 namespace bin {
 
+const char* Platform::executable_name_ = NULL;
+char* Platform::resolved_executable_name_ = NULL;
+int Platform::script_index_ = 1;
+char** Platform::argv_ = NULL;
+
 bool Platform::Initialize() {
   // Turn off the signal handler for SIGPIPE as it causes the process
   // to terminate on writing to a closed pipe. Without the signal
@@ -58,9 +62,12 @@
   // provide access to modifying environment variables.
   intptr_t i = 0;
   char** tmp = environ;
-  while (*(tmp++) != NULL) i++;
+  while (*(tmp++) != NULL) {
+    i++;
+  }
   *count = i;
-  char** result = new char*[i];
+  char** result;
+  result = reinterpret_cast<char**>(Dart_ScopeAllocate(i * sizeof(*result)));
   for (intptr_t current = 0; current < i; current++) {
     result[current] = environ[current];
   }
@@ -68,15 +75,11 @@
 }
 
 
-void Platform::FreeEnvironment(char** env, intptr_t count) {
-  delete[] env;
-}
-
-
-char* Platform::ResolveExecutablePath() {
+const char* Platform::ResolveExecutablePath() {
   return File::LinkTarget("/proc/self/exe");
 }
 
+
 void Platform::Exit(int exit_code) {
   exit(exit_code);
 }
diff --git a/runtime/bin/platform_linux.cc b/runtime/bin/platform_linux.cc
index 24cbfd3..054ff6d 100644
--- a/runtime/bin/platform_linux.cc
+++ b/runtime/bin/platform_linux.cc
@@ -5,7 +5,6 @@
 #include "platform/globals.h"
 #if defined(TARGET_OS_LINUX)
 
-#include "bin/file.h"
 #include "bin/platform.h"
 
 #include <signal.h>  // NOLINT
@@ -13,11 +12,16 @@
 #include <unistd.h>  // NOLINT
 
 #include "bin/fdutils.h"
-
+#include "bin/file.h"
 
 namespace dart {
 namespace bin {
 
+const char* Platform::executable_name_ = NULL;
+char* Platform::resolved_executable_name_ = NULL;
+int Platform::script_index_ = 1;
+char** Platform::argv_ = NULL;
+
 bool Platform::Initialize() {
   // Turn off the signal handler for SIGPIPE as it causes the process
   // to terminate on writing to a closed pipe. Without the signal
@@ -58,9 +62,12 @@
   // provide access to modifying environment variables.
   intptr_t i = 0;
   char** tmp = environ;
-  while (*(tmp++) != NULL) i++;
+  while (*(tmp++) != NULL) {
+    i++;
+  }
   *count = i;
-  char** result = new char*[i];
+  char** result;
+  result = reinterpret_cast<char**>(Dart_ScopeAllocate(i * sizeof(*result)));
   for (intptr_t current = 0; current < i; current++) {
     result[current] = environ[current];
   }
@@ -68,15 +75,11 @@
 }
 
 
-void Platform::FreeEnvironment(char** env, intptr_t count) {
-  delete[] env;
-}
-
-
-char* Platform::ResolveExecutablePath() {
+const char* Platform::ResolveExecutablePath() {
   return File::LinkTarget("/proc/self/exe");
 }
 
+
 void Platform::Exit(int exit_code) {
   exit(exit_code);
 }
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
index 0f7c629..24c83fd 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_macos.cc
@@ -5,26 +5,29 @@
 #include "platform/globals.h"
 #if defined(TARGET_OS_MACOS)
 
-#include <mach-o/dyld.h>
-#include <sys/types.h>
-#include <sys/sysctl.h>
-
-#include "bin/file.h"
 #include "bin/platform.h"
 
 #if !TARGET_OS_IOS
 #include <crt_externs.h>  // NOLINT
 #endif  // !TARGET_OS_IOS
+#include <mach-o/dyld.h>
 #include <signal.h>  // NOLINT
 #include <string.h>  // NOLINT
+#include <sys/sysctl.h>  // NOLINT
+#include <sys/types.h>  // NOLINT
 #include <unistd.h>  // NOLINT
 
 #include "bin/fdutils.h"
-
+#include "bin/file.h"
 
 namespace dart {
 namespace bin {
 
+const char* Platform::executable_name_ = NULL;
+char* Platform::resolved_executable_name_ = NULL;
+int Platform::script_index_ = 1;
+char** Platform::argv_ = NULL;
+
 bool Platform::Initialize() {
   // Turn off the signal handler for SIGPIPE as it causes the process
   // to terminate on writing to a closed pipe. Without the signal
@@ -73,14 +76,16 @@
 
 char** Platform::Environment(intptr_t* count) {
 #if TARGET_OS_IOS
-  // TODO(iposva): On Mac (desktop), _NSGetEnviron() is used to access the
-  // environ from shared libraries or bundles. This is present in crt_externs.h
-  // which is unavailable on iOS. On iOS, everything is statically linked for
-  // now. So arguably, accessing the environ directly with a "extern char
-  // **environ" will work. But this approach is brittle as the target with this
-  // CU could be a dynamic framework (introduced in iOS 8). A more elegant
-  // approach needs to be devised.
-  return NULL;
+  // TODO(zra,chinmaygarde): On iOS, environment variables are seldom used. Wire
+  // this up if someone needs it. In the meantime, we return an empty array.
+  char** result;
+  result = reinterpret_cast<char**>(Dart_ScopeAllocate(1 * sizeof(*result)));
+  if (result == NULL) {
+    return NULL;
+  }
+  result[0] = NULL;
+  *count = 0;
+  return result;
 #else
   // Using environ directly is only safe as long as we do not
   // provide access to modifying environment variables.
@@ -89,9 +94,12 @@
   char** environ = *(_NSGetEnviron());
   intptr_t i = 0;
   char** tmp = environ;
-  while (*(tmp++) != NULL) i++;
+  while (*(tmp++) != NULL) {
+    i++;
+  }
   *count = i;
-  char** result = new char*[i];
+  char** result;
+  result = reinterpret_cast<char**>(Dart_ScopeAllocate(i * sizeof(*result)));
   for (intptr_t current = 0; current < i; current++) {
     result[current] = environ[current];
   }
@@ -100,30 +108,23 @@
 }
 
 
-void Platform::FreeEnvironment(char** env, intptr_t count) {
-  delete[] env;
-}
-
-
-char* Platform::ResolveExecutablePath() {
+const char* Platform::ResolveExecutablePath() {
   // Get the required length of the buffer.
   uint32_t path_size = 0;
-  char* path = NULL;
-  if (_NSGetExecutablePath(path, &path_size) == 0) {
+  if (_NSGetExecutablePath(NULL, &path_size) == 0) {
     return NULL;
   }
   // Allocate buffer and get executable path.
-  path = reinterpret_cast<char*>(malloc(path_size));
+  char* path = DartUtils::ScopedCString(path_size);
   if (_NSGetExecutablePath(path, &path_size) != 0) {
-    free(path);
     return NULL;
   }
   // Return the canonical path as the returned path might contain symlinks.
-  char* canon_path = File::GetCanonicalPath(path);
-  free(path);
+  const char* canon_path = File::GetCanonicalPath(path);
   return canon_path;
 }
 
+
 void Platform::Exit(int exit_code) {
   exit(exit_code);
 }
diff --git a/runtime/bin/platform_unsupported.cc b/runtime/bin/platform_unsupported.cc
new file mode 100644
index 0000000..83893fb
--- /dev/null
+++ b/runtime/bin/platform_unsupported.cc
@@ -0,0 +1,70 @@
+// 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.
+
+#if defined(DART_IO_DISABLED)
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+
+namespace dart {
+namespace bin {
+
+void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Platform_PathSeparator)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Platform_LocalHostname)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Platform_ExecutableName)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Platform_ResolvedExecutableName)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Platform_ExecutableArguments)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Platform_Environment)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Platform is not supported on this platform"));
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc
index 9b29cb7..1eb9d3b 100644
--- a/runtime/bin/platform_win.cc
+++ b/runtime/bin/platform_win.cc
@@ -5,14 +5,16 @@
 #include "platform/globals.h"
 #if defined(TARGET_OS_WINDOWS)
 
-#include "bin/file.h"
 #include "bin/platform.h"
+
+#include "bin/file.h"
 #include "bin/log.h"
+#if !defined(DART_IO_DISABLED) && !defined(PLATFORM_DISABLE_SOCKET)
 #include "bin/socket.h"
+#endif
 #include "bin/utils.h"
 #include "bin/utils_win.h"
 
-
 namespace dart {
 
 // Defined in vm/os_thread_win.cc
@@ -20,6 +22,11 @@
 
 namespace bin {
 
+const char* Platform::executable_name_ = NULL;
+char* Platform::resolved_executable_name_ = NULL;
+int Platform::script_index_ = 1;
+char** Platform::argv_ = NULL;
+
 bool Platform::Initialize() {
   // Nothing to do on Windows.
   return true;
@@ -44,10 +51,12 @@
 
 
 bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) {
-#if defined(PLATFORM_DISABLE_SOCKET)
+#if defined(DART_IO_DISABLED) || defined(PLATFORM_DISABLE_SOCKET)
   return false;
 #else
-  if (!Socket::Initialize()) return false;
+  if (!Socket::Initialize()) {
+    return false;
+  }
   return gethostname(buffer, buffer_length) == 0;
 #endif
 }
@@ -55,7 +64,9 @@
 
 char** Platform::Environment(intptr_t* count) {
   wchar_t* strings = GetEnvironmentStringsW();
-  if (strings == NULL) return NULL;
+  if (strings == NULL) {
+    return NULL;
+  }
   wchar_t* tmp = strings;
   intptr_t i = 0;
   while (*tmp != '\0') {
@@ -63,15 +74,20 @@
     // These are synthetic variables corresponding to dynamic environment
     // variables like %=C:% and %=ExitCode%, and the Dart environment does
     // not include these.
-    if (*tmp != '=') i++;
+    if (*tmp != '=') {
+      i++;
+    }
     tmp += (wcslen(tmp) + 1);
   }
   *count = i;
-  char** result = new char*[i];
+  char** result;
+  result = reinterpret_cast<char**>(Dart_ScopeAllocate(i * sizeof(*result)));
   tmp = strings;
   for (intptr_t current = 0; current < i;) {
     // Skip the strings that were not counted above.
-    if (*tmp != '=') result[current++] = StringUtilsWin::WideToUtf8(tmp);
+    if (*tmp != '=') {
+      result[current++] = StringUtilsWin::WideToUtf8(tmp);
+    }
     tmp += (wcslen(tmp) + 1);
   }
   FreeEnvironmentStringsW(strings);
@@ -79,36 +95,27 @@
 }
 
 
-void Platform::FreeEnvironment(char** env, intptr_t count) {
-  for (intptr_t i = 0; i < count; i++) {
-    free(env[i]);
-  }
-  delete[] env;
-}
-
-
-char* Platform::ResolveExecutablePath() {
+const char* Platform::ResolveExecutablePath() {
   // GetModuleFileNameW cannot directly provide information on the
   // required buffer size, so start out with a buffer large enough to
   // hold any Windows path.
   const int kTmpBufferSize = 32768;
-  wchar_t* tmp_buffer = reinterpret_cast<wchar_t*>(malloc(kTmpBufferSize));
+  wchar_t* tmp_buffer =
+      reinterpret_cast<wchar_t*>(Dart_ScopeAllocate(kTmpBufferSize));
   // Ensure no last error before calling GetModuleFileNameW.
   SetLastError(ERROR_SUCCESS);
   // Get the required length of the buffer.
   int path_length = GetModuleFileNameW(NULL, tmp_buffer, kTmpBufferSize);
   if (GetLastError() != ERROR_SUCCESS) {
-    free(tmp_buffer);
     return NULL;
   }
   char* path = StringUtilsWin::WideToUtf8(tmp_buffer);
-  free(tmp_buffer);
   // Return the canonical path as the returned path might contain symlinks.
-  char* canon_path = File::GetCanonicalPath(path);
-  free(path);
+  const char* canon_path = File::GetCanonicalPath(path);
   return canon_path;
 }
 
+
 void Platform::Exit(int exit_code) {
   // TODO(zra): Remove once VM shuts down cleanly.
   ::dart::private_flag_windows_run_tls_destructors = false;
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
index b583049..672b3e3 100644
--- a/runtime/bin/process.cc
+++ b/runtime/bin/process.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
+#include "bin/process.h"
+
 #include "bin/dartutils.h"
 #include "bin/io_buffer.h"
 #include "bin/log.h"
 #include "bin/platform.h"
-#include "bin/process.h"
 #include "bin/socket.h"
 #include "bin/utils.h"
 
@@ -17,9 +20,6 @@
 
 static const int kProcessIdNativeField = 0;
 
-int Process::global_exit_code_ = 0;
-Mutex* Process::global_exit_code_mutex_ = new Mutex();
-
 // Extract an array of C strings from a list of Dart strings.
 static char** ExtractCStringList(Dart_Handle strings,
                                  Dart_Handle status_handle,
@@ -34,7 +34,7 @@
   }
   // Protect against user-defined list implementations that can have
   // arbitrary length.
-  if (len < 0 || len > kMaxArgumentListLength) {
+  if ((len < 0) || (len > kMaxArgumentListLength)) {
     result = DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
     if (Dart_IsError(result)) {
       Dart_PropagateError(result);
@@ -47,11 +47,12 @@
     return NULL;
   }
   *length = len;
-  char** string_args = new char*[len];
+  char** string_args;
+  string_args = reinterpret_cast<char**>(
+      Dart_ScopeAllocate(len * sizeof(*string_args)));
   for (int i = 0; i < len; i++) {
     Dart_Handle arg = Dart_ListGetAt(strings, i);
     if (Dart_IsError(arg)) {
-      delete[] string_args;
       Dart_PropagateError(arg);
     }
     if (!Dart_IsString(arg)) {
@@ -64,7 +65,6 @@
       if (Dart_IsError(result)) {
         Dart_PropagateError(result);
       }
-      delete[] string_args;
       return NULL;
     }
     string_args[i] = const_cast<char *>(DartUtils::GetStringValue(arg));
@@ -115,7 +115,6 @@
   if (Dart_IsString(working_directory_handle)) {
     working_directory = DartUtils::GetStringValue(working_directory_handle);
   } else if (!Dart_IsNull(working_directory_handle)) {
-    delete[] string_args;
     result = DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
     if (Dart_IsError(result)) {
       Dart_PropagateError(result);
@@ -139,7 +138,6 @@
                            "Environment values must be builtin strings",
                            &environment_length);
     if (string_environment == NULL) {
-      delete[] string_args;
       Dart_SetReturnValue(args, Dart_NewBoolean(false));
       return;
     }
@@ -151,7 +149,7 @@
   Dart_Handle stderr_handle = Dart_GetNativeArgument(args, 8);
   Dart_Handle exit_handle = Dart_GetNativeArgument(args, 9);
   intptr_t pid = -1;
-  char* os_error_message = NULL;
+  char* os_error_message = NULL;  // Scope allocated by Process::Start.
 
   int error_code = Process::Start(path,
                                   string_args,
@@ -188,15 +186,9 @@
         os_error_message != NULL ? os_error_message
                                  : "Cannot get error message");
     if (Dart_IsError(result)) {
-      delete[] string_args;
-      delete[] string_environment;
-      free(os_error_message);
       Dart_PropagateError(result);
     }
   }
-  delete[] string_args;
-  delete[] string_environment;
-  free(os_error_message);
   Dart_SetReturnValue(args, Dart_NewBoolean(error_code == 0));
 }
 
@@ -221,9 +213,13 @@
                     exit_event,
                     &result)) {
     Dart_Handle out = result.stdout_data();
-    if (Dart_IsError(out)) Dart_PropagateError(out);
+    if (Dart_IsError(out)) {
+      Dart_PropagateError(out);
+    }
     Dart_Handle err = result.stderr_data();
-    if (Dart_IsError(err)) Dart_PropagateError(err);
+    if (Dart_IsError(err)) {
+      Dart_PropagateError(err);
+    }
     Dart_Handle list = Dart_NewList(4);
     Dart_ListSetAt(list, 0, Dart_NewInteger(pid));
     Dart_ListSetAt(list, 1, Dart_NewInteger(result.exit_code()));
@@ -323,25 +319,24 @@
   Dart_Handle bytes = Dart_GetNativeArgument(args, 0);
   intptr_t bytes_length = 0;
   Dart_Handle result = Dart_ListLength(bytes, &bytes_length);
-  if (Dart_IsError(result)) Dart_PropagateError(result);
-  uint8_t* buffer =
-      reinterpret_cast<uint8_t*>(Dart_ScopeAllocate(bytes_length + 1));
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
+  uint8_t* buffer = Dart_ScopeAllocate(bytes_length + 1);
   result = Dart_ListGetAsBytes(bytes, 0, buffer, bytes_length);
   buffer[bytes_length] = '\0';
-  if (Dart_IsError(result)) Dart_PropagateError(result);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
   intptr_t len;
-  char* str =
-      StringUtils::ConsoleStringToUtf8(
-          reinterpret_cast<char*>(buffer),
-          bytes_length,
-          &len);
+  char* str = StringUtils::ConsoleStringToUtf8(
+      reinterpret_cast<char*>(buffer), bytes_length, &len);
   if (str == NULL) {
     Dart_ThrowException(
         DartUtils::NewInternalError("SystemEncodingToString failed"));
   }
   result =
       Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str), len);
-  free(str);
   Dart_SetReturnValue(args, result);
 }
 
@@ -368,8 +363,9 @@
     memmove(buffer, system_string, system_len);
   }
   Dart_SetReturnValue(args, external_array);
-  free(const_cast<char*>(system_string));
 }
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/process.h b/runtime/bin/process.h
index bd40086..359c8c1 100644
--- a/runtime/bin/process.h
+++ b/runtime/bin/process.h
@@ -12,7 +12,6 @@
 #include "platform/globals.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -183,6 +182,8 @@
   Dart_Port port_;
   SignalInfo* next_;
   SignalInfo* prev_;
+
+  DISALLOW_COPY_AND_ASSIGN(SignalInfo);
 };
 
 
@@ -285,6 +286,9 @@
 
   // Number of free bytes in the last node in the list.
   intptr_t free_size_;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(BufferListBase);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
index b9d245b..00d6ca2 100644
--- a/runtime/bin/process_android.cc
+++ b/runtime/bin/process_android.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_ANDROID)
 
@@ -16,6 +18,7 @@
 #include <sys/wait.h>  // NOLINT
 #include <unistd.h>  // NOLINT
 
+#include "bin/dartutils.h"
 #include "bin/fdutils.h"
 #include "bin/lockers.h"
 #include "bin/log.h"
@@ -24,13 +27,14 @@
 #include "platform/signal_blocker.h"
 #include "platform/utils.h"
 
-
 extern char **environ;
 
-
 namespace dart {
 namespace bin {
 
+int Process::global_exit_code_ = 0;
+Mutex* Process::global_exit_code_mutex_ = new Mutex();
+
 // ProcessInfo is used to map a process id to the file descriptor for
 // the pipe used to communicate the exit code of the process to Dart.
 // ProcessInfo objects are kept in the static singly-linked
@@ -53,6 +57,8 @@
   pid_t pid_;
   intptr_t fd_;
   ProcessInfo* next_;
+
+  DISALLOW_COPY_AND_ASSIGN(ProcessInfo);
 };
 
 
@@ -107,6 +113,9 @@
   // Mutex protecting all accesses to the linked list of active
   // processes.
   static Mutex* mutex_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessInfoList);
 };
 
 
@@ -174,7 +183,7 @@
     while (true) {
       {
         MonitorLocker locker(monitor_);
-        while (running_ && process_count_ == 0) {
+        while (running_ && (process_count_ == 0)) {
           monitor_->Wait(Monitor::kNoTimeout);
         }
         if (!running_) {
@@ -203,9 +212,9 @@
           // pipe has been closed. It is therefore not a problem that
           // write fails with a broken pipe error. Other errors should
           // not happen.
-          if (result != -1 && result != sizeof(message)) {
+          if ((result != -1) && (result != sizeof(message))) {
             FATAL("Failed to write entire process exit message");
-          } else if (result == -1 && errno != EPIPE) {
+          } else if ((result == -1) && (errno != EPIPE)) {
             FATAL1("Failed to write exit code: %d", errno);
           }
           ProcessInfoList::RemoveProcess(pid);
@@ -222,6 +231,9 @@
   static int process_count_;
   static bool running_;
   static Monitor* monitor_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ExitCodeHandler);
 };
 
 
@@ -264,7 +276,8 @@
     exec_control_[0] = -1;
     exec_control_[1] = -1;
 
-    program_arguments_ = new char*[arguments_length + 2];
+    program_arguments_ = reinterpret_cast<char**>(Dart_ScopeAllocate(
+        (arguments_length + 2) * sizeof(*program_arguments_)));
     program_arguments_[0] = const_cast<char*>(path_);
     for (int i = 0; i < arguments_length; i++) {
       program_arguments_[i + 1] = arguments[i];
@@ -273,7 +286,8 @@
 
     program_environment_ = NULL;
     if (environment != NULL) {
-      program_environment_ = new char*[environment_length + 1];
+      program_environment_ = reinterpret_cast<char**>(Dart_ScopeAllocate(
+          (environment_length + 1) * sizeof(*program_environment_)));
       for (int i = 0; i < environment_length; i++) {
         program_environment_[i] = environment[i];
       }
@@ -282,16 +296,12 @@
   }
 
 
-  ~ProcessStarter() {
-    delete[] program_arguments_;
-    delete[] program_environment_;
-  }
-
-
   int Start() {
     // Create pipes required.
     int err = CreatePipes();
-    if (err != 0) return err;
+    if (err != 0) {
+      return err;
+    }
 
     // Fork to create the new process.
     pid_t pid = TEMP_FAILURE_RETRY(fork());
@@ -311,7 +321,9 @@
     // Register the child process if not detached.
     if (mode_ == kNormal) {
       err = RegisterProcess(pid);
-      if (err != 0) return err;
+      if (err != 0) {
+        return err;
+      }
     }
 
     // Notify child process to start. This is done to delay the call to exec
@@ -490,8 +502,8 @@
             SetupDetachedWithStdio();
           }
 
-          if (working_directory_ != NULL &&
-              TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1) {
+          if ((working_directory_ != NULL) &&
+              (TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1)) {
             ReportChildError();
           }
 
@@ -533,9 +545,8 @@
     // Read exec result from child. If no data is returned the exec was
     // successful and the exec call closed the pipe. Otherwise the errno
     // is written to the pipe.
-    bytes_read =
-        FDUtils::ReadFromBlocking(
-            exec_control_[0], &child_errno, sizeof(child_errno));
+    bytes_read = FDUtils::ReadFromBlocking(
+        exec_control_[0], &child_errno, sizeof(child_errno));
     if (bytes_read == sizeof(child_errno)) {
       ReadChildError();
       return child_errno;
@@ -554,8 +565,7 @@
     // is written to the pipe as well.
     int result[2];
     bytes_read =
-        FDUtils::ReadFromBlocking(
-            exec_control_[0], result, sizeof(result));
+        FDUtils::ReadFromBlocking(exec_control_[0], result, sizeof(result));
     if (bytes_read == sizeof(int)) {
       *pid = result[0];
     } else if (bytes_read == 2 * sizeof(int)) {
@@ -575,7 +585,9 @@
 
     // Close all open file descriptors except for exec_control_[1].
     int max_fds = sysconf(_SC_OPEN_MAX);
-    if (max_fds == -1) max_fds = _POSIX_OPEN_MAX;
+    if (max_fds == -1) {
+      max_fds = _POSIX_OPEN_MAX;
+    }
     for (int fd = 0; fd < max_fds; fd++) {
       if (fd != exec_control_[1]) {
         VOID_TEMP_FAILURE_RETRY(close(fd));
@@ -604,12 +616,14 @@
     // exec_control_[1], write_out_[0], read_in_[1] and
     // read_err_[1].
     int max_fds = sysconf(_SC_OPEN_MAX);
-    if (max_fds == -1) max_fds = _POSIX_OPEN_MAX;
+    if (max_fds == -1) {
+      max_fds = _POSIX_OPEN_MAX;
+    }
     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]) {
+      if ((fd != exec_control_[1]) &&
+          (fd != write_out_[0]) &&
+          (fd != read_in_[1]) &&
+          (fd != read_err_[1])) {
         VOID_TEMP_FAILURE_RETRY(close(fd));
       }
     }
@@ -635,7 +649,9 @@
     int actual_errno = errno;
     // If CleanupAndReturnError is called without an actual errno make
     // sure to return an error anyway.
-    if (actual_errno == 0) actual_errno = EPERM;
+    if (actual_errno == 0) {
+      actual_errno = EPERM;
+    }
     SetChildOsErrorMessage();
     CloseAllPipes();
     return actual_errno;
@@ -644,9 +660,9 @@
 
   void SetChildOsErrorMessage() {
     const int kBufferSize = 1024;
-    char error_message[kBufferSize];
+    char* error_message = DartUtils::ScopedCString(kBufferSize);
     Utils::StrError(errno, error_message, kBufferSize);
-    *os_error_message_ = strdup(error_message);
+    *os_error_message_ = error_message;
   }
 
 
@@ -681,7 +697,7 @@
 
   void ReadChildError() {
     const int kMaxMessageSize = 256;
-    char* message = static_cast<char*>(malloc(kMaxMessageSize));
+    char* message = DartUtils::ScopedCString(kMaxMessageSize);
     if (message != NULL) {
       FDUtils::ReadFromBlocking(exec_control_[0], message, kMaxMessageSize);
       message[kMaxMessageSize - 1] = '\0';
@@ -728,6 +744,9 @@
   intptr_t* id_;
   intptr_t* exit_event_;
   char** os_error_message_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessStarter);
 };
 
 
@@ -763,10 +782,14 @@
 
 class BufferList: public BufferListBase {
  public:
+  BufferList() {}
+
   bool Read(int fd, intptr_t available) {
     // Read all available bytes.
     while (available > 0) {
-      if (free_size_ == 0) Allocate();
+      if (free_size_ == 0) {
+        Allocate();
+      }
       ASSERT(free_size_ > 0);
       ASSERT(free_size_ <= kBufferSize);
       intptr_t block_size = dart::Utils::Minimum(free_size_, available);
@@ -774,13 +797,18 @@
           fd,
           reinterpret_cast<void*>(FreeSpaceAddress()),
           block_size));
-      if (bytes < 0) return false;
+      if (bytes < 0) {
+        return false;
+      }
       data_size_ += bytes;
       free_size_ -= bytes;
       available -= bytes;
     }
     return true;
   }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(BufferList);
 };
 
 
@@ -832,7 +860,7 @@
     // Process incoming data.
     int current_alive = alive;
     for (int i = 0; i < current_alive; i++) {
-      if (fds[i].revents & POLLIN) {
+      if ((fds[i].revents & POLLIN) != 0) {
         intptr_t avail = FDUtils::AvailableBytes(fds[i].fd);
         if (fds[i].fd == out) {
           if (!out_data.Read(out, avail)) {
@@ -854,7 +882,7 @@
           UNREACHABLE();
         }
       }
-      if (fds[i].revents & POLLHUP) {
+      if ((fds[i].revents & POLLHUP) != 0) {
         VOID_TEMP_FAILURE_RETRY(close(fds[i].fd));
         alive--;
         if (i < alive) {
@@ -871,7 +899,9 @@
   // Calculate the exit code.
   intptr_t exit_code = exit_code_data.ints[0];
   intptr_t negative = exit_code_data.ints[1];
-  if (negative) exit_code = -exit_code;
+  if (negative != 0) {
+    exit_code = -exit_code;
+  }
   result->set_exit_code(exit_code);
 
   return true;
@@ -933,7 +963,9 @@
       break;
     }
   }
-  if (!found) return -1;
+  if (!found) {
+    return -1;
+  }
   int fds[2];
   if (NO_RETRY_EXPECTED(pipe2(fds, O_CLOEXEC)) != 0) {
     return -1;
@@ -983,7 +1015,9 @@
     bool remove = false;
     if (handler->signal() == signal) {
       if (handler->port() == Dart_GetMainPortId()) {
-        if (signal_handlers == handler) signal_handlers = handler->next();
+        if (signal_handlers == handler) {
+          signal_handlers = handler->next();
+        }
         handler->Unlink();
         remove = true;
       } else {
@@ -991,7 +1025,9 @@
       }
     }
     SignalInfo* next = handler->next();
-    if (remove) delete handler;
+    if (remove) {
+      delete handler;
+    }
     handler = next;
   }
   if (unlisten) {
@@ -1006,3 +1042,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_ANDROID)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
index 30f188f..e533cc5 100644
--- a/runtime/bin/process_linux.cc
+++ b/runtime/bin/process_linux.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_LINUX)
 
@@ -16,20 +18,23 @@
 #include <sys/wait.h>  // NOLINT
 #include <unistd.h>  // NOLINT
 
+#include "bin/dartutils.h"
 #include "bin/fdutils.h"
 #include "bin/lockers.h"
 #include "bin/log.h"
 #include "bin/thread.h"
+
 #include "platform/signal_blocker.h"
 #include "platform/utils.h"
 
-
 extern char **environ;
 
-
 namespace dart {
 namespace bin {
 
+int Process::global_exit_code_ = 0;
+Mutex* Process::global_exit_code_mutex_ = new Mutex();
+
 // ProcessInfo is used to map a process id to the file descriptor for
 // the pipe used to communicate the exit code of the process to Dart.
 // ProcessInfo objects are kept in the static singly-linked
@@ -52,6 +57,8 @@
   pid_t pid_;
   intptr_t fd_;
   ProcessInfo* next_;
+
+  DISALLOW_COPY_AND_ASSIGN(ProcessInfo);
 };
 
 
@@ -106,6 +113,9 @@
   // Mutex protecting all accesses to the linked list of active
   // processes.
   static Mutex* mutex_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessInfoList);
 };
 
 
@@ -202,9 +212,9 @@
           // pipe has been closed. It is therefore not a problem that
           // write fails with a broken pipe error. Other errors should
           // not happen.
-          if (result != -1 && result != sizeof(message)) {
+          if ((result != -1) && (result != sizeof(message))) {
             FATAL("Failed to write entire process exit message");
-          } else if (result == -1 && errno != EPIPE) {
+          } else if ((result == -1) && (errno != EPIPE)) {
             FATAL1("Failed to write exit code: %d", errno);
           }
           ProcessInfoList::RemoveProcess(pid);
@@ -221,6 +231,9 @@
   static int process_count_;
   static bool running_;
   static Monitor* monitor_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ExitCodeHandler);
 };
 
 
@@ -263,7 +276,8 @@
     exec_control_[0] = -1;
     exec_control_[1] = -1;
 
-    program_arguments_ = new char*[arguments_length + 2];
+    program_arguments_ = reinterpret_cast<char**>(Dart_ScopeAllocate(
+        (arguments_length + 2) * sizeof(*program_arguments_)));
     program_arguments_[0] = const_cast<char*>(path_);
     for (int i = 0; i < arguments_length; i++) {
       program_arguments_[i + 1] = arguments[i];
@@ -272,7 +286,8 @@
 
     program_environment_ = NULL;
     if (environment != NULL) {
-      program_environment_ = new char*[environment_length + 1];
+      program_environment_ = reinterpret_cast<char**>(Dart_ScopeAllocate(
+          (environment_length + 1) * sizeof(*program_environment_)));
       for (int i = 0; i < environment_length; i++) {
         program_environment_[i] = environment[i];
       }
@@ -281,16 +296,12 @@
   }
 
 
-  ~ProcessStarter() {
-    delete[] program_arguments_;
-    delete[] program_environment_;
-  }
-
-
   int Start() {
     // Create pipes required.
     int err = CreatePipes();
-    if (err != 0) return err;
+    if (err != 0) {
+      return err;
+    }
 
     // Fork to create the new process.
     pid_t pid = TEMP_FAILURE_RETRY(fork());
@@ -310,7 +321,9 @@
     // Register the child process if not detached.
     if (mode_ == kNormal) {
       err = RegisterProcess(pid);
-      if (err != 0) return err;
+      if (err != 0) {
+        return err;
+      }
     }
 
     // Notify child process to start. This is done to delay the call to exec
@@ -489,8 +502,8 @@
             SetupDetachedWithStdio();
           }
 
-          if (working_directory_ != NULL &&
-              TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1) {
+          if ((working_directory_ != NULL) &&
+              (TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1)) {
             ReportChildError();
           }
 
@@ -532,9 +545,8 @@
     // Read exec result from child. If no data is returned the exec was
     // successful and the exec call closed the pipe. Otherwise the errno
     // is written to the pipe.
-    bytes_read =
-        FDUtils::ReadFromBlocking(
-            exec_control_[0], &child_errno, sizeof(child_errno));
+    bytes_read = FDUtils::ReadFromBlocking(
+        exec_control_[0], &child_errno, sizeof(child_errno));
     if (bytes_read == sizeof(child_errno)) {
       ReadChildError();
       return child_errno;
@@ -553,8 +565,7 @@
     // is written to the pipe as well.
     int result[2];
     bytes_read =
-        FDUtils::ReadFromBlocking(
-            exec_control_[0], result, sizeof(result));
+        FDUtils::ReadFromBlocking(exec_control_[0], result, sizeof(result));
     if (bytes_read == sizeof(int)) {
       *pid = result[0];
     } else if (bytes_read == 2 * sizeof(int)) {
@@ -574,7 +585,9 @@
 
     // Close all open file descriptors except for exec_control_[1].
     int max_fds = sysconf(_SC_OPEN_MAX);
-    if (max_fds == -1) max_fds = _POSIX_OPEN_MAX;
+    if (max_fds == -1) {
+      max_fds = _POSIX_OPEN_MAX;
+    }
     for (int fd = 0; fd < max_fds; fd++) {
       if (fd != exec_control_[1]) {
         VOID_TEMP_FAILURE_RETRY(close(fd));
@@ -603,12 +616,14 @@
     // exec_control_[1], write_out_[0], read_in_[1] and
     // read_err_[1].
     int max_fds = sysconf(_SC_OPEN_MAX);
-    if (max_fds == -1) max_fds = _POSIX_OPEN_MAX;
+    if (max_fds == -1) {
+      max_fds = _POSIX_OPEN_MAX;
+    }
     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]) {
+      if ((fd != exec_control_[1]) &&
+          (fd != write_out_[0]) &&
+          (fd != read_in_[1]) &&
+          (fd != read_err_[1])) {
         VOID_TEMP_FAILURE_RETRY(close(fd));
       }
     }
@@ -634,7 +649,9 @@
     int actual_errno = errno;
     // If CleanupAndReturnError is called without an actual errno make
     // sure to return an error anyway.
-    if (actual_errno == 0) actual_errno = EPERM;
+    if (actual_errno == 0) {
+      actual_errno = EPERM;
+    }
     SetChildOsErrorMessage();
     CloseAllPipes();
     return actual_errno;
@@ -643,8 +660,9 @@
 
   void SetChildOsErrorMessage() {
     const int kBufferSize = 1024;
-    char error_buf[kBufferSize];
-    *os_error_message_ = strdup(Utils::StrError(errno, error_buf, kBufferSize));
+    char* error_message = DartUtils::ScopedCString(kBufferSize);
+    Utils::StrError(errno, error_message, kBufferSize);
+    *os_error_message_ = error_message;
   }
 
 
@@ -655,9 +673,8 @@
     const int kBufferSize = 1024;
     char error_buf[kBufferSize];
     char* os_error_message = Utils::StrError(errno, error_buf, kBufferSize);
-    int bytes_written =
-        FDUtils::WriteToBlocking(
-            exec_control_[1], &child_errno, sizeof(child_errno));
+    int bytes_written = FDUtils::WriteToBlocking(
+        exec_control_[1], &child_errno, sizeof(child_errno));
     if (bytes_written == sizeof(child_errno)) {
       FDUtils::WriteToBlocking(
           exec_control_[1], os_error_message, strlen(os_error_message) + 1);
@@ -679,7 +696,7 @@
 
   void ReadChildError() {
     const int kMaxMessageSize = 256;
-    char* message = static_cast<char*>(malloc(kMaxMessageSize));
+    char* message = DartUtils::ScopedCString(kMaxMessageSize);
     if (message != NULL) {
       FDUtils::ReadFromBlocking(exec_control_[0], message, kMaxMessageSize);
       message[kMaxMessageSize - 1] = '\0';
@@ -726,6 +743,9 @@
   intptr_t* id_;
   intptr_t* exit_event_;
   char** os_error_message_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessStarter);
 };
 
 
@@ -761,10 +781,14 @@
 
 class BufferList: public BufferListBase {
  public:
+  BufferList() {}
+
   bool Read(int fd, intptr_t available) {
     // Read all available bytes.
     while (available > 0) {
-      if (free_size_ == 0) Allocate();
+      if (free_size_ == 0) {
+        Allocate();
+      }
       ASSERT(free_size_ > 0);
       ASSERT(free_size_ <= kBufferSize);
       intptr_t block_size = dart::Utils::Minimum(free_size_, available);
@@ -772,13 +796,18 @@
           fd,
           reinterpret_cast<void*>(FreeSpaceAddress()),
           block_size));
-      if (bytes < 0) return false;
+      if (bytes < 0) {
+        return false;
+      }
       data_size_ += bytes;
       free_size_ -= bytes;
       available -= bytes;
     }
     return true;
   }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(BufferList);
 };
 
 
@@ -830,7 +859,7 @@
     // Process incoming data.
     int current_alive = alive;
     for (int i = 0; i < current_alive; i++) {
-      if (fds[i].revents & POLLIN) {
+      if ((fds[i].revents & POLLIN) != 0) {
         intptr_t avail = FDUtils::AvailableBytes(fds[i].fd);
         if (fds[i].fd == out) {
           if (!out_data.Read(out, avail)) {
@@ -852,7 +881,7 @@
           UNREACHABLE();
         }
       }
-      if (fds[i].revents & POLLHUP) {
+      if ((fds[i].revents & POLLHUP) != 0) {
         VOID_TEMP_FAILURE_RETRY(close(fds[i].fd));
         alive--;
         if (i < alive) {
@@ -869,7 +898,9 @@
   // Calculate the exit code.
   intptr_t exit_code = exit_code_data.ints[0];
   intptr_t negative = exit_code_data.ints[1];
-  if (negative) exit_code = -exit_code;
+  if (negative != 0) {
+    exit_code = -exit_code;
+  }
   result->set_exit_code(exit_code);
 
   return true;
@@ -931,7 +962,9 @@
       break;
     }
   }
-  if (!found) return -1;
+  if (!found) {
+    return -1;
+  }
   int fds[2];
   if (NO_RETRY_EXPECTED(pipe2(fds, O_CLOEXEC)) != 0) {
     return -1;
@@ -978,7 +1011,9 @@
     bool remove = false;
     if (handler->signal() == signal) {
       if (handler->port() == Dart_GetMainPortId()) {
-        if (signal_handlers == handler) signal_handlers = handler->next();
+        if (signal_handlers == handler) {
+          signal_handlers = handler->next();
+        }
         handler->Unlink();
         remove = true;
       } else {
@@ -986,7 +1021,9 @@
       }
     }
     SignalInfo* next = handler->next();
-    if (remove) delete handler;
+    if (remove) {
+      delete handler;
+    }
     handler = next;
   }
   if (unlisten) {
@@ -1001,3 +1038,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_LINUX)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index 1ce34f9..b3b5662 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_MACOS)
 
@@ -19,6 +21,7 @@
 #include <string.h>  // NOLINT
 #include <unistd.h>  // NOLINT
 
+#include "bin/dartutils.h"
 #include "bin/fdutils.h"
 #include "bin/lockers.h"
 #include "bin/log.h"
@@ -27,11 +30,12 @@
 #include "platform/signal_blocker.h"
 #include "platform/utils.h"
 
-
-
 namespace dart {
 namespace bin {
 
+int Process::global_exit_code_ = 0;
+Mutex* Process::global_exit_code_mutex_ = new Mutex();
+
 // ProcessInfo is used to map a process id to the file descriptor for
 // the pipe used to communicate the exit code of the process to Dart.
 // ProcessInfo objects are kept in the static singly-linked
@@ -54,6 +58,8 @@
   pid_t pid_;
   intptr_t fd_;
   ProcessInfo* next_;
+
+  DISALLOW_COPY_AND_ASSIGN(ProcessInfo);
 };
 
 
@@ -108,6 +114,9 @@
   // Mutex protecting all accesses to the linked list of active
   // processes.
   static Mutex* mutex_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessInfoList);
 };
 
 
@@ -204,9 +213,9 @@
           // pipe has been closed. It is therefore not a problem that
           // write fails with a broken pipe error. Other errors should
           // not happen.
-          if (result != -1 && result != sizeof(message)) {
+          if ((result != -1) && (result != sizeof(message))) {
             FATAL("Failed to write entire process exit message");
-          } else if (result == -1 && errno != EPIPE) {
+          } else if ((result == -1) && (errno != EPIPE)) {
             FATAL1("Failed to write exit code: %d", errno);
           }
           ProcessInfoList::RemoveProcess(pid);
@@ -223,6 +232,9 @@
   static int process_count_;
   static bool running_;
   static Monitor* monitor_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ExitCodeHandler);
 };
 
 
@@ -265,7 +277,8 @@
     exec_control_[0] = -1;
     exec_control_[1] = -1;
 
-    program_arguments_ = new char*[arguments_length + 2];
+    program_arguments_ = reinterpret_cast<char**>(Dart_ScopeAllocate(
+        (arguments_length + 2) * sizeof(*program_arguments_)));
     program_arguments_[0] = const_cast<char*>(path_);
     for (int i = 0; i < arguments_length; i++) {
       program_arguments_[i + 1] = arguments[i];
@@ -274,7 +287,8 @@
 
     program_environment_ = NULL;
     if (environment != NULL) {
-      program_environment_ = new char*[environment_length + 1];
+      program_environment_ = reinterpret_cast<char**>(Dart_ScopeAllocate(
+          (environment_length + 1) * sizeof(*program_environment_)));
       for (int i = 0; i < environment_length; i++) {
         program_environment_[i] = environment[i];
       }
@@ -283,16 +297,12 @@
   }
 
 
-  ~ProcessStarter() {
-    delete[] program_arguments_;
-    delete[] program_environment_;
-  }
-
-
   int Start() {
     // Create pipes required.
     int err = CreatePipes();
-    if (err != 0) return err;
+    if (err != 0) {
+      return err;
+    }
 
     // Fork to create the new process.
     pid_t pid = TEMP_FAILURE_RETRY(fork());
@@ -312,7 +322,9 @@
     // Register the child process if not detached.
     if (mode_ == kNormal) {
       err = RegisterProcess(pid);
-      if (err != 0) return err;
+      if (err != 0) {
+        return err;
+      }
     }
 
     // Notify child process to start. This is done to delay the call to exec
@@ -504,8 +516,8 @@
             SetupDetachedWithStdio();
           }
 
-          if (working_directory_ != NULL &&
-              TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1) {
+          if ((working_directory_ != NULL) &&
+              (TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1)) {
             ReportChildError();
           }
 
@@ -549,9 +561,8 @@
     // Read exec result from child. If no data is returned the exec was
     // successful and the exec call closed the pipe. Otherwise the errno
     // is written to the pipe.
-    bytes_read =
-        FDUtils::ReadFromBlocking(
-            exec_control_[0], &child_errno, sizeof(child_errno));
+    bytes_read = FDUtils::ReadFromBlocking(
+        exec_control_[0], &child_errno, sizeof(child_errno));
     if (bytes_read == sizeof(child_errno)) {
       ReadChildError();
       return child_errno;
@@ -570,8 +581,7 @@
     // is written to the pipe as well.
     int result[2];
     bytes_read =
-        FDUtils::ReadFromBlocking(
-            exec_control_[0], result, sizeof(result));
+        FDUtils::ReadFromBlocking(exec_control_[0], result, sizeof(result));
     if (bytes_read == sizeof(int)) {
       *pid = result[0];
     } else if (bytes_read == 2 * sizeof(int)) {
@@ -591,7 +601,9 @@
 
     // Close all open file descriptors except for exec_control_[1].
     int max_fds = sysconf(_SC_OPEN_MAX);
-    if (max_fds == -1) max_fds = _POSIX_OPEN_MAX;
+    if (max_fds == -1) {
+      max_fds = _POSIX_OPEN_MAX;
+    }
     for (int fd = 0; fd < max_fds; fd++) {
       if (fd != exec_control_[1]) {
         VOID_TEMP_FAILURE_RETRY(close(fd));
@@ -620,12 +632,14 @@
     // exec_control_[1], write_out_[0], read_in_[1] and
     // read_err_[1].
     int max_fds = sysconf(_SC_OPEN_MAX);
-    if (max_fds == -1) max_fds = _POSIX_OPEN_MAX;
+    if (max_fds == -1) {
+      max_fds = _POSIX_OPEN_MAX;
+    }
     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]) {
+      if ((fd != exec_control_[1]) &&
+          (fd != write_out_[0]) &&
+          (fd != read_in_[1]) &&
+          (fd != read_err_[1])) {
         VOID_TEMP_FAILURE_RETRY(close(fd));
       }
     }
@@ -651,7 +665,9 @@
     int actual_errno = errno;
     // If CleanupAndReturnError is called without an actual errno make
     // sure to return an error anyway.
-    if (actual_errno == 0) actual_errno = EPERM;
+    if (actual_errno == 0) {
+      actual_errno = EPERM;
+    }
     SetChildOsErrorMessage();
     CloseAllPipes();
     return actual_errno;
@@ -660,9 +676,9 @@
 
   void SetChildOsErrorMessage() {
     const int kBufferSize = 1024;
-    char error_message[kBufferSize];
+    char* error_message = DartUtils::ScopedCString(kBufferSize);
     Utils::StrError(errno, error_message, kBufferSize);
-    *os_error_message_ = strdup(error_message);
+    *os_error_message_ = error_message;
   }
 
 
@@ -673,9 +689,8 @@
     const int kBufferSize = 1024;
     char os_error_message[kBufferSize];
     Utils::StrError(errno, os_error_message, kBufferSize);
-    int bytes_written =
-        FDUtils::WriteToBlocking(
-            exec_control_[1], &child_errno, sizeof(child_errno));
+    int bytes_written = FDUtils::WriteToBlocking(
+        exec_control_[1], &child_errno, sizeof(child_errno));
     if (bytes_written == sizeof(child_errno)) {
       FDUtils::WriteToBlocking(
           exec_control_[1], os_error_message, strlen(os_error_message) + 1);
@@ -697,7 +712,7 @@
 
   void ReadChildError() {
     const int kMaxMessageSize = 256;
-    char* message = static_cast<char*>(malloc(kMaxMessageSize));
+    char* message = DartUtils::ScopedCString(kMaxMessageSize);
     if (message != NULL) {
       FDUtils::ReadFromBlocking(exec_control_[0], message, kMaxMessageSize);
       message[kMaxMessageSize - 1] = '\0';
@@ -744,6 +759,9 @@
   intptr_t* id_;
   intptr_t* exit_event_;
   char** os_error_message_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessStarter);
 };
 
 
@@ -779,10 +797,14 @@
 
 class BufferList: public BufferListBase {
  public:
+  BufferList() {}
+
   bool Read(int fd, intptr_t available) {
     // Read all available bytes.
     while (available > 0) {
-      if (free_size_ == 0) Allocate();
+      if (free_size_ == 0) {
+        Allocate();
+      }
       ASSERT(free_size_ > 0);
       ASSERT(free_size_ <= kBufferSize);
       size_t block_size = dart::Utils::Minimum(free_size_, available);
@@ -790,13 +812,18 @@
           fd,
           reinterpret_cast<void*>(FreeSpaceAddress()),
           block_size));
-      if (bytes < 0) return false;
+      if (bytes < 0) {
+        return false;
+      }
       data_size_ += bytes;
       free_size_ -= bytes;
       available -= bytes;
     }
     return true;
   }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(BufferList);
 };
 
 
@@ -849,7 +876,7 @@
     int current_alive = alive;
     for (int i = 0; i < current_alive; i++) {
       intptr_t avail;
-      if (fds[i].revents & POLLIN) {
+      if ((fds[i].revents & POLLIN) != 0) {
         avail = FDUtils::AvailableBytes(fds[i].fd);
         // On Mac OS POLLIN can be set with zero available
         // bytes. POLLHUP is most likely also set in this case.
@@ -875,8 +902,8 @@
           }
         }
       }
-      if (fds[i].revents & POLLHUP ||
-          ((fds[i].revents & POLLIN) && avail == 0)) {
+      if (((fds[i].revents & POLLHUP) != 0) ||
+          (((fds[i].revents & POLLIN) != 0) && (avail == 0))) {
         VOID_TEMP_FAILURE_RETRY(close(fds[i].fd));
         alive--;
         if (i < alive) {
@@ -893,7 +920,9 @@
   // Calculate the exit code.
   intptr_t exit_code = exit_code_data.ints[0];
   intptr_t negative = exit_code_data.ints[1];
-  if (negative) exit_code = -exit_code;
+  if (negative != 0) {
+    exit_code = -exit_code;
+  }
   result->set_exit_code(exit_code);
 
   return true;
@@ -985,7 +1014,9 @@
 
 intptr_t Process::SetSignalHandler(intptr_t signal) {
   signal = SignalMap(signal);
-  if (signal == -1) return -1;
+  if (signal == -1) {
+    return -1;
+  }
   bool found = false;
   for (int i = 0; i < kSignalsCount; i++) {
     if (kSignals[i] == signal) {
@@ -993,7 +1024,9 @@
       break;
     }
   }
-  if (!found) return -1;
+  if (!found) {
+    return -1;
+  }
   int fds[2];
   if (NO_RETRY_EXPECTED(pipe(fds)) != 0) {
     return -1;
@@ -1038,7 +1071,9 @@
 
 void Process::ClearSignalHandler(intptr_t signal) {
   signal = SignalMap(signal);
-  if (signal == -1) return;
+  if (signal == -1) {
+    return;
+  }
   ThreadSignalBlocker blocker(kSignalsCount, kSignals);
   MutexLocker lock(signal_mutex);
   SignalInfo* handler = signal_handlers;
@@ -1047,7 +1082,9 @@
     bool remove = false;
     if (handler->signal() == signal) {
       if (handler->port() == Dart_GetMainPortId()) {
-        if (signal_handlers == handler) signal_handlers = handler->next();
+        if (signal_handlers == handler) {
+          signal_handlers = handler->next();
+        }
         handler->Unlink();
         remove = true;
       } else {
@@ -1055,7 +1092,9 @@
       }
     }
     SignalInfo* next = handler->next();
-    if (remove) delete handler;
+    if (remove) {
+      delete handler;
+    }
     handler = next;
   }
   if (unlisten) {
@@ -1070,3 +1109,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_MACOS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/process_unsupported.cc b/runtime/bin/process_unsupported.cc
new file mode 100644
index 0000000..64bed26
--- /dev/null
+++ b/runtime/bin/process_unsupported.cc
@@ -0,0 +1,97 @@
+// 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.
+
+#if defined(DART_IO_DISABLED)
+
+#include "bin/process.h"
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+
+namespace dart {
+namespace bin {
+
+int Process::global_exit_code_ = 0;
+Mutex* Process::global_exit_code_mutex_ = new Mutex();
+
+void Process::TerminateExitCodeHandler() {
+}
+
+
+void FUNCTION_NAME(Process_Start)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_Wait)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_KillPid)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_Exit)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_SetExitCode)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_GetExitCode)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_Sleep)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_Pid)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_SetSignalHandler)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(Process_ClearSignalHandler)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(SystemEncodingToString)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(StringToSystemEncoding)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewInternalError(
+        "Process is not supported on this platform"));
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/process_win.cc b/runtime/bin/process_win.cc
index ebf4ce3..b96e67b 100644
--- a/runtime/bin/process_win.cc
+++ b/runtime/bin/process_win.cc
@@ -2,13 +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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_WINDOWS)
 
+#include "bin/process.h"
+
 #include <process.h>  // NOLINT
 
 #include "bin/builtin.h"
-#include "bin/process.h"
+#include "bin/dartutils.h"
 #include "bin/eventhandler.h"
 #include "bin/lockers.h"
 #include "bin/log.h"
@@ -17,13 +21,14 @@
 #include "bin/utils.h"
 #include "bin/utils_win.h"
 
-
 namespace dart {
 namespace bin {
 
 static const int kReadHandle = 0;
 static const int kWriteHandle = 1;
 
+int Process::global_exit_code_ = 0;
+Mutex* Process::global_exit_code_mutex_ = new Mutex();
 
 // ProcessInfo is used to map a process id to the process handle,
 // wait handle for registered exit code event and the pipe used to
@@ -71,6 +76,8 @@
   HANDLE exit_pipe_;
   // Link to next ProcessInfo object in the singly-linked list.
   ProcessInfo* next_;
+
+  DISALLOW_COPY_AND_ASSIGN(ProcessInfo);
 };
 
 
@@ -142,7 +149,9 @@
   // Callback called when an exit code is available from one of the
   // processes in the list.
   static void CALLBACK ExitCodeCallback(PVOID data, BOOLEAN timed_out) {
-    if (timed_out) return;
+    if (timed_out) {
+      return;
+    }
     DWORD pid = reinterpret_cast<DWORD>(data);
     HANDLE handle;
     HANDLE wait_handle;
@@ -153,13 +162,12 @@
     }
     // Unregister the event in a non-blocking way.
     BOOL ok = UnregisterWait(wait_handle);
-    if (!ok && GetLastError() != ERROR_IO_PENDING) {
+    if (!ok && (GetLastError() != ERROR_IO_PENDING)) {
       FATAL("Failed unregistering wait operation");
     }
     // Get and report the exit code to Dart.
     int exit_code;
-    ok = GetExitCodeProcess(handle,
-                            reinterpret_cast<DWORD*>(&exit_code));
+    ok = GetExitCodeProcess(handle, reinterpret_cast<DWORD*>(&exit_code));
     if (!ok) {
       FATAL1("GetExitCodeProcess failed %d\n", GetLastError());
     }
@@ -175,9 +183,9 @@
     // pipe has been closed. It is therefore not a problem that
     // WriteFile fails with a closed pipe error
     // (ERROR_NO_DATA). Other errors should not happen.
-    if (ok && written != sizeof(message)) {
+    if (ok && (written != sizeof(message))) {
       FATAL("Failed to write entire process exit message");
-    } else if (!ok && GetLastError() != ERROR_NO_DATA) {
+    } else if (!ok && (GetLastError() != ERROR_NO_DATA)) {
       FATAL1("Failed to write exit code: %d", GetLastError());
     }
     // Remove the process from the list of active processes.
@@ -190,6 +198,9 @@
   // Mutex protecting all accesses to the linked list of active
   // processes.
   static Mutex* mutex_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessInfoList);
 };
 
 
@@ -248,7 +259,7 @@
       return false;
     }
   } else {
-    ASSERT(type == kInheritWrite || type == kInheritNone);
+    ASSERT((type == kInheritWrite) || (type == kInheritNone));
     handles[kReadHandle] =
         CreateNamedPipeW(pipe_name,
                          PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED,
@@ -356,19 +367,19 @@
   HMODULE kernel32_module = GetModuleHandleW(L"kernel32.dll");
   if (!load_attempted) {
     MutexLocker locker(mutex);
-    if (load_attempted) return delete_proc_thread_attr_list != NULL;
+    if (load_attempted) {
+      return (delete_proc_thread_attr_list != NULL);
+    }
     init_proc_thread_attr_list = reinterpret_cast<InitProcThreadAttrListFn>(
         GetProcAddress(kernel32_module, "InitializeProcThreadAttributeList"));
-    update_proc_thread_attr =
-        reinterpret_cast<UpdateProcThreadAttrFn>(
-            GetProcAddress(kernel32_module, "UpdateProcThreadAttribute"));
+    update_proc_thread_attr = reinterpret_cast<UpdateProcThreadAttrFn>(
+        GetProcAddress(kernel32_module, "UpdateProcThreadAttribute"));
     delete_proc_thread_attr_list = reinterpret_cast<DeleteProcThreadAttrListFn>(
-        reinterpret_cast<DeleteProcThreadAttrListFn>(
-            GetProcAddress(kernel32_module, "DeleteProcThreadAttributeList")));
+        GetProcAddress(kernel32_module, "DeleteProcThreadAttributeList"));
     load_attempted = true;
-    return delete_proc_thread_attr_list != NULL;
+    return (delete_proc_thread_attr_list != NULL);
   }
-  return delete_proc_thread_attr_list != NULL;
+  return (delete_proc_thread_attr_list != NULL);
 }
 
 
@@ -377,7 +388,7 @@
 static int GenerateNames(wchar_t pipe_names[Count][kMaxPipeNameSize]) {
   UUID uuid;
   RPC_STATUS status = UuidCreateSequential(&uuid);
-  if (status != RPC_S_OK && status != RPC_S_UUID_LOCAL_ONLY) {
+  if ((status != RPC_S_OK) && (status != RPC_S_UUID_LOCAL_ONLY)) {
     return status;
   }
   RPC_WSTR uuid_string;
@@ -434,7 +445,9 @@
 
     // Transform input strings to system format.
     const wchar_t* system_path = StringUtilsWin::Utf8ToWide(path_);
-    wchar_t** system_arguments = new wchar_t*[arguments_length];
+    wchar_t** system_arguments;
+    system_arguments = reinterpret_cast<wchar_t**>(
+        Dart_ScopeAllocate(arguments_length * sizeof(*system_arguments)));
     for (int i = 0; i < arguments_length; i++) {
        system_arguments[i] = StringUtilsWin::Utf8ToWide(arguments[i]);
     }
@@ -448,7 +461,8 @@
     command_line_length += arguments_length + 1;
 
     // Put together command-line string.
-    command_line_ = new wchar_t[command_line_length];
+    command_line_ = reinterpret_cast<wchar_t*>(Dart_ScopeAllocate(
+        command_line_length * sizeof(*command_line_)));
     int len = 0;
     int remaining = command_line_length;
     int written =
@@ -457,21 +471,19 @@
     remaining -= written;
     ASSERT(remaining >= 0);
     for (int i = 0; i < arguments_length; i++) {
-      written =
-          _snwprintf(
-              command_line_ + len, remaining, L" %s", system_arguments[i]);
+      written = _snwprintf(
+          command_line_ + len, remaining, L" %s", system_arguments[i]);
       len += written;
       remaining -= written;
       ASSERT(remaining >= 0);
     }
-    free(const_cast<wchar_t*>(system_path));
-    for (int i = 0; i < arguments_length; i++) free(system_arguments[i]);
-    delete[] system_arguments;
 
     // Create environment block if an environment is supplied.
     environment_block_ = NULL;
     if (environment != NULL) {
-      wchar_t** system_environment = new wchar_t*[environment_length];
+      wchar_t** system_environment;
+      system_environment = reinterpret_cast<wchar_t**>(
+          Dart_ScopeAllocate(environment_length * sizeof(*system_environment)));
       // Convert environment strings to system strings.
       for (intptr_t i = 0; i < environment_length; i++) {
         system_environment[i] = StringUtilsWin::Utf8ToWide(environment[i]);
@@ -483,7 +495,8 @@
       for (intptr_t i = 0; i < environment_length; i++) {
         block_size += wcslen(system_environment[i]) + 1;
       }
-      environment_block_ = new wchar_t[block_size];
+      environment_block_ = reinterpret_cast<wchar_t*>(Dart_ScopeAllocate(
+          block_size * sizeof(*environment_block_)));
       intptr_t block_index = 0;
       for (intptr_t i = 0; i < environment_length; i++) {
         intptr_t len = wcslen(system_environment[i]);
@@ -498,10 +511,6 @@
       // Block-terminating zero char.
       environment_block_[block_index++] = '\0';
       ASSERT(block_index == block_size);
-      for (intptr_t i = 0; i < environment_length; i++) {
-        free(system_environment[i]);
-      }
-      delete[] system_environment;
     }
 
     system_working_directory_ = NULL;
@@ -515,15 +524,8 @@
 
 
   ~ProcessStarter() {
-    // Deallocate command-line and environment block strings.
-    delete[] command_line_;
-    delete[] environment_block_;
-    if (system_working_directory_ != NULL) {
-      free(const_cast<wchar_t*>(system_working_directory_));
-    }
     if (attribute_list_ != NULL) {
       delete_proc_thread_attr_list(attribute_list_);
-      free(attribute_list_);
     }
   }
 
@@ -531,7 +533,9 @@
   int Start() {
     // Create pipes required.
     int err = CreatePipes();
-    if (err != 0) return err;
+    if (err != 0) {
+      return err;
+    }
 
     // Setup info structures.
     STARTUPINFOEXW startup_info;
@@ -550,11 +554,11 @@
       // The call to determine the size of an attribute list always fails with
       // ERROR_INSUFFICIENT_BUFFER and that error should be ignored.
       if (!init_proc_thread_attr_list(NULL, 1, 0, &size) &&
-          GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
+          (GetLastError() != ERROR_INSUFFICIENT_BUFFER)) {
         return CleanupAndReturnError();
       }
-      attribute_list_ =
-          reinterpret_cast<LPPROC_THREAD_ATTRIBUTE_LIST>(malloc(size));
+      attribute_list_ = reinterpret_cast<LPPROC_THREAD_ATTRIBUTE_LIST>(
+          Dart_ScopeAllocate(size));
       ZeroMemory(attribute_list_, size);
       if (!init_proc_thread_attr_list(attribute_list_, 1, 0, &size)) {
         return CleanupAndReturnError();
@@ -655,10 +659,19 @@
         }
       }
     } else {
-      // Open NUL for stdin, stdout and stderr.
-      if ((stdin_handles_[kReadHandle] = OpenNul()) == INVALID_HANDLE_VALUE ||
-          (stdout_handles_[kWriteHandle] = OpenNul()) == INVALID_HANDLE_VALUE ||
-          (stderr_handles_[kWriteHandle] = OpenNul()) == INVALID_HANDLE_VALUE) {
+      // Open NUL for stdin, stdout, and stderr.
+      stdin_handles_[kReadHandle] = OpenNul();
+      if (stdin_handles_[kReadHandle] == INVALID_HANDLE_VALUE) {
+        return CleanupAndReturnError();
+      }
+
+      stdout_handles_[kWriteHandle] = OpenNul();
+      if (stdout_handles_[kWriteHandle] == INVALID_HANDLE_VALUE) {
+        return CleanupAndReturnError();
+      }
+
+      stderr_handles_[kWriteHandle] = OpenNul();
+      if (stderr_handles_[kWriteHandle] == INVALID_HANDLE_VALUE) {
         return CleanupAndReturnError();
       }
     }
@@ -693,6 +706,10 @@
   intptr_t* id_;
   intptr_t* exit_handler_;
   char** os_error_message_;
+
+ private:
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessStarter);
 };
 
 
@@ -743,7 +760,9 @@
   // The access to the read buffer for overlapped read.
   void GetReadBuffer(uint8_t** buffer, intptr_t* size) {
     ASSERT(!read_pending_);
-    if (free_size_ == 0) Allocate();
+    if (free_size_ == 0) {
+      Allocate();
+    }
     ASSERT(free_size_ > 0);
     ASSERT(free_size_ <= kBufferSize);
     *buffer = FreeSpaceAddress();
@@ -768,11 +787,15 @@
 
  private:
   bool read_pending_;
+
+  DISALLOW_COPY_AND_ASSIGN(BufferList);
 };
 
 
 class OverlappedHandle {
  public:
+  OverlappedHandle() {}
+
   void Init(HANDLE handle, HANDLE event) {
     handle_ = handle;
     event_ = event;
@@ -780,7 +803,7 @@
   }
 
   bool HasEvent(HANDLE event) {
-    return event_ == event;
+    return (event_ == event);
   }
 
   bool Read() {
@@ -798,7 +821,9 @@
       intptr_t buffer_size;
       buffer_.GetReadBuffer(&buffer, &buffer_size);
       BOOL ok = ReadFile(handle_, buffer, buffer_size, NULL, &overlapped_);
-      if (!ok) return GetLastError() == ERROR_IO_PENDING;
+      if (!ok) {
+        return (GetLastError() == ERROR_IO_PENDING);
+      }
       buffer_.DataIsRead(overlapped_.InternalHigh);
     }
   }
@@ -838,6 +863,7 @@
   BufferList buffer_;
 
   DISALLOW_ALLOCATION();
+  DISALLOW_COPY_AND_ASSIGN(OverlappedHandle);
 };
 
 
@@ -910,12 +936,14 @@
 
   // Calculate the exit code.
   ASSERT(oh[2].GetDataSize() == 8);
-  uint32_t exit[2];
-  memmove(&exit, oh[2].GetFirstDataBuffer(), sizeof(exit));
+  uint32_t exit_codes[2];
+  memmove(&exit_codes, oh[2].GetFirstDataBuffer(), sizeof(exit_codes));
   oh[2].FreeDataBuffer();
-  intptr_t exit_code = exit[0];
-  intptr_t negative = exit[1];
-  if (negative) exit_code = -exit_code;
+  intptr_t exit_code = exit_codes[0];
+  intptr_t negative = exit_codes[1];
+  if (negative != 0) {
+    exit_code = -exit_code;
+  }
   result->set_exit_code(exit_code);
   return true;
 }
@@ -936,7 +964,9 @@
   if (!success) {
     process_handle = OpenProcess(PROCESS_TERMINATE, FALSE, id);
     // The process is already dead.
-    if (process_handle == INVALID_HANDLE_VALUE) return false;
+    if (process_handle == INVALID_HANDLE_VALUE) {
+      return false;
+    }
   }
   BOOL result = TerminateProcess(process_handle, -1);
   return result ? true : false;
@@ -990,12 +1020,16 @@
 
 intptr_t Process::SetSignalHandler(intptr_t signal) {
   signal = GetWinSignal(signal);
-  if (signal == -1) return -1;
+  if (signal == -1) {
+    return -1;
+  }
 
   // Generate a unique pipe name for the named pipe.
   wchar_t pipe_name[kMaxPipeNameSize];
   int status = GenerateNames<1>(&pipe_name);
-  if (status != 0) return status;
+  if (status != 0) {
+    return status;
+  }
 
   HANDLE fds[2];
   if (!CreateProcessPipe(fds, pipe_name, kInheritNone)) {
@@ -1024,12 +1058,14 @@
 
 void Process::ClearSignalHandler(intptr_t signal) {
   signal = GetWinSignal(signal);
-  if (signal == -1) return;
+  if (signal == -1) {
+    return;
+  }
   MutexLocker lock(signal_mutex);
   SignalInfo* handler = signal_handlers;
   while (handler != NULL) {
-    if (handler->port() == Dart_GetMainPortId() &&
-        handler->signal() == signal) {
+    if ((handler->port() == Dart_GetMainPortId()) &&
+        (handler->signal() == signal)) {
       handler->Unlink();
       break;
     }
@@ -1050,3 +1086,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_WINDOWS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/root_certificates_unsupported.cc b/runtime/bin/root_certificates_unsupported.cc
new file mode 100644
index 0000000..a899e3c
--- /dev/null
+++ b/runtime/bin/root_certificates_unsupported.cc
@@ -0,0 +1,22 @@
+// 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.
+
+#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
+
+#include "platform/globals.h"
+#if defined(TARGET_OS_MACOS) || defined(TARGET_OS_ANDROID)
+
+namespace dart {
+namespace bin {
+
+const unsigned char* root_certificates_pem = NULL;
+unsigned int root_certificates_pem_length = 0;
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // defined(TARGET_OS_MACOS) || defined(TARGET_OS_ANDROID)
+
+#endif  // !defined(DART_IO_DISABLED) &&
+        // !defined(DART_IO_SECURE_SOCKET_DISABLED)
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index ec9479a..5b62b20 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -4,8 +4,8 @@
 
 #include <stdio.h>
 
-#include "bin/file.h"
 #include "bin/dartutils.h"
+#include "bin/file.h"
 #include "bin/platform.h"
 
 #include "vm/benchmark_test.h"
@@ -108,6 +108,7 @@
   const char* err_msg = Dart::InitOnce(dart::bin::vm_isolate_snapshot_buffer,
                                        NULL, NULL,
                                        NULL, NULL,
+                                       NULL,
                                        dart::bin::DartUtils::OpenFile,
                                        dart::bin::DartUtils::ReadFile,
                                        dart::bin::DartUtils::WriteFile,
diff --git a/runtime/bin/secure_socket.h b/runtime/bin/secure_socket.h
index 754d240..07ff2b0 100644
--- a/runtime/bin/secure_socket.h
+++ b/runtime/bin/secure_socket.h
@@ -5,130 +5,19 @@
 #ifndef BIN_SECURE_SOCKET_H_
 #define BIN_SECURE_SOCKET_H_
 
-#ifdef DART_IO_SECURE_SOCKET_DISABLED
+#if defined(DART_IO_DISABLED) || defined(DART_IO_SECURE_SOCKET_DISABLED)
 #error "secure_socket.h can only be included on builds with SSL enabled"
 #endif
 
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-#include <openssl/bio.h>
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-#include <openssl/x509.h>
-
-#include "bin/builtin.h"
-#include "bin/dartutils.h"
-#include "bin/socket.h"
-#include "bin/thread.h"
-#include "bin/utils.h"
-
-namespace dart {
-namespace bin {
-
-/* These are defined in root_certificates.cc. */
-extern const unsigned char* root_certificates_pem;
-extern unsigned int root_certificates_pem_length;
-
-/*
- * SSLFilter encapsulates the NSS SSL(TLS) code in a filter, that communicates
- * with the containing _SecureFilterImpl Dart object through four shared
- * ExternalByteArray buffers, for reading and writing plaintext, and
- * reading and writing encrypted text.  The filter handles handshaking
- * and certificate verification.
- */
-class SSLFilter {
- public:
-  // These enums must agree with those in sdk/lib/io/secure_socket.dart.
-  enum BufferIndex {
-    kReadPlaintext,
-    kWritePlaintext,
-    kReadEncrypted,
-    kWriteEncrypted,
-    kNumBuffers,
-    kFirstEncrypted = kReadEncrypted
-  };
-
-  SSLFilter()
-      : callback_error(NULL),
-        ssl_(NULL),
-        socket_side_(NULL),
-        string_start_(NULL),
-        string_length_(NULL),
-        handshake_complete_(NULL),
-        bad_certificate_callback_(NULL),
-        in_handshake_(false),
-        hostname_(NULL) { }
-
-  ~SSLFilter();
-
-  Dart_Handle Init(Dart_Handle dart_this);
-  void Connect(const char* hostname,
-               SSL_CTX* context,
-               bool is_server,
-               bool request_client_certificate,
-               bool require_client_certificate,
-               Dart_Handle protocols_handle);
-  void Destroy();
-  void Handshake();
-  void GetSelectedProtocol(Dart_NativeArguments args);
-  void Renegotiate(bool use_session_cache,
-                   bool request_client_certificate,
-                   bool require_client_certificate);
-  void RegisterHandshakeCompleteCallback(Dart_Handle handshake_complete);
-  void RegisterBadCertificateCallback(Dart_Handle callback);
-  Dart_Handle bad_certificate_callback() {
-    return Dart_HandleFromPersistent(bad_certificate_callback_);
-  }
-  int ProcessReadPlaintextBuffer(int start, int end);
-  int ProcessWritePlaintextBuffer(int start, int end);
-  int ProcessReadEncryptedBuffer(int start, int end);
-  int ProcessWriteEncryptedBuffer(int start, int end);
-  bool ProcessAllBuffers(int starts[kNumBuffers],
-                         int ends[kNumBuffers],
-                         bool in_handshake);
-  Dart_Handle PeerCertificate();
-  static void InitializeLibrary();
-  Dart_Handle callback_error;
-
-  static CObject* ProcessFilterRequest(const CObjectArray& request);
-
-  // The index of the external data field in _ssl that points to the SSLFilter.
-  static int filter_ssl_index;
-
-  // TODO(whesse): make private:
-  SSL* ssl_;
-  BIO* socket_side_;
-
-
- private:
-  static bool library_initialized_;
-  static Mutex* mutex_;  // To protect library initialization.
-
-  uint8_t* buffers_[kNumBuffers];
-  int buffer_size_;
-  int encrypted_buffer_size_;
-  Dart_PersistentHandle string_start_;
-  Dart_PersistentHandle string_length_;
-  Dart_PersistentHandle dart_buffer_objects_[kNumBuffers];
-  Dart_PersistentHandle handshake_complete_;
-  Dart_PersistentHandle bad_certificate_callback_;
-  bool in_handshake_;
-  bool is_server_;
-  char* hostname_;
-
-  static bool isBufferEncrypted(int i) {
-    return static_cast<BufferIndex>(i) >= kFirstEncrypted;
-  }
-  Dart_Handle InitializeBuffers(Dart_Handle dart_this);
-  void InitializePlatformData();
-
-  DISALLOW_COPY_AND_ASSIGN(SSLFilter);
-};
-
-}  // namespace bin
-}  // namespace dart
+#include "platform/globals.h"
+#if defined(TARGET_OS_ANDROID) || \
+    defined(TARGET_OS_LINUX)   || \
+    defined(TARGET_OS_WINDOWS)
+#include "bin/secure_socket_boringssl.h"
+#elif defined(TARGET_OS_MACOS)
+#include "bin/secure_socket_macos.h"
+#else
+#error Unknown target os.
+#endif
 
 #endif  // BIN_SECURE_SOCKET_H_
diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket_boringssl.cc
similarity index 91%
rename from runtime/bin/secure_socket.cc
rename to runtime/bin/secure_socket_boringssl.cc
index 7d79dc6..530c21a 100644
--- a/runtime/bin/secure_socket.cc
+++ b/runtime/bin/secure_socket_boringssl.cc
@@ -2,13 +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.
 
+#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
+
+#include "platform/globals.h"
+#if defined(TARGET_OS_ANDROID) || \
+    defined(TARGET_OS_LINUX)   || \
+    defined(TARGET_OS_WINDOWS)
+
 #include "bin/secure_socket.h"
+#include "bin/secure_socket_boringssl.h"
 
 #include <errno.h>
 #include <fcntl.h>
-#include <sys/stat.h>
 #include <stdio.h>
 #include <string.h>
+#include <sys/stat.h>
 
 #include <openssl/bio.h>
 #include <openssl/err.h>
@@ -83,8 +91,7 @@
 /* Handle an error reported from the BoringSSL library. */
 static void ThrowIOException(int status,
                              const char* exception_type,
-                             const char* message,
-                             bool free_message = false) {
+                             const char* message) {
   char error_string[SSL_ERROR_MESSAGE_BUFFER_SIZE];
   FetchErrorString(error_string, SSL_ERROR_MESSAGE_BUFFER_SIZE);
   OSError os_error_struct(status, error_string, OSError::kBoringSSL);
@@ -92,9 +99,6 @@
   Dart_Handle exception =
       DartUtils::NewDartIOException(exception_type, message, os_error);
   ASSERT(!Dart_IsError(exception));
-  if (free_message) {
-    free(const_cast<char*>(message));
-  }
   Dart_ThrowException(exception);
   UNREACHABLE();
 }
@@ -524,7 +528,6 @@
   DISALLOW_COPY_AND_ASSIGN(ScopedMemBIO);
 };
 
-
 template<typename T, void (*free_func)(T*)>
 class ScopedSSLType {
  public:
@@ -582,20 +585,12 @@
 
 typedef ScopedSSLType<PKCS12, PKCS12_free> ScopedPKCS12;
 typedef ScopedSSLType<X509, X509_free> ScopedX509;
-
 typedef ScopedSSLStackType<STACK_OF(X509), X509, X509_free> ScopedX509Stack;
-typedef ScopedSSLStackType<STACK_OF(X509_NAME), X509_NAME, X509_NAME_free>
-    ScopedX509NAMEStack;
 
-
-// We try reading data as PKCS12 only if reading as PEM was unsuccessful and
-// if there is no indication that the data is malformed PEM. We assume the data
-// is malformed PEM if it contains the start line, i.e. a line with ----- BEGIN.
-static bool TryPKCS12(bool pem_success) {
+static bool NoPEMStartLine() {
   uint32_t last_error = ERR_peek_last_error();
-  return !pem_success &&
-      (ERR_GET_LIB(last_error) == ERR_LIB_PEM) &&
-      (ERR_GET_REASON(last_error) == PEM_R_NO_START_LINE);
+  return (ERR_GET_LIB(last_error) == ERR_LIB_PEM) &&
+         (ERR_GET_REASON(last_error) == PEM_R_NO_START_LINE);
 }
 
 
@@ -623,13 +618,19 @@
 static EVP_PKEY* GetPrivateKey(BIO* bio, const char* password) {
   EVP_PKEY *key = PEM_read_bio_PrivateKey(
       bio, NULL, PasswordCallback, const_cast<char*>(password));
-  if (TryPKCS12(key != NULL)) {
-    // Reset the bio, and clear the error from trying to read as PEM.
-    ERR_clear_error();
-    BIO_reset(bio);
+  if (key == NULL) {
+    // We try reading data as PKCS12 only if reading as PEM was unsuccessful and
+    // if there is no indication that the data is malformed PEM. We assume the
+    // data is malformed PEM if it contains the start line, i.e. a line
+    // with ----- BEGIN.
+    if (NoPEMStartLine()) {
+      // Reset the bio, and clear the error from trying to read as PEM.
+      ERR_clear_error();
+      BIO_reset(bio);
 
-    // Try to decode as PKCS12
-    key = GetPrivateKeyPKCS12(bio, password);
+      // Try to decode as PKCS12.
+      key = GetPrivateKeyPKCS12(bio, password);
+    }
   }
   return key;
 }
@@ -680,7 +681,7 @@
                                              const char* password) {
   ScopedPKCS12 p12(d2i_PKCS12_bio(bio, NULL));
   if (p12.get() == NULL) {
-    return NULL;
+    return 0;
   }
 
   EVP_PKEY* key = NULL;
@@ -725,17 +726,12 @@
     }
   }
 
-  // If bio does not contain PEM data, the first call to PEM_read_bio_X509 will
-  // return NULL, and the while-loop will exit while status is still 0.
-  uint32_t err = ERR_peek_last_error();
-  if ((ERR_GET_LIB(err) != ERR_LIB_PEM) ||
-      (ERR_GET_REASON(err) != PEM_R_NO_START_LINE)) {
-    // If bio contains data that is trying to be PEM but is malformed, then
-    // this case will be triggered.
-    status = 0;
-  }
-
-  return status;
+  // If no PEM start line is found, it means that we read to the end of the
+  // file, or that the file isn't PEM. In the first case, status will be
+  // non-zero indicating success. In the second case, status will be 0,
+  // indicating that we should try to read as PKCS12. If there is some other
+  // error, we return it up to the caller.
+  return NoPEMStartLine() ? status : 0;
 }
 
 
@@ -743,11 +739,13 @@
                                        BIO* bio,
                                        const char* password) {
   int status = SetTrustedCertificatesBytesPEM(context, bio);
-  if (TryPKCS12(status != 0)) {
-    ERR_clear_error();
-    BIO_reset(bio);
-    status = SetTrustedCertificatesBytesPKCS12(context, bio, password);
-  } else if (status != 0) {
+  if (status == 0) {
+    if (NoPEMStartLine()) {
+      ERR_clear_error();
+      BIO_reset(bio);
+      status = SetTrustedCertificatesBytesPKCS12(context, bio, password);
+    }
+  } else {
     // The PEM file was successfully parsed.
     ERR_clear_error();
   }
@@ -770,9 +768,26 @@
 }
 
 
+void FUNCTION_NAME(SecurityContext_AlpnSupported)(Dart_NativeArguments args) {
+  Dart_SetReturnValue(args, Dart_NewBoolean(true));
+}
+
+
 void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
     Dart_NativeArguments args) {
   SSL_CTX* context = GetSecurityContext(args);
+#if defined(TARGET_OS_ANDROID)
+  // On Android, we don't compile in the trusted root certificates. Insead,
+  // we use the directory of trusted certificates already present on the device.
+  // This saves ~240KB from the size of the binary. This has the drawback that
+  // SSL_do_handshake will synchronously hit the filesystem looking for root
+  // certs during its trust evaluation. We call SSL_do_handshake directly from
+  // the Dart thread so that Dart code can be invoked from the "bad certificate"
+  // callback called by SSL_do_handshake.
+  const char* android_cacerts = "/system/etc/security/cacerts";
+  int status = SSL_CTX_load_verify_locations(context, NULL, android_cacerts);
+  CheckStatus(status, "TlsException", "Failure trusting builtint roots");
+#else
   X509_STORE* store = SSL_CTX_get_cert_store(context);
   BIO* roots_bio =
       BIO_new_mem_buf(const_cast<unsigned char*>(root_certificates_pem),
@@ -785,6 +800,7 @@
     X509_STORE_add_cert(store, root_cert);
   }
   BIO_free(roots_bio);
+#endif  // defined(TARGET_OS_ANDROID)
 }
 
 
@@ -793,7 +809,7 @@
                                const char* password) {
   ScopedPKCS12 p12(d2i_PKCS12_bio(bio, NULL));
   if (p12.get() == NULL) {
-    return NULL;
+    return 0;
   }
 
   EVP_PKEY* key = NULL;
@@ -860,27 +876,19 @@
     // count is increased by SSL_CTX_use_certificate.
   }
 
-  // If bio does not contain PEM data, the first call to PEM_read_bio_X509 will
-  // return NULL, and the while-loop will exit while status is still 0.
-  uint32_t err = ERR_peek_last_error();
-  if ((ERR_GET_LIB(err) != ERR_LIB_PEM) ||
-      (ERR_GET_REASON(err) != PEM_R_NO_START_LINE)) {
-    // If bio contains data that is trying to be PEM but is malformed, then
-    // this case will be triggered.
-    status = 0;
-  }
-
-  return status;
+  return NoPEMStartLine() ? status : 0;
 }
 
 
 static int UseChainBytes(SSL_CTX* context, BIO* bio, const char* password) {
   int status = UseChainBytesPEM(context, bio);
-  if (TryPKCS12(status != 0)) {
-    ERR_clear_error();
-    BIO_reset(bio);
-    status = UseChainBytesPKCS12(context, bio, password);
-  } else if (status != 0) {
+  if (status == 0) {
+    if (NoPEMStartLine()) {
+      ERR_clear_error();
+      BIO_reset(bio);
+      status = UseChainBytesPKCS12(context, bio, password);
+    }
+  } else {
     // The PEM file was successfully read.
     ERR_clear_error();
   }
@@ -903,16 +911,12 @@
 }
 
 
-static STACK_OF(X509_NAME)* GetCertificateNamesPKCS12(BIO* bio,
-                                                      const char* password) {
+static int SetClientAuthoritiesPKCS12(SSL_CTX* context,
+                                      BIO* bio,
+                                      const char* password) {
   ScopedPKCS12 p12(d2i_PKCS12_bio(bio, NULL));
   if (p12.get() == NULL) {
-    return NULL;
-  }
-
-  ScopedX509NAMEStack result(sk_X509_NAME_new_null());
-  if (result.get() == NULL) {
-    return NULL;
+    return 0;
   }
 
   EVP_PKEY* key = NULL;
@@ -920,99 +924,58 @@
   STACK_OF(X509) *ca_certs = NULL;
   int status = PKCS12_parse(p12.get(), password, &key, &cert, &ca_certs);
   if (status == 0) {
-    return NULL;
+    return status;
   }
 
-  ScopedX509 x509(cert);
-  ScopedX509Stack certs(ca_certs);
-  X509_NAME* x509_name = X509_get_subject_name(x509.get());
-  if (x509_name == NULL) {
-    return NULL;
+  ScopedX509Stack cert_stack(ca_certs);
+  status = SSL_CTX_add_client_CA(context, cert);
+  if (status == 0) {
+    X509_free(cert);
+    return status;
   }
 
-  x509_name = X509_NAME_dup(x509_name);
-  if (x509_name == NULL) {
-    return NULL;
-  }
-
-  sk_X509_NAME_push(result.get(), x509_name);
-
-  while (true) {
-    ScopedX509 ca(sk_X509_shift(certs.get()));
-    if (ca.get() == NULL) {
-      break;
+  X509* ca;
+  while ((ca = sk_X509_shift(cert_stack.get())) != NULL) {
+    status = SSL_CTX_add_client_CA(context, ca);
+    X509_free(ca);  // The name has been extracted.
+    if (status == 0) {
+      return status;
     }
-
-    X509_NAME* x509_name = X509_get_subject_name(ca.get());
-    if (x509_name == NULL) {
-      return NULL;
-    }
-
-    x509_name = X509_NAME_dup(x509_name);
-    if (x509_name == NULL) {
-      return NULL;
-    }
-
-    sk_X509_NAME_push(result.get(), x509_name);
   }
 
-  return result.release();
+  return status;
 }
 
 
-static STACK_OF(X509_NAME)* GetCertificateNamesPEM(BIO* bio) {
-  ScopedX509NAMEStack result(sk_X509_NAME_new_null());
-  if (result.get() == NULL) {
-    return NULL;
-  }
-
-  while (true) {
-    ScopedX509 x509(PEM_read_bio_X509(bio, NULL, NULL, NULL));
-    if (x509.get() == NULL) {
-      break;
+static int SetClientAuthoritiesPEM(SSL_CTX* context, BIO* bio) {
+  int status = 0;
+  X509* cert = NULL;
+  while ((cert = PEM_read_bio_X509(bio, NULL, NULL, NULL)) != NULL) {
+    status = SSL_CTX_add_client_CA(context, cert);
+    X509_free(cert);  // The name has been extracted.
+    if (status == 0) {
+      return status;
     }
-
-    X509_NAME* x509_name = X509_get_subject_name(x509.get());
-    if (x509_name == NULL) {
-      return NULL;
-    }
-
-    // Duplicate the name to put it on the stack.
-    x509_name = X509_NAME_dup(x509_name);
-    if (x509_name == NULL) {
-      return NULL;
-    }
-    sk_X509_NAME_push(result.get(), x509_name);
   }
-
-  if (sk_X509_NAME_num(result.get()) == 0) {
-    // The data was not PEM.
-    return NULL;
-  }
-
-  uint32_t err = ERR_peek_last_error();
-  if ((ERR_GET_LIB(err) != ERR_LIB_PEM) ||
-      (ERR_GET_REASON(err) != PEM_R_NO_START_LINE)) {
-    // The data was trying to be PEM, but was malformed.
-    return NULL;
-  }
-
-  return result.release();
+  return NoPEMStartLine() ? status : 0;
 }
 
 
-static STACK_OF(X509_NAME)* GetCertificateNames(BIO* bio,
-                                                const char* password) {
-  STACK_OF(X509_NAME)* result = GetCertificateNamesPEM(bio);
-  if (TryPKCS12(result != NULL)) {
-    ERR_clear_error();
-    BIO_reset(bio);
-    result = GetCertificateNamesPKCS12(bio, password);
-  } else if (result != NULL) {
+static int SetClientAuthorities(SSL_CTX* context,
+                                BIO* bio,
+                                const char* password) {
+  int status = SetClientAuthoritiesPEM(context, bio);
+  if (status == 0) {
+    if (NoPEMStartLine()) {
+      ERR_clear_error();
+      BIO_reset(bio);
+      status = SetClientAuthoritiesPKCS12(context, bio, password);
+    }
+  } else {
     // The PEM file was successfully parsed.
     ERR_clear_error();
   }
-  return result;
+  return status;
 }
 
 
@@ -1020,19 +983,16 @@
     Dart_NativeArguments args) {
   SSL_CTX* context = GetSecurityContext(args);
   const char* password = GetPasswordArgument(args, 2);
-  STACK_OF(X509_NAME)* certificate_names;
 
+  int status;
   {
     ScopedMemBIO bio(ThrowIfError(Dart_GetNativeArgument(args, 1)));
-    certificate_names = GetCertificateNames(bio.bio(), password);
+    status = SetClientAuthorities(context, bio.bio(), password);
   }
 
-  if (certificate_names != NULL) {
-    SSL_CTX_set_client_CA_list(context, certificate_names);
-  } else {
-    Dart_ThrowException(DartUtils::NewDartArgumentError(
-        "Could not load certificate names from file in SetClientAuthorities"));
-  }
+  CheckStatus(status,
+      "TlsException",
+      "Failure in setClientAuthoritiesBytes");
 }
 
 
@@ -1720,3 +1680,8 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // defined(TARGET_OS_LINUX)
+
+#endif  // !defined(DART_IO_DISABLED) &&
+        // !defined(DART_IO_SECURE_SOCKET_DISABLED)
diff --git a/runtime/bin/secure_socket_boringssl.h b/runtime/bin/secure_socket_boringssl.h
new file mode 100644
index 0000000..9dbe250
--- /dev/null
+++ b/runtime/bin/secure_socket_boringssl.h
@@ -0,0 +1,133 @@
+// 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.
+
+#ifndef BIN_SECURE_SOCKET_BORINGSSL_H_
+#define BIN_SECURE_SOCKET_BORINGSSL_H_
+
+#if !defined(BIN_SECURE_SOCKET_H_)
+#error Do not include secure_socket_boringssl.h directly. Use secure_socket.h.
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include <openssl/bio.h>
+#include <openssl/err.h>
+#include <openssl/ssl.h>
+#include <openssl/x509.h>
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "bin/socket.h"
+#include "bin/thread.h"
+#include "bin/utils.h"
+
+namespace dart {
+namespace bin {
+
+/* These are defined in root_certificates.cc. */
+extern const unsigned char* root_certificates_pem;
+extern unsigned int root_certificates_pem_length;
+
+/*
+ * SSLFilter encapsulates the NSS SSL(TLS) code in a filter, that communicates
+ * with the containing _SecureFilterImpl Dart object through four shared
+ * ExternalByteArray buffers, for reading and writing plaintext, and
+ * reading and writing encrypted text.  The filter handles handshaking
+ * and certificate verification.
+ */
+class SSLFilter {
+ public:
+  // These enums must agree with those in sdk/lib/io/secure_socket.dart.
+  enum BufferIndex {
+    kReadPlaintext,
+    kWritePlaintext,
+    kReadEncrypted,
+    kWriteEncrypted,
+    kNumBuffers,
+    kFirstEncrypted = kReadEncrypted
+  };
+
+  SSLFilter()
+      : callback_error(NULL),
+        ssl_(NULL),
+        socket_side_(NULL),
+        string_start_(NULL),
+        string_length_(NULL),
+        handshake_complete_(NULL),
+        bad_certificate_callback_(NULL),
+        in_handshake_(false),
+        hostname_(NULL) { }
+
+  ~SSLFilter();
+
+  Dart_Handle Init(Dart_Handle dart_this);
+  void Connect(const char* hostname,
+               SSL_CTX* context,
+               bool is_server,
+               bool request_client_certificate,
+               bool require_client_certificate,
+               Dart_Handle protocols_handle);
+  void Destroy();
+  void Handshake();
+  void GetSelectedProtocol(Dart_NativeArguments args);
+  void Renegotiate(bool use_session_cache,
+                   bool request_client_certificate,
+                   bool require_client_certificate);
+  void RegisterHandshakeCompleteCallback(Dart_Handle handshake_complete);
+  void RegisterBadCertificateCallback(Dart_Handle callback);
+  Dart_Handle bad_certificate_callback() {
+    return Dart_HandleFromPersistent(bad_certificate_callback_);
+  }
+  int ProcessReadPlaintextBuffer(int start, int end);
+  int ProcessWritePlaintextBuffer(int start, int end);
+  int ProcessReadEncryptedBuffer(int start, int end);
+  int ProcessWriteEncryptedBuffer(int start, int end);
+  bool ProcessAllBuffers(int starts[kNumBuffers],
+                         int ends[kNumBuffers],
+                         bool in_handshake);
+  Dart_Handle PeerCertificate();
+  static void InitializeLibrary();
+  Dart_Handle callback_error;
+
+  static CObject* ProcessFilterRequest(const CObjectArray& request);
+
+  // The index of the external data field in _ssl that points to the SSLFilter.
+  static int filter_ssl_index;
+
+  // TODO(whesse): make private:
+  SSL* ssl_;
+  BIO* socket_side_;
+
+ private:
+  static bool library_initialized_;
+  static Mutex* mutex_;  // To protect library initialization.
+
+  uint8_t* buffers_[kNumBuffers];
+  int buffer_size_;
+  int encrypted_buffer_size_;
+  Dart_PersistentHandle string_start_;
+  Dart_PersistentHandle string_length_;
+  Dart_PersistentHandle dart_buffer_objects_[kNumBuffers];
+  Dart_PersistentHandle handshake_complete_;
+  Dart_PersistentHandle bad_certificate_callback_;
+  bool in_handshake_;
+  bool is_server_;
+  char* hostname_;
+
+  static bool isBufferEncrypted(int i) {
+    return static_cast<BufferIndex>(i) >= kFirstEncrypted;
+  }
+  Dart_Handle InitializeBuffers(Dart_Handle dart_this);
+  void InitializePlatformData();
+
+  DISALLOW_COPY_AND_ASSIGN(SSLFilter);
+};
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // BIN_SECURE_SOCKET_BORINGSSL_H_
diff --git a/runtime/bin/secure_socket_ios.cc b/runtime/bin/secure_socket_ios.cc
new file mode 100644
index 0000000..76da230
--- /dev/null
+++ b/runtime/bin/secure_socket_ios.cc
@@ -0,0 +1,1340 @@
+// 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.
+
+#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
+
+#include "platform/globals.h"
+#if TARGET_OS_IOS
+
+#include "bin/secure_socket.h"
+#include "bin/secure_socket_macos.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/syslimits.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <Security/SecureTransport.h>
+#include <Security/Security.h>
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "bin/lockers.h"
+#include "bin/log.h"
+#include "bin/socket.h"
+#include "bin/thread.h"
+#include "bin/utils.h"
+
+#include "platform/text_buffer.h"
+#include "platform/utils.h"
+
+#include "include/dart_api.h"
+
+// Return the error from the containing function if handle is an error handle.
+#define RETURN_IF_ERROR(handle)                                                \
+  {                                                                            \
+    Dart_Handle __handle = handle;                                             \
+    if (Dart_IsError((__handle))) {                                            \
+      return __handle;                                                         \
+    }                                                                          \
+  }
+
+namespace dart {
+namespace bin {
+
+static const int kSSLFilterNativeFieldIndex = 0;
+static const int kSecurityContextNativeFieldIndex = 0;
+static const int kX509NativeFieldIndex = 0;
+
+static const bool SSL_LOG_STATUS = false;
+static const bool SSL_LOG_DATA = false;
+static const int SSL_ERROR_MESSAGE_BUFFER_SIZE = 1000;
+
+// SSLCertContext wraps the certificates needed for a SecureTransport
+// connection. Fields are protected by the mutex_ field, and may only be set
+// once. This is to allow access by both the Dart thread and the IOService
+// thread. Setters return false if the field was already set.
+class SSLCertContext {
+ public:
+  SSLCertContext() :
+      mutex_(new Mutex()),
+      trusted_certs_(NULL),
+      trust_builtin_(false) {}
+
+  ~SSLCertContext() {
+    delete mutex_;
+    if (trusted_certs_ != NULL) {
+      CFRelease(trusted_certs_);
+    }
+  }
+
+  CFMutableArrayRef trusted_certs() {
+    MutexLocker m(mutex_);
+    return trusted_certs_;
+  }
+  void add_trusted_cert(SecCertificateRef trusted_cert) {
+    // Takes ownership of trusted_cert.
+    MutexLocker m(mutex_);
+    if (trusted_certs_ == NULL) {
+      trusted_certs_ = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+    }
+    CFArrayAppendValue(trusted_certs_, trusted_cert);
+    CFRelease(trusted_cert);  // trusted_cert is retained by the array.
+  }
+
+  bool trust_builtin() {
+    MutexLocker m(mutex_);
+    return trust_builtin_;
+  }
+  void set_trust_builtin(bool trust_builtin) {
+    MutexLocker m(mutex_);
+    trust_builtin_ = trust_builtin;
+  }
+
+ private:
+  // The context is accessed both by Dart code and the IOService. This mutex
+  // protects all fields.
+  Mutex* mutex_;
+  CFMutableArrayRef trusted_certs_;
+  bool trust_builtin_;
+
+  DISALLOW_COPY_AND_ASSIGN(SSLCertContext);
+};
+
+// Handle an error reported from the SecureTransport library.
+static void ThrowIOException(OSStatus status,
+                             const char* exception_type,
+                             const char* message) {
+  TextBuffer status_message(SSL_ERROR_MESSAGE_BUFFER_SIZE);
+  status_message.Printf("OSStatus = %ld: https://www.osstatus.com",
+      static_cast<intptr_t>(status));
+  OSError os_error_struct(status, status_message.buf(), OSError::kBoringSSL);
+  Dart_Handle os_error = DartUtils::NewDartOSError(&os_error_struct);
+  Dart_Handle exception =
+      DartUtils::NewDartIOException(exception_type, message, os_error);
+  ASSERT(!Dart_IsError(exception));
+  Dart_ThrowException(exception);
+  UNREACHABLE();
+}
+
+
+static void CheckStatus(OSStatus status,
+                        const char* type,
+                        const char* message) {
+  if (status == noErr) {
+    return;
+  }
+  ThrowIOException(status, type, message);
+}
+
+
+static SSLFilter* GetFilter(Dart_NativeArguments args) {
+  SSLFilter* filter;
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_GetNativeInstanceField(
+      dart_this,
+      kSSLFilterNativeFieldIndex,
+      reinterpret_cast<intptr_t*>(&filter)));
+  return filter;
+}
+
+
+static void DeleteFilter(void* isolate_data,
+                         Dart_WeakPersistentHandle handle,
+                         void* context_pointer) {
+  SSLFilter* filter = reinterpret_cast<SSLFilter*>(context_pointer);
+  delete filter;
+}
+
+
+static Dart_Handle SetFilter(Dart_NativeArguments args, SSLFilter* filter) {
+  ASSERT(filter != NULL);
+  const int approximate_size_of_filter = 1500;
+  Dart_Handle dart_this = Dart_GetNativeArgument(args, 0);
+  RETURN_IF_ERROR(dart_this);
+  ASSERT(Dart_IsInstance(dart_this));
+  Dart_Handle err = Dart_SetNativeInstanceField(
+      dart_this,
+      kSSLFilterNativeFieldIndex,
+      reinterpret_cast<intptr_t>(filter));
+  RETURN_IF_ERROR(err);
+  Dart_NewWeakPersistentHandle(dart_this,
+                               reinterpret_cast<void*>(filter),
+                               approximate_size_of_filter,
+                               DeleteFilter);
+  return Dart_Null();
+}
+
+
+static SSLCertContext* GetSecurityContext(Dart_NativeArguments args) {
+  SSLCertContext* context;
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_GetNativeInstanceField(
+      dart_this,
+      kSecurityContextNativeFieldIndex,
+      reinterpret_cast<intptr_t*>(&context)));
+  return context;
+}
+
+
+static void DeleteCertContext(void* isolate_data,
+                              Dart_WeakPersistentHandle handle,
+                              void* context_pointer) {
+  SSLCertContext* context = static_cast<SSLCertContext*>(context_pointer);
+  delete context;
+}
+
+
+static Dart_Handle SetSecurityContext(Dart_NativeArguments args,
+                                      SSLCertContext* context) {
+  const int approximate_size_of_context = 1500;
+  Dart_Handle dart_this = Dart_GetNativeArgument(args, 0);
+  RETURN_IF_ERROR(dart_this);
+  ASSERT(Dart_IsInstance(dart_this));
+  Dart_Handle err = Dart_SetNativeInstanceField(
+      dart_this,
+      kSecurityContextNativeFieldIndex,
+      reinterpret_cast<intptr_t>(context));
+  RETURN_IF_ERROR(err);
+  Dart_NewWeakPersistentHandle(dart_this,
+                               context,
+                               approximate_size_of_context,
+                               DeleteCertContext);
+  return Dart_Null();
+}
+
+
+static void ReleaseCertificate(void* isolate_data,
+                               Dart_WeakPersistentHandle handle,
+                               void* context_pointer) {
+  SecCertificateRef cert = reinterpret_cast<SecCertificateRef>(context_pointer);
+  CFRelease(cert);
+}
+
+
+static Dart_Handle WrappedX509Certificate(SecCertificateRef certificate) {
+  const intptr_t approximate_size_of_certificate = 1500;
+  if (certificate == NULL) {
+    return Dart_Null();
+  }
+  Dart_Handle x509_type =
+      DartUtils::GetDartType(DartUtils::kIOLibURL, "X509Certificate");
+  if (Dart_IsError(x509_type)) {
+    return x509_type;
+  }
+  Dart_Handle arguments[] = { NULL };
+
+  Dart_Handle result =
+      Dart_New(x509_type, DartUtils::NewString("_"), 0, arguments);
+  if (Dart_IsError(result)) {
+    return result;
+  }
+  ASSERT(Dart_IsInstance(result));
+
+  // CFRetain in case the returned Dart object outlives the SecurityContext.
+  // CFRelease is in the Dart object's finalizer
+  CFRetain(certificate);
+  Dart_NewWeakPersistentHandle(result,
+                               reinterpret_cast<void*>(certificate),
+                               approximate_size_of_certificate,
+                               ReleaseCertificate);
+
+  Dart_Handle status = Dart_SetNativeInstanceField(
+      result,
+      kX509NativeFieldIndex,
+      reinterpret_cast<intptr_t>(certificate));
+  if (Dart_IsError(status)) {
+    return status;
+  }
+  return result;
+}
+
+
+void FUNCTION_NAME(SecureSocket_Init)(Dart_NativeArguments args) {
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  SSLFilter* filter = new SSLFilter();  // Deleted in DeleteFilter finalizer.
+  Dart_Handle err = SetFilter(args, filter);
+  if (Dart_IsError(err)) {
+    delete filter;
+    Dart_PropagateError(err);
+  }
+  err = filter->Init(dart_this);
+  if (Dart_IsError(err)) {
+    // The finalizer was set up by SetFilter. It will delete `filter` if there
+    // is an error.
+    filter->Destroy();
+    Dart_PropagateError(err);
+  }
+}
+
+
+void FUNCTION_NAME(SecureSocket_Connect)(Dart_NativeArguments args) {
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  Dart_Handle host_name_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
+  Dart_Handle context_object = ThrowIfError(Dart_GetNativeArgument(args, 2));
+  bool is_server = DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3));
+  bool request_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 4));
+  bool require_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 5));
+
+  const char* host_name = NULL;
+  // TODO(whesse): Is truncating a Dart string containing \0 what we want?
+  ThrowIfError(Dart_StringToCString(host_name_object, &host_name));
+
+  SSLCertContext* context = NULL;
+  if (!Dart_IsNull(context_object)) {
+    ThrowIfError(Dart_GetNativeInstanceField(
+        context_object,
+        kSecurityContextNativeFieldIndex,
+        reinterpret_cast<intptr_t*>(&context)));
+  }
+
+  GetFilter(args)->Connect(dart_this,
+                           host_name,
+                           context,
+                           is_server,
+                           request_client_certificate,
+                           require_client_certificate);
+}
+
+
+void FUNCTION_NAME(SecureSocket_Destroy)(Dart_NativeArguments args) {
+  SSLFilter* filter = GetFilter(args);
+  // The SSLFilter is deleted in the finalizer for the Dart object created by
+  // SetFilter. There is no need to NULL-out the native field for the SSLFilter
+  // here because the SSLFilter won't be deleted until the finalizer for the
+  // Dart object runs while the Dart object is being GCd. This approach avoids a
+  // leak if Destroy isn't called, and avoids a NULL-dereference if Destroy is
+  // called more than once.
+  filter->Destroy();
+}
+
+
+void FUNCTION_NAME(SecureSocket_Handshake)(Dart_NativeArguments args) {
+  OSStatus status = GetFilter(args)->CheckHandshake();
+  CheckStatus(status, "HandshakeException", "Handshake error");
+}
+
+
+void FUNCTION_NAME(SecureSocket_GetSelectedProtocol)(
+    Dart_NativeArguments args) {
+  Dart_SetReturnValue(args, Dart_Null());
+}
+
+
+void FUNCTION_NAME(SecureSocket_Renegotiate)(Dart_NativeArguments args) {
+  bool use_session_cache =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 1));
+  bool request_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 2));
+  bool require_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3));
+  GetFilter(args)->Renegotiate(use_session_cache,
+                               request_client_certificate,
+                               require_client_certificate);
+}
+
+
+void FUNCTION_NAME(SecureSocket_RegisterHandshakeCompleteCallback)(
+    Dart_NativeArguments args) {
+  Dart_Handle handshake_complete =
+      ThrowIfError(Dart_GetNativeArgument(args, 1));
+  if (!Dart_IsClosure(handshake_complete)) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Illegal argument to RegisterHandshakeCompleteCallback"));
+  }
+  GetFilter(args)->RegisterHandshakeCompleteCallback(handshake_complete);
+}
+
+
+void FUNCTION_NAME(SecureSocket_RegisterBadCertificateCallback)(
+    Dart_NativeArguments args) {
+  Dart_Handle callback =
+      ThrowIfError(Dart_GetNativeArgument(args, 1));
+  if (!Dart_IsClosure(callback) && !Dart_IsNull(callback)) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Illegal argument to RegisterBadCertificateCallback"));
+  }
+  GetFilter(args)->RegisterBadCertificateCallback(callback);
+}
+
+
+void FUNCTION_NAME(SecureSocket_PeerCertificate)(Dart_NativeArguments args) {
+  Dart_SetReturnValue(args, GetFilter(args)->PeerCertificate());
+}
+
+
+void FUNCTION_NAME(SecureSocket_FilterPointer)(Dart_NativeArguments args) {
+  intptr_t filter_pointer = reinterpret_cast<intptr_t>(GetFilter(args));
+  Dart_SetReturnValue(args, Dart_NewInteger(filter_pointer));
+}
+
+
+void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) {
+  SSLCertContext* cert_context = new SSLCertContext();
+  // cert_context deleted in DeleteCertContext finalizer.
+  Dart_Handle err = SetSecurityContext(args, cert_context);
+  if (Dart_IsError(err)) {
+    delete cert_context;
+    Dart_PropagateError(err);
+  }
+}
+
+
+void FUNCTION_NAME(SecurityContext_UsePrivateKeyBytes)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "SecurityContext.usePrivateKeyBytes is not yet implemented."));
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetTrustedCertificatesBytes)(
+    Dart_NativeArguments args) {
+  SSLCertContext* context = GetSecurityContext(args);
+
+  OSStatus status = noErr;
+  SecCertificateRef cert = NULL;
+  {
+    ScopedMemBuffer buffer(ThrowIfError(Dart_GetNativeArgument(args, 1)));
+    CFDataRef cfdata = CFDataCreateWithBytesNoCopy(
+        NULL, buffer.get(), buffer.length(), kCFAllocatorNull);
+    cert = SecCertificateCreateWithData(NULL, cfdata);
+    CFRelease(cfdata);
+  }
+
+  // Add the certs to the context.
+  if (cert != NULL) {
+    context->add_trusted_cert(cert);
+  } else {
+    status = errSSLBadCert;
+  }
+  CheckStatus(status, "TlsException", "Failure in setTrustedCertificatesBytes");
+}
+
+
+void FUNCTION_NAME(SecurityContext_AlpnSupported)(Dart_NativeArguments args) {
+  Dart_SetReturnValue(args, Dart_NewBoolean(false));
+}
+
+
+void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
+    Dart_NativeArguments args) {
+  SSLCertContext* context = GetSecurityContext(args);
+  context->set_trust_builtin(true);
+}
+
+
+void FUNCTION_NAME(SecurityContext_UseCertificateChainBytes)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "SecurityContext.useCertificateChainBytes is not yet implemented."));
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetClientAuthoritiesBytes)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "SecurityContext.setClientAuthoritiesBytes is not yet implemented."));
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "ALPN is not supported on this platform"));
+}
+
+
+void FUNCTION_NAME(X509_Subject)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "X509Certificate.subject is not yet implemented."));
+}
+
+
+void FUNCTION_NAME(X509_Issuer)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "X509Certificate.issuer is not supported on this platform."));
+}
+
+
+void FUNCTION_NAME(X509_StartValidity)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "X509Certificate.startValidity is not supported on this platform."));
+}
+
+
+void FUNCTION_NAME(X509_EndValidity)(Dart_NativeArguments args) {
+    Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "X509Certificate.endValidity is not supported on this platform."));
+}
+
+
+// Pushes data through the SSL filter, reading and writing from circular
+// buffers shared with Dart. Called from the IOService thread.
+//
+// The Dart _SecureFilterImpl class contains 4 ExternalByteArrays used to
+// pass encrypted and plaintext data to and from the C++ SSLFilter object.
+//
+// ProcessFilter is called with a CObject array containing the pointer to
+// the SSLFilter, encoded as an int, and the start and end positions of the
+// valid data in the four circular buffers.  The function only reads from
+// the valid data area of the input buffers, and only writes to the free
+// area of the output buffers.  The function returns the new start and end
+// positions in the buffers, but it only updates start for input buffers, and
+// end for output buffers.  Therefore, the Dart thread can simultaneously
+// write to the free space and end pointer of input buffers, and read from
+// the data space of output buffers, and modify the start pointer.
+//
+// When ProcessFilter returns, the Dart thread is responsible for combining
+// the updated pointers from Dart and C++, to make the new valid state of
+// the circular buffer.
+CObject* SSLFilter::ProcessFilterRequest(const CObjectArray& request) {
+  CObjectIntptr filter_object(request[0]);
+  SSLFilter* filter = reinterpret_cast<SSLFilter*>(filter_object.Value());
+  bool in_handshake = CObjectBool(request[1]).Value();
+  intptr_t starts[SSLFilter::kNumBuffers];
+  intptr_t ends[SSLFilter::kNumBuffers];
+  for (intptr_t i = 0; i < SSLFilter::kNumBuffers; ++i) {
+    starts[i] = CObjectInt32(request[2 * i + 2]).Value();
+    ends[i] = CObjectInt32(request[2 * i + 3]).Value();
+  }
+
+  OSStatus status = filter->ProcessAllBuffers(starts, ends, in_handshake);
+  if (status == noErr) {
+    CObjectArray* result = new CObjectArray(
+        CObject::NewArray(SSLFilter::kNumBuffers * 2));
+    for (intptr_t i = 0; i < SSLFilter::kNumBuffers; ++i) {
+      result->SetAt(2 * i, new CObjectInt32(CObject::NewInt32(starts[i])));
+      result->SetAt(2 * i + 1, new CObjectInt32(CObject::NewInt32(ends[i])));
+    }
+    return result;
+  } else {
+    TextBuffer status_message(SSL_ERROR_MESSAGE_BUFFER_SIZE);
+    status_message.Printf("OSStatus = %ld: https://www.osstatus.com",
+        static_cast<intptr_t>(status));
+    CObjectArray* result = new CObjectArray(CObject::NewArray(2));
+    result->SetAt(0, new CObjectInt32(CObject::NewInt32(status)));
+    result->SetAt(1, new CObjectString(CObject::NewString(
+        status_message.buf())));
+    return result;
+  }
+}
+
+
+// Usually buffer_starts_ and buffer_ends_ are populated by ProcessAllBuffers,
+// called from ProcessFilterRequest, called from the IOService thread.
+// However, the first call to SSLHandshake comes from the Dart thread, and so
+// doesn't go through there. This results in calls to SSLReadCallback and
+// SSLWriteCallback in which buffer_starts_ and buffer_ends_ haven't been set
+// up. In that case, since we're coming from Dart anyway, we can access the
+// fieds directly from the Dart objects.
+intptr_t SSLFilter::GetBufferStart(intptr_t idx) const {
+  if (buffer_starts_[idx] != NULL) {
+    return *buffer_starts_[idx];
+  }
+  Dart_Handle buffer_handle =
+      ThrowIfError(Dart_HandleFromPersistent(dart_buffer_objects_[idx]));
+  Dart_Handle start_handle =
+      ThrowIfError(Dart_GetField(buffer_handle, DartUtils::NewString("start")));
+  int64_t start = DartUtils::GetIntegerValue(start_handle);
+  return static_cast<intptr_t>(start);
+}
+
+
+intptr_t SSLFilter::GetBufferEnd(intptr_t idx) const {
+  if (buffer_ends_[idx] != NULL) {
+    return *buffer_ends_[idx];
+  }
+  Dart_Handle buffer_handle =
+      ThrowIfError(Dart_HandleFromPersistent(dart_buffer_objects_[idx]));
+  Dart_Handle end_handle =
+      ThrowIfError(Dart_GetField(buffer_handle, DartUtils::NewString("end")));
+  int64_t end = DartUtils::GetIntegerValue(end_handle);
+  return static_cast<intptr_t>(end);
+}
+
+
+void SSLFilter::SetBufferStart(intptr_t idx, intptr_t value) {
+  if (buffer_starts_[idx] != NULL) {
+    *buffer_starts_[idx] = value;
+    return;
+  }
+  Dart_Handle buffer_handle =
+      ThrowIfError(Dart_HandleFromPersistent(dart_buffer_objects_[idx]));
+  ThrowIfError(DartUtils::SetIntegerField(
+      buffer_handle, "start", static_cast<int64_t>(value)));
+}
+
+
+void SSLFilter::SetBufferEnd(intptr_t idx, intptr_t value) {
+  if (buffer_ends_[idx] != NULL) {
+    *buffer_ends_[idx] = value;
+    return;
+  }
+  Dart_Handle buffer_handle =
+      ThrowIfError(Dart_HandleFromPersistent(dart_buffer_objects_[idx]));
+  ThrowIfError(DartUtils::SetIntegerField(
+      buffer_handle, "end", static_cast<int64_t>(value)));
+}
+
+
+OSStatus SSLFilter::ProcessAllBuffers(intptr_t starts[kNumBuffers],
+                                      intptr_t ends[kNumBuffers],
+                                      bool in_handshake) {
+  for (intptr_t i = 0; i < kNumBuffers; ++i) {
+    buffer_starts_[i] = &starts[i];
+    buffer_ends_[i] = &ends[i];
+  }
+
+  if (in_handshake) {
+    OSStatus status = Handshake();
+    if (status != noErr) {
+      return status;
+    }
+  } else {
+    for (intptr_t i = 0; i < kNumBuffers; ++i) {
+      intptr_t start = starts[i];
+      intptr_t end = ends[i];
+      intptr_t size =
+          isBufferEncrypted(i) ? encrypted_buffer_size_ : buffer_size_;
+      if (start < 0 || end < 0 || start >= size || end >= size) {
+        FATAL("Out-of-bounds internal buffer access in dart:io SecureSocket");
+      }
+      switch (i) {
+        case kReadPlaintext:
+          // Write data to the circular buffer's free space.  If the buffer
+          // is full, neither if statement is executed and nothing happens.
+          if (start <= end) {
+            // If the free space may be split into two segments,
+            // then the first is [end, size), unless start == 0.
+            // Then, since the last free byte is at position start - 2,
+            // the interval is [end, size - 1).
+            intptr_t buffer_end = (start == 0) ? size - 1 : size;
+            intptr_t bytes = 0;
+            OSStatus status =
+                ProcessReadPlaintextBuffer(end, buffer_end, &bytes);
+            if ((status != noErr) && (status != errSSLWouldBlock)) {
+              return status;
+            }
+            end += bytes;
+            ASSERT(end <= size);
+            if (end == size) {
+              end = 0;
+            }
+          }
+          if (start > end + 1) {
+            intptr_t bytes = 0;
+            OSStatus status =
+                ProcessReadPlaintextBuffer(end, start - 1, &bytes);
+            if ((status != noErr) && (status != errSSLWouldBlock)) {
+              return status;
+            }
+            end += bytes;
+            ASSERT(end < start);
+          }
+          ends[i] = end;
+          break;
+        case kWritePlaintext:
+          // Read/Write data from circular buffer.  If the buffer is empty,
+          // neither if statement's condition is true.
+          if (end < start) {
+            // Data may be split into two segments.  In this case,
+            // the first is [start, size).
+            intptr_t bytes = 0;
+            OSStatus status = ProcessWritePlaintextBuffer(start, size, &bytes);
+            if ((status != noErr) && (status != errSSLWouldBlock)) {
+              return status;
+            }
+            start += bytes;
+            ASSERT(start <= size);
+            if (start == size) {
+              start = 0;
+            }
+          }
+          if (start < end) {
+            intptr_t bytes = 0;
+            OSStatus status = ProcessWritePlaintextBuffer(start, end, &bytes);
+            if ((status != noErr) && (status != errSSLWouldBlock)) {
+              return status;
+            }
+            start += bytes;
+            ASSERT(start <= end);
+          }
+          starts[i] = start;
+          break;
+        case kReadEncrypted:
+        case kWriteEncrypted:
+          // These buffers are advanced through SSLReadCallback and
+          // SSLWriteCallback, which are called from SSLRead, SSLWrite, and
+          // SSLHandshake.
+          break;
+        default:
+          UNREACHABLE();
+      }
+    }
+  }
+
+  for (intptr_t i = 0; i < kNumBuffers; ++i) {
+    buffer_starts_[i] = NULL;
+    buffer_ends_[i] = NULL;
+  }
+  return noErr;
+}
+
+
+Dart_Handle SSLFilter::Init(Dart_Handle dart_this) {
+  ASSERT(string_start_ == NULL);
+  string_start_ = Dart_NewPersistentHandle(DartUtils::NewString("start"));
+  ASSERT(string_start_ != NULL);
+  ASSERT(string_length_ == NULL);
+  string_length_ = Dart_NewPersistentHandle(DartUtils::NewString("length"));
+  ASSERT(string_length_ != NULL);
+  ASSERT(bad_certificate_callback_ == NULL);
+  bad_certificate_callback_ = Dart_NewPersistentHandle(Dart_Null());
+  ASSERT(bad_certificate_callback_ != NULL);
+
+  // Caller handles cleanup on an error.
+  return InitializeBuffers(dart_this);
+}
+
+
+Dart_Handle SSLFilter::InitializeBuffers(Dart_Handle dart_this) {
+  // Create SSLFilter buffers as ExternalUint8Array objects.
+  Dart_Handle buffers_string = DartUtils::NewString("buffers");
+  RETURN_IF_ERROR(buffers_string);
+  Dart_Handle dart_buffers_object = Dart_GetField(dart_this, buffers_string);
+  RETURN_IF_ERROR(dart_buffers_object);
+  Dart_Handle secure_filter_impl_type = Dart_InstanceGetType(dart_this);
+  RETURN_IF_ERROR(secure_filter_impl_type);
+  Dart_Handle size_string = DartUtils::NewString("SIZE");
+  RETURN_IF_ERROR(size_string);
+  Dart_Handle dart_buffer_size = Dart_GetField(
+      secure_filter_impl_type, size_string);
+  RETURN_IF_ERROR(dart_buffer_size);
+
+  int64_t buffer_size = 0;
+  Dart_Handle err = Dart_IntegerToInt64(dart_buffer_size, &buffer_size);
+  RETURN_IF_ERROR(err);
+
+  Dart_Handle encrypted_size_string = DartUtils::NewString("ENCRYPTED_SIZE");
+  RETURN_IF_ERROR(encrypted_size_string);
+
+  Dart_Handle dart_encrypted_buffer_size = Dart_GetField(
+      secure_filter_impl_type, encrypted_size_string);
+  RETURN_IF_ERROR(dart_encrypted_buffer_size);
+
+  int64_t encrypted_buffer_size = 0;
+  err = Dart_IntegerToInt64(dart_encrypted_buffer_size, &encrypted_buffer_size);
+  RETURN_IF_ERROR(err);
+
+  if (buffer_size <= 0 || buffer_size > 1 * MB) {
+    FATAL("Invalid buffer size in _ExternalBuffer");
+  }
+  if (encrypted_buffer_size <= 0 || encrypted_buffer_size > 1 * MB) {
+    FATAL("Invalid encrypted buffer size in _ExternalBuffer");
+  }
+  buffer_size_ = static_cast<intptr_t>(buffer_size);
+  encrypted_buffer_size_ = static_cast<intptr_t>(encrypted_buffer_size);
+
+  Dart_Handle data_identifier = DartUtils::NewString("data");
+  RETURN_IF_ERROR(data_identifier);
+
+  for (int i = 0; i < kNumBuffers; i++) {
+    int size = isBufferEncrypted(i) ? encrypted_buffer_size_ : buffer_size_;
+    buffers_[i] = new uint8_t[size];
+    ASSERT(buffers_[i] != NULL);
+    buffer_starts_[i] = NULL;
+    buffer_ends_[i] = NULL;
+    dart_buffer_objects_[i] = NULL;
+  }
+
+  Dart_Handle result = Dart_Null();
+  for (int i = 0; i < kNumBuffers; ++i) {
+    int size = isBufferEncrypted(i) ? encrypted_buffer_size_ : buffer_size_;
+    result = Dart_ListGetAt(dart_buffers_object, i);
+    if (Dart_IsError(result)) {
+      break;
+    }
+
+    dart_buffer_objects_[i] = Dart_NewPersistentHandle(result);
+    ASSERT(dart_buffer_objects_[i] != NULL);
+    Dart_Handle data =
+        Dart_NewExternalTypedData(Dart_TypedData_kUint8, buffers_[i], size);
+    if (Dart_IsError(data)) {
+      result = data;
+      break;
+    }
+    result = Dart_HandleFromPersistent(dart_buffer_objects_[i]);
+    if (Dart_IsError(result)) {
+      break;
+    }
+    result = Dart_SetField(result, data_identifier, data);
+    if (Dart_IsError(result)) {
+      break;
+    }
+  }
+
+  // Caller handles cleanup on an error.
+  return result;
+}
+
+
+void SSLFilter::RegisterHandshakeCompleteCallback(Dart_Handle complete) {
+  ASSERT(NULL == handshake_complete_);
+  handshake_complete_ = Dart_NewPersistentHandle(complete);
+  ASSERT(handshake_complete_ != NULL);
+}
+
+
+void SSLFilter::RegisterBadCertificateCallback(Dart_Handle callback) {
+  ASSERT(bad_certificate_callback_ != NULL);
+  Dart_DeletePersistentHandle(bad_certificate_callback_);
+  bad_certificate_callback_ = Dart_NewPersistentHandle(callback);
+  ASSERT(bad_certificate_callback_ != NULL);
+}
+
+
+Dart_Handle SSLFilter::PeerCertificate() {
+  if (peer_certs_ == NULL) {
+    return Dart_Null();
+  }
+
+  CFTypeRef item = CFArrayGetValueAtIndex(peer_certs_, 0);
+  ASSERT(CFGetTypeID(item) == SecCertificateGetTypeID());
+  SecCertificateRef cert =
+      reinterpret_cast<SecCertificateRef>(const_cast<void*>(item));
+  if (cert == NULL) {
+    return Dart_Null();
+  }
+
+  return WrappedX509Certificate(cert);
+}
+
+
+void SSLFilter::Connect(Dart_Handle dart_this,
+                        const char* hostname,
+                        SSLCertContext* context,
+                        bool is_server,
+                        bool request_client_certificate,
+                        bool require_client_certificate) {
+  if (in_handshake_) {
+    FATAL("Connect called twice on the same _SecureFilter.");
+  }
+
+  // Create the underlying context
+  SSLContextRef ssl_context = SSLCreateContext(
+      NULL, is_server ? kSSLServerSide : kSSLClientSide, kSSLStreamType);
+
+  // Configure the context.
+  OSStatus status;
+  status = SSLSetPeerDomainName(ssl_context, hostname, strlen(hostname));
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set peer domain name");
+
+  status = SSLSetIOFuncs(
+      ssl_context, SSLFilter::SSLReadCallback, SSLFilter::SSLWriteCallback);
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set IO Callbacks");
+
+  status = SSLSetConnection(
+      ssl_context, reinterpret_cast<SSLConnectionRef>(this));
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set connection object");
+
+  // Always evaluate the certs manually so that we can cache the peer
+  // certificates in the context for calls to peerCertificate.
+  status = SSLSetSessionOption(
+      ssl_context, kSSLSessionOptionBreakOnServerAuth, true);
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set BreakOnServerAuth option");
+
+  status = SSLSetProtocolVersionMin(ssl_context, kTLSProtocol1);
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set minimum protocol version to kTLSProtocol1");
+
+  if (is_server) {
+    SSLAuthenticate auth =
+        require_client_certificate
+        ? kAlwaysAuthenticate
+        : (request_client_certificate ? kTryAuthenticate : kNeverAuthenticate);
+    status = SSLSetClientSideAuthenticate(ssl_context, auth);
+    CheckStatus(status,
+        "TlsException",
+        "Failed to set client authentication mode");
+
+    // If we're at least trying client authentication, then break handshake
+    // for client authentication.
+    if (auth != kNeverAuthenticate) {
+      status = SSLSetSessionOption(
+          ssl_context, kSSLSessionOptionBreakOnClientAuth, true);
+      CheckStatus(status,
+          "TlsException",
+          "Failed to set client authentication mode");
+    }
+  }
+
+  // Add the contexts to our wrapper.
+  cert_context_ = context;
+  ssl_context_ = ssl_context;
+  is_server_ = is_server;
+
+  // Kick-off the handshake. Expect the handshake to need more data.
+  // SSLHandshake calls our SSLReadCallback and SSLWriteCallback.
+  status = SSLHandshake(ssl_context);
+  ASSERT(status != noErr);
+  if (status == errSSLWouldBlock) {
+    status = noErr;
+    in_handshake_ = true;
+  }
+  CheckStatus(status,
+     "HandshakeException",
+      is_server_ ? "Handshake error in server" : "Handshake error in client");
+}
+
+
+OSStatus SSLFilter::EvaluatePeerTrust() {
+  OSStatus status = noErr;
+
+  if (SSL_LOG_STATUS) {
+    Log::Print("Handshake evaluating trust.\n");
+  }
+  SecTrustRef peer_trust = NULL;
+  status = SSLCopyPeerTrust(ssl_context_, &peer_trust);
+  if (status != noErr) {
+    if (is_server_ && (status == errSSLBadCert)) {
+      // A client certificate was requested, but not required, and wasn't sent.
+      return noErr;
+    }
+    if (SSL_LOG_STATUS) {
+      Log::Print("Handshake error from SSLCopyPeerTrust(): %ld.\n",
+          static_cast<intptr_t>(status));
+    }
+    return status;
+  }
+
+  CFArrayRef trusted_certs = NULL;
+  if (cert_context_->trusted_certs() != NULL) {
+    trusted_certs = CFArrayCreateCopy(NULL, cert_context_->trusted_certs());
+  } else {
+    trusted_certs = CFArrayCreate(NULL, NULL, 0, &kCFTypeArrayCallBacks);
+  }
+
+  status = SecTrustSetAnchorCertificates(peer_trust, trusted_certs);
+  if (status != noErr) {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Handshake error from SecTrustSetAnchorCertificates: %ld\n",
+          static_cast<intptr_t>(status));
+    }
+    CFRelease(trusted_certs);
+    CFRelease(peer_trust);
+    return status;
+  }
+
+  if (SSL_LOG_STATUS) {
+    Log::Print("Handshake %s built in root certs\n",
+        cert_context_->trust_builtin() ? "trusting" : "not trusting");
+  }
+
+  status = SecTrustSetAnchorCertificatesOnly(
+      peer_trust, !cert_context_->trust_builtin());
+  if (status != noErr) {
+    CFRelease(trusted_certs);
+    CFRelease(peer_trust);
+    return status;
+  }
+
+  SecTrustResultType trust_result;
+  status = SecTrustEvaluate(peer_trust, &trust_result);
+  if (status != noErr) {
+    CFRelease(trusted_certs);
+    CFRelease(peer_trust);
+    return status;
+  }
+
+  // Grab the peer's certificate chain.
+  CFIndex peer_chain_length = SecTrustGetCertificateCount(peer_trust);
+  CFMutableArrayRef peer_certs =
+      CFArrayCreateMutable(NULL, peer_chain_length, &kCFTypeArrayCallBacks);
+  for (CFIndex i = 0; i < peer_chain_length; ++i) {
+    CFArrayAppendValue(peer_certs,
+                       SecTrustGetCertificateAtIndex(peer_trust, i));
+  }
+  peer_certs_ = peer_certs;
+
+  CFRelease(trusted_certs);
+  CFRelease(peer_trust);
+
+  if ((trust_result == kSecTrustResultProceed) ||
+      (trust_result == kSecTrustResultUnspecified)) {
+    // Trusted.
+    return noErr;
+  } else {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Trust eval failed: trust_restul = %d\n", trust_result);
+    }
+    bad_cert_ = true;
+    return errSSLBadCert;
+  }
+}
+
+
+OSStatus SSLFilter::Handshake() {
+  ASSERT(cert_context_ != NULL);
+  ASSERT(ssl_context_ != NULL);
+  // Try and push handshake along.
+  if (SSL_LOG_STATUS) {
+    Log::Print("Doing SSLHandshake\n");
+  }
+  OSStatus status = SSLHandshake(ssl_context_);
+  if (SSL_LOG_STATUS) {
+    Log::Print("SSLHandshake returned %ld\n", static_cast<intptr_t>(status));
+  }
+
+  if ((status == errSSLServerAuthCompleted) ||
+      (status == errSSLClientAuthCompleted)) {
+    status = EvaluatePeerTrust();
+    if (status == errSSLBadCert) {
+      // Need to invoke the bad certificate callback.
+      return noErr;
+    } else if (status != noErr) {
+      return status;
+    }
+    // When trust evaluation succeeds, we can call SSLHandshake again
+    // immediately.
+    status = SSLHandshake(ssl_context_);
+  }
+
+  if (status == errSSLWouldBlock) {
+    in_handshake_ = true;
+    return noErr;
+  }
+
+  // Handshake succeeded.
+  if ((in_handshake_) && (status == noErr)) {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Finished with the Handshake\n");
+    }
+    connected_ = true;
+  }
+  return status;
+}
+
+
+// Returns false if Handshake should fail, and true if Handshake should
+// proceed.
+Dart_Handle SSLFilter::InvokeBadCertCallback(SecCertificateRef peer_cert) {
+  Dart_Handle callback = bad_certificate_callback_;
+  if (Dart_IsNull(callback)) {
+    return callback;
+  }
+  Dart_Handle args[1];
+  args[0] = WrappedX509Certificate(peer_cert);
+  if (Dart_IsError(args[0])) {
+    return args[0];
+  }
+  Dart_Handle result = Dart_InvokeClosure(callback, 1, args);
+  if (!Dart_IsError(result) && !Dart_IsBoolean(result)) {
+    result = Dart_NewUnhandledExceptionError(DartUtils::NewDartIOException(
+        "HandshakeException",
+        "BadCertificateCallback returned a value that was not a boolean",
+        Dart_Null()));
+  }
+  return result;
+}
+
+
+OSStatus SSLFilter::CheckHandshake() {
+  if (bad_cert_ && in_handshake_) {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Invoking bad certificate callback\n");
+    }
+    ASSERT(peer_certs_ != NULL);
+    CFIndex peer_certs_len = CFArrayGetCount(peer_certs_);
+    ASSERT(peer_certs_len > 0);
+    CFTypeRef item = CFArrayGetValueAtIndex(peer_certs_, peer_certs_len - 1);
+    ASSERT(item != NULL);
+    ASSERT(CFGetTypeID(item) == SecCertificateGetTypeID());
+    SecCertificateRef peer_cert =
+        reinterpret_cast<SecCertificateRef>(const_cast<void*>(item));
+    Dart_Handle result = InvokeBadCertCallback(peer_cert);
+    ThrowIfError(result);
+    if (Dart_IsNull(result)) {
+      return errSSLBadCert;
+    } else {
+      bool good_cert = DartUtils::GetBooleanValue(result);
+      bad_cert_ = !good_cert;
+      return good_cert ? noErr : errSSLBadCert;
+    }
+  }
+
+  if (connected_ && in_handshake_) {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Invoking handshake complete callback\n");
+    }
+    ThrowIfError(Dart_InvokeClosure(
+        Dart_HandleFromPersistent(handshake_complete_), 0, NULL));
+    in_handshake_ = false;
+  }
+  return noErr;
+}
+
+
+void SSLFilter::Renegotiate(bool use_session_cache,
+                            bool request_client_certificate,
+                            bool require_client_certificate) {
+  // The SSL_REQUIRE_CERTIFICATE option only takes effect if the
+  // SSL_REQUEST_CERTIFICATE option is also set, so set it.
+  request_client_certificate =
+      request_client_certificate || require_client_certificate;
+  // TODO(24070, 24069): Implement setting the client certificate parameters,
+  //   and triggering rehandshake.
+}
+
+
+SSLFilter::~SSLFilter() {
+  // cert_context_ deleted by finalizer. Don't delete here.
+  cert_context_ = NULL;
+  if (ssl_context_ != NULL) {
+    CFRelease(ssl_context_);
+    ssl_context_ = NULL;
+  }
+  if (peer_certs_ != NULL) {
+    CFRelease(peer_certs_);
+    peer_certs_ = NULL;
+  }
+  if (hostname_ != NULL) {
+    free(hostname_);
+    hostname_ = NULL;
+  }
+  for (int i = 0; i < kNumBuffers; ++i) {
+    if (buffers_[i] != NULL) {
+      delete[] buffers_[i];
+      buffers_[i] = NULL;
+    }
+  }
+}
+
+
+void SSLFilter::Destroy() {
+  if (ssl_context_ != NULL) {
+    SSLClose(ssl_context_);
+  }
+  for (int i = 0; i < kNumBuffers; ++i) {
+    if (dart_buffer_objects_[i] != NULL) {
+      Dart_DeletePersistentHandle(dart_buffer_objects_[i]);
+      dart_buffer_objects_[i] = NULL;
+    }
+  }
+  if (string_start_ != NULL) {
+    Dart_DeletePersistentHandle(string_start_);
+    string_start_ = NULL;
+  }
+  if (string_length_ != NULL) {
+    Dart_DeletePersistentHandle(string_length_);
+    string_length_ = NULL;
+  }
+  if (handshake_complete_ != NULL) {
+    Dart_DeletePersistentHandle(handshake_complete_);
+    handshake_complete_ = NULL;
+  }
+  if (bad_certificate_callback_ != NULL) {
+    Dart_DeletePersistentHandle(bad_certificate_callback_);
+    bad_certificate_callback_ = NULL;
+  }
+}
+
+
+OSStatus SSLFilter::SSLReadCallback(SSLConnectionRef connection,
+                                    void* data, size_t* data_requested) {
+  // Copy at most `data_requested` bytes from `buffers_[kReadEncrypted]` into
+  // `data`
+  ASSERT(connection != NULL);
+  ASSERT(data != NULL);
+  ASSERT(data_requested != NULL);
+
+  SSLFilter* filter =
+      const_cast<SSLFilter*>(reinterpret_cast<const SSLFilter*>(connection));
+  uint8_t* datap = reinterpret_cast<uint8_t*>(data);
+  uint8_t* buffer = filter->buffers_[kReadEncrypted];
+  intptr_t start = filter->GetBufferStart(kReadEncrypted);
+  intptr_t end = filter->GetBufferEnd(kReadEncrypted);
+  intptr_t size = filter->encrypted_buffer_size_;
+  intptr_t requested = static_cast<intptr_t>(*data_requested);
+  intptr_t data_read = 0;
+
+  if (end < start) {
+    // Data may be split into two segments.  In this case,
+    // the first is [start, size).
+    intptr_t buffer_end = (start == 0) ? size - 1 : size;
+    intptr_t available = buffer_end - start;
+    intptr_t bytes = requested < available ? requested : available;
+    memmove(datap, &buffer[start], bytes);
+    start += bytes;
+    datap += bytes;
+    data_read += bytes;
+    requested -= bytes;
+    ASSERT(start <= size);
+    if (start == size) {
+      start = 0;
+    }
+  }
+  if ((requested > 0) && (start < end)) {
+    intptr_t available = end - start;
+    intptr_t bytes = requested < available ? requested : available;
+    memmove(datap, &buffer[start], bytes);
+    start += bytes;
+    datap += bytes;
+    data_read += bytes;
+    requested -= bytes;
+    ASSERT(start <= end);
+  }
+
+  if (SSL_LOG_DATA) {
+    Log::Print("SSLReadCallback: requested: %ld, read %ld bytes\n",
+        *data_requested, data_read);
+  }
+
+  filter->SetBufferStart(kReadEncrypted, start);
+  bool short_read = data_read < static_cast<intptr_t>(*data_requested);
+  *data_requested = data_read;
+  return short_read ? errSSLWouldBlock : noErr;
+}
+
+
+// Read decrypted data from the filter to the circular buffer.
+OSStatus SSLFilter::ProcessReadPlaintextBuffer(intptr_t start,
+                                               intptr_t end,
+                                               intptr_t* bytes_processed) {
+  ASSERT(bytes_processed != NULL);
+  intptr_t length = end - start;
+  OSStatus status = noErr;
+  size_t bytes = 0;
+  if (length > 0) {
+    status = SSLRead(
+        ssl_context_,
+        reinterpret_cast<void*>((buffers_[kReadPlaintext] + start)),
+        length,
+        &bytes);
+    if (SSL_LOG_STATUS) {
+      Log::Print("SSLRead: status = %ld\n", static_cast<intptr_t>(status));
+    }
+    if ((status != noErr) && (status != errSSLWouldBlock)) {
+      *bytes_processed = 0;
+      return status;
+    }
+  }
+  if (SSL_LOG_DATA) {
+    Log::Print("ProcessReadPlaintextBuffer: requested: %ld, read %ld bytes\n",
+        length, bytes);
+  }
+  *bytes_processed = static_cast<intptr_t>(bytes);
+  return status;
+}
+
+
+OSStatus SSLFilter::SSLWriteCallback(SSLConnectionRef connection,
+                                     const void* data, size_t* data_provided) {
+  // Copy at most `data_provided` bytes from data into
+  // `buffers_[kWriteEncrypted]`.
+  ASSERT(connection != NULL);
+  ASSERT(data != NULL);
+  ASSERT(data_provided != NULL);
+
+  SSLFilter* filter =
+    const_cast<SSLFilter*>(reinterpret_cast<const SSLFilter*>(connection));
+  const uint8_t* datap = reinterpret_cast<const uint8_t*>(data);
+  uint8_t* buffer = filter->buffers_[kWriteEncrypted];
+  intptr_t start = filter->GetBufferStart(kWriteEncrypted);
+  intptr_t end = filter->GetBufferEnd(kWriteEncrypted);
+  intptr_t size = filter->encrypted_buffer_size_;
+  intptr_t provided = static_cast<intptr_t>(*data_provided);
+  intptr_t data_written = 0;
+
+  // is full, neither if statement is executed and nothing happens.
+  if (start <= end) {
+    // If the free space may be split into two segments,
+    // then the first is [end, size), unless start == 0.
+    // Then, since the last free byte is at position start - 2,
+    // the interval is [end, size - 1).
+    intptr_t buffer_end = (start == 0) ? size - 1 : size;
+    intptr_t available = buffer_end - end;
+    intptr_t bytes = provided < available ? provided : available;
+    memmove(&buffer[end], datap, bytes);
+    end += bytes;
+    datap += bytes;
+    data_written += bytes;
+    provided -= bytes;
+    ASSERT(end <= size);
+    if (end == size) {
+      end = 0;
+    }
+  }
+  if ((provided > 0) && (start > end + 1)) {
+    intptr_t available = (start - 1) - end;
+    intptr_t bytes = provided < available ? provided : available;
+    memmove(&buffer[end], datap, bytes);
+    end += bytes;
+    datap += bytes;
+    data_written += bytes;
+    provided -= bytes;
+    ASSERT(end < start);
+  }
+
+  if (SSL_LOG_DATA) {
+    Log::Print("SSLWriteCallback: provided: %ld, written %ld bytes\n",
+        *data_provided, data_written);
+  }
+
+  filter->SetBufferEnd(kWriteEncrypted, end);
+  *data_provided = data_written;
+  return (data_written == 0) ? errSSLWouldBlock : noErr;
+}
+
+
+OSStatus SSLFilter::ProcessWritePlaintextBuffer(intptr_t start,
+                                                intptr_t end,
+                                                intptr_t* bytes_processed) {
+  ASSERT(bytes_processed != NULL);
+  intptr_t length = end - start;
+  OSStatus status = noErr;
+  size_t bytes = 0;
+  if (length > 0) {
+    status = SSLWrite(
+        ssl_context_,
+        reinterpret_cast<void*>(buffers_[kWritePlaintext] + start),
+        length,
+        &bytes);
+    if (SSL_LOG_STATUS) {
+      Log::Print("SSLWrite: status = %ld\n", static_cast<intptr_t>(status));
+    }
+    if ((status != noErr) && (status != errSSLWouldBlock)) {
+      *bytes_processed = 0;
+      return status;
+    }
+  }
+  if (SSL_LOG_DATA) {
+    Log::Print("ProcessWritePlaintextBuffer: requested: %ld, written: %ld\n",
+        length, bytes);
+  }
+  *bytes_processed = static_cast<intptr_t>(bytes);
+  return status;
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // TARGET_OS_IOS
+
+#endif  // !defined(DART_IO_SECURE_SOCKET_DISABLED)
diff --git a/runtime/bin/secure_socket_macos.cc b/runtime/bin/secure_socket_macos.cc
new file mode 100644
index 0000000..84b10c0
--- /dev/null
+++ b/runtime/bin/secure_socket_macos.cc
@@ -0,0 +1,1969 @@
+// 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.
+
+#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
+
+#include "platform/globals.h"
+#if defined(TARGET_OS_MACOS) && !TARGET_OS_IOS
+
+#include "bin/secure_socket.h"
+#include "bin/secure_socket_macos.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/syslimits.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <Security/SecureTransport.h>
+#include <Security/Security.h>
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "bin/lockers.h"
+#include "bin/log.h"
+#include "bin/socket.h"
+#include "bin/thread.h"
+#include "bin/utils.h"
+
+#include "platform/text_buffer.h"
+#include "platform/utils.h"
+
+#include "include/dart_api.h"
+
+// Return the error from the containing function if handle is an error handle.
+#define RETURN_IF_ERROR(handle)                                                \
+  {                                                                            \
+    Dart_Handle __handle = handle;                                             \
+    if (Dart_IsError((__handle))) {                                            \
+      return __handle;                                                         \
+    }                                                                          \
+  }
+
+// We need to access this private API function to create a SecIdentityRef
+// without writing a custom keychain to the filesystem. This is the approach
+// taken in WebKit:
+// https://webkit.googlesource.com/WebKit/+/master/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp
+extern "C" {
+SecIdentityRef SecIdentityCreate(CFAllocatorRef allocator,
+                                 SecCertificateRef certificate,
+                                 SecKeyRef private_key);
+}
+
+namespace dart {
+namespace bin {
+
+static const int kSSLFilterNativeFieldIndex = 0;
+static const int kSecurityContextNativeFieldIndex = 0;
+static const int kX509NativeFieldIndex = 0;
+
+static const bool SSL_LOG_STATUS = false;
+static const bool SSL_LOG_DATA = false;
+static const bool SSL_LOG_CERTS = false;
+static const int SSL_ERROR_MESSAGE_BUFFER_SIZE = 1000;
+static const intptr_t PEM_BUFSIZE = 1024;
+
+// SSLCertContext wraps the certificates needed for a SecureTransport
+// connection. Fields are protected by the mutex_ field, and may only be set
+// once. This is to allow access by both the Dart thread and the IOService
+// thread. Setters return false if the field was already set.
+class SSLCertContext {
+ public:
+  SSLCertContext() :
+      mutex_(new Mutex()),
+      private_key_(NULL),
+      keychain_(NULL),
+      cert_chain_(NULL),
+      trusted_certs_(NULL),
+      cert_authorities_(NULL),
+      trust_builtin_(false) {}
+
+  ~SSLCertContext() {
+    if (private_key_ != NULL) {
+      CFRelease(private_key_);
+    }
+    if (keychain_ != NULL) {
+      SecKeychainDelete(keychain_);
+      CFRelease(keychain_);
+    }
+    if (cert_chain_ != NULL) {
+      CFRelease(cert_chain_);
+    }
+    if (trusted_certs_ != NULL) {
+      CFRelease(trusted_certs_);
+    }
+    if (cert_authorities_ != NULL) {
+      CFRelease(cert_authorities_);
+    }
+    delete mutex_;
+  }
+
+  SecKeyRef private_key() {
+    MutexLocker m(mutex_);
+    return private_key_;
+  }
+  bool set_private_key(SecKeyRef private_key) {
+    MutexLocker m(mutex_);
+    if (private_key_ != NULL) {
+      return false;
+    }
+    private_key_ = private_key;
+    return true;
+  }
+
+  SecKeychainRef keychain() {
+    MutexLocker m(mutex_);
+    return keychain_;
+  }
+  bool set_keychain(SecKeychainRef keychain) {
+    MutexLocker m(mutex_);
+    if (keychain_ != NULL) {
+      return false;
+    }
+    keychain_ = keychain;
+    return true;
+  }
+
+  CFArrayRef cert_chain() {
+    MutexLocker m(mutex_);
+    return cert_chain_;
+  }
+  bool set_cert_chain(CFArrayRef cert_chain) {
+    MutexLocker m(mutex_);
+    if (cert_chain_ != NULL) {
+      return false;
+    }
+    cert_chain_ = cert_chain;
+    return true;
+  }
+
+  CFArrayRef trusted_certs() {
+    MutexLocker m(mutex_);
+    return trusted_certs_;
+  }
+  bool set_trusted_certs(CFArrayRef trusted_certs) {
+    MutexLocker m(mutex_);
+    if (trusted_certs_ != NULL) {
+      return false;
+    }
+    trusted_certs_ = trusted_certs;
+    return true;
+  }
+
+  CFArrayRef cert_authorities() {
+    MutexLocker m(mutex_);
+    return cert_authorities_;
+  }
+  bool set_cert_authorities(CFArrayRef cert_authorities) {
+    MutexLocker m(mutex_);
+    if (cert_authorities_ != NULL) {
+      return false;
+    }
+    cert_authorities_ = cert_authorities;
+    return true;
+  }
+
+  bool trust_builtin() {
+    MutexLocker m(mutex_);
+    return trust_builtin_;
+  }
+  void set_trust_builtin(bool trust_builtin) {
+    MutexLocker m(mutex_);
+    trust_builtin_ = trust_builtin;
+  }
+
+ private:
+  // The context is accessed both by Dart code and the IOService. This mutex
+  // protects all fields.
+  Mutex* mutex_;
+
+  SecKeyRef private_key_;
+  SecKeychainRef keychain_;
+
+  // CFArrays of SecCertificateRef.
+  CFArrayRef cert_chain_;
+  CFArrayRef trusted_certs_;
+  CFArrayRef cert_authorities_;
+
+  bool trust_builtin_;
+
+  DISALLOW_COPY_AND_ASSIGN(SSLCertContext);
+};
+
+
+static char* CFStringRefToCString(CFStringRef cfstring) {
+  CFIndex len = CFStringGetLength(cfstring);
+  CFIndex max_len =
+      CFStringGetMaximumSizeForEncoding(len, kCFStringEncodingUTF8) + 1;
+  char* result = reinterpret_cast<char*>(Dart_ScopeAllocate(max_len));
+  ASSERT(result != NULL);
+  bool success =
+      CFStringGetCString(cfstring, result, max_len, kCFStringEncodingUTF8);
+  return success ? result : NULL;
+}
+
+
+// Handle an error reported from the SecureTransport library.
+static void ThrowIOException(OSStatus status,
+                             const char* exception_type,
+                             const char* message) {
+  TextBuffer status_message(SSL_ERROR_MESSAGE_BUFFER_SIZE);
+  CFStringRef error_string = SecCopyErrorMessageString(status, NULL);
+  if (error_string == NULL) {
+    status_message.Printf("OSStatus = %ld: https://www.osstatus.com",
+        static_cast<intptr_t>(status));
+  } else {
+    char* error = CFStringRefToCString(error_string);
+    status_message.Printf("OSStatus = %ld: %s",
+        static_cast<intptr_t>(status), error);
+    CFRelease(error_string);
+  }
+  OSError os_error_struct(status, status_message.buf(), OSError::kBoringSSL);
+  Dart_Handle os_error = DartUtils::NewDartOSError(&os_error_struct);
+  Dart_Handle exception =
+      DartUtils::NewDartIOException(exception_type, message, os_error);
+  ASSERT(!Dart_IsError(exception));
+  Dart_ThrowException(exception);
+  UNREACHABLE();
+}
+
+
+static void CheckStatus(OSStatus status,
+                        const char* type,
+                        const char* message) {
+  if (status == noErr) {
+    return;
+  }
+  ThrowIOException(status, type, message);
+}
+
+
+static SSLFilter* GetFilter(Dart_NativeArguments args) {
+  SSLFilter* filter;
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_GetNativeInstanceField(
+      dart_this,
+      kSSLFilterNativeFieldIndex,
+      reinterpret_cast<intptr_t*>(&filter)));
+  return filter;
+}
+
+
+static void DeleteFilter(void* isolate_data,
+                         Dart_WeakPersistentHandle handle,
+                         void* context_pointer) {
+  SSLFilter* filter = reinterpret_cast<SSLFilter*>(context_pointer);
+  delete filter;
+}
+
+
+static Dart_Handle SetFilter(Dart_NativeArguments args, SSLFilter* filter) {
+  ASSERT(filter != NULL);
+  const int approximate_size_of_filter = 1500;
+  Dart_Handle dart_this = Dart_GetNativeArgument(args, 0);
+  RETURN_IF_ERROR(dart_this);
+  ASSERT(Dart_IsInstance(dart_this));
+  Dart_Handle err = Dart_SetNativeInstanceField(
+      dart_this,
+      kSSLFilterNativeFieldIndex,
+      reinterpret_cast<intptr_t>(filter));
+  RETURN_IF_ERROR(err);
+  Dart_NewWeakPersistentHandle(dart_this,
+                               reinterpret_cast<void*>(filter),
+                               approximate_size_of_filter,
+                               DeleteFilter);
+  return Dart_Null();
+}
+
+
+static SSLCertContext* GetSecurityContext(Dart_NativeArguments args) {
+  SSLCertContext* context;
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_GetNativeInstanceField(
+      dart_this,
+      kSecurityContextNativeFieldIndex,
+      reinterpret_cast<intptr_t*>(&context)));
+  return context;
+}
+
+
+static void DeleteCertContext(void* isolate_data,
+                              Dart_WeakPersistentHandle handle,
+                              void* context_pointer) {
+  SSLCertContext* context = static_cast<SSLCertContext*>(context_pointer);
+  delete context;
+}
+
+
+static Dart_Handle SetSecurityContext(Dart_NativeArguments args,
+                                      SSLCertContext* context) {
+  const int approximate_size_of_context = 1500;
+  Dart_Handle dart_this = Dart_GetNativeArgument(args, 0);
+  RETURN_IF_ERROR(dart_this);
+  ASSERT(Dart_IsInstance(dart_this));
+  Dart_Handle err = Dart_SetNativeInstanceField(
+      dart_this,
+      kSecurityContextNativeFieldIndex,
+      reinterpret_cast<intptr_t>(context));
+  RETURN_IF_ERROR(err);
+  Dart_NewWeakPersistentHandle(dart_this,
+                               context,
+                               approximate_size_of_context,
+                               DeleteCertContext);
+  return Dart_Null();
+}
+
+
+static SecCertificateRef GetX509Certificate(Dart_NativeArguments args) {
+  SecCertificateRef certificate;
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_GetNativeInstanceField(
+      dart_this,
+      kX509NativeFieldIndex,
+      reinterpret_cast<intptr_t*>(&certificate)));
+  return certificate;
+}
+
+
+static void ReleaseCertificate(void* isolate_data,
+                               Dart_WeakPersistentHandle handle,
+                               void* context_pointer) {
+  SecCertificateRef cert = reinterpret_cast<SecCertificateRef>(context_pointer);
+  CFRelease(cert);
+}
+
+
+static Dart_Handle WrappedX509Certificate(SecCertificateRef certificate) {
+  const intptr_t approximate_size_of_certificate = 1500;
+  if (certificate == NULL) {
+    return Dart_Null();
+  }
+  Dart_Handle x509_type =
+      DartUtils::GetDartType(DartUtils::kIOLibURL, "X509Certificate");
+  if (Dart_IsError(x509_type)) {
+    return x509_type;
+  }
+  Dart_Handle arguments[] = { NULL };
+
+  Dart_Handle result =
+      Dart_New(x509_type, DartUtils::NewString("_"), 0, arguments);
+  if (Dart_IsError(result)) {
+    return result;
+  }
+  ASSERT(Dart_IsInstance(result));
+
+  // CFRetain in case the returned Dart object outlives the SecurityContext.
+  // CFRelease is in the Dart object's finalizer
+  CFRetain(certificate);
+  Dart_NewWeakPersistentHandle(result,
+                               reinterpret_cast<void*>(certificate),
+                               approximate_size_of_certificate,
+                               ReleaseCertificate);
+
+  Dart_Handle status = Dart_SetNativeInstanceField(
+      result,
+      kX509NativeFieldIndex,
+      reinterpret_cast<intptr_t>(certificate));
+  if (Dart_IsError(status)) {
+    return status;
+  }
+  return result;
+}
+
+
+static const char* GetPasswordArgument(Dart_NativeArguments args,
+                                       intptr_t index) {
+  Dart_Handle password_object =
+      ThrowIfError(Dart_GetNativeArgument(args, index));
+  const char* password = NULL;
+  if (Dart_IsString(password_object)) {
+    ThrowIfError(Dart_StringToCString(password_object, &password));
+    if (strlen(password) > PEM_BUFSIZE - 1) {
+      Dart_ThrowException(DartUtils::NewDartArgumentError(
+          "Password length is greater than 1023 bytes."));
+    }
+  } else if (Dart_IsNull(password_object)) {
+    password = "";
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Password is not a String or null"));
+  }
+  return password;
+}
+
+
+static OSStatus GetKeyAndCerts(CFArrayRef items,
+                               CFIndex items_length,
+                               CFArrayRef* out_certs,
+                               SecKeyRef* out_key) {
+  OSStatus status = noErr;
+
+  // Loop through the items, take only the first private key/identity, ignore
+  // any others, populate out_certs.
+  CFMutableArrayRef certs =
+      CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+  SecKeyRef key = NULL;
+
+  for (CFIndex i = 0; i < items_length; ++i) {
+    CFTypeRef item =
+        reinterpret_cast<CFTypeRef>(CFArrayGetValueAtIndex(items, i));
+    CFTypeID item_type = CFGetTypeID(item);
+    if (item_type == SecCertificateGetTypeID()) {
+      if (SSL_LOG_CERTS) {
+        Log::Print("\titem %ld: Certificate\n", i);
+      }
+      CFArrayAppendValue(certs, item);
+    } else if ((item_type == SecKeyGetTypeID()) && (key == NULL)) {
+      if (SSL_LOG_CERTS) {
+        Log::Print("\titem %ld: Key\n", i);
+      }
+      key = reinterpret_cast<SecKeyRef>(const_cast<void*>(item));
+      CFRetain(key);
+    } else if ((item_type == SecIdentityGetTypeID()) && (key == NULL)) {
+      if (SSL_LOG_CERTS) {
+        Log::Print("\titem %ld: Identity\n", i);
+      }
+      SecIdentityRef identity =
+          reinterpret_cast<SecIdentityRef>(const_cast<void*>(item));
+      SecCertificateRef cert = NULL;
+
+      status = SecIdentityCopyPrivateKey(identity, &key);
+      if (status != noErr) {
+        CFRelease(certs);
+        return status;
+      }
+
+      status = SecIdentityCopyCertificate(identity, &cert);
+      if (status != noErr) {
+        CFRelease(key);
+        CFRelease(certs);
+        return status;
+      }
+      CFArrayAppendValue(certs, cert);
+      CFRelease(cert);
+    }
+    // Other item types are ignored.
+  }
+
+  if (out_key == NULL) {
+    if (key != NULL) {
+      CFRelease(key);
+    }
+  } else {
+    *out_key = key;
+  }
+
+  if (out_certs == NULL) {
+    if (certs != NULL) {
+      CFRelease(certs);
+    }
+  } else {
+    *out_certs = certs;
+  }
+  return status;
+}
+
+
+static OSStatus TryPEMImport(CFDataRef cfdata,
+                             CFStringRef password,
+                             CFArrayRef* out_certs,
+                             SecKeyRef* out_key) {
+  OSStatus status = noErr;
+
+  SecExternalFormat format = kSecFormatPEMSequence;
+  SecExternalItemType sitem_type = kSecItemTypeAggregate;
+
+  SecItemImportExportKeyParameters params;
+  memset(&params, 0, sizeof(params));
+  params.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION;
+  params.flags = kSecKeyNoAccessControl;
+  params.passphrase = password;
+
+  CFArrayRef items = NULL;
+  status = SecItemImport(
+      cfdata, NULL, &format, &sitem_type, 0, &params, NULL, &items);
+
+  if (status != noErr) {
+    if (SSL_LOG_CERTS) {
+      Log::Print("TrySecItemImport failed with: %ld, type = %d, format = %d\n",
+          static_cast<intptr_t>(status), sitem_type, format);
+    }
+    return status;
+  }
+
+  CFIndex items_length = (items == NULL) ? 0 : CFArrayGetCount(items);
+  if (SSL_LOG_CERTS) {
+    Log::Print(
+        "TrySecItemImport succeeded, type = %d, format = %d, count = %ld\n",
+        sitem_type, format, items_length);
+  }
+
+  // Empty list indicates a decoding failure of some sort.
+  if ((items != NULL) && (items_length == 0)) {
+    CFRelease(items);
+    return errSSLBadCert;
+  }
+
+  status = GetKeyAndCerts(items, items_length, out_certs, out_key);
+  CFRelease(items);
+  return status;
+}
+
+
+static char* TempKeychainPath() {
+  const char* exes = "keychaindir.XXXX";
+  const char* fname = "keychain";
+  const char* temp_dir = getenv("TMPDIR");
+  if (temp_dir == NULL) {
+    temp_dir = getenv("TMP");
+  }
+  if (temp_dir == NULL) {
+    temp_dir = "/tmp/";
+  }
+  ASSERT(temp_dir != NULL);
+
+  TextBuffer path(PATH_MAX);
+  path.Printf("%s/%s", temp_dir, exes);
+  char* ret = mkdtemp(path.buf());
+  ASSERT(ret != NULL);
+  path.Printf("/%s", fname);
+
+  char* result =
+      reinterpret_cast<char*>(Dart_ScopeAllocate(path.length() + 1));
+  return strncpy(result, path.buf(), path.length() + 1);
+}
+
+
+static OSStatus CreateKeychain(SecKeychainRef* keychain) {
+  ASSERT(keychain != NULL);
+  OSStatus status = noErr;
+  const char* temp_keychain_pwd = "dartdart";
+  char* temp_file_path = TempKeychainPath();
+  ASSERT(temp_file_path != NULL);
+  if (SSL_LOG_CERTS) {
+    Log::Print("Temporary keychain at: '%s'\n", temp_file_path);
+  }
+  status = SecKeychainCreate(temp_file_path,
+                             strlen(temp_keychain_pwd) + 1,
+                             reinterpret_cast<const void*>(temp_keychain_pwd),
+                             FALSE,  // Prompt user? Definitely no.
+                             NULL,  // Default access rights.
+                             keychain);
+  if (status != noErr) {
+    return status;
+  }
+  ASSERT(*keychain != NULL);
+  return status;
+}
+
+
+static OSStatus TryPKCS12Import(CFDataRef cfdata,
+                                CFStringRef password,
+                                CFArrayRef* out_certs,
+                                SecKeyRef* out_key,
+                                SecKeychainRef* out_keychain) {
+  OSStatus status = noErr;
+
+  SecExternalFormat format = kSecFormatPKCS12;
+  SecExternalItemType sitem_type = kSecItemTypeAggregate;
+
+  SecItemImportExportKeyParameters params;
+  memset(&params, 0, sizeof(params));
+  params.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION;
+  params.flags = kSecKeyNoAccessControl;
+  params.passphrase = password;
+
+  CFArrayRef items = NULL;
+  if (SSL_LOG_CERTS) {
+    Log::Print("Trying PKCS12 import with: type = %d, format = %d\n",
+        sitem_type, format);
+  }
+
+  // The documentation for SecKeychainItemImport here:
+  //
+  // https://developer.apple.com/library/mac/documentation/Security/Reference/keychainservices/index.html
+  //
+  // states that when the SecKeychainRef argument is NULL, the CFArrayRef*
+  // argument will be populated by an array containing all keys, identities,
+  // and certificates from the data in the CFDataRef argument.
+  //
+  // Unfortunately, this is not true. The code to populate the CFArrayRef with
+  // keys and identities from PKCS12 data has been skipped and/or commented out,
+  // here:
+  //
+  // https://github.com/Apple-FOSS-Mirror/Security/blob/master/libsecurity_keychain/lib/SecImportExportAgg.cpp#L636
+  //
+  // as "floating" SecKeyRefs from the PKCS12 decoder haven't been implemented.
+  // That is, each private key instance coming from the PKCS12 decoder has to be
+  // associated with a keychain instance. Thus, as a workaround, we create a
+  // temporary keychain here if one is needed, and stash it below in a
+  // SecurityContext. This has the drawbacks:
+  // 1.) We need to make a temporary directory to hold the keychain file, and
+  // 2.) SecKeychainItemImport() probably does blocking IO to create and
+  //     manipulate the keychain file.
+  // So if the API is updated, this keychain should not be used.
+  SecKeychainRef keychain = NULL;
+  if (out_key != NULL) {
+    ASSERT(out_keychain != NULL);
+    status = CreateKeychain(&keychain);
+    if (status != noErr) {
+      return status;
+    }
+    *out_keychain = keychain;
+  }
+
+  status = SecItemImport(
+      cfdata, NULL, &format, &sitem_type, 0, &params, keychain, &items);
+  if (status != noErr) {
+    if (SSL_LOG_CERTS) {
+      Log::Print("TrySecItemImport failed with: %ld, it = %d, format = %d\n",
+          static_cast<intptr_t>(status), sitem_type, format);
+    }
+    return status;
+  }
+
+  CFIndex items_length = (items == NULL) ? 0 : CFArrayGetCount(items);
+  if (SSL_LOG_CERTS) {
+    Log::Print("TrySecItemImport succeeded, count = %ld\n", items_length);
+  }
+
+  // Empty list indicates a decoding failure of some sort.
+  if ((items != NULL) && (items_length == 0)) {
+    CFRelease(items);
+    return errSSLBadCert;
+  }
+
+  status = GetKeyAndCerts(items, items_length, out_certs, out_key);
+  CFRelease(items);
+  return status;
+}
+
+
+static OSStatus ExtractSecItems(uint8_t* buffer,
+                                intptr_t length,
+                                const char* password,
+                                CFArrayRef* out_certs,
+                                SecKeyRef* out_key,
+                                SecKeychainRef* out_keychain) {
+  ASSERT(buffer != NULL);
+  ASSERT(password != NULL);
+  OSStatus status = noErr;
+
+  CFDataRef cfdata = CFDataCreateWithBytesNoCopy(
+      NULL, buffer, length, kCFAllocatorNull);
+  CFStringRef cfpassword = CFStringCreateWithCStringNoCopy(
+      NULL, password, kCFStringEncodingUTF8, kCFAllocatorNull);
+  ASSERT(cfdata != NULL);
+  ASSERT(cfpassword != NULL);
+
+  status = TryPEMImport(cfdata, cfpassword, out_certs, out_key);
+  if (status != noErr) {
+    status =
+        TryPKCS12Import(cfdata, cfpassword, out_certs, out_key, out_keychain);
+  }
+
+  CFRelease(cfdata);
+  CFRelease(cfpassword);
+  return status;
+}
+
+
+void FUNCTION_NAME(SecureSocket_Init)(Dart_NativeArguments args) {
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  SSLFilter* filter = new SSLFilter();  // Deleted in DeleteFilter finalizer.
+  Dart_Handle err = SetFilter(args, filter);
+  if (Dart_IsError(err)) {
+    delete filter;
+    Dart_PropagateError(err);
+  }
+  err = filter->Init(dart_this);
+  if (Dart_IsError(err)) {
+    // The finalizer was set up by SetFilter. It will delete `filter` if there
+    // is an error.
+    filter->Destroy();
+    Dart_PropagateError(err);
+  }
+}
+
+
+void FUNCTION_NAME(SecureSocket_Connect)(Dart_NativeArguments args) {
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  Dart_Handle host_name_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
+  Dart_Handle context_object = ThrowIfError(Dart_GetNativeArgument(args, 2));
+  bool is_server = DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3));
+  bool request_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 4));
+  bool require_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 5));
+
+  const char* host_name = NULL;
+  // TODO(whesse): Is truncating a Dart string containing \0 what we want?
+  ThrowIfError(Dart_StringToCString(host_name_object, &host_name));
+
+  SSLCertContext* context = NULL;
+  if (!Dart_IsNull(context_object)) {
+    ThrowIfError(Dart_GetNativeInstanceField(
+        context_object,
+        kSecurityContextNativeFieldIndex,
+        reinterpret_cast<intptr_t*>(&context)));
+  }
+
+  GetFilter(args)->Connect(dart_this,
+                           host_name,
+                           context,
+                           is_server,
+                           request_client_certificate,
+                           require_client_certificate);
+}
+
+
+void FUNCTION_NAME(SecureSocket_Destroy)(Dart_NativeArguments args) {
+  SSLFilter* filter = GetFilter(args);
+  // The SSLFilter is deleted in the finalizer for the Dart object created by
+  // SetFilter. There is no need to NULL-out the native field for the SSLFilter
+  // here because the SSLFilter won't be deleted until the finalizer for the
+  // Dart object runs while the Dart object is being GCd. This approach avoids a
+  // leak if Destroy isn't called, and avoids a NULL-dereference if Destroy is
+  // called more than once.
+  filter->Destroy();
+}
+
+
+void FUNCTION_NAME(SecureSocket_Handshake)(Dart_NativeArguments args) {
+  OSStatus status = GetFilter(args)->CheckHandshake();
+  CheckStatus(status, "HandshakeException", "Handshake error");
+}
+
+
+void FUNCTION_NAME(SecureSocket_GetSelectedProtocol)(
+    Dart_NativeArguments args) {
+  Dart_SetReturnValue(args, Dart_Null());
+}
+
+
+void FUNCTION_NAME(SecureSocket_Renegotiate)(Dart_NativeArguments args) {
+  bool use_session_cache =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 1));
+  bool request_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 2));
+  bool require_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3));
+  GetFilter(args)->Renegotiate(use_session_cache,
+                               request_client_certificate,
+                               require_client_certificate);
+}
+
+
+void FUNCTION_NAME(SecureSocket_RegisterHandshakeCompleteCallback)(
+    Dart_NativeArguments args) {
+  Dart_Handle handshake_complete =
+      ThrowIfError(Dart_GetNativeArgument(args, 1));
+  if (!Dart_IsClosure(handshake_complete)) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Illegal argument to RegisterHandshakeCompleteCallback"));
+  }
+  GetFilter(args)->RegisterHandshakeCompleteCallback(handshake_complete);
+}
+
+
+void FUNCTION_NAME(SecureSocket_RegisterBadCertificateCallback)(
+    Dart_NativeArguments args) {
+  Dart_Handle callback =
+      ThrowIfError(Dart_GetNativeArgument(args, 1));
+  if (!Dart_IsClosure(callback) && !Dart_IsNull(callback)) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Illegal argument to RegisterBadCertificateCallback"));
+  }
+  GetFilter(args)->RegisterBadCertificateCallback(callback);
+}
+
+
+void FUNCTION_NAME(SecureSocket_PeerCertificate)
+    (Dart_NativeArguments args) {
+  Dart_SetReturnValue(args, GetFilter(args)->PeerCertificate());
+}
+
+
+void FUNCTION_NAME(SecureSocket_FilterPointer)(Dart_NativeArguments args) {
+  intptr_t filter_pointer = reinterpret_cast<intptr_t>(GetFilter(args));
+  Dart_SetReturnValue(args, Dart_NewInteger(filter_pointer));
+}
+
+
+void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) {
+  SSLCertContext* cert_context = new SSLCertContext();
+  // cert_context deleted in DeleteCertContext finalizer.
+  Dart_Handle err = SetSecurityContext(args, cert_context);
+  if (Dart_IsError(err)) {
+    delete cert_context;
+    Dart_PropagateError(err);
+  }
+}
+
+
+void FUNCTION_NAME(SecurityContext_UsePrivateKeyBytes)(
+    Dart_NativeArguments args) {
+  SSLCertContext* context = GetSecurityContext(args);
+  const char* password = GetPasswordArgument(args, 2);
+
+  OSStatus status;
+  SecKeyRef key = NULL;
+  SecKeychainRef keychain = NULL;
+  {
+    ScopedMemBuffer buffer(ThrowIfError(Dart_GetNativeArgument(args, 1)));
+    status = ExtractSecItems(
+        buffer.get(), buffer.length(), password, NULL, &key, &keychain);
+  }
+
+  // Set the context fields. If there's a failure, release the items.
+  bool set_failure = false;
+  if ((key != NULL) && !context->set_private_key(key)) {
+    CFRelease(key);
+    SecKeychainDelete(keychain);
+    CFRelease(keychain);
+    set_failure = true;
+  }
+  if (!set_failure && (keychain != NULL) && !context->set_keychain(keychain)) {
+    SecKeychainDelete(keychain);
+    CFRelease(keychain);
+  }
+
+  if (set_failure) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "usePrivateKeyBytes has already been called on the given context."));
+  }
+  CheckStatus(status, "TlsException", "Failure in usePrivateKeyBytes");
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetTrustedCertificatesBytes)(
+    Dart_NativeArguments args) {
+  SSLCertContext* context = GetSecurityContext(args);
+  const char* password = GetPasswordArgument(args, 2);
+
+  OSStatus status;
+  CFArrayRef certs = NULL;
+  {
+    ScopedMemBuffer buffer(ThrowIfError(Dart_GetNativeArgument(args, 1)));
+    status = ExtractSecItems(
+        buffer.get(), buffer.length(), password, &certs, NULL, NULL);
+  }
+
+  // Set the field in the context. If there's a failure, release the certs,
+  // and throw an exception.
+  if ((certs != NULL) && !context->set_trusted_certs(certs)) {
+    CFRelease(certs);
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "setTrustedCertificatesBytes has already been called "
+        "on the given context."));
+  }
+
+  CheckStatus(status, "TlsException", "Failure in setTrustedCertificatesBytes");
+}
+
+
+void FUNCTION_NAME(SecurityContext_AlpnSupported)(Dart_NativeArguments args) {
+  Dart_SetReturnValue(args, Dart_NewBoolean(false));
+}
+
+
+void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
+    Dart_NativeArguments args) {
+  SSLCertContext* context = GetSecurityContext(args);
+  context->set_trust_builtin(true);
+}
+
+
+void FUNCTION_NAME(SecurityContext_UseCertificateChainBytes)(
+    Dart_NativeArguments args) {
+  SSLCertContext* context = GetSecurityContext(args);
+
+  const char* password = GetPasswordArgument(args, 2);
+  OSStatus status;
+  CFArrayRef certs = NULL;
+  {
+    ScopedMemBuffer buffer(ThrowIfError(Dart_GetNativeArgument(args, 1)));
+    status = ExtractSecItems(
+        buffer.get(), buffer.length(), password, &certs, NULL, NULL);
+  }
+
+  // Set the field in the context. If there's a failure, release the certs,
+  // and throw an exception.
+  if ((certs != NULL) && !context->set_cert_chain(certs)) {
+    CFRelease(certs);
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "useCertificateChainBytes has already been called "
+        "on the given context."));
+  }
+
+  CheckStatus(status, "TlsException", "Failure in useCertificateChainBytes");
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetClientAuthoritiesBytes)(
+    Dart_NativeArguments args) {
+  SSLCertContext* context = GetSecurityContext(args);
+  const char* password = GetPasswordArgument(args, 2);
+
+  OSStatus status;
+  CFArrayRef certs = NULL;
+  {
+    ScopedMemBuffer buffer(ThrowIfError(Dart_GetNativeArgument(args, 1)));
+    status = ExtractSecItems(
+        buffer.get(), buffer.length(), password, &certs, NULL, NULL);
+  }
+
+  // Set the field in the context. If there's a failure, release the certs,
+  // and throw an exception.
+  if ((certs != NULL) && !context->set_cert_authorities(certs)) {
+    CFRelease(certs);
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "setClientAuthoritiesBytes has already been called "
+        "on the given context."));
+  }
+
+  CheckStatus(status, "TlsException", "Failure in setClientAuthoritiesBytes");
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartUnsupportedError(
+      "ALPN is not supported on this platform"));
+}
+
+
+static char* GetNameFromCert(SecCertificateRef certificate,
+                             CFTypeRef field,
+                             CFStringRef name) {
+  char* issuer_name = NULL;
+
+  CFTypeRef keys[] = { field };
+  CFArrayRef key_array = CFArrayCreate(NULL, keys, 1, &kCFTypeArrayCallBacks);
+  CFErrorRef error = NULL;
+  CFDictionaryRef cert_dict =
+      SecCertificateCopyValues(certificate, key_array, &error);
+  if (cert_dict == NULL) {
+    CFRelease(key_array);
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "X509.issuer failed to copy issuer field out of certificate"));
+  }
+
+  CFTypeRef item = CFDictionaryGetValue(cert_dict, keys[0]);
+  ASSERT(CFGetTypeID(item) == CFDictionaryGetTypeID());
+  CFDictionaryRef val_dict = reinterpret_cast<CFDictionaryRef>(item);
+
+  item = CFDictionaryGetValue(val_dict, kSecPropertyKeyValue);
+  ASSERT(CFGetTypeID(item) == CFArrayGetTypeID());
+  CFArrayRef val_array = reinterpret_cast<CFArrayRef>(item);
+
+  for (intptr_t i = 0; i < CFArrayGetCount(val_array); i++) {
+    item = CFArrayGetValueAtIndex(val_array, i);
+    ASSERT(CFGetTypeID(item) == CFDictionaryGetTypeID());
+    CFDictionaryRef val_dict2 = reinterpret_cast<CFDictionaryRef>(item);
+
+    item = CFDictionaryGetValue(val_dict2, kSecPropertyKeyLabel);
+    ASSERT(CFGetTypeID(item) == CFStringGetTypeID());
+    CFStringRef label = reinterpret_cast<CFStringRef>(item);
+
+    if (CFStringCompare(label, name, 0) == kCFCompareEqualTo) {
+      item = CFDictionaryGetValue(val_dict2, kSecPropertyKeyValue);
+      ASSERT(CFGetTypeID(item) == CFStringGetTypeID());
+      CFStringRef value = reinterpret_cast<CFStringRef>(item);
+      issuer_name = CFStringRefToCString(value);
+      break;
+    }
+  }
+
+  CFRelease(cert_dict);
+  CFRelease(key_array);
+  return issuer_name;
+}
+
+
+void FUNCTION_NAME(X509_Subject)(Dart_NativeArguments args) {
+  SecCertificateRef certificate = GetX509Certificate(args);
+  char* subject_name = GetNameFromCert(
+      certificate,
+      kSecOIDX509V1SubjectName,
+      reinterpret_cast<CFStringRef>(kSecOIDCommonName));
+  if (subject_name == NULL) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "X509.subject failed to find issuer's common name."));
+  } else {
+    Dart_SetReturnValue(args, Dart_NewStringFromCString(subject_name));
+  }
+}
+
+
+void FUNCTION_NAME(X509_Issuer)(Dart_NativeArguments args) {
+  SecCertificateRef certificate = GetX509Certificate(args);
+  char* issuer_name = GetNameFromCert(
+      certificate,
+      kSecOIDX509V1IssuerName,
+      reinterpret_cast<CFStringRef>(kSecOIDCommonName));
+  if (issuer_name == NULL) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "X509.issuer failed to find issuer's common name."));
+  } else {
+    Dart_SetReturnValue(args, Dart_NewStringFromCString(issuer_name));
+  }
+}
+
+
+// Returns the number of seconds since the epoch from 'field'.
+static int64_t GetTimeFromCert(SecCertificateRef certificate, CFTypeRef field) {
+  CFTypeRef keys[] = { field };
+  CFArrayRef key_array = CFArrayCreate(NULL, keys, 1, &kCFTypeArrayCallBacks);
+  CFErrorRef error = NULL;
+  CFDictionaryRef cert_dict =
+      SecCertificateCopyValues(certificate, key_array, &error);
+  if (cert_dict == NULL) {
+    CFRelease(key_array);
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "X509.startValidity: failed to copy issuer field out of certificate"));
+  }
+
+  CFTypeRef item = CFDictionaryGetValue(cert_dict, keys[0]);
+  ASSERT(CFGetTypeID(item) == CFDictionaryGetTypeID());
+  CFDictionaryRef val_dict = reinterpret_cast<CFDictionaryRef>(item);
+
+  item = CFDictionaryGetValue(val_dict, kSecPropertyKeyValue);
+  ASSERT(CFGetTypeID(item) == CFNumberGetTypeID());
+  CFNumberRef date_number = reinterpret_cast<CFNumberRef>(item);
+
+  CFAbsoluteTime date_abs_time;
+  CFNumberGetValue(date_number, kCFNumberDoubleType, &date_abs_time);
+  CFAbsoluteTime seconds_since_epoch =
+      date_abs_time + kCFAbsoluteTimeIntervalSince1970;
+  return static_cast<int64_t>(seconds_since_epoch) * 1000LL;
+}
+
+
+void FUNCTION_NAME(X509_StartValidity)(Dart_NativeArguments args) {
+  SecCertificateRef certificate = GetX509Certificate(args);
+  int64_t seconds_since_epoch = GetTimeFromCert(certificate,
+                                                kSecOIDX509V1ValidityNotBefore);
+  Dart_SetReturnValue(args,
+      Dart_NewInteger(static_cast<int64_t>(seconds_since_epoch) * 1000LL));
+}
+
+
+void FUNCTION_NAME(X509_EndValidity)(Dart_NativeArguments args) {
+  SecCertificateRef certificate = GetX509Certificate(args);
+  int64_t seconds_since_epoch = GetTimeFromCert(certificate,
+                                                kSecOIDX509V1ValidityNotAfter);
+  Dart_SetReturnValue(args,
+      Dart_NewInteger(static_cast<int64_t>(seconds_since_epoch) * 1000LL));
+}
+
+
+// Pushes data through the SSL filter, reading and writing from circular
+// buffers shared with Dart. Called from the IOService thread.
+//
+// The Dart _SecureFilterImpl class contains 4 ExternalByteArrays used to
+// pass encrypted and plaintext data to and from the C++ SSLFilter object.
+//
+// ProcessFilter is called with a CObject array containing the pointer to
+// the SSLFilter, encoded as an int, and the start and end positions of the
+// valid data in the four circular buffers.  The function only reads from
+// the valid data area of the input buffers, and only writes to the free
+// area of the output buffers.  The function returns the new start and end
+// positions in the buffers, but it only updates start for input buffers, and
+// end for output buffers.  Therefore, the Dart thread can simultaneously
+// write to the free space and end pointer of input buffers, and read from
+// the data space of output buffers, and modify the start pointer.
+//
+// When ProcessFilter returns, the Dart thread is responsible for combining
+// the updated pointers from Dart and C++, to make the new valid state of
+// the circular buffer.
+CObject* SSLFilter::ProcessFilterRequest(const CObjectArray& request) {
+  CObjectIntptr filter_object(request[0]);
+  SSLFilter* filter = reinterpret_cast<SSLFilter*>(filter_object.Value());
+  bool in_handshake = CObjectBool(request[1]).Value();
+  intptr_t starts[SSLFilter::kNumBuffers];
+  intptr_t ends[SSLFilter::kNumBuffers];
+  for (intptr_t i = 0; i < SSLFilter::kNumBuffers; ++i) {
+    starts[i] = CObjectInt32(request[2 * i + 2]).Value();
+    ends[i] = CObjectInt32(request[2 * i + 3]).Value();
+  }
+
+  OSStatus status = filter->ProcessAllBuffers(starts, ends, in_handshake);
+  if (status == noErr) {
+    CObjectArray* result = new CObjectArray(
+        CObject::NewArray(SSLFilter::kNumBuffers * 2));
+    for (intptr_t i = 0; i < SSLFilter::kNumBuffers; ++i) {
+      result->SetAt(2 * i, new CObjectInt32(CObject::NewInt32(starts[i])));
+      result->SetAt(2 * i + 1, new CObjectInt32(CObject::NewInt32(ends[i])));
+    }
+    return result;
+  } else {
+    TextBuffer status_message(SSL_ERROR_MESSAGE_BUFFER_SIZE);
+    CFStringRef error_string = SecCopyErrorMessageString(status, NULL);
+    if (error_string == NULL) {
+      status_message.Printf("OSStatus = %ld: https://www.osstatus.com",
+          static_cast<intptr_t>(status));
+    } else {
+      char* error = CFStringRefToCString(error_string);
+      status_message.Printf("OSStatus = %ld: %s",
+          static_cast<intptr_t>(status), error);
+      CFRelease(error_string);
+    }
+    CObjectArray* result = new CObjectArray(CObject::NewArray(2));
+    result->SetAt(0, new CObjectInt32(CObject::NewInt32(status)));
+    result->SetAt(1, new CObjectString(CObject::NewString(
+        status_message.buf())));
+    return result;
+  }
+}
+
+
+// Usually buffer_starts_ and buffer_ends_ are populated by ProcessAllBuffers,
+// called from ProcessFilterRequest, called from the IOService thread.
+// However, the first call to SSLHandshake comes from the Dart thread, and so
+// doesn't go through there. This results in calls to SSLReadCallback and
+// SSLWriteCallback in which buffer_starts_ and buffer_ends_ haven't been set
+// up. In that case, since we're coming from Dart anyway, we can access the
+// fieds directly from the Dart objects.
+intptr_t SSLFilter::GetBufferStart(intptr_t idx) const {
+  if (buffer_starts_[idx] != NULL) {
+    return *buffer_starts_[idx];
+  }
+  Dart_Handle buffer_handle =
+      ThrowIfError(Dart_HandleFromPersistent(dart_buffer_objects_[idx]));
+  Dart_Handle start_handle =
+      ThrowIfError(Dart_GetField(buffer_handle, DartUtils::NewString("start")));
+  int64_t start = DartUtils::GetIntegerValue(start_handle);
+  return static_cast<intptr_t>(start);
+}
+
+
+intptr_t SSLFilter::GetBufferEnd(intptr_t idx) const {
+  if (buffer_ends_[idx] != NULL) {
+    return *buffer_ends_[idx];
+  }
+  Dart_Handle buffer_handle =
+      ThrowIfError(Dart_HandleFromPersistent(dart_buffer_objects_[idx]));
+  Dart_Handle end_handle =
+      ThrowIfError(Dart_GetField(buffer_handle, DartUtils::NewString("end")));
+  int64_t end = DartUtils::GetIntegerValue(end_handle);
+  return static_cast<intptr_t>(end);
+}
+
+
+void SSLFilter::SetBufferStart(intptr_t idx, intptr_t value) {
+  if (buffer_starts_[idx] != NULL) {
+    *buffer_starts_[idx] = value;
+    return;
+  }
+  Dart_Handle buffer_handle =
+      ThrowIfError(Dart_HandleFromPersistent(dart_buffer_objects_[idx]));
+  ThrowIfError(DartUtils::SetIntegerField(
+      buffer_handle, "start", static_cast<int64_t>(value)));
+}
+
+
+void SSLFilter::SetBufferEnd(intptr_t idx, intptr_t value) {
+  if (buffer_ends_[idx] != NULL) {
+    *buffer_ends_[idx] = value;
+    return;
+  }
+  Dart_Handle buffer_handle =
+      ThrowIfError(Dart_HandleFromPersistent(dart_buffer_objects_[idx]));
+  ThrowIfError(DartUtils::SetIntegerField(
+      buffer_handle, "end", static_cast<int64_t>(value)));
+}
+
+
+OSStatus SSLFilter::ProcessAllBuffers(intptr_t starts[kNumBuffers],
+                                      intptr_t ends[kNumBuffers],
+                                      bool in_handshake) {
+  for (intptr_t i = 0; i < kNumBuffers; ++i) {
+    buffer_starts_[i] = &starts[i];
+    buffer_ends_[i] = &ends[i];
+  }
+
+  if (in_handshake) {
+    OSStatus status = Handshake();
+    if (status != noErr) {
+      return status;
+    }
+  } else {
+    for (intptr_t i = 0; i < kNumBuffers; ++i) {
+      intptr_t start = starts[i];
+      intptr_t end = ends[i];
+      intptr_t size =
+          isBufferEncrypted(i) ? encrypted_buffer_size_ : buffer_size_;
+      if (start < 0 || end < 0 || start >= size || end >= size) {
+        FATAL("Out-of-bounds internal buffer access in dart:io SecureSocket");
+      }
+      switch (i) {
+        case kReadPlaintext:
+          // Write data to the circular buffer's free space.  If the buffer
+          // is full, neither if statement is executed and nothing happens.
+          if (start <= end) {
+            // If the free space may be split into two segments,
+            // then the first is [end, size), unless start == 0.
+            // Then, since the last free byte is at position start - 2,
+            // the interval is [end, size - 1).
+            intptr_t buffer_end = (start == 0) ? size - 1 : size;
+            intptr_t bytes = 0;
+            OSStatus status =
+                ProcessReadPlaintextBuffer(end, buffer_end, &bytes);
+            if ((status != noErr) && (status != errSSLWouldBlock)) {
+              return status;
+            }
+            end += bytes;
+            ASSERT(end <= size);
+            if (end == size) {
+              end = 0;
+            }
+          }
+          if (start > end + 1) {
+            intptr_t bytes = 0;
+            OSStatus status =
+                ProcessReadPlaintextBuffer(end, start - 1, &bytes);
+            if ((status != noErr) && (status != errSSLWouldBlock)) {
+              return status;
+            }
+            end += bytes;
+            ASSERT(end < start);
+          }
+          ends[i] = end;
+          break;
+        case kWritePlaintext:
+          // Read/Write data from circular buffer.  If the buffer is empty,
+          // neither if statement's condition is true.
+          if (end < start) {
+            // Data may be split into two segments.  In this case,
+            // the first is [start, size).
+            intptr_t bytes = 0;
+            OSStatus status = ProcessWritePlaintextBuffer(start, size, &bytes);
+            if ((status != noErr) && (status != errSSLWouldBlock)) {
+              return status;
+            }
+            start += bytes;
+            ASSERT(start <= size);
+            if (start == size) {
+              start = 0;
+            }
+          }
+          if (start < end) {
+            intptr_t bytes = 0;
+            OSStatus status = ProcessWritePlaintextBuffer(start, end, &bytes);
+            if ((status != noErr) && (status != errSSLWouldBlock)) {
+              return status;
+            }
+            start += bytes;
+            ASSERT(start <= end);
+          }
+          starts[i] = start;
+          break;
+        case kReadEncrypted:
+        case kWriteEncrypted:
+          // These buffers are advanced through SSLReadCallback and
+          // SSLWriteCallback, which are called from SSLRead, SSLWrite, and
+          // SSLHandshake.
+          break;
+        default:
+          UNREACHABLE();
+      }
+    }
+  }
+
+  for (intptr_t i = 0; i < kNumBuffers; ++i) {
+    buffer_starts_[i] = NULL;
+    buffer_ends_[i] = NULL;
+  }
+  return noErr;
+}
+
+
+Dart_Handle SSLFilter::Init(Dart_Handle dart_this) {
+  ASSERT(string_start_ == NULL);
+  string_start_ = Dart_NewPersistentHandle(DartUtils::NewString("start"));
+  ASSERT(string_start_ != NULL);
+  ASSERT(string_length_ == NULL);
+  string_length_ = Dart_NewPersistentHandle(DartUtils::NewString("length"));
+  ASSERT(string_length_ != NULL);
+  ASSERT(bad_certificate_callback_ == NULL);
+  bad_certificate_callback_ = Dart_NewPersistentHandle(Dart_Null());
+  ASSERT(bad_certificate_callback_ != NULL);
+
+  // Caller handles cleanup on an error.
+  return InitializeBuffers(dart_this);
+}
+
+
+Dart_Handle SSLFilter::InitializeBuffers(Dart_Handle dart_this) {
+  // Create SSLFilter buffers as ExternalUint8Array objects.
+  Dart_Handle buffers_string = DartUtils::NewString("buffers");
+  RETURN_IF_ERROR(buffers_string);
+  Dart_Handle dart_buffers_object = Dart_GetField(dart_this, buffers_string);
+  RETURN_IF_ERROR(dart_buffers_object);
+  Dart_Handle secure_filter_impl_type = Dart_InstanceGetType(dart_this);
+  RETURN_IF_ERROR(secure_filter_impl_type);
+  Dart_Handle size_string = DartUtils::NewString("SIZE");
+  RETURN_IF_ERROR(size_string);
+  Dart_Handle dart_buffer_size = Dart_GetField(
+      secure_filter_impl_type, size_string);
+  RETURN_IF_ERROR(dart_buffer_size);
+
+  int64_t buffer_size = 0;
+  Dart_Handle err = Dart_IntegerToInt64(dart_buffer_size, &buffer_size);
+  RETURN_IF_ERROR(err);
+
+  Dart_Handle encrypted_size_string = DartUtils::NewString("ENCRYPTED_SIZE");
+  RETURN_IF_ERROR(encrypted_size_string);
+
+  Dart_Handle dart_encrypted_buffer_size = Dart_GetField(
+      secure_filter_impl_type, encrypted_size_string);
+  RETURN_IF_ERROR(dart_encrypted_buffer_size);
+
+  int64_t encrypted_buffer_size = 0;
+  err = Dart_IntegerToInt64(dart_encrypted_buffer_size, &encrypted_buffer_size);
+  RETURN_IF_ERROR(err);
+
+  if (buffer_size <= 0 || buffer_size > 1 * MB) {
+    FATAL("Invalid buffer size in _ExternalBuffer");
+  }
+  if (encrypted_buffer_size <= 0 || encrypted_buffer_size > 1 * MB) {
+    FATAL("Invalid encrypted buffer size in _ExternalBuffer");
+  }
+  buffer_size_ = static_cast<intptr_t>(buffer_size);
+  encrypted_buffer_size_ = static_cast<intptr_t>(encrypted_buffer_size);
+
+  Dart_Handle data_identifier = DartUtils::NewString("data");
+  RETURN_IF_ERROR(data_identifier);
+
+  for (int i = 0; i < kNumBuffers; i++) {
+    int size = isBufferEncrypted(i) ? encrypted_buffer_size_ : buffer_size_;
+    buffers_[i] = new uint8_t[size];
+    ASSERT(buffers_[i] != NULL);
+    buffer_starts_[i] = NULL;
+    buffer_ends_[i] = NULL;
+    dart_buffer_objects_[i] = NULL;
+  }
+
+  Dart_Handle result = Dart_Null();
+  for (int i = 0; i < kNumBuffers; ++i) {
+    int size = isBufferEncrypted(i) ? encrypted_buffer_size_ : buffer_size_;
+    result = Dart_ListGetAt(dart_buffers_object, i);
+    if (Dart_IsError(result)) {
+      break;
+    }
+
+    dart_buffer_objects_[i] = Dart_NewPersistentHandle(result);
+    ASSERT(dart_buffer_objects_[i] != NULL);
+    Dart_Handle data =
+        Dart_NewExternalTypedData(Dart_TypedData_kUint8, buffers_[i], size);
+    if (Dart_IsError(data)) {
+      result = data;
+      break;
+    }
+    result = Dart_HandleFromPersistent(dart_buffer_objects_[i]);
+    if (Dart_IsError(result)) {
+      break;
+    }
+    result = Dart_SetField(result, data_identifier, data);
+    if (Dart_IsError(result)) {
+      break;
+    }
+  }
+
+  // Caller handles cleanup on an error.
+  return result;
+}
+
+
+void SSLFilter::RegisterHandshakeCompleteCallback(Dart_Handle complete) {
+  ASSERT(NULL == handshake_complete_);
+  handshake_complete_ = Dart_NewPersistentHandle(complete);
+  ASSERT(handshake_complete_ != NULL);
+}
+
+
+void SSLFilter::RegisterBadCertificateCallback(Dart_Handle callback) {
+  ASSERT(bad_certificate_callback_ != NULL);
+  Dart_DeletePersistentHandle(bad_certificate_callback_);
+  bad_certificate_callback_ = Dart_NewPersistentHandle(callback);
+  ASSERT(bad_certificate_callback_ != NULL);
+}
+
+
+Dart_Handle SSLFilter::PeerCertificate() {
+  if (peer_certs_ == NULL) {
+    return Dart_Null();
+  }
+
+  CFTypeRef item = CFArrayGetValueAtIndex(peer_certs_, 0);
+  ASSERT(CFGetTypeID(item) == SecCertificateGetTypeID());
+  SecCertificateRef cert =
+      reinterpret_cast<SecCertificateRef>(const_cast<void*>(item));
+  if (cert == NULL) {
+    return Dart_Null();
+  }
+
+  return WrappedX509Certificate(cert);
+}
+
+
+void SSLFilter::Connect(Dart_Handle dart_this,
+                        const char* hostname,
+                        SSLCertContext* context,
+                        bool is_server,
+                        bool request_client_certificate,
+                        bool require_client_certificate) {
+  if (in_handshake_) {
+    FATAL("Connect called twice on the same _SecureFilter.");
+  }
+
+  // Create the underlying context
+  SSLContextRef ssl_context = SSLCreateContext(
+      NULL, is_server ? kSSLServerSide : kSSLClientSide, kSSLStreamType);
+
+  // Configure the context.
+  OSStatus status;
+  status = SSLSetPeerDomainName(ssl_context, hostname, strlen(hostname));
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set peer domain name");
+
+  status = SSLSetIOFuncs(
+      ssl_context, SSLFilter::SSLReadCallback, SSLFilter::SSLWriteCallback);
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set IO Callbacks");
+
+  status = SSLSetConnection(
+      ssl_context, reinterpret_cast<SSLConnectionRef>(this));
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set connection object");
+
+  // Always evaluate the certs manually so that we can cache the peer
+  // certificates in the context for calls to peerCertificate.
+  status = SSLSetSessionOption(
+      ssl_context, kSSLSessionOptionBreakOnServerAuth, true);
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set BreakOnServerAuth option");
+
+  status = SSLSetProtocolVersionMin(ssl_context, kTLSProtocol1);
+  CheckStatus(status,
+      "TlsException",
+      "Failed to set minimum protocol version to kTLSProtocol1");
+
+  // If the context has a private key and certificate chain, combine the
+  // private key and first certificate into a SecIdentityRef, and place that
+  // and the remaining certs in an array to pass to SSLSetCertificate().
+  if ((context->private_key() != NULL) && (context->cert_chain() != NULL)) {
+    CFIndex chain_length = CFArrayGetCount(context->cert_chain());
+    CFMutableArrayRef certs =
+        CFArrayCreateMutable(NULL, chain_length, &kCFTypeArrayCallBacks);
+    CFTypeRef item = CFArrayGetValueAtIndex(context->cert_chain(), 0);
+    ASSERT(CFGetTypeID(item) == SecCertificateGetTypeID());
+    SecCertificateRef first_cert =
+        reinterpret_cast<SecCertificateRef>(const_cast<void*>(item));
+    SecIdentityRef identity =
+        SecIdentityCreate(NULL, first_cert, context->private_key());
+    CFArrayAppendValue(certs, identity);
+    for (CFIndex i = 0; i < chain_length; i++) {
+      CFArrayAppendValue(certs,
+                         CFArrayGetValueAtIndex(context->cert_chain(), i));
+    }
+    CFRelease(identity);
+    status = SSLSetCertificate(ssl_context, certs);
+    CFRelease(certs);
+    CheckStatus(status, "TlsException", "SSLSetCertificate failed");
+  }
+
+  if (context->cert_authorities() != NULL) {
+    status = SSLSetCertificateAuthorities(
+        ssl_context, context->cert_authorities(), true);
+    CheckStatus(status,
+        "TlsException",
+        "Failed to set certificate authorities");
+  }
+
+  if (is_server) {
+    SSLAuthenticate auth =
+        require_client_certificate
+        ? kAlwaysAuthenticate
+        : (request_client_certificate ? kTryAuthenticate : kNeverAuthenticate);
+    status = SSLSetClientSideAuthenticate(ssl_context, auth);
+    CheckStatus(status,
+        "TlsException",
+        "Failed to set client authentication mode");
+
+    // If we're at least trying client authentication, then break handshake
+    // for client authentication.
+    if (auth != kNeverAuthenticate) {
+      status = SSLSetSessionOption(
+          ssl_context, kSSLSessionOptionBreakOnClientAuth, true);
+      CheckStatus(status,
+          "TlsException",
+          "Failed to set client authentication mode");
+    }
+  }
+
+  // Add the contexts to our wrapper.
+  cert_context_ = context;
+  ssl_context_ = ssl_context;
+  is_server_ = is_server;
+
+  // Kick-off the handshake. Expect the handshake to need more data.
+  // SSLHandshake calls our SSLReadCallback and SSLWriteCallback.
+  status = SSLHandshake(ssl_context);
+  ASSERT(status != noErr);
+  if (status == errSSLWouldBlock) {
+    status = noErr;
+    in_handshake_ = true;
+  }
+  CheckStatus(status,
+     "HandshakeException",
+      is_server_ ? "Handshake error in server" : "Handshake error in client");
+}
+
+
+OSStatus SSLFilter::EvaluatePeerTrust() {
+  OSStatus status = noErr;
+
+  if (SSL_LOG_STATUS) {
+    Log::Print("Handshake evaluating trust.\n");
+  }
+  SecTrustRef peer_trust = NULL;
+  status = SSLCopyPeerTrust(ssl_context_, &peer_trust);
+  if (status != noErr) {
+    if (is_server_ && (status == errSSLBadCert)) {
+      // A client certificate was requested, but not required, and wasn't sent.
+      return noErr;
+    }
+    if (SSL_LOG_STATUS) {
+      Log::Print("Handshake error from SSLCopyPeerTrust(): %ld.\n",
+          static_cast<intptr_t>(status));
+    }
+    return status;
+  }
+
+  CFArrayRef trusted_certs = NULL;
+  if (cert_context_->trusted_certs() != NULL) {
+    trusted_certs = CFArrayCreateCopy(NULL, cert_context_->trusted_certs());
+  } else {
+    trusted_certs = CFArrayCreate(NULL, NULL, 0, &kCFTypeArrayCallBacks);
+  }
+
+  status = SecTrustSetAnchorCertificates(peer_trust, trusted_certs);
+  if (status != noErr) {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Handshake error from SecTrustSetAnchorCertificates: %ld\n",
+          static_cast<intptr_t>(status));
+    }
+    CFRelease(trusted_certs);
+    CFRelease(peer_trust);
+    return status;
+  }
+
+  if (SSL_LOG_STATUS) {
+    Log::Print("Handshake %s built in root certs\n",
+        cert_context_->trust_builtin() ? "trusting" : "not trusting");
+  }
+
+  status = SecTrustSetAnchorCertificatesOnly(
+      peer_trust, !cert_context_->trust_builtin());
+  if (status != noErr) {
+    CFRelease(trusted_certs);
+    CFRelease(peer_trust);
+    return status;
+  }
+
+  SecTrustResultType trust_result;
+  status = SecTrustEvaluate(peer_trust, &trust_result);
+  if (status != noErr) {
+    CFRelease(trusted_certs);
+    CFRelease(peer_trust);
+    return status;
+  }
+
+  // Grab the peer's certificate chain.
+  CFIndex peer_chain_length = SecTrustGetCertificateCount(peer_trust);
+  CFMutableArrayRef peer_certs =
+      CFArrayCreateMutable(NULL, peer_chain_length, &kCFTypeArrayCallBacks);
+  for (CFIndex i = 0; i < peer_chain_length; ++i) {
+    CFArrayAppendValue(peer_certs,
+                       SecTrustGetCertificateAtIndex(peer_trust, i));
+  }
+  peer_certs_ = peer_certs;
+
+  CFRelease(trusted_certs);
+  CFRelease(peer_trust);
+
+  if ((trust_result == kSecTrustResultProceed) ||
+      (trust_result == kSecTrustResultUnspecified)) {
+    // Trusted.
+    return noErr;
+  } else {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Trust eval failed: trust_restul = %d\n", trust_result);
+    }
+    bad_cert_ = true;
+    return errSSLBadCert;
+  }
+}
+
+
+OSStatus SSLFilter::Handshake() {
+  ASSERT(cert_context_ != NULL);
+  ASSERT(ssl_context_ != NULL);
+  // Try and push handshake along.
+  if (SSL_LOG_STATUS) {
+    Log::Print("Doing SSLHandshake\n");
+  }
+  OSStatus status = SSLHandshake(ssl_context_);
+  if (SSL_LOG_STATUS) {
+    Log::Print("SSLHandshake returned %ld\n", static_cast<intptr_t>(status));
+  }
+
+  if ((status == errSSLServerAuthCompleted) ||
+      (status == errSSLClientAuthCompleted)) {
+    status = EvaluatePeerTrust();
+    if (status == errSSLBadCert) {
+      // Need to invoke the bad certificate callback.
+      return noErr;
+    } else if (status != noErr) {
+      return status;
+    }
+    // When trust evaluation succeeds, we can call SSLHandshake again
+    // immediately.
+    status = SSLHandshake(ssl_context_);
+  }
+
+  if (status == errSSLWouldBlock) {
+    in_handshake_ = true;
+    return noErr;
+  }
+
+  // Handshake succeeded.
+  if ((in_handshake_) && (status == noErr)) {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Finished with the Handshake\n");
+    }
+    connected_ = true;
+  }
+  return status;
+}
+
+
+// Returns false if Handshake should fail, and true if Handshake should
+// proceed.
+Dart_Handle SSLFilter::InvokeBadCertCallback(SecCertificateRef peer_cert) {
+  Dart_Handle callback = bad_certificate_callback_;
+  if (Dart_IsNull(callback)) {
+    return callback;
+  }
+  Dart_Handle args[1];
+  args[0] = WrappedX509Certificate(peer_cert);
+  if (Dart_IsError(args[0])) {
+    return args[0];
+  }
+  Dart_Handle result = Dart_InvokeClosure(callback, 1, args);
+  if (!Dart_IsError(result) && !Dart_IsBoolean(result)) {
+    result = Dart_NewUnhandledExceptionError(DartUtils::NewDartIOException(
+        "HandshakeException",
+        "BadCertificateCallback returned a value that was not a boolean",
+        Dart_Null()));
+  }
+  return result;
+}
+
+
+OSStatus SSLFilter::CheckHandshake() {
+  if (bad_cert_ && in_handshake_) {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Invoking bad certificate callback\n");
+    }
+    ASSERT(peer_certs_ != NULL);
+    CFIndex peer_certs_len = CFArrayGetCount(peer_certs_);
+    ASSERT(peer_certs_len > 0);
+    CFTypeRef item = CFArrayGetValueAtIndex(peer_certs_, peer_certs_len - 1);
+    ASSERT(item != NULL);
+    ASSERT(CFGetTypeID(item) == SecCertificateGetTypeID());
+    SecCertificateRef peer_cert =
+        reinterpret_cast<SecCertificateRef>(const_cast<void*>(item));
+    Dart_Handle result = InvokeBadCertCallback(peer_cert);
+    ThrowIfError(result);
+    if (Dart_IsNull(result)) {
+      return errSSLBadCert;
+    } else {
+      bool good_cert = DartUtils::GetBooleanValue(result);
+      bad_cert_ = !good_cert;
+      return good_cert ? noErr : errSSLBadCert;
+    }
+  }
+
+  if (connected_ && in_handshake_) {
+    if (SSL_LOG_STATUS) {
+      Log::Print("Invoking handshake complete callback\n");
+    }
+    ThrowIfError(Dart_InvokeClosure(
+        Dart_HandleFromPersistent(handshake_complete_), 0, NULL));
+    in_handshake_ = false;
+  }
+  return noErr;
+}
+
+
+void SSLFilter::Renegotiate(bool use_session_cache,
+                            bool request_client_certificate,
+                            bool require_client_certificate) {
+  // The SSL_REQUIRE_CERTIFICATE option only takes effect if the
+  // SSL_REQUEST_CERTIFICATE option is also set, so set it.
+  request_client_certificate =
+      request_client_certificate || require_client_certificate;
+  // TODO(24070, 24069): Implement setting the client certificate parameters,
+  //   and triggering rehandshake.
+}
+
+
+SSLFilter::~SSLFilter() {
+  // cert_context_ deleted by finalizer. Don't delete here.
+  cert_context_ = NULL;
+  if (ssl_context_ != NULL) {
+    CFRelease(ssl_context_);
+    ssl_context_ = NULL;
+  }
+  if (peer_certs_ != NULL) {
+    CFRelease(peer_certs_);
+    peer_certs_ = NULL;
+  }
+  if (hostname_ != NULL) {
+    free(hostname_);
+    hostname_ = NULL;
+  }
+  for (int i = 0; i < kNumBuffers; ++i) {
+    if (buffers_[i] != NULL) {
+      delete[] buffers_[i];
+      buffers_[i] = NULL;
+    }
+  }
+}
+
+
+void SSLFilter::Destroy() {
+  if (ssl_context_ != NULL) {
+    SSLClose(ssl_context_);
+  }
+  for (int i = 0; i < kNumBuffers; ++i) {
+    if (dart_buffer_objects_[i] != NULL) {
+      Dart_DeletePersistentHandle(dart_buffer_objects_[i]);
+      dart_buffer_objects_[i] = NULL;
+    }
+  }
+  if (string_start_ != NULL) {
+    Dart_DeletePersistentHandle(string_start_);
+    string_start_ = NULL;
+  }
+  if (string_length_ != NULL) {
+    Dart_DeletePersistentHandle(string_length_);
+    string_length_ = NULL;
+  }
+  if (handshake_complete_ != NULL) {
+    Dart_DeletePersistentHandle(handshake_complete_);
+    handshake_complete_ = NULL;
+  }
+  if (bad_certificate_callback_ != NULL) {
+    Dart_DeletePersistentHandle(bad_certificate_callback_);
+    bad_certificate_callback_ = NULL;
+  }
+}
+
+
+OSStatus SSLFilter::SSLReadCallback(SSLConnectionRef connection,
+                                    void* data, size_t* data_requested) {
+  // Copy at most `data_requested` bytes from `buffers_[kReadEncrypted]` into
+  // `data`
+  ASSERT(connection != NULL);
+  ASSERT(data != NULL);
+  ASSERT(data_requested != NULL);
+
+  SSLFilter* filter =
+      const_cast<SSLFilter*>(reinterpret_cast<const SSLFilter*>(connection));
+  uint8_t* datap = reinterpret_cast<uint8_t*>(data);
+  uint8_t* buffer = filter->buffers_[kReadEncrypted];
+  intptr_t start = filter->GetBufferStart(kReadEncrypted);
+  intptr_t end = filter->GetBufferEnd(kReadEncrypted);
+  intptr_t size = filter->encrypted_buffer_size_;
+  intptr_t requested = static_cast<intptr_t>(*data_requested);
+  intptr_t data_read = 0;
+
+  if (end < start) {
+    // Data may be split into two segments.  In this case,
+    // the first is [start, size).
+    intptr_t buffer_end = (start == 0) ? size - 1 : size;
+    intptr_t available = buffer_end - start;
+    intptr_t bytes = requested < available ? requested : available;
+    memmove(datap, &buffer[start], bytes);
+    start += bytes;
+    datap += bytes;
+    data_read += bytes;
+    requested -= bytes;
+    ASSERT(start <= size);
+    if (start == size) {
+      start = 0;
+    }
+  }
+  if ((requested > 0) && (start < end)) {
+    intptr_t available = end - start;
+    intptr_t bytes = requested < available ? requested : available;
+    memmove(datap, &buffer[start], bytes);
+    start += bytes;
+    datap += bytes;
+    data_read += bytes;
+    requested -= bytes;
+    ASSERT(start <= end);
+  }
+
+  if (SSL_LOG_DATA) {
+    Log::Print("SSLReadCallback: requested: %ld, read %ld bytes\n",
+        *data_requested, data_read);
+  }
+
+  filter->SetBufferStart(kReadEncrypted, start);
+  bool short_read = data_read < static_cast<intptr_t>(*data_requested);
+  *data_requested = data_read;
+  return short_read ? errSSLWouldBlock : noErr;
+}
+
+
+// Read decrypted data from the filter to the circular buffer.
+OSStatus SSLFilter::ProcessReadPlaintextBuffer(intptr_t start,
+                                               intptr_t end,
+                                               intptr_t* bytes_processed) {
+  ASSERT(bytes_processed != NULL);
+  intptr_t length = end - start;
+  OSStatus status = noErr;
+  size_t bytes = 0;
+  if (length > 0) {
+    status = SSLRead(
+        ssl_context_,
+        reinterpret_cast<void*>((buffers_[kReadPlaintext] + start)),
+        length,
+        &bytes);
+    if (SSL_LOG_STATUS) {
+      Log::Print("SSLRead: status = %ld\n", static_cast<intptr_t>(status));
+    }
+    if ((status != noErr) && (status != errSSLWouldBlock)) {
+      *bytes_processed = 0;
+      return status;
+    }
+  }
+  if (SSL_LOG_DATA) {
+    Log::Print("ProcessReadPlaintextBuffer: requested: %ld, read %ld bytes\n",
+        length, bytes);
+  }
+  *bytes_processed = static_cast<intptr_t>(bytes);
+  return status;
+}
+
+
+OSStatus SSLFilter::SSLWriteCallback(SSLConnectionRef connection,
+                                     const void* data, size_t* data_provided) {
+  // Copy at most `data_provided` bytes from data into
+  // `buffers_[kWriteEncrypted]`.
+  ASSERT(connection != NULL);
+  ASSERT(data != NULL);
+  ASSERT(data_provided != NULL);
+
+  SSLFilter* filter =
+    const_cast<SSLFilter*>(reinterpret_cast<const SSLFilter*>(connection));
+  const uint8_t* datap = reinterpret_cast<const uint8_t*>(data);
+  uint8_t* buffer = filter->buffers_[kWriteEncrypted];
+  intptr_t start = filter->GetBufferStart(kWriteEncrypted);
+  intptr_t end = filter->GetBufferEnd(kWriteEncrypted);
+  intptr_t size = filter->encrypted_buffer_size_;
+  intptr_t provided = static_cast<intptr_t>(*data_provided);
+  intptr_t data_written = 0;
+
+  // is full, neither if statement is executed and nothing happens.
+  if (start <= end) {
+    // If the free space may be split into two segments,
+    // then the first is [end, size), unless start == 0.
+    // Then, since the last free byte is at position start - 2,
+    // the interval is [end, size - 1).
+    intptr_t buffer_end = (start == 0) ? size - 1 : size;
+    intptr_t available = buffer_end - end;
+    intptr_t bytes = provided < available ? provided : available;
+    memmove(&buffer[end], datap, bytes);
+    end += bytes;
+    datap += bytes;
+    data_written += bytes;
+    provided -= bytes;
+    ASSERT(end <= size);
+    if (end == size) {
+      end = 0;
+    }
+  }
+  if ((provided > 0) && (start > end + 1)) {
+    intptr_t available = (start - 1) - end;
+    intptr_t bytes = provided < available ? provided : available;
+    memmove(&buffer[end], datap, bytes);
+    end += bytes;
+    datap += bytes;
+    data_written += bytes;
+    provided -= bytes;
+    ASSERT(end < start);
+  }
+
+  if (SSL_LOG_DATA) {
+    Log::Print("SSLWriteCallback: provided: %ld, written %ld bytes\n",
+        *data_provided, data_written);
+  }
+
+  filter->SetBufferEnd(kWriteEncrypted, end);
+  *data_provided = data_written;
+  return (data_written == 0) ? errSSLWouldBlock : noErr;
+}
+
+
+OSStatus SSLFilter::ProcessWritePlaintextBuffer(intptr_t start,
+                                                intptr_t end,
+                                                intptr_t* bytes_processed) {
+  ASSERT(bytes_processed != NULL);
+  intptr_t length = end - start;
+  OSStatus status = noErr;
+  size_t bytes = 0;
+  if (length > 0) {
+    status = SSLWrite(
+        ssl_context_,
+        reinterpret_cast<void*>(buffers_[kWritePlaintext] + start),
+        length,
+        &bytes);
+    if (SSL_LOG_STATUS) {
+      Log::Print("SSLWrite: status = %ld\n", static_cast<intptr_t>(status));
+    }
+    if ((status != noErr) && (status != errSSLWouldBlock)) {
+      *bytes_processed = 0;
+      return status;
+    }
+  }
+  if (SSL_LOG_DATA) {
+    Log::Print("ProcessWritePlaintextBuffer: requested: %ld, written: %ld\n",
+        length, bytes);
+  }
+  *bytes_processed = static_cast<intptr_t>(bytes);
+  return status;
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // defined(TARGET_OS_MACOS) && !TARGET_OS_IOS
+
+#endif  // !defined(DART_IO_DISABLED) &&
+        // !defined(DART_IO_SECURE_SOCKET_DISABLED)
diff --git a/runtime/bin/secure_socket_macos.h b/runtime/bin/secure_socket_macos.h
new file mode 100644
index 0000000..c088d8c
--- /dev/null
+++ b/runtime/bin/secure_socket_macos.h
@@ -0,0 +1,207 @@
+// 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.
+
+#ifndef BIN_SECURE_SOCKET_MACOS_H_
+#define BIN_SECURE_SOCKET_MACOS_H_
+
+#if !defined(BIN_SECURE_SOCKET_H_)
+#error Do not include secure_socket_macos.h directly. Use secure_socket.h.
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <Security/SecureTransport.h>
+#include <Security/Security.h>
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "bin/socket.h"
+#include "bin/thread.h"
+#include "bin/utils.h"
+
+namespace dart {
+namespace bin {
+
+// Forward declaration of SSLContext.
+class SSLCertContext;
+
+// SSLFilter encapsulates the SecureTransport code in a filter that communicates
+// with the containing _SecureFilterImpl Dart object through four shared
+// ExternalByteArray buffers, for reading and writing plaintext, and
+// reading and writing encrypted text.  The filter handles handshaking
+// and certificate verification.
+class SSLFilter {
+ public:
+  // These enums must agree with those in sdk/lib/io/secure_socket.dart.
+  enum BufferIndex {
+    kReadPlaintext,
+    kWritePlaintext,
+    kReadEncrypted,
+    kWriteEncrypted,
+    kNumBuffers,
+    kFirstEncrypted = kReadEncrypted
+  };
+
+  SSLFilter()
+      : cert_context_(NULL),
+        ssl_context_(NULL),
+        peer_certs_(NULL),
+        string_start_(NULL),
+        string_length_(NULL),
+        handshake_complete_(NULL),
+        bad_certificate_callback_(NULL),
+        in_handshake_(false),
+        connected_(false),
+        bad_cert_(false),
+        is_server_(false),
+        hostname_(NULL) {
+  }
+
+  ~SSLFilter();
+
+  // Callback called by the IOService.
+  static CObject* ProcessFilterRequest(const CObjectArray& request);
+
+  Dart_Handle Init(Dart_Handle dart_this);
+  void Connect(Dart_Handle dart_this,
+               const char* hostname,
+               SSLCertContext* context,
+               bool is_server,
+               bool request_client_certificate,
+               bool require_client_certificate);
+  void Destroy();
+  OSStatus CheckHandshake();
+  void Renegotiate(bool use_session_cache,
+                   bool request_client_certificate,
+                   bool require_client_certificate);
+  void RegisterHandshakeCompleteCallback(Dart_Handle handshake_complete);
+  void RegisterBadCertificateCallback(Dart_Handle callback);
+  Dart_Handle PeerCertificate();
+
+ private:
+  static OSStatus SSLReadCallback(SSLConnectionRef connection,
+                                  void* data,
+                                  size_t* data_length);
+  static OSStatus SSLWriteCallback(SSLConnectionRef connection,
+                                   const void* data,
+                                   size_t* data_length);
+
+  static bool isBufferEncrypted(intptr_t i) {
+    return static_cast<BufferIndex>(i) >= kFirstEncrypted;
+  }
+  Dart_Handle InitializeBuffers(Dart_Handle dart_this);
+
+  intptr_t GetBufferStart(intptr_t idx) const;
+  intptr_t GetBufferEnd(intptr_t idx) const;
+  void SetBufferStart(intptr_t idx, intptr_t value);
+  void SetBufferEnd(intptr_t idx, intptr_t value);
+
+  OSStatus ProcessAllBuffers(intptr_t starts[kNumBuffers],
+                             intptr_t ends[kNumBuffers],
+                             bool in_handshake);
+  OSStatus ProcessReadPlaintextBuffer(intptr_t start,
+                                      intptr_t end,
+                                      intptr_t* bytes_processed);
+  OSStatus ProcessWritePlaintextBuffer(intptr_t start,
+                                       intptr_t end,
+                                       intptr_t* bytes_processed);
+
+  // These calls can block on IO, and should only be invoked from
+  // from ProcessAllBuffers from ProcessFilterRequest.
+  OSStatus EvaluatePeerTrust();
+  OSStatus Handshake();
+  Dart_Handle InvokeBadCertCallback(SecCertificateRef peer_cert);
+
+  SSLCertContext* cert_context_;
+  SSLContextRef ssl_context_;
+  CFArrayRef peer_certs_;
+
+  // starts and ends filled in at the start of ProcessAllBuffers.
+  // If these are NULL, then try to get the pointers out of
+  // dart_buffer_objects_.
+  uint8_t* buffers_[kNumBuffers];
+  intptr_t* buffer_starts_[kNumBuffers];
+  intptr_t* buffer_ends_[kNumBuffers];
+  intptr_t buffer_size_;
+  intptr_t encrypted_buffer_size_;
+  Dart_PersistentHandle string_start_;
+  Dart_PersistentHandle string_length_;
+  Dart_PersistentHandle dart_buffer_objects_[kNumBuffers];
+  Dart_PersistentHandle handshake_complete_;
+  Dart_PersistentHandle bad_certificate_callback_;
+  bool in_handshake_;
+  bool connected_;
+  bool bad_cert_;
+  bool is_server_;
+  char* hostname_;
+
+  DISALLOW_COPY_AND_ASSIGN(SSLFilter);
+};
+
+// Where the argument to the constructor is the handle for an object
+// implementing List<int>, this class creates a scope in which the memory
+// backing the list can be accessed.
+//
+// Do not make Dart_ API calls while in a ScopedMemBuffer.
+// Do not call Dart_PropagateError while in a ScopedMemBuffer.
+class ScopedMemBuffer {
+ public:
+  explicit ScopedMemBuffer(Dart_Handle object) {
+    if (!Dart_IsTypedData(object) && !Dart_IsList(object)) {
+      Dart_ThrowException(DartUtils::NewDartArgumentError(
+          "Argument is not a List<int>"));
+    }
+
+    uint8_t* bytes = NULL;
+    intptr_t bytes_len = 0;
+    bool is_typed_data = false;
+    if (Dart_IsTypedData(object)) {
+      is_typed_data = true;
+      Dart_TypedData_Type typ;
+      ThrowIfError(Dart_TypedDataAcquireData(
+          object,
+          &typ,
+          reinterpret_cast<void**>(&bytes),
+          &bytes_len));
+    } else {
+      ASSERT(Dart_IsList(object));
+      ThrowIfError(Dart_ListLength(object, &bytes_len));
+      bytes = Dart_ScopeAllocate(bytes_len);
+      ASSERT(bytes != NULL);
+      ThrowIfError(Dart_ListGetAsBytes(object, 0, bytes, bytes_len));
+    }
+
+    object_ = object;
+    bytes_ = bytes;
+    bytes_len_ = bytes_len;
+    is_typed_data_ = is_typed_data;
+  }
+
+  ~ScopedMemBuffer() {
+    if (is_typed_data_) {
+      ThrowIfError(Dart_TypedDataReleaseData(object_));
+    }
+  }
+
+  uint8_t* get() const { return bytes_; }
+  intptr_t length() const { return bytes_len_; }
+
+ private:
+  Dart_Handle object_;
+  uint8_t* bytes_;
+  intptr_t bytes_len_;
+  bool is_typed_data_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer);
+};
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // BIN_SECURE_SOCKET_MACOS_H_
diff --git a/runtime/bin/secure_socket_patch.dart b/runtime/bin/secure_socket_patch.dart
index 455b132..c47c941 100644
--- a/runtime/bin/secure_socket_patch.dart
+++ b/runtime/bin/secure_socket_patch.dart
@@ -123,6 +123,10 @@
   /* patch */ static SecurityContext get defaultContext {
     return _SecurityContext.defaultContext;
   }
+
+  /* patch */ static bool get alpnSupported {
+    return _SecurityContext.alpnSupported;
+  }
 }
 
 class _SecurityContext
@@ -165,6 +169,8 @@
   void setClientAuthoritiesBytes(List<int> authCertBytes, {String password})
       native "SecurityContext_SetClientAuthoritiesBytes";
 
+  static bool get alpnSupported => _alpnSupported();
+  static bool _alpnSupported() native "SecurityContext_AlpnSupported";
   void setAlpnProtocols(List<String> protocols, bool isServer) {
     Uint8List encodedProtocols =
         SecurityContext._protocolsToLengthEncoding(protocols);
diff --git a/runtime/bin/secure_socket_unsupported.cc b/runtime/bin/secure_socket_unsupported.cc
index 91f4fc7..dc49825 100644
--- a/runtime/bin/secure_socket_unsupported.cc
+++ b/runtime/bin/secure_socket_unsupported.cc
@@ -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.
 
+#if defined(DART_IO_DISABLED) || defined(DART_IO_SECURE_SOCKET_DISABLED)
+
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
-
 #include "include/dart_api.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -99,67 +99,85 @@
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(SecurityContext_UsePrivateKeyBytes)(
     Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)(
     Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(SecurityContext_SetClientAuthoritiesBytes)(
     Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(SecurityContext_SetTrustedCertificatesBytes)(
     Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
+void FUNCTION_NAME(SecurityContext_AlpnSupported)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+
 void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
     Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(SecurityContext_UseCertificateChainBytes)(
     Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(X509_Subject)(Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(X509_Issuer)(Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(X509_StartValidity)(Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 void FUNCTION_NAME(X509_EndValidity)(Dart_NativeArguments args) {
   Dart_ThrowException(DartUtils::NewDartArgumentError(
       "Secure Sockets unsupported on this platform"));
 }
 
+
 class SSLFilter {
  public:
   static CObject* ProcessFilterRequest(const CObjectArray& request);
@@ -171,3 +189,5 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // defined(DART_IO_DISABLED) || defined(DART_IO_SECURE_SOCKET_DISABLED)
diff --git a/runtime/bin/snapshot_empty.cc b/runtime/bin/snapshot_empty.cc
index 4fd42b3..bab9212 100644
--- a/runtime/bin/snapshot_empty.cc
+++ b/runtime/bin/snapshot_empty.cc
@@ -13,7 +13,6 @@
 #endif
 #include <stddef.h>
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/snapshot_in.cc b/runtime/bin/snapshot_in.cc
index e2d67e9..769d96c 100644
--- a/runtime/bin/snapshot_in.cc
+++ b/runtime/bin/snapshot_in.cc
@@ -13,7 +13,6 @@
 #endif
 #include <stddef.h>
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index 87f39f6..fb9704b 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -2,19 +2,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#if !defined(DART_IO_DISABLED)
+
+#include "bin/socket.h"
+
+#include "bin/dartutils.h"
 #include "bin/io_buffer.h"
 #include "bin/isolate_data.h"
-#include "bin/dartutils.h"
-#include "bin/socket.h"
-#include "bin/thread.h"
 #include "bin/lockers.h"
+#include "bin/thread.h"
 #include "bin/utils.h"
 
+#include "include/dart_api.h"
+
 #include "platform/globals.h"
 #include "platform/utils.h"
 
-#include "include/dart_api.h"
-
 namespace dart {
 namespace bin {
 
@@ -60,7 +63,6 @@
     // There is already a socket listening on this port. We need to ensure
     // that if there is one also listening on the same address, it was created
     // with `shared = true`, ...
-
     OSSocket *os_socket = it->second;
     OSSocket *os_socket_same_addr = findOSSocketWithAddress(os_socket, addr);
 
@@ -146,7 +148,7 @@
         current = current->next;
       }
 
-      if (prev == NULL && current->next == NULL) {
+      if ((prev == NULL) && (current->next == NULL)) {
         // Remove last element from the list.
         sockets_by_port_.erase(os_socket->port);
       } else if (prev == NULL) {
@@ -271,7 +273,9 @@
     }
     uint8_t* buffer = NULL;
     Dart_Handle result = IOBuffer::Allocate(length, &buffer);
-    if (Dart_IsError(result)) Dart_PropagateError(result);
+    if (Dart_IsError(result)) {
+      Dart_PropagateError(result);
+    }
     ASSERT(buffer != NULL);
     intptr_t bytes_read = Socket::Read(socket, buffer, length);
     if (bytes_read == length) {
@@ -279,7 +283,9 @@
     } else if (bytes_read > 0) {
       uint8_t* new_buffer = NULL;
       Dart_Handle new_result = IOBuffer::Allocate(bytes_read, &new_buffer);
-      if (Dart_IsError(new_result)) Dart_PropagateError(new_result);
+      if (Dart_IsError(new_result)) {
+        Dart_PropagateError(new_result);
+      }
       ASSERT(new_buffer != NULL);
       memmove(new_buffer, buffer, bytes_read);
       Dart_SetReturnValue(args, new_result);
@@ -326,7 +332,9 @@
   ASSERT(bytes_read > 0);
   uint8_t* data_buffer = NULL;
   Dart_Handle data = IOBuffer::Allocate(bytes_read, &data_buffer);
-  if (Dart_IsError(data)) Dart_PropagateError(data);
+  if (Dart_IsError(data)) {
+    Dart_PropagateError(data);
+  }
   ASSERT(data_buffer != NULL);
   memmove(data_buffer, isolate_data->udp_receive_buffer, bytes_read);
 
@@ -347,14 +355,20 @@
   Dart_Handle dart_args[kNumArgs];
   dart_args[0] = data;
   dart_args[1] = Dart_NewStringFromCString(numeric_address);
-  if (Dart_IsError(dart_args[1])) Dart_PropagateError(dart_args[1]);
+  if (Dart_IsError(dart_args[1])) {
+    Dart_PropagateError(dart_args[1]);
+  }
   dart_args[2] = SocketAddress::ToTypedData(addr);
   dart_args[3] = Dart_NewInteger(port);
-  if (Dart_IsError(dart_args[3])) Dart_PropagateError(dart_args[3]);
+  if (Dart_IsError(dart_args[3])) {
+    Dart_PropagateError(dart_args[3]);
+  }
   // TODO(sgjesse): Cache the _makeDatagram function somewhere.
   Dart_Handle io_lib =
       Dart_LookupLibrary(DartUtils::NewString("dart:io"));
-  if (Dart_IsError(io_lib)) Dart_PropagateError(io_lib);
+  if (Dart_IsError(io_lib)) {
+    Dart_PropagateError(io_lib);
+  }
   Dart_Handle result =
       Dart_Invoke(io_lib,
                   DartUtils::NewString("_makeDatagram"),
@@ -376,7 +390,9 @@
       DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 3));
   bool short_write = false;
   if (short_socket_writes) {
-    if (length > 1) short_write = true;
+    if (length > 1) {
+      short_write = true;
+    }
     length = (length + 1) / 2;
   }
   Dart_TypedData_Type type;
@@ -384,7 +400,9 @@
   intptr_t len;
   Dart_Handle result = Dart_TypedDataAcquireData(
       buffer_obj, &type, reinterpret_cast<void**>(&buffer), &len);
-  if (Dart_IsError(result)) Dart_PropagateError(result);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
   ASSERT((offset + length) <= len);
   buffer += offset;
   intptr_t bytes_written = Socket::Write(socket, buffer, length);
@@ -428,7 +446,9 @@
   intptr_t len;
   Dart_Handle result = Dart_TypedDataAcquireData(
       buffer_obj, &type, reinterpret_cast<void**>(&buffer), &len);
-  if (Dart_IsError(result)) Dart_PropagateError(result);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
   ASSERT((offset + length) <= len);
   buffer += offset;
   intptr_t bytes_written = Socket::SendTo(socket, buffer, length, addr);
@@ -518,15 +538,13 @@
 
 
 void FUNCTION_NAME(Socket_GetSocketId)(Dart_NativeArguments args) {
-  intptr_t id =
-      Socket::GetSocketIdNativeField(Dart_GetNativeArgument(args, 0));
+  intptr_t id = Socket::GetSocketIdNativeField(Dart_GetNativeArgument(args, 0));
   Dart_SetReturnValue(args, Dart_NewInteger(id));
 }
 
 
 void FUNCTION_NAME(Socket_SetSocketId)(Dart_NativeArguments args) {
-  intptr_t id =
-      DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1));
+  intptr_t id = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1));
   Socket::SetSocketIdNativeField(Dart_GetNativeArgument(args, 0), id);
 }
 
@@ -569,7 +587,7 @@
 
 
 CObject* Socket::LookupRequest(const CObjectArray& request) {
-  if (request.Length() == 2 &&
+  if ((request.Length() == 2) &&
       request[0]->IsString() &&
       request[1]->IsInt32()) {
     CObjectString host(request[0]);
@@ -613,7 +631,7 @@
 
 
 CObject* Socket::ReverseLookupRequest(const CObjectArray& request) {
-  if (request.Length() == 1 &&
+  if ((request.Length() == 1) &&
       request[0]->IsTypedData()) {
     CObjectUint8Array addr_object(request[0]);
     RawAddr addr;
@@ -648,7 +666,7 @@
 
 
 CObject* Socket::ListInterfacesRequest(const CObjectArray& request) {
-  if (request.Length() == 1 &&
+  if ((request.Length() == 1) &&
       request[0]->IsInt32()) {
     CObjectInt32 type(request[0]);
     CObject* result = NULL;
@@ -841,7 +859,9 @@
 void Socket::SetSocketIdNativeField(Dart_Handle socket, intptr_t id) {
   Dart_Handle err =
       Dart_SetNativeInstanceField(socket, kSocketIdNativeField, id);
-  if (Dart_IsError(err)) Dart_PropagateError(err);
+  if (Dart_IsError(err)) {
+    Dart_PropagateError(err);
+  }
 }
 
 
@@ -849,9 +869,13 @@
   intptr_t socket = 0;
   Dart_Handle err =
       Dart_GetNativeInstanceField(socket_obj, kSocketIdNativeField, &socket);
-  if (Dart_IsError(err)) Dart_PropagateError(err);
+  if (Dart_IsError(err)) {
+    Dart_PropagateError(err);
+  }
   return socket;
 }
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/socket.h b/runtime/bin/socket.h
index e7646da..2cf940c 100644
--- a/runtime/bin/socket.h
+++ b/runtime/bin/socket.h
@@ -5,12 +5,11 @@
 #ifndef BIN_SOCKET_H_
 #define BIN_SOCKET_H_
 
-#include <map>
+#if defined(DART_IO_DISABLED)
+#error "socket.h can only be included on builds with IO enabled"
+#endif
 
 #include "platform/globals.h"
-
-#include "bin/builtin.h"
-#include "bin/dartutils.h"
 // Declare the OS-specific types ahead of defining the generic class.
 #if defined(TARGET_OS_ANDROID)
 #include "bin/socket_android.h"
@@ -23,10 +22,14 @@
 #else
 #error Unknown target os.
 #endif
+
+#include <map>
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
 #include "bin/thread.h"
 #include "bin/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -59,7 +62,9 @@
   ~SocketAddress() {}
 
   int GetType() {
-    if (addr_.ss.ss_family == AF_INET6) return TYPE_IPV6;
+    if (addr_.ss.ss_family == AF_INET6) {
+      return TYPE_IPV6;
+    }
     return TYPE_IPV4;
   }
 
@@ -67,23 +72,27 @@
   const RawAddr& addr() const { return addr_; }
 
   static intptr_t GetAddrLength(const RawAddr& addr) {
-    ASSERT(addr.ss.ss_family == AF_INET || addr.ss.ss_family == AF_INET6);
-    return addr.ss.ss_family == AF_INET6 ?
+    ASSERT((addr.ss.ss_family == AF_INET) || (addr.ss.ss_family == AF_INET6));
+    return (addr.ss.ss_family == AF_INET6) ?
         sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in);
   }
 
   static intptr_t GetInAddrLength(const RawAddr& addr) {
-    ASSERT(addr.ss.ss_family == AF_INET || addr.ss.ss_family == AF_INET6);
-    return addr.ss.ss_family == AF_INET6 ?
+    ASSERT((addr.ss.ss_family == AF_INET) || (addr.ss.ss_family == AF_INET6));
+    return (addr.ss.ss_family == AF_INET6) ?
         sizeof(struct in6_addr) : sizeof(struct in_addr);
   }
 
   static bool AreAddressesEqual(const RawAddr& a, const RawAddr& b) {
     if (a.ss.ss_family == AF_INET) {
-      if (b.ss.ss_family != AF_INET) return false;
+      if (b.ss.ss_family != AF_INET) {
+        return false;
+      }
       return memcmp(&a.in.sin_addr, &b.in.sin_addr, sizeof(a.in.sin_addr)) == 0;
     } else if (a.ss.ss_family == AF_INET6) {
-      if (b.ss.ss_family != AF_INET6) return false;
+      if (b.ss.ss_family != AF_INET6) {
+        return false;
+      }
       return memcmp(&a.in6.sin6_addr,
                     &b.in6.sin6_addr,
                     sizeof(a.in6.sin6_addr)) == 0;
@@ -99,9 +108,11 @@
     intptr_t len;
     Dart_Handle result = Dart_TypedDataAcquireData(
         obj, &data_type, reinterpret_cast<void**>(&data), &len);
-    if (Dart_IsError(result)) Dart_PropagateError(result);
-    if (data_type != Dart_TypedData_kUint8 ||
-        (len != sizeof(in_addr) && len != sizeof(in6_addr))) {
+    if (Dart_IsError(result)) {
+      Dart_PropagateError(result);
+    }
+    if ((data_type != Dart_TypedData_kUint8) ||
+        ((len != sizeof(in_addr)) && (len != sizeof(in6_addr)))) {
       Dart_PropagateError(
           Dart_NewApiError("Unexpected type for socket address"));
     }
@@ -118,9 +129,13 @@
   }
 
   static int16_t FromType(int type) {
-    if (type == TYPE_ANY) return AF_UNSPEC;
-    if (type == TYPE_IPV4) return AF_INET;
-    ASSERT(type == TYPE_IPV6 && "Invalid type");
+    if (type == TYPE_ANY) {
+      return AF_UNSPEC;
+    }
+    if (type == TYPE_IPV4) {
+      return AF_INET;
+    }
+    ASSERT((type == TYPE_IPV6) && "Invalid type");
     return AF_INET6;
   }
 
@@ -143,7 +158,9 @@
   static Dart_Handle ToTypedData(const RawAddr& addr) {
     int len = GetInAddrLength(addr);
     Dart_Handle result = Dart_NewTypedData(Dart_TypedData_kUint8, len);
-    if (Dart_IsError(result)) Dart_PropagateError(result);
+    if (Dart_IsError(result)) {
+      Dart_PropagateError(result);
+    }
     Dart_Handle err;
     if (addr.addr.sa_family == AF_INET6) {
       err = Dart_ListSetAsBytes(
@@ -153,7 +170,9 @@
       err = Dart_ListSetAsBytes(
           result, 0, reinterpret_cast<const uint8_t*>(&addr.in.sin_addr), len);
     }
-    if (Dart_IsError(err)) Dart_PropagateError(err);
+    if (Dart_IsError(err)) {
+      Dart_PropagateError(err);
+    }
     return result;
   }
 
@@ -178,18 +197,18 @@
   DISALLOW_COPY_AND_ASSIGN(SocketAddress);
 };
 
+
 class InterfaceSocketAddress {
  public:
-  explicit InterfaceSocketAddress(struct sockaddr* sa,
-                                  const char* interface_name,
-                                  intptr_t interface_index)
+  InterfaceSocketAddress(struct sockaddr* sa,
+                         const char* interface_name,
+                         intptr_t interface_index)
       : socket_address_(new SocketAddress(sa)),
         interface_name_(interface_name),
         interface_index_(interface_index) {}
 
   ~InterfaceSocketAddress() {
     delete socket_address_;
-    free(const_cast<char*>(interface_name_));
   }
 
   SocketAddress* socket_address() const { return socket_address_; }
@@ -204,6 +223,7 @@
   DISALLOW_COPY_AND_ASSIGN(InterfaceSocketAddress);
 };
 
+
 template<typename T>
 class AddressList {
  public:
@@ -229,6 +249,7 @@
   DISALLOW_COPY_AND_ASSIGN(AddressList);
 };
 
+
 class Socket {
  public:
   enum SocketRequest {
@@ -341,6 +362,7 @@
   DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket);
 };
 
+
 class ListeningSocketRegistry {
  private:
   struct OSSocket {
@@ -417,7 +439,6 @@
   DISALLOW_COPY_AND_ASSIGN(ListeningSocketRegistry);
 };
 
-
 }  // namespace bin
 }  // namespace dart
 
diff --git a/runtime/bin/socket_android.cc b/runtime/bin/socket_android.cc
index 606a817..fd96a9a 100644
--- a/runtime/bin/socket_android.cc
+++ b/runtime/bin/socket_android.cc
@@ -2,24 +2,26 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_ANDROID)
 
+#include "bin/socket.h"
+#include "bin/socket_android.h"
+
 #include <errno.h>  // NOLINT
+#include <netinet/tcp.h>  // NOLINT
 #include <stdio.h>  // NOLINT
 #include <stdlib.h>  // NOLINT
 #include <string.h>  // NOLINT
 #include <sys/stat.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#include <netinet/tcp.h>  // NOLINT
 
 #include "bin/fdutils.h"
 #include "bin/file.h"
-#include "bin/socket.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -36,16 +38,8 @@
 
 bool Socket::FormatNumericAddress(const RawAddr& addr, char* address, int len) {
   socklen_t salen = SocketAddress::GetAddrLength(addr);
-  if (NO_RETRY_EXPECTED(getnameinfo(&addr.addr,
-                                    salen,
-                                    address,
-                                    len,
-                                    NULL,
-                                    0,
-                                    NI_NUMERICHOST)) != 0) {
-    return false;
-  }
-  return true;
+  return (NO_RETRY_EXPECTED(getnameinfo(
+      &addr.addr, salen, address, len, NULL, 0, NI_NUMERICHOST)) == 0);
 }
 
 
@@ -69,7 +63,7 @@
 static intptr_t Connect(intptr_t fd, const RawAddr& addr) {
   intptr_t result = TEMP_FAILURE_RETRY(
       connect(fd, &addr.addr, SocketAddress::GetAddrLength(addr)));
-  if (result == 0 || errno == EINPROGRESS) {
+  if ((result == 0) || (errno == EINPROGRESS)) {
     return fd;
   }
   VOID_TEMP_FAILURE_RETRY(close(fd));
@@ -98,7 +92,7 @@
 
   intptr_t result = TEMP_FAILURE_RETRY(
       bind(fd, &source_addr.addr, SocketAddress::GetAddrLength(source_addr)));
-  if (result != 0 && errno != EINPROGRESS) {
+  if ((result != 0) && (errno != EINPROGRESS)) {
     VOID_TEMP_FAILURE_RETRY(close(fd));
     return -1;
   }
@@ -116,7 +110,7 @@
   ASSERT(fd >= 0);
   ssize_t read_bytes = TEMP_FAILURE_RETRY(read(fd, buffer, num_bytes));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (read_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((read_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the read would block we need to retry and therefore return 0
     // as the number of bytes written.
     read_bytes = 0;
@@ -131,7 +125,7 @@
   socklen_t addr_len = sizeof(addr->ss);
   ssize_t read_bytes = TEMP_FAILURE_RETRY(
       recvfrom(fd, buffer, num_bytes, 0, &addr->addr, &addr_len));
-  if (read_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((read_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the read would block we need to retry and therefore return 0
     // as the number of bytes written.
     read_bytes = 0;
@@ -144,7 +138,7 @@
   ASSERT(fd >= 0);
   ssize_t written_bytes = TEMP_FAILURE_RETRY(write(fd, buffer, num_bytes));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (written_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((written_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the would block we need to retry and therefore return 0 as
     // the number of bytes written.
     written_bytes = 0;
@@ -160,7 +154,7 @@
       sendto(fd, buffer, num_bytes, 0,
              &addr.addr, SocketAddress::GetAddrLength(addr)));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (written_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((written_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the would block we need to retry and therefore return 0 as
     // the number of bytes written.
     written_bytes = 0;
@@ -207,10 +201,18 @@
 int Socket::GetType(intptr_t fd) {
   struct stat buf;
   int result = fstat(fd, &buf);
-  if (result == -1) return -1;
-  if (S_ISCHR(buf.st_mode)) return File::kTerminal;
-  if (S_ISFIFO(buf.st_mode)) return File::kPipe;
-  if (S_ISREG(buf.st_mode)) return File::kFile;
+  if (result == -1) {
+    return -1;
+  }
+  if (S_ISCHR(buf.st_mode)) {
+    return File::kTerminal;
+  }
+  if (S_ISFIFO(buf.st_mode)) {
+    return File::kPipe;
+  }
+  if (S_ISREG(buf.st_mode)) {
+    return File::kFile;
+  }
   return File::kOther;
 }
 
@@ -247,12 +249,14 @@
   }
   intptr_t count = 0;
   for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
-    if (c->ai_family == AF_INET || c->ai_family == AF_INET6) count++;
+    if ((c->ai_family == AF_INET) || (c->ai_family == AF_INET6)) {
+      count++;
+    }
   }
   intptr_t i = 0;
   AddressList<SocketAddress>* addresses = new AddressList<SocketAddress>(count);
   for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
-    if (c->ai_family == AF_INET || c->ai_family == AF_INET6) {
+    if ((c->ai_family == AF_INET) || (c->ai_family == AF_INET6)) {
       addresses->SetAt(i, new SocketAddress(c->ai_addr));
       i++;
     }
@@ -294,7 +298,7 @@
     ASSERT(type == SocketAddress::TYPE_IPV6);
     result = inet_pton(AF_INET6, address, &addr->in6.sin6_addr);
   }
-  return result == 1;
+  return (result == 1);
 }
 
 
@@ -302,7 +306,9 @@
   intptr_t fd;
 
   fd = NO_RETRY_EXPECTED(socket(addr.addr.sa_family, SOCK_DGRAM, IPPROTO_UDP));
-  if (fd < 0) return -1;
+  if (fd < 0) {
+    return -1;
+  }
 
   FDUtils::SetCloseOnExec(fd);
 
@@ -340,7 +346,9 @@
   intptr_t fd;
 
   fd = NO_RETRY_EXPECTED(socket(addr.ss.ss_family, SOCK_STREAM, 0));
-  if (fd < 0) return -1;
+  if (fd < 0) {
+    return -1;
+  }
 
   FDUtils::SetCloseOnExec(fd);
 
@@ -363,7 +371,8 @@
   }
 
   // Test for invalid socket port 65535 (some browsers disallow it).
-  if (SocketAddress::GetAddrPort(addr) == 0 && Socket::GetPort(fd) == 65535) {
+  if ((SocketAddress::GetAddrPort(addr)) == 0 &&
+      (Socket::GetPort(fd) == 65535)) {
     // Don't close the socket until we have created a new socket, ensuring
     // that we do not get the bad port number again.
     intptr_t new_fd = CreateBindListen(addr, backlog, v6_only);
@@ -435,9 +444,9 @@
                                          reinterpret_cast<void *>(&on),
                                          &len));
   if (err == 0) {
-    *enabled = on == 1;
+    *enabled = (on == 1);
   }
-  return err == 0;
+  return (err == 0);
 }
 
 
@@ -521,9 +530,9 @@
                                          reinterpret_cast<char *>(&on),
                                          &len));
   if (err == 0) {
-    *enabled = on == 1;
+    *enabled = (on == 1);
   }
-  return err == 0;
+  return (err == 0);
 }
 
 
@@ -539,7 +548,7 @@
 
 bool Socket::JoinMulticast(
     intptr_t fd, const RawAddr& addr, const RawAddr&, int interfaceIndex) {
-  int proto = addr.addr.sa_family == AF_INET ? IPPROTO_IP : IPPROTO_IPV6;
+  int proto = (addr.addr.sa_family == AF_INET) ? IPPROTO_IP : IPPROTO_IPV6;
   struct group_req mreq;
   mreq.gr_interface = interfaceIndex;
   memmove(&mreq.gr_group, &addr.ss, SocketAddress::GetAddrLength(addr));
@@ -550,7 +559,7 @@
 
 bool Socket::LeaveMulticast(
     intptr_t fd, const RawAddr& addr, const RawAddr&, int interfaceIndex) {
-  int proto = addr.addr.sa_family == AF_INET ? IPPROTO_IP : IPPROTO_IPV6;
+  int proto = (addr.addr.sa_family == AF_INET) ? IPPROTO_IP : IPPROTO_IPV6;
   struct group_req mreq;
   mreq.gr_interface = interfaceIndex;
   memmove(&mreq.gr_group, &addr.ss, SocketAddress::GetAddrLength(addr));
@@ -562,3 +571,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_ANDROID)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/socket_android.h b/runtime/bin/socket_android.h
index 5970477..13ff16e 100644
--- a/runtime/bin/socket_android.h
+++ b/runtime/bin/socket_android.h
@@ -5,6 +5,10 @@
 #ifndef BIN_SOCKET_ANDROID_H_
 #define BIN_SOCKET_ANDROID_H_
 
+#if !defined(BIN_SOCKET_H_)
+#error Do not include socket_android.h directly. Use socket.h.
+#endif
+
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <sys/socket.h>
diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
index 976bd0f..1befb69 100644
--- a/runtime/bin/socket_linux.cc
+++ b/runtime/bin/socket_linux.cc
@@ -2,26 +2,29 @@
 // for 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(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_LINUX)
 
+#include "bin/socket.h"
+#include "bin/socket_linux.h"
+
 #include <errno.h>  // NOLINT
+#include <ifaddrs.h>  // NOLINT
+#include <net/if.h>  // NOLINT
+#include <netinet/tcp.h>  // NOLINT
 #include <stdio.h>  // NOLINT
 #include <stdlib.h>  // NOLINT
 #include <string.h>  // NOLINT
 #include <sys/stat.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#include <net/if.h>  // NOLINT
-#include <netinet/tcp.h>  // NOLINT
-#include <ifaddrs.h>  // NOLINT
 
 #include "bin/fdutils.h"
 #include "bin/file.h"
-#include "bin/socket.h"
 #include "bin/thread.h"
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -38,11 +41,8 @@
 
 bool Socket::FormatNumericAddress(const RawAddr& addr, char* address, int len) {
   socklen_t salen = SocketAddress::GetAddrLength(addr);
-  if (NO_RETRY_EXPECTED(getnameinfo(
-        &addr.addr, salen, address, len, NULL, 0, NI_NUMERICHOST) != 0)) {
-    return false;
-  }
-  return true;
+  return (NO_RETRY_EXPECTED(getnameinfo(
+      &addr.addr, salen, address, len, NULL, 0, NI_NUMERICHOST) == 0));
 }
 
 
@@ -66,7 +66,7 @@
 static intptr_t Connect(intptr_t fd, const RawAddr& addr) {
   intptr_t result = TEMP_FAILURE_RETRY(
       connect(fd, &addr.addr, SocketAddress::GetAddrLength(addr)));
-  if (result == 0 || errno == EINPROGRESS) {
+  if ((result == 0) || (errno == EINPROGRESS)) {
     return fd;
   }
   VOID_TEMP_FAILURE_RETRY(close(fd));
@@ -92,7 +92,7 @@
 
   intptr_t result = TEMP_FAILURE_RETRY(
       bind(fd, &source_addr.addr, SocketAddress::GetAddrLength(source_addr)));
-  if (result != 0 && errno != EINPROGRESS) {
+  if ((result != 0) && (errno != EINPROGRESS)) {
     VOID_TEMP_FAILURE_RETRY(close(fd));
     return -1;
   }
@@ -110,7 +110,7 @@
   ASSERT(fd >= 0);
   ssize_t read_bytes = TEMP_FAILURE_RETRY(read(fd, buffer, num_bytes));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (read_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((read_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the read would block we need to retry and therefore return 0
     // as the number of bytes written.
     read_bytes = 0;
@@ -125,7 +125,7 @@
   socklen_t addr_len = sizeof(addr->ss);
   ssize_t read_bytes = TEMP_FAILURE_RETRY(
       recvfrom(fd, buffer, num_bytes, 0, &addr->addr, &addr_len));
-  if (read_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((read_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the read would block we need to retry and therefore return 0
     // as the number of bytes written.
     read_bytes = 0;
@@ -138,7 +138,7 @@
   ASSERT(fd >= 0);
   ssize_t written_bytes = TEMP_FAILURE_RETRY(write(fd, buffer, num_bytes));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (written_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((written_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the would block we need to retry and therefore return 0 as
     // the number of bytes written.
     written_bytes = 0;
@@ -154,7 +154,7 @@
       sendto(fd, buffer, num_bytes, 0,
              &addr.addr, SocketAddress::GetAddrLength(addr)));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (written_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((written_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the would block we need to retry and therefore return 0 as
     // the number of bytes written.
     written_bytes = 0;
@@ -199,10 +199,18 @@
 int Socket::GetType(intptr_t fd) {
   struct stat64 buf;
   int result = TEMP_FAILURE_RETRY(fstat64(fd, &buf));
-  if (result == -1) return -1;
-  if (S_ISCHR(buf.st_mode)) return File::kTerminal;
-  if (S_ISFIFO(buf.st_mode)) return File::kPipe;
-  if (S_ISREG(buf.st_mode)) return File::kFile;
+  if (result == -1) {
+    return -1;
+  }
+  if (S_ISCHR(buf.st_mode)) {
+    return File::kTerminal;
+  }
+  if (S_ISFIFO(buf.st_mode)) {
+    return File::kPipe;
+  }
+  if (S_ISREG(buf.st_mode)) {
+    return File::kFile;
+  }
   return File::kOther;
 }
 
@@ -239,12 +247,14 @@
   }
   intptr_t count = 0;
   for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
-    if (c->ai_family == AF_INET || c->ai_family == AF_INET6) count++;
+    if ((c->ai_family == AF_INET) || (c->ai_family == AF_INET6)) {
+      count++;
+    }
   }
   intptr_t i = 0;
   AddressList<SocketAddress>* addresses = new AddressList<SocketAddress>(count);
   for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
-    if (c->ai_family == AF_INET || c->ai_family == AF_INET6) {
+    if ((c->ai_family == AF_INET) || (c->ai_family == AF_INET6)) {
       addresses->SetAt(i, new SocketAddress(c->ai_addr));
       i++;
     }
@@ -287,7 +297,7 @@
     result = NO_RETRY_EXPECTED(
         inet_pton(AF_INET6, address, &addr->in6.sin6_addr));
   }
-  return result == 1;
+  return (result == 1);
 }
 
 
@@ -297,7 +307,9 @@
   fd = NO_RETRY_EXPECTED(socket(addr.addr.sa_family,
                          SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
                          IPPROTO_UDP));
-  if (fd < 0) return -1;
+  if (fd < 0) {
+    return -1;
+  }
 
   if (reuseAddress) {
     int optval = 1;
@@ -320,12 +332,9 @@
     return false;
   }
   int family = ifa->ifa_addr->sa_family;
-  if (lookup_family == family) return true;
-  if (lookup_family == AF_UNSPEC &&
-      (family == AF_INET || family == AF_INET6)) {
-    return true;
-  }
-  return false;
+  return ((lookup_family == family) ||
+         (((lookup_family == AF_UNSPEC) &&
+          ((family == AF_INET) || (family == AF_INET6)))));
 }
 
 
@@ -347,7 +356,9 @@
 
   intptr_t count = 0;
   for (struct ifaddrs* ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
-    if (ShouldIncludeIfaAddrs(ifa, lookup_family)) count++;
+    if (ShouldIncludeIfaAddrs(ifa, lookup_family)) {
+      count++;
+    }
   }
 
   AddressList<InterfaceSocketAddress>* addresses =
@@ -355,8 +366,9 @@
   int i = 0;
   for (struct ifaddrs* ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
     if (ShouldIncludeIfaAddrs(ifa, lookup_family)) {
+      char* ifa_name = DartUtils::ScopedCopyCString(ifa->ifa_name);
       addresses->SetAt(i, new InterfaceSocketAddress(
-          ifa->ifa_addr, strdup(ifa->ifa_name), if_nametoindex(ifa->ifa_name)));
+          ifa->ifa_addr, ifa_name, if_nametoindex(ifa->ifa_name)));
       i++;
     }
   }
@@ -372,7 +384,9 @@
 
   fd = NO_RETRY_EXPECTED(
       socket(addr.ss.ss_family, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0));
-  if (fd < 0) return -1;
+  if (fd < 0) {
+    return -1;
+  }
 
   int optval = 1;
   VOID_NO_RETRY_EXPECTED(
@@ -391,7 +405,8 @@
   }
 
   // Test for invalid socket port 65535 (some browsers disallow it).
-  if (SocketAddress::GetAddrPort(addr) == 0 && Socket::GetPort(fd) == 65535) {
+  if ((SocketAddress::GetAddrPort(addr) == 0) &&
+      (Socket::GetPort(fd) == 65535)) {
     // Don't close the socket until we have created a new socket, ensuring
     // that we do not get the bad port number again.
     intptr_t new_fd = CreateBindListen(addr, backlog, v6_only);
@@ -459,9 +474,9 @@
   int err = NO_RETRY_EXPECTED(getsockopt(
       fd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<void *>(&on), &len));
   if (err == 0) {
-    *enabled = on == 1;
+    *enabled = (on == 1);
   }
-  return err == 0;
+  return (err == 0);
 }
 
 
@@ -531,9 +546,9 @@
   int err = NO_RETRY_EXPECTED(getsockopt(
       fd, SOL_SOCKET, SO_BROADCAST, reinterpret_cast<char *>(&on), &len));
   if (err == 0) {
-    *enabled = on == 1;
+    *enabled = (on == 1);
   }
-  return err == 0;
+  return (err == 0);
 }
 
 
@@ -572,3 +587,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_LINUX)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/socket_linux.h b/runtime/bin/socket_linux.h
index 4ad0db2..5d073c4 100644
--- a/runtime/bin/socket_linux.h
+++ b/runtime/bin/socket_linux.h
@@ -5,6 +5,10 @@
 #ifndef BIN_SOCKET_LINUX_H_
 #define BIN_SOCKET_LINUX_H_
 
+#if !defined(BIN_SOCKET_H_)
+#error Do not include socket_linux.h directly. Use socket.h.
+#endif
+
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <sys/socket.h>
diff --git a/runtime/bin/socket_macos.cc b/runtime/bin/socket_macos.cc
index 205793b..624da8e 100644
--- a/runtime/bin/socket_macos.cc
+++ b/runtime/bin/socket_macos.cc
@@ -2,26 +2,28 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_MACOS)
 
+#include "bin/socket.h"
+#include "bin/socket_macos.h"
+
 #include <errno.h>  // NOLINT
+#include <ifaddrs.h>  // NOLINT
+#include <net/if.h>  // NOLINT
+#include <netinet/tcp.h>  // NOLINT
 #include <stdio.h>  // NOLINT
 #include <stdlib.h>  // NOLINT
 #include <string.h>  // NOLINT
 #include <sys/stat.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#include <net/if.h>  // NOLINT
-#include <netinet/tcp.h>  // NOLINT
-#include <ifaddrs.h>  // NOLINT
 
 #include "bin/fdutils.h"
 #include "bin/file.h"
-#include "bin/socket.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -38,16 +40,8 @@
 
 bool Socket::FormatNumericAddress(const RawAddr& addr, char* address, int len) {
   socklen_t salen = SocketAddress::GetAddrLength(addr);
-  if (NO_RETRY_EXPECTED(getnameinfo(&addr.addr,
-                                    salen,
-                                    address,
-                                    len,
-                                    NULL,
-                                    0,
-                                    NI_NUMERICHOST)) != 0) {
-    return false;
-  }
-  return true;
+  return (NO_RETRY_EXPECTED(getnameinfo(
+      &addr.addr, salen, address, len, NULL, 0, NI_NUMERICHOST)) == 0);
 }
 
 
@@ -71,7 +65,7 @@
 static intptr_t Connect(intptr_t fd, const RawAddr& addr) {
   intptr_t result = TEMP_FAILURE_RETRY(
       connect(fd, &addr.addr, SocketAddress::GetAddrLength(addr)));
-  if (result == 0 || errno == EINPROGRESS) {
+  if ((result == 0) || (errno == EINPROGRESS)) {
     return fd;
   }
   VOID_TEMP_FAILURE_RETRY(close(fd));
@@ -100,7 +94,7 @@
 
   intptr_t result = TEMP_FAILURE_RETRY(
       bind(fd, &source_addr.addr, SocketAddress::GetAddrLength(source_addr)));
-  if (result != 0 && errno != EINPROGRESS) {
+  if ((result != 0) && (errno != EINPROGRESS)) {
     VOID_TEMP_FAILURE_RETRY(close(fd));
     return -1;
   }
@@ -118,7 +112,7 @@
   ASSERT(fd >= 0);
   ssize_t read_bytes = TEMP_FAILURE_RETRY(read(fd, buffer, num_bytes));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (read_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((read_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the read would block we need to retry and therefore return 0
     // as the number of bytes written.
     read_bytes = 0;
@@ -133,7 +127,7 @@
   socklen_t addr_len = sizeof(addr->ss);
   ssize_t read_bytes = TEMP_FAILURE_RETRY(
       recvfrom(fd, buffer, num_bytes, 0, &addr->addr, &addr_len));
-  if (read_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((read_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the read would block we need to retry and therefore return 0
     // as the number of bytes written.
     read_bytes = 0;
@@ -146,7 +140,7 @@
   ASSERT(fd >= 0);
   ssize_t written_bytes = TEMP_FAILURE_RETRY(write(fd, buffer, num_bytes));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (written_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((written_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the would block we need to retry and therefore return 0 as
     // the number of bytes written.
     written_bytes = 0;
@@ -162,7 +156,7 @@
       sendto(fd, buffer, num_bytes, 0,
              &addr.addr, SocketAddress::GetAddrLength(addr)));
   ASSERT(EAGAIN == EWOULDBLOCK);
-  if (written_bytes == -1 && errno == EWOULDBLOCK) {
+  if ((written_bytes == -1) && (errno == EWOULDBLOCK)) {
     // If the would block we need to retry and therefore return 0 as
     // the number of bytes written.
     written_bytes = 0;
@@ -208,10 +202,18 @@
 int Socket::GetType(intptr_t fd) {
   struct stat buf;
   int result = fstat(fd, &buf);
-  if (result == -1) return -1;
-  if (S_ISCHR(buf.st_mode)) return File::kTerminal;
-  if (S_ISFIFO(buf.st_mode)) return File::kPipe;
-  if (S_ISREG(buf.st_mode)) return File::kFile;
+  if (result == -1) {
+    return -1;
+  }
+  if (S_ISCHR(buf.st_mode)) {
+    return File::kTerminal;
+  }
+  if (S_ISFIFO(buf.st_mode)) {
+    return File::kPipe;
+  }
+  if (S_ISREG(buf.st_mode)) {
+    return File::kFile;
+  }
   return File::kOther;
 }
 
@@ -242,12 +244,14 @@
   }
   intptr_t count = 0;
   for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
-    if (c->ai_family == AF_INET || c->ai_family == AF_INET6) count++;
+    if ((c->ai_family == AF_INET) || (c->ai_family == AF_INET6)) {
+      count++;
+    }
   }
   intptr_t i = 0;
   AddressList<SocketAddress>* addresses = new AddressList<SocketAddress>(count);
   for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
-    if (c->ai_family == AF_INET || c->ai_family == AF_INET6) {
+    if ((c->ai_family == AF_INET) || (c->ai_family == AF_INET6)) {
       addresses->SetAt(i, new SocketAddress(c->ai_addr));
       i++;
     }
@@ -289,7 +293,7 @@
     ASSERT(type == SocketAddress::TYPE_IPV6);
     result = inet_pton(AF_INET6, address, &addr->in6.sin6_addr);
   }
-  return result == 1;
+  return (result == 1);
 }
 
 
@@ -297,7 +301,9 @@
   intptr_t fd;
 
   fd = NO_RETRY_EXPECTED(socket(addr.addr.sa_family, SOCK_DGRAM, IPPROTO_UDP));
-  if (fd < 0) return -1;
+  if (fd < 0) {
+    return -1;
+  }
 
   FDUtils::SetCloseOnExec(fd);
 
@@ -324,12 +330,9 @@
     return false;
   }
   int family = ifa->ifa_addr->sa_family;
-  if (lookup_family == family) return true;
-  if (lookup_family == AF_UNSPEC &&
-      (family == AF_INET || family == AF_INET6)) {
-    return true;
-  }
-  return false;
+  return ((lookup_family == family) ||
+         ((lookup_family == AF_UNSPEC) &&
+          ((family == AF_INET) || (family == AF_INET6))));
 }
 
 
@@ -359,8 +362,9 @@
   int i = 0;
   for (struct ifaddrs* ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
     if (ShouldIncludeIfaAddrs(ifa, lookup_family)) {
+      char* ifa_name = DartUtils::ScopedCopyCString(ifa->ifa_name);
       addresses->SetAt(i, new InterfaceSocketAddress(
-          ifa->ifa_addr, strdup(ifa->ifa_name), if_nametoindex(ifa->ifa_name)));
+          ifa->ifa_addr, ifa_name, if_nametoindex(ifa->ifa_name)));
       i++;
     }
   }
@@ -375,7 +379,9 @@
   intptr_t fd;
 
   fd = TEMP_FAILURE_RETRY(socket(addr.ss.ss_family, SOCK_STREAM, 0));
-  if (fd < 0) return -1;
+  if (fd < 0) {
+    return -1;
+  }
 
   FDUtils::SetCloseOnExec(fd);
 
@@ -396,7 +402,8 @@
   }
 
   // Test for invalid socket port 65535 (some browsers disallow it).
-  if (SocketAddress::GetAddrPort(addr) == 0 && Socket::GetPort(fd) == 65535) {
+  if ((SocketAddress::GetAddrPort(addr) == 0) &&
+      (Socket::GetPort(fd) == 65535)) {
     // Don't close the socket until we have created a new socket, ensuring
     // that we do not get the bad port number again.
     intptr_t new_fd = CreateBindListen(addr, backlog, v6_only);
@@ -458,9 +465,9 @@
                                          reinterpret_cast<void *>(&on),
                                          &len));
   if (err == 0) {
-    *enabled = on == 1;
+    *enabled = (on == 1);
   }
-  return err == 0;
+  return (err == 0);
 }
 
 
@@ -545,9 +552,9 @@
                                          reinterpret_cast<char *>(&on),
                                          &len));
   if (err == 0) {
-    *enabled = on == 1;
+    *enabled = (on == 1);
   }
-  return err == 0;
+  return (err == 0);
 }
 
 
@@ -618,3 +625,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_MACOS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/socket_macos.h b/runtime/bin/socket_macos.h
index b77857c..dce6d97 100644
--- a/runtime/bin/socket_macos.h
+++ b/runtime/bin/socket_macos.h
@@ -5,6 +5,10 @@
 #ifndef BIN_SOCKET_MACOS_H_
 #define BIN_SOCKET_MACOS_H_
 
+#if !defined(BIN_SOCKET_H_)
+#error Do not include socket_macos.h directly. Use socket.h.
+#endif
+
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <sys/socket.h>
diff --git a/runtime/bin/socket_unsupported.cc b/runtime/bin/socket_unsupported.cc
new file mode 100644
index 0000000..933df53
--- /dev/null
+++ b/runtime/bin/socket_unsupported.cc
@@ -0,0 +1,148 @@
+// 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.
+
+#if defined(DART_IO_DISABLED)
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+
+namespace dart {
+namespace bin {
+
+void FUNCTION_NAME(InternetAddress_Parse)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_CreateConnect)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_CreateBindConnect)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_CreateBindDatagram)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_Available)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_Read)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_RecvFrom)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_SendTo)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_GetPort)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_GetRemotePeer)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_GetError)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_GetType)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_GetStdioHandle)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_GetSocketId)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_SetSocketId)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(ServerSocket_CreateBindListen)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(ServerSocket_Accept)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_GetOption)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_SetOption)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_JoinMulticast)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Socket_LeaveMulticast)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Sockets unsupported on this platform"));
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // defined(DART_IO_DISABLED)
diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
index 19625e7..4534c8c 100644
--- a/runtime/bin/socket_win.cc
+++ b/runtime/bin/socket_win.cc
@@ -2,20 +2,23 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_WINDOWS)
 
+#include "bin/socket.h"
+#include "bin/socket_win.h"
+
 #include "bin/builtin.h"
 #include "bin/eventhandler.h"
 #include "bin/file.h"
 #include "bin/lockers.h"
 #include "bin/log.h"
-#include "bin/socket.h"
 #include "bin/thread.h"
 #include "bin/utils.h"
 #include "bin/utils_win.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -53,7 +56,9 @@
 
 bool Socket::Initialize() {
   MutexLocker lock(init_mutex);
-  if (socket_initialized) return true;
+  if (socket_initialized) {
+    return true;
+  }
   int err;
   WSADATA winsock_data;
   WORD version_requested = MAKEWORD(2, 2);
@@ -63,7 +68,7 @@
   } else {
     Log::PrintErr("Unable to initialize Winsock: %d\n", WSAGetLastError());
   }
-  return err == 0;
+  return (err == 0);
 }
 
 intptr_t Socket::Available(intptr_t fd) {
@@ -106,9 +111,7 @@
   SocketHandle* socket_handle = reinterpret_cast<SocketHandle*>(fd);
   RawAddr raw;
   socklen_t size = sizeof(raw);
-  if (getsockname(socket_handle->socket(),
-                  &raw.addr,
-                  &size) == SOCKET_ERROR) {
+  if (getsockname(socket_handle->socket(),  &raw.addr, &size) == SOCKET_ERROR) {
     return 0;
   }
   return SocketAddress::GetAddrPort(raw);
@@ -120,9 +123,7 @@
   SocketHandle* socket_handle = reinterpret_cast<SocketHandle*>(fd);
   RawAddr raw;
   socklen_t size = sizeof(raw);
-  if (getpeername(socket_handle->socket(),
-                  &raw.addr,
-                  &size)) {
+  if (getpeername(socket_handle->socket(), &raw.addr, &size)) {
     return NULL;
   }
   *port = SocketAddress::GetAddrPort(raw);
@@ -267,7 +268,9 @@
 
 
 intptr_t Socket::GetStdioHandle(intptr_t num) {
-  if (num != 0) return -1;
+  if (num != 0) {
+    return -1;
+  }
   HANDLE handle = GetStdHandle(STD_INPUT_HANDLE);
   if (handle == INVALID_HANDLE_VALUE) {
     return -1;
@@ -319,12 +322,14 @@
   }
   intptr_t count = 0;
   for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
-    if (c->ai_family == AF_INET || c->ai_family == AF_INET6) count++;
+    if ((c->ai_family == AF_INET) || (c->ai_family == AF_INET6)) {
+      count++;
+    }
   }
   AddressList<SocketAddress>* addresses = new AddressList<SocketAddress>(count);
   intptr_t i = 0;
   for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
-    if (c->ai_family == AF_INET || c->ai_family == AF_INET6) {
+    if ((c->ai_family == AF_INET) || (c->ai_family == AF_INET6)) {
       addresses->SetAt(i, new SocketAddress(c->ai_addr));
       i++;
     }
@@ -366,7 +371,6 @@
     ASSERT(type == SocketAddress::TYPE_IPV6);
     result = InetPton(AF_INET6, system_address, &addr->in6.sin6_addr);
   }
-  free(const_cast<wchar_t*>(system_address));
   return result == 1;
 }
 
@@ -393,9 +397,7 @@
     }
   }
 
-  status = bind(s,
-                &addr.addr,
-                SocketAddress::GetAddrLength(addr));
+  status = bind(s, &addr.addr,  SocketAddress::GetAddrLength(addr));
   if (status == SOCKET_ERROR) {
     DWORD rc = WSAGetLastError();
     closesocket(s);
@@ -496,9 +498,7 @@
                sizeof(optval));
   }
 
-  status = bind(s,
-                &addr.addr,
-                SocketAddress::GetAddrLength(addr));
+  status = bind(s, &addr.addr, SocketAddress::GetAddrLength(addr));
   if (status == SOCKET_ERROR) {
     DWORD rc = WSAGetLastError();
     closesocket(s);
@@ -509,8 +509,8 @@
   ListenSocket* listen_socket = new ListenSocket(s);
 
   // Test for invalid socket port 65535 (some browsers disallow it).
-  if (SocketAddress::GetAddrPort(addr) == 0 &&
-      Socket::GetPort(reinterpret_cast<intptr_t>(listen_socket)) == 65535) {
+  if ((SocketAddress::GetAddrPort(addr) == 0) &&
+      (Socket::GetPort(reinterpret_cast<intptr_t>(listen_socket)) == 65535)) {
     // Don't close fd until we have created new. By doing that we ensure another
     // port.
     intptr_t new_s = CreateBindListen(addr, backlog, v6_only);
@@ -571,9 +571,9 @@
                        reinterpret_cast<char *>(&on),
                        &len);
   if (err == 0) {
-    *enabled = on == 1;
+    *enabled = (on == 1);
   }
-  return err == 0;
+  return (err == 0);
 }
 
 
@@ -618,7 +618,6 @@
                     optname,
                     reinterpret_cast<char *>(&on),
                     sizeof(on)) == 0;
-  return false;
 }
 
 
@@ -665,9 +664,9 @@
                        reinterpret_cast<char *>(&on),
                        &len);
   if (err == 0) {
-    *enabled = on == 1;
+    *enabled = (on == 1);
   }
-  return err == 0;
+  return (err == 0);
 }
 
 
@@ -715,3 +714,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_WINDOWS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/socket_win.h b/runtime/bin/socket_win.h
index 76f33fd..7b71e38 100644
--- a/runtime/bin/socket_win.h
+++ b/runtime/bin/socket_win.h
@@ -5,9 +5,13 @@
 #ifndef BIN_SOCKET_WIN_H_
 #define BIN_SOCKET_WIN_H_
 
-#include <winsock2.h>
+#if !defined(BIN_SOCKET_H_)
+#error Do not include socket_win.h directly. Use socket.h.
+#endif
+
 #include <iphlpapi.h>
-#include <ws2tcpip.h>
 #include <mswsock.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
 
 #endif  // BIN_SOCKET_WIN_H_
diff --git a/runtime/bin/stdio.cc b/runtime/bin/stdio.cc
index c866710..47bd554 100644
--- a/runtime/bin/stdio.cc
+++ b/runtime/bin/stdio.cc
@@ -2,16 +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.
 
+#if !defined(DART_IO_DISABLED)
+
+#include "bin/stdio.h"
+
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
 #include "bin/utils.h"
-#include "bin/stdio.h"
-
-#include "platform/globals.h"
-#include "platform/utils.h"
 
 #include "include/dart_api.h"
 
+#include "platform/globals.h"
+#include "platform/utils.h"
 
 namespace dart {
 namespace bin {
@@ -51,7 +53,7 @@
     return;
   }
   intptr_t fd = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 0));
-  if (fd != 1 && fd != 2) {
+  if ((fd != 1) && (fd != 2)) {
     Dart_SetReturnValue(args, Dart_NewApiError("Terminal fd must be 1 or 2"));
     return;
   }
@@ -69,3 +71,5 @@
 
 }  // namespace bin
 }  // namespace dart
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/stdio.h b/runtime/bin/stdio.h
index 99e2cd5..55884df 100644
--- a/runtime/bin/stdio.h
+++ b/runtime/bin/stdio.h
@@ -5,12 +5,15 @@
 #ifndef BIN_STDIO_H_
 #define BIN_STDIO_H_
 
+#if defined(DART_IO_DISABLED)
+#error "stdio.h can only be included on builds with IO enabled"
+#endif
+
 #include "bin/builtin.h"
 #include "bin/utils.h"
 
 #include "platform/globals.h"
 
-
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/stdio_android.cc b/runtime/bin/stdio_android.cc
index a02a8e3..019efeb 100644
--- a/runtime/bin/stdio_android.cc
+++ b/runtime/bin/stdio_android.cc
@@ -2,19 +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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_ANDROID)
 
+#include "bin/stdio.h"
+
 #include <errno.h>  // NOLINT
 #include <sys/ioctl.h>  // NOLINT
 #include <termios.h>  // NOLINT
 
-#include "bin/stdio.h"
 #include "bin/fdutils.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -30,7 +31,7 @@
 bool Stdin::GetEchoMode() {
   struct termios term;
   tcgetattr(STDIN_FILENO, &term);
-  return (term.c_lflag & ECHO) != 0;
+  return ((term.c_lflag & ECHO) != 0);
 }
 
 
@@ -38,9 +39,9 @@
   struct termios term;
   tcgetattr(STDIN_FILENO, &term);
   if (enabled) {
-    term.c_lflag |= ECHO|ECHONL;
+    term.c_lflag |= (ECHO | ECHONL);
   } else {
-    term.c_lflag &= ~(ECHO|ECHONL);
+    term.c_lflag &= ~(ECHO | ECHONL);
   }
   tcsetattr(STDIN_FILENO, TCSANOW, &term);
 }
@@ -49,7 +50,7 @@
 bool Stdin::GetLineMode() {
   struct termios term;
   tcgetattr(STDIN_FILENO, &term);
-  return (term.c_lflag & ICANON) != 0;
+  return ((term.c_lflag & ICANON) != 0);
 }
 
 
@@ -67,8 +68,8 @@
 
 bool Stdout::GetTerminalSize(intptr_t fd, int size[2]) {
   struct winsize w;
-  if (NO_RETRY_EXPECTED(ioctl(fd, TIOCGWINSZ, &w) == 0) &&
-      (w.ws_col != 0 || w.ws_row != 0)) {
+  int status = NO_RETRY_EXPECTED(ioctl(fd, TIOCGWINSZ, &w));
+  if ((status == 0) && ((w.ws_col != 0) || (w.ws_row != 0))) {
     size[0] = w.ws_col;
     size[1] = w.ws_row;
     return true;
@@ -80,3 +81,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_ANDROID)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/stdio_linux.cc b/runtime/bin/stdio_linux.cc
index c01a771..0634fa4 100644
--- a/runtime/bin/stdio_linux.cc
+++ b/runtime/bin/stdio_linux.cc
@@ -2,19 +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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_LINUX)
 
+#include "bin/stdio.h"
+
 #include <errno.h>  // NOLINT
 #include <sys/ioctl.h>  // NOLINT
 #include <termios.h>  // NOLINT
 
-#include "bin/stdio.h"
 #include "bin/fdutils.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -30,7 +31,7 @@
 bool Stdin::GetEchoMode() {
   struct termios term;
   VOID_NO_RETRY_EXPECTED(tcgetattr(STDIN_FILENO, &term));
-  return (term.c_lflag & ECHO) != 0;
+  return ((term.c_lflag & ECHO) != 0);
 }
 
 
@@ -38,9 +39,9 @@
   struct termios term;
   VOID_NO_RETRY_EXPECTED(tcgetattr(STDIN_FILENO, &term));
   if (enabled) {
-    term.c_lflag |= ECHO|ECHONL;
+    term.c_lflag |= (ECHO | ECHONL);
   } else {
-    term.c_lflag &= ~(ECHO|ECHONL);
+    term.c_lflag &= ~(ECHO | ECHONL);
   }
   VOID_NO_RETRY_EXPECTED(tcsetattr(STDIN_FILENO, TCSANOW, &term));
 }
@@ -49,7 +50,7 @@
 bool Stdin::GetLineMode() {
   struct termios term;
   VOID_NO_RETRY_EXPECTED(tcgetattr(STDIN_FILENO, &term));
-  return (term.c_lflag & ICANON) != 0;
+  return ((term.c_lflag & ICANON) != 0);
 }
 
 
@@ -67,8 +68,8 @@
 
 bool Stdout::GetTerminalSize(intptr_t fd, int size[2]) {
   struct winsize w;
-  if (NO_RETRY_EXPECTED(ioctl(fd, TIOCGWINSZ, &w)) == 0 &&
-      (w.ws_col != 0 || w.ws_row != 0)) {
+  int status = NO_RETRY_EXPECTED(ioctl(fd, TIOCGWINSZ, &w));
+  if ((status == 0) && ((w.ws_col != 0) || (w.ws_row != 0))) {
     size[0] = w.ws_col;
     size[1] = w.ws_row;
     return true;
@@ -80,3 +81,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_LINUX)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/stdio_macos.cc b/runtime/bin/stdio_macos.cc
index 24f0414..d22f192 100644
--- a/runtime/bin/stdio_macos.cc
+++ b/runtime/bin/stdio_macos.cc
@@ -2,19 +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.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_MACOS)
 
+#include "bin/stdio.h"
+
 #include <errno.h>  // NOLINT
 #include <sys/ioctl.h>  // NOLINT
 #include <termios.h>  // NOLINT
 
-#include "bin/stdio.h"
 #include "bin/fdutils.h"
-
 #include "platform/signal_blocker.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -30,7 +31,7 @@
 bool Stdin::GetEchoMode() {
   struct termios term;
   tcgetattr(STDIN_FILENO, &term);
-  return (term.c_lflag & ECHO) != 0;
+  return ((term.c_lflag & ECHO) != 0);
 }
 
 
@@ -38,9 +39,9 @@
   struct termios term;
   tcgetattr(STDIN_FILENO, &term);
   if (enabled) {
-    term.c_lflag |= ECHO|ECHONL;
+    term.c_lflag |= (ECHO | ECHONL);
   } else {
-    term.c_lflag &= ~(ECHO|ECHONL);
+    term.c_lflag &= ~(ECHO | ECHONL);
   }
   tcsetattr(STDIN_FILENO, TCSANOW, &term);
 }
@@ -49,7 +50,7 @@
 bool Stdin::GetLineMode() {
   struct termios term;
   tcgetattr(STDIN_FILENO, &term);
-  return (term.c_lflag & ICANON) != 0;
+  return ((term.c_lflag & ICANON) != 0);
 }
 
 
@@ -67,8 +68,8 @@
 
 bool Stdout::GetTerminalSize(intptr_t fd, int size[2]) {
   struct winsize w;
-  if (NO_RETRY_EXPECTED(ioctl(fd, TIOCGWINSZ, &w) == 0) &&
-      (w.ws_col != 0 || w.ws_row != 0)) {
+  int status = NO_RETRY_EXPECTED(ioctl(fd, TIOCGWINSZ, &w));
+  if ((status == 0) && ((w.ws_col != 0) || (w.ws_row != 0))) {
     size[0] = w.ws_col;
     size[1] = w.ws_row;
     return true;
@@ -80,3 +81,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_MACOS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/stdio_unsupported.cc b/runtime/bin/stdio_unsupported.cc
new file mode 100644
index 0000000..1e6c213
--- /dev/null
+++ b/runtime/bin/stdio_unsupported.cc
@@ -0,0 +1,52 @@
+// 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.
+
+#if defined(DART_IO_DISABLED)
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+
+namespace dart {
+namespace bin {
+
+void FUNCTION_NAME(Stdin_ReadByte)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Stdin unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Stdin_GetEchoMode)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Stdin unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Stdin_SetEchoMode)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Stdin unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Stdin_GetLineMode)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Stdin unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Stdin_SetLineMode)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Stdin unsupported on this platform"));
+}
+
+
+void FUNCTION_NAME(Stdout_GetTerminalSize)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Stdout unsupported on this platform"));
+}
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // defined(DART_IO_DISABLED)
diff --git a/runtime/bin/stdio_win.cc b/runtime/bin/stdio_win.cc
index ec479c0..d062826 100644
--- a/runtime/bin/stdio_win.cc
+++ b/runtime/bin/stdio_win.cc
@@ -2,12 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#if !defined(DART_IO_DISABLED)
+
 #include "platform/globals.h"
 #if defined(TARGET_OS_WINDOWS)
 
 #include "bin/stdio.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -16,7 +17,7 @@
   uint8_t buffer[1];
   DWORD read = 0;
   int c = -1;
-  if (ReadFile(h, buffer, 1, &read, NULL) && read == 1) {
+  if (ReadFile(h, buffer, 1, &read, NULL) && (read == 1)) {
     c = buffer[0];
   }
   return c;
@@ -26,15 +27,19 @@
 bool Stdin::GetEchoMode() {
   HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
   DWORD mode;
-  if (!GetConsoleMode(h, &mode)) return false;
-  return (mode & ENABLE_ECHO_INPUT) != 0;
+  if (!GetConsoleMode(h, &mode)) {
+    return false;
+  }
+  return ((mode & ENABLE_ECHO_INPUT) != 0);
 }
 
 
 void Stdin::SetEchoMode(bool enabled) {
   HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
   DWORD mode;
-  if (!GetConsoleMode(h, &mode)) return;
+  if (!GetConsoleMode(h, &mode)) {
+    return;
+  }
   if (enabled) {
     mode |= ENABLE_ECHO_INPUT;
   } else {
@@ -47,7 +52,9 @@
 bool Stdin::GetLineMode() {
   HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
   DWORD mode;
-  if (!GetConsoleMode(h, &mode)) return false;
+  if (!GetConsoleMode(h, &mode)) {
+    return false;
+  }
   return (mode & ENABLE_LINE_INPUT) != 0;
 }
 
@@ -55,7 +62,9 @@
 void Stdin::SetLineMode(bool enabled) {
   HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
   DWORD mode;
-  if (!GetConsoleMode(h, &mode)) return;
+  if (!GetConsoleMode(h, &mode)) {
+    return;
+  }
   if (enabled) {
     mode |= ENABLE_LINE_INPUT;
   } else {
@@ -73,7 +82,9 @@
     h = GetStdHandle(STD_ERROR_HANDLE);
   }
   CONSOLE_SCREEN_BUFFER_INFO info;
-  if (!GetConsoleScreenBufferInfo(h, &info)) return false;
+  if (!GetConsoleScreenBufferInfo(h, &info)) {
+    return false;
+  }
   size[0] = info.srWindow.Right - info.srWindow.Left + 1;
   size[1] = info.srWindow.Bottom - info.srWindow.Top + 1;
   return true;
@@ -83,3 +94,5 @@
 }  // namespace dart
 
 #endif  // defined(TARGET_OS_WINDOWS)
+
+#endif  // !defined(DART_IO_DISABLED)
diff --git a/runtime/bin/thread.h b/runtime/bin/thread.h
index d4a67bc..d95675d 100644
--- a/runtime/bin/thread.h
+++ b/runtime/bin/thread.h
@@ -57,6 +57,10 @@
   static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage);
 
   static void InitOnce();
+
+ private:
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(Thread);
 };
 
 
@@ -105,7 +109,6 @@
   DISALLOW_COPY_AND_ASSIGN(Monitor);
 };
 
-
 }  // namespace bin
 }  // namespace dart
 
diff --git a/runtime/bin/thread_android.cc b/runtime/bin/thread_android.cc
index f84a988..4f5c547 100644
--- a/runtime/bin/thread_android.cc
+++ b/runtime/bin/thread_android.cc
@@ -6,6 +6,7 @@
 #if defined(TARGET_OS_ANDROID)
 
 #include "bin/thread.h"
+#include "bin/thread_android.h"
 
 #include <errno.h>  // NOLINT
 #include <sys/time.h>  // NOLINT
@@ -37,7 +38,9 @@
   }
 #else
 #define RETURN_ON_PTHREAD_FAILURE(result) \
-  if (result != 0) return result;
+  if (result != 0) { \
+    return result; \
+  }
 #endif
 
 
@@ -164,7 +167,7 @@
 
 
 bool Thread::Compare(ThreadId a, ThreadId b) {
-  return a == b;
+  return (a == b);
 }
 
 
diff --git a/runtime/bin/thread_linux.cc b/runtime/bin/thread_linux.cc
index 1e01a77..7a2a92a 100644
--- a/runtime/bin/thread_linux.cc
+++ b/runtime/bin/thread_linux.cc
@@ -6,6 +6,7 @@
 #if defined(TARGET_OS_LINUX)
 
 #include "bin/thread.h"
+#include "bin/thread_linux.h"
 
 #include <errno.h>  // NOLINT
 #include <sys/resource.h>  // NOLINT
@@ -38,7 +39,9 @@
   }
 #else
 #define RETURN_ON_PTHREAD_FAILURE(result) \
-  if (result != 0) return result;
+  if (result != 0) { \
+    return result; \
+  }
 #endif
 
 
@@ -165,7 +168,7 @@
 
 
 bool Thread::Compare(ThreadId a, ThreadId b) {
-  return pthread_equal(a, b) != 0;
+  return (pthread_equal(a, b) != 0);
 }
 
 
diff --git a/runtime/bin/thread_macos.cc b/runtime/bin/thread_macos.cc
index 28c747d..8286835 100644
--- a/runtime/bin/thread_macos.cc
+++ b/runtime/bin/thread_macos.cc
@@ -6,17 +6,18 @@
 #if defined(TARGET_OS_MACOS)
 
 #include "bin/thread.h"
+#include "bin/thread_macos.h"
 
-#include <sys/errno.h>  // NOLINT
-#include <sys/types.h>  // NOLINT
-#include <sys/sysctl.h>  // NOLINT
-#include <mach/mach_init.h>  // NOLINT
 #include <mach/mach_host.h>  // NOLINT
+#include <mach/mach_init.h>  // NOLINT
 #include <mach/mach_port.h>  // NOLINT
 #include <mach/mach_traps.h>  // NOLINT
 #include <mach/task_info.h>  // NOLINT
-#include <mach/thread_info.h>  // NOLINT
 #include <mach/thread_act.h>  // NOLINT
+#include <mach/thread_info.h>  // NOLINT
+#include <sys/errno.h>  // NOLINT
+#include <sys/sysctl.h>  // NOLINT
+#include <sys/types.h>  // NOLINT
 
 #include "platform/assert.h"
 #include "platform/utils.h"
@@ -45,7 +46,9 @@
   }
 #else
 #define RETURN_ON_PTHREAD_FAILURE(result) \
-  if (result != 0) return result;
+  if (result != 0) { \
+    return result; \
+  }
 #endif
 
 
@@ -157,7 +160,7 @@
 
 
 bool Thread::Compare(ThreadId a, ThreadId b) {
-  return pthread_equal(a, b) != 0;
+  return (pthread_equal(a, b) != 0);
 }
 
 
diff --git a/runtime/bin/thread_win.cc b/runtime/bin/thread_win.cc
index 44941bb..db41196 100644
--- a/runtime/bin/thread_win.cc
+++ b/runtime/bin/thread_win.cc
@@ -6,6 +6,7 @@
 #if defined(TARGET_OS_WINDOWS)
 
 #include "bin/thread.h"
+#include "bin/thread_win.h"
 
 #include <process.h>  // NOLINT
 
@@ -57,7 +58,7 @@
   uint32_t tid;
   uintptr_t thread = _beginthreadex(NULL, Thread::GetMaxStackSize(),
                                     ThreadEntry, start_data, 0, &tid);
-  if (thread == -1L || thread == 0) {
+  if ((thread == -1L) || (thread == 0)) {
 #ifdef DEBUG
     fprintf(stderr, "_beginthreadex error: %d (%s)\n", errno, strerror(errno));
 #endif
@@ -130,7 +131,7 @@
 
 
 bool Thread::Compare(ThreadId a, ThreadId b) {
-  return a == b;
+  return (a == b);
 }
 
 
@@ -209,7 +210,7 @@
   if (result == WAIT_OBJECT_0) {
     return true;
   }
-  if (result == WAIT_ABANDONED || result == WAIT_FAILED) {
+  if ((result == WAIT_ABANDONED) || (result == WAIT_FAILED)) {
     FATAL1("Mutex try lock failed %d", GetLastError());
   }
   ASSERT(result == WAIT_TIMEOUT);
@@ -273,7 +274,8 @@
   EnterCriticalSection(&waiters_cs_);
   if (waiters_tail_ == NULL) {
     ASSERT(waiters_head_ == NULL);
-    waiters_head_ = waiters_tail_ = wait_data;
+    waiters_head_ = wait_data;
+    waiters_tail_ = wait_data;
   } else {
     waiters_tail_->next_ = wait_data;
     waiters_tail_ = wait_data;
@@ -291,7 +293,8 @@
   while (current != NULL) {
     if (current == wait_data) {
       if (waiters_head_ == waiters_tail_) {
-        waiters_head_ = waiters_tail_ = NULL;
+        waiters_head_ = NULL;
+        waiters_tail_ = NULL;
       } else if (current == waiters_head_) {
         waiters_head_ = waiters_head_->next_;
       } else if (current == waiters_tail_) {
@@ -319,7 +322,8 @@
   if (first != NULL) {
     // Remove from list.
     if (waiters_head_ == waiters_tail_) {
-      waiters_tail_ = waiters_head_ = NULL;
+      waiters_tail_ = NULL;
+      waiters_head_ = NULL;
     } else {
       waiters_head_ = waiters_head_->next_;
     }
@@ -340,7 +344,8 @@
   // Extract list to signal.
   MonitorWaitData* current = waiters_head_;
   // Clear list.
-  waiters_head_ = waiters_tail_ = NULL;
+  waiters_head_ = NULL;
+  waiters_tail_ = NULL;
   // Iterate and signal all events.
   while (current != NULL) {
     // Copy next.
diff --git a/runtime/bin/utils.h b/runtime/bin/utils.h
index cbc2bab..ab02ebe 100644
--- a/runtime/bin/utils.h
+++ b/runtime/bin/utils.h
@@ -83,6 +83,10 @@
   static char* Utf8ToConsoleString(char* utf8,
                                    intptr_t len = -1,
                                    intptr_t* result_len = NULL);
+
+ private:
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(StringUtils);
 };
 
 
@@ -94,14 +98,23 @@
   // Returns true if the arguments are converted. In that case
   // each of the arguments need to be deallocated using free.
   static bool GetUtf8Argv(int argc, char** argv);
+
+ private:
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(ShellUtils);
 };
 
+
 class TimerUtils {
  public:
   static void InitOnce();
   static int64_t GetCurrentMonotonicMicros();
   static int64_t GetCurrentMonotonicMillis();
   static void Sleep(int64_t millis);
+
+ private:
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(TimerUtils);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/utils_android.cc b/runtime/bin/utils_android.cc
index e36ac11..c7a4d63 100644
--- a/runtime/bin/utils_android.cc
+++ b/runtime/bin/utils_android.cc
@@ -14,7 +14,6 @@
 #include "platform/assert.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -43,41 +42,49 @@
   }
 }
 
+
 const char* StringUtils::ConsoleStringToUtf8(
     const char* str, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 const char* StringUtils::Utf8ToConsoleString(
     const char* utf8, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 char* StringUtils::ConsoleStringToUtf8(
     char* str, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 char* StringUtils::Utf8ToConsoleString(
     char* utf8, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 bool ShellUtils::GetUtf8Argv(int argc, char** argv) {
   return false;
 }
 
+
 void TimerUtils::InitOnce() {
 }
 
+
 int64_t TimerUtils::GetCurrentMonotonicMillis() {
   return GetCurrentMonotonicMicros() / 1000;
 }
 
+
 int64_t TimerUtils::GetCurrentMonotonicMicros() {
   struct timespec ts;
   if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) {
@@ -91,6 +98,7 @@
   return result;
 }
 
+
 void TimerUtils::Sleep(int64_t millis) {
   struct timespec req;  // requested.
   struct timespec rem;  // remainder.
diff --git a/runtime/bin/utils_linux.cc b/runtime/bin/utils_linux.cc
index ea6ef8c..2029071 100644
--- a/runtime/bin/utils_linux.cc
+++ b/runtime/bin/utils_linux.cc
@@ -14,7 +14,6 @@
 #include "platform/assert.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -41,41 +40,49 @@
   }
 }
 
+
 const char* StringUtils::ConsoleStringToUtf8(
     const char* str, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 const char* StringUtils::Utf8ToConsoleString(
     const char* utf8, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 char* StringUtils::ConsoleStringToUtf8(
     char* str, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 char* StringUtils::Utf8ToConsoleString(
     char* utf8, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 bool ShellUtils::GetUtf8Argv(int argc, char** argv) {
   return false;
 }
 
+
 void TimerUtils::InitOnce() {
 }
 
+
 int64_t TimerUtils::GetCurrentMonotonicMillis() {
   return GetCurrentMonotonicMicros() / 1000;
 }
 
+
 int64_t TimerUtils::GetCurrentMonotonicMicros() {
   struct timespec ts;
   if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) {
@@ -89,6 +96,7 @@
   return result;
 }
 
+
 void TimerUtils::Sleep(int64_t millis) {
   struct timespec req;  // requested.
   struct timespec rem;  // remainder.
diff --git a/runtime/bin/utils_macos.cc b/runtime/bin/utils_macos.cc
index eea4cb7..136881d 100644
--- a/runtime/bin/utils_macos.cc
+++ b/runtime/bin/utils_macos.cc
@@ -6,22 +6,20 @@
 #if defined(TARGET_OS_MACOS)
 
 #include <errno.h>  // NOLINT
-#include <netdb.h>  // NOLINT
-#include <mach/mach.h>  // NOLINT
 #include <mach/clock.h>  // NOLINT
+#include <mach/mach.h>  // NOLINT
 #include <mach/mach_time.h>  // NOLINT
-#include <sys/time.h>  // NOLINT
-#include <time.h>  // NOLINT
-
+#include <netdb.h>  // NOLINT
 #if TARGET_OS_IOS
 #include <sys/sysctl.h>  // NOLINT
 #endif
+#include <sys/time.h>  // NOLINT
+#include <time.h>  // NOLINT
 
 #include "bin/utils.h"
 #include "platform/assert.h"
 #include "platform/utils.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -50,47 +48,55 @@
   }
 }
 
+
 const char* StringUtils::ConsoleStringToUtf8(
     const char* str, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 const char* StringUtils::Utf8ToConsoleString(
     const char* utf8, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 char* StringUtils::ConsoleStringToUtf8(
     char* str, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 char* StringUtils::Utf8ToConsoleString(
     char* utf8, intptr_t len, intptr_t* result_len) {
   UNIMPLEMENTED();
   return NULL;
 }
 
+
 bool ShellUtils::GetUtf8Argv(int argc, char** argv) {
   return false;
 }
 
+
 static mach_timebase_info_data_t timebase_info;
 
+
 void TimerUtils::InitOnce() {
   kern_return_t kr = mach_timebase_info(&timebase_info);
   ASSERT(KERN_SUCCESS == kr);
 }
 
+
 int64_t TimerUtils::GetCurrentMonotonicMillis() {
   return GetCurrentMonotonicMicros() / 1000;
 }
 
-#if TARGET_OS_IOS
 
+#if TARGET_OS_IOS
 static int64_t GetCurrentTimeMicros() {
   // gettimeofday has microsecond resolution.
   struct timeval tv;
@@ -100,9 +106,9 @@
   }
   return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
 }
-
 #endif  // TARGET_OS_IOS
 
+
 int64_t TimerUtils::GetCurrentMonotonicMicros() {
 #if TARGET_OS_IOS
   // On iOS mach_absolute_time stops while the device is sleeping. Instead use
@@ -129,6 +135,7 @@
 #endif  // TARGET_OS_IOS
 }
 
+
 void TimerUtils::Sleep(int64_t millis) {
   struct timespec req;  // requested.
   struct timespec rem;  // remainder.
diff --git a/runtime/bin/utils_win.cc b/runtime/bin/utils_win.cc
index 116ae56..7e3cfb6 100644
--- a/runtime/bin/utils_win.cc
+++ b/runtime/bin/utils_win.cc
@@ -8,12 +8,11 @@
 #include <errno.h>  // NOLINT
 #include <time.h>  // NOLINT
 
+#include "bin/log.h"
 #include "bin/utils.h"
 #include "bin/utils_win.h"
-#include "bin/log.h"
 #include "platform/assert.h"
 
-
 namespace dart {
 namespace bin {
 
@@ -47,9 +46,9 @@
   FormatMessageIntoBuffer(code_, message, kMaxMessageLength);
   char* utf8 = StringUtilsWin::WideToUtf8(message);
   SetMessage(utf8);
-  free(utf8);
 }
 
+
 void OSError::SetCodeAndMessage(SubSystem sub_system, int code) {
   set_sub_system(sub_system);
   set_code(code);
@@ -59,20 +58,22 @@
   FormatMessageIntoBuffer(code_, message, kMaxMessageLength);
   char* utf8 = StringUtilsWin::WideToUtf8(message);
   SetMessage(utf8);
-  free(utf8);
 }
 
+
 char* StringUtils::ConsoleStringToUtf8(char* str,
                                        intptr_t len,
                                        intptr_t* result_len) {
   int wide_len = MultiByteToWideChar(CP_ACP, 0, str, len, NULL, 0);
-  wchar_t* wide = new wchar_t[wide_len];
+  wchar_t* wide;
+  wide =
+      reinterpret_cast<wchar_t*>(Dart_ScopeAllocate(wide_len * sizeof(*wide)));
   MultiByteToWideChar(CP_ACP, 0, str, len, wide, wide_len);
   char* utf8 = StringUtilsWin::WideToUtf8(wide, wide_len, result_len);
-  delete[] wide;
   return utf8;
 }
 
+
 char* StringUtils::Utf8ToConsoleString(char* utf8,
                                        intptr_t len,
                                        intptr_t* result_len) {
@@ -80,19 +81,20 @@
   wchar_t* wide = StringUtilsWin::Utf8ToWide(utf8, len, &wide_len);
   int system_len = WideCharToMultiByte(
       CP_ACP, 0, wide, wide_len, NULL, 0, NULL, NULL);
-  char* ansi = reinterpret_cast<char*>(malloc(system_len));
+  char* ansi;
+  ansi =
+      reinterpret_cast<char*>(Dart_ScopeAllocate(system_len * sizeof(*ansi)));
   if (ansi == NULL) {
-    free(wide);
     return NULL;
   }
   WideCharToMultiByte(CP_ACP, 0, wide, wide_len, ansi, system_len, NULL, NULL);
-  free(wide);
   if (result_len != NULL) {
     *result_len = system_len;
   }
   return ansi;
 }
 
+
 char* StringUtilsWin::WideToUtf8(wchar_t* wide,
                                  intptr_t len,
                                  intptr_t* result_len) {
@@ -100,7 +102,8 @@
   // NUL byte in the length.
   int utf8_len = WideCharToMultiByte(
       CP_UTF8, 0, wide, len, NULL, 0, NULL, NULL);
-  char* utf8 = reinterpret_cast<char*>(malloc(utf8_len));
+  char* utf8;
+  utf8 = reinterpret_cast<char*>(Dart_ScopeAllocate(utf8_len * sizeof(*utf8)));
   WideCharToMultiByte(CP_UTF8, 0, wide, len, utf8, utf8_len, NULL, NULL);
   if (result_len != NULL) {
     *result_len = utf8_len;
@@ -115,8 +118,9 @@
   // If len is -1 then MultiByteToWideChar will include the terminating
   // NUL byte in the length.
   int wide_len = MultiByteToWideChar(CP_UTF8, 0, utf8, len, NULL, 0);
-  wchar_t* wide =
-      reinterpret_cast<wchar_t*>(malloc((wide_len) * sizeof(wchar_t)));
+  wchar_t* wide;
+  wide =
+      reinterpret_cast<wchar_t*>(Dart_ScopeAllocate(wide_len * sizeof(*wide)));
   MultiByteToWideChar(CP_UTF8, 0, utf8, len, wide, wide_len);
   if (result_len != NULL) {
     *result_len = wide_len;
@@ -124,6 +128,7 @@
   return wide;
 }
 
+
 const char* StringUtils::Utf8ToConsoleString(
     const char* utf8, intptr_t len, intptr_t* result_len) {
   return const_cast<const char*>(
@@ -131,6 +136,7 @@
           const_cast<char*>(utf8), len, result_len));
 }
 
+
 const char* StringUtils::ConsoleStringToUtf8(
     const char* str, intptr_t len, intptr_t* result_len) {
   return const_cast<const char*>(
@@ -138,23 +144,28 @@
           const_cast<char*>(str), len, result_len));
 }
 
+
 const char* StringUtilsWin::WideToUtf8(
     const wchar_t* wide, intptr_t len, intptr_t* result_len) {
   return const_cast<const char*>(
       StringUtilsWin::WideToUtf8(const_cast<wchar_t*>(wide), len, result_len));
 }
 
+
 const wchar_t* StringUtilsWin::Utf8ToWide(
     const char* utf8, intptr_t len, intptr_t* result_len) {
   return const_cast<const wchar_t*>(
       StringUtilsWin::Utf8ToWide(const_cast<char*>(utf8), len, result_len));
 }
 
+
 bool ShellUtils::GetUtf8Argv(int argc, char** argv) {
   wchar_t* command_line = GetCommandLineW();
   int unicode_argc;
   wchar_t** unicode_argv = CommandLineToArgvW(command_line, &unicode_argc);
-  if (unicode_argv == NULL) return false;
+  if (unicode_argv == NULL) {
+    return false;
+  }
   // The argc passed to main should have the same argc as we get here.
   ASSERT(argc == unicode_argc);
   if (argc < unicode_argc) {
@@ -162,31 +173,39 @@
   }
   for (int i = 0; i < unicode_argc; i++) {
     wchar_t* arg = unicode_argv[i];
-    argv[i] = StringUtilsWin::WideToUtf8(arg);
+    int arg_len =
+        WideCharToMultiByte(CP_UTF8, 0, arg, -1, NULL, 0, NULL, NULL);
+    char* utf8_arg = reinterpret_cast<char*>(malloc(arg_len));
+    WideCharToMultiByte(CP_UTF8, 0, arg, -1, utf8_arg, arg_len, NULL, NULL);
+    argv[i] = utf8_arg;
   }
   LocalFree(unicode_argv);
   return true;
 }
 
+
+// Although win32 uses 64-bit integers for representing timestamps,
+// these are packed into a FILETIME structure. The FILETIME
+// structure is just a struct representing a 64-bit integer. The
+// TimeStamp union allows access to both a FILETIME and an integer
+// representation of the timestamp. The Windows timestamp is in
+// 100-nanosecond intervals since January 1, 1601.
+union TimeStamp {
+  FILETIME ft_;
+  int64_t t_;
+};
+
+
 static int64_t GetCurrentTimeMicros() {
   static const int64_t kTimeEpoc = 116444736000000000LL;
   static const int64_t kTimeScaler = 10;  // 100 ns to us.
 
-  // Although win32 uses 64-bit integers for representing timestamps,
-  // these are packed into a FILETIME structure. The FILETIME
-  // structure is just a struct representing a 64-bit integer. The
-  // TimeStamp union allows access to both a FILETIME and an integer
-  // representation of the timestamp. The Windows timestamp is in
-  // 100-nanosecond intervals since January 1, 1601.
-  union TimeStamp {
-    FILETIME ft_;
-    int64_t t_;
-  };
   TimeStamp time;
   GetSystemTimeAsFileTime(&time.ft_);
   return (time.t_ - kTimeEpoc) / kTimeScaler;
 }
 
+
 static int64_t qpc_ticks_per_second = 0;
 
 void TimerUtils::InitOnce() {
@@ -198,10 +217,12 @@
   }
 }
 
+
 int64_t TimerUtils::GetCurrentMonotonicMillis() {
   return GetCurrentMonotonicMicros() / 1000;
 }
 
+
 int64_t TimerUtils::GetCurrentMonotonicMicros() {
   if (qpc_ticks_per_second == 0) {
     // QueryPerformanceCounter not supported, fallback.
@@ -219,6 +240,7 @@
   return result;
 }
 
+
 void TimerUtils::Sleep(int64_t millis) {
   ::Sleep(millis);
 }
diff --git a/runtime/bin/utils_win.h b/runtime/bin/utils_win.h
index 92de84e..fe0fa5c 100644
--- a/runtime/bin/utils_win.h
+++ b/runtime/bin/utils_win.h
@@ -12,6 +12,11 @@
 
 void FormatMessageIntoBuffer(DWORD code, wchar_t* buffer, int buffer_length);
 
+// These string utility functions return strings that have been allocated with
+// Dart_ScopeAllocate(). They should be used only when we are inside an API
+// scope. If a string returned by one of these functions must persist beyond
+// the scope, then copy the results into a suitable buffer that you have
+// allocated.
 class StringUtilsWin {
  public:
   static char* WideToUtf8(wchar_t* wide,
@@ -26,6 +31,10 @@
   static const wchar_t* Utf8ToWide(const char* utf8,
                                    intptr_t len = -1,
                                    intptr_t* result_len = NULL);
+
+ private:
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(StringUtilsWin);
 };
 
 }  // namespace bin
diff --git a/runtime/bin/vmservice_dartium.cc b/runtime/bin/vmservice_dartium.cc
index 2a9fc8f..535fb41 100644
--- a/runtime/bin/vmservice_dartium.cc
+++ b/runtime/bin/vmservice_dartium.cc
@@ -148,6 +148,7 @@
   inflateEnd(&strm);
 }
 
+
 /* DISALLOW_ALLOCATION */
 void VmServiceServer::operator delete(void* pointer)  {
   fprintf(stderr, "unreachable code\n");
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc
index 08fd57a..2736408 100644
--- a/runtime/bin/vmservice_impl.cc
+++ b/runtime/bin/vmservice_impl.cc
@@ -120,6 +120,7 @@
   // NO-OP.
 }
 
+
 struct VmServiceIONativeEntry {
   const char* name;
   int num_arguments;
@@ -271,7 +272,7 @@
 
 
 const char* VmService::GetErrorMessage() {
-  return error_msg_ == NULL ? "No error." : error_msg_;
+  return (error_msg_ == NULL) ? "No error." : error_msg_;
 }
 
 
diff --git a/runtime/bin/vmservice_impl.h b/runtime/bin/vmservice_impl.h
index 1780013..f373b4b 100644
--- a/runtime/bin/vmservice_impl.h
+++ b/runtime/bin/vmservice_impl.h
@@ -55,7 +55,6 @@
   DISALLOW_IMPLICIT_CONSTRUCTORS(VmService);
 };
 
-
 }  // namespace bin
 }  // namespace dart
 
diff --git a/runtime/bin/zlib.gyp b/runtime/bin/zlib.gyp
index 98555f9f..584f0ef 100644
--- a/runtime/bin/zlib.gyp
+++ b/runtime/bin/zlib.gyp
@@ -64,11 +64,6 @@
               '<(zlib_path)/.',
         ],
       },
-      'conditions': [
-        ['OS!="win"', {
-          'product_name': 'chrome_zlib',
-        }],
-      ],
     },
   ],
 }
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 77d1289..a67f9e1 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -54,7 +54,8 @@
 #include <stdbool.h>
 #if __GNUC__ >= 4
 #if defined(DART_SHARED_LIB)
-#define DART_EXPORT DART_EXTERN_C __attribute__ ((visibility("default")))
+#define DART_EXPORT DART_EXTERN_C __attribute__ ((visibility("default"))) \
+    __attribute((used))
 #else
 #define DART_EXPORT DART_EXTERN_C
 #endif
@@ -528,8 +529,8 @@
  *   after the object is garbage collected, unless the handle has been deleted.
  *   A valid callback needs to be specified it cannot be NULL.
  *
- * \return Success if the weak persistent handle was
- *   created. Otherwise, returns an error.
+ * \return The weak persistent handle or NULL. NULL is returned in case of bad
+ *   parameters.
  */
 DART_EXPORT Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle(
     Dart_Handle object,
@@ -721,6 +722,15 @@
 typedef void (*Dart_IsolateShutdownCallback)(void* callback_data);
 
 /**
+ * A thread death callback function.
+ * This callback, provided by the embedder, is called before a thread in the
+ * vm thread pool exits.
+ * This function could be used to dispose of native resources that
+ * are associated and attached to the thread, in order to avoid leaks.
+ */
+typedef void (*Dart_ThreadExitCallback)();
+
+/**
  * Callbacks provided by the embedder for file operations. If the
  * embedder does not allow file operations these callbacks can be
  * NULL.
@@ -802,6 +812,7 @@
     Dart_IsolateInterruptCallback interrupt,
     Dart_IsolateUnhandledExceptionCallback unhandled_exception,
     Dart_IsolateShutdownCallback shutdown,
+    Dart_ThreadExitCallback thread_exit,
     Dart_FileOpenCallback file_open,
     Dart_FileReadCallback file_read,
     Dart_FileWriteCallback file_write,
diff --git a/runtime/include/dart_tools_api.h b/runtime/include/dart_tools_api.h
index 13be4f9..da43d94 100644
--- a/runtime/include/dart_tools_api.h
+++ b/runtime/include/dart_tools_api.h
@@ -902,37 +902,26 @@
 #define DART_TIMELINE_STREAM_GC (1 << 5)
 /** Timeline stream for isolate events */
 #define DART_TIMELINE_STREAM_ISOLATE (1 << 6)
-
 /** Timeline stream for VM events */
 #define DART_TIMELINE_STREAM_VM (1 << 7)
 
-/** Enable all timeline stream recording for an isolate */
+/** All timeline streams */
 #define DART_TIMELINE_STREAM_ALL (DART_TIMELINE_STREAM_API |                   \
                                   DART_TIMELINE_STREAM_COMPILER |              \
                                   DART_TIMELINE_STREAM_DART |                  \
                                   DART_TIMELINE_STREAM_DEBUGGER |              \
                                   DART_TIMELINE_STREAM_EMBEDDER |              \
                                   DART_TIMELINE_STREAM_GC |                    \
-                                  DART_TIMELINE_STREAM_ISOLATE)
+                                  DART_TIMELINE_STREAM_ISOLATE |               \
+                                  DART_TIMELINE_STREAM_VM)
 
 /** Disable all timeline stream recording */
 #define DART_TIMELINE_STREAM_DISABLE 0
 
-/**
- * Start recording timeline events for the current isolate.
- *
- * \param stream_mask A bitmask of streams that should be recorded.
- *
- * NOTE: Calling with 0 disables recording of all streams.
- */
-DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask);
-
 
 /**
  * Start recording timeline events for the entire VM (including all isolates).
  *
- * NOTE: When enabled, the global flag, will override the per-isolate flag.
- *
  * \param stream_mask A bitmask of streams that should be recorded.
  *
  * NOTE: Calling with 0 disables recording of all streams.
@@ -977,20 +966,6 @@
     intptr_t buffer_length,
     void* stream_callback_data);
 
-
-/**
- * Get the timeline for the current isolate in trace-event format
- *
- * \param consumer A Dart_StreamConsumer.
- * \param user_data User data passed into consumer.
- *
- * NOTE: The trace-event format is documented here: https://goo.gl/hDZw5M
- *
- * \return True if a stream was output.
- */
-DART_EXPORT bool Dart_TimelineGetTrace(Dart_StreamConsumer consumer,
-                                       void* user_data);
-
 /**
  * Get the timeline for entire VM (including all isolates).
  *
@@ -1007,75 +982,67 @@
 DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer,
                                              void* user_data);
 
-/**
- * Add a duration timeline event to the embedder stream for the current isolate.
- *
- * \param label The name of the event.
- * \param start_micros The start of the duration (in microseconds)
- * \param end_micros The end of the duration (in microseconds)
- *
- * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros.
- */
-DART_EXPORT Dart_Handle Dart_TimelineDuration(const char* label,
-                                              int64_t start_micros,
-                                              int64_t end_micros);
-
+typedef enum {
+  Dart_Timeline_Event_Begin,          // Phase = 'B'.
+  Dart_Timeline_Event_End,            // Phase = 'E'.
+  Dart_Timeline_Event_Instant,        // Phase = 'i'.
+  Dart_Timeline_Event_Duration,       // Phase = 'X'.
+  Dart_Timeline_Event_Async_Begin,    // Phase = 'b'.
+  Dart_Timeline_Event_Async_End,      // Phase = 'e'.
+  Dart_Timeline_Event_Async_Instant,  // Phase = 'n'.
+  Dart_Timeline_Event_Counter,        // Phase = 'C'.
+} Dart_Timeline_Event_Type;
 
 /**
- * Add an instant timeline event to the embedder stream for the current isolate.
+ * Add a timeline event to the embedder stream.
  *
- * \param label The name of event.
- *
- * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros.
+ * \param label The name of the evnet.
+ * \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.
  */
-DART_EXPORT Dart_Handle Dart_TimelineInstant(const char* label);
-
+DART_EXPORT void Dart_TimelineEvent(const char* label,
+                                    int64_t timestamp0,
+                                    int64_t timestamp1_or_async_id,
+                                    Dart_Timeline_Event_Type type,
+                                    intptr_t argument_count,
+                                    const char** argument_names,
+                                    const char** argument_values);
 
 /**
- * Adds an asynchronous begin timeline event to the embedder stream for the
- * current isolate.
+ * Associates a name with the current thread. This name will be used to name
+ * threads in the timeline. Can only be called after a call to Dart_Initialize.
  *
- * \param label The name of event.
- *
- * \return Returns an asynchronous id that must be passed to
- * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. If the asynchronous
- * id is less than 0 the event was not added to the timeline and subsequent
- * calls to Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd will become
- * no-ops.
- *
- * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros.
+ * \param name The name of the thread.
  */
-DART_EXPORT Dart_Handle Dart_TimelineAsyncBegin(const char* label,
-                                                int64_t* async_id);
-
+DART_EXPORT void Dart_SetThreadName(const char* name);
 
 /**
- * Adds an asynchronous instant timeline event to the embedder stream for the
- * current isolate.
- *
- * \param label The name of event.
- *
- * \return Returns an asynchronous id that must be passed to
- * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd.
- *
- * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros.
+ * Called by the VM to let the embedder know when to start recording into the
+ * timeline. Can be called from any thread.
  */
-DART_EXPORT Dart_Handle Dart_TimelineAsyncInstant(const char* label,
-                                                  int64_t async_id);
-
+typedef void (*Dart_EmbedderTimelineStartRecording)();
 
 /**
- * Adds an asynchronous end timeline event to the embedder stream for the
- * current isolate.
- *
- * \param label The name of event.
- *
- * \return Returns an asynchronous id that must be passed to
- * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd.
- *
- * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros.
+ * Called by the VM to let the embedder know when to stop recording into the
+ * timeline. Can be called from any thread.
  */
-DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label,
-                                              int64_t async_id);
+typedef void (*Dart_EmbedderTimelineStopRecording)();
+
+/**
+ * Sets the embedder timeline callbacks. These callbacks are used by the VM
+ * to notify the embedder of timeline recording state changes.
+ *
+ * \param start_recording See Dart_EmbedderTimelineStartRecording.
+ * \param stop_recording See Dart_EmbedderTimelineStopRecording.
+ *
+ * NOTE: To avoid races, this should be called before Dart_Initialize.
+ */
+DART_EXPORT void Dart_SetEmbedderTimelineCallbacks(
+    Dart_EmbedderTimelineStartRecording start_recording,
+    Dart_EmbedderTimelineStopRecording stop_recording);
 
 #endif  // INCLUDE_DART_TOOLS_API_H_
diff --git a/runtime/lib/bool_patch.dart b/runtime/lib/bool_patch.dart
index 8259f2e..274b153 100644
--- a/runtime/lib/bool_patch.dart
+++ b/runtime/lib/bool_patch.dart
@@ -13,4 +13,5 @@
   int get _identityHashCode {
     return this ? 1231 : 1237;
   }
+  int get hashCode => _identityHashCode;
 }
diff --git a/runtime/lib/compact_hash.dart b/runtime/lib/compact_hash.dart
index 5bcb48e..1c2de88 100644
--- a/runtime/lib/compact_hash.dart
+++ b/runtime/lib/compact_hash.dart
@@ -22,13 +22,18 @@
   int _hashMask = _HashBase._indexSizeToHashMask(_HashBase._INITIAL_INDEX_SIZE);
 
   // Fixed-length list of keys (set) or key/value at even/odd indices (map).
-  List _data = new List(_HashBase._INITIAL_INDEX_SIZE);
+  List _data;
 
   // Length of _data that is used (i.e., keys + values for a map).
   int _usedData = 0;
 
   // Number of deleted keys.
   int _deletedKeys = 0;
+
+  // Note: All fields are initialized in a single constructor so that the VM
+  // recognizes they cannot hold null values. This makes a big (20%) performance
+  // difference on some operations.
+  _HashFieldBase(int dataSize) : this._data = new List(dataSize);
 }
 
 // Base class for VM-internal classes; keep in sync with _HashFieldBase.
@@ -125,7 +130,7 @@
   int get length => (_usedData >> 1) - _deletedKeys;
   bool get isEmpty => length == 0;
   bool get isNotEmpty => !isEmpty;
-  
+
   void _rehash() {
     if ((_deletedKeys << 2) > _usedData) {
       // TODO(koda): Consider shrinking.
@@ -140,12 +145,12 @@
   void clear() {
     if (!isEmpty) {
       // Use _data.length, since _index might be null.
-      _init(_data.length, _hashMask);
+      _init(_data.length, _hashMask, null, 0);
     }
   }
 
   // Allocate new _index and _data, and optionally copy existing contents.
-  void _init(int size, int hashMask, [List oldData, int oldUsed]) {
+  void _init(int size, int hashMask, List oldData, int oldUsed) {
     assert(size & (size - 1) == 0);
     assert(_HashBase._UNUSED_PAIR == 0);
     _index = new Uint32List(size);
@@ -206,7 +211,7 @@
     int pair = _index[i];
     while (pair != _HashBase._UNUSED_PAIR) {
       if (pair == _HashBase._DELETED_PAIR) {
-        if (firstDeleted < 0){
+        if (firstDeleted < 0) {
           firstDeleted = i;
         }
       } else {
@@ -351,6 +356,8 @@
     with MapMixin<K, V>, _LinkedHashMapMixin<K, V>, _HashBase,
          _IdenticalAndIdentityHashCode
     implements LinkedHashMap<K, V> {
+
+  _CompactLinkedIdentityHashMap() : super(_HashBase._INITIAL_INDEX_SIZE);
 }
 
 class _CompactLinkedCustomHashMap<K, V> extends _HashFieldBase
@@ -369,7 +376,8 @@
   V remove(Object o) => _validKey(o) ? super.remove(o) : null;
 
   _CompactLinkedCustomHashMap(this._equality, this._hasher, validKey)
-      : _validKey = (validKey != null) ? validKey : new _TypeTest<K>().test;
+      : _validKey = (validKey != null) ? validKey : new _TypeTest<K>().test,
+        super(_HashBase._INITIAL_INDEX_SIZE);
 }
 
 // Iterates through _data[_offset + _step], _data[_offset + 2*_step], ...
@@ -426,10 +434,8 @@
     with _HashBase, _OperatorEqualsAndHashCode, SetMixin<E>
     implements LinkedHashSet<E> {
 
-  _CompactLinkedHashSet() {
+  _CompactLinkedHashSet() : super(_HashBase._INITIAL_INDEX_SIZE >> 1) {
     assert(_HashBase._UNUSED_PAIR == 0);
-    _index = new Uint32List(_HashBase._INITIAL_INDEX_SIZE);
-    _data = new List(_HashBase._INITIAL_INDEX_SIZE >> 1);
   }
 
   int get length => _usedData - _deletedKeys;
@@ -444,11 +450,11 @@
 
   void clear() {
     if (!isEmpty) {
-      _init(_index.length, _hashMask);
+      _init(_index.length, _hashMask, null, 0);
     }
   }
 
-  void _init(int size, int hashMask, [List oldData, int oldUsed]) {
+  void _init(int size, int hashMask, List oldData, int oldUsed) {
     _index = new Uint32List(size);
     _hashMask = hashMask;
     _data = new List(size >> 1);
@@ -475,7 +481,7 @@
     int pair = _index[i];
     while (pair != _HashBase._UNUSED_PAIR) {
       if (pair == _HashBase._DELETED_PAIR) {
-        if (firstDeleted < 0){
+        if (firstDeleted < 0) {
           firstDeleted = i;
         }
       } else {
diff --git a/runtime/lib/convert_patch.dart b/runtime/lib/convert_patch.dart
index 6d83969..3c50f2a 100644
--- a/runtime/lib/convert_patch.dart
+++ b/runtime/lib/convert_patch.dart
@@ -39,13 +39,14 @@
   }
 }
 
-class _JsonUtf8Decoder extends Converter<List<int>, Object> {
+class _JsonUtf8Decoder extends
+    ChunkedConverter<List<int>, Object, List<int>, Object> {
   final _Reviver _reviver;
   final bool _allowMalformed;
 
   _JsonUtf8Decoder(this._reviver, this._allowMalformed);
 
-  dynamic convert(List<int> input) {
+  Object convert(List<int> input) {
     var parser = _JsonUtf8DecoderSink._createParser(_reviver, _allowMalformed);
     parser.chunk = input;
     parser.chunkEnd = input.length;
diff --git a/runtime/lib/core_sources.gypi b/runtime/lib/core_sources.gypi
index bef056e..dd00af4 100644
--- a/runtime/lib/core_sources.gypi
+++ b/runtime/lib/core_sources.gypi
@@ -38,8 +38,6 @@
     'lib_prefix.dart',
     'map_patch.dart',
     'null_patch.dart',
-    'num.cc',
-    'num.dart',
     'object.cc',
     'object_patch.dart',
     'regexp.cc',
diff --git a/runtime/lib/date.cc b/runtime/lib/date.cc
index cf92809..ba9fa95 100644
--- a/runtime/lib/date.cc
+++ b/runtime/lib/date.cc
@@ -12,13 +12,13 @@
 
 namespace dart {
 
-static int32_t kMaxAllowedSeconds = 2100000000;
+static int64_t kMaxAllowedSeconds = kMaxInt32;
 
 DEFINE_NATIVE_ENTRY(DateTime_timeZoneName, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(
       Integer, dart_seconds, arguments->NativeArgAt(0));
   int64_t seconds = dart_seconds.AsInt64Value();
-  if (seconds < 0 || seconds > kMaxAllowedSeconds) {
+  if (llabs(seconds) > kMaxAllowedSeconds) {
     Exceptions::ThrowArgumentError(dart_seconds);
   }
   const char* name = OS::GetTimeZoneName(seconds);
@@ -30,7 +30,7 @@
   GET_NON_NULL_NATIVE_ARGUMENT(
       Integer, dart_seconds, arguments->NativeArgAt(0));
   int64_t seconds = dart_seconds.AsInt64Value();
-  if (seconds < 0 || seconds > kMaxAllowedSeconds) {
+  if (llabs(seconds) > kMaxAllowedSeconds) {
     Exceptions::ThrowArgumentError(dart_seconds);
   }
   int offset = OS::GetTimeZoneOffsetInSeconds(seconds);
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index 4697901..1ecf812 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -284,14 +284,24 @@
     }
 
     if (!isUtc) {
-      // Note that we need to remove the local timezone adjustement before
+      // Note that we need to remove the local timezone adjustment before
       // asking for the correct zone offset.
       int adjustment = _localTimeZoneAdjustmentInSeconds() *
           Duration.MICROSECONDS_PER_SECOND;
+      // The adjustment is independent of the actual date and of the daylight
+      // saving time. It is positive east of the Prime Meridian and negative
+      // west of it, e.g. -28800 sec for America/Los_Angeles timezone.
 
       int zoneOffset =
           _timeZoneOffsetInSeconds(microsecondsSinceEpoch - adjustment);
+      // The zoneOffset depends on the actual date and reflects any daylight
+      // saving time and/or historical deviation relative to UTC time.
+      // It is positive east of the Prime Meridian and negative west of it,
+      // e.g. -25200 sec for America/Los_Angeles timezone during DST.
       microsecondsSinceEpoch -= zoneOffset * Duration.MICROSECONDS_PER_SECOND;
+      // The resulting microsecondsSinceEpoch value is therefore the calculated
+      // UTC value decreased by a (positive if east of GMT) timezone adjustment
+      // and decreased by typically one hour if DST is in effect.
     }
     if (microsecondsSinceEpoch.abs() >
         _MAX_MILLISECONDS_SINCE_EPOCH * Duration.MICROSECONDS_PER_MILLISECOND) {
@@ -314,7 +324,8 @@
    * Adapted from V8's date implementation. See ECMA 262 - 15.9.1.9.
    */
   static int _equivalentYear(int year) {
-    // Returns the week day (in range 0 - 6).
+    // Returns year y so that _weekDay(y) == _weekDay(year).
+    // _weekDay returns the week day (in range 0 - 6).
     // 1/1/1956 was a Sunday (i.e. weekday 0). 1956 was a leap-year.
     // 1/1/1967 was a Sunday (i.e. weekday 0).
     // Without leap years a subsequent year has a week day + 1 (for example
@@ -352,22 +363,24 @@
   }
 
   /**
-   * Returns a date in seconds that is equivalent to the current date. An
-   * equivalent date has the same fields (`month`, `day`, etc.) as the
-   * [this], but the `year` is in the range [1970..2037].
+   * Returns a date in seconds that is equivalent to the given
+   * date in microseconds [microsecondsSinceEpoch]. An equivalent
+   * date has the same fields (`month`, `day`, etc.) as the given
+   * date, but the `year` is in the range [1901..2038].
    *
    * * The time since the beginning of the year is the same.
-   * * If [this] is in a leap year then the returned seconds are in a leap
-   *   year, too.
-   * * The week day of [this] is the same as the one for the returned date.
+   * * If the given date is in a leap year then the returned
+   *   seconds are in a leap year, too.
+   * * The week day of given date is the same as the one for the
+   *   returned date.
    */
   static int _equivalentSeconds(int microsecondsSinceEpoch) {
-    const int CUT_OFF_SECONDS = 2100000000;
+    const int CUT_OFF_SECONDS = 0x7FFFFFFF;
 
     int secondsSinceEpoch = _flooredDivision(microsecondsSinceEpoch,
                                              Duration.MICROSECONDS_PER_SECOND);
 
-    if (secondsSinceEpoch < 0 || secondsSinceEpoch >= CUT_OFF_SECONDS) {
+    if (secondsSinceEpoch.abs() > CUT_OFF_SECONDS) {
       int year = _yearsFromSecondsSinceEpoch(secondsSinceEpoch);
       int days = _dayFromYear(year);
       int equivalentYear = _equivalentYear(year);
diff --git a/runtime/lib/double.cc b/runtime/lib/double.cc
index dbeb447..2706269 100644
--- a/runtime/lib/double.cc
+++ b/runtime/lib/double.cc
@@ -230,6 +230,14 @@
 }
 
 
+DEFINE_NATIVE_ENTRY(Double_toString, 1) {
+  const Number& number = Number::CheckedHandle(arguments->NativeArgAt(0));
+  Heap::Space space = isolate->heap()->ShouldPretenure(kOneByteStringCid) ?
+      Heap::kPretenured : Heap::kNew;
+  return number.ToString(space);
+}
+
+
 DEFINE_NATIVE_ENTRY(Double_toStringAsFixed, 2) {
   // The boundaries are exclusive.
   static const double kLowerBoundary = -1e21;
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
index 87d8046..06cd324 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.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.
 
-class _Double extends _Num implements double {
+class _Double implements double {
   factory _Double.fromInteger(int value)
       native "Double_doubleFromInteger";
 
@@ -140,6 +140,8 @@
   static final List _cache = new List(CACHE_LENGTH);
   static int _cacheEvictIndex = 0;
 
+  String _toString() native "Double_toString";
+
   String toString() {
     // TODO(koda): Consider starting at most recently inserted.
     for (int i = 0; i < CACHE_LENGTH; i += 2) {
@@ -152,7 +154,7 @@
     if (identical(0.0, this)) {
       return "0.0";
     }
-    String result = super.toString();
+    String result = _toString();
     // Replace the least recently inserted entry.
     _cache[_cacheEvictIndex] = this;
     _cache[_cacheEvictIndex + 1] = result;
diff --git a/runtime/lib/errors.cc b/runtime/lib/errors.cc
index 785950b..0387f80 100644
--- a/runtime/lib/errors.cc
+++ b/runtime/lib/errors.cc
@@ -53,7 +53,7 @@
 // Allocate and throw a new TypeError or CastError.
 // Arg0: index of the token of the failed type check.
 // Arg1: src value.
-// Arg2: dst type name.
+// Arg2: dst type.
 // Arg3: dst name.
 // Arg4: type error message.
 // Return value: none, throws an exception.
@@ -64,14 +64,13 @@
       TokenPosition(Smi::CheckedHandle(arguments->NativeArgAt(0)).Value());
   const Instance& src_value =
       Instance::CheckedHandle(arguments->NativeArgAt(1));
-  const String& dst_type_name =
-      String::CheckedHandle(arguments->NativeArgAt(2));
+  const AbstractType& dst_type =
+      AbstractType::CheckedHandle(arguments->NativeArgAt(2));
   const String& dst_name = String::CheckedHandle(arguments->NativeArgAt(3));
   const String& error_msg = String::CheckedHandle(arguments->NativeArgAt(4));
-  const String& src_type_name = String::Handle(
-      AbstractType::Handle(src_value.GetType()).UserVisibleName());
-  Exceptions::CreateAndThrowTypeError(location, src_type_name,
-                                      dst_type_name, dst_name, error_msg);
+  const AbstractType& src_type = AbstractType::Handle(src_value.GetType());
+  Exceptions::CreateAndThrowTypeError(
+      location, src_type, dst_type, dst_name, error_msg);
   UNREACHABLE();
   return Object::null();
 }
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index 0165ed9..29c14f5 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -45,69 +45,44 @@
 }
 
 class _TypeError extends _AssertionError implements TypeError {
-  _TypeError._create(String url, int line, int column,
-                     this._srcType, this._dstType, this._dstName,
-                     this._errorMsg)
+  _TypeError._create(String url, int line, int column, this._errorMsg)
       : super._create("is assignable", url, line, column);
 
   static _throwNew(int location,
                    Object src_value,
-                   String dst_type_name,
+                   _Type dst_type,
                    String dst_name,
-                   String error_msg)
+                   String bound_error_msg)
       native "TypeError_throwNew";
 
   static _throwNewIfNotLoaded(_LibraryPrefix prefix,
                               int location,
                               Object src_value,
-                              String dst_type_name,
+                              _Type dst_type,
                               String dst_name,
-                              String error_msg) {
+                              String bound_error_msg) {
     if (!prefix.isLoaded()) {
-      _throwNew(location, src_value, dst_type_name, dst_name, error_msg);
+      _throwNew(location, src_value, dst_type, dst_name, bound_error_msg);
     }
   }
 
+  String toString() => _errorMsg;
 
-  String toString() {
-    String str = (_errorMsg != null) ? _errorMsg : "";
-    if ((_dstName != null) && (_dstName.length > 0)) {
-      str = "${str}type '$_srcType' is not a subtype of "
-            "type '$_dstType' of '$_dstName'.";
-    } else {
-      str = "${str}type error.";
-    }
-    return str;
-  }
-
-  final String _srcType;
-  final String _dstType;
-  final String _dstName;
   final String _errorMsg;
 }
 
 class _CastError extends Error implements CastError {
-  _CastError._create(this._url, this._line, this._column,
-                     this._srcType, this._dstType, this._dstName,
-                     this._errorMsg);
+  _CastError._create(this._url, this._line, this._column, this._errorMsg);
 
   // A CastError is allocated by TypeError._throwNew() when dst_name equals
-  // Exceptions::kCastErrorDstName.
+  // Symbols::InTypeCast().
 
-  String toString() {
-    String str = (_errorMsg != null) ? _errorMsg : "";
-    str = "${str}type '$_srcType' is not a subtype of "
-          "type '$_dstType' in type cast.";
-    return str;
-  }
+  String toString() => _errorMsg;
 
   // Fields _url, _line, and _column are only used for debugging purposes.
   final String _url;
   final int _line;
   final int _column;
-  final String _srcType;
-  final String _dstType;
-  final String _dstName;
   final String _errorMsg;
 }
 
diff --git a/runtime/lib/integers.dart b/runtime/lib/integers.dart
index 9192b28..a28491c 100644
--- a/runtime/lib/integers.dart
+++ b/runtime/lib/integers.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.
 
-class _IntegerImplementation extends _Num {
+abstract class _IntegerImplementation {
   // The Dart class _Bigint extending _IntegerImplementation requires a
   // default constructor.
 
@@ -410,9 +410,8 @@
     throw new UnsupportedError(
         "_Smi can only be allocated by the VM");
   }
-  int get _identityHashCode {
-    return this;
-  }
+  int get _identityHashCode => this;
+  int get hashCode => this;
   int operator ~() native "Smi_bitNegate";
   int get bitLength native "Smi_bitLength";
 
@@ -608,9 +607,8 @@
     throw new UnsupportedError(
         "_Mint can only be allocated by the VM");
   }
-  int get _identityHashCode {
-    return this;
-  }
+  int get _identityHashCode => this;
+  int get hashCode => this;
   int operator ~() native "Mint_bitNegate";
   int get bitLength native "Mint_bitLength";
 
diff --git a/runtime/lib/math.cc b/runtime/lib/math.cc
index d383471..0199782 100644
--- a/runtime/lib/math.cc
+++ b/runtime/lib/math.cc
@@ -79,7 +79,7 @@
 static RawTypedData* GetRandomStateArray(const Instance& receiver) {
   const Class& random_class = Class::Handle(receiver.clazz());
   const Field& state_field =
-      Field::Handle(random_class.LookupField(Symbols::_state()));
+      Field::Handle(random_class.LookupFieldAllowPrivate(Symbols::_state()));
   ASSERT(!state_field.IsNull());
   const Instance& state_field_value =
       Instance::Cast(Object::Handle(receiver.GetField(state_field)));
@@ -205,7 +205,7 @@
   const intptr_t n = count.Value();
   ASSERT((n > 0) && (n <= 8));
   uint8_t buffer[8];
-  Dart_EntropySource entropy_source = isolate->entropy_source_callback();
+  Dart_EntropySource entropy_source = Dart::entropy_source_callback();
   if ((entropy_source == NULL) || !entropy_source(buffer, n)) {
     const String& error = String::Handle(String::New(
         "No source of cryptographically secure random numbers available."));
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index aaa28e1..40efc28 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -253,8 +253,8 @@
 
 static RawInstance* CreateFunctionTypeMirror(const AbstractType& type) {
   ASSERT(type.IsFunctionType());
-  const Class& cls = Class::Handle(FunctionType::Cast(type).scope_class());
-  const Function& func = Function::Handle(FunctionType::Cast(type).signature());
+  const Class& cls = Class::Handle(Type::Cast(type).type_class());
+  const Function& func = Function::Handle(Type::Cast(type).signature());
   const Array& args = Array::Handle(Array::New(3));
   args.SetAt(0, MirrorReference::Handle(MirrorReference::New(cls)));
   args.SetAt(1, MirrorReference::Handle(MirrorReference::New(func)));
@@ -333,12 +333,6 @@
     return CreateTypedefMirror(cls, type, is_declaration, owner_mirror);
   }
 
-  const Error& error = Error::Handle(cls.EnsureIsFinalized(Thread::Current()));
-  if (!error.IsNull()) {
-    Exceptions::PropagateError(error);
-    UNREACHABLE();
-  }
-
   const Array& args = Array::Handle(Array::New(9));
   args.SetAt(0, MirrorReference::Handle(MirrorReference::New(cls)));
   args.SetAt(1, type);
@@ -543,8 +537,7 @@
   ASSERT(type.IsCanonical() || type.IsTypeParameter() || type.IsBoundedType());
 
   if (type.IsFunctionType()) {
-    const Class& scope_class =
-        Class::Handle(FunctionType::Cast(type).scope_class());
+    const Class& scope_class = Class::Handle(Type::Cast(type).type_class());
     if (scope_class.IsTypedefClass()) {
       return CreateTypedefMirror(scope_class,
                                  type, Bool::False(), Object::null_instance());
@@ -724,7 +717,8 @@
                                       const String& getter_name,
                                       const bool throw_nsm_if_absent) {
   // Note static fields do not have implicit getters.
-  const Field& field = Field::Handle(klass.LookupStaticField(getter_name));
+  const Field& field =
+      Field::Handle(klass.LookupStaticField(getter_name));
   if (field.IsNull() || field.IsUninitialized()) {
     const String& internal_getter_name = String::Handle(
         Field::GetterName(getter_name));
@@ -826,7 +820,7 @@
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
   PROPAGATE_IF_MALFORMED(type);
   ASSERT(type.IsFinalized());
-  ASSERT(type.IsFunctionType() || type.HasResolvedTypeClass());
+  ASSERT(type.HasResolvedTypeClass());
   const Class& cls = Class::Handle(type.type_class());
   ASSERT(!cls.IsNull());
   if (cls.IsDynamicClass() || cls.IsVoidClass() || cls.IsTypedefClass()) {
@@ -1285,8 +1279,9 @@
 }
 
 DEFINE_NATIVE_ENTRY(TypedefMirror_declaration, 1) {
-  GET_NON_NULL_NATIVE_ARGUMENT(FunctionType, type, arguments->NativeArgAt(0));
-  const Class& cls = Class::Handle(type.scope_class());
+  GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0));
+  ASSERT(type.IsFunctionType());
+  const Class& cls = Class::Handle(type.type_class());
   ASSERT(cls.IsTypedefClass());
   return CreateTypedefMirror(cls,
                              AbstractType::Handle(cls.DeclarationType()),
@@ -1305,26 +1300,26 @@
   GET_NON_NULL_NATIVE_ARGUMENT(Array, arg_names, arguments->NativeArgAt(4));
 
   Class& klass = Class::Handle(reflectee.clazz());
-  Function& function = Function::Handle(
-      Resolver::ResolveDynamicAnyArgs(klass, function_name));
+  Function& function = Function::Handle(zone,
+      Resolver::ResolveDynamicAnyArgs(zone, klass, function_name));
 
   const Array& args_descriptor =
-      Array::Handle(ArgumentsDescriptor::New(args.Length(), arg_names));
+      Array::Handle(zone, ArgumentsDescriptor::New(args.Length(), arg_names));
 
   if (function.IsNull()) {
     // Didn't find a method: try to find a getter and invoke call on its result.
     const String& getter_name =
-        String::Handle(Field::GetterName(function_name));
-    function = Resolver::ResolveDynamicAnyArgs(klass, getter_name);
+        String::Handle(zone, Field::GetterName(function_name));
+    function = Resolver::ResolveDynamicAnyArgs(zone, klass, getter_name);
     if (!function.IsNull()) {
       ASSERT(function.kind() != RawFunction::kMethodExtractor);
       // Invoke the getter.
       const int kNumArgs = 1;
-      const Array& getter_args = Array::Handle(Array::New(kNumArgs));
+      const Array& getter_args = Array::Handle(zone, Array::New(kNumArgs));
       getter_args.SetAt(0, reflectee);
       const Array& getter_args_descriptor =
-          Array::Handle(ArgumentsDescriptor::New(getter_args.Length()));
-      const Instance& getter_result = Instance::Handle(
+          Array::Handle(zone, ArgumentsDescriptor::New(getter_args.Length()));
+      const Instance& getter_result = Instance::Handle(zone,
           InvokeDynamicFunction(reflectee,
                                 function,
                                 getter_name,
@@ -1334,7 +1329,7 @@
       args.SetAt(0, getter_result);
       // Call the closure.
       const Object& call_result =
-          Object::Handle(DartEntry::InvokeClosure(args, args_descriptor));
+          Object::Handle(zone, DartEntry::InvokeClosure(args, args_descriptor));
       if (call_result.IsError()) {
         Exceptions::PropagateError(Error::Cast(call_result));
         UNREACHABLE();
@@ -1362,24 +1357,24 @@
 
   const String& internal_getter_name = String::Handle(
       Field::GetterName(getter_name));
-  Function& function = Function::Handle(
-      Resolver::ResolveDynamicAnyArgs(klass, internal_getter_name));
+  Function& function = Function::Handle(zone,
+      Resolver::ResolveDynamicAnyArgs(zone, klass, internal_getter_name));
 
   // Check for method extraction when method extractors are not created.
   if (function.IsNull() && !FLAG_lazy_dispatchers) {
-    function = Resolver::ResolveDynamicAnyArgs(klass, getter_name);
+    function = Resolver::ResolveDynamicAnyArgs(zone, klass, getter_name);
     if (!function.IsNull()) {
       const Function& closure_function =
-        Function::Handle(function.ImplicitClosureFunction());
+        Function::Handle(zone, function.ImplicitClosureFunction());
       return closure_function.ImplicitInstanceClosure(reflectee);
     }
   }
 
   const int kNumArgs = 1;
-  const Array& args = Array::Handle(Array::New(kNumArgs));
+  const Array& args = Array::Handle(zone, Array::New(kNumArgs));
   args.SetAt(0, reflectee);
   const Array& args_descriptor =
-      Array::Handle(ArgumentsDescriptor::New(args.Length()));
+      Array::Handle(zone, ArgumentsDescriptor::New(args.Length()));
 
   // InvokeDynamic invokes NoSuchMethod if the provided function is null.
   return InvokeDynamicFunction(reflectee,
@@ -1398,18 +1393,18 @@
   GET_NON_NULL_NATIVE_ARGUMENT(String, setter_name, arguments->NativeArgAt(2));
   GET_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(3));
 
-  const Class& klass = Class::Handle(reflectee.clazz());
+  const Class& klass = Class::Handle(zone, reflectee.clazz());
   const String& internal_setter_name =
-      String::Handle(Field::SetterName(setter_name));
-  const Function& setter = Function::Handle(
-      Resolver::ResolveDynamicAnyArgs(klass, internal_setter_name));
+      String::Handle(zone, Field::SetterName(setter_name));
+  const Function& setter = Function::Handle(zone,
+      Resolver::ResolveDynamicAnyArgs(zone, klass, internal_setter_name));
 
   const int kNumArgs = 2;
-  const Array& args = Array::Handle(Array::New(kNumArgs));
+  const Array& args = Array::Handle(zone, Array::New(kNumArgs));
   args.SetAt(0, reflectee);
   args.SetAt(1, value);
   const Array& args_descriptor =
-      Array::Handle(ArgumentsDescriptor::New(args.Length()));
+      Array::Handle(zone, ArgumentsDescriptor::New(args.Length()));
 
   return InvokeDynamicFunction(reflectee,
                                setter,
@@ -1471,6 +1466,12 @@
   GET_NON_NULL_NATIVE_ARGUMENT(Array, args, arguments->NativeArgAt(3));
   GET_NON_NULL_NATIVE_ARGUMENT(Array, arg_names, arguments->NativeArgAt(4));
 
+  const Error& error = Error::Handle(zone, klass.EnsureIsFinalized(thread));
+  if (!error.IsNull()) {
+    Exceptions::PropagateError(error);
+    UNREACHABLE();
+  }
+
   Function& function = Function::Handle(
       klass.LookupStaticFunction(function_name));
 
@@ -1543,6 +1544,11 @@
   // with its cousins.
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
   const Class& klass = Class::Handle(ref.GetClassReferent());
+  const Error& error = Error::Handle(zone, klass.EnsureIsFinalized(thread));
+  if (!error.IsNull()) {
+    Exceptions::PropagateError(error);
+    UNREACHABLE();
+  }
   GET_NON_NULL_NATIVE_ARGUMENT(String, getter_name, arguments->NativeArgAt(2));
   return InvokeClassGetter(klass, getter_name, true);
 }
@@ -1557,8 +1563,15 @@
   GET_NON_NULL_NATIVE_ARGUMENT(String, setter_name, arguments->NativeArgAt(2));
   GET_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(3));
 
+  const Error& error = Error::Handle(zone, klass.EnsureIsFinalized(thread));
+  if (!error.IsNull()) {
+    Exceptions::PropagateError(error);
+    UNREACHABLE();
+  }
+
   // Check for real fields and user-defined setters.
-  const Field& field = Field::Handle(klass.LookupStaticField(setter_name));
+  const Field& field =
+      Field::Handle(klass.LookupStaticField(setter_name));
   Function& setter = Function::Handle();
   const String& internal_setter_name = String::Handle(
       Field::SetterName(setter_name));
@@ -1616,6 +1629,12 @@
   GET_NON_NULL_NATIVE_ARGUMENT(Array, explicit_args, arguments->NativeArgAt(3));
   GET_NON_NULL_NATIVE_ARGUMENT(Array, arg_names, arguments->NativeArgAt(4));
 
+  const Error& error = Error::Handle(zone, klass.EnsureIsFinalized(thread));
+  if (!error.IsNull()) {
+    Exceptions::PropagateError(error);
+    UNREACHABLE();
+  }
+
   // By convention, the static function implementing a named constructor 'C'
   // for class 'A' is labeled 'A.C', and the static function implementing the
   // unnamed constructor for class 'A' is labeled 'A.'.
@@ -2043,20 +2062,21 @@
 
 
 DEFINE_NATIVE_ENTRY(TypedefMirror_referent, 1) {
-  GET_NON_NULL_NATIVE_ARGUMENT(FunctionType, type, arguments->NativeArgAt(0));
-  const Class& cls = Class::Handle(type.scope_class());
+  GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0));
+  ASSERT(type.IsFunctionType());
+  const Class& cls = Class::Handle(type.type_class());
   ASSERT(cls.IsTypedefClass());
   const Function& sig_func = Function::Handle(cls.signature_function());
-  FunctionType& referent_type = FunctionType::Handle(sig_func.SignatureType());
+  Type& referent_type = Type::Handle(sig_func.SignatureType());
   // If the scope class of the function type is not generic, replace it with
   // Closure class (Function::SignatureType() keeps it).
-  ASSERT(cls.raw() == referent_type.scope_class());
+  ASSERT(cls.raw() == referent_type.type_class());
   if (!cls.IsGeneric()) {
-    referent_type = FunctionType::New(
+    referent_type = Type::New(
         Class::Handle(Isolate::Current()->object_store()->closure_class()),
         TypeArguments::Handle(referent_type.arguments()),
-        sig_func,
         referent_type.token_pos());
+    referent_type.set_signature(sig_func);
     referent_type ^= ClassFinalizer::FinalizeType(
         cls, referent_type, ClassFinalizer::kCanonicalize);
   }
diff --git a/runtime/lib/null_patch.dart b/runtime/lib/null_patch.dart
index fb117d1..61972d1 100644
--- a/runtime/lib/null_patch.dart
+++ b/runtime/lib/null_patch.dart
@@ -7,13 +7,12 @@
 patch class Null {
 
   factory Null._uninstantiable() {
-    throw new UnsupportedError(
-        "class Null cannot be instantiated");
+    throw new UnsupportedError("class Null cannot be instantiated");
   }
 
-  int get _identityHashCode {
-    return 2011;  // The year Dart was announced and a prime.
-  }
+  static const _HASH_CODE = 2011; // The year Dart was announced and a prime.
+  int get _identityHashCode => _HASH_CODE;
+  int get hashCode => _HASH_CODE;
 
   String toString() {
     return 'null';
diff --git a/runtime/lib/num.cc b/runtime/lib/num.cc
deleted file mode 100644
index 8004c8c..0000000
--- a/runtime/lib/num.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "vm/bootstrap_natives.h"
-
-#include "vm/native_entry.h"
-#include "vm/object.h"
-
-namespace dart {
-
-DEFINE_NATIVE_ENTRY(Num_toString, 1) {
-  const Number& number = Number::CheckedHandle(arguments->NativeArgAt(0));
-  Heap::Space space = isolate->heap()->ShouldPretenure(kOneByteStringCid) ?
-      Heap::kPretenured : Heap::kNew;
-  return number.ToString(space);
-}
-
-}  // namespace dart
diff --git a/runtime/lib/num.dart b/runtime/lib/num.dart
deleted file mode 100644
index 7d67213..0000000
--- a/runtime/lib/num.dart
+++ /dev/null
@@ -1,9 +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.
-
-abstract class _Num implements num {
-
-  /* patch */ String toString() native "Num_toString";
-
-}
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index 09e4808..b450038 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -138,10 +138,11 @@
     const char* result_str = is_instance_of ? "true" : "false";
     OS::Print("Native Object.instanceOf: result %s\n", result_str);
     const AbstractType& instance_type =
-        AbstractType::Handle(instance.GetType());
+        AbstractType::Handle(zone, instance.GetType());
     OS::Print("  instance type: %s\n",
-              String::Handle(instance_type.Name()).ToCString());
-    OS::Print("  test type: %s\n", String::Handle(type.Name()).ToCString());
+              String::Handle(zone, instance_type.Name()).ToCString());
+    OS::Print("  test type: %s\n",
+              String::Handle(zone, type.Name()).ToCString());
     if (!bound_error.IsNull()) {
       OS::Print("  bound error: %s\n", bound_error.ToErrorCString());
     }
@@ -155,7 +156,7 @@
     String& bound_error_message = String::Handle(
         zone, String::New(bound_error.ToErrorCString()));
     Exceptions::CreateAndThrowTypeError(
-        location, Symbols::Empty(), Symbols::Empty(),
+        location, AbstractType::Handle(zone), AbstractType::Handle(zone),
         Symbols::Empty(), bound_error_message);
     UNREACHABLE();
   }
@@ -224,15 +225,16 @@
 
 
 DEFINE_NATIVE_ENTRY(Object_as, 3) {
-  const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
+  const Instance& instance =
+      Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   const TypeArguments& instantiator_type_arguments =
-      TypeArguments::CheckedHandle(arguments->NativeArgAt(1));
-  const AbstractType& type =
-      AbstractType::CheckedHandle(arguments->NativeArgAt(2));
+      TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(1));
+  AbstractType& type =
+      AbstractType::CheckedHandle(zone, arguments->NativeArgAt(2));
   ASSERT(type.IsFinalized());
   ASSERT(!type.IsMalformed());
   ASSERT(!type.IsMalbounded());
-  Error& bound_error = Error::Handle();
+  Error& bound_error = Error::Handle(zone);
   if (instance.IsNull()) {
     return instance.raw();
   }
@@ -243,10 +245,11 @@
     const char* result_str = is_instance_of ? "true" : "false";
     OS::Print("Object.as: result %s\n", result_str);
     const AbstractType& instance_type =
-        AbstractType::Handle(instance.GetType());
+        AbstractType::Handle(zone, instance.GetType());
     OS::Print("  instance type: %s\n",
-              String::Handle(instance_type.Name()).ToCString());
-    OS::Print("  cast type: %s\n", String::Handle(type.Name()).ToCString());
+              String::Handle(zone, instance_type.Name()).ToCString());
+    OS::Print("  cast type: %s\n",
+              String::Handle(zone, type.Name()).ToCString());
     if (!bound_error.IsNull()) {
       OS::Print("  bound error: %s\n", bound_error.ToErrorCString());
     }
@@ -257,33 +260,23 @@
     ASSERT(caller_frame != NULL);
     const TokenPosition location = caller_frame->GetTokenPos();
     const AbstractType& instance_type =
-        AbstractType::Handle(instance.GetType());
-    const String& instance_type_name =
-        String::Handle(instance_type.UserVisibleName());
-    String& type_name = String::Handle();
+        AbstractType::Handle(zone, instance.GetType());
     if (!type.IsInstantiated()) {
       // Instantiate type before reporting the error.
-      const AbstractType& instantiated_type = AbstractType::Handle(
-          type.InstantiateFrom(instantiator_type_arguments, NULL,
-                               NULL, NULL, Heap::kNew));
-      // Note that instantiated_type may be malformed.
-      type_name = instantiated_type.UserVisibleName();
-    } else {
-      type_name = type.UserVisibleName();
+      type = type.InstantiateFrom(instantiator_type_arguments, NULL,
+                                  NULL, NULL, Heap::kNew);
+      // Note that the instantiated type may be malformed.
     }
-    String& bound_error_message =  String::Handle();
     if (bound_error.IsNull()) {
-      const String& dst_name = String::ZoneHandle(
-          Symbols::New(Exceptions::kCastErrorDstName));
-
       Exceptions::CreateAndThrowTypeError(
-          location, instance_type_name, type_name,
-          dst_name, Object::null_string());
+          location, instance_type, type,
+          Symbols::InTypeCast(), Object::null_string());
     } else {
       ASSERT(isolate->type_checks());
-      bound_error_message = String::New(bound_error.ToErrorCString());
+      const String& bound_error_message =
+          String::Handle(zone, String::New(bound_error.ToErrorCString()));
       Exceptions::CreateAndThrowTypeError(
-          location, instance_type_name, Symbols::Empty(),
+          location, instance_type, AbstractType::Handle(zone),
           Symbols::Empty(), bound_error_message);
     }
     UNREACHABLE();
@@ -294,14 +287,14 @@
 
 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) {
   const AbstractType& type =
-      AbstractType::CheckedHandle(arguments->NativeArgAt(0));
+      AbstractType::CheckedHandle(zone, arguments->NativeArgAt(0));
   return type.UserVisibleName();
 }
 
 
 DEFINE_NATIVE_ENTRY(LibraryPrefix_invalidateDependentCode, 1) {
   const LibraryPrefix& prefix =
-      LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0));
+      LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
   prefix.InvalidateDependentCode();
   return Bool::Get(true).raw();
 }
@@ -309,7 +302,7 @@
 
 DEFINE_NATIVE_ENTRY(LibraryPrefix_load, 1) {
   const LibraryPrefix& prefix =
-      LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0));
+      LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
   bool hasCompleted = prefix.LoadLibrary();
   return Bool::Get(hasCompleted).raw();
 }
@@ -317,19 +310,19 @@
 
 DEFINE_NATIVE_ENTRY(LibraryPrefix_loadError, 1) {
   const LibraryPrefix& prefix =
-      LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0));
+      LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
   // Currently all errors are Dart instances, e.g. I/O errors
   // created by deferred loading code. LanguageErrors from
   // failed loading or finalization attempts are propagated and result
   // in the isolate's death.
-  const Instance& error = Instance::Handle(prefix.LoadError());
+  const Instance& error = Instance::Handle(zone, prefix.LoadError());
   return error.raw();
 }
 
 
 DEFINE_NATIVE_ENTRY(LibraryPrefix_isLoaded, 1) {
   const LibraryPrefix& prefix =
-      LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0));
+      LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Bool::Get(prefix.is_loaded()).raw();
 }
 
diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc
index 47b4245..921a101 100644
--- a/runtime/lib/regexp.cc
+++ b/runtime/lib/regexp.cc
@@ -17,7 +17,7 @@
 DECLARE_FLAG(bool, trace_irregexp);
 
 
-DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_factory, 4) {
+DEFINE_NATIVE_ENTRY(RegExp_factory, 4) {
   ASSERT(TypeArguments::CheckedHandle(arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(String, pattern, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(
@@ -35,37 +35,37 @@
     UNREACHABLE();
   }
 
-  // Create a JSRegExp object containing only the initial parameters.
-  return RegExpEngine::CreateJSRegExp(zone,
-                                      pattern,
-                                      multi_line,
-                                      ignore_case);
+  // Create a RegExp object containing only the initial parameters.
+  return RegExpEngine::CreateRegExp(thread,
+                                    pattern,
+                                    multi_line,
+                                    ignore_case);
 }
 
 
-DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_getPattern, 1) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
+DEFINE_NATIVE_ENTRY(RegExp_getPattern, 1) {
+  const RegExp& regexp = RegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return regexp.pattern();
 }
 
 
-DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_getIsMultiLine, 1) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
+DEFINE_NATIVE_ENTRY(RegExp_getIsMultiLine, 1) {
+  const RegExp& regexp = RegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return Bool::Get(regexp.is_multi_line()).raw();
 }
 
 
-DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_getIsCaseSensitive, 1) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
+DEFINE_NATIVE_ENTRY(RegExp_getIsCaseSensitive, 1) {
+  const RegExp& regexp = RegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return Bool::Get(!regexp.is_ignore_case()).raw();
 }
 
 
-DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_getGroupCount, 1) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
+DEFINE_NATIVE_ENTRY(RegExp_getGroupCount, 1) {
+  const RegExp& regexp = RegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   if (regexp.is_initialized()) {
     return regexp.num_bracket_expressions();
@@ -81,14 +81,14 @@
 }
 
 
-DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_ExecuteMatch, 3) {
-  // This function is intrinsified. See Intrinsifier::JSRegExp_ExecuteMatch.
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
+DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatch, 3) {
+  // This function is intrinsified. See Intrinsifier::RegExp_ExecuteMatch.
+  const RegExp& regexp = RegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(String, subject, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, start_index, arguments->NativeArgAt(2));
 
-  if (FLAG_interpret_irregexp) {
+  if (FLAG_interpret_irregexp || FLAG_precompiled_runtime) {
     return BytecodeRegExpMacroAssembler::Interpret(regexp, subject, start_index,
                                                    zone);
   }
diff --git a/runtime/lib/regexp_patch.dart b/runtime/lib/regexp_patch.dart
index 118b875..d8e622a 100644
--- a/runtime/lib/regexp_patch.dart
+++ b/runtime/lib/regexp_patch.dart
@@ -8,19 +8,19 @@
   /* patch */ factory RegExp(String source,
                              {bool multiLine: false,
                               bool caseSensitive: true}) {
-    _JSSyntaxRegExpHashKey key = new _JSSyntaxRegExpHashKey(
+    _RegExpHashKey key = new _RegExpHashKey(
         source, multiLine, caseSensitive);
-    _JSSyntaxRegExpHashValue value = _cache[key];
+    _RegExpHashValue value = _cache[key];
 
     if (value == null) {
       if (_cache.length > _MAX_CACHE_SIZE) {
-        _JSSyntaxRegExpHashKey lastKey = _recentlyUsed.last;
+        _RegExpHashKey lastKey = _recentlyUsed.last;
         lastKey.unlink();
         _cache.remove(lastKey);
       }
 
-      value = new _JSSyntaxRegExpHashValue(
-          new _JSSyntaxRegExp(source,
+      value = new _RegExpHashValue(
+          new _RegExp(source,
                               multiLine: multiLine,
                               caseSensitive: caseSensitive),
           key);
@@ -47,24 +47,24 @@
   // TODO(zerny): Use self-sizing cache similar to _AccessorCache in
   // mirrors_impl.dart.
   static const int _MAX_CACHE_SIZE = 256;
-  static final Map<_JSSyntaxRegExpHashKey, _JSSyntaxRegExpHashValue> _cache =
-      new HashMap<_JSSyntaxRegExpHashKey, _JSSyntaxRegExpHashValue>();
-  static final LinkedList<_JSSyntaxRegExpHashKey> _recentlyUsed =
-      new LinkedList<_JSSyntaxRegExpHashKey>();
+  static final Map<_RegExpHashKey, _RegExpHashValue> _cache =
+      new HashMap<_RegExpHashKey, _RegExpHashValue>();
+  static final LinkedList<_RegExpHashKey> _recentlyUsed =
+      new LinkedList<_RegExpHashKey>();
 }
 
 
 // Represents both a key in the regular expression cache as well as its
 // corresponding entry in the LRU list.
-class _JSSyntaxRegExpHashKey extends LinkedListEntry<_JSSyntaxRegExpHashKey> {
+class _RegExpHashKey extends LinkedListEntry<_RegExpHashKey> {
   final String pattern;
   final bool multiLine;
   final bool caseSensitive;
 
-  _JSSyntaxRegExpHashKey(this.pattern, this.multiLine, this.caseSensitive);
+  _RegExpHashKey(this.pattern, this.multiLine, this.caseSensitive);
 
   int get hashCode => pattern.hashCode;
-  bool operator==(_JSSyntaxRegExpHashKey that) {
+  bool operator==(_RegExpHashKey that) {
     return (this.pattern == that.pattern) &&
            (this.multiLine == that.multiLine) &&
            (this.caseSensitive == that.caseSensitive);
@@ -74,16 +74,16 @@
 
 // Represents a value in the regular expression cache. Contains a pointer
 // back to the key in order to access the corresponding LRU entry.
-class _JSSyntaxRegExpHashValue {
-  final _JSSyntaxRegExp regexp;
-  final _JSSyntaxRegExpHashKey key;
+class _RegExpHashValue {
+  final _RegExp regexp;
+  final _RegExpHashKey key;
 
-  _JSSyntaxRegExpHashValue(this.regexp, this.key);
+  _RegExpHashValue(this.regexp, this.key);
 }
 
 
-class _JSRegExpMatch implements Match {
-  _JSRegExpMatch(this._regexp, this.input, this._match);
+class _RegExpMatch implements Match {
+  _RegExpMatch(this._regexp, this.input, this._match);
 
   int get start => _start(0);
   int get end => _end(0);
@@ -132,11 +132,11 @@
 }
 
 
-class _JSSyntaxRegExp implements RegExp {
-  factory _JSSyntaxRegExp(
+class _RegExp implements RegExp {
+  factory _RegExp(
       String pattern,
       {bool multiLine: false,
-       bool caseSensitive: true}) native "JSSyntaxRegExp_factory";
+       bool caseSensitive: true}) native "RegExp_factory";
 
   Match firstMatch(String str) {
     if (str is! String) throw new ArgumentError(str);
@@ -144,7 +144,7 @@
     if (match == null) {
       return null;
     }
-    return new _JSRegExpMatch(this, str, match);
+    return new _RegExpMatch(this, str, match);
   }
 
   Iterable<Match> allMatches(String string, [int start = 0]) {
@@ -167,7 +167,7 @@
     List<int> list = _ExecuteMatch(string, start);
     if (list == null) return null;
     if (list[0] != start) return null;
-    return new _JSRegExpMatch(this, string, list);
+    return new _RegExpMatch(this, string, list);
   }
 
   bool hasMatch(String str) {
@@ -185,13 +185,13 @@
     return str._substringUnchecked(match[0], match[1]);
   }
 
-  String get pattern native "JSSyntaxRegExp_getPattern";
+  String get pattern native "RegExp_getPattern";
 
-  bool get isMultiLine native "JSSyntaxRegExp_getIsMultiLine";
+  bool get isMultiLine native "RegExp_getIsMultiLine";
 
-  bool get isCaseSensitive native "JSSyntaxRegExp_getIsCaseSensitive";
+  bool get isCaseSensitive native "RegExp_getIsCaseSensitive";
 
-  int get _groupCount native "JSSyntaxRegExp_getGroupCount";
+  int get _groupCount native "RegExp_getGroupCount";
 
   // Byte map of one byte characters with a 0xff if the character is a word
   // character (digit, letter or underscore) and 0x00 otherwise.
@@ -239,11 +239,11 @@
   ];
 
   List _ExecuteMatch(String str, int start_index)
-      native "JSSyntaxRegExp_ExecuteMatch";
+      native "RegExp_ExecuteMatch";
 }
 
 class _AllMatchesIterable extends IterableBase<Match> {
-  final _JSSyntaxRegExp _re;
+  final _RegExp _re;
   final String _str;
   final int _start;
 
@@ -255,7 +255,7 @@
 class _AllMatchesIterator implements Iterator<Match> {
   final String _str;
   int _nextIndex;
-  _JSSyntaxRegExp _re;
+  _RegExp _re;
   Match _current;
 
   _AllMatchesIterator(this._re, this._str, this._nextIndex);
@@ -267,7 +267,7 @@
     if (_nextIndex <= _str.length) {
       var match = _re._ExecuteMatch(_str, _nextIndex);
       if (match != null) {
-        _current = new _JSRegExpMatch(_re, _str, match);
+        _current = new _RegExpMatch(_re, _str, match);
         _nextIndex = _current.end;
         if (_nextIndex == _current.start) {
           // Zero-width match. Advance by one more.
diff --git a/runtime/lib/string.cc b/runtime/lib/string.cc
index 2821146..9313ce1 100644
--- a/runtime/lib/string.cc
+++ b/runtime/lib/string.cc
@@ -22,7 +22,7 @@
   const String& env_value =
       String::Handle(Api::GetEnvironmentValue(thread, name));
   if (!env_value.IsNull()) {
-    return Symbols::New(env_value);
+    return Symbols::New(thread, env_value);
   }
   return default_value.raw();
 }
@@ -524,7 +524,7 @@
   const String& receiver = String::CheckedHandle(arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, index, arguments->NativeArgAt(1));
   uint16_t value = StringValueAt(receiver, index);
-  return Symbols::FromCharCode(static_cast<int32_t>(value));
+  return Symbols::FromCharCode(thread, static_cast<int32_t>(value));
 }
 
 
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index eb1a2a2..f7aa83c 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -47,7 +47,7 @@
  * [_StringBase] contains common methods used by concrete String
  * implementations, e.g., _OneByteString.
  */
-class _StringBase {
+abstract class _StringBase {
   // Constants used by replaceAll encoding of string slices between matches.
   // A string slice (start+length) is encoded in a single Smi to save memory
   // overhead in the common case.
@@ -801,6 +801,7 @@
 
   // Convert single object to string.
   static String _interpolateSingle(Object o) {
+    if (o is String) return o;
     final s = o.toString();
     if (s is! String) {
       throw new ArgumentError(s);
diff --git a/runtime/lib/timeline.cc b/runtime/lib/timeline.cc
index ddc2f5a..df36a25 100644
--- a/runtime/lib/timeline.cc
+++ b/runtime/lib/timeline.cc
@@ -53,7 +53,7 @@
     return Object::null();
   }
 
-  TimelineEvent* event = isolate->GetDartStream()->StartEvent();
+  TimelineEvent* event = Timeline::GetDartStream()->StartEvent();
   if (event == NULL) {
     // Stream was turned off.
     return Object::null();
@@ -118,7 +118,7 @@
     return Object::null();
   }
 
-  TimelineEvent* event = isolate->GetDartStream()->StartEvent();
+  TimelineEvent* event = Timeline::GetDartStream()->StartEvent();
   if (event == NULL) {
     // Stream was turned off.
     return Object::null();
@@ -163,7 +163,7 @@
     return Object::null();
   }
 
-  TimelineEvent* event = isolate->GetDartStream()->StartEvent();
+  TimelineEvent* event = Timeline::GetDartStream()->StartEvent();
   if (event == NULL) {
     // Stream was turned off.
     return Object::null();
diff --git a/runtime/lib/type_patch.dart b/runtime/lib/type_patch.dart
index 5d0f305..67d7db5 100644
--- a/runtime/lib/type_patch.dart
+++ b/runtime/lib/type_patch.dart
@@ -13,10 +13,6 @@
 class _Type extends _AbstractType {
 }
 
-// Equivalent of RawFunctionType.
-class _FunctionType extends _AbstractType {
-}
-
 // Equivalent of RawTypeRef.
 class _TypeRef extends _AbstractType {
 }
diff --git a/runtime/lib/typed_data.cc b/runtime/lib/typed_data.cc
index 28b8147..8d39988 100644
--- a/runtime/lib/typed_data.cc
+++ b/runtime/lib/typed_data.cc
@@ -163,9 +163,10 @@
 // array based on available physical addressable memory on the system. The
 // maximum possible length is a scaled value of kSmiMax which is set up based
 // on whether the underlying architecture is 32-bit or 64-bit.
+// Argument 0 is type arguments and is ignored.
 #define TYPED_DATA_NEW(name)                                                   \
-DEFINE_NATIVE_ENTRY(TypedData_##name##_new, 1) {                               \
-  GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));        \
+DEFINE_NATIVE_ENTRY(TypedData_##name##_new, 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);                                  \
@@ -178,10 +179,11 @@
 // array based on available physical addressable memory on the system. The
 // maximum possible length is a scaled value of kSmiMax which is set up based
 // on whether the underlying architecture is 32-bit or 64-bit.
+// Argument 0 is type arguments and is ignored.
 #define EXT_TYPED_DATA_NEW(name)                                               \
-DEFINE_NATIVE_ENTRY(ExternalTypedData_##name##_new, 1) {                       \
+DEFINE_NATIVE_ENTRY(ExternalTypedData_##name##_new, 2) {                       \
   const int kAlignment = 16;                                                   \
-  GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));        \
+  GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(1));        \
   intptr_t cid = kExternalTypedData##name##Cid;                                \
   intptr_t len = length.Value();                                               \
   intptr_t max = ExternalTypedData::MaxElements(cid);                          \
diff --git a/runtime/lib/typed_data.dart b/runtime/lib/typed_data.dart
index a56c39f..c4b532f 100644
--- a/runtime/lib/typed_data.dart
+++ b/runtime/lib/typed_data.dart
@@ -2,233 +2,84 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// patch classes for Int8List ..... Float64List and ByteData implementations.
+library dart.typed_data;
 
 import "dart:_internal";
+import "dart:collection" show ListBase;
 import 'dart:math' show Random;
 
-patch class Int8List {
-  /* patch */ factory Int8List(int length) {
-    return new _Int8Array(length);
-  }
+/**
+ * A typed view of a sequence of bytes.
+ */
+abstract class TypedData {
+  /**
+   * Returns the number of bytes in the representation of each element in this
+   * list.
+   */
+  int get elementSizeInBytes;
 
-  /* patch */ factory Int8List.fromList(List<int> elements) {
-    return new _Int8Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
+  /**
+   * Returns the offset in bytes into the underlying byte buffer of this view.
+   */
+  int get offsetInBytes;
+
+  /**
+   * Returns the length of this view, in bytes.
+   */
+  int get lengthInBytes;
+
+  /**
+   * Returns the byte buffer associated with this object.
+   */
+  ByteBuffer get buffer;
 }
 
 
-patch class Uint8List {
-  /* patch */ factory Uint8List(int length) {
-    return new _Uint8Array(length);
-  }
+/**
+ * Describes endianness to be used when accessing or updating a
+ * sequence of bytes.
+ */
+class Endianness {
+  const Endianness._(this._littleEndian);
 
-  /* patch */ factory Uint8List.fromList(List<int> elements) {
-    return new _Uint8Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
+  static const Endianness BIG_ENDIAN = const Endianness._(false);
+  static const Endianness LITTLE_ENDIAN = const Endianness._(true);
+  static final Endianness HOST_ENDIAN =
+    (new ByteData.view(new Uint16List.fromList([1]).buffer)).getInt8(0) == 1 ?
+    LITTLE_ENDIAN : BIG_ENDIAN;
+
+  final bool _littleEndian;
 }
 
 
-patch class Uint8ClampedList {
-  /* patch */ factory Uint8ClampedList(int length) {
-    return new _Uint8ClampedArray(length);
-  }
-
-  /* patch */ factory Uint8ClampedList.fromList(List<int> elements) {
-    return new _Uint8ClampedArray(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Int16List {
-  /* patch */ factory Int16List(int length) {
-    return new _Int16Array(length);
-  }
-
-  /* patch */ factory Int16List.fromList(List<int> elements) {
-    return new _Int16Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Uint16List {
-  /* patch */ factory Uint16List(int length) {
-    return new _Uint16Array(length);
-  }
-
-  /* patch */ factory Uint16List.fromList(List<int> elements) {
-    return new _Uint16Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Int32List {
-  /* patch */ factory Int32List(int length) {
-    return new _Int32Array(length);
-  }
-
-  /* patch */ factory Int32List.fromList(List<int> elements) {
-    return new _Int32Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Uint32List {
-  /* patch */ factory Uint32List(int length) {
-    return new _Uint32Array(length);
-  }
-
-  /* patch */ factory Uint32List.fromList(List<int> elements) {
-    return new _Uint32Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Int64List {
-  /* patch */ factory Int64List(int length) {
-    return new _Int64Array(length);
-  }
-
-  /* patch */ factory Int64List.fromList(List<int> elements) {
-    return new _Int64Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Uint64List {
-  /* patch */ factory Uint64List(int length) {
-    return new _Uint64Array(length);
-  }
-
-  /* patch */ factory Uint64List.fromList(List<int> elements) {
-    return new _Uint64Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Float32List {
-  /* patch */ factory Float32List(int length) {
-    return new _Float32Array(length);
-  }
-
-  /* patch */ factory Float32List.fromList(List<double> elements) {
-    return new _Float32Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Float64List {
-  /* patch */ factory Float64List(int length) {
-    return new _Float64Array(length);
-  }
-
-  /* patch */ factory Float64List.fromList(List<double> elements) {
-    return new _Float64Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Float32x4List {
-  /* patch */ factory Float32x4List(int length) {
-    return new _Float32x4Array(length);
-  }
-
-  /* patch */ factory Float32x4List.fromList(List<Float32x4> elements) {
-    return new _Float32x4Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Int32x4List {
-  /* patch */ factory Int32x4List(int length) {
-    return new _Int32x4Array(length);
-  }
-
-  /* patch */ factory Int32x4List.fromList(List<Int32x4> elements) {
-    return new _Int32x4Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-
-}
-
-patch class Float64x2List {
-  /* patch */ factory Float64x2List(int length) {
-    return new _Float64x2Array(length);
-  }
-
-  /* patch */ factory Float64x2List.fromList(List<Float64x2> elements) {
-    return new _Float64x2Array(elements.length)
-        ..setRange(0, elements.length, elements);
-  }
-}
-
-
-patch class Float32x4 {
-  /* patch */ factory Float32x4(double x, double y, double z, double w) {
-    return new _Float32x4(x, y, z, w);
-  }
-  /* patch */ factory Float32x4.splat(double v) {
-    return new _Float32x4.splat(v);
-  }
-  /* patch */ factory Float32x4.zero() {
-    return new _Float32x4.zero();
-  }
-  /* patch */ factory Float32x4.fromInt32x4Bits(Int32x4 x) {
-    return new _Float32x4.fromInt32x4Bits(x);
-  }
-  /* patch */ factory Float32x4.fromFloat64x2(Float64x2 v) {
-    return new _Float32x4.fromFloat64x2(v);
-  }
-}
-
-
-patch class Int32x4 {
-  /* patch */ factory Int32x4(int x, int y, int z, int w) {
-    return new _Int32x4(x, y, z, w);
-  }
-  /* patch */ factory Int32x4.bool(bool x, bool y, bool z, bool w) {
-    return new _Int32x4.bool(x, y, z, w);
-  }
-  /* patch */ factory Int32x4.fromFloat32x4Bits(Float32x4 x) {
-    return new _Int32x4.fromFloat32x4Bits(x);
-  }
-}
-
-
-patch class Float64x2 {
-  /* patch */ factory Float64x2(double x, double y) {
-    return new _Float64x2(x, y);
-  }
-
-  /* patch */ factory Float64x2.splat(double v) {
-    return new _Float64x2.splat(v);
-  }
-
-  /* patch */ factory Float64x2.zero() {
-    return new _Float64x2.zero();
-  }
-
-  /* patch */ factory Float64x2.fromFloat32x4(Float32x4 v) {
-    return new _Float64x2.fromFloat32x4(v);
-  }
-}
-
-
-patch class ByteData {
-  /* patch */ factory ByteData(int length) {
-    var list = new _Uint8Array(length);
+/**
+ * A fixed-length, random-access sequence of bytes that also provides random
+ * and unaligned access to the fixed-width integers and floating point
+ * numbers represented by those bytes.
+ *
+ * `ByteData` may be used to pack and unpack data from external sources
+ * (such as networks or files systems), and to process large quantities
+ * of numerical data more efficiently than would be possible
+ * with ordinary [List] implementations.
+ * `ByteData` can save space, by eliminating the need for object headers,
+ * and time, by eliminating the need for data copies.
+ * Finally, `ByteData` may be used to intentionally reinterpret the bytes
+ * representing one arithmetic type as another.
+ * For example this code fragment determine what 32-bit signed integer
+ * is represented by the bytes of a 32-bit floating point number:
+ *
+ *     var buffer = new Uint8List(8).buffer;
+ *     var bdata = new ByteData.view(buffer);
+ *     bdata.setFloat32(0, 3.04);
+ *     int huh = bdata.getInt32(0);
+ */
+class ByteData implements TypedData {
+  /**
+   * Creates a [ByteData] of the specified length (in elements), all of
+   * whose bytes are initially zero.
+   */
+  factory ByteData(int length) {
+    var list = new Uint8List(length);
     return new _ByteDataView(list, 0, length);
   }
 
@@ -236,6 +87,292 @@
   factory ByteData._view(TypedData typedData, int offsetInBytes, int length) {
     return new _ByteDataView(typedData, offsetInBytes, length);
   }
+
+  /**
+   * Creates an [ByteData] _view_ of the specified region in [buffer].
+   *
+   * Changes in the [ByteData] will be visible in the byte
+   * buffer and vice versa.
+   * If the [offsetInBytes] index of the region is not specified,
+   * it defaults to zero (the first byte in the byte buffer).
+   * If the length is not specified, it defaults to `null`,
+   * which indicates that the view extends to the end of the byte buffer.
+   *
+   * Throws [RangeError] if [offsetInBytes] or [length] are negative, or
+   * if [offsetInBytes] + ([length] * elementSizeInBytes) is greater than
+   * the length of [buffer].
+   */
+  factory ByteData.view(ByteBuffer buffer,
+                        [int offsetInBytes = 0, int length]) {
+    return buffer.asByteData(offsetInBytes, length);
+  }
+
+  /**
+   * Returns the (possibly negative) integer represented by the byte at the
+   * specified [byteOffset] in this object, in two's complement binary
+   * representation.
+   *
+   * The return value will be between -128 and 127, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * greater than or equal to the length of this object.
+   */
+  int getInt8(int byteOffset);
+
+  /**
+   * Sets the byte at the specified [byteOffset] in this object to the
+   * two's complement binary representation of the specified [value], which
+   * must fit in a single byte.
+   *
+   * In other words, [value] must be between -128 and 127, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * greater than or equal to the length of this object.
+   */
+  void setInt8(int byteOffset, int value);
+
+  /**
+   * Returns the positive integer represented by the byte at the specified
+   * [byteOffset] in this object, in unsigned binary form.
+   *
+   * The return value will be between 0 and 255, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * greater than or equal to the length of this object.
+   */
+  int getUint8(int byteOffset);
+
+  /**
+   * Sets the byte at the specified [byteOffset] in this object to the
+   * unsigned binary representation of the specified [value], which must fit
+   * in a single byte.
+   *
+   * In other words, [value] must be between 0 and 255, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative,
+   * or greater than or equal to the length of this object.
+   */
+  void setUint8(int byteOffset, int value);
+
+  /**
+   * Returns the (possibly negative) integer represented by the two bytes at
+   * the specified [byteOffset] in this object, in two's complement binary
+   * form.
+   *
+   * The return value will be between 2<sup>15</sup> and 2<sup>15</sup> - 1,
+   * inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 2` is greater than the length of this object.
+   */
+  int getInt16(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Sets the two bytes starting at the specified [byteOffset] in this
+   * object to the two's complement binary representation of the specified
+   * [value], which must fit in two bytes.
+   *
+   * In other words, [value] must lie
+   * between 2<sup>15</sup> and 2<sup>15</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 2` is greater than the length of this object.
+   */
+  void setInt16(int byteOffset,
+                int value,
+                [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Returns the positive integer represented by the two bytes starting
+   * at the specified [byteOffset] in this object, in unsigned binary
+   * form.
+   *
+   * The return value will be between 0 and  2<sup>16</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 2` is greater than the length of this object.
+   */
+  int getUint16(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Sets the two bytes starting at the specified [byteOffset] in this object
+   * to the unsigned binary representation of the specified [value],
+   * which must fit in two bytes.
+   *
+   * In other words, [value] must be between
+   * 0 and 2<sup>16</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 2` is greater than the length of this object.
+   */
+  void setUint16(int byteOffset,
+                 int value,
+                 [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Returns the (possibly negative) integer represented by the four bytes at
+   * the specified [byteOffset] in this object, in two's complement binary
+   * form.
+   *
+   * The return value will be between 2<sup>31</sup> and 2<sup>31</sup> - 1,
+   * inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 4` is greater than the length of this object.
+   */
+  int getInt32(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Sets the four bytes starting at the specified [byteOffset] in this
+   * object to the two's complement binary representation of the specified
+   * [value], which must fit in four bytes.
+   *
+   * In other words, [value] must lie
+   * between 2<sup>31</sup> and 2<sup>31</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 4` is greater than the length of this object.
+   */
+  void setInt32(int byteOffset,
+                int value,
+                [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Returns the positive integer represented by the four bytes starting
+   * at the specified [byteOffset] in this object, in unsigned binary
+   * form.
+   *
+   * The return value will be between 0 and  2<sup>32</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 4` is greater than the length of this object.
+   */
+  int getUint32(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Sets the four bytes starting at the specified [byteOffset] in this object
+   * to the unsigned binary representation of the specified [value],
+   * which must fit in four bytes.
+   *
+   * In other words, [value] must be between
+   * 0 and 2<sup>32</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 4` is greater than the length of this object.
+   */
+  void setUint32(int byteOffset,
+                 int value,
+                 [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Returns the (possibly negative) integer represented by the eight bytes at
+   * the specified [byteOffset] in this object, in two's complement binary
+   * form.
+   *
+   * The return value will be between 2<sup>63</sup> and 2<sup>63</sup> - 1,
+   * inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 8` is greater than the length of this object.
+   */
+  int getInt64(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Sets the eight bytes starting at the specified [byteOffset] in this
+   * object to the two's complement binary representation of the specified
+   * [value], which must fit in eight bytes.
+   *
+   * In other words, [value] must lie
+   * between 2<sup>63</sup> and 2<sup>63</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 8` is greater than the length of this object.
+   */
+  void setInt64(int byteOffset,
+                int value,
+                [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Returns the positive integer represented by the eight bytes starting
+   * at the specified [byteOffset] in this object, in unsigned binary
+   * form.
+   *
+   * The return value will be between 0 and  2<sup>64</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 8` is greater than the length of this object.
+   */
+  int getUint64(int byteOffset, [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Sets the eight bytes starting at the specified [byteOffset] in this object
+   * to the unsigned binary representation of the specified [value],
+   * which must fit in eight bytes.
+   *
+   * In other words, [value] must be between
+   * 0 and 2<sup>64</sup> - 1, inclusive.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 8` is greater than the length of this object.
+   */
+  void setUint64(int byteOffset,
+                 int value,
+                 [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Returns the floating point number represented by the four bytes at
+   * the specified [byteOffset] in this object, in IEEE 754
+   * single-precision binary floating-point format (binary32).
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 4` is greater than the length of this object.
+   */
+  double getFloat32(int byteOffset,
+                    [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Sets the four bytes starting at the specified [byteOffset] in this
+   * object to the IEEE 754 single-precision binary floating-point
+   * (binary32) representation of the specified [value].
+   *
+   * **Note that this method can lose precision.** The input [value] is
+   * a 64-bit floating point value, which will be converted to 32-bit
+   * floating point value by IEEE 754 rounding rules before it is stored.
+   * If [value] cannot be represented exactly as a binary32, it will be
+   * converted to the nearest binary32 value.  If two binary32 values are
+   * equally close, the one whose least significant bit is zero will be used.
+   * Note that finite (but large) values can be converted to infinity, and
+   * small non-zero values can be converted to zero.
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 4` is greater than the length of this object.
+   */
+  void setFloat32(int byteOffset,
+                  double value,
+                  [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Returns the floating point number represented by the eight bytes at
+   * the specified [byteOffset] in this object, in IEEE 754
+   * double-precision binary floating-point format (binary64).
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 8` is greater than the length of this object.
+   */
+  double getFloat64(int byteOffset,
+                    [Endianness endian = Endianness.BIG_ENDIAN]);
+
+  /**
+   * Sets the eight bytes starting at the specified [byteOffset] in this
+   * object to the IEEE 754 double-precision binary floating-point
+   * (binary64) representation of the specified [value].
+   *
+   * Throws [RangeError] if [byteOffset] is negative, or
+   * `byteOffset + 8` is greater than the length of this object.
+   */
+  void setFloat64(int byteOffset,
+                  double value,
+                  [Endianness endian = Endianness.BIG_ENDIAN]);
 }
 
 
@@ -711,18 +848,18 @@
 }
 
 
-class _ByteBuffer implements ByteBuffer {
+class ByteBuffer {
   final _TypedList _data;
 
-  _ByteBuffer(this._data);
+  ByteBuffer(this._data);
 
-  factory _ByteBuffer._New(data) => new _ByteBuffer(data);
+  factory ByteBuffer._New(data) => new ByteBuffer(data);
 
   // Forward calls to _data.
   int get lengthInBytes => _data.lengthInBytes;
   int get hashCode => _data.hashCode;
   bool operator==(Object other) =>
-      (other is _ByteBuffer) && identical(_data, other._data);
+      (other is ByteBuffer) && identical(_data, other._data);
 
   ByteData asByteData([int offsetInBytes = 0, int length]) {
     if (length == null) {
@@ -852,7 +989,7 @@
     return length * elementSizeInBytes;
   }
 
-  ByteBuffer get buffer => new _ByteBuffer(this);
+  ByteBuffer get buffer => new ByteBuffer(this);
 
   // Methods implementing the collection interface.
 
@@ -924,13 +1061,20 @@
 }
 
 
-class _Int8Array extends _TypedList with _IntListMixin implements Int8List {
+class Int8List extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Int8Array(int length) {
-    return _new(length);
+  factory Int8List(int length) native "TypedData_Int8Array_new";
+
+  factory Int8List.fromList(List<int> elements) {
+    return new Int8List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Int8List.view(ByteBuffer buffer,
+                        [int offsetInBytes = 0, int length]) {
+    return buffer.asInt8List(offsetInBytes, length);
+  }
 
   // Method(s) implementing List interface.
 
@@ -948,6 +1092,7 @@
     _setInt8(index, _toInt8(value));
   }
 
+  static const int BYTES_PER_ELEMENT = 1;
 
   // Method(s) implementing TypedData interface.
 
@@ -958,21 +1103,26 @@
 
   // Internal utility methods.
 
-  _Int8Array _createList(int length) {
-    return _new(length);
+  Int8List _createList(int length) {
+    return new Int8List(length);
   }
-
-  static _Int8Array _new(int length) native "TypedData_Int8Array_new";
 }
 
 
-class _Uint8Array extends _TypedList with _IntListMixin implements Uint8List {
+class Uint8List extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Uint8Array(int length) {
-    return _new(length);
+  factory Uint8List(int length) native "TypedData_Uint8Array_new";
+
+  factory Uint8List.fromList(List<int> elements) {
+    return new Uint8List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Uint8List.view(ByteBuffer buffer,
+                         [int offsetInBytes = 0, int length]) {
+    return buffer.asUint8List(offsetInBytes, length);
+  }
 
   // Methods implementing List interface.
   int operator[](int index) {
@@ -989,6 +1139,7 @@
     _setUint8(index, _toUint8(value));
   }
 
+  static const int BYTES_PER_ELEMENT = 1;
 
   // Methods implementing TypedData interface.
   int get elementSizeInBytes {
@@ -998,19 +1149,25 @@
 
   // Internal utility methods.
 
-  _Uint8Array _createList(int length) {
-    return _new(length);
+  Uint8List _createList(int length) {
+    return new Uint8List(length);
   }
-
-  static _Uint8Array _new(int length) native "TypedData_Uint8Array_new";
 }
 
 
-class _Uint8ClampedArray extends _TypedList with _IntListMixin implements Uint8ClampedList {
+class Uint8ClampedList extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Uint8ClampedArray(int length) {
-    return _new(length);
+  factory Uint8ClampedList(int length) native "TypedData_Uint8ClampedArray_new";
+
+  factory Uint8ClampedList.fromList(List<int> elements) {
+    return new Uint8ClampedList(elements.length)
+        ..setRange(0, elements.length, elements);
+  }
+
+  factory Uint8ClampedList.view(ByteBuffer buffer,
+                                [int offsetInBytes = 0, int length]) {
+    return buffer.asUint8ClampedList(offsetInBytes, length);
   }
 
   // Methods implementing List interface.
@@ -1029,6 +1186,7 @@
     _setUint8(index, _toClampedUint8(value));
   }
 
+  static const int BYTES_PER_ELEMENT = 1;
 
   // Methods implementing TypedData interface.
   int get elementSizeInBytes {
@@ -1038,22 +1196,26 @@
 
   // Internal utility methods.
 
-  _Uint8ClampedArray _createList(int length) {
-    return _new(length);
+  Uint8ClampedList _createList(int length) {
+    return new Uint8ClampedList(length);
   }
-
-  static _Uint8ClampedArray _new(int length)
-      native "TypedData_Uint8ClampedArray_new";
 }
 
 
-class _Int16Array extends _TypedList with _IntListMixin implements Int16List {
+class Int16List extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Int16Array(int length) {
-    return _new(length);
+  factory Int16List(int length) native "TypedData_Int16Array_new";
+
+  factory Int16List.fromList(List<int> elements) {
+    return new Int16List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Int16List.view(ByteBuffer buffer,
+                         [int offsetInBytes = 0, int length]) {
+    return buffer.asInt16List(offsetInBytes, length);
+  }
 
   // Method(s) implementing List interface.
 
@@ -1083,6 +1245,7 @@
   }
 
   // Method(s) implementing TypedData interface.
+  static const int BYTES_PER_ELEMENT = 2;
 
   int get elementSizeInBytes {
     return Int16List.BYTES_PER_ELEMENT;
@@ -1091,8 +1254,8 @@
 
   // Internal utility methods.
 
-  _Int16Array _createList(int length) {
-    return _new(length);
+  Int16List _createList(int length) {
+    return new Int16List(length);
   }
 
   int _getIndexedInt16(int index) {
@@ -1102,18 +1265,23 @@
   void _setIndexedInt16(int index, int value) {
     _setInt16(index * Int16List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Int16Array _new(int length) native "TypedData_Int16Array_new";
 }
 
 
-class _Uint16Array extends _TypedList with _IntListMixin implements Uint16List {
+class Uint16List extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Uint16Array(int length) {
-    return _new(length);
+  factory Uint16List(int length) native "TypedData_Uint16Array_new";
+
+  factory Uint16List.fromList(List<int> elements) {
+    return new Uint16List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Uint16List.view(ByteBuffer buffer,
+                          [int offsetInBytes = 0, int length]) {
+    return buffer.asUint16List(offsetInBytes, length);
+  }
 
   // Method(s) implementing the List interface.
 
@@ -1143,6 +1311,7 @@
   }
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 2;
 
   int get elementSizeInBytes {
     return Uint16List.BYTES_PER_ELEMENT;
@@ -1151,8 +1320,8 @@
 
   // Internal utility methods.
 
-  _Uint16Array _createList(int length) {
-    return _new(length);
+  Uint16List _createList(int length) {
+    return new Uint16List(length);
   }
 
   int _getIndexedUint16(int index) {
@@ -1162,18 +1331,23 @@
   void _setIndexedUint16(int index, int value) {
     _setUint16(index * Uint16List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Uint16Array _new(int length) native "TypedData_Uint16Array_new";
 }
 
 
-class _Int32Array extends _TypedList with _IntListMixin implements Int32List {
+class Int32List extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Int32Array(int length) {
-    return _new(length);
+  factory Int32List(int length) native "TypedData_Int32Array_new";
+
+  factory Int32List.fromList(List<int> elements) {
+    return new Int32List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Int32List.view(ByteBuffer buffer,
+                         [int offsetInBytes = 0, int length]) {
+    return buffer.asInt32List(offsetInBytes, length);
+  }
 
   // Method(s) implementing the List interface.
 
@@ -1193,6 +1367,7 @@
 
 
   // Method(s) implementing TypedData interface.
+  static const int BYTES_PER_ELEMENT = 4;
 
   int get elementSizeInBytes {
     return Int32List.BYTES_PER_ELEMENT;
@@ -1201,8 +1376,8 @@
 
   // Internal utility methods.
 
-  _Int32Array _createList(int length) {
-    return _new(length);
+  Int32List _createList(int length) {
+    return new Int32List(length);
   }
 
   int _getIndexedInt32(int index) {
@@ -1213,17 +1388,23 @@
     _setInt32(index * Int32List.BYTES_PER_ELEMENT, value);
   }
 
-  static _Int32Array _new(int length) native "TypedData_Int32Array_new";
 }
 
 
-class _Uint32Array extends _TypedList with _IntListMixin implements Uint32List {
+class Uint32List extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Uint32Array(int length) {
-    return _new(length);
+  factory Uint32List(int length) native "TypedData_Uint32Array_new";
+
+  factory Uint32List.fromList(List<int> elements) {
+    return new Uint32List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Uint32List.view(ByteBuffer buffer,
+                          [int offsetInBytes = 0, int length]) {
+    return buffer.asUint32List(offsetInBytes, length);
+  }
 
   // Method(s) implementing the List interface.
 
@@ -1243,6 +1424,7 @@
 
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 4;
 
   int get elementSizeInBytes {
     return Uint32List.BYTES_PER_ELEMENT;
@@ -1251,8 +1433,8 @@
 
   // Internal utility methods.
 
-  _Uint32Array _createList(int length) {
-    return _new(length);
+  Uint32List _createList(int length) {
+    return new Uint32List(length);
   }
 
   int _getIndexedUint32(int index) {
@@ -1262,18 +1444,23 @@
   void _setIndexedUint32(int index, int value) {
     _setUint32(index * Uint32List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Uint32Array _new(int length) native "TypedData_Uint32Array_new";
 }
 
 
-class _Int64Array extends _TypedList with _IntListMixin implements Int64List {
+class Int64List extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Int64Array(int length) {
-    return _new(length);
+  factory Int64List(int length) native "TypedData_Int64Array_new";
+
+  factory Int64List.fromList(List<int> elements) {
+    return new Int64List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Int64List.view(ByteBuffer buffer,
+                         [int offsetInBytes = 0, int length]) {
+    return buffer.asInt64List(offsetInBytes, length);
+  }
 
   // Method(s) implementing the List interface.
 
@@ -1293,6 +1480,7 @@
 
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 8;
 
   int get elementSizeInBytes {
     return Int64List.BYTES_PER_ELEMENT;
@@ -1301,8 +1489,8 @@
 
   // Internal utility methods.
 
-  _Int64Array _createList(int length) {
-    return _new(length);
+  Int64List _createList(int length) {
+    return new Int64List(length);
   }
 
   int _getIndexedInt64(int index) {
@@ -1312,18 +1500,23 @@
   void _setIndexedInt64(int index, int value) {
     _setInt64(index * Int64List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Int64Array _new(int length) native "TypedData_Int64Array_new";
 }
 
 
-class _Uint64Array extends _TypedList with _IntListMixin implements Uint64List {
+class Uint64List extends _TypedList with _IntListMixin implements List<int>, TypedData {
   // Factory constructors.
 
-  factory _Uint64Array(int length) {
-    return _new(length);
+  factory Uint64List(int length) native "TypedData_Uint64Array_new";
+
+  factory Uint64List.fromList(List<int> elements) {
+    return new Uint64List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Uint64List.view(ByteBuffer buffer,
+                          [int offsetInBytes = 0, int length]) {
+    return buffer.asUint64List(offsetInBytes, length);
+  }
 
   // Method(s) implementing the List interface.
 
@@ -1343,6 +1536,7 @@
 
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 8;
 
   int get elementSizeInBytes {
     return Uint64List.BYTES_PER_ELEMENT;
@@ -1351,8 +1545,8 @@
 
   // Internal utility methods.
 
-  _Uint64Array _createList(int length) {
-    return _new(length);
+  Uint64List _createList(int length) {
+    return new Uint64List(length);
   }
 
   int _getIndexedUint64(int index) {
@@ -1362,18 +1556,23 @@
   void _setIndexedUint64(int index, int value) {
     _setUint64(index * Uint64List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Uint64Array _new(int length) native "TypedData_Uint64Array_new";
 }
 
 
-class _Float32Array extends _TypedList with _DoubleListMixin implements Float32List {
+class Float32List extends _TypedList with _DoubleListMixin implements List<double>, TypedData {
   // Factory constructors.
 
-  factory _Float32Array(int length) {
-    return _new(length);
+  factory Float32List(int length) native "TypedData_Float32Array_new";
+
+  factory Float32List.fromList(List<double> elements) {
+    return new Float32List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Float32List.view(ByteBuffer buffer,
+                           [int offsetInBytes = 0, int length]) {
+    return buffer.asFloat32List(offsetInBytes, length);
+  }
 
   // Method(s) implementing the List interface.
 
@@ -1393,6 +1592,7 @@
 
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 4;
 
   int get elementSizeInBytes {
     return Float32List.BYTES_PER_ELEMENT;
@@ -1401,8 +1601,8 @@
 
   // Internal utility methods.
 
-  _Float32Array _createList(int length) {
-    return _new(length);
+  Float32List _createList(int length) {
+    return new Float32List(length);
   }
 
   double _getIndexedFloat32(int index) {
@@ -1412,18 +1612,23 @@
   void _setIndexedFloat32(int index, double value) {
     _setFloat32(index * Float32List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Float32Array _new(int length) native "TypedData_Float32Array_new";
 }
 
 
-class _Float64Array extends _TypedList with _DoubleListMixin implements Float64List {
+class Float64List extends _TypedList with _DoubleListMixin implements List<double>, TypedData {
   // Factory constructors.
 
-  factory _Float64Array(int length) {
-    return _new(length);
+  factory Float64List(int length) native "TypedData_Float64Array_new";
+
+  factory Float64List.fromList(List<double> elements) {
+    return new Float64List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Float64List.view(ByteBuffer buffer,
+                           [int offsetInBytes = 0, int length]) {
+    return buffer.asFloat64List(offsetInBytes, length);
+  }
 
   // Method(s) implementing the List interface.
 
@@ -1443,6 +1648,7 @@
 
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 8;
 
   int get elementSizeInBytes {
     return Float64List.BYTES_PER_ELEMENT;
@@ -1451,8 +1657,8 @@
 
   // Internal utility methods.
 
-  _Float64Array _createList(int length) {
-    return _new(length);
+  Float64List _createList(int length) {
+    return new Float64List(length);
   }
 
   double _getIndexedFloat64(int index) {
@@ -1462,18 +1668,23 @@
   void _setIndexedFloat64(int index, double value) {
     _setFloat64(index * Float64List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Float64Array _new(int length) native "TypedData_Float64Array_new";
 }
 
 
-class _Float32x4Array extends _TypedList with _Float32x4ListMixin implements Float32x4List {
+class Float32x4List extends _TypedList with _Float32x4ListMixin implements List<Float32x4>, TypedData {
   // Factory constructors.
 
-  factory _Float32x4Array(int length) {
-    return _new(length);
+  factory Float32x4List(int length) native "TypedData_Float32x4Array_new";
+
+  factory Float32x4List.fromList(List<Float32x4> elements) {
+    return new Float32x4List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Float32x4List.view(ByteBuffer buffer,
+                             [int offsetInBytes = 0, int length]) {
+    return buffer.asFloat32x4List(offsetInBytes, length);
+  }
 
   Float32x4 operator[](int index) {
     if (index < 0 || index >= length) {
@@ -1491,6 +1702,7 @@
 
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 16;
 
   int get elementSizeInBytes {
     return Float32x4List.BYTES_PER_ELEMENT;
@@ -1499,8 +1711,8 @@
 
   // Internal utility methods.
 
-  _Float32x4Array _createList(int length) {
-    return _new(length);
+  Float32x4List _createList(int length) {
+    return new Float32x4List(length);
   }
 
   Float32x4 _getIndexedFloat32x4(int index) {
@@ -1510,18 +1722,23 @@
   void _setIndexedFloat32x4(int index, Float32x4 value) {
     _setFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Float32x4Array _new(int length) native "TypedData_Float32x4Array_new";
 }
 
 
-class _Int32x4Array extends _TypedList with _Int32x4ListMixin implements Int32x4List {
+class Int32x4List extends _TypedList with _Int32x4ListMixin implements List<Int32x4>, TypedData {
   // Factory constructors.
 
-  factory _Int32x4Array(int length) {
-    return _new(length);
+  factory Int32x4List(int length) native "TypedData_Int32x4Array_new";
+
+  factory Int32x4List.fromList(List<Int32x4> elements) {
+    return new Int32x4List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Int32x4List.view(ByteBuffer buffer,
+                             [int offsetInBytes = 0, int length]) {
+    return buffer.asInt32x4List(offsetInBytes, length);
+  }
 
   Int32x4 operator[](int index) {
     if (index < 0 || index >= length) {
@@ -1539,6 +1756,7 @@
 
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 16;
 
   int get elementSizeInBytes {
     return Int32x4List.BYTES_PER_ELEMENT;
@@ -1547,8 +1765,8 @@
 
   // Internal utility methods.
 
-  _Int32x4Array _createList(int length) {
-    return _new(length);
+  Int32x4List _createList(int length) {
+    return new Int32x4List(length);
   }
 
   Int32x4 _getIndexedInt32x4(int index) {
@@ -1558,18 +1776,23 @@
   void _setIndexedInt32x4(int index, Int32x4 value) {
     _setInt32x4(index * Int32x4List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Int32x4Array _new(int length) native "TypedData_Int32x4Array_new";
 }
 
 
-class _Float64x2Array extends _TypedList with _Float64x2ListMixin implements Float64x2List {
+class Float64x2List extends _TypedList with _Float64x2ListMixin implements List<Float64x2>, TypedData {
   // Factory constructors.
 
-  factory _Float64x2Array(int length) {
-    return _new(length);
+  factory Float64x2List(int length) native "TypedData_Float64x2Array_new";
+
+  factory Float64x2List.fromList(List<Float64x2> elements) {
+    return new Float64x2List(elements.length)
+        ..setRange(0, elements.length, elements);
   }
 
+  factory Float64x2List.view(ByteBuffer buffer,
+                             [int offsetInBytes = 0, int length]) {
+    return buffer.asFloat64x2List(offsetInBytes, length);
+  }
 
   Float64x2 operator[](int index) {
     if (index < 0 || index >= length) {
@@ -1587,6 +1810,7 @@
 
 
   // Method(s) implementing the TypedData interface.
+  static const int BYTES_PER_ELEMENT = 16;
 
   int get elementSizeInBytes {
     return Float64x2List.BYTES_PER_ELEMENT;
@@ -1595,8 +1819,8 @@
 
   // Internal utility methods.
 
-  _Float64x2Array _createList(int length) {
-    return _new(length);
+  Float64x2List _createList(int length) {
+    return new Float64x2List(length);
   }
 
   Float64x2 _getIndexedFloat64x2(int index) {
@@ -1606,18 +1830,13 @@
   void _setIndexedFloat64x2(int index, Float64x2 value) {
     _setFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT, value);
   }
-
-  static _Float64x2Array _new(int length) native "TypedData_Float64x2Array_new";
 }
 
 
 class _ExternalInt8Array extends _TypedList with _IntListMixin implements Int8List {
   // Factory constructors.
 
-  factory _ExternalInt8Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalInt8Array(int length) native "ExternalTypedData_Int8Array_new";
 
   // Method(s) implementing the List interface.
   int operator[](int index) {
@@ -1647,19 +1866,13 @@
   Int8List _createList(int length) {
     return new Int8List(length);
   }
-
-  static _ExternalInt8Array _new(int length) native
-      "ExternalTypedData_Int8Array_new";
 }
 
 
 class _ExternalUint8Array extends _TypedList with _IntListMixin implements Uint8List {
   // Factory constructors.
 
-  factory _ExternalUint8Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalUint8Array(int length) native "ExternalTypedData_Uint8Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -1690,18 +1903,13 @@
   Uint8List _createList(int length) {
     return new Uint8List(length);
   }
-
-  static _ExternalUint8Array _new(int length) native
-      "ExternalTypedData_Uint8Array_new";
 }
 
 
 class _ExternalUint8ClampedArray extends _TypedList with _IntListMixin implements Uint8ClampedList {
   // Factory constructors.
 
-  factory _ExternalUint8ClampedArray(int length) {
-    return _new(length);
-  }
+  factory _ExternalUint8ClampedArray(int length) native "ExternalTypedData_Uint8ClampedArray_new";
 
   // Method(s) implementing the List interface.
 
@@ -1732,19 +1940,13 @@
   Uint8ClampedList _createList(int length) {
     return new Uint8ClampedList(length);
   }
-
-  static _ExternalUint8ClampedArray _new(int length) native
-      "ExternalTypedData_Uint8ClampedArray_new";
 }
 
 
 class _ExternalInt16Array extends _TypedList with _IntListMixin implements Int16List {
   // Factory constructors.
 
-  factory _ExternalInt16Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalInt16Array(int length) native "ExternalTypedData_Int16Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -1783,19 +1985,13 @@
   void _setIndexedInt16(int index, int value) {
     _setInt16(index * Int16List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalInt16Array _new(int length) native
-      "ExternalTypedData_Int16Array_new";
 }
 
 
 class _ExternalUint16Array extends _TypedList with _IntListMixin implements Uint16List {
   // Factory constructors.
 
-  factory _ExternalUint16Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalUint16Array(int length) native "ExternalTypedData_Uint16Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -1834,19 +2030,13 @@
   void _setIndexedUint16(int index, int value) {
     _setUint16(index * Uint16List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalUint16Array _new(int length) native
-      "ExternalTypedData_Uint16Array_new";
 }
 
 
 class _ExternalInt32Array extends _TypedList with _IntListMixin implements Int32List {
   // Factory constructors.
 
-  factory _ExternalInt32Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalInt32Array(int length) native "ExternalTypedData_Int32Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -1885,19 +2075,13 @@
   void _setIndexedInt32(int index, int value) {
     _setInt32(index * Int32List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalInt32Array _new(int length) native
-      "ExternalTypedData_Int32Array_new";
 }
 
 
 class _ExternalUint32Array extends _TypedList with _IntListMixin implements Uint32List {
   // Factory constructors.
 
-  factory _ExternalUint32Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalUint32Array(int length) native "ExternalTypedData_Uint32Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -1936,19 +2120,13 @@
   void _setIndexedUint32(int index, int value) {
     _setUint32(index * Uint32List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalUint32Array _new(int length) native
-      "ExternalTypedData_Uint32Array_new";
 }
 
 
 class _ExternalInt64Array extends _TypedList with _IntListMixin implements Int64List {
   // Factory constructors.
 
-  factory _ExternalInt64Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalInt64Array(int length) native "ExternalTypedData_Int64Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -1987,19 +2165,13 @@
   void _setIndexedInt64(int index, int value) {
     _setInt64(index * Int64List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalInt64Array _new(int length) native
-      "ExternalTypedData_Int64Array_new";
 }
 
 
 class _ExternalUint64Array extends _TypedList with _IntListMixin implements Uint64List {
   // Factory constructors.
 
-  factory _ExternalUint64Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalUint64Array(int length) native "ExternalTypedData_Uint64Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -2038,19 +2210,13 @@
   void _setIndexedUint64(int index, int value) {
     _setUint64(index * Uint64List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalUint64Array _new(int length) native
-      "ExternalTypedData_Uint64Array_new";
 }
 
 
 class _ExternalFloat32Array extends _TypedList with _DoubleListMixin implements Float32List {
   // Factory constructors.
 
-  factory _ExternalFloat32Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalFloat32Array(int length) native "ExternalTypedData_Float32Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -2089,19 +2255,13 @@
   void _setIndexedFloat32(int index, double value) {
     _setFloat32(index * Float32List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalFloat32Array _new(int length) native
-      "ExternalTypedData_Float32Array_new";
 }
 
 
 class _ExternalFloat64Array extends _TypedList with _DoubleListMixin implements Float64List {
   // Factory constructors.
 
-  factory _ExternalFloat64Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalFloat64Array(int length) native "ExternalTypedData_Float64Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -2140,19 +2300,13 @@
   void _setIndexedFloat64(int index, double value) {
     _setFloat64(index * Float64List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalFloat64Array _new(int length) native
-      "ExternalTypedData_Float64Array_new";
 }
 
 
 class _ExternalFloat32x4Array extends _TypedList with _Float32x4ListMixin implements Float32x4List {
   // Factory constructors.
 
-  factory _ExternalFloat32x4Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalFloat32x4Array(int length) native "ExternalTypedData_Float32x4Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -2191,19 +2345,13 @@
   void _setIndexedFloat32x4(int index, Float32x4 value) {
     _setFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalFloat32x4Array _new(int length) native
-      "ExternalTypedData_Float32x4Array_new";
 }
 
 
 class _ExternalInt32x4Array extends _TypedList with _Int32x4ListMixin implements Int32x4List {
   // Factory constructors.
 
-  factory _ExternalInt32x4Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalInt32x4Array(int length) native "ExternalTypedData_Int32x4Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -2242,19 +2390,13 @@
   void _setIndexedInt32x4(int index, Int32x4 value) {
     _setInt32x4(index * Int32x4List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalInt32x4Array _new(int length) native
-      "ExternalTypedData_Int32x4Array_new";
 }
 
 
 class _ExternalFloat64x2Array extends _TypedList with _Float64x2ListMixin implements Float64x2List {
   // Factory constructors.
 
-  factory _ExternalFloat64x2Array(int length) {
-    return _new(length);
-  }
-
+  factory _ExternalFloat64x2Array(int length) native "ExternalTypedData_Float64x2Array_new";
 
   // Method(s) implementing the List interface.
 
@@ -2293,20 +2435,17 @@
   void _setIndexedFloat64x2(int index, Float64x2 value) {
     _setFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT, value);
   }
-
-  static _ExternalFloat64x2Array _new(int length) native
-      "ExternalTypedData_Float64x2Array_new";
 }
 
 
-class _Float32x4 implements Float32x4 {
-  factory _Float32x4(double x, double y, double z, double w)
+class Float32x4 {
+  factory Float32x4(double x, double y, double z, double w)
       native "Float32x4_fromDoubles";
-  factory _Float32x4.splat(double v) native "Float32x4_splat";
-  factory _Float32x4.zero() native "Float32x4_zero";
-  factory _Float32x4.fromInt32x4Bits(Int32x4 x)
+  factory Float32x4.splat(double v) native "Float32x4_splat";
+  factory Float32x4.zero() native "Float32x4_zero";
+  factory Float32x4.fromInt32x4Bits(Int32x4 x)
       native "Float32x4_fromInt32x4Bits";
-  factory _Float32x4.fromFloat64x2(Float64x2 v)
+  factory Float32x4.fromFloat64x2(Float64x2 v)
       native "Float32x4_fromFloat64x2";
   Float32x4 operator +(Float32x4 other) {
     return _add(other);
@@ -2400,15 +2539,274 @@
     return _reciprocalSqrt();
   }
   Float32x4 _reciprocalSqrt() native "Float32x4_reciprocalSqrt";
+
+  /// Mask passed to [shuffle] or [shuffleMix].
+  static const int XXXX = 0x0;
+  static const int XXXY = 0x40;
+  static const int XXXZ = 0x80;
+  static const int XXXW = 0xC0;
+  static const int XXYX = 0x10;
+  static const int XXYY = 0x50;
+  static const int XXYZ = 0x90;
+  static const int XXYW = 0xD0;
+  static const int XXZX = 0x20;
+  static const int XXZY = 0x60;
+  static const int XXZZ = 0xA0;
+  static const int XXZW = 0xE0;
+  static const int XXWX = 0x30;
+  static const int XXWY = 0x70;
+  static const int XXWZ = 0xB0;
+  static const int XXWW = 0xF0;
+  static const int XYXX = 0x4;
+  static const int XYXY = 0x44;
+  static const int XYXZ = 0x84;
+  static const int XYXW = 0xC4;
+  static const int XYYX = 0x14;
+  static const int XYYY = 0x54;
+  static const int XYYZ = 0x94;
+  static const int XYYW = 0xD4;
+  static const int XYZX = 0x24;
+  static const int XYZY = 0x64;
+  static const int XYZZ = 0xA4;
+  static const int XYZW = 0xE4;
+  static const int XYWX = 0x34;
+  static const int XYWY = 0x74;
+  static const int XYWZ = 0xB4;
+  static const int XYWW = 0xF4;
+  static const int XZXX = 0x8;
+  static const int XZXY = 0x48;
+  static const int XZXZ = 0x88;
+  static const int XZXW = 0xC8;
+  static const int XZYX = 0x18;
+  static const int XZYY = 0x58;
+  static const int XZYZ = 0x98;
+  static const int XZYW = 0xD8;
+  static const int XZZX = 0x28;
+  static const int XZZY = 0x68;
+  static const int XZZZ = 0xA8;
+  static const int XZZW = 0xE8;
+  static const int XZWX = 0x38;
+  static const int XZWY = 0x78;
+  static const int XZWZ = 0xB8;
+  static const int XZWW = 0xF8;
+  static const int XWXX = 0xC;
+  static const int XWXY = 0x4C;
+  static const int XWXZ = 0x8C;
+  static const int XWXW = 0xCC;
+  static const int XWYX = 0x1C;
+  static const int XWYY = 0x5C;
+  static const int XWYZ = 0x9C;
+  static const int XWYW = 0xDC;
+  static const int XWZX = 0x2C;
+  static const int XWZY = 0x6C;
+  static const int XWZZ = 0xAC;
+  static const int XWZW = 0xEC;
+  static const int XWWX = 0x3C;
+  static const int XWWY = 0x7C;
+  static const int XWWZ = 0xBC;
+  static const int XWWW = 0xFC;
+  static const int YXXX = 0x1;
+  static const int YXXY = 0x41;
+  static const int YXXZ = 0x81;
+  static const int YXXW = 0xC1;
+  static const int YXYX = 0x11;
+  static const int YXYY = 0x51;
+  static const int YXYZ = 0x91;
+  static const int YXYW = 0xD1;
+  static const int YXZX = 0x21;
+  static const int YXZY = 0x61;
+  static const int YXZZ = 0xA1;
+  static const int YXZW = 0xE1;
+  static const int YXWX = 0x31;
+  static const int YXWY = 0x71;
+  static const int YXWZ = 0xB1;
+  static const int YXWW = 0xF1;
+  static const int YYXX = 0x5;
+  static const int YYXY = 0x45;
+  static const int YYXZ = 0x85;
+  static const int YYXW = 0xC5;
+  static const int YYYX = 0x15;
+  static const int YYYY = 0x55;
+  static const int YYYZ = 0x95;
+  static const int YYYW = 0xD5;
+  static const int YYZX = 0x25;
+  static const int YYZY = 0x65;
+  static const int YYZZ = 0xA5;
+  static const int YYZW = 0xE5;
+  static const int YYWX = 0x35;
+  static const int YYWY = 0x75;
+  static const int YYWZ = 0xB5;
+  static const int YYWW = 0xF5;
+  static const int YZXX = 0x9;
+  static const int YZXY = 0x49;
+  static const int YZXZ = 0x89;
+  static const int YZXW = 0xC9;
+  static const int YZYX = 0x19;
+  static const int YZYY = 0x59;
+  static const int YZYZ = 0x99;
+  static const int YZYW = 0xD9;
+  static const int YZZX = 0x29;
+  static const int YZZY = 0x69;
+  static const int YZZZ = 0xA9;
+  static const int YZZW = 0xE9;
+  static const int YZWX = 0x39;
+  static const int YZWY = 0x79;
+  static const int YZWZ = 0xB9;
+  static const int YZWW = 0xF9;
+  static const int YWXX = 0xD;
+  static const int YWXY = 0x4D;
+  static const int YWXZ = 0x8D;
+  static const int YWXW = 0xCD;
+  static const int YWYX = 0x1D;
+  static const int YWYY = 0x5D;
+  static const int YWYZ = 0x9D;
+  static const int YWYW = 0xDD;
+  static const int YWZX = 0x2D;
+  static const int YWZY = 0x6D;
+  static const int YWZZ = 0xAD;
+  static const int YWZW = 0xED;
+  static const int YWWX = 0x3D;
+  static const int YWWY = 0x7D;
+  static const int YWWZ = 0xBD;
+  static const int YWWW = 0xFD;
+  static const int ZXXX = 0x2;
+  static const int ZXXY = 0x42;
+  static const int ZXXZ = 0x82;
+  static const int ZXXW = 0xC2;
+  static const int ZXYX = 0x12;
+  static const int ZXYY = 0x52;
+  static const int ZXYZ = 0x92;
+  static const int ZXYW = 0xD2;
+  static const int ZXZX = 0x22;
+  static const int ZXZY = 0x62;
+  static const int ZXZZ = 0xA2;
+  static const int ZXZW = 0xE2;
+  static const int ZXWX = 0x32;
+  static const int ZXWY = 0x72;
+  static const int ZXWZ = 0xB2;
+  static const int ZXWW = 0xF2;
+  static const int ZYXX = 0x6;
+  static const int ZYXY = 0x46;
+  static const int ZYXZ = 0x86;
+  static const int ZYXW = 0xC6;
+  static const int ZYYX = 0x16;
+  static const int ZYYY = 0x56;
+  static const int ZYYZ = 0x96;
+  static const int ZYYW = 0xD6;
+  static const int ZYZX = 0x26;
+  static const int ZYZY = 0x66;
+  static const int ZYZZ = 0xA6;
+  static const int ZYZW = 0xE6;
+  static const int ZYWX = 0x36;
+  static const int ZYWY = 0x76;
+  static const int ZYWZ = 0xB6;
+  static const int ZYWW = 0xF6;
+  static const int ZZXX = 0xA;
+  static const int ZZXY = 0x4A;
+  static const int ZZXZ = 0x8A;
+  static const int ZZXW = 0xCA;
+  static const int ZZYX = 0x1A;
+  static const int ZZYY = 0x5A;
+  static const int ZZYZ = 0x9A;
+  static const int ZZYW = 0xDA;
+  static const int ZZZX = 0x2A;
+  static const int ZZZY = 0x6A;
+  static const int ZZZZ = 0xAA;
+  static const int ZZZW = 0xEA;
+  static const int ZZWX = 0x3A;
+  static const int ZZWY = 0x7A;
+  static const int ZZWZ = 0xBA;
+  static const int ZZWW = 0xFA;
+  static const int ZWXX = 0xE;
+  static const int ZWXY = 0x4E;
+  static const int ZWXZ = 0x8E;
+  static const int ZWXW = 0xCE;
+  static const int ZWYX = 0x1E;
+  static const int ZWYY = 0x5E;
+  static const int ZWYZ = 0x9E;
+  static const int ZWYW = 0xDE;
+  static const int ZWZX = 0x2E;
+  static const int ZWZY = 0x6E;
+  static const int ZWZZ = 0xAE;
+  static const int ZWZW = 0xEE;
+  static const int ZWWX = 0x3E;
+  static const int ZWWY = 0x7E;
+  static const int ZWWZ = 0xBE;
+  static const int ZWWW = 0xFE;
+  static const int WXXX = 0x3;
+  static const int WXXY = 0x43;
+  static const int WXXZ = 0x83;
+  static const int WXXW = 0xC3;
+  static const int WXYX = 0x13;
+  static const int WXYY = 0x53;
+  static const int WXYZ = 0x93;
+  static const int WXYW = 0xD3;
+  static const int WXZX = 0x23;
+  static const int WXZY = 0x63;
+  static const int WXZZ = 0xA3;
+  static const int WXZW = 0xE3;
+  static const int WXWX = 0x33;
+  static const int WXWY = 0x73;
+  static const int WXWZ = 0xB3;
+  static const int WXWW = 0xF3;
+  static const int WYXX = 0x7;
+  static const int WYXY = 0x47;
+  static const int WYXZ = 0x87;
+  static const int WYXW = 0xC7;
+  static const int WYYX = 0x17;
+  static const int WYYY = 0x57;
+  static const int WYYZ = 0x97;
+  static const int WYYW = 0xD7;
+  static const int WYZX = 0x27;
+  static const int WYZY = 0x67;
+  static const int WYZZ = 0xA7;
+  static const int WYZW = 0xE7;
+  static const int WYWX = 0x37;
+  static const int WYWY = 0x77;
+  static const int WYWZ = 0xB7;
+  static const int WYWW = 0xF7;
+  static const int WZXX = 0xB;
+  static const int WZXY = 0x4B;
+  static const int WZXZ = 0x8B;
+  static const int WZXW = 0xCB;
+  static const int WZYX = 0x1B;
+  static const int WZYY = 0x5B;
+  static const int WZYZ = 0x9B;
+  static const int WZYW = 0xDB;
+  static const int WZZX = 0x2B;
+  static const int WZZY = 0x6B;
+  static const int WZZZ = 0xAB;
+  static const int WZZW = 0xEB;
+  static const int WZWX = 0x3B;
+  static const int WZWY = 0x7B;
+  static const int WZWZ = 0xBB;
+  static const int WZWW = 0xFB;
+  static const int WWXX = 0xF;
+  static const int WWXY = 0x4F;
+  static const int WWXZ = 0x8F;
+  static const int WWXW = 0xCF;
+  static const int WWYX = 0x1F;
+  static const int WWYY = 0x5F;
+  static const int WWYZ = 0x9F;
+  static const int WWYW = 0xDF;
+  static const int WWZX = 0x2F;
+  static const int WWZY = 0x6F;
+  static const int WWZZ = 0xAF;
+  static const int WWZW = 0xEF;
+  static const int WWWX = 0x3F;
+  static const int WWWY = 0x7F;
+  static const int WWWZ = 0xBF;
+  static const int WWWW = 0xFF;
+
 }
 
 
-class _Int32x4 implements Int32x4 {
-  factory _Int32x4(int x, int y, int z, int w)
+class Int32x4 {
+  factory Int32x4(int x, int y, int z, int w)
       native "Int32x4_fromInts";
-  factory _Int32x4.bool(bool x, bool y, bool z, bool w)
+  factory Int32x4.bool(bool x, bool y, bool z, bool w)
       native "Int32x4_fromBools";
-  factory _Int32x4.fromFloat32x4Bits(Float32x4 x)
+  factory Int32x4.fromFloat32x4Bits(Float32x4 x)
       native "Int32x4_fromFloat32x4Bits";
   Int32x4 operator |(Int32x4 other) {
     return _or(other);
@@ -2456,14 +2854,273 @@
   Float32x4 _select(Float32x4 trueValue,
                            Float32x4 falseValue)
       native "Int32x4_select";
+
+  /// Mask passed to [shuffle] or [shuffleMix].
+  static const int XXXX = 0x0;
+  static const int XXXY = 0x40;
+  static const int XXXZ = 0x80;
+  static const int XXXW = 0xC0;
+  static const int XXYX = 0x10;
+  static const int XXYY = 0x50;
+  static const int XXYZ = 0x90;
+  static const int XXYW = 0xD0;
+  static const int XXZX = 0x20;
+  static const int XXZY = 0x60;
+  static const int XXZZ = 0xA0;
+  static const int XXZW = 0xE0;
+  static const int XXWX = 0x30;
+  static const int XXWY = 0x70;
+  static const int XXWZ = 0xB0;
+  static const int XXWW = 0xF0;
+  static const int XYXX = 0x4;
+  static const int XYXY = 0x44;
+  static const int XYXZ = 0x84;
+  static const int XYXW = 0xC4;
+  static const int XYYX = 0x14;
+  static const int XYYY = 0x54;
+  static const int XYYZ = 0x94;
+  static const int XYYW = 0xD4;
+  static const int XYZX = 0x24;
+  static const int XYZY = 0x64;
+  static const int XYZZ = 0xA4;
+  static const int XYZW = 0xE4;
+  static const int XYWX = 0x34;
+  static const int XYWY = 0x74;
+  static const int XYWZ = 0xB4;
+  static const int XYWW = 0xF4;
+  static const int XZXX = 0x8;
+  static const int XZXY = 0x48;
+  static const int XZXZ = 0x88;
+  static const int XZXW = 0xC8;
+  static const int XZYX = 0x18;
+  static const int XZYY = 0x58;
+  static const int XZYZ = 0x98;
+  static const int XZYW = 0xD8;
+  static const int XZZX = 0x28;
+  static const int XZZY = 0x68;
+  static const int XZZZ = 0xA8;
+  static const int XZZW = 0xE8;
+  static const int XZWX = 0x38;
+  static const int XZWY = 0x78;
+  static const int XZWZ = 0xB8;
+  static const int XZWW = 0xF8;
+  static const int XWXX = 0xC;
+  static const int XWXY = 0x4C;
+  static const int XWXZ = 0x8C;
+  static const int XWXW = 0xCC;
+  static const int XWYX = 0x1C;
+  static const int XWYY = 0x5C;
+  static const int XWYZ = 0x9C;
+  static const int XWYW = 0xDC;
+  static const int XWZX = 0x2C;
+  static const int XWZY = 0x6C;
+  static const int XWZZ = 0xAC;
+  static const int XWZW = 0xEC;
+  static const int XWWX = 0x3C;
+  static const int XWWY = 0x7C;
+  static const int XWWZ = 0xBC;
+  static const int XWWW = 0xFC;
+  static const int YXXX = 0x1;
+  static const int YXXY = 0x41;
+  static const int YXXZ = 0x81;
+  static const int YXXW = 0xC1;
+  static const int YXYX = 0x11;
+  static const int YXYY = 0x51;
+  static const int YXYZ = 0x91;
+  static const int YXYW = 0xD1;
+  static const int YXZX = 0x21;
+  static const int YXZY = 0x61;
+  static const int YXZZ = 0xA1;
+  static const int YXZW = 0xE1;
+  static const int YXWX = 0x31;
+  static const int YXWY = 0x71;
+  static const int YXWZ = 0xB1;
+  static const int YXWW = 0xF1;
+  static const int YYXX = 0x5;
+  static const int YYXY = 0x45;
+  static const int YYXZ = 0x85;
+  static const int YYXW = 0xC5;
+  static const int YYYX = 0x15;
+  static const int YYYY = 0x55;
+  static const int YYYZ = 0x95;
+  static const int YYYW = 0xD5;
+  static const int YYZX = 0x25;
+  static const int YYZY = 0x65;
+  static const int YYZZ = 0xA5;
+  static const int YYZW = 0xE5;
+  static const int YYWX = 0x35;
+  static const int YYWY = 0x75;
+  static const int YYWZ = 0xB5;
+  static const int YYWW = 0xF5;
+  static const int YZXX = 0x9;
+  static const int YZXY = 0x49;
+  static const int YZXZ = 0x89;
+  static const int YZXW = 0xC9;
+  static const int YZYX = 0x19;
+  static const int YZYY = 0x59;
+  static const int YZYZ = 0x99;
+  static const int YZYW = 0xD9;
+  static const int YZZX = 0x29;
+  static const int YZZY = 0x69;
+  static const int YZZZ = 0xA9;
+  static const int YZZW = 0xE9;
+  static const int YZWX = 0x39;
+  static const int YZWY = 0x79;
+  static const int YZWZ = 0xB9;
+  static const int YZWW = 0xF9;
+  static const int YWXX = 0xD;
+  static const int YWXY = 0x4D;
+  static const int YWXZ = 0x8D;
+  static const int YWXW = 0xCD;
+  static const int YWYX = 0x1D;
+  static const int YWYY = 0x5D;
+  static const int YWYZ = 0x9D;
+  static const int YWYW = 0xDD;
+  static const int YWZX = 0x2D;
+  static const int YWZY = 0x6D;
+  static const int YWZZ = 0xAD;
+  static const int YWZW = 0xED;
+  static const int YWWX = 0x3D;
+  static const int YWWY = 0x7D;
+  static const int YWWZ = 0xBD;
+  static const int YWWW = 0xFD;
+  static const int ZXXX = 0x2;
+  static const int ZXXY = 0x42;
+  static const int ZXXZ = 0x82;
+  static const int ZXXW = 0xC2;
+  static const int ZXYX = 0x12;
+  static const int ZXYY = 0x52;
+  static const int ZXYZ = 0x92;
+  static const int ZXYW = 0xD2;
+  static const int ZXZX = 0x22;
+  static const int ZXZY = 0x62;
+  static const int ZXZZ = 0xA2;
+  static const int ZXZW = 0xE2;
+  static const int ZXWX = 0x32;
+  static const int ZXWY = 0x72;
+  static const int ZXWZ = 0xB2;
+  static const int ZXWW = 0xF2;
+  static const int ZYXX = 0x6;
+  static const int ZYXY = 0x46;
+  static const int ZYXZ = 0x86;
+  static const int ZYXW = 0xC6;
+  static const int ZYYX = 0x16;
+  static const int ZYYY = 0x56;
+  static const int ZYYZ = 0x96;
+  static const int ZYYW = 0xD6;
+  static const int ZYZX = 0x26;
+  static const int ZYZY = 0x66;
+  static const int ZYZZ = 0xA6;
+  static const int ZYZW = 0xE6;
+  static const int ZYWX = 0x36;
+  static const int ZYWY = 0x76;
+  static const int ZYWZ = 0xB6;
+  static const int ZYWW = 0xF6;
+  static const int ZZXX = 0xA;
+  static const int ZZXY = 0x4A;
+  static const int ZZXZ = 0x8A;
+  static const int ZZXW = 0xCA;
+  static const int ZZYX = 0x1A;
+  static const int ZZYY = 0x5A;
+  static const int ZZYZ = 0x9A;
+  static const int ZZYW = 0xDA;
+  static const int ZZZX = 0x2A;
+  static const int ZZZY = 0x6A;
+  static const int ZZZZ = 0xAA;
+  static const int ZZZW = 0xEA;
+  static const int ZZWX = 0x3A;
+  static const int ZZWY = 0x7A;
+  static const int ZZWZ = 0xBA;
+  static const int ZZWW = 0xFA;
+  static const int ZWXX = 0xE;
+  static const int ZWXY = 0x4E;
+  static const int ZWXZ = 0x8E;
+  static const int ZWXW = 0xCE;
+  static const int ZWYX = 0x1E;
+  static const int ZWYY = 0x5E;
+  static const int ZWYZ = 0x9E;
+  static const int ZWYW = 0xDE;
+  static const int ZWZX = 0x2E;
+  static const int ZWZY = 0x6E;
+  static const int ZWZZ = 0xAE;
+  static const int ZWZW = 0xEE;
+  static const int ZWWX = 0x3E;
+  static const int ZWWY = 0x7E;
+  static const int ZWWZ = 0xBE;
+  static const int ZWWW = 0xFE;
+  static const int WXXX = 0x3;
+  static const int WXXY = 0x43;
+  static const int WXXZ = 0x83;
+  static const int WXXW = 0xC3;
+  static const int WXYX = 0x13;
+  static const int WXYY = 0x53;
+  static const int WXYZ = 0x93;
+  static const int WXYW = 0xD3;
+  static const int WXZX = 0x23;
+  static const int WXZY = 0x63;
+  static const int WXZZ = 0xA3;
+  static const int WXZW = 0xE3;
+  static const int WXWX = 0x33;
+  static const int WXWY = 0x73;
+  static const int WXWZ = 0xB3;
+  static const int WXWW = 0xF3;
+  static const int WYXX = 0x7;
+  static const int WYXY = 0x47;
+  static const int WYXZ = 0x87;
+  static const int WYXW = 0xC7;
+  static const int WYYX = 0x17;
+  static const int WYYY = 0x57;
+  static const int WYYZ = 0x97;
+  static const int WYYW = 0xD7;
+  static const int WYZX = 0x27;
+  static const int WYZY = 0x67;
+  static const int WYZZ = 0xA7;
+  static const int WYZW = 0xE7;
+  static const int WYWX = 0x37;
+  static const int WYWY = 0x77;
+  static const int WYWZ = 0xB7;
+  static const int WYWW = 0xF7;
+  static const int WZXX = 0xB;
+  static const int WZXY = 0x4B;
+  static const int WZXZ = 0x8B;
+  static const int WZXW = 0xCB;
+  static const int WZYX = 0x1B;
+  static const int WZYY = 0x5B;
+  static const int WZYZ = 0x9B;
+  static const int WZYW = 0xDB;
+  static const int WZZX = 0x2B;
+  static const int WZZY = 0x6B;
+  static const int WZZZ = 0xAB;
+  static const int WZZW = 0xEB;
+  static const int WZWX = 0x3B;
+  static const int WZWY = 0x7B;
+  static const int WZWZ = 0xBB;
+  static const int WZWW = 0xFB;
+  static const int WWXX = 0xF;
+  static const int WWXY = 0x4F;
+  static const int WWXZ = 0x8F;
+  static const int WWXW = 0xCF;
+  static const int WWYX = 0x1F;
+  static const int WWYY = 0x5F;
+  static const int WWYZ = 0x9F;
+  static const int WWYW = 0xDF;
+  static const int WWZX = 0x2F;
+  static const int WWZY = 0x6F;
+  static const int WWZZ = 0xAF;
+  static const int WWZW = 0xEF;
+  static const int WWWX = 0x3F;
+  static const int WWWY = 0x7F;
+  static const int WWWZ = 0xBF;
+  static const int WWWW = 0xFF;
+
 }
 
 
-class _Float64x2 implements Float64x2 {
-  factory _Float64x2(double x, double y) native "Float64x2_fromDoubles";
-  factory _Float64x2.splat(double v) native "Float64x2_splat";
-  factory _Float64x2.zero() native "Float64x2_zero";
-  factory _Float64x2.fromFloat32x4(Float32x4 v) native "Float64x2_fromFloat32x4";
+class Float64x2 {
+  factory Float64x2(double x, double y) native "Float64x2_fromDoubles";
+  factory Float64x2.splat(double v) native "Float64x2_splat";
+  factory Float64x2.zero() native "Float64x2_zero";
+  factory Float64x2.fromFloat32x4(Float32x4 v) native "Float64x2_fromFloat32x4";
 
   Float64x2 operator +(Float64x2 other) {
     return _add(other);
@@ -2549,7 +3206,7 @@
 
 
 class _TypedListView extends _TypedListBase implements TypedData {
-  _TypedListView(_ByteBuffer _buffer, int _offset, int _length)
+  _TypedListView(ByteBuffer _buffer, int _offset, int _length)
     : _typedData = _buffer._data,
       offsetInBytes = _offset,
       length = _length {
diff --git a/runtime/observatory/lib/app.dart b/runtime/observatory/lib/app.dart
index a0e52bb..15e802d 100644
--- a/runtime/observatory/lib/app.dart
+++ b/runtime/observatory/lib/app.dart
@@ -7,6 +7,7 @@
 import 'dart:async';
 import 'dart:convert';
 import 'dart:html';
+import 'dart:math' as math;
 
 import 'package:logging/logging.dart';
 import 'package:observatory/service_html.dart';
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart
index 644b659..e2d5126 100644
--- a/runtime/observatory/lib/src/app/application.dart
+++ b/runtime/observatory/lib/src/app/application.dart
@@ -87,6 +87,8 @@
   }
 
   void _onEvent(ServiceEvent event) {
+    assert(event.kind != ServiceEvent.kNone);
+
     switch(event.kind) {
       case ServiceEvent.kVMUpdate:
       case ServiceEvent.kIsolateStart:
diff --git a/runtime/observatory/lib/src/app/location_manager.dart b/runtime/observatory/lib/src/app/location_manager.dart
index fee2884..577cb92 100644
--- a/runtime/observatory/lib/src/app/location_manager.dart
+++ b/runtime/observatory/lib/src/app/location_manager.dart
@@ -34,6 +34,13 @@
     _updateApplicationLocation(applicationPath);
   }
 
+  bool getBoolParameter(String name, bool defaultValue) {
+    var value = uri.queryParameters[name];
+    if ("true" == value) return true;
+    if ("false" == value) return false;
+    return defaultValue;
+  }
+
   /// Called whenever the browser changes the location bar (e.g. forward or
   /// back button press).
   void _onBrowserNavigation(PopStateEvent event) {
diff --git a/runtime/observatory/lib/src/app/view_model.dart b/runtime/observatory/lib/src/app/view_model.dart
index 072b156..6562e1f 100644
--- a/runtime/observatory/lib/src/app/view_model.dart
+++ b/runtime/observatory/lib/src/app/view_model.dart
@@ -4,6 +4,384 @@
 
 part of app;
 
+abstract class VirtualTreeRow {
+  // Number of ems each subtree is indented.
+  static const subtreeIndent = 1.05;
+
+  static const redColor = '#F44336';
+  static const blueColor = '#3F51B5';
+  static const purpleColor = '#673AB7';
+  static const greenColor = '#4CAF50';
+  static const orangeColor = '#FF9800';
+  static const lightGrayColor = '#FAFAFA';
+
+  List backgroundColors = const [
+    purpleColor,
+    redColor,
+    greenColor,
+    blueColor,
+    orangeColor,
+  ];
+
+  final VirtualTree tree;
+  final List<VirtualTreeRow> children = [];
+  final List<StreamSubscription> _listeners = [];
+  final int depth;
+  bool _expanded = false;
+
+  VirtualTreeRow(this.tree, this.depth);
+
+  bool get expanded => _expanded;
+
+  set expanded(bool expanded) {
+    var changed = _expanded != expanded;
+    _expanded = expanded;
+    if (!changed) {
+      return;
+    }
+    if (_expanded) {
+      _expand();
+    } else {
+      _collapse();
+    }
+  }
+
+  Element makeColorBar() {
+    var element = new SpanElement();
+    element.style.paddingLeft = '2px';
+    element.style.paddingRight = '2px';
+    element.style.flexBasis = '2px';
+    element.style.height = '${tree.rowHeight}px';
+    element.style.minHeight = '${tree.rowHeight}px';
+    if (depth > 0) {
+      var colorIndex = (depth - 1) % backgroundColors.length;
+      element.style.backgroundColor = backgroundColors[colorIndex];
+    }
+    return element;
+  }
+
+  Element makeExpander() {
+    SpanElement element = new SpanElement();
+    element.style.flexBasis = '2em';
+    if (!hasChildren()) {
+      element.style.visibility = 'hidden';
+    } else {
+      element.style.visibility = 'visible';
+      element.children.add(expanded ?
+          new Element.tag('icon-expand-more') :
+          new Element.tag('icon-chevron-right'));
+    }
+    _listeners.add(element.onClick.listen((e) {
+      e.stopPropagation();
+      toggle();
+    }));
+    return element;
+  }
+
+  Element makeIndenter({colored: true}) {
+    SpanElement element = new SpanElement();
+    element.style.paddingLeft = '${subtreeIndent * depth}em';
+    element.style.flexBasis = '${subtreeIndent * depth}em';
+    element.style.height = '${tree.rowHeight}px';
+    element.style.minHeight = '${tree.rowHeight}px';
+    if (colored) {
+      if (depth > 0) {
+        var colorIndex = (depth - 1) % backgroundColors.length;
+        element.style.backgroundColor = backgroundColors[colorIndex];
+      }
+    }
+    return element;
+  }
+
+  Element makeText(String text, {String toolTip, String flexBasis: '7em'}) {
+    SpanElement element = new SpanElement();
+    element.text = text;
+    if (toolTip != null) {
+      element.title = toolTip;
+    }
+    if (flexBasis != null) {
+      element.style.flexBasis = flexBasis;
+    }
+    return element;
+  }
+
+  Element makeGap({double ems: 0.5}) {
+    SpanElement element = new SpanElement();
+    var flexBasis = '${ems}em';
+    element.style.flexBasis = flexBasis;
+    return element;
+  }
+
+  void _cleanupListeners() {
+    for (var listener in _listeners) {
+      listener.cancel();
+    }
+    _listeners.clear();
+  }
+
+  void _expand() {
+    onShow();
+    tree._onExpand(this);
+    if (children.length == 1) {
+      children[0]._expand();
+    }
+    _expanded = true;
+  }
+
+  void _collapse() {
+    _expanded = false;
+    for (var i = 0; i < children.length; i++) {
+      if (children[i].expanded) {
+        children[i]._collapse();
+      }
+    }
+    tree._onCollapse(this);
+  }
+
+  void toggle() {
+    expanded = !expanded;
+  }
+
+  void _render(DivElement rowDiv) {
+    rowDiv.style.display = 'flex';
+    rowDiv.style.alignItems = 'center';
+    _cleanupListeners();
+    onShow();
+    onRender(rowDiv);
+  }
+
+  /// Called when you should render into [rowDiv].
+  void onRender(DivElement rowDiv);
+
+  // Called when this row is visible.
+  void onShow();
+
+  // Return the number of children this node has.
+  int get childCount => 0;
+
+  // Return true if this node can be expanded.
+  bool hasChildren() => childCount > 0;
+
+  // Called when this row is not visible.
+  void onHide() {
+    _cleanupListeners();
+  }
+}
+
+class VirtualTree {
+  final int rowHeight;
+  final List<VirtualTreeRow> rows = [];
+  final DivElement root;
+  final Stopwatch _clock = new Stopwatch();
+
+  DivElement _treeHeightElement;
+  DivElement _tree;
+
+  StreamSubscription _scrollSubscription;
+  StreamSubscription _resizeSubscription;
+
+  // Height of [root] in pixels.
+  int viewHeight;
+
+  // Number of pixels view can be scrolled before a redraw occurs.
+  int redrawThresholdPixels;
+
+  // Number of rows visible at any given time.
+  int numVisibleRows;
+  // Number of rows above the current view that are in the dom.
+  int extraRowsAbove;
+  // Number of rows below the current view that are in the dom.
+  int extraRowsBelow;
+
+  // The scroll top of the last scroll event.
+  int lastPaintScrollTop;
+
+  // The starting row of the last paint.
+  int lastPaintStartingRow = 0;
+
+  bool paintScheduled = false;
+
+  bool scrolled = false;
+
+  static const scrollStopThresholdMilliseconds = 100;
+
+  VirtualTree(this.rowHeight, this.root) {
+    _clock.start();
+    _install();
+    _resize();
+    _schedulePaint(0);
+  }
+
+  void uninstall() => _uninstall();
+
+  void refresh() {
+    _resize();
+    _schedulePaint(lastPaintStartingRow);
+  }
+
+  // Clear the tree.
+  void clear() {
+    rows.clear();
+    _resize();
+  }
+
+  void _onExpand(VirtualTreeRow parent) {
+    int index = rows.indexOf(parent);
+    if (index == -1) {
+      return;
+    }
+    rows.insertAll(index + 1, parent.children);
+    refresh();
+  }
+
+  void _onCollapse(VirtualTreeRow parent) {
+    int index = rows.indexOf(parent);
+    if (index == -1) {
+      return;
+    }
+    int start = index + 1;
+    int end = start + parent.children.length;
+    rows.removeRange(start, end);
+    refresh();
+  }
+
+  void _resize() {
+    if (viewHeight != root.offsetHeight) {
+      viewHeight = root.offsetHeight;
+      numVisibleRows = (viewHeight ~/ rowHeight) + 1;
+      extraRowsAbove = numVisibleRows ~/ 2;
+      extraRowsBelow = numVisibleRows - extraRowsAbove;
+      redrawThresholdPixels =
+          math.min(extraRowsAbove, extraRowsBelow) * rowHeight;
+    }
+    _treeHeightElement.style.height = '${_treeHeight()}px';
+  }
+
+  int _treeHeight() {
+    return rows.length * rowHeight;
+  }
+
+  int _pixelsFromLastScroll(int currentScrollTop) {
+    if (lastPaintScrollTop == null) {
+      return currentScrollTop;
+    }
+
+    return (currentScrollTop - lastPaintScrollTop).abs();
+  }
+
+  int _pixelToRow(int pixelY) {
+    int result = pixelY ~/ rowHeight;
+    return result;
+  }
+
+  void _install() {
+    // This element controls the height of the tree's scrollable region.
+    // It is one pixel wide and the height is set to rowHeight * numRows.
+    _treeHeightElement = new DivElement();
+    _treeHeightElement.style.position = 'absolute';
+    _treeHeightElement.style.top = '0';
+    _treeHeightElement.style.left = '0';
+    _treeHeightElement.style.width = '1px';
+
+    // This element holds the visible tree rows and the height controlling
+    // element. It takes the full width and height of its parent element.
+    _tree = new DivElement();
+    _tree.children.add(_treeHeightElement);
+    _tree.style.width = '100%';
+    _tree.style.height = '100%';
+    _tree.style.position = 'relative';
+    _tree.style.overflow = 'auto';
+
+    // Listen for scroll events on the tree.
+    _scrollSubscription = _tree.onScroll.listen(_onScroll);
+
+    root.children.add(_tree);
+
+    // Listen for resize events.
+    _resizeSubscription = window.onResize.listen((_) {
+      _resize();
+      _schedulePaint(lastPaintStartingRow);
+    });
+  }
+
+  void _uninstall() {
+    root.children.clear();
+    _scrollSubscription?.cancel();
+    _scrollSubscription = null;
+    _resizeSubscription?.cancel();
+    _resizeSubscription = null;
+  }
+
+  void _onScroll(Event scrollEvent) {
+    Element target = scrollEvent.target;
+    int scrollTop = target.scrollTop;
+    if (_pixelsFromLastScroll(scrollTop) > redrawThresholdPixels) {
+      _schedulePaint(lastPaintStartingRow);
+      scrolled = true;
+    }
+    scrollEvent.preventDefault();
+  }
+
+  void _schedulePaint(int startingRow) {
+    if (paintScheduled) {
+      return;
+    }
+    paintScheduled = true;
+    window.requestAnimationFrame(
+        (timestamp) => _onRenderFrame(timestamp, startingRow));
+  }
+
+  void _onRenderFrame(int timestamp, int startingRow) {
+    paintScheduled = false;
+    _paint(startingRow);
+  }
+
+  void _paint(int startingRow) {
+    if (scrolled) {
+      startingRow = math.max(_pixelToRow(_tree.scrollTop), 0);
+      scrolled = false;
+    }
+    lastPaintScrollTop = _tree.scrollTop;
+    lastPaintStartingRow = startingRow;
+
+    int endingRow =
+        math.min(rows.length, startingRow + numVisibleRows + extraRowsBelow);
+
+    startingRow =
+        math.max(0, startingRow - extraRowsAbove);
+
+    print('PAINT $startingRow $endingRow');
+
+    for (int i = startingRow; i < endingRow; i++) {
+      // We add 1 because _tree.children[0] contains the height control element.
+      int cacheIndex = (i - startingRow) + 1;
+      DivElement row;
+      if (cacheIndex < _tree.children.length) {
+        // re-use existing row.
+        row = _tree.children[cacheIndex];
+        row.children.clear();
+      } else {
+        // Allocate a new row.
+        row = new DivElement();
+        row.style.position = 'absolute';
+        row.style.height = '${rowHeight}px';
+        row.style.maxHeight = '${rowHeight}px';
+        row.style.margin = '0';
+        row.style.width = '100%';
+        row.style.left = '0';
+        _tree.children.add(row);
+      }
+      row.style.top = '${(i * rowHeight)}px';
+      // Render the row.
+      rows[i]._render(row);
+    }
+    int necessaryChildren = (endingRow - startingRow) + 1;
+    while (_tree.children.length > necessaryChildren) {
+      _tree.children.removeLast();
+    }
+  }
+}
+
 abstract class TableTreeRow extends Observable {
   static const arrowRight = '\u2192';
   static const arrowDownRight = '\u21b3';
@@ -68,7 +446,8 @@
 
   HtmlElement _makeExpander() {
     var expander = new SpanElement();
-    expander.style.minWidth = '2em';
+    expander.style.minWidth = '24px';
+    expander.style.minHeight = '24px';
     listeners.add(expander.onClick.listen(onClick));
     return expander;
   }
diff --git a/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart b/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
index d3e0252..fb63fba 100644
--- a/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
+++ b/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart
@@ -4,26 +4,54 @@
 
 part of cpu_profiler;
 
-class CodeCallTreeNode {
-  final ProfileCode profileCode;
+abstract class CallTreeNode {
+  final List<CallTreeNode> children;
   final int count;
   double get percentage => _percentage;
   double _percentage = 0.0;
-  final children;
   final Set<String> attributes = new Set<String>();
-  CodeCallTreeNode(this.profileCode, this.count, int childCount)
-      : children = new List<CodeCallTreeNode>(childCount) {
+
+  // Either a ProfileCode or a ProfileFunction.
+  Object get profileData;
+  String get name;
+
+  CallTreeNode(this.children, this.count);
+}
+
+class CodeCallTreeNode extends CallTreeNode {
+  final ProfileCode profileCode;
+
+  Object get profileData => profileCode;
+
+  String get name => profileCode.code.name;
+
+  final Set<String> attributes = new Set<String>();
+  CodeCallTreeNode(this.profileCode, int count)
+      : super(new List<CodeCallTreeNode>(), count) {
     attributes.addAll(profileCode.attributes);
   }
 }
 
-class CodeCallTree {
+class CallTree {
   final bool inclusive;
-  final CodeCallTreeNode root;
-  CodeCallTree(this.inclusive, this.root) {
+  final CallTreeNode root;
+
+  CallTree(this.inclusive, this.root);
+}
+
+class CodeCallTree extends CallTree {
+  CodeCallTree(bool inclusive, CodeCallTreeNode root)
+      : super(inclusive, root) {
     _setCodePercentage(null, root);
   }
 
+  CodeCallTree filtered(CallTreeNodeFilter filter) {
+    var treeFilter = new _FilteredCodeCallTreeBuilder(filter, this);
+    treeFilter.build();
+    _setCodePercentage(null, treeFilter.filtered.root);
+    return treeFilter.filtered;
+  }
+
   _setCodePercentage(CodeCallTreeNode parent, CodeCallTreeNode node) {
     assert(node != null);
     var parentPercentage = 1.0;
@@ -67,18 +95,17 @@
   FunctionCallTreeNodeCode(this.code, this.ticks);
 }
 
-class FunctionCallTreeNode {
+class FunctionCallTreeNode extends CallTreeNode {
   final ProfileFunction profileFunction;
-  final int count;
-  double get percentage => _percentage;
-  double _percentage = 0.0;
-  final children = new List<FunctionCallTreeNode>();
-  final Set<String> attributes = new Set<String>();
   final codes = new List<FunctionCallTreeNodeCode>();
   int _totalCodeTicks = 0;
   int get totalCodesTicks => _totalCodeTicks;
 
-  FunctionCallTreeNode(this.profileFunction, this.count){
+  String get name => profileFunction.function.name;
+  Object get profileData => profileFunction;
+
+  FunctionCallTreeNode(this.profileFunction, int count)
+      : super(new List<FunctionCallTreeNode>(), count) {
     profileFunction._addKindBasedAttributes(attributes);
   }
 
@@ -140,27 +167,21 @@
 
 /// Predicate filter function. Returns true if path from root to [node] and all
 /// of [node]'s children should be added to the filtered tree.
-typedef bool FunctionCallTreeNodeFilter(FunctionCallTreeNode node);
+typedef bool CallTreeNodeFilter(CallTreeNode node);
 
 /// Build a filter version of a FunctionCallTree.
-class _FilteredFunctionCallTreeBuilder {
+abstract class _FilteredCallTreeBuilder {
   /// The filter.
-  final FunctionCallTreeNodeFilter filter;
+  final CallTreeNodeFilter filter;
   /// The unfiltered tree.
-  final FunctionCallTree _unfilteredTree;
+  final CallTree _unfilteredTree;
   /// The filtered tree (construct by [build]).
-  final FunctionCallTree filtered;
+  final CallTree filtered;
   final List _currentPath = [];
 
   /// Construct a filtered tree builder using [filter] and [tree].
-  _FilteredFunctionCallTreeBuilder(this.filter, FunctionCallTree tree)
-      : _unfilteredTree = tree,
-        filtered =
-          new FunctionCallTree(
-              tree.inclusive,
-              new FunctionCallTreeNode(
-                  tree.root.profileFunction,
-                  tree.root.count));
+  _FilteredCallTreeBuilder(this.filter, CallTree tree, this.filtered)
+      : _unfilteredTree = tree;
 
   /// Build the filtered tree.
   build() {
@@ -170,16 +191,18 @@
     _descend(_unfilteredTree.root);
   }
 
-  FunctionCallTreeNode _findFunctionInChildren(FunctionCallTreeNode current,
-                                               FunctionCallTreeNode needle) {
+  CallTreeNode _findInChildren(CallTreeNode current,
+                               CallTreeNode needle) {
     for (var child in current.children) {
-      if (child.profileFunction == needle.profileFunction) {
+      if (child.profileData == needle.profileData) {
         return child;
       }
     }
     return null;
   }
 
+  CallTreeNode _copyNode(CallTreeNode node);
+
   /// Add all nodes in [_currentPath].
   FunctionCallTreeNode _addCurrentPath() {
     FunctionCallTreeNode current = filtered.root;
@@ -191,10 +214,10 @@
       // toAdd is from the unfiltered tree.
       var toAdd = _currentPath[i];
       // See if we already have a node for toAdd in the filtered tree.
-      var child = _findFunctionInChildren(current, toAdd);
+      var child = _findInChildren(current, toAdd);
       if (child == null) {
         // New node.
-        child = new FunctionCallTreeNode(toAdd.profileFunction, toAdd.count);
+        child = _copyNode(toAdd);
         current.children.add(child);
       }
       current = child;
@@ -204,13 +227,13 @@
   }
 
   /// Starting at [current] append [next] and all of [next]'s sub-trees
-  _appendTree(FunctionCallTreeNode current, FunctionCallTreeNode next) {
+  _appendTree(CallTreeNode current, CallTreeNode next) {
     if (next == null) {
       return;
     }
-    var child = _findFunctionInChildren(current, next);
+    var child = _findInChildren(current, next);
     if (child == null) {
-      child = new FunctionCallTreeNode(next.profileFunction, next.count);
+      child = _copyNode(next);
       current.children.add(child);
     }
     current = child;
@@ -221,13 +244,13 @@
 
   /// Add path from root to [child], [child], and all of [child]'s sub-trees
   /// to filtered tree.
-  _addTree(FunctionCallTreeNode child) {
+  _addTree(CallTreeNode child) {
     var current = _addCurrentPath();
     _appendTree(current, child);
   }
 
   /// Descend further into the tree. [current] is from the unfiltered tree.
-  _descend(FunctionCallTreeNode current) {
+  _descend(CallTreeNode current) {
     if (current == null) {
       return;
     }
@@ -256,14 +279,39 @@
   }
 }
 
-class FunctionCallTree {
-  final bool inclusive;
-  final FunctionCallTreeNode root;
-  FunctionCallTree(this.inclusive, this.root) {
+class _FilteredFunctionCallTreeBuilder extends _FilteredCallTreeBuilder {
+  _FilteredFunctionCallTreeBuilder(CallTreeNodeFilter filter,
+                                   FunctionCallTree tree)
+    : super(filter, tree,
+            new FunctionCallTree(tree.inclusive,
+                new FunctionCallTreeNode(tree.root.profileData,
+                                         tree.root.count)));
+
+  _copyNode(FunctionCallTreeNode node) {
+    return new FunctionCallTreeNode(node.profileData, node.count);
+  }
+}
+
+class _FilteredCodeCallTreeBuilder extends _FilteredCallTreeBuilder {
+  _FilteredCodeCallTreeBuilder(CallTreeNodeFilter filter,
+                               CodeCallTree tree)
+    : super(filter, tree,
+            new CodeCallTree(tree.inclusive,
+                new CodeCallTreeNode(tree.root.profileData,
+                                     tree.root.count)));
+
+  _copyNode(CodeCallTreeNode node) {
+    return new CodeCallTreeNode(node.profileData, node.count);
+  }
+}
+
+class FunctionCallTree extends CallTree {
+  FunctionCallTree(bool inclusive, FunctionCallTreeNode root)
+      : super(inclusive, root) {
     _setFunctionPercentage(null, root);
   }
 
-  FunctionCallTree filtered(FunctionCallTreeNodeFilter filter) {
+  FunctionCallTree filtered(CallTreeNodeFilter filter) {
     var treeFilter = new _FilteredFunctionCallTreeBuilder(filter, this);
     treeFilter.build();
     _setFunctionPercentage(null, treeFilter.filtered.root);
@@ -732,7 +780,8 @@
     // Child node count.
     var children = data[_dataCursor++];
     // Create node.
-    var node = new CodeCallTreeNode(code, count, children);
+    var node = new CodeCallTreeNode(code, count);
+    node.children.length = children;
     return node;
   }
 
diff --git a/runtime/observatory/lib/src/elements/class_tree.dart b/runtime/observatory/lib/src/elements/class_tree.dart
index 42de21c..16f6928 100644
--- a/runtime/observatory/lib/src/elements/class_tree.dart
+++ b/runtime/observatory/lib/src/elements/class_tree.dart
@@ -5,6 +5,7 @@
 library class_tree_element;
 
 import 'observatory_element.dart';
+import 'dart:async';
 import 'dart:html';
 import 'package:logging/logging.dart';
 import 'package:observatory/app.dart';
@@ -20,27 +21,92 @@
     assert(cls != null);
   }
 
-  void onShow() {
-    super.onShow();
-    if (children.length == 0) {
-      for (var subclass in cls.subclasses) {
-        if (subclass.isPatch) {
-          continue;
-        }
+  void _addChildren(List<Class> subclasses) {
+    for (var subclass in subclasses) {
+      if (subclass.isPatch) {
+        continue;
+      }
+      if (subclass.mixin != null) {
+        _addChildren(subclass.subclasses);
+      } else {
         var row = new ClassTreeRow(isolate, subclass, tree, this);
         children.add(row);
       }
     }
+  }
+
+  Future _addMixins(Class cls) async {
+    var classCell = flexColumns[0];
+    if (cls.superclass == null) {
+      return;
+    }
+    bool first = true;
+    while (cls.superclass != null && cls.superclass.mixin != null) {
+      cls = cls.superclass;
+      await cls.mixin.load();
+      var span = new SpanElement();
+      span.style.alignSelf = 'center';
+      span.style.whiteSpace = 'pre';
+      if (first) {
+        span.text = ' with ';
+      } else {
+        span.text = ', ';
+      }
+      classCell.children.add(span);
+      var mixinRef = new Element.tag('class-ref');
+      mixinRef.ref = cls.mixin.typeClass;
+      mixinRef.style.alignSelf = 'center';
+      classCell.children.add(mixinRef);
+      first = false;
+    }
+  }
+
+  Future _addClass(Class cls) async {
     var classCell = flexColumns[0];
     classCell.style.justifyContent = 'flex-start';
     var classRef = new Element.tag('class-ref');
     classRef.ref = cls;
     classRef.style.alignSelf = 'center';
     classCell.children.add(classRef);
+    if (cls.superclass != null && cls.superclass.mixin != null) {
+      await _addMixins(cls);
+    }
+    if (cls.subclasses.isNotEmpty) {
+      var span = new SpanElement();
+      span.style.paddingLeft = '.5em';
+      span.style.alignSelf = 'center';
+      int subclassCount = _indirectSubclassCount(cls) - 1;
+      if (subclassCount > 1) {
+        span.text = '($subclassCount subclasses)';
+      } else {
+        span.text = '($subclassCount subclass)';
+      }
+      classCell.children.add(span);
+    }
+  }
+
+  void onShow() {
+    super.onShow();
+    if (children.length == 0) {
+      _addChildren(cls.subclasses);
+    }
+    _addClass(cls);
+  }
+
+  static int _indirectSubclassCount(var cls) {
+    int count = 0;
+    if (cls.mixin == null) {
+      // Don't count synthetic mixin classes in subclass count.
+      count++;
+    }
+    for (var subclass in cls.subclasses) {
+      count += _indirectSubclassCount(subclass);
+    }
+    return count;
   }
 
   bool hasChildren() {
-    return cls.subclasses.length > 0;
+    return cls.subclasses.isNotEmpty;
   }
 }
 
diff --git a/runtime/observatory/lib/src/elements/class_view.dart b/runtime/observatory/lib/src/elements/class_view.dart
index d50b092..c13cbb3 100644
--- a/runtime/observatory/lib/src/elements/class_view.dart
+++ b/runtime/observatory/lib/src/elements/class_view.dart
@@ -35,7 +35,7 @@
   }
 
   Future<ServiceObject> retainedToplist(var limit) {
-    return cls.isolate.fetchHeapSnapshot().last
+    return cls.isolate.fetchHeapSnapshot(true).last
       .then((HeapSnapshot snapshot) =>
           Future.wait(snapshot.getMostRetained(classId: cls.vmCid,
                                                limit: 10)))
diff --git a/runtime/observatory/lib/src/elements/class_view.html b/runtime/observatory/lib/src/elements/class_view.html
index 60e8ee0..a40ef165d 100644
--- a/runtime/observatory/lib/src/elements/class_view.html
+++ b/runtime/observatory/lib/src/elements/class_view.html
@@ -35,6 +35,9 @@
         <template if="{{ cls.isPatch }}">
           patch
         </template>
+        <template if="{{ cls.mixin != null }}">
+          mixin
+        </template>
         class {{ cls.name }}
       </h1>
 
@@ -59,12 +62,28 @@
 
         <template if="{{ cls.superclass != null }}">
           <div class="memberItem">
-            <div class="memberName">extends</div>
+            <div class="memberName">superclass</div>
             <div class="memberValue">
               <class-ref ref="{{ cls.superclass }}"></class-ref>
             </div>
           </div>
         </template>
+        <template if="{{ cls.superType != null }}">
+          <div class="memberItem">
+            <div class="memberName">supertype</div>
+            <div class="memberValue">
+              <instance-ref ref="{{ cls.superType }}"></instance-ref>
+            </div>
+          </div>
+        </template>
+        <template if="{{ cls.mixin != null }}">
+          <div class="memberItem">
+            <div class="memberName">mixin</div>
+            <div class="memberValue">
+              <instance-ref ref="{{ cls.mixin }}"></instance-ref>
+            </div>
+          </div>
+        </template>
         <template if="{{ cls.subclasses.length > 0 }}">
           <div class="memberItem">
             <div class="memberName">extended by</div>
diff --git a/runtime/observatory/lib/src/elements/code_view.dart b/runtime/observatory/lib/src/elements/code_view.dart
index 9234164..d8fa1c7 100644
--- a/runtime/observatory/lib/src/elements/code_view.dart
+++ b/runtime/observatory/lib/src/elements/code_view.dart
@@ -210,7 +210,7 @@
       if (content is ServiceObject) {
         ServiceRefElement element = new Element.tag('any-service-ref');
         element.ref = content;
-        cell.append(element);
+        cell.children = [element];
       } else if (content != null) {
         cell.text = content.toString();
       }
diff --git a/runtime/observatory/lib/src/elements/cpu_profile.dart b/runtime/observatory/lib/src/elements/cpu_profile.dart
index c026d7c..e9d9805 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile.dart
+++ b/runtime/observatory/lib/src/elements/cpu_profile.dart
@@ -547,26 +547,167 @@
 class StackTraceTreeConfigElement extends ObservatoryElement {
   StackTraceTreeConfigElement.created() : super.created();
 
+  attached() {
+    super.attached();
+    var filterElement = shadowRoot.querySelector('#filterInput');
+    keyDownSubscription = filterElement.onKeyDown.listen(_onKeyDown);
+    blurSubscription = filterElement.onBlur.listen(_onBlur);
+  }
+
+  detached() {
+    super.detached();
+    keyDownSubscription?.cancel();
+    blurSubscription?.cancel();
+  }
+
+  void _onKeyDown(KeyboardEvent keyEvent) {
+    if (keyEvent.keyCode == 13) {
+      // On enter, update the filter string.
+      filterString =
+          (shadowRoot.querySelector('#filterInput') as InputElement).value;
+      if (onTreeConfigChange == null) {
+        return;
+      }
+      onTreeConfigChange(modeSelector, directionSelector, filterString);
+    }
+  }
+
+  void _onBlur(Event event) {
+    // Input box has lost focus, update the display to match the active
+    // filter string.
+    (shadowRoot.querySelector('#filterInput') as InputElement).value =
+        filterString;
+  }
+
   void modeSelectorChanged(oldValue) {
     if (onTreeConfigChange == null) {
       return;
     }
-    onTreeConfigChange(modeSelector, directionSelector);
+    onTreeConfigChange(modeSelector, directionSelector, filterString);
   }
 
   void directionSelectorChanged(oldValue) {
     if (onTreeConfigChange == null) {
       return;
     }
-    onTreeConfigChange(modeSelector, directionSelector);
+    onTreeConfigChange(modeSelector, directionSelector, filterString);
   }
 
   Function onTreeConfigChange;
+  StreamSubscription keyDownSubscription;
+  StreamSubscription blurSubscription;
   @observable bool show = true;
   @observable bool showModeSelector = true;
   @observable bool showDirectionSelector = true;
+  @observable bool showFilter = true;
   @observable String modeSelector = 'Function';
   @observable String directionSelector = 'Up';
+  @observable String filterString;
+}
+
+class FunctionCallTreeNodeRow extends VirtualTreeRow {
+  final CpuProfile profile;
+  final FunctionCallTreeNode node;
+  final String selfPercent;
+  final String totalPercent;
+  final String percent;
+
+  FunctionCallTreeNodeRow(VirtualTree tree,
+                          int depth,
+                          this.profile,
+                          FunctionCallTreeNode node)
+      : node = node,
+        selfPercent = Utils.formatPercentNormalized(node.profileFunction.normalizedExclusiveTicks),
+        totalPercent = Utils.formatPercentNormalized(node.profileFunction.normalizedInclusiveTicks),
+        percent = Utils.formatPercentNormalized(node.percentage),
+        super(tree, depth) {
+  }
+
+  void onRender(DivElement rowDiv) {
+    rowDiv.children.add(makeGap(ems:0.1));
+    rowDiv.children.add(
+        makeText(totalPercent, toolTip: 'global % on stack'));
+    rowDiv.children.add(makeGap());
+    rowDiv.children.add(
+        makeText(selfPercent, toolTip: 'global % executing'));
+    rowDiv.children.add(makeGap());
+    rowDiv.children.add(makeIndenter(colored: false));
+    rowDiv.children.add(makeColorBar());
+    rowDiv.children.add(makeGap(ems: 1.0));
+    rowDiv.children.add(makeExpander());
+    rowDiv.children.add(
+        makeText(percent, toolTip: 'tree node %', flexBasis: null));
+    rowDiv.children.add(makeGap(ems: 0.5));
+    functionRef.ref = node.profileFunction.function;
+    rowDiv.children.add(functionRef);
+  }
+
+  var functionRef = new Element.tag('function-ref');
+
+  int get childCount => node.children.length;
+
+  void onShow() {
+    if (children.length > 0) {
+      return;
+    }
+    for (var childNode in node.children) {
+      var row = new FunctionCallTreeNodeRow(tree, depth + 1, profile, childNode);
+      children.add(row);
+    }
+  }
+}
+
+
+class CodeCallTreeNodeRow extends VirtualTreeRow {
+  final CpuProfile profile;
+  final CodeCallTreeNode node;
+  final String selfPercent;
+  final String totalPercent;
+  final String percent;
+
+  CodeCallTreeNodeRow(VirtualTree tree,
+                      int depth,
+                      this.profile,
+                      CodeCallTreeNode node)
+      : node = node,
+        selfPercent = Utils.formatPercentNormalized(node.profileCode.normalizedExclusiveTicks),
+        totalPercent = Utils.formatPercentNormalized(node.profileCode.normalizedInclusiveTicks),
+        percent = Utils.formatPercentNormalized(node.percentage),
+        super(tree, depth) {
+  }
+
+  void onRender(DivElement rowDiv) {
+    rowDiv.children.add(makeGap(ems:0.1));
+    rowDiv.children.add(
+        makeText(totalPercent, toolTip: 'global % on stack'));
+    rowDiv.children.add(makeGap());
+    rowDiv.children.add(
+        makeText(selfPercent, toolTip: 'global % executing'));
+    rowDiv.children.add(makeGap());
+    rowDiv.children.add(makeIndenter(colored: false));
+    rowDiv.children.add(makeColorBar());
+    rowDiv.children.add(makeGap(ems: 1.0));
+    rowDiv.children.add(makeExpander());
+    rowDiv.children.add(
+        makeText(percent, toolTip: 'tree node %', flexBasis: null));
+    rowDiv.children.add(makeGap(ems: 0.5));
+    codeRef.ref = node.profileCode.code;
+    rowDiv.children.add(codeRef);
+  }
+
+  var codeRef = new Element.tag('code-ref');
+
+  int get childCount => node.children.length;
+
+  void onShow() {
+    if (children.length > 0) {
+      return;
+    }
+    for (var childNode in node.children) {
+      var row = new CodeCallTreeNodeRow(tree, depth + 1, profile, childNode);
+      children.add(row);
+    }
+  }
 }
 
 /// Displays a CpuProfile
@@ -587,10 +728,31 @@
         shadowRoot.querySelector('#stackTraceTreeConfig');
     assert(stackTraceTreeConfigElement != null);
     stackTraceTreeConfigElement.onTreeConfigChange = onTreeConfigChange;
-    cpuProfileTreeElement = shadowRoot.querySelector('#cpuProfileTree');
-    assert(cpuProfileTreeElement != null);
-    cpuProfileTreeElement.profile = sampleBufferControlElement.profile;
+    cpuProfileVirtualTreeElement = shadowRoot.querySelector('#cpuProfileVirtualTree');
+    assert(cpuProfileVirtualTreeElement != null);
+    cpuProfileVirtualTreeElement.profile = sampleBufferControlElement.profile;
+    _resizeSubscription = window.onResize.listen((_) => _updateSize());
     _updateTask.queue();
+    _updateSize();
+  }
+
+  detached() {
+    super.detached();
+    if (_resizeSubscription != null) {
+      _resizeSubscription.cancel();
+    }
+  }
+
+  _updateSize() {
+    var applySize = (e) {
+      Rectangle rect = e.getBoundingClientRect();
+      final totalHeight = window.innerHeight;
+      final bottomMargin = 200;
+      final mainHeight = totalHeight - bottomMargin;
+      e.style.setProperty('height', '${mainHeight}px');
+    };
+    HtmlElement e2 = $['cpuProfileVirtualTree'];
+    applySize(e2);
   }
 
   isolateChanged(oldValue) {
@@ -607,7 +769,9 @@
     _renderTask.queue();
   }
 
-  onTreeConfigChange(String modeSelector, String directionSelector) {
+  onTreeConfigChange(String modeSelector,
+                     String directionSelector,
+                     String filterString) {
     ProfileTreeDirection direction = ProfileTreeDirection.Exclusive;
     if (directionSelector != 'Up') {
       direction = ProfileTreeDirection.Inclusive;
@@ -616,8 +780,18 @@
     if (modeSelector == 'Code') {
       mode = ProfileTreeMode.Code;
     }
-    cpuProfileTreeElement.direction = direction;
-    cpuProfileTreeElement.mode = mode;
+    // Clear the filter.
+    cpuProfileVirtualTreeElement.filter = null;
+    if (filterString != null) {
+      filterString = filterString.trim();
+      if (filterString.isNotEmpty) {
+        cpuProfileVirtualTreeElement.filter = (CallTreeNode node) {
+          return node.name.contains(filterString);
+        };
+      }
+    }
+    cpuProfileVirtualTreeElement.direction = direction;
+    cpuProfileVirtualTreeElement.mode = mode;
     _renderTask.queue();
   }
 
@@ -633,16 +807,17 @@
   }
 
   render() {
-    cpuProfileTreeElement.render();
+    cpuProfileVirtualTreeElement.render();
   }
 
   @published Isolate isolate;
 
+  StreamSubscription _resizeSubscription;
   Task _updateTask;
   Task _renderTask;
   SampleBufferControlElement sampleBufferControlElement;
   StackTraceTreeConfigElement stackTraceTreeConfigElement;
-  CpuProfileTreeElement cpuProfileTreeElement;
+  CpuProfileVirtualTreeElement cpuProfileVirtualTreeElement;
 }
 
 class NameSortedTable extends SortedTable {
@@ -841,7 +1016,9 @@
     _renderTask.queue();
   }
 
-  onTreeConfigChange(String modeSelector, String directionSelector) {
+  onTreeConfigChange(String modeSelector,
+                     String directionSelector,
+                     String filterString) {
     ProfileTreeDirection direction = ProfileTreeDirection.Exclusive;
     if (directionSelector != 'Up') {
       direction = ProfileTreeDirection.Inclusive;
@@ -1140,6 +1317,107 @@
   Function,
 }
 
+@CustomTag('cpu-profile-virtual-tree')
+class CpuProfileVirtualTreeElement extends ObservatoryElement {
+  ProfileTreeDirection direction = ProfileTreeDirection.Exclusive;
+  ProfileTreeMode mode = ProfileTreeMode.Function;
+  CpuProfile profile;
+  VirtualTree virtualTree;
+  CallTreeNodeFilter filter;
+  StreamSubscription _resizeSubscription;
+  @observable bool show = true;
+
+  CpuProfileVirtualTreeElement.created() : super.created();
+
+  attached() {
+    super.attached();
+    _resizeSubscription = window.onResize.listen((_) => _updateSize());
+  }
+
+  detached() {
+    super.detached();
+    _resizeSubscription?.cancel();
+  }
+
+  void render() {
+    _updateView();
+  }
+
+  showChanged(oldValue) {
+    var treeTable = shadowRoot.querySelector('#treeTable');
+    assert(treeTable != null);
+    treeTable.style.display = show ? 'table' : 'none';
+  }
+
+  void _updateView() {
+    _updateSize();
+    virtualTree?.clear();
+    virtualTree?.uninstall();
+    virtualTree = null;
+    bool exclusive = direction == ProfileTreeDirection.Exclusive;
+    if (mode == ProfileTreeMode.Code) {
+      _buildCodeTree(exclusive);
+    } else {
+      assert(mode == ProfileTreeMode.Function);
+      _buildFunctionTree(exclusive);
+    }
+    virtualTree?.refresh();
+  }
+
+  void _updateSize() {
+    var treeBody = shadowRoot.querySelector('#tree');
+    assert(treeBody != null);
+    int windowHeight = window.innerHeight - 32;
+    treeBody.style.height = '${windowHeight}px';
+  }
+
+  void _buildFunctionTree(bool exclusive) {
+    var treeBody = shadowRoot.querySelector('#tree');
+    assert(treeBody != null);
+    virtualTree = new VirtualTree(32, treeBody);
+    if (profile == null) {
+      return;
+    }
+    var tree = profile.loadFunctionTree(exclusive ? 'exclusive' : 'inclusive');
+    if (tree == null) {
+      return;
+    }
+    if (filter != null) {
+      tree = tree.filtered(filter);
+    }
+    for (var child in tree.root.children) {
+      virtualTree.rows.add(
+          new FunctionCallTreeNodeRow(virtualTree, 0, profile, child));
+    }
+    if (virtualTree.rows.length == 1) {
+      virtualTree.rows[0].expanded = true;
+    }
+  }
+
+  void _buildCodeTree(bool exclusive) {
+    var treeBody = shadowRoot.querySelector('#tree');
+    assert(treeBody != null);
+    virtualTree = new VirtualTree(32, treeBody);
+    if (profile == null) {
+      return;
+    }
+    var tree = profile.loadCodeTree(exclusive ? 'exclusive' : 'inclusive');
+    if (tree == null) {
+      return;
+    }
+    if (filter != null) {
+      tree = tree.filtered(filter);
+    }
+    for (var child in tree.root.children) {
+      virtualTree.rows.add(
+          new CodeCallTreeNodeRow(virtualTree, 0, profile, child));
+    }
+    if (virtualTree.rows.length == 1) {
+      virtualTree.rows[0].expanded = true;
+    }
+  }
+}
+
 @CustomTag('cpu-profile-tree')
 class CpuProfileTreeElement extends ObservatoryElement {
   ProfileTreeDirection direction = ProfileTreeDirection.Exclusive;
@@ -1147,7 +1425,7 @@
   CpuProfile profile;
   TableTree codeTree;
   TableTree functionTree;
-  FunctionCallTreeNodeFilter functionFilter;
+  CallTreeNodeFilter functionFilter;
   @observable bool show = true;
 
   CpuProfileTreeElement.created() : super.created();
diff --git a/runtime/observatory/lib/src/elements/cpu_profile.html b/runtime/observatory/lib/src/elements/cpu_profile.html
index d76cb19..b5f2432 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile.html
+++ b/runtime/observatory/lib/src/elements/cpu_profile.html
@@ -113,53 +113,62 @@
     <style>
     .statusBox {
       height: 100%;
-      padding: 1em;
+      padding: 0.5em;
+    }
+    .row {
+      display: flex;
     }
     </style>
     <div class="content-centered-big">
       <template if="{{ show }}">
         <h2>Tree display</h2>
         <hr>
-        <div class="memberList">
-          <template if="{{ showModeSelector }}">
-            <div class="memberItem">
-              <div class="memberName">Mode</div>
-              <div class="memberValue">
-                <select value="{{modeSelector}}">
-                  <option value="Code">Code</option>
-                  <option value="Function">Function</option>
-                </select>
-              </div>
+        <div class="row">
+          <div>
+            <div class="memberList">
+              <template if="{{ showModeSelector }}">
+                <div class="memberItem">
+                  <div class="memberName">Mode</div>
+                  <div class="memberValue">
+                    <select value="{{modeSelector}}">
+                      <option value="Code">Code</option>
+                      <option value="Function">Function</option>
+                    </select>
+                  </div>
+                </div>
+              </template>
+              <template if="{{ showDirectionSelector }}">
+                <div class="memberItem">
+                  <div class="memberName">Call Tree Direction</div>
+                  <span class="memberValue">
+                    <select value="{{directionSelector}}">
+                      <option value="Down">Top down</option>
+                      <option value="Up">Bottom up</option>
+                    </select>
+                    <template if="{{ directionSelector == 'Down' }}">
+                      <span>
+                        Tree is rooted at "main". Child nodes are callees.
+                      </span>
+                    </template>
+                    <template if="{{ directionSelector == 'Up' }}">
+                      <span>
+                        Tree is rooted at executing function / code. Child nodes are callers.
+                      </span>
+                    </template>
+                  </span>
+                </div>
+              </template>
+              <template if="{{ showFilter }}">
+                <div class="memberItem">
+                  <div title="case-sensitive substring match" class="memberName">Call Tree Filter</div>
+                  <span class="memberValue">
+                    <input type="text" placeholder="Search filter" id="filterInput">
+                  </span>
+                </div>
+              </template>
             </div>
-          </template>
-          <template if="{{ showDirectionSelector }}">
-            <div class="memberItem">
-              <div class="memberName">Call Tree Direction</div>
-              <div class="memberValue">
-                <select value="{{directionSelector}}">
-                  <option value="Down">Top down</option>
-                  <option value="Up">Bottom up</option>
-                </select>
-              </div>
-            </div>
-          </template>
+          </div>
         </div>
-        <template if="{{ directionSelector == 'Down' }}">
-          <br>
-          <div class="statusBox shadow">
-            <div>Tree is rooted at main.</div>
-            <br>
-            <div>Child nodes are callees.</div>
-          </div>
-        </template>
-        <template if="{{ directionSelector == 'Up' }}">
-          <br>
-          <div class="statusBox shadow">
-            <div>Tree is rooted at executing function / code.</div>
-            <br>
-            <div>Child nodes are callers.</div>
-          </div>
-        </template>
       </template>
     </div>
   </template>
@@ -237,6 +246,20 @@
   </template>
 </polymer-element>
 
+<polymer-element name="cpu-profile-virtual-tree" extends="observatory-element">
+  <template>
+    <link rel="stylesheet" href="css/shared.css">
+    <style>
+    .full {
+      height: 50%;
+      width: 100%;
+    }
+    </style>
+    <div id="tree" class="full"></div>
+  </template>
+</polymer-element>
+
+
 <polymer-element name="cpu-profile-table" extends="observatory-element">
   <template>
     <link rel="stylesheet" href="css/shared.css">
@@ -472,12 +495,7 @@
     <br>
     <stack-trace-tree-config id="stackTraceTreeConfig"></stack-trace-tree-config>
     <br>
-    <div class="content-centered-big">
-      <div class="tableWell shadow">
-        <cpu-profile-tree id="cpuProfileTree"></cpu-profile-tree>
-      </div>
-    </div>
-    <view-footer></view-footer>
+    <cpu-profile-virtual-tree id="cpuProfileVirtualTree"></cpu-profile-virtual-tree>
   </template>
 </polymer-element>
 
diff --git a/runtime/observatory/lib/src/elements/debugger.dart b/runtime/observatory/lib/src/elements/debugger.dart
index 6595447..81541ef 100644
--- a/runtime/observatory/lib/src/elements/debugger.dart
+++ b/runtime/observatory/lib/src/elements/debugger.dart
@@ -1524,7 +1524,9 @@
   }
 
   void _reportPause(ServiceEvent event) {
-    if (event.kind == ServiceEvent.kPauseStart) {
+    if (event.kind == ServiceEvent.kNone) {
+      console.print("Paused until embedder makes the isolate runnable.");
+    } else if (event.kind == ServiceEvent.kPauseStart) {
       console.print(
           "Paused at isolate start "
           "(type 'continue' [F7] or 'step' [F10] to start the isolate')");
diff --git a/runtime/observatory/lib/src/elements/heap_snapshot.dart b/runtime/observatory/lib/src/elements/heap_snapshot.dart
index a9e4a8e..4894e9f 100644
--- a/runtime/observatory/lib/src/elements/heap_snapshot.dart
+++ b/runtime/observatory/lib/src/elements/heap_snapshot.dart
@@ -407,8 +407,12 @@
     var completer = new Completer();
     state = "Requesting heap snapshot...";
     isolate.getClassRefs();
+
+    bool collectGarbage =
+        app.locationManager.getBoolParameter('collectGarbage', true);
+
     var stopwatch = new Stopwatch()..start();
-    isolate.fetchHeapSnapshot().listen((event) {
+    isolate.fetchHeapSnapshot(collectGarbage).listen((event) {
       if (event is String) {
         print("${stopwatch.elapsedMilliseconds} $event");
         state = event;
diff --git a/runtime/observatory/lib/src/elements/instance_view.dart b/runtime/observatory/lib/src/elements/instance_view.dart
index 96a3b74..dda1cc5 100644
--- a/runtime/observatory/lib/src/elements/instance_view.dart
+++ b/runtime/observatory/lib/src/elements/instance_view.dart
@@ -15,6 +15,19 @@
 
   InstanceViewElement.created() : super.created();
 
+  instanceChanged(oldValue) {
+    if (instance != null) {
+      // We load typeClass and typeArguments because we want to
+      // display this info.
+      if (instance.typeClass != null) {
+        instance.typeClass.load();
+      }
+      if (instance.typeArguments != null) {
+        instance.typeArguments.load();
+      }
+    }
+  }
+
   Future<ServiceObject> evaluate(String expression) {
     return instance.evaluate(expression);
   }
diff --git a/runtime/observatory/lib/src/elements/instance_view.html b/runtime/observatory/lib/src/elements/instance_view.html
index f54059f..5e98824 100644
--- a/runtime/observatory/lib/src/elements/instance_view.html
+++ b/runtime/observatory/lib/src/elements/instance_view.html
@@ -69,6 +69,57 @@
               </div>
             </div>
           </template>
+          <template if="{{ instance.typeArguments.length > 0 }}">
+            <div class="memberItem">
+              <div class="memberName">type arguments</div>
+              <div class="memberValue">
+                &lt;
+                <template repeat="{{ index in instance.typeArguments['types'].asMap().keys }}">
+                  <instance-ref ref="{{ instance.typeArguments['types'][index] }}">
+                  </instance-ref>
+                  <template if="{{ index < instance.typeArguments['types'].length - 1 }}">
+                    ,
+                  </template>
+                </template>
+                &gt;
+              </div>
+            </div>
+          </template>
+          <template if="{{ instance.parameterizedClass != null }}">
+            <div class="memberItem">
+              <div class="memberName">parameterized class</div>
+              <div class="memberValue">
+                <class-ref ref="{{ instance.parameterizedClass }}">
+                </class-ref>
+              </div>
+            </div>
+          </template>
+          <template if="{{ instance.parameterIndex != null }}">
+            <div class="memberItem">
+              <div class="memberName">parameter index</div>
+              <div class="memberValue">
+                {{ instance.parameterIndex }}
+              </div>
+            </div>
+          </template>
+          <template if="{{ instance.targetType != null }}">
+            <div class="memberItem">
+              <div class="memberName">target type</div>
+              <div class="memberValue">
+                <instance-ref ref="{{ instance.targetType }}">
+                </instance-ref>
+              </div>
+            </div>
+          </template>
+          <template if="{{ instance.bound != null }}">
+            <div class="memberItem">
+              <div class="memberName">bound</div>
+              <div class="memberValue">
+                <instance-ref ref="{{ instance.bound }}">
+                </instance-ref>
+              </div>
+            </div>
+          </template>
 
           <template if="{{ instance.isClosure }}">
             <div class="memberItem">
@@ -109,6 +160,12 @@
               <eval-link callback="{{ evaluate }}" expr="toString()"></eval-link>
             </div>
           </div>
+          <div class="memberItem">
+            <div class="memberName">runtimeType</div>
+            <div class="memberValue">
+              <eval-link callback="{{ evaluate }}" expr="runtimeType"></eval-link>
+            </div>
+          </div>
         </div>
       </div>
 
@@ -266,6 +323,18 @@
                 <any-service-ref ref="{{ instance.externalTwoByteFunction }}"></any-service-ref>
               </div>
             </div>
+            <div class="memberItem">
+              <div class="memberName">oneByteBytecode</div>
+              <div class="memberValue">
+                <any-service-ref ref="{{ instance.oneByteBytecode }}"></any-service-ref>
+              </div>
+            </div>
+            <div class="memberItem">
+              <div class="memberName">twoByteBytecode</div>
+              <div class="memberValue">
+                <any-service-ref ref="{{ instance.twoByteBytecode }}"></any-service-ref>
+              </div>
+            </div>
           </div>
         </template>
 
@@ -300,6 +369,9 @@
         <template if="{{ instance.isClosure }}">
           <source-inset location="{{ instance.function.location }}"></source-inset>
         </template>
+        <template if="{{ instance.typeClass != null }}">
+          <source-inset location="{{ instance.typeClass.location }}"></source-inset>
+        </template>
       </div>
 
     </template>
diff --git a/runtime/observatory/lib/src/elements/isolate_summary.html b/runtime/observatory/lib/src/elements/isolate_summary.html
index 64361ed..c089da9 100644
--- a/runtime/observatory/lib/src/elements/isolate_summary.html
+++ b/runtime/observatory/lib/src/elements/isolate_summary.html
@@ -55,6 +55,10 @@
         at isolate exit
       </template>
 
+      <template if="{{ isolate.pauseEvent.kind == 'None' }}">
+        not yet runnable
+      </template>
+
       <template if="{{ isolate.pauseEvent.kind == 'PauseInterrupted' ||
                        isolate.pauseEvent.kind == 'PauseBreakpoint' ||
                        isolate.pauseEvent.kind == 'PauseException' }}">
diff --git a/runtime/observatory/lib/src/elements/isolate_view.html b/runtime/observatory/lib/src/elements/isolate_view.html
index b090fdd..a2fe66d 100644
--- a/runtime/observatory/lib/src/elements/isolate_view.html
+++ b/runtime/observatory/lib/src/elements/isolate_view.html
@@ -90,6 +90,10 @@
               <div class="memberName">isolate id</div>
               <div class="memberValue">{{ isolate.number }}</div>
             </div>
+            <div class="memberItem">
+              <div class="memberName">service protocol extensions</div>
+              <div class="memberValue">{{ isolate.extensionRPCs }}</div>
+            </div>
           </div>
         </div>
       </div>
diff --git a/runtime/observatory/lib/src/elements/nav_bar.html b/runtime/observatory/lib/src/elements/nav_bar.html
index 4299d0c..983f8af 100644
--- a/runtime/observatory/lib/src/elements/nav_bar.html
+++ b/runtime/observatory/lib/src/elements/nav_bar.html
@@ -386,7 +386,7 @@
         margin-top: 10px;
         margin-right: 10px;
         padding-right: 25px;
-        width: 250px;
+        width: 500px;
         color: #ddd;
         background: rgba(0,0,0,.6);
         border: solid 2px white;
@@ -428,6 +428,9 @@
       a.boxclose:hover {
         background: rgba(255,255,255,0.5);
       }
+      .stacktrace {
+        white-space: pre
+      }
     </style>
     <template if="{{ isUnexpectedError }}">
       <!-- TODO(turnidge): Add a file-a-bug link to this notification -->
@@ -436,7 +439,7 @@
         <div class="indent">{{ exception.toString() }}</div><br>
         <template if="{{ stacktrace != null }}">
           Stacktrace:<br><br>
-          <div class="indent">{{ stacktrace.toString() }}</div>
+          <div class="indent stacktrace">{{ stacktrace.toString() }}</div>
           <br>
         </template>
         [<a class="link" on-click="{{ goto }}"
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
index aa3c0a8..1b94f38 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -361,6 +361,46 @@
   }
 }
 
+class ScriptLineProfile {
+  ScriptLineProfile(this.line, this.sampleCount);
+
+  static const kHotThreshold = 0.05;  // 5%.
+  static const kMediumThreshold = 0.02;  // 2%.
+
+  final int line;
+  final int sampleCount;
+
+  int selfTicks = 0;
+  int totalTicks = 0;
+
+  void process(int exclusive, int inclusive) {
+    selfTicks += exclusive;
+    totalTicks += inclusive;
+  }
+
+  String get formattedSelfTicks {
+    return Utils.formatPercent(selfTicks, sampleCount);
+  }
+
+  String get formattedTotalTicks {
+    return Utils.formatPercent(totalTicks, sampleCount);
+  }
+
+  double _percent(bool self) {
+    if (sampleCount == 0) {
+      return 0.0;
+    }
+    if (self) {
+      return selfTicks / sampleCount;
+    } else {
+      return totalTicks / sampleCount;
+    }
+  }
+
+  bool isHot(bool self) => _percent(self) > kHotThreshold;
+  bool isMedium(bool self) => _percent(self) > kMediumThreshold;
+}
+
 /// Box with script source code in it.
 @CustomTag('script-inset')
 class ScriptInsetElement extends ObservatoryElement {
@@ -378,6 +418,7 @@
 
   @published Element scroller;
   RefreshButtonElement _refreshButton;
+  ToggleButtonElement _toggleProfileButton;
 
   int _currentLine;
   int _currentCol;
@@ -387,6 +428,7 @@
   Map<int, List<ServiceMap>> _rangeMap = {};
   Set _callSites = new Set<CallSite>();
   Set _possibleBreakpointLines = new Set<int>();
+  Map<int, ScriptLineProfile> _profileMap = {};
 
   var annotations = [];
   var annotationsCursor;
@@ -396,6 +438,7 @@
   StreamSubscription _scrollSubscription;
 
   bool hasLoadedLibraryDeclarations = false;
+  bool _includeProfile = false;
 
   String makeLineId(int line) {
     return 'line-$line';
@@ -435,13 +478,17 @@
   }
 
   void _onScroll(event) {
-    if (_refreshButton == null) {
-      return;
+    if (_refreshButton != null) {
+      var newTop = _buttonTop(_refreshButton);
+      if (_refreshButton.style.top != newTop) {
+        _refreshButton.style.top = '${newTop}px';
+      }
     }
-    var currentTop = _refreshButton.style.top;
-    var newTop = _refreshButtonTop();
-    if (currentTop != newTop) {
-      _refreshButton.style.top = '${newTop}px';
+    if (_toggleProfileButton != null) {
+      var newTop = _buttonTop(_toggleProfileButton);
+      if (_toggleProfileButton.style.top != newTop) {
+        _toggleProfileButton.style.top = '${newTop}px';
+      }
     }
   }
 
@@ -535,12 +582,18 @@
 
   // Build _rangeMap and _callSites from a source report.
   Future _refreshSourceReport() async {
+    var reports = [Isolate.kCallSitesReport,
+                   Isolate.kPossibleBreakpointsReport];
+    if (_includeProfile) {
+      reports.add(Isolate.kProfileReport);
+    }
     var sourceReport = await script.isolate.getSourceReport(
-        [Isolate.kCallSitesReport, Isolate.kPossibleBreakpointsReport],
+        reports,
         script, startPos, endPos);
     _possibleBreakpointLines = getPossibleBreakpointLines(sourceReport, script);
     _rangeMap.clear();
     _callSites.clear();
+    _profileMap.clear();
     for (var range in sourceReport['ranges']) {
       int startLine = script.tokenToLine(range['startPos']);
       int endLine = script.tokenToLine(range['endPos']);
@@ -552,6 +605,28 @@
           rangeList.add(range);
         }
       }
+      if (_includeProfile && range['profile'] != null) {
+        List positions = range['profile']['positions'];
+        List exclusiveTicks = range['profile']['exclusiveTicks'];
+        List inclusiveTicks = range['profile']['inclusiveTicks'];
+        int sampleCount = range['profile']['metadata']['sampleCount'];
+        assert(positions.length == exclusiveTicks.length);
+        assert(positions.length == inclusiveTicks.length);
+        for (int i = 0; i < positions.length; i++) {
+          if (positions[i] is String) {
+            // String positions are classifying token positions.
+            // TODO(johnmccutchan): Add classifier data to UI.
+            continue;
+          }
+          int line = script.tokenToLine(positions[i]);
+          ScriptLineProfile lineProfile = _profileMap[line];
+          if (lineProfile == null) {
+            lineProfile = new ScriptLineProfile(line, sampleCount);
+            _profileMap[line] = lineProfile;
+          }
+          lineProfile.process(exclusiveTicks[i], inclusiveTicks[i]);
+        }
+      }
       if (range['compiled']) {
         var rangeCallSites = range['callSites'];
         if (rangeCallSites != null) {
@@ -901,14 +976,14 @@
     }
   }
 
-  int _refreshButtonTop() {
-    if (_refreshButton == null) {
+  int _buttonTop(Element element) {
+    if (element == null) {
       return 5;
     }
     const padding = 5;
     const navbarHeight = NavBarElement.height;
     var rect = getBoundingClientRect();
-    var buttonHeight = _refreshButton.clientHeight;
+    var buttonHeight = element.clientHeight;
     return min(max(0, navbarHeight - rect.top) + padding,
                rect.height - (buttonHeight + padding));
   }
@@ -917,9 +992,37 @@
     var button = new Element.tag('refresh-button');
     button.style.position = 'absolute';
     button.style.display = 'inline-block';
-    button.style.top = '${_refreshButtonTop()}px';
+    button.style.top = '${_buttonTop(null)}px';
     button.style.right = '5px';
     button.callback = _refresh;
+    button.title = 'Refresh coverage';
+    return button;
+  }
+
+  ToggleButtonElement _newToggleProfileButton() {
+    ToggleButtonElement button = new Element.tag('toggle-button');
+    button.style.position = 'absolute';
+    button.style.display = 'inline-block';
+    button.style.top = '${_buttonTop(null)}px';
+    button.style.right = '30px';
+    button.title = 'Toggle CPU profile information';
+    final String enabledColor = 'black';
+    final String disabledColor = 'rgba(0, 0, 0 ,.3)';
+    button.callback = (enabled) async {
+      _includeProfile = enabled;
+      if (button.children.length > 0) {
+        var content = button.children[0];
+        if (enabled) {
+          content.style.color = enabledColor;
+        } else {
+          content.style.color = disabledColor;
+        }
+      }
+      await update();
+    };
+    button.children.add(new Element.tag('icon-whatshot'));
+    button.children[0].style.color = disabledColor;
+    button.enabled = _includeProfile;
     return button;
   }
 
@@ -928,7 +1031,9 @@
     table.classes.add("sourceTable");
 
     _refreshButton = _newRefreshButton();
+    _toggleProfileButton = _newToggleProfileButton();
     table.append(_refreshButton);
+    table.append(_toggleProfileButton);
 
     if (_startLine == null || _endLine == null) {
       return table;
@@ -996,10 +1101,60 @@
     e.classes.add("sourceRow");
     e.append(lineBreakpointElement(line));
     e.append(lineNumberElement(line, lineNumPad));
+    if (_includeProfile) {
+      e.append(lineProfileElement(line, false));
+      e.append(lineProfileElement(line, true));
+    }
     e.append(lineSourceElement(line));
     return e;
   }
 
+  Element lineProfileElement(ScriptLine line, bool self) {
+    var e = span('');
+    e.classes.add('noCopy');
+    if (self) {
+      e.title = 'Self %';
+    } else {
+      e.title = 'Total %';
+    }
+
+    if (line == null) {
+      e.classes.add('notSourceProfile');
+      e.text = nbsp;
+      return e;
+    }
+
+    var ranges = _rangeMap[line.line];
+    if ((ranges == null) || ranges.isEmpty) {
+      e.classes.add('notSourceProfile');
+      e.text = nbsp;
+      return e;
+    }
+
+    ScriptLineProfile lineProfile = _profileMap[line.line];
+    if (lineProfile == null) {
+      e.classes.add('noProfile');
+      e.text = nbsp;
+      return e;
+    }
+
+    if (self) {
+      e.text = lineProfile.formattedSelfTicks;
+    } else {
+      e.text = lineProfile.formattedTotalTicks;
+    }
+
+    if (lineProfile.isHot(self)) {
+      e.classes.add('hotProfile');
+    } else if (lineProfile.isMedium(self)) {
+      e.classes.add('mediumProfile');
+    } else {
+      e.classes.add('coldProfile');
+    }
+
+    return e;
+  }
+
   Element lineBreakpointElement(ScriptLine line) {
     var e = new DivElement();
     if (line == null || !_possibleBreakpointLines.contains(line.line)) {
@@ -1191,6 +1346,22 @@
 }
 
 
+@CustomTag('toggle-button')
+class ToggleButtonElement extends PolymerElement {
+  ToggleButtonElement.created() : super.created();
+
+  @published var callback = null;
+  @observable bool enabled = false;
+
+  Future buttonClick(var event, var b, var c) async {
+    enabled = !enabled;
+    if (callback != null) {
+      await callback(enabled);
+    }
+  }
+}
+
+
 @CustomTag('source-inset')
 class SourceInsetElement extends PolymerElement {
   SourceInsetElement.created() : super.created();
diff --git a/runtime/observatory/lib/src/elements/script_inset.html b/runtime/observatory/lib/src/elements/script_inset.html
index 92d2940..dd21155 100644
--- a/runtime/observatory/lib/src/elements/script_inset.html
+++ b/runtime/observatory/lib/src/elements/script_inset.html
@@ -14,6 +14,19 @@
   </template>
 </polymer-element>
 
+<polymer-element name="icon-whatshot" noscript>
+  <template>
+    <style>
+      svg {
+        fill: currentColor
+      }
+    </style>
+    <svg width="24" height="24">
+      <path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"></path>
+    </svg>
+  </template>
+</polymer-element>
+
 <polymer-element name="script-inset" extends="observatory-element">
   <template>
     <style>
@@ -116,6 +129,30 @@
         color: white;
         background-color: #e66;
       }
+      .notSourceProfile, .noProfile, .coldProfile, .mediumProfile, .hotProfile {
+        display: table-cell;
+        vertical-align: top;
+        font: 400 14px consolas, courier, monospace;
+        width: 4em;
+        text-align: right;
+        cursor: pointer;
+        margin-left: 5px;
+        margin-right: 5px;
+      }
+      .notSourceProfile {
+      }
+      .noProfile {
+        background-color: #e0e0e0;
+      }
+      .coldProfile {
+        background-color: #aea;
+      }
+      .mediumProfile {
+        background-color: #fe9;
+      }
+      .hotProfile {
+        background-color: #faa;
+      }
     </style>
   </template>
 </polymer-element>
@@ -148,6 +185,25 @@
   </template>
 </polymer-element>
 
+<polymer-element name="toggle-button">
+  <template>
+    <style>
+    </style>
+    <template if="{{ callback != null }}">
+      <template if="{{ enabled }}">
+        <a on-click="{{ buttonClick }}">
+          <content></content>
+        </a>
+      </template>
+      <template if="{{ !enabled }}">
+        <a on-click="{{ buttonClick }}">
+          <content></content>
+        </a>
+      </template>
+    </template>
+  </template>
+</polymer-element>
+
 <polymer-element name="source-inset">
 <template>
   <template if="{{ location != null }}">
diff --git a/runtime/observatory/lib/src/elements/timeline_page.dart b/runtime/observatory/lib/src/elements/timeline_page.dart
index 7a70c11..cc66f9a 100644
--- a/runtime/observatory/lib/src/elements/timeline_page.dart
+++ b/runtime/observatory/lib/src/elements/timeline_page.dart
@@ -8,6 +8,7 @@
 import 'dart:convert';
 import 'dart:html';
 import 'observatory_element.dart';
+import 'package:observatory/elements.dart';
 import 'package:observatory/service_html.dart';
 import 'package:polymer/polymer.dart';
 
@@ -20,6 +21,9 @@
     super.attached();
     _resizeSubscription = window.onResize.listen((_) => _updateSize());
     _updateSize();
+    // Click refresh button.
+    NavRefreshElement refreshButton = $['refresh'];
+    refreshButton.buttonClick(null, null, null);
   }
 
   detached() {
@@ -47,6 +51,8 @@
   }
 
   Future refresh() async {
+    await app.vm.reload();
+    await app.vm.reloadIsolates();
     return postMessage('refresh');
   }
 
diff --git a/runtime/observatory/lib/src/elements/timeline_page.html b/runtime/observatory/lib/src/elements/timeline_page.html
index d0a2bcd..d142088 100644
--- a/runtime/observatory/lib/src/elements/timeline_page.html
+++ b/runtime/observatory/lib/src/elements/timeline_page.html
@@ -11,7 +11,7 @@
       <top-nav-menu></top-nav-menu>
       <vm-nav-menu vm="{{ app.vm }}"></vm-nav-menu>
       <nav-menu link="{{ makeLink('/timeline') }}" anchor="timeline" last="{{ true }}"></nav-menu>
-      <nav-refresh callback="{{ refresh }}"></nav-refresh>
+      <nav-refresh id="refresh" callback="{{ refresh }}"></nav-refresh>
       <nav-refresh callback="{{ clear }}" label="Clear"></nav-refresh>
       <nav-refresh callback="{{ recordOn }}" label="Start recording"></nav-refresh>
       <nav-refresh callback="{{ recordOff }}" label="Stop recording"></nav-refresh>
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index b3a06b9..0797007 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -849,6 +849,7 @@
   // Well-known stream ids.
   static const kVMStream = 'VM';
   static const kIsolateStream = 'Isolate';
+  static const kTimelineStream = 'Timeline';
   static const kDebugStream = 'Debug';
   static const kGCStream = 'GC';
   static const kStdoutStream = 'Stdout';
@@ -1170,6 +1171,7 @@
 
   static const kCallSitesReport = '_CallSites';
   static const kPossibleBreakpointsReport = 'PossibleBreakpoints';
+  static const kProfileReport = '_Profile';
 
   Future<ServiceMap> getSourceReport(List<String> report_kinds,
                                      [Script script,
@@ -1185,7 +1187,7 @@
     if (endPos != null) {
       params['endTokenPos'] = endPos;
     }
-    return invokeRpc('_getSourceReport', params);
+    return invokeRpc('getSourceReport', params);
   }
 
   /// Fetches and builds the class hierarchy for this isolate. Returns the
@@ -1363,11 +1365,12 @@
     }
   }
 
-  Stream fetchHeapSnapshot() {
+  Stream fetchHeapSnapshot(collectGarbage) {
     if (_snapshotFetch == null || _snapshotFetch.isClosed) {
       _snapshotFetch = new StreamController();
       // isolate.vm.streamListen('_Graph');
-      isolate.invokeRpcNoUpgrade('_requestHeapSnapshot', {});
+      isolate.invokeRpcNoUpgrade('_requestHeapSnapshot',
+                                 {'collectGarbage': collectGarbage});
     }
     return _snapshotFetch.stream;
   }
@@ -1512,6 +1515,7 @@
       case ServiceEvent.kPauseBreakpoint:
       case ServiceEvent.kPauseInterrupted:
       case ServiceEvent.kPauseException:
+      case ServiceEvent.kNone:
       case ServiceEvent.kResume:
         assert((pauseEvent == null) ||
                !event.timestamp.isBefore(pauseEvent.timestamp));
@@ -1821,6 +1825,7 @@
   static const kPauseBreakpoint        = 'PauseBreakpoint';
   static const kPauseInterrupted       = 'PauseInterrupted';
   static const kPauseException         = 'PauseException';
+  static const kNone                   = 'None';
   static const kResume                 = 'Resume';
   static const kBreakpointAdded        = 'BreakpointAdded';
   static const kBreakpointResolved     = 'BreakpointResolved';
@@ -1855,6 +1860,7 @@
   @observable Map logRecord;
   @observable String extensionKind;
   @observable Map extensionData;
+  @observable List timelineEvents;
 
   int chunkIndex, chunkCount, nodeCount;
 
@@ -1863,7 +1869,8 @@
             kind == kPauseExit ||
             kind == kPauseBreakpoint ||
             kind == kPauseInterrupted ||
-            kind == kPauseException);
+            kind == kPauseException ||
+            kind == kNone);
   }
 
   void _update(ObservableMap map, bool mapIsRef) {
@@ -1932,6 +1939,9 @@
       extensionKind = map['extensionKind'];
       extensionData = map['extensionData'];
     }
+    if (map['timelineEvents'] != null) {
+      timelineEvents = map['timelineEvents'];
+    }
   }
 
   String toString() {
@@ -2171,6 +2181,9 @@
   @reflectable final interfaces = new ObservableList<Instance>();
   @reflectable final subclasses = new ObservableList<Class>();
 
+  @observable Instance superType;
+  @observable Instance mixin;
+
   bool get canCache => true;
   bool get immutable => false;
 
@@ -2234,6 +2247,9 @@
     if (superclass != null && superclass.name == "Object") {
       superclass._addSubclass(this);
     }
+    superType = map['superType'];
+    mixin = map['mixin'];
+
     error = map['error'];
 
     traceAllocations =
@@ -2283,11 +2299,17 @@
   @observable bool valueAsStringIsTruncated;
   @observable ServiceFunction function;  // If a closure.
   @observable Context context;  // If a closure.
-  @observable String name;  // If a Type.
   @observable int length; // If a List, Map or TypedData.
   @observable Instance pattern;  // If a RegExp.
 
-  @observable var typeClass;
+  @observable String name;
+  @observable Class typeClass;
+  @observable Class parameterizedClass;
+  @observable ServiceObject typeArguments;
+  @observable int parameterIndex;
+  @observable Instance targetType;
+  @observable Instance bound;
+
   @observable var fields;
   @observable var nativeFields;
   @observable var elements;  // If a List.
@@ -2301,6 +2323,8 @@
   @observable Function twoByteFunction;  // If a RegExp.
   @observable Function externalOneByteFunction;  // If a RegExp.
   @observable Function externalTwoByteFunction;  // If a RegExp.
+  @observable Instance oneByteBytecode;  // If a RegExp.
+  @observable Instance twoByteBytecode;  // If a RegExp.
   @observable bool isCaseSensitive;  // If a RegExp.
   @observable bool isMultiLine;  // If a RegExp.
 
@@ -2392,6 +2416,8 @@
     twoByteFunction = map['_twoByteFunction'];
     externalOneByteFunction = map['_externalOneByteFunction'];
     externalTwoByteFunction = map['_externalTwoByteFunction'];
+    oneByteBytecode = map['_oneByteBytecode'];
+    twoByteBytecode = map['_twoByteBytecode'];
 
     nativeFields = map['_nativeFields'];
     fields = map['fields'];
@@ -2431,6 +2457,12 @@
       }
     }
     typeClass = map['typeClass'];
+    parameterizedClass = map['parameterizedClass'];
+    typeArguments = map['typeArguments'];
+    parameterIndex = map['parameterIndex'];
+    targetType = map['targetType'];
+    bound = map['bound'];
+
     referent = map['mirrorReferent'];
     key = map['propertyKey'];
     value = map['propertyValue'];
diff --git a/runtime/observatory/tests/service/call_site_data_test.dart b/runtime/observatory/tests/service/call_site_data_test.dart
deleted file mode 100644
index 486ce06..0000000
--- a/runtime/observatory/tests/service/call_site_data_test.dart
+++ /dev/null
@@ -1,189 +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.
-// VMOptions=--optimization_filter=doesNotExist
-// ^Force code to be unoptimized so the invocation counts are accurate.
-
-library call_site_data_test;
-
-import 'package:observatory/service_io.dart';
-import 'package:unittest/unittest.dart';
-import 'test_helper.dart';
-
-class A { foo() => 'A'; }
-class B { foo() => 'B'; }
-class C { foo() => 'C'; }
-class D { foo() => 'D'; }
-class E { foo() => 'E'; }
-class F { foo() => 'F'; }
-class G { foo() => 'G'; }
-class H { foo() => 'H'; }
-
-monomorphic(fooable) {
-  fooable.foo();
-  return null;
-}
-polymorphic(fooable) {
-  fooable.foo();
-  return null;
-}
-megamorphic(fooable) {
-  fooable.foo();
-  return null;
-}
-
-class Static {
-  static staticMethod() => 2;
-}
-staticCall() {
-  Static.staticMethod();
-  return null;
-}
-constructorCall() {
-  new Static();
-  return null;
-}
-topLevelMethod() => "TOP";
-topLevelCall() {
-  topLevelMethod();
-  return null;
-}
-
-class Super { bar() => "Super"; }
-class Sub extends Super { bar() => super.bar(); }
-
-script() {
-  for (int i = 0; i < 10; i++) monomorphic(new A());
-
-  for (int i = 0; i < 10; i++) polymorphic(new A());
-  for (int i = 0; i < 20; i++) polymorphic(new B());
-  for (int i = 0; i < 30; i++) polymorphic(new C());
-
-  for (int i = 0; i < 10; i++) megamorphic(new A());
-  for (int i = 0; i < 20; i++) megamorphic(new B());
-  for (int i = 0; i < 30; i++) megamorphic(new C());
-  for (int i = 0; i < 40; i++) megamorphic(new D());
-  for (int i = 0; i < 50; i++) megamorphic(new E());
-  for (int i = 0; i < 60; i++) megamorphic(new F());
-  for (int i = 0; i < 70; i++) megamorphic(new G());
-  for (int i = 0; i < 80; i++) megamorphic(new H());
-
-  for (int i = 0; i < 10; i++) staticCall();
-
-  for (int i = 0; i < 10; i++) constructorCall();
-
-  for (int i = 0; i < 10; i++) topLevelCall();
-
-  for (int i = 0; i < 15; i++) new Sub().bar();
-}
-
-
-Set<String> stringifyCacheEntries(Map callSite) {
-  return callSite['cacheEntries'].map((entry) {
-    return "${entry['receiverContainer']['name']}:${entry['count']}";
-  }).toSet();
-}
-
-
-testMonomorphic(Isolate isolate) async {
-  Library lib = await isolate.rootLibrary.load();
-  ServiceFunction func =
-     lib.functions.singleWhere((f) => f.name == 'monomorphic');
-  Map response = await isolate.invokeRpcNoUpgrade('_getCallSiteData',
-                                                  { 'targetId': func.id });
-  expect(response['type'], equals('CodeCoverage'));
-  Map callSite = response['coverage'].single['callSites'].single;
-  expect(callSite['name'], equals('foo'));
-  expect(stringifyCacheEntries(callSite),
-         equals(['A:10'].toSet()));
-}
-
-testPolymorphic(Isolate isolate) async {
-  Library lib = await isolate.rootLibrary.load();
-  ServiceFunction func =
-     lib.functions.singleWhere((f) => f.name == 'polymorphic');
-  Map response = await isolate.invokeRpcNoUpgrade('_getCallSiteData',
-                                                  { 'targetId': func.id });
-  expect(response['type'], equals('CodeCoverage'));
-  Map callSite = response['coverage'].single['callSites'].single;
-  expect(callSite['name'], equals('foo'));
-  expect(stringifyCacheEntries(callSite),
-         equals(['A:10', 'B:20', 'C:30'].toSet()));
-}
-
-testMegamorphic(Isolate isolate) async {
-  Library lib = await isolate.rootLibrary.load();
-  ServiceFunction func =
-     lib.functions.singleWhere((f) => f.name == 'megamorphic');
-  Map response = await isolate.invokeRpcNoUpgrade('_getCallSiteData',
-                                                  { 'targetId': func.id });
-  expect(response['type'], equals('CodeCoverage'));
-  Map callSite = response['coverage'].single['callSites'].single;
-  expect(callSite['name'], equals('foo'));
-  expect(stringifyCacheEntries(callSite),
-         equals(['A:10', 'B:20', 'C:30', 'D:40',
-                 'E:50', 'F:60', 'G:70', 'H:80'].toSet()));
-}
-
-testStaticCall(Isolate isolate) async {
-  Library lib = await isolate.rootLibrary.load();
-  ServiceFunction func =
-     lib.functions.singleWhere((f) => f.name == 'staticCall');
-  Map response = await isolate.invokeRpcNoUpgrade('_getCallSiteData',
-                                                  { 'targetId': func.id });
-  expect(response['type'], equals('CodeCoverage'));
-  Map callSite = response['coverage'].single['callSites'].single;
-  expect(callSite['name'], equals('staticMethod'));
-  expect(stringifyCacheEntries(callSite),
-         equals(['Static:10'].toSet()));
-}
-
-testConstructorCall(Isolate isolate) async {
-  Library lib = await isolate.rootLibrary.load();
-  ServiceFunction func =
-     lib.functions.singleWhere((f) => f.name == 'constructorCall');
-  Map response = await isolate.invokeRpcNoUpgrade('_getCallSiteData',
-                                                  { 'targetId': func.id });
-  expect(response['type'], equals('CodeCoverage'));
-  Map callSite = response['coverage'].single['callSites'].single;
-  expect(callSite['name'], equals('Static.'));
-  expect(stringifyCacheEntries(callSite),
-         equals(['Static:10'].toSet()));
-}
-
-testTopLevelCall(Isolate isolate) async {
-  Library lib = await isolate.rootLibrary.load();
-  ServiceFunction func =
-     lib.functions.singleWhere((f) => f.name == 'topLevelCall');
-  Map response = await isolate.invokeRpcNoUpgrade('_getCallSiteData',
-                                                  { 'targetId': func.id });
-  expect(response['type'], equals('CodeCoverage'));
-  Map callSite = response['coverage'].single['callSites'].single;
-  expect(callSite['name'], equals('topLevelMethod'));
-  expect(stringifyCacheEntries(callSite),
-         equals(['call_site_data_test:10'].toSet()));
-}
-
-testSuperCall(Isolate isolate) async {
-  Library lib = await isolate.rootLibrary.load();
-  Class cls = await lib.classes.singleWhere((f) => f.name == 'Sub').load();
-  ServiceFunction func = cls.functions.singleWhere((f) => f.name == 'bar');
-  Map response = await isolate.invokeRpcNoUpgrade('_getCallSiteData',
-                                                  { 'targetId': func.id });
-  expect(response['type'], equals('CodeCoverage'));
-  Map callSite = response['coverage'].single['callSites'].single;
-  expect(callSite['name'], equals('bar'));
-  expect(stringifyCacheEntries(callSite),
-         equals(['Super:15'].toSet()));
-}
-
-var tests = [
-    testMonomorphic,
-    testPolymorphic,
-    testMegamorphic,
-    testStaticCall,
-    testConstructorCall,
-    testTopLevelCall,
-    testSuperCall ];
-
-main(args) => runIsolateTests(args, tests, testeeBefore: script);
diff --git a/runtime/observatory/tests/service/coverage_test.dart b/runtime/observatory/tests/service/coverage_test.dart
deleted file mode 100644
index 1266500..0000000
--- a/runtime/observatory/tests/service/coverage_test.dart
+++ /dev/null
@@ -1,138 +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.
-// VMOptions=--error_on_bad_type --error_on_bad_override
-
-import 'package:observatory/service_io.dart';
-import 'package:unittest/unittest.dart';
-import 'test_helper.dart';
-import 'service_test_common.dart';
-import 'dart:developer';
-
-const int LINE_A = 20;
-const int LINE_B = 38;
-const int LINE_C = 136;
-
-int globalVar = 100;
-
-class MyClass {
-  static void myFunction(int value) {
-    if (value < 0) {  // Line A.
-      print("negative");
-    } else {
-      print("positive");
-    }
-    debugger();
-  }
-
-  static void otherFunction(int value) {
-    if (value < 0) {
-               print("otherFunction <");
-    } else {
-         print("otherFunction >=");
-    }
-  }
-}
-
-void testFunction() {
-  MyClass.otherFunction(-100);  // Line B.
-  MyClass.myFunction(10000);
-}
-
-var tests = [
-
-hasStoppedAtBreakpoint,
-
-// Get coverage for function, class, library, script, and isolate.
-(Isolate isolate) async {
-  var stack = await isolate.getStack();
-
-  // Make sure we are in the right place.
-  expect(stack.type, equals('Stack'));
-  expect(stack['frames'].length, greaterThanOrEqualTo(2));
-  expect(stack['frames'][0].function.name, equals('myFunction'));
-  expect(stack['frames'][0].function.dartOwner.name, equals('MyClass'));
-
-  var lib = isolate.rootLibrary;
-  var func = stack['frames'][0].function;
-  expect(func.name, equals('myFunction'));
-  var cls = func.dartOwner;
-  expect(cls.name, equals('MyClass'));
-
-  // Function
-  var coverage = await isolate.invokeRpcNoUpgrade('_getCoverage',
-                                                  { 'targetId': func.id });
-  expect(coverage['type'], equals('CodeCoverage'));
-  expect(coverage['coverage'].length, equals(1));
-  expect(coverage['coverage'][0]['hits'],
-         equals([LINE_A, 1,
-                 LINE_A + 1, 0,
-                 LINE_A + 3, 1,
-                 LINE_A + 5, 1]));
-
-  // Class
-  coverage = await isolate.invokeRpcNoUpgrade('_getCoverage',
-                                              { 'targetId': cls.id });
-  expect(coverage['type'], equals('CodeCoverage'));
-  expect(coverage['coverage'].length, equals(1));
-  expect(coverage['coverage'][0]['hits'],
-         equals([LINE_A, 1,
-                 LINE_A + 1, 0,
-                 LINE_A + 3, 1,
-                 LINE_A + 5, 1,
-                 LINE_A + 9, 1,
-                 LINE_A + 10, 1,
-                 LINE_A + 12, 0,
-                 LINE_A - 2, 0]));
-
-  // Library
-  coverage = await isolate.invokeRpcNoUpgrade('_getCoverage',
-                                              { 'targetId': lib.id });
-  expect(coverage['type'], equals('CodeCoverage'));
-  expect(coverage['coverage'].length, equals(4));
-  expect(coverage['coverage'][0]['hits'],
-         equals([LINE_A, 1,
-                 LINE_A + 1, 0,
-                 LINE_A + 3, 1,
-                 LINE_A + 5, 1,
-                 LINE_A + 9, 1,
-                 LINE_A + 10, 1,
-                 LINE_A + 12, 0,
-                 LINE_A - 2, 0]));
-  expect(coverage['coverage'][1]['hits'],
-         equals([LINE_B, 1,
-                 LINE_B + 1, 1,
-                 LINE_C, 2]));
-
-  // Script
-  await cls.load();
-  coverage = await isolate.invokeRpcNoUpgrade('_getCoverage',
-                                       { 'targetId': cls.location.script.id });
-  expect(coverage['type'], equals('CodeCoverage'));
-  expect(coverage['coverage'].length, equals(4));
-  expect(coverage['coverage'][0]['hits'],
-         equals([LINE_A, 1,
-                 LINE_A + 1, 0,
-                 LINE_A + 3, 1,
-                 LINE_A + 5, 1,
-                 LINE_A + 9, 1,
-                 LINE_A + 10, 1,
-                 LINE_A + 12, 0,
-                 LINE_A - 2, 0]));
-  expect(coverage['coverage'][1]['hits'],
-         equals([LINE_B, 1,
-                 LINE_B + 1, 1,
-                 LINE_C, 2]));
-
-  // Isolate
-  coverage = await isolate.invokeRpcNoUpgrade('_getCoverage', {});
-  print('Done processing _getCoverage for full isolate');
-  expect(coverage['type'], equals('CodeCoverage'));
-  expect(coverage['coverage'].length, greaterThan(100));
-},
-
-];
-
-main(args) => runIsolateTests(args, tests,    // Line C.
-                              testeeConcurrent: testFunction,
-                              trace_service: true);
diff --git a/runtime/observatory/tests/service/crash_dump_test.dart b/runtime/observatory/tests/service/crash_dump_test.dart
index 8b60567..0d9d178 100644
--- a/runtime/observatory/tests/service/crash_dump_test.dart
+++ b/runtime/observatory/tests/service/crash_dump_test.dart
@@ -18,9 +18,11 @@
 var tests = [
   (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();
     StringBuffer sb = new StringBuffer();
     response.transform(UTF8.decoder).listen((chunk) {
diff --git a/runtime/observatory/tests/service/dominator_tree_test.dart b/runtime/observatory/tests/service/dominator_tree_test.dart
index a778f62..5c279c9 100644
--- a/runtime/observatory/tests/service/dominator_tree_test.dart
+++ b/runtime/observatory/tests/service/dominator_tree_test.dart
@@ -57,7 +57,7 @@
 var tests = [
 (Isolate isolate) async {
   var rootLib = await isolate.rootLibrary.load();
-  var snapshot = await isolate.fetchHeapSnapshot().last;
+  var snapshot = await isolate.fetchHeapSnapshot(false).last;
 
   node(String className) {
     var cls = rootLib.classes.singleWhere((cls) => cls.name == className);
diff --git a/runtime/observatory/tests/service/evaluate_activation_in_method_class_other.dart b/runtime/observatory/tests/service/evaluate_activation_in_method_class_other.dart
new file mode 100644
index 0000000..6cc5879
--- /dev/null
+++ b/runtime/observatory/tests/service/evaluate_activation_in_method_class_other.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:developer';
+
+var topLevel = "OtherLibrary";
+
+class Superclass {
+  var _instVar = 'Superclass';
+  var instVar = 'Superclass';
+  method() => 'Superclass';
+  static staticMethod() => 'Superclass';
+}
+
+class Klass extends Superclass {
+  var _instVar = 'Klass';
+  var instVar = 'Klass';
+  method() => 'Klass';
+  static staticMethod() => 'Klass';
+
+  test() {
+    var _local = 'Klass';
+    debugger();
+  }
+}
diff --git a/runtime/observatory/tests/service/evaluate_activation_in_method_class_test.dart b/runtime/observatory/tests/service/evaluate_activation_in_method_class_test.dart
new file mode 100644
index 0000000..cfe4315
--- /dev/null
+++ b/runtime/observatory/tests/service/evaluate_activation_in_method_class_test.dart
@@ -0,0 +1,82 @@
+// 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 --error_on_bad_override
+
+// Tests that expressions evaluated in a frame see the same scope as the
+// frame's method.
+
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+import 'evaluate_activation_in_method_class_other.dart';
+
+var topLevel = "TestLibrary";
+
+class Subclass extends Superclass with Klass {
+  var _instVar = 'Subclass';
+  var instVar = 'Subclass';
+  method() => 'Subclass';
+  static staticMethod() => 'Subclass';
+}
+
+testeeDo() {
+  var obj = new Subclass();
+  obj.test();
+}
+
+testerDo(Isolate isolate) async {
+  await hasStoppedAtBreakpoint(isolate);
+
+  // Make sure we are in the right place.
+  var stack = await isolate.getStack();
+  var topFrame = 0;
+  expect(stack.type, equals('Stack'));
+  expect(stack['frames'][topFrame].function.name, equals('test'));
+  expect(stack['frames'][topFrame].function.dartOwner.name, equals('Superclass&Klass'));
+
+  var result;
+
+  result = await isolate.evalFrame(topFrame, '_local');
+  print(result);
+  expect(result.valueAsString, equals('Klass'));
+
+  result = await isolate.evalFrame(topFrame, '_instVar');
+  print(result);
+  expect(result.valueAsString, equals('Klass'));
+
+  result = await isolate.evalFrame(topFrame, 'instVar');
+  print(result);
+  expect(result.valueAsString, equals('Subclass'));
+
+  result = await isolate.evalFrame(topFrame, 'method()');
+  print(result);
+  expect(result.valueAsString, equals('Subclass'));
+
+  result = await isolate.evalFrame(topFrame, 'super._instVar');
+  print(result);
+  expect(result.valueAsString, equals('Superclass'));
+
+  result = await isolate.evalFrame(topFrame, 'super.instVar');
+  print(result);
+  expect(result.valueAsString, equals('Superclass'));
+
+  result = await isolate.evalFrame(topFrame, 'super.method()');
+  print(result);
+  expect(result.valueAsString, equals('Superclass'));
+
+  result = await isolate.evalFrame(topFrame, 'staticMethod()');
+  print(result);
+  expect(result.valueAsString, equals('Klass'));
+  
+  // function.Owner verus function.Origin
+  // The mixin of Superclass is in _other.dart and the mixin
+  // application is in _test.dart.
+  result = await isolate.evalFrame(topFrame, 'topLevel');
+  print(result);
+  expect(result.valueAsString, equals('OtherLibrary'));
+}
+
+main(args) => runIsolateTests(args, [testerDo], testeeConcurrent:testeeDo);
diff --git a/runtime/observatory/tests/service/get_flag_list_rpc_test.dart b/runtime/observatory/tests/service/get_flag_list_rpc_test.dart
index 3b646c7..73218e4 100644
--- a/runtime/observatory/tests/service/get_flag_list_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_flag_list_rpc_test.dart
@@ -31,7 +31,7 @@
   (VM vm) async {
     // Modify a flag.
     var params = {
-      'name' : 'trace_isolates',
+      'name' : 'trace_profiler',
       'value' : '123',
     };
     var result = await vm.invokeRpcNoUpgrade('_setFlag', params);
diff --git a/runtime/observatory/tests/service/get_object_rpc_test.dart b/runtime/observatory/tests/service/get_object_rpc_test.dart
index a98c535..2f45f3a 100644
--- a/runtime/observatory/tests/service/get_object_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_object_rpc_test.dart
@@ -441,7 +441,7 @@
     expect(result['id'], startsWith('objects/'));
     expect(result['valueAsString'], isNull);
     expect(result['class']['type'], equals('@Class'));
-    expect(result['class']['name'], equals('_Uint8Array'));
+    expect(result['class']['name'], equals('Uint8List'));
     expect(result['size'], isPositive);
     expect(result['fields'], isEmpty);
     expect(result['length'], equals(3));
@@ -467,7 +467,7 @@
     expect(result['id'], startsWith('objects/'));
     expect(result['valueAsString'], isNull);
     expect(result['class']['type'], equals('@Class'));
-    expect(result['class']['name'], equals('_Uint8Array'));
+    expect(result['class']['name'], equals('Uint8List'));
     expect(result['size'], isPositive);
     expect(result['fields'], isEmpty);
     expect(result['length'], equals(3));
@@ -494,7 +494,7 @@
     expect(result['id'], startsWith('objects/'));
     expect(result['valueAsString'], isNull);
     expect(result['class']['type'], equals('@Class'));
-    expect(result['class']['name'], equals('_Uint8Array'));
+    expect(result['class']['name'], equals('Uint8List'));
     expect(result['size'], isPositive);
     expect(result['fields'], isEmpty);
     expect(result['length'], equals(3));
@@ -521,7 +521,7 @@
     expect(result['id'], startsWith('objects/'));
     expect(result['valueAsString'], isNull);
     expect(result['class']['type'], equals('@Class'));
-    expect(result['class']['name'], equals('_Uint8Array'));
+    expect(result['class']['name'], equals('Uint8List'));
     expect(result['size'], isPositive);
     expect(result['fields'], isEmpty);
     expect(result['length'], equals(3));
@@ -544,7 +544,7 @@
     expect(result['id'], startsWith('objects/'));
     expect(result['valueAsString'], isNull);
     expect(result['class']['type'], equals('@Class'));
-    expect(result['class']['name'], equals('_Uint64Array'));
+    expect(result['class']['name'], equals('Uint64List'));
     expect(result['size'], isPositive);
     expect(result['fields'], isEmpty);
     expect(result['length'], equals(3));
@@ -570,7 +570,7 @@
     expect(result['id'], startsWith('objects/'));
     expect(result['valueAsString'], isNull);
     expect(result['class']['type'], equals('@Class'));
-    expect(result['class']['name'], equals('_Uint64Array'));
+    expect(result['class']['name'], equals('Uint64List'));
     expect(result['size'], isPositive);
     expect(result['fields'], isEmpty);
     expect(result['length'], equals(3));
@@ -597,7 +597,7 @@
     expect(result['id'], startsWith('objects/'));
     expect(result['valueAsString'], isNull);
     expect(result['class']['type'], equals('@Class'));
-    expect(result['class']['name'], equals('_Uint64Array'));
+    expect(result['class']['name'], equals('Uint64List'));
     expect(result['size'], isPositive);
     expect(result['fields'], isEmpty);
     expect(result['length'], equals(3));
@@ -624,7 +624,7 @@
     expect(result['id'], startsWith('objects/'));
     expect(result['valueAsString'], isNull);
     expect(result['class']['type'], equals('@Class'));
-    expect(result['class']['name'], equals('_Uint64Array'));
+    expect(result['class']['name'], equals('Uint64List'));
     expect(result['size'], isPositive);
     expect(result['fields'], isEmpty);
     expect(result['length'], equals(3));
diff --git a/runtime/observatory/tests/service/get_source_report_test.dart b/runtime/observatory/tests/service/get_source_report_test.dart
index 006ef5b..2f089b2 100644
--- a/runtime/observatory/tests/service/get_source_report_test.dart
+++ b/runtime/observatory/tests/service/get_source_report_test.dart
@@ -72,7 +72,7 @@
   // Full script
   var params = { 'reports' : ['Coverage'],
                  'scriptId' : func.location.script.id };
-  var coverage = await isolate.invokeRpcNoUpgrade('_getSourceReport', params);
+  var coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
   expect(coverage['type'], equals('SourceReport'));
   expect(coverage['ranges'].length, 6);
   expect(coverage['ranges'][0], equals(expectedRange));
@@ -85,7 +85,7 @@
   params = { 'reports' : ['Coverage'],
              'scriptId' : func.location.script.id,
              'forceCompile' : true };
-  coverage = await isolate.invokeRpcNoUpgrade('_getSourceReport', params);
+  coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
   expect(coverage['type'], equals('SourceReport'));
   expect(coverage['ranges'].length, 6);
   expect(allRangesCompiled(coverage), isTrue);
@@ -95,7 +95,7 @@
              'scriptId' : func.location.script.id,
              'tokenPos' : func.location.tokenPos,
              'endTokenPos' : func.location.endTokenPos };
-  coverage = await isolate.invokeRpcNoUpgrade('_getSourceReport', params);
+  coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
   expect(coverage['type'], equals('SourceReport'));
   expect(coverage['ranges'].length, 1);
   expect(coverage['ranges'][0], equals(expectedRange));
@@ -105,7 +105,7 @@
 
   // Full isolate
   params = { 'reports' : ['Coverage'] };
-  coverage = await isolate.invokeRpcNoUpgrade('_getSourceReport', params);
+  coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
   expect(coverage['type'], equals('SourceReport'));
   expect(coverage['ranges'].length, greaterThan(1));
   expect(coverage['scripts'].length, greaterThan(1));
@@ -115,7 +115,7 @@
              'scriptId' : func.location.script.id,
              'tokenPos' : func.location.tokenPos,
              'endTokenPos' : func.location.endTokenPos };
-  coverage = await isolate.invokeRpcNoUpgrade('_getSourceReport', params);
+  coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
   expect(coverage['type'], equals('SourceReport'));
   expect(coverage['ranges'].length, 1);
   var range = coverage['ranges'][0];
@@ -128,12 +128,12 @@
   try {
     params = { 'reports' : ['Coverage'],
                'tokenPos' : func.location.tokenPos };
-    coverage = await isolate.invokeRpcNoUpgrade('_getSourceReport', params);
+    coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
   } on ServerRpcException catch(e) {
     caughtException = true;
     expect(e.code, equals(ServerRpcException.kInvalidParams));
     expect(e.message,
-           "_getSourceReport: the 'tokenPos' parameter requires the "
+           "getSourceReport: the 'tokenPos' parameter requires the "
            "\'scriptId\' parameter");
   }
   expect(caughtException, isTrue);
@@ -143,12 +143,12 @@
   try {
     params = { 'reports' : ['Coverage'],
                'endTokenPos' : func.location.endTokenPos };
-    coverage = await isolate.invokeRpcNoUpgrade('_getSourceReport', params);
+    coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
   } on ServerRpcException catch(e) {
     caughtException = true;
     expect(e.code, equals(ServerRpcException.kInvalidParams));
     expect(e.message,
-           "_getSourceReport: the 'endTokenPos' parameter requires the "
+           "getSourceReport: the 'endTokenPos' parameter requires the "
            "\'scriptId\' parameter");
   }
   expect(caughtException, isTrue);
diff --git a/runtime/observatory/tests/service/get_version_rpc_test.dart b/runtime/observatory/tests/service/get_version_rpc_test.dart
index d4c4913..5bae881 100644
--- a/runtime/observatory/tests/service/get_version_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_version_rpc_test.dart
@@ -13,7 +13,7 @@
     var result = await vm.invokeRpcNoUpgrade('getVersion', {});
     expect(result['type'], equals('Version'));
     expect(result['major'], equals(3));
-    expect(result['minor'], equals(3));
+    expect(result['minor'], equals(4));
     expect(result['_privateMajor'], equals(0));
     expect(result['_privateMinor'], equals(0));
   },
diff --git a/runtime/observatory/tests/service/graph_test.dart b/runtime/observatory/tests/service/graph_test.dart
index fe31d16..424747b 100644
--- a/runtime/observatory/tests/service/graph_test.dart
+++ b/runtime/observatory/tests/service/graph_test.dart
@@ -42,7 +42,7 @@
   Class fooClass = lib.classes.first;
   fooId = fooClass.vmCid;
 
-  HeapSnapshot snapshot = await isolate.fetchHeapSnapshot().last;
+  HeapSnapshot snapshot = await isolate.fetchHeapSnapshot(false).last;
   ObjectGraph graph = snapshot.graph;
 
   expect(fooId, isNotNull);
diff --git a/runtime/observatory/tests/service/pause_idle_isolate_test.dart b/runtime/observatory/tests/service/pause_idle_isolate_test.dart
index cfd418c..a75dcd1 100644
--- a/runtime/observatory/tests/service/pause_idle_isolate_test.dart
+++ b/runtime/observatory/tests/service/pause_idle_isolate_test.dart
@@ -3,55 +3,28 @@
 // BSD-style license that can be found in the LICENSE file.
 // VMOptions=--error_on_bad_type --error_on_bad_override
 
-import 'package:observatory/service_io.dart';
-import 'package:unittest/unittest.dart';
-import 'test_helper.dart';
 import 'dart:async';
+import 'dart:developer';
 import 'dart:io';
 import 'dart:isolate' show ReceivePort;
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'service_test_common.dart';
+import 'test_helper.dart';
 
 var receivePort;
 
 void testMain() {
   receivePort = new ReceivePort();
+  debugger();
 }
 
 var tests = [
 
+hasStoppedAtBreakpoint,
+
 (Isolate isolate) async {
-  Completer completer = new Completer();
-  var stream = await isolate.vm.getEventStream(VM.kDebugStream);
-  var subscription;
-  subscription = stream.listen((ServiceEvent event) {
-    if (event.kind == ServiceEvent.kPauseStart) {
-      print('Received $event');
-      subscription.cancel();
-      completer.complete();
-    }
-  });
-
-  if (isolate.pauseEvent != null &&
-      isolate.pauseEvent.kind == ServiceEvent.kPauseStart) {
-    // Wait for the isolate to hit PauseStart.
-    subscription.cancel();
-  } else {
-    await completer.future;
-  }
-  print('Done waiting for pause event.');
-
-  // Wait for the isolate to pause due to interruption.
-  completer = new Completer();
-  stream = await isolate.vm.getEventStream(VM.kDebugStream);
-  bool receivedInterrupt = false;
-  subscription = stream.listen((ServiceEvent event) {
-    print('Received $event');
-    if (event.kind == ServiceEvent.kPauseInterrupted) {
-      receivedInterrupt = true;
-      subscription.cancel();
-      completer.complete();
-    }
-  });
-
+  print('Resuming...');
   await isolate.resume();
 
   // Wait for the isolate to become idle.  We detect this by querying
@@ -60,21 +33,24 @@
   do {
     var stack = await isolate.getStack();
     frameCount = stack['frames'].length;
-    print('frames: $frameCount');
+    print('Frames: $frameCount');
     sleep(const Duration(milliseconds:10));
   } while (frameCount > 0);
+  print('Isolate is idle.');
+  await isolate.reload();
+  expect(isolate.pauseEvent.kind, equals(ServiceEvent.kResume));
 
   // Make sure that the isolate receives an interrupt even when it is
   // idle. (https://github.com/dart-lang/sdk/issues/24349)
+  var interruptFuture = hasPausedFor(isolate, ServiceEvent.kPauseInterrupted);
+  print('Pausing...');
   await isolate.pause();
-  await completer.future;
-  expect(receivedInterrupt, isTrue);
+  await interruptFuture;
 },
 
 ];
 
 main(args) => runIsolateTests(args, tests,
                               testeeConcurrent: testMain,
-                              pause_on_start: true,
                               trace_service: true,
                               verbose_vm: true);
diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status
index 0e3d8fd..8003189 100644
--- a/runtime/observatory/tests/service/service.status
+++ b/runtime/observatory/tests/service/service.status
@@ -17,6 +17,10 @@
 # Tests with known analyzer issues
 [ $compiler == dart2analyzer ]
 developer_extension_test: SkipByDesign
+*: StaticWarning # https://github.com/dart-lang/observe/issues/85
+address_mapper_test: Pass # https://github.com/dart-lang/observe/issues/85
+command_test: Pass # https://github.com/dart-lang/observe/issues/85
+read_stream_test: Pass # https://github.com/dart-lang/observe/issues/85
 
 [ $arch == arm ]
 process_service_test: Pass, Fail # Issue 24344
@@ -34,3 +38,6 @@
 # Service protocol is not supported when running a full application snapshot.
 [ ($runtime == dart_product) ]
 *: SkipByDesign
+
+[ $compiler == dart2analyzer ]
+evaluate_activation_in_method_class_test: CompileTimeError # Issue 24478
diff --git a/runtime/observatory/tests/service/service_test_common.dart b/runtime/observatory/tests/service/service_test_common.dart
index 7435ee5..108316c 100644
--- a/runtime/observatory/tests/service/service_test_common.dart
+++ b/runtime/observatory/tests/service/service_test_common.dart
@@ -11,6 +11,22 @@
 typedef Future IsolateTest(Isolate isolate);
 typedef Future VMTest(VM vm);
 
+Map<String, StreamSubscription> streamSubscriptions = {};
+
+Future subscribeToStream(VM vm, String streamName, onEvent) async {
+  assert(streamSubscriptions[streamName] == null);
+
+  Stream stream = await vm.getEventStream(streamName);
+  StreamSubscription subscription = stream.listen(onEvent);
+  streamSubscriptions[streamName] = subscription;
+}
+
+Future cancelStreamSubscription(String streamName) async {
+  StreamSubscription subscription = streamSubscriptions[streamName];
+  subscription.cancel();
+  streamSubscriptions.remove(streamName);
+}
+
 Future asyncStepOver(Isolate isolate) async {
   final Completer pausedAtSyntheticBreakpoint = new Completer();
   StreamSubscription subscription;
@@ -88,10 +104,10 @@
     var subscription;
     subscription = stream.listen((ServiceEvent event) {
         if (event.kind == kind) {
-          print('Paused with $kind');
-          subscription.cancel();
           if (completer != null) {
             // Reload to update isolate.pauseEvent.
+            print('Paused with $kind');
+            subscription.cancel();
             completer.complete(isolate.reload());
             completer = null;
           }
@@ -103,9 +119,9 @@
       if ((isolate.pauseEvent != null) &&
          (isolate.pauseEvent.kind == kind)) {
         // Already waiting at a breakpoint.
-        print('Paused with $kind');
-        subscription.cancel();
         if (completer != null) {
+          print('Paused with $kind');
+          subscription.cancel();
           completer.complete(isolate);
           completer = null;
         }
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index 91cb11e..e22cbb2 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -19,6 +19,7 @@
   return e is NetworkRpcException;
 }
 
+
 const String _TESTEE_ENV_KEY = 'SERVICE_TEST_TESTEE';
 const Map<String, String> _TESTEE_SPAWN_ENV = const {
   _TESTEE_ENV_KEY: 'true'
@@ -27,6 +28,14 @@
   return Platform.environment.containsKey(_TESTEE_ENV_KEY);
 }
 
+const String _SKY_SHELL_ENV_KEY = 'SERVICE_TEST_SKY_SHELL';
+bool _shouldLaunchSkyShell() {
+  return Platform.environment.containsKey(_SKY_SHELL_ENV_KEY);
+}
+String _skyShellPath() {
+  return Platform.environment[_SKY_SHELL_ENV_KEY];
+}
+
 class _SerivceTesteeRunner {
   Future run({testeeBefore(): null,
               testeeConcurrent(): null,
@@ -79,10 +88,7 @@
   bool killedByTester = false;
 
   _ServiceTesteeLauncher() :
-      args = ['--enable-vm-service:0',
-              Platform.script.toFilePath()] {}
-
-  String get executablePath => Platform.executable;
+      args = [Platform.script.toFilePath()] {}
 
   // Spawn the testee process.
   Future<Process> _spawnProcess(bool pause_on_start,
@@ -92,11 +98,38 @@
                                 bool trace_compiler) {
     assert(pause_on_start != null);
     assert(pause_on_exit != null);
+    assert(pause_on_unhandled_exceptions != null);
     assert(trace_service != null);
+    assert(trace_compiler != null);
+
     // TODO(turnidge): I have temporarily turned on service tracing for
     // all tests to help diagnose flaky tests.
     trace_service = true;
+
+    if (_shouldLaunchSkyShell()) {
+      return _spawnSkyProcess(pause_on_start,
+                              pause_on_exit,
+                              pause_on_unhandled_exceptions,
+                              trace_service,
+                              trace_compiler);
+    } else {
+      return _spawnDartProcess(pause_on_start,
+                               pause_on_exit,
+                               pause_on_unhandled_exceptions,
+                               trace_service,
+                               trace_compiler);
+    }
+  }
+
+  Future<Process> _spawnDartProcess(bool pause_on_start,
+                                    bool pause_on_exit,
+                                    bool pause_on_unhandled_exceptions,
+                                    bool trace_service,
+                                    bool trace_compiler) {
+    assert(!_shouldLaunchSkyShell());
+
     String dartExecutable = Platform.executable;
+
     var fullArgs = [];
     if (trace_service) {
       fullArgs.add('--trace-service');
@@ -114,12 +147,56 @@
     if (pause_on_unhandled_exceptions) {
       fullArgs.add('--pause-isolates-on-unhandled-exceptions');
     }
+
     fullArgs.addAll(Platform.executableArguments);
+    fullArgs.add('--enable-vm-service:0');
     fullArgs.addAll(args);
-    print('** Launching $dartExecutable ${fullArgs.join(' ')}');
-    return Process.start(dartExecutable,
-                         fullArgs,
-                         environment: _TESTEE_SPAWN_ENV);
+
+    return _spawnCommon(dartExecutable, fullArgs);
+  }
+
+  Future<Process> _spawnSkyProcess(bool pause_on_start,
+                                   bool pause_on_exit,
+                                   bool pause_on_unhandled_exceptions,
+                                   bool trace_service,
+                                   bool trace_compiler) {
+    assert(_shouldLaunchSkyShell());
+
+    String dartExecutable = _skyShellPath();
+
+    var dartFlags = [];
+    var fullArgs = [];
+    if (trace_service) {
+      dartFlags.add('--trace_service');
+      dartFlags.add('--trace_service_verbose');
+    }
+    if (trace_compiler) {
+      dartFlags.add('--trace_compiler');
+    }
+    if (pause_on_start) {
+      dartFlags.add('--pause_isolates_on_start');
+      fullArgs.add('--start-paused');
+    }
+    if (pause_on_exit) {
+      dartFlags.add('--pause_isolates_on_exit');
+    }
+    if (pause_on_unhandled_exceptions) {
+      dartFlags.add('--pause_isolates_on_unhandled_exceptions');
+    }
+    // Override mirrors.
+    dartFlags.add('--enable_mirrors=true');
+
+    fullArgs.addAll(Platform.executableArguments);
+    fullArgs.add('--observatory-port=0');
+    fullArgs.add('--dart-flags=${dartFlags.join(' ')}');
+    fullArgs.addAll(args);
+
+    return _spawnCommon(dartExecutable, fullArgs);
+  }
+
+  Future<Process> _spawnCommon(String executable, List<String> arguments) {
+    print('** Launching $executable ${arguments.join(' ')}');
+    return Process.start(executable, arguments, environment: _TESTEE_SPAWN_ENV);
   }
 
   Future<int> launch(bool pause_on_start,
@@ -198,37 +275,39 @@
       serviceWebsocketAddress = 'ws://localhost:$port/ws';
       serviceHttpAddress = 'http://localhost:$port';
       var name = Platform.script.pathSegments.last;
-      runZoned(() {
-        new WebSocketVM(new WebSocketVMTarget(serviceWebsocketAddress)).load()
-            .then((VM vm) async {
+      runZoned(() async {
+        var vm =
+            new WebSocketVM(new WebSocketVMTarget(serviceWebsocketAddress));
+        print('Loading VM...');
+        await vm.load();
+        print('Done loading VM');
 
-              // Run vm tests.
-              if (vmTests != null) {
-                var testIndex = 1;
-                var totalTests = vmTests.length;
-                for (var test in vmTests) {
-                  vm.verbose = verbose_vm;
-                  print('Running $name [$testIndex/$totalTests]');
-                  testIndex++;
-                  await test(vm);
-                }
-              }
+        // Run vm tests.
+        if (vmTests != null) {
+          var testIndex = 1;
+          var totalTests = vmTests.length;
+          for (var test in vmTests) {
+            vm.verbose = verbose_vm;
+            print('Running $name [$testIndex/$totalTests]');
+            testIndex++;
+            await test(vm);
+          }
+        }
 
-              // Run isolate tests.
-              if (isolateTests != null) {
-                var isolate = await vm.isolates.first.load();
-                var testIndex = 1;
-                var totalTests = isolateTests.length;
-                for (var test in isolateTests) {
-                  vm.verbose = verbose_vm;
-                  print('Running $name [$testIndex/$totalTests]');
-                  testIndex++;
-                  await test(isolate);
-                }
-              }
+        // Run isolate tests.
+        if (isolateTests != null) {
+          var isolate = await vm.isolates.first.load();
+          var testIndex = 1;
+          var totalTests = isolateTests.length;
+          for (var test in isolateTests) {
+            vm.verbose = verbose_vm;
+            print('Running $name [$testIndex/$totalTests]');
+            testIndex++;
+            await test(isolate);
+          }
+        }
 
-              await process.requestExit();
-            });
+        await process.requestExit();
       }, onError: (e, st) {
         process.requestExit();
         if (!_isWebSocketDisconnect(e)) {
diff --git a/runtime/observatory/tests/service/vm_timeline_events_test.dart b/runtime/observatory/tests/service/vm_timeline_events_test.dart
new file mode 100644
index 0000000..c84411e
--- /dev/null
+++ b/runtime/observatory/tests/service/vm_timeline_events_test.dart
@@ -0,0 +1,71 @@
+// 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 --error_on_bad_override
+
+import 'dart:async';
+import 'dart:developer';
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'service_test_common.dart';
+import 'test_helper.dart';
+
+primeDartTimeline() {
+  while (true) {
+    Timeline.startSync('apple');
+    Timeline.finishSync();
+  }
+}
+
+bool isDart(Map event) => event['cat'] == 'Dart';
+
+List<Map> filterEvents(List<Map> events, filter) {
+  return events.where(filter).toList();
+}
+
+Completer completer = new Completer();
+int eventCount = 0;
+
+onTimelineEvent(ServiceEvent event) {
+  eventCount++;
+  expect(filterEvents(event.timelineEvents, isDart).length, greaterThan(0));
+  if (eventCount == 5) {
+    completer.complete(eventCount);
+  }
+}
+
+var tests = [
+  (Isolate isolate) async {
+    // Subscribe to the Timeline stream.
+    await subscribeToStream(isolate.vm, VM.kTimelineStream, onTimelineEvent);
+  },
+  (Isolate isolate) async {
+    // Ensure we don't get any events before enabling Dart.
+    await new Future.delayed(new Duration(seconds: 5));
+    expect(eventCount, 0);
+  },
+  (Isolate isolate) async {
+    // Get the flags.
+    Map flags = await isolate.vm.invokeRpcNoUpgrade('_getVMTimelineFlags', {});
+    expect(flags['type'], 'TimelineFlags');
+    // Confirm that 'Dart' is available.
+    expect(flags['availableStreams'].contains('Dart'), isTrue);
+    // Confirm that nothing is being recorded.
+    expect(flags['recordedStreams'].length, equals(0));
+  },
+  (Isolate isolate) async {
+    // Enable the Dart category.
+    await isolate.vm.invokeRpcNoUpgrade('_setVMTimelineFlags', {
+      "recordedStreams": ["Dart"]
+    });
+  },
+  (Isolate isolate) async {
+    // Wait to receive events.
+    await completer.future;
+    cancelStreamSubscription(VM.kTimelineStream);
+  },
+];
+
+main(args) async => runIsolateTests(args,
+                                    tests,
+                                    testeeConcurrent: primeDartTimeline);
diff --git a/runtime/observatory/web/third_party/trace_viewer_full.html b/runtime/observatory/web/third_party/trace_viewer_full.html
index 930312b..7c0f430 100644
--- a/runtime/observatory/web/third_party/trace_viewer_full.html
+++ b/runtime/observatory/web/third_party/trace_viewer_full.html
@@ -100,99 +100,7 @@
       </overlay-frame>
     </overlay-vertical-centering-container>
   </overlay-mask>
-</template><polymer-element constructor="TracingAnalysisTabView" name="tr-ui-a-tab-view">
-  <template>
-    <style>
-      :host {
-        display: flex;
-        flex-flow: column nowrap;
-        overflow: hidden;
-        box-sizing: border-box;
-      }
-
-      tab-strip[tabs-hidden] {
-        display: none;
-      }
-
-      tab-strip {
-        background-color: rgb(236, 236, 236);
-        border-bottom: 1px solid #8e8e8e;
-        display: flex;
-        flex: 0 0 auto;
-        flex-flow: row;
-        overflow-x: auto;
-        padding: 0 10px 0 10px;
-        font-size: 12px;
-      }
-
-      tab-button {
-        display: block;
-        flex: 0 0 auto;
-        padding: 4px 15px 1px 15px;
-        margin-top: 2px;
-      }
-
-      tab-button[selected=true] {
-        background-color: white;
-        border: 1px solid rgb(163, 163, 163);
-        border-bottom: none;
-        padding: 3px 14px 1px 14px;
-      }
-
-      tabs-content-container {
-        display: flex;
-        flex: 1 1 auto;
-        overflow: auto;
-        width: 100%;
-      }
-
-      ::content > * {
-        flex: 1 1 auto;
-      }
-
-      ::content > *:not([selected]) {
-        display: none;
-      }
-
-      button-label {
-        display: inline;
-      }
-
-      tab-strip-heading {
-        display: block;
-        flex: 0 0 auto;
-        padding: 4px 15px 1px 15px;
-        margin-top: 2px;
-        margin-before: 20px;
-        margin-after: 10px;
-      }
-      #tsh {
-        display: inline;
-        font-weight: bold;
-      }
-    </style>
-
-    <tab-strip>
-      <tab-strip-heading id="tshh">
-        <span id="tsh"></span>
-      </tab-strip-heading>
-      <template repeat="{{tab in tabs_}}">
-        <tab-button button-id="{{ tab.id }}" on-click="{{ tabButtonSelectHandler_ }}" selected="{{ selectedTab_.id === tab.id }}">
-          <button-label>{{ tab.label ? tab.label : 'No Label'}}</button-label>
-        </tab-button>
-      </template>
-    </tab-strip>
-
-    <tabs-content-container id="content-container">
-        <content></content>
-    </tabs-content-container>
-
-  </template>
-
-  
-</polymer-element><polymer-element name="tr-ui-a-sub-view">
-  
-</polymer-element><style>
+</template><style>
 * /deep/ .labeled-checkbox {
   display: flex;
   white-space: nowrap;
@@ -372,7 +280,7 @@
   </template>
 
   
-</polymer-element><polymer-element name="tr-ui-u-scalar-span">
+</polymer-element><polymer-element name="tr-v-ui-scalar-span">
   <template>
     <style>
     :host {
@@ -405,10 +313,6 @@
     <span id="warning" style="display:none">âš </span>
   </template>
   
-</polymer-element><polymer-element extends="tr-ui-u-scalar-span" name="tr-ui-u-time-duration-span">
-  
-</polymer-element><polymer-element extends="tr-ui-u-scalar-span" name="tr-ui-u-time-stamp-span">
-  
 </polymer-element><polymer-element is="HTMLUnknownElement" name="tr-ui-a-generic-object-view">
   <template>
     <style>
@@ -432,6 +336,491 @@
   </template>
 
   
+</polymer-element><polymer-element name="tr-ui-b-drag-handle">
+  <template>
+    <style>
+    :host {
+      -webkit-user-select: none;
+      box-sizing: border-box;
+      display: block;
+    }
+
+    :host(.horizontal-drag-handle) {
+      background-image: -webkit-gradient(linear,
+                                         0 0, 0 100%,
+                                         from(#E5E5E5),
+                                         to(#D1D1D1));
+      border-bottom: 1px solid #8e8e8e;
+      border-top: 1px solid white;
+      cursor: ns-resize;
+      flex: 0 0 auto;
+      height: 7px;
+      position: relative;
+      z-index: 10;
+    }
+
+    :host(.vertical-drag-handle) {
+      background-image: -webkit-gradient(linear,
+                                         0 0, 100% 0,
+                                         from(#E5E5E5),
+                                         to(#D1D1D1));
+      border-left: 1px solid white;
+      border-right: 1px solid #8e8e8e;
+      cursor: ew-resize;
+      flex: 0 0 auto;
+      position: relative;
+      width: 7px;
+      z-index: 10;
+    }
+    </style>
+  </template>
+  
+</polymer-element><polymer-element name="tv-ui-b-hotkey-controller">
+  
+</polymer-element><polymer-element is="HTMLDivElement" name="tr-ui-b-info-bar">
+  <template>
+    <style>
+    :host {
+      align-items: center;
+      flex: 0 0 auto;
+      background-color: rgb(252, 235, 162);
+      border-bottom: 1px solid #A3A3A3;
+      border-left: 1px solid white;
+      border-right: 1px solid #A3A3A3;
+      border-top: 1px solid white;
+      display: flex;
+      height: 26px;
+      padding: 0 3px 0 3px;
+    }
+
+    :host(.info-bar-hidden) {
+      display: none;
+    }
+
+    #message { flex: 1 1 auto; }
+    </style>
+
+    <span id="message"></span>
+    <span id="buttons"></span>
+  </template>
+
+  
+</polymer-element><style>
+* /deep/ .x-list-view{-webkit-user-select:none;display:block}* /deep/ .x-list-view:focus{outline:none}* /deep/ .x-list-view *{-webkit-user-select:none}* /deep/ .x-list-view>.list-item{padding:2px 4px 2px 4px}* /deep/ .x-list-view:focus>.list-item[selected]{background-color:rgb(171,217,202);outline:1px dotted rgba(0,0,0,0.1);outline-offset:0}* /deep/ .x-list-view>.list-item[selected]{background-color:rgb(103,199,165)}
+</style><polymer-element name="tr-ui-b-mouse-mode-icon">
+  <template>
+    <style>
+    :host {
+      display: block;
+      background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAChCAYAAACbBNzvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABV0RVh0Q3JlYXRpb24gVGltZQA3LzE2LzEzRNEKUwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAA9aSURBVHic7V1rTFvl//+UrgUmZWMpbLa6cLErwpYxkqLGkjAG88WSbmumGUllvlmAJctMRtybvlHrLXiJUekMIZuYSCL5gS+EuLIXGEGjqCsllCEW6xQECgzWG7S05/+C/zkp9LTn0gsL6ych9JzznOdzPj19Luf5PN/nCN59913ixRdfRFdXFxLx/2GDgCAIYmpqCoWFhUjE/4cNae+99x4AIFH/Hzak7nDqDu+wOyyw2WzEdl9EMpG23ReQbKQE73Q8coJ3bfcFWK1W/Pbbb/D7/UhLi/37DwaDEIvFKC8vR0lJSdjxbRVstVoxPDyMxx9/HAUFBcjMzIRAIOCdXzAYhNvtht1ux/DwMACEid5WwSMjI3jyySdRXFwMsVgMoVAYk2CCIJCZmYns7GyMjo5iZGQkPoKXl5exd+9e3hdGIhgMIj8/H5mZmRCJRIyCyQ5NJBAEgUAgAKFQiIKCAiwsLISl4VxoHA4H+vv74Xa7uZ4aBqFQiOzsbIhEIojFYojFYohEItq/8fFxXLlyBUtLSxHThOaxZ88eCIXC2AWPj48DAH799deYBaelpUEoFLL6++qrrwAAH3zwAav0YrGYthLkJHh6ehpzc3MAgPn5eUxPT8csWiAQMJbboaEhmM1mAIDFYsHQ0BDvPDkJtlgsYdt+v59LFrxw/fr1sG2Xy8UrL06C6+vrw7bFYjEvYi747rvvwrYlEgmvvDjV0g6HI+p2ohBP3qh32OFwoLe3l1VGvb29sNvtvC8kFCMjI9DpdKzS6nQ6mEwm1nnTPg/7/X6MjY1hcnKS/VX+P/bu3YuysjLk5uYypv36669x8uRJZGRkQCQSwev1oqOjAz09PZx5CwsLcenSJRw+fBh+vx+rq6swmUx46aWXNqWjvcMDAwO8xAIbnZKBgQFeNXhzczMvscBGp6S5uRk//vhj1HS0grVaLYqLi3kRy+Vy1NXVRe0RRcKNGzeg0Wh48apUKnR1daG6ujpqOtpKy+VyQa1Wo6SkBLdv38aFCxeoY5988gn1+fLly9TnL774ApWVlXjiiSfgdDqxtrbG+aJ9Ph/0ej3OnDkDvV6PW7duUceOHDlCfR4dHaU+v/DCC7h27RrUajWcTidWV1ejctAKJggCKysryMzMhE6nw+zsLO3Joft1Oh0ePHiApaUlduqi8BYVFaGvr48Vb19fHyfeqM2Sz+dj3QTEs4lKJC+njsfWJoptkxUrtjZRbJssOnASXFtbG3U7UXjrrbeibnMBJ8FZWVkoKysDABQUFCArK4s3MRcoFArqrlZXV0OhUPDOi5Ngn8+Hw4cPQyqV4tlnn4XP5+NNTIIgmH0An8+HV155BUqlEq+++ior3kAgQLuf84jH2toajh8/jvX1da6n0sLj8SAjI4MxHUEQ+PTTT1nlSRAEHjx4QHtsW8e0RCIR7HY79uzZE/GOcEUgEEAgEMDff/8NkUgUdnxbBR85cgRmsxkCgQD5+fkRh2XYIhAI4P79+5iamoLD4cCxY8fC0myr4KeeegoCgQBWqxVzc3NIS0uLedQyGAxi165dKC8vR1FRUVialHu405ESvNPxyAlOuYfJRMo9fFjdw3iBq3vIBDbu4bYK3uoextKtJEH2yWNyD8nyEG8wuYcffvgha3cxru6h3W5Hf39/QoyzaE6fyWRCQ0MDZ+MsLu7h8vIyent7sby8zIk8VkxNTUGn08Fms8UlP04Nn9/vR39/f9w8JLZwu91obGzk5CFFAq+Wfnh4mDKok4mWlha0trbGlAfvrs3k5CQGBgaSYoiHoqenB1evXk2OIb4VDocDJpMp6eXaYrGgsbGRV7mOufPq8XgwMDCQ9HI9NzeHq1evci7XvDseUqkUWq0W6enpCAaDcDqd8Hq9fLNjDaVSiRs3bkAikfDi5XSHxWIxampqAAALCwsYGhrC7Ows5ufnEypWIpHAYDAAACYmJnD9+nXevJwEnzp1CjKZDBUVFQCAsbGxpJTfjz76CFVVVWhqagIAdHR08G6XWQuuqanB7t274fV6UVpaiuzsbAAbTzyJhMFggEKhgNfrRX19PWQyGQDAaDTyyo+V4JqaGshkMsricLlcOH78OICNCWp8p0cwwWAwoKqqahPvG2+8AWDji+7u7uacJyvBMpksrKxkZWVR0yLGxsY4E7NBVVVVGK9CoaCmRXR0dHDOk5VguorB5/OhoqICYrE4YZ2PSLxXrlyBRCLhNcE1pufh1dVVXLx4EWlpaRGnJzCBjXtId87g4GBU3ri5h1uJ5+fnY8mCtXvIhTflHoYg5R4mEyn3MAl45KyWlOCdjkdOcMo9TCZS7mHKPeSGhLmH5LBOrAGXXN1DcliHrgdFgsk95CzYbrfDbDbD7/ejrKwstpmtNO5hJJhMJrS2tsLtdqOpqQlarTZi2mjuIWvBfr8fZrN50/iz2WzG9PQ0nn/+edonEzZgij10uVwwGo2bxp+NRiOGhobw+uuv005hjtk9JENz6AbbyWCuRESp2Ww2NDc30w62WywW6HQ6zoOIrO5wbm4uzp8/j5WVFXR2dm46VldXh3379mF5eTku86dDUVxcjK6uLthstrClqrq6unDo0CHOvKwE+/1+LC4uUqG0oZiYmIhaicQCkvfu3bthxwYGBnhVmpy6NnSD7kxxQvEA3Zo+fIsQJ8F040j379/nRcwFdF4037FwToLphkUXFxd5EXMB3chkUgQ7nc6wfT6fL+Gm+H///Re2z+Vy8TLFGSut/v5+RsPsm2++AbDR84pXLFNDQwPjelxnz54FsBFK+/nnn7PKl/EOa7VaVmHvYrE4au+HK27evMkq7F0ikeDmzZus82UU7HK5qG8yGs6ePct73gUdfD4f2tvbGdO1t7dzaocZBRMEAaFQSBnhdKipqYFQKORlm0TjzcvLo4xwOhgMBuTl5XHiZVVp+f1+yGQy2iDq4uJiyGSyhFRcfr8fVVVVtEHUGo0GVVVVnHlZ19JerxdqtRpSqZTaJ5VKoVarEzrdwev1Qq/XQ6lUUvuUSiX0ej0vXk7N0srKCjQaDbXmjUajwcrKCmfSULD5Oa6srKCtrQ0SiQQSiQRtbW2MvHFzD0MrsXhUUmzdw9BKjKmSiqt7SBBE3Conru4hOa8kWqBnyj3cgl0EQcQ0cMYWW3kIgkiKe7iVV2C1Won09PSYxLCB1+tFZmYmtb22tobt4E1LBimATaQAkiKWjveR85ZSgnc6Uu5hMpFyD1PuITekYg/ZxB52dXXFTMo2n1D38NSpU7zjDEP/yHzisnJpIsBm5dJ45rntgpONuITTJirctqWlJabjdGAUvNUEp0NouxcvtLa2MgZhmUwmzqKjCrbb7aw9HC5pmWAymVivb2kymTgFe0RslrbeNTa1rtlshkgkQn5+PusL2Iqtd42NdWM0GpGVlYWTJ08ypo14h/nGI8Uax8Q3XJbteREFV1ZW8iLmex6Ja9euJfS8iD9puVyOmpoa3L59G8DmVUq3glzNlAzoimVgvrq6GmlpadDr9QA2r1K6FeRqpmRAFxveiIK9Xi8VZ/jLL78whulUVFTELJbkJeMMjUYjI29TUxNrsQBDX5qMM4w0qE2iuLgYpaWlcXMPyThDphWMNRoN6uvrOfGyskvVanXUNGq1Oq5WKclL/qwjQa/Xc+Zl1dNi8nFi9ZeSyZvqS0erjbmAbT6kT7X1lQp8QeYTyasKE8w3aJJvPh6PBwRBYGZmJi68MzMzqdjDUDx67mEsFxwrUrGHSUCqWdrpSAne6dix7uFzzz1HW0s/FO7h/v37UVBQgMceeyxm99DlcsFut2NwcBACgSDsnTHb7h4ePHgQxcXFcTPTMjIyIJFIcOfOHfz+++8Pl2DSPSTftxQv93DXrl0oKirCnTt3wtIwFhq62aputxtms5maCR8pHROEQiEkEgntew/X1tbC3mu4tLSE9vZ2nD9/njZd6Pn79u3jHoo3OTmJsbExnDlzBsDGWLXdbqcNoent7YVCocChQ4dYh+VFij3s7u5GR0cH9YWaTCbcunVr0yMkmfbChQvQarXQarVUWF4wGER6ejp7wdPT0zCbzfB4PJv2R7NT/H4/rFYrJicnUVZWxnowPtTpGxoagtFoDAsIi2anuN1ufPnll+ju7salS5dw4sQJKk+64hH2FTgcDgwPD4eJZQu/3w+bzcZ5JSSLxYL333+fNvqNDdxuN3p6ehjPDxMsl8tjjkw5ceIENfOVLVQqFd58882YeA0GA7WiWiSECfb5fPjpp58AbKyBx/bCpVIp6urqAADff/895wf6tbU1fPbZZwCAjz/+mPHCSSiVSsr3eueddxh5aWtpMrwuJyeH9cuczp07R5UZvktO/fnnnwCAY8eOoa+vj9U5nZ2d1CsH2fhaUZulwcFB1kGNi4uLjK/gYwuDwcCJ9+2332add9RmyW63w+12Q6FQIC8vD5cvX8bCwgI19VcqlcJms8HhcGBycjJuSz6aTCbMzs5Cq9Xi6NGjGB0dxcTEBJxOJyQSCZRKJUZGRjAyMoL//e9/jBFsoaAVLJfLKZvD4XBQ37ZEItlUph0OB238gVwu5ySQhEqlopo+i8VCtbsymWxTmb579y6t46BSqRg5aAXX1tbi22+/DZvY5XQ6aQMuQyGVSlFbW8trgb6WlhY0NDRgYmJi0/6ZmRnGYVylUomWlhbGeGbaMuzxeKDRaKhVDdkgOzsblZWVOHfuHO82fH19HW1tbWhqamL9ul2ZTIbXXnsNnZ2drN7yFfFFjy6XC6WlpVCpVFhaWsK///5LVfnz8/PIy8sDAOzevRu5ubnIycmBx+OJKZ6YIAj4fD7U19ejsbERf/zxB4aHhykrdHx8HE8//TQAYP/+/VAqlVAoFJx4I1ZapGiyrBw4cAD37t2DXC7HgQMHAGx0QXNycrC+vh63VR5Cecnw3J6eHqhUKpSXlwPY6OI+88wzALiHxnN6PPz555/D9h08eJATIR/Qzd9gE/FKh9SYFlvI5XKqPMUCrlFuKpUKp0+fZkwXDAZp93MSLBaLUVJSgqNHjyIjIwNerzfmOR0ul4sx9lAikeD06dN4+eWXIZVKGXnj5h5evHgRXq8XHo+Hd9MTCpFIhHv37iEnJydqp/+HH36A1+uFy+VirKTi6h7Gug7tVpDuIUEQKCwsjOge/vPPP6zyCwQCWF5exl9//YX5+Xla93DbzTSbzQar1Yr19fW4uoclJSUp9xB4BJullOCdjkdO8P8BGCQ0hnF1DxUAAAAASUVORK5CYII=);
+      width: 27px;
+      height: 30px;
+    }
+    :host.active {
+      cursor: auto;
+    }
+    </style>
+  </template>
+  
+</polymer-element><polymer-element name="tr-ui-b-mouse-mode-selector">
+  <template>
+    <style>
+    :host {
+
+      -webkit-user-drag: element;
+      -webkit-user-select: none;
+
+      background: #DDD;
+      border: 1px solid #BBB;
+      border-radius: 4px;
+      box-shadow: 0 1px 2px rgba(0,0,0,0.2);
+      left: calc(100% - 120px);
+      position: absolute;
+      top: 100px;
+      user-select: none;
+      width: 29px;
+      z-index: 20;
+    }
+
+    .drag-handle {
+      background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAChCAYAAACbBNzvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABV0RVh0Q3JlYXRpb24gVGltZQA3LzE2LzEzRNEKUwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAA9aSURBVHic7V1rTFvl//+UrgUmZWMpbLa6cLErwpYxkqLGkjAG88WSbmumGUllvlmAJctMRtybvlHrLXiJUekMIZuYSCL5gS+EuLIXGEGjqCsllCEW6xQECgzWG7S05/+C/zkp9LTn0gsL6ych9JzznOdzPj19Luf5PN/nCN59913ixRdfRFdXFxLx/2GDgCAIYmpqCoWFhUjE/4cNae+99x4AIFH/Hzak7nDqDu+wOyyw2WzEdl9EMpG23ReQbKQE73Q8coJ3bfcFWK1W/Pbbb/D7/UhLi/37DwaDEIvFKC8vR0lJSdjxbRVstVoxPDyMxx9/HAUFBcjMzIRAIOCdXzAYhNvtht1ux/DwMACEid5WwSMjI3jyySdRXFwMsVgMoVAYk2CCIJCZmYns7GyMjo5iZGQkPoKXl5exd+9e3hdGIhgMIj8/H5mZmRCJRIyCyQ5NJBAEgUAgAKFQiIKCAiwsLISl4VxoHA4H+vv74Xa7uZ4aBqFQiOzsbIhEIojFYojFYohEItq/8fFxXLlyBUtLSxHThOaxZ88eCIXC2AWPj48DAH799deYBaelpUEoFLL6++qrrwAAH3zwAav0YrGYthLkJHh6ehpzc3MAgPn5eUxPT8csWiAQMJbboaEhmM1mAIDFYsHQ0BDvPDkJtlgsYdt+v59LFrxw/fr1sG2Xy8UrL06C6+vrw7bFYjEvYi747rvvwrYlEgmvvDjV0g6HI+p2ohBP3qh32OFwoLe3l1VGvb29sNvtvC8kFCMjI9DpdKzS6nQ6mEwm1nnTPg/7/X6MjY1hcnKS/VX+P/bu3YuysjLk5uYypv36669x8uRJZGRkQCQSwev1oqOjAz09PZx5CwsLcenSJRw+fBh+vx+rq6swmUx46aWXNqWjvcMDAwO8xAIbnZKBgQFeNXhzczMvscBGp6S5uRk//vhj1HS0grVaLYqLi3kRy+Vy1NXVRe0RRcKNGzeg0Wh48apUKnR1daG6ujpqOtpKy+VyQa1Wo6SkBLdv38aFCxeoY5988gn1+fLly9TnL774ApWVlXjiiSfgdDqxtrbG+aJ9Ph/0ej3OnDkDvV6PW7duUceOHDlCfR4dHaU+v/DCC7h27RrUajWcTidWV1ejctAKJggCKysryMzMhE6nw+zsLO3Joft1Oh0ePHiApaUlduqi8BYVFaGvr48Vb19fHyfeqM2Sz+dj3QTEs4lKJC+njsfWJoptkxUrtjZRbJssOnASXFtbG3U7UXjrrbeibnMBJ8FZWVkoKysDABQUFCArK4s3MRcoFArqrlZXV0OhUPDOi5Ngn8+Hw4cPQyqV4tlnn4XP5+NNTIIgmH0An8+HV155BUqlEq+++ior3kAgQLuf84jH2toajh8/jvX1da6n0sLj8SAjI4MxHUEQ+PTTT1nlSRAEHjx4QHtsW8e0RCIR7HY79uzZE/GOcEUgEEAgEMDff/8NkUgUdnxbBR85cgRmsxkCgQD5+fkRh2XYIhAI4P79+5iamoLD4cCxY8fC0myr4KeeegoCgQBWqxVzc3NIS0uLedQyGAxi165dKC8vR1FRUVialHu405ESvNPxyAlOuYfJRMo9fFjdw3iBq3vIBDbu4bYK3uoextKtJEH2yWNyD8nyEG8wuYcffvgha3cxru6h3W5Hf39/QoyzaE6fyWRCQ0MDZ+MsLu7h8vIyent7sby8zIk8VkxNTUGn08Fms8UlP04Nn9/vR39/f9w8JLZwu91obGzk5CFFAq+Wfnh4mDKok4mWlha0trbGlAfvrs3k5CQGBgaSYoiHoqenB1evXk2OIb4VDocDJpMp6eXaYrGgsbGRV7mOufPq8XgwMDCQ9HI9NzeHq1evci7XvDseUqkUWq0W6enpCAaDcDqd8Hq9fLNjDaVSiRs3bkAikfDi5XSHxWIxampqAAALCwsYGhrC7Ows5ufnEypWIpHAYDAAACYmJnD9+nXevJwEnzp1CjKZDBUVFQCAsbGxpJTfjz76CFVVVWhqagIAdHR08G6XWQuuqanB7t274fV6UVpaiuzsbAAbTzyJhMFggEKhgNfrRX19PWQyGQDAaDTyyo+V4JqaGshkMsricLlcOH78OICNCWp8p0cwwWAwoKqqahPvG2+8AWDji+7u7uacJyvBMpksrKxkZWVR0yLGxsY4E7NBVVVVGK9CoaCmRXR0dHDOk5VguorB5/OhoqICYrE4YZ2PSLxXrlyBRCLhNcE1pufh1dVVXLx4EWlpaRGnJzCBjXtId87g4GBU3ri5h1uJ5+fnY8mCtXvIhTflHoYg5R4mEyn3MAl45KyWlOCdjkdOcMo9TCZS7mHKPeSGhLmH5LBOrAGXXN1DcliHrgdFgsk95CzYbrfDbDbD7/ejrKwstpmtNO5hJJhMJrS2tsLtdqOpqQlarTZi2mjuIWvBfr8fZrN50/iz2WzG9PQ0nn/+edonEzZgij10uVwwGo2bxp+NRiOGhobw+uuv005hjtk9JENz6AbbyWCuRESp2Ww2NDc30w62WywW6HQ6zoOIrO5wbm4uzp8/j5WVFXR2dm46VldXh3379mF5eTku86dDUVxcjK6uLthstrClqrq6unDo0CHOvKwE+/1+LC4uUqG0oZiYmIhaicQCkvfu3bthxwYGBnhVmpy6NnSD7kxxQvEA3Zo+fIsQJ8F040j379/nRcwFdF4037FwToLphkUXFxd5EXMB3chkUgQ7nc6wfT6fL+Gm+H///Re2z+Vy8TLFGSut/v5+RsPsm2++AbDR84pXLFNDQwPjelxnz54FsBFK+/nnn7PKl/EOa7VaVmHvYrE4au+HK27evMkq7F0ikeDmzZus82UU7HK5qG8yGs6ePct73gUdfD4f2tvbGdO1t7dzaocZBRMEAaFQSBnhdKipqYFQKORlm0TjzcvLo4xwOhgMBuTl5XHiZVVp+f1+yGQy2iDq4uJiyGSyhFRcfr8fVVVVtEHUGo0GVVVVnHlZ19JerxdqtRpSqZTaJ5VKoVarEzrdwev1Qq/XQ6lUUvuUSiX0ej0vXk7N0srKCjQaDbXmjUajwcrKCmfSULD5Oa6srKCtrQ0SiQQSiQRtbW2MvHFzD0MrsXhUUmzdw9BKjKmSiqt7SBBE3Conru4hOa8kWqBnyj3cgl0EQcQ0cMYWW3kIgkiKe7iVV2C1Won09PSYxLCB1+tFZmYmtb22tobt4E1LBimATaQAkiKWjveR85ZSgnc6Uu5hMpFyD1PuITekYg/ZxB52dXXFTMo2n1D38NSpU7zjDEP/yHzisnJpIsBm5dJ45rntgpONuITTJirctqWlJabjdGAUvNUEp0NouxcvtLa2MgZhmUwmzqKjCrbb7aw9HC5pmWAymVivb2kymTgFe0RslrbeNTa1rtlshkgkQn5+PusL2Iqtd42NdWM0GpGVlYWTJ08ypo14h/nGI8Uax8Q3XJbteREFV1ZW8iLmex6Ja9euJfS8iD9puVyOmpoa3L59G8DmVUq3glzNlAzoimVgvrq6GmlpadDr9QA2r1K6FeRqpmRAFxveiIK9Xi8VZ/jLL78whulUVFTELJbkJeMMjUYjI29TUxNrsQBDX5qMM4w0qE2iuLgYpaWlcXMPyThDphWMNRoN6uvrOfGyskvVanXUNGq1Oq5WKclL/qwjQa/Xc+Zl1dNi8nFi9ZeSyZvqS0erjbmAbT6kT7X1lQp8QeYTyasKE8w3aJJvPh6PBwRBYGZmJi68MzMzqdjDUDx67mEsFxwrUrGHSUCqWdrpSAne6dix7uFzzz1HW0s/FO7h/v37UVBQgMceeyxm99DlcsFut2NwcBACgSDsnTHb7h4ePHgQxcXFcTPTMjIyIJFIcOfOHfz+++8Pl2DSPSTftxQv93DXrl0oKirCnTt3wtIwFhq62aputxtms5maCR8pHROEQiEkEgntew/X1tbC3mu4tLSE9vZ2nD9/njZd6Pn79u3jHoo3OTmJsbExnDlzBsDGWLXdbqcNoent7YVCocChQ4dYh+VFij3s7u5GR0cH9YWaTCbcunVr0yMkmfbChQvQarXQarVUWF4wGER6ejp7wdPT0zCbzfB4PJv2R7NT/H4/rFYrJicnUVZWxnowPtTpGxoagtFoDAsIi2anuN1ufPnll+ju7salS5dw4sQJKk+64hH2FTgcDgwPD4eJZQu/3w+bzcZ5JSSLxYL333+fNvqNDdxuN3p6ehjPDxMsl8tjjkw5ceIENfOVLVQqFd58882YeA0GA7WiWiSECfb5fPjpp58AbKyBx/bCpVIp6urqAADff/895wf6tbU1fPbZZwCAjz/+mPHCSSiVSsr3eueddxh5aWtpMrwuJyeH9cuczp07R5UZvktO/fnnnwCAY8eOoa+vj9U5nZ2d1CsH2fhaUZulwcFB1kGNi4uLjK/gYwuDwcCJ9+2332add9RmyW63w+12Q6FQIC8vD5cvX8bCwgI19VcqlcJms8HhcGBycjJuSz6aTCbMzs5Cq9Xi6NGjGB0dxcTEBJxOJyQSCZRKJUZGRjAyMoL//e9/jBFsoaAVLJfLKZvD4XBQ37ZEItlUph0OB238gVwu5ySQhEqlopo+i8VCtbsymWxTmb579y6t46BSqRg5aAXX1tbi22+/DZvY5XQ6aQMuQyGVSlFbW8trgb6WlhY0NDRgYmJi0/6ZmRnGYVylUomWlhbGeGbaMuzxeKDRaKhVDdkgOzsblZWVOHfuHO82fH19HW1tbWhqamL9ul2ZTIbXXnsNnZ2drN7yFfFFjy6XC6WlpVCpVFhaWsK///5LVfnz8/PIy8sDAOzevRu5ubnIycmBx+OJKZ6YIAj4fD7U19ejsbERf/zxB4aHhykrdHx8HE8//TQAYP/+/VAqlVAoFJx4I1ZapGiyrBw4cAD37t2DXC7HgQMHAGx0QXNycrC+vh63VR5Cecnw3J6eHqhUKpSXlwPY6OI+88wzALiHxnN6PPz555/D9h08eJATIR/Qzd9gE/FKh9SYFlvI5XKqPMUCrlFuKpUKp0+fZkwXDAZp93MSLBaLUVJSgqNHjyIjIwNerzfmOR0ul4sx9lAikeD06dN4+eWXIZVKGXnj5h5evHgRXq8XHo+Hd9MTCpFIhHv37iEnJydqp/+HH36A1+uFy+VirKTi6h7Gug7tVpDuIUEQKCwsjOge/vPPP6zyCwQCWF5exl9//YX5+Xla93DbzTSbzQar1Yr19fW4uoclJSUp9xB4BJullOCdjkdO8P8BGCQ0hnF1DxUAAAAASUVORK5CYII=) 2px 3px no-repeat;
+      background-repeat: no-repeat;
+      border-bottom: 1px solid #BCBCBC;
+      cursor: move;
+      display: block;
+      height: 13px;
+      width: 27px;
+    }
+
+    .tool-button {
+      background-position: center center;
+      background-repeat: no-repeat;
+      border-bottom: 1px solid #BCBCBC;
+      border-top: 1px solid #F1F1F1;
+      cursor: pointer;
+    }
+
+    .buttons > .tool-button:last-child {
+      border-bottom: none;
+    }
+
+    </style>
+    <div class="drag-handle"></div>
+    <div class="buttons">
+    </div>
+  </template>
+</polymer-element><polymer-element name="tr-ui-e-chrome-cc-display-item-list-item">
+  <template>
+    <style>
+      :host {
+        border-bottom: 1px solid #555;
+        display: block;
+        font-size: 12px;
+        padding: 3px 5px;
+      }
+
+      :host(:hover) {
+        background-color: #f0f0f0;
+        cursor: pointer;
+      }
+
+      .header {
+        font-weight: bold;
+        margin: 2px 0;
+      }
+
+      .header > .extra {
+        background-color: #777;
+        border-radius: 4px;
+        color: white;
+        margin: 0 6px;
+        text-decoration: none;
+        padding: 2px 4px;
+      }
+
+      .raw-details {
+        white-space: pre-wrap;
+      }
+
+      .details > dl {
+        margin: 0;
+      }
+
+      :host(:not([selected])) .details {
+        display: none;
+      }
+    </style>
+    <div class="header">
+      {{name}}
+      <template if="{{richDetails &amp;&amp; richDetails.skp64}}">
+        <a class="extra" download="drawing.skp" href="data:application/octet-stream;base64,{{richDetails.skp64}}" on-click="{{stopPropagation}}">SKP</a>
+      </template>
+    </div>
+    <div class="details">
+      <template if="{{rawDetails}}">
+        <div class="raw-details">{{rawDetails}}</div>
+      </template>
+      <template bind="{{richDetails}}" if="{{richDetails}}">
+        <dl>
+          <template bind="{{cullRect}}" if="{{cullRect}}">
+            <dt>Cull rect</dt>
+            <dd>{{x}},{{y}} {{width}}×{{height}}</dd>
+          </template>
+          <template bind="{{visualRect}}" if="{{visualRect}}">
+            <dt>Visual rect</dt>
+            <dd>{{x}},{{y}} {{width}}×{{height}}</dd>
+          </template>
+        </dl>
+      </template>
+    </div>
+  </template>
+  
+</polymer-element><style>
+* * /deep/ tr-ui-e-chrome-cc-picture-ops-list-view{-webkit-flex-direction:column;border-top:1px solid grey;display:-webkit-flex}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view{-webkit-flex:1 1 auto;overflow:auto}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item{border-bottom:1px solid #555;font-size:small;font-weight:bold;padding-bottom:5px;padding-left:5px}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item:hover{background-color:#f0f0f0;cursor:pointer}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item>*{color:#777;font-size:x-small;font-weight:normal;margin-left:1em;max-width:300px}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item>.elementInfo{color:purple;font-size:small;font-weight:bold}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item>.time{color:rgb(136,0,0)}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view .x-list-view:focus>.list-item[beforeSelection]{background-color:rgb(171,217,202);outline:1px dotted rgba(0,0,0,0.1);outline-offset:0}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view .x-list-view>.list-item[beforeSelection]{background-color:rgb(103,199,165)}
+</style><template id="tr-ui-e-chrome-cc-display-item-debugger-template">
+  <style>
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger {
+    -webkit-flex: 1 1 auto;
+    display: -webkit-flex;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel {
+    -webkit-flex-direction: column;
+    display: -webkit-flex;
+    min-width: 300px;
+    overflow-y: auto;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
+        display-item-info {
+    -webkit-flex: 1 1 auto;
+    padding-top: 2px;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
+        display-item-info .title {
+    font-weight: bold;
+    margin-left: 5px;
+    margin-right: 5px;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
+        display-item-info .export {
+    margin: 5px;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > tr-ui-b-drag-handle {
+    -webkit-flex: 0 0 auto;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel {
+    -webkit-flex: 1 1 auto;
+    display: -webkit-flex;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
+      display-item-info > header {
+    border-bottom: 1px solid #555;
+  }
+
+  /*************************************************/
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
+      tr-ui-e-chrome-cc-picture-ops-list-view.hasPictureOps {
+    display: block;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
+        tr-ui-b-drag-handle.hasPictureOps {
+    display: block;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
+        tr-ui-e-chrome-cc-picture-ops-list-view {
+    display: none;
+    overflow-y: auto;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
+        tr-ui-b-drag-handle {
+    display: none;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-display-item-debugger raster-area {
+    -webkit-flex: 1 1 auto;
+    background-color: #ddd;
+    min-height: 200px;
+    min-width: 200px;
+    overflow-y: auto;
+    padding-left: 5px;
+  }
+  </style>
+
+  <left-panel>
+    <display-item-info>
+      <header>
+        <span class="title">Display Item List</span>
+        <span class="size"></span>
+        <div class="export">
+          <input class="dlfilename" type="text" value="displayitemlist.json"/>
+          <button class="dlexport">Export display item list</button>
+        </div>
+        <div class="export">
+          <input class="skpfilename" type="text" value="skpicture.skp"/>
+          <button class="skpexport">Export list as SkPicture</button>
+        </div>
+      </header>
+    </display-item-info>
+  </left-panel>
+  <right-panel>
+    <raster-area><canvas></canvas></raster-area>
+  </right-panel>
+</template><style>
+* /deep/ .tr-ui-e-chrome-cc-display-item-list-view{-webkit-flex:1 1 auto!important;display:-webkit-flex}
+</style><style>
+* /deep/ tr-ui-e-chrome-cc-layer-picker{-webkit-flex-direction:column;display:-webkit-flex}* /deep/ tr-ui-e-chrome-cc-layer-picker>top-controls{-webkit-flex:0 0 auto;background-image:-webkit-gradient(linear,0 0,100% 0,from(#E5E5E5),to(#D1D1D1));border-bottom:1px solid #8e8e8e;border-top:1px solid white;display:inline;font-size:14px;padding-left:2px}* /deep/ tr-ui-e-chrome-cc-layer-picker>top-controls input[type='checkbox']{vertical-align:-2px}* /deep/ tr-ui-e-chrome-cc-layer-picker>.x-list-view{-webkit-flex:1 1 auto;font-family:monospace;overflow:auto}* /deep/ tr-ui-e-chrome-cc-layer-picker>tr-ui-a-generic-object-view{-webkit-flex:0 0 auto;height:200px;overflow:auto}* /deep/ tr-ui-e-chrome-cc-layer-picker>tr-ui-a-generic-object-view *{-webkit-user-select:text!important;cursor:text}
+</style><style>
+* /deep/ quad-stack-view {
+  display: block;
+  float: left;
+  height: 100%;
+  overflow: hidden;
+  position: relative; /* For the absolute positioned mouse-mode-selector */
+  width: 100%;
+}
+
+* /deep/ quad-stack-view > #header {
+  position: absolute;
+  font-size: 70%;
+  top: 10px;
+  left: 10px;
+  width: 800px;
+}
+* /deep/ quad-stack-view > #stacking-distance-slider {
+  position: absolute;
+  font-size: 70%;
+  top: 10px;
+  right: 10px;
+}
+
+* /deep/ quad-stack-view > #chrome-left {
+  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMcAAABICAYAAABC4+HLAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH3QcNFyMmV/Pm9QAAIABJREFUeNrtvXmwXdd13vlbe9/7BgzEQAIcQAIEQYKjSAokLVlOW5Fk2nLKmqx0J2Wp0k652h13uiy5XYqdwU7sSnckpZ1yV3U75apU4kos27Elu9NlyRXZjiiRomSTIiWZs0hwHsABJIY33rPX6j/W2ueed3DvAyDKKoGFW0UCeO/ec/fZZ+29v7XWt74lAIuLi7tXV1f/raq+zcy2AogIZsbpvrqfMzNE5IS/1/fVn5sZKaUTrtX9/v7nT+fn9e/1e052X/3r1THWa3R/37+miKCq7c+mjW/a+F/P57vj6/45bayn+wzXs4n+794Q9nP8+PHdS0tL31LVmfpGVQU4YSInGUb/YfZvpn+zp/LQu4Y27X31d933nurkq+qaa08yotO55npG0v2O+r1/XZ9fb2FMWoD9Oe5+pju//e+fdP3u83+j2I+89NJLn11dXf1bdSCTJnnSSpz2+/VWZ/8m+w+g/zD616yT2P9733BOZ5f4dhbCevPQHet63zVtV3y9n1/v/k9nZ562SNY7Gd5o9iPPP//8qxVKrQdL+hOy3qqdNEnTjv1JA+vuRpMGvd7kn8oCqded9B2THuJ6u/Kk7+vuiNOgQH8OX+/np813/376O/CkU2EavDwVWPiGsp9nn33WJt3ItF2ne2xOe2jTHuTJMOS0He1UcG33791JmWQYkzB6dyfp7tynsktPG8/Jdv2TGcLpfH7Sc5m0EKZBsPV+tp4PMe39bwj7efrpp229G5u2O3WPplN1cE/XQZsENybtnNN2pv4x3N1Fpu2S/SO6j6fXgz6n4gRPGmMfR7/ez/cXd/1798Tsfr4PMU52Oq4Hp95I9jPor7ZJ+G7STlEnvN7gesfXpB2tH5lZzynrO07Txtb92aQTY9rv+3i1v4jqv5umOSEq0r9O3/iqEUx6MPXnqjpxrk73812oMQmP968zyUj68zPp+U1bxG80+5GnnnrKpkVxTiWUuN4q7+96/YFXp6pvANN8hD7MmRbF6O7200KR9ed9CDbpSF4v6jIJtnQjQdPGOylK9p34/HowaFL0Z73IUNex7Z5Gk3bkN6L9yBNPPGHdY3fayu3uSP0dqH62uyP0w4XrDWo957gPEfqf78e4p4U8+0Y86R6711pvAUyL3vTvd9ou238Q/Xn4dj4/Cd6d7BlMC532534S9OnO8xvVfuTxxx+39RJlk/DtpAGc6k6hquScp+7EkyIn0+LV60Ufpu2q05zN/sOYFIfvP8CT5VEmGWN/h5w0zm/38+sl7/r3drLntt58rzdXbyT7kccee8z6O2b3JnLO6zpjk47nkyVg1pu07muas9b3CaZh4f5uPMn4Sikn7Jj9RTEJMnQfVHdck4x3Wt5i0qL6dj8/6WQ5GcSYBiEn+STrhT/fqPYzmJYxrRcopax5eH18Oi38WI2ulLImYTPNMavv716z/93rRXUmOZXVgZ5kePX7+hPeN5xJTmx3MdXf9zHyM888w8LCwgn30IUQ0xzWSYvhVD4/LarTzpWBpOl+zqRQ9lqjE2DCtbH2x9MW3XA45JxzzmHnzp0njYp9r9jPoH75Gkekc8SZ2ZpjrH/Ez8wMSSmHMY4YjZp2MDnniVGT/sPvRhxmZ2fJOWHmxj0ajU7AtvV6k4727gSklMg5M4jdq6iyuro69bv799fNptYF0X3vJKjz8MMPMz+/gWuvuYatW7eScgIEwTADEwEUAZDkBgtuYONlCCJgAuZ/N5QkCcP8avFzUH8fsZgNEoJJLAakc+2TjENi90RQjGSCJm1/hwlmgmRFFIwEYoiNxyPxvYZ07gVKUzh8+DD333cfRZXLLrvsBLxfjbl76pyO/ZRS1thq325O137k4YcftvUSOf1Ufdco/uwLX+LOv7ibZ194EYBdF+zkB956C+98+99ARE64ue6XqyqDwaDdGZqm4Qtf/DK3f+UveO7QS2uu944f/IH2WpNwdp2U/oT8+W23c8dX7+K5GN9FF+zkb7zlZt71jh9cswNPw8uTsPU0h19VeeSRR7j55lvYumUzK6MCpqTs9p2AAiRLmChWBBIIiqZEMkVUMAQTJZtQSCCKkDE0/h+7twkKpCSYxrhVMTGyCYogohRLCGvHoYD0xyGKScIUpC5AVSQl/0ACaxeCkJJhakDCTJEEiKAmDMx8XSdAY6lZQjHmZoa89NLL3Pv1r3PVVVeesDH3T+FTtZ/uguhu8v3o36naj4ggjzzyiPXhwtRjOf6+tLjEP//4r3HOuRfw5psPsOeSXQA8+dQz3Pu1ezl2+BC//I9+jvn5uXWjDfW1uLjIr37y19m8/fzJ13vlBf75L/48c3Oza3aWadSP5eUVfuUT/2bd6/3yL/xvbNgwv2Y3qbtOF0J2MfN6ka7nnnuOvZfuZcfO8xitKnloFBXEBHGLc4MTQwVEDeIkyAqa/Pdh9z5vaqgkUuz8akYGVATEHOYYiCSUQtJqkCDJsJJIvXFYNRIzLGWQQqqLEiOhqKS6gnzhqJ9cJplsiiXBSnfBJF957TEoJBKYYskwFUSgWCKnBkmZp59+mpdfepmdO3eu2USn+V/r2c/JWAX9CN/J7KdNiD744IO2nqM0Cff+01/9P7js6gP8d29/C5detJNtmzYC8OrxBZ547kVu/+JfcPDBe/iXv/xPkCnkvHalm/HPTvV6v/SP25vs3mB3fKurI37pX36cfdesf73HHriH//2X/3Fr/NOSTZMyzn0n0sx47LHH+JEf+REWFhd8pzcliRtyBVbFYlcTN0bfpoWEYiaxENTtjOQwByOZ7+r+b/zacY5YICvH/iDmBurjmzQOKMlIWkPThpohkuN0iwWI+YrNGkdeQswwcbhlWEAzw8wXazZDJfsYMP84ghXzxSHip5rB/IY5/sv/+0dc96Y3rdmA2uz0YDA1EHIqDNv1KDAVvk2yn64vOujHlqdlJ+vv/+wLX2JuywVcfOkeXj2ywGtHn0C1Hov+uUsu3cNzzz/Hf7vtdm5959snRknq6wtfvOOUr/fnX7yDH37n29fccBdG5Zy57fYvs2HrqV7vdm59x9vXJeqtx6WqD+T555/nyiv3s7y8TMLhSgLMElkURx+KENi+7uzi0EgtIUCi+OmSwIpjmYTSAIN6uiSDkkAKQgp/IgON+yaGnxIBz/rjcPckj30LU5I5rCsJsiYsafgjCbXEUIwiiqq4e1J9FjVfNCioYMlPC/eJIFuisTiN0oBkhllBcmJlaYnL9+/n0KFD7Nixg5xza6hPP/00S0tLzM7Mho/lfpGicW/hyyCQAv75Nuw+UOwi/o7WmXLfClhYOMaWLVvZtWtXG7TpRibrMx/0V1j34XcdT4DBYMA933yQnRdeymhUOHZsCZFEqrurORRZHRV2XrCLr33jft596zsZjUbtiuzGqQeDAXd//T52Xrj3lK53zzce4G/d+k6WlpfXOF5jSAhf+8YD7DjF8d3zjQf50VvfRdM0LYzqv/pHcH9napqGF154gb/59rdz7PhxTPCdNSliisYuK5rjIRsWPyeJQyGhWhyNCEn9sbrPIGRJmBRfeCb+kEXQwDZG49AFIYmh4kvmhHGYISTEGl9YBimPoZypvx8VJA3R5IurMcdrSTrjLuGjGJCNpJnGlCwWp6CRMLIoMCBhFJPYIAxNxjVXX83v//7vs337dnLONE1DzpmXX36Zt73tB1g8fhwzh3OIObyrp60IWp9XNlBfRtkCPqWIM9T5x+GhDIQN8/O88srLfPWrX+WWW245IeLVPvvubt49biZRMTDj6MISGzdt9i81YTjIzM/OMjc7w3AwANwp27hpM0cWln0iOt9RowruSAlHFpZP43pLJxAB68lnZuSUOXJa41tCIuQ7jYBWf9fnP5kZo9GIlZUVLrzwQpaXVzxihGHJEE1ucdlIkgOwKMncj5Ds0SjfZd2R9re7AeWkGOFUhuOrrd+jFDPMEkJ1XGPhxdY+cRzZARPJfR9Jiqm/P2wONKHJwJRs6jt0Su5nWHJfQj2IYBQIp14xBkI47OE/BVyUFI6/KCk5zJOSGY1W2bFjB03TrOGtzQyHNKNRnTGQghWjWInxGI0phvtyNOZg0GAU86hmlMYw9c9qMYyCjgpHjx9ndmYD3//Wt3LPPfdM9FtUlYGqUko5IbzVdUi7WHw4M8vc3CxzczNsmnejq6HSphSWVlYBWF2ZY2Z2tt2tuwuw/ruUwszs6V2vuxi6TlYd48zM6V+vC8/qYqgnZT861Y+dP/bYo/zoj/4Yo3o8u1PgoVRJiPqJBRkRo6C+oxchSaGIxC5uJHEfwDdqN3xTg+wRKXd2EyRIBppjy/fLY02CWCzTxuHX91MAEfdPNJESqBopFcwyJurAqg3jWpx6DqkExVIiNwIDQa1BAWRAQiE5XExJ/URCyQgFIZlB9rk8cOAAt912G/v3728jiMOZGVQDEShoSUhuEM2U5CecFHWIGbAzlwZJghRDs0AJ2FVdu2wUMxI+XyqFpjF27drF0aNH2bRpU7txt455fcjVuCrE6Ds6DkdW2bF9C1lg49wsG+ZmOWfjHNu3bGL7lk1s2TjPpvlZNszOkMTYsW0LWvSEHbhraDu2nfr1ztu6haa3uLqn0qhpOO+0rncOTWcy+vmMesLVxVgXdimFpmligWbmZgZtLN8vFmFZbbBGHfdSwo9whxot8ZAdMydzTG9aUDGKGlZ8QaiGU6wGVtDSUChIY6j6gqOBTHPScZj5qVHUoAg0DaYlIIWhlj2qFUhBDUwLNH4tMCgKZqRSGMwO+PM//VOGgznPe2jDYGbIvfd8g5mZAapCMcEEv6cK8RpFLLFp06Z2Lqvt7dmzh4cfeRBTQ1E04GXBEG187pLSqNKYbyBm0IQda6MoDUbB1DwQUvyE1tJgKFqM1dJw6Z5Lefzxx1vb7B4EqbtSJjmmXYjVNIXrr7mCI68dZmaQmJ8dsu2cTezYtpkd2zaz9ZyNzM8OmRlkjr52mBuu2c/qaHRCZGcMSxpuuGb/qV/v2isYxfW6GdFqtE3TcMNpjq8mGbs+xyRSX520GhMvpfDC889z7XXXsdKsYMV8t7fA3ChYJmWgGKkIlh3SWeQEwJDkp0UJKKIioGNXW9R3PnKKEK+E32BYDlxvUMTQzEnHIREQSCQaMSRn9+dlvKOmMUr3aFRKcco43JIUicWU+G+3fYHf/c+/x6c+9R+ZGQ6ZmZ3jtz/1Kf7PX/vX3HPvvTHaQsYgKUnFo9C5oBirKytcdeVVvPjii+1zEBGOHTvGxk0bfXGabyxGQ1GHmaYB4YqRLDYIIXyw4vDQ/HoJQ61BTHyPKeZ3aMbxhQXm5+dPSDCaGamPt7pQZRJL8qYbrmP56KscPnwYEZgZJAbZ/5sZZMA4fPgVlo++yoEbrqXCtq4Bdv2bm9/8JpaPvXZq17v+2hNgTXcxN03DzQeuP+Xx3XLg+hNoGN1Togsxu4umnijPv/AC+6/YTxlZZIo1YJIf5yLmBpeFMhCwEg67J8QkVacyRe66eLg1aRtcUVFSgmzFsx3uWSKSkWIUibiSpcD1648DMU/ggTvP6r5PskhrmEMfRFEJKBcZfJPkjq4nQTA13vk338mHfuJDfOXOr/J7v/t7/M7v/A53fvlOfuqnfoqbbjhA8di1/2nZr5kU0YQlhz7XvukannrqqTW2snXrVpYXFrBmBH5+OBnA/CRxP0NJVjySZoo2DrLcbhu0eDTORONnxde3FUQLqoVmtMreS/fwzDPPnOBe5J/+6Z/+F/1dvZ9V7BqHiHDDtVdy51f/ktVRw9ZzNpMkMRo1HD16jAce/hbPPv0k/+N//941Wcr1CoNuvO4q7vjKetd7gr/3t98zkXJ8QpTJjBuuu5IvTxnf/Q9/i+effpIPf/DHJiqO9EPX/Yhd9UuWl5fZMD/ProsupJhDBEniOzaCWMakuNMsjp0znhzTSv0wRbL4yYCQyWgliJhTMzKZRty3cNhDJNgMY0ACz66H333ScRSHVSnCrZbdfzFpc4okFLHsvkEkBE0E6YSPfXxQrHDF/suZnZ3jttu+wHPPPcv73vdefuiHfpiVZrlNbLYJy4Hfm9uSn4jaFF47coScUuvnbd26lccOPsa27eehxXd/JO7LQAZgJRZ84+epZM8JeYwtIaKIRZpGxXNFLTvMIuye2LRxE48++ig7d+5c48/KPffcY5O4+11nvOsj1N/Pz2/ggYe/xaNPPUcTGHc4GLBvz0Vcc8U+VlZXpkrgTCrPrNf71pPPnnC9a6+8gqWlxTUOUx1T/VmfGbphw0buf+gRHn3yudavaMe3/3JWVpZPYOXW+6vX7CYcu9GUpmm47777+OAHP+h4NxYlSdr8gOGOY45TwCpIsRQwxkjqxi7iECCJY3MBj91L8viXKSlFrN7iG6SyrOp1OaVxEAlB1EPFyTzSVCkjmgSp2XGNPALBO2kMy0JW8YhW8VNpODvLp//g03zjG/diCDfeeAN/+8c/yOrqClgOLpZgA8NGKU6vOI0QhMzK8iL/9fOf58orr2QwGJBz5v777+etb/l+jh096rAzCNApbhMqRItTRVKHGBmcF6CYkSUjWlr+pNNrIodiwlNPP8WuXbvWJKoHXew+GAwYjUYnxPS78d9q3EtLi+zfdym3HLiBuVlP1qyurPLakSMsryxPrNfuhnL7hLKFhePs33cpN9/4Jubm58BgeWWFI0eOsLBwfM3i7BrytLrlhYXjXL1/H993043MzsyAwMrKKseOHWNxcWEq6a3PzO0nSFWV0WjE7OwsMzOzLC8teagTQ5w8FVljZ8B6bD/Ig2YkUaz4I1Tx06Sh+E4cxuIZcHdAU8Ak0+T2ihtWzYSj1NThScfhYM4dbne6fVcV8bCx5zpicanvvO2qix+bepSrFMgizM7O8h8/9Z/46p1f4f0f+HEA/ugP/5CVpRU+/KEPsTxa8XAxhpRUM6C+IFViDgqbNp3Tnso153HhhRfyyuGXyGmGOjtJxfliqYbFPX+hpiQKWIoNB1CFQYrTsqGIRLTKT+xk0ChA4Yr9+3ng/vvZu3dvaw+D7mmxsrLCYDBY44TWf3eNsJsPeeWVV9aVdekvvm7Uql88tLq6yksvvzy1sH+aSkh9NU3T+k0iwuLiIouLi+0J2K8zmERP7+Z2qvPdz3EcOnSI6667jtXVZTQZ0pgf81KZrNWgAuNWrlJSSolEWPL9WqWGOt2eJSlaguJhvusnEc/yV0ygRkkpiH+QRSnCScfhnCl1smM44BVIdVnBnnFOEfpMiBVUnMxYeWFZ3FP6/z77x9x5x528//0f4F3vfAdigpbCZ/7wM1yyezdveetbnL8lCbNC5cAUJ7d4SFoSS6Nlrrnmap555ll27tzJcDjk3HPP5eDBg1x2+RU0qytgQol5dNaDopactoLFCVyQLKhCSua+hQTzWD33YwKpcUaA/8ztbBRRs/bk6OPsLkTRoHj3C/Yn1Rv0/ZJJBSarq6troEr3c/XPmvnuQ7FJmfu+sMAkI+/WpPQTndMURGqCr8/6rD8/dOgQ73nPezh27HhEYzzk6Md6pX8bFbAIhonDJKhoxWLXTwFp1NdPY8EgFzT8Dv+AOwbOrjWPgKXKbfLo1CmNo15HPHFmUhgTVQh+lOOWLM641aCFWEtbj+cgyo/+yLvZtnUb3//Wt7G6OkIwfviHb2Xnzgu48c3Xs7K86idNzTGUoLlLxUdOiMwI1159NX/5l3exbdu29jkuLi4yPzvL8dUVSoNDtDjJLKBRI0YmkqXOcEQSFI2cShKkLowSSUlLkU+CZMbi4iLnbt/O8vIyMzMzbkt33nmnTaqK6lZx1aOuX7vcx+yTanq7MKpbfNR1quvu3F8wfQp5d7ev4+v6Al3o0/eX1hMHm1aLPEl8YWFhgZWVZd7+gz/IatOEPzDwya8bdXLoQwnqglR6OBFNcqhDOLbq22dEIiM513iUR8woyZ32XJ3sFDukuPtSKhnxFMbRJgZjx0ymIIM2CWkBO6xS4FNk7cVQC1jia6UNh1rOfgKotgnLFGOWDkFRTZyuUmodSaX1BNoYCF+548vMDGeYn59nZmYGVeXwK4fZef4FqFkEH2owISElnil+X77Ak/PQLBYzYNKQbNDys2rEziJQkFDO2bKVu+6+i71797q9dxNp/d247yfUnMC00Gw3kdNNltXPTitb7VZ91YRQn6zY/96+L1TDq30nvY6l+2fNldSxdU/Mfji3C+1WVlZ45JFHeOtb3sZodTWIbL4raTAKa8UFxTlOTlfxZJRU34DkcXuLRG6p4VdAszu+QZZTBSkOY6zu/MUJWaYRTTuNcfhxlaIOQ+Ik8ARhqZBNPOyMJFLkFDTGX0wpJUCYiI+ztaHY7ASsGRuemS+iZCCqEbiKMKv6ovRxKbccuIWDBw+2lBIR4YVDLzAzHJLQCF1bhzZSPKnZEjiDvqLmi5sCyfMeJpU640466uPT5Pe4PFohDTLD4dARQ3e3rYbdzRB3F0mfqj0pD9CFL12sXiM+1ZDrd9WfdSejv+C6pMWukXezmv3/uhCpe63uoqvjrYuq6WHOetp1v3N+fp65+TnMMpTShjOt3QE9ROvYPI5/83oKlRL1FIrzNSRyAJXFamBNLexzjJ78mqq+YFJxACZ4dvB0xqFBFycpUMhmlBw0k6CxWnJDdlqKnwR+gezcrmD+WkR+tN1/jUJARRM/tSg+1mSU8K80KCGkgiEeoFAfkqkyt2kD8/PzLVlVVbn22mu57YtfYLUUNm7cgBYfmgUb2BduHJfFKBRnAqRIXBZnKIuCNMWTirFo0eKUEwEdGcuLy2MbuP32260LfU6m0zRNm3Q9XdZazDIajRgOh+2C6Auk9X2e9dQpJtU+96HSYDA4IYk5TVh4Te1w+Br9U+PFF1/kyquuYu/eS50KkiQoHtLmCHJEhGosnRrPD6IgOaIl5rAJ8YSYJoWSUSnk5Bwqq5gjJUyLR4tybhm8vkA4rXFIMmiEkqSlswseyclSTxL3XzyRCGLF5QaiZLZSw2t+JuHObaJuAuo8KLF6i/V/Dgu1pk+C1hEOcRLP8D/1zFM89NBDnH/++QyHQy91Hgx44IEHKKUwPz9PaZq4txpVq5WINZIXLoJGwZa4RyZtrNzvQVGSed3LzOwsKQm7du0aEw+7jmyfaDiJRtENuU2Td+z/vMvd6i6++u8uhOpHlyoEqousr3LXvYd+sq7eU9c3miSjWRdJ9WO6i7DuYIcOHeLHP/B+ji0skSWyA6kWKKU2x13LUn3HcuydUoSjgk6NJqwUkNziYMtK1hTwSONKvggk+WJJgbFNGswyScopj6MN+yZjkEAbQwYNlMwwfKKSPN8S9u9JNcmIRj1HkByliEfGRoKm5KzxONMkxpCjTEDw7L1FWUESpWgIX2SLkoKoGMzC/iuu4Mtf/jI7duxobWJ5eZnLLrusjXh2Swb69tO3iYpQuqWw1fftRkyHw+GaIM2gL0ZQv7juntN0nLoZ9a5D3GXdttTfyHr2F0QdcH8xdk+P6kt0F0w3RNyv0OtH37rXn8TA7YsorK6unlBPXEphYWGByy+7jMWlZa+YK8kd5sDqKejfRkNmgBaPubvwgNKUQYxRIZnvxil2VC3+WREnFOILysSDrKoCNAgShU/J687l9MeRygCNYqriTA7PyquzcX0z953fiIRMtnEJbQ7elnrQQHMhaaIBp8cHLPOKkUqV0VYvQsy8ZiVqQ8Tpu2OonmBlZYX9+/dz5MgRtmzZsqaMtm8bw+FwzabaZ23X1+zs7Bok008kT5JYSl0j74ZtR6PRGojV3fFreLOLxfs+S5f+XXfe6mtMKputi6DrVPfpIX1fon5n15/o+g2T9GHrOJaXl9fkbUoprTJJHWddwE3T8MQTT/COH3oXpSmRqnP6tyexvKRUUMQG7luY1GgqiSF5UDynkSzwdZSamkQxj4dXsyWyQE7uvFrUwWrKEIVPOqgV36c/Do3TS6VGsiLWr2PlkAxYKo5zaiYcozHncGlAGEsgJUUdObhn4ZAmp2Acx2JHpBO50tZvMrE2ny1RHKXA277/bRw8eHCNXX237Sd1C4e6cKceMd2sdI3ydJ31SYXsdYDd1djdyfuwqgt3BoPBCSJjNRFZrzccDtes+vWUUvqJwvr+4XC4Jsxcd4+6+6SUGI1GHD16lAcffJD/4e/8HZaPL3nVWXCSPLTpLB1LbqopZGsQT4aliB5pyaTAtwWQQfAhtJCDqaqRlCtBabBhwnKJIiOLTDfQSOQrTn8czsNIHhUL6J0HOGwzJxUWEZJKsDIEy4ZJ9ipDrUojGg67JwuCKxwejuc1LIfJB8YXEY9WRZGXImQN1i+GpuSnWTGWV5b48Ic/zNfvvZejR4+uQTffLfuR27/0pdhCiAL6MUmM4J7Uyq5WmiU0kmqEo2oj1Z9JyLVU3GqRFfU5Cp+ge52uDx+7UJ3kVgFJWPO++pska+Vqqq+FdcbT+S4i4tJqRdXQUCSU3JeTljM1HA64+qorWS4N2VJ8jQYBLpMoQUWHAUKDix9U+ptj/cBI4nymAEvxQBwe+XXjHlJBtdIQ05hwh6JZSPo6xtFm68f3i4IFnZycQhBhnJF3H1yD4hIlsCpjxq6M6+NpqTIhAySKFKfiD5K11A93xI0qFlRTqV42HLkhEyQJDz74wASxD9pn1SGutQteqM+acRBhLBI2wZ7Hw2+t6/lDh2woQhG8drkaazUUBI00ewpqDClR1EXGqiZRq2IR0jE5HM+avZWITzsTMqInEb2oC0BDoCxJ8IoiopCCy+OsS6c1iPiR7xFFI6dQvqhiCjHlLfwQN6Lx/Xssp5iQrBpK5JJbdqrXSYiF1kegDM8ZBDkvplIl5igHLSMoH9XZFIOSa2WdeXVbZGpdWMfxuVRHH39fLFvPVai87nH4JsDaZ6WG5SBFVl6X1PmHsV5QhEQcCZcsAAAWiUlEQVTN/3S+VfIipBosE0FLzWRnf1Z4Vtp9J/WAXcpRvBVUrprIi/vGxpG2yOWf5FkJRdx+Bh6DeN32nCRKFyV2No1Yd12ViguMpZRiB/AEVor4u0VM2+LYN/Hj2LO6cXhGFVjoVDjetnqsBMUnDuVURS1IpOw7TqP12K8Lw5Nm7vA5dUDVs8MSnl8hwpKhzKfqIgWu3RScHgtjSw4l6s6SgtWKuhqHU9OkzbYWMyx1ggPm7FZJyZ1UBIsyToschguG+HcXxZN+kdmuQVdNJRJw1jlVtS2W+k6MQ8W8bDcMMhWjSfgmY8Vza6o+P8Hd0wjFWlQG1mNc8OfqGWev2WgipKzqBuf+T4kyFB9f0TzOktdEqLoWlpl4HQaN86LsVJ+VeaTvO2jPg6B6erRDIIdR13oD/02s+uQTSJvrdfwpUTBjA2sTR9IINlCkyWiuzM/sD0DMSS0mTkqzhKbiANpo2aClEXLc2LhYP7Kfgb/rSSvWtMk2y7G7hbSHVUigtcjIKMUX60iEQQOWa/DU0BIs2ahRdqLOd2aOihZee+UwRYsbQ3a2qmbIxb1hC1U3oQ1ZjRm7GnkFEXKLIYmEn4zRRYp6kXofFYIEydHLB4OK0RmHf5eChOYVY2q81edWhdrCc3B4GBC3as3Fs0rFoaDXllQYowEVfcMiiJh10Yt2TqzkTGE/GeS7OkeDFD5CSfFnOFxSAjRKwKIUxklGvC4TGRSk8aIXk8bLO1NyxuQgao6roYaRWlSEWZhiIlFaAw+tpMANKeHx8Ip5Ww5NPDj1YnpPPDmFuoqMWRz1VfAMgvgnhpVwxIrn5Er2IqEkvjMnySjFT6SUnX/0HZij44tHWVkdccnu3Zx9fe+/Btr4DuvUBW1hjiTfL1IpNAKDyNiqFefN+Kbv8Wp1LaVKoSdi89Iq7/lRlc0jKJqsfW9JNi7cJ3mMPRwlrUzTtoYldokorjZxcKniO4e6DIWvfMVLSXODufU7wcE8yVZq2FDHO3xj1SeSVr0jWUE1ofL65shILC6tsG/fZW3M/ezre/uVkBJVZo5HCacxyDruuJkTzqzSHrK4WFqFKWLkyOWk6kTWLHllZhYP3UXZekRliFj4uHorBSFMzOPdFllaB8w4F0Y8sqJVXdzEaxnCaTXxMkpxBVn/uqSh9FcimuEOutQQRUrOdkU8vBo+kNcCvP45SiI0zejswjiTFodLODaUCJ21YbzgpKSICnn9rbSliCYRprOE5OTOoLg2kJHIUQYq2aMKOVVpRtpoeKoymVLpy0FbSA66UjinxRLJ7RfLGUWcyyMOzCLC6pg4uUaTmKDZa4fropFU2miNk3BaXgdSwqlLige1amVdcvr2654j9zfOvs4gWEVxVW2rNc2iHg7P7qiJiDujppTqtBSw1CDmcXRWidqA8LOtuAYTTlOQKOUZkwIrv8ZFugbqWqzSOulxZBQNOU+HLSkcNi3GAEHzyIPDGkxRF0cKCqpiKaT7i7rwWBX6ipNINbtoQHJGJjmFbEsVFNOWkWq8zjkadRzDs68zBVa5wQ2DgpAkObOsRFSiCsdJxdgZyKHm4OFbBhG4SZW373FzHUR7lKBGWIT2UieLOtTIaUQtmvsblT7txDUlkzRXIqUnk5LnHyQWBknIqDvFklxVQ2sCLBYdCcmGWnJJTvFQoRYhDYKBKhGxyQRPKLVhz29njlxMwDVaObs2zjBYFUmdxqzF3yI1l5DaTKSiaEkgrhhHEmaGmc2bNjM7mHF4o5HOi2qvXEJu3/DC/uAQEU53FokkWxDGUtVX9TLHpDkUx+tWPBYTm8kDl6jJngjy/GotAfUQclRTen11VMah47BdUUgpBJ6DFaCUEAwzJGVmN8yxYdM8m+Y3QM7Vg4kkkTE7nJ06R5VHZHEAnV0bZxysiqysefioiDCIWmQstbyYZMllKkMndX5mA//3b/w//MnnPsett97K//qz/wuriwbZd+IaXUo11m8pdFIjc12MJJGbiOIUzFzvtR1P01bOEUS9lDOPPPQQr7z6Kju2n8cVV1zuSStxaUxyiCfXa5iHgEuQ5VxCMORhUE/IVapQUGFTSqwsL/E7v/uf+eY3v86RI0eYGQ65/PLLee973su1N1xPWVnh2OICn/+jz/P+D3wgAgedOTJXRS8mDCIjXSkjZ19nCqyKrKMUT+J5mt4CK9MamAZRKhnMzczyG//2N3jowQe56aab+PrX7yUxJCWLCJLDnMoZwlwNIqc4naQySR1Mlcp5CQl8SSn8F2lT+W5YnpRqSmHvnktJOfHoY4+ShkFYyzkSSNYqjbcyXuKEEq1Z+6iuz4RAcpw6szNz/Pmf/lf+3k/+JN969GG2bd/Gvn37uPiSSzh+fIGPf/IT/Itf+iWOHDvGRz/yc+Q8OHGOYuJUPNTbWGkTY2dfZ9DiKADFG5aIppYe4KJi2qrsIQ2iwuzcLP/+t/4D9993H9u2bUO1cPPNN6Ml5F5qWNZLgl260Wruo6qMp7arllrxgFHtHyFgxeVUUggwN5W8KL7INm3eiKJs2LQRBQ5+63FyErSx4PxUiFfpGR4CdqFwRTUFT6j4Yo6SycEg8cd//F/49Gf+kBuuvx5B2LZ1G9deey2X7N5N0YZ9+/axuLTEz/7sz7Jnz+4WgnbnyKNmrhiokS23s7DqzINViaalbZQcNGXR0AbKThxIgllhbm6WT/32b3P3XXezY8cOzIwtW7byD3/mH7K4shzdiYxG8IRfKzwfLMiiYeAaxfnFI0ollMilbY4HRaNqLXnmXDJWCkVgzyWX8sSTjzOcmWPzhs0cOX6EJ558kt2790TysJCCJtBUVTypQoBGyRp98ELmrHgTl8OHD/MHf/Bp9u3bx2g04qMf/Qh7du9meWWZLENKafh3/+Hf8/xzz3HFFVcE6zeoJDFHLvDhVBlVF1FGcoSlzxrcmeVz2ABSoYTSRAlYoCl7D4eggc8Mh3zmM3/A7bffwfnnnw/Azp07+djHPkajDefMDUNhI1rwBllNVVlcWvRdNFid3quCwP7aGo5ZioYr3gekcnA8cqWklMMHSly+7woee+IgOQ3YumULh189zLPPPsPFF+9qWxRr66iH6oc60SxriBCrO82ShJQGfPozf8TevXs5duwYv/iLv8imTedw7PhxhEQjixxfXOa+b/4V5+04b1xGGwVHqXK7teZSSnTZqnUTejaSe+YtDu82mkU6HYEyYh5gFVNSHvC5P/kTPv/5P+Oiiy5sDeOhhx7i3e9+d0igyLgntYybtm/cuJFf/79+nXM2nxPKEwnJ2tJKUu0BIerZZIWmKdx11x1ITuOWXLjgGSHfLyS2bN3Cls3nUFTZunUbrx0+zPPPvsCFF1zoY8rR6kqcqGgaogiR6fYwrUfWBnOzPPLwg2zffi6X7buM7du2szJaDSq28OLLr/LRj3yEiy++mKNHj3p8S4RmtQkWLeHZV3GxqvAXGFNbZvnZ15myOEwsIq+1j0EmpdKqSKDG7Pw8n/7MZ9izZ8+a6r9zzz2X8847b90vKKXhi1/8Eu99z4+5+28lEhgS7EpXscgpuzyKKK+8dIiLd+9hkMQ1YtMIs2FIygS1pOo6hR9hZLZu386hFw6x6+JdjJrGe3lHEZEnxx37ayTzarPHJmU2JGNpyWVZLrrgQlaa1SBOehRr1wUX8NnPfg60RPbeN4Dl0QrLxxfbXuKo530oNm4qGYIHdhZXnWGLwxVhnJEq4lDDosREjZShrK5y1VVXsbS0dNpfsLo6YveuXWhxDySJdy8ySSRV1LIr1WlpT565jZs5fuwIaWbW9Y0sk5JGHsPFYES974KKMDDH+0X9NGmaEs0nvejHlFbqsu19h4euNdiBRYW5uVnX2F1aIqsXz2jxSpOl0SrLr7ziaRJlXAVnRm6VA6tgW/FkYuuE51pOefZ1Ri0OCrkMKGmsnySB2ZNAo0JZXuEjH/kon/zkJ9bUY59//vlcffVV3tpM2sLTtrZPzNiydQs33ngTy6tLkSj0uolkng/IOHFPa2mjGlu3biJnf2+tx0gdSYFg/XPs+AJZ1DsUkVhZXuDSSy9DKYg5M9ijYt4FqaiQcnFNpWxYyd5ZVYSiDeeffz5NU7j77rv50E98iIWlBVqhm5JdtsYysxtmKKPG+wCKK3VX9JSTM38tNFqrOksKn+fs68x5ydPPPF116sPochSF+C5emyFIRGQ+8YmPt7W8zz77HH//7/8kb37zAe+akw1TbwxZBbUV7yCkVW81HOycDG0kmh5KW8stVVM1VUHxCO9aFMvgnKnXXn2Nlw4dYtu554IVFldX2Lt7D6Vx/ydngvIuURIqQYyM8leSJzsju52ScMcdt/OlL93O4uIiBw68mb/7d3+C5ZXlqGly3+uVl17iV37lV7nxxhv4n/7B/8xoZTWKZizyi937SO6UR4vjFw49z00HbjprdWdKnsOakFUxjQ6exYnehdDmHtdooIWPfexjlJDc2bXrIn7zN3+Tv/rmN5zuPYrrFHXcrRaG6Ht+MYNSEFXKyHMSpp4LMNShkXmyT83afm+VKFi1/I6+eoRnn3uGrdu3oRiLSyvsufgSmlGlo9decNCkWn9hjKJGo4QAcqNOFUmmFFPe8a53ISJs3ryZ2277Iv/q4/+Kl156iY0bNoHC5z77x/yjX/gFzr/gfP7irr9kNg+pnQHaA7VoKwEKhjVB3bez2fEz7uR48qknLJNbdQ9LtaC4qkDUckZvmSXJM9Sf/OQnWxmUgwcP8lu/9VssLi4g5CASWtCVkq+TWmgURfFAiHpVXaZg9YpHtCza9bbyjeIwaSYP+NrXv8auCy6ClFg8vsieS/d4F9bIp2RxkWLNtLXX0Zpi3M8uKPBaO8DEybi0uMSv/ZtfY252luXlZR5//HEWFhYYDAZccsklbN++nYWFBd73vvdx0803U7Q5YY6INsaVGZ+Sy8+8+PwhDhw4cNbqzqSTo2BRqFOiFtuL8FMIFFA0+jQ03p8tZX7+536e5RWP7uw4b4d/Pqjpg2gmoqqIGk2IhlkqFINGjSZOBFXvEJpKQa2BQqhIBPtcFGu8GaIUb86+aX4TBeP48aPs3rMbbUY0USCF+omgRKticzHjohpL1JeHJqUpTl+36HmtpmyY38A/+6f/hAsvuojRaMT+/fu5+aabuf6GG5ifn2eQB/zMz/wDvu+W76OUZuIcWaijazFUCqWRXlHX2dcZcXI88eTjZpJoJYTa5iJjwYFKwo7MhwscZKGMCnd/7S7edMONbJyb94hTkii2DwVwAaxBZNCWt0rkARSviZBilARZw1hTLcgfh4UsKvEkpPEXFo6zcdNm12K1VjmrrfKr2lOefmg1WECdS+b6JjZuqFgpLHhgYn7DPMeOH+eRRx7m6NGjzM7NcsnFl7D3sr0cO7rg2XCxqXOU1JuqJFwsLQ0yh154nptuOutznDmL44knDPHqORt4Ew/VHPUXIeyg4pSLUK3TkHMPcaiqTeFwJVH14d2g1ZyqHmL1Xq0aelUaurBZooVCrdgLmJNrfTmtTlGKL9boA6HiDUwkh8SPiod9XUCD1EQ31VSbqsQCiSYsYhJtvdplBGY0SRhaFc2JTqbqQoGCYqc4RzUhmtOAF188C6vOLFhFzYr7jq5BIdeooZBUQg3PXD+1lOiyGBhe3dFurGqQatvpE6JKLjXeQ6HVEKoOdpwQxXMY3qXHG40UDGk80lTEe+URkvtaqScWPSrCnyBgVJXsMUtobtqGj973O8iUNCGr0zj3KciNqr7gBhqkkLZ3hYXBW0uzP5U5MhOn47SaT2dfZ8zi0Ej21cahRLzes9niESh1yEEJdZCIHCW1tr2UiF+H6Nmg0RWxrbQTV6zTKmxEkPQ6X1xlHNUKAwnZzuR1TqUEEz3V0m9DdeCD01Atz3jVYTSalOLYvwRd3YoLOlSVESxakdnIGzhqRJWiM5IFrUXR1z1HVb3x7OsMSgIGEhmTG6L/AsGXkoznMGosn+QVdC01PYWyRwqZ+mjxS9u1xHddBMvFdYdLaRuyCDky8jXWFO1QrLiUTklRo+Rqikkt1MktZEejM1UIK9RbkFQV1r1iRC17UZVEaxcpURUYcEqhiPsz0nj0rKr6IfK650gH5ezaONNODqnE1xAIIKIsVVXDosmIR1b94edsnUIoGxtRLm1OoVXwVWtVDnNTF03VeM1eUpqsbdjYRKKvsg0zDmUkKSKlI1Zcuw+NW+VWX8ePIRdSbheLjFwNBD8NBiWa1BOOe/gG5rMShUoBM78Dc+Slv+msxZ1RPkfoQbmYQY3qgI4E1QYzx+Zq3uAU9SyzVawfjd2LetMUxXtEW/SK8B50OT4T6iMaHY5QShVIEPH6h+TizVWlRIMoWFTRIjTi/kkJyCYWbFtTirijXlXNVUucHrX/t2vrWiNOlykuueNhZ1opTO/zEi20NNqhvc450qawYX4Df3XffWsoOGdf38PRqscOPmYpFG1ShlSyc5kyUQvurXSlNBGFicBU1F20WlPquk2VLlLFvzUUsVPrRIdvUCKqU6nudY83acNg1tK9MySvIHRIpeTk6iWErGfkMaM/orcPQ1rdbvdtShrXkVeyjCilqrkXVzqR6NtXhcorn+t1z1HxnNIrr77KyspS9LUIXtkayFUZPbV1g7WdWaPXfCsKYViwVySawXTeYIzJjq3av7Tq7bWPNxEKr+OQWrIs2p6I1umjN+011oSvrSfCyOrvpBaGhSp7R4e3+px0tXbbga+9le/WHMljjx70pHg4qSqCyMhLSU1c87XqzVpoCIbUjSuXgKYQcDbI4vKZskauvmrcgmhGJSRzglflSt/RtsBcMsc0t4TDksbibN4ZKSrwxJCiHnatRVFt96DIrkdttySX1K+ZE4v0dTXmFCdUFonmMcEOiJyMiLbq79+xOZJOo4ToAe6+j7WLX6r5mDe7SUGt8QaQHgk0Fd94skb9irR+XKp6KTIOr0t0lR1InKhrxkGba5LiRNRstZeGz1OTooePpjVtjMfPKuar6kNXKqq6ovugfVZEi4BoU2AaWsUhB0vQ1uJ5EJWX3605annVIkKREp1Ds3cBjRZZIeCHiIuU1V3FzBscinn72kQJ/K2RSIwFIJVHFUVNRNutCN820SvDdbAij5E1yIdGrhQMIWTjSyvCTU7MRqjUhZ4tdi6NZF9oZsVNSLZxf47sLYNTZMyl+hrRMyKpRueMyHN8p+coKqBU1GnuGCWVttNq7R8jql6LbnGaRu9AojamCm1HcUtUZDZutBqSQeoVj2hBtbgGcJETx4GXAljxZ+bs6WjtXIxRSLYq6gvDAqKGwkpSIoEM0gQnwSo1SZgp3tO8RBsJgnemMVduG+NnpbUeJ/Fdn6OBVme0hmKJTp9tljlk4iWq8qLfRirxuTJuQqPRJqgemVrPqugYlELbqf62WHSASuIdf1o2cNDMq9+SQqbexp2anKBo0fsiGMSR3EvW0ERfDRkYTSPef1oEHakLrJVEoYE09Aw+CVd/tKCwZ3IqSBn4Qygh+fnXNEeSBt8T4zj7rMZzNPjKV75KbbLT9idogVhIeNZjrdvaqsrsmESuo9Mjq6NCMq61DvwvXdzr35GihUBtKmNRm60hNh05OMfHMZQkqdN2rYtvg9LRJiSqhm0kO10BoZUBSiYtDBtLhNSuFFVwOnlo+K9xjhLfG+M4+6zGc/T/A8/G/snZpSWJAAAAAElFTkSuQmCC);
+  display: none;
+}
+
+* /deep/ quad-stack-view > #chrome-mid {
+  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAABICAYAAADRa1RpAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH3QcNFycE5v9iFQAAAQtJREFUOMvtkjGSWzEMQx/0eYrM3v8k3vgqycalSwlI8Ufyl3OBFMtGIgUCIEd6PB6RBEASqvfONSrJXrDNbNkQ8ywA2y/SmayW+ZIESTsiyQsxo40xmMS2aUmYbheHpCVd0+UqJGGMsey3mUyldoUvlY3D9rIN0K7Wbe/WbZ+y1yWtaVtrp3VJzAEX6ZVjc2p7b2mtnYhNdl6m05rwtfV/ltx7XypJTpXeO7Y5juOlchzHaWxyrJmuhLapqgIJONv05+srThBgiQpBTSRwGOr3rwccgWHUhJ7P5/YNlbd/2XiL78L/WajP240AQUihfnx84EDJjCHKHjTAbkimQDgBjAJ1/3kHAgEk/gL71AHEWVXPGQAAAABJRU5ErkJggg==);
+  display: none;
+}
+
+* /deep/ quad-stack-view > #chrome-right {
+  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAABICAYAAACaw4eEAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH3QcNFyghKmOqnQAADE1JREFUaN6dmsuyZsdRhb/M2uf07bREYDykPeIleAMibNx92i9BgEPBgyB5xlvgtgI8VDNBI41xhGkpQowERgqw3H0ue1cuBlm1T/3Vu4XNiWj9l12XrMyVK1fWL/v6668lCXdHEt/1Z2YnnyUhCTPbX8dn45pmRkR81z7/XUr59Pz8/K8ePnz47/bVV19pnDhu0t+Pmx0Z+Pv8zWv1/eZnZ2dntw8ePPizZXw4bj5/P3vq6G/eePZiX9fd9/Xng6/reg78/dInzxPG9+/auH83GjEbPUahj6m1Hoa6v1/X9c+XPrlP7INqrfuru7+10WzUkUHvOtTojPF1mPdHSzdqPPXo5vm046bdq0fhGr+bvXZk6OgAM2OZBx7hZD7hnCzbtp149Wid0YOjx+eE6t8tMzb659Ebkg5PPY8ZvXpEQWNCzck2M4H3BWeM1Fr31/6+GziPmTefM3tcYzQoIt4a3+cso2EzhsYTzAAdw9M9M3rviPv683dl/Oi9pdZKKeVk4piVRyDu1NI3mCtARFBKeWeGbtt2yHV9HXdnGUMyGjSfZq4K42ajYbPXx836XjO+jsj3rawcFx5dPgK8bzJ6eGbzI8yO3j4yaMToiWF98fl0c4bNSXBEJ/Ozd1HSEY8BLGOIxlONeCqlnHyWtGNoxteRMX38uP44fkyyPnfpp58zqy/s7jsGj0rOEcvPVaMD/sj4I/zWWllmMB/VviOwHumv+dkRGc9EOtOUu6fHZteOGBtDN/+NeJwPNRsxl54RU3PIO4x827a3wNwfdr45kib92WhAf9+fHem1I7FZa31rr+WIr45kzrjZsixvZWHHYcfqXFHGctM9ta7ridcigmVZWNf1DvyllN2wkatmHIxCby7kYzbPOD2qFCN39efrut55rE8YM3I+8VENHPFVa2VZlkOSdXe2bTuhmHdl+W5ox8T8YCbD/l2t9YQqRiNGjx8l1JEamVXKri56doyTuzfGhWd+OyLJjsNRlo+eHaX63Iy8ldnjQn3hbmA/yagGusfG7JwrxZytcxMyjpnH77VyPEEP65iVs5tntp4ldp8zlrG+x8z2Y9L1f91Jy+zeccGZn0Zv9nFHTH500BGbM6HOojMiWEZQf1cN7Aut68qyLCdeGFN+xuRYJ7tXu5fetU9EZCiPOp8xm8bTzLqpe2jkoDnzxjCOa8/VZByzzG7t8gQ4eT+GdO4Be0kZDTgq5kea/0g0RgS+rushNkbg93o6aqeejUeNR/fcUWmaqWLbtn39MdGWGcRHUrcb17E1jhszq3tvxNCsJuaE6VGZMbeMKTrL6LGelVL2k41jx6zuRbknSS9BI7WMdDRTxLi3z+VkDl3/7vb29oS3xhoZESdZOm4whrW/7/NHT83UtNze3u6c1I06Ozs7wdjc7PaQzsV8JNSOp7k97IDvtDPDYTdsvts6Pz8/MXCsm2PD2g/Tm+Vx0bHZHTNvjMyRyh2pajk/P0cIZEAHLLgXQLg5ckDCAFsKCwtIeHHAQGAmSnEkMAyZMBkin4lc3jBEM4a7MZgo7mBGhLD/+M1/qiCqDJflIjICYbknjlEtQEl81cBDYIaUi3aDwoEQ7mABuFMjcHOMQHLMRLSDhhlFQk4+k9IhLggZBREeVLN+NNwNCAhRwjGMimGyPJlA3owyIwiKEltWjTBHNchIGpLleIS5ITNKQHVDYRiBGUQI/83X/0XUyorhm2EKAsvT1IqFgwusgglCWARV3SuGmdNchwgiRHWQagcHIqCNJ7whJ6AI20AeUJ3A0ilP/vQJ33zzDdvNDbWkO91oAwphrah7wVGG1cHMqSHkggiwDJthmAcgjIIVg5rfWc1h2AZ7AgBLpMElMpQCUyOSX/3rr/j+9/+EGoEQTgKxKnDADRROmCiWySJBeILbMCxENVhwBISCnldm4EBEeiQRk1AJs/Y5ER2q7BX03v17SQnumDeXRqXgDaSA1cSdIExQDM+UgtoArTyMIjABJUPt4S2hRHEIgbdstV5LI4OusDvDMgMNqw3sHqi0HPcMotyRNqp5ArnmRrkLuBm4kHmjDAeEDMICk2PFMwomqjI2xYSHsJIUUnxoeBO7rdQUJ2qeJk8SLfdLGtgWCouEVzFUG7NXMAXVG1YqyDdMhSDgFuTpabUEiUguUw3AiAafbhoR4EtmpJknKArgytMaBHBmIozEIQ41M1dK7ySGEvxQ8NoI1w2WFh0XlsUaFYilJ5zhpuGKwBxXeygIqxlrE6Ih1wKPgi8L799/QGcJo4M5o9oYDfcKUZJmEFdX12zrikh2xwwrQA2KOeqETRlCGaKaUFXLpjQwy5Elu4dzflb4uw8/5MXP/wEsE6ORVX8hbVRzTVcN4ic/ec4HH3zA7XaTC1sQtZUXAm98Z7I7uvjii8+5ePw4pUiwu7TXuogM3cX7j/jhX/yIJz948gf/NPjll1/yy1/+E//z299RCGrL+AxI8krQfhk5Ab+6LmrGyDA1dvfkqOvXNzy7fMonn7w8umjafabmsDuowPPnz3nz5joLiN9VCwIqJDGHweixV59/weNHF4itZSMJbGq61kg3h3N2fs7D9x7jIdTwIzw3tCxrZo560U5U8frNFdu6URWJS8RmRukto3smv07uxwJrMa9uLDJCG1ZKI87AWJBvhEOsG9WEhSVcWBtu1A615da2kboiPaRW4hSRcBGEClhg0cTDycWdJR1XgUdkrN2hRqslGapydo+fffgRL37+Ir1opzrrJHZDAiB49vySv/3gp9zcRiqLCpsrjSLrnpQ27KH8/ItXPHz4PtRbRMoTajrBw6Hk4o8vLvjhj/6SH/w/wf/xx//I629/u9fPjkxLIZfVwmLwWBhQqUqgU1NZlCrkQVRwGW9urrl89pRPXr78gw27vHzO9dVVI2cIOYVIGHkrYXVDUQaPvXrFo4tHbFV7dnkjzGT+5BjXwnK/cPHovcRLI9hME3ZeM2+HtRwQAVdXb1ivr6ldzfYC3sSnPFAUZHW+HE7WtqamZL07avrcnYgKKtR6m/VKQTR9n0JQjZj7KqD2LCLY2h4quqsKNUWA5BQPatjAY1hTpuAO2iqlGLV1EQJ8C87vnfOzjz7ixS8+5vf93y+sFeZnl5f89K//htttw1bAW5d05rAK90awjOD//BUPHtynblmInXStyUHJR3jw3sV7/PjpU548eXJArvZ/gv/Fx7/g9bfftug4NfVKa7byd8pN9ZT5I9rFSM/wSPFXrOn5Tby5vubp0x/z8uU/t1Jx5/H9v3b3/q4YGJfPLrl+c0Pde8lgEWxN0znG1jG6e+zfXnHvwQNETdmMINqlSEeZJ1Dvn93j4uJiL+6jv8TQO9L6lya9f/fta26228wodVwZboFU2gLbqbqglZLarzTbdpvBEhWxNJI1bq5uuV6/SRCHt35AyAwPo5aKZzlIHRb5SqTR1nRSnitQtC4phNlyqvlTppRUlmZEQJizhCErbYSa57J8SNkLRm3s7RV54AHymjK9cYjUyg+wqV8XRCtfdzea+IZiFIoSsFKBEm1SE26SpXZCeDh7g9P64R4SrU2ZkC1btea5TMDsqCJ5UfUuZwO1BlnZ6tkgrWWWqjOgqhJmsLWa2dowsKZK0nuKlMWokWWBoBIeiJpZF6CqhtnMdHSHW6PdZLfijjISu2HX11dEjURrTza3BtymzaLV5NZwEGQYW4ekaLdCkXSDRCkidr2n/XKGUlOKjxc6oXZN0H4ZefXrVxQ3atTsjD1lkJpIDNEwlSCRZ53rp4zViNiQtqwEStHT1YoUOaclSY1MmmjXCelNz2Q1T5L/7LPPYDEePXqYNa0ENHnd7xeKKUFiAO2HBM97DZMoS1prMmQLrqCE8uZHIgVDNAFpFEW7BnGKWQtnYJ6GOmL54+99D0JEzfT1alRzikHtda+1/4nsxk/VqQZmlXXzJMUiqFu7nrJMe8v2LhteteuAvEcrVqk1m+Owdn9h7ZYSE6WAIrkjPCVIFua8s0jhWHfhZ5YZZ6rZNxoplZp3clg2uUSKAcmwYpgqUs1iFI5Z4rr3mliq3IVqVDbwM9CGkao1rN1IR6F4xepCEFht1wAhIKjRNH0Dv6ym5lHrEQw8JSlUtapghHJ+qiK13OyZ6yyf/sunSYqyVuPavVVq3bvSgrKxcKVGU7/s1U5ovXz1W5v9ftPVet68cbSehRo65ZNfUuB/AWHLchVUWJtFAAAAAElFTkSuQmCC);
+  display: none;
+}
+</style><template id="quad-stack-view-template">
+  <div id="header"></div>
+  <input id="stacking-distance-slider" max="400" min="1" step="1" type="range"/>
+  
+  <canvas id="canvas"></canvas>
+  <img id="chrome-left"/>
+  <img id="chrome-mid"/>
+  <img id="chrome-right"/>
+</template><style>
+* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view {
+  position: relative;
+}
+
+* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > top-controls {
+  -webkit-flex: 0 0 auto;
+  background-image: -webkit-gradient(linear,
+                                     0 0, 100% 0,
+                                     from(#E5E5E5),
+                                     to(#D1D1D1));
+  border-bottom: 1px solid #8e8e8e;
+  border-top: 1px solid white;
+  display: flex;
+  flex-flow: row wrap;
+  flex-direction: row;
+  font-size:  14px;
+  padding-left: 2px;
+  overflow: hidden;
+}
+
+* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view >
+      top-controls input[type='checkbox'] {
+  vertical-align: -2px;
+}
+
+* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > .what-rasterized {
+  color: -webkit-link;
+  cursor: pointer;
+  text-decoration: underline;
+  position: absolute;
+  bottom: 10px;
+  left: 10px;
+}
+
+* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > #input-event {
+  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAMnwAADJ8BPja39wAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAyNSURBVHic7Z1PTCPXHcc/4wWWVbJN2cJSLVqiQJuGpoIGEVWReoBNIlIF5RCRSysOK9EbksUeOHLIIQcULbLEEYk7oqduD6gSRoqUEyK7dCOabOHghCiAE/JntQtesHt4fuM3z2+MZzy2x8ZfaTTjN+Px4/fh9/7Pb6xMJkND4VGk2hloyKkGkJCpASRkagAJmRpAQqYGkJCpASRkaqp2BvzKsizf3w1z38sKc+ZUaQCuAFeB57P7q4AF/Kxsj4GnLrfL+6PDYofQAskCaAJ6gJeB6+QAFOvZpwgwPwOHwCNgN5uu/+H252raJHRALMu6ggDwCtALNAf8E88QUL5AAHqSTVcNUTU4oQBiWVYzMIiA0E3lGhtp4CsEnPtACgFDGqXiYKoKxLKsCPAaMIwojlzV1tZGV1cXHR0ddHR00N7ebh93dHQAcHh4aG/JZNI+3tvb4+jo6LzsPAY+QYA5Ix9KBsoPpmpALMt6BXgTaHe7pre3l5GREUZGRujv7/fdsspkMmxtbRGPx4nH4+zs7BS6/HtgHfgvOW9xeE05bVZxIJZldQNvATf1c5FIhMHBQYaHh7l16xbd3d1lyUMikWBtbY319XU2NzdJp9Omy74B1oAEAoa8yIZTDttVDIhlWZeB94Dfm86Pjo4SjUbLBsFNiUSCWCzG6uqq2yVfAv9CNKHTlNlbKgLEsqxrwF+BX+nnhoaGuHPnDv39/WXPRyFtbW1x9+5dNjY2TKePgBXgOwQUFUyg3lJ2IJZl9QAfAK1qek9PD9PT04yMjJT1970qHo8zPz/P7u6ufuoE+CewQw6Kw2OCsGVZgViW9SdgFNGLBqC1tZWZmRnGx8eJRMI5lJZOp1lZWWFubo7j42P1VAZR4W8gWmJn5KBAAEVYWYBkm7PvIvoWtjo7O1lYWKCvry/w3yyHtre3mZqaYn9/Xz/1EPg3ot+iQslQIpTAgWRh/A0x5GFrYGCAWCxGe7trKzeUSiaTRKNRHjx4oJ/6CvgHoigLDEo5yox30WCMjY2xtLRUczAA2tvbWVpaYmxsTD91E3gbMbTTBFxCFM0WYPntMwXqIdk64x3lM9FolMnJycB+o5paXFwkFovplfcniDrlNLvJXr4vTwnMQ7KtqVE1rZ5gAExOThKNRvXkPyMGQaWXlOQpgQDJ9jM+QGlNjY2N1RUMqcnJSb34shClwnVE8aVCAY9QSi6ysj3wv6N0+gYGBlhaWqKlpaWke4dVqVSK27dv6xX9j8AyYpDyGaL4svsqxdo5CA95DwVGZ2cnsVisbmEAtLS0EIvF6OzsVJNfQIzRlVTJlwQkO1Boj021traysLBQk60pr2pvb2dhYYHWVscAxEuI1pcKJYIHKKV6yFvqh5mZmZrp9AWhvr4+ZmZm9OQ3MAMpSr6BZOcz7CH0np4exsfH/d6uZjU+Pk5Pj6PbdR34LT69xBeQbG/8TTVteno6tGNT5VQkEmF6elpPfh24TK7VFaFIKH4t+BrKTN/Q0FDoRm0rqZGREYaGhtSkXyDqVs9Fl2cg2QUJw2ranTt3vN6m7mSwwR8R68dULzm31eXHQwZRFiSMjo5WfXIpDOrv72d01DFQcQXoQ3hI0V7iB8gr9pcjEdNQwoVVNBrV69EXcanccfEST0Cyi9jsSe/BwcGKz4GHWd3d3QwOOqaAOoDnMFfuRnn1kJfV7wwPD3v8ev1Ls4mF+Ac2FVsW5C8aLxpI9ou/U9Nu3brlOcP1LoNNbuJej+R5ihcPaQJ+Iz/09vY2iiuDuru76e3tVZN+jeiTyFHggsWWFyA9KAufL3K/4zxptrkE3MClYkcDUxQQU3HVAOIug226yHlIXvNXrUe8eEiHPGhra2v0PQqov7+ftrY2NekFzEVWSXWI3Rns6uoq6ZGyepdlWXR1dalJrRTwEFVegFyVB3L5f0Pu0mzUirC1CsPoJcUCuYLyGFkDyPnSbBQhB8VUZNm99nOBZC+8qqZdhBnBUmWw0RXMQHx5iOPpprB5yMbGBp999lm1s+GQwUZXKFBUSRULxOEhYQNy//59Hj58WO1sOOQCpGAfBOoESBhVwENMm61in/cOXRt3f3+f09NTAH766SdaWlrY29sDoLm5mevXr1cze25y9QypYoH8rH44PDwsIU/B6KOPPrLzcXBwQCQS4dNPPwXgxo0bfPzxx9XMnslGJ7h7hkX2GZOaBRKLxezjxcVFLl++zMTERBVz5JTBRseGy3zXIaEDEna5eAgENIX7WP2QTCaL/NrFlcFG0kMKLvIttsh6ilg83ATh85D3338/dGNrmo3SiAXYuvLgeImX9Rj4peHHqq5r165VOwt50mx0gjkqhJT92cvgol2P7O3thSa+VBiVyWTsJnhWsv4wBrZR5QWIjfzo6IitrS0vebxQ2tra0oPdPCbfQ4ze4gXII/VDPB73k9cLIYNtDnACUJ9td8gLkF2UiqkBxF2abc6AJOboD3lQzgWi1BWnCCgA7OzskEgk/Oa5bpVIJPTwT9+RCymoe4jvIkt+8Qs1cW1tzVem61kGm8jiKk1+gIE8eV25+Ihc3CjW19c9fr3+pdkkgwCiwsiL+oDyUKhXIE8QISUA2NzcbBRbihKJBJubm2rSD4h4KLLuOMMQRUiVn9XvdrGVTqcdg3wXXbFYTI9Op3qHuqlQHCoKSNadJNH7KGNbq6urjT4Jou+hRaVLIUoTE4zA6hD5Q5+oCXfv3vVxm/qSwQY7iG6C9BAZByWv6auOevgBIr3ke5mwsbFxofsl8XhcDw34BPgaYXg1KI0p6JlDRQPRiq0zRGQ1W/Pz827RPeta6XSa+fl5Pfl/5LxC3QrCAP9P4WYQcW2/kQm7u7usrKz4vF3tamVlRY/P+CPwLTlvcANiDN/kCYjiJXLv6AXNzc2xvb3t5ZY1re3tbebm5vRk2Vc7JReExgTDqFI8JIMIMvylTDw+PmZqaupCzCgmk0mmpqb0IJkHiLpV9Ypn5MA4oJimMDwD0eqSDCLIsD3WvL+/TzQaJZVKeb11zSiVShGNRvXgmE+Az8kVU8+UrSjvgNKCz8jxmaeIIMNyEoYHDx4wOztbwq3DrdnZWT1W1imi5XmCE0YKlyLLbYLPFxDlZhLKd4ggw/aJe/fusbi46Of2odbi4iL37t1TkzLAfxAzqmc4PcPkIQVVqofIfRrREVpXL4jFYnUFRQbB1PQIMZsqYaSUraiWlaqSQvxlV3rIFd2XEIsm/gL8Qb1ubGyMDz/8sGajzKVSKWZnZ3XPANHs/xxh+BSiyDrObifkirCiiisIDogK5TIwjvY6ijoMpHwEbCJAPCMHQIWhxl4sKmxsEEEwwQmlCQHlbeBV9do6CjX+DbBNDobqHSYYRQfCLDnimKEZfJbN0CpiENLOxf7+PhMTEywvL4d6mCWdTrO8vMzExIQOI4Pod31OPowTzHWHpz80kMjWyqpB6SXSU5oRQYbfARwVSA2+ruIU0ZrSK/ATnEBky8oxqlusnQMLNa4VXRa5Sr4JEYdwDPG8tkM18kKXJ+TmgWQ/Q3qDDsNTJa4r6NjvkA/lEsJTnkdEMX3J9N0Qv/LoAFFEyRaTbFFJGPK4ZBhQntdVgDuUZkTr6w2E1zgUspeC/YjoY3yPczgkZdhk568kGFC+F7qAE4qsU2S90owIpfo6ImCkUVV6bd4TxHzGtzgnmNThEN0rHK0pSngFUtleeeQCRa1XmhHN41eBAcRDka6qwIslU4jRhq/Jn8tQh0HUitttWtb3YvRyv4MKck8MyUeCZRGmeosMGPkiIshNpR72yCCW6hwgFiTI1pE0tDS6abDQ87BIMarEW9rAGUFNNot1MHL/HCIs3k1E8K9LAWfpDDEYepDd5Lopdc5b9Qx9r14nx/EgABhQASCQ109RizAdjApH9vhvIOJNvYCIFyJjhhSjNLlm6WMEgCS5tbbqAjbTlKsKwwTCHmCtmfcY2j/khCL3auwPNXyRGqOwifzQRq2IYk7dwDl8cYwwpjoqrRrSDYYKpdCaqpLrC5Oq8S5c+xCzx+hwTJtbEBdT3aMbUBpVXWvrtsnz+op1CNArVFXlbdEu3mICowJS9+cBsR/Exx2IaQG0af1tHggI1itUVft96vahsi/kOabPxQCRe93IaW3TAVQMhFRVgdiZMIORexOgQiDkXv3DdAObPMYIgAqBkAoFECmtJ+4Gp9Ax2rEORe51w+sQ7OOK17FhAqLKBY567AbBTSY4rsfVsktogagqACfvUpd0tz/SkR4GW9QEEFVBhtAI499ec0DqXf8H8f4X10jf2YAAAAAASUVORK5CYII=);
+  display: none;
+}
+</style><template id="tr-ui-e-chrome-cc-layer-tree-quad-stack-view-template">
+  <img id="input-event"/>
+</template><style>
+* /deep/ tr-ui-e-chrome-cc-layer-view{-webkit-flex-direction:column;display:-webkit-flex;left:0;position:relative;top:0}* /deep/ tr-ui-e-chrome-cc-layer-view>tr-ui-e-chrome-cc-layer-tree-quad-stack-view{-webkit-flex:1 1 100%;-webkit-flex-direction:column;min-height:0;display:-webkit-flex;width:100%}* /deep/tr-ui-e-chrome-cc- layer-view>tr-ui-e-chrome-cc-layer-view-analysis{height:150px;overflow-y:auto}* /deep/ tr-ui-e-chrome-cc-layer-view>tr-ui-e-chrome-cc-layer-view-analysis *{-webkit-user-select:text}
+</style><style>
+* /deep/ .tr-ui-e-chrome-cc-lthi-s-view{-webkit-flex:1 1 auto!important;-webkit-flex-direction:row;display:-webkit-flex}* /deep/ .tr-ui-e-chrome-cc-lthi-s-view>tr-ui-e-chrome-cc-layer-picker{-webkit-flex:1 1 auto}* /deep/ .tr-ui-e-chrome-cc-lthi-s-view>tr-ui-b-drag-handle{-webkit-flex:0 0 auto}
+</style><style>
+* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-summary-view{-webkit-flex:0 0 auto;font-size:0;margin:0;min-height:200px;min-width:200px;overflow:hidden;padding:0}* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-summary-view.hidden{display:none}
+</style><style>
+* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-view{display:block;height:180px;margin:0;padding:0;position:relative}* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-view>.use-percentile-scale{left:0;position:absolute;top:0}
+</style><template id="tr-ui-e-chrome-cc-picture-debugger-template">
+  <style>
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger {
+    -webkit-flex: 1 1 auto;
+    -webkit-flex-direction: row;
+    display: -webkit-flex;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger > tr-ui-a-generic-object-view {
+    -webkit-flex-direction: column;
+    display: -webkit-flex;
+    width: 400px;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel {
+    -webkit-flex-direction: column;
+    display: -webkit-flex;
+    min-width: 300px;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel > picture-info {
+    -webkit-flex: 0 0 auto;
+    padding-top: 2px;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel >
+        picture-info .title {
+    font-weight: bold;
+    margin-left: 5px;
+    margin-right: 5px;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger > tr-ui-b-drag-handle {
+    -webkit-flex: 0 0 auto;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger .filename {
+    -webkit-user-select: text;
+    margin-left: 5px;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger > right-panel {
+    -webkit-flex: 1 1 auto;
+    -webkit-flex-direction: column;
+    display: -webkit-flex;
+  }
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger > right-panel >
+        tr-ui-e-chrome-cc-picture-ops-chart-view {
+    min-height: 150px;
+    min-width : 0;
+    overflow-x: auto;
+    overflow-y: hidden;
+  }
+
+  /*************************************************/
+
+  * /deep/ tr-ui-e-chrome-cc-picture-debugger raster-area {
+    background-color: #ddd;
+    min-height: 200px;
+    min-width: 200px;
+    overflow-y: auto;
+    padding-left: 5px;
+  }
+  </style>
+
+  <left-panel>
+    <picture-info>
+      <div>
+        <span class="title">Skia Picture</span>
+        <span class="size"></span>
+      </div>
+      <div>
+        <input class="filename" type="text" value="skpicture.skp"/>
+        <button class="export">Export</button>
+      </div>
+    </picture-info>
+  </left-panel>
+  <right-panel>
+    <tr-ui-e-chrome-cc-picture-ops-chart-view>
+    </tr-ui-e-chrome-cc-picture-ops-chart-view>
+    <raster-area><canvas></canvas></raster-area>
+  </right-panel>
+</template><style>
+* /deep/ .tr-ui-e-chrome-cc-picture-snapshot-view{-webkit-flex:0 1 auto!important;display:-webkit-flex}
+</style><polymer-element name="tr-ui-a-sub-view">
+  
 </polymer-element><polymer-element name="tr-ui-a-stack-frame">
   <template>
     <style>
@@ -460,502 +849,166 @@
     </tr-ui-b-table>
   </template>
   
-</polymer-element><polymer-element name="tr-ui-a-related-events">
+</polymer-element><polymer-element name="tr-ui-e-chrome-cc-raster-task-view">
   <template>
     <style>
     :host {
       display: flex;
       flex-direction: column;
     }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-    </style>
-    <tr-ui-b-table id="table"></tr-ui-b-table>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-thread-slice-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-      flex-direction: row;
-    }
-    #events {
-      display: flex;
-      flex-direction: column;
-    }
-
-    </style>
-    <tr-ui-a-single-event-sub-view id="content"></tr-ui-a-single-event-sub-view>
-    <div id="events">
-      <tr-ui-a-related-events id="relatedEvents">
-      </tr-ui-a-related-events>
-    </div>
-  </template>
-
-  
-</polymer-element><polymer-element name="tr-ui-a-selection-summary-table">
-  <template>
-    <style>
-    :host {
-      display: flex;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-    </style>
-    <tr-ui-b-table id="table">
-    </tr-ui-b-table>
-    
-  </template>
-  
-</polymer-element><polymer-element name="tr-ui-a-multi-event-summary-table">
-  <template>
-    <style>
-    :host {
-      display: flex;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-    </style>
-    <tr-ui-b-table id="table">
-    </tr-ui-b-table>
-    
-  </template>
-  
-</polymer-element><polymer-element name="tr-ui-a-multi-event-details-table">
-  <template>
-    <style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-
-    #titletable {
-      font-weight: bold;
-    }
-
-    #title-info {
-      font-size: 12px;
-    }
-    </style>
-    <tr-ui-b-table id="titletable">
-    </tr-ui-b-table>
-    <tr-ui-b-table id="table">
-    </tr-ui-b-table>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-event-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-      overflow: auto;
-    }
-    #content {
-      display: flex;
-      flex-direction: column;
-      flex: 0 1 auto;
-      align-self: stretch;
-    }
-    #content > * {
+    #heading {
       flex: 0 0 auto;
-      align-self: stretch;
-    }
-    tr-ui-a-multi-event-summary-table {
-      border-bottom: 1px solid #aaa;
-    }
-
-    tr-ui-a-selection-summary-table  {
-      margin-top: 1.25em;
-      border-top: 1px solid #aaa;
-      background-color: #eee;
-      font-weight: bold;
-      margin-bottom: 1.25em;
-      border-bottom: 1px solid #aaa;
     }
     </style>
-    <div id="content"></div>
-  </template>
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-thread-slice-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-    }
-    #content {
-      display: flex;
-      flex: 1 1 auto;
-    }
-    #content > tr-ui-a-related-events {
-      margin-left: 8px;
-      flex: 0 1 200px;
-    }
-    </style>
-    <div id="content"></div>
-  </template>
 
-  
-</polymer-element><polymer-element extends="tr-ui-a-single-event-sub-view" name="tr-ui-a-single-async-slice-sub-view">
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-async-slice-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-    }
-    </style>
-    <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-cpu-slice-sub-view">
-  <template>
-    <style>
-    table {
-      border-collapse: collapse;
-      border-width: 0;
-      margin-bottom: 25px;
-      width: 100%;
-    }
-
-    table tr > td:first-child {
-      padding-left: 2px;
-    }
-
-    table tr > td {
-      padding: 2px 4px 2px 4px;
-      vertical-align: text-top;
-      width: 150px;
-    }
-
-    table td td {
-      padding: 0 0 0 0;
-      width: auto;
-    }
-    tr {
-      vertical-align: top;
-    }
-
-    tr:nth-child(2n+0) {
-      background-color: #e2e2e2;
-    }
-    </style>
-    <table>
-      <tbody><tr>
-        <td>Running process:</td><td id="process-name"></td>
-      </tr>
-      <tr>
-        <td>Running thread:</td><td id="thread-name"></td>
-      </tr>
-      <tr>
-        <td>Start:</td>
-        <td>
-          <tr-ui-u-time-stamp-span id="start">
-          </tr-ui-u-time-stamp-span>
-        </td>
-      </tr>
-      <tr>
-        <td>Duration:</td>
-        <td>
-          <tr-ui-u-time-duration-span id="duration">
-          </tr-ui-u-time-duration-span>
-        </td>
-      </tr>
-      <tr>
-        <td>Active slices:</td><td id="running-thread"></td>
-      </tr>
-      <tr>
-        <td>Args:</td>
-        <td>
-          <tr-ui-a-generic-object-view id="args">
-          </tr-ui-a-generic-object-view>
-        </td>
-      </tr>
-    </tbody></table>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-cpu-slice-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-    }
-    #content {
-      flex: 1 1 auto;
-    }
-    </style>
-    <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-thread-time-slice-sub-view">
-  <template>
-    <style>
-    table {
-      border-collapse: collapse;
-      border-width: 0;
-      margin-bottom: 25px;
-      width: 100%;
-    }
-
-    table tr > td:first-child {
-      padding-left: 2px;
-    }
-
-    table tr > td {
-      padding: 2px 4px 2px 4px;
-      vertical-align: text-top;
-      width: 150px;
-    }
-
-    table td td {
-      padding: 0 0 0 0;
-      width: auto;
-    }
-    tr {
-      vertical-align: top;
-    }
-
-    tr:nth-child(2n+0) {
-      background-color: #e2e2e2;
-    }
-    </style>
-    <table>
-      <tbody><tr>
-        <td>Running process:</td><td id="process-name"></td>
-      </tr>
-      <tr>
-        <td>Running thread:</td><td id="thread-name"></td>
-      </tr>
-      <tr>
-        <td>State:</td>
-        <td><b><span id="state"></span></b></td>
-      </tr>
-      <tr>
-        <td>Start:</td>
-        <td>
-          <tr-ui-u-time-stamp-span id="start">
-          </tr-ui-u-time-stamp-span>
-        </td>
-      </tr>
-      <tr>
-        <td>Duration:</td>
-        <td>
-          <tr-ui-u-time-duration-span id="duration">
-          </tr-ui-u-time-duration-span>
-        </td>
-      </tr>
-
-      <tr>
-        <td>On CPU:</td><td id="on-cpu"></td>
-      </tr>
-
-      <tr>
-        <td>Running instead:</td><td id="running-instead"></td>
-      </tr>
-
-      <tr>
-        <td>Args:</td><td id="args"></td>
-      </tr>
-    </tbody></table>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-thread-time-slice-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-    }
-    #content {
-      flex: 1 1 auto;
-    }
-    </style>
-    <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-instant-event-sub-view">
-  <template>
-    <style>
-    :host {
-      display: block;
-    }
-    </style>
-    <div id="content"></div>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-instant-event-sub-view">
-  <template>
-    <style>
-    :host {
-      display: block;
-    }
-    </style>
-    <div id="content"></div>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-counter-sample-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-    </style>
-    <tr-ui-b-table id="table"></tr-ui-b-table>
-  </template>
-</polymer-element><polymer-element extends="tr-ui-a-single-event-sub-view" name="tr-ui-a-single-flow-event-sub-view">
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-flow-event-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-    }
-    </style>
-    <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
-  </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-object-instance-sub-view">
-  <template>
-    <style>
-    :host {
-      display: block;
-    }
-
-    #snapshots > * {
-      display: block;
-    }
-
-    :host {
-      overflow: auto;
-      display: block;
-    }
-
-    * {
-      -webkit-user-select: text;
-    }
-
-    .title {
-      border-bottom: 1px solid rgb(128, 128, 128);
-      font-size: 110%;
-      font-weight: bold;
-    }
-
-    td, th {
-      font-family: monospace;
-      vertical-align: top;
-    }
-    </style>
-    <div id="content"></div>
-  </template>
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-object-snapshot-sub-view">
-  <template>
-    <style>
-    #args {
-      white-space: pre;
-    }
-
-    :host {
-      overflow: auto;
-      display: flex;
-    }
-
-    ::content * {
-      -webkit-user-select: text;
-    }
-
-    ::content .title {
-      border-bottom: 1px solid rgb(128, 128, 128);
-      font-size: 110%;
-      font-weight: bold;
-    }
-
-    ::content td, th {
-      font-family: monospace;
-      vertical-align: top;
-    }
-    </style>
-    <content></content>
-  </template>
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-object-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-    }
-    </style>
+    <div id="heading">
+      Rasterization costs in
+      <tr-ui-a-analysis-link id="link"></tr-ui-a-analysis-link>
+    </div>
     <tr-ui-b-table id="content"></tr-ui-b-table>
   </template>
+
   
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-sample-sub-view">
+</polymer-element><style>
+.tr-ui-e-chrome-gpu-state-snapshot-view{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAEwATABMYqp3KAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB90JCQsBMCH7ZqYAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAUElEQVRYw+3WwQkAIAiF4Vc0hTO5/wiuURvYIcQOv1cRPhDlDXffSsrMsrYiQi/zU80FAACAVX3nt3lWAABA/x+ovnPyAAAA5AHyAAAA3wMOd34Xd+lsglgAAAAASUVORK5CYII=);display:-webkit-flex;overflow:auto}.tr-ui-e-chrome-gpu-state-snapshot-view img{display:block;margin:16px auto 16px auto}
+</style><style>
+  * /deep/ .chart-base #title {
+    font-size: 16pt;
+  }
+
+  * /deep/ .chart-base {
+    font-size: 12pt;
+    -webkit-user-select: none;
+    cursor: default;
+  }
+
+  * /deep/ .chart-base .axis path,
+  * /deep/ .chart-base .axis line {
+    fill: none;
+    shape-rendering: crispEdges;
+    stroke: #000;
+  }
+</style><template id="chart-base-template">
+  <svg> 
+    <g id="chart-area" xmlns="http://www.w3.org/2000/svg">
+      <g class="x axis"></g>
+      <g class="y axis"></g>
+      <text id="title"></text>
+    </g>
+  </svg>
+</template><style>
+  * /deep/ .chart-base-2d.updating-brushing-state #brushes > * {
+    fill: rgb(103, 199, 165)
+  }
+
+  * /deep/ .chart-base-2d #brushes {
+    fill: rgb(213, 236, 229)
+  }
+</style><style>
+* /deep/ .line-chart .line{fill:none;stroke-width:1.5px}* /deep/ .line-chart #brushes>rect{fill:rgb(192,192,192)}
+</style><polymer-element name="tr-ui-side-panel">
+  
+</polymer-element><polymer-element extends="tr-ui-side-panel" name="tr-ui-e-s-input-latency-side-panel">
   <template>
     <style>
     :host {
+      flex-direction: column;
       display: flex;
     }
-    </style>
-    <tr-ui-b-table id="content"></tr-ui-b-table>
-  </template>
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-sample-sub-view">
-  <template>
-    <style>
-    :host { display: block; }
-    #control {
-      background-color: #e6e6e6;
-      background-image: -webkit-gradient(linear, 0 0, 0 100%,
-                                         from(#E5E5E5), to(#D1D1D1));
+    toolbar {
       flex: 0 0 auto;
-      overflow-x: auto;
-    }
-    #control::-webkit-scrollbar { height: 0px; }
-    #control {
-      font-size: 12px;
+      border-bottom: 1px solid black;
       display: flex;
-      flex-direction: row;
-      align-items: stretch;
-      margin: 1px;
-      margin-right: 2px;
+    }
+    result-area {
+      flex: 1 1 auto;
+      display: block;
+      min-height: 0;
+      overflow-y: auto;
     }
     </style>
-    <div id="control">
-      Sample View Option
-      <select id="view_selector">
-        <option value="TOPDOWNVIEW">Tree (Top Down)</option>
-        <option value="BOTTOMUPVIEW">Heavy (Bottom Up)</option>
-      </select>
-    </div>
-    <tr-ui-b-table id="table">
-    </tr-ui-b-table>
+
+    <toolbar id="toolbar"></toolbar>
+    <result-area id="result_area"></result-area>
   </template>
 
   
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-interaction-record-sub-view">
+</polymer-element><style>
+* /deep/ .pie-chart .arc-text{font-size:8pt}* /deep/ .pie-chart .label{font-size:10pt}* /deep/ .pie-chart polyline{fill:none;stroke:black}
+</style><polymer-element extends="tr-ui-side-panel" name="tr-ui-e-s-time-summary-side-panel">
+  <template>
+    <style>
+    :host {
+      flex-direction: column;
+      display: flex;
+    }
+    toolbar {
+      flex: 0 0 auto;
+      border-bottom: 1px solid black;
+      display: flex;
+    }
+    result-area {
+      flex: 1 1 auto;
+      display: block;
+      min-height: 0;
+      overflow-y: auto;
+    }
+    </style>
+
+    <toolbar id="toolbar"></toolbar>
+    <result-area id="result_area"></result-area>
+  </template>
+
   
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-interaction-record-sub-view">
+</polymer-element><style>
+.tr-ui-e-system-stats-snapshot-view .subhead{font-size:small;padding-bottom:10px}.tr-ui-e-system-stats-snapshot-view ul{background-position:0 5px;background-repeat:no-repeat;cursor:pointer;font-family:monospace;list-style:none;margin:0;padding-left:15px}.tr-ui-e-system-stats-snapshot-view li{background-position:0 5px;background-repeat:no-repeat;cursor:pointer;list-style:none;margin:0;padding-left:15px}
+</style><polymer-element name="tr-ui-heading">
+  <template>
+    <style>
+    :host {
+      background-color: rgb(243, 245, 247);
+      border-right: 1px solid #8e8e8e;
+      display: block;
+      height: 100%;
+      margin: 0;
+      padding: 0 5px 0 0;
+    }
+
+    heading {
+      display: block;
+      overflow-x: hidden;
+      text-align: left;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+
+    #arrow {
+      -webkit-flex: 0 0 auto;
+      font-family: sans-serif;
+      margin-left: 5px;
+      margin-right: 5px;
+      width: 8px;
+    }
+
+    #link, #heading_content {
+      display: none;
+    }
+    </style>
+    <heading id="heading" on-click="{{onHeadingDivClicked_}}">
+      <span id="arrow"></span>
+      <span id="heading_content"></span>
+      <tr-ui-a-analysis-link id="link"></tr-ui-a-analysis-link>
+    </heading>
+  </template>
+
   
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-alert-sub-view">
+</polymer-element><style>
+.track-button{background-color:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.2);font-size:10px;height:12px;text-align:center;width:12px}.track-button:hover{background-color:rgba(255,255,255,1.0);border:1px solid rgba(0,0,0,0.5);box-shadow:0 0 .05em rgba(0,0,0,0.4);color:rgba(0,0,0,1)}.track-close-button{left:2px;position:absolute;top:2px}.track-collapse-button{left:3px;position:absolute;top:2px}
+</style><style>
+.object-instance-track{height:18px}
+</style><style>
+.tr-ui-e-system-stats-instance-track{height:500px}.tr-ui-e-system-stats-instance-track ul{list-style:none;list-style-position:outside;margin:0;overflow:hidden}
+</style><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-alert-sub-view">
   <template>
     <style>
     :host {
@@ -971,24 +1024,6 @@
     </tr-ui-b-table>
   </template>
   
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-frame-sub-view">
-  <template>
-    <style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-    #asv {
-      flex: 0 0 auto;
-      align-self: stretch;
-    }
-    </style>
-    <tr-ui-a-alert-sub-view id="asv">
-    </tr-ui-a-alert-sub-view>
-  </template>
-  
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-frame-sub-view">
-  
 </polymer-element><polymer-element name="tr-ui-a-stacked-pane">
   
 </polymer-element><polymer-element extends="tr-ui-a-stacked-pane" name="tr-ui-a-memory-dump-heap-details-pane">
@@ -1051,6 +1086,8 @@
       </div>
     </div>
     <div id="contents">
+      <tr-ui-b-info-bar class="info-bar-hidden" id="info_bar">
+      </tr-ui-b-info-bar>
       <div id="info_text">No heap dump selected</div>
       <tr-ui-b-table id="table"></tr-ui-b-table>
     </div>
@@ -1263,6 +1300,209 @@
   <template>
     <div id="content"></div>
   </template>
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-counter-sample-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+      flex-direction: column;
+    }
+    </style>
+    <tr-ui-b-table id="table"></tr-ui-b-table>
+  </template>
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-layout-tree-sub-view">
+  <template>
+    <div id="content"></div>
+  </template>
+</polymer-element><polymer-element name="tr-ui-a-selection-summary-table">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    #table {
+      flex: 1 1 auto;
+      align-self: stretch;
+    }
+    </style>
+    <tr-ui-b-table id="table">
+    </tr-ui-b-table>
+    
+  </template>
+  
+</polymer-element><polymer-element name="tr-ui-a-multi-event-summary-table">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    #table {
+      flex: 1 1 auto;
+      align-self: stretch;
+    }
+    </style>
+    <tr-ui-b-table id="table">
+    </tr-ui-b-table>
+    
+  </template>
+  
+</polymer-element><polymer-element name="tr-ui-a-multi-event-details-table">
+  <template>
+    <style>
+    :host {
+      display: flex;
+      flex-direction: column;
+    }
+    #table {
+      flex: 1 1 auto;
+      align-self: stretch;
+    }
+
+    #titletable {
+      font-weight: bold;
+    }
+
+    #title-info {
+      font-size: 12px;
+    }
+    </style>
+    <tr-ui-b-table id="titletable">
+    </tr-ui-b-table>
+    <tr-ui-b-table id="table">
+    </tr-ui-b-table>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-event-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+      overflow: auto;
+    }
+    #content {
+      display: flex;
+      flex-direction: column;
+      flex: 0 1 auto;
+      align-self: stretch;
+    }
+    #content > * {
+      flex: 0 0 auto;
+      align-self: stretch;
+    }
+    tr-ui-a-multi-event-summary-table {
+      border-bottom: 1px solid #aaa;
+    }
+
+    tr-ui-a-selection-summary-table  {
+      margin-top: 1.25em;
+      border-top: 1px solid #aaa;
+      background-color: #eee;
+      font-weight: bold;
+      margin-bottom: 1.25em;
+      border-bottom: 1px solid #aaa;
+    }
+    </style>
+    <div id="content"></div>
+  </template>
+  
+</polymer-element><polymer-element name="tr-ui-a-related-events">
+  <template>
+    <style>
+    :host {
+      display: flex;
+      flex-direction: column;
+    }
+    #table {
+      flex: 1 1 auto;
+      align-self: stretch;
+    }
+    </style>
+    <tr-ui-b-table id="table"></tr-ui-b-table>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-async-slice-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    #container {
+      display: flex;
+      flex: 1 1 auto;
+    }
+    #events {
+      margin-left: 8px;
+      flex: 0 1 200px;
+    }
+    </style>
+    <div id="container">
+      <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
+      <div id="events">
+        <tr-ui-a-related-events id="relatedEvents"></tr-ui-a-related-events>
+      </div>
+    </div>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-cpu-slice-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    #content {
+      flex: 1 1 auto;
+    }
+    </style>
+    <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-flow-event-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    </style>
+    <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-frame-sub-view">
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-instant-event-sub-view">
+  <template>
+    <style>
+    :host {
+      display: block;
+    }
+    </style>
+    <div id="content"></div>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-object-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    </style>
+    <tr-ui-b-table id="content"></tr-ui-b-table>
+  </template>
+  
+</polymer-element><polymer-element name="tr-ui-a-frame-power-usage-chart">
+  <template>
+    <div id="content"></div>
+  </template>
+</polymer-element><polymer-element name="tr-ui-a-power-sample-summary-table">
+  <template>
+    <tr-ui-b-table id="table"></tr-ui-b-table>
+  </template>
+  
 </polymer-element><polymer-element name="tr-ui-a-power-sample-table">
   <template>
     <style>
@@ -1272,60 +1512,6 @@
     </style>
     <tr-ui-b-table id="table"></tr-ui-b-table>
   </template>
-</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-power-sample-sub-view">
-  <template>
-    <style>
-    :host { display: block; }
-    </style>
-    <tr-ui-a-power-sample-table id="samplesTable">
-    </tr-ui-a-power-sample-table>
-  </template>
-
-  
-</polymer-element><style>
-  * /deep/ .chart-base #title {
-    font-size: 16pt;
-  }
-
-  * /deep/ .chart-base {
-    font-size: 12pt;
-    -webkit-user-select: none;
-    cursor: default;
-  }
-
-  * /deep/ .chart-base .axis path,
-  * /deep/ .chart-base .axis line {
-    fill: none;
-    shape-rendering: crispEdges;
-    stroke: #000;
-  }
-</style><template id="chart-base-template">
-  <svg> 
-    <g id="chart-area" xmlns="http://www.w3.org/2000/svg">
-      <g class="x axis"></g>
-      <g class="y axis"></g>
-      <text id="title"></text>
-    </g>
-  </svg>
-</template><style>
-  * /deep/ .chart-base-2d.updating-brushing-state #brushes > * {
-    fill: rgb(103, 199, 165)
-  }
-
-  * /deep/ .chart-base-2d #brushes {
-    fill: rgb(213, 236, 229)
-  }
-</style><style>
-* /deep/ .line-chart .line{fill:none;stroke-width:1.5px}* /deep/ .line-chart #brushes>rect{fill:rgb(192,192,192)}
-</style><polymer-element name="tr-ui-a-frame-power-usage-chart">
-  <template>
-    <div id="content"></div>
-  </template>
-</polymer-element><polymer-element name="tr-ui-a-power-sample-summary-table">
-  <template>
-    <tr-ui-b-table id="table"></tr-ui-b-table>
-  </template>
-  
 </polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-power-sample-sub-view">
   <template>
     <style>
@@ -1351,6 +1537,455 @@
     <tr-ui-a-frame-power-usage-chart id="chart">
     </tr-ui-a-frame-power-usage-chart>
   </template>
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-sample-sub-view">
+  <template>
+    <style>
+    :host { display: block; }
+    #control {
+      background-color: #e6e6e6;
+      background-image: -webkit-gradient(linear, 0 0, 0 100%,
+                                         from(#E5E5E5), to(#D1D1D1));
+      flex: 0 0 auto;
+      overflow-x: auto;
+    }
+    #control::-webkit-scrollbar { height: 0px; }
+    #control {
+      font-size: 12px;
+      display: flex;
+      flex-direction: row;
+      align-items: stretch;
+      margin: 1px;
+      margin-right: 2px;
+    }
+    </style>
+    <div id="control">
+      Sample View Option
+    </div>
+    <tr-ui-b-table id="table">
+    </tr-ui-b-table>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-thread-slice-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    #content {
+      display: flex;
+      flex: 1 1 auto;
+    }
+    #content > tr-ui-a-related-events {
+      margin-left: 8px;
+      flex: 0 1 200px;
+    }
+    </style>
+    <div id="content"></div>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-thread-time-slice-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    #content {
+      flex: 1 1 auto;
+    }
+    </style>
+    <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-multi-user-expectation-sub-view">
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-async-slice-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+      flex-direction: row;
+    }
+    #events {
+      display:flex;
+      flex-direction: column;
+    }
+    </style>
+    <tr-ui-a-single-event-sub-view id="content"></tr-ui-a-single-event-sub-view>
+    <div id="events">
+      <tr-ui-a-related-events id="relatedEvents"></tr-ui-a-related-events>
+    </div>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-cpu-slice-sub-view">
+  <template>
+    <style>
+    table {
+      border-collapse: collapse;
+      border-width: 0;
+      margin-bottom: 25px;
+      width: 100%;
+    }
+
+    table tr > td:first-child {
+      padding-left: 2px;
+    }
+
+    table tr > td {
+      padding: 2px 4px 2px 4px;
+      vertical-align: text-top;
+      width: 150px;
+    }
+
+    table td td {
+      padding: 0 0 0 0;
+      width: auto;
+    }
+    tr {
+      vertical-align: top;
+    }
+
+    tr:nth-child(2n+0) {
+      background-color: #e2e2e2;
+    }
+    </style>
+    <table>
+      <tbody><tr>
+        <td>Running process:</td><td id="process-name"></td>
+      </tr>
+      <tr>
+        <td>Running thread:</td><td id="thread-name"></td>
+      </tr>
+      <tr>
+        <td>Start:</td>
+        <td>
+          <tr-v-ui-scalar-span id="start">
+          </tr-v-ui-scalar-span>
+        </td>
+      </tr>
+      <tr>
+        <td>Duration:</td>
+        <td>
+          <tr-v-ui-scalar-span id="duration">
+          </tr-v-ui-scalar-span>
+        </td>
+      </tr>
+      <tr>
+        <td>Active slices:</td><td id="running-thread"></td>
+      </tr>
+      <tr>
+        <td>Args:</td>
+        <td>
+          <tr-ui-a-generic-object-view id="args">
+          </tr-ui-a-generic-object-view>
+        </td>
+      </tr>
+    </tbody></table>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-single-event-sub-view" name="tr-ui-a-single-flow-event-sub-view">
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-frame-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+      flex-direction: column;
+    }
+    #asv {
+      flex: 0 0 auto;
+      align-self: stretch;
+    }
+    </style>
+    <tr-ui-a-alert-sub-view id="asv">
+    </tr-ui-a-alert-sub-view>
+  </template>
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-instant-event-sub-view">
+  <template>
+    <style>
+    :host {
+      display: block;
+    }
+    </style>
+    <div id="content"></div>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-object-instance-sub-view">
+  <template>
+    <style>
+    :host {
+      display: block;
+    }
+
+    #snapshots > * {
+      display: block;
+    }
+
+    :host {
+      overflow: auto;
+      display: block;
+    }
+
+    * {
+      -webkit-user-select: text;
+    }
+
+    .title {
+      border-bottom: 1px solid rgb(128, 128, 128);
+      font-size: 110%;
+      font-weight: bold;
+    }
+
+    td, th {
+      font-family: monospace;
+      vertical-align: top;
+    }
+    </style>
+    <div id="content"></div>
+  </template>
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-object-snapshot-sub-view">
+  <template>
+    <style>
+    #args {
+      white-space: pre;
+    }
+
+    :host {
+      overflow: auto;
+      display: flex;
+    }
+
+    ::content * {
+      -webkit-user-select: text;
+    }
+
+    ::content .title {
+      border-bottom: 1px solid rgb(128, 128, 128);
+      font-size: 110%;
+      font-weight: bold;
+    }
+
+    ::content td, th {
+      font-family: monospace;
+      vertical-align: top;
+    }
+    </style>
+    <content></content>
+  </template>
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-power-sample-sub-view">
+  <template>
+    <style>
+    :host { display: block; }
+    </style>
+    <tr-ui-a-power-sample-table id="samplesTable">
+    </tr-ui-a-power-sample-table>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-sample-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+    }
+    </style>
+    <tr-ui-b-table id="content"></tr-ui-b-table>
+  </template>
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-thread-slice-sub-view">
+  <template>
+    <style>
+    :host {
+      display: flex;
+      flex-direction: row;
+    }
+    #events {
+      display: flex;
+      flex-direction: column;
+    }
+
+    </style>
+    <tr-ui-a-single-event-sub-view id="content"></tr-ui-a-single-event-sub-view>
+    <div id="events">
+      <tr-ui-a-related-events id="relatedEvents">
+      </tr-ui-a-related-events>
+    </div>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-thread-time-slice-sub-view">
+  <template>
+    <style>
+    table {
+      border-collapse: collapse;
+      border-width: 0;
+      margin-bottom: 25px;
+      width: 100%;
+    }
+
+    table tr > td:first-child {
+      padding-left: 2px;
+    }
+
+    table tr > td {
+      padding: 2px 4px 2px 4px;
+      vertical-align: text-top;
+      width: 150px;
+    }
+
+    table td td {
+      padding: 0 0 0 0;
+      width: auto;
+    }
+    tr {
+      vertical-align: top;
+    }
+
+    tr:nth-child(2n+0) {
+      background-color: #e2e2e2;
+    }
+    </style>
+    <table>
+      <tbody><tr>
+        <td>Running process:</td><td id="process-name"></td>
+      </tr>
+      <tr>
+        <td>Running thread:</td><td id="thread-name"></td>
+      </tr>
+      <tr>
+        <td>State:</td>
+        <td><b><span id="state"></span></b></td>
+      </tr>
+      <tr>
+        <td>Start:</td>
+        <td>
+          <tr-v-ui-scalar-span id="start">
+          </tr-v-ui-scalar-span>
+        </td>
+      </tr>
+      <tr>
+        <td>Duration:</td>
+        <td>
+          <tr-v-ui-scalar-span id="duration">
+          </tr-v-ui-scalar-span>
+        </td>
+      </tr>
+
+      <tr>
+        <td>On CPU:</td><td id="on-cpu"></td>
+      </tr>
+
+      <tr>
+        <td>Running instead:</td><td id="running-instead"></td>
+      </tr>
+
+      <tr>
+        <td>Args:</td><td id="args"></td>
+      </tr>
+    </tbody></table>
+  </template>
+
+  
+</polymer-element><polymer-element extends="tr-ui-a-sub-view" name="tr-ui-a-single-user-expectation-sub-view">
+  
+</polymer-element><polymer-element constructor="TracingAnalysisTabView" name="tr-ui-a-tab-view">
+  <template>
+    <style>
+      :host {
+        display: flex;
+        flex-flow: column nowrap;
+        overflow: hidden;
+        box-sizing: border-box;
+      }
+
+      tab-strip[tabs-hidden] {
+        display: none;
+      }
+
+      tab-strip {
+        background-color: rgb(236, 236, 236);
+        border-bottom: 1px solid #8e8e8e;
+        display: flex;
+        flex: 0 0 auto;
+        flex-flow: row;
+        overflow-x: auto;
+        padding: 0 10px 0 10px;
+        font-size: 12px;
+      }
+
+      tab-button {
+        display: block;
+        flex: 0 0 auto;
+        padding: 4px 15px 1px 15px;
+        margin-top: 2px;
+      }
+
+      tab-button[selected=true] {
+        background-color: white;
+        border: 1px solid rgb(163, 163, 163);
+        border-bottom: none;
+        padding: 3px 14px 1px 14px;
+      }
+
+      tabs-content-container {
+        display: flex;
+        flex: 1 1 auto;
+        overflow: auto;
+        width: 100%;
+      }
+
+      ::content > * {
+        flex: 1 1 auto;
+      }
+
+      ::content > *:not([selected]) {
+        display: none;
+      }
+
+      button-label {
+        display: inline;
+      }
+
+      tab-strip-heading {
+        display: block;
+        flex: 0 0 auto;
+        padding: 4px 15px 1px 15px;
+        margin-top: 2px;
+        margin-before: 20px;
+        margin-after: 10px;
+      }
+      #tsh {
+        display: inline;
+        font-weight: bold;
+      }
+    </style>
+
+    <tab-strip>
+      <tab-strip-heading id="tshh">
+        <span id="tsh"></span>
+      </tab-strip-heading>
+      <template repeat="{{tab in tabs_}}">
+        <tab-button button-id="{{ tab.id }}" on-click="{{ tabButtonSelectHandler_ }}" selected="{{ selectedTab_.id === tab.id }}">
+          <button-label>{{ tab.label ? tab.label : 'No Label'}}</button-label>
+        </tab-button>
+      </template>
+    </tab-strip>
+
+    <tabs-content-container id="content-container">
+        <content></content>
+    </tabs-content-container>
+
+  </template>
+
+  
 </polymer-element><polymer-element name="tr-ui-a-analysis-view">
   <template>
     <style>
@@ -1373,9 +2008,7 @@
     <content></content>
   </template>
   
-</polymer-element><style>
-* /deep/ x-drag-handle{-webkit-user-select:none;box-sizing:border-box;display:block}* /deep/ x-drag-handle.horizontal-drag-handle{background-image:-webkit-gradient(linear,0 0,0 100%,from(#E5E5E5),to(#D1D1D1));border-bottom:1px solid #8e8e8e;border-top:1px solid white;cursor:ns-resize;height:7px;position:relative;z-index:10}* /deep/ x-drag-handle.vertical-drag-handle{background-image:-webkit-gradient(linear,0 0,100% 0,from(#E5E5E5),to(#D1D1D1));border-left:1px solid white;border-right:1px solid #8e8e8e;cursor:ew-resize;position:relative;width:7px;z-index:10}
-</style><polymer-element name="tr-ui-b-dropdown">
+</polymer-element><polymer-element name="tr-ui-b-dropdown">
   <template>
     <style>
     :host {
@@ -1435,36 +2068,6 @@
     </dialog>
   </template>
   
-</polymer-element><polymer-element name="tv-ui-b-hotkey-controller">
-  
-</polymer-element><polymer-element is="HTMLDivElement" name="tr-ui-b-info-bar">
-  <template>
-    <style>
-    :host {
-      align-items: center;
-      flex: 0 0 auto;
-      background-color: rgb(252, 235, 162);
-      border-bottom: 1px solid #A3A3A3;
-      border-left: 1px solid white;
-      border-right: 1px solid #A3A3A3;
-      border-top: 1px solid white;
-      display: flex;
-      height: 26px;
-      padding: 0 3px 0 3px;
-    }
-
-    :host(.info-bar-hidden) {
-      display: none;
-    }
-
-    #message { flex: 1 1 auto; }
-    </style>
-
-    <span id="message"></span>
-    <span id="buttons"></span>
-  </template>
-
-  
 </polymer-element><polymer-element is="HTMLUnknownElement" name="tr-ui-b-info-bar-group">
   <template>
     <style>
@@ -1508,113 +2111,9 @@
       <content></content>
     </div>
   </template>
-</polymer-element><polymer-element name="tr-ui-b-mouse-mode-icon">
-  <template>
-    <style>
-    :host {
-      display: block;
-      background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAChCAYAAACbBNzvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABV0RVh0Q3JlYXRpb24gVGltZQA3LzE2LzEzRNEKUwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAA9aSURBVHic7V1rTFvl//+UrgUmZWMpbLa6cLErwpYxkqLGkjAG88WSbmumGUllvlmAJctMRtybvlHrLXiJUekMIZuYSCL5gS+EuLIXGEGjqCsllCEW6xQECgzWG7S05/+C/zkp9LTn0gsL6ych9JzznOdzPj19Luf5PN/nCN59913ixRdfRFdXFxLx/2GDgCAIYmpqCoWFhUjE/4cNae+99x4AIFH/Hzak7nDqDu+wOyyw2WzEdl9EMpG23ReQbKQE73Q8coJ3bfcFWK1W/Pbbb/D7/UhLi/37DwaDEIvFKC8vR0lJSdjxbRVstVoxPDyMxx9/HAUFBcjMzIRAIOCdXzAYhNvtht1ux/DwMACEid5WwSMjI3jyySdRXFwMsVgMoVAYk2CCIJCZmYns7GyMjo5iZGQkPoKXl5exd+9e3hdGIhgMIj8/H5mZmRCJRIyCyQ5NJBAEgUAgAKFQiIKCAiwsLISl4VxoHA4H+vv74Xa7uZ4aBqFQiOzsbIhEIojFYojFYohEItq/8fFxXLlyBUtLSxHThOaxZ88eCIXC2AWPj48DAH799deYBaelpUEoFLL6++qrrwAAH3zwAav0YrGYthLkJHh6ehpzc3MAgPn5eUxPT8csWiAQMJbboaEhmM1mAIDFYsHQ0BDvPDkJtlgsYdt+v59LFrxw/fr1sG2Xy8UrL06C6+vrw7bFYjEvYi747rvvwrYlEgmvvDjV0g6HI+p2ohBP3qh32OFwoLe3l1VGvb29sNvtvC8kFCMjI9DpdKzS6nQ6mEwm1nnTPg/7/X6MjY1hcnKS/VX+P/bu3YuysjLk5uYypv36669x8uRJZGRkQCQSwev1oqOjAz09PZx5CwsLcenSJRw+fBh+vx+rq6swmUx46aWXNqWjvcMDAwO8xAIbnZKBgQFeNXhzczMvscBGp6S5uRk//vhj1HS0grVaLYqLi3kRy+Vy1NXVRe0RRcKNGzeg0Wh48apUKnR1daG6ujpqOtpKy+VyQa1Wo6SkBLdv38aFCxeoY5988gn1+fLly9TnL774ApWVlXjiiSfgdDqxtrbG+aJ9Ph/0ej3OnDkDvV6PW7duUceOHDlCfR4dHaU+v/DCC7h27RrUajWcTidWV1ejctAKJggCKysryMzMhE6nw+zsLO3Joft1Oh0ePHiApaUlduqi8BYVFaGvr48Vb19fHyfeqM2Sz+dj3QTEs4lKJC+njsfWJoptkxUrtjZRbJssOnASXFtbG3U7UXjrrbeibnMBJ8FZWVkoKysDABQUFCArK4s3MRcoFArqrlZXV0OhUPDOi5Ngn8+Hw4cPQyqV4tlnn4XP5+NNTIIgmH0An8+HV155BUqlEq+++ior3kAgQLuf84jH2toajh8/jvX1da6n0sLj8SAjI4MxHUEQ+PTTT1nlSRAEHjx4QHtsW8e0RCIR7HY79uzZE/GOcEUgEEAgEMDff/8NkUgUdnxbBR85cgRmsxkCgQD5+fkRh2XYIhAI4P79+5iamoLD4cCxY8fC0myr4KeeegoCgQBWqxVzc3NIS0uLedQyGAxi165dKC8vR1FRUVialHu405ESvNPxyAlOuYfJRMo9fFjdw3iBq3vIBDbu4bYK3uoextKtJEH2yWNyD8nyEG8wuYcffvgha3cxru6h3W5Hf39/QoyzaE6fyWRCQ0MDZ+MsLu7h8vIyent7sby8zIk8VkxNTUGn08Fms8UlP04Nn9/vR39/f9w8JLZwu91obGzk5CFFAq+Wfnh4mDKok4mWlha0trbGlAfvrs3k5CQGBgaSYoiHoqenB1evXk2OIb4VDocDJpMp6eXaYrGgsbGRV7mOufPq8XgwMDCQ9HI9NzeHq1evci7XvDseUqkUWq0W6enpCAaDcDqd8Hq9fLNjDaVSiRs3bkAikfDi5XSHxWIxampqAAALCwsYGhrC7Ows5ufnEypWIpHAYDAAACYmJnD9+nXevJwEnzp1CjKZDBUVFQCAsbGxpJTfjz76CFVVVWhqagIAdHR08G6XWQuuqanB7t274fV6UVpaiuzsbAAbTzyJhMFggEKhgNfrRX19PWQyGQDAaDTyyo+V4JqaGshkMsricLlcOH78OICNCWp8p0cwwWAwoKqqahPvG2+8AWDji+7u7uacJyvBMpksrKxkZWVR0yLGxsY4E7NBVVVVGK9CoaCmRXR0dHDOk5VguorB5/OhoqICYrE4YZ2PSLxXrlyBRCLhNcE1pufh1dVVXLx4EWlpaRGnJzCBjXtId87g4GBU3ri5h1uJ5+fnY8mCtXvIhTflHoYg5R4mEyn3MAl45KyWlOCdjkdOcMo9TCZS7mHKPeSGhLmH5LBOrAGXXN1DcliHrgdFgsk95CzYbrfDbDbD7/ejrKwstpmtNO5hJJhMJrS2tsLtdqOpqQlarTZi2mjuIWvBfr8fZrN50/iz2WzG9PQ0nn/+edonEzZgij10uVwwGo2bxp+NRiOGhobw+uuv005hjtk9JENz6AbbyWCuRESp2Ww2NDc30w62WywW6HQ6zoOIrO5wbm4uzp8/j5WVFXR2dm46VldXh3379mF5eTku86dDUVxcjK6uLthstrClqrq6unDo0CHOvKwE+/1+LC4uUqG0oZiYmIhaicQCkvfu3bthxwYGBnhVmpy6NnSD7kxxQvEA3Zo+fIsQJ8F040j379/nRcwFdF4037FwToLphkUXFxd5EXMB3chkUgQ7nc6wfT6fL+Gm+H///Re2z+Vy8TLFGSut/v5+RsPsm2++AbDR84pXLFNDQwPjelxnz54FsBFK+/nnn7PKl/EOa7VaVmHvYrE4au+HK27evMkq7F0ikeDmzZus82UU7HK5qG8yGs6ePct73gUdfD4f2tvbGdO1t7dzaocZBRMEAaFQSBnhdKipqYFQKORlm0TjzcvLo4xwOhgMBuTl5XHiZVVp+f1+yGQy2iDq4uJiyGSyhFRcfr8fVVVVtEHUGo0GVVVVnHlZ19JerxdqtRpSqZTaJ5VKoVarEzrdwev1Qq/XQ6lUUvuUSiX0ej0vXk7N0srKCjQaDbXmjUajwcrKCmfSULD5Oa6srKCtrQ0SiQQSiQRtbW2MvHFzD0MrsXhUUmzdw9BKjKmSiqt7SBBE3Conru4hOa8kWqBnyj3cgl0EQcQ0cMYWW3kIgkiKe7iVV2C1Won09PSYxLCB1+tFZmYmtb22tobt4E1LBimATaQAkiKWjveR85ZSgnc6Uu5hMpFyD1PuITekYg/ZxB52dXXFTMo2n1D38NSpU7zjDEP/yHzisnJpIsBm5dJ45rntgpONuITTJirctqWlJabjdGAUvNUEp0NouxcvtLa2MgZhmUwmzqKjCrbb7aw9HC5pmWAymVivb2kymTgFe0RslrbeNTa1rtlshkgkQn5+PusL2Iqtd42NdWM0GpGVlYWTJ08ypo14h/nGI8Uax8Q3XJbteREFV1ZW8iLmex6Ja9euJfS8iD9puVyOmpoa3L59G8DmVUq3glzNlAzoimVgvrq6GmlpadDr9QA2r1K6FeRqpmRAFxveiIK9Xi8VZ/jLL78whulUVFTELJbkJeMMjUYjI29TUxNrsQBDX5qMM4w0qE2iuLgYpaWlcXMPyThDphWMNRoN6uvrOfGyskvVanXUNGq1Oq5WKclL/qwjQa/Xc+Zl1dNi8nFi9ZeSyZvqS0erjbmAbT6kT7X1lQp8QeYTyasKE8w3aJJvPh6PBwRBYGZmJi68MzMzqdjDUDx67mEsFxwrUrGHSUCqWdrpSAne6dix7uFzzz1HW0s/FO7h/v37UVBQgMceeyxm99DlcsFut2NwcBACgSDsnTHb7h4ePHgQxcXFcTPTMjIyIJFIcOfOHfz+++8Pl2DSPSTftxQv93DXrl0oKirCnTt3wtIwFhq62aputxtms5maCR8pHROEQiEkEgntew/X1tbC3mu4tLSE9vZ2nD9/njZd6Pn79u3jHoo3OTmJsbExnDlzBsDGWLXdbqcNoent7YVCocChQ4dYh+VFij3s7u5GR0cH9YWaTCbcunVr0yMkmfbChQvQarXQarVUWF4wGER6ejp7wdPT0zCbzfB4PJv2R7NT/H4/rFYrJicnUVZWxnowPtTpGxoagtFoDAsIi2anuN1ufPnll+ju7salS5dw4sQJKk+64hH2FTgcDgwPD4eJZQu/3w+bzcZ5JSSLxYL333+fNvqNDdxuN3p6ehjPDxMsl8tjjkw5ceIENfOVLVQqFd58882YeA0GA7WiWiSECfb5fPjpp58AbKyBx/bCpVIp6urqAADff/895wf6tbU1fPbZZwCAjz/+mPHCSSiVSsr3eueddxh5aWtpMrwuJyeH9cuczp07R5UZvktO/fnnnwCAY8eOoa+vj9U5nZ2d1CsH2fhaUZulwcFB1kGNi4uLjK/gYwuDwcCJ9+2332add9RmyW63w+12Q6FQIC8vD5cvX8bCwgI19VcqlcJms8HhcGBycjJuSz6aTCbMzs5Cq9Xi6NGjGB0dxcTEBJxOJyQSCZRKJUZGRjAyMoL//e9/jBFsoaAVLJfLKZvD4XBQ37ZEItlUph0OB238gVwu5ySQhEqlopo+i8VCtbsymWxTmb579y6t46BSqRg5aAXX1tbi22+/DZvY5XQ6aQMuQyGVSlFbW8trgb6WlhY0NDRgYmJi0/6ZmRnGYVylUomWlhbGeGbaMuzxeKDRaKhVDdkgOzsblZWVOHfuHO82fH19HW1tbWhqamL9ul2ZTIbXXnsNnZ2drN7yFfFFjy6XC6WlpVCpVFhaWsK///5LVfnz8/PIy8sDAOzevRu5ubnIycmBx+OJKZ6YIAj4fD7U19ejsbERf/zxB4aHhykrdHx8HE8//TQAYP/+/VAqlVAoFJx4I1ZapGiyrBw4cAD37t2DXC7HgQMHAGx0QXNycrC+vh63VR5Cecnw3J6eHqhUKpSXlwPY6OI+88wzALiHxnN6PPz555/D9h08eJATIR/Qzd9gE/FKh9SYFlvI5XKqPMUCrlFuKpUKp0+fZkwXDAZp93MSLBaLUVJSgqNHjyIjIwNerzfmOR0ul4sx9lAikeD06dN4+eWXIZVKGXnj5h5evHgRXq8XHo+Hd9MTCpFIhHv37iEnJydqp/+HH36A1+uFy+VirKTi6h7Gug7tVpDuIUEQKCwsjOge/vPPP6zyCwQCWF5exl9//YX5+Xla93DbzTSbzQar1Yr19fW4uoclJSUp9xB4BJullOCdjkdO8P8BGCQ0hnF1DxUAAAAASUVORK5CYII=);
-      width: 27px;
-      height: 30px;
-    }
-    :host.active {
-      cursor: auto;
-    }
-    </style>
-  </template>
-  
-</polymer-element><polymer-element name="tr-ui-b-mouse-mode-selector">
-  <template>
-    <style>
-    :host {
-
-      -webkit-user-drag: element;
-      -webkit-user-select: none;
-
-      background: #DDD;
-      border: 1px solid #BBB;
-      border-radius: 4px;
-      box-shadow: 0 1px 2px rgba(0,0,0,0.2);
-      left: calc(100% - 120px);
-      position: absolute;
-      top: 100px;
-      user-select: none;
-      width: 29px;
-      z-index: 20;
-    }
-
-    .drag-handle {
-      background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAChCAYAAACbBNzvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABV0RVh0Q3JlYXRpb24gVGltZQA3LzE2LzEzRNEKUwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAA9aSURBVHic7V1rTFvl//+UrgUmZWMpbLa6cLErwpYxkqLGkjAG88WSbmumGUllvlmAJctMRtybvlHrLXiJUekMIZuYSCL5gS+EuLIXGEGjqCsllCEW6xQECgzWG7S05/+C/zkp9LTn0gsL6ych9JzznOdzPj19Luf5PN/nCN59913ixRdfRFdXFxLx/2GDgCAIYmpqCoWFhUjE/4cNae+99x4AIFH/Hzak7nDqDu+wOyyw2WzEdl9EMpG23ReQbKQE73Q8coJ3bfcFWK1W/Pbbb/D7/UhLi/37DwaDEIvFKC8vR0lJSdjxbRVstVoxPDyMxx9/HAUFBcjMzIRAIOCdXzAYhNvtht1ux/DwMACEid5WwSMjI3jyySdRXFwMsVgMoVAYk2CCIJCZmYns7GyMjo5iZGQkPoKXl5exd+9e3hdGIhgMIj8/H5mZmRCJRIyCyQ5NJBAEgUAgAKFQiIKCAiwsLISl4VxoHA4H+vv74Xa7uZ4aBqFQiOzsbIhEIojFYojFYohEItq/8fFxXLlyBUtLSxHThOaxZ88eCIXC2AWPj48DAH799deYBaelpUEoFLL6++qrrwAAH3zwAav0YrGYthLkJHh6ehpzc3MAgPn5eUxPT8csWiAQMJbboaEhmM1mAIDFYsHQ0BDvPDkJtlgsYdt+v59LFrxw/fr1sG2Xy8UrL06C6+vrw7bFYjEvYi747rvvwrYlEgmvvDjV0g6HI+p2ohBP3qh32OFwoLe3l1VGvb29sNvtvC8kFCMjI9DpdKzS6nQ6mEwm1nnTPg/7/X6MjY1hcnKS/VX+P/bu3YuysjLk5uYypv36669x8uRJZGRkQCQSwev1oqOjAz09PZx5CwsLcenSJRw+fBh+vx+rq6swmUx46aWXNqWjvcMDAwO8xAIbnZKBgQFeNXhzczMvscBGp6S5uRk//vhj1HS0grVaLYqLi3kRy+Vy1NXVRe0RRcKNGzeg0Wh48apUKnR1daG6ujpqOtpKy+VyQa1Wo6SkBLdv38aFCxeoY5988gn1+fLly9TnL774ApWVlXjiiSfgdDqxtrbG+aJ9Ph/0ej3OnDkDvV6PW7duUceOHDlCfR4dHaU+v/DCC7h27RrUajWcTidWV1ejctAKJggCKysryMzMhE6nw+zsLO3Joft1Oh0ePHiApaUlduqi8BYVFaGvr48Vb19fHyfeqM2Sz+dj3QTEs4lKJC+njsfWJoptkxUrtjZRbJssOnASXFtbG3U7UXjrrbeibnMBJ8FZWVkoKysDABQUFCArK4s3MRcoFArqrlZXV0OhUPDOi5Ngn8+Hw4cPQyqV4tlnn4XP5+NNTIIgmH0An8+HV155BUqlEq+++ior3kAgQLuf84jH2toajh8/jvX1da6n0sLj8SAjI4MxHUEQ+PTTT1nlSRAEHjx4QHtsW8e0RCIR7HY79uzZE/GOcEUgEEAgEMDff/8NkUgUdnxbBR85cgRmsxkCgQD5+fkRh2XYIhAI4P79+5iamoLD4cCxY8fC0myr4KeeegoCgQBWqxVzc3NIS0uLedQyGAxi165dKC8vR1FRUVialHu405ESvNPxyAlOuYfJRMo9fFjdw3iBq3vIBDbu4bYK3uoextKtJEH2yWNyD8nyEG8wuYcffvgha3cxru6h3W5Hf39/QoyzaE6fyWRCQ0MDZ+MsLu7h8vIyent7sby8zIk8VkxNTUGn08Fms8UlP04Nn9/vR39/f9w8JLZwu91obGzk5CFFAq+Wfnh4mDKok4mWlha0trbGlAfvrs3k5CQGBgaSYoiHoqenB1evXk2OIb4VDocDJpMp6eXaYrGgsbGRV7mOufPq8XgwMDCQ9HI9NzeHq1evci7XvDseUqkUWq0W6enpCAaDcDqd8Hq9fLNjDaVSiRs3bkAikfDi5XSHxWIxampqAAALCwsYGhrC7Ows5ufnEypWIpHAYDAAACYmJnD9+nXevJwEnzp1CjKZDBUVFQCAsbGxpJTfjz76CFVVVWhqagIAdHR08G6XWQuuqanB7t274fV6UVpaiuzsbAAbTzyJhMFggEKhgNfrRX19PWQyGQDAaDTyyo+V4JqaGshkMsricLlcOH78OICNCWp8p0cwwWAwoKqqahPvG2+8AWDji+7u7uacJyvBMpksrKxkZWVR0yLGxsY4E7NBVVVVGK9CoaCmRXR0dHDOk5VguorB5/OhoqICYrE4YZ2PSLxXrlyBRCLhNcE1pufh1dVVXLx4EWlpaRGnJzCBjXtId87g4GBU3ri5h1uJ5+fnY8mCtXvIhTflHoYg5R4mEyn3MAl45KyWlOCdjkdOcMo9TCZS7mHKPeSGhLmH5LBOrAGXXN1DcliHrgdFgsk95CzYbrfDbDbD7/ejrKwstpmtNO5hJJhMJrS2tsLtdqOpqQlarTZi2mjuIWvBfr8fZrN50/iz2WzG9PQ0nn/+edonEzZgij10uVwwGo2bxp+NRiOGhobw+uuv005hjtk9JENz6AbbyWCuRESp2Ww2NDc30w62WywW6HQ6zoOIrO5wbm4uzp8/j5WVFXR2dm46VldXh3379mF5eTku86dDUVxcjK6uLthstrClqrq6unDo0CHOvKwE+/1+LC4uUqG0oZiYmIhaicQCkvfu3bthxwYGBnhVmpy6NnSD7kxxQvEA3Zo+fIsQJ8F040j379/nRcwFdF4037FwToLphkUXFxd5EXMB3chkUgQ7nc6wfT6fL+Gm+H///Re2z+Vy8TLFGSut/v5+RsPsm2++AbDR84pXLFNDQwPjelxnz54FsBFK+/nnn7PKl/EOa7VaVmHvYrE4au+HK27evMkq7F0ikeDmzZus82UU7HK5qG8yGs6ePct73gUdfD4f2tvbGdO1t7dzaocZBRMEAaFQSBnhdKipqYFQKORlm0TjzcvLo4xwOhgMBuTl5XHiZVVp+f1+yGQy2iDq4uJiyGSyhFRcfr8fVVVVtEHUGo0GVVVVnHlZ19JerxdqtRpSqZTaJ5VKoVarEzrdwev1Qq/XQ6lUUvuUSiX0ej0vXk7N0srKCjQaDbXmjUajwcrKCmfSULD5Oa6srKCtrQ0SiQQSiQRtbW2MvHFzD0MrsXhUUmzdw9BKjKmSiqt7SBBE3Conru4hOa8kWqBnyj3cgl0EQcQ0cMYWW3kIgkiKe7iVV2C1Won09PSYxLCB1+tFZmYmtb22tobt4E1LBimATaQAkiKWjveR85ZSgnc6Uu5hMpFyD1PuITekYg/ZxB52dXXFTMo2n1D38NSpU7zjDEP/yHzisnJpIsBm5dJ45rntgpONuITTJirctqWlJabjdGAUvNUEp0NouxcvtLa2MgZhmUwmzqKjCrbb7aw9HC5pmWAymVivb2kymTgFe0RslrbeNTa1rtlshkgkQn5+PusL2Iqtd42NdWM0GpGVlYWTJ08ypo14h/nGI8Uax8Q3XJbteREFV1ZW8iLmex6Ja9euJfS8iD9puVyOmpoa3L59G8DmVUq3glzNlAzoimVgvrq6GmlpadDr9QA2r1K6FeRqpmRAFxveiIK9Xi8VZ/jLL78whulUVFTELJbkJeMMjUYjI29TUxNrsQBDX5qMM4w0qE2iuLgYpaWlcXMPyThDphWMNRoN6uvrOfGyskvVanXUNGq1Oq5WKclL/qwjQa/Xc+Zl1dNi8nFi9ZeSyZvqS0erjbmAbT6kT7X1lQp8QeYTyasKE8w3aJJvPh6PBwRBYGZmJi68MzMzqdjDUDx67mEsFxwrUrGHSUCqWdrpSAne6dix7uFzzz1HW0s/FO7h/v37UVBQgMceeyxm99DlcsFut2NwcBACgSDsnTHb7h4ePHgQxcXFcTPTMjIyIJFIcOfOHfz+++8Pl2DSPSTftxQv93DXrl0oKirCnTt3wtIwFhq62aputxtms5maCR8pHROEQiEkEgntew/X1tbC3mu4tLSE9vZ2nD9/njZd6Pn79u3jHoo3OTmJsbExnDlzBsDGWLXdbqcNoent7YVCocChQ4dYh+VFij3s7u5GR0cH9YWaTCbcunVr0yMkmfbChQvQarXQarVUWF4wGER6ejp7wdPT0zCbzfB4PJv2R7NT/H4/rFYrJicnUVZWxnowPtTpGxoagtFoDAsIi2anuN1ufPnll+ju7salS5dw4sQJKk+64hH2FTgcDgwPD4eJZQu/3w+bzcZ5JSSLxYL333+fNvqNDdxuN3p6ehjPDxMsl8tjjkw5ceIENfOVLVQqFd58882YeA0GA7WiWiSECfb5fPjpp58AbKyBx/bCpVIp6urqAADff/895wf6tbU1fPbZZwCAjz/+mPHCSSiVSsr3eueddxh5aWtpMrwuJyeH9cuczp07R5UZvktO/fnnnwCAY8eOoa+vj9U5nZ2d1CsH2fhaUZulwcFB1kGNi4uLjK/gYwuDwcCJ9+2332add9RmyW63w+12Q6FQIC8vD5cvX8bCwgI19VcqlcJms8HhcGBycjJuSz6aTCbMzs5Cq9Xi6NGjGB0dxcTEBJxOJyQSCZRKJUZGRjAyMoL//e9/jBFsoaAVLJfLKZvD4XBQ37ZEItlUph0OB238gVwu5ySQhEqlopo+i8VCtbsymWxTmb579y6t46BSqRg5aAXX1tbi22+/DZvY5XQ6aQMuQyGVSlFbW8trgb6WlhY0NDRgYmJi0/6ZmRnGYVylUomWlhbGeGbaMuzxeKDRaKhVDdkgOzsblZWVOHfuHO82fH19HW1tbWhqamL9ul2ZTIbXXnsNnZ2drN7yFfFFjy6XC6WlpVCpVFhaWsK///5LVfnz8/PIy8sDAOzevRu5ubnIycmBx+OJKZ6YIAj4fD7U19ejsbERf/zxB4aHhykrdHx8HE8//TQAYP/+/VAqlVAoFJx4I1ZapGiyrBw4cAD37t2DXC7HgQMHAGx0QXNycrC+vh63VR5Cecnw3J6eHqhUKpSXlwPY6OI+88wzALiHxnN6PPz555/D9h08eJATIR/Qzd9gE/FKh9SYFlvI5XKqPMUCrlFuKpUKp0+fZkwXDAZp93MSLBaLUVJSgqNHjyIjIwNerzfmOR0ul4sx9lAikeD06dN4+eWXIZVKGXnj5h5evHgRXq8XHo+Hd9MTCpFIhHv37iEnJydqp/+HH36A1+uFy+VirKTi6h7Gug7tVpDuIUEQKCwsjOge/vPPP6zyCwQCWF5exl9//YX5+Xla93DbzTSbzQar1Yr19fW4uoclJSUp9xB4BJullOCdjkdO8P8BGCQ0hnF1DxUAAAAASUVORK5CYII=) 2px 3px no-repeat;
-      background-repeat: no-repeat;
-      border-bottom: 1px solid #BCBCBC;
-      cursor: move;
-      display: block;
-      height: 13px;
-      width: 27px;
-    }
-
-    .tool-button {
-      background-position: center center;
-      background-repeat: no-repeat;
-      border-bottom: 1px solid #BCBCBC;
-      border-top: 1px solid #F1F1F1;
-      cursor: pointer;
-    }
-
-    .buttons > .tool-button:last-child {
-      border-bottom: none;
-    }
-
-    </style>
-    <div class="drag-handle"></div>
-    <div class="buttons">
-    </div>
-  </template>
 </polymer-element><style>
-.track-button{background-color:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.2);font-size:10px;height:12px;text-align:center;width:12px}.track-button:hover{background-color:rgba(255,255,255,1.0);border:1px solid rgba(0,0,0,0.5);box-shadow:0 0 .05em rgba(0,0,0,0.4);color:rgba(0,0,0,1)}.track-close-button{left:2px;position:absolute;top:2px}.track-collapse-button{left:3px;position:absolute;top:2px}
-</style><style>
 .drawing-container{-webkit-box-flex:1;display:inline;overflow:auto;overflow-x:hidden;position:relative}.drawing-container-canvas{-webkit-box-flex:1;display:block;pointer-events:none;position:absolute;top:0}
-</style><polymer-element name="tr-ui-heading">
-  <template>
-    <style>
-    :host {
-      background-color: rgb(243, 245, 247);
-      border-right: 1px solid #8e8e8e;
-      display: block;
-      height: 100%;
-      margin: 0;
-      padding: 0 5px 0 0;
-    }
-
-    heading {
-      display: block;
-      overflow-x: hidden;
-      text-align: left;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-
-    #arrow {
-      -webkit-flex: 0 0 auto;
-      font-family: sans-serif;
-      margin-left: 5px;
-      margin-right: 5px;
-      width: 8px;
-    }
-
-    #link, #heading_content {
-      display: none;
-    }
-    </style>
-    <heading id="heading" on-click="{{onHeadingDivClicked_}}">
-      <span id="arrow"></span>
-      <span id="heading_content"></span>
-      <tr-ui-a-analysis-link id="link"></tr-ui-a-analysis-link>
-    </heading>
-  </template>
-
-  
-</polymer-element><style>
+</style><style>
 .letter-dot-track {
   height: 18px;
 }
@@ -1630,8 +2129,6 @@
 </style><style>
 .spacing-track{height:4px}
 </style><style>
-.object-instance-track{height:18px}
-</style><style>
 .rect-track{height:18px}
 </style><style>
 .thread-track{-webkit-box-orient:vertical;display:-webkit-box;position:relative}
@@ -1804,13 +2301,11 @@
 
     <div class="root hidden" id="root" on-focus="{{ onConsoleFocus }}" tabindex="0">
       <div id="history"></div>
-      <div id="prompt" on-blur="{{ onConsoleBlur }}" on-keydown="{{ promptKeyDown }}" on-keypress="{{ promptKeyPress }}">
-  
+      <div id="prompt" on-blur="{{ onConsoleBlur }}" on-keydown="{{ promptKeyDown }}" on-keypress="{{ promptKeyPress }}"></div>
+    </div>
+  </template>
 
   
-
-</div></div></template></polymer-element><polymer-element name="tr-ui-side-panel">
-  
 </polymer-element><polymer-element is="HTMLUnknownElement" name="tr-ui-side-panel-container">
   <template>
     <style>
@@ -1976,6 +2471,11 @@
       </div>
 
       <div class="pair">
+        <div class="command"><span class="mod"></span>-click/drag</div>
+        <div class="action">Add events to the current selection</div>
+      </div>
+
+      <div class="pair">
         <div class="command">double click</div>
         <div class="action">Select all events with same title</div>
       </div>
@@ -2031,11 +2531,6 @@
       </div>
 
       <div class="pair">
-        <div class="command"><span class="mod"></span></div>
-        <div class="action">Hold for temporary zoom</div>
-      </div>
-
-      <div class="pair">
         <div class="command">/</div>
         <div class="action">Search</div>
       </div>
@@ -2088,11 +2583,11 @@
   </template>
 
   
-</polymer-element><polymer-element name="tr-ui-u-array-of-numbers-span">
+</polymer-element><polymer-element name="tr-v-ui-array-of-numbers-span">
   <template>
   </template>
   
-</polymer-element><polymer-element name="tr-ui-u-generic-table-view">
+</polymer-element><polymer-element name="tr-v-ui-generic-table-view">
   <template>
     <style>
     :host {
@@ -2114,11 +2609,11 @@
       overflow: auto;
     }
     </style>
-    <tr-ui-u-generic-table-view id="gtv"></tr-ui-u-generic-table-view>
+    <tr-v-ui-generic-table-view id="gtv"></tr-v-ui-generic-table-view>
   </template>
 
   
-</polymer-element><polymer-element name="tr-ui-u-preferred-display-unit">
+</polymer-element><polymer-element name="tr-v-ui-preferred-display-unit">
   
 </polymer-element><polymer-element name="tr-ui-timeline-view">
   <template>
@@ -2184,7 +2679,7 @@
 
     middle-container ::content track-view-container > * { flex: 1 1 auto; }
     middle-container > x-timeline-view-side-panel-container { flex: 0 0 auto; }
-    x-drag-handle { flex: 0 0 auto; }
+    tr-ui-b-drag-handle { flex: 0 0 auto; }
     tr-ui-a-analysis-view { flex: 0 0 auto; }
     </style>
 
@@ -2217,460 +2712,110 @@
       <tr-ui-side-panel-container id="side_panel_container">
       </tr-ui-side-panel-container>
     </middle-container>
-    <x-drag-handle id="drag_handle"></x-drag-handle>
+    <tr-ui-b-drag-handle id="drag_handle"></tr-ui-b-drag-handle>
     <tr-ui-a-analysis-view id="analysis"></tr-ui-a-analysis-view>
 
-    <tr-ui-u-preferred-display-unit id="display_unit">
-    </tr-ui-u-preferred-display-unit>
+    <tr-v-ui-preferred-display-unit id="display_unit">
+    </tr-v-ui-preferred-display-unit>
   </template>
 
   
-</polymer-element><style>
-* /deep/ .x-list-view{-webkit-user-select:none;display:block}* /deep/ .x-list-view:focus{outline:none}* /deep/ .x-list-view *{-webkit-user-select:none}* /deep/ .x-list-view>.list-item{padding:2px 4px 2px 4px}* /deep/ .x-list-view:focus>.list-item[selected]{background-color:rgb(171,217,202);outline:1px dotted rgba(0,0,0,0.1);outline-offset:0}* /deep/ .x-list-view>.list-item[selected]{background-color:rgb(103,199,165)}
-</style><style>
-* * /deep/ tr-ui-e-chrome-cc-picture-ops-list-view{-webkit-flex-direction:column;border-top:1px solid grey;display:-webkit-flex}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view{-webkit-flex:1 1 auto;overflow:auto}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item{border-bottom:1px solid #555;font-size:small;font-weight:bold;padding-bottom:5px;padding-left:5px}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item:hover{background-color:#f0f0f0;cursor:pointer}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item>*{color:#777;font-size:x-small;font-weight:normal;margin-left:1em;max-width:300px}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item>.elementInfo{color:purple;font-size:small;font-weight:bold}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view>.x-list-view .list-item>.time{color:rgb(136,0,0)}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view .x-list-view:focus>.list-item[beforeSelection]{background-color:rgb(171,217,202);outline:1px dotted rgba(0,0,0,0.1);outline-offset:0}* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view .x-list-view>.list-item[beforeSelection]{background-color:rgb(103,199,165)}
-</style><template id="tr-ui-e-chrome-cc-display-item-debugger-template">
-  <style>
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger {
-    -webkit-flex: 1 1 auto;
-    display: -webkit-flex;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel {
-    -webkit-flex-direction: column;
-    display: -webkit-flex;
-    min-width: 300px;
-    overflow-y: auto;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
-        display-item-info {
-    -webkit-flex: 1 1 auto;
-    padding-top: 2px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
-        display-item-info .title {
-    font-weight: bold;
-    margin-left: 5px;
-    margin-right: 5px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
-        display-item-info .export {
-    margin: 5px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > x-drag-handle {
-    -webkit-flex: 0 0 auto;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel {
-    -webkit-flex: 1 1 auto;
-    display: -webkit-flex;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
-      display-item-info > header {
-    border-bottom: 1px solid #555;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
-      display-item-info > .x-list-view > div {
-    border-bottom: 1px solid #555;
-    padding-top: 3px;
-    padding-bottom: 3px;
-    padding-left: 5px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
-      display-item-info > .x-list-view > div:hover {
-    background-color: #f0f0f0;
-    cursor: pointer;
-  }
-
-  /*************************************************/
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
-      tr-ui-e-chrome-cc-picture-ops-list-view.hasPictureOps {
-    display: block;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
-        x-drag-handle.hasPictureOps {
-    display: block;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
-        tr-ui-e-chrome-cc-picture-ops-list-view {
-    display: none;
-    overflow-y: auto;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
-        x-drag-handle {
-    display: none;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-display-item-debugger raster-area {
-    -webkit-flex: 1 1 auto;
-    background-color: #ddd;
-    min-height: 200px;
-    min-width: 200px;
-    overflow-y: auto;
-    padding-left: 5px;
-  }
-  </style>
-
-  <left-panel>
-    <display-item-info>
-      <header>
-        <span class="title">Display Item List</span>
-        <span class="size"></span>
-        <div class="export">
-          <input class="dlfilename" type="text" value="displayitemlist.json"/>
-          <button class="dlexport">Export display item list</button>
-        </div>
-        <div class="export">
-          <input class="skpfilename" type="text" value="skpicture.skp"/>
-          <button class="skpexport">Export list as SkPicture</button>
-        </div>
-      </header>
-    </display-item-info>
-  </left-panel>
-  <right-panel>
-    <raster-area><canvas></canvas></raster-area>
-  </right-panel>
-</template><style>
-* /deep/ .tr-ui-e-chrome-cc-display-item-list-view{-webkit-flex:1 1 auto!important;display:-webkit-flex}
-</style><style>
-* /deep/ tr-ui-e-chrome-cc-layer-picker{-webkit-flex-direction:column;display:-webkit-flex}* /deep/ tr-ui-e-chrome-cc-layer-picker>top-controls{-webkit-flex:0 0 auto;background-image:-webkit-gradient(linear,0 0,100% 0,from(#E5E5E5),to(#D1D1D1));border-bottom:1px solid #8e8e8e;border-top:1px solid white;display:inline;font-size:14px;padding-left:2px}* /deep/ tr-ui-e-chrome-cc-layer-picker>top-controls input[type='checkbox']{vertical-align:-2px}* /deep/ tr-ui-e-chrome-cc-layer-picker>.x-list-view{-webkit-flex:1 1 auto;font-family:monospace;overflow:auto}* /deep/ tr-ui-e-chrome-cc-layer-picker>tr-ui-a-generic-object-view{-webkit-flex:0 0 auto;height:200px;overflow:auto}* /deep/ tr-ui-e-chrome-cc-layer-picker>tr-ui-a-generic-object-view *{-webkit-user-select:text!important;cursor:text}
-</style><style>
-* /deep/ quad-stack-view {
-  display: block;
-  float: left;
-  height: 100%;
-  overflow: hidden;
-  position: relative; /* For the absolute positioned mouse-mode-selector */
-  width: 100%;
-}
-
-* /deep/ quad-stack-view > #header {
-  position: absolute;
-  font-size: 70%;
-  top: 10px;
-  left: 10px;
-  width: 800px;
-}
-* /deep/ quad-stack-view > #stacking-distance-slider {
-  position: absolute;
-  font-size: 70%;
-  top: 10px;
-  right: 10px;
-}
-
-* /deep/ quad-stack-view > #chrome-left {
-  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMcAAABICAYAAABC4+HLAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH3QcNFyMmV/Pm9QAAIABJREFUeNrtvXmwXdd13vlbe9/7BgzEQAIcQAIEQYKjSAokLVlOW5Fk2nLKmqx0J2Wp0k652h13uiy5XYqdwU7sSnckpZ1yV3U75apU4kos27Elu9NlyRXZjiiRomSTIiWZs0hwHsABJIY33rPX6j/W2ueed3DvAyDKKoGFW0UCeO/ec/fZZ+29v7XWt74lAIuLi7tXV1f/raq+zcy2AogIZsbpvrqfMzNE5IS/1/fVn5sZKaUTrtX9/v7nT+fn9e/1e052X/3r1THWa3R/37+miKCq7c+mjW/a+F/P57vj6/45bayn+wzXs4n+794Q9nP8+PHdS0tL31LVmfpGVQU4YSInGUb/YfZvpn+zp/LQu4Y27X31d933nurkq+qaa08yotO55npG0v2O+r1/XZ9fb2FMWoD9Oe5+pju//e+fdP3u83+j2I+89NJLn11dXf1bdSCTJnnSSpz2+/VWZ/8m+w+g/zD616yT2P9733BOZ5f4dhbCevPQHet63zVtV3y9n1/v/k9nZ562SNY7Gd5o9iPPP//8qxVKrQdL+hOy3qqdNEnTjv1JA+vuRpMGvd7kn8oCqded9B2THuJ6u/Kk7+vuiNOgQH8OX+/np813/376O/CkU2EavDwVWPiGsp9nn33WJt3ItF2ne2xOe2jTHuTJMOS0He1UcG33791JmWQYkzB6dyfp7tynsktPG8/Jdv2TGcLpfH7Sc5m0EKZBsPV+tp4PMe39bwj7efrpp229G5u2O3WPplN1cE/XQZsENybtnNN2pv4x3N1Fpu2S/SO6j6fXgz6n4gRPGmMfR7/ez/cXd/1798Tsfr4PMU52Oq4Hp95I9jPor7ZJ+G7STlEnvN7gesfXpB2tH5lZzynrO07Txtb92aQTY9rv+3i1v4jqv5umOSEq0r9O3/iqEUx6MPXnqjpxrk73812oMQmP968zyUj68zPp+U1bxG80+5GnnnrKpkVxTiWUuN4q7+96/YFXp6pvANN8hD7MmRbF6O7200KR9ed9CDbpSF4v6jIJtnQjQdPGOylK9p34/HowaFL0Z73IUNex7Z5Gk3bkN6L9yBNPPGHdY3fayu3uSP0dqH62uyP0w4XrDWo957gPEfqf78e4p4U8+0Y86R6711pvAUyL3vTvd9ou238Q/Xn4dj4/Cd6d7BlMC532534S9OnO8xvVfuTxxx+39RJlk/DtpAGc6k6hquScp+7EkyIn0+LV60Ufpu2q05zN/sOYFIfvP8CT5VEmGWN/h5w0zm/38+sl7/r3drLntt58rzdXbyT7kccee8z6O2b3JnLO6zpjk47nkyVg1pu07muas9b3CaZh4f5uPMn4Sikn7Jj9RTEJMnQfVHdck4x3Wt5i0qL6dj8/6WQ5GcSYBiEn+STrhT/fqPYzmJYxrRcopax5eH18Oi38WI2ulLImYTPNMavv716z/93rRXUmOZXVgZ5kePX7+hPeN5xJTmx3MdXf9zHyM888w8LCwgn30IUQ0xzWSYvhVD4/LarTzpWBpOl+zqRQ9lqjE2DCtbH2x9MW3XA45JxzzmHnzp0njYp9r9jPoH75Gkekc8SZ2ZpjrH/Ez8wMSSmHMY4YjZp2MDnniVGT/sPvRhxmZ2fJOWHmxj0ajU7AtvV6k4727gSklMg5M4jdq6iyuro69bv799fNptYF0X3vJKjz8MMPMz+/gWuvuYatW7eScgIEwTADEwEUAZDkBgtuYONlCCJgAuZ/N5QkCcP8avFzUH8fsZgNEoJJLAakc+2TjENi90RQjGSCJm1/hwlmgmRFFIwEYoiNxyPxvYZ07gVKUzh8+DD333cfRZXLLrvsBLxfjbl76pyO/ZRS1thq325O137k4YcftvUSOf1Ufdco/uwLX+LOv7ibZ194EYBdF+zkB956C+98+99ARE64ue6XqyqDwaDdGZqm4Qtf/DK3f+UveO7QS2uu944f/IH2WpNwdp2U/oT8+W23c8dX7+K5GN9FF+zkb7zlZt71jh9cswNPw8uTsPU0h19VeeSRR7j55lvYumUzK6MCpqTs9p2AAiRLmChWBBIIiqZEMkVUMAQTJZtQSCCKkDE0/h+7twkKpCSYxrhVMTGyCYogohRLCGvHoYD0xyGKScIUpC5AVSQl/0ACaxeCkJJhakDCTJEEiKAmDMx8XSdAY6lZQjHmZoa89NLL3Pv1r3PVVVeesDH3T+FTtZ/uguhu8v3o36naj4ggjzzyiPXhwtRjOf6+tLjEP//4r3HOuRfw5psPsOeSXQA8+dQz3Pu1ezl2+BC//I9+jvn5uXWjDfW1uLjIr37y19m8/fzJ13vlBf75L/48c3Oza3aWadSP5eUVfuUT/2bd6/3yL/xvbNgwv2Y3qbtOF0J2MfN6ka7nnnuOvZfuZcfO8xitKnloFBXEBHGLc4MTQwVEDeIkyAqa/Pdh9z5vaqgkUuz8akYGVATEHOYYiCSUQtJqkCDJsJJIvXFYNRIzLGWQQqqLEiOhqKS6gnzhqJ9cJplsiiXBSnfBJF957TEoJBKYYskwFUSgWCKnBkmZp59+mpdfepmdO3eu2USn+V/r2c/JWAX9CN/J7KdNiD744IO2nqM0Cff+01/9P7js6gP8d29/C5detJNtmzYC8OrxBZ547kVu/+JfcPDBe/iXv/xPkCnkvHalm/HPTvV6v/SP25vs3mB3fKurI37pX36cfdesf73HHriH//2X/3Fr/NOSTZMyzn0n0sx47LHH+JEf+REWFhd8pzcliRtyBVbFYlcTN0bfpoWEYiaxENTtjOQwByOZ7+r+b/zacY5YICvH/iDmBurjmzQOKMlIWkPThpohkuN0iwWI+YrNGkdeQswwcbhlWEAzw8wXazZDJfsYMP84ghXzxSHip5rB/IY5/sv/+0dc96Y3rdmA2uz0YDA1EHIqDNv1KDAVvk2yn64vOujHlqdlJ+vv/+wLX2JuywVcfOkeXj2ywGtHn0C1Hov+uUsu3cNzzz/Hf7vtdm5959snRknq6wtfvOOUr/fnX7yDH37n29fccBdG5Zy57fYvs2HrqV7vdm59x9vXJeqtx6WqD+T555/nyiv3s7y8TMLhSgLMElkURx+KENi+7uzi0EgtIUCi+OmSwIpjmYTSAIN6uiSDkkAKQgp/IgON+yaGnxIBz/rjcPckj30LU5I5rCsJsiYsafgjCbXEUIwiiqq4e1J9FjVfNCioYMlPC/eJIFuisTiN0oBkhllBcmJlaYnL9+/n0KFD7Nixg5xza6hPP/00S0tLzM7Mho/lfpGicW/hyyCQAv75Nuw+UOwi/o7WmXLfClhYOMaWLVvZtWtXG7TpRibrMx/0V1j34XcdT4DBYMA933yQnRdeymhUOHZsCZFEqrurORRZHRV2XrCLr33jft596zsZjUbtiuzGqQeDAXd//T52Xrj3lK53zzce4G/d+k6WlpfXOF5jSAhf+8YD7DjF8d3zjQf50VvfRdM0LYzqv/pHcH9napqGF154gb/59rdz7PhxTPCdNSliisYuK5rjIRsWPyeJQyGhWhyNCEn9sbrPIGRJmBRfeCb+kEXQwDZG49AFIYmh4kvmhHGYISTEGl9YBimPoZypvx8VJA3R5IurMcdrSTrjLuGjGJCNpJnGlCwWp6CRMLIoMCBhFJPYIAxNxjVXX83v//7vs337dnLONE1DzpmXX36Zt73tB1g8fhwzh3OIObyrp60IWp9XNlBfRtkCPqWIM9T5x+GhDIQN8/O88srLfPWrX+WWW245IeLVPvvubt49biZRMTDj6MISGzdt9i81YTjIzM/OMjc7w3AwANwp27hpM0cWln0iOt9RowruSAlHFpZP43pLJxAB68lnZuSUOXJa41tCIuQ7jYBWf9fnP5kZo9GIlZUVLrzwQpaXVzxihGHJEE1ucdlIkgOwKMncj5Ds0SjfZd2R9re7AeWkGOFUhuOrrd+jFDPMEkJ1XGPhxdY+cRzZARPJfR9Jiqm/P2wONKHJwJRs6jt0Su5nWHJfQj2IYBQIp14xBkI47OE/BVyUFI6/KCk5zJOSGY1W2bFjB03TrOGtzQyHNKNRnTGQghWjWInxGI0phvtyNOZg0GAU86hmlMYw9c9qMYyCjgpHjx9ndmYD3//Wt3LPPfdM9FtUlYGqUko5IbzVdUi7WHw4M8vc3CxzczNsmnejq6HSphSWVlYBWF2ZY2Z2tt2tuwuw/ruUwszs6V2vuxi6TlYd48zM6V+vC8/qYqgnZT861Y+dP/bYo/zoj/4Yo3o8u1PgoVRJiPqJBRkRo6C+oxchSaGIxC5uJHEfwDdqN3xTg+wRKXd2EyRIBppjy/fLY02CWCzTxuHX91MAEfdPNJESqBopFcwyJurAqg3jWpx6DqkExVIiNwIDQa1BAWRAQiE5XExJ/URCyQgFIZlB9rk8cOAAt912G/v3728jiMOZGVQDEShoSUhuEM2U5CecFHWIGbAzlwZJghRDs0AJ2FVdu2wUMxI+XyqFpjF27drF0aNH2bRpU7txt455fcjVuCrE6Ds6DkdW2bF9C1lg49wsG+ZmOWfjHNu3bGL7lk1s2TjPpvlZNszOkMTYsW0LWvSEHbhraDu2nfr1ztu6haa3uLqn0qhpOO+0rncOTWcy+vmMesLVxVgXdimFpmligWbmZgZtLN8vFmFZbbBGHfdSwo9whxot8ZAdMydzTG9aUDGKGlZ8QaiGU6wGVtDSUChIY6j6gqOBTHPScZj5qVHUoAg0DaYlIIWhlj2qFUhBDUwLNH4tMCgKZqRSGMwO+PM//VOGgznPe2jDYGbIvfd8g5mZAapCMcEEv6cK8RpFLLFp06Z2Lqvt7dmzh4cfeRBTQ1E04GXBEG187pLSqNKYbyBm0IQda6MoDUbB1DwQUvyE1tJgKFqM1dJw6Z5Lefzxx1vb7B4EqbtSJjmmXYjVNIXrr7mCI68dZmaQmJ8dsu2cTezYtpkd2zaz9ZyNzM8OmRlkjr52mBuu2c/qaHRCZGcMSxpuuGb/qV/v2isYxfW6GdFqtE3TcMNpjq8mGbs+xyRSX520GhMvpfDC889z7XXXsdKsYMV8t7fA3ChYJmWgGKkIlh3SWeQEwJDkp0UJKKIioGNXW9R3PnKKEK+E32BYDlxvUMTQzEnHIREQSCQaMSRn9+dlvKOmMUr3aFRKcco43JIUicWU+G+3fYHf/c+/x6c+9R+ZGQ6ZmZ3jtz/1Kf7PX/vX3HPvvTHaQsYgKUnFo9C5oBirKytcdeVVvPjii+1zEBGOHTvGxk0bfXGabyxGQ1GHmaYB4YqRLDYIIXyw4vDQ/HoJQ61BTHyPKeZ3aMbxhQXm5+dPSDCaGamPt7pQZRJL8qYbrmP56KscPnwYEZgZJAbZ/5sZZMA4fPgVlo++yoEbrqXCtq4Bdv2bm9/8JpaPvXZq17v+2hNgTXcxN03DzQeuP+Xx3XLg+hNoGN1Togsxu4umnijPv/AC+6/YTxlZZIo1YJIf5yLmBpeFMhCwEg67J8QkVacyRe66eLg1aRtcUVFSgmzFsx3uWSKSkWIUibiSpcD1648DMU/ggTvP6r5PskhrmEMfRFEJKBcZfJPkjq4nQTA13vk338mHfuJDfOXOr/J7v/t7/M7v/A53fvlOfuqnfoqbbjhA8di1/2nZr5kU0YQlhz7XvukannrqqTW2snXrVpYXFrBmBH5+OBnA/CRxP0NJVjySZoo2DrLcbhu0eDTORONnxde3FUQLqoVmtMreS/fwzDPPnOBe5J/+6Z/+F/1dvZ9V7BqHiHDDtVdy51f/ktVRw9ZzNpMkMRo1HD16jAce/hbPPv0k/+N//941Wcr1CoNuvO4q7vjKetd7gr/3t98zkXJ8QpTJjBuuu5IvTxnf/Q9/i+effpIPf/DHJiqO9EPX/Yhd9UuWl5fZMD/ProsupJhDBEniOzaCWMakuNMsjp0znhzTSv0wRbL4yYCQyWgliJhTMzKZRty3cNhDJNgMY0ACz66H333ScRSHVSnCrZbdfzFpc4okFLHsvkEkBE0E6YSPfXxQrHDF/suZnZ3jttu+wHPPPcv73vdefuiHfpiVZrlNbLYJy4Hfm9uSn4jaFF47coScUuvnbd26lccOPsa27eehxXd/JO7LQAZgJRZ84+epZM8JeYwtIaKIRZpGxXNFLTvMIuye2LRxE48++ig7d+5c48/KPffcY5O4+11nvOsj1N/Pz2/ggYe/xaNPPUcTGHc4GLBvz0Vcc8U+VlZXpkrgTCrPrNf71pPPnnC9a6+8gqWlxTUOUx1T/VmfGbphw0buf+gRHn3yudavaMe3/3JWVpZPYOXW+6vX7CYcu9GUpmm47777+OAHP+h4NxYlSdr8gOGOY45TwCpIsRQwxkjqxi7iECCJY3MBj91L8viXKSlFrN7iG6SyrOp1OaVxEAlB1EPFyTzSVCkjmgSp2XGNPALBO2kMy0JW8YhW8VNpODvLp//g03zjG/diCDfeeAN/+8c/yOrqClgOLpZgA8NGKU6vOI0QhMzK8iL/9fOf58orr2QwGJBz5v777+etb/l+jh096rAzCNApbhMqRItTRVKHGBmcF6CYkSUjWlr+pNNrIodiwlNPP8WuXbvWJKoHXew+GAwYjUYnxPS78d9q3EtLi+zfdym3HLiBuVlP1qyurPLakSMsryxPrNfuhnL7hLKFhePs33cpN9/4Jubm58BgeWWFI0eOsLBwfM3i7BrytLrlhYXjXL1/H993043MzsyAwMrKKseOHWNxcWEq6a3PzO0nSFWV0WjE7OwsMzOzLC8teagTQ5w8FVljZ8B6bD/Ig2YkUaz4I1Tx06Sh+E4cxuIZcHdAU8Ak0+T2ihtWzYSj1NThScfhYM4dbne6fVcV8bCx5zpicanvvO2qix+bepSrFMgizM7O8h8/9Z/46p1f4f0f+HEA/ugP/5CVpRU+/KEPsTxa8XAxhpRUM6C+IFViDgqbNp3Tnso153HhhRfyyuGXyGmGOjtJxfliqYbFPX+hpiQKWIoNB1CFQYrTsqGIRLTKT+xk0ChA4Yr9+3ng/vvZu3dvaw+D7mmxsrLCYDBY44TWf3eNsJsPeeWVV9aVdekvvm7Uql88tLq6yksvvzy1sH+aSkh9NU3T+k0iwuLiIouLi+0J2K8zmERP7+Z2qvPdz3EcOnSI6667jtXVZTQZ0pgf81KZrNWgAuNWrlJSSolEWPL9WqWGOt2eJSlaguJhvusnEc/yV0ygRkkpiH+QRSnCScfhnCl1smM44BVIdVnBnnFOEfpMiBVUnMxYeWFZ3FP6/z77x9x5x528//0f4F3vfAdigpbCZ/7wM1yyezdveetbnL8lCbNC5cAUJ7d4SFoSS6Nlrrnmap555ll27tzJcDjk3HPP5eDBg1x2+RU0qytgQol5dNaDopactoLFCVyQLKhCSua+hQTzWD33YwKpcUaA/8ztbBRRs/bk6OPsLkTRoHj3C/Yn1Rv0/ZJJBSarq6troEr3c/XPmvnuQ7FJmfu+sMAkI+/WpPQTndMURGqCr8/6rD8/dOgQ73nPezh27HhEYzzk6Md6pX8bFbAIhonDJKhoxWLXTwFp1NdPY8EgFzT8Dv+AOwbOrjWPgKXKbfLo1CmNo15HPHFmUhgTVQh+lOOWLM641aCFWEtbj+cgyo/+yLvZtnUb3//Wt7G6OkIwfviHb2Xnzgu48c3Xs7K86idNzTGUoLlLxUdOiMwI1159NX/5l3exbdu29jkuLi4yPzvL8dUVSoNDtDjJLKBRI0YmkqXOcEQSFI2cShKkLowSSUlLkU+CZMbi4iLnbt/O8vIyMzMzbkt33nmnTaqK6lZx1aOuX7vcx+yTanq7MKpbfNR1quvu3F8wfQp5d7ev4+v6Al3o0/eX1hMHm1aLPEl8YWFhgZWVZd7+gz/IatOEPzDwya8bdXLoQwnqglR6OBFNcqhDOLbq22dEIiM513iUR8woyZ32XJ3sFDukuPtSKhnxFMbRJgZjx0ymIIM2CWkBO6xS4FNk7cVQC1jia6UNh1rOfgKotgnLFGOWDkFRTZyuUmodSaX1BNoYCF+548vMDGeYn59nZmYGVeXwK4fZef4FqFkEH2owISElnil+X77Ak/PQLBYzYNKQbNDys2rEziJQkFDO2bKVu+6+i71797q9dxNp/d247yfUnMC00Gw3kdNNltXPTitb7VZ91YRQn6zY/96+L1TDq30nvY6l+2fNldSxdU/Mfji3C+1WVlZ45JFHeOtb3sZodTWIbL4raTAKa8UFxTlOTlfxZJRU34DkcXuLRG6p4VdAszu+QZZTBSkOY6zu/MUJWaYRTTuNcfhxlaIOQ+Ik8ARhqZBNPOyMJFLkFDTGX0wpJUCYiI+ztaHY7ASsGRuemS+iZCCqEbiKMKv6ovRxKbccuIWDBw+2lBIR4YVDLzAzHJLQCF1bhzZSPKnZEjiDvqLmi5sCyfMeJpU640466uPT5Pe4PFohDTLD4dARQ3e3rYbdzRB3F0mfqj0pD9CFL12sXiM+1ZDrd9WfdSejv+C6pMWukXezmv3/uhCpe63uoqvjrYuq6WHOetp1v3N+fp65+TnMMpTShjOt3QE9ROvYPI5/83oKlRL1FIrzNSRyAJXFamBNLexzjJ78mqq+YFJxACZ4dvB0xqFBFycpUMhmlBw0k6CxWnJDdlqKnwR+gezcrmD+WkR+tN1/jUJARRM/tSg+1mSU8K80KCGkgiEeoFAfkqkyt2kD8/PzLVlVVbn22mu57YtfYLUUNm7cgBYfmgUb2BduHJfFKBRnAqRIXBZnKIuCNMWTirFo0eKUEwEdGcuLy2MbuP32260LfU6m0zRNm3Q9XdZazDIajRgOh+2C6Auk9X2e9dQpJtU+96HSYDA4IYk5TVh4Te1w+Br9U+PFF1/kyquuYu/eS50KkiQoHtLmCHJEhGosnRrPD6IgOaIl5rAJ8YSYJoWSUSnk5Bwqq5gjJUyLR4tybhm8vkA4rXFIMmiEkqSlswseyclSTxL3XzyRCGLF5QaiZLZSw2t+JuHObaJuAuo8KLF6i/V/Dgu1pk+C1hEOcRLP8D/1zFM89NBDnH/++QyHQy91Hgx44IEHKKUwPz9PaZq4txpVq5WINZIXLoJGwZa4RyZtrNzvQVGSed3LzOwsKQm7du0aEw+7jmyfaDiJRtENuU2Td+z/vMvd6i6++u8uhOpHlyoEqousr3LXvYd+sq7eU9c3miSjWRdJ9WO6i7DuYIcOHeLHP/B+ji0skSWyA6kWKKU2x13LUn3HcuydUoSjgk6NJqwUkNziYMtK1hTwSONKvggk+WJJgbFNGswyScopj6MN+yZjkEAbQwYNlMwwfKKSPN8S9u9JNcmIRj1HkByliEfGRoKm5KzxONMkxpCjTEDw7L1FWUESpWgIX2SLkoKoGMzC/iuu4Mtf/jI7duxobWJ5eZnLLrusjXh2Swb69tO3iYpQuqWw1fftRkyHw+GaIM2gL0ZQv7juntN0nLoZ9a5D3GXdttTfyHr2F0QdcH8xdk+P6kt0F0w3RNyv0OtH37rXn8TA7YsorK6unlBPXEphYWGByy+7jMWlZa+YK8kd5sDqKejfRkNmgBaPubvwgNKUQYxRIZnvxil2VC3+WREnFOILysSDrKoCNAgShU/J687l9MeRygCNYqriTA7PyquzcX0z953fiIRMtnEJbQ7elnrQQHMhaaIBp8cHLPOKkUqV0VYvQsy8ZiVqQ8Tpu2OonmBlZYX9+/dz5MgRtmzZsqaMtm8bw+FwzabaZ23X1+zs7Bok008kT5JYSl0j74ZtR6PRGojV3fFreLOLxfs+S5f+XXfe6mtMKputi6DrVPfpIX1fon5n15/o+g2T9GHrOJaXl9fkbUoprTJJHWddwE3T8MQTT/COH3oXpSmRqnP6tyexvKRUUMQG7luY1GgqiSF5UDynkSzwdZSamkQxj4dXsyWyQE7uvFrUwWrKEIVPOqgV36c/Do3TS6VGsiLWr2PlkAxYKo5zaiYcozHncGlAGEsgJUUdObhn4ZAmp2Acx2JHpBO50tZvMrE2ny1RHKXA277/bRw8eHCNXX237Sd1C4e6cKceMd2sdI3ydJ31SYXsdYDd1djdyfuwqgt3BoPBCSJjNRFZrzccDtes+vWUUvqJwvr+4XC4Jsxcd4+6+6SUGI1GHD16lAcffJD/4e/8HZaPL3nVWXCSPLTpLB1LbqopZGsQT4aliB5pyaTAtwWQQfAhtJCDqaqRlCtBabBhwnKJIiOLTDfQSOQrTn8czsNIHhUL6J0HOGwzJxUWEZJKsDIEy4ZJ9ipDrUojGg67JwuCKxwejuc1LIfJB8YXEY9WRZGXImQN1i+GpuSnWTGWV5b48Ic/zNfvvZejR4+uQTffLfuR27/0pdhCiAL6MUmM4J7Uyq5WmiU0kmqEo2oj1Z9JyLVU3GqRFfU5Cp+ge52uDx+7UJ3kVgFJWPO++pska+Vqqq+FdcbT+S4i4tJqRdXQUCSU3JeTljM1HA64+qorWS4N2VJ8jQYBLpMoQUWHAUKDix9U+ptj/cBI4nymAEvxQBwe+XXjHlJBtdIQ05hwh6JZSPo6xtFm68f3i4IFnZycQhBhnJF3H1yD4hIlsCpjxq6M6+NpqTIhAySKFKfiD5K11A93xI0qFlRTqV42HLkhEyQJDz74wASxD9pn1SGutQteqM+acRBhLBI2wZ7Hw2+t6/lDh2woQhG8drkaazUUBI00ewpqDClR1EXGqiZRq2IR0jE5HM+avZWITzsTMqInEb2oC0BDoCxJ8IoiopCCy+OsS6c1iPiR7xFFI6dQvqhiCjHlLfwQN6Lx/Xssp5iQrBpK5JJbdqrXSYiF1kegDM8ZBDkvplIl5igHLSMoH9XZFIOSa2WdeXVbZGpdWMfxuVRHH39fLFvPVai87nH4JsDaZ6WG5SBFVl6X1PmHsV5QhEQcCZcsAAAWiUlEQVTN/3S+VfIipBosE0FLzWRnf1Z4Vtp9J/WAXcpRvBVUrprIi/vGxpG2yOWf5FkJRdx+Bh6DeN32nCRKFyV2No1Yd12ViguMpZRiB/AEVor4u0VM2+LYN/Hj2LO6cXhGFVjoVDjetnqsBMUnDuVURS1IpOw7TqP12K8Lw5Nm7vA5dUDVs8MSnl8hwpKhzKfqIgWu3RScHgtjSw4l6s6SgtWKuhqHU9OkzbYWMyx1ggPm7FZJyZ1UBIsyToschguG+HcXxZN+kdmuQVdNJRJw1jlVtS2W+k6MQ8W8bDcMMhWjSfgmY8Vza6o+P8Hd0wjFWlQG1mNc8OfqGWev2WgipKzqBuf+T4kyFB9f0TzOktdEqLoWlpl4HQaN86LsVJ+VeaTvO2jPg6B6erRDIIdR13oD/02s+uQTSJvrdfwpUTBjA2sTR9IINlCkyWiuzM/sD0DMSS0mTkqzhKbiANpo2aClEXLc2LhYP7Kfgb/rSSvWtMk2y7G7hbSHVUigtcjIKMUX60iEQQOWa/DU0BIs2ahRdqLOd2aOihZee+UwRYsbQ3a2qmbIxb1hC1U3oQ1ZjRm7GnkFEXKLIYmEn4zRRYp6kXofFYIEydHLB4OK0RmHf5eChOYVY2q81edWhdrCc3B4GBC3as3Fs0rFoaDXllQYowEVfcMiiJh10Yt2TqzkTGE/GeS7OkeDFD5CSfFnOFxSAjRKwKIUxklGvC4TGRSk8aIXk8bLO1NyxuQgao6roYaRWlSEWZhiIlFaAw+tpMANKeHx8Ip5Ww5NPDj1YnpPPDmFuoqMWRz1VfAMgvgnhpVwxIrn5Er2IqEkvjMnySjFT6SUnX/0HZij44tHWVkdccnu3Zx9fe+/Btr4DuvUBW1hjiTfL1IpNAKDyNiqFefN+Kbv8Wp1LaVKoSdi89Iq7/lRlc0jKJqsfW9JNi7cJ3mMPRwlrUzTtoYldokorjZxcKniO4e6DIWvfMVLSXODufU7wcE8yVZq2FDHO3xj1SeSVr0jWUE1ofL65shILC6tsG/fZW3M/ezre/uVkBJVZo5HCacxyDruuJkTzqzSHrK4WFqFKWLkyOWk6kTWLHllZhYP3UXZekRliFj4uHorBSFMzOPdFllaB8w4F0Y8sqJVXdzEaxnCaTXxMkpxBVn/uqSh9FcimuEOutQQRUrOdkU8vBo+kNcCvP45SiI0zejswjiTFodLODaUCJ21YbzgpKSICnn9rbSliCYRprOE5OTOoLg2kJHIUQYq2aMKOVVpRtpoeKoymVLpy0FbSA66UjinxRLJ7RfLGUWcyyMOzCLC6pg4uUaTmKDZa4fropFU2miNk3BaXgdSwqlLige1amVdcvr2654j9zfOvs4gWEVxVW2rNc2iHg7P7qiJiDujppTqtBSw1CDmcXRWidqA8LOtuAYTTlOQKOUZkwIrv8ZFugbqWqzSOulxZBQNOU+HLSkcNi3GAEHzyIPDGkxRF0cKCqpiKaT7i7rwWBX6ipNINbtoQHJGJjmFbEsVFNOWkWq8zjkadRzDs68zBVa5wQ2DgpAkObOsRFSiCsdJxdgZyKHm4OFbBhG4SZW373FzHUR7lKBGWIT2UieLOtTIaUQtmvsblT7txDUlkzRXIqUnk5LnHyQWBknIqDvFklxVQ2sCLBYdCcmGWnJJTvFQoRYhDYKBKhGxyQRPKLVhz29njlxMwDVaObs2zjBYFUmdxqzF3yI1l5DaTKSiaEkgrhhHEmaGmc2bNjM7mHF4o5HOi2qvXEJu3/DC/uAQEU53FokkWxDGUtVX9TLHpDkUx+tWPBYTm8kDl6jJngjy/GotAfUQclRTen11VMah47BdUUgpBJ6DFaCUEAwzJGVmN8yxYdM8m+Y3QM7Vg4kkkTE7nJ06R5VHZHEAnV0bZxysiqysefioiDCIWmQstbyYZMllKkMndX5mA//3b/w//MnnPsett97K//qz/wuriwbZd+IaXUo11m8pdFIjc12MJJGbiOIUzFzvtR1P01bOEUS9lDOPPPQQr7z6Kju2n8cVV1zuSStxaUxyiCfXa5iHgEuQ5VxCMORhUE/IVapQUGFTSqwsL/E7v/uf+eY3v86RI0eYGQ65/PLLee973su1N1xPWVnh2OICn/+jz/P+D3wgAgedOTJXRS8mDCIjXSkjZ19nCqyKrKMUT+J5mt4CK9MamAZRKhnMzczyG//2N3jowQe56aab+PrX7yUxJCWLCJLDnMoZwlwNIqc4naQySR1Mlcp5CQl8SSn8F2lT+W5YnpRqSmHvnktJOfHoY4+ShkFYyzkSSNYqjbcyXuKEEq1Z+6iuz4RAcpw6szNz/Pmf/lf+3k/+JN969GG2bd/Gvn37uPiSSzh+fIGPf/IT/Itf+iWOHDvGRz/yc+Q8OHGOYuJUPNTbWGkTY2dfZ9DiKADFG5aIppYe4KJi2qrsIQ2iwuzcLP/+t/4D9993H9u2bUO1cPPNN6Ml5F5qWNZLgl260Wruo6qMp7arllrxgFHtHyFgxeVUUggwN5W8KL7INm3eiKJs2LQRBQ5+63FyErSx4PxUiFfpGR4CdqFwRTUFT6j4Yo6SycEg8cd//F/49Gf+kBuuvx5B2LZ1G9deey2X7N5N0YZ9+/axuLTEz/7sz7Jnz+4WgnbnyKNmrhiokS23s7DqzINViaalbZQcNGXR0AbKThxIgllhbm6WT/32b3P3XXezY8cOzIwtW7byD3/mH7K4shzdiYxG8IRfKzwfLMiiYeAaxfnFI0ollMilbY4HRaNqLXnmXDJWCkVgzyWX8sSTjzOcmWPzhs0cOX6EJ558kt2790TysJCCJtBUVTypQoBGyRp98ELmrHgTl8OHD/MHf/Bp9u3bx2g04qMf/Qh7du9meWWZLENKafh3/+Hf8/xzz3HFFVcE6zeoJDFHLvDhVBlVF1FGcoSlzxrcmeVz2ABSoYTSRAlYoCl7D4eggc8Mh3zmM3/A7bffwfnnnw/Azp07+djHPkajDefMDUNhI1rwBllNVVlcWvRdNFid3quCwP7aGo5ZioYr3gekcnA8cqWklMMHSly+7woee+IgOQ3YumULh189zLPPPsPFF+9qWxRr66iH6oc60SxriBCrO82ShJQGfPozf8TevXs5duwYv/iLv8imTedw7PhxhEQjixxfXOa+b/4V5+04b1xGGwVHqXK7teZSSnTZqnUTejaSe+YtDu82mkU6HYEyYh5gFVNSHvC5P/kTPv/5P+Oiiy5sDeOhhx7i3e9+d0igyLgntYybtm/cuJFf/79+nXM2nxPKEwnJ2tJKUu0BIerZZIWmKdx11x1ITuOWXLjgGSHfLyS2bN3Cls3nUFTZunUbrx0+zPPPvsCFF1zoY8rR6kqcqGgaogiR6fYwrUfWBnOzPPLwg2zffi6X7buM7du2szJaDSq28OLLr/LRj3yEiy++mKNHj3p8S4RmtQkWLeHZV3GxqvAXGFNbZvnZ15myOEwsIq+1j0EmpdKqSKDG7Pw8n/7MZ9izZ8+a6r9zzz2X8847b90vKKXhi1/8Eu99z4+5+28lEhgS7EpXscgpuzyKKK+8dIiLd+9hkMQ1YtMIs2FIygS1pOo6hR9hZLZu386hFw6x6+JdjJrGe3lHEZEnxx37ayTzarPHJmU2JGNpyWVZLrrgQlaa1SBOehRr1wUX8NnPfg60RPbeN4Dl0QrLxxfbXuKo530oNm4qGYIHdhZXnWGLwxVhnJEq4lDDosREjZShrK5y1VVXsbS0dNpfsLo6YveuXWhxDySJdy8ySSRV1LIr1WlpT565jZs5fuwIaWbW9Y0sk5JGHsPFYES974KKMDDH+0X9NGmaEs0nvejHlFbqsu19h4euNdiBRYW5uVnX2F1aIqsXz2jxSpOl0SrLr7ziaRJlXAVnRm6VA6tgW/FkYuuE51pOefZ1Ri0OCrkMKGmsnySB2ZNAo0JZXuEjH/kon/zkJ9bUY59//vlcffVV3tpM2sLTtrZPzNiydQs33ngTy6tLkSj0uolkng/IOHFPa2mjGlu3biJnf2+tx0gdSYFg/XPs+AJZ1DsUkVhZXuDSSy9DKYg5M9ijYt4FqaiQcnFNpWxYyd5ZVYSiDeeffz5NU7j77rv50E98iIWlBVqhm5JdtsYysxtmKKPG+wCKK3VX9JSTM38tNFqrOksKn+fs68x5ydPPPF116sPochSF+C5emyFIRGQ+8YmPt7W8zz77HH//7/8kb37zAe+akw1TbwxZBbUV7yCkVW81HOycDG0kmh5KW8stVVM1VUHxCO9aFMvgnKnXXn2Nlw4dYtu554IVFldX2Lt7D6Vx/ydngvIuURIqQYyM8leSJzsju52ScMcdt/OlL93O4uIiBw68mb/7d3+C5ZXlqGly3+uVl17iV37lV7nxxhv4n/7B/8xoZTWKZizyi937SO6UR4vjFw49z00HbjprdWdKnsOakFUxjQ6exYnehdDmHtdooIWPfexjlJDc2bXrIn7zN3+Tv/rmN5zuPYrrFHXcrRaG6Ht+MYNSEFXKyHMSpp4LMNShkXmyT83afm+VKFi1/I6+eoRnn3uGrdu3oRiLSyvsufgSmlGlo9decNCkWn9hjKJGo4QAcqNOFUmmFFPe8a53ISJs3ryZ2277Iv/q4/+Kl156iY0bNoHC5z77x/yjX/gFzr/gfP7irr9kNg+pnQHaA7VoKwEKhjVB3bez2fEz7uR48qknLJNbdQ9LtaC4qkDUckZvmSXJM9Sf/OQnWxmUgwcP8lu/9VssLi4g5CASWtCVkq+TWmgURfFAiHpVXaZg9YpHtCza9bbyjeIwaSYP+NrXv8auCy6ClFg8vsieS/d4F9bIp2RxkWLNtLXX0Zpi3M8uKPBaO8DEybi0uMSv/ZtfY252luXlZR5//HEWFhYYDAZccsklbN++nYWFBd73vvdx0803U7Q5YY6INsaVGZ+Sy8+8+PwhDhw4cNbqzqSTo2BRqFOiFtuL8FMIFFA0+jQ03p8tZX7+536e5RWP7uw4b4d/Pqjpg2gmoqqIGk2IhlkqFINGjSZOBFXvEJpKQa2BQqhIBPtcFGu8GaIUb86+aX4TBeP48aPs3rMbbUY0USCF+omgRKticzHjohpL1JeHJqUpTl+36HmtpmyY38A/+6f/hAsvuojRaMT+/fu5+aabuf6GG5ifn2eQB/zMz/wDvu+W76OUZuIcWaijazFUCqWRXlHX2dcZcXI88eTjZpJoJYTa5iJjwYFKwo7MhwscZKGMCnd/7S7edMONbJyb94hTkii2DwVwAaxBZNCWt0rkARSviZBilARZw1hTLcgfh4UsKvEkpPEXFo6zcdNm12K1VjmrrfKr2lOefmg1WECdS+b6JjZuqFgpLHhgYn7DPMeOH+eRRx7m6NGjzM7NcsnFl7D3sr0cO7rg2XCxqXOU1JuqJFwsLQ0yh154nptuOutznDmL44knDPHqORt4Ew/VHPUXIeyg4pSLUK3TkHMPcaiqTeFwJVH14d2g1ZyqHmL1Xq0aelUaurBZooVCrdgLmJNrfTmtTlGKL9boA6HiDUwkh8SPiod9XUCD1EQ31VSbqsQCiSYsYhJtvdplBGY0SRhaFc2JTqbqQoGCYqc4RzUhmtOAF188C6vOLFhFzYr7jq5BIdeooZBUQg3PXD+1lOiyGBhe3dFurGqQatvpE6JKLjXeQ6HVEKoOdpwQxXMY3qXHG40UDGk80lTEe+URkvtaqScWPSrCnyBgVJXsMUtobtqGj973O8iUNCGr0zj3KciNqr7gBhqkkLZ3hYXBW0uzP5U5MhOn47SaT2dfZ8zi0Ej21cahRLzes9niESh1yEEJdZCIHCW1tr2UiF+H6Nmg0RWxrbQTV6zTKmxEkPQ6X1xlHNUKAwnZzuR1TqUEEz3V0m9DdeCD01Atz3jVYTSalOLYvwRd3YoLOlSVESxakdnIGzhqRJWiM5IFrUXR1z1HVb3x7OsMSgIGEhmTG6L/AsGXkoznMGosn+QVdC01PYWyRwqZ+mjxS9u1xHddBMvFdYdLaRuyCDky8jXWFO1QrLiUTklRo+Rqikkt1MktZEejM1UIK9RbkFQV1r1iRC17UZVEaxcpURUYcEqhiPsz0nj0rKr6IfK650gH5ezaONNODqnE1xAIIKIsVVXDosmIR1b94edsnUIoGxtRLm1OoVXwVWtVDnNTF03VeM1eUpqsbdjYRKKvsg0zDmUkKSKlI1Zcuw+NW+VWX8ePIRdSbheLjFwNBD8NBiWa1BOOe/gG5rMShUoBM78Dc+Slv+msxZ1RPkfoQbmYQY3qgI4E1QYzx+Zq3uAU9SyzVawfjd2LetMUxXtEW/SK8B50OT4T6iMaHY5QShVIEPH6h+TizVWlRIMoWFTRIjTi/kkJyCYWbFtTirijXlXNVUucHrX/t2vrWiNOlykuueNhZ1opTO/zEi20NNqhvc450qawYX4Df3XffWsoOGdf38PRqscOPmYpFG1ShlSyc5kyUQvurXSlNBGFicBU1F20WlPquk2VLlLFvzUUsVPrRIdvUCKqU6nudY83acNg1tK9MySvIHRIpeTk6iWErGfkMaM/orcPQ1rdbvdtShrXkVeyjCilqrkXVzqR6NtXhcorn+t1z1HxnNIrr77KyspS9LUIXtkayFUZPbV1g7WdWaPXfCsKYViwVySawXTeYIzJjq3av7Tq7bWPNxEKr+OQWrIs2p6I1umjN+011oSvrSfCyOrvpBaGhSp7R4e3+px0tXbbga+9le/WHMljjx70pHg4qSqCyMhLSU1c87XqzVpoCIbUjSuXgKYQcDbI4vKZskauvmrcgmhGJSRzglflSt/RtsBcMsc0t4TDksbibN4ZKSrwxJCiHnatRVFt96DIrkdttySX1K+ZE4v0dTXmFCdUFonmMcEOiJyMiLbq79+xOZJOo4ToAe6+j7WLX6r5mDe7SUGt8QaQHgk0Fd94skb9irR+XKp6KTIOr0t0lR1InKhrxkGba5LiRNRstZeGz1OTooePpjVtjMfPKuar6kNXKqq6ovugfVZEi4BoU2AaWsUhB0vQ1uJ5EJWX3605annVIkKREp1Ds3cBjRZZIeCHiIuU1V3FzBscinn72kQJ/K2RSIwFIJVHFUVNRNutCN820SvDdbAij5E1yIdGrhQMIWTjSyvCTU7MRqjUhZ4tdi6NZF9oZsVNSLZxf47sLYNTZMyl+hrRMyKpRueMyHN8p+coKqBU1GnuGCWVttNq7R8jql6LbnGaRu9AojamCm1HcUtUZDZutBqSQeoVj2hBtbgGcJETx4GXAljxZ+bs6WjtXIxRSLYq6gvDAqKGwkpSIoEM0gQnwSo1SZgp3tO8RBsJgnemMVduG+NnpbUeJ/Fdn6OBVme0hmKJTp9tljlk4iWq8qLfRirxuTJuQqPRJqgemVrPqugYlELbqf62WHSASuIdf1o2cNDMq9+SQqbexp2anKBo0fsiGMSR3EvW0ERfDRkYTSPef1oEHakLrJVEoYE09Aw+CVd/tKCwZ3IqSBn4Qygh+fnXNEeSBt8T4zj7rMZzNPjKV75KbbLT9idogVhIeNZjrdvaqsrsmESuo9Mjq6NCMq61DvwvXdzr35GihUBtKmNRm60hNh05OMfHMZQkqdN2rYtvg9LRJiSqhm0kO10BoZUBSiYtDBtLhNSuFFVwOnlo+K9xjhLfG+M4+6zGc/T/A8/G/snZpSWJAAAAAElFTkSuQmCC);
-  display: none;
-}
-
-* /deep/ quad-stack-view > #chrome-mid {
-  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAABICAYAAADRa1RpAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH3QcNFycE5v9iFQAAAQtJREFUOMvtkjGSWzEMQx/0eYrM3v8k3vgqycalSwlI8Ufyl3OBFMtGIgUCIEd6PB6RBEASqvfONSrJXrDNbNkQ8ywA2y/SmayW+ZIESTsiyQsxo40xmMS2aUmYbheHpCVd0+UqJGGMsey3mUyldoUvlY3D9rIN0K7Wbe/WbZ+y1yWtaVtrp3VJzAEX6ZVjc2p7b2mtnYhNdl6m05rwtfV/ltx7XypJTpXeO7Y5juOlchzHaWxyrJmuhLapqgIJONv05+srThBgiQpBTSRwGOr3rwccgWHUhJ7P5/YNlbd/2XiL78L/WajP240AQUihfnx84EDJjCHKHjTAbkimQDgBjAJ1/3kHAgEk/gL71AHEWVXPGQAAAABJRU5ErkJggg==);
-  display: none;
-}
-
-* /deep/ quad-stack-view > #chrome-right {
-  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAABICAYAAACaw4eEAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH3QcNFyghKmOqnQAADE1JREFUaN6dmsuyZsdRhb/M2uf07bREYDykPeIleAMibNx92i9BgEPBgyB5xlvgtgI8VDNBI41xhGkpQowERgqw3H0ue1cuBlm1T/3Vu4XNiWj9l12XrMyVK1fWL/v6668lCXdHEt/1Z2YnnyUhCTPbX8dn45pmRkR81z7/XUr59Pz8/K8ePnz47/bVV19pnDhu0t+Pmx0Z+Pv8zWv1/eZnZ2dntw8ePPizZXw4bj5/P3vq6G/eePZiX9fd9/Xng6/reg78/dInzxPG9+/auH83GjEbPUahj6m1Hoa6v1/X9c+XPrlP7INqrfuru7+10WzUkUHvOtTojPF1mPdHSzdqPPXo5vm046bdq0fhGr+bvXZk6OgAM2OZBx7hZD7hnCzbtp149Wid0YOjx+eE6t8tMzb659Ebkg5PPY8ZvXpEQWNCzck2M4H3BWeM1Fr31/6+GziPmTefM3tcYzQoIt4a3+cso2EzhsYTzAAdw9M9M3rviPv683dl/Oi9pdZKKeVk4piVRyDu1NI3mCtARFBKeWeGbtt2yHV9HXdnGUMyGjSfZq4K42ajYbPXx836XjO+jsj3rawcFx5dPgK8bzJ6eGbzI8yO3j4yaMToiWF98fl0c4bNSXBEJ/Ozd1HSEY8BLGOIxlONeCqlnHyWtGNoxteRMX38uP44fkyyPnfpp58zqy/s7jsGj0rOEcvPVaMD/sj4I/zWWllmMB/VviOwHumv+dkRGc9EOtOUu6fHZteOGBtDN/+NeJwPNRsxl54RU3PIO4x827a3wNwfdr45kib92WhAf9+fHem1I7FZa31rr+WIr45kzrjZsixvZWHHYcfqXFHGctM9ta7ridcigmVZWNf1DvyllN2wkatmHIxCby7kYzbPOD2qFCN39efrut55rE8YM3I+8VENHPFVa2VZlkOSdXe2bTuhmHdl+W5ox8T8YCbD/l2t9YQqRiNGjx8l1JEamVXKri56doyTuzfGhWd+OyLJjsNRlo+eHaX63Iy8ldnjQn3hbmA/yagGusfG7JwrxZytcxMyjpnH77VyPEEP65iVs5tntp4ldp8zlrG+x8z2Y9L1f91Jy+zeccGZn0Zv9nFHTH500BGbM6HOojMiWEZQf1cN7Aut68qyLCdeGFN+xuRYJ7tXu5fetU9EZCiPOp8xm8bTzLqpe2jkoDnzxjCOa8/VZByzzG7t8gQ4eT+GdO4Be0kZDTgq5kea/0g0RgS+rushNkbg93o6aqeejUeNR/fcUWmaqWLbtn39MdGWGcRHUrcb17E1jhszq3tvxNCsJuaE6VGZMbeMKTrL6LGelVL2k41jx6zuRbknSS9BI7WMdDRTxLi3z+VkDl3/7vb29oS3xhoZESdZOm4whrW/7/NHT83UtNze3u6c1I06Ozs7wdjc7PaQzsV8JNSOp7k97IDvtDPDYTdsvts6Pz8/MXCsm2PD2g/Tm+Vx0bHZHTNvjMyRyh2pajk/P0cIZEAHLLgXQLg5ckDCAFsKCwtIeHHAQGAmSnEkMAyZMBkin4lc3jBEM4a7MZgo7mBGhLD/+M1/qiCqDJflIjICYbknjlEtQEl81cBDYIaUi3aDwoEQ7mABuFMjcHOMQHLMRLSDhhlFQk4+k9IhLggZBREeVLN+NNwNCAhRwjGMimGyPJlA3owyIwiKEltWjTBHNchIGpLleIS5ITNKQHVDYRiBGUQI/83X/0XUyorhm2EKAsvT1IqFgwusgglCWARV3SuGmdNchwgiRHWQagcHIqCNJ7whJ6AI20AeUJ3A0ilP/vQJ33zzDdvNDbWkO91oAwphrah7wVGG1cHMqSHkggiwDJthmAcgjIIVg5rfWc1h2AZ7AgBLpMElMpQCUyOSX/3rr/j+9/+EGoEQTgKxKnDADRROmCiWySJBeILbMCxENVhwBISCnldm4EBEeiQRk1AJs/Y5ER2q7BX03v17SQnumDeXRqXgDaSA1cSdIExQDM+UgtoArTyMIjABJUPt4S2hRHEIgbdstV5LI4OusDvDMgMNqw3sHqi0HPcMotyRNqp5ArnmRrkLuBm4kHmjDAeEDMICk2PFMwomqjI2xYSHsJIUUnxoeBO7rdQUJ2qeJk8SLfdLGtgWCouEVzFUG7NXMAXVG1YqyDdMhSDgFuTpabUEiUguUw3AiAafbhoR4EtmpJknKArgytMaBHBmIozEIQ41M1dK7ySGEvxQ8NoI1w2WFh0XlsUaFYilJ5zhpuGKwBxXeygIqxlrE6Ih1wKPgi8L799/QGcJo4M5o9oYDfcKUZJmEFdX12zrikh2xwwrQA2KOeqETRlCGaKaUFXLpjQwy5Elu4dzflb4uw8/5MXP/wEsE6ORVX8hbVRzTVcN4ic/ec4HH3zA7XaTC1sQtZUXAm98Z7I7uvjii8+5ePw4pUiwu7TXuogM3cX7j/jhX/yIJz948gf/NPjll1/yy1/+E//z299RCGrL+AxI8krQfhk5Ab+6LmrGyDA1dvfkqOvXNzy7fMonn7w8umjafabmsDuowPPnz3nz5joLiN9VCwIqJDGHweixV59/weNHF4itZSMJbGq61kg3h3N2fs7D9x7jIdTwIzw3tCxrZo560U5U8frNFdu6URWJS8RmRukto3smv07uxwJrMa9uLDJCG1ZKI87AWJBvhEOsG9WEhSVcWBtu1A615da2kboiPaRW4hSRcBGEClhg0cTDycWdJR1XgUdkrN2hRqslGapydo+fffgRL37+Ir1opzrrJHZDAiB49vySv/3gp9zcRiqLCpsrjSLrnpQ27KH8/ItXPHz4PtRbRMoTajrBw6Hk4o8vLvjhj/6SH/w/wf/xx//I629/u9fPjkxLIZfVwmLwWBhQqUqgU1NZlCrkQVRwGW9urrl89pRPXr78gw27vHzO9dVVI2cIOYVIGHkrYXVDUQaPvXrFo4tHbFV7dnkjzGT+5BjXwnK/cPHovcRLI9hME3ZeM2+HtRwQAVdXb1ivr6ldzfYC3sSnPFAUZHW+HE7WtqamZL07avrcnYgKKtR6m/VKQTR9n0JQjZj7KqD2LCLY2h4quqsKNUWA5BQPatjAY1hTpuAO2iqlGLV1EQJ8C87vnfOzjz7ixS8+5vf93y+sFeZnl5f89K//htttw1bAW5d05rAK90awjOD//BUPHtynblmInXStyUHJR3jw3sV7/PjpU548eXJArvZ/gv/Fx7/g9bfftug4NfVKa7byd8pN9ZT5I9rFSM/wSPFXrOn5Tby5vubp0x/z8uU/t1Jx5/H9v3b3/q4YGJfPLrl+c0Pde8lgEWxN0znG1jG6e+zfXnHvwQNETdmMINqlSEeZJ1Dvn93j4uJiL+6jv8TQO9L6lya9f/fta26228wodVwZboFU2gLbqbqglZLarzTbdpvBEhWxNJI1bq5uuV6/SRCHt35AyAwPo5aKZzlIHRb5SqTR1nRSnitQtC4phNlyqvlTppRUlmZEQJizhCErbYSa57J8SNkLRm3s7RV54AHymjK9cYjUyg+wqV8XRCtfdzea+IZiFIoSsFKBEm1SE26SpXZCeDh7g9P64R4SrU2ZkC1btea5TMDsqCJ5UfUuZwO1BlnZ6tkgrWWWqjOgqhJmsLWa2dowsKZK0nuKlMWokWWBoBIeiJpZF6CqhtnMdHSHW6PdZLfijjISu2HX11dEjURrTza3BtymzaLV5NZwEGQYW4ekaLdCkXSDRCkidr2n/XKGUlOKjxc6oXZN0H4ZefXrVxQ3atTsjD1lkJpIDNEwlSCRZ53rp4zViNiQtqwEStHT1YoUOaclSY1MmmjXCelNz2Q1T5L/7LPPYDEePXqYNa0ENHnd7xeKKUFiAO2HBM97DZMoS1prMmQLrqCE8uZHIgVDNAFpFEW7BnGKWQtnYJ6GOmL54+99D0JEzfT1alRzikHtda+1/4nsxk/VqQZmlXXzJMUiqFu7nrJMe8v2LhteteuAvEcrVqk1m+Owdn9h7ZYSE6WAIrkjPCVIFua8s0jhWHfhZ5YZZ6rZNxoplZp3clg2uUSKAcmwYpgqUs1iFI5Z4rr3mliq3IVqVDbwM9CGkao1rN1IR6F4xepCEFht1wAhIKjRNH0Dv6ym5lHrEQw8JSlUtapghHJ+qiK13OyZ6yyf/sunSYqyVuPavVVq3bvSgrKxcKVGU7/s1U5ovXz1W5v9ftPVet68cbSehRo65ZNfUuB/AWHLchVUWJtFAAAAAElFTkSuQmCC);
-  display: none;
-}
-</style><template id="quad-stack-view-template">
-  <div id="header"></div>
-  <input id="stacking-distance-slider" max="400" min="1" step="1" type="range"/>
-  
-  <canvas id="canvas"></canvas>
-  <img id="chrome-left"/>
-  <img id="chrome-mid"/>
-  <img id="chrome-right"/>
-</template><style>
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view {
-  position: relative;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > top-controls {
-  -webkit-flex: 0 0 auto;
-  background-image: -webkit-gradient(linear,
-                                     0 0, 100% 0,
-                                     from(#E5E5E5),
-                                     to(#D1D1D1));
-  border-bottom: 1px solid #8e8e8e;
-  border-top: 1px solid white;
-  display: flex;
-  flex-flow: row wrap;
-  flex-direction: row;
-  font-size:  14px;
-  padding-left: 2px;
-  overflow: hidden;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view >
-      top-controls input[type='checkbox'] {
-  vertical-align: -2px;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > .what-rasterized {
-  color: -webkit-link;
-  cursor: pointer;
-  text-decoration: underline;
-  position: absolute;
-  bottom: 10px;
-  left: 10px;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > #input-event {
-  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAMnwAADJ8BPja39wAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAyNSURBVHic7Z1PTCPXHcc/4wWWVbJN2cJSLVqiQJuGpoIGEVWReoBNIlIF5RCRSysOK9EbksUeOHLIIQcULbLEEYk7oqduD6gSRoqUEyK7dCOabOHghCiAE/JntQtesHt4fuM3z2+MZzy2x8ZfaTTjN+Px4/fh9/7Pb6xMJkND4VGk2hloyKkGkJCpASRkagAJmRpAQqYGkJCpASRkaqp2BvzKsizf3w1z38sKc+ZUaQCuAFeB57P7q4AF/Kxsj4GnLrfL+6PDYofQAskCaAJ6gJeB6+QAFOvZpwgwPwOHwCNgN5uu/+H252raJHRALMu6ggDwCtALNAf8E88QUL5AAHqSTVcNUTU4oQBiWVYzMIiA0E3lGhtp4CsEnPtACgFDGqXiYKoKxLKsCPAaMIwojlzV1tZGV1cXHR0ddHR00N7ebh93dHQAcHh4aG/JZNI+3tvb4+jo6LzsPAY+QYA5Ix9KBsoPpmpALMt6BXgTaHe7pre3l5GREUZGRujv7/fdsspkMmxtbRGPx4nH4+zs7BS6/HtgHfgvOW9xeE05bVZxIJZldQNvATf1c5FIhMHBQYaHh7l16xbd3d1lyUMikWBtbY319XU2NzdJp9Omy74B1oAEAoa8yIZTDttVDIhlWZeB94Dfm86Pjo4SjUbLBsFNiUSCWCzG6uqq2yVfAv9CNKHTlNlbKgLEsqxrwF+BX+nnhoaGuHPnDv39/WXPRyFtbW1x9+5dNjY2TKePgBXgOwQUFUyg3lJ2IJZl9QAfAK1qek9PD9PT04yMjJT1970qHo8zPz/P7u6ufuoE+CewQw6Kw2OCsGVZgViW9SdgFNGLBqC1tZWZmRnGx8eJRMI5lJZOp1lZWWFubo7j42P1VAZR4W8gWmJn5KBAAEVYWYBkm7PvIvoWtjo7O1lYWKCvry/w3yyHtre3mZqaYn9/Xz/1EPg3ot+iQslQIpTAgWRh/A0x5GFrYGCAWCxGe7trKzeUSiaTRKNRHjx4oJ/6CvgHoigLDEo5yox30WCMjY2xtLRUczAA2tvbWVpaYmxsTD91E3gbMbTTBFxCFM0WYPntMwXqIdk64x3lM9FolMnJycB+o5paXFwkFovplfcniDrlNLvJXr4vTwnMQ7KtqVE1rZ5gAExOThKNRvXkPyMGQaWXlOQpgQDJ9jM+QGlNjY2N1RUMqcnJSb34shClwnVE8aVCAY9QSi6ysj3wv6N0+gYGBlhaWqKlpaWke4dVqVSK27dv6xX9j8AyYpDyGaL4svsqxdo5CA95DwVGZ2cnsVisbmEAtLS0EIvF6OzsVJNfQIzRlVTJlwQkO1Boj021traysLBQk60pr2pvb2dhYYHWVscAxEuI1pcKJYIHKKV6yFvqh5mZmZrp9AWhvr4+ZmZm9OQ3MAMpSr6BZOcz7CH0np4exsfH/d6uZjU+Pk5Pj6PbdR34LT69xBeQbG/8TTVteno6tGNT5VQkEmF6elpPfh24TK7VFaFIKH4t+BrKTN/Q0FDoRm0rqZGREYaGhtSkXyDqVs9Fl2cg2QUJw2ranTt3vN6m7mSwwR8R68dULzm31eXHQwZRFiSMjo5WfXIpDOrv72d01DFQcQXoQ3hI0V7iB8gr9pcjEdNQwoVVNBrV69EXcanccfEST0Cyi9jsSe/BwcGKz4GHWd3d3QwOOqaAOoDnMFfuRnn1kJfV7wwPD3v8ev1Ls4mF+Ac2FVsW5C8aLxpI9ou/U9Nu3brlOcP1LoNNbuJej+R5ihcPaQJ+Iz/09vY2iiuDuru76e3tVZN+jeiTyFHggsWWFyA9KAufL3K/4zxptrkE3MClYkcDUxQQU3HVAOIug226yHlIXvNXrUe8eEiHPGhra2v0PQqov7+ftrY2NekFzEVWSXWI3Rns6uoq6ZGyepdlWXR1dalJrRTwEFVegFyVB3L5f0Pu0mzUirC1CsPoJcUCuYLyGFkDyPnSbBQhB8VUZNm99nOBZC+8qqZdhBnBUmWw0RXMQHx5iOPpprB5yMbGBp999lm1s+GQwUZXKFBUSRULxOEhYQNy//59Hj58WO1sOOQCpGAfBOoESBhVwENMm61in/cOXRt3f3+f09NTAH766SdaWlrY29sDoLm5mevXr1cze25y9QypYoH8rH44PDwsIU/B6KOPPrLzcXBwQCQS4dNPPwXgxo0bfPzxx9XMnslGJ7h7hkX2GZOaBRKLxezjxcVFLl++zMTERBVz5JTBRseGy3zXIaEDEna5eAgENIX7WP2QTCaL/NrFlcFG0kMKLvIttsh6ilg83ATh85D3338/dGNrmo3SiAXYuvLgeImX9Rj4peHHqq5r165VOwt50mx0gjkqhJT92cvgol2P7O3thSa+VBiVyWTsJnhWsv4wBrZR5QWIjfzo6IitrS0vebxQ2tra0oPdPCbfQ4ze4gXII/VDPB73k9cLIYNtDnACUJ9td8gLkF2UiqkBxF2abc6AJOboD3lQzgWi1BWnCCgA7OzskEgk/Oa5bpVIJPTwT9+RCymoe4jvIkt+8Qs1cW1tzVem61kGm8jiKk1+gIE8eV25+Ihc3CjW19c9fr3+pdkkgwCiwsiL+oDyUKhXIE8QISUA2NzcbBRbihKJBJubm2rSD4h4KLLuOMMQRUiVn9XvdrGVTqcdg3wXXbFYTI9Op3qHuqlQHCoKSNadJNH7KGNbq6urjT4Jou+hRaVLIUoTE4zA6hD5Q5+oCXfv3vVxm/qSwQY7iG6C9BAZByWv6auOevgBIr3ke5mwsbFxofsl8XhcDw34BPgaYXg1KI0p6JlDRQPRiq0zRGQ1W/Pz827RPeta6XSa+fl5Pfl/5LxC3QrCAP9P4WYQcW2/kQm7u7usrKz4vF3tamVlRY/P+CPwLTlvcANiDN/kCYjiJXLv6AXNzc2xvb3t5ZY1re3tbebm5vRk2Vc7JReExgTDqFI8JIMIMvylTDw+PmZqaupCzCgmk0mmpqb0IJkHiLpV9Ypn5MA4oJimMDwD0eqSDCLIsD3WvL+/TzQaJZVKeb11zSiVShGNRvXgmE+Az8kVU8+UrSjvgNKCz8jxmaeIIMNyEoYHDx4wOztbwq3DrdnZWT1W1imi5XmCE0YKlyLLbYLPFxDlZhLKd4ggw/aJe/fusbi46Of2odbi4iL37t1TkzLAfxAzqmc4PcPkIQVVqofIfRrREVpXL4jFYnUFRQbB1PQIMZsqYaSUraiWlaqSQvxlV3rIFd2XEIsm/gL8Qb1ubGyMDz/8sGajzKVSKWZnZ3XPANHs/xxh+BSiyDrObifkirCiiisIDogK5TIwjvY6ijoMpHwEbCJAPCMHQIWhxl4sKmxsEEEwwQmlCQHlbeBV9do6CjX+DbBNDobqHSYYRQfCLDnimKEZfJbN0CpiENLOxf7+PhMTEywvL4d6mCWdTrO8vMzExIQOI4Pod31OPowTzHWHpz80kMjWyqpB6SXSU5oRQYbfARwVSA2+ruIU0ZrSK/ATnEBky8oxqlusnQMLNa4VXRa5Sr4JEYdwDPG8tkM18kKXJ+TmgWQ/Q3qDDsNTJa4r6NjvkA/lEsJTnkdEMX3J9N0Qv/LoAFFEyRaTbFFJGPK4ZBhQntdVgDuUZkTr6w2E1zgUspeC/YjoY3yPczgkZdhk568kGFC+F7qAE4qsU2S90owIpfo6ImCkUVV6bd4TxHzGtzgnmNThEN0rHK0pSngFUtleeeQCRa1XmhHN41eBAcRDka6qwIslU4jRhq/Jn8tQh0HUitttWtb3YvRyv4MKck8MyUeCZRGmeosMGPkiIshNpR72yCCW6hwgFiTI1pE0tDS6abDQ87BIMarEW9rAGUFNNot1MHL/HCIs3k1E8K9LAWfpDDEYepDd5Lopdc5b9Qx9r14nx/EgABhQASCQ109RizAdjApH9vhvIOJNvYCIFyJjhhSjNLlm6WMEgCS5tbbqAjbTlKsKwwTCHmCtmfcY2j/khCL3auwPNXyRGqOwifzQRq2IYk7dwDl8cYwwpjoqrRrSDYYKpdCaqpLrC5Oq8S5c+xCzx+hwTJtbEBdT3aMbUBpVXWvrtsnz+op1CNArVFXlbdEu3mICowJS9+cBsR/Exx2IaQG0af1tHggI1itUVft96vahsi/kOabPxQCRe93IaW3TAVQMhFRVgdiZMIORexOgQiDkXv3DdAObPMYIgAqBkAoFECmtJ+4Gp9Ax2rEORe51w+sQ7OOK17FhAqLKBY567AbBTSY4rsfVsktogagqACfvUpd0tz/SkR4GW9QEEFVBhtAI499ec0DqXf8H8f4X10jf2YAAAAAASUVORK5CYII=);
-  display: none;
-}
-</style><template id="tr-ui-e-chrome-cc-layer-tree-quad-stack-view-template">
-  <img id="input-event"/>
-</template><style>
-* /deep/ tr-ui-e-chrome-cc-layer-view{-webkit-flex-direction:column;display:-webkit-flex;left:0;position:relative;top:0}* /deep/ tr-ui-e-chrome-cc-layer-view>tr-ui-e-chrome-cc-layer-tree-quad-stack-view{-webkit-flex:1 1 100%;-webkit-flex-direction:column;min-height:0;display:-webkit-flex;width:100%}* /deep/tr-ui-e-chrome-cc- layer-view>tr-ui-e-chrome-cc-layer-view-analysis{height:150px;overflow-y:auto}* /deep/ tr-ui-e-chrome-cc-layer-view>tr-ui-e-chrome-cc-layer-view-analysis *{-webkit-user-select:text}
-</style><style>
-* /deep/ .tr-ui-e-chrome-cc-lthi-s-view{-webkit-flex:1 1 auto!important;-webkit-flex-direction:row;display:-webkit-flex}* /deep/ .tr-ui-e-chrome-cc-lthi-s-view>tr-ui-e-chrome-cc-layer-picker{-webkit-flex:1 1 auto}* /deep/ .tr-ui-e-chrome-cc-lthi-s-view>x-drag-handle{-webkit-flex:0 0 auto}
-</style><style>
-* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-summary-view{-webkit-flex:0 0 auto;font-size:0;margin:0;min-height:200px;min-width:200px;overflow:hidden;padding:0}* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-summary-view.hidden{display:none}
-</style><style>
-* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-view{display:block;height:180px;margin:0;padding:0;position:relative}* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-view>.use-percentile-scale{left:0;position:absolute;top:0}
-</style><template id="tr-ui-e-chrome-cc-picture-debugger-template">
-  <style>
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger {
-    -webkit-flex: 1 1 auto;
-    -webkit-flex-direction: row;
-    display: -webkit-flex;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger > tr-ui-a-generic-object-view {
-    -webkit-flex-direction: column;
-    display: -webkit-flex;
-    width: 400px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel {
-    -webkit-flex-direction: column;
-    display: -webkit-flex;
-    min-width: 300px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel > picture-info {
-    -webkit-flex: 0 0 auto;
-    padding-top: 2px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel >
-        picture-info .title {
-    font-weight: bold;
-    margin-left: 5px;
-    margin-right: 5px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger > x-drag-handle {
-    -webkit-flex: 0 0 auto;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger .filename {
-    -webkit-user-select: text;
-    margin-left: 5px;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger > right-panel {
-    -webkit-flex: 1 1 auto;
-    -webkit-flex-direction: column;
-    display: -webkit-flex;
-  }
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger > right-panel >
-        tr-ui-e-chrome-cc-picture-ops-chart-view {
-    min-height: 150px;
-    min-width : 0;
-    overflow-x: auto;
-    overflow-y: hidden;
-  }
-
-  /*************************************************/
-
-  * /deep/ tr-ui-e-chrome-cc-picture-debugger raster-area {
-    background-color: #ddd;
-    min-height: 200px;
-    min-width: 200px;
-    overflow-y: auto;
-    padding-left: 5px;
-  }
-  </style>
-
-  <left-panel>
-    <picture-info>
-      <div>
-        <span class="title">Skia Picture</span>
-        <span class="size"></span>
-      </div>
-      <div>
-        <input class="filename" type="text" value="skpicture.skp"/>
-        <button class="export">Export</button>
-      </div>
-    </picture-info>
-  </left-panel>
-  <right-panel>
-    <tr-ui-e-chrome-cc-picture-ops-chart-view>
-    </tr-ui-e-chrome-cc-picture-ops-chart-view>
-    <raster-area><canvas></canvas></raster-area>
-  </right-panel>
-</template><style>
-* /deep/ .tr-ui-e-chrome-cc-picture-snapshot-view{-webkit-flex:0 1 auto!important;display:-webkit-flex}
-</style><polymer-element name="tr-ui-e-chrome-cc-raster-task-view">
+</polymer-element><polymer-element name="tr-ui-b-grouping-table">
   <template>
     <style>
     :host {
       display: flex;
-      flex-direction: column;
     }
-    #heading {
-      flex: 0 0 auto;
+    #table {
+      flex: 1 1 auto;
     }
     </style>
-
-    <div id="heading">
-      Rasterization costs in
-      <tr-ui-a-analysis-link id="link"></tr-ui-a-analysis-link>
-    </div>
-    <tr-ui-b-table id="content"></tr-ui-b-table>
-  </template>
-
-  
-</polymer-element><style>
-.tr-ui-e-chrome-gpu-state-snapshot-view{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAEwATABMYqp3KAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB90JCQsBMCH7ZqYAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAUElEQVRYw+3WwQkAIAiF4Vc0hTO5/wiuURvYIcQOv1cRPhDlDXffSsrMsrYiQi/zU80FAACAVX3nt3lWAABA/x+ovnPyAAAA5AHyAAAA3wMOd34Xd+lsglgAAAAASUVORK5CYII=);display:-webkit-flex;overflow:auto}.tr-ui-e-chrome-gpu-state-snapshot-view img{display:block;margin:16px auto 16px auto}
-</style><style>
-.tr-ui-e-system-stats-snapshot-view .subhead{font-size:small;padding-bottom:10px}.tr-ui-e-system-stats-snapshot-view ul{background-position:0 5px;background-repeat:no-repeat;cursor:pointer;font-family:monospace;list-style:none;margin:0;padding-left:15px}.tr-ui-e-system-stats-snapshot-view li{background-position:0 5px;background-repeat:no-repeat;cursor:pointer;list-style:none;margin:0;padding-left:15px}
-</style><style>
-.tr-ui-e-system-stats-instance-track{height:500px}.tr-ui-e-system-stats-instance-track ul{list-style:none;list-style-position:outside;margin:0;overflow:hidden}
-</style><style>
-.tr-ui-e-tcmalloc-instance-view .subhead{font-size:small;padding-bottom:10px}.tr-ui-e-tcmalloc-instance-view #args{white-space:pre}.tr-ui-e-tcmalloc-instance-view #snapshots>*{display:block}.tr-ui-e-tcmalloc-instance-view{overflow:auto}.tr-ui-e-tcmalloc-instance-view *{-webkit-user-select:text}.tr-ui-e-tcmalloc-instance-view .title{border-bottom:1px solid rgb(128,128,128);font-size:110%;font-weight:bold}.tr-ui-e-tcmalloc-instance-view td,.tr-ui-e-tcmalloc-instance-view th{font-size:small;text-align:right}
-</style><style>
-.tr-ui-e-tcmalloc-heap-snapshot-view .subhead{font-size:small;padding-bottom:10px}.tr-ui-e-tcmalloc-heap-snapshot-view ul{background-position:0 5px;background-repeat:no-repeat;cursor:pointer;font-family:monospace;list-style:none;margin:0;padding-left:15px}.tr-ui-e-tcmalloc-heap-snapshot-view li{background-position:0 5px;background-repeat:no-repeat;cursor:pointer;list-style:none;margin:0;padding-left:15px}.tr-ui-e-tcmalloc-heap-snapshot-view .collapsed{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAVVVVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASd3+7gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAZdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjbQg61aAAAAGklEQVQYV2P4//8/IyOQYMBkMEIBA5yBWzEAD3Mj+VR5R78AAAAASUVORK5CYII=)}.tr-ui-e-tcmalloc-heap-snapshot-view .expanded{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAABl0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuNtCDrVoAAAAoSURBVChTY2CgKggNDVUHYnsUQ4EC//FhBoIKkI0DKlYAYhmqupsBAMwgJH8K5nKoAAAAAElFTkSuQmCC)}.tr-ui-e-tcmalloc-heap-snapshot-view .trace-bytes{display:inline-block;padding-right:10px;text-align:right;width:80px}.tr-ui-e-tcmalloc-heap-snapshot-view .trace-allocs{display:inline-block;padding-right:10px;text-align:right;width:120px}.tr-ui-e-tcmalloc-heap-snapshot-view .trace-name{display:inline-block}
-</style><style>
-.tr-ui-e-tcmalloc-heap-instance-track{height:150px}.tr-ui-e-tcmalloc-heap-instance-track ul{list-style:none;list-style-position:outside;margin:0;overflow:hidden}
-</style><polymer-element extends="tr-ui-side-panel" name="tr-ui-e-s-category-summary-side-panel">
-  <template>
-    <style>
-    :host {
-      display: block;
-      width: 450px;
-      overflow-x: auto;
-    }
-    </style>
-
     <tr-ui-b-table id="table"></tr-ui-b-table>
   </template>
-
-  
-</polymer-element><polymer-element extends="tr-ui-side-panel" name="tr-ui-e-s-input-latency-side-panel">
+</polymer-element><polymer-element name="tr-ui-b-grouping-table-groupby-picker">
   <template>
     <style>
     :host {
-      flex-direction: column;
       display: flex;
+      flex-direction: row;
+      align-items: center;
     }
-    toolbar {
-      flex: 0 0 auto;
-      border-bottom: 1px solid black;
+    groups {
+      -webkit-user-select: none;
       display: flex;
+      flex-direction: row;
+      padding-left: 10px;
     }
-    result-area {
-      flex: 1 1 auto;
-      display: block;
-      min-height: 0;
-      overflow-y: auto;
-    }
-    </style>
 
-    <toolbar id="toolbar"></toolbar>
-    <result-area id="result_area"></result-area>
-  </template>
-
-  
-</polymer-element><style>
-* /deep/ .pie-chart .arc-text{font-size:8pt}* /deep/ .pie-chart .label{font-size:10pt}* /deep/ .pie-chart polyline{fill:none;stroke:black}
-</style><polymer-element extends="tr-ui-side-panel" name="tr-ui-e-s-time-summary-side-panel">
-  <template>
-    <style>
-    :host {
-      flex-direction: column;
-      display: flex;
-    }
-    toolbar {
-      flex: 0 0 auto;
-      border-bottom: 1px solid black;
-      display: flex;
-    }
-    result-area {
-      flex: 1 1 auto;
-      display: block;
-      min-height: 0;
-      overflow-y: auto;
-    }
-    </style>
-
-    <toolbar id="toolbar"></toolbar>
-    <result-area id="result_area"></result-area>
-  </template>
-
-  
-</polymer-element><polymer-element name="tr-ui-e-rail-rail-score-span">
-  <template>
-  <style>
-    :host {
+    group, possible-group {
       display: span;
+      padding-right: 10px;
+      padding-left: 10px;
     }
-  </style>
-  <span id="content">
-    <span>RAIL Score: </span><span id="score"></span>
-  </span>
+
+    group {
+      border-left: 1px solid rgba(0,0,0,0);
+      cursor: move;
+    }
+
+    group.dragging {
+      opacity: 0.2;
+    }
+
+    group.drop-targeted {
+      border-left: 1px solid black;
+    }
+
+
+    #remove {
+      cursor: default;
+    }
+
+    #remove:not([hovered]) {
+      visibility: hidden;
+    }
+    </style>
+    <groups>
+    </groups>
+    <tr-ui-b-dropdown id="add-group"></tr-ui-b-dropdown>
   </template>
-  
-</polymer-element><polymer-element extends="tr-ui-side-panel" name="tr-ui-e-rail-rail-score-side-panel">
+</polymer-element><template id="tr-ui-b-grouping-table-groupby-picker-group-template">
+  <span id="key"></span>
+  <span id="remove">×</span>
+</template><polymer-element extends="tr-ui-side-panel" name="tr-ui-sp-file-size-stats-side-panel">
   <template>
     <style>
     :host {
       display: flex;
       flex-direction: column;
-      width: 450px;
-      overflow-x: auto;
+      width: 600px;
     }
-
-    #score {
-      background-color: rgb(236, 236, 236)
-      flex: 0 0 auto;
-    }
-
-    #content {
-      min-width: 0;
-      flex-direction: column;
+    toolbar {
+      align-items: center;
+      background-color: rgb(236, 236, 236);
+      border-bottom: 1px solid #8e8e8e;
       display: flex;
-      flex: 1 1 auto;
+      flex-direction: row;
+      flex-direction: row;
+      flex: 0 0 auto;
+      font-size: 12px;
+      padding: 0 10px 0 10px;
     }
-
-    #coverage {
-      font-size: 10px;
+    table-container {
+      display: flex;
+      min-height: 0px;
+      overflow-y: auto;
     }
     </style>
 
-    <tr-ui-e-rail-rail-score-span id="score"></tr-ui-e-rail-rail-score-span>
-    <tr-ui-b-table id="table"></tr-ui-b-table>
-
-    <div id="coverage">
-      <b>Coverage:</b><br/>
-      <tr-ui-a-analysis-link id="associated-events"></tr-ui-a-analysis-link><br/>
-      <tr-ui-a-analysis-link id="unassociated-events"></tr-ui-a-analysis-link>
-    </div>
-    <button id="test">Create Test</button>
+    <toolbar>
+      <span><b>Group by:</b></span>
+      <tr-ui-b-grouping-table-groupby-picker id="picker">
+      </tr-ui-b-grouping-table-groupby-picker>
+    </toolbar>
+    <table-container>
+      <tr-ui-b-grouping-table id="table"></tr-ui-b-grouping-table>
+    </table-container>
   </template>
 </polymer-element><polymer-element extends="tr-ui-side-panel" name="tr-ui-e-s-alerts-side-panel">
   <template>
@@ -2792,7 +2937,11 @@
 function findFirstKeyInDictMatching(dict,opt_func,opt_this){var func=opt_func||identity;for(var key in dict){if(func.call(opt_this,key,dict[key]))
 return key;}
 return undefined;}
-return{asArray:asArray,concatenateArrays:concatenateArrays,concatenateObjects:concatenateObjects,compareArrays:compareArrays,comparePossiblyUndefinedValues:comparePossiblyUndefinedValues,compareNumericWithNaNs:compareNumericWithNaNs,dictionaryLength:dictionaryLength,dictionaryKeys:dictionaryKeys,dictionaryValues:dictionaryValues,dictionaryContainsValue:dictionaryContainsValue,group:group,iterItems:iterItems,mapItems:mapItems,filterItems:filterItems,iterObjectFieldsRecursively:iterObjectFieldsRecursively,invertArrayOfDicts:invertArrayOfDicts,arrayToDict:arrayToDict,identity:identity,findFirstIndexInArray:findFirstIndexInArray,findFirstInArray:findFirstInArray,findFirstKeyInDictMatching:findFirstKeyInDictMatching};});'use strict';tr.exportTo('tr.b',function(){function EventTarget(){}
+function mapValues(map){var values=[];for(var value of map.values())
+values.push(value);return values;}
+function iterMapItems(map,fn,opt_this){opt_this=opt_this||this;for(var key of map.keys())
+fn.call(opt_this,key,map.get(key));}
+return{asArray:asArray,concatenateArrays:concatenateArrays,concatenateObjects:concatenateObjects,compareArrays:compareArrays,comparePossiblyUndefinedValues:comparePossiblyUndefinedValues,compareNumericWithNaNs:compareNumericWithNaNs,dictionaryLength:dictionaryLength,dictionaryKeys:dictionaryKeys,dictionaryValues:dictionaryValues,dictionaryContainsValue:dictionaryContainsValue,group:group,iterItems:iterItems,mapItems:mapItems,filterItems:filterItems,iterObjectFieldsRecursively:iterObjectFieldsRecursively,invertArrayOfDicts:invertArrayOfDicts,arrayToDict:arrayToDict,identity:identity,findFirstIndexInArray:findFirstIndexInArray,findFirstInArray:findFirstInArray,findFirstKeyInDictMatching:findFirstKeyInDictMatching,mapValues:mapValues,iterMapItems:iterMapItems};});'use strict';tr.exportTo('tr.b',function(){function EventTarget(){}
 EventTarget.decorate=function(target){for(var k in EventTarget.prototype){if(k=='decorate')
 continue;var v=EventTarget.prototype[k];if(typeof v!=='function')
 continue;target[k]=v;}};EventTarget.prototype={addEventListener:function(type,handler){if(!this.listeners_)
@@ -2808,7 +2957,9 @@
 continue;var v=EventTargetHelper[k];if(typeof v!=='function')
 continue;target[k]=v;}
 target.listenerCounts_={};},addEventListener:function(type,listener,useCapture){this.__proto__.addEventListener.call(this,type,listener,useCapture);if(this.listenerCounts_[type]===undefined)
-this.listenerCounts_[type]=0;this.listenerCounts_[type]++;},removeEventListener:function(type,listener,useCapture){this.__proto__.removeEventListener.call(this,type,listener,useCapture);this.listenerCounts_[type]--;},hasEventListener:function(type){return this.listenerCounts_[type]>0;}};return{EventTarget:EventTarget,EventTargetHelper:EventTargetHelper};});'use strict';tr.exportTo('tr.b',function(){function RegisteredTypeInfo(constructor,metadata){this.constructor=constructor;this.metadata=metadata;};var BASIC_REGISTRY_MODE='BASIC_REGISTRY_MODE';var TYPE_BASED_REGISTRY_MODE='TYPE_BASED_REGISTRY_MODE';var ALL_MODES={BASIC_REGISTRY_MODE:true,TYPE_BASED_REGISTRY_MODE:true};function ExtensionRegistryOptions(mode){if(mode===undefined)
+this.listenerCounts_[type]=0;this.listenerCounts_[type]++;},removeEventListener:function(type,listener,useCapture){this.__proto__.removeEventListener.call(this,type,listener,useCapture);this.listenerCounts_[type]--;},hasEventListener:function(type){return this.listenerCounts_[type]>0;}};return{EventTarget:EventTarget,EventTargetHelper:EventTargetHelper};});'use strict';tr.exportTo('tr.b',function(){var Event;if(tr.isHeadless){function HeadlessEvent(type,opt_bubbles,opt_preventable){this.type=type;this.bubbles=(opt_bubbles!==undefined?!!opt_bubbles:false);this.cancelable=(opt_preventable!==undefined?!!opt_preventable:false);this.defaultPrevented=false;this.cancelBubble=false;};HeadlessEvent.prototype={preventDefault:function(){this.defaultPrevented=true;},stopPropagation:function(){this.cancelBubble=true;}};Event=HeadlessEvent;}else{function TrEvent(type,opt_bubbles,opt_preventable){var e=tr.doc.createEvent('Event');e.initEvent(type,!!opt_bubbles,!!opt_preventable);e.__proto__=global.Event.prototype;return e;};TrEvent.prototype={__proto__:global.Event.prototype};Event=TrEvent;}
+function dispatchSimpleEvent(target,type,opt_bubbles,opt_cancelable){var e=new tr.b.Event(type,opt_bubbles,opt_cancelable);return target.dispatchEvent(e);}
+return{Event:Event,dispatchSimpleEvent:dispatchSimpleEvent};});'use strict';tr.exportTo('tr.b',function(){function RegisteredTypeInfo(constructor,metadata){this.constructor=constructor;this.metadata=metadata;};var BASIC_REGISTRY_MODE='BASIC_REGISTRY_MODE';var TYPE_BASED_REGISTRY_MODE='TYPE_BASED_REGISTRY_MODE';var ALL_MODES={BASIC_REGISTRY_MODE:true,TYPE_BASED_REGISTRY_MODE:true};function ExtensionRegistryOptions(mode){if(mode===undefined)
 throw new Error('Mode is required');if(!ALL_MODES[mode])
 throw new Error('Not a mode.');this.mode_=mode;this.defaultMetadata_={};this.defaultConstructor_=undefined;this.mandatoryBaseClass_=undefined;this.defaultTypeInfo_=undefined;this.frozen_=false;}
 ExtensionRegistryOptions.prototype={freeze:function(){if(this.frozen_)
@@ -2819,9 +2970,7 @@
 return;var curProto=constructor.prototype.__proto__;var ok=false;while(curProto){if(curProto===this.mandatoryBaseClass.prototype){ok=true;break;}
 curProto=curProto.__proto__;}
 if(!ok)
-throw new Error(constructor+'must be subclass of '+registry);}};return{BASIC_REGISTRY_MODE:BASIC_REGISTRY_MODE,TYPE_BASED_REGISTRY_MODE:TYPE_BASED_REGISTRY_MODE,ExtensionRegistryOptions:ExtensionRegistryOptions,RegisteredTypeInfo:RegisteredTypeInfo};});'use strict';tr.exportTo('tr.b',function(){var Event;if(tr.isHeadless){function HeadlessEvent(type,opt_bubbles,opt_preventable){this.type=type;this.bubbles=(opt_bubbles!==undefined?!!opt_bubbles:false);this.cancelable=(opt_preventable!==undefined?!!opt_preventable:false);this.defaultPrevented=false;this.cancelBubble=false;};HeadlessEvent.prototype={preventDefault:function(){this.defaultPrevented=true;},stopPropagation:function(){this.cancelBubble=true;}};Event=HeadlessEvent;}else{function TrEvent(type,opt_bubbles,opt_preventable){var e=tr.doc.createEvent('Event');e.initEvent(type,!!opt_bubbles,!!opt_preventable);e.__proto__=global.Event.prototype;return e;};TrEvent.prototype={__proto__:global.Event.prototype};Event=TrEvent;}
-function dispatchSimpleEvent(target,type,opt_bubbles,opt_cancelable){var e=new tr.b.Event(type,opt_bubbles,opt_cancelable);return target.dispatchEvent(e);}
-return{Event:Event,dispatchSimpleEvent:dispatchSimpleEvent};});'use strict';tr.exportTo('tr.b',function(){var RegisteredTypeInfo=tr.b.RegisteredTypeInfo;var ExtensionRegistryOptions=tr.b.ExtensionRegistryOptions;function decorateBasicExtensionRegistry(registry,extensionRegistryOptions){var savedStateStack=[];registry.registeredTypeInfos_=[];registry.register=function(constructor,opt_metadata){if(registry.findIndexOfRegisteredConstructor(constructor)!==undefined)
+throw new Error(constructor+'must be subclass of '+registry);}};return{BASIC_REGISTRY_MODE:BASIC_REGISTRY_MODE,TYPE_BASED_REGISTRY_MODE:TYPE_BASED_REGISTRY_MODE,ExtensionRegistryOptions:ExtensionRegistryOptions,RegisteredTypeInfo:RegisteredTypeInfo};});'use strict';tr.exportTo('tr.b',function(){var RegisteredTypeInfo=tr.b.RegisteredTypeInfo;var ExtensionRegistryOptions=tr.b.ExtensionRegistryOptions;function decorateBasicExtensionRegistry(registry,extensionRegistryOptions){var savedStateStack=[];registry.registeredTypeInfos_=[];registry.register=function(constructor,opt_metadata){if(registry.findIndexOfRegisteredConstructor(constructor)!==undefined)
 throw new Error('Handler already registered for '+constructor);extensionRegistryOptions.validateConstructor(constructor);var metadata={};for(var k in extensionRegistryOptions.defaultMetadata)
 metadata[k]=extensionRegistryOptions.defaultMetadata[k];if(opt_metadata){for(var k in opt_metadata)
 metadata[k]=opt_metadata[k];}
@@ -2831,7 +2980,9 @@
 throw new Error(constructor+' not registered');registry.registeredTypeInfos_.splice(foundIndex,1);var e=new tr.b.Event('registry-changed');registry.dispatchEvent(e);};registry.getAllRegisteredTypeInfos=function(){return registry.registeredTypeInfos_;};registry.findTypeInfo=function(constructor){var foundIndex=this.findIndexOfRegisteredConstructor(constructor);if(foundIndex!==undefined)
 return this.registeredTypeInfos_[foundIndex];return undefined;};registry.findTypeInfoMatching=function(predicate,opt_this){opt_this=opt_this?opt_this:undefined;for(var i=0;i<registry.registeredTypeInfos_.length;++i){var typeInfo=registry.registeredTypeInfos_[i];if(predicate.call(opt_this,typeInfo))
 return typeInfo;}
-return extensionRegistryOptions.defaultTypeInfo;};}
+return extensionRegistryOptions.defaultTypeInfo;};registry.findTypeInfoWithName=function(name){if(typeof(name)!=='string')
+throw new Error('Name is not a string.');var typeInfo=registry.findTypeInfoMatching(function(ti){return ti.constructor.name===name;});if(typeInfo)
+return typeInfo;return undefined;};}
 return{_decorateBasicExtensionRegistry:decorateBasicExtensionRegistry};});'use strict';tr.exportTo('tr.b',function(){var categoryPartsFor={};function getCategoryParts(category){var parts=categoryPartsFor[category];if(parts!==undefined)
 return parts;parts=category.split(',');categoryPartsFor[category]=parts;return parts;}
 return{getCategoryParts:getCategoryParts};});'use strict';tr.exportTo('tr.b',function(){var getCategoryParts=tr.b.getCategoryParts;var RegisteredTypeInfo=tr.b.RegisteredTypeInfo;var ExtensionRegistryOptions=tr.b.ExtensionRegistryOptions;function decorateTypeBasedExtensionRegistry(registry,extensionRegistryOptions){var savedStateStack=[];registry.registeredTypeInfos_=[];registry.categoryPartToTypeInfoMap_={};registry.typeNameToTypeInfoMap_={};registry.register=function(constructor,metadata){extensionRegistryOptions.validateConstructor(constructor);var typeInfo=new RegisteredTypeInfo(constructor,metadata||extensionRegistryOptions.defaultMetadata);typeInfo.typeNames=[];typeInfo.categoryParts=[];if(metadata&&metadata.typeName)
@@ -2851,39 +3002,32 @@
 if(registry.addEventListener===undefined)
 tr.b.EventTarget.decorate(registry);}
 return{decorateExtensionRegistry:decorateExtensionRegistry};});'use strict';tr.exportTo('tr.importer',function(){function Importer(){}
-Importer.prototype={__proto__:Object.prototype,isTraceDataContainer:function(){return false;},extractSubtraces:function(){return[];},importEvents:function(){},importSampleData:function(){},finalizeImport:function(){},joinRefs:function(){}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Importer;tr.b.decorateExtensionRegistry(Importer,options);Importer.findImporterFor=function(eventData){var typeInfo=Importer.findTypeInfoMatching(function(ti){return ti.constructor.canImport(eventData);});if(typeInfo)
+Importer.prototype={__proto__:Object.prototype,get importerName(){return'Importer';},isTraceDataContainer:function(){return false;},extractSubtraces:function(){return[];},importClockSyncMarkers:function(){},importEvents:function(){},importSampleData:function(){},finalizeImport:function(){}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Importer;tr.b.decorateExtensionRegistry(Importer,options);Importer.findImporterFor=function(eventData){var typeInfo=Importer.findTypeInfoMatching(function(ti){return ti.constructor.canImport(eventData);});if(typeInfo)
 return typeInfo.constructor;return undefined;};return{Importer:Importer};});'use strict';tr.exportTo('tr.e.importer.gcloud_trace',function(){function GcloudTraceImporter(model,eventData){this.importPriority=2;this.eventData_=eventData;}
 GcloudTraceImporter.canImport=function(eventData){if(typeof(eventData)!=='string'&&!(eventData instanceof String))
 return false;var normalizedEventData=eventData.slice(0,20).replace(/\s/g,'');if(normalizedEventData.length<14)
-return false;return normalizedEventData.slice(0,14)=='{"projectId":"';};GcloudTraceImporter.prototype={__proto__:tr.importer.Importer.prototype,extractSubtraces:function(){var traceEvents=this.createEventsForTrace();return traceEvents?[traceEvents]:[];},createEventsForTrace:function(){var events=[];var trace=JSON.parse(this.eventData_);var spanLength=trace.spans.length;for(var i=0;i<spanLength;i++){events.push(this.createEventForSpan(trace.traceId,trace.spans[i]));}
+return false;return normalizedEventData.slice(0,14)=='{"projectId":"';};GcloudTraceImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'GcloudTraceImporter';},extractSubtraces:function(){var traceEvents=this.createEventsForTrace();return traceEvents?[traceEvents]:[];},createEventsForTrace:function(){var events=[];var trace=JSON.parse(this.eventData_);var spanLength=trace.spans.length;for(var i=0;i<spanLength;i++){events.push(this.createEventForSpan(trace.traceId,trace.spans[i]));}
 return{'traceEvents':events};},createEventForSpan:function(traceId,span){var newArgs={};if(span.labels){newArgs=JSON.parse(JSON.stringify(span.labels));}
 newArgs['Span ID']=span.spanId;newArgs['Start Time']=span.startTime;newArgs['End Time']=span.endTime;if(span.parentSpanId){newArgs['Parent Span ID']=span.parentSpanId;}
-return{name:span.name,args:newArgs,pid:traceId,ts:Date.parse(span.startTime)*1000,dur:(Date.parse(span.endTime)-Date.parse(span.startTime))*1000,cat:'tracespan',tid:traceId,ph:'X'};}};tr.importer.Importer.register(GcloudTraceImporter);return{GcloudTraceImporter:GcloudTraceImporter};});'use strict';tr.exportTo('tr.b',function(){function max(a,b){if(a===undefined)
-return b;if(b===undefined)
-return a;return Math.max(a,b);}
-function IntervalTree(beginPositionCb,endPositionCb){this.beginPositionCb_=beginPositionCb;this.endPositionCb_=endPositionCb;this.root_=undefined;this.size_=0;}
-IntervalTree.prototype={insert:function(datum){var startPosition=this.beginPositionCb_(datum);var endPosition=this.endPositionCb_(datum);var node=new IntervalTreeNode(datum,startPosition,endPosition);this.size_++;this.root_=this.insertNode_(this.root_,node);this.root_.colour=Colour.BLACK;return datum;},insertNode_:function(root,node){if(root===undefined)
-return node;if(root.leftNode&&root.leftNode.isRed&&root.rightNode&&root.rightNode.isRed)
-this.flipNodeColour_(root);if(node.key<root.key)
-root.leftNode=this.insertNode_(root.leftNode,node);else if(node.key===root.key)
-root.merge(node);else
-root.rightNode=this.insertNode_(root.rightNode,node);if(root.rightNode&&root.rightNode.isRed&&(root.leftNode===undefined||!root.leftNode.isRed))
-root=this.rotateLeft_(root);if(root.leftNode&&root.leftNode.isRed&&root.leftNode.leftNode&&root.leftNode.leftNode.isRed)
-root=this.rotateRight_(root);return root;},rotateRight_:function(node){var sibling=node.leftNode;node.leftNode=sibling.rightNode;sibling.rightNode=node;sibling.colour=node.colour;node.colour=Colour.RED;return sibling;},rotateLeft_:function(node){var sibling=node.rightNode;node.rightNode=sibling.leftNode;sibling.leftNode=node;sibling.colour=node.colour;node.colour=Colour.RED;return sibling;},flipNodeColour_:function(node){node.colour=this.flipColour_(node.colour);node.leftNode.colour=this.flipColour_(node.leftNode.colour);node.rightNode.colour=this.flipColour_(node.rightNode.colour);},flipColour_:function(colour){return colour===Colour.RED?Colour.BLACK:Colour.RED;},updateHighValues:function(){this.updateHighValues_(this.root_);},updateHighValues_:function(node){if(node===undefined)
-return undefined;node.maxHighLeft=this.updateHighValues_(node.leftNode);node.maxHighRight=this.updateHighValues_(node.rightNode);return max(max(node.maxHighLeft,node.highValue),node.maxHighRight);},validateFindArguments_:function(queryLow,queryHigh){if(queryLow===undefined||queryHigh===undefined)
-throw new Error('queryLow and queryHigh must be defined');if((typeof queryLow!=='number')||(typeof queryHigh!=='number'))
-throw new Error('queryLow and queryHigh must be numbers');},findIntersection:function(queryLow,queryHigh){this.validateFindArguments_(queryLow,queryHigh);if(this.root_===undefined)
-return[];var ret=[];this.root_.appendIntersectionsInto_(ret,queryLow,queryHigh);return ret;},get size(){return this.size_;},get root(){return this.root_;},dump_:function(){if(this.root_===undefined)
-return[];return this.root_.dump();}};var Colour={RED:'red',BLACK:'black'};function IntervalTreeNode(datum,lowValue,highValue){this.lowValue_=lowValue;this.data_=[{datum:datum,high:highValue,low:lowValue}];this.colour_=Colour.RED;this.parentNode_=undefined;this.leftNode_=undefined;this.rightNode_=undefined;this.maxHighLeft_=undefined;this.maxHighRight_=undefined;}
-IntervalTreeNode.prototype={appendIntersectionsInto_:function(ret,queryLow,queryHigh){if(this.lowValue_>=queryHigh){if(!this.leftNode_)
-return;return this.leftNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}
-if(this.maxHighLeft_>queryLow){this.leftNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}
-if(this.highValue>queryLow){for(var i=(this.data.length-1);i>=0;--i){if(this.data[i].high<queryLow)
-break;ret.push(this.data[i].datum);}}
-if(this.rightNode_){this.rightNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}},get colour(){return this.colour_;},set colour(colour){this.colour_=colour;},get key(){return this.lowValue_;},get lowValue(){return this.lowValue_;},get highValue(){return this.data_[this.data_.length-1].high;},set leftNode(left){this.leftNode_=left;},get leftNode(){return this.leftNode_;},get hasLeftNode(){return this.leftNode_!==undefined;},set rightNode(right){this.rightNode_=right;},get rightNode(){return this.rightNode_;},get hasRightNode(){return this.rightNode_!==undefined;},set parentNode(parent){this.parentNode_=parent;},get parentNode(){return this.parentNode_;},get isRootNode(){return this.parentNode_===undefined;},set maxHighLeft(high){this.maxHighLeft_=high;},get maxHighLeft(){return this.maxHighLeft_;},set maxHighRight(high){this.maxHighRight_=high;},get maxHighRight(){return this.maxHighRight_;},get data(){return this.data_;},get isRed(){return this.colour_===Colour.RED;},merge:function(node){for(var i=0;i<node.data.length;i++)
-this.data_.push(node.data[i]);this.data_.sort(function(a,b){return a.high-b.high;});},dump:function(){var ret={};if(this.leftNode_)
-ret['left']=this.leftNode_.dump();ret['data']=this.data_.map(function(d){return[d.low,d.high];});if(this.rightNode_)
-ret['right']=this.rightNode_.dump();return ret;}};return{IntervalTree:IntervalTree};});'use strict';tr.exportTo('tr.b',function(){function Range(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;};Range.prototype={__proto__:Object.prototype,reset:function(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;},get isEmpty(){return this.isEmpty_;},addRange:function(range){if(range.isEmpty)
+return{name:span.name,args:newArgs,pid:traceId,ts:Date.parse(span.startTime)*1000,dur:(Date.parse(span.endTime)-Date.parse(span.startTime))*1000,cat:'tracespan',tid:traceId,ph:'X'};}};tr.importer.Importer.register(GcloudTraceImporter);return{GcloudTraceImporter:GcloudTraceImporter};});'use strict';tr.exportTo('tr.b',function(){function convertEventsToRanges(events){return events.map(function(event){return tr.b.Range.fromExplicitRange(event.start,event.end);});}
+function mergeRanges(inRanges,mergeThreshold,mergeFunction){var remainingEvents=inRanges.slice();remainingEvents.sort(function(x,y){return x.min-y.min;});if(remainingEvents.length<=1){var merged=[];if(remainingEvents.length==1){merged.push(mergeFunction(remainingEvents));}
+return merged;}
+var mergedEvents=[];var currentMergeBuffer=[];var rightEdge;function beginMerging(){currentMergeBuffer.push(remainingEvents[0]);remainingEvents.splice(0,1);rightEdge=currentMergeBuffer[0].max;}
+function flushCurrentMergeBuffer(){if(currentMergeBuffer.length==0)
+return;mergedEvents.push(mergeFunction(currentMergeBuffer));currentMergeBuffer=[];if(remainingEvents.length!=0)
+beginMerging();}
+beginMerging();while(remainingEvents.length){var currentEvent=remainingEvents[0];var distanceFromRightEdge=currentEvent.min-rightEdge;if(distanceFromRightEdge<mergeThreshold){rightEdge=Math.max(rightEdge,currentEvent.max);remainingEvents.splice(0,1);currentMergeBuffer.push(currentEvent);continue;}
+flushCurrentMergeBuffer();}
+flushCurrentMergeBuffer();return mergedEvents;}
+function findEmptyRangesBetweenRanges(inRanges,opt_totalRange){if(opt_totalRange&&opt_totalRange.isEmpty)
+opt_totalRange=undefined;var emptyRanges=[];if(!inRanges.length){if(opt_totalRange)
+emptyRanges.push(opt_totalRange);return emptyRanges;}
+inRanges=inRanges.slice();inRanges.sort(function(x,y){return x.min-y.min;});if(opt_totalRange&&(opt_totalRange.min<inRanges[0].min)){emptyRanges.push(tr.b.Range.fromExplicitRange(opt_totalRange.min,inRanges[0].min));}
+inRanges.forEach(function(range,index){for(var otherIndex=0;otherIndex<inRanges.length;++otherIndex){if(index===otherIndex)
+continue;var other=inRanges[otherIndex];if(other.min>range.max){emptyRanges.push(tr.b.Range.fromExplicitRange(range.max,other.min));return;}
+if(other.max>range.max){return;}}
+if(opt_totalRange&&(range.max<opt_totalRange.max)){emptyRanges.push(tr.b.Range.fromExplicitRange(range.max,opt_totalRange.max));}});return emptyRanges;}
+return{convertEventsToRanges:convertEventsToRanges,findEmptyRangesBetweenRanges:findEmptyRangesBetweenRanges,mergeRanges:mergeRanges};});'use strict';tr.exportTo('tr.b',function(){function Range(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;};Range.prototype={__proto__:Object.prototype,reset:function(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;},get isEmpty(){return this.isEmpty_;},addRange:function(range){if(range.isEmpty)
 return;this.addValue(range.min);this.addValue(range.max);},addValue:function(value){if(this.isEmpty_){this.max_=value;this.min_=value;this.isEmpty_=false;return;}
 this.max_=Math.max(this.max_,value);this.min_=Math.min(this.min_,value);},set min(min){this.isEmpty_=false;this.min_=min;},get min(){if(this.isEmpty_)
 return undefined;return this.min_;},get max(){if(this.isEmpty_)
@@ -2891,118 +3035,64 @@
 return undefined;return this.max_-this.min_;},get center(){return(this.min_+this.max_)*0.5;},get duration(){if(this.isEmpty_)
 return 0;return this.max_-this.min_;},equals:function(that){if(this.isEmpty&&that.isEmpty)
 return true;if(this.isEmpty!=that.isEmpty)
-return false;return this.min===that.min&&this.max===that.max;},containsRange:function(range){if(this.isEmpty||range.isEmpty)
-return false;return this.findIntersection(range).duration==range.duration;},containsExplicitRange:function(min,max){return this.containsRange(Range.fromExplicitRange(min,max));},intersectsRange:function(range){if(this.isEmpty||range.isEmpty)
-return false;return!this.findIntersection(range).isEmpty;},intersectsExplicitRange:function(min,max){return this.intersectsRange(Range.fromExplicitRange(min,max));},findIntersection:function(range){if(this.isEmpty||range.isEmpty)
+return false;return this.min===that.min&&this.max===that.max;},containsExplicitRangeInclusive:function(min,max){if(this.isEmpty)
+return false;return this.min_<=min&&max<=this.max_;},containsExplicitRangeExclusive:function(min,max){if(this.isEmpty)
+return false;return this.min_<min&&max<this.max_;},intersectsExplicitRangeInclusive:function(min,max){if(this.isEmpty)
+return false;return this.min_<=max&&min<=this.max_;},intersectsExplicitRangeExclusive:function(min,max){if(this.isEmpty)
+return false;return this.min_<max&&min<this.max_;},containsRangeInclusive:function(range){if(range.isEmpty)
+return false;return this.containsExplicitRangeInclusive(range.min_,range.max_);},containsRangeExclusive:function(range){if(range.isEmpty)
+return false;return this.containsExplicitRangeExclusive(range.min_,range.max_);},intersectsRangeInclusive:function(range){if(range.isEmpty)
+return false;return this.intersectsExplicitRangeInclusive(range.min_,range.max_);},intersectsRangeExclusive:function(range){if(range.isEmpty)
+return false;return this.intersectsExplicitRangeExclusive(range.min_,range.max_);},findIntersection:function(range){if(this.isEmpty||range.isEmpty)
 return new Range();var min=Math.max(this.min,range.min);var max=Math.min(this.max,range.max);if(max<min)
 return new Range();return Range.fromExplicitRange(min,max);},toJSON:function(){if(this.isEmpty_)
 return{isEmpty:true};return{isEmpty:false,max:this.max,min:this.min};},filterArray:function(array,opt_keyFunc,opt_this){if(this.isEmpty_)
-return[];function binSearch(test){var i0=0;var i1=array.length;while(i0<i1-1){var i=Math.trunc((i0+i1)/2);if(test(i))
+return[];function binSearch(test){var i0=0;var i1=array.length;while(i0<i1){var i=Math.trunc((i0+i1)/2);if(test(i))
 i1=i;else
-i0=i;}
+i0=i+1;}
 return i1;}
 var keyFunc=opt_keyFunc||tr.b.identity;function getValue(index){return keyFunc.call(opt_this,array[index]);}
 var first=binSearch(function(i){return this.min_===undefined||this.min_<=getValue(i);}.bind(this));var last=binSearch(function(i){return this.max_!==undefined&&this.max_<getValue(i);}.bind(this));return array.slice(first,last);}};Range.fromDict=function(d){if(d.isEmpty===true){return new Range();}else if(d.isEmpty===false){var range=new Range();range.min=d.min;range.max=d.max;return range;}else{throw new Error('Not a range');}};Range.fromExplicitRange=function(min,max){var range=new Range();range.min=min;range.max=max;return range;};Range.compareByMinTimes=function(a,b){if(!a.isEmpty&&!b.isEmpty)
 return a.min_-b.min_;if(a.isEmpty&&!b.isEmpty)
 return-1;if(!a.isEmpty&&b.isEmpty)
-return 1;return 0;};return{Range:Range};});'use strict';tr.exportTo('tr.b',function(){function addSingletonGetter(ctor){ctor.getInstance=function(){return ctor.instance_||(ctor.instance_=new ctor());};}
-function deepCopy(value){if(!(value instanceof Object)){if(value===undefined||value===null)
-return value;if(typeof value=='string')
-return value.substring();if(typeof value=='boolean')
-return value;if(typeof value=='number')
-return value;throw new Error('Unrecognized: '+typeof value);}
-var object=value;if(object instanceof Array){var res=new Array(object.length);for(var i=0;i<object.length;i++)
-res[i]=deepCopy(object[i]);return res;}
-if(object.__proto__!=Object.prototype)
-throw new Error('Can only clone simple types');var res={};for(var key in object){res[key]=deepCopy(object[key]);}
-return res;}
-function normalizeException(e){if(e===undefined||e===null){return{typeName:'UndefinedError',message:'Unknown: null or undefined exception',stack:'Unknown'};}
-if(typeof(e)=='string'){return{typeName:'StringError',message:e,stack:[e]};}
-var typeName;if(e.name){typeName=e.name;}else if(e.constructor){if(e.constructor.name){typeName=e.constructor.name;}else{typeName='AnonymousError';}}else{typeName='ErrorWithNoConstructor';}
-var msg=e.message?e.message:'Unknown';return{typeName:typeName,message:msg,stack:e.stack?e.stack:[msg]};}
-function stackTraceAsString(){return new Error().stack+'';}
-function stackTrace(){var stack=stackTraceAsString();stack=stack.split('\n');return stack.slice(2);}
-function getUsingPath(path,from_dict){var parts=path.split('.');var cur=from_dict;for(var part;parts.length&&(part=parts.shift());){if(!parts.length){return cur[part];}else if(part in cur){cur=cur[part];}else{return undefined;}}
-return undefined;}
-return{addSingletonGetter:addSingletonGetter,deepCopy:deepCopy,normalizeException:normalizeException,stackTrace:stackTrace,stackTraceAsString:stackTraceAsString,getUsingPath:getUsingPath};});'use strict';tr.exportTo('tr.b',function(){var recordRAFStacks=false;var pendingPreAFs=[];var pendingRAFs=[];var pendingIdleCallbacks=[];var currentRAFDispatchList=undefined;var rafScheduled=false;function scheduleRAF(){if(rafScheduled)
-return;rafScheduled=true;if(tr.isHeadless){Promise.resolve().then(function(){processRequests(0);},function(e){console.log(e.stack);throw e;});}else{if(window.requestAnimationFrame){window.requestAnimationFrame(processRequests);}else{var delta=Date.now()-window.performance.now();window.webkitRequestAnimationFrame(function(domTimeStamp){processRequests(domTimeStamp-delta);});}}}
-function onAnimationFrameError(e,opt_stack){console.log(e.stack);if(tr.isHeadless)
-throw e;if(opt_stack)
-console.log(opt_stack);if(e.message)
-console.error(e.message,e.stack);else
-console.error(e);}
-function runTask(task,frameBeginTime){try{task.callback.call(task.context,frameBeginTime);}catch(e){tr.b.onAnimationFrameError(e,task.stack);}}
-function processRequests(frameBeginTime){var rafCompletionDeadline=frameBeginTime+10;rafScheduled=false;var currentPreAFs=pendingPreAFs;currentRAFDispatchList=pendingRAFs;pendingPreAFs=[];pendingRAFs=[];var hasRAFTasks=currentPreAFs.length||currentRAFDispatchList.length;for(var i=0;i<currentPreAFs.length;i++)
-runTask(currentPreAFs[i],frameBeginTime);while(currentRAFDispatchList.length>0)
-runTask(currentRAFDispatchList.shift(),frameBeginTime);currentRAFDispatchList=undefined;if(!hasRAFTasks){while(pendingIdleCallbacks.length>0){runTask(pendingIdleCallbacks.shift());if(tr.isHeadless||window.performance.now()>=rafCompletionDeadline)
-break;}}
-if(pendingIdleCallbacks.length>0)
-scheduleRAF();}
-function getStack_(){if(!recordRAFStacks)
-return'';var stackLines=tr.b.stackTrace();stackLines.shift();return stackLines.join('\n');}
-function requestPreAnimationFrame(callback,opt_this){pendingPreAFs.push({callback:callback,context:opt_this||window,stack:getStack_()});scheduleRAF();}
-function requestAnimationFrameInThisFrameIfPossible(callback,opt_this){if(!currentRAFDispatchList){requestAnimationFrame(callback,opt_this);return;}
-currentRAFDispatchList.push({callback:callback,context:opt_this||window,stack:getStack_()});return;}
-function requestAnimationFrame(callback,opt_this){pendingRAFs.push({callback:callback,context:opt_this||window,stack:getStack_()});scheduleRAF();}
-function requestIdleCallback(callback,opt_this){pendingIdleCallbacks.push({callback:callback,context:opt_this||window,stack:getStack_()});scheduleRAF();}
-function forcePendingRAFTasksToRun(frameBeginTime){if(!rafScheduled)
-return;processRequests(frameBeginTime);}
-return{onAnimationFrameError:onAnimationFrameError,requestPreAnimationFrame:requestPreAnimationFrame,requestAnimationFrame:requestAnimationFrame,requestAnimationFrameInThisFrameIfPossible:requestAnimationFrameInThisFrameIfPossible,requestIdleCallback:requestIdleCallback,forcePendingRAFTasksToRun:forcePendingRAFTasksToRun};});'use strict';tr.exportTo('tr.b',function(){function Task(runCb,thisArg){if(runCb!==undefined&&thisArg===undefined)
-throw new Error('Almost certainly, you meant to pass a thisArg.');this.runCb_=runCb;this.thisArg_=thisArg;this.afterTask_=undefined;this.subTasks_=[];}
-Task.prototype={subTask:function(cb,thisArg){if(cb instanceof Task)
-this.subTasks_.push(cb);else
-this.subTasks_.push(new Task(cb,thisArg));return this.subTasks_[this.subTasks_.length-1];},run:function(){if(this.runCb_!==undefined)
-this.runCb_.call(this.thisArg_,this);var subTasks=this.subTasks_;this.subTasks_=undefined;if(!subTasks.length)
-return this.afterTask_;for(var i=1;i<subTasks.length;i++)
-subTasks[i-1].afterTask_=subTasks[i];subTasks[subTasks.length-1].afterTask_=this.afterTask_;return subTasks[0];},after:function(cb,thisArg){if(this.afterTask_)
-throw new Error('Has an after task already');if(cb instanceof Task)
-this.afterTask_=cb;else
-this.afterTask_=new Task(cb,thisArg);return this.afterTask_;},enqueue:function(cb,thisArg){var lastTask=this;while(lastTask.afterTask_)
-lastTask=lastTask.afterTask_;return lastTask.after(cb,thisArg);}};Task.RunSynchronously=function(task){var curTask=task;while(curTask)
-curTask=curTask.run();}
-Task.RunWhenIdle=function(task){return new Promise(function(resolve,reject){var curTask=task;function runAnother(){try{curTask=curTask.run();}catch(e){reject(e);console.error(e.stack);return;}
-if(curTask){tr.b.requestIdleCallback(runAnother);return;}
-resolve();}
-tr.b.requestIdleCallback(runAnother);});}
-return{Task:Task};});'use strict';tr.exportTo('tr.b',function(){function _iterateElementDeeplyImpl(element,cb,thisArg,includeElement){if(includeElement){if(cb.call(thisArg,element))
-return true;}
-if(element.shadowRoot){if(_iterateElementDeeplyImpl(element.shadowRoot,cb,thisArg,false))
-return true;}
-for(var i=0;i<element.children.length;i++){if(_iterateElementDeeplyImpl(element.children[i],cb,thisArg,true))
-return true;}}
-function iterateElementDeeply(element,cb,thisArg){_iterateElementDeeplyImpl(element,cb,thisArg,false);}
-function findDeepElementMatchingPredicate(element,predicate){var foundElement=undefined;function matches(element){var match=predicate(element);if(!match)
-return false;foundElement=element;return true;}
-iterateElementDeeply(element,matches);return foundElement;}
-function findDeepElementsMatchingPredicate(element,predicate){var foundElements=[];function matches(element){var match=predicate(element);if(match){foundElements.push(element);}
-return false;}
-iterateElementDeeply(element,matches);return foundElements;}
-function findDeepElementMatching(element,selector){return findDeepElementMatchingPredicate(element,function(element){return element.matches(selector);});}
-function findDeepElementsMatching(element,selector){return findDeepElementsMatchingPredicate(element,function(element){return element.matches(selector);});}
-function findDeepElementWithTextContent(element,re){return findDeepElementMatchingPredicate(element,function(element){if(element.children.length!==0)
-return false;return re.test(element.textContent);});}
-return{iterateElementDeeply:iterateElementDeeply,findDeepElementMatching:findDeepElementMatching,findDeepElementsMatching:findDeepElementsMatching,findDeepElementMatchingPredicate:findDeepElementMatchingPredicate,findDeepElementsMatchingPredicate:findDeepElementsMatchingPredicate,findDeepElementWithTextContent:findDeepElementWithTextContent};});'use strict';tr.exportTo('tr.b.u',function(){var msDisplayMode={scale:1e-3,suffix:'ms',roundedLess:function(a,b){return Math.round(a*1000)<Math.round(b*1000);},format:function(ts){return new Number(ts).toLocaleString(undefined,{minimumFractionDigits:3})+' ms';}};var nsDisplayMode={scale:1e-9,suffix:'ns',roundedLess:function(a,b){return Math.round(a*1000000)<Math.round(b*1000000);},format:function(ts){return new Number(ts*1000000).toLocaleString(undefined,{maximumFractionDigits:0})+' ns';}};var TimeDisplayModes={ns:nsDisplayMode,ms:msDisplayMode};return{TimeDisplayModes:TimeDisplayModes};});'use strict';tr.exportTo('tr.b.u',function(){var TimeDisplayModes=tr.b.u.TimeDisplayModes;function max(a,b){if(a===undefined)
-return b;if(b===undefined)
-return a;return a.scale>b.scale?a:b;}
-var Units={reset:function(){this.currentTimeDisplayMode=TimeDisplayModes.ms;},timestampFromUs:function(us){return us/1000;},maybeTimestampFromUs:function(us){return us===undefined?undefined:us/1000;},get currentTimeDisplayMode(){return this.currentTimeDisplayMode_;},set currentTimeDisplayMode(value){if(this.currentTimeDisplayMode_==value)
-return;this.currentTimeDisplayMode_=value;this.dispatchEvent(new tr.b.Event('display-mode-changed'));},didPreferredTimeDisplayUnitChange:function(){var largest=undefined;var els=tr.b.findDeepElementsMatching(document.body,'tr-ui-u-preferred-display-unit');els.forEach(function(el){largest=max(largest,el.preferredTimeDisplayMode);});this.currentDisplayUnit=largest===undefined?TimeDisplayModes.ms:largest;},unitsByJSONName:{},fromJSON:function(object){var u=this.unitsByJSONName[object];if(u){return u;}
-throw new Error('Unrecognized unit');}};tr.b.EventTarget.decorate(Units);Units.reset();Units.timeDurationInMs={asJSON:function(){return'ms';},format:function(value){return Units.currentTimeDisplayMode_.format(value);}};Units.unitsByJSONName['ms']=Units.timeDurationInMs;Units.timeStampInMs={asJSON:function(){return'tsMs';},format:function(value){return Units.currentTimeDisplayMode_.format(value);}};Units.unitsByJSONName['tsMs']=Units.timeStampInMs;Units.normalizedPercentage={asJSON:function(){return'n%';},format:function(value){var tmp=new Number(Math.round(value*100000)/1000);return tmp.toLocaleString(undefined,{minimumFractionDigits:3})+'%';}};Units.unitsByJSONName['n%']=Units.normalizedPercentage;var SIZE_UNIT_PREFIXES=['','Ki','Mi','Gi','Ti'];Units.sizeInBytes={asJSON:function(){return'sizeInBytes';},format:function(value){var signPrefix='';if(value<0){signPrefix='-';value=-value;}
-var i=0;while(value>=1024&&i<SIZE_UNIT_PREFIXES.length-1){value/=1024;i++;}
-return signPrefix+value.toFixed(1)+' '+SIZE_UNIT_PREFIXES[i]+'B';}};Units.unitsByJSONName['sizeInBytes']=Units.sizeInBytes;Units.energyInJoules={asJSON:function(){return'J';},format:function(value){return value.toLocaleString(undefined,{minimumFractionDigits:3})+' J';}};Units.unitsByJSONName['J']=Units.energyInJoules;Units.powerInWatts={asJSON:function(){return'W';},format:function(value){return(value*1000.0).toLocaleString(undefined,{minimumFractionDigits:3})+' mW';}};Units.unitsByJSONName['W']=Units.powerInWatts;Units.unitlessNumber={asJSON:function(){return'unitless';},format:function(value){return value.toLocaleString(undefined,{minimumFractionDigits:3,maximumFractionDigits:3});}};Units.unitsByJSONName['unitless']=Units.unitlessNumber;return{Units:Units};});'use strict';tr.exportTo('tr.c',function(){function Auditor(model){this.model_=model;}
-Auditor.prototype={__proto__:Object.prototype,get model(){return this.model_;},runAnnotate:function(){},runAudit:function(){}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Auditor;tr.b.decorateExtensionRegistry(Auditor,options);return{Auditor:Auditor};});'use strict';tr.exportTo('tr.c',function(){function makeCaseInsensitiveRegex(pattern){pattern=pattern.replace(/[.*+?^${}()|[\]\\]/g,'\\$&');return new RegExp(pattern,'i');}
-function Filter(){}
-Filter.prototype={__proto__:Object.prototype,matchCounter:function(counter){return true;},matchCpu:function(cpu){return true;},matchProcess:function(process){return true;},matchSlice:function(slice){return true;},matchThread:function(thread){return true;}};function TitleOrCategoryFilter(text){Filter.call(this);this.regex_=makeCaseInsensitiveRegex(text);if(!text.length)
-throw new Error('Filter text is empty.');}
-TitleOrCategoryFilter.prototype={__proto__:Filter.prototype,matchSlice:function(slice){if(slice.title===undefined&&slice.category===undefined)
-return false;return this.regex_.test(slice.title)||(!!slice.category&&this.regex_.test(slice.category));}};function ExactTitleFilter(text){Filter.call(this);this.text_=text;if(!text.length)
-throw new Error('Filter text is empty.');}
-ExactTitleFilter.prototype={__proto__:Filter.prototype,matchSlice:function(slice){return slice.title===this.text_;}};function FullTextFilter(text){Filter.call(this);this.regex_=makeCaseInsensitiveRegex(text);this.titleOrCategoryFilter_=new TitleOrCategoryFilter(text);}
-FullTextFilter.prototype={__proto__:Filter.prototype,matchObject_:function(obj){for(var key in obj){if(!obj.hasOwnProperty(key))
-continue;if(this.regex_.test(key))
-return true;if(this.regex_.test(obj[key]))
-return true;}
-return false;},matchSlice:function(slice){if(this.titleOrCategoryFilter_.matchSlice(slice))
-return true;return this.matchObject_(slice.args);}};return{Filter:Filter,TitleOrCategoryFilter:TitleOrCategoryFilter,ExactTitleFilter:ExactTitleFilter,FullTextFilter:FullTextFilter};});'use strict';tr.exportTo('tr.b.u',function(){function Scalar(value,unit){this.value=value;this.unit=unit;};Scalar.prototype={toString:function(){return this.unit.format(this.value);}};return{Scalar:Scalar};});'use strict';tr.exportTo('tr.b.u',function(){function TimeStamp(timestamp){tr.b.u.Scalar.call(this,timestamp,tr.b.u.Units.timeStampInMs);};TimeStamp.prototype={__proto__:tr.b.u.Scalar.prototype,get timestamp(){return this.value;}};TimeStamp.format=function(timestamp){return tr.b.u.Units.timeStampInMs.format(timestamp);};return{TimeStamp:TimeStamp};});'use strict';tr.exportTo('tr.b',function(){function clamp01(value){return Math.max(0,Math.min(1,value));}
+return 1;return 0;};return{Range:Range};});'use strict';tr.exportTo('tr.b',function(){function identity(d){return d;}
+function Statistics(){}
+Statistics.divideIfPossibleOrZero=function(numerator,denominator){if(denominator===0)
+return 0;return numerator/denominator;};Statistics.sum=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=0;for(var i=0;i<ary.length;i++)
+ret+=func.call(opt_this,ary[i],i);return ret;};Statistics.mean=function(ary,opt_func,opt_this){return Statistics.sum(ary,opt_func,opt_this)/ary.length;};Statistics.weightedMean=function(ary,weightCallback,opt_valueCallback,opt_this){var valueCallback=opt_valueCallback||identity;var numerator=0;var denominator=0;for(var i=0;i<ary.length;i++){var value=valueCallback.call(opt_this,ary[i],i);if(value===undefined)
+continue;var weight=weightCallback.call(opt_this,ary[i],i,value);numerator+=weight*value;denominator+=weight;}
+if(denominator===0)
+return undefined;return numerator/denominator;};Statistics.variance=function(ary,opt_func,opt_this){var func=opt_func||identity;var mean=Statistics.mean(ary,func,opt_this);var sumOfSquaredDistances=Statistics.sum(ary,function(d,i){var v=func.call(this,d,i)-mean;return v*v;},opt_this);return sumOfSquaredDistances/(ary.length-1);};Statistics.stddev=function(ary,opt_func,opt_this){return Math.sqrt(Statistics.variance(ary,opt_func,opt_this));};Statistics.max=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=-Infinity;for(var i=0;i<ary.length;i++)
+ret=Math.max(ret,func.call(opt_this,ary[i],i));return ret;};Statistics.min=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=Infinity;for(var i=0;i<ary.length;i++)
+ret=Math.min(ret,func.call(opt_this,ary[i],i));return ret;};Statistics.range=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=new tr.b.Range();for(var i=0;i<ary.length;i++)
+ret.addValue(func.call(opt_this,ary[i],i));return ret;};Statistics.percentile=function(ary,percent,opt_func,opt_this){if(!(percent>=0&&percent<=1))
+throw new Error('percent must be [0,1]');var func=opt_func||identity;var tmp=new Array(ary.length);for(var i=0;i<ary.length;i++)
+tmp[i]=func.call(opt_this,ary[i],i);tmp.sort();var idx=Math.floor((ary.length-1)*percent);return tmp[idx];};Statistics.clamp=function(value,opt_low,opt_high){opt_low=opt_low||0.0;opt_high=opt_high||1.0;return Math.min(Math.max(value,opt_low),opt_high);};Statistics.normalizeSamples=function(samples){if(samples.length===0){return{normalized_samples:samples,scale:1.0};}
+samples=samples.slice().sort(function(a,b){return a-b;});var low=Math.min.apply(null,samples);var high=Math.max.apply(null,samples);var new_low=0.5/samples.length;var new_high=(samples.length-0.5)/samples.length;if(high-low===0.0){samples=Array.apply(null,new Array(samples.length)).map(function(){return 0.5;});return{normalized_samples:samples,scale:1.0};}
+var scale=(new_high-new_low)/(high-low);for(var i=0;i<samples.length;i++){samples[i]=(samples[i]-low)*scale+new_low;}
+return{normalized_samples:samples,scale:scale};};Statistics.discrepancy=function(samples,opt_location_count){if(samples.length===0)
+return 0.0;var max_local_discrepancy=0;var inv_sample_count=1.0/samples.length;var locations=[];var count_less=[];var count_less_equal=[];if(opt_location_count!==undefined){var sample_index=0;for(var i=0;i<opt_location_count;i++){var location=i/(opt_location_count-1);locations.push(location);while(sample_index<samples.length&&samples[sample_index]<location){sample_index+=1;}
+count_less.push(sample_index);while(sample_index<samples.length&&samples[sample_index]<=location){sample_index+=1;}
+count_less_equal.push(sample_index);}}else{if(samples[0]>0.0){locations.push(0.0);count_less.push(0);count_less_equal.push(0);}
+for(var i=0;i<samples.length;i++){locations.push(samples[i]);count_less.push(i);count_less_equal.push(i+1);}
+if(samples[-1]<1.0){locations.push(1.0);count_less.push(samples.length);count_less_equal.push(samples.length);}}
+for(var i=0;i<locations.length;i++){for(var j=i+1;j<locations.length;j++){var length=locations[j]-locations[i];var count_closed=count_less_equal[j]-count_less[i];var local_discrepancy_closed=Math.abs(count_closed*inv_sample_count-length);var max_local_discrepancy=Math.max(local_discrepancy_closed,max_local_discrepancy);var count_open=count_less[j]-count_less_equal[i];var local_discrepancy_open=Math.abs(count_open*inv_sample_count-length);var max_local_discrepancy=Math.max(local_discrepancy_open,max_local_discrepancy);}}
+return max_local_discrepancy;};Statistics.timestampsDiscrepancy=function(timestamps,opt_absolute,opt_location_count){if(timestamps.length===0)
+return 0.0;if(opt_absolute===undefined)
+opt_absolute=true;if(Array.isArray(timestamps[0])){var range_discrepancies=timestamps.map(function(r){return Statistics.timestampsDiscrepancy(r);});return Math.max.apply(null,range_discrepancies);}
+var s=Statistics.normalizeSamples(timestamps);var samples=s.normalized_samples;var sample_scale=s.scale;var discrepancy=Statistics.discrepancy(samples,opt_location_count);var inv_sample_count=1.0/samples.length;if(opt_absolute===true){discrepancy/=sample_scale;}else{discrepancy=Statistics.clamp((discrepancy-inv_sample_count)/(1.0-inv_sample_count));}
+return discrepancy;};Statistics.durationsDiscrepancy=function(durations,opt_absolute,opt_location_count){if(durations.length===0)
+return 0.0;var timestamps=durations.reduce(function(prev,curr,index,array){prev.push(prev[prev.length-1]+curr);return prev;},[0]);return Statistics.timestampsDiscrepancy(timestamps,opt_absolute,opt_location_count);};Statistics.uniformlySampleStream=function(samples,streamLength,newElement,numSamples){if(streamLength<=numSamples){if(samples.length>=streamLength)
+samples[streamLength-1]=newElement;else
+samples.push(newElement);return;}
+var probToKeep=numSamples/streamLength;if(Math.random()>probToKeep)
+return;var index=Math.floor(Math.random()*numSamples);samples[index]=newElement;};Statistics.mergeSampledStreams=function(samplesA,streamLengthA,samplesB,streamLengthB,numSamples){if(streamLengthB<numSamples){var nbElements=Math.min(streamLengthB,samplesB.length);for(var i=0;i<nbElements;++i){Statistics.uniformlySampleStream(samplesA,streamLengthA+i+1,samplesB[i],numSamples);}
+return;}
+if(streamLengthA<numSamples){var nbElements=Math.min(streamLengthA,samplesA.length);var tempSamples=samplesB.slice();for(var i=0;i<nbElements;++i){Statistics.uniformlySampleStream(tempSamples,streamLengthB+i+1,samplesA[i],numSamples);}
+for(var i=0;i<tempSamples.length;++i){samplesA[i]=tempSamples[i];}
+return;}
+var nbElements=Math.min(numSamples,samplesB.length);var probOfSwapping=streamLengthB/(streamLengthA+streamLengthB);for(var i=0;i<nbElements;++i){if(Math.random()<probOfSwapping){samplesA[i]=samplesB[i];}}};return{Statistics:Statistics};});'use strict';tr.exportTo('tr.c',function(){function Auditor(model){this.model_=model;}
+Auditor.prototype={__proto__:Object.prototype,get model(){return this.model_;},runAnnotate:function(){},installUserFriendlyCategoryDriverIfNeeded:function(){},runAudit:function(){}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Auditor;tr.b.decorateExtensionRegistry(Auditor,options);return{Auditor:Auditor};});'use strict';tr.exportTo('tr.b',function(){function clamp01(value){return Math.max(0,Math.min(1,value));}
 function Color(opt_r,opt_g,opt_b,opt_a){this.r=Math.floor(opt_r)||0;this.g=Math.floor(opt_g)||0;this.b=Math.floor(opt_b)||0;this.a=opt_a;}
 Color.fromString=function(str){var tmp;var values;if(str.substr(0,4)=='rgb('){tmp=str.substr(4,str.length-5);values=tmp.split(',').map(function(v){return v.replace(/^\s+/,'','g');});if(values.length!=3)
 throw new Error('Malformatted rgb-expression');return new Color(parseInt(values[0]),parseInt(values[1]),parseInt(values[2]));}else if(str.substr(0,5)=='rgba('){tmp=str.substr(5,str.length-6);values=tmp.split(',').map(function(v){return v.replace(/^\s+/,'','g');});if(values.length!=4)
@@ -3025,7 +3115,7 @@
 h/=6;}
 return{h:h,s:s,l:l,a:this.a};},toStringWithAlphaOverride:function(alpha){return'rgba('+
 this.r+','+this.g+','+
-this.b+','+alpha+')';}};return{Color:Color};});'use strict';tr.exportTo('tr.b',function(){var generalPurposeColors=[new tr.b.Color(122,98,135),new tr.b.Color(150,83,105),new tr.b.Color(44,56,189),new tr.b.Color(99,86,147),new tr.b.Color(104,129,107),new tr.b.Color(130,178,55),new tr.b.Color(87,109,147),new tr.b.Color(111,145,88),new tr.b.Color(81,152,131),new tr.b.Color(142,91,111),new tr.b.Color(81,163,70),new tr.b.Color(148,94,86),new tr.b.Color(144,89,118),new tr.b.Color(83,150,97),new tr.b.Color(105,94,139),new tr.b.Color(89,144,122),new tr.b.Color(105,119,128),new tr.b.Color(96,128,137),new tr.b.Color(145,88,145),new tr.b.Color(88,145,144),new tr.b.Color(90,100,143),new tr.b.Color(121,97,136),new tr.b.Color(111,160,73),new tr.b.Color(112,91,142),new tr.b.Color(86,147,86),new tr.b.Color(63,100,170),new tr.b.Color(81,152,107),new tr.b.Color(60,164,173),new tr.b.Color(143,72,161),new tr.b.Color(159,74,86)];var reservedColorsByName={thread_state_iowait:new tr.b.Color(182,125,143),thread_state_running:new tr.b.Color(126,200,148),thread_state_runnable:new tr.b.Color(133,160,210),thread_state_sleeping:new tr.b.Color(240,240,240),thread_state_unknown:new tr.b.Color(199,155,125),light_memory_dump:new tr.b.Color(0,0,180),detailed_memory_dump:new tr.b.Color(180,0,180),generic_work:new tr.b.Color(125,125,125),good:new tr.b.Color(0,125,0),bad:new tr.b.Color(180,125,0),terrible:new tr.b.Color(180,0,0),black:new tr.b.Color(0,0,0),rail_response:new tr.b.Color(67,135,253),rail_animate:new tr.b.Color(244,74,63),rail_idle:new tr.b.Color(238,142,0),rail_load:new tr.b.Color(13,168,97),used_memory_column:new tr.b.Color(0,0,255),older_used_memory_column:new tr.b.Color(153,204,255),tracing_memory_column:new tr.b.Color(153,153,153),cq_build_running:new tr.b.Color(255,255,119),cq_build_passed:new tr.b.Color(153,238,102),cq_build_failed:new tr.b.Color(238,136,136),cq_build_abandoned:new tr.b.Color(187,187,187),cq_build_attempt_runnig:new tr.b.Color(222,222,75),cq_build_attempt_passed:new tr.b.Color(103,218,35),cq_build_attempt_failed:new tr.b.Color(197,81,81)};var numGeneralPurposeColorIds=generalPurposeColors.length;var numReservedColorIds=tr.b.dictionaryLength(reservedColorsByName);var numColorsPerVariant=numGeneralPurposeColorIds+numReservedColorIds;function ColorScheme(){}
+this.b+','+alpha+')';}};return{Color:Color};});'use strict';tr.exportTo('tr.b',function(){var generalPurposeColors=[new tr.b.Color(122,98,135),new tr.b.Color(150,83,105),new tr.b.Color(44,56,189),new tr.b.Color(99,86,147),new tr.b.Color(104,129,107),new tr.b.Color(130,178,55),new tr.b.Color(87,109,147),new tr.b.Color(111,145,88),new tr.b.Color(81,152,131),new tr.b.Color(142,91,111),new tr.b.Color(81,163,70),new tr.b.Color(148,94,86),new tr.b.Color(144,89,118),new tr.b.Color(83,150,97),new tr.b.Color(105,94,139),new tr.b.Color(89,144,122),new tr.b.Color(105,119,128),new tr.b.Color(96,128,137),new tr.b.Color(145,88,145),new tr.b.Color(88,145,144),new tr.b.Color(90,100,143),new tr.b.Color(121,97,136),new tr.b.Color(111,160,73),new tr.b.Color(112,91,142),new tr.b.Color(86,147,86),new tr.b.Color(63,100,170),new tr.b.Color(81,152,107),new tr.b.Color(60,164,173),new tr.b.Color(143,72,161),new tr.b.Color(159,74,86)];var reservedColorsByName={thread_state_uninterruptible:new tr.b.Color(182,125,143),thread_state_iowait:new tr.b.Color(255,140,0),thread_state_running:new tr.b.Color(126,200,148),thread_state_runnable:new tr.b.Color(133,160,210),thread_state_sleeping:new tr.b.Color(240,240,240),thread_state_unknown:new tr.b.Color(199,155,125),light_memory_dump:new tr.b.Color(0,0,180),detailed_memory_dump:new tr.b.Color(180,0,180),generic_work:new tr.b.Color(125,125,125),good:new tr.b.Color(0,125,0),bad:new tr.b.Color(180,125,0),terrible:new tr.b.Color(180,0,0),black:new tr.b.Color(0,0,0),rail_response:new tr.b.Color(67,135,253),rail_animation:new tr.b.Color(244,74,63),rail_idle:new tr.b.Color(238,142,0),rail_load:new tr.b.Color(13,168,97),used_memory_column:new tr.b.Color(0,0,255),older_used_memory_column:new tr.b.Color(153,204,255),tracing_memory_column:new tr.b.Color(153,153,153),heap_dump_stack_frame:new tr.b.Color(128,128,128),heap_dump_object_type:new tr.b.Color(0,0,255),cq_build_running:new tr.b.Color(255,255,119),cq_build_passed:new tr.b.Color(153,238,102),cq_build_failed:new tr.b.Color(238,136,136),cq_build_abandoned:new tr.b.Color(187,187,187),cq_build_attempt_runnig:new tr.b.Color(222,222,75),cq_build_attempt_passed:new tr.b.Color(103,218,35),cq_build_attempt_failed:new tr.b.Color(197,81,81)};var numGeneralPurposeColorIds=generalPurposeColors.length;var numReservedColorIds=tr.b.dictionaryLength(reservedColorsByName);var numColorsPerVariant=numGeneralPurposeColorIds+numReservedColorIds;function ColorScheme(){}
 var paletteBase=[];paletteBase.push.apply(paletteBase,generalPurposeColors);paletteBase.push.apply(paletteBase,tr.b.dictionaryValues(reservedColorsByName));ColorScheme.colors=[];ColorScheme.properties={};ColorScheme.properties={numColorsPerVariant:numColorsPerVariant};function pushVariant(func){var variantColors=paletteBase.map(func);ColorScheme.colors.push.apply(ColorScheme.colors,variantColors);}
 pushVariant(function(c){return c;});ColorScheme.properties.brightenedOffsets=[];ColorScheme.properties.brightenedOffsets.push(ColorScheme.colors.length);pushVariant(function(c){return c.lighten(0.3,0.9);});ColorScheme.properties.brightenedOffsets.push(ColorScheme.colors.length);pushVariant(function(c){return c.lighten(0.48,0.9);});ColorScheme.properties.brightenedOffsets.push(ColorScheme.colors.length);pushVariant(function(c){return c.lighten(0.65,0.9);});ColorScheme.properties.dimmedOffsets=[];ColorScheme.properties.dimmedOffsets.push(ColorScheme.colors.length);pushVariant(function(c){return c.desaturate();});ColorScheme.properties.dimmedOffsets.push(ColorScheme.colors.length);pushVariant(function(c){return c.desaturate(0.5);});ColorScheme.properties.dimmedOffsets.push(ColorScheme.colors.length);pushVariant(function(c){return c.desaturate(0.3);});ColorScheme.colorsAsStrings=ColorScheme.colors.map(function(c){return c.toString();});var reservedColorNameToIdMap=(function(){var m={};var i=generalPurposeColors.length;tr.b.iterItems(reservedColorsByName,function(key,value){m[key]=i++;});return m;})();ColorScheme.getColorIdForReservedName=function(name){var id=reservedColorNameToIdMap[name];if(id===undefined)
 throw new Error('Unrecognized color ')+name;return id;};ColorScheme.getColorForReservedNameAsString=function(reservedName){var id=ColorScheme.getColorIdForReservedName(reservedName);return ColorScheme.colorsAsStrings[id];};ColorScheme.getStringHash=function(name){var hash=0;for(var i=0;i<name.length;++i)
@@ -3041,13 +3131,15 @@
 EventRegistry.addEventListener('registry-changed',function(){eventsByTypeName=undefined;});function convertCamelCaseToTitleCase(name){var result=name.replace(/[A-Z]/g,' $&');result=result.charAt(0).toUpperCase()+result.slice(1);return result;}
 EventRegistry.getUserFriendlySingularName=function(typeName){var typeInfo=EventRegistry.getEventTypeInfoByTypeName(typeName);var str=typeInfo.metadata.name;return convertCamelCaseToTitleCase(str);};EventRegistry.getUserFriendlyPluralName=function(typeName){var typeInfo=EventRegistry.getEventTypeInfoByTypeName(typeName);var str=typeInfo.metadata.pluralName;return convertCamelCaseToTitleCase(str);};return{EventRegistry:EventRegistry};});'use strict';tr.exportTo('tr.model',function(){var EventRegistry=tr.model.EventRegistry;var RequestSelectionChangeEvent=tr.b.Event.bind(undefined,'requestSelectionChange',true,false);function EventSet(opt_events){this.bounds_dirty_=true;this.bounds_=new tr.b.Range();this.length_=0;this.guid_=tr.b.GUID.allocate();this.pushed_guids_={};if(opt_events){if(opt_events instanceof Array){for(var i=0;i<opt_events.length;i++)
 this.push(opt_events[i]);}else if(opt_events instanceof EventSet){this.addEventSet(opt_events);}else{this.push(opt_events);}}}
-EventSet.prototype={__proto__:Object.prototype,get bounds(){if(this.bounds_dirty_){this.bounds_.reset();for(var i=0;i<this.length_;i++)
-this[i].addBoundsToRange(this.bounds_);this.bounds_dirty_=false;}
-return this.bounds_;},get duration(){if(this.bounds_.isEmpty)
+EventSet.prototype={__proto__:Object.prototype,get bounds(){if(this.bounds_dirty_)
+this.resolveBounds_();return this.bounds_;},get duration(){if(this.bounds_.isEmpty)
 return 0;return this.bounds_.max-this.bounds_.min;},get length(){return this.length_;},get guid(){return this.guid_;},clear:function(){for(var i=0;i<this.length_;++i)
-delete this[i];this.length_=0;this.bounds_dirty_=true;},push:function(event){if(event.guid==undefined)
+delete this[i];this.length_=0;this.bounds_dirty_=true;},resolveBounds_:function(){this.bounds_.reset();for(var i=0;i<this.length_;i++)
+this[i].addBoundsToRange(this.bounds_);this.bounds_dirty_=false;},push:function(event){if(event.guid==undefined)
 throw new Error('Event must have a GUID');if(this.contains(event))
-return event;this.pushed_guids_[event.guid]=true;this[this.length_++]=event;this.bounds_dirty_=true;return event;},contains:function(event){return this.pushed_guids_[event.guid];},addEventSet:function(eventSet){for(var i=0;i<eventSet.length;i++)
+return event;this.pushed_guids_[event.guid]=true;this[this.length_++]=event;this.bounds_dirty_=true;return event;},contains:function(event){return this.pushed_guids_[event.guid];},indexOf:function(event){for(var i=0;i<this.length;i++){if(this[i].guid===event.guid)
+return i;}
+return-1;},addEventSet:function(eventSet){for(var i=0;i<eventSet.length;i++)
 this.push(eventSet[i]);},subEventSet:function(index,count){count=count||1;var eventSet=new EventSet();eventSet.bounds_dirty_=true;if(index<0||index+count>this.length_)
 throw new Error('Index out of bounds');for(var i=index;i<index+count;i++)
 eventSet.push(this[i]);return eventSet;},intersectionIsEmpty:function(otherEventSet){return!this.some(function(event){return otherEventSet.contains(event);});},equals:function(that){if(this.length!==that.length)
@@ -3074,163 +3166,32 @@
 if(!fn.call(opt_this,this[i],i))
 return false;return true;},some:function(fn,opt_this){for(var i=0;i<this.length;i++)
 if(fn.call(opt_this,this[i],i))
-return true;return false;},asDict:function(){var stable_ids=[];this.forEach(function(event){stable_ids.push(event.stableId);});return{'events':stable_ids};}};return{EventSet:EventSet,RequestSelectionChangeEvent:RequestSelectionChangeEvent};});'use strict';tr.exportTo('tr.model',function(){var ColorScheme=tr.b.ColorScheme;var SelectionState={NONE:0,SELECTED:ColorScheme.properties.brightenedOffsets[0],HIGHLIGHTED:ColorScheme.properties.brightenedOffsets[1],DIMMED:ColorScheme.properties.dimmedOffsets[0],BRIGHTENED0:ColorScheme.properties.brightenedOffsets[0],BRIGHTENED1:ColorScheme.properties.brightenedOffsets[1],BRIGHTENED2:ColorScheme.properties.brightenedOffsets[2],DIMMED0:ColorScheme.properties.dimmedOffsets[0],DIMMED1:ColorScheme.properties.dimmedOffsets[1],DIMMED2:ColorScheme.properties.dimmedOffsets[2]};var brighteningLevels=[SelectionState.NONE,SelectionState.BRIGHTENED0,SelectionState.BRIGHTENED1,SelectionState.BRIGHTENED2];SelectionState.getFromBrighteningLevel=function(level){return brighteningLevels[level];}
+return true;return false;},asDict:function(){var stable_ids=[];this.forEach(function(event){stable_ids.push(event.stableId);});return{'events':stable_ids};}};EventSet.IMMUTABLE_EMPTY_SET=(function(){var s=new EventSet();s.resolveBounds_();s.push=function(){throw new Error('Cannot push to an immutable event set');};s.addEventSet=function(){throw new Error('Cannot add to an immutable event set');};Object.freeze(s);return s;})();return{EventSet:EventSet,RequestSelectionChangeEvent:RequestSelectionChangeEvent};});'use strict';tr.exportTo('tr.model',function(){var ColorScheme=tr.b.ColorScheme;var SelectionState={NONE:0,SELECTED:ColorScheme.properties.brightenedOffsets[0],HIGHLIGHTED:ColorScheme.properties.brightenedOffsets[1],DIMMED:ColorScheme.properties.dimmedOffsets[0],BRIGHTENED0:ColorScheme.properties.brightenedOffsets[0],BRIGHTENED1:ColorScheme.properties.brightenedOffsets[1],BRIGHTENED2:ColorScheme.properties.brightenedOffsets[2],DIMMED0:ColorScheme.properties.dimmedOffsets[0],DIMMED1:ColorScheme.properties.dimmedOffsets[1],DIMMED2:ColorScheme.properties.dimmedOffsets[2]};var brighteningLevels=[SelectionState.NONE,SelectionState.BRIGHTENED0,SelectionState.BRIGHTENED1,SelectionState.BRIGHTENED2];SelectionState.getFromBrighteningLevel=function(level){return brighteningLevels[level];}
 var dimmingLevels=[SelectionState.DIMMED0,SelectionState.DIMMED1,SelectionState.DIMMED2];SelectionState.getFromDimmingLevel=function(level){return dimmingLevels[level];}
 return{SelectionState:SelectionState};});'use strict';tr.exportTo('tr.model',function(){var SelectionState=tr.model.SelectionState;function SelectableItem(modelItem){this.modelItem_=modelItem;}
 SelectableItem.prototype={get modelItem(){return this.modelItem_;},get selected(){return this.selectionState===SelectionState.SELECTED;},addToSelection:function(selection){var modelItem=this.modelItem_;if(!modelItem)
 return;selection.push(modelItem);},addToTrackMap:function(eventToTrackMap,track){var modelItem=this.modelItem_;if(!modelItem)
-return;eventToTrackMap.addEvent(modelItem,track);}};return{SelectableItem:SelectableItem};});'use strict';tr.exportTo('tr.model',function(){var SelectableItem=tr.model.SelectableItem;var SelectionState=tr.model.SelectionState;function Event(){SelectableItem.call(this,this);this.guid_=tr.b.GUID.allocate();this.selectionState=SelectionState.NONE;this.associatedAlerts=new tr.model.EventSet();this.info=undefined;}
-Event.prototype={__proto__:SelectableItem.prototype,get guid(){return this.guid_;},get stableId(){return undefined;},addBoundsToRange:function(range){throw new Error('Not implemented');}};return{Event:Event};});'use strict';tr.exportTo('tr.model',function(){function TimedEvent(start){tr.model.Event.call(this);this.start=start;this.duration=0;this.cpuStart=undefined;this.cpuDuration=undefined;}
-TimedEvent.prototype={__proto__:tr.model.Event.prototype,get end(){return this.start+this.duration;},addBoundsToRange:function(range){range.addValue(this.start);range.addValue(this.end);},bounds:function(that,precisionUnit){if(precisionUnit===undefined){precisionUnit=tr.b.u.TimeDisplayModes.ms;}
-var startsBefore=precisionUnit.roundedLess(that.start,this.start);var endsAfter=precisionUnit.roundedLess(this.end,that.end);return!startsBefore&&!endsAfter;}};return{TimedEvent:TimedEvent};});'use strict';tr.exportTo('tr.model',function(){function Alert(info,start,opt_associatedEvents,opt_args){tr.model.TimedEvent.call(this,start);this.info=info;this.args=opt_args||{};this.associatedEvents=new tr.model.EventSet(opt_associatedEvents);this.associatedEvents.forEach(function(event){event.associatedAlerts.push(this);},this);}
+return;eventToTrackMap.addEvent(modelItem,track);}};return{SelectableItem:SelectableItem};});'use strict';tr.exportTo('tr.model',function(){var SelectableItem=tr.model.SelectableItem;var SelectionState=tr.model.SelectionState;var IMMUTABLE_EMPTY_SET=tr.model.EventSet.IMMUTABLE_EMPTY_SET;function Event(){SelectableItem.call(this,this);this.guid_=tr.b.GUID.allocate();this.selectionState=SelectionState.NONE;this.info=undefined;}
+Event.prototype={__proto__:SelectableItem.prototype,get guid(){return this.guid_;},get stableId(){return undefined;},associatedAlerts:IMMUTABLE_EMPTY_SET,addAssociatedAlert:function(alert){if(this.associatedAlerts===IMMUTABLE_EMPTY_SET)
+this.associatedAlerts=new tr.model.EventSet();this.associatedAlerts.push(alert);},addBoundsToRange:function(range){throw new Error('Not implemented');}};return{Event:Event};});'use strict';tr.exportTo('tr.v',function(){var msDisplayMode={scale:1e-3,suffix:'ms',roundedLess:function(a,b){return Math.round(a*1000)<Math.round(b*1000);},format:function(ts){return new Number(ts).toLocaleString(undefined,{minimumFractionDigits:3})+' ms';}};var nsDisplayMode={scale:1e-9,suffix:'ns',roundedLess:function(a,b){return Math.round(a*1000000)<Math.round(b*1000000);},format:function(ts){return new Number(ts*1000000).toLocaleString(undefined,{maximumFractionDigits:0})+' ns';}};var TimeDisplayModes={ns:nsDisplayMode,ms:msDisplayMode};return{TimeDisplayModes:TimeDisplayModes};});'use strict';tr.exportTo('tr.model',function(){function TimedEvent(start){tr.model.Event.call(this);this.start=start;this.duration=0;this.cpuStart=undefined;this.cpuDuration=undefined;}
+TimedEvent.prototype={__proto__:tr.model.Event.prototype,get end(){return this.start+this.duration;},addBoundsToRange:function(range){range.addValue(this.start);range.addValue(this.end);},bounds:function(that,opt_precisionUnit){if(opt_precisionUnit===undefined)
+opt_precisionUnit=tr.v.TimeDisplayModes.ms;var startsBefore=opt_precisionUnit.roundedLess(that.start,this.start);var endsAfter=opt_precisionUnit.roundedLess(this.end,that.end);return!startsBefore&&!endsAfter;}};return{TimedEvent:TimedEvent};});'use strict';tr.exportTo('tr.v',function(){var TimeDisplayModes=tr.v.TimeDisplayModes;var BINARY_PREFIXES=['','Ki','Mi','Gi','Ti'];var PLUS_MINUS_SIGN=String.fromCharCode(177);function max(a,b){if(a===undefined)
+return b;if(b===undefined)
+return a;return a.scale>b.scale?a:b;}
+var ImprovementDirection={DONT_CARE:0,BIGGER_IS_BETTER:1,SMALLER_IS_BETTER:2};function Unit(unitName,jsonName,isDelta,improvementDirection,formatValue){this.unitName=unitName;this.jsonName=jsonName;this.isDelta=isDelta;this.improvementDirection=improvementDirection;this.formatValue_=formatValue;this.correspondingDeltaUnit=undefined;}
+Unit.prototype={asJSON:function(){return this.jsonName;},format:function(value){var formattedValue=this.formatValue_(value);if(!this.isDelta||value<0)
+return formattedValue;if(value===0)
+return PLUS_MINUS_SIGN+formattedValue;else
+return'+'+formattedValue;}};Unit.reset=function(){Unit.currentTimeDisplayMode=TimeDisplayModes.ms;};Unit.timestampFromUs=function(us){return us/1000;};Unit.maybeTimestampFromUs=function(us){return us===undefined?undefined:us/1000;};Object.defineProperty(Unit,'currentTimeDisplayMode',{get:function(){return Unit.currentTimeDisplayMode_;},set:function(value){if(Unit.currentTimeDisplayMode_===value)
+return;Unit.currentTimeDisplayMode_=value;Unit.dispatchEvent(new tr.b.Event('display-mode-changed'));}});Unit.didPreferredTimeDisplayUnitChange=function(){var largest=undefined;var els=tr.b.findDeepElementsMatching(document.body,'tr-v-ui-preferred-display-unit');els.forEach(function(el){largest=max(largest,el.preferredTimeDisplayMode);});Unit.currentDisplayUnit=largest===undefined?TimeDisplayModes.ms:largest;};Unit.byName={};Unit.byJSONName={};Unit.fromJSON=function(object){var u=Unit.byJSONName[object];if(u){return u;}
+throw new Error('Unrecognized unit');};Unit.define=function(params){tr.b.iterItems(ImprovementDirection,function(_,improvementDirection){var regularUnit=Unit.defineUnitVariant_(params,false,improvementDirection);var deltaUnit=Unit.defineUnitVariant_(params,true,improvementDirection);regularUnit.correspondingDeltaUnit=deltaUnit;deltaUnit.correspondingDeltaUnit=deltaUnit;});};Unit.defineUnitVariant_=function(params,isDelta,improvementDirection){var nameSuffix=isDelta?'Delta':'';switch(improvementDirection){case ImprovementDirection.DONT_CARE:break;case ImprovementDirection.BIGGER_IS_BETTER:nameSuffix+='_biggerIsBetter';break;case ImprovementDirection.SMALLER_IS_BETTER:nameSuffix+='_smallerIsBetter';break;default:throw new Error('Unknown improvement direction: '+improvementDirection);}
+var unitName=params.baseUnitName+nameSuffix;var jsonName=params.baseJsonName+nameSuffix;if(Unit.byName[unitName]!==undefined)
+throw new Error('Unit \''+unitName+'\' already exists');if(Unit.byJSONName[jsonName]!==undefined)
+throw new Error('JSON unit \''+jsonName+'\' alread exists');var unit=new Unit(unitName,jsonName,isDelta,improvementDirection,params.formatValue);Unit.byName[unitName]=unit;Unit.byJSONName[jsonName]=unit;return unit;};tr.b.EventTarget.decorate(Unit);Unit.reset();Unit.define({baseUnitName:'timeDurationInMs',baseJsonName:'ms',formatValue:function(value){return Unit.currentTimeDisplayMode_.format(value);}});Unit.define({baseUnitName:'timeStampInMs',baseJsonName:'tsMs',formatValue:function(value){return Unit.currentTimeDisplayMode_.format(value);}});Unit.define({baseUnitName:'normalizedPercentage',baseJsonName:'n%',formatValue:function(value){var tmp=new Number(Math.round(value*100000)/1000);return tmp.toLocaleString(undefined,{minimumFractionDigits:3})+'%';}});Unit.define({baseUnitName:'sizeInBytes',baseJsonName:'sizeInBytes',formatValue:function(value){var signPrefix='';if(value<0){signPrefix='-';value=-value;}
+var i=0;while(value>=1024&&i<BINARY_PREFIXES.length-1){value/=1024;i++;}
+return signPrefix+value.toFixed(1)+' '+BINARY_PREFIXES[i]+'B';}});Unit.define({baseUnitName:'energyInJoules',baseJsonName:'J',formatValue:function(value){return value.toLocaleString(undefined,{minimumFractionDigits:3})+' J';}});Unit.define({baseUnitName:'powerInWatts',baseJsonName:'W',formatValue:function(value){return value.toLocaleString(undefined,{minimumFractionDigits:3})+' W';}});Unit.define({baseUnitName:'unitlessNumber',baseJsonName:'unitless',formatValue:function(value){return value.toLocaleString(undefined,{minimumFractionDigits:3,maximumFractionDigits:3});}});return{ImprovementDirection:ImprovementDirection,Unit:Unit};});'use strict';tr.exportTo('tr.model',function(){function Alert(info,start,opt_associatedEvents,opt_args){tr.model.TimedEvent.call(this,start);this.info=info;this.args=opt_args||{};this.associatedEvents=new tr.model.EventSet(opt_associatedEvents);this.associatedEvents.forEach(function(event){event.addAssociatedAlert(this);},this);}
 Alert.prototype={__proto__:tr.model.TimedEvent.prototype,get title(){return this.info.title;},get colorId(){return this.info.colorId;},get userFriendlyName(){return'Alert '+this.title+' at '+
-tr.b.u.TimeStamp.format(this.start);}};tr.model.EventRegistry.register(Alert,{name:'alert',pluralName:'alerts',singleViewElementName:'tr-ui-a-alert-sub-view',multiViewElementName:'tr-ui-a-alert-sub-view'});return{Alert:Alert};});'use strict';tr.exportTo('tr.model',function(){function EventContainer(){this.guid_=tr.b.GUID.allocate();this.important=true;this.bounds_=new tr.b.Range();}
-EventContainer.prototype={get guid(){return this.guid_;},get stableId(){throw new Error('Not implemented');},get bounds(){return this.bounds_;},updateBounds:function(){throw new Error('Not implemented');},shiftTimestampsForward:function(amount){throw new Error('Not implemented');},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){throw new Error('Not implemented');},iterateAllChildEventContainers:function(callback,opt_this){throw new Error('Not implemented');},iterateAllEvents:function(callback,opt_this){this.iterateAllEventContainers(function(ec){ec.iterateAllEventsInThisContainer(function(eventType){return true;},callback,opt_this);});},iterateAllEventContainers:function(callback,opt_this){function visit(ec){callback.call(opt_this,ec);ec.iterateAllChildEventContainers(visit);}
-visit(this);}};return{EventContainer:EventContainer};});'use strict';tr.exportTo('tr.model',function(){var Event=tr.model.Event;var EventRegistry=tr.model.EventRegistry;function PowerSample(series,start,power){Event.call(this);this.series_=series;this.start_=start;this.power_=power;}
-PowerSample.prototype={__proto__:Event.prototype,get series(){return this.series_;},get start(){return this.start_;},set start(value){this.start_=value;},get power(){return this.power_;},set power(value){this.power_=value;},addBoundsToRange:function(range){range.addValue(this.start);}};EventRegistry.register(PowerSample,{name:'powerSample',pluralName:'powerSamples',singleViewElementName:'tr-ui-a-single-power-sample-sub-view',multiViewElementName:'tr-ui-a-multi-power-sample-sub-view'});return{PowerSample:PowerSample};});'use strict';tr.exportTo('tr.model',function(){var PowerSample=tr.model.PowerSample;function PowerSeries(device){tr.model.EventContainer.call(this);this.device_=device;this.samples_=[];}
-PowerSeries.prototype={__proto__:tr.model.EventContainer.prototype,get device(){return this.device_;},get samples(){return this.samples_;},get stableId(){return this.device_.stableId+'.PowerSeries';},addPowerSample:function(ts,val){var sample=new PowerSample(this,ts,val);this.samples_.push(sample);return sample;},getEnergyConsumed:function(start,end){var measurementRange=tr.b.Range.fromExplicitRange(start,end);var energyConsumed=0;for(var i=0;i<this.samples.length;i++){var sample=this.samples[i];var nextSample=this.samples[i+1];var sampleRange=new tr.b.Range();sampleRange.addValue(sample.start);sampleRange.addValue(nextSample?nextSample.start:Infinity);var timeIntersection=measurementRange.findIntersection(sampleRange);energyConsumed+=timeIntersection.duration/1000*sample.power;}
-return energyConsumed;},shiftTimestampsForward:function(amount){for(var i=0;i<this.samples_.length;++i)
-this.samples_[i].start+=amount;},updateBounds:function(){this.bounds.reset();if(this.samples_.length===0)
-return;this.bounds.addValue(this.samples_[0].start);this.bounds.addValue(this.samples_[this.samples_.length-1].start);},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,PowerSample))
-this.samples_.forEach(callback,opt_this);},iterateAllChildEventContainers:function(callback,opt_this){}};return{PowerSeries:PowerSeries};});'use strict';tr.exportTo('tr.model',function(){function Device(model){if(!model)
-throw new Error('Must provide a model.');tr.model.EventContainer.call(this);this.powerSeries_=undefined;this.vSyncTimestamps_=[];};Device.compare=function(x,y){return x.guid-y.guid;};Device.prototype={__proto__:tr.model.EventContainer.prototype,compareTo:function(that){return Device.compare(this,that);},get userFriendlyName(){return'Device';},get userFriendlyDetails(){return'Device';},get stableId(){return'Device';},getSettingsKey:function(){return'device';},get powerSeries(){return this.powerSeries_;},set powerSeries(powerSeries){this.powerSeries_=powerSeries;},get vSyncTimestamps(){return this.vSyncTimestamps_;},set vSyncTimestamps(value){this.vSyncTimestamps_=value;},updateBounds:function(){this.bounds.reset();this.iterateAllChildEventContainers(function(child){child.updateBounds();this.bounds.addRange(child.bounds);},this);},shiftTimestampsForward:function(amount){this.iterateAllChildEventContainers(function(child){child.shiftTimestampsForward(amount);});for(var i=0;i<this.vSyncTimestamps_.length;i++)
-this.vSyncTimestamps_[i]+=amount;},addCategoriesToDict:function(categoriesDict){},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){},iterateAllChildEventContainers:function(callback,opt_this){if(this.powerSeries_)
-callback.call(opt_this,this.powerSeries_);}};return{Device:Device};});'use strict';tr.exportTo('tr.model',function(){function FlowEvent(category,id,title,colorId,start,args,opt_duration){tr.model.TimedEvent.call(this,start);this.category=category||'';this.title=title;this.colorId=colorId;this.start=start;this.args=args;this.id=id;this.startSlice=undefined;this.endSlice=undefined;this.startStackFrame=undefined;this.endStackFrame=undefined;if(opt_duration!==undefined)
-this.duration=opt_duration;}
-FlowEvent.prototype={__proto__:tr.model.TimedEvent.prototype,get userFriendlyName(){return'Flow event named '+this.title+' at '+
-tr.b.u.TimeStamp.format(this.timestamp);}};tr.model.EventRegistry.register(FlowEvent,{name:'flowEvent',pluralName:'flowEvents',singleViewElementName:'tr-ui-a-single-flow-event-sub-view',multiViewElementName:'tr-ui-a-multi-flow-event-sub-view'});return{FlowEvent:FlowEvent};});'use strict';tr.exportTo('tr.b',function(){function identity(d){return d;}
-function Statistics(){}
-Statistics.divideIfPossibleOrZero=function(numerator,denominator){if(denominator===0)
-return 0;return numerator/denominator;}
-Statistics.sum=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=0;for(var i=0;i<ary.length;i++)
-ret+=func.call(opt_this,ary[i],i);return ret;};Statistics.mean=function(ary,opt_func,opt_this){return Statistics.sum(ary,opt_func,opt_this)/ary.length;};Statistics.variance=function(ary,opt_func,opt_this){var func=opt_func||identity;var mean=Statistics.mean(ary,func,opt_this);var sumOfSquaredDistances=Statistics.sum(ary,function(d,i){var v=func.call(this,d,i)-mean;return v*v;},opt_this);return sumOfSquaredDistances/(ary.length-1);};Statistics.stddev=function(ary,opt_func,opt_this){return Math.sqrt(Statistics.variance(ary,opt_func,opt_this));};Statistics.max=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=-Infinity;for(var i=0;i<ary.length;i++)
-ret=Math.max(ret,func.call(opt_this,ary[i],i));return ret;};Statistics.min=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=Infinity;for(var i=0;i<ary.length;i++)
-ret=Math.min(ret,func.call(opt_this,ary[i],i));return ret;};Statistics.range=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=new tr.b.Range();for(var i=0;i<ary.length;i++)
-ret.addValue(func.call(opt_this,ary[i],i));return ret;}
-Statistics.percentile=function(ary,percent,opt_func,opt_this){if(!(percent>=0&&percent<=1))
-throw new Error('percent must be [0,1]');var func=opt_func||identity;var tmp=new Array(ary.length);for(var i=0;i<ary.length;i++)
-tmp[i]=func.call(opt_this,ary[i],i);tmp.sort();var idx=Math.floor((ary.length-1)*percent);return tmp[idx];};Statistics.clamp=function(value,opt_low,opt_high){opt_low=opt_low||0.0;opt_high=opt_high||1.0;return Math.min(Math.max(value,opt_low),opt_high);}
-Statistics.normalizeSamples=function(samples){if(samples.length===0){return{normalized_samples:samples,scale:1.0};}
-samples=samples.slice().sort(function(a,b){return a-b;});var low=Math.min.apply(null,samples);var high=Math.max.apply(null,samples);var new_low=0.5/samples.length;var new_high=(samples.length-0.5)/samples.length;if(high-low===0.0){samples=Array.apply(null,new Array(samples.length)).map(function(){return 0.5;});return{normalized_samples:samples,scale:1.0};}
-var scale=(new_high-new_low)/(high-low);for(var i=0;i<samples.length;i++){samples[i]=(samples[i]-low)*scale+new_low;}
-return{normalized_samples:samples,scale:scale};}
-Statistics.discrepancy=function(samples,opt_location_count){if(samples.length===0)
-return 0.0;var max_local_discrepancy=0;var inv_sample_count=1.0/samples.length;var locations=[];var count_less=[];var count_less_equal=[];if(opt_location_count!==undefined){var sample_index=0;for(var i=0;i<opt_location_count;i++){var location=i/(opt_location_count-1);locations.push(location);while(sample_index<samples.length&&samples[sample_index]<location){sample_index+=1;}
-count_less.push(sample_index);while(sample_index<samples.length&&samples[sample_index]<=location){sample_index+=1;}
-count_less_equal.push(sample_index);}}else{if(samples[0]>0.0){locations.push(0.0);count_less.push(0);count_less_equal.push(0);}
-for(var i=0;i<samples.length;i++){locations.push(samples[i]);count_less.push(i);count_less_equal.push(i+1);}
-if(samples[-1]<1.0){locations.push(1.0);count_less.push(samples.length);count_less_equal.push(samples.length);}}
-for(var i=0;i<locations.length;i++){for(var j=i+1;j<locations.length;j++){var length=locations[j]-locations[i];var count_closed=count_less_equal[j]-count_less[i];var local_discrepancy_closed=Math.abs(count_closed*inv_sample_count-length);var max_local_discrepancy=Math.max(local_discrepancy_closed,max_local_discrepancy);var count_open=count_less[j]-count_less_equal[i];var local_discrepancy_open=Math.abs(count_open*inv_sample_count-length);var max_local_discrepancy=Math.max(local_discrepancy_open,max_local_discrepancy);}}
-return max_local_discrepancy;};Statistics.timestampsDiscrepancy=function(timestamps,opt_absolute,opt_location_count){if(timestamps.length===0)
-return 0.0;if(opt_absolute===undefined)
-opt_absolute=true;if(Array.isArray(timestamps[0])){var range_discrepancies=timestamps.map(function(r){return Statistics.timestampsDiscrepancy(r);});return Math.max.apply(null,range_discrepancies);}
-var s=Statistics.normalizeSamples(timestamps);var samples=s.normalized_samples;var sample_scale=s.scale;var discrepancy=Statistics.discrepancy(samples,opt_location_count);var inv_sample_count=1.0/samples.length;if(opt_absolute===true){discrepancy/=sample_scale;}else{discrepancy=Statistics.clamp((discrepancy-inv_sample_count)/(1.0-inv_sample_count));}
-return discrepancy;};Statistics.durationsDiscrepancy=function(durations,opt_absolute,opt_location_count){if(durations.length===0)
-return 0.0;var timestamps=durations.reduce(function(prev,curr,index,array){prev.push(prev[prev.length-1]+curr);return prev;},[0]);return Statistics.timestampsDiscrepancy(timestamps,opt_absolute,opt_location_count);};Statistics.uniformlySampleStream=function(samples,streamLength,newElement,numSamples){if(streamLength<=numSamples){if(samples.length>=streamLength)
-samples[streamLength-1]=newElement;else
-samples.push(newElement);return;}
-var probToKeep=numSamples/streamLength;if(Math.random()>probToKeep)
-return;var index=Math.floor(Math.random()*numSamples);samples[index]=newElement;};Statistics.mergeSampledStreams=function(samplesA,streamLengthA,samplesB,streamLengthB,numSamples){if(streamLengthB<numSamples){var nbElements=Math.min(streamLengthB,samplesB.length);for(var i=0;i<nbElements;++i){Statistics.uniformlySampleStream(samplesA,streamLengthA+i+1,samplesB[i],numSamples);}
-return;}
-if(streamLengthA<numSamples){var nbElements=Math.min(streamLengthA,samplesA.length);var tempSamples=samplesB.slice();for(var i=0;i<nbElements;++i){Statistics.uniformlySampleStream(tempSamples,streamLengthB+i+1,samplesA[i],numSamples);}
-for(var i=0;i<tempSamples.length;++i){samplesA[i]=tempSamples[i];}
-return;}
-var nbElements=Math.min(numSamples,samplesB.length);var probOfSwapping=streamLengthB/(streamLengthA+streamLengthB);for(var i=0;i<nbElements;++i){if(Math.random()<probOfSwapping){samplesA[i]=samplesB[i];}}}
-return{Statistics:Statistics};});'use strict';tr.exportTo('tr.model',function(){var ColorScheme=tr.b.ColorScheme;var Statistics=tr.b.Statistics;var FRAME_PERF_CLASS={GOOD:'good',BAD:'bad',TERRIBLE:'terrible',NEUTRAL:'generic_work'};function Frame(associatedEvents,threadTimeRanges,opt_args){tr.model.Event.call(this);this.threadTimeRanges=threadTimeRanges;this.associatedEvents=new tr.model.EventSet(associatedEvents);this.args=opt_args||{};this.title='Frame';this.start=Statistics.min(threadTimeRanges,function(x){return x.start;});this.end=Statistics.max(threadTimeRanges,function(x){return x.end;});this.totalDuration=Statistics.sum(threadTimeRanges,function(x){return x.end-x.start;});this.perfClass=FRAME_PERF_CLASS.NEUTRAL;};Frame.prototype={__proto__:tr.model.Event.prototype,set perfClass(perfClass){this.colorId=ColorScheme.getColorIdForReservedName(perfClass);this.perfClass_=perfClass;},get perfClass(){return this.perfClass_;},shiftTimestampsForward:function(amount){this.start+=amount;this.end+=amount;for(var i=0;i<this.threadTimeRanges.length;i++){this.threadTimeRanges[i].start+=amount;this.threadTimeRanges[i].end+=amount;}},addBoundsToRange:function(range){range.addValue(this.start);range.addValue(this.end);}};tr.model.EventRegistry.register(Frame,{name:'frame',pluralName:'frames',singleViewElementName:'tr-ui-a-single-frame-sub-view',multiViewElementName:'tr-ui-a-multi-frame-sub-view'});return{Frame:Frame,FRAME_PERF_CLASS:FRAME_PERF_CLASS};});'use strict';tr.exportTo('tr.model',function(){function Attribute(units){this.units=units;this.infos=[];}
-Attribute.fromDictIfPossible=function(dict,opt_model){var typeInfo=Attribute.findTypeInfoMatching(function(typeInfo){return typeInfo.metadata.type===dict.type;});if(typeInfo===undefined){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Unknown attribute type \''+dict.type+'\'.'});}
-return UnknownAttribute.fromDict(dict,opt_model);}
-return typeInfo.constructor.fromDict(dict,opt_model);};Attribute.findCommonTraits=function(attributes,opt_model){var commonTraits;for(var i=0;i<attributes.length;i++){var attribute=attributes[i];if(attribute===undefined)
-continue;var attributeConstructor=attribute.constructor;var attributeUnits=attribute.units;if(commonTraits===undefined){commonTraits={constructor:attributeConstructor,units:attributeUnits};}else if(attributeConstructor!==commonTraits.constructor){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Attribute with different types: '+
-commonTraits.constructor+' and '+attributeConstructor+'.'});}
-commonTraits={constructor:UnknownAttribute,units:undefined};break;}else if(attributeUnits!==commonTraits.units){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Attribute with different units: '+commonTraits.units+' and '+attributeUnits+'.'});}
-commonTraits={constructor:UnknownAttribute,units:undefined};break;}}
-return commonTraits;};Attribute.aggregate=function(childAttributes,existingParentAttribute,opt_model){var definedChildAttributes=childAttributes.filter(function(childAttribute){return childAttribute!==undefined;});var traits=Attribute.findCommonTraits(definedChildAttributes,opt_model);if(traits===undefined)
-return existingParentAttribute;var constructor=traits.constructor;if(constructor.merge===undefined)
-return existingParentAttribute;var mergedAttribute=constructor.merge(definedChildAttributes,traits.units,opt_model);if(existingParentAttribute===undefined)
-return mergedAttribute;existingParentAttribute.useMergedAttribute(mergedAttribute,opt_model);return existingParentAttribute;}
-Attribute.fromTraceValue=function(dict,opt_model){throw new Error('Not implemented');};Attribute.prototype.useMergedAttribute=function(mergedAttribute,opt_model){if(mergedAttribute.constructor!==this.constructor){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Attribute with different types: '+this.constructor+' and '+mergedAttribute.constructor+'.'});}}else if(mergedAttribute.units!==this.units){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Attribute with different units: '+this.units+' and '+mergedAttribute.units+'.'});}}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);tr.b.decorateExtensionRegistry(Attribute,options);Attribute.addEventListener('will-register',function(e){if(!e.typeInfo.constructor.hasOwnProperty('fromDict'))
-throw new Error('Attributes must have fromDict method');if(!e.typeInfo.metadata.type)
-throw new Error('Attributes must provide type');if(e.typeInfo.constructor.prototype.constructor!==e.typeInfo.constructor)
-throw new Error('Attribute prototypes must provide constructor.');});function ScalarAttribute(units,value){Attribute.call(this,units);this.value=value;}
-ScalarAttribute.fromDict=function(dict){return new ScalarAttribute(dict.units,parseInt(dict.value,16));};ScalarAttribute.merge=function(childAttributes,units){var sum=0;childAttributes.forEach(function(childAttribute){sum+=childAttribute.value;});return new ScalarAttribute(units,sum);}
-ScalarAttribute.prototype.__proto__=Attribute.prototype;Attribute.register(ScalarAttribute,{type:'scalar'});function StringAttribute(units,value){Attribute.call(this,units);this.value=value;}
-StringAttribute.fromDict=function(dict){return new StringAttribute(dict.units,dict.value);};Attribute.register(StringAttribute,{type:'string'});function UnknownAttribute(units,opt_value){Attribute.call(this,units,opt_value);this.value=opt_value;}
-UnknownAttribute.fromDict=function(dict){return new UnknownAttribute(dict.units);};UnknownAttribute.prototype.__proto__=Attribute.prototype;function AttributeInfo(type,message){this.type=type;this.message=message;}
-var AttributeInfoType={INFORMATION:0,WARNING:1,LINK:2,MEMORY_OWNER:3,MEMORY_OWNED:4,OVERALL_VALUE:5,RECENT_VALUE:6,HAS_HEAP_DUMP:7};return{Attribute:Attribute,ScalarAttribute:ScalarAttribute,StringAttribute:StringAttribute,UnknownAttribute:UnknownAttribute,AttributeInfo:AttributeInfo,AttributeInfoType:AttributeInfoType};});'use strict';tr.exportTo('tr.model',function(){function ContainerMemoryDump(start){tr.model.TimedEvent.call(this,start);this.levelOfDetail=undefined;this.memoryAllocatorDumps_=undefined;this.memoryAllocatorDumpsByFullName_=undefined;};ContainerMemoryDump.prototype={__proto__:tr.model.TimedEvent.prototype,shiftTimestampsForward:function(amount){this.start+=amount;},get memoryAllocatorDumps(){return this.memoryAllocatorDumps_;},set memoryAllocatorDumps(memoryAllocatorDumps){this.memoryAllocatorDumps_=memoryAllocatorDumps;this.memoryAllocatorDumpsByFullName_=undefined;},getMemoryAllocatorDumpByFullName:function(fullName){if(this.memoryAllocatorDumps_===undefined)
-return undefined;if(this.memoryAllocatorDumpsByFullName_===undefined){var index={};function addDumpsToIndex(dumps){dumps.forEach(function(dump){index[dump.fullName]=dump;addDumpsToIndex(dump.children);});};addDumpsToIndex(this.memoryAllocatorDumps_);this.memoryAllocatorDumpsByFullName_=index;}
-return this.memoryAllocatorDumpsByFullName_[fullName];},iterateRootAllocatorDumps:function(fn,opt_this){if(this.memoryAllocatorDumps===undefined)
-return;this.memoryAllocatorDumps.forEach(fn,opt_this||this);}};return{ContainerMemoryDump:ContainerMemoryDump};});'use strict';tr.exportTo('tr.model',function(){function MemoryAllocatorDump(containerMemoryDump,fullName,opt_guid){this.fullName=fullName;this.parent=undefined;this.children=[];this.attributes={};this.containerMemoryDump=containerMemoryDump;this.owns=undefined;this.ownedBy=[];this.retains=[];this.retainedBy=[];this.guid=opt_guid;};MemoryAllocatorDump.SIZE_ATTRIBUTE_NAME='size';MemoryAllocatorDump.EFFECTIVE_SIZE_ATTRIBUTE_NAME='effective_size';MemoryAllocatorDump.DISPLAYED_SIZE_ATTRIBUTE_NAME=MemoryAllocatorDump.EFFECTIVE_SIZE_ATTRIBUTE_NAME;MemoryAllocatorDump.prototype={get name(){return this.fullName.substring(this.fullName.lastIndexOf('/')+1);},get quantifiedName(){return'\''+this.fullName+'\' in '+
-this.containerMemoryDump.containerName;},isDescendantOf:function(otherDump){var dump=this;while(dump!==undefined){if(dump===otherDump)
-return true;dump=dump.parent;}
-return false;},addAttribute:function(name,value){if(name in this.attributes)
-throw new Error('Duplicate attribute name: '+name+'.');this.attributes[name]=value;},aggregateAttributes:function(opt_model){var attributes={};this.children.forEach(function(child){child.aggregateAttributes(opt_model);tr.b.iterItems(child.attributes,function(name){attributes[name]=true;},this);},this);tr.b.iterItems(attributes,function(name){var childAttributes=this.children.map(function(child){return child.attributes[name];},this);var currentAttribute=this.attributes[name];this.attributes[name]=tr.model.Attribute.aggregate(childAttributes,currentAttribute,opt_model);},this);},getValidSizeAttributeOrUndefined:function(sizeAttrName,opt_model){var sizeAttr=this.attributes[sizeAttrName];if(sizeAttr===undefined)
-return undefined;if(!(sizeAttr instanceof tr.model.ScalarAttribute)){if(opt_model!==undefined){opt_model.importWarning({type:'memory_dump_parse_error',message:'\''+sizeAttrName+'\' attribute of memory allocator '+'dump \''+memoryAllocatorDump.fullName+'\' is not a scalar.'});}
-return undefined;}
-return sizeAttr;}};function MemoryAllocatorDumpLink(source,target,opt_importance){this.source=source;this.target=target;this.importance=opt_importance;}
-return{MemoryAllocatorDump:MemoryAllocatorDump,MemoryAllocatorDumpLink:MemoryAllocatorDumpLink};});'use strict';tr.exportTo('tr.model',function(){function GlobalMemoryDump(model,start){tr.model.ContainerMemoryDump.call(this,start);this.model=model;this.processMemoryDumps={};}
-var SIZE_ATTRIBUTE_NAME=tr.model.MemoryAllocatorDump.SIZE_ATTRIBUTE_NAME;var EFFECTIVE_SIZE_ATTRIBUTE_NAME=tr.model.MemoryAllocatorDump.EFFECTIVE_SIZE_ATTRIBUTE_NAME;function getSize(dump){var attr=dump.attributes[SIZE_ATTRIBUTE_NAME];if(attr===undefined)
-return 0;return attr.value;}
-function hasSize(dump){return dump.attributes[SIZE_ATTRIBUTE_NAME]!==undefined;}
-function optional(value,defaultValue){if(value===undefined)
-return defaultValue;return value;}
-function ownershipToUserFriendlyString(dump,importance){return dump.quantifiedName+' (importance: '+
-optional(importance,0)+')';}
-GlobalMemoryDump.prototype={__proto__:tr.model.ContainerMemoryDump.prototype,get userFriendlyName(){return'Global memory dump at '+tr.b.u.TimeStamp.format(this.start);},get containerName(){return'global space';},calculateGraphAttributes:function(){this.calculateSizes();this.calculateEffectiveSizes();this.aggregateAttributes();this.discountTracingOverhead();},calculateSizes:function(){this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateMemoryAllocatorDumpSize_.bind(this));},calculateMemoryAllocatorDumpSize_:function(dump){var shouldDefineSize=false;function getDependencySize(dependencyDump){var attr=dependencyDump.attributes[SIZE_ATTRIBUTE_NAME];if(attr===undefined)
-return 0;shouldDefineSize=true;return attr.value;}
-var sizeAttribute=dump.getValidSizeAttributeOrUndefined(SIZE_ATTRIBUTE_NAME,this.model);var size=0;var infos=[];var checkDependentSizeIsConsistent=function(){};if(sizeAttribute!==undefined){size=sizeAttribute.value;shouldDefineSize=true;checkDependentSizeIsConsistent=function(dependentSize,dependentName){if(size>=dependentSize)
-return;var messageSuffix=' ('+tr.b.u.Units.sizeInBytes.format(size)+') is less than '+dependentName+' ('+
-tr.b.u.Units.sizeInBytes.format(dependentSize)+').';this.model.importWarning({type:'memory_dump_parse_error',message:'Size provided by memory allocator dump \''+
-dump.fullName+'\''+messageSuffix});infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.WARNING,'Size provided by this memory allocator dump'+messageSuffix));}.bind(this);}
-var aggregatedChildrenSize=0;var allOverlaps={};dump.children.forEach(function(childDump){function aggregateDescendantDump(descendantDump){var ownedDumpLink=descendantDump.owns;if(ownedDumpLink!==undefined&&ownedDumpLink.target.isDescendantOf(dump)){var ownedDescendantDump=ownedDumpLink.target;var ownedChildDump=ownedDescendantDump;while(ownedChildDump.parent!==dump)
-ownedChildDump=ownedChildDump.parent;if(childDump!==ownedChildDump){var overlap=getDependencySize(descendantDump);if(overlap>0){var ownedChildOverlaps=allOverlaps[ownedChildDump.name];if(ownedChildOverlaps===undefined)
-allOverlaps[ownedChildDump.name]=ownedChildOverlaps={};var previousTotalOverlap=ownedChildOverlaps[childDump.name]||0;var updatedTotalOverlap=previousTotalOverlap+overlap;ownedChildOverlaps[childDump.name]=updatedTotalOverlap;}}
-return;}
-if(descendantDump.children.length===0){aggregatedChildrenSize+=getDependencySize(descendantDump);return;}
-descendantDump.children.forEach(aggregateDescendantDump);}
-aggregateDescendantDump(childDump);});dump.children.forEach(function(childDump){var childOverlaps=allOverlaps[childDump.name];if(childOverlaps===undefined)
-return;var message=tr.b.dictionaryValues(tr.b.mapItems(childOverlaps,function(ownerChildName,overlap){return'overlaps with its sibling \''+ownerChildName+'\' ('+
-tr.b.u.Units.sizeInBytes.format(overlap)+')';})).join(' ');childDump.attributes[SIZE_ATTRIBUTE_NAME].infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.INFORMATION,message));});checkDependentSizeIsConsistent(aggregatedChildrenSize,'the aggregated size of its children');var largestOwnerSize=0;dump.ownedBy.forEach(function(ownershipLink){var owner=ownershipLink.source;var ownerSize=getDependencySize(owner);largestOwnerSize=Math.max(largestOwnerSize,ownerSize);});checkDependentSizeIsConsistent(largestOwnerSize,'the size of its largest owner');if(!shouldDefineSize){dump.attributes[SIZE_ATTRIBUTE_NAME]=undefined;return;}
-size=Math.max(size,aggregatedChildrenSize,largestOwnerSize);var sizeAttribute=new tr.model.ScalarAttribute('bytes',size);sizeAttribute.infos=infos;dump.attributes[SIZE_ATTRIBUTE_NAME]=sizeAttribute;if(aggregatedChildrenSize<size&&dump.children!==undefined&&dump.children.length>0){var virtualChild=new tr.model.MemoryAllocatorDump(dump.containerMemoryDump,dump.fullName+'/<unspecified>');virtualChild.parent=dump;dump.children.unshift(virtualChild);virtualChild.attributes[SIZE_ATTRIBUTE_NAME]=new tr.model.ScalarAttribute('bytes',size-aggregatedChildrenSize);}},calculateEffectiveSizes:function(){this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateDumpSubSizes_.bind(this));this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateDumpOwnershipCoefficient_.bind(this));this.traverseAllocatorDumpsInDepthFirstPreOrder(this.calculateDumpCumulativeOwnershipCoefficient_.bind(this));this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateDumpEffectiveSize_.bind(this));},calculateDumpSubSizes_:function(dump){if(!hasSize(dump))
-return;if(dump.children===undefined||dump.children.length===0){var size=getSize(dump);dump.notOwningSubSize_=size;dump.notOwnedSubSize_=size;return;}
-var notOwningSubSize=0;dump.children.forEach(function(childDump){if(childDump.owns!==undefined)
-return;notOwningSubSize+=optional(childDump.notOwningSubSize_,0);});dump.notOwningSubSize_=notOwningSubSize;var notOwnedSubSize=0;dump.children.forEach(function(childDump){if(childDump.ownedBy.length===0){notOwnedSubSize+=optional(childDump.notOwnedSubSize_,0);return;}
-var largestChildOwnerSize=0;childDump.ownedBy.forEach(function(ownershipLink){largestChildOwnerSize=Math.max(largestChildOwnerSize,getSize(ownershipLink.source));});notOwnedSubSize+=getSize(childDump)-largestChildOwnerSize;});dump.notOwnedSubSize_=notOwnedSubSize;},calculateDumpOwnershipCoefficient_:function(dump){if(!hasSize(dump))
-return;if(dump.ownedBy.length===0)
-return;var owners=dump.ownedBy.map(function(ownershipLink){return{dump:ownershipLink.source,importance:optional(ownershipLink.importance,0),notOwningSubSize:optional(ownershipLink.source.notOwningSubSize_,0)};});owners.sort(function(a,b){if(a.importance===b.importance)
-return a.notOwningSubSize-b.notOwningSubSize;return b.importance-a.importance;});var currentImportanceStartPos=0;var alreadyAttributedSubSize=0;while(currentImportanceStartPos<owners.length){var currentImportance=owners[currentImportanceStartPos].importance;var nextImportanceStartPos=currentImportanceStartPos+1;while(nextImportanceStartPos<owners.length&&owners[nextImportanceStartPos].importance===currentImportance){nextImportanceStartPos++;}
-var attributedNotOwningSubSize=0;for(var pos=currentImportanceStartPos;pos<nextImportanceStartPos;pos++){var owner=owners[pos];var notOwningSubSize=owner.notOwningSubSize;if(notOwningSubSize>alreadyAttributedSubSize){attributedNotOwningSubSize+=(notOwningSubSize-alreadyAttributedSubSize)/(nextImportanceStartPos-pos);alreadyAttributedSubSize=notOwningSubSize;}
-var owningCoefficient=0;if(notOwningSubSize!==0)
-owningCoefficient=attributedNotOwningSubSize/notOwningSubSize;owner.dump.owningCoefficient_=owningCoefficient;}
-currentImportanceStartPos=nextImportanceStartPos;}
-var notOwnedSubSize=optional(dump.notOwnedSubSize_,0);var remainderSubSize=notOwnedSubSize-alreadyAttributedSubSize;var ownedCoefficient=0;if(notOwnedSubSize!==0)
-ownedCoefficient=remainderSubSize/notOwnedSubSize;dump.ownedCoefficient_=ownedCoefficient;},calculateDumpCumulativeOwnershipCoefficient_:function(dump){if(!hasSize(dump))
-return;var cumulativeOwnedCoefficient=optional(dump.ownedCoefficient_,1);var parent=dump.parent;if(dump.parent!==undefined)
-cumulativeOwnedCoefficient*=dump.parent.cumulativeOwnedCoefficient_;dump.cumulativeOwnedCoefficient_=cumulativeOwnedCoefficient;var cumulativeOwningCoefficient;if(dump.owns!==undefined){cumulativeOwningCoefficient=dump.owningCoefficient_*dump.owns.target.cumulativeOwningCoefficient_;}else if(dump.parent!==undefined){cumulativeOwningCoefficient=dump.parent.cumulativeOwningCoefficient_;}else{cumulativeOwningCoefficient=1;}
-dump.cumulativeOwningCoefficient_=cumulativeOwningCoefficient;},calculateDumpEffectiveSize_:function(dump){if(!hasSize(dump)){dump.attributes[EFFECTIVE_SIZE_ATTRIBUTE_NAME]=undefined;return;}
-var effectiveSize;if(dump.children===undefined||dump.children.length===0){effectiveSize=getSize(dump)*dump.cumulativeOwningCoefficient_*dump.cumulativeOwnedCoefficient_;}else{effectiveSize=0;dump.children.forEach(function(childDump){if(!hasSize(childDump))
-return;effectiveSize+=childDump.attributes[EFFECTIVE_SIZE_ATTRIBUTE_NAME].value;});}
-var attribute=new tr.model.ScalarAttribute('bytes',effectiveSize);dump.attributes[EFFECTIVE_SIZE_ATTRIBUTE_NAME]=attribute;if(dump.ownedBy.length>0){var message='shared by:'+
-dump.ownedBy.map(function(ownershipLink){return'\n  - '+ownershipToUserFriendlyString(ownershipLink.source,ownershipLink.importance);}).join();attribute.infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.MEMORY_OWNED,message));}
-if(dump.owns!==undefined){var target=dump.owns.target;var message='shares '+
-ownershipToUserFriendlyString(target,dump.owns.importance)+' with';var otherOwnershipLinks=target.ownedBy.filter(function(ownershipLink){return ownershipLink.source!==dump;});if(otherOwnershipLinks.length>0){message+=':';message+=otherOwnershipLinks.map(function(ownershipLink){return'\n  - '+ownershipToUserFriendlyString(ownershipLink.source,ownershipLink.importance);}).join();}else{message+=' no other dumps';}
-attribute.infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.MEMORY_OWNER,message));}},aggregateAttributes:function(){this.iterateRootAllocatorDumps(function(dump){dump.aggregateAttributes(this.model);});this.iterateRootAllocatorDumps(this.propagateAttributesRecursively);tr.b.iterItems(this.processMemoryDumps,function(pid,processMemoryDump){processMemoryDump.iterateRootAllocatorDumps(function(dump){dump.aggregateAttributes(this.model);},this);},this);},propagateAttributesRecursively:function(globalAllocatorDump){tr.b.iterItems(globalAllocatorDump.attributes,function(attrName,attr){if(attrName===SIZE_ATTRIBUTE_NAME||attrName===EFFECTIVE_SIZE_ATTRIBUTE_NAME){return;}
-globalAllocatorDump.ownedBy.forEach(function(ownershipLink){var processAllocatorDump=ownershipLink.source;if(processAllocatorDump.attributes[attrName]!==undefined){return;}
-processAllocatorDump.attributes[attrName]=attr;});});globalAllocatorDump.children.forEach(this.propagateAttributesRecursively,this);},discountTracingOverhead:function(){tr.b.iterItems(this.processMemoryDumps,function(pid,dump){dump.discountTracingOverhead(this.model);},this);},iterateContainerDumps:function(fn){fn.call(this,this);tr.b.iterItems(this.processMemoryDumps,function(pid,processDump){fn.call(this,processDump);},this);},iterateAllRootAllocatorDumps:function(fn){this.iterateContainerDumps(function(containerDump){containerDump.iterateRootAllocatorDumps(fn,this);});},traverseAllocatorDumpsInDepthFirstPostOrder:function(fn){var visitedDumps=new WeakSet();var openDumps=new WeakSet();function visit(dump){if(visitedDumps.has(dump))
-return;if(openDumps.has(dump))
-throw new Error(dump.userFriendlyName+' contains a cycle');openDumps.add(dump);dump.ownedBy.forEach(function(ownershipLink){visit.call(this,ownershipLink.source);},this);dump.children.forEach(visit,this);fn.call(this,dump);visitedDumps.add(dump);openDumps.delete(dump);}
-this.iterateAllRootAllocatorDumps(visit);},traverseAllocatorDumpsInDepthFirstPreOrder:function(fn){var visitedDumps=new WeakSet();function visit(dump){if(visitedDumps.has(dump))
-return;if(dump.owns!==undefined&&!visitedDumps.has(dump.owns.target))
-return;if(dump.parent!==undefined&&!visitedDumps.has(dump.parent))
-return;fn.call(this,dump);visitedDumps.add(dump);dump.ownedBy.forEach(function(ownershipLink){visit.call(this,ownershipLink.source);},this);dump.children.forEach(visit,this);}
-this.iterateAllRootAllocatorDumps(visit);}};tr.model.EventRegistry.register(GlobalMemoryDump,{name:'globalMemoryDump',pluralName:'globalMemoryDumps',singleViewElementName:'tr-ui-a-container-memory-dump-sub-view',multiViewElementName:'tr-ui-a-container-memory-dump-sub-view'});return{GlobalMemoryDump:GlobalMemoryDump};});'use strict';tr.exportTo('tr.model',function(){var InstantEventType={GLOBAL:1,PROCESS:2};function InstantEvent(category,title,colorId,start,args){tr.model.TimedEvent.call(this);this.category=category||'';this.title=title;this.colorId=colorId;this.start=start;this.args=args;this.type=undefined;};InstantEvent.prototype={__proto__:tr.model.TimedEvent.prototype};function GlobalInstantEvent(category,title,colorId,start,args){InstantEvent.apply(this,arguments);this.type=InstantEventType.GLOBAL;};GlobalInstantEvent.prototype={__proto__:InstantEvent.prototype,get userFriendlyName(){return'Global instant event '+this.title+' @ '+
-tr.b.u.TimeStamp.format(start);}};function ProcessInstantEvent(category,title,colorId,start,args){InstantEvent.apply(this,arguments);this.type=InstantEventType.PROCESS;};ProcessInstantEvent.prototype={__proto__:InstantEvent.prototype,get userFriendlyName(){return'Process-level instant event '+this.title+' @ '+
-tr.b.u.TimeStamp.format(start);}};tr.model.EventRegistry.register(InstantEvent,{name:'instantEvent',pluralName:'instantEvents',singleViewElementName:'tr-ui-a-single-instant-event-sub-view',multiViewElementName:'tr-ui-a-multi-instant-event-sub-view'});return{GlobalInstantEvent:GlobalInstantEvent,ProcessInstantEvent:ProcessInstantEvent,InstantEventType:InstantEventType,InstantEvent:InstantEvent};});'use strict';tr.exportTo('tr.model',function(){var CompoundEventSelectionState={NOT_SELECTED:0,EVENT_SELECTED:0x1,SOME_ASSOCIATED_EVENTS_SELECTED:0x2,ALL_ASSOCIATED_EVENTS_SELECTED:0x4,EVENT_AND_SOME_ASSOCIATED_SELECTED:0x1|0x2,EVENT_AND_ALL_ASSOCIATED_SELECTED:0x1|0x4};return{CompoundEventSelectionState:CompoundEventSelectionState};});'use strict';tr.exportTo('tr.model',function(){var CompoundEventSelectionState=tr.model.CompoundEventSelectionState;function InteractionRecord(parentModel,title,colorId,start,duration){tr.model.TimedEvent.call(this,start);this.title=title;this.colorId=colorId;this.duration=duration;this.args={};this.associatedEvents=new tr.model.EventSet();this.parentModel=parentModel;this.sourceEvents=new tr.model.EventSet();}
-InteractionRecord.prototype={__proto__:tr.model.TimedEvent.prototype,get subSlices(){return[];},get userFriendlyName(){return this.title+' interaction at '+
-tr.b.u.TimeStamp.format(this.start);},get stableId(){return'IR.'+this.parentModel.interactionRecords.indexOf(this);},computeCompoundEvenSelectionState:function(selection){var cess=CompoundEventSelectionState.NOT_SELECTED;if(selection.contains(this))
-cess|=CompoundEventSelectionState.EVENT_SELECTED;if(this.associatedEvents.intersectionIsEmpty(selection))
-return cess;var allContained=this.associatedEvents.every(function(event){return selection.contains(event);});if(allContained)
-cess|=CompoundEventSelectionState.ALL_ASSOCIATED_EVENTS_SELECTED;else
-cess|=CompoundEventSelectionState.SOME_ASSOCIATED_EVENTS_SELECTED;return cess;}};tr.model.EventRegistry.register(InteractionRecord,{name:'interaction',pluralName:'interactions',singleViewElementName:'tr-ui-a-single-interaction-record-sub-view',multiViewElementName:'tr-ui-a-multi-interaction-record-sub-view'});return{InteractionRecord:InteractionRecord};});'use strict';tr.exportTo('tr.b',function(){function findLowIndexInSortedArray(ary,mapFn,loVal){if(ary.length==0)
+tr.v.Unit.byName.timeStampInMs.format(this.start);}};tr.model.EventRegistry.register(Alert,{name:'alert',pluralName:'alerts',singleViewElementName:'tr-ui-a-alert-sub-view',multiViewElementName:'tr-ui-a-alert-sub-view'});return{Alert:Alert};});'use strict';tr.exportTo('tr.model',function(){var ColorScheme=tr.b.ColorScheme;var Statistics=tr.b.Statistics;var FRAME_PERF_CLASS={GOOD:'good',BAD:'bad',TERRIBLE:'terrible',NEUTRAL:'generic_work'};function Frame(associatedEvents,threadTimeRanges,opt_args){tr.model.Event.call(this);this.threadTimeRanges=threadTimeRanges;this.associatedEvents=new tr.model.EventSet(associatedEvents);this.args=opt_args||{};this.title='Frame';this.start=Statistics.min(threadTimeRanges,function(x){return x.start;});this.end=Statistics.max(threadTimeRanges,function(x){return x.end;});this.totalDuration=Statistics.sum(threadTimeRanges,function(x){return x.end-x.start;});this.perfClass=FRAME_PERF_CLASS.NEUTRAL;};Frame.prototype={__proto__:tr.model.Event.prototype,set perfClass(perfClass){this.colorId=ColorScheme.getColorIdForReservedName(perfClass);this.perfClass_=perfClass;},get perfClass(){return this.perfClass_;},shiftTimestampsForward:function(amount){this.start+=amount;this.end+=amount;for(var i=0;i<this.threadTimeRanges.length;i++){this.threadTimeRanges[i].start+=amount;this.threadTimeRanges[i].end+=amount;}},addBoundsToRange:function(range){range.addValue(this.start);range.addValue(this.end);}};tr.model.EventRegistry.register(Frame,{name:'frame',pluralName:'frames',singleViewElementName:'tr-ui-a-single-frame-sub-view',multiViewElementName:'tr-ui-a-multi-frame-sub-view'});return{Frame:Frame,FRAME_PERF_CLASS:FRAME_PERF_CLASS};});'use strict';tr.exportTo('tr.b',function(){function findLowIndexInSortedArray(ary,mapFn,loVal){if(ary.length==0)
 return 1;var low=0;var high=ary.length-1;var i,comparison;var hitPos=-1;while(low<=high){i=Math.floor((low+high)/2);comparison=mapFn(ary[i])-loVal;if(comparison<0){low=i+1;continue;}else if(comparison>0){high=i-1;continue;}else{hitPos=i;high=i-1;}}
 return hitPos!=-1?hitPos:low;}
 function findHighIndexInSortedArray(ary,mapFn,loVal,hiVal){var lo=loVal||0;var hi=hiVal!==undefined?hiVal:ary.length;while(lo<hi){var mid=(lo+hi)>>1;if(mapFn(ary[mid])>=0)
@@ -3259,35 +3220,72 @@
 return null;if(loDiff<hiDiff)
 return loInt;else
 return hiInt;}
-return{findLowIndexInSortedArray:findLowIndexInSortedArray,findHighIndexInSortedArray:findHighIndexInSortedArray,findIndexInSortedIntervals:findIndexInSortedIntervals,findIndexInSortedClosedIntervals:findIndexInSortedClosedIntervals,iterateOverIntersectingIntervals:iterateOverIntersectingIntervals,getIntersectingIntervals:getIntersectingIntervals,findClosestElementInSortedArray:findClosestElementInSortedArray,findClosestIntervalInSortedIntervals:findClosestIntervalInSortedIntervals};});'use strict';tr.exportTo('tr.model',function(){function CounterSample(series,timestamp,value){tr.model.Event.call(this);this.series_=series;this.timestamp_=timestamp;this.value_=value;}
-CounterSample.groupByTimestamp=function(samples){var samplesByTimestamp=tr.b.group(samples,function(sample){return sample.timestamp;});var timestamps=tr.b.dictionaryKeys(samplesByTimestamp);timestamps.sort();var groups=[];for(var i=0;i<timestamps.length;i++){var ts=timestamps[i];var group=samplesByTimestamp[ts];group.sort(function(x,y){return x.series.seriesIndex-y.series.seriesIndex;});groups.push(group);}
-return groups;}
-CounterSample.prototype={__proto__:tr.model.Event.prototype,get series(){return this.series_;},get timestamp(){return this.timestamp_;},get value(){return this.value_;},set timestamp(timestamp){this.timestamp_=timestamp;},addBoundsToRange:function(range){range.addValue(this.timestamp);},getSampleIndex:function(){return tr.b.findLowIndexInSortedArray(this.series.timestamps,function(x){return x;},this.timestamp_);},get userFriendlyName(){return'Counter sample from '+this.series_.title+' at '+
-tr.b.u.TimeStamp.format(this.timestamp);}};tr.model.EventRegistry.register(CounterSample,{name:'counterSample',pluralName:'counterSamples',singleViewElementName:'tr-ui-a-counter-sample-sub-view',multiViewElementName:'tr-ui-a-counter-sample-sub-view'});return{CounterSample:CounterSample};});'use strict';tr.exportTo('tr.model',function(){var CounterSample=tr.model.CounterSample;function CounterSeries(name,color){tr.model.EventContainer.call(this);this.name_=name;this.color_=color;this.timestamps_=[];this.samples_=[];this.counter=undefined;this.seriesIndex=undefined;}
-CounterSeries.prototype={__proto__:tr.model.EventContainer.prototype,get length(){return this.timestamps_.length;},get name(){return this.name_;},get color(){return this.color_;},get samples(){return this.samples_;},get timestamps(){return this.timestamps_;},getSample:function(idx){return this.samples_[idx];},getTimestamp:function(idx){return this.timestamps_[idx];},addCounterSample:function(ts,val){var sample=new CounterSample(this,ts,val);this.addSample(sample);return sample;},addSample:function(sample){this.timestamps_.push(sample.timestamp);this.samples_.push(sample);},getStatistics:function(sampleIndices){var sum=0;var min=Number.MAX_VALUE;var max=-Number.MAX_VALUE;for(var i=0;i<sampleIndices.length;++i){var sample=this.getSample(sampleIndices[i]).value;sum+=sample;min=Math.min(sample,min);max=Math.max(sample,max);}
-return{min:min,max:max,avg:(sum/sampleIndices.length),start:this.getSample(sampleIndices[0]).value,end:this.getSample(sampleIndices.length-1).value};},shiftTimestampsForward:function(amount){for(var i=0;i<this.timestamps_.length;++i){this.timestamps_[i]+=amount;this.samples_[i].timestamp=this.timestamps_[i];}},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,tr.model.CounterSample)){this.samples_.forEach(callback,opt_this);}},iterateAllChildEventContainers:function(callback,opt_this){}};return{CounterSeries:CounterSeries};});'use strict';tr.exportTo('tr.model',function(){function Counter(parent,id,category,name){tr.model.EventContainer.call(this);this.parent_=parent;this.id_=id;this.category_=category||'';this.name_=name;this.series_=[];this.totals=[];}
-Counter.prototype={__proto__:tr.model.EventContainer.prototype,get parent(){return this.parent_;},get id(){return this.id_;},get category(){return this.category_;},get name(){return this.name_;},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){},iterateAllChildEventContainers:function(callback,opt_this){for(var i=0;i<this.series_.length;i++)
-callback.call(opt_this,this.series_[i]);},set timestamps(arg){throw new Error('Bad counter API. No cookie.');},set seriesNames(arg){throw new Error('Bad counter API. No cookie.');},set seriesColors(arg){throw new Error('Bad counter API. No cookie.');},set samples(arg){throw new Error('Bad counter API. No cookie.');},addSeries:function(series){series.counter=this;series.seriesIndex=this.series_.length;this.series_.push(series);return series;},getSeries:function(idx){return this.series_[idx];},get series(){return this.series_;},get numSeries(){return this.series_.length;},get numSamples(){if(this.series_.length===0)
-return 0;return this.series_[0].length;},get timestamps(){if(this.series_.length===0)
-return[];return this.series_[0].timestamps;},getSampleStatistics:function(sampleIndices){sampleIndices.sort();var ret=[];this.series_.forEach(function(series){ret.push(series.getStatistics(sampleIndices));});return ret;},shiftTimestampsForward:function(amount){for(var i=0;i<this.series_.length;++i)
-this.series_[i].shiftTimestampsForward(amount);},updateBounds:function(){this.totals=[];this.maxTotal=0;this.bounds.reset();if(this.series_.length===0)
-return;var firstSeries=this.series_[0];var lastSeries=this.series_[this.series_.length-1];this.bounds.addValue(firstSeries.getTimestamp(0));this.bounds.addValue(lastSeries.getTimestamp(lastSeries.length-1));var numSeries=this.numSeries;this.maxTotal=-Infinity;for(var i=0;i<firstSeries.length;++i){var total=0;this.series_.forEach(function(series){total+=series.getSample(i).value;this.totals.push(total);}.bind(this));this.maxTotal=Math.max(total,this.maxTotal);}}};Counter.compare=function(x,y){var tmp=x.parent.compareTo(y);if(tmp!=0)
-return tmp;var tmp=x.name.localeCompare(y.name);if(tmp==0)
-return x.tid-y.tid;return tmp;};return{Counter:Counter};});'use strict';tr.exportTo('tr.model',function(){function Slice(category,title,colorId,start,args,opt_duration,opt_cpuStart,opt_cpuDuration,opt_argsStripped,opt_bind_id){tr.model.TimedEvent.call(this,start);this.category=category||'';this.title=title;this.colorId=colorId;this.args=args;this.startStackFrame=undefined;this.endStackFrame=undefined;this.didNotFinish=false;this.inFlowEvents=[];this.outFlowEvents=[];this.subSlices=[];this.selfTime=undefined;this.cpuSelfTime=undefined;this.important=false;this.parentContainer=undefined;this.argsStripped=false;this.bind_id_=opt_bind_id;this.parentSlice=undefined;this.isTopLevel=false;if(opt_duration!==undefined)
+return{findLowIndexInSortedArray:findLowIndexInSortedArray,findHighIndexInSortedArray:findHighIndexInSortedArray,findIndexInSortedIntervals:findIndexInSortedIntervals,findIndexInSortedClosedIntervals:findIndexInSortedClosedIntervals,iterateOverIntersectingIntervals:iterateOverIntersectingIntervals,getIntersectingIntervals:getIntersectingIntervals,findClosestElementInSortedArray:findClosestElementInSortedArray,findClosestIntervalInSortedIntervals:findClosestIntervalInSortedIntervals};});'use strict';tr.exportTo('tr.model.helpers',function(){var Frame=tr.model.Frame;var Statistics=tr.b.Statistics;var UI_DRAW_TYPE={NONE:'none',LEGACY:'legacy',MARSHMALLOW:'marshmallow'};var UI_THREAD_DRAW_NAMES={'performTraversals':UI_DRAW_TYPE.LEGACY,'Choreographer#doFrame':UI_DRAW_TYPE.MARSHMALLOW};var RENDER_THREAD_DRAW_NAME='DrawFrame';var RENDER_THREAD_INDEP_DRAW_NAME='doFrame';var THREAD_SYNC_NAME='syncFrameState';function getSlicesForThreadTimeRanges(threadTimeRanges){var ret=[];threadTimeRanges.forEach(function(threadTimeRange){var slices=[];threadTimeRange.thread.sliceGroup.iterSlicesInTimeRange(function(slice){slices.push(slice);},threadTimeRange.start,threadTimeRange.end);ret.push.apply(ret,slices);});return ret;}
+function makeFrame(threadTimeRanges,surfaceFlinger){var args={};if(surfaceFlinger&&surfaceFlinger.hasVsyncs){var start=Statistics.min(threadTimeRanges,function(threadTimeRanges){return threadTimeRanges.start;});args['deadline']=surfaceFlinger.getFrameDeadline(start);args['frameKickoff']=surfaceFlinger.getFrameKickoff(start);}
+var events=getSlicesForThreadTimeRanges(threadTimeRanges);return new Frame(events,threadTimeRanges,args);}
+function findOverlappingDrawFrame(renderThread,time){if(!renderThread)
+return undefined;var slices=renderThread.sliceGroup.slices;for(var i=0;i<slices.length;i++){var slice=slices[i];if(slice.title==RENDER_THREAD_DRAW_NAME&&slice.start<=time&&time<=slice.end){return slice;}}
+return undefined;}
+function getPreTraversalWorkRanges(uiThread){if(!uiThread)
+return[];var preFrameEvents=[];uiThread.sliceGroup.slices.forEach(function(slice){if(slice.title=='obtainView'||slice.title=='setupListItem'||slice.title=='deliverInputEvent'||slice.title=='RV Scroll')
+preFrameEvents.push(slice);});uiThread.asyncSliceGroup.slices.forEach(function(slice){if(slice.title=='deliverInputEvent')
+preFrameEvents.push(slice);});return tr.b.mergeRanges(tr.b.convertEventsToRanges(preFrameEvents),3,function(events){return{start:events[0].min,end:events[events.length-1].max};});}
+function getFrameStartTime(traversalStart,preTraversalWorkRanges){var preTraversalWorkRange=tr.b.findClosestIntervalInSortedIntervals(preTraversalWorkRanges,function(range){return range.start},function(range){return range.end},traversalStart,3);if(preTraversalWorkRange)
+return preTraversalWorkRange.start;return traversalStart;}
+function getUiThreadDrivenFrames(app){if(!app.uiThread)
+return[];var preTraversalWorkRanges=[];if(app.uiDrawType==UI_DRAW_TYPE.LEGACY)
+preTraversalWorkRanges=getPreTraversalWorkRanges(app.uiThread);var frames=[];app.uiThread.sliceGroup.slices.forEach(function(slice){if(!(slice.title in UI_THREAD_DRAW_NAMES)){return;}
+var threadTimeRanges=[];var uiThreadTimeRange={thread:app.uiThread,start:getFrameStartTime(slice.start,preTraversalWorkRanges),end:slice.end};threadTimeRanges.push(uiThreadTimeRange);var rtDrawSlice=findOverlappingDrawFrame(app.renderThread,slice.end);if(rtDrawSlice){var rtSyncSlice=rtDrawSlice.findDescendentSlice(THREAD_SYNC_NAME);if(rtSyncSlice){uiThreadTimeRange.end=Math.min(uiThreadTimeRange.end,rtSyncSlice.start);}
+threadTimeRanges.push({thread:app.renderThread,start:rtDrawSlice.start,end:rtDrawSlice.end});}
+frames.push(makeFrame(threadTimeRanges,app.surfaceFlinger));});return frames;}
+function getRenderThreadDrivenFrames(app){if(!app.renderThread)
+return[];var frames=[];app.renderThread.sliceGroup.getSlicesOfName(RENDER_THREAD_INDEP_DRAW_NAME).forEach(function(slice){var threadTimeRanges=[{thread:app.renderThread,start:slice.start,end:slice.end}];frames.push(makeFrame(threadTimeRanges,app.surfaceFlinger));});return frames;}
+function getUiDrawType(uiThread){if(!uiThread)
+return UI_DRAW_TYPE.NONE;var slices=uiThread.sliceGroup.slices;for(var i=0;i<slices.length;i++){if(slices[i].title in UI_THREAD_DRAW_NAMES){return UI_THREAD_DRAW_NAMES[slices[i].title];}}
+return UI_DRAW_TYPE.NONE;}
+function getInputSamples(process){var samples=undefined;for(var counterName in process.counters){if(/^android\.aq\:pending/.test(counterName)&&process.counters[counterName].numSeries==1){samples=process.counters[counterName].series[0].samples;break;}}
+if(!samples)
+return[];var inputSamples=[];var lastValue=0;samples.forEach(function(sample){if(sample.value>lastValue){inputSamples.push(sample);}
+lastValue=sample.value;});return inputSamples;}
+function getAnimationAsyncSlices(uiThread){if(!uiThread)
+return[];var slices=[];uiThread.asyncSliceGroup.iterateAllEvents(function(slice){if(/^animator\:/.test(slice.title))
+slices.push(slice);});return slices;}
+function AndroidApp(process,uiThread,renderThread,surfaceFlinger,uiDrawType){this.process=process;this.uiThread=uiThread;this.renderThread=renderThread;this.surfaceFlinger=surfaceFlinger;this.uiDrawType=uiDrawType;this.frames_=undefined;this.inputs_=undefined;};AndroidApp.createForProcessIfPossible=function(process,surfaceFlinger){var uiThread=process.getThread(process.pid);var uiDrawType=getUiDrawType(uiThread);if(uiDrawType==UI_DRAW_TYPE.NONE){uiThread=undefined;}
+var renderThreads=process.findAllThreadsNamed('RenderThread');var renderThread=renderThreads.length==1?renderThreads[0]:undefined;if(uiThread||renderThread){return new AndroidApp(process,uiThread,renderThread,surfaceFlinger,uiDrawType);}};AndroidApp.prototype={getFrames:function(){if(!this.frames_){var uiFrames=getUiThreadDrivenFrames(this);var rtFrames=getRenderThreadDrivenFrames(this);this.frames_=uiFrames.concat(rtFrames);this.frames_.sort(function(a,b){a.end-b.end});}
+return this.frames_;},getInputSamples:function(){if(!this.inputs_){this.inputs_=getInputSamples(this.process);}
+return this.inputs_;},getAnimationAsyncSlices:function(){if(!this.animations_){this.animations_=getAnimationAsyncSlices(this.uiThread);}
+return this.animations_;}};return{AndroidApp:AndroidApp};});'use strict';tr.exportTo('tr.model.helpers',function(){var findLowIndexInSortedArray=tr.b.findLowIndexInSortedArray;var VSYNC_SF_NAME='android.VSYNC-sf';var VSYNC_APP_NAME='android.VSYNC-app';var VSYNC_FALLBACK_NAME='android.VSYNC';var TIMESTAMP_FUDGE_MS=0.01;function getVsyncTimestamps(process,counterName){var vsync=process.counters[counterName];if(!vsync)
+vsync=process.counters[VSYNC_FALLBACK_NAME];if(vsync&&vsync.numSeries==1&&vsync.numSamples>1)
+return vsync.series[0].timestamps;return undefined;}
+function AndroidSurfaceFlinger(process,thread){this.process=process;this.thread=thread;this.appVsync_=undefined;this.sfVsync_=undefined;this.appVsyncTimestamps_=getVsyncTimestamps(process,VSYNC_APP_NAME);this.sfVsyncTimestamps_=getVsyncTimestamps(process,VSYNC_SF_NAME);};AndroidSurfaceFlinger.createForProcessIfPossible=function(process){var mainThread=process.getThread(process.pid);if(mainThread&&mainThread.name&&/surfaceflinger/.test(mainThread.name))
+return new AndroidSurfaceFlinger(process,mainThread);var primaryThreads=process.findAllThreadsNamed('SurfaceFlinger');if(primaryThreads.length==1)
+return new AndroidSurfaceFlinger(process,primaryThreads[0]);return undefined;};AndroidSurfaceFlinger.prototype={get hasVsyncs(){return!!this.appVsyncTimestamps_&&!!this.sfVsyncTimestamps_;},getFrameKickoff:function(timestamp){if(!this.hasVsyncs)
+throw new Error('cannot query vsync info without vsyncs');var firstGreaterIndex=findLowIndexInSortedArray(this.appVsyncTimestamps_,function(x){return x;},timestamp+TIMESTAMP_FUDGE_MS);if(firstGreaterIndex<1)
+return undefined;return this.appVsyncTimestamps_[firstGreaterIndex-1];},getFrameDeadline:function(timestamp){if(!this.hasVsyncs)
+throw new Error('cannot query vsync info without vsyncs');var firstGreaterIndex=findLowIndexInSortedArray(this.sfVsyncTimestamps_,function(x){return x;},timestamp+TIMESTAMP_FUDGE_MS);if(firstGreaterIndex>=this.sfVsyncTimestamps_.length)
+return undefined;return this.sfVsyncTimestamps_[firstGreaterIndex];}};return{AndroidSurfaceFlinger:AndroidSurfaceFlinger};});'use strict';tr.exportTo('tr.model.helpers',function(){var AndroidApp=tr.model.helpers.AndroidApp;var AndroidSurfaceFlinger=tr.model.helpers.AndroidSurfaceFlinger;var IMPORTANT_SURFACE_FLINGER_SLICES={'doComposition':true,'updateTexImage':true,'postFramebuffer':true};var IMPORTANT_UI_THREAD_SLICES={'Choreographer#doFrame':true,'performTraversals':true,'deliverInputEvent':true};var IMPORTANT_RENDER_THREAD_SLICES={'doFrame':true};function iterateImportantThreadSlices(thread,important,callback){if(!thread)
+return;thread.sliceGroup.slices.forEach(function(slice){if(slice.title in important)
+callback(slice);});}
+function AndroidModelHelper(model){this.model=model;this.apps=[];this.surfaceFlinger=undefined;var processes=model.getAllProcesses();for(var i=0;i<processes.length&&!this.surfaceFlinger;i++){this.surfaceFlinger=AndroidSurfaceFlinger.createForProcessIfPossible(processes[i]);}
+model.getAllProcesses().forEach(function(process){var app=AndroidApp.createForProcessIfPossible(process,this.surfaceFlinger);if(app)
+this.apps.push(app);},this);};AndroidModelHelper.guid=tr.b.GUID.allocate();AndroidModelHelper.supportsModel=function(model){return true;};AndroidModelHelper.prototype={iterateImportantSlices:function(callback){if(this.surfaceFlinger){iterateImportantThreadSlices(this.surfaceFlinger.thread,IMPORTANT_SURFACE_FLINGER_SLICES,callback);}
+this.apps.forEach(function(app){iterateImportantThreadSlices(app.uiThread,IMPORTANT_UI_THREAD_SLICES,callback);iterateImportantThreadSlices(app.renderThread,IMPORTANT_RENDER_THREAD_SLICES,callback);});}};return{AndroidModelHelper:AndroidModelHelper};});'use strict';tr.exportTo('tr.model',function(){function Slice(category,title,colorId,start,args,opt_duration,opt_cpuStart,opt_cpuDuration,opt_argsStripped,opt_bind_id){tr.model.TimedEvent.call(this,start);this.category=category||'';this.title=title;this.colorId=colorId;this.args=args;this.startStackFrame=undefined;this.endStackFrame=undefined;this.didNotFinish=false;this.inFlowEvents=[];this.outFlowEvents=[];this.subSlices=[];this.selfTime=undefined;this.cpuSelfTime=undefined;this.important=false;this.parentContainer=undefined;this.argsStripped=false;this.bind_id_=opt_bind_id;this.parentSlice=undefined;this.isTopLevel=false;if(opt_duration!==undefined)
 this.duration=opt_duration;if(opt_cpuStart!==undefined)
 this.cpuStart=opt_cpuStart;if(opt_cpuDuration!==undefined)
 this.cpuDuration=opt_cpuDuration;if(opt_argsStripped!==undefined)
 this.argsStripped=true;}
 Slice.prototype={__proto__:tr.model.TimedEvent.prototype,get analysisTypeName(){return this.title;},get userFriendlyName(){return'Slice '+this.title+' at '+
-tr.b.u.TimeStamp.format(this.start);},get stableId(){var parentSliceGroup=this.parentContainer.sliceGroup;return parentSliceGroup.stableId+'.'+
+tr.v.Unit.byName.timeStampInMs.format(this.start);},get stableId(){var parentSliceGroup=this.parentContainer.sliceGroup;return parentSliceGroup.stableId+'.'+
 parentSliceGroup.slices.indexOf(this);},findDescendentSlice:function(targetTitle){if(!this.subSlices)
 return undefined;for(var i=0;i<this.subSlices.length;i++){if(this.subSlices[i].title==targetTitle)
 return this.subSlices[i];var slice=this.subSlices[i].findDescendentSlice(targetTitle);if(slice)return slice;}
 return undefined;},get mostTopLevelSlice(){var curSlice=this;while(curSlice.parentSlice)
-curSlice=curSlice.parentSlice;return curSlice;},iterateAllSubsequentSlices:function(callback,opt_this){var parentStack=[];var started=false;var topmostSlice=this.mostTopLevelSlice;parentStack.push(topmostSlice);while(parentStack.length!==0){var curSlice=parentStack.pop();if(started)
+curSlice=curSlice.parentSlice;return curSlice;},getProcess:function(){var thread=this.parentContainer;if(thread&&thread.getProcess)
+return thread.getProcess();return undefined;},get model(){var process=this.getProcess();if(process!==undefined)
+return this.getProcess().model;return undefined;},iterateAllSubsequentSlices:function(callback,opt_this){var parentStack=[];var started=false;var topmostSlice=this.mostTopLevelSlice;parentStack.push(topmostSlice);while(parentStack.length!==0){var curSlice=parentStack.pop();if(started)
 callback.call(opt_this,curSlice);else
-started=(curSlice.guid===this.guid);for(var i=curSlice.subSlices.length-1;i>=0;i--){parentStack.push(curSlice.subSlices[i]);}}},get subsequentSlices(){var res=[];this.iterateAllSubsequentSlices(function(subseqSlice){res.push(subseqSlice);});return res;},iterateAllAncestors:function(callback,opt_this){var curSlice=this;while(curSlice.parentSlice){curSlice=curSlice.parentSlice;callback.call(opt_this,curSlice);}},get ancestorSlices(){var res=[];this.iterateAllAncestors(function(ancestor){res.push(ancestor);});return res;},iterateEntireHierarchy:function(callback,opt_this){var mostTopLevelSlice=this.mostTopLevelSlice;callback.call(opt_this,mostTopLevelSlice);mostTopLevelSlice.iterateAllSubsequentSlices(callback,opt_this);},get entireHierarchy(){var res=[];this.iterateEntireHierarchy(function(slice){res.push(slice);});return res;},get ancestorAndSubsequentSlices(){var res=[];res.push(this);this.iterateAllAncestors(function(aSlice){res.push(aSlice);});this.iterateAllSubsequentSlices(function(sSlice){res.push(sSlice);});return res;},iterateAllDescendents:function(callback,opt_this){this.subSlices.forEach(callback,opt_this);this.subSlices.forEach(function(subSlice){subSlice.iterateAllDescendents(callback,opt_this);},opt_this);},get descendentSlices(){var res=[];this.iterateAllDescendents(function(des){res.push(des);});return res;}};return{Slice:Slice};});'use strict';tr.exportTo('tr.model',function(){var Slice=tr.model.Slice;var SCHEDULING_STATE={DEBUG:'Debug',EXIT_DEAD:'Exit Dead',RUNNABLE:'Runnable',RUNNING:'Running',SLEEPING:'Sleeping',STOPPED:'Stopped',TASK_DEAD:'Task Dead',UNINTR_SLEEP:'Uninterruptible Sleep',UNINTR_SLEEP_WAKE_KILL:'Uninterruptible Sleep | WakeKill',UNINTR_SLEEP_WAKING:'Uninterruptible Sleep | Waking',UNKNOWN:'UNKNOWN',WAKE_KILL:'Wakekill',WAKING:'Waking',ZOMBIE:'Zombie'};function ThreadTimeSlice(thread,schedulingState,cat,start,args,opt_duration){Slice.call(this,cat,schedulingState,this.getColorForState_(schedulingState),start,args,opt_duration);this.thread=thread;this.schedulingState=schedulingState;this.cpuOnWhichThreadWasRunning=undefined;}
-ThreadTimeSlice.prototype={__proto__:Slice.prototype,getColorForState_:function(state){var getColorIdForReservedName=tr.b.ColorScheme.getColorIdForReservedName;switch(state){case SCHEDULING_STATE.RUNNABLE:return getColorIdForReservedName('thread_state_runnable');case SCHEDULING_STATE.RUNNING:return getColorIdForReservedName('thread_state_running');case SCHEDULING_STATE.SLEEPING:return getColorIdForReservedName('thread_state_sleeping');case SCHEDULING_STATE.DEBUG:case SCHEDULING_STATE.EXIT_DEAD:case SCHEDULING_STATE.STOPPED:case SCHEDULING_STATE.TASK_DEAD:case SCHEDULING_STATE.UNINTR_SLEEP:case SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL:case SCHEDULING_STATE.UNINTR_SLEEP_WAKING:case SCHEDULING_STATE.UNKNOWN:case SCHEDULING_STATE.WAKE_KILL:case SCHEDULING_STATE.WAKING:case SCHEDULING_STATE.ZOMBIE:return getColorIdForReservedName('thread_state_iowait');default:return getColorIdForReservedName('thread_state_unknown');}},get analysisTypeName(){return'tr.ui.analysis.ThreadTimeSlice';},getAssociatedCpuSlice:function(){if(!this.cpuOnWhichThreadWasRunning)
+started=(curSlice.guid===this.guid);for(var i=curSlice.subSlices.length-1;i>=0;i--){parentStack.push(curSlice.subSlices[i]);}}},get subsequentSlices(){var res=[];this.iterateAllSubsequentSlices(function(subseqSlice){res.push(subseqSlice);});return res;},iterateAllAncestors:function(callback,opt_this){var curSlice=this;while(curSlice.parentSlice){curSlice=curSlice.parentSlice;callback.call(opt_this,curSlice);}},get ancestorSlices(){var res=[];this.iterateAllAncestors(function(ancestor){res.push(ancestor);});return res;},iterateEntireHierarchy:function(callback,opt_this){var mostTopLevelSlice=this.mostTopLevelSlice;callback.call(opt_this,mostTopLevelSlice);mostTopLevelSlice.iterateAllSubsequentSlices(callback,opt_this);},get entireHierarchy(){var res=[];this.iterateEntireHierarchy(function(slice){res.push(slice);});return res;},get ancestorAndSubsequentSlices(){var res=[];res.push(this);this.iterateAllAncestors(function(aSlice){res.push(aSlice);});this.iterateAllSubsequentSlices(function(sSlice){res.push(sSlice);});return res;},iterateAllDescendents:function(callback,opt_this){this.subSlices.forEach(callback,opt_this);this.subSlices.forEach(function(subSlice){subSlice.iterateAllDescendents(callback,opt_this);},opt_this);},get descendentSlices(){var res=[];this.iterateAllDescendents(function(des){res.push(des);});return res;}};return{Slice:Slice};});'use strict';tr.exportTo('tr.model',function(){var Slice=tr.model.Slice;var SCHEDULING_STATE={DEBUG:'Debug',EXIT_DEAD:'Exit Dead',RUNNABLE:'Runnable',RUNNING:'Running',SLEEPING:'Sleeping',STOPPED:'Stopped',TASK_DEAD:'Task Dead',UNINTR_SLEEP:'Uninterruptible Sleep',UNINTR_SLEEP_WAKE_KILL:'Uninterruptible Sleep | WakeKill',UNINTR_SLEEP_WAKING:'Uninterruptible Sleep | Waking',UNINTR_SLEEP_IO:'Uninterruptible Sleep - Block I/O',UNINTR_SLEEP_WAKE_KILL_IO:'Uninterruptible Sleep | WakeKill - Block I/O',UNINTR_SLEEP_WAKING_IO:'Uninterruptible Sleep | Waking - Block I/O',UNKNOWN:'UNKNOWN',WAKE_KILL:'Wakekill',WAKING:'Waking',ZOMBIE:'Zombie'};function ThreadTimeSlice(thread,schedulingState,cat,start,args,opt_duration){Slice.call(this,cat,schedulingState,this.getColorForState_(schedulingState),start,args,opt_duration);this.thread=thread;this.schedulingState=schedulingState;this.cpuOnWhichThreadWasRunning=undefined;}
+ThreadTimeSlice.prototype={__proto__:Slice.prototype,getColorForState_:function(state){var getColorIdForReservedName=tr.b.ColorScheme.getColorIdForReservedName;switch(state){case SCHEDULING_STATE.RUNNABLE:return getColorIdForReservedName('thread_state_runnable');case SCHEDULING_STATE.RUNNING:return getColorIdForReservedName('thread_state_running');case SCHEDULING_STATE.SLEEPING:return getColorIdForReservedName('thread_state_sleeping');case SCHEDULING_STATE.DEBUG:case SCHEDULING_STATE.EXIT_DEAD:case SCHEDULING_STATE.STOPPED:case SCHEDULING_STATE.TASK_DEAD:case SCHEDULING_STATE.UNINTR_SLEEP:case SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL:case SCHEDULING_STATE.UNINTR_SLEEP_WAKING:case SCHEDULING_STATE.UNKNOWN:case SCHEDULING_STATE.WAKE_KILL:case SCHEDULING_STATE.WAKING:case SCHEDULING_STATE.ZOMBIE:return getColorIdForReservedName('thread_state_uninterruptible');case SCHEDULING_STATE.UNINTR_SLEEP_IO:case SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL_IO:case SCHEDULING_STATE.UNINTR_SLEEP_WAKING_IO:return getColorIdForReservedName('thread_state_iowait');default:return getColorIdForReservedName('thread_state_unknown');}},get analysisTypeName(){return'tr.ui.analysis.ThreadTimeSlice';},getAssociatedCpuSlice:function(){if(!this.cpuOnWhichThreadWasRunning)
 return undefined;var cpuSlices=this.cpuOnWhichThreadWasRunning.slices;for(var i=0;i<cpuSlices.length;i++){var cpuSlice=cpuSlices[i];if(cpuSlice.start!==this.start)
 continue;if(cpuSlice.duration!==this.duration)
 continue;return cpuSlice;}
@@ -3297,7 +3295,554 @@
 if(!cpuSliceWhenLastRunning)
 return undefined;var cpu=cpuSliceWhenLastRunning.cpu;var indexOfSliceOnCpuWhenLastRunning=cpu.indexOf(cpuSliceWhenLastRunning);var nextRunningSlice=cpu.slices[indexOfSliceOnCpuWhenLastRunning+1];if(!nextRunningSlice)
 return undefined;if(Math.abs(nextRunningSlice.start-cpuSliceWhenLastRunning.end)<0.00001)
-return nextRunningSlice;return undefined;}};tr.model.EventRegistry.register(ThreadTimeSlice,{name:'threadTimeSlice',pluralName:'threadTimeSlices',singleViewElementName:'tr-ui-a-single-thread-time-slice-sub-view',multiViewElementName:'tr-ui-a-multi-thread-time-slice-sub-view'});return{ThreadTimeSlice:ThreadTimeSlice,SCHEDULING_STATE:SCHEDULING_STATE};});'use strict';tr.exportTo('tr.model',function(){var Slice=tr.model.Slice;function CpuSlice(cat,title,colorId,start,args,opt_duration){Slice.apply(this,arguments);this.threadThatWasRunning=undefined;this.cpu=undefined;}
+return nextRunningSlice;return undefined;}};tr.model.EventRegistry.register(ThreadTimeSlice,{name:'threadTimeSlice',pluralName:'threadTimeSlices',singleViewElementName:'tr-ui-a-single-thread-time-slice-sub-view',multiViewElementName:'tr-ui-a-multi-thread-time-slice-sub-view'});return{ThreadTimeSlice:ThreadTimeSlice,SCHEDULING_STATE:SCHEDULING_STATE};});'use strict';tr.exportTo('tr.model',function(){var CompoundEventSelectionState={NOT_SELECTED:0,EVENT_SELECTED:0x1,SOME_ASSOCIATED_EVENTS_SELECTED:0x2,ALL_ASSOCIATED_EVENTS_SELECTED:0x4,EVENT_AND_SOME_ASSOCIATED_SELECTED:0x1|0x2,EVENT_AND_ALL_ASSOCIATED_SELECTED:0x1|0x4};return{CompoundEventSelectionState:CompoundEventSelectionState};});'use strict';tr.exportTo('tr.model.um',function(){var CompoundEventSelectionState=tr.model.CompoundEventSelectionState;function UserExpectation(parentModel,initiatorTitle,start,duration){tr.model.TimedEvent.call(this,start);this.associatedEvents=new tr.model.EventSet();this.duration=duration;this.initiatorTitle_=initiatorTitle;this.parentModel=parentModel;this.typeInfo_=undefined;this.sourceEvents=new tr.model.EventSet();}
+UserExpectation.prototype={__proto__:tr.model.TimedEvent.prototype,computeCompoundEvenSelectionState:function(selection){var cess=CompoundEventSelectionState.NOT_SELECTED;if(selection.contains(this))
+cess|=CompoundEventSelectionState.EVENT_SELECTED;if(this.associatedEvents.intersectionIsEmpty(selection))
+return cess;var allContained=this.associatedEvents.every(function(event){return selection.contains(event);});if(allContained)
+cess|=CompoundEventSelectionState.ALL_ASSOCIATED_EVENTS_SELECTED;else
+cess|=CompoundEventSelectionState.SOME_ASSOCIATED_EVENTS_SELECTED;return cess;},get userFriendlyName(){return this.title+' User Expectation at '+
+tr.v.Unit.byName.timeStampInMs.format(this.start);},get stableId(){return('UserExpectation.'+
+this.parentModel.userModel.expectations.indexOf(this));},get typeInfo(){if(!this.typeInfo_)
+this.typeInfo_=UserExpectation.findTypeInfo(this.constructor);if(!this.typeInfo_)
+throw new Error('Unregistered UserExpectation');return this.typeInfo_;},get colorId(){return this.typeInfo.metadata.colorId;},get stageTitle(){return this.typeInfo.metadata.stageTitle;},get initiatorTitle(){return this.initiatorTitle_;},get title(){if(!this.initiatorTitle)
+return this.stageTitle;return this.initiatorTitle+' '+this.stageTitle;},get totalCpuMs(){var cpuMs=0;this.associatedEvents.forEach(function(event){if(event.cpuSelfTime)
+cpuMs+=event.cpuSelfTime;});return cpuMs;}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);tr.b.decorateExtensionRegistry(UserExpectation,options);UserExpectation.addEventListener('will-register',function(e){var metadata=e.typeInfo.metadata;if(metadata.stageTitle===undefined){throw new Error('Registered UserExpectations must provide '+'stageTitle');}
+if(metadata.colorId===undefined){throw new Error('Registered UserExpectations must provide '+'colorId');}});tr.model.EventRegistry.register(UserExpectation,{name:'user-expectation',pluralName:'user-expectations',singleViewElementName:'tr-ui-a-single-user-expectation-sub-view',multiViewElementName:'tr-ui-a-multi-user-expectation-sub-view'});return{UserExpectation:UserExpectation};});'use strict';tr.exportTo('tr.model.um',function(){function ResponseExpectation(parentModel,initiatorTitle,start,duration,opt_isAnimationBegin){tr.model.um.UserExpectation.call(this,parentModel,initiatorTitle,start,duration);this.isAnimationBegin=opt_isAnimationBegin||false;}
+ResponseExpectation.prototype={__proto__:tr.model.um.UserExpectation.prototype,constructor:ResponseExpectation};tr.model.um.UserExpectation.register(ResponseExpectation,{stageTitle:'Response',colorId:tr.b.ColorScheme.getColorIdForReservedName('rail_response')});return{ResponseExpectation:ResponseExpectation};});'use strict';tr.exportTo('tr.v',function(){var Range=tr.b.Range;var MAX_SOURCE_INFOS=16;function NumericBase(unit){if(!(unit instanceof tr.v.Unit))
+throw new Error('Expected provided unit to be instance of Unit');this.unit=unit;}
+NumericBase.prototype={asDict:function(){var d={unit:this.unit.asJSON()};this.asDictInto_(d);return d;}};NumericBase.fromDict=function(d){if(d.type==='scalar')
+return ScalarNumeric.fromDict(d);throw new Error('Not implemented');};function NumericBin(parentNumeric,opt_range){this.parentNumeric=parentNumeric;this.range=opt_range||(new tr.b.Range());this.count=0;this.sourceInfos=[];}
+NumericBin.fromDict=function(parentNumeric,d){var n=new NumericBin(parentNumeric);n.range.min=d.min;n.range.max=d.max;n.count=d.count;n.sourceInfos=d.sourceInfos;return n;};NumericBin.prototype={add:function(value,sourceInfo){this.count+=1;tr.b.Statistics.uniformlySampleStream(this.sourceInfos,this.count,sourceInfo,MAX_SOURCE_INFOS);},addBin:function(other){if(!this.range.equals(other.range))
+throw new Error('Merging incompatible Numeric bins.');tr.b.Statistics.mergeSampledStreams(this.sourceInfos,this.count,other.sourceInfos,other.count,MAX_SOURCE_INFOS);this.count+=other.count;},asDict:function(){return{min:this.range.min,max:this.range.max,count:this.count,sourceInfos:this.sourceInfos.slice(0)};},asJSON:function(){return this.asDict();}};function Numeric(unit,range,binInfo){NumericBase.call(this,unit);this.range=range;this.numNans=0;this.nanSourceInfos=[];this.runningSum=0;this.maxCount_=0;this.underflowBin=binInfo.underflowBin;this.centralBins=binInfo.centralBins;this.centralBinWidth=binInfo.centralBinWidth;this.overflowBin=binInfo.overflowBin;this.allBins=[];this.allBins.push(this.underflowBin);this.allBins.push.apply(this.allBins,this.centralBins);this.allBins.push(this.overflowBin);this.allBins.forEach(function(bin){if(bin.count>this.maxCount_)
+this.maxCount_=bin.count;},this);}
+Numeric.fromDict=function(d){var range=Range.fromExplicitRange(d.min,d.max);var binInfo={};binInfo.underflowBin=NumericBin.fromDict(undefined,d.underflowBin);binInfo.centralBins=d.centralBins.map(function(binAsDict){return NumericBin.fromDict(undefined,binAsDict);});binInfo.centralBinWidth=d.centralBinWidth;binInfo.overflowBin=NumericBin.fromDict(undefined,d.overflowBin);var n=new Numeric(tr.v.Unit.fromJSON(d.unit),range,binInfo);n.allBins.forEach(function(bin){bin.parentNumeric=n;});n.runningSum=d.runningSum;n.numNans=d.numNans;n.nanSourceInfos=d.nanSourceInfos;return n;};Numeric.createLinear=function(unit,range,numBins){if(range.isEmpty)
+throw new Error('Nope');var binInfo={};binInfo.underflowBin=new NumericBin(this,Range.fromExplicitRange(-Number.MAX_VALUE,range.min));binInfo.overflowBin=new NumericBin(this,Range.fromExplicitRange(range.max,Number.MAX_VALUE));binInfo.centralBins=[];binInfo.centralBinWidth=range.range/numBins;for(var i=0;i<numBins;i++){var lo=range.min+(binInfo.centralBinWidth*i);var hi=lo+binInfo.centralBinWidth;binInfo.centralBins.push(new NumericBin(undefined,Range.fromExplicitRange(lo,hi)));}
+var n=new Numeric(unit,range,binInfo);n.allBins.forEach(function(bin){bin.parentNumeric=n;});return n;};Numeric.prototype={__proto__:NumericBase.prototype,get numValues(){return tr.b.Statistics.sum(this.allBins,function(e){return e.count;});},get average(){return this.runningSum/this.numValues;},get maxCount(){return this.maxCount_;},getInterpolatedCountAt:function(value){var bin=this.getBinForValue(value);var idx=this.centralBins.indexOf(bin);if(idx<0){return bin.count;}
+var lesserBin=bin;var greaterBin=bin;var lesserBinCenter=undefined;var greaterBinCenter=undefined;if(value<greaterBin.range.center){if(idx>0){lesserBin=this.centralBins[idx-1];}else{lesserBin=this.underflowBin;lesserBinCenter=lesserBin.range.max;}}else{if(idx<(this.centralBins.length-1)){greaterBin=this.centralBins[idx+1];}else{greaterBin=this.overflowBin;greaterBinCenter=greaterBin.range.min;}}
+if(greaterBinCenter===undefined)
+greaterBinCenter=greaterBin.range.center;if(lesserBinCenter===undefined)
+lesserBinCenter=lesserBin.range.center;value=tr.b.normalize(value,lesserBinCenter,greaterBinCenter);return tr.b.lerp(value,lesserBin.count,greaterBin.count);},getBinForValue:function(value){if(value<this.range.min)
+return this.underflowBin;if(value>=this.range.max)
+return this.overflowBin;var binIdx=Math.floor((value-this.range.min)/this.centralBinWidth);return this.centralBins[binIdx];},add:function(value,sourceInfo){if(typeof(value)!=='number'||isNaN(value)){this.numNans++;tr.b.Statistics.uniformlySampleStream(this.nanSourceInfos,this.numNans,sourceInfo,MAX_SOURCE_INFOS);return;}
+var bin=this.getBinForValue(value);bin.add(value,sourceInfo);this.runningSum+=value;if(bin.count>this.maxCount_)
+this.maxCount_=bin.count;},addNumeric:function(other){if(!this.range.equals(other.range)||!this.unit===other.unit||this.allBins.length!==other.allBins.length){throw new Error('Merging incompatible Numerics.');}
+tr.b.Statistics.mergeSampledStreams(this.nanSourceInfos,this.numNans,other.nanSourceInfos,other.numNans,MAX_SOURCE_INFOS);this.numNans+=other.numNans;this.runningSum+=other.runningSum;for(var i=0;i<this.allBins.length;++i){this.allBins[i].addBin(other.allBins[i]);}},clone:function(){return Numeric.fromDict(this.asDict());},asDict:function(){var d={unit:this.unit.asJSON(),min:this.range.min,max:this.range.max,numNans:this.numNans,nanSourceInfos:this.nanSourceInfos,runningSum:this.runningSum,underflowBin:this.underflowBin.asDict(),centralBins:this.centralBins.map(function(bin){return bin.asDict();}),centralBinWidth:this.centralBinWidth,overflowBin:this.overflowBin.asDict()};return d;},asJSON:function(){return this.asDict();}};function ScalarNumeric(unit,value){if(!(typeof(value)=='number'))
+throw new Error('Expected value to be number');NumericBase.call(this,unit);this.value=value;}
+ScalarNumeric.prototype={__proto__:NumericBase.prototype,asDictInto_:function(d){d.type='scalar';d.value=this.value;},toString:function(){return this.unit.format(this.value);}};ScalarNumeric.fromDict=function(d){return new ScalarNumeric(tr.v.Unit.fromJSON(d.unit),d.value);};return{NumericBase:NumericBase,NumericBin:NumericBin,Numeric:Numeric,ScalarNumeric:ScalarNumeric};});'use strict';tr.exportTo('tr.e.audits',function(){var SCHEDULING_STATE=tr.model.SCHEDULING_STATE;var Auditor=tr.c.Auditor;var AndroidModelHelper=tr.model.helpers.AndroidModelHelper;var ColorScheme=tr.b.ColorScheme;var Statistics=tr.b.Statistics;var FRAME_PERF_CLASS=tr.model.FRAME_PERF_CLASS;var Alert=tr.model.Alert;var EventInfo=tr.model.EventInfo;var ScalarNumeric=tr.v.ScalarNumeric;var timeDurationInMs=tr.v.Unit.byName.timeDurationInMs;var EXPECTED_FRAME_TIME_MS=16.67;function getStart(e){return e.start;}
+function getDuration(e){return e.duration;}
+function getCpuDuration(e){return(e.cpuDuration!==undefined)?e.cpuDuration:e.duration;}
+function frameIsActivityStart(frame){for(var i=0;i<frame.associatedEvents.length;i++){if(frame.associatedEvents[i].title=='activityStart')
+return true;}
+return false;}
+function frameMissedDeadline(frame){return frame.args['deadline']&&frame.args['deadline']<frame.end;}
+function DocLinkBuilder(){this.docLinks=[];}
+DocLinkBuilder.prototype={addAppVideo:function(name,videoId){this.docLinks.push({label:'Video Link',textContent:('Android Performance Patterns: '+name),href:'https://www.youtube.com/watch?list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE&v='+videoId});return this;},addDacRef:function(name,link){this.docLinks.push({label:'Doc Link',textContent:(name+' documentation'),href:'https://developer.android.com/reference/'+link});return this;},build:function(){return this.docLinks;}};function AndroidAuditor(model){Auditor.call(this,model);var helper=model.getOrCreateHelper(AndroidModelHelper);if(helper.apps.length||helper.surfaceFlinger)
+this.helper=helper;};AndroidAuditor.viewAlphaAlertInfo_=new EventInfo('Inefficient View alpha usage','Setting an alpha between 0 and 1 has significant performance costs, if one of the fast alpha paths is not used.',new DocLinkBuilder().addAppVideo('Hidden Cost of Transparency','wIy8g8yNhNk').addDacRef('View#setAlpha()','android/view/View.html#setAlpha(float)').build());AndroidAuditor.saveLayerAlertInfo_=new EventInfo('Expensive rendering with Canvas#saveLayer()','Canvas#saveLayer() incurs extremely high rendering cost. They disrupt the rendering pipeline when drawn, forcing a flush of drawing content. Instead use View hardware layers, or static Bitmaps. This enables the offscreen buffers to be reused in between frames, and avoids the disruptive render target switch.',new DocLinkBuilder().addAppVideo('Hidden Cost of Transparency','wIy8g8yNhNk').addDacRef('Canvas#saveLayerAlpha()','android/graphics/Canvas.html#saveLayerAlpha(android.graphics.RectF, int, int)').build());AndroidAuditor.getSaveLayerAlerts_=function(frame){var badAlphaRegEx=/^(.+) alpha caused (unclipped )?saveLayer (\d+)x(\d+)$/;var saveLayerRegEx=/^(unclipped )?saveLayer (\d+)x(\d+)$/;var ret=[];var events=[];frame.associatedEvents.forEach(function(slice){var match=badAlphaRegEx.exec(slice.title);if(match){var args={'view name':match[1],width:parseInt(match[3]),height:parseInt(match[4])};ret.push(new Alert(AndroidAuditor.viewAlphaAlertInfo_,slice.start,[slice],args));}else if(saveLayerRegEx.test(slice.title))
+events.push(slice);},this);if(events.length>ret.length){var unclippedSeen=Statistics.sum(events,function(slice){return saveLayerRegEx.exec(slice.title)[1]?1:0;});var clippedSeen=events.length-unclippedSeen;var earliestStart=Statistics.min(events,function(slice){return slice.start;});var args={'Unclipped saveLayer count (especially bad!)':unclippedSeen,'Clipped saveLayer count':clippedSeen};events.push(frame);ret.push(new Alert(AndroidAuditor.saveLayerAlertInfo_,earliestStart,events,args));}
+return ret;};AndroidAuditor.pathAlertInfo_=new EventInfo('Path texture churn','Paths are drawn with a mask texture, so when a path is modified / newly drawn, that texture must be generated and uploaded to the GPU. Ensure that you cache paths between frames and do not unnecessarily call Path#reset(). You can cut down on this cost by sharing Path object instances between drawables/views.');AndroidAuditor.getPathAlert_=function(frame){var uploadRegEx=/^Generate Path Texture$/;var events=frame.associatedEvents.filter(function(event){return event.title=='Generate Path Texture';});var start=Statistics.min(events,getStart);var duration=Statistics.sum(events,getDuration);if(duration<3)
+return undefined;events.push(frame);return new Alert(AndroidAuditor.pathAlertInfo_,start,events,{'Time spent':new ScalarNumeric(timeDurationInMs,duration)});};AndroidAuditor.uploadAlertInfo_=new EventInfo('Expensive Bitmap uploads','Bitmaps that have been modified / newly drawn must be uploaded to the GPU. Since this is expensive if the total number of pixels uploaded is large, reduce the amount of Bitmap churn in this animation/context, per frame.');AndroidAuditor.getUploadAlert_=function(frame){var uploadRegEx=/^Upload (\d+)x(\d+) Texture$/;var events=[];var start=Number.POSITIVE_INFINITY;var duration=0;var pixelsUploaded=0;frame.associatedEvents.forEach(function(event){var match=uploadRegEx.exec(event.title);if(match){events.push(event);start=Math.min(start,event.start);duration+=event.duration;pixelsUploaded+=parseInt(match[1])*parseInt(match[2]);}});if(events.length==0||duration<3)
+return undefined;var mPixels=(pixelsUploaded/1000000).toFixed(2)+' million';var args={'Pixels uploaded':mPixels,'Time spent':new ScalarNumeric(timeDurationInMs,duration)};events.push(frame);return new Alert(AndroidAuditor.uploadAlertInfo_,start,events,args);};AndroidAuditor.ListViewInflateAlertInfo_=new EventInfo('Inflation during ListView recycling','ListView item recycling involved inflating views. Ensure your Adapter#getView() recycles the incoming View, instead of constructing a new one.');AndroidAuditor.ListViewBindAlertInfo_=new EventInfo('Inefficient ListView recycling/rebinding','ListView recycling taking too much time per frame. Ensure your Adapter#getView() binds data efficiently.');AndroidAuditor.getListViewAlert_=function(frame){var events=frame.associatedEvents.filter(function(event){return event.title=='obtainView'||event.title=='setupListItem';});var duration=Statistics.sum(events,getCpuDuration);if(events.length==0||duration<3)
+return undefined;var hasInflation=false;for(var i=0;i<events.length;i++){if(events[i]instanceof tr.model.Slice&&events[i].findDescendentSlice('inflate')){hasInflation=true;break;}}
+var start=Statistics.min(events,getStart);var args={'Time spent':new ScalarNumeric(timeDurationInMs,duration)};args['ListView items '+(hasInflation?'inflated':'rebound')]=events.length/2;var eventInfo=hasInflation?AndroidAuditor.ListViewInflateAlertInfo_:AndroidAuditor.ListViewBindAlertInfo_;events.push(frame);return new Alert(eventInfo,start,events,args);};AndroidAuditor.measureLayoutAlertInfo_=new EventInfo('Expensive measure/layout pass','Measure/Layout took a significant time, contributing to jank. Avoid triggering layout during animations.',new DocLinkBuilder().addAppVideo('Invalidations, Layouts, and Performance','we6poP0kw6E').build());AndroidAuditor.getMeasureLayoutAlert_=function(frame){var events=frame.associatedEvents.filter(function(event){return event.title=='measure'||event.title=='layout';});var duration=Statistics.sum(events,getCpuDuration);if(events.length==0||duration<3)
+return undefined;var start=Statistics.min(events,getStart);events.push(frame);return new Alert(AndroidAuditor.measureLayoutAlertInfo_,start,events,{'Time spent':new ScalarNumeric(timeDurationInMs,duration)});};AndroidAuditor.viewDrawAlertInfo_=new EventInfo('Long View#draw()','Recording the drawing commands of invalidated Views took a long time. Avoid significant work in View or Drawable custom drawing, especially allocations or drawing to Bitmaps.',new DocLinkBuilder().addAppVideo('Invalidations, Layouts, and Performance','we6poP0kw6E').addAppVideo('Avoiding Allocations in onDraw()','HAK5acHQ53E').build());AndroidAuditor.getViewDrawAlert_=function(frame){var slice=undefined;for(var i=0;i<frame.associatedEvents.length;i++){if(frame.associatedEvents[i].title=='getDisplayList'||frame.associatedEvents[i].title=='Record View#draw()'){slice=frame.associatedEvents[i];break;}}
+if(!slice||getCpuDuration(slice)<3)
+return undefined;return new Alert(AndroidAuditor.viewDrawAlertInfo_,slice.start,[slice,frame],{'Time spent':new ScalarNumeric(timeDurationInMs,getCpuDuration(slice))});};AndroidAuditor.blockingGcAlertInfo_=new EventInfo('Blocking Garbage Collection','Blocking GCs are caused by object churn, and made worse by having large numbers of objects in the heap. Avoid allocating objects during animations/scrolling, and recycle Bitmaps to avoid triggering garbage collection.',new DocLinkBuilder().addAppVideo('Garbage Collection in Android','pzfzz50W5Uo').addAppVideo('Avoiding Allocations in onDraw()','HAK5acHQ53E').build());AndroidAuditor.getBlockingGcAlert_=function(frame){var events=frame.associatedEvents.filter(function(event){return event.title=='DVM Suspend'||event.title=='GC: Wait For Concurrent';});var blockedDuration=Statistics.sum(events,getDuration);if(blockedDuration<3)
+return undefined;var start=Statistics.min(events,getStart);events.push(frame);return new Alert(AndroidAuditor.blockingGcAlertInfo_,start,events,{'Blocked duration':new ScalarNumeric(timeDurationInMs,blockedDuration)});};AndroidAuditor.lockContentionAlertInfo_=new EventInfo('Lock contention','UI thread lock contention is caused when another thread holds a lock that the UI thread is trying to use. UI thread progress is blocked until the lock is released. Inspect locking done within the UI thread, and ensure critical sections are short.');AndroidAuditor.getLockContentionAlert_=function(frame){var events=frame.associatedEvents.filter(function(event){return/^Lock Contention on /.test(event.title);});var blockedDuration=Statistics.sum(events,getDuration);if(blockedDuration<1)
+return undefined;var start=Statistics.min(events,getStart);events.push(frame);return new Alert(AndroidAuditor.lockContentionAlertInfo_,start,events,{'Blocked duration':new ScalarNumeric(timeDurationInMs,blockedDuration)});};AndroidAuditor.schedulingAlertInfo_=new EventInfo('Scheduling delay','Work to produce this frame was descheduled for several milliseconds, contributing to jank. Ensure that code on the UI thread doesn\'t block on work being done on other threads, and that background threads (doing e.g. network or bitmap loading) are running at android.os.Process#THREAD_PRIORITY_BACKGROUND or lower so they are less likely to interrupt the UI thread. These background threads should show up with a priority number of 130 or higher in the scheduling section under the Kernel process.');AndroidAuditor.getSchedulingAlert_=function(frame){var totalDuration=0;var totalStats={};frame.threadTimeRanges.forEach(function(ttr){var stats=ttr.thread.getSchedulingStatsForRange(ttr.start,ttr.end);tr.b.iterItems(stats,function(key,value){if(!(key in totalStats))
+totalStats[key]=0;totalStats[key]+=value;totalDuration+=value;});});if(!(SCHEDULING_STATE.RUNNING in totalStats)||totalDuration==0||totalDuration-totalStats[SCHEDULING_STATE.RUNNING]<3)
+return;var args={};tr.b.iterItems(totalStats,function(key,value){if(key===SCHEDULING_STATE.RUNNABLE)
+key='Not scheduled, but runnable';else if(key===SCHEDULING_STATE.UNINTR_SLEEP)
+key='Blocking I/O delay';args[key]=new ScalarNumeric(timeDurationInMs,value);});return new Alert(AndroidAuditor.schedulingAlertInfo_,frame.start,[frame],args);};AndroidAuditor.prototype={__proto__:Auditor.prototype,renameAndSort_:function(){this.model.kernel.important=false;this.model.getAllProcesses().forEach(function(process){if(this.helper.surfaceFlinger&&process==this.helper.surfaceFlinger.process){if(!process.name)
+process.name='SurfaceFlinger';process.sortIndex=Number.NEGATIVE_INFINITY;process.important=false;return;}
+var uiThread=process.getThread(process.pid);if(!process.name&&uiThread&&uiThread.name){if(/^ndroid\./.test(uiThread.name))
+uiThread.name='a'+uiThread.name;process.name=uiThread.name;uiThread.name='UI Thread';}
+process.sortIndex=0;for(var tid in process.threads){process.sortIndex-=process.threads[tid].sliceGroup.slices.length;}},this);this.model.getAllThreads().forEach(function(thread){if(thread.tid==thread.parent.pid)
+thread.sortIndex=-3;if(thread.name=='RenderThread')
+thread.sortIndex=-2;if(/^hwuiTask/.test(thread.name))
+thread.sortIndex=-1;});},pushFramesAndJudgeJank_:function(){var badFramesObserved=0;var framesObserved=0;var surfaceFlinger=this.helper.surfaceFlinger;this.helper.apps.forEach(function(app){app.process.frames=app.getFrames();app.process.frames.forEach(function(frame){if(frame.totalDuration>EXPECTED_FRAME_TIME_MS*2){badFramesObserved+=2;frame.perfClass=FRAME_PERF_CLASS.TERRIBLE;}else if(frame.totalDuration>EXPECTED_FRAME_TIME_MS||frameMissedDeadline(frame)){badFramesObserved++;frame.perfClass=FRAME_PERF_CLASS.BAD;}else{frame.perfClass=FRAME_PERF_CLASS.GOOD;}});framesObserved+=app.process.frames.length;});if(framesObserved){var portionBad=badFramesObserved/framesObserved;if(portionBad>0.3)
+this.model.faviconHue='red';else if(portionBad>0.05)
+this.model.faviconHue='yellow';else
+this.model.faviconHue='green';}},pushEventInfo_:function(){var appAnnotator=new AppAnnotator();this.helper.apps.forEach(function(app){if(app.uiThread)
+appAnnotator.applyEventInfos(app.uiThread.sliceGroup);if(app.renderThread)
+appAnnotator.applyEventInfos(app.renderThread.sliceGroup);});},runAnnotate:function(){if(!this.helper)
+return;this.renameAndSort_();this.pushFramesAndJudgeJank_();this.pushEventInfo_();this.helper.iterateImportantSlices(function(slice){slice.important=true;});},runAudit:function(){if(!this.helper)
+return;var alerts=this.model.alerts;this.helper.apps.forEach(function(app){app.getFrames().forEach(function(frame){alerts.push.apply(alerts,AndroidAuditor.getSaveLayerAlerts_(frame));if(frame.perfClass==FRAME_PERF_CLASS.NEUTRAL||frame.perfClass==FRAME_PERF_CLASS.GOOD)
+return;var alert=AndroidAuditor.getPathAlert_(frame);if(alert)
+alerts.push(alert);var alert=AndroidAuditor.getUploadAlert_(frame);if(alert)
+alerts.push(alert);var alert=AndroidAuditor.getListViewAlert_(frame);if(alert)
+alerts.push(alert);var alert=AndroidAuditor.getMeasureLayoutAlert_(frame);if(alert)
+alerts.push(alert);var alert=AndroidAuditor.getViewDrawAlert_(frame);if(alert)
+alerts.push(alert);var alert=AndroidAuditor.getBlockingGcAlert_(frame);if(alert)
+alerts.push(alert);var alert=AndroidAuditor.getLockContentionAlert_(frame);if(alert)
+alerts.push(alert);var alert=AndroidAuditor.getSchedulingAlert_(frame);if(alert)
+alerts.push(alert);});},this);this.addRenderingInteractionRecords();this.addInputInteractionRecords();},addRenderingInteractionRecords:function(){var events=[];this.helper.apps.forEach(function(app){events.push.apply(events,app.getAnimationAsyncSlices());events.push.apply(events,app.getFrames());});var mergerFunction=function(events){var ir=new tr.model.um.ResponseExpectation(this.model,'Rendering',events[0].min,events[events.length-1].max-events[0].min);this.model.userModel.expectations.push(ir);}.bind(this);tr.b.mergeRanges(tr.b.convertEventsToRanges(events),30,mergerFunction);},addInputInteractionRecords:function(){var inputSamples=[];this.helper.apps.forEach(function(app){inputSamples.push.apply(inputSamples,app.getInputSamples());});var mergerFunction=function(events){var ir=new tr.model.um.ResponseExpectation(this.model,'Input',events[0].min,events[events.length-1].max-events[0].min);this.model.userModel.expectations.push(ir);}.bind(this);var inputRanges=inputSamples.map(function(sample){return tr.b.Range.fromExplicitRange(sample.timestamp,sample.timestamp);});tr.b.mergeRanges(inputRanges,30,mergerFunction);}};Auditor.register(AndroidAuditor);function AppAnnotator(){this.titleInfoLookup={};this.titleParentLookup={};this.build_();}
+AppAnnotator.prototype={build_:function(){var registerEventInfo=function(dict){this.titleInfoLookup[dict.title]=new EventInfo(dict.title,dict.description,dict.docLinks);if(dict.parents)
+this.titleParentLookup[dict.title]=dict.parents;}.bind(this);registerEventInfo({title:'inflate',description:'Constructing a View hierarchy from pre-processed XML via LayoutInflater#layout. This includes constructing all of the View objects in the hierarchy, and applying styled attributes.'});registerEventInfo({title:'obtainView',description:'Adapter#getView() called to bind content to a recycled View that is being presented.'});registerEventInfo({title:'setupListItem',description:'Attached a newly-bound, recycled View to its parent ListView.'});registerEventInfo({title:'setupGridItem',description:'Attached a newly-bound, recycled View to its parent GridView.'});var choreographerLinks=new DocLinkBuilder().addDacRef('Choreographer','android/view/Choreographer.html').build();registerEventInfo({title:'Choreographer#doFrame',docLinks:choreographerLinks,description:'Choreographer executes frame callbacks for inputs, animations, and rendering traversals. When this work is done, a frame will be presented to the user.'});registerEventInfo({title:'input',parents:['Choreographer#doFrame'],docLinks:choreographerLinks,description:'Input callbacks are processed. This generally encompasses dispatching input to Views, as well as any work the Views do to process this input/gesture.'});registerEventInfo({title:'animation',parents:['Choreographer#doFrame'],docLinks:choreographerLinks,description:'Animation callbacks are processed. This is generally minimal work, as animations determine progress for the frame, and push new state to animated objects (such as setting View properties).'});registerEventInfo({title:'traversals',parents:['Choreographer#doFrame'],docLinks:choreographerLinks,description:'Primary draw traversals. This is the primary traversal of the View hierarchy, including layout and draw passes.'});var traversalParents=['Choreographer#doFrame','performTraversals'];var layoutLinks=new DocLinkBuilder().addDacRef('View#Layout','android/view/View.html#Layout').build();registerEventInfo({title:'performTraversals',description:'A drawing traversal of the View hierarchy, comprised of all layout and drawing needed to produce the frame.'});registerEventInfo({title:'measure',parents:traversalParents,docLinks:layoutLinks,description:'First of two phases in view hierarchy layout. Views are asked to size themselves according to constraints supplied by their parent. Some ViewGroups may measure a child more than once to help satisfy their own constraints. Nesting ViewGroups that measure children more than once can lead to excessive and repeated work.'});registerEventInfo({title:'layout',parents:traversalParents,docLinks:layoutLinks,description:'Second of two phases in view hierarchy layout, repositioning content and child Views into their new locations.'});var drawString='Draw pass over the View hierarchy. Every invalidated View will have its drawing commands recorded. On Android versions prior to Lollipop, this would also include the issuing of draw commands to the GPU. Starting with Lollipop, it only includes the recording of commands, and syncing that information to the RenderThread.';registerEventInfo({title:'draw',parents:traversalParents,description:drawString});var recordString='Every invalidated View\'s drawing commands are recorded. Each will have View#draw() called, and is passed a Canvas that will record and store its drawing commands until it is next invalidated/rerecorded.';registerEventInfo({title:'getDisplayList',parents:['draw'],description:recordString});registerEventInfo({title:'Record View#draw()',parents:['draw'],description:recordString});registerEventInfo({title:'drawDisplayList',parents:['draw'],description:'Execution of recorded draw commands to generate a frame. This represents the actual formation and issuing of drawing commands to the GPU. On Android L and higher devices, this work is done on a dedicated RenderThread, instead of on the UI Thread.'});registerEventInfo({title:'DrawFrame',description:'RenderThread portion of the standard UI/RenderThread split frame. This represents the actual formation and issuing of drawing commands to the GPU.'});registerEventInfo({title:'doFrame',description:'RenderThread animation frame. Represents drawing work done by the RenderThread on a frame where the UI thread did not produce new drawing content.'});registerEventInfo({title:'syncFrameState',description:'Sync stage between the UI thread and the RenderThread, where the UI thread hands off a frame (including information about modified Views). Time in this method primarily consists of uploading modified Bitmaps to the GPU. After this sync is completed, the UI thread is unblocked, and the RenderThread starts to render the frame.'});registerEventInfo({title:'flush drawing commands',description:'Issuing the now complete drawing commands to the GPU.'});registerEventInfo({title:'eglSwapBuffers',description:'Complete GPU rendering of the frame.'});registerEventInfo({title:'RV Scroll',description:'RecyclerView is calculating a scroll. If there are too many of these in Systrace, some Views inside RecyclerView might be causing it. Try to avoid using EditText, focusable views or handle them with care.'});registerEventInfo({title:'RV OnLayout',description:'OnLayout has been called by the View system. If this shows up too many times in Systrace, make sure the children of RecyclerView do not update themselves directly. This will cause a full re-layout but when it happens via the Adapter notifyItemChanged, RecyclerView can avoid full layout calculation.'});registerEventInfo({title:'RV FullInvalidate',description:'NotifyDataSetChanged or equal has been called. If this is taking a long time, try sending granular notify adapter changes instead of just calling notifyDataSetChanged or setAdapter / swapAdapter. Adding stable ids to your adapter might help.'});registerEventInfo({title:'RV PartialInvalidate',description:'RecyclerView is rebinding a View. If this is taking a lot of time, consider optimizing your layout or make sure you are not doing extra operations in onBindViewHolder call.'});registerEventInfo({title:'RV OnBindView',description:'RecyclerView is rebinding a View. If this is taking a lot of time, consider optimizing your layout or make sure you are not doing extra operations in onBindViewHolder call.'});registerEventInfo({title:'RV CreateView',description:'RecyclerView is creating a new View. If too many of these are present: 1) There might be a problem in Recycling (e.g. custom Animations that set transient state and prevent recycling or ItemAnimator not implementing the contract properly. See Adapter#onFailedToRecycleView(ViewHolder). 2) There may be too many item view types. Try merging them. 3) There might be too many itemChange animations and not enough space in RecyclerPool. Try increasing your pool size and item cache size.'});registerEventInfo({title:'eglSwapBuffers',description:'The CPU has finished producing drawing commands, and is flushing drawing work to the GPU, and posting that buffer to the consumer (which is often SurfaceFlinger window composition). Once this is completed, the GPU can produce the frame content without any involvement from the CPU.'});},applyEventInfosRecursive_:function(parentNames,slice){var checkExpectedParentNames=function(expectedParentNames){if(!expectedParentNames)
+return true;return expectedParentNames.some(function(name){return name in parentNames;});};if(slice.title in this.titleInfoLookup){if(checkExpectedParentNames(this.titleParentLookup[slice.title]))
+slice.info=this.titleInfoLookup[slice.title];}
+if(slice.subSlices.length>0){if(!(slice.title in parentNames))
+parentNames[slice.title]=0;parentNames[slice.title]++;slice.subSlices.forEach(function(subSlice){this.applyEventInfosRecursive_(parentNames,subSlice);},this);parentNames[slice.title]--;if(parentNames[slice.title]==0)
+delete parentNames[slice.title];}},applyEventInfos:function(sliceGroup){sliceGroup.topLevelSlices.forEach(function(slice){this.applyEventInfosRecursive_({},slice);},this);}};return{AndroidAuditor:AndroidAuditor};});'use strict';tr.exportTo('tr.model.helpers',function(){var MAIN_FRAMETIME_TYPE='main_frametime_type';var IMPL_FRAMETIME_TYPE='impl_frametime_type';var MAIN_RENDERING_STATS='BenchmarkInstrumentation::MainThreadRenderingStats';var IMPL_RENDERING_STATS='BenchmarkInstrumentation::ImplThreadRenderingStats';function getSlicesIntersectingRange(rangeOfInterest,slices){var slicesInFilterRange=[];for(var i=0;i<slices.length;i++){var slice=slices[i];if(rangeOfInterest.intersectsExplicitRangeInclusive(slice.start,slice.end))
+slicesInFilterRange.push(slice);}
+return slicesInFilterRange;}
+function ChromeProcessHelper(modelHelper,process){this.modelHelper=modelHelper;this.process=process;}
+ChromeProcessHelper.prototype={get pid(){return this.process.pid;},getFrameEventsInRange:function(frametimeType,range){var titleToGet;if(frametimeType==MAIN_FRAMETIME_TYPE)
+titleToGet=MAIN_RENDERING_STATS;else
+titleToGet=IMPL_RENDERING_STATS;var frameEvents=[];this.process.iterateAllEvents(function(event){if(event.title!==titleToGet)
+return;if(range.intersectsExplicitRangeInclusive(event.start,event.end))
+frameEvents.push(event);});frameEvents.sort(function(a,b){return a.start-b.start});return frameEvents;}};function getFrametimeDataFromEvents(frameEvents){var frametimeData=[];for(var i=1;i<frameEvents.length;i++){var diff=frameEvents[i].start-frameEvents[i-1].start;frametimeData.push({'x':frameEvents[i].start,'frametime':diff});}
+return frametimeData;}
+return{ChromeProcessHelper:ChromeProcessHelper,MAIN_FRAMETIME_TYPE:MAIN_FRAMETIME_TYPE,IMPL_FRAMETIME_TYPE:IMPL_FRAMETIME_TYPE,MAIN_RENDERING_STATS:MAIN_RENDERING_STATS,IMPL_RENDERING_STATS:IMPL_RENDERING_STATS,getSlicesIntersectingRange:getSlicesIntersectingRange,getFrametimeDataFromEvents:getFrametimeDataFromEvents};});'use strict';tr.exportTo('tr.model.helpers',function(){function ChromeBrowserHelper(modelHelper,process){tr.model.helpers.ChromeProcessHelper.call(this,modelHelper,process);this.mainThread_=process.findAtMostOneThreadNamed('CrBrowserMain');}
+ChromeBrowserHelper.isBrowserProcess=function(process){return!!process.findAtMostOneThreadNamed('CrBrowserMain');};ChromeBrowserHelper.prototype={__proto__:tr.model.helpers.ChromeProcessHelper.prototype,get rendererHelpers(){return this.modelHelper.rendererHelpers;},getLoadingEventsInRange:function(rangeOfInterest){return this.getAllAsyncSlicesMatching(function(slice){return slice.title.indexOf('WebContentsImpl Loading')===0&&rangeOfInterest.intersectsExplicitRangeInclusive(slice.start,slice.end);});},getCommitProvisionalLoadEventsInRange:function(rangeOfInterest){return this.getAllAsyncSlicesMatching(function(slice){return slice.title==='RenderFrameImpl::didCommitProvisionalLoad'&&rangeOfInterest.intersectsExplicitRangeInclusive(slice.start,slice.end);});},get hasLatencyEvents(){var hasLatency=false;this.modelHelper.model.getAllThreads().some(function(thread){thread.iterateAllEvents(function(event){if(!event.isTopLevel)
+return;if(!(event instanceof tr.e.cc.InputLatencyAsyncSlice))
+return;hasLatency=true;});return hasLatency;});return hasLatency;},getLatencyEventsInRange:function(rangeOfInterest){return this.getAllAsyncSlicesMatching(function(slice){return(slice.title.indexOf('InputLatency')===0)&&rangeOfInterest.intersectsExplicitRangeInclusive(slice.start,slice.end);});},getAllAsyncSlicesMatching:function(pred,opt_this){var events=[];this.iterAllThreads(function(thread){thread.iterateAllEvents(function(slice){if(pred.call(opt_this,slice))
+events.push(slice);});});return events;},getAllNetworkEventsInRange:function(rangeOfInterest){var networkEvents=[];this.modelHelper.model.getAllThreads().forEach(function(thread){thread.asyncSliceGroup.slices.forEach(function(slice){var match=false;if(slice.category=='net'||slice.category=='disabled-by-default-netlog'||slice.category=='netlog'){match=true;}
+if(!match)
+return;if(rangeOfInterest.intersectsExplicitRangeInclusive(slice.start,slice.end))
+networkEvents.push(slice);});});return networkEvents;},iterAllThreads:function(func,opt_this){tr.b.iterItems(this.process.threads,function(tid,thread){func.call(opt_this,thread);});tr.b.iterItems(this.rendererHelpers,function(pid,rendererHelper){var rendererProcess=rendererHelper.process;tr.b.iterItems(rendererProcess.threads,function(tid,thread){func.call(opt_this,thread);});},this);}};return{ChromeBrowserHelper:ChromeBrowserHelper};});'use strict';tr.exportTo('tr.model.helpers',function(){function ChromeGpuHelper(modelHelper,process){tr.model.helpers.ChromeProcessHelper.call(this,modelHelper,process);this.mainThread_=process.findAtMostOneThreadNamed('CrGpuMain');};ChromeGpuHelper.isGpuProcess=function(process){if(process.findAtMostOneThreadNamed('CrBrowserMain')||process.findAtMostOneThreadNamed('CrRendererMain'))
+return false;return process.findAtMostOneThreadNamed('CrGpuMain');};ChromeGpuHelper.prototype={__proto__:tr.model.helpers.ChromeProcessHelper.prototype,get mainThread(){return this.mainThread_;}};return{ChromeGpuHelper:ChromeGpuHelper};});'use strict';tr.exportTo('tr.model.helpers',function(){function ChromeRendererHelper(modelHelper,process){tr.model.helpers.ChromeProcessHelper.call(this,modelHelper,process);this.mainThread_=process.findAtMostOneThreadNamed('CrRendererMain');this.compositorThread_=process.findAtMostOneThreadNamed('Compositor');this.rasterWorkerThreads_=process.findAllThreadsMatching(function(t){if(t.name===undefined)
+return false;if(t.name.indexOf('CompositorTileWorker')===0)
+return true;if(t.name.indexOf('CompositorRasterWorker')===0)
+return true;return false;});};ChromeRendererHelper.isRenderProcess=function(process){if(!process.findAtMostOneThreadNamed('CrRendererMain'))
+return false;if(!process.findAtMostOneThreadNamed('Compositor'))
+return false;return true;};ChromeRendererHelper.prototype={__proto__:tr.model.helpers.ChromeProcessHelper.prototype,get mainThread(){return this.mainThread_;},get compositorThread(){return this.compositorThread_;},get rasterWorkerThreads(){return this.rasterWorkerThreads_;}};return{ChromeRendererHelper:ChromeRendererHelper};});'use strict';tr.exportTo('tr.model.helpers',function(){function findChromeBrowserProcess(model){var browserProcesses=[];model.getAllProcesses().forEach(function(process){if(!tr.model.helpers.ChromeBrowserHelper.isBrowserProcess(process))
+return;browserProcesses.push(process);},this);if(browserProcesses.length===0)
+return undefined;if(browserProcesses.length>1)
+return undefined;return browserProcesses[0];}
+function findChromeRenderProcesses(model){var rendererProcesses=[];model.getAllProcesses().forEach(function(process){if(!tr.model.helpers.ChromeRendererHelper.isRenderProcess(process))
+return;rendererProcesses.push(process);});return rendererProcesses;}
+function findChromeGpuProcess(model){var gpuProcesses=model.getAllProcesses().filter(tr.model.helpers.ChromeGpuHelper.isGpuProcess);if(gpuProcesses.length!=1)
+return undefined;return gpuProcesses[0];}
+function ChromeModelHelper(model){this.model_=model;this.browserProcess_=findChromeBrowserProcess(model);if(this.browserProcess_){this.browserHelper_=new tr.model.helpers.ChromeBrowserHelper(this,this.browserProcess_);}else{this.browserHelper_=undefined;}
+var gpuProcess=findChromeGpuProcess(model);if(gpuProcess){this.gpuHelper_=new tr.model.helpers.ChromeGpuHelper(this,gpuProcess);}else{this.gpuHelper_=undefined;}
+var rendererProcesses_=findChromeRenderProcesses(model);this.rendererHelpers_={};rendererProcesses_.forEach(function(renderProcess){var rendererHelper=new tr.model.helpers.ChromeRendererHelper(this,renderProcess);this.rendererHelpers_[rendererHelper.pid]=rendererHelper;},this);}
+ChromeModelHelper.guid=tr.b.GUID.allocate();ChromeModelHelper.supportsModel=function(model){if(findChromeBrowserProcess(model)!==undefined)
+return true;if(findChromeRenderProcesses(model).length)
+return true;return false;};ChromeModelHelper.prototype={get pid(){throw new Error('woah');},get process(){throw new Error('woah');},get model(){return this.model_;},get browserProcess(){return this.browserProcess_;},get browserHelper(){return this.browserHelper_;},get gpuHelper(){return this.gpuHelper_;},get rendererHelpers(){return this.rendererHelpers_;}};return{ChromeModelHelper:ChromeModelHelper};});'use strict';tr.exportTo('tr.model',function(){function AsyncSlice(category,title,colorId,start,args,duration,opt_isTopLevel,opt_cpuStart,opt_cpuDuration,opt_argsStripped){tr.model.TimedEvent.call(this,start);this.category=category||'';this.originalTitle=title;this.title=title;this.colorId=colorId;this.args=args;this.startStackFrame=undefined;this.endStackFrame=undefined;this.didNotFinish=false;this.important=false;this.subSlices=[];this.parentContainer_=undefined;this.id=undefined;this.startThread=undefined;this.endThread=undefined;this.cpuStart=undefined;this.cpuDuration=undefined;this.argsStripped=false;this.startStackFrame=undefined;this.endStackFrame=undefined;this.duration=duration;this.isTopLevel=(opt_isTopLevel===true);if(opt_cpuStart!==undefined)
+this.cpuStart=opt_cpuStart;if(opt_cpuDuration!==undefined)
+this.cpuDuration=opt_cpuDuration;if(opt_argsStripped!==undefined)
+this.argsStripped=opt_argsStripped;};AsyncSlice.prototype={__proto__:tr.model.TimedEvent.prototype,get analysisTypeName(){return this.title;},get parentContainer(){return this.parentContainer_;},set parentContainer(parentContainer){this.parentContainer_=parentContainer;for(var i=0;i<this.subSlices.length;i++){var subSlice=this.subSlices[i];if(subSlice.parentContainer===undefined)
+subSlice.parentContainer=parentContainer;}},get viewSubGroupTitle(){return this.title;},get userFriendlyName(){return'Async slice '+this.title+' at '+
+tr.v.Unit.byName.timeStampInMs.format(this.start);},get stableId(){var parentAsyncSliceGroup=this.parentContainer.asyncSliceGroup;return parentAsyncSliceGroup.stableId+'.'+
+parentAsyncSliceGroup.slices.indexOf(this);},findDescendentSlice:function(targetTitle){if(!this.subSlices)
+return undefined;for(var i=0;i<this.subSlices.length;i++){if(this.subSlices[i].title==targetTitle)
+return this.subSlices[i];var slice=this.subSlices[i].findDescendentSlice(targetTitle);if(slice)return slice;}
+return undefined;},iterateAllDescendents:function(callback,opt_this){this.subSlices.forEach(callback,opt_this);this.subSlices.forEach(function(subSlice){subSlice.iterateAllDescendents(callback,opt_this);},opt_this);},compareTo:function(that){return this.title.localeCompare(that.title);}};tr.model.EventRegistry.register(AsyncSlice,{name:'asyncSlice',pluralName:'asyncSlices',singleViewElementName:'tr-ui-a-single-async-slice-sub-view',multiViewElementName:'tr-ui-a-multi-async-slice-sub-view'});var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=AsyncSlice;options.defaultConstructor=AsyncSlice;tr.b.decorateExtensionRegistry(AsyncSlice,options);return{AsyncSlice:AsyncSlice};});'use strict';tr.exportTo('tr.e.cc',function(){var AsyncSlice=tr.model.AsyncSlice;var EventSet=tr.model.EventSet;var UI_COMP_NAME='INPUT_EVENT_LATENCY_UI_COMPONENT';var ORIGINAL_COMP_NAME='INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT';var BEGIN_COMP_NAME='INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT';var END_COMP_NAME='INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT';var MAIN_RENDERER_THREAD_NAME='CrRendererMain';var COMPOSITOR_THREAD_NAME='Compositor';var POSTTASK_FLOW_EVENT='disabled-by-default-toplevel.flow';var IPC_FLOW_EVENT='disabled-by-default-ipc.flow';var INPUT_EVENT_TYPE_NAMES={CHAR:'Char',CLICK:'GestureClick',CONTEXT_MENU:'ContextMenu',FLING_CANCEL:'GestureFlingCancel',FLING_START:'GestureFlingStart',KEY_DOWN:'KeyDown',KEY_DOWN_RAW:'RawKeyDown',KEY_UP:'KeyUp',LATENCY_SCROLL_UPDATE:'ScrollUpdate',MOUSE_DOWN:'MouseDown',MOUSE_ENTER:'MouseEnter',MOUSE_LEAVE:'MouseLeave',MOUSE_MOVE:'MouseMove',MOUSE_UP:'MouseUp',MOUSE_WHEEL:'MouseWheel',PINCH_BEGIN:'GesturePinchBegin',PINCH_END:'GesturePinchEnd',PINCH_UPDATE:'GesturePinchUpdate',SCROLL_BEGIN:'GestureScrollBegin',SCROLL_END:'GestureScrollEnd',SCROLL_UPDATE:'GestureScrollUpdate',SCROLL_UPDATE_RENDERER:'ScrollUpdate',SHOW_PRESS:'GestureShowPress',TAP:'GestureTap',TAP_CANCEL:'GestureTapCancel',TAP_DOWN:'GestureTapDown',TOUCH_CANCEL:'TouchCancel',TOUCH_END:'TouchEnd',TOUCH_MOVE:'TouchMove',TOUCH_START:'TouchStart',UNKNOWN:'UNKNOWN'};function InputLatencyAsyncSlice(){AsyncSlice.apply(this,arguments);this.associatedEvents_=new EventSet();this.typeName_=undefined;if(!this.isLegacyEvent)
+this.determineModernTypeName_();}
+InputLatencyAsyncSlice.prototype={__proto__:AsyncSlice.prototype,get isLegacyEvent(){return this.title==='InputLatency';},get typeName(){if(!this.typeName_)
+this.determineLegacyTypeName_();return this.typeName_;},checkTypeName_:function(){if(!this.typeName_)
+throw'Unable to determine typeName';var found=false;for(var type_name in INPUT_EVENT_TYPE_NAMES){if(this.typeName===INPUT_EVENT_TYPE_NAMES[type_name]){found=true;break;}}
+if(!found)
+this.typeName_=INPUT_EVENT_TYPE_NAMES.UNKNOWN;},determineModernTypeName_:function(){var lastColonIndex=this.title.lastIndexOf(':');if(lastColonIndex<0)
+return;var characterAfterLastColonIndex=lastColonIndex+1;this.typeName_=this.title.slice(characterAfterLastColonIndex);this.checkTypeName_();},determineLegacyTypeName_:function(){this.iterateAllDescendents(function(subSlice){var subSliceIsAInputLatencyAsyncSlice=(subSlice instanceof InputLatencyAsyncSlice);if(!subSliceIsAInputLatencyAsyncSlice)
+return;if(!subSlice.typeName)
+return;if(this.typeName_&&subSlice.typeName_){var subSliceHasDifferentTypeName=(this.typeName_!==subSlice.typeName_);if(subSliceHasDifferentTypeName){throw'InputLatencyAsyncSlice.determineLegacyTypeName_() '+' found multiple typeNames';}}
+this.typeName_=subSlice.typeName_;},this);if(!this.typeName_)
+throw'InputLatencyAsyncSlice.determineLegacyTypeName_() failed';this.checkTypeName_();},getRendererHelper:function(sourceSlices){var traceModel=this.startThread.parent.model;var modelHelper=traceModel.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);if(!modelHelper)
+return undefined;var mainThread=undefined;var compositorThread=undefined;for(var i in sourceSlices){if(sourceSlices[i].parentContainer.name===MAIN_RENDERER_THREAD_NAME)
+mainThread=sourceSlices[i].parentContainer;else if(sourceSlices[i].parentContainer.name===COMPOSITOR_THREAD_NAME)
+compositorThread=sourceSlices[i].parentContainer;if(mainThread&&compositorThread)
+break;}
+var rendererHelpers=modelHelper.rendererHelpers;var pids=Object.keys(rendererHelpers);for(var i=0;i<pids.length;i++){var pid=pids[i];var rendererHelper=rendererHelpers[pid];if(rendererHelper.mainThread===mainThread||rendererHelper.compositorThread===compositorThread)
+return rendererHelper;}
+return undefined;},addEntireSliceHierarchy:function(slice){this.associatedEvents_.push(slice);slice.iterateAllSubsequentSlices(function(subsequentSlice){this.associatedEvents_.push(subsequentSlice);},this);},addDirectlyAssociatedEvents:function(flowEvents){var slices=[];flowEvents.forEach(function(flowEvent){this.associatedEvents_.push(flowEvent);var newSource=flowEvent.startSlice.mostTopLevelSlice;if(slices.indexOf(newSource)===-1)
+slices.push(newSource);},this);var lastFlowEvent=flowEvents[flowEvents.length-1];var lastSource=lastFlowEvent.endSlice.mostTopLevelSlice;if(slices.indexOf(lastSource)===-1)
+slices.push(lastSource);return slices;},addScrollUpdateEvents:function(rendererHelper){if(!rendererHelper||!rendererHelper.compositorThread)
+return;var compositorThread=rendererHelper.compositorThread;var gestureScrollUpdateStart=this.start;var gestureScrollUpdateEnd=this.end;var allCompositorAsyncSlices=compositorThread.asyncSliceGroup.slices;for(var i in allCompositorAsyncSlices){var slice=allCompositorAsyncSlices[i];if(slice.title!=='Latency::ScrollUpdate')
+continue;var parentId=slice.args.data.INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT.sequence_number;if(parentId===undefined){if(slice.start<gestureScrollUpdateStart||slice.start>=gestureScrollUpdateEnd)
+continue;}else{if(parseInt(parentId)!==parseInt(this.id))
+continue;}
+slice.associatedEvents.forEach(function(event){this.associatedEvents_.push(event);},this);break;}},belongToOtherInputs:function(slice,flowEvents){var fromOtherInputs=false;slice.iterateEntireHierarchy(function(subsequentSlice){if(fromOtherInputs)
+return;subsequentSlice.inFlowEvents.forEach(function(inflow){if(fromOtherInputs)
+return;if(inflow.category.indexOf('input')>-1){if(flowEvents.indexOf(inflow)===-1)
+fromOtherInputs=true;}},this);},this);return fromOtherInputs;},triggerOtherInputs:function(event,flowEvents){if(event.outFlowEvents===undefined||event.outFlowEvents.length===0)
+return false;var flow=event.outFlowEvents[0];if(flow.category!==POSTTASK_FLOW_EVENT||!flow.endSlice)
+return false;var endSlice=flow.endSlice;if(this.belongToOtherInputs(endSlice.mostTopLevelSlice,flowEvents))
+return true;return false;},followSubsequentSlices:function(event,queue,visited,flowEvents){var stopFollowing=false;var inputAck=false;event.iterateAllSubsequentSlices(function(slice){if(stopFollowing)
+return;if(slice.title==='TaskQueueManager::RunTask')
+return;if(slice.title==='ThreadProxy::ScheduledActionSendBeginMainFrame')
+return;if(slice.title==='Scheduler::ScheduleBeginImplFrameDeadline'){if(this.triggerOtherInputs(slice,flowEvents))
+return;}
+if(slice.title==='CompositorImpl::PostComposite'){if(this.triggerOtherInputs(slice,flowEvents))
+return;}
+if(slice.title==='InputRouterImpl::ProcessInputEventAck')
+inputAck=true;if(inputAck&&slice.title==='InputRouterImpl::FilterAndSendWebInputEvent')
+stopFollowing=true;this.followCurrentSlice(slice,queue,visited);},this);},followCurrentSlice:function(event,queue,visited){event.outFlowEvents.forEach(function(outflow){if((outflow.category===POSTTASK_FLOW_EVENT||outflow.category===IPC_FLOW_EVENT)&&outflow.endSlice){this.associatedEvents_.push(outflow);var nextEvent=outflow.endSlice.mostTopLevelSlice;if(!visited.contains(nextEvent)){visited.push(nextEvent);queue.push(nextEvent);}}},this);},backtraceFromDraw:function(beginImplFrame,visited){var pendingEventQueue=[];pendingEventQueue.push(beginImplFrame.mostTopLevelSlice);while(pendingEventQueue.length!==0){var event=pendingEventQueue.pop();this.addEntireSliceHierarchy(event);event.inFlowEvents.forEach(function(inflow){if(inflow.category===POSTTASK_FLOW_EVENT&&inflow.startSlice){var nextEvent=inflow.startSlice.mostTopLevelSlice;if(!visited.contains(nextEvent)){visited.push(nextEvent);pendingEventQueue.push(nextEvent);}}},this);}},sortRasterizerSlices:function(rasterWorkerThreads,sortedRasterizerSlices){rasterWorkerThreads.forEach(function(rasterizer){Array.prototype.push.apply(sortedRasterizerSlices,rasterizer.sliceGroup.slices);},this);sortedRasterizerSlices.sort(function(a,b){if(a.start!==b.start)
+return a.start-b.start;return a.guid-b.guid;});},addRasterizationEvents:function(prepareTiles,rendererHelper,visited,flowEvents,sortedRasterizerSlices){if(!prepareTiles.args.prepare_tiles_id)
+return;if(!rendererHelper||!rendererHelper.rasterWorkerThreads)
+return;var rasterWorkerThreads=rendererHelper.rasterWorkerThreads;var prepare_tile_id=prepareTiles.args.prepare_tiles_id;var pendingEventQueue=[];if(sortedRasterizerSlices.length===0)
+this.sortRasterizerSlices(rasterWorkerThreads,sortedRasterizerSlices);var numFinishedTasks=0;var RASTER_TASK_TITLE='RasterizerTaskImpl::RunOnWorkerThread';var IMAGEDECODE_TASK_TITLE='ImageDecodeTaskImpl::RunOnWorkerThread';var FINISHED_TASK_TITLE='TaskSetFinishedTaskImpl::RunOnWorkerThread';for(var i=0;i<sortedRasterizerSlices.length;i++){var task=sortedRasterizerSlices[i];if(task.title===RASTER_TASK_TITLE||task.title===IMAGEDECODE_TASK_TITLE){if(task.args.source_prepare_tiles_id===prepare_tile_id)
+this.addEntireSliceHierarchy(task.mostTopLevelSlice);}else if(task.title===FINISHED_TASK_TITLE){if(task.start>prepareTiles.start){pendingEventQueue.push(task.mostTopLevelSlice);if(++numFinishedTasks===3)
+break;}}}
+while(pendingEventQueue.length!=0){var event=pendingEventQueue.pop();this.addEntireSliceHierarchy(event);this.followSubsequentSlices(event,pendingEventQueue,visited,flowEvents);}},addOtherCausallyRelatedEvents:function(rendererHelper,sourceSlices,flowEvents,sortedRasterizerSlices){var pendingEventQueue=[];var visitedEvents=new EventSet();var beginImplFrame=undefined;var prepareTiles=undefined;var sortedRasterizerSlices=[];sourceSlices.forEach(function(sourceSlice){if(!visitedEvents.contains(sourceSlice)){visitedEvents.push(sourceSlice);pendingEventQueue.push(sourceSlice);}},this);while(pendingEventQueue.length!=0){var event=pendingEventQueue.pop();this.addEntireSliceHierarchy(event);this.followCurrentSlice(event,pendingEventQueue,visitedEvents);this.followSubsequentSlices(event,pendingEventQueue,visitedEvents,flowEvents);var COMPOSITOR_PREPARE_TILES='TileManager::PrepareTiles';prepareTiles=event.findDescendentSlice(COMPOSITOR_PREPARE_TILES);if(prepareTiles)
+this.addRasterizationEvents(prepareTiles,rendererHelper,visitedEvents,flowEvents,sortedRasterizerSlices);var COMPOSITOR_ON_BIFD='Scheduler::OnBeginImplFrameDeadline';beginImplFrame=event.findDescendentSlice(COMPOSITOR_ON_BIFD);if(beginImplFrame)
+this.backtraceFromDraw(beginImplFrame,visitedEvents);}
+var INPUT_GSU='InputLatency::GestureScrollUpdate';if(this.title===INPUT_GSU)
+this.addScrollUpdateEvents(rendererHelper);},get associatedEvents(){if(this.associatedEvents_.length!==0)
+return this.associatedEvents_;var modelIndices=this.startThread.parent.model.modelIndices;var flowEvents=modelIndices.getFlowEventsWithId(this.id);if(flowEvents.length===0)
+return this.associatedEvents_;var sourceSlices=this.addDirectlyAssociatedEvents(flowEvents);var rendererHelper=this.getRendererHelper(sourceSlices);this.addOtherCausallyRelatedEvents(rendererHelper,sourceSlices,flowEvents);return this.associatedEvents_;},get inputLatency(){if(!('data'in this.args))
+return undefined;var data=this.args.data;if(!(END_COMP_NAME in data))
+return undefined;var latency=0;var endTime=data[END_COMP_NAME].time;if(ORIGINAL_COMP_NAME in data){latency=endTime-data[ORIGINAL_COMP_NAME].time;}else if(UI_COMP_NAME in data){latency=endTime-data[UI_COMP_NAME].time;}else if(BEGIN_COMP_NAME in data){latency=endTime-data[BEGIN_COMP_NAME].time;}else{throw new Error('No valid begin latency component');}
+return latency;}};var eventTypeNames=['Char','ContextMenu','GestureClick','GestureFlingCancel','GestureFlingStart','GestureScrollBegin','GestureScrollEnd','GestureScrollUpdate','GestureShowPress','GestureTap','GestureTapCancel','GestureTapDown','GesturePinchBegin','GesturePinchEnd','GesturePinchUpdate','KeyDown','KeyUp','MouseDown','MouseEnter','MouseLeave','MouseMove','MouseUp','MouseWheel','RawKeyDown','ScrollUpdate','TouchCancel','TouchEnd','TouchMove','TouchStart'];var allTypeNames=['InputLatency'];eventTypeNames.forEach(function(eventTypeName){allTypeNames.push('InputLatency:'+eventTypeName);allTypeNames.push('InputLatency::'+eventTypeName);});AsyncSlice.register(InputLatencyAsyncSlice,{typeNames:allTypeNames,categoryParts:['latencyInfo']});return{InputLatencyAsyncSlice:InputLatencyAsyncSlice,INPUT_EVENT_TYPE_NAMES:INPUT_EVENT_TYPE_NAMES};});'use strict';tr.exportTo('tr.e.chrome',function(){var SAME_AS_PARENT='same-as-parent';var TITLES_FOR_USER_FRIENDLY_CATEGORY={composite:['CompositingInputsUpdater::update','ThreadProxy::SetNeedsUpdateLayers','LayerTreeHost::UpdateLayers::CalcDrawProps','UpdateLayerTree'],gc:['minorGC','majorGC','MajorGC','MinorGC','V8.GCScavenger','V8.GCIncrementalMarking','V8.GCIdleNotification','V8.GCContext','V8.GCCompactor','V8GCController::traceDOMWrappers'],iframe_creation:['WebLocalFrameImpl::createChildframe'],imageDecode:['Decode Image','ImageFrameGenerator::decode','ImageFrameGenerator::decodeAndScale'],input:['HitTest','ScrollableArea::scrollPositionChanged','EventHandler::handleMouseMoveEvent'],layout:['FrameView::invalidateTree','FrameView::layout','FrameView::performLayout','FrameView::performPostLayoutTasks','FrameView::performPreLayoutTasks','Layer::updateLayerPositionsAfterLayout','Layout','LayoutView::hitTest','ResourceLoadPriorityOptimizer::updateAllImageResourcePriorities','WebViewImpl::layout'],parseHTML:['ParseHTML','HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser','HTMLDocumentParser::processParsedChunkFromBackgroundParser'],raster:['DisplayListRasterSource::PerformSolidColorAnalysis','Picture::Raster','RasterBufferImpl::Playback','RasterTask','RasterizerTaskImpl::RunOnWorkerThread','SkCanvas::drawImageRect()','SkCanvas::drawPicture()','SkCanvas::drawTextBlob()','TileTaskWorkerPool::PlaybackToMemory'],record:['ContentLayerDelegate::paintContents','DeprecatedPaintLayerCompositor::updateIfNeededRecursive','DeprecatedPaintLayerCompositor::updateLayerPositionsAfterLayout','Paint','Picture::Record','PictureLayer::Update','RenderLayer::updateLayerPositionsAfterLayout'],script:['EvaluateScript','FunctionCall','ScheduledAction::execute','Script','V8.Execute','v8.run','v8.callModuleMethod','v8.callFunction','WindowProxy::initialize'],style:['CSSParserImpl::parseStyleSheet.parse','CSSParserImpl::parseStyleSheet.tokenize','Document::updateStyle','Document::updateStyleInvalidationIfNeeded','ParseAuthorStyleSheet','RuleSet::addRulesFromSheet','StyleElement::processStyleSheet','StyleEngine::createResolver','StyleSheetContents::parseAuthorStyleSheet','UpdateLayoutTree'],script_parse_and_compile:['V8.RecompileSynchronous','V8.RecompileConcurrent','V8.PreParseMicroSeconds','v8.parseOnBackground','V8.ParseMicroSeconds','V8.ParseLazyMicroSeconds','V8.CompileScriptMicroSeconds','V8.CompileMicroSeconds','V8.CompileFullCode','V8.CompileEvalMicroSeconds','v8.compile'],script_parse:['V8Test.ParseScript','V8Test.ParseFunction',],script_compile:['V8Test.Compile','V8Test.CompileFullCode',],resource_loading:['ResourceFetcher::requestResource','ResourceDispatcher::OnReceivedData','ResourceDispatcher::OnRequestComplete','ResourceDispatcher::OnReceivedResponse','Resource::appendData'],renderer_misc:['DecodeFont','ThreadState::completeSweep'],[SAME_AS_PARENT]:['SyncChannel::Send']};var USER_FRIENDLY_CATEGORY_FOR_TITLE={};for(var category in TITLES_FOR_USER_FRIENDLY_CATEGORY){TITLES_FOR_USER_FRIENDLY_CATEGORY[category].forEach(function(title){USER_FRIENDLY_CATEGORY_FOR_TITLE[title]=category;});}
+var USER_FRIENDLY_CATEGORY_FOR_EVENT_CATEGORY={netlog:'net',overhead:'overhead',startup:'startup',gpu:'gpu'};function ChromeUserFriendlyCategoryDriver(){}
+ChromeUserFriendlyCategoryDriver.fromEvent=function(event){var userFriendlyCategory=USER_FRIENDLY_CATEGORY_FOR_TITLE[event.title];if(userFriendlyCategory){if(userFriendlyCategory==SAME_AS_PARENT){if(event.parentSlice)
+return ChromeUserFriendlyCategoryDriver.fromEvent(event.parentSlice);}else{return userFriendlyCategory;}}
+var eventCategoryParts=tr.b.getCategoryParts(event.category);for(var i=0;i<eventCategoryParts.length;++i){var eventCategory=eventCategoryParts[i];userFriendlyCategory=USER_FRIENDLY_CATEGORY_FOR_EVENT_CATEGORY[eventCategory];if(userFriendlyCategory)
+return userFriendlyCategory;}
+return undefined;};return{ChromeUserFriendlyCategoryDriver:ChromeUserFriendlyCategoryDriver};});'use strict';tr.exportTo('tr.model',function(){return{BROWSER_PROCESS_PID_REF:-1,OBJECT_DEFAULT_SCOPE:'ptr'};});'use strict';tr.exportTo('tr.e.audits',function(){var Auditor=tr.c.Auditor;function ChromeAuditor(model){Auditor.call(this,model);var modelHelper=this.model.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);if(modelHelper&&modelHelper.browserHelper){this.modelHelper=modelHelper;}else{this.modelHelper=undefined;}};ChromeAuditor.prototype={__proto__:Auditor.prototype,runAnnotate:function(){if(!this.modelHelper)
+return;this.model.getAllProcesses().forEach(function(process){if(process.labels!==undefined&&process.labels.length==1&&process.labels[0]=='chrome://tracing')
+process.important=false;});},installUserFriendlyCategoryDriverIfNeeded:function(){this.model.addUserFriendlyCategoryDriver(tr.e.chrome.ChromeUserFriendlyCategoryDriver);},runAudit:function(){if(!this.modelHelper)
+return;this.model.replacePIDRefsInPatchups(tr.model.BROWSER_PROCESS_PID_REF,this.modelHelper.browserProcess.pid);this.model.applyObjectRefPatchups();}};Auditor.register(ChromeAuditor);return{ChromeAuditor:ChromeAuditor};});'use strict';tr.exportTo('tr.model',function(){function ObjectSnapshot(objectInstance,ts,args){tr.model.Event.call(this);this.objectInstance=objectInstance;this.ts=ts;this.args=args;}
+ObjectSnapshot.prototype={__proto__:tr.model.Event.prototype,preInitialize:function(){},initialize:function(){},addBoundsToRange:function(range){range.addValue(this.ts);},get userFriendlyName(){return'Snapshot of '+
+this.objectInstance.typeName+' '+
+this.objectInstance.id+' @ '+
+tr.v.Unit.byName.timeStampInMs.format(this.ts);}};tr.model.EventRegistry.register(ObjectSnapshot,{name:'objectSnapshot',pluralName:'objectSnapshots',singleViewElementName:'tr-ui-a-single-object-snapshot-sub-view',multiViewElementName:'tr-ui-a-multi-object-sub-view'});var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectSnapshot;options.defaultConstructor=ObjectSnapshot;tr.b.decorateExtensionRegistry(ObjectSnapshot,options);return{ObjectSnapshot:ObjectSnapshot};});'use strict';tr.exportTo('tr.model',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function ObjectInstance(parent,scopedId,category,name,creationTs,opt_baseTypeName){tr.model.Event.call(this);this.parent=parent;this.scopedId=scopedId;this.category=category;this.baseTypeName=opt_baseTypeName?opt_baseTypeName:name;this.name=name;this.creationTs=creationTs;this.creationTsWasExplicit=false;this.deletionTs=Number.MAX_VALUE;this.deletionTsWasExplicit=false;this.colorId=0;this.bounds=new tr.b.Range();this.snapshots=[];this.hasImplicitSnapshots=false;}
+ObjectInstance.prototype={__proto__:tr.model.Event.prototype,get typeName(){return this.name;},addBoundsToRange:function(range){range.addRange(this.bounds);},addSnapshot:function(ts,args,opt_name,opt_baseTypeName){if(ts<this.creationTs)
+throw new Error('Snapshots must be >= instance.creationTs');if(ts>=this.deletionTs)
+throw new Error('Snapshots cannot be added after '+'an objects deletion timestamp.');var lastSnapshot;if(this.snapshots.length>0){lastSnapshot=this.snapshots[this.snapshots.length-1];if(lastSnapshot.ts==ts)
+throw new Error('Snapshots already exists at this time!');if(ts<lastSnapshot.ts){throw new Error('Snapshots must be added in increasing timestamp order');}}
+if(opt_name&&(this.name!=opt_name)){if(!opt_baseTypeName)
+throw new Error('Must provide base type name for name update');if(this.baseTypeName!=opt_baseTypeName)
+throw new Error('Cannot update type name: base types dont match');this.name=opt_name;}
+var snapshotConstructor=tr.model.ObjectSnapshot.getConstructor(this.category,this.name);var snapshot=new snapshotConstructor(this,ts,args);this.snapshots.push(snapshot);return snapshot;},wasDeleted:function(ts){var lastSnapshot;if(this.snapshots.length>0){lastSnapshot=this.snapshots[this.snapshots.length-1];if(lastSnapshot.ts>ts)
+throw new Error('Instance cannot be deleted at ts='+
+ts+'. A snapshot exists that is older.');}
+this.deletionTs=ts;this.deletionTsWasExplicit=true;},preInitialize:function(){for(var i=0;i<this.snapshots.length;i++)
+this.snapshots[i].preInitialize();},initialize:function(){for(var i=0;i<this.snapshots.length;i++)
+this.snapshots[i].initialize();},getSnapshotAt:function(ts){if(ts<this.creationTs){if(this.creationTsWasExplicit)
+throw new Error('ts must be within lifetime of this instance');return this.snapshots[0];}
+if(ts>this.deletionTs)
+throw new Error('ts must be within lifetime of this instance');var snapshots=this.snapshots;var i=tr.b.findIndexInSortedIntervals(snapshots,function(snapshot){return snapshot.ts;},function(snapshot,i){if(i==snapshots.length-1)
+return snapshots[i].objectInstance.deletionTs;return snapshots[i+1].ts-snapshots[i].ts;},ts);if(i<0){return this.snapshots[0];}
+if(i>=this.snapshots.length)
+return this.snapshots[this.snapshots.length-1];return this.snapshots[i];},updateBounds:function(){this.bounds.reset();this.bounds.addValue(this.creationTs);if(this.deletionTs!=Number.MAX_VALUE)
+this.bounds.addValue(this.deletionTs);else if(this.snapshots.length>0)
+this.bounds.addValue(this.snapshots[this.snapshots.length-1].ts);},shiftTimestampsForward:function(amount){this.creationTs+=amount;if(this.deletionTs!=Number.MAX_VALUE)
+this.deletionTs+=amount;this.snapshots.forEach(function(snapshot){snapshot.ts+=amount;});},get userFriendlyName(){return this.typeName+' object '+this.scopedId;}};tr.model.EventRegistry.register(ObjectInstance,{name:'objectInstance',pluralName:'objectInstances',singleViewElementName:'tr-ui-a-single-object-instance-sub-view',multiViewElementName:'tr-ui-a-multi-object-sub-view'});var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectInstance;options.defaultConstructor=ObjectInstance;tr.b.decorateExtensionRegistry(ObjectInstance,options);return{ObjectInstance:ObjectInstance};});'use strict';tr.exportTo('tr.e.chrome',function(){var constants=tr.e.cc.constants;var ObjectSnapshot=tr.model.ObjectSnapshot;var ObjectInstance=tr.model.ObjectInstance;function FrameTreeNodeSnapshot(){ObjectSnapshot.apply(this,arguments);}
+FrameTreeNodeSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){},initialize:function(){},get userFriendlyName(){return'FrameTreeNode';}};ObjectSnapshot.register(FrameTreeNodeSnapshot,{typeName:'FrameTreeNode'});function FrameTreeNodeInstance(){ObjectInstance.apply(this,arguments);}
+FrameTreeNodeInstance.prototype={__proto__:ObjectInstance.prototype};ObjectInstance.register(FrameTreeNodeInstance,{typeName:'FrameTreeNode'});return{FrameTreeNodeSnapshot:FrameTreeNodeSnapshot,FrameTreeNodeInstance:FrameTreeNodeInstance};});'use strict';tr.exportTo('tr.e.chrome',function(){var KNOWN_PROPERTIES={absX:1,absY:1,address:1,anonymous:1,childNeeds:1,children:1,classNames:1,col:1,colSpan:1,float:1,height:1,htmlId:1,name:1,posChildNeeds:1,positioned:1,positionedMovement:1,relX:1,relY:1,relativePositioned:1,row:1,rowSpan:1,selfNeeds:1,stickyPositioned:1,tag:1,width:1};function LayoutObject(snapshot,args){this.snapshot_=snapshot;this.id_=args.address;this.name_=args.name;this.childLayoutObjects_=[];this.otherProperties_={};this.tag_=args.tag;this.relativeRect_=tr.b.Rect.fromXYWH(args.relX,args.relY,args.width,args.height);this.absoluteRect_=tr.b.Rect.fromXYWH(args.absX,args.absY,args.width,args.height);this.isFloat_=args.float;this.isStickyPositioned_=args.stickyPositioned;this.isPositioned_=args.positioned;this.isRelativePositioned_=args.relativePositioned;this.isAnonymous_=args.anonymous;this.htmlId_=args.htmlId;this.classNames_=args.classNames;this.needsLayoutReasons_=[];if(args.selfNeeds)
+this.needsLayoutReasons_.push('self');if(args.childNeeds)
+this.needsLayoutReasons_.push('child');if(args.posChildNeeds)
+this.needsLayoutReasons_.push('positionedChild');if(args.positionedMovement)
+this.needsLayoutReasons_.push('positionedMovement');this.tableRow_=args.row;this.tableCol_=args.col;this.tableRowSpan_=args.rowSpan;this.tableColSpan_=args.colSpan;if(args.children){args.children.forEach(function(child){this.childLayoutObjects_.push(new LayoutObject(snapshot,child));}.bind(this));}
+for(var property in args){if(!KNOWN_PROPERTIES[property])
+this.otherProperties_[property]=args[property];}}
+LayoutObject.prototype={get snapshot(){return this.snapshot_;},get id(){return this.id_;},get name(){return this.name_;},get tag(){return this.tag_;},get relativeRect(){return this.relativeRect_;},get absoluteRect(){return this.absoluteRect_;},get isPositioned(){return this.isPositioned_;},get isFloat(){return this.isFloat_;},get isStickyPositioned(){return this.isStickyPositioned_;},get isRelativePositioned(){return this.isRelativePositioned_;},get isAnonymous(){return this.isAnonymous_;},get tableRow(){return this.tableRow_;},get tableCol(){return this.tableCol_;},get tableRowSpan(){return this.tableRowSpan_;},get tableColSpan(){return this.tableColSpan_;},get htmlId(){return this.htmlId_;},get classNames(){return this.classNames_;},get needsLayoutReasons(){return this.needsLayoutReasons_;},get hasChildLayoutObjects(){return this.childLayoutObjects_.length>0;},get childLayoutObjects(){return this.childLayoutObjects_;},traverseTree:function(cb,opt_this){cb.call(opt_this,this);if(!this.hasChildLayoutObjects)
+return;this.childLayoutObjects.forEach(function(child){child.traverseTree(cb,opt_this);});},get otherPropertyNames(){var names=[];for(var name in this.otherProperties_){names.push(name);}
+return names;},getProperty:function(name){return this.otherProperties_[name];},get previousSnapshotLayoutObject(){if(!this.snapshot.previousSnapshot)
+return undefined;return this.snapshot.previousSnapshot.getLayoutObjectById(this.id);},get nextSnapshotLayoutObject(){if(!this.snapshot.nextSnapshot)
+return undefined;return this.snapshot.nextSnapshot.getLayoutObjectById(this.id);}};return{LayoutObject:LayoutObject};});'use strict';tr.exportTo('tr.e.chrome',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;var ObjectInstance=tr.model.ObjectInstance;function LayoutTreeInstance(){ObjectInstance.apply(this,arguments);}
+LayoutTreeInstance.prototype={__proto__:ObjectInstance.prototype,};ObjectInstance.register(LayoutTreeInstance,{typeName:'LayoutTree'});function LayoutTreeSnapshot(){ObjectSnapshot.apply(this,arguments);this.rootLayoutObject=new tr.e.chrome.LayoutObject(this,this.args);}
+LayoutTreeSnapshot.prototype={__proto__:ObjectSnapshot.prototype,};ObjectSnapshot.register(LayoutTreeSnapshot,{typeName:'LayoutTree'});tr.model.EventRegistry.register(LayoutTreeSnapshot,{name:'layoutTree',pluralName:'layoutTrees',singleViewElementName:'tr-ui-a-layout-tree-sub-view',multiViewElementName:'tr-ui-a-layout-tree-sub-view'});return{LayoutTreeInstance:LayoutTreeInstance,LayoutTreeSnapshot:LayoutTreeSnapshot};});'use strict';tr.exportTo('tr.e.chrome',function(){var constants=tr.e.cc.constants;var ObjectSnapshot=tr.model.ObjectSnapshot;var ObjectInstance=tr.model.ObjectInstance;function RenderFrameSnapshot(){ObjectSnapshot.apply(this,arguments);}
+RenderFrameSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){},initialize:function(){},get userFriendlyName(){return'RenderFrame';}};ObjectSnapshot.register(RenderFrameSnapshot,{typeName:'RenderFrame'});function RenderFrameInstance(){ObjectInstance.apply(this,arguments);}
+RenderFrameInstance.prototype={__proto__:ObjectInstance.prototype};ObjectInstance.register(RenderFrameInstance,{typeName:'RenderFrame'});return{RenderFrameSnapshot:RenderFrameSnapshot,RenderFrameInstance:RenderFrameInstance};});'use strict';tr.exportTo('tr.b',function(){function Base64(){}
+function b64ToUint6(nChr){if(nChr>64&&nChr<91)
+return nChr-65;if(nChr>96&&nChr<123)
+return nChr-71;if(nChr>47&&nChr<58)
+return nChr+4;if(nChr===43)
+return 62;if(nChr===47)
+return 63;return 0;}
+Base64.getDecodedBufferLength=function(input){return input.length*3+1>>2;};Base64.EncodeArrayBufferToString=function(input){var binary='';var bytes=new Uint8Array(input);var len=bytes.byteLength;for(var i=0;i<len;i++)
+binary+=String.fromCharCode(bytes[i]);return btoa(binary);};Base64.DecodeToTypedArray=function(input,output){var nInLen=input.length;var nOutLen=nInLen*3+1>>2;var nMod3=0;var nMod4=0;var nUint24=0;var nOutIdx=0;if(nOutLen>output.byteLength)
+throw new Error('Output buffer too small to decode.');for(var nInIdx=0;nInIdx<nInLen;nInIdx++){nMod4=nInIdx&3;nUint24|=b64ToUint6(input.charCodeAt(nInIdx))<<18-6*nMod4;if(nMod4===3||nInLen-nInIdx===1){for(nMod3=0;nMod3<3&&nOutIdx<nOutLen;nMod3++,nOutIdx++){output.setUint8(nOutIdx,nUint24>>>(16>>>nMod3&24)&255);}
+nUint24=0;}}
+return nOutIdx-1;};Base64.btoa=function(input){return btoa(input);};Base64.atob=function(input){return atob(input);};return{Base64:Base64};});'use strict';tr.exportTo('tr.e.importer.etw',function(){function Parser(importer){this.importer=importer;this.model=importer.model;}
+Parser.prototype={__proto__:Object.prototype};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.mandatoryBaseClass=Parser;tr.b.decorateExtensionRegistry(Parser,options);return{Parser:Parser};});'use strict';tr.exportTo('tr.e.importer.etw',function(){var Parser=tr.e.importer.etw.Parser;var guid='68FDD900-4A3E-11D1-84F4-0000F80464E3';var kEventTraceHeaderOpcode=0;function EventTraceParser(importer){Parser.call(this,importer);importer.registerEventHandler(guid,kEventTraceHeaderOpcode,EventTraceParser.prototype.decodeHeader.bind(this));}
+EventTraceParser.prototype={__proto__:Parser.prototype,decodeFields:function(header,decoder){if(header.version!=2)
+throw new Error('Incompatible EventTrace event version.');var bufferSize=decoder.decodeUInt32();var version=decoder.decodeUInt32();var providerVersion=decoder.decodeUInt32();var numberOfProcessors=decoder.decodeUInt32();var endTime=decoder.decodeUInt64ToString();var timerResolution=decoder.decodeUInt32();var maxFileSize=decoder.decodeUInt32();var logFileMode=decoder.decodeUInt32();var buffersWritten=decoder.decodeUInt32();var startBuffers=decoder.decodeUInt32();var pointerSize=decoder.decodeUInt32();var eventsLost=decoder.decodeUInt32();var cpuSpeed=decoder.decodeUInt32();var loggerName=decoder.decodeUInteger(header.is64);var logFileName=decoder.decodeUInteger(header.is64);var timeZoneInformation=decoder.decodeTimeZoneInformation();var padding=decoder.decodeUInt32();var bootTime=decoder.decodeUInt64ToString();var perfFreq=decoder.decodeUInt64ToString();var startTime=decoder.decodeUInt64ToString();var reservedFlags=decoder.decodeUInt32();var buffersLost=decoder.decodeUInt32();var sessionNameString=decoder.decodeW16String();var logFileNameString=decoder.decodeW16String();return{bufferSize:bufferSize,version:version,providerVersion:providerVersion,numberOfProcessors:numberOfProcessors,endTime:endTime,timerResolution:timerResolution,maxFileSize:maxFileSize,logFileMode:logFileMode,buffersWritten:buffersWritten,startBuffers:startBuffers,pointerSize:pointerSize,eventsLost:eventsLost,cpuSpeed:cpuSpeed,loggerName:loggerName,logFileName:logFileName,timeZoneInformation:timeZoneInformation,bootTime:bootTime,perfFreq:perfFreq,startTime:startTime,reservedFlags:reservedFlags,buffersLost:buffersLost,sessionNameString:sessionNameString,logFileNameString:logFileNameString};},decodeHeader:function(header,decoder){var fields=this.decodeFields(header,decoder);return true;}};Parser.register(EventTraceParser);return{EventTraceParser:EventTraceParser};});'use strict';tr.exportTo('tr.e.importer.etw',function(){var Parser=tr.e.importer.etw.Parser;var guid='3D6FA8D0-FE05-11D0-9DDA-00C04FD7BA7C';var kProcessStartOpcode=1;var kProcessEndOpcode=2;var kProcessDCStartOpcode=3;var kProcessDCEndOpcode=4;var kProcessDefunctOpcode=39;function ProcessParser(importer){Parser.call(this,importer);importer.registerEventHandler(guid,kProcessStartOpcode,ProcessParser.prototype.decodeStart.bind(this));importer.registerEventHandler(guid,kProcessEndOpcode,ProcessParser.prototype.decodeEnd.bind(this));importer.registerEventHandler(guid,kProcessDCStartOpcode,ProcessParser.prototype.decodeDCStart.bind(this));importer.registerEventHandler(guid,kProcessDCEndOpcode,ProcessParser.prototype.decodeDCEnd.bind(this));importer.registerEventHandler(guid,kProcessDefunctOpcode,ProcessParser.prototype.decodeDefunct.bind(this));}
+ProcessParser.prototype={__proto__:Parser.prototype,decodeFields:function(header,decoder){if(header.version>5)
+throw new Error('Incompatible Process event version.');var pageDirectoryBase;if(header.version==1)
+pageDirectoryBase=decoder.decodeUInteger(header.is64);var uniqueProcessKey;if(header.version>=2)
+uniqueProcessKey=decoder.decodeUInteger(header.is64);var processId=decoder.decodeUInt32();var parentId=decoder.decodeUInt32();var sessionId;var exitStatus;if(header.version>=1){sessionId=decoder.decodeUInt32();exitStatus=decoder.decodeInt32();}
+var directoryTableBase;if(header.version>=3)
+directoryTableBase=decoder.decodeUInteger(header.is64);var flags;if(header.version>=4)
+flags=decoder.decodeUInt32();var userSID=decoder.decodeSID(header.is64);var imageFileName;if(header.version>=1)
+imageFileName=decoder.decodeString();var commandLine;if(header.version>=2)
+commandLine=decoder.decodeW16String();var packageFullName;var applicationId;if(header.version>=4){packageFullName=decoder.decodeW16String();applicationId=decoder.decodeW16String();}
+var exitTime;if(header.version==5&&header.opcode==kProcessDefunctOpcode)
+exitTime=decoder.decodeUInt64ToString();return{pageDirectoryBase:pageDirectoryBase,uniqueProcessKey:uniqueProcessKey,processId:processId,parentId:parentId,sessionId:sessionId,exitStatus:exitStatus,directoryTableBase:directoryTableBase,flags:flags,userSID:userSID,imageFileName:imageFileName,commandLine:commandLine,packageFullName:packageFullName,applicationId:applicationId,exitTime:exitTime};},decodeStart:function(header,decoder){var fields=this.decodeFields(header,decoder);var process=this.model.getOrCreateProcess(fields.processId);if(process.hasOwnProperty('has_ended')){throw new Error('Process clash detected.');}
+process.name=fields.imageFileName;return true;},decodeEnd:function(header,decoder){var fields=this.decodeFields(header,decoder);var process=this.model.getOrCreateProcess(fields.processId);process.has_ended=true;return true;},decodeDCStart:function(header,decoder){var fields=this.decodeFields(header,decoder);var process=this.model.getOrCreateProcess(fields.processId);if(process.hasOwnProperty('has_ended'))
+throw new Error('Process clash detected.');process.name=fields.imageFileName;return true;},decodeDCEnd:function(header,decoder){var fields=this.decodeFields(header,decoder);var process=this.model.getOrCreateProcess(fields.processId);process.has_ended=true;return true;},decodeDefunct:function(header,decoder){var fields=this.decodeFields(header,decoder);return true;}};Parser.register(ProcessParser);return{ProcessParser:ProcessParser};});'use strict';tr.exportTo('tr.e.importer.etw',function(){var Parser=tr.e.importer.etw.Parser;var guid='3D6FA8D1-FE05-11D0-9DDA-00C04FD7BA7C';var kThreadStartOpcode=1;var kThreadEndOpcode=2;var kThreadDCStartOpcode=3;var kThreadDCEndOpcode=4;var kThreadCSwitchOpcode=36;function ThreadParser(importer){Parser.call(this,importer);importer.registerEventHandler(guid,kThreadStartOpcode,ThreadParser.prototype.decodeStart.bind(this));importer.registerEventHandler(guid,kThreadEndOpcode,ThreadParser.prototype.decodeEnd.bind(this));importer.registerEventHandler(guid,kThreadDCStartOpcode,ThreadParser.prototype.decodeDCStart.bind(this));importer.registerEventHandler(guid,kThreadDCEndOpcode,ThreadParser.prototype.decodeDCEnd.bind(this));importer.registerEventHandler(guid,kThreadCSwitchOpcode,ThreadParser.prototype.decodeCSwitch.bind(this));}
+ThreadParser.prototype={__proto__:Parser.prototype,decodeFields:function(header,decoder){if(header.version>3)
+throw new Error('Incompatible Thread event version.');var processId=decoder.decodeUInt32();var threadId=decoder.decodeUInt32();var stackBase;var stackLimit;var userStackBase;var userStackLimit;var affinity;var startAddr;var win32StartAddr;var tebBase;var subProcessTag;var basePriority;var pagePriority;var ioPriority;var threadFlags;var waitMode;if(header.version==1){if(header.opcode==kThreadStartOpcode||header.opcode==kThreadDCStartOpcode){stackBase=decoder.decodeUInteger(header.is64);stackLimit=decoder.decodeUInteger(header.is64);userStackBase=decoder.decodeUInteger(header.is64);userStackLimit=decoder.decodeUInteger(header.is64);startAddr=decoder.decodeUInteger(header.is64);win32StartAddr=decoder.decodeUInteger(header.is64);waitMode=decoder.decodeInt8();decoder.skip(3);}}else{stackBase=decoder.decodeUInteger(header.is64);stackLimit=decoder.decodeUInteger(header.is64);userStackBase=decoder.decodeUInteger(header.is64);userStackLimit=decoder.decodeUInteger(header.is64);if(header.version==2)
+startAddr=decoder.decodeUInteger(header.is64);else
+affinity=decoder.decodeUInteger(header.is64);win32StartAddr=decoder.decodeUInteger(header.is64);tebBase=decoder.decodeUInteger(header.is64);subProcessTag=decoder.decodeUInt32();if(header.version==3){basePriority=decoder.decodeUInt8();pagePriority=decoder.decodeUInt8();ioPriority=decoder.decodeUInt8();threadFlags=decoder.decodeUInt8();}}
+return{processId:processId,threadId:threadId,stackBase:stackBase,stackLimit:stackLimit,userStackBase:userStackBase,userStackLimit:userStackLimit,affinity:affinity,startAddr:startAddr,win32StartAddr:win32StartAddr,tebBase:tebBase,subProcessTag:subProcessTag,waitMode:waitMode,basePriority:basePriority,pagePriority:pagePriority,ioPriority:ioPriority,threadFlags:threadFlags};},decodeCSwitchFields:function(header,decoder){if(header.version!=2)
+throw new Error('Incompatible Thread event version.');var newThreadId=decoder.decodeUInt32();var oldThreadId=decoder.decodeUInt32();var newThreadPriority=decoder.decodeInt8();var oldThreadPriority=decoder.decodeInt8();var previousCState=decoder.decodeUInt8();var spareByte=decoder.decodeInt8();var oldThreadWaitReason=decoder.decodeInt8();var oldThreadWaitMode=decoder.decodeInt8();var oldThreadState=decoder.decodeInt8();var oldThreadWaitIdealProcessor=decoder.decodeInt8();var newThreadWaitTime=decoder.decodeUInt32();var reserved=decoder.decodeUInt32();return{newThreadId:newThreadId,oldThreadId:oldThreadId,newThreadPriority:newThreadPriority,oldThreadPriority:oldThreadPriority,previousCState:previousCState,spareByte:spareByte,oldThreadWaitReason:oldThreadWaitReason,oldThreadWaitMode:oldThreadWaitMode,oldThreadState:oldThreadState,oldThreadWaitIdealProcessor:oldThreadWaitIdealProcessor,newThreadWaitTime:newThreadWaitTime,reserved:reserved};},decodeStart:function(header,decoder){var fields=this.decodeFields(header,decoder);this.importer.createThreadIfNeeded(fields.processId,fields.threadId);return true;},decodeEnd:function(header,decoder){var fields=this.decodeFields(header,decoder);this.importer.removeThreadIfPresent(fields.threadId);return true;},decodeDCStart:function(header,decoder){var fields=this.decodeFields(header,decoder);this.importer.createThreadIfNeeded(fields.processId,fields.threadId);return true;},decodeDCEnd:function(header,decoder){var fields=this.decodeFields(header,decoder);this.importer.removeThreadIfPresent(fields.threadId);return true;},decodeCSwitch:function(header,decoder){var fields=this.decodeCSwitchFields(header,decoder);var cpu=this.importer.getOrCreateCpu(header.cpu);var new_thread=this.importer.getThreadFromWindowsTid(fields.newThreadId);var new_thread_name;if(new_thread&&new_thread.userFriendlyName){new_thread_name=new_thread.userFriendlyName;}else{var new_process_id=this.importer.getPidFromWindowsTid(fields.newThreadId);var new_process=this.model.getProcess(new_process_id);var new_process_name;if(new_process)
+new_process_name=new_process.name;else
+new_process_name='Unknown process';new_thread_name=new_process_name+' (tid '+fields.newThreadId+')';}
+cpu.switchActiveThread(header.timestamp,{},fields.newThreadId,new_thread_name,fields);return true;}};Parser.register(ThreadParser);return{ThreadParser:ThreadParser};});'use strict';tr.exportTo('tr.b',function(){function max(a,b){if(a===undefined)
+return b;if(b===undefined)
+return a;return Math.max(a,b);}
+function IntervalTree(beginPositionCb,endPositionCb){this.beginPositionCb_=beginPositionCb;this.endPositionCb_=endPositionCb;this.root_=undefined;this.size_=0;}
+IntervalTree.prototype={insert:function(datum){var startPosition=this.beginPositionCb_(datum);var endPosition=this.endPositionCb_(datum);var node=new IntervalTreeNode(datum,startPosition,endPosition);this.size_++;this.root_=this.insertNode_(this.root_,node);this.root_.colour=Colour.BLACK;return datum;},insertNode_:function(root,node){if(root===undefined)
+return node;if(root.leftNode&&root.leftNode.isRed&&root.rightNode&&root.rightNode.isRed)
+this.flipNodeColour_(root);if(node.key<root.key)
+root.leftNode=this.insertNode_(root.leftNode,node);else if(node.key===root.key)
+root.merge(node);else
+root.rightNode=this.insertNode_(root.rightNode,node);if(root.rightNode&&root.rightNode.isRed&&(root.leftNode===undefined||!root.leftNode.isRed))
+root=this.rotateLeft_(root);if(root.leftNode&&root.leftNode.isRed&&root.leftNode.leftNode&&root.leftNode.leftNode.isRed)
+root=this.rotateRight_(root);return root;},rotateRight_:function(node){var sibling=node.leftNode;node.leftNode=sibling.rightNode;sibling.rightNode=node;sibling.colour=node.colour;node.colour=Colour.RED;return sibling;},rotateLeft_:function(node){var sibling=node.rightNode;node.rightNode=sibling.leftNode;sibling.leftNode=node;sibling.colour=node.colour;node.colour=Colour.RED;return sibling;},flipNodeColour_:function(node){node.colour=this.flipColour_(node.colour);node.leftNode.colour=this.flipColour_(node.leftNode.colour);node.rightNode.colour=this.flipColour_(node.rightNode.colour);},flipColour_:function(colour){return colour===Colour.RED?Colour.BLACK:Colour.RED;},updateHighValues:function(){this.updateHighValues_(this.root_);},updateHighValues_:function(node){if(node===undefined)
+return undefined;node.maxHighLeft=this.updateHighValues_(node.leftNode);node.maxHighRight=this.updateHighValues_(node.rightNode);return max(max(node.maxHighLeft,node.highValue),node.maxHighRight);},validateFindArguments_:function(queryLow,queryHigh){if(queryLow===undefined||queryHigh===undefined)
+throw new Error('queryLow and queryHigh must be defined');if((typeof queryLow!=='number')||(typeof queryHigh!=='number'))
+throw new Error('queryLow and queryHigh must be numbers');},findIntersection:function(queryLow,queryHigh){this.validateFindArguments_(queryLow,queryHigh);if(this.root_===undefined)
+return[];var ret=[];this.root_.appendIntersectionsInto_(ret,queryLow,queryHigh);return ret;},get size(){return this.size_;},get root(){return this.root_;},dump_:function(){if(this.root_===undefined)
+return[];return this.root_.dump();}};var Colour={RED:'red',BLACK:'black'};function IntervalTreeNode(datum,lowValue,highValue){this.lowValue_=lowValue;this.data_=[{datum:datum,high:highValue,low:lowValue}];this.colour_=Colour.RED;this.parentNode_=undefined;this.leftNode_=undefined;this.rightNode_=undefined;this.maxHighLeft_=undefined;this.maxHighRight_=undefined;}
+IntervalTreeNode.prototype={appendIntersectionsInto_:function(ret,queryLow,queryHigh){if(this.lowValue_>=queryHigh){if(!this.leftNode_)
+return;return this.leftNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}
+if(this.maxHighLeft_>queryLow){this.leftNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}
+if(this.highValue>queryLow){for(var i=(this.data.length-1);i>=0;--i){if(this.data[i].high<queryLow)
+break;ret.push(this.data[i].datum);}}
+if(this.rightNode_){this.rightNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}},get colour(){return this.colour_;},set colour(colour){this.colour_=colour;},get key(){return this.lowValue_;},get lowValue(){return this.lowValue_;},get highValue(){return this.data_[this.data_.length-1].high;},set leftNode(left){this.leftNode_=left;},get leftNode(){return this.leftNode_;},get hasLeftNode(){return this.leftNode_!==undefined;},set rightNode(right){this.rightNode_=right;},get rightNode(){return this.rightNode_;},get hasRightNode(){return this.rightNode_!==undefined;},set parentNode(parent){this.parentNode_=parent;},get parentNode(){return this.parentNode_;},get isRootNode(){return this.parentNode_===undefined;},set maxHighLeft(high){this.maxHighLeft_=high;},get maxHighLeft(){return this.maxHighLeft_;},set maxHighRight(high){this.maxHighRight_=high;},get maxHighRight(){return this.maxHighRight_;},get data(){return this.data_;},get isRed(){return this.colour_===Colour.RED;},merge:function(node){for(var i=0;i<node.data.length;i++)
+this.data_.push(node.data[i]);this.data_.sort(function(a,b){return a.high-b.high;});},dump:function(){var ret={};if(this.leftNode_)
+ret['left']=this.leftNode_.dump();ret['data']=this.data_.map(function(d){return[d.low,d.high];});if(this.rightNode_)
+ret['right']=this.rightNode_.dump();return ret;}};return{IntervalTree:IntervalTree};});!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define(n);else{var r=n();for(var a in r)("object"==typeof exports?exports:t)[a]=r[a]}}(this,function(){return function(t){function n(a){if(r[a])return r[a].exports;var e=r[a]={exports:{},id:a,loaded:!1};return t[a].call(e.exports,e,e.exports,n),e.loaded=!0,e.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){n.glMatrix=r(1),n.mat2=r(2),n.mat2d=r(3),n.mat3=r(4),n.mat4=r(5),n.quat=r(6),n.vec2=r(9),n.vec3=r(7),n.vec4=r(8)},function(t,n,r){var a={};a.EPSILON=1e-6,a.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,a.RANDOM=Math.random,a.setMatrixArrayType=function(t){GLMAT_ARRAY_TYPE=t};var e=Math.PI/180;a.toRadian=function(t){return t*e},t.exports=a},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},e.clone=function(t){var n=new a.ARRAY_TYPE(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1];t[1]=n[2],t[2]=r}else t[0]=n[0],t[1]=n[2],t[2]=n[1],t[3]=n[3];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*u-e*a;return o?(o=1/o,t[0]=u*o,t[1]=-a*o,t[2]=-e*o,t[3]=r*o,t):null},e.adjoint=function(t,n){var r=n[0];return t[0]=n[3],t[1]=-n[1],t[2]=-n[2],t[3]=r,t},e.determinant=function(t){return t[0]*t[3]-t[2]*t[1]},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1],f=r[2],s=r[3];return t[0]=a*i+u*c,t[1]=e*i+o*c,t[2]=a*f+u*s,t[3]=e*f+o*s,t},e.mul=e.multiply,e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+u*i,t[1]=e*c+o*i,t[2]=a*-i+u*c,t[3]=e*-i+o*c,t},e.scale=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1];return t[0]=a*i,t[1]=e*i,t[2]=u*c,t[3]=o*c,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=-r,t[3]=a,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t},e.str=function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2))},e.LDU=function(t,n,r,a){return t[2]=a[2]/a[0],r[0]=a[0],r[1]=a[1],r[3]=a[3]-t[2]*r[1],[t,n,r]},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(6);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(6);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=r*u-a*e;return c?(c=1/c,t[0]=u*c,t[1]=-a*c,t[2]=-e*c,t[3]=r*c,t[4]=(e*i-u*o)*c,t[5]=(a*o-r*i)*c,t):null},e.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1],h=r[2],M=r[3],l=r[4],v=r[5];return t[0]=a*f+u*s,t[1]=e*f+o*s,t[2]=a*h+u*M,t[3]=e*h+o*M,t[4]=a*l+u*v+i,t[5]=e*l+o*v+c,t},e.mul=e.multiply,e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=Math.sin(r),s=Math.cos(r);return t[0]=a*s+u*f,t[1]=e*s+o*f,t[2]=a*-f+u*s,t[3]=e*-f+o*s,t[4]=i,t[5]=c,t},e.scale=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1];return t[0]=a*f,t[1]=e*f,t[2]=u*s,t[3]=o*s,t[4]=i,t[5]=c,t},e.translate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1];return t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=a*f+u*s+i,t[5]=e*f+o*s+c,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=-r,t[3]=a,t[4]=0,t[5]=0,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t[4]=0,t[5]=0,t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=n[0],t[5]=n[1],t},e.str=function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+1)},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat4=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t},e.clone=function(t){var n=new a.ARRAY_TYPE(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1],a=n[2],e=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=a,t[7]=e}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=s*o-i*f,M=-s*u+i*c,l=f*u-o*c,v=r*h+a*M+e*l;return v?(v=1/v,t[0]=h*v,t[1]=(-s*a+e*f)*v,t[2]=(i*a-e*o)*v,t[3]=M*v,t[4]=(s*r-e*c)*v,t[5]=(-i*r+e*u)*v,t[6]=l*v,t[7]=(-f*r+a*c)*v,t[8]=(o*r-a*u)*v,t):null},e.adjoint=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8];return t[0]=o*s-i*f,t[1]=e*f-a*s,t[2]=a*i-e*o,t[3]=i*c-u*s,t[4]=r*s-e*c,t[5]=e*u-r*i,t[6]=u*f-o*c,t[7]=a*c-r*f,t[8]=r*o-a*u,t},e.determinant=function(t){var n=t[0],r=t[1],a=t[2],e=t[3],u=t[4],o=t[5],i=t[6],c=t[7],f=t[8];return n*(f*u-o*c)+r*(-f*e+o*i)+a*(c*e-u*i)},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=r[0],l=r[1],v=r[2],m=r[3],p=r[4],d=r[5],A=r[6],R=r[7],w=r[8];return t[0]=M*a+l*o+v*f,t[1]=M*e+l*i+v*s,t[2]=M*u+l*c+v*h,t[3]=m*a+p*o+d*f,t[4]=m*e+p*i+d*s,t[5]=m*u+p*c+d*h,t[6]=A*a+R*o+w*f,t[7]=A*e+R*i+w*s,t[8]=A*u+R*c+w*h,t},e.mul=e.multiply,e.translate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=r[0],l=r[1];return t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=i,t[5]=c,t[6]=M*a+l*o+f,t[7]=M*e+l*i+s,t[8]=M*u+l*c+h,t},e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=Math.sin(r),l=Math.cos(r);return t[0]=l*a+M*o,t[1]=l*e+M*i,t[2]=l*u+M*c,t[3]=l*o-M*a,t[4]=l*i-M*e,t[5]=l*c-M*u,t[6]=f,t[7]=s,t[8]=h,t},e.scale=function(t,n,r){var a=r[0],e=r[1];return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=e*n[3],t[4]=e*n[4],t[5]=e*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=0,t[3]=-r,t[4]=a,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},e.fromQuat=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r+r,i=a+a,c=e+e,f=r*o,s=a*o,h=a*i,M=e*o,l=e*i,v=e*c,m=u*o,p=u*i,d=u*c;return t[0]=1-h-v,t[3]=s-d,t[6]=M+p,t[1]=s+d,t[4]=1-f-v,t[7]=l-m,t[2]=M-p,t[5]=l+m,t[8]=1-f-h,t},e.normalFromMat4=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15],A=r*i-a*o,R=r*c-e*o,w=r*f-u*o,q=a*c-e*i,Y=a*f-u*i,g=e*f-u*c,y=s*m-h*v,x=s*p-M*v,P=s*d-l*v,E=h*p-M*m,T=h*d-l*m,b=M*d-l*p,D=A*b-R*T+w*E+q*P-Y*x+g*y;return D?(D=1/D,t[0]=(i*b-c*T+f*E)*D,t[1]=(c*P-o*b-f*x)*D,t[2]=(o*T-i*P+f*y)*D,t[3]=(e*T-a*b-u*E)*D,t[4]=(r*b-e*P+u*x)*D,t[5]=(a*P-r*T-u*y)*D,t[6]=(m*g-p*Y+d*q)*D,t[7]=(p*w-v*g-d*R)*D,t[8]=(v*Y-m*w+d*A)*D,t):null},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.clone=function(t){var n=new a.ARRAY_TYPE(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1],a=n[2],e=n[3],u=n[6],o=n[7],i=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=r,t[6]=n[9],t[7]=n[13],t[8]=a,t[9]=u,t[11]=n[14],t[12]=e,t[13]=o,t[14]=i}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15],A=r*i-a*o,R=r*c-e*o,w=r*f-u*o,q=a*c-e*i,Y=a*f-u*i,g=e*f-u*c,y=s*m-h*v,x=s*p-M*v,P=s*d-l*v,E=h*p-M*m,T=h*d-l*m,b=M*d-l*p,D=A*b-R*T+w*E+q*P-Y*x+g*y;return D?(D=1/D,t[0]=(i*b-c*T+f*E)*D,t[1]=(e*T-a*b-u*E)*D,t[2]=(m*g-p*Y+d*q)*D,t[3]=(M*Y-h*g-l*q)*D,t[4]=(c*P-o*b-f*x)*D,t[5]=(r*b-e*P+u*x)*D,t[6]=(p*w-v*g-d*R)*D,t[7]=(s*g-M*w+l*R)*D,t[8]=(o*T-i*P+f*y)*D,t[9]=(a*P-r*T-u*y)*D,t[10]=(v*Y-m*w+d*A)*D,t[11]=(h*w-s*Y-l*A)*D,t[12]=(i*x-o*E-c*y)*D,t[13]=(r*E-a*x+e*y)*D,t[14]=(m*R-v*q-p*A)*D,t[15]=(s*q-h*R+M*A)*D,t):null},e.adjoint=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15];return t[0]=i*(M*d-l*p)-h*(c*d-f*p)+m*(c*l-f*M),t[1]=-(a*(M*d-l*p)-h*(e*d-u*p)+m*(e*l-u*M)),t[2]=a*(c*d-f*p)-i*(e*d-u*p)+m*(e*f-u*c),t[3]=-(a*(c*l-f*M)-i*(e*l-u*M)+h*(e*f-u*c)),t[4]=-(o*(M*d-l*p)-s*(c*d-f*p)+v*(c*l-f*M)),t[5]=r*(M*d-l*p)-s*(e*d-u*p)+v*(e*l-u*M),t[6]=-(r*(c*d-f*p)-o*(e*d-u*p)+v*(e*f-u*c)),t[7]=r*(c*l-f*M)-o*(e*l-u*M)+s*(e*f-u*c),t[8]=o*(h*d-l*m)-s*(i*d-f*m)+v*(i*l-f*h),t[9]=-(r*(h*d-l*m)-s*(a*d-u*m)+v*(a*l-u*h)),t[10]=r*(i*d-f*m)-o*(a*d-u*m)+v*(a*f-u*i),t[11]=-(r*(i*l-f*h)-o*(a*l-u*h)+s*(a*f-u*i)),t[12]=-(o*(h*p-M*m)-s*(i*p-c*m)+v*(i*M-c*h)),t[13]=r*(h*p-M*m)-s*(a*p-e*m)+v*(a*M-e*h),t[14]=-(r*(i*p-c*m)-o*(a*p-e*m)+v*(a*c-e*i)),t[15]=r*(i*M-c*h)-o*(a*M-e*h)+s*(a*c-e*i),t},e.determinant=function(t){var n=t[0],r=t[1],a=t[2],e=t[3],u=t[4],o=t[5],i=t[6],c=t[7],f=t[8],s=t[9],h=t[10],M=t[11],l=t[12],v=t[13],m=t[14],p=t[15],d=n*o-r*u,A=n*i-a*u,R=n*c-e*u,w=r*i-a*o,q=r*c-e*o,Y=a*c-e*i,g=f*v-s*l,y=f*m-h*l,x=f*p-M*l,P=s*m-h*v,E=s*p-M*v,T=h*p-M*m;return d*T-A*E+R*P+w*x-q*y+Y*g},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=n[9],l=n[10],v=n[11],m=n[12],p=n[13],d=n[14],A=n[15],R=r[0],w=r[1],q=r[2],Y=r[3];return t[0]=R*a+w*i+q*h+Y*m,t[1]=R*e+w*c+q*M+Y*p,t[2]=R*u+w*f+q*l+Y*d,t[3]=R*o+w*s+q*v+Y*A,R=r[4],w=r[5],q=r[6],Y=r[7],t[4]=R*a+w*i+q*h+Y*m,t[5]=R*e+w*c+q*M+Y*p,t[6]=R*u+w*f+q*l+Y*d,t[7]=R*o+w*s+q*v+Y*A,R=r[8],w=r[9],q=r[10],Y=r[11],t[8]=R*a+w*i+q*h+Y*m,t[9]=R*e+w*c+q*M+Y*p,t[10]=R*u+w*f+q*l+Y*d,t[11]=R*o+w*s+q*v+Y*A,R=r[12],w=r[13],q=r[14],Y=r[15],t[12]=R*a+w*i+q*h+Y*m,t[13]=R*e+w*c+q*M+Y*p,t[14]=R*u+w*f+q*l+Y*d,t[15]=R*o+w*s+q*v+Y*A,t},e.mul=e.multiply,e.translate=function(t,n,r){var a,e,u,o,i,c,f,s,h,M,l,v,m=r[0],p=r[1],d=r[2];return n===t?(t[12]=n[0]*m+n[4]*p+n[8]*d+n[12],t[13]=n[1]*m+n[5]*p+n[9]*d+n[13],t[14]=n[2]*m+n[6]*p+n[10]*d+n[14],t[15]=n[3]*m+n[7]*p+n[11]*d+n[15]):(a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=n[9],l=n[10],v=n[11],t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=i,t[5]=c,t[6]=f,t[7]=s,t[8]=h,t[9]=M,t[10]=l,t[11]=v,t[12]=a*m+i*p+h*d+n[12],t[13]=e*m+c*p+M*d+n[13],t[14]=u*m+f*p+l*d+n[14],t[15]=o*m+s*p+v*d+n[15]),t},e.scale=function(t,n,r){var a=r[0],e=r[1],u=r[2];return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*u,t[9]=n[9]*u,t[10]=n[10]*u,t[11]=n[11]*u,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},e.rotate=function(t,n,r,e){var u,o,i,c,f,s,h,M,l,v,m,p,d,A,R,w,q,Y,g,y,x,P,E,T,b=e[0],D=e[1],L=e[2],_=Math.sqrt(b*b+D*D+L*L);return Math.abs(_)<a.EPSILON?null:(_=1/_,b*=_,D*=_,L*=_,u=Math.sin(r),o=Math.cos(r),i=1-o,c=n[0],f=n[1],s=n[2],h=n[3],M=n[4],l=n[5],v=n[6],m=n[7],p=n[8],d=n[9],A=n[10],R=n[11],w=b*b*i+o,q=D*b*i+L*u,Y=L*b*i-D*u,g=b*D*i-L*u,y=D*D*i+o,x=L*D*i+b*u,P=b*L*i+D*u,E=D*L*i-b*u,T=L*L*i+o,t[0]=c*w+M*q+p*Y,t[1]=f*w+l*q+d*Y,t[2]=s*w+v*q+A*Y,t[3]=h*w+m*q+R*Y,t[4]=c*g+M*y+p*x,t[5]=f*g+l*y+d*x,t[6]=s*g+v*y+A*x,t[7]=h*g+m*y+R*x,t[8]=c*P+M*E+p*T,t[9]=f*P+l*E+d*T,t[10]=s*P+v*E+A*T,t[11]=h*P+m*E+R*T,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)},e.rotateX=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[4],o=n[5],i=n[6],c=n[7],f=n[8],s=n[9],h=n[10],M=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=u*e+f*a,t[5]=o*e+s*a,t[6]=i*e+h*a,t[7]=c*e+M*a,t[8]=f*e-u*a,t[9]=s*e-o*a,t[10]=h*e-i*a,t[11]=M*e-c*a,t},e.rotateY=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[0],o=n[1],i=n[2],c=n[3],f=n[8],s=n[9],h=n[10],M=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=u*e-f*a,t[1]=o*e-s*a,t[2]=i*e-h*a,t[3]=c*e-M*a,t[8]=u*a+f*e,t[9]=o*a+s*e,t[10]=i*a+h*e,t[11]=c*a+M*e,t},e.rotateZ=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[0],o=n[1],i=n[2],c=n[3],f=n[4],s=n[5],h=n[6],M=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=u*e+f*a,t[1]=o*e+s*a,t[2]=i*e+h*a,t[3]=c*e+M*a,t[4]=f*e-u*a,t[5]=s*e-o*a,t[6]=h*e-i*a,t[7]=M*e-c*a,t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromRotation=function(t,n,r){var e,u,o,i=r[0],c=r[1],f=r[2],s=Math.sqrt(i*i+c*c+f*f);return Math.abs(s)<a.EPSILON?null:(s=1/s,i*=s,c*=s,f*=s,e=Math.sin(n),u=Math.cos(n),o=1-u,t[0]=i*i*o+u,t[1]=c*i*o+f*e,t[2]=f*i*o-c*e,t[3]=0,t[4]=i*c*o-f*e,t[5]=c*c*o+u,t[6]=f*c*o+i*e,t[7]=0,t[8]=i*f*o+c*e,t[9]=c*f*o-i*e,t[10]=f*f*o+u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},e.fromXRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromYRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromZRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromRotationTranslation=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=a+a,c=e+e,f=u+u,s=a*i,h=a*c,M=a*f,l=e*c,v=e*f,m=u*f,p=o*i,d=o*c,A=o*f;return t[0]=1-(l+m),t[1]=h+A,t[2]=M-d,t[3]=0,t[4]=h-A,t[5]=1-(s+m),t[6]=v+p,t[7]=0,t[8]=M+d,t[9]=v-p,t[10]=1-(s+l),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},e.fromRotationTranslationScale=function(t,n,r,a){var e=n[0],u=n[1],o=n[2],i=n[3],c=e+e,f=u+u,s=o+o,h=e*c,M=e*f,l=e*s,v=u*f,m=u*s,p=o*s,d=i*c,A=i*f,R=i*s,w=a[0],q=a[1],Y=a[2];return t[0]=(1-(v+p))*w,t[1]=(M+R)*w,t[2]=(l-A)*w,t[3]=0,t[4]=(M-R)*q,t[5]=(1-(h+p))*q,t[6]=(m+d)*q,t[7]=0,t[8]=(l+A)*Y,t[9]=(m-d)*Y,t[10]=(1-(h+v))*Y,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},e.fromRotationTranslationScaleOrigin=function(t,n,r,a,e){var u=n[0],o=n[1],i=n[2],c=n[3],f=u+u,s=o+o,h=i+i,M=u*f,l=u*s,v=u*h,m=o*s,p=o*h,d=i*h,A=c*f,R=c*s,w=c*h,q=a[0],Y=a[1],g=a[2],y=e[0],x=e[1],P=e[2];return t[0]=(1-(m+d))*q,t[1]=(l+w)*q,t[2]=(v-R)*q,t[3]=0,t[4]=(l-w)*Y,t[5]=(1-(M+d))*Y,t[6]=(p+A)*Y,t[7]=0,t[8]=(v+R)*g,t[9]=(p-A)*g,t[10]=(1-(M+m))*g,t[11]=0,t[12]=r[0]+y-(t[0]*y+t[4]*x+t[8]*P),t[13]=r[1]+x-(t[1]*y+t[5]*x+t[9]*P),t[14]=r[2]+P-(t[2]*y+t[6]*x+t[10]*P),t[15]=1,t},e.fromQuat=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r+r,i=a+a,c=e+e,f=r*o,s=a*o,h=a*i,M=e*o,l=e*i,v=e*c,m=u*o,p=u*i,d=u*c;return t[0]=1-h-v,t[1]=s+d,t[2]=M-p,t[3]=0,t[4]=s-d,t[5]=1-f-v,t[6]=l+m,t[7]=0,t[8]=M+p,t[9]=l-m,t[10]=1-f-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.frustum=function(t,n,r,a,e,u,o){var i=1/(r-n),c=1/(e-a),f=1/(u-o);return t[0]=2*u*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*u*c,t[6]=0,t[7]=0,t[8]=(r+n)*i,t[9]=(e+a)*c,t[10]=(o+u)*f,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*u*2*f,t[15]=0,t},e.perspective=function(t,n,r,a,e){var u=1/Math.tan(n/2),o=1/(a-e);return t[0]=u/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(e+a)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*e*a*o,t[15]=0,t},e.perspectiveFromFieldOfView=function(t,n,r,a){var e=Math.tan(n.upDegrees*Math.PI/180),u=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),i=Math.tan(n.rightDegrees*Math.PI/180),c=2/(o+i),f=2/(e+u);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=f,t[6]=0,t[7]=0,t[8]=-((o-i)*c*.5),t[9]=(e-u)*f*.5,t[10]=a/(r-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*r/(r-a),t[15]=0,t},e.ortho=function(t,n,r,a,e,u,o){var i=1/(n-r),c=1/(a-e),f=1/(u-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*f,t[11]=0,t[12]=(n+r)*i,t[13]=(e+a)*c,t[14]=(o+u)*f,t[15]=1,t},e.lookAt=function(t,n,r,u){var o,i,c,f,s,h,M,l,v,m,p=n[0],d=n[1],A=n[2],R=u[0],w=u[1],q=u[2],Y=r[0],g=r[1],y=r[2];return Math.abs(p-Y)<a.EPSILON&&Math.abs(d-g)<a.EPSILON&&Math.abs(A-y)<a.EPSILON?e.identity(t):(M=p-Y,l=d-g,v=A-y,m=1/Math.sqrt(M*M+l*l+v*v),M*=m,l*=m,v*=m,o=w*v-q*l,i=q*M-R*v,c=R*l-w*M,m=Math.sqrt(o*o+i*i+c*c),m?(m=1/m,o*=m,i*=m,c*=m):(o=0,i=0,c=0),f=l*c-v*i,s=v*o-M*c,h=M*i-l*o,m=Math.sqrt(f*f+s*s+h*h),m?(m=1/m,f*=m,s*=m,h*=m):(f=0,s=0,h=0),t[0]=o,t[1]=f,t[2]=M,t[3]=0,t[4]=i,t[5]=s,t[6]=l,t[7]=0,t[8]=c,t[9]=h,t[10]=v,t[11]=0,t[12]=-(o*p+i*d+c*A),t[13]=-(f*p+s*d+h*A),t[14]=-(M*p+l*d+v*A),t[15]=1,t)},e.str=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2)+Math.pow(t[9],2)+Math.pow(t[10],2)+Math.pow(t[11],2)+Math.pow(t[12],2)+Math.pow(t[13],2)+Math.pow(t[14],2)+Math.pow(t[15],2))},t.exports=e},function(t,n,r){var a=r(1),e=r(4),u=r(7),o=r(8),i={};i.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},i.rotationTo=function(){var t=u.create(),n=u.fromValues(1,0,0),r=u.fromValues(0,1,0);return function(a,e,o){var c=u.dot(e,o);return-.999999>c?(u.cross(t,n,e),u.length(t)<1e-6&&u.cross(t,r,e),u.normalize(t,t),i.setAxisAngle(a,t,Math.PI),a):c>.999999?(a[0]=0,a[1]=0,a[2]=0,a[3]=1,a):(u.cross(t,e,o),a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=1+c,i.normalize(a,a))}}(),i.setAxes=function(){var t=e.create();return function(n,r,a,e){return t[0]=a[0],t[3]=a[1],t[6]=a[2],t[1]=e[0],t[4]=e[1],t[7]=e[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],i.normalize(n,i.fromMat3(n,t))}}(),i.clone=o.clone,i.fromValues=o.fromValues,i.copy=o.copy,i.set=o.set,i.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},i.setAxisAngle=function(t,n,r){r=.5*r;var a=Math.sin(r);return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=Math.cos(r),t},i.add=o.add,i.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1],f=r[2],s=r[3];return t[0]=a*s+o*i+e*f-u*c,t[1]=e*s+o*c+u*i-a*f,t[2]=u*s+o*f+a*c-e*i,t[3]=o*s-a*i-e*c-u*f,t},i.mul=i.multiply,i.scale=o.scale,i.rotateX=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+o*i,t[1]=e*c+u*i,t[2]=u*c-e*i,t[3]=o*c-a*i,t},i.rotateY=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c-u*i,t[1]=e*c+o*i,t[2]=u*c+a*i,t[3]=o*c-e*i,t},i.rotateZ=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+e*i,t[1]=e*c-a*i,t[2]=u*c+o*i,t[3]=o*c-u*i,t},i.calculateW=function(t,n){var r=n[0],a=n[1],e=n[2];return t[0]=r,t[1]=a,t[2]=e,t[3]=Math.sqrt(Math.abs(1-r*r-a*a-e*e)),t},i.dot=o.dot,i.lerp=o.lerp,i.slerp=function(t,n,r,a){var e,u,o,i,c,f=n[0],s=n[1],h=n[2],M=n[3],l=r[0],v=r[1],m=r[2],p=r[3];return u=f*l+s*v+h*m+M*p,0>u&&(u=-u,l=-l,v=-v,m=-m,p=-p),1-u>1e-6?(e=Math.acos(u),o=Math.sin(e),i=Math.sin((1-a)*e)/o,c=Math.sin(a*e)/o):(i=1-a,c=a),t[0]=i*f+c*l,t[1]=i*s+c*v,t[2]=i*h+c*m,t[3]=i*M+c*p,t},i.sqlerp=function(){var t=i.create(),n=i.create();return function(r,a,e,u,o,c){return i.slerp(t,a,o,c),i.slerp(n,e,u,c),i.slerp(r,t,n,2*c*(1-c)),r}}(),i.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*r+a*a+e*e+u*u,i=o?1/o:0;return t[0]=-r*i,t[1]=-a*i,t[2]=-e*i,t[3]=u*i,t},i.conjugate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},i.length=o.length,i.len=i.length,i.squaredLength=o.squaredLength,i.sqrLen=i.squaredLength,i.normalize=o.normalize,i.fromMat3=function(t,n){var r,a=n[0]+n[4]+n[8];if(a>0)r=Math.sqrt(a+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{var e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);var u=(e+1)%3,o=(e+2)%3;r=Math.sqrt(n[3*e+e]-n[3*u+u]-n[3*o+o]+1),t[e]=.5*r,r=.5/r,t[3]=(n[3*u+o]-n[3*o+u])*r,t[u]=(n[3*u+e]+n[3*e+u])*r,t[o]=(n[3*o+e]+n[3*e+o])*r}return t},i.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},t.exports=i},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n},e.fromValues=function(t,n,r){var e=new a.ARRAY_TYPE(3);return e[0]=t,e[1]=n,e[2]=r,e},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},e.set=function(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2];return Math.sqrt(r*r+a*a+e*e)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2];return r*r+a*a+e*e},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1],a=t[2];return Math.sqrt(n*n+r*r+a*a)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=n[2],u=r*r+a*a+e*e;return u>0&&(u=1/Math.sqrt(u),t[0]=n[0]*u,t[1]=n[1]*u,t[2]=n[2]*u),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]},e.cross=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2];return t[0]=e*c-u*i,t[1]=u*o-a*c,t[2]=a*i-e*o,t},e.lerp=function(t,n,r,a){var e=n[0],u=n[1],o=n[2];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t[2]=o+a*(r[2]-o),t},e.hermite=function(t,n,r,a,e,u){var o=u*u,i=o*(2*u-3)+1,c=o*(u-2)+u,f=o*(u-1),s=o*(3-2*u);return t[0]=n[0]*i+r[0]*c+a[0]*f+e[0]*s,t[1]=n[1]*i+r[1]*c+a[1]*f+e[1]*s,t[2]=n[2]*i+r[2]*c+a[2]*f+e[2]*s,t},e.bezier=function(t,n,r,a,e,u){var o=1-u,i=o*o,c=u*u,f=i*o,s=3*u*i,h=3*c*o,M=c*u;return t[0]=n[0]*f+r[0]*s+a[0]*h+e[0]*M,t[1]=n[1]*f+r[1]*s+a[1]*h+e[1]*M,t[2]=n[2]*f+r[2]*s+a[2]*h+e[2]*M,t},e.random=function(t,n){n=n||1;var r=2*a.RANDOM()*Math.PI,e=2*a.RANDOM()-1,u=Math.sqrt(1-e*e)*n;return t[0]=Math.cos(r)*u,t[1]=Math.sin(r)*u,t[2]=e*n,t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[3]*a+r[7]*e+r[11]*u+r[15];return o=o||1,t[0]=(r[0]*a+r[4]*e+r[8]*u+r[12])/o,t[1]=(r[1]*a+r[5]*e+r[9]*u+r[13])/o,t[2]=(r[2]*a+r[6]*e+r[10]*u+r[14])/o,t},e.transformMat3=function(t,n,r){var a=n[0],e=n[1],u=n[2];return t[0]=a*r[0]+e*r[3]+u*r[6],t[1]=a*r[1]+e*r[4]+u*r[7],t[2]=a*r[2]+e*r[5]+u*r[8],t},e.transformQuat=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2],f=r[3],s=f*a+i*u-c*e,h=f*e+c*a-o*u,M=f*u+o*e-i*a,l=-o*a-i*e-c*u;return t[0]=s*f+l*-o+h*-c-M*-i,t[1]=h*f+l*-i+M*-o-s*-c,t[2]=M*f+l*-c+s*-i-h*-o,t},e.rotateX=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[0],u[1]=e[1]*Math.cos(a)-e[2]*Math.sin(a),u[2]=e[1]*Math.sin(a)+e[2]*Math.cos(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.rotateY=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[2]*Math.sin(a)+e[0]*Math.cos(a),u[1]=e[1],u[2]=e[2]*Math.cos(a)-e[0]*Math.sin(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.rotateZ=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[0]*Math.cos(a)-e[1]*Math.sin(a),u[1]=e[0]*Math.sin(a)+e[1]*Math.cos(a),u[2]=e[2],t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=3),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],t[2]=n[i+2],u(t,t,o),n[i]=t[0],n[i+1]=t[1],n[i+2]=t[2];return n}}(),e.angle=function(t,n){var r=e.fromValues(t[0],t[1],t[2]),a=e.fromValues(n[0],n[1],n[2]);e.normalize(r,r),e.normalize(a,a);var u=e.dot(r,a);return u>1?0:Math.acos(u)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},e.fromValues=function(t,n,r,e){var u=new a.ARRAY_TYPE(4);return u[0]=t,u[1]=n,u[2]=r,u[3]=e,u},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},e.set=function(t,n,r,a,e){return t[0]=n,t[1]=r,t[2]=a,t[3]=e,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2],u=n[3]-t[3];return Math.sqrt(r*r+a*a+e*e+u*u)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2],u=n[3]-t[3];return r*r+a*a+e*e+u*u},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1],a=t[2],e=t[3];return Math.sqrt(n*n+r*r+a*a+e*e)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1],a=t[2],e=t[3];return n*n+r*r+a*a+e*e},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*r+a*a+e*e+u*u;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=a*o,t[2]=e*o,t[3]=u*o),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},e.lerp=function(t,n,r,a){var e=n[0],u=n[1],o=n[2],i=n[3];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t[2]=o+a*(r[2]-o),t[3]=i+a*(r[3]-i),t},e.random=function(t,n){return n=n||1,t[0]=a.RANDOM(),t[1]=a.RANDOM(),t[2]=a.RANDOM(),t[3]=a.RANDOM(),e.normalize(t,t),e.scale(t,t,n),t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3];return t[0]=r[0]*a+r[4]*e+r[8]*u+r[12]*o,t[1]=r[1]*a+r[5]*e+r[9]*u+r[13]*o,t[2]=r[2]*a+r[6]*e+r[10]*u+r[14]*o,t[3]=r[3]*a+r[7]*e+r[11]*u+r[15]*o,t},e.transformQuat=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2],f=r[3],s=f*a+i*u-c*e,h=f*e+c*a-o*u,M=f*u+o*e-i*a,l=-o*a-i*e-c*u;return t[0]=s*f+l*-o+h*-c-M*-i,t[1]=h*f+l*-i+M*-o-s*-c,t[2]=M*f+l*-c+s*-i-h*-o,t[3]=n[3],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=4),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],t[2]=n[i+2],t[3]=n[i+3],u(t,t,o),n[i]=t[0],n[i+1]=t[1],n[i+2]=t[2],n[i+3]=t[3];return n}}(),e.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(2);return n[0]=t[0],n[1]=t[1],n},e.fromValues=function(t,n){var r=new a.ARRAY_TYPE(2);return r[0]=t,r[1]=n,r},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t},e.set=function(t,n,r){return t[0]=n,t[1]=r,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1];return Math.sqrt(r*r+a*a)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1];return r*r+a*a},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1];return Math.sqrt(n*n+r*r)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1];return n*n+r*r},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=r*r+a*a;return e>0&&(e=1/Math.sqrt(e),t[0]=n[0]*e,t[1]=n[1]*e),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},e.cross=function(t,n,r){var a=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=a,t},e.lerp=function(t,n,r,a){var e=n[0],u=n[1];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t},e.random=function(t,n){n=n||1;var r=2*a.RANDOM()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},e.transformMat2=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[2]*e,t[1]=r[1]*a+r[3]*e,t},e.transformMat2d=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[2]*e+r[4],t[1]=r[1]*a+r[3]*e+r[5],t},e.transformMat3=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[3]*e+r[6],t[1]=r[1]*a+r[4]*e+r[7],t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[4]*e+r[12],t[1]=r[1]*a+r[5]*e+r[13],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=2),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],u(t,t,o),n[i]=t[0],n[i+1]=t[1];return n}}(),e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},t.exports=e}])});'use strict';(function(global){if(tr.isNode){var glMatrixAbsPath=HTMLImportsLoader.hrefToAbsolutePath('/gl-matrix-min.js');var glMatrixModule=require(glMatrixAbsPath);for(var exportName in glMatrixModule){global[exportName]=glMatrixModule[exportName];}}})(this);'use strict';tr.exportTo('tr.b',function(){function clamp(x,lo,hi){return Math.min(Math.max(x,lo),hi);}
+function lerp(percentage,lo,hi){var range=hi-lo;return lo+percentage*range;}
+function normalize(value,lo,hi){return(value-lo)/(hi-lo);}
+function deg2rad(deg){return(Math.PI*deg)/180.0;}
+var tmp_vec2=vec2.create();var tmp_vec2b=vec2.create();var tmp_vec4=vec4.create();var tmp_mat2d=mat2d.create();vec2.createFromArray=function(arr){if(arr.length!=2)
+throw new Error('Should be length 2');var v=vec2.create();vec2.set(v,arr[0],arr[1]);return v;};vec2.createXY=function(x,y){var v=vec2.create();vec2.set(v,x,y);return v;};vec2.toString=function(a){return'['+a[0]+', '+a[1]+']';};vec2.addTwoScaledUnitVectors=function(out,u1,scale1,u2,scale2){vec2.scale(tmp_vec2,u1,scale1);vec2.scale(tmp_vec2b,u2,scale2);vec2.add(out,tmp_vec2,tmp_vec2b);};vec2.interpolatePiecewiseFunction=function(points,x){if(x<points[0][0])
+return points[0][1];for(var i=1;i<points.length;++i){if(x<points[i][0]){var percent=normalize(x,points[i-1][0],points[i][0]);return lerp(percent,points[i-1][1],points[i][1]);}}
+return points[points.length-1][1];};vec3.createXYZ=function(x,y,z){var v=vec3.create();vec3.set(v,x,y,z);return v;};vec3.toString=function(a){return'vec3('+a[0]+', '+a[1]+', '+a[2]+')';};mat2d.translateXY=function(out,x,y){vec2.set(tmp_vec2,x,y);mat2d.translate(out,out,tmp_vec2);};mat2d.scaleXY=function(out,x,y){vec2.set(tmp_vec2,x,y);mat2d.scale(out,out,tmp_vec2);};vec4.unitize=function(out,a){out[0]=a[0]/a[3];out[1]=a[1]/a[3];out[2]=a[2]/a[3];out[3]=1;return out;};vec2.copyFromVec4=function(out,a){vec4.unitize(tmp_vec4,a);vec2.copy(out,tmp_vec4);};return{clamp:clamp,lerp:lerp,normalize:normalize,deg2rad:deg2rad};});'use strict';tr.exportTo('tr.b',function(){var tmpVec2s=[];for(var i=0;i<8;i++)
+tmpVec2s[i]=vec2.create();var tmpVec2a=vec4.create();var tmpVec4a=vec4.create();var tmpVec4b=vec4.create();var tmpMat4=mat4.create();var tmpMat4b=mat4.create();var p00=vec2.createXY(0,0);var p10=vec2.createXY(1,0);var p01=vec2.createXY(0,1);var p11=vec2.createXY(1,1);var lerpingVecA=vec2.create();var lerpingVecB=vec2.create();function lerpVec2(out,a,b,amt){vec2.scale(lerpingVecA,a,amt);vec2.scale(lerpingVecB,b,1-amt);vec2.add(out,lerpingVecA,lerpingVecB);vec2.normalize(out,out);return out;}
+function Quad(){this.p1=vec2.create();this.p2=vec2.create();this.p3=vec2.create();this.p4=vec2.create();}
+Quad.fromXYWH=function(x,y,w,h){var q=new Quad();vec2.set(q.p1,x,y);vec2.set(q.p2,x+w,y);vec2.set(q.p3,x+w,y+h);vec2.set(q.p4,x,y+h);return q;}
+Quad.fromRect=function(r){return new Quad.fromXYWH(r.x,r.y,r.width,r.height);}
+Quad.from4Vecs=function(p1,p2,p3,p4){var q=new Quad();vec2.set(q.p1,p1[0],p1[1]);vec2.set(q.p2,p2[0],p2[1]);vec2.set(q.p3,p3[0],p3[1]);vec2.set(q.p4,p4[0],p4[1]);return q;}
+Quad.from8Array=function(arr){if(arr.length!=8)
+throw new Error('Array must be 8 long');var q=new Quad();q.p1[0]=arr[0];q.p1[1]=arr[1];q.p2[0]=arr[2];q.p2[1]=arr[3];q.p3[0]=arr[4];q.p3[1]=arr[5];q.p4[0]=arr[6];q.p4[1]=arr[7];return q;};Quad.prototype={pointInside:function(point){return pointInImplicitQuad(point,this.p1,this.p2,this.p3,this.p4);},boundingRect:function(){var x0=Math.min(this.p1[0],this.p2[0],this.p3[0],this.p4[0]);var y0=Math.min(this.p1[1],this.p2[1],this.p3[1],this.p4[1]);var x1=Math.max(this.p1[0],this.p2[0],this.p3[0],this.p4[0]);var y1=Math.max(this.p1[1],this.p2[1],this.p3[1],this.p4[1]);return new tr.b.Rect.fromXYWH(x0,y0,x1-x0,y1-y0);},clone:function(){var q=new Quad();vec2.copy(q.p1,this.p1);vec2.copy(q.p2,this.p2);vec2.copy(q.p3,this.p3);vec2.copy(q.p4,this.p4);return q;},scale:function(s){var q=new Quad();this.scaleFast(q,s);return q;},scaleFast:function(dstQuad,s){vec2.copy(dstQuad.p1,this.p1,s);vec2.copy(dstQuad.p2,this.p2,s);vec2.copy(dstQuad.p3,this.p3,s);vec2.copy(dstQuad.p3,this.p3,s);},isRectangle:function(){var bounds=this.boundingRect();return(bounds.x==this.p1[0]&&bounds.y==this.p1[1]&&bounds.width==this.p2[0]-this.p1[0]&&bounds.y==this.p2[1]&&bounds.width==this.p3[0]-this.p1[0]&&bounds.height==this.p3[1]-this.p2[1]&&bounds.x==this.p4[0]&&bounds.height==this.p4[1]-this.p2[1]);},projectUnitRect:function(rect){var q=new Quad();this.projectUnitRectFast(q,rect);return q;},projectUnitRectFast:function(dstQuad,rect){var v12=tmpVec2s[0];var v14=tmpVec2s[1];var v23=tmpVec2s[2];var v43=tmpVec2s[3];var l12,l14,l23,l43;vec2.sub(v12,this.p2,this.p1);l12=vec2.length(v12);vec2.scale(v12,v12,1/l12);vec2.sub(v14,this.p4,this.p1);l14=vec2.length(v14);vec2.scale(v14,v14,1/l14);vec2.sub(v23,this.p3,this.p2);l23=vec2.length(v23);vec2.scale(v23,v23,1/l23);vec2.sub(v43,this.p3,this.p4);l43=vec2.length(v43);vec2.scale(v43,v43,1/l43);var b12=tmpVec2s[0];var b14=tmpVec2s[1];var b23=tmpVec2s[2];var b43=tmpVec2s[3];lerpVec2(b12,v12,v43,rect.y);lerpVec2(b43,v12,v43,1-rect.bottom);lerpVec2(b14,v14,v23,rect.x);lerpVec2(b23,v14,v23,1-rect.right);vec2.addTwoScaledUnitVectors(tmpVec2a,b12,l12*rect.x,b14,l14*rect.y);vec2.add(dstQuad.p1,this.p1,tmpVec2a);vec2.addTwoScaledUnitVectors(tmpVec2a,b12,l12*-(1.0-rect.right),b23,l23*rect.y);vec2.add(dstQuad.p2,this.p2,tmpVec2a);vec2.addTwoScaledUnitVectors(tmpVec2a,b43,l43*-(1.0-rect.right),b23,l23*-(1.0-rect.bottom));vec2.add(dstQuad.p3,this.p3,tmpVec2a);vec2.addTwoScaledUnitVectors(tmpVec2a,b43,l43*rect.left,b14,l14*-(1.0-rect.bottom));vec2.add(dstQuad.p4,this.p4,tmpVec2a);},toString:function(){return'Quad('+
+vec2.toString(this.p1)+', '+
+vec2.toString(this.p2)+', '+
+vec2.toString(this.p3)+', '+
+vec2.toString(this.p4)+')';}};function sign(p1,p2,p3){return(p1[0]-p3[0])*(p2[1]-p3[1])-
+(p2[0]-p3[0])*(p1[1]-p3[1]);}
+function pointInTriangle2(pt,p1,p2,p3){var b1=sign(pt,p1,p2)<0.0;var b2=sign(pt,p2,p3)<0.0;var b3=sign(pt,p3,p1)<0.0;return((b1==b2)&&(b2==b3));}
+function pointInImplicitQuad(point,p1,p2,p3,p4){return pointInTriangle2(point,p1,p2,p3)||pointInTriangle2(point,p1,p3,p4);}
+return{pointInTriangle2:pointInTriangle2,pointInImplicitQuad:pointInImplicitQuad,Quad:Quad};});'use strict';tr.exportTo('tr.b',function(){function addSingletonGetter(ctor){ctor.getInstance=function(){return ctor.instance_||(ctor.instance_=new ctor());};}
+function deepCopy(value){if(!(value instanceof Object)){if(value===undefined||value===null)
+return value;if(typeof value=='string')
+return value.substring();if(typeof value=='boolean')
+return value;if(typeof value=='number')
+return value;throw new Error('Unrecognized: '+typeof value);}
+var object=value;if(object instanceof Array){var res=new Array(object.length);for(var i=0;i<object.length;i++)
+res[i]=deepCopy(object[i]);return res;}
+if(object.__proto__!=Object.prototype)
+throw new Error('Can only clone simple types');var res={};for(var key in object){res[key]=deepCopy(object[key]);}
+return res;}
+function normalizeException(e){if(e===undefined||e===null){return{typeName:'UndefinedError',message:'Unknown: null or undefined exception',stack:'Unknown'};}
+if(typeof(e)=='string'){return{typeName:'StringError',message:e,stack:[e]};}
+var typeName;if(e.name){typeName=e.name;}else if(e.constructor){if(e.constructor.name){typeName=e.constructor.name;}else{typeName='AnonymousError';}}else{typeName='ErrorWithNoConstructor';}
+var msg=e.message?e.message:'Unknown';return{typeName:typeName,message:msg,stack:e.stack?e.stack:[msg]};}
+function stackTraceAsString(){return new Error().stack+'';}
+function stackTrace(){var stack=stackTraceAsString();stack=stack.split('\n');return stack.slice(2);}
+function getUsingPath(path,from_dict){var parts=path.split('.');var cur=from_dict;for(var part;parts.length&&(part=parts.shift());){if(!parts.length){return cur[part];}else if(part in cur){cur=cur[part];}else{return undefined;}}
+return undefined;}
+return{addSingletonGetter:addSingletonGetter,deepCopy:deepCopy,normalizeException:normalizeException,stackTrace:stackTrace,stackTraceAsString:stackTraceAsString,getUsingPath:getUsingPath};});'use strict';tr.exportTo('tr.b',function(){var ESTIMATED_IDLE_PERIOD_LENGTH_MILLISECONDS=10;var REQUEST_IDLE_CALLBACK_TIMEOUT_MILLISECONDS=100;var recordRAFStacks=false;var pendingPreAFs=[];var pendingRAFs=[];var pendingIdleCallbacks=[];var currentRAFDispatchList=undefined;var rafScheduled=false;var idleWorkScheduled=false;function scheduleRAF(){if(rafScheduled)
+return;rafScheduled=true;if(tr.isHeadless){Promise.resolve().then(function(){processRequests(false,0);},function(e){console.log(e.stack);throw e;});}else{if(window.requestAnimationFrame){window.requestAnimationFrame(processRequests.bind(this,false));}else{var delta=Date.now()-window.performance.now();window.webkitRequestAnimationFrame(function(domTimeStamp){processRequests(false,domTimeStamp-delta);});}}}
+function nativeRequestIdleCallbackSupported(){return!tr.isHeadless&&window.requestIdleCallback;}
+function scheduleIdleWork(){if(idleWorkScheduled)
+return;if(!nativeRequestIdleCallbackSupported()){scheduleRAF();return;}
+idleWorkScheduled=true;window.requestIdleCallback(function(deadline,didTimeout){processIdleWork(false,deadline);},{timeout:REQUEST_IDLE_CALLBACK_TIMEOUT_MILLISECONDS});}
+function onAnimationFrameError(e,opt_stack){console.log(e.stack);if(tr.isHeadless)
+throw e;if(opt_stack)
+console.log(opt_stack);if(e.message)
+console.error(e.message,e.stack);else
+console.error(e);}
+function runTask(task,frameBeginTime){try{task.callback.call(task.context,frameBeginTime);}catch(e){tr.b.onAnimationFrameError(e,task.stack);}}
+function processRequests(forceAllTasksToRun,frameBeginTime){rafScheduled=false;var currentPreAFs=pendingPreAFs;currentRAFDispatchList=pendingRAFs;pendingPreAFs=[];pendingRAFs=[];var hasRAFTasks=currentPreAFs.length||currentRAFDispatchList.length;for(var i=0;i<currentPreAFs.length;i++)
+runTask(currentPreAFs[i],frameBeginTime);while(currentRAFDispatchList.length>0)
+runTask(currentRAFDispatchList.shift(),frameBeginTime);currentRAFDispatchList=undefined;if((!hasRAFTasks&&!nativeRequestIdleCallbackSupported())||forceAllTasksToRun){var rafCompletionDeadline=frameBeginTime+ESTIMATED_IDLE_PERIOD_LENGTH_MILLISECONDS;processIdleWork(forceAllTasksToRun,{timeRemaining:function(){return rafCompletionDeadline-window.performance.now();}});}
+if(pendingIdleCallbacks.length>0)
+scheduleIdleWork();}
+function processIdleWork(forceAllTasksToRun,deadline){idleWorkScheduled=false;while(pendingIdleCallbacks.length>0){runTask(pendingIdleCallbacks.shift());if(!forceAllTasksToRun&&(tr.isHeadless||deadline.timeRemaining()<=0)){break;}}
+if(pendingIdleCallbacks.length>0)
+scheduleIdleWork();}
+function getStack_(){if(!recordRAFStacks)
+return'';var stackLines=tr.b.stackTrace();stackLines.shift();return stackLines.join('\n');}
+function requestPreAnimationFrame(callback,opt_this){pendingPreAFs.push({callback:callback,context:opt_this||global,stack:getStack_()});scheduleRAF();}
+function requestAnimationFrameInThisFrameIfPossible(callback,opt_this){if(!currentRAFDispatchList){requestAnimationFrame(callback,opt_this);return;}
+currentRAFDispatchList.push({callback:callback,context:opt_this||global,stack:getStack_()});return;}
+function requestAnimationFrame(callback,opt_this){pendingRAFs.push({callback:callback,context:opt_this||global,stack:getStack_()});scheduleRAF();}
+function requestIdleCallback(callback,opt_this){pendingIdleCallbacks.push({callback:callback,context:opt_this||global,stack:getStack_()});scheduleIdleWork();}
+function forcePendingRAFTasksToRun(frameBeginTime){if(!rafScheduled)
+return;processRequests(false,frameBeginTime);}
+function forceAllPendingTasksToRunForTest(){if(!rafScheduled&&!idleWorkScheduled)
+return;processRequests(true,0);}
+return{onAnimationFrameError:onAnimationFrameError,requestPreAnimationFrame:requestPreAnimationFrame,requestAnimationFrame:requestAnimationFrame,requestAnimationFrameInThisFrameIfPossible:requestAnimationFrameInThisFrameIfPossible,requestIdleCallback:requestIdleCallback,forcePendingRAFTasksToRun:forcePendingRAFTasksToRun,forceAllPendingTasksToRunForTest:forceAllPendingTasksToRunForTest};});'use strict';tr.exportTo('tr.b',function(){var Base64=tr.b.Base64;function computeUserTimingMarkName(groupName,functionName,opt_args){if(groupName===undefined)
+throw new Error('getMeasureString should have group name');if(functionName===undefined)
+throw new Error('getMeasureString should have function name');var userTimingMarkName=groupName+':'+functionName;if(opt_args!==undefined){userTimingMarkName+='/';userTimingMarkName+=Base64.btoa(JSON.stringify(opt_args));}
+return userTimingMarkName;}
+function Timing(){}
+Timing.nextMarkNumber=0;Timing.mark=function(groupName,functionName,opt_args){if(tr.isHeadless){return{end:function(){}};}
+var userTimingMarkName=computeUserTimingMarkName(groupName,functionName,opt_args);var markBeginName='tvcm.mark'+Timing.nextMarkNumber++;var markEndName='tvcm.mark'+Timing.nextMarkNumber++;window.performance.mark(markBeginName);return{end:function(){window.performance.mark(markEndName);window.performance.measure(userTimingMarkName,markBeginName,markEndName);}};};Timing.wrap=function(groupName,callback,opt_args){if(groupName===undefined)
+throw new Error('Timing.wrap should have group name');if(callback.name==='')
+throw new Error('Anonymous function is not allowed');return Timing.wrapNamedFunction(groupName,callback.name,callback,opt_args);};Timing.wrapNamedFunction=function(groupName,functionName,callback,opt_args){function timedNamedFunction(){var markedTime=Timing.mark(groupName,functionName,opt_args);try{callback.apply(this,arguments);}finally{markedTime.end();}}
+return timedNamedFunction;};function TimedNamedPromise(groupName,name,executor,opt_args){var markedTime=Timing.mark(groupName,name,opt_args);var promise=new Promise(executor);promise.then(function(result){markedTime.end();return result;},function(e){markedTime.end();throw e;});return promise;}
+return{_computeUserTimingMarkName:computeUserTimingMarkName,TimedNamedPromise:TimedNamedPromise,Timing:Timing};});'use strict';tr.exportTo('tr.b',function(){var Timing=tr.b.Timing;function Task(runCb,thisArg){if(runCb!==undefined&&thisArg===undefined)
+throw new Error('Almost certainly, you meant to pass a thisArg.');this.runCb_=runCb;this.thisArg_=thisArg;this.afterTask_=undefined;this.subTasks_=[];}
+Task.prototype={get name(){return this.runCb_.name;},subTask:function(cb,thisArg){if(cb instanceof Task)
+this.subTasks_.push(cb);else
+this.subTasks_.push(new Task(cb,thisArg));return this.subTasks_[this.subTasks_.length-1];},run:function(){if(this.runCb_!==undefined)
+this.runCb_.call(this.thisArg_,this);var subTasks=this.subTasks_;this.subTasks_=undefined;if(!subTasks.length)
+return this.afterTask_;for(var i=1;i<subTasks.length;i++)
+subTasks[i-1].afterTask_=subTasks[i];subTasks[subTasks.length-1].afterTask_=this.afterTask_;return subTasks[0];},after:function(cb,thisArg){if(this.afterTask_)
+throw new Error('Has an after task already');if(cb instanceof Task)
+this.afterTask_=cb;else
+this.afterTask_=new Task(cb,thisArg);return this.afterTask_;},timedAfter:function(groupName,cb,thisArg,opt_args){if(cb.name==='')
+throw new Error('Anonymous Task is not allowed');return this.namedTimedAfter(groupName,cb.name,cb,thisArg,opt_args);},namedTimedAfter:function(groupName,name,cb,thisArg,opt_args){if(this.afterTask_)
+throw new Error('Has an after task already');var realTask;if(cb instanceof Task)
+realTask=cb;else
+realTask=new Task(cb,thisArg);this.afterTask_=new Task(function(task){var markedTask=Timing.mark(groupName,name,opt_args);task.subTask(realTask,thisArg);task.subTask(function(){markedTask.end();},thisArg);},thisArg);return this.afterTask_;},enqueue:function(cb,thisArg){var lastTask=this;while(lastTask.afterTask_)
+lastTask=lastTask.afterTask_;return lastTask.after(cb,thisArg);}};Task.RunSynchronously=function(task){var curTask=task;while(curTask)
+curTask=curTask.run();}
+Task.RunWhenIdle=function(task){return new Promise(function(resolve,reject){var curTask=task;function runAnother(){try{curTask=curTask.run();}catch(e){reject(e);console.error(e.stack);return;}
+if(curTask){tr.b.requestIdleCallback(runAnother);return;}
+resolve();}
+tr.b.requestIdleCallback(runAnother);});}
+return{Task:Task};});'use strict';tr.exportTo('tr.c',function(){function makeCaseInsensitiveRegex(pattern){pattern=pattern.replace(/[.*+?^${}()|[\]\\]/g,'\\$&');return new RegExp(pattern,'i');}
+function Filter(){}
+Filter.prototype={__proto__:Object.prototype,matchCounter:function(counter){return true;},matchCpu:function(cpu){return true;},matchProcess:function(process){return true;},matchSlice:function(slice){return true;},matchThread:function(thread){return true;}};function TitleOrCategoryFilter(text){Filter.call(this);this.regex_=makeCaseInsensitiveRegex(text);if(!text.length)
+throw new Error('Filter text is empty.');}
+TitleOrCategoryFilter.prototype={__proto__:Filter.prototype,matchSlice:function(slice){if(slice.title===undefined&&slice.category===undefined)
+return false;return this.regex_.test(slice.title)||(!!slice.category&&this.regex_.test(slice.category));}};function ExactTitleFilter(text){Filter.call(this);this.text_=text;if(!text.length)
+throw new Error('Filter text is empty.');}
+ExactTitleFilter.prototype={__proto__:Filter.prototype,matchSlice:function(slice){return slice.title===this.text_;}};function FullTextFilter(text){Filter.call(this);this.regex_=makeCaseInsensitiveRegex(text);this.titleOrCategoryFilter_=new TitleOrCategoryFilter(text);}
+FullTextFilter.prototype={__proto__:Filter.prototype,matchObject_:function(obj){for(var key in obj){if(!obj.hasOwnProperty(key))
+continue;if(this.regex_.test(key))
+return true;if(this.regex_.test(obj[key]))
+return true;}
+return false;},matchSlice:function(slice){if(this.titleOrCategoryFilter_.matchSlice(slice))
+return true;return this.matchObject_(slice.args);}};return{Filter:Filter,TitleOrCategoryFilter:TitleOrCategoryFilter,ExactTitleFilter:ExactTitleFilter,FullTextFilter:FullTextFilter};});'use strict';tr.exportTo('tr.model',function(){var ClockDomainId={BATTOR:'battor',TRACE_EVENT_IMPORTER:'trace_event_importer'};function ClockSyncManager(){this.connectorBySyncId_={};this.modelDomainId_=undefined;this.modelTimeTransformerByDomainId_=undefined;}
+ClockSyncManager.prototype={addClockSyncMarker:function(domainId,syncId,startTs,opt_endTs){if(tr.b.dictionaryValues(ClockDomainId).indexOf(domainId)<0){throw new Error('"'+domainId+'" is not in the list of known '+'clock domain IDs.');}
+if(this.modelDomainId_!==undefined){throw new Error('Cannot add new clock sync markers after getting '+'a model time transformer.');}
+var marker=new ClockSyncMarker(domainId,startTs,opt_endTs);var connector=this.connectorBySyncId_[syncId];if(connector===undefined){this.connectorBySyncId_[syncId]=new ClockSyncConnector(marker);return;}
+if(connector.marker2!==undefined){throw new Error('Clock sync with ID "'+syncId+'" is already '+'complete - cannot add a third clock sync marker to it.');}
+if(connector.marker1.domainId===domainId)
+throw new Error('A clock domain cannot sync with itself.');if(this.getConnectorBetween_(connector.marker1.domainId,domainId)!==undefined){throw new Error('Cannot add multiple connectors between the same '+'clock domains.');}
+connector.marker2=marker;},getModelTimeTransformer:function(domainId){if(this.modelTimeTransformerByDomainId_===undefined)
+this.buildModelTimeTransformerMap_();var transformer=this.modelTimeTransformerByDomainId_[domainId];if(transformer===undefined){throw new Error('No clock sync markers exist pairing clock domain "'+
+domainId+'" '+'with model clock domain "'+
+this.modelDomainId_+'".');}
+return transformer;},buildModelTimeTransformerMap_(){var completeConnectorsByDomainId=this.getCompleteConnectorsByDomainId_();var uniqueDomainIds=tr.b.dictionaryKeys(completeConnectorsByDomainId);uniqueDomainIds.sort();var isFullyConnected=function(domainId){return completeConnectorsByDomainId[domainId].length===uniqueDomainIds.length-1;};var eligibleModelDomainIds=uniqueDomainIds.filter(isFullyConnected);var traceEventImporterDomainExists=eligibleModelDomainIds.indexOf(ClockDomainId.TRACE_EVENT_IMPORTER)>=0;this.modelDomainId_=traceEventImporterDomainExists?ClockDomainId.TRACE_EVENT_IMPORTER:eligibleModelDomainIds[0];if(this.modelDomainId_===undefined){throw new Error('Unable to select a master clock domain because no '+'clock domain is directly connected to all others.');}
+this.modelTimeTransformerByDomainId_={};this.modelTimeTransformerByDomainId_[this.modelDomainId_]=tr.b.identity;var modelConnectors=completeConnectorsByDomainId[this.modelDomainId_];for(var i=0;i<modelConnectors.length;i++){var conn=modelConnectors[i];if(conn.marker1.domainId===this.modelDomainId_){this.modelTimeTransformerByDomainId_[conn.marker2.domainId]=conn.getTransformer(conn.marker2.domainId,conn.marker1.domainId);}else{this.modelTimeTransformerByDomainId_[conn.marker1.domainId]=conn.getTransformer(conn.marker1.domainId,conn.marker2.domainId);}}},getCompleteConnectorsByDomainId_:function(){var completeConnectorsByDomainId={};for(var syncId in this.connectorBySyncId_){var conn=this.connectorBySyncId_[syncId];var domain1=conn.marker1.domainId;if(completeConnectorsByDomainId[domain1]===undefined)
+completeConnectorsByDomainId[domain1]=[];if(conn.marker2===undefined)
+continue;var domain2=conn.marker2.domainId;if(completeConnectorsByDomainId[domain2]===undefined)
+completeConnectorsByDomainId[domain2]=[];completeConnectorsByDomainId[domain1].push(conn);completeConnectorsByDomainId[domain2].push(conn);}
+return completeConnectorsByDomainId;},getConnectorBetween_(domain1Id,domain2Id){for(var syncId in this.connectorBySyncId_){var connector=this.connectorBySyncId_[syncId];if(connector.isBetween(domain1Id,domain2Id))
+return connector;}
+return undefined;}};function ClockSyncMarker(domainId,startTs,opt_endTs){this.domainId=domainId;this.startTs=startTs;this.endTs=opt_endTs===undefined?startTs:opt_endTs;}
+ClockSyncMarker.prototype={get ts(){return(this.startTs+this.endTs)/2;}};function ClockSyncConnector(opt_marker1,opt_marker2){this.marker1=opt_marker1;this.marker2=opt_marker2;}
+ClockSyncConnector.prototype={getTransformer:function(fromDomainId,toDomainId){if(!this.isBetween(fromDomainId,toDomainId))
+throw new Error('This connector cannot perform this transformation.');var fromMarker,toMarker;if(this.marker1.domainId===fromDomainId){fromMarker=this.marker1;toMarker=this.marker2;}else{fromMarker=this.marker2;toMarker=this.marker1;}
+var fromTs=fromMarker.ts,toTs=toMarker.ts;if(fromDomainId==ClockDomainId.BATTOR&&toDomainId==ClockDomainId.TRACE_EVENT_IMPORTER){toTs=toMarker.startTs;}else if(fromDomainId==ClockDomainId.TRACE_EVENT_IMPORTER&&toDomainId==ClockDomainId.BATTOR){fromTs=fromMarker.startTs;}
+var tsShift=toTs-fromTs;return function(ts){return ts+tsShift;};},isBetween:function(domain1Id,domain2Id){if(this.marker1===undefined||this.marker2===undefined)
+return false;if(this.marker1.domainId===domain1Id&&this.marker2.domainId===domain2Id){return true;}
+if(this.marker1.domainId===domain2Id&&this.marker2.domainId===domain1Id){return true;}
+return false;}};return{ClockDomainId:ClockDomainId,ClockSyncManager:ClockSyncManager};});'use strict';tr.exportTo('tr.model',function(){function EventContainer(){this.guid_=tr.b.GUID.allocate();this.important=true;this.bounds_=new tr.b.Range();}
+EventContainer.prototype={get guid(){return this.guid_;},get stableId(){throw new Error('Not implemented');},get bounds(){return this.bounds_;},updateBounds:function(){throw new Error('Not implemented');},shiftTimestampsForward:function(amount){throw new Error('Not implemented');},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){throw new Error('Not implemented');},iterateAllChildEventContainers:function(callback,opt_this){throw new Error('Not implemented');},iterateAllEvents:function(callback,opt_this){this.iterateAllEventContainers(function(ec){ec.iterateAllEventsInThisContainer(function(eventType){return true;},callback,opt_this);});},iterateAllEventContainers:function(callback,opt_this){function visit(ec){callback.call(opt_this,ec);ec.iterateAllChildEventContainers(visit);}
+visit(this);}};return{EventContainer:EventContainer};});'use strict';tr.exportTo('tr.model',function(){var Event=tr.model.Event;var EventRegistry=tr.model.EventRegistry;function PowerSample(series,start,power){Event.call(this);this.series_=series;this.start_=start;this.power_=power;}
+PowerSample.prototype={__proto__:Event.prototype,get series(){return this.series_;},get start(){return this.start_;},set start(value){this.start_=value;},get power(){return this.power_;},set power(value){this.power_=value;},addBoundsToRange:function(range){range.addValue(this.start);}};EventRegistry.register(PowerSample,{name:'powerSample',pluralName:'powerSamples',singleViewElementName:'tr-ui-a-single-power-sample-sub-view',multiViewElementName:'tr-ui-a-multi-power-sample-sub-view'});return{PowerSample:PowerSample};});'use strict';tr.exportTo('tr.model',function(){var PowerSample=tr.model.PowerSample;function PowerSeries(device){tr.model.EventContainer.call(this);this.device_=device;this.samples_=[];}
+PowerSeries.prototype={__proto__:tr.model.EventContainer.prototype,get device(){return this.device_;},get samples(){return this.samples_;},get stableId(){return this.device_.stableId+'.PowerSeries';},addPowerSample:function(ts,val){var sample=new PowerSample(this,ts,val);this.samples_.push(sample);return sample;},getEnergyConsumed:function(start,end){var measurementRange=tr.b.Range.fromExplicitRange(start,end);var energyConsumed=0;for(var i=0;i<this.samples.length;i++){var sample=this.samples[i];var nextSample=this.samples[i+1];var sampleRange=new tr.b.Range();sampleRange.addValue(sample.start);sampleRange.addValue(nextSample?nextSample.start:Infinity);var timeIntersection=measurementRange.findIntersection(sampleRange);var powerInWatts=sample.power/1000.0;var durationInSeconds=timeIntersection.duration/1000;energyConsumed+=durationInSeconds*powerInWatts;}
+return energyConsumed;},shiftTimestampsForward:function(amount){for(var i=0;i<this.samples_.length;++i)
+this.samples_[i].start+=amount;},updateBounds:function(){this.bounds.reset();if(this.samples_.length===0)
+return;this.bounds.addValue(this.samples_[0].start);this.bounds.addValue(this.samples_[this.samples_.length-1].start);},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,PowerSample))
+this.samples_.forEach(callback,opt_this);},iterateAllChildEventContainers:function(callback,opt_this){}};return{PowerSeries:PowerSeries};});'use strict';tr.exportTo('tr.model',function(){function Device(model){if(!model)
+throw new Error('Must provide a model.');tr.model.EventContainer.call(this);this.powerSeries_=undefined;this.vSyncTimestamps_=[];};Device.compare=function(x,y){return x.guid-y.guid;};Device.prototype={__proto__:tr.model.EventContainer.prototype,compareTo:function(that){return Device.compare(this,that);},get userFriendlyName(){return'Device';},get userFriendlyDetails(){return'Device';},get stableId(){return'Device';},getSettingsKey:function(){return'device';},get powerSeries(){return this.powerSeries_;},set powerSeries(powerSeries){this.powerSeries_=powerSeries;},get vSyncTimestamps(){return this.vSyncTimestamps_;},set vSyncTimestamps(value){this.vSyncTimestamps_=value;},updateBounds:function(){this.bounds.reset();this.iterateAllChildEventContainers(function(child){child.updateBounds();this.bounds.addRange(child.bounds);},this);},shiftTimestampsForward:function(amount){this.iterateAllChildEventContainers(function(child){child.shiftTimestampsForward(amount);});for(var i=0;i<this.vSyncTimestamps_.length;i++)
+this.vSyncTimestamps_[i]+=amount;},addCategoriesToDict:function(categoriesDict){},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){},iterateAllChildEventContainers:function(callback,opt_this){if(this.powerSeries_)
+callback.call(opt_this,this.powerSeries_);}};return{Device:Device};});'use strict';tr.exportTo('tr.model',function(){function FlowEvent(category,id,title,colorId,start,args,opt_duration){tr.model.TimedEvent.call(this,start);this.category=category||'';this.title=title;this.colorId=colorId;this.start=start;this.args=args;this.id=id;this.startSlice=undefined;this.endSlice=undefined;this.startStackFrame=undefined;this.endStackFrame=undefined;if(opt_duration!==undefined)
+this.duration=opt_duration;}
+FlowEvent.prototype={__proto__:tr.model.TimedEvent.prototype,get userFriendlyName(){return'Flow event named '+this.title+' at '+
+tr.v.Unit.byName.timeStampInMs.format(this.timestamp);}};tr.model.EventRegistry.register(FlowEvent,{name:'flowEvent',pluralName:'flowEvents',singleViewElementName:'tr-ui-a-single-flow-event-sub-view',multiViewElementName:'tr-ui-a-multi-flow-event-sub-view'});return{FlowEvent:FlowEvent};});'use strict';tr.exportTo('tr.model',function(){function ContainerMemoryDump(start){tr.model.TimedEvent.call(this,start);this.levelOfDetail=undefined;this.memoryAllocatorDumps_=undefined;this.memoryAllocatorDumpsByFullName_=undefined;};ContainerMemoryDump.LevelOfDetail={LIGHT:0,DETAILED:1};ContainerMemoryDump.prototype={__proto__:tr.model.TimedEvent.prototype,shiftTimestampsForward:function(amount){this.start+=amount;},get memoryAllocatorDumps(){return this.memoryAllocatorDumps_;},set memoryAllocatorDumps(memoryAllocatorDumps){this.memoryAllocatorDumps_=memoryAllocatorDumps;this.forceRebuildingMemoryAllocatorDumpByFullNameIndex();},getMemoryAllocatorDumpByFullName:function(fullName){if(this.memoryAllocatorDumps_===undefined)
+return undefined;if(this.memoryAllocatorDumpsByFullName_===undefined){var index={};function addDumpsToIndex(dumps){dumps.forEach(function(dump){index[dump.fullName]=dump;addDumpsToIndex(dump.children);});};addDumpsToIndex(this.memoryAllocatorDumps_);this.memoryAllocatorDumpsByFullName_=index;}
+return this.memoryAllocatorDumpsByFullName_[fullName];},forceRebuildingMemoryAllocatorDumpByFullNameIndex:function(){this.memoryAllocatorDumpsByFullName_=undefined;},iterateRootAllocatorDumps:function(fn,opt_this){if(this.memoryAllocatorDumps===undefined)
+return;this.memoryAllocatorDumps.forEach(fn,opt_this||this);}};return{ContainerMemoryDump:ContainerMemoryDump};});'use strict';tr.exportTo('tr.model',function(){function MemoryAllocatorDump(containerMemoryDump,fullName,opt_guid){this.fullName=fullName;this.parent=undefined;this.children=[];this.numerics={};this.diagnostics={};this.containerMemoryDump=containerMemoryDump;this.owns=undefined;this.ownedBy=[];this.ownedBySiblingSizes=new Map();this.retains=[];this.retainedBy=[];this.weak=false;this.infos=[];this.guid=opt_guid;};MemoryAllocatorDump.SIZE_NUMERIC_NAME='size';MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME='effective_size';MemoryAllocatorDump.RESIDENT_SIZE_NUMERIC_NAME='resident_size';MemoryAllocatorDump.DISPLAYED_SIZE_NUMERIC_NAME=MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME;MemoryAllocatorDump.prototype={get name(){return this.fullName.substring(this.fullName.lastIndexOf('/')+1);},get quantifiedName(){return'\''+this.fullName+'\' in '+
+this.containerMemoryDump.containerName;},isDescendantOf:function(otherDump){var dump=this;while(dump!==undefined){if(dump===otherDump)
+return true;dump=dump.parent;}
+return false;},addNumeric:function(name,numeric){if(!(numeric instanceof tr.v.ScalarNumeric))
+throw new Error('Numeric value must be an instance of ScalarNumeric.');if(name in this.numerics)
+throw new Error('Duplicate numeric name: '+name+'.');this.numerics[name]=numeric;},addDiagnostic:function(name,text){if(typeof text!=='string')
+throw new Error('Diagnostic text must be a string.');if(name in this.diagnostics)
+throw new Error('Duplicate diagnostic name: '+name+'.');this.diagnostics[name]=text;},aggregateNumericsRecursively:function(opt_model){var numericNames=new Set();this.children.forEach(function(child){child.aggregateNumericsRecursively(opt_model);tr.b.iterItems(child.numerics,numericNames.add,numericNames);},this);numericNames.forEach(function(numericName){if(numericName===MemoryAllocatorDump.SIZE_NUMERIC_NAME||numericName===MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME||this.numerics[numericName]!==undefined){return;}
+this.numerics[numericName]=MemoryAllocatorDump.aggregateNumerics(this.children.map(function(child){return child.numerics[numericName];}),opt_model);},this);}};MemoryAllocatorDump.aggregateNumerics=function(numerics,opt_model){var shouldLogWarning=!!opt_model;var aggregatedUnit=undefined;var aggregatedValue=0;numerics.forEach(function(numeric){if(numeric===undefined)
+return;var unit=numeric.unit;if(aggregatedUnit===undefined){aggregatedUnit=unit;}else if(aggregatedUnit!==unit){if(shouldLogWarning){opt_model.importWarning({type:'numeric_parse_error',message:'Multiple units provided for numeric: \''+
+aggregatedUnit.unitName+'\' and \''+unit.unitName+'\'.'});shouldLogWarning=false;}
+aggregatedUnit=tr.v.Unit.byName.unitlessNumber_smallerIsBetter;}
+aggregatedValue+=numeric.value;},this);if(aggregatedUnit===undefined)
+return undefined;return new tr.v.ScalarNumeric(aggregatedUnit,aggregatedValue);};function MemoryAllocatorDumpLink(source,target,opt_importance){this.source=source;this.target=target;this.importance=opt_importance;this.size=undefined;}
+var MemoryAllocatorDumpInfoType={PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN:0,PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER:1};return{MemoryAllocatorDump:MemoryAllocatorDump,MemoryAllocatorDumpLink:MemoryAllocatorDumpLink,MemoryAllocatorDumpInfoType:MemoryAllocatorDumpInfoType};});'use strict';tr.exportTo('tr.model',function(){function GlobalMemoryDump(model,start){tr.model.ContainerMemoryDump.call(this,start);this.model=model;this.processMemoryDumps={};}
+var SIZE_NUMERIC_NAME=tr.model.MemoryAllocatorDump.SIZE_NUMERIC_NAME;var EFFECTIVE_SIZE_NUMERIC_NAME=tr.model.MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME;var MemoryAllocatorDumpInfoType=tr.model.MemoryAllocatorDumpInfoType;var PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN=MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN;var PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER=MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER;function inPlaceFilter(array,predicate,opt_this){opt_this=opt_this||this;var nextPosition=0;for(var i=0;i<array.length;i++){if(!predicate.call(opt_this,array[i],i))
+continue;if(nextPosition<i)
+array[nextPosition]=array[i];nextPosition++;}
+if(nextPosition<array.length)
+array.length=nextPosition;}
+function getSize(dump){var numeric=dump.numerics[SIZE_NUMERIC_NAME];if(numeric===undefined)
+return 0;return numeric.value;}
+function hasSize(dump){return dump.numerics[SIZE_NUMERIC_NAME]!==undefined;}
+function optional(value,defaultValue){if(value===undefined)
+return defaultValue;return value;}
+GlobalMemoryDump.prototype={__proto__:tr.model.ContainerMemoryDump.prototype,get userFriendlyName(){return'Global memory dump at '+
+tr.v.Unit.byName.timeStampInMs.format(this.start);},get containerName(){return'global space';},finalizeGraph:function(){this.removeWeakDumps();this.setUpTracingOverheadOwnership();this.aggregateNumerics();this.calculateSizes();this.calculateEffectiveSizes();this.discountTracingOverheadFromVmRegions();this.forceRebuildingMemoryAllocatorDumpByFullNameIndices();},removeWeakDumps:function(){this.traverseAllocatorDumpsInDepthFirstPreOrder(function(dump){if(dump.weak)
+return;if((dump.owns!==undefined&&dump.owns.target.weak)||(dump.parent!==undefined&&dump.parent.weak)){dump.weak=true;}});function removeWeakDumpsFromListRecursively(dumps){inPlaceFilter(dumps,function(dump){if(dump.weak){return false;}
+removeWeakDumpsFromListRecursively(dump.children);inPlaceFilter(dump.ownedBy,function(ownershipLink){return!ownershipLink.source.weak;});return true;});}
+this.iterateContainerDumps(function(containerDump){var memoryAllocatorDumps=containerDump.memoryAllocatorDumps;if(memoryAllocatorDumps!==undefined)
+removeWeakDumpsFromListRecursively(memoryAllocatorDumps);});},calculateSizes:function(){this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateMemoryAllocatorDumpSize_.bind(this));},calculateMemoryAllocatorDumpSize_:function(dump){var shouldDefineSize=false;function getDependencySize(dependencyDump){var numeric=dependencyDump.numerics[SIZE_NUMERIC_NAME];if(numeric===undefined)
+return 0;shouldDefineSize=true;return numeric.value;}
+var sizeNumeric=dump.numerics[SIZE_NUMERIC_NAME];var size=0;var checkDependencySizeIsConsistent=function(){};if(sizeNumeric!==undefined){size=sizeNumeric.value;shouldDefineSize=true;if(sizeNumeric.unit!==tr.v.Unit.byName.sizeInBytes_smallerIsBetter){this.model.importWarning({type:'memory_dump_parse_error',message:'Invalid unit of \'size\' numeric of memory allocator '+'dump '+dump.quantifiedName+': '+
+sizeNumeric.unit.unitName+'.'});}
+checkDependencySizeIsConsistent=function(dependencySize,dependencyInfoType,dependencyName){if(size>=dependencySize)
+return;this.model.importWarning({type:'memory_dump_parse_error',message:'Size provided by memory allocator dump \''+
+dump.fullName+'\''+
+tr.v.Unit.byName.sizeInBytes.format(size)+') is less than '+dependencyName+' ('+
+tr.v.Unit.byName.sizeInBytes.format(dependencySize)+').'});dump.infos.push({type:dependencyInfoType,providedSize:size,dependencySize:dependencySize});}.bind(this);}
+var aggregatedChildrenSize=0;var allOverlaps={};dump.children.forEach(function(childDump){function aggregateDescendantDump(descendantDump){var ownedDumpLink=descendantDump.owns;if(ownedDumpLink!==undefined&&ownedDumpLink.target.isDescendantOf(dump)){var ownedChildDump=ownedDumpLink.target;while(ownedChildDump.parent!==dump)
+ownedChildDump=ownedChildDump.parent;if(childDump!==ownedChildDump){var ownedBySiblingSize=getDependencySize(descendantDump);if(ownedBySiblingSize>0){var previousTotalOwnedBySiblingSize=ownedChildDump.ownedBySiblingSizes.get(childDump)||0;var updatedTotalOwnedBySiblingSize=previousTotalOwnedBySiblingSize+ownedBySiblingSize;ownedChildDump.ownedBySiblingSizes.set(childDump,updatedTotalOwnedBySiblingSize);}}
+return;}
+if(descendantDump.children.length===0){aggregatedChildrenSize+=getDependencySize(descendantDump);return;}
+descendantDump.children.forEach(aggregateDescendantDump);}
+aggregateDescendantDump(childDump);});checkDependencySizeIsConsistent(aggregatedChildrenSize,PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN,'the aggregated size of its children');var largestOwnerSize=0;dump.ownedBy.forEach(function(ownershipLink){var owner=ownershipLink.source;var ownerSize=getDependencySize(owner);largestOwnerSize=Math.max(largestOwnerSize,ownerSize);});checkDependencySizeIsConsistent(largestOwnerSize,PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER,'the size of its largest owner');if(!shouldDefineSize){delete dump.numerics[SIZE_NUMERIC_NAME];return;}
+size=Math.max(size,aggregatedChildrenSize,largestOwnerSize);dump.numerics[SIZE_NUMERIC_NAME]=new tr.v.ScalarNumeric(tr.v.Unit.byName.sizeInBytes_smallerIsBetter,size);if(aggregatedChildrenSize<size&&dump.children!==undefined&&dump.children.length>0){var virtualChild=new tr.model.MemoryAllocatorDump(dump.containerMemoryDump,dump.fullName+'/<unspecified>');virtualChild.parent=dump;dump.children.unshift(virtualChild);virtualChild.numerics[SIZE_NUMERIC_NAME]=new tr.v.ScalarNumeric(tr.v.Unit.byName.sizeInBytes_smallerIsBetter,size-aggregatedChildrenSize);}},calculateEffectiveSizes:function(){this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateDumpSubSizes_.bind(this));this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateDumpOwnershipCoefficient_.bind(this));this.traverseAllocatorDumpsInDepthFirstPreOrder(this.calculateDumpCumulativeOwnershipCoefficient_.bind(this));this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateDumpEffectiveSize_.bind(this));},calculateDumpSubSizes_:function(dump){if(!hasSize(dump))
+return;if(dump.children===undefined||dump.children.length===0){var size=getSize(dump);dump.notOwningSubSize_=size;dump.notOwnedSubSize_=size;return;}
+var notOwningSubSize=0;dump.children.forEach(function(childDump){if(childDump.owns!==undefined)
+return;notOwningSubSize+=optional(childDump.notOwningSubSize_,0);});dump.notOwningSubSize_=notOwningSubSize;var notOwnedSubSize=0;dump.children.forEach(function(childDump){if(childDump.ownedBy.length===0){notOwnedSubSize+=optional(childDump.notOwnedSubSize_,0);return;}
+var largestChildOwnerSize=0;childDump.ownedBy.forEach(function(ownershipLink){largestChildOwnerSize=Math.max(largestChildOwnerSize,getSize(ownershipLink.source));});notOwnedSubSize+=getSize(childDump)-largestChildOwnerSize;});dump.notOwnedSubSize_=notOwnedSubSize;},calculateDumpOwnershipCoefficient_:function(dump){if(!hasSize(dump))
+return;if(dump.ownedBy.length===0)
+return;var owners=dump.ownedBy.map(function(ownershipLink){return{dump:ownershipLink.source,importance:optional(ownershipLink.importance,0),notOwningSubSize:optional(ownershipLink.source.notOwningSubSize_,0)};});owners.sort(function(a,b){if(a.importance===b.importance)
+return a.notOwningSubSize-b.notOwningSubSize;return b.importance-a.importance;});var currentImportanceStartPos=0;var alreadyAttributedSubSize=0;while(currentImportanceStartPos<owners.length){var currentImportance=owners[currentImportanceStartPos].importance;var nextImportanceStartPos=currentImportanceStartPos+1;while(nextImportanceStartPos<owners.length&&owners[nextImportanceStartPos].importance===currentImportance){nextImportanceStartPos++;}
+var attributedNotOwningSubSize=0;for(var pos=currentImportanceStartPos;pos<nextImportanceStartPos;pos++){var owner=owners[pos];var notOwningSubSize=owner.notOwningSubSize;if(notOwningSubSize>alreadyAttributedSubSize){attributedNotOwningSubSize+=(notOwningSubSize-alreadyAttributedSubSize)/(nextImportanceStartPos-pos);alreadyAttributedSubSize=notOwningSubSize;}
+var owningCoefficient=0;if(notOwningSubSize!==0)
+owningCoefficient=attributedNotOwningSubSize/notOwningSubSize;owner.dump.owningCoefficient_=owningCoefficient;}
+currentImportanceStartPos=nextImportanceStartPos;}
+var notOwnedSubSize=optional(dump.notOwnedSubSize_,0);var remainderSubSize=notOwnedSubSize-alreadyAttributedSubSize;var ownedCoefficient=0;if(notOwnedSubSize!==0)
+ownedCoefficient=remainderSubSize/notOwnedSubSize;dump.ownedCoefficient_=ownedCoefficient;},calculateDumpCumulativeOwnershipCoefficient_:function(dump){if(!hasSize(dump))
+return;var cumulativeOwnedCoefficient=optional(dump.ownedCoefficient_,1);var parent=dump.parent;if(dump.parent!==undefined)
+cumulativeOwnedCoefficient*=dump.parent.cumulativeOwnedCoefficient_;dump.cumulativeOwnedCoefficient_=cumulativeOwnedCoefficient;var cumulativeOwningCoefficient;if(dump.owns!==undefined){cumulativeOwningCoefficient=dump.owningCoefficient_*dump.owns.target.cumulativeOwningCoefficient_;}else if(dump.parent!==undefined){cumulativeOwningCoefficient=dump.parent.cumulativeOwningCoefficient_;}else{cumulativeOwningCoefficient=1;}
+dump.cumulativeOwningCoefficient_=cumulativeOwningCoefficient;},calculateDumpEffectiveSize_:function(dump){if(!hasSize(dump)){delete dump.numerics[EFFECTIVE_SIZE_NUMERIC_NAME];return;}
+var effectiveSize;if(dump.children===undefined||dump.children.length===0){effectiveSize=getSize(dump)*dump.cumulativeOwningCoefficient_*dump.cumulativeOwnedCoefficient_;}else{effectiveSize=0;dump.children.forEach(function(childDump){if(!hasSize(childDump))
+return;effectiveSize+=childDump.numerics[EFFECTIVE_SIZE_NUMERIC_NAME].value;});}
+dump.numerics[EFFECTIVE_SIZE_NUMERIC_NAME]=new tr.v.ScalarNumeric(tr.v.Unit.byName.sizeInBytes_smallerIsBetter,effectiveSize);},aggregateNumerics:function(){this.iterateRootAllocatorDumps(function(dump){dump.aggregateNumericsRecursively(this.model);});this.iterateRootAllocatorDumps(this.propagateNumericsAndDiagnosticsRecursively);tr.b.iterItems(this.processMemoryDumps,function(pid,processMemoryDump){processMemoryDump.iterateRootAllocatorDumps(function(dump){dump.aggregateNumericsRecursively(this.model);},this);},this);},propagateNumericsAndDiagnosticsRecursively:function(globalAllocatorDump){['numerics','diagnostics'].forEach(function(field){tr.b.iterItems(globalAllocatorDump[field],function(name,value){globalAllocatorDump.ownedBy.forEach(function(ownershipLink){var processAllocatorDump=ownershipLink.source;if(processAllocatorDump[field][name]!==undefined){return;}
+processAllocatorDump[field][name]=value;});});});globalAllocatorDump.children.forEach(this.propagateNumericsAndDiagnosticsRecursively,this);},setUpTracingOverheadOwnership:function(){tr.b.iterItems(this.processMemoryDumps,function(pid,dump){dump.setUpTracingOverheadOwnership(this.model);},this);},discountTracingOverheadFromVmRegions:function(){tr.b.iterItems(this.processMemoryDumps,function(pid,dump){dump.discountTracingOverheadFromVmRegions(this.model);},this);},forceRebuildingMemoryAllocatorDumpByFullNameIndices:function(){this.iterateContainerDumps(function(containerDump){containerDump.forceRebuildingMemoryAllocatorDumpByFullNameIndex();});},iterateContainerDumps:function(fn){fn.call(this,this);tr.b.iterItems(this.processMemoryDumps,function(pid,processDump){fn.call(this,processDump);},this);},iterateAllRootAllocatorDumps:function(fn){this.iterateContainerDumps(function(containerDump){containerDump.iterateRootAllocatorDumps(fn,this);});},traverseAllocatorDumpsInDepthFirstPostOrder:function(fn){var visitedDumps=new WeakSet();var openDumps=new WeakSet();function visit(dump){if(visitedDumps.has(dump))
+return;if(openDumps.has(dump))
+throw new Error(dump.userFriendlyName+' contains a cycle');openDumps.add(dump);dump.ownedBy.forEach(function(ownershipLink){visit.call(this,ownershipLink.source);},this);dump.children.forEach(visit,this);fn.call(this,dump);visitedDumps.add(dump);openDumps.delete(dump);}
+this.iterateAllRootAllocatorDumps(visit);},traverseAllocatorDumpsInDepthFirstPreOrder:function(fn){var visitedDumps=new WeakSet();function visit(dump){if(visitedDumps.has(dump))
+return;if(dump.owns!==undefined&&!visitedDumps.has(dump.owns.target))
+return;if(dump.parent!==undefined&&!visitedDumps.has(dump.parent))
+return;fn.call(this,dump);visitedDumps.add(dump);dump.ownedBy.forEach(function(ownershipLink){visit.call(this,ownershipLink.source);},this);dump.children.forEach(visit,this);}
+this.iterateAllRootAllocatorDumps(visit);}};tr.model.EventRegistry.register(GlobalMemoryDump,{name:'globalMemoryDump',pluralName:'globalMemoryDumps',singleViewElementName:'tr-ui-a-container-memory-dump-sub-view',multiViewElementName:'tr-ui-a-container-memory-dump-sub-view'});return{GlobalMemoryDump:GlobalMemoryDump};});'use strict';tr.exportTo('tr.model',function(){var InstantEventType={GLOBAL:1,PROCESS:2};function InstantEvent(category,title,colorId,start,args){tr.model.TimedEvent.call(this,start);this.category=category||'';this.title=title;this.colorId=colorId;this.args=args;this.type=undefined;};InstantEvent.prototype={__proto__:tr.model.TimedEvent.prototype};function GlobalInstantEvent(category,title,colorId,start,args){InstantEvent.apply(this,arguments);this.type=InstantEventType.GLOBAL;};GlobalInstantEvent.prototype={__proto__:InstantEvent.prototype,get userFriendlyName(){return'Global instant event '+this.title+' @ '+
+tr.v.Unit.byName.timeStampInMs.format(start);}};function ProcessInstantEvent(category,title,colorId,start,args){InstantEvent.apply(this,arguments);this.type=InstantEventType.PROCESS;};ProcessInstantEvent.prototype={__proto__:InstantEvent.prototype,get userFriendlyName(){return'Process-level instant event '+this.title+' @ '+
+tr.v.Unit.byName.timeStampInMs.format(start);}};tr.model.EventRegistry.register(InstantEvent,{name:'instantEvent',pluralName:'instantEvents',singleViewElementName:'tr-ui-a-single-instant-event-sub-view',multiViewElementName:'tr-ui-a-multi-instant-event-sub-view'});return{GlobalInstantEvent:GlobalInstantEvent,ProcessInstantEvent:ProcessInstantEvent,InstantEventType:InstantEventType,InstantEvent:InstantEvent};});'use strict';tr.exportTo('tr.model',function(){function CounterSample(series,timestamp,value){tr.model.Event.call(this);this.series_=series;this.timestamp_=timestamp;this.value_=value;}
+CounterSample.groupByTimestamp=function(samples){var samplesByTimestamp=tr.b.group(samples,function(sample){return sample.timestamp;});var timestamps=tr.b.dictionaryKeys(samplesByTimestamp);timestamps.sort();var groups=[];for(var i=0;i<timestamps.length;i++){var ts=timestamps[i];var group=samplesByTimestamp[ts];group.sort(function(x,y){return x.series.seriesIndex-y.series.seriesIndex;});groups.push(group);}
+return groups;};CounterSample.prototype={__proto__:tr.model.Event.prototype,get series(){return this.series_;},get timestamp(){return this.timestamp_;},get value(){return this.value_;},set timestamp(timestamp){this.timestamp_=timestamp;},addBoundsToRange:function(range){range.addValue(this.timestamp);},getSampleIndex:function(){return tr.b.findLowIndexInSortedArray(this.series.timestamps,function(x){return x;},this.timestamp_);},get userFriendlyName(){return'Counter sample from '+this.series_.title+' at '+
+tr.v.Unit.byName.timeStampInMs.format(this.timestamp);}};tr.model.EventRegistry.register(CounterSample,{name:'counterSample',pluralName:'counterSamples',singleViewElementName:'tr-ui-a-counter-sample-sub-view',multiViewElementName:'tr-ui-a-counter-sample-sub-view'});return{CounterSample:CounterSample};});'use strict';tr.exportTo('tr.model',function(){var CounterSample=tr.model.CounterSample;function CounterSeries(name,color){tr.model.EventContainer.call(this);this.name_=name;this.color_=color;this.timestamps_=[];this.samples_=[];this.counter=undefined;this.seriesIndex=undefined;}
+CounterSeries.prototype={__proto__:tr.model.EventContainer.prototype,get length(){return this.timestamps_.length;},get name(){return this.name_;},get color(){return this.color_;},get samples(){return this.samples_;},get timestamps(){return this.timestamps_;},getSample:function(idx){return this.samples_[idx];},getTimestamp:function(idx){return this.timestamps_[idx];},addCounterSample:function(ts,val){var sample=new CounterSample(this,ts,val);this.addSample(sample);return sample;},addSample:function(sample){this.timestamps_.push(sample.timestamp);this.samples_.push(sample);},getStatistics:function(sampleIndices){var sum=0;var min=Number.MAX_VALUE;var max=-Number.MAX_VALUE;for(var i=0;i<sampleIndices.length;++i){var sample=this.getSample(sampleIndices[i]).value;sum+=sample;min=Math.min(sample,min);max=Math.max(sample,max);}
+return{min:min,max:max,avg:(sum/sampleIndices.length),start:this.getSample(sampleIndices[0]).value,end:this.getSample(sampleIndices.length-1).value};},shiftTimestampsForward:function(amount){for(var i=0;i<this.timestamps_.length;++i){this.timestamps_[i]+=amount;this.samples_[i].timestamp=this.timestamps_[i];}},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,tr.model.CounterSample)){this.samples_.forEach(callback,opt_this);}},iterateAllChildEventContainers:function(callback,opt_this){}};return{CounterSeries:CounterSeries};});'use strict';tr.exportTo('tr.model',function(){function Counter(parent,id,category,name){tr.model.EventContainer.call(this);this.parent_=parent;this.id_=id;this.category_=category||'';this.name_=name;this.series_=[];this.totals=[];}
+Counter.prototype={__proto__:tr.model.EventContainer.prototype,get parent(){return this.parent_;},get id(){return this.id_;},get category(){return this.category_;},get name(){return this.name_;},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){},iterateAllChildEventContainers:function(callback,opt_this){for(var i=0;i<this.series_.length;i++)
+callback.call(opt_this,this.series_[i]);},set timestamps(arg){throw new Error('Bad counter API. No cookie.');},set seriesNames(arg){throw new Error('Bad counter API. No cookie.');},set seriesColors(arg){throw new Error('Bad counter API. No cookie.');},set samples(arg){throw new Error('Bad counter API. No cookie.');},addSeries:function(series){series.counter=this;series.seriesIndex=this.series_.length;this.series_.push(series);return series;},getSeries:function(idx){return this.series_[idx];},get series(){return this.series_;},get numSeries(){return this.series_.length;},get numSamples(){if(this.series_.length===0)
+return 0;return this.series_[0].length;},get timestamps(){if(this.series_.length===0)
+return[];return this.series_[0].timestamps;},getSampleStatistics:function(sampleIndices){sampleIndices.sort();var ret=[];this.series_.forEach(function(series){ret.push(series.getStatistics(sampleIndices));});return ret;},shiftTimestampsForward:function(amount){for(var i=0;i<this.series_.length;++i)
+this.series_[i].shiftTimestampsForward(amount);},updateBounds:function(){this.totals=[];this.maxTotal=0;this.bounds.reset();if(this.series_.length===0)
+return;var firstSeries=this.series_[0];var lastSeries=this.series_[this.series_.length-1];this.bounds.addValue(firstSeries.getTimestamp(0));this.bounds.addValue(lastSeries.getTimestamp(lastSeries.length-1));var numSeries=this.numSeries;this.maxTotal=-Infinity;for(var i=0;i<firstSeries.length;++i){var total=0;this.series_.forEach(function(series){total+=series.getSample(i).value;this.totals.push(total);}.bind(this));this.maxTotal=Math.max(total,this.maxTotal);}}};Counter.compare=function(x,y){var tmp=x.parent.compareTo(y);if(tmp!=0)
+return tmp;var tmp=x.name.localeCompare(y.name);if(tmp==0)
+return x.tid-y.tid;return tmp;};return{Counter:Counter};});'use strict';tr.exportTo('tr.model',function(){var Slice=tr.model.Slice;function CpuSlice(cat,title,colorId,start,args,opt_duration){Slice.apply(this,arguments);this.threadThatWasRunning=undefined;this.cpu=undefined;}
 CpuSlice.prototype={__proto__:Slice.prototype,get analysisTypeName(){return'tr.ui.analysis.CpuSlice';},getAssociatedTimeslice:function(){if(!this.threadThatWasRunning)
 return undefined;var timeSlices=this.threadThatWasRunning.timeSlices;for(var i=0;i<timeSlices.length;i++){var timeSlice=timeSlices[i];if(timeSlice.start!==this.start)
 continue;if(timeSlice.duration!==this.duration)
@@ -3324,61 +3869,36 @@
 stats[freqSample.value]=0;stats[freqSample.value]+=intersection.duration;}
 var freqCounter=this.getCounter('','Clock Frequency');if(freqCounter!==undefined){var freqSeries=freqCounter.getSeries(0);if(!freqSeries)
 return;tr.b.iterateOverIntersectingIntervals(freqSeries.samples_,function(x){return x.timestamp;},function(x,index){return index<freqSeries.length-1?freqSeries.samples_[index+1].timestamp:range.max;},range.min,range.max,addStatsForFreq);}
-return stats;}};Cpu.compare=function(x,y){return x.cpuNumber-y.cpuNumber;};return{Cpu:Cpu};});'use strict';tr.exportTo('tr.model',function(){function ObjectSnapshot(objectInstance,ts,args){tr.model.Event.call(this);this.objectInstance=objectInstance;this.ts=ts;this.args=args;}
-ObjectSnapshot.prototype={__proto__:tr.model.Event.prototype,preInitialize:function(){},initialize:function(){},addBoundsToRange:function(range){range.addValue(this.ts);},get userFriendlyName(){return'Snapshot of '+
-this.objectInstance.typeName+' '+
-this.objectInstance.id+' @ '+
-tr.b.u.TimeStamp.format(this.ts);}};tr.model.EventRegistry.register(ObjectSnapshot,{name:'objectSnapshot',pluralName:'objectSnapshots',singleViewElementName:'tr-ui-a-single-object-snapshot-sub-view',multiViewElementName:'tr-ui-a-multi-object-sub-view'});var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectSnapshot;options.defaultConstructor=ObjectSnapshot;tr.b.decorateExtensionRegistry(ObjectSnapshot,options);return{ObjectSnapshot:ObjectSnapshot};});'use strict';tr.exportTo('tr.model',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function ObjectInstance(parent,id,category,name,creationTs,opt_baseTypeName){tr.model.Event.call(this);this.parent=parent;this.id=id;this.category=category;this.baseTypeName=opt_baseTypeName?opt_baseTypeName:name;this.name=name;this.creationTs=creationTs;this.creationTsWasExplicit=false;this.deletionTs=Number.MAX_VALUE;this.deletionTsWasExplicit=false;this.colorId=0;this.bounds=new tr.b.Range();this.snapshots=[];this.hasImplicitSnapshots=false;}
-ObjectInstance.prototype={__proto__:tr.model.Event.prototype,get typeName(){return this.name;},addBoundsToRange:function(range){range.addRange(this.bounds);},addSnapshot:function(ts,args,opt_name,opt_baseTypeName){if(ts<this.creationTs)
-throw new Error('Snapshots must be >= instance.creationTs');if(ts>=this.deletionTs)
-throw new Error('Snapshots cannot be added after '+'an objects deletion timestamp.');var lastSnapshot;if(this.snapshots.length>0){lastSnapshot=this.snapshots[this.snapshots.length-1];if(lastSnapshot.ts==ts)
-throw new Error('Snapshots already exists at this time!');if(ts<lastSnapshot.ts){throw new Error('Snapshots must be added in increasing timestamp order');}}
-if(opt_name&&(this.name!=opt_name)){if(!opt_baseTypeName)
-throw new Error('Must provide base type name for name update');if(this.baseTypeName!=opt_baseTypeName)
-throw new Error('Cannot update type name: base types dont match');this.name=opt_name;}
-var snapshotConstructor=tr.model.ObjectSnapshot.getConstructor(this.category,this.name);var snapshot=new snapshotConstructor(this,ts,args);this.snapshots.push(snapshot);return snapshot;},wasDeleted:function(ts){var lastSnapshot;if(this.snapshots.length>0){lastSnapshot=this.snapshots[this.snapshots.length-1];if(lastSnapshot.ts>ts)
-throw new Error('Instance cannot be deleted at ts='+
-ts+'. A snapshot exists that is older.');}
-this.deletionTs=ts;this.deletionTsWasExplicit=true;},preInitialize:function(){for(var i=0;i<this.snapshots.length;i++)
-this.snapshots[i].preInitialize();},initialize:function(){for(var i=0;i<this.snapshots.length;i++)
-this.snapshots[i].initialize();},getSnapshotAt:function(ts){if(ts<this.creationTs){if(this.creationTsWasExplicit)
-throw new Error('ts must be within lifetime of this instance');return this.snapshots[0];}
-if(ts>this.deletionTs)
-throw new Error('ts must be within lifetime of this instance');var snapshots=this.snapshots;var i=tr.b.findIndexInSortedIntervals(snapshots,function(snapshot){return snapshot.ts;},function(snapshot,i){if(i==snapshots.length-1)
-return snapshots[i].objectInstance.deletionTs;return snapshots[i+1].ts-snapshots[i].ts;},ts);if(i<0){return this.snapshots[0];}
-if(i>=this.snapshots.length)
-return this.snapshots[this.snapshots.length-1];return this.snapshots[i];},updateBounds:function(){this.bounds.reset();this.bounds.addValue(this.creationTs);if(this.deletionTs!=Number.MAX_VALUE)
-this.bounds.addValue(this.deletionTs);else if(this.snapshots.length>0)
-this.bounds.addValue(this.snapshots[this.snapshots.length-1].ts);},shiftTimestampsForward:function(amount){this.creationTs+=amount;if(this.deletionTs!=Number.MAX_VALUE)
-this.deletionTs+=amount;this.snapshots.forEach(function(snapshot){snapshot.ts+=amount;});},get userFriendlyName(){return this.typeName+' object '+this.id;}};tr.model.EventRegistry.register(ObjectInstance,{name:'objectInstance',pluralName:'objectInstances',singleViewElementName:'tr-ui-a-single-object-instance-sub-view',multiViewElementName:'tr-ui-a-multi-object-sub-view'});var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectInstance;options.defaultConstructor=ObjectInstance;tr.b.decorateExtensionRegistry(ObjectInstance,options);return{ObjectInstance:ObjectInstance};});'use strict';tr.exportTo('tr.model',function(){function TimeToObjectInstanceMap(createObjectInstanceFunction,parent,id){this.createObjectInstanceFunction_=createObjectInstanceFunction;this.parent=parent;this.id=id;this.instances=[];}
-TimeToObjectInstanceMap.prototype={idWasCreated:function(category,name,ts){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts));this.instances[0].creationTsWasExplicit=true;return this.instances[0];}
+return stats;}};Cpu.compare=function(x,y){return x.cpuNumber-y.cpuNumber;};return{Cpu:Cpu};});'use strict';tr.exportTo('tr.model',function(){function TimeToObjectInstanceMap(createObjectInstanceFunction,parent,scopedId){this.createObjectInstanceFunction_=createObjectInstanceFunction;this.parent=parent;this.scopedId=scopedId;this.instances=[];}
+TimeToObjectInstanceMap.prototype={idWasCreated:function(category,name,ts){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.scopedId,category,name,ts));this.instances[0].creationTsWasExplicit=true;return this.instances[0];}
 var lastInstance=this.instances[this.instances.length-1];if(ts<lastInstance.deletionTs){throw new Error('Mutation of the TimeToObjectInstanceMap must be '+'done in ascending timestamp order.');}
-lastInstance=this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts);lastInstance.creationTsWasExplicit=true;this.instances.push(lastInstance);return lastInstance;},addSnapshot:function(category,name,ts,args,opt_baseTypeName){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts,opt_baseTypeName));}
+lastInstance=this.createObjectInstanceFunction_(this.parent,this.scopedId,category,name,ts);lastInstance.creationTsWasExplicit=true;this.instances.push(lastInstance);return lastInstance;},addSnapshot:function(category,name,ts,args,opt_baseTypeName){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.scopedId,category,name,ts,opt_baseTypeName));}
 var i=tr.b.findIndexInSortedIntervals(this.instances,function(inst){return inst.creationTs;},function(inst){return inst.deletionTs-inst.creationTs;},ts);var instance;if(i<0){instance=this.instances[0];if(ts>instance.deletionTs||instance.creationTsWasExplicit){throw new Error('At the provided timestamp, no instance was still alive');}
 if(instance.snapshots.length!=0){throw new Error('Cannot shift creationTs forward, '+'snapshots have been added. First snap was at ts='+
 instance.snapshots[0].ts+' and creationTs was '+
 instance.creationTs);}
-instance.creationTs=ts;}else if(i>=this.instances.length){instance=this.instances[this.instances.length-1];if(ts>=instance.deletionTs){instance=this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts,opt_baseTypeName);this.instances.push(instance);}else{var lastValidIndex;for(var i=this.instances.length-1;i>=0;i--){var tmp=this.instances[i];if(ts>=tmp.deletionTs)
+instance.creationTs=ts;}else if(i>=this.instances.length){instance=this.instances[this.instances.length-1];if(ts>=instance.deletionTs){instance=this.createObjectInstanceFunction_(this.parent,this.scopedId,category,name,ts,opt_baseTypeName);this.instances.push(instance);}else{var lastValidIndex;for(var i=this.instances.length-1;i>=0;i--){var tmp=this.instances[i];if(ts>=tmp.deletionTs)
 break;if(tmp.creationTsWasExplicit==false&&tmp.snapshots.length==0)
 lastValidIndex=i;}
 if(lastValidIndex===undefined){throw new Error('Cannot add snapshot. No instance was alive that was mutable.');}
 instance=this.instances[lastValidIndex];instance.creationTs=ts;}}else{instance=this.instances[i];}
 return instance.addSnapshot(ts,args,name,opt_baseTypeName);},get lastInstance(){if(this.instances.length==0)
-return undefined;return this.instances[this.instances.length-1];},idWasDeleted:function(category,name,ts){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts));}
+return undefined;return this.instances[this.instances.length-1];},idWasDeleted:function(category,name,ts){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.scopedId,category,name,ts));}
 var lastInstance=this.instances[this.instances.length-1];if(ts<lastInstance.creationTs)
-throw new Error('Cannot delete a id before it was crated');if(lastInstance.deletionTs==Number.MAX_VALUE){lastInstance.wasDeleted(ts);return lastInstance;}
+throw new Error('Cannot delete an id before it was created');if(lastInstance.deletionTs==Number.MAX_VALUE){lastInstance.wasDeleted(ts);return lastInstance;}
 if(ts<lastInstance.deletionTs)
-throw new Error('id was already deleted earlier.');lastInstance=this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts);this.instances.push(lastInstance);lastInstance.wasDeleted(ts);return lastInstance;},getInstanceAt:function(ts){var i=tr.b.findIndexInSortedIntervals(this.instances,function(inst){return inst.creationTs;},function(inst){return inst.deletionTs-inst.creationTs;},ts);if(i<0){if(this.instances[0].creationTsWasExplicit)
+throw new Error('id was already deleted earlier.');lastInstance=this.createObjectInstanceFunction_(this.parent,this.scopedId,category,name,ts);this.instances.push(lastInstance);lastInstance.wasDeleted(ts);return lastInstance;},getInstanceAt:function(ts){var i=tr.b.findIndexInSortedIntervals(this.instances,function(inst){return inst.creationTs;},function(inst){return inst.deletionTs-inst.creationTs;},ts);if(i<0){if(this.instances[0].creationTsWasExplicit)
 return undefined;return this.instances[0];}else if(i>=this.instances.length){return undefined;}
 return this.instances[i];},logToConsole:function(){for(var i=0;i<this.instances.length;i++){var instance=this.instances[i];var cEF='';var dEF='';if(instance.creationTsWasExplicit)
 cEF='(explicitC)';if(instance.deletionTsWasExplicit)
-dEF='(explicit)';console.log(instance.creationTs,cEF,instance.deletionTs,dEF,instance.category,instance.name,instance.snapshots.length+' snapshots');}}};return{TimeToObjectInstanceMap:TimeToObjectInstanceMap};});'use strict';tr.exportTo('tr.model',function(){var ObjectInstance=tr.model.ObjectInstance;var ObjectSnapshot=tr.model.ObjectSnapshot;function ObjectCollection(parent){tr.model.EventContainer.call(this);this.parent=parent;this.instanceMapsById_={};this.instancesByTypeName_={};this.createObjectInstance_=this.createObjectInstance_.bind(this);}
+dEF='(explicit)';console.log(instance.creationTs,cEF,instance.deletionTs,dEF,instance.category,instance.name,instance.snapshots.length+' snapshots');}}};return{TimeToObjectInstanceMap:TimeToObjectInstanceMap};});'use strict';tr.exportTo('tr.model',function(){var ObjectInstance=tr.model.ObjectInstance;var ObjectSnapshot=tr.model.ObjectSnapshot;function ObjectCollection(parent){tr.model.EventContainer.call(this);this.parent=parent;this.instanceMapsByScopedId_={};this.instancesByTypeName_={};this.createObjectInstance_=this.createObjectInstance_.bind(this);}
 ObjectCollection.prototype={__proto__:tr.model.EventContainer.prototype,iterateAllChildEventContainers:function(callback,opt_this){},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){var bI=!!eventTypePredicate.call(opt_this,ObjectInstance);var bS=!!eventTypePredicate.call(opt_this,ObjectSnapshot);if(bI===false&&bS===false)
 return;this.iterObjectInstances(function(instance){if(bI)
 callback.call(opt_this,instance);if(bS)
-instance.snapshots.forEach(callback,opt_this);},opt_this);},createObjectInstance_:function(parent,id,category,name,creationTs,opt_baseTypeName){var constructor=tr.model.ObjectInstance.getConstructor(category,name);var instance=new constructor(parent,id,category,name,creationTs,opt_baseTypeName);var typeName=instance.typeName;var instancesOfTypeName=this.instancesByTypeName_[typeName];if(!instancesOfTypeName){instancesOfTypeName=[];this.instancesByTypeName_[typeName]=instancesOfTypeName;}
-instancesOfTypeName.push(instance);return instance;},getOrCreateInstanceMap_:function(id){var instanceMap=this.instanceMapsById_[id];if(instanceMap)
-return instanceMap;instanceMap=new tr.model.TimeToObjectInstanceMap(this.createObjectInstance_,this.parent,id);this.instanceMapsById_[id]=instanceMap;return instanceMap;},idWasCreated:function(id,category,name,ts){var instanceMap=this.getOrCreateInstanceMap_(id);return instanceMap.idWasCreated(category,name,ts);},addSnapshot:function(id,category,name,ts,args,opt_baseTypeName){var instanceMap=this.getOrCreateInstanceMap_(id);var snapshot=instanceMap.addSnapshot(category,name,ts,args,opt_baseTypeName);if(snapshot.objectInstance.category!=category){var msg='Added snapshot name='+name+' with cat='+category+' impossible. It instance was created/snapshotted with cat='+
+instance.snapshots.forEach(callback,opt_this);},opt_this);},createObjectInstance_:function(parent,scopedId,category,name,creationTs,opt_baseTypeName){var constructor=tr.model.ObjectInstance.getConstructor(category,name);var instance=new constructor(parent,scopedId,category,name,creationTs,opt_baseTypeName);var typeName=instance.typeName;var instancesOfTypeName=this.instancesByTypeName_[typeName];if(!instancesOfTypeName){instancesOfTypeName=[];this.instancesByTypeName_[typeName]=instancesOfTypeName;}
+instancesOfTypeName.push(instance);return instance;},getOrCreateInstanceMap_:function(scopedId){var dict;if(scopedId.scope in this.instanceMapsByScopedId_){dict=this.instanceMapsByScopedId_[scopedId.scope];}else{dict={};this.instanceMapsByScopedId_[scopedId.scope]=dict;}
+var instanceMap=dict[scopedId.id];if(instanceMap)
+return instanceMap;instanceMap=new tr.model.TimeToObjectInstanceMap(this.createObjectInstance_,this.parent,scopedId);dict[scopedId.id]=instanceMap;return instanceMap;},idWasCreated:function(scopedId,category,name,ts){var instanceMap=this.getOrCreateInstanceMap_(scopedId);return instanceMap.idWasCreated(category,name,ts);},addSnapshot:function(scopedId,category,name,ts,args,opt_baseTypeName){var instanceMap=this.getOrCreateInstanceMap_(scopedId);var snapshot=instanceMap.addSnapshot(category,name,ts,args,opt_baseTypeName);if(snapshot.objectInstance.category!=category){var msg='Added snapshot name='+name+' with cat='+category+' impossible. It instance was created/snapshotted with cat='+
 snapshot.objectInstance.category+' name='+
 snapshot.objectInstance.name;throw new Error(msg);}
 if(opt_baseTypeName&&snapshot.objectInstance.baseTypeName!=opt_baseTypeName){throw new Error('Could not add snapshot with baseTypeName='+
@@ -3386,23 +3906,16 @@
 snapshot.objectInstance.baseTypeName);}
 if(snapshot.objectInstance.name!=name){throw new Error('Could not add snapshot with name='+name+'. It '+'was previously created with name='+
 snapshot.objectInstance.name);}
-return snapshot;},idWasDeleted:function(id,category,name,ts){var instanceMap=this.getOrCreateInstanceMap_(id);var deletedInstance=instanceMap.idWasDeleted(category,name,ts);if(!deletedInstance)
+return snapshot;},idWasDeleted:function(scopedId,category,name,ts){var instanceMap=this.getOrCreateInstanceMap_(scopedId);var deletedInstance=instanceMap.idWasDeleted(category,name,ts);if(!deletedInstance)
 return;if(deletedInstance.category!=category){var msg='Deleting object '+deletedInstance.name+' with a different category '+'than when it was created. It previous had cat='+
 deletedInstance.category+' but the delete command '+'had cat='+category;throw new Error(msg);}
 if(deletedInstance.baseTypeName!=name){throw new Error('Deletion requested for name='+
 name+' could not proceed: '+'An existing object with baseTypeName='+
-deletedInstance.baseTypeName+' existed.');}},autoDeleteObjects:function(maxTimestamp){tr.b.iterItems(this.instanceMapsById_,function(id,i2imap){var lastInstance=i2imap.lastInstance;if(lastInstance.deletionTs!=Number.MAX_VALUE)
-return;i2imap.idWasDeleted(lastInstance.category,lastInstance.name,maxTimestamp);lastInstance.deletionTsWasExplicit=false;});},getObjectInstanceAt:function(id,ts){var instanceMap=this.instanceMapsById_[id];if(!instanceMap)
-return undefined;return instanceMap.getInstanceAt(ts);},getSnapshotAt:function(id,ts){var instance=this.getObjectInstanceAt(id,ts);if(!instance)
-return undefined;return instance.getSnapshotAt(ts);},iterObjectInstances:function(iter,opt_this){opt_this=opt_this||this;tr.b.iterItems(this.instanceMapsById_,function(id,i2imap){i2imap.instances.forEach(iter,opt_this);});},getAllObjectInstances:function(){var instances=[];this.iterObjectInstances(function(i){instances.push(i);});return instances;},getAllInstancesNamed:function(name){return this.instancesByTypeName_[name];},getAllInstancesByTypeName:function(){return this.instancesByTypeName_;},preInitializeAllObjects:function(){this.iterObjectInstances(function(instance){instance.preInitialize();});},initializeAllObjects:function(){this.iterObjectInstances(function(instance){instance.initialize();});},initializeInstances:function(){this.iterObjectInstances(function(instance){instance.initialize();});},updateBounds:function(){this.bounds.reset();this.iterObjectInstances(function(instance){instance.updateBounds();this.bounds.addRange(instance.bounds);},this);},shiftTimestampsForward:function(amount){this.iterObjectInstances(function(instance){instance.shiftTimestampsForward(amount);});},addCategoriesToDict:function(categoriesDict){this.iterObjectInstances(function(instance){categoriesDict[instance.category]=true;});}};return{ObjectCollection:ObjectCollection};});'use strict';tr.exportTo('tr.model',function(){function AsyncSlice(category,title,colorId,start,args,duration,opt_isTopLevel,opt_cpuStart,opt_cpuDuration,opt_argsStripped){tr.model.TimedEvent.call(this,start);this.category=category||'';this.title=title;this.colorId=colorId;this.args=args;this.startStackFrame=undefined;this.endStackFrame=undefined;this.didNotFinish=false;this.important=false;this.subSlices=[];this.parentContainer=undefined;this.id=undefined;this.startThread=undefined;this.endThread=undefined;this.cpuStart=undefined;this.cpuDuration=undefined;this.argsStripped=false;this.startStackFrame=undefined;this.endStackFrame=undefined;this.duration=duration;this.isTopLevel=(opt_isTopLevel===true);if(opt_cpuStart!==undefined)
-this.cpuStart=opt_cpuStart;if(opt_cpuDuration!==undefined)
-this.cpuDuration=opt_cpuDuration;if(opt_argsStripped!==undefined)
-this.argsStripped=opt_argsStripped;};AsyncSlice.prototype={__proto__:tr.model.TimedEvent.prototype,get analysisTypeName(){return this.title;},get viewSubGroupTitle(){return this.title;},get userFriendlyName(){return'Async slice '+this.title+' at '+
-tr.b.u.TimeStamp.format(this.start);},get stableId(){var parentAsyncSliceGroup=this.parentContainer.asyncSliceGroup;return parentAsyncSliceGroup.stableId+'.'+
-parentAsyncSliceGroup.slices.indexOf(this);},findDescendentSlice:function(targetTitle){if(!this.subSlices)
-return undefined;for(var i=0;i<this.subSlices.length;i++){if(this.subSlices[i].title==targetTitle)
-return this.subSlices[i];var slice=this.subSlices[i].findDescendentSlice(targetTitle);if(slice)return slice;}
-return undefined;},iterateAllDescendents:function(callback,opt_this){this.subSlices.forEach(callback,opt_this);this.subSlices.forEach(function(subSlice){subSlice.iterateAllDescendents(callback,opt_this);},opt_this);},compareTo:function(that){return this.title.localeCompare(that.title);}};tr.model.EventRegistry.register(AsyncSlice,{name:'asyncSlice',pluralName:'asyncSlices',singleViewElementName:'tr-ui-a-single-async-slice-sub-view',multiViewElementName:'tr-ui-a-multi-async-slice-sub-view'});var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=AsyncSlice;options.defaultConstructor=AsyncSlice;tr.b.decorateExtensionRegistry(AsyncSlice,options);return{AsyncSlice:AsyncSlice};});'use strict';tr.exportTo('tr.model',function(){function AsyncSliceGroup(parentContainer,opt_name){tr.model.EventContainer.call(this);this.parentContainer_=parentContainer;this.slices=[];this.name_=opt_name;this.viewSubGroups_=undefined;}
+deletedInstance.baseTypeName+' existed.');}},autoDeleteObjects:function(maxTimestamp){tr.b.iterItems(this.instanceMapsByScopedId_,function(scope,imapById){tr.b.iterItems(imapById,function(id,i2imap){var lastInstance=i2imap.lastInstance;if(lastInstance.deletionTs!=Number.MAX_VALUE)
+return;i2imap.idWasDeleted(lastInstance.category,lastInstance.name,maxTimestamp);lastInstance.deletionTsWasExplicit=false;});});},getObjectInstanceAt:function(scopedId,ts){var instanceMap;if(scopedId.scope in this.instanceMapsByScopedId_)
+instanceMap=this.instanceMapsByScopedId_[scopedId.scope][scopedId.id];if(!instanceMap)
+return undefined;return instanceMap.getInstanceAt(ts);},getSnapshotAt:function(scopedId,ts){var instance=this.getObjectInstanceAt(scopedId,ts);if(!instance)
+return undefined;return instance.getSnapshotAt(ts);},iterObjectInstances:function(iter,opt_this){opt_this=opt_this||this;tr.b.iterItems(this.instanceMapsByScopedId_,function(scope,imapById){tr.b.iterItems(imapById,function(id,i2imap){i2imap.instances.forEach(iter,opt_this);});});},getAllObjectInstances:function(){var instances=[];this.iterObjectInstances(function(i){instances.push(i);});return instances;},getAllInstancesNamed:function(name){return this.instancesByTypeName_[name];},getAllInstancesByTypeName:function(){return this.instancesByTypeName_;},preInitializeAllObjects:function(){this.iterObjectInstances(function(instance){instance.preInitialize();});},initializeAllObjects:function(){this.iterObjectInstances(function(instance){instance.initialize();});},initializeInstances:function(){this.iterObjectInstances(function(instance){instance.initialize();});},updateBounds:function(){this.bounds.reset();this.iterObjectInstances(function(instance){instance.updateBounds();this.bounds.addRange(instance.bounds);},this);},shiftTimestampsForward:function(amount){this.iterObjectInstances(function(instance){instance.shiftTimestampsForward(amount);});},addCategoriesToDict:function(categoriesDict){this.iterObjectInstances(function(instance){categoriesDict[instance.category]=true;});}};return{ObjectCollection:ObjectCollection};});'use strict';tr.exportTo('tr.model',function(){function AsyncSliceGroup(parentContainer,opt_name){tr.model.EventContainer.call(this);this.parentContainer_=parentContainer;this.slices=[];this.name_=opt_name;this.viewSubGroups_=undefined;}
 AsyncSliceGroup.prototype={__proto__:tr.model.EventContainer.prototype,get parentContainer(){return this.parentContainer_;},get model(){return this.parentContainer_.parent.model;},get stableId(){return this.parentContainer_.stableId+'.AsyncSliceGroup';},getSettingsKey:function(){if(!this.name_)
 return undefined;var parentKey=this.parentContainer_.getSettingsKey();if(!parentKey)
 return undefined;return parentKey+'.'+this.name_;},push:function(slice){slice.parentContainer=this.parentContainer;this.slices.push(slice);return slice;},get length(){return this.slices.length;},shiftTimestampsForward:function(amount){for(var sI=0;sI<this.slices.length;sI++){var slice=this.slices[sI];slice.start=(slice.start+amount);var shiftSubSlices=function(subSlices){if(subSlices===undefined||subSlices.length===0)
@@ -3426,9 +3939,8 @@
 throw new Error('endSlice called without an open slice');var slice=this.openPartialSlices_[this.openSliceCount-1];this.openPartialSlices_.splice(this.openSliceCount-1,1);if(ts<slice.start)
 throw new Error('Slice '+slice.title+' end time is before its start.');slice.duration=ts-slice.start;slice.didNotFinish=false;slice.colorId=opt_colorId||slice.colorId;if(opt_tts&&slice.cpuStart!==undefined)
 slice.cpuDuration=opt_tts-slice.cpuStart;return slice;},pushCompleteSlice:function(category,title,ts,duration,tts,cpuDuration,opt_args,opt_argsStripped,opt_colorId,opt_bind_id){var colorId=opt_colorId||ColorScheme.getColorIdForGeneralPurposeString(title);var slice=new this.sliceConstructor(category,title,colorId,ts,opt_args?opt_args:{},duration,tts,cpuDuration,opt_argsStripped,opt_bind_id);if(duration===undefined)
-slice.didNotFinish=true;this.pushSlice(slice);return slice;},autoCloseOpenSlices:function(opt_maxTimestamp){if(!opt_maxTimestamp){this.updateBounds();opt_maxTimestamp=this.bounds.max;}
-for(var sI=0;sI<this.slices.length;sI++){var slice=this.slices[sI];if(slice.didNotFinish)
-slice.duration=opt_maxTimestamp-slice.start;}
+slice.didNotFinish=true;this.pushSlice(slice);return slice;},autoCloseOpenSlices:function(){this.updateBounds();var maxTimestamp=this.bounds.max;for(var sI=0;sI<this.slices.length;sI++){var slice=this.slices[sI];if(slice.didNotFinish)
+slice.duration=maxTimestamp-slice.start;}
 this.openPartialSlices_=[];},shiftTimestampsForward:function(amount){for(var sI=0;sI<this.slices.length;sI++){var slice=this.slices[sI];slice.start=(slice.start+amount);}},updateBounds:function(){this.bounds.reset();for(var i=0;i<this.slices.length;i++){this.bounds.addValue(this.slices[i].start);this.bounds.addValue(this.slices[i].end);}},copySlice:function(slice){var newSlice=new this.sliceConstructor(slice.category,slice.title,slice.colorId,slice.start,slice.args,slice.duration,slice.cpuStart,slice.cpuDuration);newSlice.didNotFinish=slice.didNotFinish;return newSlice;},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,this.sliceConstructor))
 this.slices.forEach(callback,opt_this);},iterateAllChildEventContainers:function(callback,opt_this){},getSlicesOfName:function(title){var slices=[];for(var i=0;i<this.slices.length;i++){if(this.slices[i].title==title){slices.push(this.slices[i]);}}
 return slices;},iterSlicesInTimeRange:function(callback,start,end){var ret=[];tr.b.iterateOverIntersectingIntervals(this.topLevelSlices,function(s){return s.start;},function(s){return s.duration;},start,end,function(topLevelSlice){callback(topLevelSlice);topLevelSlice.iterateAllDescendents(callback);});return ret;},findFirstSlice:function(){if(!this.haveTopLevelSlicesBeenBuilt)
@@ -3471,8 +3983,7 @@
 if(endB===undefined||endA<endB){splitOpenSlices(endA);openA.pop();}else{openB.pop();}}};while(idxA<slicesA.length||idxB<slicesB.length){var sA=slicesA[idxA];var sB=slicesB[idxB];var nextSlice,isFromB;if(sA===undefined||(sB!==undefined&&sA.start>sB.start)){nextSlice=result.copySlice(sB);isFromB=true;idxB++;}else{nextSlice=result.copySlice(sA);isFromB=false;idxA++;}
 closeOpenSlices(nextSlice.start);result.pushSlice(nextSlice);if(isFromB){openB.push(nextSlice);}else{splitOpenSlices(nextSlice.start);openA.push(nextSlice);}}
 closeOpenSlices();return result;};return{SliceGroup:SliceGroup};});'use strict';tr.exportTo('tr.model',function(){var Slice=tr.model.Slice;function ThreadSlice(cat,title,colorId,start,args,opt_duration,opt_cpuStart,opt_cpuDuration,opt_argsStripped,opt_bind_id){Slice.call(this,cat,title,colorId,start,args,opt_duration,opt_cpuStart,opt_cpuDuration,opt_argsStripped,opt_bind_id);this.subSlices=[];}
-ThreadSlice.prototype={__proto__:Slice.prototype,getProcess:function(){var thread=this.parentContainer;if(thread&&thread.getProcess)
-return thread.getProcess();return undefined;}};tr.model.EventRegistry.register(ThreadSlice,{name:'slice',pluralName:'slices',singleViewElementName:'tr-ui-a-single-thread-slice-sub-view',multiViewElementName:'tr-ui-a-multi-thread-slice-sub-view'});return{ThreadSlice:ThreadSlice};});'use strict';tr.exportTo('tr.model',function(){var AsyncSlice=tr.model.AsyncSlice;var AsyncSliceGroup=tr.model.AsyncSliceGroup;var Slice=tr.model.Slice;var SliceGroup=tr.model.SliceGroup;var ThreadSlice=tr.model.ThreadSlice;var ThreadTimeSlice=tr.model.ThreadTimeSlice;function Thread(parent,tid){if(!parent)
+ThreadSlice.prototype={__proto__:Slice.prototype};tr.model.EventRegistry.register(ThreadSlice,{name:'slice',pluralName:'slices',singleViewElementName:'tr-ui-a-single-thread-slice-sub-view',multiViewElementName:'tr-ui-a-multi-thread-slice-sub-view'});return{ThreadSlice:ThreadSlice};});'use strict';tr.exportTo('tr.model',function(){var AsyncSlice=tr.model.AsyncSlice;var AsyncSliceGroup=tr.model.AsyncSliceGroup;var Slice=tr.model.Slice;var SliceGroup=tr.model.SliceGroup;var ThreadSlice=tr.model.ThreadSlice;var ThreadTimeSlice=tr.model.ThreadTimeSlice;function Thread(parent,tid){if(!parent)
 throw new Error('Parent must be provided.');tr.model.EventContainer.call(this);this.parent=parent;this.sortIndex=0;this.tid=tid;this.name=undefined;this.samples_=undefined;var that=this;this.sliceGroup=new SliceGroup(this,ThreadSlice,'slices');this.timeSlices=undefined;this.kernelSliceGroup=new SliceGroup(this,ThreadSlice,'kernel-slices');this.asyncSliceGroup=new AsyncSliceGroup(this,'async-slices');}
 Thread.prototype={__proto__:tr.model.EventContainer.prototype,get model(){return this.parent.model;},get stableId(){return this.parent.stableId+'.'+this.tid;},compareTo:function(that){return Thread.compare(this,that);},iterateAllChildEventContainers:function(callback,opt_this){if(this.sliceGroup.length)
 callback.call(opt_this,this.sliceGroup);if(this.kernelSliceGroup.length)
@@ -3491,7 +4002,7 @@
 categoriesDict[this.sliceGroup.slices[i].category]=true;for(var i=0;i<this.kernelSliceGroup.length;i++)
 categoriesDict[this.kernelSliceGroup.slices[i].category]=true;for(var i=0;i<this.asyncSliceGroup.length;i++)
 categoriesDict[this.asyncSliceGroup.slices[i].category]=true;if(this.samples_){for(var i=0;i<this.samples_.length;i++)
-categoriesDict[this.samples_[i].category]=true;}},autoCloseOpenSlices:function(opt_maxTimestamp){this.sliceGroup.autoCloseOpenSlices(opt_maxTimestamp);this.kernelSliceGroup.autoCloseOpenSlices(opt_maxTimestamp);},mergeKernelWithUserland:function(){if(this.kernelSliceGroup.length>0){var newSlices=SliceGroup.merge(this.sliceGroup,this.kernelSliceGroup);this.sliceGroup.slices=newSlices.slices;this.kernelSliceGroup=new SliceGroup(this);this.updateBounds();}},createSubSlices:function(){this.sliceGroup.createSubSlices();this.samples_=this.parent.model.samples.filter(function(sample){return sample.thread==this;},this);},get userFriendlyName(){return this.name||this.tid;},get userFriendlyDetails(){return'tid: '+this.tid+
+categoriesDict[this.samples_[i].category]=true;}},autoCloseOpenSlices:function(){this.sliceGroup.autoCloseOpenSlices();this.kernelSliceGroup.autoCloseOpenSlices();},mergeKernelWithUserland:function(){if(this.kernelSliceGroup.length>0){var newSlices=SliceGroup.merge(this.sliceGroup,this.kernelSliceGroup);this.sliceGroup.slices=newSlices.slices;this.kernelSliceGroup=new SliceGroup(this);this.updateBounds();}},createSubSlices:function(){this.sliceGroup.createSubSlices();this.samples_=this.parent.model.samples.filter(function(sample){return sample.thread==this;},this);},get userFriendlyName(){return this.name||this.tid;},get userFriendlyDetails(){return'tid: '+this.tid+
 (this.name?', name: '+this.name:'');},getSettingsKey:function(){if(!this.name)
 return undefined;var parentKey=this.parent.getSettingsKey();if(!parentKey)
 return undefined;return parentKey+'.'+this.name;},getProcess:function(){return this.parent;},indexOfTimeSlice:function(timeSlice){var i=tr.b.findLowIndexInSortedArray(this.timeSlices,function(slice){return slice.start;},timeSlice.start);if(this.timeSlices[i]!==timeSlice)
@@ -3508,7 +4019,7 @@
 callback.call(opt_this,this.threads[tid]);for(var id in this.counters)
 callback.call(opt_this,this.counters[id]);callback.call(opt_this,this.objects);},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){},iterateAllPersistableObjects:function(cb){cb(this);for(var tid in this.threads)
 this.threads[tid].iterateAllPersistableObjects(cb);},get numThreads(){var n=0;for(var p in this.threads){n++;}
-return n;},shiftTimestampsForward:function(amount){this.iterateAllChildEventContainers(function(child){child.shiftTimestampsForward(amount);});},autoCloseOpenSlices:function(opt_maxTimestamp){for(var tid in this.threads){var thread=this.threads[tid];thread.autoCloseOpenSlices(opt_maxTimestamp);}},autoDeleteObjects:function(maxTimestamp){this.objects.autoDeleteObjects(maxTimestamp);},preInitializeObjects:function(){this.objects.preInitializeAllObjects();},initializeObjects:function(){this.objects.initializeAllObjects();},mergeKernelWithUserland:function(){for(var tid in this.threads){var thread=this.threads[tid];thread.mergeKernelWithUserland();}},updateBounds:function(){this.bounds.reset();for(var tid in this.threads){this.threads[tid].updateBounds();this.bounds.addRange(this.threads[tid].bounds);}
+return n;},shiftTimestampsForward:function(amount){this.iterateAllChildEventContainers(function(child){child.shiftTimestampsForward(amount);});},autoCloseOpenSlices:function(){for(var tid in this.threads){var thread=this.threads[tid];thread.autoCloseOpenSlices();}},autoDeleteObjects:function(maxTimestamp){this.objects.autoDeleteObjects(maxTimestamp);},preInitializeObjects:function(){this.objects.preInitializeAllObjects();},initializeObjects:function(){this.objects.initializeAllObjects();},mergeKernelWithUserland:function(){for(var tid in this.threads){var thread=this.threads[tid];thread.mergeKernelWithUserland();}},updateBounds:function(){this.bounds.reset();for(var tid in this.threads){this.threads[tid].updateBounds();this.bounds.addRange(this.threads[tid].bounds);}
 for(var id in this.counters){this.counters[id].updateBounds();this.bounds.addRange(this.counters[id].bounds);}
 this.objects.updateBounds();this.bounds.addRange(this.objects.bounds);},addCategoriesToDict:function(categoriesDict){for(var tid in this.threads)
 this.threads[tid].addCategoriesToDict(categoriesDict);for(var id in this.counters)
@@ -3531,34 +4042,56 @@
 this.flowEventsById_[fe.id].push(fe);}},this);}
 ModelIndices.prototype={addEventWithId:function(id,event){if(!this.flowEventsById_.hasOwnProperty(id)){this.flowEventsById_[id]=new Array();}
 this.flowEventsById_[id].push(event);},getFlowEventsWithId:function(id){if(!this.flowEventsById_.hasOwnProperty(id))
-return[];return this.flowEventsById_[id];}};return{ModelIndices:ModelIndices};});'use strict';tr.exportTo('tr.model',function(){var DISCOUNTED_ALLOCATOR_NAMES=['winheap','malloc'];var SIZE_ATTRIBUTE_NAME=tr.model.MemoryAllocatorDump.SIZE_ATTRIBUTE_NAME;var EFFECTIVE_SIZE_ATTRIBUTE_NAME=tr.model.MemoryAllocatorDump.EFFECTIVE_SIZE_ATTRIBUTE_NAME;function ProcessMemoryDump(globalMemoryDump,process,start){tr.model.ContainerMemoryDump.call(this,start);this.process=process;this.globalMemoryDump=globalMemoryDump;this.totals=undefined;this.vmRegions_=undefined;this.heapDumps=undefined;this.tracingMemoryDiscounted_=false;};ProcessMemoryDump.prototype={__proto__:tr.model.ContainerMemoryDump.prototype,get userFriendlyName(){return'Process memory dump at '+
-tr.b.u.TimeStamp.format(this.start);},get containerName(){return this.process.userFriendlyName;},get processMemoryDumps(){var dumps={};dumps[this.process.pid]=this;return dumps;},get vmRegions(){throw new Error('VM regions must be accessed through the mostRecentVmRegions field');},set vmRegions(vmRegions){this.vmRegions_=vmRegions;},get hasOwnVmRegions(){return this.vmRegions_!==undefined;},getMostRecentTotalVmRegionStat:function(statName){if(this.mostRecentVmRegions===undefined)
-return undefined;var total=0;this.mostRecentVmRegions.forEach(function(vmRegion){var statValue=vmRegion.byteStats[statName];if(statValue===undefined)
-return;total+=statValue;});return total;},discountTracingOverhead:function(opt_model){if(this.tracingMemoryDiscounted_)
-return;this.tracingMemoryDiscounted_=true;var tracingDump=this.getMemoryAllocatorDumpByFullName('tracing');if(tracingDump===undefined)
-return;function getDiscountedSize(sizeAttrName){var sizeAttr=tracingDump.getValidSizeAttributeOrUndefined(sizeAttrName,opt_model);if(sizeAttr===undefined)
-return 0;return sizeAttr.value;}
-var discountedSize=getDiscountedSize(SIZE_ATTRIBUTE_NAME);var discountedEffectiveSize=getDiscountedSize(EFFECTIVE_SIZE_ATTRIBUTE_NAME);var discountedResidentSize=getDiscountedSize('resident_size');if(discountedResidentSize>0){if(this.totals!==undefined){if(this.totals.residentBytes!==undefined)
-this.totals.residentBytes-=discountedResidentSize;if(this.totals.peakResidentBytes!==undefined)
-this.totals.peakResidentBytes-=discountedResidentSize;}
-if(this.vmRegions_!==undefined){var hasPrivateDirtyResident=false;var hasProportionalResident=false;for(var i=0;i<this.vmRegions_.length;i++){var byteStats=this.vmRegions_[i].byteStats;if(byteStats.privateDirtyResident!==undefined)
-hasPrivateDirtyResident=true;if(byteStats.proportionalResident!==undefined)
-hasProportionalResident=true;if(hasPrivateDirtyResident&&hasProportionalResident)
-break;}
-if(hasPrivateDirtyResident||hasProportionalResident){this.vmRegions_.push(VMRegion.fromDict({mappedFile:'[discounted tracing overhead]',byteStats:{privateDirtyResident:hasPrivateDirtyResident?-discountedResidentSize:undefined,proportionalResident:hasProportionalResident?-discountedResidentSize:undefined}}));}}}
-if(discountedSize>0||discountedEffectiveSize>0){function discountSizeAndEffectiveSize(dump){var dumpSizeAttr=dump.getValidSizeAttributeOrUndefined(SIZE_ATTRIBUTE_NAME,opt_model);if(dumpSizeAttr!==undefined)
-dumpSizeAttr.value-=discountedSize;var dumpEffectiveSizeAttr=dump.getValidSizeAttributeOrUndefined(EFFECTIVE_SIZE_ATTRIBUTE_NAME,opt_model);if(dumpEffectiveSizeAttr!==undefined)
-dumpEffectiveSizeAttr.value-=discountedEffectiveSize;}
-var hasDiscountedFromAllocatorDumps=DISCOUNTED_ALLOCATOR_NAMES.some(function(allocatorName){var allocatorDump=this.getMemoryAllocatorDumpByFullName(allocatorName);if(allocatorDump===undefined)
-return false;discountSizeAndEffectiveSize(allocatorDump);var allocatedObjectsDumpName=allocatorName+'/allocated_objects';var allocatedObjectsDump=this.getMemoryAllocatorDumpByFullName(allocatedObjectsDumpName);if(allocatedObjectsDump===undefined)
-return true;discountSizeAndEffectiveSize(allocatedObjectsDump);var discountDumpName=allocatedObjectsDumpName+'/discounted_tracing_overhead';var discountDump=new tr.model.MemoryAllocatorDump(this,discountDumpName);discountDump.parent=allocatedObjectsDump;discountDump.addAttribute(SIZE_ATTRIBUTE_NAME,new tr.model.ScalarAttribute('bytes',-discountedSize));discountDump.addAttribute(EFFECTIVE_SIZE_ATTRIBUTE_NAME,new tr.model.ScalarAttribute('bytes',-discountedEffectiveSize));allocatedObjectsDump.children.push(discountDump);return true;},this);if(hasDiscountedFromAllocatorDumps)
-this.memoryAllocatorDumps=this.memoryAllocatorDumps;}}};ProcessMemoryDump.hookUpMostRecentVmRegionsLinks=function(processDumps){var mostRecentVmRegions=undefined;processDumps.forEach(function(processDump){if(processDump.vmRegions_!==undefined)
-mostRecentVmRegions=processDump.vmRegions_;processDump.mostRecentVmRegions=mostRecentVmRegions;});};function VMRegion(startAddress,sizeInBytes,protectionFlags,mappedFile,byteStats){this.startAddress=startAddress;this.sizeInBytes=sizeInBytes;this.protectionFlags=protectionFlags;this.mappedFile=mappedFile;this.byteStats=byteStats;};VMRegion.PROTECTION_FLAG_READ=4;VMRegion.PROTECTION_FLAG_WRITE=2;VMRegion.PROTECTION_FLAG_EXECUTE=1;VMRegion.prototype={get protectionFlagsToString(){if(this.protectionFlags===undefined)
+return[];return this.flowEventsById_[id];}};return{ModelIndices:ModelIndices};});'use strict';tr.exportTo('tr.model',function(){function ModelStats(){this.traceEventCountsByKey_=new Map();this.allTraceEventStats_=[];this.traceEventStatsInTimeIntervals_=new Map();this.allTraceEventStatsInTimeIntervals_=[];this.hasEventSizesinBytes_=false;}
+ModelStats.prototype={TIME_INTERVAL_SIZE_IN_MS:100,willProcessBasicTraceEvent:function(phase,category,title,ts,opt_eventSizeinBytes){var key=phase+'/'+category+'/'+title;var eventStats=this.traceEventCountsByKey_.get(key);if(eventStats===undefined){eventStats={phase:phase,category:category,title:title,numEvents:0,totalEventSizeinBytes:0};this.traceEventCountsByKey_.set(key,eventStats);this.allTraceEventStats_.push(eventStats);}
+eventStats.numEvents++;var timeIntervalKey=Math.floor(tr.v.Unit.timestampFromUs(ts)/this.TIME_INTERVAL_SIZE_IN_MS);var eventStatsByTimeInverval=this.traceEventStatsInTimeIntervals_.get(timeIntervalKey);if(eventStatsByTimeInverval===undefined){eventStatsByTimeInverval={timeInterval:timeIntervalKey,numEvents:0,totalEventSizeinBytes:0};this.traceEventStatsInTimeIntervals_.set(timeIntervalKey,eventStatsByTimeInverval);this.allTraceEventStatsInTimeIntervals_.push(eventStatsByTimeInverval);}
+eventStatsByTimeInverval.numEvents++;if(opt_eventSizeinBytes!==undefined){this.hasEventSizesinBytes_=true;eventStats.totalEventSizeinBytes+=opt_eventSizeinBytes;eventStatsByTimeInverval.totalEventSizeinBytes+=opt_eventSizeinBytes;}},get allTraceEventStats(){return this.allTraceEventStats_;},get allTraceEventStatsInTimeIntervals(){return this.allTraceEventStatsInTimeIntervals_;},get hasEventSizesinBytes(){return this.hasEventSizesinBytes_;}};return{ModelStats:ModelStats};});'use strict';tr.exportTo('tr.model',function(){function VMRegion(startAddress,sizeInBytes,protectionFlags,mappedFile,byteStats){this.startAddress=startAddress;this.sizeInBytes=sizeInBytes;this.protectionFlags=protectionFlags;this.mappedFile=mappedFile||'';this.byteStats=byteStats||{};};VMRegion.PROTECTION_FLAG_READ=4;VMRegion.PROTECTION_FLAG_WRITE=2;VMRegion.PROTECTION_FLAG_EXECUTE=1;VMRegion.PROTECTION_FLAG_MAYSHARE=128;VMRegion.prototype={get uniqueIdWithinProcess(){return this.mappedFile+'#'+this.startAddress;},get protectionFlagsToString(){if(this.protectionFlags===undefined)
 return undefined;return((this.protectionFlags&VMRegion.PROTECTION_FLAG_READ?'r':'-')+
 (this.protectionFlags&VMRegion.PROTECTION_FLAG_WRITE?'w':'-')+
-(this.protectionFlags&VMRegion.PROTECTION_FLAG_EXECUTE?'x':'-'));}};VMRegion.fromDict=function(dict){return new VMRegion(dict.startAddress,dict.sizeInBytes,dict.protectionFlags,dict.mappedFile,VMRegionByteStats.fromDict(dict.byteStats));};function VMRegionByteStats(privateCleanResident,privateDirtyResident,sharedCleanResident,sharedDirtyResident,proportionalResident,swapped){this.privateCleanResident=privateCleanResident;this.privateDirtyResident=privateDirtyResident;this.sharedCleanResident=sharedCleanResident;this.sharedDirtyResident=sharedDirtyResident;this.proportionalResident=proportionalResident;this.swapped=swapped;}
-VMRegionByteStats.fromDict=function(dict){return new VMRegionByteStats(dict.privateCleanResident,dict.privateDirtyResident,dict.sharedCleanResident,dict.sharedDirtyResident,dict.proportionalResident,dict.swapped);}
-tr.model.EventRegistry.register(ProcessMemoryDump,{name:'processMemoryDump',pluralName:'processMemoryDumps',singleViewElementName:'tr-ui-a-container-memory-dump-sub-view',multiViewElementName:'tr-ui-a-container-memory-dump-sub-view'});return{ProcessMemoryDump:ProcessMemoryDump,VMRegion:VMRegion,VMRegionByteStats:VMRegionByteStats};});'use strict';tr.exportTo('tr.model',function(){var ProcessBase=tr.model.ProcessBase;var ProcessInstantEvent=tr.model.ProcessInstantEvent;var Frame=tr.model.Frame;var ProcessMemoryDump=tr.model.ProcessMemoryDump;function Process(model,pid){if(model===undefined)
+(this.protectionFlags&VMRegion.PROTECTION_FLAG_EXECUTE?'x':'-')+
+(this.protectionFlags&VMRegion.PROTECTION_FLAG_MAYSHARE?'s':'p'));}};VMRegion.fromDict=function(dict){return new VMRegion(dict.startAddress,dict.sizeInBytes,dict.protectionFlags,dict.mappedFile,dict.byteStats);};function VMRegionClassificationNode(opt_rule){this.rule_=opt_rule||VMRegionClassificationNode.CLASSIFICATION_RULES;this.hasRegions=false;this.sizeInBytes=undefined;this.byteStats={};this.children_=undefined;this.regions_=[];}
+VMRegionClassificationNode.CLASSIFICATION_RULES={name:'Total',children:[{name:'Android',file:/^\/dev\/ashmem(?!\/libc malloc)/,children:[{name:'Java runtime',file:/^\/dev\/ashmem\/dalvik-/,children:[{name:'Spaces',file:/\/dalvik-(alloc|main|large object|non moving|zygote) space/,children:[{name:'Normal',file:/\/dalvik-(alloc|main)/},{name:'Large',file:/\/dalvik-large object/},{name:'Zygote',file:/\/dalvik-zygote/},{name:'Non-moving',file:/\/dalvik-non moving/}]},{name:'Linear Alloc',file:/\/dalvik-LinearAlloc/},{name:'Indirect Reference Table',file:/\/dalvik-indirect.ref/},{name:'Cache',file:/\/dalvik-jit-code-cache/},{name:'Accounting'}]},{name:'Cursor',file:/\/CursorWindow/},{name:'Ashmem'}]},{name:'Native heap',file:/^((\[heap\])|(\[anon:)|(\/dev\/ashmem\/libc malloc)|(\[discounted tracing overhead\])|$)/},{name:'Stack',file:/^\[stack/},{name:'Files',file:/\.((((jar)|(apk)|(ttf)|(odex)|(oat)|(art))$)|(dex)|(so))/,children:[{name:'so',file:/\.so/},{name:'jar',file:/\.jar$/},{name:'apk',file:/\.apk$/},{name:'ttf',file:/\.ttf$/},{name:'dex',file:/\.((dex)|(odex$))/},{name:'oat',file:/\.oat$/},{name:'art',file:/\.art$/}]},{name:'Devices',file:/(^\/dev\/)|(anon_inode:dmabuf)/,children:[{name:'GPU',file:/\/((nv)|(mali)|(kgsl))/},{name:'DMA',file:/anon_inode:dmabuf/}]}]};VMRegionClassificationNode.OTHER_RULE={name:'Other'};VMRegionClassificationNode.fromRegions=function(regions,opt_rules){var tree=new VMRegionClassificationNode(opt_rules);tree.regions_=regions;for(var i=0;i<regions.length;i++)
+tree.addStatsFromRegion_(regions[i]);return tree;};VMRegionClassificationNode.prototype={get title(){return this.rule_.name;},get children(){if(this.isLeafNode)
+return undefined;if(this.children_===undefined)
+this.buildTree_();return this.children_;},get regions(){if(!this.isLeafNode){return undefined;}
+return this.regions_;},get allRegionsForTesting(){if(this.regions_!==undefined){if(this.children_!==undefined){throw new Error('Internal error: a VM region classification node '+'cannot have both regions and children');}
+return this.regions_;}
+var regions=[];this.children_.forEach(function(childNode){regions=regions.concat(childNode.allRegionsForTesting);});return regions;},get isLeafNode(){var children=this.rule_.children;return children===undefined||children.length===0;},addRegion:function(region){this.addRegionRecursively_(region,true);},someRegion:function(fn,opt_this){if(this.regions_!==undefined){return this.regions_.some(fn,opt_this);}
+return this.children_.some(function(childNode){return childNode.someRegion(fn,opt_this);});},addRegionRecursively_:function(region,addStatsToThisNode){if(addStatsToThisNode)
+this.addStatsFromRegion_(region);if(this.regions_!==undefined){if(this.children_!==undefined){throw new Error('Internal error: a VM region classification node '+'cannot have both regions and children');}
+this.regions_.push(region);return;}
+function regionRowMatchesChildNide(child){var fileRegExp=child.rule_.file;if(fileRegExp===undefined)
+return true;return fileRegExp.test(region.mappedFile);}
+var matchedChild=tr.b.findFirstInArray(this.children_,regionRowMatchesChildNide);if(matchedChild===undefined){if(this.children_.length!==this.rule_.children.length)
+throw new Error('Internal error');matchedChild=new VMRegionClassificationNode(VMRegionClassificationNode.OTHER_RULE);this.children_.push(matchedChild);}
+matchedChild.addRegionRecursively_(region,true);},buildTree_:function(){var cachedRegions=this.regions_;this.regions_=undefined;this.buildChildNodesRecursively_();for(var i=0;i<cachedRegions.length;i++){this.addRegionRecursively_(cachedRegions[i],false);}},buildChildNodesRecursively_:function(){if(this.children_!==undefined){throw new Error('Internal error: Classification node already has children');}
+if(this.regions_!==undefined&&this.regions_.length!==0){throw new Error('Internal error: Classification node should have no regions');}
+if(this.isLeafNode)
+return;this.regions_=undefined;this.children_=this.rule_.children.map(function(childRule){var child=new VMRegionClassificationNode(childRule);child.buildChildNodesRecursively_();return child;});},addStatsFromRegion_:function(region){this.hasRegions=true;var regionSizeInBytes=region.sizeInBytes;if(regionSizeInBytes!==undefined)
+this.sizeInBytes=(this.sizeInBytes||0)+regionSizeInBytes;var thisByteStats=this.byteStats;var regionByteStats=region.byteStats;for(var byteStatName in regionByteStats){var regionByteStatValue=regionByteStats[byteStatName];if(regionByteStatValue===undefined)
+continue;thisByteStats[byteStatName]=(thisByteStats[byteStatName]||0)+regionByteStatValue;}}};return{VMRegion:VMRegion,VMRegionClassificationNode:VMRegionClassificationNode};});'use strict';tr.exportTo('tr.model',function(){var DISCOUNTED_ALLOCATOR_NAMES=['winheap','malloc'];var TRACING_OVERHEAD_PATH=['allocated_objects','tracing_overhead'];var SIZE_NUMERIC_NAME=tr.model.MemoryAllocatorDump.SIZE_NUMERIC_NAME;var RESIDENT_SIZE_NUMERIC_NAME=tr.model.MemoryAllocatorDump.RESIDENT_SIZE_NUMERIC_NAME;function getSizeNumericValue(dump,sizeNumericName){var sizeNumeric=dump.numerics[sizeNumericName];if(sizeNumeric===undefined)
+return 0;return sizeNumeric.value;}
+function ProcessMemoryDump(globalMemoryDump,process,start){tr.model.ContainerMemoryDump.call(this,start);this.process=process;this.globalMemoryDump=globalMemoryDump;this.totals=undefined;this.vmRegions=undefined;this.heapDumps=undefined;this.tracingOverheadOwnershipSetUp_=false;this.tracingOverheadDiscountedFromVmRegions_=false;};ProcessMemoryDump.prototype={__proto__:tr.model.ContainerMemoryDump.prototype,get userFriendlyName(){return'Process memory dump at '+
+tr.v.Unit.byName.timeStampInMs.format(this.start);},get containerName(){return this.process.userFriendlyName;},get processMemoryDumps(){var dumps={};dumps[this.process.pid]=this;return dumps;},get hasOwnVmRegions(){return this.vmRegions!==undefined;},setUpTracingOverheadOwnership:function(opt_model){if(this.tracingOverheadOwnershipSetUp_)
+return;this.tracingOverheadOwnershipSetUp_=true;var tracingDump=this.getMemoryAllocatorDumpByFullName('tracing');if(tracingDump===undefined||tracingDump.owns!==undefined){return;}
+if(tracingDump.owns!==undefined)
+return;var hasDiscountedFromAllocatorDumps=DISCOUNTED_ALLOCATOR_NAMES.some(function(allocatorName){var allocatorDump=this.getMemoryAllocatorDumpByFullName(allocatorName);if(allocatorDump===undefined)
+return false;var nextPathIndex=0;var currentDump=allocatorDump;var currentFullName=allocatorName;for(;nextPathIndex<TRACING_OVERHEAD_PATH.length;nextPathIndex++){var childFullName=currentFullName+'/'+
+TRACING_OVERHEAD_PATH[nextPathIndex];var childDump=this.getMemoryAllocatorDumpByFullName(childFullName);if(childDump===undefined)
+break;currentDump=childDump;currentFullName=childFullName;}
+for(;nextPathIndex<TRACING_OVERHEAD_PATH.length;nextPathIndex++){var childFullName=currentFullName+'/'+
+TRACING_OVERHEAD_PATH[nextPathIndex];var childDump=new tr.model.MemoryAllocatorDump(currentDump.containerMemoryDump,childFullName);childDump.parent=currentDump;currentDump.children.push(childDump);currentFullName=childFullName;currentDump=childDump;}
+var ownershipLink=new tr.model.MemoryAllocatorDumpLink(tracingDump,currentDump);tracingDump.owns=ownershipLink;currentDump.ownedBy.push(ownershipLink);return true;},this);if(hasDiscountedFromAllocatorDumps)
+this.forceRebuildingMemoryAllocatorDumpByFullNameIndex();},discountTracingOverheadFromVmRegions:function(opt_model){if(this.tracingOverheadDiscountedFromVmRegions_)
+return;this.tracingOverheadDiscountedFromVmRegions_=true;var tracingDump=this.getMemoryAllocatorDumpByFullName('tracing');if(tracingDump===undefined)
+return;var discountedSize=getSizeNumericValue(tracingDump,SIZE_NUMERIC_NAME);var discountedResidentSize=getSizeNumericValue(tracingDump,RESIDENT_SIZE_NUMERIC_NAME);if(discountedSize<=0&&discountedResidentSize<=0)
+return;if(this.totals!==undefined){if(this.totals.residentBytes!==undefined)
+this.totals.residentBytes-=discountedResidentSize;if(this.totals.peakResidentBytes!==undefined)
+this.totals.peakResidentBytes-=discountedResidentSize;}
+if(this.vmRegions!==undefined){var hasSizeInBytes=this.vmRegions.sizeInBytes!==undefined;var hasPrivateDirtyResident=this.vmRegions.byteStats.privateDirtyResident!==undefined;var hasProportionalResident=this.vmRegions.byteStats.proportionalResident!==undefined;if((hasSizeInBytes&&discountedSize>0)||((hasPrivateDirtyResident||hasProportionalResident)&&discountedResidentSize>0)){var byteStats={};if(hasPrivateDirtyResident)
+byteStats.privateDirtyResident=-discountedResidentSize;if(hasProportionalResident)
+byteStats.proportionalResident=-discountedResidentSize;this.vmRegions.addRegion(tr.model.VMRegion.fromDict({mappedFile:'[discounted tracing overhead]',sizeInBytes:hasSizeInBytes?-discountedSize:undefined,byteStats:byteStats}));}}}};ProcessMemoryDump.hookUpMostRecentVmRegionsLinks=function(processDumps){var mostRecentVmRegions=undefined;processDumps.forEach(function(processDump){if(processDump.vmRegions!==undefined)
+mostRecentVmRegions=processDump.vmRegions;processDump.mostRecentVmRegions=mostRecentVmRegions;});};tr.model.EventRegistry.register(ProcessMemoryDump,{name:'processMemoryDump',pluralName:'processMemoryDumps',singleViewElementName:'tr-ui-a-container-memory-dump-sub-view',multiViewElementName:'tr-ui-a-container-memory-dump-sub-view'});return{ProcessMemoryDump:ProcessMemoryDump};});'use strict';tr.exportTo('tr.model',function(){var ProcessBase=tr.model.ProcessBase;var ProcessInstantEvent=tr.model.ProcessInstantEvent;var Frame=tr.model.Frame;var ProcessMemoryDump=tr.model.ProcessMemoryDump;function Process(model,pid){if(model===undefined)
 throw new Error('model must be provided');if(pid===undefined)
 throw new Error('pid must be provided');tr.model.ProcessBase.call(this,model);this.pid=pid;this.name=undefined;this.labels=[];this.instantEvents=[];this.memoryDumps=[];this.frames=[];this.activities=[];};Process.compare=function(x,y){var tmp=tr.model.ProcessBase.compare(x,y);if(tmp)
 return tmp;tmp=tr.b.comparePossiblyUndefinedValues(x.name,y.name,function(x,y){return x.localeCompare(y);});if(tmp)
@@ -3566,7 +4099,7 @@
 return tmp;return x.pid-y.pid;};Process.prototype={__proto__:tr.model.ProcessBase.prototype,get stableId(){return this.pid;},compareTo:function(that){return Process.compare(this,that);},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){ProcessBase.prototype.iterateAllEventsInThisContainer.call(this,eventTypePredicate,callback,opt_this);if(eventTypePredicate.call(opt_this,ProcessInstantEvent))
 this.instantEvents.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,Frame))
 this.frames.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,ProcessMemoryDump))
-this.memoryDumps.forEach(callback,opt_this);},pushInstantEvent:function(instantEvent){this.instantEvents.push(instantEvent);},addLabelIfNeeded:function(labelName){for(var i=0;i<this.labels.length;i++){if(this.labels[i]===labelName)
+this.memoryDumps.forEach(callback,opt_this);},addLabelIfNeeded:function(labelName){for(var i=0;i<this.labels.length;i++){if(this.labels[i]===labelName)
 return;}
 this.labels.push(labelName);},get userFriendlyName(){var res;if(this.name)
 res=this.name+' (pid '+this.pid+')';else
@@ -3574,15 +4107,15 @@
 res+=': '+this.labels.join(', ');return res;},get userFriendlyDetails(){if(this.name)
 return this.name+' (pid '+this.pid+')';return'pid: '+this.pid;},getSettingsKey:function(){if(!this.name)
 return undefined;if(!this.labels.length)
-return'processes.'+this.name;return'processes.'+this.name+'.'+this.labels.join('.');},shiftTimestampsForward:function(amount){for(var id in this.instantEvents)
-this.instantEvents[id].start+=amount;for(var i=0;i<this.frames.length;i++)
+return'processes.'+this.name;return'processes.'+this.name+'.'+this.labels.join('.');},shiftTimestampsForward:function(amount){for(var i=0;i<this.instantEvents.length;i++)
+this.instantEvents[i].start+=amount;for(var i=0;i<this.frames.length;i++)
 this.frames[i].shiftTimestampsForward(amount);for(var i=0;i<this.memoryDumps.length;i++)
 this.memoryDumps[i].shiftTimestampsForward(amount);for(var i=0;i<this.activities.length;i++)
 this.activities[i].shiftTimestampsForward(amount);tr.model.ProcessBase.prototype.shiftTimestampsForward.apply(this,arguments);},updateBounds:function(){tr.model.ProcessBase.prototype.updateBounds.apply(this);for(var i=0;i<this.frames.length;i++)
 this.frames[i].addBoundsToRange(this.bounds);for(var i=0;i<this.memoryDumps.length;i++)
 this.memoryDumps[i].addBoundsToRange(this.bounds);for(var i=0;i<this.activities.length;i++)
 this.activities[i].addBoundsToRange(this.bounds);},sortMemoryDumps:function(){this.memoryDumps.sort(function(x,y){return x.start-y.start;});tr.model.ProcessMemoryDump.hookUpMostRecentVmRegionsLinks(this.memoryDumps);}};return{Process:Process};});'use strict';tr.exportTo('tr.model',function(){function Sample(cpu,thread,title,start,leafStackFrame,opt_weight,opt_args){tr.model.TimedEvent.call(this,start);this.title=title;this.cpu=cpu;this.thread=thread;this.leafStackFrame=leafStackFrame;this.weight=opt_weight;this.args=opt_args||{};}
-Sample.prototype={__proto__:tr.model.TimedEvent.prototype,get colorId(){return this.leafStackFrame.colorId;},get stackTrace(){return this.leafStackFrame.stackTrace;},getUserFriendlyStackTrace:function(){return this.leafStackFrame.getUserFriendlyStackTrace();},get userFriendlyName(){return'Sample at '+tr.b.u.TimeStamp.format(this.start);}};tr.model.EventRegistry.register(Sample,{name:'sample',pluralName:'samples',singleViewElementName:'tr-ui-a-single-sample-sub-view',multiViewElementName:'tr-ui-a-multi-sample-sub-view'});return{Sample:Sample};});'use strict';tr.exportTo('tr.model',function(){function StackFrame(parentFrame,id,title,colorId,opt_sourceInfo){if(id===undefined)
+Sample.prototype={__proto__:tr.model.TimedEvent.prototype,get colorId(){return this.leafStackFrame.colorId;},get stackTrace(){return this.leafStackFrame.stackTrace;},getUserFriendlyStackTrace:function(){return this.leafStackFrame.getUserFriendlyStackTrace();},get userFriendlyName(){return'Sample at '+tr.v.Unit.byName.timeStampInMs.format(this.start);}};tr.model.EventRegistry.register(Sample,{name:'sample',pluralName:'samples',singleViewElementName:'tr-ui-a-single-sample-sub-view',multiViewElementName:'tr-ui-a-multi-sample-sub-view'});return{Sample:Sample};});'use strict';tr.exportTo('tr.model',function(){function StackFrame(parentFrame,id,title,colorId,opt_sourceInfo){if(id===undefined)
 throw new Error('id must be given');this.parentFrame_=parentFrame;this.id=id;this.title_=title;this.colorId=colorId;this.children=[];this.sourceInfo_=opt_sourceInfo;if(this.parentFrame_)
 this.parentFrame_.addChild(this);}
 StackFrame.prototype={get parentFrame(){return this.parentFrame_;},get title(){if(this.sourceInfo_){var src=this.sourceInfo_.toString();return this.title_+(src===''?'':' '+src);}
@@ -3593,7 +4126,9 @@
 this.parentFrame_.addChild(this);},addChild:function(child){this.children.push(child);},removeChild:function(child){var i=this.children.indexOf(child.id);if(i==-1)
 throw new Error('omg');this.children.splice(i,1);},removeAllChildren:function(){for(var i=0;i<this.children.length;i++)
 this.children[i].parentFrame_=undefined;this.children.splice(0,this.children.length);},get stackTrace(){var stack=[];var cur=this;while(cur){stack.push(cur);cur=cur.parentFrame;}
-return stack;},getUserFriendlyStackTrace:function(){return this.stackTrace.map(function(x){return x.title;});}};return{StackFrame:StackFrame};});'use strict';tr.exportTo('tr.ui.b',function(){function decorate(source,constr){var elements;if(typeof source=='string')
+return stack;},getUserFriendlyStackTrace:function(){return this.stackTrace.map(function(x){return x.title;});}};return{StackFrame:StackFrame};});'use strict';tr.exportTo('tr.model.um',function(){function UserModel(parentModel){tr.model.EventContainer.call(this);this.parentModel_=parentModel;this.expectations_=new tr.model.EventSet();}
+UserModel.prototype={__proto__:tr.model.EventContainer.prototype,get stableId(){return'UserModel';},get parentModel(){return this.parentModel_;},sortExpectations:function(){Array.prototype.sort.call(this.expectations_,function(x,y){return x.start-y.start;});},get expectations(){return this.expectations_;},shiftTimestampsForward:function(amount){},addCategoriesToDict:function(categoriesDict){},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,tr.model.um.UserExpectation))
+this.expectations.forEach(callback,opt_this);},iterateAllChildEventContainers:function(callback,opt_this){},updateBounds:function(){this.bounds.reset();this.expectations.forEach(function(expectation){expectation.addBoundsToRange(this.bounds);},this);}};return{UserModel:UserModel};});'use strict';tr.exportTo('tr.ui.b',function(){function decorate(source,constr){var elements;if(typeof source=='string')
 elements=tr.doc.querySelectorAll(source);else
 elements=[source];for(var i=0,el;el=elements[i];i++){if(!(el instanceof constr))
 constr.decorate(el);}}
@@ -3610,19 +4145,7 @@
 function elementIsChildOf(el,potentialParent){if(el==potentialParent)
 return false;var cur=el;while(cur.parentNode){if(cur==potentialParent)
 return true;cur=cur.parentNode;}
-return false;};return{decorate:decorate,define:define,elementIsChildOf:elementIsChildOf};});!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define(n);else{var r=n();for(var a in r)("object"==typeof exports?exports:t)[a]=r[a]}}(this,function(){return function(t){function n(a){if(r[a])return r[a].exports;var e=r[a]={exports:{},id:a,loaded:!1};return t[a].call(e.exports,e,e.exports,n),e.loaded=!0,e.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){n.glMatrix=r(1),n.mat2=r(2),n.mat2d=r(3),n.mat3=r(4),n.mat4=r(5),n.quat=r(6),n.vec2=r(9),n.vec3=r(7),n.vec4=r(8)},function(t,n,r){var a={};a.EPSILON=1e-6,a.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,a.RANDOM=Math.random,a.setMatrixArrayType=function(t){GLMAT_ARRAY_TYPE=t};var e=Math.PI/180;a.toRadian=function(t){return t*e},t.exports=a},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},e.clone=function(t){var n=new a.ARRAY_TYPE(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1];t[1]=n[2],t[2]=r}else t[0]=n[0],t[1]=n[2],t[2]=n[1],t[3]=n[3];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*u-e*a;return o?(o=1/o,t[0]=u*o,t[1]=-a*o,t[2]=-e*o,t[3]=r*o,t):null},e.adjoint=function(t,n){var r=n[0];return t[0]=n[3],t[1]=-n[1],t[2]=-n[2],t[3]=r,t},e.determinant=function(t){return t[0]*t[3]-t[2]*t[1]},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1],f=r[2],s=r[3];return t[0]=a*i+u*c,t[1]=e*i+o*c,t[2]=a*f+u*s,t[3]=e*f+o*s,t},e.mul=e.multiply,e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+u*i,t[1]=e*c+o*i,t[2]=a*-i+u*c,t[3]=e*-i+o*c,t},e.scale=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1];return t[0]=a*i,t[1]=e*i,t[2]=u*c,t[3]=o*c,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=-r,t[3]=a,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t},e.str=function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2))},e.LDU=function(t,n,r,a){return t[2]=a[2]/a[0],r[0]=a[0],r[1]=a[1],r[3]=a[3]-t[2]*r[1],[t,n,r]},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(6);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(6);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=r*u-a*e;return c?(c=1/c,t[0]=u*c,t[1]=-a*c,t[2]=-e*c,t[3]=r*c,t[4]=(e*i-u*o)*c,t[5]=(a*o-r*i)*c,t):null},e.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1],h=r[2],M=r[3],l=r[4],v=r[5];return t[0]=a*f+u*s,t[1]=e*f+o*s,t[2]=a*h+u*M,t[3]=e*h+o*M,t[4]=a*l+u*v+i,t[5]=e*l+o*v+c,t},e.mul=e.multiply,e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=Math.sin(r),s=Math.cos(r);return t[0]=a*s+u*f,t[1]=e*s+o*f,t[2]=a*-f+u*s,t[3]=e*-f+o*s,t[4]=i,t[5]=c,t},e.scale=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1];return t[0]=a*f,t[1]=e*f,t[2]=u*s,t[3]=o*s,t[4]=i,t[5]=c,t},e.translate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1];return t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=a*f+u*s+i,t[5]=e*f+o*s+c,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=-r,t[3]=a,t[4]=0,t[5]=0,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t[4]=0,t[5]=0,t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=n[0],t[5]=n[1],t},e.str=function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+1)},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat4=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t},e.clone=function(t){var n=new a.ARRAY_TYPE(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1],a=n[2],e=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=a,t[7]=e}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=s*o-i*f,M=-s*u+i*c,l=f*u-o*c,v=r*h+a*M+e*l;return v?(v=1/v,t[0]=h*v,t[1]=(-s*a+e*f)*v,t[2]=(i*a-e*o)*v,t[3]=M*v,t[4]=(s*r-e*c)*v,t[5]=(-i*r+e*u)*v,t[6]=l*v,t[7]=(-f*r+a*c)*v,t[8]=(o*r-a*u)*v,t):null},e.adjoint=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8];return t[0]=o*s-i*f,t[1]=e*f-a*s,t[2]=a*i-e*o,t[3]=i*c-u*s,t[4]=r*s-e*c,t[5]=e*u-r*i,t[6]=u*f-o*c,t[7]=a*c-r*f,t[8]=r*o-a*u,t},e.determinant=function(t){var n=t[0],r=t[1],a=t[2],e=t[3],u=t[4],o=t[5],i=t[6],c=t[7],f=t[8];return n*(f*u-o*c)+r*(-f*e+o*i)+a*(c*e-u*i)},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=r[0],l=r[1],v=r[2],m=r[3],p=r[4],d=r[5],A=r[6],R=r[7],w=r[8];return t[0]=M*a+l*o+v*f,t[1]=M*e+l*i+v*s,t[2]=M*u+l*c+v*h,t[3]=m*a+p*o+d*f,t[4]=m*e+p*i+d*s,t[5]=m*u+p*c+d*h,t[6]=A*a+R*o+w*f,t[7]=A*e+R*i+w*s,t[8]=A*u+R*c+w*h,t},e.mul=e.multiply,e.translate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=r[0],l=r[1];return t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=i,t[5]=c,t[6]=M*a+l*o+f,t[7]=M*e+l*i+s,t[8]=M*u+l*c+h,t},e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=Math.sin(r),l=Math.cos(r);return t[0]=l*a+M*o,t[1]=l*e+M*i,t[2]=l*u+M*c,t[3]=l*o-M*a,t[4]=l*i-M*e,t[5]=l*c-M*u,t[6]=f,t[7]=s,t[8]=h,t},e.scale=function(t,n,r){var a=r[0],e=r[1];return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=e*n[3],t[4]=e*n[4],t[5]=e*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=0,t[3]=-r,t[4]=a,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},e.fromQuat=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r+r,i=a+a,c=e+e,f=r*o,s=a*o,h=a*i,M=e*o,l=e*i,v=e*c,m=u*o,p=u*i,d=u*c;return t[0]=1-h-v,t[3]=s-d,t[6]=M+p,t[1]=s+d,t[4]=1-f-v,t[7]=l-m,t[2]=M-p,t[5]=l+m,t[8]=1-f-h,t},e.normalFromMat4=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15],A=r*i-a*o,R=r*c-e*o,w=r*f-u*o,q=a*c-e*i,Y=a*f-u*i,g=e*f-u*c,y=s*m-h*v,x=s*p-M*v,P=s*d-l*v,E=h*p-M*m,T=h*d-l*m,b=M*d-l*p,D=A*b-R*T+w*E+q*P-Y*x+g*y;return D?(D=1/D,t[0]=(i*b-c*T+f*E)*D,t[1]=(c*P-o*b-f*x)*D,t[2]=(o*T-i*P+f*y)*D,t[3]=(e*T-a*b-u*E)*D,t[4]=(r*b-e*P+u*x)*D,t[5]=(a*P-r*T-u*y)*D,t[6]=(m*g-p*Y+d*q)*D,t[7]=(p*w-v*g-d*R)*D,t[8]=(v*Y-m*w+d*A)*D,t):null},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.clone=function(t){var n=new a.ARRAY_TYPE(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1],a=n[2],e=n[3],u=n[6],o=n[7],i=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=r,t[6]=n[9],t[7]=n[13],t[8]=a,t[9]=u,t[11]=n[14],t[12]=e,t[13]=o,t[14]=i}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15],A=r*i-a*o,R=r*c-e*o,w=r*f-u*o,q=a*c-e*i,Y=a*f-u*i,g=e*f-u*c,y=s*m-h*v,x=s*p-M*v,P=s*d-l*v,E=h*p-M*m,T=h*d-l*m,b=M*d-l*p,D=A*b-R*T+w*E+q*P-Y*x+g*y;return D?(D=1/D,t[0]=(i*b-c*T+f*E)*D,t[1]=(e*T-a*b-u*E)*D,t[2]=(m*g-p*Y+d*q)*D,t[3]=(M*Y-h*g-l*q)*D,t[4]=(c*P-o*b-f*x)*D,t[5]=(r*b-e*P+u*x)*D,t[6]=(p*w-v*g-d*R)*D,t[7]=(s*g-M*w+l*R)*D,t[8]=(o*T-i*P+f*y)*D,t[9]=(a*P-r*T-u*y)*D,t[10]=(v*Y-m*w+d*A)*D,t[11]=(h*w-s*Y-l*A)*D,t[12]=(i*x-o*E-c*y)*D,t[13]=(r*E-a*x+e*y)*D,t[14]=(m*R-v*q-p*A)*D,t[15]=(s*q-h*R+M*A)*D,t):null},e.adjoint=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15];return t[0]=i*(M*d-l*p)-h*(c*d-f*p)+m*(c*l-f*M),t[1]=-(a*(M*d-l*p)-h*(e*d-u*p)+m*(e*l-u*M)),t[2]=a*(c*d-f*p)-i*(e*d-u*p)+m*(e*f-u*c),t[3]=-(a*(c*l-f*M)-i*(e*l-u*M)+h*(e*f-u*c)),t[4]=-(o*(M*d-l*p)-s*(c*d-f*p)+v*(c*l-f*M)),t[5]=r*(M*d-l*p)-s*(e*d-u*p)+v*(e*l-u*M),t[6]=-(r*(c*d-f*p)-o*(e*d-u*p)+v*(e*f-u*c)),t[7]=r*(c*l-f*M)-o*(e*l-u*M)+s*(e*f-u*c),t[8]=o*(h*d-l*m)-s*(i*d-f*m)+v*(i*l-f*h),t[9]=-(r*(h*d-l*m)-s*(a*d-u*m)+v*(a*l-u*h)),t[10]=r*(i*d-f*m)-o*(a*d-u*m)+v*(a*f-u*i),t[11]=-(r*(i*l-f*h)-o*(a*l-u*h)+s*(a*f-u*i)),t[12]=-(o*(h*p-M*m)-s*(i*p-c*m)+v*(i*M-c*h)),t[13]=r*(h*p-M*m)-s*(a*p-e*m)+v*(a*M-e*h),t[14]=-(r*(i*p-c*m)-o*(a*p-e*m)+v*(a*c-e*i)),t[15]=r*(i*M-c*h)-o*(a*M-e*h)+s*(a*c-e*i),t},e.determinant=function(t){var n=t[0],r=t[1],a=t[2],e=t[3],u=t[4],o=t[5],i=t[6],c=t[7],f=t[8],s=t[9],h=t[10],M=t[11],l=t[12],v=t[13],m=t[14],p=t[15],d=n*o-r*u,A=n*i-a*u,R=n*c-e*u,w=r*i-a*o,q=r*c-e*o,Y=a*c-e*i,g=f*v-s*l,y=f*m-h*l,x=f*p-M*l,P=s*m-h*v,E=s*p-M*v,T=h*p-M*m;return d*T-A*E+R*P+w*x-q*y+Y*g},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=n[9],l=n[10],v=n[11],m=n[12],p=n[13],d=n[14],A=n[15],R=r[0],w=r[1],q=r[2],Y=r[3];return t[0]=R*a+w*i+q*h+Y*m,t[1]=R*e+w*c+q*M+Y*p,t[2]=R*u+w*f+q*l+Y*d,t[3]=R*o+w*s+q*v+Y*A,R=r[4],w=r[5],q=r[6],Y=r[7],t[4]=R*a+w*i+q*h+Y*m,t[5]=R*e+w*c+q*M+Y*p,t[6]=R*u+w*f+q*l+Y*d,t[7]=R*o+w*s+q*v+Y*A,R=r[8],w=r[9],q=r[10],Y=r[11],t[8]=R*a+w*i+q*h+Y*m,t[9]=R*e+w*c+q*M+Y*p,t[10]=R*u+w*f+q*l+Y*d,t[11]=R*o+w*s+q*v+Y*A,R=r[12],w=r[13],q=r[14],Y=r[15],t[12]=R*a+w*i+q*h+Y*m,t[13]=R*e+w*c+q*M+Y*p,t[14]=R*u+w*f+q*l+Y*d,t[15]=R*o+w*s+q*v+Y*A,t},e.mul=e.multiply,e.translate=function(t,n,r){var a,e,u,o,i,c,f,s,h,M,l,v,m=r[0],p=r[1],d=r[2];return n===t?(t[12]=n[0]*m+n[4]*p+n[8]*d+n[12],t[13]=n[1]*m+n[5]*p+n[9]*d+n[13],t[14]=n[2]*m+n[6]*p+n[10]*d+n[14],t[15]=n[3]*m+n[7]*p+n[11]*d+n[15]):(a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=n[9],l=n[10],v=n[11],t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=i,t[5]=c,t[6]=f,t[7]=s,t[8]=h,t[9]=M,t[10]=l,t[11]=v,t[12]=a*m+i*p+h*d+n[12],t[13]=e*m+c*p+M*d+n[13],t[14]=u*m+f*p+l*d+n[14],t[15]=o*m+s*p+v*d+n[15]),t},e.scale=function(t,n,r){var a=r[0],e=r[1],u=r[2];return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*u,t[9]=n[9]*u,t[10]=n[10]*u,t[11]=n[11]*u,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},e.rotate=function(t,n,r,e){var u,o,i,c,f,s,h,M,l,v,m,p,d,A,R,w,q,Y,g,y,x,P,E,T,b=e[0],D=e[1],L=e[2],_=Math.sqrt(b*b+D*D+L*L);return Math.abs(_)<a.EPSILON?null:(_=1/_,b*=_,D*=_,L*=_,u=Math.sin(r),o=Math.cos(r),i=1-o,c=n[0],f=n[1],s=n[2],h=n[3],M=n[4],l=n[5],v=n[6],m=n[7],p=n[8],d=n[9],A=n[10],R=n[11],w=b*b*i+o,q=D*b*i+L*u,Y=L*b*i-D*u,g=b*D*i-L*u,y=D*D*i+o,x=L*D*i+b*u,P=b*L*i+D*u,E=D*L*i-b*u,T=L*L*i+o,t[0]=c*w+M*q+p*Y,t[1]=f*w+l*q+d*Y,t[2]=s*w+v*q+A*Y,t[3]=h*w+m*q+R*Y,t[4]=c*g+M*y+p*x,t[5]=f*g+l*y+d*x,t[6]=s*g+v*y+A*x,t[7]=h*g+m*y+R*x,t[8]=c*P+M*E+p*T,t[9]=f*P+l*E+d*T,t[10]=s*P+v*E+A*T,t[11]=h*P+m*E+R*T,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)},e.rotateX=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[4],o=n[5],i=n[6],c=n[7],f=n[8],s=n[9],h=n[10],M=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=u*e+f*a,t[5]=o*e+s*a,t[6]=i*e+h*a,t[7]=c*e+M*a,t[8]=f*e-u*a,t[9]=s*e-o*a,t[10]=h*e-i*a,t[11]=M*e-c*a,t},e.rotateY=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[0],o=n[1],i=n[2],c=n[3],f=n[8],s=n[9],h=n[10],M=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=u*e-f*a,t[1]=o*e-s*a,t[2]=i*e-h*a,t[3]=c*e-M*a,t[8]=u*a+f*e,t[9]=o*a+s*e,t[10]=i*a+h*e,t[11]=c*a+M*e,t},e.rotateZ=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[0],o=n[1],i=n[2],c=n[3],f=n[4],s=n[5],h=n[6],M=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=u*e+f*a,t[1]=o*e+s*a,t[2]=i*e+h*a,t[3]=c*e+M*a,t[4]=f*e-u*a,t[5]=s*e-o*a,t[6]=h*e-i*a,t[7]=M*e-c*a,t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromRotation=function(t,n,r){var e,u,o,i=r[0],c=r[1],f=r[2],s=Math.sqrt(i*i+c*c+f*f);return Math.abs(s)<a.EPSILON?null:(s=1/s,i*=s,c*=s,f*=s,e=Math.sin(n),u=Math.cos(n),o=1-u,t[0]=i*i*o+u,t[1]=c*i*o+f*e,t[2]=f*i*o-c*e,t[3]=0,t[4]=i*c*o-f*e,t[5]=c*c*o+u,t[6]=f*c*o+i*e,t[7]=0,t[8]=i*f*o+c*e,t[9]=c*f*o-i*e,t[10]=f*f*o+u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},e.fromXRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromYRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromZRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromRotationTranslation=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=a+a,c=e+e,f=u+u,s=a*i,h=a*c,M=a*f,l=e*c,v=e*f,m=u*f,p=o*i,d=o*c,A=o*f;return t[0]=1-(l+m),t[1]=h+A,t[2]=M-d,t[3]=0,t[4]=h-A,t[5]=1-(s+m),t[6]=v+p,t[7]=0,t[8]=M+d,t[9]=v-p,t[10]=1-(s+l),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},e.fromRotationTranslationScale=function(t,n,r,a){var e=n[0],u=n[1],o=n[2],i=n[3],c=e+e,f=u+u,s=o+o,h=e*c,M=e*f,l=e*s,v=u*f,m=u*s,p=o*s,d=i*c,A=i*f,R=i*s,w=a[0],q=a[1],Y=a[2];return t[0]=(1-(v+p))*w,t[1]=(M+R)*w,t[2]=(l-A)*w,t[3]=0,t[4]=(M-R)*q,t[5]=(1-(h+p))*q,t[6]=(m+d)*q,t[7]=0,t[8]=(l+A)*Y,t[9]=(m-d)*Y,t[10]=(1-(h+v))*Y,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},e.fromRotationTranslationScaleOrigin=function(t,n,r,a,e){var u=n[0],o=n[1],i=n[2],c=n[3],f=u+u,s=o+o,h=i+i,M=u*f,l=u*s,v=u*h,m=o*s,p=o*h,d=i*h,A=c*f,R=c*s,w=c*h,q=a[0],Y=a[1],g=a[2],y=e[0],x=e[1],P=e[2];return t[0]=(1-(m+d))*q,t[1]=(l+w)*q,t[2]=(v-R)*q,t[3]=0,t[4]=(l-w)*Y,t[5]=(1-(M+d))*Y,t[6]=(p+A)*Y,t[7]=0,t[8]=(v+R)*g,t[9]=(p-A)*g,t[10]=(1-(M+m))*g,t[11]=0,t[12]=r[0]+y-(t[0]*y+t[4]*x+t[8]*P),t[13]=r[1]+x-(t[1]*y+t[5]*x+t[9]*P),t[14]=r[2]+P-(t[2]*y+t[6]*x+t[10]*P),t[15]=1,t},e.fromQuat=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r+r,i=a+a,c=e+e,f=r*o,s=a*o,h=a*i,M=e*o,l=e*i,v=e*c,m=u*o,p=u*i,d=u*c;return t[0]=1-h-v,t[1]=s+d,t[2]=M-p,t[3]=0,t[4]=s-d,t[5]=1-f-v,t[6]=l+m,t[7]=0,t[8]=M+p,t[9]=l-m,t[10]=1-f-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.frustum=function(t,n,r,a,e,u,o){var i=1/(r-n),c=1/(e-a),f=1/(u-o);return t[0]=2*u*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*u*c,t[6]=0,t[7]=0,t[8]=(r+n)*i,t[9]=(e+a)*c,t[10]=(o+u)*f,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*u*2*f,t[15]=0,t},e.perspective=function(t,n,r,a,e){var u=1/Math.tan(n/2),o=1/(a-e);return t[0]=u/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(e+a)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*e*a*o,t[15]=0,t},e.perspectiveFromFieldOfView=function(t,n,r,a){var e=Math.tan(n.upDegrees*Math.PI/180),u=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),i=Math.tan(n.rightDegrees*Math.PI/180),c=2/(o+i),f=2/(e+u);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=f,t[6]=0,t[7]=0,t[8]=-((o-i)*c*.5),t[9]=(e-u)*f*.5,t[10]=a/(r-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*r/(r-a),t[15]=0,t},e.ortho=function(t,n,r,a,e,u,o){var i=1/(n-r),c=1/(a-e),f=1/(u-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*f,t[11]=0,t[12]=(n+r)*i,t[13]=(e+a)*c,t[14]=(o+u)*f,t[15]=1,t},e.lookAt=function(t,n,r,u){var o,i,c,f,s,h,M,l,v,m,p=n[0],d=n[1],A=n[2],R=u[0],w=u[1],q=u[2],Y=r[0],g=r[1],y=r[2];return Math.abs(p-Y)<a.EPSILON&&Math.abs(d-g)<a.EPSILON&&Math.abs(A-y)<a.EPSILON?e.identity(t):(M=p-Y,l=d-g,v=A-y,m=1/Math.sqrt(M*M+l*l+v*v),M*=m,l*=m,v*=m,o=w*v-q*l,i=q*M-R*v,c=R*l-w*M,m=Math.sqrt(o*o+i*i+c*c),m?(m=1/m,o*=m,i*=m,c*=m):(o=0,i=0,c=0),f=l*c-v*i,s=v*o-M*c,h=M*i-l*o,m=Math.sqrt(f*f+s*s+h*h),m?(m=1/m,f*=m,s*=m,h*=m):(f=0,s=0,h=0),t[0]=o,t[1]=f,t[2]=M,t[3]=0,t[4]=i,t[5]=s,t[6]=l,t[7]=0,t[8]=c,t[9]=h,t[10]=v,t[11]=0,t[12]=-(o*p+i*d+c*A),t[13]=-(f*p+s*d+h*A),t[14]=-(M*p+l*d+v*A),t[15]=1,t)},e.str=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2)+Math.pow(t[9],2)+Math.pow(t[10],2)+Math.pow(t[11],2)+Math.pow(t[12],2)+Math.pow(t[13],2)+Math.pow(t[14],2)+Math.pow(t[15],2))},t.exports=e},function(t,n,r){var a=r(1),e=r(4),u=r(7),o=r(8),i={};i.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},i.rotationTo=function(){var t=u.create(),n=u.fromValues(1,0,0),r=u.fromValues(0,1,0);return function(a,e,o){var c=u.dot(e,o);return-.999999>c?(u.cross(t,n,e),u.length(t)<1e-6&&u.cross(t,r,e),u.normalize(t,t),i.setAxisAngle(a,t,Math.PI),a):c>.999999?(a[0]=0,a[1]=0,a[2]=0,a[3]=1,a):(u.cross(t,e,o),a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=1+c,i.normalize(a,a))}}(),i.setAxes=function(){var t=e.create();return function(n,r,a,e){return t[0]=a[0],t[3]=a[1],t[6]=a[2],t[1]=e[0],t[4]=e[1],t[7]=e[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],i.normalize(n,i.fromMat3(n,t))}}(),i.clone=o.clone,i.fromValues=o.fromValues,i.copy=o.copy,i.set=o.set,i.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},i.setAxisAngle=function(t,n,r){r=.5*r;var a=Math.sin(r);return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=Math.cos(r),t},i.add=o.add,i.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1],f=r[2],s=r[3];return t[0]=a*s+o*i+e*f-u*c,t[1]=e*s+o*c+u*i-a*f,t[2]=u*s+o*f+a*c-e*i,t[3]=o*s-a*i-e*c-u*f,t},i.mul=i.multiply,i.scale=o.scale,i.rotateX=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+o*i,t[1]=e*c+u*i,t[2]=u*c-e*i,t[3]=o*c-a*i,t},i.rotateY=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c-u*i,t[1]=e*c+o*i,t[2]=u*c+a*i,t[3]=o*c-e*i,t},i.rotateZ=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+e*i,t[1]=e*c-a*i,t[2]=u*c+o*i,t[3]=o*c-u*i,t},i.calculateW=function(t,n){var r=n[0],a=n[1],e=n[2];return t[0]=r,t[1]=a,t[2]=e,t[3]=Math.sqrt(Math.abs(1-r*r-a*a-e*e)),t},i.dot=o.dot,i.lerp=o.lerp,i.slerp=function(t,n,r,a){var e,u,o,i,c,f=n[0],s=n[1],h=n[2],M=n[3],l=r[0],v=r[1],m=r[2],p=r[3];return u=f*l+s*v+h*m+M*p,0>u&&(u=-u,l=-l,v=-v,m=-m,p=-p),1-u>1e-6?(e=Math.acos(u),o=Math.sin(e),i=Math.sin((1-a)*e)/o,c=Math.sin(a*e)/o):(i=1-a,c=a),t[0]=i*f+c*l,t[1]=i*s+c*v,t[2]=i*h+c*m,t[3]=i*M+c*p,t},i.sqlerp=function(){var t=i.create(),n=i.create();return function(r,a,e,u,o,c){return i.slerp(t,a,o,c),i.slerp(n,e,u,c),i.slerp(r,t,n,2*c*(1-c)),r}}(),i.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*r+a*a+e*e+u*u,i=o?1/o:0;return t[0]=-r*i,t[1]=-a*i,t[2]=-e*i,t[3]=u*i,t},i.conjugate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},i.length=o.length,i.len=i.length,i.squaredLength=o.squaredLength,i.sqrLen=i.squaredLength,i.normalize=o.normalize,i.fromMat3=function(t,n){var r,a=n[0]+n[4]+n[8];if(a>0)r=Math.sqrt(a+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{var e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);var u=(e+1)%3,o=(e+2)%3;r=Math.sqrt(n[3*e+e]-n[3*u+u]-n[3*o+o]+1),t[e]=.5*r,r=.5/r,t[3]=(n[3*u+o]-n[3*o+u])*r,t[u]=(n[3*u+e]+n[3*e+u])*r,t[o]=(n[3*o+e]+n[3*e+o])*r}return t},i.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},t.exports=i},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n},e.fromValues=function(t,n,r){var e=new a.ARRAY_TYPE(3);return e[0]=t,e[1]=n,e[2]=r,e},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},e.set=function(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2];return Math.sqrt(r*r+a*a+e*e)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2];return r*r+a*a+e*e},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1],a=t[2];return Math.sqrt(n*n+r*r+a*a)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=n[2],u=r*r+a*a+e*e;return u>0&&(u=1/Math.sqrt(u),t[0]=n[0]*u,t[1]=n[1]*u,t[2]=n[2]*u),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]},e.cross=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2];return t[0]=e*c-u*i,t[1]=u*o-a*c,t[2]=a*i-e*o,t},e.lerp=function(t,n,r,a){var e=n[0],u=n[1],o=n[2];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t[2]=o+a*(r[2]-o),t},e.hermite=function(t,n,r,a,e,u){var o=u*u,i=o*(2*u-3)+1,c=o*(u-2)+u,f=o*(u-1),s=o*(3-2*u);return t[0]=n[0]*i+r[0]*c+a[0]*f+e[0]*s,t[1]=n[1]*i+r[1]*c+a[1]*f+e[1]*s,t[2]=n[2]*i+r[2]*c+a[2]*f+e[2]*s,t},e.bezier=function(t,n,r,a,e,u){var o=1-u,i=o*o,c=u*u,f=i*o,s=3*u*i,h=3*c*o,M=c*u;return t[0]=n[0]*f+r[0]*s+a[0]*h+e[0]*M,t[1]=n[1]*f+r[1]*s+a[1]*h+e[1]*M,t[2]=n[2]*f+r[2]*s+a[2]*h+e[2]*M,t},e.random=function(t,n){n=n||1;var r=2*a.RANDOM()*Math.PI,e=2*a.RANDOM()-1,u=Math.sqrt(1-e*e)*n;return t[0]=Math.cos(r)*u,t[1]=Math.sin(r)*u,t[2]=e*n,t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[3]*a+r[7]*e+r[11]*u+r[15];return o=o||1,t[0]=(r[0]*a+r[4]*e+r[8]*u+r[12])/o,t[1]=(r[1]*a+r[5]*e+r[9]*u+r[13])/o,t[2]=(r[2]*a+r[6]*e+r[10]*u+r[14])/o,t},e.transformMat3=function(t,n,r){var a=n[0],e=n[1],u=n[2];return t[0]=a*r[0]+e*r[3]+u*r[6],t[1]=a*r[1]+e*r[4]+u*r[7],t[2]=a*r[2]+e*r[5]+u*r[8],t},e.transformQuat=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2],f=r[3],s=f*a+i*u-c*e,h=f*e+c*a-o*u,M=f*u+o*e-i*a,l=-o*a-i*e-c*u;return t[0]=s*f+l*-o+h*-c-M*-i,t[1]=h*f+l*-i+M*-o-s*-c,t[2]=M*f+l*-c+s*-i-h*-o,t},e.rotateX=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[0],u[1]=e[1]*Math.cos(a)-e[2]*Math.sin(a),u[2]=e[1]*Math.sin(a)+e[2]*Math.cos(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.rotateY=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[2]*Math.sin(a)+e[0]*Math.cos(a),u[1]=e[1],u[2]=e[2]*Math.cos(a)-e[0]*Math.sin(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.rotateZ=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[0]*Math.cos(a)-e[1]*Math.sin(a),u[1]=e[0]*Math.sin(a)+e[1]*Math.cos(a),u[2]=e[2],t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=3),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],t[2]=n[i+2],u(t,t,o),n[i]=t[0],n[i+1]=t[1],n[i+2]=t[2];return n}}(),e.angle=function(t,n){var r=e.fromValues(t[0],t[1],t[2]),a=e.fromValues(n[0],n[1],n[2]);e.normalize(r,r),e.normalize(a,a);var u=e.dot(r,a);return u>1?0:Math.acos(u)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},e.fromValues=function(t,n,r,e){var u=new a.ARRAY_TYPE(4);return u[0]=t,u[1]=n,u[2]=r,u[3]=e,u},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},e.set=function(t,n,r,a,e){return t[0]=n,t[1]=r,t[2]=a,t[3]=e,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2],u=n[3]-t[3];return Math.sqrt(r*r+a*a+e*e+u*u)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2],u=n[3]-t[3];return r*r+a*a+e*e+u*u},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1],a=t[2],e=t[3];return Math.sqrt(n*n+r*r+a*a+e*e)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1],a=t[2],e=t[3];return n*n+r*r+a*a+e*e},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*r+a*a+e*e+u*u;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=a*o,t[2]=e*o,t[3]=u*o),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},e.lerp=function(t,n,r,a){var e=n[0],u=n[1],o=n[2],i=n[3];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t[2]=o+a*(r[2]-o),t[3]=i+a*(r[3]-i),t},e.random=function(t,n){return n=n||1,t[0]=a.RANDOM(),t[1]=a.RANDOM(),t[2]=a.RANDOM(),t[3]=a.RANDOM(),e.normalize(t,t),e.scale(t,t,n),t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3];return t[0]=r[0]*a+r[4]*e+r[8]*u+r[12]*o,t[1]=r[1]*a+r[5]*e+r[9]*u+r[13]*o,t[2]=r[2]*a+r[6]*e+r[10]*u+r[14]*o,t[3]=r[3]*a+r[7]*e+r[11]*u+r[15]*o,t},e.transformQuat=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2],f=r[3],s=f*a+i*u-c*e,h=f*e+c*a-o*u,M=f*u+o*e-i*a,l=-o*a-i*e-c*u;return t[0]=s*f+l*-o+h*-c-M*-i,t[1]=h*f+l*-i+M*-o-s*-c,t[2]=M*f+l*-c+s*-i-h*-o,t[3]=n[3],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=4),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],t[2]=n[i+2],t[3]=n[i+3],u(t,t,o),n[i]=t[0],n[i+1]=t[1],n[i+2]=t[2],n[i+3]=t[3];return n}}(),e.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(2);return n[0]=t[0],n[1]=t[1],n},e.fromValues=function(t,n){var r=new a.ARRAY_TYPE(2);return r[0]=t,r[1]=n,r},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t},e.set=function(t,n,r){return t[0]=n,t[1]=r,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1];return Math.sqrt(r*r+a*a)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1];return r*r+a*a},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1];return Math.sqrt(n*n+r*r)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1];return n*n+r*r},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=r*r+a*a;return e>0&&(e=1/Math.sqrt(e),t[0]=n[0]*e,t[1]=n[1]*e),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},e.cross=function(t,n,r){var a=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=a,t},e.lerp=function(t,n,r,a){var e=n[0],u=n[1];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t},e.random=function(t,n){n=n||1;var r=2*a.RANDOM()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},e.transformMat2=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[2]*e,t[1]=r[1]*a+r[3]*e,t},e.transformMat2d=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[2]*e+r[4],t[1]=r[1]*a+r[3]*e+r[5],t},e.transformMat3=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[3]*e+r[6],t[1]=r[1]*a+r[4]*e+r[7],t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[4]*e+r[12],t[1]=r[1]*a+r[5]*e+r[13],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=2),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],u(t,t,o),n[i]=t[0],n[i+1]=t[1];return n}}(),e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},t.exports=e}])});'use strict';tr.exportTo('tr.b',function(){function clamp(x,lo,hi){return Math.min(Math.max(x,lo),hi);}
-function lerp(percentage,lo,hi){var range=hi-lo;return lo+percentage*range;}
-function normalize(value,lo,hi){return(value-lo)/(hi-lo);}
-function deg2rad(deg){return(Math.PI*deg)/180.0;}
-var tmp_vec2=vec2.create();var tmp_vec2b=vec2.create();var tmp_vec4=vec4.create();var tmp_mat2d=mat2d.create();vec2.createFromArray=function(arr){if(arr.length!=2)
-throw new Error('Should be length 2');var v=vec2.create();vec2.set(v,arr[0],arr[1]);return v;};vec2.createXY=function(x,y){var v=vec2.create();vec2.set(v,x,y);return v;};vec2.toString=function(a){return'['+a[0]+', '+a[1]+']';};vec2.addTwoScaledUnitVectors=function(out,u1,scale1,u2,scale2){vec2.scale(tmp_vec2,u1,scale1);vec2.scale(tmp_vec2b,u2,scale2);vec2.add(out,tmp_vec2,tmp_vec2b);};vec2.interpolatePiecewiseFunction=function(points,x){if(x<points[0][0])
-return points[0][1];for(var i=1;i<points.length;++i){if(x<points[i][0]){var percent=normalize(x,points[i-1][0],points[i][0]);return lerp(percent,points[i-1][1],points[i][1]);}}
-return points[points.length-1][1];};vec3.createXYZ=function(x,y,z){var v=vec3.create();vec3.set(v,x,y,z);return v;};vec3.toString=function(a){return'vec3('+a[0]+', '+a[1]+', '+a[2]+')';}
-mat2d.translateXY=function(out,x,y){vec2.set(tmp_vec2,x,y);mat2d.translate(out,out,tmp_vec2);}
-mat2d.scaleXY=function(out,x,y){vec2.set(tmp_vec2,x,y);mat2d.scale(out,out,tmp_vec2);}
-vec4.unitize=function(out,a){out[0]=a[0]/a[3];out[1]=a[1]/a[3];out[2]=a[2]/a[3];out[3]=1;return out;}
-vec2.copyFromVec4=function(out,a){vec4.unitize(tmp_vec4,a);vec2.copy(out,tmp_vec4);}
-return{clamp:clamp,lerp:lerp,normalize:normalize,deg2rad:deg2rad};});'use strict';tr.exportTo('tr.b',function(){function Rect(){this.x=0;this.y=0;this.width=0;this.height=0;};Rect.fromXYWH=function(x,y,w,h){var rect=new Rect();rect.x=x;rect.y=y;rect.width=w;rect.height=h;return rect;}
+return false;};return{decorate:decorate,define:define,elementIsChildOf:elementIsChildOf};});'use strict';tr.exportTo('tr.b',function(){function Rect(){this.x=0;this.y=0;this.width=0;this.height=0;};Rect.fromXYWH=function(x,y,w,h){var rect=new Rect();rect.x=x;rect.y=y;rect.width=w;rect.height=h;return rect;}
 Rect.fromArray=function(ary){if(ary.length!=4)
 throw new Error('ary.length must be 4');var rect=new Rect();rect.x=ary[0];rect.y=ary[1];rect.width=ary[2];rect.height=ary[3];return rect;}
 Rect.prototype={__proto__:Object.prototype,get left(){return this.x;},get top(){return this.y;},get right(){return this.x+this.width;},get bottom(){return this.y+this.height;},toString:function(){return'Rect('+this.x+', '+this.y+', '+
@@ -3631,14 +4154,16 @@
 function windowRectForElement(element){var position=[element.offsetLeft,element.offsetTop];var size=[element.offsetWidth,element.offsetHeight];var node=element.offsetParent;while(node){position[0]+=node.offsetLeft;position[1]+=node.offsetTop;node=node.offsetParent;}
 return tr.b.Rect.fromXYWH(position[0],position[1],size[0],size[1]);}
 function scrollIntoViewIfNeeded(el){var pr=el.parentElement.getBoundingClientRect();var cr=el.getBoundingClientRect();if(cr.top<pr.top){el.scrollIntoView(true);}else if(cr.bottom>pr.bottom){el.scrollIntoView(false);}}
-return{instantiateTemplate:instantiateTemplate,windowRectForElement:windowRectForElement,scrollIntoViewIfNeeded:scrollIntoViewIfNeeded};});'use strict';tr.exportTo('tr.ui.b',function(){if(tr.isHeadless)
+function extractUrlString(url){var extracted=url.replace(/url\((.*)\)/,'$1');extracted=extracted.replace(/\"(.*)\"/,'$1');return extracted;}
+function toThreeDigitLocaleString(value){return value.toLocaleString(undefined,{minimumFractionDigits:3,maximumFractionDigits:3});}
+return{toThreeDigitLocaleString:toThreeDigitLocaleString,instantiateTemplate:instantiateTemplate,windowRectForElement:windowRectForElement,scrollIntoViewIfNeeded:scrollIntoViewIfNeeded,extractUrlString:extractUrlString};});'use strict';tr.exportTo('tr.ui.b',function(){if(tr.isHeadless)
 return{};var THIS_DOC=document.currentScript.ownerDocument;var Overlay=tr.ui.b.define('overlay');Overlay.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.classList.add('overlay');this.parentEl_=this.ownerDocument.body;this.visible_=false;this.userCanClose_=true;this.onKeyDown_=this.onKeyDown_.bind(this);this.onClick_=this.onClick_.bind(this);this.onFocusIn_=this.onFocusIn_.bind(this);this.onDocumentClick_=this.onDocumentClick_.bind(this);this.onClose_=this.onClose_.bind(this);this.addEventListener('visible-change',tr.ui.b.Overlay.prototype.onVisibleChange_.bind(this),true);var createShadowRoot=this.createShadowRoot||this.webkitCreateShadowRoot;this.shadow_=createShadowRoot.call(this);this.shadow_.appendChild(tr.ui.b.instantiateTemplate('#overlay-template',THIS_DOC));this.closeBtn_=this.shadow_.querySelector('close-button');this.closeBtn_.addEventListener('click',this.onClose_);this.shadow_.querySelector('overlay-frame').addEventListener('click',this.onClick_);this.observer_=new WebKitMutationObserver(this.didButtonBarMutate_.bind(this));this.observer_.observe(this.shadow_.querySelector('button-bar'),{childList:true});Object.defineProperty(this,'title',{get:function(){return this.shadow_.querySelector('title').textContent;},set:function(title){this.shadow_.querySelector('title').textContent=title;}});},set userCanClose(userCanClose){this.userCanClose_=userCanClose;this.closeBtn_.style.display=userCanClose?'block':'none';},get buttons(){return this.shadow_.querySelector('button-bar');},get visible(){return this.visible_;},set visible(newValue){if(this.visible_===newValue)
 return;this.visible_=newValue;var e=new tr.b.Event('visible-change');this.dispatchEvent(e);},onVisibleChange_:function(){this.visible_?this.show_():this.hide_();},show_:function(){this.parentEl_.appendChild(this);if(this.userCanClose_){this.addEventListener('keydown',this.onKeyDown_.bind(this));this.addEventListener('click',this.onDocumentClick_.bind(this));}
 this.parentEl_.addEventListener('focusin',this.onFocusIn_);this.tabIndex=0;var focusEl=undefined;var elList=this.querySelectorAll('button, input, list, select, a');if(elList.length>0){if(elList[0]===this.closeBtn_){if(elList.length>1)
 focusEl=elList[1];}else{focusEl=elList[0];}}
 if(focusEl===undefined)
 focusEl=this;focusEl.focus();},hide_:function(){this.parentEl_.removeChild(this);this.parentEl_.removeEventListener('focusin',this.onFocusIn_);if(this.closeBtn_)
-this.closeBtn_.removeEventListener(this.onClose_);document.removeEventListener('keydown',this.onKeyDown_);document.removeEventListener('click',this.onDocumentClick_);},onClose_:function(e){this.visible=false;if((e.type!='keydown')||(e.type==='keydown'&&e.keyCode===27))
+this.closeBtn_.removeEventListener('click',this.onClose_);document.removeEventListener('keydown',this.onKeyDown_);document.removeEventListener('click',this.onDocumentClick_);},onClose_:function(e){this.visible=false;if((e.type!='keydown')||(e.type==='keydown'&&e.keyCode===27))
 e.stopPropagation();e.preventDefault();tr.b.dispatchSimpleEvent(this,'closeclick');},onFocusIn_:function(e){if(e.target===this)
 return;window.setTimeout(function(){this.focus();},0);e.preventDefault();e.stopPropagation();},didButtonBarMutate_:function(e){var hasButtons=this.buttons.children.length>0;if(hasButtons)
 this.shadow_.querySelector('button-bar').style.display=undefined;else
@@ -3647,22 +4172,24 @@
 return;this.onClose_(e);},onClick_:function(e){e.stopPropagation();},onDocumentClick_:function(e){if(!this.userCanClose_)
 return;this.onClose_(e);}};Overlay.showError=function(msg,opt_err){var o=new Overlay();o.title='Error';o.textContent=msg;if(opt_err){var e=tr.b.normalizeException(opt_err);var stackDiv=document.createElement('pre');stackDiv.textContent=e.stack;stackDiv.style.paddingLeft='8px';stackDiv.style.margin=0;o.appendChild(stackDiv);}
 var b=document.createElement('button');b.textContent='OK';b.addEventListener('click',function(){o.visible=false;});o.buttons.appendChild(b);o.visible=true;return o;}
-return{Overlay:Overlay};});'use strict';tr.exportTo('tr',function(){var Process=tr.model.Process;var Device=tr.model.Device;var Kernel=tr.model.Kernel;var GlobalMemoryDump=tr.model.GlobalMemoryDump;var GlobalInstantEvent=tr.model.GlobalInstantEvent;var FlowEvent=tr.model.FlowEvent;var Alert=tr.model.Alert;var InteractionRecord=tr.model.InteractionRecord;var Sample=tr.model.Sample;function ClockSyncRecord(name,ts,args){this.name=name;this.ts=ts;this.args=args;}
-function Model(){tr.model.EventContainer.call(this);tr.b.EventTarget.decorate(this);this.timestampShiftToZeroAmount_=0;this.faviconHue='blue';this.device=new Device(this);this.kernel=new Kernel(this);this.processes={};this.metadata=[];this.categories=[];this.instantEvents=[];this.flowEvents=[];this.clockSyncRecords=[];this.intrinsicTimeUnit_=undefined;this.stackFrames={};this.samples=[];this.alerts=[];this.interactionRecords=[];this.flowIntervalTree=new tr.b.IntervalTree(function(f){return f.start;},function(f){return f.end;});this.globalMemoryDumps=[];this.annotationsByGuid_={};this.modelIndices=undefined;this.importWarnings_=[];this.reportedImportWarnings_={};}
-Model.prototype={__proto__:tr.model.EventContainer.prototype,iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,GlobalMemoryDump))
+return{Overlay:Overlay};});'use strict';tr.exportTo('tr',function(){var Process=tr.model.Process;var Device=tr.model.Device;var Kernel=tr.model.Kernel;var GlobalMemoryDump=tr.model.GlobalMemoryDump;var GlobalInstantEvent=tr.model.GlobalInstantEvent;var FlowEvent=tr.model.FlowEvent;var Alert=tr.model.Alert;var Sample=tr.model.Sample;function Model(){tr.model.EventContainer.call(this);tr.b.EventTarget.decorate(this);this.timestampShiftToZeroAmount_=0;this.faviconHue='blue';this.device=new Device(this);this.kernel=new Kernel(this);this.processes={};this.metadata=[];this.categories=[];this.instantEvents=[];this.flowEvents=[];this.clockSyncManager=new tr.model.ClockSyncManager();this.clockSyncRecords=[];this.intrinsicTimeUnit_=undefined;this.stackFrames={};this.samples=[];this.alerts=[];this.userModel=new tr.model.um.UserModel(this);this.flowIntervalTree=new tr.b.IntervalTree((f)=>f.start,(f)=>f.end);this.globalMemoryDumps=[];this.userFriendlyCategoryDrivers_=[];this.annotationsByGuid_={};this.modelIndices=undefined;this.stats=new tr.model.ModelStats();this.importWarnings_=[];this.reportedImportWarnings_={};this.isTimeHighResolution_=undefined;this.patchupsToApply_=[];this.doesHelperGUIDSupportThisModel_={};this.helpersByConstructorGUID_={};}
+Model.prototype={__proto__:tr.model.EventContainer.prototype,getOrCreateHelper:function(constructor){if(!constructor.guid)
+throw new Error('Helper constructors must have GUIDs');if(this.helpersByConstructorGUID_[constructor.guid]===undefined){if(this.doesHelperGUIDSupportThisModel_[constructor.guid]===undefined){this.doesHelperGUIDSupportThisModel_[constructor.guid]=constructor.supportsModel(this);}
+if(!this.doesHelperGUIDSupportThisModel_[constructor.guid])
+return undefined;this.helpersByConstructorGUID_[constructor.guid]=new constructor(this);}
+return this.helpersByConstructorGUID_[constructor.guid];},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,GlobalMemoryDump))
 this.globalMemoryDumps.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,GlobalInstantEvent))
 this.instantEvents.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,FlowEvent))
 this.flowEvents.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,Alert))
-this.alerts.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,InteractionRecord))
-this.interactionRecords.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,Sample))
-this.samples.forEach(callback,opt_this);},iterateAllChildEventContainers:function(callback,opt_this){callback.call(opt_this,this.device);callback.call(opt_this,this.kernel);for(var pid in this.processes)
+this.alerts.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,Sample))
+this.samples.forEach(callback,opt_this);},iterateAllChildEventContainers:function(callback,opt_this){callback.call(opt_this,this.userModel);callback.call(opt_this,this.device);callback.call(opt_this,this.kernel);for(var pid in this.processes)
 callback.call(opt_this,this.processes[pid]);},iterateAllPersistableObjects:function(callback){this.kernel.iterateAllPersistableObjects(callback);for(var pid in this.processes)
 this.processes[pid].iterateAllPersistableObjects(callback);},updateBounds:function(){this.bounds.reset();var bounds=this.bounds;this.iterateAllChildEventContainers(function(ec){ec.updateBounds();bounds.addRange(ec.bounds);});this.iterateAllEventsInThisContainer(function(eventConstructor){return true;},function(event){event.addBoundsToRange(bounds);});},shiftWorldToZero:function(){var shiftAmount=-this.bounds.min;this.timestampShiftToZeroAmount_=shiftAmount;this.iterateAllChildEventContainers(function(ec){ec.shiftTimestampsForward(shiftAmount);});this.iterateAllEventsInThisContainer(function(eventConstructor){return true;},function(event){event.start+=shiftAmount;});this.updateBounds();},convertTimestampToModelTime:function(sourceClockDomainName,ts){if(sourceClockDomainName!=='traceEventClock')
-throw new Error('Only traceEventClock is supported.');return tr.b.u.Units.timestampFromUs(ts)+
+throw new Error('Only traceEventClock is supported.');return tr.v.Unit.timestampFromUs(ts)+
 this.timestampShiftToZeroAmount_;},get numProcesses(){var n=0;for(var p in this.processes)
 n++;return n;},getProcess:function(pid){return this.processes[pid];},getOrCreateProcess:function(pid){if(!this.processes[pid])
-this.processes[pid]=new Process(this,pid);return this.processes[pid];},pushInstantEvent:function(instantEvent){this.instantEvents.push(instantEvent);},addStackFrame:function(stackFrame){if(this.stackFrames[stackFrame.id])
-throw new Error('Stack frame already exists');this.stackFrames[stackFrame.id]=stackFrame;return stackFrame;},addInteractionRecord:function(ir){this.interactionRecords.push(ir);return ir;},getClockSyncRecordsNamed:function(name){return this.clockSyncRecords.filter(function(x){return x.name===name;});},updateCategories_:function(){var categoriesDict={};this.device.addCategoriesToDict(categoriesDict);this.kernel.addCategoriesToDict(categoriesDict);for(var pid in this.processes)
+this.processes[pid]=new Process(this,pid);return this.processes[pid];},addStackFrame:function(stackFrame){if(this.stackFrames[stackFrame.id])
+throw new Error('Stack frame already exists');this.stackFrames[stackFrame.id]=stackFrame;return stackFrame;},getClockSyncRecordsWithSyncId:function(syncId){return this.clockSyncRecords.filter(function(x){return x.syncId===syncId;});},updateCategories_:function(){var categoriesDict={};this.userModel.addCategoriesToDict(categoriesDict);this.device.addCategoriesToDict(categoriesDict);this.kernel.addCategoriesToDict(categoriesDict);for(var pid in this.processes)
 this.processes[pid].addCategoriesToDict(categoriesDict);this.categories=[];for(var category in categoriesDict)
 if(category!='')
 this.categories.push(category);},getAllThreads:function(){var threads=[];for(var tid in this.kernel.threads){threads.push(process.threads[tid]);}
@@ -3670,14 +4197,21 @@
 return threads;},getAllProcesses:function(){var processes=[];for(var pid in this.processes)
 processes.push(this.processes[pid]);return processes;},getAllCounters:function(){var counters=[];counters.push.apply(counters,tr.b.dictionaryValues(this.device.counters));counters.push.apply(counters,tr.b.dictionaryValues(this.kernel.counters));for(var pid in this.processes){var process=this.processes[pid];for(var tid in process.counters){counters.push(process.counters[tid]);}}
 return counters;},getAnnotationByGUID:function(guid){return this.annotationsByGuid_[guid];},addAnnotation:function(annotation){if(!annotation.guid)
-throw new Error('Annotation with undefined guid given');this.annotationsByGuid_[annotation.guid]=annotation;tr.b.dispatchSimpleEvent(this,'annotationChange');},removeAnnotation:function(annotation){this.annotationsByGuid_[annotation.guid].onRemove();delete this.annotationsByGuid_[annotation.guid];tr.b.dispatchSimpleEvent(this,'annotationChange');},getAllAnnotations:function(){return tr.b.dictionaryValues(this.annotationsByGuid_);},findAllThreadsNamed:function(name){var namedThreads=[];namedThreads.push.apply(namedThreads,this.kernel.findAllThreadsNamed(name));for(var pid in this.processes){namedThreads.push.apply(namedThreads,this.processes[pid].findAllThreadsNamed(name));}
-return namedThreads;},set importOptions(options){this.importOptions_=options;},get intrinsicTimeUnit(){if(this.intrinsicTimeUnit_===undefined)
-return tr.b.u.TimeDisplayModes.ms;return this.intrinsicTimeUnit_;},set intrinsicTimeUnit(value){if(this.intrinsicTimeUnit_===value)
+throw new Error('Annotation with undefined guid given');this.annotationsByGuid_[annotation.guid]=annotation;tr.b.dispatchSimpleEvent(this,'annotationChange');},removeAnnotation:function(annotation){this.annotationsByGuid_[annotation.guid].onRemove();delete this.annotationsByGuid_[annotation.guid];tr.b.dispatchSimpleEvent(this,'annotationChange');},getAllAnnotations:function(){return tr.b.dictionaryValues(this.annotationsByGuid_);},addUserFriendlyCategoryDriver:function(ufcd){this.userFriendlyCategoryDrivers_.push(ufcd);},getUserFriendlyCategoryFromEvent:function(event){for(var i=0;i<this.userFriendlyCategoryDrivers_.length;i++){var ufc=this.userFriendlyCategoryDrivers_[i].fromEvent(event);if(ufc!==undefined)
+return ufc;}
+return undefined;},findAllThreadsNamed:function(name){var namedThreads=[];namedThreads.push.apply(namedThreads,this.kernel.findAllThreadsNamed(name));for(var pid in this.processes){namedThreads.push.apply(namedThreads,this.processes[pid].findAllThreadsNamed(name));}
+return namedThreads;},get importOptions(){return this.importOptions_;},set importOptions(options){this.importOptions_=options;},get intrinsicTimeUnit(){if(this.intrinsicTimeUnit_===undefined)
+return tr.v.TimeDisplayModes.ms;return this.intrinsicTimeUnit_;},set intrinsicTimeUnit(value){if(this.intrinsicTimeUnit_===value)
 return;if(this.intrinsicTimeUnit_!==undefined)
-throw new Error('Intrinsic time unit already set');this.intrinsicTimeUnit_=value;},importWarning:function(data){data.showToUser=!!data.showToUser;this.importWarnings_.push(data);if(this.reportedImportWarnings_[data.type]===true)
+throw new Error('Intrinsic time unit already set');this.intrinsicTimeUnit_=value;},get isTimeHighResolution(){if(this.isTimeHighResolution_===undefined)
+this.isTimeHighResolution_=this.isTimeHighResolutionHeuristic_();return this.isTimeHighResolution_;},set isTimeHighResolution(value){if(this.isTimeHighResolution_===value)
+return;if(this.isTimeHighResolution_!==undefined)
+throw new Error('isTimeHighResolution already set');this.isTimeHighResolution_=value;},get canonicalUrl(){return this.canonicalUrl_;},set canonicalUrl(value){if(this.canonicalUrl_===value)
+return;if(this.canonicalUrl_!==undefined)
+throw new Error('canonicalUrl already set');this.canonicalUrl_=value;},importWarning:function(data){data.showToUser=!!data.showToUser;this.importWarnings_.push(data);if(this.reportedImportWarnings_[data.type]===true)
 return;if(this.importOptions_.showImportWarnings)
-console.warn(data.message);this.reportedImportWarnings_[data.type]=true;},get hasImportWarnings(){return(this.importWarnings_.length>0);},get importWarnings(){return this.importWarnings_;},get importWarningsThatShouldBeShownToUser(){return this.importWarnings_.filter(function(warning){return warning.showToUser;});},autoCloseOpenSlices:function(){this.samples.sort(function(x,y){return x.start-y.start;});this.updateBounds();this.kernel.autoCloseOpenSlices(this.bounds.max);for(var pid in this.processes)
-this.processes[pid].autoCloseOpenSlices(this.bounds.max);},createSubSlices:function(){this.kernel.createSubSlices();for(var pid in this.processes)
+console.warn(data.message);this.reportedImportWarnings_[data.type]=true;},get hasImportWarnings(){return(this.importWarnings_.length>0);},get importWarnings(){return this.importWarnings_;},get importWarningsThatShouldBeShownToUser(){return this.importWarnings_.filter(function(warning){return warning.showToUser;});},autoCloseOpenSlices:function(){this.samples.sort(function(x,y){return x.start-y.start;});this.updateBounds();this.kernel.autoCloseOpenSlices();for(var pid in this.processes)
+this.processes[pid].autoCloseOpenSlices();},createSubSlices:function(){this.kernel.createSubSlices();for(var pid in this.processes)
 this.processes[pid].createSubSlices();},preInitializeObjects:function(){for(var pid in this.processes)
 this.processes[pid].preInitializeObjects();},initializeObjects:function(){for(var pid in this.processes)
 this.processes[pid].initializeObjects();},pruneEmptyContainers:function(){this.kernel.pruneEmptyContainers();for(var pid in this.processes)
@@ -3686,31 +4220,502 @@
 this.shiftWorldToZero();},buildFlowEventIntervalTree:function(){for(var i=0;i<this.flowEvents.length;++i){var flowEvent=this.flowEvents[i];this.flowIntervalTree.insert(flowEvent);}
 this.flowIntervalTree.updateHighValues();},cleanupUndeletedObjects:function(){for(var pid in this.processes)
 this.processes[pid].autoDeleteObjects(this.bounds.max);},sortMemoryDumps:function(){this.globalMemoryDumps.sort(function(x,y){return x.start-y.start;});for(var pid in this.processes)
-this.processes[pid].sortMemoryDumps();},calculateMemoryGraphAttributes:function(){this.globalMemoryDumps.forEach(function(dump){dump.calculateGraphAttributes();});},buildEventIndices:function(){this.modelIndices=new tr.model.ModelIndices(this);},sortInteractionRecords:function(){this.interactionRecords.sort(function(x,y){return x.start-y.start;});},sortAlerts:function(){this.alerts.sort(function(x,y){return x.start-y.start;});}};return{ClockSyncRecord:ClockSyncRecord,Model:Model};});'use strict';tr.exportTo('tr.importer',function(){function EmptyImporter(events){this.importPriority=0;};EmptyImporter.canImport=function(eventData){if(eventData instanceof Array&&eventData.length==0)
-return true;if(typeof(eventData)==='string'||eventData instanceof String){return eventData.length==0;}
-return false;};EmptyImporter.prototype={__proto__:tr.importer.Importer.prototype};tr.importer.Importer.register(EmptyImporter);return{EmptyImporter:EmptyImporter};});'use strict';tr.exportTo('tr.importer',function(){function ImportOptions(){this.shiftWorldToZero=true;this.pruneEmptyContainers=true;this.showImportWarnings=true;this.customizeModelCallback=undefined;var auditorTypes=tr.c.Auditor.getAllRegisteredTypeInfos();this.auditorConstructors=auditorTypes.map(function(typeInfo){return typeInfo.constructor;});}
-function Import(model,opt_options){if(model===undefined)
-throw new Error('Must provide model to import into.');this.importing_=false;this.importOptions_=opt_options||new ImportOptions();this.model_=model;this.model_.importOptions=this.importOptions_;}
-Import.prototype={__proto__:Object.prototype,importTraces:function(traces){var progressMeter={update:function(msg){}};tr.b.Task.RunSynchronously(this.createImportTracesTask(progressMeter,traces));},importTracesWithProgressDialog:function(traces){if(tr.isHeadless)
-throw new Error('Cannot use this method in headless mode.');var overlay=tr.ui.b.Overlay();overlay.title='Importing...';overlay.userCanClose=false;overlay.msgEl=document.createElement('div');overlay.appendChild(overlay.msgEl);overlay.msgEl.style.margin='20px';overlay.update=function(msg){this.msgEl.textContent=msg;}
-overlay.visible=true;var promise=tr.b.Task.RunWhenIdle(this.createImportTracesTask(overlay,traces));promise.then(function(){overlay.visible=false;},function(err){overlay.visible=false;});return promise;},createImportTracesTask:function(progressMeter,traces){if(this.importing_)
-throw new Error('Already importing.');this.importing_=true;var importTask=new tr.b.Task(function(){progressMeter.update('I will now import your traces for you...');},this);var lastTask=importTask;var importers=[];lastTask=lastTask.after(function(){traces=traces.slice(0);progressMeter.update('Creating importers...');for(var i=0;i<traces.length;++i)
-importers.push(this.createImporter_(traces[i]));for(var i=0;i<importers.length;i++){var subtraces=importers[i].extractSubtraces();for(var j=0;j<subtraces.length;j++){try{traces.push(subtraces[j]);importers.push(this.createImporter_(subtraces[j]));}catch(error){console.warn(error.name+': '+error.message);continue;}}}
-if(traces.length&&!this.hasEventDataDecoder_(importers)){throw new Error('Could not find an importer for the provided eventData.');}
-importers.sort(function(x,y){return x.importPriority-y.importPriority;});},this);lastTask=lastTask.after(function(task){importers.forEach(function(importer,index){task.subTask(function(){progressMeter.update('Importing '+(index+1)+' of '+importers.length);importer.importEvents();},this);},this);},this);if(this.importOptions_.customizeModelCallback){lastTask=lastTask.after(function(task){this.importOptions_.customizeModelCallback(this.model_);},this);}
-lastTask=lastTask.after(function(task){importers.forEach(function(importer,index){progressMeter.update('Importing sample data '+(index+1)+'/'+importers.length);importer.importSampleData();},this);},this);lastTask=lastTask.after(function(){progressMeter.update('Autoclosing open slices...');this.model_.autoCloseOpenSlices();this.model_.createSubSlices();},this);lastTask=lastTask.after(function(task){importers.forEach(function(importer,index){progressMeter.update('Finalizing import '+(index+1)+'/'+importers.length);importer.finalizeImport();},this);},this);lastTask=lastTask.after(function(){progressMeter.update('Initializing objects (step 1/2)...');this.model_.preInitializeObjects();},this);if(this.importOptions_.pruneEmptyContainers){lastTask=lastTask.after(function(){progressMeter.update('Pruning empty containers...');this.model_.pruneEmptyContainers();},this);}
-lastTask=lastTask.after(function(){progressMeter.update('Merging kernel with userland...');this.model_.mergeKernelWithUserland();},this);var auditors=[];lastTask=lastTask.after(function(){progressMeter.update('Adding arbitrary data to model...');auditors=this.importOptions_.auditorConstructors.map(function(auditorConstructor){return new auditorConstructor(this.model_);},this);auditors.forEach(function(auditor){auditor.runAnnotate();});},this);lastTask=lastTask.after(function(){progressMeter.update('Computing final world bounds...');this.model_.computeWorldBounds(this.importOptions_.shiftWorldToZero);},this);lastTask=lastTask.after(function(){progressMeter.update('Building flow event map...');this.model_.buildFlowEventIntervalTree();},this);lastTask=lastTask.after(function(){progressMeter.update('Joining object refs...');for(var i=0;i<importers.length;i++)
-importers[i].joinRefs();},this);lastTask=lastTask.after(function(){progressMeter.update('Cleaning up undeleted objects...');this.model_.cleanupUndeletedObjects();},this);lastTask=lastTask.after(function(){progressMeter.update('Sorting memory dumps...');this.model_.sortMemoryDumps();},this);lastTask=lastTask.after(function(){progressMeter.update('Calculating memory dump graph attributes...');this.model_.calculateMemoryGraphAttributes();},this);lastTask=lastTask.after(function(){progressMeter.update('Initializing objects (step 2/2)...');this.model_.initializeObjects();},this);lastTask=lastTask.after(function(){progressMeter.update('Building flow event indices...');this.model_.buildEventIndices();},this);lastTask=lastTask.after(function(){progressMeter.update('Running auditors...');auditors.forEach(function(auditor){auditor.runAudit();});},this);lastTask=lastTask.after(function(){progressMeter.update('Updating interaction records...');this.model_.sortInteractionRecords();},this);lastTask=lastTask.after(function(){progressMeter.update('Updating alerts...');this.model_.sortAlerts();},this);lastTask=lastTask.after(function(){progressMeter.update('Update bounds...');this.model_.updateBounds();},this);lastTask.after(function(){this.importing_=false;},this);return importTask;},createImporter_:function(eventData){var importerConstructor=tr.importer.Importer.findImporterFor(eventData);if(!importerConstructor){throw new Error('Couldn\'t create an importer for the provided '+'eventData.');}
-return new importerConstructor(this.model_,eventData);},hasEventDataDecoder_:function(importers){if(importers.length===0)
-return false;for(var i=0;i<importers.length;++i){if(!importers[i].isTraceDataContainer())
-return true;}
-return false;}};return{ImportOptions:ImportOptions,Import:Import};});'use strict';tr.exportTo('tr.importer',function(){function SimpleLineReader(text){this.lines_=text.split('\n');this.curLine_=0;this.savedLines_=undefined;}
+this.processes[pid].sortMemoryDumps();},finalizeMemoryGraphs:function(){this.globalMemoryDumps.forEach(function(dump){dump.finalizeGraph();});},buildEventIndices:function(){this.modelIndices=new tr.model.ModelIndices(this);},sortAlerts:function(){this.alerts.sort(function(x,y){return x.start-y.start;});},applyObjectRefPatchups:function(){var unresolved=[];this.patchupsToApply_.forEach(function(patchup){if(patchup.pidRef in this.processes){var snapshot=this.processes[patchup.pidRef].objects.getSnapshotAt(patchup.scopedId,patchup.ts);if(snapshot){patchup.object[patchup.field]=snapshot;return;}}
+unresolved.push(patchup);},this);this.patchupsToApply_=unresolved;},replacePIDRefsInPatchups:function(old_pid_ref,new_pid_ref){this.patchupsToApply_.forEach(function(patchup){if(patchup.pidRef===old_pid_ref)
+patchup.pidRef=new_pid_ref;});},isTimeHighResolutionHeuristic_:function(){if(this.intrinsicTimeUnit!==tr.v.TimeDisplayModes.ms)
+return false;var nbEvents=0;var nbPerBin=[];var maxEvents=0;for(var i=0;i<100;++i)
+nbPerBin.push(0);this.iterateAllEvents(function(event){nbEvents++;if(event.start!==undefined){var remainder=Math.floor((event.start-Math.floor(event.start))*100);nbPerBin[remainder]++;maxEvents=Math.max(maxEvents,nbPerBin[remainder]);}});if(nbEvents<100)
+return true;return(maxEvents/nbEvents)<0.9;},joinRefs:function(){this.joinObjectRefs_();this.applyObjectRefPatchups();},joinObjectRefs_:function(){tr.b.iterItems(this.processes,function(pid,process){this.joinObjectRefsForProcess_(pid,process);},this);},joinObjectRefsForProcess_:function(pid,process){tr.b.iterItems(process.threads,function(tid,thread){thread.asyncSliceGroup.slices.forEach(function(item){this.searchItemForIDRefs_(pid,'start',item);},this);thread.sliceGroup.slices.forEach(function(item){this.searchItemForIDRefs_(pid,'start',item);},this);},this);process.objects.iterObjectInstances(function(instance){instance.snapshots.forEach(function(item){this.searchItemForIDRefs_(pid,'ts',item);},this);},this);},searchItemForIDRefs_:function(pid,itemTimestampField,item){if(!item.args)
+return;var patchupsToApply=this.patchupsToApply_;function handleField(object,fieldName,fieldValue){if(!fieldValue||(!fieldValue.id_ref&&!fieldValue.idRef))
+return;var scope=fieldValue.scope||tr.model.OBJECT_DEFAULT_SCOPE;var idRef=fieldValue.id_ref||fieldValue.idRef;var scopedId=new tr.model.ScopedId(scope,idRef);var pidRef=fieldValue.pid_ref||fieldValue.pidRef||pid;var ts=item[itemTimestampField];patchupsToApply.push({object:object,field:fieldName,pidRef:pidRef,scopedId:scopedId,ts:ts});}
+function iterObjectFieldsRecursively(object){if(!(object instanceof Object))
+return;if((object instanceof tr.model.ObjectSnapshot)||(object instanceof Float32Array)||(object instanceof tr.b.Quad))
+return;if(object instanceof Array){for(var i=0;i<object.length;i++){handleField(object,i,object[i]);iterObjectFieldsRecursively(object[i]);}
+return;}
+for(var key in object){var value=object[key];handleField(object,key,value);iterObjectFieldsRecursively(value);}}
+iterObjectFieldsRecursively(item.args);}};return{Model:Model};});'use strict';tr.exportTo('tr.e.importer.etw',function(){var kThreadGuid='3D6FA8D1-FE05-11D0-9DDA-00C04FD7BA7C';var kThreadDCStartOpcode=3;function Decoder(){this.payload_=new DataView(new ArrayBuffer(256));};Decoder.prototype={__proto__:Object.prototype,reset:function(base64_payload){var decoded_size=tr.b.Base64.getDecodedBufferLength(base64_payload);if(decoded_size>this.payload_.byteLength)
+this.payload_=new DataView(new ArrayBuffer(decoded_size));tr.b.Base64.DecodeToTypedArray(base64_payload,this.payload_);this.position_=0;},skip:function(length){this.position_+=length;},decodeUInt8:function(){var result=this.payload_.getUint8(this.position_,true);this.position_+=1;return result;},decodeUInt16:function(){var result=this.payload_.getUint16(this.position_,true);this.position_+=2;return result;},decodeUInt32:function(){var result=this.payload_.getUint32(this.position_,true);this.position_+=4;return result;},decodeUInt64ToString:function(){var low=this.decodeUInt32();var high=this.decodeUInt32();var low_str=('0000000'+low.toString(16)).substr(-8);var high_str=('0000000'+high.toString(16)).substr(-8);var result=high_str+low_str;return result;},decodeInt8:function(){var result=this.payload_.getInt8(this.position_,true);this.position_+=1;return result;},decodeInt16:function(){var result=this.payload_.getInt16(this.position_,true);this.position_+=2;return result;},decodeInt32:function(){var result=this.payload_.getInt32(this.position_,true);this.position_+=4;return result;},decodeInt64ToString:function(){return this.decodeUInt64ToString();},decodeUInteger:function(is64){if(is64)
+return this.decodeUInt64ToString();return this.decodeUInt32();},decodeString:function(){var str='';while(true){var c=this.decodeUInt8();if(!c)
+return str;str=str+String.fromCharCode(c);}},decodeW16String:function(){var str='';while(true){var c=this.decodeUInt16();if(!c)
+return str;str=str+String.fromCharCode(c);}},decodeFixedW16String:function(length){var old_position=this.position_;var str='';for(var i=0;i<length;i++){var c=this.decodeUInt16();if(!c)
+break;str=str+String.fromCharCode(c);}
+this.position_=old_position+2*length;return str;},decodeBytes:function(length){var bytes=[];for(var i=0;i<length;++i){var c=this.decodeUInt8();bytes.push(c);}
+return bytes;},decodeSID:function(is64){var pSid=this.decodeUInteger(is64);var attributes=this.decodeUInt32();if(is64)
+this.decodeUInt32();var revision=this.decodeUInt8();var subAuthorityCount=this.decodeUInt8();this.decodeUInt16();this.decodeUInt32();if(revision!=1)
+throw'Invalid SID revision: could not decode the SID structure.';var sid=this.decodeBytes(4*subAuthorityCount);return{pSid:pSid,attributes:attributes,sid:sid};},decodeSystemTime:function(){var wYear=this.decodeInt16();var wMonth=this.decodeInt16();var wDayOfWeek=this.decodeInt16();var wDay=this.decodeInt16();var wHour=this.decodeInt16();var wMinute=this.decodeInt16();var wSecond=this.decodeInt16();var wMilliseconds=this.decodeInt16();return{wYear:wYear,wMonth:wMonth,wDayOfWeek:wDayOfWeek,wDay:wDay,wHour:wHour,wMinute:wMinute,wSecond:wSecond,wMilliseconds:wMilliseconds};},decodeTimeZoneInformation:function(){var bias=this.decodeUInt32();var standardName=this.decodeFixedW16String(32);var standardDate=this.decodeSystemTime();var standardBias=this.decodeUInt32();var daylightName=this.decodeFixedW16String(32);var daylightDate=this.decodeSystemTime();var daylightBias=this.decodeUInt32();return{bias:bias,standardName:standardName,standardDate:standardDate,standardBias:standardBias,daylightName:daylightName,daylightDate:daylightDate,daylightBias:daylightBias};}};function EtwImporter(model,events){this.importPriority=3;this.model_=model;this.events_=events;this.handlers_={};this.decoder_=new Decoder();this.walltime_=undefined;this.ticks_=undefined;this.is64bit_=undefined;this.tidsToPid_={};var allTypeInfos=tr.e.importer.etw.Parser.getAllRegisteredTypeInfos();this.parsers_=allTypeInfos.map(function(typeInfo){return new typeInfo.constructor(this);},this);}
+EtwImporter.canImport=function(events){if(!events.hasOwnProperty('name')||!events.hasOwnProperty('content')||events.name!=='ETW'){return false;}
+return true;};EtwImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'EtwImporter';},get model(){return this.model_;},createThreadIfNeeded:function(pid,tid){this.tidsToPid_[tid]=pid;},removeThreadIfPresent:function(tid){this.tidsToPid_[tid]=undefined;},getPidFromWindowsTid:function(tid){if(tid==0)
+return 0;var pid=this.tidsToPid_[tid];if(pid==undefined){return 0;}
+return pid;},getThreadFromWindowsTid:function(tid){var pid=this.getPidFromWindowsTid(tid);var process=this.model_.getProcess(pid);if(!process)
+return undefined;return process.getThread(tid);},getOrCreateCpu:function(cpuNumber){var cpu=this.model_.kernel.getOrCreateCpu(cpuNumber);return cpu;},importEvents:function(){this.events_.content.forEach(this.parseInfo.bind(this));if(this.walltime_==undefined||this.ticks_==undefined)
+throw Error('Cannot find clock sync information in the system trace.');if(this.is64bit_==undefined)
+throw Error('Cannot determine pointer size of the system trace.');this.events_.content.forEach(this.parseEvent.bind(this));},importTimestamp:function(timestamp){var ts=parseInt(timestamp,16);return(ts-this.walltime_+this.ticks_)/1000.;},parseInfo:function(event){if(event.hasOwnProperty('guid')&&event.hasOwnProperty('walltime')&&event.hasOwnProperty('tick')&&event.guid==='ClockSync'){this.walltime_=parseInt(event.walltime,16);this.ticks_=parseInt(event.tick,16);}
+if(this.is64bit_==undefined&&event.hasOwnProperty('guid')&&event.hasOwnProperty('op')&&event.hasOwnProperty('ver')&&event.hasOwnProperty('payload')&&event.guid===kThreadGuid&&event.op==kThreadDCStartOpcode){var decoded_size=tr.b.Base64.getDecodedBufferLength(event.payload);if(event.ver==1){if(decoded_size>=52)
+this.is64bit_=true;else
+this.is64bit_=false;}else if(event.ver==2){if(decoded_size>=64)
+this.is64bit_=true;else
+this.is64bit_=false;}else if(event.ver==3){if(decoded_size>=60)
+this.is64bit_=true;else
+this.is64bit_=false;}}
+return true;},parseEvent:function(event){if(!event.hasOwnProperty('guid')||!event.hasOwnProperty('op')||!event.hasOwnProperty('ver')||!event.hasOwnProperty('cpu')||!event.hasOwnProperty('ts')||!event.hasOwnProperty('payload')){return false;}
+var timestamp=this.importTimestamp(event.ts);var header={guid:event.guid,opcode:event.op,version:event.ver,cpu:event.cpu,timestamp:timestamp,is64:this.is64bit_};var decoder=this.decoder_;decoder.reset(event.payload);var handler=this.getEventHandler(header.guid,header.opcode);if(!handler)
+return false;if(!handler(header,decoder)){this.model_.importWarning({type:'parse_error',message:'Malformed '+header.guid+' event ('+text+')'});return false;}
+return true;},registerEventHandler:function(guid,opcode,handler){if(this.handlers_[guid]==undefined)
+this.handlers_[guid]=[];this.handlers_[guid][opcode]=handler;},getEventHandler:function(guid,opcode){if(this.handlers_[guid]==undefined)
+return undefined;return this.handlers_[guid][opcode];}};tr.importer.Importer.register(EtwImporter);return{EtwImporter:EtwImporter};});!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,f,g,h,i,j="",k=0;k<a.length;)b=a.charCodeAt(k++),c=a.charCodeAt(k++),e=a.charCodeAt(k++),f=b>>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<a.length;)f=d.indexOf(a.charAt(k++)),g=d.indexOf(a.charAt(k++)),h=d.indexOf(a.charAt(k++)),i=d.indexOf(a.charAt(k++)),b=f<<2|g>>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<a||0>a)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":21}],6:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.comment=null},{}],7:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":21}],8:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){return e.deflateRaw(a)},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a("./base64");c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./deprecatedPublicUtils"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;g<e.length;g++)h=e[g],this.file(h.fileName,h.decompressed,{binary:!0,optimizedBinaryString:!0,date:h.date,dir:h.dir,comment:h.fileComment.length?h.fileComment:null,createFolders:b.createFolders});return f.zipComment.length&&(this.comment=f.zipComment),this}},{"./base64":1,"./zipEntries":22}],11:[function(a,b){(function(a){"use strict";b.exports=function(b,c){return new a(b,c)},b.exports.test=function(b){return a.isBuffer(b)}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],12:[function(a,b){"use strict";function c(a){this.data=a,this.length=this.data.length,this.index=0}var d=a("./uint8ArrayReader");c.prototype=new d,c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./uint8ArrayReader":18}],13:[function(a,b){"use strict";var c=a("./support"),d=a("./utils"),e=a("./crc32"),f=a("./signature"),g=a("./defaults"),h=a("./base64"),i=a("./compressions"),j=a("./compressedObject"),k=a("./nodeBuffer"),l=a("./utf8"),m=a("./stringWriter"),n=a("./uint8ArrayWriter"),o=function(a){if(a._data instanceof j&&(a._data=a._data.getContent(),a.options.binary=!0,a.options.base64=!1,"uint8array"===d.getTypeOf(a._data))){var b=a._data;a._data=new Uint8Array(b.length),0!==b.length&&a._data.set(b,0)}return a._data},p=function(a){var b=o(a),e=d.getTypeOf(b);return"string"===e?!a.options.binary&&c.nodebuffer?k(b,"utf-8"):a.asBinary():b},q=function(a){var b=o(this);return null===b||"undefined"==typeof b?"":(this.options.base64&&(b=h.decode(b)),b=a&&this.options.binary?A.utf8decode(b):d.transformTo("string",b),a||this.options.binary||(b=d.transformTo("string",A.utf8encode(b))),b)},r=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this._data=b,this.options=c,this._initialMetadata={dir:c.dir,date:c.date}};r.prototype={asText:function(){return q.call(this,!0)},asBinary:function(){return q.call(this,!1)},asNodeBuffer:function(){var a=p(this);return d.transformTo("nodebuffer",a)},asUint8Array:function(){var a=p(this);return d.transformTo("uint8array",a)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var s=function(a,b){var c,d="";for(c=0;b>c;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c},u=function(a){return a=a||{},a.base64!==!0||null!==a.binary&&void 0!==a.binary||(a.binary=!0),a=t(a,g),a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),a},v=function(a,b,c){var e,f=d.getTypeOf(b);if(c=u(c),c.createFolders&&(e=w(a))&&x.call(this,e,!0),c.dir||null===b||"undefined"==typeof b)c.base64=!1,c.binary=!1,b=null;else if("string"===f)c.binary&&!c.base64&&c.optimizedBinaryString!==!0&&(b=d.string2binary(b));else{if(c.base64=!1,c.binary=!0,!(f||b instanceof j))throw new Error("The data of '"+a+"' is in an unsupported format !");"arraybuffer"===f&&(b=d.transformTo("uint8array",b))}var g=new r(a,b,c);return this.files[a]=g,g},w=function(a){"/"==a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},x=function(a,b){return"/"!=a.slice(-1)&&(a+="/"),b="undefined"!=typeof b?b:!1,this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},y=function(a,b){var c,f=new j;return a._data instanceof j?(f.uncompressedSize=a._data.uncompressedSize,f.crc32=a._data.crc32,0===f.uncompressedSize||a.dir?(b=i.STORE,f.compressedContent="",f.crc32=0):a._data.compressionMethod===b.magic?f.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c)))):(c=p(a),(!c||0===c.length||a.dir)&&(b=i.STORE,c=""),f.uncompressedSize=c.length,f.crc32=e(c),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c))),f.compressedSize=f.compressedContent.length,f.compressionMethod=b.magic,f},z=function(a,b,c,g){var h,i,j,k,m=(c.compressedContent,d.transformTo("string",l.utf8encode(b.name))),n=b.comment||"",o=d.transformTo("string",l.utf8encode(n)),p=m.length!==b.name.length,q=o.length!==n.length,r=b.options,t="",u="",v="";j=b._initialMetadata.dir!==b.dir?b.dir:r.dir,k=b._initialMetadata.date!==b.date?b.date:r.date,h=k.getHours(),h<<=6,h|=k.getMinutes(),h<<=5,h|=k.getSeconds()/2,i=k.getFullYear()-1980,i<<=4,i|=k.getMonth()+1,i<<=5,i|=k.getDate(),p&&(u=s(1,1)+s(e(m),4)+m,t+="up"+s(u.length,2)+u),q&&(v=s(1,1)+s(this.crc32(o),4)+o,t+="uc"+s(v.length,2)+v);var w="";w+="\n\x00",w+=p||q?"\x00\b":"\x00\x00",w+=c.compressionMethod,w+=s(h,2),w+=s(i,2),w+=s(c.crc32,4),w+=s(c.compressedSize,4),w+=s(c.uncompressedSize,4),w+=s(m.length,2),w+=s(t.length,2);var x=f.LOCAL_FILE_HEADER+w+m+t,y=f.CENTRAL_FILE_HEADER+"\x00"+w+s(o.length,2)+"\x00\x00\x00\x00"+(j===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+s(g,4)+m+t+o;return{fileRecord:x,dirRecord:y,compressedObject:c}},A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=x.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){a=t(a||{},{base64:!0,compression:"STORE",type:"base64",comment:null}),d.checkSupport(a.type);var b,c,e=[],g=0,j=0,k=d.transformTo("string",this.utf8encode(a.comment||this.comment||""));for(var l in this.files)if(this.files.hasOwnProperty(l)){var o=this.files[l],p=o.options.compression||a.compression.toUpperCase(),q=i[p];if(!q)throw new Error(p+" is not a valid compression method !");var r=y.call(this,o,q),u=z.call(this,l,o,r,g);g+=u.fileRecord.length+r.compressedSize,j+=u.dirRecord.length,e.push(u)}var v="";v=f.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+s(e.length,2)+s(e.length,2)+s(j,4)+s(g,4)+s(k.length,2)+k;var w=a.type.toLowerCase();for(b="uint8array"===w||"arraybuffer"===w||"blob"===w||"nodebuffer"===w?new n(g+j+v.length):new m(g+j+v.length),c=0;c<e.length;c++)b.append(e[c].fileRecord),b.append(e[c].compressedObject.compressedContent);for(c=0;c<e.length;c++)b.append(e[c].dirRecord);b.append(v);var x=b.finalize();switch(a.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return d.transformTo(a.type.toLowerCase(),x);case"blob":return d.arrayBuffer2Blob(d.transformTo("arraybuffer",x));case"base64":return a.base64?h.encode(x):x;default:return x}},crc32:function(a,b){return e(a,b)},utf8encode:function(a){return d.transformTo("string",l.utf8encode(a))},utf8decode:function(a){return l.utf8decode(a)}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],15:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5,"./utils":21}],16:[function(a,b){"use strict";var c=a("./utils"),d=function(){this.data=[]};d.prototype={append:function(a){a=c.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}},b.exports=d},{"./utils":21}],17:[function(a,b,c){(function(a){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof a,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var b=new ArrayBuffer(0);try{c.blob=0===new Blob([b],{type:"application/zip"}).size}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;f.append(b),c.blob=0===f.getBlob("application/zip").size}catch(d){c.blob=!1}}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],18:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5}],19:[function(a,b){"use strict";var c=a("./utils"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{"./utils":21}],20:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(e.uint8array?k(a.subarray(c,h)):k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function f(a){var b=65536,d=[],e=a.length,f=c.getTypeOf(a),g=0,h=!0;try{switch(f){case"uint8array":String.fromCharCode.apply(null,new Uint8Array(0));break;case"nodebuffer":String.fromCharCode.apply(null,j(0))}}catch(i){h=!1}if(!h){for(var k="",l=0;l<a.length;l++)k+=String.fromCharCode(a[l]);return k}for(;e>g&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var h=a("./support"),i=a("./compressions"),j=a("./nodeBuffer");c.string2binary=function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(255&a.charCodeAt(c));return b},c.arrayBuffer2Blob=function(a){c.checkSupport("blob");try{return new Blob([a],{type:"application/zip"})}catch(b){try{var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,e=new d;return e.append(a),e.getBlob("application/zip")}catch(b){throw new Error("Bug : can't construct the Blob.")}}},c.applyFromCharCode=f;var k={};k.string={string:d,array:function(a){return e(a,new Array(a.length))},arraybuffer:function(a){return k.string.uint8array(a).buffer},uint8array:function(a){return e(a,new Uint8Array(a.length))},nodebuffer:function(a){return e(a,j(a.length))}},k.array={string:f,array:d,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(a)}},k.arraybuffer={string:function(a){return f(new Uint8Array(a))},array:function(a){return g(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:d,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(new Uint8Array(a))}},k.uint8array={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:d,nodebuffer:function(a){return j(a)}},k.nodebuffer={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return k.nodebuffer.uint8array(a).buffer},uint8array:function(a){return g(a,new Uint8Array(a.length))},nodebuffer:d},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=k[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":h.nodebuffer&&j.test(a)?"nodebuffer":h.uint8array&&a instanceof Uint8Array?"uint8array":h.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=h[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this browser")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(16>b?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support"),k=a("./object");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(h.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===h.CENTRAL_FILE_HEADER;)a=new i({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(h.CENTRAL_DIRECTORY_END);if(-1===a)throw new Error("Corrupted zip : can't find end of central directory");if(this.reader.setIndex(a),this.checkSignature(h.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===g.MAX_VALUE_16BITS||this.diskWithCentralDirStart===g.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===g.MAX_VALUE_16BITS||this.centralDirRecords===g.MAX_VALUE_16BITS||this.centralDirSize===g.MAX_VALUE_32BITS||this.centralDirOffset===g.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),-1===a)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");this.reader.setIndex(a),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}},prepareReader:function(a){var b=g.getTypeOf(a);this.reader="string"!==b||j.uint8array?"nodebuffer"===b?new e(a):new f(g.transformTo("uint8array",a)):new d(a,this.loadOptions.optimizedBinaryString)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=c},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(a,b){"use strict";function c(a,b){this.options=a,this.loadOptions=b}var d=a("./stringReader"),e=a("./utils"),f=a("./compressedObject"),g=a("./object");c.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(a,b,c){return function(){var d=a.index;a.setIndex(b);var e=a.readData(c);return a.setIndex(d),e}},prepareContent:function(a,b,c,d,f){return function(){var a=e.transformTo(d.uncompressInputType,this.getCompressedContent()),b=d.uncompress(a);if(b.length!==f)throw new Error("Bug : uncompressed data size mismatch");return b}},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readString(this.fileNameLength),a.skip(c),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(b=e.findCompression(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+e.pretty(this.compressionMethod)+" unknown (inner file : "+this.fileName+")");if(this.decompressed=new f,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=e.transformTo("string",this.decompressed.getContent()),g.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(a){if(this.versionMadeBy=a.readString(2),this.versionNeeded=a.readInt(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4),this.fileNameLength=a.readInt(2),this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=a.readString(this.fileNameLength),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readString(this.fileCommentLength),this.dir=16&this.externalFileAttributes?!0:!1},parseZIP64ExtraField:function(){if(this.extraFields[1]){var a=new d(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index<e+this.extraFieldsLength;)b=a.readInt(2),c=a.readInt(2),d=a.readString(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){if(this.useUTF8())this.fileName=g.utf8decode(this.fileName),this.fileComment=g.utf8decode(this.fileComment);else{var a=this.findExtraFieldUnicodePath();null!==a&&(this.fileName=a);var b=this.findExtraFieldUnicodeComment();null!==b&&(this.fileComment=b)}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileName)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileComment)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null}},b.exports=c},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(a,b){"use strict";var c=a("./lib/utils/common").assign,d=a("./lib/deflate"),e=a("./lib/inflate"),f=a("./lib/zlib/constants"),g={};c(g,d,e,f),b.exports=g},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(a,b,c){"use strict";function d(a,b){var c=new s(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}function f(a,b){return b=b||{},b.gzip=!0,d(a,b)}var g=a("./zlib/deflate.js"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=0,m=4,n=0,o=1,p=-1,q=0,r=8,s=function(a){this.options=h.assign({level:p,method:r,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":27}],29:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+hb-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<hb)););}while(a.lookahead<jb&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c)),a.match_length>=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function p(a,b){for(var c,d,e;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=hb-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===S||a.match_length===hb&&a.strstart-a.match_start>4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=hb-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return sb}else if(a.match_available){if(d=D._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return sb}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=D._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ib){if(m(a),a.lookahead<=ib&&b===H)return sb;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+hb-1)/hb),i.window=new C.Buf8(2*i.w_size),i.head=new C.Buf16(i.hash_size),i.prev=new C.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new C.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(a,b){"use strict";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<<e.lenbits)-1,u=(1<<e.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){e.mode=d;break a}a.msg="invalid literal/length code",e.mode=c;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",e.mode=c;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab=0,Bb=new r.Buf8(4),Cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xb=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<<wb,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg="unknown compression method",c.mode=lb;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=lb;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=lb;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Cb[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have<c.nlen+c.ndist;){for(;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(rb&&0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.lencode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<<c.distbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.distcode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=lb;break}m=0,n=0}c.mode=jb;case jb:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=lb;break}m=0,n=0}c.mode=kb;case kb:xb=D;break a;case lb:xb=G;break a;case mb:return H;case nb:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<lb&&(c.mode<ib||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=mb,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===bb||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xb===C&&(xb=I),xb)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,ab=19,bb=20,cb=21,db=22,eb=23,fb=24,gb=25,hb=26,ib=27,jb=28,kb=29,lb=30,mb=31,nb=32,ob=852,pb=592,qb=15,rb=qb,sb=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(a,b){"use strict";var c=a("../utils/common"),d=15,e=852,f=592,g=0,h=1,i=2,j=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,n,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new c.Buf16(d+1),Q=new c.Buf16(d+1),R=null,S=0;for(D=0;d>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===h&&L>e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===h&&L>e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<<a.bi_valid&65535,f(a,a.bi_buf),a.bi_buf=b>>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function h(a,b,c){g(a,c[2*b],c[2*b+1])}function i(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<<ab[d];a++)gb[e++]=d;for(e>>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<<ab[d]-7;a++)gb[256+e++]=d;for(b=0;U>=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function r(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&q(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!q(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function s(a,b,c){var d,f,i,j,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],f=a.pending_buf[a.l_buf+k],k++,0===d?h(a,f,b):(i=hb[f],h(a,i+P+1,b),j=_[i],0!==j&&(f-=ib[i],g(a,f,j)),d--,i=e(d),h(a,i,c),j=ab[i],0!==j&&(d-=jb[i],g(a,d,j)));while(k<a.last_lit);h(a,X,b)}function t(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=T,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++j<k&&e===i)){if(l>j){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":27}],39:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)});'use strict';if(tr.isVinn){global.window={};}'use strict';if(tr.isVinn){global.JSZip=global.window.JSZip;global.window=undefined;}else if(tr.isNode){var jsZipAbsPath=HTMLImportsLoader.hrefToAbsolutePath('/jszip.min.js');var jsZipModule=require(jsZipAbsPath);global.JSZip=jsZipModule;}'use strict';tr.exportTo('tr.e.importer',function(){var GZIP_MEMBER_HEADER_ID_SIZE=3;var GZIP_HEADER_ID1=0x1f;var GZIP_HEADER_ID2=0x8b;var GZIP_DEFLATE_COMPRESSION=8;function GzipImporter(model,eventData){if(typeof(eventData)==='string'||eventData instanceof String){eventData=JSZip.utils.transformTo('uint8array',eventData);}else if(eventData instanceof ArrayBuffer){eventData=new Uint8Array(eventData);}else
+throw new Error('Unknown gzip data format');this.model_=model;this.gzipData_=eventData;}
+GzipImporter.canImport=function(eventData){var header;if(eventData instanceof ArrayBuffer)
+header=new Uint8Array(eventData.slice(0,GZIP_MEMBER_HEADER_ID_SIZE));else if(typeof(eventData)==='string'||eventData instanceof String){header=eventData.substring(0,GZIP_MEMBER_HEADER_ID_SIZE);header=JSZip.utils.transformTo('uint8array',header);}else
+return false;return header[0]==GZIP_HEADER_ID1&&header[1]==GZIP_HEADER_ID2&&header[2]==GZIP_DEFLATE_COMPRESSION;};GzipImporter.inflateGzipData_=function(data){var position=0;function getByte(){if(position>=data.length)
+throw new Error('Unexpected end of gzip data');return data[position++];}
+function getWord(){var low=getByte();var high=getByte();return(high<<8)+low;}
+function skipBytes(amount){position+=amount;}
+function skipZeroTerminatedString(){while(getByte()!=0){}}
+var id1=getByte();var id2=getByte();if(id1!==GZIP_HEADER_ID1||id2!==GZIP_HEADER_ID2)
+throw new Error('Not gzip data');var compression_method=getByte();if(compression_method!==GZIP_DEFLATE_COMPRESSION)
+throw new Error('Unsupported compression method: '+compression_method);var flags=getByte();var have_header_crc=flags&(1<<1);var have_extra_fields=flags&(1<<2);var have_file_name=flags&(1<<3);var have_comment=flags&(1<<4);skipBytes(4+1+1);if(have_extra_fields){var bytes_to_skip=getWord();skipBytes(bytes_to_skip);}
+if(have_file_name)
+skipZeroTerminatedString();if(have_comment)
+skipZeroTerminatedString();if(have_header_crc)
+getWord();var inflated_data=JSZip.compressions['DEFLATE'].uncompress(data.subarray(position));var string=GzipImporter.transformToString(inflated_data);if(inflated_data.length>0&&string.length===0){throw new RangeError('Inflated gzip data too long to fit into a string'+' ('+inflated_data.length+').');}
+return string;};GzipImporter.transformToString=function(data){if(typeof TextDecoder==='undefined'){return JSZip.utils.transformTo('string',data);}
+var type=JSZip.utils.getTypeOf(data);if(type==='string')
+return data;if(type==='array'){data=new Uint8Array(data);}
+var decoder=new TextDecoder('utf-8');return decoder.decode(data);};GzipImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'GzipImporter';},isTraceDataContainer:function(){return true;},extractSubtraces:function(){var eventData=GzipImporter.inflateGzipData_(this.gzipData_);return eventData?[eventData]:[];}};tr.importer.Importer.register(GzipImporter);return{GzipImporter:GzipImporter};});'use strict';tr.exportTo('tr.importer',function(){function SimpleLineReader(text){this.lines_=text.split('\n');this.curLine_=0;this.savedLines_=undefined;}
 SimpleLineReader.prototype={advanceToLineMatching:function(regex){for(;this.curLine_<this.lines_.length;this.curLine_++){var line=this.lines_[this.curLine_];if(this.savedLines_!==undefined)
 this.savedLines_.push(line);if(regex.test(line))
 return true;}
-return false;},get curLineNumber(){return this.curLine_;},beginSavingLines:function(){this.savedLines_=[];},endSavingLinesAndGetResult:function(){var tmp=this.savedLines_;this.savedLines_=undefined;return tmp;}};return{SimpleLineReader:SimpleLineReader};});'use strict';tr.exportTo('tr.model',function(){var ColorScheme=tr.b.ColorScheme;function Activity(name,category,range,args){tr.model.TimedEvent.call(this,range.min);this.title=name;this.category=category;this.colorId=ColorScheme.getColorIdForGeneralPurposeString(name);this.duration=range.duration;this.args=args;this.name=name;};Activity.prototype={__proto__:tr.model.TimedEvent.prototype,shiftTimestampsForward:function(amount){this.start+=amount;},addBoundsToRange:function(range){range.addValue(this.start);range.addValue(this.end);}};return{Activity:Activity};});'use strict';tr.exportTo('tr.e.importer.android',function(){var Importer=tr.importer.Importer;var ACTIVITY_STATE={NONE:'none',CREATED:'created',STARTED:'started',RESUMED:'resumed',PAUSED:'paused',STOPPED:'stopped',DESTROYED:'destroyed'};var activityMap={};function EventLogImporter(model,events){this.model_=model;this.events_=events;this.importPriority=3;}
+return false;},get curLineNumber(){return this.curLine_;},beginSavingLines:function(){this.savedLines_=[];},endSavingLinesAndGetResult:function(){var tmp=this.savedLines_;this.savedLines_=undefined;return tmp;}};return{SimpleLineReader:SimpleLineReader};});'use strict';tr.exportTo('tr.e.importer',function(){function Trace2HTMLImporter(model,events){this.importPriority=0;}
+Trace2HTMLImporter.subtraces_=[];function _extractEventsFromHTML(text){Trace2HTMLImporter.subtraces_=[];var r=new tr.importer.SimpleLineReader(text);while(true){if(!r.advanceToLineMatching(new RegExp('^<\s*script id="viewer-data" '+'type="(application\/json|text\/plain)">$')))
+break;r.beginSavingLines();if(!r.advanceToLineMatching(/^<\/\s*script>$/))
+return failure;var raw_events=r.endSavingLinesAndGetResult();raw_events=raw_events.slice(1,raw_events.length-1);var data64=raw_events.join('\n');var buffer=new ArrayBuffer(tr.b.Base64.getDecodedBufferLength(data64));var len=tr.b.Base64.DecodeToTypedArray(data64,new DataView(buffer));Trace2HTMLImporter.subtraces_.push(buffer.slice(0,len));}}
+function _canImportFromHTML(text){if(/^<!DOCTYPE html>/.test(text)===false)
+return false;_extractEventsFromHTML(text);if(Trace2HTMLImporter.subtraces_.length===0)
+return false;return true;}
+Trace2HTMLImporter.canImport=function(events){return _canImportFromHTML(events);};Trace2HTMLImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'Trace2HTMLImporter';},isTraceDataContainer:function(){return true;},extractSubtraces:function(){return Trace2HTMLImporter.subtraces_;},importEvents:function(){}};tr.importer.Importer.register(Trace2HTMLImporter);return{Trace2HTMLImporter:Trace2HTMLImporter};});'use strict';tr.exportTo('tr.e.importer.v8',function(){function SplayTree(){};SplayTree.prototype.root_=null;SplayTree.prototype.isEmpty=function(){return!this.root_;};SplayTree.prototype.insert=function(key,value){if(this.isEmpty()){this.root_=new SplayTree.Node(key,value);return;}
+this.splay_(key);if(this.root_.key==key){return;}
+var node=new SplayTree.Node(key,value);if(key>this.root_.key){node.left=this.root_;node.right=this.root_.right;this.root_.right=null;}else{node.right=this.root_;node.left=this.root_.left;this.root_.left=null;}
+this.root_=node;};SplayTree.prototype.remove=function(key){if(this.isEmpty()){throw Error('Key not found: '+key);}
+this.splay_(key);if(this.root_.key!=key){throw Error('Key not found: '+key);}
+var removed=this.root_;if(!this.root_.left){this.root_=this.root_.right;}else{var right=this.root_.right;this.root_=this.root_.left;this.splay_(key);this.root_.right=right;}
+return removed;};SplayTree.prototype.find=function(key){if(this.isEmpty()){return null;}
+this.splay_(key);return this.root_.key==key?this.root_:null;};SplayTree.prototype.findMin=function(){if(this.isEmpty()){return null;}
+var current=this.root_;while(current.left){current=current.left;}
+return current;};SplayTree.prototype.findMax=function(opt_startNode){if(this.isEmpty()){return null;}
+var current=opt_startNode||this.root_;while(current.right){current=current.right;}
+return current;};SplayTree.prototype.findGreatestLessThan=function(key){if(this.isEmpty()){return null;}
+this.splay_(key);if(this.root_.key<=key){return this.root_;}else if(this.root_.left){return this.findMax(this.root_.left);}else{return null;}};SplayTree.prototype.exportKeysAndValues=function(){var result=[];this.traverse_(function(node){result.push([node.key,node.value]);});return result;};SplayTree.prototype.exportValues=function(){var result=[];this.traverse_(function(node){result.push(node.value);});return result;};SplayTree.prototype.splay_=function(key){if(this.isEmpty()){return;}
+var dummy,left,right;dummy=left=right=new SplayTree.Node(null,null);var current=this.root_;while(true){if(key<current.key){if(!current.left){break;}
+if(key<current.left.key){var tmp=current.left;current.left=tmp.right;tmp.right=current;current=tmp;if(!current.left){break;}}
+right.left=current;right=current;current=current.left;}else if(key>current.key){if(!current.right){break;}
+if(key>current.right.key){var tmp=current.right;current.right=tmp.left;tmp.left=current;current=tmp;if(!current.right){break;}}
+left.right=current;left=current;current=current.right;}else{break;}}
+left.right=current.left;right.left=current.right;current.left=dummy.right;current.right=dummy.left;this.root_=current;};SplayTree.prototype.traverse_=function(f){var nodesToVisit=[this.root_];while(nodesToVisit.length>0){var node=nodesToVisit.shift();if(node==null){continue;}
+f(node);nodesToVisit.push(node.left);nodesToVisit.push(node.right);}};SplayTree.Node=function(key,value){this.key=key;this.value=value;};SplayTree.Node.prototype.left=null;SplayTree.Node.prototype.right=null;return{SplayTree:SplayTree};});'use strict';tr.exportTo('tr.e.importer.v8',function(){function CodeMap(){this.dynamics_=new tr.e.importer.v8.SplayTree();this.dynamicsNameGen_=new tr.e.importer.v8.CodeMap.NameGenerator();this.statics_=new tr.e.importer.v8.SplayTree();this.libraries_=new tr.e.importer.v8.SplayTree();this.pages_=[];};CodeMap.PAGE_ALIGNMENT=12;CodeMap.PAGE_SIZE=1<<CodeMap.PAGE_ALIGNMENT;CodeMap.prototype.addCode=function(start,codeEntry){this.deleteAllCoveredNodes_(this.dynamics_,start,start+codeEntry.size);this.dynamics_.insert(start,codeEntry);};CodeMap.prototype.moveCode=function(from,to){var removedNode=this.dynamics_.remove(from);this.deleteAllCoveredNodes_(this.dynamics_,to,to+removedNode.value.size);this.dynamics_.insert(to,removedNode.value);};CodeMap.prototype.deleteCode=function(start){var removedNode=this.dynamics_.remove(start);};CodeMap.prototype.addLibrary=function(start,codeEntry){this.markPages_(start,start+codeEntry.size);this.libraries_.insert(start,codeEntry);};CodeMap.prototype.addStaticCode=function(start,codeEntry){this.statics_.insert(start,codeEntry);};CodeMap.prototype.markPages_=function(start,end){for(var addr=start;addr<=end;addr+=CodeMap.PAGE_SIZE){this.pages_[addr>>>CodeMap.PAGE_ALIGNMENT]=1;}};CodeMap.prototype.deleteAllCoveredNodes_=function(tree,start,end){var to_delete=[];var addr=end-1;while(addr>=start){var node=tree.findGreatestLessThan(addr);if(!node)break;var start2=node.key,end2=start2+node.value.size;if(start2<end&&start<end2)to_delete.push(start2);addr=start2-1;}
+for(var i=0,l=to_delete.length;i<l;++i)tree.remove(to_delete[i]);};CodeMap.prototype.isAddressBelongsTo_=function(addr,node){return addr>=node.key&&addr<(node.key+node.value.size);};CodeMap.prototype.findInTree_=function(tree,addr){var node=tree.findGreatestLessThan(addr);return node&&this.isAddressBelongsTo_(addr,node)?node.value:null;};CodeMap.prototype.findEntry=function(addr){var pageAddr=addr>>>CodeMap.PAGE_ALIGNMENT;if(pageAddr in this.pages_){return this.findInTree_(this.statics_,addr)||this.findInTree_(this.libraries_,addr);}
+var min=this.dynamics_.findMin();var max=this.dynamics_.findMax();if(max!=null&&addr<(max.key+max.value.size)&&addr>=min.key){var dynaEntry=this.findInTree_(this.dynamics_,addr);if(dynaEntry==null)return null;if(!dynaEntry.nameUpdated_){dynaEntry.name=this.dynamicsNameGen_.getName(dynaEntry.name);dynaEntry.nameUpdated_=true;}
+return dynaEntry;}
+return null;};CodeMap.prototype.findDynamicEntryByStartAddress=function(addr){var node=this.dynamics_.find(addr);return node?node.value:null;};CodeMap.prototype.getAllDynamicEntries=function(){return this.dynamics_.exportValues();};CodeMap.prototype.getAllDynamicEntriesWithAddresses=function(){return this.dynamics_.exportKeysAndValues();};CodeMap.prototype.getAllStaticEntries=function(){return this.statics_.exportValues();};CodeMap.prototype.getAllLibrariesEntries=function(){return this.libraries_.exportValues();};CodeMap.CodeEntry=function(size,opt_name){this.id=tr.b.GUID.allocate();this.size=size;this.name=opt_name||'';this.nameUpdated_=false;};CodeMap.CodeEntry.prototype.getName=function(){return this.name;};CodeMap.CodeEntry.prototype.toString=function(){return this.name+': '+this.size.toString(16);};CodeMap.NameGenerator=function(){this.knownNames_={};};CodeMap.NameGenerator.prototype.getName=function(name){if(!(name in this.knownNames_)){this.knownNames_[name]=0;return name;}
+var count=++this.knownNames_[name];return name+' {'+count+'}';};return{CodeMap:CodeMap};});'use strict';tr.exportTo('tr.e.importer.v8',function(){function CsvParser(){};CsvParser.CSV_FIELD_RE_=/^"((?:[^"]|"")*)"|([^,]*)/;CsvParser.DOUBLE_QUOTE_RE_=/""/g;CsvParser.prototype.parseLine=function(line){var fieldRe=CsvParser.CSV_FIELD_RE_;var doubleQuoteRe=CsvParser.DOUBLE_QUOTE_RE_;var pos=0;var endPos=line.length;var fields=[];if(endPos>0){do{var fieldMatch=fieldRe.exec(line.substr(pos));if(typeof fieldMatch[1]==='string'){var field=fieldMatch[1];pos+=field.length+3;fields.push(field.replace(doubleQuoteRe,'"'));}else{var field=fieldMatch[2];pos+=field.length+1;fields.push(field);}}while(pos<=endPos);}
+return fields;};function LogReader(dispatchTable){this.dispatchTable_=dispatchTable;this.lineNum_=0;this.csvParser_=new CsvParser();};LogReader.prototype.printError=function(str){};LogReader.prototype.processLogChunk=function(chunk){this.processLog_(chunk.split('\n'));};LogReader.prototype.processLogLine=function(line){this.processLog_([line]);};LogReader.prototype.processStack=function(pc,func,stack){var fullStack=func?[pc,func]:[pc];var prevFrame=pc;for(var i=0,n=stack.length;i<n;++i){var frame=stack[i];var firstChar=frame.charAt(0);if(firstChar=='+'||firstChar=='-'){prevFrame+=parseInt(frame,16);fullStack.push(prevFrame);}else if(firstChar!='o'){fullStack.push(parseInt(frame,16));}}
+return fullStack;};LogReader.prototype.skipDispatch=function(dispatch){return false;};LogReader.prototype.dispatchLogRow_=function(fields){var command=fields[0];if(!(command in this.dispatchTable_))return;var dispatch=this.dispatchTable_[command];if(dispatch===null||this.skipDispatch(dispatch)){return;}
+var parsedFields=[];for(var i=0;i<dispatch.parsers.length;++i){var parser=dispatch.parsers[i];if(parser===null){parsedFields.push(fields[1+i]);}else if(typeof parser=='function'){parsedFields.push(parser(fields[1+i]));}else{parsedFields.push(fields.slice(1+i));break;}}
+dispatch.processor.apply(this,parsedFields);};LogReader.prototype.processLog_=function(lines){for(var i=0,n=lines.length;i<n;++i,++this.lineNum_){var line=lines[i];if(!line){continue;}
+try{var fields=this.csvParser_.parseLine(line);this.dispatchLogRow_(fields);}catch(e){this.printError('line '+(this.lineNum_+1)+': '+
+(e.message||e));}}};return{LogReader:LogReader};});'use strict';tr.exportTo('tr.e.importer.v8',function(){var ColorScheme=tr.b.ColorScheme;function V8LogImporter(model,eventData){this.importPriority=3;this.model_=model;this.logData_=eventData;this.code_map_=new tr.e.importer.v8.CodeMap();this.v8_timer_thread_=undefined;this.v8_thread_=undefined;this.root_stack_frame_=new tr.model.StackFrame(undefined,'v8-root-stack-frame','v8-root-stack-frame',0);this.v8_stack_timeline_=new Array();}
+var kV8BinarySuffixes=['/d8','/libv8.so'];var TimerEventDefaultArgs={'V8.Execute':{pause:false,no_execution:false},'V8.External':{pause:false,no_execution:true},'V8.CompileFullCode':{pause:true,no_execution:true},'V8.RecompileSynchronous':{pause:true,no_execution:true},'V8.RecompileParallel':{pause:false,no_execution:false},'V8.CompileEval':{pause:true,no_execution:true},'V8.Parse':{pause:true,no_execution:true},'V8.PreParse':{pause:true,no_execution:true},'V8.ParseLazy':{pause:true,no_execution:true},'V8.GCScavenger':{pause:true,no_execution:true},'V8.GCCompactor':{pause:true,no_execution:true},'V8.GCContext':{pause:true,no_execution:true}};V8LogImporter.canImport=function(eventData){if(typeof(eventData)!=='string'&&!(eventData instanceof String))
+return false;return eventData.substring(0,11)=='v8-version,'||eventData.substring(0,12)=='timer-event,'||eventData.substring(0,5)=='tick,'||eventData.substring(0,15)=='shared-library,'||eventData.substring(0,9)=='profiler,'||eventData.substring(0,14)=='code-creation,';};V8LogImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'V8LogImporter';},processTimerEvent_:function(name,start,length){var args=TimerEventDefaultArgs[name];if(args===undefined)return;start/=1000;length/=1000;var colorId=ColorScheme.getColorIdForGeneralPurposeString(name);var slice=new tr.model.Slice('v8',name,colorId,start,args,length);this.v8_timer_thread_.sliceGroup.pushSlice(slice);},processTimerEventStart_:function(name,start){var args=TimerEventDefaultArgs[name];if(args===undefined)return;start/=1000;this.v8_timer_thread_.sliceGroup.beginSlice('v8',name,start,args);},processTimerEventEnd_:function(name,end){end/=1000;this.v8_timer_thread_.sliceGroup.endSlice(end);},processCodeCreateEvent_:function(type,kind,address,size,name){var code_entry=new tr.e.importer.v8.CodeMap.CodeEntry(size,name);code_entry.kind=kind;this.code_map_.addCode(address,code_entry);},processCodeMoveEvent_:function(from,to){this.code_map_.moveCode(from,to);},processCodeDeleteEvent_:function(address){this.code_map_.deleteCode(address);},processSharedLibrary_:function(name,start,end){var code_entry=new tr.e.importer.v8.CodeMap.CodeEntry(end-start,name);code_entry.kind=-3;for(var i=0;i<kV8BinarySuffixes.length;i++){var suffix=kV8BinarySuffixes[i];if(name.indexOf(suffix,name.length-suffix.length)>=0){code_entry.kind=-1;break;}}
+this.code_map_.addLibrary(start,code_entry);},findCodeKind_:function(kind){for(name in CodeKinds){if(CodeKinds[name].kinds.indexOf(kind)>=0){return CodeKinds[name];}}},processTickEvent_:function(pc,start,unused_x,unused_y,vmstate,stack){start/=1000;function findChildWithEntryID(stackFrame,entryID){for(var i=0;i<stackFrame.children.length;i++){if(stackFrame.children[i].entryID==entryID)
+return stackFrame.children[i];}
+return undefined;}
+var lastStackFrame;if(stack&&stack.length){lastStackFrame=this.root_stack_frame_;stack=stack.reverse();for(var i=0;i<stack.length;i++){if(!stack[i])
+break;var entry=this.code_map_.findEntry(stack[i]);var entryID=entry?entry.id:'Unknown';var childFrame=findChildWithEntryID(lastStackFrame,entryID);if(childFrame===undefined){var entryName=entry?entry.name:'Unknown';lastStackFrame=new tr.model.StackFrame(lastStackFrame,'v8sf-'+tr.b.GUID.allocate(),entryName,ColorScheme.getColorIdForGeneralPurposeString(entryName));lastStackFrame.entryID=entryID;this.model_.addStackFrame(lastStackFrame);}else{lastStackFrame=childFrame;}}}else{var pcEntry=this.code_map_.findEntry(pc);var pcEntryID='v8pc-'+(pcEntry?pcEntry.id:'Unknown');if(this.model_.stackFrames[pcEntryID]===undefined){var pcEntryName=pcEntry?pcEntry.name:'Unknown';lastStackFrame=new tr.model.StackFrame(undefined,pcEntryID,pcEntryName,ColorScheme.getColorIdForGeneralPurposeString(pcEntryName));this.model_.addStackFrame(lastStackFrame);}
+lastStackFrame=this.model_.stackFrames[pcEntryID];}
+var sample=new tr.model.Sample(undefined,this.v8_thread_,'V8 PC',start,lastStackFrame,1);this.model_.samples.push(sample);},processDistortion_:function(distortion_in_picoseconds){distortion_per_entry=distortion_in_picoseconds/1000000;},processPlotRange_:function(start,end){xrange_start_override=start;xrange_end_override=end;},processV8Version_:function(major,minor,build,patch,candidate){},importEvents:function(){var logreader=new tr.e.importer.v8.LogReader({'timer-event':{parsers:[null,parseInt,parseInt],processor:this.processTimerEvent_.bind(this)},'shared-library':{parsers:[null,parseInt,parseInt],processor:this.processSharedLibrary_.bind(this)},'timer-event-start':{parsers:[null,parseInt],processor:this.processTimerEventStart_.bind(this)},'timer-event-end':{parsers:[null,parseInt],processor:this.processTimerEventEnd_.bind(this)},'code-creation':{parsers:[null,parseInt,parseInt,parseInt,null],processor:this.processCodeCreateEvent_.bind(this)},'code-move':{parsers:[parseInt,parseInt],processor:this.processCodeMoveEvent_.bind(this)},'code-delete':{parsers:[parseInt],processor:this.processCodeDeleteEvent_.bind(this)},'tick':{parsers:[parseInt,parseInt,null,null,parseInt,'var-args'],processor:this.processTickEvent_.bind(this)},'distortion':{parsers:[parseInt],processor:this.processDistortion_.bind(this)},'plot-range':{parsers:[parseInt,parseInt],processor:this.processPlotRange_.bind(this)},'v8-version':{parsers:[parseInt,parseInt,parseInt,parseInt,parseInt],processor:this.processV8Version_.bind(this)}});this.v8_timer_thread_=this.model_.getOrCreateProcess(-32).getOrCreateThread(1);this.v8_timer_thread_.name='V8 Timers';this.v8_thread_=this.model_.getOrCreateProcess(-32).getOrCreateThread(2);this.v8_thread_.name='V8';var lines=this.logData_.split('\n');for(var i=0;i<lines.length;i++){logreader.processLogLine(lines[i]);}
+this.root_stack_frame_.removeAllChildren();function addSlices(slices,thread){for(var i=0;i<slices.length;i++){var duration=slices[i].end-slices[i].start;var slice=new tr.model.Slice('v8',slices[i].name,ColorScheme.getColorIdForGeneralPurposeString(slices[i].name),slices[i].start,{},duration);thread.sliceGroup.pushSlice(slice);addSlices(slices[i].children,thread);}}
+addSlices(this.v8_stack_timeline_,this.v8_thread_);}};tr.importer.Importer.register(V8LogImporter);return{V8LogImporter:V8LogImporter};});'use strict';tr.exportTo('tr.e.importer',function(){function ZipImporter(model,eventData){if(eventData instanceof ArrayBuffer)
+eventData=new Uint8Array(eventData);this.model_=model;this.eventData_=eventData;}
+ZipImporter.canImport=function(eventData){var header;if(eventData instanceof ArrayBuffer)
+header=new Uint8Array(eventData.slice(0,2));else if(typeof(eventData)==='string'||eventData instanceof String)
+header=[eventData.charCodeAt(0),eventData.charCodeAt(1)];else
+return false;return header[0]==='P'.charCodeAt(0)&&header[1]==='K'.charCodeAt(0);};ZipImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'ZipImporter';},isTraceDataContainer:function(){return true;},extractSubtraces:function(){var zip=new JSZip(this.eventData_);var subtraces=[];for(var idx in zip.files)
+subtraces.push(zip.files[idx].asBinary());return subtraces;}};tr.importer.Importer.register(ZipImporter);return{ZipImporter:ZipImporter};});'use strict';tr.exportTo('tr.model.source_info',function(){function SourceInfo(file,opt_line,opt_column){this.file_=file;this.line_=opt_line||-1;this.column_=opt_column||-1;}
+SourceInfo.prototype={get file(){return this.file_;},get line(){return this.line_;},get column(){return this.column_;},get domain(){if(!this.file_)
+return undefined;var domain=this.file_.match(/(.*:\/\/[^:\/]*)/i);return domain?domain[1]:undefined;},toString:function(){var str='';if(this.file_)
+str+=this.file_;if(this.line_>0)
+str+=':'+this.line_;if(this.column_>0)
+str+=':'+this.column_;return str;}};return{SourceInfo:SourceInfo};});'use strict';tr.exportTo('tr.model.source_info',function(){function JSSourceInfo(file,line,column,isNative,scriptId,state){tr.model.source_info.SourceInfo.call(this,file,line,column);this.isNative_=isNative;this.scriptId_=scriptId;this.state_=state;}
+JSSourceInfo.prototype={__proto__:tr.model.source_info.SourceInfo.prototype,get state(){return this.state_;},get isNative(){return this.isNative_;},get scriptId(){return this.scriptId_;},toString:function(){var str=this.isNative_?'[native v8] ':'';return str+
+tr.model.source_info.SourceInfo.prototype.toString.call(this);}};return{JSSourceInfo:JSSourceInfo,JSSourceState:{COMPILED:'compiled',OPTIMIZABLE:'optimizable',OPTIMIZED:'optimized',UNKNOWN:'unknown'}};});'use strict';tr.exportTo('tr.e.importer',function(){function TraceCodeEntry(address,size,name,scriptId){this.id_=tr.b.GUID.allocate();this.address_=address;this.size_=size;var rePrefix=/^(\w*:)?([*~]?)(.*)$/m;var tokens=rePrefix.exec(name);var prefix=tokens[1];var state=tokens[2];var body=tokens[3];if(state==='*'){state=tr.model.source_info.JSSourceState.OPTIMIZED;}else if(state==='~'){state=tr.model.source_info.JSSourceState.OPTIMIZABLE;}else if(state===''){state=tr.model.source_info.JSSourceState.COMPILED;}else{console.warning('Unknown v8 code state '+state);state=tr.model.source_info.JSSourceState.UNKNOWN;}
+var rawName;var rawUrl;if(prefix==='Script:'){rawName='';rawUrl=body;}else{var spacePos=body.lastIndexOf(' ');rawName=spacePos!==-1?body.substr(0,spacePos):body;rawUrl=spacePos!==-1?body.substr(spacePos+1):'';}
+function splitLineAndColumn(url){var lineColumnRegEx=/(?::(\d+))?(?::(\d+))?$/;var lineColumnMatch=lineColumnRegEx.exec(url);var lineNumber;var columnNumber;if(typeof(lineColumnMatch[1])==='string'){lineNumber=parseInt(lineColumnMatch[1],10);lineNumber=isNaN(lineNumber)?undefined:lineNumber-1;}
+if(typeof(lineColumnMatch[2])==='string'){columnNumber=parseInt(lineColumnMatch[2],10);columnNumber=isNaN(columnNumber)?undefined:columnNumber-1;}
+return{url:url.substring(0,url.length-lineColumnMatch[0].length),lineNumber:lineNumber,columnNumber:columnNumber};}
+var nativeSuffix=' native';var isNative=rawName.endsWith(nativeSuffix);this.name_=isNative?rawName.slice(0,-nativeSuffix.length):rawName;var urlData=splitLineAndColumn(rawUrl);var url=urlData.url||'';var line=urlData.lineNumber||0;var column=urlData.columnNumber||0;this.sourceInfo_=new tr.model.source_info.JSSourceInfo(url,line,column,isNative,scriptId,state);};TraceCodeEntry.prototype={get id(){return this.id_;},get sourceInfo(){return this.sourceInfo_;},get name(){return this.name_;},set address(address){this.address_=address;},get address(){return this.address_;},set size(size){this.size_=size;},get size(){return this.size_;}};return{TraceCodeEntry:TraceCodeEntry};});'use strict';tr.exportTo('tr.e.importer',function(){function TraceCodeMap(){this.banks_=new Map();}
+TraceCodeMap.prototype={addEntry:function(addressHex,size,name,scriptId){var entry=new tr.e.importer.TraceCodeEntry(this.getAddress_(addressHex),size,name,scriptId);this.addEntry_(addressHex,entry);},moveEntry:function(oldAddressHex,newAddressHex,size){var entry=this.getBank_(oldAddressHex).removeEntry(this.getAddress_(oldAddressHex));if(!entry)
+return;entry.address=this.getAddress_(newAddressHex);entry.size=size;this.addEntry_(newAddressHex,entry);},lookupEntry:function(addressHex){return this.getBank_(addressHex).lookupEntry(this.getAddress_(addressHex));},addEntry_:function(addressHex,entry){this.getBank_(addressHex).addEntry(entry);},getAddress_:function(addressHex){var bankSizeHexDigits=13;addressHex=addressHex.slice(2);return parseInt(addressHex.slice(-bankSizeHexDigits),16);},getBank_:function(addressHex){addressHex=addressHex.slice(2);var bankSizeHexDigits=13;var maxHexDigits=16;var bankName=addressHex.slice(-maxHexDigits,-bankSizeHexDigits);var bank=this.banks_.get(bankName);if(!bank){bank=new TraceCodeBank();this.banks_.set(bankName,bank);}
+return bank;}};function TraceCodeBank(){this.entries_=[];}
+TraceCodeBank.prototype={removeEntry:function(address){if(this.entries_.length===0)
+return undefined;var index=tr.b.findLowIndexInSortedArray(this.entries_,function(entry){return entry.address;},address);var entry=this.entries_[index];if(!entry||entry.address!==address)
+return undefined;this.entries_.splice(index,1);return entry;},lookupEntry:function(address){var index=tr.b.findHighIndexInSortedArray(this.entries_,function(e){return address-e.address;})-1;var entry=this.entries_[index];return entry&&address<entry.address+entry.size?entry:undefined;},addEntry:function(newEntry){if(this.entries_.length===0)
+this.entries_.push(newEntry);var endAddress=newEntry.address+newEntry.size;var lastIndex=tr.b.findLowIndexInSortedArray(this.entries_,function(entry){return entry.address;},endAddress);var index;for(index=lastIndex-1;index>=0;--index){var entry=this.entries_[index];var entryEndAddress=entry.address+entry.size;if(entryEndAddress<=newEntry.address)
+break;}
+++index;this.entries_.splice(index,lastIndex-index,newEntry);}};return{TraceCodeMap:TraceCodeMap};});'use strict';tr.exportTo('tr.model',function(){function ClockSyncRecord(syncId,start,args){this.syncId_=syncId;this.start_=start;this.args_=args;};ClockSyncRecord.prototype={get syncId(){return this.syncId_;},get start(){return this.start_;},set start(value){this.start_=value;},get args(){return this.args_;}};function InstantClockSyncRecord(syncId,start,args){ClockSyncRecord.call(this,syncId,start,args);};InstantClockSyncRecord.prototype={__proto__:ClockSyncRecord.prototype};function PingPongClockSyncRecord(syncId,start,duration,args){ClockSyncRecord.call(this,syncId,start,args);this.duration_=duration;};PingPongClockSyncRecord.prototype={__proto__:ClockSyncRecord.prototype,get duration(){return this.duration_;},set duration(value){this.duration_=value;},};return{InstantClockSyncRecord:InstantClockSyncRecord,PingPongClockSyncRecord:PingPongClockSyncRecord};});'use strict';tr.exportTo('tr.model',function(){function YComponent(stableId,yPercentOffset){this.stableId=stableId;this.yPercentOffset=yPercentOffset;}
+YComponent.prototype={toDict:function(){return{stableId:this.stableId,yPercentOffset:this.yPercentOffset};}};function Location(xWorld,yComponents){this.xWorld_=xWorld;this.yComponents_=yComponents;};Location.fromViewCoordinates=function(viewport,viewX,viewY){var dt=viewport.currentDisplayTransform;var xWorld=dt.xViewToWorld(viewX);var yComponents=[];var elem=document.elementFromPoint(viewX+viewport.modelTrackContainer.canvas.offsetLeft,viewY+viewport.modelTrackContainer.canvas.offsetTop);while(elem instanceof tr.ui.tracks.Track){if(elem.eventContainer){var boundRect=elem.getBoundingClientRect();var yPercentOffset=(viewY-boundRect.top)/boundRect.height;yComponents.push(new YComponent(elem.eventContainer.stableId,yPercentOffset));}
+elem=elem.parentElement;}
+if(yComponents.length==0)
+return;return new Location(xWorld,yComponents);}
+Location.fromStableIdAndTimestamp=function(viewport,stableId,ts){var xWorld=ts;var yComponents=[];var containerToTrack=viewport.containerToTrackMap;var elem=containerToTrack.getTrackByStableId(stableId);if(!elem)
+return;var firstY=elem.getBoundingClientRect().top;while(elem instanceof tr.ui.tracks.Track){if(elem.eventContainer){var boundRect=elem.getBoundingClientRect();var yPercentOffset=(firstY-boundRect.top)/boundRect.height;yComponents.push(new YComponent(elem.eventContainer.stableId,yPercentOffset));}
+elem=elem.parentElement;}
+if(yComponents.length==0)
+return;return new Location(xWorld,yComponents);}
+Location.prototype={get xWorld(){return this.xWorld_;},getContainingTrack:function(viewport){var containerToTrack=viewport.containerToTrackMap;for(var i in this.yComponents_){var yComponent=this.yComponents_[i];var track=containerToTrack.getTrackByStableId(yComponent.stableId);if(track!==undefined)
+return track;}},toViewCoordinates:function(viewport){var dt=viewport.currentDisplayTransform;var containerToTrack=viewport.containerToTrackMap;var viewX=dt.xWorldToView(this.xWorld_);var viewY=-1;for(var index in this.yComponents_){var yComponent=this.yComponents_[index];var track=containerToTrack.getTrackByStableId(yComponent.stableId);if(track!==undefined){var boundRect=track.getBoundingClientRect();viewY=yComponent.yPercentOffset*boundRect.height+boundRect.top;break;}}
+return{viewX:viewX,viewY:viewY};},toDict:function(){return{xWorld:this.xWorld_,yComponents:this.yComponents_};}};return{Location:Location};});'use strict';tr.exportTo('tr.model',function(){function Annotation(){this.guid_=tr.b.GUID.allocate();this.view_=undefined;};Annotation.fromDictIfPossible=function(args){if(args.typeName===undefined)
+throw new Error('Missing typeName argument');var typeInfo=Annotation.findTypeInfoMatching(function(typeInfo){return typeInfo.metadata.typeName===args.typeName;});if(typeInfo===undefined)
+return undefined;return typeInfo.constructor.fromDict(args);};Annotation.fromDict=function(){throw new Error('Not implemented');}
+Annotation.prototype={get guid(){return this.guid_;},onRemove:function(){},toDict:function(){throw new Error('Not implemented');},getOrCreateView:function(viewport){if(!this.view_)
+this.view_=this.createView_(viewport);return this.view_;},createView_:function(){throw new Error('Not implemented');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);tr.b.decorateExtensionRegistry(Annotation,options);Annotation.addEventListener('will-register',function(e){if(!e.typeInfo.constructor.hasOwnProperty('fromDict'))
+throw new Error('Must have fromDict method');if(!e.typeInfo.metadata.typeName)
+throw new Error('Registered Annotations must provide typeName');});return{Annotation:Annotation};});'use strict';tr.exportTo('tr.ui.annotations',function(){function AnnotationView(viewport,annotation){}
+AnnotationView.prototype={draw:function(ctx){throw new Error('Not implemented');}};return{AnnotationView:AnnotationView};});'use strict';tr.exportTo('tr.ui.annotations',function(){function RectAnnotationView(viewport,annotation){this.viewport_=viewport;this.annotation_=annotation;}
+RectAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,draw:function(ctx){var dt=this.viewport_.currentDisplayTransform;var startCoords=this.annotation_.startLocation.toViewCoordinates(this.viewport_);var endCoords=this.annotation_.endLocation.toViewCoordinates(this.viewport_);var startY=startCoords.viewY-ctx.canvas.getBoundingClientRect().top;var sizeY=endCoords.viewY-startCoords.viewY;if(startY+sizeY<0){startY=sizeY;}else if(startY<0){startY=0;}
+ctx.fillStyle=this.annotation_.fillStyle;ctx.fillRect(startCoords.viewX,startY,endCoords.viewX-startCoords.viewX,sizeY);}};return{RectAnnotationView:RectAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function RectAnnotation(start,end){tr.model.Annotation.apply(this,arguments);this.startLocation_=start;this.endLocation_=end;this.fillStyle='rgba(255, 180, 0, 0.3)';}
+RectAnnotation.fromDict=function(dict){var args=dict.args;var startLoc=new tr.model.Location(args.start.xWorld,args.start.yComponents);var endLoc=new tr.model.Location(args.end.xWorld,args.end.yComponents);return new tr.model.RectAnnotation(startLoc,endLoc);}
+RectAnnotation.prototype={__proto__:tr.model.Annotation.prototype,get startLocation(){return this.startLocation_;},get endLocation(){return this.endLocation_;},toDict:function(){return{typeName:'rect',args:{start:this.startLocation.toDict(),end:this.endLocation.toDict()}};},createView_:function(viewport){return new tr.ui.annotations.RectAnnotationView(viewport,this);}};tr.model.Annotation.register(RectAnnotation,{typeName:'rect'});return{RectAnnotation:RectAnnotation};});'use strict';tr.exportTo('tr.ui.annotations',function(){function CommentBoxAnnotationView(viewport,annotation){this.viewport_=viewport;this.annotation_=annotation;this.textArea_=undefined;this.styleWidth=250;this.styleHeight=50;this.fontSize=10;this.rightOffset=50;this.topOffset=25;}
+CommentBoxAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,removeTextArea:function(){this.textArea_.parentNode.removeChild(this.textArea_);},draw:function(ctx){var coords=this.annotation_.location.toViewCoordinates(this.viewport_);if(coords.viewX<0){if(this.textArea_)
+this.textArea_.style.visibility='hidden';return;}
+if(!this.textArea_){this.textArea_=document.createElement('textarea');this.textArea_.style.position='absolute';this.textArea_.readOnly=true;this.textArea_.value=this.annotation_.text;this.textArea_.style.zIndex=1;ctx.canvas.parentNode.appendChild(this.textArea_);}
+this.textArea_.style.width=this.styleWidth+'px';this.textArea_.style.height=this.styleHeight+'px';this.textArea_.style.fontSize=this.fontSize+'px';this.textArea_.style.visibility='visible';this.textArea_.style.left=coords.viewX+ctx.canvas.getBoundingClientRect().left+
+this.rightOffset+'px';this.textArea_.style.top=coords.viewY-ctx.canvas.getBoundingClientRect().top-
+this.topOffset+'px';ctx.strokeStyle='rgb(0, 0, 0)';ctx.lineWidth=2;ctx.beginPath();tr.ui.b.drawLine(ctx,coords.viewX,coords.viewY-ctx.canvas.getBoundingClientRect().top,coords.viewX+this.rightOffset,coords.viewY-this.topOffset-
+ctx.canvas.getBoundingClientRect().top);ctx.stroke();}};return{CommentBoxAnnotationView:CommentBoxAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function CommentBoxAnnotation(location,text){tr.model.Annotation.apply(this,arguments);this.location=location;this.text=text;}
+CommentBoxAnnotation.fromDict=function(dict){var args=dict.args;var location=new tr.model.Location(args.location.xWorld,args.location.yComponents);return new tr.model.CommentBoxAnnotation(location,args.text);};CommentBoxAnnotation.prototype={__proto__:tr.model.Annotation.prototype,onRemove:function(){this.view_.removeTextArea();},toDict:function(){return{typeName:'comment_box',args:{text:this.text,location:this.location.toDict()}};},createView_:function(viewport){return new tr.ui.annotations.CommentBoxAnnotationView(viewport,this);}};tr.model.Annotation.register(CommentBoxAnnotation,{typeName:'comment_box'});return{CommentBoxAnnotation:CommentBoxAnnotation};});'use strict';tr.exportTo('tr.model',function(){function HeapEntry(heapDump,leafStackFrame,objectTypeName,size){this.heapDump=heapDump;this.leafStackFrame=leafStackFrame;this.objectTypeName=objectTypeName;this.size=size;}
+function HeapDump(processMemoryDump,allocatorName){this.processMemoryDump=processMemoryDump;this.allocatorName=allocatorName;this.entries=[];}
+HeapDump.prototype={addEntry:function(leafStackFrame,objectTypeName,size){var entry=new HeapEntry(this,leafStackFrame,objectTypeName,size);this.entries.push(entry);return entry;}};return{HeapEntry:HeapEntry,HeapDump:HeapDump};});'use strict';tr.exportTo('tr.model',function(){function ScopedId(scope,id){if(scope===undefined){throw new Error('Scope should be defined. Use \''+
+tr.model.OBJECT_DEFAULT_SCOPE+'\' as the default scope.');}
+this.scope=scope;this.id=id;}
+ScopedId.prototype={toString:function(){return'{scope: '+this.scope+', id: '+this.id+'}';}};return{ScopedId:ScopedId};});'use strict';tr.exportTo('tr.ui.annotations',function(){function XMarkerAnnotationView(viewport,annotation){this.viewport_=viewport;this.annotation_=annotation;}
+XMarkerAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,draw:function(ctx){var dt=this.viewport_.currentDisplayTransform;var viewX=dt.xWorldToView(this.annotation_.timestamp);ctx.beginPath();tr.ui.b.drawLine(ctx,viewX,0,viewX,ctx.canvas.height);ctx.strokeStyle=this.annotation_.strokeStyle;ctx.stroke();}};return{XMarkerAnnotationView:XMarkerAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function XMarkerAnnotation(timestamp){tr.model.Annotation.apply(this,arguments);this.timestamp=timestamp;this.strokeStyle='rgba(0, 0, 255, 0.5)';}
+XMarkerAnnotation.fromDict=function(dict){return new XMarkerAnnotation(dict.args.timestamp);}
+XMarkerAnnotation.prototype={__proto__:tr.model.Annotation.prototype,toDict:function(){return{typeName:'xmarker',args:{timestamp:this.timestamp}};},createView_:function(viewport){return new tr.ui.annotations.XMarkerAnnotationView(viewport,this);}};tr.model.Annotation.register(XMarkerAnnotation,{typeName:'xmarker'});return{XMarkerAnnotation:XMarkerAnnotation};});'use strict';tr.exportTo('tr.e.importer',function(){var Base64=tr.b.Base64;var deepCopy=tr.b.deepCopy;var ColorScheme=tr.b.ColorScheme;function getEventColor(event,opt_customName){if(event.cname)
+return ColorScheme.getColorIdForReservedName(event.cname);else if(opt_customName||event.name){return ColorScheme.getColorIdForGeneralPurposeString(opt_customName||event.name);}}
+var timestampFromUs=tr.v.Unit.timestampFromUs;var maybeTimestampFromUs=tr.v.Unit.maybeTimestampFromUs;var PRODUCER='producer';var CONSUMER='consumer';var STEP='step';var LIGHT=tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;var DETAILED=tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;var MEMORY_DUMP_LEVEL_OF_DETAIL_ORDER=[undefined,LIGHT,DETAILED];var GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX='global/';var BYTE_STAT_NAME_MAP={'pc':'privateCleanResident','pd':'privateDirtyResident','sc':'sharedCleanResident','sd':'sharedDirtyResident','pss':'proportionalResident','sw':'swapped'};var WEAK_MEMORY_ALLOCATOR_DUMP_FLAG=1<<0;var OBJECT_TYPE_NAME_PATTERNS=[{prefix:'const char *WTF::getStringWithTypeName() [T = ',suffix:']'},{prefix:'const char* WTF::getStringWithTypeName() [with T = ',suffix:']'},{prefix:'const char *__cdecl WTF::getStringWithTypeName<',suffix:'>(void)'}];function TraceEventImporter(model,eventData){this.importPriority=1;this.model_=model;this.events_=undefined;this.sampleEvents_=undefined;this.stackFrameEvents_=undefined;this.systemTraceEvents_=undefined;this.battorData_=undefined;this.eventsWereFromString_=false;this.softwareMeasuredCpuCount_=undefined;this.allAsyncEvents_=[];this.allFlowEvents_=[];this.allObjectEvents_=[];this.traceEventSampleStackFramesByName_={};this.v8ProcessCodeMaps_={};this.v8ProcessRootStackFrame_={};this.v8SamplingData_=[];this.allMemoryDumpEvents_={};this.objectTypeNameMap_={};this.clockDomainId_=tr.model.ClockDomainId.TRACE_EVENT_IMPORTER;if(typeof(eventData)==='string'||eventData instanceof String){eventData=eventData.trim();if(eventData[0]==='['){eventData=eventData.replace(/\s*,\s*$/,'');if(eventData[eventData.length-1]!==']')
+eventData=eventData+']';}
+this.events_=JSON.parse(eventData);this.eventsWereFromString_=true;}else{this.events_=eventData;}
+this.traceAnnotations_=this.events_.traceAnnotations;if(this.events_.traceEvents){var container=this.events_;this.events_=this.events_.traceEvents;this.systemTraceEvents_=container.systemTraceEvents;this.battorData_=container.powerTraceAsString;this.sampleEvents_=container.samples;this.stackFrameEvents_=container.stackFrames;if(container.displayTimeUnit){var unitName=container.displayTimeUnit;var unit=tr.v.TimeDisplayModes[unitName];if(unit===undefined){throw new Error('Unit '+unitName+' is not supported.');}
+this.model_.intrinsicTimeUnit=unit;}
+var knownFieldNames={powerTraceAsString:true,samples:true,stackFrames:true,systemTraceEvents:true,traceAnnotations:true,traceEvents:true};for(var fieldName in container){if(fieldName in knownFieldNames)
+continue;this.model_.metadata.push({name:fieldName,value:container[fieldName]});if(fieldName==='metadata'){var metadata=container[fieldName];if(metadata['highres-ticks'])
+this.model_.isTimeHighResolution=metadata['highres-ticks'];if(metadata['clock-domain'])
+this.clockDomainId_=metadata['clock-domain'];}}}}
+TraceEventImporter.canImport=function(eventData){if(typeof(eventData)==='string'||eventData instanceof String){eventData=eventData.trim();return eventData[0]==='{'||eventData[0]==='[';}
+if(eventData instanceof Array&&eventData.length&&eventData[0].ph)
+return true;if(eventData.traceEvents){if(eventData.traceEvents instanceof Array){if(eventData.traceEvents.length&&eventData.traceEvents[0].ph)
+return true;if(eventData.samples.length&&eventData.stackFrames!==undefined)
+return true;}}
+return false;};TraceEventImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'TraceEventImporter';},extractSubtraces:function(){var systemEventsTmp=this.systemTraceEvents_;var battorDataTmp=this.battorData_;this.systemTraceEvents_=undefined;this.battorData_=undefined;var subTraces=systemEventsTmp?[systemEventsTmp]:[];if(battorDataTmp)
+subTraces.push(battorDataTmp);return subTraces;},deepCopyIfNeeded_:function(obj){if(obj===undefined)
+obj={};if(this.eventsWereFromString_)
+return obj;return deepCopy(obj);},deepCopyAlways_:function(obj){if(obj===undefined)
+obj={};return deepCopy(obj);},processAsyncEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allAsyncEvents_.push({sequenceNumber:this.allAsyncEvents_.length,event:event,thread:thread});},processFlowEvent:function(event,opt_slice){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allFlowEvents_.push({refGuid:tr.b.GUID.getLastGuid(),sequenceNumber:this.allFlowEvents_.length,event:event,slice:opt_slice,thread:thread});},processCounterEvent:function(event){var ctr_name;if(event.id!==undefined)
+ctr_name=event.name+'['+event.id+']';else
+ctr_name=event.name;var ctr=this.model_.getOrCreateProcess(event.pid).getOrCreateCounter(event.cat,ctr_name);var reservedColorId=event.cname?getEventColor(event):undefined;if(ctr.numSeries===0){for(var seriesName in event.args){var colorId=reservedColorId||getEventColor(event,ctr.name+'.'+seriesName);ctr.addSeries(new tr.model.CounterSeries(seriesName,colorId));}
+if(ctr.numSeries===0){this.model_.importWarning({type:'counter_parse_error',message:'Expected counter '+event.name+' to have at least one argument to use as a value.'});delete ctr.parent.counters[ctr.name];return;}}
+var ts=timestampFromUs(event.ts);ctr.series.forEach(function(series){var val=event.args[series.name]?event.args[series.name]:0;series.addCounterSample(ts,val);});},processObjectEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allObjectEvents_.push({sequenceNumber:this.allObjectEvents_.length,event:event,thread:thread});},processDurationEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);var ts=timestampFromUs(event.ts);if(!thread.sliceGroup.isTimestampValidForBeginOrEnd(ts)){this.model_.importWarning({type:'duration_parse_error',message:'Timestamps are moving backward.'});return;}
+if(event.ph==='B'){var slice=thread.sliceGroup.beginSlice(event.cat,event.name,timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args),timestampFromUs(event.tts),event.argsStripped,getEventColor(event));slice.startStackFrame=this.getStackFrameForEvent_(event);}else if(event.ph==='I'||event.ph==='i'||event.ph==='R'){if(event.s!==undefined&&event.s!=='t')
+throw new Error('This should never happen');thread.sliceGroup.beginSlice(event.cat,event.name,timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args),timestampFromUs(event.tts),event.argsStripped,getEventColor(event));var slice=thread.sliceGroup.endSlice(timestampFromUs(event.ts),timestampFromUs(event.tts));slice.startStackFrame=this.getStackFrameForEvent_(event);slice.endStackFrame=undefined;}else{if(!thread.sliceGroup.openSliceCount){this.model_.importWarning({type:'duration_parse_error',message:'E phase event without a matching B phase event.'});return;}
+var slice=thread.sliceGroup.endSlice(timestampFromUs(event.ts),timestampFromUs(event.tts),getEventColor(event));if(event.name&&slice.title!=event.name){this.model_.importWarning({type:'title_match_error',message:'Titles do not match. Title is '+
+slice.title+' in openSlice, and is '+
+event.name+' in endSlice'});}
+slice.endStackFrame=this.getStackFrameForEvent_(event);this.mergeArgsInto_(slice.args,event.args,slice.title);}},mergeArgsInto_:function(dstArgs,srcArgs,eventName){for(var arg in srcArgs){if(dstArgs[arg]!==undefined){this.model_.importWarning({type:'arg_merge_error',message:'Different phases of '+eventName+' provided values for argument '+arg+'.'+' The last provided value will be used.'});}
+dstArgs[arg]=this.deepCopyIfNeeded_(srcArgs[arg]);}},processCompleteEvent:function(event){if(event.cat!==undefined&&event.cat.indexOf('trace_event_overhead')>-1)
+return undefined;var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);if(event.flow_out){if(event.flow_in)
+event.flowPhase=STEP;else
+event.flowPhase=PRODUCER;}else if(event.flow_in){event.flowPhase=CONSUMER;}
+var slice=thread.sliceGroup.pushCompleteSlice(event.cat,event.name,timestampFromUs(event.ts),maybeTimestampFromUs(event.dur),maybeTimestampFromUs(event.tts),maybeTimestampFromUs(event.tdur),this.deepCopyIfNeeded_(event.args),event.argsStripped,getEventColor(event),event.bind_id);slice.startStackFrame=this.getStackFrameForEvent_(event);slice.endStackFrame=this.getStackFrameForEvent_(event,true);return slice;},processJitCodeEvent:function(event){if(this.v8ProcessCodeMaps_[event.pid]===undefined)
+this.v8ProcessCodeMaps_[event.pid]=new tr.e.importer.TraceCodeMap();var map=this.v8ProcessCodeMaps_[event.pid];var data=event.args.data;if(event.name==='JitCodeMoved')
+map.moveEntry(data.code_start,data.new_code_start,data.code_len);else
+map.addEntry(data.code_start,data.code_len,data.name,data.script_id);},processMetadataEvent:function(event){if(event.name==='JitCodeAdded'||event.name==='JitCodeMoved'){this.v8SamplingData_.push(event);return;}
+if(event.argsStripped)
+return;if(event.name==='process_name'){var process=this.model_.getOrCreateProcess(event.pid);process.name=event.args.name;}else if(event.name==='process_labels'){var process=this.model_.getOrCreateProcess(event.pid);var labels=event.args.labels.split(',');for(var i=0;i<labels.length;i++)
+process.addLabelIfNeeded(labels[i]);}else if(event.name==='process_sort_index'){var process=this.model_.getOrCreateProcess(event.pid);process.sortIndex=event.args.sort_index;}else if(event.name==='thread_name'){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);thread.name=event.args.name;}else if(event.name==='thread_sort_index'){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);thread.sortIndex=event.args.sort_index;}else if(event.name==='num_cpus'){var n=event.args.number;if(this.softwareMeasuredCpuCount_!==undefined)
+n=Math.max(n,this.softwareMeasuredCpuCount_);this.softwareMeasuredCpuCount_=n;}else if(event.name==='stackFrames'){var stackFrames=event.args.stackFrames;if(stackFrames===undefined){this.model_.importWarning({type:'metadata_parse_error',message:'No stack frames found in a \''+event.name+'\' metadata event'});}else{this.importStackFrames_(stackFrames,'p'+event.pid+':');}}else if(event.name==='typeNames'){var objectTypeNameMap=event.args.typeNames;if(objectTypeNameMap===undefined){this.model_.importWarning({type:'metadata_parse_error',message:'No mapping from object type IDs to names found in a \''+
+event.name+'\' metadata event'});}else{this.importObjectTypeNameMap_(objectTypeNameMap,event.pid);}}else{this.model_.importWarning({type:'metadata_parse_error',message:'Unrecognized metadata name: '+event.name});}},processInstantEvent:function(event){if(event.name==='JitCodeAdded'||event.name==='JitCodeMoved'){this.v8SamplingData_.push(event);return;}
+if(event.s==='t'||event.s===undefined){this.processDurationEvent(event);return;}
+var constructor;switch(event.s){case'g':constructor=tr.model.GlobalInstantEvent;break;case'p':constructor=tr.model.ProcessInstantEvent;break;default:this.model_.importWarning({type:'instant_parse_error',message:'I phase event with unknown "s" field value.'});return;}
+var instantEvent=new constructor(event.cat,event.name,getEventColor(event),timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args));switch(instantEvent.type){case tr.model.InstantEventType.GLOBAL:this.model_.instantEvents.push(instantEvent);break;case tr.model.InstantEventType.PROCESS:var process=this.model_.getOrCreateProcess(event.pid);process.instantEvents.push(instantEvent);break;default:throw new Error('Unknown instant event type: '+event.s);}},processV8Sample:function(event){var data=event.args.data;if(data.vm_state==='js'&&!data.stack.length)
+return;var rootStackFrame=this.v8ProcessRootStackFrame_[event.pid];if(!rootStackFrame){rootStackFrame=new tr.model.StackFrame(undefined,'v8-root-stack-frame','v8-root-stack-frame',0);this.v8ProcessRootStackFrame_[event.pid]=rootStackFrame;}
+function findChildWithEntryID(stackFrame,entryID){return tr.b.findFirstInArray(stackFrame.children,function(child){return child.entryID===entryID;});}
+var model=this.model_;function addStackFrame(lastStackFrame,entry){var childFrame=findChildWithEntryID(lastStackFrame,entry.id);if(childFrame)
+return childFrame;var frame=new tr.model.StackFrame(lastStackFrame,tr.b.GUID.allocate(),entry.name,ColorScheme.getColorIdForGeneralPurposeString(entry.name),entry.sourceInfo);frame.entryID=entry.id;model.addStackFrame(frame);return frame;}
+var lastStackFrame=rootStackFrame;if(data.stack.length>0&&this.v8ProcessCodeMaps_[event.pid]){var map=this.v8ProcessCodeMaps_[event.pid];data.stack.reverse();for(var i=0;i<data.stack.length;i++){var entry=map.lookupEntry(data.stack[i]);if(entry===undefined){entry={id:'unknown',name:'unknown',sourceInfo:undefined};}
+lastStackFrame=addStackFrame(lastStackFrame,entry);}}else{var entry={id:data.vm_state,name:data.vm_state,sourceInfo:undefined};lastStackFrame=addStackFrame(lastStackFrame,entry);}
+var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);var sample=new tr.model.Sample(undefined,thread,'V8 Sample',timestampFromUs(event.ts),lastStackFrame,1,this.deepCopyIfNeeded_(event.args));this.model_.samples.push(sample);},processTraceSampleEvent:function(event){if(event.name==='V8Sample'){this.v8SamplingData_.push(event);return;}
+var stackFrame=this.getStackFrameForEvent_(event);if(stackFrame===undefined){stackFrame=this.traceEventSampleStackFramesByName_[event.name];}
+if(stackFrame===undefined){var id='te-'+tr.b.GUID.allocate();stackFrame=new tr.model.StackFrame(undefined,id,event.name,ColorScheme.getColorIdForGeneralPurposeString(event.name));this.model_.addStackFrame(stackFrame);this.traceEventSampleStackFramesByName_[event.name]=stackFrame;}
+var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);var sample=new tr.model.Sample(undefined,thread,'Trace Event Sample',timestampFromUs(event.ts),stackFrame,1,this.deepCopyIfNeeded_(event.args));this.model_.samples.push(sample);},processMemoryDumpEvent:function(event){if(event.ph!=='v')
+throw new Error('Invalid memory dump event phase "'+event.ph+'".');var dumpId=event.id;if(dumpId===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory dump event (phase \''+event.ph+'\') without a dump ID.'});return;}
+var pid=event.pid;if(pid===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory dump event (phase\''+event.ph+'\', dump ID \''+
+dumpId+'\') without a PID.'});return;}
+var allEvents=this.allMemoryDumpEvents_;var dumpIdEvents=allEvents[dumpId];if(dumpIdEvents===undefined)
+allEvents[dumpId]=dumpIdEvents={};var processEvents=dumpIdEvents[pid];if(processEvents===undefined)
+dumpIdEvents[pid]=processEvents=[];processEvents.push(event);},processClockSyncEvent:function(event){if(event.ph!=='c')
+throw new Error('Invalid clock sync event phase "'+event.ph+'".');var syncId=event.args.sync_id;var issueStartTs=event.args.issue_ts;var issueEndTs=event.ts;if(syncId===undefined){this.model_.importWarning({type:'clock_sync_parse_error',message:'Clock sync at time '+issueEndTs+' without an ID.'});return;}
+if(issueStartTs===undefined){this.model_.importWarning({type:'clock_sync_parse_error',message:'Clock sync at time '+issueEndTs+' with ID '+syncId+' without a start timestamp.'});return;}
+this.model_.clockSyncManager.addClockSyncMarker(this.clockDomainId_,syncId,timestampFromUs(issueStartTs),timestampFromUs(issueEndTs-issueStartTs));this.model_.clockSyncRecords.push(new tr.model.PingPongClockSyncRecord(syncId,timestampFromUs(issueStartTs),timestampFromUs(issueEndTs-issueStartTs)));},processV8Events:function(){this.v8SamplingData_.sort(function(a,b){if(a.ts!==b.ts)
+return a.ts-b.ts;if(a.ph==='M'||a.ph==='I')
+return-1;else if(b.ph==='M'||b.ph==='I')
+return 1;return 0;});var length=this.v8SamplingData_.length;for(var i=0;i<length;++i){var event=this.v8SamplingData_[i];if(event.ph==='M'||event.ph==='I'){this.processJitCodeEvent(event);}else if(event.ph==='P'){this.processV8Sample(event);}}},importClockSyncMarkers:function(){this.model_.clockSyncRecords.push(new tr.model.InstantClockSyncRecord('ftrace_importer',0,{}));for(var i=0;i<this.events_.length;i++){var event=this.events_[i];if(event.ph!=='c')
+continue;var eventSizeInBytes=this.model_.importOptions.trackDetailedModelStats?JSON.stringify(event).length:undefined;this.model_.stats.willProcessBasicTraceEvent('clock_sync',event.cat,event.name,event.ts,eventSizeInBytes);this.processClockSyncEvent(event);}},importEvents:function(){if(this.stackFrameEvents_)
+this.importStackFrames_(this.stackFrameEvents_,'g');if(this.traceAnnotations_)
+this.importAnnotations_();var importOptions=this.model_.importOptions;var trackDetailedModelStats=importOptions.trackDetailedModelStats;var modelStats=this.model_.stats;var events=this.events_;for(var eI=0;eI<events.length;eI++){var event=events[eI];if(event.args==='__stripped__'){event.argsStripped=true;event.args=undefined;}
+var eventSizeInBytes;if(trackDetailedModelStats)
+eventSizeInBytes=JSON.stringify(event).length;else
+eventSizeInBytes=undefined;if(event.ph==='B'||event.ph==='E'){modelStats.willProcessBasicTraceEvent('begin_end (non-compact)',event.cat,event.name,event.ts,eventSizeInBytes);this.processDurationEvent(event);}else if(event.ph==='X'){modelStats.willProcessBasicTraceEvent('begin_end (compact)',event.cat,event.name,event.ts,eventSizeInBytes);var slice=this.processCompleteEvent(event);if(slice!==undefined&&event.bind_id!==undefined)
+this.processFlowEvent(event,slice);}else if(event.ph==='b'||event.ph==='e'||event.ph==='n'||event.ph==='S'||event.ph==='F'||event.ph==='T'||event.ph==='p'){modelStats.willProcessBasicTraceEvent('async',event.cat,event.name,event.ts,eventSizeInBytes);this.processAsyncEvent(event);}else if(event.ph==='I'||event.ph==='i'||event.ph==='R'){modelStats.willProcessBasicTraceEvent('instant',event.cat,event.name,event.ts,eventSizeInBytes);this.processInstantEvent(event);}else if(event.ph==='P'){modelStats.willProcessBasicTraceEvent('samples',event.cat,event.name,event.ts,eventSizeInBytes);this.processTraceSampleEvent(event);}else if(event.ph==='C'){modelStats.willProcessBasicTraceEvent('counters',event.cat,event.name,event.ts,eventSizeInBytes);this.processCounterEvent(event);}else if(event.ph==='M'){modelStats.willProcessBasicTraceEvent('metadata',event.cat,event.name,event.ts,eventSizeInBytes);this.processMetadataEvent(event);}else if(event.ph==='N'||event.ph==='D'||event.ph==='O'){modelStats.willProcessBasicTraceEvent('objects',event.cat,event.name,event.ts,eventSizeInBytes);this.processObjectEvent(event);}else if(event.ph==='s'||event.ph==='t'||event.ph==='f'){modelStats.willProcessBasicTraceEvent('flows',event.cat,event.name,event.ts,eventSizeInBytes);this.processFlowEvent(event);}else if(event.ph==='v'){modelStats.willProcessBasicTraceEvent('memory_dumps',event.cat,event.name,event.ts,eventSizeInBytes);this.processMemoryDumpEvent(event);}else if(event.ph==='c'){}else{modelStats.willProcessBasicTraceEvent('unknown',event.cat,event.name,event.ts,eventSizeInBytes);this.model_.importWarning({type:'parse_error',message:'Unrecognized event phase: '+
+event.ph+' ('+event.name+')'});}}
+this.processV8Events();tr.b.iterItems(this.v8ProcessRootStackFrame_,function(name,frame){frame.removeAllChildren();});},importStackFrames_:function(rawStackFrames,idPrefix){var model=this.model_;for(var id in rawStackFrames){var rawStackFrame=rawStackFrames[id];var fullId=idPrefix+id;var textForColor=rawStackFrame.category?rawStackFrame.category:rawStackFrame.name;var stackFrame=new tr.model.StackFrame(undefined,fullId,rawStackFrame.name,ColorScheme.getColorIdForGeneralPurposeString(textForColor));model.addStackFrame(stackFrame);}
+for(var id in rawStackFrames){var fullId=idPrefix+id;var stackFrame=model.stackFrames[fullId];if(stackFrame===undefined)
+throw new Error('Internal error');var rawStackFrame=rawStackFrames[id];var parentId=rawStackFrame.parent;var parentStackFrame;if(parentId===undefined){parentStackFrame=undefined;}else{var parentFullId=idPrefix+parentId;parentStackFrame=model.stackFrames[parentFullId];if(parentStackFrame===undefined){this.model_.importWarning({type:'metadata_parse_error',message:'Missing parent frame with ID '+parentFullId+' for stack frame \''+stackFrame.name+'\' (ID '+fullId+').'});}}
+stackFrame.parentFrame=parentStackFrame;}},importObjectTypeNameMap_:function(rawObjectTypeNameMap,pid){if(pid in this.objectTypeNameMap_){this.model_.importWarning({type:'metadata_parse_error',message:'Mapping from object type IDs to names provided for pid='+
+pid+' multiple times.'});return;}
+var objectTypeNamePrefix=undefined;var objectTypeNameSuffix=undefined;var objectTypeNameMap={};for(var objectTypeId in rawObjectTypeNameMap){var rawObjectTypeName=rawObjectTypeNameMap[objectTypeId];if(objectTypeNamePrefix===undefined){for(var i=0;i<OBJECT_TYPE_NAME_PATTERNS.length;i++){var pattern=OBJECT_TYPE_NAME_PATTERNS[i];if(rawObjectTypeName.startsWith(pattern.prefix)&&rawObjectTypeName.endsWith(pattern.suffix)){objectTypeNamePrefix=pattern.prefix;objectTypeNameSuffix=pattern.suffix;break;}}}
+if(objectTypeNamePrefix!==undefined&&rawObjectTypeName.startsWith(objectTypeNamePrefix)&&rawObjectTypeName.endsWith(objectTypeNameSuffix)){objectTypeNameMap[objectTypeId]=rawObjectTypeName.substring(objectTypeNamePrefix.length,rawObjectTypeName.length-objectTypeNameSuffix.length);}else{objectTypeNameMap[objectTypeId]=rawObjectTypeName;}}
+this.objectTypeNameMap_[pid]=objectTypeNameMap;},importAnnotations_:function(){for(var id in this.traceAnnotations_){var annotation=tr.model.Annotation.fromDictIfPossible(this.traceAnnotations_[id]);if(!annotation){this.model_.importWarning({type:'annotation_warning',message:'Unrecognized traceAnnotation typeName \"'+
+this.traceAnnotations_[id].typeName+'\"'});continue;}
+this.model_.addAnnotation(annotation);}},finalizeImport:function(){if(this.softwareMeasuredCpuCount_!==undefined){this.model_.kernel.softwareMeasuredCpuCount=this.softwareMeasuredCpuCount_;}
+this.createAsyncSlices_();this.createFlowSlices_();this.createExplicitObjects_();this.createImplicitObjects_();this.createMemoryDumps_();},getStackFrameForEvent_:function(event,opt_lookForEndEvent){var sf;var stack;if(opt_lookForEndEvent){sf=event.esf;stack=event.estack;}else{sf=event.sf;stack=event.stack;}
+if(stack!==undefined&&sf!==undefined){this.model_.importWarning({type:'stack_frame_and_stack_error',message:'Event at '+event.ts+' cannot have both a stack and a stackframe.'});return undefined;}
+if(stack!==undefined)
+return this.model_.resolveStackToStackFrame_(event.pid,stack);if(sf===undefined)
+return undefined;var stackFrame=this.model_.stackFrames['g'+sf];if(stackFrame===undefined){this.model_.importWarning({type:'sample_import_error',message:'No frame for '+sf});return;}
+return stackFrame;},resolveStackToStackFrame_:function(pid,stack){return undefined;},importSampleData:function(){if(!this.sampleEvents_)
+return;var m=this.model_;var events=this.sampleEvents_;if(this.events_.length===0){for(var i=0;i<events.length;i++){var event=events[i];m.getOrCreateProcess(event.tid).getOrCreateThread(event.tid);}}
+var threadsByTid={};m.getAllThreads().forEach(function(t){threadsByTid[t.tid]=t;});for(var i=0;i<events.length;i++){var event=events[i];var thread=threadsByTid[event.tid];if(thread===undefined){m.importWarning({type:'sample_import_error',message:'Thread '+events.tid+'not found'});continue;}
+var cpu;if(event.cpu!==undefined)
+cpu=m.kernel.getOrCreateCpu(event.cpu);var stackFrame=this.getStackFrameForEvent_(event);var sample=new tr.model.Sample(cpu,thread,event.name,timestampFromUs(event.ts),stackFrame,event.weight);m.samples.push(sample);}},createAsyncSlices_:function(){if(this.allAsyncEvents_.length===0)
+return;this.allAsyncEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!==0)
+return d;return x.sequenceNumber-y.sequenceNumber;});var legacyEvents=[];var nestableAsyncEventsByKey={};var nestableMeasureAsyncEventsByKey={};for(var i=0;i<this.allAsyncEvents_.length;i++){var asyncEventState=this.allAsyncEvents_[i];var event=asyncEventState.event;if(event.ph==='S'||event.ph==='F'||event.ph==='T'||event.ph==='p'){legacyEvents.push(asyncEventState);continue;}
+if(event.cat===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require a '+'cat parameter.'});continue;}
+if(event.name===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require a '+'name parameter.'});continue;}
+if(event.id===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require an '+'id parameter.'});continue;}
+if(event.cat==='blink.user_timing'){var matched=/([^\/:]+):([^\/:]+)\/?(.*)/.exec(event.name);if(matched!==null){var key=matched[1]+':'+event.cat;event.args=JSON.parse(Base64.atob(matched[3])||'{}');if(nestableMeasureAsyncEventsByKey[key]===undefined)
+nestableMeasureAsyncEventsByKey[key]=[];nestableMeasureAsyncEventsByKey[key].push(asyncEventState);continue;}}
+var key=event.cat+':'+event.id;if(nestableAsyncEventsByKey[key]===undefined)
+nestableAsyncEventsByKey[key]=[];nestableAsyncEventsByKey[key].push(asyncEventState);}
+this.createLegacyAsyncSlices_(legacyEvents);this.createNestableAsyncSlices_(nestableMeasureAsyncEventsByKey);this.createNestableAsyncSlices_(nestableAsyncEventsByKey);},createLegacyAsyncSlices_:function(legacyEvents){if(legacyEvents.length===0)
+return;legacyEvents.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
+return d;return x.sequenceNumber-y.sequenceNumber;});var asyncEventStatesByNameThenID={};for(var i=0;i<legacyEvents.length;i++){var asyncEventState=legacyEvents[i];var event=asyncEventState.event;var name=event.name;if(name===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Async events (ph: S, T, p, or F) require a name '+' parameter.'});continue;}
+var id=event.id;if(id===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Async events (ph: S, T, p, or F) require an id parameter.'});continue;}
+if(event.ph==='S'){if(asyncEventStatesByNameThenID[name]===undefined)
+asyncEventStatesByNameThenID[name]={};if(asyncEventStatesByNameThenID[name][id]){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', a slice of the same id '+id+' was alrady open.'});continue;}
+asyncEventStatesByNameThenID[name][id]=[];asyncEventStatesByNameThenID[name][id].push(asyncEventState);}else{if(asyncEventStatesByNameThenID[name]===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', no slice named '+name+' was open.'});continue;}
+if(asyncEventStatesByNameThenID[name][id]===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', no slice named '+name+' with id='+id+' was open.'});continue;}
+var events=asyncEventStatesByNameThenID[name][id];events.push(asyncEventState);if(event.ph==='F'){var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(events[0].event.cat,name);var slice=new asyncSliceConstructor(events[0].event.cat,name,getEventColor(events[0].event),timestampFromUs(events[0].event.ts),tr.b.concatenateObjects(events[0].event.args,events[events.length-1].event.args),timestampFromUs(event.ts-events[0].event.ts),true,undefined,undefined,events[0].event.argsStripped);slice.startThread=events[0].thread;slice.endThread=asyncEventState.thread;slice.id=id;var stepType=events[1].event.ph;var isValid=true;for(var j=1;j<events.length-1;++j){if(events[j].event.ph==='T'||events[j].event.ph==='p'){isValid=this.assertStepTypeMatches_(stepType,events[j]);if(!isValid)
+break;}
+if(events[j].event.ph==='S'){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
+event.event.name+' with id='+event.event.id+' had a step before the start event.'});continue;}
+if(events[j].event.ph==='F'){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
+event.event.name+' with id='+event.event.id+' had a step after the finish event.'});continue;}
+var startIndex=j+(stepType==='T'?0:-1);var endIndex=startIndex+1;var subName=events[j].event.name;if(!events[j].event.argsStripped&&(events[j].event.ph==='T'||events[j].event.ph==='p'))
+subName=subName+':'+events[j].event.args.step;var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(events[0].event.cat,subName);var subSlice=new asyncSliceConstructor(events[0].event.cat,subName,getEventColor(event,subName+j),timestampFromUs(events[startIndex].event.ts),this.deepCopyIfNeeded_(events[j].event.args),timestampFromUs(events[endIndex].event.ts-events[startIndex].event.ts),undefined,undefined,events[startIndex].event.argsStripped);subSlice.startThread=events[startIndex].thread;subSlice.endThread=events[endIndex].thread;subSlice.id=id;slice.subSlices.push(subSlice);}
+if(isValid){slice.startThread.asyncSliceGroup.push(slice);}
+delete asyncEventStatesByNameThenID[name][id];}}}},createNestableAsyncSlices_:function(nestableEventsByKey){for(var key in nestableEventsByKey){var eventStateEntries=nestableEventsByKey[key];var parentStack=[];for(var i=0;i<eventStateEntries.length;++i){var eventStateEntry=eventStateEntries[i];if(eventStateEntry.event.ph==='e'){var parentIndex=-1;for(var k=parentStack.length-1;k>=0;--k){if(parentStack[k].event.name===eventStateEntry.event.name){parentIndex=k;break;}}
+if(parentIndex===-1){eventStateEntry.finished=false;}else{parentStack[parentIndex].end=eventStateEntry;while(parentIndex<parentStack.length){parentStack.pop();}}}
+if(parentStack.length>0)
+eventStateEntry.parentEntry=parentStack[parentStack.length-1];if(eventStateEntry.event.ph==='b'){parentStack.push(eventStateEntry);}}
+var topLevelSlices=[];for(var i=0;i<eventStateEntries.length;++i){var eventStateEntry=eventStateEntries[i];if(eventStateEntry.event.ph==='e'&&eventStateEntry.finished===undefined){continue;}
+var startState=undefined;var endState=undefined;var sliceArgs=eventStateEntry.event.args||{};var sliceError=undefined;if(eventStateEntry.event.ph==='n'){startState=eventStateEntry;endState=eventStateEntry;}else if(eventStateEntry.event.ph==='b'){if(eventStateEntry.end===undefined){eventStateEntry.end=eventStateEntries[eventStateEntries.length-1];sliceError='Slice has no matching END. End time has been adjusted.';this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async BEGIN event at '+
+eventStateEntry.event.ts+' with name='+
+eventStateEntry.event.name+' and id='+eventStateEntry.event.id+' was unmatched.'});}else{function concatenateArguments(args1,args2){if(args1.params===undefined||args2.params===undefined)
+return tr.b.concatenateObjects(args1,args2);var args3={};args3.params=tr.b.concatenateObjects(args1.params,args2.params);return tr.b.concatenateObjects(args1,args2,args3);}
+var endArgs=eventStateEntry.end.event.args||{};sliceArgs=concatenateArguments(sliceArgs,endArgs);}
+startState=eventStateEntry;endState=eventStateEntry.end;}else{sliceError='Slice has no matching BEGIN. Start time has been adjusted.';this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async END event at '+
+eventStateEntry.event.ts+' with name='+
+eventStateEntry.event.name+' and id='+eventStateEntry.event.id+' was unmatched.'});startState=eventStateEntries[0];endState=eventStateEntry;}
+var isTopLevel=(eventStateEntry.parentEntry===undefined);var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(eventStateEntry.event.cat,eventStateEntry.event.name);var thread_start=undefined;var thread_duration=undefined;if(startState.event.tts&&startState.event.use_async_tts){thread_start=timestampFromUs(startState.event.tts);if(endState.event.tts){var thread_end=timestampFromUs(endState.event.tts);thread_duration=thread_end-thread_start;}}
+var slice=new asyncSliceConstructor(eventStateEntry.event.cat,eventStateEntry.event.name,getEventColor(endState.event),timestampFromUs(startState.event.ts),sliceArgs,timestampFromUs(endState.event.ts-startState.event.ts),isTopLevel,thread_start,thread_duration,startState.event.argsStripped);slice.startThread=startState.thread;slice.endThread=endState.thread;slice.startStackFrame=this.getStackFrameForEvent_(startState.event);slice.endStackFrame=this.getStackFrameForEvent_(endState.event);slice.id=key;if(sliceError!==undefined)
+slice.error=sliceError;eventStateEntry.slice=slice;if(isTopLevel){topLevelSlices.push(slice);}else if(eventStateEntry.parentEntry.slice!==undefined){eventStateEntry.parentEntry.slice.subSlices.push(slice);}}
+for(var si=0;si<topLevelSlices.length;si++){topLevelSlices[si].startThread.asyncSliceGroup.push(topLevelSlices[si]);}}},assertStepTypeMatches_:function(stepType,event){if(stepType!=event.event.ph){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
+event.event.name+' with id='+event.event.id+' had both begin and end steps, which is not allowed.'});return false;}
+return true;},createFlowSlices_:function(){if(this.allFlowEvents_.length===0)
+return;var that=this;function validateFlowEvent(){if(event.name===undefined){that.model_.importWarning({type:'flow_slice_parse_error',message:'Flow events (ph: s, t or f) require a name parameter.'});return false;}
+if(event.ph==='s'||event.ph==='f'||event.ph==='t'){if(event.id===undefined){that.model_.importWarning({type:'flow_slice_parse_error',message:'Flow events (ph: s, t or f) require an id parameter.'});return false;}
+return true;}
+if(event.bind_id){if(event.flow_in===undefined&&event.flow_out===undefined){that.model_.importWarning({type:'flow_slice_parse_error',message:'Flow producer or consumer require flow_in or flow_out.'});return false;}
+return true;}
+return false;}
+function createFlowEvent(thread,event,opt_slice){var startSlice,flowId,flowStartTs;if(event.bind_id){startSlice=opt_slice;flowId=event.bind_id;flowStartTs=timestampFromUs(event.ts+event.dur);}else{var ts=timestampFromUs(event.ts);startSlice=thread.sliceGroup.findSliceAtTs(ts);if(startSlice===undefined)
+return undefined;flowId=event.id;flowStartTs=ts;}
+var flowEvent=new tr.model.FlowEvent(event.cat,flowId,event.name,getEventColor(event),flowStartTs,that.deepCopyAlways_(event.args));flowEvent.startSlice=startSlice;flowEvent.startStackFrame=that.getStackFrameForEvent_(event);flowEvent.endStackFrame=undefined;startSlice.outFlowEvents.push(flowEvent);return flowEvent;}
+function finishFlowEventWith(flowEvent,thread,event,refGuid,bindToParent,opt_slice){var endSlice;if(event.bind_id){endSlice=opt_slice;}else{var ts=timestampFromUs(event.ts);if(bindToParent){endSlice=thread.sliceGroup.findSliceAtTs(ts);}else{endSlice=thread.sliceGroup.findNextSliceAfter(ts,refGuid);}
+if(endSlice===undefined)
+return false;}
+endSlice.inFlowEvents.push(flowEvent);flowEvent.endSlice=endSlice;flowEvent.duration=timestampFromUs(event.ts)-flowEvent.start;flowEvent.endStackFrame=that.getStackFrameForEvent_(event);that.mergeArgsInto_(flowEvent.args,event.args,flowEvent.title);return true;}
+function processFlowConsumer(flowIdToEvent,sliceGuidToEvent,event,slice){var flowEvent=flowIdToEvent[event.bind_id];if(flowEvent===undefined){that.model_.importWarning({type:'flow_slice_ordering_error',message:'Flow consumer '+event.bind_id+' does not have '+'a flow producer'});return false;}else if(flowEvent.endSlice){var flowProducer=flowEvent.startSlice;flowEvent=createFlowEvent(undefined,sliceGuidToEvent[flowProducer.guid],flowProducer);}
+var ok=finishFlowEventWith(flowEvent,undefined,event,refGuid,undefined,slice);if(ok){that.model_.flowEvents.push(flowEvent);}else{that.model_.importWarning({type:'flow_slice_end_error',message:'Flow consumer '+event.bind_id+' does not end '+'at an actual slice, so cannot be created.'});return false;}
+return true;}
+function processFlowProducer(flowIdToEvent,flowStatus,event,slice){if(flowIdToEvent[event.bind_id]&&flowStatus[event.bind_id]){that.model_.importWarning({type:'flow_slice_start_error',message:'Flow producer '+event.bind_id+' already seen'});return false;}
+var flowEvent=createFlowEvent(undefined,event,slice);if(!flowEvent){that.model_.importWarning({type:'flow_slice_start_error',message:'Flow producer '+event.bind_id+' does not start'+'a flow'});return false;}
+flowIdToEvent[event.bind_id]=flowEvent;return;}
+this.allFlowEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
+return d;return x.sequenceNumber-y.sequenceNumber;});var flowIdToEvent={};var sliceGuidToEvent={};var flowStatus={};for(var i=0;i<this.allFlowEvents_.length;++i){var data=this.allFlowEvents_[i];var refGuid=data.refGuid;var event=data.event;var thread=data.thread;if(!validateFlowEvent(event))
+continue;if(event.bind_id){var slice=data.slice;sliceGuidToEvent[slice.guid]=event;if(event.flowPhase===PRODUCER){if(!processFlowProducer(flowIdToEvent,flowStatus,event,slice))
+continue;flowStatus[event.bind_id]=true;}
+else{if(!processFlowConsumer(flowIdToEvent,sliceGuidToEvent,event,slice))
+continue;flowStatus[event.bind_id]=false;if(event.flowPhase===STEP){if(!processFlowProducer(flowIdToEvent,flowStatus,event,slice))
+continue;flowStatus[event.bind_id]=true;}}
+continue;}
+var flowEvent;if(event.ph==='s'){if(flowIdToEvent[event.id]){this.model_.importWarning({type:'flow_slice_start_error',message:'event id '+event.id+' already seen when '+'encountering start of flow event.'});continue;}
+flowEvent=createFlowEvent(thread,event);if(!flowEvent){this.model_.importWarning({type:'flow_slice_start_error',message:'event id '+event.id+' does not start '+'at an actual slice, so cannot be created.'});continue;}
+flowIdToEvent[event.id]=flowEvent;}else if(event.ph==='t'||event.ph==='f'){flowEvent=flowIdToEvent[event.id];if(flowEvent===undefined){this.model_.importWarning({type:'flow_slice_ordering_error',message:'Found flow phase '+event.ph+' for id: '+event.id+' but no flow start found.'});continue;}
+var bindToParent=event.ph==='t';if(event.ph==='f'){if(event.bp===undefined){if(event.cat.indexOf('input')>-1)
+bindToParent=true;else if(event.cat.indexOf('ipc.flow')>-1)
+bindToParent=true;}else{if(event.bp!=='e'){this.model_.importWarning({type:'flow_slice_bind_point_error',message:'Flow event with invalid binding point (event.bp).'});continue;}
+bindToParent=true;}}
+var ok=finishFlowEventWith(flowEvent,thread,event,refGuid,bindToParent);if(ok){that.model_.flowEvents.push(flowEvent);}else{this.model_.importWarning({type:'flow_slice_end_error',message:'event id '+event.id+' does not end '+'at an actual slice, so cannot be created.'});}
+flowIdToEvent[event.id]=undefined;if(ok&&event.ph==='t'){flowEvent=createFlowEvent(thread,event);flowIdToEvent[event.id]=flowEvent;}}}},createExplicitObjects_:function(){if(this.allObjectEvents_.length===0)
+return;function processEvent(objectEventState){var event=objectEventState.event;var scopedId=new tr.model.ScopedId(event.scope||tr.model.OBJECT_DEFAULT_SCOPE,event.id);var thread=objectEventState.thread;if(event.name===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+JSON.stringify(event)+': '+'Object events require an name parameter.'});}
+if(scopedId.id===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+JSON.stringify(event)+': '+'Object events require an id parameter.'});}
+var process=thread.parent;var ts=timestampFromUs(event.ts);var instance;if(event.ph==='N'){try{instance=process.objects.idWasCreated(scopedId,event.cat,event.name,ts);}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing create of '+
+scopedId+' at ts='+ts+': '+e});return;}}else if(event.ph==='O'){if(event.args.snapshot===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+scopedId+' at ts='+ts+': '+'Snapshots must have args: {snapshot: ...}'});return;}
+var snapshot;try{var args=this.deepCopyIfNeeded_(event.args.snapshot);var cat;if(args.cat){cat=args.cat;delete args.cat;}else{cat=event.cat;}
+var baseTypename;if(args.base_type){baseTypename=args.base_type;delete args.base_type;}else{baseTypename=undefined;}
+snapshot=process.objects.addSnapshot(scopedId,cat,event.name,ts,args,baseTypename);snapshot.snapshottedOnThread=thread;}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing snapshot of '+
+scopedId+' at ts='+ts+': '+e});return;}
+instance=snapshot.objectInstance;}else if(event.ph==='D'){try{process.objects.idWasDeleted(scopedId,event.cat,event.name,ts);var instanceMap=process.objects.getOrCreateInstanceMap_(scopedId);instance=instanceMap.lastInstance;}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing delete of '+
+scopedId+' at ts='+ts+': '+e});return;}}
+if(instance)
+instance.colorId=getEventColor(event,instance.typeName);}
+this.allObjectEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
+return d;return x.sequenceNumber-y.sequenceNumber;});var allObjectEvents=this.allObjectEvents_;for(var i=0;i<allObjectEvents.length;i++){var objectEventState=allObjectEvents[i];try{processEvent.call(this,objectEventState);}catch(e){this.model_.importWarning({type:'object_parse_error',message:e.message});}}},createImplicitObjects_:function(){tr.b.iterItems(this.model_.processes,function(pid,process){this.createImplicitObjectsForProcess_(process);},this);},createImplicitObjectsForProcess_:function(process){function processField(referencingObject,referencingObjectFieldName,referencingObjectFieldValue,containingSnapshot){if(!referencingObjectFieldValue)
+return;if(referencingObjectFieldValue instanceof
+tr.model.ObjectSnapshot)
+return null;if(referencingObjectFieldValue.id===undefined)
+return;var implicitSnapshot=referencingObjectFieldValue;var rawId=implicitSnapshot.id;var m=/(.+)\/(.+)/.exec(rawId);if(!m)
+throw new Error('Implicit snapshots must have names.');delete implicitSnapshot.id;var name=m[1];var id=m[2];var res;var cat;if(implicitSnapshot.cat!==undefined)
+cat=implicitSnapshot.cat;else
+cat=containingSnapshot.objectInstance.category;var baseTypename;if(implicitSnapshot.base_type)
+baseTypename=implicitSnapshot.base_type;else
+baseTypename=undefined;var scope=containingSnapshot.objectInstance.scopedId.scope;try{res=process.objects.addSnapshot(new tr.model.ScopedId(scope,id),cat,name,containingSnapshot.ts,implicitSnapshot,baseTypename);}catch(e){this.model_.importWarning({type:'object_snapshot_parse_error',message:'While processing implicit snapshot of '+
+rawId+' at ts='+containingSnapshot.ts+': '+e});return;}
+res.objectInstance.hasImplicitSnapshots=true;res.containingSnapshot=containingSnapshot;res.snapshottedOnThread=containingSnapshot.snapshottedOnThread;referencingObject[referencingObjectFieldName]=res;if(!(res instanceof tr.model.ObjectSnapshot))
+throw new Error('Created object must be instanceof snapshot');return res.args;}
+function iterObject(object,func,containingSnapshot,thisArg){if(!(object instanceof Object))
+return;if(object instanceof Array){for(var i=0;i<object.length;i++){var res=func.call(thisArg,object,i,object[i],containingSnapshot);if(res===null)
+continue;if(res)
+iterObject(res,func,containingSnapshot,thisArg);else
+iterObject(object[i],func,containingSnapshot,thisArg);}
+return;}
+for(var key in object){var res=func.call(thisArg,object,key,object[key],containingSnapshot);if(res===null)
+continue;if(res)
+iterObject(res,func,containingSnapshot,thisArg);else
+iterObject(object[key],func,containingSnapshot,thisArg);}}
+process.objects.iterObjectInstances(function(instance){instance.snapshots.forEach(function(snapshot){if(snapshot.args.id!==undefined)
+throw new Error('args cannot have an id field inside it');iterObject(snapshot.args,processField,snapshot,this);},this);},this);},createMemoryDumps_:function(){for(var dumpId in this.allMemoryDumpEvents_)
+this.createGlobalMemoryDump_(this.allMemoryDumpEvents_[dumpId],dumpId);},createGlobalMemoryDump_:function(dumpIdEvents,dumpId){var globalRange=new tr.b.Range();for(var pid in dumpIdEvents){var processEvents=dumpIdEvents[pid];for(var i=0;i<processEvents.length;i++)
+globalRange.addValue(timestampFromUs(processEvents[i].ts));}
+if(globalRange.isEmpty)
+throw new Error('Internal error: Global memory dump without events');var globalMemoryDump=new tr.model.GlobalMemoryDump(this.model_,globalRange.min);globalMemoryDump.duration=globalRange.range;this.model_.globalMemoryDumps.push(globalMemoryDump);var globalMemoryAllocatorDumpsByFullName={};var levelsOfDetail={};var allMemoryAllocatorDumpsByGuid={};for(var pid in dumpIdEvents){this.createProcessMemoryDump_(globalMemoryDump,globalMemoryAllocatorDumpsByFullName,levelsOfDetail,allMemoryAllocatorDumpsByGuid,dumpIdEvents[pid],pid,dumpId);}
+globalMemoryDump.levelOfDetail=levelsOfDetail.global;globalMemoryDump.memoryAllocatorDumps=this.inferMemoryAllocatorDumpTree_(globalMemoryAllocatorDumpsByFullName);this.parseMemoryDumpAllocatorEdges_(allMemoryAllocatorDumpsByGuid,dumpIdEvents,dumpId);},createProcessMemoryDump_:function(globalMemoryDump,globalMemoryAllocatorDumpsByFullName,levelsOfDetail,allMemoryAllocatorDumpsByGuid,processEvents,pid,dumpId){var processRange=new tr.b.Range();for(var i=0;i<processEvents.length;i++)
+processRange.addValue(timestampFromUs(processEvents[i].ts));if(processRange.isEmpty)
+throw new Error('Internal error: Process memory dump without events');var process=this.model_.getOrCreateProcess(pid);var processMemoryDump=new tr.model.ProcessMemoryDump(globalMemoryDump,process,processRange.min);processMemoryDump.duration=processRange.range;process.memoryDumps.push(processMemoryDump);globalMemoryDump.processMemoryDumps[pid]=processMemoryDump;var processMemoryAllocatorDumpsByFullName={};for(var i=0;i<processEvents.length;i++){var processEvent=processEvents[i];var dumps=processEvent.args.dumps;if(dumps===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'\'dumps\' field not found in a process memory dump'+' event for PID='+pid+' and dump ID='+dumpId+'.'});continue;}
+this.parseMemoryDumpTotals_(processMemoryDump,dumps,pid,dumpId);this.parseMemoryDumpVmRegions_(processMemoryDump,dumps,pid,dumpId);this.parseMemoryDumpHeapDumps_(processMemoryDump,dumps,pid,dumpId);this.parseMemoryDumpLevelOfDetail_(levelsOfDetail,dumps,pid,dumpId);this.parseMemoryDumpAllocatorDumps_(processMemoryDump,globalMemoryDump,processMemoryAllocatorDumpsByFullName,globalMemoryAllocatorDumpsByFullName,allMemoryAllocatorDumpsByGuid,dumps,pid,dumpId);}
+if(levelsOfDetail.process===undefined){levelsOfDetail.process=processMemoryDump.vmRegions?DETAILED:LIGHT;}
+if(!this.updateMemoryDumpLevelOfDetail_(levelsOfDetail,'global',levelsOfDetail.process)){this.model_.importWarning({type:'memory_dump_parse_error',message:'diffent levels of detail provided for global memory'+' dump (dump ID='+dumpId+').'});}
+processMemoryDump.levelOfDetail=levelsOfDetail.process;delete levelsOfDetail.process;processMemoryDump.memoryAllocatorDumps=this.inferMemoryAllocatorDumpTree_(processMemoryAllocatorDumpsByFullName);},parseMemoryDumpTotals_:function(processMemoryDump,dumps,pid,dumpId){var rawTotals=dumps.process_totals;if(rawTotals===undefined)
+return;if(processMemoryDump.totals!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Process totals provided multiple times for'+' process memory dump for PID='+pid+' and dump ID='+dumpId+'.'});return;}
+var totals={};var platformSpecificTotals=undefined;for(var rawTotalName in rawTotals){var rawTotalValue=rawTotals[rawTotalName];if(rawTotalValue===undefined)
+continue;if(rawTotalName==='resident_set_bytes'){totals.residentBytes=parseInt(rawTotalValue,16);continue;}
+if(rawTotalName==='peak_resident_set_bytes'){totals.peakResidentBytes=parseInt(rawTotalValue,16);continue;}
+if(rawTotalName==='is_peak_rss_resetable'){totals.arePeakResidentBytesResettable=!!rawTotalValue;continue;}
+if(platformSpecificTotals===undefined){platformSpecificTotals={};totals.platformSpecific=platformSpecificTotals;}
+platformSpecificTotals[rawTotalName]=parseInt(rawTotalValue,16);}
+if(totals.peakResidentBytes===undefined&&totals.arePeakResidentBytesResettable!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Optional field peak_resident_set_bytes found'+' but is_peak_rss_resetable not found in'+' process memory dump for PID='+pid+' and dump ID='+dumpId+'.'});}
+if(totals.arePeakResidentBytesResettable!==undefined&&totals.peakResidentBytes===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Optional field is_peak_rss_resetable found'+' but peak_resident_set_bytes not found in'+' process memory dump for PID='+pid+' and dump ID='+dumpId+'.'});}
+processMemoryDump.totals=totals;},parseMemoryDumpVmRegions_:function(processMemoryDump,dumps,pid,dumpId){var rawProcessMmaps=dumps.process_mmaps;if(rawProcessMmaps===undefined)
+return;var rawVmRegions=rawProcessMmaps.vm_regions;if(rawVmRegions===undefined)
+return;if(processMemoryDump.vmRegions!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'VM regions provided multiple times for'+' process memory dump for PID='+pid+' and dump ID='+dumpId+'.'});return;}
+var vmRegions=new Array(rawVmRegions.length);for(var i=0;i<rawVmRegions.length;i++){var rawVmRegion=rawVmRegions[i];var byteStats={};var rawByteStats=rawVmRegion.bs;for(var rawByteStatName in rawByteStats){var rawByteStatValue=rawByteStats[rawByteStatName];if(rawByteStatValue===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Byte stat \''+rawByteStatName+'\' of VM region '+
+i+' ('+rawVmRegion.mf+') in process memory dump for '+'PID='+pid+' and dump ID='+dumpId+' does not have a value.'});continue;}
+var byteStatName=BYTE_STAT_NAME_MAP[rawByteStatName];if(byteStatName===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Unknown byte stat name \''+rawByteStatName+'\' ('+
+rawByteStatValue+') of VM region '+i+' ('+
+rawVmRegion.mf+') in process memory dump for PID='+pid+' and dump ID='+dumpId+'.'});continue;}
+byteStats[byteStatName]=parseInt(rawByteStatValue,16);}
+vmRegions[i]=new tr.model.VMRegion(parseInt(rawVmRegion.sa,16),parseInt(rawVmRegion.sz,16),rawVmRegion.pf,rawVmRegion.mf,byteStats);}
+processMemoryDump.vmRegions=tr.model.VMRegionClassificationNode.fromRegions(vmRegions);},parseMemoryDumpHeapDumps_:function(processMemoryDump,dumps,pid,dumpId){var rawHeapDumps=dumps.heaps;if(rawHeapDumps===undefined)
+return;if(processMemoryDump.heapDumps!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Heap dumps provided multiple times for'+' process memory dump for PID='+pid+' and dump ID='+dumpId+'.'});return;}
+var model=this.model_;var idPrefix='p'+pid+':';var heapDumps={};var objectTypeNameMap=this.objectTypeNameMap_[pid];if(objectTypeNameMap===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Missing mapping from object type IDs to names.'});}
+for(var allocatorName in rawHeapDumps){var entries=rawHeapDumps[allocatorName].entries;if(entries===undefined||entries.length===0){this.model_.importWarning({type:'memory_dump_parse_error',message:'No heap entries in a '+allocatorName+' heap dump for PID='+pid+' and dump ID='+dumpId+'.'});continue;}
+var isOldFormat=entries[0].bt===undefined;if(!isOldFormat&&objectTypeNameMap===undefined){continue;}
+var heapDump=new tr.model.HeapDump(processMemoryDump,allocatorName);for(var i=0;i<entries.length;i++){var entry=entries[i];var leafStackFrameIndex=entry.bt;var leafStackFrame;if(isOldFormat){if(leafStackFrameIndex===undefined){leafStackFrame=undefined;}else{var leafStackFrameId=idPrefix+leafStackFrameIndex;if(leafStackFrameIndex===''){leafStackFrame=undefined;}else{leafStackFrame=model.stackFrames[leafStackFrameId];if(leafStackFrame===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Missing leaf stack frame (ID '+
+leafStackFrameId+') of heap entry '+i+' (size '+
+size+') in a '+allocatorName+' heap dump for PID='+pid+'.'});continue;}}
+leafStackFrameId+=':self';if(model.stackFrames[leafStackFrameId]!==undefined){leafStackFrame=model.stackFrames[leafStackFrameId];}else{leafStackFrame=new tr.model.StackFrame(leafStackFrame,leafStackFrameId,'<self>',undefined);model.addStackFrame(leafStackFrame);}}}else{if(leafStackFrameIndex===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Missing stack frame ID of heap entry '+i+' (size '+size+') in a '+allocatorName+' heap dump for PID='+pid+'.'});continue;}
+var leafStackFrameId=idPrefix+leafStackFrameIndex;if(leafStackFrameIndex===''){leafStackFrame=undefined;}else{leafStackFrame=model.stackFrames[leafStackFrameId];if(leafStackFrame===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Missing leaf stack frame (ID '+leafStackFrameId+') of heap entry '+i+' (size '+size+') in a '+
+allocatorName+' heap dump for PID='+pid+'.'});continue;}}}
+var objectTypeId=entry.type;var objectTypeName;if(objectTypeId===undefined){objectTypeName=undefined;}else if(objectTypeNameMap===undefined){continue;}else{objectTypeName=objectTypeNameMap[objectTypeId];if(objectTypeName===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Missing object type name (ID '+objectTypeId+') of heap entry '+i+' (size '+size+') in a '+
+allocatorName+' heap dump for pid='+pid+'.'});continue;}}
+var size=parseInt(entry.size,16);heapDump.addEntry(leafStackFrame,objectTypeName,size);}
+if(heapDump.entries.length>0)
+heapDumps[allocatorName]=heapDump;}
+if(Object.keys(heapDumps).length>0)
+processMemoryDump.heapDumps=heapDumps;},parseMemoryDumpLevelOfDetail_:function(levelsOfDetail,dumps,pid,dumpId){var rawLevelOfDetail=dumps.level_of_detail;var level;switch(rawLevelOfDetail){case'light':level=LIGHT;break;case'detailed':level=DETAILED;break;case undefined:level=undefined;break;default:this.model_.importWarning({type:'memory_dump_parse_error',message:'unknown raw level of detail \''+rawLevelOfDetail+'\' of process memory dump for PID='+pid+' and dump ID='+dumpId+'.'});return;}
+if(!this.updateMemoryDumpLevelOfDetail_(levelsOfDetail,'process',level)){this.model_.importWarning({type:'memory_dump_parse_error',message:'diffent levels of detail provided for process memory'+' dump for PID='+pid+' (dump ID='+dumpId+').'});}},updateMemoryDumpLevelOfDetail_:function(levelsOfDetail,scope,level){if(!(scope in levelsOfDetail)||level===levelsOfDetail[scope]){levelsOfDetail[scope]=level;return true;}
+if(MEMORY_DUMP_LEVEL_OF_DETAIL_ORDER.indexOf(level)>MEMORY_DUMP_LEVEL_OF_DETAIL_ORDER.indexOf(levelsOfDetail[scope])){levelsOfDetail[scope]=level;}
+return false;},parseMemoryDumpAllocatorDumps_:function(processMemoryDump,globalMemoryDump,processMemoryAllocatorDumpsByFullName,globalMemoryAllocatorDumpsByFullName,allMemoryAllocatorDumpsByGuid,dumps,pid,dumpId){var rawAllocatorDumps=dumps.allocators;if(rawAllocatorDumps===undefined)
+return;for(var fullName in rawAllocatorDumps){var rawAllocatorDump=rawAllocatorDumps[fullName];var guid=rawAllocatorDump.guid;if(guid===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+fullName+' for PID='+pid+' and dump ID='+dumpId+' does not have a GUID.'});}
+var flags=rawAllocatorDump.flags||0;var isWeakDump=!!(flags&WEAK_MEMORY_ALLOCATOR_DUMP_FLAG);var containerMemoryDump;var dstIndex;if(fullName.startsWith(GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX)){fullName=fullName.substring(GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX.length);containerMemoryDump=globalMemoryDump;dstIndex=globalMemoryAllocatorDumpsByFullName;}else{containerMemoryDump=processMemoryDump;dstIndex=processMemoryAllocatorDumpsByFullName;}
+var allocatorDump=allMemoryAllocatorDumpsByGuid[guid];if(allocatorDump===undefined){if(fullName in dstIndex){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple GUIDs provided for'+' memory allocator dump '+fullName+': '+
+dstIndex[fullName].guid+', '+guid+' (ignored) for'+' PID='+pid+' and dump ID='+dumpId+'.'});continue;}
+allocatorDump=new tr.model.MemoryAllocatorDump(containerMemoryDump,fullName,guid);allocatorDump.weak=isWeakDump;dstIndex[fullName]=allocatorDump;if(guid!==undefined)
+allMemoryAllocatorDumpsByGuid[guid]=allocatorDump;}else{if(allocatorDump.containerMemoryDump!==containerMemoryDump){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+fullName+' (GUID='+guid+') for PID='+pid+' and dump ID='+
+dumpId+' dumped in different contexts.'});continue;}
+if(allocatorDump.fullName!==fullName){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump with GUID='+guid+' for PID='+
+pid+' and dump ID='+dumpId+' has multiple names: '+
+allocatorDump.fullName+', '+fullName+' (ignored).'});continue;}
+if(!isWeakDump){allocatorDump.weak=false;}}
+var attributes=rawAllocatorDump.attrs;if(attributes===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+fullName+' (GUID='+guid+') for PID='+pid+' and dump ID='+dumpId+' does not have attributes.'});attributes={};}
+for(var attrName in attributes){var attrArgs=attributes[attrName];var attrType=attrArgs.type;var attrValue=attrArgs.value;switch(attrType){case'scalar':if(attrName in allocatorDump.numerics){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple values provided for scalar attribute '+
+attrName+' of memory allocator dump '+fullName+' (GUID='+guid+') for PID='+pid+' and dump ID='+
+dumpId+'.'});break;}
+var unit=attrArgs.units==='bytes'?tr.v.Unit.byName.sizeInBytes_smallerIsBetter:tr.v.Unit.byName.unitlessNumber_smallerIsBetter;var value=parseInt(attrValue,16);allocatorDump.addNumeric(attrName,new tr.v.ScalarNumeric(unit,value));break;case'string':if(attrName in allocatorDump.diagnostics){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple values provided for string attribute '+
+attrName+' of memory allocator dump '+fullName+' (GUID='+guid+') for PID='+pid+' and dump ID='+
+dumpId+'.'});break;}
+allocatorDump.addDiagnostic(attrName,attrValue);break;default:this.model_.importWarning({type:'memory_dump_parse_error',message:'Unknown type provided for attribute '+attrName+' of memory allocator dump '+fullName+' (GUID='+guid+') for PID='+pid+' and dump ID='+dumpId+': '+
+attrType});break;}}}},inferMemoryAllocatorDumpTree_:function(memoryAllocatorDumpsByFullName){var rootAllocatorDumps=[];var fullNames=Object.keys(memoryAllocatorDumpsByFullName);fullNames.sort();for(var i=0;i<fullNames.length;i++){var fullName=fullNames[i];var allocatorDump=memoryAllocatorDumpsByFullName[fullName];while(true){var lastSlashIndex=fullName.lastIndexOf('/');if(lastSlashIndex===-1){rootAllocatorDumps.push(allocatorDump);break;}
+var parentFullName=fullName.substring(0,lastSlashIndex);var parentAllocatorDump=memoryAllocatorDumpsByFullName[parentFullName];var parentAlreadyExisted=true;if(parentAllocatorDump===undefined){parentAlreadyExisted=false;parentAllocatorDump=new tr.model.MemoryAllocatorDump(allocatorDump.containerMemoryDump,parentFullName);if(allocatorDump.weak!==false){parentAllocatorDump.weak=undefined;}
+memoryAllocatorDumpsByFullName[parentFullName]=parentAllocatorDump;}
+allocatorDump.parent=parentAllocatorDump;parentAllocatorDump.children.push(allocatorDump);if(parentAlreadyExisted){if(!allocatorDump.weak){while(parentAllocatorDump!==undefined&&parentAllocatorDump.weak===undefined){parentAllocatorDump.weak=false;parentAllocatorDump=parentAllocatorDump.parent;}}
+break;}
+fullName=parentFullName;allocatorDump=parentAllocatorDump;}}
+for(var fullName in memoryAllocatorDumpsByFullName){var allocatorDump=memoryAllocatorDumpsByFullName[fullName];if(allocatorDump.weak===undefined)
+allocatorDump.weak=true;}
+return rootAllocatorDumps;},parseMemoryDumpAllocatorEdges_:function(allMemoryAllocatorDumpsByGuid,dumpIdEvents,dumpId){for(var pid in dumpIdEvents){var processEvents=dumpIdEvents[pid];for(var i=0;i<processEvents.length;i++){var processEvent=processEvents[i];var dumps=processEvent.args.dumps;if(dumps===undefined)
+continue;var rawEdges=dumps.allocators_graph;if(rawEdges===undefined)
+continue;for(var j=0;j<rawEdges.length;j++){var rawEdge=rawEdges[j];var sourceGuid=rawEdge.source;var sourceDump=allMemoryAllocatorDumpsByGuid[sourceGuid];if(sourceDump===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Edge for PID='+pid+' and dump ID='+dumpId+' is missing source memory allocator dump (GUID='+
+sourceGuid+').'});continue;}
+var targetGuid=rawEdge.target;var targetDump=allMemoryAllocatorDumpsByGuid[targetGuid];if(targetDump===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Edge for PID='+pid+' and dump ID='+dumpId+' is missing target memory allocator dump (GUID='+
+targetGuid+').'});continue;}
+var importance=rawEdge.importance;var edge=new tr.model.MemoryAllocatorDumpLink(sourceDump,targetDump,importance);switch(rawEdge.type){case'ownership':if(sourceDump.owns!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+sourceDump.fullName+' (GUID='+sourceGuid+') already owns a memory'+' allocator dump ('+
+sourceDump.owns.target.fullName+').'});}else{sourceDump.owns=edge;targetDump.ownedBy.push(edge);}
+break;case'retention':sourceDump.retains.push(edge);targetDump.retainedBy.push(edge);break;default:this.model_.importWarning({type:'memory_dump_parse_error',message:'Invalid edge type: '+rawEdge.type+' (PID='+pid+', dump ID='+dumpId+', source='+sourceGuid+', target='+targetGuid+', importance='+importance+').'});}}}}}};tr.importer.Importer.register(TraceEventImporter);return{TraceEventImporter:TraceEventImporter};});'use strict';tr.exportTo('tr.e.measure',function(){var AsyncSlice=tr.model.AsyncSlice;function MeasureAsyncSlice(){this.groupTitle_='Ungrouped Measure';var matched=/([^\/:]+):([^\/:]+)\/?(.*)/.exec(arguments[1]);if(matched!==null){arguments[1]=matched[2];this.groupTitle_=matched[1];}
+AsyncSlice.apply(this,arguments);}
+MeasureAsyncSlice.prototype={__proto__:AsyncSlice.prototype,get viewSubGroupTitle(){return this.groupTitle_;},get title(){return this.title_;},set title(title){this.title_=title;}};AsyncSlice.register(MeasureAsyncSlice,{categoryParts:['blink.user_timing']});return{MeasureAsyncSlice:MeasureAsyncSlice};});'use strict';tr.exportTo('tr.e.net',function(){var AsyncSlice=tr.model.AsyncSlice;function NetAsyncSlice(){AsyncSlice.apply(this,arguments);this.url_=undefined;this.byteCount_=undefined;this.isTitleComputed_=false;this.isUrlComputed_=false;}
+NetAsyncSlice.prototype={__proto__:AsyncSlice.prototype,get viewSubGroupTitle(){return'NetLog';},get title(){if(this.isTitleComputed_||!this.isTopLevel)
+return this.title_;if(this.url!==undefined&&this.url.length>0){this.title_=this.url;}else if(this.args!==undefined&&this.args.source_type!==undefined){this.title_=this.args.source_type;}
+this.isTitleComputed_=true;return this.title_;},set title(title){this.title_=title;},get url(){if(this.isUrlComputed_)
+return this.url_;if(this.args!==undefined&&this.args.params!==undefined&&this.args.params.url!==undefined){this.url_=this.args.params.url;}else if(this.subSlices!==undefined&&this.subSlices.length>0){for(var i=0;i<this.subSlices.length&&!this.url_;i++){if(this.subSlices[i].url!==undefined)
+this.url_=this.subSlices[i].url;}}
+this.isUrlComputed_=true;return this.url_;},get byteCount(){if(this.byteCount_!==undefined)
+return this.byteCount_;this.byteCount_=0;if((this.originalTitle==='URL_REQUEST_JOB_FILTERED_BYTES_READ'||this.originalTitle==='URL_REQUEST_JOB_BYTES_READ')&&this.args!==undefined&&this.args.params!==undefined&&this.args.params.byte_count!==undefined){this.byteCount_=this.args.params.byte_count;}
+for(var i=0;i<this.subSlices.length;i++){this.byteCount_+=this.subSlices[i].byteCount;}
+return this.byteCount_;}};AsyncSlice.register(NetAsyncSlice,{categoryParts:['netlog','disabled-by-default-netlog']});return{NetAsyncSlice:NetAsyncSlice};});'use strict';tr.exportTo('tr.model',function(){var ColorScheme=tr.b.ColorScheme;function Activity(name,category,range,args){tr.model.TimedEvent.call(this,range.min);this.title=name;this.category=category;this.colorId=ColorScheme.getColorIdForGeneralPurposeString(name);this.duration=range.duration;this.args=args;this.name=name;};Activity.prototype={__proto__:tr.model.TimedEvent.prototype,shiftTimestampsForward:function(amount){this.start+=amount;},addBoundsToRange:function(range){range.addValue(this.start);range.addValue(this.end);}};return{Activity:Activity};});'use strict';tr.exportTo('tr.e.importer.android',function(){var Importer=tr.importer.Importer;var ACTIVITY_STATE={NONE:'none',CREATED:'created',STARTED:'started',RESUMED:'resumed',PAUSED:'paused',STOPPED:'stopped',DESTROYED:'destroyed'};var activityMap={};function EventLogImporter(model,events){this.model_=model;this.events_=events;this.importPriority=3;}
 var eventLogActivityRE=new RegExp('(\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+)'+'\\s+(\\d+)\\s+(\\d+)\\s+([A-Z])\\s*'+'(am_\\w+)\\s*:(.*)');var amCreateRE=new RegExp('\s*\\[.*,.*,.*,(.*),.*,.*,.*,.*\\]');var amFocusedRE=new RegExp('\s*\\[\\d+,(.*)\\]');var amProcStartRE=new RegExp('\s*\\[\\d+,\\d+,\\d+,.*,activity,(.*)\\]');var amOnResumeRE=new RegExp('\s*\\[\\d+,(.*)\\]');var amOnPauseRE=new RegExp('\s*\\[\\d+,(.*)\\]');var amLaunchTimeRE=new RegExp('\s*\\[\\d+,\\d+,(.*),(\\d+),(\\d+)');var amDestroyRE=new RegExp('\s*\\[\\d+,\\d+,\\d+,(.*)\\]');EventLogImporter.canImport=function(events){if(!(typeof(events)==='string'||events instanceof String))
-return false;return eventLogActivityRE.test(events);};EventLogImporter.prototype={__proto__:Importer.prototype,get model(){return this.model_;},getFullActivityName:function(component){var componentSplit=component.split('/');if(componentSplit[1].startsWith('.'))
+return false;if(/^<!DOCTYPE html>/.test(events))
+return false;return eventLogActivityRE.test(events);};EventLogImporter.prototype={__proto__:Importer.prototype,get importerName(){return'EventLogImporter';},get model(){return this.model_;},getFullActivityName:function(component){var componentSplit=component.split('/');if(componentSplit[1].startsWith('.'))
 return componentSplit[0]+componentSplit[1];return componentSplit[1];},getProcName:function(component){var componentSplit=component.split('/');return componentSplit[0];},findOrCreateActivity:function(activityName){if(activityName in activityMap)
 return activityMap[activityName];var activity={state:ACTIVITY_STATE.NONE,name:activityName};activityMap[activityName]=activity;return activity;},deleteActivity:function(activityName){delete activityMap[activityName];},handleCreateActivity:function(ts,activityName){var activity=this.findOrCreateActivity(activityName);activity.state=ACTIVITY_STATE.CREATED;activity.createdTs=ts;},handleFocusActivity:function(ts,procName,activityName){var activity=this.findOrCreateActivity(activityName);activity.lastFocusedTs=ts;},handleProcStartForActivity:function(ts,activityName){var activity=this.findOrCreateActivity(activityName);activity.procStartTs=ts;},handleOnResumeCalled:function(ts,pid,activityName){var activity=this.findOrCreateActivity(activityName);activity.state=ACTIVITY_STATE.RESUMED;activity.lastResumeTs=ts;activity.pid=pid;},handleOnPauseCalled:function(ts,activityName){var activity=this.findOrCreateActivity(activityName);activity.state=ACTIVITY_STATE.PAUSED;activity.lastPauseTs=ts;if(ts>this.model_.bounds.min&&ts<this.model_.bounds.max)
 this.addActivityToProcess(activity);},handleLaunchTime:function(ts,activityName,launchTime){var activity=this.findOrCreateActivity(activityName);activity.launchTime=launchTime;},handleDestroyActivity:function(ts,activityName){this.deleteActivity(activityName);},addActivityToProcess:function(activity){if(activity.pid===undefined)
@@ -3720,28 +4725,31 @@
 match[1].substring(5,match[1].length);var monotonic_ts=Date.parse(ts)+
 this.model_.realtime_to_monotonic_offset_ms;var pid=match[2];var action=match[5];var data=match[6];if(action==='am_create_activity'){match=amCreateRE.exec(data);if(match&&match.length>=2){this.handleCreateActivity(monotonic_ts,this.getFullActivityName(match[1]));}}else if(action==='am_focused_activity'){match=amFocusedRE.exec(data);if(match&&match.length>=2){this.handleFocusActivity(monotonic_ts,this.getProcName(match[1]),this.getFullActivityName(match[1]));}}else if(action==='am_proc_start'){match=amProcStartRE.exec(data);if(match&&match.length>=2){this.handleProcStartForActivity(monotonic_ts,this.getFullActivityName(match[1]));}}else if(action==='am_on_resume_called'){match=amOnResumeRE.exec(data);if(match&&match.length>=2)
 this.handleOnResumeCalled(monotonic_ts,pid,match[1]);}else if(action==='am_on_paused_called'){match=amOnPauseRE.exec(data);if(match&&match.length>=2)
-this.handleOnPauseCalled(monotonic_ts,match[1]);}else if(action==='am_activity_launch_time'){match=amLaunchTimeRE.exec(data);this.handleLaunchTime(monotonic_ts,this.getFullActivityName(match[1]),match[2]);}else if(action==='am_destroy_activity'){match=amDestroyRE.exec(data);if(match&&match.length==2){this.handleDestroyActivity(monotonic_ts,this.getFullActivityName(match[1]));}}},importEvents:function(isSecondaryImport){if(isNaN(this.model_.realtime_to_monotonic_offset_ms)){this.model_.importWarning({type:'eveng_log_clock_sync',message:'Need a trace_event_clock_sync to map realtime to import.'});return;}
-this.model_.updateBounds();var lines=this.events_.split('\n');lines.forEach(this.parseAmLine_,this);for(var activityName in activityMap){var activity=activityMap[activityName];if(activity.state==ACTIVITY_STATE.RESUMED){activity.lastPauseTs=this.model_.bounds.max;this.addActivityToProcess(activity);}}}};Importer.register(EventLogImporter);return{EventLogImporter:EventLogImporter};});'use strict';tr.exportTo('tr.e.importer.battor',function(){function BattorImporter(model,events){this.importPriority=3;this.sampleRate_=undefined;this.model_=model;this.events_=events;}
-var TestExports={};var battorDataLineRE=/^(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)$/;var battorHeaderLineRE=/^# BattOr/;var sampleRateLineRE=/^# sample_rate=(\d+)Hz/;BattorImporter.canImport=function(events){if(!(typeof(events)==='string'||events instanceof String))
-return false;return battorHeaderLineRE.test(events);};BattorImporter.prototype={__proto__:tr.importer.Importer.prototype,get model(){return this.model_;},importEvents:function(isSecondaryImport){if(this.model_.device.powerSeries){this.model_.importWarning({type:'import_error',message:'Power counter exists, can not import BattOr power trace.'});return;}
-var name='power';var series=new tr.model.PowerSeries(this.model_.device);this.importPowerSamples(series);var syncMarks=this.model_.getClockSyncRecordsNamed('battor');if(syncMarks.length<1){this.model_.importWarning({type:'clock_sync',message:'Cannot import BattOr power trace without a sync signal.'});return;}
-var shiftTs=this.correlationClockSync(syncMarks,series);if(shiftTs===undefined){this.model_.importWarning({type:'clock_sync',message:'All of the BattOr power trace clock sync techinques failed.'});return;}
+this.handleOnPauseCalled(monotonic_ts,match[1]);}else if(action==='am_activity_launch_time'){match=amLaunchTimeRE.exec(data);this.handleLaunchTime(monotonic_ts,this.getFullActivityName(match[1]),match[2]);}else if(action==='am_destroy_activity'){match=amDestroyRE.exec(data);if(match&&match.length==2){this.handleDestroyActivity(monotonic_ts,this.getFullActivityName(match[1]));}}},importEvents:function(){if(isNaN(this.model_.realtime_to_monotonic_offset_ms)){this.model_.importWarning({type:'eveng_log_clock_sync',message:'Need a trace_event_clock_sync to map realtime to import.'});return;}
+this.model_.updateBounds();var lines=this.events_.split('\n');lines.forEach(this.parseAmLine_,this);for(var activityName in activityMap){var activity=activityMap[activityName];if(activity.state==ACTIVITY_STATE.RESUMED){activity.lastPauseTs=this.model_.bounds.max;this.addActivityToProcess(activity);}}}};Importer.register(EventLogImporter);return{EventLogImporter:EventLogImporter};});'use strict';tr.exportTo('tr.e.importer.battor',function(){function BattorImporter(model,events){this.importPriority=3;this.sampleRate_=undefined;this.model_=model;this.events_=events;this.explicitSyncMark_=undefined;}
+var TestExports={};var battorDataLineRE=new RegExp('^(\\d+\\.\\d+)\\s+(\\d+\\.\\d+)\\s+(\\d+\\.\\d+)'+'(?:\\s+<(\\S+)>)?$');var battorHeaderLineRE=/^# BattOr/;var sampleRateLineRE=/^# sample_rate (\d+) Hz/;BattorImporter.canImport=function(events){if(!(typeof(events)==='string'||events instanceof String))
+return false;return battorHeaderLineRE.test(events);};BattorImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'BattorImporter';},get model(){return this.model_;},importEvents:function(){if(this.model_.device.powerSeries){this.model_.importWarning({type:'import_error',message:'Power counter exists, can not import BattOr power trace.'});return;}
+var name='power';var series=new tr.model.PowerSeries(this.model_.device);this.importPowerSamples(series);var battorSyncMarks=this.model_.getClockSyncRecordsWithSyncId('battor');var shiftTs=undefined;shiftTs=this.correlationClockSync(battorSyncMarks,series);if(shiftTs===undefined)
+shiftTs=this.explicitClockSync();if(shiftTs===undefined){this.model_.importWarning({type:'clock_sync',message:'All of the BattOr power trace clock sync techinques failed.'});return;}
 series.shiftTimestampsForward(shiftTs);this.model_.device.powerSeries=series;},importPowerSamples:function(series){var lines=this.events_.split('\n');this.model_.updateBounds();var minTs=0;if(this.model_.bounds.min!==undefined)
 minTs=this.model_.bounds.min;lines.forEach(function(line){line=line.trim();if(line.length===0)
 return;if(/^#/.test(line)){groups=sampleRateLineRE.exec(line);if(!groups)
 return;this.sampleRate_=parseInt(groups[1]);}else{var groups=battorDataLineRE.exec(line);if(!groups){this.model_.importWarning({type:'parse_error',message:'Unrecognized line: '+line});return;}
-var time=parseFloat(groups[1])+minTs;var voltage_mV=parseFloat(groups[2]);var current_mA=parseFloat(groups[3]);series.addPowerSample(time,(voltage_mV*current_mA)/1000);}},this);},correlationClockSync:function(syncMarks,series){var syncCtr=this.model_.kernel.counters['null.vreg '+syncMarks[0].args['regulator']+' enabled'];if(syncCtr===undefined){this.model_.importWarning({type:'clock_sync',message:'Cannot correlate BattOr power trace without sync vreg.'});return undefined;}
-var syncEvents=[];var firstSyncEventTs=undefined;syncCtr.series[0].iterateAllEvents(function(event){if(event.timestamp>=syncMarks[0].ts&&event.timestamp<=syncMarks[1].ts){if(firstSyncEventTs===undefined)
+var time=parseFloat(groups[1])+minTs;var voltage_mV=parseFloat(groups[2]);var current_mA=parseFloat(groups[3]);series.addPowerSample(time,(voltage_mV*current_mA)/1000);if(groups[4]!==undefined&&this.explicitSyncMark_===undefined){var id=groups[4];this.explicitSyncMark_={'id':id,'ts':time};}}},this);},correlationClockSync:function(syncMarks,series){if(syncMarks.length!==2)
+return undefined;var syncCtr=this.model_.kernel.counters['null.vreg '+syncMarks[0].args['regulator']+' enabled'];if(syncCtr===undefined){this.model_.importWarning({type:'clock_sync',message:'Cannot correlate BattOr power trace without sync vreg.'});return undefined;}
+var syncEvents=[];var firstSyncEventTs=undefined;syncCtr.series[0].iterateAllEvents(function(event){if(event.timestamp>=syncMarks[0].start&&event.timestamp<=syncMarks[1].start){if(firstSyncEventTs===undefined)
 firstSyncEventTs=event.timestamp;var newEvent={'ts':(event.timestamp-firstSyncEventTs)/1000,'val':event.value};syncEvents.push(newEvent);}});var syncSamples=[];var syncNumSamples=Math.ceil(syncEvents[syncEvents.length-1].ts*this.sampleRate_);for(var i=1;i<syncEvents.length;i++){var sampleStartIdx=Math.ceil(syncEvents[i-1].ts*this.sampleRate_);var sampleEndIdx=Math.ceil(syncEvents[i].ts*this.sampleRate_);for(var j=sampleStartIdx;j<sampleEndIdx;j++){syncSamples[j]=syncEvents[i-1].val;}}
 var powerSamples=series.samples;if(powerSamples.length<syncSamples.length){this.model_.importWarning({type:'not_enough_samples',message:'Not enough power samples to correlate with sync signal.'});return undefined;}
 var maxShift=powerSamples.length-syncSamples.length;var minShift=0;var corrNumSamples=this.sampleRate_*5.0;if(powerSamples.length>corrNumSamples)
 minShift=powerSamples.length-corrNumSamples;var corr=[];for(var shift=minShift;shift<=maxShift;shift++){var corrSum=0;var powerAvg=0;for(var i=0;i<syncSamples.length;i++){corrSum+=(powerSamples[i+shift].power*syncSamples[i]);powerAvg+=powerSamples[i+shift].power;}
 powerAvg=powerAvg/syncSamples.length;corr.push(corrSum/powerAvg);}
 var corrPeakIdx=0;var corrPeak=0;for(var i=0;i<powerSamples.length;i++){if(corr[i]>corrPeak){corrPeak=corr[i];corrPeakIdx=i;}}
-var corrPeakTs=((minShift+corrPeakIdx)/this.sampleRate_);corrPeakTs*=1000;var syncStartTs=firstSyncEventTs-this.model_.bounds.min;var shiftTs=syncStartTs-corrPeakTs;return shiftTs;}};tr.importer.Importer.register(BattorImporter);return{BattorImporter:BattorImporter,_BattorImporterTestExports:TestExports};});!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,f,g,h,i,j="",k=0;k<a.length;)b=a.charCodeAt(k++),c=a.charCodeAt(k++),e=a.charCodeAt(k++),f=b>>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<a.length;)f=d.indexOf(a.charAt(k++)),g=d.indexOf(a.charAt(k++)),h=d.indexOf(a.charAt(k++)),i=d.indexOf(a.charAt(k++)),b=f<<2|g>>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<a||0>a)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":21}],6:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.comment=null},{}],7:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":21}],8:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){return e.deflateRaw(a)},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a("./base64");c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./deprecatedPublicUtils"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;g<e.length;g++)h=e[g],this.file(h.fileName,h.decompressed,{binary:!0,optimizedBinaryString:!0,date:h.date,dir:h.dir,comment:h.fileComment.length?h.fileComment:null,createFolders:b.createFolders});return f.zipComment.length&&(this.comment=f.zipComment),this}},{"./base64":1,"./zipEntries":22}],11:[function(a,b){(function(a){"use strict";b.exports=function(b,c){return new a(b,c)},b.exports.test=function(b){return a.isBuffer(b)}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],12:[function(a,b){"use strict";function c(a){this.data=a,this.length=this.data.length,this.index=0}var d=a("./uint8ArrayReader");c.prototype=new d,c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./uint8ArrayReader":18}],13:[function(a,b){"use strict";var c=a("./support"),d=a("./utils"),e=a("./crc32"),f=a("./signature"),g=a("./defaults"),h=a("./base64"),i=a("./compressions"),j=a("./compressedObject"),k=a("./nodeBuffer"),l=a("./utf8"),m=a("./stringWriter"),n=a("./uint8ArrayWriter"),o=function(a){if(a._data instanceof j&&(a._data=a._data.getContent(),a.options.binary=!0,a.options.base64=!1,"uint8array"===d.getTypeOf(a._data))){var b=a._data;a._data=new Uint8Array(b.length),0!==b.length&&a._data.set(b,0)}return a._data},p=function(a){var b=o(a),e=d.getTypeOf(b);return"string"===e?!a.options.binary&&c.nodebuffer?k(b,"utf-8"):a.asBinary():b},q=function(a){var b=o(this);return null===b||"undefined"==typeof b?"":(this.options.base64&&(b=h.decode(b)),b=a&&this.options.binary?A.utf8decode(b):d.transformTo("string",b),a||this.options.binary||(b=d.transformTo("string",A.utf8encode(b))),b)},r=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this._data=b,this.options=c,this._initialMetadata={dir:c.dir,date:c.date}};r.prototype={asText:function(){return q.call(this,!0)},asBinary:function(){return q.call(this,!1)},asNodeBuffer:function(){var a=p(this);return d.transformTo("nodebuffer",a)},asUint8Array:function(){var a=p(this);return d.transformTo("uint8array",a)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var s=function(a,b){var c,d="";for(c=0;b>c;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c},u=function(a){return a=a||{},a.base64!==!0||null!==a.binary&&void 0!==a.binary||(a.binary=!0),a=t(a,g),a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),a},v=function(a,b,c){var e,f=d.getTypeOf(b);if(c=u(c),c.createFolders&&(e=w(a))&&x.call(this,e,!0),c.dir||null===b||"undefined"==typeof b)c.base64=!1,c.binary=!1,b=null;else if("string"===f)c.binary&&!c.base64&&c.optimizedBinaryString!==!0&&(b=d.string2binary(b));else{if(c.base64=!1,c.binary=!0,!(f||b instanceof j))throw new Error("The data of '"+a+"' is in an unsupported format !");"arraybuffer"===f&&(b=d.transformTo("uint8array",b))}var g=new r(a,b,c);return this.files[a]=g,g},w=function(a){"/"==a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},x=function(a,b){return"/"!=a.slice(-1)&&(a+="/"),b="undefined"!=typeof b?b:!1,this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},y=function(a,b){var c,f=new j;return a._data instanceof j?(f.uncompressedSize=a._data.uncompressedSize,f.crc32=a._data.crc32,0===f.uncompressedSize||a.dir?(b=i.STORE,f.compressedContent="",f.crc32=0):a._data.compressionMethod===b.magic?f.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c)))):(c=p(a),(!c||0===c.length||a.dir)&&(b=i.STORE,c=""),f.uncompressedSize=c.length,f.crc32=e(c),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c))),f.compressedSize=f.compressedContent.length,f.compressionMethod=b.magic,f},z=function(a,b,c,g){var h,i,j,k,m=(c.compressedContent,d.transformTo("string",l.utf8encode(b.name))),n=b.comment||"",o=d.transformTo("string",l.utf8encode(n)),p=m.length!==b.name.length,q=o.length!==n.length,r=b.options,t="",u="",v="";j=b._initialMetadata.dir!==b.dir?b.dir:r.dir,k=b._initialMetadata.date!==b.date?b.date:r.date,h=k.getHours(),h<<=6,h|=k.getMinutes(),h<<=5,h|=k.getSeconds()/2,i=k.getFullYear()-1980,i<<=4,i|=k.getMonth()+1,i<<=5,i|=k.getDate(),p&&(u=s(1,1)+s(e(m),4)+m,t+="up"+s(u.length,2)+u),q&&(v=s(1,1)+s(this.crc32(o),4)+o,t+="uc"+s(v.length,2)+v);var w="";w+="\n\x00",w+=p||q?"\x00\b":"\x00\x00",w+=c.compressionMethod,w+=s(h,2),w+=s(i,2),w+=s(c.crc32,4),w+=s(c.compressedSize,4),w+=s(c.uncompressedSize,4),w+=s(m.length,2),w+=s(t.length,2);var x=f.LOCAL_FILE_HEADER+w+m+t,y=f.CENTRAL_FILE_HEADER+"\x00"+w+s(o.length,2)+"\x00\x00\x00\x00"+(j===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+s(g,4)+m+t+o;return{fileRecord:x,dirRecord:y,compressedObject:c}},A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=x.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){a=t(a||{},{base64:!0,compression:"STORE",type:"base64",comment:null}),d.checkSupport(a.type);var b,c,e=[],g=0,j=0,k=d.transformTo("string",this.utf8encode(a.comment||this.comment||""));for(var l in this.files)if(this.files.hasOwnProperty(l)){var o=this.files[l],p=o.options.compression||a.compression.toUpperCase(),q=i[p];if(!q)throw new Error(p+" is not a valid compression method !");var r=y.call(this,o,q),u=z.call(this,l,o,r,g);g+=u.fileRecord.length+r.compressedSize,j+=u.dirRecord.length,e.push(u)}var v="";v=f.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+s(e.length,2)+s(e.length,2)+s(j,4)+s(g,4)+s(k.length,2)+k;var w=a.type.toLowerCase();for(b="uint8array"===w||"arraybuffer"===w||"blob"===w||"nodebuffer"===w?new n(g+j+v.length):new m(g+j+v.length),c=0;c<e.length;c++)b.append(e[c].fileRecord),b.append(e[c].compressedObject.compressedContent);for(c=0;c<e.length;c++)b.append(e[c].dirRecord);b.append(v);var x=b.finalize();switch(a.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return d.transformTo(a.type.toLowerCase(),x);case"blob":return d.arrayBuffer2Blob(d.transformTo("arraybuffer",x));case"base64":return a.base64?h.encode(x):x;default:return x}},crc32:function(a,b){return e(a,b)},utf8encode:function(a){return d.transformTo("string",l.utf8encode(a))},utf8decode:function(a){return l.utf8decode(a)}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],15:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5,"./utils":21}],16:[function(a,b){"use strict";var c=a("./utils"),d=function(){this.data=[]};d.prototype={append:function(a){a=c.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}},b.exports=d},{"./utils":21}],17:[function(a,b,c){(function(a){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof a,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var b=new ArrayBuffer(0);try{c.blob=0===new Blob([b],{type:"application/zip"}).size}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;f.append(b),c.blob=0===f.getBlob("application/zip").size}catch(d){c.blob=!1}}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],18:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5}],19:[function(a,b){"use strict";var c=a("./utils"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{"./utils":21}],20:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(e.uint8array?k(a.subarray(c,h)):k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function f(a){var b=65536,d=[],e=a.length,f=c.getTypeOf(a),g=0,h=!0;try{switch(f){case"uint8array":String.fromCharCode.apply(null,new Uint8Array(0));break;case"nodebuffer":String.fromCharCode.apply(null,j(0))}}catch(i){h=!1}if(!h){for(var k="",l=0;l<a.length;l++)k+=String.fromCharCode(a[l]);return k}for(;e>g&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var h=a("./support"),i=a("./compressions"),j=a("./nodeBuffer");c.string2binary=function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(255&a.charCodeAt(c));return b},c.arrayBuffer2Blob=function(a){c.checkSupport("blob");try{return new Blob([a],{type:"application/zip"})}catch(b){try{var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,e=new d;return e.append(a),e.getBlob("application/zip")}catch(b){throw new Error("Bug : can't construct the Blob.")}}},c.applyFromCharCode=f;var k={};k.string={string:d,array:function(a){return e(a,new Array(a.length))},arraybuffer:function(a){return k.string.uint8array(a).buffer},uint8array:function(a){return e(a,new Uint8Array(a.length))},nodebuffer:function(a){return e(a,j(a.length))}},k.array={string:f,array:d,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(a)}},k.arraybuffer={string:function(a){return f(new Uint8Array(a))},array:function(a){return g(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:d,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(new Uint8Array(a))}},k.uint8array={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:d,nodebuffer:function(a){return j(a)}},k.nodebuffer={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return k.nodebuffer.uint8array(a).buffer},uint8array:function(a){return g(a,new Uint8Array(a.length))},nodebuffer:d},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=k[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":h.nodebuffer&&j.test(a)?"nodebuffer":h.uint8array&&a instanceof Uint8Array?"uint8array":h.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=h[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this browser")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(16>b?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support"),k=a("./object");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(h.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===h.CENTRAL_FILE_HEADER;)a=new i({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(h.CENTRAL_DIRECTORY_END);if(-1===a)throw new Error("Corrupted zip : can't find end of central directory");if(this.reader.setIndex(a),this.checkSignature(h.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===g.MAX_VALUE_16BITS||this.diskWithCentralDirStart===g.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===g.MAX_VALUE_16BITS||this.centralDirRecords===g.MAX_VALUE_16BITS||this.centralDirSize===g.MAX_VALUE_32BITS||this.centralDirOffset===g.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),-1===a)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");this.reader.setIndex(a),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}},prepareReader:function(a){var b=g.getTypeOf(a);this.reader="string"!==b||j.uint8array?"nodebuffer"===b?new e(a):new f(g.transformTo("uint8array",a)):new d(a,this.loadOptions.optimizedBinaryString)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=c},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(a,b){"use strict";function c(a,b){this.options=a,this.loadOptions=b}var d=a("./stringReader"),e=a("./utils"),f=a("./compressedObject"),g=a("./object");c.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(a,b,c){return function(){var d=a.index;a.setIndex(b);var e=a.readData(c);return a.setIndex(d),e}},prepareContent:function(a,b,c,d,f){return function(){var a=e.transformTo(d.uncompressInputType,this.getCompressedContent()),b=d.uncompress(a);if(b.length!==f)throw new Error("Bug : uncompressed data size mismatch");return b}},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readString(this.fileNameLength),a.skip(c),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(b=e.findCompression(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+e.pretty(this.compressionMethod)+" unknown (inner file : "+this.fileName+")");if(this.decompressed=new f,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=e.transformTo("string",this.decompressed.getContent()),g.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(a){if(this.versionMadeBy=a.readString(2),this.versionNeeded=a.readInt(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4),this.fileNameLength=a.readInt(2),this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=a.readString(this.fileNameLength),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readString(this.fileCommentLength),this.dir=16&this.externalFileAttributes?!0:!1},parseZIP64ExtraField:function(){if(this.extraFields[1]){var a=new d(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index<e+this.extraFieldsLength;)b=a.readInt(2),c=a.readInt(2),d=a.readString(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){if(this.useUTF8())this.fileName=g.utf8decode(this.fileName),this.fileComment=g.utf8decode(this.fileComment);else{var a=this.findExtraFieldUnicodePath();null!==a&&(this.fileName=a);var b=this.findExtraFieldUnicodeComment();null!==b&&(this.fileComment=b)}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileName)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileComment)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null}},b.exports=c},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(a,b){"use strict";var c=a("./lib/utils/common").assign,d=a("./lib/deflate"),e=a("./lib/inflate"),f=a("./lib/zlib/constants"),g={};c(g,d,e,f),b.exports=g},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(a,b,c){"use strict";function d(a,b){var c=new s(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}function f(a,b){return b=b||{},b.gzip=!0,d(a,b)}var g=a("./zlib/deflate.js"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=0,m=4,n=0,o=1,p=-1,q=0,r=8,s=function(a){this.options=h.assign({level:p,method:r,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":27}],29:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+hb-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<hb)););}while(a.lookahead<jb&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c)),a.match_length>=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function p(a,b){for(var c,d,e;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=hb-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===S||a.match_length===hb&&a.strstart-a.match_start>4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=hb-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return sb}else if(a.match_available){if(d=D._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return sb}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=D._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ib){if(m(a),a.lookahead<=ib&&b===H)return sb;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+hb-1)/hb),i.window=new C.Buf8(2*i.w_size),i.head=new C.Buf16(i.hash_size),i.prev=new C.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new C.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(a,b){"use strict";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<<e.lenbits)-1,u=(1<<e.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){e.mode=d;break a}a.msg="invalid literal/length code",e.mode=c;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",e.mode=c;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab=0,Bb=new r.Buf8(4),Cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xb=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<<wb,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg="unknown compression method",c.mode=lb;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=lb;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=lb;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Cb[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have<c.nlen+c.ndist;){for(;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(rb&&0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.lencode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<<c.distbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.distcode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=lb;break}m=0,n=0}c.mode=jb;case jb:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=lb;break}m=0,n=0}c.mode=kb;case kb:xb=D;break a;case lb:xb=G;break a;case mb:return H;case nb:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<lb&&(c.mode<ib||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=mb,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===bb||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xb===C&&(xb=I),xb)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,ab=19,bb=20,cb=21,db=22,eb=23,fb=24,gb=25,hb=26,ib=27,jb=28,kb=29,lb=30,mb=31,nb=32,ob=852,pb=592,qb=15,rb=qb,sb=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(a,b){"use strict";var c=a("../utils/common"),d=15,e=852,f=592,g=0,h=1,i=2,j=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,n,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new c.Buf16(d+1),Q=new c.Buf16(d+1),R=null,S=0;for(D=0;d>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===h&&L>e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===h&&L>e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<<a.bi_valid&65535,f(a,a.bi_buf),a.bi_buf=b>>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function h(a,b,c){g(a,c[2*b],c[2*b+1])}function i(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<<ab[d];a++)gb[e++]=d;for(e>>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<<ab[d]-7;a++)gb[256+e++]=d;for(b=0;U>=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function r(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&q(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!q(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function s(a,b,c){var d,f,i,j,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],f=a.pending_buf[a.l_buf+k],k++,0===d?h(a,f,b):(i=hb[f],h(a,i+P+1,b),j=_[i],0!==j&&(f-=ib[i],g(a,f,j)),d--,i=e(d),h(a,i,c),j=ab[i],0!==j&&(d-=jb[i],g(a,d,j)));while(k<a.last_lit);h(a,X,b)}function t(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=T,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++j<k&&e===i)){if(l>j){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":27}],39:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)});'use strict';if(tr.isHeadless){global.window={};}'use strict';if(tr.isHeadless){global.JSZip=global.window.JSZip;global.window=undefined;}'use strict';tr.exportTo('tr.e.importer.ddms',function(){var kPid=0;var kCategory='java';var kMethodLutEndMarker='\n*end\n';var kThreadsStart='\n*threads\n';var kMethodsStart='\n*methods\n';var kTraceMethodEnter=0x00;var kTraceMethodExit=0x01;var kTraceUnroll=0x02;var kTraceMethodActionMask=0x03;var kTraceHeaderLength=32;var kTraceMagicValue=0x574f4c53;var kTraceVersionSingleClock=2;var kTraceVersionDualClock=3;var kTraceRecordSizeSingleClock=10;var kTraceRecordSizeDualClock=14;function Reader(string_payload){this.position_=0;this.data_=JSZip.utils.transformTo('uint8array',string_payload);}
+var corrPeakTs=((minShift+corrPeakIdx)/this.sampleRate_);corrPeakTs*=1000;var syncStartTs=firstSyncEventTs-this.model_.bounds.min;var shiftTs=syncStartTs-corrPeakTs;return shiftTs;},explicitClockSync:function(){if(this.explicitSyncMark_===undefined)
+return undefined;var syncMarks=this.model.getClockSyncRecordsWithSyncId(this.explicitSyncMark_['id']);if(syncMarks.length!==1){this.model_.importWarning({type:'missing_sync_marker',message:'No single clock sync record found for explicit clock sync.'});return undefined;}
+var clockSync=syncMarks[0];var syncTs=clockSync.start;var traceTs=this.explicitSyncMark_['ts'];return syncTs-traceTs;},foundExplicitSyncMark:function(){return this.explicitSyncMark_!==undefined;}};tr.importer.Importer.register(BattorImporter);return{BattorImporter:BattorImporter,_BattorImporterTestExports:TestExports};});'use strict';tr.exportTo('tr.e.importer.ddms',function(){var kPid=0;var kCategory='java';var kMethodLutEndMarker='\n*end\n';var kThreadsStart='\n*threads\n';var kMethodsStart='\n*methods\n';var kTraceMethodEnter=0x00;var kTraceMethodExit=0x01;var kTraceUnroll=0x02;var kTraceMethodActionMask=0x03;var kTraceHeaderLength=32;var kTraceMagicValue=0x574f4c53;var kTraceVersionSingleClock=2;var kTraceVersionDualClock=3;var kTraceRecordSizeSingleClock=10;var kTraceRecordSizeDualClock=14;function Reader(string_payload){this.position_=0;this.data_=JSZip.utils.transformTo('uint8array',string_payload);}
 Reader.prototype={__proto__:Object.prototype,uint8:function(){var result=this.data_[this.position_];this.position_+=1;return result;},uint16:function(){var result=0;result+=this.uint8();result+=this.uint8()<<8;return result;},uint32:function(){var result=0;result+=this.uint8();result+=this.uint8()<<8;result+=this.uint8()<<16;result+=this.uint8()<<24;return result;},uint64:function(){var low=this.uint32();var high=this.uint32();var low_str=('0000000'+low.toString(16)).substr(-8);var high_str=('0000000'+high.toString(16)).substr(-8);var result=high_str+low_str;return result;},seekTo:function(position){this.position_=position;},hasMore:function(){return this.position_<this.data_.length;}};function DdmsImporter(model,data){this.importPriority=3;this.model_=model;this.data_=data;}
 DdmsImporter.canImport=function(data){if(typeof(data)==='string'||data instanceof String){var header=data.slice(0,1000);return header.startsWith('*version\n')&&header.indexOf('\nvm=')>=0&&header.indexOf(kThreadsStart)>=0;}
-return false;};DdmsImporter.prototype={__proto__:tr.importer.Importer.prototype,get model(){return this.model_;},importEvents:function(isSecondaryImport){var divider=this.data_.indexOf(kMethodLutEndMarker)+
+return false;};DdmsImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'DdmsImporter';},get model(){return this.model_;},importEvents:function(){var divider=this.data_.indexOf(kMethodLutEndMarker)+
 kMethodLutEndMarker.length;this.metadata_=this.data_.slice(0,divider);this.methods_={};this.parseThreads();this.parseMethods();var traceReader=new Reader(this.data_.slice(divider));var magic=traceReader.uint32();if(magic!=kTraceMagicValue){throw Error('Failed to match magic value');}
 this.version_=traceReader.uint16();if(this.version_!=kTraceVersionDualClock){throw Error('Unknown version');}
 var dataOffest=traceReader.uint16();var startDateTime=traceReader.uint64();var recordSize=traceReader.uint16();traceReader.seekTo(dataOffest);while(traceReader.hasMore()){this.parseTraceEntry(traceReader);}},parseTraceEntry:function(reader){var tid=reader.uint16();var methodPacked=reader.uint32();var cpuSinceStart=reader.uint32();var wallClockSinceStart=reader.uint32();var method=methodPacked&~kTraceMethodActionMask;var action=methodPacked&kTraceMethodActionMask;var thread=this.getTid(tid);method=this.getMethodName(method);if(action==kTraceMethodEnter){thread.sliceGroup.beginSlice(kCategory,method,wallClockSinceStart,undefined,cpuSinceStart);}else if(thread.sliceGroup.openSliceCount){thread.sliceGroup.endSlice(wallClockSinceStart,cpuSinceStart);}},parseThreads:function(){var threads=this.metadata_.slice(this.metadata_.indexOf(kThreadsStart)+
@@ -3785,7 +4793,7 @@
 function BinderParser(importer){Parser.call(this,importer);importer.registerEventHandler('binder_locked',BinderParser.prototype.binderLocked.bind(this));importer.registerEventHandler('binder_unlock',BinderParser.prototype.binderUnlock.bind(this));importer.registerEventHandler('binder_lock',BinderParser.prototype.binderLock.bind(this));importer.registerEventHandler('binder_transaction',BinderParser.prototype.binderTransaction.bind(this));importer.registerEventHandler('binder_transaction_received',BinderParser.prototype.binderTransactionReceived.bind(this));this.model_=importer.model;this.kthreadlookup={};this.importer_=importer;this.transWaitingRecv={};this.syncTransWaitingCompletion={};this.recursiveSyncTransWaitingCompletion_ByPID={};this.receivedTransWaitingConversion={};}
 BinderParser.prototype={__proto__:Parser.prototype,binderLock:function(eventName,cpuNumber,pid,ts,eventBase){var tgid=parseInt(eventBase.tgid);this.doNameMappings(pid,tgid,eventName.threadName);var kthread=this.importer_.getOrCreateBinderKernelThread(eventBase.threadName,tgid,pid);kthread.binderAttemptLockTS=ts;kthread.binderOpenTsA=ts;return true;},binderLocked:function(eventName,cpuNumber,pid,ts,eventBase){var binder_thread=isBinderThread(eventBase.threadName);var tgid,name;var as_slice;var need_push=false;var kthread,rthread;tgid=parseInt(eventBase.tgid);name=eventBase.threadName;kthread=this.importer_.getOrCreateBinderKernelThread(eventBase.threadName,tgid,pid);this.doNameMappings(pid,tgid,name);rthread=kthread.thread;kthread.binderLockAquiredTS=ts;if(kthread.binderAttemptLockTS===undefined)
 return false;var args=this.generateArgsForSlice(tgid,pid,name,kthread);rthread.sliceGroup.pushCompleteSlice('binder','binder lock waiting',kthread.binderAttemptLockTS,ts-kthread.binderAttemptLockTS,0,0,args);kthread.binderAttemptLockTS=undefined;return true;},binderUnlock:function(eventName,cpuNumber,pid,ts,eventBase){var tgid=parseInt(eventBase.tgid);var kthread=this.importer_.getOrCreateBinderKernelThread(eventBase.threadName,tgid,pid);if(kthread.binderLockAquiredTS===undefined)
-return false;args=this.generateArgsForSlice(tgid,pid,eventBase.threadName,kthread);kthread.thread.sliceGroup.pushCompleteSlice('binder','binder lock held',kthread.binderLockAquiredTS,ts-kthread.binderLockAquiredTS,0,0,args);kthread.binderLockAquiredTS=undefined;return true;},binderTransaction:function(eventName,cpuNumber,pid,ts,eventBase){var event=binderTransRE.exec(eventBase.details);if(event===undefined)
+return false;var args=this.generateArgsForSlice(tgid,pid,eventBase.threadName,kthread);kthread.thread.sliceGroup.pushCompleteSlice('binder','binder lock held',kthread.binderLockAquiredTS,ts-kthread.binderLockAquiredTS,0,0,args);kthread.binderLockAquiredTS=undefined;return true;},binderTransaction:function(eventName,cpuNumber,pid,ts,eventBase){var event=binderTransRE.exec(eventBase.details);if(event===undefined)
 return false;var tgid=parseInt(eventBase.tgid);this.doNameMappings(pid,tgid,eventBase.threadName);var kthread;kthread=this.importer_.getOrCreateBinderKernelThread(eventBase.threadName,tgid,pid);var trans=new BinderTransaction(event,pid,ts,kthread);var args=generateBinderArgsForSlice(trans,eventBase.threadName);var prior_receive=this.getPriorReceiveOnPID(pid);if(prior_receive!==false){return this.modelPriorReceive(prior_receive,ts,pid,tgid,kthread,trans,args,event);}
 var recursive_trans=this.getRecursiveTransactionNeedingCompletion(pid);if(recursive_trans!==false)
 return this.modelRecursiveTransactions(recursive_trans,ts,pid,kthread,trans,args);var slice=kthread.thread.sliceGroup.pushCompleteSlice('binder','',ts,.03,0,0,args);slice.colorId=ColorScheme.getColorIdForGeneralPurposeString(ts.toString());trans.slice=slice;if(trans.expect_reply)
@@ -3926,26 +4934,34 @@
 kthread.openSliceTS=undefined;kthread.order=undefined;return true;},reclaimBegin:function(eventName,cpuNumber,pid,ts,eventBase){var event=reclaimBeginRE.exec(eventBase.details);if(!event)
 return false;var order=parseInt(event[1]);var gfp=event[2];var tgid=parseInt(eventBase.tgid);var kthread=this.importer.getOrCreateKernelThread(eventBase.threadName,tgid,pid);kthread.openSliceTS=ts;kthread.order=order;kthread.gfp=gfp;return true;},reclaimEnd:function(eventName,cpuNumber,pid,ts,eventBase){var event=reclaimEndRE.exec(eventBase.details);if(!event)
 return false;var nr_reclaimed=parseInt(event[1]);var tgid=parseInt(eventBase.tgid);var kthread=this.importer.getOrCreateKernelThread(eventBase.threadName,tgid,pid);if(kthread.openSliceTS!==undefined){kthread.thread.sliceGroup.pushCompleteSlice('memreclaim','direct reclaim',kthread.openSliceTS,ts-kthread.openSliceTS,0,0,{order:kthread.order,gfp:kthread.gfp,nr_reclaimed:nr_reclaimed});}
-kthread.openSliceTS=undefined;kthread.order=undefined;kthread.gfp=undefined;return true;}};Parser.register(MemReclaimParser);return{MemReclaimParser:MemReclaimParser};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var ColorScheme=tr.b.ColorScheme;var Parser=tr.e.importer.linux_perf.Parser;function PowerParser(importer){Parser.call(this,importer);importer.registerEventHandler('power_start',PowerParser.prototype.powerStartEvent.bind(this));importer.registerEventHandler('power_frequency',PowerParser.prototype.powerFrequencyEvent.bind(this));importer.registerEventHandler('cpu_frequency',PowerParser.prototype.cpuFrequencyEvent.bind(this));importer.registerEventHandler('cpu_idle',PowerParser.prototype.cpuIdleEvent.bind(this));}
+kthread.openSliceTS=undefined;kthread.order=undefined;kthread.gfp=undefined;return true;}};Parser.register(MemReclaimParser);return{MemReclaimParser:MemReclaimParser};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var ColorScheme=tr.b.ColorScheme;var Parser=tr.e.importer.linux_perf.Parser;function PowerParser(importer){Parser.call(this,importer);importer.registerEventHandler('power_start',PowerParser.prototype.powerStartEvent.bind(this));importer.registerEventHandler('power_frequency',PowerParser.prototype.powerFrequencyEvent.bind(this));importer.registerEventHandler('cpu_frequency',PowerParser.prototype.cpuFrequencyEvent.bind(this));importer.registerEventHandler('cpu_frequency_limits',PowerParser.prototype.cpuFrequencyLimitsEvent.bind(this));importer.registerEventHandler('cpu_idle',PowerParser.prototype.cpuIdleEvent.bind(this));}
 PowerParser.prototype={__proto__:Parser.prototype,cpuStateSlice:function(ts,targetCpuNumber,eventType,cpuState){var targetCpu=this.importer.getOrCreateCpu(targetCpuNumber);var powerCounter;if(eventType!='1'){this.importer.model.importWarning({type:'parse_error',message:'Don\'t understand power_start events of '+'type '+eventType});return;}
 powerCounter=targetCpu.getOrCreateCounter('','C-State');if(powerCounter.numSeries===0){powerCounter.addSeries(new tr.model.CounterSeries('state',ColorScheme.getColorIdForGeneralPurposeString(powerCounter.name+'.'+'state')));}
 powerCounter.series.forEach(function(series){series.addCounterSample(ts,cpuState);});},cpuIdleSlice:function(ts,targetCpuNumber,cpuState){var targetCpu=this.importer.getOrCreateCpu(targetCpuNumber);var powerCounter=targetCpu.getOrCreateCounter('','C-State');if(powerCounter.numSeries===0){powerCounter.addSeries(new tr.model.CounterSeries('state',ColorScheme.getColorIdForGeneralPurposeString(powerCounter.name)));}
 var val=(cpuState!=4294967295?cpuState+1:0);powerCounter.series.forEach(function(series){series.addCounterSample(ts,val);});},cpuFrequencySlice:function(ts,targetCpuNumber,powerState){var targetCpu=this.importer.getOrCreateCpu(targetCpuNumber);var powerCounter=targetCpu.getOrCreateCounter('','Clock Frequency');if(powerCounter.numSeries===0){powerCounter.addSeries(new tr.model.CounterSeries('state',ColorScheme.getColorIdForGeneralPurposeString(powerCounter.name+'.'+'state')));}
-powerCounter.series.forEach(function(series){series.addCounterSample(ts,powerState);});},powerStartEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/type=(\d+) state=(\d) cpu_id=(\d)+/.exec(eventBase.details);if(!event)
-return false;var targetCpuNumber=parseInt(event[3]);var cpuState=parseInt(event[2]);this.cpuStateSlice(ts,targetCpuNumber,event[1],cpuState);return true;},powerFrequencyEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/type=(\d+) state=(\d+) cpu_id=(\d)+/.exec(eventBase.details);if(!event)
-return false;var targetCpuNumber=parseInt(event[3]);var powerState=parseInt(event[2]);this.cpuFrequencySlice(ts,targetCpuNumber,powerState);return true;},cpuFrequencyEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/state=(\d+) cpu_id=(\d)+/.exec(eventBase.details);if(!event)
-return false;var targetCpuNumber=parseInt(event[2]);var powerState=parseInt(event[1]);this.cpuFrequencySlice(ts,targetCpuNumber,powerState);return true;},cpuIdleEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/state=(\d+) cpu_id=(\d)+/.exec(eventBase.details);if(!event)
+powerCounter.series.forEach(function(series){series.addCounterSample(ts,powerState);});},cpuFrequencyLimitsSlice:function(ts,targetCpuNumber,minFreq,maxFreq){var targetCpu=this.importer.getOrCreateCpu(targetCpuNumber);var powerCounter=targetCpu.getOrCreateCounter('','Clock Frequency Limits');if(powerCounter.numSeries===0){powerCounter.addSeries(new tr.model.CounterSeries('Min Frequency',ColorScheme.getColorIdForGeneralPurposeString(powerCounter.name+'.'+'Min Frequency')));powerCounter.addSeries(new tr.model.CounterSeries('Max Frequency',ColorScheme.getColorIdForGeneralPurposeString(powerCounter.name+'.'+'Max Frequency')));}
+powerCounter.series.forEach(function(series){if(series.name=='Min Frequency')
+series.addCounterSample(ts,minFreq);if(series.name=='Max Frequency')
+series.addCounterSample(ts,maxFreq);});},powerStartEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/type=(\d+) state=(\d) cpu_id=(\d+)/.exec(eventBase.details);if(!event)
+return false;var targetCpuNumber=parseInt(event[3]);var cpuState=parseInt(event[2]);this.cpuStateSlice(ts,targetCpuNumber,event[1],cpuState);return true;},powerFrequencyEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/type=(\d+) state=(\d+) cpu_id=(\d+)/.exec(eventBase.details);if(!event)
+return false;var targetCpuNumber=parseInt(event[3]);var powerState=parseInt(event[2]);this.cpuFrequencySlice(ts,targetCpuNumber,powerState);return true;},cpuFrequencyEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/state=(\d+) cpu_id=(\d+)/.exec(eventBase.details);if(!event)
+return false;var targetCpuNumber=parseInt(event[2]);var powerState=parseInt(event[1]);this.cpuFrequencySlice(ts,targetCpuNumber,powerState);return true;},cpuFrequencyLimitsEvent:function(eventName,cpu,pid,ts,eventBase){var event=/min=(\d+) max=(\d+) cpu_id=(\d+)/.exec(eventBase.details);if(!event)
+return false;var targetCpuNumber=parseInt(event[3]);var minFreq=parseInt(event[1]);var maxFreq=parseInt(event[2]);this.cpuFrequencyLimitsSlice(ts,targetCpuNumber,minFreq,maxFreq);return true;},cpuIdleEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/state=(\d+) cpu_id=(\d+)/.exec(eventBase.details);if(!event)
 return false;var targetCpuNumber=parseInt(event[2]);var cpuState=parseInt(event[1]);this.cpuIdleSlice(ts,targetCpuNumber,cpuState);return true;}};Parser.register(PowerParser);return{PowerParser:PowerParser};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var ColorScheme=tr.b.ColorScheme;var Parser=tr.e.importer.linux_perf.Parser;function RegulatorParser(importer){Parser.call(this,importer);importer.registerEventHandler('regulator_enable',RegulatorParser.prototype.regulatorEnableEvent.bind(this));importer.registerEventHandler('regulator_enable_delay',RegulatorParser.prototype.regulatorEnableDelayEvent.bind(this));importer.registerEventHandler('regulator_enable_complete',RegulatorParser.prototype.regulatorEnableCompleteEvent.bind(this));importer.registerEventHandler('regulator_disable',RegulatorParser.prototype.regulatorDisableEvent.bind(this));importer.registerEventHandler('regulator_disable_complete',RegulatorParser.prototype.regulatorDisableCompleteEvent.bind(this));importer.registerEventHandler('regulator_set_voltage',RegulatorParser.prototype.regulatorSetVoltageEvent.bind(this));importer.registerEventHandler('regulator_set_voltage_complete',RegulatorParser.prototype.regulatorSetVoltageCompleteEvent.bind(this));this.model_=importer.model_;}
 var regulatorEnableRE=/name=(.+)/;var regulatorDisableRE=/name=(.+)/;var regulatorSetVoltageCompleteRE=/name=(\S+), val=(\d+)/;RegulatorParser.prototype={__proto__:Parser.prototype,getCtr_:function(ctrName,valueName){var ctr=this.model_.kernel.getOrCreateCounter(null,'vreg '+ctrName+' '+valueName);if(ctr.series[0]===undefined){ctr.addSeries(new tr.model.CounterSeries(valueName,ColorScheme.getColorIdForGeneralPurposeString(ctrName+'.'+valueName)));}
 return ctr;},regulatorEnableEvent:function(eventName,cpuNum,pid,ts,eventBase){var event=regulatorEnableRE.exec(eventBase.details);if(!event)
 return false;var name=event[1];var ctr=this.getCtr_(name,'enabled');ctr.series[0].addCounterSample(ts,1);return true;},regulatorEnableDelayEvent:function(eventName,cpuNum,pid,ts,eventBase){return true;},regulatorEnableCompleteEvent:function(eventName,cpuNum,pid,ts,eventBase){return true;},regulatorDisableEvent:function(eventName,cpuNum,pid,ts,eventBase){var event=regulatorDisableRE.exec(eventBase.details);if(!event)
 return false;var name=event[1];var ctr=this.getCtr_(name,'enabled');ctr.series[0].addCounterSample(ts,0);return true;},regulatorDisableCompleteEvent:function(eventName,cpuNum,pid,ts,eventBase){return true;},regulatorSetVoltageEvent:function(eventName,cpuNum,pid,ts,eventBase){return true;},regulatorSetVoltageCompleteEvent:function(eventName,cpuNum,pid,ts,eventBase){var event=regulatorSetVoltageCompleteRE.exec(eventBase.details);if(!event)
-return false;var name=event[1];var voltage=parseInt(event[2]);var ctr=this.getCtr_(name,'voltage');ctr.series[0].addCounterSample(ts,voltage);return true;}};Parser.register(RegulatorParser);return{RegulatorParser:RegulatorParser};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var Parser=tr.e.importer.linux_perf.Parser;function SchedParser(importer){Parser.call(this,importer);importer.registerEventHandler('sched_switch',SchedParser.prototype.schedSwitchEvent.bind(this));importer.registerEventHandler('sched_wakeup',SchedParser.prototype.schedWakeupEvent.bind(this));}
-var TestExports={};var schedSwitchRE=new RegExp('prev_comm=(.+) prev_pid=(\\d+) prev_prio=(\\d+) '+'prev_state=(\\S\\+?|\\S\\|\\S) ==> '+'next_comm=(.+) next_pid=(\\d+) next_prio=(\\d+)');TestExports.schedSwitchRE=schedSwitchRE;var schedWakeupRE=/comm=(.+) pid=(\d+) prio=(\d+) success=(\d+) target_cpu=(\d+)/;TestExports.schedWakeupRE=schedWakeupRE;SchedParser.prototype={__proto__:Parser.prototype,schedSwitchEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=schedSwitchRE.exec(eventBase.details);if(!event)
+return false;var name=event[1];var voltage=parseInt(event[2]);var ctr=this.getCtr_(name,'voltage');ctr.series[0].addCounterSample(ts,voltage);return true;}};Parser.register(RegulatorParser);return{RegulatorParser:RegulatorParser};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var Parser=tr.e.importer.linux_perf.Parser;function SchedParser(importer){Parser.call(this,importer);importer.registerEventHandler('sched_switch',SchedParser.prototype.schedSwitchEvent.bind(this));importer.registerEventHandler('sched_wakeup',SchedParser.prototype.schedWakeupEvent.bind(this));importer.registerEventHandler('sched_blocked_reason',SchedParser.prototype.schedBlockedEvent.bind(this));importer.registerEventHandler('sched_cpu_hotplug',SchedParser.prototype.schedCpuHotplugEvent.bind(this));}
+var TestExports={};var schedSwitchRE=new RegExp('prev_comm=(.+) prev_pid=(\\d+) prev_prio=(\\d+) '+'prev_state=(\\S\\+?|\\S\\|\\S) ==> '+'next_comm=(.+) next_pid=(\\d+) next_prio=(\\d+)');var schedBlockedRE=new RegExp('pid=(\\d+) iowait=(\\d) caller=(.+)');TestExports.schedSwitchRE=schedSwitchRE;var schedWakeupRE=/comm=(.+) pid=(\d+) prio=(\d+) success=(\d+) target_cpu=(\d+)/;TestExports.schedWakeupRE=schedWakeupRE;SchedParser.prototype={__proto__:Parser.prototype,schedSwitchEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=schedSwitchRE.exec(eventBase.details);if(!event)
 return false;var prevState=event[4];var nextComm=event[5];var nextPid=parseInt(event[6]);var nextPrio=parseInt(event[7]);var nextThread=this.importer.threadsByLinuxPid[nextPid];var nextName;if(nextThread)
 nextName=nextThread.userFriendlyName;else
 nextName=nextComm;var cpu=this.importer.getOrCreateCpu(cpuNumber);cpu.switchActiveThread(ts,{stateWhenDescheduled:prevState},nextPid,nextName,{comm:nextComm,tid:nextPid,prio:nextPrio});return true;},schedWakeupEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=schedWakeupRE.exec(eventBase.details);if(!event)
-return false;var fromPid=pid;var comm=event[1];var pid=parseInt(event[2]);var prio=parseInt(event[3]);this.importer.markPidRunnable(ts,pid,comm,prio,fromPid);return true;}};Parser.register(SchedParser);return{SchedParser:SchedParser,_SchedParserTestExports:TestExports};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var ColorScheme=tr.b.ColorScheme;var Parser=tr.e.importer.linux_perf.Parser;function SyncParser(importer){Parser.call(this,importer);importer.registerEventHandler('sync_timeline',SyncParser.prototype.timelineEvent.bind(this));importer.registerEventHandler('sync_wait',SyncParser.prototype.syncWaitEvent.bind(this));importer.registerEventHandler('sync_pt',SyncParser.prototype.syncPtEvent.bind(this));this.model_=importer.model_;}
+return false;var fromPid=pid;var comm=event[1];var pid=parseInt(event[2]);var prio=parseInt(event[3]);this.importer.markPidRunnable(ts,pid,comm,prio,fromPid);return true;},schedCpuHotplugEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/cpu (\d+) (.+) error=(\d+)/.exec(eventBase.details);if(!event)
+return false;var cpuNumber=event[1];var state=event[2];var targetCpu=this.importer.getOrCreateCpu(cpuNumber);var powerCounter=targetCpu.getOrCreateCounter('','Cpu Hotplug');if(powerCounter.numSeries===0){powerCounter.addSeries(new tr.model.CounterSeries('State',tr.b.ColorScheme.getColorIdForGeneralPurposeString(powerCounter.name+'.'+'State')));}
+powerCounter.series.forEach(function(series){if(series.name=='State')
+series.addCounterSample(ts,state.localeCompare('offline')?0:1);});return true;},schedBlockedEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=schedBlockedRE.exec(eventBase.details);if(!event)
+return false;var pid=parseInt(event[1]);var iowait=parseInt(event[2]);var caller=event[3];this.importer.addPidBlockedReason(ts,pid,iowait,caller);return true;}};Parser.register(SchedParser);return{SchedParser:SchedParser,_SchedParserTestExports:TestExports};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var ColorScheme=tr.b.ColorScheme;var Parser=tr.e.importer.linux_perf.Parser;function SyncParser(importer){Parser.call(this,importer);importer.registerEventHandler('sync_timeline',SyncParser.prototype.timelineEvent.bind(this));importer.registerEventHandler('sync_wait',SyncParser.prototype.syncWaitEvent.bind(this));importer.registerEventHandler('sync_pt',SyncParser.prototype.syncPtEvent.bind(this));this.model_=importer.model_;}
 var syncTimelineRE=/name=(\S+) value=(\S*)/;var syncWaitRE=/(\S+) name=(\S+) state=(\d+)/;var syncPtRE=/name=(\S+) value=(\S*)/;SyncParser.prototype={__proto__:Parser.prototype,timelineEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=syncTimelineRE.exec(eventBase.details);if(!event)
 return false;var thread=this.importer.getOrCreatePseudoThread(event[1]);if(thread.lastActiveTs!==undefined){var duration=ts-thread.lastActiveTs;var value=thread.lastActiveValue;if(value==undefined)
 value=' ';var slice=new tr.model.Slice('',value,ColorScheme.getColorIdForGeneralPurposeString(value),thread.lastActiveTs,{},duration);thread.thread.sliceGroup.pushSlice(slice);}
@@ -3958,7 +4974,7 @@
 var workqueueExecuteStartRE=/work struct (.+): function (\S+)/;var workqueueExecuteEndRE=/work struct (.+)/;WorkqueueParser.prototype={__proto__:Parser.prototype,executeStartEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=workqueueExecuteStartRE.exec(eventBase.details);if(!event)
 return false;var kthread=this.importer.getOrCreateKernelThread(eventBase.threadName,pid,pid);kthread.openSliceTS=ts;kthread.openSlice=event[2];return true;},executeEndEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=workqueueExecuteEndRE.exec(eventBase.details);if(!event)
 return false;var kthread=this.importer.getOrCreateKernelThread(eventBase.threadName,pid,pid);if(kthread.openSlice){var slice=new tr.model.Slice('',kthread.openSlice,ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),kthread.openSliceTS,{},ts-kthread.openSliceTS);kthread.thread.sliceGroup.pushSlice(slice);}
-kthread.openSlice=undefined;return true;},executeQueueWork:function(eventName,cpuNumber,pid,ts,eventBase){return true;},executeActivateWork:function(eventName,cpuNumber,pid,ts,eventBase){return true;}};Parser.register(WorkqueueParser);return{WorkqueueParser:WorkqueueParser};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var ClockSyncRecord=tr.ClockSyncRecord;function LinuxPerfImporter(model,events){this.importPriority=2;this.model_=model;this.events_=events;this.newlyAddedClockSyncRecords_=[];this.wakeups_=[];this.kernelThreadStates_={};this.buildMapFromLinuxPidsToThreads();this.lines_=[];this.pseudoThreadCounter=1;this.parsers_=[];this.eventHandlers_={};}
+kthread.openSlice=undefined;return true;},executeQueueWork:function(eventName,cpuNumber,pid,ts,eventBase){return true;},executeActivateWork:function(eventName,cpuNumber,pid,ts,eventBase){return true;}};Parser.register(WorkqueueParser);return{WorkqueueParser:WorkqueueParser};});'use strict';tr.exportTo('tr.e.importer.linux_perf',function(){var InstantClockSyncRecord=tr.model.InstantClockSyncRecord;function FTraceImporter(model,events){this.importPriority=2;this.model_=model;this.events_=events;this.newlyAddedClockSyncRecords_=[];this.wakeups_=[];this.blocked_reasons_=[];this.kernelThreadStates_={};this.buildMapFromLinuxPidsToThreads_();this.lines_=[];this.pseudoThreadCounter=1;this.parsers_=[];this.eventHandlers_={};}
 var TestExports={};var lineREWithTGID=new RegExp('^\\s*(.+)-(\\d+)\\s+\\(\\s*(\\d+|-+)\\)\\s\\[(\\d+)\\]'+'\\s+[dX.][Nnp.][Hhs.][0-9a-f.]'+'\\s+(\\d+\\.\\d+):\\s+(\\S+):\\s(.*)$');var lineParserWithTGID=function(line){var groups=lineREWithTGID.exec(line);if(!groups){return groups;}
 var tgid=groups[3];if(tgid[0]==='-')
 tgid=undefined;return{threadName:groups[1],pid:groups[2],tgid:tgid,cpuNumber:groups[4],timestamp:groups[5],eventName:groups[6],details:groups[7]};};TestExports.lineParserWithTGID=lineParserWithTGID;var lineREWithIRQInfo=new RegExp('^\\s*(.+)-(\\d+)\\s+\\[(\\d+)\\]'+'\\s+[dX.][Nnp.][Hhs.][0-9a-f.]'+'\\s+(\\d+\\.\\d+):\\s+(\\S+):\\s(.*)$');var lineParserWithIRQInfo=function(line){var groups=lineREWithIRQInfo.exec(line);if(!groups){return groups;}
@@ -3967,13 +4983,13 @@
 return false;if(lineREWithTGID.test(line))
 return lineParserWithTGID;if(lineREWithIRQInfo.test(line))
 return lineParserWithIRQInfo;if(lineREWithLegacyFmt.test(line))
-return lineParserWithLegacyFmt;return null;};TestExports.autoDetectLineParser=autoDetectLineParser;LinuxPerfImporter.canImport=function(events){if(!(typeof(events)==='string'||events instanceof String))
-return false;if(LinuxPerfImporter._extractEventsFromSystraceHTML(events,false).ok)
-return true;if(LinuxPerfImporter._extractEventsFromSystraceMultiHTML(events,false).ok)
+return lineParserWithLegacyFmt;return undefined;};TestExports.autoDetectLineParser=autoDetectLineParser;FTraceImporter.canImport=function(events){if(!(typeof(events)==='string'||events instanceof String))
+return false;if(FTraceImporter._extractEventsFromSystraceHTML(events,false).ok)
+return true;if(FTraceImporter._extractEventsFromSystraceMultiHTML(events,false).ok)
 return true;if(/^# tracer:/.test(events))
 return true;var lineBreakIndex=events.indexOf('\n');if(lineBreakIndex>-1)
 events=events.substring(0,lineBreakIndex);if(autoDetectLineParser(events))
-return true;return false;};LinuxPerfImporter._extractEventsFromSystraceHTML=function(incoming_events,produce_result){var failure={ok:false};if(produce_result===undefined)
+return true;return false;};FTraceImporter._extractEventsFromSystraceHTML=function(incoming_events,produce_result){var failure={ok:false};if(produce_result===undefined)
 produce_result=true;if(/^<!DOCTYPE html>/.test(incoming_events)==false)
 return failure;var r=new tr.importer.SimpleLineReader(incoming_events);if(!r.advanceToLineMatching(/^  <script>$/))
 return failure;if(!r.advanceToLineMatching(/^  var linuxPerfData = "\\$/))
@@ -3985,176 +5001,54 @@
 return str;return str.substring(str,str.length-suffix.length);}
 var events=[];if(produce_result){for(var i=0;i<raw_events.length;i++){var event=raw_events[i];event=stripSuffix(event,'\\n\\');events.push(event);}}else{events=[raw_events[raw_events.length-1]];}
 var oldLastEvent=events[events.length-1];var newLastEvent=stripSuffix(oldLastEvent,'\\n";');if(newLastEvent==oldLastEvent)
-return failure;events[events.length-1]=newLastEvent;return{ok:true,lines:produce_result?events:undefined,events_begin_at_line:events_begin_at_line};};LinuxPerfImporter._extractEventsFromSystraceMultiHTML=function(incoming_events,produce_result){var failure={ok:false};if(produce_result===undefined)
+return failure;events[events.length-1]=newLastEvent;return{ok:true,lines:produce_result?events:undefined,events_begin_at_line:events_begin_at_line};};FTraceImporter._extractEventsFromSystraceMultiHTML=function(incoming_events,produce_result){var failure={ok:false};if(produce_result===undefined)
 produce_result=true;if(new RegExp('^<!DOCTYPE HTML>','i').test(incoming_events)==false)
 return failure;var r=new tr.importer.SimpleLineReader(incoming_events);var events=[];while(!/^# tracer:/.test(events)){if(!r.advanceToLineMatching(/^  <script class="trace-data" type="application\/text">$/))
 return failure;var events_begin_at_line=r.curLineNumber+1;r.beginSavingLines();if(!r.advanceToLineMatching(/^  <\/script>$/))
 return failure;events=r.endSavingLinesAndGetResult();events=events.slice(1,events.length-1);}
 if(!r.advanceToLineMatching(/^<\/body>$/))
 return failure;if(!r.advanceToLineMatching(/^<\/html>$/))
-return failure;return{ok:true,lines:produce_result?events:undefined,events_begin_at_line:events_begin_at_line};};LinuxPerfImporter.prototype={__proto__:tr.importer.Importer.prototype,get model(){return this.model_;},buildMapFromLinuxPidsToThreads:function(){this.threadsByLinuxPid={};this.model_.getAllThreads().forEach(function(thread){this.threadsByLinuxPid[thread.tid]=thread;}.bind(this));},getOrCreateCpu:function(cpuNumber){return this.model_.kernel.getOrCreateCpu(cpuNumber);},getOrCreateKernelThread:function(kernelThreadName,pid,tid){if(!this.kernelThreadStates_[kernelThreadName]){var thread=this.model_.getOrCreateProcess(pid).getOrCreateThread(tid);thread.name=kernelThreadName;this.kernelThreadStates_[kernelThreadName]={pid:pid,thread:thread,openSlice:undefined,openSliceTS:undefined};this.threadsByLinuxPid[pid]=thread;}
+return failure;return{ok:true,lines:produce_result?events:undefined,events_begin_at_line:events_begin_at_line};};FTraceImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'FTraceImporter';},get model(){return this.model_;},importEvents:function(){this.parsers_=this.createParsers_();this.registerDefaultHandlers_();this.parseLines_();this.importClockSyncRecords_();var modelTimeTransformer=this.getModelTimeTransformer_();if(modelTimeTransformer===undefined){this.model_.importWarning({type:'clock_sync',message:'Cannot import kernel trace without a clock sync.'});return;}
+this.shiftNewlyAddedClockSyncRecords_(modelTimeTransformer);this.importCpuData_(modelTimeTransformer);this.buildMapFromLinuxPidsToThreads_();this.buildPerThreadCpuSlicesFromCpuState_();},registerEventHandler:function(eventName,handler){this.eventHandlers_[eventName]=handler;},getOrCreateCpu:function(cpuNumber){return this.model_.kernel.getOrCreateCpu(cpuNumber);},getOrCreateKernelThread:function(kernelThreadName,pid,tid){if(!this.kernelThreadStates_[kernelThreadName]){var thread=this.model_.getOrCreateProcess(pid).getOrCreateThread(tid);thread.name=kernelThreadName;this.kernelThreadStates_[kernelThreadName]={pid:pid,thread:thread,openSlice:undefined,openSliceTS:undefined};this.threadsByLinuxPid[pid]=thread;}
 return this.kernelThreadStates_[kernelThreadName];},getOrCreateBinderKernelThread:function(kernelThreadName,pid,tid){var key=kernelThreadName+pid+tid;if(!this.kernelThreadStates_[key]){var thread=this.model_.getOrCreateProcess(pid).getOrCreateThread(tid);thread.name=kernelThreadName;this.kernelThreadStates_[key]={pid:pid,thread:thread,openSlice:undefined,openSliceTS:undefined};this.threadsByLinuxPid[pid]=thread;}
 return this.kernelThreadStates_[key];},getOrCreatePseudoThread:function(threadName){var thread=this.kernelThreadStates_[threadName];if(!thread){thread=this.getOrCreateKernelThread(threadName,pseudoKernelPID,this.pseudoThreadCounter);this.pseudoThreadCounter++;}
-return thread;},importEvents:function(isSecondaryImport){this.parsers_=this.createParsers_();this.registerDefaultHandlers_();this.parseLines();this.importClockSyncRecords();var timeShift=this.computeTimeTransform();if(timeShift===undefined){this.model_.importWarning({type:'clock_sync',message:'Cannot import kernel trace without a clock sync.'});return;}
-this.shiftNewlyAddedClockSyncRecords(timeShift);this.importCpuData(timeShift);this.buildMapFromLinuxPidsToThreads();this.buildPerThreadCpuSlicesFromCpuState();this.computeCpuTimestampsForSlicesAsNeeded();},buildPerThreadCpuSlicesFromCpuState:function(){var SCHEDULING_STATE=tr.model.SCHEDULING_STATE;for(var cpuNumber in this.model_.kernel.cpus){var cpu=this.model_.kernel.cpus[cpuNumber];for(var i=0;i<cpu.slices.length;i++){var cpuSlice=cpu.slices[i];var thread=this.threadsByLinuxPid[cpuSlice.args.tid];if(!thread)
+return thread;},markPidRunnable:function(ts,pid,comm,prio,fromPid){this.wakeups_.push({ts:ts,tid:pid,fromTid:fromPid});},addPidBlockedReason:function(ts,pid,iowait,caller){this.blocked_reasons_.push({ts:ts,tid:pid,iowait:iowait,caller:caller});},buildMapFromLinuxPidsToThreads_:function(){this.threadsByLinuxPid={};this.model_.getAllThreads().forEach(function(thread){this.threadsByLinuxPid[thread.tid]=thread;}.bind(this));},buildPerThreadCpuSlicesFromCpuState_:function(){var SCHEDULING_STATE=tr.model.SCHEDULING_STATE;for(var cpuNumber in this.model_.kernel.cpus){var cpu=this.model_.kernel.cpus[cpuNumber];for(var i=0;i<cpu.slices.length;i++){var cpuSlice=cpu.slices[i];var thread=this.threadsByLinuxPid[cpuSlice.args.tid];if(!thread)
 continue;cpuSlice.threadThatWasRunning=thread;if(!thread.tempCpuSlices)
 thread.tempCpuSlices=[];thread.tempCpuSlices.push(cpuSlice);}}
 for(var i in this.wakeups_){var wakeup=this.wakeups_[i];var thread=this.threadsByLinuxPid[wakeup.tid];if(!thread)
 continue;thread.tempWakeups=thread.tempWakeups||[];thread.tempWakeups.push(wakeup);}
+for(var i in this.blocked_reasons_){var reason=this.blocked_reasons_[i];var thread=this.threadsByLinuxPid[reason.tid];if(!thread)
+continue;thread.tempBlockedReasons=thread.tempBlockedReasons||[];thread.tempBlockedReasons.push(reason);}
 this.model_.getAllThreads().forEach(function(thread){if(thread.tempCpuSlices===undefined)
-return;var origSlices=thread.tempCpuSlices;delete thread.tempCpuSlices;origSlices.sort(function(x,y){return x.start-y.start;});var wakeups=thread.tempWakeups||[];delete thread.tempWakeups;wakeups.sort(function(x,y){return x.ts-y.ts;});var slices=[];if(origSlices.length){var slice=origSlices[0];if(wakeups.length&&wakeups[0].ts<slice.start){var wakeup=wakeups.shift();var wakeupDuration=slice.start-wakeup.ts;var args={'wakeup from tid':wakeup.fromTid};slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.RUNNABLE,'',wakeup.ts,args,wakeupDuration));}
+return;var origSlices=thread.tempCpuSlices;delete thread.tempCpuSlices;origSlices.sort(function(x,y){return x.start-y.start;});var wakeups=thread.tempWakeups||[];delete thread.tempWakeups;wakeups.sort(function(x,y){return x.ts-y.ts;});var reasons=thread.tempBlockedReasons||[];delete thread.tempBlockedReasons;reasons.sort(function(x,y){return x.ts-y.ts;});var slices=[];if(origSlices.length){var slice=origSlices[0];if(wakeups.length&&wakeups[0].ts<slice.start){var wakeup=wakeups.shift();var wakeupDuration=slice.start-wakeup.ts;var args={'wakeup from tid':wakeup.fromTid};slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.RUNNABLE,'',wakeup.ts,args,wakeupDuration));}
 var runningSlice=new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.RUNNING,'',slice.start,{},slice.duration);runningSlice.cpuOnWhichThreadWasRunning=slice.cpu;slices.push(runningSlice);}
 var wakeup=undefined;for(var i=1;i<origSlices.length;i++){var prevSlice=origSlices[i-1];var nextSlice=origSlices[i];var midDuration=nextSlice.start-prevSlice.end;while(wakeups.length&&wakeups[0].ts<nextSlice.start){var w=wakeups.shift();if(wakeup===undefined&&w.ts>prevSlice.end){wakeup=w;}}
+var blocked_reason=undefined;while(reasons.length&&reasons[0].ts<prevSlice.end){var r=reasons.shift();}
+if(wakeup!==undefined&&reasons.length&&reasons[0].ts<wakeup.ts){blocked_reason=reasons.shift();}
 var pushSleep=function(state){if(wakeup!==undefined){midDuration=wakeup.ts-prevSlice.end;}
-slices.push(new tr.model.ThreadTimeSlice(thread,state,'',prevSlice.end,{},midDuration));if(wakeup!==undefined){var wakeupDuration=nextSlice.start-wakeup.ts;var args={'wakeup from tid':wakeup.fromTid};slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.RUNNABLE,'',wakeup.ts,args,wakeupDuration));wakeup=undefined;}};if(prevSlice.args.stateWhenDescheduled=='S'){pushSleep(SCHEDULING_STATE.SLEEPING);}else if(prevSlice.args.stateWhenDescheduled=='R'||prevSlice.args.stateWhenDescheduled=='R+'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.RUNNABLE,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='D'){pushSleep(SCHEDULING_STATE.UNINTR_SLEEP);}else if(prevSlice.args.stateWhenDescheduled=='T'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.STOPPED,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='t'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.DEBUG,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='Z'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.ZOMBIE,'',ioWaitId,prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='X'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.EXIT_DEAD,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='x'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.TASK_DEAD,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='K'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.WAKE_KILL,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='W'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.WAKING,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='D|K'){pushSleep(SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL);}else if(prevSlice.args.stateWhenDescheduled=='D|W'){pushSleep(SCHEDULING_STATE.UNINTR_SLEEP_WAKING);}else{slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.UNKNOWN,'',prevSlice.end,{},midDuration));this.model_.importWarning({type:'parse_error',message:'Unrecognized sleep state: '+
+if(blocked_reason!==undefined){var args={'kernel callsite when blocked:':blocked_reason.caller};if(blocked_reason.iowait){switch(state){case SCHEDULING_STATE.UNINTR_SLEEP:state=SCHEDULING_STATE.UNINTR_SLEEP_IO;break;case SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL:state=SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL_IO;break;case SCHEDULING_STATE.UNINTR_SLEEP_WAKING:state=SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL_IO;break;default:}}
+slices.push(new tr.model.ThreadTimeSlice(thread,state,'',prevSlice.end,args,midDuration));}else{slices.push(new tr.model.ThreadTimeSlice(thread,state,'',prevSlice.end,{},midDuration));}
+if(wakeup!==undefined){var wakeupDuration=nextSlice.start-wakeup.ts;var args={'wakeup from tid':wakeup.fromTid};slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.RUNNABLE,'',wakeup.ts,args,wakeupDuration));wakeup=undefined;}};if(prevSlice.args.stateWhenDescheduled=='S'){pushSleep(SCHEDULING_STATE.SLEEPING);}else if(prevSlice.args.stateWhenDescheduled=='R'||prevSlice.args.stateWhenDescheduled=='R+'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.RUNNABLE,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='D'){pushSleep(SCHEDULING_STATE.UNINTR_SLEEP);}else if(prevSlice.args.stateWhenDescheduled=='T'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.STOPPED,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='t'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.DEBUG,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='Z'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.ZOMBIE,'',ioWaitId,prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='X'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.EXIT_DEAD,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='x'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.TASK_DEAD,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='K'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.WAKE_KILL,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='W'){slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.WAKING,'',prevSlice.end,{},midDuration));}else if(prevSlice.args.stateWhenDescheduled=='D|K'){pushSleep(SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL);}else if(prevSlice.args.stateWhenDescheduled=='D|W'){pushSleep(SCHEDULING_STATE.UNINTR_SLEEP_WAKING);}else{slices.push(new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.UNKNOWN,'',prevSlice.end,{},midDuration));this.model_.importWarning({type:'parse_error',message:'Unrecognized sleep state: '+
 prevSlice.args.stateWhenDescheduled});}
 var runningSlice=new tr.model.ThreadTimeSlice(thread,SCHEDULING_STATE.RUNNING,'',nextSlice.start,{},nextSlice.duration);runningSlice.cpuOnWhichThreadWasRunning=prevSlice.cpu;slices.push(runningSlice);}
-thread.timeSlices=slices;},this);},computeCpuTimestampsForSlicesAsNeeded:function(){},computeTimeTransform:function(){var isSecondaryImport=this.model.getClockSyncRecordsNamed('ftrace_importer').length!==0;var mSyncs=this.model_.getClockSyncRecordsNamed('monotonic');if(mSyncs.length==0)
-return isSecondaryImport?undefined:0;var sync=mSyncs[0].args;if(sync.parentTS==0||sync.parentTS==sync.perfTS)
-return 0;return sync.parentTS-sync.perfTS;},createParsers_:function(){var allTypeInfos=tr.e.importer.linux_perf.Parser.getAllRegisteredTypeInfos();var parsers=allTypeInfos.map(function(typeInfo){return new typeInfo.constructor(this);},this);return parsers;},registerDefaultHandlers_:function(){this.registerEventHandler('tracing_mark_write',LinuxPerfImporter.prototype.traceMarkingWriteEvent.bind(this));this.registerEventHandler('0',LinuxPerfImporter.prototype.traceMarkingWriteEvent.bind(this));this.registerEventHandler('tracing_mark_write:trace_event_clock_sync',function(){return true;});this.registerEventHandler('0:trace_event_clock_sync',function(){return true;});},registerEventHandler:function(eventName,handler){this.eventHandlers_[eventName]=handler;},markPidRunnable:function(ts,pid,comm,prio,fromPid){this.wakeups_.push({ts:ts,tid:pid,fromTid:fromPid});},traceClockSyncEvent:function(eventName,cpuNumber,pid,ts,eventBase){var event=/name=(\w+?)\s(.+)/.exec(eventBase.details);if(event){var name=event[1];var pieces=event[2].split(' ');var args={perfTS:ts};for(var i=0;i<pieces.length;i++){var parts=pieces[i].split('=');if(parts.length!=2)
+thread.timeSlices=slices;},this);},getModelTimeTransformer_:function(){var isAttachedToChromeTrace=this.model.getClockSyncRecordsWithSyncId('ftrace_importer').length!==0;var monotonicSyncs=this.model_.getClockSyncRecordsWithSyncId('monotonic');if(monotonicSyncs.length==0)
+return isAttachedToChromeTrace?undefined:tr.b.identity;var sync=monotonicSyncs[0].args;if(sync.parentTS===0)
+return tr.b.identity;return function(ts){return ts+sync.parentTS-sync.perfTS;};},createParsers_:function(){var allTypeInfos=tr.e.importer.linux_perf.Parser.getAllRegisteredTypeInfos();var parsers=allTypeInfos.map(function(typeInfo){return new typeInfo.constructor(this);},this);return parsers;},registerDefaultHandlers_:function(){this.registerEventHandler('tracing_mark_write',FTraceImporter.prototype.traceMarkingWriteEvent_.bind(this));this.registerEventHandler('0',FTraceImporter.prototype.traceMarkingWriteEvent_.bind(this));this.registerEventHandler('tracing_mark_write:trace_event_clock_sync',function(){return true;});this.registerEventHandler('0:trace_event_clock_sync',function(){return true;});},traceClockSyncEvent_:function(eventName,cpuNumber,pid,ts,eventBase){var event=/name=(\w+?)\s(.+)/.exec(eventBase.details);if(event){var name=event[1];var pieces=event[2].split(' ');var args={perfTS:ts};for(var i=0;i<pieces.length;i++){var parts=pieces[i].split('=');if(parts.length!=2)
 throw new Error('omgbbq');args[parts[0]]=parts[1];}
-this.addClockSyncRecord(new ClockSyncRecord(name,ts,args));return true;}
+this.addClockSyncRecord_(new InstantClockSyncRecord(name,ts,args));return true;}
 event=/parent_ts=(\d+\.?\d*)/.exec(eventBase.details);if(!event)
-return false;this.addClockSyncRecord(new ClockSyncRecord('monotonic',ts,{perfTS:ts,parentTS:event[1]*1000}));return true;},traceMarkingWriteEvent:function(eventName,cpuNumber,pid,ts,eventBase,threadName){eventBase.details=eventBase.details.replace(/\\n.*$/,'');var event=/^\s*(\w+):\s*(.*)$/.exec(eventBase.details);if(!event){var tag=eventBase.details.substring(0,2);if(tag=='B|'||tag=='E'||tag=='E|'||tag=='X|'||tag=='C|'||tag=='S|'||tag=='F|'){eventBase.subEventName='android';}else{return false;}}else{eventBase.subEventName=event[1];eventBase.details=event[2];}
+return false;this.addClockSyncRecord_(new InstantClockSyncRecord('monotonic',ts,{perfTS:ts,parentTS:event[1]*1000}));return true;},traceMarkingWriteEvent_:function(eventName,cpuNumber,pid,ts,eventBase,threadName){eventBase.details=eventBase.details.replace(/\\n.*$/,'');var event=/^\s*(\w+):\s*(.*)$/.exec(eventBase.details);if(!event){var tag=eventBase.details.substring(0,2);if(tag=='B|'||tag=='E'||tag=='E|'||tag=='X|'||tag=='C|'||tag=='S|'||tag=='F|'){eventBase.subEventName='android';}else{return false;}}else{eventBase.subEventName=event[1];eventBase.details=event[2];}
 var writeEventName=eventName+':'+eventBase.subEventName;var handler=this.eventHandlers_[writeEventName];if(!handler){this.model_.importWarning({type:'parse_error',message:'Unknown trace_marking_write event '+writeEventName});return true;}
-return handler(writeEventName,cpuNumber,pid,ts,eventBase,threadName);},importClockSyncRecords:function(){this.forEachLine(function(text,eventBase,cpuNumber,pid,ts){var eventName=eventBase.eventName;if(eventName!=='tracing_mark_write'&&eventName!=='0')
+return handler(writeEventName,cpuNumber,pid,ts,eventBase,threadName);},importClockSyncRecords_:function(){this.forEachLine_(function(text,eventBase,cpuNumber,pid,ts){var eventName=eventBase.eventName;if(eventName!=='tracing_mark_write'&&eventName!=='0')
 return;if(traceEventClockSyncRE.exec(eventBase.details))
-this.traceClockSyncEvent(eventName,cpuNumber,pid,ts,eventBase);if(realTimeClockSyncRE.exec(eventBase.details)){var match=realTimeClockSyncRE.exec(eventBase.details);this.model_.realtime_to_monotonic_offset_ms=ts-match[1];}
+this.traceClockSyncEvent_(eventName,cpuNumber,pid,ts,eventBase);if(realTimeClockSyncRE.exec(eventBase.details)){var match=realTimeClockSyncRE.exec(eventBase.details);this.model_.realtime_to_monotonic_offset_ms=ts-match[1];}
 if(genericClockSyncRE.exec(eventBase.details))
-this.traceClockSyncEvent(eventName,cpuNumber,pid,ts,eventBase);}.bind(this));},addClockSyncRecord:function(csr){this.newlyAddedClockSyncRecords_.push(csr);this.model_.clockSyncRecords.push(csr);},shiftNewlyAddedClockSyncRecords:function(timeShift){this.newlyAddedClockSyncRecords_.forEach(function(csr){csr.ts+=timeShift;});},importCpuData:function(timeShift){this.forEachLine(function(text,eventBase,cpuNumber,pid,ts){var eventName=eventBase.eventName;var handler=this.eventHandlers_[eventName];if(!handler){this.model_.importWarning({type:'parse_error',message:'Unknown event '+eventName+' ('+text+')'});return;}
-ts+=timeShift;if(!handler(eventName,cpuNumber,pid,ts,eventBase)){this.model_.importWarning({type:'parse_error',message:'Malformed '+eventName+' event ('+text+')'});}}.bind(this));},parseLines:function(){var lines=[];var extractResult=LinuxPerfImporter._extractEventsFromSystraceHTML(this.events_,true);if(!extractResult.ok)
-extractResult=LinuxPerfImporter._extractEventsFromSystraceMultiHTML(this.events_,true);var lines=extractResult.ok?extractResult.lines:this.events_.split('\n');var lineParser=null;for(var lineNumber=0;lineNumber<lines.length;++lineNumber){var line=lines[lineNumber].trim();if(line.length==0||/^#/.test(line))
-continue;if(lineParser==null){lineParser=autoDetectLineParser(line);if(lineParser==null){this.model_.importWarning({type:'parse_error',message:'Cannot parse line: '+line});continue;}}
+this.traceClockSyncEvent_(eventName,cpuNumber,pid,ts,eventBase);}.bind(this));},addClockSyncRecord_:function(csr){this.newlyAddedClockSyncRecords_.push(csr);this.model_.clockSyncRecords.push(csr);},shiftNewlyAddedClockSyncRecords_:function(modelTimeTransformer){this.newlyAddedClockSyncRecords_.forEach(function(csr){csr.start=modelTimeTransformer(csr.start);});},importCpuData_:function(modelTimeTransformer){this.forEachLine_(function(text,eventBase,cpuNumber,pid,ts){var eventName=eventBase.eventName;var handler=this.eventHandlers_[eventName];if(!handler){this.model_.importWarning({type:'parse_error',message:'Unknown event '+eventName+' ('+text+')'});return;}
+ts=modelTimeTransformer(ts);if(!handler(eventName,cpuNumber,pid,ts,eventBase)){this.model_.importWarning({type:'parse_error',message:'Malformed '+eventName+' event ('+text+')'});}}.bind(this));},parseLines_:function(){var lines=[];var extractResult=FTraceImporter._extractEventsFromSystraceHTML(this.events_,true);if(!extractResult.ok)
+extractResult=FTraceImporter._extractEventsFromSystraceMultiHTML(this.events_,true);var lines=extractResult.ok?extractResult.lines:this.events_.split('\n');var lineParser=undefined;for(var lineNumber=0;lineNumber<lines.length;++lineNumber){var line=lines[lineNumber].trim();if(line.length==0||/^#/.test(line))
+continue;if(!lineParser){lineParser=autoDetectLineParser(line);if(!lineParser){this.model_.importWarning({type:'parse_error',message:'Cannot parse line: '+line});continue;}}
 var eventBase=lineParser(line);if(!eventBase){this.model_.importWarning({type:'parse_error',message:'Unrecognized line: '+line});continue;}
-this.lines_.push([line,eventBase,parseInt(eventBase.cpuNumber),parseInt(eventBase.pid),parseFloat(eventBase.timestamp)*1000]);}},forEachLine:function(handler){for(var i=0;i<this.lines_.length;++i){var line=this.lines_[i];handler.apply(this,line);}}};tr.importer.Importer.register(LinuxPerfImporter);return{LinuxPerfImporter:LinuxPerfImporter,_LinuxPerfImporterTestExports:TestExports};});'use strict';tr.exportTo('tr.b.u',function(){function TimeDuration(duration){tr.b.u.Scalar.call(this,duration,tr.b.u.Units.timeDurationInMs);};TimeDuration.prototype={__proto__:tr.b.u.Scalar.prototype,get duration(){return this.value;}};TimeDuration.format=function(duration){return tr.b.u.Units.timeDurationInMs.format(duration);};return{TimeDuration:TimeDuration};});'use strict';tr.exportTo('tr.b',function(){function convertEventsToRanges(events){return events.map(function(event){return tr.b.Range.fromExplicitRange(event.start,event.end);});}
-function mergeRanges(inRanges,mergeThreshold,mergeFunction){var remainingEvents=inRanges.slice();remainingEvents.sort(function(x,y){return x.min-y.min;});if(remainingEvents.length<=1){var merged=[];if(remainingEvents.length==1){merged.push(mergeFunction(remainingEvents));}
-return merged;}
-var mergedEvents=[];var currentMergeBuffer=[];var rightEdge;function beginMerging(){currentMergeBuffer.push(remainingEvents[0]);remainingEvents.splice(0,1);rightEdge=currentMergeBuffer[0].max;}
-function flushCurrentMergeBuffer(){if(currentMergeBuffer.length==0)
-return;mergedEvents.push(mergeFunction(currentMergeBuffer));currentMergeBuffer=[];if(remainingEvents.length!=0)
-beginMerging();}
-beginMerging();while(remainingEvents.length){var currentEvent=remainingEvents[0];var distanceFromRightEdge=currentEvent.min-rightEdge;if(distanceFromRightEdge<mergeThreshold){rightEdge=Math.max(rightEdge,currentEvent.max);remainingEvents.splice(0,1);currentMergeBuffer.push(currentEvent);continue;}
-flushCurrentMergeBuffer();}
-flushCurrentMergeBuffer();return mergedEvents;}
-function findEmptyRangesBetweenRanges(inRanges,opt_totalRange){if(opt_totalRange&&opt_totalRange.isEmpty)
-opt_totalRange=undefined;var emptyRanges=[];if(!inRanges.length){if(opt_totalRange)
-emptyRanges.push(opt_totalRange);return emptyRanges;}
-inRanges=inRanges.slice();inRanges.sort(function(x,y){return x.min-y.min;});if(opt_totalRange&&(opt_totalRange.min<inRanges[0].min)){emptyRanges.push(tr.b.Range.fromExplicitRange(opt_totalRange.min,inRanges[0].min));}
-inRanges.forEach(function(range,index){for(var otherIndex=0;otherIndex<inRanges.length;++otherIndex){if(index===otherIndex)
-continue;var other=inRanges[otherIndex];if(other.min>range.max){emptyRanges.push(tr.b.Range.fromExplicitRange(range.max,other.min));return;}
-if(other.max>range.max){return;}}
-if(opt_totalRange&&(range.max<opt_totalRange.max)){emptyRanges.push(tr.b.Range.fromExplicitRange(range.max,opt_totalRange.max));}});return emptyRanges;}
-return{convertEventsToRanges:convertEventsToRanges,findEmptyRangesBetweenRanges:findEmptyRangesBetweenRanges,mergeRanges:mergeRanges};});'use strict';tr.exportTo('tr.e.audits',function(){var Frame=tr.model.Frame;var Statistics=tr.b.Statistics;var UI_DRAW_TYPE={NONE:'none',LEGACY:'legacy',MARSHMALLOW:'marshmallow'};var UI_THREAD_DRAW_NAMES={'performTraversals':UI_DRAW_TYPE.LEGACY,'Choreographer#doFrame':UI_DRAW_TYPE.MARSHMALLOW};var RENDER_THREAD_DRAW_NAME='DrawFrame';var RENDER_THREAD_INDEP_DRAW_NAME='doFrame';var THREAD_SYNC_NAME='syncFrameState';function getSlicesForThreadTimeRanges(threadTimeRanges){var ret=[];threadTimeRanges.forEach(function(threadTimeRange){var slices=[];threadTimeRange.thread.sliceGroup.iterSlicesInTimeRange(function(slice){slices.push(slice);},threadTimeRange.start,threadTimeRange.end);ret.push.apply(ret,slices);});return ret;}
-function makeFrame(threadTimeRanges,surfaceFlinger){var args={};if(surfaceFlinger&&surfaceFlinger.hasVsyncs){var start=Statistics.min(threadTimeRanges,function(threadTimeRanges){return threadTimeRanges.start;});args['deadline']=surfaceFlinger.getFrameDeadline(start);args['frameKickoff']=surfaceFlinger.getFrameKickoff(start);}
-var events=getSlicesForThreadTimeRanges(threadTimeRanges);return new Frame(events,threadTimeRanges,args);}
-function findOverlappingDrawFrame(renderThread,time){if(!renderThread)
-return undefined;var slices=renderThread.sliceGroup.slices;for(var i=0;i<slices.length;i++){var slice=slices[i];if(slice.title==RENDER_THREAD_DRAW_NAME&&slice.start<=time&&time<=slice.end){return slice;}}
-return undefined;}
-function getPreTraversalWorkRanges(uiThread){if(!uiThread)
-return[];var preFrameEvents=[];uiThread.sliceGroup.slices.forEach(function(slice){if(slice.title=='obtainView'||slice.title=='setupListItem'||slice.title=='deliverInputEvent'||slice.title=='RV Scroll')
-preFrameEvents.push(slice);});uiThread.asyncSliceGroup.slices.forEach(function(slice){if(slice.title=='deliverInputEvent')
-preFrameEvents.push(slice);});return tr.b.mergeRanges(tr.b.convertEventsToRanges(preFrameEvents),3,function(events){return{start:events[0].min,end:events[events.length-1].max};});}
-function getFrameStartTime(traversalStart,preTraversalWorkRanges){var preTraversalWorkRange=tr.b.findClosestIntervalInSortedIntervals(preTraversalWorkRanges,function(range){return range.start},function(range){return range.end},traversalStart,3);if(preTraversalWorkRange)
-return preTraversalWorkRange.start;return traversalStart;}
-function getUiThreadDrivenFrames(app){if(!app.uiThread)
-return[];var preTraversalWorkRanges=[];if(app.uiDrawType==UI_DRAW_TYPE.LEGACY)
-preTraversalWorkRanges=getPreTraversalWorkRanges(app.uiThread);var frames=[];app.uiThread.sliceGroup.slices.forEach(function(slice){if(!(slice.title in UI_THREAD_DRAW_NAMES)){return;}
-var threadTimeRanges=[];var uiThreadTimeRange={thread:app.uiThread,start:getFrameStartTime(slice.start,preTraversalWorkRanges),end:slice.end};threadTimeRanges.push(uiThreadTimeRange);var rtDrawSlice=findOverlappingDrawFrame(app.renderThread,slice.end);if(rtDrawSlice){var rtSyncSlice=rtDrawSlice.findDescendentSlice(THREAD_SYNC_NAME);if(rtSyncSlice){uiThreadTimeRange.end=Math.min(uiThreadTimeRange.end,rtSyncSlice.start);}
-threadTimeRanges.push({thread:app.renderThread,start:rtDrawSlice.start,end:rtDrawSlice.end});}
-frames.push(makeFrame(threadTimeRanges,app.surfaceFlinger));});return frames;}
-function getRenderThreadDrivenFrames(app){if(!app.renderThread)
-return[];var frames=[];app.renderThread.sliceGroup.getSlicesOfName(RENDER_THREAD_INDEP_DRAW_NAME).forEach(function(slice){var threadTimeRanges=[{thread:app.renderThread,start:slice.start,end:slice.end}];frames.push(makeFrame(threadTimeRanges,app.surfaceFlinger));});return frames;}
-function getUiDrawType(uiThread){if(!uiThread)
-return UI_DRAW_TYPE.NONE;var slices=uiThread.sliceGroup.slices;for(var i=0;i<slices.length;i++){if(slices[i].title in UI_THREAD_DRAW_NAMES){return UI_THREAD_DRAW_NAMES[slices[i].title];}}
-return UI_DRAW_TYPE.NONE;}
-function getInputSamples(process){var samples=undefined;for(var counterName in process.counters){if(/^android\.aq\:pending/.test(counterName)&&process.counters[counterName].numSeries==1){samples=process.counters[counterName].series[0].samples;break;}}
-if(!samples)
-return[];var inputSamples=[];var lastValue=0;samples.forEach(function(sample){if(sample.value>lastValue){inputSamples.push(sample);}
-lastValue=sample.value;});return inputSamples;}
-function getAnimationAsyncSlices(uiThread){if(!uiThread)
-return[];var slices=[];uiThread.asyncSliceGroup.iterateAllEvents(function(slice){if(/^animator\:/.test(slice.title))
-slices.push(slice);});return slices;}
-function AndroidApp(process,uiThread,renderThread,surfaceFlinger,uiDrawType){this.process=process;this.uiThread=uiThread;this.renderThread=renderThread;this.surfaceFlinger=surfaceFlinger;this.uiDrawType=uiDrawType;this.frames_=undefined;this.inputs_=undefined;};AndroidApp.createForProcessIfPossible=function(process,surfaceFlinger){var uiThread=process.getThread(process.pid);var uiDrawType=getUiDrawType(uiThread);if(uiDrawType==UI_DRAW_TYPE.NONE){uiThread=undefined;}
-var renderThreads=process.findAllThreadsNamed('RenderThread');var renderThread=renderThreads.length==1?renderThreads[0]:undefined;if(uiThread||renderThread){return new AndroidApp(process,uiThread,renderThread,surfaceFlinger,uiDrawType);}}
-AndroidApp.prototype={getFrames:function(){if(!this.frames_){var uiFrames=getUiThreadDrivenFrames(this);var rtFrames=getRenderThreadDrivenFrames(this);this.frames_=uiFrames.concat(rtFrames);this.frames_.sort(function(a,b){a.end-b.end});}
-return this.frames_;},getInputSamples:function(){if(!this.inputs_){this.inputs_=getInputSamples(this.process);}
-return this.inputs_;},getAnimationAsyncSlices:function(){if(!this.animations_){this.animations_=getAnimationAsyncSlices(this.uiThread);}
-return this.animations_;}};return{AndroidApp:AndroidApp};});'use strict';tr.exportTo('tr.e.audits',function(){var findLowIndexInSortedArray=tr.b.findLowIndexInSortedArray;var VSYNC_SF_NAME='android.VSYNC-sf';var VSYNC_APP_NAME='android.VSYNC-app';var VSYNC_FALLBACK_NAME='android.VSYNC';var TIMESTAMP_FUDGE_MS=0.01;function getVsyncTimestamps(process,counterName){var vsync=process.counters[counterName];if(!vsync)
-vsync=process.counters[VSYNC_FALLBACK_NAME];if(vsync&&vsync.numSeries==1&&vsync.numSamples>1)
-return vsync.series[0].timestamps;return undefined;}
-function AndroidSurfaceFlinger(process,thread){this.process=process;this.thread=thread;this.appVsync_=undefined;this.sfVsync_=undefined;this.appVsyncTimestamps_=getVsyncTimestamps(process,VSYNC_APP_NAME);this.sfVsyncTimestamps_=getVsyncTimestamps(process,VSYNC_SF_NAME);};AndroidSurfaceFlinger.createForProcessIfPossible=function(process){var mainThread=process.getThread(process.pid);if(mainThread&&mainThread.name&&/surfaceflinger/.test(mainThread.name))
-return new AndroidSurfaceFlinger(process,mainThread);var primaryThreads=process.findAllThreadsNamed('SurfaceFlinger');if(primaryThreads.length==1)
-return new AndroidSurfaceFlinger(process,primaryThreads[0]);return undefined;};AndroidSurfaceFlinger.prototype={get hasVsyncs(){return!!this.appVsyncTimestamps_&&!!this.sfVsyncTimestamps_;},getFrameKickoff:function(timestamp){if(!this.hasVsyncs)
-throw new Error('cannot query vsync info without vsyncs');var firstGreaterIndex=findLowIndexInSortedArray(this.appVsyncTimestamps_,function(x){return x;},timestamp+TIMESTAMP_FUDGE_MS);if(firstGreaterIndex<1)
-return undefined;return this.appVsyncTimestamps_[firstGreaterIndex-1];},getFrameDeadline:function(timestamp){if(!this.hasVsyncs)
-throw new Error('cannot query vsync info without vsyncs');var firstGreaterIndex=findLowIndexInSortedArray(this.sfVsyncTimestamps_,function(x){return x;},timestamp+TIMESTAMP_FUDGE_MS);if(firstGreaterIndex>=this.sfVsyncTimestamps_.length)
-return undefined;return this.sfVsyncTimestamps_[firstGreaterIndex];}};return{AndroidSurfaceFlinger:AndroidSurfaceFlinger};});'use strict';tr.exportTo('tr.e.audits',function(){var AndroidApp=tr.e.audits.AndroidApp;var AndroidSurfaceFlinger=tr.e.audits.AndroidSurfaceFlinger;var IMPORTANT_SURFACE_FLINGER_SLICES={'doComposition':true,'updateTexImage':true,'postFramebuffer':true};var IMPORTANT_UI_THREAD_SLICES={'Choreographer#doFrame':true,'performTraversals':true,'deliverInputEvent':true};var IMPORTANT_RENDER_THREAD_SLICES={'doFrame':true};function iterateImportantThreadSlices(thread,important,callback){if(!thread)
-return;thread.sliceGroup.slices.forEach(function(slice){if(slice.title in important)
-callback(slice);});}
-function AndroidModelHelper(model){this.model=model;this.apps=[];this.surfaceFlinger=undefined;var processes=model.getAllProcesses();for(var i=0;i<processes.length&&!this.surfaceFlinger;i++){this.surfaceFlinger=AndroidSurfaceFlinger.createForProcessIfPossible(processes[i]);}
-model.getAllProcesses().forEach(function(process){var app=AndroidApp.createForProcessIfPossible(process,this.surfaceFlinger);if(app)
-this.apps.push(app);},this);};AndroidModelHelper.prototype={iterateImportantSlices:function(callback){if(this.surfaceFlinger){iterateImportantThreadSlices(this.surfaceFlinger.thread,IMPORTANT_SURFACE_FLINGER_SLICES,callback);}
-this.apps.forEach(function(app){iterateImportantThreadSlices(app.uiThread,IMPORTANT_UI_THREAD_SLICES,callback);iterateImportantThreadSlices(app.renderThread,IMPORTANT_RENDER_THREAD_SLICES,callback);});}};return{AndroidModelHelper:AndroidModelHelper};});'use strict';tr.exportTo('tr.e.audits',function(){var SCHEDULING_STATE=tr.model.SCHEDULING_STATE;var Auditor=tr.c.Auditor;var AndroidModelHelper=tr.e.audits.AndroidModelHelper;var ColorScheme=tr.b.ColorScheme;var Statistics=tr.b.Statistics;var FRAME_PERF_CLASS=tr.model.FRAME_PERF_CLASS;var InteractionRecord=tr.model.InteractionRecord;var Alert=tr.model.Alert;var EventInfo=tr.model.EventInfo;var TimeDuration=tr.b.u.TimeDuration;var EXPECTED_FRAME_TIME_MS=16.67;function getStart(e){return e.start;}
-function getDuration(e){return e.duration;}
-function getCpuDuration(e){return(e.cpuDuration!==undefined)?e.cpuDuration:e.duration;}
-function frameIsActivityStart(frame){for(var i=0;i<frame.associatedEvents.length;i++){if(frame.associatedEvents[i].title=='activityStart')
-return true;}
-return false;}
-var Auditor=tr.c.Auditor;var AndroidModelHelper=tr.e.audits.AndroidModelHelper;function frameMissedDeadline(frame){return frame.args['deadline']&&frame.args['deadline']<frame.end;}
-function DocLinkBuilder(){this.docLinks=[];}
-DocLinkBuilder.prototype={addAppVideo:function(name,videoId){this.docLinks.push({label:'Video Link',textContent:('Android Performance Patterns: '+name),href:'https://www.youtube.com/watch?list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE&v='+videoId});return this;},addDacRef:function(name,link){this.docLinks.push({label:'Doc Link',textContent:(name+' documentation'),href:'https://developer.android.com/reference/'+link});return this;},build:function(){return this.docLinks;}};function AndroidAuditor(model){Auditor.call(this,model);var helper=new AndroidModelHelper(model);if(helper.apps.length||helper.surfaceFlinger)
-this.helper=helper;};AndroidAuditor.viewAlphaAlertInfo_=new EventInfo('Inefficient View alpha usage','Setting an alpha between 0 and 1 has significant performance costs, if one of the fast alpha paths is not used.',new DocLinkBuilder().addAppVideo('Hidden Cost of Transparency','wIy8g8yNhNk').addDacRef('View#setAlpha()','android/view/View.html#setAlpha(float)').build());AndroidAuditor.saveLayerAlertInfo_=new EventInfo('Expensive rendering with Canvas#saveLayer()','Canvas#saveLayer() incurs extremely high rendering cost. They disrupt the rendering pipeline when drawn, forcing a flush of drawing content. Instead use View hardware layers, or static Bitmaps. This enables the offscreen buffers to be reused in between frames, and avoids the disruptive render target switch.',new DocLinkBuilder().addAppVideo('Hidden Cost of Transparency','wIy8g8yNhNk').addDacRef('Canvas#saveLayerAlpha()','android/graphics/Canvas.html#saveLayerAlpha(android.graphics.RectF, int, int)').build());AndroidAuditor.getSaveLayerAlerts_=function(frame){var badAlphaRegEx=/^(.+) alpha caused (unclipped )?saveLayer (\d+)x(\d+)$/;var saveLayerRegEx=/^(unclipped )?saveLayer (\d+)x(\d+)$/;var ret=[];var events=[];frame.associatedEvents.forEach(function(slice){var match=badAlphaRegEx.exec(slice.title);if(match){var args={'view name':match[1],width:parseInt(match[3]),height:parseInt(match[4])};ret.push(new Alert(AndroidAuditor.viewAlphaAlertInfo_,slice.start,[slice],args));}else if(saveLayerRegEx.test(slice.title))
-events.push(slice);},this);if(events.length>ret.length){var unclippedSeen=Statistics.sum(events,function(slice){return saveLayerRegEx.exec(slice.title)[1]?1:0;});var clippedSeen=events.length-unclippedSeen;var earliestStart=Statistics.min(events,function(slice){return slice.start;});var args={'Unclipped saveLayer count (especially bad!)':unclippedSeen,'Clipped saveLayer count':clippedSeen};events.push(frame);ret.push(new Alert(AndroidAuditor.saveLayerAlertInfo_,earliestStart,events,args));}
-return ret;};AndroidAuditor.pathAlertInfo_=new EventInfo('Path texture churn','Paths are drawn with a mask texture, so when a path is modified / newly drawn, that texture must be generated and uploaded to the GPU. Ensure that you cache paths between frames and do not unnecessarily call Path#reset(). You can cut down on this cost by sharing Path object instances between drawables/views.');AndroidAuditor.getPathAlert_=function(frame){var uploadRegEx=/^Generate Path Texture$/;var events=frame.associatedEvents.filter(function(event){return event.title=='Generate Path Texture';});var start=Statistics.min(events,getStart);var duration=Statistics.sum(events,getDuration);if(duration<3)
-return undefined;events.push(frame);return new Alert(AndroidAuditor.pathAlertInfo_,start,events,{'Time spent':new TimeDuration(duration)});}
-AndroidAuditor.uploadAlertInfo_=new EventInfo('Expensive Bitmap uploads','Bitmaps that have been modified / newly drawn must be uploaded to the GPU. Since this is expensive if the total number of pixels uploaded is large, reduce the amount of Bitmap churn in this animation/context, per frame.');AndroidAuditor.getUploadAlert_=function(frame){var uploadRegEx=/^Upload (\d+)x(\d+) Texture$/;var events=[];var start=Number.POSITIVE_INFINITY;var duration=0;var pixelsUploaded=0;frame.associatedEvents.forEach(function(event){var match=uploadRegEx.exec(event.title);if(match){events.push(event);start=Math.min(start,event.start);duration+=event.duration;pixelsUploaded+=parseInt(match[1])*parseInt(match[2]);}});if(events.length==0||duration<3)
-return undefined;var mPixels=(pixelsUploaded/1000000).toFixed(2)+' million';var args={'Pixels uploaded':mPixels,'Time spent':new TimeDuration(duration)};events.push(frame);return new Alert(AndroidAuditor.uploadAlertInfo_,start,events,args);}
-AndroidAuditor.ListViewInflateAlertInfo_=new EventInfo('Inflation during ListView recycling','ListView item recycling involved inflating views. Ensure your Adapter#getView() recycles the incoming View, instead of constructing a new one.');AndroidAuditor.ListViewBindAlertInfo_=new EventInfo('Inefficient ListView recycling/rebinding','ListView recycling taking too much time per frame. Ensure your Adapter#getView() binds data efficiently.');AndroidAuditor.getListViewAlert_=function(frame){var events=frame.associatedEvents.filter(function(event){return event.title=='obtainView'||event.title=='setupListItem';});var duration=Statistics.sum(events,getCpuDuration);if(events.length==0||duration<3)
-return undefined;var hasInflation=false;for(var i=0;i<events.length;i++){if(events[i]instanceof tr.model.Slice&&events[i].findDescendentSlice('inflate')){hasInflation=true;break;}}
-var start=Statistics.min(events,getStart);var args={'Time spent':new TimeDuration(duration)};args['ListView items '+(hasInflation?'inflated':'rebound')]=events.length/2;var eventInfo=hasInflation?AndroidAuditor.ListViewInflateAlertInfo_:AndroidAuditor.ListViewBindAlertInfo_;events.push(frame);return new Alert(eventInfo,start,events,args);}
-AndroidAuditor.measureLayoutAlertInfo_=new EventInfo('Expensive measure/layout pass','Measure/Layout took a significant time, contributing to jank. Avoid triggering layout during animations.',new DocLinkBuilder().addAppVideo('Invalidations, Layouts, and Performance','we6poP0kw6E').build());AndroidAuditor.getMeasureLayoutAlert_=function(frame){var events=frame.associatedEvents.filter(function(event){return event.title=='measure'||event.title=='layout';});var duration=Statistics.sum(events,getCpuDuration);if(events.length==0||duration<3)
-return undefined;var start=Statistics.min(events,getStart);events.push(frame);return new Alert(AndroidAuditor.measureLayoutAlertInfo_,start,events,{'Time spent':new TimeDuration(duration)});}
-AndroidAuditor.viewDrawAlertInfo_=new EventInfo('Long View#draw()','Recording the drawing commands of invalidated Views took a long time. Avoid significant work in View or Drawable custom drawing, especially allocations or drawing to Bitmaps.',new DocLinkBuilder().addAppVideo('Invalidations, Layouts, and Performance','we6poP0kw6E').addAppVideo('Avoiding Allocations in onDraw()','HAK5acHQ53E').build());AndroidAuditor.getViewDrawAlert_=function(frame){var slice=undefined;for(var i=0;i<frame.associatedEvents.length;i++){if(frame.associatedEvents[i].title=='getDisplayList'||frame.associatedEvents[i].title=='Record View#draw()'){slice=frame.associatedEvents[i];break;}}
-if(!slice||getCpuDuration(slice)<3)
-return undefined;return new Alert(AndroidAuditor.viewDrawAlertInfo_,slice.start,[slice,frame],{'Time spent':new TimeDuration(getCpuDuration(slice))});}
-AndroidAuditor.blockingGcAlertInfo_=new EventInfo('Blocking Garbage Collection','Blocking GCs are caused by object churn, and made worse by having large numbers of objects in the heap. Avoid allocating objects during animations/scrolling, and recycle Bitmaps to avoid triggering garbage collection.',new DocLinkBuilder().addAppVideo('Garbage Collection in Android','pzfzz50W5Uo').addAppVideo('Avoiding Allocations in onDraw()','HAK5acHQ53E').build());AndroidAuditor.getBlockingGcAlert_=function(frame){var events=frame.associatedEvents.filter(function(event){return event.title=='DVM Suspend'||event.title=='GC: Wait For Concurrent';});var blockedDuration=Statistics.sum(events,getDuration);if(blockedDuration<3)
-return undefined;var start=Statistics.min(events,getStart);events.push(frame);return new Alert(AndroidAuditor.blockingGcAlertInfo_,start,events,{'Blocked duration':new TimeDuration(blockedDuration)});};AndroidAuditor.lockContentionAlertInfo_=new EventInfo('Lock contention','UI thread lock contention is caused when another thread holds a lock that the UI thread is trying to use. UI thread progress is blocked until the lock is released. Inspect locking done within the UI thread, and ensure critical sections are short.');AndroidAuditor.getLockContentionAlert_=function(frame){var events=frame.associatedEvents.filter(function(event){return/^Lock Contention on /.test(event.title);});var blockedDuration=Statistics.sum(events,getDuration);if(blockedDuration<1)
-return undefined;var start=Statistics.min(events,getStart);events.push(frame);return new Alert(AndroidAuditor.lockContentionAlertInfo_,start,events,{'Blocked duration':new TimeDuration(blockedDuration)});};AndroidAuditor.schedulingAlertInfo_=new EventInfo('Scheduling delay','Work to produce this frame was descheduled for several milliseconds, contributing to jank. Ensure that code on the UI thread doesn\'t block on work being done on other threads, and that background threads (doing e.g. network or bitmap loading) are running at android.os.Process#THREAD_PRIORITY_BACKGROUND or lower so they are less likely to interrupt the UI thread. These background threads should show up with a priority number of 130 or higher in the scheduling section under the Kernel process.');AndroidAuditor.getSchedulingAlert_=function(frame){var totalDuration=0;var totalStats={};frame.threadTimeRanges.forEach(function(ttr){var stats=ttr.thread.getSchedulingStatsForRange(ttr.start,ttr.end);tr.b.iterItems(stats,function(key,value){if(!(key in totalStats))
-totalStats[key]=0;totalStats[key]+=value;totalDuration+=value;});});if(!(SCHEDULING_STATE.RUNNING in totalStats)||totalDuration==0||totalDuration-totalStats[SCHEDULING_STATE.RUNNING]<3)
-return;var args={};tr.b.iterItems(totalStats,function(key,value){if(key===SCHEDULING_STATE.RUNNABLE)
-key='Not scheduled, but runnable';else if(key===SCHEDULING_STATE.UNINTR_SLEEP)
-key='Blocking I/O delay';args[key]=new TimeDuration(value);});return new Alert(AndroidAuditor.schedulingAlertInfo_,frame.start,[frame],args);};AndroidAuditor.prototype={__proto__:Auditor.prototype,renameAndSort_:function(){this.model.kernel.important=false;this.model.getAllProcesses().forEach(function(process){if(this.helper.surfaceFlinger&&process==this.helper.surfaceFlinger.process){if(!process.name)
-process.name='SurfaceFlinger';process.sortIndex=Number.NEGATIVE_INFINITY;process.important=false;return;}
-var uiThread=process.getThread(process.pid);if(!process.name&&uiThread&&uiThread.name){if(/^ndroid\./.test(uiThread.name))
-uiThread.name='a'+uiThread.name;process.name=uiThread.name;uiThread.name='UI Thread';}
-process.sortIndex=0;for(var tid in process.threads){process.sortIndex-=process.threads[tid].sliceGroup.slices.length;}},this);this.model.getAllThreads().forEach(function(thread){if(thread.tid==thread.parent.pid)
-thread.sortIndex=-3;if(thread.name=='RenderThread')
-thread.sortIndex=-2;if(/^hwuiTask/.test(thread.name))
-thread.sortIndex=-1;});},pushFramesAndJudgeJank_:function(){var badFramesObserved=0;var framesObserved=0;var surfaceFlinger=this.helper.surfaceFlinger;this.helper.apps.forEach(function(app){app.process.frames=app.getFrames();app.process.frames.forEach(function(frame){if(frame.totalDuration>EXPECTED_FRAME_TIME_MS*2){badFramesObserved+=2;frame.perfClass=FRAME_PERF_CLASS.TERRIBLE;}else if(frame.totalDuration>EXPECTED_FRAME_TIME_MS||frameMissedDeadline(frame)){badFramesObserved++;frame.perfClass=FRAME_PERF_CLASS.BAD;}else{frame.perfClass=FRAME_PERF_CLASS.GOOD;}});framesObserved+=app.process.frames.length;});if(framesObserved){var portionBad=badFramesObserved/framesObserved;if(portionBad>0.3)
-this.model.faviconHue='red';else if(portionBad>0.05)
-this.model.faviconHue='yellow';else
-this.model.faviconHue='green';}},pushEventInfo_:function(){var appAnnotator=new AppAnnotator();this.helper.apps.forEach(function(app){if(app.uiThread)
-appAnnotator.applyEventInfos(app.uiThread.sliceGroup);if(app.renderThread)
-appAnnotator.applyEventInfos(app.renderThread.sliceGroup);});},runAnnotate:function(){if(!this.helper)
-return;this.renameAndSort_();this.pushFramesAndJudgeJank_();this.pushEventInfo_();this.helper.iterateImportantSlices(function(slice){slice.important=true;});},runAudit:function(){if(!this.helper)
-return;var alerts=this.model.alerts;this.helper.apps.forEach(function(app){app.getFrames().forEach(function(frame){alerts.push.apply(alerts,AndroidAuditor.getSaveLayerAlerts_(frame));if(frame.perfClass==FRAME_PERF_CLASS.NEUTRAL||frame.perfClass==FRAME_PERF_CLASS.GOOD)
-return;var alert=AndroidAuditor.getPathAlert_(frame);if(alert)
-alerts.push(alert);var alert=AndroidAuditor.getUploadAlert_(frame);if(alert)
-alerts.push(alert);var alert=AndroidAuditor.getListViewAlert_(frame);if(alert)
-alerts.push(alert);var alert=AndroidAuditor.getMeasureLayoutAlert_(frame);if(alert)
-alerts.push(alert);var alert=AndroidAuditor.getViewDrawAlert_(frame);if(alert)
-alerts.push(alert);var alert=AndroidAuditor.getBlockingGcAlert_(frame);if(alert)
-alerts.push(alert);var alert=AndroidAuditor.getLockContentionAlert_(frame);if(alert)
-alerts.push(alert);var alert=AndroidAuditor.getSchedulingAlert_(frame);if(alert)
-alerts.push(alert);});},this);this.addRenderingInteractionRecords();this.addInputInteractionRecords();},addRenderingInteractionRecords:function(){var events=[];this.helper.apps.forEach(function(app){events.push.apply(events,app.getAnimationAsyncSlices());events.push.apply(events,app.getFrames());});var mergerFunction=function(events){var ir=new InteractionRecord(this.model,'Rendering',ColorScheme.getColorIdForGeneralPurposeString('mt_rendering'),events[0].min,events[events.length-1].max-events[0].min);this.model.addInteractionRecord(ir);}.bind(this);tr.b.mergeRanges(tr.b.convertEventsToRanges(events),30,mergerFunction);},addInputInteractionRecords:function(){var inputSamples=[];this.helper.apps.forEach(function(app){inputSamples.push.apply(inputSamples,app.getInputSamples());});var mergerFunction=function(events){var ir=new InteractionRecord(this.model,'Input',ColorScheme.getColorIdForGeneralPurposeString('mt_input'),events[0].min,events[events.length-1].max-events[0].min);this.model.addInteractionRecord(ir);}.bind(this);var inputRanges=inputSamples.map(function(sample){return tr.b.Range.fromExplicitRange(sample.timestamp,sample.timestamp);});tr.b.mergeRanges(inputRanges,30,mergerFunction);}};Auditor.register(AndroidAuditor);function AppAnnotator(){this.titleInfoLookup={};this.titleParentLookup={};this.build_();}
-AppAnnotator.prototype={build_:function(){var registerEventInfo=function(dict){this.titleInfoLookup[dict.title]=new EventInfo(dict.title,dict.description,dict.docLinks);if(dict.parents)
-this.titleParentLookup[dict.title]=dict.parents;}.bind(this);registerEventInfo({title:'inflate',description:'Constructing a View hierarchy from pre-processed XML via LayoutInflater#layout. This includes constructing all of the View objects in the hierarchy, and applying styled attributes.'});registerEventInfo({title:'obtainView',description:'Adapter#getView() called to bind content to a recycled View that is being presented.'});registerEventInfo({title:'setupListItem',description:'Attached a newly-bound, recycled View to its parent ListView.'});registerEventInfo({title:'setupGridItem',description:'Attached a newly-bound, recycled View to its parent GridView.'});var choreographerLinks=new DocLinkBuilder().addDacRef('Choreographer','android/view/Choreographer.html').build();registerEventInfo({title:'Choreographer#doFrame',docLinks:choreographerLinks,description:'Choreographer executes frame callbacks for inputs, animations, and rendering traversals. When this work is done, a frame will be presented to the user.'});registerEventInfo({title:'input',parents:['Choreographer#doFrame'],docLinks:choreographerLinks,description:'Input callbacks are processed. This generally encompasses dispatching input to Views, as well as any work the Views do to process this input/gesture.'});registerEventInfo({title:'animation',parents:['Choreographer#doFrame'],docLinks:choreographerLinks,description:'Animation callbacks are processed. This is generally minimal work, as animations determine progress for the frame, and push new state to animated objects (such as setting View properties).'});registerEventInfo({title:'traversals',parents:['Choreographer#doFrame'],docLinks:choreographerLinks,description:'Primary draw traversals. This is the primary traversal of the View hierarchy, including layout and draw passes.'});var traversalParents=['Choreographer#doFrame','performTraversals'];var layoutLinks=new DocLinkBuilder().addDacRef('View#Layout','android/view/View.html#Layout').build();registerEventInfo({title:'performTraversals',description:'A drawing traversal of the View hierarchy, comprised of all layout and drawing needed to produce the frame.'});registerEventInfo({title:'measure',parents:traversalParents,docLinks:layoutLinks,description:'First of two phases in view hierarchy layout. Views are asked to size themselves according to constraints supplied by their parent. Some ViewGroups may measure a child more than once to help satisfy their own constraints. Nesting ViewGroups that measure children more than once can lead to excessive and repeated work.'});registerEventInfo({title:'layout',parents:traversalParents,docLinks:layoutLinks,description:'Second of two phases in view hierarchy layout, repositioning content and child Views into their new locations.'});var drawString='Draw pass over the View hierarchy. Every invalidated View will have its drawing commands recorded. On Android versions prior to Lollipop, this would also include the issuing of draw commands to the GPU. Starting with Lollipop, it only includes the recording of commands, and syncing that information to the RenderThread.';registerEventInfo({title:'draw',parents:traversalParents,description:drawString});var recordString='Every invalidated View\'s drawing commands are recorded. Each will have View#draw() called, and is passed a Canvas that will record and store its drawing commands until it is next invalidated/rerecorded.';registerEventInfo({title:'getDisplayList',parents:['draw'],description:recordString});registerEventInfo({title:'Record View#draw()',parents:['draw'],description:recordString});registerEventInfo({title:'drawDisplayList',parents:['draw'],description:'Execution of recorded draw commands to generate a frame. This represents the actual formation and issuing of drawing commands to the GPU. On Android L and higher devices, this work is done on a dedicated RenderThread, instead of on the UI Thread.'});registerEventInfo({title:'DrawFrame',description:'RenderThread portion of the standard UI/RenderThread split frame. This represents the actual formation and issuing of drawing commands to the GPU.'});registerEventInfo({title:'doFrame',description:'RenderThread animation frame. Represents drawing work done by the RenderThread on a frame where the UI thread did not produce new drawing content.'});registerEventInfo({title:'syncFrameState',description:'Sync stage between the UI thread and the RenderThread, where the UI thread hands off a frame (including information about modified Views). Time in this method primarily consists of uploading modified Bitmaps to the GPU. After this sync is completed, the UI thread is unblocked, and the RenderThread starts to render the frame.'});registerEventInfo({title:'flush drawing commands',description:'Issuing the now complete drawing commands to the GPU.'});registerEventInfo({title:'eglSwapBuffers',description:'Complete GPU rendering of the frame.'});registerEventInfo({title:'RV Scroll',description:'RecyclerView is calculating a scroll. If there are too many of these in Systrace, some Views inside RecyclerView might be causing it. Try to avoid using EditText, focusable views or handle them with care.'});registerEventInfo({title:'RV OnLayout',description:'OnLayout has been called by the View system. If this shows up too many times in Systrace, make sure the children of RecyclerView do not update themselves directly. This will cause a full re-layout but when it happens via the Adapter notifyItemChanged, RecyclerView can avoid full layout calculation.'});registerEventInfo({title:'RV FullInvalidate',description:'NotifyDataSetChanged or equal has been called. If this is taking a long time, try sending granular notify adapter changes instead of just calling notifyDataSetChanged or setAdapter / swapAdapter. Adding stable ids to your adapter might help.'});registerEventInfo({title:'RV PartialInvalidate',description:'RecyclerView is rebinding a View. If this is taking a lot of time, consider optimizing your layout or make sure you are not doing extra operations in onBindViewHolder call.'});registerEventInfo({title:'RV OnBindView',description:'RecyclerView is rebinding a View. If this is taking a lot of time, consider optimizing your layout or make sure you are not doing extra operations in onBindViewHolder call.'});registerEventInfo({title:'RV CreateView',description:'RecyclerView is creating a new View. If too many of these are present: 1) There might be a problem in Recycling (e.g. custom Animations that set transient state and prevent recycling or ItemAnimator not implementing the contract properly. See Adapter#onFailedToRecycleView(ViewHolder). 2) There may be too many item view types. Try merging them. 3) There might be too many itemChange animations and not enough space in RecyclerPool. Try increasing your pool size and item cache size.'});registerEventInfo({title:'eglSwapBuffers',description:'The CPU has finished producing drawing commands, and is flushing drawing work to the GPU, and posting that buffer to the consumer (which is often SurfaceFlinger window composition). Once this is completed, the GPU can produce the frame content without any involvement from the CPU.'});},applyEventInfosRecursive_:function(parentNames,slice){var checkExpectedParentNames=function(expectedParentNames){if(!expectedParentNames)
-return true;return expectedParentNames.some(function(name){return name in parentNames;});}
-if(slice.title in this.titleInfoLookup){if(checkExpectedParentNames(this.titleParentLookup[slice.title]))
-slice.info=this.titleInfoLookup[slice.title];}
-if(slice.subSlices.length>0){if(!(slice.title in parentNames))
-parentNames[slice.title]=0;parentNames[slice.title]++;slice.subSlices.forEach(function(subSlice){this.applyEventInfosRecursive_(parentNames,subSlice);},this);parentNames[slice.title]--;if(parentNames[slice.title]==0)
-delete parentNames[slice.title];}},applyEventInfos:function(sliceGroup){sliceGroup.topLevelSlices.forEach(function(slice){this.applyEventInfosRecursive_({},slice);},this);}};return{AndroidAuditor:AndroidAuditor};});'use strict';tr.exportTo('tr.e.audits',function(){var VSYNC_COUNTER_PRECISIONS={'android.VSYNC-app':15,'android.VSYNC':15};var VSYNC_SLICE_PRECISIONS={'RenderWidgetHostViewAndroid::OnVSync':5,'VSYNC':10,'vblank':10,'DisplayLinkMac::GetVSyncParameters':5};var BEGIN_FRAME_SLICE_PRECISION={'Scheduler::BeginFrame':10};function VSyncAuditor(model){tr.c.Auditor.call(this,model);};VSyncAuditor.prototype={__proto__:tr.c.Auditor.prototype,runAnnotate:function(){this.model.device.vSyncTimestamps=this.findVSyncTimestamps(this.model);},findVSyncTimestamps:function(model){var times=[];var maxPrecision=Number.NEGATIVE_INFINITY;var maxTitle=undefined;function useInstead(title,precisions){var precision=precisions[title];if(precision===undefined)
+this.lines_.push([line,eventBase,parseInt(eventBase.cpuNumber),parseInt(eventBase.pid),parseFloat(eventBase.timestamp)*1000]);}},forEachLine_:function(handler){for(var i=0;i<this.lines_.length;++i){var line=this.lines_[i];handler.apply(this,line);}}};tr.importer.Importer.register(FTraceImporter);return{FTraceImporter:FTraceImporter,_FTraceImporterTestExports:TestExports};});'use strict';tr.exportTo('tr.e.audits',function(){var VSYNC_COUNTER_PRECISIONS={'android.VSYNC-app':15,'android.VSYNC':15};var VSYNC_SLICE_PRECISIONS={'RenderWidgetHostViewAndroid::OnVSync':5,'VSYNC':10,'vblank':10,'DisplayLinkMac::GetVSyncParameters':5};var BEGIN_FRAME_SLICE_PRECISION={'Scheduler::BeginFrame':10};function VSyncAuditor(model){tr.c.Auditor.call(this,model);};VSyncAuditor.prototype={__proto__:tr.c.Auditor.prototype,runAnnotate:function(){this.model.device.vSyncTimestamps=this.findVSyncTimestamps(this.model);},findVSyncTimestamps:function(model){var times=[];var maxPrecision=Number.NEGATIVE_INFINITY;var maxTitle=undefined;function useInstead(title,precisions){var precision=precisions[title];if(precision===undefined)
 return false;if(title===maxTitle)
 return true;if(precision<=maxPrecision){if(precision===maxPrecision){console.warn('Encountered two different VSync events ('+
 maxTitle+', '+title+') with the same precision, '+'ignoring the newer one ('+title+')');}
@@ -4164,763 +5058,331 @@
 for(var tid in process.threads){var thread=process.threads[tid];for(var i=0;i<thread.sliceGroup.slices.length;i++){var slice=thread.sliceGroup.slices[i];if(useInstead(slice.title,VSYNC_SLICE_PRECISIONS))
 times.push(slice.start);else if(useInstead(slice.title,BEGIN_FRAME_SLICE_PRECISION)&&slice.args.args&&slice.args.args.frame_time_us)
 times.push(slice.args.args.frame_time_us/1000.0);}}}
-times.sort(function(x,y){return x-y;});return times;}};tr.c.Auditor.register(VSyncAuditor);return{VSyncAuditor:VSyncAuditor};});'use strict';tr.exportTo('tr.b',function(){var tmpVec2s=[];for(var i=0;i<8;i++)
-tmpVec2s[i]=vec2.create();var tmpVec2a=vec4.create();var tmpVec4a=vec4.create();var tmpVec4b=vec4.create();var tmpMat4=mat4.create();var tmpMat4b=mat4.create();var p00=vec2.createXY(0,0);var p10=vec2.createXY(1,0);var p01=vec2.createXY(0,1);var p11=vec2.createXY(1,1);var lerpingVecA=vec2.create();var lerpingVecB=vec2.create();function lerpVec2(out,a,b,amt){vec2.scale(lerpingVecA,a,amt);vec2.scale(lerpingVecB,b,1-amt);vec2.add(out,lerpingVecA,lerpingVecB);vec2.normalize(out,out);return out;}
-function Quad(){this.p1=vec2.create();this.p2=vec2.create();this.p3=vec2.create();this.p4=vec2.create();}
-Quad.fromXYWH=function(x,y,w,h){var q=new Quad();vec2.set(q.p1,x,y);vec2.set(q.p2,x+w,y);vec2.set(q.p3,x+w,y+h);vec2.set(q.p4,x,y+h);return q;}
-Quad.fromRect=function(r){return new Quad.fromXYWH(r.x,r.y,r.width,r.height);}
-Quad.from4Vecs=function(p1,p2,p3,p4){var q=new Quad();vec2.set(q.p1,p1[0],p1[1]);vec2.set(q.p2,p2[0],p2[1]);vec2.set(q.p3,p3[0],p3[1]);vec2.set(q.p4,p4[0],p4[1]);return q;}
-Quad.from8Array=function(arr){if(arr.length!=8)
-throw new Error('Array must be 8 long');var q=new Quad();q.p1[0]=arr[0];q.p1[1]=arr[1];q.p2[0]=arr[2];q.p2[1]=arr[3];q.p3[0]=arr[4];q.p3[1]=arr[5];q.p4[0]=arr[6];q.p4[1]=arr[7];return q;};Quad.prototype={pointInside:function(point){return pointInImplicitQuad(point,this.p1,this.p2,this.p3,this.p4);},boundingRect:function(){var x0=Math.min(this.p1[0],this.p2[0],this.p3[0],this.p4[0]);var y0=Math.min(this.p1[1],this.p2[1],this.p3[1],this.p4[1]);var x1=Math.max(this.p1[0],this.p2[0],this.p3[0],this.p4[0]);var y1=Math.max(this.p1[1],this.p2[1],this.p3[1],this.p4[1]);return new tr.b.Rect.fromXYWH(x0,y0,x1-x0,y1-y0);},clone:function(){var q=new Quad();vec2.copy(q.p1,this.p1);vec2.copy(q.p2,this.p2);vec2.copy(q.p3,this.p3);vec2.copy(q.p4,this.p4);return q;},scale:function(s){var q=new Quad();this.scaleFast(q,s);return q;},scaleFast:function(dstQuad,s){vec2.copy(dstQuad.p1,this.p1,s);vec2.copy(dstQuad.p2,this.p2,s);vec2.copy(dstQuad.p3,this.p3,s);vec2.copy(dstQuad.p3,this.p3,s);},isRectangle:function(){var bounds=this.boundingRect();return(bounds.x==this.p1[0]&&bounds.y==this.p1[1]&&bounds.width==this.p2[0]-this.p1[0]&&bounds.y==this.p2[1]&&bounds.width==this.p3[0]-this.p1[0]&&bounds.height==this.p3[1]-this.p2[1]&&bounds.x==this.p4[0]&&bounds.height==this.p4[1]-this.p2[1]);},projectUnitRect:function(rect){var q=new Quad();this.projectUnitRectFast(q,rect);return q;},projectUnitRectFast:function(dstQuad,rect){var v12=tmpVec2s[0];var v14=tmpVec2s[1];var v23=tmpVec2s[2];var v43=tmpVec2s[3];var l12,l14,l23,l43;vec2.sub(v12,this.p2,this.p1);l12=vec2.length(v12);vec2.scale(v12,v12,1/l12);vec2.sub(v14,this.p4,this.p1);l14=vec2.length(v14);vec2.scale(v14,v14,1/l14);vec2.sub(v23,this.p3,this.p2);l23=vec2.length(v23);vec2.scale(v23,v23,1/l23);vec2.sub(v43,this.p3,this.p4);l43=vec2.length(v43);vec2.scale(v43,v43,1/l43);var b12=tmpVec2s[0];var b14=tmpVec2s[1];var b23=tmpVec2s[2];var b43=tmpVec2s[3];lerpVec2(b12,v12,v43,rect.y);lerpVec2(b43,v12,v43,1-rect.bottom);lerpVec2(b14,v14,v23,rect.x);lerpVec2(b23,v14,v23,1-rect.right);vec2.addTwoScaledUnitVectors(tmpVec2a,b12,l12*rect.x,b14,l14*rect.y);vec2.add(dstQuad.p1,this.p1,tmpVec2a);vec2.addTwoScaledUnitVectors(tmpVec2a,b12,l12*-(1.0-rect.right),b23,l23*rect.y);vec2.add(dstQuad.p2,this.p2,tmpVec2a);vec2.addTwoScaledUnitVectors(tmpVec2a,b43,l43*-(1.0-rect.right),b23,l23*-(1.0-rect.bottom));vec2.add(dstQuad.p3,this.p3,tmpVec2a);vec2.addTwoScaledUnitVectors(tmpVec2a,b43,l43*rect.left,b14,l14*-(1.0-rect.bottom));vec2.add(dstQuad.p4,this.p4,tmpVec2a);},toString:function(){return'Quad('+
-vec2.toString(this.p1)+', '+
-vec2.toString(this.p2)+', '+
-vec2.toString(this.p3)+', '+
-vec2.toString(this.p4)+')';}};function sign(p1,p2,p3){return(p1[0]-p3[0])*(p2[1]-p3[1])-
-(p2[0]-p3[0])*(p1[1]-p3[1]);}
-function pointInTriangle2(pt,p1,p2,p3){var b1=sign(pt,p1,p2)<0.0;var b2=sign(pt,p2,p3)<0.0;var b3=sign(pt,p3,p1)<0.0;return((b1==b2)&&(b2==b3));}
-function pointInImplicitQuad(point,p1,p2,p3,p4){return pointInTriangle2(point,p1,p2,p3)||pointInTriangle2(point,p1,p3,p4);}
-return{pointInTriangle2:pointInTriangle2,pointInImplicitQuad:pointInImplicitQuad,Quad:Quad};});'use strict';tr.exportTo('tr.model.source_info',function(){function SourceInfo(file,opt_line,opt_column){this.file_=file;this.line_=opt_line||-1;this.column_=opt_column||-1;}
-SourceInfo.prototype={get file(){return this.file_;},get line(){return this.line_;},get column(){return this.column_;},get domain(){if(!this.file_)
-return undefined;var domain=this.file_.match(/(.*:\/\/[^:\/]*)/i);return domain?domain[1]:undefined;},toString:function(){var str='';if(this.file_)
-str+=this.file_;if(this.line_>0)
-str+=':'+this.line_;if(this.column_>0)
-str+=':'+this.column_;return str;}};return{SourceInfo:SourceInfo};});'use strict';tr.exportTo('tr.model.source_info',function(){function JSSourceInfo(file,line,column,isNative,scriptId,state){tr.model.source_info.SourceInfo.call(this,file,line,column);this.isNative_=isNative;this.scriptId_=scriptId;this.state_=state;}
-JSSourceInfo.prototype={__proto__:tr.model.source_info.SourceInfo.prototype,get state(){return this.state_;},get isNative(){return this.isNative_;},get scriptId(){return this.scriptId_;},toString:function(){var str=this.isNative_?'[native v8] ':'';return str+
-tr.model.source_info.SourceInfo.prototype.toString.call(this);}};return{JSSourceInfo:JSSourceInfo,JSSourceState:{COMPILED:'compiled',OPTIMIZABLE:'optimizable',OPTIMIZED:'optimized',UNKNOWN:'unknown'}};});'use strict';tr.exportTo('tr.e.importer',function(){function TraceCodeEntry(address,size,name,scriptId){this.id_=tr.b.GUID.allocate();this.address_=address;this.size_=size;var rePrefix=/^(\w*:)?([*~]?)(.*)$/m;var tokens=rePrefix.exec(name);var prefix=tokens[1];var state=tokens[2];var body=tokens[3];if(state==='*'){state=tr.model.source_info.JSSourceState.OPTIMIZED;}else if(state==='~'){state=tr.model.source_info.JSSourceState.OPTIMIZABLE;}else if(state===''){state=tr.model.source_info.JSSourceState.COMPILED;}else{console.warning('Unknown v8 code state '+state);state=tr.model.source_info.JSSourceState.UNKNOWN;}
-var rawName;var rawUrl;if(prefix==='Script:'){rawName='';rawUrl=body;}else{var spacePos=body.lastIndexOf(' ');rawName=spacePos!==-1?body.substr(0,spacePos):body;rawUrl=spacePos!==-1?body.substr(spacePos+1):'';}
-function splitLineAndColumn(url){var lineColumnRegEx=/(?::(\d+))?(?::(\d+))?$/;var lineColumnMatch=lineColumnRegEx.exec(url);var lineNumber;var columnNumber;if(typeof(lineColumnMatch[1])==='string'){lineNumber=parseInt(lineColumnMatch[1],10);lineNumber=isNaN(lineNumber)?undefined:lineNumber-1;}
-if(typeof(lineColumnMatch[2])==='string'){columnNumber=parseInt(lineColumnMatch[2],10);columnNumber=isNaN(columnNumber)?undefined:columnNumber-1;}
-return{url:url.substring(0,url.length-lineColumnMatch[0].length),lineNumber:lineNumber,columnNumber:columnNumber};}
-var nativeSuffix=' native';var isNative=rawName.endsWith(nativeSuffix);this.name_=isNative?rawName.slice(0,-nativeSuffix.length):rawName;var urlData=splitLineAndColumn(rawUrl);var url=urlData.url||'';var line=urlData.lineNumber||0;var column=urlData.columnNumber||0;this.sourceInfo_=new tr.model.source_info.JSSourceInfo(url,line,column,isNative,scriptId,state);};TraceCodeEntry.prototype={get id(){return this.id_;},get sourceInfo(){return this.sourceInfo_;},get name(){return this.name_;},set address(address){this.address_=address;},get address(){return this.address_;},set size(size){this.size_=size;},get size(){return this.size_;}};return{TraceCodeEntry:TraceCodeEntry};});'use strict';tr.exportTo('tr.e.importer',function(){function TraceCodeMap(){this.banks_=new Map();}
-TraceCodeMap.prototype={addEntry:function(addressHex,size,name,scriptId){var entry=new tr.e.importer.TraceCodeEntry(this.getAddress_(addressHex),size,name,scriptId);this.addEntry_(addressHex,entry);},moveEntry:function(oldAddressHex,newAddressHex,size){var entry=this.getBank_(oldAddressHex).removeEntry(this.getAddress_(oldAddressHex));if(!entry)
-return;entry.address=this.getAddress_(newAddressHex);entry.size=size;this.addEntry_(newAddressHex,entry);},lookupEntry:function(addressHex){return this.getBank_(addressHex).lookupEntry(this.getAddress_(addressHex));},addEntry_:function(addressHex,entry){this.getBank_(addressHex).addEntry(entry);},getAddress_:function(addressHex){var bankSizeHexDigits=13;addressHex=addressHex.slice(2);return parseInt(addressHex.slice(-bankSizeHexDigits),16);},getBank_:function(addressHex){addressHex=addressHex.slice(2);var bankSizeHexDigits=13;var maxHexDigits=16;var bankName=addressHex.slice(-maxHexDigits,-bankSizeHexDigits);var bank=this.banks_.get(bankName);if(!bank){bank=new TraceCodeBank();this.banks_.set(bankName,bank);}
-return bank;}};function TraceCodeBank(){this.entries_=[];}
-TraceCodeBank.prototype={removeEntry:function(address){if(this.entries_.length===0)
-return undefined;var index=tr.b.findLowIndexInSortedArray(this.entries_,function(entry){return entry.address;},address);var entry=this.entries_[index];if(!entry||entry.address!==address)
-return undefined;this.entries_.splice(index,1);return entry;},lookupEntry:function(address){var index=tr.b.findHighIndexInSortedArray(this.entries_,function(e){return address-e.address;})-1;var entry=this.entries_[index];return entry&&address<entry.address+entry.size?entry:undefined;},addEntry:function(newEntry){if(this.entries_.length===0)
-this.entries_.push(newEntry);var endAddress=newEntry.address+newEntry.size;var lastIndex=tr.b.findLowIndexInSortedArray(this.entries_,function(entry){return entry.address;},endAddress);var index;for(index=lastIndex-1;index>=0;--index){var entry=this.entries_[index];var entryEndAddress=entry.address+entry.size;if(entryEndAddress<=newEntry.address)
-break;}
-++index;this.entries_.splice(index,lastIndex-index,newEntry);}};return{TraceCodeMap:TraceCodeMap};});'use strict';tr.exportTo('tr.e.importer.v8',function(){function SplayTree(){};SplayTree.prototype.root_=null;SplayTree.prototype.isEmpty=function(){return!this.root_;};SplayTree.prototype.insert=function(key,value){if(this.isEmpty()){this.root_=new SplayTree.Node(key,value);return;}
-this.splay_(key);if(this.root_.key==key){return;}
-var node=new SplayTree.Node(key,value);if(key>this.root_.key){node.left=this.root_;node.right=this.root_.right;this.root_.right=null;}else{node.right=this.root_;node.left=this.root_.left;this.root_.left=null;}
-this.root_=node;};SplayTree.prototype.remove=function(key){if(this.isEmpty()){throw Error('Key not found: '+key);}
-this.splay_(key);if(this.root_.key!=key){throw Error('Key not found: '+key);}
-var removed=this.root_;if(!this.root_.left){this.root_=this.root_.right;}else{var right=this.root_.right;this.root_=this.root_.left;this.splay_(key);this.root_.right=right;}
-return removed;};SplayTree.prototype.find=function(key){if(this.isEmpty()){return null;}
-this.splay_(key);return this.root_.key==key?this.root_:null;};SplayTree.prototype.findMin=function(){if(this.isEmpty()){return null;}
-var current=this.root_;while(current.left){current=current.left;}
-return current;};SplayTree.prototype.findMax=function(opt_startNode){if(this.isEmpty()){return null;}
-var current=opt_startNode||this.root_;while(current.right){current=current.right;}
-return current;};SplayTree.prototype.findGreatestLessThan=function(key){if(this.isEmpty()){return null;}
-this.splay_(key);if(this.root_.key<=key){return this.root_;}else if(this.root_.left){return this.findMax(this.root_.left);}else{return null;}};SplayTree.prototype.exportKeysAndValues=function(){var result=[];this.traverse_(function(node){result.push([node.key,node.value]);});return result;};SplayTree.prototype.exportValues=function(){var result=[];this.traverse_(function(node){result.push(node.value);});return result;};SplayTree.prototype.splay_=function(key){if(this.isEmpty()){return;}
-var dummy,left,right;dummy=left=right=new SplayTree.Node(null,null);var current=this.root_;while(true){if(key<current.key){if(!current.left){break;}
-if(key<current.left.key){var tmp=current.left;current.left=tmp.right;tmp.right=current;current=tmp;if(!current.left){break;}}
-right.left=current;right=current;current=current.left;}else if(key>current.key){if(!current.right){break;}
-if(key>current.right.key){var tmp=current.right;current.right=tmp.left;tmp.left=current;current=tmp;if(!current.right){break;}}
-left.right=current;left=current;current=current.right;}else{break;}}
-left.right=current.left;right.left=current.right;current.left=dummy.right;current.right=dummy.left;this.root_=current;};SplayTree.prototype.traverse_=function(f){var nodesToVisit=[this.root_];while(nodesToVisit.length>0){var node=nodesToVisit.shift();if(node==null){continue;}
-f(node);nodesToVisit.push(node.left);nodesToVisit.push(node.right);}};SplayTree.Node=function(key,value){this.key=key;this.value=value;};SplayTree.Node.prototype.left=null;SplayTree.Node.prototype.right=null;return{SplayTree:SplayTree};});'use strict';tr.exportTo('tr.e.importer.v8',function(){function CodeMap(){this.dynamics_=new tr.e.importer.v8.SplayTree();this.dynamicsNameGen_=new tr.e.importer.v8.CodeMap.NameGenerator();this.statics_=new tr.e.importer.v8.SplayTree();this.libraries_=new tr.e.importer.v8.SplayTree();this.pages_=[];};CodeMap.PAGE_ALIGNMENT=12;CodeMap.PAGE_SIZE=1<<CodeMap.PAGE_ALIGNMENT;CodeMap.prototype.addCode=function(start,codeEntry){this.deleteAllCoveredNodes_(this.dynamics_,start,start+codeEntry.size);this.dynamics_.insert(start,codeEntry);};CodeMap.prototype.moveCode=function(from,to){var removedNode=this.dynamics_.remove(from);this.deleteAllCoveredNodes_(this.dynamics_,to,to+removedNode.value.size);this.dynamics_.insert(to,removedNode.value);};CodeMap.prototype.deleteCode=function(start){var removedNode=this.dynamics_.remove(start);};CodeMap.prototype.addLibrary=function(start,codeEntry){this.markPages_(start,start+codeEntry.size);this.libraries_.insert(start,codeEntry);};CodeMap.prototype.addStaticCode=function(start,codeEntry){this.statics_.insert(start,codeEntry);};CodeMap.prototype.markPages_=function(start,end){for(var addr=start;addr<=end;addr+=CodeMap.PAGE_SIZE){this.pages_[addr>>>CodeMap.PAGE_ALIGNMENT]=1;}};CodeMap.prototype.deleteAllCoveredNodes_=function(tree,start,end){var to_delete=[];var addr=end-1;while(addr>=start){var node=tree.findGreatestLessThan(addr);if(!node)break;var start2=node.key,end2=start2+node.value.size;if(start2<end&&start<end2)to_delete.push(start2);addr=start2-1;}
-for(var i=0,l=to_delete.length;i<l;++i)tree.remove(to_delete[i]);};CodeMap.prototype.isAddressBelongsTo_=function(addr,node){return addr>=node.key&&addr<(node.key+node.value.size);};CodeMap.prototype.findInTree_=function(tree,addr){var node=tree.findGreatestLessThan(addr);return node&&this.isAddressBelongsTo_(addr,node)?node.value:null;};CodeMap.prototype.findEntry=function(addr){var pageAddr=addr>>>CodeMap.PAGE_ALIGNMENT;if(pageAddr in this.pages_){return this.findInTree_(this.statics_,addr)||this.findInTree_(this.libraries_,addr);}
-var min=this.dynamics_.findMin();var max=this.dynamics_.findMax();if(max!=null&&addr<(max.key+max.value.size)&&addr>=min.key){var dynaEntry=this.findInTree_(this.dynamics_,addr);if(dynaEntry==null)return null;if(!dynaEntry.nameUpdated_){dynaEntry.name=this.dynamicsNameGen_.getName(dynaEntry.name);dynaEntry.nameUpdated_=true;}
-return dynaEntry;}
-return null;};CodeMap.prototype.findDynamicEntryByStartAddress=function(addr){var node=this.dynamics_.find(addr);return node?node.value:null;};CodeMap.prototype.getAllDynamicEntries=function(){return this.dynamics_.exportValues();};CodeMap.prototype.getAllDynamicEntriesWithAddresses=function(){return this.dynamics_.exportKeysAndValues();};CodeMap.prototype.getAllStaticEntries=function(){return this.statics_.exportValues();};CodeMap.prototype.getAllLibrariesEntries=function(){return this.libraries_.exportValues();};CodeMap.CodeEntry=function(size,opt_name){this.id=tr.b.GUID.allocate();this.size=size;this.name=opt_name||'';this.nameUpdated_=false;};CodeMap.CodeEntry.prototype.getName=function(){return this.name;};CodeMap.CodeEntry.prototype.toString=function(){return this.name+': '+this.size.toString(16);};CodeMap.NameGenerator=function(){this.knownNames_={};};CodeMap.NameGenerator.prototype.getName=function(name){if(!(name in this.knownNames_)){this.knownNames_[name]=0;return name;}
-var count=++this.knownNames_[name];return name+' {'+count+'}';};return{CodeMap:CodeMap};});'use strict';tr.exportTo('tr.model',function(){function YComponent(stableId,yPercentOffset){this.stableId=stableId;this.yPercentOffset=yPercentOffset;}
-YComponent.prototype={toDict:function(){return{stableId:this.stableId,yPercentOffset:this.yPercentOffset};}};function Location(xWorld,yComponents){this.xWorld_=xWorld;this.yComponents_=yComponents;};Location.fromViewCoordinates=function(viewport,viewX,viewY){var dt=viewport.currentDisplayTransform;var xWorld=dt.xViewToWorld(viewX);var yComponents=[];var elem=document.elementFromPoint(viewX+viewport.modelTrackContainer.canvas.offsetLeft,viewY+viewport.modelTrackContainer.canvas.offsetTop);while(elem instanceof tr.ui.tracks.Track){if(elem.eventContainer){var boundRect=elem.getBoundingClientRect();var yPercentOffset=(viewY-boundRect.top)/boundRect.height;yComponents.push(new YComponent(elem.eventContainer.stableId,yPercentOffset));}
-elem=elem.parentElement;}
-if(yComponents.length==0)
-return;return new Location(xWorld,yComponents);}
-Location.fromStableIdAndTimestamp=function(viewport,stableId,ts){var xWorld=ts;var yComponents=[];var containerToTrack=viewport.containerToTrackMap;var elem=containerToTrack.getTrackByStableId(stableId);if(!elem)
-return;var firstY=elem.getBoundingClientRect().top;while(elem instanceof tr.ui.tracks.Track){if(elem.eventContainer){var boundRect=elem.getBoundingClientRect();var yPercentOffset=(firstY-boundRect.top)/boundRect.height;yComponents.push(new YComponent(elem.eventContainer.stableId,yPercentOffset));}
-elem=elem.parentElement;}
-if(yComponents.length==0)
-return;return new Location(xWorld,yComponents);}
-Location.prototype={get xWorld(){return this.xWorld_;},getContainingTrack:function(viewport){var containerToTrack=viewport.containerToTrackMap;for(var i in this.yComponents_){var yComponent=this.yComponents_[i];var track=containerToTrack.getTrackByStableId(yComponent.stableId);if(track!==undefined)
-return track;}},toViewCoordinates:function(viewport){var dt=viewport.currentDisplayTransform;var containerToTrack=viewport.containerToTrackMap;var viewX=dt.xWorldToView(this.xWorld_);var viewY=-1;for(var index in this.yComponents_){var yComponent=this.yComponents_[index];var track=containerToTrack.getTrackByStableId(yComponent.stableId);if(track!==undefined){var boundRect=track.getBoundingClientRect();viewY=yComponent.yPercentOffset*boundRect.height+boundRect.top;break;}}
-return{viewX:viewX,viewY:viewY};},toDict:function(){return{xWorld:this.xWorld_,yComponents:this.yComponents_};}};return{Location:Location};});'use strict';tr.exportTo('tr.model',function(){function Annotation(){this.guid_=tr.b.GUID.allocate();this.view_=undefined;};Annotation.fromDictIfPossible=function(args){if(args.typeName===undefined)
-throw new Error('Missing typeName argument');var typeInfo=Annotation.findTypeInfoMatching(function(typeInfo){return typeInfo.metadata.typeName===args.typeName;});if(typeInfo===undefined)
-return undefined;return typeInfo.constructor.fromDict(args);};Annotation.fromDict=function(){throw new Error('Not implemented');}
-Annotation.prototype={get guid(){return this.guid_;},onRemove:function(){},toDict:function(){throw new Error('Not implemented');},getOrCreateView:function(viewport){if(!this.view_)
-this.view_=this.createView_(viewport);return this.view_;},createView_:function(){throw new Error('Not implemented');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);tr.b.decorateExtensionRegistry(Annotation,options);Annotation.addEventListener('will-register',function(e){if(!e.typeInfo.constructor.hasOwnProperty('fromDict'))
-throw new Error('Must have fromDict method');if(!e.typeInfo.metadata.typeName)
-throw new Error('Registered Annotations must provide typeName');});return{Annotation:Annotation};});'use strict';tr.exportTo('tr.ui.annotations',function(){function AnnotationView(viewport,annotation){}
-AnnotationView.prototype={draw:function(ctx){throw new Error('Not implemented');}};return{AnnotationView:AnnotationView};});'use strict';tr.exportTo('tr.ui.annotations',function(){function RectAnnotationView(viewport,annotation){this.viewport_=viewport;this.annotation_=annotation;}
-RectAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,draw:function(ctx){var dt=this.viewport_.currentDisplayTransform;var startCoords=this.annotation_.startLocation.toViewCoordinates(this.viewport_);var endCoords=this.annotation_.endLocation.toViewCoordinates(this.viewport_);var startY=startCoords.viewY-ctx.canvas.getBoundingClientRect().top;var sizeY=endCoords.viewY-startCoords.viewY;if(startY+sizeY<0){startY=sizeY;}else if(startY<0){startY=0;}
-ctx.fillStyle=this.annotation_.fillStyle;ctx.fillRect(startCoords.viewX,startY,endCoords.viewX-startCoords.viewX,sizeY);}};return{RectAnnotationView:RectAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function RectAnnotation(start,end){tr.model.Annotation.apply(this,arguments);this.startLocation_=start;this.endLocation_=end;this.fillStyle='rgba(255, 180, 0, 0.3)';}
-RectAnnotation.fromDict=function(dict){var args=dict.args;var startLoc=new tr.model.Location(args.start.xWorld,args.start.yComponents);var endLoc=new tr.model.Location(args.end.xWorld,args.end.yComponents);return new tr.model.RectAnnotation(startLoc,endLoc);}
-RectAnnotation.prototype={__proto__:tr.model.Annotation.prototype,get startLocation(){return this.startLocation_;},get endLocation(){return this.endLocation_;},toDict:function(){return{typeName:'rect',args:{start:this.startLocation.toDict(),end:this.endLocation.toDict()}};},createView_:function(viewport){return new tr.ui.annotations.RectAnnotationView(viewport,this);}};tr.model.Annotation.register(RectAnnotation,{typeName:'rect'});return{RectAnnotation:RectAnnotation};});'use strict';tr.exportTo('tr.ui.annotations',function(){function CommentBoxAnnotationView(viewport,annotation){this.viewport_=viewport;this.annotation_=annotation;this.textArea_=undefined;this.styleWidth=250;this.styleHeight=50;this.fontSize=10;this.rightOffset=50;this.topOffset=25;}
-CommentBoxAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,removeTextArea:function(){this.textArea_.parentNode.removeChild(this.textArea_);},draw:function(ctx){var coords=this.annotation_.location.toViewCoordinates(this.viewport_);if(coords.viewX<0){if(this.textArea_)
-this.textArea_.style.visibility='hidden';return;}
-if(!this.textArea_){this.textArea_=document.createElement('textarea');this.textArea_.style.position='absolute';this.textArea_.readOnly=true;this.textArea_.value=this.annotation_.text;this.textArea_.style.zIndex=1;ctx.canvas.parentNode.appendChild(this.textArea_);}
-this.textArea_.style.width=this.styleWidth+'px';this.textArea_.style.height=this.styleHeight+'px';this.textArea_.style.fontSize=this.fontSize+'px';this.textArea_.style.visibility='visible';this.textArea_.style.left=coords.viewX+ctx.canvas.getBoundingClientRect().left+
-this.rightOffset+'px';this.textArea_.style.top=coords.viewY-ctx.canvas.getBoundingClientRect().top-
-this.topOffset+'px';ctx.strokeStyle='rgb(0, 0, 0)';ctx.lineWidth=2;ctx.beginPath();tr.ui.b.drawLine(ctx,coords.viewX,coords.viewY-ctx.canvas.getBoundingClientRect().top,coords.viewX+this.rightOffset,coords.viewY-this.topOffset-
-ctx.canvas.getBoundingClientRect().top);ctx.stroke();}};return{CommentBoxAnnotationView:CommentBoxAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function CommentBoxAnnotation(location,text){tr.model.Annotation.apply(this,arguments);this.location=location;this.text=text;}
-CommentBoxAnnotation.fromDict=function(dict){var args=dict.args;var location=new tr.model.Location(args.location.xWorld,args.location.yComponents);return new tr.model.CommentBoxAnnotation(location,args.text);};CommentBoxAnnotation.prototype={__proto__:tr.model.Annotation.prototype,onRemove:function(){this.view_.removeTextArea();},toDict:function(){return{typeName:'comment_box',args:{text:this.text,location:this.location.toDict()}};},createView_:function(viewport){return new tr.ui.annotations.CommentBoxAnnotationView(viewport,this);}};tr.model.Annotation.register(CommentBoxAnnotation,{typeName:'comment_box'});return{CommentBoxAnnotation:CommentBoxAnnotation};});'use strict';tr.exportTo('tr.model',function(){function HeapEntry(heapDump,leafStackFrame,size){this.heapDump=heapDump;this.leafStackFrame=leafStackFrame;this.size=size;}
-function HeapDump(processMemoryDump,allocatorName){this.processMemoryDump=processMemoryDump;this.allocatorName=allocatorName;this.entries=[];}
-HeapDump.prototype={addEntry:function(leafStackFrame,size){var entry=new HeapEntry(this,leafStackFrame,size);this.entries.push(entry);return entry;}};return{HeapEntry:HeapEntry,HeapDump:HeapDump};});'use strict';tr.exportTo('tr.ui.annotations',function(){function XMarkerAnnotationView(viewport,annotation){this.viewport_=viewport;this.annotation_=annotation;}
-XMarkerAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,draw:function(ctx){var dt=this.viewport_.currentDisplayTransform;var viewX=dt.xWorldToView(this.annotation_.timestamp);ctx.beginPath();tr.ui.b.drawLine(ctx,viewX,0,viewX,ctx.canvas.height);ctx.strokeStyle=this.annotation_.strokeStyle;ctx.stroke();}};return{XMarkerAnnotationView:XMarkerAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function XMarkerAnnotation(timestamp){tr.model.Annotation.apply(this,arguments);this.timestamp=timestamp;this.strokeStyle='rgba(0, 0, 255, 0.5)';}
-XMarkerAnnotation.fromDict=function(dict){return new XMarkerAnnotation(dict.args.timestamp);}
-XMarkerAnnotation.prototype={__proto__:tr.model.Annotation.prototype,toDict:function(){return{typeName:'xmarker',args:{timestamp:this.timestamp}};},createView_:function(viewport){return new tr.ui.annotations.XMarkerAnnotationView(viewport,this);}};tr.model.Annotation.register(XMarkerAnnotation,{typeName:'xmarker'});return{XMarkerAnnotation:XMarkerAnnotation};});'use strict';tr.exportTo('tr.e.importer',function(){var deepCopy=tr.b.deepCopy;var ColorScheme=tr.b.ColorScheme;function getEventColor(event,opt_customName){if(event.cname)
-return ColorScheme.getColorIdForReservedName(event.cname);else if(opt_customName||event.name){return ColorScheme.getColorIdForGeneralPurposeString(opt_customName||event.name);}}
-var timestampFromUs=tr.b.u.Units.timestampFromUs;var maybeTimestampFromUs=tr.b.u.Units.maybeTimestampFromUs;var PRODUCER='producer';var CONSUMER='consumer';var STEP='step';function TraceEventImporter(model,eventData){this.importPriority=1;this.model_=model;this.events_=undefined;this.sampleEvents_=undefined;this.stackFrameEvents_=undefined;this.systemTraceEvents_=undefined;this.battorData_=undefined;this.eventsWereFromString_=false;this.softwareMeasuredCpuCount_=undefined;this.allAsyncEvents_=[];this.allFlowEvents_=[];this.allObjectEvents_=[];this.traceEventSampleStackFramesByName_={};this.v8ProcessCodeMaps_={};this.v8ProcessRootStackFrame_={};this.allMemoryDumpEvents_={};if(typeof(eventData)==='string'||eventData instanceof String){eventData=eventData.trim();if(eventData[0]==='['){eventData=eventData.replace(/\s*,\s*$/,'');if(eventData[eventData.length-1]!==']')
-eventData=eventData+']';}
-this.events_=JSON.parse(eventData);this.eventsWereFromString_=true;}else{this.events_=eventData;}
-this.traceAnnotations_=this.events_.traceAnnotations;if(this.events_.traceEvents){var container=this.events_;this.events_=this.events_.traceEvents;this.systemTraceEvents_=container.systemTraceEvents;this.battorData_=container.battorLogAsString;this.sampleEvents_=container.samples;this.stackFrameEvents_=container.stackFrames;if(container.displayTimeUnit){var unitName=container.displayTimeUnit;var unit=tr.b.u.TimeDisplayModes[unitName];if(unit===undefined){throw new Error('Unit '+unitName+' is not supported.');}
-this.model_.intrinsicTimeUnit=unit;}
-var knownFieldNames={battorLogAsString:true,samples:true,stackFrames:true,systemTraceEvents:true,traceAnnotations:true,traceEvents:true};for(var fieldName in container){if(fieldName in knownFieldNames)
-continue;this.model_.metadata.push({name:fieldName,value:container[fieldName]});}}}
-TraceEventImporter.canImport=function(eventData){if(typeof(eventData)==='string'||eventData instanceof String){eventData=eventData.trim();return eventData[0]==='{'||eventData[0]==='[';}
-if(eventData instanceof Array&&eventData.length&&eventData[0].ph)
-return true;if(eventData.traceEvents){if(eventData.traceEvents instanceof Array){if(eventData.traceEvents.length&&eventData.traceEvents[0].ph)
-return true;if(eventData.samples.length&&eventData.stackFrames!==undefined)
-return true;}}
-return false;};TraceEventImporter.prototype={__proto__:tr.importer.Importer.prototype,extractSubtraces:function(){var systemEventsTmp=this.systemTraceEvents_;var battorDataTmp=this.battorData_;this.systemTraceEvents_=undefined;this.battorData_=undefined;var subTraces=systemEventsTmp?[systemEventsTmp]:[];if(battorDataTmp)
-subTraces.push(battorDataTmp);return subTraces;},deepCopyIfNeeded_:function(obj){if(obj===undefined)
-obj={};if(this.eventsWereFromString_)
-return obj;return deepCopy(obj);},deepCopyAlways_:function(obj){if(obj===undefined)
-obj={};return deepCopy(obj);},processAsyncEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allAsyncEvents_.push({sequenceNumber:this.allAsyncEvents_.length,event:event,thread:thread});},processFlowEvent:function(event,opt_slice){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allFlowEvents_.push({refGuid:tr.b.GUID.getLastGuid(),sequenceNumber:this.allFlowEvents_.length,event:event,slice:opt_slice,thread:thread});},processCounterEvent:function(event){var ctr_name;if(event.id!==undefined)
-ctr_name=event.name+'['+event.id+']';else
-ctr_name=event.name;var ctr=this.model_.getOrCreateProcess(event.pid).getOrCreateCounter(event.cat,ctr_name);var reservedColorId=event.cname?getEventColor(event):undefined;if(ctr.numSeries===0){for(var seriesName in event.args){var colorId=reservedColorId||getEventColor(event,ctr.name+'.'+seriesName);ctr.addSeries(new tr.model.CounterSeries(seriesName,colorId));}
-if(ctr.numSeries===0){this.model_.importWarning({type:'counter_parse_error',message:'Expected counter '+event.name+' to have at least one argument to use as a value.'});delete ctr.parent.counters[ctr.name];return;}}
-var ts=timestampFromUs(event.ts);ctr.series.forEach(function(series){var val=event.args[series.name]?event.args[series.name]:0;series.addCounterSample(ts,val);});},processObjectEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allObjectEvents_.push({sequenceNumber:this.allObjectEvents_.length,event:event,thread:thread});},processDurationEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);var ts=timestampFromUs(event.ts);if(!thread.sliceGroup.isTimestampValidForBeginOrEnd(ts)){this.model_.importWarning({type:'duration_parse_error',message:'Timestamps are moving backward.'});return;}
-if(event.ph==='B'){var slice=thread.sliceGroup.beginSlice(event.cat,event.name,timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args),timestampFromUs(event.tts),event.argsStripped,getEventColor(event));slice.startStackFrame=this.getStackFrameForEvent_(event);}else if(event.ph==='I'||event.ph==='i'||event.ph==='R'){if(event.s!==undefined&&event.s!=='t')
-throw new Error('This should never happen');thread.sliceGroup.beginSlice(event.cat,event.name,timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args),timestampFromUs(event.tts),event.argsStripped,getEventColor(event));var slice=thread.sliceGroup.endSlice(timestampFromUs(event.ts),timestampFromUs(event.tts));slice.startStackFrame=this.getStackFrameForEvent_(event);slice.endStackFrame=undefined;}else{if(!thread.sliceGroup.openSliceCount){this.model_.importWarning({type:'duration_parse_error',message:'E phase event without a matching B phase event.'});return;}
-var slice=thread.sliceGroup.endSlice(timestampFromUs(event.ts),timestampFromUs(event.tts),getEventColor(event));if(event.name&&slice.title!=event.name){this.model_.importWarning({type:'title_match_error',message:'Titles do not match. Title is '+
-slice.title+' in openSlice, and is '+
-event.name+' in endSlice'});}
-slice.endStackFrame=this.getStackFrameForEvent_(event);this.mergeArgsInto_(slice.args,event.args,slice.title);}},mergeArgsInto_:function(dstArgs,srcArgs,eventName){for(var arg in srcArgs){if(dstArgs[arg]!==undefined){this.model_.importWarning({type:'arg_merge_error',message:'Different phases of '+eventName+' provided values for argument '+arg+'.'+' The last provided value will be used.'});}
-dstArgs[arg]=this.deepCopyIfNeeded_(srcArgs[arg]);}},processCompleteEvent:function(event){if(event.cat!==undefined&&event.cat.indexOf('trace_event_overhead')>-1)
-return undefined;var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);if(event.flow_out){if(event.flow_in)
-event.flowPhase=STEP;else
-event.flowPhase=PRODUCER;}else if(event.flow_in){event.flowPhase=CONSUMER;}
-var slice=thread.sliceGroup.pushCompleteSlice(event.cat,event.name,timestampFromUs(event.ts),maybeTimestampFromUs(event.dur),maybeTimestampFromUs(event.tts),maybeTimestampFromUs(event.tdur),this.deepCopyIfNeeded_(event.args),event.argsStripped,getEventColor(event),event.bind_id);slice.startStackFrame=this.getStackFrameForEvent_(event);slice.endStackFrame=this.getStackFrameForEvent_(event,true);return slice;},processMetadataEvent:function(event){if(event.argsStripped)
-return;if(event.name==='process_name'){var process=this.model_.getOrCreateProcess(event.pid);process.name=event.args.name;}else if(event.name==='process_labels'){var process=this.model_.getOrCreateProcess(event.pid);var labels=event.args.labels.split(',');for(var i=0;i<labels.length;i++)
-process.addLabelIfNeeded(labels[i]);}else if(event.name==='process_sort_index'){var process=this.model_.getOrCreateProcess(event.pid);process.sortIndex=event.args.sort_index;}else if(event.name==='thread_name'){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);thread.name=event.args.name;}else if(event.name==='thread_sort_index'){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);thread.sortIndex=event.args.sort_index;}else if(event.name==='num_cpus'){var n=event.args.number;if(this.softwareMeasuredCpuCount_!==undefined)
-n=Math.max(n,this.softwareMeasuredCpuCount_);this.softwareMeasuredCpuCount_=n;}else if(event.name==='stackFrames'){var stackFrames=event.args.stackFrames;if(stackFrames===undefined){this.model_.importWarning({type:'metadata_parse_error',message:'No stack frames found in a \''+event.name+'\' metadata event'});}else{this.importStackFrames_(stackFrames,'p'+event.pid+':',true);}}else{this.model_.importWarning({type:'metadata_parse_error',message:'Unrecognized metadata name: '+event.name});}},processJitCodeEvent:function(event){if(this.v8ProcessCodeMaps_[event.pid]===undefined)
-this.v8ProcessCodeMaps_[event.pid]=new tr.e.importer.TraceCodeMap();var map=this.v8ProcessCodeMaps_[event.pid];var data=event.args.data;if(event.name==='JitCodeMoved')
-map.moveEntry(data.code_start,data.new_code_start,data.code_len);else
-map.addEntry(data.code_start,data.code_len,data.name,data.script_id);},processInstantEvent:function(event){if(event.name==='JitCodeAdded'||event.name==='JitCodeMoved'){this.processJitCodeEvent(event);return;}
-if(event.s==='t'||event.s===undefined){this.processDurationEvent(event);return;}
-var constructor;switch(event.s){case'g':constructor=tr.model.GlobalInstantEvent;break;case'p':constructor=tr.model.ProcessInstantEvent;break;default:this.model_.importWarning({type:'instant_parse_error',message:'I phase event with unknown "s" field value.'});return;}
-var instantEvent=new constructor(event.cat,event.name,getEventColor(event),timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args));switch(instantEvent.type){case tr.model.InstantEventType.GLOBAL:this.model_.pushInstantEvent(instantEvent);break;case tr.model.InstantEventType.PROCESS:var process=this.model_.getOrCreateProcess(event.pid);process.pushInstantEvent(instantEvent);break;default:throw new Error('Unknown instant event type: '+event.s);}},processV8Sample:function(event){var data=event.args.data;if(data.vm_state==='js'&&!data.stack.length)
-return;var rootStackFrame=this.v8ProcessRootStackFrame_[event.pid];if(!rootStackFrame){rootStackFrame=new tr.model.StackFrame(undefined,'v8-root-stack-frame','v8-root-stack-frame',0);this.v8ProcessRootStackFrame_[event.pid]=rootStackFrame;}
-function findChildWithEntryID(stackFrame,entryID){return tr.b.findFirstInArray(stackFrame.children,function(child){return child.entryID===entryID;});}
-var model=this.model_;function addStackFrame(lastStackFrame,entry){var childFrame=findChildWithEntryID(lastStackFrame,entry.id);if(childFrame)
-return childFrame;var frame=new tr.model.StackFrame(lastStackFrame,tr.b.GUID.allocate(),entry.name,ColorScheme.getColorIdForGeneralPurposeString(entry.name),entry.sourceInfo);frame.entryID=entry.id;model.addStackFrame(frame);return frame;}
-var lastStackFrame=rootStackFrame;if(data.stack.length>0&&this.v8ProcessCodeMaps_[event.pid]){var map=this.v8ProcessCodeMaps_[event.pid];data.stack.reverse();for(var i=0;i<data.stack.length;i++){var entry=map.lookupEntry(data.stack[i]);if(entry===undefined){entry={id:'unknown',name:'unknown',sourceInfo:undefined};}
-lastStackFrame=addStackFrame(lastStackFrame,entry);}}else{var entry={id:data.vm_state,name:data.vm_state,sourceInfo:undefined};lastStackFrame=addStackFrame(lastStackFrame,entry);}
-var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);var sample=new tr.model.Sample(undefined,thread,'V8 Sample',timestampFromUs(event.ts),lastStackFrame,1,this.deepCopyIfNeeded_(event.args));this.model_.samples.push(sample);},processTraceSampleEvent:function(event){if(event.name==='V8Sample'){this.processV8Sample(event);return;}
-var stackFrame=this.getStackFrameForEvent_(event);if(stackFrame===undefined){stackFrame=this.traceEventSampleStackFramesByName_[event.name];}
-if(stackFrame===undefined){var id='te-'+tr.b.GUID.allocate();stackFrame=new tr.model.StackFrame(undefined,id,event.name,ColorScheme.getColorIdForGeneralPurposeString(event.name));this.model_.addStackFrame(stackFrame);this.traceEventSampleStackFramesByName_[event.name]=stackFrame;}
-var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);var sample=new tr.model.Sample(undefined,thread,'Trace Event Sample',timestampFromUs(event.ts),stackFrame,1,this.deepCopyIfNeeded_(event.args));this.model_.samples.push(sample);},getOrCreateMemoryDumpEvents_:function(dumpId){if(this.allMemoryDumpEvents_[dumpId]===undefined){this.allMemoryDumpEvents_[dumpId]={global:undefined,process:[]};}
-return this.allMemoryDumpEvents_[dumpId];},processMemoryDumpEvent:function(event){if(event.id===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:event.ph+' phase event without a dump ID.'});return;}
-var events=this.getOrCreateMemoryDumpEvents_(event.id);if(event.ph==='v'){events.process.push(event);}else if(event.ph==='V'){if(events.global!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple V phase events with the same dump ID.'});return;}
-events.global=event;}else{throw new Error('Invalid memory dump event phase "'+event.ph+'".');}},importEvents:function(){var csr=new tr.ClockSyncRecord('ftrace_importer',0,{});this.model_.clockSyncRecords.push(csr);if(this.stackFrameEvents_){this.importStackFrames_(this.stackFrameEvents_,'g',false);}
-if(this.traceAnnotations_)
-this.importAnnotations_();var events=this.events_;for(var eI=0;eI<events.length;eI++){var event=events[eI];if(event.args==='__stripped__'){event.argsStripped=true;event.args=undefined;}
-if(event.ph==='B'||event.ph==='E'){this.processDurationEvent(event);}else if(event.ph==='X'){var slice=this.processCompleteEvent(event);if(slice!==undefined&&event.bind_id!==undefined)
-this.processFlowEvent(event,slice);}else if(event.ph==='b'||event.ph==='e'||event.ph==='n'||event.ph==='S'||event.ph==='F'||event.ph==='T'||event.ph==='p'){this.processAsyncEvent(event);}else if(event.ph==='I'||event.ph==='i'||event.ph==='R'){this.processInstantEvent(event);}else if(event.ph==='P'){this.processTraceSampleEvent(event);}else if(event.ph==='C'){this.processCounterEvent(event);}else if(event.ph==='M'){this.processMetadataEvent(event);}else if(event.ph==='N'||event.ph==='D'||event.ph==='O'){this.processObjectEvent(event);}else if(event.ph==='s'||event.ph==='t'||event.ph==='f'){this.processFlowEvent(event);}else if(event.ph==='v'||event.ph==='V'){this.processMemoryDumpEvent(event);}else{this.model_.importWarning({type:'parse_error',message:'Unrecognized event phase: '+
-event.ph+' ('+event.name+')'});}}
-tr.b.iterItems(this.v8ProcessRootStackFrame_,function(name,frame){frame.removeAllChildren();});},importStackFrames_:function(rawStackFrames,idPrefix,addRootFrame){var model=this.model_;var rootStackFrame;if(addRootFrame){rootStackFrame=new tr.model.StackFrame(undefined,idPrefix,undefined,undefined);model.addStackFrame(rootStackFrame);}else{rootStackFrame=undefined;}
-for(var id in rawStackFrames){var rawStackFrame=rawStackFrames[id];var fullId=idPrefix+id;var textForColor=rawStackFrame.category?rawStackFrame.category:rawStackFrame.name;var stackFrame=new tr.model.StackFrame(undefined,fullId,rawStackFrame.name,ColorScheme.getColorIdForGeneralPurposeString(textForColor));model.addStackFrame(stackFrame);}
-for(var id in rawStackFrames){var fullId=idPrefix+id;var stackFrame=model.stackFrames[fullId];if(stackFrame===undefined)
-throw new Error('Internal error');var rawStackFrame=rawStackFrames[id];var parentId=rawStackFrame.parent;var parentStackFrame;if(parentId===undefined){parentStackFrame=rootStackFrame;}else{var parentFullId=idPrefix+parentId;parentStackFrame=model.stackFrames[parentFullId];if(parentStackFrame===undefined){this.model_.importWarning({type:'metadata_parse_error',message:'Missing parent frame with ID '+parentFullId+' for stack frame \''+stackFrame.name+'\' (ID '+fullId+').'});parentStackFrame=rootStackFrame;}}
-stackFrame.parentFrame=parentStackFrame;}},importAnnotations_:function(){for(var id in this.traceAnnotations_){var annotation=tr.model.Annotation.fromDictIfPossible(this.traceAnnotations_[id]);if(!annotation){this.model_.importWarning({type:'annotation_warning',message:'Unrecognized traceAnnotation typeName \"'+
-this.traceAnnotations_[id].typeName+'\"'});continue;}
-this.model_.addAnnotation(annotation);}},finalizeImport:function(){if(this.softwareMeasuredCpuCount_!==undefined){this.model_.kernel.softwareMeasuredCpuCount=this.softwareMeasuredCpuCount_;}
-this.createAsyncSlices_();this.createFlowSlices_();this.createExplicitObjects_();this.createImplicitObjects_();this.createMemoryDumps_();},getStackFrameForEvent_:function(event,opt_lookForEndEvent){var sf;var stack;if(opt_lookForEndEvent){sf=event.esf;stack=event.estack;}else{sf=event.sf;stack=event.stack;}
-if(stack!==undefined&&sf!==undefined){this.model_.importWarning({type:'stack_frame_and_stack_error',message:'Event at '+event.ts+' cannot have both a stack and a stackframe.'});return undefined;}
-if(stack!==undefined)
-return this.model_.resolveStackToStackFrame_(event.pid,stack);if(sf===undefined)
-return undefined;var stackFrame=this.model_.stackFrames['g'+sf];if(stackFrame===undefined){this.model_.importWarning({type:'sample_import_error',message:'No frame for '+sf});return;}
-return stackFrame;},resolveStackToStackFrame_:function(pid,stack){return undefined;},importSampleData:function(){if(!this.sampleEvents_)
-return;var m=this.model_;var events=this.sampleEvents_;if(this.events_.length===0){for(var i=0;i<events.length;i++){var event=events[i];m.getOrCreateProcess(event.tid).getOrCreateThread(event.tid);}}
-var threadsByTid={};m.getAllThreads().forEach(function(t){threadsByTid[t.tid]=t;});for(var i=0;i<events.length;i++){var event=events[i];var thread=threadsByTid[event.tid];if(thread===undefined){m.importWarning({type:'sample_import_error',message:'Thread '+events.tid+'not found'});continue;}
-var cpu;if(event.cpu!==undefined)
-cpu=m.kernel.getOrCreateCpu(event.cpu);var stackFrame=this.getStackFrameForEvent_(event);var sample=new tr.model.Sample(cpu,thread,event.name,timestampFromUs(event.ts),stackFrame,event.weight);m.samples.push(sample);}},joinRefs:function(){this.joinObjectRefs_();},createAsyncSlices_:function(){if(this.allAsyncEvents_.length===0)
-return;this.allAsyncEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!==0)
-return d;return x.sequenceNumber-y.sequenceNumber;});var legacyEvents=[];var nestableAsyncEventsByKey={};for(var i=0;i<this.allAsyncEvents_.length;i++){var asyncEventState=this.allAsyncEvents_[i];var event=asyncEventState.event;if(event.ph==='S'||event.ph==='F'||event.ph==='T'||event.ph==='p'){legacyEvents.push(asyncEventState);continue;}
-if(event.cat===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require a '+'cat parameter.'});continue;}
-if(event.name===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require a '+'name parameter.'});continue;}
-if(event.id===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require an '+'id parameter.'});continue;}
-var key=event.cat+':'+event.id;if(nestableAsyncEventsByKey[key]===undefined)
-nestableAsyncEventsByKey[key]=[];nestableAsyncEventsByKey[key].push(asyncEventState);}
-this.createLegacyAsyncSlices_(legacyEvents);for(var key in nestableAsyncEventsByKey){var eventStateEntries=nestableAsyncEventsByKey[key];var parentStack=[];for(var i=0;i<eventStateEntries.length;++i){var eventStateEntry=eventStateEntries[i];if(eventStateEntry.event.ph==='e'){var parentIndex=-1;for(var k=parentStack.length-1;k>=0;--k){if(parentStack[k].event.name===eventStateEntry.event.name){parentIndex=k;break;}}
-if(parentIndex===-1){eventStateEntry.finished=false;}else{parentStack[parentIndex].end=eventStateEntry;while(parentIndex<parentStack.length){parentStack.pop();}}}
-if(parentStack.length>0)
-eventStateEntry.parentEntry=parentStack[parentStack.length-1];if(eventStateEntry.event.ph==='b')
-parentStack.push(eventStateEntry);}
-var topLevelSlices=[];for(var i=0;i<eventStateEntries.length;++i){var eventStateEntry=eventStateEntries[i];if(eventStateEntry.event.ph==='e'&&eventStateEntry.finished===undefined){continue;}
-var startState=undefined;var endState=undefined;var sliceArgs=eventStateEntry.event.args||{};var sliceError=undefined;if(eventStateEntry.event.ph==='n'){startState=eventStateEntry;endState=eventStateEntry;}else if(eventStateEntry.event.ph==='b'){if(eventStateEntry.end===undefined){eventStateEntry.end=eventStateEntries[eventStateEntries.length-1];sliceError='Slice has no matching END. End time has been adjusted.';this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async BEGIN event at '+
-eventStateEntry.event.ts+' with name='+
-eventStateEntry.event.name+' and id='+eventStateEntry.event.id+' was unmatched.'});}else{function concatenateArguments(args1,args2){if(args1.params===undefined||args2.params===undefined)
-return tr.b.concatenateObjects(args1,args2);var args3={};args3.params=tr.b.concatenateObjects(args1.params,args2.params);return tr.b.concatenateObjects(args1,args2,args3);}
-var endArgs=eventStateEntry.end.event.args||{};sliceArgs=concatenateArguments(sliceArgs,endArgs);}
-startState=eventStateEntry;endState=eventStateEntry.end;}else{sliceError='Slice has no matching BEGIN. Start time has been adjusted.';this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async END event at '+
-eventStateEntry.event.ts+' with name='+
-eventStateEntry.event.name+' and id='+eventStateEntry.event.id+' was unmatched.'});startState=eventStateEntries[0];endState=eventStateEntry;}
-var isTopLevel=(eventStateEntry.parentEntry===undefined);var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(eventStateEntry.event.cat,eventStateEntry.event.name);var thread_start=undefined;var thread_duration=undefined;if(startState.event.tts&&startState.event.use_async_tts){thread_start=timestampFromUs(startState.event.tts);if(endState.event.tts){var thread_end=timestampFromUs(endState.event.tts);thread_duration=thread_end-thread_start;}}
-var slice=new asyncSliceConstructor(eventStateEntry.event.cat,eventStateEntry.event.name,getEventColor(endState.event),timestampFromUs(startState.event.ts),sliceArgs,timestampFromUs(endState.event.ts-startState.event.ts),isTopLevel,thread_start,thread_duration,startState.event.argsStripped);slice.startThread=startState.thread;slice.endThread=endState.thread;slice.startStackFrame=this.getStackFrameForEvent_(startState.event);slice.endStackFrame=this.getStackFrameForEvent_(endState.event);slice.id=key;if(sliceError!==undefined)
-slice.error=sliceError;eventStateEntry.slice=slice;if(isTopLevel){topLevelSlices.push(slice);}else if(eventStateEntry.parentEntry.slice!==undefined){eventStateEntry.parentEntry.slice.subSlices.push(slice);}}
-for(var si=0;si<topLevelSlices.length;si++){topLevelSlices[si].startThread.asyncSliceGroup.push(topLevelSlices[si]);}}},createLegacyAsyncSlices_:function(legacyEvents){if(legacyEvents.length===0)
-return;legacyEvents.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
-return d;return x.sequenceNumber-y.sequenceNumber;});var asyncEventStatesByNameThenID={};for(var i=0;i<legacyEvents.length;i++){var asyncEventState=legacyEvents[i];var event=asyncEventState.event;var name=event.name;if(name===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Async events (ph: S, T, p, or F) require a name '+' parameter.'});continue;}
-var id=event.id;if(id===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Async events (ph: S, T, p, or F) require an id parameter.'});continue;}
-if(event.ph==='S'){if(asyncEventStatesByNameThenID[name]===undefined)
-asyncEventStatesByNameThenID[name]={};if(asyncEventStatesByNameThenID[name][id]){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', a slice of the same id '+id+' was alrady open.'});continue;}
-asyncEventStatesByNameThenID[name][id]=[];asyncEventStatesByNameThenID[name][id].push(asyncEventState);}else{if(asyncEventStatesByNameThenID[name]===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', no slice named '+name+' was open.'});continue;}
-if(asyncEventStatesByNameThenID[name][id]===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', no slice named '+name+' with id='+id+' was open.'});continue;}
-var events=asyncEventStatesByNameThenID[name][id];events.push(asyncEventState);if(event.ph==='F'){var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(events[0].event.cat,name);var slice=new asyncSliceConstructor(events[0].event.cat,name,getEventColor(events[0].event),timestampFromUs(events[0].event.ts),tr.b.concatenateObjects(events[0].event.args,events[events.length-1].event.args),timestampFromUs(event.ts-events[0].event.ts),true,undefined,undefined,events[0].event.argsStripped);slice.startThread=events[0].thread;slice.endThread=asyncEventState.thread;slice.id=id;var stepType=events[1].event.ph;var isValid=true;for(var j=1;j<events.length-1;++j){if(events[j].event.ph==='T'||events[j].event.ph==='p'){isValid=this.assertStepTypeMatches_(stepType,events[j]);if(!isValid)
-break;}
-if(events[j].event.ph==='S'){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
-event.event.name+' with id='+event.event.id+' had a step before the start event.'});continue;}
-if(events[j].event.ph==='F'){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
-event.event.name+' with id='+event.event.id+' had a step after the finish event.'});continue;}
-var startIndex=j+(stepType==='T'?0:-1);var endIndex=startIndex+1;var subName=events[j].event.name;if(!events[j].event.argsStripped&&(events[j].event.ph==='T'||events[j].event.ph==='p'))
-subName=subName+':'+events[j].event.args.step;var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(events[0].event.cat,subName);var subSlice=new asyncSliceConstructor(events[0].event.cat,subName,getEventColor(event,subName+j),timestampFromUs(events[startIndex].event.ts),this.deepCopyIfNeeded_(events[j].event.args),timestampFromUs(events[endIndex].event.ts-events[startIndex].event.ts),undefined,undefined,events[startIndex].event.argsStripped);subSlice.startThread=events[startIndex].thread;subSlice.endThread=events[endIndex].thread;subSlice.id=id;slice.subSlices.push(subSlice);}
-if(isValid){slice.startThread.asyncSliceGroup.push(slice);}
-delete asyncEventStatesByNameThenID[name][id];}}}},assertStepTypeMatches_:function(stepType,event){if(stepType!=event.event.ph){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
-event.event.name+' with id='+event.event.id+' had both begin and end steps, which is not allowed.'});return false;}
-return true;},createFlowSlices_:function(){if(this.allFlowEvents_.length===0)
-return;var that=this;function validateFlowEvent(){if(event.name===undefined){that.model_.importWarning({type:'flow_slice_parse_error',message:'Flow events (ph: s, t or f) require a name parameter.'});return false;}
-if(event.ph==='s'||event.ph==='f'||event.ph==='t'){if(event.id===undefined){that.model_.importWarning({type:'flow_slice_parse_error',message:'Flow events (ph: s, t or f) require an id parameter.'});return false;}
-return true;}
-if(event.bind_id){if(event.flow_in===undefined&&event.flow_out===undefined){that.model_.importWarning({type:'flow_slice_parse_error',message:'Flow producer or consumer require flow_in or flow_out.'});return false;}
-return true;}
-return false;}
-function createFlowEvent(thread,event,opt_slice){var startSlice,flowId,flowStartTs;if(event.bind_id){startSlice=opt_slice;flowId=event.bind_id;flowStartTs=timestampFromUs(event.ts+event.dur);}else{var ts=timestampFromUs(event.ts);startSlice=thread.sliceGroup.findSliceAtTs(ts);if(startSlice===undefined)
-return undefined;flowId=event.id;flowStartTs=ts;}
-var flowEvent=new tr.model.FlowEvent(event.cat,flowId,event.name,getEventColor(event),flowStartTs,that.deepCopyAlways_(event.args));flowEvent.startSlice=startSlice;flowEvent.startStackFrame=that.getStackFrameForEvent_(event);flowEvent.endStackFrame=undefined;startSlice.outFlowEvents.push(flowEvent);return flowEvent;}
-function finishFlowEventWith(flowEvent,thread,event,refGuid,bindToParent,opt_slice){var endSlice;if(event.bind_id){endSlice=opt_slice;}else{var ts=timestampFromUs(event.ts);if(bindToParent){endSlice=thread.sliceGroup.findSliceAtTs(ts);}else{endSlice=thread.sliceGroup.findNextSliceAfter(ts,refGuid);}
-if(endSlice===undefined)
-return false;}
-endSlice.inFlowEvents.push(flowEvent);flowEvent.endSlice=endSlice;flowEvent.duration=timestampFromUs(event.ts)-flowEvent.start;flowEvent.endStackFrame=that.getStackFrameForEvent_(event);that.mergeArgsInto_(flowEvent.args,event.args,flowEvent.title);return true;}
-function processFlowConsumer(flowIdToEvent,sliceGuidToEvent,event,slice){var flowEvent=flowIdToEvent[event.bind_id];if(flowEvent===undefined){that.model_.importWarning({type:'flow_slice_ordering_error',message:'Flow consumer '+event.bind_id+' does not have '+'a flow producer'});return false;}else if(flowEvent.endSlice){var flowProducer=flowEvent.startSlice;flowEvent=createFlowEvent(undefined,sliceGuidToEvent[flowProducer.guid],flowProducer);}
-var ok=finishFlowEventWith(flowEvent,undefined,event,refGuid,undefined,slice);if(ok){that.model_.flowEvents.push(flowEvent);}else{that.model_.importWarning({type:'flow_slice_end_error',message:'Flow consumer '+event.bind_id+' does not end '+'at an actual slice, so cannot be created.'});return false;}
-return true;}
-function processFlowProducer(flowIdToEvent,flowStatus,event,slice){if(flowIdToEvent[event.bind_id]&&flowStatus[event.bind_id]){that.model_.importWarning({type:'flow_slice_start_error',message:'Flow producer '+event.bind_id+' already seen'});return false;}
-var flowEvent=createFlowEvent(undefined,event,slice);if(!flowEvent){that.model_.importWarning({type:'flow_slice_start_error',message:'Flow producer '+event.bind_id+' does not start'+'a flow'});return false;}
-flowIdToEvent[event.bind_id]=flowEvent;return;}
-this.allFlowEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
-return d;return x.sequenceNumber-y.sequenceNumber;});var flowIdToEvent={};var sliceGuidToEvent={};var flowStatus={};for(var i=0;i<this.allFlowEvents_.length;++i){var data=this.allFlowEvents_[i];var refGuid=data.refGuid;var event=data.event;var thread=data.thread;if(!validateFlowEvent(event))
-continue;if(event.bind_id){var slice=data.slice;sliceGuidToEvent[slice.guid]=event;if(event.flowPhase===PRODUCER){if(!processFlowProducer(flowIdToEvent,flowStatus,event,slice))
-continue;flowStatus[event.bind_id]=true;}
-else{if(!processFlowConsumer(flowIdToEvent,sliceGuidToEvent,event,slice))
-continue;flowStatus[event.bind_id]=false;if(event.flowPhase===STEP){if(!processFlowProducer(flowIdToEvent,flowStatus,event,slice))
-continue;flowStatus[event.bind_id]=true;}}
-continue;}
-var flowEvent;if(event.ph==='s'){if(flowIdToEvent[event.id]){this.model_.importWarning({type:'flow_slice_start_error',message:'event id '+event.id+' already seen when '+'encountering start of flow event.'});continue;}
-flowEvent=createFlowEvent(thread,event);if(!flowEvent){this.model_.importWarning({type:'flow_slice_start_error',message:'event id '+event.id+' does not start '+'at an actual slice, so cannot be created.'});continue;}
-flowIdToEvent[event.id]=flowEvent;}else if(event.ph==='t'||event.ph==='f'){flowEvent=flowIdToEvent[event.id];if(flowEvent===undefined){this.model_.importWarning({type:'flow_slice_ordering_error',message:'Found flow phase '+event.ph+' for id: '+event.id+' but no flow start found.'});continue;}
-var bindToParent=event.ph==='t';if(event.ph==='f'){if(event.bp===undefined){if(event.cat.indexOf('input')>-1)
-bindToParent=true;else if(event.cat.indexOf('ipc.flow')>-1)
-bindToParent=true;}else{if(event.bp!=='e'){this.model_.importWarning({type:'flow_slice_bind_point_error',message:'Flow event with invalid binding point (event.bp).'});continue;}
-bindToParent=true;}}
-var ok=finishFlowEventWith(flowEvent,thread,event,refGuid,bindToParent);if(ok){that.model_.flowEvents.push(flowEvent);}else{this.model_.importWarning({type:'flow_slice_end_error',message:'event id '+event.id+' does not end '+'at an actual slice, so cannot be created.'});}
-flowIdToEvent[event.id]=undefined;if(ok&&event.ph==='t'){flowEvent=createFlowEvent(thread,event);flowIdToEvent[event.id]=flowEvent;}}}},createExplicitObjects_:function(){if(this.allObjectEvents_.length===0)
-return;function processEvent(objectEventState){var event=objectEventState.event;var thread=objectEventState.thread;if(event.name===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+JSON.stringify(event)+': '+'Object events require an name parameter.'});}
-if(event.id===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+JSON.stringify(event)+': '+'Object events require an id parameter.'});}
-var process=thread.parent;var ts=timestampFromUs(event.ts);var instance;if(event.ph==='N'){try{instance=process.objects.idWasCreated(event.id,event.cat,event.name,ts);}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing create of '+
-event.id+' at ts='+ts+': '+e});return;}}else if(event.ph==='O'){if(event.args.snapshot===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+event.id+' at ts='+ts+': '+'Snapshots must have args: {snapshot: ...}'});return;}
-var snapshot;try{var args=this.deepCopyIfNeeded_(event.args.snapshot);var cat;if(args.cat){cat=args.cat;delete args.cat;}else{cat=event.cat;}
-var baseTypename;if(args.base_type){baseTypename=args.base_type;delete args.base_type;}else{baseTypename=undefined;}
-snapshot=process.objects.addSnapshot(event.id,cat,event.name,ts,args,baseTypename);snapshot.snapshottedOnThread=thread;}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing snapshot of '+
-event.id+' at ts='+ts+': '+e});return;}
-instance=snapshot.objectInstance;}else if(event.ph==='D'){try{process.objects.idWasDeleted(event.id,event.cat,event.name,ts);var instanceMap=process.objects.getOrCreateInstanceMap_(event.id);instance=instanceMap.lastInstance;}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing delete of '+
-event.id+' at ts='+ts+': '+e});return;}}
-if(instance)
-instance.colorId=getEventColor(event,instance.typeName);}
-this.allObjectEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
-return d;return x.sequenceNumber-y.sequenceNumber;});var allObjectEvents=this.allObjectEvents_;for(var i=0;i<allObjectEvents.length;i++){var objectEventState=allObjectEvents[i];try{processEvent.call(this,objectEventState);}catch(e){this.model_.importWarning({type:'object_parse_error',message:e.message});}}},createImplicitObjects_:function(){tr.b.iterItems(this.model_.processes,function(pid,process){this.createImplicitObjectsForProcess_(process);},this);},createImplicitObjectsForProcess_:function(process){function processField(referencingObject,referencingObjectFieldName,referencingObjectFieldValue,containingSnapshot){if(!referencingObjectFieldValue)
-return;if(referencingObjectFieldValue instanceof
-tr.model.ObjectSnapshot)
-return null;if(referencingObjectFieldValue.id===undefined)
-return;var implicitSnapshot=referencingObjectFieldValue;var rawId=implicitSnapshot.id;var m=/(.+)\/(.+)/.exec(rawId);if(!m)
-throw new Error('Implicit snapshots must have names.');delete implicitSnapshot.id;var name=m[1];var id=m[2];var res;var cat;if(implicitSnapshot.cat!==undefined)
-cat=implicitSnapshot.cat;else
-cat=containingSnapshot.objectInstance.category;var baseTypename;if(implicitSnapshot.base_type)
-baseTypename=implicitSnapshot.base_type;else
-baseTypename=undefined;try{res=process.objects.addSnapshot(id,cat,name,containingSnapshot.ts,implicitSnapshot,baseTypename);}catch(e){this.model_.importWarning({type:'object_snapshot_parse_error',message:'While processing implicit snapshot of '+
-rawId+' at ts='+containingSnapshot.ts+': '+e});return;}
-res.objectInstance.hasImplicitSnapshots=true;res.containingSnapshot=containingSnapshot;res.snapshottedOnThread=containingSnapshot.snapshottedOnThread;referencingObject[referencingObjectFieldName]=res;if(!(res instanceof tr.model.ObjectSnapshot))
-throw new Error('Created object must be instanceof snapshot');return res.args;}
-function iterObject(object,func,containingSnapshot,thisArg){if(!(object instanceof Object))
-return;if(object instanceof Array){for(var i=0;i<object.length;i++){var res=func.call(thisArg,object,i,object[i],containingSnapshot);if(res===null)
-continue;if(res)
-iterObject(res,func,containingSnapshot,thisArg);else
-iterObject(object[i],func,containingSnapshot,thisArg);}
-return;}
-for(var key in object){var res=func.call(thisArg,object,key,object[key],containingSnapshot);if(res===null)
-continue;if(res)
-iterObject(res,func,containingSnapshot,thisArg);else
-iterObject(object[key],func,containingSnapshot,thisArg);}}
-process.objects.iterObjectInstances(function(instance){instance.snapshots.forEach(function(snapshot){if(snapshot.args.id!==undefined)
-throw new Error('args cannot have an id field inside it');iterObject(snapshot.args,processField,snapshot,this);},this);},this);},createMemoryDumps_:function(){tr.b.iterItems(this.allMemoryDumpEvents_,function(id,events){var range=new tr.b.Range();if(events.global!==undefined)
-range.addValue(timestampFromUs(events.global.ts));for(var i=0;i<events.process.length;i++)
-range.addValue(timestampFromUs(events.process[i].ts));var globalMemoryDump=new tr.model.GlobalMemoryDump(this.model_,range.min);globalMemoryDump.duration=range.range;this.model_.globalMemoryDumps.push(globalMemoryDump);if(events.process.length===0){this.model_.importWarning({type:'memory_dump_parse_error',message:'No process memory dumps associated with global memory'+' dump '+id+'.'});}
-var allMemoryAllocatorDumpsByGuid={};var globalMemoryAllocatorDumpsByFullName={};var LEVELS_OF_DETAIL=[undefined,'light','detailed'];var globalLevelOfDetailIndex=undefined;events.process.forEach(function(processEvent){var pid=processEvent.pid;if(pid in globalMemoryDump.processMemoryDumps){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple process memory dumps with pid='+pid+' for dump id '+id+'.'});return;}
-var dumps=processEvent.args.dumps;if(dumps===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'dumps not found in process memory dump for '+'pid='+pid+' and dump id='+id+'.'});return;}
-var process=this.model_.getOrCreateProcess(pid);var processMemoryDump=new tr.model.ProcessMemoryDump(globalMemoryDump,process,timestampFromUs(processEvent.ts));var processLevelOfDetail=dumps.level_of_detail;var processLevelOfDetailIndex=LEVELS_OF_DETAIL.indexOf(processLevelOfDetail);if(processLevelOfDetailIndex<0){this.model_.importWarning({type:'memory_dump_parse_error',message:'unknown level of detail \''+processLevelOfDetail+'\' of process memory dump for pid='+pid+' and dump id='+id+'.'});}else{processMemoryDump.levelOfDetail=processLevelOfDetail;if(globalLevelOfDetailIndex===undefined){globalLevelOfDetailIndex=processLevelOfDetailIndex;}else if(globalLevelOfDetailIndex!==processLevelOfDetailIndex){this.model_.importWarning({type:'memory_dump_parse_error',message:'diffent levels of detail of process memory dumps '+'for dump id='+id+'.'});globalLevelOfDetailIndex=Math.max(globalLevelOfDetailIndex,processLevelOfDetailIndex);}}
-var rawTotals=dumps.process_totals;if(rawTotals!==undefined){processMemoryDump.totals={};if(rawTotals.resident_set_bytes!==undefined){processMemoryDump.totals.residentBytes=parseInt(rawTotals.resident_set_bytes,16);}
-if(rawTotals.peak_resident_set_bytes!==undefined){if(rawTotals.is_peak_rss_resetable===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Optional field peak_resident_set_bytes found'+' but is_peak_rss_resetable not found in'+' process memory dump for pid='+pid+' and dump id='+id+'.'});}
-processMemoryDump.totals.peakResidentBytes=parseInt(rawTotals.peak_resident_set_bytes,16);}
-if(rawTotals.is_peak_rss_resetable!==undefined){if(rawTotals.peak_resident_set_bytes===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Optional field is_peak_rss_resetable found'+' but peak_resident_set_bytes not found in'+' process memory dump for pid='+pid+' and dump id='+id+'.'});}
-processMemoryDump.totals.arePeakResidentBytesResettable=!!rawTotals.is_peak_rss_resetable;}}
-if(processMemoryDump.totals===undefined||processMemoryDump.totals.residentBytes===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Mandatory field resident_set_bytes not found in'+' process memory dump for pid='+pid+' and dump id='+id+'.'});}
-if(dumps.process_mmaps&&dumps.process_mmaps.vm_regions){function parseByteStat(rawValue){if(rawValue===undefined)
-return undefined;return parseInt(rawValue,16);}
-processMemoryDump.vmRegions=dumps.process_mmaps.vm_regions.map(function(rawRegion){var byteStats=new tr.model.VMRegionByteStats(parseByteStat(rawRegion.bs.pc),parseByteStat(rawRegion.bs.pd),parseByteStat(rawRegion.bs.sc),parseByteStat(rawRegion.bs.sd),parseByteStat(rawRegion.bs.pss),parseByteStat(rawRegion.bs.sw));return new tr.model.VMRegion(parseInt(rawRegion.sa,16),parseInt(rawRegion.sz,16),rawRegion.pf,rawRegion.mf,byteStats);});}
-var processMemoryAllocatorDumpsByFullName={};if(dumps.allocators!==undefined){tr.b.iterItems(dumps.allocators,function(fullName,rawAllocatorDump){var guid=rawAllocatorDump.guid;if(guid===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+fullName+' from pid='+pid+' does not have a GUID.'});}
-var GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX='global/';var containerMemoryDump;var dstIndex;if(fullName.startsWith(GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX)){fullName=fullName.substring(GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX.length);containerMemoryDump=globalMemoryDump;dstIndex=globalMemoryAllocatorDumpsByFullName;}else{containerMemoryDump=processMemoryDump;dstIndex=processMemoryAllocatorDumpsByFullName;}
-var allocatorDump=allMemoryAllocatorDumpsByGuid[guid];if(allocatorDump===undefined){if(fullName in dstIndex){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple GUIDs provided for'+' memory allocator dump '+fullName+': '+
-dstIndex[fullName].guid+', '+guid+' (ignored).'});return;}
-allocatorDump=new tr.model.MemoryAllocatorDump(containerMemoryDump,fullName,guid);dstIndex[fullName]=allocatorDump;if(guid!==undefined)
-allMemoryAllocatorDumpsByGuid[guid]=allocatorDump;}else{if(allocatorDump.containerMemoryDump!==containerMemoryDump){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+fullName+' (GUID='+guid+') dumped in different contexts.'});return;}
-if(allocatorDump.fullName!==fullName){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump with GUID='+guid+' has multiple names: '+allocatorDump.fullName+', '+fullName+' (ignored).'});return;}}
-var attributes=rawAllocatorDump.attrs;if(attributes===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+fullName+' from pid='+pid+' (GUID='+guid+') does not'+' have attributes.'});attributes={};}
-tr.b.iterItems(attributes,function(attrName,attrArgs){if(attrName in allocatorDump.attributes){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple values provided for attribute '+
-attrName+' of memory allocator dump '+fullName+' (GUID='+guid+').'});return;}
-var attrValue=tr.model.Attribute.fromDictIfPossible(attrArgs);allocatorDump.addAttribute(attrName,attrValue);},this);},this);}
-processMemoryDump.memoryAllocatorDumps=this.inferMemoryAllocatorDumpTree_(processMemoryAllocatorDumpsByFullName);if(dumps.heaps!==undefined){processMemoryDump.heapDumps=tr.b.mapItems(dumps.heaps,this.parseHeapDump_.bind(this,processMemoryDump));}
-process.memoryDumps.push(processMemoryDump);globalMemoryDump.processMemoryDumps[pid]=processMemoryDump;},this);globalMemoryDump.levelOfDetail=LEVELS_OF_DETAIL[globalLevelOfDetailIndex];globalMemoryDump.memoryAllocatorDumps=this.inferMemoryAllocatorDumpTree_(globalMemoryAllocatorDumpsByFullName);events.process.forEach(function(processEvent){var dumps=processEvent.args.dumps;if(dumps===undefined)
-return;var edges=dumps.allocators_graph;if(edges===undefined)
-return;edges.forEach(function(rawEdge){var sourceGuid=rawEdge.source;var sourceDump=allMemoryAllocatorDumpsByGuid[sourceGuid];if(sourceDump===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Edge is missing source memory allocator dump (GUID='+
-sourceGuid+')'});return;}
-var targetGuid=rawEdge.target;var targetDump=allMemoryAllocatorDumpsByGuid[targetGuid];if(targetDump===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Edge is missing target memory allocator dump (GUID='+
-targetGuid+')'});return;}
-var importance=rawEdge.importance;var edge=new tr.model.MemoryAllocatorDumpLink(sourceDump,targetDump,importance);switch(rawEdge.type){case'ownership':if(sourceDump.owns!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+sourceDump.fullName+' (GUID='+sourceGuid+') already owns a memory'+' allocator dump ('+
-sourceDump.owns.target.fullName+').'});return;}
-sourceDump.owns=edge;targetDump.ownedBy.push(edge);break;case'retention':sourceDump.retains.push(edge);targetDump.retainedBy.push(edge);break;default:this.model_.importWarning({type:'memory_dump_parse_error',message:'Invalid edge type: '+rawEdge.type+' (source='+sourceGuid+', target='+targetGuid+', importance='+importance+').'});}},this);},this);},this);},inferMemoryAllocatorDumpTree_:function(memoryAllocatorDumpsByFullName){var rootAllocatorDumps=[];var fullNames=Object.keys(memoryAllocatorDumpsByFullName);fullNames.sort();fullNames.forEach(function(fullName){var allocatorDump=memoryAllocatorDumpsByFullName[fullName];while(true){var lastSlashIndex=fullName.lastIndexOf('/');if(lastSlashIndex===-1){rootAllocatorDumps.push(allocatorDump);break;}
-var parentFullName=fullName.substring(0,lastSlashIndex);var parentAllocatorDump=memoryAllocatorDumpsByFullName[parentFullName];var parentAlreadyExisted=true;if(parentAllocatorDump===undefined){parentAlreadyExisted=false;parentAllocatorDump=new tr.model.MemoryAllocatorDump(allocatorDump.containerMemoryDump,parentFullName);memoryAllocatorDumpsByFullName[parentFullName]=parentAllocatorDump;}
-allocatorDump.parent=parentAllocatorDump;parentAllocatorDump.children.push(allocatorDump);if(parentAlreadyExisted)
-break;fullName=parentFullName;allocatorDump=parentAllocatorDump;}},this);return rootAllocatorDumps;},parseHeapDump_:function(processMemoryDump,allocatorName,rawHeapDump){var pid=processMemoryDump.process.pid;var entries=rawHeapDump.entries;if(entries===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Missing heap entries in a '+allocatorName+' heap dump for pid='+pid+'.'});return undefined;}
-var model=this.model_;var heapDump=new tr.model.HeapDump(processMemoryDump,allocatorName);var idPrefix='p'+pid+':';for(var i=0;i<entries.length;i++){var entry=entries[i];var size=parseInt(entry.size,16);var leafStackFrameIndex=entry.bt;var leafStackFrame;if(leafStackFrameIndex===undefined){leafStackFrame=undefined;}else{var leafStackFrameId=idPrefix+leafStackFrameIndex;leafStackFrame=model.stackFrames[leafStackFrameId];if(leafStackFrame===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Missing leaf stack frame (ID '+leafStackFrameId+') of heap entry '+i+' (size '+size+') in a '+
-allocatorName+' heap dump for pid='+pid+'.'});continue;}}
-heapDump.addEntry(leafStackFrame,size);}
-return heapDump;},joinObjectRefs_:function(){tr.b.iterItems(this.model_.processes,function(pid,process){this.joinObjectRefsForProcess_(process);},this);},joinObjectRefsForProcess_:function(process){var patchupsToApply=[];tr.b.iterItems(process.threads,function(tid,thread){thread.asyncSliceGroup.slices.forEach(function(item){this.searchItemForIDRefs_(patchupsToApply,process.objects,'start',item);},this);thread.sliceGroup.slices.forEach(function(item){this.searchItemForIDRefs_(patchupsToApply,process.objects,'start',item);},this);},this);process.objects.iterObjectInstances(function(instance){instance.snapshots.forEach(function(item){this.searchItemForIDRefs_(patchupsToApply,process.objects,'ts',item);},this);},this);patchupsToApply.forEach(function(patchup){patchup.object[patchup.field]=patchup.value;});},searchItemForIDRefs_:function(patchupsToApply,objectCollection,itemTimestampField,item){if(!item.args)
-throw new Error('item is missing its args');function handleField(object,fieldName,fieldValue){if(!fieldValue||(!fieldValue.id_ref&&!fieldValue.idRef))
-return;var id=fieldValue.id_ref||fieldValue.idRef;var ts=item[itemTimestampField];var snapshot=objectCollection.getSnapshotAt(id,ts);if(!snapshot)
-return;patchupsToApply.push({object:object,field:fieldName,value:snapshot});}
-function iterObjectFieldsRecursively(object){if(!(object instanceof Object))
-return;if((object instanceof tr.model.ObjectSnapshot)||(object instanceof Float32Array)||(object instanceof tr.b.Quad))
-return;if(object instanceof Array){for(var i=0;i<object.length;i++){handleField(object,i,object[i]);iterObjectFieldsRecursively(object[i]);}
-return;}
-for(var key in object){var value=object[key];handleField(object,key,value);iterObjectFieldsRecursively(value);}}
-iterObjectFieldsRecursively(item.args);}};tr.importer.Importer.register(TraceEventImporter);return{TraceEventImporter:TraceEventImporter};});'use strict';tr.exportTo('tr.e.importer',function(){var GZIP_MEMBER_HEADER_ID_SIZE=3;var GZIP_HEADER_ID1=0x1f;var GZIP_HEADER_ID2=0x8b;var GZIP_DEFLATE_COMPRESSION=8;function GzipImporter(model,eventData){if(typeof(eventData)==='string'||eventData instanceof String){eventData=JSZip.utils.transformTo('uint8array',eventData);}else if(eventData instanceof ArrayBuffer){eventData=new Uint8Array(eventData);}else
-throw new Error('Unknown gzip data format');this.model_=model;this.gzipData_=eventData;}
-GzipImporter.canImport=function(eventData){var header;if(eventData instanceof ArrayBuffer)
-header=new Uint8Array(eventData.slice(0,GZIP_MEMBER_HEADER_ID_SIZE));else if(typeof(eventData)==='string'||eventData instanceof String){header=eventData.substring(0,GZIP_MEMBER_HEADER_ID_SIZE);header=JSZip.utils.transformTo('uint8array',header);}else
-return false;return header[0]==GZIP_HEADER_ID1&&header[1]==GZIP_HEADER_ID2&&header[2]==GZIP_DEFLATE_COMPRESSION;};GzipImporter.inflateGzipData_=function(data){var position=0;function getByte(){if(position>=data.length)
-throw new Error('Unexpected end of gzip data');return data[position++];}
-function getWord(){var low=getByte();var high=getByte();return(high<<8)+low;}
-function skipBytes(amount){position+=amount;}
-function skipZeroTerminatedString(){while(getByte()!=0){}}
-var id1=getByte();var id2=getByte();if(id1!==GZIP_HEADER_ID1||id2!==GZIP_HEADER_ID2)
-throw new Error('Not gzip data');var compression_method=getByte();if(compression_method!==GZIP_DEFLATE_COMPRESSION)
-throw new Error('Unsupported compression method: '+compression_method);var flags=getByte();var have_header_crc=flags&(1<<1);var have_extra_fields=flags&(1<<2);var have_file_name=flags&(1<<3);var have_comment=flags&(1<<4);skipBytes(4+1+1);if(have_extra_fields){var bytes_to_skip=getWord();skipBytes(bytes_to_skip);}
-if(have_file_name)
-skipZeroTerminatedString();if(have_comment)
-skipZeroTerminatedString();if(have_header_crc)
-getWord();var inflated_data=JSZip.compressions['DEFLATE'].uncompress(data.subarray(position));return JSZip.utils.transformTo('string',inflated_data);},GzipImporter.prototype={__proto__:tr.importer.Importer.prototype,isTraceDataContainer:function(){return true;},extractSubtraces:function(){var eventData=GzipImporter.inflateGzipData_(this.gzipData_);return eventData?[eventData]:[];}};tr.importer.Importer.register(GzipImporter);return{GzipImporter:GzipImporter};});'use strict';tr.exportTo('tr.e.importer',function(){function ZipImporter(model,eventData){if(eventData instanceof ArrayBuffer)
-eventData=new Uint8Array(eventData);this.model_=model;this.eventData_=eventData;}
-ZipImporter.canImport=function(eventData){var header;if(eventData instanceof ArrayBuffer)
-header=new Uint8Array(eventData.slice(0,2));else if(typeof(eventData)==='string'||eventData instanceof String)
-header=[eventData.charCodeAt(0),eventData.charCodeAt(1)];else
-return false;return header[0]==='P'.charCodeAt(0)&&header[1]==='K'.charCodeAt(0);};ZipImporter.prototype={__proto__:tr.importer.Importer.prototype,isTraceDataContainer:function(){return true;},extractSubtraces:function(){var zip=new JSZip(this.eventData_);var subtraces=[];for(var idx in zip.files)
-subtraces.push(zip.files[idx].asBinary());return subtraces;}};tr.importer.Importer.register(ZipImporter);return{ZipImporter:ZipImporter};});'use strict';tr.exportTo('tr.e.importer.v8',function(){function CsvParser(){};CsvParser.CSV_FIELD_RE_=/^"((?:[^"]|"")*)"|([^,]*)/;CsvParser.DOUBLE_QUOTE_RE_=/""/g;CsvParser.prototype.parseLine=function(line){var fieldRe=CsvParser.CSV_FIELD_RE_;var doubleQuoteRe=CsvParser.DOUBLE_QUOTE_RE_;var pos=0;var endPos=line.length;var fields=[];if(endPos>0){do{var fieldMatch=fieldRe.exec(line.substr(pos));if(typeof fieldMatch[1]==='string'){var field=fieldMatch[1];pos+=field.length+3;fields.push(field.replace(doubleQuoteRe,'"'));}else{var field=fieldMatch[2];pos+=field.length+1;fields.push(field);}}while(pos<=endPos);}
-return fields;};function LogReader(dispatchTable){this.dispatchTable_=dispatchTable;this.lineNum_=0;this.csvParser_=new CsvParser();};LogReader.prototype.printError=function(str){};LogReader.prototype.processLogChunk=function(chunk){this.processLog_(chunk.split('\n'));};LogReader.prototype.processLogLine=function(line){this.processLog_([line]);};LogReader.prototype.processStack=function(pc,func,stack){var fullStack=func?[pc,func]:[pc];var prevFrame=pc;for(var i=0,n=stack.length;i<n;++i){var frame=stack[i];var firstChar=frame.charAt(0);if(firstChar=='+'||firstChar=='-'){prevFrame+=parseInt(frame,16);fullStack.push(prevFrame);}else if(firstChar!='o'){fullStack.push(parseInt(frame,16));}}
-return fullStack;};LogReader.prototype.skipDispatch=function(dispatch){return false;};LogReader.prototype.dispatchLogRow_=function(fields){var command=fields[0];if(!(command in this.dispatchTable_))return;var dispatch=this.dispatchTable_[command];if(dispatch===null||this.skipDispatch(dispatch)){return;}
-var parsedFields=[];for(var i=0;i<dispatch.parsers.length;++i){var parser=dispatch.parsers[i];if(parser===null){parsedFields.push(fields[1+i]);}else if(typeof parser=='function'){parsedFields.push(parser(fields[1+i]));}else{parsedFields.push(fields.slice(1+i));break;}}
-dispatch.processor.apply(this,parsedFields);};LogReader.prototype.processLog_=function(lines){for(var i=0,n=lines.length;i<n;++i,++this.lineNum_){var line=lines[i];if(!line){continue;}
-try{var fields=this.csvParser_.parseLine(line);this.dispatchLogRow_(fields);}catch(e){this.printError('line '+(this.lineNum_+1)+': '+
-(e.message||e));}}};return{LogReader:LogReader};});'use strict';tr.exportTo('tr.e.importer.v8',function(){var ColorScheme=tr.b.ColorScheme;function V8LogImporter(model,eventData){this.importPriority=3;this.model_=model;this.logData_=eventData;this.code_map_=new tr.e.importer.v8.CodeMap();this.v8_timer_thread_=undefined;this.v8_thread_=undefined;this.root_stack_frame_=new tr.model.StackFrame(undefined,'v8-root-stack-frame','v8-root-stack-frame',0);this.v8_stack_timeline_=new Array();}
-var kV8BinarySuffixes=['/d8','/libv8.so'];var TimerEventDefaultArgs={'V8.Execute':{pause:false,no_execution:false},'V8.External':{pause:false,no_execution:true},'V8.CompileFullCode':{pause:true,no_execution:true},'V8.RecompileSynchronous':{pause:true,no_execution:true},'V8.RecompileParallel':{pause:false,no_execution:false},'V8.CompileEval':{pause:true,no_execution:true},'V8.Parse':{pause:true,no_execution:true},'V8.PreParse':{pause:true,no_execution:true},'V8.ParseLazy':{pause:true,no_execution:true},'V8.GCScavenger':{pause:true,no_execution:true},'V8.GCCompactor':{pause:true,no_execution:true},'V8.GCContext':{pause:true,no_execution:true}};V8LogImporter.canImport=function(eventData){if(typeof(eventData)!=='string'&&!(eventData instanceof String))
-return false;return eventData.substring(0,11)=='v8-version,'||eventData.substring(0,12)=='timer-event,'||eventData.substring(0,5)=='tick,'||eventData.substring(0,15)=='shared-library,'||eventData.substring(0,9)=='profiler,'||eventData.substring(0,14)=='code-creation,';};V8LogImporter.prototype={__proto__:tr.importer.Importer.prototype,processTimerEvent_:function(name,start,length){var args=TimerEventDefaultArgs[name];if(args===undefined)return;start/=1000;length/=1000;var colorId=ColorScheme.getColorIdForGeneralPurposeString(name);var slice=new tr.model.Slice('v8',name,colorId,start,args,length);this.v8_timer_thread_.sliceGroup.pushSlice(slice);},processTimerEventStart_:function(name,start){var args=TimerEventDefaultArgs[name];if(args===undefined)return;start/=1000;this.v8_timer_thread_.sliceGroup.beginSlice('v8',name,start,args);},processTimerEventEnd_:function(name,end){end/=1000;this.v8_timer_thread_.sliceGroup.endSlice(end);},processCodeCreateEvent_:function(type,kind,address,size,name){var code_entry=new tr.e.importer.v8.CodeMap.CodeEntry(size,name);code_entry.kind=kind;this.code_map_.addCode(address,code_entry);},processCodeMoveEvent_:function(from,to){this.code_map_.moveCode(from,to);},processCodeDeleteEvent_:function(address){this.code_map_.deleteCode(address);},processSharedLibrary_:function(name,start,end){var code_entry=new tr.e.importer.v8.CodeMap.CodeEntry(end-start,name);code_entry.kind=-3;for(var i=0;i<kV8BinarySuffixes.length;i++){var suffix=kV8BinarySuffixes[i];if(name.indexOf(suffix,name.length-suffix.length)>=0){code_entry.kind=-1;break;}}
-this.code_map_.addLibrary(start,code_entry);},findCodeKind_:function(kind){for(name in CodeKinds){if(CodeKinds[name].kinds.indexOf(kind)>=0){return CodeKinds[name];}}},processTickEvent_:function(pc,start,unused_x,unused_y,vmstate,stack){start/=1000;function findChildWithEntryID(stackFrame,entryID){for(var i=0;i<stackFrame.children.length;i++){if(stackFrame.children[i].entryID==entryID)
-return stackFrame.children[i];}
-return undefined;}
-var lastStackFrame;if(stack&&stack.length){lastStackFrame=this.root_stack_frame_;stack=stack.reverse();for(var i=0;i<stack.length;i++){if(!stack[i])
-break;var entry=this.code_map_.findEntry(stack[i]);var entryID=entry?entry.id:'Unknown';var childFrame=findChildWithEntryID(lastStackFrame,entryID);if(childFrame===undefined){var entryName=entry?entry.name:'Unknown';lastStackFrame=new tr.model.StackFrame(lastStackFrame,'v8sf-'+tr.b.GUID.allocate(),entryName,ColorScheme.getColorIdForGeneralPurposeString(entryName));lastStackFrame.entryID=entryID;this.model_.addStackFrame(lastStackFrame);}else{lastStackFrame=childFrame;}}}else{var pcEntry=this.code_map_.findEntry(pc);var pcEntryID='v8pc-'+(pcEntry?pcEntry.id:'Unknown');if(this.model_.stackFrames[pcEntryID]===undefined){var pcEntryName=pcEntry?pcEntry.name:'Unknown';lastStackFrame=new tr.model.StackFrame(undefined,pcEntryID,pcEntryName,ColorScheme.getColorIdForGeneralPurposeString(pcEntryName));this.model_.addStackFrame(lastStackFrame);}
-lastStackFrame=this.model_.stackFrames[pcEntryID];}
-var sample=new tr.model.Sample(undefined,this.v8_thread_,'V8 PC',start,lastStackFrame,1);this.model_.samples.push(sample);},processDistortion_:function(distortion_in_picoseconds){distortion_per_entry=distortion_in_picoseconds/1000000;},processPlotRange_:function(start,end){xrange_start_override=start;xrange_end_override=end;},processV8Version_:function(major,minor,build,patch,candidate){},importEvents:function(){var logreader=new tr.e.importer.v8.LogReader({'timer-event':{parsers:[null,parseInt,parseInt],processor:this.processTimerEvent_.bind(this)},'shared-library':{parsers:[null,parseInt,parseInt],processor:this.processSharedLibrary_.bind(this)},'timer-event-start':{parsers:[null,parseInt],processor:this.processTimerEventStart_.bind(this)},'timer-event-end':{parsers:[null,parseInt],processor:this.processTimerEventEnd_.bind(this)},'code-creation':{parsers:[null,parseInt,parseInt,parseInt,null],processor:this.processCodeCreateEvent_.bind(this)},'code-move':{parsers:[parseInt,parseInt],processor:this.processCodeMoveEvent_.bind(this)},'code-delete':{parsers:[parseInt],processor:this.processCodeDeleteEvent_.bind(this)},'tick':{parsers:[parseInt,parseInt,null,null,parseInt,'var-args'],processor:this.processTickEvent_.bind(this)},'distortion':{parsers:[parseInt],processor:this.processDistortion_.bind(this)},'plot-range':{parsers:[parseInt,parseInt],processor:this.processPlotRange_.bind(this)},'v8-version':{parsers:[parseInt,parseInt,parseInt,parseInt,parseInt],processor:this.processV8Version_.bind(this)}});this.v8_timer_thread_=this.model_.getOrCreateProcess(-32).getOrCreateThread(1);this.v8_timer_thread_.name='V8 Timers';this.v8_thread_=this.model_.getOrCreateProcess(-32).getOrCreateThread(2);this.v8_thread_.name='V8';var lines=this.logData_.split('\n');for(var i=0;i<lines.length;i++){logreader.processLogLine(lines[i]);}
-this.root_stack_frame_.removeAllChildren();function addSlices(slices,thread){for(var i=0;i<slices.length;i++){var duration=slices[i].end-slices[i].start;var slice=new tr.model.Slice('v8',slices[i].name,ColorScheme.getColorIdForGeneralPurposeString(slices[i].name),slices[i].start,{},duration);thread.sliceGroup.pushSlice(slice);addSlices(slices[i].children,thread);}}
-addSlices(this.v8_stack_timeline_,this.v8_thread_);}};tr.importer.Importer.register(V8LogImporter);return{V8LogImporter:V8LogImporter};});'use strict';tr.exportTo('tr.e.importer.etw',function(){function Parser(importer){this.importer=importer;this.model=importer.model;}
-Parser.prototype={__proto__:Object.prototype};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.mandatoryBaseClass=Parser;tr.b.decorateExtensionRegistry(Parser,options);return{Parser:Parser};});'use strict';tr.exportTo('tr.e.importer.etw',function(){var Parser=tr.e.importer.etw.Parser;var guid='68FDD900-4A3E-11D1-84F4-0000F80464E3';var kEventTraceHeaderOpcode=0;function EventTraceParser(importer){Parser.call(this,importer);importer.registerEventHandler(guid,kEventTraceHeaderOpcode,EventTraceParser.prototype.decodeHeader.bind(this));}
-EventTraceParser.prototype={__proto__:Parser.prototype,decodeFields:function(header,decoder){if(header.version!=2)
-throw new Error('Incompatible EventTrace event version.');var bufferSize=decoder.decodeUInt32();var version=decoder.decodeUInt32();var providerVersion=decoder.decodeUInt32();var numberOfProcessors=decoder.decodeUInt32();var endTime=decoder.decodeUInt64ToString();var timerResolution=decoder.decodeUInt32();var maxFileSize=decoder.decodeUInt32();var logFileMode=decoder.decodeUInt32();var buffersWritten=decoder.decodeUInt32();var startBuffers=decoder.decodeUInt32();var pointerSize=decoder.decodeUInt32();var eventsLost=decoder.decodeUInt32();var cpuSpeed=decoder.decodeUInt32();var loggerName=decoder.decodeUInteger(header.is64);var logFileName=decoder.decodeUInteger(header.is64);var timeZoneInformation=decoder.decodeTimeZoneInformation();var padding=decoder.decodeUInt32();var bootTime=decoder.decodeUInt64ToString();var perfFreq=decoder.decodeUInt64ToString();var startTime=decoder.decodeUInt64ToString();var reservedFlags=decoder.decodeUInt32();var buffersLost=decoder.decodeUInt32();var sessionNameString=decoder.decodeW16String();var logFileNameString=decoder.decodeW16String();return{bufferSize:bufferSize,version:version,providerVersion:providerVersion,numberOfProcessors:numberOfProcessors,endTime:endTime,timerResolution:timerResolution,maxFileSize:maxFileSize,logFileMode:logFileMode,buffersWritten:buffersWritten,startBuffers:startBuffers,pointerSize:pointerSize,eventsLost:eventsLost,cpuSpeed:cpuSpeed,loggerName:loggerName,logFileName:logFileName,timeZoneInformation:timeZoneInformation,bootTime:bootTime,perfFreq:perfFreq,startTime:startTime,reservedFlags:reservedFlags,buffersLost:buffersLost,sessionNameString:sessionNameString,logFileNameString:logFileNameString};},decodeHeader:function(header,decoder){var fields=this.decodeFields(header,decoder);return true;}};Parser.register(EventTraceParser);return{EventTraceParser:EventTraceParser};});'use strict';tr.exportTo('tr.e.importer.etw',function(){var Parser=tr.e.importer.etw.Parser;var guid='3D6FA8D0-FE05-11D0-9DDA-00C04FD7BA7C';var kProcessStartOpcode=1;var kProcessEndOpcode=2;var kProcessDCStartOpcode=3;var kProcessDCEndOpcode=4;var kProcessDefunctOpcode=39;function ProcessParser(importer){Parser.call(this,importer);importer.registerEventHandler(guid,kProcessStartOpcode,ProcessParser.prototype.decodeStart.bind(this));importer.registerEventHandler(guid,kProcessEndOpcode,ProcessParser.prototype.decodeEnd.bind(this));importer.registerEventHandler(guid,kProcessDCStartOpcode,ProcessParser.prototype.decodeDCStart.bind(this));importer.registerEventHandler(guid,kProcessDCEndOpcode,ProcessParser.prototype.decodeDCEnd.bind(this));importer.registerEventHandler(guid,kProcessDefunctOpcode,ProcessParser.prototype.decodeDefunct.bind(this));}
-ProcessParser.prototype={__proto__:Parser.prototype,decodeFields:function(header,decoder){if(header.version>5)
-throw new Error('Incompatible Process event version.');var pageDirectoryBase;if(header.version==1)
-pageDirectoryBase=decoder.decodeUInteger(header.is64);var uniqueProcessKey;if(header.version>=2)
-uniqueProcessKey=decoder.decodeUInteger(header.is64);var processId=decoder.decodeUInt32();var parentId=decoder.decodeUInt32();var sessionId;var exitStatus;if(header.version>=1){sessionId=decoder.decodeUInt32();exitStatus=decoder.decodeInt32();}
-var directoryTableBase;if(header.version>=3)
-directoryTableBase=decoder.decodeUInteger(header.is64);var flags;if(header.version>=4)
-flags=decoder.decodeUInt32();var userSID=decoder.decodeSID(header.is64);var imageFileName;if(header.version>=1)
-imageFileName=decoder.decodeString();var commandLine;if(header.version>=2)
-commandLine=decoder.decodeW16String();var packageFullName;var applicationId;if(header.version>=4){packageFullName=decoder.decodeW16String();applicationId=decoder.decodeW16String();}
-var exitTime;if(header.version==5&&header.opcode==kProcessDefunctOpcode)
-exitTime=decoder.decodeUInt64ToString();return{pageDirectoryBase:pageDirectoryBase,uniqueProcessKey:uniqueProcessKey,processId:processId,parentId:parentId,sessionId:sessionId,exitStatus:exitStatus,directoryTableBase:directoryTableBase,flags:flags,userSID:userSID,imageFileName:imageFileName,commandLine:commandLine,packageFullName:packageFullName,applicationId:applicationId,exitTime:exitTime};},decodeStart:function(header,decoder){var fields=this.decodeFields(header,decoder);var process=this.model.getOrCreateProcess(fields.processId);if(process.hasOwnProperty('has_ended')){throw new Error('Process clash detected.');}
-process.name=fields.imageFileName;return true;},decodeEnd:function(header,decoder){var fields=this.decodeFields(header,decoder);var process=this.model.getOrCreateProcess(fields.processId);process.has_ended=true;return true;},decodeDCStart:function(header,decoder){var fields=this.decodeFields(header,decoder);var process=this.model.getOrCreateProcess(fields.processId);if(process.hasOwnProperty('has_ended'))
-throw new Error('Process clash detected.');process.name=fields.imageFileName;return true;},decodeDCEnd:function(header,decoder){var fields=this.decodeFields(header,decoder);var process=this.model.getOrCreateProcess(fields.processId);process.has_ended=true;return true;},decodeDefunct:function(header,decoder){var fields=this.decodeFields(header,decoder);return true;}};Parser.register(ProcessParser);return{ProcessParser:ProcessParser};});'use strict';tr.exportTo('tr.e.importer.etw',function(){var Parser=tr.e.importer.etw.Parser;var guid='3D6FA8D1-FE05-11D0-9DDA-00C04FD7BA7C';var kThreadStartOpcode=1;var kThreadEndOpcode=2;var kThreadDCStartOpcode=3;var kThreadDCEndOpcode=4;var kThreadCSwitchOpcode=36;function ThreadParser(importer){Parser.call(this,importer);importer.registerEventHandler(guid,kThreadStartOpcode,ThreadParser.prototype.decodeStart.bind(this));importer.registerEventHandler(guid,kThreadEndOpcode,ThreadParser.prototype.decodeEnd.bind(this));importer.registerEventHandler(guid,kThreadDCStartOpcode,ThreadParser.prototype.decodeDCStart.bind(this));importer.registerEventHandler(guid,kThreadDCEndOpcode,ThreadParser.prototype.decodeDCEnd.bind(this));importer.registerEventHandler(guid,kThreadCSwitchOpcode,ThreadParser.prototype.decodeCSwitch.bind(this));}
-ThreadParser.prototype={__proto__:Parser.prototype,decodeFields:function(header,decoder){if(header.version>3)
-throw new Error('Incompatible Thread event version.');var processId=decoder.decodeUInt32();var threadId=decoder.decodeUInt32();var stackBase;var stackLimit;var userStackBase;var userStackLimit;var affinity;var startAddr;var win32StartAddr;var tebBase;var subProcessTag;var basePriority;var pagePriority;var ioPriority;var threadFlags;var waitMode;if(header.version==1){if(header.opcode==kThreadStartOpcode||header.opcode==kThreadDCStartOpcode){stackBase=decoder.decodeUInteger(header.is64);stackLimit=decoder.decodeUInteger(header.is64);userStackBase=decoder.decodeUInteger(header.is64);userStackLimit=decoder.decodeUInteger(header.is64);startAddr=decoder.decodeUInteger(header.is64);win32StartAddr=decoder.decodeUInteger(header.is64);waitMode=decoder.decodeInt8();decoder.skip(3);}}else{stackBase=decoder.decodeUInteger(header.is64);stackLimit=decoder.decodeUInteger(header.is64);userStackBase=decoder.decodeUInteger(header.is64);userStackLimit=decoder.decodeUInteger(header.is64);if(header.version==2)
-startAddr=decoder.decodeUInteger(header.is64);else
-affinity=decoder.decodeUInteger(header.is64);win32StartAddr=decoder.decodeUInteger(header.is64);tebBase=decoder.decodeUInteger(header.is64);subProcessTag=decoder.decodeUInt32();if(header.version==3){basePriority=decoder.decodeUInt8();pagePriority=decoder.decodeUInt8();ioPriority=decoder.decodeUInt8();threadFlags=decoder.decodeUInt8();}}
-return{processId:processId,threadId:threadId,stackBase:stackBase,stackLimit:stackLimit,userStackBase:userStackBase,userStackLimit:userStackLimit,affinity:affinity,startAddr:startAddr,win32StartAddr:win32StartAddr,tebBase:tebBase,subProcessTag:subProcessTag,waitMode:waitMode,basePriority:basePriority,pagePriority:pagePriority,ioPriority:ioPriority,threadFlags:threadFlags};},decodeCSwitchFields:function(header,decoder){if(header.version!=2)
-throw new Error('Incompatible Thread event version.');var newThreadId=decoder.decodeUInt32();var oldThreadId=decoder.decodeUInt32();var newThreadPriority=decoder.decodeInt8();var oldThreadPriority=decoder.decodeInt8();var previousCState=decoder.decodeUInt8();var spareByte=decoder.decodeInt8();var oldThreadWaitReason=decoder.decodeInt8();var oldThreadWaitMode=decoder.decodeInt8();var oldThreadState=decoder.decodeInt8();var oldThreadWaitIdealProcessor=decoder.decodeInt8();var newThreadWaitTime=decoder.decodeUInt32();var reserved=decoder.decodeUInt32();return{newThreadId:newThreadId,oldThreadId:oldThreadId,newThreadPriority:newThreadPriority,oldThreadPriority:oldThreadPriority,previousCState:previousCState,spareByte:spareByte,oldThreadWaitReason:oldThreadWaitReason,oldThreadWaitMode:oldThreadWaitMode,oldThreadState:oldThreadState,oldThreadWaitIdealProcessor:oldThreadWaitIdealProcessor,newThreadWaitTime:newThreadWaitTime,reserved:reserved};},decodeStart:function(header,decoder){var fields=this.decodeFields(header,decoder);this.importer.createThreadIfNeeded(fields.processId,fields.threadId);return true;},decodeEnd:function(header,decoder){var fields=this.decodeFields(header,decoder);this.importer.removeThreadIfPresent(fields.threadId);return true;},decodeDCStart:function(header,decoder){var fields=this.decodeFields(header,decoder);this.importer.createThreadIfNeeded(fields.processId,fields.threadId);return true;},decodeDCEnd:function(header,decoder){var fields=this.decodeFields(header,decoder);this.importer.removeThreadIfPresent(fields.threadId);return true;},decodeCSwitch:function(header,decoder){var fields=this.decodeCSwitchFields(header,decoder);var cpu=this.importer.getOrCreateCpu(header.cpu);var new_thread=this.importer.getThreadFromWindowsTid(fields.newThreadId);var new_thread_name;if(new_thread&&new_thread.userFriendlyName){new_thread_name=new_thread.userFriendlyName;}else{var new_process_id=this.importer.getPidFromWindowsTid(fields.newThreadId);var new_process=this.model.getProcess(new_process_id);var new_process_name;if(new_process)
-new_process_name=new_process.name;else
-new_process_name='Unknown process';new_thread_name=new_process_name+' (tid '+fields.newThreadId+')';}
-cpu.switchActiveThread(header.timestamp,{},fields.newThreadId,new_thread_name,fields);return true;}};Parser.register(ThreadParser);return{ThreadParser:ThreadParser};});'use strict';tr.exportTo('tr.b',function(){function Base64(){}
-function b64ToUint6(nChr){if(nChr>64&&nChr<91)
-return nChr-65;if(nChr>96&&nChr<123)
-return nChr-71;if(nChr>47&&nChr<58)
-return nChr+4;if(nChr===43)
-return 62;if(nChr===47)
-return 63;return 0;}
-Base64.getDecodedBufferLength=function(input){return input.length*3+1>>2;}
-Base64.EncodeArrayBufferToString=function(input){var binary='';var bytes=new Uint8Array(input);var len=bytes.byteLength;for(var i=0;i<len;i++)
-binary+=String.fromCharCode(bytes[i]);return btoa(binary);}
-Base64.DecodeToTypedArray=function(input,output){var nInLen=input.length;var nOutLen=nInLen*3+1>>2;var nMod3=0;var nMod4=0;var nUint24=0;var nOutIdx=0;if(nOutLen>output.byteLength)
-throw new Error('Output buffer too small to decode.');for(var nInIdx=0;nInIdx<nInLen;nInIdx++){nMod4=nInIdx&3;nUint24|=b64ToUint6(input.charCodeAt(nInIdx))<<18-6*nMod4;if(nMod4===3||nInLen-nInIdx===1){for(nMod3=0;nMod3<3&&nOutIdx<nOutLen;nMod3++,nOutIdx++){output.setUint8(nOutIdx,nUint24>>>(16>>>nMod3&24)&255);}
-nUint24=0;}}
-return nOutIdx-1;}
-return{Base64:Base64};});'use strict';tr.exportTo('tr.e.importer.etw',function(){var kThreadGuid='3D6FA8D1-FE05-11D0-9DDA-00C04FD7BA7C';var kThreadDCStartOpcode=3;function Decoder(){this.payload_=new DataView(new ArrayBuffer(256));};Decoder.prototype={__proto__:Object.prototype,reset:function(base64_payload){var decoded_size=tr.b.Base64.getDecodedBufferLength(base64_payload);if(decoded_size>this.payload_.byteLength)
-this.payload_=new DataView(new ArrayBuffer(decoded_size));tr.b.Base64.DecodeToTypedArray(base64_payload,this.payload_);this.position_=0;},skip:function(length){this.position_+=length;},decodeUInt8:function(){var result=this.payload_.getUint8(this.position_,true);this.position_+=1;return result;},decodeUInt16:function(){var result=this.payload_.getUint16(this.position_,true);this.position_+=2;return result;},decodeUInt32:function(){var result=this.payload_.getUint32(this.position_,true);this.position_+=4;return result;},decodeUInt64ToString:function(){var low=this.decodeUInt32();var high=this.decodeUInt32();var low_str=('0000000'+low.toString(16)).substr(-8);var high_str=('0000000'+high.toString(16)).substr(-8);var result=high_str+low_str;return result;},decodeInt8:function(){var result=this.payload_.getInt8(this.position_,true);this.position_+=1;return result;},decodeInt16:function(){var result=this.payload_.getInt16(this.position_,true);this.position_+=2;return result;},decodeInt32:function(){var result=this.payload_.getInt32(this.position_,true);this.position_+=4;return result;},decodeInt64ToString:function(){return this.decodeUInt64ToString();},decodeUInteger:function(is64){if(is64)
-return this.decodeUInt64ToString();return this.decodeUInt32();},decodeString:function(){var str='';while(true){var c=this.decodeUInt8();if(!c)
-return str;str=str+String.fromCharCode(c);}},decodeW16String:function(){var str='';while(true){var c=this.decodeUInt16();if(!c)
-return str;str=str+String.fromCharCode(c);}},decodeFixedW16String:function(length){var old_position=this.position_;var str='';for(var i=0;i<length;i++){var c=this.decodeUInt16();if(!c)
-break;str=str+String.fromCharCode(c);}
-this.position_=old_position+2*length;return str;},decodeBytes:function(length){var bytes=[];for(var i=0;i<length;++i){var c=this.decodeUInt8();bytes.push(c);}
-return bytes;},decodeSID:function(is64){var pSid=this.decodeUInteger(is64);var attributes=this.decodeUInt32();if(is64)
-this.decodeUInt32();var revision=this.decodeUInt8();var subAuthorityCount=this.decodeUInt8();this.decodeUInt16();this.decodeUInt32();if(revision!=1)
-throw'Invalid SID revision: could not decode the SID structure.';var sid=this.decodeBytes(4*subAuthorityCount);return{pSid:pSid,attributes:attributes,sid:sid};},decodeSystemTime:function(){var wYear=this.decodeInt16();var wMonth=this.decodeInt16();var wDayOfWeek=this.decodeInt16();var wDay=this.decodeInt16();var wHour=this.decodeInt16();var wMinute=this.decodeInt16();var wSecond=this.decodeInt16();var wMilliseconds=this.decodeInt16();return{wYear:wYear,wMonth:wMonth,wDayOfWeek:wDayOfWeek,wDay:wDay,wHour:wHour,wMinute:wMinute,wSecond:wSecond,wMilliseconds:wMilliseconds};},decodeTimeZoneInformation:function(){var bias=this.decodeUInt32();var standardName=this.decodeFixedW16String(32);var standardDate=this.decodeSystemTime();var standardBias=this.decodeUInt32();var daylightName=this.decodeFixedW16String(32);var daylightDate=this.decodeSystemTime();var daylightBias=this.decodeUInt32();return{bias:bias,standardName:standardName,standardDate:standardDate,standardBias:standardBias,daylightName:daylightName,daylightDate:daylightDate,daylightBias:daylightBias};}};function EtwImporter(model,events){this.importPriority=3;this.model_=model;this.events_=events;this.handlers_={};this.decoder_=new Decoder();this.walltime_=undefined;this.ticks_=undefined;this.is64bit_=undefined;this.tidsToPid_={};var allTypeInfos=tr.e.importer.etw.Parser.getAllRegisteredTypeInfos();this.parsers_=allTypeInfos.map(function(typeInfo){return new typeInfo.constructor(this);},this);}
-EtwImporter.canImport=function(events){if(!events.hasOwnProperty('name')||!events.hasOwnProperty('content')||events.name!=='ETW'){return false;}
-return true;};EtwImporter.prototype={__proto__:tr.importer.Importer.prototype,get model(){return this.model_;},createThreadIfNeeded:function(pid,tid){this.tidsToPid_[tid]=pid;},removeThreadIfPresent:function(tid){this.tidsToPid_[tid]=undefined;},getPidFromWindowsTid:function(tid){if(tid==0)
-return 0;var pid=this.tidsToPid_[tid];if(pid==undefined){return 0;}
-return pid;},getThreadFromWindowsTid:function(tid){var pid=this.getPidFromWindowsTid(tid);var process=this.model_.getProcess(pid);if(!process)
-return undefined;return process.getThread(tid);},getOrCreateCpu:function(cpuNumber){var cpu=this.model_.kernel.getOrCreateCpu(cpuNumber);return cpu;},importEvents:function(isSecondaryImport){this.events_.content.forEach(this.parseInfo.bind(this));if(this.walltime_==undefined||this.ticks_==undefined)
-throw Error('Cannot find clock sync information in the system trace.');if(this.is64bit_==undefined)
-throw Error('Cannot determine pointer size of the system trace.');this.events_.content.forEach(this.parseEvent.bind(this));},importTimestamp:function(timestamp){var ts=parseInt(timestamp,16);return(ts-this.walltime_+this.ticks_)/1000.;},parseInfo:function(event){if(event.hasOwnProperty('guid')&&event.hasOwnProperty('walltime')&&event.hasOwnProperty('tick')&&event.guid==='ClockSync'){this.walltime_=parseInt(event.walltime,16);this.ticks_=parseInt(event.tick,16);}
-if(this.is64bit_==undefined&&event.hasOwnProperty('guid')&&event.hasOwnProperty('op')&&event.hasOwnProperty('ver')&&event.hasOwnProperty('payload')&&event.guid===kThreadGuid&&event.op==kThreadDCStartOpcode){var decoded_size=tr.b.Base64.getDecodedBufferLength(event.payload);if(event.ver==1){if(decoded_size>=52)
-this.is64bit_=true;else
-this.is64bit_=false;}else if(event.ver==2){if(decoded_size>=64)
-this.is64bit_=true;else
-this.is64bit_=false;}else if(event.ver==3){if(decoded_size>=60)
-this.is64bit_=true;else
-this.is64bit_=false;}}
-return true;},parseEvent:function(event){if(!event.hasOwnProperty('guid')||!event.hasOwnProperty('op')||!event.hasOwnProperty('ver')||!event.hasOwnProperty('cpu')||!event.hasOwnProperty('ts')||!event.hasOwnProperty('payload')){return false;}
-var timestamp=this.importTimestamp(event.ts);var header={guid:event.guid,opcode:event.op,version:event.ver,cpu:event.cpu,timestamp:timestamp,is64:this.is64bit_};var decoder=this.decoder_;decoder.reset(event.payload);var handler=this.getEventHandler(header.guid,header.opcode);if(!handler)
-return false;if(!handler(header,decoder)){this.model_.importWarning({type:'parse_error',message:'Malformed '+header.guid+' event ('+text+')'});return false;}
-return true;},registerEventHandler:function(guid,opcode,handler){if(this.handlers_[guid]==undefined)
-this.handlers_[guid]=[];this.handlers_[guid][opcode]=handler;},getEventHandler:function(guid,opcode){if(this.handlers_[guid]==undefined)
-return undefined;return this.handlers_[guid][opcode];}};tr.importer.Importer.register(EtwImporter);return{EtwImporter:EtwImporter};});'use strict';tr.exportTo('tr.e.importer',function(){function Trace2HTMLImporter(model,events){this.importPriority=0;}
-Trace2HTMLImporter.subtraces_=[];function _extractEventsFromHTML(text){Trace2HTMLImporter.subtraces_=[];var r=new tr.importer.SimpleLineReader(text);while(true){if(!r.advanceToLineMatching(new RegExp('^<\s*script id="viewer-data" '+'type="(application\/json|text\/plain)">$')))
-break;r.beginSavingLines();if(!r.advanceToLineMatching(/^<\/\s*script>$/))
-return failure;var raw_events=r.endSavingLinesAndGetResult();raw_events=raw_events.slice(1,raw_events.length-1);var data64=raw_events.join('\n');var buffer=new ArrayBuffer(tr.b.Base64.getDecodedBufferLength(data64));var len=tr.b.Base64.DecodeToTypedArray(data64,new DataView(buffer));Trace2HTMLImporter.subtraces_.push(buffer.slice(0,len));}}
-function _canImportFromHTML(text){if(/^<!DOCTYPE html>/.test(text)===false)
-return false;_extractEventsFromHTML(text);if(Trace2HTMLImporter.subtraces_.length===0)
-return false;return true;}
-Trace2HTMLImporter.canImport=function(events){return _canImportFromHTML(events);};Trace2HTMLImporter.prototype={__proto__:tr.importer.Importer.prototype,isTraceDataContainer:function(){return true;},extractSubtraces:function(){return Trace2HTMLImporter.subtraces_;},importEvents:function(){}};tr.importer.Importer.register(Trace2HTMLImporter);return{Trace2HTMLImporter:Trace2HTMLImporter};});'use strict';tr.exportTo('tr.e.net',function(){var AsyncSlice=tr.model.AsyncSlice;function NetAsyncSlice(){AsyncSlice.apply(this,arguments);this.isTitleComputed_=false;}
-NetAsyncSlice.prototype={__proto__:AsyncSlice.prototype,get viewSubGroupTitle(){return'NetLog';},get title(){if(this.isTitleComputed_||!this.isTopLevel){return this.title_;}
-var getUrl=function(slice){if(slice.args!==undefined&&slice.args.params!==undefined&&slice.args.params.url!==undefined){return slice.args.params.url;}
-if(slice.subSlices===undefined||slice.subSlices.length===0)
-return undefined;for(var i=0;i<slice.subSlices.length;i++){var result=getUrl(slice.subSlices[i]);if(result!==undefined)
-return result;}
-return undefined;};var url=getUrl(this);if(url!==undefined&&url.length>0){this.title_=url;}else if(this.args!==undefined&&this.args.source_type!==undefined){this.title_=this.args.source_type;}
-this.isTitleComputed_=true;return this.title_;},set title(title){this.title_=title;}};AsyncSlice.register(NetAsyncSlice,{categoryParts:['netlog','disabled-by-default-netlog']});return{NetAsyncSlice:NetAsyncSlice};});'use strict';tr.exportTo('tr.e.chrome',function(){var KNOWN_PROPERTIES={children:1,name:1,address:1};function LayoutObject(snapshot,args){this.snapshot_=snapshot;this.id_=args.address;this.name_=args.name;this.childLayoutObjects_=[];this.otherProperties_={};if(args.children){args.children.forEach(function(child){this.childLayoutObjects_.push(new LayoutObject(snapshot,child));}.bind(this));}
-for(var property in args){if(!KNOWN_PROPERTIES[property])
-this.otherProperties_[property]=args[property];}}
-LayoutObject.prototype={get snapshot(){return this.snapshot_;},get id(){return this.id_;},get name(){return this.name_;},get hasChildLayoutObjects(){return this.childLayoutObjects_.length>0;},get childLayoutObjects(){return this.childLayoutObjects_;},traverseTree:function(cb,opt_this){cb.call(opt_this,this);if(!this.hasChildLayoutObjects)
-return;this.childLayoutObjects.forEach(function(child){child.traverseTree(cb,opt_this);});},get otherPropertyNames(){var names=[];for(var name in this.otherProperties_){names.push(name);}
-return names;},getProperty:function(name){return this.otherProperties_[name];},get previousSnapshotLayoutObject(){if(!this.snapshot.previousSnapshot)
-return undefined;return this.snapshot.previousSnapshot.getLayoutObjectById(this.id);},get nextSnapshotLayoutObject(){if(!this.snapshot.nextSnapshot)
-return undefined;return this.snapshot.nextSnapshot.getLayoutObjectById(this.id);}};return{LayoutObject:LayoutObject};});'use strict';tr.exportTo('tr.e.audits',function(){var MAIN_FRAMETIME_TYPE='main_frametime_type';var IMPL_FRAMETIME_TYPE='impl_frametime_type';var MAIN_RENDERING_STATS='BenchmarkInstrumentation::MainThreadRenderingStats';var IMPL_RENDERING_STATS='BenchmarkInstrumentation::ImplThreadRenderingStats';function getSlicesIntersectingRange(rangeOfInterest,slices){var slicesInFilterRange=[];for(var i=0;i<slices.length;i++){var slice=slices[i];if(rangeOfInterest.intersectsExplicitRange(slice.start,slice.end))
-slicesInFilterRange.push(slice);}
-return slicesInFilterRange;}
-function ChromeProcessHelper(modelHelper,process){this.modelHelper=modelHelper;this.process=process;}
-ChromeProcessHelper.prototype={get pid(){return this.process.pid;},getFrameEventsInRange:function(frametimeType,range){var titleToGet;if(frametimeType==MAIN_FRAMETIME_TYPE)
-titleToGet=MAIN_RENDERING_STATS;else
-titleToGet=IMPL_RENDERING_STATS;var frameEvents=[];this.process.iterateAllEvents(function(event){if(event.title!==titleToGet)
-return;if(range.intersectsExplicitRange(event.start,event.end))
-frameEvents.push(event);});frameEvents.sort(function(a,b){return a.start-b.start});return frameEvents;}};function getFrametimeDataFromEvents(frameEvents){var frametimeData=[];for(var i=1;i<frameEvents.length;i++){var diff=frameEvents[i].start-frameEvents[i-1].start;frametimeData.push({'x':frameEvents[i].start,'frametime':diff});}
-return frametimeData;}
-return{ChromeProcessHelper:ChromeProcessHelper,MAIN_FRAMETIME_TYPE:MAIN_FRAMETIME_TYPE,IMPL_FRAMETIME_TYPE:IMPL_FRAMETIME_TYPE,MAIN_RENDERING_STATS:MAIN_RENDERING_STATS,IMPL_RENDERING_STATS:IMPL_RENDERING_STATS,getSlicesIntersectingRange:getSlicesIntersectingRange,getFrametimeDataFromEvents:getFrametimeDataFromEvents};});'use strict';tr.exportTo('tr.e.audits',function(){function ChromeBrowserHelper(modelHelper,process){tr.e.audits.ChromeProcessHelper.call(this,modelHelper,process);this.mainThread_=process.findAtMostOneThreadNamed('CrBrowserMain');}
-ChromeBrowserHelper.isBrowserProcess=function(process){return!!process.findAtMostOneThreadNamed('CrBrowserMain');};ChromeBrowserHelper.prototype={__proto__:tr.e.audits.ChromeProcessHelper.prototype,get rendererHelpers(){return this.modelHelper.rendererHelpers;},getLoadingEventsInRange:function(rangeOfInterest){return this.getAllAsyncSlicesMatching(function(slice){return slice.title.indexOf('WebContentsImpl Loading')===0&&rangeOfInterest.intersectsExplicitRange(slice.start,slice.end);});},getCommitProvisionalLoadEventsInRange:function(rangeOfInterest){return this.getAllAsyncSlicesMatching(function(slice){return slice.title==='RenderFrameImpl::didCommitProvisionalLoad'&&rangeOfInterest.intersectsExplicitRange(slice.start,slice.end);});},get hasLatencyEvents(){var hasLatency=false;this.modelHelper.model.getAllThreads().some(function(thread){thread.iterateAllEvents(function(event){if(!event.isTopLevel)
-return;if(!(event instanceof tr.e.cc.InputLatencyAsyncSlice))
-return;hasLatency=true;});return hasLatency;});return hasLatency;},getLatencyEventsInRange:function(rangeOfInterest){return this.getAllAsyncSlicesMatching(function(slice){return(slice.title.indexOf('InputLatency')===0)&&rangeOfInterest.intersectsExplicitRange(slice.start,slice.end);});},getAllAsyncSlicesMatching:function(pred,opt_this){var events=[];this.iterAllThreads(function(thread){thread.iterateAllEvents(function(slice){if(pred.call(opt_this,slice))
-events.push(slice);});});return events;},getAllNetworkEventsInRange:function(rangeOfInterest){var networkEvents=[];this.modelHelper.model.getAllThreads().forEach(function(thread){thread.asyncSliceGroup.slices.forEach(function(slice){var match=false;if(slice.category=='net'||slice.category=='disabled-by-default-netlog'||slice.category=='netlog'){match=true;}
-if(!match)
-return;if(rangeOfInterest.intersectsExplicitRange(slice.start,slice.end))
-networkEvents.push(slice);});});return networkEvents;},iterAllThreads:function(func,opt_this){tr.b.iterItems(this.process.threads,function(tid,thread){func.call(opt_this,thread);});tr.b.iterItems(this.rendererHelpers,function(pid,rendererHelper){var rendererProcess=rendererHelper.process;tr.b.iterItems(rendererProcess.threads,function(tid,thread){func.call(opt_this,thread);});},this);}};return{ChromeBrowserHelper:ChromeBrowserHelper};});'use strict';tr.exportTo('tr.e.audits',function(){function ChromeGpuHelper(modelHelper,process){tr.e.audits.ChromeProcessHelper.call(this,modelHelper,process);this.mainThread_=process.findAtMostOneThreadNamed('CrGpuMain');};ChromeGpuHelper.isGpuProcess=function(process){if(process.findAtMostOneThreadNamed('CrBrowserMain')||process.findAtMostOneThreadNamed('CrRendererMain'))
-return false;return process.findAtMostOneThreadNamed('CrGpuMain');};ChromeGpuHelper.prototype={__proto__:tr.e.audits.ChromeProcessHelper.prototype,get mainThread(){return this.mainThread_;}};return{ChromeGpuHelper:ChromeGpuHelper};});'use strict';tr.exportTo('tr.e.audits',function(){function ChromeRendererHelper(modelHelper,process){tr.e.audits.ChromeProcessHelper.call(this,modelHelper,process);this.mainThread_=process.findAtMostOneThreadNamed('CrRendererMain');this.compositorThread_=process.findAtMostOneThreadNamed('Compositor');this.rasterWorkerThreads_=process.findAllThreadsMatching(function(t){if(t.name===undefined)
-return false;if(t.name.indexOf('CompositorTileWorker')===0)
-return true;if(t.name.indexOf('CompositorRasterWorker')===0)
-return true;return false;});};ChromeRendererHelper.isRenderProcess=function(process){if(!process.findAtMostOneThreadNamed('CrRendererMain'))
-return false;if(!process.findAtMostOneThreadNamed('Compositor'))
-return false;return true;};ChromeRendererHelper.prototype={__proto__:tr.e.audits.ChromeProcessHelper.prototype,get mainThread(){return this.mainThread_;},get compositorThread(){return this.compositorThread_;},get rasterWorkerThreads(){return this.rasterWorkerThreads_;}};return{ChromeRendererHelper:ChromeRendererHelper};});'use strict';tr.exportTo('tr.e.audits',function(){function findChromeBrowserProcess(model){var browserProcesses=[];model.getAllProcesses().forEach(function(process){if(!tr.e.audits.ChromeBrowserHelper.isBrowserProcess(process))
-return;browserProcesses.push(process);},this);if(browserProcesses.length===0)
-return undefined;if(browserProcesses.length>1)
-return undefined;return browserProcesses[0];}
-function findChromeRenderProcesses(model){var rendererProcesses=[];model.getAllProcesses().forEach(function(process){if(!tr.e.audits.ChromeRendererHelper.isRenderProcess(process))
-return;rendererProcesses.push(process);});return rendererProcesses;}
-function findChromeGpuProcess(model){var gpuProcesses=model.getAllProcesses().filter(tr.e.audits.ChromeGpuHelper.isGpuProcess);if(gpuProcesses.length!=1)
-return undefined;return gpuProcesses[0];}
-function ChromeModelHelper(model){this.model_=model;this.browserProcess_=findChromeBrowserProcess(model);if(this.browserProcess_){this.browserHelper_=new tr.e.audits.ChromeBrowserHelper(this,this.browserProcess_);}else{this.browserHelper_=undefined;}
-var gpuProcess=findChromeGpuProcess(model);if(gpuProcess){this.gpuHelper_=new tr.e.audits.ChromeGpuHelper(this,gpuProcess);}else{this.gpuHelper_=undefined;}
-var rendererProcesses_=findChromeRenderProcesses(model);this.rendererHelpers_={};rendererProcesses_.forEach(function(renderProcess){var rendererHelper=new tr.e.audits.ChromeRendererHelper(this,renderProcess);this.rendererHelpers_[rendererHelper.pid]=rendererHelper;},this);}
-ChromeModelHelper.supportsModel=function(model){if(findChromeBrowserProcess(model)!==undefined)
-return true;if(findChromeRenderProcesses(model).length)
-return true;return false;}
-ChromeModelHelper.prototype={get pid(){throw new Error('woah');},get process(){throw new Error('woah');},get model(){return this.model_;},get browserProcess(){return this.browserProcess_;},get browserHelper(){return this.browserHelper_;},get gpuHelper(){return this.gpuHelper_;},get rendererHelpers(){return this.rendererHelpers_;}};return{ChromeModelHelper:ChromeModelHelper};});'use strict';tr.exportTo('tr.e.cc',function(){var AsyncSlice=tr.model.AsyncSlice;var EventSet=tr.model.EventSet;var UI_COMP_NAME='INPUT_EVENT_LATENCY_UI_COMPONENT';var ORIGINAL_COMP_NAME='INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT';var BEGIN_COMP_NAME='INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT';var END_COMP_NAME='INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT';var MAIN_RENDERER_THREAD_NAME='CrRendererMain';var COMPOSITOR_THREAD_NAME='Compositor';var POSTTASK_FLOW_EVENT='disabled-by-default-toplevel.flow';var IPC_FLOW_EVENT='disabled-by-default-ipc.flow';var INPUT_EVENT_TYPE_NAMES={CHAR:'Char',CLICK:'GestureClick',CONTEXT_MENU:'ContextMenu',FLING_CANCEL:'GestureFlingCancel',FLING_START:'GestureFlingStart',KEY_DOWN:'KeyDown',KEY_DOWN_RAW:'RawKeyDown',KEY_UP:'KeyUp',LATENCY_SCROLL_UPDATE:'ScrollUpdate',MOUSE_DOWN:'MouseDown',MOUSE_ENTER:'MouseEnter',MOUSE_LEAVE:'MouseLeave',MOUSE_MOVE:'MouseMove',MOUSE_UP:'MouseUp',MOUSE_WHEEL:'MouseWheel',PINCH_BEGIN:'GesturePinchBegin',PINCH_END:'GesturePinchEnd',PINCH_UPDATE:'GesturePinchUpdate',SCROLL_BEGIN:'GestureScrollBegin',SCROLL_END:'GestureScrollEnd',SCROLL_UPDATE:'GestureScrollUpdate',SCROLL_UPDATE_RENDERER:'ScrollUpdate',SHOW_PRESS:'GestureShowPress',TAP:'GestureTap',TAP_CANCEL:'GestureTapCancel',TAP_DOWN:'GestureTapDown',TOUCH_CANCEL:'TouchCancel',TOUCH_END:'TouchEnd',TOUCH_MOVE:'TouchMove',TOUCH_START:'TouchStart',UNKNOWN:'UNKNOWN'};function InputLatencyAsyncSlice(){AsyncSlice.apply(this,arguments);this.associatedEvents_=new EventSet();this.typeName_=undefined;if(!this.isLegacyEvent)
-this.determineModernTypeName_();}
-InputLatencyAsyncSlice.prototype={__proto__:AsyncSlice.prototype,get isLegacyEvent(){return this.title==='InputLatency';},get typeName(){if(!this.typeName_)
-this.determineLegacyTypeName_();return this.typeName_;},checkTypeName_:function(){if(!this.typeName_)
-throw'Unable to determine typeName';var found=false;for(var type_name in INPUT_EVENT_TYPE_NAMES){if(this.typeName===INPUT_EVENT_TYPE_NAMES[type_name]){found=true;break;}}
-if(!found)
-this.typeName_=INPUT_EVENT_TYPE_NAMES.UNKNOWN;},determineModernTypeName_:function(){var lastColonIndex=this.title.lastIndexOf(':');if(lastColonIndex<0)
-return;var characterAfterLastColonIndex=lastColonIndex+1;this.typeName_=this.title.slice(characterAfterLastColonIndex);this.checkTypeName_();},determineLegacyTypeName_:function(){this.iterateAllDescendents(function(subSlice){var subSliceIsAInputLatencyAsyncSlice=(subSlice instanceof InputLatencyAsyncSlice);if(!subSliceIsAInputLatencyAsyncSlice)
-return;if(!subSlice.typeName)
-return;if(this.typeName_&&subSlice.typeName_){var subSliceHasDifferentTypeName=(this.typeName_!==subSlice.typeName_);if(subSliceHasDifferentTypeName){throw'InputLatencyAsyncSlice.determineLegacyTypeName_() '+' found multiple typeNames';}}
-this.typeName_=subSlice.typeName_;},this);if(!this.typeName_)
-throw'InputLatencyAsyncSlice.determineLegacyTypeName_() failed';this.checkTypeName_();},getRendererHelper:function(sourceSlices){var traceModel=this.startThread.parent.model;if(!tr.e.audits.ChromeModelHelper.supportsModel(traceModel))
-return undefined;var mainThread=undefined;var compositorThread=undefined;for(var i in sourceSlices){if(sourceSlices[i].parentContainer.name===MAIN_RENDERER_THREAD_NAME)
-mainThread=sourceSlices[i].parentContainer;else if(sourceSlices[i].parentContainer.name===COMPOSITOR_THREAD_NAME)
-compositorThread=sourceSlices[i].parentContainer;if(mainThread&&compositorThread)
-break;}
-var modelHelper=new tr.e.audits.ChromeModelHelper(traceModel);var rendererHelpers=modelHelper.rendererHelpers;var pids=Object.keys(rendererHelpers);for(var i=0;i<pids.length;i++){var pid=pids[i];var rendererHelper=rendererHelpers[pid];if(rendererHelper.mainThread===mainThread||rendererHelper.compositorThread===compositorThread)
-return rendererHelper;}
-return undefined;},addEntireSliceHierarchy:function(slice){this.associatedEvents_.push(slice);slice.iterateAllSubsequentSlices(function(subsequentSlice){this.associatedEvents_.push(subsequentSlice);},this);},addDirectlyAssociatedEvents:function(flowEvents){var slices=[];flowEvents.forEach(function(flowEvent){this.associatedEvents_.push(flowEvent);var newSource=flowEvent.startSlice.mostTopLevelSlice;if(slices.indexOf(newSource)===-1)
-slices.push(newSource);},this);var lastFlowEvent=flowEvents[flowEvents.length-1];var lastSource=lastFlowEvent.endSlice.mostTopLevelSlice;if(slices.indexOf(lastSource)===-1)
-slices.push(lastSource);return slices;},addScrollUpdateEvents:function(rendererHelper){if(!rendererHelper||!rendererHelper.compositorThread)
-return;var compositorThread=rendererHelper.compositorThread;var gestureScrollUpdateStart=this.start;var gestureScrollUpdateEnd=this.end;var allCompositorAsyncSlices=compositorThread.asyncSliceGroup.slices;for(var i in allCompositorAsyncSlices){var slice=allCompositorAsyncSlices[i];if(slice.title!=='Latency::ScrollUpdate')
-continue;var parentId=slice.args.data.INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT.sequence_number;if(parentId===undefined){if(slice.start<gestureScrollUpdateStart||slice.start>=gestureScrollUpdateEnd)
-continue;}else{if(parseInt(parentId)!==parseInt(this.id))
-continue;}
-slice.associatedEvents.forEach(function(event){this.associatedEvents_.push(event);},this);break;}},belongToOtherInputs:function(slice,flowEvents){var fromOtherInputs=false;slice.iterateEntireHierarchy(function(subsequentSlice){if(fromOtherInputs)
-return;subsequentSlice.inFlowEvents.forEach(function(inflow){if(fromOtherInputs)
-return;if(inflow.category.indexOf('input')>-1){if(flowEvents.indexOf(inflow)===-1)
-fromOtherInputs=true;}},this);},this);return fromOtherInputs;},triggerOtherInputs:function(event,flowEvents){if(event.outFlowEvents===undefined||event.outFlowEvents.length===0)
-return false;var flow=event.outFlowEvents[0];if(flow.category!==POSTTASK_FLOW_EVENT||!flow.endSlice)
-return false;var endSlice=flow.endSlice;if(this.belongToOtherInputs(endSlice.mostTopLevelSlice,flowEvents))
-return true;return false;},followSubsequentSlices:function(event,queue,visited,flowEvents){var stopFollowing=false;var inputAck=false;event.iterateAllSubsequentSlices(function(slice){if(stopFollowing)
-return;if(slice.title==='TaskQueueManager::RunTask')
-return;if(slice.title==='ThreadProxy::ScheduledActionSendBeginMainFrame')
-return;if(slice.title==='Scheduler::ScheduleBeginImplFrameDeadline'){if(this.triggerOtherInputs(slice,flowEvents))
-return;}
-if(slice.title==='CompositorImpl::PostComposite'){if(this.triggerOtherInputs(slice,flowEvents))
-return;}
-if(slice.title==='InputRouterImpl::ProcessInputEventAck')
-inputAck=true;if(inputAck&&slice.title==='InputRouterImpl::FilterAndSendWebInputEvent')
-stopFollowing=true;this.followCurrentSlice(slice,queue,visited);},this);},followCurrentSlice:function(event,queue,visited){event.outFlowEvents.forEach(function(outflow){if((outflow.category===POSTTASK_FLOW_EVENT||outflow.category===IPC_FLOW_EVENT)&&outflow.endSlice){this.associatedEvents_.push(outflow);var nextEvent=outflow.endSlice.mostTopLevelSlice;if(!visited.contains(nextEvent)){visited.push(nextEvent);queue.push(nextEvent);}}},this);},backtraceFromDraw:function(beginImplFrame,visited){var pendingEventQueue=[];pendingEventQueue.push(beginImplFrame.mostTopLevelSlice);while(pendingEventQueue.length!==0){var event=pendingEventQueue.pop();this.addEntireSliceHierarchy(event);event.inFlowEvents.forEach(function(inflow){if(inflow.category===POSTTASK_FLOW_EVENT&&inflow.startSlice){var nextEvent=inflow.startSlice.mostTopLevelSlice;if(!visited.contains(nextEvent)){visited.push(nextEvent);pendingEventQueue.push(nextEvent);}}},this);}},sortRasterizerSlices:function(rasterWorkerThreads,sortedRasterizerSlices){rasterWorkerThreads.forEach(function(rasterizer){Array.prototype.push.apply(sortedRasterizerSlices,rasterizer.sliceGroup.slices);},this);sortedRasterizerSlices.sort(function(a,b){if(a.start!==b.start)
-return a.start-b.start;return a.guid-b.guid;});},addRasterizationEvents:function(prepareTiles,rendererHelper,visited,flowEvents,sortedRasterizerSlices){if(!prepareTiles.args.prepare_tiles_id)
-return;if(!rendererHelper||!rendererHelper.rasterWorkerThreads)
-return;var rasterWorkerThreads=rendererHelper.rasterWorkerThreads;var prepare_tile_id=prepareTiles.args.prepare_tiles_id;var pendingEventQueue=[];if(sortedRasterizerSlices.length===0)
-this.sortRasterizerSlices(rasterWorkerThreads,sortedRasterizerSlices);var numFinishedTasks=0;var RASTER_TASK_TITLE='RasterizerTaskImpl::RunOnWorkerThread';var IMAGEDECODE_TASK_TITLE='ImageDecodeTaskImpl::RunOnWorkerThread';var FINISHED_TASK_TITLE='TaskSetFinishedTaskImpl::RunOnWorkerThread';for(var i=0;i<sortedRasterizerSlices.length;i++){var task=sortedRasterizerSlices[i];if(task.title===RASTER_TASK_TITLE||task.title===IMAGEDECODE_TASK_TITLE){if(task.args.source_prepare_tiles_id===prepare_tile_id)
-this.addEntireSliceHierarchy(task.mostTopLevelSlice);}else if(task.title===FINISHED_TASK_TITLE){if(task.start>prepareTiles.start){pendingEventQueue.push(task.mostTopLevelSlice);if(++numFinishedTasks===3)
-break;}}}
-while(pendingEventQueue.length!=0){var event=pendingEventQueue.pop();this.addEntireSliceHierarchy(event);this.followSubsequentSlices(event,pendingEventQueue,visited,flowEvents);}},addOtherCausallyRelatedEvents:function(rendererHelper,sourceSlices,flowEvents,sortedRasterizerSlices){var pendingEventQueue=[];var visitedEvents=new EventSet();var beginImplFrame=undefined;var prepareTiles=undefined;var sortedRasterizerSlices=[];sourceSlices.forEach(function(sourceSlice){if(!visitedEvents.contains(sourceSlice)){visitedEvents.push(sourceSlice);pendingEventQueue.push(sourceSlice);}},this);while(pendingEventQueue.length!=0){var event=pendingEventQueue.pop();this.addEntireSliceHierarchy(event);this.followCurrentSlice(event,pendingEventQueue,visitedEvents);this.followSubsequentSlices(event,pendingEventQueue,visitedEvents,flowEvents);var COMPOSITOR_PREPARE_TILES='TileManager::PrepareTiles';prepareTiles=event.findDescendentSlice(COMPOSITOR_PREPARE_TILES);if(prepareTiles)
-this.addRasterizationEvents(prepareTiles,rendererHelper,visitedEvents,flowEvents,sortedRasterizerSlices);var COMPOSITOR_ON_BIFD='Scheduler::OnBeginImplFrameDeadline';beginImplFrame=event.findDescendentSlice(COMPOSITOR_ON_BIFD);if(beginImplFrame)
-this.backtraceFromDraw(beginImplFrame,visitedEvents);}
-var INPUT_GSU='InputLatency::GestureScrollUpdate';if(this.title===INPUT_GSU)
-this.addScrollUpdateEvents(rendererHelper);},get associatedEvents(){if(this.associatedEvents_.length!==0)
-return this.associatedEvents_;var modelIndices=this.startThread.parent.model.modelIndices;var flowEvents=modelIndices.getFlowEventsWithId(this.id);if(flowEvents.length===0)
-return this.associatedEvents_;var sourceSlices=this.addDirectlyAssociatedEvents(flowEvents);var rendererHelper=this.getRendererHelper(sourceSlices);this.addOtherCausallyRelatedEvents(rendererHelper,sourceSlices,flowEvents);return this.associatedEvents_;},get inputLatency(){if(!('data'in this.args))
-return undefined;var data=this.args.data;if(!(END_COMP_NAME in data))
-return undefined;var latency=0;var endTime=data[END_COMP_NAME].time;if(ORIGINAL_COMP_NAME in data){latency=endTime-data[ORIGINAL_COMP_NAME].time;}else if(UI_COMP_NAME in data){latency=endTime-data[UI_COMP_NAME].time;}else if(BEGIN_COMP_NAME in data){latency=endTime-data[BEGIN_COMP_NAME].time;}else{throw new Error('No valid begin latency component');}
-return latency;}};var eventTypeNames=['Char','ContextMenu','GestureClick','GestureFlingCancel','GestureFlingStart','GestureScrollBegin','GestureScrollEnd','GestureScrollUpdate','GestureShowPress','GestureTap','GestureTapCancel','GestureTapDown','GesturePinchBegin','GesturePinchEnd','GesturePinchUpdate','KeyDown','KeyUp','MouseDown','MouseEnter','MouseLeave','MouseMove','MouseUp','MouseWheel','RawKeyDown','ScrollUpdate','TouchCancel','TouchEnd','TouchMove','TouchStart'];var allTypeNames=['InputLatency'];eventTypeNames.forEach(function(eventTypeName){allTypeNames.push('InputLatency:'+eventTypeName);allTypeNames.push('InputLatency::'+eventTypeName);});AsyncSlice.register(InputLatencyAsyncSlice,{typeNames:allTypeNames,categoryParts:['latencyInfo']});return{InputLatencyAsyncSlice:InputLatencyAsyncSlice,INPUT_EVENT_TYPE_NAMES:INPUT_EVENT_TYPE_NAMES};});'use strict';tr.exportTo('tr.e.rail',function(){var ColorScheme=tr.b.ColorScheme;var COMFORT_IMPORTANCE=2;var ALL_RAIL_TYPE_NAMES=['rail_response','rail_animate','rail_idle','rail_load'];var DOES_RAIL_TYPE_NAME_EXIST={};ALL_RAIL_TYPE_NAMES.forEach(function(railTypeName){DOES_RAIL_TYPE_NAME_EXIST[railTypeName]=true;});var RAIL_ORDER=[];ALL_RAIL_TYPE_NAMES.forEach(function(railTypeName){RAIL_ORDER.push(railTypeName.toUpperCase());RAIL_ORDER.push(userFriendlyRailTypeName(railTypeName).toUpperCase());});function RAILInteractionRecord(parentModel,title,railTypeName,start,duration){if(!DOES_RAIL_TYPE_NAME_EXIST[railTypeName])
-throw new Error(railTypeName+' is not listed in ALL_RAIL_TYPE_NAMES');var colorId=ColorScheme.getColorIdForReservedName(railTypeName);this.railTypeName_=railTypeName;this.name='';tr.model.InteractionRecord.call(this,parentModel,title,colorId,start,duration);}
-RAILInteractionRecord.prototype={__proto__:tr.model.InteractionRecord.prototype,updateArgs:function(){var args={};var layoutSlices=this.associatedEvents.filter(function(event){return event.title==='FrameView::layout';});var timeInLayout=tr.b.Statistics.sum(layoutSlices,function(event){return event.duration;});args['layoutInfo']={'timeInLayout':timeInLayout};this.args=args;},get railTypeName(){return this.railTypeName_;},get railScore(){var comfort=this.normalizedUserComfort;var efficiency=this.normalizedEfficiency;return weightedAverage2(comfort,efficiency,COMFORT_IMPORTANCE);},get normalizedUserComfort(){throw new Error('Not implemented');},get rawCpuMs(){var cpuMs=0;this.associatedEvents.forEach(function(event){if(event.cpuSelfTime)
-cpuMs+=event.cpuSelfTime;});return cpuMs;},get normalizedCpuEfficiency(){var minCpuMs=this.duration*this.minCpuFraction;var maxCpuMs=this.duration*this.maxCpuFraction;var normalizedCpu=tr.b.normalize(this.rawCpuMs,minCpuMs,maxCpuMs);return 1-tr.b.clamp(normalizedCpu,0,1);},get minCpuFraction(){return 0.5;},get maxCpuFraction(){return 1.5;},get normalizedEfficiency(){return this.normalizedCpuEfficiency;}};function computeNormalizedComfort(value,opts){if(typeof value!=='number')
-throw new Error('value must be a number');opts.exponentialBase=opts.exponentialBase||10;if(opts.exponentialBase<=1)
-throw new Error('exponentialBase must be greater than 1');opts.minComfortLinear=opts.minComfortLinear||0.2;if(opts.minComfortLinear<=0||opts.minComfortLinear>=1)
-throw new Error('minComfortLinear must be between 0 and 1 exclusive');opts.maxComfortLinear=opts.maxComfortLinear||0.9;if(opts.maxComfortLinear<=0||opts.maxComfortLinear>=1)
-throw new Error('maxComfortLinear must be between 0 and 1 exclusive');opts.logarithmicScale=opts.logarithmicScale||100;if(opts.logarithmicScale<=0)
-throw new Error('logarithmicScale must be positive');if(opts.minValueExponential>=opts.minValueLinear)
-throw new Error('minValueExponential must be less than minValueLinear');if(opts.minValueLinear>=opts.minValueLogarithmic)
-throw new Error('minValueLinear must be less than minValueLogarithmic');if(opts.minValueLogarithmic>=opts.maxValue)
-throw new Error('minValueLogarithmic must be less than maxValue');['minValueLinear','minValueExponential','minValueLogarithmic','maxValue','exponentialBase','minComfortLinear','maxComfortLinear','logarithmicScale'].forEach(function(opt){if(typeof opts[opt]!=='number')
-throw new Error(opt+' must be a number');});if(value<opts.minValueExponential)
-return 0;if(value<opts.minValueLinear){function computeRawComfort(value){return Math.pow(opts.exponentialBase,value);}
-return computeNormalizedComfortInternal(value,opts.minValueExponential,opts.minValueLinear,0,opts.minComfortLinear,computeRawComfort);}
-if(value<opts.minValueLogarithmic){function computeRawComfort(value){return value;}
-return computeNormalizedComfortInternal(value,opts.minValueLinear,opts.minValueLogarithmic,opts.minComfortLinear,opts.maxComfortLinear,computeRawComfort);}
-if(value<opts.maxValue){function computeRawComfort(value){return Math.log1p(opts.logarithmicScale*value);}
-return computeNormalizedComfortInternal(value,opts.minValueLogarithmic,opts.maxValue,opts.maxComfortLinear,1,computeRawComfort);}
-return 1;}
-function computeNormalizedComfortInternal(value,minValue,maxValue,minScore,maxScore,computeRawComfort){var normalizedValue=tr.b.normalize(value,minValue,maxValue);var rawComfort=computeRawComfort(normalizedValue);var minComfort=computeRawComfort(0);var maxComfort=computeRawComfort(1);var normalizedComfort=tr.b.normalize(rawComfort,minComfort,maxComfort);normalizedComfort=tr.b.lerp(normalizedComfort,minScore,maxScore);return tr.b.clamp(normalizedComfort,minScore,maxScore);}
-function weightedAverage2(x,y,opt_apriori){var numerator=0;var denominator=0;var xWeight=(opt_apriori||1)*Math.exp(1-x);numerator+=xWeight*x;denominator+=xWeight;var yWeight=Math.exp(1-y);numerator+=yWeight*y;denominator+=yWeight;return numerator/denominator;}
-function userFriendlyRailTypeName(railTypeName){if(railTypeName.length<6||railTypeName.indexOf('rail_')!=0)
-return railTypeName;return railTypeName[5].toUpperCase()+railTypeName.slice(6);}
-function railCompare(name1,name2){var i1=RAIL_ORDER.indexOf(name1.toUpperCase());var i2=RAIL_ORDER.indexOf(name2.toUpperCase());if(i1==-1&&i2==-1)
-return name1.localeCompare(name2);if(i1==-1)
-return 1;if(i2==-1)
-return-1;return i1-i2;}
-return{RAILInteractionRecord:RAILInteractionRecord,computeNormalizedComfort:computeNormalizedComfort,weightedAverage2:weightedAverage2,userFriendlyRailTypeName:userFriendlyRailTypeName,railCompare:railCompare,ALL_RAIL_TYPE_NAMES:ALL_RAIL_TYPE_NAMES};});'use strict';tr.exportTo('tr.e.rail',function(){function IdleInteractionRecord(parentModel,start,duration){tr.e.rail.RAILInteractionRecord.call(this,parentModel,'Idle','rail_idle',start,duration);}
-IdleInteractionRecord.prototype={__proto__:tr.e.rail.RAILInteractionRecord.prototype,get normalizedUserComfort(){return 1;},get minCpuFraction(){return 0.1;},get maxCpuFraction(){return 1;}};return{IdleInteractionRecord:IdleInteractionRecord};});'use strict';tr.exportTo('tr.e.rail',function(){var COMFORT_LATENCY_REGIONS=[1000,5000,20000,60000];function LoadInteractionRecord(parentModel,start,duration){tr.e.rail.RAILInteractionRecord.call(this,parentModel,'Load','rail_load',start,duration);this.renderProcessId=undefined;this.routingId=undefined;this.parentRoutingId=undefined;}
-LoadInteractionRecord.prototype={__proto__:tr.e.rail.RAILInteractionRecord.prototype,get normalizedUserComfort(){return 1-tr.e.rail.computeNormalizedComfort(this.duration,{minValueExponential:COMFORT_LATENCY_REGIONS[0],minValueLinear:COMFORT_LATENCY_REGIONS[1],minValueLogarithmic:COMFORT_LATENCY_REGIONS[2],maxValue:COMFORT_LATENCY_REGIONS[3]});}};return{LoadInteractionRecord:LoadInteractionRecord};});'use strict';tr.exportTo('tr.e.rail',function(){var COMFORT_FPS_REGIONS=[60,40,30,10];var LONG_FRAME_MS=50;var COMFORT_JANK_REGIONS=[0.05,0.1,0.2,0.3];function AnimationInteractionRecord(parentModel,start,duration){tr.e.rail.RAILInteractionRecord.call(this,parentModel,'Animation','rail_animate',start,duration);this.frameEvents_=undefined;}
-AnimationInteractionRecord.prototype={__proto__:tr.e.rail.RAILInteractionRecord.prototype,get frameEvents(){if(this.frameEvents_)
-return this.frameEvents_;this.frameEvents_=new tr.model.EventSet();this.associatedEvents.forEach(function(event){if(event.title===tr.e.audits.IMPL_RENDERING_STATS)
-this.frameEvents_.push(event);},this);return this.frameEvents_;},get normalizedUserComfort(){return tr.e.rail.weightedAverage2(this.normalizedJankComfort,this.normalizedFPSComfort);},get normalizedFPSComfort(){var durationSeconds=this.duration/1000;var avgSpf=durationSeconds/this.frameEvents.length;return 1-tr.e.rail.computeNormalizedComfort(avgSpf,{minValueExponential:1/COMFORT_FPS_REGIONS[0],minValueLinear:1/COMFORT_FPS_REGIONS[1],minValueLogarithmic:1/COMFORT_FPS_REGIONS[2],maxValue:1/COMFORT_FPS_REGIONS[3]});},get normalizedJankComfort(){var frameTimestamps=this.frameEvents.toArray().map(function(event){return event.start;});var absolute=false;var discrepancy=tr.b.Statistics.timestampsDiscrepancy(frameTimestamps,absolute);return 1-tr.e.rail.computeNormalizedComfort(discrepancy,{minValueExponential:COMFORT_JANK_REGIONS[0],minValueLinear:COMFORT_JANK_REGIONS[1],minValueLogarithmic:COMFORT_JANK_REGIONS[2],maxValue:COMFORT_JANK_REGIONS[3]});}};return{AnimationInteractionRecord:AnimationInteractionRecord};});'use strict';tr.exportTo('tr.e.rail',function(){var COMFORT_LATENCY_REGIONS=[150,300,1000,5000];function ResponseInteractionRecord(parentModel,start,duration){tr.e.rail.RAILInteractionRecord.call(this,parentModel,'Response','rail_response',start,duration);}
-ResponseInteractionRecord.prototype={__proto__:tr.e.rail.RAILInteractionRecord.prototype,get normalizedUserComfort(){return 1-tr.e.rail.computeNormalizedComfort(this.duration,{minValueExponential:COMFORT_LATENCY_REGIONS[0],minValueLinear:COMFORT_LATENCY_REGIONS[1],minValueLogarithmic:COMFORT_LATENCY_REGIONS[2],maxValue:COMFORT_LATENCY_REGIONS[3]});}};return{ResponseInteractionRecord:ResponseInteractionRecord};});'use strict';tr.exportTo('tr.e.rail',function(){function ProtoIR(irType,name){this.irType=irType;this.names=new Set(name?[name]:undefined);this.start=Infinity;this.end=-Infinity;this.associatedEvents=new tr.model.EventSet();}
-ProtoIR.RESPONSE_TYPE='r';ProtoIR.ANIMATION_TYPE='a';ProtoIR.IGNORED_TYPE='ignored';ProtoIR.prototype={get isValid(){return this.end>this.start;},containsTypeNames:function(typeNames){for(var i=0;i<this.associatedEvents.length;++i){if(typeNames.indexOf(this.associatedEvents[i].typeName)>=0)
+times.sort(function(x,y){return x-y;});return times;}};tr.c.Auditor.register(VSyncAuditor);return{VSyncAuditor:VSyncAuditor};});'use strict';tr.exportTo('tr.importer',function(){function EmptyImporter(events){this.importPriority=0;};EmptyImporter.canImport=function(eventData){if(eventData instanceof Array&&eventData.length==0)
+return true;if(typeof(eventData)==='string'||eventData instanceof String){return eventData.length==0;}
+return false;};EmptyImporter.prototype={__proto__:tr.importer.Importer.prototype,get importerName(){return'EmptyImporter';}};tr.importer.Importer.register(EmptyImporter);return{EmptyImporter:EmptyImporter};});'use strict';tr.exportTo('tr.model.um',function(){function AnimationExpectation(parentModel,initiatorTitle,start,duration){tr.model.um.UserExpectation.call(this,parentModel,initiatorTitle,start,duration);this.frameEvents_=undefined;}
+AnimationExpectation.prototype={__proto__:tr.model.um.UserExpectation.prototype,constructor:AnimationExpectation,get frameEvents(){if(this.frameEvents_)
+return this.frameEvents_;this.frameEvents_=new tr.model.EventSet();this.associatedEvents.forEach(function(event){if(event.title===tr.model.helpers.IMPL_RENDERING_STATS)
+this.frameEvents_.push(event);},this);return this.frameEvents_;}};tr.model.um.UserExpectation.register(AnimationExpectation,{stageTitle:'Animation',colorId:tr.b.ColorScheme.getColorIdForReservedName('rail_animation')});return{AnimationExpectation:AnimationExpectation};});'use strict';tr.exportTo('tr.importer',function(){function ProtoExpectation(irType,name){this.irType=irType;this.names=new Set(name?[name]:undefined);this.start=Infinity;this.end=-Infinity;this.associatedEvents=new tr.model.EventSet();this.isAnimationBegin=false;}
+ProtoExpectation.RESPONSE_TYPE='r';ProtoExpectation.ANIMATION_TYPE='a';ProtoExpectation.IGNORED_TYPE='ignored';ProtoExpectation.prototype={get isValid(){return this.end>this.start;},containsTypeNames:function(typeNames){for(var i=0;i<this.associatedEvents.length;++i){if(typeNames.indexOf(this.associatedEvents[i].typeName)>=0)
 return true;}
 return false;},containsSliceTitle:function(title){for(var i=0;i<this.associatedEvents.length;++i){if(title===this.associatedEvents[i].title)
 return true;}
-return false;},getIRConstructor:function(){switch(this.irType){case ProtoIR.RESPONSE_TYPE:return tr.e.rail.ResponseInteractionRecord;case ProtoIR.ANIMATION_TYPE:return tr.e.rail.AnimationInteractionRecord;}
-return undefined;},createInteractionRecord:function(model){if(!this.isValid){console.error('Invalid ProtoIR: '+this.debug()+' File a bug with this trace!');return undefined;}
-var constructor=this.getIRConstructor();if(constructor===undefined)
-return undefined;var ir=new constructor(model,this.start,this.end-this.start);var names=[];this.names.forEach(function(name){names.push(name);});ir.name=names.sort().join(',');ir.sourceEvents.addEventSet(this.associatedEvents);function pushAssociatedEvents(event){ir.associatedEvents.push(event);if(event.associatedEvents)
+return false;},createInteractionRecord:function(model){if(!this.isValid){console.error('Invalid ProtoExpectation: '+this.debug()+' File a bug with this trace!');return undefined;}
+var initiatorTitles=[];this.names.forEach(function(name){initiatorTitles.push(name);});initiatorTitles=initiatorTitles.sort().join(',');var duration=this.end-this.start;var ir=undefined;switch(this.irType){case ProtoExpectation.RESPONSE_TYPE:ir=new tr.model.um.ResponseExpectation(model,initiatorTitles,this.start,duration,this.isAnimationBegin);break;case ProtoExpectation.ANIMATION_TYPE:ir=new tr.model.um.AnimationExpectation(model,initiatorTitles,this.start,duration);break;}
+if(!ir)
+return undefined;ir.sourceEvents.addEventSet(this.associatedEvents);function pushAssociatedEvents(event){ir.associatedEvents.push(event);if(event.associatedEvents)
 ir.associatedEvents.addEventSet(event.associatedEvents);}
 this.associatedEvents.forEach(function(event){pushAssociatedEvents(event);if(event.subSlices)
-event.subSlices.forEach(pushAssociatedEvents);});return ir;},merge:function(other){other.names.forEach(function(name){this.names.add(name);}.bind(this));this.associatedEvents.addEventSet(other.associatedEvents);this.start=Math.min(this.start,other.start);this.end=Math.max(this.end,other.end);},pushEvent:function(event){this.start=Math.min(this.start,event.start);this.end=Math.max(this.end,event.end);this.associatedEvents.push(event);},containsTimestampInclusive:function(timestamp){return(this.start<=timestamp)&&(timestamp<=this.end);},intersects:function(other){return(other.start<this.end)&&(other.end>this.start);},isNear:function(event,threshold){return(this.end+threshold)>event.start;},debug:function(){var debugString=this.irType+'(';debugString+=parseInt(this.start)+' ';debugString+=parseInt(this.end);this.associatedEvents.forEach(function(event){debugString+=' '+event.typeName;});return debugString+')';}};return{ProtoIR:ProtoIR};});'use strict';tr.exportTo('tr.model',function(){function getAssociatedEvents(irs){var allAssociatedEvents=new tr.model.EventSet();irs.forEach(function(ir){ir.associatedEvents.forEach(function(event){if(event instanceof tr.model.FlowEvent)
+event.subSlices.forEach(pushAssociatedEvents);});return ir;},merge:function(other){other.names.forEach(function(name){this.names.add(name);}.bind(this));this.associatedEvents.addEventSet(other.associatedEvents);this.start=Math.min(this.start,other.start);this.end=Math.max(this.end,other.end);if(other.isAnimationBegin)
+this.isAnimationBegin=true;},pushEvent:function(event){this.start=Math.min(this.start,event.start);this.end=Math.max(this.end,event.end);this.associatedEvents.push(event);},containsTimestampInclusive:function(timestamp){return(this.start<=timestamp)&&(timestamp<=this.end);},intersects:function(other){return(other.start<this.end)&&(other.end>this.start);},isNear:function(event,threshold){return(this.end+threshold)>event.start;},debug:function(){var debugString=this.irType+'(';debugString+=parseInt(this.start)+' ';debugString+=parseInt(this.end);this.associatedEvents.forEach(function(event){debugString+=' '+event.typeName;});return debugString+')';}};return{ProtoExpectation:ProtoExpectation};});'use strict';tr.exportTo('tr.importer',function(){var ProtoExpectation=tr.importer.ProtoExpectation;var INPUT_TYPE=tr.e.cc.INPUT_EVENT_TYPE_NAMES;var KEYBOARD_TYPE_NAMES=[INPUT_TYPE.CHAR,INPUT_TYPE.KEY_DOWN_RAW,INPUT_TYPE.KEY_DOWN,INPUT_TYPE.KEY_UP];var MOUSE_RESPONSE_TYPE_NAMES=[INPUT_TYPE.CLICK,INPUT_TYPE.CONTEXT_MENU];var MOUSE_WHEEL_TYPE_NAMES=[INPUT_TYPE.MOUSE_WHEEL];var MOUSE_DRAG_TYPE_NAMES=[INPUT_TYPE.MOUSE_DOWN,INPUT_TYPE.MOUSE_MOVE,INPUT_TYPE.MOUSE_UP];var TAP_TYPE_NAMES=[INPUT_TYPE.TAP,INPUT_TYPE.TAP_CANCEL,INPUT_TYPE.TAP_DOWN];var PINCH_TYPE_NAMES=[INPUT_TYPE.PINCH_BEGIN,INPUT_TYPE.PINCH_END,INPUT_TYPE.PINCH_UPDATE];var FLING_TYPE_NAMES=[INPUT_TYPE.FLING_CANCEL,INPUT_TYPE.FLING_START];var TOUCH_TYPE_NAMES=[INPUT_TYPE.TOUCH_END,INPUT_TYPE.TOUCH_MOVE,INPUT_TYPE.TOUCH_START];var SCROLL_TYPE_NAMES=[INPUT_TYPE.SCROLL_BEGIN,INPUT_TYPE.SCROLL_END,INPUT_TYPE.SCROLL_UPDATE];var ALL_HANDLED_TYPE_NAMES=[].concat(KEYBOARD_TYPE_NAMES,MOUSE_RESPONSE_TYPE_NAMES,MOUSE_WHEEL_TYPE_NAMES,MOUSE_DRAG_TYPE_NAMES,PINCH_TYPE_NAMES,TAP_TYPE_NAMES,FLING_TYPE_NAMES,TOUCH_TYPE_NAMES,SCROLL_TYPE_NAMES);var RENDERER_FLING_TITLE='InputHandlerProxy::HandleGestureFling::started';var CSS_ANIMATION_TITLE='Animation';var INPUT_MERGE_THRESHOLD_MS=200;var ANIMATION_MERGE_THRESHOLD_MS=32;var MOUSE_WHEEL_THRESHOLD_MS=40;var MOUSE_MOVE_THRESHOLD_MS=40;var KEYBOARD_IR_NAME='Keyboard';var MOUSE_IR_NAME='Mouse';var MOUSEWHEEL_IR_NAME='MouseWheel';var TAP_IR_NAME='Tap';var PINCH_IR_NAME='Pinch';var FLING_IR_NAME='Fling';var TOUCH_IR_NAME='Touch';var SCROLL_IR_NAME='Scroll';var CSS_IR_NAME='CSS';function compareEvents(x,y){if(x.start!==y.start)
+return x.start-y.start;if(x.end!==y.end)
+return x.end-y.end;if(x.guid&&y.guid)
+return x.guid-y.guid;return 0;}
+function forEventTypesIn(events,typeNames,cb,opt_this){events.forEach(function(event){if(typeNames.indexOf(event.typeName)>=0){cb.call(opt_this,event);}});}
+function causedFrame(event){for(var i=0;i<event.associatedEvents.length;++i){if(event.associatedEvents[i].title===tr.model.helpers.IMPL_RENDERING_STATS)
+return true;}
+return false;}
+function getSortedInputEvents(modelHelper){var inputEvents=[];var browserProcess=modelHelper.browserHelper.process;var mainThread=browserProcess.findAtMostOneThreadNamed('CrBrowserMain');mainThread.asyncSliceGroup.iterateAllEvents(function(slice){if(!slice.isTopLevel)
+return;if(!(slice instanceof tr.e.cc.InputLatencyAsyncSlice))
+return;if(isNaN(slice.start)||isNaN(slice.duration)||isNaN(slice.end))
+return;inputEvents.push(slice);});return inputEvents.sort(compareEvents);}
+function findProtoExpectations(modelHelper,sortedInputEvents){var protoExpectations=[];var handlers=[handleKeyboardEvents,handleMouseResponseEvents,handleMouseWheelEvents,handleMouseDragEvents,handleTapResponseEvents,handlePinchEvents,handleFlingEvents,handleTouchEvents,handleScrollEvents,handleCSSAnimations];handlers.forEach(function(handler){protoExpectations.push.apply(protoExpectations,handler(modelHelper,sortedInputEvents));});protoExpectations.sort(compareEvents);return protoExpectations;}
+function handleKeyboardEvents(modelHelper,sortedInputEvents){var protoExpectations=[];forEventTypesIn(sortedInputEvents,KEYBOARD_TYPE_NAMES,function(event){var pe=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,KEYBOARD_IR_NAME);pe.pushEvent(event);protoExpectations.push(pe);});return protoExpectations;}
+function handleMouseResponseEvents(modelHelper,sortedInputEvents){var protoExpectations=[];forEventTypesIn(sortedInputEvents,MOUSE_RESPONSE_TYPE_NAMES,function(event){var pe=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,MOUSE_IR_NAME);pe.pushEvent(event);protoExpectations.push(pe);});return protoExpectations;}
+function handleMouseWheelEvents(modelHelper,sortedInputEvents){var protoExpectations=[];var currentPE=undefined;var prevEvent_=undefined;forEventTypesIn(sortedInputEvents,MOUSE_WHEEL_TYPE_NAMES,function(event){var prevEvent=prevEvent_;prevEvent_=event;if(currentPE&&(prevEvent.start+MOUSE_WHEEL_THRESHOLD_MS)>=event.start){if(currentPE.irType===ProtoExpectation.ANIMATION_TYPE){currentPE.pushEvent(event);}else{currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,MOUSEWHEEL_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);}
+return;}
+currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,MOUSEWHEEL_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);});return protoExpectations;}
+function handleMouseDragEvents(modelHelper,sortedInputEvents){var protoExpectations=[];var currentPE=undefined;var mouseDownEvent=undefined;forEventTypesIn(sortedInputEvents,MOUSE_DRAG_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.MOUSE_DOWN:if(causedFrame(event)){var pe=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,MOUSE_IR_NAME);pe.pushEvent(event);protoExpectations.push(pe);}else{mouseDownEvent=event;}
+break;case INPUT_TYPE.MOUSE_MOVE:if(!causedFrame(event)){var pe=new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);pe.pushEvent(event);protoExpectations.push(pe);}else if(!currentPE||!currentPE.isNear(event,MOUSE_MOVE_THRESHOLD_MS)){currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,MOUSE_IR_NAME);currentPE.pushEvent(event);if(mouseDownEvent){currentPE.associatedEvents.push(mouseDownEvent);mouseDownEvent=undefined;}
+protoExpectations.push(currentPE);}else{if(currentPE.irType===ProtoExpectation.ANIMATION_TYPE){currentPE.pushEvent(event);}else{currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,MOUSE_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);}}
+break;case INPUT_TYPE.MOUSE_UP:if(!mouseDownEvent){var pe=new ProtoExpectation(causedFrame(event)?ProtoExpectation.RESPONSE_TYPE:ProtoExpectation.IGNORED_TYPE,MOUSE_IR_NAME);pe.pushEvent(event);protoExpectations.push(pe);break;}
+if(currentPE){currentPE.pushEvent(event);}else{currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,MOUSE_IR_NAME);if(mouseDownEvent)
+currentPE.associatedEvents.push(mouseDownEvent);currentPE.pushEvent(event);protoExpectations.push(currentPE);}
+mouseDownEvent=undefined;currentPE=undefined;break;}});if(mouseDownEvent){currentPE=new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);currentPE.pushEvent(mouseDownEvent);protoExpectations.push(currentPE);}
+return protoExpectations;}
+function handleTapResponseEvents(modelHelper,sortedInputEvents){var protoExpectations=[];var currentPE=undefined;forEventTypesIn(sortedInputEvents,TAP_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.TAP_DOWN:currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,TAP_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);break;case INPUT_TYPE.TAP:if(currentPE){currentPE.pushEvent(event);}else{currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,TAP_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);}
+currentPE=undefined;break;case INPUT_TYPE.TAP_CANCEL:if(!currentPE){var pe=new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);pe.pushEvent(event);protoExpectations.push(pe);break;}
+if(currentPE.isNear(event,INPUT_MERGE_THRESHOLD_MS)){currentPE.pushEvent(event);}else{currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,TAP_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);}
+currentPE=undefined;break;}});return protoExpectations;}
+function handlePinchEvents(modelHelper,sortedInputEvents){var protoExpectations=[];var currentPE=undefined;var sawFirstUpdate=false;var modelBounds=modelHelper.model.bounds;forEventTypesIn(sortedInputEvents,PINCH_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.PINCH_BEGIN:if(currentPE&&currentPE.isNear(event,INPUT_MERGE_THRESHOLD_MS)){currentPE.pushEvent(event);break;}
+currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,PINCH_IR_NAME);currentPE.pushEvent(event);currentPE.isAnimationBegin=true;protoExpectations.push(currentPE);sawFirstUpdate=false;break;case INPUT_TYPE.PINCH_UPDATE:if(!currentPE||((currentPE.irType===ProtoExpectation.RESPONSE_TYPE)&&sawFirstUpdate)||!currentPE.isNear(event,INPUT_MERGE_THRESHOLD_MS)){currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,PINCH_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);}else{currentPE.pushEvent(event);sawFirstUpdate=true;}
+break;case INPUT_TYPE.PINCH_END:if(currentPE){currentPE.pushEvent(event);}else{var pe=new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);pe.pushEvent(event);protoExpectations.push(pe);}
+currentPE=undefined;break;}});return protoExpectations;}
+function handleFlingEvents(modelHelper,sortedInputEvents){var protoExpectations=[];var currentPE=undefined;function isRendererFling(event){return event.title===RENDERER_FLING_TITLE;}
+var browserHelper=modelHelper.browserHelper;var flingEvents=browserHelper.getAllAsyncSlicesMatching(isRendererFling);forEventTypesIn(sortedInputEvents,FLING_TYPE_NAMES,function(event){flingEvents.push(event);});flingEvents.sort(compareEvents);flingEvents.forEach(function(event){if(event.title===RENDERER_FLING_TITLE){if(currentPE){currentPE.pushEvent(event);}else{currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,FLING_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);}
+return;}
+switch(event.typeName){case INPUT_TYPE.FLING_START:if(currentPE){console.error('Another FlingStart? File a bug with this trace!');currentPE.pushEvent(event);}else{currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,FLING_IR_NAME);currentPE.pushEvent(event);currentPE.end=0;protoExpectations.push(currentPE);}
+break;case INPUT_TYPE.FLING_CANCEL:if(currentPE){currentPE.pushEvent(event);currentPE.end=event.start;currentPE=undefined;}else{var pe=new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);pe.pushEvent(event);protoExpectations.push(pe);}
+break;}});if(currentPE&&!currentPE.end)
+currentPE.end=modelHelper.model.bounds.max;return protoExpectations;}
+function handleTouchEvents(modelHelper,sortedInputEvents){var protoExpectations=[];var currentPE=undefined;var sawFirstMove=false;forEventTypesIn(sortedInputEvents,TOUCH_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.TOUCH_START:if(currentPE){currentPE.pushEvent(event);}else{currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,TOUCH_IR_NAME);currentPE.pushEvent(event);currentPE.isAnimationBegin=true;protoExpectations.push(currentPE);sawFirstMove=false;}
+break;case INPUT_TYPE.TOUCH_MOVE:if(!currentPE){currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,TOUCH_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);break;}
+if((sawFirstMove&&(currentPE.irType===ProtoExpectation.RESPONSE_TYPE))||!currentPE.isNear(event,INPUT_MERGE_THRESHOLD_MS)){var prevEnd=currentPE.end;currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,TOUCH_IR_NAME);currentPE.pushEvent(event);currentPE.start=prevEnd;protoExpectations.push(currentPE);}else{currentPE.pushEvent(event);sawFirstMove=true;}
+break;case INPUT_TYPE.TOUCH_END:if(!currentPE){var pe=new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);pe.pushEvent(event);protoExpectations.push(pe);break;}
+if(currentPE.isNear(event,INPUT_MERGE_THRESHOLD_MS)){currentPE.pushEvent(event);}else{var pe=new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);pe.pushEvent(event);protoExpectations.push(pe);}
+currentPE=undefined;break;}});return protoExpectations;}
+function handleScrollEvents(modelHelper,sortedInputEvents){var protoExpectations=[];var currentPE=undefined;var sawFirstUpdate=false;forEventTypesIn(sortedInputEvents,SCROLL_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.SCROLL_BEGIN:currentPE=new ProtoExpectation(ProtoExpectation.RESPONSE_TYPE,SCROLL_IR_NAME);currentPE.pushEvent(event);currentPE.isAnimationBegin=true;protoExpectations.push(currentPE);sawFirstUpdate=false;break;case INPUT_TYPE.SCROLL_UPDATE:if(currentPE){if(currentPE.isNear(event,INPUT_MERGE_THRESHOLD_MS)&&((currentPE.irType===ProtoExpectation.ANIMATION_TYPE)||!sawFirstUpdate)){currentPE.pushEvent(event);sawFirstUpdate=true;}else{currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,SCROLL_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);}}else{currentPE=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,SCROLL_IR_NAME);currentPE.pushEvent(event);protoExpectations.push(currentPE);}
+break;case INPUT_TYPE.SCROLL_END:if(!currentPE){console.error('ScrollEnd without ScrollUpdate? '+'File a bug with this trace!');var pe=new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);pe.pushEvent(event);protoExpectations.push(pe);break;}
+currentPE.pushEvent(event);break;}});return protoExpectations;}
+function handleCSSAnimations(modelHelper,sortedInputEvents){var animationEvents=modelHelper.browserHelper.getAllAsyncSlicesMatching(function(event){return((event.title===CSS_ANIMATION_TITLE)&&event.isTopLevel&&(event.duration>0));});var framesForProcess={};function getFramesForAnimationProcess(animation){var frames=framesForProcess[animation.parentContainer.parent.guid];if(frames===undefined){var rendererHelper=new tr.model.helpers.ChromeRendererHelper(modelHelper,animation.parentContainer.parent);frames=rendererHelper.getFrameEventsInRange(tr.model.helpers.IMPL_FRAMETIME_TYPE,modelHelper.model.bounds);framesForProcess[animation.parentContainer.parent.guid]=frames;}
+return frames;}
+var animationRanges=[];function pushAnimationRange(start,end,animation){var range=tr.b.Range.fromExplicitRange(start,end);range.animation=animation;range.frames=range.filterArray(getFramesForAnimationProcess(animation),function(frameEvent){return frameEvent.start;});if(range.frames.length===0)
+return;animationRanges.push(range);}
+animationEvents.forEach(function(animation){if(animation.subSlices.length===0){pushAnimationRange(animation.start,animation.end,animation);}else{var start=undefined;animation.subSlices.forEach(function(sub){if((sub.args.state==='running')&&(start===undefined)){start=sub.start;}else if((sub.args.state==='paused')||(sub.args.state==='idle')||(sub.args.state==='finished')){if(start===undefined){start=modelHelper.model.bounds.min;}
+pushAnimationRange(start,sub.start,animation);start=undefined;}});if(start!==undefined)
+pushAnimationRange(start,modelHelper.model.bounds.max,animation);}});function merge(ranges){var protoExpectation=new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,CSS_IR_NAME);ranges.forEach(function(range){protoExpectation.start=Math.min(protoExpectation.start,range.min);protoExpectation.end=Math.max(protoExpectation.end,range.max);protoExpectation.associatedEvents.push(range.animation);protoExpectation.associatedEvents.addEventSet(range.frames);});return protoExpectation;}
+return tr.b.mergeRanges(animationRanges,ANIMATION_MERGE_THRESHOLD_MS,merge);}
+function postProcessProtoExpectations(protoExpectations){protoExpectations=mergeIntersectingResponses(protoExpectations);protoExpectations=mergeIntersectingAnimations(protoExpectations);protoExpectations=fixResponseAnimationStarts(protoExpectations);protoExpectations=fixTapResponseTouchAnimations(protoExpectations);return protoExpectations;}
+function mergeIntersectingResponses(protoExpectations){var newPEs=[];while(protoExpectations.length){var pe=protoExpectations.shift();newPEs.push(pe);if(pe.irType!==ProtoExpectation.RESPONSE_TYPE)
+continue;for(var i=0;i<protoExpectations.length;++i){var otherPE=protoExpectations[i];if(otherPE.irType!==pe.irType)
+continue;if(!otherPE.intersects(pe))
+continue;var typeNames=pe.associatedEvents.map(function(event){return event.typeName;});if(otherPE.containsTypeNames(typeNames))
+continue;pe.merge(otherPE);protoExpectations.splice(i,1);--i;}}
+return newPEs;}
+function mergeIntersectingAnimations(protoExpectations){var newPEs=[];while(protoExpectations.length){var pe=protoExpectations.shift();newPEs.push(pe);if(pe.irType!==ProtoExpectation.ANIMATION_TYPE)
+continue;var isCSS=pe.containsSliceTitle(CSS_ANIMATION_TITLE);var isFling=pe.containsTypeNames([INPUT_TYPE.FLING_START]);for(var i=0;i<protoExpectations.length;++i){var otherPE=protoExpectations[i];if(otherPE.irType!==pe.irType)
+continue;if(isCSS!=otherPE.containsSliceTitle(CSS_ANIMATION_TITLE))
+continue;if(!otherPE.intersects(pe))
+continue;if(isFling!=otherPE.containsTypeNames([INPUT_TYPE.FLING_START]))
+continue;pe.merge(otherPE);protoExpectations.splice(i,1);--i;}}
+return newPEs;}
+function fixResponseAnimationStarts(protoExpectations){protoExpectations.forEach(function(ape){if(ape.irType!==ProtoExpectation.ANIMATION_TYPE)
+return;protoExpectations.forEach(function(rpe){if(rpe.irType!==ProtoExpectation.RESPONSE_TYPE)
+return;if(!ape.containsTimestampInclusive(rpe.end))
+return;if(ape.containsTimestampInclusive(rpe.start))
+return;ape.start=rpe.end;});});return protoExpectations;}
+function fixTapResponseTouchAnimations(protoExpectations){function isTapResponse(pe){return(pe.irType===ProtoExpectation.RESPONSE_TYPE)&&pe.containsTypeNames([INPUT_TYPE.TAP]);}
+function isTouchAnimation(pe){return(pe.irType===ProtoExpectation.ANIMATION_TYPE)&&pe.containsTypeNames([INPUT_TYPE.TOUCH_MOVE])&&!pe.containsTypeNames([INPUT_TYPE.SCROLL_UPDATE,INPUT_TYPE.PINCH_UPDATE]);}
+var newPEs=[];while(protoExpectations.length){var pe=protoExpectations.shift();newPEs.push(pe);var peIsTapResponse=isTapResponse(pe);var peIsTouchAnimation=isTouchAnimation(pe);if(!peIsTapResponse&&!peIsTouchAnimation)
+continue;for(var i=0;i<protoExpectations.length;++i){var otherPE=protoExpectations[i];if(!otherPE.intersects(pe))
+continue;if(peIsTapResponse&&!isTouchAnimation(otherPE))
+continue;if(peIsTouchAnimation&&!isTapResponse(otherPE))
+continue;pe.irType=ProtoExpectation.RESPONSE_TYPE;pe.merge(otherPE);protoExpectations.splice(i,1);--i;}}
+return newPEs;}
+function checkAllInputEventsHandled(sortedInputEvents,protoExpectations){var handledEvents=[];protoExpectations.forEach(function(protoExpectation){protoExpectation.associatedEvents.forEach(function(event){if((event.title===CSS_ANIMATION_TITLE)&&(event.subSlices.length>0))
+return;if(handledEvents.indexOf(event)>=0){console.error('double-handled event',event.typeName,parseInt(event.start),parseInt(event.end),protoExpectation);return;}
+handledEvents.push(event);});});sortedInputEvents.forEach(function(event){if(handledEvents.indexOf(event)<0){console.error('UNHANDLED INPUT EVENT!',event.typeName,parseInt(event.start),parseInt(event.end));}});}
+function findInputExpectations(modelHelper){var sortedInputEvents=getSortedInputEvents(modelHelper);var protoExpectations=findProtoExpectations(modelHelper,sortedInputEvents);protoExpectations=postProcessProtoExpectations(protoExpectations);checkAllInputEventsHandled(sortedInputEvents,protoExpectations);var irs=[];protoExpectations.forEach(function(protoExpectation){var ir=protoExpectation.createInteractionRecord(modelHelper.model);if(ir)
+irs.push(ir);});return irs;}
+return{findInputExpectations:findInputExpectations,compareEvents:compareEvents,CSS_ANIMATION_TITLE:CSS_ANIMATION_TITLE};});'use strict';tr.exportTo('tr.model.um',function(){var LOAD_SUBTYPE_NAMES={SUCCESSFUL:'Successful',FAILED:'Failed',STARTUP:'Startup'};var DOES_LOAD_SUBTYPE_NAME_EXIST={};for(var key in LOAD_SUBTYPE_NAMES){DOES_LOAD_SUBTYPE_NAME_EXIST[LOAD_SUBTYPE_NAMES[key]]=true;;}
+function LoadExpectation(parentModel,initiatorTitle,start,duration){if(!DOES_LOAD_SUBTYPE_NAME_EXIST[initiatorTitle])
+throw new Error(initiatorTitle+' is not in LOAD_SUBTYPE_NAMES');tr.model.um.UserExpectation.call(this,parentModel,initiatorTitle,start,duration);this.renderProcess=undefined;this.renderMainThread=undefined;this.routingId=undefined;this.parentRoutingId=undefined;this.loadFinishedEvent=undefined;}
+LoadExpectation.prototype={__proto__:tr.model.um.UserExpectation.prototype,constructor:LoadExpectation};tr.model.um.UserExpectation.register(LoadExpectation,{stageTitle:'Load',colorId:tr.b.ColorScheme.getColorIdForReservedName('rail_load')});return{LOAD_SUBTYPE_NAMES:LOAD_SUBTYPE_NAMES,LoadExpectation:LoadExpectation};});'use strict';tr.exportTo('tr.importer',function(){var NAVIGATION_START='NavigationTiming navigationStart';var FIRST_CONTENTFUL_PAINT_TITLE='firstContentfulPaint';function getAllFrameEvents(modelHelper){var frameEvents=[];frameEvents.push.apply(frameEvents,modelHelper.browserHelper.getFrameEventsInRange(tr.model.helpers.IMPL_FRAMETIME_TYPE,modelHelper.model.bounds));tr.b.iterItems(modelHelper.rendererHelpers,function(pid,renderer){frameEvents.push.apply(frameEvents,renderer.getFrameEventsInRange(tr.model.helpers.IMPL_FRAMETIME_TYPE,modelHelper.model.bounds));});return frameEvents.sort(tr.importer.compareEvents);}
+function getStartupEvents(modelHelper){function isStartupSlice(slice){return slice.title==='BrowserMainLoop::CreateThreads';}
+var events=modelHelper.browserHelper.getAllAsyncSlicesMatching(isStartupSlice);var deduper=new tr.model.EventSet();events.forEach(function(event){var sliceGroup=event.parentContainer.sliceGroup;var slice=sliceGroup&&sliceGroup.findFirstSlice();if(slice)
+deduper.push(slice);});return deduper.toArray();}
+function findLoadExpectationsInternal(modelHelper,subtypeName,openingEvents,closingEvents){var loads=[];openingEvents.forEach(function(openingEvent){closingEvents.forEach(function(closingEvent){if(openingEvent.closingEvent)
+return;if(closingEvent.openingEvent)
+return;if(closingEvent.start<=openingEvent.start)
+return;if(openingEvent.parentContainer.parent.pid!==closingEvent.parentContainer.parent.pid)
+return;openingEvent.closingEvent=closingEvent;closingEvent.openingEvent=openingEvent;var lir=new tr.model.um.LoadExpectation(modelHelper.model,subtypeName,openingEvent.start,closingEvent.end-openingEvent.start);lir.associatedEvents.push(openingEvent);lir.associatedEvents.push(closingEvent);loads.push(lir);});});return loads;}
+function findRenderLoadExpectations(modelHelper){var events=[];modelHelper.model.iterateAllEvents(function(event){if((event.title===NAVIGATION_START)||(event.title===FIRST_CONTENTFUL_PAINT_TITLE))
+events.push(event);});events.sort(tr.importer.compareEvents);var loads=[];var startEvent=undefined;events.forEach(function(event){if(event.title===NAVIGATION_START){startEvent=event;}else if(event.title===FIRST_CONTENTFUL_PAINT_TITLE){if(startEvent){loads.push(new tr.model.um.LoadExpectation(modelHelper.model,tr.model.um.LOAD_SUBTYPE_NAMES.SUCCESSFUL,startEvent.start,event.start-startEvent.start));startEvent=undefined;}}});if(startEvent){loads.push(new tr.model.um.LoadExpectation(modelHelper.model,tr.model.um.LOAD_SUBTYPE_NAMES.SUCCESSFUL,startEvent.start,modelHelper.model.bounds.max-startEvent.start));}
+return loads;}
+function findLoadExpectations(modelHelper){var loads=[];var commitLoadEvents=modelHelper.browserHelper.getCommitProvisionalLoadEventsInRange(modelHelper.model.bounds);var startupEvents=getStartupEvents(modelHelper);var frameEvents=getAllFrameEvents(modelHelper);var startupLoads=findLoadExpectationsInternal(modelHelper,tr.model.um.LOAD_SUBTYPE_NAMES.STARTUP,startupEvents,frameEvents);loads.push.apply(loads,startupLoads);loads.push.apply(loads,findRenderLoadExpectations(modelHelper));return loads;}
+return{findLoadExpectations:findLoadExpectations};});'use strict';tr.exportTo('tr.model',function(){function getAssociatedEvents(irs){var allAssociatedEvents=new tr.model.EventSet();irs.forEach(function(ir){ir.associatedEvents.forEach(function(event){if(event instanceof tr.model.FlowEvent)
 return;allAssociatedEvents.push(event);});});return allAssociatedEvents;}
 function getUnassociatedEvents(model,associatedEvents){var unassociatedEvents=new tr.model.EventSet();model.getAllProcesses().forEach(function(process){for(var tid in process.threads){var thread=process.threads[tid];thread.sliceGroup.iterateAllEvents(function(event){if(!associatedEvents.contains(event))
 unassociatedEvents.push(event);});}});return unassociatedEvents;}
 function getTotalCpuDuration(events){var cpuMs=0;events.forEach(function(event){if(event.cpuSelfTime)
 cpuMs+=event.cpuSelfTime;});return cpuMs;}
-function getIRCoverageFromModel(model){var associatedEvents=getAssociatedEvents(model.interactionRecords);if(!associatedEvents.length)
-return undefined;var unassociatedEvents=getUnassociatedEvents(model,associatedEvents);var associatedCpuMs=getTotalCpuDuration(associatedEvents);var unassociatedCpuMs=getTotalCpuDuration(unassociatedEvents);var totalEventCount=associatedEvents.length+unassociatedEvents.length;var totalCpuMs=associatedCpuMs+unassociatedCpuMs;return{associatedEventsCount:associatedEvents.length,unassociatedEventsCount:unassociatedEvents.length,associatedEventsCpuTimeMs:associatedCpuMs,unassociatedEventsCpuTimeMs:unassociatedCpuMs,coveredEventsCountRatio:associatedEvents.length/totalEventCount,coveredEventsCpuTimeRatio:associatedCpuMs/totalCpuMs};}
-return{getIRCoverageFromModel:getIRCoverageFromModel,getAssociatedEvents:getAssociatedEvents,getUnassociatedEvents:getUnassociatedEvents};});'use strict';tr.exportTo('tr.e.rail',function(){var INPUT_TYPE=tr.e.cc.INPUT_EVENT_TYPE_NAMES;var ProtoIR=tr.e.rail.ProtoIR;function compareEvents(x,y){if(x.start!==y.start)
-return x.start-y.start;if(x.end!==y.end)
-return x.end-y.end;if(x.guid&&y.guid)
-return x.guid-y.guid;return 0;}
-function causedFrame(event){for(var i=0;i<event.associatedEvents.length;++i){if(event.associatedEvents[i].title===tr.e.audits.IMPL_RENDERING_STATS)
-return true;}
-return false;}
-function forEventTypesIn(events,typeNames,cb,opt_this){events.forEach(function(event){if(typeNames.indexOf(event.typeName)>=0){cb.call(opt_this,event);}});}
-var RENDER_FRAME_IMPL_PREFIX='RenderFrameImpl::';var CREATE_CHILD_TITLE=RENDER_FRAME_IMPL_PREFIX+'createChildFrame';var START_LOAD_TITLE=RENDER_FRAME_IMPL_PREFIX+'didStartProvisionalLoad';var FAIL_LOAD_TITLE=RENDER_FRAME_IMPL_PREFIX+'didFailProvisionalLoad';function isRenderFrameImplEvent(event){return event.title.indexOf(RENDER_FRAME_IMPL_PREFIX)===0;}
-var INPUT_MERGE_THRESHOLD_MS=200;var ANIMATION_MERGE_THRESHOLD_MS=1;var MOUSE_WHEEL_THRESHOLD_MS=40;var MOUSE_MOVE_THRESHOLD_MS=40;var INSIGNIFICANT_MS=1;var KEYBOARD_TYPE_NAMES=[INPUT_TYPE.CHAR,INPUT_TYPE.KEY_DOWN_RAW,INPUT_TYPE.KEY_DOWN,INPUT_TYPE.KEY_UP];var MOUSE_RESPONSE_TYPE_NAMES=[INPUT_TYPE.CLICK,INPUT_TYPE.CONTEXT_MENU];var MOUSE_WHEEL_TYPE_NAMES=[INPUT_TYPE.MOUSE_WHEEL];var MOUSE_DRAG_TYPE_NAMES=[INPUT_TYPE.MOUSE_DOWN,INPUT_TYPE.MOUSE_MOVE,INPUT_TYPE.MOUSE_UP];var TAP_TYPE_NAMES=[INPUT_TYPE.TAP,INPUT_TYPE.TAP_CANCEL,INPUT_TYPE.TAP_DOWN];var PINCH_TYPE_NAMES=[INPUT_TYPE.PINCH_BEGIN,INPUT_TYPE.PINCH_END,INPUT_TYPE.PINCH_UPDATE];var FLING_TYPE_NAMES=[INPUT_TYPE.FLING_CANCEL,INPUT_TYPE.FLING_START];var TOUCH_TYPE_NAMES=[INPUT_TYPE.TOUCH_END,INPUT_TYPE.TOUCH_MOVE,INPUT_TYPE.TOUCH_START];var SCROLL_TYPE_NAMES=[INPUT_TYPE.SCROLL_BEGIN,INPUT_TYPE.SCROLL_END,INPUT_TYPE.SCROLL_UPDATE];var ALL_HANDLED_TYPE_NAMES=[].concat(KEYBOARD_TYPE_NAMES,MOUSE_RESPONSE_TYPE_NAMES,MOUSE_WHEEL_TYPE_NAMES,MOUSE_DRAG_TYPE_NAMES,PINCH_TYPE_NAMES,TAP_TYPE_NAMES,FLING_TYPE_NAMES,TOUCH_TYPE_NAMES,SCROLL_TYPE_NAMES);var RENDERER_FLING_TITLE='InputHandlerProxy::HandleGestureFling::started';var CSS_ANIMATION_TITLE='Animation';var LOAD_STARTUP_IR_NAME='Startup';var LOAD_SUCCEEDED_IR_NAME='Succeeded';var LOAD_FAILED_IR_NAME='Failed';var KEYBOARD_IR_NAME='Keyboard';var MOUSE_IR_NAME='Mouse';var MOUSEWHEEL_IR_NAME='MouseWheel';var TAP_IR_NAME='Tap';var PINCH_IR_NAME='Pinch';var FLING_IR_NAME='Fling';var TOUCH_IR_NAME='Touch';var SCROLL_IR_NAME='Scroll';var CSS_IR_NAME='CSS';function RAILIRFinder(model,modelHelper){this.model=model;this.modelHelper=modelHelper;};RAILIRFinder.supportsModelHelper=function(modelHelper){return modelHelper.browserHelper!==undefined;};RAILIRFinder.prototype={findAllInteractionRecords:function(){var rirs=[];rirs.push.apply(rirs,this.findLoadInteractionRecords());rirs.push.apply(rirs,this.findInputInteractionRecords());rirs.push.apply(rirs,this.findIdleInteractionRecords(rirs));this.collectUnassociatedEvents_(rirs);return rirs;},setIRNames_:function(name,irs){irs.forEach(function(ir){ir.name=name;});},collectUnassociatedEvents_:function(rirs){var vacuumIRs=[];rirs.forEach(function(ir){if(ir instanceof tr.e.rail.LoadInteractionRecord||ir instanceof tr.e.rail.IdleInteractionRecord)
+function getIRCoverageFromModel(model){var associatedEvents=getAssociatedEvents(model.userModel.expectations);if(!associatedEvents.length)
+return undefined;var unassociatedEvents=getUnassociatedEvents(model,associatedEvents);var associatedCpuMs=getTotalCpuDuration(associatedEvents);var unassociatedCpuMs=getTotalCpuDuration(unassociatedEvents);var totalEventCount=associatedEvents.length+unassociatedEvents.length;var totalCpuMs=associatedCpuMs+unassociatedCpuMs;var coveredEventsCpuTimeRatio=undefined;if(totalCpuMs!==0)
+coveredEventsCpuTimeRatio=associatedCpuMs/totalCpuMs;return{associatedEventsCount:associatedEvents.length,unassociatedEventsCount:unassociatedEvents.length,associatedEventsCpuTimeMs:associatedCpuMs,unassociatedEventsCpuTimeMs:unassociatedCpuMs,coveredEventsCountRatio:associatedEvents.length/totalEventCount,coveredEventsCpuTimeRatio:coveredEventsCpuTimeRatio};}
+return{getIRCoverageFromModel:getIRCoverageFromModel,getAssociatedEvents:getAssociatedEvents,getUnassociatedEvents:getUnassociatedEvents};});'use strict';tr.exportTo('tr.model.um',function(){function IdleExpectation(parentModel,start,duration){var initiatorTitle='';tr.model.um.UserExpectation.call(this,parentModel,initiatorTitle,start,duration);}
+IdleExpectation.prototype={__proto__:tr.model.um.UserExpectation.prototype,constructor:IdleExpectation};tr.model.um.UserExpectation.register(IdleExpectation,{stageTitle:'Idle',colorId:tr.b.ColorScheme.getColorIdForReservedName('rail_idle')});return{IdleExpectation:IdleExpectation};});'use strict';tr.exportTo('tr.importer',function(){var INSIGNIFICANT_MS=1;function UserModelBuilder(model){this.model=model;this.modelHelper=model.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);};UserModelBuilder.supportsModelHelper=function(modelHelper){return modelHelper.browserHelper!==undefined;};UserModelBuilder.prototype={buildUserModel:function(){if(!this.modelHelper||!this.modelHelper.browserHelper)
+return;var expectations=undefined;try{expectations=this.findUserExpectations();}catch(error){this.model.importWarning({type:'UserModelBuilder',message:error,showToUser:true});return;}
+expectations.forEach(function(expectation){this.model.userModel.expectations.push(expectation);},this);},findUserExpectations:function(){var expectations=[];expectations.push.apply(expectations,tr.importer.findLoadExpectations(this.modelHelper));expectations.push.apply(expectations,tr.importer.findInputExpectations(this.modelHelper));expectations.push.apply(expectations,this.findIdleExpectations(expectations));this.collectUnassociatedEvents_(expectations);return expectations;},collectUnassociatedEvents_:function(rirs){var vacuumIRs=[];rirs.forEach(function(ir){if(ir instanceof tr.model.um.LoadExpectation||ir instanceof tr.model.um.IdleExpectation)
 vacuumIRs.push(ir);});if(vacuumIRs.length===0)
 return;var allAssociatedEvents=tr.model.getAssociatedEvents(rirs);var unassociatedEvents=tr.model.getUnassociatedEvents(this.model,allAssociatedEvents);unassociatedEvents.forEach(function(event){if(!(event instanceof tr.model.ThreadSlice))
 return;if(!event.isTopLevel)
-return;for(var iri=0;iri<vacuumIRs.length;++iri){var ir=vacuumIRs[iri];if((event.start>=ir.start)&&(event.start<ir.end)){ir.associatedEvents.addEventSet(event.entireHierarchy);return;}}});},findIdleInteractionRecords:function(otherIRs){if(this.model.bounds.isEmpty)
+return;for(var iri=0;iri<vacuumIRs.length;++iri){var ir=vacuumIRs[iri];if((event.start>=ir.start)&&(event.start<ir.end)){ir.associatedEvents.addEventSet(event.entireHierarchy);return;}}});},findIdleExpectations:function(otherIRs){if(this.model.bounds.isEmpty)
 return;var emptyRanges=tr.b.findEmptyRangesBetweenRanges(tr.b.convertEventsToRanges(otherIRs),this.model.bounds);var irs=[];var model=this.model;emptyRanges.forEach(function(range){if(range.max<(range.min+INSIGNIFICANT_MS))
-return;irs.push(new tr.e.rail.IdleInteractionRecord(model,range.min,range.max-range.min));});return irs;},getAllFrameEvents:function(){var frameEvents=[];frameEvents.push.apply(frameEvents,this.modelHelper.browserHelper.getFrameEventsInRange(tr.e.audits.IMPL_FRAMETIME_TYPE,this.model.bounds));tr.b.iterItems(this.modelHelper.rendererHelpers,function(pid,renderer){frameEvents.push.apply(frameEvents,renderer.getFrameEventsInRange(tr.e.audits.IMPL_FRAMETIME_TYPE,this.model.bounds));},this);return frameEvents.sort(compareEvents);},getStartLoadEvents:function(){function isStartLoadSlice(slice){return slice.title===START_LOAD_TITLE;}
-return this.modelHelper.browserHelper.getAllAsyncSlicesMatching(isStartLoadSlice).sort(compareEvents);},getFailLoadEvents:function(){function isFailLoadSlice(slice){return slice.title===FAIL_LOAD_TITLE;}
-return this.modelHelper.browserHelper.getAllAsyncSlicesMatching(isFailLoadSlice).sort(compareEvents);},getStartupEvents:function(){function isStartupSlice(slice){return slice.title==='BrowserMainLoop::CreateThreads';}
-var events=this.modelHelper.browserHelper.getAllAsyncSlicesMatching(isStartupSlice);var deduper=new tr.model.EventSet();events.forEach(function(event){var sliceGroup=event.parentContainer.sliceGroup;var slice=sliceGroup&&sliceGroup.findFirstSlice();if(slice)
-deduper.push(slice);});return deduper.toArray();},findLoadInteractionRecords_:function(openingEvents,closingEvents){var lirs=[];var model=this.model;openingEvents.forEach(function(openingEvent){closingEvents.forEach(function(closingEvent){if(openingEvent.closingEvent)
-return;if(closingEvent.openingEvent)
-return;if(closingEvent.start<=openingEvent.start)
-return;if(openingEvent.parentContainer.parent.pid!==closingEvent.parentContainer.parent.pid)
-return;openingEvent.closingEvent=closingEvent;closingEvent.openingEvent=openingEvent;var lir=new tr.e.rail.LoadInteractionRecord(model,openingEvent.start,closingEvent.end-openingEvent.start);lir.associatedEvents.push(openingEvent);lir.associatedEvents.push(closingEvent);if(isRenderFrameImplEvent(openingEvent)){lir.renderProcessId=openingEvent.parentContainer.parent.pid;lir.routingId=openingEvent.args.id;lir.parentRoutingId=this.findLoadParentRoutingId_(lir);}
-lirs.push(lir);},this);},this);return lirs;},findLoadParentRoutingId_:function(lir){function isCreateChildEvent(event){return((event.title===CREATE_CHILD_TITLE)&&(event.parentContainer.parent.pid===lir.renderProcessId)&&(event.args.child===lir.routingId));}
-var parentRoutingId=undefined;this.modelHelper.browserHelper.getAllAsyncSlicesMatching(isCreateChildEvent).forEach(function(event){parentRoutingId=event.args.id;});return parentRoutingId;},findLoadInteractionRecords:function(){var startupEvents=this.getStartupEvents();var commitLoadEvents=this.modelHelper.browserHelper.getCommitProvisionalLoadEventsInRange(this.model.bounds);var frameEvents=this.getAllFrameEvents();var startLoadEvents=this.getStartLoadEvents();var failLoadEvents=this.getFailLoadEvents();var lirs=[];var startupLIRs=this.findLoadInteractionRecords_(startupEvents,frameEvents);this.setIRNames_(LOAD_STARTUP_IR_NAME,startupLIRs);lirs.push.apply(lirs,startupLIRs);var successfulLIRs=this.findLoadInteractionRecords_(commitLoadEvents,frameEvents);this.setIRNames_(LOAD_SUCCEEDED_IR_NAME,successfulLIRs);var renderLIRs=successfulLIRs;var failedLIRs=this.findLoadInteractionRecords_(startLoadEvents,failLoadEvents);this.setIRNames_(LOAD_FAILED_IR_NAME,failedLIRs);renderLIRs.push.apply(renderLIRs,failedLIRs);renderLIRs.forEach(function(lir){if(lir.parentRoutingId===undefined){lirs.push(lir);}},this);return lirs;},findInputInteractionRecords:function(){var sortedInputEvents=this.getSortedInputEvents();var protoIRs=this.findProtoIRs(sortedInputEvents);protoIRs=this.postProcessProtoIRs(protoIRs);this.checkAllInputEventsHandled(sortedInputEvents,protoIRs);var irs=[];var model=this.model;protoIRs.forEach(function(protoIR){var ir=protoIR.createInteractionRecord(model);if(ir)
-irs.push(ir);});return irs;},findProtoIRs:function(sortedInputEvents){var protoIRs=[];var handlers=[this.handleKeyboardEvents,this.handleMouseResponseEvents,this.handleMouseWheelEvents,this.handleMouseDragEvents,this.handleTapResponseEvents,this.handlePinchEvents,this.handleFlingEvents,this.handleTouchEvents,this.handleScrollEvents,this.handleCSSAnimations];handlers.forEach(function(handler){protoIRs.push.apply(protoIRs,handler.call(this,sortedInputEvents));},this);protoIRs.sort(compareEvents);return protoIRs;},getSortedInputEvents:function(){var inputEvents=[];var browserProcess=this.modelHelper.browserHelper.process;var mainThread=browserProcess.findAtMostOneThreadNamed('CrBrowserMain');mainThread.asyncSliceGroup.iterateAllEvents(function(slice){if(!slice.isTopLevel)
-return;if(!(slice instanceof tr.e.cc.InputLatencyAsyncSlice))
-return;if(isNaN(slice.start)||isNaN(slice.duration)||isNaN(slice.end))
-return;inputEvents.push(slice);},this);return inputEvents.sort(compareEvents);},handleKeyboardEvents:function(sortedInputEvents){var protoIRs=[];forEventTypesIn(sortedInputEvents,KEYBOARD_TYPE_NAMES,function(event){var pir=new ProtoIR(ProtoIR.RESPONSE_TYPE,KEYBOARD_IR_NAME);pir.pushEvent(event);protoIRs.push(pir);});return protoIRs;},handleMouseResponseEvents:function(sortedInputEvents){var protoIRs=[];forEventTypesIn(sortedInputEvents,MOUSE_RESPONSE_TYPE_NAMES,function(event){var pir=new ProtoIR(ProtoIR.RESPONSE_TYPE,MOUSE_IR_NAME);pir.pushEvent(event);protoIRs.push(pir);});return protoIRs;},handleMouseWheelEvents:function(sortedInputEvents){var protoIRs=[];var currentPIR=undefined;var prevEvent_=undefined;forEventTypesIn(sortedInputEvents,MOUSE_WHEEL_TYPE_NAMES,function(event){var prevEvent=prevEvent_;prevEvent_=event;if(currentPIR&&(prevEvent.start+MOUSE_WHEEL_THRESHOLD_MS)>=event.start){if(currentPIR.irType===ProtoIR.ANIMATION_TYPE){currentPIR.pushEvent(event);}else{currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,MOUSEWHEEL_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}
-return;}
-currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,MOUSEWHEEL_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);});return protoIRs;},handleMouseDragEvents:function(sortedInputEvents){var protoIRs=[];var currentPIR=undefined;var mouseDownEvent=undefined;forEventTypesIn(sortedInputEvents,MOUSE_DRAG_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.MOUSE_DOWN:if(causedFrame(event)){var pir=new ProtoIR(ProtoIR.RESPONSE_TYPE,MOUSE_IR_NAME);pir.pushEvent(event);protoIRs.push(pir);}else{mouseDownEvent=event;}
-break;case INPUT_TYPE.MOUSE_MOVE:if(!causedFrame(event)){var pir=new ProtoIR(ProtoIR.IGNORED_TYPE);pir.pushEvent(event);protoIRs.push(pir);}else if(!currentPIR||!currentPIR.isNear(event,MOUSE_MOVE_THRESHOLD_MS)){currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,MOUSE_IR_NAME);currentPIR.pushEvent(event);if(mouseDownEvent){currentPIR.associatedEvents.push(mouseDownEvent);mouseDownEvent=undefined;}
-protoIRs.push(currentPIR);}else{if(currentPIR.irType===ProtoIR.ANIMATION_TYPE){currentPIR.pushEvent(event);}else{currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,MOUSE_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}}
-break;case INPUT_TYPE.MOUSE_UP:if(!mouseDownEvent){var pir=new ProtoIR(causedFrame(event)?ProtoIR.RESPONSE_TYPE:ProtoIR.IGNORED_TYPE,MOUSE_IR_NAME);pir.pushEvent(event);protoIRs.push(pir);break;}
-if(currentPIR){currentPIR.pushEvent(event);}else{currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,MOUSE_IR_NAME);if(mouseDownEvent)
-currentPIR.associatedEvents.push(mouseDownEvent);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}
-mouseDownEvent=undefined;currentPIR=undefined;break;}});if(mouseDownEvent){currentPIR=new ProtoIR(ProtoIR.IGNORED_TYPE);currentPIR.pushEvent(mouseDownEvent);protoIRs.push(currentPIR);}
-return protoIRs;},handleTapResponseEvents:function(sortedInputEvents){var protoIRs=[];var currentPIR=undefined;forEventTypesIn(sortedInputEvents,TAP_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.TAP_DOWN:currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,TAP_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);break;case INPUT_TYPE.TAP:if(currentPIR){currentPIR.pushEvent(event);}else{currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,TAP_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}
-currentPIR=undefined;break;case INPUT_TYPE.TAP_CANCEL:if(!currentPIR){var pir=new ProtoIR(ProtoIR.IGNORED_TYPE);pir.pushEvent(event);protoIRs.push(pir);break;}
-if(currentPIR.isNear(event,INPUT_MERGE_THRESHOLD_MS)){currentPIR.pushEvent(event);}else{currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,TAP_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}
-currentPIR=undefined;break;}});return protoIRs;},handlePinchEvents:function(sortedInputEvents){var protoIRs=[];var currentPIR=undefined;var sawFirstUpdate=false;var modelBounds=this.model.bounds;forEventTypesIn(sortedInputEvents,PINCH_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.PINCH_BEGIN:if(currentPIR&&currentPIR.isNear(event,INPUT_MERGE_THRESHOLD_MS)){currentPIR.pushEvent(event);break;}
-currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,PINCH_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);sawFirstUpdate=false;break;case INPUT_TYPE.PINCH_UPDATE:if(!currentPIR||((currentPIR.irType===ProtoIR.RESPONSE_TYPE)&&sawFirstUpdate)||!currentPIR.isNear(event,INPUT_MERGE_THRESHOLD_MS)){currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,PINCH_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}else{currentPIR.pushEvent(event);sawFirstUpdate=true;}
-break;case INPUT_TYPE.PINCH_END:if(currentPIR){currentPIR.pushEvent(event);}else{var pir=new ProtoIR(ProtoIR.IGNORED_TYPE);pir.pushEvent(event);protoIRs.push(pir);}
-currentPIR=undefined;break;}});return protoIRs;},handleFlingEvents:function(sortedInputEvents){var protoIRs=[];var currentPIR=undefined;function isRendererFling(event){return event.title===RENDERER_FLING_TITLE;}
-var browserHelper=this.modelHelper.browserHelper;var flingEvents=browserHelper.getAllAsyncSlicesMatching(isRendererFling);forEventTypesIn(sortedInputEvents,FLING_TYPE_NAMES,function(event){flingEvents.push(event);});flingEvents.sort(compareEvents);flingEvents.forEach(function(event){if(event.title===RENDERER_FLING_TITLE){if(currentPIR){currentPIR.pushEvent(event);}else{currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,FLING_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}
-return;}
-switch(event.typeName){case INPUT_TYPE.FLING_START:if(currentPIR){console.error('Another FlingStart? File a bug with this trace!');currentPIR.pushEvent(event);}else{currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,FLING_IR_NAME);currentPIR.pushEvent(event);currentPIR.end=0;protoIRs.push(currentPIR);}
-break;case INPUT_TYPE.FLING_CANCEL:if(currentPIR){currentPIR.pushEvent(event);currentPIR.end=event.start;currentPIR=undefined;}else{var pir=new ProtoIR(ProtoIR.IGNORED_TYPE);pir.pushEvent(event);protoIRs.push(pir);}
-break;}});if(currentPIR&&!currentPIR.end)
-currentPIR.end=this.model.bounds.max;return protoIRs;},handleTouchEvents:function(sortedInputEvents){var protoIRs=[];var currentPIR=undefined;var sawFirstMove=false;forEventTypesIn(sortedInputEvents,TOUCH_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.TOUCH_START:if(currentPIR){currentPIR.pushEvent(event);}else{currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,TOUCH_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);sawFirstMove=false;}
-break;case INPUT_TYPE.TOUCH_MOVE:if(!currentPIR){currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,TOUCH_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);break;}
-if((sawFirstMove&&(currentPIR.irType===ProtoIR.RESPONSE_TYPE))||!currentPIR.isNear(event,INPUT_MERGE_THRESHOLD_MS)){var prevEnd=currentPIR.end;currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,TOUCH_IR_NAME);currentPIR.pushEvent(event);currentPIR.start=prevEnd;protoIRs.push(currentPIR);}else{currentPIR.pushEvent(event);sawFirstMove=true;}
-break;case INPUT_TYPE.TOUCH_END:if(!currentPIR){var pir=new ProtoIR(ProtoIR.IGNORED_TYPE);pir.pushEvent(event);protoIRs.push(pir);break;}
-if(currentPIR.isNear(event,INPUT_MERGE_THRESHOLD_MS)){currentPIR.pushEvent(event);}else{var pir=new ProtoIR(ProtoIR.IGNORED_TYPE);pir.pushEvent(event);protoIRs.push(pir);}
-currentPIR=undefined;break;}});return protoIRs;},handleScrollEvents:function(sortedInputEvents){var protoIRs=[];var currentPIR=undefined;var sawFirstUpdate=false;forEventTypesIn(sortedInputEvents,SCROLL_TYPE_NAMES,function(event){switch(event.typeName){case INPUT_TYPE.SCROLL_BEGIN:currentPIR=new ProtoIR(ProtoIR.RESPONSE_TYPE,SCROLL_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);sawFirstUpdate=false;break;case INPUT_TYPE.SCROLL_UPDATE:if(currentPIR){if(currentPIR.isNear(event,INPUT_MERGE_THRESHOLD_MS)&&((currentPIR.irType===ProtoIR.ANIMATION_TYPE)||!sawFirstUpdate)){currentPIR.pushEvent(event);sawFirstUpdate=true;}else{currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,SCROLL_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}}else{currentPIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,SCROLL_IR_NAME);currentPIR.pushEvent(event);protoIRs.push(currentPIR);}
-break;case INPUT_TYPE.SCROLL_END:if(!currentPIR){console.error('ScrollEnd without ScrollUpdate? '+'File a bug with this trace!');var pir=new ProtoIR(ProtoIR.IGNORED_TYPE);pir.pushEvent(event);protoIRs.push(pir);break;}
-currentPIR.pushEvent(event);break;}});return protoIRs;},handleCSSAnimations:function(sortedInputEvents){var animationEvents=this.modelHelper.browserHelper.getAllAsyncSlicesMatching(function(event){return((event.title===CSS_ANIMATION_TITLE)&&(event.duration>0));});var animationRanges=[];animationEvents.forEach(function(event){animationRanges.push({min:event.start,max:event.end,event:event});});function merge(ranges){var protoIR=new ProtoIR(ProtoIR.ANIMATION_TYPE,CSS_IR_NAME);ranges.forEach(function(range){protoIR.pushEvent(range.event);});return protoIR;}
-return tr.b.mergeRanges(animationRanges,ANIMATION_MERGE_THRESHOLD_MS,merge);},postProcessProtoIRs:function(protoIRs){protoIRs=this.mergeIntersectingResponses(protoIRs);protoIRs=this.mergeIntersectingAnimations(protoIRs);protoIRs=this.fixResponseAnimationStarts(protoIRs);protoIRs=this.fixTapResponseTouchAnimations(protoIRs);return protoIRs;},mergeIntersectingResponses:function(protoIRs){var newPIRs=[];while(protoIRs.length){var pir=protoIRs.shift();newPIRs.push(pir);if(pir.irType!==ProtoIR.RESPONSE_TYPE)
-continue;for(var i=0;i<protoIRs.length;++i){var otherPIR=protoIRs[i];if(otherPIR.irType!==pir.irType)
-continue;if(!otherPIR.intersects(pir))
-continue;var typeNames=pir.associatedEvents.map(function(event){return event.typeName;});if(otherPIR.containsTypeNames(typeNames))
-continue;pir.merge(otherPIR);protoIRs.splice(i,1);--i;}}
-return newPIRs;},mergeIntersectingAnimations:function(protoIRs){var newPIRs=[];while(protoIRs.length){var pir=protoIRs.shift();newPIRs.push(pir);if(pir.irType!==ProtoIR.ANIMATION_TYPE)
-continue;var isCSS=pir.containsSliceTitle(CSS_ANIMATION_TITLE);var isFling=pir.containsTypeNames([INPUT_TYPE.FLING_START]);for(var i=0;i<protoIRs.length;++i){var otherPIR=protoIRs[i];if(otherPIR.irType!==pir.irType)
-continue;if(isCSS!=otherPIR.containsSliceTitle(CSS_ANIMATION_TITLE))
-continue;if(!otherPIR.intersects(pir))
-continue;if(isFling!=otherPIR.containsTypeNames([INPUT_TYPE.FLING_START]))
-continue;pir.merge(otherPIR);protoIRs.splice(i,1);--i;}}
-return newPIRs;},fixResponseAnimationStarts:function(protoIRs){protoIRs.forEach(function(apir){if(apir.irType!==ProtoIR.ANIMATION_TYPE)
-return;protoIRs.forEach(function(rpir){if(rpir.irType!==ProtoIR.RESPONSE_TYPE)
-return;if(!apir.containsTimestampInclusive(rpir.end))
-return;if(apir.containsTimestampInclusive(rpir.start))
-return;apir.start=rpir.end;});});return protoIRs;},fixTapResponseTouchAnimations:function(protoIRs){function isTapResponse(pir){return(pir.irType===ProtoIR.RESPONSE_TYPE)&&pir.containsTypeNames([INPUT_TYPE.TAP]);}
-function isTouchAnimation(pir){return(pir.irType===ProtoIR.ANIMATION_TYPE)&&pir.containsTypeNames([INPUT_TYPE.TOUCH_MOVE])&&!pir.containsTypeNames([INPUT_TYPE.SCROLL_UPDATE,INPUT_TYPE.PINCH_UPDATE]);}
-var newPIRs=[];while(protoIRs.length){var pir=protoIRs.shift();newPIRs.push(pir);var pirIsTapResponse=isTapResponse(pir);var pirIsTouchAnimation=isTouchAnimation(pir);if(!pirIsTapResponse&&!pirIsTouchAnimation)
-continue;for(var i=0;i<protoIRs.length;++i){var otherPIR=protoIRs[i];if(!otherPIR.intersects(pir))
-continue;if(pirIsTapResponse&&!isTouchAnimation(otherPIR))
-continue;if(pirIsTouchAnimation&&!isTapResponse(otherPIR))
-continue;pir.irType=ProtoIR.RESPONSE_TYPE;pir.merge(otherPIR);protoIRs.splice(i,1);--i;}}
-return newPIRs;},checkAllInputEventsHandled:function(sortedInputEvents,protoIRs){var handledEvents=[];protoIRs.forEach(function(protoIR){protoIR.associatedEvents.forEach(function(event){if(handledEvents.indexOf(event)>=0){console.error('double-handled event',event.typeName,parseInt(event.start),parseInt(event.end),protoIR);return;}
-handledEvents.push(event);});});sortedInputEvents.forEach(function(event){if(handledEvents.indexOf(event)<0){console.error('UNHANDLED INPUT EVENT!',event.typeName,parseInt(event.start),parseInt(event.end));}});}};function createCustomizeModelLinesFromModel(model){var modelLines=[];modelLines.push('      audits.addEvent(model.browserMain,');modelLines.push('          {title: \'model start\', start: 0, end: 1});');var typeNames={};for(var typeName in tr.e.cc.INPUT_EVENT_TYPE_NAMES){typeNames[tr.e.cc.INPUT_EVENT_TYPE_NAMES[typeName]]=typeName;}
-var modelEvents=new tr.model.EventSet();model.interactionRecords.forEach(function(ir,index){modelEvents.addEventSet(ir.sourceEvents);});modelEvents=modelEvents.toArray();modelEvents.sort(compareEvents);modelEvents.forEach(function(event){var startAndEnd='start: '+parseInt(event.start)+', '+'end: '+parseInt(event.end)+'});';if(event instanceof tr.e.cc.InputLatencyAsyncSlice){modelLines.push('      audits.addInputEvent(model, INPUT_TYPE.'+
-typeNames[event.typeName]+',');}else if(event.title==='RenderFrameImpl::didCommitProvisionalLoad'){modelLines.push('      audits.addCommitLoadEvent(model,');}else if(event.title==='InputHandlerProxy::HandleGestureFling::started'){modelLines.push('      audits.addFlingAnimationEvent(model,');}else if(event.title===tr.e.audits.IMPL_RENDERING_STATS){modelLines.push('      audits.addFrameEvent(model,');}else if(event.title===CSS_ANIMATION_TITLE){modelLines.push('      audits.addEvent(model.rendererMain, {');modelLines.push('        title: \'Animation\', '+startAndEnd);return;}else{throw('You must extend createCustomizeModelLinesFromModel()'+'to support this event:\n'+event.title+'\n');}
+return;irs.push(new tr.model.um.IdleExpectation(model,range.min,range.max-range.min));});return irs;}};function createCustomizeModelLinesFromModel(model){var modelLines=[];modelLines.push('      audits.addEvent(model.browserMain,');modelLines.push('          {title: \'model start\', start: 0, end: 1});');var typeNames={};for(var typeName in tr.e.cc.INPUT_EVENT_TYPE_NAMES){typeNames[tr.e.cc.INPUT_EVENT_TYPE_NAMES[typeName]]=typeName;}
+var modelEvents=new tr.model.EventSet();model.userModel.expectations.forEach(function(ir,index){modelEvents.addEventSet(ir.sourceEvents);});modelEvents=modelEvents.toArray();modelEvents.sort(tr.importer.compareEvents);modelEvents.forEach(function(event){var startAndEnd='start: '+parseInt(event.start)+', '+'end: '+parseInt(event.end)+'});';if(event instanceof tr.e.cc.InputLatencyAsyncSlice){modelLines.push('      audits.addInputEvent(model, INPUT_TYPE.'+
+typeNames[event.typeName]+',');}else if(event.title==='RenderFrameImpl::didCommitProvisionalLoad'){modelLines.push('      audits.addCommitLoadEvent(model,');}else if(event.title==='InputHandlerProxy::HandleGestureFling::started'){modelLines.push('      audits.addFlingAnimationEvent(model,');}else if(event.title===tr.model.helpers.IMPL_RENDERING_STATS){modelLines.push('      audits.addFrameEvent(model,');}else if(event.title===tr.importer.CSS_ANIMATION_TITLE){modelLines.push('      audits.addEvent(model.rendererMain, {');modelLines.push('        title: \'Animation\', '+startAndEnd);return;}else{throw('You must extend createCustomizeModelLinesFromModel()'+'to support this event:\n'+event.title+'\n');}
 modelLines.push('          {'+startAndEnd);});modelLines.push('      audits.addEvent(model.browserMain,');modelLines.push('          {'+'title: \'model end\', '+'start: '+(parseInt(model.bounds.max)-1)+', '+'end: '+parseInt(model.bounds.max)+'});');return modelLines;}
-function createExpectedIRLinesFromModel(model){var expectedLines=[];var irCount=model.interactionRecords.length;model.interactionRecords.forEach(function(ir,index){var irString='      {';irString+='title: \''+ir.title+'\', ';irString+='start: '+parseInt(ir.start)+', ';irString+='end: '+parseInt(ir.end)+', ';irString+='eventCount: '+ir.sourceEvents.length;irString+='}';if(index<(irCount-1))
+function createExpectedIRLinesFromModel(model){var expectedLines=[];var irCount=model.userModel.expectations.length;model.userModel.expectations.forEach(function(ir,index){var irString='      {';irString+='title: \''+ir.title+'\', ';irString+='start: '+parseInt(ir.start)+', ';irString+='end: '+parseInt(ir.end)+', ';irString+='eventCount: '+ir.sourceEvents.length;irString+='}';if(index<(irCount-1))
 irString+=',';expectedLines.push(irString);});return expectedLines;}
-function createIRFinderTestCaseStringFromModel(model){var filename=window.location.hash.substr(1);var testName=filename.substr(filename.lastIndexOf('/')+1);testName=testName.substr(0,testName.indexOf('.'));try{var testLines=[];testLines.push('  /*');testLines.push('    This test was generated from');testLines.push('    '+filename+'');testLines.push('   */');testLines.push('  test(\''+testName+'\', function() {');testLines.push('    var verifier = new IRVerifier();');testLines.push('    verifier.customizeModelCallback = function(model) {');testLines.push.apply(testLines,createCustomizeModelLinesFromModel(model));testLines.push('    };');testLines.push('    verifier.expectedIRs = [');testLines.push.apply(testLines,createExpectedIRLinesFromModel(model));testLines.push('    ];');testLines.push('    verifier.verify();');testLines.push('  });');return testLines.join('\n');}catch(error){return error;}}
-return{RAILIRFinder:RAILIRFinder,createIRFinderTestCaseStringFromModel:createIRFinderTestCaseStringFromModel};});'use strict';tr.exportTo('tr.e.audits',function(){var Auditor=tr.c.Auditor;function ChromeAuditor(model){Auditor.call(this,model);if(tr.e.audits.ChromeModelHelper.supportsModel(this.model)){var modelHelper=new tr.e.audits.ChromeModelHelper(this.model);if(modelHelper.browserHelper===undefined)
-this.modelHelper=undefined;else
-this.modelHelper=modelHelper;}else{this.modelHelper=undefined;}};ChromeAuditor.prototype={__proto__:Auditor.prototype,runAnnotate:function(){if(!this.modelHelper)
-return;this.model.getAllProcesses().forEach(function(process){if(process.labels!==undefined&&process.labels.length==1&&process.labels[0]=='chrome://tracing')
-process.important=false;});},runAudit:function(){if(!this.modelHelper)
-return;if(!tr.e.rail.RAILIRFinder.supportsModelHelper(this.modelHelper))
-return;var rirf=new tr.e.rail.RAILIRFinder(this.model,this.modelHelper);var rirs=undefined;try{rirs=rirf.findAllInteractionRecords();}catch(error){this.model.importWarning({type:'RAILIRFinder',message:error,showToUser:true});return;}
-rirs.forEach(function(ir){this.model.addInteractionRecord(ir);},this);}};Auditor.register(ChromeAuditor);return{ChromeAuditor:ChromeAuditor};});'use strict';tr.exportTo('tr.b',function(){function Settings(){return Settings;};if(tr.b.unittest&&tr.b.unittest.TestRunner){tr.b.unittest.TestRunner.addEventListener('tr-unittest-will-run',function(){if(tr.isHeadless)
-Settings.setAlternativeStorageInstance(new HeadlessStorage());else
-Settings.setAlternativeStorageInstance(global.sessionStorage);});}
-function SessionSettings(){return SessionSettings;}
-function AddStaticStorageFunctionsToClass_(input_class,storage){input_class.storage_=storage;input_class.get=function(key,opt_default,opt_namespace){key=input_class.namespace_(key,opt_namespace);var rawVal=input_class.storage_.getItem(key);if(rawVal===null||rawVal===undefined)
-return opt_default;try{return JSON.parse(rawVal).value;}catch(e){input_class.storage_.removeItem(key);return opt_default;}};input_class.set=function(key,value,opt_namespace){if(value===undefined)
-throw new Error('Settings.set: value must not be undefined');var v=JSON.stringify({value:value});input_class.storage_.setItem(input_class.namespace_(key,opt_namespace),v);};input_class.keys=function(opt_namespace){var result=[];opt_namespace=opt_namespace||'';for(var i=0;i<input_class.storage_.length;i++){var key=input_class.storage_.key(i);if(input_class.isnamespaced_(key,opt_namespace))
-result.push(input_class.unnamespace_(key,opt_namespace));}
-return result;};input_class.isnamespaced_=function(key,opt_namespace){return key.indexOf(input_class.normalize_(opt_namespace))==0;};input_class.namespace_=function(key,opt_namespace){return input_class.normalize_(opt_namespace)+key;};input_class.unnamespace_=function(key,opt_namespace){return key.replace(input_class.normalize_(opt_namespace),'');};input_class.normalize_=function(opt_namespace){return input_class.NAMESPACE+(opt_namespace?opt_namespace+'.':'');};input_class.setAlternativeStorageInstance=function(instance){input_class.storage_=instance;};input_class.getAlternativeStorageInstance=function(){if(!tr.isHeadless&&input_class.storage_===localStorage)
-return undefined;return input_class.storage_;};input_class.NAMESPACE='trace-viewer';};function HeadlessStorage(){this.length=0;this.hasItem_={};this.items_={};this.itemsAsArray_=undefined;}
-HeadlessStorage.prototype={key:function(index){return this.itemsAsArray[index];},get itemsAsArray(){if(this.itemsAsArray_!==undefined)
-return this.itemsAsArray_;var itemsAsArray=[];for(var k in this.items_)
-itemsAsArray.push(k);this.itemsAsArray_=itemsAsArray;return this.itemsAsArray_;},getItem:function(key){if(!this.hasItem_[key])
-return null;return this.items_[key];},removeItem:function(key){if(!this.hasItem_[key])
-return;var value=this.items_[key];delete this.hasItem_[key];delete this.items_[key];this.length--;this.itemsAsArray_=undefined;return value;},setItem:function(key,value){if(this.hasItem_[key]){this.items_[key]=value;return;}
-this.items_[key]=value;this.hasItem_[key]=true;this.length++;this.itemsAsArray_=undefined;return value;}};if(tr.isHeadless){AddStaticStorageFunctionsToClass_(Settings,new HeadlessStorage());AddStaticStorageFunctionsToClass_(SessionSettings,new HeadlessStorage());}else{AddStaticStorageFunctionsToClass_(Settings,localStorage);AddStaticStorageFunctionsToClass_(SessionSettings,sessionStorage);}
-return{Settings:Settings,SessionSettings:SessionSettings};});'use strict';tr.exportTo('tr.c',function(){function ScriptingObject(){}
-ScriptingObject.prototype={onModelChanged:function(model){}};return{ScriptingObject:ScriptingObject};});'use strict';tr.exportTo('tr.c',function(){function ScriptingController(brushingStateController){this.brushingStateController_=brushingStateController;this.scriptObjectNames_=[];this.scriptObjectValues_=[];this.brushingStateController.addEventListener('model-changed',this.onModelChanged_.bind(this));var typeInfos=ScriptingObjectRegistry.getAllRegisteredTypeInfos();typeInfos.forEach(function(typeInfo){this.addScriptObject(typeInfo.metadata.name,typeInfo.constructor);global[typeInfo.metadata.name]=typeInfo.constructor;},this);}
-function ScriptingObjectRegistry(){}
-var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);tr.b.decorateExtensionRegistry(ScriptingObjectRegistry,options);ScriptingController.prototype={get brushingStateController(){return this.brushingStateController_;},onModelChanged_:function(){this.scriptObjectValues_.forEach(function(v){if(v.onModelChanged)
-v.onModelChanged(this.brushingStateController.model);},this);},addScriptObject:function(name,value){this.scriptObjectNames_.push(name);this.scriptObjectValues_.push(value);},executeCommand:function(command){var f=new Function(this.scriptObjectNames_,'return eval('+command+')');return f.apply(null,this.scriptObjectValues_);}};return{ScriptingController:ScriptingController,ScriptingObjectRegistry:ScriptingObjectRegistry};});'use strict';Polymer('tr-ui-a-tab-view',{ready:function(){this.$.tshh.style.display='none';this.tabs_=[];this.selectedTab_=undefined;for(var i=0;i<this.children.length;i++)
-this.processAddedChild_(this.children[i]);this.childrenObserver_=new MutationObserver(this.childrenUpdated_.bind(this));this.childrenObserver_.observe(this,{childList:'true'});},get tabStripHeadingText(){return this.$.tsh.textContent;},set tabStripHeadingText(tabStripHeadingText){this.$.tsh.textContent=tabStripHeadingText;if(!!tabStripHeadingText)
-this.$.tshh.style.display='';else
-this.$.tshh.style.display='none';},get selectedTab(){this.childrenUpdated_(this.childrenObserver_.takeRecords(),this.childrenObserver_);if(this.selectedTab_)
-return this.selectedTab_.content;return undefined;},set selectedTab(content){this.childrenUpdated_(this.childrenObserver_.takeRecords(),this.childrenObserver_);if(content===undefined||content===null){this.changeSelectedTabById_(undefined);return;}
-var contentTabId=undefined;for(var i=0;i<this.tabs_.length;i++)
-if(this.tabs_[i].content===content){contentTabId=this.tabs_[i].id;break;}
-if(contentTabId===undefined)
-return;this.changeSelectedTabById_(contentTabId);},get tabsHidden(){var ts=this.shadowRoot.querySelector('tab-strip');return ts.hasAttribute('tabs-hidden');},set tabsHidden(tabsHidden){tabsHidden=!!tabsHidden;var ts=this.shadowRoot.querySelector('tab-strip');if(tabsHidden)
-ts.setAttribute('tabs-hidden',true);else
-ts.removeAttribute('tabs-hidden');},get tabs(){return this.tabs_.map(function(tabObject){return tabObject.content;});},processAddedChild_:function(child){var observerAttributeSelected=new MutationObserver(this.childAttributesChanged_.bind(this));var observerAttributeTabLabel=new MutationObserver(this.childAttributesChanged_.bind(this));var tabObject={id:this.tabs_.length,content:child,label:child.getAttribute('tab-label'),observers:{forAttributeSelected:observerAttributeSelected,forAttributeTabLabel:observerAttributeTabLabel}};this.tabs_.push(tabObject);if(child.hasAttribute('selected')){if(this.selectedTab_)
-child.removeAttribute('selected');else
-this.setSelectedTabById_(tabObject.id);}
-var previousSelected=child.selected;var tabView=this;Object.defineProperty(child,'selected',{configurable:true,set:function(value){if(value){tabView.changeSelectedTabById_(tabObject.id);return;}
-var wasSelected=tabView.selectedTab_===tabObject;if(wasSelected)
-tabView.changeSelectedTabById_(undefined);},get:function(){return this.hasAttribute('selected');}});if(previousSelected)
-child.selected=previousSelected;observerAttributeSelected.observe(child,{attributeFilter:['selected']});observerAttributeTabLabel.observe(child,{attributeFilter:['tab-label']});},processRemovedChild_:function(child){for(var i=0;i<this.tabs_.length;i++){this.tabs_[i].id=i;if(this.tabs_[i].content===child){this.tabs_[i].observers.forAttributeSelected.disconnect();this.tabs_[i].observers.forAttributeTabLabel.disconnect();if(this.tabs_[i]===this.selectedTab_){this.clearSelectedTab_();this.fire('selected-tab-change');}
-child.removeAttribute('selected');delete child.selected;this.tabs_.splice(i,1);i--;}}},childAttributesChanged_:function(mutations,observer){var tabObject=undefined;for(var i=0;i<this.tabs_.length;i++){var observers=this.tabs_[i].observers;if(observers.forAttributeSelected===observer||observers.forAttributeTabLabel===observer){tabObject=this.tabs_[i];break;}}
-if(!tabObject)
-return;for(var i=0;i<mutations.length;i++){var node=tabObject.content;if(mutations[i].attributeName==='tab-label')
-tabObject.label=node.getAttribute('tab-label');if(mutations[i].attributeName==='selected'){var nodeIsSelected=node.hasAttribute('selected');if(nodeIsSelected)
-this.changeSelectedTabById_(tabObject.id);else
-this.changeSelectedTabById_(undefined);}}},childrenUpdated_:function(mutations,observer){mutations.forEach(function(mutation){for(var i=0;i<mutation.removedNodes.length;i++)
-this.processRemovedChild_(mutation.removedNodes[i]);for(var i=0;i<mutation.addedNodes.length;i++)
-this.processAddedChild_(mutation.addedNodes[i]);},this);},tabButtonSelectHandler_:function(event,detail,sender){this.changeSelectedTabById_(sender.getAttribute('button-id'));},changeSelectedTabById_:function(id){var newTab=id!==undefined?this.tabs_[id]:undefined;var changed=this.selectedTab_!==newTab;this.saveCurrentTabScrollPosition_();this.clearSelectedTab_();if(id!==undefined){this.setSelectedTabById_(id);this.restoreCurrentTabScrollPosition_();}
-if(changed)
-this.fire('selected-tab-change');},setSelectedTabById_:function(id){this.selectedTab_=this.tabs_[id];this.selectedTab_.observers.forAttributeSelected.disconnect();this.selectedTab_.content.setAttribute('selected','selected');this.selectedTab_.observers.forAttributeSelected.observe(this.selectedTab_.content,{attributeFilter:['selected']});},saveTabStates:function(){this.saveCurrentTabScrollPosition_();},saveCurrentTabScrollPosition_:function(){if(this.selectedTab_){this.selectedTab_.content._savedScrollTop=this.$['content-container'].scrollTop;this.selectedTab_.content._savedScrollLeft=this.$['content-container'].scrollLeft;}},restoreCurrentTabScrollPosition_:function(){if(this.selectedTab_){this.$['content-container'].scrollTop=this.selectedTab_.content._savedScrollTop||0;this.$['content-container'].scrollLeft=this.selectedTab_.content._savedScrollLeft||0;}},clearSelectedTab_:function(){if(this.selectedTab_){this.selectedTab_.observers.forAttributeSelected.disconnect();this.selectedTab_.content.removeAttribute('selected');this.selectedTab_.observers.forAttributeSelected.observe(this.selectedTab_.content,{attributeFilter:['selected']});this.selectedTab_=undefined;}}});'use strict';Polymer('tr-ui-a-sub-view',{set tabLabel(label){return this.setAttribute('tab-label',label);},get tabLabel(){return this.getAttribute('tab-label');},get requiresTallView(){return false;},get relatedEventsToHighlight(){return undefined;},set selection(selection){throw new Error('Not implemented!');},get selection(){throw new Error('Not implemented!');}});'use strict';tr.exportTo('tr.ui.b',function(){var EventSet=tr.model.EventSet;var SelectionState=tr.model.SelectionState;function BrushingState(){this.guid_=tr.b.GUID.allocate();this.selection_=new EventSet();this.findMatches_=new EventSet();this.analysisViewRelatedEvents_=new EventSet();this.analysisLinkHoveredEvents_=new EventSet();this.appliedToModel_=undefined;this.viewSpecificBrushingStates_={};}
+function createIRFinderTestCaseStringFromModel(model){var filename=window.location.hash.substr(1);var testName=filename.substr(filename.lastIndexOf('/')+1);testName=testName.substr(0,testName.indexOf('.'));try{var testLines=[];testLines.push('  /*');testLines.push('    This test was generated from');testLines.push('    '+filename+'');testLines.push('   */');testLines.push('  test(\''+testName+'\', function() {');testLines.push('    var verifier = new UserExpectationVerifier();');testLines.push('    verifier.customizeModelCallback = function(model) {');testLines.push.apply(testLines,createCustomizeModelLinesFromModel(model));testLines.push('    };');testLines.push('    verifier.expectedIRs = [');testLines.push.apply(testLines,createExpectedIRLinesFromModel(model));testLines.push('    ];');testLines.push('    verifier.verify();');testLines.push('  });');return testLines.join('\n');}catch(error){return error;}}
+return{UserModelBuilder:UserModelBuilder,createIRFinderTestCaseStringFromModel:createIRFinderTestCaseStringFromModel};});'use strict';tr.exportTo('tr.importer',function(){var Timing=tr.b.Timing;function ImportOptions(){this.shiftWorldToZero=true;this.pruneEmptyContainers=true;this.showImportWarnings=true;this.trackDetailedModelStats=false;this.customizeModelCallback=undefined;var auditorTypes=tr.c.Auditor.getAllRegisteredTypeInfos();this.auditorConstructors=auditorTypes.map(function(typeInfo){return typeInfo.constructor;});}
+function Import(model,opt_options){if(model===undefined)
+throw new Error('Must provide model to import into.');this.importing_=false;this.importOptions_=opt_options||new ImportOptions();this.model_=model;this.model_.importOptions=this.importOptions_;}
+Import.prototype={__proto__:Object.prototype,importTraces:function(traces){var progressMeter={update:function(msg){}};tr.b.Task.RunSynchronously(this.createImportTracesTask(progressMeter,traces));},importTracesWithProgressDialog:function(traces){if(tr.isHeadless)
+throw new Error('Cannot use this method in headless mode.');var overlay=tr.ui.b.Overlay();overlay.title='Importing...';overlay.userCanClose=false;overlay.msgEl=document.createElement('div');overlay.appendChild(overlay.msgEl);overlay.msgEl.style.margin='20px';overlay.update=function(msg){this.msgEl.textContent=msg;};overlay.visible=true;var promise=tr.b.Task.RunWhenIdle(this.createImportTracesTask(overlay,traces));promise.then(function(){overlay.visible=false;},function(err){overlay.visible=false;});return promise;},createImportTracesTask:function(progressMeter,traces){if(this.importing_)
+throw new Error('Already importing.');this.importing_=true;var importTask=new tr.b.Task(function prepareImport(){progressMeter.update('I will now import your traces for you...');},this);var lastTask=importTask;var importers=[];lastTask=lastTask.timedAfter('TraceImport',function createImports(){traces=traces.slice(0);progressMeter.update('Creating importers...');for(var i=0;i<traces.length;++i)
+importers.push(this.createImporter_(traces[i]));for(var i=0;i<importers.length;i++){var subtraces=importers[i].extractSubtraces();for(var j=0;j<subtraces.length;j++){try{traces.push(subtraces[j]);importers.push(this.createImporter_(subtraces[j]));}catch(error){console.warn(error.name+': '+error.message);continue;}}}
+if(traces.length&&!this.hasEventDataDecoder_(importers)){throw new Error('Could not find an importer for the provided eventData.');}
+importers.sort(function(x,y){return x.importPriority-y.importPriority;});},this);lastTask=lastTask.timedAfter('TraceImport',function importClockSyncMarkers(task){importers.forEach(function(importer,index){task.subTask(Timing.wrapNamedFunction('TraceImport',importer.importerName,function runImportClockSyncMarkersOnOneImporter(){progressMeter.update('Importing clock sync markers '+(index+1)+' of '+
+importers.length);importer.importClockSyncMarkers();}),this);},this);},this);lastTask=lastTask.timedAfter('TraceImport',function runImport(task){importers.forEach(function(importer,index){task.subTask(Timing.wrapNamedFunction('TraceImport',importer.importerName,function runImportEventsOnOneImporter(){progressMeter.update('Importing '+(index+1)+' of '+importers.length);importer.importEvents();}),this);},this);},this);if(this.importOptions_.customizeModelCallback){lastTask=lastTask.timedAfter('TraceImport',function runCustomizeCallbacks(task){this.importOptions_.customizeModelCallback(this.model_);},this);}
+lastTask=lastTask.timedAfter('TraceImport',function importSampleData(task){importers.forEach(function(importer,index){progressMeter.update('Importing sample data '+(index+1)+'/'+importers.length);importer.importSampleData();},this);},this);lastTask=lastTask.timedAfter('TraceImport',function runAutoclosers(){progressMeter.update('Autoclosing open slices...');this.model_.autoCloseOpenSlices();this.model_.createSubSlices();},this);lastTask=lastTask.timedAfter('TraceImport',function finalizeImport(task){importers.forEach(function(importer,index){progressMeter.update('Finalizing import '+(index+1)+'/'+importers.length);importer.finalizeImport();},this);},this);lastTask=lastTask.timedAfter('TraceImport',function runPreinits(){progressMeter.update('Initializing objects (step 1/2)...');this.model_.preInitializeObjects();},this);if(this.importOptions_.pruneEmptyContainers){lastTask=lastTask.timedAfter('TraceImport',function runPruneEmptyContainers(){progressMeter.update('Pruning empty containers...');this.model_.pruneEmptyContainers();},this);}
+lastTask=lastTask.timedAfter('TraceImport',function runMergeKernelWithuserland(){progressMeter.update('Merging kernel with userland...');this.model_.mergeKernelWithUserland();},this);var auditors=[];lastTask=lastTask.timedAfter('TraceImport',function createAuditorsAndRunAnnotate(){progressMeter.update('Adding arbitrary data to model...');auditors=this.importOptions_.auditorConstructors.map(function(auditorConstructor){return new auditorConstructor(this.model_);},this);auditors.forEach(function(auditor){auditor.runAnnotate();auditor.installUserFriendlyCategoryDriverIfNeeded();});},this);lastTask=lastTask.timedAfter('TraceImport',function computeWorldBounds(){progressMeter.update('Computing final world bounds...');this.model_.computeWorldBounds(this.importOptions_.shiftWorldToZero);},this);lastTask=lastTask.timedAfter('TraceImport',function buildFlowEventIntervalTree(){progressMeter.update('Building flow event map...');this.model_.buildFlowEventIntervalTree();},this);lastTask=lastTask.timedAfter('TraceImport',function joinRefs(){progressMeter.update('Joining object refs...');this.model_.joinRefs();},this);lastTask=lastTask.timedAfter('TraceImport',function cleanupUndeletedObjects(){progressMeter.update('Cleaning up undeleted objects...');this.model_.cleanupUndeletedObjects();},this);lastTask=lastTask.timedAfter('TraceImport',function sortMemoryDumps(){progressMeter.update('Sorting memory dumps...');this.model_.sortMemoryDumps();},this);lastTask=lastTask.timedAfter('TraceImport',function finalizeMemoryGraphs(){progressMeter.update('Finalizing memory dump graphs...');this.model_.finalizeMemoryGraphs();},this);lastTask=lastTask.timedAfter('TraceImport',function initializeObjects(){progressMeter.update('Initializing objects (step 2/2)...');this.model_.initializeObjects();},this);lastTask=lastTask.timedAfter('TraceImport',function buildEventIndices(){progressMeter.update('Building event indices...');this.model_.buildEventIndices();},this);lastTask=lastTask.timedAfter('TraceImport',function buildUserModel(){progressMeter.update('Building UserModel...');var userModelBuilder=new tr.importer.UserModelBuilder(this.model_);userModelBuilder.buildUserModel();},this);lastTask=lastTask.timedAfter('TraceImport',function sortExpectations(){progressMeter.update('Sorting user expectations...');this.model_.userModel.sortExpectations();},this);lastTask=lastTask.timedAfter('TraceImport',function runAudits(){progressMeter.update('Running auditors...');auditors.forEach(function(auditor){auditor.runAudit();});},this);lastTask=lastTask.timedAfter('TraceImport',function sortAlerts(){progressMeter.update('Updating alerts...');this.model_.sortAlerts();},this);lastTask=lastTask.timedAfter('TraceImport',function lastUpdateBounds(){progressMeter.update('Update bounds...');this.model_.updateBounds();},this);lastTask=lastTask.timedAfter('TraceImport',function addModelWarnings(){progressMeter.update('Looking for warnings...');if(!this.model_.isTimeHighResolution){this.model_.importWarning({type:'low_resolution_timer',message:'Trace time is low resolution, trace may be unusable.',showToUser:true});}},this);lastTask.after(function(){this.importing_=false;},this);return importTask;},createImporter_:function(eventData){var importerConstructor=tr.importer.Importer.findImporterFor(eventData);if(!importerConstructor){throw new Error('Couldn\'t create an importer for the provided '+'eventData.');}
+return new importerConstructor(this.model_,eventData);},hasEventDataDecoder_:function(importers){for(var i=0;i<importers.length;++i){if(!importers[i].isTraceDataContainer())
+return true;}
+return false;}};return{ImportOptions:ImportOptions,Import:Import};});'use strict';tr.exportTo('tr.e.cc',function(){function PictureAsImageData(picture,errorOrImageData){this.picture_=picture;if(errorOrImageData instanceof ImageData){this.error_=undefined;this.imageData_=errorOrImageData;}else{this.error_=errorOrImageData;this.imageData_=undefined;}};PictureAsImageData.Pending=function(picture){return new PictureAsImageData(picture,undefined);};PictureAsImageData.prototype={get picture(){return this.picture_;},get error(){return this.error_;},get imageData(){return this.imageData_;},isPending:function(){return this.error_===undefined&&this.imageData_===undefined;},asCanvas:function(){if(!this.imageData_)
+return;var canvas=document.createElement('canvas');var ctx=canvas.getContext('2d');canvas.width=this.imageData_.width;canvas.height=this.imageData_.height;ctx.putImageData(this.imageData_,0,0);return canvas;}};return{PictureAsImageData:PictureAsImageData};});'use strict';tr.exportTo('tr.e.cc',function(){var convertedNameCache={};function convertNameToJSConvention(name){if(name in convertedNameCache)
+return convertedNameCache[name];if(name[0]=='_'||name[name.length-1]=='_'){convertedNameCache[name]=name;return name;}
+var words=name.split('_');if(words.length==1){convertedNameCache[name]=words[0];return words[0];}
+for(var i=1;i<words.length;i++)
+words[i]=words[i][0].toUpperCase()+words[i].substring(1);convertedNameCache[name]=words.join('');return convertedNameCache[name];}
+function convertObjectFieldNamesToJSConventions(object){tr.b.iterObjectFieldsRecursively(object,function(object,fieldName,fieldValue){delete object[fieldName];object[newFieldName]=fieldValue;return newFieldName;});}
+function convertQuadSuffixedTypesToQuads(object){tr.b.iterObjectFieldsRecursively(object,function(object,fieldName,fieldValue){});}
+function convertObject(object){convertObjectFieldNamesToJSConventions(object);convertQuadSuffixedTypesToQuads(object);}
+function moveRequiredFieldsFromArgsToToplevel(object,fields){for(var i=0;i<fields.length;i++){var key=fields[i];if(object.args[key]===undefined)
+throw Error('Expected field '+key+' not found in args');if(object[key]!==undefined)
+throw Error('Field '+key+' already in object');object[key]=object.args[key];delete object.args[key];}}
+function moveOptionalFieldsFromArgsToToplevel(object,fields){for(var i=0;i<fields.length;i++){var key=fields[i];if(object.args[key]===undefined)
+continue;if(object[key]!==undefined)
+throw Error('Field '+key+' already in object');object[key]=object.args[key];delete object.args[key];}}
+function preInitializeObject(object){preInitializeObjectInner(object.args,false);}
+function preInitializeObjectInner(object,hasRecursed){if(!(object instanceof Object))
+return;if(object instanceof Array){for(var i=0;i<object.length;i++)
+preInitializeObjectInner(object[i],true);return;}
+if(hasRecursed&&(object instanceof tr.model.ObjectSnapshot||object instanceof tr.model.ObjectInstance))
+return;for(var key in object){var newKey=convertNameToJSConvention(key);if(newKey!=key){var value=object[key];delete object[key];object[newKey]=value;key=newKey;}
+if(/Quad$/.test(key)&&!(object[key]instanceof tr.b.Quad)){var q;try{q=tr.b.Quad.from8Array(object[key]);}catch(e){console.log(e);}
+object[key]=q;continue;}
+if(/Rect$/.test(key)&&!(object[key]instanceof tr.b.Rect)){var r;try{r=tr.b.Rect.fromArray(object[key]);}catch(e){console.log(e);}
+object[key]=r;}
+preInitializeObjectInner(object[key],true);}}
+function bytesToRoundedMegabytes(bytes){return Math.round(bytes/100000.0)/10.0;}
+return{preInitializeObject:preInitializeObject,convertNameToJSConvention:convertNameToJSConvention,moveRequiredFieldsFromArgsToToplevel:moveRequiredFieldsFromArgsToToplevel,moveOptionalFieldsFromArgsToToplevel:moveOptionalFieldsFromArgsToToplevel,bytesToRoundedMegabytes:bytesToRoundedMegabytes};});'use strict';tr.exportTo('tr.e.cc',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;var PictureCount=0;var OPS_TIMING_ITERATIONS=3;function Picture(skp64,layerRect){this.skp64_=skp64;this.layerRect_=layerRect;this.guid_=tr.b.GUID.allocate();}
+Picture.prototype={get canSave(){return true;},get layerRect(){return this.layerRect_;},get guid(){return this.guid_;},getBase64SkpData:function(){return this.skp64_;},getOps:function(){if(!PictureSnapshot.CanGetOps()){console.error(PictureSnapshot.HowToEnablePictureDebugging());return undefined;}
+var ops=window.chrome.skiaBenchmarking.getOps({skp64:this.skp64_,params:{layer_rect:this.layerRect_.toArray()}});if(!ops)
+console.error('Failed to get picture ops.');return ops;},getOpTimings:function(){if(!PictureSnapshot.CanGetOpTimings()){console.error(PictureSnapshot.HowToEnablePictureDebugging());return undefined;}
+var opTimings=window.chrome.skiaBenchmarking.getOpTimings({skp64:this.skp64_,params:{layer_rect:this.layerRect_.toArray()}});if(!opTimings)
+console.error('Failed to get picture op timings.');return opTimings;},tagOpsWithTimings:function(ops){var opTimings=new Array();for(var iteration=0;iteration<OPS_TIMING_ITERATIONS;iteration++){opTimings[iteration]=this.getOpTimings();if(!opTimings[iteration]||!opTimings[iteration].cmd_times)
+return ops;if(opTimings[iteration].cmd_times.length!=ops.length)
+return ops;}
+for(var opIndex=0;opIndex<ops.length;opIndex++){var min=Number.MAX_VALUE;for(var i=0;i<OPS_TIMING_ITERATIONS;i++)
+min=Math.min(min,opTimings[i].cmd_times[opIndex]);ops[opIndex].cmd_time=min;}
+return ops;},rasterize:function(params,rasterCompleteCallback){if(!PictureSnapshot.CanRasterize()||!PictureSnapshot.CanGetOps()){rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,tr.e.cc.PictureSnapshot.HowToEnablePictureDebugging()));return;}
+var raster=window.chrome.skiaBenchmarking.rasterize({skp64:this.skp64_,params:{layer_rect:this.layerRect_.toArray()}},{stop:params.stopIndex===undefined?-1:params.stopIndex,overdraw:!!params.showOverdraw,params:{}});if(raster){var canvas=document.createElement('canvas');var ctx=canvas.getContext('2d');canvas.width=raster.width;canvas.height=raster.height;var imageData=ctx.createImageData(raster.width,raster.height);imageData.data.set(new Uint8ClampedArray(raster.data));rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,imageData));}else{var error='Failed to rasterize picture. '+'Your recording may be from an old Chrome version. '+'The SkPicture format is not backward compatible.';rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,error));}}};function LayeredPicture(pictures){this.guid_=tr.b.GUID.allocate();this.pictures_=pictures;this.layerRect_=undefined;}
+LayeredPicture.prototype={__proto__:Picture.prototype,get canSave(){return false;},get typeName(){return'cc::LayeredPicture';},get layerRect(){if(this.layerRect_!==undefined)
+return this.layerRect_;this.layerRect_={x:0,y:0,width:0,height:0};for(var i=0;i<this.pictures_.length;++i){var rect=this.pictures_[i].layerRect;this.layerRect_.x=Math.min(this.layerRect_.x,rect.x);this.layerRect_.y=Math.min(this.layerRect_.y,rect.y);this.layerRect_.width=Math.max(this.layerRect_.width,rect.x+rect.width);this.layerRect_.height=Math.max(this.layerRect_.height,rect.y+rect.height);}
+return this.layerRect_;},get guid(){return this.guid_;},getBase64SkpData:function(){throw new Error('Not available with a LayeredPicture.');},getOps:function(){var ops=[];for(var i=0;i<this.pictures_.length;++i)
+ops=ops.concat(this.pictures_[i].getOps());return ops;},getOpTimings:function(){var opTimings=this.pictures_[0].getOpTimings();for(var i=1;i<this.pictures_.length;++i){var timings=this.pictures_[i].getOpTimings();opTimings.cmd_times=opTimings.cmd_times.concat(timings.cmd_times);opTimings.total_time+=timings.total_time;}
+return opTimings;},tagOpsWithTimings:function(ops){var opTimings=new Array();for(var iteration=0;iteration<OPS_TIMING_ITERATIONS;iteration++){opTimings[iteration]=this.getOpTimings();if(!opTimings[iteration]||!opTimings[iteration].cmd_times)
+return ops;}
+for(var opIndex=0;opIndex<ops.length;opIndex++){var min=Number.MAX_VALUE;for(var i=0;i<OPS_TIMING_ITERATIONS;i++)
+min=Math.min(min,opTimings[i].cmd_times[opIndex]);ops[opIndex].cmd_time=min;}
+return ops;},rasterize:function(params,rasterCompleteCallback){this.picturesAsImageData_=[];var rasterCallback=function(pictureAsImageData){this.picturesAsImageData_.push(pictureAsImageData);if(this.picturesAsImageData_.length!==this.pictures_.length)
+return;var canvas=document.createElement('canvas');var ctx=canvas.getContext('2d');canvas.width=this.layerRect.width;canvas.height=this.layerRect.height;for(var i=0;i<this.picturesAsImageData_.length;++i){ctx.putImageData(this.picturesAsImageData_[i].imageData,this.pictures_[i].layerRect.x,this.pictures_[i].layerRect.y);}
+this.picturesAsImageData_=[];rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,ctx.getImageData(this.layerRect.x,this.layerRect.y,this.layerRect.width,this.layerRect.height)));}.bind(this);for(var i=0;i<this.pictures_.length;++i)
+this.pictures_[i].rasterize(params,rasterCallback);}};function PictureSnapshot(){ObjectSnapshot.apply(this,arguments);}
+PictureSnapshot.HasSkiaBenchmarking=function(){return tr.isExported('chrome.skiaBenchmarking');}
+PictureSnapshot.CanRasterize=function(){if(!PictureSnapshot.HasSkiaBenchmarking())
+return false;if(!window.chrome.skiaBenchmarking.rasterize)
+return false;return true;}
+PictureSnapshot.CanGetOps=function(){if(!PictureSnapshot.HasSkiaBenchmarking())
+return false;if(!window.chrome.skiaBenchmarking.getOps)
+return false;return true;}
+PictureSnapshot.CanGetOpTimings=function(){if(!PictureSnapshot.HasSkiaBenchmarking())
+return false;if(!window.chrome.skiaBenchmarking.getOpTimings)
+return false;return true;}
+PictureSnapshot.CanGetInfo=function(){if(!PictureSnapshot.HasSkiaBenchmarking())
+return false;if(!window.chrome.skiaBenchmarking.getInfo)
+return false;return true;}
+PictureSnapshot.HowToEnablePictureDebugging=function(){if(tr.isHeadless)
+return'Pictures only work in chrome';var usualReason=['For pictures to show up, you need to have Chrome running with ','--enable-skia-benchmarking. Please restart chrome with this flag ','and try again.'].join('');if(!tr.isExported('global.chrome.skiaBenchmarking'))
+return usualReason;if(!global.chrome.skiaBenchmarking.rasterize)
+return'Your chrome is old';if(!global.chrome.skiaBenchmarking.getOps)
+return'Your chrome is old: skiaBenchmarking.getOps not found';if(!global.chrome.skiaBenchmarking.getOpTimings)
+return'Your chrome is old: skiaBenchmarking.getOpTimings not found';if(!global.chrome.skiaBenchmarking.getInfo)
+return'Your chrome is old: skiaBenchmarking.getInfo not found';return'Rasterizing is on';}
+PictureSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);this.rasterResult_=undefined;},initialize:function(){if(this.args.alias)
+this.args=this.args.alias.args;if(!this.args.params.layerRect)
+throw new Error('Missing layer rect');this.layerRect_=this.args.params.layerRect;this.picture_=new Picture(this.args.skp64,this.args.params.layerRect);},set picture(picture){this.picture_=picture;},get canSave(){return this.picture_.canSave;},get layerRect(){return this.layerRect_?this.layerRect_:this.picture_.layerRect;},get guid(){return this.picture_.guid;},getBase64SkpData:function(){return this.picture_.getBase64SkpData();},getOps:function(){return this.picture_.getOps();},getOpTimings:function(){return this.picture_.getOpTimings();},tagOpsWithTimings:function(ops){return this.picture_.tagOpsWithTimings(ops);},rasterize:function(params,rasterCompleteCallback){this.picture_.rasterize(params,rasterCompleteCallback);}};ObjectSnapshot.register(PictureSnapshot,{typeNames:['cc::Picture']});return{PictureSnapshot:PictureSnapshot,Picture:Picture,LayeredPicture:LayeredPicture};});'use strict';tr.exportTo('tr.e.cc',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function DisplayItemList(skp64,layerRect){tr.e.cc.Picture.apply(this,arguments);}
+DisplayItemList.prototype={__proto__:tr.e.cc.Picture.prototype};function DisplayItemListSnapshot(){tr.e.cc.PictureSnapshot.apply(this,arguments);}
+DisplayItemListSnapshot.prototype={__proto__:tr.e.cc.PictureSnapshot.prototype,initialize:function(){tr.e.cc.PictureSnapshot.prototype.initialize.call(this);this.displayItems_=this.args.params.items;},get items(){return this.displayItems_;}};ObjectSnapshot.register(DisplayItemListSnapshot,{typeNames:['cc::DisplayItemList']});return{DisplayItemListSnapshot:DisplayItemListSnapshot,DisplayItemList:DisplayItemList};});'use strict';tr.exportTo('tr.e.cc',function(){var constants={};constants.ACTIVE_TREE=0;constants.PENDING_TREE=1;constants.HIGH_PRIORITY_BIN=0;constants.LOW_PRIORITY_BIN=1;constants.SEND_BEGIN_FRAME_EVENT='ThreadProxy::ScheduledActionSendBeginMainFrame';constants.BEGIN_MAIN_FRAME_EVENT='ThreadProxy::BeginMainFrame';return{constants:constants};});'use strict';tr.exportTo('tr.e.cc',function(){function Region(){this.rects=[];}
+Region.fromArray=function(array){if(array.length%4!=0)
+throw new Error('Array must consist be a multiple of 4 in length');var r=new Region();for(var i=0;i<array.length;i+=4){r.rects.push(tr.b.Rect.fromXYWH(array[i],array[i+1],array[i+2],array[i+3]));}
+return r;}
+Region.fromArrayOrUndefined=function(array){if(array===undefined)
+return new Region();return Region.fromArray(array);};Region.prototype={__proto__:Region.prototype,rectIntersects:function(r){for(var i=0;i<this.rects.length;i++){if(this.rects[i].intersects(r))
+return true;}
+return false;},addRect:function(r){this.rects.push(r);}};return{Region:Region};});'use strict';tr.exportTo('tr.e.cc',function(){function TileCoverageRect(rect,tile){this.geometryRect=rect;this.tile=tile;}
+return{TileCoverageRect:TileCoverageRect};});'use strict';tr.exportTo('tr.e.cc',function(){var constants=tr.e.cc.constants;var ObjectSnapshot=tr.model.ObjectSnapshot;function LayerImplSnapshot(){ObjectSnapshot.apply(this,arguments);}
+LayerImplSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);this.layerTreeImpl_=undefined;this.parentLayer=undefined;},initialize:function(){this.invalidation=new tr.e.cc.Region();this.annotatedInvalidation=new tr.e.cc.Region();this.unrecordedRegion=new tr.e.cc.Region();this.pictures=[];tr.e.cc.moveRequiredFieldsFromArgsToToplevel(this,['layerId','children','layerQuad']);tr.e.cc.moveOptionalFieldsFromArgsToToplevel(this,['maskLayer','replicaLayer','idealContentsScale','geometryContentsScale','layoutRects','usingGpuRasterization']);this.gpuMemoryUsageInBytes=this.args.gpuMemoryUsage;this.bounds=tr.b.Rect.fromXYWH(0,0,this.args.bounds.width,this.args.bounds.height);if(this.args.animationBounds){this.animationBoundsRect=tr.b.Rect.fromXYWH(this.args.animationBounds[0],this.args.animationBounds[1],this.args.animationBounds[3],this.args.animationBounds[4]);}
+for(var i=0;i<this.children.length;i++)
+this.children[i].parentLayer=this;if(this.maskLayer)
+this.maskLayer.parentLayer=this;if(this.replicaLayer)
+this.replicaLayer.parentLayer=this;if(!this.geometryContentsScale)
+this.geometryContentsScale=1.0;if(!this.idealContentsScale)
+this.idealContentsScale=1.0;this.touchEventHandlerRegion=tr.e.cc.Region.fromArrayOrUndefined(this.args.touchEventHandlerRegion);this.wheelEventHandlerRegion=tr.e.cc.Region.fromArrayOrUndefined(this.args.wheelEventHandlerRegion);this.nonFastScrollableRegion=tr.e.cc.Region.fromArrayOrUndefined(this.args.nonFastScrollableRegion);},get layerTreeImpl(){if(this.layerTreeImpl_)
+return this.layerTreeImpl_;if(this.parentLayer)
+return this.parentLayer.layerTreeImpl;return undefined;},set layerTreeImpl(layerTreeImpl){this.layerTreeImpl_=layerTreeImpl;},get activeLayer(){if(this.layerTreeImpl.whichTree==constants.ACTIVE_TREE)
+return this;var activeTree=this.layerTreeImpl.layerTreeHostImpl.activeTree;return activeTree.findLayerWithId(this.layerId);},get pendingLayer(){if(this.layerTreeImpl.whichTree==constants.PENDING_TREE)
+return this;var pendingTree=this.layerTreeImpl.layerTreeHostImpl.pendingTree;return pendingTree.findLayerWithId(this.layerId);}};function PictureLayerImplSnapshot(){LayerImplSnapshot.apply(this,arguments);}
+PictureLayerImplSnapshot.prototype={__proto__:LayerImplSnapshot.prototype,initialize:function(){LayerImplSnapshot.prototype.initialize.call(this);if(this.args.invalidation){this.invalidation=tr.e.cc.Region.fromArray(this.args.invalidation);delete this.args.invalidation;}
+if(this.args.annotatedInvalidationRects){this.annotatedInvalidation=new tr.e.cc.Region();for(var i=0;i<this.args.annotatedInvalidationRects.length;++i){var annotatedRect=this.args.annotatedInvalidationRects[i];var rect=annotatedRect.geometryRect;rect.reason=annotatedRect.reason;this.annotatedInvalidation.addRect(rect);}
+delete this.args.annotatedInvalidationRects;}
+if(this.args.unrecordedRegion){this.unrecordedRegion=tr.e.cc.Region.fromArray(this.args.unrecordedRegion);delete this.args.unrecordedRegion;}
+if(this.args.pictures){this.pictures=this.args.pictures;this.pictures.sort(function(a,b){return a.ts-b.ts;});}
+this.tileCoverageRects=[];if(this.args.coverageTiles){for(var i=0;i<this.args.coverageTiles.length;++i){var rect=this.args.coverageTiles[i].geometryRect.scale(this.idealContentsScale);var tile=this.args.coverageTiles[i].tile;this.tileCoverageRects.push(new tr.e.cc.TileCoverageRect(rect,tile));}
+delete this.args.coverageTiles;}}};ObjectSnapshot.register(PictureLayerImplSnapshot,{typeName:'cc::PictureLayerImpl'});ObjectSnapshot.register(LayerImplSnapshot,{typeNames:['cc::LayerImpl','cc::DelegatedRendererLayerImpl','cc::HeadsUpDisplayLayerImpl','cc::IOSurfaceLayerImpl','cc::NinePatchLayerImpl','cc::PictureImageLayerImpl','cc::ScrollbarLayerImpl','cc::SolidColorLayerImpl','cc::SurfaceLayerImpl','cc::TextureLayerImpl','cc::TiledLayerImpl','cc::VideoLayerImpl','cc::PaintedScrollbarLayerImpl','ClankPatchLayer','TabBorderLayer','CounterLayer']});return{LayerImplSnapshot:LayerImplSnapshot,PictureLayerImplSnapshot:PictureLayerImplSnapshot};});'use strict';tr.exportTo('tr.e.cc',function(){var constants=tr.e.cc.constants;var ObjectSnapshot=tr.model.ObjectSnapshot;function LayerTreeImplSnapshot(){ObjectSnapshot.apply(this,arguments);}
+LayerTreeImplSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);this.layerTreeHostImpl=undefined;this.whichTree=undefined;this.sourceFrameNumber=undefined;},initialize:function(){tr.e.cc.moveRequiredFieldsFromArgsToToplevel(this,['rootLayer','renderSurfaceLayerList']);if(this.args.sourceFrameNumber)
+this.sourceFrameNumber=this.args.sourceFrameNumber;this.rootLayer.layerTreeImpl=this;if(this.args.swapPromiseTraceIds&&this.args.swapPromiseTraceIds.length){this.tracedInputLatencies=[];var ownProcess=this.objectInstance.parent;var modelHelper=ownProcess.model.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);if(modelHelper)
+this._initializeTracedInputLatencies(modelHelper);}},_initializeTracedInputLatencies:function(modelHelper){var latencyEvents=modelHelper.browserHelper.getLatencyEventsInRange(modelHelper.model.bounds);latencyEvents.forEach(function(event){for(var i=0;i<this.args.swapPromiseTraceIds.length;i++){if(!event.args.data||!event.args.data.trace_id)
+continue;if(parseInt(event.args.data.trace_id)===this.args.swapPromiseTraceIds[i])
+this.tracedInputLatencies.push(event);}},this);},get hasSourceFrameBeenDrawnBefore(){if(this.whichTree==tr.e.cc.constants.PENDING_TREE)
+return false;if(this.sourceFrameNumber===undefined)
+return;var thisLTHI=this.layerTreeHostImpl;var thisLTHIIndex=thisLTHI.objectInstance.snapshots.indexOf(thisLTHI);var prevLTHIIndex=thisLTHIIndex-1;if(prevLTHIIndex<0||prevLTHIIndex>=thisLTHI.objectInstance.snapshots.length)
+return false;var prevLTHI=thisLTHI.objectInstance.snapshots[prevLTHIIndex];if(!prevLTHI.activeTree)
+return false;if(prevLTHI.activeTree.sourceFrameNumber===undefined)
+return;return prevLTHI.activeTree.sourceFrameNumber==this.sourceFrameNumber;},get otherTree(){var other=this.whichTree==constants.ACTIVE_TREE?constants.PENDING_TREE:constants.ACTIVE_TREE;return this.layerTreeHostImpl.getTree(other);},get gpuMemoryUsageInBytes(){var totalBytes=0;this.iterLayers(function(layer){if(layer.gpuMemoryUsageInBytes!==undefined)
+totalBytes+=layer.gpuMemoryUsageInBytes;});return totalBytes;},iterLayers:function(func,thisArg){var visitedLayers={};function visitLayer(layer,depth,isMask,isReplica){if(visitedLayers[layer.layerId])
+return;visitedLayers[layer.layerId]=true;func.call(thisArg,layer,depth,isMask,isReplica);if(layer.children){for(var i=0;i<layer.children.length;i++)
+visitLayer(layer.children[i],depth+1);}
+if(layer.maskLayer)
+visitLayer(layer.maskLayer,depth+1,true,false);if(layer.replicaLayer)
+visitLayer(layer.replicaLayer,depth+1,false,true);}
+visitLayer(this.rootLayer,0,false,false);},findLayerWithId:function(id){var foundLayer=undefined;function visitLayer(layer){if(layer.layerId==id)
+foundLayer=layer;}
+this.iterLayers(visitLayer);return foundLayer;}};ObjectSnapshot.register(LayerTreeImplSnapshot,{typeName:'cc::LayerTreeImpl'});return{LayerTreeImplSnapshot:LayerTreeImplSnapshot};});'use strict';tr.exportTo('tr.b',function(){function BBox2(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;};BBox2.prototype={__proto__:Object.prototype,reset:function(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;},get isEmpty(){return this.isEmpty_;},addBBox2:function(bbox2){if(bbox2.isEmpty)
+return;this.addVec2(bbox2.min_);this.addVec2(bbox2.max_);},clone:function(){var bbox=new BBox2();bbox.addBBox2(this);return bbox;},addXY:function(x,y){if(this.isEmpty_){this.max_=vec2.create();this.min_=vec2.create();vec2.set(this.max_,x,y);vec2.set(this.min_,x,y);this.isEmpty_=false;return;}
+this.max_[0]=Math.max(this.max_[0],x);this.max_[1]=Math.max(this.max_[1],y);this.min_[0]=Math.min(this.min_[0],x);this.min_[1]=Math.min(this.min_[1],y);},addVec2:function(value){if(this.isEmpty_){this.max_=vec2.create();this.min_=vec2.create();vec2.set(this.max_,value[0],value[1]);vec2.set(this.min_,value[0],value[1]);this.isEmpty_=false;return;}
+this.max_[0]=Math.max(this.max_[0],value[0]);this.max_[1]=Math.max(this.max_[1],value[1]);this.min_[0]=Math.min(this.min_[0],value[0]);this.min_[1]=Math.min(this.min_[1],value[1]);},addQuad:function(quad){this.addVec2(quad.p1);this.addVec2(quad.p2);this.addVec2(quad.p3);this.addVec2(quad.p4);},get minVec2(){if(this.isEmpty_)
+return undefined;return this.min_;},get maxVec2(){if(this.isEmpty_)
+return undefined;return this.max_;},get sizeAsVec2(){if(this.isEmpty_)
+throw new Error('Empty BBox2 has no size');var size=vec2.create();vec2.subtract(size,this.max_,this.min_);return size;},get size(){if(this.isEmpty_)
+throw new Error('Empty BBox2 has no size');return{width:this.max_[0]-this.min_[0],height:this.max_[1]-this.min_[1]};},get width(){if(this.isEmpty_)
+throw new Error('Empty BBox2 has no width');return this.max_[0]-this.min_[0];},get height(){if(this.isEmpty_)
+throw new Error('Empty BBox2 has no width');return this.max_[1]-this.min_[1];},toString:function(){if(this.isEmpty_)
+return'empty';return'min=('+this.min_[0]+','+this.min_[1]+') '+'max=('+this.max_[0]+','+this.max_[1]+')';},asRect:function(){return tr.b.Rect.fromXYWH(this.min_[0],this.min_[1],this.max_[0]-this.min_[0],this.max_[1]-this.min_[1]);}};return{BBox2:BBox2};});'use strict';tr.exportTo('tr.e.cc',function(){var constants=tr.e.cc.constants;var ObjectSnapshot=tr.model.ObjectSnapshot;var ObjectInstance=tr.model.ObjectInstance;function LayerTreeHostImplSnapshot(){ObjectSnapshot.apply(this,arguments);}
+LayerTreeHostImplSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);},initialize:function(){tr.e.cc.moveRequiredFieldsFromArgsToToplevel(this,['deviceViewportSize','activeTree']);tr.e.cc.moveOptionalFieldsFromArgsToToplevel(this,['pendingTree']);if(this.args.activeTiles!==undefined){this.activeTiles=this.args.activeTiles;delete this.args.activeTiles;}else if(this.args.tiles!==undefined){this.activeTiles=this.args.tiles;delete this.args.tiles;}
+if(!this.activeTiles)
+this.activeTiles=[];this.activeTree.layerTreeHostImpl=this;this.activeTree.whichTree=constants.ACTIVE_TREE;if(this.pendingTree){this.pendingTree.layerTreeHostImpl=this;this.pendingTree.whichTree=constants.PENDING_TREE;}},getContentsScaleNames:function(){var scales={};for(var i=0;i<this.activeTiles.length;++i){var tile=this.activeTiles[i];scales[tile.contentsScale]=tile.resolution;}
+return scales;},getTree:function(whichTree){if(whichTree==constants.ACTIVE_TREE)
+return this.activeTree;if(whichTree==constants.PENDING_TREE)
+return this.pendingTree;throw new Exception('Unknown tree type + '+whichTree);},get tilesHaveGpuMemoryUsageInfo(){if(this.tilesHaveGpuMemoryUsageInfo_!==undefined)
+return this.tilesHaveGpuMemoryUsageInfo_;for(var i=0;i<this.activeTiles.length;i++){if(this.activeTiles[i].gpuMemoryUsageInBytes===undefined)
+continue;this.tilesHaveGpuMemoryUsageInfo_=true;return true;}
+this.tilesHaveGpuMemoryUsageInfo_=false;return false;},get gpuMemoryUsageInBytes(){if(!this.tilesHaveGpuMemoryUsageInfo)
+return;var usage=0;for(var i=0;i<this.activeTiles.length;i++){var u=this.activeTiles[i].gpuMemoryUsageInBytes;if(u!==undefined)
+usage+=u;}
+return usage;},get userFriendlyName(){var frameNumber;if(!this.activeTree){frameNumber=this.objectInstance.snapshots.indexOf(this);}else{if(this.activeTree.sourceFrameNumber===undefined)
+frameNumber=this.objectInstance.snapshots.indexOf(this);else
+frameNumber=this.activeTree.sourceFrameNumber;}
+return'cc::LayerTreeHostImpl frame '+frameNumber;}};ObjectSnapshot.register(LayerTreeHostImplSnapshot,{typeName:'cc::LayerTreeHostImpl'});function LayerTreeHostImplInstance(){ObjectInstance.apply(this,arguments);this.allLayersBBox_=undefined;}
+LayerTreeHostImplInstance.prototype={__proto__:ObjectInstance.prototype,get allContentsScales(){if(this.allContentsScales_)
+return this.allContentsScales_;var scales={};for(var tileID in this.allTileHistories_){var tileHistory=this.allTileHistories_[tileID];scales[tileHistory.contentsScale]=true;}
+this.allContentsScales_=tr.b.dictionaryKeys(scales);return this.allContentsScales_;},get allLayersBBox(){if(this.allLayersBBox_)
+return this.allLayersBBox_;var bbox=new tr.b.BBox2();function handleTree(tree){tree.renderSurfaceLayerList.forEach(function(layer){bbox.addQuad(layer.layerQuad);});}
+this.snapshots.forEach(function(lthi){handleTree(lthi.activeTree);if(lthi.pendingTree)
+handleTree(lthi.pendingTree);});this.allLayersBBox_=bbox;return this.allLayersBBox_;}};ObjectInstance.register(LayerTreeHostImplInstance,{typeName:'cc::LayerTreeHostImpl'});return{LayerTreeHostImplSnapshot:LayerTreeHostImplSnapshot,LayerTreeHostImplInstance:LayerTreeHostImplInstance};});'use strict';tr.exportTo('tr.e.cc',function(){var tileTypes={highRes:'highRes',lowRes:'lowRes',extraHighRes:'extraHighRes',extraLowRes:'extraLowRes',missing:'missing',culled:'culled',solidColor:'solidColor',picture:'picture',directPicture:'directPicture',unknown:'unknown'};var tileBorder={highRes:{color:'rgba(80, 200, 200, 0.7)',width:1},lowRes:{color:'rgba(212, 83, 192, 0.7)',width:2},extraHighRes:{color:'rgba(239, 231, 20, 0.7)',width:2},extraLowRes:{color:'rgba(93, 186, 18, 0.7)',width:2},missing:{color:'rgba(255, 0, 0, 0.7)',width:1},culled:{color:'rgba(160, 100, 0, 0.8)',width:1},solidColor:{color:'rgba(128, 128, 128, 0.7)',width:1},picture:{color:'rgba(64, 64, 64, 0.7)',width:1},directPicture:{color:'rgba(127, 255, 0, 1.0)',width:1},unknown:{color:'rgba(0, 0, 0, 1.0)',width:2}};return{tileTypes:tileTypes,tileBorder:tileBorder};});'use strict';tr.exportTo('tr.e.cc',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function TileSnapshot(){ObjectSnapshot.apply(this,arguments);}
+TileSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);},initialize:function(){tr.e.cc.moveOptionalFieldsFromArgsToToplevel(this,['layerId','contentsScale','contentRect']);if(this.args.managedState){this.resolution=this.args.managedState.resolution;this.isSolidColor=this.args.managedState.isSolidColor;this.isUsingGpuMemory=this.args.managedState.isUsingGpuMemory;this.hasResource=this.args.managedState.hasResource;this.scheduledPriority=this.args.scheduledPriority;this.gpuMemoryUsageInBytes=this.args.gpuMemoryUsage;}else{this.resolution=this.args.resolution;this.isSolidColor=this.args.drawInfo.isSolidColor;this.isUsingGpuMemory=this.args.isUsingGpuMemory;this.hasResource=this.args.hasResource;this.scheduledPriority=this.args.scheduledPriority;this.gpuMemoryUsageInBytes=this.args.gpuMemoryUsage;}
+if(this.contentRect)
+this.layerRect=this.contentRect.scale(1.0/this.contentsScale);if(this.isSolidColor)
+this.type_=tr.e.cc.tileTypes.solidColor;else if(!this.hasResource)
+this.type_=tr.e.cc.tileTypes.missing;else if(this.resolution==='HIGH_RESOLUTION')
+this.type_=tr.e.cc.tileTypes.highRes;else if(this.resolution==='LOW_RESOLUTION')
+this.type_=tr.e.cc.tileTypes.lowRes;else
+this.type_=tr.e.cc.tileTypes.unknown;},getTypeForLayer:function(layer){var type=this.type_;if(type==tr.e.cc.tileTypes.unknown){if(this.contentsScale<layer.idealContentsScale)
+type=tr.e.cc.tileTypes.extraLowRes;else if(this.contentsScale>layer.idealContentsScale)
+type=tr.e.cc.tileTypes.extraHighRes;}
+return type;}};ObjectSnapshot.register(TileSnapshot,{typeName:'cc::Tile'});return{TileSnapshot:TileSnapshot};});'use strict';tr.exportTo('tr.ui.b',function(){var EventSet=tr.model.EventSet;var SelectionState=tr.model.SelectionState;function BrushingState(){this.guid_=tr.b.GUID.allocate();this.selection_=new EventSet();this.findMatches_=new EventSet();this.analysisViewRelatedEvents_=new EventSet();this.analysisLinkHoveredEvents_=new EventSet();this.appliedToModel_=undefined;this.viewSpecificBrushingStates_={};}
 BrushingState.prototype={get guid(){return this.guid_;},clone:function(){var that=new BrushingState();that.selection_=this.selection_;that.findMatches_=this.findMatches_;that.analysisViewRelatedEvents_=this.analysisViewRelatedEvents_;that.analysisLinkHoveredEvents_=this.analysisLinkHoveredEvents_;that.viewSpecificBrushingStates_=this.viewSpecificBrushingStates_;return that;},equals:function(that){if(!this.selection_.equals(that.selection_))
 return false;if(!this.findMatches_.equals(that.findMatches_))
 return false;if(!this.analysisViewRelatedEvents_.equals(that.analysisViewRelatedEvents_)){return false;}
@@ -4965,7 +5427,23 @@
 return;if(this.target_===undefined){this.activeAnimation_.didStopEarly(frameBeginTime,this.target_,false);return;}
 var oldTargetState=this.target_.cloneAnimationState();var done=this.activeAnimation_.tick(frameBeginTime,this.target_);if(done)
 this.activeAnimation_=undefined;if(this.activeAnimation_){this.tickScheduled_=true;tr.b.requestAnimationFrame(this.tickActiveAnimation_,this);}
-if(oldTargetState){var e=new tr.b.Event('didtick');e.oldTargetState=oldTargetState;this.dispatchEvent(e,false,false);}}};return{AnimationController:AnimationController};});'use strict';tr.exportTo('tr.ui.b',function(){function createSpan(opt_dictionary){var ownerDocument=document;if(opt_dictionary&&opt_dictionary.ownerDocument)
+if(oldTargetState){var e=new tr.b.Event('didtick');e.oldTargetState=oldTargetState;this.dispatchEvent(e,false,false);}}};return{AnimationController:AnimationController};});'use strict';tr.exportTo('tr.b',function(){function Settings(){return Settings;};if(tr.b.unittest&&tr.b.unittest.TestRunner){tr.b.unittest.TestRunner.addEventListener('tr-unittest-will-run',function(){if(tr.isHeadless)
+Settings.setAlternativeStorageInstance(new HeadlessStorage());else
+Settings.setAlternativeStorageInstance(global.sessionStorage);});}
+function SessionSettings(){return SessionSettings;}
+function AddStaticStorageFunctionsToClass_(input_class,storage){input_class.storage_=storage;input_class.get=function(key,opt_default,opt_namespace){key=input_class.namespace_(key,opt_namespace);var rawVal=input_class.storage_.getItem(key);if(rawVal===null||rawVal===undefined)
+return opt_default;try{return JSON.parse(rawVal).value;}catch(e){input_class.storage_.removeItem(key);return opt_default;}};input_class.set=function(key,value,opt_namespace){if(value===undefined)
+throw new Error('Settings.set: value must not be undefined');var v=JSON.stringify({value:value});input_class.storage_.setItem(input_class.namespace_(key,opt_namespace),v);};input_class.keys=function(opt_namespace){var result=[];opt_namespace=opt_namespace||'';for(var i=0;i<input_class.storage_.length;i++){var key=input_class.storage_.key(i);if(input_class.isnamespaced_(key,opt_namespace))
+result.push(input_class.unnamespace_(key,opt_namespace));}
+return result;};input_class.isnamespaced_=function(key,opt_namespace){return key.indexOf(input_class.normalize_(opt_namespace))==0;};input_class.namespace_=function(key,opt_namespace){return input_class.normalize_(opt_namespace)+key;};input_class.unnamespace_=function(key,opt_namespace){return key.replace(input_class.normalize_(opt_namespace),'');};input_class.normalize_=function(opt_namespace){return input_class.NAMESPACE+(opt_namespace?opt_namespace+'.':'');};input_class.setAlternativeStorageInstance=function(instance){input_class.storage_=instance;};input_class.getAlternativeStorageInstance=function(){if(!tr.isHeadless&&input_class.storage_===localStorage)
+return undefined;return input_class.storage_;};input_class.NAMESPACE='trace-viewer';};function HeadlessStorage(){this.length=0;this.hasItem_={};this.items_={};this.itemsAsArray_=undefined;}
+HeadlessStorage.prototype={key:function(index){return this.itemsAsArray[index];},get itemsAsArray(){if(this.itemsAsArray_!==undefined)
+return this.itemsAsArray_;var itemsAsArray=[];for(var k in this.items_)
+itemsAsArray.push(k);this.itemsAsArray_=itemsAsArray;return this.itemsAsArray_;},getItem:function(key){if(!this.hasItem_[key])
+return null;return this.items_[key];},removeItem:function(key){if(!this.hasItem_[key])
+return;var value=this.items_[key];delete this.hasItem_[key];delete this.items_[key];this.length--;this.itemsAsArray_=undefined;return value;},setItem:function(key,value){if(this.hasItem_[key]){this.items_[key]=value;return;}
+this.items_[key]=value;this.hasItem_[key]=true;this.length++;this.itemsAsArray_=undefined;return value;}};if(tr.isHeadless){AddStaticStorageFunctionsToClass_(Settings,new HeadlessStorage());AddStaticStorageFunctionsToClass_(SessionSettings,new HeadlessStorage());}else{AddStaticStorageFunctionsToClass_(Settings,localStorage);AddStaticStorageFunctionsToClass_(SessionSettings,sessionStorage);}
+return{Settings:Settings,SessionSettings:SessionSettings};});'use strict';tr.exportTo('tr.ui.b',function(){function createSpan(opt_dictionary){var ownerDocument=document;if(opt_dictionary&&opt_dictionary.ownerDocument)
 ownerDocument=opt_dictionary.ownerDocument;var spanEl=ownerDocument.createElement('span');if(opt_dictionary){if(opt_dictionary.className)
 spanEl.className=opt_dictionary.className;if(opt_dictionary.textContent)
 spanEl.textContent=opt_dictionary.textContent;if(opt_dictionary.tooltip)
@@ -5008,11 +5486,16 @@
 opt_changeCb.call();}
 buttonEl.addEventListener('change',onChange);var id='#checkbox-'+nextCheckboxId++;var spanEl=createSpan({className:'labeled-checkbox'});buttonEl.setAttribute('id',id);var labelEl=document.createElement('label');labelEl.textContent=label;labelEl.setAttribute('for',id);spanEl.appendChild(buttonEl);spanEl.appendChild(labelEl);spanEl.__defineSetter__('checked',function(opt_bool){var changed=buttonEl.checked!==(!!opt_bool);if(!changed)
 return;buttonEl.checked=!!opt_bool;onChange();});spanEl.__defineGetter__('checked',function(){return buttonEl.checked;});return spanEl;}
+function createButton(targetEl,targetElProperty,label,opt_changeCb){var buttonEl=document.createElement('input');buttonEl.type='button';function onClick(){if(opt_changeCb)
+opt_changeCb.call();}
+buttonEl.addEventListener('click',onClick);buttonEl.value=label;return buttonEl;}
+function createTextInput(targetEl,targetElProperty,settingsKey,defaultValue){var initialValue=tr.b.Settings.get(settingsKey,defaultValue);var el=document.createElement('input');el.type='text';function onChange(e){tr.b.Settings.set(settingsKey,el.value);targetEl[targetElProperty]=el.value;}
+el.addEventListener('input',onChange);el.value=initialValue;targetEl[targetElProperty]=initialValue;return el;}
 function isElementAttachedToDocument(el){var cur=el;while(cur.parentNode)
 cur=cur.parentNode;return(cur===el.ownerDocument||cur.nodeName==='#document-fragment');}
 function asHTMLOrTextNode(value,opt_ownerDocument){if(value instanceof Node)
 return value;var ownerDocument=opt_ownerDocument||document;return ownerDocument.createTextNode(value);}
-return{createSpan:createSpan,createDiv:createDiv,createScopedStyle:createScopedStyle,createSelector:createSelector,createOptionGroup:createOptionGroup,createCheckBox:createCheckBox,isElementAttachedToDocument:isElementAttachedToDocument,asHTMLOrTextNode:asHTMLOrTextNode};});'use strict';tr.exportTo('tr.ui.b',function(){var ColorScheme=tr.b.ColorScheme;var colors=ColorScheme.colors;var colorsAsStrings=ColorScheme.colorsAsStrings;var numColorsPerVariant=ColorScheme.properties.numColorsPerVariant;var SelectionState=tr.model.SelectionState;var EventPresenter={getSelectableItemColorAsString:function(item){var colorId=item.colorId+this.getColorIdOffset_(item);return colorsAsStrings[colorId];},getColorIdOffset_:function(event){return event.selectionState;},getTextColor:function(event){if(event.selectionState===SelectionState.DIMMED)
+return{createSpan:createSpan,createDiv:createDiv,createScopedStyle:createScopedStyle,createSelector:createSelector,createOptionGroup:createOptionGroup,createCheckBox:createCheckBox,createButton:createButton,createTextInput:createTextInput,isElementAttachedToDocument:isElementAttachedToDocument,asHTMLOrTextNode:asHTMLOrTextNode};});'use strict';tr.exportTo('tr.ui.b',function(){var ColorScheme=tr.b.ColorScheme;var colors=ColorScheme.colors;var colorsAsStrings=ColorScheme.colorsAsStrings;var numColorsPerVariant=ColorScheme.properties.numColorsPerVariant;var SelectionState=tr.model.SelectionState;var EventPresenter={getSelectableItemColorAsString:function(item){var colorId=item.colorId+this.getColorIdOffset_(item);return colorsAsStrings[colorId];},getColorIdOffset_:function(event){return event.selectionState;},getTextColor:function(event){if(event.selectionState===SelectionState.DIMMED)
 return'rgb(60,60,60)';return'rgb(0,0,0)';},getSliceColorId:function(slice){return slice.colorId+this.getColorIdOffset_(slice);},getSliceAlpha:function(slice,async){var alpha=1;if(async)
 alpha*=0.3;return alpha;},getInstantSliceColor:function(instant){var colorId=instant.colorId+this.getColorIdOffset_(instant);return colors[colorId].toStringWithAlphaOverride(1.0);},getObjectInstanceColor:function(instance){var colorId=instance.colorId+this.getColorIdOffset_(instance);return colors[colorId].toStringWithAlphaOverride(0.25);},getObjectSnapshotColor:function(snapshot){var colorId=snapshot.objectInstance.colorId+this.getColorIdOffset_(snapshot);return colors[colorId];},getCounterSeriesColor:function(colorId,selectionState,opt_alphaMultiplier){var event={selectionState:selectionState};var c=colors[colorId+this.getColorIdOffset_(event)];return c.toStringWithAlphaOverride(opt_alphaMultiplier!==undefined?opt_alphaMultiplier:1.0);},getBarSnapshotColor:function(snapshot,offset){var colorId=(snapshot.objectInstance.colorId+offset)%numColorsPerVariant;colorId+=this.getColorIdOffset_(snapshot);return colors[colorId].toStringWithAlphaOverride(1.0);}};return{EventPresenter:EventPresenter};});'use strict';tr.exportTo('tr.ui.b',function(){var elidedTitleCacheDict={};var elidedTitleCache=new ElidedTitleCache();function ElidedTitleCache(){this.textWidthMap={};}
 ElidedTitleCache.prototype={get:function(ctx,pixWidth,title,width,sliceDuration){var elidedDict=elidedTitleCacheDict[title];if(!elidedDict){elidedDict={};elidedTitleCacheDict[title]=elidedDict;}
@@ -5137,7 +5620,7 @@
 this.textContent=opt_textContent;},getCurrentSelection_:function(){if(typeof this.selection_==='function')
 return this.selection_();return this.selection_;},setHighlight_:function(opt_eventSet){if(this.controller_)
 this.controller_.changeAnalysisLinkHoveredEvents(opt_eventSet);},clearHighlight_:function(opt_eventSet){this.setHighlight_();},onClicked_:function(){if(!this.selection_)
-return;var event=new tr.model.RequestSelectionChangeEvent();event.selection=this.getCurrentSelection_();this.dispatchEvent(event);},onMouseEnter_:function(){this.setHighlight_(this.getCurrentSelection_());},onMouseLeave_:function(){this.clearHighlight_();}});'use strict';tr.exportTo('tr.ui.b',function(){var TableFormat={};TableFormat.SelectionMode={NONE:0,ROW:1,CELL:2};TableFormat.HighlightStyle={DEFAULT:0,NONE:1,LIGHT:2,DARK:3};return{TableFormat:TableFormat};});'use strict';(function(){var RIGHT_ARROW=String.fromCharCode(0x25b6);var UNSORTED_ARROW=String.fromCharCode(0x25BF);var ASCENDING_ARROW=String.fromCharCode(0x25B4);var DESCENDING_ARROW=String.fromCharCode(0x25BE);var BASIC_INDENTATION=8;var SelectionMode=tr.ui.b.TableFormat.SelectionMode;var HighlightStyle=tr.ui.b.TableFormat.HighlightStyle;Polymer('tr-ui-b-table',{created:function(){this.selectionMode_=SelectionMode.NONE;this.rowHighlightStyle_=HighlightStyle.DEFAULT;this.cellHighlightStyle_=HighlightStyle.DEFAULT;this.selectedTableRowInfo_=undefined;this.selectedColumnIndex_=undefined;this.tableColumns_=[];this.tableRows_=[];this.tableRowsInfo_=new WeakMap();this.tableFooterRows_=[];this.tableFooterRowsInfo_=new WeakMap();this.sortColumnIndex_=undefined;this.sortDescending_=false;this.columnsWithExpandButtons_=[];this.headerCells_=[];this.showHeader_=true;this.emptyValue_=undefined;this.subRowsPropertyName_='subRows';this.customizeTableRowCallback_=undefined;},ready:function(){this.$.body.addEventListener('keydown',this.onKeyDown_.bind(this),true);},clear:function(){this.selectionMode_=SelectionMode.NONE;this.rowHighlightStyle_=HighlightStyle.DEFAULT;this.cellHighlightStyle_=HighlightStyle.DEFAULT;this.selectedTableRowInfo_=undefined;this.selectedColumnIndex_=undefined;this.textContent='';this.tableColumns_=[];this.tableRows_=[];this.tableRowsInfo_=new WeakMap();this.tableFooterRows_=[];this.tableFooterRowsInfo_=new WeakMap();this.sortColumnIndex_=undefined;this.sortDescending_=false;this.columnsWithExpandButtons_=[];this.headerCells_=[];this.subRowsPropertyName_='subRows';},get showHeader(){return this.showHeader_;},set showHeader(showHeader){this.showHeader_=showHeader;this.scheduleRebuildHeaders_();},set subRowsPropertyName(name){this.subRowsPropertyName_=name;},set customizeTableRowCallback(cb){this.customizeTableRowCallback_=cb;this.scheduleRebuildBody_();},get emptyValue(){return this.emptyValue_;},set emptyValue(emptyValue){var previousEmptyValue=this.emptyValue_;this.emptyValue_=emptyValue;if(this.tableRows_.length===0&&emptyValue!==previousEmptyValue)
+return;var event=new tr.model.RequestSelectionChangeEvent();event.selection=this.getCurrentSelection_();this.dispatchEvent(event);},onMouseEnter_:function(){this.setHighlight_(this.getCurrentSelection_());},onMouseLeave_:function(){this.clearHighlight_();}});'use strict';tr.exportTo('tr.ui.b',function(){var TableFormat={};TableFormat.SelectionMode={NONE:0,ROW:1,CELL:2};TableFormat.HighlightStyle={DEFAULT:0,NONE:1,LIGHT:2,DARK:3};return{TableFormat:TableFormat};});'use strict';(function(){var RIGHT_ARROW=String.fromCharCode(0x25b6);var UNSORTED_ARROW=String.fromCharCode(0x25BF);var ASCENDING_ARROW=String.fromCharCode(0x25B4);var DESCENDING_ARROW=String.fromCharCode(0x25BE);var BASIC_INDENTATION=8;var SelectionMode=tr.ui.b.TableFormat.SelectionMode;var HighlightStyle=tr.ui.b.TableFormat.HighlightStyle;Polymer('tr-ui-b-table',{created:function(){this.selectionMode_=SelectionMode.NONE;this.rowHighlightStyle_=HighlightStyle.DEFAULT;this.cellHighlightStyle_=HighlightStyle.DEFAULT;this.selectedTableRowInfo_=undefined;this.selectedColumnIndex_=undefined;this.tableColumns_=[];this.tableRows_=[];this.tableRowsInfo_=new WeakMap();this.tableFooterRows_=[];this.tableFooterRowsInfo_=new WeakMap();this.sortColumnIndex_=undefined;this.sortDescending_=false;this.columnsWithExpandButtons_=[];this.headerCells_=[];this.showHeader_=true;this.emptyValue_=undefined;this.subRowsPropertyName_='subRows';this.customizeTableRowCallback_=undefined;},ready:function(){this.$.body.addEventListener('keydown',this.onKeyDown_.bind(this),true);},clear:function(){this.selectionMode_=SelectionMode.NONE;this.rowHighlightStyle_=HighlightStyle.DEFAULT;this.cellHighlightStyle_=HighlightStyle.DEFAULT;this.selectedTableRowInfo_=undefined;this.selectedColumnIndex_=undefined;this.textContent='';this.tableColumns_=[];this.tableRows_=[];this.tableRowsInfo_=new WeakMap();this.tableFooterRows_=[];this.tableFooterRowsInfo_=new WeakMap();this.sortColumnIndex_=undefined;this.sortDescending_=false;this.columnsWithExpandButtons_=[];this.headerCells_=[];this.subRowsPropertyName_='subRows';this.defaultExpansionStateCallback_=undefined;},get showHeader(){return this.showHeader_;},set showHeader(showHeader){this.showHeader_=showHeader;this.scheduleRebuildHeaders_();},set subRowsPropertyName(name){this.subRowsPropertyName_=name;},set defaultExpansionStateCallback(cb){this.defaultExpansionStateCallback_=cb;this.scheduleRebuildBody_();},set customizeTableRowCallback(cb){this.customizeTableRowCallback_=cb;this.scheduleRebuildBody_();},get emptyValue(){return this.emptyValue_;},set emptyValue(emptyValue){var previousEmptyValue=this.emptyValue_;this.emptyValue_=emptyValue;if(this.tableRows_.length===0&&emptyValue!==previousEmptyValue)
 this.scheduleRebuildBody_();},set tableColumns(columns){var columnsWithExpandButtons=[];for(var i=0;i<columns.length;i++){if(columns[i].showExpandButtons)
 columnsWithExpandButtons.push(i);}
 if(columnsWithExpandButtons.length===0){columnsWithExpandButtons=[0];}
@@ -5150,7 +5633,7 @@
 throw new Error('Column '+number+' does not have a comparator.');this.sortColumnIndex_=number;this.updateHeaderArrows_();this.scheduleRebuildBody_();this.dispatchSortingChangedEvent_();},get sortColumnIndex(){return this.sortColumnIndex_;},set sortDescending(value){var newValue=!!value;if(newValue!==this.sortDescending_){this.sortDescending_=newValue;this.updateHeaderArrows_();this.scheduleRebuildBody_();this.dispatchSortingChangedEvent_();}},get sortDescending(){return this.sortDescending_;},updateHeaderArrows_:function(){for(var i=0;i<this.headerCells_.length;i++){if(!this.tableColumns_[i].cmp){this.headerCells_[i].sideContent='';continue;}
 if(i!==this.sortColumnIndex_){this.headerCells_[i].sideContent=UNSORTED_ARROW;continue;}
 this.headerCells_[i].sideContent=this.sortDescending_?DESCENDING_ARROW:ASCENDING_ARROW;}},sortRows_:function(rows){rows.sort(function(rowA,rowB){if(this.sortDescending_)
-return this.tableColumns_[this.sortColumnIndex_].cmp(rowB.userRow,rowA.userRow);return this.tableColumns_[this.sortColumnIndex_].cmp(rowA.userRow,rowB.userRow);}.bind(this));for(var i=0;i<rows.length;i++){if(rows[i].isExpanded)
+return this.tableColumns_[this.sortColumnIndex_].cmp(rowB.userRow,rowA.userRow);return this.tableColumns_[this.sortColumnIndex_].cmp(rowA.userRow,rowB.userRow);}.bind(this));for(var i=0;i<rows.length;i++){if(this.getExpandedForUserRow_(rows[i]))
 this.sortRows_(rows[i][this.subRowsPropertyName_]);}},generateHeaderColumns_:function(){this.headerCells_=[];this.$.head.textContent='';if(!this.showHeader_)
 return;var tr=this.appendNewElement_(this.$.head,'tr');for(var i=0;i<this.tableColumns_.length;i++){var td=this.appendNewElement_(tr,'td');var headerCell=document.createElement('tr-ui-b-table-header-cell');if(this.showHeader)
 headerCell.cellTitle=this.tableColumns_[i].title;else
@@ -5171,8 +5654,8 @@
 for(var i=0;i<userRows.length;i++){var userRow=userRows[i];var rowInfo=this.getOrCreateRowInfoFor_(rowInfoMap,userRow,parentRowInfo);var htmlNode=this.getHTMLNodeForRowInfo_(tableSection,rowInfo,rowInfoMap,indentation);if(lastAddedRow===undefined){tableSection.insertBefore(htmlNode,tableSection.firstChild);}else{var nextSiblingOfLastAdded=lastAddedRow.nextSibling;tableSection.insertBefore(htmlNode,nextSiblingOfLastAdded);}
 this.updateTabIndexForTableRowNode_(htmlNode);lastAddedRow=htmlNode;if(!rowInfo.isExpanded)
 continue;lastAddedRow=this.generateTableRowNodes_(tableSection,userRow[this.subRowsPropertyName_],rowInfoMap,indentation+1,lastAddedRow,rowInfo);}
-return lastAddedRow;},getOrCreateRowInfoFor_:function(rowInfoMap,userRow,parentRowInfo){if(rowInfoMap.has(userRow))
-return rowInfoMap.get(userRow);var rowInfo={userRow:userRow,htmlNode:undefined,isExpanded:userRow.isExpanded||false,parentRowInfo:parentRowInfo};rowInfoMap.set(userRow,rowInfo);return rowInfo;},customizeTableRow_:function(userRow,trElement){if(!this.customizeTableRowCallback_)
+return lastAddedRow;},getOrCreateRowInfoFor_:function(rowInfoMap,userRow,parentRowInfo){var rowInfo=undefined;if(rowInfoMap.has(userRow)){rowInfo=rowInfoMap.get(userRow);}else{rowInfo={userRow:userRow,htmlNode:undefined,parentRowInfo:parentRowInfo};rowInfoMap.set(userRow,rowInfo);}
+rowInfo.isExpanded=this.getExpandedForUserRow_(userRow);return rowInfo;},customizeTableRow_:function(userRow,trElement){if(!this.customizeTableRowCallback_)
 return;this.customizeTableRowCallback_(userRow,trElement);},getHTMLNodeForRowInfo_:function(tableSection,rowInfo,rowInfoMap,indentation){if(rowInfo.htmlNode){this.customizeTableRow_(rowInfo.userRow,rowInfo.htmlNode);return rowInfo.htmlNode;}
 var INDENT_SPACE=indentation*16;var INDENT_SPACE_NO_BUTTON=indentation*16+BASIC_INDENTATION;var trElement=this.ownerDocument.createElement('tr');rowInfo.htmlNode=trElement;rowInfo.indentation=indentation;trElement.rowInfo=rowInfo;this.customizeTableRow_(rowInfo.userRow,trElement);for(var i=0;i<this.tableColumns_.length;){var td=this.appendNewElement_(trElement,'td');td.columnIndex=i;var column=this.tableColumns_[i];var value=column.value(rowInfo.userRow);var colSpan=column.colSpan?column.colSpan:1;td.style.colSpan=colSpan;if(column.textAlign){td.style.textAlign=column.textAlign;}
 if(this.doesColumnIndexSupportSelection(i))
@@ -5180,15 +5663,15 @@
 expandButton.classList.add('button-expanded');}else{td.style.paddingLeft=INDENT_SPACE_NO_BUTTON+'px';}}
 if(value!==undefined)
 td.appendChild(tr.ui.b.asHTMLOrTextNode(value,this.ownerDocument));i+=colSpan;}
-var needsClickListener=false;if(this.columnsWithExpandButtons_.length)
-needsClickListener=true;else if(tableSection==this.$.body)
-needsClickListener=true;if(needsClickListener){trElement.addEventListener('click',function(e){e.stopPropagation();if(e.target.tagName=='EXPAND-BUTTON'){this.setExpandedForUserRow_(tableSection,rowInfoMap,rowInfo.userRow,!rowInfo.isExpanded);return;}
+var isSelectable=tableSection===this.$.body;var isExpandable=rowInfo.userRow[this.subRowsPropertyName_]&&rowInfo.userRow[this.subRowsPropertyName_].length;if(isSelectable||isExpandable){trElement.addEventListener('click',function(e){e.stopPropagation();if(e.target.tagName=='EXPAND-BUTTON'){this.setExpandedForUserRow_(tableSection,rowInfoMap,rowInfo.userRow,!rowInfo.isExpanded);return;}
 function getTD(cur){if(cur===trElement)
 throw new Error('woah');if(cur.parentElement===trElement)
 return cur;return getTD(cur.parentElement);}
-if(this.selectionMode_!==SelectionMode.NONE){var isAlreadySelected=false;var tdThatWasClicked=getTD(e.target);switch(this.selectionMode_){case SelectionMode.ROW:isAlreadySelected=this.selectedTableRowInfo_===rowInfo;break;case SelectionMode.CELL:isAlreadySelected=this.selectedTableRowInfo_===rowInfo;isAlreadySelected&=(this.selectedColumnIndex_===tdThatWasClicked.columnIndex);break;default:throw new Error('Invalid selection mode '+
+if(isSelectable&&this.selectionMode_!==SelectionMode.NONE){var shouldSelect=false;var columnIndex=getTD(e.target).columnIndex;switch(this.selectionMode_){case SelectionMode.ROW:shouldSelect=this.selectedTableRowInfo_!==rowInfo;break;case SelectionMode.CELL:if(this.doesColumnIndexSupportSelection(columnIndex)){shouldSelect=this.selectedTableRowInfo_!==rowInfo||this.selectedColumnIndex_!==columnIndex;}
+break;default:throw new Error('Invalid selection mode '+
 this.selectionMode_);}
-if(isAlreadySelected){if(rowInfo.userRow[this.subRowsPropertyName_]&&rowInfo.userRow[this.subRowsPropertyName_].length){this.setExpandedForUserRow_(tableSection,rowInfoMap,rowInfo.userRow,!rowInfo.isExpanded);}}else{this.didTableRowInfoGetClicked_(rowInfo,tdThatWasClicked.columnIndex);}}else{if(rowInfo.userRow[this.subRowsPropertyName_]&&rowInfo.userRow[this.subRowsPropertyName_].length){this.setExpandedForUserRow_(tableSection,rowInfoMap,rowInfo.userRow,!rowInfo.isExpanded);}}}.bind(this));}
+if(shouldSelect){this.didTableRowInfoGetClicked_(rowInfo,columnIndex);return;}}
+if(isExpandable){this.setExpandedForUserRow_(tableSection,rowInfoMap,rowInfo.userRow,!rowInfo.isExpanded);}}.bind(this));}
 return rowInfo.htmlNode;},removeSubNodes_:function(tableSection,rowInfo,rowInfoMap){if(rowInfo.userRow[this.subRowsPropertyName_]===undefined)
 return;for(var i=0;i<rowInfo.userRow[this.subRowsPropertyName_].length;i++){var subRow=rowInfo.userRow[this.subRowsPropertyName_][i];var subRowInfo=rowInfoMap.get(subRow);if(!subRowInfo)
 continue;var subNode=subRowInfo.htmlNode;if(subNode&&subNode.parentNode===tableSection){tableSection.removeChild(subNode);this.removeSubNodes_(tableSection,subRowInfo,rowInfoMap);}}},scheduleRebuildHeaders_:function(){this.headerDirty_=true;this.scheduleRebuild_();},scheduleRebuildBody_:function(){this.bodyDirty_=true;this.scheduleRebuild_();},scheduleRebuildFooter_:function(){this.footerDirty_=true;this.scheduleRebuild_();},scheduleRebuild_:function(){if(this.rebuildPending_)
@@ -5198,7 +5681,13 @@
 if(wasBodyOrHeaderDirty)
 this.applySizes_();if(this.footerDirty_){this.$.foot.textContent='';this.generateTableRowNodes_(this.$.foot,this.tableFooterRows_,this.tableFooterRowsInfo_,0,undefined,undefined);if(this.tableFooterRowsInfo_.length){this.$.body.classList.add('has-footer');}else{this.$.body.classList.remove('has-footer');}
 this.footerDirty_=false;}},appendNewElement_:function(parent,tagName){var element=parent.ownerDocument.createElement(tagName);parent.appendChild(element);return element;},getExpandedForTableRow:function(userRow){this.rebuildIfNeeded_();var rowInfo=this.tableRowsInfo_.get(userRow);if(rowInfo===undefined)
-throw new Error('Row has not been seen, must expand its parents');return rowInfo.isExpanded;},setExpandedForTableRow:function(userRow,expanded){this.rebuildIfNeeded_();var rowInfo=this.tableRowsInfo_.get(userRow);if(rowInfo===undefined)
+throw new Error('Row has not been seen, must expand its parents');return rowInfo.isExpanded;},getExpandedForUserRow_:function(userRow){if(userRow[this.subRowsPropertyName_]===undefined)
+return false;if(userRow[this.subRowsPropertyName_].length===0)
+return false;if(userRow.isExpanded)
+return true;if(userRow.isExpanded===false)
+return false;if(this.defaultExpansionStateCallback_===undefined)
+return false;var parentUserRow=undefined;var rowInfo=this.tableRowsInfo_.get(userRow);if(rowInfo&&rowInfo.parentRowInfo)
+parentUserRow=rowInfo.parentRowInfo.userRow;return this.defaultExpansionStateCallback_(userRow,parentUserRow);},setExpandedForTableRow:function(userRow,expanded){this.rebuildIfNeeded_();var rowInfo=this.tableRowsInfo_.get(userRow);if(rowInfo===undefined)
 throw new Error('Row has not been seen, must expand its parents');return this.setExpandedForUserRow_(this.$.body,this.tableRowsInfo_,userRow,expanded);},setExpandedForUserRow_:function(tableSection,rowInfoMap,userRow,expanded){this.rebuildIfNeeded_();var rowInfo=rowInfoMap.get(userRow);if(rowInfo===undefined)
 throw new Error('Row has not been seen, must expand its parents');rowInfo.isExpanded=!!expanded;if(rowInfo.htmlNode===undefined)
 return;if(rowInfo.htmlNode.parentElement!==tableSection)
@@ -5218,9 +5707,9 @@
 this.removeSelectedState_();var curRowInfo=this.selectedTableRowInfo_;while(curRowInfo&&!isVisible(curRowInfo))
 curRowInfo=curRowInfo.parentRowInfo;this.selectedTableRowInfo_=curRowInfo;if(this.selectedTableRowInfo_)
 this.updateSelectedState_();},didTableRowInfoGetClicked_:function(rowInfo,columnIndex){switch(this.selectionMode_){case SelectionMode.NONE:return;case SelectionMode.CELL:if(!this.doesColumnIndexSupportSelection(columnIndex))
-return;case SelectionMode.ROW:if(this.selectedTableRowInfo_!==rowInfo)
-this.selectedTableRow=rowInfo.userRow;if(this.selectedColumnIndex!==columnIndex)
-this.selectedColumnIndex=columnIndex;}},get selectedTableRow(){if(!this.selectedTableRowInfo_)
+return;if(this.selectedColumnIndex!==columnIndex)
+this.selectedColumnIndex=columnIndex;case SelectionMode.ROW:if(this.selectedTableRowInfo_!==rowInfo)
+this.selectedTableRow=rowInfo.userRow;}},get selectedTableRow(){if(!this.selectedTableRowInfo_)
 return undefined;return this.selectedTableRowInfo_.userRow;},set selectedTableRow(userRow){this.rebuildIfNeeded_();if(this.selectionMode_===SelectionMode.NONE)
 throw new Error('Selection is off.');var rowInfo;if(userRow===undefined){rowInfo=undefined;}else{rowInfo=this.tableRowsInfo_.get(userRow);if(!rowInfo)
 throw new Error('Row has not been seen, must expand its parents.');}
@@ -5250,7 +5739,7 @@
 throw new Error('Selection is not supported on this column');var e=this.prepareToChangeSelection_();this.selectedColumnIndex_=selectedColumnIndex;if(this.selectedColumnIndex_===undefined)
 this.selectedTableRowInfo_=undefined;this.updateSelectedState_();this.dispatchEvent(e);},onKeyDown_:function(e){if(this.selectionMode_===SelectionMode.NONE)
 return;if(this.selectedTableRowInfo_===undefined)
-return;var code_to_command_names={37:'ARROW_LEFT',38:'ARROW_UP',39:'ARROW_RIGHT',40:'ARROW_DOWN'};var cmdName=code_to_command_names[e.keyCode];if(cmdName===undefined)
+return;var code_to_command_names={13:'ENTER',37:'ARROW_LEFT',38:'ARROW_UP',39:'ARROW_RIGHT',40:'ARROW_DOWN'};var cmdName=code_to_command_names[e.keyCode];if(cmdName===undefined)
 return;e.stopPropagation();e.preventDefault();this.performKeyCommand_(cmdName);},performKeyCommand_:function(cmdName){this.rebuildIfNeeded_();var rowInfo=this.selectedTableRowInfo_;var htmlNode=rowInfo.htmlNode;if(cmdName==='ARROW_UP'){var prev=htmlNode.previousElementSibling;if(prev){tr.ui.b.scrollIntoViewIfNeeded(prev);this.selectedTableRow=prev.rowInfo.userRow;this.focusSelected_();return;}
 return;}
 if(cmdName==='ARROW_DOWN'){var next=htmlNode.nextElementSibling;if(next){tr.ui.b.scrollIntoViewIfNeeded(next);this.selectedTableRow=next.rowInfo.userRow;this.focusSelected_();return;}
@@ -5266,36 +5755,48 @@
 return;case SelectionMode.CELL:var newIndex=this.selectedColumnIndex_-1;if(newIndex<0)
 return;if(!this.doesColumnIndexSupportSelection(newIndex))
 return;this.selectedColumnIndex=newIndex;this.focusSelected_();return;default:throw new Error('Invalid selection mode '+this.selectionMode_);}}
+if(cmdName==='ENTER'){if(rowInfo.userRow[this.subRowsPropertyName_]===undefined)
+return;if(rowInfo.userRow[this.subRowsPropertyName_].length===0)
+return;this.setExpandedForTableRow(rowInfo.userRow,!rowInfo.isExpanded);this.focusSelected_();return;}
 throw new Error('Unrecognized command '+cmdName);},focusSelected_:function(){if(!this.selectedTableRowInfo_)
 return;var node=this.getSelectableNodeGivenTableRowNode_(this.selectedTableRowInfo_.htmlNode);node.focus();},dispatchSortingChangedEvent_:function(){var e=new tr.b.Event('sort-column-changed');e.sortColumnIndex=this.sortColumnIndex_;e.sortDescending=this.sortDescending_;this.dispatchEvent(e);}});})();'use strict';Polymer('tr-ui-b-table-header-cell',{created:function(){this.tapCallback_=undefined;this.cellTitle_='';},set cellTitle(value){this.cellTitle_=value;var titleNode=tr.ui.b.asHTMLOrTextNode(this.cellTitle_,this.ownerDocument);this.$.title.innerText='';this.$.title.appendChild(titleNode);},get cellTitle(){return this.cellTitle_;},clearSideContent:function(){this.$.side.textContent='';},set sideContent(content){this.$.side.textContent=content;},get sideContent(){return this.$.side.textContent;},set tapCallback(callback){this.style.cursor='pointer';this.tapCallback_=callback;},get tapCallback(){return this.tapCallback_;},onTap_:function(){if(this.tapCallback_)
-this.tapCallback_();}});'use strict';tr.exportTo('tr.ui.b',function(){Object.observe(Polymer.elements,clearPolymerElementCaches);var elementsByName=undefined;var elementsThatExtend=undefined;var elementSubclasses=undefined;function clearPolymerElementCaches(){elementsByName={};elementsThatExtend=undefined;elementSubclasses={};}
-function buildElementMapsIfNeeded(){if(elementsThatExtend!==undefined&&elementsByName!==undefined)
-return;elementsByName={};elementsThatExtend={};Polymer.elements.forEach(function(element){if(elementsByName[element.name])
-throw new Error('Something is strange: dupe polymer element names');elementsByName[element.name]=element;if(element.extends){if(elementsThatExtend[element.extends]===undefined)
-elementsThatExtend[element.extends]=[];elementsThatExtend[element.extends].push(element.name);}});}
-function getPolymerElementNamed(tagName){buildElementMapsIfNeeded();return elementsByName[tagName];}
+this.tapCallback_();}});'use strict';tr.exportTo('tr.b',function(){function _iterateElementDeeplyImpl(element,cb,thisArg,includeElement){if(includeElement){if(cb.call(thisArg,element))
+return true;}
+if(element.shadowRoot){if(_iterateElementDeeplyImpl(element.shadowRoot,cb,thisArg,false))
+return true;}
+for(var i=0;i<element.children.length;i++){if(_iterateElementDeeplyImpl(element.children[i],cb,thisArg,true))
+return true;}}
+function iterateElementDeeply(element,cb,thisArg){_iterateElementDeeplyImpl(element,cb,thisArg,false);}
+function findDeepElementMatchingPredicate(element,predicate){var foundElement=undefined;function matches(element){var match=predicate(element);if(!match)
+return false;foundElement=element;return true;}
+iterateElementDeeply(element,matches);return foundElement;}
+function findDeepElementsMatchingPredicate(element,predicate){var foundElements=[];function matches(element){var match=predicate(element);if(match){foundElements.push(element);}
+return false;}
+iterateElementDeeply(element,matches);return foundElements;}
+function findDeepElementMatching(element,selector){return findDeepElementMatchingPredicate(element,function(element){return element.matches(selector);});}
+function findDeepElementsMatching(element,selector){return findDeepElementsMatchingPredicate(element,function(element){return element.matches(selector);});}
+function findDeepElementWithTextContent(element,re){return findDeepElementMatchingPredicate(element,function(element){if(element.children.length!==0)
+return false;return re.test(element.textContent);});}
+return{iterateElementDeeply:iterateElementDeeply,findDeepElementMatching:findDeepElementMatching,findDeepElementsMatching:findDeepElementsMatching,findDeepElementMatchingPredicate:findDeepElementMatchingPredicate,findDeepElementsMatchingPredicate:findDeepElementsMatchingPredicate,findDeepElementWithTextContent:findDeepElementWithTextContent};});'use strict';tr.exportTo('tr.ui.b',function(){function getPolymerElementNamed(tagName){for(var i=0;i<Polymer.elements.length;i++){if(Polymer.elements[i].name===tagName)
+return Polymer.elements[i];}}
 function getPolymerElementsThatSubclass(tagName){if(Polymer.waitingFor().length){throw new Error('There are unresolved polymer elements. '+'Wait until Polymer.whenReady');}
-buildElementMapsIfNeeded();var element=getPolymerElementNamed(tagName);if(!element)
-throw new Error(tagName+' is not a polymer element');if(elementSubclasses===undefined)
-elementSubclasses={};if(elementSubclasses[tagName]===undefined){var immediateSubElements=elementsThatExtend[element.name];var allSubElements=[];if(immediateSubElements!==undefined&&immediateSubElements.length){immediateSubElements.forEach(function(subElement){allSubElements.push(subElement);allSubElements.push.apply(allSubElements,getPolymerElementsThatSubclass(subElement));});}
-elementSubclasses[tagName]=allSubElements;}
-return elementSubclasses[tagName];}
-return{getPolymerElementNamed:getPolymerElementNamed,getPolymerElementsThatSubclass:getPolymerElementsThatSubclass};});'use strict';tr.exportTo('tr.ui.units',function(){function createScalarSpan(value,opt_config){if(value===undefined)
-return'';var config=opt_config||{};var ownerDocument=config.ownerDocument||document;var span=ownerDocument.createElement('tr-ui-u-scalar-span');span.value=value;return span;}
-tr.b.u.Units.addEventListener('display-mode-changed',function(e){var subclassNames=tr.ui.b.getPolymerElementsThatSubclass('tr-ui-u-scalar-span');var isSubclass={};subclassNames.forEach(function(n){isSubclass[n.toUpperCase()]=true;});var m=tr.b.findDeepElementsMatchingPredicate(document.body,function(el){return isSubclass[el.tagName];});m.forEach(function(el){el.updateContent_();});});return{createScalarSpan:createScalarSpan};});'use strict';Polymer('tr-ui-u-scalar-span',{ready:function(){this.value_=undefined;this.unit_=undefined;this.warning_=undefined;this.percentage_=undefined;this.isDelta_=false;},set contentTextDecoration(deco){this.$.content.style.textDecoration=deco;},get value(){return this.value_;},set value(value){if(value instanceof tr.b.u.Scalar){this.value_=value.value;this.unit_=value.unit;}else{this.value_=value;}
+var baseElement;var elementNamesThatExtend={};Polymer.elements.forEach(function(element){if(element.name===tagName)
+baseElement=element;if(element.extends){if(elementNamesThatExtend[element.extends]===undefined)
+elementNamesThatExtend[element.extends]=[];elementNamesThatExtend[element.extends].push(element.name);}});if(!baseElement)
+throw new Error(tagName+' is not a polymer element');var allFoundSubElementNames=[baseElement.name];for(var i=0;i<allFoundSubElementNames.length;i++){var elementName=allFoundSubElementNames[i];allFoundSubElementNames.push.apply(allFoundSubElementNames,elementNamesThatExtend[elementName]);}
+allFoundSubElementNames.shift();return allFoundSubElementNames;}
+return{getPolymerElementNamed:getPolymerElementNamed,getPolymerElementsThatSubclass:getPolymerElementsThatSubclass};});'use strict';tr.exportTo('tr.v.ui',function(){function createScalarSpan(value,opt_config){if(value===undefined)
+return'';var config=opt_config||{};var ownerDocument=config.ownerDocument||document;var span=ownerDocument.createElement('tr-v-ui-scalar-span');var numericValue;if(value instanceof tr.v.ScalarNumeric){span.value=value;numericValue=value.value;}else{var unit=config.unit;if(unit===undefined){throw new Error('Unit must be provided in config when value is a number');}
+span.setValueAndUnit(value,unit);numericValue=value;}
+if(config.total)
+span.percentage=numericValue/config.total;if(config.rightAlign)
+span.rightAlign=true;return span;}
+tr.v.Unit.addEventListener('display-mode-changed',function(e){var scalarSpanTagName='tr-v-ui-scalar-span';var subclassNames=tr.ui.b.getPolymerElementsThatSubclass(scalarSpanTagName);subclassNames.push(scalarSpanTagName);var isSubclass={};subclassNames.forEach(function(n){isSubclass[n.toUpperCase()]=true;});var m=tr.b.findDeepElementsMatchingPredicate(document.body,function(el){return isSubclass[el.tagName];});m.forEach(function(el){el.updateContent_();});});return{createScalarSpan:createScalarSpan};});'use strict';Polymer('tr-v-ui-scalar-span',{ready:function(){this.value_=undefined;this.unit_=undefined;this.warning_=undefined;this.percentage_=undefined;},set contentTextDecoration(deco){this.$.content.style.textDecoration=deco;},get value(){return this.value_;},set value(value){if(value instanceof tr.v.ScalarNumeric){this.value_=value.value;this.unit_=value.unit;}else{this.value_=value;}
 this.updateContent_();},get unit(){return this.unit_;},set unit(unit){this.unit_=unit;this.updateContent_();},setValueAndUnit:function(value,unit){this.value_=value;this.unit_=unit;this.updateContent_();},get percentage(){return this.percentage_;},set percentage(percentage){this.percentage_=percentage;this.updateSparkline_();},get rightAlign(){return this.$.content.classList.contains('right-align');},set rightAlign(rightAlign){if(rightAlign)
 this.$.content.classList.add('right-align');else
-this.$.content.classList.remove('right-align');},get isDelta(){return this.isDelta_;},set isDelta(isDelta){this.isDelta_=isDelta;this.updateContent_();},updateSparkline_:function(){if(this.percentage_===undefined){this.$.sparkline.style.display='none';this.$.sparkline.style.width='0';}else{this.$.sparkline.style.display='block';this.$.sparkline.style.width=(this.percentage_*100)+'%';}},updateContent_:function(){if(this.unit_===undefined){this.$.content.textContent='';return;}
-var content=this.unit_.format(this.value);if(this.isDelta_){if(this.value>0){content='+'+content;}else if(this.value===0){var PLUS_MINUS_SIGN=String.fromCharCode(177);content=PLUS_MINUS_SIGN+content;}}
-this.$.content.textContent=content;},get warning(){return this.warning_;},set warning(warning){this.warning_=warning;var warningEl=this.$.warning;if(this.warning_){warningEl.title=warning;warningEl.style.display='';}else{warningEl.title='';warningEl.style.display='none';}}});'use strict';tr.exportTo('tr.ui.units',function(){function createTimeDurationSpan(duration,opt_config){if(duration===undefined)
-return'';var config=opt_config||{};var ownerDocument=config.ownerDocument||document;var span=ownerDocument.createElement('tr-ui-u-time-duration-span');span.setValueAndUnit(duration,tr.b.u.Units.timeDurationInMs);if(config.total)
-span.percentage=duration/config.total;span.duration=duration;if(config.rightAlign)
-span.rightAlign=true;return span;}
-return{createTimeDurationSpan:createTimeDurationSpan};});'use strict';Polymer('tr-ui-u-time-duration-span',{get duration(){return this.value;},set duration(duration){if(duration instanceof tr.b.u.TimeDuration){this.value=duration;return;}
-this.setValueAndUnit(duration,tr.b.u.Units.timeDurationInMs);}});'use strict';tr.exportTo('tr.ui.units',function(){function createTimeStampSpan(timestamp,opt_config){if(timestamp===undefined)
-return'';var config=opt_config||{};var ownerDocument=config.ownerDocument||document;var span=ownerDocument.createElement('tr-ui-u-time-stamp-span');span.timestamp=timestamp;return span;}
-return{createTimeStampSpan:createTimeStampSpan};});'use strict';Polymer('tr-ui-u-time-stamp-span',{get timestamp(){return this.value;},set timestamp(timestamp){if(timestamp instanceof tr.b.u.TimeStamp){this.value=timestamp;return;}
-this.setValueAndUnit(timestamp,tr.b.u.Units.timeStampInMs);}});'use strict';function isTable(object){if(!(object instanceof Array)||(object.length<2))return false;for(var colName in object[0]){if(typeof colName!=='string')return false;}
+this.$.content.classList.remove('right-align');},updateSparkline_:function(){if(this.percentage_===undefined){this.$.sparkline.style.display='none';this.$.sparkline.style.width='0';}else{this.$.sparkline.style.display='block';this.$.sparkline.style.width=(this.percentage_*100)+'%';}},updateContent_:function(){if(this.unit_===undefined){this.$.content.textContent='';this.$.content.style.color='';return;}
+this.$.content.textContent=this.unit_.format(this.value);var BIGGER_IS_BETTER=tr.v.ImprovementDirection.BIGGER_IS_BETTER;var SMALLER_IS_BETTER=tr.v.ImprovementDirection.SMALLER_IS_BETTER;var color='';if(this.unit_.isDelta){var improvementDirection=this.unit_.improvementDirection;if(this.value>0){switch(improvementDirection){case BIGGER_IS_BETTER:color='green';break;case SMALLER_IS_BETTER:color='red';break;}}else if(this.value<0){switch(improvementDirection){case BIGGER_IS_BETTER:color='red';break;case SMALLER_IS_BETTER:color='green';break;}}}
+this.$.content.style.color=color;},get warning(){return this.warning_;},set warning(warning){this.warning_=warning;var warningEl=this.$.warning;if(this.warning_){warningEl.title=warning;warningEl.style.display='';}else{warningEl.title='';warningEl.style.display='none';}}});'use strict';function isTable(object){if(!(object instanceof Array)||(object.length<2))return false;for(var colName in object[0]){if(typeof colName!=='string')return false;}
 for(var i=0;i<object.length;++i){if(!(object[i]instanceof Object))return false;for(var colName in object[i]){if(i&&(object[0][colName]===undefined))return false;var cellType=typeof object[i][colName];if(cellType!=='string'&&cellType!='number')return false;}
 if(i){for(var colName in object[0]){if(object[i][colName]===undefined)return false;}}}
 return true;}
@@ -5309,448 +5810,14 @@
 if(object instanceof tr.model.ObjectSnapshot){var link=document.createElement('tr-ui-a-analysis-link');link.selection=new tr.model.EventSet(object);this.appendElementWithLabel_(label,indent,link,suffix);return;}
 if(object instanceof tr.model.ObjectInstance){var link=document.createElement('tr-ui-a-analysis-link');link.selection=new tr.model.EventSet(object);this.appendElementWithLabel_(label,indent,link,suffix);return;}
 if(object instanceof tr.b.Rect){this.appendSimpleText_(label,indent,object.toString(),suffix);return;}
-if(object instanceof tr.b.u.Scalar){var el=this.ownerDocument.createElement('tr-ui-u-scalar-span');el.value=object;this.appendElementWithLabel_(label,indent,el,suffix);return;}
+if(object instanceof tr.v.ScalarNumeric){var el=this.ownerDocument.createElement('tr-v-ui-scalar-span');el.value=object;this.appendElementWithLabel_(label,indent,el,suffix);return;}
 if(object instanceof Array){this.appendElementsForArray_(label,object,indent,depth,maxDepth,suffix);return;}
 this.appendElementsForObject_(label,object,indent,depth,maxDepth,suffix);},appendElementsForArray_:function(label,object,indent,depth,maxDepth,suffix){if(object.length==0){this.appendSimpleText_(label,indent,'[]',suffix);return;}
 if(isTable(object)){var table=document.createElement('tr-ui-b-table');var columns=[];tr.b.iterItems(object[0],function(colName){columns.push({title:colName,value:function(row){return row[colName];}});});table.tableColumns=columns;table.tableRows=object;this.appendElementWithLabel_(label,indent,table,suffix);table.rebuild();return;}
 this.appendElementsForType_(label+'[',object[0],indent,depth+1,maxDepth,object.length>1?',':']'+suffix);for(var i=1;i<object.length;i++){this.appendElementsForType_('',object[i],indent+label.length+1,depth+1,maxDepth,i<object.length-1?',':']'+suffix);}
 return;},appendElementsForObject_:function(label,object,indent,depth,maxDepth,suffix){var keys=tr.b.dictionaryKeys(object);if(keys.length==0){this.appendSimpleText_(label,indent,'{}',suffix);return;}
 this.appendElementsForType_(label+'{'+keys[0]+': ',object[keys[0]],indent,depth,maxDepth,keys.length>1?',':'}'+suffix);for(var i=1;i<keys.length;i++){this.appendElementsForType_(keys[i]+': ',object[keys[i]],indent+label.length+1,depth+1,maxDepth,i<keys.length-1?',':'}'+suffix);}},appendElementWithLabel_:function(label,indent,dataElement,suffix){var row=document.createElement('div');var indentSpan=document.createElement('span');indentSpan.style.whiteSpace='pre';for(var i=0;i<indent;i++)
-indentSpan.textContent+=' ';row.appendChild(indentSpan);var labelSpan=document.createElement('span');labelSpan.textContent=label;row.appendChild(labelSpan);row.appendChild(dataElement);var suffixSpan=document.createElement('span');suffixSpan.textContent=suffix;row.appendChild(suffixSpan);row.dataElement=dataElement;this.$.content.appendChild(row);},appendSimpleText_:function(label,indent,text,suffix){var el=this.ownerDocument.createElement('span');el.textContent=text;this.appendElementWithLabel_(label,indent,el,suffix);return el;}});'use strict';Polymer('tr-ui-a-generic-object-view-with-label',{ready:function(){this.labelEl_=document.createElement('div');this.genericObjectView_=document.createElement('tr-ui-a-generic-object-view');this.shadowRoot.appendChild(this.labelEl_);this.shadowRoot.appendChild(this.genericObjectView_);},get label(){return this.labelEl_.textContent;},set label(label){this.labelEl_.textContent=label;},get object(){return this.genericObjectView_.object;},set object(object){this.genericObjectView_.object=object;}});'use strict';Polymer('tr-ui-a-stack-frame',{ready:function(){this.stackFrame_=undefined;this.$.table.tableColumns=[];this.$.table.showHeader=true;},get stackFrame(){return this.stackFrame_;},set stackFrame(stackFrame){var table=this.$.table;this.stackFrame_=stackFrame;if(stackFrame===undefined){table.tableColumns=[];table.tableRows=[];table.rebuild();return;}
-var hasName=false;var hasTitle=false;table.tableRows=stackFrame.stackTrace;table.tableRows.forEach(function(row){hasName|=row.name!==undefined;hasTitle|=row.title!==undefined;});var cols=[];if(hasName){cols.push({title:'Name',value:function(row){return row.name;}});}
-if(hasTitle){cols.push({title:'Title',value:function(row){return row.title;}});}
-table.tableColumns=cols;table.rebuild();},tableForTesting:function(){return this.$.table;}});'use strict';Polymer('tr-ui-a-single-event-sub-view',{ready:function(){this.currentSelection_=undefined;this.$.table.tableColumns=[{title:'Label',value:function(row){return row.name;},width:'150px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];this.$.table.showHeader=false;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
-throw new Error('Only supports single slices');this.setSelectionWithoutErrorChecks(selection);},setSelectionWithoutErrorChecks:function(selection){this.currentSelection_=selection;this.updateContents_();},getEventRows_:function(event){var rows=[];if(event.error)
-rows.push({name:'Error',value:event.error});if(event.title)
-rows.push({name:'Title',value:event.title});if(event.category)
-rows.push({name:'Category',value:event.category});if(event.name)
-rows.push({name:'Name',value:event.name});var startEl=document.createElement('tr-ui-u-time-stamp-span');startEl.timestamp=event.start;rows.push({name:'Start',value:startEl});if(event.duration){var wallDurationEl=document.createElement('tr-ui-u-time-duration-span');wallDurationEl.duration=event.duration;rows.push({name:'Wall Duration',value:wallDurationEl});}
-if(event.cpuDuration){var cpuDurationEl=document.createElement('tr-ui-u-time-duration-span');cpuDurationEl.duration=event.cpuDuration;rows.push({name:'CPU Duration',value:cpuDurationEl});}
-if(event.subSlices!==undefined&&event.subSlices.length!==0){if(event.selfTime){var selfTimeEl=document.createElement('tr-ui-u-time-duration-span');selfTimeEl.duration=event.selfTime;rows.push({name:'Self Time',value:selfTimeEl});}
-if(event.cpuSelfTime){var cpuSelfTimeEl=document.createElement('tr-ui-u-time-duration-span');cpuSelfTimeEl.duration=event.cpuSelfTime;if(event.cpuSelfTime>event.selfTime){cpuSelfTimeEl.warning=' Note that CPU Self Time is larger than Self Time. '+'This is a known limitation of this system, which occurs '+'due to several subslices, rounding issues, and imprecise '+'time at which we get cpu- and real-time.';}
-rows.push({name:'CPU Self Time',value:cpuSelfTimeEl});}}
-if(event.durationInUserTime){var durationInUserTimeEl=document.createElement('tr-ui-u-time-duration-span');durationInUserTimeEl.duration=event.durationInUserTime;rows.push({name:'Duration (U)',value:durationInUserTimeEl});}
-function createStackFrameEl(sf){var sfEl=document.createElement('tr-ui-a-stack-frame');sfEl.stackFrame=sf;return sfEl;}
-if(event.startStackFrame&&event.endStackFrame){if(event.startStackFrame===event.endStackFrame){rows.push({name:'Start+End Stack Trace',value:createStackFrameEl(event.startStackFrame)});}else{rows.push({name:'Start Stack Trace',value:createStackFrameEl(event.startStackFrame)});rows.push({name:'End Stack Trace',value:createStackFrameEl(event.endStackFrame)});}}else if(event.startStackFrame){rows.push({name:'Start Stack Trace',value:createStackFrameEl(event.startStackFrame)});}else if(event.endStackFrame){rows.push({name:'End Stack Trace',value:createStackFrameEl(event.endStackFrame)});}
-if(event.info){var descriptionEl=tr.ui.b.createDiv({textContent:event.info.description,maxWidth:'300px'});rows.push({name:'Description',value:descriptionEl});if(event.info.docLinks){event.info.docLinks.forEach(function(linkObject){var linkEl=document.createElement('a');linkEl.target='_blank';linkEl.href=linkObject.href;linkEl.textContent=linkObject.textContent;rows.push({name:linkObject.label,value:linkEl});});}}
-if(event.associatedAlerts.length){var alertSubRows=[];event.associatedAlerts.forEach(function(alert){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(alert);},alert.info.description);alertSubRows.push({name:alert.title,value:linkEl});});rows.push({name:'Alerts',value:'',isExpanded:true,subRows:alertSubRows});}
-return rows;},addArgsToRows_:function(rows,args){var n=0;for(var argName in args){n+=1;}
-if(n>0){var subRows=[];for(var argName in args){var argView=document.createElement('tr-ui-a-generic-object-view');argView.object=args[argName];subRows.push({name:argName,value:argView});}
-rows.push({name:'Args',value:'',isExpanded:true,subRows:subRows});}
-return rows;},updateContents_:function(){if(this.currentSelection_===undefined){this.$.table.rows=[];this.$.table.rebuild();return;}
-var event=this.currentSelection_[0];var rows=this.getEventRows_(event);if(event.argsStripped)
-rows.push({name:'Args',value:'Stripped'});else
-this.addArgsToRows_(rows,event.args);this.$.table.tableRows=rows;this.$.table.rebuild();}});'use strict';tr.exportTo('tr.ui.analysis',function(){var FLOW_IN=0x1;var FLOW_OUT=0x2;var FLOW_IN_OUT=FLOW_IN|FLOW_OUT;function FlowClassifier(){this.numEvents_=0;this.eventsByGUID_={};}
-FlowClassifier.prototype={getFS_:function(event){var fs=this.eventsByGUID_[event.guid];if(fs===undefined){this.numEvents_++;fs={state:0,event:event};this.eventsByGUID_[event.guid]=fs;}
-return fs;},addInFlow:function(event){var fs=this.getFS_(event);fs.state|=FLOW_IN;return event;},addOutFlow:function(event){var fs=this.getFS_(event);fs.state|=FLOW_OUT;return event;},hasEvents:function(){return this.numEvents_>0;},get inFlowEvents(){var selection=new tr.model.EventSet();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_IN)
-selection.push(fs.event);}
-return selection;},get outFlowEvents(){var selection=new tr.model.EventSet();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_OUT)
-selection.push(fs.event);}
-return selection;},get internalFlowEvents(){var selection=new tr.model.EventSet();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_IN_OUT)
-selection.push(fs.event);}
-return selection;}};return{FlowClassifier:FlowClassifier};});'use strict';Polymer('tr-ui-a-related-events',{ready:function(){this.eventGroups_=[];this.cancelFunctions_=[];this.$.table.tableColumns=[{title:'Event(s)',value:function(row){var typeEl=document.createElement('span');typeEl.innerText=row.type;if(row.tooltip)
-typeEl.title=row.tooltip;return typeEl;},width:'150px'},{title:'Link',width:'100%',value:function(row){var linkEl=document.createElement('tr-ui-a-analysis-link');if(row.name)
-linkEl.setSelectionAndContent(row.selection,row.name);else
-linkEl.selection=row.selection;return linkEl;}}];},hasRelatedEvents:function(){return(this.eventGroups_&&this.eventGroups_.length>0);},setRelatedEvents:function(eventSet){this.cancelAllTasks_();this.eventGroups_=[];this.addConnectedFlows_(eventSet);this.addConnectedEvents_(eventSet);this.addOverlappingSamples_(eventSet);this.updateContents_();},addConnectedFlows_:function(eventSet){var classifier=new tr.ui.analysis.FlowClassifier();eventSet.forEach(function(slice){if(slice.inFlowEvents){slice.inFlowEvents.forEach(function(flow){classifier.addInFlow(flow);});}
-if(slice.outFlowEvents){slice.outFlowEvents.forEach(function(flow){classifier.addOutFlow(flow);});}});if(!classifier.hasEvents())
-return;var addToEventGroups=function(type,flowEvent){this.eventGroups_.push({type:type,selection:new tr.model.EventSet(flowEvent),name:flowEvent.title});};classifier.inFlowEvents.forEach(addToEventGroups.bind(this,'Incoming flow'));classifier.outFlowEvents.forEach(addToEventGroups.bind(this,'Outgoing flow'));classifier.internalFlowEvents.forEach(addToEventGroups.bind(this,'Internal flow'));},cancelAllTasks_:function(){this.cancelFunctions_.forEach(function(cancelFunction){cancelFunction();});this.cancelFunctions_=[];},addConnectedEvents_:function(eventSet){this.cancelFunctions_.push(this.createEventsLinkIfNeeded_('Preceding events','Add all events that have led to the selected one(s), connected by '+'flow arrows or by call stack.',eventSet,function(event,events){this.addInFlowEvents_(event,events);this.addAncestors_(event,events);if(event.startSlice)
-events.push(event.startSlice);}.bind(this)));this.cancelFunctions_.push(this.createEventsLinkIfNeeded_('Following events','Add all events that have been caused by the selected one(s), '+'connected by flow arrows or by call stack.',eventSet,function(event,events){this.addOutFlowEvents_(event,events);this.addDescendents_(event,events);if(event.endSlice)
-events.push(event.endSlice);}.bind(this)));this.cancelFunctions_.push(this.createEventsLinkIfNeeded_('All connected events','Add all events connected to the selected one(s) by flow arrows or '+'by call stack.',eventSet,function(event,events){this.addInFlowEvents_(event,events);this.addOutFlowEvents_(event,events);this.addAncestors_(event,events);this.addDescendents_(event,events);if(event.startSlice)
-events.push(event.startSlice);if(event.endSlice)
-events.push(event.endSlice);}.bind(this)));},createEventsLinkIfNeeded_:function(title,tooltip,events,addFunction){events=new tr.model.EventSet(events);var lengthBefore=events.length;var task;var isCanceled=false;function addEventsUntilTimeout(startingIndex){if(isCanceled)
-return;var startingTime=window.performance.now();while(startingIndex<events.length){addFunction(events[startingIndex],events);startingIndex++;if(window.performance.now()-startingTime>8){var newTask=new tr.b.Task(addEventsUntilTimeout.bind(this,startingIndex),this);task.after(newTask);task=newTask;return;}}
-if(lengthBefore===events.length)
-return;this.eventGroups_.push({type:title,tooltip:tooltip,selection:events});this.updateContents_();};function cancelTask(){isCanceled=true;}
-task=new tr.b.Task(addEventsUntilTimeout.bind(this,0),this);tr.b.Task.RunWhenIdle(task);return cancelTask;},addInFlowEvents_:function(event,eventSet){if(!event.inFlowEvents)
-return;event.inFlowEvents.forEach(function(e){eventSet.push(e);});},addOutFlowEvents_:function(event,eventSet){if(!event.outFlowEvents)
-return;event.outFlowEvents.forEach(function(e){eventSet.push(e);});},addAncestors_:function(event,eventSet){if(!event.iterateAllAncestors)
-return;event.iterateAllAncestors(function(e){eventSet.push(e);});},addDescendents_:function(event,eventSet){if(!event.iterateAllDescendents)
-return;event.iterateAllDescendents(function(e){eventSet.push(e);});},addOverlappingSamples_:function(eventSet){var samples=new tr.model.EventSet;eventSet.forEach(function(slice){if(!slice.parentContainer||!slice.parentContainer.samples)
-return;var candidates=slice.parentContainer.samples;var range=tr.b.Range.fromExplicitRange(slice.start,slice.start+slice.duration);var filteredSamples=range.filterArray(candidates,function(value){return value.start;});filteredSamples.forEach(function(sample){samples.push(sample);});}.bind(this));if(samples.length>0){this.eventGroups_.push({type:'Overlapping samples',tooltip:'All samples overlapping the selected slice(s).',selection:samples});}},updateContents_:function(){var table=this.$.table;if(this.eventGroups_===undefined)
-table.tableRows=[];else
-table.tableRows=this.eventGroups_.slice();table.rebuild();}});'use strict';Polymer('tr-ui-a-single-thread-slice-sub-view',{get selection(){return this.$.content.selection;},set selection(selection){this.$.content.selection=selection;this.$.relatedEvents.setRelatedEvents(selection);if(this.$.relatedEvents.hasRelatedEvents())
-this.$.relatedEvents.style.display='';else
-this.$.relatedEvents.style.display='none';}});'use strict';Polymer('tr-ui-a-selection-summary-table',{created:function(){this.selection_=new tr.b.Range();},ready:function(){this.$.table.showHeader=false;this.$.table.tableColumns=[{title:'Name',value:function(row){return row.title;},width:'350px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;this.updateContents_();},updateContents_:function(){var selection=this.selection_;var rows=[];var hasRange;if(this.selection_&&(!selection.bounds.isEmpty))
-hasRange=true;else
-hasRange=false;var timeSpanConfig={ownerDocument:this.ownerDocument};rows.push({title:'Selection start',value:hasRange?tr.ui.units.createTimeStampSpan(selection.bounds.min,timeSpanConfig):'<empty>'});rows.push({title:'Selection extent',value:hasRange?tr.ui.units.createTimeDurationSpan(selection.bounds.range,timeSpanConfig):'<empty>'});this.$.table.tableRows=rows;this.$.table.rebuild();}});'use strict';tr.exportTo('tr.ui.analysis',function(){function MultiEventSummary(title,events){this.title=title;this.duration_=undefined;this.selfTime_=undefined;this.events_=events;this.cpuTimesComputed_=false;this.cpuSelfTime_=undefined;this.cpuDuration_=undefined;this.maxDuration_=undefined;this.maxCpuDuration_=undefined;this.maxSelfTime_=undefined;this.maxCpuSelfTime_=undefined;this.untotallableArgs_=[];this.totalledArgs_=undefined;};MultiEventSummary.prototype={set title(title){if(title=='Totals')
-this.totalsRow=true;this.title_=title;},get title(){return this.title_;},get duration(){if(this.duration_===undefined){this.duration_=tr.b.Statistics.sum(this.events_,function(event){return event.duration;});}
-return this.duration_;},get cpuSelfTime(){this.computeCpuTimesIfNeeded_();return this.cpuSelfTime_;},get cpuDuration(){this.computeCpuTimesIfNeeded_();return this.cpuDuration_;},computeCpuTimesIfNeeded_:function(){if(this.cpuTimesComputed_)
-return;this.cpuTimesComputed_=true;var cpuSelfTime=0;var cpuDuration=0;var hasCpuData=false;for(var i=0;i<this.events_.length;i++){var event=this.events_[i];if(event.cpuDuration!==undefined){cpuDuration+=event.cpuDuration;hasCpuData=true;}
-if(event.cpuSelfTime!==undefined){cpuSelfTime+=event.cpuSelfTime;hasCpuData=true;}}
-if(hasCpuData){this.cpuDuration_=cpuDuration;this.cpuSelfTime_=cpuSelfTime;}},get selfTime(){if(this.selfTime_===undefined){this.selfTime_=0;for(var i=0;i<this.events_.length;i++){if(this.events_[i].selfTime!==undefined)
-this.selfTime_+=this.events[i].selfTime;}}
-return this.selfTime_;},get events(){return this.events_;},get numEvents(){return this.events_.length;},get numAlerts(){if(this.numAlerts_===undefined){this.numAlerts_=tr.b.Statistics.sum(this.events_,function(event){return event.associatedAlerts.length;});}
-return this.numAlerts_;},get untotallableArgs(){this.updateArgsIfNeeded_();return this.untotallableArgs_;},get totalledArgs(){this.updateArgsIfNeeded_();return this.totalledArgs_;},get maxDuration(){if(this.maxDuration_===undefined){this.maxDuration_=tr.b.Statistics.max(this.events_,function(event){return event.duration;});}
-return this.maxDuration_;},get maxCpuDuration(){if(this.maxCpuDuration_===undefined){this.maxCpuDuration_=tr.b.Statistics.max(this.events_,function(event){return event.cpuDuration;});}
-return this.maxCpuDuration_;},get maxSelfTime(){if(this.maxSelfTime_===undefined){this.maxSelfTime_=tr.b.Statistics.max(this.events_,function(event){return event.selfTime;});}
-return this.maxSelfTime_;},get maxCpuSelfTime(){if(this.maxCpuSelfTime_===undefined){this.maxCpuSelfTime_=tr.b.Statistics.max(this.events_,function(event){return event.cpuSelfTime;});}
-return this.maxCpuSelfTime_;},updateArgsIfNeeded_:function(){if(this.totalledArgs_!==undefined)
-return;var untotallableArgs={};var totalledArgs={};for(var i=0;i<this.events_.length;i++){var event=this.events_[i];for(var argName in event.args){var argVal=event.args[argName];var type=typeof argVal;if(type!=='number'){untotallableArgs[argName]=true;delete totalledArgs[argName];continue;}
-if(untotallableArgs[argName]){continue;}
-if(totalledArgs[argName]===undefined)
-totalledArgs[argName]=0;totalledArgs[argName]+=argVal;}}
-this.untotallableArgs_=tr.b.dictionaryKeys(untotallableArgs);this.totalledArgs_=totalledArgs;}};return{MultiEventSummary:MultiEventSummary};});'use strict';Polymer('tr-ui-a-multi-event-summary-table',{ready:function(){this.showTotals_=false;this.eventsHaveDuration_=true;this.eventsHaveSubRows_=true;this.eventsByTitle_=undefined;},updateTableColumns_:function(rows,maxValues){var hasCpuData=false;var hasAlerts=false;rows.forEach(function(row){if(row.cpuDuration!==undefined)
-hasCpuData=true;if(row.cpuSelfTime!==undefined)
-hasCpuData=true;if(row.numAlerts)
-hasAlerts=true;});var ownerDocument=this.ownerDocument;var columns=[];columns.push({title:'Name',value:function(row){if(row.title==='Totals')
-return'Totals';var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(row.events);},row.title);return linkEl;},width:'350px',cmp:function(rowA,rowB){return rowA.title.localeCompare(rowB.title);}});if(this.eventsHaveDuration_){columns.push({title:'Wall Duration',value:function(row){return tr.ui.units.createTimeDurationSpan(row.duration,{total:row.totalsRow?undefined:maxValues.duration,ownerDocument:ownerDocument,rightAlign:true});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.duration-rowB.duration;}});}
-if(this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Duration',value:function(row){return tr.ui.units.createTimeDurationSpan(row.cpuDuration,{total:row.totalsRow?undefined:maxValues.cpuDuration,ownerDocument:ownerDocument,rightAlign:true});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuDuration-rowB.cpuDuration;}});}
-if(this.eventsHaveSubRows_&&this.eventsHaveDuration_){columns.push({title:'Self time',value:function(row){return tr.ui.units.createTimeDurationSpan(row.selfTime,{total:row.totalsRow?undefined:maxValues.selfTime,ownerDocument:ownerDocument,rightAlign:true});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.selfTime-rowB.selfTime;}});}
-if(this.eventsHaveSubRows_&&this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Self Time',value:function(row){return tr.ui.units.createTimeDurationSpan(row.cpuSelfTime,{total:row.totalsRow?undefined:maxValues.cpuSelfTime,ownerDocument:ownerDocument,rightAlign:true});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuSelfTime-rowB.cpuSelfTime;}});}
-columns.push({title:'Occurrences',value:function(row){return row.numEvents;},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.numEvents-rowB.numEvents;}});var alertsColumnIndex;if(hasAlerts){columns.push({title:'Num Alerts',value:function(row){return row.numAlerts;},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.numAlerts-rowB.numAlerts;}});alertsColumnIndex=columns.length-1;}
-var colWidthPercentage;if(columns.length==1)
-colWidthPercentage='100%';else
-colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';for(var i=1;i<columns.length;i++)
-columns[i].width=colWidthPercentage;this.$.table.tableColumns=columns;if(hasAlerts){this.$.table.sortColumnIndex=alertsColumnIndex;this.$.table.sortDescending=true;}},configure:function(config){if(config.eventsByTitle===undefined)
-throw new Error('Required: eventsByTitle');if(config.showTotals!==undefined)
-this.showTotals_=config.showTotals;else
-this.showTotals_=true;if(config.eventsHaveDuration!==undefined)
-this.eventsHaveDuration_=config.eventsHaveDuration;else
-this.eventsHaveDuration_=true;if(config.eventsHaveSubRows!==undefined)
-this.eventsHaveSubRows_=config.eventsHaveSubRows;else
-this.eventsHaveSubRows_=true;this.eventsByTitle_=config.eventsByTitle;this.updateContents_();},get showTotals(){return this.showTotals_;},set showTotals(showTotals){this.showTotals_=showTotals;this.updateContents_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows_;},set eventsHaveSubRows(eventsHaveSubRows){this.eventsHaveSubRows_=eventsHaveSubRows;this.updateContents_();},get eventsByTitle(){return this.eventsByTitle_;},set eventsByTitle(eventsByTitle){this.eventsByTitle_=eventsByTitle;this.updateContents_();},get selectionBounds(){return this.selectionBounds_;},set selectionBounds(selectionBounds){this.selectionBounds_=selectionBounds;this.updateContents_();},updateContents_:function(){var eventsByTitle;if(this.eventsByTitle_!==undefined)
-eventsByTitle=this.eventsByTitle_;else
-eventsByTitle=[];var allEvents=[];var rows=[];tr.b.iterItems(eventsByTitle,function(title,eventsOfSingleTitle){allEvents.push.apply(allEvents,eventsOfSingleTitle);var row=new tr.ui.analysis.MultiEventSummary(title,eventsOfSingleTitle);rows.push(row);});this.updateTableColumns_(rows);this.$.table.tableRows=rows;var maxValues={duration:undefined,selfTime:undefined,cpuSelfTime:undefined,cpuDuration:undefined};if(this.eventsHaveDuration){for(var column in maxValues){maxValues[column]=tr.b.Statistics.max(rows,function(event){return event[column];});}}
-var footerRows=[];if(this.showTotals_){var multiEventSummary=new tr.ui.analysis.MultiEventSummary('Totals',allEvents);footerRows.push(multiEventSummary);}
-this.updateTableColumns_(rows,maxValues);this.$.table.tableRows=rows;this.$.table.footerRows=footerRows;this.$.table.rebuild();}});'use strict';Polymer('tr-ui-a-multi-event-details-table',{created:function(){this.selection_=undefined;this.eventsHaveDuration_=true;this.eventsHaveSubRows_=true;},ready:function(){this.initTitleTable_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows_;},set eventsHaveSubRows(eventsHaveSubRows){this.eventsHaveSubRows_=eventsHaveSubRows;this.updateContents_();},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;this.updateContents_();},updateContents_:function(){var selection=this.selection_;this.updateTitleTable_();if(this.selection_===undefined){this.$.table.tableRows=[];this.$.table.tableFooterRows=[];this.$.table.rebuild();return;}
-var summary=new tr.ui.analysis.MultiEventSummary('Totals',this.selection_);this.updateColumns_(summary);this.updateRows_(summary);this.$.table.rebuild();},initTitleTable_:function(){var table=this.$.titletable;table.showHeader=false;table.tableColumns=[{title:'Title',value:function(row){return row.title;},width:'350px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];},updateTitleTable_:function(){var title;if(this.selection_&&this.selection_.length)
-title=this.selection_[0].title;else
-title='<No selection>';var table=this.$.titletable;table.tableRows=[{title:'Title',value:title}];},updateColumns_:function(summary){var hasCpuData;if(summary.cpuDuration!==undefined)
-hasCpuData=true;if(summary.cpuSelfTime!==undefined)
-hasCpuData=true;var colWidthPercentage;if(hasCpuData)
-colWidthPercentage='20%';else
-colWidthPercentage='33.3333%';var timeSpanConfig={ownerDocument:this.ownerDocument};var columns=[];columns.push({title:'Start',value:function(row){if(row.__proto__===tr.ui.analysis.MultiEventSummary.prototype){return row.title;}
-var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(row.event);});linkEl.appendChild(tr.ui.units.createTimeStampSpan(row.start,timeSpanConfig));return linkEl;},width:'350px',cmp:function(rowA,rowB){return rowA.start-rowB.start;}});if(this.eventsHaveDuration_){columns.push({title:'Wall Duration (ms)',value:function(row){return tr.ui.units.createTimeDurationSpan(row.duration,timeSpanConfig);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.duration-rowB.duration;}});}
-if(this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Duration (ms)',value:function(row){return tr.ui.units.createTimeDurationSpan(row.cpuDuration,timeSpanConfig);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuDuration-rowB.cpuDuration;}});}
-if(this.eventsHaveSubRows_&&this.eventsHaveDuration_){columns.push({title:'Self time (ms)',value:function(row){return tr.ui.units.createTimeDurationSpan(row.selfTime,timeSpanConfig);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.selfTime-rowB.selfTime;}});}
-if(this.eventsHaveSubRows_&&this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Self Time (ms)',value:function(row){return tr.ui.units.createTimeDurationSpan(row.cpuSelfTime,timeSpanConfig);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuSelfTime-rowB.cpuSelfTime;}});}
-var argKeys=tr.b.dictionaryKeys(summary.totalledArgs);argKeys.sort();var otherKeys=summary.untotallableArgs.slice(0);otherKeys.sort();argKeys.push.apply(argKeys,otherKeys);var keysWithColumns=argKeys.slice(0,4);var keysInOtherColumn=argKeys.slice(4);keysWithColumns.forEach(function(argKey){var hasTotal=summary.totalledArgs[argKey];var colDesc={title:'Arg: '+argKey,value:function(row){if(row.__proto__!==tr.ui.analysis.MultiEventSummary.prototype){var argView=document.createElement('tr-ui-a-generic-object-view');argView.object=row.args[argKey];return argView;}
-if(hasTotal)
-return row.totalledArgs[argKey];return'';},width:'<upated further down>'};if(hasTotal){colDesc.cmp=function(rowA,rowB){return rowA.args[argKey]-rowB.args[argKey];}}
-columns.push(colDesc);});if(keysInOtherColumn.length){columns.push({title:'Other Args',value:function(row){if(row.__proto__===tr.ui.analysis.MultiEventSummary.prototype)
-return'';var argView=document.createElement('tr-ui-a-generic-object-view');var obj={};for(var i=0;i<keysInOtherColumn.length;i++)
-obj[keysInOtherColumn[i]]=row.args[keysInOtherColumn[i]];argView.object=obj;return argView;},width:'<upated further down>'});}
-var colWidthPercentage;if(columns.length==1)
-colWidthPercentage='100%';else
-colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';for(var i=1;i<columns.length;i++)
-columns[i].width=colWidthPercentage;this.$.table.tableColumns=columns;},updateRows_:function(summary){this.$.table.sortColumnIndex=0;function Row(event){this.event=event;}
-Row.prototype={get start(){return this.event.start;},get duration(){return this.event.duration;},get cpuDuration(){return this.event.cpuDuration;},get selfTime(){return this.event.selfTime;},get cpuSelfTime(){return this.event.cpuSelfTime;},get args(){return this.event.args;}};this.$.table.tableRows=this.selection_.map(function(event){return new Row(event);});this.$.table.footerRows=[summary];}});'use strict';Polymer('tr-ui-a-multi-event-sub-view',{created:function(){this.currentSelection_=undefined;this.eventsHaveDuration_=true;this.eventsHaveSubRows_=true;},set selection(selection){if(selection.length<=1)
-throw new Error('Only supports multiple items');this.setSelectionWithoutErrorChecks(selection);},get selection(){return this.currentSelection_;},setSelectionWithoutErrorChecks:function(selection){this.currentSelection_=selection;this.updateContents_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows_;},set eventsHaveSubRows(eventsHaveSubRows){this.eventsHaveSubRows_=eventsHaveSubRows;this.updateContents_();},updateContents_:function(){var selection=this.currentSelection_;this.$.content.textContent='';if(!selection)
-return;var eventsByTitle=selection.getEventsOrganizedByTitle();var numTitles=tr.b.dictionaryLength(eventsByTitle);var summaryTableEl=document.createElement('tr-ui-a-multi-event-summary-table');summaryTableEl.configure({showTotals:numTitles>1,eventsByTitle:eventsByTitle,eventsHaveDuration:this.eventsHaveDuration_,eventsHaveSubRows:this.eventsHaveSubRows_});this.$.content.appendChild(summaryTableEl);var selectionSummaryTableEl=document.createElement('tr-ui-a-selection-summary-table');selectionSummaryTableEl.selection=this.currentSelection_;this.$.content.appendChild(selectionSummaryTableEl);if(numTitles===1){var detailsTableEl=document.createElement('tr-ui-a-multi-event-details-table');detailsTableEl.eventsHaveDuration=this.eventsHaveDuration_;detailsTableEl.eventsHaveSubRows=this.eventsHaveSubRows_;detailsTableEl.selection=selection;this.$.content.appendChild(detailsTableEl);}}});'use strict';Polymer('tr-ui-a-multi-thread-slice-sub-view',{created:function(){this.selection_=undefined;},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;if(tr.isExported('tr.ui.e.chrome.cc.RasterTaskSelection')){if(tr.ui.e.chrome.cc.RasterTaskSelection.supports(selection)){var ltvSelection=new tr.ui.e.chrome.cc.RasterTaskSelection(selection);var ltv=new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView();ltv.objectSnapshot=ltvSelection.containingSnapshot;ltv.selection=ltvSelection;ltv.extraHighlightsByLayerId=ltvSelection.extraHighlightsByLayerId;this.$.content.textContent='';this.$.content.appendChild(ltv);this.requiresTallView_=true;return;}}
-this.$.content.textContent='';var mesv=document.createElement('tr-ui-a-multi-event-sub-view');mesv.selection=selection;this.$.content.appendChild(mesv);var relatedEvents=document.createElement('tr-ui-a-related-events');relatedEvents.setRelatedEvents(selection);if(relatedEvents.hasRelatedEvents()){this.$.content.appendChild(relatedEvents);}},get requiresTallView(){if(this.$.content.children.length===0)
-return false;var childTagName=this.$.content.children[0].tagName;if(childTagName==='TR-UI-A-MULTI-EVENT-SUB-VIEW')
-return false;return true;}});'use strict';Polymer('tr-ui-a-single-async-slice-sub-view',{getEventRows_:function(event){var rows=this.__proto__.__proto__.getEventRows_(event);rows.splice(0,0,{name:'ID',value:event.id});return rows;},get relatedEventsToHighlight(){if(!this.currentSelection_)
-return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-multi-async-slice-sub-view',{get selection(){return this.$.content.selection;},set selection(selection){this.$.content.selection=selection;},get relatedEventsToHighlight(){if(!this.$.content.selection)
-return undefined;var selection=new tr.model.EventSet();this.$.content.selection.forEach(function(asyncEvent){if(!asyncEvent.associatedEvents)
-return;asyncEvent.associatedEvents.forEach(function(event){selection.push(event);});});if(selection.length)
-return selection;return undefined;}});'use strict';Polymer('tr-ui-a-single-cpu-slice-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
-throw new Error('Only supports single slices');if(!(selection[0]instanceof tr.model.CpuSlice))
-throw new Error('Only supports thread time slices');this.currentSelection_=selection;var cpuSlice=selection[0];var thread=cpuSlice.threadThatWasRunning;var shadowRoot=this.shadowRoot;if(thread){shadowRoot.querySelector('#process-name').textContent=thread.parent.userFriendlyName;shadowRoot.querySelector('#thread-name').textContent=thread.userFriendlyName;}else{shadowRoot.querySelector('#process-name').parentElement.style.display='none';shadowRoot.querySelector('#thread-name').textContent=cpuSlice.title;}
-shadowRoot.querySelector('#start').timestamp=cpuSlice.start;shadowRoot.querySelector('#duration').duration=cpuSlice.duration;var runningThreadEl=shadowRoot.querySelector('#running-thread');var timeSlice=cpuSlice.getAssociatedTimeslice();if(!timeSlice){runningThreadEl.parentElement.style.display='none';}else{var threadLink=document.createElement('tr-ui-a-analysis-link');threadLink.selection=new tr.model.EventSet(timeSlice);threadLink.textContent='Click to select';runningThreadEl.parentElement.style.display='';runningThreadEl.textContent='';runningThreadEl.appendChild(threadLink);}
-shadowRoot.querySelector('#args').object=cpuSlice.args;}});'use strict';Polymer('tr-ui-a-multi-cpu-slice-sub-view',{ready:function(){this.$.content.eventsHaveSubRows=false;},get selection(){return this.$.content.selection;},set selection(selection){this.$.content.setSelectionWithoutErrorChecks(selection);}});'use strict';Polymer('tr-ui-a-single-thread-time-slice-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
-throw new Error('Only supports single slices');if(!(selection[0]instanceof tr.model.ThreadTimeSlice))
-throw new Error('Only supports thread time slices');this.currentSelection_=selection;var timeSlice=selection[0];var thread=timeSlice.thread;var shadowRoot=this.shadowRoot;shadowRoot.querySelector('#state').textContent=timeSlice.title;var stateColor=tr.b.ColorScheme.colorsAsStrings[timeSlice.colorId];shadowRoot.querySelector('#state').style.backgroundColor=stateColor;shadowRoot.querySelector('#process-name').textContent=thread.parent.userFriendlyName;shadowRoot.querySelector('#thread-name').textContent=thread.userFriendlyName;shadowRoot.querySelector('#start').timestamp=timeSlice.start;shadowRoot.querySelector('#duration').duration=timeSlice.duration;var onCpuEl=shadowRoot.querySelector('#on-cpu');onCpuEl.textContent='';var runningInsteadEl=shadowRoot.querySelector('#running-instead');if(timeSlice.cpuOnWhichThreadWasRunning){runningInsteadEl.parentElement.removeChild(runningInsteadEl);var cpuLink=document.createElement('tr-ui-a-analysis-link');cpuLink.selection=new tr.model.EventSet(timeSlice.getAssociatedCpuSlice());cpuLink.textContent=timeSlice.cpuOnWhichThreadWasRunning.userFriendlyName;onCpuEl.appendChild(cpuLink);}else{onCpuEl.parentElement.removeChild(onCpuEl);var cpuSliceThatTookCpu=timeSlice.getCpuSliceThatTookCpu();if(cpuSliceThatTookCpu){var cpuLink=document.createElement('tr-ui-a-analysis-link');cpuLink.selection=new tr.model.EventSet(cpuSliceThatTookCpu);if(cpuSliceThatTookCpu.thread)
-cpuLink.textContent=cpuSliceThatTookCpu.thread.userFriendlyName;else
-cpuLink.textContent=cpuSliceThatTookCpu.title;runningInsteadEl.appendChild(cpuLink);}else{runningInsteadEl.parentElement.removeChild(runningInsteadEl);}}
-var argsEl=shadowRoot.querySelector('#args');if(tr.b.dictionaryKeys(timeSlice.args).length>0){var argsView=document.createElement('tr-ui-a-generic-object-view');argsView.object=timeSlice.args;argsEl.parentElement.style.display='';argsEl.textContent='';argsEl.appendChild(argsView);}else{argsEl.parentElement.style.display='none';}}});'use strict';Polymer('tr-ui-a-multi-thread-time-slice-sub-view',{ready:function(){this.$.content.eventsHaveSubRows=false;},get selection(){return this.$.content.selection;},set selection(selection){this.$.content.setSelectionWithoutErrorChecks(selection);}});'use strict';Polymer('tr-ui-a-single-instant-event-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.$.content.textContent='';var realView=document.createElement('tr-ui-a-single-event-sub-view');realView.setSelectionWithoutErrorChecks(selection);this.$.content.appendChild(realView);this.currentSelection_=selection;},get selection(){return this.currentSelection_;}});'use strict';Polymer('tr-ui-a-multi-instant-event-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.$.content.textContent='';var realView=document.createElement('tr-ui-a-multi-event-sub-view');realView.eventsHaveDuration=false;realView.eventsHaveSubRows=false;this.$.content.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get selection(){return this.currentSelection_;}});'use strict';(function(){var COUNTER_SAMPLE_TABLE_COLUMNS=[{title:'Counter',width:'150px',value:function(row){return row.counter;}},{title:'Series',width:'150px',value:function(row){return row.series;}},{title:'Time',width:'150px',value:function(row){return row.start;}},{title:'Value',width:'100%',value:function(row){return row.value;}}];Polymer('tr-ui-a-counter-sample-sub-view',{ready:function(){this.currentSelection_=undefined;this.$.table.tableColumns=COUNTER_SAMPLE_TABLE_COLUMNS;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;this.updateContents_();},updateContents_:function(){this.$.table.tableRows=this.selection?this.getRows_(this.selection.toArray()):[];this.$.table.rebuild();},getRows_:function(samples){var samplesByCounter=tr.b.group(samples,function(sample){return sample.series.counter.guid;});var rows=[];tr.b.iterItems(samplesByCounter,function(unused,counterSamples){var samplesBySeries=tr.b.group(counterSamples,function(sample){return sample.series.guid;});tr.b.iterItems(samplesBySeries,function(unused,seriesSamples){var seriesRows=this.getRowsForSamples_(seriesSamples);seriesRows[0].counter=seriesSamples[0].series.counter.name;seriesRows[0].series=seriesSamples[0].series.name;if(seriesRows.length>1){seriesRows[0].subRows=seriesRows.slice(1);seriesRows[0].isExpanded=true;}
-rows.push(seriesRows[0]);},this);},this);return rows;},getRowsForSamples_:function(samples){return samples.map(function(sample){return{start:sample.timestamp,value:sample.value};});}});})();'use strict';Polymer('tr-ui-a-single-flow-event-sub-view',{getEventRows_:function(event){var rows=this.__proto__.__proto__.getEventRows_(event);rows.splice(0,0,{name:'ID',value:event.id});function createLinkTo(slice){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(slice);});linkEl.textContent=slice.userFriendlyName;return linkEl;}
-rows.push({name:'From',value:createLinkTo(event.startSlice)});rows.push({name:'To',value:createLinkTo(event.endSlice)});return rows;}});'use strict';Polymer('tr-ui-a-multi-flow-event-sub-view',{ready:function(){this.$.content.eventsHaveDuration=false;this.$.content.eventsHaveSubRows=false;},set selection(selection){this.$.content.selection=selection;},get selection(){return this.$.content.selection;}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ObjectInstanceView=tr.ui.b.define('object-instance-view');ObjectInstanceView.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.objectInstance_=undefined;},get requiresTallView(){return true;},set modelEvent(obj){this.objectInstance=obj;},get modelEvent(){return this.objectInstance;},get objectInstance(){return this.objectInstance_;},set objectInstance(i){this.objectInstance_=i;this.updateContents();},updateContents:function(){throw new Error('Not implemented');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectInstanceView;options.defaultMetadata={showInTrackView:true};tr.b.decorateExtensionRegistry(ObjectInstanceView,options);return{ObjectInstanceView:ObjectInstanceView};});'use strict';Polymer('tr-ui-a-single-object-instance-sub-view',{created:function(){this.currentSelection_=undefined;},get requiresTallView(){if(this.$.content.children.length===0)
-return false;if(this.$.content.children[0]instanceof
-tr.ui.analysis.ObjectInstanceView)
-return this.$.content.children[0].requiresTallView;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
-throw new Error('Only supports single item selections');if(!(selection[0]instanceof tr.model.ObjectInstance))
-throw new Error('Only supports object instances');this.$.content.textContent='';this.currentSelection_=selection;var instance=selection[0];var typeInfo=tr.ui.analysis.ObjectInstanceView.getTypeInfo(instance.category,instance.typeName);if(typeInfo){var customView=new typeInfo.constructor();this.$.content.appendChild(customView);customView.modelEvent=instance;}else{this.appendGenericAnalysis_(instance);}},appendGenericAnalysis_:function(instance){var html='';html+='<div class="title">'+
-instance.typeName+' '+
-instance.id+'</div>\n';html+='<table>';html+='<tr>';html+='<tr><td>creationTs:</td><td>'+
-instance.creationTs+'</td></tr>\n';if(instance.deletionTs!=Number.MAX_VALUE){html+='<tr><td>deletionTs:</td><td>'+
-instance.deletionTs+'</td></tr>\n';}else{html+='<tr><td>deletionTs:</td><td>not deleted</td></tr>\n';}
-html+='<tr><td>snapshots:</td><td id="snapshots"></td></tr>\n';html+='</table>';this.$.content.innerHTML=html;var snapshotsEl=this.$.content.querySelector('#snapshots');instance.snapshots.forEach(function(snapshot){var snapshotLink=document.createElement('tr-ui-a-analysis-link');snapshotLink.selection=new tr.model.EventSet(snapshot);snapshotsEl.appendChild(snapshotLink);});}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ObjectSnapshotView=tr.ui.b.define('object-snapshot-view');ObjectSnapshotView.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.objectSnapshot_=undefined;},get requiresTallView(){return true;},set modelEvent(obj){this.objectSnapshot=obj;},get modelEvent(){return this.objectSnapshot;},get objectSnapshot(){return this.objectSnapshot_;},set objectSnapshot(i){this.objectSnapshot_=i;this.updateContents();},updateContents:function(){throw new Error('Not implemented');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectSnapshotView;options.defaultMetadata={showInstances:true,showInTrackView:true};tr.b.decorateExtensionRegistry(ObjectSnapshotView,options);return{ObjectSnapshotView:ObjectSnapshotView};});'use strict';Polymer('tr-ui-a-single-object-snapshot-sub-view',{created:function(){this.currentSelection_=undefined;},get requiresTallView(){if(this.children.length===0)
-return false;if(this.children[0]instanceof tr.ui.analysis.ObjectSnapshotView)
-return this.children[0].requiresTallView;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
-throw new Error('Only supports single item selections');if(!(selection[0]instanceof tr.model.ObjectSnapshot))
-throw new Error('Only supports object instances');this.textContent='';this.currentSelection_=selection;var snapshot=selection[0];var typeInfo=tr.ui.analysis.ObjectSnapshotView.getTypeInfo(snapshot.objectInstance.category,snapshot.objectInstance.typeName);if(typeInfo){var customView=new typeInfo.constructor();this.appendChild(customView);customView.modelEvent=snapshot;}else{this.appendGenericAnalysis_(snapshot);}},appendGenericAnalysis_:function(snapshot){var instance=snapshot.objectInstance;this.textContent='';var titleEl=document.createElement('div');titleEl.classList.add('title');titleEl.appendChild(document.createTextNode('Snapshot of '));this.appendChild(titleEl);var instanceLinkEl=document.createElement('tr-ui-a-analysis-link');instanceLinkEl.selection=new tr.model.EventSet(instance);titleEl.appendChild(instanceLinkEl);titleEl.appendChild(document.createTextNode(' @ '));titleEl.appendChild(tr.ui.units.createTimeStampSpan(snapshot.ts,{ownerDocument:this.ownerDocument}));var tableEl=document.createElement('table');this.appendChild(tableEl);var rowEl=document.createElement('tr');tableEl.appendChild(rowEl);var labelEl=document.createElement('td');labelEl.textContent='args:';rowEl.appendChild(labelEl);var argsEl=document.createElement('td');argsEl.id='args';rowEl.appendChild(argsEl);var objectViewEl=document.createElement('tr-ui-a-generic-object-view');objectViewEl.object=snapshot.args;argsEl.appendChild(objectViewEl);}});'use strict';Polymer('tr-ui-a-multi-object-sub-view',{created:function(){this.currentSelection_=undefined;},ready:function(){this.$.content.showHeader=false;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;var objectEvents=tr.b.asArray(selection).sort(tr.b.Range.compareByMinTimes);var timeSpanConfig={ownerDocument:this.ownerDocument};var table=this.$.content;table.tableColumns=[{title:'First',value:function(event){if(event instanceof tr.model.ObjectSnapshot)
-return tr.ui.units.createTimeStampSpan(event.ts,timeSpanConfig);var spanEl=document.createElement('span');spanEl.appendChild(tr.ui.units.createTimeStampSpan(event.creationTs,timeSpanConfig));spanEl.appendChild(tr.ui.b.createSpan({textContent:'-',marginLeft:'4px',marginRight:'4px'}));if(event.deletionTs!=Number.MAX_VALUE){spanEl.appendChild(tr.ui.units.createTimeStampSpan(event.deletionTs,timeSpanConfig));}
-return spanEl;},width:'200px'},{title:'Second',value:function(event){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(event);},event.userFriendlyName);return linkEl;},width:'100%'}];table.tableRows=objectEvents;table.rebuild();}});'use strict';Polymer('tr-ui-a-single-sample-sub-view',{created:function(){this.currentSelection_=undefined;},ready:function(){this.$.content.tableColumns=[{title:'FirstColumn',value:function(row){return row.title;},width:'250px'},{title:'SecondColumn',value:function(row){return row.value;},width:'100%'}];this.$.content.showHeader=false;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;if(this.currentSelection_===undefined){this.$.content.tableRows=[];return;}
-var sample=this.currentSelection_[0];var table=this.$.content;var rows=[];rows.push({title:'Title',value:sample.title});rows.push({title:'Sample time',value:tr.ui.units.createTimeStampSpan(sample.start,{ownerDocument:this.ownerDocument})});var sfEl=document.createElement('tr-ui-a-stack-frame');sfEl.stackFrame=sample.leafStackFrame;rows.push({title:'Stack trace',value:sfEl});table.tableRows=rows;table.rebuild();}});'use strict';tr.exportTo('tr.ui.analysis',function(){function zFunction(list){var n=list.length;if(n===0)
-return[];var z=new Array(n);z[0]=0;for(var i=1,left=0,right=0;i<n;++i){var maxLength;if(i<=right)
-maxLength=Math.min(right-i+1,z[i-left]);else
-maxLength=0;while(i+maxLength<n&&list[maxLength]===list[i+maxLength])
-++maxLength;if(i+maxLength-1>right){left=i;right=i+maxLength-1;}
-z[i]=maxLength;}
-return z;}
-function StackFrameTreeNode(title,opt_frame){this.title=title;this.frame=opt_frame;this.parent=undefined;this.children=[];this.childMap={};this.total=0;this.self=0;}
-StackFrameTreeNode.prototype={get subRows(){return this.children;},get stackTraceTitles(){var titles=[];for(var currentNode=this;currentNode!==undefined;currentNode=currentNode.parent){titles.push(currentNode.title);}
-return titles;},getOrCreateChild:function(title,opt_frame){var childNode=this.childMap[title];if(childNode!==undefined)
-return childNode;childNode=new StackFrameTreeNode(title,opt_frame);childNode.parent=this;this.children.push(childNode);this.childMap[title]=childNode;return childNode;},addStackTrace:function(trace,value,opt_traceContainsRootFrame){var currentNode=this;var startIndex=trace.length-(opt_traceContainsRootFrame?2:1);for(var i=startIndex;i>=0;i--){currentNode.total+=value;var stackFrame=trace[i];currentNode=currentNode.getOrCreateChild(stackFrame.title,stackFrame);}
-currentNode.total+=value;currentNode.self+=value;},convertToBottomUpView:function(){var bottomUpViewRoot=new StackFrameTreeNode(this.title,this.frame);bottomUpViewRoot.total=this.total;bottomUpViewRoot.self=this.self;this.addChildrenToBottomUpViewRecursively_(bottomUpViewRoot);return bottomUpViewRoot;},addChildrenToBottomUpViewRecursively_:function(bottomUpViewRoot){this.children.forEach(function(child){child.addToBottomUpViewRecursively_(bottomUpViewRoot);});},addToBottomUpViewRecursively_:function(bottomUpViewRoot){var remainingRecursiveSuffixLength=this.calculateRecursiveSuffixLength_();var bottomUpParentNode=bottomUpViewRoot;for(var topDownNode=this;topDownNode.parent!==undefined;topDownNode=topDownNode.parent){var bottomUpChildNode=bottomUpParentNode.getOrCreateChild(topDownNode.title,topDownNode.frame);bottomUpChildNode.self+=this.self;if(remainingRecursiveSuffixLength>0)
-remainingRecursiveSuffixLength--;else
-bottomUpChildNode.total+=this.total;bottomUpParentNode=bottomUpChildNode;}
-this.addChildrenToBottomUpViewRecursively_(bottomUpViewRoot);},calculateRecursiveSuffixLength_:function(){var maxLengths=zFunction(this.stackTraceTitles);var recursiveSuffixLength=0;for(var i=0;i<maxLengths.length;i++)
-recursiveSuffixLength=Math.max(recursiveSuffixLength,maxLengths[i]);return recursiveSuffixLength;}};return{StackFrameTreeNode:StackFrameTreeNode,zFunction:zFunction};});'use strict';(function(){Polymer('tr-ui-a-multi-sample-sub-view',{ready:function(){this.viewSelector_=this.$.view_selector;this.selection_=undefined;this.viewSelector_.addEventListener('change',this.viewSelectorChanged_.bind(this));},viewSelectorChanged_:function(){this.samplingData_=this.createSamplingSummary_(this.selection_,this.viewSelector_.value);this.updateContents_();},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;this.samplingData_=this.createSamplingSummary_(selection,this.viewSelector_.value);this.updateContents_();},createSamplingSummary_:function(selection,viewOption){var root=new tr.ui.analysis.StackFrameTreeNode('(root)',undefined);var samples=selection.getEventsOrganizedByBaseType().sample;samples.forEach(function(sample){root.addStackTrace(sample.stackTrace,1);});switch(viewOption){case'TOPDOWNVIEW':return root;case'BOTTOMUPVIEW':return root.convertToBottomUpView();default:throw new Error('Unknown sampling summary view option: \''+viewOption+'\'');}},updateContents_:function(){var columns=[this.createPercentColumn_('Total'),this.createSamplesColumn_('Total'),this.createPercentColumn_('Self'),this.createSamplesColumn_('Self'),{title:'Symbol',value:function(row){return row.title;},width:'250px',cmp:function(a,b){return a.title.localeCompare(b.title);},showExpandButtons:true}];this.$.table.tableColumns=columns;this.$.table.sortColumnIndex=1;this.$.table.sortDescending=true;this.$.table.tableRows=this.samplingData_.subRows;this.$.table.rebuild();},createPercentColumn_:function(title){var field=title.toLowerCase();return{title:title+' percent',value:function(row){var percent=row[field]/this.samplingData_.total;var span=document.createElement('tr-ui-u-scalar-span');span.value=(percent*100).toFixed(2);span.percentage=percent;span.unit=tr.b.u.Units.unitlessNumber;return span;}.bind(this),width:'60px',cmp:function(a,b){return a[field]-b[field];}};},createSamplesColumn_:function(title){var field=title.toLowerCase();return{title:title+' samples',value:function(row){return row[field];},width:'60px',cmp:function(a,b){return a[field]-b[field];}};}});})();'use strict';Polymer('tr-ui-a-single-interaction-record-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){this.textContent='';var realView=document.createElement('tr-ui-a-single-event-sub-view');this.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get relatedEventsToHighlight(){if(!this.currentSelection_)
-return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-multi-interaction-record-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.currentSelection_=selection;this.textContent='';var realView=document.createElement('tr-ui-a-multi-event-sub-view');this.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get selection(){return this.currentSelection_;},get relatedEventsToHighlight(){if(!this.currentSelection_)
-return undefined;var selection=new tr.model.EventSet();this.currentSelection_.forEach(function(ir){ir.associatedEvents.forEach(function(event){selection.push(event);});});return selection;}});'use strict';Polymer('tr-ui-a-alert-sub-view',{ready:function(){this.currentSelection_=undefined;this.$.table.tableColumns=[{title:'Label',value:function(row){return row.name;},width:'150px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];this.$.table.showHeader=false;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;this.updateContents_();},getRowsForSingleAlert_:function(alert){var rows=[];for(var argName in alert.args){var argView=document.createElement('tr-ui-a-generic-object-view');argView.object=alert.args[argName];rows.push({name:argName,value:argView});}
-if(alert.associatedEvents.length){alert.associatedEvents.forEach(function(event,i){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return event;},event.title);var valueString='';if(event instanceof tr.model.TimedEvent)
-valueString='took '+event.duration.toFixed(2)+'ms';rows.push({name:linkEl,value:valueString});});}
-var descriptionEl=tr.ui.b.createDiv({textContent:alert.info.description,maxWidth:'300px'});rows.push({name:'Description',value:descriptionEl});if(alert.info.docLinks){alert.info.docLinks.forEach(function(linkObject){var linkEl=document.createElement('a');linkEl.target='_blank';linkEl.href=linkObject.href;linkEl.textContent=linkObject.textContent;rows.push({name:linkObject.label,value:linkEl});});}
-return rows;},getRowsForAlerts_:function(alerts){if(alerts.length==1){var rows=[{name:'Alert',value:alerts[0].title}];var detailRows=this.getRowsForSingleAlert_(alerts[0]);rows.push.apply(rows,detailRows);return rows;}else{return alerts.map(function(alert){return{name:'Alert',value:alert.title,isExpanded:alerts.size<10,subRows:this.getRowsForSingleAlert_(alert)};},this);}},updateContents_:function(){if(this.currentSelection_===undefined){this.$.table.rows=[];this.$.table.rebuild();return;}
-var alerts=this.currentSelection_;this.$.table.tableRows=this.getRowsForAlerts_(alerts);this.$.table.rebuild();},get relatedEventsToHighlight(){if(!this.currentSelection_)
-return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-single-frame-sub-view',{ready:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!=1)
-throw new Error('Only supports single frame!');this.currentSelection_=selection;this.$.asv.selection=selection[0].associatedAlerts;},get relatedEventsToHighlight(){if(!this.currentSelection_)
-return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-multi-frame-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.textContent='';var realView=document.createElement('tr-ui-a-multi-event-sub-view');realView.eventsHaveDuration=false;realView.eventsHaveSubRows=false;this.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get selection(){return this.currentSelection_;},get relatedEventsToHighlight(){if(!this.currentSelection_)
-return undefined;var selection=new tr.model.EventSet();this.currentSelection_.forEach(function(frameEvent){frameEvent.associatedEvents.forEach(function(event){selection.push(event);});});return selection;}});'use strict';tr.exportTo('tr.ui.analysis',function(){var NO_BREAK_SPACE=String.fromCharCode(160);var COLLATOR=new Intl.Collator(undefined,{numeric:true});function TitleColumn(title){this.title=title;}
-TitleColumn.prototype={supportsCellSelection:false,value:function(row){var formattedTitle=this.formatTitle(row);var defined=row.defined;if(defined===undefined||defined.length===0)
-return formattedTitle;var firstDefined=defined[0];var lastDefined=defined[defined.length-1];var changeDefinedCount=0;for(var i=1;i<defined.length;i++){if(defined[i]!==defined[i-1])
-changeDefinedCount++;}
-var color=undefined;var prefix=undefined;if(!firstDefined&&lastDefined){color='red';prefix='+++';}else if(firstDefined&&!lastDefined){color='green';prefix='---';}
-if(changeDefinedCount>1){color='purple';}
-if(color===undefined&&prefix===undefined)
-return formattedTitle;var titleEl=document.createElement('span');if(prefix!==undefined){var prefixEl=tr.ui.b.createSpan({textContent:prefix});prefixEl.style.fontFamily='monospace';titleEl.appendChild(prefixEl);titleEl.appendChild(tr.ui.b.asHTMLOrTextNode(NO_BREAK_SPACE));}
-if(color!==undefined)
-titleEl.style.color=color;titleEl.appendChild(tr.ui.b.asHTMLOrTextNode(formattedTitle));return titleEl;},formatTitle:function(row){return row.title;},cmp:function(rowA,rowB){return COLLATOR.compare(rowA.title,rowB.title);}};function MemoryColumn(name,title,units,cellGetter,aggregationMode){this.name=name;this.title=title;this.units=units;this.cell=cellGetter;this.aggregationMode=aggregationMode;this.color=undefined;}
-MemoryColumn.fromRows=function(rows,cellKey,aggregationMode,opt_titleBuilder){var columnTraits={};function gatherTraits(row){if(row===undefined)
-return;var attrCells=row[cellKey];if(attrCells===undefined)
-return;tr.b.iterItems(attrCells,function(attrName,attrCell){if(attrCell===undefined)
-return;var attrValues=attrCell.attrs;if(attrValues===undefined)
-return;var existingTraits=columnTraits[attrName];attrValues.forEach(function(attrValue){if(attrValue===undefined)
-return;if(existingTraits===undefined){columnTraits[attrName]=existingTraits={constructor:attrValue.constructor,units:attrValue.units};return;}
-if(existingTraits.constructor!==attrValue.constructor||existingTraits.units!==attrValue.units){existingTraits.constructor=tr.model.UnknownAttribute;existingTraits.units=undefined;}});});if(row.subRows!==undefined)
-row.subRows.forEach(gatherTraits);};rows.forEach(gatherTraits);var titleBuilder=opt_titleBuilder||tr.b.identity;var columns=[];tr.b.iterItems(columnTraits,function(columnName,columnTraits){var cellGetter=fieldGetter(cellKey,columnName);var title=titleBuilder(columnName);columns.push(MemoryColumn.fromAttributeTraits(columnName,title,columnTraits,cellGetter,aggregationMode));});return columns;};MemoryColumn.fromAttributeTraits=function(name,title,traits,cellGetter,aggregationMode){var constructor;if(traits.constructor===tr.model.ScalarAttribute)
-constructor=ScalarMemoryColumn;else
-constructor=MemoryColumn;return new constructor(name,title,traits.units,cellGetter,aggregationMode);};MemoryColumn.spaceEqually=function(columns){var columnWidth=(100/columns.length).toFixed(3)+'%';columns.forEach(function(column){column.width=columnWidth;});};MemoryColumn.sortByImportance=function(columns,importanceRules){var positions=columns.map(function(column,srcIndex){return{importance:column.getImportance(importanceRules),column:column};});positions.sort(function(a,b){if(a.importance===b.importance)
-return COLLATOR.compare(a.column.name,b.column.name);return b.importance-a.importance;});positions.forEach(function(position,dstIndex){columns[dstIndex]=position.column;});};MemoryColumn.columnNamesToImportanceRules=function(columnNames){return columnNames.map(function(columnName,columnIndex){return{condition:columnName,importance:columnNames.length-columnIndex};});};MemoryColumn.iconFromAttributeInfoType=function(type){switch(type){case tr.model.AttributeInfoType.WARNING:return{symbol:String.fromCharCode(9888),color:'red'};case tr.model.AttributeInfoType.LINK:return{symbol:String.fromCharCode(9903)};case tr.model.AttributeInfoType.MEMORY_OWNER:return{symbol:String.fromCharCode(8702),color:'green'};case tr.model.AttributeInfoType.MEMORY_OWNED:return{symbol:String.fromCharCode(8701),color:'green'};case tr.model.AttributeInfoType.OVERALL_VALUE:return{symbol:String.fromCharCode(8614)};case tr.model.AttributeInfoType.RECENT_VALUE:return{symbol:String.fromCharCode(8618)};case tr.model.AttributeInfoType.HAS_HEAP_DUMP:return{symbol:String.fromCharCode(9283)};default:return{symbol:String.fromCharCode(9432),color:'blue'};}
-throw new Error('Unreachable');};MemoryColumn.AggregationMode={DIFF:0,MAX:1};MemoryColumn.prototype={attrs:function(row){var cell=this.cell(row);if(cell===undefined)
-return undefined;return cell.attrs;},value:function(row){var attrs=this.attrs(row);if(this.hasAllAttrsUndefined(attrs))
-return'';return this.formatAttributes(attrs);},hasAllAttrsUndefined:function(attrs){if(attrs===undefined)
-return true;return attrs.every(function(attr){return attr===undefined;});},formatAttributes:function(attrs){var formattedValue=this.formatAttributeValues(attrs);var color;if(typeof this.color==='function')
-color=this.color(attrs);else
-color=this.color;var infos=this.getInfos(attrs);if((color===undefined||formattedValue==='')&&infos.length===0)
-return formattedValue;var attrEl=document.createElement('span');attrEl.style.display='flex';attrEl.style.alignItems='center';attrEl.appendChild(tr.ui.b.asHTMLOrTextNode(formattedValue));infos.forEach(function(info){var infoEl=document.createElement('span');infoEl.style.paddingLeft='4px';infoEl.style.cursor='help';infoEl.style.fontWeight='bold';var icon=MemoryColumn.iconFromAttributeInfoType(info.type);infoEl.textContent=icon.symbol;if(icon.color!==undefined)
-infoEl.style.color=icon.color;infoEl.title=info.message;attrEl.appendChild(infoEl);},this);if(color!==undefined)
-attrEl.style.color=color;return attrEl;},formatAttributeValues:function(attrs){if(attrs.length===1)
-return this.formatSingleAttributeValue(attrs[0]);else
-return this.formatMultipleAttributeValues(attrs);},formatSingleAttributeValue:function(attr){return String(attr.value);},formatMultipleAttributeValues:function(attrs){var commonAttr=this.getCommonAttributeOrUndefined(attrs);if(commonAttr===undefined){return tr.ui.b.createSpan({textContent:'(multiple values)',italic:true});}
-return this.formatSingleAttributeValue(commonAttr);},cmp:function(rowA,rowB){var attrsA=this.attrs(rowA);var attrsB=this.attrs(rowB);if(attrsA!==undefined&&attrsB!==undefined&&attrsA.length!==attrsB.length)
-throw new Error('Different number of attributes');var undefinedA=this.hasAllAttrsUndefined(attrsA);var undefinedB=this.hasAllAttrsUndefined(attrsB);if(undefinedA&&undefinedB)
-return 0;if(undefinedA)
-return-1;if(undefinedB)
-return 1;return this.compareAttributes(attrsA,attrsB);},compareAttributes:function(attrsA,attrsB){if(attrsA.length===1)
-return this.compareSingleAttributes(attrsA[0],attrsB[0]);else
-return this.compareMultipleAttributes(attrsA,attrsB);},compareSingleAttributes:function(attrA,attrB){var strA=String(attrA.value);var strB=String(attrB.value);return COLLATOR.compare(strA,strB);},compareMultipleAttributes:function(attrsA,attrsB){var commonAttrA=this.getCommonAttributeOrUndefined(attrsA);var commonAttrB=this.getCommonAttributeOrUndefined(attrsB);var hasMultipleValuesA=commonAttrA===undefined;var hasMultipleValuesB=commonAttrB===undefined;if(hasMultipleValuesA&&hasMultipleValuesB)
-return 0;if(hasMultipleValuesA)
-return 1;if(hasMultipleValuesB)
-return-1;return this.compareSingleAttributes(commonAttrA,commonAttrB);},getCommonAttributeOrUndefined:function(attrs){var firstDefinedAttribute=undefined;for(var i=0;i<attrs.length;i++){var attr=attrs[i];if(attr===undefined)
-continue;if(firstDefinedAttribute===undefined){firstDefinedAttribute=attr;continue;}
-if(firstDefinedAttribute.value!==attr.value||firstDefinedAttribute.units!==attr.units){return undefined;}}
-return firstDefinedAttribute;},getInfos:function(attrs){if(attrs.length!==1){var hasDumpInfo=undefined;attrs.some(function(attr){if(attr===undefined)
-return false;return attr.infos.some(function(info){if(info.type!==tr.model.AttributeInfoType.HAS_HEAP_DUMP)
-return false;hasDumpInfo=info;return true;});});if(hasDumpInfo)
-return[hasDumpInfo];else
-return[];}
-return attrs[0].infos;},getImportance:function(importanceRules){if(importanceRules.length===0)
-return 0;for(var i=0;i<importanceRules.length;i++){var importanceRule=importanceRules[i];if(this.matchesNameCondition(importanceRule.condition))
-return importanceRule.importance;}
-var minImportance=importanceRules[0].importance;for(var i=1;i<importanceRules.length;i++){minImportance=Math.min(minImportance,importanceRules[i].importance);}
-return minImportance-1;},matchesNameCondition:function(condition){if(condition===undefined)
-return true;if(typeof(condition)==='string')
-return this.name===condition;return condition.test(this.name);}};function ScalarMemoryColumn(name,title,units,cellGetter,aggregationMode){MemoryColumn.call(this,name,title,units,cellGetter,aggregationMode);}
-ScalarMemoryColumn.prototype={__proto__:MemoryColumn.prototype,formatSingleAttributeValue:function(attr){return this.formatUnits(attr.value,false);},formatMultipleAttributeValues:function(attrs){switch(this.aggregationMode){case MemoryColumn.AggregationMode.DIFF:return this.formatUnits(this.getDiffAttrValue(attrs),true);case MemoryColumn.AggregationMode.MAX:return this.formatUnits(this.getMaxAttrValue(attrs),false);default:return tr.ui.b.createSpan({textContent:'(unsupported aggregation mode)',italic:true});}},formatUnits:function(value,isDelta){if(value===undefined)
-return'';var sizeEl=document.createElement('tr-ui-u-scalar-span');sizeEl.value=value;if(this.units==='bytes')
-sizeEl.unit=tr.b.u.Units.sizeInBytes;else
-sizeEl.unit=tr.b.u.Units.unitlessNumber;if(!isDelta)
-return sizeEl;sizeEl.isDelta=true;if(value===0)
-return sizeEl;var wrapperEl=document.createElement('span');wrapperEl.style.color=value>0?'red':'green';wrapperEl.appendChild(sizeEl);return wrapperEl;},compareSingleAttributes:function(attrA,attrB){return attrA.value-attrB.value;},compareMultipleAttributes:function(attrA,attrB){switch(this.aggregationMode){case MemoryColumn.AggregationMode.DIFF:var diffA=this.getDiffAttrValue(attrA)||0;var diffB=this.getDiffAttrValue(attrB)||0;return diffA-diffB;case MemoryColumn.AggregationMode.MAX:return this.getMaxAttrValue(attrA)-this.getMaxAttrValue(attrB);default:return 0;}},getDiffAttrValue:function(attrs){var firstAttr=attrs[0];var lastAttr=attrs[attrs.length-1];if(firstAttr===undefined&&lastAttr===undefined)
-return undefined;var firstValue=firstAttr===undefined?0:firstAttr.value;var lastValue=lastAttr===undefined?0:lastAttr.value;return lastValue-firstValue;},getMaxAttrValue:function(attrs){return attrs.reduce(function(accumulator,attr){if(attr===undefined)
-return accumulator;if(accumulator===undefined||attr.value>accumulator)
-accumulator=attr.value;return accumulator;},undefined);}};function MemoryCell(attrs){this.attrs=attrs;}
-MemoryCell.extractAttributes=function(cell){if(cell===undefined)
-return undefined;return cell.attrs;};function fieldGetter(){var fields=tr.b.asArray(arguments);return function(row){var value=row;for(var i=0;i<fields.length;i++)
-value=value[fields[i]];return value;};}
-var RECURSIVE_EXPANSION_MAX_SUB_ROW_COUNT=10;function expandTableRowsRecursively(table){function expandRowRecursively(row){if(row.subRows===undefined||row.subRows.length===0)
-return;if(row.subRows.length>RECURSIVE_EXPANSION_MAX_SUB_ROW_COUNT)
-return;table.setExpandedForTableRow(row,true);row.subRows.forEach(expandRowRecursively);}
-table.tableRows.forEach(expandRowRecursively);}
-function aggregateTableRowCellsRecursively(row,cellKey){var subRows=row.subRows;if(subRows===undefined)
-return;subRows.forEach(function(subRow){aggregateTableRowCellsRecursively(subRow,cellKey);});aggregateTableRowCells(row,subRows,cellKey);}
-function aggregateTableRowCells(row,subRows,cellKey){var rowCells=row[cellKey];if(rowCells===undefined)
-row[cellKey]=rowCells={};var subRowCellNames={};subRows.forEach(function(subRow){var subRowCells=subRow[cellKey];if(subRowCells===undefined)
-return;tr.b.iterItems(subRowCells,function(columnName){subRowCellNames[columnName]=true;});});tr.b.iterItems(subRowCellNames,function(cellName){var existingRowCell=rowCells[cellName];var existingRowAttributes=MemoryCell.extractAttributes(existingRowCell);var timestampCount=undefined;if(existingRowAttributes!==undefined)
-timestampCount=existingRowAttributes.length;subRows.forEach(function(subRow){var subRowCells=subRow[cellKey];if(subRowCells===undefined)
-return;var subRowCellAttributes=MemoryCell.extractAttributes(subRowCells[cellName]);if(subRowCellAttributes===undefined)
-return;if(timestampCount===undefined)
-timestampCount=subRowCellAttributes.length;else if(timestampCount!==subRowCellAttributes.length)
-throw new Error('Rows have different number of timestamps');});if(timestampCount===undefined)
-throw new Error('Handling non-existent cell name \''+cellName+'\'');var aggregatedAttributes=new Array(timestampCount);for(var i=0;i<timestampCount;i++){var existingRowAttribute=undefined;if(existingRowAttributes!==undefined)
-existingRowAttribute=existingRowAttributes[i];var subRowAttributes=subRows.map(function(subRow){var subRowCells=subRow[cellKey];if(subRowCells===undefined)
-return undefined;var subRowCellAttributes=MemoryCell.extractAttributes(subRowCells[cellName]);if(subRowCellAttributes===undefined)
-return;return subRowCellAttributes[i];});aggregatedAttributes[i]=tr.model.Attribute.aggregate(subRowAttributes,existingRowAttribute);}
-if(existingRowCell!==undefined){existingRowCell.attrs=aggregatedAttributes;}else{rowCells[cellName]=new MemoryCell(aggregatedAttributes);}});}
-function createCells(timeToValues,valueAttrsGetter,opt_cellAddedCallback){var attrNameToAttrs=tr.b.invertArrayOfDicts(timeToValues,valueAttrsGetter);return tr.b.mapItems(attrNameToAttrs,function(attrName,attrs){var cell=new tr.ui.analysis.MemoryCell(attrs);if(opt_cellAddedCallback!==undefined)
-opt_cellAddedCallback(attrName,cell);return cell;});}
-function addAttributeIfDefined(dstDict,attrName,attrClass,units,value,opt_addedCallback){if(value===undefined)
-return;var attr=new attrClass(units,value);dstDict[attrName]=attr;if(opt_addedCallback!==undefined)
-opt_addedCallback(attr);}
-return{TitleColumn:TitleColumn,MemoryColumn:MemoryColumn,ScalarMemoryColumn:ScalarMemoryColumn,MemoryCell:MemoryCell,fieldGetter:fieldGetter,expandTableRowsRecursively:expandTableRowsRecursively,aggregateTableRowCellsRecursively:aggregateTableRowCellsRecursively,aggregateTableRowCells:aggregateTableRowCells,createCells:createCells,addAttributeIfDefined:addAttributeIfDefined};});'use strict';Polymer('tr-ui-a-stacked-pane',{rebuild:function(){if(!this.paneDirty_){return;}
-this.paneDirty_=false;this.rebuildPane_();},scheduleRebuildPane_:function(){if(this.paneDirty_)
-return;this.paneDirty_=true;setTimeout(this.rebuild.bind(this),0);},rebuildPane_:function(){},set childPaneBuilder(childPaneBuilder){this.childPaneBuilder_=childPaneBuilder;this.dispatchEvent(new tr.b.Event('request-child-pane-change'));},get childPaneBuilder(){return this.childPaneBuilder_;},appended:function(){this.rebuild();}});'use strict';tr.exportTo('tr.ui.analysis',function(){var COLUMN_IMPORTANCE_RULES=tr.ui.analysis.MemoryColumn.columnNamesToImportanceRules(['Total size','Self size']);Polymer('tr-ui-a-memory-dump-heap-details-pane',{created:function(){this.heapDumps_=undefined;this.aggregationMode_=undefined;this.bottomUpView_=false;},ready:function(){this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;this.$.view_mode_container.appendChild(tr.ui.b.createSelector(this,'bottomUpView','memoryDumpHeapDetailsPane.bottomUpView',false,[{label:'Tree (top down)',value:false},{label:'Heavy (bottom up)',value:true}]));},set heapDumps(heapDumps){this.heapDumps_=heapDumps;this.scheduleRebuildPane_();},get heapDumps(){return this.heapDumps_;},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},set bottomUpView(bottomUpView){this.bottomUpView_=bottomUpView;this.scheduleRebuildPane_();},get bottomUpView(){return this.bottomUpView_;},rebuildPane_:function(){if(this.heapDumps_===undefined||this.heapDumps_.length===0){this.$.info_text.style.display='block';this.$.table.style.display='none';this.$.view_mode_container.style.display='none';this.$.table.clear();this.$.table.rebuild();return;}
-this.$.info_text.style.display='none';this.$.table.style.display='block';this.$.view_mode_container.style.display='block';var stackFrameTrees=this.createStackFrameTrees_(this.heapDumps_);var rows=this.createRows_(stackFrameTrees);var columns=this.createColumns_(rows);this.$.table.tableRows=rows;this.$.table.tableColumns=columns;this.$.table.rebuild();tr.ui.analysis.expandTableRowsRecursively(this.$.table);},createStackFrameTrees_:function(heapDumps){return heapDumps.map(function(heapDump){if(heapDump===undefined)
-return undefined;var rootNode=new tr.ui.analysis.StackFrameTreeNode(heapDump.allocatorName);var sumSize=undefined;heapDump.entries.forEach(function(entry){var size=entry.size;var leafStackFrame=entry.leafStackFrame;if(leafStackFrame===undefined){if(sumSize!==undefined)
-throw new Error('Multiple sum stack frames');sumSize=size;return;}
-rootNode.addStackTrace(leafStackFrame.stackTrace,size,true);},this);if(sumSize!==undefined&&sumSize>rootNode.total){var unspecifiedSize=sumSize-rootNode.total;rootNode.total=sumSize;var unspecifiedNode=rootNode.getOrCreateChild('<unspecified>');unspecifiedNode.total+=unspecifiedSize;unspecifiedNode.self+=unspecifiedSize;}
-if(this.bottomUpView)
-return rootNode.convertToBottomUpView();else
-return rootNode;},this);},createRows_:function(stackFrameTrees){return[this.createHeapRowRecursively_(stackFrameTrees)];},createHeapRowRecursively_:function(nodes){var title=tr.b.findFirstInArray(nodes).title;var defined=nodes.map(function(node){return node!==undefined;});var cells=tr.ui.analysis.createCells(nodes,function(node){return{'Total size':new tr.model.ScalarAttribute('bytes',node.total),'Self size':new tr.model.ScalarAttribute('bytes',node.self)};});var groupedChildNodes=tr.b.dictionaryValues(tr.b.invertArrayOfDicts(nodes,function(node){return node.children;}));var row={title:title,defined:defined,cells:cells};if(groupedChildNodes.length>0){row.subRows=groupedChildNodes.map(this.createHeapRowRecursively_,this);}
-return row;},createColumns_:function(rows){var titleColumn=new tr.ui.analysis.TitleColumn('Stack frame');titleColumn.width='500px';var attributeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'cells',this.aggregationMode_);tr.ui.analysis.MemoryColumn.sortByImportance(attributeColumns,COLUMN_IMPORTANCE_RULES);tr.ui.analysis.MemoryColumn.spaceEqually(attributeColumns);var columns=[titleColumn].concat(attributeColumns);return columns;}});return{};});'use strict';tr.exportTo('tr.ui.analysis',function(){var IMPORTANCE_RULES=[{condition:tr.model.MemoryAllocatorDump.SIZE_ATTRIBUTE_NAME,importance:10},{condition:tr.model.MemoryAllocatorDump.EFFECTIVE_SIZE_ATTRIBUTE_NAME,importance:9},{condition:'page_size',importance:0},{condition:/size/,importance:5},{importance:0}];function AllocatorDumpNameColumn(title){tr.ui.analysis.TitleColumn.call(this,title);}
-AllocatorDumpNameColumn.prototype={__proto__:tr.ui.analysis.TitleColumn.prototype,formatTitle:function(row){if(!row.suballocation)
-return row.title;return tr.ui.b.createSpan({textContent:row.title,italic:true,tooltip:row.fullName});}};Polymer('tr-ui-a-memory-dump-allocator-details-pane',{created:function(){this.memoryAllocatorDumps_=undefined;this.heapDumps_=undefined;this.aggregationMode_=undefined;},ready:function(){this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;},set memoryAllocatorDumps(memoryAllocatorDumps){this.memoryAllocatorDumps_=memoryAllocatorDumps;this.scheduleRebuildPane_();},get memoryAllocatorDumps(){return this.memoryAllocatorDumps_;},set heapDumps(heapDumps){this.heapDumps_=heapDumps;this.scheduleRebuildPane_();},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},rebuildPane_:function(){if(this.memoryAllocatorDumps_===undefined||this.memoryAllocatorDumps_.length===0){this.$.info_text.style.display='block';this.$.table.style.display='none';this.$.table.clear();this.$.table.rebuild();this.childPaneBuilder=undefined;return;}
-this.$.info_text.style.display='none';this.$.table.style.display='block';var rows=this.createRows_();var columns=this.createColumns_(rows);this.$.table.tableRows=rows;this.$.table.tableColumns=columns;this.$.table.rebuild();tr.ui.analysis.expandTableRowsRecursively(this.$.table);if(this.heapDumps_===undefined){this.childPaneBuilder=undefined;}else{this.childPaneBuilder=function(){var pane=document.createElement('tr-ui-a-memory-dump-heap-details-pane');pane.heapDumps=this.heapDumps_;pane.aggregationMode=this.aggregationMode_;return pane;}.bind(this);}},createRows_:function(){return[this.createAllocatorRowRecursively_(this.memoryAllocatorDumps_)];},createAllocatorRowRecursively_:function(dumps){var definedDump=tr.b.findFirstInArray(dumps);var title=definedDump.name;var fullName=definedDump.fullName;var defined=dumps.map(function(dump){return dump!==undefined;});var cells=tr.ui.analysis.createCells(dumps,function(dump){return dump.attributes;});var suballocatedBy=undefined;if(title.startsWith('__')){for(var i=0;i<dumps.length;i++){var dump=dumps[i];if(dump===undefined||dump.ownedBy.length===0){continue;}
-var ownerDump=dump.ownedBy[0].source;if(dump.ownedBy.length>1||dump.children.length>0||ownerDump.containerMemoryDump!==dump.containerMemoryDump){suballocatedBy=undefined;break;}
-if(suballocatedBy===undefined){suballocatedBy=ownerDump.fullName;}else if(suballocatedBy!==ownerDump.fullName){suballocatedBy=undefined;break;}}}
-var row={title:title,fullName:fullName,defined:defined,cells:cells,suballocatedBy:suballocatedBy};var childDumpNameToDumps=tr.b.invertArrayOfDicts(dumps,function(dump){return tr.b.arrayToDict(dump.children,function(child){return child.name;});});var subRows=[];var suballocationClassificationRootNode=undefined;tr.b.iterItems(childDumpNameToDumps,function(childName,childDumps){var childRow=this.createAllocatorRowRecursively_(childDumps);if(childRow.suballocatedBy===undefined){subRows.push(childRow);}else{suballocationClassificationRootNode=this.classifySuballocationRow_(childRow,suballocationClassificationRootNode);}},this);if(suballocationClassificationRootNode!==undefined){var suballocationRow=this.createSuballocationRowRecursively_('suballocations',suballocationClassificationRootNode);tr.ui.analysis.aggregateTableRowCellsRecursively(suballocationRow,'cells');subRows.push(suballocationRow);}
-if(subRows.length>0)
-row.subRows=subRows;return row;},classifySuballocationRow_:function(suballocationRow,rootNode){if(rootNode===undefined){rootNode={children:{},row:undefined};}
-var suballocationLevels=suballocationRow.suballocatedBy.split('/');var currentNode=rootNode;for(var i=0;i<suballocationLevels.length;i++){var suballocationLevel=suballocationLevels[i];var nextNode=currentNode.children[suballocationLevel];if(nextNode===undefined){currentNode.children[suballocationLevel]=nextNode={children:{},row:undefined};}
-var currentNode=nextNode;}
-if(currentNode.row!==undefined)
-throw new Error('Multiple suballocations with the same owner name');currentNode.row=suballocationRow;return rootNode;},createSuballocationRowRecursively_:function(name,node){var childCount=Object.keys(node.children).length;if(childCount===0){if(node.row===undefined)
-throw new Error('Suballocation node must have a row or children');var row=node.row;row.title=name;row.suballocation=true;return row;}
-var subRows=tr.b.dictionaryValues(tr.b.mapItems(node.children,this.createSuballocationRowRecursively_,this));if(node.row!==undefined){var row=node.row;row.title='<unspecified>';row.suballocation=true;subRows.unshift(row);}
-var defined=new Array(subRows[0].defined.length);for(var i=0;i<subRows.length;i++){subRows[i].defined.forEach(function(definedValue,index){defined[index]=defined[index]||definedValue;});}
-return{title:name,suballocation:true,defined:defined,cells:{},subRows:subRows};},createColumns_:function(rows){var titleColumn=new AllocatorDumpNameColumn('Component');titleColumn.width='200px';var attributeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'cells',this.aggregationMode_);tr.ui.analysis.MemoryColumn.spaceEqually(attributeColumns);tr.ui.analysis.MemoryColumn.sortByImportance(attributeColumns,IMPORTANCE_RULES);var columns=[titleColumn].concat(attributeColumns);return columns;}});return{};});'use strict';tr.exportTo('tr.ui.analysis',function(){var COLUMN_IMPORTANCE_RULES=tr.ui.analysis.MemoryColumn.columnNamesToImportanceRules(['Start address','Virtual size','Protection flags','PSS','Private dirty','Private clean','Shared dirty','Shared clean','Swapped']);var CLASSIFICATION_RULES={name:'Total',children:[{name:'Android',file:/^\/dev\/ashmem(?!\/libc malloc)/,children:[{name:'Java runtime',file:/^\/dev\/ashmem\/dalvik-/,children:[{name:'Spaces',file:/\/dalvik-(alloc|main|large object|non moving|zygote) space/,children:[{name:'Normal',file:/\/dalvik-(alloc|main)/},{name:'Large',file:/\/dalvik-large object/},{name:'Zygote',file:/\/dalvik-zygote/},{name:'Non-moving',file:/\/dalvik-non moving/}]},{name:'Linear Alloc',file:/\/dalvik-LinearAlloc/},{name:'Indirect Reference Table',file:/\/dalvik-indirect.ref/},{name:'Cache',file:/\/dalvik-jit-code-cache/},{name:'Accounting'}]},{name:'Cursor',file:/\/CursorWindow/},{name:'Ashmem'}]},{name:'Native heap',file:/^((\[heap\])|(\[anon:)|(\/dev\/ashmem\/libc malloc)|(\[discounted tracing overhead\])|$)/},{name:'Stack',file:/^\[stack/},{name:'Files',file:/\.((((jar)|(apk)|(ttf)|(odex)|(oat)|(arg))$)|(dex)|(so))/,children:[{name:'so',file:/\.so/},{name:'jar',file:/\.jar$/},{name:'apk',file:/\.apk$/},{name:'ttf',file:/\.ttf$/},{name:'dex',file:/\.((dex)|(odex$))/},{name:'oat',file:/\.oat$/},{name:'art',file:/\.art$/}]},{name:'Devices',file:/(^\/dev\/)|(anon_inode:dmabuf)/,children:[{name:'GPU',file:/\/((nv)|(mali)|(kgsl))/},{name:'DMA',file:/anon_inode:dmabuf/}]}]};function createEmptyRuleRow(rule){var row={title:rule.name,rule:rule,subRows:[]};if(rule.children!==undefined)
-row.subRows=rule.children.map(createEmptyRuleRow);return row;}
-function hexString(address,is64BitAddress){if(address===undefined)
-return undefined;var hexPadding=is64BitAddress?'0000000000000000':'00000000';return(hexPadding+address.toString(16)).substr(-hexPadding.length);}
-function classifyRegionRow(ruleRow,regionRow){var rule=ruleRow.rule;if(rule===undefined||rule.children===undefined||rule.children.length===0){ruleRow.subRows.push(regionRow);return;}
-function regionRowMatchesChildRule(childRule){var fileRegExp=childRule.file;if(fileRegExp===undefined)
-return true;return fileRegExp.test(regionRow.title);}
-var matchedChildRuleIndex=tr.b.findFirstIndexInArray(rule.children,regionRowMatchesChildRule);if(matchedChildRuleIndex===-1){matchedChildRuleIndex=rule.children.length;if(matchedChildRuleIndex>=ruleRow.subRows.length){ruleRow.subRows.push({title:'Other',subRows:[]});}}
-classifyRegionRow(ruleRow.subRows[matchedChildRuleIndex],regionRow);}
-function pruneEmptyRuleRows(row){if(row.subRows===undefined||row.subRows.length===0)
-return;if(row.subRows[0].rule===undefined){return;}
-row.subRows.forEach(pruneEmptyRuleRows);row.subRows=row.subRows.filter(function(subRow){return subRow.subRows.length>0;});}
-Polymer('tr-ui-a-memory-dump-vm-regions-details-pane',{created:function(){this.vmRegions_=undefined;this.aggregationMode_=undefined;},ready:function(){this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;},set vmRegions(vmRegions){this.vmRegions_=vmRegions;this.scheduleRebuildPane_();},get vmRegions(){return this.vmRegions_;},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},rebuildPane_:function(){var unclassifiedRows=[];if(this.vmRegions_!==undefined)
-unclassifiedRows=this.createUnclassifiedRows_(this.vmRegions_);if(unclassifiedRows.length===0){this.$.info_text.style.display='block';this.$.table.style.display='none';this.$.table.clear();this.$.table.rebuild();return;}
-this.$.info_text.style.display='none';this.$.table.style.display='block';var rows=this.classifyRows_(unclassifiedRows);var columns=this.createColumns_(rows);this.$.table.tableRows=rows;this.$.table.tableColumns=columns;this.$.table.rebuild();tr.ui.analysis.expandTableRowsRecursively(this.$.table);},joinRegions_:function(timeToRegionIdToRegion){return tr.b.dictionaryValues(tr.b.invertArrayOfDicts(timeToRegionIdToRegion,function(regionIdToRegion){return tr.b.arrayToDict(regionIdToRegion,function(region){return[region.mappedFile,region.startAddress].join('#');});}));},createUnclassifiedRows_:function(timeToRegionIdToRegion){var is64BitAddress=timeToRegionIdToRegion.some(function(regionIdToRegion){if(regionIdToRegion===undefined)
-return false;return regionIdToRegion.some(function(region){if(region.startAddress===undefined)
-return false;return region.startAddress>=4294967296;});});var regionIdToTimeToRegion=this.joinRegions_(timeToRegionIdToRegion);return regionIdToTimeToRegion.map(function(timeToRegion){var definedRegion=tr.b.findFirstInArray(timeToRegion);var defined=timeToRegion.map(function(region){return region!==undefined;});var constantCells=tr.ui.analysis.createCells([definedRegion],function(region){var attrs={};tr.ui.analysis.addAttributeIfDefined(attrs,'Start address',tr.model.StringAttribute,'',hexString(region.startAddress,is64BitAddress));return attrs;});var variableCells=tr.ui.analysis.createCells(timeToRegion,function(region){var attrs={};tr.ui.analysis.addAttributeIfDefined(attrs,'Virtual size',tr.model.ScalarAttribute,'bytes',region.sizeInBytes);tr.ui.analysis.addAttributeIfDefined(attrs,'Protection flags',tr.model.StringAttribute,'',region.protectionFlagsToString);tr.ui.analysis.addAttributeIfDefined(attrs,'PSS',tr.model.ScalarAttribute,'bytes',region.byteStats.proportionalResident);tr.ui.analysis.addAttributeIfDefined(attrs,'Private dirty',tr.model.ScalarAttribute,'bytes',region.byteStats.privateDirtyResident);tr.ui.analysis.addAttributeIfDefined(attrs,'Private clean',tr.model.ScalarAttribute,'bytes',region.byteStats.privateCleanResident);tr.ui.analysis.addAttributeIfDefined(attrs,'Shared dirty',tr.model.ScalarAttribute,'bytes',region.byteStats.sharedDirtyResident);tr.ui.analysis.addAttributeIfDefined(attrs,'Shared clean',tr.model.ScalarAttribute,'bytes',region.byteStats.sharedCleanResident);tr.ui.analysis.addAttributeIfDefined(attrs,'Swapped',tr.model.ScalarAttribute,'bytes',region.byteStats.swapped);return attrs;});return{title:definedRegion.mappedFile||'',defined:defined,constantCells:constantCells,variableCells:variableCells};});},classifyRows_:function(unclassifiedRows){var rootRow=createEmptyRuleRow(CLASSIFICATION_RULES);unclassifiedRows.map(classifyRegionRow.bind(undefined,rootRow));pruneEmptyRuleRows(rootRow);tr.ui.analysis.aggregateTableRowCellsRecursively(rootRow,'constantCells');tr.ui.analysis.aggregateTableRowCellsRecursively(rootRow,'variableCells');return[rootRow];},createColumns_:function(rows){var titleColumn=new tr.ui.analysis.TitleColumn('Mapped file');titleColumn.width='200px';var constantColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'constantCells');var variableColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'variableCells',this.aggregationMode_);var attributeColumns=constantColumns.concat(variableColumns);tr.ui.analysis.MemoryColumn.sortByImportance(attributeColumns,COLUMN_IMPORTANCE_RULES);tr.ui.analysis.MemoryColumn.spaceEqually(attributeColumns);var columns=[titleColumn].concat(attributeColumns);return columns;}});return{};});'use strict';Polymer('tr-ui-b-color-legend',{ready:function(){var blackSquareCharCode=9632;this.$.square.innerText=String.fromCharCode(blackSquareCharCode);this.label_=undefined;this.compoundEventSelectionState_=tr.model.CompoundEventSelectionState.NOT_SELECTED;},set compoundEventSelectionState(compoundEventSelectionState){this.compoundEventSelectionState_=compoundEventSelectionState;},get label(){return this.label_;},set label(label){if(label===undefined){this.setLabelAndColorId(undefined,undefined);return;}
-var colorId=tr.b.ColorScheme.getColorIdForGeneralPurposeString(label);this.setLabelAndColorId(label,colorId);},setLabelAndColorId:function(label,colorId){this.label_=label;this.$.label.textContent='';this.$.label.appendChild(tr.ui.b.asHTMLOrTextNode(label));if(colorId===undefined)
-this.$.square.style.color='initial';else
-this.$.square.style.color=tr.b.ColorScheme.colorsAsStrings[colorId];}});'use strict';Polymer('tr-ui-b-view-specific-brushing-state',{get viewId(){return this.getAttribute('view-id');},set viewId(viewId){this.setAttribute('view-id',viewId);},get:function(){var viewId=this.viewId;if(!viewId)
-throw new Error('Element must have a view-id attribute!');var brushingStateController=tr.c.BrushingStateController.getControllerForElement(this);if(!brushingStateController)
-return undefined;return brushingStateController.getViewSpecificBrushingState(viewId);},set:function(state){var viewId=this.viewId;if(!viewId)
-throw new Error('Element must have a view-id attribute!');var brushingStateController=tr.c.BrushingStateController.getControllerForElement(this);if(!brushingStateController)
-return;brushingStateController.changeViewSpecificBrushingState(viewId,state);}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ColorScheme=tr.b.ColorScheme;var USED_MEMORY_SIZE_COLUMNS_IMPORTANCE_RULES=tr.ui.analysis.MemoryColumn.columnNamesToImportanceRules(['Total resident','Peak total resident','PSS','Private dirty','Swapped']);var ALLOCATOR_SIZE_COLUMNS_IMPORTANCE_RULES=[{condition:'tracing',importance:0},{importance:1}];var DISPLAYED_SIZE_ATTRIBUTE_NAME=tr.model.MemoryAllocatorDump.DISPLAYED_SIZE_ATTRIBUTE_NAME;var LINK_SYMBOL=String.fromCharCode(9903);var GREATER_THAN_OR_EQUAL_TO_SYMBOL=String.fromCharCode(8805);function ProcessNameColumn(title){tr.ui.analysis.TitleColumn.call(this,title);}
-ProcessNameColumn.prototype={__proto__:tr.ui.analysis.TitleColumn.prototype,formatTitle:function(row){if(row.noLegend)
-return row.title;var titleEl=document.createElement('tr-ui-b-color-legend');titleEl.label=row.title;return titleEl;}};Polymer('tr-ui-a-memory-dump-overview-pane',{created:function(){this.processMemoryDumps_=undefined;this.aggregationMode_=undefined;},ready:function(){this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.CELL;this.$.table.addEventListener('selection-changed',function(tableEvent){tableEvent.stopPropagation();this.changeChildPane_();}.bind(this));},set processMemoryDumps(processMemoryDumps){this.processMemoryDumps_=processMemoryDumps;this.scheduleRebuildPane_();},get processMemoryDumps(){return this.processMemoryDumps_;},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},get selectedMemoryCell(){if(this.processMemoryDumps_===undefined||this.processMemoryDumps_.length===0){return undefined;}
-var selectedTableRow=this.$.table.selectedTableRow;if(!selectedTableRow)
-return undefined;var selectedColumnIndex=this.$.table.selectedColumnIndex;if(selectedColumnIndex===undefined)
-return undefined;var selectedColumn=this.$.table.tableColumns[selectedColumnIndex];var selectedMemoryCell=selectedColumn.cell(selectedTableRow);return selectedMemoryCell;},changeChildPane_:function(){this.storeSelection_();var builder=undefined;if(this.selectedMemoryCell!==undefined)
-builder=this.selectedMemoryCell.buildDetailsPane;this.childPaneBuilder=builder;},rebuildPane_:function(){if(this.processMemoryDumps_===undefined||this.processMemoryDumps_.length===0){this.$.info_text.style.display='block';this.$.table.style.display='none';this.$.table.clear();this.$.table.rebuild();return;}
-this.$.info_text.style.display='none';this.$.table.style.display='block';var rows=this.createRows_();var footerRows=this.createFooterRows_(rows);var columns=this.createColumns_(rows);this.$.table.tableRows=rows;this.$.table.footerRows=footerRows;this.$.table.tableColumns=columns;this.$.table.rebuild();this.restoreSelection_();},createRows_:function(){var timeToPidToProcessMemoryDump=this.processMemoryDumps_;var pidToTimeToProcessMemoryDump=tr.b.invertArrayOfDicts(timeToPidToProcessMemoryDump);var rows=[];var aggregationMode=this.aggregationMode_;return tr.b.dictionaryValues(tr.b.mapItems(pidToTimeToProcessMemoryDump,function(pid,timeToDump){var process=tr.b.findFirstInArray(timeToDump).process;var defined=timeToDump.map(function(dump){return dump!==undefined;});var timeToVmRegions=timeToDump.map(function(dump){if(dump===undefined)
-return undefined;return dump.mostRecentVmRegions;});function buildVmRegionsPane(){var pane=document.createElement('tr-ui-a-memory-dump-vm-regions-details-pane');pane.vmRegions=timeToVmRegions;pane.aggregationMode=aggregationMode;return pane;}
-var usedMemoryCells=tr.ui.analysis.createCells(timeToDump,function(dump){var sizes={};if(dump.totals!==undefined){tr.ui.analysis.addAttributeIfDefined(sizes,'Total resident',tr.model.ScalarAttribute,'bytes',dump.totals.residentBytes);tr.ui.analysis.addAttributeIfDefined(sizes,'Peak total resident',tr.model.ScalarAttribute,'bytes',dump.totals.peakResidentBytes,function(attr){if(dump.totals.arePeakResidentBytesResettable){attr.infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.RECENT_VALUE,'Peak RSS since previous memory dump.'));}else{attr.infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.OVERALL_VALUE,'Peak RSS since process startup. Finer grained '+'peaks require a Linux kernel version '+
-GREATER_THAN_OR_EQUAL_TO_SYMBOL+' 4.0.'));}});}
-var vmRegionAttributeAddedCallback=undefined;if(!dump.hasOwnVmRegions){vmRegionAttributeAddedCallback=function(attr){attr.infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.LINK,'Older value (process did not dump memory maps).'));attr.isOlderValue=true;};}
-tr.ui.analysis.addAttributeIfDefined(sizes,'PSS',tr.model.ScalarAttribute,'bytes',dump.getMostRecentTotalVmRegionStat('proportionalResident'),vmRegionAttributeAddedCallback);tr.ui.analysis.addAttributeIfDefined(sizes,'Private dirty',tr.model.ScalarAttribute,'bytes',dump.getMostRecentTotalVmRegionStat('privateDirtyResident'),vmRegionAttributeAddedCallback);tr.ui.analysis.addAttributeIfDefined(sizes,'Swapped',tr.model.ScalarAttribute,'bytes',dump.getMostRecentTotalVmRegionStat('swapped'),vmRegionAttributeAddedCallback);return sizes;},function(attrName,cell){cell.buildDetailsPane=buildVmRegionsPane;});var allocatorCells=tr.ui.analysis.createCells(timeToDump,function(dump){if(dump.memoryAllocatorDumps===undefined)
-return undefined;var sizes={};dump.memoryAllocatorDumps.forEach(function(allocatorDump){var rootAttribute=allocatorDump.attributes[DISPLAYED_SIZE_ATTRIBUTE_NAME];if(rootAttribute===undefined)
-return;var allocatorName=allocatorDump.fullName;var overviewAttribute=new rootAttribute.constructor(rootAttribute.units,rootAttribute.value);if(dump.heapDumps!==undefined&&dump.heapDumps[allocatorName]!==undefined){overviewAttribute.infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.HAS_HEAP_DUMP,'Heap dump provided'));}
-sizes[allocatorName]=overviewAttribute;});return sizes;},function(allocatorName,cell){var memoryAllocatorDumps=timeToDump.map(function(dump){if(dump===undefined)
-return undefined;return dump.getMemoryAllocatorDumpByFullName(allocatorName);});var heapDumps=undefined;timeToDump.forEach(function(dump,index){if(dump===undefined||dump.heapDumps===undefined)
-return;if(heapDumps===undefined)
-heapDumps=new Array(timeToDump.length);heapDumps[index]=dump.heapDumps[allocatorName];});cell.buildDetailsPane=function(){var pane=document.createElement('tr-ui-a-memory-dump-allocator-details-pane');pane.memoryAllocatorDumps=memoryAllocatorDumps;pane.heapDumps=heapDumps;pane.aggregationMode=aggregationMode;return pane;};});return{title:process.userFriendlyName,defined:defined,usedMemoryCells:usedMemoryCells,allocatorCells:allocatorCells};}));},createFooterRows_:function(rows){if(rows.length<=1)
-return[];var totalRow={title:'Total',noLegend:true};tr.ui.analysis.aggregateTableRowCells(totalRow,rows,'usedMemoryCells');tr.ui.analysis.aggregateTableRowCells(totalRow,rows,'allocatorCells');return[totalRow];},createColumns_:function(rows){var titleColumn=new ProcessNameColumn('Process');titleColumn.width='200px';var usedMemorySizeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'usedMemoryCells',this.aggregationMode_);tr.ui.analysis.MemoryColumn.sortByImportance(usedMemorySizeColumns,USED_MEMORY_SIZE_COLUMNS_IMPORTANCE_RULES);var allocatorSizeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'allocatorCells',this.aggregationMode_,function(allocatorName){var titleEl=document.createElement('tr-ui-b-color-legend');titleEl.label=allocatorName;return titleEl;});tr.ui.analysis.MemoryColumn.sortByImportance(allocatorSizeColumns,ALLOCATOR_SIZE_COLUMNS_IMPORTANCE_RULES);var tracingColumn=tr.b.findFirstInArray(allocatorSizeColumns,function(column){return column.name==='tracing';});if(tracingColumn!==undefined){var tracingColumnColor=ColorScheme.getColorForReservedNameAsString('tracing_memory_column');tracingColumn.title=tr.ui.b.createSpan({textContent:'tracing',color:tracingColumnColor});tracingColumn.color=tracingColumnColor;}
-usedMemorySizeColumns.forEach(function(column){var olderUsedMCC=ColorScheme.getColorForReservedNameAsString('older_used_memory_column');var usedMCC=ColorScheme.getColorForReservedNameAsString('used_memory_column');column.title=tr.ui.b.createSpan({textContent:column.title,color:usedMCC});column.color=function(attrs){return attrs.length===1&&attrs[0].isOlderValue?olderUsedMCC:usedMCC;}});var sizeColumns=usedMemorySizeColumns.concat(allocatorSizeColumns);tr.ui.analysis.MemoryColumn.spaceEqually(sizeColumns);var columns=[titleColumn].concat(sizeColumns);return columns;},storeSelection_:function(){var selectedRowTitle;var selectedRow=this.$.table.selectedTableRow;if(selectedRow!==undefined)
-selectedRowTitle=selectedRow.title;var selectedColumnName;var selectedColumnIndex=this.$.table.selectedColumnIndex;if(selectedColumnIndex!==undefined){var selectedColumn=this.$.table.tableColumns[selectedColumnIndex];selectedColumnName=selectedColumn.name;}
-this.$.state.set({rowTitle:selectedRowTitle,columnName:selectedColumnName});},restoreSelection_:function(){var settings=this.$.state.get();if(settings===undefined||settings.rowTitle===undefined||settings.columnName===undefined)
-return;var selectedColumnName=settings.columnName;var selectedColumnIndex=tr.b.findFirstIndexInArray(this.$.table.tableColumns,function(column){return column.name===selectedColumnName;});if(selectedColumnIndex<0)
-return;var selectedRowTitle=settings.rowTitle;var selectedRow=tr.b.findFirstInArray(this.$.table.tableRows,function(row){return row.title===selectedRowTitle;});if(selectedRow===undefined)
-return;this.$.table.selectedTableRow=selectedRow;this.$.table.selectedColumnIndex=selectedColumnIndex;}});return{};});'use strict';tr.exportTo('tr.ui.analysis',function(){Polymer('tr-ui-a-memory-dump-header-pane',{created:function(){this.containerMemoryDumps_=undefined;},ready:function(){this.$.aggregation_mode_container.appendChild(tr.ui.b.createSelector(this,'aggregationMode','memoryDumpHeaderPane.aggregationMode',tr.ui.analysis.MemoryColumn.AggregationMode.DIFF,[{label:'Diff',value:tr.ui.analysis.MemoryColumn.AggregationMode.DIFF},{label:'Max',value:tr.ui.analysis.MemoryColumn.AggregationMode.MAX}]));},set containerMemoryDumps(containerMemoryDumps){this.containerMemoryDumps_=containerMemoryDumps;this.scheduleRebuildPane_();},get containerMemoryDumps(){return this.containerMemoryDumps_;},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},rebuildPane_:function(){this.updateLabel_();this.updateAggregationModeSelector_();this.changeChildPane_();},updateLabel_:function(){this.$.label.textContent='';if(this.containerMemoryDumps_===undefined||this.containerMemoryDumps_.length<=0){this.$.label.textContent='No memory dumps selected';return;}
-var containerDumpCount=this.containerMemoryDumps_.length;var isMultiSelection=containerDumpCount>1;this.$.label.appendChild(document.createTextNode('Selected '+containerDumpCount+' memory dump'+
-(isMultiSelection?'s':'')+' in '+this.containerMemoryDumps_[0].containerName+' at '));this.$.label.appendChild(document.createTextNode(tr.b.u.TimeStamp.format(this.containerMemoryDumps_[0].start)));if(isMultiSelection){var ELLIPSIS=String.fromCharCode(8230);this.$.label.appendChild(document.createTextNode(ELLIPSIS));this.$.label.appendChild(document.createTextNode(tr.b.u.TimeStamp.format(this.containerMemoryDumps_[containerDumpCount-1].start)));}},updateAggregationModeSelector_:function(){var displayStyle;if(this.containerMemoryDumps_===undefined||this.containerMemoryDumps_.length<=1)
-displayStyle='none';else
-displayStyle='initial';this.$.aggregation_mode_container.style.display=displayStyle;},changeChildPane_:function(){this.childPaneBuilder=function(){if(this.containerMemoryDumps_===undefined||this.containerMemoryDumps_.length<=0)
-return undefined;var overviewPane=document.createElement('tr-ui-a-memory-dump-overview-pane');overviewPane.processMemoryDumps=this.containerMemoryDumps_.map(function(containerDump){return containerDump.processMemoryDumps;});overviewPane.aggregationMode=this.aggregationMode;return overviewPane;}.bind(this);}});return{};});'use strict';Polymer('tr-ui-a-stacked-pane-view',{setPaneBuilder:function(paneBuilder,opt_parentPane){var paneContainer=this.$.pane_container;if(opt_parentPane){if(!(opt_parentPane instanceof HTMLElement))
-throw new Error('Parent pane must be an HTML element');if(opt_parentPane.parentElement!==paneContainer)
-throw new Error('Parent pane must be a child of the pane container');}
-while(paneContainer.lastElementChild!==null&&paneContainer.lastElementChild!==opt_parentPane){var removedPane=this.$.pane_container.lastElementChild;var listener=this.listeners_.get(removedPane);if(listener===undefined)
-throw new Error('No listener associated with pane');this.listeners_.delete(removedPane);removedPane.removeEventListener('request-child-pane-change',listener);paneContainer.removeChild(removedPane);}
-if(opt_parentPane&&opt_parentPane.parentElement!==paneContainer)
-throw new Error('Parent pane was removed from the pane container');if(!paneBuilder)
-return;var pane=paneBuilder();if(!pane)
-return;if(!(pane instanceof HTMLElement))
-throw new Error('Pane must be an HTML element');var listener=function(event){this.setPaneBuilder(pane.childPaneBuilder,pane);}.bind(this);if(!this.listeners_){this.listeners_=new WeakMap();}
-this.listeners_.set(pane,listener);pane.addEventListener('request-child-pane-change',listener);paneContainer.appendChild(pane);pane.appended();},rebuild:function(){var currentPane=this.$.pane_container.firstElementChild;while(currentPane){currentPane.rebuild();currentPane=currentPane.nextElementSibling;}},get panesForTesting(){var panes=[];var currentChild=this.$.pane_container.firstElementChild;while(currentChild){panes.push(currentChild);currentChild=currentChild.nextElementSibling;}
-return panes;}});'use strict';tr.exportTo('tr.ui.analysis',function(){Polymer('tr-ui-a-container-memory-dump-sub-view',{set selection(selection){if(selection===undefined){this.currentSelection_=undefined;this.dumpsByContainerName_=undefined;this.updateContents_();return;}
-selection.forEach(function(event){if(!(event instanceof tr.model.ContainerMemoryDump)){throw new Error('Memory dump sub-view only supports container memory dumps');}});this.currentSelection_=selection;this.dumpsByContainerName_=tr.b.group(this.currentSelection_.toArray(),function(dump){return dump.containerName;});tr.b.iterItems(this.dumpsByContainerName_,function(containerName,dumps){dumps.sort(function(a,b){return a.start-b.start;});});this.updateContents_();},get selection(){return this.currentSelection_;},get requiresTallView(){return true;},updateContents_:function(){this.$.content.textContent='';if(this.dumpsByContainerName_===undefined)
-return;var containerNames=Object.keys(this.dumpsByContainerName_);if(containerNames.length===0)
-return;if(containerNames.length>1)
-this.buildViewForMultipleContainerNames_();else
-this.buildViewForSingleContainerName_();},buildViewForSingleContainerName_:function(){var containerMemoryDumps=this.currentSelection_;var dumpView=this.ownerDocument.createElement('tr-ui-a-stacked-pane-view');this.$.content.appendChild(dumpView);dumpView.setPaneBuilder(function(){var headerPane=document.createElement('tr-ui-a-memory-dump-header-pane');headerPane.containerMemoryDumps=containerMemoryDumps;return headerPane;});},buildViewForMultipleContainerNames_:function(){var ownerDocument=this.ownerDocument;var rows=tr.b.dictionaryValues(tr.b.mapItems(this.dumpsByContainerName_,function(containerName,dumps){return{containerName:containerName,subRows:dumps,isExpanded:true};}));rows.sort(function(a,b){return a.containerName.localeCompare(b.containerName);});var columns=[{title:'Dump',value:function(row){if(row.subRows===undefined)
-return this.singleDumpValue_(row);else
-return this.groupedDumpValue_(row);},singleDumpValue_:function(row){var linkEl=ownerDocument.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(new tr.model.EventSet([row]));linkEl.appendChild(tr.ui.units.createTimeStampSpan(row.start,{ownerDocument:ownerDocument}));return linkEl;},groupedDumpValue_:function(row){var linkEl=ownerDocument.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(new tr.model.EventSet(row.subRows));linkEl.appendChild(tr.ui.b.createSpan({ownerDocument:ownerDocument,textContent:row.subRows.length+' memory dump'+
-(row.subRows.length===1?'':'s')+' in '}));linkEl.appendChild(tr.ui.b.createSpan({ownerDocument:ownerDocument,textContent:row.containerName,bold:true}));return linkEl;}}];var table=this.ownerDocument.createElement('tr-ui-b-table');table.tableColumns=columns;table.tableRows=rows;table.showHeader=false;table.rebuild();this.$.content.appendChild(table);}});return{};});'use strict';var EventSet=tr.model.EventSet;Polymer('tr-ui-a-power-sample-table',{ready:function(){this.$.table.tableColumns=[{title:'Time',width:'100px',value:function(row){return tr.ui.units.createTimeStampSpan(row.start);}},{title:'Power (mW)',width:'100%',value:function(row){return row.power;}}];this.samples=new EventSet();},get samples(){return this.samples_;},set samples(samples){this.samples_=(samples===undefined)?new EventSet():samples;this.updateContents_();},updateContents_:function(){this.$.table.tableRows=this.samples.toArray();this.$.table.rebuild();}});'use strict';Polymer('tr-ui-a-single-power-sample-sub-view',{ready:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;this.updateContents_();},updateContents_:function(){this.$.samplesTable.samples=this.selection;}});!function(){function n(n){return null!=n&&!isNaN(n)}function t(n){return n.length}function e(n){for(var t=1;n*t%1;)t*=10;return t}function r(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function u(){}function i(n){return aa+n in this}function o(n){return n=aa+n,n in this&&delete this[n]}function a(){var n=[];return this.forEach(function(t){n.push(t)}),n}function c(){var n=0;for(var t in this)t.charCodeAt(0)===ca&&++n;return n}function s(){for(var n in this)if(n.charCodeAt(0)===ca)return!1;return!0}function l(){}function f(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function h(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var e=0,r=sa.length;r>e;++e){var u=sa[e]+t;if(u in n)return u}}function g(){}function p(){}function v(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new u;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function d(){Xo.event.preventDefault()}function m(){for(var n,t=Xo.event;n=t.sourceEvent;)t=n;return t}function y(n){for(var t=new p,e=0,r=arguments.length;++e<r;)t[arguments[e]]=v(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=Xo.event;u.target=n,Xo.event=u,t[u.type].apply(e,r)}finally{Xo.event=i}}},t}function x(n){return fa(n,da),n}function M(n){return"function"==typeof n?n:function(){return ha(n,this)}}function _(n){return"function"==typeof n?n:function(){return ga(n,this)}}function b(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=Xo.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function w(n){return n.trim().replace(/\s+/g," ")}function S(n){return new RegExp("(?:^|\\s+)"+Xo.requote(n)+"(?:\\s+|$)","g")}function k(n){return n.trim().split(/^|\s+/)}function E(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=k(n).map(A);var u=n.length;return"function"==typeof t?r:e}function A(n){var t=S(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",w(u+" "+n))):e.setAttribute("class",w(u.replace(t," ")))}}function C(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function N(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function L(n){return"function"==typeof n?n:(n=Xo.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function T(n){return{__data__:n}}function q(n){return function(){return va(this,n)}}function z(n){return arguments.length||(n=Xo.ascending),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function R(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function D(n){return fa(n,ya),n}function P(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function U(){var n=this.__transition__;n&&++n.active}function j(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,Bo(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+Xo.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=H;a>0&&(n=n.substring(0,a));var s=Ma.get(n);return s&&(n=s,c=F),a?t?u:r:t?g:i}function H(n,t){return function(e){var r=Xo.event;Xo.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{Xo.event=r}}}function F(n,t){var e=H(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function O(){var n=".dragsuppress-"+ ++ba,t="click"+n,e=Xo.select(Go).on("touchmove"+n,d).on("dragstart"+n,d).on("selectstart"+n,d);if(_a){var r=Jo.style,u=r[_a];r[_a]="none"}return function(i){function o(){e.on(t,null)}e.on(n,null),_a&&(r[_a]=u),i&&(e.on(t,function(){d(),o()},!0),setTimeout(o,0))}}function Y(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>wa&&(Go.scrollX||Go.scrollY)){e=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();wa=!(u.f||u.e),e.remove()}return wa?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function I(n){return n>0?1:0>n?-1:0}function Z(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function V(n){return n>1?0:-1>n?Sa:Math.acos(n)}function X(n){return n>1?Ea:-1>n?-Ea:Math.asin(n)}function $(n){return((n=Math.exp(n))-1/n)/2}function B(n){return((n=Math.exp(n))+1/n)/2}function W(n){return((n=Math.exp(2*n))-1)/(n+1)}function J(n){return(n=Math.sin(n/2))*n}function G(){}function K(n,t,e){return new Q(n,t,e)}function Q(n,t,e){this.h=n,this.s=t,this.l=e}function nt(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,gt(u(n+120),u(n),u(n-120))}function tt(n,t,e){return new et(n,t,e)}function et(n,t,e){this.h=n,this.c=t,this.l=e}function rt(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),ut(e,Math.cos(n*=Na)*t,Math.sin(n)*t)}function ut(n,t,e){return new it(n,t,e)}function it(n,t,e){this.l=n,this.a=t,this.b=e}function ot(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=ct(u)*Fa,r=ct(r)*Oa,i=ct(i)*Ya,gt(lt(3.2404542*u-1.5371385*r-.4985314*i),lt(-.969266*u+1.8760108*r+.041556*i),lt(.0556434*u-.2040259*r+1.0572252*i))}function at(n,t,e){return n>0?tt(Math.atan2(e,t)*La,Math.sqrt(t*t+e*e),n):tt(0/0,0/0,n)}function ct(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function st(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function lt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function ft(n){return gt(n>>16,255&n>>8,255&n)}function ht(n){return ft(n)+""}function gt(n,t,e){return new pt(n,t,e)}function pt(n,t,e){this.r=n,this.g=t,this.b=e}function vt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function dt(n,t,e){var r,u,i,o,a=0,c=0,s=0;if(u=/([a-z]+)\((.*)\)/i.exec(n))switch(i=u[2].split(","),u[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Mt(i[0]),Mt(i[1]),Mt(i[2]))}return(o=Va.get(n))?t(o.r,o.g,o.b):(null!=n&&"#"===n.charAt(0)&&(r=parseInt(n.substring(1),16),isNaN(r)||(4===n.length?(a=(3840&r)>>4,a=a>>4|a,c=240&r,c=c>>4|c,s=15&r,s=s<<4|s):7===n.length&&(a=(16711680&r)>>16,c=(65280&r)>>8,s=255&r))),t(a,c,s))}function mt(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),K(r,u,c)}function yt(n,t,e){n=xt(n),t=xt(t),e=xt(e);var r=st((.4124564*n+.3575761*t+.1804375*e)/Fa),u=st((.2126729*n+.7151522*t+.072175*e)/Oa),i=st((.0193339*n+.119192*t+.9503041*e)/Ya);return ut(116*u-16,500*(r-u),200*(u-i))}function xt(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Mt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function _t(n){return"function"==typeof n?n:function(){return n}}function bt(n){return n}function wt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),St(t,e,n,r)}}function St(n,t,e,r){function u(){var n,t=c.status;if(!t&&c.responseText||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=Xo.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,s=null;return!Go.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=Xo.event;Xo.event=n;try{o.progress.call(i,c)}finally{Xo.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(s=n,i):s},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(Bo(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var l in a)c.setRequestHeader(l,a[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=s&&(c.responseType=s),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},Xo.rebind(i,o,"on"),null==r?i:i.get(kt(r))}function kt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Et(){var n=At(),t=Ct()-n;t>24?(isFinite(t)&&(clearTimeout(Wa),Wa=setTimeout(Et,t)),Ba=0):(Ba=1,Ga(Et))}function At(){var n=Date.now();for(Ja=Xa;Ja;)n>=Ja.t&&(Ja.f=Ja.c(n-Ja.t)),Ja=Ja.n;return n}function Ct(){for(var n,t=Xa,e=1/0;t;)t.f?t=n?n.n=t.n:Xa=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return $a=n,e}function Nt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Lt(n,t){var e=Math.pow(10,3*oa(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Tt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r?function(n){for(var t=n.length,u=[],i=0,o=r[0];t>0&&o>0;)u.push(n.substring(t-=o,t+o)),o=r[i=(i+1)%r.length];return u.reverse().join(e)}:bt;return function(n){var e=Qa.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"",c=e[4]||"",s=e[5],l=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1;switch(h&&(h=+h.substring(1)),(s||"0"===r&&"="===o)&&(s=r="0",o="=",f&&(l-=Math.floor((l-1)/4))),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=nc.get(g)||qt;var y=s&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):a;if(0>p){var c=Xo.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x=n.lastIndexOf("."),M=0>x?n:n.substring(0,x),_=0>x?"":t+n.substring(x+1);!s&&f&&(M=i(M));var b=v.length+M.length+_.length+(y?0:u.length),w=l>b?new Array(b=l-b+1).join(r):"";return y&&(M=i(w+M)),u+=v,n=M+_,("<"===o?u+n+w:">"===o?w+u+n:"^"===o?w.substring(0,b>>=1)+u+n+w.substring(b):u+(y?n:w+n))+e}}}function qt(n){return n+""}function zt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Rt(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new ec(e-1)),1),e}function i(n,e){return t(n=new ec(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{ec=zt;var r=new zt;return r._=n,o(r,t,e)}finally{ec=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Dt(n);return c.floor=c,c.round=Dt(r),c.ceil=Dt(u),c.offset=Dt(i),c.range=a,n}function Dt(n){return function(t,e){try{ec=zt;var r=new zt;return r._=t,n(r,e)._}finally{ec=Date}}}function Pt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.substring(c,a)),null!=(u=uc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=C[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.substring(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&ec!==zt,o=new(i?zt:ec);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+Math.floor(r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,s=e.length;c>a;){if(r>=s)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=N[o in uc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.substring(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){M.lastIndex=0;var r=M.exec(t.substring(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.substring(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.substring(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,C.c.toString(),t,r)}function c(n,t,r){return e(n,C.x.toString(),t,r)}function s(n,t,r){return e(n,C.X.toString(),t,r)}function l(n,t,e){var r=x.get(t.substring(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{ec=zt;var t=new ec;return t._=n,r(t)}finally{ec=Date}}var r=t(n);return e.parse=function(n){try{ec=zt;var t=r.parse(n);return t&&t._}finally{ec=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ee;var x=Xo.map(),M=jt(v),_=Ht(v),b=jt(d),w=Ht(d),S=jt(m),k=Ht(m),E=jt(y),A=Ht(y);p.forEach(function(n,t){x.set(n.toLowerCase(),t)});var C={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Ut(n.getDate(),t,2)},e:function(n,t){return Ut(n.getDate(),t,2)},H:function(n,t){return Ut(n.getHours(),t,2)},I:function(n,t){return Ut(n.getHours()%12||12,t,2)},j:function(n,t){return Ut(1+tc.dayOfYear(n),t,3)},L:function(n,t){return Ut(n.getMilliseconds(),t,3)},m:function(n,t){return Ut(n.getMonth()+1,t,2)},M:function(n,t){return Ut(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Ut(n.getSeconds(),t,2)},U:function(n,t){return Ut(tc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Ut(tc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Ut(n.getFullYear()%100,t,2)},Y:function(n,t){return Ut(n.getFullYear()%1e4,t,4)},Z:ne,"%":function(){return"%"}},N={a:r,A:u,b:i,B:o,c:a,d:Bt,e:Bt,H:Jt,I:Jt,j:Wt,L:Qt,m:$t,M:Gt,p:l,S:Kt,U:Ot,w:Ft,W:Yt,x:c,X:s,y:Zt,Y:It,Z:Vt,"%":te};return t}function Ut(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function jt(n){return new RegExp("^(?:"+n.map(Xo.requote).join("|")+")","i")}function Ht(n){for(var t=new u,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Ft(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Ot(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e));return r?(n.U=+r[0],e+r[0].length):-1}function Yt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e));return r?(n.W=+r[0],e+r[0].length):-1}function It(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Zt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.y=Xt(+r[0]),e+r[0].length):-1}function Vt(n,t,e){return/^[+-]\d{4}$/.test(t=t.substring(e,e+5))?(n.Z=+t,e+5):-1}function Xt(n){return n+(n>68?1900:2e3)}function $t(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Bt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function Wt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function Jt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function Gt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function Kt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function Qt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ne(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=~~(oa(t)/60),u=oa(t)%60;return e+Ut(r,"0",2)+Ut(u,"0",2)}function te(n,t,e){oc.lastIndex=0;var r=oc.exec(t.substring(e,e+1));return r?e+r[0].length:-1}function ee(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function re(){}function ue(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ie(n,t){n&&lc.hasOwnProperty(n.type)&&lc[n.type](n,t)}function oe(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ae(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)oe(n[e],t,1);t.polygonEnd()}function ce(){function n(n,t){n*=Na,t=t*Na/2+Sa/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),s=Math.sin(t),l=i*s,f=u*c+l*Math.cos(a),h=l*o*Math.sin(a);hc.add(Math.atan2(h,f)),r=n,u=c,i=s}var t,e,r,u,i;gc.point=function(o,a){gc.point=n,r=(t=o)*Na,u=Math.cos(a=(e=a)*Na/2+Sa/4),i=Math.sin(a)},gc.lineEnd=function(){n(t,e)}}function se(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function le(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function fe(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function he(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ge(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function pe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function ve(n){return[Math.atan2(n[1],n[0]),X(n[2])]}function de(n,t){return oa(n[0]-t[0])<Aa&&oa(n[1]-t[1])<Aa}function me(n,t){n*=Na;var e=Math.cos(t*=Na);ye(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function ye(n,t,e){++pc,dc+=(n-dc)/pc,mc+=(t-mc)/pc,yc+=(e-yc)/pc}function xe(){function n(n,u){n*=Na;var i=Math.cos(u*=Na),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),s=Math.atan2(Math.sqrt((s=e*c-r*a)*s+(s=r*o-t*c)*s+(s=t*a-e*o)*s),t*o+e*a+r*c);vc+=s,xc+=s*(t+(t=o)),Mc+=s*(e+(e=a)),_c+=s*(r+(r=c)),ye(t,e,r)}var t,e,r;kc.point=function(u,i){u*=Na;var o=Math.cos(i*=Na);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),kc.point=n,ye(t,e,r)}}function Me(){kc.point=me}function _e(){function n(n,t){n*=Na;var e=Math.cos(t*=Na),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),s=u*c-i*a,l=i*o-r*c,f=r*a-u*o,h=Math.sqrt(s*s+l*l+f*f),g=r*o+u*a+i*c,p=h&&-V(g)/h,v=Math.atan2(h,g);bc+=p*s,wc+=p*l,Sc+=p*f,vc+=v,xc+=v*(r+(r=o)),Mc+=v*(u+(u=a)),_c+=v*(i+(i=c)),ye(r,u,i)}var t,e,r,u,i;kc.point=function(o,a){t=o,e=a,kc.point=n,o*=Na;var c=Math.cos(a*=Na);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),ye(r,u,i)},kc.lineEnd=function(){n(t,e),kc.lineEnd=Me,kc.point=me}}function be(){return!0}function we(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(de(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new ke(e,n,null,!0),s=new ke(e,null,c,!1);c.o=s,i.push(c),o.push(s),c=new ke(r,n,null,!1),s=new ke(r,null,c,!0),c.o=s,i.push(c),o.push(s)}}),o.sort(t),Se(i),Se(o),i.length){for(var a=0,c=e,s=o.length;s>a;++a)o[a].e=c=!c;for(var l,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;l=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,s=l.length;s>a;++a)u.point((f=l[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){l=g.p.z;for(var a=l.length-1;a>=0;--a)u.point((f=l[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,l=g.z,p=!p}while(!g.v);u.lineEnd()}}}function Se(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function ke(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Ee(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function s(){y.point=o,d.lineEnd()}function l(n,t){v.push([n,t]);var e=u(n,t);M.point(e[0],e[1])}function f(){M.lineStart(),v=[]}function h(){l(v[0][0],v[0][1]),M.lineEnd();var n,t=M.clean(),e=x.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r){if(1&t){n=e[0];var u,r=n.length-1,o=-1;for(i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);return i.lineEnd(),void 0}r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Ae))}}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:s,polygonStart:function(){y.point=l,y.lineStart=f,y.lineEnd=h,g=[],p=[],i.polygonStart()},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=s,g=Xo.merge(g);var n=Le(m,p);g.length?we(g,Ne,n,e,i):n&&(i.lineStart(),e(null,null,1,i),i.lineEnd()),i.polygonEnd(),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},x=Ce(),M=t(x);return y}}function Ae(n){return n.length>1}function Ce(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:g,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ne(n,t){return((n=n.x)[0]<0?n[1]-Ea-Aa:Ea-n[1])-((t=t.x)[0]<0?t[1]-Ea-Aa:Ea-t[1])}function Le(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;hc.reset();for(var a=0,c=t.length;c>a;++a){var s=t[a],l=s.length;if(l)for(var f=s[0],h=f[0],g=f[1]/2+Sa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===l&&(d=0),n=s[d];var m=n[0],y=n[1]/2+Sa/4,x=Math.sin(y),M=Math.cos(y),_=m-h,b=_>=0?1:-1,w=b*_,S=w>Sa,k=p*x;if(hc.add(Math.atan2(k*b*Math.sin(w),v*M+k*Math.cos(w))),i+=S?_+b*ka:_,S^h>=e^m>=e){var E=fe(se(f),se(n));pe(E);var A=fe(u,E);pe(A);var C=(S^_>=0?-1:1)*X(A[2]);(r>C||r===C&&(E[0]||E[1]))&&(o+=S^_>=0?1:-1)}if(!d++)break;h=m,p=x,v=M,f=n}}return(-Aa>i||Aa>i&&0>hc)^1&o}function Te(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Sa:-Sa,c=oa(i-e);oa(c-Sa)<Aa?(n.point(e,r=(r+o)/2>0?Ea:-Ea),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Sa&&(oa(e-u)<Aa&&(e-=u*Aa),oa(i-a)<Aa&&(i-=a*Aa),r=qe(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function qe(n,t,e,r){var u,i,o=Math.sin(n-e);return oa(o)>Aa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function ze(n,t,e,r){var u;if(null==n)u=e*Ea,r.point(-Sa,u),r.point(0,u),r.point(Sa,u),r.point(Sa,0),r.point(Sa,-u),r.point(0,-u),r.point(-Sa,-u),r.point(-Sa,0),r.point(-Sa,u);else if(oa(n[0]-t[0])>Aa){var i=n[0]<t[0]?Sa:-Sa;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Re(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,s,l;return{lineStart:function(){s=c=!1,l=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Sa:-Sa),h):0;if(!e&&(s=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(de(e,g)||de(p,g))&&(p[0]+=Aa,p[1]+=Aa,v=t(p[0],p[1]))),v!==c)l=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(l=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&de(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return l|(s&&c)<<1}}}function r(n,t,e){var r=se(n),u=se(t),o=[1,0,0],a=fe(r,u),c=le(a,a),s=a[0],l=c-s*s;if(!l)return!e&&n;var f=i*c/l,h=-i*s/l,g=fe(o,a),p=ge(o,f),v=ge(a,h);he(p,v);var d=g,m=le(p,d),y=le(d,d),x=m*m-y*(le(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),_=ge(d,(-m-M)/y);if(he(_,p),_=ve(_),!e)return _;var b,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(b=w,w=S,S=b);var A=S-w,C=oa(A-Sa)<Aa,N=C||Aa>A;if(!C&&k>E&&(b=k,k=E,E=b),N?C?k+E>0^_[1]<(oa(_[0]-w)<Aa?k:E):k<=_[1]&&_[1]<=E:A>Sa^(w<=_[0]&&_[0]<=S)){var L=ge(d,(-m+M)/y);return he(L,p),[_,ve(L)]}}}function u(t,e){var r=o?n:Sa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=oa(i)>Aa,c=cr(n,6*Na);return Ee(t,e,c,o?[0,-n]:[-Sa,n-Sa])}function De(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,s=o.y,l=a.x,f=a.y,h=0,g=1,p=l-c,v=f-s;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-s,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-s,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:s+h*v}),1>g&&(u.b={x:c+g*p,y:s+g*v}),u}}}}}}function Pe(n,t,e,r){function u(r,u){return oa(r[0]-n)<Aa?u>0?0:3:oa(r[0]-e)<Aa?u>0?2:1:oa(r[1]-t)<Aa?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,s=a[0];c>o;++o)i=a[o],s[1]<=r?i[1]>r&&Z(s,i,n)>0&&++t:i[1]<=r&&Z(s,i,n)<0&&--t,s=i;return 0!==t}function s(i,a,c,s){var l=0,f=0;if(null==i||(l=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do s.point(0===l||3===l?n:e,l>1?r:t);while((l=(l+c+4)%4)!==f)}else s.point(a[0],a[1])}function l(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){l(n,t)&&a.point(n,t)}function h(){N.point=p,d&&d.push(m=[]),S=!0,w=!1,_=b=0/0}function g(){v&&(p(y,x),M&&w&&A.rejoin(),v.push(A.buffer())),N.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Ac,Math.min(Ac,n)),t=Math.max(-Ac,Math.min(Ac,t));var e=l(n,t);if(d&&m.push([n,t]),S)y=n,x=t,M=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:_,y:b},b:{x:n,y:t}};C(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=e}var v,d,m,y,x,M,_,b,w,S,k,E=a,A=Ce(),C=De(n,t,e,r),N={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=Xo.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),u&&we(v,i,t,s,a),a.polygonEnd()),v=d=m=null}};return N}}function Ue(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function je(n){var t=0,e=Sa/3,r=nr(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Sa/180,e=n[1]*Sa/180):[180*(t/Sa),180*(e/Sa)]},u}function He(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,X((i-(n*n+e*e)*u*u)/(2*u))]},e}function Fe(){function n(n,t){Nc+=u*n-r*t,r=n,u=t}var t,e,r,u;Rc.point=function(i,o){Rc.point=n,t=r=i,e=u=o},Rc.lineEnd=function(){n(t,e)}}function Oe(n,t){Lc>n&&(Lc=n),n>qc&&(qc=n),Tc>t&&(Tc=t),t>zc&&(zc=t)}function Ye(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Ie(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Ie(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Ie(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Ze(n,t){dc+=n,mc+=t,++yc}function Ve(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);xc+=o*(t+n)/2,Mc+=o*(e+r)/2,_c+=o,Ze(t=n,e=r)}var t,e;Pc.point=function(r,u){Pc.point=n,Ze(t=r,e=u)}}function Xe(){Pc.point=Ze}function $e(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);xc+=o*(r+n)/2,Mc+=o*(u+t)/2,_c+=o,o=u*n-r*t,bc+=o*(r+n),wc+=o*(u+t),Sc+=3*o,Ze(r=n,u=t)}var t,e,r,u;Pc.point=function(i,o){Pc.point=n,Ze(t=r=i,e=u=o)},Pc.lineEnd=function(){n(t,e)}}function Be(n){function t(t,e){n.moveTo(t,e),n.arc(t,e,o,0,ka)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:g};return a}function We(n){function t(n){return(a?r:e)(n)}function e(t){return Ke(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=0/0,S.point=i,t.lineStart()}function i(e,r){var i=se([e,r]),o=n(e,r);u(x,M,y,_,b,w,x=o[0],M=o[1],y=e,_=i[0],b=i[1],w=i[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=s,S.lineEnd=l}function s(n,t){i(f=n,h=t),g=x,p=M,v=_,d=b,m=w,S.point=i}function l(){u(x,M,y,_,b,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,s,l,f,h,g,p,v,d,m){var y=l-t,x=f-e,M=y*y+x*x;if(M>4*i&&d--){var _=a+g,b=c+p,w=s+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),E=oa(oa(w)-1)<Aa||oa(r-h)<Aa?(r+h)/2:Math.atan2(b,_),A=n(E,k),C=A[0],N=A[1],L=C-t,T=N-e,q=x*L-y*T;(q*q/M>i||oa((y*L+x*T)/M-.5)>.3||o>a*g+c*p+s*v)&&(u(t,e,r,a,c,s,C,N,E,_/=S,b/=S,w,d,m),m.point(C,N),u(C,N,E,_,b,w,l,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Na),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function Je(n){var t=We(function(t,e){return n([t*La,e*La])});return function(n){return tr(t(n))}}function Ge(n){this.stream=n}function Ke(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Qe(n){return nr(function(){return n})()}function nr(n){function t(n){return n=a(n[0]*Na,n[1]*Na),[n[0]*h+c,s-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(s-n[1])/h),n&&[n[0]*La,n[1]*La]}function r(){a=Ue(o=ur(m,y,x),i);var n=i(v,d);return c=g-n[0]*h,s=p+n[1]*h,u()}function u(){return l&&(l.valid=!1,l=null),t}var i,o,a,c,s,l,f=We(function(n,t){return n=i(n,t),[n[0]*h+c,s-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,x=0,M=Ec,_=bt,b=null,w=null;return t.stream=function(n){return l&&(l.valid=!1),l=tr(M(o,f(_(n)))),l.valid=!0,l},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,Ec):Re((b=+n)*Na),u()):b},t.clipExtent=function(n){return arguments.length?(w=n,_=n?Pe(n[0][0],n[0][1],n[1][0],n[1][1]):bt,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Na,d=n[1]%360*Na,r()):[v*La,d*La]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Na,y=n[1]%360*Na,x=n.length>2?n[2]%360*Na:0,r()):[m*La,y*La,x*La]},Xo.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function tr(n){return Ke(n,function(t,e){n.point(t*Na,e*Na)})}function er(n,t){return[n,t]}function rr(n,t){return[n>Sa?n-ka:-Sa>n?n+ka:n,t]}function ur(n,t,e){return n?t||e?Ue(or(n),ar(t,e)):or(n):t||e?ar(t,e):rr}function ir(n){return function(t,e){return t+=n,[t>Sa?t-ka:-Sa>t?t+ka:t,e]}}function or(n){var t=ir(n);return t.invert=ir(-n),t}function ar(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*r+a*u;return[Math.atan2(c*i-l*o,a*r-s*u),X(l*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*i-c*o;return[Math.atan2(c*i+s*o,a*r+l*u),X(l*r-a*u)]},e}function cr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=sr(e,u),i=sr(e,i),(o>0?i>u:u>i)&&(u+=o*ka)):(u=n+o*ka,i=n-.5*c);for(var s,l=u;o>0?l>i:i>l;l-=c)a.point((s=ve([e,-r*Math.cos(l),-r*Math.sin(l)]))[0],s[1])}}function sr(n,t){var e=se(t);e[0]-=n,pe(e);var r=V(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Aa)%(2*Math.PI)}function lr(n,t,e){var r=Xo.range(n,t-Aa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function fr(n,t,e){var r=Xo.range(n,t-Aa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function hr(n){return n.source}function gr(n){return n.target}function pr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),s=u*Math.sin(n),l=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(J(r-t)+u*o*J(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*l,u=e*s+t*f,o=e*i+t*a;return[Math.atan2(u,r)*La,Math.atan2(o,Math.sqrt(r*r+u*u))*La]}:function(){return[n*La,t*La]};return p.distance=h,p}function vr(){function n(n,u){var i=Math.sin(u*=Na),o=Math.cos(u),a=oa((n*=Na)-t),c=Math.cos(a);Uc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;jc.point=function(u,i){t=u*Na,e=Math.sin(i*=Na),r=Math.cos(i),jc.point=n},jc.lineEnd=function(){jc.point=jc.lineEnd=g}}function dr(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function mr(n,t){function e(n,t){var e=oa(oa(t)-Ea)<Aa?0:o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Sa/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=I(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ea]},e):xr}function yr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return oa(u)<Aa?er:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-I(u)*Math.sqrt(n*n+e*e)]},e)}function xr(n,t){return[n,Math.log(Math.tan(Sa/4+t/2))]}function Mr(n){var t,e=Qe(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Sa*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function _r(n,t){return[Math.log(Math.tan(Sa/4+t/2)),-n]}function br(n){return n[0]}function wr(n){return n[1]}function Sr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Z(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function kr(n,t){return n[0]-t[0]||n[1]-t[1]}function Er(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Ar(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],s=e[1],l=t[1]-c,f=r[1]-s,h=(a*(c-s)-f*(u-i))/(f*o-a*l);return[u+h*o,c+h*l]}function Cr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Nr(){Jr(this),this.edge=this.site=this.circle=null}function Lr(n){var t=Jc.pop()||new Nr;return t.site=n,t}function Tr(n){Or(n),$c.remove(n),Jc.push(n),Jr(n)}function qr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Tr(n);for(var c=i;c.circle&&oa(e-c.circle.x)<Aa&&oa(r-c.circle.cy)<Aa;)i=c.P,a.unshift(c),Tr(c),c=i;a.unshift(c),Or(c);for(var s=o;s.circle&&oa(e-s.circle.x)<Aa&&oa(r-s.circle.cy)<Aa;)o=s.N,a.push(s),Tr(s),s=o;a.push(s),Or(s);var l,f=a.length;for(l=1;f>l;++l)s=a[l],c=a[l-1],$r(s.edge,c.site,s.site,u);c=a[0],s=a[f-1],s.edge=Vr(c.site,s.site,null,u),Fr(c),Fr(s)}function zr(n){for(var t,e,r,u,i=n.x,o=n.y,a=$c._;a;)if(r=Rr(a,o)-i,r>Aa)a=a.L;else{if(u=i-Dr(a,o),!(u>Aa)){r>-Aa?(t=a.P,e=a):u>-Aa?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Lr(n);if($c.insert(t,c),t||e){if(t===e)return Or(t),e=Lr(t.site),$c.insert(c,e),c.edge=e.edge=Vr(t.site,c.site),Fr(t),Fr(e),void 0;if(!e)return c.edge=Vr(t.site,c.site),void 0;Or(t),Or(e);var s=t.site,l=s.x,f=s.y,h=n.x-l,g=n.y-f,p=e.site,v=p.x-l,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,x=v*v+d*d,M={x:(d*y-g*x)/m+l,y:(h*x-v*y)/m+f};$r(e.edge,s,p,M),c.edge=Vr(s,n,null,M),e.edge=Vr(n,p,null,M),Fr(t),Fr(e)}}function Rr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,s=c-t;if(!s)return a;var l=a-r,f=1/i-1/s,h=l/s;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*s)-c+s/2+u-i/2)))/f+r:(r+a)/2}function Dr(n,t){var e=n.N;if(e)return Rr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Pr(n){this.site=n,this.edges=[]}function Ur(n){for(var t,e,r,u,i,o,a,c,s,l,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Xc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)l=a[o].end(),r=l.x,u=l.y,s=a[++o%c].start(),t=s.x,e=s.y,(oa(r-t)>Aa||oa(u-e)>Aa)&&(a.splice(o,0,new Br(Xr(i.site,l,oa(r-f)<Aa&&p-u>Aa?{x:f,y:oa(t-f)<Aa?e:p}:oa(u-p)<Aa&&h-r>Aa?{x:oa(e-p)<Aa?t:h,y:p}:oa(r-h)<Aa&&u-g>Aa?{x:h,y:oa(t-h)<Aa?e:g}:oa(u-g)<Aa&&r-f>Aa?{x:oa(e-g)<Aa?t:f,y:g}:null),i.site,null)),++c)}function jr(n,t){return t.angle-n.angle}function Hr(){Jr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Fr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,s=r.y-a,l=i.x-o,f=i.y-a,h=2*(c*f-s*l);if(!(h>=-Ca)){var g=c*c+s*s,p=l*l+f*f,v=(f*g-s*p)/h,d=(c*p-l*g)/h,f=d+a,m=Gc.pop()||new Hr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,x=Wc._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}Wc.insert(y,m),y||(Bc=m)}}}}function Or(n){var t=n.circle;t&&(t.P||(Bc=t.N),Wc.remove(t),Gc.push(t),Jr(t),n.circle=null)}function Yr(n){for(var t,e=Vc,r=De(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Ir(t,n)||!r(t)||oa(t.a.x-t.b.x)<Aa&&oa(t.a.y-t.b.y)<Aa)&&(t.a=t.b=null,e.splice(u,1))}function Ir(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],s=t[1][1],l=n.l,f=n.r,h=l.x,g=l.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=s)return}else i={x:d,y:c};e={x:d,y:s}}else{if(i){if(i.y<c)return}else i={x:d,y:s};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=s)return}else i={x:(c-u)/r,y:c};e={x:(s-u)/r,y:s}}else{if(i){if(i.y<c)return}else i={x:(s-u)/r,y:s};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Zr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Vr(n,t,e,r){var u=new Zr(n,t);return Vc.push(u),e&&$r(u,n,t,e),r&&$r(u,t,n,r),Xc[n.i].edges.push(new Br(u,n,t)),Xc[t.i].edges.push(new Br(u,t,n)),u}function Xr(n,t,e){var r=new Zr(n,null);return r.a=t,r.b=e,Vc.push(r),r}function $r(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function Br(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function Wr(){this._=null}function Jr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function Gr(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Kr(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Qr(n){for(;n.L;)n=n.L;return n}function nu(n,t){var e,r,u,i=n.sort(tu).pop();for(Vc=[],Xc=new Array(n.length),$c=new Wr,Wc=new Wr;;)if(u=Bc,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(Xc[i.i]=new Pr(i),zr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;qr(u.arc)}t&&(Yr(t),Ur(t));var o={cells:Xc,edges:Vc};return $c=Wc=Vc=Xc=null,o}function tu(n,t){return t.y-n.y||t.x-n.x}function eu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function ru(n){return n.x}function uu(n){return n.y}function iu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function ou(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&ou(n,c[0],e,r,o,a),c[1]&&ou(n,c[1],o,r,u,a),c[2]&&ou(n,c[2],e,a,o,i),c[3]&&ou(n,c[3],o,a,u,i)}}function au(n,t){n=Xo.rgb(n),t=Xo.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+vt(Math.round(e+i*n))+vt(Math.round(r+o*n))+vt(Math.round(u+a*n))}}function cu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=fu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function su(n,t){return t-=n=+n,function(e){return n+t*e}}function lu(n,t){var e,r,u,i,o,a=0,c=0,s=[],l=[];for(n+="",t+="",Qc.lastIndex=0,r=0;e=Qc.exec(t);++r)e.index&&s.push(t.substring(a,c=e.index)),l.push({i:s.length,x:e[0]}),s.push(null),a=Qc.lastIndex;for(a<t.length&&s.push(t.substring(a)),r=0,i=l.length;(e=Qc.exec(n))&&i>r;++r)if(o=l[r],o.x==e[0]){if(o.i)if(null==s[o.i+1])for(s[o.i-1]+=o.x,s.splice(o.i,1),u=r+1;i>u;++u)l[u].i--;else for(s[o.i-1]+=o.x+s[o.i+1],s.splice(o.i,2),u=r+1;i>u;++u)l[u].i-=2;else if(null==s[o.i+1])s[o.i]=o.x;else for(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1),u=r+1;i>u;++u)l[u].i--;l.splice(r,1),i--,r--}else o.x=su(parseFloat(e[0]),parseFloat(o.x));for(;i>r;)o=l.pop(),null==s[o.i+1]?s[o.i]=o.x:(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1)),i--;return 1===s.length?null==s[0]?(o=l[0].x,function(n){return o(n)+""}):function(){return t}:function(n){for(r=0;i>r;++r)s[(o=l[r]).i]=o.x(n);return s.join("")}}function fu(n,t){for(var e,r=Xo.interpolators.length;--r>=0&&!(e=Xo.interpolators[r](n,t)););return e}function hu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(fu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function gu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function pu(n){return function(t){return 1-n(1-t)}}function vu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function du(n){return n*n}function mu(n){return n*n*n}function yu(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function xu(n){return function(t){return Math.pow(t,n)}}function Mu(n){return 1-Math.cos(n*Ea)}function _u(n){return Math.pow(2,10*(n-1))}function bu(n){return 1-Math.sqrt(1-n*n)}function wu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/ka*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*ka/t)}}function Su(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function ku(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Eu(n,t){n=Xo.hcl(n),t=Xo.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return rt(e+i*n,r+o*n,u+a*n)+""}}function Au(n,t){n=Xo.hsl(n),t=Xo.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return nt(e+i*n,r+o*n,u+a*n)+""}}function Cu(n,t){n=Xo.lab(n),t=Xo.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ot(e+i*n,r+o*n,u+a*n)+""}}function Nu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Lu(n){var t=[n.a,n.b],e=[n.c,n.d],r=qu(t),u=Tu(t,e),i=qu(zu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*La,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*La:0}function Tu(n,t){return n[0]*t[0]+n[1]*t[1]}function qu(n){var t=Math.sqrt(Tu(n,n));return t&&(n[0]/=t,n[1]/=t),t}function zu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ru(n,t){var e,r=[],u=[],i=Xo.transform(n),o=Xo.transform(t),a=i.translate,c=o.translate,s=i.rotate,l=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:su(a[0],c[0])},{i:3,x:su(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),s!=l?(s-l>180?l+=360:l-s>180&&(s+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:su(s,l)})):l&&r.push(r.pop()+"rotate("+l+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:su(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:su(g[0],p[0])},{i:e-2,x:su(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Du(n,t){return t=t-(n=+n)?1/(t-n):0,function(e){return(e-n)*t}}function Pu(n,t){return t=t-(n=+n)?1/(t-n):0,function(e){return Math.max(0,Math.min(1,(e-n)*t))}}function Uu(n){for(var t=n.source,e=n.target,r=Hu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function ju(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Hu(n,t){if(n===t)return n;for(var e=ju(n),r=ju(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function Fu(n){n.fixed|=2}function Ou(n){n.fixed&=-7}function Yu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Iu(n){n.fixed&=-5}function Zu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Zu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var s=t*e[n.point.index];n.charge+=n.pointCharge=s,r+=s*n.point.x,u+=s*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Vu(n,t){return Xo.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=Wu,n}function Xu(n){return n.children}function $u(n){return n.value}function Bu(n,t){return t.value-n.value}function Wu(n){return Xo.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function Ju(n){return n.x}function Gu(n){return n.y}function Ku(n,t,e){n.y0=t,n.y=e}function Qu(n){return Xo.range(n.length)}function ni(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function ti(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function ei(n){return n.reduce(ri,0)}function ri(n,t){return n+t[1]}function ui(n,t){return ii(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ii(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function oi(n){return[Xo.min(n),Xo.max(n)]}function ai(n,t){return n.parent==t.parent?1:2}function ci(n){var t=n.children;return t&&t.length?t[0]:n._tree.thread}function si(n){var t,e=n.children;return e&&(t=e.length)?e[t-1]:n._tree.thread}function li(n,t){var e=n.children;if(e&&(u=e.length))for(var r,u,i=-1;++i<u;)t(r=li(e[i],t),n)>0&&(n=r);return n}function fi(n,t){return n.x-t.x}function hi(n,t){return t.x-n.x}function gi(n,t){return n.depth-t.depth}function pi(n,t){function e(n,r){var u=n.children;if(u&&(o=u.length))for(var i,o,a=null,c=-1;++c<o;)i=u[c],e(i,a),a=i;t(n,r)}e(n,null)}function vi(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i]._tree,t.prelim+=e,t.mod+=e,e+=t.shift+(r+=t.change)}function di(n,t,e){n=n._tree,t=t._tree;var r=e/(t.number-n.number);n.change+=r,t.change-=r,t.shift+=e,t.prelim+=e,t.mod+=e}function mi(n,t,e){return n._tree.ancestor.parent==t.parent?n._tree.ancestor:e}function yi(n,t){return n.value-t.value}function xi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Mi(n,t){n._pack_next=t,t._pack_prev=n}function _i(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function bi(n){function t(n){l=Math.min(n.x-n.r,l),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(s=e.length)){var e,r,u,i,o,a,c,s,l=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(wi),r=e[0],r.x=-r.r,r.y=0,t(r),s>1&&(u=e[1],u.x=u.r,u.y=0,t(u),s>2))for(i=e[2],Ei(r,u,i),t(i),xi(r,i),r._pack_prev=i,xi(i,u),u=r._pack_next,o=3;s>o;o++){Ei(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(_i(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!_i(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Mi(r,u=a):Mi(r=c,u),o--):(xi(r,i),u=i,t(i))}var m=(l+f)/2,y=(h+g)/2,x=0;for(o=0;s>o;o++)i=e[o],i.x-=m,i.y-=y,x=Math.max(x,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=x,e.forEach(Si)}}function wi(n){n._pack_next=n._pack_prev=n}function Si(n){delete n._pack_next,delete n._pack_prev}function ki(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)ki(u[i],t,e,r)}function Ei(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),s=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+s*i,e.y=n.y+c*i-s*u}else e.x=n.x+r,e.y=n.y}function Ai(n){return 1+Xo.max(n,function(n){return n.y})}function Ci(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ni(n){var t=n.children;return t&&t.length?Ni(t[0]):n}function Li(n){var t,e=n.children;return e&&(t=e.length)?Li(e[t-1]):n}function Ti(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function qi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function zi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ri(n){return n.rangeExtent?n.rangeExtent():zi(n.range())}function Di(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Pi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Ui(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ls}function ji(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=Xo.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Hi(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?ji:Di,c=r?Pu:Du;return o=u(n,t,c,e),a=u(t,n,c,fu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Nu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Ii(n,t)},i.tickFormat=function(t,e){return Zi(n,t,e)},i.nice=function(t){return Oi(n,t),u()},i.copy=function(){return Hi(n,t,e,r)},u()}function Fi(n,t){return Xo.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Oi(n,t){return Pi(n,Ui(Yi(n,t)[2]))}function Yi(n,t){null==t&&(t=10);var e=zi(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Ii(n,t){return Xo.range.apply(Xo,Yi(n,t))}function Zi(n,t,e){var r=Yi(n,t);return Xo.format(e?e.replace(Qa,function(n,t,e,u,i,o,a,c,s,l){return[t,e,u,i,o,a,c,s||"."+Xi(l,r),l].join("")}):",."+Vi(r[2])+"f")}function Vi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Xi(n,t){var e=Vi(t[2]);return n in fs?Math.abs(e-Vi(Math.max(Math.abs(t[0]),Math.abs(t[1]))))+ +("e"!==n):e-2*("%"===n)}function $i(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Pi(r.map(u),e?Math:gs);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=zi(r),o=[],a=n[0],c=n[1],s=Math.floor(u(a)),l=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(l-s)){if(e){for(;l>s;s++)for(var h=1;f>h;h++)o.push(i(s)*h);o.push(i(s))}else for(o.push(i(s));s++<l;)for(var h=f-1;h>0;h--)o.push(i(s)*h);for(s=0;o[s]<a;s++);for(l=o.length;o[l-1]>c;l--);o=o.slice(s,l)}return o},o.tickFormat=function(n,t){if(!arguments.length)return hs;arguments.length<2?t=hs:"function"!=typeof t&&(t=Xo.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return $i(n.copy(),t,e,r)},Fi(o,n)}function Bi(n,t,e){function r(t){return n(u(t))}var u=Wi(t),i=Wi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Ii(e,n)},r.tickFormat=function(n,t){return Zi(e,n,t)},r.nice=function(n){return r.domain(Oi(e,n))},r.exponent=function(o){return arguments.length?(u=Wi(t=o),i=Wi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Bi(n.copy(),t,e)},Fi(r,n)}function Wi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Ji(n,t){function e(e){return o[((i.get(e)||"range"===t.t&&i.set(e,n.push(e)))-1)%o.length]}function r(t,e){return Xo.range(n.length).map(function(n){return t+e*n})}var i,o,a;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new u;for(var o,a=-1,c=r.length;++a<c;)i.has(o=r[a])||i.set(o,n.push(o));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(o=n,a=0,t={t:"range",a:arguments},e):o},e.rangePoints=function(u,i){arguments.length<2&&(i=0);var c=u[0],s=u[1],l=(s-c)/(Math.max(1,n.length-1)+i);return o=r(n.length<2?(c+s)/2:c+l*i/2,l),a=0,t={t:"rangePoints",a:arguments},e},e.rangeBands=function(u,i,c){arguments.length<2&&(i=0),arguments.length<3&&(c=i);var s=u[1]<u[0],l=u[s-0],f=u[1-s],h=(f-l)/(n.length-i+2*c);return o=r(l+h*c,h),s&&o.reverse(),a=h*(1-i),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,i,c){arguments.length<2&&(i=0),arguments.length<3&&(c=i);var s=u[1]<u[0],l=u[s-0],f=u[1-s],h=Math.floor((f-l)/(n.length-i+2*c)),g=f-l-(n.length-i)*h;return o=r(l+Math.round(g/2),h),s&&o.reverse(),a=Math.round(h*(1-i)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return zi(t.a[0])},e.copy=function(){return Ji(n,t)},e.domain(n)}function Gi(n,t){function e(){var e=0,i=t.length;for(u=[];++e<i;)u[e-1]=Xo.quantile(n,e/i);return r}function r(n){return isNaN(n=+n)?void 0:t[Xo.bisect(u,n)]}var u;return r.domain=function(t){return arguments.length?(n=t.filter(function(n){return!isNaN(n)}).sort(Xo.ascending),e()):n},r.range=function(n){return arguments.length?(t=n,e()):t},r.quantiles=function(){return u},r.invertExtent=function(e){return e=t.indexOf(e),0>e?[0/0,0/0]:[e>0?u[e-1]:n[0],e<u.length?u[e]:n[n.length-1]]},r.copy=function(){return Gi(n,t)},e()}function Ki(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return Ki(n,t,e)},u()}function Qi(n,t){function e(e){return e>=e?t[Xo.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return Qi(n,t)},e}function no(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Ii(n,t)},t.tickFormat=function(t,e){return Zi(n,t,e)},t.copy=function(){return no(n)},t}function to(n){return n.innerRadius}function eo(n){return n.outerRadius}function ro(n){return n.startAngle}function uo(n){return n.endAngle}function io(n){function t(t){function o(){s.push("M",i(n(l),a))}for(var c,s=[],l=[],f=-1,h=t.length,g=_t(e),p=_t(r);++f<h;)u.call(this,c=t[f],f)?l.push([+g.call(this,c,f),+p.call(this,c,f)]):l.length&&(o(),l=[]);return l.length&&o(),s.length?s.join(""):null}var e=br,r=wr,u=be,i=oo,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=Ms.get(n)||oo).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function oo(n){return n.join("L")}function ao(n){return oo(n)+"Z"}function co(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function so(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function lo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function fo(n,t){return n.length<4?oo(n):n[1]+po(n.slice(1,n.length-1),vo(n,t))}function ho(n,t){return n.length<3?oo(n):n[0]+po((n.push(n[0]),n),vo([n[n.length-2]].concat(n,[n[1]]),t))}function go(n,t){return n.length<3?oo(n):n[0]+po(n,vo(n,t))}function po(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return oo(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var s=2;s<t.length;s++,c++)i=n[c],a=t[s],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var l=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+l[0]+","+l[1]}return r}function vo(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function mo(n){if(n.length<3)return oo(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",_o(ws,o),",",_o(ws,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),bo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function yo(n){if(n.length<4)return oo(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(_o(ws,i)+","+_o(ws,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),bo(e,i,o);return e.join("")}function xo(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[_o(ws,o),",",_o(ws,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),bo(t,o,a);return t.join("")}function Mo(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,s=-1;++s<=e;)r=n[s],u=s/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return mo(n)}function _o(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function bo(n,t,e){n.push("C",_o(_s,t),",",_o(_s,e),",",_o(bs,t),",",_o(bs,e),",",_o(ws,t),",",_o(ws,e))}function wo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function So(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=wo(u,i);++t<e;)r[t]=(o+(o=wo(u=i,i=n[t+1])))/2;return r[t]=o,r}function ko(n){for(var t,e,r,u,i=[],o=So(n),a=-1,c=n.length-1;++a<c;)t=wo(n[a],n[a+1]),oa(t)<Aa?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Eo(n){return n.length<3?oo(n):n[0]+po(n,ko(n))}function Ao(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]+ys,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Co(n){function t(t){function c(){v.push("M",a(n(m),f),l,s(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,x=t.length,M=_t(e),_=_t(u),b=e===r?function(){return g}:_t(r),w=u===i?function(){return p}:_t(i);++y<x;)o.call(this,h=t[y],y)?(d.push([g=+M.call(this,h,y),p=+_.call(this,h,y)]),m.push([+b.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=br,r=br,u=0,i=wr,o=be,a=oo,c=a.key,s=a,l="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=Ms.get(n)||oo).key,s=a.reverse||a,l=a.closed?"M":"L",t):c},t.tension=function(n){return arguments.length?(f=n,t):f},t}function No(n){return n.radius}function Lo(n){return[n.x,n.y]}function To(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]+ys;return[e*Math.cos(r),e*Math.sin(r)]}}function qo(){return 64}function zo(){return"circle"}function Ro(n){var t=Math.sqrt(n/Sa);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Do(n,t){return fa(n,Ns),n.id=t,n}function Po(n,t,e,r){var u=n.id;return R(n,"function"==typeof e?function(n,i,o){n.__transition__[u].tween.set(t,r(e.call(n,n.__data__,i,o)))}:(e=r(e),function(n){n.__transition__[u].tween.set(t,e)}))}function Uo(n){return null==n&&(n=""),function(){this.textContent=n}}function jo(n,t,e,r){var i=n.__transition__||(n.__transition__={active:0,count:0}),o=i[e];if(!o){var a=r.time;o=i[e]={tween:new u,time:a,ease:r.ease,delay:r.delay,duration:r.duration},++i.count,Xo.timer(function(r){function u(r){return i.active>e?s():(i.active=e,o.event&&o.event.start.call(n,l,t),o.tween.forEach(function(e,r){(r=r.call(n,l,t))&&v.push(r)}),Xo.timer(function(){return p.c=c(r||1)?be:c,1},0,a),void 0)}function c(r){if(i.active!==e)return s();for(var u=r/g,a=f(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,l,t),s()):void 0}function s(){return--i.count?delete i[e]:delete n.__transition__,1}var l=n.__data__,f=o.ease,h=o.delay,g=o.duration,p=Ja,v=[];return p.t=h+a,r>=h?u(r-h):(p.c=u,void 0)},0,a)}}function Ho(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function Fo(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function Oo(n){return n.toISOString()}function Yo(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=Xo.bisect(js,u);return i==js.length?[t.year,Yi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/js[i-1]<js[i]/u?i-1:i]:[Os,Yi(n,e)[2]]}return r.invert=function(t){return Io(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Io)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Io(+e+1),t).length}var i=r.domain(),o=zi(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Pi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=zi(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Yo(n.copy(),t,e)},Fi(r,n)}function Io(n){return new Date(n)}function Zo(n){return JSON.parse(n.responseText)}function Vo(n){var t=Wo.createRange();return t.selectNode(Wo.body),t.createContextualFragment(n.responseText)}var Xo={version:"3.4.3"};Date.now||(Date.now=function(){return+new Date});var $o=[].slice,Bo=function(n){return $o.call(n)},Wo=document,Jo=Wo.documentElement,Go=window;try{Bo(Jo.childNodes)[0].nodeType}catch(Ko){Bo=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{Wo.createElement("div").style.setProperty("opacity",0,"")}catch(Qo){var na=Go.Element.prototype,ta=na.setAttribute,ea=na.setAttributeNS,ra=Go.CSSStyleDeclaration.prototype,ua=ra.setProperty;na.setAttribute=function(n,t){ta.call(this,n,t+"")},na.setAttributeNS=function(n,t,e){ea.call(this,n,t,e+"")},ra.setProperty=function(n,t,e){ua.call(this,n,t+"",e)}}Xo.ascending=function(n,t){return t>n?-1:n>t?1:n>=t?0:0/0},Xo.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},Xo.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i&&!(null!=(e=n[u])&&e>=e);)e=void 0;for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i&&!(null!=(e=t.call(n,n[u],u))&&e>=e);)e=void 0;for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},Xo.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i&&!(null!=(e=n[u])&&e>=e);)e=void 0;for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i&&!(null!=(e=t.call(n,n[u],u))&&e>=e);)e=void 0;for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},Xo.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o&&!(null!=(e=u=n[i])&&e>=e);)e=u=void 0;for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o&&!(null!=(e=u=t.call(n,n[i],i))&&e>=e);)e=void 0;for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},Xo.sum=function(n,t){var e,r=0,u=n.length,i=-1;if(1===arguments.length)for(;++i<u;)isNaN(e=+n[i])||(r+=e);else for(;++i<u;)isNaN(e=+t.call(n,n[i],i))||(r+=e);return r},Xo.mean=function(t,e){var r,u=t.length,i=0,o=-1,a=0;if(1===arguments.length)for(;++o<u;)n(r=t[o])&&(i+=(r-i)/++a);else for(;++o<u;)n(r=e.call(t,t[o],o))&&(i+=(r-i)/++a);return a?i:void 0},Xo.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},Xo.median=function(t,e){return arguments.length>1&&(t=t.map(e)),t=t.filter(n),t.length?Xo.quantile(t.sort(Xo.ascending),.5):void 0},Xo.bisector=function(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n.call(t,t[i],i)<e?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;e<n.call(t,t[i],i)?u=i:r=i+1}return r}}};var ia=Xo.bisector(function(n){return n});Xo.bisectLeft=ia.left,Xo.bisect=Xo.bisectRight=ia.right,Xo.shuffle=function(n){for(var t,e,r=n.length;r;)e=0|Math.random()*r--,t=n[r],n[r]=n[e],n[e]=t;return n},Xo.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},Xo.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},Xo.zip=function(){if(!(u=arguments.length))return[];for(var n=-1,e=Xo.min(arguments,t),r=new Array(e);++n<e;)for(var u,i=-1,o=r[n]=new Array(u);++i<u;)o[i]=arguments[i][n];return r},Xo.transpose=function(n){return Xo.zip.apply(Xo,n)},Xo.keys=function(n){var t=[];for(var e in n)t.push(e);return t},Xo.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},Xo.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},Xo.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var oa=Math.abs;Xo.range=function(n,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/r)throw new Error("infinite range");var u,i=[],o=e(oa(r)),a=-1;if(n*=o,t*=o,r*=o,0>r)for(;(u=n+r*++a)>t;)i.push(u/o);else for(;(u=n+r*++a)<t;)i.push(u/o);return i},Xo.map=function(n){var t=new u;if(n instanceof u)n.forEach(function(n,e){t.set(n,e)});else for(var e in n)t.set(e,n[e]);return t},r(u,{has:i,get:function(n){return this[aa+n]},set:function(n,t){return this[aa+n]=t},remove:o,keys:a,values:function(){var n=[];return this.forEach(function(t,e){n.push(e)}),n},entries:function(){var n=[];return this.forEach(function(t,e){n.push({key:t,value:e})}),n},size:c,empty:s,forEach:function(n){for(var t in this)t.charCodeAt(0)===ca&&n.call(this,t.substring(1),this[t])}});var aa="\x00",ca=aa.charCodeAt(0);Xo.nest=function(){function n(t,a,c){if(c>=o.length)return r?r.call(i,a):e?a.sort(e):a;for(var s,l,f,h,g=-1,p=a.length,v=o[c++],d=new u;++g<p;)(h=d.get(s=v(l=a[g])))?h.push(l):d.set(s,[l]);return t?(l=t(),f=function(e,r){l.set(e,n(t,r,c))}):(l={},f=function(e,r){l[e]=n(t,r,c)}),d.forEach(f),l}function t(n,e){if(e>=o.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,i={},o=[],a=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(Xo.map,e,0),0)},i.key=function(n){return o.push(n),i},i.sortKeys=function(n){return a[o.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},Xo.set=function(n){var t=new l;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},r(l,{has:i,add:function(n){return this[aa+n]=!0,n},remove:function(n){return n=aa+n,n in this&&delete this[n]},values:a,size:c,empty:s,forEach:function(n){for(var t in this)t.charCodeAt(0)===ca&&n.call(this,t.substring(1))}}),Xo.behavior={},Xo.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=f(n,t,t[e]);return n};var sa=["webkit","ms","moz","Moz","o","O"];Xo.dispatch=function(){for(var n=new p,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=v(n);return n},p.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.substring(e+1),n=n.substring(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},Xo.event=null,Xo.requote=function(n){return n.replace(la,"\\$&")};var la=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,fa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ha=function(n,t){return t.querySelector(n)},ga=function(n,t){return t.querySelectorAll(n)},pa=Jo[h(Jo,"matchesSelector")],va=function(n,t){return pa.call(n,t)};"function"==typeof Sizzle&&(ha=function(n,t){return Sizzle(n,t)[0]||null},ga=Sizzle,va=Sizzle.matchesSelector),Xo.selection=function(){return xa};var da=Xo.selection.prototype=[];da.select=function(n){var t,e,r,u,i=[];n=M(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,s=r.length;++c<s;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return x(i)},da.selectAll=function(n){var t,e,r=[];n=_(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=Bo(n.call(e,e.__data__,a,u))),t.parentNode=e);return x(r)};var ma={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Xo.ns={prefix:ma,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.substring(0,t),n=n.substring(t+1)),ma.hasOwnProperty(e)?{space:ma[e],local:n}:n}},da.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=Xo.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(b(t,n[t]));return this}return this.each(b(n,t))},da.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=k(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!S(n[u]).test(t))return!1;return!0}for(t in n)this.each(E(t,n[t]));return this}return this.each(E(n,t))},da.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(C(e,n[e],t));return this}if(2>r)return Go.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(C(n,t,e))},da.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(N(t,n[t]));return this}return this.each(N(n,t))},da.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},da.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},da.append=function(n){return n=L(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},da.insert=function(n,t){return n=L(n),t=M(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},da.remove=function(){return this.each(function(){var n=this.parentNode;n&&n.removeChild(this)})},da.data=function(n,t){function e(n,e){var r,i,o,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new u,y=new u,x=[];for(r=-1;++r<a;)d=t.call(i=n[r],i.__data__,r),m.has(d)?v[r]=i:m.set(d,i),x.push(d);for(r=-1;++r<f;)d=t.call(e,o=e[r],r),(i=m.get(d))?(g[r]=i,i.__data__=o):y.has(d)||(p[r]=T(o)),y.set(d,o),m.remove(d);for(r=-1;++r<a;)m.has(x[r])&&(v[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],o=e[r],i?(i.__data__=o,g[r]=i):p[r]=T(o);for(;f>r;++r)p[r]=T(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),s.push(g),l.push(v)}var r,i,o=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(n[o]=i.__data__);return n}var c=D([]),s=x([]),l=x([]);if("function"==typeof n)for(;++o<a;)e(r=this[o],n.call(r,r.parentNode.__data__,o));else for(;++o<a;)e(r=this[o],n);return s.enter=function(){return c},s.exit=function(){return l},s},da.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},da.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=q(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return x(u)},da.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},da.sort=function(n){n=z.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},da.each=function(n){return R(this,function(t,e,r){n.call(t,t.__data__,e,r)})},da.call=function(n){var t=Bo(arguments);return n.apply(t[0]=this,t),this},da.empty=function(){return!this.node()},da.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},da.size=function(){var n=0;return this.each(function(){++n}),n};var ya=[];Xo.selection.enter=D,Xo.selection.enter.prototype=ya,ya.append=da.append,ya.empty=da.empty,ya.node=da.node,ya.call=da.call,ya.size=da.size,ya.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var s=-1,l=u.length;++s<l;)(i=u[s])?(t.push(r[s]=e=n.call(u.parentNode,i.__data__,s,a)),e.__data__=i.__data__):t.push(null)}return x(o)},ya.insert=function(n,t){return arguments.length<2&&(t=P(this)),da.insert.call(this,n,t)},da.transition=function(){for(var n,t,e=ks||++Ls,r=[],u=Es||{time:Date.now(),ease:yu,delay:0,duration:250},i=-1,o=this.length;++i<o;){r.push(n=[]);for(var a=this[i],c=-1,s=a.length;++c<s;)(t=a[c])&&jo(t,c,e,u),n.push(t)}return Do(r,e)},da.interrupt=function(){return this.each(U)},Xo.select=function(n){var t=["string"==typeof n?ha(n,Wo):n];return t.parentNode=Jo,x([t])},Xo.selectAll=function(n){var t=Bo("string"==typeof n?ga(n,Wo):n);return t.parentNode=Jo,x([t])};var xa=Xo.select(Jo);da.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(j(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(j(n,t,e))};var Ma=Xo.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ma.forEach(function(n){"on"+n in Wo&&Ma.remove(n)});var _a="onselectstart"in Wo?null:h(Jo.style,"userSelect"),ba=0;Xo.mouse=function(n){return Y(n,m())};var wa=/WebKit/.test(Go.navigator.userAgent)?-1:0;Xo.touches=function(n,t){return arguments.length<2&&(t=m().touches),t?Bo(t).map(function(t){var e=Y(n,t);return e.identifier=t.identifier,e}):[]},Xo.behavior.drag=function(){function n(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function t(){return Xo.event.changedTouches[0].identifier}function e(n,t){return Xo.touches(n).filter(function(n){return n.identifier===t})[0]}function r(n,t,e,r){return function(){function o(){var n=t(l,g),e=n[0]-v[0],r=n[1]-v[1];d|=e|r,v=n,f({type:"drag",x:n[0]+c[0],y:n[1]+c[1],dx:e,dy:r})}function a(){m.on(e+"."+p,null).on(r+"."+p,null),y(d&&Xo.event.target===h),f({type:"dragend"})}var c,s=this,l=s.parentNode,f=u.of(s,arguments),h=Xo.event.target,g=n(),p=null==g?"drag":"drag-"+g,v=t(l,g),d=0,m=Xo.select(Go).on(e+"."+p,o).on(r+"."+p,a),y=O();i?(c=i.apply(s,arguments),c=[c.x-v[0],c.y-v[1]]):c=[0,0],f({type:"dragstart"})}}var u=y(n,"drag","dragstart","dragend"),i=null,o=r(g,Xo.mouse,"mousemove","mouseup"),a=r(t,e,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},Xo.rebind(n,u,"on")};var Sa=Math.PI,ka=2*Sa,Ea=Sa/2,Aa=1e-6,Ca=Aa*Aa,Na=Sa/180,La=180/Sa,Ta=Math.SQRT2,qa=2,za=4;Xo.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=B(v),o=i/(qa*h)*(e*W(Ta*t+v)-$(v));return[r+o*s,u+o*l,i*e/B(Ta*t+v)]}return[r+n*s,u+n*l,i*Math.exp(Ta*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],s=o-r,l=a-u,f=s*s+l*l,h=Math.sqrt(f),g=(c*c-i*i+za*f)/(2*i*qa*h),p=(c*c-i*i-za*f)/(2*c*qa*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Ta;return e.duration=1e3*y,e},Xo.behavior.zoom=function(){function n(n){n.on(A,s).on(Pa+".zoom",f).on(C,h).on("dblclick.zoom",g).on(L,l)}function t(n){return[(n[0]-S.x)/S.k,(n[1]-S.y)/S.k]}function e(n){return[n[0]*S.k+S.x,n[1]*S.k+S.y]}function r(n){S.k=Math.max(E[0],Math.min(E[1],n))}function u(n,t){t=e(t),S.x+=n[0]-t[0],S.y+=n[1]-t[1]}function i(){_&&_.domain(M.range().map(function(n){return(n-S.x)/S.k}).map(M.invert)),w&&w.domain(b.range().map(function(n){return(n-S.y)/S.k}).map(b.invert))}function o(n){n({type:"zoomstart"})}function a(n){i(),n({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(n){n({type:"zoomend"})}function s(){function n(){l=1,u(Xo.mouse(r),g),a(i)}function e(){f.on(C,Go===r?h:null).on(N,null),p(l&&Xo.event.target===s),c(i)}var r=this,i=T.of(r,arguments),s=Xo.event.target,l=0,f=Xo.select(Go).on(C,n).on(N,e),g=t(Xo.mouse(r)),p=O();U.call(r),o(i)}function l(){function n(){var n=Xo.touches(g);return h=S.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=t(n))}),n}function e(){for(var t=Xo.event.changedTouches,e=0,i=t.length;i>e;++e)v[t[e].identifier]=null;var o=n(),c=Date.now();if(1===o.length){if(500>c-x){var s=o[0],l=v[s.identifier];r(2*S.k),u(s,l),d(),a(p)}x=c}else if(o.length>1){var s=o[0],f=o[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function i(){for(var n,t,e,i,o=Xo.touches(g),c=0,s=o.length;s>c;++c,i=null)if(e=o[c],i=v[e.identifier]){if(t)break;n=e,t=i}if(i){var l=(l=e[0]-n[0])*l+(l=e[1]-n[1])*l,f=m&&Math.sqrt(l/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*h)}x=null,u(n,t),a(p)}function f(){if(Xo.event.touches.length){for(var t=Xo.event.changedTouches,e=0,r=t.length;r>e;++e)delete v[t[e].identifier];for(var u in v)return void n()}b.on(M,null).on(_,null),w.on(A,s).on(L,l),k(),c(p)}var h,g=this,p=T.of(g,arguments),v={},m=0,y=Xo.event.changedTouches[0].identifier,M="touchmove.zoom-"+y,_="touchend.zoom-"+y,b=Xo.select(Go).on(M,i).on(_,f),w=Xo.select(g).on(A,null).on(L,e),k=O();U.call(g),e(),o(p)}function f(){var n=T.of(this,arguments);m?clearTimeout(m):(U.call(this),o(n)),m=setTimeout(function(){m=null,c(n)},50),d();var e=v||Xo.mouse(this);p||(p=t(e)),r(Math.pow(2,.002*Ra())*S.k),u(e,p),a(n)}function h(){p=null}function g(){var n=T.of(this,arguments),e=Xo.mouse(this),i=t(e),s=Math.log(S.k)/Math.LN2;o(n),r(Math.pow(2,Xo.event.shiftKey?Math.ceil(s)-1:Math.floor(s)+1)),u(e,i),a(n),c(n)}var p,v,m,x,M,_,b,w,S={x:0,y:0,k:1},k=[960,500],E=Da,A="mousedown.zoom",C="mousemove.zoom",N="mouseup.zoom",L="touchstart.zoom",T=y(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=T.of(this,arguments),t=S;ks?Xo.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},o(n)}).tween("zoom:zoom",function(){var e=k[0],r=k[1],u=e/2,i=r/2,o=Xo.interpolateZoom([(u-S.x)/S.k,(i-S.y)/S.k,e/S.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),c=e/r[2];this.__chart__=S={x:u-r[0]*c,y:i-r[1]*c,k:c},a(n)}}).each("end.zoom",function(){c(n)}):(this.__chart__=S,o(n),a(n),c(n))})},n.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},i(),n):[S.x,S.y]},n.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:+t},i(),n):S.k},n.scaleExtent=function(t){return arguments.length?(E=null==t?Da:[+t[0],+t[1]],n):E},n.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],n):v},n.size=function(t){return arguments.length?(k=t&&[+t[0],+t[1]],n):k},n.x=function(t){return arguments.length?(_=t,M=t.copy(),S={x:0,y:0,k:1},n):_},n.y=function(t){return arguments.length?(w=t,b=t.copy(),S={x:0,y:0,k:1},n):w},Xo.rebind(n,T,"on")};var Ra,Da=[0,1/0],Pa="onwheel"in Wo?(Ra=function(){return-Xo.event.deltaY*(Xo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Wo?(Ra=function(){return Xo.event.wheelDelta},"mousewheel"):(Ra=function(){return-Xo.event.detail},"MozMousePixelScroll");G.prototype.toString=function(){return this.rgb()+""},Xo.hsl=function(n,t,e){return 1===arguments.length?n instanceof Q?K(n.h,n.s,n.l):dt(""+n,mt,K):K(+n,+t,+e)};var Ua=Q.prototype=new G;Ua.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),K(this.h,this.s,this.l/n)},Ua.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),K(this.h,this.s,n*this.l)},Ua.rgb=function(){return nt(this.h,this.s,this.l)},Xo.hcl=function(n,t,e){return 1===arguments.length?n instanceof et?tt(n.h,n.c,n.l):n instanceof it?at(n.l,n.a,n.b):at((n=yt((n=Xo.rgb(n)).r,n.g,n.b)).l,n.a,n.b):tt(+n,+t,+e)};var ja=et.prototype=new G;ja.brighter=function(n){return tt(this.h,this.c,Math.min(100,this.l+Ha*(arguments.length?n:1)))},ja.darker=function(n){return tt(this.h,this.c,Math.max(0,this.l-Ha*(arguments.length?n:1)))},ja.rgb=function(){return rt(this.h,this.c,this.l).rgb()},Xo.lab=function(n,t,e){return 1===arguments.length?n instanceof it?ut(n.l,n.a,n.b):n instanceof et?rt(n.l,n.c,n.h):yt((n=Xo.rgb(n)).r,n.g,n.b):ut(+n,+t,+e)};var Ha=18,Fa=.95047,Oa=1,Ya=1.08883,Ia=it.prototype=new G;Ia.brighter=function(n){return ut(Math.min(100,this.l+Ha*(arguments.length?n:1)),this.a,this.b)},Ia.darker=function(n){return ut(Math.max(0,this.l-Ha*(arguments.length?n:1)),this.a,this.b)},Ia.rgb=function(){return ot(this.l,this.a,this.b)},Xo.rgb=function(n,t,e){return 1===arguments.length?n instanceof pt?gt(n.r,n.g,n.b):dt(""+n,gt,nt):gt(~~n,~~t,~~e)};var Za=pt.prototype=new G;Za.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),gt(Math.min(255,~~(t/n)),Math.min(255,~~(e/n)),Math.min(255,~~(r/n)))):gt(u,u,u)},Za.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),gt(~~(n*this.r),~~(n*this.g),~~(n*this.b))},Za.hsl=function(){return mt(this.r,this.g,this.b)},Za.toString=function(){return"#"+vt(this.r)+vt(this.g)+vt(this.b)};var Va=Xo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Va.forEach(function(n,t){Va.set(n,ft(t))}),Xo.functor=_t,Xo.xhr=wt(bt),Xo.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=St(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(l>=s)return o;if(u)return u=!1,i;var t=l;if(34===n.charCodeAt(t)){for(var e=t;e++<s;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}l=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++l):10===r&&(u=!0),n.substring(t+1,e).replace(/""/g,'"')}for(;s>l;){var r=n.charCodeAt(l++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(l)&&(++l,++a);else if(r!==c)continue;return n.substring(t,l-a)}return n.substring(t)}for(var r,u,i={},o={},a=[],s=n.length,l=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();(!t||(h=t(h,f++)))&&a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new l,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},Xo.csv=Xo.dsv(",","text/csv"),Xo.tsv=Xo.dsv("	","text/tab-separated-values");var Xa,$a,Ba,Wa,Ja,Ga=Go[h(Go,"requestAnimationFrame")]||function(n){setTimeout(n,17)};Xo.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};$a?$a.n=i:Xa=i,$a=i,Ba||(Wa=clearTimeout(Wa),Ba=1,Ga(Et))},Xo.timer.flush=function(){At(),Ct()},Xo.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var Ka=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Lt);Xo.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=Xo.round(n,Nt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((0>=e?e+1:e-1)/3)))),Ka[8+e/3]};var Qa=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,nc=Xo.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=Xo.round(n,Nt(n,t))).toFixed(Math.max(0,Math.min(20,Nt(n*(1+1e-15),t))))}}),tc=Xo.time={},ec=Date;zt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){rc.setUTCDate.apply(this._,arguments)},setDay:function(){rc.setUTCDay.apply(this._,arguments)},setFullYear:function(){rc.setUTCFullYear.apply(this._,arguments)},setHours:function(){rc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){rc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){rc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){rc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){rc.setUTCSeconds.apply(this._,arguments)},setTime:function(){rc.setTime.apply(this._,arguments)}};var rc=Date.prototype;tc.year=Rt(function(n){return n=tc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),tc.years=tc.year.range,tc.years.utc=tc.year.utc.range,tc.day=Rt(function(n){var t=new ec(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),tc.days=tc.day.range,tc.days.utc=tc.day.utc.range,tc.dayOfYear=function(n){var t=tc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=tc[n]=Rt(function(n){return(n=tc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=tc.year(n).getDay();return Math.floor((tc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});tc[n+"s"]=e.range,tc[n+"s"].utc=e.utc.range,tc[n+"OfYear"]=function(n){var e=tc.year(n).getDay();return Math.floor((tc.dayOfYear(n)+(e+t)%7)/7)}}),tc.week=tc.sunday,tc.weeks=tc.sunday.range,tc.weeks.utc=tc.sunday.utc.range,tc.weekOfYear=tc.sundayOfYear;var uc={"-":"",_:" ",0:"0"},ic=/^\s*\d+/,oc=/^%/;Xo.locale=function(n){return{numberFormat:Tt(n),timeFormat:Pt(n)}};var ac=Xo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xo.format=ac.numberFormat,Xo.geo={},re.prototype={s:0,t:0,add:function(n){ue(n,this.t,cc),ue(cc.s,this.s,this),this.s?this.t+=cc.t:this.s=cc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cc=new re;Xo.geo.stream=function(n,t){n&&sc.hasOwnProperty(n.type)?sc[n.type](n,t):ie(n,t)};var sc={Feature:function(n,t){ie(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ie(e[r].geometry,t)}},lc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){oe(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)oe(e[r],t,0)},Polygon:function(n,t){ae(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ae(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ie(e[r],t)}};Xo.geo.area=function(n){return fc=0,Xo.geo.stream(n,gc),fc};var fc,hc=new re,gc={sphere:function(){fc+=4*Sa},point:g,lineStart:g,lineEnd:g,polygonStart:function(){hc.reset(),gc.lineStart=ce},polygonEnd:function(){var n=2*hc;fc+=0>n?4*Sa+n:n,gc.lineStart=gc.lineEnd=gc.point=g}};Xo.geo.bounds=function(){function n(n,t){x.push(M=[l=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=se([t*Na,e*Na]);if(m){var u=fe(m,r),i=[u[1],-u[0],0],o=fe(i,u);pe(o),o=ve(o);var c=t-p,s=c>0?1:-1,v=o[0]*La*s,d=oa(c)>180;if(d^(v>s*p&&s*t>v)){var y=o[1]*La;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>s*p&&s*t>v)){var y=-o[1]*La;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t):h>=l?(l>t&&(l=t),t>h&&(h=t)):t>p?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t)}else n(t,e);m=r,p=t}function e(){_.point=t}function r(){M[0]=l,M[1]=h,_.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=oa(r)>180?r+(r>0?360:-360):r}else v=n,d=e;gc.point(n,e),t(n,e)}function i(){gc.lineStart()}function o(){u(v,d),gc.lineEnd(),oa(y)>Aa&&(l=-(h=180)),M[0]=l,M[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function s(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var l,f,h,g,p,v,d,m,y,x,M,_={point:n,lineStart:e,lineEnd:r,polygonStart:function(){_.point=u,_.lineStart=i,_.lineEnd=o,y=0,gc.polygonStart()},polygonEnd:function(){gc.polygonEnd(),_.point=n,_.lineStart=e,_.lineEnd=r,0>hc?(l=-(h=180),f=-(g=90)):y>Aa?g=90:-Aa>y&&(f=-90),M[0]=l,M[1]=h}};return function(n){g=h=-(l=f=1/0),x=[],Xo.geo.stream(n,_);var t=x.length;if(t){x.sort(c);for(var e,r=1,u=x[0],i=[u];t>r;++r)e=x[r],s(e[0],u)||s(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,l=e[0],h=u[1])}return x=M=null,1/0===l||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[l,f],[h,g]]}}(),Xo.geo.centroid=function(n){pc=vc=dc=mc=yc=xc=Mc=_c=bc=wc=Sc=0,Xo.geo.stream(n,kc);var t=bc,e=wc,r=Sc,u=t*t+e*e+r*r;return Ca>u&&(t=xc,e=Mc,r=_c,Aa>vc&&(t=dc,e=mc,r=yc),u=t*t+e*e+r*r,Ca>u)?[0/0,0/0]:[Math.atan2(e,t)*La,X(r/Math.sqrt(u))*La]};var pc,vc,dc,mc,yc,xc,Mc,_c,bc,wc,Sc,kc={sphere:g,point:me,lineStart:xe,lineEnd:Me,polygonStart:function(){kc.lineStart=_e},polygonEnd:function(){kc.lineStart=xe}},Ec=Ee(be,Te,ze,[-Sa,-Sa/2]),Ac=1e9;Xo.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Pe(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(Xo.geo.conicEqualArea=function(){return je(He)}).raw=He,Xo.geo.albers=function(){return Xo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xo.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=Xo.geo.albers(),o=Xo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=Xo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var s=i.scale(),l=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[l-.455*s,f-.238*s],[l+.455*s,f+.238*s]]).stream(c).point,r=o.translate([l-.307*s,f+.201*s]).clipExtent([[l-.425*s+Aa,f+.12*s+Aa],[l-.214*s-Aa,f+.234*s-Aa]]).stream(c).point,u=a.translate([l-.205*s,f+.212*s]).clipExtent([[l-.214*s+Aa,f+.166*s+Aa],[l-.115*s-Aa,f+.234*s-Aa]]).stream(c).point,n},n.scale(1070)};var Cc,Nc,Lc,Tc,qc,zc,Rc={point:g,lineStart:g,lineEnd:g,polygonStart:function(){Nc=0,Rc.lineStart=Fe},polygonEnd:function(){Rc.lineStart=Rc.lineEnd=Rc.point=g,Cc+=oa(Nc/2)}},Dc={point:Oe,lineStart:g,lineEnd:g,polygonStart:g,polygonEnd:g},Pc={point:Ze,lineStart:Ve,lineEnd:Xe,polygonStart:function(){Pc.lineStart=$e},polygonEnd:function(){Pc.point=Ze,Pc.lineStart=Ve,Pc.lineEnd=Xe}};Xo.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),Xo.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return Cc=0,Xo.geo.stream(n,u(Rc)),Cc},n.centroid=function(n){return dc=mc=yc=xc=Mc=_c=bc=wc=Sc=0,Xo.geo.stream(n,u(Pc)),Sc?[bc/Sc,wc/Sc]:_c?[xc/_c,Mc/_c]:yc?[dc/yc,mc/yc]:[0/0,0/0]},n.bounds=function(n){return qc=zc=-(Lc=Tc=1/0),Xo.geo.stream(n,u(Dc)),[[Lc,Tc],[qc,zc]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||Je(n):bt,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Ye:new Be(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(Xo.geo.albersUsa()).context(null)},Xo.geo.transform=function(n){return{stream:function(t){var e=new Ge(t);for(var r in n)e[r]=n[r];return e}}},Ge.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xo.geo.projection=Qe,Xo.geo.projectionMutator=nr,(Xo.geo.equirectangular=function(){return Qe(er)}).raw=er.invert=er,Xo.geo.rotation=function(n){function t(t){return t=n(t[0]*Na,t[1]*Na),t[0]*=La,t[1]*=La,t}return n=ur(n[0]%360*Na,n[1]*Na,n.length>2?n[2]*Na:0),t.invert=function(t){return t=n.invert(t[0]*Na,t[1]*Na),t[0]*=La,t[1]*=La,t},t},rr.invert=er,Xo.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=ur(-n[0]*Na,-n[1]*Na,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=La,n[1]*=La}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=cr((t=+r)*Na,u*Na),n):t},n.precision=function(r){return arguments.length?(e=cr(t*Na,(u=+r)*Na),n):u},n.angle(90)},Xo.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Na,u=n[1]*Na,i=t[1]*Na,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),s=Math.cos(u),l=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=s*l-c*f*a)*e),c*l+s*f*a)},Xo.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return Xo.range(Math.ceil(i/d)*d,u,d).map(h).concat(Xo.range(Math.ceil(s/m)*m,c,m).map(g)).concat(Xo.range(Math.ceil(r/p)*p,e,p).filter(function(n){return oa(n%d)>Aa}).map(l)).concat(Xo.range(Math.ceil(a/v)*v,o,v).filter(function(n){return oa(n%m)>Aa}).map(f))}var e,r,u,i,o,a,c,s,l,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(s).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],s=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),s>c&&(t=s,s=c,c=t),n.precision(y)):[[i,s],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,l=lr(a,o,90),f=fr(r,e,y),h=lr(s,c,90),g=fr(i,u,y),n):y},n.majorExtent([[-180,-90+Aa],[180,90-Aa]]).minorExtent([[-180,-80-Aa],[180,80+Aa]])},Xo.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=hr,u=gr;return n.distance=function(){return Xo.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},Xo.geo.interpolate=function(n,t){return pr(n[0]*Na,n[1]*Na,t[0]*Na,t[1]*Na)},Xo.geo.length=function(n){return Uc=0,Xo.geo.stream(n,jc),Uc};var Uc,jc={sphere:g,point:g,lineStart:vr,lineEnd:g,polygonStart:g,polygonEnd:g},Hc=dr(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(Xo.geo.azimuthalEqualArea=function(){return Qe(Hc)}).raw=Hc;var Fc=dr(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},bt);(Xo.geo.azimuthalEquidistant=function(){return Qe(Fc)}).raw=Fc,(Xo.geo.conicConformal=function(){return je(mr)}).raw=mr,(Xo.geo.conicEquidistant=function(){return je(yr)}).raw=yr;var Oc=dr(function(n){return 1/n},Math.atan);(Xo.geo.gnomonic=function(){return Qe(Oc)}).raw=Oc,xr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ea]},(Xo.geo.mercator=function(){return Mr(xr)}).raw=xr;var Yc=dr(function(){return 1},Math.asin);(Xo.geo.orthographic=function(){return Qe(Yc)}).raw=Yc;var Ic=dr(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(Xo.geo.stereographic=function(){return Qe(Ic)}).raw=Ic,_r.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ea]},(Xo.geo.transverseMercator=function(){var n=Mr(_r),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[-n[1],n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},n.rotate([0,0])}).raw=_r,Xo.geom={},Xo.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=_t(e),i=_t(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(kr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var s=Sr(a),l=Sr(c),f=l[0]===s[0],h=l[l.length-1]===s[s.length-1],g=[];for(t=s.length-1;t>=0;--t)g.push(n[a[s[t]][2]]);for(t=+f;t<l.length-h;++t)g.push(n[a[l[t]][2]]);return g}var e=br,r=wr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},Xo.geom.polygon=function(n){return fa(n,Zc),n};var Zc=Xo.geom.polygon.prototype=[];Zc.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},Zc.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},Zc.clip=function(n){for(var t,e,r,u,i,o,a=Cr(n),c=-1,s=this.length-Cr(this),l=this[s-1];++c<s;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Er(o,l,u)?(Er(i,l,u)||n.push(Ar(i,o,l,u)),n.push(o)):Er(i,l,u)&&n.push(Ar(i,o,l,u)),i=o;a&&n.push(n[0]),l=u}return n};var Vc,Xc,$c,Bc,Wc,Jc=[],Gc=[];Pr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(jr),t.length},Br.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Wr.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=Qr(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(Gr(this,e),n=e,e=n.U),e.C=!1,r.C=!0,Kr(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(Kr(this,e),n=e,e=n.U),e.C=!1,r.C=!0,Gr(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?Qr(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,Gr(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Kr(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,Gr(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,Kr(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Gr(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,Kr(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},Xo.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return nu(e(n),a).cells.forEach(function(e,a){var c=e.edges,s=e.site,l=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):s.x>=r&&s.x<=i&&s.y>=u&&s.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];l.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Aa)*Aa,y:Math.round(o(n,t)/Aa)*Aa,i:t}})}var r=br,u=wr,i=r,o=u,a=Kc;return n?t(n):(t.links=function(n){return nu(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return nu(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(jr),c=-1,s=a.length,l=a[s-1].edge,f=l.l===o?l.r:l.l;++c<s;)u=l,i=f,l=a[c].edge,f=l.l===o?l.r:l.l,r<i.i&&r<f.i&&eu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=_t(r=n),t):r},t.y=function(n){return arguments.length?(o=_t(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?Kc:n,t):a===Kc?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===Kc?null:a&&a[1]},t)};var Kc=[[-1e6,-1e6],[1e6,1e6]];Xo.geom.delaunay=function(n){return Xo.geom.voronoi().triangles(n)},Xo.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,l=n.y;if(null!=c)if(oa(c-e)+oa(l-r)<.01)s(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,s(n,f,c,l,u,i,o,a),s(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else s(n,t,e,r,u,i,o,a)}function s(n,t,e,r,u,o,a,c){var s=.5*(u+a),l=.5*(o+c),f=e>=s,h=r>=l,g=(h<<1)+f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=iu()),f?u=s:a=s,h?o=l:c=l,i(n,t,e,r,u,o,a,c)}var l,f,h,g,p,v,d,m,y,x=_t(a),M=_t(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)l=n[g],l.x<v&&(v=l.x),l.y<d&&(d=l.y),l.x>m&&(m=l.x),l.y>y&&(y=l.y),f.push(l.x),h.push(l.y);else for(g=0;p>g;++g){var _=+x(l=n[g],g),b=+M(l,g);v>_&&(v=_),d>b&&(d=b),_>m&&(m=_),b>y&&(y=b),f.push(_),h.push(b)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=iu();if(k.add=function(n){i(k,n,+x(n,++g),+M(n,g),v,d,m,y)},k.visit=function(n){ou(n,k,v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=l=null,k}var o,a=br,c=wr;return(o=arguments.length)?(a=ru,c=uu,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},Xo.interpolateRgb=au,Xo.interpolateObject=cu,Xo.interpolateNumber=su,Xo.interpolateString=lu;var Qc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;Xo.interpolate=fu,Xo.interpolators=[function(n,t){var e=typeof t;return("string"===e?Va.has(t)||/^(#|rgb\(|hsl\()/.test(t)?au:lu:t instanceof G?au:"object"===e?Array.isArray(t)?hu:cu:su)(n,t)}],Xo.interpolateArray=hu;var ns=function(){return bt},ts=Xo.map({linear:ns,poly:xu,quad:function(){return du},cubic:function(){return mu},sin:function(){return Mu},exp:function(){return _u},circle:function(){return bu},elastic:wu,back:Su,bounce:function(){return ku}}),es=Xo.map({"in":bt,out:pu,"in-out":vu,"out-in":function(n){return vu(pu(n))}});Xo.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.substring(0,t):n,r=t>=0?n.substring(t+1):"in";return e=ts.get(e)||ns,r=es.get(r)||bt,gu(r(e.apply(null,$o.call(arguments,1))))},Xo.interpolateHcl=Eu,Xo.interpolateHsl=Au,Xo.interpolateLab=Cu,Xo.interpolateRound=Nu,Xo.transform=function(n){var t=Wo.createElementNS(Xo.ns.prefix.svg,"g");return(Xo.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Lu(e?e.matrix:rs)})(n)},Lu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rs={a:1,b:0,c:0,d:1,e:0,f:0};Xo.interpolateTransform=Ru,Xo.layout={},Xo.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Uu(n[e]));return t}},Xo.layout.chord=function(){function n(){var n,s,f,h,g,p={},v=[],d=Xo.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(s=0,g=-1;++g<i;)s+=u[h][g];v.push(s),m.push(Xo.range(i)),n+=s}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(ka-l*i)/n,s=0,h=-1;++h<i;){for(f=s,g=-1;++g<i;){var y=d[h],x=m[y][g],M=u[y][x],_=s,b=s+=M*n;p[y+"-"+x]={index:y,subindex:x,startAngle:_,endAngle:b,value:M}}r[y]={index:y,startAngle:f,endAngle:s,value:(s-f)/n},s+=l}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,s={},l=0;return s.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,s):u},s.padding=function(n){return arguments.length?(l=n,e=r=null,s):l},s.sortGroups=function(n){return arguments.length?(o=n,e=r=null,s):o},s.sortSubgroups=function(n){return arguments.length?(a=n,e=null,s):a},s.sortChords=function(n){return arguments.length?(c=n,e&&t(),s):c},s.chords=function(){return e||n(),e},s.groups=function(){return r||n(),r},s},Xo.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var s=t.charge/c;n.px-=i*s,n.py-=o*s}return!0}if(t.point&&c&&p>c){var s=t.pointCharge/c;n.px-=i*s,n.py-=o*s}}return!t.charge}}function t(n){n.px=Xo.event.x,n.py=Xo.event.y,a.resume()}var e,r,u,i,o,a={},c=Xo.dispatch("start","tick","end"),s=[1,1],l=.9,f=us,h=is,g=-30,p=os,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,x,M,_=m.length,b=y.length;for(e=0;b>e;++e)a=y[e],f=a.source,h=a.target,x=h.x-f.x,M=h.y-f.y,(p=x*x+M*M)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,x*=p,M*=p,h.x-=x*(d=f.weight/(h.weight+f.weight)),h.y-=M*d,f.x+=x*(d=1-d),f.y+=M*d);if((d=r*v)&&(x=s[0]/2,M=s[1]/2,e=-1,d))for(;++e<_;)a=m[e],a.x+=(x-a.x)*d,a.y+=(M-a.y)*d;if(g)for(Zu(t=Xo.geom.quadtree(m),r,o),e=-1;++e<_;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<_;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*l,a.y-=(a.py-(a.py=a.y))*l);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(s=n,a):s},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(l=+n,a):l},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),Xo.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;s>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,s=o.length;++a<s;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,l=y.length,p=s[0],v=s[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;l>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;l>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;l>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;l>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;l>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=Xo.behavior.drag().origin(bt).on("dragstart.force",Fu).on("drag.force",t).on("dragend.force",Ou)),arguments.length?(this.on("mouseover.force",Yu).on("mouseout.force",Iu).call(e),void 0):e},Xo.rebind(a,c,"on")};var us=20,is=1,os=1/0;Xo.layout.hierarchy=function(){function n(t,o,a){var c=u.call(e,t,o);if(t.depth=o,a.push(t),c&&(s=c.length)){for(var s,l,f=-1,h=t.children=new Array(s),g=0,p=o+1;++f<s;)l=h[f]=n(c[f],p,a),l.parent=t,g+=l.value;r&&h.sort(r),i&&(t.value=g)}else delete t.children,i&&(t.value=+i.call(e,t,o)||0);return t}function t(n,r){var u=n.children,o=0;if(u&&(a=u.length))for(var a,c=-1,s=r+1;++c<a;)o+=t(u[c],s);else i&&(o=+i.call(e,n,r)||0);return i&&(n.value=o),o}function e(t){var e=[];return n(t,0,e),e}var r=Bu,u=Xu,i=$u;return e.sort=function(n){return arguments.length?(r=n,e):r},e.children=function(n){return arguments.length?(u=n,e):u},e.value=function(n){return arguments.length?(i=n,e):i},e.revalue=function(n){return t(n,0),n},e},Xo.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,s=-1;for(r=t.value?r/t.value:0;++s<o;)n(a=i[s],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=Xo.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Vu(e,r)},Xo.layout.pie=function(){function n(i){var o=i.map(function(e,r){return+t.call(n,e,r)}),a=+("function"==typeof r?r.apply(this,arguments):r),c=(("function"==typeof u?u.apply(this,arguments):u)-a)/Xo.sum(o),s=Xo.range(i.length);null!=e&&s.sort(e===as?function(n,t){return o[t]-o[n]}:function(n,t){return e(i[n],i[t])});var l=[];return s.forEach(function(n){var t;l[n]={data:i[n],value:t=o[n],startAngle:a,endAngle:a+=t*c}}),l}var t=Number,e=as,r=0,u=ka;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n};var as={};Xo.layout.stack=function(){function n(a,c){var s=a.map(function(e,r){return t.call(n,e,r)}),l=s.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,l,c);s=Xo.permute(s,f),l=Xo.permute(l,f);var h,g,p,v=r.call(n,l,c),d=s.length,m=s[0].length;for(g=0;m>g;++g)for(u.call(n,s[0][g],p=v[g],l[0][g][1]),h=1;d>h;++h)u.call(n,s[h][g],p+=l[h-1][g][1],l[h][g][1]);return a}var t=bt,e=Qu,r=ni,u=Ku,i=Ju,o=Gu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:cs.get(t)||Qu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:ss.get(t)||ni,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var cs=Xo.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(ti),i=n.map(ei),o=Xo.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,s=[],l=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],s.push(e)):(c+=i[e],l.push(e));return l.reverse().concat(s)},reverse:function(n){return Xo.range(n.length).reverse()},"default":Qu}),ss=Xo.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,s,l=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=s=0,e=1;h>e;++e){for(t=0,u=0;l>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];l>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,s>c&&(s=c)}for(e=0;h>e;++e)g[e]-=s;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:ni});Xo.layout.histogram=function(){function n(n,i){for(var o,a,c=[],s=n.map(e,this),l=r.call(this,s,i),f=u.call(this,l,s,i),i=-1,h=s.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=s[i],a>=l[0]&&a<=l[1]&&(o=c[Xo.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=oi,u=ui;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=_t(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return ii(n,t)}:_t(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},Xo.layout.tree=function(){function n(n,i){function o(n,t){var r=n.children,u=n._tree;if(r&&(i=r.length)){for(var i,a,s,l=r[0],f=l,h=-1;++h<i;)s=r[h],o(s,a),f=c(s,a,f),a=s;vi(n);var g=.5*(l._tree.prelim+s._tree.prelim);t?(u.prelim=t._tree.prelim+e(n,t),u.mod=u.prelim-g):u.prelim=g}else t&&(u.prelim=t._tree.prelim+e(n,t))}function a(n,t){n.x=n._tree.prelim+t;var e=n.children;if(e&&(r=e.length)){var r,u=-1;for(t+=n._tree.mod;++u<r;)a(e[u],t)}}function c(n,t,r){if(t){for(var u,i=n,o=n,a=t,c=n.parent.children[0],s=i._tree.mod,l=o._tree.mod,f=a._tree.mod,h=c._tree.mod;a=si(a),i=ci(i),a&&i;)c=ci(c),o=si(o),o._tree.ancestor=n,u=a._tree.prelim+f-i._tree.prelim-s+e(a,i),u>0&&(di(mi(a,n,r),n,u),s+=u,l+=u),f+=a._tree.mod,s+=i._tree.mod,h+=c._tree.mod,l+=o._tree.mod;a&&!si(o)&&(o._tree.thread=a,o._tree.mod+=f-l),i&&!ci(c)&&(c._tree.thread=i,c._tree.mod+=s-h,r=n)}return r}var s=t.call(this,n,i),l=s[0];pi(l,function(n,t){n._tree={ancestor:n,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),o(l),a(l,-l._tree.prelim);var f=li(l,hi),h=li(l,fi),g=li(l,gi),p=f.x-e(f,h)/2,v=h.x+e(h,f)/2,d=g.depth||1;return pi(l,u?function(n){n.x*=r[0],n.y=n.depth*r[1],delete n._tree}:function(n){n.x=(n.x-p)/(v-p)*r[0],n.y=n.depth/d*r[1],delete n._tree}),s}var t=Xo.layout.hierarchy().sort(null).value(null),e=ai,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Vu(n,t)},Xo.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],s=u[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,pi(a,function(n){n.r=+l(n.value)}),pi(a,bi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/s))/2;pi(a,function(n){n.r+=f}),pi(a,bi),pi(a,function(n){n.r-=f})}return ki(a,c/2,s/2,t?1:1/Math.max(2*a.r/c,2*a.r/s)),o}var t,e=Xo.layout.hierarchy().sort(yi),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Vu(n,e)},Xo.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],s=0;pi(c,function(n){var t=n.children;t&&t.length?(n.x=Ci(t),n.y=Ai(t)):(n.x=o?s+=e(n,o):0,n.y=0,o=n)});var l=Ni(c),f=Li(c),h=l.x-e(l,f)/2,g=f.x+e(f,l)/2;return pi(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=Xo.layout.hierarchy().sort(null).value(null),e=ai,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Vu(n,t)},Xo.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,s=f(e),l=[],h=i.slice(),p=1/0,v="slice"===g?s.dx:"dice"===g?s.dy:"slice-dice"===g?1&e.depth?s.dy:s.dx:Math.min(s.dx,s.dy);for(n(h,s.dx*s.dy/e.value),l.area=0;(c=h.length)>0;)l.push(o=h[c-1]),l.area+=o.area,"squarify"!==g||(a=r(l,v))<=p?(h.pop(),p=a):(l.area-=l.pop().area,u(l,v,s,!1),v=Math.min(s.dx,s.dy),l.length=l.area=0,p=1/0);l.length&&(u(l,v,s,!0),l.length=l.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,s=e.y,l=t?c(n.area/t):0;if(t==e.dx){for((r||l>e.dy)&&(l=e.dy);++i<o;)u=n[i],u.x=a,u.y=s,u.dy=l,a+=u.dx=Math.min(e.x+e.dx-a,l?c(u.area/l):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=l,e.dy-=l}else{for((r||l>e.dx)&&(l=e.dx);++i<o;)u=n[i],u.x=a,u.y=s,u.dx=l,s+=u.dy=Math.min(e.y+e.dy-s,l?c(u.area/l):0);u.z=!1,u.dy+=e.y+e.dy-s,e.x+=l,e.dx-=l}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=s[0],i.dy=s[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=Xo.layout.hierarchy(),c=Math.round,s=[1,1],l=null,f=Ti,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(s=n,i):s},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ti(t):qi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return qi(t,n)}if(!arguments.length)return l;var r;return f=null==(l=n)?Ti:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Vu(i,a)},Xo.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=Xo.random.normal.apply(Xo,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=Xo.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},Xo.scale={};var ls={floor:bt,ceil:bt};Xo.scale.linear=function(){return Hi([0,1],[0,1],fu,!1)};var fs={s:1,g:1,p:1,r:1,e:1};Xo.scale.log=function(){return $i(Xo.scale.linear().domain([0,1]),10,!0,[1,10])};var hs=Xo.format(".0e"),gs={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};Xo.scale.pow=function(){return Bi(Xo.scale.linear(),1,[0,1])},Xo.scale.sqrt=function(){return Xo.scale.pow().exponent(.5)},Xo.scale.ordinal=function(){return Ji([],{t:"range",a:[[]]})},Xo.scale.category10=function(){return Xo.scale.ordinal().range(ps)},Xo.scale.category20=function(){return Xo.scale.ordinal().range(vs)},Xo.scale.category20b=function(){return Xo.scale.ordinal().range(ds)},Xo.scale.category20c=function(){return Xo.scale.ordinal().range(ms)};var ps=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ht),vs=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ht),ds=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ht),ms=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ht);Xo.scale.quantile=function(){return Gi([],[])},Xo.scale.quantize=function(){return Ki(0,1,[0,1])},Xo.scale.threshold=function(){return Qi([.5],[0,1])},Xo.scale.identity=function(){return no([0,1])},Xo.svg={},Xo.svg.arc=function(){function n(){var n=t.apply(this,arguments),i=e.apply(this,arguments),o=r.apply(this,arguments)+ys,a=u.apply(this,arguments)+ys,c=(o>a&&(c=o,o=a,a=c),a-o),s=Sa>c?"0":"1",l=Math.cos(o),f=Math.sin(o),h=Math.cos(a),g=Math.sin(a);return c>=xs?n?"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"M0,"+n+"A"+n+","+n+" 0 1,0 0,"+-n+"A"+n+","+n+" 0 1,0 0,"+n+"Z":"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"Z":n?"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L"+n*h+","+n*g+"A"+n+","+n+" 0 "+s+",0 "+n*l+","+n*f+"Z":"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L0,0"+"Z"}var t=to,e=eo,r=ro,u=uo;return n.innerRadius=function(e){return arguments.length?(t=_t(e),n):t},n.outerRadius=function(t){return arguments.length?(e=_t(t),n):e},n.startAngle=function(t){return arguments.length?(r=_t(t),n):r},n.endAngle=function(t){return arguments.length?(u=_t(t),n):u},n.centroid=function(){var n=(t.apply(this,arguments)+e.apply(this,arguments))/2,i=(r.apply(this,arguments)+u.apply(this,arguments))/2+ys;return[Math.cos(i)*n,Math.sin(i)*n]},n};var ys=-Ea,xs=ka-Aa;Xo.svg.line=function(){return io(bt)};var Ms=Xo.map({linear:oo,"linear-closed":ao,step:co,"step-before":so,"step-after":lo,basis:mo,"basis-open":yo,"basis-closed":xo,bundle:Mo,cardinal:go,"cardinal-open":fo,"cardinal-closed":ho,monotone:Eo});Ms.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var _s=[0,2/3,1/3,0],bs=[0,1/3,2/3,0],ws=[0,1/6,2/3,1/6];Xo.svg.line.radial=function(){var n=io(Ao);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},so.reverse=lo,lo.reverse=so,Xo.svg.area=function(){return Co(bt)},Xo.svg.area.radial=function(){var n=Co(Ao);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},Xo.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),s=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,s)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,s.r,s.p0)+r(s.r,s.p1,s.a1-s.a0)+u(s.r,s.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)+ys,l=s.call(n,u,r)+ys;return{r:i,a0:o,a1:l,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(l),i*Math.sin(l)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Sa)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=hr,o=gr,a=No,c=ro,s=uo;return n.radius=function(t){return arguments.length?(a=_t(t),n):a},n.source=function(t){return arguments.length?(i=_t(t),n):i},n.target=function(t){return arguments.length?(o=_t(t),n):o},n.startAngle=function(t){return arguments.length?(c=_t(t),n):c},n.endAngle=function(t){return arguments.length?(s=_t(t),n):s},n},Xo.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=hr,e=gr,r=Lo;return n.source=function(e){return arguments.length?(t=_t(e),n):t},n.target=function(t){return arguments.length?(e=_t(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},Xo.svg.diagonal.radial=function(){var n=Xo.svg.diagonal(),t=Lo,e=n.projection;return n.projection=function(n){return arguments.length?e(To(t=n)):t},n},Xo.svg.symbol=function(){function n(n,r){return(Ss.get(t.call(this,n,r))||Ro)(e.call(this,n,r))}var t=zo,e=qo;return n.type=function(e){return arguments.length?(t=_t(e),n):t},n.size=function(t){return arguments.length?(e=_t(t),n):e},n};var Ss=Xo.map({circle:Ro,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Cs)),e=t*Cs;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/As),e=t*As/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/As),e=t*As/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});Xo.svg.symbolTypes=Ss.keys();var ks,Es,As=Math.sqrt(3),Cs=Math.tan(30*Na),Ns=[],Ls=0;Ns.call=da.call,Ns.empty=da.empty,Ns.node=da.node,Ns.size=da.size,Xo.transition=function(n){return arguments.length?ks?n.transition():n:xa.transition()},Xo.transition.prototype=Ns,Ns.select=function(n){var t,e,r,u=this.id,i=[];n=M(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]);for(var c=this[o],s=-1,l=c.length;++s<l;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),jo(e,s,u,r.__transition__[u]),t.push(e)):t.push(null)}return Do(i,u)},Ns.selectAll=function(n){var t,e,r,u,i,o=this.id,a=[];n=_(n);for(var c=-1,s=this.length;++c<s;)for(var l=this[c],f=-1,h=l.length;++f<h;)if(r=l[f]){i=r.__transition__[o],e=n.call(r,r.__data__,f,c),a.push(t=[]);for(var g=-1,p=e.length;++g<p;)(u=e[g])&&jo(u,g,o,i),t.push(u)}return Do(a,o)},Ns.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=q(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Do(u,this.id)},Ns.tween=function(n,t){var e=this.id;return arguments.length<2?this.node().__transition__[e].tween.get(n):R(this,null==t?function(t){t.__transition__[e].tween.remove(n)}:function(r){r.__transition__[e].tween.set(n,t)})},Ns.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ru:fu,a=Xo.ns.qualify(n);return Po(this,"attr."+n,t,a.local?i:u)},Ns.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=Xo.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Ns.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=Go.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=fu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Po(this,"style."+n,t,u)},Ns.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,Go.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Ns.text=function(n){return Po(this,"text",n,Uo)},Ns.remove=function(){return this.each("end.transition",function(){var n;this.__transition__.count<2&&(n=this.parentNode)&&n.removeChild(this)})},Ns.ease=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof n&&(n=Xo.ease.apply(Xo,arguments)),R(this,function(e){e.__transition__[t].ease=n}))},Ns.delay=function(n){var t=this.id;return R(this,"function"==typeof n?function(e,r,u){e.__transition__[t].delay=+n.call(e,e.__data__,r,u)}:(n=+n,function(e){e.__transition__[t].delay=n}))},Ns.duration=function(n){var t=this.id;return R(this,"function"==typeof n?function(e,r,u){e.__transition__[t].duration=Math.max(1,n.call(e,e.__data__,r,u))}:(n=Math.max(1,n),function(e){e.__transition__[t].duration=n}))},Ns.each=function(n,t){var e=this.id;if(arguments.length<2){var r=Es,u=ks;ks=e,R(this,function(t,r,u){Es=t.__transition__[e],n.call(t,t.__data__,r,u)}),Es=r,ks=u}else R(this,function(r){var u=r.__transition__[e];(u.event||(u.event=Xo.dispatch("start","end"))).on(n,t)});return this},Ns.transition=function(){for(var n,t,e,r,u=this.id,i=++Ls,o=[],a=0,c=this.length;c>a;a++){o.push(n=[]);for(var t=this[a],s=0,l=t.length;l>s;s++)(e=t[s])&&(r=Object.create(e.__transition__[u]),r.delay+=r.duration,jo(e,s,i,r)),n.push(e)}return Do(o,i)},Xo.svg.axis=function(){function n(n){n.each(function(){var n,s=Xo.select(this),l=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):bt:t,p=s.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Aa),d=Xo.transition(p.exit()).style("opacity",Aa).remove(),m=Xo.transition(p).style("opacity",1),y=Ri(f),x=s.selectAll(".domain").data([0]),M=(x.enter().append("path").attr("class","domain"),Xo.transition(x));v.append("line"),v.append("text");var _=v.select("line"),b=m.select("line"),w=p.select("text").text(g),S=v.select("text"),k=m.select("text");switch(r){case"bottom":n=Ho,_.attr("y2",u),S.attr("y",Math.max(u,0)+o),b.attr("x2",0).attr("y2",u),k.attr("x",0).attr("y",Math.max(u,0)+o),w.attr("dy",".71em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+i+"V0H"+y[1]+"V"+i);break;case"top":n=Ho,_.attr("y2",-u),S.attr("y",-(Math.max(u,0)+o)),b.attr("x2",0).attr("y2",-u),k.attr("x",0).attr("y",-(Math.max(u,0)+o)),w.attr("dy","0em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+-i+"V0H"+y[1]+"V"+-i);break;case"left":n=Fo,_.attr("x2",-u),S.attr("x",-(Math.max(u,0)+o)),b.attr("x2",-u).attr("y2",0),k.attr("x",-(Math.max(u,0)+o)).attr("y",0),w.attr("dy",".32em").style("text-anchor","end"),M.attr("d","M"+-i+","+y[0]+"H0V"+y[1]+"H"+-i);break;case"right":n=Fo,_.attr("x2",u),S.attr("x",Math.max(u,0)+o),b.attr("x2",u).attr("y2",0),k.attr("x",Math.max(u,0)+o).attr("y",0),w.attr("dy",".32em").style("text-anchor","start"),M.attr("d","M"+i+","+y[0]+"H0V"+y[1]+"H"+i)}if(f.rangeBand){var E=f,A=E.rangeBand()/2;l=f=function(n){return E(n)+A}}else l.rangeBand?l=f:d.call(n,f);v.call(n,l),m.call(n,f)})}var t,e=Xo.scale.linear(),r=Ts,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in qs?t+"":Ts,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ts="bottom",qs={top:1,right:1,bottom:1,left:1};Xo.svg.brush=function(){function n(i){i.each(function(){var i=Xo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,bt);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return zs[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,f=Xo.transition(i),h=Xo.transition(o);c&&(l=Ri(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),e(f)),s&&(l=Ri(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+l[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",l[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==Xo.event.keyCode&&(C||(x=null,L[0]-=l[1],L[1]-=f[1],C=2),d())}function p(){32==Xo.event.keyCode&&2==C&&(L[0]+=l[1],L[1]+=f[1],C=0,d())}function v(){var n=Xo.mouse(_),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),C||(Xo.event.altKey?(x||(x=[(l[0]+l[1])/2,(f[0]+f[1])/2]),L[0]=l[+(n[0]<x[0])],L[1]=f[+(n[1]<x[1])]):x=null),E&&m(n,c,0)&&(e(S),u=!0),A&&m(n,s,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,a=Ri(t),c=a[0],s=a[1],p=L[e],v=e?f:l,d=v[1]-v[0];return C&&(c-=p,s-=d+p),r=(e?g:h)?Math.max(c,Math.min(s,n[e])):n[e],C?u=(r+=p)+d:(x&&(p=Math.max(c,Math.min(s,2*x[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function y(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),Xo.select("body").style("cursor",null),T.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),N(),w({type:"brushend"})}var x,M,_=this,b=Xo.select(Xo.event.target),w=a.of(_,arguments),S=Xo.select(_),k=b.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&s,C=b.classed("extent"),N=O(),L=Xo.mouse(_),T=Xo.select(Go).on("keydown.brush",u).on("keyup.brush",p);if(Xo.event.changedTouches?T.on("touchmove.brush",v).on("touchend.brush",y):T.on("mousemove.brush",v).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),C)L[0]=l[0]-L[0],L[1]=f[0]-L[1];else if(k){var q=+/w$/.test(k),z=+/^n/.test(k);M=[l[1-q]-L[0],f[1-z]-L[1]],L[0]=l[q],L[1]=f[z]}else Xo.event.altKey&&(x=L.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),Xo.select("body").style("cursor",b.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=y(n,"brushstart","brush","brushend"),c=null,s=null,l=[0,0],f=[0,0],h=!0,g=!0,p=Rs[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:l,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,ks?Xo.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,l=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=hu(l,t.x),r=hu(f,t.y);return i=o=null,function(u){l=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Rs[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,p=Rs[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(h=!!t[0],g=!!t[1]):c?h=!!t:s&&(g=!!t),n):c&&s?[h,g]:c?h:s?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=l[0]||r!=l[1])&&(l=[e,r])),s&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],s.invert&&(u=s(u),a=s(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=l[0],r=l[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),s&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],s.invert&&(u=s.invert(u),a=s.invert(a)),u>a&&(h=u,u=a,a=h))),c&&s?[[e,u],[r,a]]:c?[e,r]:s&&[u,a])},n.clear=function(){return n.empty()||(l=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&l[0]==l[1]||!!s&&f[0]==f[1]},Xo.rebind(n,a,"on")};var zs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Rs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ds=tc.format=ac.timeFormat,Ps=Ds.utc,Us=Ps("%Y-%m-%dT%H:%M:%S.%LZ");Ds.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Oo:Us,Oo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Oo.toString=Us.toString,tc.second=Rt(function(n){return new ec(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),tc.seconds=tc.second.range,tc.seconds.utc=tc.second.utc.range,tc.minute=Rt(function(n){return new ec(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),tc.minutes=tc.minute.range,tc.minutes.utc=tc.minute.utc.range,tc.hour=Rt(function(n){var t=n.getTimezoneOffset()/60;return new ec(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),tc.hours=tc.hour.range,tc.hours.utc=tc.hour.utc.range,tc.month=Rt(function(n){return n=tc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),tc.months=tc.month.range,tc.months.utc=tc.month.utc.range;var js=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Hs=[[tc.second,1],[tc.second,5],[tc.second,15],[tc.second,30],[tc.minute,1],[tc.minute,5],[tc.minute,15],[tc.minute,30],[tc.hour,1],[tc.hour,3],[tc.hour,6],[tc.hour,12],[tc.day,1],[tc.day,2],[tc.week,1],[tc.month,1],[tc.month,3],[tc.year,1]],Fs=Ds.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",be]]),Os={range:function(n,t,e){return Xo.range(Math.ceil(n/e)*e,+t,e).map(Io)},floor:bt,ceil:bt};Hs.year=tc.year,tc.scale=function(){return Yo(Xo.scale.linear(),Hs,Fs)};var Ys=Hs.map(function(n){return[n[0].utc,n[1]]}),Is=Ps.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",be]]);Ys.year=tc.year.utc,tc.scale.utc=function(){return Yo(Xo.scale.linear(),Ys,Is)},Xo.text=wt(function(n){return n.responseText}),Xo.json=function(n,t){return St(n,"application/json",Zo,t)},Xo.html=function(n,t){return St(n,"text/html",Vo,t)},Xo.xml=wt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(Xo):"object"==typeof module&&module.exports?module.exports=Xo:this.d3=Xo}();'use strict';tr.exportTo('tr.ui.b',function(){var THIS_DOC=document.currentScript.ownerDocument;var svgNS='http://www.w3.org/2000/svg';var ColorScheme=tr.b.ColorScheme;function getColorOfKey(key,selected){var id=ColorScheme.getColorIdForGeneralPurposeString(key);if(selected)
-id+=ColorScheme.properties.brightenedOffsets[0];return ColorScheme.colorsAsStrings[id];}
-var ChartBase=tr.ui.b.define('svg',undefined,svgNS);ChartBase.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.classList.add('chart-base');this.chartTitle_=undefined;this.seriesKeys_=undefined;this.width_=400;this.height_=300;var template=THIS_DOC.querySelector('#chart-base-template');var svgEl=template.content.querySelector('svg');for(var i=0;i<svgEl.children.length;i++)
-this.appendChild(svgEl.children[i].cloneNode(true));Object.defineProperty(this,'width',{get:function(){return this.width_;},set:function(width){this.width_=width;this.updateContents_();}});Object.defineProperty(this,'height',{get:function(){return this.height_;},set:function(height){this.height_=height;this.updateContents_();}});},get chartTitle(){return this.chartTitle_;},set chartTitle(chartTitle){this.chartTitle_=chartTitle;this.updateContents_();},get chartAreaElement(){return this.querySelector('#chart-area');},setSize:function(size){this.width_=size.width;this.height_=size.height;this.updateContents_();},getMargin_:function(){var margin={top:20,right:20,bottom:30,left:50};if(this.chartTitle_)
-margin.top+=20;return margin;},get margin(){return this.getMargin_();},get chartAreaSize(){var margin=this.margin;return{width:this.width_-margin.left-margin.right,height:this.height_-margin.top-margin.bottom};},getLegendKeys_:function(){throw new Error('Not implemented');},updateScales_:function(){throw new Error('Not implemented');},updateContents_:function(){var margin=this.margin;var thisSel=d3.select(this);thisSel.attr('width',this.width_);thisSel.attr('height',this.height_);var chartAreaSel=d3.select(this.chartAreaElement);chartAreaSel.attr('transform','translate('+margin.left+','+margin.top+')');this.updateScales_();this.updateTitle_(chartAreaSel);this.updateLegend_();},updateTitle_:function(chartAreaSel){var titleSel=chartAreaSel.select('#title');if(!this.chartTitle_){titleSel.style('display','none');return;}
-var width=this.chartAreaSize.width;titleSel.attr('transform','translate('+width*0.5+',-5)').style('display',undefined).style('text-anchor','middle').attr('class','title').attr('width',width).text(this.chartTitle_);},updateLegend_:function(){var keys=this.getLegendKeys_();if(keys===undefined)
-return;var chartAreaSel=d3.select(this.chartAreaElement);var chartAreaSize=this.chartAreaSize;var legendEntriesSel=chartAreaSel.selectAll('.legend').data(keys.slice().reverse());legendEntriesSel.enter().append('g').attr('class','legend').attr('transform',function(d,i){return'translate(0,'+i*20+')';}).append('text').text(function(key){return key;});legendEntriesSel.exit().remove();legendEntriesSel.attr('x',chartAreaSize.width-18).attr('width',18).attr('height',18).style('fill',function(key){var selected=this.currentHighlightedLegendKey===key;return getColorOfKey(key,selected);}.bind(this));legendEntriesSel.selectAll('text').attr('x',chartAreaSize.width-24).attr('y',9).attr('dy','.35em').style('text-anchor','end').text(function(d){return d;});},get highlightedLegendKey(){return this.highlightedLegendKey_;},set highlightedLegendKey(highlightedLegendKey){this.highlightedLegendKey_=highlightedLegendKey;this.updateHighlight_();},get currentHighlightedLegendKey(){if(this.tempHighlightedLegendKey_)
-return this.tempHighlightedLegendKey_;return this.highlightedLegendKey_;},pushTempHighlightedLegendKey:function(key){if(this.tempHighlightedLegendKey_)
-throw new Error('push cannot nest');this.tempHighlightedLegendKey_=key;this.updateHighlight_();},popTempHighlightedLegendKey:function(key){if(this.tempHighlightedLegendKey_!=key)
-throw new Error('pop cannot happen');this.tempHighlightedLegendKey_=undefined;this.updateHighlight_();},updateHighlight_:function(){var chartAreaSel=d3.select(this.chartAreaElement);var legendEntriesSel=chartAreaSel.selectAll('.legend');var that=this;legendEntriesSel.each(function(key){var highlighted=key==that.currentHighlightedLegendKey;var color=getColorOfKey(key,highlighted);this.style.fill=color;if(highlighted)
-this.style.fontWeight='bold';else
-this.style.fontWeight='';});}};return{getColorOfKey:getColorOfKey,ChartBase:ChartBase};});'use strict';tr.exportTo('tr.ui.b',function(){function MouseTracker(opt_targetElement){this.onMouseDown_=this.onMouseDown_.bind(this);this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.targetElement=opt_targetElement;}
-MouseTracker.prototype={get targetElement(){return this.targetElement_;},set targetElement(targetElement){if(this.targetElement_)
-this.targetElement_.removeEventListener('mousedown',this.onMouseDown_);this.targetElement_=targetElement;if(this.targetElement_)
-this.targetElement_.addEventListener('mousedown',this.onMouseDown_);},onMouseDown_:function(e){if(e.button!==0)
-return true;e=this.remakeEvent_(e,'mouse-tracker-start');this.targetElement_.dispatchEvent(e);document.addEventListener('mousemove',this.onMouseMove_);document.addEventListener('mouseup',this.onMouseUp_);this.targetElement_.addEventListener('blur',this.onMouseUp_);this.savePreviousUserSelect_=document.body.style['-webkit-user-select'];document.body.style['-webkit-user-select']='none';e.preventDefault();return true;},onMouseMove_:function(e){e=this.remakeEvent_(e,'mouse-tracker-move');this.targetElement_.dispatchEvent(e);},onMouseUp_:function(e){document.removeEventListener('mousemove',this.onMouseMove_);document.removeEventListener('mouseup',this.onMouseUp_);this.targetElement_.removeEventListener('blur',this.onMouseUp_);document.body.style['-webkit-user-select']=this.savePreviousUserSelect_;e=this.remakeEvent_(e,'mouse-tracker-end');this.targetElement_.dispatchEvent(e);},remakeEvent_:function(e,newType){var remade=new tr.b.Event(newType,true,true);remade.x=e.x;remade.y=e.y;remade.offsetX=e.offsetX;remade.offsetY=e.offsetY;remade.clientX=e.clientX;remade.clientY=e.clientY;return remade;}};function trackMouseMovesUntilMouseUp(mouseMoveHandler,opt_mouseUpHandler,opt_keyUpHandler){function cleanupAndDispatchToMouseUp(e){document.removeEventListener('mousemove',mouseMoveHandler);if(opt_keyUpHandler)
-document.removeEventListener('keyup',opt_keyUpHandler);document.removeEventListener('mouseup',cleanupAndDispatchToMouseUp);if(opt_mouseUpHandler)
-opt_mouseUpHandler(e);}
-document.addEventListener('mousemove',mouseMoveHandler);if(opt_keyUpHandler)
-document.addEventListener('keyup',opt_keyUpHandler);document.addEventListener('mouseup',cleanupAndDispatchToMouseUp);}
-return{MouseTracker:MouseTracker,trackMouseMovesUntilMouseUp:trackMouseMovesUntilMouseUp};});'use strict';tr.exportTo('tr.ui.b',function(){var ChartBase=tr.ui.b.ChartBase;var ChartBase2D=tr.ui.b.define('chart-base-2d',ChartBase);ChartBase2D.prototype={__proto__:ChartBase.prototype,decorate:function(){ChartBase.prototype.decorate.call(this);this.classList.add('chart-base-2d');this.xScale_=d3.scale.linear();this.yScale_=d3.scale.linear();this.data_=[];this.seriesKeys_=[];this.leftMargin_=50;d3.select(this.chartAreaElement).append('g').attr('id','brushes');d3.select(this.chartAreaElement).append('g').attr('id','series');this.addEventListener('mousedown',this.onMouseDown_.bind(this));},get data(){return this.data_;},set data(data){if(data===undefined)
-throw new Error('data must be an Array');this.data_=data;this.updateSeriesKeys_();this.updateContents_();},getSampleWidth_:function(data,index,leftSide){var leftIndex,rightIndex;if(leftSide){leftIndex=Math.max(index-1,0);rightIndex=index;}else{leftIndex=index;rightIndex=Math.min(index+1,data.length-1);}
-var leftWidth=this.getXForDatum_(data[index],index)-
-this.getXForDatum_(data[leftIndex],leftIndex);var rightWidth=this.getXForDatum_(data[rightIndex],rightIndex)-
-this.getXForDatum_(data[index],index);return leftWidth*0.5+rightWidth*0.5;},getLegendKeys_:function(){if(this.seriesKeys_&&this.seriesKeys_.length>1)
-return this.seriesKeys_.slice();return[];},updateSeriesKeys_:function(){var keySet={};this.data_.forEach(function(datum){Object.keys(datum).forEach(function(key){if(this.isDatumFieldSeries_(key))
-keySet[key]=true;},this);},this);this.seriesKeys_=Object.keys(keySet);},isDatumFieldSeries_:function(fieldName){throw new Error('Not implemented');},getXForDatum_:function(datum,index){throw new Error('Not implemented');},updateScales_:function(){if(this.data_.length===0)
-return;var width=this.chartAreaSize.width;var height=this.chartAreaSize.height;this.xScale_.range([0,width]);this.xScale_.domain(d3.extent(this.data_,this.getXForDatum_.bind(this)));var yRange=new tr.b.Range();this.data_.forEach(function(datum){this.seriesKeys_.forEach(function(key){if(datum[key]!==undefined)
-yRange.addValue(datum[key]);});},this);this.yScale_.range([height,0]);this.yScale_.domain([yRange.min,yRange.max]);},updateBrushContents_:function(brushSel){brushSel.selectAll('*').remove();},updateXAxis_:function(xAxis){xAxis.selectAll('*').remove();xAxis[0][0].style.opacity=0;xAxis.attr('transform','translate(0,'+this.chartAreaSize.height+')').call(d3.svg.axis().scale(this.xScale_).orient('bottom'));window.requestAnimationFrame(function(){var previousRight=undefined;xAxis.selectAll('.tick')[0].forEach(function(tick){var currentLeft=tick.transform.baseVal[0].matrix.e;if((previousRight===undefined)||(currentLeft>(previousRight+3))){var currentWidth=tick.getBBox().width;previousRight=currentLeft+currentWidth;}else{tick.style.opacity=0;}});xAxis[0][0].style.opacity=1;});},getMargin_:function(){var margin=ChartBase.prototype.getMargin_.call(this);margin.left=this.leftMargin_;return margin;},updateYAxis_:function(yAxis){yAxis.selectAll('*').remove();yAxis[0][0].style.opacity=0;yAxis.call(d3.svg.axis().scale(this.yScale_).orient('left'));window.requestAnimationFrame(function(){var previousTop=undefined;var leftMargin=0;yAxis.selectAll('.tick')[0].forEach(function(tick){var bbox=tick.getBBox();leftMargin=Math.max(leftMargin,bbox.width);var currentTop=tick.transform.baseVal[0].matrix.f;var currentBottom=currentTop+bbox.height;if((previousTop===undefined)||(previousTop>(currentBottom+3))){previousTop=currentTop;}else{tick.style.opacity=0;}});if(leftMargin>this.leftMargin_){this.leftMargin_=leftMargin;this.updateContents_();}else{yAxis[0][0].style.opacity=1;}}.bind(this));},updateContents_:function(){ChartBase.prototype.updateContents_.call(this);var chartAreaSel=d3.select(this.chartAreaElement);this.updateXAxis_(chartAreaSel.select('.x.axis'));this.updateYAxis_(chartAreaSel.select('.y.axis'));this.updateBrushContents_(chartAreaSel.select('#brushes'));this.updateDataContents_(chartAreaSel.select('#series'));},updateDataContents_:function(seriesSel){throw new Error('Not implemented');},getDataBySeriesKey_:function(){var dataBySeriesKey={};this.seriesKeys_.forEach(function(seriesKey){dataBySeriesKey[seriesKey]=[];});this.data_.forEach(function(multiSeriesDatum,index){var x=this.getXForDatum_(multiSeriesDatum,index);d3.keys(multiSeriesDatum).forEach(function(seriesKey){if(seriesKey==='x')
-return;if(multiSeriesDatum[seriesKey]===undefined)
-return;var singleSeriesDatum={x:x};singleSeriesDatum[seriesKey]=multiSeriesDatum[seriesKey];dataBySeriesKey[seriesKey].push(singleSeriesDatum);});},this);return dataBySeriesKey;},getDataPointAtClientPoint_:function(clientX,clientY){var rect=this.getBoundingClientRect();var margin=this.margin;var x=clientX-rect.left-margin.left;var y=clientY-rect.top-margin.top;x=this.xScale_.invert(x);y=this.yScale_.invert(y);x=tr.b.clamp(x,this.xScale_.domain()[0],this.xScale_.domain()[1]);y=tr.b.clamp(y,this.yScale_.domain()[0],this.yScale_.domain()[1]);return{x:x,y:y};},prepareDataEvent_:function(mouseEvent,dataEvent){var dataPoint=this.getDataPointAtClientPoint_(mouseEvent.clientX,mouseEvent.clientY);dataEvent.x=dataPoint.x;dataEvent.y=dataPoint.y;},onMouseDown_:function(mouseEvent){tr.ui.b.trackMouseMovesUntilMouseUp(this.onMouseMove_.bind(this,mouseEvent.button),this.onMouseUp_.bind(this,mouseEvent.button));mouseEvent.preventDefault();mouseEvent.stopPropagation();var dataEvent=new tr.b.Event('item-mousedown');dataEvent.button=mouseEvent.button;this.classList.add('updating-brushing-state');this.prepareDataEvent_(mouseEvent,dataEvent);this.dispatchEvent(dataEvent);},onMouseMove_:function(button,mouseEvent){if(mouseEvent.buttons!==undefined){mouseEvent.preventDefault();mouseEvent.stopPropagation();}
-var dataEvent=new tr.b.Event('item-mousemove');dataEvent.button=button;this.prepareDataEvent_(mouseEvent,dataEvent);this.dispatchEvent(dataEvent);},onMouseUp_:function(button,mouseEvent){mouseEvent.preventDefault();mouseEvent.stopPropagation();var dataEvent=new tr.b.Event('item-mouseup');dataEvent.button=button;this.prepareDataEvent_(mouseEvent,dataEvent);this.dispatchEvent(dataEvent);this.classList.remove('updating-brushing-state');}};return{ChartBase2D:ChartBase2D};});'use strict';tr.exportTo('tr.ui.b',function(){var ChartBase2D=tr.ui.b.ChartBase2D;var ChartBase2DBrushX=tr.ui.b.define('chart-base-2d-brush-1d',ChartBase2D);ChartBase2DBrushX.prototype={__proto__:ChartBase2D.prototype,decorate:function(){ChartBase2D.prototype.decorate.call(this);this.brushedRange_=new tr.b.Range();},set brushedRange(range){this.brushedRange_.reset();this.brushedRange_.addRange(range);this.updateContents_();},computeBrushRangeFromIndices:function(indexA,indexB){indexA=tr.b.clamp(indexA,0,this.data_.length-1);indexB=tr.b.clamp(indexB,0,this.data_.length-1);var leftIndex=Math.min(indexA,indexB);var rightIndex=Math.max(indexA,indexB);var r=new tr.b.Range();r.addValue(this.getXForDatum_(this.data_[leftIndex],leftIndex)-
-this.getSampleWidth_(this.data_,leftIndex,true));r.addValue(this.getXForDatum_(this.data_[rightIndex],rightIndex)+
-this.getSampleWidth_(this.data_,rightIndex,false));return r;},getDataIndex_:function(dataX){if(!this.data_)
-return undefined;var bisect=d3.bisector(this.getXForDatum_.bind(this)).right;return bisect(this.data_,dataX)-1;},prepareDataEvent_:function(mouseEvent,dataEvent){ChartBase2D.prototype.prepareDataEvent_.call(this,mouseEvent,dataEvent);dataEvent.index=this.getDataIndex_(dataEvent.x);if(dataEvent.index!==undefined)
-dataEvent.data=this.data_[dataEvent.index];},updateBrushContents_:function(brushSel){brushSel.selectAll('*').remove();var brushes=this.brushedRange_.isEmpty?[]:[this.brushedRange_];var brushRectsSel=brushSel.selectAll('rect').data(brushes);brushRectsSel.enter().append('rect');brushRectsSel.exit().remove();brushRectsSel.attr('x',function(d){return this.xScale_(d.min);}.bind(this)).attr('y',0).attr('width',function(d){return this.xScale_(d.max)-this.xScale_(d.min);}.bind(this)).attr('height',this.chartAreaSize.height);}};return{ChartBase2DBrushX:ChartBase2DBrushX};});'use strict';tr.exportTo('tr.ui.b',function(){var ChartBase2DBrushX=tr.ui.b.ChartBase2DBrushX;var LineChart=tr.ui.b.define('line-chart',ChartBase2DBrushX);LineChart.prototype={__proto__:ChartBase2DBrushX.prototype,decorate:function(){ChartBase2DBrushX.prototype.decorate.call(this);this.classList.add('line-chart');},isDatumFieldSeries_:function(fieldName){return fieldName!='x';},getXForDatum_:function(datum,index){return datum.x;},updateDataContents_:function(dataSel){dataSel.selectAll('*').remove();var dataBySeriesKey=this.getDataBySeriesKey_();var pathsSel=dataSel.selectAll('path').data(this.seriesKeys_);pathsSel.enter().append('path').attr('class','line').style('stroke',function(key){return tr.ui.b.getColorOfKey(key);}).attr('d',function(key){var line=d3.svg.line().x(function(d){return this.xScale_(d.x);}.bind(this)).y(function(d){return this.yScale_(d[key]);}.bind(this));return line(dataBySeriesKey[key]);}.bind(this));pathsSel.exit().remove();}};return{LineChart:LineChart};});'use strict';var EventSet=tr.model.EventSet;var CHART_TITLE='Power (in mW) by ms since vertical sync';var CHART_WIDTH_FRACTION_OF_BODY=0.5;Polymer('tr-ui-a-frame-power-usage-chart',{ready:function(){this.chart_=undefined;this.samples_=new EventSet();this.vSyncTimestamps_=[];},get chart(){return this.chart_;},get samples(){return this.samples_;},get vSyncTimestamps(){return this.vSyncTimestamps_;},setData:function(samples,vSyncTimestamps){this.samples_=(samples===undefined)?new EventSet():samples;this.vSyncTimestamps_=(vSyncTimestamps===undefined)?[]:vSyncTimestamps;this.updateContents_();},updateContents_:function(){this.clearChart_();var data=this.getDataForLineChart_();if(data.length===0)
-return;this.chart_=this.createChart_(data);this.$.content.appendChild(this.chart_);},createChart_:function(data){var chart=new tr.ui.b.LineChart();var width=document.body.clientWidth*CHART_WIDTH_FRACTION_OF_BODY;chart.setSize({width:width,height:chart.height});chart.chartTitle=CHART_TITLE;chart.data=data;return chart;},clearChart_:function(){var content=this.$.content;while(content.firstChild)
-content.removeChild(content.firstChild);this.chart_=undefined;},getDataForLineChart_:function(){var sortedSamples=this.sortSamplesByTimestampAscending_(this.samples);var vSyncTimestamps=this.vSyncTimestamps.slice();var lastVSyncTimestamp=undefined;var points=[];var frameNumber=0;sortedSamples.forEach(function(sample){while(vSyncTimestamps.length>0&&vSyncTimestamps[0]<=sample.start){lastVSyncTimestamp=vSyncTimestamps.shift();frameNumber++;}
-if(lastVSyncTimestamp===undefined)
-return;var point={x:sample.start-lastVSyncTimestamp};point['f'+frameNumber]=sample.power;points.push(point);});return points;},sortSamplesByTimestampAscending_:function(samples){return samples.toArray().sort(function(smpl1,smpl2){return smpl1.start-smpl2.start;});}});'use strict';Polymer('tr-ui-a-power-sample-summary-table',{ready:function(){this.$.table.tableColumns=[{title:'Min power',width:'100px',value:function(row){return tr.b.u.Units.powerInWatts.format(row.min/1000.0);}},{title:'Max power',width:'100px',value:function(row){return tr.b.u.Units.powerInWatts.format(row.max/1000.0);}},{title:'Time-weighted average',width:'100px',value:function(row){return tr.b.u.Units.powerInWatts.format(row.timeWeightedAverage/1000.0);}},{title:'Energy consumed',width:'100px',value:function(row){return tr.b.u.Units.energyInJoules.format(row.energyConsumed);}},{title:'Sample count',width:'100%',value:function(row){return row.sampleCount;}}];this.samples=new tr.model.EventSet();},get samples(){return this.samples_;},set samples(samples){if(samples===this.samples)
-return;this.samples_=(samples===undefined)?new tr.model.EventSet():samples;this.updateContents_();},updateContents_:function(){if(this.samples.length===0){this.$.table.tableRows=[];}else{this.$.table.tableRows=[{min:this.getMin(),max:this.getMax(),timeWeightedAverage:this.getTimeWeightedAverage(),energyConsumed:this.getEnergyConsumed(),sampleCount:this.samples.length}];}
-this.$.table.rebuild();},getMin:function(){return Math.min.apply(null,this.samples.map(function(sample){return sample.power;}));},getMax:function(){return Math.max.apply(null,this.samples.map(function(sample){return sample.power;}));},getTimeWeightedAverage:function(){var energyConsumed=this.getEnergyConsumed();if(energyConsumed==='N/A')
-return'N/A';return this.getEnergyConsumed()/this.samples.bounds.duration*1000;},getEnergyConsumed:function(){if(this.samples.length<2)
-return'N/A';var bounds=this.samples.bounds;return this.samples[0].series.getEnergyConsumed(bounds.min,bounds.max);}});'use strict';Polymer('tr-ui-a-multi-power-sample-sub-view',{ready:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;this.updateContents_();},updateContents_:function(){var samples=this.selection;var vSyncTimestamps=(this.selection===undefined)?[]:this.selection[0].series.device.vSyncTimestamps;this.$.summaryTable.samples=samples;this.$.samplesTable.samples=samples;this.$.chart.setData(this.selection,vSyncTimestamps);}});'use strict';(function(){var EventRegistry=tr.model.EventRegistry;Polymer('tr-ui-a-analysis-view',{ready:function(){this.tabView_=document.createElement('tr-ui-a-tab-view');this.tabView_.style.flex='1 1 auto';this.appendChild(this.tabView_);this.brushingStateController_=undefined;this.onSelectedTabChange_=this.onSelectedTabChange_.bind(this);this.onSelectionChanged_=this.onSelectionChanged_.bind(this);this.lastSeenSelection_=new tr.model.EventSet();},set tallMode(value){if(value)
-this.classList.add('tall-mode');else
-this.classList.remove('tall-mode');},get tallMode(){return this.classList.contains('tall-mode');},get tabView(){return this.tabView_;},get brushingStateController(){return this.brushingStateController_;},set brushingStateController(brushingStateController){if(this.brushingStateController){this.brushingStateController_.removeEventListener('change',this.onSelectionChanged_);}
-this.brushingStateController_=brushingStateController;if(this.brushingStateController){this.brushingStateController_.addEventListener('change',this.onSelectionChanged_);}
-this.onSelectionChanged_();},get selection(){return this.brushingStateController_.selection;},onSelectionChanged_:function(e){var selection=this.brushingStateController_.selection;var selectionHasSameValue=this.lastSeenSelection_.equals(selection);this.lastSeenSelection_=selection;if(selectionHasSameValue)
-return;var lastSelectedTabTagName;var lastSelectedTabTypeName;if(this.tabView_.selectedTab){lastSelectedTabTagName=this.tabView_.selectedTab.tagName;lastSelectedTabTypeName=this.tabView_.selectedTab._eventTypeName;}
-this.tallMode=false;var previouslySelectedTab=this.tabView_.selectedTab;this.tabView_.removeEventListener('selected-tab-change',this.onSelectedTabChange_);var previousSubViews={};for(var i=0;i<this.tabView_.children.length;i++){var previousSubView=this.tabView_.children[i];previousSubViews[previousSubView._eventTypeName]=previousSubView;}
-this.tabView_.saveTabStates();this.tabView_.textContent='';if(selection.length==0){this.tabView_.tabStripHeadingText='Nothing selected. Tap stuff.';}else if(selection.length==1){this.tabView_.tabStripHeadingText='1 item selected: ';}else{this.tabView_.tabStripHeadingText=selection.length+' items selected: ';}
-var eventsByBaseTypeName=selection.getEventsOrganizedByBaseType(true);var numBaseTypesToAnalyze=tr.b.dictionaryLength(eventsByBaseTypeName);for(var eventTypeName in eventsByBaseTypeName){var subSelection=eventsByBaseTypeName[eventTypeName];var subView=this.createSubViewForSelection_(eventTypeName,subSelection,previousSubViews[eventTypeName]);subView._eventTypeName=eventTypeName;this.tabView_.appendChild(subView);subView.selection=subSelection;}
-var tab;if(lastSelectedTabTagName)
-tab=this.tabView_.querySelector(lastSelectedTabTagName);if(!tab&&lastSelectedTabTypeName){var tab=tr.b.findFirstInArray(this.tabView_.children,function(tab){return tab._eventTypeName===lastSelectedTabTypeName;});}
-if(!tab)
-tab=this.tabView_.firstChild;this.tabView_.selectedTab=tab;this.onSelectedTabChange_();this.tabView_.addEventListener('selected-tab-change',this.onSelectedTabChange_);},createSubViewForSelection_:function(eventTypeName,subSelection,previousSubView){var eventTypeInfo=EventRegistry.getEventTypeInfoByTypeName(eventTypeName);var singleMode=subSelection.length==1;var tagName;if(subSelection.length===1)
-tagName=eventTypeInfo.metadata.singleViewElementName;else
-tagName=eventTypeInfo.metadata.multiViewElementName;if(!tr.ui.b.getPolymerElementNamed(tagName))
-throw new Error('Element not registered: '+tagName);var subView;if(previousSubView&&previousSubView.tagName===tagName.toUpperCase())
-subView=previousSubView;else
-subView=document.createElement(tagName);var camelLabel;if(subSelection.length===1)
-camelLabel=EventRegistry.getUserFriendlySingularName(eventTypeName);else
-camelLabel=EventRegistry.getUserFriendlyPluralName(eventTypeName);subView.tabLabel=camelLabel+' ('+subSelection.length+')';return subView;},onSelectedTabChange_:function(){var brushingStateController=this.brushingStateController_;if(this.tabView_.selectedTab){var selectedTab=this.tabView_.selectedTab;this.tallMode=selectedTab.requiresTallView;if(brushingStateController){var rlth=selectedTab.relatedEventsToHighlight;brushingStateController.changeAnalysisViewRelatedEvents(rlth);}}else{this.tallMode=false;if(brushingStateController)
-brushingStateController.changeAnalysisViewRelatedEvents(undefined);}}});})();'use strict';tr.exportTo('tr.ui.b',function(){var DragHandle=tr.ui.b.define('x-drag-handle');DragHandle.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.lastMousePos_=0;this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.addEventListener('mousedown',this.onMouseDown_);this.target_=undefined;this.horizontal=true;this.observer_=new WebKitMutationObserver(this.didTargetMutate_.bind(this));this.targetSizesByModeKey_={};},get modeKey_(){return this.target_.className==''?'.':this.target_.className;},get target(){return this.target_;},set target(target){this.observer_.disconnect();this.target_=target;if(!this.target_)
+indentSpan.textContent+=' ';row.appendChild(indentSpan);var labelSpan=document.createElement('span');labelSpan.textContent=label;row.appendChild(labelSpan);row.appendChild(dataElement);var suffixSpan=document.createElement('span');suffixSpan.textContent=suffix;row.appendChild(suffixSpan);row.dataElement=dataElement;this.$.content.appendChild(row);},appendSimpleText_:function(label,indent,text,suffix){var el=this.ownerDocument.createElement('span');el.textContent=text;this.appendElementWithLabel_(label,indent,el,suffix);return el;}});'use strict';Polymer('tr-ui-a-generic-object-view-with-label',{ready:function(){this.labelEl_=document.createElement('div');this.genericObjectView_=document.createElement('tr-ui-a-generic-object-view');this.shadowRoot.appendChild(this.labelEl_);this.shadowRoot.appendChild(this.genericObjectView_);},get label(){return this.labelEl_.textContent;},set label(label){this.labelEl_.textContent=label;},get object(){return this.genericObjectView_.object;},set object(object){this.genericObjectView_.object=object;}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ObjectSnapshotView=tr.ui.b.define('object-snapshot-view');ObjectSnapshotView.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.objectSnapshot_=undefined;},get requiresTallView(){return true;},set modelEvent(obj){this.objectSnapshot=obj;},get modelEvent(){return this.objectSnapshot;},get objectSnapshot(){return this.objectSnapshot_;},set objectSnapshot(i){this.objectSnapshot_=i;this.updateContents();},updateContents:function(){throw new Error('Not implemented');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectSnapshotView;options.defaultMetadata={showInstances:true,showInTrackView:true};tr.b.decorateExtensionRegistry(ObjectSnapshotView,options);return{ObjectSnapshotView:ObjectSnapshotView};});'use strict';Polymer('tr-ui-b-drag-handle',{__proto__:HTMLDivElement.prototype,created:function(){this.lastMousePos_=0;this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.addEventListener('mousedown',this.onMouseDown_);this.target_=undefined;this.horizontal=true;this.observer_=new WebKitMutationObserver(this.didTargetMutate_.bind(this));this.targetSizesByModeKey_={};},get modeKey_(){return this.target_.className==''?'.':this.target_.className;},get target(){return this.target_;},set target(target){this.observer_.disconnect();this.target_=target;if(!this.target_)
 return;this.observer_.observe(this.target_,{attributes:true,attributeFilter:['class']});},get horizontal(){return this.horizontal_;},set horizontal(h){this.horizontal_=h;if(this.horizontal_)
 this.className='horizontal-drag-handle';else
 this.className='vertical-drag-handle';},get vertical(){return!this.horizontal_;},set vertical(v){this.horizontal=!v;},forceMutationObserverFlush_:function(){var records=this.observer_.takeRecords();if(records.length)
@@ -5758,25 +5825,18 @@
 this.target_.style[this.targetStyleKey_]='';},get targetStyleKey_(){return this.horizontal_?'height':'width';},getTargetSize_:function(){var targetStyleKey=this.targetStyleKey_;if(!this.target_.style[targetStyleKey]){this.target_.style[targetStyleKey]=window.getComputedStyle(this.target_)[targetStyleKey];}
 var size=parseInt(this.target_.style[targetStyleKey]);this.targetSizesByModeKey_[this.modeKey_]=size;return size;},setTargetSize_:function(s){this.target_.style[this.targetStyleKey_]=s+'px';this.targetSizesByModeKey_[this.modeKey_]=s;},applyDelta_:function(delta){var curSize=this.getTargetSize_();var newSize;if(this.target_===this.nextElementSibling){newSize=curSize+delta;}else{newSize=curSize-delta;}
 this.setTargetSize_(newSize);},onMouseMove_:function(e){var curMousePos=this.horizontal_?e.clientY:e.clientX;var delta=this.lastMousePos_-curMousePos;this.applyDelta_(delta);this.lastMousePos_=curMousePos;e.preventDefault();return true;},onMouseDown_:function(e){if(!this.target_)
-return;this.forceMutationObserverFlush_();this.lastMousePos_=this.horizontal_?e.clientY:e.clientX;document.addEventListener('mousemove',this.onMouseMove_);document.addEventListener('mouseup',this.onMouseUp_);e.preventDefault();return true;},onMouseUp_:function(e){document.removeEventListener('mousemove',this.onMouseMove_);document.removeEventListener('mouseup',this.onMouseUp_);e.preventDefault();}};return{DragHandle:DragHandle};});'use strict';Polymer('tr-ui-b-dropdown',{ready:function(){this.$.outer.tabIndex=0;},get iconElement(){return this.$.icon;},onOuterKeyDown_:function(e){if(e.keyCode===' '.charCodeAt(0)){this.toggle_();e.preventDefault();e.stopPropagation();}},onOuterClick_:function(e){var or=this.$.outer.getBoundingClientRect();var inside=true;inside&=e.clientX>=or.left;inside&=e.clientX<or.right;inside&=e.clientY>=or.top;inside&=e.clientY<or.bottom;if(!inside)
-return;e.preventDefault();this.toggle_();},toggle_:function(){if(!this.isOpen)
-this.show();else
-this.close();},show:function(){if(this.isOpen)
-return;this.$.outer.classList.add('open');var ddr=this.$.outer.getBoundingClientRect();var rW=Math.max(ddr.width,150);this.$.dialog.style.minWidth=rW+'px';this.$.dialog.showModal();var ddw=this.$.outer.getBoundingClientRect().width;var w=this.$.dialog.getBoundingClientRect().width;this.$.dialog.style.top=ddr.bottom-1+'px';this.$.dialog.style.left=ddr.left+'px';},onDialogClick_:function(e){if(!this.isOpen)
-return;if(e.srcElement!==this.$.dialog)
-return;e.preventDefault();this.close();},onDialogCancel_:function(e){e.preventDefault();this.close();},close:function(){if(!this.isOpen)
-return;this.$.dialog.close();this.$.outer.classList.remove('open');this.$.outer.focus();},get isOpen(){return this.$.dialog.hasAttribute('open');}});'use strict';tr.exportTo('tr.ui.b',function(){var FaviconsByHue={blue:'data:image/vndmicrosofticon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjj8xAGArIgqOPzE8nUY3dqJJOJeiSTiXnUY3do4/MTxhKyIKjkAxAAAAAAAAAAAAAAAAAAAAAABQJBwAAAAAAZJBMzSoSzqlsU8+6bRQP/21UT//tVE//7RQP/2wTz3ppko6pY9AMjQAAAABTyMbAAAAAAB7e3sAAP//AKFSRE+wTz3dtVE//7VRP/+1UT//tVE//7VRP/+zUD7/sE89/7BOPf+qTDvdl0M0TwAAAABWJx4A+fn5ANjd3TnIiX7ftVA9/7VRP/+1UT//tVE//7VRP/+xTz3/rE08/6xMO/+sTDv/rE08/6dKOt+SQTM5q0w7ALO0tA3v8fGu05uR/7NMOf+0Tzz/tE88/7RPPv+uTT3/p0o7/6ZJOv+mSTr/pkk6/6ZJOv+mSjr/n0Y4rnIwKg3h4eFK9/j48N2zrP/FeGr/xnps/8Z6bP/AaUv/tlw1/7RbNf+1WzX/tFs1/7RbNf+0WzX/tFs1/7NbNPCqWy1K7e3tjPn5+f/49vX/9vLy//by8v/28vH/8bZv/+6RH//ukyP/7pMj/+6SI//ukiP/7pMj/+2SIv/qjyL/34kfjPHx8bL5+fn/+fn5//n5+f/5+fr/+fn5//W7cP/zlB3/85Yh//OWIf/zliH/85Yh//GVIf/rkR//6ZAf/+KLHrLz8/O2+fn5//n5+f/5+fn/+fn5//n5+f/1unD/85Qd//OWIf/zliH/85Yh//CUIP/mjh//44we/+OMHv/diR628vLymfn5+f/5+fn/+fn5//n5+f/5+fn/9bx0//OXI//zmCb/85gm/++VIv/hjB//3Yoe/92KHv/dih7/2IYdmfHx8Vz4+Pj3+fn5//n5+f/5+fn/+fn5//jo0//33bv/9929//bbtf/euDX/06oJ/9OrC//Tqwv/06oM98yfD1zr6+sY9/f3xvn5+f/5+fn/+fn5//n5+f/5+vv/+fv8//n7/f/3+PH/3Ms6/9O8AP/UvQD/1L0A/9K8AMbItAAY////APT09Fb4+Pjy+fn5//n5+f/5+fn/+fn5//n5+f/5+fr/9/bu/9zKOf/TuwD/1LwA/9S8APLQuABW3cQAAOzs7ADm5uYF9vb2ePn5+fT5+fn/+fn5//n5+f/5+fn/+fn6//f27v/cyTn/07sA/9S8APTRugB4w60ABcmyAAAAAAAA8PDwAOzs7Ab29vZd+Pj40vn5+fz5+fn/+fn5//n5+f/49/H/5Ndu/NjEIdLSugBdybIABsy1AAAAAAAAAAAAAAAAAADn5+cAqKioAPT09CH39/dy+Pj4tvj4+NX4+PjV+Pj4tvX063Lt6MMhOQAAAM+/RAAAAAAAAAAAAPAPAADAAwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCwUEDDgZExxWJx4tYiwiN2IsIjdWJx4tOBkTHAsFBAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAbDAkKZS0jMYs+MWydRjeipko6x6tMO9utTTzjrU0846tMO9umSjrHnUY3oos+MWxlLSMxGwwJCv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgZFAAPBwUHcjMoPJtFNpqsTTzhs1A+/LVRP/+2UT//tVE//7VRP/+1UT//tVE//7ZRP/+1UT//s1A+/KxNPOGbRTaacTInPA8HBQc4GRMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/yp4AUCQcGZVDNICtTjzktVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+0UT//s1A+/7JQPv+rTDvkkkEzgE8jGxn/xZoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA////AGswJSqiSTivs1A++7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tFA+/7FPPf+xTz3/sU89/7FPPf+vTj37nkc3r2guJCr///8AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAP/DogB/VEwsqE09v7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7NQPv+vTj3/r049/69OPf+vTj3/r049/69OPf+uTjz/oUg4v20xJiz/nnsAAgEBAAAAAAAAAAAAAAAAAAAAAAD19fUAkp2fHdK2sbW5W0r/tVA+/7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+yUD7/rU08/6xNPP+tTTz/rU08/61NPP+tTTz/rU08/61NPP+sTTz/nkY3tWAqIR2pSzsAAAAAAAAAAAAAAAAAeXl5ADY2Ngnd39+O6tbT/blbSv+1UD7/tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//slA+/6xNPP+rTDv/q0w7/6tMO/+rTDv/q0w7/6tMO/+rTDv/q0w7/6tMO/+qTDv9lkM0jiUQDQlSJR0AAAAAAAAAAAD///8AxMTES/X29u3s2NX/uVtK/7VQPv+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7FPPv+qTDv/qEs6/6hLOv+oSzr/qEs6/6hLOv+oSzr/qEs6/6hLOv+oSzr/qEs6/6lLOv+lSTnthDsuS/+TcgAAAAAAm5ubAHBwcA/o6Oix+vv8/+zY1P+5W0r/tVA+/7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+xTz3/qEs6/6ZKOv+mSjr/pko6/6ZKOv+mSjr/pko6/6ZKOv+mSjr/pko6/6ZKOv+mSjr/pko6/6ZKOv+bRTaxSiEaD2cuJAD///8AycnJRfX19fD6+/z/69fU/7hYR/+0Tjv/tE48/7ROPP+0Tjz/tE48/7ROPP+0Tz3/r04+/6VJOv+jSDn/o0g5/6NIOf+jSDn/o0g5/6NIOf+jSDn/o0g5/6NIOf+jSDr/o0g5/6NIOf+jSDn/o0g6/6BHOfCCOS9F0FxKAAAAAALk5OSN+fn5//n6+v/y5+X/05uS/9CTiP/QlIn/0JSJ/9CUif/QlIn/0JSK/8yGb//AaDb/vWc0/71nNf+9ZzT/vWc0/71nNP+9ZjT/vWY0/71mNP+9ZjT/vGY0/7xmNP+8ZjT/vGY0/7xmNP+8ZjT/u2U0/7FiLY0AAAACk5OTFu/v78X5+fn/+fn5//n5+f/5+vr/+fn5//n5+f/5+fn/+fn5//n5+f/5+/3/99iy//KWI//ylSH/8ZUh//GVIf/xlSH/8ZUh//GVIf/xlSH/8ZUh//GVIf/xlSH/8ZUh//GVIf/xlSH/8ZUh//CUIf/vkyD/5Y0fxY1XExbDw8Mz9PT05fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n7/f/32LL/85cj//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/wlCD/7pIg/+6SIP/pjx/lunIZM9XV1VD39/f0+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fv9//fYsv/zlyP/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/75Mg/+uRH//qkB//6pAf/+iPH/TIfBtQ3d3dYfj4+Pn5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+/3/99iy//OXI//zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh/+6TIP/ojx//548f/+ePH//njx//5o4f+c1/HGHh4eFl+Pj4+vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n7/f/32LL/85cj//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/tkiD/5Y0f/+SNH//ljR//5Y0f/+WNH//kjB/6zn8cZeDg4Fr4+Pj3+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fv9//fYsv/zlyP/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/65Eg/+KMHv/iix7/4ose/+KLHv/iix7/4ose/+CLHvfLfRta3NzcQvf39+/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+/3/99iy//OXI//zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh/+qRIP/gih7/34oe/9+KHv/fih7/34oe/9+KHv/fih7/3Yge78V6GkLS0tIj9fX12fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n7/f/32LH/85Yg//OVHv/zlR7/85Ue//OVHv/zlR7/85Ue//OVIf/pjyH/3ogf/92HH//dhx//3Ycf/92HH//dhx//3Ycf/92HH//ahh7ZunMZI56engjy8vKu+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fr7//jr2f/2ypL/9smP//bJkP/2yZD/9smQ//bJkP/2yZD/5rNI/9OeFP/SnhX/0p4V/9KeFf/SnhX/0Z0V/9GdFf/RnRX/0Z0V/8yWFq6KVBcI////AO3t7Wr5+fn++fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn6//n6/P/5+vz/+fr8//n6/P/5+vz/+fr8//n6/P/h013/0rsA/9O8AP/TvAD/07wA/9O8AP/TvAD/07wA/9O8AP/SvAD+yLMAav/mAADr6+sA4eHhJPb29tv5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/+LSW//TuwD/1LwA/9S8AP/UvAD/1LwA/9S8AP/UvAD/1LwA/9K6ANu/qgAkyLEAALu7uwAAAAAA8vLygfn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/4tJb/9O7AP/UvAD/1LwA/9S8AP/UvAD/1LwA/9S8AP/UvAD/zrYAgQAAAACfjQAAAAAAAOzs7ADk5OQe9vb2zPn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/i0lv/07sA/9S8AP/UvAD/1LwA/9S8AP/UvAD/1LwA/9K6AMzCrAAeybIAAAAAAAAAAAAAsLCwAP///wDv7+9O+Pj47Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/+LSW//TuwD/1LwA/9S8AP/UvAD/1LwA/9S8AP/TuwDsy7QATu7UAACXhQAAAAAAAAAAAAAAAAAA1tbWALS0tAPy8vJv+Pj49Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/4tJb/9O7AP/UvAD/1LwA/9S8AP/UvAD/07wA9M63AG6ZiQADtqIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4uLiANfX1wbz8/Nz+Pj48Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/i0lv/07sA/9S8AP/UvAD/1LwA/9O8APDPuABzuKMABsGrAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+PjANjY2ATy8vJZ+Pj42vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/+HSW//TugD/1LsA/9S8AP/TuwDazrcAWbejAATBqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NTUAB8fHwDw8PAr9vb2nPj4+O35+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/7uas/+bZdv/j1mvt2cYznMu0ACsUFAAAtaEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOvr6wDj4+MG8vLyOvb29pD4+PjS+fn58vn5+f35+fn/+fn5//n5+f/5+fn/+fn5/fn5+fL4+frS9/j8kPT1/Trs8v8G8PP/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADh4eEA1tbWAu/v7xv09PRJ9vb2dvb29pf39/eo9/f3qPb29pf29vZ29PT0Se/v7xvW1tYC4eHhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/gB///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABwAAAA8AAAAPgAAAH4AAAB/AAAA/4AAAf/gAAf/8AAP//wAP/',green:'data:image/vndmicrosofticon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbWJLAEpCMwptYks8eWxTdn1wVpd9cFaXeWxTdm1iSzxKQzMKbWJLAAAAAAAAAAAAAAAAAAAAAAA+OCsAAAAAAXBlTTSBdFmliHpe6Yp8X/2LfWD/i31g/4p8X/2HeV3pf3NYpW5jTDQAAAABPTcqAAAAAAB7e3sAlv//AIB1Xk+HeV3di31g/4t9YP+LfWD/i31g/4t9YP+Je1//h3pd/4d5Xf+DdVrddGhQTwAAAABDPC4A+fn5ANrb3DmupZPfinxf/4t9YP+LfWD/i31g/4t9YP+Iel7/hHdb/4R2W/+Edlv/hHdb/4BzWN9wZU05g3ZaALS0tA3w8PGuu7Sj/4h5W/+Je17/iXte/4t8X/+HeFz/gnNY/4FyWP+Bclj/gXJY/4FyWP+Bclj/fG1Url9NPA3h4eFK9/j48MvFuf+kmoP/ppuF/6abhf+JkHL/c4Rj/3OEY/9zhGP/coNj/3KDY/9yg2P/coNj/3CDYvBgf19K7e3tjPn5+f/39vb/9fTz//X08//09PP/itKw/0m+h/9Mv4n/TL+J/0y/if9Mv4n/TL+J/0y+iP9Lu4b/RrJ/jPHx8bL5+fn/+fn5//n5+f/5+fn/+fn5/4rXtP9Hwon/SsOL/0rDi/9Kw4v/SsOL/0nCiv9HvYb/RruF/0S1gbLz8/O2+fn5//n5+f/5+fn/+fn5//n5+f+K17P/R8KJ/0rDi/9Kw4v/SsOL/0nBif9GuYT/RbaC/0W2gv9Dsn+28vLymfn5+f/5+fn/+fn5//n5+f/5+fn/jdi1/0vDjP9OxI7/TsSO/0rAiv9FtoP/RLKA/0SygP9EsoD/Qq59mfHx8Vz4+Pj3+fn5//n5+f/5+fn/+fn5/9rw5v/H6tn/yOra/8Lp2f9e1b7/O8yz/z3MtP89zLT/Pcuy9zzApVzr6+sY9/f3xvn5+f/5+fn/+fn5//n5+f/7+vr//Pr7//z6+//z+fn/ZuPY/zbczv853c7/Od3O/zjbzcY10sYY////APT09Fb4+Pjy+fn5//n5+f/5+fn/+fn5//n5+f/6+fn/8Pj3/2Xj1/823Mz/OdzN/znczfI42MlWO+XWAOzs7ADm5uYF9vb2ePn5+fT5+fn/+fn5//n5+f/5+fn/+vn5//D49/9j4tf/NdvM/znczfQ42ct4Ncu9BTbRwgAAAAAA8PDwAOzs7Ab29vZd+Pj40vn5+fz5+fn/+fn5//n5+f/z+Pj/jung/FLf0tI42ctdNdHCBjfUxgAAAAAAAAAAAAAAAADn5+cAqKioAPT09CH39/dy+Pj4tvj4+NX4+PjV+Pj4tu329XLO7+whAFQmAGrUygAAAAAAAAAAAPAPAADAAwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCQgGDCsmHRxCOy4tS0M0N0tDNDdCOy4tKyYdHAkIBgwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAVEg4KTUU1MWtgSmx5bVOigHNYx4N2W9uFd1zjhXdc44N2W9uAc1jHeW1TomtgSmxNRjUxFRMOCv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsnHgALCggHWE88PHdrUpqEd1vhiXxf/It9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/iXxf/IR3W+F3a1KaV048PAsKCAcrJx4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///AAPjcqGXJnT4CFeFzki31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+KfWD/iXxf/4l7Xv+DdlrkcGVNgDw2Khn//+sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AFJKOSp9cFavinxf+4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/inxf/4h6Xv+Iel3/iHpd/4h6Xv+GeV37eW1Ur1BINyr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAP//3gBsZ1osgnVbv4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4l8X/+HeV3/hnlc/4Z5XP+GeVz/hnlc/4Z5XP+GeFz/fG9Vv1RLOiz/9LoAAgIBAAAAAAAAAAAAAAAAAAAAAAD19fUAl5ibHcbCurWShGn/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+Je1//hXhc/4R3W/+Fd1v/hXdb/4V3W/+Fd1v/hXdb/4V3W/+Ed1v/eW1TtUlCMh2CdVkAAAAAAAAAAAAAAAAAeXl5ADY2Ngne3t+O4t/Z/ZKFaf+LfV//i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/iXte/4R3W/+Ddlr/g3Za/4N2Wv+Ddlr/g3Za/4N2Wv+Ddlr/g3Za/4N2Wv+CdVr9c2dPjhwZEwk/OSsAAAAAAAAAAAD///8AxMTES/X19u3k4dv/koRp/4t9X/+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4h6Xv+CdVr/gXRZ/4F0Wf+BdFn/gXRZ/4F0Wf+BdFn/gXRZ/4F0Wf+BdFn/gXRZ/4F0Wf9+clftZVtGS/3jrgAAAAAAm5ubAHBwcA/o6Oix+/v7/+Pg2/+ShGn/i31f/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+Iel7/gXRZ/4BzWP+Ac1j/gHNY/4BzWP+Ac1j/gHNY/4BzWP+Ac1j/gHNY/4BzWP+Ac1j/gHNY/4BzWP93a1KxOTMnD1BHNwD///8AycnJRfX19fD7+/v/4+Da/5CCZ/+Jel3/iXtd/4l7Xf+Je13/iXtd/4l7Xf+Ke17/iHhd/4BxV/9/cFb/f3BW/39wVv9/cFb/f3BW/39wVv9/cFb/f3BW/39wVv9/cFb/f3BW/39wVv9/cFb/f3BW/31uVPBnWURFo45tAAAAAALk5OSN+fn5//r6+v/t7Oj/vLSk/7aunP+3rp3/t66d/7eunf+3rp3/uK+e/6Gmjv9vkG3/bI5r/2yOa/9sjmv/bI5r/2yOa/9sjmv/bI5r/2yOa/9sjmr/bI1q/2yNav9sjWr/bI1q/2uNav9rjWr/a41q/16GZI0AAAACk5OTFu/v78X5+fn/+fn5//n5+f/5+fr/+fn5//n5+f/5+fn/+fn5//n5+f/8+vv/wOfV/0vCi/9Kwor/SsKK/0rCiv9Kwor/SsKK/0rCiv9Kwor/SsKK/0rCiv9Kwor/SsKK/0rCiv9Kwor/SsKK/0nAif9Jv4j/RreCxStxUBbDw8Mz9PT05fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z6+/+/59X/TMSM/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9JwYn/SL6I/0i+iP9GuoXlOJVqM9XV1VD39/f0+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//Pr7/7/n1f9Mw4z/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/ScCJ/0e8hv9HvIb/R7yG/0a6hfQ9oXJQ3d3dYfj4+Pn5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/8+vv/v+fV/0zDjP9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0i/iP9GuoX/RrqE/0a6hP9GuoT/RrmD+T6ldWHh4eFl+Pj4+vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z6+/+/59X/TMOM/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Ivof/RbiD/0W3gv9FuIP/RbiD/0W4g/9Ft4L6PqZ2ZeDg4Fr4+Pj3+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//Pr7/7/n1f9Mw4z/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SL2H/0W2gv9FtYH/RbWB/0W1gf9FtYH/RbWB/0S0gPc+o3Ra3NzcQvf39+/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/8+vv/v+fV/0zDjP9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0e8hv9EtID/RLOA/0SzgP9Es4D/RLOA/0SzgP9Es4D/Q7F/7zyecULS0tIj9fX12fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z6+/+/59X/SsOL/0jCiv9Iwor/SMKK/0jCiv9Iwor/SMKK/0rCiv9HuoT/RLF+/0Owff9EsH3/RLB9/0Swff9EsH3/RLB9/0Swff9CrnzZOJZrI56engjy8vKu+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+vn6/9/x6f+l38X/o9/D/6Tfw/+k38P/pN/D/6Tfw/+k38T/a9Kz/0DBof9BwKH/QcCh/0HAof9BwKD/QcCg/0G/oP9Bv6D/Qb+g/0C4mK4tbU4I////AO3t7Wr5+fn++fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+vn6//v6+//7+vv/+/r7//v6+//7+vv//Pr7//v6+/+B597/NdvN/znczf853M3/OdzN/znczf853M3/OdzN/znczf85283+NtHDakb/+gDr6+sA4eHhJPb29tv5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/3/n3f823Mz/OdzN/znczf853M3/OdzN/znczf853M3/OdzN/zjay9s0x7kkNs/BALu7uwAAAAAA8vLygfn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/f+fd/zbbzP853M3/OdzN/znczf853M3/OdzN/znczf853M3/N9XHgQAAAAAspZoAAAAAAOzs7ADk5OQe9vb2zPn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f9/593/NtvM/znczf853M3/OdzN/znczf853M3/OdzN/zjay8w0yrweNtDCAAAAAAAAAAAAsLCwAP///wDv7+9O+Pj47Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/3/n3f8228z/OdzN/znczf853M3/OdzN/znczf8528zsN9PETkD45gAonJEAAAAAAAAAAAAAAAAA1tbWALS0tAPy8vJv+Pj49Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/f+fd/zbbzP853M3/OdzN/znczf853M3/OdvM9DjWx24qoJUDMb2wAAAAAAAAAAAAAAAAAAAAAAAAAAAA4uLiANfX1wbz8/Nz+Pj48Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f9/593/NtvM/znczf853M3/OdzN/znbzPA418hzMr6xBjTIugAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+PjANjY2ATy8vJZ+Pj42vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/37m3f8z28z/N9zN/znczf8528zaONbIWTK/sgQ0yLsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NTUAB8fHwDw8PAr9vb2nPj4+O35+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/vfDr/5Tq4v+L6ODtYODUnDTTxSsAGBsAMrywAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOvr6wDj4+MG8vLyOvb29pD4+PjS+fn58vn5+f35+fn/+fn5//n5+f/5+fn/+fn5/fn5+fL6+PjS+vf3kPv09Tr/6u4G/+/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADh4eEA1tbWAu/v7xv09PRJ9vb2dvb29pf39/eo9/f3qPb29pf29vZ29PT0Se/v7xvW1tYC4eHhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/gB///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABwAAAA8AAAAPgAAAH4AAAB/AAAA/4AAAf/gAAf/8AAP//wAP/',red:'data:image/vndmicrosofticon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQxmbAC0RagpDGZs8ShysdkwdspdMHbKXShysdkMZmzwuEWoKQxmcAAAAAAAAAAAAAAAAAAAAAAAmDlgAAAAAAUQanzRPHrilUx/B6VQgxf1VIMb/VSDG/1Qgxf1TH8DpTh22pUMZnDQAAAABJQ5XAAAAAAB7ensA//8AAFUrr09SH8DdVSDG/1Ugxv9VIMb/VSDG/1Ugxv9UH8P/Ux/B/1IfwP9QHrrdRxqlTwAAAAAoD14A+fn5ANzf1zmMatPfVB7G/1Ugxv9VIMb/VSDG/1Ugxv9TH8L/UR68/1AevP9QHrz/UR68/04dt99EGaA5UB67ALS0sw3x8u+unYDd/1AZxP9THcX/Ux3F/1Qexf9THr//Tx23/08ctv9PHbb/Tx22/08dtv9PHbb/SxuurjkSfg3h4eFK+Pj38LWf5P97UtL/fVXS/31V0/9fOcz/SSfC/0knwP9JJ8D/SSfA/0knwP9JJ8D/SSfA/0gnv/A/KLNK7e3tjPn5+f/29fj/8vD3//Px9//y8Pf/fILz/zQ/8P83QvD/N0Lw/zdC8P83QvD/N0Lw/zdB7/82QOz/Mz3gjPHx8bL5+fn/+fn5//n6+f/5+vn/+fn5/36G9v8yQPT/NkP0/zZD9P82Q/T/NkP0/zVC8v80QOz/M0Dq/zI+47Lz8/O2+fn5//n5+f/5+fn/+fn5//n5+f99hvb/MkD0/zZD9P82Q/T/NkP0/zVC8f8zP+f/Mj7k/zI+5P8xPd628vLymfn5+f/5+fn/+fn5//n5+f/5+fn/gYn2/zdE9P87R/T/O0f0/zZF8P8yQOP/MT/e/zE/3v8xP97/Lz3ZmfHx8Vz4+Pj3+fn5//n5+f/5+fn/+fn5/9fZ+P/Bxfj/wsb4/7vD+P87j/X/Dnzx/xF98f8RffH/EXzw9xZv5Vzr6+sY9/f3xvn5+f/5+fn/+fn5//n5+f/7+/n//Pz5//38+f/x+Pn/OrD+/wCY//8Amf//AJn//wCZ/cYAlPMY////APT09Fb4+Pjy+fn5//n5+f/5+fn/+fn5//n5+f/6+fn/7vX5/zmu/v8Al///AJj//wCY/vIAlfpWAJ//AOzs7ADm5uYF9vb2ePn5+fT5+fn/+fn5//n5+f/5+fn/+vn5/+71+f85rf7/AJb//wCY//QAlvx4AIzrBQCQ8gAAAAAA8PDwAOzs7Ab29vZd+Pj40vn5+fz5+fn/+fn5//n5+f/x9vn/bsP8/CGk/tIAlvxdAJDyBgCT9QAAAAAAAAAAAAAAAADn5+cAqKioAPT09CH39/dy+Pj4tvj4+NX4+PjV+Pj4tuvy93LD4fUhAAC7AESo6wAAAAAAAAAAAPAPAADAAwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBgIMDBoKPRwoD14tLhFrNy4RazcoD14tGgo9HAYCDAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+3/wANBR0KLxJuMUEYmGxKHKyiTh22x1Aeu9tRHr3jUR6941Aeu9tOHbbHShysokEYmGwvEm4xDQUeCv+6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoKPgAHAxAHNhR9PEkbqppRHr3hVCDE/FUgxv9VIMf/VSDH/1Ugxv9VIMb/VSDH/1Ugx/9VIMb/VCDE/FEevOFIG6maNRR8PAcDEAcaCj0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADVUP8AJg5YGUYao4BRH77kVSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMX/VB/E/1Qfw/9QHrvkRRmggCUOVhnQTv8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA////ADITdSpMHbKvVCDE+1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VCDE/1Mfwv9TH8H/Ux/B/1Mfwv9SH7/7ShytrzEScSr///8AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAMto/wBVPoYsUSC3v1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1QfxP9SHsD/Uh6//1Iev/9SHr//Uh6//1Iev/9SHr//SxywvzMTdyymPf8AAQACAAAAAAAAAAAAAAAAAAAAAAD19fUAnaKQHbep1rVfLcn/VB/G/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9UH8P/UR6+/1Eevf9RHr3/UR69/1Eevf9RHr3/UR69/1Eevf9RHr3/ShuttS0RaB1PHrkAAAAAAAAAAAAAAAAAeXl5ADY2Ngnf4NyO18zu/V8tyf9UH8b/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VB/D/1EevP9QHrr/UB67/1Aeu/9QHrv/UB67/1Aeu/9QHrv/UB67/1Aeu/9QHrr9RhqkjhEGKAknDloAAAAAAAAAAAD///8AxMTES/b39O3Zzu//Xy3J/1Qfxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Mfwv9QHbr/Tx24/08duP9PHbj/Tx24/08duP9PHbj/Tx24/08duP9PHbj/Tx24/08duf9NHLTtPheRS5s5/wAAAAAAm5ubAHBwcA/o6Oix+/z6/9jO7/9fLcn/VB/G/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9TH8H/Tx24/04dtv9OHbb/Th22/04dtv9OHbb/Th22/04dtv9OHbb/Th22/04dtv9OHbb/Th22/04dtv9JG6mxIw1RDzAScQD///8AycnJRfX19fD7/Pr/2M3v/1wqyP9SHMX/UhzF/1Icxf9SHMX/UhzF/1Icxf9THcX/Ux7A/04ctf9NHLL/Thyz/04cs/9NHLP/TRyz/00cs/9OHLP/Thyz/04cs/9OHLP/Thyz/04cs/9NHLP/Thyz/0wcsPA/Fo9FYyTkAAAAAALk5OSN+fn5//r6+f/n4vT/noDd/5Z22v+Wdtr/lnba/5Z22v+Wdtr/mHfb/35g1/9KMMr/SC/H/0gvx/9IL8f/SC/H/0gvx/9IL8b/SC/G/0gvxv9HL8b/Ry/G/0cvxv9HL8b/Ry/G/0cvxv9HL8X/Ry7F/z8tuI0AAAACk5OTFu/v78X5+fn/+fn5//n5+f/6+vn/+fr5//n6+f/5+vn/+fr5//n6+f/9/fn/ub73/zhF8v82Q/L/NkPy/zZD8v82Q/L/NkPy/zZD8v82Q/L/NkPy/zZD8v82Q/L/NkPy/zZD8v82Q/L/NkPy/zVC8f81QvD/Mz/mxR8njhbDw8Mz9PT05fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z8+f+5vff/OEX0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P81QvH/NEHv/zRB7/8zQOrlKTO6M9XV1VD39/f0+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//Pz5/7m99/84RfT/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NULw/zRA7P80QOv/NEDr/zNA6fQsN8lQ3d3dYfj4+Pn5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/8/Pn/ub33/zhF9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zVB7/8zQOn/Mz/o/zM/6P8zQOj/Mz/n+S04zmHh4eFl+Pj4+vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z8+f+5vff/OEX0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P80Qe7/Mz/m/zM/5f8zP+b/Mz/m/zM/5v8yP+X6LjnPZeDg4Fr4+Pj3+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//Pz5/7m99/84RfT/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NEHs/zI+4/8yPuP/Mj7j/zI+4/8yPuP/Mj7j/zI+4fctOMxa3NzcQvf39+/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/8/Pn/ub33/zhF9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zRA6/8xPeH/MT3g/zE94P8xPeD/MT3g/zE94P8xPeD/MT3e7ys2xkLS0tIj9fX12fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z8+f+4vff/NkP0/zNB9P80QfT/NEH0/zRB9P80QfT/NEH0/zZC8/81P+n/Mjze/zI73f8yO93/Mjvd/zI73f8yO93/Mjvd/zI73f8xO9rZKTO7I56engjy8vKu+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+/r5/9ze+P+covf/mqD3/5qg9/+aoPf/mqD3/5qg9/+aoPf/UoLz/x1p5/8eaeb/Hmnm/x5p5v8eaeX/Hmnl/x5p5f8eaOX/Hmjl/yBh3a4jJokI////AO3t7Wr5+fn++fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+vr5//z8+f/8/Pn//Pz5//z8+f/8/Pn//Pz5//z8+f9dvfz/AJf+/wCZ/v8Amf7/AJn+/wCZ/v8Amf7/AJn+/wCZ/v8AmP7+AJLxagC4/wDr6+sA4eHhJPb29tv5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/1u8/f8Alv//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCW/NsAieckAI/xALu7uwAAAAAA8vLygfn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/W7z9/wCW//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJP3gQAAAAAAcr8AAAAAAOzs7ADk5OQe9vb2zPn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f9bvP3/AJb//wCY//8AmP//AJj//wCY//8AmP//AJj//wCW/MwAi+oeAJDxAAAAAAAAAAAAsLCwAP///wDv7+9O+Pj47Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/1u8/f8Alv//AJj//wCY//8AmP//AJj//wCY//8Al/7sAJL0TgCr/wAAa7QAAAAAAAAAAAAAAAAA1tbWALS0tAPy8vJv+Pj49Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/W7z9/wCW//8AmP//AJj//wCY//8AmP//AJj+9ACU+G4AbrgDAIPaAAAAAAAAAAAAAAAAAAAAAAAAAAAA4uLiANfX1wbz8/Nz+Pj48Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f9bvP3/AJb//wCY//8AmP//AJj//wCY/vAAlflzAITcBgCK5wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+PjANjY2ATy8vJZ+Pj42vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/1u7/f8Alf//AJf//wCY//8Al/7aAJT4WQCE3AQAiucAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NTUAB8fHwDw8PAr9vb2nPj4+O35+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/rNv7/3bG/P9rwfztM6r7nACR9SsAER0AAIPZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOvr6wDj4+MG8vLyOvb29pD4+PjS+fn58vn5+f35+fn/+fn5//n5+f/5+fn/+fn5/fn5+fL6+fjS/Pj2kP338jr/+eIG//fqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADh4eEA1tbWAu/v7xv09PRJ9vb2dvb29pf39/eo9/f3qPb29pf29vZ29PT0Se/v7xvW1tYC4eHhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/gB///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABwAAAA8AAAAPgAAAH4AAAB/AAAA/4AAAf/gAAf/8AAP//wAP/',yellow:'data:image/vndmicrosofticon;base64,AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAZKhQAOWAiAEV0KgBFdCoAOWAiABkqFAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8ZAAAChAHAEp8JwBvu10AgNeSAInluACN7c4Aj/DXAI/w1wCN7c4AieW4AIDXkgBvu10ASnwnAAoQBwA8ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbLgAAAAAFAFmWMwB/1YwAj/DXAJX7+QCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJX7+QCP79cAftWMAFmVMwAAAAUAGy4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7v8AAD1mFQB6zXYAkPLdAJf+/gCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP7/AJf+/wCV/P4AjvDdAHjKdgA8ZBUA6f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AABWkCYAh+KoAJb8+QCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJf+/wCV+v8AlPr/AJT6/wCV+v8Akvf5AIPdqABTjCYA//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICABb//wAka5wqAozquwCY/v8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCX/f8Ak/j/AJP3/wCT9/8Ak/f/AJP3/wCT9/8Akvb/AIbiuwBZlyoA//8AAAECAAAAAAAAAAAAAAAAAAAAAADz8/MAqJaJHZDD5rQLnP7/AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8Alvz/AJL2/wCR9P8AkfT/AJH0/wCR9P8AkfT/AJH0/wCR9P8AkfT/AITftABQhh0AjO0AAAAAAAAAAAAAAAAAfX19ADw8PAni3tuPuuD5/Quc//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJb8/wCQ8/8Aj/H/AI/x/wCP8f8Aj/H/AI/x/wCP8f8Aj/H/AI/x/wCP8f8AjvD9AH7UjwAiOQkASHkAAAAAAAgICAD///8AxcXFT/j19O+94vv/Cpz//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCV+/8Aj/H/AI3u/wCN7v8Aje7/AI3u/wCN7v8Aje7/AI3u/wCN7v8Aje7/AI3u/wCO7v8AiunvAHC8TwD//wAABQgAqKioAHp6ehHp6em3/fv5/7zh+v8KnP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8Alfr/AI7u/wCM6/8AjOv/AIzr/wCM6/8AjOv/AIzr/wCM6/8AjOv/AIzr/wCM6/8AjOv/AIzr/wCM6/8Ag9y3AERyEQBenQD///8AzMzMTfb29vP9+/n/vOH6/wqb//8Alv//AJb//wCW//8Alv//AJb//wCW//8Al///AJT5/wCL6/8Aiej/AIno/wCJ6P8Aiej/AIno/wCJ6P8Aiej/AIno/wCJ6P8Aiej/AIno/wCJ6P8Aiej/AIno/wCH5fMAb75NAMP/AAAAAAXl5eWX+fn5//v6+f/T6vr/Wbv9/0+3/f9Qt/3/ULf9/1C3/f9Qt/3/Ubj9/zew+/8InO//B5nr/weZ6/8Hmev/B5nq/weZ6v8Hmer/B5nq/weZ6v8Hmer/B5jq/weY6v8HmOn/B5jp/weY6f8HmOn/Bpjp/weP15cBAAAFpKSkHfDw8M/5+fn/+fn5//n5+f/1+Pn/9Pf5//T3+f/09/n/9Pf5//T3+f/4+Pn/o+T6/wq//f8Hv/3/CL/9/wi//f8Iv/3/CL/9/wi//f8Iv/3/CL/8/wi+/P8Ivvz/CL78/wi+/P8Ivvz/CL78/we9+/8HvPr/BrbxzwR9pR3Ly8tA9fX17Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//36+f+l5vv/CcL//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hv/3/Br36/wa9+v8GuvbsBZnLQNra2mD39/f4+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//fr5/6Xm+/8Jwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B778/wa79/8Guvf/Brr3/wa59fgFo9hg4uLidPj4+P35+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/9+vn/peb7/wnB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//we++/8GufX/Brj0/wa49P8GuPT/Brfz/QWm3XTk5OR6+Pj4/fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//36+f+l5vv/CcH//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hvfr/Brfy/wa28f8GtvH/Brbx/wa28f8GtfD9BafdeuXl5W/4+Pj8+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//fr5/6Xm+/8Jwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B7z5/wa17/8GtO7/BrTu/wa07v8GtO7/BrTu/waz7fwFpdtv4eHhVvj4+Pb5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/9+vn/peb7/wnB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//we7+P8Gsu3/BrHr/wax6/8Gsev/BrHr/wax6/8Gsev/BrDq9gWh1Vba2toz9vb25vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//36+f+k5fv/BsH//wPA//8DwP//A8D//wPA//8DwP//A8D//wXA//8Guvb/BrDq/wau6P8Gruj/Bq7o/wau6P8Gruj/Bq7o/wau6P8GreXmBZnLM7+/vxH09PTC+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+/r5/83v+v9x2vz/btn9/2/Z/f9v2f3/b9n9/2/Z/f9v2f3/RdL5/yXG7v8mxOz/JsTs/ybE6/8mxOv/JsTr/yXE6/8lw+v/JcPr/yK95cIQirAR////APDw8IH5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+vn5//r5+f/6+fn/+vn5//r5+f/6+fn/+vn5//r5+f+H8Pz/Oer+/zzq/v886v7/POr+/zzq/v886v7/POr+/zzq/v886v3/OuDzgWz//wD09PQA5+fnNPf39+n5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/4Xw/f846///O+v//zvr//876///O+v//zvr//876///O+v//zvp/ek32+00Ouf6AMrKygCzs7MF8/Pzmvn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/hfD9/zjr//876///O+v//zvr//876///O+v//zvr//876///OuX5miqptwUwv88AAAAAAPPz8wDp6eku9/f33fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f+F8P3/OOv//zvr//876///O+v//zvr//876///O+v//zvp/d033O8uOuX5AAAAAAAAAAAAvr6+AP///wDx8fFl+Pj49fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/4Xw/f846///O+v//zvr//876///O+v//zvr//876v71OeP2ZY7//wAus8IAAAAAAAAAAAAAAAAA4ODgANPT0wj09PSI+fn5+vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/hfD9/zjr//876///O+v//zvr//876///O+v/+jrm+Ygyx9gINdPlAAAAAAAAAAAAAAAAAAAAAAAAAAAA6enpAOHh4Q309PSM+fn5+Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f+F8P3/OOv//zvr//876///O+v//zvr//g65/qMNtXnDTjd7wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6enpAOLi4gr09PRw+Pj45/n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/4Pw/f816///Oev//zvr//876v7nOub5cDbW5wo33O4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ODgANHR0QLx8fE89/f3sfn5+fX5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/t/T7/4Xx/f+A8P31Xez8sTnk9zwuxdUCNtTkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAREREAP///wDo6OgM9PT0Tff396T4+Pjf+fn5+Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+fj5+Pjf9vf3pPL09E3m6OgM7/3/APtbOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMjIwD19fUA4uLiBvHx8Sn19fVd9vb2jff396739/e99/f3vff396729vaN9fX1XfHx8Snl4uIG9PX1AFEnIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/wD///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABgAAAAcAAAAPgAAAH4AAAB/AAAA/4AAAf/AAAP/8AAP//wAP/KAAAABAAAAAgAAAAAQAgAAAAAAAABAAAEgsAABILAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABorgAAS34IAHTDNQCC22wAh+OMAIfjjACC22wAdMQ1AEx/CABorwAAAAAAAAAAAAAAAAAAAAAAAEBrAAAAAAAAecswAIzsngCU+OUAl/37AJj+/wCY/v8Al/37AJP35QCL6Z4Ad8gwAAAAAAA+aQAAAAAAcXd6AP8AAAAOiNtNAJP32gCY//8AmP//AJj//wCY//8AmP//AJb8/wCU+f8Ak/j/AI7w2gB+1E0AAAAAAEd4APn7/ADc2NU5T7P33gCX//8AmP//AJj//wCY//8AmP//AJX6/wCR8/8AkPL/AJDz/wCQ8/8AjOzeAHrOOQCR9AC3t7cO8e/vsGnA/f8Alf//AJf//wCX//8Al///AJP4/wCN7v8AjOz/AIzs/wCM7P8AjOz/AIzt/wCG4rAAY6oO4uLiT/j39/GIzfz/Mav+/zSs/v80rP7/FaH5/wOV7f8DlOv/A5Tr/wOU6/8DlOv/A5Tr/wOU6/8Dk+jxBIvVT+3t7ZT5+fn/8fb5/+vz+f/r9Pn/6vP5/1nR+/8EvPz/B738/we9/P8Hvfz/B738/we9/P8HvPv/B7r4/wax7ZTy8vK7+fn5//n5+f/6+fn/+vn5//n5+f9e1f3/A8D//wfB//8Hwf//B8H//wfB//8HwP3/Brv3/wa59f8GtO678/Pzwfn5+f/5+fn/+fn5//n5+f/4+fn/XtX9/wPA//8Hwf//B8H//wfB//8Hv/z/Brfz/wa17/8Gte//BrHqwfPz86X5+fn/+fn5//n5+f/5+fn/+Pn5/2DW/f8Gwf//CsL//wrC//8Jv/v/CLXu/wix6f8Isen/CLHp/wet5KXy8vJo+fn5+vn5+f/5+fn/+fn5//n5+f/I7vr/quf7/6zn+/+m5/v/Tdz5/yzV9P8u1fT/LtX0/y7U8/ooyOpo7OzsH/f399D5+fn/+fn5//n5+f/5+fn//Pr5//36+f/++vn/9fn5/2rv/v857P//POz//zzs//886/3QOuLzH////wD09PRh+fn59vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//H4+f9o7v7/OOv//zvr//876//2Ouf6YUH//wDu7u4A6enpB/b29oT5+fn3+fn5//n5+f/5+fn/+fn5//n5+f/x+Pn/Zu7+/zfr//876//3Ouj8hDfc7wc44PMAAAAAAPHx8QDu7u4I9vb2aPj4+Nn5+fn9+fn5//n5+f/5+fn/8/n5/4zx/P1S7P7ZO+n8aDfh9Ag55PcAAAAAAAAAAAAAAAAA6+vrAN/f3wH19fUo9/f3fvj4+MH4+Pje+Pj43vj4+MHq9vh+w/H2KADM5wFk4e8AAAAAAAAAAADwDwAA4AcAAMADAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAAgAEAAMADAADgBwAA'};return{FaviconsByHue:FaviconsByHue};});'use strict';tr.exportTo('tr.ui.b',function(){function HotKey(dict){if(dict.eventType===undefined)
+return;this.forceMutationObserverFlush_();this.lastMousePos_=this.horizontal_?e.clientY:e.clientX;document.addEventListener('mousemove',this.onMouseMove_);document.addEventListener('mouseup',this.onMouseUp_);e.preventDefault();return true;},onMouseUp_:function(e){document.removeEventListener('mousemove',this.onMouseMove_);document.removeEventListener('mouseup',this.onMouseUp_);e.preventDefault();}});'use strict';tr.exportTo('tr.ui.b',function(){function HotKey(dict){if(dict.eventType===undefined)
 throw new Error('eventType must be given');if(dict.keyCode===undefined&&dict.keyCodes===undefined)
 throw new Error('keyCode or keyCodes must be given');if(dict.keyCode!==undefined&&dict.keyCodes!==undefined)
 throw new Error('Only keyCode or keyCodes can be given');if(dict.callback===undefined)
 throw new Error('callback must be given');this.eventType_=dict.eventType;this.keyCodes_=[];if(dict.keyCode)
 this.pushKeyCode_(dict.keyCode);else if(dict.keyCodes){dict.keyCodes.forEach(this.pushKeyCode_,this);}
 this.useCapture_=!!dict.useCapture;this.callback_=dict.callback;this.thisArg_=dict.thisArg!==undefined?dict.thisArg:undefined;this.helpText_=dict.helpText!==undefined?dict.helpText:undefined;}
-HotKey.prototype={get eventType(){return this.eventType_;},get keyCodes(){return this.keyCodes_;},get helpText(){return this.helpText_;},call:function(e){this.callback_.call(this.thisArg_,e);},pushKeyCode_:function(keyCode){this.keyCodes_.push(keyCode);}};return{HotKey:HotKey};});'use strict';Polymer('tv-ui-b-hotkey-controller',{created:function(){this.globalMode_=false;this.slavedToParentController_=undefined;this.curHost_=undefined;this.childControllers_=[];this.bubblingKeyDownHotKeys_={};this.capturingKeyDownHotKeys_={};this.bubblingKeyPressHotKeys_={};this.capturingKeyPressHotKeys_={};this.onBubblingKeyDown_=this.onKey_.bind(this,false);this.onCapturingKeyDown_=this.onKey_.bind(this,true);this.onBubblingKeyPress_=this.onKey_.bind(this,false);this.onCapturingKeyPress_=this.onKey_.bind(this,true);},attached:function(){var host=this.findHost_();if(host.__hotkeyController)
+HotKey.prototype={get eventType(){return this.eventType_;},get keyCodes(){return this.keyCodes_;},get helpText(){return this.helpText_;},call:function(e){this.callback_.call(this.thisArg_,e);},pushKeyCode_:function(keyCode){this.keyCodes_.push(keyCode);}};return{HotKey:HotKey};});'use strict';Polymer('tv-ui-b-hotkey-controller',{created:function(){this.isAttached_=false;this.globalMode_=false;this.slavedToParentController_=undefined;this.curHost_=undefined;this.childControllers_=[];this.bubblingKeyDownHotKeys_={};this.capturingKeyDownHotKeys_={};this.bubblingKeyPressHotKeys_={};this.capturingKeyPressHotKeys_={};this.onBubblingKeyDown_=this.onKey_.bind(this,false);this.onCapturingKeyDown_=this.onKey_.bind(this,true);this.onBubblingKeyPress_=this.onKey_.bind(this,false);this.onCapturingKeyPress_=this.onKey_.bind(this,true);},attached:function(){this.isAttached_=true;var host=this.findHost_();if(host.__hotkeyController)
 throw new Error('Multiple hotkey controllers attached to this host');host.__hotkeyController=this;this.curHost_=host;var parentElement;if(host.parentElement)
 parentElement=host.parentElement;else
 parentElement=host.parentNode.host;var parentController=tr.b.getHotkeyControllerForElement(parentElement);if(parentController){this.slavedToParentController_=parentController;parentController.addChildController_(this);return;}
-host.addEventListener('keydown',this.onBubblingKeyDown_,false);host.addEventListener('keydown',this.onCapturingKeyDown_,true);host.addEventListener('keypress',this.onBubblingKeyPress_,false);host.addEventListener('keypress',this.onCapturingKeyPress_,true);},detached:function(){var host=this.curHost_;if(!host)
+host.addEventListener('keydown',this.onBubblingKeyDown_,false);host.addEventListener('keydown',this.onCapturingKeyDown_,true);host.addEventListener('keypress',this.onBubblingKeyPress_,false);host.addEventListener('keypress',this.onCapturingKeyPress_,true);},detached:function(){this.isAttached_=false;var host=this.curHost_;if(!host)
 return;delete host.__hotkeyController;this.curHost_=undefined;if(this.slavedToParentController_){this.slavedToParentController_.removeChildController_(this);this.slavedToParentController_=undefined;return;}
 host.removeEventListener('keydown',this.onBubblingKeyDown_,false);host.removeEventListener('keydown',this.onCapturingKeyDown_,true);host.removeEventListener('keypress',this.onBubblingKeyPress_,false);host.removeEventListener('keypress',this.onCapturingKeyPress_,true);},addChildController_:function(controller){var i=this.childControllers_.indexOf(controller);if(i!==-1)
 throw new Error('Controller already registered');this.childControllers_.push(controller);},removeChildController_:function(controller){var i=this.childControllers_.indexOf(controller);if(i===-1)
@@ -5792,7 +5852,9 @@
 throw new Error('hotKey must be a tr.ui.b.HotKey');var keyMap=this.getKeyMapForEventType_(hotKey.eventType,hotKey.useCapture);for(var i=0;i<hotKey.keyCodes.length;i++){var keyCode=hotKey.keyCodes[i];if(!keyMap[keyCode])
 throw new Error('Key is not bound for keyCode='+keyCode);keyMap[keyCode]=hotKey;}
 for(var i=0;i<hotKey.keyCodes.length;i++){var keyCode=hotKey.keyCodes[i];delete keyMap[keyCode];}
-return hotKey;},get globalMode(){return this.globalMode_;},set globalMode(globalMode){this.detached();this.globalMode_=!!globalMode;this.attached();},get topmostConroller_(){if(this.slavedToParentController_)
+return hotKey;},get globalMode(){return this.globalMode_;},set globalMode(globalMode){var wasAttached=this.isAttached_;if(wasAttached)
+this.detached();this.globalMode_=!!globalMode;if(wasAttached)
+this.attached();},get topmostConroller_(){if(this.slavedToParentController_)
 return this.slavedToParentController_.topmostConroller_;return this;},childRequestsGeneralFocus:function(child){var topmost=this.topmostConroller_;if(topmost.curHost_){if(topmost.curHost_.hasAttribute('tabIndex')){topmost.curHost_.focus();}else{if(document.activeElement)
 document.activeElement.blur();}}else{if(document.activeElement)
 document.activeElement.blur();}},childRequestsBlur:function(child){child.blur();var topmost=this.topmostConroller_;if(topmost.curHost_){topmost.curHost_.focus();}},findHost_:function(){if(this.globalMode_){return document.body;}else{if(this.parentElement)
@@ -5810,17 +5872,35 @@
 return node.host;}
 return{getHotkeyControllerForElement:getHotkeyControllerForElement};});'use strict';Polymer('tr-ui-b-info-bar',{ready:function(){this.messageEl_=this.$.message;this.buttonsEl_=this.$.buttons;this.message='';this.visible=false;},get message(){return this.messageEl_.textContent;},set message(message){this.messageEl_.textContent=message;},get visible(){return!this.classList.contains('info-bar-hidden');},set visible(visible){if(visible)
 this.classList.remove('info-bar-hidden');else
-this.classList.add('info-bar-hidden');},removeAllButtons:function(){this.buttonsEl_.textContent='';},addButton:function(text,clickCallback){var button=document.createElement('button');button.textContent=text;button.addEventListener('click',clickCallback);this.buttonsEl_.appendChild(button);return button;}});'use strict';Polymer('tr-ui-b-info-bar-group',{ready:function(){this.messages_=[];},clearMessages:function(){this.messages_=[];this.updateContents_();},addMessage:function(text,opt_buttons){opt_buttons=opt_buttons||[];for(var i=0;i<opt_buttons.length;i++){if(opt_buttons[i].buttonText===undefined)
-throw new Error('buttonText must be provided');if(opt_buttons[i].onClick===undefined)
-throw new Error('onClick must be provided');}
-this.messages_.push({text:text,buttons:opt_buttons||[]});this.updateContents_();},updateContents_:function(){this.$.messages.textContent='';this.messages_.forEach(function(message){var bar=document.createElement('tr-ui-b-info-bar');bar.message=message.text;bar.visible=true;message.buttons.forEach(function(button){bar.addButton(button.buttonText,button.onClick);},this);this.$.messages.appendChild(bar);},this);}});'use strict';tr.exportTo('tr.ui',function(){var Task=tr.b.Task;function FindController(brushingStateController){this.brushingStateController_=brushingStateController;this.filterHits_=new tr.model.EventSet();this.currentHitIndex_=-1;this.activePromise_=Promise.resolve();this.activeTask_=undefined;};FindController.prototype={__proto__:Object.prototype,get model(){return this.brushingStateController_.model;},get brushingStateController(){return this.brushingStateController_;},enqueueOperation_:function(operation){var task;if(operation instanceof tr.b.Task)
-task=operation;else
-task=new tr.b.Task(operation,this);if(this.activeTask_){this.activeTask_=this.activeTask_.enqueue(task);}else{this.activeTask_=task;this.activePromise_=Task.RunWhenIdle(this.activeTask_);this.activePromise_.then(function(){this.activePromise_=undefined;this.activeTask_=undefined;}.bind(this));}},startFiltering:function(filterText){var sc=this.brushingStateController_;if(!sc)
-return;this.enqueueOperation_(function(){this.filterHits_=new tr.model.EventSet();this.currentHitIndex_=-1;}.bind(this));var stateFromString;try{stateFromString=sc.uiStateFromString(filterText);}catch(e){this.enqueueOperation_(function(){var overlay=new tr.ui.b.Overlay();overlay.textContent=e.message;overlay.title='UI State Navigation Error';overlay.visible=true;});return this.activePromise_;}
-if(stateFromString!==undefined){this.enqueueOperation_(sc.navToPosition.bind(this,stateFromString,true));}else{if(filterText.length===0){this.enqueueOperation_(sc.findTextCleared.bind(sc));}else{var filter=new tr.c.FullTextFilter(filterText);var filterHits=new tr.model.EventSet();this.enqueueOperation_(sc.addAllEventsMatchingFilterToSelectionAsTask(filter,filterHits));this.enqueueOperation_(function(){this.filterHits_=filterHits;sc.findTextChangedTo(filterHits);}.bind(this));}}
-return this.activePromise_;},get filterHits(){return this.filterHits_;},get currentHitIndex(){return this.currentHitIndex_;},find_:function(dir){var firstHit=this.currentHitIndex_===-1;if(firstHit&&dir<0)
-this.currentHitIndex_=0;var N=this.filterHits.length;this.currentHitIndex_=(this.currentHitIndex_+dir+N)%N;if(!this.brushingStateController_)
-return;this.brushingStateController_.findFocusChangedTo(this.filterHits.subEventSet(this.currentHitIndex_,1));},findNext:function(){this.find_(1);},findPrevious:function(){this.find_(-1);}};return{FindController:FindController};});'use strict';tr.exportTo('tr.ui.b',function(){var MOUSE_SELECTOR_MODE={};MOUSE_SELECTOR_MODE.SELECTION=0x1;MOUSE_SELECTOR_MODE.PANSCAN=0x2;MOUSE_SELECTOR_MODE.ZOOM=0x4;MOUSE_SELECTOR_MODE.TIMING=0x8;MOUSE_SELECTOR_MODE.ROTATE=0x10;MOUSE_SELECTOR_MODE.ALL_MODES=0x1F;var MOUSE_SELECTOR_MODE_INFOS={};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.PANSCAN]={mode:MOUSE_SELECTOR_MODE.PANSCAN,title:'pan',eventNames:{enter:'enterpan',begin:'beginpan',update:'updatepan',end:'endpan',exit:'exitpan'},activeBackgroundPosition:'-30px -10px',defaultBackgroundPosition:'0 -10px'};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.SELECTION]={mode:MOUSE_SELECTOR_MODE.SELECTION,title:'selection',eventNames:{enter:'enterselection',begin:'beginselection',update:'updateselection',end:'endselection',exit:'exitselection'},activeBackgroundPosition:'-30px -40px',defaultBackgroundPosition:'0 -40px'};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.ZOOM]={mode:MOUSE_SELECTOR_MODE.ZOOM,title:'zoom',eventNames:{enter:'enterzoom',begin:'beginzoom',update:'updatezoom',end:'endzoom',exit:'exitzoom'},activeBackgroundPosition:'-30px -70px',defaultBackgroundPosition:'0 -70px'};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.TIMING]={mode:MOUSE_SELECTOR_MODE.TIMING,title:'timing',eventNames:{enter:'entertiming',begin:'begintiming',update:'updatetiming',end:'endtiming',exit:'exittiming'},activeBackgroundPosition:'-30px -100px',defaultBackgroundPosition:'0 -100px'};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.ROTATE]={mode:MOUSE_SELECTOR_MODE.ROTATE,title:'rotate',eventNames:{enter:'enterrotate',begin:'beginrotate',update:'updaterotate',end:'endrotate',exit:'exitrotate'},activeBackgroundPosition:'-30px -130px',defaultBackgroundPosition:'0 -130px'};return{MOUSE_SELECTOR_MODE_INFOS:MOUSE_SELECTOR_MODE_INFOS,MOUSE_SELECTOR_MODE:MOUSE_SELECTOR_MODE};});'use strict';Polymer('tr-ui-b-mouse-mode-icon',{publish:{modeName:{value:undefined,reflect:true}},created:function(){this.active_=false;this.acceleratorKey_=undefined;},ready:function(){this.updateContents_();},get mode(){return tr.ui.b.MOUSE_SELECTOR_MODE[this.modeName];},set mode(mode){var modeInfo=tr.ui.b.MOUSE_SELECTOR_MODE_INFOS[mode];var modeName=tr.b.findFirstKeyInDictMatching(tr.ui.b.MOUSE_SELECTOR_MODE,function(modeName,candidateMode){return candidateMode===mode;});if(modeName===undefined)
+this.classList.add('info-bar-hidden');},removeAllButtons:function(){this.buttonsEl_.textContent='';},addButton:function(text,clickCallback){var button=document.createElement('button');button.textContent=text;button.addEventListener('click',clickCallback);this.buttonsEl_.appendChild(button);return button;}});'use strict';tr.exportTo('tr.ui.b',function(){var ContainerThatDecoratesItsChildren=tr.ui.b.define('div');ContainerThatDecoratesItsChildren.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.observer_=new WebKitMutationObserver(this.didMutate_.bind(this));this.observer_.observe(this,{childList:true});Object.defineProperty(this,'textContent',{get:undefined,set:this.onSetTextContent_});},appendChild:function(x){HTMLUnknownElement.prototype.appendChild.call(this,x);this.didMutate_(this.observer_.takeRecords());},insertBefore:function(x,y){HTMLUnknownElement.prototype.insertBefore.call(this,x,y);this.didMutate_(this.observer_.takeRecords());},removeChild:function(x){HTMLUnknownElement.prototype.removeChild.call(this,x);this.didMutate_(this.observer_.takeRecords());},replaceChild:function(x,y){HTMLUnknownElement.prototype.replaceChild.call(this,x,y);this.didMutate_(this.observer_.takeRecords());},onSetTextContent_:function(textContent){if(textContent!='')
+throw new Error('textContent can only be set to \'\'.');this.clear();},clear:function(){while(this.lastChild)
+HTMLUnknownElement.prototype.removeChild.call(this,this.lastChild);this.didMutate_(this.observer_.takeRecords());},didMutate_:function(records){this.beginDecorating_();for(var i=0;i<records.length;i++){var addedNodes=records[i].addedNodes;if(addedNodes){for(var j=0;j<addedNodes.length;j++)
+this.decorateChild_(addedNodes[j]);}
+var removedNodes=records[i].removedNodes;if(removedNodes){for(var j=0;j<removedNodes.length;j++){this.undecorateChild_(removedNodes[j]);}}}
+this.doneDecoratingForNow_();},decorateChild_:function(child){throw new Error('Not implemented');},undecorateChild_:function(child){throw new Error('Not implemented');},beginDecorating_:function(){},doneDecoratingForNow_:function(){}};return{ContainerThatDecoratesItsChildren:ContainerThatDecoratesItsChildren};});'use strict';tr.exportTo('tr.ui.b',function(){var ListView=tr.ui.b.define('x-list-view',tr.ui.b.ContainerThatDecoratesItsChildren);ListView.prototype={__proto__:tr.ui.b.ContainerThatDecoratesItsChildren.prototype,decorate:function(){tr.ui.b.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);this.classList.add('x-list-view');this.onItemClicked_=this.onItemClicked_.bind(this);this.onKeyDown_=this.onKeyDown_.bind(this);this.tabIndex=0;this.addEventListener('keydown',this.onKeyDown_);this.selectionChanged_=false;},decorateChild_:function(item){item.classList.add('list-item');item.addEventListener('click',this.onItemClicked_,true);var listView=this;Object.defineProperty(item,'selected',{configurable:true,set:function(value){var oldSelection=listView.selectedElement;if(oldSelection&&oldSelection!=this&&value)
+listView.selectedElement.removeAttribute('selected');if(value)
+this.setAttribute('selected','selected');else
+this.removeAttribute('selected');var newSelection=listView.selectedElement;if(newSelection!=oldSelection)
+tr.b.dispatchSimpleEvent(listView,'selection-changed',false);},get:function(){return this.hasAttribute('selected');}});},undecorateChild_:function(item){this.selectionChanged_|=item.selected;item.classList.remove('list-item');item.removeEventListener('click',this.onItemClicked_);delete item.selected;},beginDecorating_:function(){this.selectionChanged_=false;},doneDecoratingForNow_:function(){if(this.selectionChanged_)
+tr.b.dispatchSimpleEvent(this,'selection-changed',false);},get selectedElement(){var el=this.querySelector('.list-item[selected]');if(!el)
+return undefined;return el;},set selectedElement(el){if(!el){if(this.selectedElement)
+this.selectedElement.selected=false;return;}
+if(el.parentElement!=this)
+throw new Error('Can only select elements that are children of this list view');el.selected=true;},getElementByIndex:function(index){return this.querySelector('.list-item:nth-child('+index+')');},clear:function(){var changed=this.selectedElement!==undefined;tr.ui.b.ContainerThatDecoratesItsChildren.prototype.clear.call(this);if(changed)
+tr.b.dispatchSimpleEvent(this,'selection-changed',false);},onItemClicked_:function(e){var currentSelectedElement=this.selectedElement;if(currentSelectedElement)
+currentSelectedElement.removeAttribute('selected');var element=e.target;while(element.parentElement!=this)
+element=element.parentElement;if(element!==currentSelectedElement)
+element.setAttribute('selected','selected');tr.b.dispatchSimpleEvent(this,'selection-changed',false);},onKeyDown_:function(e){if(this.selectedElement===undefined)
+return;if(e.keyCode==38){var prev=this.selectedElement.previousSibling;if(prev){prev.selected=true;tr.ui.b.scrollIntoViewIfNeeded(prev);e.preventDefault();return true;}}else if(e.keyCode==40){var next=this.selectedElement.nextSibling;if(next){next.selected=true;tr.ui.b.scrollIntoViewIfNeeded(next);e.preventDefault();return true;}}},addItem:function(textContent){var item=document.createElement('div');item.textContent=textContent;this.appendChild(item);return item;}};return{ListView:ListView};});'use strict';tr.exportTo('tr.ui.b',function(){function MouseTracker(opt_targetElement){this.onMouseDown_=this.onMouseDown_.bind(this);this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.targetElement=opt_targetElement;}
+MouseTracker.prototype={get targetElement(){return this.targetElement_;},set targetElement(targetElement){if(this.targetElement_)
+this.targetElement_.removeEventListener('mousedown',this.onMouseDown_);this.targetElement_=targetElement;if(this.targetElement_)
+this.targetElement_.addEventListener('mousedown',this.onMouseDown_);},onMouseDown_:function(e){if(e.button!==0)
+return true;e=this.remakeEvent_(e,'mouse-tracker-start');this.targetElement_.dispatchEvent(e);document.addEventListener('mousemove',this.onMouseMove_);document.addEventListener('mouseup',this.onMouseUp_);this.targetElement_.addEventListener('blur',this.onMouseUp_);this.savePreviousUserSelect_=document.body.style['-webkit-user-select'];document.body.style['-webkit-user-select']='none';e.preventDefault();return true;},onMouseMove_:function(e){e=this.remakeEvent_(e,'mouse-tracker-move');this.targetElement_.dispatchEvent(e);},onMouseUp_:function(e){document.removeEventListener('mousemove',this.onMouseMove_);document.removeEventListener('mouseup',this.onMouseUp_);this.targetElement_.removeEventListener('blur',this.onMouseUp_);document.body.style['-webkit-user-select']=this.savePreviousUserSelect_;e=this.remakeEvent_(e,'mouse-tracker-end');this.targetElement_.dispatchEvent(e);},remakeEvent_:function(e,newType){var remade=new tr.b.Event(newType,true,true);remade.x=e.x;remade.y=e.y;remade.offsetX=e.offsetX;remade.offsetY=e.offsetY;remade.clientX=e.clientX;remade.clientY=e.clientY;return remade;}};function trackMouseMovesUntilMouseUp(mouseMoveHandler,opt_mouseUpHandler,opt_keyUpHandler){function cleanupAndDispatchToMouseUp(e){document.removeEventListener('mousemove',mouseMoveHandler);if(opt_keyUpHandler)
+document.removeEventListener('keyup',opt_keyUpHandler);document.removeEventListener('mouseup',cleanupAndDispatchToMouseUp);if(opt_mouseUpHandler)
+opt_mouseUpHandler(e);}
+document.addEventListener('mousemove',mouseMoveHandler);if(opt_keyUpHandler)
+document.addEventListener('keyup',opt_keyUpHandler);document.addEventListener('mouseup',cleanupAndDispatchToMouseUp);}
+return{MouseTracker:MouseTracker,trackMouseMovesUntilMouseUp:trackMouseMovesUntilMouseUp};});'use strict';tr.exportTo('tr.ui.b',function(){var MOUSE_SELECTOR_MODE={};MOUSE_SELECTOR_MODE.SELECTION=0x1;MOUSE_SELECTOR_MODE.PANSCAN=0x2;MOUSE_SELECTOR_MODE.ZOOM=0x4;MOUSE_SELECTOR_MODE.TIMING=0x8;MOUSE_SELECTOR_MODE.ROTATE=0x10;MOUSE_SELECTOR_MODE.ALL_MODES=0x1F;var MOUSE_SELECTOR_MODE_INFOS={};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.PANSCAN]={mode:MOUSE_SELECTOR_MODE.PANSCAN,title:'pan',eventNames:{enter:'enterpan',begin:'beginpan',update:'updatepan',end:'endpan',exit:'exitpan'},activeBackgroundPosition:'-30px -10px',defaultBackgroundPosition:'0 -10px'};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.SELECTION]={mode:MOUSE_SELECTOR_MODE.SELECTION,title:'selection',eventNames:{enter:'enterselection',begin:'beginselection',update:'updateselection',end:'endselection',exit:'exitselection'},activeBackgroundPosition:'-30px -40px',defaultBackgroundPosition:'0 -40px'};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.ZOOM]={mode:MOUSE_SELECTOR_MODE.ZOOM,title:'zoom',eventNames:{enter:'enterzoom',begin:'beginzoom',update:'updatezoom',end:'endzoom',exit:'exitzoom'},activeBackgroundPosition:'-30px -70px',defaultBackgroundPosition:'0 -70px'};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.TIMING]={mode:MOUSE_SELECTOR_MODE.TIMING,title:'timing',eventNames:{enter:'entertiming',begin:'begintiming',update:'updatetiming',end:'endtiming',exit:'exittiming'},activeBackgroundPosition:'-30px -100px',defaultBackgroundPosition:'0 -100px'};MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.ROTATE]={mode:MOUSE_SELECTOR_MODE.ROTATE,title:'rotate',eventNames:{enter:'enterrotate',begin:'beginrotate',update:'updaterotate',end:'endrotate',exit:'exitrotate'},activeBackgroundPosition:'-30px -130px',defaultBackgroundPosition:'0 -130px'};return{MOUSE_SELECTOR_MODE_INFOS:MOUSE_SELECTOR_MODE_INFOS,MOUSE_SELECTOR_MODE:MOUSE_SELECTOR_MODE};});'use strict';Polymer('tr-ui-b-mouse-mode-icon',{publish:{modeName:{value:undefined,reflect:true}},created:function(){this.active_=false;this.acceleratorKey_=undefined;},ready:function(){this.updateContents_();},get mode(){return tr.ui.b.MOUSE_SELECTOR_MODE[this.modeName];},set mode(mode){var modeInfo=tr.ui.b.MOUSE_SELECTOR_MODE_INFOS[mode];var modeName=tr.b.findFirstKeyInDictMatching(tr.ui.b.MOUSE_SELECTOR_MODE,function(modeName,candidateMode){return candidateMode===mode;});if(modeName===undefined)
 throw new Error('Unknown mode');this.modeName=modeName;},modeNameChanged:function(){this.updateContents_();},get active(){return this.active_;},set active(active){this.active_=!!active;if(this.active_)
 this.classList.add('active');else
 this.classList.remove('active');this.updateContents_();},get acceleratorKey(){return this.acceleratorKey_;},set acceleratorKey(acceleratorKey){this.acceleratorKey_=acceleratorKey;this.updateContents_();},updateContents_:function(){if(this.modeName===undefined)
@@ -5878,703 +5958,7 @@
 tr.b.Settings.set(this.settingsKey_+'.pos',this.pos);},constrainPositionToBounds_:function(pos){var parent=this.offsetParent||document.body;var parentRect=tr.ui.b.windowRectForElement(parent);var top=0;var bottom=parentRect.height-this.offsetHeight;var left=0;var right=parentRect.width-this.offsetWidth;var res={};res.x=Math.max(pos.x,left);res.x=Math.min(res.x,right);res.y=Math.max(pos.y,top);res.y=Math.min(res.y,bottom);return res;},onDragHandleMouseDown_:function(e){e.preventDefault();e.stopImmediatePropagation();var mouseDownPos={x:e.clientX-this.offsetLeft,y:e.clientY-this.offsetTop};tr.ui.b.trackMouseMovesUntilMouseUp(function(e){var pos={};pos.x=e.clientX-mouseDownPos.x;pos.y=e.clientY-mouseDownPos.y;this.pos=pos;}.bind(this));},checkIsClick_:function(e){if(!this.isInteracting_||!this.isClick_)
 return;var deltaX=this.mousePos_.x-this.mouseDownPos_.x;var deltaY=this.mousePos_.y-this.mouseDownPos_.y;var minDist=MIN_MOUSE_SELECTION_DISTANCE;if(deltaX*deltaX+deltaY*deltaY>minDist*minDist)
 this.isClick_=false;},dispatchClickEvents_:function(e){if(!this.isClick_)
-return;var modeInfo=MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.SELECTION];var eventNames=modeInfo.eventNames;var mouseEvent=this.createEvent_(eventNames.begin);mouseEvent.appendSelection=isCmdOrCtrlPressed(e);this.dispatchEvent(mouseEvent);mouseEvent=this.createEvent_(eventNames.end);this.dispatchEvent(mouseEvent);}});return{MIN_MOUSE_SELECTION_DISTANCE:MIN_MOUSE_SELECTION_DISTANCE,MODIFIER:MODIFIER};});'use strict';tr.exportTo('tr.ui.b',function(){function TimingTool(viewport,targetElement){this.viewport_=viewport;this.onMouseMove_=this.onMouseMove_.bind(this);this.onDblClick_=this.onDblClick_.bind(this);this.targetElement_=targetElement;this.isMovingLeftEdge_=false;};TimingTool.prototype={onEnterTiming:function(e){this.targetElement_.addEventListener('mousemove',this.onMouseMove_);this.targetElement_.addEventListener('dblclick',this.onDblClick_);},onBeginTiming:function(e){if(!this.isTouchPointInsideTrackBounds_(e.clientX,e.clientY))
-return;var pt=this.getSnappedToEventPosition_(e);this.mouseDownAt_(pt.x,pt.y);this.updateSnapIndicators_(pt);},updateSnapIndicators_:function(pt){if(!pt.snapped)
-return;var ir=this.viewport_.interestRange;if(ir.min===pt.x)
-ir.leftSnapIndicator=new tr.ui.SnapIndicator(pt.y,pt.height);if(ir.max===pt.x)
-ir.rightSnapIndicator=new tr.ui.SnapIndicator(pt.y,pt.height);},onUpdateTiming:function(e){var pt=this.getSnappedToEventPosition_(e);this.mouseMoveAt_(pt.x,pt.y,true);this.updateSnapIndicators_(pt);},onEndTiming:function(e){this.mouseUp_();},onExitTiming:function(e){this.targetElement_.removeEventListener('mousemove',this.onMouseMove_);this.targetElement_.removeEventListener('dblclick',this.onDblClick_);},onMouseMove_:function(e){if(e.button)
-return;var worldX=this.getWorldXFromEvent_(e);this.mouseMoveAt_(worldX,e.clientY,false);},onDblClick_:function(e){console.error('not implemented');},isTouchPointInsideTrackBounds_:function(clientX,clientY){if(!this.viewport_||!this.viewport_.modelTrackContainer||!this.viewport_.modelTrackContainer.canvas)
-return false;var canvas=this.viewport_.modelTrackContainer.canvas;var canvasRect=canvas.getBoundingClientRect();if(clientX>=canvasRect.left&&clientX<=canvasRect.right&&clientY>=canvasRect.top&&clientY<=canvasRect.bottom)
-return true;return false;},mouseDownAt_:function(worldX,y){var ir=this.viewport_.interestRange;var dt=this.viewport_.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var nearnessThresholdWorld=dt.xViewVectorToWorld(6*pixelRatio);if(ir.isEmpty){ir.setMinAndMax(worldX,worldX);ir.rightSelected=true;this.isMovingLeftEdge_=false;return;}
-if(Math.abs(worldX-ir.min)<nearnessThresholdWorld){ir.leftSelected=true;ir.min=worldX;this.isMovingLeftEdge_=true;return;}
-if(Math.abs(worldX-ir.max)<nearnessThresholdWorld){ir.rightSelected=true;ir.max=worldX;this.isMovingLeftEdge_=false;return;}
-ir.setMinAndMax(worldX,worldX);ir.rightSelected=true;this.isMovingLeftEdge_=false;},mouseMoveAt_:function(worldX,y,mouseDown){var ir=this.viewport_.interestRange;if(mouseDown){this.updateMovingEdge_(worldX);return;}
-var ir=this.viewport_.interestRange;var dt=this.viewport_.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var nearnessThresholdWorld=dt.xViewVectorToWorld(6*pixelRatio);if(Math.abs(worldX-ir.min)<nearnessThresholdWorld){ir.leftSelected=true;ir.rightSelected=false;return;}
-if(Math.abs(worldX-ir.max)<nearnessThresholdWorld){ir.leftSelected=false;ir.rightSelected=true;return;}
-ir.leftSelected=false;ir.rightSelected=false;return;},updateMovingEdge_:function(newWorldX){var ir=this.viewport_.interestRange;var a=ir.min;var b=ir.max;if(this.isMovingLeftEdge_)
-a=newWorldX;else
-b=newWorldX;if(a<=b)
-ir.setMinAndMax(a,b);else
-ir.setMinAndMax(b,a);if(ir.min==newWorldX){this.isMovingLeftEdge_=true;ir.leftSelected=true;ir.rightSelected=false;}else{this.isMovingLeftEdge_=false;ir.leftSelected=false;ir.rightSelected=true;}},mouseUp_:function(){var dt=this.viewport_.currentDisplayTransform;var ir=this.viewport_.interestRange;ir.leftSelected=false;ir.rightSelected=false;var pixelRatio=window.devicePixelRatio||1;var minWidthValue=dt.xViewVectorToWorld(2*pixelRatio);if(ir.range<minWidthValue)
-ir.reset();},getWorldXFromEvent_:function(e){var pixelRatio=window.devicePixelRatio||1;var canvas=this.viewport_.modelTrackContainer.canvas;var worldOffset=canvas.getBoundingClientRect().left;var viewX=(e.clientX-worldOffset)*pixelRatio;return this.viewport_.currentDisplayTransform.xViewToWorld(viewX);},getSnappedToEventPosition_:function(e){var pixelRatio=window.devicePixelRatio||1;var EVENT_SNAP_RANGE=16*pixelRatio;var modelTrackContainer=this.viewport_.modelTrackContainer;var modelTrackContainerRect=modelTrackContainer.getBoundingClientRect();var viewport=this.viewport_;var dt=viewport.currentDisplayTransform;var worldMaxDist=dt.xViewVectorToWorld(EVENT_SNAP_RANGE);var worldX=this.getWorldXFromEvent_(e);var mouseY=e.clientY;var selection=new tr.model.EventSet();modelTrackContainer.addClosestEventToSelection(worldX,worldMaxDist,mouseY,mouseY,selection);if(!selection.length){modelTrackContainer.addClosestEventToSelection(worldX,worldMaxDist,modelTrackContainerRect.top,modelTrackContainerRect.bottom,selection);}
-var minDistX=worldMaxDist;var minDistY=Infinity;var pixWidth=dt.xViewVectorToWorld(1);var result={x:worldX,y:mouseY-modelTrackContainerRect.top,height:0,snapped:false};var eventBounds=new tr.b.Range();for(var i=0;i<selection.length;i++){var event=selection[i];var track=viewport.trackForEvent(event);var trackRect=track.getBoundingClientRect();eventBounds.reset();event.addBoundsToRange(eventBounds);var eventX;if(Math.abs(eventBounds.min-worldX)<Math.abs(eventBounds.max-worldX)){eventX=eventBounds.min;}else{eventX=eventBounds.max;}
-var distX=eventX-worldX;var eventY=trackRect.top;var eventHeight=trackRect.height;var distY=Math.abs(eventY+eventHeight/2-mouseY);if((distX<=minDistX||Math.abs(distX-minDistX)<pixWidth)&&distY<minDistY){minDistX=distX;minDistY=distY;result.x=eventX;result.y=eventY+
-modelTrackContainer.scrollTop-modelTrackContainerRect.top;result.height=eventHeight;result.snapped=true;}}
-return result;}};return{TimingTool:TimingTool};});'use strict';tr.exportTo('tr.ui',function(){var kDefaultPanAnimatoinDurationMs=100.0;function TimelineDisplayTransformPanAnimation(deltaX,deltaY,opt_durationMs){this.deltaX=deltaX;this.deltaY=deltaY;if(opt_durationMs===undefined)
-this.durationMs=kDefaultPanAnimatoinDurationMs;else
-this.durationMs=opt_durationMs;this.startPanX=undefined;this.startPanY=undefined;this.startTimeMs=undefined;}
-TimelineDisplayTransformPanAnimation.prototype={__proto__:tr.ui.b.Animation.prototype,get affectsPanY(){return this.deltaY!==0;},canTakeOverFor:function(existingAnimation){return existingAnimation instanceof TimelineDisplayTransformPanAnimation;},takeOverFor:function(existing,timestamp,target){var remainingDeltaXOnExisting=existing.goalPanX-target.panX;var remainingDeltaYOnExisting=existing.goalPanY-target.panY;var remainingTimeOnExisting=timestamp-(existing.startTimeMs+existing.durationMs);remainingTimeOnExisting=Math.max(remainingTimeOnExisting,0);this.deltaX+=remainingDeltaXOnExisting;this.deltaY+=remainingDeltaYOnExisting;this.durationMs+=remainingTimeOnExisting;},start:function(timestamp,target){this.startTimeMs=timestamp;this.startPanX=target.panX;this.startPanY=target.panY;},tick:function(timestamp,target){var percentDone=(timestamp-this.startTimeMs)/this.durationMs;percentDone=tr.b.clamp(percentDone,0,1);target.panX=tr.b.lerp(percentDone,this.startPanX,this.goalPanX);if(this.affectsPanY)
-target.panY=tr.b.lerp(percentDone,this.startPanY,this.goalPanY);return timestamp>=this.startTimeMs+this.durationMs;},get goalPanX(){return this.startPanX+this.deltaX;},get goalPanY(){return this.startPanY+this.deltaY;}};function TimelineDisplayTransformZoomToAnimation(goalFocalPointXWorld,goalFocalPointXView,goalFocalPointY,zoomInRatioX,opt_durationMs){this.goalFocalPointXWorld=goalFocalPointXWorld;this.goalFocalPointXView=goalFocalPointXView;this.goalFocalPointY=goalFocalPointY;this.zoomInRatioX=zoomInRatioX;if(opt_durationMs===undefined)
-this.durationMs=kDefaultPanAnimatoinDurationMs;else
-this.durationMs=opt_durationMs;this.startTimeMs=undefined;this.startScaleX=undefined;this.goalScaleX=undefined;this.startPanY=undefined;}
-TimelineDisplayTransformZoomToAnimation.prototype={__proto__:tr.ui.b.Animation.prototype,get affectsPanY(){return this.startPanY!=this.goalFocalPointY;},canTakeOverFor:function(existingAnimation){return false;},takeOverFor:function(existingAnimation,timestamp,target){this.goalScaleX=target.scaleX*this.zoomInRatioX;},start:function(timestamp,target){this.startTimeMs=timestamp;this.startScaleX=target.scaleX;this.goalScaleX=this.zoomInRatioX*target.scaleX;this.startPanY=target.panY;},tick:function(timestamp,target){var percentDone=(timestamp-this.startTimeMs)/this.durationMs;percentDone=tr.b.clamp(percentDone,0,1);target.scaleX=tr.b.lerp(percentDone,this.startScaleX,this.goalScaleX);if(this.affectsPanY){target.panY=tr.b.lerp(percentDone,this.startPanY,this.goalFocalPointY);}
-target.xPanWorldPosToViewPos(this.goalFocalPointXWorld,this.goalFocalPointXView);return timestamp>=this.startTimeMs+this.durationMs;}};return{TimelineDisplayTransformPanAnimation:TimelineDisplayTransformPanAnimation,TimelineDisplayTransformZoomToAnimation:TimelineDisplayTransformZoomToAnimation};});'use strict';tr.exportTo('tr.ui.b',function(){var ContainerThatDecoratesItsChildren=tr.ui.b.define('div');ContainerThatDecoratesItsChildren.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.observer_=new WebKitMutationObserver(this.didMutate_.bind(this));this.observer_.observe(this,{childList:true});Object.defineProperty(this,'textContent',{get:undefined,set:this.onSetTextContent_});},appendChild:function(x){HTMLUnknownElement.prototype.appendChild.call(this,x);this.didMutate_(this.observer_.takeRecords());},insertBefore:function(x,y){HTMLUnknownElement.prototype.insertBefore.call(this,x,y);this.didMutate_(this.observer_.takeRecords());},removeChild:function(x){HTMLUnknownElement.prototype.removeChild.call(this,x);this.didMutate_(this.observer_.takeRecords());},replaceChild:function(x,y){HTMLUnknownElement.prototype.replaceChild.call(this,x,y);this.didMutate_(this.observer_.takeRecords());},onSetTextContent_:function(textContent){if(textContent!='')
-throw new Error('textContent can only be set to \'\'.');this.clear();},clear:function(){while(this.lastChild)
-HTMLUnknownElement.prototype.removeChild.call(this,this.lastChild);this.didMutate_(this.observer_.takeRecords());},didMutate_:function(records){this.beginDecorating_();for(var i=0;i<records.length;i++){var addedNodes=records[i].addedNodes;if(addedNodes){for(var j=0;j<addedNodes.length;j++)
-this.decorateChild_(addedNodes[j]);}
-var removedNodes=records[i].removedNodes;if(removedNodes){for(var j=0;j<removedNodes.length;j++){this.undecorateChild_(removedNodes[j]);}}}
-this.doneDecoratingForNow_();},decorateChild_:function(child){throw new Error('Not implemented');},undecorateChild_:function(child){throw new Error('Not implemented');},beginDecorating_:function(){},doneDecoratingForNow_:function(){}};return{ContainerThatDecoratesItsChildren:ContainerThatDecoratesItsChildren};});'use strict';tr.exportTo('tr.ui.tracks',function(){var Track=tr.ui.b.define('track',tr.ui.b.ContainerThatDecoratesItsChildren);Track.prototype={__proto__:tr.ui.b.ContainerThatDecoratesItsChildren.prototype,decorate:function(viewport){tr.ui.b.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);if(viewport===undefined)
-throw new Error('viewport is required when creating a Track.');this.viewport_=viewport;this.classList.add('track');},get viewport(){return this.viewport_;},get drawingContainer(){var cur=this;while(cur){if(cur instanceof tr.ui.tracks.DrawingContainer)
-return cur;cur=cur.parentElement;}
-return undefined;},get eventContainer(){},invalidateDrawingContainer:function(){var dc=this.drawingContainer;if(dc)
-dc.invalidate();},context:function(){if(!this.parentNode)
-return undefined;if(!this.parentNode.context)
-throw new Error('Parent container does not support context() method.');return this.parentNode.context();},decorateChild_:function(childTrack){},undecorateChild_:function(childTrack){if(childTrack.detach)
-childTrack.detach();},updateContents_:function(){},drawTrack:function(type){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);this.draw(type,viewLWorld,viewRWorld);ctx.restore();},draw:function(type,viewLWorld,viewRWorld){},addEventsToTrackMap:function(eventToTrackMap){},addContainersToTrackMap:function(containerToTrackMap){},addIntersectingEventsInRangeToSelection:function(loVX,hiVX,loVY,hiVY,selection){var pixelRatio=window.devicePixelRatio||1;var dt=this.viewport.currentDisplayTransform;var viewPixWidthWorld=dt.xViewVectorToWorld(1);var loWX=dt.xViewToWorld(loVX*pixelRatio);var hiWX=dt.xViewToWorld(hiVX*pixelRatio);var clientRect=this.getBoundingClientRect();var a=Math.max(loVY,clientRect.top);var b=Math.min(hiVY,clientRect.bottom);if(a>b)
-return;this.addIntersectingEventsInRangeToSelectionInWorldSpace(loWX,hiWX,viewPixWidthWorld,selection);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){},addClosestInstantEventToSelection:function(instantEvents,worldX,worldMaxDist,selection){var instantEvent=tr.b.findClosestElementInSortedArray(instantEvents,function(x){return x.start;},worldX,worldMaxDist);if(!instantEvent)
-return;selection.push(instantEvent);}};return{Track:Track};});'use strict';tr.exportTo('tr.ui.b',function(){var constants={HEADING_WIDTH:250};return{constants:constants};});'use strict';tr.exportTo('tr.ui.tracks',function(){var DrawType={GENERAL_EVENT:1,INSTANT_EVENT:2,BACKGROUND:3,GRID:4,FLOW_ARROWS:5,MARKERS:6,HIGHLIGHTS:7,ANNOTATIONS:8};var DrawingContainer=tr.ui.b.define('drawing-container',tr.ui.tracks.Track);DrawingContainer.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('drawing-container');this.canvas_=document.createElement('canvas');this.canvas_.className='drawing-container-canvas';this.canvas_.style.left=tr.ui.b.constants.HEADING_WIDTH+'px';this.appendChild(this.canvas_);this.ctx_=this.canvas_.getContext('2d');this.viewportChange_=this.viewportChange_.bind(this);this.viewport.addEventListener('change',this.viewportChange_);},get canvas(){return this.canvas_;},context:function(){return this.ctx_;},viewportChange_:function(){this.invalidate();},invalidate:function(){if(this.rafPending_)
-return;this.rafPending_=true;tr.b.requestPreAnimationFrame(this.preDraw_,this);},preDraw_:function(){this.rafPending_=false;this.updateCanvasSizeIfNeeded_();tr.b.requestAnimationFrameInThisFrameIfPossible(this.draw_,this);},draw_:function(){this.ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height);var typesToDraw=[DrawType.BACKGROUND,DrawType.HIGHLIGHTS,DrawType.GRID,DrawType.INSTANT_EVENT,DrawType.GENERAL_EVENT,DrawType.MARKERS,DrawType.ANNOTATIONS,DrawType.FLOW_ARROWS];for(var idx in typesToDraw){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
-continue;this.children[i].drawTrack(typesToDraw[idx]);}}
-var pixelRatio=window.devicePixelRatio||1;var bounds=this.canvas_.getBoundingClientRect();var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);this.viewport.drawGridLines(this.ctx_,viewLWorld,viewRWorld);},updateCanvasSizeIfNeeded_:function(){var visibleChildTracks=tr.b.asArray(this.children).filter(this.visibleFilter_);var thisBounds=this.getBoundingClientRect();var firstChildTrackBounds=visibleChildTracks[0].getBoundingClientRect();var lastChildTrackBounds=visibleChildTracks[visibleChildTracks.length-1].getBoundingClientRect();var innerWidth=firstChildTrackBounds.width-
-tr.ui.b.constants.HEADING_WIDTH;var innerHeight=lastChildTrackBounds.bottom-firstChildTrackBounds.top;var pixelRatio=window.devicePixelRatio||1;if(this.canvas_.width!=innerWidth*pixelRatio){this.canvas_.width=innerWidth*pixelRatio;this.canvas_.style.width=innerWidth+'px';}
-if(this.canvas_.height!=innerHeight*pixelRatio){this.canvas_.height=innerHeight*pixelRatio;this.canvas_.style.height=innerHeight+'px';}},visibleFilter_:function(element){if(!(element instanceof tr.ui.tracks.Track))
-return false;return window.getComputedStyle(element).display!=='none';},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
-continue;var trackClientRect=this.children[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b){this.children[i].addClosestEventToSelection(worldX,worldMaxDist,loY,hiY,selection);}}
-tr.ui.tracks.Track.prototype.addClosestEventToSelection.apply(this,arguments);},addEventsToTrackMap:function(eventToTrackMap){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
-continue;this.children[i].addEventsToTrackMap(eventToTrackMap);}}};return{DrawingContainer:DrawingContainer,DrawType:DrawType};});'use strict';tr.exportTo('tr.model',function(){var SelectableItem=tr.model.SelectableItem;var SelectionState=tr.model.SelectionState;function ProxySelectableItem(modelItem){SelectableItem.call(this,modelItem);};ProxySelectableItem.prototype={__proto__:SelectableItem.prototype,get selectionState(){var modelItem=this.modelItem_;if(modelItem===undefined)
-return SelectionState.NONE;return modelItem.selectionState;}};return{ProxySelectableItem:ProxySelectableItem};});'use strict';Polymer('tr-ui-heading',{DOWN_ARROW:String.fromCharCode(0x25BE),RIGHT_ARROW:String.fromCharCode(0x25B8),ready:function(viewport){this.style.width=(tr.ui.b.constants.HEADING_WIDTH-6)+'px';this.heading_='';this.expanded_=true;this.arrowVisible_=false;this.selectionGenerator_=undefined;this.updateContents_();},get heading(){return this.heading_;},set heading(text){if(this.heading_===text)
-return;this.heading_=text;this.updateContents_();},set arrowVisible(val){if(this.arrowVisible_===val)
-return;this.arrowVisible_=!!val;this.updateContents_();},set tooltip(text){this.$.heading.title=text;},set selectionGenerator(generator){if(this.selectionGenerator_===generator)
-return;this.selectionGenerator_=generator;this.updateContents_();},get expanded(){return this.expanded_;},set expanded(expanded){if(this.expanded_===expanded)
-return;this.expanded_=!!expanded;this.updateContents_();},onHeadingDivClicked_:function(){this.dispatchEvent(new tr.b.Event('heading-clicked',{'bubbles':true}));},updateContents_:function(){if(this.arrowVisible_){this.$.arrow.style.display='';}else{this.$.arrow.style.display='none';this.$.heading.style.display=this.expanded_?'':'none';}
-if(this.arrowVisible_){this.$.arrow.textContent=this.expanded_?this.DOWN_ARROW:this.RIGHT_ARROW;}
-this.$.link.style.display='none';this.$.heading_content.style.display='none';if(this.selectionGenerator_){this.$.link.style.display='inline-block';this.$.link.selection=this.selectionGenerator_;this.$.link.textContent=this.heading_;}else{this.$.heading_content.style.display='inline-block';this.$.heading_content.textContent=this.heading_;}}});'use strict';tr.exportTo('tr.ui.tracks',function(){var EventPresenter=tr.ui.b.EventPresenter;var SelectionState=tr.model.SelectionState;var LetterDotTrack=tr.ui.b.define('letter-dot-track',tr.ui.tracks.Track);LetterDotTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('letter-dot-track');this.items_=undefined;this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},get items(){return this.items_;},set items(items){this.items_=items;this.invalidateDrawingContainer();},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;},get dumpRadiusView(){return 7*(window.devicePixelRatio||1);},draw:function(type,viewLWorld,viewRWorld){if(this.items_===undefined)
-return;switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawLetterDots_(viewLWorld,viewRWorld);break;}},drawLetterDots_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var height=bounds.height*pixelRatio;var halfHeight=height*0.5;var twoPi=Math.PI*2;var dt=this.viewport.currentDisplayTransform;var dumpRadiusView=this.dumpRadiusView;var itemRadiusWorld=dt.xViewVectorToWorld(height);var items=this.items_;var loI=tr.b.findLowIndexInSortedArray(items,function(item){return item.start;},viewLWorld);var oldFont=ctx.font;ctx.font='400 '+Math.floor(9*pixelRatio)+'px Arial';ctx.strokeStyle='rgb(0,0,0)';ctx.textBaseline='middle';ctx.textAlign='center';var drawItems=function(selected){for(var i=loI;i<items.length;++i){var item=items[i];var x=item.start;if(x-itemRadiusWorld>viewRWorld)
-break;if(item.selected!==selected)
-continue;var xView=dt.xWorldToView(x);ctx.fillStyle=EventPresenter.getSelectableItemColorAsString(item);ctx.beginPath();ctx.arc(xView,halfHeight,dumpRadiusView+0.5,0,twoPi);ctx.fill();if(item.selected){ctx.lineWidth=3;ctx.strokeStyle='rgb(100,100,0)';ctx.stroke();ctx.beginPath();ctx.arc(xView,halfHeight,dumpRadiusView,0,twoPi);ctx.lineWidth=1.5;ctx.strokeStyle='rgb(255,255,0)';ctx.stroke();}else{ctx.lineWidth=1;ctx.strokeStyle='rgb(0,0,0)';ctx.stroke();}
-ctx.fillStyle='rgb(255, 255, 255)';ctx.fillText(item.dotLetter,xView,halfHeight);}};drawItems(false);drawItems(true);ctx.lineWidth=1;ctx.font=oldFont;},addEventsToTrackMap:function(eventToTrackMap){if(this.items_===undefined)
-return;this.items_.forEach(function(item){item.addToTrackMap(eventToTrackMap,this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){if(this.items_===undefined)
-return;var itemRadiusWorld=viewPixWidthWorld*this.dumpRadiusView;tr.b.iterateOverIntersectingIntervals(this.items_,function(x){return x.start-itemRadiusWorld;},function(x){return 2*itemRadiusWorld;},loWX,hiWX,function(item){item.addToSelection(selection);}.bind(this));},addEventNearToProvidedEventToSelection:function(event,offset,selection){if(this.items_===undefined)
-return;var items=this.items_;var index=tr.b.findFirstIndexInArray(items,function(item){return item.modelItem===event;});if(index===-1)
-return false;var newIndex=index+offset;if(newIndex>=0&&newIndex<items.length){items[newIndex].addToSelection(selection);return true;}
-return false;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){if(this.items_===undefined)
-return;var item=tr.b.findClosestElementInSortedArray(this.items_,function(x){return x.start;},worldX,worldMaxDist);if(!item)
-return;item.addToSelection(selection);}};function LetterDot(modelItem,dotLetter,colorId,start){tr.model.ProxySelectableItem.call(this,modelItem);this.dotLetter=dotLetter;this.colorId=colorId;this.start=start;};LetterDot.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{LetterDotTrack:LetterDotTrack,LetterDot:LetterDot};});'use strict';tr.exportTo('tr.ui.tracks',function(){var AlertTrack=tr.ui.b.define('alert-track',tr.ui.tracks.LetterDotTrack);AlertTrack.prototype={__proto__:tr.ui.tracks.LetterDotTrack.prototype,decorate:function(viewport){tr.ui.tracks.LetterDotTrack.prototype.decorate.call(this,viewport);this.heading='Alerts';this.alerts_=undefined;},get alerts(){return this.alerts_;},set alerts(alerts){this.alerts_=alerts;if(alerts===undefined){this.items=undefined;return;}
-this.items=this.alerts_.map(function(alert){return new tr.ui.tracks.LetterDot(alert,String.fromCharCode(9888),alert.colorId,alert.start);});}};return{AlertTrack:AlertTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var Task=tr.b.Task;var ContainerTrack=tr.ui.b.define('container-track',tr.ui.tracks.Track);ContainerTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);},detach:function(){this.textContent='';},get tracks_(){var tracks=[];for(var i=0;i<this.children.length;i++){if(this.children[i]instanceof tr.ui.tracks.Track)
-tracks.push(this.children[i]);}
-return tracks;},drawTrack:function(type){this.tracks_.forEach(function(track){track.drawTrack(type);});},addIntersectingEventsInRangeToSelection:function(loVX,hiVX,loY,hiY,selection){for(var i=0;i<this.tracks_.length;i++){var trackClientRect=this.tracks_[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b)
-this.tracks_[i].addIntersectingEventsInRangeToSelection(loVX,hiVX,loY,hiY,selection);}
-tr.ui.tracks.Track.prototype.addIntersectingEventsInRangeToSelection.apply(this,arguments);},addEventsToTrackMap:function(eventToTrackMap){for(var i=0;i<this.children.length;++i)
-this.children[i].addEventsToTrackMap(eventToTrackMap);},addAllEventsMatchingFilterToSelection:function(filter,selection){for(var i=0;i<this.tracks_.length;i++)
-this.tracks_[i].addAllEventsMatchingFilterToSelection(filter,selection);},addAllEventsMatchingFilterToSelectionAsTask:function(filter,selection){var task=new Task();for(var i=0;i<this.tracks_.length;i++){task.subTask(function(i){return function(){this.tracks_[i].addAllEventsMatchingFilterToSelection(filter,selection);}}(i),this);}
-return task;},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){for(var i=0;i<this.tracks_.length;i++){var trackClientRect=this.tracks_[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b){this.tracks_[i].addClosestEventToSelection(worldX,worldMaxDist,loY,hiY,selection);}}
-tr.ui.tracks.Track.prototype.addClosestEventToSelection.apply(this,arguments);},addContainersToTrackMap:function(containerToTrackMap){this.tracks_.forEach(function(track){track.addContainersToTrackMap(containerToTrackMap);});},clearTracks_:function(){this.tracks_.forEach(function(track){this.removeChild(track);},this);}};return{ContainerTrack:ContainerTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartAxis(opt_min,opt_max){this.guid_=tr.b.GUID.allocate();this.bounds=new tr.b.Range();if(opt_min!==undefined)
-this.bounds.addValue(opt_min);if(opt_max!==undefined)
-this.bounds.addValue(opt_max);};ChartAxis.prototype={get guid(){return this.guid_;},valueToUnitRange:function(value){if(this.bounds.isEmpty)
-throw new Error('Chart axis bounds are empty');var bounds=this.bounds;if(bounds.range===0)
-return 0;return(value-bounds.min)/bounds.range;},autoSetFromSeries:function(series,opt_config){var range=new tr.b.Range();series.forEach(function(s){range.addRange(s.range);},this);this.autoSetFromRange(range,opt_config);},autoSetFromRange:function(range,opt_config){if(range.isEmpty)
-return;var bounds=this.bounds;if(bounds.isEmpty){bounds.addRange(range);return;}
-if(!opt_config)
-return;var useRangeMin=(opt_config.expandMin&&range.min<bounds.min||opt_config.shrinkMin&&range.min>bounds.min);var useRangeMax=(opt_config.expandMax&&range.max>bounds.max||opt_config.shrinkMax&&range.max<bounds.max);if(!useRangeMin&&!useRangeMax)
-return;if(useRangeMin&&useRangeMax){bounds.min=range.min;bounds.max=range.max;return;}
-if(useRangeMin){bounds.min=Math.min(range.min,bounds.max);}else{bounds.max=Math.max(range.max,bounds.min);}}};return{ChartAxis:ChartAxis};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartPoint(modelItem,x,y,opt_yBase){tr.model.ProxySelectableItem.call(this,modelItem);this.x=x;this.y=y;this.yBase=opt_yBase;};ChartPoint.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{ChartPoint:ChartPoint};});'use strict';tr.exportTo('tr.ui.tracks',function(){var EventPresenter=tr.ui.b.EventPresenter;var SelectionState=tr.model.SelectionState;var ChartSeriesType={LINE:0,AREA:1};var DEFAULT_RENDERING_CONFIG={chartType:ChartSeriesType.LINE,selectedPointSize:4,unselectedPointSize:3,colorId:0,lineWidth:1,skipDistance:1,unselectedPointDensityTransparent:0.10,unselectedPointDensityOpaque:0.05,backgroundOpacity:0.5};var LAST_POINT_WIDTH=16;var ChartSeriesComponent={BACKGROUND:0,LINE:1,DOTS:2};function ChartSeries(points,axis,opt_renderingConfig){this.points=points;this.axis=axis;this.useRenderingConfig_(opt_renderingConfig);}
-ChartSeries.prototype={useRenderingConfig_:function(opt_renderingConfig){var config=opt_renderingConfig||{};tr.b.iterItems(DEFAULT_RENDERING_CONFIG,function(key,defaultValue){var value=config[key];if(value===undefined)
-value=defaultValue;this[key+'_']=value;},this);this.topPadding=this.bottomPadding=Math.max(this.selectedPointSize_,this.unselectedPointSize_)/2;},get range(){var range=new tr.b.Range();this.points.forEach(function(point){range.addValue(point.y);},this);return range;},draw:function(ctx,transform,highDetails){if(this.points===undefined||this.points.length===0)
-return;if(this.chartType_===ChartSeriesType.AREA){this.drawComponent_(ctx,transform,ChartSeriesComponent.BACKGROUND,highDetails);}
-if(this.chartType_===ChartSeriesType.LINE||highDetails){this.drawComponent_(ctx,transform,ChartSeriesComponent.LINE,highDetails);}
-this.drawComponent_(ctx,transform,ChartSeriesComponent.DOTS,highDetails);},drawComponent_:function(ctx,transform,component,highDetails){var extraPixels=0;if(component===ChartSeriesComponent.DOTS){extraPixels=Math.max(this.selectedPointSize_,this.unselectedPointSize_);}
-var leftViewX=transform.leftViewX-extraPixels*transform.pixelRatio;var rightViewX=transform.rightViewX+
-extraPixels*transform.pixelRatio;var leftTimestamp=transform.leftTimestamp-extraPixels;var rightTimestamp=transform.rightTimestamp+extraPixels;var firstVisibleIndex=tr.b.findLowIndexInSortedArray(this.points,function(point){return point.x;},leftTimestamp);var lastVisibleIndex=tr.b.findLowIndexInSortedArray(this.points,function(point){return point.x;},rightTimestamp);if(lastVisibleIndex>=this.points.length||this.points[lastVisibleIndex].x>rightTimestamp){lastVisibleIndex--;}
-var viewSkipDistance=this.skipDistance_*transform.pixelRatio;var circleRadius;var squareSize;var squareHalfSize;var squareOpacity;switch(component){case ChartSeriesComponent.DOTS:ctx.strokeStyle=EventPresenter.getCounterSeriesColor(this.colorId_,SelectionState.NONE);ctx.lineWidth=transform.pixelRatio;circleRadius=(this.selectedPointSize_/2)*transform.pixelRatio;squareSize=this.unselectedPointSize_*transform.pixelRatio;squareHalfSize=squareSize/2;if(!highDetails){squareOpacity=0;break;}
-var visibleIndexRange=lastVisibleIndex-firstVisibleIndex;if(visibleIndexRange<=0){squareOpacity=1;break;}
-var visibleViewXRange=transform.worldXToViewX(this.points[lastVisibleIndex].x)-
-transform.worldXToViewX(this.points[firstVisibleIndex].x);if(visibleViewXRange===0){squareOpacity=1;break;}
-var density=visibleIndexRange/visibleViewXRange;var clampedDensity=tr.b.clamp(density,this.unselectedPointDensityOpaque_,this.unselectedPointDensityTransparent_);var densityRange=this.unselectedPointDensityTransparent_-
-this.unselectedPointDensityOpaque_;squareOpacity=(this.unselectedPointDensityTransparent_-clampedDensity)/densityRange;break;case ChartSeriesComponent.LINE:ctx.strokeStyle=EventPresenter.getCounterSeriesColor(this.colorId_,SelectionState.NONE);ctx.lineWidth=this.lineWidth_*transform.pixelRatio;break;case ChartSeriesComponent.BACKGROUND:break;default:throw new Error('Invalid component: '+component);}
-var previousViewX=undefined;var previousViewY=undefined;var previousViewYBase=undefined;var lastSelectionState=undefined;var baseSteps=undefined;var startIndex=Math.max(firstVisibleIndex-1,0);for(var i=startIndex;i<this.points.length;i++){var currentPoint=this.points[i];var currentViewX=transform.worldXToViewX(currentPoint.x);if(currentViewX>rightViewX){if(previousViewX!==undefined){previousViewX=currentViewX=rightViewX;if(component===ChartSeriesComponent.BACKGROUND||component===ChartSeriesComponent.LINE){ctx.lineTo(currentViewX,previousViewY);}}
-break;}
-if(i+1<this.points.length){var nextPoint=this.points[i+1];var nextViewX=transform.worldXToViewX(nextPoint.x);if(previousViewX!==undefined&&nextViewX-previousViewX<=viewSkipDistance&&nextViewX<rightViewX){continue;}
-if(currentViewX<leftViewX){currentViewX=leftViewX;}}
-if(previousViewX!==undefined&&currentViewX-previousViewX<viewSkipDistance){currentViewX=previousViewX+viewSkipDistance;}
-var currentViewY=Math.round(transform.worldYToViewY(currentPoint.y));var currentViewYBase;if(currentPoint.yBase===undefined){currentViewYBase=transform.outerBottomViewY;}else{currentViewYBase=Math.round(transform.worldYToViewY(currentPoint.yBase));}
-var currentSelectionState=currentPoint.selectionState;switch(component){case ChartSeriesComponent.DOTS:if(currentSelectionState!==lastSelectionState){if(currentSelectionState===SelectionState.SELECTED){ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState);}else if(squareOpacity>0){ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState,squareOpacity);}}
-if(currentSelectionState===SelectionState.SELECTED){ctx.beginPath();ctx.arc(currentViewX,currentViewY,circleRadius,0,2*Math.PI);ctx.fill();ctx.stroke();}else if(squareOpacity>0){ctx.fillRect(currentViewX-squareHalfSize,currentViewY-squareHalfSize,squareSize,squareSize);}
-break;case ChartSeriesComponent.LINE:if(previousViewX===undefined){ctx.beginPath();ctx.moveTo(currentViewX,currentViewY);}else{ctx.lineTo(currentViewX,previousViewY);}
-ctx.lineTo(currentViewX,currentViewY);break;case ChartSeriesComponent.BACKGROUND:if(previousViewX!==undefined)
-ctx.lineTo(currentViewX,previousViewY);if(currentSelectionState!==lastSelectionState){if(previousViewX!==undefined){var previousBaseStepViewX=currentViewX;for(var j=baseSteps.length-1;j>=0;j--){var baseStep=baseSteps[j];var baseStepViewX=baseStep.viewX;var baseStepViewY=baseStep.viewY;ctx.lineTo(previousBaseStepViewX,baseStepViewY);ctx.lineTo(baseStepViewX,baseStepViewY);previousBaseStepViewX=baseStepViewX;}
-ctx.closePath();ctx.fill();}
-ctx.beginPath();ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState,this.backgroundOpacity_);ctx.moveTo(currentViewX,currentViewYBase);baseSteps=[];}
-if(currentViewYBase!==previousViewYBase||currentSelectionState!==lastSelectionState){baseSteps.push({viewX:currentViewX,viewY:currentViewYBase});}
-ctx.lineTo(currentViewX,currentViewY);break;default:throw new Error('Not reachable');}
-previousViewX=currentViewX;previousViewY=currentViewY;previousViewYBase=currentViewYBase;lastSelectionState=currentSelectionState;}
-if(previousViewX!==undefined){switch(component){case ChartSeriesComponent.DOTS:break;case ChartSeriesComponent.LINE:ctx.stroke();break;case ChartSeriesComponent.BACKGROUND:var previousBaseStepViewX=currentViewX;for(var j=baseSteps.length-1;j>=0;j--){var baseStep=baseSteps[j];var baseStepViewX=baseStep.viewX;var baseStepViewY=baseStep.viewY;ctx.lineTo(previousBaseStepViewX,baseStepViewY);ctx.lineTo(baseStepViewX,baseStepViewY);previousBaseStepViewX=baseStepViewX;}
-ctx.closePath();ctx.fill();break;default:throw new Error('Not reachable');}}},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){var points=this.points;function getPointWidth(point,i){if(i===points.length-1)
-return LAST_POINT_WIDTH*viewPixWidthWorld;var nextPoint=points[i+1];return nextPoint.x-point.x;}
-function selectPoint(point){point.addToSelection(selection);}
-tr.b.iterateOverIntersectingIntervals(this.points,function(point){return point.x},getPointWidth,loWX,hiWX,selectPoint);},addEventNearToProvidedEventToSelection:function(event,offset,selection){if(this.points===undefined)
-return false;var index=tr.b.findFirstIndexInArray(this.points,function(point){return point.modelItem===event;},this);if(index===-1)
-return false;var newIndex=index+offset;if(newIndex<0||newIndex>=this.points.length)
-return false;this.points[newIndex].addToSelection(selection);return true;},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){if(this.points===undefined)
-return;var item=tr.b.findClosestElementInSortedArray(this.points,function(point){return point.x},worldX,worldMaxDist);if(!item)
-return;item.addToSelection(selection);}};return{ChartSeries:ChartSeries,ChartSeriesType:ChartSeriesType};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartTransform(displayTransform,axis,trackWidth,trackHeight,topPadding,bottomPadding,pixelRatio){this.pixelRatio=pixelRatio;this.leftViewX=0;this.rightViewX=trackWidth;this.leftTimestamp=displayTransform.xViewToWorld(this.leftViewX);this.rightTimestamp=displayTransform.xViewToWorld(this.rightViewX);this.displayTransform_=displayTransform;this.outerTopViewY=0;this.innerTopViewY=topPadding;this.innerBottomViewY=trackHeight-bottomPadding;this.outerBottomViewY=trackHeight;this.axis_=axis;this.innerHeight_=this.innerBottomViewY-this.innerTopViewY;};ChartTransform.prototype={worldXToViewX:function(worldX){return this.displayTransform_.xWorldToView(worldX);},viewXToWorldX:function(viewX){return this.displayTransform_.xViewToWorld(viewX);},worldYToViewY:function(worldY){var innerHeightCoefficient=1-this.axis_.valueToUnitRange(worldY);return innerHeightCoefficient*this.innerHeight_+this.innerTopViewY;}};return{ChartTransform:ChartTransform};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ChartTrack=tr.ui.b.define('chart-track',tr.ui.tracks.Track);ChartTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('chart-track');this.series_=undefined;this.axisGuidToAxisData_=undefined;this.topPadding_=undefined;this.bottomPadding_=undefined;this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},get series(){return this.series_;},set series(series){this.series_=series;this.calculateAxisDataAndPadding_();this.invalidateDrawingContainer();},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;this.invalidateDrawingContainer();},get hasVisibleContent(){return!!this.series&&this.series.length>0;},calculateAxisDataAndPadding_:function(){if(!this.series_){this.axisGuidToAxisData_=undefined;this.topPadding_=undefined;this.bottomPadding_=undefined;return;}
-var axisGuidToAxisData={};var topPadding=0;var bottomPadding=0;this.series_.forEach(function(series){var axis=series.axis;var axisGuid=axis.guid;if(!(axisGuid in axisGuidToAxisData)){axisGuidToAxisData[axisGuid]={axis:axis,series:[]};}
-axisGuidToAxisData[axisGuid].series.push(series);topPadding=Math.max(topPadding,series.topPadding);bottomPadding=Math.max(bottomPadding,series.bottomPadding);},this);this.axisGuidToAxisData_=axisGuidToAxisData;this.topPadding_=topPadding;this.bottomPadding_=bottomPadding;},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawChart_(viewLWorld,viewRWorld);break;}},drawChart_:function(viewLWorld,viewRWorld){if(!this.series_)
-return;var ctx=this.context();var displayTransform=this.viewport.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var highDetails=this.viewport.highDetails;var width=bounds.width*pixelRatio;var height=bounds.height*pixelRatio;var topPadding=this.topPadding_*pixelRatio;var bottomPadding=this.bottomPadding_*pixelRatio;ctx.save();ctx.beginPath();ctx.rect(0,0,width,height);ctx.clip();this.series_.forEach(function(series){var chartTransform=new tr.ui.tracks.ChartTransform(displayTransform,series.axis,width,height,topPadding,bottomPadding,pixelRatio);series.draw(ctx,chartTransform,highDetails);},this);ctx.restore();},addEventsToTrackMap:function(eventToTrackMap){this.series_.forEach(function(series){series.points.forEach(function(point){point.addToTrackMap(eventToTrackMap,this);},this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){this.series_.forEach(function(series){series.addIntersectingEventsInRangeToSelectionInWorldSpace(loWX,hiWX,viewPixWidthWorld,selection);},this);},addEventNearToProvidedEventToSelection:function(event,offset,selection){var foundItem=false;this.series_.forEach(function(series){foundItem=foundItem||series.addEventNearToProvidedEventToSelection(event,offset,selection);},this);return foundItem;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){this.series_.forEach(function(series){series.addClosestEventToSelection(worldX,worldMaxDist,loY,hiY,selection);},this);},autoSetAllAxes:function(opt_config){tr.b.iterItems(this.axisGuidToAxisData_,function(axisGuid,axisData){var axis=axisData.axis;var series=axisData.series;axis.autoSetFromSeries(series,opt_config);},this);},autoSetAxis:function(axis,opt_config){var series=this.axisGuidToAxisData_[axis.guid].series;axis.autoSetFromSeries(series,opt_config);}};return{ChartTrack:ChartTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ColorScheme=tr.b.ColorScheme;var ChartTrack=tr.ui.tracks.ChartTrack;var PowerSeriesTrack=tr.ui.b.define('power-series-track',ChartTrack);PowerSeriesTrack.prototype={__proto__:ChartTrack.prototype,decorate:function(viewport){ChartTrack.prototype.decorate.call(this,viewport);this.classList.add('power-series-track');this.heading='Power';this.powerSeries_=undefined;},set powerSeries(powerSeries){this.powerSeries_=powerSeries;this.series=this.buildChartSeries_();this.autoSetAllAxes({expandMax:true});},get hasVisibleContent(){return(this.powerSeries_&&this.powerSeries_.samples.length>0);},addContainersToTrackMap:function(containerToTrackMap){containerToTrackMap.addContainer(this.powerSeries_,this);},buildChartSeries_:function(){if(!this.hasVisibleContent)
-return[];var axis=new tr.ui.tracks.ChartAxis(0,undefined);var pts=this.powerSeries_.samples.map(function(smpl){return new tr.ui.tracks.ChartPoint(smpl,smpl.start,smpl.power);});var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.AREA,colorId:ColorScheme.getColorIdForGeneralPurposeString(this.heading)};return[new tr.ui.tracks.ChartSeries(pts,axis,renderingConfig)];}};return{PowerSeriesTrack:PowerSeriesTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SpacingTrack=tr.ui.b.define('spacing-track',tr.ui.tracks.Track);SpacingTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('spacing-track');this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},draw:function(type,viewLWorld,viewRWorld){},addAllEventsMatchingFilterToSelection:function(filter,selection){}};return{SpacingTrack:SpacingTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ContainerTrack=tr.ui.tracks.ContainerTrack;var DeviceTrack=tr.ui.b.define('device-track',ContainerTrack);DeviceTrack.prototype={__proto__:ContainerTrack.prototype,decorate:function(viewport){ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('device-track');this.device_=undefined;this.powerSeriesTrack_=undefined;},get device(){return this.device_;},set device(device){this.device_=device;this.updateContents_();},get powerSeriesTrack(){return this.powerSeriesTrack_;},get hasVisibleContent(){return(this.powerSeriesTrack_&&this.powerSeriesTrack_.hasVisibleContent);},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.ContainerTrack.prototype.addContainersToTrackMap.call(this,containerToTrackMap);containerToTrackMap.addContainer(this.device,this);},addEventsToTrackMap:function(eventToTrackMap){this.tracks_.forEach(function(track){track.addEventsToTrackMap(eventToTrackMap);});},appendPowerSeriesTrack_:function(){this.powerSeriesTrack_=new tr.ui.tracks.PowerSeriesTrack(this.viewport);this.powerSeriesTrack_.powerSeries=this.device.powerSeries;if(this.powerSeriesTrack_.hasVisibleContent){this.appendChild(this.powerSeriesTrack_);this.appendChild(new tr.ui.tracks.SpacingTrack(this.viewport));}},updateContents_:function(){this.clearTracks_();this.appendPowerSeriesTrack_();}};return{DeviceTrack:DeviceTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ColorScheme=tr.b.ColorScheme;var DISPLAYED_SIZE_ATTRIBUTE_NAME=tr.model.MemoryAllocatorDump.DISPLAYED_SIZE_ATTRIBUTE_NAME;function addDictionary(dstDict,srcDict){tr.b.iterItems(srcDict,function(key,value){var existingValue=dstDict[key];if(existingValue===undefined)
-existingValue=0;dstDict[key]=existingValue+value;});}
-function getProcessMemoryDumpAllocatorSizes(processMemoryDump){var allocatorDumps=processMemoryDump.memoryAllocatorDumps;if(allocatorDumps===undefined)
-return{};var allocatorSizes={};allocatorDumps.forEach(function(allocatorDump){if(allocatorDump.fullName==='tracing')
-return;var allocatorSize=allocatorDump.attributes[DISPLAYED_SIZE_ATTRIBUTE_NAME];if(allocatorSize===undefined)
-return;var allocatorSizeValue=allocatorSize.value;if(allocatorSizeValue===undefined)
-return;allocatorSizes[allocatorDump.fullName]=allocatorSizeValue;});return allocatorSizes;};function getGlobalMemoryDumpAllocatorSizes(globalMemoryDump){var globalAllocatorSizes={};tr.b.iterItems(globalMemoryDump.processMemoryDumps,function(pid,processMemoryDump){addDictionary(globalAllocatorSizes,getProcessMemoryDumpAllocatorSizes(processMemoryDump));});return globalAllocatorSizes;}
-function buildAllocatedMemoryChartSeries(memoryDumps,memoryDumpToAllocatorSizesFn){var allocatorNameToPoints={};var dumpsData=memoryDumps.map(function(memoryDump){var allocatorSizes=memoryDumpToAllocatorSizesFn(memoryDump);tr.b.iterItems(allocatorSizes,function(allocatorName){allocatorNameToPoints[allocatorName]=[];});return{dump:memoryDump,sizes:allocatorSizes};});if(Object.keys(allocatorNameToPoints).length===0)
-return undefined;dumpsData.forEach(function(dumpData){var memoryDump=dumpData.dump;var allocatorSizes=dumpData.sizes;tr.b.iterItems(allocatorNameToPoints,function(allocatorName,points){var allocatorSize=allocatorSizes[allocatorName]||0;points.push(new tr.ui.tracks.ChartPoint(memoryDump,memoryDump.start,allocatorSize));});});var axis=new tr.ui.tracks.ChartAxis(0);var series=[];tr.b.iterItems(allocatorNameToPoints,function(allocatorName,points){var colorId=ColorScheme.getColorIdForGeneralPurposeString(allocatorName);var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.LINE,colorId:colorId};series.push(new tr.ui.tracks.ChartSeries(points,axis,renderingConfig));});return series;}
-function buildMemoryLetterDots(memoryDumps){var lightMemoryColorId=ColorScheme.getColorIdForReservedName('light_memory_dump');var detailedMemoryColorId=ColorScheme.getColorIdForReservedName('detailed_memory_dump');return memoryDumps.map(function(memoryDump){var memoryColorId;switch(memoryDump.levelOfDetail){case'detailed':memoryColorId=detailedMemoryColorId;break;case'light':default:memoryColorId=lightMemoryColorId;}
-return new tr.ui.tracks.LetterDot(memoryDump,'M',memoryColorId,memoryDump.start);});}
-function buildGlobalUsedMemoryChartSeries(globalMemoryDumps){var containsVmRegions=globalMemoryDumps.some(function(globalDump){for(var pid in globalDump.processMemoryDumps)
-if(globalDump.processMemoryDumps[pid].mostRecentVmRegions)
-return true;return false;});if(!containsVmRegions)
-return undefined;var pidToProcess={};globalMemoryDumps.forEach(function(globalDump){tr.b.iterItems(globalDump.processMemoryDumps,function(pid,processDump){pidToProcess[pid]=processDump.process;});});var pidToPoints={};tr.b.iterItems(pidToProcess,function(pid,process){pidToPoints[pid]=[];});globalMemoryDumps.forEach(function(globalDump){var pssBase=0;tr.b.iterItems(pidToPoints,function(pid,points){var processMemoryDump=globalDump.processMemoryDumps[pid];var pss;if(processMemoryDump===undefined){pss=0;}else{pss=processMemoryDump.getMostRecentTotalVmRegionStat('proportionalResident');if(pss===undefined){pss=0;}}
-var cumulativePss=pssBase+pss;points.push(new tr.ui.tracks.ChartPoint(globalDump,globalDump.start,cumulativePss,pssBase));pssBase=cumulativePss;});});var axis=new tr.ui.tracks.ChartAxis(0);var series=[];tr.b.iterItems(pidToPoints,function(pid,points){var process=pidToProcess[pid];var colorId=ColorScheme.getColorIdForGeneralPurposeString(process.userFriendlyName);var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.AREA,colorId:colorId,backgroundOpacity:0.8};series.push(new tr.ui.tracks.ChartSeries(points,axis,renderingConfig));});series.reverse();return series;}
-function buildProcessAllocatedMemoryChartSeries(processMemoryDumps){return buildAllocatedMemoryChartSeries(processMemoryDumps,getProcessMemoryDumpAllocatorSizes);}
-function buildGlobalAllocatedMemoryChartSeries(globalMemoryDumps){return buildAllocatedMemoryChartSeries(globalMemoryDumps,getGlobalMemoryDumpAllocatorSizes);}
-return{buildMemoryLetterDots:buildMemoryLetterDots,buildGlobalUsedMemoryChartSeries:buildGlobalUsedMemoryChartSeries,buildProcessAllocatedMemoryChartSeries:buildProcessAllocatedMemoryChartSeries,buildGlobalAllocatedMemoryChartSeries:buildGlobalAllocatedMemoryChartSeries};});'use strict';tr.exportTo('tr.ui.tracks',function(){var USED_MEMORY_TRACK_HEIGHT=50;var ALLOCATED_MEMORY_TRACK_HEIGHT=50;var GlobalMemoryDumpTrack=tr.ui.b.define('global-memory-dump-track',tr.ui.tracks.ContainerTrack);GlobalMemoryDumpTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.memoryDumps_=undefined;},get memoryDumps(){return this.memoryDumps_;},set memoryDumps(memoryDumps){this.memoryDumps_=memoryDumps;this.updateContents_();},updateContents_:function(){this.clearTracks_();if(!this.memoryDumps_||!this.memoryDumps_.length)
-return;this.appendDumpDotsTrack_();this.appendUsedMemoryTrack_();this.appendAllocatedMemoryTrack_();},appendDumpDotsTrack_:function(){var items=tr.ui.tracks.buildMemoryLetterDots(this.memoryDumps_);if(!items)
-return;var track=new tr.ui.tracks.LetterDotTrack(this.viewport);track.heading='Memory Dumps';track.items=items;this.appendChild(track);},appendUsedMemoryTrack_:function(){var series=tr.ui.tracks.buildGlobalUsedMemoryChartSeries(this.memoryDumps_);if(!series)
-return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Memory per process';track.height=USED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);},appendAllocatedMemoryTrack_:function(){var series=tr.ui.tracks.buildGlobalAllocatedMemoryChartSeries(this.memoryDumps_);if(!series)
-return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Memory per component';track.height=ALLOCATED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);}};return{GlobalMemoryDumpTrack:GlobalMemoryDumpTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){function Highlighter(viewport){if(viewport===undefined){throw new Error('viewport must be provided');}
-this.viewport_=viewport;};Highlighter.prototype={__proto__:Object.prototype,processModel:function(model){throw new Error('processModel implementation missing');},drawHighlight:function(ctx,dt,viewLWorld,viewRWorld,viewHeight){throw new Error('drawHighlight implementation missing');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Highlighter;tr.b.decorateExtensionRegistry(Highlighter,options);return{Highlighter:Highlighter};});'use strict';tr.exportTo('tr.ui.tracks',function(){var CounterTrack=tr.ui.b.define('counter-track',tr.ui.tracks.ChartTrack);CounterTrack.prototype={__proto__:tr.ui.tracks.ChartTrack.prototype,decorate:function(viewport){tr.ui.tracks.ChartTrack.prototype.decorate.call(this,viewport);this.classList.add('counter-track');},get counter(){return this.chart;},set counter(counter){this.heading=counter.name+': ';this.series=CounterTrack.buildChartSeriesFromCounter(counter);this.autoSetAllAxes({expandMax:true});},getModelEventFromItem:function(chartValue){return chartValue;}};CounterTrack.buildChartSeriesFromCounter=function(counter){var numSeries=counter.series.length;var totals=counter.totals;var chartAxis=new tr.ui.tracks.ChartAxis(0,undefined);var chartSeries=counter.series.map(function(series,seriesIndex){var chartPoints=series.samples.map(function(sample,sampleIndex){var total=totals[sampleIndex*numSeries+seriesIndex];return new tr.ui.tracks.ChartPoint(sample,sample.timestamp,total);});var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.AREA,colorId:series.color};return new tr.ui.tracks.ChartSeries(chartPoints,chartAxis,renderingConfig);});chartSeries.reverse();return chartSeries;};return{CounterTrack:CounterTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var startCompare=function(x,y){return x.start-y.start;}
-var FrameTrack=tr.ui.b.define('frame-track',tr.ui.tracks.LetterDotTrack);FrameTrack.prototype={__proto__:tr.ui.tracks.LetterDotTrack.prototype,decorate:function(viewport){tr.ui.tracks.LetterDotTrack.prototype.decorate.call(this,viewport);this.heading='Frames';this.frames_=undefined;this.items=undefined;},get frames(){return this.frames_;},set frames(frames){this.frames_=frames;if(frames===undefined)
-return;this.frames_=this.frames_.slice();this.frames_.sort(startCompare);this.items=this.frames_.map(function(frame){return new FrameDot(frame);});}};function FrameDot(frame){tr.ui.tracks.LetterDot.call(this,frame,'F',frame.colorId,frame.start);}
-FrameDot.prototype={__proto__:tr.ui.tracks.LetterDot.prototype};return{FrameTrack:FrameTrack};});'use strict';tr.exportTo('tr.model',function(){var Settings=tr.b.Settings;function ModelSettings(model){this.model=model;this.objectsByKey_=[];this.nonuniqueKeys_=[];this.buildObjectsByKeyMap_();this.removeNonuniqueKeysFromSettings_();this.ephemeralSettingsByGUID_={};}
-ModelSettings.prototype={buildObjectsByKeyMap_:function(){var objects=[];this.model.iterateAllPersistableObjects(function(o){objects.push(o);});var objectsByKey={};var NONUNIQUE_KEY='nonuniqueKey';for(var i=0;i<objects.length;i++){var object=objects[i];var objectKey=object.getSettingsKey();if(!objectKey)
-continue;if(objectsByKey[objectKey]===undefined){objectsByKey[objectKey]=object;continue;}
-objectsByKey[objectKey]=NONUNIQUE_KEY;}
-var nonuniqueKeys={};tr.b.dictionaryKeys(objectsByKey).forEach(function(objectKey){if(objectsByKey[objectKey]!==NONUNIQUE_KEY)
-return;delete objectsByKey[objectKey];nonuniqueKeys[objectKey]=true;});this.nonuniqueKeys=nonuniqueKeys;this.objectsByKey_=objectsByKey;},removeNonuniqueKeysFromSettings_:function(){var settings=Settings.get('trace_model_settings',{});var settingsChanged=false;tr.b.dictionaryKeys(settings).forEach(function(objectKey){if(!this.nonuniqueKeys[objectKey])
-return;settingsChanged=true;delete settings[objectKey];},this);if(settingsChanged)
-Settings.set('trace_model_settings',settings);},hasUniqueSettingKey:function(object){var objectKey=object.getSettingsKey();if(!objectKey)
-return false;return this.objectsByKey_[objectKey]!==undefined;},getSettingFor:function(object,objectLevelKey,defaultValue){var objectKey=object.getSettingsKey();if(!objectKey||!this.objectsByKey_[objectKey]){var settings=this.getEphemeralSettingsFor_(object);var ephemeralValue=settings[objectLevelKey];if(ephemeralValue!==undefined)
-return ephemeralValue;return defaultValue;}
-var settings=Settings.get('trace_model_settings',{});if(!settings[objectKey])
-settings[objectKey]={};var value=settings[objectKey][objectLevelKey];if(value!==undefined)
-return value;return defaultValue;},setSettingFor:function(object,objectLevelKey,value){var objectKey=object.getSettingsKey();if(!objectKey||!this.objectsByKey_[objectKey]){this.getEphemeralSettingsFor_(object)[objectLevelKey]=value;return;}
-var settings=Settings.get('trace_model_settings',{});if(!settings[objectKey])
-settings[objectKey]={};if(settings[objectKey][objectLevelKey]===value)
-return;settings[objectKey][objectLevelKey]=value;Settings.set('trace_model_settings',settings);},getEphemeralSettingsFor_:function(object){if(object.guid===undefined)
-throw new Error('Only objects with GUIDs can be persisted');if(this.ephemeralSettingsByGUID_[object.guid]===undefined)
-this.ephemeralSettingsByGUID_[object.guid]={};return this.ephemeralSettingsByGUID_[object.guid];}};return{ModelSettings:ModelSettings};});'use strict';tr.exportTo('tr.ui.tracks',function(){var MultiRowTrack=tr.ui.b.define('multi-row-track',tr.ui.tracks.ContainerTrack);MultiRowTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.tooltip_='';this.heading_='';this.groupingSource_=undefined;this.itemsToGroup_=undefined;this.defaultToCollapsedWhenSubRowCountMoreThan=1;this.itemsGroupedOnLastUpdateContents_=undefined;this.currentSubRows_=[];this.expanded_=true;},get itemsToGroup(){return this.itemsToGroup_;},setItemsToGroup:function(itemsToGroup,opt_groupingSource){this.itemsToGroup_=itemsToGroup;this.groupingSource_=opt_groupingSource;this.updateContents_();this.updateExpandedStateFromGroupingSource_();},get heading(){return this.heading_;},set heading(h){this.heading_=h;this.updateContents_();},get tooltip(){return this.tooltip_;},set tooltip(t){this.tooltip_=t;this.updateContents_();},get subRows(){return this.currentSubRows_;},get hasVisibleContent(){return this.children.length>0;},get expanded(){return this.expanded_;},set expanded(expanded){if(this.expanded_==expanded)
-return;this.expanded_=expanded;this.expandedStateChanged_();},onHeadingClicked_:function(e){if(this.subRows.length<=1)
-return;this.expanded=!this.expanded;if(this.groupingSource_){var modelSettings=new tr.model.ModelSettings(this.groupingSource_.model);modelSettings.setSettingFor(this.groupingSource_,'expanded',this.expanded);}
-e.stopPropagation();},updateExpandedStateFromGroupingSource_:function(){if(this.groupingSource_){var numSubRows=this.subRows.length;var modelSettings=new tr.model.ModelSettings(this.groupingSource_.model);if(numSubRows>1){var defaultExpanded;if(numSubRows>this.defaultToCollapsedWhenSubRowCountMoreThan){defaultExpanded=false;}else{defaultExpanded=true;}
-this.expanded=modelSettings.getSettingFor(this.groupingSource_,'expanded',defaultExpanded);}else{this.expanded=undefined;}}},expandedStateChanged_:function(){var minH=Math.max(2,Math.ceil(18/this.children.length));var h=(this.expanded_?18:minH)+'px';for(var i=0;i<this.children.length;i++){this.children[i].height=h;if(i===0)
-this.children[i].arrowVisible=true;this.children[i].expanded=this.expanded;}
-if(this.children.length===1){this.children[0].expanded=true;this.children[0].arrowVisible=false;}},updateContents_:function(){tr.ui.tracks.ContainerTrack.prototype.updateContents_.call(this);if(!this.itemsToGroup_){this.updateHeadingAndTooltip_();this.currentSubRows_=[];return;}
-if(this.areArrayContentsSame_(this.itemsGroupedOnLastUpdateContents_,this.itemsToGroup_)){this.updateHeadingAndTooltip_();return;}
-this.itemsGroupedOnLastUpdateContents_=this.itemsToGroup_;this.detach();if(!this.itemsToGroup_.length){this.currentSubRows_=[];return;}
-var subRows=this.buildSubRows_(this.itemsToGroup_);this.currentSubRows_=subRows;for(var srI=0;srI<subRows.length;srI++){var subRow=subRows[srI];if(!subRow.length)
-continue;var track=this.addSubTrack_(subRow);track.addEventListener('heading-clicked',this.onHeadingClicked_.bind(this));}
-this.updateHeadingAndTooltip_();this.expandedStateChanged_();},updateHeadingAndTooltip_:function(){if(!this.firstChild)
-return;this.firstChild.heading=this.heading_;this.firstChild.tooltip=this.tooltip_;},buildSubRows_:function(itemsToGroup){throw new Error('Not implemented');},addSubTrack_:function(subRowItems){throw new Error('Not implemented');},areArrayContentsSame_:function(a,b){if(!a||!b)
-return false;if(!a.length||!b.length)
-return false;if(a.length!=b.length)
-return false;for(var i=0;i<a.length;++i){if(a[i]!=b[i])
-return false;}
-return true;}};return{MultiRowTrack:MultiRowTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SelectionState=tr.model.SelectionState;var EventPresenter=tr.ui.b.EventPresenter;var ObjectInstanceTrack=tr.ui.b.define('object-instance-track',tr.ui.tracks.Track);ObjectInstanceTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('object-instance-track');this.objectInstances_=[];this.objectSnapshots_=[];this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},get objectInstances(){return this.objectInstances_;},set objectInstances(objectInstances){if(!objectInstances||objectInstances.length==0){this.heading='';this.objectInstances_=[];this.objectSnapshots_=[];return;}
-this.heading=objectInstances[0].typeName;this.objectInstances_=objectInstances;this.objectSnapshots_=[];this.objectInstances_.forEach(function(instance){this.objectSnapshots_.push.apply(this.objectSnapshots_,instance.snapshots);},this);this.objectSnapshots_.sort(function(a,b){return a.ts-b.ts;});},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;},get snapshotRadiusView(){return 7*(window.devicePixelRatio||1);},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawLetterDots_(viewLWorld,viewRWorld);break;}},drawLetterDots_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var height=bounds.height*pixelRatio;var halfHeight=height*0.5;var twoPi=Math.PI*2;var dt=this.viewport.currentDisplayTransform;var snapshotRadiusView=this.snapshotRadiusView;var snapshotRadiusWorld=dt.xViewVectorToWorld(height);var loI;ctx.save();dt.applyTransformToCanvas(ctx);var objectInstances=this.objectInstances_;var loI=tr.b.findLowIndexInSortedArray(objectInstances,function(instance){return instance.deletionTs;},viewLWorld);ctx.strokeStyle='rgb(0,0,0)';for(var i=loI;i<objectInstances.length;++i){var instance=objectInstances[i];var x=instance.creationTs;if(x>viewRWorld)
-break;var right=instance.deletionTs==Number.MAX_VALUE?viewRWorld:instance.deletionTs;ctx.fillStyle=EventPresenter.getObjectInstanceColor(instance);ctx.fillRect(x,pixelRatio,right-x,height-2*pixelRatio);}
-ctx.restore();var objectSnapshots=this.objectSnapshots_;loI=tr.b.findLowIndexInSortedArray(objectSnapshots,function(snapshot){return snapshot.ts+snapshotRadiusWorld;},viewLWorld);for(var i=loI;i<objectSnapshots.length;++i){var snapshot=objectSnapshots[i];var x=snapshot.ts;if(x-snapshotRadiusWorld>viewRWorld)
-break;var xView=dt.xWorldToView(x);ctx.fillStyle=EventPresenter.getObjectSnapshotColor(snapshot);ctx.beginPath();ctx.arc(xView,halfHeight,snapshotRadiusView,0,twoPi);ctx.fill();if(snapshot.selected){ctx.lineWidth=5;ctx.strokeStyle='rgb(100,100,0)';ctx.stroke();ctx.beginPath();ctx.arc(xView,halfHeight,snapshotRadiusView-1,0,twoPi);ctx.lineWidth=2;ctx.strokeStyle='rgb(255,255,0)';ctx.stroke();}else{ctx.lineWidth=1;ctx.strokeStyle='rgb(0,0,0)';ctx.stroke();}}
-ctx.lineWidth=1;var selectionState=SelectionState.NONE;if(objectInstances.length&&objectInstances[0].selectionState===SelectionState.DIMMED){selectionState=SelectionState.DIMMED;}
-if(selectionState===SelectionState.DIMMED){var width=bounds.width*pixelRatio;ctx.fillStyle='rgba(255,255,255,0.5)';ctx.fillRect(0,0,width,height);ctx.restore();}},addEventsToTrackMap:function(eventToTrackMap){if(this.objectInstance_!==undefined){this.objectInstance_.forEach(function(obj){eventToTrackMap.addEvent(obj,this);},this);}
-if(this.objectSnapshots_!==undefined){this.objectSnapshots_.forEach(function(obj){eventToTrackMap.addEvent(obj,this);},this);}},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){var foundSnapshot=false;function onSnapshot(snapshot){selection.push(snapshot);foundSnapshot=true;}
-var snapshotRadiusView=this.snapshotRadiusView;var snapshotRadiusWorld=viewPixWidthWorld*snapshotRadiusView;tr.b.iterateOverIntersectingIntervals(this.objectSnapshots_,function(x){return x.ts-snapshotRadiusWorld;},function(x){return 2*snapshotRadiusWorld;},loWX,hiWX,onSnapshot);if(foundSnapshot)
-return;tr.b.iterateOverIntersectingIntervals(this.objectInstances_,function(x){return x.creationTs;},function(x){return x.deletionTs-x.creationTs;},loWX,hiWX,selection.push.bind(selection));},addEventNearToProvidedEventToSelection:function(event,offset,selection){var events;if(event instanceof tr.model.ObjectSnapshot)
-events=this.objectSnapshots_;else if(event instanceof tr.model.ObjectInstance)
-events=this.objectInstances_;else
-throw new Error('Unrecognized event');var index=events.indexOf(event);var newIndex=index+offset;if(newIndex>=0&&newIndex<events.length){selection.push(events[newIndex]);return true;}
-return false;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){var snapshot=tr.b.findClosestElementInSortedArray(this.objectSnapshots_,function(x){return x.ts;},worldX,worldMaxDist);if(!snapshot)
-return;selection.push(snapshot);}};var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);tr.b.decorateExtensionRegistry(ObjectInstanceTrack,options);return{ObjectInstanceTrack:ObjectInstanceTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ObjectInstanceGroupTrack=tr.ui.b.define('object-instance-group-track',tr.ui.tracks.MultiRowTrack);ObjectInstanceGroupTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.classList.add('object-instance-group-track');this.objectInstances_=undefined;},get objectInstances(){return this.itemsToGroup;},set objectInstances(objectInstances){this.setItemsToGroup(objectInstances);},addSubTrack_:function(objectInstances){var hasMultipleRows=this.subRows.length>1;var track=new tr.ui.tracks.ObjectInstanceTrack(this.viewport);track.objectInstances=objectInstances;this.appendChild(track);return track;},buildSubRows_:function(objectInstances){objectInstances.sort(function(x,y){return x.creationTs-y.creationTs;});var subRows=[];for(var i=0;i<objectInstances.length;i++){var objectInstance=objectInstances[i];var found=false;for(var j=0;j<subRows.length;j++){var subRow=subRows[j];var lastItemInSubRow=subRow[subRow.length-1];if(objectInstance.creationTs>=lastItemInSubRow.deletionTs){found=true;subRow.push(objectInstance);break;}}
-if(!found){var subRow=[objectInstance];subRows.push(subRow);}}
-return subRows;},updateHeadingAndTooltip_:function(){}};return{ObjectInstanceGroupTrack:ObjectInstanceGroupTrack};});'use strict';tr.exportTo('tr.ui.b',function(){function FastRectRenderer(ctx,minRectSize,maxMergeDist,pallette){this.ctx_=ctx;this.minRectSize_=minRectSize;this.maxMergeDist_=maxMergeDist;this.pallette_=pallette;}
-FastRectRenderer.prototype={y_:0,h_:0,merging_:false,mergeStartX_:0,mergeCurRight_:0,mergedColorId_:0,mergedAlpha_:0,setYandH:function(y,h){if(this.y_===y&&this.h_===h)
-return;this.flush();this.y_=y;this.h_=h;},fillRect:function(x,w,colorId,alpha){var r=x+w;if(w<this.minRectSize_){if(r-this.mergeStartX_>this.maxMergeDist_)
-this.flush();if(!this.merging_){this.merging_=true;this.mergeStartX_=x;this.mergeCurRight_=r;this.mergedColorId_=colorId;this.mergedAlpha_=alpha;}else{this.mergeCurRight_=r;if(this.mergedAlpha_<alpha||(this.mergedAlpha_===alpha&&this.mergedColorId_<colorId)){this.mergedAlpha_=alpha;this.mergedColorId_=colorId;}}}else{if(this.merging_)
-this.flush();this.ctx_.fillStyle=this.pallette_[colorId];this.ctx_.globalAlpha=alpha;this.ctx_.fillRect(x,this.y_,w,this.h_);}},flush:function(){if(this.merging_){this.ctx_.fillStyle=this.pallette_[this.mergedColorId_];this.ctx_.globalAlpha=this.mergedAlpha_;this.ctx_.fillRect(this.mergeStartX_,this.y_,this.mergeCurRight_-this.mergeStartX_,this.h_);this.merging_=false;}}};return{FastRectRenderer:FastRectRenderer};});'use strict';tr.exportTo('tr.ui.tracks',function(){var RectTrack=tr.ui.b.define('rect-track',tr.ui.tracks.Track);RectTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('rect-track');this.asyncStyle_=false;this.rects_=null;this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},set selectionGenerator(generator){this.heading_.selectionGenerator=generator;},set expanded(expanded){this.heading_.expanded=!!expanded;},set arrowVisible(arrowVisible){this.heading_.arrowVisible=!!arrowVisible;},get expanded(){return this.heading_.expanded;},get asyncStyle(){return this.asyncStyle_;},set asyncStyle(v){this.asyncStyle_=!!v;},get rects(){return this.rects_;},set rects(rects){this.rects_=rects||[];this.invalidateDrawingContainer();},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;this.invalidateDrawingContainer();},get hasVisibleContent(){return this.rects_.length>0;},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawRects_(viewLWorld,viewRWorld);break;}},drawRects_:function(viewLWorld,viewRWorld){var ctx=this.context();ctx.save();var bounds=this.getBoundingClientRect();tr.ui.b.drawSlices(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,bounds.height,this.rects_,this.asyncStyle_);ctx.restore();if(bounds.height<=6)
-return;var fontSize,yOffset;if(bounds.height<15){fontSize=6;yOffset=1.0;}else{fontSize=10;yOffset=2.5;}
-tr.ui.b.drawLabels(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,this.rects_,this.asyncStyle_,fontSize,yOffset);},addEventsToTrackMap:function(eventToTrackMap){if(this.rects_===undefined||this.rects_===null)
-return;this.rects_.forEach(function(rect){rect.addToTrackMap(eventToTrackMap,this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onRect(rect){rect.addToSelection(selection);}
-onRect=onRect.bind(this);var instantEventWidth=2*viewPixWidthWorld;tr.b.iterateOverIntersectingIntervals(this.rects_,function(x){return x.start;},function(x){return x.duration==0?x.duration+instantEventWidth:x.duration;},loWX,hiWX,onRect);},addEventNearToProvidedEventToSelection:function(event,offset,selection){var index=tr.b.findFirstIndexInArray(this.rects_,function(rect){return rect.modelItem===event;});if(index===-1)
-return false;var newIndex=index+offset;if(newIndex<0||newIndex>=this.rects_.length)
-return false;this.rects_[newIndex].addToSelection(selection);return true;},addAllEventsMatchingFilterToSelection:function(filter,selection){for(var i=0;i<this.rects_.length;++i){var modelItem=this.rects_[i].modelItem;if(!modelItem)
-continue;if(filter.matchSlice(modelItem))
-selection.push(modelItem);}},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){var rect=tr.b.findClosestIntervalInSortedIntervals(this.rects_,function(x){return x.start;},function(x){return x.end;},worldX,worldMaxDist);if(!rect)
-return;rect.addToSelection(selection);}};function Rect(modelItem,title,colorId,start,duration){tr.model.ProxySelectableItem.call(this,modelItem);this.title=title;this.colorId=colorId;this.start=start;this.duration=duration;this.end=start+duration;};Rect.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{RectTrack:RectTrack,Rect:Rect};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ColorScheme=tr.b.ColorScheme;var ProcessSummaryTrack=tr.ui.b.define('process-summary-track',tr.ui.tracks.RectTrack);ProcessSummaryTrack.buildRectsFromProcess=function(process){if(!process)
-return[];var ops=[];var pushOp=function(isStart,time,slice){ops.push({isStart:isStart,time:time,slice:slice});};for(var tid in process.threads){var sliceGroup=process.threads[tid].sliceGroup;sliceGroup.topLevelSlices.forEach(function(slice){pushOp(true,slice.start,undefined);pushOp(false,slice.end,undefined);});sliceGroup.slices.forEach(function(slice){if(slice.important){pushOp(true,slice.start,slice);pushOp(false,slice.end,slice);}});}
-ops.sort(function(a,b){return a.time-b.time;});var rects=[];var genericColorId=ColorScheme.getColorIdForReservedName('generic_work');var pushRect=function(start,end,slice){rects.push(new tr.ui.tracks.Rect(slice,slice?slice.title:'',slice?slice.colorId:genericColorId,start,end-start));}
-var depth=0;var currentSlice=undefined;var lastStart=undefined;ops.forEach(function(op){depth+=op.isStart?1:-1;if(currentSlice){if(!op.isStart&&op.slice==currentSlice){pushRect(lastStart,op.time,currentSlice);lastStart=depth>=1?op.time:undefined;currentSlice=undefined;}}else{if(op.isStart){if(depth==1){lastStart=op.time;currentSlice=op.slice;}else if(op.slice){if(op.time!=lastStart){pushRect(lastStart,op.time,undefined);lastStart=op.time;}
-currentSlice=op.slice;}}else{if(depth==0){pushRect(lastStart,op.time,undefined);lastStart=undefined;}}}});return rects;};ProcessSummaryTrack.prototype={__proto__:tr.ui.tracks.RectTrack.prototype,decorate:function(viewport){tr.ui.tracks.RectTrack.prototype.decorate.call(this,viewport);},get process(){return this.process_;},set process(process){this.process_=process;this.rects=ProcessSummaryTrack.buildRectsFromProcess(process);}};return{ProcessSummaryTrack:ProcessSummaryTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SliceTrack=tr.ui.b.define('slice-track',tr.ui.tracks.RectTrack);SliceTrack.prototype={__proto__:tr.ui.tracks.RectTrack.prototype,decorate:function(viewport){tr.ui.tracks.RectTrack.prototype.decorate.call(this,viewport);},get slices(){return this.rects;},set slices(slices){this.rects=slices;}};return{SliceTrack:SliceTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var AsyncSliceGroupTrack=tr.ui.b.define('async-slice-group-track',tr.ui.tracks.MultiRowTrack);AsyncSliceGroupTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.classList.add('async-slice-group-track');this.group_=undefined;},addSubTrack_:function(slices){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;this.appendChild(track);track.asyncStyle=true;return track;},get group(){return this.group_;},set group(group){this.group_=group;this.setItemsToGroup(this.group_.slices,this.group_);},get eventContainer(){return this.group;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.MultiRowTrack.prototype.addContainersToTrackMap.apply(this,arguments);containerToTrackMap.addContainer(this.group,this);},buildSubRows_:function(slices,opt_skipSort){if(!opt_skipSort){slices.sort(function(x,y){return x.start-y.start;});}
-var findLevel=function(sliceToPut,rows,n){if(n>=rows.length)
-return true;var subRow=rows[n];var lastSliceInSubRow=subRow[subRow.length-1];if(sliceToPut.start>=lastSliceInSubRow.end){if(sliceToPut.subSlices===undefined||sliceToPut.subSlices.length===0){return true;}
-for(var i=0;i<sliceToPut.subSlices.length;i++){if(!findLevel(sliceToPut.subSlices[i],rows,n+1))
-return false;}
-return true;}
-return false;}
-var subRows=[];for(var i=0;i<slices.length;i++){var slice=slices[i];var found=false;var index=subRows.length;for(var j=0;j<subRows.length;j++){if(findLevel(slice,subRows,j)){found=true;index=j;break;}}
-if(!found)
-subRows.push([]);subRows[index].push(slice);var fitSubSlicesRecursively=function(subSlices,level,rows){if(subSlices===undefined||subSlices.length===0)
-return;if(level===rows.length)
-rows.push([]);for(var h=0;h<subSlices.length;h++){rows[level].push(subSlices[h]);fitSubSlicesRecursively(subSlices[h].subSlices,level+1,rows);}}
-fitSubSlicesRecursively(slice.subSlices,index+1,subRows);}
-return subRows;}};return{AsyncSliceGroupTrack:AsyncSliceGroupTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SampleTrack=tr.ui.b.define('sample-track',tr.ui.tracks.RectTrack);SampleTrack.prototype={__proto__:tr.ui.tracks.RectTrack.prototype,decorate:function(viewport){tr.ui.tracks.RectTrack.prototype.decorate.call(this,viewport);},get samples(){return this.rects;},set samples(samples){this.rects=samples;}};return{SampleTrack:SampleTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SliceGroupTrack=tr.ui.b.define('slice-group-track',tr.ui.tracks.MultiRowTrack);SliceGroupTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.classList.add('slice-group-track');this.group_=undefined;this.defaultToCollapsedWhenSubRowCountMoreThan=100;},addSubTrack_:function(slices){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;this.appendChild(track);return track;},get group(){return this.group_;},set group(group){this.group_=group;this.setItemsToGroup(this.group_.slices,this.group_);},get eventContainer(){return this.group;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.MultiRowTrack.prototype.addContainersToTrackMap.apply(this,arguments);containerToTrackMap.addContainer(this.group,this);},buildSubRows_:function(slices){var precisionUnit=this.group.model.intrinsicTimeUnit;if(!slices.length)
-return[];var ops=[];for(var i=0;i<slices.length;i++){if(slices[i].subSlices)
-slices[i].subSlices.splice(0,slices[i].subSlices.length);ops.push(i);}
-ops.sort(function(ix,iy){var x=slices[ix];var y=slices[iy];if(x.start!=y.start)
-return x.start-y.start;return ix-iy;});var subRows=[[]];this.badSlices_=[];for(var i=0;i<ops.length;i++){var op=ops[i];var slice=slices[op];var inserted=false;for(var j=subRows.length-1;j>=0;j--){if(subRows[j].length==0)
-continue;var insertedSlice=subRows[j][subRows[j].length-1];if(slice.start<insertedSlice.start){this.badSlices_.push(slice);inserted=true;}
-if(insertedSlice.bounds(slice,precisionUnit)){while(subRows.length<=j+1)
-subRows.push([]);subRows[j+1].push(slice);if(insertedSlice.subSlices)
-insertedSlice.subSlices.push(slice);inserted=true;break;}}
-if(inserted)
-continue;subRows[0].push(slice);}
-return subRows;}};return{SliceGroupTrack:SliceGroupTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ThreadTrack=tr.ui.b.define('thread-track',tr.ui.tracks.ContainerTrack);ThreadTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('thread-track');},get thread(){return this.thread_;},set thread(thread){this.thread_=thread;this.updateContents_();},get hasVisibleContent(){return this.tracks_.length>0;},get eventContainer(){return this.thread;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.ContainerTrack.prototype.addContainersToTrackMap.apply(this,arguments);containerToTrackMap.addContainer(this.thread,this);},updateContents_:function(){this.detach();if(!this.thread_)
-return;this.heading=this.thread_.userFriendlyName+': ';this.tooltip=this.thread_.userFriendlyDetails;if(this.thread_.asyncSliceGroup.length)
-this.appendAsyncSliceTracks_();this.appendThreadSamplesTracks_();if(this.thread_.timeSlices){var timeSlicesTrack=new tr.ui.tracks.SliceTrack(this.viewport);timeSlicesTrack.heading='';timeSlicesTrack.height=tr.ui.b.THIN_SLICE_HEIGHT+'px';timeSlicesTrack.slices=this.thread_.timeSlices;if(timeSlicesTrack.hasVisibleContent)
-this.appendChild(timeSlicesTrack);}
-if(this.thread_.sliceGroup.length){var track=new tr.ui.tracks.SliceGroupTrack(this.viewport);track.heading=this.thread_.userFriendlyName;track.tooltip=this.thread_.userFriendlyDetails;track.group=this.thread_.sliceGroup;if(track.hasVisibleContent)
-this.appendChild(track);}},appendAsyncSliceTracks_:function(){var subGroups=this.thread_.asyncSliceGroup.viewSubGroups;subGroups.forEach(function(subGroup){var asyncTrack=new tr.ui.tracks.AsyncSliceGroupTrack(this.viewport);var title=subGroup.slices[0].viewSubGroupTitle;asyncTrack.group=subGroup;asyncTrack.heading=title;if(asyncTrack.hasVisibleContent)
-this.appendChild(asyncTrack);},this);},appendThreadSamplesTracks_:function(){var threadSamples=this.thread_.samples;if(threadSamples===undefined||threadSamples.length===0)
-return;var samplesByTitle={};threadSamples.forEach(function(sample){if(samplesByTitle[sample.title]===undefined)
-samplesByTitle[sample.title]=[];samplesByTitle[sample.title].push(sample);});var sampleTitles=tr.b.dictionaryKeys(samplesByTitle);sampleTitles.sort();sampleTitles.forEach(function(sampleTitle){var samples=samplesByTitle[sampleTitle];var samplesTrack=new tr.ui.tracks.SampleTrack(this.viewport);samplesTrack.group=this.thread_;samplesTrack.samples=samples;samplesTrack.heading=this.thread_.userFriendlyName+': '+
-sampleTitle;samplesTrack.tooltip=this.thread_.userFriendlyDetails;samplesTrack.selectionGenerator=function(){var selection=new tr.model.EventSet();for(var i=0;i<samplesTrack.samples.length;i++){selection.push(samplesTrack.samples[i]);}
-return selection;};this.appendChild(samplesTrack);},this);},collapsedDidChange:function(collapsed){if(collapsed){var h=parseInt(this.tracks[0].height);for(var i=0;i<this.tracks.length;++i){if(h>2){this.tracks[i].height=Math.floor(h)+'px';}else{this.tracks[i].style.display='none';}
-h=h*0.5;}}else{for(var i=0;i<this.tracks.length;++i){this.tracks[i].height=this.tracks[0].height;this.tracks[i].style.display='';}}}};return{ThreadTrack:ThreadTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ObjectSnapshotView=tr.ui.analysis.ObjectSnapshotView;var ObjectInstanceView=tr.ui.analysis.ObjectInstanceView;var SpacingTrack=tr.ui.tracks.SpacingTrack;var ProcessTrackBase=tr.ui.b.define('process-track-base',tr.ui.tracks.ContainerTrack);ProcessTrackBase.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.processBase_=undefined;this.classList.add('process-track-base');this.classList.add('expanded');this.processNameEl_=tr.ui.b.createSpan();this.processNameEl_.classList.add('process-track-name');this.headerEl_=tr.ui.b.createDiv({className:'process-track-header'});this.headerEl_.appendChild(this.processNameEl_);this.headerEl_.addEventListener('click',this.onHeaderClick_.bind(this));this.appendChild(this.headerEl_);},get processBase(){return this.processBase_;},set processBase(processBase){this.processBase_=processBase;if(this.processBase_){var modelSettings=new tr.model.ModelSettings(this.processBase_.model);var defaultValue=this.processBase_.important;this.expanded=modelSettings.getSettingFor(this.processBase_,'expanded',defaultValue);}
-this.updateContents_();},get expanded(){return this.classList.contains('expanded');},set expanded(expanded){expanded=!!expanded;if(this.expanded===expanded)
-return;this.classList.toggle('expanded');this.viewport_.dispatchChangeEvent();if(!this.processBase_)
-return;var modelSettings=new tr.model.ModelSettings(this.processBase_.model);modelSettings.setSettingFor(this.processBase_,'expanded',expanded);this.updateContents_();this.viewport.rebuildEventToTrackMap();this.viewport.rebuildContainerToTrackMap();},get hasVisibleContent(){if(this.expanded)
-return this.children.length>1;return true;},onHeaderClick_:function(e){e.stopPropagation();e.preventDefault();this.expanded=!this.expanded;},updateContents_:function(){this.clearTracks_();if(!this.processBase_)
-return;this.processNameEl_.textContent=this.processBase_.userFriendlyName;this.headerEl_.title=this.processBase_.userFriendlyDetails;this.willAppendTracks_();if(this.expanded){this.appendMemoryDumpTrack_();this.appendObjectInstanceTracks_();this.appendCounterTracks_();this.appendFrameTrack_();this.appendThreadTracks_();}else{this.appendSummaryTrack_();}
-this.didAppendTracks_();},addEventsToTrackMap:function(eventToTrackMap){this.tracks_.forEach(function(track){track.addEventsToTrackMap(eventToTrackMap);});},willAppendTracks_:function(){},didAppendTracks_:function(){},appendMemoryDumpTrack_:function(){},appendSummaryTrack_:function(){var track=new tr.ui.tracks.ProcessSummaryTrack(this.viewport);track.process=this.process;if(!track.hasVisibleContent)
-return;this.appendChild(track);},appendFrameTrack_:function(){var frames=this.process?this.process.frames:undefined;if(!frames||!frames.length)
-return;var track=new tr.ui.tracks.FrameTrack(this.viewport);track.frames=frames;this.appendChild(track);this.backgroundProvider=track;},appendObjectInstanceTracks_:function(){var instancesByTypeName=this.processBase_.objects.getAllInstancesByTypeName();var instanceTypeNames=tr.b.dictionaryKeys(instancesByTypeName);instanceTypeNames.sort();var didAppendAtLeastOneTrack=false;instanceTypeNames.forEach(function(typeName){var allInstances=instancesByTypeName[typeName];var instanceViewInfo=ObjectInstanceView.getTypeInfo(undefined,typeName);var snapshotViewInfo=ObjectSnapshotView.getTypeInfo(undefined,typeName);if(instanceViewInfo&&!instanceViewInfo.metadata.showInTrackView)
-instanceViewInfo=undefined;if(snapshotViewInfo&&!snapshotViewInfo.metadata.showInTrackView)
-snapshotViewInfo=undefined;var hasViewInfo=instanceViewInfo||snapshotViewInfo;var visibleInstances=[];for(var i=0;i<allInstances.length;i++){var instance=allInstances[i];if(instance.snapshots.length===0)
-continue;if(instance.hasImplicitSnapshots&&!hasViewInfo)
-continue;visibleInstances.push(instance);}
-if(visibleInstances.length===0)
-return;var trackConstructor=tr.ui.tracks.ObjectInstanceTrack.getConstructor(undefined,typeName);if(!trackConstructor){var snapshotViewInfo=ObjectSnapshotView.getTypeInfo(undefined,typeName);if(snapshotViewInfo&&snapshotViewInfo.metadata.showInstances){trackConstructor=tr.ui.tracks.ObjectInstanceGroupTrack;}else{trackConstructor=tr.ui.tracks.ObjectInstanceTrack;}}
-var track=new trackConstructor(this.viewport);track.objectInstances=visibleInstances;this.appendChild(track);didAppendAtLeastOneTrack=true;},this);if(didAppendAtLeastOneTrack)
-this.appendChild(new SpacingTrack(this.viewport));},appendCounterTracks_:function(){var counters=tr.b.dictionaryValues(this.processBase.counters);counters.sort(tr.model.Counter.compare);counters.forEach(function(counter){var track=new tr.ui.tracks.CounterTrack(this.viewport);track.counter=counter;this.appendChild(track);this.appendChild(new SpacingTrack(this.viewport));}.bind(this));},appendThreadTracks_:function(){var threads=tr.b.dictionaryValues(this.processBase.threads);threads.sort(tr.model.Thread.compare);threads.forEach(function(thread){var track=new tr.ui.tracks.ThreadTrack(this.viewport);track.thread=thread;if(!track.hasVisibleContent)
-return;this.appendChild(track);this.appendChild(new SpacingTrack(this.viewport));}.bind(this));}};return{ProcessTrackBase:ProcessTrackBase};});'use strict';tr.exportTo('tr.ui.tracks',function(){var CpuTrack=tr.ui.b.define('cpu-track',tr.ui.tracks.ContainerTrack);CpuTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('cpu-track');this.detailedMode_=true;},get cpu(){return this.cpu_;},set cpu(cpu){this.cpu_=cpu;this.updateContents_();},get detailedMode(){return this.detailedMode_;},set detailedMode(detailedMode){this.detailedMode_=detailedMode;this.updateContents_();},get tooltip(){return this.tooltip_;},set tooltip(value){this.tooltip_=value;this.updateContents_();},get hasVisibleContent(){if(this.cpu_===undefined)
-return false;var cpu=this.cpu_;if(cpu.slices.length)
-return true;if(cpu.samples&&cpu.samples.length)
-return true;if(tr.b.dictionaryLength(cpu.counters)>0)
-return true;return false;},updateContents_:function(){this.detach();if(!this.cpu_)
-return;var slices=this.cpu_.slices;if(slices.length){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;track.heading=this.cpu_.userFriendlyName+':';this.appendChild(track);}
-if(this.detailedMode_){this.appendSamplesTracks_();for(var counterName in this.cpu_.counters){var counter=this.cpu_.counters[counterName];track=new tr.ui.tracks.CounterTrack(this.viewport);track.heading=this.cpu_.userFriendlyName+' '+
-counter.name+':';track.counter=counter;this.appendChild(track);}}},appendSamplesTracks_:function(){var samples=this.cpu_.samples;if(samples===undefined||samples.length===0)
-return;var samplesByTitle={};samples.forEach(function(sample){if(samplesByTitle[sample.title]===undefined)
-samplesByTitle[sample.title]=[];samplesByTitle[sample.title].push(sample);});var sampleTitles=tr.b.dictionaryKeys(samplesByTitle);sampleTitles.sort();sampleTitles.forEach(function(sampleTitle){var samples=samplesByTitle[sampleTitle];var samplesTrack=new tr.ui.tracks.SliceTrack(this.viewport);samplesTrack.group=this.cpu_;samplesTrack.slices=samples;samplesTrack.heading=this.cpu_.userFriendlyName+': '+
-sampleTitle;samplesTrack.tooltip=this.cpu_.userFriendlyDetails;samplesTrack.selectionGenerator=function(){var selection=new tr.model.EventSet();for(var i=0;i<samplesTrack.slices.length;i++){selection.push(samplesTrack.slices[i]);}
-return selection;};this.appendChild(samplesTrack);},this);}};return{CpuTrack:CpuTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var Cpu=tr.model.Cpu;var CpuTrack=tr.ui.tracks.cpu_track;var ProcessTrackBase=tr.ui.tracks.ProcessTrackBase;var SpacingTrack=tr.ui.tracks.SpacingTrack;var KernelTrack=tr.ui.b.define('kernel-track',ProcessTrackBase);KernelTrack.prototype={__proto__:ProcessTrackBase.prototype,decorate:function(viewport){ProcessTrackBase.prototype.decorate.call(this,viewport);},set kernel(kernel){this.processBase=kernel;},get kernel(){return this.processBase;},get eventContainer(){return this.kernel;},get hasVisibleContent(){return this.children.length>1;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.ProcessTrackBase.prototype.addContainersToTrackMap.call(this,containerToTrackMap);containerToTrackMap.addContainer(this.kernel,this);},willAppendTracks_:function(){var cpus=tr.b.dictionaryValues(this.kernel.cpus);cpus.sort(tr.model.Cpu.compare);var didAppendAtLeastOneTrack=false;for(var i=0;i<cpus.length;++i){var cpu=cpus[i];var track=new tr.ui.tracks.CpuTrack(this.viewport);track.detailedMode=this.expanded;track.cpu=cpu;if(!track.hasVisibleContent)
-continue;this.appendChild(track);didAppendAtLeastOneTrack=true;}
-if(didAppendAtLeastOneTrack)
-this.appendChild(new SpacingTrack(this.viewport));}};return{KernelTrack:KernelTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var InteractionTrack=tr.ui.b.define('interaction-track',tr.ui.tracks.MultiRowTrack);InteractionTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.heading='Interactions';this.subRows_=[];},set model(model){this.setItemsToGroup(model.interactionRecords,{guid:tr.b.GUID.allocate(),model:model,getSettingsKey:function(){return undefined;}});},buildSubRows_:function(slices){if(this.subRows_.length)
-return this.subRows_;this.subRows_.push.apply(this.subRows_,tr.ui.tracks.AsyncSliceGroupTrack.prototype.buildSubRows_.call({},slices,true));return this.subRows_;},addSubTrack_:function(slices){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;this.appendChild(track);return track;}};return{InteractionTrack:InteractionTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ALLOCATED_MEMORY_TRACK_HEIGHT=50;var ProcessMemoryDumpTrack=tr.ui.b.define('process-memory-dump-track',tr.ui.tracks.ContainerTrack);ProcessMemoryDumpTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.memoryDumps_=undefined;},get memoryDumps(){return this.memoryDumps_;},set memoryDumps(memoryDumps){this.memoryDumps_=memoryDumps;this.updateContents_();},updateContents_:function(){this.clearTracks_();if(!this.memoryDumps_||!this.memoryDumps_.length)
-return;this.appendAllocatedMemoryTrack_();},appendAllocatedMemoryTrack_:function(){var series=tr.ui.tracks.buildProcessAllocatedMemoryChartSeries(this.memoryDumps_);if(!series)
-return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Memory per component';track.height=ALLOCATED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);}};return{ProcessMemoryDumpTrack:ProcessMemoryDumpTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ProcessTrackBase=tr.ui.tracks.ProcessTrackBase;var ProcessTrack=tr.ui.b.define('process-track',ProcessTrackBase);ProcessTrack.prototype={__proto__:ProcessTrackBase.prototype,decorate:function(viewport){tr.ui.tracks.ProcessTrackBase.prototype.decorate.call(this,viewport);},drawTrack:function(type){switch(type){case tr.ui.tracks.DrawType.INSTANT_EVENT:if(!this.processBase.instantEvents||this.processBase.instantEvents.length===0)
-break;var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);tr.ui.b.drawInstantSlicesAsLines(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,bounds.height,this.processBase.instantEvents,2);ctx.restore();break;case tr.ui.tracks.DrawType.BACKGROUND:this.drawBackground_();return;}
-tr.ui.tracks.ContainerTrack.prototype.drawTrack.call(this,type);},drawBackground_:function(){var ctx=this.context();var canvasBounds=ctx.canvas.getBoundingClientRect();var pixelRatio=window.devicePixelRatio||1;var draw=false;ctx.fillStyle='#eee';for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track)||(this.children[i]instanceof tr.ui.tracks.SpacingTrack))
-continue;draw=!draw;if(!draw)
-continue;var bounds=this.children[i].getBoundingClientRect();ctx.fillRect(0,pixelRatio*(bounds.top-canvasBounds.top),ctx.canvas.width,pixelRatio*bounds.height);}},set process(process){this.processBase=process;},get process(){return this.processBase;},get eventContainer(){return this.process;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.ProcessTrackBase.prototype.addContainersToTrackMap.apply(this,arguments);containerToTrackMap.addContainer(this.process,this);},appendMemoryDumpTrack_:function(){var processMemoryDumps=this.process.memoryDumps;if(processMemoryDumps.length){var pmdt=new tr.ui.tracks.ProcessMemoryDumpTrack(this.viewport_);pmdt.memoryDumps=processMemoryDumps;this.appendChild(pmdt);}},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onPickHit(instantEvent){selection.push(instantEvent);}
-var instantEventWidth=2*viewPixWidthWorld;tr.b.iterateOverIntersectingIntervals(this.processBase.instantEvents,function(x){return x.start;},function(x){return x.duration+instantEventWidth;},loWX,hiWX,onPickHit.bind(this));tr.ui.tracks.ContainerTrack.prototype.addIntersectingEventsInRangeToSelectionInWorldSpace.apply(this,arguments);},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){this.addClosestInstantEventToSelection(this.processBase.instantEvents,worldX,worldMaxDist,selection);tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection.apply(this,arguments);}};return{ProcessTrack:ProcessTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SelectionState=tr.model.SelectionState;var EventPresenter=tr.ui.b.EventPresenter;var ModelTrack=tr.ui.b.define('model-track',tr.ui.tracks.ContainerTrack);ModelTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('model-track');var typeInfos=tr.ui.tracks.Highlighter.getAllRegisteredTypeInfos();this.highlighters_=typeInfos.map(function(typeInfo){return new typeInfo.constructor(viewport);});this.upperMode_=false;this.annotationViews_=[];},get upperMode(){return this.upperMode_;},set upperMode(upperMode){this.upperMode_=upperMode;this.updateContents_();},detach:function(){tr.ui.tracks.ContainerTrack.prototype.detach.call(this);},get model(){return this.model_;},set model(model){this.model_=model;this.updateContents_();this.model_.addEventListener('annotationChange',this.updateAnnotations_.bind(this));},get hasVisibleContent(){return this.children.length>0;},updateContents_:function(){this.textContent='';if(!this.model_)
-return;if(this.upperMode_)
-this.updateContentsForUpperMode_();else
-this.updateContentsForLowerMode_();},updateContentsForUpperMode_:function(){},updateContentsForLowerMode_:function(){if(this.model_.interactionRecords.length){var mrt=new tr.ui.tracks.InteractionTrack(this.viewport_);mrt.model=this.model_;this.appendChild(mrt);}
-if(this.model_.alerts.length){var at=new tr.ui.tracks.AlertTrack(this.viewport_);at.alerts=this.model_.alerts;this.appendChild(at);}
-if(this.model_.globalMemoryDumps.length){var gmdt=new tr.ui.tracks.GlobalMemoryDumpTrack(this.viewport_);gmdt.memoryDumps=this.model_.globalMemoryDumps;this.appendChild(gmdt);}
-this.appendDeviceTrack_();this.appendKernelTrack_();var processes=this.model_.getAllProcesses();processes.sort(tr.model.Process.compare);for(var i=0;i<processes.length;++i){var process=processes[i];var track=new tr.ui.tracks.ProcessTrack(this.viewport);track.process=process;if(!track.hasVisibleContent)
-continue;this.appendChild(track);}
-this.viewport_.rebuildEventToTrackMap();this.viewport_.rebuildContainerToTrackMap();for(var i=0;i<this.highlighters_.length;i++){this.highlighters_[i].processModel(this.model_);}
-this.updateAnnotations_();},updateAnnotations_:function(){this.annotationViews_=[];var annotations=this.model_.getAllAnnotations();for(var i=0;i<annotations.length;i++){this.annotationViews_.push(annotations[i].getOrCreateView(this.viewport_));}
-this.invalidateDrawingContainer();},addEventsToTrackMap:function(eventToTrackMap){if(!this.model_)
-return;var tracks=this.children;for(var i=0;i<tracks.length;++i)
-tracks[i].addEventsToTrackMap(eventToTrackMap);if(this.instantEvents===undefined)
-return;var vp=this.viewport_;this.instantEvents.forEach(function(ev){eventToTrackMap.addEvent(ev,this);}.bind(this));},appendDeviceTrack_:function(){var device=this.model.device;var track=new tr.ui.tracks.DeviceTrack(this.viewport);track.device=this.model.device;if(!track.hasVisibleContent)
-return;this.appendChild(track);},appendKernelTrack_:function(){var kernel=this.model.kernel;var track=new tr.ui.tracks.KernelTrack(this.viewport);track.kernel=this.model.kernel;if(!track.hasVisibleContent)
-return;this.appendChild(track);},drawTrack:function(type){var ctx=this.context();if(!this.model_)
-return;var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);switch(type){case tr.ui.tracks.DrawType.GRID:this.viewport.drawMajorMarkLines(ctx);ctx.restore();return;case tr.ui.tracks.DrawType.FLOW_ARROWS:if(this.model_.flowIntervalTree.size===0){ctx.restore();return;}
-this.drawFlowArrows_(viewLWorld,viewRWorld);ctx.restore();return;case tr.ui.tracks.DrawType.INSTANT_EVENT:if(!this.model_.instantEvents||this.model_.instantEvents.length===0)
-break;tr.ui.b.drawInstantSlicesAsLines(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,bounds.height,this.model_.instantEvents,4);break;case tr.ui.tracks.DrawType.MARKERS:if(!this.viewport.interestRange.isEmpty){this.viewport.interestRange.draw(ctx,viewLWorld,viewRWorld);this.viewport.interestRange.drawIndicators(ctx,viewLWorld,viewRWorld);}
-ctx.restore();return;case tr.ui.tracks.DrawType.HIGHLIGHTS:for(var i=0;i<this.highlighters_.length;i++){this.highlighters_[i].drawHighlight(ctx,dt,viewLWorld,viewRWorld,bounds.height);}
-ctx.restore();return;case tr.ui.tracks.DrawType.ANNOTATIONS:for(var i=0;i<this.annotationViews_.length;i++){this.annotationViews_[i].draw(ctx);}
-ctx.restore();return;}
-ctx.restore();tr.ui.tracks.ContainerTrack.prototype.drawTrack.call(this,type);},drawFlowArrows_:function(viewLWorld,viewRWorld){var ctx=this.context();var dt=this.viewport.currentDisplayTransform;dt.applyTransformToCanvas(ctx);var pixWidth=dt.xViewVectorToWorld(1);ctx.strokeStyle='rgba(0, 0, 0, 0.4)';ctx.fillStyle='rgba(0, 0, 0, 0.4)';ctx.lineWidth=pixWidth>1.0?1:pixWidth;var events=this.model_.flowIntervalTree.findIntersection(viewLWorld,viewRWorld);var onlyHighlighted=!this.viewport.showFlowEvents;var canvasBounds=ctx.canvas.getBoundingClientRect();for(var i=0;i<events.length;++i){if(onlyHighlighted&&events[i].selectionState!==SelectionState.SELECTED&&events[i].selectionState!==SelectionState.HIGHLIGHTED)
-continue;this.drawFlowArrow_(ctx,events[i],canvasBounds,pixWidth);}},drawFlowArrow_:function(ctx,flowEvent,canvasBounds,pixWidth){var pixelRatio=window.devicePixelRatio||1;var startTrack=this.viewport.trackForEvent(flowEvent.startSlice);var endTrack=this.viewport.trackForEvent(flowEvent.endSlice);if(startTrack===undefined||endTrack===undefined)
-return;var startBounds=startTrack.getBoundingClientRect();var endBounds=endTrack.getBoundingClientRect();if(flowEvent.selectionState==SelectionState.SELECTED){ctx.shadowBlur=1;ctx.shadowColor='red';ctx.shadowOffsety=2;ctx.strokeStyle='red';}else if(flowEvent.selectionState==SelectionState.HIGHLIGHTED){ctx.shadowBlur=1;ctx.shadowColor='red';ctx.shadowOffsety=2;ctx.strokeStyle='red';}else if(flowEvent.selectionState==SelectionState.DIMMED){ctx.shadowBlur=0;ctx.shadowOffsetX=0;ctx.strokeStyle='rgba(0, 0, 0, 0.2)';}else{var hasBoost=false;var startSlice=flowEvent.startSlice;hasBoost|=startSlice.selectionState===SelectionState.SELECTED;hasBoost|=startSlice.selectionState===SelectionState.HIGHLIGHTED;var endSlice=flowEvent.endSlice;hasBoost|=endSlice.selectionState===SelectionState.SELECTED;hasBoost|=endSlice.selectionState===SelectionState.HIGHLIGHTED;if(hasBoost){ctx.shadowBlur=1;ctx.shadowColor='rgba(255, 0, 0, 0.4)';ctx.shadowOffsety=2;ctx.strokeStyle='rgba(255, 0, 0, 0.4)';}else{ctx.shadowBlur=0;ctx.shadowOffsetX=0;ctx.strokeStyle='rgba(0, 0, 0, 0.4)';}}
-var startSize=startBounds.left+startBounds.top+
-startBounds.bottom+startBounds.right;var endSize=endBounds.left+endBounds.top+
-endBounds.bottom+endBounds.right;if(startSize===0&&endSize===0)
-return;var startY=this.calculateTrackY_(startTrack,canvasBounds);var endY=this.calculateTrackY_(endTrack,canvasBounds);var pixelStartY=pixelRatio*startY;var pixelEndY=pixelRatio*endY;var half=(flowEvent.end-flowEvent.start)/2;ctx.beginPath();ctx.moveTo(flowEvent.start,pixelStartY);ctx.bezierCurveTo(flowEvent.start+half,pixelStartY,flowEvent.start+half,pixelEndY,flowEvent.end,pixelEndY);ctx.stroke();var arrowWidth=5*pixWidth*pixelRatio;var distance=flowEvent.end-flowEvent.start;if(distance<=(2*arrowWidth))
-return;var tipX=flowEvent.end;var tipY=pixelEndY;var arrowHeight=(endBounds.height/4)*pixelRatio;tr.ui.b.drawTriangle(ctx,tipX,tipY,tipX-arrowWidth,tipY-arrowHeight,tipX-arrowWidth,tipY+arrowHeight);ctx.fill();},calculateTrackY_:function(track,canvasBounds){var bounds=track.getBoundingClientRect();var size=bounds.left+bounds.top+bounds.bottom+bounds.right;if(size===0)
-return this.calculateTrackY_(track.parentNode,canvasBounds);return bounds.top-canvasBounds.top+(bounds.height/2);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onPickHit(instantEvent){selection.push(instantEvent);}
-var instantEventWidth=3*viewPixWidthWorld;tr.b.iterateOverIntersectingIntervals(this.model_.instantEvents,function(x){return x.start;},function(x){return x.duration+instantEventWidth;},loWX,hiWX,onPickHit.bind(this));tr.ui.tracks.ContainerTrack.prototype.addIntersectingEventsInRangeToSelectionInWorldSpace.apply(this,arguments);},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){this.addClosestInstantEventToSelection(this.model_.instantEvents,worldX,worldMaxDist,selection);tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection.apply(this,arguments);}};return{ModelTrack:ModelTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var RulerTrack=tr.ui.b.define('ruler-track',tr.ui.tracks.Track);var logOf10=Math.log(10);function log10(x){return Math.log(x)/logOf10;}
-RulerTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('ruler-track');this.strings_secs_=[];this.strings_msecs_=[];this.strings_usecs_=[];this.strings_nsecs_=[];this.viewportChange_=this.viewportChange_.bind(this);viewport.addEventListener('change',this.viewportChange_);var heading=document.createElement('tr-ui-heading');heading.arrowVisible=false;this.appendChild(heading);},detach:function(){tr.ui.tracks.Track.prototype.detach.call(this);this.viewport.removeEventListener('change',this.viewportChange_);},viewportChange_:function(){if(this.viewport.interestRange.isEmpty)
-this.classList.remove('tall-mode');else
-this.classList.add('tall-mode');},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GRID:this.drawGrid_(viewLWorld,viewRWorld);break;case tr.ui.tracks.DrawType.MARKERS:if(!this.viewport.interestRange.isEmpty)
-this.viewport.interestRange.draw(this.context(),viewLWorld,viewRWorld);break;}},drawGrid_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var canvasBounds=ctx.canvas.getBoundingClientRect();var trackBounds=this.getBoundingClientRect();var width=canvasBounds.width*pixelRatio;var height=trackBounds.height*pixelRatio;var hasInterestRange=!this.viewport.interestRange.isEmpty;var rulerHeight=hasInterestRange?(height*2)/5:height;var vp=this.viewport;var dt=vp.currentDisplayTransform;var idealMajorMarkDistancePix=150*pixelRatio;var idealMajorMarkDistanceWorld=dt.xViewVectorToWorld(idealMajorMarkDistancePix);var majorMarkDistanceWorld;var conservativeGuess=Math.pow(10,Math.ceil(log10(idealMajorMarkDistanceWorld)));var divisors=[10,5,2,1];for(var i=0;i<divisors.length;++i){var tightenedGuess=conservativeGuess/divisors[i];if(dt.xWorldVectorToView(tightenedGuess)<idealMajorMarkDistancePix)
-continue;majorMarkDistanceWorld=conservativeGuess/divisors[i-1];break;}
-var unit;var unitDivisor;var tickLabels=undefined;if(majorMarkDistanceWorld<0.0001){unit='ns';unitDivisor=0.000001;tickLabels=this.strings_nsecs_;}else if(majorMarkDistanceWorld<0.1){unit='us';unitDivisor=0.001;tickLabels=this.strings_usecs_;}else if(majorMarkDistanceWorld<100){unit='ms';unitDivisor=1;tickLabels=this.strings_msecs_;}else{unit='s';unitDivisor=1000;tickLabels=this.strings_secs_;}
-var numTicksPerMajor=5;var minorMarkDistanceWorld=majorMarkDistanceWorld/numTicksPerMajor;var minorMarkDistancePx=dt.xWorldVectorToView(minorMarkDistanceWorld);var firstMajorMark=Math.floor(viewLWorld/majorMarkDistanceWorld)*majorMarkDistanceWorld;var minorTickH=Math.floor(rulerHeight*0.25);ctx.save();var pixelRatio=window.devicePixelRatio||1;ctx.lineWidth=Math.round(pixelRatio);var crispLineCorrection=(ctx.lineWidth%2)/2;ctx.translate(crispLineCorrection,-crispLineCorrection);ctx.fillStyle='rgb(0, 0, 0)';ctx.strokeStyle='rgb(0, 0, 0)';ctx.textAlign='left';ctx.textBaseline='top';ctx.font=(9*pixelRatio)+'px sans-serif';vp.majorMarkPositions=[];ctx.beginPath();for(var curX=firstMajorMark;curX<viewRWorld;curX+=majorMarkDistanceWorld){var curXView=Math.floor(dt.xWorldToView(curX));var unitValue=curX/unitDivisor;var roundedUnitValue=Math.round(unitValue*100000)/100000;if(!tickLabels[roundedUnitValue])
-tickLabels[roundedUnitValue]=roundedUnitValue+' '+unit;ctx.fillText(tickLabels[roundedUnitValue],curXView+(2*pixelRatio),0);vp.majorMarkPositions.push(curXView);tr.ui.b.drawLine(ctx,curXView,0,curXView,rulerHeight);for(var i=1;i<numTicksPerMajor;++i){var xView=Math.floor(curXView+minorMarkDistancePx*i);tr.ui.b.drawLine(ctx,xView,rulerHeight-minorTickH,xView,rulerHeight);}}
-ctx.strokeStyle='rgb(0, 0, 0)';tr.ui.b.drawLine(ctx,0,height,width,height);ctx.stroke();if(!hasInterestRange)
-return;tr.ui.b.drawLine(ctx,0,rulerHeight,width,rulerHeight);ctx.stroke();var displayDistance;var displayTextColor='rgb(0,0,0)';var arrowSpacing=10*pixelRatio;var arrowColor='rgb(128,121,121)';var arrowPosY=rulerHeight*1.75;var arrowWidthView=3*pixelRatio;var arrowLengthView=10*pixelRatio;var spaceForArrowsView=2*(arrowWidthView+arrowSpacing);ctx.textBaseline='middle';ctx.font=(14*pixelRatio)+'px sans-serif';var textPosY=arrowPosY;var interestRange=vp.interestRange;if(interestRange.range===0){var markerWorld=interestRange.min;var markerView=dt.xWorldToView(markerWorld);var displayValue=markerWorld/unitDivisor;displayValue=Math.abs((Math.round(displayValue*1000)/1000));var textToDraw=displayValue+' '+unit;var textLeftView=markerView+4*pixelRatio;var textWidthView=ctx.measureText(textToDraw).width;if(textLeftView+textWidthView>width)
-textLeftView=markerView-4*pixelRatio-textWidthView;ctx.fillStyle=displayTextColor;ctx.fillText(textToDraw,textLeftView,textPosY);return;}
-var leftMarker=interestRange.min;var rightMarker=interestRange.max;var leftMarkerView=dt.xWorldToView(leftMarker);var rightMarkerView=dt.xWorldToView(rightMarker);var distanceBetweenMarkers=interestRange.range;var distanceBetweenMarkersView=dt.xWorldVectorToView(distanceBetweenMarkers);var positionInMiddleOfMarkersView=leftMarkerView+(distanceBetweenMarkersView/2);if(distanceBetweenMarkers<0.0001){unit='ns';unitDivisor=0.000001;}else if(distanceBetweenMarkers<0.1){unit='us';unitDivisor=0.001;}else if(distanceBetweenMarkers<100){unit='ms';unitDivisor=1;}else{unit='s';unitDivisor=1000;}
-displayDistance=distanceBetweenMarkers/unitDivisor;var roundedDisplayDistance=Math.abs((Math.round(displayDistance*1000)/1000));var textToDraw=roundedDisplayDistance+' '+unit;var textWidthView=ctx.measureText(textToDraw).width;var spaceForArrowsAndTextView=textWidthView+spaceForArrowsView+arrowSpacing;var textLeftView=positionInMiddleOfMarkersView-textWidthView/2;var textRightView=textLeftView+textWidthView;if(spaceForArrowsAndTextView>distanceBetweenMarkersView){textLeftView=rightMarkerView+2*arrowSpacing;if(textLeftView+textWidthView>width)
-textLeftView=leftMarkerView-2*arrowSpacing-textWidthView;ctx.fillStyle=displayTextColor;ctx.fillText(textToDraw,textLeftView,textPosY);ctx.strokeStyle=arrowColor;ctx.beginPath();tr.ui.b.drawLine(ctx,leftMarkerView,arrowPosY,rightMarkerView,arrowPosY);ctx.stroke();ctx.fillStyle=arrowColor;tr.ui.b.drawArrow(ctx,leftMarkerView-1.5*arrowSpacing,arrowPosY,leftMarkerView,arrowPosY,arrowLengthView,arrowWidthView);tr.ui.b.drawArrow(ctx,rightMarkerView+1.5*arrowSpacing,arrowPosY,rightMarkerView,arrowPosY,arrowLengthView,arrowWidthView);}else if(spaceForArrowsView<=distanceBetweenMarkersView){var leftArrowStart;var rightArrowStart;if(spaceForArrowsAndTextView<=distanceBetweenMarkersView){ctx.fillStyle=displayTextColor;ctx.fillText(textToDraw,textLeftView,textPosY);leftArrowStart=textLeftView-arrowSpacing;rightArrowStart=textRightView+arrowSpacing;}else{leftArrowStart=positionInMiddleOfMarkersView;rightArrowStart=positionInMiddleOfMarkersView;}
-ctx.strokeStyle=arrowColor;ctx.fillStyle=arrowColor;tr.ui.b.drawArrow(ctx,leftArrowStart,arrowPosY,leftMarkerView,arrowPosY,arrowLengthView,arrowWidthView);tr.ui.b.drawArrow(ctx,rightArrowStart,arrowPosY,rightMarkerView,arrowPosY,arrowLengthView,arrowWidthView);}
-ctx.restore();},addIntersectingEventsInRangeToSelection:function(loVX,hiVX,loY,hiY,selection){},addAllEventsMatchingFilterToSelection:function(filter,selection){}};return{RulerTrack:RulerTrack};});'use strict';Polymer('tr-ui-timeline-track-view',{ready:function(){this.displayTransform_=new tr.ui.TimelineDisplayTransform();this.model_=undefined;this.timelineView_=undefined;this.viewport_=new tr.ui.TimelineViewport(this);this.viewportDisplayTransformAtMouseDown_=undefined;this.brushingStateController_=undefined;this.rulerTrackContainer_=new tr.ui.tracks.DrawingContainer(this.viewport_);this.appendChild(this.rulerTrackContainer_);this.rulerTrackContainer_.invalidate();this.rulerTrack_=new tr.ui.tracks.RulerTrack(this.viewport_);this.rulerTrackContainer_.appendChild(this.rulerTrack_);this.upperModelTrack_=new tr.ui.tracks.ModelTrack(this.viewport_);this.upperModelTrack_.upperMode=true;this.rulerTrackContainer_.appendChild(this.upperModelTrack_);this.modelTrackContainer_=new tr.ui.tracks.DrawingContainer(this.viewport_);this.appendChild(this.modelTrackContainer_);this.modelTrackContainer_.style.display='block';this.modelTrackContainer_.invalidate();this.viewport_.modelTrackContainer=this.modelTrackContainer_;this.modelTrack_=new tr.ui.tracks.ModelTrack(this.viewport_);this.modelTrackContainer_.appendChild(this.modelTrack_);this.timingTool_=new tr.ui.b.TimingTool(this.viewport_,this);this.initMouseModeSelector();this.hideDragBox_();this.initHintText_();this.onSelectionChanged_=this.onSelectionChanged_.bind(this);this.onDblClick_=this.onDblClick_.bind(this);this.addEventListener('dblclick',this.onDblClick_);this.onMouseWheel_=this.onMouseWheel_.bind(this);this.addEventListener('mousewheel',this.onMouseWheel_);this.onMouseDown_=this.onMouseDown_.bind(this);this.addEventListener('mousedown',this.onMouseDown_);this.onMouseMove_=this.onMouseMove_.bind(this);this.addEventListener('mousemove',this.onMouseMove_);this.onTouchStart_=this.onTouchStart_.bind(this);this.addEventListener('touchstart',this.onTouchStart_);this.onTouchMove_=this.onTouchMove_.bind(this);this.addEventListener('touchmove',this.onTouchMove_);this.onTouchEnd_=this.onTouchEnd_.bind(this);this.addEventListener('touchend',this.onTouchEnd_);this.addHotKeys_();this.mouseViewPosAtMouseDown_={x:0,y:0};this.lastMouseViewPos_={x:0,y:0};this.lastTouchViewPositions_=[];this.alert_=undefined;this.isPanningAndScanning_=false;this.isZooming_=false;},initMouseModeSelector:function(){this.mouseModeSelector_=document.createElement('tr-ui-b-mouse-mode-selector');this.mouseModeSelector_.targetElement=this;this.appendChild(this.mouseModeSelector_);this.mouseModeSelector_.addEventListener('beginpan',this.onBeginPanScan_.bind(this));this.mouseModeSelector_.addEventListener('updatepan',this.onUpdatePanScan_.bind(this));this.mouseModeSelector_.addEventListener('endpan',this.onEndPanScan_.bind(this));this.mouseModeSelector_.addEventListener('beginselection',this.onBeginSelection_.bind(this));this.mouseModeSelector_.addEventListener('updateselection',this.onUpdateSelection_.bind(this));this.mouseModeSelector_.addEventListener('endselection',this.onEndSelection_.bind(this));this.mouseModeSelector_.addEventListener('beginzoom',this.onBeginZoom_.bind(this));this.mouseModeSelector_.addEventListener('updatezoom',this.onUpdateZoom_.bind(this));this.mouseModeSelector_.addEventListener('endzoom',this.onEndZoom_.bind(this));this.mouseModeSelector_.addEventListener('entertiming',this.timingTool_.onEnterTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener('begintiming',this.timingTool_.onBeginTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener('updatetiming',this.timingTool_.onUpdateTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener('endtiming',this.timingTool_.onEndTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener('exittiming',this.timingTool_.onExitTiming.bind(this.timingTool_));var m=tr.ui.b.MOUSE_SELECTOR_MODE;this.mouseModeSelector_.supportedModeMask=m.SELECTION|m.PANSCAN|m.ZOOM|m.TIMING;this.mouseModeSelector_.settingsKey='timelineTrackView.mouseModeSelector';this.mouseModeSelector_.setKeyCodeForMode(m.PANSCAN,'2'.charCodeAt(0));this.mouseModeSelector_.setKeyCodeForMode(m.SELECTION,'1'.charCodeAt(0));this.mouseModeSelector_.setKeyCodeForMode(m.ZOOM,'3'.charCodeAt(0));this.mouseModeSelector_.setKeyCodeForMode(m.TIMING,'4'.charCodeAt(0));this.mouseModeSelector_.setModifierForAlternateMode(m.SELECTION,tr.ui.b.MODIFIER.SHIFT);this.mouseModeSelector_.setModifierForAlternateMode(m.PANSCAN,tr.ui.b.MODIFIER.SPACE);},get brushingStateController(){return this.brushingStateController_;},set brushingStateController(brushingStateController){if(this.brushingStateController_){this.brushingStateController_.removeEventListener('change',this.onSelectionChanged_);}
-this.brushingStateController_=brushingStateController;if(this.brushingStateController_){this.brushingStateController_.addEventListener('change',this.onSelectionChanged_);}},set timelineView(view){this.timelineView_=view;},onSelectionChanged_:function(){this.showHintText_('Press \'m\' to mark current selection');this.viewport_.dispatchChangeEvent();},set selection(selection){throw new Error('DO NOT CALL THIS');},set highlight(highlight){throw new Error('DO NOT CALL THIS');},detach:function(){this.modelTrack_.detach();this.upperModelTrack_.detach();this.viewport_.detach();},get viewport(){return this.viewport_;},get model(){return this.model_;},set model(model){if(!model)
-throw new Error('Model cannot be undefined');var modelInstanceChanged=this.model_!==model;this.model_=model;this.modelTrack_.model=model;this.upperModelTrack_.model=model;if(modelInstanceChanged)
-this.viewport_.setWhenPossible(this.setInitialViewport_.bind(this));},get hasVisibleContent(){return this.modelTrack_.hasVisibleContent||this.upperModelTrack_.hasVisibleContent;},setInitialViewport_:function(){this.modelTrackContainer_.updateCanvasSizeIfNeeded_();var w=this.modelTrackContainer_.canvas.width;var min;var range;if(this.model_.bounds.isEmpty){min=0;range=1000;}else if(this.model_.bounds.range===0){min=this.model_.bounds.min;range=1000;}else{min=this.model_.bounds.min;range=this.model_.bounds.range;}
-var boost=range*0.15;this.displayTransform_.set(this.viewport_.currentDisplayTransform);this.displayTransform_.xSetWorldBounds(min-boost,min+range+boost,w);this.viewport_.setDisplayTransformImmediately(this.displayTransform_);},addAllEventsMatchingFilterToSelectionAsTask:function(filter,selection){var modelTrack=this.modelTrack_;var firstT=modelTrack.addAllEventsMatchingFilterToSelectionAsTask(filter,selection);var lastT=firstT.after(function(){this.upperModelTrack_.addAllEventsMatchingFilterToSelection(filter,selection);},this);return firstT;},onMouseMove_:function(e){if(this.isZooming_)
-return;this.storeLastMousePos_(e);},onTouchStart_:function(e){this.storeLastTouchPositions_(e);this.focusElements_();},onTouchMove_:function(e){e.preventDefault();this.onUpdateTransformForTouch_(e);},onTouchEnd_:function(e){this.storeLastTouchPositions_(e);this.focusElements_();},addHotKeys_:function(){this.addKeyDownHotKeys_();this.addKeyPressHotKeys_();},addKeyPressHotKeys_:function(){var addBinding=function(dict){dict.eventType='keypress';dict.useCapture=false;dict.thisArg=this;var binding=new tr.ui.b.HotKey(dict);this.$.hotkey_controller.addHotKey(binding);}.bind(this);addBinding({keyCodes:['w'.charCodeAt(0),','.charCodeAt(0)],callback:function(e){this.zoomBy_(1.5,true);e.stopPropagation();}});addBinding({keyCodes:['s'.charCodeAt(0),'o'.charCodeAt(0)],callback:function(e){this.zoomBy_(1/1.5,true);e.stopPropagation();}});addBinding({keyCode:'g'.charCodeAt(0),callback:function(e){this.onGridToggle_(true);e.stopPropagation();}});addBinding({keyCode:'G'.charCodeAt(0),callback:function(e){this.onGridToggle_(false);e.stopPropagation();}});addBinding({keyCodes:['W'.charCodeAt(0),'<'.charCodeAt(0)],callback:function(e){this.zoomBy_(10,true);e.stopPropagation();}});addBinding({keyCodes:['S'.charCodeAt(0),'O'.charCodeAt(0)],callback:function(e){this.zoomBy_(1/10,true);e.stopPropagation();}});addBinding({keyCode:'a'.charCodeAt(0),callback:function(e){this.queueSmoothPan_(this.viewWidth_*0.3,0);e.stopPropagation();}});addBinding({keyCodes:['d'.charCodeAt(0),'e'.charCodeAt(0)],callback:function(e){this.queueSmoothPan_(this.viewWidth_*-0.3,0);e.stopPropagation();}});addBinding({keyCode:'A'.charCodeAt(0),callback:function(e){this.queueSmoothPan_(viewWidth*0.5,0);e.stopPropagation();}});addBinding({keyCode:'D'.charCodeAt(0),callback:function(e){this.queueSmoothPan_(viewWidth*-0.5,0);e.stopPropagation();}});addBinding({keyCode:'0'.charCodeAt(0),callback:function(e){this.setInitialViewport_();e.stopPropagation();}});addBinding({keyCode:'f'.charCodeAt(0),callback:function(e){this.zoomToSelection();e.stopPropagation();}});addBinding({keyCode:'m'.charCodeAt(0),callback:function(e){this.setCurrentSelectionAsInterestRange_();e.stopPropagation();}});addBinding({keyCode:'h'.charCodeAt(0),callback:function(e){this.toggleHighDetails_();e.stopPropagation();}});},get viewWidth_(){return this.modelTrackContainer_.canvas.clientWidth;},addKeyDownHotKeys_:function(){var addBinding=function(dict){dict.eventType='keydown';dict.useCapture=false;dict.thisArg=this;var binding=new tr.ui.b.HotKey(dict);this.$.hotkey_controller.addHotKey(binding);}.bind(this);addBinding({keyCode:37,callback:function(e){var curSel=this.brushingStateController_.selection;var sel=this.viewport.getShiftedSelection(curSel,-1);if(sel){this.brushingStateController.changeSelectionFromTimeline(sel);this.panToSelection();}else{this.queueSmoothPan_(this.viewWidth_*0.3,0);}
-e.preventDefault();e.stopPropagation();}});addBinding({keyCode:39,callback:function(e){var curSel=this.brushingStateController_.selection;var sel=this.viewport.getShiftedSelection(curSel,1);if(sel){this.brushingStateController.changeSelectionFromTimeline(sel);this.panToSelection();}else{this.queueSmoothPan_(-this.viewWidth_*0.3,0);}
-e.preventDefault();e.stopPropagation();}});},onDblClick_:function(e){if(this.mouseModeSelector_.mode!==tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION)
-return;var curSelection=this.brushingStateController_.selection;if(!curSelection.length||!curSelection[0].title)
-return;var selection=new tr.model.EventSet();var filter=new tr.c.ExactTitleFilter(curSelection[0].title);this.modelTrack_.addAllEventsMatchingFilterToSelection(filter,selection);this.brushingStateController.changeSelectionFromTimeline(selection);},onMouseWheel_:function(e){if(!e.altKey)
-return;var delta=e.wheelDelta/120;var zoomScale=Math.pow(1.5,delta);this.zoomBy_(zoomScale);e.preventDefault();},onMouseDown_:function(e){if(this.mouseModeSelector_.mode!==tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION)
-return;if(e.target!==this.rulerTrack_)
-return;this.dragBeginEvent_=undefined;if(this.xNavStringMarker_){this.model.removeAnnotation(this.xNavStringMarker_);this.xNavStringMarker_=undefined;}
-var dt=this.viewport_.currentDisplayTransform;tr.ui.b.trackMouseMovesUntilMouseUp(function(e){if(e.target===this.rulerTrack_)
-return;var relativePosition=this.extractRelativeMousePosition_(e);var loc=tr.model.Location.fromViewCoordinates(this.viewport_,relativePosition.x,relativePosition.y);if(!loc)
-return;if(this.guideLineAnnotation_===undefined){this.guideLineAnnotation_=new tr.model.XMarkerAnnotation(loc.xWorld);this.model.addAnnotation(this.guideLineAnnotation_);}else{this.guideLineAnnotation_.timestamp=loc.xWorld;this.modelTrackContainer_.invalidate();}
-var state=new tr.ui.b.UIState(loc,this.viewport_.currentDisplayTransform.scaleX);this.timelineView_.setFindCtlText(state.toUserFriendlyString(this.viewport_));}.bind(this),undefined,function onKeyUpDuringDrag(){if(this.dragBeginEvent_){this.setDragBoxPosition_(this.dragBoxXStart_,this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_);}}.bind(this));},queueSmoothPan_:function(viewDeltaX,deltaY){var deltaX=this.viewport_.currentDisplayTransform.xViewVectorToWorld(viewDeltaX);var animation=new tr.ui.TimelineDisplayTransformPanAnimation(deltaX,deltaY);this.viewport_.queueDisplayTransformAnimation(animation);},zoomBy_:function(scale,smooth){if(scale<=0){return;}
-smooth=!!smooth;var vp=this.viewport_;var pixelRatio=window.devicePixelRatio||1;var goalFocalPointXView=this.lastMouseViewPos_.x*pixelRatio;var goalFocalPointXWorld=vp.currentDisplayTransform.xViewToWorld(goalFocalPointXView);if(smooth){var animation=new tr.ui.TimelineDisplayTransformZoomToAnimation(goalFocalPointXWorld,goalFocalPointXView,vp.currentDisplayTransform.panY,scale);vp.queueDisplayTransformAnimation(animation);}else{this.displayTransform_.set(vp.currentDisplayTransform);this.displayTransform_.scaleX*=scale;this.displayTransform_.xPanWorldPosToViewPos(goalFocalPointXWorld,goalFocalPointXView,this.viewWidth_);vp.setDisplayTransformImmediately(this.displayTransform_);}},zoomToSelection:function(){if(!this.brushingStateController.selectionOfInterest.length)
-return;var bounds=this.brushingStateController.selectionOfInterest.bounds;if(!bounds.range)
-return;var worldCenter=bounds.center;var viewCenter=this.modelTrackContainer_.canvas.width/2;var adjustedWorldRange=bounds.range*1.25;var newScale=this.modelTrackContainer_.canvas.width/adjustedWorldRange;var zoomInRatio=newScale/this.viewport_.currentDisplayTransform.scaleX;var animation=new tr.ui.TimelineDisplayTransformZoomToAnimation(worldCenter,viewCenter,this.viewport_.currentDisplayTransform.panY,zoomInRatio);this.viewport_.queueDisplayTransformAnimation(animation);},panToSelection:function(){if(!this.brushingStateController.selectionOfInterest.length)
-return;var bounds=this.brushingStateController.selectionOfInterest.bounds;var worldCenter=bounds.center;var viewWidth=this.viewWidth_;var dt=this.viewport_.currentDisplayTransform;if(false&&!bounds.range){if(dt.xWorldToView(bounds.center)<0||dt.xWorldToView(bounds.center)>viewWidth){this.displayTransform_.set(dt);this.displayTransform_.xPanWorldPosToViewPos(worldCenter,'center',viewWidth);var deltaX=this.displayTransform_.panX-dt.panX;var animation=new tr.ui.TimelineDisplayTransformPanAnimation(deltaX,0);this.viewport_.queueDisplayTransformAnimation(animation);}
-return;}
-this.displayTransform_.set(dt);this.displayTransform_.xPanWorldBoundsIntoView(bounds.min,bounds.max,viewWidth);var deltaX=this.displayTransform_.panX-dt.panX;var animation=new tr.ui.TimelineDisplayTransformPanAnimation(deltaX,0);this.viewport_.queueDisplayTransformAnimation(animation);},navToPosition:function(uiState,showNavLine){var location=uiState.location;var scaleX=uiState.scaleX;var track=location.getContainingTrack(this.viewport_);var worldCenter=location.xWorld;var viewCenter=this.modelTrackContainer_.canvas.width/5;var zoomInRatio=scaleX/this.viewport_.currentDisplayTransform.scaleX;track.scrollIntoViewIfNeeded();var animation=new tr.ui.TimelineDisplayTransformZoomToAnimation(worldCenter,viewCenter,this.viewport_.currentDisplayTransform.panY,zoomInRatio);this.viewport_.queueDisplayTransformAnimation(animation);if(!showNavLine)
-return;if(this.xNavStringMarker_)
-this.model.removeAnnotation(this.xNavStringMarker_);this.xNavStringMarker_=new tr.model.XMarkerAnnotation(worldCenter);this.model.addAnnotation(this.xNavStringMarker_);},setCurrentSelectionAsInterestRange_:function(){var selectionBounds=this.brushingStateController_.selection.bounds;if(selectionBounds.empty){this.viewport_.interestRange.reset();return;}
-if(this.viewport_.interestRange.min==selectionBounds.min&&this.viewport_.interestRange.max==selectionBounds.max)
-this.viewport_.interestRange.reset();else
-this.viewport_.interestRange.set(selectionBounds);},toggleHighDetails_:function(){this.viewport_.highDetails=!this.viewport_.highDetails;},hideDragBox_:function(){this.$.drag_box.style.left='-1000px';this.$.drag_box.style.top='-1000px';this.$.drag_box.style.width=0;this.$.drag_box.style.height=0;},setDragBoxPosition_:function(xStart,yStart,xEnd,yEnd){var loY=Math.min(yStart,yEnd);var hiY=Math.max(yStart,yEnd);var loX=Math.min(xStart,xEnd);var hiX=Math.max(xStart,xEnd);var modelTrackRect=this.modelTrack_.getBoundingClientRect();var dragRect={left:loX,top:loY,width:hiX-loX,height:hiY-loY};dragRect.right=dragRect.left+dragRect.width;dragRect.bottom=dragRect.top+dragRect.height;var modelTrackContainerRect=this.modelTrackContainer_.getBoundingClientRect();var clipRect={left:modelTrackContainerRect.left,top:modelTrackContainerRect.top,right:modelTrackContainerRect.right,bottom:modelTrackContainerRect.bottom};var headingWidth=window.getComputedStyle(this.querySelector('tr-ui-heading')).width;var trackTitleWidth=parseInt(headingWidth);clipRect.left=clipRect.left+trackTitleWidth;var intersectRect_=function(r1,r2){if(r2.left>r1.right||r2.right<r1.left||r2.top>r1.bottom||r2.bottom<r1.top)
-return false;var results={};results.left=Math.max(r1.left,r2.left);results.top=Math.max(r1.top,r2.top);results.right=Math.min(r1.right,r2.right);results.bottom=Math.min(r1.bottom,r2.bottom);results.width=results.right-results.left;results.height=results.bottom-results.top;return results;}
-var finalDragBox=intersectRect_(clipRect,dragRect);this.$.drag_box.style.left=finalDragBox.left+'px';this.$.drag_box.style.width=finalDragBox.width+'px';this.$.drag_box.style.top=finalDragBox.top+'px';this.$.drag_box.style.height=finalDragBox.height+'px';this.$.drag_box.style.whiteSpace='nowrap';var pixelRatio=window.devicePixelRatio||1;var canv=this.modelTrackContainer_.canvas;var dt=this.viewport_.currentDisplayTransform;var loWX=dt.xViewToWorld((loX-canv.offsetLeft)*pixelRatio);var hiWX=dt.xViewToWorld((hiX-canv.offsetLeft)*pixelRatio);this.$.drag_box.textContent=tr.b.u.TimeDuration.format(hiWX-loWX);var e=new tr.b.Event('selectionChanging');e.loWX=loWX;e.hiWX=hiWX;this.dispatchEvent(e);},onGridToggle_:function(left){var selection=this.brushingStateController_.selection;var tb=left?selection.bounds.min:selection.bounds.max;if(this.viewport_.gridEnabled&&this.viewport_.gridSide===left&&this.viewport_.gridInitialTimebase===tb){this.viewport_.gridside=undefined;this.viewport_.gridEnabled=false;this.viewport_.gridInitialTimebase=undefined;return;}
-var numIntervalsSinceStart=Math.ceil((tb-this.model_.bounds.min)/this.viewport_.gridStep_);this.viewport_.gridEnabled=true;this.viewport_.gridSide=left;this.viewport_.gridInitialTimebase=tb;this.viewport_.gridTimebase=tb-
-(numIntervalsSinceStart+1)*this.viewport_.gridStep_;},storeLastMousePos_:function(e){this.lastMouseViewPos_=this.extractRelativeMousePosition_(e);},storeLastTouchPositions_:function(e){this.lastTouchViewPositions_=this.extractRelativeTouchPositions_(e);},extractRelativeMousePosition_:function(e){var canv=this.modelTrackContainer_.canvas;return{x:e.clientX-canv.offsetLeft,y:e.clientY-canv.offsetTop};},extractRelativeTouchPositions_:function(e){var canv=this.modelTrackContainer_.canvas;var touches=[];for(var i=0;i<e.touches.length;++i){touches.push({x:e.touches[i].clientX-canv.offsetLeft,y:e.touches[i].clientY-canv.offsetTop});}
-return touches;},storeInitialMouseDownPos_:function(e){var position=this.extractRelativeMousePosition_(e);this.mouseViewPosAtMouseDown_.x=position.x;this.mouseViewPosAtMouseDown_.y=position.y;},focusElements_:function(){this.$.hotkey_controller.childRequestsGeneralFocus(this);},storeInitialInteractionPositionsAndFocus_:function(e){this.storeInitialMouseDownPos_(e);this.storeLastMousePos_(e);this.focusElements_();},onBeginPanScan_:function(e){var vp=this.viewport_;this.viewportDisplayTransformAtMouseDown_=vp.currentDisplayTransform.clone();this.isPanningAndScanning_=true;this.storeInitialInteractionPositionsAndFocus_(e);e.preventDefault();},onUpdatePanScan_:function(e){if(!this.isPanningAndScanning_)
-return;var viewWidth=this.viewWidth_;var pixelRatio=window.devicePixelRatio||1;var xDeltaView=pixelRatio*(this.lastMouseViewPos_.x-
-this.mouseViewPosAtMouseDown_.x);var yDelta=this.lastMouseViewPos_.y-
-this.mouseViewPosAtMouseDown_.y;this.displayTransform_.set(this.viewportDisplayTransformAtMouseDown_);this.displayTransform_.incrementPanXInViewUnits(xDeltaView);this.displayTransform_.panY-=yDelta;this.viewport_.setDisplayTransformImmediately(this.displayTransform_);e.preventDefault();e.stopPropagation();this.storeLastMousePos_(e);},onEndPanScan_:function(e){this.isPanningAndScanning_=false;this.storeLastMousePos_(e);if(!e.isClick)
-e.preventDefault();},onBeginSelection_:function(e){var canv=this.modelTrackContainer_.canvas;var rect=this.modelTrack_.getBoundingClientRect();var canvRect=canv.getBoundingClientRect();var inside=rect&&e.clientX>=rect.left&&e.clientX<rect.right&&e.clientY>=rect.top&&e.clientY<rect.bottom&&e.clientX>=canvRect.left&&e.clientX<canvRect.right;if(!inside)
-return;this.dragBeginEvent_=e;this.storeInitialInteractionPositionsAndFocus_(e);e.preventDefault();},onUpdateSelection_:function(e){if(!this.dragBeginEvent_)
-return;this.dragBoxXStart_=this.dragBeginEvent_.clientX;this.dragBoxXEnd_=e.clientX;this.dragBoxYStart_=this.dragBeginEvent_.clientY;this.dragBoxYEnd_=e.clientY;this.setDragBoxPosition_(this.dragBoxXStart_,this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_);},onEndSelection_:function(e){e.preventDefault();if(!this.dragBeginEvent_)
-return;this.hideDragBox_();var eDown=this.dragBeginEvent_;this.dragBeginEvent_=undefined;var loY=Math.min(eDown.clientY,e.clientY);var hiY=Math.max(eDown.clientY,e.clientY);var loX=Math.min(eDown.clientX,e.clientX);var hiX=Math.max(eDown.clientX,e.clientX);var canv=this.modelTrackContainer_.canvas;var worldOffset=canv.getBoundingClientRect().left;var loVX=loX-worldOffset;var hiVX=hiX-worldOffset;var selection=new tr.model.EventSet();if(eDown.appendSelection){var previousSelection=this.brushingStateController_.selection;if(previousSelection!==undefined)
-selection.addEventSet(previousSelection);}
-this.modelTrack_.addIntersectingEventsInRangeToSelection(loVX,hiVX,loY,hiY,selection);this.brushingStateController_.changeSelectionFromTimeline(selection);},onBeginZoom_:function(e){this.isZooming_=true;this.storeInitialInteractionPositionsAndFocus_(e);e.preventDefault();},onUpdateZoom_:function(e){if(!this.isZooming_)
-return;var newPosition=this.extractRelativeMousePosition_(e);var zoomScaleValue=1+(this.lastMouseViewPos_.y-
-newPosition.y)*0.01;this.zoomBy_(zoomScaleValue,false);this.storeLastMousePos_(e);},onEndZoom_:function(e){this.isZooming_=false;if(!e.isClick)
-e.preventDefault();},computeTouchCenter_:function(positions){var xSum=0;var ySum=0;for(var i=0;i<positions.length;++i){xSum+=positions[i].x;ySum+=positions[i].y;}
-return{x:xSum/positions.length,y:ySum/positions.length};},computeTouchSpan_:function(positions){var xMin=Number.MAX_VALUE;var yMin=Number.MAX_VALUE;var xMax=Number.MIN_VALUE;var yMax=Number.MIN_VALUE;for(var i=0;i<positions.length;++i){xMin=Math.min(xMin,positions[i].x);yMin=Math.min(yMin,positions[i].y);xMax=Math.max(xMax,positions[i].x);yMax=Math.max(yMax,positions[i].y);}
-return Math.sqrt((xMin-xMax)*(xMin-xMax)+
-(yMin-yMax)*(yMin-yMax));},onUpdateTransformForTouch_:function(e){var newPositions=this.extractRelativeTouchPositions_(e);var currentPositions=this.lastTouchViewPositions_;var newCenter=this.computeTouchCenter_(newPositions);var currentCenter=this.computeTouchCenter_(currentPositions);var newSpan=this.computeTouchSpan_(newPositions);var currentSpan=this.computeTouchSpan_(currentPositions);var vp=this.viewport_;var viewWidth=this.viewWidth_;var pixelRatio=window.devicePixelRatio||1;var xDelta=pixelRatio*(newCenter.x-currentCenter.x);var yDelta=newCenter.y-currentCenter.y;var zoomScaleValue=currentSpan>10?newSpan/currentSpan:1;var viewFocus=pixelRatio*newCenter.x;var worldFocus=vp.currentDisplayTransform.xViewToWorld(viewFocus);this.displayTransform_.set(vp.currentDisplayTransform);this.displayTransform_.scaleX*=zoomScaleValue;this.displayTransform_.xPanWorldPosToViewPos(worldFocus,viewFocus,viewWidth);this.displayTransform_.incrementPanXInViewUnits(xDelta);this.displayTransform_.panY-=yDelta;vp.setDisplayTransformImmediately(this.displayTransform_);this.storeLastTouchPositions_(e);},initHintText_:function(){this.$.hint_text.style.display='none';this.pendingHintTextClearTimeout_=undefined;},showHintText_:function(text){if(this.pendingHintTextClearTimeout_){window.clearTimeout(this.pendingHintTextClearTimeout_);this.pendingHintTextClearTimeout_=undefined;}
-this.pendingHintTextClearTimeout_=setTimeout(this.hideHintText_.bind(this),1000);this.$.hint_text.textContent=text;this.$.hint_text.style.display='';},hideHintText_:function(){this.pendingHintTextClearTimeout_=undefined;this.$.hint_text.style.display='none';}});'use strict';Polymer('tr-ui-find-control',{filterKeyDown:function(e){if(e.keyCode===27){var hkc=tr.b.getHotkeyControllerForElement(this);if(hkc){hkc.childRequestsBlur(this);}else{this.blur();}
-e.preventDefault();e.stopPropagation();return;}else if(e.keyCode===13){if(e.shiftKey)
-this.findPrevious();else
-this.findNext();}},filterBlur:function(e){this.updateHitCountEl();},filterFocus:function(e){this.$.filter.select();},filterMouseUp:function(e){e.preventDefault();},get controller(){return this.controller_;},set controller(c){this.controller_=c;this.updateHitCountEl();},focus:function(){this.$.filter.focus();},get hasFocus(){return this===document.activeElement;},filterTextChanged:function(){this.$.hitCount.textContent='';this.$.spinner.style.visibility='visible';this.controller.startFiltering(this.$.filter.value).then(function(){this.$.spinner.style.visibility='hidden';this.updateHitCountEl();}.bind(this));},findNext:function(){if(this.controller)
-this.controller.findNext();this.updateHitCountEl();},findPrevious:function(){if(this.controller)
-this.controller.findPrevious();this.updateHitCountEl();},updateHitCountEl:function(){if(!this.controller||!this.hasFocus){this.$.hitCount.textContent='';return;}
-var n=this.controller.filterHits.length;var i=n===0?-1:this.controller.currentHitIndex;this.$.hitCount.textContent=(i+1)+' of '+n;},setText:function(string){this.$.filter.value=string;}});'use strict';tr.exportTo('tr.e.tquery',function(){function Context(){this.event=undefined;this.ancestors=[];}
-Context.prototype={push:function(event){var ctx=new Context();ctx.ancestors=this.ancestors.slice();ctx.ancestors.push(event);return ctx;},pop:function(event){var ctx=new Context();ctx.event=this.ancestors[this.ancestors.length-1];ctx.ancestors=this.ancestors.slice(0,this.ancestors.length-1);return ctx;}};return{Context:Context};});'use strict';tr.exportTo('tr.e.tquery',function(){function Filter(){tr.c.ScriptingObject.call(this);}
-Filter.normalizeFilterExpression=function(filterExpression){if(filterExpression instanceof String||typeof(filterExpression)=='string'||filterExpression instanceof RegExp){var filter=new tr.e.tquery.FilterHasTitle(filterExpression);return filter;}
-return filterExpression;};Filter.prototype={__proto__:tr.c.ScriptingObject.prototype,evaluate:function(context){throw new Error('Not implemented');},matchValue_:function(value,expected){if(expected instanceof RegExp)
-return expected.test(value);else if(expected instanceof Function)
-return expected(value);return value===expected;}};return{Filter:Filter};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterAllOf(opt_subExpressions){tr.e.tquery.Filter.call(this);this.subExpressions=opt_subExpressions||[];}
-FilterAllOf.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpressions(exprs){this.subExpressions_=[];for(var i=0;i<exprs.length;i++){this.subExpressions_.push(tr.e.tquery.Filter.normalizeFilterExpression(exprs[i]));}},get subExpressions(){return this.subExpressions_;},evaluate:function(context){if(!this.subExpressions.length)
-return true;for(var i=0;i<this.subExpressions.length;i++){if(!this.subExpressions[i].evaluate(context))
-return false;}
-return true;}};tr.c.ScriptingObjectRegistry.register(function(){var exprs=[];for(var i=0;i<arguments.length;i++){exprs.push(arguments[i]);}
-return new FilterAllOf(exprs);},{name:'allOf'});return{FilterAllOf:FilterAllOf};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterAnyOf(opt_subExpressions){tr.e.tquery.Filter.call(this);this.subExpressions=opt_subExpressions||[];};FilterAnyOf.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpressions(exprs){this.subExpressions_=[];for(var i=0;i<exprs.length;i++){this.subExpressions_.push(tr.e.tquery.Filter.normalizeFilterExpression(exprs[i]));}},get subExpressions(){return this.subExpressions_;},evaluate:function(context){if(!this.subExpressions.length)
-return true;for(var i=0;i<this.subExpressions.length;i++){if(this.subExpressions[i].evaluate(context))
-return true;}
-return false;}};tr.c.ScriptingObjectRegistry.register(function(){var exprs=[];for(var i=0;i<arguments.length;i++){exprs.push(arguments[i]);}
-return new FilterAnyOf(exprs);},{name:'anyOf'});return{FilterAnyOf:FilterAnyOf};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasAncestor(opt_subExpression){this.subExpression=opt_subExpression;};FilterHasAncestor.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpression(expr){this.subExpression_=tr.e.tquery.Filter.normalizeFilterExpression(expr);},get subExpression(){return this.subExpression_;},evaluate:function(context){if(!this.subExpression)
-return context.ancestors.length>0;while(context.ancestors.length){context=context.pop();if(this.subExpression.evaluate(context))
-return true;}
-return false;}};tr.c.ScriptingObjectRegistry.register(function(subExpression){return new FilterHasAncestor(subExpression);},{name:'hasAncestor'});return{FilterHasAncestor:FilterHasAncestor};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasDuration(minValueOrExpected,opt_maxValue){if(minValueOrExpected!==undefined&&opt_maxValue!==undefined){this.minValue=minValueOrExpected;this.maxValue=opt_maxValue;}else{this.expected=minValueOrExpected;}};FilterHasDuration.prototype={__proto__:tr.e.tquery.Filter.prototype,evaluate:function(context){if(context.event.duration===undefined)
-return false;if(this.minValue!==undefined&&this.maxValue!==undefined){return context.event.duration>=this.minValue&&context.event.duration<=this.maxValue;}
-return this.matchValue_(context.event.duration,this.expected);}};tr.c.ScriptingObjectRegistry.register(function(minValueOrExpected,opt_maxValue){return new FilterHasDuration(minValueOrExpected,opt_maxValue);},{name:'hasDuration'});return{FilterHasDuration:FilterHasDuration};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasTitle(expected){tr.e.tquery.Filter.call(this);this.expected=expected;}
-FilterHasTitle.prototype={__proto__:tr.e.tquery.Filter.prototype,evaluate:function(context){return this.matchValue_(context.event.title,this.expected);}};tr.c.ScriptingObjectRegistry.register(function(expected){var filter=new tr.e.tquery.FilterHasTitle(expected);return filter;},{name:'hasTitle'});return{FilterHasTitle:FilterHasTitle};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterIsTopLevel(opt_subExpression){this.subExpression=opt_subExpression;}
-FilterIsTopLevel.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpression(expr){this.subExpression_=tr.e.tquery.Filter.normalizeFilterExpression(expr);},get subExpression(){return this.subExpression_;},evaluate:function(context){if(context.ancestors.length>0)
-return false;if(!this.subExpression)
-return true;return this.subExpression.evaluate(context);}};tr.c.ScriptingObjectRegistry.register(function(subExpression){return new FilterIsTopLevel(subExpression);},{name:'isTopLevel'});return{FilterIsTopLevel:FilterIsTopLevel};});'use strict';tr.exportTo('tr.e.tquery',function(){function addEventTreeToSelection(selection,event){selection.push(event);if(!event.subSlices)
-return;event.subSlices.forEach(addEventTreeToSelection.bind(undefined,selection));}
-function TQuery(model){tr.c.ScriptingObject.call(this);this.model_=model;this.parent_=undefined;this.filterExpression_=undefined;this.selection_=undefined;};TQuery.prototype={__proto__:tr.c.ScriptingObject.prototype,onModelChanged:function(model){this.model_=model;this.selection_=undefined;},get brushingStateController(){return this.brushingStateController_;},filter:function(filterExpression){var result=new TQuery(this.model_);result.parent_=this;result.filterExpression_=tr.e.tquery.Filter.normalizeFilterExpression(filterExpression);return result;},createFilterTaskGraph_:function(){var nodes=[];var node=this;while(node!==undefined){nodes.push(node);node=node.parent_;}
-var rootTask=new tr.b.Task();var lastTask=rootTask;for(var i=nodes.length-1;i>=0;i--){var node=nodes[i];if(node.selection_!==undefined)
-continue;node.selection_=new tr.model.EventSet();if(node.parent_===undefined){lastTask=lastTask.after(this.selectEverythingAsTask_(node.selection_));}else{var prevNode=nodes[i+1];lastTask=this.createFilterTaskForNode_(lastTask,node,prevNode);}}
-return{rootTask:rootTask,lastTask:lastTask,lastNode:node};},createFilterTaskForNode_:function(lastTask,node,prevNode){return lastTask.after(function(){node.evaluateFilterExpression_(prevNode.selection_,node.selection_);},this);},evaluateFilterExpression_:function(inputSelection,outputSelection){var seenEvents={};inputSelection.forEach(function(event){var context=new tr.e.tquery.Context();context.event=event;this.evaluateFilterExpressionForEvent_(context,inputSelection,outputSelection,seenEvents);}.bind(this));},evaluateFilterExpressionForEvent_:function(context,inputSelection,outputSelection,seenEvents){var event=context.event;if(inputSelection.contains(event)&&!seenEvents[event.guid]){seenEvents[event.guid]=true;if(!this.filterExpression_||this.filterExpression_.evaluate(context))
-outputSelection.push(event);}
-if(!event.subSlices)
-return;context=context.push(event);for(var i=0;i<event.subSlices.length;i++){context.event=event.subSlices[i];this.evaluateFilterExpressionForEvent_(context,inputSelection,outputSelection,seenEvents);}},selectEverythingAsTask_:function(selection){var filterTask=new tr.b.Task();this.model_.iterateAllEventContainers(function(container){filterTask.subTask(function(){container.iterateAllEventsInThisContainer(function(){return true;},addEventTreeToSelection.bind(undefined,selection));},this);},this);return filterTask;},ready:function(){return new Promise(function(resolve,reject){var graph=this.createFilterTaskGraph_();graph.lastTask=graph.lastTask.after(function(){resolve(this.selection_);},this);tr.b.Task.RunWhenIdle(graph.rootTask);}.bind(this));},get selection(){if(this.selection_===undefined){var graph=this.createFilterTaskGraph_();tr.b.Task.RunSynchronously(graph.rootTask);}
-return this.selection_;}};tr.c.ScriptingObjectRegistry.register(new TQuery(),{name:'$t'});return{TQuery:TQuery};});'use strict';Polymer('tr-ui-scripting-control',{_isEnterKey:function(event){return event.keyCode!==229&&event.keyIdentifier==='Enter';},_setFocused:function(focused){var promptEl=this.$.prompt;if(focused){promptEl.focus();this.$.root.classList.add('focused');if(promptEl.innerText.length>0){var sel=window.getSelection();sel.collapse(promptEl.firstChild,promptEl.innerText.length);}}else{promptEl.blur();this.$.root.classList.remove('focused');var parent=promptEl.parentElement;var nextEl=promptEl.nextSibling;promptEl.remove();parent.insertBefore(promptEl,nextEl);}},onConsoleFocus:function(e){e.stopPropagation();this._setFocused(true);},onConsoleBlur:function(e){e.stopPropagation();this._setFocused(false);},promptKeyDown:function(e){e.stopPropagation();if(!this._isEnterKey(e))
-return;var promptEl=this.$.prompt;var command=promptEl.innerText;if(command.length===0)
-return;promptEl.innerText='';this.addLine_(String.fromCharCode(187)+' '+command);try{var result=this.controller_.executeCommand(command);}catch(e){result=e.stack||e.stackTrace;}
-if(result instanceof tr.e.tquery.TQuery){result.ready().then(function(selection){this.addLine_(selection.length+' matches');this.controller_.brushingStateController.showScriptControlSelection(selection);}.bind(this));}else{this.addLine_(result);}},addLine_:function(line){var historyEl=this.$.history;if(historyEl.innerText.length!==0)
-historyEl.innerText+='\n';historyEl.innerText+=line;},promptKeyPress:function(e){e.stopPropagation();},toggleVisibility:function(){var root=this.$.root;if(!this.visible){root.classList.remove('hidden');this._setFocused(true);}else{root.classList.add('hidden');this._setFocused(false);}},get hasFocus(){return this===document.activeElement;},get visible(){var root=this.$.root;return!root.classList.contains('hidden');},get controller(){return this.controller_;},set controller(c){this.controller_=c;}});'use strict';Polymer('tr-ui-side-panel',{ready:function(){},get rangeOfInterest(){throw new Error('Not implemented');},set rangeOfInterest(rangeOfInterest){throw new Error('Not implemented');},get selection(){throw new Error('Not implemented');},set selection(selection){throw new Error('Not implemented');},get model(){throw new Error('Not implemented');},set model(model){throw new Error('Not implemented');},get listeningToKeys(){throw new Error('Not implemented');},supportsModel:function(m){throw new Error('Not implemented');}});'use strict';Polymer('tr-ui-side-panel-container',{ready:function(){this.activePanelContainer_=this.$.active_panel_container;this.tabStrip_=this.$.tab_strip;this.rangeOfInterest_=new tr.b.Range();this.brushingStateController_=undefined;this.onSelectionChanged_=this.onSelectionChanged_.bind(this);this.onModelChanged_=this.onModelChanged_.bind(this);},get brushingStateController(){return this.brushingStateController_;},set brushingStateController(brushingStateController){if(this.brushingStateController){this.brushingStateController_.removeEventListener('change',this.onSelectionChanged_);this.brushingStateController_.removeEventListener('model-changed',this.onModelChanged_);}
-this.brushingStateController_=brushingStateController;if(this.brushingStateController){this.brushingStateController_.addEventListener('change',this.onSelectionChanged_);this.brushingStateController_.addEventListener('model-changed',this.onModelChanged_);}},get selection(){return this.brushingStateController_.selection;},onSelectionChanged_:function(){if(this.activePanel)
-this.activePanel.selection=this.selection;},get model(){return this.brushingStateController_.model;},onModelChanged_:function(){this.activePanelType_=undefined;this.updateContents_();},get expanded(){this.hasAttribute('expanded');},get activePanel(){if(this.activePanelContainer_.children.length===0)
-return undefined;return this.activePanelContainer_.children[0];},get activePanelType(){return this.activePanelType_;},set activePanelType(panelType){if(this.model===undefined)
-throw new Error('Cannot activate panel without a model');var panel=undefined;if(panelType)
-panel=document.createElement(panelType);if(panel!==undefined&&!panel.supportsModel(this.model))
-throw new Error('Cannot activate panel: does not support this model');if(this.activePanelType){this.getLabelElementForPanelType_(this.activePanelType).removeAttribute('selected');}
-this.activePanelContainer_.textContent='';if(panelType===undefined){this.removeAttribute('expanded');this.activePanelType_=undefined;return;}
-this.getLabelElementForPanelType_(panelType).setAttribute('selected',true);this.setAttribute('expanded',true);this.activePanelContainer_.appendChild(panel);panel.rangeOfInterest=this.rangeOfInterest_;panel.selection=this.selection_;panel.model=this.model;this.activePanelType_=panelType;},getPanelTypeForConstructor_:function(constructor){for(var i=0;i<this.tabStrip_.children.length;i++){if(this.tabStrip_.children[i].panelType.constructor==constructor)
-return this.tabStrip_.children[i].panelType;}},getLabelElementForPanelType_:function(panelType){for(var i=0;i<this.tabStrip_.children.length;i++){if(this.tabStrip_.children[i].panelType==panelType)
-return this.tabStrip_.children[i];}
-return undefined;},updateContents_:function(){var previouslyActivePanelType=this.activePanelType;this.tabStrip_.textContent='';var supportedPanelTypes=[];var panelTypes=tr.ui.b.getPolymerElementsThatSubclass('tr-ui-side-panel');panelTypes.forEach(function(panelType){var labelEl=document.createElement('tab-strip-label');var panel=document.createElement(panelType);labelEl.textContent=panel.textLabel;labelEl.panelType=panelType;var supported=panel.supportsModel(this.model);if(this.model&&supported.supported){supportedPanelTypes.push(panelType);labelEl.setAttribute('enabled',true);labelEl.addEventListener('click',function(){this.activePanelType=this.activePanelType===panelType?undefined:panelType;}.bind(this));}else{labelEl.title='Not supported for the current trace: '+
-supported.reason;labelEl.style.display='none';}
-this.tabStrip_.appendChild(labelEl);},this);if(previouslyActivePanelType&&supportedPanelTypes.indexOf(previouslyActivePanelType)!=-1){this.activePanelType=previouslyActivePanelType;this.setAttribute('expanded',true);}else{this.activePanelContainer_.textContent='';this.removeAttribute('expanded');}},get rangeOfInterest(){return this.rangeOfInterest_;},set rangeOfInterest(range){if(range==undefined)
-throw new Error('Must not be undefined');this.rangeOfInterest_=range;if(this.activePanel)
-this.activePanel.rangeOfInterest=range;}});'use strict';Polymer('tr-ui-timeline-view-help-overlay',{ready:function(){var mod=tr.isMac?'cmd ':'ctrl';var spans=this.shadowRoot.querySelectorAll('span.mod');for(var i=0;i<spans.length;i++){spans[i].textContent=mod;}}});'use strict';tr.exportTo('tr.b.u',function(){function GenericTable(items){if(items!==undefined)
-this.items=items;else
-this.items=[];};GenericTable.prototype={};return{GenericTable:GenericTable};});'use strict';tr.exportTo('tr.ui.units',function(){var ArrayOfNumbersSummaryModes={AVERAGE_MODE:'average-mode',TOTAL_MODE:'total-mode'};return{ArrayOfNumbersSummaryModes:ArrayOfNumbersSummaryModes};});'use strict';Polymer('tr-ui-u-array-of-numbers-span',{created:function(){this.numbers_=undefined;this.summaryMode_=tr.ui.units.ArrayOfNumbersSummaryModes.AVERAGE_MODE;},get summaryMode(){return this.summaryMode_;},set summaryMode(summaryMode){this.summaryMode_=summaryMode;this.updateContents_();},get numbers(){return this.numbers_;},set numbers(numbers){if(numbers===undefined){this.numbers_=undefined;this.updateContents_();return;}
-if(!(numbers instanceof Array))
-throw new Error('Must provide an array');this.numbers_=numbers;this.updateContents_();},updateContents_:function(){if(this.numbers_===undefined){this.shadowRoot.textContent='-';return;}
-var ArrayOfNumbersSummaryModes=tr.ui.units.ArrayOfNumbersSummaryModes;var value;if(this.summaryMode_===ArrayOfNumbersSummaryModes.AVERAGE_MODE)
-value=tr.b.Statistics.mean(this.numbers_);else
-value=tr.b.Statistics.sum(this.numbers_);var valueRounded=Math.round(value*1000.0)/1000.0;this.shadowRoot.textContent=valueRounded;}});'use strict';tr.exportTo('tr.ui.units',function(){var TEXT_COLUMN_MODE=1;var NUMERIC_COLUMN_MODE=2;var ELEMENT_COLUMN_MODE=3;function isNumeric(value){if((typeof value)==='number')
-return true;else if(value instanceof Number)
-return true;return false;}
-function GenericTableViewTotalsItem(opt_values){if(opt_values!==undefined)
-this.values=opt_values;else
-this.values=[];}
-function GenericTableViewColumnDescriptor(fieldName,firstFieldValue){this.title=fieldName;this.fieldName=fieldName;this.updateModeGivenValue(firstFieldValue);}
-GenericTableViewColumnDescriptor.prototype={get columnMode(){return this.columnMode_;},get isInNumericMode(){return this.columnMode_===NUMERIC_COLUMN_MODE;},cmp:function(a,b){if(this.columnMode_===ELEMENT_COLUMN_MODE)
-return 0;return tr.b.comparePossiblyUndefinedValues(a,b,function(a,b){var vA=a[this.fieldName];var vB=b[this.fieldName];return tr.b.comparePossiblyUndefinedValues(vA,vB,function(vA,vB){if(vA.localeCompare)
-return vA.localeCompare(vB);return vA-vB;},this);},this);},updateModeGivenValue:function(fieldValue){if(this.columnMode_===undefined){if(fieldValue===undefined||fieldValue===null)
-return;if(isNumeric(fieldValue)){this.columnMode_=NUMERIC_COLUMN_MODE;return;}
-if(fieldValue instanceof HTMLElement){this.columnMode_=ELEMENT_COLUMN_MODE;return;}
-this.columnMode_=TEXT_COLUMN_MODE;return;}
-if(fieldValue===undefined||fieldValue===null)
-return;if(isNumeric(fieldValue))
-return;if(fieldValue instanceof HTMLElement){this.columnMode_=ELEMENT_COLUMN_MODE;return;}
-if(this.columnMode_===NUMERIC_COLUMN_MODE)
-this.columnMode_=TEXT_COLUMN_MODE;},value:function(item){var fieldValue=item[this.fieldName];if(fieldValue instanceof GenericTableViewTotalsItem){var span=document.createElement('tr-ui-u-array-of-numbers-span');span.summaryMode=tr.ui.units.ArrayOfNumbersSummaryModes.TOTAL_MODE;span.numbers=fieldValue.values;return span;}
-if(fieldValue===undefined)
-return'-';if(fieldValue instanceof HTMLElement)
-return fieldValue;if(fieldValue instanceof Object){var gov=document.createElement('tr-ui-a-generic-object-view');gov.object=fieldValue;return gov;}
-return fieldValue;}};Polymer('tr-ui-u-generic-table-view',{created:function(){this.items_=undefined;this.importantColumNames_=[];},get items(){return this.items_;},set items(itemsOrGenericTable){if(itemsOrGenericTable===undefined){this.items_=undefined;}else if(itemsOrGenericTable instanceof Array){this.items_=itemsOrGenericTable;}else if(itemsOrGenericTable instanceof tr.b.u.GenericTable){this.items_=itemsOrGenericTable.items;}
-this.updateContents_();},get importantColumNames(){return this.importantColumNames_;},set importantColumNames(importantColumNames){this.importantColumNames_=importantColumNames;this.updateContents_();},createColumns_:function(){var columnsByName={};this.items_.forEach(function(item){tr.b.iterItems(item,function(itemFieldName,itemFieldValue){var colDesc=columnsByName[itemFieldName];if(colDesc!==undefined){colDesc.updateModeGivenValue(itemFieldValue);return;}
-colDesc=new GenericTableViewColumnDescriptor(itemFieldName,itemFieldValue);columnsByName[itemFieldName]=colDesc;},this);},this);var columns=tr.b.dictionaryValues(columnsByName);if(columns.length===0)
-return undefined;var isColumnNameImportant={};var importantColumNames=this.importantColumNames||[];importantColumNames.forEach(function(icn){isColumnNameImportant[icn]=true;});columns.sort(function(a,b){var iA=isColumnNameImportant[a.title]?1:0;var iB=isColumnNameImportant[b.title]?1:0;if((iB-iA)!==0)
-return iB-iA;return a.title.localeCompare(b.title);});var colWidthPercentage;if(columns.length==1)
-colWidthPercentage='100%';else
-colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';columns[0].width='250px';for(var i=1;i<columns.length;i++)
-columns[i].width=colWidthPercentage;return columns;},createFooterRowsIfNeeded_:function(columns){var hasColumnThatIsNumeric=columns.some(function(column){return column.isInNumericMode;});if(!hasColumnThatIsNumeric)
-return[];var totalsItems={};columns.forEach(function(column){if(!column.isInNumericMode)
-return;var totalsItem=new GenericTableViewTotalsItem();this.items_.forEach(function(item){var fieldValue=item[column.fieldName];if(fieldValue===undefined||fieldValue===null)
-return;totalsItem.values.push(fieldValue);});totalsItems[column.fieldName]=totalsItem;},this);return[totalsItems];},updateContents_:function(){var columns;if(this.items_!==undefined)
-columns=this.createColumns_();if(!columns){this.$.table.tableColumns=[];this.$.table.tableRows=[];this.$.table.footerRows=[];return;}
-this.$.table.tableColumns=columns;this.$.table.tableRows=this.items_;this.$.table.footerRows=this.createFooterRowsIfNeeded_(columns);this.$.table.rebuild();},get selectionMode(){return this.$.table.selectionMode;},set selectionMode(selectionMode){this.$.table.selectionMode=selectionMode;},get rowHighlightStyle(){return this.$.table.rowHighlightStyle;},set rowHighlightStyle(rowHighlightStyle){this.$.table.rowHighlightStyle=rowHighlightStyle;},get cellHighlightStyle(){return this.$.table.cellHighlightStyle;},set cellHighlightStyle(cellHighlightStyle){this.$.table.cellHighlightStyle=cellHighlightStyle;}});return{GenericTableViewTotalsItem:GenericTableViewTotalsItem,GenericTableViewColumnDescriptor:GenericTableViewColumnDescriptor};});'use strict';Polymer('tr-ui-timeline-view-metadata-overlay',{created:function(){this.metadata_=undefined;},get metadata(){return this.metadata_;},set metadata(metadata){this.metadata_=metadata;this.$.gtv.items=this.metadata_;}});'use strict';Polymer('tr-ui-u-preferred-display-unit',{ready:function(){this.preferredTimeDisplayMode_=undefined;},attached:function(){tr.b.u.Units.didPreferredTimeDisplayUnitChange();},detached:function(){tr.b.u.Units.didPreferredTimeDisplayUnitChange();},get preferredTimeDisplayMode(){return this.preferredTimeDisplayMode_;},set preferredTimeDisplayMode(v){if(this.preferredTimeDisplayMode_===v)
-return;this.preferredTimeDisplayMode_=v;tr.b.u.Units.didPreferredTimeDisplayUnitChange();}});'use strict';Polymer('tr-ui-timeline-view',{ready:function(){this.tabIndex=0;this.titleEl_=this.$.title;this.leftControlsEl_=this.$.left_controls;this.rightControlsEl_=this.$.right_controls;this.collapsingControlsEl_=this.$.collapsing_controls;this.sidePanelContainer_=this.$.side_panel_container;this.brushingStateController_=new tr.c.BrushingStateController(this);this.findCtl_=this.$.view_find_control;this.findCtl_.controller=new tr.ui.FindController(this.brushingStateController_);this.scriptingCtl_=document.createElement('tr-ui-scripting-control');this.scriptingCtl_.controller=new tr.c.ScriptingController(this.brushingStateController_);this.sidePanelContainer_.brushingStateController=this.brushingStateController_;if(window.tr.e&&window.tr.e.rail&&window.tr.e.rail.RAILScore){this.railScoreSpan_=document.createElement('tr-ui-e-rail-rail-score-span');this.rightControls.appendChild(this.railScoreSpan_);}else{this.railScoreSpan_=undefined;}
-this.optionsDropdown_=this.$.view_options_dropdown;this.optionsDropdown_.iconElement.textContent='View Options';this.showFlowEvents_=false;this.optionsDropdown_.appendChild(tr.ui.b.createCheckBox(this,'showFlowEvents','tr.ui.TimelineView.showFlowEvents',false,'Flow events'));this.highlightVSync_=false;this.highlightVSyncCheckbox_=tr.ui.b.createCheckBox(this,'highlightVSync','tr.ui.TimelineView.highlightVSync',false,'Highlight VSync');this.optionsDropdown_.appendChild(this.highlightVSyncCheckbox_);this.initMetadataButton_();this.initConsoleButton_();this.initHelpButton_();this.collapsingControls.appendChild(this.scriptingCtl_);this.dragEl_=this.$.drag_handle;tr.ui.b.decorate(this.dragEl_,tr.ui.b.DragHandle);this.analysisEl_=this.$.analysis;this.analysisEl_.brushingStateController=this.brushingStateController_;this.addEventListener('requestSelectionChange',function(e){var sc=this.brushingStateController_;sc.changeSelectionFromRequestSelectionChangeEvent(e.selection);}.bind(this));this.onViewportChanged_=this.onViewportChanged_.bind(this);this.bindKeyListeners_();this.dragEl_.target=this.analysisEl_;},domReady:function(){this.trackViewContainer_=this.querySelector('#track_view_container');},get globalMode(){return this.hotkeyController.globalMode;},set globalMode(globalMode){globalMode=!!globalMode;this.brushingStateController_.historyEnabled=globalMode;this.hotkeyController.globalMode=globalMode;},get hotkeyController(){return this.$.hkc;},updateDocumentFavicon:function(){var hue;if(!this.model)
-hue='blue';else
-hue=this.model.faviconHue;var faviconData=tr.ui.b.FaviconsByHue[hue];if(faviconData===undefined)
-faviconData=tr.ui.b.FaviconsByHue['blue'];var link=document.head.querySelector('link[rel="shortcut icon"]');if(!link){link=document.createElement('link');link.rel='shortcut icon';document.head.appendChild(link);}
-link.href=faviconData;},get showFlowEvents(){return this.showFlowEvents_;},set showFlowEvents(showFlowEvents){this.showFlowEvents_=showFlowEvents;if(!this.trackView_)
-return;this.trackView_.viewport.showFlowEvents=showFlowEvents;},get highlightVSync(){return this.highlightVSync_;},set highlightVSync(highlightVSync){this.highlightVSync_=highlightVSync;if(!this.trackView_)
-return;this.trackView_.viewport.highlightVSync=highlightVSync;},initHelpButton_:function(){var helpButtonEl=this.$.view_help_button;function onClick(e){var dlg=new tr.ui.b.Overlay();dlg.title='Chrome Tracing Help';dlg.appendChild(document.createElement('tr-ui-timeline-view-help-overlay'));dlg.visible=true;e.stopPropagation();}
-helpButtonEl.addEventListener('click',onClick.bind(this));},initConsoleButton_:function(){var toggleEl=this.$.view_console_button;function onClick(e){this.scriptingCtl_.toggleVisibility();e.stopPropagation();return false;}
-toggleEl.addEventListener('click',onClick.bind(this));},initMetadataButton_:function(){var showEl=this.$.view_metadata_button;function onClick(e){var dlg=new tr.ui.b.Overlay();dlg.title='Metadata for trace';var metadataOverlay=document.createElement('tr-ui-timeline-view-metadata-overlay');metadataOverlay.metadata=this.model.metadata;dlg.appendChild(metadataOverlay);dlg.visible=true;e.stopPropagation();return false;}
-showEl.addEventListener('click',onClick.bind(this));this.updateMetadataButtonVisibility_();},updateMetadataButtonVisibility_:function(){var showEl=this.$.view_metadata_button;showEl.style.display=(this.model&&this.model.metadata.length)?'':'none';},get leftControls(){return this.leftControlsEl_;},get rightControls(){return this.rightControlsEl_;},get collapsingControls(){return this.collapsingControlsEl_;},get viewTitle(){return this.titleEl_.textContent.substring(this.titleEl_.textContent.length-2);},set viewTitle(text){if(text===undefined){this.titleEl_.textContent='';this.titleEl_.hidden=true;return;}
-this.titleEl_.hidden=false;this.titleEl_.textContent=text;},get model(){if(this.trackView_)
-return this.trackView_.model;return undefined;},set model(model){var modelInstanceChanged=model!=this.model;var modelValid=model&&!model.bounds.isEmpty;var importWarningsEl=this.shadowRoot.querySelector('#import-warnings');importWarningsEl.textContent='';if(modelInstanceChanged){if(this.railScoreSpan_)
-this.railScoreSpan_.railScore=undefined;this.trackViewContainer_.textContent='';if(this.trackView_){this.trackView_.viewport.removeEventListener('change',this.onViewportChanged_);this.trackView_.brushingStateController=undefined;this.trackView_.detach();this.trackView_=undefined;}
-this.brushingStateController_.modelWillChange();}
-if(modelValid&&!this.trackView_){this.trackView_=document.createElement('tr-ui-timeline-track-view');this.trackView_.timelineView=this;this.trackView.brushingStateController=this.brushingStateController_;this.trackViewContainer_.appendChild(this.trackView_);this.trackView_.viewport.addEventListener('change',this.onViewportChanged_);}
-if(modelValid){this.trackView_.model=model;this.trackView_.viewport.showFlowEvents=this.showFlowEvents;this.trackView_.viewport.highlightVSync=this.highlightVSync;if(this.railScoreSpan_){var railScore=tr.e.rail.RAILScore.fromModel(model);this.railScoreSpan_.railScore=railScore;}
-this.$.display_unit.preferredTimeDisplayMode=model.intrinsicTimeUnit;}
-if(model){model.importWarningsThatShouldBeShownToUser.forEach(function(importWarning){importWarningsEl.addMessage('Import Warning: '+importWarning.type+': '+
-importWarning.message);},this);}
-if(modelInstanceChanged){this.updateMetadataButtonVisibility_();this.brushingStateController_.modelDidChange();this.onViewportChanged_();}},get brushingStateController(){return this.brushingStateController_;},get trackView(){return this.trackView_;},get settings(){if(!this.settings_)
-this.settings_=new tr.b.Settings();return this.settings_;},set focusElement(value){throw new Error('This is deprecated. Please set globalMode to true.');},bindKeyListeners_:function(){var hkc=this.hotkeyController;hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',keyCode:'`'.charCodeAt(0),useCapture:true,thisArg:this,callback:function(e){this.scriptingCtl_.toggleVisibility();if(!this.scriptingCtl_.hasFocus)
-this.focus();e.stopPropagation();}}));hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',keyCode:'/'.charCodeAt(0),useCapture:true,thisArg:this,callback:function(e){if(this.scriptingCtl_.hasFocus)
-return;if(this.findCtl_.hasFocus)
-this.focus();else
-this.findCtl_.focus();e.preventDefault();e.stopPropagation();}}));hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',keyCode:'?'.charCodeAt(0),useCapture:false,thisArg:this,callback:function(e){this.$.view_help_button.click();e.stopPropagation();}}));hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',keyCode:'v'.charCodeAt(0),useCapture:false,thisArg:this,callback:function(e){this.toggleHighlightVSync_();e.stopPropagation();}}));},onViewportChanged_:function(e){var spc=this.sidePanelContainer_;if(!this.trackView_){spc.rangeOfInterest.reset();return;}
-var vr=this.trackView_.viewport.interestRange.asRangeObject();if(!spc.rangeOfInterest.equals(vr))
-spc.rangeOfInterest=vr;},toggleHighlightVSync_:function(){this.highlightVSyncCheckbox_.checked=!this.highlightVSyncCheckbox_.checked;},setFindCtlText:function(string){this.findCtl_.setText(string);}});'use strict';tr.exportTo('tr.e.cc',function(){function PictureAsImageData(picture,errorOrImageData){this.picture_=picture;if(errorOrImageData instanceof ImageData){this.error_=undefined;this.imageData_=errorOrImageData;}else{this.error_=errorOrImageData;this.imageData_=undefined;}};PictureAsImageData.Pending=function(picture){return new PictureAsImageData(picture,undefined);};PictureAsImageData.prototype={get picture(){return this.picture_;},get error(){return this.error_;},get imageData(){return this.imageData_;},isPending:function(){return this.error_===undefined&&this.imageData_===undefined;},asCanvas:function(){if(!this.imageData_)
-return;var canvas=document.createElement('canvas');var ctx=canvas.getContext('2d');canvas.width=this.imageData_.width;canvas.height=this.imageData_.height;ctx.putImageData(this.imageData_,0,0);return canvas;}};return{PictureAsImageData:PictureAsImageData};});'use strict';tr.exportTo('tr.e.cc',function(){var convertedNameCache={};function convertNameToJSConvention(name){if(name in convertedNameCache)
-return convertedNameCache[name];if(name[0]=='_'||name[name.length-1]=='_'){convertedNameCache[name]=name;return name;}
-var words=name.split('_');if(words.length==1){convertedNameCache[name]=words[0];return words[0];}
-for(var i=1;i<words.length;i++)
-words[i]=words[i][0].toUpperCase()+words[i].substring(1);convertedNameCache[name]=words.join('');return convertedNameCache[name];}
-function convertObjectFieldNamesToJSConventions(object){tr.b.iterObjectFieldsRecursively(object,function(object,fieldName,fieldValue){delete object[fieldName];object[newFieldName]=fieldValue;return newFieldName;});}
-function convertQuadSuffixedTypesToQuads(object){tr.b.iterObjectFieldsRecursively(object,function(object,fieldName,fieldValue){});}
-function convertObject(object){convertObjectFieldNamesToJSConventions(object);convertQuadSuffixedTypesToQuads(object);}
-function moveRequiredFieldsFromArgsToToplevel(object,fields){for(var i=0;i<fields.length;i++){var key=fields[i];if(object.args[key]===undefined)
-throw Error('Expected field '+key+' not found in args');if(object[key]!==undefined)
-throw Error('Field '+key+' already in object');object[key]=object.args[key];delete object.args[key];}}
-function moveOptionalFieldsFromArgsToToplevel(object,fields){for(var i=0;i<fields.length;i++){var key=fields[i];if(object.args[key]===undefined)
-continue;if(object[key]!==undefined)
-throw Error('Field '+key+' already in object');object[key]=object.args[key];delete object.args[key];}}
-function preInitializeObject(object){preInitializeObjectInner(object.args,false);}
-function preInitializeObjectInner(object,hasRecursed){if(!(object instanceof Object))
-return;if(object instanceof Array){for(var i=0;i<object.length;i++)
-preInitializeObjectInner(object[i],true);return;}
-if(hasRecursed&&(object instanceof tr.model.ObjectSnapshot||object instanceof tr.model.ObjectInstance))
-return;for(var key in object){var newKey=convertNameToJSConvention(key);if(newKey!=key){var value=object[key];delete object[key];object[newKey]=value;key=newKey;}
-if(/Quad$/.test(key)&&!(object[key]instanceof tr.b.Quad)){var q;try{q=tr.b.Quad.from8Array(object[key]);}catch(e){console.log(e);}
-object[key]=q;continue;}
-if(/Rect$/.test(key)&&!(object[key]instanceof tr.b.Rect)){var r;try{r=tr.b.Rect.fromArray(object[key]);}catch(e){console.log(e);}
-object[key]=r;}
-preInitializeObjectInner(object[key],true);}}
-function bytesToRoundedMegabytes(bytes){return Math.round(bytes/100000.0)/10.0;}
-return{preInitializeObject:preInitializeObject,convertNameToJSConvention:convertNameToJSConvention,moveRequiredFieldsFromArgsToToplevel:moveRequiredFieldsFromArgsToToplevel,moveOptionalFieldsFromArgsToToplevel:moveOptionalFieldsFromArgsToToplevel,bytesToRoundedMegabytes:bytesToRoundedMegabytes};});'use strict';tr.exportTo('tr.e.cc',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;var PictureCount=0;var OPS_TIMING_ITERATIONS=3;function Picture(skp64,layerRect){this.skp64_=skp64;this.layerRect_=layerRect;this.guid_=tr.b.GUID.allocate();}
-Picture.prototype={get canSave(){return true;},get layerRect(){return this.layerRect_;},get guid(){return this.guid_;},getBase64SkpData:function(){return this.skp64_;},getOps:function(){if(!PictureSnapshot.CanGetOps()){console.error(PictureSnapshot.HowToEnablePictureDebugging());return undefined;}
-var ops=window.chrome.skiaBenchmarking.getOps({skp64:this.skp64_,params:{layer_rect:this.layerRect_.toArray()}});if(!ops)
-console.error('Failed to get picture ops.');return ops;},getOpTimings:function(){if(!PictureSnapshot.CanGetOpTimings()){console.error(PictureSnapshot.HowToEnablePictureDebugging());return undefined;}
-var opTimings=window.chrome.skiaBenchmarking.getOpTimings({skp64:this.skp64_,params:{layer_rect:this.layerRect_.toArray()}});if(!opTimings)
-console.error('Failed to get picture op timings.');return opTimings;},tagOpsWithTimings:function(ops){var opTimings=new Array();for(var iteration=0;iteration<OPS_TIMING_ITERATIONS;iteration++){opTimings[iteration]=this.getOpTimings();if(!opTimings[iteration]||!opTimings[iteration].cmd_times)
-return ops;if(opTimings[iteration].cmd_times.length!=ops.length)
-return ops;}
-for(var opIndex=0;opIndex<ops.length;opIndex++){var min=Number.MAX_VALUE;for(var i=0;i<OPS_TIMING_ITERATIONS;i++)
-min=Math.min(min,opTimings[i].cmd_times[opIndex]);ops[opIndex].cmd_time=min;}
-return ops;},rasterize:function(params,rasterCompleteCallback){if(!PictureSnapshot.CanRasterize()||!PictureSnapshot.CanGetOps()){rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,tr.e.cc.PictureSnapshot.HowToEnablePictureDebugging()));return;}
-var raster=window.chrome.skiaBenchmarking.rasterize({skp64:this.skp64_,params:{layer_rect:this.layerRect_.toArray()}},{stop:params.stopIndex===undefined?-1:params.stopIndex,overdraw:!!params.showOverdraw,params:{}});if(raster){var canvas=document.createElement('canvas');var ctx=canvas.getContext('2d');canvas.width=raster.width;canvas.height=raster.height;var imageData=ctx.createImageData(raster.width,raster.height);imageData.data.set(new Uint8ClampedArray(raster.data));rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,imageData));}else{var error='Failed to rasterize picture. '+'Your recording may be from an old Chrome version. '+'The SkPicture format is not backward compatible.';rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,error));}}};function LayeredPicture(pictures){this.guid_=tr.b.GUID.allocate();this.pictures_=pictures;this.layerRect_=undefined;}
-LayeredPicture.prototype={__proto__:Picture.prototype,get canSave(){return false;},get typeName(){return'cc::LayeredPicture';},get layerRect(){if(this.layerRect_!==undefined)
-return this.layerRect_;this.layerRect_={x:0,y:0,width:0,height:0};for(var i=0;i<this.pictures_.length;++i){var rect=this.pictures_[i].layerRect;this.layerRect_.x=Math.min(this.layerRect_.x,rect.x);this.layerRect_.y=Math.min(this.layerRect_.y,rect.y);this.layerRect_.width=Math.max(this.layerRect_.width,rect.x+rect.width);this.layerRect_.height=Math.max(this.layerRect_.height,rect.y+rect.height);}
-return this.layerRect_;},get guid(){return this.guid_;},getBase64SkpData:function(){throw new Error('Not available with a LayeredPicture.');},getOps:function(){var ops=[];for(var i=0;i<this.pictures_.length;++i)
-ops=ops.concat(this.pictures_[i].getOps());return ops;},getOpTimings:function(){var opTimings=this.pictures_[0].getOpTimings();for(var i=1;i<this.pictures_.length;++i){var timings=this.pictures_[i].getOpTimings();opTimings.cmd_times=opTimings.cmd_times.concat(timings.cmd_times);opTimings.total_time+=timings.total_time;}
-return opTimings;},tagOpsWithTimings:function(ops){var opTimings=new Array();for(var iteration=0;iteration<OPS_TIMING_ITERATIONS;iteration++){opTimings[iteration]=this.getOpTimings();if(!opTimings[iteration]||!opTimings[iteration].cmd_times)
-return ops;}
-for(var opIndex=0;opIndex<ops.length;opIndex++){var min=Number.MAX_VALUE;for(var i=0;i<OPS_TIMING_ITERATIONS;i++)
-min=Math.min(min,opTimings[i].cmd_times[opIndex]);ops[opIndex].cmd_time=min;}
-return ops;},rasterize:function(params,rasterCompleteCallback){this.picturesAsImageData_=[];var rasterCallback=function(pictureAsImageData){this.picturesAsImageData_.push(pictureAsImageData);if(this.picturesAsImageData_.length!==this.pictures_.length)
-return;var canvas=document.createElement('canvas');var ctx=canvas.getContext('2d');canvas.width=this.layerRect.width;canvas.height=this.layerRect.height;for(var i=0;i<this.picturesAsImageData_.length;++i){ctx.putImageData(this.picturesAsImageData_[i].imageData,this.pictures_[i].layerRect.x,this.pictures_[i].layerRect.y);}
-this.picturesAsImageData_=[];rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,ctx.getImageData(this.layerRect.x,this.layerRect.y,this.layerRect.width,this.layerRect.height)));}.bind(this);for(var i=0;i<this.pictures_.length;++i)
-this.pictures_[i].rasterize(params,rasterCallback);}};function PictureSnapshot(){ObjectSnapshot.apply(this,arguments);}
-PictureSnapshot.HasSkiaBenchmarking=function(){return tr.isExported('chrome.skiaBenchmarking');}
-PictureSnapshot.CanRasterize=function(){if(!PictureSnapshot.HasSkiaBenchmarking())
-return false;if(!window.chrome.skiaBenchmarking.rasterize)
-return false;return true;}
-PictureSnapshot.CanGetOps=function(){if(!PictureSnapshot.HasSkiaBenchmarking())
-return false;if(!window.chrome.skiaBenchmarking.getOps)
-return false;return true;}
-PictureSnapshot.CanGetOpTimings=function(){if(!PictureSnapshot.HasSkiaBenchmarking())
-return false;if(!window.chrome.skiaBenchmarking.getOpTimings)
-return false;return true;}
-PictureSnapshot.CanGetInfo=function(){if(!PictureSnapshot.HasSkiaBenchmarking())
-return false;if(!window.chrome.skiaBenchmarking.getInfo)
-return false;return true;}
-PictureSnapshot.HowToEnablePictureDebugging=function(){if(tr.isHeadless)
-return'Pictures only work in chrome';var usualReason=['For pictures to show up, you need to have Chrome running with ','--enable-skia-benchmarking. Please restart chrome with this flag ','and try again.'].join('');if(!tr.isExported('global.chrome.skiaBenchmarking'))
-return usualReason;if(!global.chrome.skiaBenchmarking.rasterize)
-return'Your chrome is old';if(!global.chrome.skiaBenchmarking.getOps)
-return'Your chrome is old: skiaBenchmarking.getOps not found';if(!global.chrome.skiaBenchmarking.getOpTimings)
-return'Your chrome is old: skiaBenchmarking.getOpTimings not found';if(!global.chrome.skiaBenchmarking.getInfo)
-return'Your chrome is old: skiaBenchmarking.getInfo not found';return'Rasterizing is on';}
-PictureSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);this.rasterResult_=undefined;},initialize:function(){if(this.args.alias)
-this.args=this.args.alias.args;if(!this.args.params.layerRect)
-throw new Error('Missing layer rect');this.layerRect_=this.args.params.layerRect;this.picture_=new Picture(this.args.skp64,this.args.params.layerRect);},set picture(picture){this.picture_=picture;},get canSave(){return this.picture_.canSave;},get layerRect(){return this.layerRect_?this.layerRect_:this.picture_.layerRect;},get guid(){return this.picture_.guid;},getBase64SkpData:function(){return this.picture_.getBase64SkpData();},getOps:function(){return this.picture_.getOps();},getOpTimings:function(){return this.picture_.getOpTimings();},tagOpsWithTimings:function(ops){return this.picture_.tagOpsWithTimings(ops);},rasterize:function(params,rasterCompleteCallback){this.picture_.rasterize(params,rasterCompleteCallback);}};ObjectSnapshot.register(PictureSnapshot,{typeNames:['cc::Picture']});return{PictureSnapshot:PictureSnapshot,Picture:Picture,LayeredPicture:LayeredPicture};});'use strict';tr.exportTo('tr.e.cc',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function DisplayItemList(skp64,layerRect){tr.e.cc.Picture.apply(this,arguments);}
-DisplayItemList.prototype={__proto__:tr.e.cc.Picture.prototype};function DisplayItemListSnapshot(){tr.e.cc.PictureSnapshot.apply(this,arguments);}
-DisplayItemListSnapshot.prototype={__proto__:tr.e.cc.PictureSnapshot.prototype,initialize:function(){tr.e.cc.PictureSnapshot.prototype.initialize.call(this);this.displayItems_=this.args.params.items;},get items(){return this.displayItems_;}};ObjectSnapshot.register(DisplayItemListSnapshot,{typeNames:['cc::DisplayItemList']});return{DisplayItemListSnapshot:DisplayItemListSnapshot,DisplayItemList:DisplayItemList};});'use strict';tr.exportTo('tr.e.cc',function(){var constants={};constants.ACTIVE_TREE=0;constants.PENDING_TREE=1;constants.HIGH_PRIORITY_BIN=0;constants.LOW_PRIORITY_BIN=1;constants.SEND_BEGIN_FRAME_EVENT='ThreadProxy::ScheduledActionSendBeginMainFrame';constants.BEGIN_MAIN_FRAME_EVENT='ThreadProxy::BeginMainFrame';return{constants:constants};});'use strict';tr.exportTo('tr.e.cc',function(){function Region(){this.rects=[];}
-Region.fromArray=function(array){if(array.length%4!=0)
-throw new Error('Array must consist be a multiple of 4 in length');var r=new Region();for(var i=0;i<array.length;i+=4){r.rects.push(tr.b.Rect.fromXYWH(array[i],array[i+1],array[i+2],array[i+3]));}
-return r;}
-Region.fromArrayOrUndefined=function(array){if(array===undefined)
-return new Region();return Region.fromArray(array);};Region.prototype={__proto__:Region.prototype,rectIntersects:function(r){for(var i=0;i<this.rects.length;i++){if(this.rects[i].intersects(r))
-return true;}
-return false;},addRect:function(r){this.rects.push(r);}};return{Region:Region};});'use strict';tr.exportTo('tr.e.cc',function(){function TileCoverageRect(rect,tile){this.geometryRect=rect;this.tile=tile;}
-return{TileCoverageRect:TileCoverageRect};});'use strict';tr.exportTo('tr.e.cc',function(){var constants=tr.e.cc.constants;var ObjectSnapshot=tr.model.ObjectSnapshot;function LayerImplSnapshot(){ObjectSnapshot.apply(this,arguments);}
-LayerImplSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);this.layerTreeImpl_=undefined;this.parentLayer=undefined;},initialize:function(){this.invalidation=new tr.e.cc.Region();this.annotatedInvalidation=new tr.e.cc.Region();this.unrecordedRegion=new tr.e.cc.Region();this.pictures=[];tr.e.cc.moveRequiredFieldsFromArgsToToplevel(this,['layerId','children','layerQuad']);tr.e.cc.moveOptionalFieldsFromArgsToToplevel(this,['maskLayer','replicaLayer','idealContentsScale','geometryContentsScale','layoutRects','usingGpuRasterization']);this.gpuMemoryUsageInBytes=this.args.gpuMemoryUsage;this.bounds=tr.b.Rect.fromXYWH(0,0,this.args.bounds.width,this.args.bounds.height);if(this.args.animationBounds){this.animationBoundsRect=tr.b.Rect.fromXYWH(this.args.animationBounds[0],this.args.animationBounds[1],this.args.animationBounds[3],this.args.animationBounds[4]);}
-for(var i=0;i<this.children.length;i++)
-this.children[i].parentLayer=this;if(this.maskLayer)
-this.maskLayer.parentLayer=this;if(this.replicaLayer)
-this.replicaLayer.parentLayer=this;if(!this.geometryContentsScale)
-this.geometryContentsScale=1.0;if(!this.idealContentsScale)
-this.idealContentsScale=1.0;this.touchEventHandlerRegion=tr.e.cc.Region.fromArrayOrUndefined(this.args.touchEventHandlerRegion);this.wheelEventHandlerRegion=tr.e.cc.Region.fromArrayOrUndefined(this.args.wheelEventHandlerRegion);this.nonFastScrollableRegion=tr.e.cc.Region.fromArrayOrUndefined(this.args.nonFastScrollableRegion);},get layerTreeImpl(){if(this.layerTreeImpl_)
-return this.layerTreeImpl_;if(this.parentLayer)
-return this.parentLayer.layerTreeImpl;return undefined;},set layerTreeImpl(layerTreeImpl){this.layerTreeImpl_=layerTreeImpl;},get activeLayer(){if(this.layerTreeImpl.whichTree==constants.ACTIVE_TREE)
-return this;var activeTree=this.layerTreeImpl.layerTreeHostImpl.activeTree;return activeTree.findLayerWithId(this.layerId);},get pendingLayer(){if(this.layerTreeImpl.whichTree==constants.PENDING_TREE)
-return this;var pendingTree=this.layerTreeImpl.layerTreeHostImpl.pendingTree;return pendingTree.findLayerWithId(this.layerId);}};function PictureLayerImplSnapshot(){LayerImplSnapshot.apply(this,arguments);}
-PictureLayerImplSnapshot.prototype={__proto__:LayerImplSnapshot.prototype,initialize:function(){LayerImplSnapshot.prototype.initialize.call(this);if(this.args.invalidation){this.invalidation=tr.e.cc.Region.fromArray(this.args.invalidation);delete this.args.invalidation;}
-if(this.args.annotatedInvalidationRects){this.annotatedInvalidation=new tr.e.cc.Region();for(var i=0;i<this.args.annotatedInvalidationRects.length;++i){var annotatedRect=this.args.annotatedInvalidationRects[i];var rect=annotatedRect.geometryRect;rect.reason=annotatedRect.reason;this.annotatedInvalidation.addRect(rect);}
-delete this.args.annotatedInvalidationRects;}
-if(this.args.unrecordedRegion){this.unrecordedRegion=tr.e.cc.Region.fromArray(this.args.unrecordedRegion);delete this.args.unrecordedRegion;}
-if(this.args.pictures){this.pictures=this.args.pictures;this.pictures.sort(function(a,b){return a.ts-b.ts;});}
-this.tileCoverageRects=[];if(this.args.coverageTiles){for(var i=0;i<this.args.coverageTiles.length;++i){var rect=this.args.coverageTiles[i].geometryRect.scale(this.idealContentsScale);var tile=this.args.coverageTiles[i].tile;this.tileCoverageRects.push(new tr.e.cc.TileCoverageRect(rect,tile));}
-delete this.args.coverageTiles;}}};ObjectSnapshot.register(PictureLayerImplSnapshot,{typeName:'cc::PictureLayerImpl'});ObjectSnapshot.register(LayerImplSnapshot,{typeNames:['cc::LayerImpl','cc::DelegatedRendererLayerImpl','cc::HeadsUpDisplayLayerImpl','cc::IOSurfaceLayerImpl','cc::NinePatchLayerImpl','cc::PictureImageLayerImpl','cc::ScrollbarLayerImpl','cc::SolidColorLayerImpl','cc::SurfaceLayerImpl','cc::TextureLayerImpl','cc::TiledLayerImpl','cc::VideoLayerImpl','cc::PaintedScrollbarLayerImpl','ClankPatchLayer','TabBorderLayer','CounterLayer']});return{LayerImplSnapshot:LayerImplSnapshot,PictureLayerImplSnapshot:PictureLayerImplSnapshot};});'use strict';tr.exportTo('tr.e.cc',function(){var constants=tr.e.cc.constants;var ObjectSnapshot=tr.model.ObjectSnapshot;function LayerTreeImplSnapshot(){ObjectSnapshot.apply(this,arguments);}
-LayerTreeImplSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);this.layerTreeHostImpl=undefined;this.whichTree=undefined;this.sourceFrameNumber=undefined;},initialize:function(){tr.e.cc.moveRequiredFieldsFromArgsToToplevel(this,['rootLayer','renderSurfaceLayerList']);if(this.args.sourceFrameNumber)
-this.sourceFrameNumber=this.args.sourceFrameNumber;this.rootLayer.layerTreeImpl=this;if(this.args.swapPromiseTraceIds&&this.args.swapPromiseTraceIds.length){this.tracedInputLatencies=[];var ownProcess=this.objectInstance.parent;var model=ownProcess.model;if(tr.e.audits.ChromeModelHelper.supportsModel(model))
-this._initializeTracedInputLatencies(model);}},_initializeTracedInputLatencies:function(model){var modelHelper=new tr.e.audits.ChromeModelHelper(model);if(!modelHelper.browserHelper)
-return;var latencyEvents=modelHelper.browserHelper.getLatencyEventsInRange(model.bounds);latencyEvents.forEach(function(event){for(var i=0;i<this.args.swapPromiseTraceIds.length;i++){if(!event.args.data||!event.args.data.trace_id)
-continue;if(parseInt(event.args.data.trace_id)===this.args.swapPromiseTraceIds[i])
-this.tracedInputLatencies.push(event);}},this);},get hasSourceFrameBeenDrawnBefore(){if(this.whichTree==tr.e.cc.constants.PENDING_TREE)
-return false;if(this.sourceFrameNumber===undefined)
-return;var thisLTHI=this.layerTreeHostImpl;var thisLTHIIndex=thisLTHI.objectInstance.snapshots.indexOf(thisLTHI);var prevLTHIIndex=thisLTHIIndex-1;if(prevLTHIIndex<0||prevLTHIIndex>=thisLTHI.objectInstance.snapshots.length)
-return false;var prevLTHI=thisLTHI.objectInstance.snapshots[prevLTHIIndex];if(!prevLTHI.activeTree)
-return false;if(prevLTHI.activeTree.sourceFrameNumber===undefined)
-return;return prevLTHI.activeTree.sourceFrameNumber==this.sourceFrameNumber;},get otherTree(){var other=this.whichTree==constants.ACTIVE_TREE?constants.PENDING_TREE:constants.ACTIVE_TREE;return this.layerTreeHostImpl.getTree(other);},get gpuMemoryUsageInBytes(){var totalBytes=0;this.iterLayers(function(layer){if(layer.gpuMemoryUsageInBytes!==undefined)
-totalBytes+=layer.gpuMemoryUsageInBytes;});return totalBytes;},iterLayers:function(func,thisArg){var visitedLayers={};function visitLayer(layer,depth,isMask,isReplica){if(visitedLayers[layer.layerId])
-return;visitedLayers[layer.layerId]=true;func.call(thisArg,layer,depth,isMask,isReplica);if(layer.children){for(var i=0;i<layer.children.length;i++)
-visitLayer(layer.children[i],depth+1);}
-if(layer.maskLayer)
-visitLayer(layer.maskLayer,depth+1,true,false);if(layer.replicaLayer)
-visitLayer(layer.replicaLayer,depth+1,false,true);}
-visitLayer(this.rootLayer,0,false,false);},findLayerWithId:function(id){var foundLayer=undefined;function visitLayer(layer){if(layer.layerId==id)
-foundLayer=layer;}
-this.iterLayers(visitLayer);return foundLayer;}};ObjectSnapshot.register(LayerTreeImplSnapshot,{typeName:'cc::LayerTreeImpl'});return{LayerTreeImplSnapshot:LayerTreeImplSnapshot};});'use strict';tr.exportTo('tr.b',function(){function BBox2(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;};BBox2.prototype={__proto__:Object.prototype,reset:function(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;},get isEmpty(){return this.isEmpty_;},addBBox2:function(bbox2){if(bbox2.isEmpty)
-return;this.addVec2(bbox2.min_);this.addVec2(bbox2.max_);},clone:function(){var bbox=new BBox2();bbox.addBBox2(this);return bbox;},addXY:function(x,y){if(this.isEmpty_){this.max_=vec2.create();this.min_=vec2.create();vec2.set(this.max_,x,y);vec2.set(this.min_,x,y);this.isEmpty_=false;return;}
-this.max_[0]=Math.max(this.max_[0],x);this.max_[1]=Math.max(this.max_[1],y);this.min_[0]=Math.min(this.min_[0],x);this.min_[1]=Math.min(this.min_[1],y);},addVec2:function(value){if(this.isEmpty_){this.max_=vec2.create();this.min_=vec2.create();vec2.set(this.max_,value[0],value[1]);vec2.set(this.min_,value[0],value[1]);this.isEmpty_=false;return;}
-this.max_[0]=Math.max(this.max_[0],value[0]);this.max_[1]=Math.max(this.max_[1],value[1]);this.min_[0]=Math.min(this.min_[0],value[0]);this.min_[1]=Math.min(this.min_[1],value[1]);},addQuad:function(quad){this.addVec2(quad.p1);this.addVec2(quad.p2);this.addVec2(quad.p3);this.addVec2(quad.p4);},get minVec2(){if(this.isEmpty_)
-return undefined;return this.min_;},get maxVec2(){if(this.isEmpty_)
-return undefined;return this.max_;},get sizeAsVec2(){if(this.isEmpty_)
-throw new Error('Empty BBox2 has no size');var size=vec2.create();vec2.subtract(size,this.max_,this.min_);return size;},get size(){if(this.isEmpty_)
-throw new Error('Empty BBox2 has no size');return{width:this.max_[0]-this.min_[0],height:this.max_[1]-this.min_[1]};},get width(){if(this.isEmpty_)
-throw new Error('Empty BBox2 has no width');return this.max_[0]-this.min_[0];},get height(){if(this.isEmpty_)
-throw new Error('Empty BBox2 has no width');return this.max_[1]-this.min_[1];},toString:function(){if(this.isEmpty_)
-return'empty';return'min=('+this.min_[0]+','+this.min_[1]+') '+'max=('+this.max_[0]+','+this.max_[1]+')';},asRect:function(){return tr.b.Rect.fromXYWH(this.min_[0],this.min_[1],this.max_[0]-this.min_[0],this.max_[1]-this.min_[1]);}};return{BBox2:BBox2};});'use strict';tr.exportTo('tr.e.cc',function(){var constants=tr.e.cc.constants;var ObjectSnapshot=tr.model.ObjectSnapshot;var ObjectInstance=tr.model.ObjectInstance;function LayerTreeHostImplSnapshot(){ObjectSnapshot.apply(this,arguments);}
-LayerTreeHostImplSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);},initialize:function(){tr.e.cc.moveRequiredFieldsFromArgsToToplevel(this,['deviceViewportSize','activeTree']);tr.e.cc.moveOptionalFieldsFromArgsToToplevel(this,['pendingTree']);if(this.args.activeTiles!==undefined){this.activeTiles=this.args.activeTiles;delete this.args.activeTiles;}else if(this.args.tiles!==undefined){this.activeTiles=this.args.tiles;delete this.args.tiles;}
-if(!this.activeTiles)
-this.activeTiles=[];this.activeTree.layerTreeHostImpl=this;this.activeTree.whichTree=constants.ACTIVE_TREE;if(this.pendingTree){this.pendingTree.layerTreeHostImpl=this;this.pendingTree.whichTree=constants.PENDING_TREE;}},getContentsScaleNames:function(){var scales={};for(var i=0;i<this.activeTiles.length;++i){var tile=this.activeTiles[i];scales[tile.contentsScale]=tile.resolution;}
-return scales;},getTree:function(whichTree){if(whichTree==constants.ACTIVE_TREE)
-return this.activeTree;if(whichTree==constants.PENDING_TREE)
-return this.pendingTree;throw new Exception('Unknown tree type + '+whichTree);},get tilesHaveGpuMemoryUsageInfo(){if(this.tilesHaveGpuMemoryUsageInfo_!==undefined)
-return this.tilesHaveGpuMemoryUsageInfo_;for(var i=0;i<this.activeTiles.length;i++){if(this.activeTiles[i].gpuMemoryUsageInBytes===undefined)
-continue;this.tilesHaveGpuMemoryUsageInfo_=true;return true;}
-this.tilesHaveGpuMemoryUsageInfo_=false;return false;},get gpuMemoryUsageInBytes(){if(!this.tilesHaveGpuMemoryUsageInfo)
-return;var usage=0;for(var i=0;i<this.activeTiles.length;i++){var u=this.activeTiles[i].gpuMemoryUsageInBytes;if(u!==undefined)
-usage+=u;}
-return usage;},get userFriendlyName(){var frameNumber;if(!this.activeTree){frameNumber=this.objectInstance.snapshots.indexOf(this);}else{if(this.activeTree.sourceFrameNumber===undefined)
-frameNumber=this.objectInstance.snapshots.indexOf(this);else
-frameNumber=this.activeTree.sourceFrameNumber;}
-return'cc::LayerTreeHostImpl frame '+frameNumber;}};ObjectSnapshot.register(LayerTreeHostImplSnapshot,{typeName:'cc::LayerTreeHostImpl'});function LayerTreeHostImplInstance(){ObjectInstance.apply(this,arguments);this.allLayersBBox_=undefined;}
-LayerTreeHostImplInstance.prototype={__proto__:ObjectInstance.prototype,get allContentsScales(){if(this.allContentsScales_)
-return this.allContentsScales_;var scales={};for(var tileID in this.allTileHistories_){var tileHistory=this.allTileHistories_[tileID];scales[tileHistory.contentsScale]=true;}
-this.allContentsScales_=tr.b.dictionaryKeys(scales);return this.allContentsScales_;},get allLayersBBox(){if(this.allLayersBBox_)
-return this.allLayersBBox_;var bbox=new tr.b.BBox2();function handleTree(tree){tree.renderSurfaceLayerList.forEach(function(layer){bbox.addQuad(layer.layerQuad);});}
-this.snapshots.forEach(function(lthi){handleTree(lthi.activeTree);if(lthi.pendingTree)
-handleTree(lthi.pendingTree);});this.allLayersBBox_=bbox;return this.allLayersBBox_;}};ObjectInstance.register(LayerTreeHostImplInstance,{typeName:'cc::LayerTreeHostImpl'});return{LayerTreeHostImplSnapshot:LayerTreeHostImplSnapshot,LayerTreeHostImplInstance:LayerTreeHostImplInstance};});'use strict';tr.exportTo('tr.e.cc',function(){var tileTypes={highRes:'highRes',lowRes:'lowRes',extraHighRes:'extraHighRes',extraLowRes:'extraLowRes',missing:'missing',culled:'culled',solidColor:'solidColor',picture:'picture',directPicture:'directPicture',unknown:'unknown'};var tileBorder={highRes:{color:'rgba(80, 200, 200, 0.7)',width:1},lowRes:{color:'rgba(212, 83, 192, 0.7)',width:2},extraHighRes:{color:'rgba(239, 231, 20, 0.7)',width:2},extraLowRes:{color:'rgba(93, 186, 18, 0.7)',width:2},missing:{color:'rgba(255, 0, 0, 0.7)',width:1},culled:{color:'rgba(160, 100, 0, 0.8)',width:1},solidColor:{color:'rgba(128, 128, 128, 0.7)',width:1},picture:{color:'rgba(64, 64, 64, 0.7)',width:1},directPicture:{color:'rgba(127, 255, 0, 1.0)',width:1},unknown:{color:'rgba(0, 0, 0, 1.0)',width:2}};return{tileTypes:tileTypes,tileBorder:tileBorder};});'use strict';tr.exportTo('tr.e.cc',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function TileSnapshot(){ObjectSnapshot.apply(this,arguments);}
-TileSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);},initialize:function(){tr.e.cc.moveOptionalFieldsFromArgsToToplevel(this,['layerId','contentsScale','contentRect']);if(this.args.managedState){this.resolution=this.args.managedState.resolution;this.isSolidColor=this.args.managedState.isSolidColor;this.isUsingGpuMemory=this.args.managedState.isUsingGpuMemory;this.hasResource=this.args.managedState.hasResource;this.scheduledPriority=this.args.scheduledPriority;this.gpuMemoryUsageInBytes=this.args.gpuMemoryUsage;}else{this.resolution=this.args.resolution;this.isSolidColor=this.args.drawInfo.isSolidColor;this.isUsingGpuMemory=this.args.isUsingGpuMemory;this.hasResource=this.args.hasResource;this.scheduledPriority=this.args.scheduledPriority;this.gpuMemoryUsageInBytes=this.args.gpuMemoryUsage;}
-if(this.contentRect)
-this.layerRect=this.contentRect.scale(1.0/this.contentsScale);if(this.isSolidColor)
-this.type_=tr.e.cc.tileTypes.solidColor;else if(!this.hasResource)
-this.type_=tr.e.cc.tileTypes.missing;else if(this.resolution==='HIGH_RESOLUTION')
-this.type_=tr.e.cc.tileTypes.highRes;else if(this.resolution==='LOW_RESOLUTION')
-this.type_=tr.e.cc.tileTypes.lowRes;else
-this.type_=tr.e.cc.tileTypes.unknown;},getTypeForLayer:function(layer){var type=this.type_;if(type==tr.e.cc.tileTypes.unknown){if(this.contentsScale<layer.idealContentsScale)
-type=tr.e.cc.tileTypes.extraLowRes;else if(this.contentsScale>layer.idealContentsScale)
-type=tr.e.cc.tileTypes.extraHighRes;}
-return type;}};ObjectSnapshot.register(TileSnapshot,{typeName:'cc::Tile'});return{TileSnapshot:TileSnapshot};});'use strict';tr.exportTo('tr.ui.b',function(){var ListView=tr.ui.b.define('x-list-view',tr.ui.b.ContainerThatDecoratesItsChildren);ListView.prototype={__proto__:tr.ui.b.ContainerThatDecoratesItsChildren.prototype,decorate:function(){tr.ui.b.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);this.classList.add('x-list-view');this.onItemClicked_=this.onItemClicked_.bind(this);this.onKeyDown_=this.onKeyDown_.bind(this);this.tabIndex=0;this.addEventListener('keydown',this.onKeyDown_);this.selectionChanged_=false;},decorateChild_:function(item){item.classList.add('list-item');item.addEventListener('click',this.onItemClicked_,true);var listView=this;Object.defineProperty(item,'selected',{configurable:true,set:function(value){var oldSelection=listView.selectedElement;if(oldSelection&&oldSelection!=this&&value)
-listView.selectedElement.removeAttribute('selected');if(value)
-this.setAttribute('selected','selected');else
-this.removeAttribute('selected');var newSelection=listView.selectedElement;if(newSelection!=oldSelection)
-tr.b.dispatchSimpleEvent(listView,'selection-changed',false);},get:function(){return this.hasAttribute('selected');}});},undecorateChild_:function(item){this.selectionChanged_|=item.selected;item.classList.remove('list-item');item.removeEventListener('click',this.onItemClicked_);delete item.selected;},beginDecorating_:function(){this.selectionChanged_=false;},doneDecoratingForNow_:function(){if(this.selectionChanged_)
-tr.b.dispatchSimpleEvent(this,'selection-changed',false);},get selectedElement(){var el=this.querySelector('.list-item[selected]');if(!el)
-return undefined;return el;},set selectedElement(el){if(!el){if(this.selectedElement)
-this.selectedElement.selected=false;return;}
-if(el.parentElement!=this)
-throw new Error('Can only select elements that are children of this list view');el.selected=true;},getElementByIndex:function(index){return this.querySelector('.list-item:nth-child('+index+')');},clear:function(){var changed=this.selectedElement!==undefined;tr.ui.b.ContainerThatDecoratesItsChildren.prototype.clear.call(this);if(changed)
-tr.b.dispatchSimpleEvent(this,'selection-changed',false);},onItemClicked_:function(e){var currentSelectedElement=this.selectedElement;if(currentSelectedElement)
-currentSelectedElement.removeAttribute('selected');var element=e.target;while(element.parentElement!=this)
-element=element.parentElement;if(element!==currentSelectedElement)
-element.setAttribute('selected','selected');tr.b.dispatchSimpleEvent(this,'selection-changed',false);},onKeyDown_:function(e){if(this.selectedElement===undefined)
-return;if(e.keyCode==38){var prev=this.selectedElement.previousSibling;if(prev){prev.selected=true;tr.ui.b.scrollIntoViewIfNeeded(prev);e.preventDefault();return true;}}else if(e.keyCode==40){var next=this.selectedElement.nextSibling;if(next){next.selected=true;tr.ui.b.scrollIntoViewIfNeeded(next);e.preventDefault();return true;}}},addItem:function(textContent){var item=document.createElement('div');item.textContent=textContent;this.appendChild(item);return item;}};return{ListView:ListView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){function Selection(){this.selectionToSetIfClicked=undefined;};Selection.prototype={get specicifity(){throw new Error('Not implemented');},get associatedLayerId(){throw new Error('Not implemented');},get associatedRenderPassId(){throw new Error('Not implemented');},get highlightsByLayerId(){return{};},createAnalysis:function(){throw new Error('Not implemented');},findEquivalent:function(lthi){throw new Error('Not implemented');}};function RenderPassSelection(renderPass,renderPassId){if(!renderPass||(renderPassId===undefined))
+return;var modeInfo=MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.SELECTION];var eventNames=modeInfo.eventNames;var mouseEvent=this.createEvent_(eventNames.begin);mouseEvent.appendSelection=isCmdOrCtrlPressed(e);this.dispatchEvent(mouseEvent);mouseEvent=this.createEvent_(eventNames.end);this.dispatchEvent(mouseEvent);}});return{MIN_MOUSE_SELECTION_DISTANCE:MIN_MOUSE_SELECTION_DISTANCE,MODIFIER:MODIFIER};});'use strict';(function(){var DETAILS_SPLIT_REGEX=/^(\S*)\s*([\S\s]*)$/;Polymer('tr-ui-e-chrome-cc-display-item-list-item',{created:function(){this.name='';this.rawDetails='';this.richDetails=undefined;this.data_=undefined;},get data(){return this.data_;},set data(data){this.data_=data;if(!data){this.name='DATA MISSING';this.rawDetails='';this.richDetails=undefined;}else if(typeof data==='string'){var match=data.match(DETAILS_SPLIT_REGEX);this.name=match[1];this.rawDetails=match[2];this.richDetails=undefined;}else{this.name=data.name;this.rawDetails='';this.richDetails=data;}},stopPropagation:function(e){e.stopPropagation();}});})();'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){function Selection(){this.selectionToSetIfClicked=undefined;};Selection.prototype={get specicifity(){throw new Error('Not implemented');},get associatedLayerId(){throw new Error('Not implemented');},get associatedRenderPassId(){throw new Error('Not implemented');},get highlightsByLayerId(){return{};},createAnalysis:function(){throw new Error('Not implemented');},findEquivalent:function(lthi){throw new Error('Not implemented');}};function RenderPassSelection(renderPass,renderPassId){if(!renderPass||(renderPassId===undefined))
 throw new Error('Render pass (with id) is required');this.renderPass_=renderPass;this.renderPassId_=renderPassId;}
 RenderPassSelection.prototype={__proto__:Selection.prototype,get specicifity(){return 1;},get associatedLayerId(){return undefined;},get associatedRenderPassId(){return this.renderPassId_;},get renderPass(){return this.renderPass_;},createAnalysis:function(){var dataView=document.createElement('tr-ui-a-generic-object-view-with-label');dataView.label='RenderPass '+this.renderPassId_;dataView.object=this.renderPass_.args;return dataView;},get title(){return this.renderPass_.objectInstance.typeName;}};function LayerSelection(layer){if(!layer)
 throw new Error('Layer is required');this.layer_=layer;}
@@ -6604,7 +5988,7 @@
 ANNOTATION_ID.length);else if(info.indexOf(ANNOTATION_CLASS)!=-1)
 elementInfo.class=info.substring(info.indexOf(ANNOTATION_CLASS)+
 ANNOTATION_CLASS.length);annotations.push(info);});});});op.annotations=annotations;op.elementInfo=elementInfo;opsWithoutAnnotations.push(op);}}
-return opsWithoutAnnotations;}};return{PictureOpsListView:PictureOpsListView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var THIS_DOC=document.currentScript.ownerDocument;var DisplayItemDebugger=tr.ui.b.define('tr-ui-e-chrome-cc-display-item-debugger');DisplayItemDebugger.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){var node=tr.ui.b.instantiateTemplate('#tr-ui-e-chrome-cc-display-item-debugger-template',THIS_DOC);this.appendChild(node);this.pictureAsImageData_=undefined;this.zoomScaleValue_=1;this.sizeInfo_=this.querySelector('.size');this.rasterArea_=this.querySelector('raster-area');this.rasterCanvas_=this.rasterArea_.querySelector('canvas');this.rasterCtx_=this.rasterCanvas_.getContext('2d');this.trackMouse_();this.displayItemInfo_=this.querySelector('display-item-info');this.displayItemInfo_.addEventListener('click',this.onDisplayItemInfoClick_.bind(this),false);this.displayItemListView_=new tr.ui.b.ListView();this.displayItemListView_.addEventListener('selection-changed',this.onDisplayItemListSelection_.bind(this));this.displayItemInfo_.appendChild(this.displayItemListView_);this.displayListFilename_=this.querySelector('.dlfilename');this.displayListExportButton_=this.querySelector('.dlexport');this.displayListExportButton_.addEventListener('click',this.onExportDisplayListClicked_.bind(this));this.skpFilename_=this.querySelector('.skpfilename');this.skpExportButton_=this.querySelector('.skpexport');this.skpExportButton_.addEventListener('click',this.onExportSkPictureClicked_.bind(this));var leftPanel=this.querySelector('left-panel');var middleDragHandle=new tr.ui.b.DragHandle();middleDragHandle.horizontal=false;middleDragHandle.target=leftPanel;var rightPanel=this.querySelector('right-panel');this.infoBar_=document.createElement('tr-ui-b-info-bar');this.rasterArea_.insertBefore(this.infoBar_,this.rasterCanvas_);this.insertBefore(middleDragHandle,rightPanel);this.picture_=undefined;this.pictureOpsListView_=new tr.ui.e.chrome.cc.PictureOpsListView();rightPanel.insertBefore(this.pictureOpsListView_,this.rasterArea_);this.pictureOpsListDragHandle_=new tr.ui.b.DragHandle();this.pictureOpsListDragHandle_.horizontal=false;this.pictureOpsListDragHandle_.target=this.pictureOpsListView_;rightPanel.insertBefore(this.pictureOpsListDragHandle_,this.rasterArea_);},get picture(){return this.picture_;},set displayItemList(displayItemList){this.displayItemList_=displayItemList;this.picture=this.displayItemList_;this.displayItemListView_.clear();this.displayItemList_.items.forEach(function(item){var newListItem=document.createElement('div');newListItem.innerText=item;var text=item.skp64?item.name:item;this.displayItemListView_.addItem(text);}.bind(this));},set picture(picture){this.picture_=picture;var showOpsList=picture&&picture!==this.displayItemList_;this.updateDrawOpsList_(showOpsList);if(picture){var size=this.getRasterCanvasSize_();this.rasterCanvas_.width=size.width;this.rasterCanvas_.height=size.height;}
+return opsWithoutAnnotations;}};return{PictureOpsListView:PictureOpsListView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var THIS_DOC=document.currentScript.ownerDocument;var DisplayItemDebugger=tr.ui.b.define('tr-ui-e-chrome-cc-display-item-debugger');DisplayItemDebugger.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){var node=tr.ui.b.instantiateTemplate('#tr-ui-e-chrome-cc-display-item-debugger-template',THIS_DOC);this.appendChild(node);this.pictureAsImageData_=undefined;this.zoomScaleValue_=1;this.sizeInfo_=this.querySelector('.size');this.rasterArea_=this.querySelector('raster-area');this.rasterCanvas_=this.rasterArea_.querySelector('canvas');this.rasterCtx_=this.rasterCanvas_.getContext('2d');this.trackMouse_();this.displayItemInfo_=this.querySelector('display-item-info');this.displayItemInfo_.addEventListener('click',this.onDisplayItemInfoClick_.bind(this),false);this.displayItemListView_=new tr.ui.b.ListView();this.displayItemListView_.addEventListener('selection-changed',this.onDisplayItemListSelection_.bind(this));this.displayItemInfo_.appendChild(this.displayItemListView_);this.displayListFilename_=this.querySelector('.dlfilename');this.displayListExportButton_=this.querySelector('.dlexport');this.displayListExportButton_.addEventListener('click',this.onExportDisplayListClicked_.bind(this));this.skpFilename_=this.querySelector('.skpfilename');this.skpExportButton_=this.querySelector('.skpexport');this.skpExportButton_.addEventListener('click',this.onExportSkPictureClicked_.bind(this));var leftPanel=this.querySelector('left-panel');var middleDragHandle=document.createElement('tr-ui-b-drag-handle');middleDragHandle.horizontal=false;middleDragHandle.target=leftPanel;var rightPanel=this.querySelector('right-panel');this.infoBar_=document.createElement('tr-ui-b-info-bar');this.rasterArea_.insertBefore(this.infoBar_,this.rasterCanvas_);this.insertBefore(middleDragHandle,rightPanel);this.picture_=undefined;this.pictureOpsListView_=new tr.ui.e.chrome.cc.PictureOpsListView();rightPanel.insertBefore(this.pictureOpsListView_,this.rasterArea_);this.pictureOpsListDragHandle_=document.createElement('tr-ui-b-drag-handle');this.pictureOpsListDragHandle_.horizontal=false;this.pictureOpsListDragHandle_.target=this.pictureOpsListView_;rightPanel.insertBefore(this.pictureOpsListDragHandle_,this.rasterArea_);},get picture(){return this.picture_;},set displayItemList(displayItemList){this.displayItemList_=displayItemList;this.picture=this.displayItemList_;this.displayItemListView_.clear();this.displayItemList_.items.forEach(function(item){var listItem=document.createElement('tr-ui-e-chrome-cc-display-item-list-item');listItem.data=item;this.displayItemListView_.appendChild(listItem);}.bind(this));},set picture(picture){this.picture_=picture;var showOpsList=picture&&picture!==this.displayItemList_;this.updateDrawOpsList_(showOpsList);if(picture){var size=this.getRasterCanvasSize_();this.rasterCanvas_.width=size.width;this.rasterCanvas_.height=size.height;}
 var bounds=this.rasterArea_.getBoundingClientRect();var selectorBounds=this.mouseModeSelector_.getBoundingClientRect();this.mouseModeSelector_.pos={x:(bounds.right-selectorBounds.width-10),y:bounds.top};this.rasterize_();this.scheduleUpdateContents_();},getRasterCanvasSize_:function(){var style=window.getComputedStyle(this.rasterArea_);var width=parseInt(style.width);var height=parseInt(style.height);if(this.picture_){width=Math.max(width,this.picture_.layerRect.width);height=Math.max(height,this.picture_.layerRect.height);}
 return{width:width,height:height};},scheduleUpdateContents_:function(){if(this.updateContentsPending_)
 return;this.updateContentsPending_=true;tr.b.requestAnimationFrameInThisFrameIfPossible(this.updateContents_.bind(this));},updateContents_:function(){this.updateContentsPending_=false;if(this.picture_){this.sizeInfo_.textContent='('+
@@ -6621,7 +6005,7 @@
 this.picture=undefined;},onDisplayItemInfoClick_:function(e){if(e&&e.target==this.displayItemInfo_){this.displayItemListView_.selectedElement=undefined;}},updateDrawOpsList_:function(showOpsList){if(showOpsList){this.pictureOpsListView_.picture=this.picture_;if(this.pictureOpsListView_.numOps>0){this.pictureOpsListView_.classList.add('hasPictureOps');this.pictureOpsListDragHandle_.classList.add('hasPictureOps');}}else{this.pictureOpsListView_.classList.remove('hasPictureOps');this.pictureOpsListDragHandle_.classList.remove('hasPictureOps');}},trackMouse_:function(){this.mouseModeSelector_=document.createElement('tr-ui-b-mouse-mode-selector');this.mouseModeSelector_.targetElement=this.rasterArea_;this.rasterArea_.appendChild(this.mouseModeSelector_);this.mouseModeSelector_.supportedModeMask=tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;this.mouseModeSelector_.mode=tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;this.mouseModeSelector_.defaultMode=tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;this.mouseModeSelector_.settingsKey='pictureDebugger.mouseModeSelector';this.mouseModeSelector_.addEventListener('beginzoom',this.onBeginZoom_.bind(this));this.mouseModeSelector_.addEventListener('updatezoom',this.onUpdateZoom_.bind(this));this.mouseModeSelector_.addEventListener('endzoom',this.onEndZoom_.bind(this));},onBeginZoom_:function(e){this.isZooming_=true;this.lastMouseViewPos_=this.extractRelativeMousePosition_(e);e.preventDefault();},onUpdateZoom_:function(e){if(!this.isZooming_)
 return;var currentMouseViewPos=this.extractRelativeMousePosition_(e);this.zoomScaleValue_+=((this.lastMouseViewPos_.y-currentMouseViewPos.y)*0.001);this.zoomScaleValue_=Math.max(this.zoomScaleValue_,0.1);this.drawPicture_();this.lastMouseViewPos_=currentMouseViewPos;},onEndZoom_:function(e){this.lastMouseViewPos_=undefined;this.isZooming_=false;e.preventDefault();},extractRelativeMousePosition_:function(e){return{x:e.clientX-this.rasterArea_.offsetLeft,y:e.clientY-this.rasterArea_.offsetTop};},saveFile_:function(filename,rawData){if(!rawData)
 return;var length=rawData.length;var arrayBuffer=new ArrayBuffer(length);var uint8Array=new Uint8Array(arrayBuffer);for(var c=0;c<length;c++)
-uint8Array[c]=rawData.charCodeAt(c);var blob=new Blob([uint8Array],{type:'application/octet-binary'});var blobUrl=window.URL.createObjectURL(blob);var link=document.createElementNS('http://www.w3.org/1999/xhtml','a');link.href=blobUrl;link.download=filename;var event=document.createEvent('MouseEvents');event.initMouseEvent('click',true,false,window,0,0,0,0,0,false,false,false,false,0,null);link.dispatchEvent(event);},onExportDisplayListClicked_:function(){var rawData=JSON.stringify(this.displayItemList_.items);this.saveFile_(this.displayListFilename_.value,rawData);},onExportSkPictureClicked_:function(){var rawData=atob(this.picture_.getBase64SkpData());this.saveFile_(this.skpFilename_.value,rawData);}};return{DisplayItemDebugger:DisplayItemDebugger};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var DisplayItemSnapshotView=tr.ui.b.define('tr-ui-e-chrome-cc-display-item-list-view',tr.ui.analysis.ObjectSnapshotView);DisplayItemSnapshotView.prototype={__proto__:tr.ui.analysis.ObjectSnapshotView.prototype,decorate:function(){this.classList.add('tr-ui-e-chrome-cc-display-item-list-view');this.displayItemDebugger_=new tr.ui.e.chrome.cc.DisplayItemDebugger();this.appendChild(this.displayItemDebugger_);},updateContents:function(){if(this.objectSnapshot_&&this.displayItemDebugger_)
+uint8Array[c]=rawData.charCodeAt(c);var blob=new Blob([uint8Array],{type:'application/octet-binary'});var blobUrl=window.URL.createObjectURL(blob);var link=document.createElementNS('http://www.w3.org/1999/xhtml','a');link.href=blobUrl;link.download=filename;var event=document.createEvent('MouseEvents');event.initMouseEvent('click',true,false,window,0,0,0,0,0,false,false,false,false,0,null);link.dispatchEvent(event);},onExportDisplayListClicked_:function(){var rawData=JSON.stringify(this.displayItemList_.items);this.saveFile_(this.displayListFilename_.value,rawData);},onExportSkPictureClicked_:function(){var rawData=tr.b.Base64.atob(this.picture_.getBase64SkpData());this.saveFile_(this.skpFilename_.value,rawData);}};return{DisplayItemDebugger:DisplayItemDebugger};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var DisplayItemSnapshotView=tr.ui.b.define('tr-ui-e-chrome-cc-display-item-list-view',tr.ui.analysis.ObjectSnapshotView);DisplayItemSnapshotView.prototype={__proto__:tr.ui.analysis.ObjectSnapshotView.prototype,decorate:function(){this.classList.add('tr-ui-e-chrome-cc-display-item-list-view');this.displayItemDebugger_=new tr.ui.e.chrome.cc.DisplayItemDebugger();this.appendChild(this.displayItemDebugger_);},updateContents:function(){if(this.objectSnapshot_&&this.displayItemDebugger_)
 this.displayItemDebugger_.displayItemList=this.objectSnapshot_;}};tr.ui.analysis.ObjectSnapshotView.register(DisplayItemSnapshotView,{typeNames:['cc::DisplayItemList'],showInstances:false});return{DisplayItemSnapshotView:DisplayItemSnapshotView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var constants=tr.e.cc.constants;var bytesToRoundedMegabytes=tr.e.cc.bytesToRoundedMegabytes;var RENDER_PASS_QUADS=Math.max(constants.ACTIVE_TREE,constants.PENDING_TREE)+1;var LayerPicker=tr.ui.b.define('tr-ui-e-chrome-cc-layer-picker');LayerPicker.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.lthi_=undefined;this.controls_=document.createElement('top-controls');this.renderPassQuads_=false;this.itemList_=new tr.ui.b.ListView();this.appendChild(this.controls_);this.appendChild(this.itemList_);this.itemList_.addEventListener('selection-changed',this.onItemSelectionChanged_.bind(this));this.controls_.appendChild(tr.ui.b.createSelector(this,'whichTree','layerPicker.whichTree',constants.ACTIVE_TREE,[{label:'Active tree',value:constants.ACTIVE_TREE},{label:'Pending tree',value:constants.PENDING_TREE},{label:'Render pass quads',value:RENDER_PASS_QUADS}]));this.showPureTransformLayers_=false;var showPureTransformLayers=tr.ui.b.createCheckBox(this,'showPureTransformLayers','layerPicker.showPureTransformLayers',false,'Transform layers');showPureTransformLayers.classList.add('show-transform-layers');showPureTransformLayers.title='When checked, pure transform layers are shown';this.controls_.appendChild(showPureTransformLayers);},get lthiSnapshot(){return this.lthiSnapshot_;},set lthiSnapshot(lthiSnapshot){this.lthiSnapshot_=lthiSnapshot;this.updateContents_();},get whichTree(){return this.renderPassQuads_?constants.ACTIVE_TREE:this.whichTree_;},set whichTree(whichTree){this.whichTree_=whichTree;this.renderPassQuads_=(whichTree==RENDER_PASS_QUADS);this.updateContents_();tr.b.dispatchSimpleEvent(this,'selection-change',false);},get layerTreeImpl(){if(this.lthiSnapshot===undefined)
 return undefined;return this.lthiSnapshot.getTree(this.whichTree);},get isRenderPassQuads(){return this.renderPassQuads_;},get showPureTransformLayers(){return this.showPureTransformLayers_;},set showPureTransformLayers(show){if(this.showPureTransformLayers_===show)
 return;this.showPureTransformLayers_=show;this.updateContents_();},getRenderPassInfos_:function(){if(!this.lthiSnapshot_)
@@ -6697,7 +6081,7 @@
 return;this.deviceRect_=rect;this.camera_.deviceRect=rect;this.chromeQuad_=undefined;},resize:function(){if(!this.offsetParent)
 return true;var width=parseInt(window.getComputedStyle(this.offsetParent).width);var height=parseInt(window.getComputedStyle(this.offsetParent).height);var rect=tr.b.Rect.fromXYWH(0,0,width,height);if(rect.equalTo(this.viewportRect_))
 return false;this.viewportRect_=rect;this.style.width=width+'px';this.style.height=height+'px';this.canvas_.style.width=width+'px';this.canvas_.style.height=height+'px';this.canvas_.width=this.pixelRatio_*width;this.canvas_.height=this.pixelRatio_*height;if(!this.cameraWasReset_){this.camera_.resetCamera();this.cameraWasReset_=true;}
-return true;},readyToDraw:function(){if(!this.chromeImages_.left.src){var leftContent=window.getComputedStyle(this.chromeImages_.left).content;leftContent=leftContent.replace(/url\((.*)\)/,'$1');var midContent=window.getComputedStyle(this.chromeImages_.mid).content;midContent=midContent.replace(/url\((.*)\)/,'$1');var rightContent=window.getComputedStyle(this.chromeImages_.right).content;rightContent=rightContent.replace(/url\((.*)\)/,'$1');this.chromeImages_.left.src=leftContent;this.chromeImages_.mid.src=midContent;this.chromeImages_.right.src=rightContent;}
+return true;},readyToDraw:function(){if(!this.chromeImages_.left.src){var leftContent=window.getComputedStyle(this.chromeImages_.left).content;leftContent=tr.ui.b.extractUrlString(leftContent);var midContent=window.getComputedStyle(this.chromeImages_.mid).content;midContent=tr.ui.b.extractUrlString(midContent);var rightContent=window.getComputedStyle(this.chromeImages_.right).content;rightContent=tr.ui.b.extractUrlString(rightContent);this.chromeImages_.left.src=leftContent;this.chromeImages_.mid.src=midContent;this.chromeImages_.right.src=rightContent;}
 return(this.chromeImages_.left.height>0)&&(this.chromeImages_.mid.height>0)&&(this.chromeImages_.right.height>0);},get chromeQuad(){if(this.chromeQuad_)
 return this.chromeQuad_;var chromeCanvas=document.createElement('canvas');var offsetY=this.chromeImages_.left.height;chromeCanvas.width=this.deviceRect_.width;chromeCanvas.height=this.deviceRect_.height+offsetY;var leftWidth=this.chromeImages_.left.width;var midWidth=this.chromeImages_.mid.width;var rightWidth=this.chromeImages_.right.width;var chromeCtx=chromeCanvas.getContext('2d');chromeCtx.drawImage(this.chromeImages_.left,0,0);chromeCtx.save();chromeCtx.translate(leftWidth,0);var s=(this.deviceRect_.width-leftWidth-rightWidth)/midWidth;chromeCtx.scale(s,1);chromeCtx.drawImage(this.chromeImages_.mid,0,0);chromeCtx.restore();chromeCtx.drawImage(this.chromeImages_.right,leftWidth+s*midWidth,0);var chromeRect=tr.b.Rect.fromXYWH(this.deviceRect_.x,this.deviceRect_.y-offsetY,this.deviceRect_.width,this.deviceRect_.height+offsetY);var chromeQuad=tr.b.Quad.fromRect(chromeRect);chromeQuad.stackingGroupId=this.maxStackingGroupId_+1;chromeQuad.imageData=chromeCtx.getImageData(0,0,chromeCanvas.width,chromeCanvas.height);chromeQuad.shadowOffset=[0,0];chromeQuad.shadowBlur=5;chromeQuad.borderWidth=3;this.chromeQuad_=chromeQuad;return this.chromeQuad_;},scheduleRender:function(){if(this.redrawScheduled_)
 return false;this.redrawScheduled_=true;tr.b.requestAnimationFrame(this.render,this);},onRenderRequired_:function(e){this.scheduleRender();},stackTransformAndProcessQuads_:function(numPasses,handleQuadFunc,includeChromeQuad,opt_arg1,opt_arg2){var mv=this.camera_.modelViewMatrix;var p=this.camera_.projectionMatrix;var viewport=tr.b.Rect.fromXYWH(0,0,this.canvas_.width,this.canvas_.height);var quadStacks=[];for(var i=0;i<this.quads_.length;++i){var quad=this.quads_[i];var stackingId=quad.stackingGroupId||0;while(stackingId>=quadStacks.length)
@@ -6711,7 +6095,7 @@
 this.stackTransformAndProcessQuads_(1,handleQuad,false);var e=new tr.b.Event('selectionchange');e.quads=res;this.dispatchEvent(e);}};return{QuadStackView:QuadStackView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var ColorScheme=tr.b.ColorScheme;var THIS_DOC=document.currentScript.ownerDocument;var TILE_HEATMAP_TYPE={};TILE_HEATMAP_TYPE.NONE='none';TILE_HEATMAP_TYPE.SCHEDULED_PRIORITY='scheduledPriority';TILE_HEATMAP_TYPE.USING_GPU_MEMORY='usingGpuMemory';var cc=tr.ui.e.chrome.cc;function createTileRectsSelectorBaseOptions(){return[{label:'None',value:'none'},{label:'Coverage Rects',value:'coverage'}];}
 var bytesToRoundedMegabytes=tr.e.cc.bytesToRoundedMegabytes;var LayerTreeQuadStackView=tr.ui.b.define('tr-ui-e-chrome-cc-layer-tree-quad-stack-view');LayerTreeQuadStackView.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.isRenderPassQuads_=false;this.pictureAsImageData_={};this.messages_=[];this.controls_=document.createElement('top-controls');this.infoBar_=document.createElement('tr-ui-b-info-bar');this.quadStackView_=new tr.ui.b.QuadStackView();this.quadStackView_.addEventListener('selectionchange',this.onQuadStackViewSelectionChange_.bind(this));this.extraHighlightsByLayerId_=undefined;this.inputEventImageData_=undefined;var m=tr.ui.b.MOUSE_SELECTOR_MODE;var mms=this.quadStackView_.mouseModeSelector;mms.settingsKey='tr.e.cc.layerTreeQuadStackView.mouseModeSelector';mms.setKeyCodeForMode(m.SELECTION,'Z'.charCodeAt(0));mms.setKeyCodeForMode(m.PANSCAN,'X'.charCodeAt(0));mms.setKeyCodeForMode(m.ZOOM,'C'.charCodeAt(0));mms.setKeyCodeForMode(m.ROTATE,'V'.charCodeAt(0));var node=tr.ui.b.instantiateTemplate('#tr-ui-e-chrome-cc-layer-tree-quad-stack-view-template',THIS_DOC);this.appendChild(node);this.appendChild(this.controls_);this.appendChild(this.infoBar_);this.appendChild(this.quadStackView_);this.tileRectsSelector_=tr.ui.b.createSelector(this,'howToShowTiles','layerView.howToShowTiles','none',createTileRectsSelectorBaseOptions());this.controls_.appendChild(this.tileRectsSelector_);var tileHeatmapText=tr.ui.b.createSpan({textContent:'Tile heatmap:'});this.controls_.appendChild(tileHeatmapText);var tileHeatmapSelector=tr.ui.b.createSelector(this,'tileHeatmapType','layerView.tileHeatmapType',TILE_HEATMAP_TYPE.NONE,[{label:'None',value:TILE_HEATMAP_TYPE.NONE},{label:'Scheduled Priority',value:TILE_HEATMAP_TYPE.SCHEDULED_PRIORITY},{label:'Is using GPU memory',value:TILE_HEATMAP_TYPE.USING_GPU_MEMORY}]);this.controls_.appendChild(tileHeatmapSelector);var showOtherLayersCheckbox=tr.ui.b.createCheckBox(this,'showOtherLayers','layerView.showOtherLayers',true,'Other layers/passes');showOtherLayersCheckbox.title='When checked, show all layers, selected or not.';this.controls_.appendChild(showOtherLayersCheckbox);var showInvalidationsCheckbox=tr.ui.b.createCheckBox(this,'showInvalidations','layerView.showInvalidations',true,'Invalidations');showInvalidationsCheckbox.title='When checked, compositing invalidations are highlighted in red';this.controls_.appendChild(showInvalidationsCheckbox);var showUnrecordedRegionCheckbox=tr.ui.b.createCheckBox(this,'showUnrecordedRegion','layerView.showUnrecordedRegion',true,'Unrecorded area');showUnrecordedRegionCheckbox.title='When checked, unrecorded areas are highlighted in yellow';this.controls_.appendChild(showUnrecordedRegionCheckbox);var showBottlenecksCheckbox=tr.ui.b.createCheckBox(this,'showBottlenecks','layerView.showBottlenecks',true,'Bottlenecks');showBottlenecksCheckbox.title='When checked, scroll bottlenecks are highlighted';this.controls_.appendChild(showBottlenecksCheckbox);var showLayoutRectsCheckbox=tr.ui.b.createCheckBox(this,'showLayoutRects','layerView.showLayoutRects',false,'Layout rects');showLayoutRectsCheckbox.title='When checked, shows rects for regions where layout happened';this.controls_.appendChild(showLayoutRectsCheckbox);var showContentsCheckbox=tr.ui.b.createCheckBox(this,'showContents','layerView.showContents',true,'Contents');showContentsCheckbox.title='When checked, show the rendered contents inside the layer outlines';this.controls_.appendChild(showContentsCheckbox);var showAnimationBoundsCheckbox=tr.ui.b.createCheckBox(this,'showAnimationBounds','layerView.showAnimationBounds',false,'Animation Bounds');showAnimationBoundsCheckbox.title='When checked, show a border around'+' a layer showing the extent of its animation.';this.controls_.appendChild(showAnimationBoundsCheckbox);var showInputEventsCheckbox=tr.ui.b.createCheckBox(this,'showInputEvents','layerView.showInputEvents',true,'Input events');showInputEventsCheckbox.title='When checked, input events are '+'displayed as circles.';this.controls_.appendChild(showInputEventsCheckbox);this.whatRasterizedLink_=document.createElement('a');this.whatRasterizedLink_.classList.add('what-rasterized');this.whatRasterizedLink_.textContent='What rasterized?';this.whatRasterizedLink_.addEventListener('click',this.onWhatRasterizedLinkClicked_.bind(this));this.appendChild(this.whatRasterizedLink_);},get layerTreeImpl(){return this.layerTreeImpl_;},set isRenderPassQuads(newValue){this.isRenderPassQuads_=newValue;},set layerTreeImpl(layerTreeImpl){if(this.layerTreeImpl_===layerTreeImpl)
 return;this.layerTreeImpl_=layerTreeImpl;this.selection=undefined;},get extraHighlightsByLayerId(){return this.extraHighlightsByLayerId_;},set extraHighlightsByLayerId(extraHighlightsByLayerId){this.extraHighlightsByLayerId_=extraHighlightsByLayerId;this.scheduleUpdateContents_();},get showOtherLayers(){return this.showOtherLayers_;},set showOtherLayers(show){this.showOtherLayers_=show;this.updateContents_();},get showAnimationBounds(){return this.showAnimationBounds_;},set showAnimationBounds(show){this.showAnimationBounds_=show;this.updateContents_();},get showInputEvents(){return this.showInputEvents_;},set showInputEvents(show){this.showInputEvents_=show;this.updateContents_();},get showContents(){return this.showContents_;},set showContents(show){this.showContents_=show;this.updateContents_();},get showInvalidations(){return this.showInvalidations_;},set showInvalidations(show){this.showInvalidations_=show;this.updateContents_();},get showUnrecordedRegion(){return this.showUnrecordedRegion_;},set showUnrecordedRegion(show){this.showUnrecordedRegion_=show;this.updateContents_();},get showBottlenecks(){return this.showBottlenecks_;},set showBottlenecks(show){this.showBottlenecks_=show;this.updateContents_();},get showLayoutRects(){return this.showLayoutRects_;},set showLayoutRects(show){this.showLayoutRects_=show;this.updateContents_();},get howToShowTiles(){return this.howToShowTiles_;},set howToShowTiles(val){console.assert((val==='none')||(val==='coverage')||!isNaN(parseFloat(val)));this.howToShowTiles_=val;this.updateContents_();},get tileHeatmapType(){return this.tileHeatmapType_;},set tileHeatmapType(val){this.tileHeatmapType_=val;this.updateContents_();},get selection(){return this.selection_;},set selection(selection){if(this.selection===selection)
-return;this.selection_=selection;tr.b.dispatchSimpleEvent(this,'selection-change');this.updateContents_();},regenerateContent:function(){this.updateTilesSelector_();this.updateContents_();},loadDataForImageElement_:function(image,callback){var imageContent=window.getComputedStyle(image).content;image.src=imageContent.replace(/url\((.*)\)/,'$1');image.onload=function(){var canvas=document.createElement('canvas');var ctx=canvas.getContext('2d');canvas.width=image.width;canvas.height=image.height;ctx.drawImage(image,0,0);var imageData=ctx.getImageData(0,0,canvas.width,canvas.height);callback(imageData);}},onQuadStackViewSelectionChange_:function(e){var selectableQuads=e.quads.filter(function(q){return q.selectionToSetIfClicked!==undefined;});if(selectableQuads.length==0){this.selection=undefined;return;}
+return;this.selection_=selection;tr.b.dispatchSimpleEvent(this,'selection-change');this.updateContents_();},regenerateContent:function(){this.updateTilesSelector_();this.updateContents_();},loadDataForImageElement_:function(image,callback){var imageContent=window.getComputedStyle(image).content;image.src=tr.ui.b.extractUrlString(imageContent);image.onload=function(){var canvas=document.createElement('canvas');var ctx=canvas.getContext('2d');canvas.width=image.width;canvas.height=image.height;ctx.drawImage(image,0,0);var imageData=ctx.getImageData(0,0,canvas.width,canvas.height);callback(imageData);}},onQuadStackViewSelectionChange_:function(e){var selectableQuads=e.quads.filter(function(q){return q.selectionToSetIfClicked!==undefined;});if(selectableQuads.length==0){this.selection=undefined;return;}
 selectableQuads.sort(function(x,y){var z=x.stackingGroupId-y.stackingGroupId;if(z!=0)
 return z;return x.selectionToSetIfClicked.specicifity-
 y.selectionToSetIfClicked.specicifity;});var quadToSelect=selectableQuads[selectableQuads.length-1];this.selection=quadToSelect.selectionToSetIfClicked;},scheduleUpdateContents_:function(){if(this.updateContentsPending_)
@@ -6802,12 +6186,12 @@
 return quads;},updateInfoBar_:function(infoBarMessages){if(infoBarMessages.length){this.infoBar_.removeAllButtons();this.infoBar_.message='Some problems were encountered...';this.infoBar_.addButton('More info...',function(e){var overlay=new tr.ui.b.Overlay();overlay.textContent='';infoBarMessages.forEach(function(message){var title=document.createElement('h3');title.textContent=message.header;var details=document.createElement('div');details.textContent=message.details;overlay.appendChild(title);overlay.appendChild(details);});overlay.visible=true;e.stopPropagation();return false;});this.infoBar_.visible=true;}else{this.infoBar_.removeAllButtons();this.infoBar_.message='';this.infoBar_.visible=false;}},getWhatRasterized_:function(){var lthi=this.layerTreeImpl_.layerTreeHostImpl;var renderProcess=lthi.objectInstance.parent;var tasks=[];renderProcess.iterateAllEvents(function(event){if(!(event instanceof tr.model.Slice))
 return;var tile=tr.e.cc.getTileFromRasterTaskSlice(event);if(tile===undefined)
 return false;if(tile.containingSnapshot==lthi)
-tasks.push(event);},this);return tasks;},updateWhatRasterizedLinkState_:function(){var tasks=this.getWhatRasterized_();if(tasks.length){this.whatRasterizedLink_.textContent=tasks.length+' raster tasks';this.whatRasterizedLink_.style.display='';}else{this.whatRasterizedLink_.textContent='';this.whatRasterizedLink_.style.display='none';}},onWhatRasterizedLinkClicked_:function(){var tasks=this.getWhatRasterized_();var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.model.EventSet(tasks);this.dispatchEvent(event);}};return{LayerTreeQuadStackView:LayerTreeQuadStackView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var constants=tr.e.cc.constants;var LayerView=tr.ui.b.define('tr-ui-e-chrome-cc-layer-view');LayerView.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.layerTreeQuadStackView_=new tr.ui.e.chrome.cc.LayerTreeQuadStackView();this.dragBar_=new tr.ui.b.DragHandle();this.analysisEl_=document.createElement('tr-ui-e-chrome-cc-layer-view-analysis');this.analysisEl_.addEventListener('requestSelectionChange',this.onRequestSelectionChangeFromAnalysisEl_.bind(this));this.dragBar_.target=this.analysisEl_;this.appendChild(this.layerTreeQuadStackView_);this.appendChild(this.dragBar_);this.appendChild(this.analysisEl_);this.layerTreeQuadStackView_.addEventListener('selection-change',function(){this.layerTreeQuadStackViewSelectionChanged_();}.bind(this));this.layerTreeQuadStackViewSelectionChanged_();},get layerTreeImpl(){return this.layerTreeQuadStackView_.layerTreeImpl;},set layerTreeImpl(newValue){return this.layerTreeQuadStackView_.layerTreeImpl=newValue;},set isRenderPassQuads(newValue){return this.layerTreeQuadStackView_.isRenderPassQuads=newValue;},get selection(){return this.layerTreeQuadStackView_.selection;},set selection(newValue){this.layerTreeQuadStackView_.selection=newValue;},regenerateContent:function(){this.layerTreeQuadStackView_.regenerateContent();},layerTreeQuadStackViewSelectionChanged_:function(){var selection=this.layerTreeQuadStackView_.selection;if(selection){this.dragBar_.style.display='';this.analysisEl_.style.display='';this.analysisEl_.textContent='';var layer=selection.layer;if(layer&&layer.args&&layer.args.pictures){this.analysisEl_.appendChild(this.createPictureBtn_(layer.args.pictures));}
+tasks.push(event);},this);return tasks;},updateWhatRasterizedLinkState_:function(){var tasks=this.getWhatRasterized_();if(tasks.length){this.whatRasterizedLink_.textContent=tasks.length+' raster tasks';this.whatRasterizedLink_.style.display='';}else{this.whatRasterizedLink_.textContent='';this.whatRasterizedLink_.style.display='none';}},onWhatRasterizedLinkClicked_:function(){var tasks=this.getWhatRasterized_();var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.model.EventSet(tasks);this.dispatchEvent(event);}};return{LayerTreeQuadStackView:LayerTreeQuadStackView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var constants=tr.e.cc.constants;var LayerView=tr.ui.b.define('tr-ui-e-chrome-cc-layer-view');LayerView.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.layerTreeQuadStackView_=new tr.ui.e.chrome.cc.LayerTreeQuadStackView();this.dragBar_=document.createElement('tr-ui-b-drag-handle');this.analysisEl_=document.createElement('tr-ui-e-chrome-cc-layer-view-analysis');this.analysisEl_.addEventListener('requestSelectionChange',this.onRequestSelectionChangeFromAnalysisEl_.bind(this));this.dragBar_.target=this.analysisEl_;this.appendChild(this.layerTreeQuadStackView_);this.appendChild(this.dragBar_);this.appendChild(this.analysisEl_);this.layerTreeQuadStackView_.addEventListener('selection-change',function(){this.layerTreeQuadStackViewSelectionChanged_();}.bind(this));this.layerTreeQuadStackViewSelectionChanged_();},get layerTreeImpl(){return this.layerTreeQuadStackView_.layerTreeImpl;},set layerTreeImpl(newValue){return this.layerTreeQuadStackView_.layerTreeImpl=newValue;},set isRenderPassQuads(newValue){return this.layerTreeQuadStackView_.isRenderPassQuads=newValue;},get selection(){return this.layerTreeQuadStackView_.selection;},set selection(newValue){this.layerTreeQuadStackView_.selection=newValue;},regenerateContent:function(){this.layerTreeQuadStackView_.regenerateContent();},layerTreeQuadStackViewSelectionChanged_:function(){var selection=this.layerTreeQuadStackView_.selection;if(selection){this.dragBar_.style.display='';this.analysisEl_.style.display='';this.analysisEl_.textContent='';var layer=selection.layer;if(layer&&layer.args&&layer.args.pictures){this.analysisEl_.appendChild(this.createPictureBtn_(layer.args.pictures));}
 var analysis=selection.createAnalysis();this.analysisEl_.appendChild(analysis);}else{this.dragBar_.style.display='none';this.analysisEl_.style.display='none';var analysis=this.analysisEl_.firstChild;if(analysis)
 this.analysisEl_.removeChild(analysis);this.layerTreeQuadStackView_.style.height=window.getComputedStyle(this).height;}
 tr.b.dispatchSimpleEvent(this,'selection-change');},createPictureBtn_:function(pictures){if(!(pictures instanceof Array))
 pictures=[pictures];var link=document.createElement('tr-ui-a-analysis-link');link.selection=function(){var layeredPicture=new tr.e.cc.LayeredPicture(pictures);var snapshot=new tr.e.cc.PictureSnapshot(layeredPicture);snapshot.picture=layeredPicture;var selection=new tr.model.EventSet();selection.push(snapshot);return selection;};link.textContent='View in Picture Debugger';return link;},onRequestSelectionChangeFromAnalysisEl_:function(e){if(!(e.selection instanceof tr.ui.e.chrome.cc.Selection))
-return;e.stopPropagation();this.selection=e.selection;},get extraHighlightsByLayerId(){return this.layerTreeQuadStackView_.extraHighlightsByLayerId;},set extraHighlightsByLayerId(extraHighlightsByLayerId){this.layerTreeQuadStackView_.extraHighlightsByLayerId=extraHighlightsByLayerId;}};return{LayerView:LayerView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var LayerTreeHostImplSnapshotView=tr.ui.b.define('tr-ui-e-chrome-cc-layer-tree-host-impl-snapshot-view',tr.ui.analysis.ObjectSnapshotView);LayerTreeHostImplSnapshotView.prototype={__proto__:tr.ui.analysis.ObjectSnapshotView.prototype,decorate:function(){this.classList.add('tr-ui-e-chrome-cc-lthi-s-view');this.selection_=undefined;this.layerPicker_=new tr.ui.e.chrome.cc.LayerPicker();this.layerPicker_.addEventListener('selection-change',this.onLayerPickerSelectionChanged_.bind(this));this.layerView_=new tr.ui.e.chrome.cc.LayerView();this.layerView_.addEventListener('selection-change',this.onLayerViewSelectionChanged_.bind(this));this.dragHandle_=new tr.ui.b.DragHandle();this.dragHandle_.horizontal=false;this.dragHandle_.target=this.layerView_;this.appendChild(this.layerPicker_);this.appendChild(this.dragHandle_);this.appendChild(this.layerView_);this.onLayerViewSelectionChanged_();this.onLayerPickerSelectionChanged_();},get objectSnapshot(){return this.objectSnapshot_;},set objectSnapshot(objectSnapshot){this.objectSnapshot_=objectSnapshot;var lthi=this.objectSnapshot;var layerTreeImpl;if(lthi)
+return;e.stopPropagation();this.selection=e.selection;},get extraHighlightsByLayerId(){return this.layerTreeQuadStackView_.extraHighlightsByLayerId;},set extraHighlightsByLayerId(extraHighlightsByLayerId){this.layerTreeQuadStackView_.extraHighlightsByLayerId=extraHighlightsByLayerId;}};return{LayerView:LayerView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var LayerTreeHostImplSnapshotView=tr.ui.b.define('tr-ui-e-chrome-cc-layer-tree-host-impl-snapshot-view',tr.ui.analysis.ObjectSnapshotView);LayerTreeHostImplSnapshotView.prototype={__proto__:tr.ui.analysis.ObjectSnapshotView.prototype,decorate:function(){this.classList.add('tr-ui-e-chrome-cc-lthi-s-view');this.selection_=undefined;this.layerPicker_=new tr.ui.e.chrome.cc.LayerPicker();this.layerPicker_.addEventListener('selection-change',this.onLayerPickerSelectionChanged_.bind(this));this.layerView_=new tr.ui.e.chrome.cc.LayerView();this.layerView_.addEventListener('selection-change',this.onLayerViewSelectionChanged_.bind(this));this.dragHandle_=document.createElement('tr-ui-b-drag-handle');this.dragHandle_.horizontal=false;this.dragHandle_.target=this.layerView_;this.appendChild(this.layerPicker_);this.appendChild(this.dragHandle_);this.appendChild(this.layerView_);this.onLayerViewSelectionChanged_();this.onLayerPickerSelectionChanged_();},get objectSnapshot(){return this.objectSnapshot_;},set objectSnapshot(objectSnapshot){this.objectSnapshot_=objectSnapshot;var lthi=this.objectSnapshot;var layerTreeImpl;if(lthi)
 layerTreeImpl=lthi.getTree(this.layerPicker_.whichTree);this.layerPicker_.lthiSnapshot=lthi;this.layerView_.layerTreeImpl=layerTreeImpl;this.layerView_.regenerateContent();if(!this.selection_)
 return;this.selection=this.selection_.findEquivalent(lthi);},get selection(){return this.selection_;},set selection(selection){if(this.selection_==selection)
 return;this.selection_=selection;this.layerPicker_.selection=selection;this.layerView_.selection=selection;tr.b.dispatchSimpleEvent(this,'cc-selection-change');},onLayerPickerSelectionChanged_:function(){this.selection_=this.layerPicker_.selection;this.layerView_.selection=this.selection;this.layerView_.layerTreeImpl=this.layerPicker_.layerTreeImpl;this.layerView_.isRenderPassQuads=this.layerPicker_.isRenderPassQuads;this.layerView_.regenerateContent();tr.b.dispatchSimpleEvent(this,'cc-selection-change');},onLayerViewSelectionChanged_:function(){this.selection_=this.layerView_.selection;this.layerPicker_.selection=this.selection;tr.b.dispatchSimpleEvent(this,'cc-selection-change');},get extraHighlightsByLayerId(){return this.layerView_.extraHighlightsByLayerId;},set extraHighlightsByLayerId(extraHighlightsByLayerId){this.layerView_.extraHighlightsByLayerId=extraHighlightsByLayerId;}};tr.ui.analysis.ObjectSnapshotView.register(LayerTreeHostImplSnapshotView,{typeName:'cc::LayerTreeHostImpl'});return{LayerTreeHostImplSnapshotView:LayerTreeHostImplSnapshotView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var OPS_TIMING_ITERATIONS=3;var CHART_PADDING_LEFT=65;var CHART_PADDING_RIGHT=40;var AXIS_PADDING_LEFT=60;var AXIS_PADDING_RIGHT=35;var AXIS_PADDING_TOP=25;var AXIS_PADDING_BOTTOM=45;var AXIS_LABEL_PADDING=5;var AXIS_TICK_SIZE=10;var LABEL_PADDING=5;var LABEL_INTERLEAVE_OFFSET=15;var BAR_PADDING=5;var VERTICAL_TICKS=5;var HUE_CHAR_CODE_ADJUSTMENT=5.7;var PictureOpsChartSummaryView=tr.ui.b.define('tr-ui-e-chrome-cc-picture-ops-chart-summary-view');PictureOpsChartSummaryView.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.picture_=undefined;this.pictureDataProcessed_=false;this.chartScale_=window.devicePixelRatio;this.chart_=document.createElement('canvas');this.chartCtx_=this.chart_.getContext('2d');this.appendChild(this.chart_);this.opsTimingData_=[];this.chartWidth_=0;this.chartHeight_=0;this.requiresRedraw_=true;this.currentBarMouseOverTarget_=null;this.chart_.addEventListener('mousemove',this.onMouseMove_.bind(this));},get requiresRedraw(){return this.requiresRedraw_;},set requiresRedraw(requiresRedraw){this.requiresRedraw_=requiresRedraw;},get picture(){return this.picture_;},set picture(picture){this.picture_=picture;this.pictureDataProcessed_=false;if(this.classList.contains('hidden'))
@@ -6856,7 +6240,7 @@
 maxValue=this.ninetyFifthPercentileCost_;else
 maxValue=this.maxCost_;for(var b=0;b<this.pictureOps_.length;b++){op=this.pictureOps_[b];opHeight=Math.round((op.cmd_time/maxValue)*maxHeight);opHeight=Math.max(opHeight,1);opHover=(b===this.currentBarMouseOverTarget_);opColor=this.getOpColor_(op.cmd_string,opHover);if(b===this.selectedOpIndex)
 this.chartCtx_.fillStyle='#FFFF00';else
-this.chartCtx_.fillStyle=opColor;this.chartCtx_.fillRect(CHART_PADDING_LEFT+b*opWidth,bottom-opHeight,BAR_WIDTH,opHeight);}},getOpColor_:function(opName,hover){var characters=opName.split('');var hue=characters.reduce(this.reduceNameToHue,0)%360;var saturation=30;var lightness=hover?'75%':'50%';return'hsl('+hue+', '+saturation+'%, '+lightness+'%)';},reduceNameToHue:function(previousValue,currentValue,index,array){return Math.round(previousValue+currentValue.charCodeAt(0)*HUE_CHAR_CODE_ADJUSTMENT);},clearChartContents_:function(){this.chartCtx_.clearRect(0,0,this.chartWidth_,this.chartHeight_);},showNoTimingDataMessage_:function(){this.chartCtx_.font='800 italic 14px Arial';this.chartCtx_.fillStyle='#333';this.chartCtx_.textAlign='center';this.chartCtx_.textBaseline='middle';this.chartCtx_.fillText('No timing data available.',this.chartWidth_*0.5,this.chartHeight_*0.5);}};return{PictureOpsChartView:PictureOpsChartView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var THIS_DOC=document.currentScript.ownerDocument;var PictureDebugger=tr.ui.b.define('tr-ui-e-chrome-cc-picture-debugger');PictureDebugger.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){var node=tr.ui.b.instantiateTemplate('#tr-ui-e-chrome-cc-picture-debugger-template',THIS_DOC);this.appendChild(node);this.pictureAsImageData_=undefined;this.showOverdraw_=false;this.zoomScaleValue_=1;this.sizeInfo_=this.querySelector('.size');this.rasterArea_=this.querySelector('raster-area');this.rasterCanvas_=this.rasterArea_.querySelector('canvas');this.rasterCtx_=this.rasterCanvas_.getContext('2d');this.filename_=this.querySelector('.filename');this.drawOpsChartSummaryView_=new tr.ui.e.chrome.cc.PictureOpsChartSummaryView();this.drawOpsChartView_=new tr.ui.e.chrome.cc.PictureOpsChartView();this.drawOpsChartView_.addEventListener('selection-changed',this.onChartBarClicked_.bind(this));this.exportButton_=this.querySelector('.export');this.exportButton_.addEventListener('click',this.onSaveAsSkPictureClicked_.bind(this));this.trackMouse_();var overdrawCheckbox=tr.ui.b.createCheckBox(this,'showOverdraw','pictureView.showOverdraw',false,'Show overdraw');var chartCheckbox=tr.ui.b.createCheckBox(this,'showSummaryChart','pictureView.showSummaryChart',false,'Show timing summary');var pictureInfo=this.querySelector('picture-info');pictureInfo.appendChild(overdrawCheckbox);pictureInfo.appendChild(chartCheckbox);this.drawOpsView_=new tr.ui.e.chrome.cc.PictureOpsListView();this.drawOpsView_.addEventListener('selection-changed',this.onChangeDrawOps_.bind(this));var leftPanel=this.querySelector('left-panel');leftPanel.appendChild(this.drawOpsChartSummaryView_);leftPanel.appendChild(this.drawOpsView_);var middleDragHandle=new tr.ui.b.DragHandle();middleDragHandle.horizontal=false;middleDragHandle.target=leftPanel;var rightPanel=this.querySelector('right-panel');rightPanel.replaceChild(this.drawOpsChartView_,rightPanel.querySelector('tr-ui-e-chrome-cc-picture-ops-chart-view'));this.infoBar_=document.createElement('tr-ui-b-info-bar');this.rasterArea_.appendChild(this.infoBar_);this.insertBefore(middleDragHandle,rightPanel);this.picture_=undefined;var hkc=document.createElement('tv-ui-b-hotkey-controller');hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',thisArg:this,keyCode:'h'.charCodeAt(0),callback:function(e){this.moveSelectedOpBy(-1);e.stopPropagation();}}));hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',thisArg:this,keyCode:'l'.charCodeAt(0),callback:function(e){this.moveSelectedOpBy(1);e.stopPropagation();}}));this.appendChild(hkc);this.mutationObserver_=new MutationObserver(this.onMutation_.bind(this));this.mutationObserver_.observe(leftPanel,{attributes:true});},onMutation_:function(mutations){for(var m=0;m<mutations.length;m++){if(mutations[m].attributeName==='style'){this.drawOpsChartSummaryView_.requiresRedraw=true;this.drawOpsChartSummaryView_.updateChartContents();this.drawOpsChartView_.dimensionsHaveChanged=true;this.drawOpsChartView_.updateChartContents();break;}}},onSaveAsSkPictureClicked_:function(){var rawData=atob(this.picture_.getBase64SkpData());var length=rawData.length;var arrayBuffer=new ArrayBuffer(length);var uint8Array=new Uint8Array(arrayBuffer);for(var c=0;c<length;c++)
+this.chartCtx_.fillStyle=opColor;this.chartCtx_.fillRect(CHART_PADDING_LEFT+b*opWidth,bottom-opHeight,BAR_WIDTH,opHeight);}},getOpColor_:function(opName,hover){var characters=opName.split('');var hue=characters.reduce(this.reduceNameToHue,0)%360;var saturation=30;var lightness=hover?'75%':'50%';return'hsl('+hue+', '+saturation+'%, '+lightness+'%)';},reduceNameToHue:function(previousValue,currentValue,index,array){return Math.round(previousValue+currentValue.charCodeAt(0)*HUE_CHAR_CODE_ADJUSTMENT);},clearChartContents_:function(){this.chartCtx_.clearRect(0,0,this.chartWidth_,this.chartHeight_);},showNoTimingDataMessage_:function(){this.chartCtx_.font='800 italic 14px Arial';this.chartCtx_.fillStyle='#333';this.chartCtx_.textAlign='center';this.chartCtx_.textBaseline='middle';this.chartCtx_.fillText('No timing data available.',this.chartWidth_*0.5,this.chartHeight_*0.5);}};return{PictureOpsChartView:PictureOpsChartView};});'use strict';tr.exportTo('tr.ui.e.chrome.cc',function(){var THIS_DOC=document.currentScript.ownerDocument;var PictureDebugger=tr.ui.b.define('tr-ui-e-chrome-cc-picture-debugger');PictureDebugger.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){var node=tr.ui.b.instantiateTemplate('#tr-ui-e-chrome-cc-picture-debugger-template',THIS_DOC);this.appendChild(node);this.pictureAsImageData_=undefined;this.showOverdraw_=false;this.zoomScaleValue_=1;this.sizeInfo_=this.querySelector('.size');this.rasterArea_=this.querySelector('raster-area');this.rasterCanvas_=this.rasterArea_.querySelector('canvas');this.rasterCtx_=this.rasterCanvas_.getContext('2d');this.filename_=this.querySelector('.filename');this.drawOpsChartSummaryView_=new tr.ui.e.chrome.cc.PictureOpsChartSummaryView();this.drawOpsChartView_=new tr.ui.e.chrome.cc.PictureOpsChartView();this.drawOpsChartView_.addEventListener('selection-changed',this.onChartBarClicked_.bind(this));this.exportButton_=this.querySelector('.export');this.exportButton_.addEventListener('click',this.onSaveAsSkPictureClicked_.bind(this));this.trackMouse_();var overdrawCheckbox=tr.ui.b.createCheckBox(this,'showOverdraw','pictureView.showOverdraw',false,'Show overdraw');var chartCheckbox=tr.ui.b.createCheckBox(this,'showSummaryChart','pictureView.showSummaryChart',false,'Show timing summary');var pictureInfo=this.querySelector('picture-info');pictureInfo.appendChild(overdrawCheckbox);pictureInfo.appendChild(chartCheckbox);this.drawOpsView_=new tr.ui.e.chrome.cc.PictureOpsListView();this.drawOpsView_.addEventListener('selection-changed',this.onChangeDrawOps_.bind(this));var leftPanel=this.querySelector('left-panel');leftPanel.appendChild(this.drawOpsChartSummaryView_);leftPanel.appendChild(this.drawOpsView_);var middleDragHandle=document.createElement('tr-ui-b-drag-handle');middleDragHandle.horizontal=false;middleDragHandle.target=leftPanel;var rightPanel=this.querySelector('right-panel');rightPanel.replaceChild(this.drawOpsChartView_,rightPanel.querySelector('tr-ui-e-chrome-cc-picture-ops-chart-view'));this.infoBar_=document.createElement('tr-ui-b-info-bar');this.rasterArea_.appendChild(this.infoBar_);this.insertBefore(middleDragHandle,rightPanel);this.picture_=undefined;var hkc=document.createElement('tv-ui-b-hotkey-controller');hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',thisArg:this,keyCode:'h'.charCodeAt(0),callback:function(e){this.moveSelectedOpBy(-1);e.stopPropagation();}}));hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',thisArg:this,keyCode:'l'.charCodeAt(0),callback:function(e){this.moveSelectedOpBy(1);e.stopPropagation();}}));this.appendChild(hkc);this.mutationObserver_=new MutationObserver(this.onMutation_.bind(this));this.mutationObserver_.observe(leftPanel,{attributes:true});},onMutation_:function(mutations){for(var m=0;m<mutations.length;m++){if(mutations[m].attributeName==='style'){this.drawOpsChartSummaryView_.requiresRedraw=true;this.drawOpsChartSummaryView_.updateChartContents();this.drawOpsChartView_.dimensionsHaveChanged=true;this.drawOpsChartView_.updateChartContents();break;}}},onSaveAsSkPictureClicked_:function(){var rawData=tr.b.Base64.atob(this.picture_.getBase64SkpData());var length=rawData.length;var arrayBuffer=new ArrayBuffer(length);var uint8Array=new Uint8Array(arrayBuffer);for(var c=0;c<length;c++)
 uint8Array[c]=rawData.charCodeAt(c);var blob=new Blob([uint8Array],{type:'application/octet-binary'});var blobUrl=window.webkitURL.createObjectURL(blob);var link=document.createElementNS('http://www.w3.org/1999/xhtml','a');link.href=blobUrl;link.download=this.filename_.value;var event=document.createEvent('MouseEvents');event.initMouseEvent('click',true,false,window,0,0,0,0,0,false,false,false,false,0,null);link.dispatchEvent(event);},get picture(){return this.picture_;},set picture(picture){this.drawOpsView_.picture=picture;this.drawOpsChartView_.picture=picture;this.drawOpsChartSummaryView_.picture=picture;this.picture_=picture;this.exportButton_.disabled=!this.picture_.canSave;if(picture){var size=this.getRasterCanvasSize_();this.rasterCanvas_.width=size.width;this.rasterCanvas_.height=size.height;}
 var bounds=this.rasterArea_.getBoundingClientRect();var selectorBounds=this.mouseModeSelector_.getBoundingClientRect();this.mouseModeSelector_.pos={x:(bounds.right-selectorBounds.width-10),y:bounds.top};this.rasterize_();this.scheduleUpdateContents_();},getRasterCanvasSize_:function(){var style=window.getComputedStyle(this.rasterArea_);var width=Math.max(parseInt(style.width),this.picture_.layerRect.width);var height=Math.max(parseInt(style.height),this.picture_.layerRect.height);return{width:width,height:height};},scheduleUpdateContents_:function(){if(this.updateContentsPending_)
 return;this.updateContentsPending_=true;tr.b.requestAnimationFrameInThisFrameIfPossible(this.updateContents_.bind(this));},updateContents_:function(){this.updateContentsPending_=false;if(this.picture_){this.sizeInfo_.textContent='('+
@@ -6883,8 +6267,34 @@
 return true;return false;}
 function isSliceDoingAnalysis(slice){if(knownAnalysisTaskNames.indexOf(slice.title)!==-1)
 return true;return false;}
-return{getTileFromRasterTaskSlice:getTileFromRasterTaskSlice,isSliceDoingRasterization:isSliceDoingRasterization,isSliceDoingAnalysis:isSliceDoingAnalysis};});'use strict';Polymer('tr-ui-e-chrome-cc-raster-task-view',{created:function(){this.selection_=undefined;},set selection(selection){this.selection_=selection;this.updateContents_();},updateColumns_:function(hadCpuDurations){var timeSpanConfig={ownerDocument:this.ownerDocument};var columns=[{title:'Layer',value:function(row){if(row.isTotals)
-return'Totals';if(row.layer){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.ui.e.chrome.cc.LayerSelection(costs.layer);},'Layer '+row.layerId);return linkEl;}else{return'Layer '+row.layerId;}},width:'250px'},{title:'Num Tiles',value:function(row){return row.numTiles;},cmp:function(a,b){return a.numTiles-b.numTiles;}},{title:'Num Analysis Tasks',value:function(row){return row.numAnalysisTasks;},cmp:function(a,b){return a.numAnalysisTasks-b.numAnalysisTasks;}},{title:'Num Raster Tasks',value:function(row){return row.numRasterTasks;},cmp:function(a,b){return a.numRasterTasks-b.numRasterTasks;}},{title:'Wall Duration (ms)',value:function(row){return tr.ui.units.createTimeDurationSpan(row.duration,timeSpanConfig);},cmp:function(a,b){return a.duration-b.duration;}}];if(hadCpuDurations){columns.push({title:'CPU Duration (ms)',value:function(row){return tr.ui.units.createTimeDurationSpan(row.duration,timeSpanConfig);},cmp:function(a,b){return a.cpuDuration-b.cpuDuration;}});}
+return{getTileFromRasterTaskSlice:getTileFromRasterTaskSlice,isSliceDoingRasterization:isSliceDoingRasterization,isSliceDoingAnalysis:isSliceDoingAnalysis};});'use strict';Polymer('tr-ui-a-sub-view',{set tabLabel(label){return this.setAttribute('tab-label',label);},get tabLabel(){return this.getAttribute('tab-label');},get requiresTallView(){return false;},get relatedEventsToHighlight(){return undefined;},set selection(selection){throw new Error('Not implemented!');},get selection(){throw new Error('Not implemented!');}});'use strict';Polymer('tr-ui-a-stack-frame',{ready:function(){this.stackFrame_=undefined;this.$.table.tableColumns=[];this.$.table.showHeader=true;},get stackFrame(){return this.stackFrame_;},set stackFrame(stackFrame){var table=this.$.table;this.stackFrame_=stackFrame;if(stackFrame===undefined){table.tableColumns=[];table.tableRows=[];table.rebuild();return;}
+var hasName=false;var hasTitle=false;table.tableRows=stackFrame.stackTrace;table.tableRows.forEach(function(row){hasName|=row.name!==undefined;hasTitle|=row.title!==undefined;});var cols=[];if(hasName){cols.push({title:'Name',value:function(row){return row.name;}});}
+if(hasTitle){cols.push({title:'Title',value:function(row){return row.title;}});}
+table.tableColumns=cols;table.rebuild();},tableForTesting:function(){return this.$.table;}});'use strict';Polymer('tr-ui-a-single-event-sub-view',{ready:function(){this.currentSelection_=undefined;this.$.table.tableColumns=[{title:'Label',value:function(row){return row.name;},width:'150px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];this.$.table.showHeader=false;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
+throw new Error('Only supports single slices');this.setSelectionWithoutErrorChecks(selection);},setSelectionWithoutErrorChecks:function(selection){this.currentSelection_=selection;this.updateContents_();},getEventRows_:function(event){var rows=[];if(event.error)
+rows.push({name:'Error',value:event.error});if(event.title)
+rows.push({name:'Title',value:event.title});if(event.category)
+rows.push({name:'Category',value:event.category});if(event.model!==undefined){var ufc=event.model.getUserFriendlyCategoryFromEvent(event);if(ufc!==undefined)
+rows.push({name:'User Friendly Category',value:ufc});}
+if(event.name)
+rows.push({name:'Name',value:event.name});rows.push({name:'Start',value:tr.v.ui.createScalarSpan(event.start,{unit:tr.v.Unit.byName.timeStampInMs})});if(event.duration){rows.push({name:'Wall Duration',value:tr.v.ui.createScalarSpan(event.duration,{unit:tr.v.Unit.byName.timeDurationInMs})});}
+if(event.cpuDuration){rows.push({name:'CPU Duration',value:tr.v.ui.createScalarSpan(event.cpuDuration,{unit:tr.v.Unit.byName.timeDurationInMs})});}
+if(event.subSlices!==undefined&&event.subSlices.length!==0){if(event.selfTime){rows.push({name:'Self Time',value:tr.v.ui.createScalarSpan(event.selfTime,{unit:tr.v.Unit.byName.timeDurationInMs})});}
+if(event.cpuSelfTime){var cpuSelfTimeEl=tr.v.ui.createScalarSpan(event.cpuSelfTime,{unit:tr.v.Unit.byName.timeDurationInMs});if(event.cpuSelfTime>event.selfTime){cpuSelfTimeEl.warning=' Note that CPU Self Time is larger than Self Time. '+'This is a known limitation of this system, which occurs '+'due to several subslices, rounding issues, and imprecise '+'time at which we get cpu- and real-time.';}
+rows.push({name:'CPU Self Time',value:cpuSelfTimeEl});}}
+if(event.durationInUserTime){rows.push({name:'Duration (U)',value:tr.v.ui.createScalarSpan(event.durationInUserTime,{unit:tr.v.Unit.byName.timeDurationInMs})});}
+function createStackFrameEl(sf){var sfEl=document.createElement('tr-ui-a-stack-frame');sfEl.stackFrame=sf;return sfEl;}
+if(event.startStackFrame&&event.endStackFrame){if(event.startStackFrame===event.endStackFrame){rows.push({name:'Start+End Stack Trace',value:createStackFrameEl(event.startStackFrame)});}else{rows.push({name:'Start Stack Trace',value:createStackFrameEl(event.startStackFrame)});rows.push({name:'End Stack Trace',value:createStackFrameEl(event.endStackFrame)});}}else if(event.startStackFrame){rows.push({name:'Start Stack Trace',value:createStackFrameEl(event.startStackFrame)});}else if(event.endStackFrame){rows.push({name:'End Stack Trace',value:createStackFrameEl(event.endStackFrame)});}
+if(event.info){var descriptionEl=tr.ui.b.createDiv({textContent:event.info.description,maxWidth:'300px'});rows.push({name:'Description',value:descriptionEl});if(event.info.docLinks){event.info.docLinks.forEach(function(linkObject){var linkEl=document.createElement('a');linkEl.target='_blank';linkEl.href=linkObject.href;linkEl.textContent=linkObject.textContent;rows.push({name:linkObject.label,value:linkEl});});}}
+if(event.associatedAlerts.length){var alertSubRows=[];event.associatedAlerts.forEach(function(alert){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(alert);},alert.info.description);alertSubRows.push({name:alert.title,value:linkEl});});rows.push({name:'Alerts',value:'',isExpanded:true,subRows:alertSubRows});}
+return rows;},addArgsToRows_:function(rows,args){var n=0;for(var argName in args){n+=1;}
+if(n>0){var subRows=[];for(var argName in args){var argView=document.createElement('tr-ui-a-generic-object-view');argView.object=args[argName];subRows.push({name:argName,value:argView});}
+rows.push({name:'Args',value:'',isExpanded:true,subRows:subRows});}
+return rows;},updateContents_:function(){if(this.currentSelection_===undefined){this.$.table.rows=[];this.$.table.rebuild();return;}
+var event=this.currentSelection_[0];var rows=this.getEventRows_(event);if(event.argsStripped)
+rows.push({name:'Args',value:'Stripped'});else
+this.addArgsToRows_(rows,event.args);var event=new tr.b.Event('customize-rows');event.rows=rows;this.dispatchEvent(event);this.$.table.tableRows=rows;this.$.table.rebuild();}});'use strict';Polymer('tr-ui-e-chrome-cc-raster-task-view',{created:function(){this.selection_=undefined;},set selection(selection){this.selection_=selection;this.updateContents_();},updateColumns_:function(hadCpuDurations){var timeSpanConfig={unit:tr.v.Unit.byName.timeDurationInMs,ownerDocument:this.ownerDocument};var columns=[{title:'Layer',value:function(row){if(row.isTotals)
+return'Totals';if(row.layer){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.ui.e.chrome.cc.LayerSelection(costs.layer);},'Layer '+row.layerId);return linkEl;}else{return'Layer '+row.layerId;}},width:'250px'},{title:'Num Tiles',value:function(row){return row.numTiles;},cmp:function(a,b){return a.numTiles-b.numTiles;}},{title:'Num Analysis Tasks',value:function(row){return row.numAnalysisTasks;},cmp:function(a,b){return a.numAnalysisTasks-b.numAnalysisTasks;}},{title:'Num Raster Tasks',value:function(row){return row.numRasterTasks;},cmp:function(a,b){return a.numRasterTasks-b.numRasterTasks;}},{title:'Wall Duration (ms)',value:function(row){return tr.v.ui.createScalarSpan(row.duration,timeSpanConfig);},cmp:function(a,b){return a.duration-b.duration;}}];if(hadCpuDurations){columns.push({title:'CPU Duration (ms)',value:function(row){return tr.v.ui.createScalarSpan(row.cpuDuration,timeSpanConfig);},cmp:function(a,b){return a.cpuDuration-b.cpuDuration;}});}
 var colWidthPercentage;if(columns.length==1)
 colWidthPercentage='100%';else
 colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';for(var i=1;i<columns.length;i++)
@@ -6916,19 +6326,148 @@
 return'Device.'+this.args.channel;else
 return'Service.'+this.args.channel;}
 return this.title;}};AsyncSlice.register(GpuAsyncSlice,{categoryParts:['disabled-by-default-gpu.device','disabled-by-default-gpu.service']});return{GpuAsyncSlice:GpuAsyncSlice};});'use strict';tr.exportTo('tr.ui.e.chrome.gpu',function(){var StateSnapshotView=tr.ui.b.define('tr-ui-e-chrome-gpu-state-snapshot-view',tr.ui.analysis.ObjectSnapshotView);StateSnapshotView.prototype={__proto__:tr.ui.analysis.ObjectSnapshotView.prototype,decorate:function(){this.classList.add('tr-ui-e-chrome-gpu-state-snapshot-view');this.screenshotImage_=document.createElement('img');this.appendChild(this.screenshotImage_);},updateContents:function(){if(this.objectSnapshot_&&this.objectSnapshot_.screenshot){this.screenshotImage_.src='data:image/png;base64,'+
-this.objectSnapshot_.screenshot;}}};tr.ui.analysis.ObjectSnapshotView.register(StateSnapshotView,{typeName:'gpu::State'});return{StateSnapshotView:StateSnapshotView};});'use strict';tr.exportTo('tr.e.system_stats',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function SystemStatsSnapshot(objectInstance,ts,args){ObjectSnapshot.apply(this,arguments);this.objectInstance=objectInstance;this.ts=ts;this.args=args;this.stats=args;}
+this.objectSnapshot_.screenshot;}}};tr.ui.analysis.ObjectSnapshotView.register(StateSnapshotView,{typeName:'gpu::State'});return{StateSnapshotView:StateSnapshotView};});!function(){function n(n){return null!=n&&!isNaN(n)}function t(n){return n.length}function e(n){for(var t=1;n*t%1;)t*=10;return t}function r(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function u(){}function i(n){return aa+n in this}function o(n){return n=aa+n,n in this&&delete this[n]}function a(){var n=[];return this.forEach(function(t){n.push(t)}),n}function c(){var n=0;for(var t in this)t.charCodeAt(0)===ca&&++n;return n}function s(){for(var n in this)if(n.charCodeAt(0)===ca)return!1;return!0}function l(){}function f(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function h(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var e=0,r=sa.length;r>e;++e){var u=sa[e]+t;if(u in n)return u}}function g(){}function p(){}function v(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new u;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function d(){Xo.event.preventDefault()}function m(){for(var n,t=Xo.event;n=t.sourceEvent;)t=n;return t}function y(n){for(var t=new p,e=0,r=arguments.length;++e<r;)t[arguments[e]]=v(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=Xo.event;u.target=n,Xo.event=u,t[u.type].apply(e,r)}finally{Xo.event=i}}},t}function x(n){return fa(n,da),n}function M(n){return"function"==typeof n?n:function(){return ha(n,this)}}function _(n){return"function"==typeof n?n:function(){return ga(n,this)}}function b(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=Xo.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function w(n){return n.trim().replace(/\s+/g," ")}function S(n){return new RegExp("(?:^|\\s+)"+Xo.requote(n)+"(?:\\s+|$)","g")}function k(n){return n.trim().split(/^|\s+/)}function E(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=k(n).map(A);var u=n.length;return"function"==typeof t?r:e}function A(n){var t=S(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",w(u+" "+n))):e.setAttribute("class",w(u.replace(t," ")))}}function C(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function N(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function L(n){return"function"==typeof n?n:(n=Xo.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function T(n){return{__data__:n}}function q(n){return function(){return va(this,n)}}function z(n){return arguments.length||(n=Xo.ascending),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function R(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function D(n){return fa(n,ya),n}function P(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function U(){var n=this.__transition__;n&&++n.active}function j(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,Bo(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+Xo.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=H;a>0&&(n=n.substring(0,a));var s=Ma.get(n);return s&&(n=s,c=F),a?t?u:r:t?g:i}function H(n,t){return function(e){var r=Xo.event;Xo.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{Xo.event=r}}}function F(n,t){var e=H(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function O(){var n=".dragsuppress-"+ ++ba,t="click"+n,e=Xo.select(Go).on("touchmove"+n,d).on("dragstart"+n,d).on("selectstart"+n,d);if(_a){var r=Jo.style,u=r[_a];r[_a]="none"}return function(i){function o(){e.on(t,null)}e.on(n,null),_a&&(r[_a]=u),i&&(e.on(t,function(){d(),o()},!0),setTimeout(o,0))}}function Y(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>wa&&(Go.scrollX||Go.scrollY)){e=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();wa=!(u.f||u.e),e.remove()}return wa?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function I(n){return n>0?1:0>n?-1:0}function Z(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function V(n){return n>1?0:-1>n?Sa:Math.acos(n)}function X(n){return n>1?Ea:-1>n?-Ea:Math.asin(n)}function $(n){return((n=Math.exp(n))-1/n)/2}function B(n){return((n=Math.exp(n))+1/n)/2}function W(n){return((n=Math.exp(2*n))-1)/(n+1)}function J(n){return(n=Math.sin(n/2))*n}function G(){}function K(n,t,e){return new Q(n,t,e)}function Q(n,t,e){this.h=n,this.s=t,this.l=e}function nt(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,gt(u(n+120),u(n),u(n-120))}function tt(n,t,e){return new et(n,t,e)}function et(n,t,e){this.h=n,this.c=t,this.l=e}function rt(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),ut(e,Math.cos(n*=Na)*t,Math.sin(n)*t)}function ut(n,t,e){return new it(n,t,e)}function it(n,t,e){this.l=n,this.a=t,this.b=e}function ot(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=ct(u)*Fa,r=ct(r)*Oa,i=ct(i)*Ya,gt(lt(3.2404542*u-1.5371385*r-.4985314*i),lt(-.969266*u+1.8760108*r+.041556*i),lt(.0556434*u-.2040259*r+1.0572252*i))}function at(n,t,e){return n>0?tt(Math.atan2(e,t)*La,Math.sqrt(t*t+e*e),n):tt(0/0,0/0,n)}function ct(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function st(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function lt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function ft(n){return gt(n>>16,255&n>>8,255&n)}function ht(n){return ft(n)+""}function gt(n,t,e){return new pt(n,t,e)}function pt(n,t,e){this.r=n,this.g=t,this.b=e}function vt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function dt(n,t,e){var r,u,i,o,a=0,c=0,s=0;if(u=/([a-z]+)\((.*)\)/i.exec(n))switch(i=u[2].split(","),u[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Mt(i[0]),Mt(i[1]),Mt(i[2]))}return(o=Va.get(n))?t(o.r,o.g,o.b):(null!=n&&"#"===n.charAt(0)&&(r=parseInt(n.substring(1),16),isNaN(r)||(4===n.length?(a=(3840&r)>>4,a=a>>4|a,c=240&r,c=c>>4|c,s=15&r,s=s<<4|s):7===n.length&&(a=(16711680&r)>>16,c=(65280&r)>>8,s=255&r))),t(a,c,s))}function mt(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),K(r,u,c)}function yt(n,t,e){n=xt(n),t=xt(t),e=xt(e);var r=st((.4124564*n+.3575761*t+.1804375*e)/Fa),u=st((.2126729*n+.7151522*t+.072175*e)/Oa),i=st((.0193339*n+.119192*t+.9503041*e)/Ya);return ut(116*u-16,500*(r-u),200*(u-i))}function xt(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Mt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function _t(n){return"function"==typeof n?n:function(){return n}}function bt(n){return n}function wt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),St(t,e,n,r)}}function St(n,t,e,r){function u(){var n,t=c.status;if(!t&&c.responseText||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=Xo.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,s=null;return!Go.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=Xo.event;Xo.event=n;try{o.progress.call(i,c)}finally{Xo.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(s=n,i):s},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(Bo(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var l in a)c.setRequestHeader(l,a[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=s&&(c.responseType=s),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},Xo.rebind(i,o,"on"),null==r?i:i.get(kt(r))}function kt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Et(){var n=At(),t=Ct()-n;t>24?(isFinite(t)&&(clearTimeout(Wa),Wa=setTimeout(Et,t)),Ba=0):(Ba=1,Ga(Et))}function At(){var n=Date.now();for(Ja=Xa;Ja;)n>=Ja.t&&(Ja.f=Ja.c(n-Ja.t)),Ja=Ja.n;return n}function Ct(){for(var n,t=Xa,e=1/0;t;)t.f?t=n?n.n=t.n:Xa=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return $a=n,e}function Nt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Lt(n,t){var e=Math.pow(10,3*oa(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Tt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r?function(n){for(var t=n.length,u=[],i=0,o=r[0];t>0&&o>0;)u.push(n.substring(t-=o,t+o)),o=r[i=(i+1)%r.length];return u.reverse().join(e)}:bt;return function(n){var e=Qa.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"",c=e[4]||"",s=e[5],l=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1;switch(h&&(h=+h.substring(1)),(s||"0"===r&&"="===o)&&(s=r="0",o="=",f&&(l-=Math.floor((l-1)/4))),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=nc.get(g)||qt;var y=s&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):a;if(0>p){var c=Xo.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x=n.lastIndexOf("."),M=0>x?n:n.substring(0,x),_=0>x?"":t+n.substring(x+1);!s&&f&&(M=i(M));var b=v.length+M.length+_.length+(y?0:u.length),w=l>b?new Array(b=l-b+1).join(r):"";return y&&(M=i(w+M)),u+=v,n=M+_,("<"===o?u+n+w:">"===o?w+u+n:"^"===o?w.substring(0,b>>=1)+u+n+w.substring(b):u+(y?n:w+n))+e}}}function qt(n){return n+""}function zt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Rt(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new ec(e-1)),1),e}function i(n,e){return t(n=new ec(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{ec=zt;var r=new zt;return r._=n,o(r,t,e)}finally{ec=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Dt(n);return c.floor=c,c.round=Dt(r),c.ceil=Dt(u),c.offset=Dt(i),c.range=a,n}function Dt(n){return function(t,e){try{ec=zt;var r=new zt;return r._=t,n(r,e)._}finally{ec=Date}}}function Pt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.substring(c,a)),null!=(u=uc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=C[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.substring(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&ec!==zt,o=new(i?zt:ec);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+Math.floor(r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,s=e.length;c>a;){if(r>=s)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=N[o in uc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.substring(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){M.lastIndex=0;var r=M.exec(t.substring(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.substring(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.substring(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,C.c.toString(),t,r)}function c(n,t,r){return e(n,C.x.toString(),t,r)}function s(n,t,r){return e(n,C.X.toString(),t,r)}function l(n,t,e){var r=x.get(t.substring(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{ec=zt;var t=new ec;return t._=n,r(t)}finally{ec=Date}}var r=t(n);return e.parse=function(n){try{ec=zt;var t=r.parse(n);return t&&t._}finally{ec=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ee;var x=Xo.map(),M=jt(v),_=Ht(v),b=jt(d),w=Ht(d),S=jt(m),k=Ht(m),E=jt(y),A=Ht(y);p.forEach(function(n,t){x.set(n.toLowerCase(),t)});var C={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Ut(n.getDate(),t,2)},e:function(n,t){return Ut(n.getDate(),t,2)},H:function(n,t){return Ut(n.getHours(),t,2)},I:function(n,t){return Ut(n.getHours()%12||12,t,2)},j:function(n,t){return Ut(1+tc.dayOfYear(n),t,3)},L:function(n,t){return Ut(n.getMilliseconds(),t,3)},m:function(n,t){return Ut(n.getMonth()+1,t,2)},M:function(n,t){return Ut(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Ut(n.getSeconds(),t,2)},U:function(n,t){return Ut(tc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Ut(tc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Ut(n.getFullYear()%100,t,2)},Y:function(n,t){return Ut(n.getFullYear()%1e4,t,4)},Z:ne,"%":function(){return"%"}},N={a:r,A:u,b:i,B:o,c:a,d:Bt,e:Bt,H:Jt,I:Jt,j:Wt,L:Qt,m:$t,M:Gt,p:l,S:Kt,U:Ot,w:Ft,W:Yt,x:c,X:s,y:Zt,Y:It,Z:Vt,"%":te};return t}function Ut(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function jt(n){return new RegExp("^(?:"+n.map(Xo.requote).join("|")+")","i")}function Ht(n){for(var t=new u,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Ft(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Ot(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e));return r?(n.U=+r[0],e+r[0].length):-1}function Yt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e));return r?(n.W=+r[0],e+r[0].length):-1}function It(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Zt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.y=Xt(+r[0]),e+r[0].length):-1}function Vt(n,t,e){return/^[+-]\d{4}$/.test(t=t.substring(e,e+5))?(n.Z=+t,e+5):-1}function Xt(n){return n+(n>68?1900:2e3)}function $t(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Bt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function Wt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function Jt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function Gt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function Kt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function Qt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ne(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=~~(oa(t)/60),u=oa(t)%60;return e+Ut(r,"0",2)+Ut(u,"0",2)}function te(n,t,e){oc.lastIndex=0;var r=oc.exec(t.substring(e,e+1));return r?e+r[0].length:-1}function ee(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function re(){}function ue(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ie(n,t){n&&lc.hasOwnProperty(n.type)&&lc[n.type](n,t)}function oe(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ae(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)oe(n[e],t,1);t.polygonEnd()}function ce(){function n(n,t){n*=Na,t=t*Na/2+Sa/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),s=Math.sin(t),l=i*s,f=u*c+l*Math.cos(a),h=l*o*Math.sin(a);hc.add(Math.atan2(h,f)),r=n,u=c,i=s}var t,e,r,u,i;gc.point=function(o,a){gc.point=n,r=(t=o)*Na,u=Math.cos(a=(e=a)*Na/2+Sa/4),i=Math.sin(a)},gc.lineEnd=function(){n(t,e)}}function se(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function le(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function fe(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function he(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ge(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function pe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function ve(n){return[Math.atan2(n[1],n[0]),X(n[2])]}function de(n,t){return oa(n[0]-t[0])<Aa&&oa(n[1]-t[1])<Aa}function me(n,t){n*=Na;var e=Math.cos(t*=Na);ye(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function ye(n,t,e){++pc,dc+=(n-dc)/pc,mc+=(t-mc)/pc,yc+=(e-yc)/pc}function xe(){function n(n,u){n*=Na;var i=Math.cos(u*=Na),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),s=Math.atan2(Math.sqrt((s=e*c-r*a)*s+(s=r*o-t*c)*s+(s=t*a-e*o)*s),t*o+e*a+r*c);vc+=s,xc+=s*(t+(t=o)),Mc+=s*(e+(e=a)),_c+=s*(r+(r=c)),ye(t,e,r)}var t,e,r;kc.point=function(u,i){u*=Na;var o=Math.cos(i*=Na);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),kc.point=n,ye(t,e,r)}}function Me(){kc.point=me}function _e(){function n(n,t){n*=Na;var e=Math.cos(t*=Na),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),s=u*c-i*a,l=i*o-r*c,f=r*a-u*o,h=Math.sqrt(s*s+l*l+f*f),g=r*o+u*a+i*c,p=h&&-V(g)/h,v=Math.atan2(h,g);bc+=p*s,wc+=p*l,Sc+=p*f,vc+=v,xc+=v*(r+(r=o)),Mc+=v*(u+(u=a)),_c+=v*(i+(i=c)),ye(r,u,i)}var t,e,r,u,i;kc.point=function(o,a){t=o,e=a,kc.point=n,o*=Na;var c=Math.cos(a*=Na);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),ye(r,u,i)},kc.lineEnd=function(){n(t,e),kc.lineEnd=Me,kc.point=me}}function be(){return!0}function we(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(de(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new ke(e,n,null,!0),s=new ke(e,null,c,!1);c.o=s,i.push(c),o.push(s),c=new ke(r,n,null,!1),s=new ke(r,null,c,!0),c.o=s,i.push(c),o.push(s)}}),o.sort(t),Se(i),Se(o),i.length){for(var a=0,c=e,s=o.length;s>a;++a)o[a].e=c=!c;for(var l,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;l=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,s=l.length;s>a;++a)u.point((f=l[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){l=g.p.z;for(var a=l.length-1;a>=0;--a)u.point((f=l[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,l=g.z,p=!p}while(!g.v);u.lineEnd()}}}function Se(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function ke(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Ee(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function s(){y.point=o,d.lineEnd()}function l(n,t){v.push([n,t]);var e=u(n,t);M.point(e[0],e[1])}function f(){M.lineStart(),v=[]}function h(){l(v[0][0],v[0][1]),M.lineEnd();var n,t=M.clean(),e=x.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r){if(1&t){n=e[0];var u,r=n.length-1,o=-1;for(i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);return i.lineEnd(),void 0}r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Ae))}}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:s,polygonStart:function(){y.point=l,y.lineStart=f,y.lineEnd=h,g=[],p=[],i.polygonStart()},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=s,g=Xo.merge(g);var n=Le(m,p);g.length?we(g,Ne,n,e,i):n&&(i.lineStart(),e(null,null,1,i),i.lineEnd()),i.polygonEnd(),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},x=Ce(),M=t(x);return y}}function Ae(n){return n.length>1}function Ce(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:g,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ne(n,t){return((n=n.x)[0]<0?n[1]-Ea-Aa:Ea-n[1])-((t=t.x)[0]<0?t[1]-Ea-Aa:Ea-t[1])}function Le(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;hc.reset();for(var a=0,c=t.length;c>a;++a){var s=t[a],l=s.length;if(l)for(var f=s[0],h=f[0],g=f[1]/2+Sa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===l&&(d=0),n=s[d];var m=n[0],y=n[1]/2+Sa/4,x=Math.sin(y),M=Math.cos(y),_=m-h,b=_>=0?1:-1,w=b*_,S=w>Sa,k=p*x;if(hc.add(Math.atan2(k*b*Math.sin(w),v*M+k*Math.cos(w))),i+=S?_+b*ka:_,S^h>=e^m>=e){var E=fe(se(f),se(n));pe(E);var A=fe(u,E);pe(A);var C=(S^_>=0?-1:1)*X(A[2]);(r>C||r===C&&(E[0]||E[1]))&&(o+=S^_>=0?1:-1)}if(!d++)break;h=m,p=x,v=M,f=n}}return(-Aa>i||Aa>i&&0>hc)^1&o}function Te(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Sa:-Sa,c=oa(i-e);oa(c-Sa)<Aa?(n.point(e,r=(r+o)/2>0?Ea:-Ea),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Sa&&(oa(e-u)<Aa&&(e-=u*Aa),oa(i-a)<Aa&&(i-=a*Aa),r=qe(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function qe(n,t,e,r){var u,i,o=Math.sin(n-e);return oa(o)>Aa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function ze(n,t,e,r){var u;if(null==n)u=e*Ea,r.point(-Sa,u),r.point(0,u),r.point(Sa,u),r.point(Sa,0),r.point(Sa,-u),r.point(0,-u),r.point(-Sa,-u),r.point(-Sa,0),r.point(-Sa,u);else if(oa(n[0]-t[0])>Aa){var i=n[0]<t[0]?Sa:-Sa;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Re(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,s,l;return{lineStart:function(){s=c=!1,l=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Sa:-Sa),h):0;if(!e&&(s=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(de(e,g)||de(p,g))&&(p[0]+=Aa,p[1]+=Aa,v=t(p[0],p[1]))),v!==c)l=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(l=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&de(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return l|(s&&c)<<1}}}function r(n,t,e){var r=se(n),u=se(t),o=[1,0,0],a=fe(r,u),c=le(a,a),s=a[0],l=c-s*s;if(!l)return!e&&n;var f=i*c/l,h=-i*s/l,g=fe(o,a),p=ge(o,f),v=ge(a,h);he(p,v);var d=g,m=le(p,d),y=le(d,d),x=m*m-y*(le(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),_=ge(d,(-m-M)/y);if(he(_,p),_=ve(_),!e)return _;var b,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(b=w,w=S,S=b);var A=S-w,C=oa(A-Sa)<Aa,N=C||Aa>A;if(!C&&k>E&&(b=k,k=E,E=b),N?C?k+E>0^_[1]<(oa(_[0]-w)<Aa?k:E):k<=_[1]&&_[1]<=E:A>Sa^(w<=_[0]&&_[0]<=S)){var L=ge(d,(-m+M)/y);return he(L,p),[_,ve(L)]}}}function u(t,e){var r=o?n:Sa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=oa(i)>Aa,c=cr(n,6*Na);return Ee(t,e,c,o?[0,-n]:[-Sa,n-Sa])}function De(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,s=o.y,l=a.x,f=a.y,h=0,g=1,p=l-c,v=f-s;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-s,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-s,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:s+h*v}),1>g&&(u.b={x:c+g*p,y:s+g*v}),u}}}}}}function Pe(n,t,e,r){function u(r,u){return oa(r[0]-n)<Aa?u>0?0:3:oa(r[0]-e)<Aa?u>0?2:1:oa(r[1]-t)<Aa?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,s=a[0];c>o;++o)i=a[o],s[1]<=r?i[1]>r&&Z(s,i,n)>0&&++t:i[1]<=r&&Z(s,i,n)<0&&--t,s=i;return 0!==t}function s(i,a,c,s){var l=0,f=0;if(null==i||(l=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do s.point(0===l||3===l?n:e,l>1?r:t);while((l=(l+c+4)%4)!==f)}else s.point(a[0],a[1])}function l(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){l(n,t)&&a.point(n,t)}function h(){N.point=p,d&&d.push(m=[]),S=!0,w=!1,_=b=0/0}function g(){v&&(p(y,x),M&&w&&A.rejoin(),v.push(A.buffer())),N.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Ac,Math.min(Ac,n)),t=Math.max(-Ac,Math.min(Ac,t));var e=l(n,t);if(d&&m.push([n,t]),S)y=n,x=t,M=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:_,y:b},b:{x:n,y:t}};C(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=e}var v,d,m,y,x,M,_,b,w,S,k,E=a,A=Ce(),C=De(n,t,e,r),N={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=Xo.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),u&&we(v,i,t,s,a),a.polygonEnd()),v=d=m=null}};return N}}function Ue(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function je(n){var t=0,e=Sa/3,r=nr(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Sa/180,e=n[1]*Sa/180):[180*(t/Sa),180*(e/Sa)]},u}function He(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,X((i-(n*n+e*e)*u*u)/(2*u))]},e}function Fe(){function n(n,t){Nc+=u*n-r*t,r=n,u=t}var t,e,r,u;Rc.point=function(i,o){Rc.point=n,t=r=i,e=u=o},Rc.lineEnd=function(){n(t,e)}}function Oe(n,t){Lc>n&&(Lc=n),n>qc&&(qc=n),Tc>t&&(Tc=t),t>zc&&(zc=t)}function Ye(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Ie(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Ie(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Ie(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Ze(n,t){dc+=n,mc+=t,++yc}function Ve(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);xc+=o*(t+n)/2,Mc+=o*(e+r)/2,_c+=o,Ze(t=n,e=r)}var t,e;Pc.point=function(r,u){Pc.point=n,Ze(t=r,e=u)}}function Xe(){Pc.point=Ze}function $e(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);xc+=o*(r+n)/2,Mc+=o*(u+t)/2,_c+=o,o=u*n-r*t,bc+=o*(r+n),wc+=o*(u+t),Sc+=3*o,Ze(r=n,u=t)}var t,e,r,u;Pc.point=function(i,o){Pc.point=n,Ze(t=r=i,e=u=o)},Pc.lineEnd=function(){n(t,e)}}function Be(n){function t(t,e){n.moveTo(t,e),n.arc(t,e,o,0,ka)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:g};return a}function We(n){function t(n){return(a?r:e)(n)}function e(t){return Ke(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=0/0,S.point=i,t.lineStart()}function i(e,r){var i=se([e,r]),o=n(e,r);u(x,M,y,_,b,w,x=o[0],M=o[1],y=e,_=i[0],b=i[1],w=i[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=s,S.lineEnd=l}function s(n,t){i(f=n,h=t),g=x,p=M,v=_,d=b,m=w,S.point=i}function l(){u(x,M,y,_,b,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,s,l,f,h,g,p,v,d,m){var y=l-t,x=f-e,M=y*y+x*x;if(M>4*i&&d--){var _=a+g,b=c+p,w=s+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),E=oa(oa(w)-1)<Aa||oa(r-h)<Aa?(r+h)/2:Math.atan2(b,_),A=n(E,k),C=A[0],N=A[1],L=C-t,T=N-e,q=x*L-y*T;(q*q/M>i||oa((y*L+x*T)/M-.5)>.3||o>a*g+c*p+s*v)&&(u(t,e,r,a,c,s,C,N,E,_/=S,b/=S,w,d,m),m.point(C,N),u(C,N,E,_,b,w,l,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Na),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function Je(n){var t=We(function(t,e){return n([t*La,e*La])});return function(n){return tr(t(n))}}function Ge(n){this.stream=n}function Ke(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Qe(n){return nr(function(){return n})()}function nr(n){function t(n){return n=a(n[0]*Na,n[1]*Na),[n[0]*h+c,s-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(s-n[1])/h),n&&[n[0]*La,n[1]*La]}function r(){a=Ue(o=ur(m,y,x),i);var n=i(v,d);return c=g-n[0]*h,s=p+n[1]*h,u()}function u(){return l&&(l.valid=!1,l=null),t}var i,o,a,c,s,l,f=We(function(n,t){return n=i(n,t),[n[0]*h+c,s-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,x=0,M=Ec,_=bt,b=null,w=null;return t.stream=function(n){return l&&(l.valid=!1),l=tr(M(o,f(_(n)))),l.valid=!0,l},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,Ec):Re((b=+n)*Na),u()):b},t.clipExtent=function(n){return arguments.length?(w=n,_=n?Pe(n[0][0],n[0][1],n[1][0],n[1][1]):bt,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Na,d=n[1]%360*Na,r()):[v*La,d*La]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Na,y=n[1]%360*Na,x=n.length>2?n[2]%360*Na:0,r()):[m*La,y*La,x*La]},Xo.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function tr(n){return Ke(n,function(t,e){n.point(t*Na,e*Na)})}function er(n,t){return[n,t]}function rr(n,t){return[n>Sa?n-ka:-Sa>n?n+ka:n,t]}function ur(n,t,e){return n?t||e?Ue(or(n),ar(t,e)):or(n):t||e?ar(t,e):rr}function ir(n){return function(t,e){return t+=n,[t>Sa?t-ka:-Sa>t?t+ka:t,e]}}function or(n){var t=ir(n);return t.invert=ir(-n),t}function ar(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*r+a*u;return[Math.atan2(c*i-l*o,a*r-s*u),X(l*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*i-c*o;return[Math.atan2(c*i+s*o,a*r+l*u),X(l*r-a*u)]},e}function cr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=sr(e,u),i=sr(e,i),(o>0?i>u:u>i)&&(u+=o*ka)):(u=n+o*ka,i=n-.5*c);for(var s,l=u;o>0?l>i:i>l;l-=c)a.point((s=ve([e,-r*Math.cos(l),-r*Math.sin(l)]))[0],s[1])}}function sr(n,t){var e=se(t);e[0]-=n,pe(e);var r=V(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Aa)%(2*Math.PI)}function lr(n,t,e){var r=Xo.range(n,t-Aa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function fr(n,t,e){var r=Xo.range(n,t-Aa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function hr(n){return n.source}function gr(n){return n.target}function pr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),s=u*Math.sin(n),l=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(J(r-t)+u*o*J(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*l,u=e*s+t*f,o=e*i+t*a;return[Math.atan2(u,r)*La,Math.atan2(o,Math.sqrt(r*r+u*u))*La]}:function(){return[n*La,t*La]};return p.distance=h,p}function vr(){function n(n,u){var i=Math.sin(u*=Na),o=Math.cos(u),a=oa((n*=Na)-t),c=Math.cos(a);Uc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;jc.point=function(u,i){t=u*Na,e=Math.sin(i*=Na),r=Math.cos(i),jc.point=n},jc.lineEnd=function(){jc.point=jc.lineEnd=g}}function dr(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function mr(n,t){function e(n,t){var e=oa(oa(t)-Ea)<Aa?0:o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Sa/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=I(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ea]},e):xr}function yr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return oa(u)<Aa?er:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-I(u)*Math.sqrt(n*n+e*e)]},e)}function xr(n,t){return[n,Math.log(Math.tan(Sa/4+t/2))]}function Mr(n){var t,e=Qe(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Sa*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function _r(n,t){return[Math.log(Math.tan(Sa/4+t/2)),-n]}function br(n){return n[0]}function wr(n){return n[1]}function Sr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Z(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function kr(n,t){return n[0]-t[0]||n[1]-t[1]}function Er(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Ar(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],s=e[1],l=t[1]-c,f=r[1]-s,h=(a*(c-s)-f*(u-i))/(f*o-a*l);return[u+h*o,c+h*l]}function Cr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Nr(){Jr(this),this.edge=this.site=this.circle=null}function Lr(n){var t=Jc.pop()||new Nr;return t.site=n,t}function Tr(n){Or(n),$c.remove(n),Jc.push(n),Jr(n)}function qr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Tr(n);for(var c=i;c.circle&&oa(e-c.circle.x)<Aa&&oa(r-c.circle.cy)<Aa;)i=c.P,a.unshift(c),Tr(c),c=i;a.unshift(c),Or(c);for(var s=o;s.circle&&oa(e-s.circle.x)<Aa&&oa(r-s.circle.cy)<Aa;)o=s.N,a.push(s),Tr(s),s=o;a.push(s),Or(s);var l,f=a.length;for(l=1;f>l;++l)s=a[l],c=a[l-1],$r(s.edge,c.site,s.site,u);c=a[0],s=a[f-1],s.edge=Vr(c.site,s.site,null,u),Fr(c),Fr(s)}function zr(n){for(var t,e,r,u,i=n.x,o=n.y,a=$c._;a;)if(r=Rr(a,o)-i,r>Aa)a=a.L;else{if(u=i-Dr(a,o),!(u>Aa)){r>-Aa?(t=a.P,e=a):u>-Aa?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Lr(n);if($c.insert(t,c),t||e){if(t===e)return Or(t),e=Lr(t.site),$c.insert(c,e),c.edge=e.edge=Vr(t.site,c.site),Fr(t),Fr(e),void 0;if(!e)return c.edge=Vr(t.site,c.site),void 0;Or(t),Or(e);var s=t.site,l=s.x,f=s.y,h=n.x-l,g=n.y-f,p=e.site,v=p.x-l,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,x=v*v+d*d,M={x:(d*y-g*x)/m+l,y:(h*x-v*y)/m+f};$r(e.edge,s,p,M),c.edge=Vr(s,n,null,M),e.edge=Vr(n,p,null,M),Fr(t),Fr(e)}}function Rr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,s=c-t;if(!s)return a;var l=a-r,f=1/i-1/s,h=l/s;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*s)-c+s/2+u-i/2)))/f+r:(r+a)/2}function Dr(n,t){var e=n.N;if(e)return Rr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Pr(n){this.site=n,this.edges=[]}function Ur(n){for(var t,e,r,u,i,o,a,c,s,l,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Xc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)l=a[o].end(),r=l.x,u=l.y,s=a[++o%c].start(),t=s.x,e=s.y,(oa(r-t)>Aa||oa(u-e)>Aa)&&(a.splice(o,0,new Br(Xr(i.site,l,oa(r-f)<Aa&&p-u>Aa?{x:f,y:oa(t-f)<Aa?e:p}:oa(u-p)<Aa&&h-r>Aa?{x:oa(e-p)<Aa?t:h,y:p}:oa(r-h)<Aa&&u-g>Aa?{x:h,y:oa(t-h)<Aa?e:g}:oa(u-g)<Aa&&r-f>Aa?{x:oa(e-g)<Aa?t:f,y:g}:null),i.site,null)),++c)}function jr(n,t){return t.angle-n.angle}function Hr(){Jr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Fr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,s=r.y-a,l=i.x-o,f=i.y-a,h=2*(c*f-s*l);if(!(h>=-Ca)){var g=c*c+s*s,p=l*l+f*f,v=(f*g-s*p)/h,d=(c*p-l*g)/h,f=d+a,m=Gc.pop()||new Hr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,x=Wc._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}Wc.insert(y,m),y||(Bc=m)}}}}function Or(n){var t=n.circle;t&&(t.P||(Bc=t.N),Wc.remove(t),Gc.push(t),Jr(t),n.circle=null)}function Yr(n){for(var t,e=Vc,r=De(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Ir(t,n)||!r(t)||oa(t.a.x-t.b.x)<Aa&&oa(t.a.y-t.b.y)<Aa)&&(t.a=t.b=null,e.splice(u,1))}function Ir(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],s=t[1][1],l=n.l,f=n.r,h=l.x,g=l.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=s)return}else i={x:d,y:c};e={x:d,y:s}}else{if(i){if(i.y<c)return}else i={x:d,y:s};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=s)return}else i={x:(c-u)/r,y:c};e={x:(s-u)/r,y:s}}else{if(i){if(i.y<c)return}else i={x:(s-u)/r,y:s};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Zr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Vr(n,t,e,r){var u=new Zr(n,t);return Vc.push(u),e&&$r(u,n,t,e),r&&$r(u,t,n,r),Xc[n.i].edges.push(new Br(u,n,t)),Xc[t.i].edges.push(new Br(u,t,n)),u}function Xr(n,t,e){var r=new Zr(n,null);return r.a=t,r.b=e,Vc.push(r),r}function $r(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function Br(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function Wr(){this._=null}function Jr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function Gr(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Kr(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Qr(n){for(;n.L;)n=n.L;return n}function nu(n,t){var e,r,u,i=n.sort(tu).pop();for(Vc=[],Xc=new Array(n.length),$c=new Wr,Wc=new Wr;;)if(u=Bc,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(Xc[i.i]=new Pr(i),zr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;qr(u.arc)}t&&(Yr(t),Ur(t));var o={cells:Xc,edges:Vc};return $c=Wc=Vc=Xc=null,o}function tu(n,t){return t.y-n.y||t.x-n.x}function eu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function ru(n){return n.x}function uu(n){return n.y}function iu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function ou(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&ou(n,c[0],e,r,o,a),c[1]&&ou(n,c[1],o,r,u,a),c[2]&&ou(n,c[2],e,a,o,i),c[3]&&ou(n,c[3],o,a,u,i)}}function au(n,t){n=Xo.rgb(n),t=Xo.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+vt(Math.round(e+i*n))+vt(Math.round(r+o*n))+vt(Math.round(u+a*n))}}function cu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=fu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function su(n,t){return t-=n=+n,function(e){return n+t*e}}function lu(n,t){var e,r,u,i,o,a=0,c=0,s=[],l=[];for(n+="",t+="",Qc.lastIndex=0,r=0;e=Qc.exec(t);++r)e.index&&s.push(t.substring(a,c=e.index)),l.push({i:s.length,x:e[0]}),s.push(null),a=Qc.lastIndex;for(a<t.length&&s.push(t.substring(a)),r=0,i=l.length;(e=Qc.exec(n))&&i>r;++r)if(o=l[r],o.x==e[0]){if(o.i)if(null==s[o.i+1])for(s[o.i-1]+=o.x,s.splice(o.i,1),u=r+1;i>u;++u)l[u].i--;else for(s[o.i-1]+=o.x+s[o.i+1],s.splice(o.i,2),u=r+1;i>u;++u)l[u].i-=2;else if(null==s[o.i+1])s[o.i]=o.x;else for(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1),u=r+1;i>u;++u)l[u].i--;l.splice(r,1),i--,r--}else o.x=su(parseFloat(e[0]),parseFloat(o.x));for(;i>r;)o=l.pop(),null==s[o.i+1]?s[o.i]=o.x:(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1)),i--;return 1===s.length?null==s[0]?(o=l[0].x,function(n){return o(n)+""}):function(){return t}:function(n){for(r=0;i>r;++r)s[(o=l[r]).i]=o.x(n);return s.join("")}}function fu(n,t){for(var e,r=Xo.interpolators.length;--r>=0&&!(e=Xo.interpolators[r](n,t)););return e}function hu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(fu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function gu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function pu(n){return function(t){return 1-n(1-t)}}function vu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function du(n){return n*n}function mu(n){return n*n*n}function yu(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function xu(n){return function(t){return Math.pow(t,n)}}function Mu(n){return 1-Math.cos(n*Ea)}function _u(n){return Math.pow(2,10*(n-1))}function bu(n){return 1-Math.sqrt(1-n*n)}function wu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/ka*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*ka/t)}}function Su(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function ku(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Eu(n,t){n=Xo.hcl(n),t=Xo.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return rt(e+i*n,r+o*n,u+a*n)+""}}function Au(n,t){n=Xo.hsl(n),t=Xo.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return nt(e+i*n,r+o*n,u+a*n)+""}}function Cu(n,t){n=Xo.lab(n),t=Xo.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ot(e+i*n,r+o*n,u+a*n)+""}}function Nu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Lu(n){var t=[n.a,n.b],e=[n.c,n.d],r=qu(t),u=Tu(t,e),i=qu(zu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*La,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*La:0}function Tu(n,t){return n[0]*t[0]+n[1]*t[1]}function qu(n){var t=Math.sqrt(Tu(n,n));return t&&(n[0]/=t,n[1]/=t),t}function zu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ru(n,t){var e,r=[],u=[],i=Xo.transform(n),o=Xo.transform(t),a=i.translate,c=o.translate,s=i.rotate,l=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:su(a[0],c[0])},{i:3,x:su(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),s!=l?(s-l>180?l+=360:l-s>180&&(s+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:su(s,l)})):l&&r.push(r.pop()+"rotate("+l+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:su(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:su(g[0],p[0])},{i:e-2,x:su(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Du(n,t){return t=t-(n=+n)?1/(t-n):0,function(e){return(e-n)*t}}function Pu(n,t){return t=t-(n=+n)?1/(t-n):0,function(e){return Math.max(0,Math.min(1,(e-n)*t))}}function Uu(n){for(var t=n.source,e=n.target,r=Hu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function ju(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Hu(n,t){if(n===t)return n;for(var e=ju(n),r=ju(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function Fu(n){n.fixed|=2}function Ou(n){n.fixed&=-7}function Yu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Iu(n){n.fixed&=-5}function Zu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Zu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var s=t*e[n.point.index];n.charge+=n.pointCharge=s,r+=s*n.point.x,u+=s*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Vu(n,t){return Xo.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=Wu,n}function Xu(n){return n.children}function $u(n){return n.value}function Bu(n,t){return t.value-n.value}function Wu(n){return Xo.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function Ju(n){return n.x}function Gu(n){return n.y}function Ku(n,t,e){n.y0=t,n.y=e}function Qu(n){return Xo.range(n.length)}function ni(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function ti(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function ei(n){return n.reduce(ri,0)}function ri(n,t){return n+t[1]}function ui(n,t){return ii(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ii(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function oi(n){return[Xo.min(n),Xo.max(n)]}function ai(n,t){return n.parent==t.parent?1:2}function ci(n){var t=n.children;return t&&t.length?t[0]:n._tree.thread}function si(n){var t,e=n.children;return e&&(t=e.length)?e[t-1]:n._tree.thread}function li(n,t){var e=n.children;if(e&&(u=e.length))for(var r,u,i=-1;++i<u;)t(r=li(e[i],t),n)>0&&(n=r);return n}function fi(n,t){return n.x-t.x}function hi(n,t){return t.x-n.x}function gi(n,t){return n.depth-t.depth}function pi(n,t){function e(n,r){var u=n.children;if(u&&(o=u.length))for(var i,o,a=null,c=-1;++c<o;)i=u[c],e(i,a),a=i;t(n,r)}e(n,null)}function vi(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i]._tree,t.prelim+=e,t.mod+=e,e+=t.shift+(r+=t.change)}function di(n,t,e){n=n._tree,t=t._tree;var r=e/(t.number-n.number);n.change+=r,t.change-=r,t.shift+=e,t.prelim+=e,t.mod+=e}function mi(n,t,e){return n._tree.ancestor.parent==t.parent?n._tree.ancestor:e}function yi(n,t){return n.value-t.value}function xi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Mi(n,t){n._pack_next=t,t._pack_prev=n}function _i(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function bi(n){function t(n){l=Math.min(n.x-n.r,l),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(s=e.length)){var e,r,u,i,o,a,c,s,l=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(wi),r=e[0],r.x=-r.r,r.y=0,t(r),s>1&&(u=e[1],u.x=u.r,u.y=0,t(u),s>2))for(i=e[2],Ei(r,u,i),t(i),xi(r,i),r._pack_prev=i,xi(i,u),u=r._pack_next,o=3;s>o;o++){Ei(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(_i(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!_i(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Mi(r,u=a):Mi(r=c,u),o--):(xi(r,i),u=i,t(i))}var m=(l+f)/2,y=(h+g)/2,x=0;for(o=0;s>o;o++)i=e[o],i.x-=m,i.y-=y,x=Math.max(x,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=x,e.forEach(Si)}}function wi(n){n._pack_next=n._pack_prev=n}function Si(n){delete n._pack_next,delete n._pack_prev}function ki(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)ki(u[i],t,e,r)}function Ei(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),s=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+s*i,e.y=n.y+c*i-s*u}else e.x=n.x+r,e.y=n.y}function Ai(n){return 1+Xo.max(n,function(n){return n.y})}function Ci(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ni(n){var t=n.children;return t&&t.length?Ni(t[0]):n}function Li(n){var t,e=n.children;return e&&(t=e.length)?Li(e[t-1]):n}function Ti(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function qi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function zi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ri(n){return n.rangeExtent?n.rangeExtent():zi(n.range())}function Di(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Pi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Ui(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ls}function ji(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=Xo.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Hi(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?ji:Di,c=r?Pu:Du;return o=u(n,t,c,e),a=u(t,n,c,fu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Nu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Ii(n,t)},i.tickFormat=function(t,e){return Zi(n,t,e)},i.nice=function(t){return Oi(n,t),u()},i.copy=function(){return Hi(n,t,e,r)},u()}function Fi(n,t){return Xo.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Oi(n,t){return Pi(n,Ui(Yi(n,t)[2]))}function Yi(n,t){null==t&&(t=10);var e=zi(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Ii(n,t){return Xo.range.apply(Xo,Yi(n,t))}function Zi(n,t,e){var r=Yi(n,t);return Xo.format(e?e.replace(Qa,function(n,t,e,u,i,o,a,c,s,l){return[t,e,u,i,o,a,c,s||"."+Xi(l,r),l].join("")}):",."+Vi(r[2])+"f")}function Vi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Xi(n,t){var e=Vi(t[2]);return n in fs?Math.abs(e-Vi(Math.max(Math.abs(t[0]),Math.abs(t[1]))))+ +("e"!==n):e-2*("%"===n)}function $i(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Pi(r.map(u),e?Math:gs);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=zi(r),o=[],a=n[0],c=n[1],s=Math.floor(u(a)),l=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(l-s)){if(e){for(;l>s;s++)for(var h=1;f>h;h++)o.push(i(s)*h);o.push(i(s))}else for(o.push(i(s));s++<l;)for(var h=f-1;h>0;h--)o.push(i(s)*h);for(s=0;o[s]<a;s++);for(l=o.length;o[l-1]>c;l--);o=o.slice(s,l)}return o},o.tickFormat=function(n,t){if(!arguments.length)return hs;arguments.length<2?t=hs:"function"!=typeof t&&(t=Xo.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return $i(n.copy(),t,e,r)},Fi(o,n)}function Bi(n,t,e){function r(t){return n(u(t))}var u=Wi(t),i=Wi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Ii(e,n)},r.tickFormat=function(n,t){return Zi(e,n,t)},r.nice=function(n){return r.domain(Oi(e,n))},r.exponent=function(o){return arguments.length?(u=Wi(t=o),i=Wi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Bi(n.copy(),t,e)},Fi(r,n)}function Wi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Ji(n,t){function e(e){return o[((i.get(e)||"range"===t.t&&i.set(e,n.push(e)))-1)%o.length]}function r(t,e){return Xo.range(n.length).map(function(n){return t+e*n})}var i,o,a;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new u;for(var o,a=-1,c=r.length;++a<c;)i.has(o=r[a])||i.set(o,n.push(o));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(o=n,a=0,t={t:"range",a:arguments},e):o},e.rangePoints=function(u,i){arguments.length<2&&(i=0);var c=u[0],s=u[1],l=(s-c)/(Math.max(1,n.length-1)+i);return o=r(n.length<2?(c+s)/2:c+l*i/2,l),a=0,t={t:"rangePoints",a:arguments},e},e.rangeBands=function(u,i,c){arguments.length<2&&(i=0),arguments.length<3&&(c=i);var s=u[1]<u[0],l=u[s-0],f=u[1-s],h=(f-l)/(n.length-i+2*c);return o=r(l+h*c,h),s&&o.reverse(),a=h*(1-i),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,i,c){arguments.length<2&&(i=0),arguments.length<3&&(c=i);var s=u[1]<u[0],l=u[s-0],f=u[1-s],h=Math.floor((f-l)/(n.length-i+2*c)),g=f-l-(n.length-i)*h;return o=r(l+Math.round(g/2),h),s&&o.reverse(),a=Math.round(h*(1-i)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return zi(t.a[0])},e.copy=function(){return Ji(n,t)},e.domain(n)}function Gi(n,t){function e(){var e=0,i=t.length;for(u=[];++e<i;)u[e-1]=Xo.quantile(n,e/i);return r}function r(n){return isNaN(n=+n)?void 0:t[Xo.bisect(u,n)]}var u;return r.domain=function(t){return arguments.length?(n=t.filter(function(n){return!isNaN(n)}).sort(Xo.ascending),e()):n},r.range=function(n){return arguments.length?(t=n,e()):t},r.quantiles=function(){return u},r.invertExtent=function(e){return e=t.indexOf(e),0>e?[0/0,0/0]:[e>0?u[e-1]:n[0],e<u.length?u[e]:n[n.length-1]]},r.copy=function(){return Gi(n,t)},e()}function Ki(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return Ki(n,t,e)},u()}function Qi(n,t){function e(e){return e>=e?t[Xo.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return Qi(n,t)},e}function no(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Ii(n,t)},t.tickFormat=function(t,e){return Zi(n,t,e)},t.copy=function(){return no(n)},t}function to(n){return n.innerRadius}function eo(n){return n.outerRadius}function ro(n){return n.startAngle}function uo(n){return n.endAngle}function io(n){function t(t){function o(){s.push("M",i(n(l),a))}for(var c,s=[],l=[],f=-1,h=t.length,g=_t(e),p=_t(r);++f<h;)u.call(this,c=t[f],f)?l.push([+g.call(this,c,f),+p.call(this,c,f)]):l.length&&(o(),l=[]);return l.length&&o(),s.length?s.join(""):null}var e=br,r=wr,u=be,i=oo,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=Ms.get(n)||oo).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function oo(n){return n.join("L")}function ao(n){return oo(n)+"Z"}function co(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function so(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function lo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function fo(n,t){return n.length<4?oo(n):n[1]+po(n.slice(1,n.length-1),vo(n,t))}function ho(n,t){return n.length<3?oo(n):n[0]+po((n.push(n[0]),n),vo([n[n.length-2]].concat(n,[n[1]]),t))}function go(n,t){return n.length<3?oo(n):n[0]+po(n,vo(n,t))}function po(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return oo(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var s=2;s<t.length;s++,c++)i=n[c],a=t[s],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var l=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+l[0]+","+l[1]}return r}function vo(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function mo(n){if(n.length<3)return oo(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",_o(ws,o),",",_o(ws,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),bo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function yo(n){if(n.length<4)return oo(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(_o(ws,i)+","+_o(ws,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),bo(e,i,o);return e.join("")}function xo(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[_o(ws,o),",",_o(ws,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),bo(t,o,a);return t.join("")}function Mo(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,s=-1;++s<=e;)r=n[s],u=s/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return mo(n)}function _o(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function bo(n,t,e){n.push("C",_o(_s,t),",",_o(_s,e),",",_o(bs,t),",",_o(bs,e),",",_o(ws,t),",",_o(ws,e))}function wo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function So(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=wo(u,i);++t<e;)r[t]=(o+(o=wo(u=i,i=n[t+1])))/2;return r[t]=o,r}function ko(n){for(var t,e,r,u,i=[],o=So(n),a=-1,c=n.length-1;++a<c;)t=wo(n[a],n[a+1]),oa(t)<Aa?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Eo(n){return n.length<3?oo(n):n[0]+po(n,ko(n))}function Ao(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]+ys,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Co(n){function t(t){function c(){v.push("M",a(n(m),f),l,s(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,x=t.length,M=_t(e),_=_t(u),b=e===r?function(){return g}:_t(r),w=u===i?function(){return p}:_t(i);++y<x;)o.call(this,h=t[y],y)?(d.push([g=+M.call(this,h,y),p=+_.call(this,h,y)]),m.push([+b.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=br,r=br,u=0,i=wr,o=be,a=oo,c=a.key,s=a,l="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=Ms.get(n)||oo).key,s=a.reverse||a,l=a.closed?"M":"L",t):c},t.tension=function(n){return arguments.length?(f=n,t):f},t}function No(n){return n.radius}function Lo(n){return[n.x,n.y]}function To(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]+ys;return[e*Math.cos(r),e*Math.sin(r)]}}function qo(){return 64}function zo(){return"circle"}function Ro(n){var t=Math.sqrt(n/Sa);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Do(n,t){return fa(n,Ns),n.id=t,n}function Po(n,t,e,r){var u=n.id;return R(n,"function"==typeof e?function(n,i,o){n.__transition__[u].tween.set(t,r(e.call(n,n.__data__,i,o)))}:(e=r(e),function(n){n.__transition__[u].tween.set(t,e)}))}function Uo(n){return null==n&&(n=""),function(){this.textContent=n}}function jo(n,t,e,r){var i=n.__transition__||(n.__transition__={active:0,count:0}),o=i[e];if(!o){var a=r.time;o=i[e]={tween:new u,time:a,ease:r.ease,delay:r.delay,duration:r.duration},++i.count,Xo.timer(function(r){function u(r){return i.active>e?s():(i.active=e,o.event&&o.event.start.call(n,l,t),o.tween.forEach(function(e,r){(r=r.call(n,l,t))&&v.push(r)}),Xo.timer(function(){return p.c=c(r||1)?be:c,1},0,a),void 0)}function c(r){if(i.active!==e)return s();for(var u=r/g,a=f(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,l,t),s()):void 0}function s(){return--i.count?delete i[e]:delete n.__transition__,1}var l=n.__data__,f=o.ease,h=o.delay,g=o.duration,p=Ja,v=[];return p.t=h+a,r>=h?u(r-h):(p.c=u,void 0)},0,a)}}function Ho(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function Fo(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function Oo(n){return n.toISOString()}function Yo(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=Xo.bisect(js,u);return i==js.length?[t.year,Yi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/js[i-1]<js[i]/u?i-1:i]:[Os,Yi(n,e)[2]]}return r.invert=function(t){return Io(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Io)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Io(+e+1),t).length}var i=r.domain(),o=zi(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Pi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=zi(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Yo(n.copy(),t,e)},Fi(r,n)}function Io(n){return new Date(n)}function Zo(n){return JSON.parse(n.responseText)}function Vo(n){var t=Wo.createRange();return t.selectNode(Wo.body),t.createContextualFragment(n.responseText)}var Xo={version:"3.4.3"};Date.now||(Date.now=function(){return+new Date});var $o=[].slice,Bo=function(n){return $o.call(n)},Wo=document,Jo=Wo.documentElement,Go=window;try{Bo(Jo.childNodes)[0].nodeType}catch(Ko){Bo=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{Wo.createElement("div").style.setProperty("opacity",0,"")}catch(Qo){var na=Go.Element.prototype,ta=na.setAttribute,ea=na.setAttributeNS,ra=Go.CSSStyleDeclaration.prototype,ua=ra.setProperty;na.setAttribute=function(n,t){ta.call(this,n,t+"")},na.setAttributeNS=function(n,t,e){ea.call(this,n,t,e+"")},ra.setProperty=function(n,t,e){ua.call(this,n,t+"",e)}}Xo.ascending=function(n,t){return t>n?-1:n>t?1:n>=t?0:0/0},Xo.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},Xo.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i&&!(null!=(e=n[u])&&e>=e);)e=void 0;for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i&&!(null!=(e=t.call(n,n[u],u))&&e>=e);)e=void 0;for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},Xo.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i&&!(null!=(e=n[u])&&e>=e);)e=void 0;for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i&&!(null!=(e=t.call(n,n[u],u))&&e>=e);)e=void 0;for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},Xo.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o&&!(null!=(e=u=n[i])&&e>=e);)e=u=void 0;for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o&&!(null!=(e=u=t.call(n,n[i],i))&&e>=e);)e=void 0;for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},Xo.sum=function(n,t){var e,r=0,u=n.length,i=-1;if(1===arguments.length)for(;++i<u;)isNaN(e=+n[i])||(r+=e);else for(;++i<u;)isNaN(e=+t.call(n,n[i],i))||(r+=e);return r},Xo.mean=function(t,e){var r,u=t.length,i=0,o=-1,a=0;if(1===arguments.length)for(;++o<u;)n(r=t[o])&&(i+=(r-i)/++a);else for(;++o<u;)n(r=e.call(t,t[o],o))&&(i+=(r-i)/++a);return a?i:void 0},Xo.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},Xo.median=function(t,e){return arguments.length>1&&(t=t.map(e)),t=t.filter(n),t.length?Xo.quantile(t.sort(Xo.ascending),.5):void 0},Xo.bisector=function(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n.call(t,t[i],i)<e?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;e<n.call(t,t[i],i)?u=i:r=i+1}return r}}};var ia=Xo.bisector(function(n){return n});Xo.bisectLeft=ia.left,Xo.bisect=Xo.bisectRight=ia.right,Xo.shuffle=function(n){for(var t,e,r=n.length;r;)e=0|Math.random()*r--,t=n[r],n[r]=n[e],n[e]=t;return n},Xo.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},Xo.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},Xo.zip=function(){if(!(u=arguments.length))return[];for(var n=-1,e=Xo.min(arguments,t),r=new Array(e);++n<e;)for(var u,i=-1,o=r[n]=new Array(u);++i<u;)o[i]=arguments[i][n];return r},Xo.transpose=function(n){return Xo.zip.apply(Xo,n)},Xo.keys=function(n){var t=[];for(var e in n)t.push(e);return t},Xo.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},Xo.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},Xo.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var oa=Math.abs;Xo.range=function(n,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/r)throw new Error("infinite range");var u,i=[],o=e(oa(r)),a=-1;if(n*=o,t*=o,r*=o,0>r)for(;(u=n+r*++a)>t;)i.push(u/o);else for(;(u=n+r*++a)<t;)i.push(u/o);return i},Xo.map=function(n){var t=new u;if(n instanceof u)n.forEach(function(n,e){t.set(n,e)});else for(var e in n)t.set(e,n[e]);return t},r(u,{has:i,get:function(n){return this[aa+n]},set:function(n,t){return this[aa+n]=t},remove:o,keys:a,values:function(){var n=[];return this.forEach(function(t,e){n.push(e)}),n},entries:function(){var n=[];return this.forEach(function(t,e){n.push({key:t,value:e})}),n},size:c,empty:s,forEach:function(n){for(var t in this)t.charCodeAt(0)===ca&&n.call(this,t.substring(1),this[t])}});var aa="\x00",ca=aa.charCodeAt(0);Xo.nest=function(){function n(t,a,c){if(c>=o.length)return r?r.call(i,a):e?a.sort(e):a;for(var s,l,f,h,g=-1,p=a.length,v=o[c++],d=new u;++g<p;)(h=d.get(s=v(l=a[g])))?h.push(l):d.set(s,[l]);return t?(l=t(),f=function(e,r){l.set(e,n(t,r,c))}):(l={},f=function(e,r){l[e]=n(t,r,c)}),d.forEach(f),l}function t(n,e){if(e>=o.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,i={},o=[],a=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(Xo.map,e,0),0)},i.key=function(n){return o.push(n),i},i.sortKeys=function(n){return a[o.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},Xo.set=function(n){var t=new l;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},r(l,{has:i,add:function(n){return this[aa+n]=!0,n},remove:function(n){return n=aa+n,n in this&&delete this[n]},values:a,size:c,empty:s,forEach:function(n){for(var t in this)t.charCodeAt(0)===ca&&n.call(this,t.substring(1))}}),Xo.behavior={},Xo.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=f(n,t,t[e]);return n};var sa=["webkit","ms","moz","Moz","o","O"];Xo.dispatch=function(){for(var n=new p,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=v(n);return n},p.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.substring(e+1),n=n.substring(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},Xo.event=null,Xo.requote=function(n){return n.replace(la,"\\$&")};var la=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,fa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ha=function(n,t){return t.querySelector(n)},ga=function(n,t){return t.querySelectorAll(n)},pa=Jo[h(Jo,"matchesSelector")],va=function(n,t){return pa.call(n,t)};"function"==typeof Sizzle&&(ha=function(n,t){return Sizzle(n,t)[0]||null},ga=Sizzle,va=Sizzle.matchesSelector),Xo.selection=function(){return xa};var da=Xo.selection.prototype=[];da.select=function(n){var t,e,r,u,i=[];n=M(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,s=r.length;++c<s;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return x(i)},da.selectAll=function(n){var t,e,r=[];n=_(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=Bo(n.call(e,e.__data__,a,u))),t.parentNode=e);return x(r)};var ma={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Xo.ns={prefix:ma,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.substring(0,t),n=n.substring(t+1)),ma.hasOwnProperty(e)?{space:ma[e],local:n}:n}},da.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=Xo.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(b(t,n[t]));return this}return this.each(b(n,t))},da.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=k(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!S(n[u]).test(t))return!1;return!0}for(t in n)this.each(E(t,n[t]));return this}return this.each(E(n,t))},da.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(C(e,n[e],t));return this}if(2>r)return Go.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(C(n,t,e))},da.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(N(t,n[t]));return this}return this.each(N(n,t))},da.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},da.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},da.append=function(n){return n=L(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},da.insert=function(n,t){return n=L(n),t=M(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},da.remove=function(){return this.each(function(){var n=this.parentNode;n&&n.removeChild(this)})},da.data=function(n,t){function e(n,e){var r,i,o,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new u,y=new u,x=[];for(r=-1;++r<a;)d=t.call(i=n[r],i.__data__,r),m.has(d)?v[r]=i:m.set(d,i),x.push(d);for(r=-1;++r<f;)d=t.call(e,o=e[r],r),(i=m.get(d))?(g[r]=i,i.__data__=o):y.has(d)||(p[r]=T(o)),y.set(d,o),m.remove(d);for(r=-1;++r<a;)m.has(x[r])&&(v[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],o=e[r],i?(i.__data__=o,g[r]=i):p[r]=T(o);for(;f>r;++r)p[r]=T(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),s.push(g),l.push(v)}var r,i,o=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(n[o]=i.__data__);return n}var c=D([]),s=x([]),l=x([]);if("function"==typeof n)for(;++o<a;)e(r=this[o],n.call(r,r.parentNode.__data__,o));else for(;++o<a;)e(r=this[o],n);return s.enter=function(){return c},s.exit=function(){return l},s},da.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},da.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=q(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return x(u)},da.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},da.sort=function(n){n=z.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},da.each=function(n){return R(this,function(t,e,r){n.call(t,t.__data__,e,r)})},da.call=function(n){var t=Bo(arguments);return n.apply(t[0]=this,t),this},da.empty=function(){return!this.node()},da.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},da.size=function(){var n=0;return this.each(function(){++n}),n};var ya=[];Xo.selection.enter=D,Xo.selection.enter.prototype=ya,ya.append=da.append,ya.empty=da.empty,ya.node=da.node,ya.call=da.call,ya.size=da.size,ya.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var s=-1,l=u.length;++s<l;)(i=u[s])?(t.push(r[s]=e=n.call(u.parentNode,i.__data__,s,a)),e.__data__=i.__data__):t.push(null)}return x(o)},ya.insert=function(n,t){return arguments.length<2&&(t=P(this)),da.insert.call(this,n,t)},da.transition=function(){for(var n,t,e=ks||++Ls,r=[],u=Es||{time:Date.now(),ease:yu,delay:0,duration:250},i=-1,o=this.length;++i<o;){r.push(n=[]);for(var a=this[i],c=-1,s=a.length;++c<s;)(t=a[c])&&jo(t,c,e,u),n.push(t)}return Do(r,e)},da.interrupt=function(){return this.each(U)},Xo.select=function(n){var t=["string"==typeof n?ha(n,Wo):n];return t.parentNode=Jo,x([t])},Xo.selectAll=function(n){var t=Bo("string"==typeof n?ga(n,Wo):n);return t.parentNode=Jo,x([t])};var xa=Xo.select(Jo);da.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(j(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(j(n,t,e))};var Ma=Xo.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ma.forEach(function(n){"on"+n in Wo&&Ma.remove(n)});var _a="onselectstart"in Wo?null:h(Jo.style,"userSelect"),ba=0;Xo.mouse=function(n){return Y(n,m())};var wa=/WebKit/.test(Go.navigator.userAgent)?-1:0;Xo.touches=function(n,t){return arguments.length<2&&(t=m().touches),t?Bo(t).map(function(t){var e=Y(n,t);return e.identifier=t.identifier,e}):[]},Xo.behavior.drag=function(){function n(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function t(){return Xo.event.changedTouches[0].identifier}function e(n,t){return Xo.touches(n).filter(function(n){return n.identifier===t})[0]}function r(n,t,e,r){return function(){function o(){var n=t(l,g),e=n[0]-v[0],r=n[1]-v[1];d|=e|r,v=n,f({type:"drag",x:n[0]+c[0],y:n[1]+c[1],dx:e,dy:r})}function a(){m.on(e+"."+p,null).on(r+"."+p,null),y(d&&Xo.event.target===h),f({type:"dragend"})}var c,s=this,l=s.parentNode,f=u.of(s,arguments),h=Xo.event.target,g=n(),p=null==g?"drag":"drag-"+g,v=t(l,g),d=0,m=Xo.select(Go).on(e+"."+p,o).on(r+"."+p,a),y=O();i?(c=i.apply(s,arguments),c=[c.x-v[0],c.y-v[1]]):c=[0,0],f({type:"dragstart"})}}var u=y(n,"drag","dragstart","dragend"),i=null,o=r(g,Xo.mouse,"mousemove","mouseup"),a=r(t,e,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},Xo.rebind(n,u,"on")};var Sa=Math.PI,ka=2*Sa,Ea=Sa/2,Aa=1e-6,Ca=Aa*Aa,Na=Sa/180,La=180/Sa,Ta=Math.SQRT2,qa=2,za=4;Xo.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=B(v),o=i/(qa*h)*(e*W(Ta*t+v)-$(v));return[r+o*s,u+o*l,i*e/B(Ta*t+v)]}return[r+n*s,u+n*l,i*Math.exp(Ta*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],s=o-r,l=a-u,f=s*s+l*l,h=Math.sqrt(f),g=(c*c-i*i+za*f)/(2*i*qa*h),p=(c*c-i*i-za*f)/(2*c*qa*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Ta;return e.duration=1e3*y,e},Xo.behavior.zoom=function(){function n(n){n.on(A,s).on(Pa+".zoom",f).on(C,h).on("dblclick.zoom",g).on(L,l)}function t(n){return[(n[0]-S.x)/S.k,(n[1]-S.y)/S.k]}function e(n){return[n[0]*S.k+S.x,n[1]*S.k+S.y]}function r(n){S.k=Math.max(E[0],Math.min(E[1],n))}function u(n,t){t=e(t),S.x+=n[0]-t[0],S.y+=n[1]-t[1]}function i(){_&&_.domain(M.range().map(function(n){return(n-S.x)/S.k}).map(M.invert)),w&&w.domain(b.range().map(function(n){return(n-S.y)/S.k}).map(b.invert))}function o(n){n({type:"zoomstart"})}function a(n){i(),n({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(n){n({type:"zoomend"})}function s(){function n(){l=1,u(Xo.mouse(r),g),a(i)}function e(){f.on(C,Go===r?h:null).on(N,null),p(l&&Xo.event.target===s),c(i)}var r=this,i=T.of(r,arguments),s=Xo.event.target,l=0,f=Xo.select(Go).on(C,n).on(N,e),g=t(Xo.mouse(r)),p=O();U.call(r),o(i)}function l(){function n(){var n=Xo.touches(g);return h=S.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=t(n))}),n}function e(){for(var t=Xo.event.changedTouches,e=0,i=t.length;i>e;++e)v[t[e].identifier]=null;var o=n(),c=Date.now();if(1===o.length){if(500>c-x){var s=o[0],l=v[s.identifier];r(2*S.k),u(s,l),d(),a(p)}x=c}else if(o.length>1){var s=o[0],f=o[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function i(){for(var n,t,e,i,o=Xo.touches(g),c=0,s=o.length;s>c;++c,i=null)if(e=o[c],i=v[e.identifier]){if(t)break;n=e,t=i}if(i){var l=(l=e[0]-n[0])*l+(l=e[1]-n[1])*l,f=m&&Math.sqrt(l/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*h)}x=null,u(n,t),a(p)}function f(){if(Xo.event.touches.length){for(var t=Xo.event.changedTouches,e=0,r=t.length;r>e;++e)delete v[t[e].identifier];for(var u in v)return void n()}b.on(M,null).on(_,null),w.on(A,s).on(L,l),k(),c(p)}var h,g=this,p=T.of(g,arguments),v={},m=0,y=Xo.event.changedTouches[0].identifier,M="touchmove.zoom-"+y,_="touchend.zoom-"+y,b=Xo.select(Go).on(M,i).on(_,f),w=Xo.select(g).on(A,null).on(L,e),k=O();U.call(g),e(),o(p)}function f(){var n=T.of(this,arguments);m?clearTimeout(m):(U.call(this),o(n)),m=setTimeout(function(){m=null,c(n)},50),d();var e=v||Xo.mouse(this);p||(p=t(e)),r(Math.pow(2,.002*Ra())*S.k),u(e,p),a(n)}function h(){p=null}function g(){var n=T.of(this,arguments),e=Xo.mouse(this),i=t(e),s=Math.log(S.k)/Math.LN2;o(n),r(Math.pow(2,Xo.event.shiftKey?Math.ceil(s)-1:Math.floor(s)+1)),u(e,i),a(n),c(n)}var p,v,m,x,M,_,b,w,S={x:0,y:0,k:1},k=[960,500],E=Da,A="mousedown.zoom",C="mousemove.zoom",N="mouseup.zoom",L="touchstart.zoom",T=y(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=T.of(this,arguments),t=S;ks?Xo.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},o(n)}).tween("zoom:zoom",function(){var e=k[0],r=k[1],u=e/2,i=r/2,o=Xo.interpolateZoom([(u-S.x)/S.k,(i-S.y)/S.k,e/S.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),c=e/r[2];this.__chart__=S={x:u-r[0]*c,y:i-r[1]*c,k:c},a(n)}}).each("end.zoom",function(){c(n)}):(this.__chart__=S,o(n),a(n),c(n))})},n.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},i(),n):[S.x,S.y]},n.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:+t},i(),n):S.k},n.scaleExtent=function(t){return arguments.length?(E=null==t?Da:[+t[0],+t[1]],n):E},n.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],n):v},n.size=function(t){return arguments.length?(k=t&&[+t[0],+t[1]],n):k},n.x=function(t){return arguments.length?(_=t,M=t.copy(),S={x:0,y:0,k:1},n):_},n.y=function(t){return arguments.length?(w=t,b=t.copy(),S={x:0,y:0,k:1},n):w},Xo.rebind(n,T,"on")};var Ra,Da=[0,1/0],Pa="onwheel"in Wo?(Ra=function(){return-Xo.event.deltaY*(Xo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Wo?(Ra=function(){return Xo.event.wheelDelta},"mousewheel"):(Ra=function(){return-Xo.event.detail},"MozMousePixelScroll");G.prototype.toString=function(){return this.rgb()+""},Xo.hsl=function(n,t,e){return 1===arguments.length?n instanceof Q?K(n.h,n.s,n.l):dt(""+n,mt,K):K(+n,+t,+e)};var Ua=Q.prototype=new G;Ua.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),K(this.h,this.s,this.l/n)},Ua.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),K(this.h,this.s,n*this.l)},Ua.rgb=function(){return nt(this.h,this.s,this.l)},Xo.hcl=function(n,t,e){return 1===arguments.length?n instanceof et?tt(n.h,n.c,n.l):n instanceof it?at(n.l,n.a,n.b):at((n=yt((n=Xo.rgb(n)).r,n.g,n.b)).l,n.a,n.b):tt(+n,+t,+e)};var ja=et.prototype=new G;ja.brighter=function(n){return tt(this.h,this.c,Math.min(100,this.l+Ha*(arguments.length?n:1)))},ja.darker=function(n){return tt(this.h,this.c,Math.max(0,this.l-Ha*(arguments.length?n:1)))},ja.rgb=function(){return rt(this.h,this.c,this.l).rgb()},Xo.lab=function(n,t,e){return 1===arguments.length?n instanceof it?ut(n.l,n.a,n.b):n instanceof et?rt(n.l,n.c,n.h):yt((n=Xo.rgb(n)).r,n.g,n.b):ut(+n,+t,+e)};var Ha=18,Fa=.95047,Oa=1,Ya=1.08883,Ia=it.prototype=new G;Ia.brighter=function(n){return ut(Math.min(100,this.l+Ha*(arguments.length?n:1)),this.a,this.b)},Ia.darker=function(n){return ut(Math.max(0,this.l-Ha*(arguments.length?n:1)),this.a,this.b)},Ia.rgb=function(){return ot(this.l,this.a,this.b)},Xo.rgb=function(n,t,e){return 1===arguments.length?n instanceof pt?gt(n.r,n.g,n.b):dt(""+n,gt,nt):gt(~~n,~~t,~~e)};var Za=pt.prototype=new G;Za.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),gt(Math.min(255,~~(t/n)),Math.min(255,~~(e/n)),Math.min(255,~~(r/n)))):gt(u,u,u)},Za.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),gt(~~(n*this.r),~~(n*this.g),~~(n*this.b))},Za.hsl=function(){return mt(this.r,this.g,this.b)},Za.toString=function(){return"#"+vt(this.r)+vt(this.g)+vt(this.b)};var Va=Xo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Va.forEach(function(n,t){Va.set(n,ft(t))}),Xo.functor=_t,Xo.xhr=wt(bt),Xo.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=St(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(l>=s)return o;if(u)return u=!1,i;var t=l;if(34===n.charCodeAt(t)){for(var e=t;e++<s;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}l=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++l):10===r&&(u=!0),n.substring(t+1,e).replace(/""/g,'"')}for(;s>l;){var r=n.charCodeAt(l++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(l)&&(++l,++a);else if(r!==c)continue;return n.substring(t,l-a)}return n.substring(t)}for(var r,u,i={},o={},a=[],s=n.length,l=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();(!t||(h=t(h,f++)))&&a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new l,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},Xo.csv=Xo.dsv(",","text/csv"),Xo.tsv=Xo.dsv("	","text/tab-separated-values");var Xa,$a,Ba,Wa,Ja,Ga=Go[h(Go,"requestAnimationFrame")]||function(n){setTimeout(n,17)};Xo.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};$a?$a.n=i:Xa=i,$a=i,Ba||(Wa=clearTimeout(Wa),Ba=1,Ga(Et))},Xo.timer.flush=function(){At(),Ct()},Xo.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var Ka=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Lt);Xo.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=Xo.round(n,Nt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((0>=e?e+1:e-1)/3)))),Ka[8+e/3]};var Qa=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,nc=Xo.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=Xo.round(n,Nt(n,t))).toFixed(Math.max(0,Math.min(20,Nt(n*(1+1e-15),t))))}}),tc=Xo.time={},ec=Date;zt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){rc.setUTCDate.apply(this._,arguments)},setDay:function(){rc.setUTCDay.apply(this._,arguments)},setFullYear:function(){rc.setUTCFullYear.apply(this._,arguments)},setHours:function(){rc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){rc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){rc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){rc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){rc.setUTCSeconds.apply(this._,arguments)},setTime:function(){rc.setTime.apply(this._,arguments)}};var rc=Date.prototype;tc.year=Rt(function(n){return n=tc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),tc.years=tc.year.range,tc.years.utc=tc.year.utc.range,tc.day=Rt(function(n){var t=new ec(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),tc.days=tc.day.range,tc.days.utc=tc.day.utc.range,tc.dayOfYear=function(n){var t=tc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=tc[n]=Rt(function(n){return(n=tc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=tc.year(n).getDay();return Math.floor((tc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});tc[n+"s"]=e.range,tc[n+"s"].utc=e.utc.range,tc[n+"OfYear"]=function(n){var e=tc.year(n).getDay();return Math.floor((tc.dayOfYear(n)+(e+t)%7)/7)}}),tc.week=tc.sunday,tc.weeks=tc.sunday.range,tc.weeks.utc=tc.sunday.utc.range,tc.weekOfYear=tc.sundayOfYear;var uc={"-":"",_:" ",0:"0"},ic=/^\s*\d+/,oc=/^%/;Xo.locale=function(n){return{numberFormat:Tt(n),timeFormat:Pt(n)}};var ac=Xo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xo.format=ac.numberFormat,Xo.geo={},re.prototype={s:0,t:0,add:function(n){ue(n,this.t,cc),ue(cc.s,this.s,this),this.s?this.t+=cc.t:this.s=cc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cc=new re;Xo.geo.stream=function(n,t){n&&sc.hasOwnProperty(n.type)?sc[n.type](n,t):ie(n,t)};var sc={Feature:function(n,t){ie(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ie(e[r].geometry,t)}},lc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){oe(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)oe(e[r],t,0)},Polygon:function(n,t){ae(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ae(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ie(e[r],t)}};Xo.geo.area=function(n){return fc=0,Xo.geo.stream(n,gc),fc};var fc,hc=new re,gc={sphere:function(){fc+=4*Sa},point:g,lineStart:g,lineEnd:g,polygonStart:function(){hc.reset(),gc.lineStart=ce},polygonEnd:function(){var n=2*hc;fc+=0>n?4*Sa+n:n,gc.lineStart=gc.lineEnd=gc.point=g}};Xo.geo.bounds=function(){function n(n,t){x.push(M=[l=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=se([t*Na,e*Na]);if(m){var u=fe(m,r),i=[u[1],-u[0],0],o=fe(i,u);pe(o),o=ve(o);var c=t-p,s=c>0?1:-1,v=o[0]*La*s,d=oa(c)>180;if(d^(v>s*p&&s*t>v)){var y=o[1]*La;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>s*p&&s*t>v)){var y=-o[1]*La;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t):h>=l?(l>t&&(l=t),t>h&&(h=t)):t>p?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t)}else n(t,e);m=r,p=t}function e(){_.point=t}function r(){M[0]=l,M[1]=h,_.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=oa(r)>180?r+(r>0?360:-360):r}else v=n,d=e;gc.point(n,e),t(n,e)}function i(){gc.lineStart()}function o(){u(v,d),gc.lineEnd(),oa(y)>Aa&&(l=-(h=180)),M[0]=l,M[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function s(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var l,f,h,g,p,v,d,m,y,x,M,_={point:n,lineStart:e,lineEnd:r,polygonStart:function(){_.point=u,_.lineStart=i,_.lineEnd=o,y=0,gc.polygonStart()},polygonEnd:function(){gc.polygonEnd(),_.point=n,_.lineStart=e,_.lineEnd=r,0>hc?(l=-(h=180),f=-(g=90)):y>Aa?g=90:-Aa>y&&(f=-90),M[0]=l,M[1]=h}};return function(n){g=h=-(l=f=1/0),x=[],Xo.geo.stream(n,_);var t=x.length;if(t){x.sort(c);for(var e,r=1,u=x[0],i=[u];t>r;++r)e=x[r],s(e[0],u)||s(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,l=e[0],h=u[1])}return x=M=null,1/0===l||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[l,f],[h,g]]}}(),Xo.geo.centroid=function(n){pc=vc=dc=mc=yc=xc=Mc=_c=bc=wc=Sc=0,Xo.geo.stream(n,kc);var t=bc,e=wc,r=Sc,u=t*t+e*e+r*r;return Ca>u&&(t=xc,e=Mc,r=_c,Aa>vc&&(t=dc,e=mc,r=yc),u=t*t+e*e+r*r,Ca>u)?[0/0,0/0]:[Math.atan2(e,t)*La,X(r/Math.sqrt(u))*La]};var pc,vc,dc,mc,yc,xc,Mc,_c,bc,wc,Sc,kc={sphere:g,point:me,lineStart:xe,lineEnd:Me,polygonStart:function(){kc.lineStart=_e},polygonEnd:function(){kc.lineStart=xe}},Ec=Ee(be,Te,ze,[-Sa,-Sa/2]),Ac=1e9;Xo.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Pe(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(Xo.geo.conicEqualArea=function(){return je(He)}).raw=He,Xo.geo.albers=function(){return Xo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xo.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=Xo.geo.albers(),o=Xo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=Xo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var s=i.scale(),l=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[l-.455*s,f-.238*s],[l+.455*s,f+.238*s]]).stream(c).point,r=o.translate([l-.307*s,f+.201*s]).clipExtent([[l-.425*s+Aa,f+.12*s+Aa],[l-.214*s-Aa,f+.234*s-Aa]]).stream(c).point,u=a.translate([l-.205*s,f+.212*s]).clipExtent([[l-.214*s+Aa,f+.166*s+Aa],[l-.115*s-Aa,f+.234*s-Aa]]).stream(c).point,n},n.scale(1070)};var Cc,Nc,Lc,Tc,qc,zc,Rc={point:g,lineStart:g,lineEnd:g,polygonStart:function(){Nc=0,Rc.lineStart=Fe},polygonEnd:function(){Rc.lineStart=Rc.lineEnd=Rc.point=g,Cc+=oa(Nc/2)}},Dc={point:Oe,lineStart:g,lineEnd:g,polygonStart:g,polygonEnd:g},Pc={point:Ze,lineStart:Ve,lineEnd:Xe,polygonStart:function(){Pc.lineStart=$e},polygonEnd:function(){Pc.point=Ze,Pc.lineStart=Ve,Pc.lineEnd=Xe}};Xo.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),Xo.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return Cc=0,Xo.geo.stream(n,u(Rc)),Cc},n.centroid=function(n){return dc=mc=yc=xc=Mc=_c=bc=wc=Sc=0,Xo.geo.stream(n,u(Pc)),Sc?[bc/Sc,wc/Sc]:_c?[xc/_c,Mc/_c]:yc?[dc/yc,mc/yc]:[0/0,0/0]},n.bounds=function(n){return qc=zc=-(Lc=Tc=1/0),Xo.geo.stream(n,u(Dc)),[[Lc,Tc],[qc,zc]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||Je(n):bt,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Ye:new Be(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(Xo.geo.albersUsa()).context(null)},Xo.geo.transform=function(n){return{stream:function(t){var e=new Ge(t);for(var r in n)e[r]=n[r];return e}}},Ge.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xo.geo.projection=Qe,Xo.geo.projectionMutator=nr,(Xo.geo.equirectangular=function(){return Qe(er)}).raw=er.invert=er,Xo.geo.rotation=function(n){function t(t){return t=n(t[0]*Na,t[1]*Na),t[0]*=La,t[1]*=La,t}return n=ur(n[0]%360*Na,n[1]*Na,n.length>2?n[2]*Na:0),t.invert=function(t){return t=n.invert(t[0]*Na,t[1]*Na),t[0]*=La,t[1]*=La,t},t},rr.invert=er,Xo.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=ur(-n[0]*Na,-n[1]*Na,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=La,n[1]*=La}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=cr((t=+r)*Na,u*Na),n):t},n.precision=function(r){return arguments.length?(e=cr(t*Na,(u=+r)*Na),n):u},n.angle(90)},Xo.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Na,u=n[1]*Na,i=t[1]*Na,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),s=Math.cos(u),l=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=s*l-c*f*a)*e),c*l+s*f*a)},Xo.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return Xo.range(Math.ceil(i/d)*d,u,d).map(h).concat(Xo.range(Math.ceil(s/m)*m,c,m).map(g)).concat(Xo.range(Math.ceil(r/p)*p,e,p).filter(function(n){return oa(n%d)>Aa}).map(l)).concat(Xo.range(Math.ceil(a/v)*v,o,v).filter(function(n){return oa(n%m)>Aa}).map(f))}var e,r,u,i,o,a,c,s,l,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(s).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],s=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),s>c&&(t=s,s=c,c=t),n.precision(y)):[[i,s],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,l=lr(a,o,90),f=fr(r,e,y),h=lr(s,c,90),g=fr(i,u,y),n):y},n.majorExtent([[-180,-90+Aa],[180,90-Aa]]).minorExtent([[-180,-80-Aa],[180,80+Aa]])},Xo.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=hr,u=gr;return n.distance=function(){return Xo.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},Xo.geo.interpolate=function(n,t){return pr(n[0]*Na,n[1]*Na,t[0]*Na,t[1]*Na)},Xo.geo.length=function(n){return Uc=0,Xo.geo.stream(n,jc),Uc};var Uc,jc={sphere:g,point:g,lineStart:vr,lineEnd:g,polygonStart:g,polygonEnd:g},Hc=dr(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(Xo.geo.azimuthalEqualArea=function(){return Qe(Hc)}).raw=Hc;var Fc=dr(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},bt);(Xo.geo.azimuthalEquidistant=function(){return Qe(Fc)}).raw=Fc,(Xo.geo.conicConformal=function(){return je(mr)}).raw=mr,(Xo.geo.conicEquidistant=function(){return je(yr)}).raw=yr;var Oc=dr(function(n){return 1/n},Math.atan);(Xo.geo.gnomonic=function(){return Qe(Oc)}).raw=Oc,xr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ea]},(Xo.geo.mercator=function(){return Mr(xr)}).raw=xr;var Yc=dr(function(){return 1},Math.asin);(Xo.geo.orthographic=function(){return Qe(Yc)}).raw=Yc;var Ic=dr(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(Xo.geo.stereographic=function(){return Qe(Ic)}).raw=Ic,_r.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ea]},(Xo.geo.transverseMercator=function(){var n=Mr(_r),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[-n[1],n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},n.rotate([0,0])}).raw=_r,Xo.geom={},Xo.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=_t(e),i=_t(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(kr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var s=Sr(a),l=Sr(c),f=l[0]===s[0],h=l[l.length-1]===s[s.length-1],g=[];for(t=s.length-1;t>=0;--t)g.push(n[a[s[t]][2]]);for(t=+f;t<l.length-h;++t)g.push(n[a[l[t]][2]]);return g}var e=br,r=wr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},Xo.geom.polygon=function(n){return fa(n,Zc),n};var Zc=Xo.geom.polygon.prototype=[];Zc.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},Zc.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},Zc.clip=function(n){for(var t,e,r,u,i,o,a=Cr(n),c=-1,s=this.length-Cr(this),l=this[s-1];++c<s;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Er(o,l,u)?(Er(i,l,u)||n.push(Ar(i,o,l,u)),n.push(o)):Er(i,l,u)&&n.push(Ar(i,o,l,u)),i=o;a&&n.push(n[0]),l=u}return n};var Vc,Xc,$c,Bc,Wc,Jc=[],Gc=[];Pr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(jr),t.length},Br.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Wr.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=Qr(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(Gr(this,e),n=e,e=n.U),e.C=!1,r.C=!0,Kr(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(Kr(this,e),n=e,e=n.U),e.C=!1,r.C=!0,Gr(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?Qr(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,Gr(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Kr(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,Gr(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,Kr(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Gr(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,Kr(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},Xo.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return nu(e(n),a).cells.forEach(function(e,a){var c=e.edges,s=e.site,l=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):s.x>=r&&s.x<=i&&s.y>=u&&s.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];l.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Aa)*Aa,y:Math.round(o(n,t)/Aa)*Aa,i:t}})}var r=br,u=wr,i=r,o=u,a=Kc;return n?t(n):(t.links=function(n){return nu(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return nu(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(jr),c=-1,s=a.length,l=a[s-1].edge,f=l.l===o?l.r:l.l;++c<s;)u=l,i=f,l=a[c].edge,f=l.l===o?l.r:l.l,r<i.i&&r<f.i&&eu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=_t(r=n),t):r},t.y=function(n){return arguments.length?(o=_t(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?Kc:n,t):a===Kc?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===Kc?null:a&&a[1]},t)};var Kc=[[-1e6,-1e6],[1e6,1e6]];Xo.geom.delaunay=function(n){return Xo.geom.voronoi().triangles(n)},Xo.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,l=n.y;if(null!=c)if(oa(c-e)+oa(l-r)<.01)s(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,s(n,f,c,l,u,i,o,a),s(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else s(n,t,e,r,u,i,o,a)}function s(n,t,e,r,u,o,a,c){var s=.5*(u+a),l=.5*(o+c),f=e>=s,h=r>=l,g=(h<<1)+f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=iu()),f?u=s:a=s,h?o=l:c=l,i(n,t,e,r,u,o,a,c)}var l,f,h,g,p,v,d,m,y,x=_t(a),M=_t(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)l=n[g],l.x<v&&(v=l.x),l.y<d&&(d=l.y),l.x>m&&(m=l.x),l.y>y&&(y=l.y),f.push(l.x),h.push(l.y);else for(g=0;p>g;++g){var _=+x(l=n[g],g),b=+M(l,g);v>_&&(v=_),d>b&&(d=b),_>m&&(m=_),b>y&&(y=b),f.push(_),h.push(b)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=iu();if(k.add=function(n){i(k,n,+x(n,++g),+M(n,g),v,d,m,y)},k.visit=function(n){ou(n,k,v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=l=null,k}var o,a=br,c=wr;return(o=arguments.length)?(a=ru,c=uu,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},Xo.interpolateRgb=au,Xo.interpolateObject=cu,Xo.interpolateNumber=su,Xo.interpolateString=lu;var Qc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;Xo.interpolate=fu,Xo.interpolators=[function(n,t){var e=typeof t;return("string"===e?Va.has(t)||/^(#|rgb\(|hsl\()/.test(t)?au:lu:t instanceof G?au:"object"===e?Array.isArray(t)?hu:cu:su)(n,t)}],Xo.interpolateArray=hu;var ns=function(){return bt},ts=Xo.map({linear:ns,poly:xu,quad:function(){return du},cubic:function(){return mu},sin:function(){return Mu},exp:function(){return _u},circle:function(){return bu},elastic:wu,back:Su,bounce:function(){return ku}}),es=Xo.map({"in":bt,out:pu,"in-out":vu,"out-in":function(n){return vu(pu(n))}});Xo.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.substring(0,t):n,r=t>=0?n.substring(t+1):"in";return e=ts.get(e)||ns,r=es.get(r)||bt,gu(r(e.apply(null,$o.call(arguments,1))))},Xo.interpolateHcl=Eu,Xo.interpolateHsl=Au,Xo.interpolateLab=Cu,Xo.interpolateRound=Nu,Xo.transform=function(n){var t=Wo.createElementNS(Xo.ns.prefix.svg,"g");return(Xo.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Lu(e?e.matrix:rs)})(n)},Lu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rs={a:1,b:0,c:0,d:1,e:0,f:0};Xo.interpolateTransform=Ru,Xo.layout={},Xo.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Uu(n[e]));return t}},Xo.layout.chord=function(){function n(){var n,s,f,h,g,p={},v=[],d=Xo.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(s=0,g=-1;++g<i;)s+=u[h][g];v.push(s),m.push(Xo.range(i)),n+=s}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(ka-l*i)/n,s=0,h=-1;++h<i;){for(f=s,g=-1;++g<i;){var y=d[h],x=m[y][g],M=u[y][x],_=s,b=s+=M*n;p[y+"-"+x]={index:y,subindex:x,startAngle:_,endAngle:b,value:M}}r[y]={index:y,startAngle:f,endAngle:s,value:(s-f)/n},s+=l}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,s={},l=0;return s.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,s):u},s.padding=function(n){return arguments.length?(l=n,e=r=null,s):l},s.sortGroups=function(n){return arguments.length?(o=n,e=r=null,s):o},s.sortSubgroups=function(n){return arguments.length?(a=n,e=null,s):a},s.sortChords=function(n){return arguments.length?(c=n,e&&t(),s):c},s.chords=function(){return e||n(),e},s.groups=function(){return r||n(),r},s},Xo.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var s=t.charge/c;n.px-=i*s,n.py-=o*s}return!0}if(t.point&&c&&p>c){var s=t.pointCharge/c;n.px-=i*s,n.py-=o*s}}return!t.charge}}function t(n){n.px=Xo.event.x,n.py=Xo.event.y,a.resume()}var e,r,u,i,o,a={},c=Xo.dispatch("start","tick","end"),s=[1,1],l=.9,f=us,h=is,g=-30,p=os,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,x,M,_=m.length,b=y.length;for(e=0;b>e;++e)a=y[e],f=a.source,h=a.target,x=h.x-f.x,M=h.y-f.y,(p=x*x+M*M)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,x*=p,M*=p,h.x-=x*(d=f.weight/(h.weight+f.weight)),h.y-=M*d,f.x+=x*(d=1-d),f.y+=M*d);if((d=r*v)&&(x=s[0]/2,M=s[1]/2,e=-1,d))for(;++e<_;)a=m[e],a.x+=(x-a.x)*d,a.y+=(M-a.y)*d;if(g)for(Zu(t=Xo.geom.quadtree(m),r,o),e=-1;++e<_;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<_;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*l,a.y-=(a.py-(a.py=a.y))*l);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(s=n,a):s},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(l=+n,a):l},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),Xo.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;s>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,s=o.length;++a<s;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,l=y.length,p=s[0],v=s[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;l>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;l>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;l>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;l>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;l>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=Xo.behavior.drag().origin(bt).on("dragstart.force",Fu).on("drag.force",t).on("dragend.force",Ou)),arguments.length?(this.on("mouseover.force",Yu).on("mouseout.force",Iu).call(e),void 0):e},Xo.rebind(a,c,"on")};var us=20,is=1,os=1/0;Xo.layout.hierarchy=function(){function n(t,o,a){var c=u.call(e,t,o);if(t.depth=o,a.push(t),c&&(s=c.length)){for(var s,l,f=-1,h=t.children=new Array(s),g=0,p=o+1;++f<s;)l=h[f]=n(c[f],p,a),l.parent=t,g+=l.value;r&&h.sort(r),i&&(t.value=g)}else delete t.children,i&&(t.value=+i.call(e,t,o)||0);return t}function t(n,r){var u=n.children,o=0;if(u&&(a=u.length))for(var a,c=-1,s=r+1;++c<a;)o+=t(u[c],s);else i&&(o=+i.call(e,n,r)||0);return i&&(n.value=o),o}function e(t){var e=[];return n(t,0,e),e}var r=Bu,u=Xu,i=$u;return e.sort=function(n){return arguments.length?(r=n,e):r},e.children=function(n){return arguments.length?(u=n,e):u},e.value=function(n){return arguments.length?(i=n,e):i},e.revalue=function(n){return t(n,0),n},e},Xo.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,s=-1;for(r=t.value?r/t.value:0;++s<o;)n(a=i[s],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=Xo.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Vu(e,r)},Xo.layout.pie=function(){function n(i){var o=i.map(function(e,r){return+t.call(n,e,r)}),a=+("function"==typeof r?r.apply(this,arguments):r),c=(("function"==typeof u?u.apply(this,arguments):u)-a)/Xo.sum(o),s=Xo.range(i.length);null!=e&&s.sort(e===as?function(n,t){return o[t]-o[n]}:function(n,t){return e(i[n],i[t])});var l=[];return s.forEach(function(n){var t;l[n]={data:i[n],value:t=o[n],startAngle:a,endAngle:a+=t*c}}),l}var t=Number,e=as,r=0,u=ka;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n};var as={};Xo.layout.stack=function(){function n(a,c){var s=a.map(function(e,r){return t.call(n,e,r)}),l=s.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,l,c);s=Xo.permute(s,f),l=Xo.permute(l,f);var h,g,p,v=r.call(n,l,c),d=s.length,m=s[0].length;for(g=0;m>g;++g)for(u.call(n,s[0][g],p=v[g],l[0][g][1]),h=1;d>h;++h)u.call(n,s[h][g],p+=l[h-1][g][1],l[h][g][1]);return a}var t=bt,e=Qu,r=ni,u=Ku,i=Ju,o=Gu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:cs.get(t)||Qu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:ss.get(t)||ni,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var cs=Xo.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(ti),i=n.map(ei),o=Xo.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,s=[],l=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],s.push(e)):(c+=i[e],l.push(e));return l.reverse().concat(s)},reverse:function(n){return Xo.range(n.length).reverse()},"default":Qu}),ss=Xo.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,s,l=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=s=0,e=1;h>e;++e){for(t=0,u=0;l>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];l>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,s>c&&(s=c)}for(e=0;h>e;++e)g[e]-=s;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:ni});Xo.layout.histogram=function(){function n(n,i){for(var o,a,c=[],s=n.map(e,this),l=r.call(this,s,i),f=u.call(this,l,s,i),i=-1,h=s.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=s[i],a>=l[0]&&a<=l[1]&&(o=c[Xo.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=oi,u=ui;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=_t(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return ii(n,t)}:_t(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},Xo.layout.tree=function(){function n(n,i){function o(n,t){var r=n.children,u=n._tree;if(r&&(i=r.length)){for(var i,a,s,l=r[0],f=l,h=-1;++h<i;)s=r[h],o(s,a),f=c(s,a,f),a=s;vi(n);var g=.5*(l._tree.prelim+s._tree.prelim);t?(u.prelim=t._tree.prelim+e(n,t),u.mod=u.prelim-g):u.prelim=g}else t&&(u.prelim=t._tree.prelim+e(n,t))}function a(n,t){n.x=n._tree.prelim+t;var e=n.children;if(e&&(r=e.length)){var r,u=-1;for(t+=n._tree.mod;++u<r;)a(e[u],t)}}function c(n,t,r){if(t){for(var u,i=n,o=n,a=t,c=n.parent.children[0],s=i._tree.mod,l=o._tree.mod,f=a._tree.mod,h=c._tree.mod;a=si(a),i=ci(i),a&&i;)c=ci(c),o=si(o),o._tree.ancestor=n,u=a._tree.prelim+f-i._tree.prelim-s+e(a,i),u>0&&(di(mi(a,n,r),n,u),s+=u,l+=u),f+=a._tree.mod,s+=i._tree.mod,h+=c._tree.mod,l+=o._tree.mod;a&&!si(o)&&(o._tree.thread=a,o._tree.mod+=f-l),i&&!ci(c)&&(c._tree.thread=i,c._tree.mod+=s-h,r=n)}return r}var s=t.call(this,n,i),l=s[0];pi(l,function(n,t){n._tree={ancestor:n,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),o(l),a(l,-l._tree.prelim);var f=li(l,hi),h=li(l,fi),g=li(l,gi),p=f.x-e(f,h)/2,v=h.x+e(h,f)/2,d=g.depth||1;return pi(l,u?function(n){n.x*=r[0],n.y=n.depth*r[1],delete n._tree}:function(n){n.x=(n.x-p)/(v-p)*r[0],n.y=n.depth/d*r[1],delete n._tree}),s}var t=Xo.layout.hierarchy().sort(null).value(null),e=ai,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Vu(n,t)},Xo.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],s=u[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,pi(a,function(n){n.r=+l(n.value)}),pi(a,bi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/s))/2;pi(a,function(n){n.r+=f}),pi(a,bi),pi(a,function(n){n.r-=f})}return ki(a,c/2,s/2,t?1:1/Math.max(2*a.r/c,2*a.r/s)),o}var t,e=Xo.layout.hierarchy().sort(yi),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Vu(n,e)},Xo.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],s=0;pi(c,function(n){var t=n.children;t&&t.length?(n.x=Ci(t),n.y=Ai(t)):(n.x=o?s+=e(n,o):0,n.y=0,o=n)});var l=Ni(c),f=Li(c),h=l.x-e(l,f)/2,g=f.x+e(f,l)/2;return pi(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=Xo.layout.hierarchy().sort(null).value(null),e=ai,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Vu(n,t)},Xo.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,s=f(e),l=[],h=i.slice(),p=1/0,v="slice"===g?s.dx:"dice"===g?s.dy:"slice-dice"===g?1&e.depth?s.dy:s.dx:Math.min(s.dx,s.dy);for(n(h,s.dx*s.dy/e.value),l.area=0;(c=h.length)>0;)l.push(o=h[c-1]),l.area+=o.area,"squarify"!==g||(a=r(l,v))<=p?(h.pop(),p=a):(l.area-=l.pop().area,u(l,v,s,!1),v=Math.min(s.dx,s.dy),l.length=l.area=0,p=1/0);l.length&&(u(l,v,s,!0),l.length=l.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,s=e.y,l=t?c(n.area/t):0;if(t==e.dx){for((r||l>e.dy)&&(l=e.dy);++i<o;)u=n[i],u.x=a,u.y=s,u.dy=l,a+=u.dx=Math.min(e.x+e.dx-a,l?c(u.area/l):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=l,e.dy-=l}else{for((r||l>e.dx)&&(l=e.dx);++i<o;)u=n[i],u.x=a,u.y=s,u.dx=l,s+=u.dy=Math.min(e.y+e.dy-s,l?c(u.area/l):0);u.z=!1,u.dy+=e.y+e.dy-s,e.x+=l,e.dx-=l}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=s[0],i.dy=s[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=Xo.layout.hierarchy(),c=Math.round,s=[1,1],l=null,f=Ti,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(s=n,i):s},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ti(t):qi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return qi(t,n)}if(!arguments.length)return l;var r;return f=null==(l=n)?Ti:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Vu(i,a)},Xo.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=Xo.random.normal.apply(Xo,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=Xo.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},Xo.scale={};var ls={floor:bt,ceil:bt};Xo.scale.linear=function(){return Hi([0,1],[0,1],fu,!1)};var fs={s:1,g:1,p:1,r:1,e:1};Xo.scale.log=function(){return $i(Xo.scale.linear().domain([0,1]),10,!0,[1,10])};var hs=Xo.format(".0e"),gs={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};Xo.scale.pow=function(){return Bi(Xo.scale.linear(),1,[0,1])},Xo.scale.sqrt=function(){return Xo.scale.pow().exponent(.5)},Xo.scale.ordinal=function(){return Ji([],{t:"range",a:[[]]})},Xo.scale.category10=function(){return Xo.scale.ordinal().range(ps)},Xo.scale.category20=function(){return Xo.scale.ordinal().range(vs)},Xo.scale.category20b=function(){return Xo.scale.ordinal().range(ds)},Xo.scale.category20c=function(){return Xo.scale.ordinal().range(ms)};var ps=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ht),vs=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ht),ds=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ht),ms=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ht);Xo.scale.quantile=function(){return Gi([],[])},Xo.scale.quantize=function(){return Ki(0,1,[0,1])},Xo.scale.threshold=function(){return Qi([.5],[0,1])},Xo.scale.identity=function(){return no([0,1])},Xo.svg={},Xo.svg.arc=function(){function n(){var n=t.apply(this,arguments),i=e.apply(this,arguments),o=r.apply(this,arguments)+ys,a=u.apply(this,arguments)+ys,c=(o>a&&(c=o,o=a,a=c),a-o),s=Sa>c?"0":"1",l=Math.cos(o),f=Math.sin(o),h=Math.cos(a),g=Math.sin(a);return c>=xs?n?"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"M0,"+n+"A"+n+","+n+" 0 1,0 0,"+-n+"A"+n+","+n+" 0 1,0 0,"+n+"Z":"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"Z":n?"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L"+n*h+","+n*g+"A"+n+","+n+" 0 "+s+",0 "+n*l+","+n*f+"Z":"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L0,0"+"Z"}var t=to,e=eo,r=ro,u=uo;return n.innerRadius=function(e){return arguments.length?(t=_t(e),n):t},n.outerRadius=function(t){return arguments.length?(e=_t(t),n):e},n.startAngle=function(t){return arguments.length?(r=_t(t),n):r},n.endAngle=function(t){return arguments.length?(u=_t(t),n):u},n.centroid=function(){var n=(t.apply(this,arguments)+e.apply(this,arguments))/2,i=(r.apply(this,arguments)+u.apply(this,arguments))/2+ys;return[Math.cos(i)*n,Math.sin(i)*n]},n};var ys=-Ea,xs=ka-Aa;Xo.svg.line=function(){return io(bt)};var Ms=Xo.map({linear:oo,"linear-closed":ao,step:co,"step-before":so,"step-after":lo,basis:mo,"basis-open":yo,"basis-closed":xo,bundle:Mo,cardinal:go,"cardinal-open":fo,"cardinal-closed":ho,monotone:Eo});Ms.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var _s=[0,2/3,1/3,0],bs=[0,1/3,2/3,0],ws=[0,1/6,2/3,1/6];Xo.svg.line.radial=function(){var n=io(Ao);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},so.reverse=lo,lo.reverse=so,Xo.svg.area=function(){return Co(bt)},Xo.svg.area.radial=function(){var n=Co(Ao);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},Xo.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),s=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,s)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,s.r,s.p0)+r(s.r,s.p1,s.a1-s.a0)+u(s.r,s.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)+ys,l=s.call(n,u,r)+ys;return{r:i,a0:o,a1:l,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(l),i*Math.sin(l)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Sa)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=hr,o=gr,a=No,c=ro,s=uo;return n.radius=function(t){return arguments.length?(a=_t(t),n):a},n.source=function(t){return arguments.length?(i=_t(t),n):i},n.target=function(t){return arguments.length?(o=_t(t),n):o},n.startAngle=function(t){return arguments.length?(c=_t(t),n):c},n.endAngle=function(t){return arguments.length?(s=_t(t),n):s},n},Xo.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=hr,e=gr,r=Lo;return n.source=function(e){return arguments.length?(t=_t(e),n):t},n.target=function(t){return arguments.length?(e=_t(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},Xo.svg.diagonal.radial=function(){var n=Xo.svg.diagonal(),t=Lo,e=n.projection;return n.projection=function(n){return arguments.length?e(To(t=n)):t},n},Xo.svg.symbol=function(){function n(n,r){return(Ss.get(t.call(this,n,r))||Ro)(e.call(this,n,r))}var t=zo,e=qo;return n.type=function(e){return arguments.length?(t=_t(e),n):t},n.size=function(t){return arguments.length?(e=_t(t),n):e},n};var Ss=Xo.map({circle:Ro,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Cs)),e=t*Cs;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/As),e=t*As/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/As),e=t*As/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});Xo.svg.symbolTypes=Ss.keys();var ks,Es,As=Math.sqrt(3),Cs=Math.tan(30*Na),Ns=[],Ls=0;Ns.call=da.call,Ns.empty=da.empty,Ns.node=da.node,Ns.size=da.size,Xo.transition=function(n){return arguments.length?ks?n.transition():n:xa.transition()},Xo.transition.prototype=Ns,Ns.select=function(n){var t,e,r,u=this.id,i=[];n=M(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]);for(var c=this[o],s=-1,l=c.length;++s<l;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),jo(e,s,u,r.__transition__[u]),t.push(e)):t.push(null)}return Do(i,u)},Ns.selectAll=function(n){var t,e,r,u,i,o=this.id,a=[];n=_(n);for(var c=-1,s=this.length;++c<s;)for(var l=this[c],f=-1,h=l.length;++f<h;)if(r=l[f]){i=r.__transition__[o],e=n.call(r,r.__data__,f,c),a.push(t=[]);for(var g=-1,p=e.length;++g<p;)(u=e[g])&&jo(u,g,o,i),t.push(u)}return Do(a,o)},Ns.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=q(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Do(u,this.id)},Ns.tween=function(n,t){var e=this.id;return arguments.length<2?this.node().__transition__[e].tween.get(n):R(this,null==t?function(t){t.__transition__[e].tween.remove(n)}:function(r){r.__transition__[e].tween.set(n,t)})},Ns.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ru:fu,a=Xo.ns.qualify(n);return Po(this,"attr."+n,t,a.local?i:u)},Ns.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=Xo.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Ns.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=Go.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=fu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Po(this,"style."+n,t,u)},Ns.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,Go.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Ns.text=function(n){return Po(this,"text",n,Uo)},Ns.remove=function(){return this.each("end.transition",function(){var n;this.__transition__.count<2&&(n=this.parentNode)&&n.removeChild(this)})},Ns.ease=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof n&&(n=Xo.ease.apply(Xo,arguments)),R(this,function(e){e.__transition__[t].ease=n}))},Ns.delay=function(n){var t=this.id;return R(this,"function"==typeof n?function(e,r,u){e.__transition__[t].delay=+n.call(e,e.__data__,r,u)}:(n=+n,function(e){e.__transition__[t].delay=n}))},Ns.duration=function(n){var t=this.id;return R(this,"function"==typeof n?function(e,r,u){e.__transition__[t].duration=Math.max(1,n.call(e,e.__data__,r,u))}:(n=Math.max(1,n),function(e){e.__transition__[t].duration=n}))},Ns.each=function(n,t){var e=this.id;if(arguments.length<2){var r=Es,u=ks;ks=e,R(this,function(t,r,u){Es=t.__transition__[e],n.call(t,t.__data__,r,u)}),Es=r,ks=u}else R(this,function(r){var u=r.__transition__[e];(u.event||(u.event=Xo.dispatch("start","end"))).on(n,t)});return this},Ns.transition=function(){for(var n,t,e,r,u=this.id,i=++Ls,o=[],a=0,c=this.length;c>a;a++){o.push(n=[]);for(var t=this[a],s=0,l=t.length;l>s;s++)(e=t[s])&&(r=Object.create(e.__transition__[u]),r.delay+=r.duration,jo(e,s,i,r)),n.push(e)}return Do(o,i)},Xo.svg.axis=function(){function n(n){n.each(function(){var n,s=Xo.select(this),l=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):bt:t,p=s.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Aa),d=Xo.transition(p.exit()).style("opacity",Aa).remove(),m=Xo.transition(p).style("opacity",1),y=Ri(f),x=s.selectAll(".domain").data([0]),M=(x.enter().append("path").attr("class","domain"),Xo.transition(x));v.append("line"),v.append("text");var _=v.select("line"),b=m.select("line"),w=p.select("text").text(g),S=v.select("text"),k=m.select("text");switch(r){case"bottom":n=Ho,_.attr("y2",u),S.attr("y",Math.max(u,0)+o),b.attr("x2",0).attr("y2",u),k.attr("x",0).attr("y",Math.max(u,0)+o),w.attr("dy",".71em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+i+"V0H"+y[1]+"V"+i);break;case"top":n=Ho,_.attr("y2",-u),S.attr("y",-(Math.max(u,0)+o)),b.attr("x2",0).attr("y2",-u),k.attr("x",0).attr("y",-(Math.max(u,0)+o)),w.attr("dy","0em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+-i+"V0H"+y[1]+"V"+-i);break;case"left":n=Fo,_.attr("x2",-u),S.attr("x",-(Math.max(u,0)+o)),b.attr("x2",-u).attr("y2",0),k.attr("x",-(Math.max(u,0)+o)).attr("y",0),w.attr("dy",".32em").style("text-anchor","end"),M.attr("d","M"+-i+","+y[0]+"H0V"+y[1]+"H"+-i);break;case"right":n=Fo,_.attr("x2",u),S.attr("x",Math.max(u,0)+o),b.attr("x2",u).attr("y2",0),k.attr("x",Math.max(u,0)+o).attr("y",0),w.attr("dy",".32em").style("text-anchor","start"),M.attr("d","M"+i+","+y[0]+"H0V"+y[1]+"H"+i)}if(f.rangeBand){var E=f,A=E.rangeBand()/2;l=f=function(n){return E(n)+A}}else l.rangeBand?l=f:d.call(n,f);v.call(n,l),m.call(n,f)})}var t,e=Xo.scale.linear(),r=Ts,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in qs?t+"":Ts,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ts="bottom",qs={top:1,right:1,bottom:1,left:1};Xo.svg.brush=function(){function n(i){i.each(function(){var i=Xo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,bt);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return zs[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,f=Xo.transition(i),h=Xo.transition(o);c&&(l=Ri(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),e(f)),s&&(l=Ri(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+l[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",l[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==Xo.event.keyCode&&(C||(x=null,L[0]-=l[1],L[1]-=f[1],C=2),d())}function p(){32==Xo.event.keyCode&&2==C&&(L[0]+=l[1],L[1]+=f[1],C=0,d())}function v(){var n=Xo.mouse(_),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),C||(Xo.event.altKey?(x||(x=[(l[0]+l[1])/2,(f[0]+f[1])/2]),L[0]=l[+(n[0]<x[0])],L[1]=f[+(n[1]<x[1])]):x=null),E&&m(n,c,0)&&(e(S),u=!0),A&&m(n,s,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,a=Ri(t),c=a[0],s=a[1],p=L[e],v=e?f:l,d=v[1]-v[0];return C&&(c-=p,s-=d+p),r=(e?g:h)?Math.max(c,Math.min(s,n[e])):n[e],C?u=(r+=p)+d:(x&&(p=Math.max(c,Math.min(s,2*x[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function y(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),Xo.select("body").style("cursor",null),T.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),N(),w({type:"brushend"})}var x,M,_=this,b=Xo.select(Xo.event.target),w=a.of(_,arguments),S=Xo.select(_),k=b.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&s,C=b.classed("extent"),N=O(),L=Xo.mouse(_),T=Xo.select(Go).on("keydown.brush",u).on("keyup.brush",p);if(Xo.event.changedTouches?T.on("touchmove.brush",v).on("touchend.brush",y):T.on("mousemove.brush",v).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),C)L[0]=l[0]-L[0],L[1]=f[0]-L[1];else if(k){var q=+/w$/.test(k),z=+/^n/.test(k);M=[l[1-q]-L[0],f[1-z]-L[1]],L[0]=l[q],L[1]=f[z]}else Xo.event.altKey&&(x=L.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),Xo.select("body").style("cursor",b.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=y(n,"brushstart","brush","brushend"),c=null,s=null,l=[0,0],f=[0,0],h=!0,g=!0,p=Rs[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:l,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,ks?Xo.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,l=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=hu(l,t.x),r=hu(f,t.y);return i=o=null,function(u){l=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Rs[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,p=Rs[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(h=!!t[0],g=!!t[1]):c?h=!!t:s&&(g=!!t),n):c&&s?[h,g]:c?h:s?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=l[0]||r!=l[1])&&(l=[e,r])),s&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],s.invert&&(u=s(u),a=s(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=l[0],r=l[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),s&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],s.invert&&(u=s.invert(u),a=s.invert(a)),u>a&&(h=u,u=a,a=h))),c&&s?[[e,u],[r,a]]:c?[e,r]:s&&[u,a])},n.clear=function(){return n.empty()||(l=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&l[0]==l[1]||!!s&&f[0]==f[1]},Xo.rebind(n,a,"on")};var zs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Rs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ds=tc.format=ac.timeFormat,Ps=Ds.utc,Us=Ps("%Y-%m-%dT%H:%M:%S.%LZ");Ds.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Oo:Us,Oo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Oo.toString=Us.toString,tc.second=Rt(function(n){return new ec(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),tc.seconds=tc.second.range,tc.seconds.utc=tc.second.utc.range,tc.minute=Rt(function(n){return new ec(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),tc.minutes=tc.minute.range,tc.minutes.utc=tc.minute.utc.range,tc.hour=Rt(function(n){var t=n.getTimezoneOffset()/60;return new ec(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),tc.hours=tc.hour.range,tc.hours.utc=tc.hour.utc.range,tc.month=Rt(function(n){return n=tc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),tc.months=tc.month.range,tc.months.utc=tc.month.utc.range;var js=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Hs=[[tc.second,1],[tc.second,5],[tc.second,15],[tc.second,30],[tc.minute,1],[tc.minute,5],[tc.minute,15],[tc.minute,30],[tc.hour,1],[tc.hour,3],[tc.hour,6],[tc.hour,12],[tc.day,1],[tc.day,2],[tc.week,1],[tc.month,1],[tc.month,3],[tc.year,1]],Fs=Ds.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",be]]),Os={range:function(n,t,e){return Xo.range(Math.ceil(n/e)*e,+t,e).map(Io)},floor:bt,ceil:bt};Hs.year=tc.year,tc.scale=function(){return Yo(Xo.scale.linear(),Hs,Fs)};var Ys=Hs.map(function(n){return[n[0].utc,n[1]]}),Is=Ps.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",be]]);Ys.year=tc.year.utc,tc.scale.utc=function(){return Yo(Xo.scale.linear(),Ys,Is)},Xo.text=wt(function(n){return n.responseText}),Xo.json=function(n,t){return St(n,"application/json",Zo,t)},Xo.html=function(n,t){return St(n,"text/html",Vo,t)},Xo.xml=wt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(Xo):"object"==typeof module&&module.exports?module.exports=Xo:this.d3=Xo}();'use strict';tr.exportTo('tr.ui.b',function(){var THIS_DOC=document.currentScript.ownerDocument;var svgNS='http://www.w3.org/2000/svg';var ColorScheme=tr.b.ColorScheme;function getColorOfKey(key,selected){var id=ColorScheme.getColorIdForGeneralPurposeString(key);if(selected)
+id+=ColorScheme.properties.brightenedOffsets[0];return ColorScheme.colorsAsStrings[id];}
+var ChartBase=tr.ui.b.define('svg',undefined,svgNS);ChartBase.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.classList.add('chart-base');this.chartTitle_=undefined;this.seriesKeys_=undefined;this.width_=400;this.height_=300;var template=THIS_DOC.querySelector('#chart-base-template');var svgEl=template.content.querySelector('svg');for(var i=0;i<svgEl.children.length;i++)
+this.appendChild(svgEl.children[i].cloneNode(true));Object.defineProperty(this,'width',{get:function(){return this.width_;},set:function(width){this.width_=width;this.updateContents_();}});Object.defineProperty(this,'height',{get:function(){return this.height_;},set:function(height){this.height_=height;this.updateContents_();}});},get chartTitle(){return this.chartTitle_;},set chartTitle(chartTitle){this.chartTitle_=chartTitle;this.updateContents_();},get chartAreaElement(){return this.querySelector('#chart-area');},setSize:function(size){this.width_=size.width;this.height_=size.height;this.updateContents_();},getMargin_:function(){var margin={top:20,right:20,bottom:30,left:50};if(this.chartTitle_)
+margin.top+=20;return margin;},get margin(){return this.getMargin_();},get chartAreaSize(){var margin=this.margin;return{width:this.width_-margin.left-margin.right,height:this.height_-margin.top-margin.bottom};},getLegendKeys_:function(){throw new Error('Not implemented');},updateScales_:function(){throw new Error('Not implemented');},updateContents_:function(){var margin=this.margin;var thisSel=d3.select(this);thisSel.attr('width',this.width_);thisSel.attr('height',this.height_);var chartAreaSel=d3.select(this.chartAreaElement);chartAreaSel.attr('transform','translate('+margin.left+','+margin.top+')');this.updateScales_();this.updateTitle_(chartAreaSel);this.updateLegend_();},updateTitle_:function(chartAreaSel){var titleSel=chartAreaSel.select('#title');if(!this.chartTitle_){titleSel.style('display','none');return;}
+var width=this.chartAreaSize.width;titleSel.attr('transform','translate('+width*0.5+',-5)').style('display',undefined).style('text-anchor','middle').attr('class','title').attr('width',width).text(this.chartTitle_);},updateLegend_:function(){var keys=this.getLegendKeys_();if(keys===undefined)
+return;var chartAreaSel=d3.select(this.chartAreaElement);var chartAreaSize=this.chartAreaSize;var legendEntriesSel=chartAreaSel.selectAll('.legend').data(keys.slice().reverse());legendEntriesSel.enter().append('g').attr('class','legend').attr('transform',function(d,i){return'translate(0,'+i*20+')';}).append('text').text(function(key){return key;});legendEntriesSel.exit().remove();legendEntriesSel.attr('x',chartAreaSize.width-18).attr('width',18).attr('height',18).style('fill',function(key){var selected=this.currentHighlightedLegendKey===key;return getColorOfKey(key,selected);}.bind(this));legendEntriesSel.selectAll('text').attr('x',chartAreaSize.width-24).attr('y',9).attr('dy','.35em').style('text-anchor','end').text(function(d){return d;});},get highlightedLegendKey(){return this.highlightedLegendKey_;},set highlightedLegendKey(highlightedLegendKey){this.highlightedLegendKey_=highlightedLegendKey;this.updateHighlight_();},get currentHighlightedLegendKey(){if(this.tempHighlightedLegendKey_)
+return this.tempHighlightedLegendKey_;return this.highlightedLegendKey_;},pushTempHighlightedLegendKey:function(key){if(this.tempHighlightedLegendKey_)
+throw new Error('push cannot nest');this.tempHighlightedLegendKey_=key;this.updateHighlight_();},popTempHighlightedLegendKey:function(key){if(this.tempHighlightedLegendKey_!=key)
+throw new Error('pop cannot happen');this.tempHighlightedLegendKey_=undefined;this.updateHighlight_();},updateHighlight_:function(){var chartAreaSel=d3.select(this.chartAreaElement);var legendEntriesSel=chartAreaSel.selectAll('.legend');var that=this;legendEntriesSel.each(function(key){var highlighted=key==that.currentHighlightedLegendKey;var color=getColorOfKey(key,highlighted);this.style.fill=color;if(highlighted)
+this.style.fontWeight='bold';else
+this.style.fontWeight='';});}};return{getColorOfKey:getColorOfKey,ChartBase:ChartBase};});'use strict';tr.exportTo('tr.ui.b',function(){var ChartBase=tr.ui.b.ChartBase;var ChartBase2D=tr.ui.b.define('chart-base-2d',ChartBase);ChartBase2D.prototype={__proto__:ChartBase.prototype,decorate:function(){ChartBase.prototype.decorate.call(this);this.classList.add('chart-base-2d');this.xScale_=d3.scale.linear();this.yScale_=d3.scale.linear();this.isYLogScale_=false;this.yLogScaleMin_=undefined;this.dataRange_=new tr.b.Range();this.data_=[];this.seriesKeys_=[];this.leftMargin_=50;d3.select(this.chartAreaElement).append('g').attr('id','brushes');d3.select(this.chartAreaElement).append('g').attr('id','series');this.addEventListener('mousedown',this.onMouseDown_.bind(this));},get data(){return this.data_;},set data(data){if(data===undefined)
+throw new Error('data must be an Array');this.data_=data;this.updateSeriesKeys_();this.updateDataRange_();this.updateContents_();},set isYLogScale(logScale){if(logScale)
+this.yScale_=d3.scale.log(10);else
+this.yScale_=d3.scale.linear();this.isYLogScale_=logScale;},getYScaleMin_:function(){return this.isYLogScale_?this.yLogScaleMin_:0;},getYScaleDomain_:function(minValue,maxValue){if(this.isYLogScale_)
+return[this.getYScaleMin_(),maxValue];return[Math.min(minValue,this.getYScaleMin_()),maxValue];},getSampleWidth_:function(data,index,leftSide){var leftIndex,rightIndex;if(leftSide){leftIndex=Math.max(index-1,0);rightIndex=index;}else{leftIndex=index;rightIndex=Math.min(index+1,data.length-1);}
+var leftWidth=this.getXForDatum_(data[index],index)-
+this.getXForDatum_(data[leftIndex],leftIndex);var rightWidth=this.getXForDatum_(data[rightIndex],rightIndex)-
+this.getXForDatum_(data[index],index);return leftWidth*0.5+rightWidth*0.5;},getLegendKeys_:function(){if(this.seriesKeys_&&this.seriesKeys_.length>1)
+return this.seriesKeys_.slice();return[];},updateSeriesKeys_:function(){var keySet={};this.data_.forEach(function(datum){Object.keys(datum).forEach(function(key){if(this.isDatumFieldSeries_(key))
+keySet[key]=true;},this);},this);this.seriesKeys_=Object.keys(keySet);},isDatumFieldSeries_:function(fieldName){throw new Error('Not implemented');},getXForDatum_:function(datum,index){throw new Error('Not implemented');},updateScales_:function(){if(this.data_.length===0)
+return;var width=this.chartAreaSize.width;var height=this.chartAreaSize.height;this.xScale_.range([0,width]);this.xScale_.domain(d3.extent(this.data_,this.getXForDatum_.bind(this)));var yRange=new tr.b.Range();this.data_.forEach(function(datum){this.seriesKeys_.forEach(function(key){if(datum[key]!==undefined)
+yRange.addValue(datum[key]);});},this);this.yScale_.range([height,0]);this.yScale_.domain([yRange.min,yRange.max]);},updateBrushContents_:function(brushSel){brushSel.selectAll('*').remove();},updateXAxis_:function(xAxis){xAxis.selectAll('*').remove();xAxis[0][0].style.opacity=0;xAxis.attr('transform','translate(0,'+this.chartAreaSize.height+')').call(d3.svg.axis().scale(this.xScale_).orient('bottom'));window.requestAnimationFrame(function(){var previousRight=undefined;xAxis.selectAll('.tick')[0].forEach(function(tick){var currentLeft=tick.transform.baseVal[0].matrix.e;if((previousRight===undefined)||(currentLeft>(previousRight+3))){var currentWidth=tick.getBBox().width;previousRight=currentLeft+currentWidth;}else{tick.style.opacity=0;}});xAxis[0][0].style.opacity=1;});},getMargin_:function(){var margin=ChartBase.prototype.getMargin_.call(this);margin.left=this.leftMargin_;return margin;},updateDataRange_:function(){var dataBySeriesKey=this.getDataBySeriesKey_();this.dataRange_.reset();tr.b.iterItems(dataBySeriesKey,function(series,values){for(var i=0;i<values.length;i++){this.dataRange_.addValue(values[i][series]);}},this);this.yLogScaleMin_=undefined;if(this.dataRange_.min!==undefined){var minValue=this.dataRange_.min;if(minValue==0)
+minValue=1;var onePowerLess=Math.floor(Math.log(minValue)/Math.log(10))-1;this.yLogScaleMin_=Math.pow(10,onePowerLess);}},updateYAxis_:function(yAxis){yAxis.selectAll('*').remove();yAxis[0][0].style.opacity=0;var axisModifier=d3.svg.axis().scale(this.yScale_).orient('left');if(this.isYLogScale_){if(this.yLogScaleMin_===undefined)
+return;var minValue=this.dataRange_.min;if(minValue==0)
+minValue=1;var largestPower=Math.ceil(Math.log(this.dataRange_.max)/Math.log(10))+1;var smallestPower=Math.floor(Math.log(minValue)/Math.log(10));var tickValues=[];for(var i=smallestPower;i<largestPower;i++){tickValues.push(Math.pow(10,i));}
+axisModifier=axisModifier.tickValues(tickValues).tickFormat(function(d){return d;});}
+yAxis.call(axisModifier);window.requestAnimationFrame(function(){var previousTop=undefined;var leftMargin=0;yAxis.selectAll('.tick')[0].forEach(function(tick){var bbox=tick.getBBox();leftMargin=Math.max(leftMargin,bbox.width);var currentTop=tick.transform.baseVal[0].matrix.f;var currentBottom=currentTop+bbox.height;if((previousTop===undefined)||(previousTop>(currentBottom+3))){previousTop=currentTop;}else{tick.style.opacity=0;}});if(leftMargin>this.leftMargin_){this.leftMargin_=leftMargin;this.updateContents_();}else{yAxis[0][0].style.opacity=1;}}.bind(this));},updateContents_:function(){ChartBase.prototype.updateContents_.call(this);var chartAreaSel=d3.select(this.chartAreaElement);this.updateXAxis_(chartAreaSel.select('.x.axis'));this.updateYAxis_(chartAreaSel.select('.y.axis'));this.updateBrushContents_(chartAreaSel.select('#brushes'));this.updateDataContents_(chartAreaSel.select('#series'));},updateDataContents_:function(seriesSel){throw new Error('Not implemented');},getDataBySeriesKey_:function(){var dataBySeriesKey={};this.seriesKeys_.forEach(function(seriesKey){dataBySeriesKey[seriesKey]=[];});this.data_.forEach(function(multiSeriesDatum,index){var x=this.getXForDatum_(multiSeriesDatum,index);d3.keys(multiSeriesDatum).forEach(function(seriesKey){if(seriesKey==='x')
+return;if(multiSeriesDatum[seriesKey]===undefined)
+return;if(!this.isDatumFieldSeries_(seriesKey))
+return;var singleSeriesDatum={x:x};singleSeriesDatum[seriesKey]=multiSeriesDatum[seriesKey];dataBySeriesKey[seriesKey].push(singleSeriesDatum);},this);},this);return dataBySeriesKey;},getDataPointAtClientPoint_:function(clientX,clientY){var rect=this.getBoundingClientRect();var margin=this.margin;var x=clientX-rect.left-margin.left;var y=clientY-rect.top-margin.top;x=this.xScale_.invert(x);y=this.yScale_.invert(y);x=tr.b.clamp(x,this.xScale_.domain()[0],this.xScale_.domain()[1]);y=tr.b.clamp(y,this.yScale_.domain()[0],this.yScale_.domain()[1]);return{x:x,y:y};},prepareDataEvent_:function(mouseEvent,dataEvent){var dataPoint=this.getDataPointAtClientPoint_(mouseEvent.clientX,mouseEvent.clientY);dataEvent.x=dataPoint.x;dataEvent.y=dataPoint.y;},onMouseDown_:function(mouseEvent){tr.ui.b.trackMouseMovesUntilMouseUp(this.onMouseMove_.bind(this,mouseEvent.button),this.onMouseUp_.bind(this,mouseEvent.button));mouseEvent.preventDefault();mouseEvent.stopPropagation();var dataEvent=new tr.b.Event('item-mousedown');dataEvent.button=mouseEvent.button;this.classList.add('updating-brushing-state');this.prepareDataEvent_(mouseEvent,dataEvent);this.dispatchEvent(dataEvent);},onMouseMove_:function(button,mouseEvent){if(mouseEvent.buttons!==undefined){mouseEvent.preventDefault();mouseEvent.stopPropagation();}
+var dataEvent=new tr.b.Event('item-mousemove');dataEvent.button=button;this.prepareDataEvent_(mouseEvent,dataEvent);this.dispatchEvent(dataEvent);},onMouseUp_:function(button,mouseEvent){mouseEvent.preventDefault();mouseEvent.stopPropagation();var dataEvent=new tr.b.Event('item-mouseup');dataEvent.button=button;this.prepareDataEvent_(mouseEvent,dataEvent);this.dispatchEvent(dataEvent);this.classList.remove('updating-brushing-state');}};return{ChartBase2D:ChartBase2D};});'use strict';tr.exportTo('tr.ui.b',function(){var ChartBase2D=tr.ui.b.ChartBase2D;var ChartBase2DBrushX=tr.ui.b.define('chart-base-2d-brush-1d',ChartBase2D);ChartBase2DBrushX.prototype={__proto__:ChartBase2D.prototype,decorate:function(){ChartBase2D.prototype.decorate.call(this);this.brushedRange_=new tr.b.Range();},set brushedRange(range){this.brushedRange_.reset();this.brushedRange_.addRange(range);this.updateContents_();},computeBrushRangeFromIndices:function(indexA,indexB){indexA=tr.b.clamp(indexA,0,this.data_.length-1);indexB=tr.b.clamp(indexB,0,this.data_.length-1);var leftIndex=Math.min(indexA,indexB);var rightIndex=Math.max(indexA,indexB);var r=new tr.b.Range();r.addValue(this.getXForDatum_(this.data_[leftIndex],leftIndex)-
+this.getSampleWidth_(this.data_,leftIndex,true));r.addValue(this.getXForDatum_(this.data_[rightIndex],rightIndex)+
+this.getSampleWidth_(this.data_,rightIndex,false));return r;},getDataIndex_:function(dataX){if(!this.data_)
+return undefined;var bisect=d3.bisector(this.getXForDatum_.bind(this)).right;return bisect(this.data_,dataX)-1;},prepareDataEvent_:function(mouseEvent,dataEvent){ChartBase2D.prototype.prepareDataEvent_.call(this,mouseEvent,dataEvent);dataEvent.index=this.getDataIndex_(dataEvent.x);if(dataEvent.index!==undefined)
+dataEvent.data=this.data_[dataEvent.index];},updateBrushContents_:function(brushSel){brushSel.selectAll('*').remove();var brushes=this.brushedRange_.isEmpty?[]:[this.brushedRange_];var brushRectsSel=brushSel.selectAll('rect').data(brushes);brushRectsSel.enter().append('rect');brushRectsSel.exit().remove();brushRectsSel.attr('x',function(d){return this.xScale_(d.min);}.bind(this)).attr('y',0).attr('width',function(d){return this.xScale_(d.max)-this.xScale_(d.min);}.bind(this)).attr('height',this.chartAreaSize.height);}};return{ChartBase2DBrushX:ChartBase2DBrushX};});'use strict';tr.exportTo('tr.ui.b',function(){var ChartBase2DBrushX=tr.ui.b.ChartBase2DBrushX;var LineChart=tr.ui.b.define('line-chart',ChartBase2DBrushX);LineChart.prototype={__proto__:ChartBase2DBrushX.prototype,decorate:function(){ChartBase2DBrushX.prototype.decorate.call(this);this.classList.add('line-chart');},isDatumFieldSeries_:function(fieldName){return fieldName!='x';},getXForDatum_:function(datum,index){return datum.x;},updateDataContents_:function(dataSel){dataSel.selectAll('*').remove();var dataBySeriesKey=this.getDataBySeriesKey_();var pathsSel=dataSel.selectAll('path').data(this.seriesKeys_);pathsSel.enter().append('path').attr('class','line').style('stroke',function(key){return tr.ui.b.getColorOfKey(key);}).attr('d',function(key){var line=d3.svg.line().x(function(d){return this.xScale_(d.x);}.bind(this)).y(function(d){return this.yScale_(d[key]);}.bind(this));return line(dataBySeriesKey[key]);}.bind(this));pathsSel.exit().remove();}};return{LineChart:LineChart};});'use strict';Polymer('tr-ui-side-panel',{ready:function(){},get rangeOfInterest(){throw new Error('Not implemented');},set rangeOfInterest(rangeOfInterest){throw new Error('Not implemented');},get selection(){throw new Error('Not implemented');},set selection(selection){throw new Error('Not implemented');},get model(){throw new Error('Not implemented');},set model(model){throw new Error('Not implemented');},supportsModel:function(m){throw new Error('Not implemented');}});'use strict';Polymer('tr-ui-e-s-input-latency-side-panel',{ready:function(){this.rangeOfInterest_=new tr.b.Range();this.frametimeType_=tr.model.helpers.IMPL_FRAMETIME_TYPE;this.latencyChart_=undefined;this.frametimeChart_=undefined;this.selectedProcessId_=undefined;this.mouseDownIndex_=undefined;this.curMouseIndex_=undefined;},get model(){return this.model_;},set model(model){this.model_=model;if(this.model_){this.modelHelper_=this.model_.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);}else{this.modelHelper_=undefined;}
+this.updateToolbar_();this.updateContents_();},get frametimeType(){return this.frametimeType_;},set frametimeType(type){if(this.frametimeType_===type)
+return;this.frametimeType_=type;this.updateContents_();},get selectedProcessId(){return this.selectedProcessId_;},set selectedProcessId(process){if(this.selectedProcessId_===process)
+return;this.selectedProcessId_=process;this.updateContents_();},set selection(selection){if(this.latencyChart_===undefined)
+return;this.latencyChart_.brushedRange=selection.bounds;},setBrushedIndices:function(mouseDownIndex,curIndex){this.mouseDownIndex_=mouseDownIndex;this.curMouseIndex_=curIndex;this.updateBrushedRange_();},updateBrushedRange_:function(){if(this.latencyChart_===undefined)
+return;var r=new tr.b.Range();if(this.mouseDownIndex_===undefined){this.latencyChart_.brushedRange=r;return;}
+r=this.latencyChart_.computeBrushRangeFromIndices(this.mouseDownIndex_,this.curMouseIndex_);this.latencyChart_.brushedRange=r;var latencySlices=[];this.model_.getAllThreads().forEach(function(thread){thread.iterateAllEvents(function(event){if(event.title.indexOf('InputLatency:')===0)
+latencySlices.push(event);});});latencySlices=tr.model.helpers.getSlicesIntersectingRange(r,latencySlices);var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.model.EventSet(latencySlices);this.latencyChart_.dispatchEvent(event);},registerMouseEventForLatencyChart_:function(){this.latencyChart_.addEventListener('item-mousedown',function(e){this.mouseDownIndex_=e.index;this.curMouseIndex_=e.index;this.updateBrushedRange_();}.bind(this));this.latencyChart_.addEventListener('item-mousemove',function(e){if(e.button==undefined)
+return;this.curMouseIndex_=e.index;this.updateBrushedRange_();}.bind(this));this.latencyChart_.addEventListener('item-mouseup',function(e){this.curMouseIndex=e.index;this.updateBrushedRange_();}.bind(this));},updateToolbar_:function(){var browserProcess=this.modelHelper_.browserProcess;var labels=[];if(browserProcess!==undefined){var label_str='Browser: '+browserProcess.pid;labels.push({label:label_str,value:browserProcess.pid});}
+tr.b.iterItems(this.modelHelper_.rendererHelpers,function(pid,rendererHelper){var rendererProcess=rendererHelper.process;var label_str='Renderer: '+rendererProcess.userFriendlyName;labels.push({label:label_str,value:rendererProcess.userFriendlyName});},this);if(labels.length===0)
+return;this.selectedProcessId_=labels[0].value;var toolbarEl=this.$.toolbar;toolbarEl.appendChild(tr.ui.b.createSelector(this,'frametimeType','inputLatencySidePanel.frametimeType',this.frametimeType_,[{label:'Main Thread Frame Times',value:tr.model.helpers.MAIN_FRAMETIME_TYPE},{label:'Impl Thread Frame Times',value:tr.model.helpers.IMPL_FRAMETIME_TYPE}]));toolbarEl.appendChild(tr.ui.b.createSelector(this,'selectedProcessId','inputLatencySidePanel.selectedProcessId',this.selectedProcessId_,labels));},get currentRangeOfInterest(){if(this.rangeOfInterest_.isEmpty)
+return this.model_.bounds;else
+return this.rangeOfInterest_;},createLatencyLineChart:function(data,title){var chart=new tr.ui.b.LineChart();var width=600;if(document.body.clientWidth!=undefined)
+width=document.body.clientWidth*0.5;chart.setSize({width:width,height:chart.height});chart.chartTitle=title;chart.data=data;return chart;},updateContents_:function(){var resultArea=this.$.result_area;this.latencyChart_=undefined;this.frametimeChart_=undefined;resultArea.textContent='';if(this.modelHelper_===undefined)
+return;var rangeOfInterest=this.currentRangeOfInterest;var chromeProcess;if(this.modelHelper_.rendererHelpers[this.selectedProcessId_])
+chromeProcess=this.modelHelper_.rendererHelpers[this.selectedProcessId_];else
+chromeProcess=this.modelHelper_.browserHelper;var frameEvents=chromeProcess.getFrameEventsInRange(this.frametimeType,rangeOfInterest);var frametimeData=tr.model.helpers.getFrametimeDataFromEvents(frameEvents);var averageFrametime=tr.b.Statistics.mean(frametimeData,function(d){return d.frametime;});var latencyEvents=this.modelHelper_.browserHelper.getLatencyEventsInRange(rangeOfInterest);var latencyData=[];latencyEvents.forEach(function(event){if(event.inputLatency===undefined)
+return;latencyData.push({x:event.start,latency:event.inputLatency/1000});});var averageLatency=tr.b.Statistics.mean(latencyData,function(d){return d.latency;});var latencySummaryText=document.createElement('div');latencySummaryText.appendChild(tr.ui.b.createSpan({textContent:'Average Latency '+averageLatency+' ms',bold:true}));resultArea.appendChild(latencySummaryText);var frametimeSummaryText=document.createElement('div');frametimeSummaryText.appendChild(tr.ui.b.createSpan({textContent:'Average Frame Time '+averageFrametime+' ms',bold:true}));resultArea.appendChild(frametimeSummaryText);if(latencyData.length!==0){this.latencyChart_=this.createLatencyLineChart(latencyData,'Latency Over Time');this.registerMouseEventForLatencyChart_();resultArea.appendChild(this.latencyChart_);}
+if(frametimeData.length!=0){this.frametimeChart_=this.createLatencyLineChart(frametimeData,'Frame Times');this.frametimeChart_.style.display='block';resultArea.appendChild(this.frametimeChart_);}},get rangeOfInterest(){return this.rangeOfInterest_;},set rangeOfInterest(rangeOfInterest){this.rangeOfInterest_=rangeOfInterest;this.updateContents_();},supportsModel:function(m){if(m==undefined){return{supported:false,reason:'Unknown tracing model'};}
+if(!tr.model.helpers.ChromeModelHelper.supportsModel(m)){return{supported:false,reason:'No Chrome browser or renderer process found'};}
+var modelHelper=m.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);if(modelHelper.browserHelper&&modelHelper.browserHelper.hasLatencyEvents){return{supported:true};}
+return{supported:false,reason:'No InputLatency events trace. Consider enabling '+'benchmark" and "input" category when recording the trace'};},get textLabel(){return'Input Latency';}});'use strict';tr.exportTo('tr.ui.b',function(){var ChartBase=tr.ui.b.ChartBase;var getColorOfKey=tr.ui.b.getColorOfKey;var MIN_RADIUS=100;var PieChart=tr.ui.b.define('pie-chart',ChartBase);PieChart.prototype={__proto__:ChartBase.prototype,decorate:function(){ChartBase.prototype.decorate.call(this);this.classList.add('pie-chart');this.data_=undefined;this.seriesKeys_=undefined;var chartAreaSel=d3.select(this.chartAreaElement);var pieGroupSel=chartAreaSel.append('g').attr('class','pie-group');this.pieGroup_=pieGroupSel.node();this.pathsGroup_=pieGroupSel.append('g').attr('class','paths').node();this.labelsGroup_=pieGroupSel.append('g').attr('class','labels').node();this.linesGroup_=pieGroupSel.append('g').attr('class','lines').node();},get data(){return this.data_;},set data(data){if(data!==undefined){var seriesKeys=[];var seenSeriesKeys={};data.forEach(function(d){var k=d.label;if(seenSeriesKeys[k])
+throw new Error('Label '+k+' has been used already');seriesKeys.push(k);seenSeriesKeys[k]=true;},this);this.seriesKeys_=seriesKeys;}else{this.seriesKeys_=undefined;}
+this.data_=data;this.updateContents_();},get margin(){var margin={top:0,right:0,bottom:0,left:0};if(this.chartTitle_)
+margin.top+=40;return margin;},getMinSize:function(){this.updateContents_();var labelSel=d3.select(this.labelsGroup_).selectAll('.label');var maxLabelWidth=-Number.MAX_VALUE;var leftTextHeightSum=0;var rightTextHeightSum=0;labelSel.each(function(l){var r=this.getBoundingClientRect();maxLabelWidth=Math.max(maxLabelWidth,r.width+32);if(this.style.textAnchor=='end'){leftTextHeightSum+=r.height;}else{rightTextHeightSum+=r.height;}});var titleWidth=this.querySelector('#title').getBoundingClientRect().width;var margin=this.margin;var marginWidth=margin.left+margin.right;var marginHeight=margin.top+margin.bottom;return{width:Math.max(2*MIN_RADIUS+2*maxLabelWidth,titleWidth*1.1)+marginWidth,height:marginHeight+Math.max(2*MIN_RADIUS,leftTextHeightSum,rightTextHeightSum)*1.25};},getLegendKeys_:function(){return undefined;},updateScales_:function(width,height){if(this.data_===undefined)
+return;},updateContents_:function(){ChartBase.prototype.updateContents_.call(this);if(!this.data_)
+return;var width=this.chartAreaSize.width;var height=this.chartAreaSize.height;var radius=Math.max(MIN_RADIUS,Math.min(width,height*0.95)/2);d3.select(this.pieGroup_).attr('transform','translate('+width/2+','+height/2+')');var pieLayout=d3.layout.pie().value(function(d){return d.value;}).sort(null);var piePathsSel=d3.select(this.pathsGroup_).datum(this.data_).selectAll('path').data(pieLayout);function midAngle(d){return d.startAngle+(d.endAngle-d.startAngle)/2;}
+var pathsArc=d3.svg.arc().innerRadius(0).outerRadius(radius-30);var valueLabelArc=d3.svg.arc().innerRadius(radius-100).outerRadius(radius-30);var lineBeginArc=d3.svg.arc().innerRadius(radius-50).outerRadius(radius-50);var lineEndArc=d3.svg.arc().innerRadius(radius).outerRadius(radius);piePathsSel.enter().append('path').attr('class','arc').attr('fill',function(d,i){var origData=this.data_[i];var highlighted=(origData.label===this.currentHighlightedLegendKey);return getColorOfKey(origData.label,highlighted);}.bind(this)).attr('d',pathsArc).on('click',function(d,i){var origData=this.data_[i];var event=new tr.b.Event('item-click');event.data=origData;event.index=i;this.dispatchEvent(event);d3.event.stopPropagation();}.bind(this)).on('mouseenter',function(d,i){var origData=this.data_[i];this.pushTempHighlightedLegendKey(origData.label);}.bind(this)).on('mouseleave',function(d,i){var origData=this.data_[i];this.popTempHighlightedLegendKey(origData.label);}.bind(this));piePathsSel.enter().append('text').attr('class','arc-text').attr('transform',function(d){return'translate('+valueLabelArc.centroid(d)+')';}).attr('dy','.35em').style('text-anchor','middle').text(function(d,i){var origData=this.data_[i];if(origData.valueText===undefined)
+return'';if(d.endAngle-d.startAngle<0.4)
+return'';return origData.valueText;}.bind(this));piePathsSel.exit().remove();var labelSel=d3.select(this.labelsGroup_).selectAll('.label').data(pieLayout(this.data_));labelSel.enter().append('text').attr('class','label').attr('dy','.35em');labelSel.text(function(d){if(d.data.label.length>40)
+return d.data.label.substr(0,40)+'...';return d.data.label;});labelSel.attr('transform',function(d){var pos=lineEndArc.centroid(d);pos[0]=radius*(midAngle(d)<Math.PI?1:-1);return'translate('+pos+')';});labelSel.style('text-anchor',function(d){return midAngle(d)<Math.PI?'start':'end';});var lineSel=d3.select(this.linesGroup_).selectAll('.line').data(pieLayout(this.data_));lineSel.enter().append('polyline').attr('class','line').attr('dy','.35em');lineSel.attr('points',function(d){var pos=lineEndArc.centroid(d);pos[0]=radius*0.95*(midAngle(d)<Math.PI?1:-1);return[lineBeginArc.centroid(d),lineEndArc.centroid(d),pos];});},updateHighlight_:function(){ChartBase.prototype.updateHighlight_.call(this);var pathsGroupSel=d3.select(this.pathsGroup_);var that=this;pathsGroupSel.selectAll('.arc').each(function(d,i){var origData=that.data_[i];var highlighted=origData.label==that.currentHighlightedLegendKey;var color=getColorOfKey(origData.label,highlighted);this.style.fill=color;});}};return{PieChart:PieChart};});'use strict';(function(){var GROUP_BY_PROCESS_NAME='process';var GROUP_BY_THREAD_NAME='thread';var WALL_TIME_GROUPING_UNIT='Wall time';var CPU_TIME_GROUPING_UNIT='CPU time';function ResultsForGroup(model,name){this.model=model;this.name=name;this.topLevelSlices=[];this.allSlices=[];}
+ResultsForGroup.prototype={get wallTime(){var wallSum=tr.b.Statistics.sum(this.topLevelSlices,function(x){return x.duration;});return wallSum;},get cpuTime(){var cpuDuration=0;for(var i=0;i<this.topLevelSlices.length;i++){var x=this.topLevelSlices[i];if(x.cpuDuration===undefined){if(x.duration===undefined)
+continue;return 0;}
+cpuDuration+=x.cpuDuration;}
+return cpuDuration;},appendGroupContents:function(group){if(group.model!=this.model)
+throw new Error('Models must be the same');group.allSlices.forEach(function(slice){this.allSlices.push(slice);},this);group.topLevelSlices.forEach(function(slice){this.topLevelSlices.push(slice);},this);},appendThreadSlices:function(rangeOfInterest,thread){var tmp=this.getSlicesIntersectingRange(rangeOfInterest,thread.sliceGroup.slices);tmp.forEach(function(slice){this.allSlices.push(slice);},this);tmp=this.getSlicesIntersectingRange(rangeOfInterest,thread.sliceGroup.topLevelSlices);tmp.forEach(function(slice){this.topLevelSlices.push(slice);},this);},getSlicesIntersectingRange:function(rangeOfInterest,slices){var slicesInFilterRange=[];for(var i=0;i<slices.length;i++){var slice=slices[i];if(rangeOfInterest.intersectsExplicitRangeInclusive(slice.start,slice.end))
+slicesInFilterRange.push(slice);}
+return slicesInFilterRange;}};Polymer('tr-ui-e-s-time-summary-side-panel',{ready:function(){this.rangeOfInterest_=new tr.b.Range();this.selection_=undefined;this.groupBy_=GROUP_BY_PROCESS_NAME;this.groupingUnit_=CPU_TIME_GROUPING_UNIT;this.showCpuIdleTime_=true;this.chart_=undefined;var toolbarEl=this.$.toolbar;this.groupBySelector_=tr.ui.b.createSelector(this,'groupBy','timeSummarySidePanel.groupBy',this.groupBy_,[{label:'Group by process',value:GROUP_BY_PROCESS_NAME},{label:'Group by thread',value:GROUP_BY_THREAD_NAME}]);toolbarEl.appendChild(this.groupBySelector_);this.groupingUnitSelector_=tr.ui.b.createSelector(this,'groupingUnit','timeSummarySidePanel.groupingUnit',this.groupingUnit_,[{label:'Wall time',value:WALL_TIME_GROUPING_UNIT},{label:'CPU time',value:CPU_TIME_GROUPING_UNIT}]);toolbarEl.appendChild(this.groupingUnitSelector_);this.showCpuIdleTimeCheckbox_=tr.ui.b.createCheckBox(this,'showCpuIdleTime','timeSummarySidePanel.showCpuIdleTime',this.showCpuIdleTime_,'Show CPU idle time');toolbarEl.appendChild(this.showCpuIdleTimeCheckbox_);this.updateShowCpuIdleTimeCheckboxVisibility_();},trimPieChartData:function(groups,otherGroup,getValue,opt_extraValue){groups=groups.filter(function(d){return getValue(d)!=0;});var sum=tr.b.Statistics.sum(groups,getValue);if(opt_extraValue!==undefined)
+sum+=opt_extraValue;function compareByValue(a,b){return getValue(a)-getValue(b);}
+groups.sort(compareByValue);var thresshold=0.1*sum;while(groups.length>1){var group=groups[0];if(getValue(group)>=thresshold)
+break;var v=getValue(group);if(v+getValue(otherGroup)>thresshold)
+break;groups.splice(0,1);otherGroup.appendGroupContents(group);}
+if(getValue(otherGroup)>0)
+groups.push(otherGroup);groups.sort(compareByValue);return groups;},generateResultsForGroup:function(model,name){return new ResultsForGroup(model,name);},createPieChartFromResultGroups:function(groups,title,getValue,opt_extraData){var chart=new tr.ui.b.PieChart();function pushDataForGroup(data,resultsForGroup,value){data.push({label:resultsForGroup.name,value:value,valueText:tr.v.Unit.byName.timeDurationInMs.format(value),resultsForGroup:resultsForGroup});}
+chart.addEventListener('item-click',function(clickEvent){var resultsForGroup=clickEvent.data.resultsForGroup;if(resultsForGroup===undefined)
+return;var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.model.EventSet(resultsForGroup.allSlices);event.selection.timeSummaryGroupName=resultsForGroup.name;chart.dispatchEvent(event);});var data=[];groups.forEach(function(resultsForGroup){var value=getValue(resultsForGroup);if(value===0)
+return;pushDataForGroup(data,resultsForGroup,value);});if(opt_extraData)
+data.push.apply(data,opt_extraData);chart.chartTitle=title;chart.data=data;return chart;},get model(){return this.model_;},set model(model){this.model_=model;this.updateContents_();},get groupBy(){return groupBy_;},set groupBy(groupBy){this.groupBy_=groupBy;if(this.groupBySelector_)
+this.groupBySelector_.selectedValue=groupBy;this.updateContents_();},get groupingUnit(){return groupingUnit_;},set groupingUnit(groupingUnit){this.groupingUnit_=groupingUnit;if(this.groupingUnitSelector_)
+this.groupingUnitSelector_.selectedValue=groupingUnit;this.updateShowCpuIdleTimeCheckboxVisibility_();this.updateContents_();},get showCpuIdleTime(){return this.showCpuIdleTime_;},set showCpuIdleTime(showCpuIdleTime){this.showCpuIdleTime_=showCpuIdleTime;if(this.showCpuIdleTimeCheckbox_)
+this.showCpuIdleTimeCheckbox_.checked=showCpuIdleTime;this.updateContents_();},updateShowCpuIdleTimeCheckboxVisibility_:function(){if(!this.showCpuIdleTimeCheckbox_)
+return;var visible=this.groupingUnit_==CPU_TIME_GROUPING_UNIT;if(visible)
+this.showCpuIdleTimeCheckbox_.style.display='';else
+this.showCpuIdleTimeCheckbox_.style.display='none';},getGroupNameForThread_:function(thread){if(this.groupBy_==GROUP_BY_THREAD_NAME)
+return thread.name?thread.name:thread.userFriendlyName;if(this.groupBy_==GROUP_BY_PROCESS_NAME)
+return thread.parent.userFriendlyName;},updateContents_:function(){var resultArea=this.$.result_area;this.chart_=undefined;resultArea.textContent='';if(this.model_===undefined)
+return;var rangeOfInterest;if(this.rangeOfInterest_.isEmpty)
+rangeOfInterest=this.model_.bounds;else
+rangeOfInterest=this.rangeOfInterest_;var allGroup=this.generateResultsForGroup(this.model_,'all');var resultsByGroupName={};this.model_.getAllThreads().forEach(function(thread){var groupName=this.getGroupNameForThread_(thread);if(resultsByGroupName[groupName]===undefined){resultsByGroupName[groupName]=this.generateResultsForGroup(this.model_,groupName);}
+resultsByGroupName[groupName].appendThreadSlices(rangeOfInterest,thread);allGroup.appendThreadSlices(rangeOfInterest,thread);},this);var getValueFromGroup=function(group){if(this.groupingUnit_==WALL_TIME_GROUPING_UNIT)
+return group.wallTime;return group.cpuTime;}.bind(this);var summaryText=document.createElement('div');summaryText.appendChild(tr.ui.b.createSpan({textContent:'Total '+this.groupingUnit_+': ',bold:true}));summaryText.appendChild(tr.v.ui.createScalarSpan(getValueFromGroup(allGroup),{unit:tr.v.Unit.byName.timeDurationInMs,ownerDocument:this.ownerDocument}));resultArea.appendChild(summaryText);var extraValue=0;var extraData=[];if(this.showCpuIdleTime_&&this.groupingUnit_===CPU_TIME_GROUPING_UNIT&&this.model.kernel.bestGuessAtCpuCount!==undefined){var maxCpuTime=rangeOfInterest.range*this.model.kernel.bestGuessAtCpuCount;var idleTime=Math.max(0,maxCpuTime-allGroup.cpuTime);extraData.push({label:'CPU Idle',value:idleTime,valueText:tr.v.Unit.byName.timeDurationInMs.format(idleTime)});extraValue+=idleTime;}
+var otherGroup=this.generateResultsForGroup(this.model_,'Other');var groups=this.trimPieChartData(tr.b.dictionaryValues(resultsByGroupName),otherGroup,getValueFromGroup,extraValue);if(groups.length==0){resultArea.appendChild(tr.ui.b.createSpan({textContent:'No data'}));return undefined;}
+this.chart_=this.createPieChartFromResultGroups(groups,this.groupingUnit_+' breakdown by '+this.groupBy_,getValueFromGroup,extraData);resultArea.appendChild(this.chart_);this.chart_.addEventListener('click',function(){var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.c.EventSet([]);this.dispatchEvent(event);});this.chart_.setSize(this.chart_.getMinSize());},get selection(){return selection_;},set selection(selection){this.selection_=selection;if(this.chart_===undefined)
+return;if(selection.timeSummaryGroupName)
+this.chart_.highlightedLegendKey=selection.timeSummaryGroupName;else
+this.chart_.highlightedLegendKey=undefined;},get rangeOfInterest(){return this.rangeOfInterest_;},set rangeOfInterest(rangeOfInterest){this.rangeOfInterest_=rangeOfInterest;this.updateContents_();},supportsModel:function(model){return{supported:false};},get textLabel(){return'Time Summary';}});}());'use strict';tr.exportTo('tr.e.system_stats',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function SystemStatsSnapshot(objectInstance,ts,args){ObjectSnapshot.apply(this,arguments);this.objectInstance=objectInstance;this.ts=ts;this.args=args;this.stats=args;}
 SystemStatsSnapshot.prototype={__proto__:ObjectSnapshot.prototype,initialize:function(){if(this.args.length==0)
 throw new Error('No system stats snapshot data.');this.stats_=this.args;},getStats:function(){return this.stats_;},setStats:function(stats){this.stats_=stats;}};ObjectSnapshot.register(SystemStatsSnapshot,{typeName:'base::TraceEventSystemStatsMonitor::SystemStats'});return{SystemStatsSnapshot:SystemStatsSnapshot};});'use strict';tr.exportTo('tr.ui.e.system_stats',function(){var SystemStatsSnapshotView=tr.ui.b.define('tr-ui-e-system-stats-snapshot-view',tr.ui.analysis.ObjectSnapshotView);SystemStatsSnapshotView.prototype={__proto__:tr.ui.analysis.ObjectSnapshotView.prototype,decorate:function(){this.classList.add('tr-ui-e-system-stats-snapshot-view');},updateContents:function(){var snapshot=this.objectSnapshot_;if(!snapshot||!snapshot.getStats()){this.textContent='No system stats snapshot found.';return;}
 this.textContent='';var stats=snapshot.getStats();this.appendChild(this.buildList_(stats));},isFloat:function(n){return typeof n==='number'&&n%1!==0;},buildList_:function(stats){var statList=document.createElement('ul');for(var statName in stats){var statText=document.createElement('li');statText.textContent=''+statName+': ';statList.appendChild(statText);if(stats[statName]instanceof Object){statList.appendChild(this.buildList_(stats[statName]));}else{if(this.isFloat(stats[statName]))
 statText.textContent+=stats[statName].toFixed(2);else
 statText.textContent+=stats[statName];}}
-return statList;}};tr.ui.analysis.ObjectSnapshotView.register(SystemStatsSnapshotView,{typeName:'base::TraceEventSystemStatsMonitor::SystemStats'});return{SystemStatsSnapshotView:SystemStatsSnapshotView};});'use strict';tr.exportTo('tr.ui.tracks',function(){var StackedBarsTrack=tr.ui.b.define('stacked-bars-track',tr.ui.tracks.Track);StackedBarsTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('stacked-bars-track');this.objectInstance_=null;this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},addEventsToTrackMap:function(eventToTrackMap){var objectSnapshots=this.objectInstance_.snapshots;objectSnapshots.forEach(function(obj){eventToTrackMap.addEvent(obj,this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onSnapshot(snapshot){selection.push(snapshot);}
+return statList;}};tr.ui.analysis.ObjectSnapshotView.register(SystemStatsSnapshotView,{typeName:'base::TraceEventSystemStatsMonitor::SystemStats'});return{SystemStatsSnapshotView:SystemStatsSnapshotView};});'use strict';tr.exportTo('tr.ui.b',function(){var constants={HEADING_WIDTH:250};return{constants:constants};});'use strict';Polymer('tr-ui-heading',{DOWN_ARROW:String.fromCharCode(0x25BE),RIGHT_ARROW:String.fromCharCode(0x25B8),ready:function(viewport){this.style.width=(tr.ui.b.constants.HEADING_WIDTH-6)+'px';this.heading_='';this.expanded_=true;this.arrowVisible_=false;this.selectionGenerator_=undefined;this.updateContents_();},get heading(){return this.heading_;},set heading(text){if(this.heading_===text)
+return;this.heading_=text;this.updateContents_();},set arrowVisible(val){if(this.arrowVisible_===val)
+return;this.arrowVisible_=!!val;this.updateContents_();},set tooltip(text){this.$.heading.title=text;},set selectionGenerator(generator){if(this.selectionGenerator_===generator)
+return;this.selectionGenerator_=generator;this.updateContents_();},get expanded(){return this.expanded_;},set expanded(expanded){if(this.expanded_===expanded)
+return;this.expanded_=!!expanded;this.updateContents_();},onHeadingDivClicked_:function(){this.dispatchEvent(new tr.b.Event('heading-clicked',{'bubbles':true}));},updateContents_:function(){if(this.arrowVisible_){this.$.arrow.style.display='';}else{this.$.arrow.style.display='none';this.$.heading.style.display=this.expanded_?'':'none';}
+if(this.arrowVisible_){this.$.arrow.textContent=this.expanded_?this.DOWN_ARROW:this.RIGHT_ARROW;}
+this.$.link.style.display='none';this.$.heading_content.style.display='none';if(this.selectionGenerator_){this.$.link.style.display='inline-block';this.$.link.selection=this.selectionGenerator_;this.$.link.textContent=this.heading_;}else{this.$.heading_content.style.display='inline-block';this.$.heading_content.textContent=this.heading_;}}});'use strict';tr.exportTo('tr.ui.tracks',function(){var Track=tr.ui.b.define('track',tr.ui.b.ContainerThatDecoratesItsChildren);Track.prototype={__proto__:tr.ui.b.ContainerThatDecoratesItsChildren.prototype,decorate:function(viewport){tr.ui.b.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);if(viewport===undefined)
+throw new Error('viewport is required when creating a Track.');this.viewport_=viewport;this.classList.add('track');},get viewport(){return this.viewport_;},get drawingContainer(){var cur=this;while(cur){if(cur instanceof tr.ui.tracks.DrawingContainer)
+return cur;cur=cur.parentElement;}
+return undefined;},get eventContainer(){},invalidateDrawingContainer:function(){var dc=this.drawingContainer;if(dc)
+dc.invalidate();},context:function(){if(!this.parentNode)
+return undefined;if(!this.parentNode.context)
+throw new Error('Parent container does not support context() method.');return this.parentNode.context();},decorateChild_:function(childTrack){},undecorateChild_:function(childTrack){if(childTrack.detach)
+childTrack.detach();},updateContents_:function(){},drawTrack:function(type){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);this.draw(type,viewLWorld,viewRWorld);ctx.restore();},draw:function(type,viewLWorld,viewRWorld){},addEventsToTrackMap:function(eventToTrackMap){},addContainersToTrackMap:function(containerToTrackMap){},addIntersectingEventsInRangeToSelection:function(loVX,hiVX,loVY,hiVY,selection){var pixelRatio=window.devicePixelRatio||1;var dt=this.viewport.currentDisplayTransform;var viewPixWidthWorld=dt.xViewVectorToWorld(1);var loWX=dt.xViewToWorld(loVX*pixelRatio);var hiWX=dt.xViewToWorld(hiVX*pixelRatio);var clientRect=this.getBoundingClientRect();var a=Math.max(loVY,clientRect.top);var b=Math.min(hiVY,clientRect.bottom);if(a>b)
+return;this.addIntersectingEventsInRangeToSelectionInWorldSpace(loWX,hiWX,viewPixWidthWorld,selection);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){},addClosestInstantEventToSelection:function(instantEvents,worldX,worldMaxDist,selection){var instantEvent=tr.b.findClosestElementInSortedArray(instantEvents,function(x){return x.start;},worldX,worldMaxDist);if(!instantEvent)
+return;selection.push(instantEvent);}};return{Track:Track};});'use strict';tr.exportTo('tr.ui.tracks',function(){var StackedBarsTrack=tr.ui.b.define('stacked-bars-track',tr.ui.tracks.Track);StackedBarsTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('stacked-bars-track');this.objectInstance_=null;this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},addEventsToTrackMap:function(eventToTrackMap){var objectSnapshots=this.objectInstance_.snapshots;objectSnapshots.forEach(function(obj){eventToTrackMap.addEvent(obj,this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onSnapshot(snapshot){selection.push(snapshot);}
 var snapshots=this.objectInstance_.snapshots;var maxBounds=this.objectInstance_.parent.model.bounds.max;tr.b.iterateOverIntersectingIntervals(snapshots,function(x){return x.ts;},function(x,i){if(i==snapshots.length-1){if(snapshots.length==1)
 return maxBounds;return snapshots[i].ts-snapshots[i-1].ts;}
 return snapshots[i+1].ts-snapshots[i].ts;},loWX,hiWX,onSnapshot);},addEventNearToProvidedEventToSelection:function(event,offset,selection){if(!(event instanceof tr.model.ObjectSnapshot))
 throw new Error('Unrecognized event');var objectSnapshots=this.objectInstance_.snapshots;var index=objectSnapshots.indexOf(event);var newIndex=index+offset;if(newIndex>=0&&newIndex<objectSnapshots.length){selection.push(objectSnapshots[newIndex]);return true;}
 return false;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){var snapshot=tr.b.findClosestElementInSortedArray(this.objectInstance_.snapshots,function(x){return x.ts;},worldX,worldMaxDist);if(!snapshot)
-return;selection.push(snapshot);}};return{StackedBarsTrack:StackedBarsTrack};});'use strict';tr.exportTo('tr.ui.e.system_stats',function(){var EventPresenter=tr.ui.b.EventPresenter;var statCount;var excludedStats={'meminfo':{'pswpin':0,'pswpout':0,'pgmajfault':0},'diskinfo':{'io':0,'io_time':0,'read_time':0,'reads':0,'reads_merged':0,'sectors_read':0,'sectors_written':0,'weighted_io_time':0,'write_time':0,'writes':0,'writes_merged':0},'swapinfo':{}};var SystemStatsInstanceTrack=tr.ui.b.define('tr-ui-e-system-stats-instance-track',tr.ui.tracks.StackedBarsTrack);SystemStatsInstanceTrack.prototype={__proto__:tr.ui.tracks.StackedBarsTrack.prototype,decorate:function(viewport){tr.ui.tracks.StackedBarsTrack.prototype.decorate.call(this,viewport);this.classList.add('tr-ui-e-system-stats-instance-track');this.objectInstance_=null;},set objectInstances(objectInstances){if(!objectInstances){this.objectInstance_=[];return;}
+return;selection.push(snapshot);}};return{StackedBarsTrack:StackedBarsTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SelectionState=tr.model.SelectionState;var EventPresenter=tr.ui.b.EventPresenter;var ObjectInstanceTrack=tr.ui.b.define('object-instance-track',tr.ui.tracks.Track);ObjectInstanceTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('object-instance-track');this.objectInstances_=[];this.objectSnapshots_=[];this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},get objectInstances(){return this.objectInstances_;},set objectInstances(objectInstances){if(!objectInstances||objectInstances.length==0){this.heading='';this.objectInstances_=[];this.objectSnapshots_=[];return;}
+this.heading=objectInstances[0].typeName;this.objectInstances_=objectInstances;this.objectSnapshots_=[];this.objectInstances_.forEach(function(instance){this.objectSnapshots_.push.apply(this.objectSnapshots_,instance.snapshots);},this);this.objectSnapshots_.sort(function(a,b){return a.ts-b.ts;});},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;},get snapshotRadiusView(){return 7*(window.devicePixelRatio||1);},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawLetterDots_(viewLWorld,viewRWorld);break;}},drawLetterDots_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var height=bounds.height*pixelRatio;var halfHeight=height*0.5;var twoPi=Math.PI*2;var dt=this.viewport.currentDisplayTransform;var snapshotRadiusView=this.snapshotRadiusView;var snapshotRadiusWorld=dt.xViewVectorToWorld(height);var loI;ctx.save();dt.applyTransformToCanvas(ctx);var objectInstances=this.objectInstances_;var loI=tr.b.findLowIndexInSortedArray(objectInstances,function(instance){return instance.deletionTs;},viewLWorld);ctx.strokeStyle='rgb(0,0,0)';for(var i=loI;i<objectInstances.length;++i){var instance=objectInstances[i];var x=instance.creationTs;if(x>viewRWorld)
+break;var right=instance.deletionTs==Number.MAX_VALUE?viewRWorld:instance.deletionTs;ctx.fillStyle=EventPresenter.getObjectInstanceColor(instance);ctx.fillRect(x,pixelRatio,right-x,height-2*pixelRatio);}
+ctx.restore();var objectSnapshots=this.objectSnapshots_;loI=tr.b.findLowIndexInSortedArray(objectSnapshots,function(snapshot){return snapshot.ts+snapshotRadiusWorld;},viewLWorld);for(var i=loI;i<objectSnapshots.length;++i){var snapshot=objectSnapshots[i];var x=snapshot.ts;if(x-snapshotRadiusWorld>viewRWorld)
+break;var xView=dt.xWorldToView(x);ctx.fillStyle=EventPresenter.getObjectSnapshotColor(snapshot);ctx.beginPath();ctx.arc(xView,halfHeight,snapshotRadiusView,0,twoPi);ctx.fill();if(snapshot.selected){ctx.lineWidth=5;ctx.strokeStyle='rgb(100,100,0)';ctx.stroke();ctx.beginPath();ctx.arc(xView,halfHeight,snapshotRadiusView-1,0,twoPi);ctx.lineWidth=2;ctx.strokeStyle='rgb(255,255,0)';ctx.stroke();}else{ctx.lineWidth=1;ctx.strokeStyle='rgb(0,0,0)';ctx.stroke();}}
+ctx.lineWidth=1;var selectionState=SelectionState.NONE;if(objectInstances.length&&objectInstances[0].selectionState===SelectionState.DIMMED){selectionState=SelectionState.DIMMED;}
+if(selectionState===SelectionState.DIMMED){var width=bounds.width*pixelRatio;ctx.fillStyle='rgba(255,255,255,0.5)';ctx.fillRect(0,0,width,height);ctx.restore();}},addEventsToTrackMap:function(eventToTrackMap){if(this.objectInstance_!==undefined){this.objectInstance_.forEach(function(obj){eventToTrackMap.addEvent(obj,this);},this);}
+if(this.objectSnapshots_!==undefined){this.objectSnapshots_.forEach(function(obj){eventToTrackMap.addEvent(obj,this);},this);}},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){var foundSnapshot=false;function onSnapshot(snapshot){selection.push(snapshot);foundSnapshot=true;}
+var snapshotRadiusView=this.snapshotRadiusView;var snapshotRadiusWorld=viewPixWidthWorld*snapshotRadiusView;tr.b.iterateOverIntersectingIntervals(this.objectSnapshots_,function(x){return x.ts-snapshotRadiusWorld;},function(x){return 2*snapshotRadiusWorld;},loWX,hiWX,onSnapshot);if(foundSnapshot)
+return;tr.b.iterateOverIntersectingIntervals(this.objectInstances_,function(x){return x.creationTs;},function(x){return x.deletionTs-x.creationTs;},loWX,hiWX,selection.push.bind(selection));},addEventNearToProvidedEventToSelection:function(event,offset,selection){var events;if(event instanceof tr.model.ObjectSnapshot)
+events=this.objectSnapshots_;else if(event instanceof tr.model.ObjectInstance)
+events=this.objectInstances_;else
+throw new Error('Unrecognized event');var index=events.indexOf(event);var newIndex=index+offset;if(newIndex>=0&&newIndex<events.length){selection.push(events[newIndex]);return true;}
+return false;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){var snapshot=tr.b.findClosestElementInSortedArray(this.objectSnapshots_,function(x){return x.ts;},worldX,worldMaxDist);if(!snapshot)
+return;selection.push(snapshot);}};var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);tr.b.decorateExtensionRegistry(ObjectInstanceTrack,options);return{ObjectInstanceTrack:ObjectInstanceTrack};});'use strict';tr.exportTo('tr.ui.e.system_stats',function(){var EventPresenter=tr.ui.b.EventPresenter;var statCount;var excludedStats={'meminfo':{'pswpin':0,'pswpout':0,'pgmajfault':0},'diskinfo':{'io':0,'io_time':0,'read_time':0,'reads':0,'reads_merged':0,'sectors_read':0,'sectors_written':0,'weighted_io_time':0,'write_time':0,'writes':0,'writes_merged':0},'swapinfo':{}};var SystemStatsInstanceTrack=tr.ui.b.define('tr-ui-e-system-stats-instance-track',tr.ui.tracks.StackedBarsTrack);SystemStatsInstanceTrack.prototype={__proto__:tr.ui.tracks.StackedBarsTrack.prototype,decorate:function(viewport){tr.ui.tracks.StackedBarsTrack.prototype.decorate.call(this,viewport);this.classList.add('tr-ui-e-system-stats-instance-track');this.objectInstance_=null;},set objectInstances(objectInstances){if(!objectInstances){this.objectInstance_=[];return;}
 if(objectInstances.length!=1)
 throw new Error('Bad object instance count.');this.objectInstance_=objectInstances[0];if(this.objectInstance_!==null){this.computeRates_(this.objectInstance_.snapshots);this.maxStats_=this.computeMaxStats_(this.objectInstance_.snapshots);}},computeRates_:function(snapshots){for(var i=0;i<snapshots.length;i++){var snapshot=snapshots[i];var stats=snapshot.getStats();var prevSnapshot;var prevStats;if(i==0){prevSnapshot=snapshots[0];}else{prevSnapshot=snapshots[i-1];}
 prevStats=prevSnapshot.getStats();var timeIntervalSeconds=(snapshot.ts-prevSnapshot.ts)/1000;if(timeIntervalSeconds==0)
@@ -6962,141 +6501,1074 @@
 ctx.fillRect(leftView,currentY-barHeight,Math.max(rightView-leftView,1),barHeight);currentY+=height;}}
 return currentY;},drawStatNames_:function(leftView,height,currentY,prefix,maxStats){var ctx=this.context();ctx.textAlign='end';ctx.font='12px Arial';ctx.fillStyle='#000000';for(var statName in maxStats){if(maxStats[statName]instanceof Object){currentY=this.drawStatNames_(leftView,height,currentY,statName,maxStats[statName]);}else{var fullname=statName;if(prefix!='')
 fullname=prefix+' :: '+statName;ctx.fillText(fullname,leftView-10,currentY-height/4);currentY+=height;}}
-return currentY;}};tr.ui.tracks.ObjectInstanceTrack.register(SystemStatsInstanceTrack,{typeName:'base::TraceEventSystemStatsMonitor::SystemStats'});return{SystemStatsInstanceTrack:SystemStatsInstanceTrack};});'use strict';tr.exportTo('tr.e.tcmalloc',function(){var ObjectSnapshot=tr.model.ObjectSnapshot;function HeapSnapshot(){ObjectSnapshot.apply(this,arguments);}
-HeapSnapshot.prototype={__proto__:ObjectSnapshot.prototype,preInitialize:function(){tr.e.cc.preInitializeObject(this);},initialize:function(){if(this.args.length==0)
-throw new Error('No heap snapshot data.');this.total_=this.args[0];var allocs=this.args.slice(1);this.heap_={children:{},currentBytes:0,currentAllocs:0,totalBytes:0,totalAllocs:0};for(var i=0;i<allocs.length;i++){var alloc=allocs[i];var traceNames=alloc.trace.split(' ');if(traceNames.indexOf('trace-memory-ignore')!=-1)
-continue;var heapEntry=this.heap_;for(var j=0;j<traceNames.length;j++){var traceName=traceNames[j];if(traceName.length!=0){heapEntry.currentBytes+=alloc.currentBytes;heapEntry.currentAllocs+=alloc.currentAllocs;heapEntry.totalBytes+=alloc.totalBytes;heapEntry.totalAllocs+=alloc.totalAllocs;}
-if(!heapEntry.children[traceName]){heapEntry.children[traceName]={children:{},currentBytes:alloc.currentBytes,currentAllocs:alloc.currentAllocs,totalBytes:alloc.totalBytes,totalAllocs:alloc.totalAllocs};}
-heapEntry=heapEntry.children[traceName];}}}};ObjectSnapshot.register(HeapSnapshot,{typeName:'memory::Heap'});return{HeapSnapshot:HeapSnapshot};});'use strict';tr.exportTo('tr.ui.e.tcmalloc',function(){var TcmallocInstanceView=tr.ui.b.define('tr-ui-e-tcmalloc-instance-view',tr.ui.analysis.ObjectInstanceView);TcmallocInstanceView.prototype={__proto__:tr.ui.analysis.ObjectInstanceView.prototype,decorate:function(){tr.ui.analysis.ObjectInstanceView.prototype.decorate.apply(this);this.classList.add('tr-ui-e-tcmalloc-instance-view');},updateContents:function(){var instance=this.objectInstance_;if(!instance||!instance.snapshots||instance.snapshots.length==0){this.textContent='No data found.';return;}
-this.textContent='';var snapshot=instance.snapshots[0];var heapEntry=snapshot.heap_;var traceNames=Object.keys(heapEntry.children);traceNames.sort(function(a,b){return heapEntry.children[b].currentBytes-
-heapEntry.children[a].currentBytes;});traceNames=traceNames.slice(0,5);var table=document.createElement('table');var titles=['Total'];titles=titles.concat(traceNames);table.appendChild(this.buildRow_(null,titles));var chartArrays=[[],[],[],[],[]];for(var i=0;i<instance.snapshots.length;i++){var snapshot=instance.snapshots[i];var rowData=[snapshot.total_.currentBytes];for(var j=0;j<5;j++){var bytes=snapshot.heap_.children[traceNames[j]].currentBytes;rowData.push(bytes);chartArrays[j].push([Math.round(snapshot.ts/1000),bytes/1024/1024]);}
-var row=this.buildRow_(snapshot,rowData);table.appendChild(row);}
-this.appendChild(table);},buildRow_:function(snapshot,items){var row=document.createElement('tr');var td=document.createElement('td');if(snapshot){var snapshotLink=document.createElement('tr-ui-a-analysis-link');snapshotLink.selection=new tr.model.EventSet(snapshot);td.appendChild(snapshotLink);}
-row.appendChild(td);for(var i=0;i<items.length;i++){var data=document.createElement('td');data.textContent=items[i];row.appendChild(data);}
-return row;},getByteString_:function(bytes){var mb=bytes/1024/1024;return mb.toFixed(1)+' MB';}};tr.ui.analysis.ObjectInstanceView.register(TcmallocInstanceView,{typeName:'memory::Heap'});return{TcmallocInstanceView:TcmallocInstanceView};});'use strict';tr.exportTo('tr.ui.e.tcmalloc',function(){var TcmallocSnapshotView=tr.ui.b.define('tr-ui-e-tcmalloc-heap-snapshot-view',tr.ui.analysis.ObjectSnapshotView);TcmallocSnapshotView.prototype={__proto__:tr.ui.analysis.ObjectSnapshotView.prototype,decorate:function(){this.classList.add('tr-ui-e-tcmalloc-heap-snapshot-view');},updateContents:function(){var snapshot=this.objectSnapshot_;if(!snapshot||!snapshot.heap_){this.textContent='No heap found.';return;}
-this.textContent='';var subhead=document.createElement('div');subhead.textContent='Retaining '+
-this.getByteString_(snapshot.total_.currentBytes)+' in '+
-snapshot.total_.currentAllocs+' allocations. Showing > 0.1 MB.';subhead.className='subhead';this.appendChild(subhead);var myList=this.buildAllocList_(snapshot.heap_,false);this.appendChild(myList);},buildAllocList_:function(heapEntry,hide){var myList=document.createElement('ul');myList.hidden=hide;var keys=Object.keys(heapEntry.children);keys.sort(function(a,b){return heapEntry.children[b].currentBytes-
-heapEntry.children[a].currentBytes;});for(var i=0;i<keys.length;i++){var traceName=keys[i];var trace=heapEntry.children[traceName];if(trace.currentBytes<100*1024)
-continue;var childCount=Object.keys(trace.children).length;var isLeaf=childCount==0;var myItem=this.buildItem_(traceName,isLeaf,trace.currentBytes,trace.currentAllocs);myList.appendChild(myItem);if(childCount>0)
-myItem.appendChild(this.buildAllocList_(trace,true));}
-return myList;},buildItem_:function(traceName,isLeaf,bytes,allocs){var myItem=document.createElement('li');myItem.className='trace-item';myItem.id=traceName;var byteDiv=document.createElement('div');byteDiv.textContent=this.getByteString_(bytes);byteDiv.className='trace-bytes';myItem.appendChild(byteDiv);if(traceName.length==0){traceName='(here)';}else if(traceName.indexOf('..')==0){var lastSlash=traceName.lastIndexOf('/');if(lastSlash!=-1)
-traceName='Task from '+traceName.substr(lastSlash+1);}
-var traceDiv=document.createElement('div');traceDiv.textContent=traceName;traceDiv.className='trace-name';myItem.appendChild(traceDiv);if(isLeaf)
-return myItem;var self=this;myItem.addEventListener('click',function(event){if(this==event.target||this==event.target.parentElement){this.classList.toggle('expanded');var child=this.querySelector('ul');child.hidden=!child.hidden;self.onItemClicked_(this);}});myItem.classList.add('collapsed');return myItem;},onItemClicked_:function(traceItem){var traces=[];while(traceItem.classList.contains('trace-item')){var traceNameDiv=traceItem.firstElementChild.nextElementSibling;traces.unshift(traceNameDiv.textContent);var traceNameUl=traceItem.parentElement;traceItem=traceNameUl.parentElement;}
-var instance=this.objectSnapshot_.objectInstance;instance.selectedTraces=traces;var trackView=document.querySelector('.timeline-track-view');trackView.viewport_.dispatchChangeEvent();},getByteString_:function(bytes){var mb=bytes/1024/1024;return mb.toFixed(1)+' MB';}};tr.ui.analysis.ObjectSnapshotView.register(TcmallocSnapshotView,{typeName:'memory::Heap'});return{TcmallocSnapshotView:TcmallocSnapshotView};});'use strict';tr.exportTo('tr.ui.e.tcmalloc',function(){var EventPresenter=tr.ui.b.EventPresenter;var HeapInstanceTrack=tr.ui.b.define('tr-ui-e-tcmalloc-heap-instance-track',tr.ui.tracks.StackedBarsTrack);HeapInstanceTrack.prototype={__proto__:tr.ui.tracks.StackedBarsTrack.prototype,decorate:function(viewport){tr.ui.tracks.StackedBarsTrack.prototype.decorate.call(this,viewport);this.classList.add('tr-ui-e-tcmalloc-heap-instance-track');this.objectInstance_=null;},set objectInstances(objectInstances){if(!objectInstances){this.objectInstance_=[];return;}
-if(objectInstances.length!=1)
-throw new Error('Bad object instance count.');this.objectInstance_=objectInstances[0];this.maxBytes_=this.computeMaxBytes_(this.objectInstance_.snapshots);},computeMaxBytes_:function(snapshots){var maxBytes=0;for(var i=0;i<snapshots.length;i++){var snapshot=snapshots[i];var traceNames=Object.keys(snapshot.heap_.children);var sumBytes=0;for(var j=0;j<traceNames.length;j++){sumBytes+=snapshot.heap_.children[traceNames[j]].currentBytes;}
-if(sumBytes>maxBytes)
-maxBytes=sumBytes;}
-return maxBytes;},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawEvents_(viewLWorld,viewRWorld);break;}},drawEvents_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var width=bounds.width*pixelRatio;var height=bounds.height*pixelRatio;var dt=this.viewport.currentDisplayTransform;var maxBytes=this.maxBytes_;var objectSnapshots=this.objectInstance_.snapshots;var lowIndex=tr.b.findLowIndexInSortedArray(objectSnapshots,function(snapshot){return snapshot.ts;},viewLWorld);if(lowIndex>0)
-lowIndex-=1;for(var i=lowIndex;i<objectSnapshots.length;++i){var snapshot=objectSnapshots[i];var left=snapshot.ts;if(left>viewRWorld)
-break;var leftView=dt.xWorldToView(left);if(leftView<0)
-leftView=0;var right;if(i!=objectSnapshots.length-1){right=objectSnapshots[i+1].ts;}else{if(objectSnapshots.length>1)
-right=objectSnapshots[i].ts+(objectSnapshots[i].ts-
-objectSnapshots[i-1].ts);else
-right=this.objectInstance_.parent.model.bounds.max;}
-var rightView=dt.xWorldToView(right);if(rightView>width)
-rightView=width;leftView=Math.floor(leftView);rightView=Math.floor(rightView);var currentY=height;var keys=Object.keys(snapshot.heap_.children);for(var k=keys.length-1;k>=0;k--){var trace=snapshot.heap_.children[keys[k]];if(this.objectInstance_.selectedTraces&&this.objectInstance_.selectedTraces.length>0&&this.objectInstance_.selectedTraces[0]==keys[k]){ctx.fillStyle='rgb(239, 248, 206)';}else
-ctx.fillStyle=EventPresenter.getBarSnapshotColor(snapshot,k);var barHeight=height*trace.currentBytes/maxBytes;ctx.fillRect(leftView,currentY-barHeight,Math.max(rightView-leftView,1),barHeight);currentY-=barHeight;}}
-ctx.lineWidth=1;}};tr.ui.tracks.ObjectInstanceTrack.register(HeapInstanceTrack,{typeName:'memory::Heap'});return{HeapInstanceTrack:HeapInstanceTrack};});'use strict';Polymer('tr-ui-e-s-category-summary-side-panel',{ready:function(){},get model(){return this.model_;},set model(model){this.model_=model;this.updateContents_();},get listeningToKeys(){return false;},set selection(selection){},set rangeOfInterest(rangeOfInterest){},updateContents_:function(){this.$.table.tableColumns=[{title:'Category / Title',value:function(row){return row.title;}},{title:'Events',textAlign:'right',value:function(row){return row.count;}}];if(this.model_===undefined){this.$.table.tableRows=[];return;}
-var categories={};this.model_.iterateAllEvents(function handleEvent(event){if(!(event instanceof tr.model.Slice)&&!(event instanceof tr.model.AsyncSlice)&&!(event instanceof tr.model.InstantEvent)&&!(event instanceof tr.model.FlowEvent))
-return;tr.b.getCategoryParts(event.category).forEach(function(category){if(categories[category]===undefined){categories[category]={};}
-var titleCounts=categories[category];if(titleCounts[event.title]===undefined){titleCounts[event.title]=0;}
-titleCounts[event.title]+=1;});});function compareCounts(a,b){return b.count-a.count;}
-var rows=[];for(var category in categories){var categoryRow={title:category,subRows:[],count:0};rows.push(categoryRow);var titleCounts=categories[category];for(var title in titleCounts){var count=titleCounts[title];categoryRow.count+=count;categoryRow.subRows.push({title:title,count:count});}
-categoryRow.subRows.sort(compareCounts);}
-rows.sort(compareCounts);this.$.table.tableRows=rows;},supportsModel:function(m){if(m==undefined){return{supported:false,reason:'Unknown tracing model'};}
-return{supported:true};},get textLabel(){return'Categories';}});'use strict';Polymer('tr-ui-e-s-input-latency-side-panel',{ready:function(){this.rangeOfInterest_=new tr.b.Range();this.frametimeType_=tr.e.audits.IMPL_FRAMETIME_TYPE;this.latencyChart_=undefined;this.frametimeChart_=undefined;this.selectedProcessId_=undefined;this.mouseDownIndex_=undefined;this.curMouseIndex_=undefined;},get model(){return this.model_;},set model(model){this.model_=model;if(this.model_)
-this.modelHelper_=new tr.e.audits.ChromeModelHelper(model);else
-this.modelHelper_=undefined;this.updateToolbar_();this.updateContents_();},get frametimeType(){return this.frametimeType_;},set frametimeType(type){if(this.frametimeType_===type)
-return;this.frametimeType_=type;this.updateContents_();},get selectedProcessId(){return this.selectedProcessId_;},set selectedProcessId(process){if(this.selectedProcessId_===process)
-return;this.selectedProcessId_=process;this.updateContents_();},set selection(selection){if(this.latencyChart_===undefined)
-return;this.latencyChart_.brushedRange=selection.bounds;},setBrushedIndices:function(mouseDownIndex,curIndex){this.mouseDownIndex_=mouseDownIndex;this.curMouseIndex_=curIndex;this.updateBrushedRange_();},updateBrushedRange_:function(){if(this.latencyChart_===undefined)
-return;var r=new tr.b.Range();if(this.mouseDownIndex_===undefined){this.latencyChart_.brushedRange=r;return;}
-r=this.latencyChart_.computeBrushRangeFromIndices(this.mouseDownIndex_,this.curMouseIndex_);this.latencyChart_.brushedRange=r;var latencySlices=[];this.model_.getAllThreads().forEach(function(thread){thread.iterateAllEvents(function(event){if(event.title.indexOf('InputLatency:')===0)
-latencySlices.push(event);});});latencySlices=tr.e.audits.getSlicesIntersectingRange(r,latencySlices);var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.model.EventSet(latencySlices);this.latencyChart_.dispatchEvent(event);},registerMouseEventForLatencyChart_:function(){this.latencyChart_.addEventListener('item-mousedown',function(e){this.mouseDownIndex_=e.index;this.curMouseIndex_=e.index;this.updateBrushedRange_();}.bind(this));this.latencyChart_.addEventListener('item-mousemove',function(e){if(e.button==undefined)
-return;this.curMouseIndex_=e.index;this.updateBrushedRange_();}.bind(this));this.latencyChart_.addEventListener('item-mouseup',function(e){this.curMouseIndex=e.index;this.updateBrushedRange_();}.bind(this));},updateToolbar_:function(){var browserProcess=this.modelHelper_.browserProcess;var labels=[];if(browserProcess!==undefined){var label_str='Browser: '+browserProcess.pid;labels.push({label:label_str,value:browserProcess.pid});}
-tr.b.iterItems(this.modelHelper_.rendererHelpers,function(pid,rendererHelper){var rendererProcess=rendererHelper.process;var label_str='Renderer: '+rendererProcess.userFriendlyName;labels.push({label:label_str,value:rendererProcess.userFriendlyName});},this);if(labels.length===0)
-return;this.selectedProcessId_=labels[0].value;var toolbarEl=this.$.toolbar;toolbarEl.appendChild(tr.ui.b.createSelector(this,'frametimeType','inputLatencySidePanel.frametimeType',this.frametimeType_,[{label:'Main Thread Frame Times',value:tr.e.audits.MAIN_FRAMETIME_TYPE},{label:'Impl Thread Frame Times',value:tr.e.audits.IMPL_FRAMETIME_TYPE}]));toolbarEl.appendChild(tr.ui.b.createSelector(this,'selectedProcessId','inputLatencySidePanel.selectedProcessId',this.selectedProcessId_,labels));},get currentRangeOfInterest(){if(this.rangeOfInterest_.isEmpty)
-return this.model_.bounds;else
-return this.rangeOfInterest_;},createLatencyLineChart:function(data,title){var chart=new tr.ui.b.LineChart();var width=600;if(document.body.clientWidth!=undefined)
-width=document.body.clientWidth*0.5;chart.setSize({width:width,height:chart.height});chart.chartTitle=title;chart.data=data;return chart;},updateContents_:function(){var resultArea=this.$.result_area;this.latencyChart_=undefined;this.frametimeChart_=undefined;resultArea.textContent='';if(this.modelHelper_===undefined)
-return;var rangeOfInterest=this.currentRangeOfInterest;var chromeProcess;if(this.modelHelper_.rendererHelpers[this.selectedProcessId_])
-chromeProcess=this.modelHelper_.rendererHelpers[this.selectedProcessId_];else
-chromeProcess=this.modelHelper_.browserHelper;var frameEvents=chromeProcess.getFrameEventsInRange(this.frametimeType,rangeOfInterest);var frametimeData=tr.e.audits.getFrametimeDataFromEvents(frameEvents);var averageFrametime=tr.b.Statistics.mean(frametimeData,function(d){return d.frametime;});var latencyEvents=this.modelHelper_.browserHelper.getLatencyEventsInRange(rangeOfInterest);var latencyData=[];latencyEvents.forEach(function(event){if(event.inputLatency===undefined)
-return;latencyData.push({x:event.start,latency:event.inputLatency/1000});});var averageLatency=tr.b.Statistics.mean(latencyData,function(d){return d.latency;});var latencySummaryText=document.createElement('div');latencySummaryText.appendChild(tr.ui.b.createSpan({textContent:'Average Latency '+averageLatency+' ms',bold:true}));resultArea.appendChild(latencySummaryText);var frametimeSummaryText=document.createElement('div');frametimeSummaryText.appendChild(tr.ui.b.createSpan({textContent:'Average Frame Time '+averageFrametime+' ms',bold:true}));resultArea.appendChild(frametimeSummaryText);if(latencyData.length!==0){this.latencyChart_=this.createLatencyLineChart(latencyData,'Latency Over Time');this.registerMouseEventForLatencyChart_();resultArea.appendChild(this.latencyChart_);}
-if(frametimeData.length!=0){this.frametimeChart_=this.createLatencyLineChart(frametimeData,'Frame Times');this.frametimeChart_.style.display='block';resultArea.appendChild(this.frametimeChart_);}},get rangeOfInterest(){return this.rangeOfInterest_;},set rangeOfInterest(rangeOfInterest){this.rangeOfInterest_=rangeOfInterest;this.updateContents_();},supportsModel:function(m){if(m==undefined){return{supported:false,reason:'Unknown tracing model'};}
-if(!tr.e.audits.ChromeModelHelper.supportsModel(m)){return{supported:false,reason:'No Chrome browser or renderer process found'};}
-var modelHelper=new tr.e.audits.ChromeModelHelper(m);if(modelHelper.browserHelper&&modelHelper.browserHelper.hasLatencyEvents){return{supported:true};}
-return{supported:false,reason:'No InputLatency events trace. Consider enabling '+'benchmark" and "input" category when recording the trace'};},get textLabel(){return'Input Latency';}});'use strict';tr.exportTo('tr.ui.b',function(){var ChartBase=tr.ui.b.ChartBase;var getColorOfKey=tr.ui.b.getColorOfKey;var MIN_RADIUS=100;var PieChart=tr.ui.b.define('pie-chart',ChartBase);PieChart.prototype={__proto__:ChartBase.prototype,decorate:function(){ChartBase.prototype.decorate.call(this);this.classList.add('pie-chart');this.data_=undefined;this.seriesKeys_=undefined;var chartAreaSel=d3.select(this.chartAreaElement);var pieGroupSel=chartAreaSel.append('g').attr('class','pie-group');this.pieGroup_=pieGroupSel.node();this.pathsGroup_=pieGroupSel.append('g').attr('class','paths').node();this.labelsGroup_=pieGroupSel.append('g').attr('class','labels').node();this.linesGroup_=pieGroupSel.append('g').attr('class','lines').node();},get data(){return this.data_;},set data(data){if(data!==undefined){var seriesKeys=[];var seenSeriesKeys={};data.forEach(function(d){var k=d.label;if(seenSeriesKeys[k])
-throw new Error('Label '+k+' has been used already');seriesKeys.push(k);seenSeriesKeys[k]=true;},this);this.seriesKeys_=seriesKeys;}else{this.seriesKeys_=undefined;}
-this.data_=data;this.updateContents_();},get margin(){var margin={top:0,right:0,bottom:0,left:0};if(this.chartTitle_)
-margin.top+=40;return margin;},getMinSize:function(){this.updateContents_();var labelSel=d3.select(this.labelsGroup_).selectAll('.label');var maxLabelWidth=-Number.MAX_VALUE;var leftTextHeightSum=0;var rightTextHeightSum=0;labelSel.each(function(l){var r=this.getBoundingClientRect();maxLabelWidth=Math.max(maxLabelWidth,r.width+32);if(this.style.textAnchor=='end'){leftTextHeightSum+=r.height;}else{rightTextHeightSum+=r.height;}});var titleWidth=this.querySelector('#title').getBoundingClientRect().width;var margin=this.margin;var marginWidth=margin.left+margin.right;var marginHeight=margin.top+margin.bottom;return{width:Math.max(2*MIN_RADIUS+2*maxLabelWidth,titleWidth*1.1)+marginWidth,height:marginHeight+Math.max(2*MIN_RADIUS,leftTextHeightSum,rightTextHeightSum)*1.25};},getLegendKeys_:function(){return undefined;},updateScales_:function(width,height){if(this.data_===undefined)
-return;},updateContents_:function(){ChartBase.prototype.updateContents_.call(this);if(!this.data_)
-return;var width=this.chartAreaSize.width;var height=this.chartAreaSize.height;var radius=Math.max(MIN_RADIUS,Math.min(width,height*0.95)/2);d3.select(this.pieGroup_).attr('transform','translate('+width/2+','+height/2+')');var pieLayout=d3.layout.pie().value(function(d){return d.value;}).sort(null);var piePathsSel=d3.select(this.pathsGroup_).datum(this.data_).selectAll('path').data(pieLayout);function midAngle(d){return d.startAngle+(d.endAngle-d.startAngle)/2;}
-var pathsArc=d3.svg.arc().innerRadius(0).outerRadius(radius-30);var valueLabelArc=d3.svg.arc().innerRadius(radius-100).outerRadius(radius-30);var lineBeginArc=d3.svg.arc().innerRadius(radius-50).outerRadius(radius-50);var lineEndArc=d3.svg.arc().innerRadius(radius).outerRadius(radius);piePathsSel.enter().append('path').attr('class','arc').attr('fill',function(d,i){var origData=this.data_[i];var highlighted=(origData.label===this.currentHighlightedLegendKey);return getColorOfKey(origData.label,highlighted);}.bind(this)).attr('d',pathsArc).on('click',function(d,i){var origData=this.data_[i];var event=new tr.b.Event('item-click');event.data=origData;event.index=i;this.dispatchEvent(event);d3.event.stopPropagation();}.bind(this)).on('mouseenter',function(d,i){var origData=this.data_[i];this.pushTempHighlightedLegendKey(origData.label);}.bind(this)).on('mouseleave',function(d,i){var origData=this.data_[i];this.popTempHighlightedLegendKey(origData.label);}.bind(this));piePathsSel.enter().append('text').attr('class','arc-text').attr('transform',function(d){return'translate('+valueLabelArc.centroid(d)+')';}).attr('dy','.35em').style('text-anchor','middle').text(function(d,i){var origData=this.data_[i];if(origData.valueText===undefined)
-return'';if(d.endAngle-d.startAngle<0.4)
-return'';return origData.valueText;}.bind(this));piePathsSel.exit().remove();var labelSel=d3.select(this.labelsGroup_).selectAll('.label').data(pieLayout(this.data_));labelSel.enter().append('text').attr('class','label').attr('dy','.35em');labelSel.text(function(d){if(d.data.label.length>40)
-return d.data.label.substr(0,40)+'...';return d.data.label;});labelSel.attr('transform',function(d){var pos=lineEndArc.centroid(d);pos[0]=radius*(midAngle(d)<Math.PI?1:-1);return'translate('+pos+')';});labelSel.style('text-anchor',function(d){return midAngle(d)<Math.PI?'start':'end';});var lineSel=d3.select(this.linesGroup_).selectAll('.line').data(pieLayout(this.data_));lineSel.enter().append('polyline').attr('class','line').attr('dy','.35em');lineSel.attr('points',function(d){var pos=lineEndArc.centroid(d);pos[0]=radius*0.95*(midAngle(d)<Math.PI?1:-1);return[lineBeginArc.centroid(d),lineEndArc.centroid(d),pos];});},updateHighlight_:function(){ChartBase.prototype.updateHighlight_.call(this);var pathsGroupSel=d3.select(this.pathsGroup_);var that=this;pathsGroupSel.selectAll('.arc').each(function(d,i){var origData=that.data_[i];var highlighted=origData.label==that.currentHighlightedLegendKey;var color=getColorOfKey(origData.label,highlighted);this.style.fill=color;});}};return{PieChart:PieChart};});'use strict';(function(){var GROUP_BY_PROCESS_NAME='process';var GROUP_BY_THREAD_NAME='thread';var WALL_TIME_GROUPING_UNIT='Wall time';var CPU_TIME_GROUPING_UNIT='CPU time';function ResultsForGroup(model,name){this.model=model;this.name=name;this.topLevelSlices=[];this.allSlices=[];}
-ResultsForGroup.prototype={get wallTime(){var wallSum=tr.b.Statistics.sum(this.topLevelSlices,function(x){return x.duration;});return wallSum;},get cpuTime(){var cpuDuration=0;for(var i=0;i<this.topLevelSlices.length;i++){var x=this.topLevelSlices[i];if(x.cpuDuration===undefined){if(x.duration===undefined)
-continue;return 0;}
-cpuDuration+=x.cpuDuration;}
-return cpuDuration;},appendGroupContents:function(group){if(group.model!=this.model)
-throw new Error('Models must be the same');group.allSlices.forEach(function(slice){this.allSlices.push(slice);},this);group.topLevelSlices.forEach(function(slice){this.topLevelSlices.push(slice);},this);},appendThreadSlices:function(rangeOfInterest,thread){var tmp=this.getSlicesIntersectingRange(rangeOfInterest,thread.sliceGroup.slices);tmp.forEach(function(slice){this.allSlices.push(slice);},this);tmp=this.getSlicesIntersectingRange(rangeOfInterest,thread.sliceGroup.topLevelSlices);tmp.forEach(function(slice){this.topLevelSlices.push(slice);},this);},getSlicesIntersectingRange:function(rangeOfInterest,slices){var slicesInFilterRange=[];for(var i=0;i<slices.length;i++){var slice=slices[i];if(rangeOfInterest.intersectsExplicitRange(slice.start,slice.end))
-slicesInFilterRange.push(slice);}
-return slicesInFilterRange;}};Polymer('tr-ui-e-s-time-summary-side-panel',{ready:function(){this.rangeOfInterest_=new tr.b.Range();this.selection_=undefined;this.groupBy_=GROUP_BY_PROCESS_NAME;this.groupingUnit_=CPU_TIME_GROUPING_UNIT;this.showCpuIdleTime_=true;this.chart_=undefined;var toolbarEl=this.$.toolbar;this.groupBySelector_=tr.ui.b.createSelector(this,'groupBy','timeSummarySidePanel.groupBy',this.groupBy_,[{label:'Group by process',value:GROUP_BY_PROCESS_NAME},{label:'Group by thread',value:GROUP_BY_THREAD_NAME}]);toolbarEl.appendChild(this.groupBySelector_);this.groupingUnitSelector_=tr.ui.b.createSelector(this,'groupingUnit','timeSummarySidePanel.groupingUnit',this.groupingUnit_,[{label:'Wall time',value:WALL_TIME_GROUPING_UNIT},{label:'CPU time',value:CPU_TIME_GROUPING_UNIT}]);toolbarEl.appendChild(this.groupingUnitSelector_);this.showCpuIdleTimeCheckbox_=tr.ui.b.createCheckBox(this,'showCpuIdleTime','timeSummarySidePanel.showCpuIdleTime',this.showCpuIdleTime_,'Show CPU idle time');toolbarEl.appendChild(this.showCpuIdleTimeCheckbox_);this.updateShowCpuIdleTimeCheckboxVisibility_();},trimPieChartData:function(groups,otherGroup,getValue,opt_extraValue){groups=groups.filter(function(d){return getValue(d)!=0;});var sum=tr.b.Statistics.sum(groups,getValue);if(opt_extraValue!==undefined)
-sum+=opt_extraValue;function compareByValue(a,b){return getValue(a)-getValue(b);}
-groups.sort(compareByValue);var thresshold=0.1*sum;while(groups.length>1){var group=groups[0];if(getValue(group)>=thresshold)
-break;var v=getValue(group);if(v+getValue(otherGroup)>thresshold)
-break;groups.splice(0,1);otherGroup.appendGroupContents(group);}
-if(getValue(otherGroup)>0)
-groups.push(otherGroup);groups.sort(compareByValue);return groups;},generateResultsForGroup:function(model,name){return new ResultsForGroup(model,name);},createPieChartFromResultGroups:function(groups,title,getValue,opt_extraData){var chart=new tr.ui.b.PieChart();function pushDataForGroup(data,resultsForGroup,value){data.push({label:resultsForGroup.name,value:value,valueText:tr.b.u.TimeDuration.format(value),resultsForGroup:resultsForGroup});}
-chart.addEventListener('item-click',function(clickEvent){var resultsForGroup=clickEvent.data.resultsForGroup;if(resultsForGroup===undefined)
-return;var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.model.EventSet(resultsForGroup.allSlices);event.selection.timeSummaryGroupName=resultsForGroup.name;chart.dispatchEvent(event);});var data=[];groups.forEach(function(resultsForGroup){var value=getValue(resultsForGroup);if(value===0)
-return;pushDataForGroup(data,resultsForGroup,value);});if(opt_extraData)
-data.push.apply(data,opt_extraData);chart.chartTitle=title;chart.data=data;return chart;},get model(){return this.model_;},set model(model){this.model_=model;this.updateContents_();},get listeningToKeys(){return false;},get groupBy(){return groupBy_;},set groupBy(groupBy){this.groupBy_=groupBy;if(this.groupBySelector_)
-this.groupBySelector_.selectedValue=groupBy;this.updateContents_();},get groupingUnit(){return groupingUnit_;},set groupingUnit(groupingUnit){this.groupingUnit_=groupingUnit;if(this.groupingUnitSelector_)
-this.groupingUnitSelector_.selectedValue=groupingUnit;this.updateShowCpuIdleTimeCheckboxVisibility_();this.updateContents_();},get showCpuIdleTime(){return this.showCpuIdleTime_;},set showCpuIdleTime(showCpuIdleTime){this.showCpuIdleTime_=showCpuIdleTime;if(this.showCpuIdleTimeCheckbox_)
-this.showCpuIdleTimeCheckbox_.checked=showCpuIdleTime;this.updateContents_();},updateShowCpuIdleTimeCheckboxVisibility_:function(){if(!this.showCpuIdleTimeCheckbox_)
-return;var visible=this.groupingUnit_==CPU_TIME_GROUPING_UNIT;if(visible)
-this.showCpuIdleTimeCheckbox_.style.display='';else
-this.showCpuIdleTimeCheckbox_.style.display='none';},getGroupNameForThread_:function(thread){if(this.groupBy_==GROUP_BY_THREAD_NAME)
-return thread.name?thread.name:thread.userFriendlyName;if(this.groupBy_==GROUP_BY_PROCESS_NAME)
-return thread.parent.userFriendlyName;},updateContents_:function(){var resultArea=this.$.result_area;this.chart_=undefined;resultArea.textContent='';if(this.model_===undefined)
-return;var rangeOfInterest;if(this.rangeOfInterest_.isEmpty)
-rangeOfInterest=this.model_.bounds;else
-rangeOfInterest=this.rangeOfInterest_;var allGroup=this.generateResultsForGroup(this.model_,'all');var resultsByGroupName={};this.model_.getAllThreads().forEach(function(thread){var groupName=this.getGroupNameForThread_(thread);if(resultsByGroupName[groupName]===undefined){resultsByGroupName[groupName]=this.generateResultsForGroup(this.model_,groupName);}
-resultsByGroupName[groupName].appendThreadSlices(rangeOfInterest,thread);allGroup.appendThreadSlices(rangeOfInterest,thread);},this);var getValueFromGroup=function(group){if(this.groupingUnit_==WALL_TIME_GROUPING_UNIT)
-return group.wallTime;return group.cpuTime;}.bind(this);var summaryText=document.createElement('div');summaryText.appendChild(tr.ui.b.createSpan({textContent:'Total '+this.groupingUnit_+': ',bold:true}));summaryText.appendChild(tr.ui.units.createTimeDurationSpan(getValueFromGroup(allGroup),{ownerDocument:this.ownerDocument}));resultArea.appendChild(summaryText);var extraValue=0;var extraData=[];if(this.showCpuIdleTime_&&this.groupingUnit_===CPU_TIME_GROUPING_UNIT&&this.model.kernel.bestGuessAtCpuCount!==undefined){var maxCpuTime=rangeOfInterest.range*this.model.kernel.bestGuessAtCpuCount;var idleTime=Math.max(0,maxCpuTime-allGroup.cpuTime);extraData.push({label:'CPU Idle',value:idleTime,valueText:tr.b.u.TimeDuration.format(idleTime)});extraValue+=idleTime;}
-var otherGroup=this.generateResultsForGroup(this.model_,'Other');var groups=this.trimPieChartData(tr.b.dictionaryValues(resultsByGroupName),otherGroup,getValueFromGroup,extraValue);if(groups.length==0){resultArea.appendChild(tr.ui.b.createSpan({textContent:'No data'}));return undefined;}
-this.chart_=this.createPieChartFromResultGroups(groups,this.groupingUnit_+' breakdown by '+this.groupBy_,getValueFromGroup,extraData);resultArea.appendChild(this.chart_);this.chart_.addEventListener('click',function(){var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.c.EventSet([]);this.dispatchEvent(event);});this.chart_.setSize(this.chart_.getMinSize());},get selection(){return selection_;},set selection(selection){this.selection_=selection;if(this.chart_===undefined)
-return;if(selection.timeSummaryGroupName)
-this.chart_.highlightedLegendKey=selection.timeSummaryGroupName;else
-this.chart_.highlightedLegendKey=undefined;},get rangeOfInterest(){return this.rangeOfInterest_;},set rangeOfInterest(rangeOfInterest){this.rangeOfInterest_=rangeOfInterest;this.updateContents_();},supportsModel:function(model){return{supported:false};},get textLabel(){return'Time Summary';}});}());'use strict';tr.exportTo('tr.e.rail',function(){function RAILScore(opt_irs){this.interactionRecords_=[];if(opt_irs)
-this.interactionRecords_.push.apply(this.interactionRecords_,opt_irs);};RAILScore.prototype={get interactionRecords(){return this.interactionRecords_;},get overallScore(){if(!this.interactionRecords.length)
-return undefined;var numerator=0;var denominator=0;this.interactionRecords.forEach(function(ir){var score=ir.railScore;var scale=ir.railScoreScale;if(scale===undefined)
-scale=3;var power=ir.railScorePower;if(power===undefined)
-power=0.3;var base=ir.railScoreBase;if(base===undefined)
-base=Math.exp(1);var weight=Math.pow(base,-scale*Math.pow(score,power));numerator+=score*weight;denominator+=weight;});return numerator/denominator;},asDict:function(){return{overallScore:this.overallScore};}};RAILScore.fromModel=function(model){var rirs=model.interactionRecords.filter(function(ir){return ir instanceof tr.e.rail.RAILInteractionRecord;});if(rirs.length===0)
-return undefined;return new RAILScore(rirs);};return{RAILScore:RAILScore};});'use strict';Polymer('tr-ui-e-rail-rail-score-span',{created:function(){this.railScore_=undefined;},ready:function(){this.updateContent_();},get railScore(){return this.railScore_;},set railScore(railScore){this.railScore_=railScore;this.updateContent_();},updateContent_:function(){if(this.railScore_===undefined){this.$.content.style.display='none';return;}
-this.$.content.style.display='';var overallScore=this.railScore_.overallScore;if(overallScore===undefined)
-return;this.$.score.textContent=overallScore.toLocaleString(undefined,{minimumFractionDigits:3});}});'use strict';(function(){function setCoverageLink(link,labelString,events,eventRatio,cpuMs,cpuRatio){link.setSelectionAndContent(events);labelString+=' '+events.length+' events';labelString+=' ('+parseInt(100*eventRatio)+'%)';if(cpuRatio!==undefined)
-labelString+=', ';link.appendChild(document.createTextNode(labelString));if(cpuRatio===undefined)
-return;var cpuMsSpan=document.createElement('tr-ui-u-time-duration-span');cpuMsSpan.style.display='inline';cpuMsSpan.duration=cpuMs;cpuMsSpan.contentTextDecoration='underline';link.appendChild(cpuMsSpan);var cpuString=' ('+parseInt(100*cpuRatio)+'%)';link.appendChild(document.createTextNode(cpuString));}
-Polymer('tr-ui-e-rail-rail-score-side-panel',{ready:function(){this.rangeOfInterest_=new tr.b.Range();this.model_=undefined;this.railScore_=undefined;this.selection_=new tr.model.EventSet();this.$.test.addEventListener('click',this.createTest_.bind(this));},createTest_:function(){var overlay=new tr.ui.b.Overlay();overlay.title='RAILIRFinder test';var textarea=document.createElement('textarea');textarea.textContent=tr.e.rail.createIRFinderTestCaseStringFromModel(this.model_);textarea.rows=textarea.textContent.split('\n').length;textarea.cols=80;overlay.appendChild(textarea);overlay.visible=true;textarea.select();textarea.focus();},get textLabel(){return'RAIL Info';},supportsModel:function(m){if(m===undefined){return{supported:false,reason:'Unknown tracing model'};}
-var railScore=tr.e.rail.RAILScore.fromModel(m);if(railScore===undefined){return{supported:false,reason:'RAIL interactions were not found on the model'};}
-return{supported:true};},get model(){return this.model_;},set model(model){this.model_=model;this.railScore_=tr.e.rail.RAILScore.fromModel(model);this.$.score.railScore=this.railScore_;var coverage=tr.model.getIRCoverageFromModel(model);if(coverage){var associatedEvents=tr.model.getAssociatedEvents(model.interactionRecords);setCoverageLink(this.shadowRoot.querySelector('#associated-events'),'Associated',associatedEvents,coverage.coveredEventsCountRatio,coverage.associatedEventsCpuTimeMs,coverage.coveredEventsCpuTimeRatio);setCoverageLink(this.shadowRoot.querySelector('#unassociated-events'),'Unassociated',tr.model.getUnassociatedEvents(model,associatedEvents),1.0-coverage.coveredEventsCountRatio,coverage.unassociatedEventsCpuTimeMs,1.0-coverage.coveredEventsCpuTimeRatio);}
-this.updateTable_();},get listeningToKeys(){return false;},set rangeOfInterest(rangeOfInterest){},updateTable_:function(){function toThreeDigitLocaleString(value){return value.toLocaleString(undefined,{minimumFractionDigits:3,maximumFractionDigits:3});}
-var columns=[{title:'Type',width:'150px',value:function(ir){var el=document.createElement('tr-ui-b-color-legend');var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(new tr.model.EventSet([ir]),ir.railTypeName);el.setLabelAndColorId(linkEl,ir.colorId);el.compoundEventSelectionState=ir.computeCompoundEvenSelectionState(this.selection_);return el;}.bind(this),cmp:function(a,b){return a.railTypeName.localeCompare(b.railTypeName);}},{title:'Efficiency',width:'33%',value:function(ir){return toThreeDigitLocaleString(ir.normalizedEfficiency);},textAlign:'right',cmp:function(a,b){return a.normalizedEfficiency-b.normalizedEfficiency;}},{title:'Comfort',width:'33%',value:function(ir){return toThreeDigitLocaleString(ir.normalizedUserComfort);},textAlign:'right',cmp:function(a,b){return a.normalizedUserComfort-b.normalizedUserComfort;}},{title:'Score',width:'33%',value:function(ir){var span=document.createElement('span');span.style.fontWeight='bold';span.textContent=toThreeDigitLocaleString(ir.railScore);return span;},textAlign:'right',cmp:function(a,b){return a.railScore-b.railScore;}}];this.$.table.tableColumns=columns;if(this.railScore_)
-this.$.table.tableRows=this.railScore_.interactionRecords;else
-this.$.table.tableRows=[];this.$.table.rebuild();},onTableSelectionChanged_:function(){var selectedIR=this.$.table.selectedTableRow;var event=new tr.c.RequestSelectionChangeEvent();event.selection=new tr.c.Selection([selectedIR]);this.dispatchEvent(event);},set selection(selection){if(selection===undefined)
-selection=new tr.model.EventSet();if(this.selection_.equals(selection))
-return;this.selection_=selection;this.updateTable_();}});})();'use strict';Polymer('tr-ui-e-s-alerts-side-panel',{ready:function(){this.rangeOfInterest_=new tr.b.Range();this.selection_=undefined;},get model(){return this.model_;},set model(model){this.model_=model;this.updateContents_();},get listeningToKeys(){return false;},set selection(selection){},set rangeOfInterest(rangeOfInterest){},selectAlertsOfType:function(alertTypeString){var alertsOfType=this.model_.alerts.filter(function(alert){return alert.title===alertTypeString;});var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.model.EventSet(alertsOfType);this.dispatchEvent(event);},alertsByType_:function(alerts){var alertsByType={};alerts.forEach(function(alert){if(!alertsByType[alert.title])
-alertsByType[alert.title]=[];alertsByType[alert.title].push(alert);});return alertsByType;},alertsTableRows_:function(alertsByType){return Object.keys(alertsByType).map(function(key){return{alertType:key,count:alertsByType[key].length};});},alertsTableColumns_:function(){return[{title:'Alert type',value:function(row){return row.alertType;},width:'180px'},{title:'Count',width:'100%',value:function(row){return row.count;}}];},createAlertsTable_:function(alerts){var alertsByType=this.alertsByType_(alerts);var table=document.createElement('tr-ui-b-table');table.tableColumns=this.alertsTableColumns_();table.tableRows=this.alertsTableRows_(alertsByType);table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;table.addEventListener('selection-changed',function(e){var row=table.selectedTableRow;if(row)
-this.selectAlertsOfType(row.alertType);}.bind(this));return table;},updateContents_:function(){this.$.result_area.textContent='';if(this.model_===undefined)
-return;var panel=this.createAlertsTable_(this.model_.alerts);this.$.result_area.appendChild(panel);},supportsModel:function(m){if(m==undefined){return{supported:false,reason:'Unknown tracing model'};}else if(m.alerts.length===0){return{supported:false,reason:'No alerts in tracing model'};}
-return{supported:true};},get textLabel(){return'Alerts';}});'use strict';tr.exportTo('tr.ui.e.highlighter',function(){var Highlighter=tr.ui.tracks.Highlighter;function VSyncHighlighter(viewport){Highlighter.call(this,viewport);this.times_=[];}
+return currentY;}};tr.ui.tracks.ObjectInstanceTrack.register(SystemStatsInstanceTrack,{typeName:'base::TraceEventSystemStatsMonitor::SystemStats'});return{SystemStatsInstanceTrack:SystemStatsInstanceTrack};});'use strict';tr.exportTo('tr.c',function(){function ScriptingObject(){}
+ScriptingObject.prototype={onModelChanged:function(model){}};return{ScriptingObject:ScriptingObject};});'use strict';tr.exportTo('tr.c',function(){function ScriptingController(brushingStateController){this.brushingStateController_=brushingStateController;this.scriptObjectNames_=[];this.scriptObjectValues_=[];this.brushingStateController.addEventListener('model-changed',this.onModelChanged_.bind(this));var typeInfos=ScriptingObjectRegistry.getAllRegisteredTypeInfos();typeInfos.forEach(function(typeInfo){this.addScriptObject(typeInfo.metadata.name,typeInfo.constructor);global[typeInfo.metadata.name]=typeInfo.constructor;},this);}
+function ScriptingObjectRegistry(){}
+var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);tr.b.decorateExtensionRegistry(ScriptingObjectRegistry,options);ScriptingController.prototype={get brushingStateController(){return this.brushingStateController_;},onModelChanged_:function(){this.scriptObjectValues_.forEach(function(v){if(v.onModelChanged)
+v.onModelChanged(this.brushingStateController.model);},this);},addScriptObject:function(name,value){this.scriptObjectNames_.push(name);this.scriptObjectValues_.push(value);},executeCommand:function(command){var f=new Function(this.scriptObjectNames_,'return eval('+command+')');return f.apply(null,this.scriptObjectValues_);}};return{ScriptingController:ScriptingController,ScriptingObjectRegistry:ScriptingObjectRegistry};});'use strict';tr.exportTo('tr.metrics',function(){function MetricRegistry(){}
+var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Function;tr.b.decorateExtensionRegistry(MetricRegistry,options);return{MetricRegistry:MetricRegistry};});'use strict';tr.exportTo('tr.v',function(){function Value(canonicalUrl,name,opt_options,opt_groupingKeys,opt_diagnostics){if(typeof(name)!=='string')
+throw new Error('Expected value_name grouping key to be provided');this.groupingKeys=opt_groupingKeys||{};this.groupingKeys.name=name;this.diagnostics=opt_diagnostics||{};this.diagnostics.canonical_url=canonicalUrl;var options=opt_options||{};this.description=options.description;this.important=options.important!==undefined?options.important:false;}
+Value.fromDict=function(d){if(d.type==='numeric')
+return NumericValue.fromDict(d);if(d.type==='dict')
+return DictValue.fromDict(d);if(d.type=='failure')
+return FailureValue.fromDict(d);if(d.type==='skip')
+return SkipValue.fromDict(d);throw new Error('Not implemented');};Value.prototype={get name(){return this.groupingKeys.name;},get canonicalUrl(){return this.diagnostics.canonical_url;},addGroupingKey:function(keyName,key){if(this.groupingKeys.hasOwnProperty(keyName))
+throw new Error('Tried to redefine grouping key '+keyName);this.groupingKeys[keyName]=key;},asDict:function(){return this.asJSON();},asJSON:function(){var d={grouping_keys:this.groupingKeys,description:this.description,important:this.important,diagnostics:this.diagnostics};this._asDictInto(d);if(d.type===undefined)
+throw new Error('_asDictInto must set type field');return d;},_asDictInto:function(d){throw new Error('Not implemented');}};function NumericValue(canonicalUrl,name,numeric,opt_options,opt_groupingKeys,opt_diagnostics){if(!(numeric instanceof tr.v.NumericBase))
+throw new Error('Expected numeric to be instance of tr.v.NumericBase');Value.call(this,canonicalUrl,name,opt_options,opt_groupingKeys,opt_diagnostics);this.numeric=numeric;}
+NumericValue.fromDict=function(d){if(d.numeric===undefined)
+throw new Error('Expected numeric to be provided');var numeric=tr.v.NumericBase.fromDict(d.numeric);return new NumericValue(d.diagnostics.canonical_url,d.grouping_keys.name,numeric,d,d.grouping_keys,d.diagnostics);};NumericValue.prototype={__proto__:Value.prototype,_asDictInto:function(d){d.type='numeric';d.numeric=this.numeric.asDict();}};function DictValue(canonicalUrl,name,value,opt_options,opt_groupingKeys,opt_diagnostics){Value.call(this,canonicalUrl,name,opt_options,opt_groupingKeys,opt_diagnostics);this.value=value;}
+DictValue.fromDict=function(d){if(d.units!==undefined)
+throw new Error('Expected units to be undefined');if(d.value===undefined)
+throw new Error('Expected value to be provided');return new DictValue(d.diagnostics.canonical_url,d.grouping_keys.name,d.value,d,d.groupingKeys,d.diagnostics);};DictValue.prototype={__proto__:Value.prototype,_asDictInto:function(d){d.type='dict';d.value=this.value;}};function FailureValue(canonicalUrl,name,opt_options,opt_groupingKeys,opt_diagnostics){var options=opt_options||{};var stack;if(options.stack===undefined){if(options.stack_str===undefined){throw new Error('Expected stack_str or stack to be provided');}else{stack=options.stack_str;}}else{stack=options.stack;}
+if(typeof stack!=='string')
+throw new Error('stack must be provided as a string');if(canonicalUrl===undefined){throw new Error('FailureValue must provide canonicalUrl');}
+Value.call(this,canonicalUrl,name,options,opt_groupingKeys,opt_diagnostics);this.stack=stack;}
+FailureValue.fromError=function(canonicalUrl,e){var ex=tr.b.normalizeException(e);return new FailureValue(canonicalUrl,ex.typeName,{description:ex.message,stack:ex.stack});};FailureValue.fromDict=function(d){if(d.units!==undefined)
+throw new Error('Expected units to be undefined');if(d.stack_str===undefined)
+throw new Error('Expected stack_str to be provided');return new FailureValue(d.diagnostics.canonical_url,d.grouping_keys.name,d,d.grouping_keys,d.diagnostics);};FailureValue.prototype={__proto__:Value.prototype,_asDictInto:function(d){d.type='failure';d.stack_str=this.stack;}};function SkipValue(canonicalUrl,name,opt_options,opt_groupingKeys,opt_diagnostics){Value.call(this,canonicalUrl,name,opt_options,opt_groupingKeys,opt_diagnostics);}
+SkipValue.fromDict=function(d){if(d.units!==undefined)
+throw new Error('Expected units to be undefined');return new SkipValue(d.diagnostics.canonical_url,d.grouping_keys.name,d,d.grouping_keys,d.diagnostics);};SkipValue.prototype={__proto__:Value.prototype,_asDictInto:function(d){d.type='skip';}};return{Value:Value,NumericValue:NumericValue,DictValue:DictValue,FailureValue:FailureValue,SkipValue:SkipValue};});'use strict';tr.exportTo('tr.metrics',function(){function sampleMetric(valueList,model){var unit=tr.v.Unit.byName.sizeInBytes_smallerIsBetter;var n1=new tr.v.ScalarNumeric(unit,1);var n2=new tr.v.ScalarNumeric(unit,2);valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'foo',n1));valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'bar',n2));}
+sampleMetric.prototype={__proto__:Function.prototype};tr.metrics.MetricRegistry.register(sampleMetric);return{sampleMetric:sampleMetric};});'use strict';tr.exportTo('tr.metrics.sh',function(){function perceptualBlend(ir,index,score){return Math.exp(1-score);}
+function filterExpectationsByRange(irs,opt_range){var filteredExpectations=[];irs.forEach(function(ir){if(!(ir instanceof tr.model.um.UserExpectation))
+return;if(!opt_range||opt_range.intersectsExplicitRangeExclusive(ir.start,ir.end))
+filteredExpectations.push(ir);});return filteredExpectations;}
+return{perceptualBlend:perceptualBlend,filterExpectationsByRange:filterExpectationsByRange};});'use strict';tr.exportTo('tr.metrics.sh',function(){var UNIT=tr.v.Unit.byName.normalizedPercentage_biggerIsBetter;var DESCRIPTION='Normalized CPU budget consumption';function EfficiencyMetric(valueList,model){var scores=[];model.userModel.expectations.forEach(function(ue){var options={};options.description=DESCRIPTION;var groupingKeys={};groupingKeys.userExpectationStableId=ue.stableId;groupingKeys.userExpectationStageTitle=ue.stageTitle;groupingKeys.userExpectationInitiatorTitle=ue.initiatorTitle;var score=undefined;if((ue.totalCpuMs===undefined)||(ue.totalCpuMs==0))
+return;var cpuFractionBudget=tr.b.Range.fromExplicitRange(0.5,1.5);if(ue instanceof tr.model.um.IdleExpectation){cpuFractionBudget=tr.b.Range.fromExplicitRange(0.1,1);}else if(ue instanceof tr.model.um.AnimationExpectation){cpuFractionBudget=tr.b.Range.fromExplicitRange(1,2);}
+var cpuMsBudget=tr.b.Range.fromExplicitRange(ue.duration*cpuFractionBudget.min,ue.duration*cpuFractionBudget.max);var normalizedCpu=tr.b.normalize(ue.totalCpuMs,cpuMsBudget.min,cpuMsBudget.max);score=1-tr.b.clamp(normalizedCpu,0,1);scores.push(score);valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'efficiency',new tr.v.ScalarNumeric(UNIT,score),options,groupingKeys));});var options={};options.description=DESCRIPTION;var groupingKeys={};var overallScore=tr.b.Statistics.weightedMean(scores,tr.metrics.sh.perceptualBlend);if(overallScore===undefined)
+return;valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'efficiency',new tr.v.ScalarNumeric(UNIT,overallScore),options,groupingKeys));}
+EfficiencyMetric.prototype={__proto__:Function.prototype};tr.metrics.MetricRegistry.register(EfficiencyMetric);return{EfficiencyMetric:EfficiencyMetric};});'use strict';tr.exportTo('tr.metrics.sh',function(){var MIN_DISCREPANCY=0.05;var MAX_DISCREPANCY=0.3;var UNIT=tr.v.Unit.byName.normalizedPercentage_biggerIsBetter;var DESCRIPTION='Mean Opinion Score for Animation smoothness';function AnimationSmoothnessMetric(valueList,model){model.userModel.expectations.forEach(function(ue){if(!(ue instanceof tr.model.um.AnimationExpectation))
+return;if(ue.frameEvents===undefined||ue.frameEvents.length===0)
+throw new Error('Animation missing frameEvents '+ue.stableId);var options={};options.description=DESCRIPTION;var groupingKeys={};groupingKeys.userExpectationStableId=ue.stableId;groupingKeys.userExpectationStageTitle=ue.stageTitle;groupingKeys.userExpectationInitiatorTitle=ue.initiatorTitle;var frameTimestamps=ue.frameEvents.toArray().map(function(event){return event.start;});var absolute=false;var discrepancy=tr.b.Statistics.timestampsDiscrepancy(frameTimestamps,absolute);var smoothness=1-tr.b.normalize(discrepancy,MIN_DISCREPANCY,MAX_DISCREPANCY);var score=tr.b.clamp(smoothness,0,1);valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'smoothness',new tr.v.ScalarNumeric(UNIT,score),options,groupingKeys));});}
+AnimationSmoothnessMetric.prototype={__proto__:Function.prototype};tr.metrics.MetricRegistry.register(AnimationSmoothnessMetric);return{AnimationSmoothnessMetric:AnimationSmoothnessMetric};});'use strict';tr.exportTo('tr.metrics.sh',function(){var MAX_FPS=60;var MIN_FPS=10;var UNIT=tr.v.Unit.byName.normalizedPercentage_biggerIsBetter;var DESCRIPTION='Mean Opinion Score for Animation throughput';function AnimationThroughputMetric(valueList,model){model.userModel.expectations.forEach(function(ue){if(!(ue instanceof tr.model.um.AnimationExpectation))
+return;if(ue.frameEvents===undefined||ue.frameEvents.length===0)
+throw new Error('Animation missing frameEvents '+ue.stableId);var options={};options.description=DESCRIPTION;var groupingKeys={};groupingKeys.userExpectationStableId=ue.stableId;groupingKeys.userExpectationStageTitle=ue.stageTitle;groupingKeys.userExpectationInitiatorTitle=ue.initiatorTitle;var durationSeconds=ue.duration/1000;var avgSpf=durationSeconds/ue.frameEvents.length;var throughput=1-tr.b.normalize(avgSpf,1/MAX_FPS,1/MIN_FPS);var score=tr.b.clamp(throughput,0,1);valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'throughput',new tr.v.ScalarNumeric(UNIT,score),options,groupingKeys));});}
+AnimationThroughputMetric.prototype={__proto__:Function.prototype};tr.metrics.MetricRegistry.register(AnimationThroughputMetric);return{AnimationThroughputMetric:AnimationThroughputMetric};});'use strict';tr.exportTo('tr.metrics.sh',function(){var RESPONSE_HISTOGRAM=tr.v.Numeric.fromDict({unit:'unitless',min:150,max:5000,centralBinWidth:485,underflowBin:{min:-Number.MAX_VALUE,max:150,count:1000},centralBins:[{min:150,max:635,count:708},{min:635,max:1120,count:223},{min:1120,max:1605,count:50},{min:1605,max:2090,count:33},{min:2090,max:2575,count:23},{min:2575,max:3060,count:17},{min:3060,max:3545,count:12},{min:3545,max:4030,count:8},{min:4030,max:4515,count:4},{min:4515,max:5000,count:1}],overflowBin:{min:5000,max:Number.MAX_VALUE,count:0}});var FAST_RESPONSE_HISTOGRAM=tr.v.Numeric.fromDict({unit:'unitless',min:66,max:2200,centralBinWidth:214,underflowBin:{min:-Number.MAX_VALUE,max:66,count:1000},centralBins:[{min:66,max:280,count:708},{min:280,max:493,count:223},{min:493,max:706,count:50},{min:706,max:920,count:33},{min:920,max:1133,count:23},{min:1133,max:1346,count:17},{min:1346,max:1560,count:12},{min:1560,max:1773,count:8},{min:1773,max:1987,count:4},{min:1987,max:2200,count:1}],overflowBin:{min:2200,max:Number.MAX_VALUE,count:0}});var LOAD_HISTOGRAM=tr.v.Numeric.fromDict({unit:'unitless',min:1000,max:60000,centralBinWidth:5900,underflowBin:{min:-Number.MAX_VALUE,max:1000,count:1000},centralBins:[{min:1000,max:6900,count:901},{min:6900,max:12800,count:574},{min:12800,max:18700,count:298},{min:18700,max:24600,count:65},{min:24600,max:30500,count:35},{min:30500,max:36400,count:23},{min:36400,max:42300,count:16},{min:42300,max:48200,count:10},{min:48200,max:54100,count:5},{min:54100,max:60000,count:2}],overflowBin:{min:60000,max:Number.MAX_VALUE,count:0}});var UNIT=tr.v.Unit.byName.normalizedPercentage_biggerIsBetter;var DESCRIPTION=('For Load and Response, Mean Opinion Score of completion time; '+'For Animation, perceptual blend of Mean Opinion Scores of '+'throughput and smoothness');function getDurationScore(histogram,duration){return histogram.getInterpolatedCountAt(duration)/histogram.maxCount;}
+function ResponsivenessMetric(valueList,model){tr.metrics.sh.AnimationThroughputMetric(valueList,model);tr.metrics.sh.AnimationSmoothnessMetric(valueList,model);var throughputForAnimation={};var smoothnessForAnimation={};valueList.valueDicts.forEach(function(value){if((value.type!=='numeric')||(value.numeric.type!=='scalar'))
+return;var ue=value.grouping_keys.userExpectationStableId;if(value.grouping_keys.name==='throughput')
+throughputForAnimation[ue]=value.numeric.value;if(value.grouping_keys.name==='smoothness')
+smoothnessForAnimation[ue]=value.numeric.value;});var scores=[];model.userModel.expectations.forEach(function(ue){var score=undefined;if(ue instanceof tr.model.um.IdleExpectation){return;}else if(ue instanceof tr.model.um.LoadExpectation){score=getDurationScore(LOAD_HISTOGRAM,ue.duration);}else if(ue instanceof tr.model.um.ResponseExpectation){var histogram=RESPONSE_HISTOGRAM;if(ue.isAnimationBegin)
+histogram=FAST_RESPONSE_HISTOGRAM;score=getDurationScore(histogram,ue.duration);}else if(ue instanceof tr.model.um.AnimationExpectation){var throughput=throughputForAnimation[ue.stableId];var smoothness=smoothnessForAnimation[ue.stableId];if(throughput===undefined)
+throw new Error('Missing throughput for '+ue.stableId);if(smoothness===undefined)
+throw new Error('Missing smoothness for '+ue.stableId);score=tr.b.Statistics.weightedMean([throughput,smoothness],tr.metrics.sh.perceptualBlend);}else{throw new Error('Unrecognized stage for '+ue.stableId);}
+if(score===undefined)
+throw new Error('Failed to compute responsiveness for '+ue.stableId);scores.push(score);var options={};options.description=DESCRIPTION;var groupingKeys={};groupingKeys.userExpectationStableId=ue.stableId;groupingKeys.userExpectationStageTitle=ue.stageTitle;groupingKeys.userExpectationInitiatorTitle=ue.initiatorTitle;valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'responsiveness',new tr.v.ScalarNumeric(UNIT,score),options,groupingKeys));});var options={};options.description=DESCRIPTION;var groupingKeys={};var overallScore=tr.b.Statistics.weightedMean(scores,tr.metrics.sh.perceptualBlend);if(overallScore===undefined)
+return;valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'responsiveness',new tr.v.ScalarNumeric(UNIT,overallScore),options,groupingKeys));}
+ResponsivenessMetric.prototype={__proto__:Function.prototype};tr.metrics.MetricRegistry.register(ResponsivenessMetric);return{ResponsivenessMetric:ResponsivenessMetric};});'use strict';tr.exportTo('tr.metrics.sh',function(){function SystemHealthMetrics(valueList,model){tr.metrics.sh.ResponsivenessMetric(valueList,model);tr.metrics.sh.EfficiencyMetric(valueList,model);}
+SystemHealthMetrics.prototype={__proto__:Function.prototype};tr.metrics.MetricRegistry.register(SystemHealthMetrics);return{SystemHealthMetrics:SystemHealthMetrics};});'use strict';tr.exportTo('tr.metrics',function(){function tracingMetric(valueList,model){if(!model.stats.hasEventSizesinBytes){throw new Error('Model stats does not have event size information. '+'Please enable ImportOptions.trackDetailedModelStats.');}
+var eventStats=model.stats.allTraceEventStatsInTimeIntervals;eventStats.sort(function(a,b){return a.timeInterval-b.timeInterval;});var maxEventCountPerSec=0;var maxEventBytesPerSec=0;var totalTraceBytes=0;var WINDOW_SIZE=Math.floor(1000/model.stats.TIME_INTERVAL_SIZE_IN_MS);var runningEventNumPerSec=0;var runningEventBytesPerSec=0;var start=0;var end=0;while(end<eventStats.length){var startEventStats=eventStats[start];var endEventStats=eventStats[end];var timeWindow=endEventStats.timeInterval-startEventStats.timeInterval;if(timeWindow>=WINDOW_SIZE){runningEventNumPerSec-=startEventStats.numEvents;runningEventBytesPerSec-=startEventStats.totalEventSizeinBytes;start++;continue;}
+runningEventNumPerSec+=endEventStats.numEvents;if(maxEventCountPerSec<runningEventNumPerSec)
+maxEventCountPerSec=runningEventNumPerSec;runningEventBytesPerSec+=endEventStats.totalEventSizeinBytes;if(maxEventBytesPerSec<runningEventBytesPerSec)
+maxEventBytesPerSec=runningEventBytesPerSec;totalTraceBytes+=endEventStats.totalEventSizeinBytes;end++;}
+var stats=model.stats.allTraceEventStats;var categoryStatsMap=new Map();var categoryStats=[];for(var i=0;i<stats.length;i++){var categoryStat=categoryStatsMap.get(stats[i].category);if(categoryStat===undefined){categoryStat={category:stats[i].category,totalEventSizeinBytes:0};categoryStatsMap.set(stats[i].category,categoryStat);categoryStats.push(categoryStat);}
+categoryStat.totalEventSizeinBytes+=stats[i].totalEventSizeinBytes;}
+var maxCategoryStats=categoryStats.reduce(function(a,b){return a.totalEventSizeinBytes<b.totalEventSizeinBytes?b:a;});var maxEventBytesPerCategory=maxCategoryStats.totalEventSizeinBytes;var maxCategoryName=maxCategoryStats.category;var maxEventCountPerSecValue=new tr.v.ScalarNumeric(tr.v.Unit.byName.unitlessNumber_smallerIsBetter,maxEventCountPerSec);var maxEventBytesPerSecValue=new tr.v.ScalarNumeric(tr.v.Unit.byName.sizeInBytes_smallerIsBetter,maxEventBytesPerSec);var totalTraceBytesValue=new tr.v.ScalarNumeric(tr.v.Unit.byName.sizeInBytes_smallerIsBetter,totalTraceBytes);var diagnostics={category_with_max_event_size:{name:maxCategoryName,size_in_bytes:maxEventBytesPerCategory}};valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'Total trace size in bytes',totalTraceBytesValue,undefined,undefined,diagnostics));valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'Max number of events per second',maxEventCountPerSecValue,undefined,undefined,diagnostics));valueList.addValue(new tr.v.NumericValue(model.canonicalUrl,'Max event size in bytes per second',maxEventBytesPerSecValue,undefined,undefined,diagnostics));}
+tracingMetric.prototype={__proto__:Function.prototype};tr.metrics.MetricRegistry.register(tracingMetric);return{tracingMetric:tracingMetric};});'use strict';Polymer('tr-ui-a-alert-sub-view',{ready:function(){this.currentSelection_=undefined;this.$.table.tableColumns=[{title:'Label',value:function(row){return row.name;},width:'150px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];this.$.table.showHeader=false;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;this.updateContents_();},getRowsForSingleAlert_:function(alert){var rows=[];for(var argName in alert.args){var argView=document.createElement('tr-ui-a-generic-object-view');argView.object=alert.args[argName];rows.push({name:argName,value:argView});}
+if(alert.associatedEvents.length){alert.associatedEvents.forEach(function(event,i){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return event;},event.title);var valueString='';if(event instanceof tr.model.TimedEvent)
+valueString='took '+event.duration.toFixed(2)+'ms';rows.push({name:linkEl,value:valueString});});}
+var descriptionEl=tr.ui.b.createDiv({textContent:alert.info.description,maxWidth:'300px'});rows.push({name:'Description',value:descriptionEl});if(alert.info.docLinks){alert.info.docLinks.forEach(function(linkObject){var linkEl=document.createElement('a');linkEl.target='_blank';linkEl.href=linkObject.href;linkEl.textContent=linkObject.textContent;rows.push({name:linkObject.label,value:linkEl});});}
+return rows;},getRowsForAlerts_:function(alerts){if(alerts.length==1){var rows=[{name:'Alert',value:alerts[0].title}];var detailRows=this.getRowsForSingleAlert_(alerts[0]);rows.push.apply(rows,detailRows);return rows;}else{return alerts.map(function(alert){return{name:'Alert',value:alert.title,isExpanded:alerts.size<10,subRows:this.getRowsForSingleAlert_(alert)};},this);}},updateContents_:function(){if(this.currentSelection_===undefined){this.$.table.rows=[];this.$.table.rebuild();return;}
+var alerts=this.currentSelection_;this.$.table.tableRows=this.getRowsForAlerts_(alerts);this.$.table.rebuild();},get relatedEventsToHighlight(){if(!this.currentSelection_)
+return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';tr.exportTo('tr.b',function(){function MultiDimensionalViewNode(title,isLowerBound){this.title=title;var dimensions=title.length;this.children=new Array(dimensions);for(var i=0;i<dimensions;i++)
+this.children[i]=new Map();this.total=0;this.self=0;this.isLowerBound=!!isLowerBound;}
+MultiDimensionalViewNode.prototype={get subRows(){return tr.b.mapValues(this.children[0]);}};var MultiDimensionalViewType={TOP_DOWN_TREE_VIEW:0,TOP_DOWN_HEAVY_VIEW:1,BOTTOM_UP_HEAVY_VIEW:2};function MultiDimensionalViewBuilder(dimensions){if(dimensions<0)
+throw new Error('Dimensions must be non-negative');this.dimensions_=dimensions;this.buildRoot_=this.createRootNode_();this.topDownTreeViewRoot_=undefined;this.topDownHeavyViewRoot_=undefined;this.bottomUpHeavyViewNode_=undefined;this.maxDimensionDepths_=new Array(dimensions);for(var d=0;d<dimensions;d++)
+this.maxDimensionDepths_[d]=0;}
+MultiDimensionalViewBuilder.ValueKind={SELF:0,TOTAL:1};MultiDimensionalViewBuilder.prototype={addPath:function(path,value,valueKind){if(this.buildRoot_===undefined){throw new Error('Paths cannot be added after either view has been built');}
+if(path.length!==this.dimensions_)
+throw new Error('Path must be '+this.dimensions_+'-dimensional');var node=this.buildRoot_;for(var d=0;d<path.length;d++){var singleDimensionPath=path[d];var singleDimensionPathLength=singleDimensionPath.length;this.maxDimensionDepths_[d]=Math.max(this.maxDimensionDepths_[d],singleDimensionPathLength);for(var i=0;i<singleDimensionPathLength;i++)
+node=this.getOrCreateChildNode_(node,d,singleDimensionPath[i]);}
+switch(valueKind){case MultiDimensionalViewBuilder.ValueKind.SELF:node.self+=value;break;case MultiDimensionalViewBuilder.ValueKind.TOTAL:node.total+=value;break;default:throw new Error('Invalid value kind: '+valueKind);}
+node.isLowerBound=false;},buildView:function(viewType){switch(viewType){case MultiDimensionalViewType.TOP_DOWN_TREE_VIEW:return this.buildTopDownTreeView();case MultiDimensionalViewType.TOP_DOWN_HEAVY_VIEW:return this.buildTopDownHeavyView();case MultiDimensionalViewType.BOTTOM_UP_HEAVY_VIEW:return this.buildBottomUpHeavyView();default:throw new Error('Unknown multi-dimensional view type: '+viewType);}},buildTopDownTreeView:function(){if(this.topDownTreeViewRoot_===undefined){var treeViewRoot=this.buildRoot_;this.buildRoot_=undefined;this.setUpMissingChildRelationships_(treeViewRoot,0);this.finalizeTotalValues_(treeViewRoot,0,new WeakMap());this.topDownTreeViewRoot_=treeViewRoot;}
+return this.topDownTreeViewRoot_;},buildTopDownHeavyView:function(){if(this.topDownHeavyViewRoot_===undefined){this.topDownHeavyViewRoot_=this.buildGenericHeavyView_(this.addDimensionToTopDownHeavyViewNode_.bind(this));}
+return this.topDownHeavyViewRoot_;},buildBottomUpHeavyView:function(){if(this.bottomUpHeavyViewNode_===undefined){this.bottomUpHeavyViewNode_=this.buildGenericHeavyView_(this.addDimensionToBottomUpHeavyViewNode_.bind(this));}
+return this.bottomUpHeavyViewNode_;},createRootNode_:function(){return new MultiDimensionalViewNode(new Array(this.dimensions_),true);},getOrCreateChildNode_:function(parentNode,dimension,childDimensionTitle){if(dimension<0||dimension>=this.dimensions_)
+throw new Error('Invalid dimension');var dimensionChildren=parentNode.children[dimension];var childNode=dimensionChildren.get(childDimensionTitle);if(childNode!==undefined)
+return childNode;var childTitle=parentNode.title.slice();childTitle[dimension]=childDimensionTitle;childNode=new MultiDimensionalViewNode(childTitle,true);dimensionChildren.set(childDimensionTitle,childNode);return childNode;},setUpMissingChildRelationships_:function(node,firstDimensionToSetUp){for(var d=firstDimensionToSetUp;d<this.dimensions_;d++){var currentDimensionChildTitles=new Set(node.children[d].keys());for(var i=0;i<d;i++){for(var previousDimensionChildNode of node.children[i].values()){for(var previousDimensionGrandChildTitle of
+previousDimensionChildNode.children[d].keys()){currentDimensionChildTitles.add(previousDimensionGrandChildTitle);}}}
+for(var currentDimensionChildTitle of currentDimensionChildTitles){var currentDimensionChildNode=this.getOrCreateChildNode_(node,d,currentDimensionChildTitle);for(var i=0;i<d;i++){for(var previousDimensionChildNode of node.children[i].values()){var previousDimensionGrandChildNode=previousDimensionChildNode.children[d].get(currentDimensionChildTitle);if(previousDimensionGrandChildNode!==undefined){currentDimensionChildNode.children[i].set(previousDimensionChildNode.title[i],previousDimensionGrandChildNode);}}}
+this.setUpMissingChildRelationships_(currentDimensionChildNode,d);}}},finalizeTotalValues_:function(node,firstDimensionToFinalize,dimensionalSelfSumsMap){var dimensionalSelfSums=new Array(this.dimensions_);var maxChildResidualSum=0;var nodeSelfSum=node.self;for(var d=0;d<this.dimensions_;d++){var childResidualSum=0;for(var childNode of node.children[d].values()){if(d>=firstDimensionToFinalize)
+this.finalizeTotalValues_(childNode,d,dimensionalSelfSumsMap);var childNodeSelfSums=dimensionalSelfSumsMap.get(childNode);nodeSelfSum+=childNodeSelfSums[d];var residual=childNode.total-childNodeSelfSums[this.dimensions_-1];childResidualSum+=residual;}
+dimensionalSelfSums[d]=nodeSelfSum;maxChildResidualSum=Math.max(maxChildResidualSum,childResidualSum);}
+node.total=Math.max(node.total,nodeSelfSum+maxChildResidualSum);if(dimensionalSelfSumsMap.has(node))
+throw new Error('Internal error: Node finalized more than once');dimensionalSelfSumsMap.set(node,dimensionalSelfSums);},buildGenericHeavyView_:function(treeViewNodeHandler){var treeViewRoot=this.buildTopDownTreeView();var heavyViewRoot=this.createRootNode_();heavyViewRoot.total=treeViewRoot.total;heavyViewRoot.self=treeViewRoot.self;heavyViewRoot.isLowerBound=treeViewRoot.isLowerBound;var recursionDepthTrackers=new Array(this.dimensions_);for(var d=0;d<this.dimensions_;d++){recursionDepthTrackers[d]=new RecursionDepthTracker(this.maxDimensionDepths_[d],d);}
+this.addDimensionsToGenericHeavyViewNode_(treeViewRoot,heavyViewRoot,0,recursionDepthTrackers,false,treeViewNodeHandler);this.setUpMissingChildRelationships_(heavyViewRoot,0);return heavyViewRoot;},addDimensionsToGenericHeavyViewNode_:function(treeViewParentNode,heavyViewParentNode,startDimension,recursionDepthTrackers,previousDimensionsRecursive,treeViewNodeHandler){for(var d=startDimension;d<this.dimensions_;d++){this.addDimensionDescendantsToGenericHeavyViewNode_(treeViewParentNode,heavyViewParentNode,d,recursionDepthTrackers,previousDimensionsRecursive,treeViewNodeHandler);}},addDimensionDescendantsToGenericHeavyViewNode_:function(treeViewParentNode,heavyViewParentNode,currentDimension,recursionDepthTrackers,previousDimensionsRecursive,treeViewNodeHandler){var treeViewChildren=treeViewParentNode.children[currentDimension];var recursionDepthTracker=recursionDepthTrackers[currentDimension];for(var treeViewChildNode of treeViewChildren.values()){recursionDepthTracker.push(treeViewChildNode);treeViewNodeHandler(treeViewChildNode,heavyViewParentNode,currentDimension,recursionDepthTrackers,previousDimensionsRecursive);this.addDimensionDescendantsToGenericHeavyViewNode_(treeViewChildNode,heavyViewParentNode,currentDimension,recursionDepthTrackers,previousDimensionsRecursive,treeViewNodeHandler);recursionDepthTracker.pop();}},addDimensionToTopDownHeavyViewNode_:function(treeViewChildNode,heavyViewParentNode,currentDimension,recursionDepthTrackers,previousDimensionsRecursive){this.addDimensionToTopDownHeavyViewNodeRecursively_(treeViewChildNode,heavyViewParentNode,currentDimension,recursionDepthTrackers,previousDimensionsRecursive,1);},addDimensionToTopDownHeavyViewNodeRecursively_:function(treeViewChildNode,heavyViewParentNode,currentDimension,recursionDepthTrackers,previousDimensionsRecursive,subTreeDepth){var recursionDepthTracker=recursionDepthTrackers[currentDimension];var currentDimensionRecursive=subTreeDepth<=recursionDepthTracker.recursionDepth;var currentOrPreviousDimensionsRecursive=currentDimensionRecursive||previousDimensionsRecursive;var dimensionTitle=treeViewChildNode.title[currentDimension];var heavyViewChildNode=this.getOrCreateChildNode_(heavyViewParentNode,currentDimension,dimensionTitle);heavyViewChildNode.self+=treeViewChildNode.self;if(!currentOrPreviousDimensionsRecursive)
+heavyViewChildNode.total+=treeViewChildNode.total;this.addDimensionsToGenericHeavyViewNode_(treeViewChildNode,heavyViewChildNode,currentDimension+1,recursionDepthTrackers,currentOrPreviousDimensionsRecursive,this.addDimensionToTopDownHeavyViewNode_.bind(this));for(var treeViewGrandChildNode of
+treeViewChildNode.children[currentDimension].values()){recursionDepthTracker.push(treeViewGrandChildNode);this.addDimensionToTopDownHeavyViewNodeRecursively_(treeViewGrandChildNode,heavyViewChildNode,currentDimension,recursionDepthTrackers,previousDimensionsRecursive,subTreeDepth+1);recursionDepthTracker.pop();}},addDimensionToBottomUpHeavyViewNode_:function(treeViewChildNode,heavyViewParentNode,currentDimension,recursionDepthTrackers,previousDimensionsRecursive){var recursionDepthTracker=recursionDepthTrackers[currentDimension];var bottomIndex=recursionDepthTracker.bottomIndex;var topIndex=recursionDepthTracker.topIndex;var firstNonRecursiveIndex=bottomIndex+recursionDepthTracker.recursionDepth;var viewNodePath=recursionDepthTracker.viewNodePath;var trackerAncestorNode=recursionDepthTracker.trackerAncestorNode;var heavyViewDescendantNode=heavyViewParentNode;for(var i=bottomIndex;i<topIndex;i++){var treeViewAncestorNode=viewNodePath[i];var dimensionTitle=treeViewAncestorNode.title[currentDimension];heavyViewDescendantNode=this.getOrCreateChildNode_(heavyViewDescendantNode,currentDimension,dimensionTitle);var currentDimensionRecursive=i<firstNonRecursiveIndex;var currentOrPreviousDimensionsRecursive=currentDimensionRecursive||previousDimensionsRecursive;heavyViewDescendantNode.self+=treeViewChildNode.self;if(!currentOrPreviousDimensionsRecursive)
+heavyViewDescendantNode.total+=treeViewChildNode.total;this.addDimensionsToGenericHeavyViewNode_(treeViewChildNode,heavyViewDescendantNode,currentDimension+1,recursionDepthTrackers,currentOrPreviousDimensionsRecursive,this.addDimensionToBottomUpHeavyViewNode_.bind(this));}}};function RecursionDepthTracker(maxDepth,dimension){this.titlePath=new Array(maxDepth);this.viewNodePath=new Array(maxDepth);this.bottomIndex=this.topIndex=maxDepth;this.dimension_=dimension;this.currentTrackerNode_=this.createNode_(0,undefined);}
+RecursionDepthTracker.prototype={push:function(viewNode){if(this.bottomIndex===0)
+throw new Error('Cannot push to a full tracker');var title=viewNode.title[this.dimension_];this.bottomIndex--;this.titlePath[this.bottomIndex]=title;this.viewNodePath[this.bottomIndex]=viewNode;var childTrackerNode=this.currentTrackerNode_.children.get(title);if(childTrackerNode!==undefined){this.currentTrackerNode_=childTrackerNode;return;}
+var maxLengths=zFunction(this.titlePath,this.bottomIndex);var recursionDepth=0;for(var i=0;i<maxLengths.length;i++)
+recursionDepth=Math.max(recursionDepth,maxLengths[i]);childTrackerNode=this.createNode_(recursionDepth,this.currentTrackerNode_);this.currentTrackerNode_.children.set(title,childTrackerNode);this.currentTrackerNode_=childTrackerNode;},pop:function(){if(this.bottomIndex===this.topIndex)
+throw new Error('Cannot pop from an empty tracker');this.titlePath[this.bottomIndex]=undefined;this.viewNodePath[this.bottomIndex]=undefined;this.bottomIndex++;this.currentTrackerNode_=this.currentTrackerNode_.parent;},get recursionDepth(){return this.currentTrackerNode_.recursionDepth;},createNode_:function(recursionDepth,parent){return{recursionDepth:recursionDepth,parent:parent,children:new Map()};}};function zFunction(list,startIndex){var n=list.length-startIndex;if(n===0)
+return[];var z=new Array(n);z[0]=0;for(var i=1,left=0,right=0;i<n;++i){var maxLength;if(i<=right)
+maxLength=Math.min(right-i+1,z[i-left]);else
+maxLength=0;while(i+maxLength<n&&list[startIndex+maxLength]===list[startIndex+i+maxLength]){++maxLength;}
+if(i+maxLength-1>right){left=i;right=i+maxLength-1;}
+z[i]=maxLength;}
+return z;}
+return{MultiDimensionalViewBuilder:MultiDimensionalViewBuilder,MultiDimensionalViewType:MultiDimensionalViewType,MultiDimensionalViewNode:MultiDimensionalViewNode,RecursionDepthTracker:RecursionDepthTracker,zFunction:zFunction};});'use strict';tr.exportTo('tr.ui.analysis',function(){var NO_BREAK_SPACE=String.fromCharCode(160);var RIGHTWARDS_ARROW=String.fromCharCode(8594);var COLLATOR=new Intl.Collator(undefined,{numeric:true});function TitleColumn(title){this.title=title;}
+TitleColumn.prototype={supportsCellSelection:false,value:function(row){var formattedTitle=this.formatTitle(row);var contexts=row.contexts;if(contexts===undefined||contexts.length===0)
+return formattedTitle;var firstContext=contexts[0];var lastContext=contexts[contexts.length-1];var changeDefinedContextCount=0;for(var i=1;i<contexts.length;i++){if((contexts[i]===undefined)!==(contexts[i-1]===undefined))
+changeDefinedContextCount++;}
+var color=undefined;var prefix=undefined;if(!firstContext&&lastContext){color='red';prefix='+++';}else if(firstContext&&!lastContext){color='green';prefix='---';}
+if(changeDefinedContextCount>1){color='purple';}
+if(color===undefined&&prefix===undefined)
+return formattedTitle;var titleEl=document.createElement('span');if(prefix!==undefined){var prefixEl=tr.ui.b.createSpan({textContent:prefix});prefixEl.style.fontFamily='monospace';titleEl.appendChild(prefixEl);titleEl.appendChild(tr.ui.b.asHTMLOrTextNode(NO_BREAK_SPACE));}
+if(color!==undefined)
+titleEl.style.color=color;titleEl.appendChild(tr.ui.b.asHTMLOrTextNode(formattedTitle));return titleEl;},formatTitle:function(row){return row.title;},cmp:function(rowA,rowB){return COLLATOR.compare(rowA.title,rowB.title);}};function MemoryColumn(name,cellPath,aggregationMode){this.name=name;this.cellPath=cellPath;this.aggregationMode=aggregationMode;}
+MemoryColumn.fromRows=function(rows,cellKey,aggregationMode,rules){var cellNames=new Set();function gatherCellNames(rows){rows.forEach(function(row){if(row===undefined)
+return;var fieldCells=row[cellKey];if(fieldCells!==undefined){tr.b.iterItems(fieldCells,function(fieldName,fieldCell){if(fieldCell===undefined||fieldCell.fields===undefined)
+return;cellNames.add(fieldName);});}
+var subRows=row.subRows;if(subRows!==undefined)
+gatherCellNames(subRows);});}
+gatherCellNames(rows);var positions=[];cellNames.forEach(function(cellName){var cellPath=[cellKey,cellName];var matchingRule=MemoryColumn.findMatchingRule(cellName,rules);var constructor=matchingRule.columnConstructor;var column=new constructor(cellName,cellPath,aggregationMode);positions.push({importance:matchingRule.importance,column:column});});positions.sort(function(a,b){if(a.importance===b.importance)
+return COLLATOR.compare(a.column.name,b.column.name);return b.importance-a.importance;});return positions.map(function(position){return position.column});};MemoryColumn.spaceEqually=function(columns){var columnWidth=(100/columns.length).toFixed(3)+'%';columns.forEach(function(column){column.width=columnWidth;});};MemoryColumn.findMatchingRule=function(name,rules){for(var i=0;i<rules.length;i++){var rule=rules[i];if(MemoryColumn.nameMatchesCondition(name,rule.condition))
+return rule;}
+return undefined;};MemoryColumn.nameMatchesCondition=function(name,condition){if(condition===undefined)
+return true;if(typeof(condition)==='string')
+return name===condition;return condition.test(name);};MemoryColumn.AggregationMode={DIFF:0,MAX:1};MemoryColumn.SOME_TIMESTAMPS_INFO_QUANTIFIER='at some selected timestamps';MemoryColumn.prototype={get title(){return this.name;},cell:function(row){var cell=row;var cellPath=this.cellPath;for(var i=0;i<cellPath.length;i++){if(cell===undefined)
+return undefined;cell=cell[cellPath[i]];}
+return cell;},aggregateCells:function(row,subRows){},fields:function(row){var cell=this.cell(row);if(cell===undefined)
+return undefined;return cell.fields;},value:function(row){var fields=this.fields(row);if(this.hasAllRelevantFieldsUndefined(fields))
+return'';var contexts=row.contexts;var color=this.color(fields,contexts);var infos=[];this.addInfos(fields,contexts,infos);var formattedFields=this.formatFields(fields);if((color===undefined||formattedFields==='')&&infos.length===0)
+return formattedFields;var fieldEl=document.createElement('span');fieldEl.style.display='flex';fieldEl.style.alignItems='center';fieldEl.appendChild(tr.ui.b.asHTMLOrTextNode(formattedFields));infos.forEach(function(info){var infoEl=document.createElement('span');infoEl.style.paddingLeft='4px';infoEl.style.cursor='help';infoEl.style.fontWeight='bold';infoEl.textContent=info.icon;if(info.color!==undefined)
+infoEl.style.color=info.color;infoEl.title=info.message;fieldEl.appendChild(infoEl);},this);if(color!==undefined)
+fieldEl.style.color=color;return fieldEl;},hasAllRelevantFieldsUndefined:function(fields){if(fields===undefined)
+return true;switch(this.aggregationMode){case MemoryColumn.AggregationMode.DIFF:return fields[0]===undefined&&fields[fields.length-1]===undefined;case MemoryColumn.AggregationMode.MAX:default:return fields.every(function(field){return field===undefined;});}},color:function(fields,contexts){return undefined;},formatFields:function(fields){if(fields.length===1)
+return this.formatSingleField(fields[0]);else
+return this.formatMultipleFields(fields);},formatSingleField:function(field){throw new Error('Not implemented');},formatMultipleFields:function(fields){switch(this.aggregationMode){case MemoryColumn.AggregationMode.DIFF:return this.formatMultipleFieldsDiff(fields[0],fields[fields.length-1]);case MemoryColumn.AggregationMode.MAX:return this.formatMultipleFieldsMax(fields);default:return tr.ui.b.createSpan({textContent:'(unsupported aggregation mode)',italic:true});}},formatMultipleFieldsDiff:function(firstField,lastField){throw new Error('Not implemented');},formatMultipleFieldsMax:function(fields){return this.formatSingleField(this.getMaxField(fields));},cmp:function(rowA,rowB){var fieldsA=this.fields(rowA);var fieldsB=this.fields(rowB);if(fieldsA!==undefined&&fieldsB!==undefined&&fieldsA.length!==fieldsB.length)
+throw new Error('Different number of fields');var undefinedA=this.hasAllRelevantFieldsUndefined(fieldsA);var undefinedB=this.hasAllRelevantFieldsUndefined(fieldsB);if(undefinedA&&undefinedB)
+return 0;if(undefinedA)
+return-1;if(undefinedB)
+return 1;return this.compareFields(fieldsA,fieldsB);},compareFields:function(fieldsA,fieldsB){if(fieldsA.length===1)
+return this.compareSingleFields(fieldsA[0],fieldsB[0]);else
+return this.compareMultipleFields(fieldsA,fieldsB);},compareSingleFields:function(fieldA,fieldB){throw new Error('Not implemented');},compareMultipleFields:function(fieldsA,fieldsB){switch(this.aggregationMode){case MemoryColumn.AggregationMode.DIFF:return this.compareMultipleFieldsDiff(fieldsA[0],fieldsA[fieldsA.length-1],fieldsB[0],fieldsB[fieldsB.length-1]);case MemoryColumn.AggregationMode.MAX:return this.compareMultipleFieldsMax(fieldsA,fieldsB);default:return 0;}},compareMultipleFieldsDiff:function(firstFieldA,lastFieldA,firstFieldB,lastFieldB){throw new Error('Not implemented');},compareMultipleFieldsMax:function(fieldsA,fieldsB){return this.compareSingleFields(this.getMaxField(fieldsA),this.getMaxField(fieldsB));},getMaxField:function(fields){return fields.reduce(function(accumulator,field){if(field===undefined)
+return accumulator;if(accumulator===undefined||this.compareSingleFields(field,accumulator)>0){return field;}
+return accumulator;}.bind(this),undefined);},addInfos:function(fields,contexts,infos){},getImportance:function(importanceRules){if(importanceRules.length===0)
+return 0;var matchingRule=MemoryColumn.findMatchingRule(this.name,importanceRules);if(matchingRule!==undefined)
+return matchingRule.importance;var minImportance=importanceRules[0].importance;for(var i=1;i<importanceRules.length;i++)
+minImportance=Math.min(minImportance,importanceRules[i].importance);return minImportance-1;}};function StringMemoryColumn(name,cellPath,aggregationMode){MemoryColumn.call(this,name,cellPath,aggregationMode);}
+StringMemoryColumn.prototype={__proto__:MemoryColumn.prototype,formatSingleField:function(string){return string;},formatMultipleFieldsDiff:function(firstString,lastString){if(firstString===undefined){var spanEl=tr.ui.b.createSpan({color:'red'});spanEl.appendChild(tr.ui.b.asHTMLOrTextNode('+'));spanEl.appendChild(tr.ui.b.asHTMLOrTextNode(this.formatSingleField(lastString)));return spanEl;}else if(lastString===undefined){var spanEl=tr.ui.b.createSpan({color:'green'});spanEl.appendChild(tr.ui.b.asHTMLOrTextNode('-'));spanEl.appendChild(tr.ui.b.asHTMLOrTextNode(this.formatSingleField(firstString)));return spanEl;}else if(firstString===lastString){return this.formatSingleField(firstString);}else{var spanEl=tr.ui.b.createSpan({color:'DarkOrange'});spanEl.appendChild(tr.ui.b.asHTMLOrTextNode(this.formatSingleField(firstString)));spanEl.appendChild(tr.ui.b.asHTMLOrTextNode(' '+RIGHTWARDS_ARROW+' '));spanEl.appendChild(tr.ui.b.asHTMLOrTextNode(this.formatSingleField(lastString)));return spanEl;}},compareSingleFields:function(stringA,stringB){return COLLATOR.compare(stringA,stringB);},compareMultipleFieldsDiff:function(firstStringA,lastStringA,firstStringB,lastStringB){if(firstStringA===undefined&&firstStringB!==undefined)
+return 1;if(firstStringA!==undefined&&firstStringB===undefined)
+return-1;if(firstStringA===undefined&&firstStringB===undefined)
+return this.compareSingleFields(lastStringA,lastStringB);if(lastStringA===undefined&&lastStringB!==undefined)
+return-1;if(lastStringA!==undefined&&lastStringB===undefined)
+return 1;if(lastStringA===undefined&&lastStringB===undefined)
+return this.compareSingleFields(firstStringB,firstStringA);var areStringsAEqual=firstStringA===lastStringA;var areStringsBEqual=firstStringB===lastStringB;if(areStringsAEqual&&areStringsBEqual)
+return 0;if(areStringsAEqual)
+return-1;if(areStringsBEqual)
+return 1;return 0;}};function NumericMemoryColumn(name,cellPath,aggregationMode){MemoryColumn.call(this,name,cellPath,aggregationMode);}
+NumericMemoryColumn.DIFF_EPSILON=0.0001;NumericMemoryColumn.prototype={__proto__:MemoryColumn.prototype,aggregateCells:function(row,subRows){var subRowCells=subRows.map(this.cell,this);var hasDefinedSubRowNumeric=false;var timestampCount=undefined;subRowCells.forEach(function(subRowCell){if(subRowCell===undefined)
+return;var subRowNumerics=subRowCell.fields;if(subRowNumerics===undefined)
+return;if(timestampCount===undefined)
+timestampCount=subRowNumerics.length;else if(timestampCount!==subRowNumerics.length)
+throw new Error('Sub-rows have different numbers of timestamps');if(hasDefinedSubRowNumeric)
+return;hasDefinedSubRowNumeric=subRowNumerics.some(function(numeric){return numeric!==undefined;});});if(!hasDefinedSubRowNumeric)
+return;var cellPath=this.cellPath;var rowCell=row;for(var i=0;i<cellPath.length;i++){var nextStepName=cellPath[i];var nextStep=rowCell[nextStepName];if(nextStep===undefined){if(i<cellPath.length-1)
+nextStep={};else
+nextStep=new MemoryCell(undefined);rowCell[nextStepName]=nextStep;}
+rowCell=nextStep;}
+if(rowCell.fields===undefined){rowCell.fields=new Array(timestampCount);}else if(rowCell.fields.length!==timestampCount){throw new Error('Row has a different number of timestamps than sub-rows');}
+for(var i=0;i<timestampCount;i++){if(rowCell.fields[i]!==undefined)
+continue;rowCell.fields[i]=tr.model.MemoryAllocatorDump.aggregateNumerics(subRowCells.map(function(subRowCell){if(subRowCell===undefined||subRowCell.fields===undefined)
+return undefined;return subRowCell.fields[i];}));}},formatSingleField:function(numeric){if(numeric===undefined)
+return'';return tr.v.ui.createScalarSpan(numeric);},formatMultipleFieldsDiff:function(firstNumeric,lastNumeric){return this.formatSingleField(this.getDiffField_(firstNumeric,lastNumeric));},compareSingleFields:function(numericA,numericB){return numericA.value-numericB.value;},compareMultipleFieldsDiff:function(firstNumericA,lastNumericA,firstNumericB,lastNumericB){return this.getDiffFieldValue_(firstNumericA,lastNumericA)-
+this.getDiffFieldValue_(firstNumericB,lastNumericB);},getDiffField_:function(firstNumeric,lastNumeric){var definedNumeric=firstNumeric||lastNumeric;return new tr.v.ScalarNumeric(definedNumeric.unit.correspondingDeltaUnit,this.getDiffFieldValue_(firstNumeric,lastNumeric));},getDiffFieldValue_:function(firstNumeric,lastNumeric){var firstValue=firstNumeric===undefined?0:firstNumeric.value;var lastValue=lastNumeric===undefined?0:lastNumeric.value;var diff=lastValue-firstValue;return Math.abs(diff)<NumericMemoryColumn.DIFF_EPSILON?0:diff;}};function MemoryCell(fields){this.fields=fields;}
+MemoryCell.extractFields=function(cell){if(cell===undefined)
+return undefined;return cell.fields;};var RECURSIVE_EXPANSION_MAX_VISIBLE_ROW_COUNT=10;function expandTableRowsRecursively(table){var currentLevelRows=table.tableRows;var totalVisibleRowCount=currentLevelRows.length;while(currentLevelRows.length>0){var nextLevelRowCount=0;currentLevelRows.forEach(function(currentLevelRow){var subRows=currentLevelRow.subRows;if(subRows===undefined||subRows.length===0)
+return;nextLevelRowCount+=subRows.length;});if(totalVisibleRowCount+nextLevelRowCount>RECURSIVE_EXPANSION_MAX_VISIBLE_ROW_COUNT){break;}
+var nextLevelRows=new Array(nextLevelRowCount);var nextLevelRowIndex=0;currentLevelRows.forEach(function(currentLevelRow){var subRows=currentLevelRow.subRows;if(subRows===undefined||subRows.length===0)
+return;table.setExpandedForTableRow(currentLevelRow,true);subRows.forEach(function(subRow){nextLevelRows[nextLevelRowIndex++]=subRow;});});totalVisibleRowCount+=nextLevelRowCount;currentLevelRows=nextLevelRows;}}
+function aggregateTableRowCellsRecursively(row,columns,opt_predicate){var subRows=row.subRows;if(subRows===undefined||subRows.length===0)
+return;subRows.forEach(function(subRow){aggregateTableRowCellsRecursively(subRow,columns,opt_predicate);});if(opt_predicate===undefined||opt_predicate(row.contexts))
+aggregateTableRowCells(row,subRows,columns);}
+function aggregateTableRowCells(row,subRows,columns){columns.forEach(function(column){if(!(column instanceof MemoryColumn))
+return;column.aggregateCells(row,subRows);});}
+function createCells(timeToValues,valueFieldsGetter){var fieldNameToFields=tr.b.invertArrayOfDicts(timeToValues,valueFieldsGetter);return tr.b.mapItems(fieldNameToFields,function(fieldName,fields){return new tr.ui.analysis.MemoryCell(fields);});}
+function createWarningInfo(message){return{message:message,icon:String.fromCharCode(9888),color:'red'};}
+return{TitleColumn:TitleColumn,MemoryColumn:MemoryColumn,StringMemoryColumn:StringMemoryColumn,NumericMemoryColumn:NumericMemoryColumn,MemoryCell:MemoryCell,expandTableRowsRecursively:expandTableRowsRecursively,aggregateTableRowCellsRecursively:aggregateTableRowCellsRecursively,aggregateTableRowCells:aggregateTableRowCells,createCells:createCells,createWarningInfo:createWarningInfo};});'use strict';Polymer('tr-ui-a-stacked-pane',{rebuild:function(){if(!this.paneDirty_){return;}
+this.paneDirty_=false;this.rebuildPane_();},scheduleRebuildPane_:function(){if(this.paneDirty_)
+return;this.paneDirty_=true;setTimeout(this.rebuild.bind(this),0);},rebuildPane_:function(){},set childPaneBuilder(childPaneBuilder){this.childPaneBuilder_=childPaneBuilder;this.dispatchEvent(new tr.b.Event('request-child-pane-change'));},get childPaneBuilder(){return this.childPaneBuilder_;},appended:function(){this.rebuild();}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ScalarNumeric=tr.v.ScalarNumeric;var sizeInBytes_smallerIsBetter=tr.v.Unit.byName.sizeInBytes_smallerIsBetter;var RowDimension={ROOT:-1,STACK_FRAME:0,OBJECT_TYPE:1};var LATIN_SMALL_LETTER_F_WITH_HOOK=String.fromCharCode(0x0192);var CIRCLED_LATIN_CAPITAL_LETTER_T=String.fromCharCode(0x24C9);function HeapDumpNodeTitleColumn(title){tr.ui.analysis.TitleColumn.call(this,title);}
+HeapDumpNodeTitleColumn.prototype={__proto__:tr.ui.analysis.TitleColumn.prototype,formatTitle:function(row){var title=row.title;var dimension=row.dimension;switch(dimension){case RowDimension.ROOT:return title;case RowDimension.STACK_FRAME:case RowDimension.OBJECT_TYPE:return this.formatSubRow_(title,dimension);default:throw new Error('Invalid row dimension: '+row.dimension);}},cmp:function(rowA,rowB){if(rowA.dimension!==rowB.dimension)
+return rowA.dimension-rowB.dimension;return tr.ui.analysis.TitleColumn.prototype.cmp.call(this,rowA,rowB);},formatSubRow_:function(title,dimension){var titleEl=document.createElement('span');var symbolEl=document.createElement('span');var symbolColorName;if(dimension===RowDimension.STACK_FRAME){symbolEl.textContent=LATIN_SMALL_LETTER_F_WITH_HOOK;symbolEl.title='Stack frame';symbolColorName='heap_dump_stack_frame';}else{symbolEl.textContent=CIRCLED_LATIN_CAPITAL_LETTER_T;symbolEl.title='Object type';symbolColorName='heap_dump_object_type';}
+symbolEl.style.color=tr.b.ColorScheme.getColorForReservedNameAsString(symbolColorName);symbolEl.style.paddingRight='4px';symbolEl.style.cursor='help';symbolEl.style.weight='bold';titleEl.appendChild(symbolEl);titleEl.appendChild(document.createTextNode(title));return titleEl;}};var COLUMN_RULES=[{importance:0,columnConstructor:tr.ui.analysis.NumericMemoryColumn}];Polymer('tr-ui-a-memory-dump-heap-details-pane',{created:function(){this.heapDumps_=undefined;this.aggregationMode_=undefined;this.viewMode_=undefined;},ready:function(){this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;this.$.info_bar.message='Note: Values displayed in the heavy view '+'are lower bounds (except for the root).';this.$.view_mode_container.appendChild(tr.ui.b.createSelector(this,'viewMode','memoryDumpHeapDetailsPane.viewMode',tr.b.MultiDimensionalViewType.TOP_DOWN_TREE_VIEW,[{label:'Top-down (Tree)',value:tr.b.MultiDimensionalViewType.TOP_DOWN_TREE_VIEW},{label:'Top-down (Heavy)',value:tr.b.MultiDimensionalViewType.TOP_DOWN_HEAVY_VIEW},{label:'Bottom-up (Heavy)',value:tr.b.MultiDimensionalViewType.BOTTOM_UP_HEAVY_VIEW}]));},set heapDumps(heapDumps){this.heapDumps_=heapDumps;this.scheduleRebuildPane_();},get heapDumps(){return this.heapDumps_;},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},set viewMode(viewMode){this.viewMode_=viewMode;this.scheduleRebuildPane_();},get viewMode(){return this.viewMode_;},get heavyView(){switch(this.viewMode){case tr.b.MultiDimensionalViewType.TOP_DOWN_HEAVY_VIEW:case tr.b.MultiDimensionalViewType.BOTTOM_UP_HEAVY_VIEW:return true;default:return false;}},rebuildPane_:function(){if(this.heapDumps_===undefined||this.heapDumps_.length===0){this.$.info_text.style.display='block';this.$.table.style.display='none';this.$.view_mode_container.style.display='none';this.$.info_bar.visible=false;this.$.table.clear();this.$.table.rebuild();return;}
+this.$.info_text.style.display='none';this.$.table.style.display='block';this.$.view_mode_container.style.display='block';this.$.info_bar.visible=this.heavyView;var stackFrameTrees=this.createStackFrameTrees_(this.heapDumps_);var rows=this.createRows_(stackFrameTrees);var columns=this.createColumns_(rows);this.$.table.tableRows=rows;this.$.table.tableColumns=columns;this.$.table.rebuild();tr.ui.analysis.expandTableRowsRecursively(this.$.table);},createStackFrameTrees_:function(heapDumps){return heapDumps.map(function(heapDump){if(heapDump===undefined)
+return undefined;var builder=new tr.b.MultiDimensionalViewBuilder(2);heapDump.entries.forEach(function(entry){var leafStackFrame=entry.leafStackFrame;var stackTracePath=leafStackFrame===undefined?[]:leafStackFrame.getUserFriendlyStackTrace().reverse();var objectTypeName=entry.objectTypeName;var objectTypeNamePath=objectTypeName===undefined?[]:[objectTypeName];builder.addPath([stackTracePath,objectTypeNamePath],entry.size,tr.b.MultiDimensionalViewBuilder.ValueKind.TOTAL);},this);return builder.buildView(this.viewMode);},this);},createRows_:function(stackFrameTrees){var definedHeapDump=tr.b.findFirstInArray(this.heapDumps);if(definedHeapDump===undefined)
+return[];var rootRowTitle=definedHeapDump.allocatorName;return[this.createHeapRowRecursively_(stackFrameTrees,RowDimension.ROOT,rootRowTitle)];},createHeapRowRecursively_:function(nodes,dimension,title){var cells=tr.ui.analysis.createCells(nodes,function(node){return{'Size':new ScalarNumeric(sizeInBytes_smallerIsBetter,node.total)};});var row={dimension:dimension,title:title,contexts:nodes,cells:cells};var stackFrameSubRows=this.createHeapDimensionSubRowsRecursively_(nodes,RowDimension.STACK_FRAME);var objectTypeSubRows=this.createHeapDimensionSubRowsRecursively_(nodes,RowDimension.OBJECT_TYPE);var subRows=stackFrameSubRows.concat(objectTypeSubRows);if(subRows.length>0)
+row.subRows=subRows;return row;},createHeapDimensionSubRowsRecursively_:function(nodes,dimension){var dimensionGroupedChildNodes=tr.b.dictionaryValues(tr.b.invertArrayOfDicts(nodes,function(node){var childDict={};var displayedChildrenTotal=0;var hasDisplayedChildren=false;for(var child of node.children[dimension].values()){if(!this.heavyView&&child.isLowerBound)
+continue;childDict[child.title[dimension]]=child;displayedChildrenTotal+=child.total;hasDisplayedChildren=true;}
+if(!this.heavyView&&displayedChildrenTotal<node.total&&hasDisplayedChildren){var otherTitle=node.title.slice();otherTitle[dimension]='<other>';childDict['<other>']={title:otherTitle,total:node.total-displayedChildrenTotal,children:[new Map(),new Map()]};}
+return childDict;},this));return dimensionGroupedChildNodes.map(function(subRowNodes){var subRowTitle=tr.b.findFirstInArray(subRowNodes).title[dimension];return this.createHeapRowRecursively_(subRowNodes,dimension,subRowTitle);},this);},createColumns_:function(rows){var titleColumn=new HeapDumpNodeTitleColumn('Stack frame');titleColumn.width='500px';var numericColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'cells',this.aggregationMode_,COLUMN_RULES);tr.ui.analysis.MemoryColumn.spaceEqually(numericColumns);var columns=[titleColumn].concat(numericColumns);return columns;}});return{RowDimension:RowDimension};});'use strict';tr.exportTo('tr.ui.analysis',function(){var SUBALLOCATION_CONTEXT=true;var MemoryAllocatorDumpInfoType=tr.model.MemoryAllocatorDumpInfoType;var PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN=MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN;var PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER=MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER;var LEFTWARDS_OPEN_HEADED_ARROW=String.fromCharCode(0x21FD);var RIGHTWARDS_OPEN_HEADED_ARROW=String.fromCharCode(0x21FE);var EN_DASH=String.fromCharCode(0x2013);var CIRCLED_LATIN_SMALL_LETTER_I=String.fromCharCode(0x24D8);function AllocatorDumpNameColumn(){tr.ui.analysis.TitleColumn.call(this,'Component');}
+AllocatorDumpNameColumn.prototype={__proto__:tr.ui.analysis.TitleColumn.prototype,formatTitle:function(row){if(!row.suballocation)
+return row.title;return tr.ui.b.createSpan({textContent:row.title,italic:true,tooltip:row.fullNames===undefined?undefined:row.fullNames.join(', ')});}};function getAndUpdateEntry(map,name,createdCallback){var entry=map.get(name);if(entry===undefined){entry={count:0};createdCallback(entry);map.set(name,entry);}
+entry.count++;return entry;}
+function SizeInfoMessageBuilder(){this.parts_=[];this.indent_=0;}
+SizeInfoMessageBuilder.prototype={append:function(){this.parts_.push.apply(this.parts_,Array.prototype.slice.apply(arguments));},appendMap:function(map,hasPluralSuffix,emptyText,itemCallback,opt_this){opt_this=opt_this||this;if(map.size===0){if(emptyText)
+this.append(emptyText);}else if(map.size===1){this.parts_.push(' ');var key=map.keys().next().value;itemCallback.call(opt_this,key,map.get(key));}else{if(hasPluralSuffix)
+this.parts_.push('s');this.parts_.push(':');this.indent_++;for(var key of map.keys()){this.parts_.push('\n',' '.repeat(3*(this.indent_-1)),' - ');itemCallback.call(opt_this,key,map.get(key));}
+this.indent_--;}},appendImportanceRange:function(range){this.append(' (importance: ');if(range.min===range.max)
+this.append(range.min);else
+this.append(range.min,EN_DASH,range.max);this.append(')');},appendSizeIfDefined:function(size){if(size!==undefined)
+this.append(' (',tr.v.Unit.byName.sizeInBytes.format(size),')');},appendSomeTimestampsQuantifier:function(){this.append(' ',tr.ui.analysis.MemoryColumn.SOME_TIMESTAMPS_INFO_QUANTIFIER);},build:function(){return this.parts_.join('');}};function EffectiveSizeColumn(name,cellPath,aggregationMode){tr.ui.analysis.NumericMemoryColumn.call(this,name,cellPath,aggregationMode);}
+EffectiveSizeColumn.prototype={__proto__:tr.ui.analysis.NumericMemoryColumn.prototype,addInfos:function(numerics,memoryAllocatorDumps,infos){if(memoryAllocatorDumps===undefined)
+return;var ownerNameToEntry=new Map();var ownedNameToEntry=new Map();for(var i=0;i<numerics.length;i++){if(numerics[i]===undefined)
+continue;var dump=memoryAllocatorDumps[i];if(dump===SUBALLOCATION_CONTEXT)
+return;dump.ownedBy.forEach(function(ownerLink){var ownerDump=ownerLink.source;this.getAndUpdateOwnershipEntry_(ownerNameToEntry,ownerDump,ownerLink);},this);var ownedLink=dump.owns;if(ownedLink!==undefined){var ownedDump=ownedLink.target;var ownedEntry=this.getAndUpdateOwnershipEntry_(ownedNameToEntry,ownedDump,ownedLink,true);var sharerNameToEntry=ownedEntry.sharerNameToEntry;ownedDump.ownedBy.forEach(function(sharerLink){var sharerDump=sharerLink.source;if(sharerDump===dump)
+return;this.getAndUpdateOwnershipEntry_(sharerNameToEntry,sharerDump,sharerLink);},this);}}
+if(ownerNameToEntry.size>0){var messageBuilder=new SizeInfoMessageBuilder();messageBuilder.append('shared by');messageBuilder.appendMap(ownerNameToEntry,false,undefined,function(ownerName,ownerEntry){messageBuilder.append(ownerName);if(ownerEntry.count<numerics.length)
+messageBuilder.appendSomeTimestampsQuantifier();messageBuilder.appendImportanceRange(ownerEntry.importanceRange);},this);infos.push({message:messageBuilder.build(),icon:LEFTWARDS_OPEN_HEADED_ARROW,color:'green'});}
+if(ownedNameToEntry.size>0){var messageBuilder=new SizeInfoMessageBuilder();messageBuilder.append('shares');messageBuilder.appendMap(ownedNameToEntry,false,undefined,function(ownedName,ownedEntry){messageBuilder.append(ownedName);var ownedCount=ownedEntry.count;if(ownedCount<numerics.length)
+messageBuilder.appendSomeTimestampsQuantifier();messageBuilder.appendImportanceRange(ownedEntry.importanceRange);messageBuilder.append(' with');messageBuilder.appendMap(ownedEntry.sharerNameToEntry,false,' no other dumps',function(sharerName,sharerEntry){messageBuilder.append(sharerName);if(sharerEntry.count<ownedCount)
+messageBuilder.appendSomeTimestampsQuantifier();messageBuilder.appendImportanceRange(sharerEntry.importanceRange);},this);},this);infos.push({message:messageBuilder.build(),icon:RIGHTWARDS_OPEN_HEADED_ARROW,color:'green'});}},getAndUpdateOwnershipEntry_:function(map,dump,link,opt_withSharerNameToEntry){var entry=getAndUpdateEntry(map,dump.quantifiedName,function(newEntry){newEntry.importanceRange=new tr.b.Range();if(opt_withSharerNameToEntry)
+newEntry.sharerNameToEntry=new Map();});entry.importanceRange.addValue(link.importance||0);return entry;}};function SizeColumn(name,cellPath,aggregationMode){tr.ui.analysis.NumericMemoryColumn.call(this,name,cellPath,aggregationMode);}
+SizeColumn.prototype={__proto__:tr.ui.analysis.NumericMemoryColumn.prototype,addInfos:function(numerics,memoryAllocatorDumps,infos){if(memoryAllocatorDumps===undefined)
+return;this.addOverlapInfo_(numerics,memoryAllocatorDumps,infos);this.addProvidedSizeWarningInfos_(numerics,memoryAllocatorDumps,infos);},addOverlapInfo_:function(numerics,memoryAllocatorDumps,infos){var siblingNameToEntry=new Map();for(var i=0;i<numerics.length;i++){if(numerics[i]===undefined)
+continue;var dump=memoryAllocatorDumps[i];if(dump===SUBALLOCATION_CONTEXT)
+return;var ownedBySiblingSizes=dump.ownedBySiblingSizes;for(var siblingDump of ownedBySiblingSizes.keys()){var siblingName=siblingDump.name;getAndUpdateEntry(siblingNameToEntry,siblingName,function(newEntry){if(numerics.length===1)
+newEntry.size=ownedBySiblingSizes.get(siblingDump);});}}
+if(siblingNameToEntry.size>0){var messageBuilder=new SizeInfoMessageBuilder();messageBuilder.append('overlaps with its sibling');messageBuilder.appendMap(siblingNameToEntry,true,undefined,function(siblingName,siblingEntry){messageBuilder.append('\'',siblingName,'\'');messageBuilder.appendSizeIfDefined(siblingEntry.size);if(siblingEntry.count<numerics.length)
+messageBuilder.appendSomeTimestampsQuantifier();},this);infos.push({message:messageBuilder.build(),icon:CIRCLED_LATIN_SMALL_LETTER_I,color:'blue'});}},addProvidedSizeWarningInfos_:function(numerics,memoryAllocatorDumps,infos){var infoTypeToEntry=new Map();for(var i=0;i<numerics.length;i++){if(numerics[i]===undefined)
+continue;var dump=memoryAllocatorDumps[i];if(dump===SUBALLOCATION_CONTEXT)
+return;dump.infos.forEach(function(dumpInfo){getAndUpdateEntry(infoTypeToEntry,dumpInfo.type,function(newEntry){if(numerics.length===1){newEntry.providedSize=dumpInfo.providedSize;newEntry.dependencySize=dumpInfo.dependencySize;}});});}
+for(var infoType of infoTypeToEntry.keys()){var entry=infoTypeToEntry.get(infoType);var messageBuilder=new SizeInfoMessageBuilder();messageBuilder.append('provided size');messageBuilder.appendSizeIfDefined(entry.providedSize);var dependencyName;switch(infoType){case PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN:dependencyName='the aggregated size of the children';break;case PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER:dependencyName='the size of the largest owner';break;default:dependencyName='an unknown dependency';break;}
+messageBuilder.append(' was less than ',dependencyName);messageBuilder.appendSizeIfDefined(entry.dependencySize);if(entry.count<numerics.length)
+messageBuilder.appendSomeTimestampsQuantifier();infos.push(tr.ui.analysis.createWarningInfo(messageBuilder.build()));}}};var NUMERIC_COLUMN_RULES=[{condition:tr.model.MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME,importance:10,columnConstructor:EffectiveSizeColumn},{condition:tr.model.MemoryAllocatorDump.SIZE_NUMERIC_NAME,importance:9,columnConstructor:SizeColumn},{condition:'page_size',importance:0,columnConstructor:tr.ui.analysis.NumericMemoryColumn},{condition:/size/,importance:5,columnConstructor:tr.ui.analysis.NumericMemoryColumn},{importance:0,columnConstructor:tr.ui.analysis.NumericMemoryColumn}];var DIAGNOSTIC_COLUMN_RULES=[{importance:0,columnConstructor:tr.ui.analysis.StringMemoryColumn}];Polymer('tr-ui-a-memory-dump-allocator-details-pane',{created:function(){this.memoryAllocatorDumps_=undefined;this.heapDumps_=undefined;this.aggregationMode_=undefined;},ready:function(){this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;},set memoryAllocatorDumps(memoryAllocatorDumps){this.memoryAllocatorDumps_=memoryAllocatorDumps;this.scheduleRebuildPane_();},get memoryAllocatorDumps(){return this.memoryAllocatorDumps_;},set heapDumps(heapDumps){this.heapDumps_=heapDumps;this.scheduleRebuildPane_();},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},rebuildPane_:function(){if(this.memoryAllocatorDumps_===undefined||this.memoryAllocatorDumps_.length===0){this.$.info_text.style.display='block';this.$.table.style.display='none';this.$.table.clear();this.$.table.rebuild();this.childPaneBuilder=undefined;return;}
+this.$.info_text.style.display='none';this.$.table.style.display='block';var rows=this.createRows_();var columns=this.createColumns_(rows);rows.forEach(function(rootRow){tr.ui.analysis.aggregateTableRowCellsRecursively(rootRow,columns,function(contexts){return contexts!==undefined&&contexts.some(function(context){return context===SUBALLOCATION_CONTEXT;});});});this.$.table.tableRows=rows;this.$.table.tableColumns=columns;this.$.table.rebuild();tr.ui.analysis.expandTableRowsRecursively(this.$.table);if(this.heapDumps_===undefined){this.childPaneBuilder=undefined;}else{this.childPaneBuilder=function(){var pane=document.createElement('tr-ui-a-memory-dump-heap-details-pane');pane.heapDumps=this.heapDumps_;pane.aggregationMode=this.aggregationMode_;return pane;}.bind(this);}},createRows_:function(){return[this.createAllocatorRowRecursively_(this.memoryAllocatorDumps_)];},createAllocatorRowRecursively_:function(dumps){var definedDump=tr.b.findFirstInArray(dumps);var title=definedDump.name;var fullName=definedDump.fullName;var numericCells=tr.ui.analysis.createCells(dumps,function(dump){return dump.numerics;});var diagnosticCells=tr.ui.analysis.createCells(dumps,function(dump){return dump.diagnostics;});var suballocatedBy=undefined;if(title.startsWith('__')){for(var i=0;i<dumps.length;i++){var dump=dumps[i];if(dump===undefined||dump.ownedBy.length===0){continue;}
+var ownerDump=dump.ownedBy[0].source;if(dump.ownedBy.length>1||dump.children.length>0||ownerDump.containerMemoryDump!==dump.containerMemoryDump){suballocatedBy=undefined;break;}
+if(suballocatedBy===undefined){suballocatedBy=ownerDump.fullName;}else if(suballocatedBy!==ownerDump.fullName){suballocatedBy=undefined;break;}}}
+var row={title:title,fullNames:[fullName],contexts:dumps,numericCells:numericCells,diagnosticCells:diagnosticCells,suballocatedBy:suballocatedBy};var childDumpNameToDumps=tr.b.invertArrayOfDicts(dumps,function(dump){return tr.b.arrayToDict(dump.children,function(child){return child.name;});});var subRows=[];var suballocationClassificationRootNode=undefined;tr.b.iterItems(childDumpNameToDumps,function(childName,childDumps){var childRow=this.createAllocatorRowRecursively_(childDumps);if(childRow.suballocatedBy===undefined){subRows.push(childRow);}else{suballocationClassificationRootNode=this.classifySuballocationRow_(childRow,suballocationClassificationRootNode);}},this);if(suballocationClassificationRootNode!==undefined){var suballocationRow=this.createSuballocationRowRecursively_('suballocations',suballocationClassificationRootNode);subRows.push(suballocationRow);}
+if(subRows.length>0)
+row.subRows=subRows;return row;},classifySuballocationRow_:function(suballocationRow,rootNode){if(rootNode===undefined){rootNode={children:{},row:undefined};}
+var suballocationLevels=suballocationRow.suballocatedBy.split('/');var currentNode=rootNode;for(var i=0;i<suballocationLevels.length;i++){var suballocationLevel=suballocationLevels[i];var nextNode=currentNode.children[suballocationLevel];if(nextNode===undefined){currentNode.children[suballocationLevel]=nextNode={children:{},row:undefined};}
+var currentNode=nextNode;}
+var existingRow=currentNode.row;if(existingRow!==undefined){for(var i=0;i<suballocationRow.contexts.length;i++){var newContext=suballocationRow.contexts[i];if(newContext===undefined)
+continue;if(existingRow.contexts[i]!==undefined)
+throw new Error('Multiple suballocations with the same owner name');existingRow.contexts[i]=newContext;['numericCells','diagnosticCells'].forEach(function(cellKey){var suballocationCells=suballocationRow[cellKey];if(suballocationCells===undefined)
+return;tr.b.iterItems(suballocationCells,function(cellName,cell){if(cell===undefined)
+return;var fields=cell.fields;if(fields===undefined)
+return;var field=fields[i];if(field===undefined)
+return;var existingCells=existingRow[cellKey];if(existingCells===undefined){existingCells={};existingRow[cellKey]=existingCells;}
+var existingCell=existingCells[cellName];if(existingCell===undefined){existingCell=new tr.ui.analysis.MemoryCell(new Array(fields.length));existingCells[cellName]=existingCell;}
+existingCell.fields[i]=field;});});}
+existingRow.fullNames.push.apply(existingRow.fullNames,suballocationRow.fullNames);}else{currentNode.row=suballocationRow;}
+return rootNode;},createSuballocationRowRecursively_:function(name,node){var childCount=Object.keys(node.children).length;if(childCount===0){if(node.row===undefined)
+throw new Error('Suballocation node must have a row or children');var row=node.row;row.title=name;row.suballocation=true;return row;}
+var subRows=tr.b.dictionaryValues(tr.b.mapItems(node.children,this.createSuballocationRowRecursively_,this));if(node.row!==undefined){var row=node.row;row.title='<unspecified>';row.suballocation=true;subRows.unshift(row);}
+var contexts=new Array(subRows[0].contexts.length);for(var i=0;i<subRows.length;i++){subRows[i].contexts.forEach(function(subContext,index){if(subContext!==undefined)
+contexts[index]=SUBALLOCATION_CONTEXT;});}
+return{title:name,suballocation:true,contexts:contexts,subRows:subRows};},createColumns_:function(rows){var titleColumn=new AllocatorDumpNameColumn();titleColumn.width='200px';var numericColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'numericCells',this.aggregationMode_,NUMERIC_COLUMN_RULES);var diagnosticColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'diagnosticCells',this.aggregationMode_,DIAGNOSTIC_COLUMN_RULES);var fieldColumns=numericColumns.concat(diagnosticColumns);tr.ui.analysis.MemoryColumn.spaceEqually(fieldColumns);var columns=[titleColumn].concat(fieldColumns);return columns;}});return{SUBALLOCATION_CONTEXT:SUBALLOCATION_CONTEXT,AllocatorDumpNameColumn:AllocatorDumpNameColumn,EffectiveSizeColumn:EffectiveSizeColumn,SizeColumn:SizeColumn};});'use strict';tr.exportTo('tr.ui.analysis',function(){var ScalarNumeric=tr.v.ScalarNumeric;var sizeInBytes_smallerIsBetter=tr.v.Unit.byName.sizeInBytes_smallerIsBetter;var CONSTANT_COLUMN_RULES=[{condition:'Start address',importance:0,columnConstructor:tr.ui.analysis.StringMemoryColumn}];var VARIABLE_COLUMN_RULES=[{condition:'Virtual size',importance:7,columnConstructor:tr.ui.analysis.NumericMemoryColumn},{condition:'Protection flags',importance:6,columnConstructor:tr.ui.analysis.StringMemoryColumn},{condition:'PSS',importance:5,columnConstructor:tr.ui.analysis.NumericMemoryColumn},{condition:'Private dirty',importance:4,columnConstructor:tr.ui.analysis.NumericMemoryColumn},{condition:'Private clean',importance:3,columnConstructor:tr.ui.analysis.NumericMemoryColumn},{condition:'Shared dirty',importance:2,columnConstructor:tr.ui.analysis.NumericMemoryColumn},{condition:'Shared clean',importance:1,columnConstructor:tr.ui.analysis.NumericMemoryColumn},{condition:'Swapped',importance:0,columnConstructor:tr.ui.analysis.NumericMemoryColumn}];var BYTE_STAT_COLUMN_MAP={'proportionalResident':'PSS','privateDirtyResident':'Private dirty','privateCleanResident':'Private clean','sharedDirtyResident':'Shared dirty','sharedCleanResident':'Shared clean','swapped':'Swapped'};function hexString(address,is64BitAddress){if(address===undefined)
+return undefined;var hexPadding=is64BitAddress?'0000000000000000':'00000000';return(hexPadding+address.toString(16)).substr(-hexPadding.length);}
+function pruneEmptyRuleRows(row){if(row.subRows===undefined||row.subRows.length===0)
+return;if(row.subRows[0].rule===undefined){return;}
+row.subRows.forEach(pruneEmptyRuleRows);row.subRows=row.subRows.filter(function(subRow){return subRow.subRows.length>0;});}
+Polymer('tr-ui-a-memory-dump-vm-regions-details-pane',{created:function(){this.vmRegions_=undefined;this.aggregationMode_=undefined;},ready:function(){this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;},set vmRegions(vmRegions){this.vmRegions_=vmRegions;this.scheduleRebuildPane_();},get vmRegions(){return this.vmRegions_;},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},rebuildPane_:function(){if(this.vmRegions_===undefined||this.vmRegions_.length===0){this.$.info_text.style.display='block';this.$.table.style.display='none';this.$.table.clear();this.$.table.rebuild();return;}
+this.$.info_text.style.display='none';this.$.table.style.display='block';var rows=this.createRows_(this.vmRegions_);var columns=this.createColumns_(rows);this.$.table.tableRows=rows;this.$.table.tableColumns=columns;this.$.table.rebuild();tr.ui.analysis.expandTableRowsRecursively(this.$.table);},createRows_:function(timeToVmRegionTree){var is64BitAddress=timeToVmRegionTree.some(function(vmRegionTree){if(vmRegionTree===undefined)
+return false;return vmRegionTree.someRegion(function(region){if(region.startAddress===undefined)
+return false;return region.startAddress>=4294967296;});});return[this.createClassificationNodeRow(timeToVmRegionTree,is64BitAddress)];},createClassificationNodeRow:function(timeToNode,is64BitAddress){var definedNode=tr.b.findFirstInArray(timeToNode);var childNodeIdToTimeToNode=tr.b.dictionaryValues(tr.b.invertArrayOfDicts(timeToNode,function(node){var children=node.children;if(children===undefined)
+return undefined;var childMap={};children.forEach(function(childNode){if(!childNode.hasRegions)
+return;childMap[childNode.title]=childNode;});return childMap;}));var childNodeSubRows=childNodeIdToTimeToNode.map(function(timeToChildNode){return this.createClassificationNodeRow(timeToChildNode,is64BitAddress);},this);var regionIdToTimeToRegion=tr.b.dictionaryValues(tr.b.invertArrayOfDicts(timeToNode,function(node){var regions=node.regions;if(regions===undefined)
+return undefined;return tr.b.arrayToDict(regions,function(region){return region.uniqueIdWithinProcess;});}));var regionSubRows=regionIdToTimeToRegion.map(function(timeToRegion){return this.createRegionRow_(timeToRegion,is64BitAddress);},this);var subRows=childNodeSubRows.concat(regionSubRows);return{title:definedNode.title,contexts:timeToNode,variableCells:this.createVariableCells_(timeToNode),subRows:subRows};},createRegionRow_:function(timeToRegion,is64BitAddress){var definedRegion=tr.b.findFirstInArray(timeToRegion);return{title:definedRegion.mappedFile,contexts:timeToRegion,constantCells:this.createConstantCells_(definedRegion,is64BitAddress),variableCells:this.createVariableCells_(timeToRegion)};},createConstantCells_:function(definedRegion,is64BitAddress){return tr.ui.analysis.createCells([definedRegion],function(region){var startAddress=region.startAddress;if(startAddress===undefined)
+return undefined;return{'Start address':hexString(startAddress,is64BitAddress)};});},createVariableCells_:function(timeToRegion){return tr.ui.analysis.createCells(timeToRegion,function(region){var fields={};var sizeInBytes=region.sizeInBytes;if(sizeInBytes!==undefined){fields['Virtual size']=new ScalarNumeric(sizeInBytes_smallerIsBetter,sizeInBytes);}
+var protectionFlags=region.protectionFlagsToString;if(protectionFlags!==undefined)
+fields['Protection flags']=protectionFlags;tr.b.iterItems(BYTE_STAT_COLUMN_MAP,function(byteStatName,columnName){var byteStat=region.byteStats[byteStatName];if(byteStat===undefined)
+return;fields[columnName]=new ScalarNumeric(sizeInBytes_smallerIsBetter,byteStat);});return fields;});},createColumns_:function(rows){var titleColumn=new tr.ui.analysis.TitleColumn('Mapped file');titleColumn.width='200px';var constantColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'constantCells',undefined,CONSTANT_COLUMN_RULES);var variableColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'variableCells',this.aggregationMode_,VARIABLE_COLUMN_RULES);var fieldColumns=constantColumns.concat(variableColumns);tr.ui.analysis.MemoryColumn.spaceEqually(fieldColumns);var columns=[titleColumn].concat(fieldColumns);return columns;}});return{};});'use strict';Polymer('tr-ui-b-color-legend',{ready:function(){var blackSquareCharCode=9632;this.$.square.innerText=String.fromCharCode(blackSquareCharCode);this.label_=undefined;this.compoundEventSelectionState_=tr.model.CompoundEventSelectionState.NOT_SELECTED;},set compoundEventSelectionState(compoundEventSelectionState){this.compoundEventSelectionState_=compoundEventSelectionState;},get label(){return this.label_;},set label(label){if(label===undefined){this.setLabelAndColorId(undefined,undefined);return;}
+var colorId=tr.b.ColorScheme.getColorIdForGeneralPurposeString(label);this.setLabelAndColorId(label,colorId);},setLabelAndColorId:function(label,colorId){this.label_=label;this.$.label.textContent='';this.$.label.appendChild(tr.ui.b.asHTMLOrTextNode(label));if(colorId===undefined)
+this.$.square.style.color='initial';else
+this.$.square.style.color=tr.b.ColorScheme.colorsAsStrings[colorId];}});'use strict';Polymer('tr-ui-b-view-specific-brushing-state',{get viewId(){return this.getAttribute('view-id');},set viewId(viewId){this.setAttribute('view-id',viewId);},get:function(){var viewId=this.viewId;if(!viewId)
+throw new Error('Element must have a view-id attribute!');var brushingStateController=tr.c.BrushingStateController.getControllerForElement(this);if(!brushingStateController)
+return undefined;return brushingStateController.getViewSpecificBrushingState(viewId);},set:function(state){var viewId=this.viewId;if(!viewId)
+throw new Error('Element must have a view-id attribute!');var brushingStateController=tr.c.BrushingStateController.getControllerForElement(this);if(!brushingStateController)
+return;brushingStateController.changeViewSpecificBrushingState(viewId,state);}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ColorScheme=tr.b.ColorScheme;var ScalarNumeric=tr.v.ScalarNumeric;var sizeInBytes_smallerIsBetter=tr.v.Unit.byName.sizeInBytes_smallerIsBetter;var PLATFORM_SPECIFIC_TOTAL_NAME_SUFFIX='_bytes';var DISPLAYED_SIZE_NUMERIC_NAME=tr.model.MemoryAllocatorDump.DISPLAYED_SIZE_NUMERIC_NAME;var SOME_TIMESTAMPS_INFO_QUANTIFIER=tr.ui.analysis.MemoryColumn.SOME_TIMESTAMPS_INFO_QUANTIFIER;var RIGHTWARDS_ARROW_WITH_HOOK=String.fromCharCode(0x21AA);var RIGHTWARDS_ARROW_FROM_BAR=String.fromCharCode(0x21A6);var GREATER_THAN_OR_EQUAL_TO=String.fromCharCode(0x2265);var UNMARRIED_PARTNERSHIP_SYMBOL=String.fromCharCode(0x26AF);var TRIGRAM_FOR_HEAVEN=String.fromCharCode(0x2630);function lazyMap(list,fn,opt_this){opt_this=opt_this||this;var result=undefined;list.forEach(function(item,index){var value=fn.call(opt_this,item,index);if(value===undefined)
+return;if(result===undefined)
+result=new Array(list.length);result[index]=value;});return result;}
+function ProcessNameColumn(){tr.ui.analysis.TitleColumn.call(this,'Process');}
+ProcessNameColumn.prototype={__proto__:tr.ui.analysis.TitleColumn.prototype,formatTitle:function(row){if(row.contexts===undefined)
+return row.title;var titleEl=document.createElement('tr-ui-b-color-legend');titleEl.label=row.title;return titleEl;}};function UsedMemoryColumn(name,cellPath,aggregationMode){tr.ui.analysis.NumericMemoryColumn.call(this,name,cellPath,aggregationMode);}
+UsedMemoryColumn.COLOR=ColorScheme.getColorForReservedNameAsString('used_memory_column');UsedMemoryColumn.OLDER_COLOR=ColorScheme.getColorForReservedNameAsString('older_used_memory_column');UsedMemoryColumn.prototype={__proto__:tr.ui.analysis.NumericMemoryColumn.prototype,get title(){return tr.ui.b.createSpan({textContent:this.name,color:UsedMemoryColumn.COLOR});},color:function(numerics,processMemoryDumps){return UsedMemoryColumn.COLOR;},getChildPaneBuilder:function(processMemoryDumps){if(processMemoryDumps===undefined)
+return undefined;var vmRegions=lazyMap(processMemoryDumps,function(pmd){if(pmd===undefined)
+return undefined;return pmd.mostRecentVmRegions;});if(vmRegions===undefined)
+return undefined;return function(){var pane=document.createElement('tr-ui-a-memory-dump-vm-regions-details-pane');pane.vmRegions=vmRegions;pane.aggregationMode=this.aggregationMode;return pane;}.bind(this);}};function PeakMemoryColumn(name,cellPath,aggregationMode){UsedMemoryColumn.call(this,name,cellPath,aggregationMode);}
+PeakMemoryColumn.prototype={__proto__:UsedMemoryColumn.prototype,addInfos:function(numerics,processMemoryDumps,infos){if(processMemoryDumps===undefined)
+return;var resettableValueCount=0;var nonResettableValueCount=0;for(var i=0;i<numerics.length;i++){if(numerics[i]===undefined)
+continue;if(processMemoryDumps[i].arePeakResidentBytesResettable)
+resettableValueCount++;else
+nonResettableValueCount++;}
+if(resettableValueCount>0&&nonResettableValueCount>0){infos.push(tr.ui.analysis.createWarningInfo('Both resettable and '+'non-resettable peak RSS values were provided by the process'));}else if(resettableValueCount>0){infos.push({icon:RIGHTWARDS_ARROW_WITH_HOOK,message:'Peak RSS since previous memory dump.'});}else{infos.push({icon:RIGHTWARDS_ARROW_FROM_BAR,message:'Peak RSS since process startup. Finer grained '+'peaks require a Linux kernel version '+
+GREATER_THAN_OR_EQUAL_TO+' 4.0.'});}}};function ByteStatColumn(name,cellPath,aggregationMode){UsedMemoryColumn.call(this,name,cellPath,aggregationMode);}
+ByteStatColumn.prototype={__proto__:UsedMemoryColumn.prototype,color:function(numerics,processMemoryDumps){if(processMemoryDumps===undefined)
+return UsedMemoryColumn.COLOR;var allOlderValues=processMemoryDumps.every(function(processMemoryDump){if(processMemoryDump===undefined)
+return true;return!processMemoryDump.hasOwnVmRegions;});if(allOlderValues)
+return UsedMemoryColumn.OLDER_COLOR;else
+return UsedMemoryColumn.COLOR;},addInfos:function(numerics,processMemoryDumps,infos){if(processMemoryDumps===undefined)
+return;var olderValueCount=0;for(var i=0;i<numerics.length;i++){var processMemoryDump=processMemoryDumps[i];if(processMemoryDump!==undefined&&!processMemoryDump.hasOwnVmRegions){olderValueCount++;}}
+if(olderValueCount===0)
+return;var infoQuantifier=olderValueCount<numerics.length?' '+SOME_TIMESTAMPS_INFO_QUANTIFIER:'';infos.push({message:'Older value'+infoQuantifier+' (only heavy (purple) memory dumps contain memory maps).',icon:UNMARRIED_PARTNERSHIP_SYMBOL});}};UsedMemoryColumn.RULES=[{condition:'Total resident',importance:10,columnConstructor:UsedMemoryColumn},{condition:'Peak total resident',importance:9,columnConstructor:PeakMemoryColumn},{condition:'PSS',importance:8,columnConstructor:ByteStatColumn},{condition:'Private dirty',importance:7,columnConstructor:ByteStatColumn},{condition:'Swapped',importance:6,columnConstructor:ByteStatColumn},{importance:0,columnConstructor:UsedMemoryColumn}];UsedMemoryColumn.TOTALS_MAP={'residentBytes':'Total resident','peakResidentBytes':'Peak total resident'};UsedMemoryColumn.BYTE_STAT_MAP={'proportionalResident':'PSS','privateDirtyResident':'Private dirty','swapped':'Swapped'};function AllocatorColumn(name,cellPath,aggregationMode){tr.ui.analysis.NumericMemoryColumn.call(this,name,cellPath,aggregationMode);}
+AllocatorColumn.prototype={__proto__:tr.ui.analysis.NumericMemoryColumn.prototype,get title(){var titleEl=document.createElement('tr-ui-b-color-legend');titleEl.label=this.name;return titleEl;},addInfos:function(numerics,processMemoryDumps,infos){if(processMemoryDumps===undefined)
+return;var heapDumpCount=0;for(var i=0;i<processMemoryDumps.length;i++){var processMemoryDump=processMemoryDumps[i];if(processMemoryDump===undefined)
+continue;var heapDumps=processMemoryDump.heapDumps;if(heapDumps===undefined)
+continue;if(heapDumps[this.name]!==undefined)
+heapDumpCount++;}
+if(heapDumpCount===0)
+return;var infoQuantifier=heapDumpCount<numerics.length?' '+SOME_TIMESTAMPS_INFO_QUANTIFIER:'';infos.push({message:'Heap dump provided'+infoQuantifier+'.',icon:TRIGRAM_FOR_HEAVEN});},getChildPaneBuilder:function(processMemoryDumps){if(processMemoryDumps===undefined)
+return undefined;var memoryAllocatorDumps=lazyMap(processMemoryDumps,function(pmd){if(pmd===undefined)
+return undefined;return pmd.getMemoryAllocatorDumpByFullName(this.name);},this);if(memoryAllocatorDumps===undefined)
+return undefined;var heapDumps=lazyMap(processMemoryDumps,function(pmd){if(pmd===undefined||pmd.heapDumps===undefined)
+return undefined;return pmd.heapDumps[this.name];},this);return function(){var pane=document.createElement('tr-ui-a-memory-dump-allocator-details-pane');pane.memoryAllocatorDumps=memoryAllocatorDumps;pane.heapDumps=heapDumps;pane.aggregationMode=this.aggregationMode;return pane;}.bind(this);}};function TracingColumn(name,cellPath,aggregationMode){AllocatorColumn.call(this,name,cellPath,aggregationMode);}
+TracingColumn.COLOR=ColorScheme.getColorForReservedNameAsString('tracing_memory_column');TracingColumn.prototype={__proto__:AllocatorColumn.prototype,get title(){return tr.ui.b.createSpan({textContent:this.name,color:TracingColumn.COLOR});},color:function(numerics,processMemoryDumps){return TracingColumn.COLOR;}};AllocatorColumn.RULES=[{condition:'tracing',importance:0,columnConstructor:TracingColumn},{importance:1,columnConstructor:AllocatorColumn}];Polymer('tr-ui-a-memory-dump-overview-pane',{created:function(){this.processMemoryDumps_=undefined;this.aggregationMode_=undefined;},ready:function(){this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.CELL;this.$.table.addEventListener('selection-changed',function(tableEvent){tableEvent.stopPropagation();this.changeChildPane_();}.bind(this));},set processMemoryDumps(processMemoryDumps){this.processMemoryDumps_=processMemoryDumps;this.scheduleRebuildPane_();},get processMemoryDumps(){return this.processMemoryDumps_;},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},get selectedMemoryCell(){if(this.processMemoryDumps_===undefined||this.processMemoryDumps_.length===0){return undefined;}
+var selectedTableRow=this.$.table.selectedTableRow;if(!selectedTableRow)
+return undefined;var selectedColumnIndex=this.$.table.selectedColumnIndex;if(selectedColumnIndex===undefined)
+return undefined;var selectedColumn=this.$.table.tableColumns[selectedColumnIndex];var selectedMemoryCell=selectedColumn.cell(selectedTableRow);return selectedMemoryCell;},changeChildPane_:function(){this.storeSelection_();this.childPaneBuilder=this.determineChildPaneBuilderFromSelection_();},determineChildPaneBuilderFromSelection_:function(){if(this.processMemoryDumps_===undefined||this.processMemoryDumps_.length===0){return undefined;}
+var selectedTableRow=this.$.table.selectedTableRow;if(!selectedTableRow)
+return undefined;var selectedColumnIndex=this.$.table.selectedColumnIndex;if(selectedColumnIndex===undefined)
+return undefined;var selectedColumn=this.$.table.tableColumns[selectedColumnIndex];return selectedColumn.getChildPaneBuilder(selectedTableRow.contexts);},rebuildPane_:function(){if(this.processMemoryDumps_===undefined||this.processMemoryDumps_.length===0){this.$.info_text.style.display='block';this.$.table.style.display='none';this.$.table.clear();this.$.table.rebuild();return;}
+this.$.info_text.style.display='none';this.$.table.style.display='block';var rows=this.createRows_();var columns=this.createColumns_(rows);var footerRows=this.createFooterRows_(rows,columns);this.$.table.tableRows=rows;this.$.table.footerRows=footerRows;this.$.table.tableColumns=columns;this.$.table.rebuild();this.restoreSelection_();},createRows_:function(){var timeToPidToProcessMemoryDump=this.processMemoryDumps_;var pidToTimeToProcessMemoryDump=tr.b.invertArrayOfDicts(timeToPidToProcessMemoryDump);return tr.b.dictionaryValues(tr.b.mapItems(pidToTimeToProcessMemoryDump,function(pid,timeToDump){var process=tr.b.findFirstInArray(timeToDump).process;var usedMemoryCells=tr.ui.analysis.createCells(timeToDump,function(dump){var sizes={};var totals=dump.totals;if(totals!==undefined){tr.b.iterItems(UsedMemoryColumn.TOTALS_MAP,function(totalName,cellName){var total=totals[totalName];if(total===undefined)
+return;sizes[cellName]=new ScalarNumeric(sizeInBytes_smallerIsBetter,total);});var platformSpecific=totals.platformSpecific;if(platformSpecific!==undefined){tr.b.iterItems(platformSpecific,function(name,size){if(name.endsWith(PLATFORM_SPECIFIC_TOTAL_NAME_SUFFIX)){name=name.substring(0,name.length-
+PLATFORM_SPECIFIC_TOTAL_NAME_SUFFIX.length);}
+name=name.replace('_',' ').trim();name=name.charAt(0).toUpperCase()+name.slice(1);sizes[name]=new ScalarNumeric(sizeInBytes_smallerIsBetter,size);});}}
+var vmRegions=dump.mostRecentVmRegions;if(vmRegions!==undefined){tr.b.iterItems(UsedMemoryColumn.BYTE_STAT_MAP,function(byteStatName,cellName){var byteStat=vmRegions.byteStats[byteStatName];if(byteStat===undefined)
+return;sizes[cellName]=new ScalarNumeric(sizeInBytes_smallerIsBetter,byteStat);});}
+return sizes;});var allocatorCells=tr.ui.analysis.createCells(timeToDump,function(dump){var memoryAllocatorDumps=dump.memoryAllocatorDumps;if(memoryAllocatorDumps===undefined)
+return undefined;var sizes={};memoryAllocatorDumps.forEach(function(allocatorDump){var rootDisplayedSizeNumeric=allocatorDump.numerics[DISPLAYED_SIZE_NUMERIC_NAME];if(rootDisplayedSizeNumeric!==undefined)
+sizes[allocatorDump.fullName]=rootDisplayedSizeNumeric;});return sizes;});return{title:process.userFriendlyName,contexts:timeToDump,usedMemoryCells:usedMemoryCells,allocatorCells:allocatorCells};}));},createFooterRows_:function(rows,columns){if(rows.length<=1)
+return[];var totalRow={title:'Total'};tr.ui.analysis.aggregateTableRowCells(totalRow,rows,columns);return[totalRow];},createColumns_:function(rows){var titleColumn=new ProcessNameColumn();titleColumn.width='200px';var usedMemorySizeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'usedMemoryCells',this.aggregationMode_,UsedMemoryColumn.RULES);var allocatorSizeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'allocatorCells',this.aggregationMode_,AllocatorColumn.RULES);var sizeColumns=usedMemorySizeColumns.concat(allocatorSizeColumns);tr.ui.analysis.MemoryColumn.spaceEqually(sizeColumns);var columns=[titleColumn].concat(sizeColumns);return columns;},storeSelection_:function(){var selectedRowTitle;var selectedRow=this.$.table.selectedTableRow;if(selectedRow!==undefined)
+selectedRowTitle=selectedRow.title;var selectedColumnName;var selectedColumnIndex=this.$.table.selectedColumnIndex;if(selectedColumnIndex!==undefined){var selectedColumn=this.$.table.tableColumns[selectedColumnIndex];selectedColumnName=selectedColumn.name;}
+this.$.state.set({rowTitle:selectedRowTitle,columnName:selectedColumnName});},restoreSelection_:function(){var settings=this.$.state.get();if(settings===undefined||settings.rowTitle===undefined||settings.columnName===undefined)
+return;var selectedColumnName=settings.columnName;var selectedColumnIndex=tr.b.findFirstIndexInArray(this.$.table.tableColumns,function(column){return column.name===selectedColumnName;});if(selectedColumnIndex<0)
+return;var selectedRowTitle=settings.rowTitle;var selectedRow=tr.b.findFirstInArray(this.$.table.tableRows,function(row){return row.title===selectedRowTitle;});if(selectedRow===undefined)
+return;this.$.table.selectedTableRow=selectedRow;this.$.table.selectedColumnIndex=selectedColumnIndex;}});return{ProcessNameColumn:ProcessNameColumn,UsedMemoryColumn:UsedMemoryColumn,PeakMemoryColumn:PeakMemoryColumn,ByteStatColumn:ByteStatColumn,AllocatorColumn:AllocatorColumn,TracingColumn:TracingColumn};});'use strict';tr.exportTo('tr.ui.analysis',function(){Polymer('tr-ui-a-memory-dump-header-pane',{created:function(){this.containerMemoryDumps_=undefined;},ready:function(){this.$.aggregation_mode_container.appendChild(tr.ui.b.createSelector(this,'aggregationMode','memoryDumpHeaderPane.aggregationMode',tr.ui.analysis.MemoryColumn.AggregationMode.DIFF,[{label:'Diff',value:tr.ui.analysis.MemoryColumn.AggregationMode.DIFF},{label:'Max',value:tr.ui.analysis.MemoryColumn.AggregationMode.MAX}]));},set containerMemoryDumps(containerMemoryDumps){this.containerMemoryDumps_=containerMemoryDumps;this.scheduleRebuildPane_();},get containerMemoryDumps(){return this.containerMemoryDumps_;},set aggregationMode(aggregationMode){this.aggregationMode_=aggregationMode;this.scheduleRebuildPane_();},get aggregationMode(){return this.aggregationMode_;},rebuildPane_:function(){this.updateLabel_();this.updateAggregationModeSelector_();this.changeChildPane_();},updateLabel_:function(){this.$.label.textContent='';if(this.containerMemoryDumps_===undefined||this.containerMemoryDumps_.length<=0){this.$.label.textContent='No memory dumps selected';return;}
+var containerDumpCount=this.containerMemoryDumps_.length;var isMultiSelection=containerDumpCount>1;this.$.label.appendChild(document.createTextNode('Selected '+containerDumpCount+' memory dump'+
+(isMultiSelection?'s':'')+' in '+this.containerMemoryDumps_[0].containerName+' at '));this.$.label.appendChild(document.createTextNode(tr.v.Unit.byName.timeStampInMs.format(this.containerMemoryDumps_[0].start)));if(isMultiSelection){var ELLIPSIS=String.fromCharCode(8230);this.$.label.appendChild(document.createTextNode(ELLIPSIS));this.$.label.appendChild(document.createTextNode(tr.v.Unit.byName.timeStampInMs.format(this.containerMemoryDumps_[containerDumpCount-1].start)));}},updateAggregationModeSelector_:function(){var displayStyle;if(this.containerMemoryDumps_===undefined||this.containerMemoryDumps_.length<=1)
+displayStyle='none';else
+displayStyle='initial';this.$.aggregation_mode_container.style.display=displayStyle;},changeChildPane_:function(){this.childPaneBuilder=function(){if(this.containerMemoryDumps_===undefined||this.containerMemoryDumps_.length<=0)
+return undefined;var overviewPane=document.createElement('tr-ui-a-memory-dump-overview-pane');overviewPane.processMemoryDumps=this.containerMemoryDumps_.map(function(containerDump){return containerDump.processMemoryDumps;});overviewPane.aggregationMode=this.aggregationMode;return overviewPane;}.bind(this);}});return{};});'use strict';Polymer('tr-ui-a-stacked-pane-view',{setPaneBuilder:function(paneBuilder,opt_parentPane){var paneContainer=this.$.pane_container;if(opt_parentPane){if(!(opt_parentPane instanceof HTMLElement))
+throw new Error('Parent pane must be an HTML element');if(opt_parentPane.parentElement!==paneContainer)
+throw new Error('Parent pane must be a child of the pane container');}
+while(paneContainer.lastElementChild!==null&&paneContainer.lastElementChild!==opt_parentPane){var removedPane=this.$.pane_container.lastElementChild;var listener=this.listeners_.get(removedPane);if(listener===undefined)
+throw new Error('No listener associated with pane');this.listeners_.delete(removedPane);removedPane.removeEventListener('request-child-pane-change',listener);paneContainer.removeChild(removedPane);}
+if(opt_parentPane&&opt_parentPane.parentElement!==paneContainer)
+throw new Error('Parent pane was removed from the pane container');if(!paneBuilder)
+return;var pane=paneBuilder();if(!pane)
+return;if(!(pane instanceof HTMLElement))
+throw new Error('Pane must be an HTML element');var listener=function(event){this.setPaneBuilder(pane.childPaneBuilder,pane);}.bind(this);if(!this.listeners_){this.listeners_=new WeakMap();}
+this.listeners_.set(pane,listener);pane.addEventListener('request-child-pane-change',listener);paneContainer.appendChild(pane);pane.appended();},rebuild:function(){var currentPane=this.$.pane_container.firstElementChild;while(currentPane){currentPane.rebuild();currentPane=currentPane.nextElementSibling;}},get panesForTesting(){var panes=[];var currentChild=this.$.pane_container.firstElementChild;while(currentChild){panes.push(currentChild);currentChild=currentChild.nextElementSibling;}
+return panes;}});'use strict';tr.exportTo('tr.ui.analysis',function(){Polymer('tr-ui-a-container-memory-dump-sub-view',{set selection(selection){if(selection===undefined){this.currentSelection_=undefined;this.dumpsByContainerName_=undefined;this.updateContents_();return;}
+selection.forEach(function(event){if(!(event instanceof tr.model.ContainerMemoryDump)){throw new Error('Memory dump sub-view only supports container memory dumps');}});this.currentSelection_=selection;this.dumpsByContainerName_=tr.b.group(this.currentSelection_.toArray(),function(dump){return dump.containerName;});tr.b.iterItems(this.dumpsByContainerName_,function(containerName,dumps){dumps.sort(function(a,b){return a.start-b.start;});});this.updateContents_();},get selection(){return this.currentSelection_;},get requiresTallView(){return true;},updateContents_:function(){this.$.content.textContent='';if(this.dumpsByContainerName_===undefined)
+return;var containerNames=Object.keys(this.dumpsByContainerName_);if(containerNames.length===0)
+return;if(containerNames.length>1)
+this.buildViewForMultipleContainerNames_();else
+this.buildViewForSingleContainerName_();},buildViewForSingleContainerName_:function(){var containerMemoryDumps=tr.b.dictionaryValues(this.dumpsByContainerName_)[0];var dumpView=this.ownerDocument.createElement('tr-ui-a-stacked-pane-view');this.$.content.appendChild(dumpView);dumpView.setPaneBuilder(function(){var headerPane=document.createElement('tr-ui-a-memory-dump-header-pane');headerPane.containerMemoryDumps=containerMemoryDumps;return headerPane;});},buildViewForMultipleContainerNames_:function(){var ownerDocument=this.ownerDocument;var rows=tr.b.dictionaryValues(tr.b.mapItems(this.dumpsByContainerName_,function(containerName,dumps){return{containerName:containerName,subRows:dumps,isExpanded:true};}));rows.sort(function(a,b){return a.containerName.localeCompare(b.containerName);});var columns=[{title:'Dump',value:function(row){if(row.subRows===undefined)
+return this.singleDumpValue_(row);else
+return this.groupedDumpValue_(row);},singleDumpValue_:function(row){var linkEl=ownerDocument.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(new tr.model.EventSet([row]));linkEl.appendChild(tr.v.ui.createScalarSpan(row.start,{unit:tr.v.Unit.byName.timeStampInMs,ownerDocument:ownerDocument}));return linkEl;},groupedDumpValue_:function(row){var linkEl=ownerDocument.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(new tr.model.EventSet(row.subRows));linkEl.appendChild(tr.ui.b.createSpan({ownerDocument:ownerDocument,textContent:row.subRows.length+' memory dump'+
+(row.subRows.length===1?'':'s')+' in '}));linkEl.appendChild(tr.ui.b.createSpan({ownerDocument:ownerDocument,textContent:row.containerName,bold:true}));return linkEl;}}];var table=this.ownerDocument.createElement('tr-ui-b-table');table.tableColumns=columns;table.tableRows=rows;table.showHeader=false;table.rebuild();this.$.content.appendChild(table);}});return{};});'use strict';(function(){var COUNTER_SAMPLE_TABLE_COLUMNS=[{title:'Counter',width:'150px',value:function(row){return row.counter;}},{title:'Series',width:'150px',value:function(row){return row.series;}},{title:'Time',width:'150px',value:function(row){return row.start;}},{title:'Value',width:'100%',value:function(row){return row.value;}}];Polymer('tr-ui-a-counter-sample-sub-view',{ready:function(){this.currentSelection_=undefined;this.$.table.tableColumns=COUNTER_SAMPLE_TABLE_COLUMNS;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;this.updateContents_();},updateContents_:function(){this.$.table.tableRows=this.selection?this.getRows_(this.selection.toArray()):[];this.$.table.rebuild();},getRows_:function(samples){var samplesByCounter=tr.b.group(samples,function(sample){return sample.series.counter.guid;});var rows=[];tr.b.iterItems(samplesByCounter,function(unused,counterSamples){var samplesBySeries=tr.b.group(counterSamples,function(sample){return sample.series.guid;});tr.b.iterItems(samplesBySeries,function(unused,seriesSamples){var seriesRows=this.getRowsForSamples_(seriesSamples);seriesRows[0].counter=seriesSamples[0].series.counter.name;seriesRows[0].series=seriesSamples[0].series.name;if(seriesRows.length>1){seriesRows[0].subRows=seriesRows.slice(1);seriesRows[0].isExpanded=true;}
+rows.push(seriesRows[0]);},this);},this);return rows;},getRowsForSamples_:function(samples){return samples.map(function(sample){return{start:sample.timestamp,value:sample.value};});}});})();'use strict';tr.exportTo('tr.ui.analysis',function(){Polymer('tr-ui-a-layout-tree-sub-view',{set selection(selection){this.currentSelection_=selection;this.updateContents_();},get selection(){return this.currentSelection_;},updateContents_:function(){this.$.content.textContent='';if(!this.currentSelection_)
+return;var columns=[{title:'Tag/Name',value:function(layoutObject){return layoutObject.tag||':'+layoutObject.name;}},{title:'htmlId',value:function(layoutObject){return layoutObject.htmlId||'';}},{title:'classNames',value:function(layoutObject){return layoutObject.classNames||'';}},{title:'reasons',value:function(layoutObject){return layoutObject.needsLayoutReasons.join(', ');}},{title:'width',value:function(layoutObject){return layoutObject.absoluteRect.width;}},{title:'height',value:function(layoutObject){return layoutObject.absoluteRect.height;}},{title:'absX',value:function(layoutObject){return layoutObject.absoluteRect.left;}},{title:'absY',value:function(layoutObject){return layoutObject.absoluteRect.top;}},{title:'relX',value:function(layoutObject){return layoutObject.relativeRect.left;}},{title:'relY',value:function(layoutObject){return layoutObject.relativeRect.top;}},{title:'float',value:function(layoutObject){return layoutObject.isFloat?'float':'';}},{title:'positioned',value:function(layoutObject){return layoutObject.isPositioned?'positioned':'';}},{title:'relative',value:function(layoutObject){return layoutObject.isRelativePositioned?'relative':'';}},{title:'sticky',value:function(layoutObject){return layoutObject.isStickyPositioned?'sticky':'';}},{title:'anonymous',value:function(layoutObject){return layoutObject.isAnonymous?'anonymous':'';}},{title:'row',value:function(layoutObject){if(layoutObject.tableRow===undefined)
+return'';return layoutObject.tableRow;}},{title:'col',value:function(layoutObject){if(layoutObject.tableCol===undefined)
+return'';return layoutObject.tableCol;}},{title:'rowSpan',value:function(layoutObject){if(layoutObject.tableRowSpan===undefined)
+return'';return layoutObject.tableRowSpan;}},{title:'colSpan',value:function(layoutObject){if(layoutObject.tableColSpan===undefined)
+return'';return layoutObject.tableColSpan;}},{title:'address',value:function(layoutObject){return layoutObject.id.toString(16);}}];var table=this.ownerDocument.createElement('tr-ui-b-table');table.defaultExpansionStateCallback=function(layoutObject,parentLayoutObject){return true;};table.subRowsPropertyName='childLayoutObjects';table.tableColumns=columns;table.tableRows=this.currentSelection_.map(function(snapshot){return snapshot.rootLayoutObject;});table.rebuild();this.$.content.appendChild(table);}});return{};});'use strict';Polymer('tr-ui-a-selection-summary-table',{created:function(){this.selection_=new tr.b.Range();},ready:function(){this.$.table.showHeader=false;this.$.table.tableColumns=[{title:'Name',value:function(row){return row.title;},width:'350px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;this.updateContents_();},updateContents_:function(){var selection=this.selection_;var rows=[];var hasRange;if(this.selection_&&(!selection.bounds.isEmpty))
+hasRange=true;else
+hasRange=false;rows.push({title:'Selection start',value:hasRange?tr.v.ui.createScalarSpan(selection.bounds.min,{unit:tr.v.Unit.byName.timeStampInMs,ownerDocument:this.ownerDocument}):'<empty>'});rows.push({title:'Selection extent',value:hasRange?tr.v.ui.createScalarSpan(selection.bounds.range,{unit:tr.v.Unit.byName.timeDurationInMs,ownerDocument:this.ownerDocument}):'<empty>'});this.$.table.tableRows=rows;this.$.table.rebuild();}});'use strict';tr.exportTo('tr.ui.analysis',function(){function MultiEventSummary(title,events){this.title=title;this.duration_=undefined;this.selfTime_=undefined;this.events_=events;this.cpuTimesComputed_=false;this.cpuSelfTime_=undefined;this.cpuDuration_=undefined;this.maxDuration_=undefined;this.maxCpuDuration_=undefined;this.maxSelfTime_=undefined;this.maxCpuSelfTime_=undefined;this.untotallableArgs_=[];this.totalledArgs_=undefined;};MultiEventSummary.prototype={set title(title){if(title=='Totals')
+this.totalsRow=true;this.title_=title;},get title(){return this.title_;},get duration(){if(this.duration_===undefined){this.duration_=tr.b.Statistics.sum(this.events_,function(event){return event.duration;});}
+return this.duration_;},get cpuSelfTime(){this.computeCpuTimesIfNeeded_();return this.cpuSelfTime_;},get cpuDuration(){this.computeCpuTimesIfNeeded_();return this.cpuDuration_;},computeCpuTimesIfNeeded_:function(){if(this.cpuTimesComputed_)
+return;this.cpuTimesComputed_=true;var cpuSelfTime=0;var cpuDuration=0;var hasCpuData=false;for(var i=0;i<this.events_.length;i++){var event=this.events_[i];if(event.cpuDuration!==undefined){cpuDuration+=event.cpuDuration;hasCpuData=true;}
+if(event.cpuSelfTime!==undefined){cpuSelfTime+=event.cpuSelfTime;hasCpuData=true;}}
+if(hasCpuData){this.cpuDuration_=cpuDuration;this.cpuSelfTime_=cpuSelfTime;}},get selfTime(){if(this.selfTime_===undefined){this.selfTime_=0;for(var i=0;i<this.events_.length;i++){if(this.events_[i].selfTime!==undefined)
+this.selfTime_+=this.events[i].selfTime;}}
+return this.selfTime_;},get events(){return this.events_;},get numEvents(){return this.events_.length;},get numAlerts(){if(this.numAlerts_===undefined){this.numAlerts_=tr.b.Statistics.sum(this.events_,function(event){return event.associatedAlerts.length;});}
+return this.numAlerts_;},get untotallableArgs(){this.updateArgsIfNeeded_();return this.untotallableArgs_;},get totalledArgs(){this.updateArgsIfNeeded_();return this.totalledArgs_;},get maxDuration(){if(this.maxDuration_===undefined){this.maxDuration_=tr.b.Statistics.max(this.events_,function(event){return event.duration;});}
+return this.maxDuration_;},get maxCpuDuration(){if(this.maxCpuDuration_===undefined){this.maxCpuDuration_=tr.b.Statistics.max(this.events_,function(event){return event.cpuDuration;});}
+return this.maxCpuDuration_;},get maxSelfTime(){if(this.maxSelfTime_===undefined){this.maxSelfTime_=tr.b.Statistics.max(this.events_,function(event){return event.selfTime;});}
+return this.maxSelfTime_;},get maxCpuSelfTime(){if(this.maxCpuSelfTime_===undefined){this.maxCpuSelfTime_=tr.b.Statistics.max(this.events_,function(event){return event.cpuSelfTime;});}
+return this.maxCpuSelfTime_;},updateArgsIfNeeded_:function(){if(this.totalledArgs_!==undefined)
+return;var untotallableArgs={};var totalledArgs={};for(var i=0;i<this.events_.length;i++){var event=this.events_[i];for(var argName in event.args){var argVal=event.args[argName];var type=typeof argVal;if(type!=='number'){untotallableArgs[argName]=true;delete totalledArgs[argName];continue;}
+if(untotallableArgs[argName]){continue;}
+if(totalledArgs[argName]===undefined)
+totalledArgs[argName]=0;totalledArgs[argName]+=argVal;}}
+this.untotallableArgs_=tr.b.dictionaryKeys(untotallableArgs);this.totalledArgs_=totalledArgs;}};return{MultiEventSummary:MultiEventSummary};});'use strict';Polymer('tr-ui-a-multi-event-summary-table',{ready:function(){this.showTotals_=false;this.eventsHaveDuration_=true;this.eventsHaveSubRows_=true;this.eventsByTitle_=undefined;},updateTableColumns_:function(rows,maxValues){var hasCpuData=false;var hasAlerts=false;rows.forEach(function(row){if(row.cpuDuration!==undefined)
+hasCpuData=true;if(row.cpuSelfTime!==undefined)
+hasCpuData=true;if(row.numAlerts)
+hasAlerts=true;});var ownerDocument=this.ownerDocument;var columns=[];columns.push({title:'Name',value:function(row){if(row.title==='Totals')
+return'Totals';var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(row.events);},row.title);return linkEl;},width:'350px',cmp:function(rowA,rowB){return rowA.title.localeCompare(rowB.title);}});if(this.eventsHaveDuration_){columns.push({title:'Wall Duration',value:function(row){return tr.v.ui.createScalarSpan(row.duration,{unit:tr.v.Unit.byName.timeDurationInMs,total:row.totalsRow?undefined:maxValues.duration,ownerDocument:ownerDocument,rightAlign:true});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.duration-rowB.duration;}});}
+if(this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Duration',value:function(row){return tr.v.ui.createScalarSpan(row.cpuDuration,{unit:tr.v.Unit.byName.timeDurationInMs,total:row.totalsRow?undefined:maxValues.cpuDuration,ownerDocument:ownerDocument,rightAlign:true});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuDuration-rowB.cpuDuration;}});}
+if(this.eventsHaveSubRows_&&this.eventsHaveDuration_){columns.push({title:'Self time',value:function(row){return tr.v.ui.createScalarSpan(row.selfTime,{unit:tr.v.Unit.byName.timeDurationInMs,total:row.totalsRow?undefined:maxValues.selfTime,ownerDocument:ownerDocument,rightAlign:true});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.selfTime-rowB.selfTime;}});}
+if(this.eventsHaveSubRows_&&this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Self Time',value:function(row){return tr.v.ui.createScalarSpan(row.cpuSelfTime,{unit:tr.v.Unit.byName.timeDurationInMs,total:row.totalsRow?undefined:maxValues.cpuSelfTime,ownerDocument:ownerDocument,rightAlign:true});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuSelfTime-rowB.cpuSelfTime;}});}
+columns.push({title:'Occurrences',value:function(row){return row.numEvents;},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.numEvents-rowB.numEvents;}});var alertsColumnIndex;if(hasAlerts){columns.push({title:'Num Alerts',value:function(row){return row.numAlerts;},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.numAlerts-rowB.numAlerts;}});alertsColumnIndex=columns.length-1;}
+var colWidthPercentage;if(columns.length==1)
+colWidthPercentage='100%';else
+colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';for(var i=1;i<columns.length;i++)
+columns[i].width=colWidthPercentage;this.$.table.tableColumns=columns;if(hasAlerts){this.$.table.sortColumnIndex=alertsColumnIndex;this.$.table.sortDescending=true;}},configure:function(config){if(config.eventsByTitle===undefined)
+throw new Error('Required: eventsByTitle');if(config.showTotals!==undefined)
+this.showTotals_=config.showTotals;else
+this.showTotals_=true;if(config.eventsHaveDuration!==undefined)
+this.eventsHaveDuration_=config.eventsHaveDuration;else
+this.eventsHaveDuration_=true;if(config.eventsHaveSubRows!==undefined)
+this.eventsHaveSubRows_=config.eventsHaveSubRows;else
+this.eventsHaveSubRows_=true;this.eventsByTitle_=config.eventsByTitle;this.updateContents_();},get showTotals(){return this.showTotals_;},set showTotals(showTotals){this.showTotals_=showTotals;this.updateContents_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows_;},set eventsHaveSubRows(eventsHaveSubRows){this.eventsHaveSubRows_=eventsHaveSubRows;this.updateContents_();},get eventsByTitle(){return this.eventsByTitle_;},set eventsByTitle(eventsByTitle){this.eventsByTitle_=eventsByTitle;this.updateContents_();},get selectionBounds(){return this.selectionBounds_;},set selectionBounds(selectionBounds){this.selectionBounds_=selectionBounds;this.updateContents_();},updateContents_:function(){var eventsByTitle;if(this.eventsByTitle_!==undefined)
+eventsByTitle=this.eventsByTitle_;else
+eventsByTitle=[];var allEvents=[];var rows=[];tr.b.iterItems(eventsByTitle,function(title,eventsOfSingleTitle){allEvents.push.apply(allEvents,eventsOfSingleTitle);var row=new tr.ui.analysis.MultiEventSummary(title,eventsOfSingleTitle);rows.push(row);});this.updateTableColumns_(rows);this.$.table.tableRows=rows;var maxValues={duration:undefined,selfTime:undefined,cpuSelfTime:undefined,cpuDuration:undefined};if(this.eventsHaveDuration){for(var column in maxValues){maxValues[column]=tr.b.Statistics.max(rows,function(event){return event[column];});}}
+var footerRows=[];if(this.showTotals_){var multiEventSummary=new tr.ui.analysis.MultiEventSummary('Totals',allEvents);footerRows.push(multiEventSummary);}
+this.updateTableColumns_(rows,maxValues);this.$.table.tableRows=rows;this.$.table.footerRows=footerRows;this.$.table.rebuild();}});'use strict';Polymer('tr-ui-a-multi-event-details-table',{created:function(){this.selection_=undefined;this.eventsHaveDuration_=true;this.eventsHaveSubRows_=true;},ready:function(){this.initTitleTable_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows_;},set eventsHaveSubRows(eventsHaveSubRows){this.eventsHaveSubRows_=eventsHaveSubRows;this.updateContents_();},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;this.updateContents_();},updateContents_:function(){var selection=this.selection_;this.updateTitleTable_();if(this.selection_===undefined){this.$.table.tableRows=[];this.$.table.tableFooterRows=[];this.$.table.rebuild();return;}
+var summary=new tr.ui.analysis.MultiEventSummary('Totals',this.selection_);this.updateColumns_(summary);this.updateRows_(summary);this.$.table.rebuild();},initTitleTable_:function(){var table=this.$.titletable;table.showHeader=false;table.tableColumns=[{title:'Title',value:function(row){return row.title;},width:'350px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];},updateTitleTable_:function(){var title;if(this.selection_&&this.selection_.length)
+title=this.selection_[0].title;else
+title='<No selection>';var table=this.$.titletable;table.tableRows=[{title:'Title',value:title}];},updateColumns_:function(summary){var hasCpuData;if(summary.cpuDuration!==undefined)
+hasCpuData=true;if(summary.cpuSelfTime!==undefined)
+hasCpuData=true;var colWidthPercentage;if(hasCpuData)
+colWidthPercentage='20%';else
+colWidthPercentage='33.3333%';var ownerDocument=this.ownerDocument;var columns=[];columns.push({title:'Start',value:function(row){if(row.__proto__===tr.ui.analysis.MultiEventSummary.prototype){return row.title;}
+var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(row.event);});linkEl.appendChild(tr.v.ui.createScalarSpan(row.start,{unit:tr.v.Unit.byName.timeStampInMs,ownerDocument:ownerDocument}));return linkEl;},width:'350px',cmp:function(rowA,rowB){return rowA.start-rowB.start;}});if(this.eventsHaveDuration_){columns.push({title:'Wall Duration (ms)',value:function(row){return tr.v.ui.createScalarSpan(row.duration,{unit:tr.v.Unit.byName.timeDurationInMs,ownerDocument:ownerDocument});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.duration-rowB.duration;}});}
+if(this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Duration (ms)',value:function(row){return tr.v.ui.createScalarSpan(row.cpuDuration,{unit:tr.v.Unit.byName.timeDurationInMs,ownerDocument:ownerDocument});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuDuration-rowB.cpuDuration;}});}
+if(this.eventsHaveSubRows_&&this.eventsHaveDuration_){columns.push({title:'Self time (ms)',value:function(row){return tr.v.ui.createScalarSpan(row.selfTime,{unit:tr.v.Unit.byName.timeDurationInMs,ownerDocument:ownerDocument});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.selfTime-rowB.selfTime;}});}
+if(this.eventsHaveSubRows_&&this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Self Time (ms)',value:function(row){return tr.v.ui.createScalarSpan(row.cpuSelfTime,{unit:tr.v.Unit.byName.timeDurationInMs,ownerDocument:ownerDocument});},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuSelfTime-rowB.cpuSelfTime;}});}
+var argKeys=tr.b.dictionaryKeys(summary.totalledArgs);argKeys.sort();var otherKeys=summary.untotallableArgs.slice(0);otherKeys.sort();argKeys.push.apply(argKeys,otherKeys);var keysWithColumns=argKeys.slice(0,4);var keysInOtherColumn=argKeys.slice(4);keysWithColumns.forEach(function(argKey){var hasTotal=summary.totalledArgs[argKey];var colDesc={title:'Arg: '+argKey,value:function(row){if(row.__proto__!==tr.ui.analysis.MultiEventSummary.prototype){var argView=document.createElement('tr-ui-a-generic-object-view');argView.object=row.args[argKey];return argView;}
+if(hasTotal)
+return row.totalledArgs[argKey];return'';},width:'<upated further down>'};if(hasTotal){colDesc.cmp=function(rowA,rowB){return rowA.args[argKey]-rowB.args[argKey];};}
+columns.push(colDesc);});if(keysInOtherColumn.length){columns.push({title:'Other Args',value:function(row){if(row.__proto__===tr.ui.analysis.MultiEventSummary.prototype)
+return'';var argView=document.createElement('tr-ui-a-generic-object-view');var obj={};for(var i=0;i<keysInOtherColumn.length;i++)
+obj[keysInOtherColumn[i]]=row.args[keysInOtherColumn[i]];argView.object=obj;return argView;},width:'<upated further down>'});}
+var colWidthPercentage;if(columns.length==1)
+colWidthPercentage='100%';else
+colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';for(var i=1;i<columns.length;i++)
+columns[i].width=colWidthPercentage;this.$.table.tableColumns=columns;},updateRows_:function(summary){this.$.table.sortColumnIndex=0;function Row(event){this.event=event;}
+Row.prototype={get start(){return this.event.start;},get duration(){return this.event.duration;},get cpuDuration(){return this.event.cpuDuration;},get selfTime(){return this.event.selfTime;},get cpuSelfTime(){return this.event.cpuSelfTime;},get args(){return this.event.args;}};this.$.table.tableRows=this.selection_.map(function(event){return new Row(event);});this.$.table.footerRows=[summary];}});'use strict';Polymer('tr-ui-a-multi-event-sub-view',{created:function(){this.currentSelection_=undefined;this.eventsHaveDuration_=true;this.eventsHaveSubRows_=true;},set selection(selection){if(selection.length<=1)
+throw new Error('Only supports multiple items');this.setSelectionWithoutErrorChecks(selection);},get selection(){return this.currentSelection_;},setSelectionWithoutErrorChecks:function(selection){this.currentSelection_=selection;this.updateContents_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows_;},set eventsHaveSubRows(eventsHaveSubRows){this.eventsHaveSubRows_=eventsHaveSubRows;this.updateContents_();},updateContents_:function(){var selection=this.currentSelection_;this.$.content.textContent='';if(!selection)
+return;var eventsByTitle=selection.getEventsOrganizedByTitle();var numTitles=tr.b.dictionaryLength(eventsByTitle);var summaryTableEl=document.createElement('tr-ui-a-multi-event-summary-table');summaryTableEl.configure({showTotals:numTitles>1,eventsByTitle:eventsByTitle,eventsHaveDuration:this.eventsHaveDuration_,eventsHaveSubRows:this.eventsHaveSubRows_});this.$.content.appendChild(summaryTableEl);var selectionSummaryTableEl=document.createElement('tr-ui-a-selection-summary-table');selectionSummaryTableEl.selection=this.currentSelection_;this.$.content.appendChild(selectionSummaryTableEl);if(numTitles===1){var detailsTableEl=document.createElement('tr-ui-a-multi-event-details-table');detailsTableEl.eventsHaveDuration=this.eventsHaveDuration_;detailsTableEl.eventsHaveSubRows=this.eventsHaveSubRows_;detailsTableEl.selection=selection;this.$.content.appendChild(detailsTableEl);}}});'use strict';tr.exportTo('tr.ui.analysis',function(){var FLOW_IN=0x1;var FLOW_OUT=0x2;var FLOW_IN_OUT=FLOW_IN|FLOW_OUT;function FlowClassifier(){this.numEvents_=0;this.eventsByGUID_={};}
+FlowClassifier.prototype={getFS_:function(event){var fs=this.eventsByGUID_[event.guid];if(fs===undefined){this.numEvents_++;fs={state:0,event:event};this.eventsByGUID_[event.guid]=fs;}
+return fs;},addInFlow:function(event){var fs=this.getFS_(event);fs.state|=FLOW_IN;return event;},addOutFlow:function(event){var fs=this.getFS_(event);fs.state|=FLOW_OUT;return event;},hasEvents:function(){return this.numEvents_>0;},get inFlowEvents(){var selection=new tr.model.EventSet();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_IN)
+selection.push(fs.event);}
+return selection;},get outFlowEvents(){var selection=new tr.model.EventSet();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_OUT)
+selection.push(fs.event);}
+return selection;},get internalFlowEvents(){var selection=new tr.model.EventSet();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_IN_OUT)
+selection.push(fs.event);}
+return selection;}};return{FlowClassifier:FlowClassifier};});'use strict';Polymer('tr-ui-a-related-events',{ready:function(){this.eventGroups_=[];this.cancelFunctions_=[];this.$.table.tableColumns=[{title:'Event(s)',value:function(row){var typeEl=document.createElement('span');typeEl.innerText=row.type;if(row.tooltip)
+typeEl.title=row.tooltip;return typeEl;},width:'150px'},{title:'Link',width:'100%',value:function(row){var linkEl=document.createElement('tr-ui-a-analysis-link');if(row.name)
+linkEl.setSelectionAndContent(row.selection,row.name);else
+linkEl.selection=row.selection;return linkEl;}}];},hasRelatedEvents:function(){return(this.eventGroups_&&this.eventGroups_.length>0);},setRelatedEvents:function(eventSet){this.cancelAllTasks_();this.eventGroups_=[];this.addConnectedFlows_(eventSet);this.addConnectedEvents_(eventSet);this.addOverlappingSamples_(eventSet);this.updateContents_();},addConnectedFlows_:function(eventSet){var classifier=new tr.ui.analysis.FlowClassifier();eventSet.forEach(function(slice){if(slice.inFlowEvents){slice.inFlowEvents.forEach(function(flow){classifier.addInFlow(flow);});}
+if(slice.outFlowEvents){slice.outFlowEvents.forEach(function(flow){classifier.addOutFlow(flow);});}});if(!classifier.hasEvents())
+return;var addToEventGroups=function(type,flowEvent){this.eventGroups_.push({type:type,selection:new tr.model.EventSet(flowEvent),name:flowEvent.title});};classifier.inFlowEvents.forEach(addToEventGroups.bind(this,'Incoming flow'));classifier.outFlowEvents.forEach(addToEventGroups.bind(this,'Outgoing flow'));classifier.internalFlowEvents.forEach(addToEventGroups.bind(this,'Internal flow'));},cancelAllTasks_:function(){this.cancelFunctions_.forEach(function(cancelFunction){cancelFunction();});this.cancelFunctions_=[];},addConnectedEvents_:function(eventSet){this.cancelFunctions_.push(this.createEventsLinkIfNeeded_('Preceding events','Add all events that have led to the selected one(s), connected by '+'flow arrows or by call stack.',eventSet,function(event,events){this.addInFlowEvents_(event,events);this.addAncestors_(event,events);if(event.startSlice)
+events.push(event.startSlice);}.bind(this)));this.cancelFunctions_.push(this.createEventsLinkIfNeeded_('Following events','Add all events that have been caused by the selected one(s), '+'connected by flow arrows or by call stack.',eventSet,function(event,events){this.addOutFlowEvents_(event,events);this.addDescendents_(event,events);if(event.endSlice)
+events.push(event.endSlice);}.bind(this)));this.cancelFunctions_.push(this.createEventsLinkIfNeeded_('All connected events','Add all events connected to the selected one(s) by flow arrows or '+'by call stack.',eventSet,function(event,events){this.addInFlowEvents_(event,events);this.addOutFlowEvents_(event,events);this.addAncestors_(event,events);this.addDescendents_(event,events);if(event.startSlice)
+events.push(event.startSlice);if(event.endSlice)
+events.push(event.endSlice);}.bind(this)));},createEventsLinkIfNeeded_:function(title,tooltip,events,addFunction){events=new tr.model.EventSet(events);var lengthBefore=events.length;var task;var isCanceled=false;function addEventsUntilTimeout(startingIndex){if(isCanceled)
+return;var startingTime=window.performance.now();while(startingIndex<events.length){addFunction(events[startingIndex],events);startingIndex++;if(window.performance.now()-startingTime>8){var newTask=new tr.b.Task(addEventsUntilTimeout.bind(this,startingIndex),this);task.after(newTask);task=newTask;return;}}
+if(lengthBefore===events.length)
+return;this.eventGroups_.push({type:title,tooltip:tooltip,selection:events});this.updateContents_();};function cancelTask(){isCanceled=true;}
+task=new tr.b.Task(addEventsUntilTimeout.bind(this,0),this);tr.b.Task.RunWhenIdle(task);return cancelTask;},addInFlowEvents_:function(event,eventSet){if(!event.inFlowEvents)
+return;event.inFlowEvents.forEach(function(e){eventSet.push(e);});},addOutFlowEvents_:function(event,eventSet){if(!event.outFlowEvents)
+return;event.outFlowEvents.forEach(function(e){eventSet.push(e);});},addAncestors_:function(event,eventSet){if(!event.iterateAllAncestors)
+return;event.iterateAllAncestors(function(e){eventSet.push(e);});},addDescendents_:function(event,eventSet){if(!event.iterateAllDescendents)
+return;event.iterateAllDescendents(function(e){eventSet.push(e);});},addOverlappingSamples_:function(eventSet){var samples=new tr.model.EventSet;eventSet.forEach(function(slice){if(!slice.parentContainer||!slice.parentContainer.samples)
+return;var candidates=slice.parentContainer.samples;var range=tr.b.Range.fromExplicitRange(slice.start,slice.start+slice.duration);var filteredSamples=range.filterArray(candidates,function(value){return value.start;});filteredSamples.forEach(function(sample){samples.push(sample);});}.bind(this));if(samples.length>0){this.eventGroups_.push({type:'Overlapping samples',tooltip:'All samples overlapping the selected slice(s).',selection:samples});}},updateContents_:function(){var table=this.$.table;if(this.eventGroups_===undefined)
+table.tableRows=[];else
+table.tableRows=this.eventGroups_.slice();table.rebuild();}});'use strict';Polymer('tr-ui-a-multi-async-slice-sub-view',{get selection(){return this.$.content.selection;},set selection(selection){this.$.content.selection=selection;this.$.relatedEvents.setRelatedEvents(selection);if(this.$.relatedEvents.hasRelatedEvents()){this.$.relatedEvents.style.display='';}else{this.$.relatedEvents.style.display='none';}},get relatedEventsToHighlight(){if(!this.$.content.selection)
+return undefined;var selection=new tr.model.EventSet();this.$.content.selection.forEach(function(asyncEvent){if(!asyncEvent.associatedEvents)
+return;asyncEvent.associatedEvents.forEach(function(event){selection.push(event);});});if(selection.length)
+return selection;return undefined;}});'use strict';Polymer('tr-ui-a-multi-cpu-slice-sub-view',{ready:function(){this.$.content.eventsHaveSubRows=false;},get selection(){return this.$.content.selection;},set selection(selection){this.$.content.setSelectionWithoutErrorChecks(selection);}});'use strict';Polymer('tr-ui-a-multi-flow-event-sub-view',{ready:function(){this.$.content.eventsHaveDuration=false;this.$.content.eventsHaveSubRows=false;},set selection(selection){this.$.content.selection=selection;},get selection(){return this.$.content.selection;}});'use strict';Polymer('tr-ui-a-multi-frame-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.textContent='';var realView=document.createElement('tr-ui-a-multi-event-sub-view');realView.eventsHaveDuration=false;realView.eventsHaveSubRows=false;this.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get selection(){return this.currentSelection_;},get relatedEventsToHighlight(){if(!this.currentSelection_)
+return undefined;var selection=new tr.model.EventSet();this.currentSelection_.forEach(function(frameEvent){frameEvent.associatedEvents.forEach(function(event){selection.push(event);});});return selection;}});'use strict';Polymer('tr-ui-a-multi-instant-event-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.$.content.textContent='';var realView=document.createElement('tr-ui-a-multi-event-sub-view');realView.eventsHaveDuration=false;realView.eventsHaveSubRows=false;this.$.content.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get selection(){return this.currentSelection_;}});'use strict';Polymer('tr-ui-a-multi-object-sub-view',{created:function(){this.currentSelection_=undefined;},ready:function(){this.$.content.showHeader=false;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;var objectEvents=tr.b.asArray(selection).sort(tr.b.Range.compareByMinTimes);var timeSpanConfig={unit:tr.v.Unit.byName.timeStampInMs,ownerDocument:this.ownerDocument};var table=this.$.content;table.tableColumns=[{title:'First',value:function(event){if(event instanceof tr.model.ObjectSnapshot)
+return tr.v.ui.createScalarSpan(event.ts,timeSpanConfig);var spanEl=document.createElement('span');spanEl.appendChild(tr.v.ui.createScalarSpan(event.creationTs,timeSpanConfig));spanEl.appendChild(tr.ui.b.createSpan({textContent:'-',marginLeft:'4px',marginRight:'4px'}));if(event.deletionTs!=Number.MAX_VALUE){spanEl.appendChild(tr.v.ui.createScalarSpan(event.deletionTs,timeSpanConfig));}
+return spanEl;},width:'200px'},{title:'Second',value:function(event){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(event);},event.userFriendlyName);return linkEl;},width:'100%'}];table.tableRows=objectEvents;table.rebuild();}});'use strict';var EventSet=tr.model.EventSet;var CHART_TITLE='Power (W) by ms since vertical sync';var CHART_WIDTH_FRACTION_OF_BODY=0.5;Polymer('tr-ui-a-frame-power-usage-chart',{ready:function(){this.chart_=undefined;this.samples_=new EventSet();this.vSyncTimestamps_=[];},get chart(){return this.chart_;},get samples(){return this.samples_;},get vSyncTimestamps(){return this.vSyncTimestamps_;},setData:function(samples,vSyncTimestamps){this.samples_=(samples===undefined)?new EventSet():samples;this.vSyncTimestamps_=(vSyncTimestamps===undefined)?[]:vSyncTimestamps;this.updateContents_();},updateContents_:function(){this.clearChart_();var data=this.getDataForLineChart_();if(data.length===0)
+return;this.chart_=this.createChart_(data);this.$.content.appendChild(this.chart_);},createChart_:function(data){var chart=new tr.ui.b.LineChart();var width=document.body.clientWidth*CHART_WIDTH_FRACTION_OF_BODY;chart.setSize({width:width,height:chart.height});chart.chartTitle=CHART_TITLE;chart.data=data;return chart;},clearChart_:function(){var content=this.$.content;while(content.firstChild)
+content.removeChild(content.firstChild);this.chart_=undefined;},getDataForLineChart_:function(){var sortedSamples=this.sortSamplesByTimestampAscending_(this.samples);var vSyncTimestamps=this.vSyncTimestamps.slice();var lastVSyncTimestamp=undefined;var points=[];var frameNumber=0;sortedSamples.forEach(function(sample){while(vSyncTimestamps.length>0&&vSyncTimestamps[0]<=sample.start){lastVSyncTimestamp=vSyncTimestamps.shift();frameNumber++;}
+if(lastVSyncTimestamp===undefined)
+return;var point={x:sample.start-lastVSyncTimestamp};point['f'+frameNumber]=sample.power/1000;points.push(point);});return points;},sortSamplesByTimestampAscending_:function(samples){return samples.toArray().sort(function(smpl1,smpl2){return smpl1.start-smpl2.start;});}});'use strict';Polymer('tr-ui-a-power-sample-summary-table',{ready:function(){this.$.table.tableColumns=[{title:'Min power',width:'100px',value:function(row){return tr.v.Unit.byName.powerInWatts.format(row.min/1000.0);}},{title:'Max power',width:'100px',value:function(row){return tr.v.Unit.byName.powerInWatts.format(row.max/1000.0);}},{title:'Time-weighted average',width:'100px',value:function(row){return tr.v.Unit.byName.powerInWatts.format(row.timeWeightedAverage/1000.0);}},{title:'Energy consumed',width:'100px',value:function(row){return tr.v.Unit.byName.energyInJoules.format(row.energyConsumed);}},{title:'Sample count',width:'100%',value:function(row){return row.sampleCount;}}];this.samples=new tr.model.EventSet();},get samples(){return this.samples_;},set samples(samples){if(samples===this.samples)
+return;this.samples_=(samples===undefined)?new tr.model.EventSet():samples;this.updateContents_();},updateContents_:function(){if(this.samples.length===0){this.$.table.tableRows=[];}else{this.$.table.tableRows=[{min:this.getMin(),max:this.getMax(),timeWeightedAverage:this.getTimeWeightedAverage(),energyConsumed:this.getEnergyConsumed(),sampleCount:this.samples.length}];}
+this.$.table.rebuild();},getMin:function(){return Math.min.apply(null,this.samples.map(function(sample){return sample.power;}));},getMax:function(){return Math.max.apply(null,this.samples.map(function(sample){return sample.power;}));},getTimeWeightedAverage:function(){var energyConsumed=this.getEnergyConsumed();if(energyConsumed==='N/A')
+return'N/A';var energyInMillijoules=this.getEnergyConsumed()*1000;var durationInSeconds=this.samples.bounds.duration/1000;return energyInMillijoules/durationInSeconds;},getEnergyConsumed:function(){if(this.samples.length<2)
+return'N/A';var bounds=this.samples.bounds;return this.samples[0].series.getEnergyConsumed(bounds.min,bounds.max);}});'use strict';var EventSet=tr.model.EventSet;Polymer('tr-ui-a-power-sample-table',{ready:function(){this.$.table.tableColumns=[{title:'Time',width:'100px',value:function(row){return tr.v.ui.createScalarSpan(row.start,{unit:tr.v.Unit.byName.timeStampInMs});}},{title:'Power',width:'100%',value:function(row){return tr.v.ui.createScalarSpan(row.power/1000,{unit:tr.v.Unit.byName.powerInWatts});}}];this.samples=new EventSet();},get samples(){return this.samples_;},set samples(samples){this.samples_=(samples===undefined)?new EventSet():samples;this.updateContents_();},updateContents_:function(){this.$.table.tableRows=this.samples.toArray();this.$.table.rebuild();}});'use strict';Polymer('tr-ui-a-multi-power-sample-sub-view',{ready:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;this.updateContents_();},updateContents_:function(){var samples=this.selection;var vSyncTimestamps=(this.selection===undefined)?[]:this.selection[0].series.device.vSyncTimestamps;this.$.summaryTable.samples=samples;this.$.samplesTable.samples=samples;this.$.chart.setData(this.selection,vSyncTimestamps);}});'use strict';(function(){Polymer('tr-ui-a-multi-sample-sub-view',{created:function(){this.viewOption_=undefined;this.selection_=undefined;},ready:function(){var viewSelector=tr.ui.b.createSelector(this,'viewOption','tracing.ui.analysis.multi_sample_sub_view',tr.b.MultiDimensionalViewType.TOP_DOWN_TREE_VIEW,[{label:'Top-down (Tree)',value:tr.b.MultiDimensionalViewType.TOP_DOWN_TREE_VIEW},{label:'Top-down (Heavy)',value:tr.b.MultiDimensionalViewType.TOP_DOWN_HEAVY_VIEW},{label:'Bottom-up (Heavy)',value:tr.b.MultiDimensionalViewType.BOTTOM_UP_HEAVY_VIEW}]);this.$.control.appendChild(viewSelector);this.$.table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;this.updateContents_();},get viewOption(){return this.viewOption_;},set viewOption(viewOption){this.viewOption_=viewOption;this.updateContents_();},createSamplingSummary_:function(selection,viewOption){var builder=new tr.b.MultiDimensionalViewBuilder(1);var samples=selection.getEventsOrganizedByBaseType().sample;samples.forEach(function(sample){builder.addPath([sample.getUserFriendlyStackTrace().reverse()],1,tr.b.MultiDimensionalViewBuilder.ValueKind.SELF);});return builder.buildView(viewOption);},updateContents_:function(){if(this.selection===undefined){this.$.table.tableColumns=[];this.$.table.tableRows=[];this.$.table.rebuild();return;}
+var samplingData=this.createSamplingSummary_(this.selection,this.viewOption);var columns=[this.createPercentColumn_('Total',samplingData.total),this.createSamplesColumn_('Total'),this.createPercentColumn_('Self',samplingData.total),this.createSamplesColumn_('Self'),{title:'Symbol',value:function(row){return row.title[0];},width:'250px',cmp:function(a,b){return a.title[0].localeCompare(b.title[0]);},showExpandButtons:true}];this.$.table.tableColumns=columns;this.$.table.sortColumnIndex=1;this.$.table.sortDescending=true;this.$.table.tableRows=samplingData.subRows;this.$.table.rebuild();},createPercentColumn_:function(title,samplingDataTotal){var field=title.toLowerCase();return{title:title+' percent',value:function(row){var percent=row[field]/samplingDataTotal;var span=document.createElement('tr-v-ui-scalar-span');span.value=(percent*100).toFixed(2);span.percentage=percent;span.unit=tr.v.Unit.byName.unitlessNumber;return span;}.bind(this),width:'60px',cmp:function(a,b){return a[field]-b[field];}};},createSamplesColumn_:function(title){var field=title.toLowerCase();return{title:title+' samples',value:function(row){return row[field];},width:'60px',cmp:function(a,b){return a[field]-b[field];}};}});})();'use strict';Polymer('tr-ui-a-multi-thread-slice-sub-view',{created:function(){this.selection_=undefined;},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;if(tr.isExported('tr.ui.e.chrome.cc.RasterTaskSelection')){if(tr.ui.e.chrome.cc.RasterTaskSelection.supports(selection)){var ltvSelection=new tr.ui.e.chrome.cc.RasterTaskSelection(selection);var ltv=new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView();ltv.objectSnapshot=ltvSelection.containingSnapshot;ltv.selection=ltvSelection;ltv.extraHighlightsByLayerId=ltvSelection.extraHighlightsByLayerId;this.$.content.textContent='';this.$.content.appendChild(ltv);this.requiresTallView_=true;return;}}
+this.$.content.textContent='';var mesv=document.createElement('tr-ui-a-multi-event-sub-view');mesv.selection=selection;this.$.content.appendChild(mesv);var relatedEvents=document.createElement('tr-ui-a-related-events');relatedEvents.setRelatedEvents(selection);if(relatedEvents.hasRelatedEvents()){this.$.content.appendChild(relatedEvents);}},get requiresTallView(){if(this.$.content.children.length===0)
+return false;var childTagName=this.$.content.children[0].tagName;if(childTagName==='TR-UI-A-MULTI-EVENT-SUB-VIEW')
+return false;return true;}});'use strict';Polymer('tr-ui-a-multi-thread-time-slice-sub-view',{ready:function(){this.$.content.eventsHaveSubRows=false;},get selection(){return this.$.content.selection;},set selection(selection){this.$.content.setSelectionWithoutErrorChecks(selection);}});'use strict';Polymer('tr-ui-a-multi-user-expectation-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.currentSelection_=selection;this.textContent='';var realView=document.createElement('tr-ui-a-multi-event-sub-view');this.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get selection(){return this.currentSelection_;},get relatedEventsToHighlight(){if(!this.currentSelection_)
+return undefined;var selection=new tr.model.EventSet();this.currentSelection_.forEach(function(ir){ir.associatedEvents.forEach(function(event){selection.push(event);});});return selection;}});'use strict';Polymer('tr-ui-a-single-async-slice-sub-view',{get selection(){return this.$.content.selection;},set selection(selection){if(selection.length!==1)
+throw new Error('Only supports single slices');this.$.content.setSelectionWithoutErrorChecks(selection);this.$.relatedEvents.setRelatedEvents(selection);if(this.$.relatedEvents.hasRelatedEvents()){this.$.relatedEvents.style.display='';}else{this.$.relatedEvents.style.display='none';}},getEventRows_:function(event){var rows=this.__proto__.__proto__.getEventRows_(event);rows.splice(0,0,{name:'ID',value:event.id});return rows;},get relatedEventsToHighlight(){if(!this.currentSelection_)
+return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-single-cpu-slice-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
+throw new Error('Only supports single slices');if(!(selection[0]instanceof tr.model.CpuSlice))
+throw new Error('Only supports thread time slices');this.currentSelection_=selection;var cpuSlice=selection[0];var thread=cpuSlice.threadThatWasRunning;var shadowRoot=this.shadowRoot;if(thread){shadowRoot.querySelector('#process-name').textContent=thread.parent.userFriendlyName;shadowRoot.querySelector('#thread-name').textContent=thread.userFriendlyName;}else{shadowRoot.querySelector('#process-name').parentElement.style.display='none';shadowRoot.querySelector('#thread-name').textContent=cpuSlice.title;}
+shadowRoot.querySelector('#start').setValueAndUnit(cpuSlice.start,tr.v.Unit.byName.timeStampInMs);shadowRoot.querySelector('#duration').setValueAndUnit(cpuSlice.duration,tr.v.Unit.byName.timeDurationInMs);var runningThreadEl=shadowRoot.querySelector('#running-thread');var timeSlice=cpuSlice.getAssociatedTimeslice();if(!timeSlice){runningThreadEl.parentElement.style.display='none';}else{var threadLink=document.createElement('tr-ui-a-analysis-link');threadLink.selection=new tr.model.EventSet(timeSlice);threadLink.textContent='Click to select';runningThreadEl.parentElement.style.display='';runningThreadEl.textContent='';runningThreadEl.appendChild(threadLink);}
+shadowRoot.querySelector('#args').object=cpuSlice.args;}});'use strict';Polymer('tr-ui-a-single-flow-event-sub-view',{getEventRows_:function(event){var rows=this.__proto__.__proto__.getEventRows_(event);rows.splice(0,0,{name:'ID',value:event.id});function createLinkTo(slice){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.model.EventSet(slice);});linkEl.textContent=slice.userFriendlyName;return linkEl;}
+rows.push({name:'From',value:createLinkTo(event.startSlice)});rows.push({name:'To',value:createLinkTo(event.endSlice)});return rows;}});'use strict';Polymer('tr-ui-a-single-frame-sub-view',{ready:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!=1)
+throw new Error('Only supports single frame!');this.currentSelection_=selection;this.$.asv.selection=selection[0].associatedAlerts;},get relatedEventsToHighlight(){if(!this.currentSelection_)
+return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-single-instant-event-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.$.content.textContent='';var realView=document.createElement('tr-ui-a-single-event-sub-view');realView.setSelectionWithoutErrorChecks(selection);this.$.content.appendChild(realView);this.currentSelection_=selection;},get selection(){return this.currentSelection_;}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ObjectInstanceView=tr.ui.b.define('object-instance-view');ObjectInstanceView.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.objectInstance_=undefined;},get requiresTallView(){return true;},set modelEvent(obj){this.objectInstance=obj;},get modelEvent(){return this.objectInstance;},get objectInstance(){return this.objectInstance_;},set objectInstance(i){this.objectInstance_=i;this.updateContents();},updateContents:function(){throw new Error('Not implemented');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectInstanceView;options.defaultMetadata={showInTrackView:true};tr.b.decorateExtensionRegistry(ObjectInstanceView,options);return{ObjectInstanceView:ObjectInstanceView};});'use strict';Polymer('tr-ui-a-single-object-instance-sub-view',{created:function(){this.currentSelection_=undefined;},get requiresTallView(){if(this.$.content.children.length===0)
+return false;if(this.$.content.children[0]instanceof
+tr.ui.analysis.ObjectInstanceView)
+return this.$.content.children[0].requiresTallView;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
+throw new Error('Only supports single item selections');if(!(selection[0]instanceof tr.model.ObjectInstance))
+throw new Error('Only supports object instances');this.$.content.textContent='';this.currentSelection_=selection;var instance=selection[0];var typeInfo=tr.ui.analysis.ObjectInstanceView.getTypeInfo(instance.category,instance.typeName);if(typeInfo){var customView=new typeInfo.constructor();this.$.content.appendChild(customView);customView.modelEvent=instance;}else{this.appendGenericAnalysis_(instance);}},appendGenericAnalysis_:function(instance){var html='';html+='<div class="title">'+
+instance.typeName+' '+
+instance.id+'</div>\n';html+='<table>';html+='<tr>';html+='<tr><td>creationTs:</td><td>'+
+instance.creationTs+'</td></tr>\n';if(instance.deletionTs!=Number.MAX_VALUE){html+='<tr><td>deletionTs:</td><td>'+
+instance.deletionTs+'</td></tr>\n';}else{html+='<tr><td>deletionTs:</td><td>not deleted</td></tr>\n';}
+html+='<tr><td>snapshots:</td><td id="snapshots"></td></tr>\n';html+='</table>';this.$.content.innerHTML=html;var snapshotsEl=this.$.content.querySelector('#snapshots');instance.snapshots.forEach(function(snapshot){var snapshotLink=document.createElement('tr-ui-a-analysis-link');snapshotLink.selection=new tr.model.EventSet(snapshot);snapshotsEl.appendChild(snapshotLink);});}});'use strict';Polymer('tr-ui-a-single-object-snapshot-sub-view',{created:function(){this.currentSelection_=undefined;},get requiresTallView(){if(this.children.length===0)
+return false;if(this.children[0]instanceof tr.ui.analysis.ObjectSnapshotView)
+return this.children[0].requiresTallView;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
+throw new Error('Only supports single item selections');if(!(selection[0]instanceof tr.model.ObjectSnapshot))
+throw new Error('Only supports object instances');this.textContent='';this.currentSelection_=selection;var snapshot=selection[0];var typeInfo=tr.ui.analysis.ObjectSnapshotView.getTypeInfo(snapshot.objectInstance.category,snapshot.objectInstance.typeName);if(typeInfo){var customView=new typeInfo.constructor();this.appendChild(customView);customView.modelEvent=snapshot;}else{this.appendGenericAnalysis_(snapshot);}},appendGenericAnalysis_:function(snapshot){var instance=snapshot.objectInstance;this.textContent='';var titleEl=document.createElement('div');titleEl.classList.add('title');titleEl.appendChild(document.createTextNode('Snapshot of '));this.appendChild(titleEl);var instanceLinkEl=document.createElement('tr-ui-a-analysis-link');instanceLinkEl.selection=new tr.model.EventSet(instance);titleEl.appendChild(instanceLinkEl);titleEl.appendChild(document.createTextNode(' @ '));titleEl.appendChild(tr.v.ui.createScalarSpan(snapshot.ts,{unit:tr.v.Unit.byName.timeStampInMs,ownerDocument:this.ownerDocument}));var tableEl=document.createElement('table');this.appendChild(tableEl);var rowEl=document.createElement('tr');tableEl.appendChild(rowEl);var labelEl=document.createElement('td');labelEl.textContent='args:';rowEl.appendChild(labelEl);var argsEl=document.createElement('td');argsEl.id='args';rowEl.appendChild(argsEl);var objectViewEl=document.createElement('tr-ui-a-generic-object-view');objectViewEl.object=snapshot.args;argsEl.appendChild(objectViewEl);}});'use strict';Polymer('tr-ui-a-single-power-sample-sub-view',{ready:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;this.updateContents_();},updateContents_:function(){this.$.samplesTable.samples=this.selection;}});'use strict';Polymer('tr-ui-a-single-sample-sub-view',{created:function(){this.currentSelection_=undefined;},ready:function(){this.$.content.tableColumns=[{title:'FirstColumn',value:function(row){return row.title;},width:'250px'},{title:'SecondColumn',value:function(row){return row.value;},width:'100%'}];this.$.content.showHeader=false;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;if(this.currentSelection_===undefined){this.$.content.tableRows=[];return;}
+var sample=this.currentSelection_[0];var table=this.$.content;var rows=[];rows.push({title:'Title',value:sample.title});rows.push({title:'Sample time',value:tr.v.ui.createScalarSpan(sample.start,{unit:tr.v.Unit.byName.timeStampInMs,ownerDocument:this.ownerDocument})});var sfEl=document.createElement('tr-ui-a-stack-frame');sfEl.stackFrame=sample.leafStackFrame;rows.push({title:'Stack trace',value:sfEl});table.tableRows=rows;table.rebuild();}});'use strict';Polymer('tr-ui-a-single-thread-slice-sub-view',{get selection(){return this.$.content.selection;},set selection(selection){this.$.content.selection=selection;this.$.relatedEvents.setRelatedEvents(selection);if(this.$.relatedEvents.hasRelatedEvents())
+this.$.relatedEvents.style.display='';else
+this.$.relatedEvents.style.display='none';}});'use strict';Polymer('tr-ui-a-single-thread-time-slice-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
+throw new Error('Only supports single slices');if(!(selection[0]instanceof tr.model.ThreadTimeSlice))
+throw new Error('Only supports thread time slices');this.currentSelection_=selection;var timeSlice=selection[0];var thread=timeSlice.thread;var shadowRoot=this.shadowRoot;shadowRoot.querySelector('#state').textContent=timeSlice.title;var stateColor=tr.b.ColorScheme.colorsAsStrings[timeSlice.colorId];shadowRoot.querySelector('#state').style.backgroundColor=stateColor;shadowRoot.querySelector('#process-name').textContent=thread.parent.userFriendlyName;shadowRoot.querySelector('#thread-name').textContent=thread.userFriendlyName;shadowRoot.querySelector('#start').setValueAndUnit(timeSlice.start,tr.v.Unit.byName.timeStampInMs);shadowRoot.querySelector('#duration').setValueAndUnit(timeSlice.duration,tr.v.Unit.byName.timeDurationInMs);var onCpuEl=shadowRoot.querySelector('#on-cpu');onCpuEl.textContent='';var runningInsteadEl=shadowRoot.querySelector('#running-instead');if(timeSlice.cpuOnWhichThreadWasRunning){runningInsteadEl.parentElement.removeChild(runningInsteadEl);var cpuLink=document.createElement('tr-ui-a-analysis-link');cpuLink.selection=new tr.model.EventSet(timeSlice.getAssociatedCpuSlice());cpuLink.textContent=timeSlice.cpuOnWhichThreadWasRunning.userFriendlyName;onCpuEl.appendChild(cpuLink);}else{onCpuEl.parentElement.removeChild(onCpuEl);var cpuSliceThatTookCpu=timeSlice.getCpuSliceThatTookCpu();if(cpuSliceThatTookCpu){var cpuLink=document.createElement('tr-ui-a-analysis-link');cpuLink.selection=new tr.model.EventSet(cpuSliceThatTookCpu);if(cpuSliceThatTookCpu.thread)
+cpuLink.textContent=cpuSliceThatTookCpu.thread.userFriendlyName;else
+cpuLink.textContent=cpuSliceThatTookCpu.title;runningInsteadEl.appendChild(cpuLink);}else{runningInsteadEl.parentElement.removeChild(runningInsteadEl);}}
+var argsEl=shadowRoot.querySelector('#args');if(tr.b.dictionaryKeys(timeSlice.args).length>0){var argsView=document.createElement('tr-ui-a-generic-object-view');argsView.object=timeSlice.args;argsEl.parentElement.style.display='';argsEl.textContent='';argsEl.appendChild(argsView);}else{argsEl.parentElement.style.display='none';}}});'use strict';tr.exportTo('tr.metrics',function(){function ValueList(values){if(values!==undefined)
+this.values_=values;else
+this.values_=[];}
+ValueList.prototype={get valueDicts(){return this.values_.map(function(v){return v.asDict();});},getValuesWithName:function(name){return this.values_.filter(function(value){return value.name.indexOf(name)>-1;});},addValue:function(v){if(!(v instanceof tr.v.NumericValue)){var err=new Error('Tried to add value '+v+' which is non-Numeric');err.name='ValueError';throw err;}
+this.values_.push(v);}};return{ValueList:ValueList};});'use strict';Polymer('tr-ui-a-single-user-expectation-sub-view',{created:function(){this.currentSelection_=undefined;this.realView_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){this.textContent='';this.realView_=document.createElement('tr-ui-a-single-event-sub-view');this.realView_.addEventListener('customize-rows',this.onCustomizeRows_.bind(this));this.appendChild(this.realView_);this.currentSelection_=selection;this.realView_.setSelectionWithoutErrorChecks(selection);},get relatedEventsToHighlight(){if(!this.currentSelection_)
+return undefined;return this.currentSelection_[0].associatedEvents;},onCustomizeRows_:function(event){var ue=this.selection[0];var valueList=new tr.metrics.ValueList();function runMetric(metricInfo){try{metricInfo.constructor(valueList,ue.parentModel);}catch(failure){console.error(metricInfo,failure);}}
+tr.metrics.MetricRegistry.getAllRegisteredTypeInfos().forEach(runMetric);var metricValues={};valueList.valueDicts.forEach(function(value){if(value.grouping_keys.userExpectationStableId!==ue.stableId)
+return;if((value.type!=='numeric')||(value.numeric.type!=='scalar'))
+return;metricValues[value.grouping_keys.name]=value.numeric;});for(var name in metricValues){event.rows.push({name:name,value:tr.v.ui.createScalarSpan(metricValues[name].value,{unit:tr.v.Unit.fromJSON(metricValues[name].unit)})});}
+if(ue.rawCpuMs){event.rows.push({name:'Total CPU',value:tr.v.ui.createScalarSpan(ue.totalCpuMs,{unit:tr.v.Unit.byName.timeDurationInMs})});}}});'use strict';Polymer('tr-ui-a-tab-view',{ready:function(){this.$.tshh.style.display='none';this.tabs_=[];this.selectedTab_=undefined;for(var i=0;i<this.children.length;i++)
+this.processAddedChild_(this.children[i]);this.childrenObserver_=new MutationObserver(this.childrenUpdated_.bind(this));this.childrenObserver_.observe(this,{childList:'true'});},get tabStripHeadingText(){return this.$.tsh.textContent;},set tabStripHeadingText(tabStripHeadingText){this.$.tsh.textContent=tabStripHeadingText;if(!!tabStripHeadingText)
+this.$.tshh.style.display='';else
+this.$.tshh.style.display='none';},get selectedTab(){this.childrenUpdated_(this.childrenObserver_.takeRecords(),this.childrenObserver_);if(this.selectedTab_)
+return this.selectedTab_.content;return undefined;},set selectedTab(content){this.childrenUpdated_(this.childrenObserver_.takeRecords(),this.childrenObserver_);if(content===undefined||content===null){this.changeSelectedTabById_(undefined);return;}
+var contentTabId=undefined;for(var i=0;i<this.tabs_.length;i++)
+if(this.tabs_[i].content===content){contentTabId=this.tabs_[i].id;break;}
+if(contentTabId===undefined)
+return;this.changeSelectedTabById_(contentTabId);},get tabsHidden(){var ts=this.shadowRoot.querySelector('tab-strip');return ts.hasAttribute('tabs-hidden');},set tabsHidden(tabsHidden){tabsHidden=!!tabsHidden;var ts=this.shadowRoot.querySelector('tab-strip');if(tabsHidden)
+ts.setAttribute('tabs-hidden',true);else
+ts.removeAttribute('tabs-hidden');},get tabs(){return this.tabs_.map(function(tabObject){return tabObject.content;});},processAddedChild_:function(child){var observerAttributeSelected=new MutationObserver(this.childAttributesChanged_.bind(this));var observerAttributeTabLabel=new MutationObserver(this.childAttributesChanged_.bind(this));var tabObject={id:this.tabs_.length,content:child,label:child.getAttribute('tab-label'),observers:{forAttributeSelected:observerAttributeSelected,forAttributeTabLabel:observerAttributeTabLabel}};this.tabs_.push(tabObject);if(child.hasAttribute('selected')){if(this.selectedTab_)
+child.removeAttribute('selected');else
+this.setSelectedTabById_(tabObject.id);}
+var previousSelected=child.selected;var tabView=this;Object.defineProperty(child,'selected',{configurable:true,set:function(value){if(value){tabView.changeSelectedTabById_(tabObject.id);return;}
+var wasSelected=tabView.selectedTab_===tabObject;if(wasSelected)
+tabView.changeSelectedTabById_(undefined);},get:function(){return this.hasAttribute('selected');}});if(previousSelected)
+child.selected=previousSelected;observerAttributeSelected.observe(child,{attributeFilter:['selected']});observerAttributeTabLabel.observe(child,{attributeFilter:['tab-label']});},processRemovedChild_:function(child){for(var i=0;i<this.tabs_.length;i++){this.tabs_[i].id=i;if(this.tabs_[i].content===child){this.tabs_[i].observers.forAttributeSelected.disconnect();this.tabs_[i].observers.forAttributeTabLabel.disconnect();if(this.tabs_[i]===this.selectedTab_){this.clearSelectedTab_();this.fire('selected-tab-change');}
+child.removeAttribute('selected');delete child.selected;this.tabs_.splice(i,1);i--;}}},childAttributesChanged_:function(mutations,observer){var tabObject=undefined;for(var i=0;i<this.tabs_.length;i++){var observers=this.tabs_[i].observers;if(observers.forAttributeSelected===observer||observers.forAttributeTabLabel===observer){tabObject=this.tabs_[i];break;}}
+if(!tabObject)
+return;for(var i=0;i<mutations.length;i++){var node=tabObject.content;if(mutations[i].attributeName==='tab-label')
+tabObject.label=node.getAttribute('tab-label');if(mutations[i].attributeName==='selected'){var nodeIsSelected=node.hasAttribute('selected');if(nodeIsSelected)
+this.changeSelectedTabById_(tabObject.id);else
+this.changeSelectedTabById_(undefined);}}},childrenUpdated_:function(mutations,observer){mutations.forEach(function(mutation){for(var i=0;i<mutation.removedNodes.length;i++)
+this.processRemovedChild_(mutation.removedNodes[i]);for(var i=0;i<mutation.addedNodes.length;i++)
+this.processAddedChild_(mutation.addedNodes[i]);},this);},tabButtonSelectHandler_:function(event,detail,sender){this.changeSelectedTabById_(sender.getAttribute('button-id'));},changeSelectedTabById_:function(id){var newTab=id!==undefined?this.tabs_[id]:undefined;var changed=this.selectedTab_!==newTab;this.saveCurrentTabScrollPosition_();this.clearSelectedTab_();if(id!==undefined){this.setSelectedTabById_(id);this.restoreCurrentTabScrollPosition_();}
+if(changed)
+this.fire('selected-tab-change');},setSelectedTabById_:function(id){this.selectedTab_=this.tabs_[id];this.selectedTab_.observers.forAttributeSelected.disconnect();this.selectedTab_.content.setAttribute('selected','selected');this.selectedTab_.observers.forAttributeSelected.observe(this.selectedTab_.content,{attributeFilter:['selected']});},saveTabStates:function(){this.saveCurrentTabScrollPosition_();},saveCurrentTabScrollPosition_:function(){if(this.selectedTab_){this.selectedTab_.content._savedScrollTop=this.$['content-container'].scrollTop;this.selectedTab_.content._savedScrollLeft=this.$['content-container'].scrollLeft;}},restoreCurrentTabScrollPosition_:function(){if(this.selectedTab_){this.$['content-container'].scrollTop=this.selectedTab_.content._savedScrollTop||0;this.$['content-container'].scrollLeft=this.selectedTab_.content._savedScrollLeft||0;}},clearSelectedTab_:function(){if(this.selectedTab_){this.selectedTab_.observers.forAttributeSelected.disconnect();this.selectedTab_.content.removeAttribute('selected');this.selectedTab_.observers.forAttributeSelected.observe(this.selectedTab_.content,{attributeFilter:['selected']});this.selectedTab_=undefined;}}});'use strict';(function(){var EventRegistry=tr.model.EventRegistry;Polymer('tr-ui-a-analysis-view',{ready:function(){this.tabView_=document.createElement('tr-ui-a-tab-view');this.tabView_.style.flex='1 1 auto';this.appendChild(this.tabView_);this.brushingStateController_=undefined;this.onSelectedTabChange_=this.onSelectedTabChange_.bind(this);this.onSelectionChanged_=this.onSelectionChanged_.bind(this);this.lastSeenSelection_=new tr.model.EventSet();},set tallMode(value){if(value)
+this.classList.add('tall-mode');else
+this.classList.remove('tall-mode');},get tallMode(){return this.classList.contains('tall-mode');},get tabView(){return this.tabView_;},get brushingStateController(){return this.brushingStateController_;},set brushingStateController(brushingStateController){if(this.brushingStateController){this.brushingStateController_.removeEventListener('change',this.onSelectionChanged_);}
+this.brushingStateController_=brushingStateController;if(this.brushingStateController){this.brushingStateController_.addEventListener('change',this.onSelectionChanged_);}
+this.onSelectionChanged_();},get selection(){return this.brushingStateController_.selection;},onSelectionChanged_:function(e){var selection=this.brushingStateController_.selection;var selectionHasSameValue=this.lastSeenSelection_.equals(selection);this.lastSeenSelection_=selection;if(selectionHasSameValue)
+return;var lastSelectedTabTagName;var lastSelectedTabTypeName;if(this.tabView_.selectedTab){lastSelectedTabTagName=this.tabView_.selectedTab.tagName;lastSelectedTabTypeName=this.tabView_.selectedTab._eventTypeName;}
+this.tallMode=false;var previouslySelectedTab=this.tabView_.selectedTab;this.tabView_.removeEventListener('selected-tab-change',this.onSelectedTabChange_);var previousSubViews={};for(var i=0;i<this.tabView_.children.length;i++){var previousSubView=this.tabView_.children[i];previousSubViews[previousSubView._eventTypeName]=previousSubView;}
+this.tabView_.saveTabStates();this.tabView_.textContent='';if(selection.length==0){this.tabView_.tabStripHeadingText='Nothing selected. Tap stuff.';}else if(selection.length==1){this.tabView_.tabStripHeadingText='1 item selected: ';}else{this.tabView_.tabStripHeadingText=selection.length+' items selected: ';}
+var eventsByBaseTypeName=selection.getEventsOrganizedByBaseType(true);var numBaseTypesToAnalyze=tr.b.dictionaryLength(eventsByBaseTypeName);for(var eventTypeName in eventsByBaseTypeName){var subSelection=eventsByBaseTypeName[eventTypeName];var subView=this.createSubViewForSelection_(eventTypeName,subSelection,previousSubViews[eventTypeName]);subView._eventTypeName=eventTypeName;this.tabView_.appendChild(subView);subView.selection=subSelection;}
+var tab;if(lastSelectedTabTagName)
+tab=this.tabView_.querySelector(lastSelectedTabTagName);if(!tab&&lastSelectedTabTypeName){var tab=tr.b.findFirstInArray(this.tabView_.children,function(tab){return tab._eventTypeName===lastSelectedTabTypeName;});}
+if(!tab)
+tab=this.tabView_.firstChild;this.tabView_.selectedTab=tab;this.onSelectedTabChange_();this.tabView_.addEventListener('selected-tab-change',this.onSelectedTabChange_);},createSubViewForSelection_:function(eventTypeName,subSelection,previousSubView){var eventTypeInfo=EventRegistry.getEventTypeInfoByTypeName(eventTypeName);var singleMode=subSelection.length==1;var tagName;if(subSelection.length===1)
+tagName=eventTypeInfo.metadata.singleViewElementName;else
+tagName=eventTypeInfo.metadata.multiViewElementName;if(!tr.ui.b.getPolymerElementNamed(tagName))
+throw new Error('Element not registered: '+tagName);var subView;if(previousSubView&&previousSubView.tagName===tagName.toUpperCase())
+subView=previousSubView;else
+subView=document.createElement(tagName);var camelLabel;if(subSelection.length===1)
+camelLabel=EventRegistry.getUserFriendlySingularName(eventTypeName);else
+camelLabel=EventRegistry.getUserFriendlyPluralName(eventTypeName);subView.tabLabel=camelLabel+' ('+subSelection.length+')';return subView;},onSelectedTabChange_:function(){var brushingStateController=this.brushingStateController_;if(this.tabView_.selectedTab){var selectedTab=this.tabView_.selectedTab;this.tallMode=selectedTab.requiresTallView;if(brushingStateController){var rlth=selectedTab.relatedEventsToHighlight;brushingStateController.changeAnalysisViewRelatedEvents(rlth);}}else{this.tallMode=false;if(brushingStateController)
+brushingStateController.changeAnalysisViewRelatedEvents(undefined);}}});})();'use strict';Polymer('tr-ui-b-dropdown',{ready:function(){this.$.outer.tabIndex=0;},get iconElement(){return this.$.icon;},onOuterKeyDown_:function(e){if(e.keyCode===' '.charCodeAt(0)){this.toggle_();e.preventDefault();e.stopPropagation();}},onOuterClick_:function(e){var or=this.$.outer.getBoundingClientRect();var inside=true;inside&=e.clientX>=or.left;inside&=e.clientX<or.right;inside&=e.clientY>=or.top;inside&=e.clientY<or.bottom;if(!inside)
+return;e.preventDefault();this.toggle_();},toggle_:function(){if(!this.isOpen)
+this.show();else
+this.close();},show:function(){if(this.isOpen)
+return;this.$.outer.classList.add('open');var ddr=this.$.outer.getBoundingClientRect();var rW=Math.max(ddr.width,150);this.$.dialog.style.minWidth=rW+'px';this.$.dialog.showModal();var ddw=this.$.outer.getBoundingClientRect().width;var w=this.$.dialog.getBoundingClientRect().width;this.$.dialog.style.top=ddr.bottom-1+'px';this.$.dialog.style.left=ddr.left+'px';},onDialogClick_:function(e){if(!this.isOpen)
+return;if(e.srcElement!==this.$.dialog)
+return;e.preventDefault();this.close();},onDialogCancel_:function(e){e.preventDefault();this.close();},close:function(){if(!this.isOpen)
+return;this.$.dialog.close();this.$.outer.classList.remove('open');this.$.outer.focus();},get isOpen(){return this.$.dialog.hasAttribute('open');}});'use strict';tr.exportTo('tr.ui.b',function(){var FaviconsByHue={blue:'data:image/vndmicrosofticon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjj8xAGArIgqOPzE8nUY3dqJJOJeiSTiXnUY3do4/MTxhKyIKjkAxAAAAAAAAAAAAAAAAAAAAAABQJBwAAAAAAZJBMzSoSzqlsU8+6bRQP/21UT//tVE//7RQP/2wTz3ppko6pY9AMjQAAAABTyMbAAAAAAB7e3sAAP//AKFSRE+wTz3dtVE//7VRP/+1UT//tVE//7VRP/+zUD7/sE89/7BOPf+qTDvdl0M0TwAAAABWJx4A+fn5ANjd3TnIiX7ftVA9/7VRP/+1UT//tVE//7VRP/+xTz3/rE08/6xMO/+sTDv/rE08/6dKOt+SQTM5q0w7ALO0tA3v8fGu05uR/7NMOf+0Tzz/tE88/7RPPv+uTT3/p0o7/6ZJOv+mSTr/pkk6/6ZJOv+mSjr/n0Y4rnIwKg3h4eFK9/j48N2zrP/FeGr/xnps/8Z6bP/AaUv/tlw1/7RbNf+1WzX/tFs1/7RbNf+0WzX/tFs1/7NbNPCqWy1K7e3tjPn5+f/49vX/9vLy//by8v/28vH/8bZv/+6RH//ukyP/7pMj/+6SI//ukiP/7pMj/+2SIv/qjyL/34kfjPHx8bL5+fn/+fn5//n5+f/5+fr/+fn5//W7cP/zlB3/85Yh//OWIf/zliH/85Yh//GVIf/rkR//6ZAf/+KLHrLz8/O2+fn5//n5+f/5+fn/+fn5//n5+f/1unD/85Qd//OWIf/zliH/85Yh//CUIP/mjh//44we/+OMHv/diR628vLymfn5+f/5+fn/+fn5//n5+f/5+fn/9bx0//OXI//zmCb/85gm/++VIv/hjB//3Yoe/92KHv/dih7/2IYdmfHx8Vz4+Pj3+fn5//n5+f/5+fn/+fn5//jo0//33bv/9929//bbtf/euDX/06oJ/9OrC//Tqwv/06oM98yfD1zr6+sY9/f3xvn5+f/5+fn/+fn5//n5+f/5+vv/+fv8//n7/f/3+PH/3Ms6/9O8AP/UvQD/1L0A/9K8AMbItAAY////APT09Fb4+Pjy+fn5//n5+f/5+fn/+fn5//n5+f/5+fr/9/bu/9zKOf/TuwD/1LwA/9S8APLQuABW3cQAAOzs7ADm5uYF9vb2ePn5+fT5+fn/+fn5//n5+f/5+fn/+fn6//f27v/cyTn/07sA/9S8APTRugB4w60ABcmyAAAAAAAA8PDwAOzs7Ab29vZd+Pj40vn5+fz5+fn/+fn5//n5+f/49/H/5Ndu/NjEIdLSugBdybIABsy1AAAAAAAAAAAAAAAAAADn5+cAqKioAPT09CH39/dy+Pj4tvj4+NX4+PjV+Pj4tvX063Lt6MMhOQAAAM+/RAAAAAAAAAAAAPAPAADAAwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCwUEDDgZExxWJx4tYiwiN2IsIjdWJx4tOBkTHAsFBAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAbDAkKZS0jMYs+MWydRjeipko6x6tMO9utTTzjrU0846tMO9umSjrHnUY3oos+MWxlLSMxGwwJCv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgZFAAPBwUHcjMoPJtFNpqsTTzhs1A+/LVRP/+2UT//tVE//7VRP/+1UT//tVE//7ZRP/+1UT//s1A+/KxNPOGbRTaacTInPA8HBQc4GRMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/yp4AUCQcGZVDNICtTjzktVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+0UT//s1A+/7JQPv+rTDvkkkEzgE8jGxn/xZoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA////AGswJSqiSTivs1A++7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tFA+/7FPPf+xTz3/sU89/7FPPf+vTj37nkc3r2guJCr///8AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAP/DogB/VEwsqE09v7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7NQPv+vTj3/r049/69OPf+vTj3/r049/69OPf+uTjz/oUg4v20xJiz/nnsAAgEBAAAAAAAAAAAAAAAAAAAAAAD19fUAkp2fHdK2sbW5W0r/tVA+/7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+yUD7/rU08/6xNPP+tTTz/rU08/61NPP+tTTz/rU08/61NPP+sTTz/nkY3tWAqIR2pSzsAAAAAAAAAAAAAAAAAeXl5ADY2Ngnd39+O6tbT/blbSv+1UD7/tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//slA+/6xNPP+rTDv/q0w7/6tMO/+rTDv/q0w7/6tMO/+rTDv/q0w7/6tMO/+qTDv9lkM0jiUQDQlSJR0AAAAAAAAAAAD///8AxMTES/X29u3s2NX/uVtK/7VQPv+1UT//tVE//7VRP/+1UT//tVE//7VRP/+1UT//tVE//7FPPv+qTDv/qEs6/6hLOv+oSzr/qEs6/6hLOv+oSzr/qEs6/6hLOv+oSzr/qEs6/6lLOv+lSTnthDsuS/+TcgAAAAAAm5ubAHBwcA/o6Oix+vv8/+zY1P+5W0r/tVA+/7VRP/+1UT//tVE//7VRP/+1UT//tVE//7VRP/+xTz3/qEs6/6ZKOv+mSjr/pko6/6ZKOv+mSjr/pko6/6ZKOv+mSjr/pko6/6ZKOv+mSjr/pko6/6ZKOv+bRTaxSiEaD2cuJAD///8AycnJRfX19fD6+/z/69fU/7hYR/+0Tjv/tE48/7ROPP+0Tjz/tE48/7ROPP+0Tz3/r04+/6VJOv+jSDn/o0g5/6NIOf+jSDn/o0g5/6NIOf+jSDn/o0g5/6NIOf+jSDr/o0g5/6NIOf+jSDn/o0g6/6BHOfCCOS9F0FxKAAAAAALk5OSN+fn5//n6+v/y5+X/05uS/9CTiP/QlIn/0JSJ/9CUif/QlIn/0JSK/8yGb//AaDb/vWc0/71nNf+9ZzT/vWc0/71nNP+9ZjT/vWY0/71mNP+9ZjT/vGY0/7xmNP+8ZjT/vGY0/7xmNP+8ZjT/u2U0/7FiLY0AAAACk5OTFu/v78X5+fn/+fn5//n5+f/5+vr/+fn5//n5+f/5+fn/+fn5//n5+f/5+/3/99iy//KWI//ylSH/8ZUh//GVIf/xlSH/8ZUh//GVIf/xlSH/8ZUh//GVIf/xlSH/8ZUh//GVIf/xlSH/8ZUh//CUIf/vkyD/5Y0fxY1XExbDw8Mz9PT05fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n7/f/32LL/85cj//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/wlCD/7pIg/+6SIP/pjx/lunIZM9XV1VD39/f0+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fv9//fYsv/zlyP/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/75Mg/+uRH//qkB//6pAf/+iPH/TIfBtQ3d3dYfj4+Pn5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+/3/99iy//OXI//zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh/+6TIP/ojx//548f/+ePH//njx//5o4f+c1/HGHh4eFl+Pj4+vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n7/f/32LL/85cj//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/tkiD/5Y0f/+SNH//ljR//5Y0f/+WNH//kjB/6zn8cZeDg4Fr4+Pj3+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fv9//fYsv/zlyP/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/65Eg/+KMHv/iix7/4ose/+KLHv/iix7/4ose/+CLHvfLfRta3NzcQvf39+/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+/3/99iy//OXI//zliH/85Yh//OWIf/zliH/85Yh//OWIf/zliH/85Yh/+qRIP/gih7/34oe/9+KHv/fih7/34oe/9+KHv/fih7/3Yge78V6GkLS0tIj9fX12fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n7/f/32LH/85Yg//OVHv/zlR7/85Ue//OVHv/zlR7/85Ue//OVIf/pjyH/3ogf/92HH//dhx//3Ycf/92HH//dhx//3Ycf/92HH//ahh7ZunMZI56engjy8vKu+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fr7//jr2f/2ypL/9smP//bJkP/2yZD/9smQ//bJkP/2yZD/5rNI/9OeFP/SnhX/0p4V/9KeFf/SnhX/0Z0V/9GdFf/RnRX/0Z0V/8yWFq6KVBcI////AO3t7Wr5+fn++fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn6//n6/P/5+vz/+fr8//n6/P/5+vz/+fr8//n6/P/h013/0rsA/9O8AP/TvAD/07wA/9O8AP/TvAD/07wA/9O8AP/SvAD+yLMAav/mAADr6+sA4eHhJPb29tv5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/+LSW//TuwD/1LwA/9S8AP/UvAD/1LwA/9S8AP/UvAD/1LwA/9K6ANu/qgAkyLEAALu7uwAAAAAA8vLygfn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/4tJb/9O7AP/UvAD/1LwA/9S8AP/UvAD/1LwA/9S8AP/UvAD/zrYAgQAAAACfjQAAAAAAAOzs7ADk5OQe9vb2zPn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/i0lv/07sA/9S8AP/UvAD/1LwA/9S8AP/UvAD/1LwA/9K6AMzCrAAeybIAAAAAAAAAAAAAsLCwAP///wDv7+9O+Pj47Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/+LSW//TuwD/1LwA/9S8AP/UvAD/1LwA/9S8AP/TuwDsy7QATu7UAACXhQAAAAAAAAAAAAAAAAAA1tbWALS0tAPy8vJv+Pj49Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/4tJb/9O7AP/UvAD/1LwA/9S8AP/UvAD/07wA9M63AG6ZiQADtqIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4uLiANfX1wbz8/Nz+Pj48Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/i0lv/07sA/9S8AP/UvAD/1LwA/9O8APDPuABzuKMABsGrAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+PjANjY2ATy8vJZ+Pj42vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/+HSW//TugD/1LsA/9S8AP/TuwDazrcAWbejAATBqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NTUAB8fHwDw8PAr9vb2nPj4+O35+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/7uas/+bZdv/j1mvt2cYznMu0ACsUFAAAtaEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOvr6wDj4+MG8vLyOvb29pD4+PjS+fn58vn5+f35+fn/+fn5//n5+f/5+fn/+fn5/fn5+fL4+frS9/j8kPT1/Trs8v8G8PP/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADh4eEA1tbWAu/v7xv09PRJ9vb2dvb29pf39/eo9/f3qPb29pf29vZ29PT0Se/v7xvW1tYC4eHhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/gB///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABwAAAA8AAAAPgAAAH4AAAB/AAAA/4AAAf/gAAf/8AAP//wAP/',green:'data:image/vndmicrosofticon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbWJLAEpCMwptYks8eWxTdn1wVpd9cFaXeWxTdm1iSzxKQzMKbWJLAAAAAAAAAAAAAAAAAAAAAAA+OCsAAAAAAXBlTTSBdFmliHpe6Yp8X/2LfWD/i31g/4p8X/2HeV3pf3NYpW5jTDQAAAABPTcqAAAAAAB7e3sAlv//AIB1Xk+HeV3di31g/4t9YP+LfWD/i31g/4t9YP+Je1//h3pd/4d5Xf+DdVrddGhQTwAAAABDPC4A+fn5ANrb3DmupZPfinxf/4t9YP+LfWD/i31g/4t9YP+Iel7/hHdb/4R2W/+Edlv/hHdb/4BzWN9wZU05g3ZaALS0tA3w8PGuu7Sj/4h5W/+Je17/iXte/4t8X/+HeFz/gnNY/4FyWP+Bclj/gXJY/4FyWP+Bclj/fG1Url9NPA3h4eFK9/j48MvFuf+kmoP/ppuF/6abhf+JkHL/c4Rj/3OEY/9zhGP/coNj/3KDY/9yg2P/coNj/3CDYvBgf19K7e3tjPn5+f/39vb/9fTz//X08//09PP/itKw/0m+h/9Mv4n/TL+J/0y/if9Mv4n/TL+J/0y+iP9Lu4b/RrJ/jPHx8bL5+fn/+fn5//n5+f/5+fn/+fn5/4rXtP9Hwon/SsOL/0rDi/9Kw4v/SsOL/0nCiv9HvYb/RruF/0S1gbLz8/O2+fn5//n5+f/5+fn/+fn5//n5+f+K17P/R8KJ/0rDi/9Kw4v/SsOL/0nBif9GuYT/RbaC/0W2gv9Dsn+28vLymfn5+f/5+fn/+fn5//n5+f/5+fn/jdi1/0vDjP9OxI7/TsSO/0rAiv9FtoP/RLKA/0SygP9EsoD/Qq59mfHx8Vz4+Pj3+fn5//n5+f/5+fn/+fn5/9rw5v/H6tn/yOra/8Lp2f9e1b7/O8yz/z3MtP89zLT/Pcuy9zzApVzr6+sY9/f3xvn5+f/5+fn/+fn5//n5+f/7+vr//Pr7//z6+//z+fn/ZuPY/zbczv853c7/Od3O/zjbzcY10sYY////APT09Fb4+Pjy+fn5//n5+f/5+fn/+fn5//n5+f/6+fn/8Pj3/2Xj1/823Mz/OdzN/znczfI42MlWO+XWAOzs7ADm5uYF9vb2ePn5+fT5+fn/+fn5//n5+f/5+fn/+vn5//D49/9j4tf/NdvM/znczfQ42ct4Ncu9BTbRwgAAAAAA8PDwAOzs7Ab29vZd+Pj40vn5+fz5+fn/+fn5//n5+f/z+Pj/jung/FLf0tI42ctdNdHCBjfUxgAAAAAAAAAAAAAAAADn5+cAqKioAPT09CH39/dy+Pj4tvj4+NX4+PjV+Pj4tu329XLO7+whAFQmAGrUygAAAAAAAAAAAPAPAADAAwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCQgGDCsmHRxCOy4tS0M0N0tDNDdCOy4tKyYdHAkIBgwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAVEg4KTUU1MWtgSmx5bVOigHNYx4N2W9uFd1zjhXdc44N2W9uAc1jHeW1TomtgSmxNRjUxFRMOCv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsnHgALCggHWE88PHdrUpqEd1vhiXxf/It9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/iXxf/IR3W+F3a1KaV048PAsKCAcrJx4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///AAPjcqGXJnT4CFeFzki31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+KfWD/iXxf/4l7Xv+DdlrkcGVNgDw2Khn//+sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AFJKOSp9cFavinxf+4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/inxf/4h6Xv+Iel3/iHpd/4h6Xv+GeV37eW1Ur1BINyr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAP//3gBsZ1osgnVbv4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4l8X/+HeV3/hnlc/4Z5XP+GeVz/hnlc/4Z5XP+GeFz/fG9Vv1RLOiz/9LoAAgIBAAAAAAAAAAAAAAAAAAAAAAD19fUAl5ibHcbCurWShGn/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+Je1//hXhc/4R3W/+Fd1v/hXdb/4V3W/+Fd1v/hXdb/4V3W/+Ed1v/eW1TtUlCMh2CdVkAAAAAAAAAAAAAAAAAeXl5ADY2Ngne3t+O4t/Z/ZKFaf+LfV//i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/iXte/4R3W/+Ddlr/g3Za/4N2Wv+Ddlr/g3Za/4N2Wv+Ddlr/g3Za/4N2Wv+CdVr9c2dPjhwZEwk/OSsAAAAAAAAAAAD///8AxMTES/X19u3k4dv/koRp/4t9X/+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4h6Xv+CdVr/gXRZ/4F0Wf+BdFn/gXRZ/4F0Wf+BdFn/gXRZ/4F0Wf+BdFn/gXRZ/4F0Wf9+clftZVtGS/3jrgAAAAAAm5ubAHBwcA/o6Oix+/v7/+Pg2/+ShGn/i31f/4t9YP+LfWD/i31g/4t9YP+LfWD/i31g/4t9YP+Iel7/gXRZ/4BzWP+Ac1j/gHNY/4BzWP+Ac1j/gHNY/4BzWP+Ac1j/gHNY/4BzWP+Ac1j/gHNY/4BzWP93a1KxOTMnD1BHNwD///8AycnJRfX19fD7+/v/4+Da/5CCZ/+Jel3/iXtd/4l7Xf+Je13/iXtd/4l7Xf+Ke17/iHhd/4BxV/9/cFb/f3BW/39wVv9/cFb/f3BW/39wVv9/cFb/f3BW/39wVv9/cFb/f3BW/39wVv9/cFb/f3BW/31uVPBnWURFo45tAAAAAALk5OSN+fn5//r6+v/t7Oj/vLSk/7aunP+3rp3/t66d/7eunf+3rp3/uK+e/6Gmjv9vkG3/bI5r/2yOa/9sjmv/bI5r/2yOa/9sjmv/bI5r/2yOa/9sjmr/bI1q/2yNav9sjWr/bI1q/2uNav9rjWr/a41q/16GZI0AAAACk5OTFu/v78X5+fn/+fn5//n5+f/5+fr/+fn5//n5+f/5+fn/+fn5//n5+f/8+vv/wOfV/0vCi/9Kwor/SsKK/0rCiv9Kwor/SsKK/0rCiv9Kwor/SsKK/0rCiv9Kwor/SsKK/0rCiv9Kwor/SsKK/0nAif9Jv4j/RreCxStxUBbDw8Mz9PT05fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z6+/+/59X/TMSM/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9JwYn/SL6I/0i+iP9GuoXlOJVqM9XV1VD39/f0+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//Pr7/7/n1f9Mw4z/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/ScCJ/0e8hv9HvIb/R7yG/0a6hfQ9oXJQ3d3dYfj4+Pn5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/8+vv/v+fV/0zDjP9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0i/iP9GuoX/RrqE/0a6hP9GuoT/RrmD+T6ldWHh4eFl+Pj4+vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z6+/+/59X/TMOM/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Ivof/RbiD/0W3gv9FuIP/RbiD/0W4g/9Ft4L6PqZ2ZeDg4Fr4+Pj3+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//Pr7/7/n1f9Mw4z/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SL2H/0W2gv9FtYH/RbWB/0W1gf9FtYH/RbWB/0S0gPc+o3Ra3NzcQvf39+/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/8+vv/v+fV/0zDjP9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0rDi/9Kw4v/SsOL/0e8hv9EtID/RLOA/0SzgP9Es4D/RLOA/0SzgP9Es4D/Q7F/7zyecULS0tIj9fX12fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z6+/+/59X/SsOL/0jCiv9Iwor/SMKK/0jCiv9Iwor/SMKK/0rCiv9HuoT/RLF+/0Owff9EsH3/RLB9/0Swff9EsH3/RLB9/0Swff9CrnzZOJZrI56engjy8vKu+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+vn6/9/x6f+l38X/o9/D/6Tfw/+k38P/pN/D/6Tfw/+k38T/a9Kz/0DBof9BwKH/QcCh/0HAof9BwKD/QcCg/0G/oP9Bv6D/Qb+g/0C4mK4tbU4I////AO3t7Wr5+fn++fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+vn6//v6+//7+vv/+/r7//v6+//7+vv//Pr7//v6+/+B597/NdvN/znczf853M3/OdzN/znczf853M3/OdzN/znczf85283+NtHDakb/+gDr6+sA4eHhJPb29tv5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/3/n3f823Mz/OdzN/znczf853M3/OdzN/znczf853M3/OdzN/zjay9s0x7kkNs/BALu7uwAAAAAA8vLygfn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/f+fd/zbbzP853M3/OdzN/znczf853M3/OdzN/znczf853M3/N9XHgQAAAAAspZoAAAAAAOzs7ADk5OQe9vb2zPn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f9/593/NtvM/znczf853M3/OdzN/znczf853M3/OdzN/zjay8w0yrweNtDCAAAAAAAAAAAAsLCwAP///wDv7+9O+Pj47Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/3/n3f8228z/OdzN/znczf853M3/OdzN/znczf8528zsN9PETkD45gAonJEAAAAAAAAAAAAAAAAA1tbWALS0tAPy8vJv+Pj49Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/f+fd/zbbzP853M3/OdzN/znczf853M3/OdvM9DjWx24qoJUDMb2wAAAAAAAAAAAAAAAAAAAAAAAAAAAA4uLiANfX1wbz8/Nz+Pj48Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f9/593/NtvM/znczf853M3/OdzN/znbzPA418hzMr6xBjTIugAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+PjANjY2ATy8vJZ+Pj42vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/37m3f8z28z/N9zN/znczf8528zaONbIWTK/sgQ0yLsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NTUAB8fHwDw8PAr9vb2nPj4+O35+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/vfDr/5Tq4v+L6ODtYODUnDTTxSsAGBsAMrywAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOvr6wDj4+MG8vLyOvb29pD4+PjS+fn58vn5+f35+fn/+fn5//n5+f/5+fn/+fn5/fn5+fL6+PjS+vf3kPv09Tr/6u4G/+/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADh4eEA1tbWAu/v7xv09PRJ9vb2dvb29pf39/eo9/f3qPb29pf29vZ29PT0Se/v7xvW1tYC4eHhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/gB///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABwAAAA8AAAAPgAAAH4AAAB/AAAA/4AAAf/gAAf/8AAP//wAP/',red:'data:image/vndmicrosofticon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQxmbAC0RagpDGZs8ShysdkwdspdMHbKXShysdkMZmzwuEWoKQxmcAAAAAAAAAAAAAAAAAAAAAAAmDlgAAAAAAUQanzRPHrilUx/B6VQgxf1VIMb/VSDG/1Qgxf1TH8DpTh22pUMZnDQAAAABJQ5XAAAAAAB7ensA//8AAFUrr09SH8DdVSDG/1Ugxv9VIMb/VSDG/1Ugxv9UH8P/Ux/B/1IfwP9QHrrdRxqlTwAAAAAoD14A+fn5ANzf1zmMatPfVB7G/1Ugxv9VIMb/VSDG/1Ugxv9TH8L/UR68/1AevP9QHrz/UR68/04dt99EGaA5UB67ALS0sw3x8u+unYDd/1AZxP9THcX/Ux3F/1Qexf9THr//Tx23/08ctv9PHbb/Tx22/08dtv9PHbb/SxuurjkSfg3h4eFK+Pj38LWf5P97UtL/fVXS/31V0/9fOcz/SSfC/0knwP9JJ8D/SSfA/0knwP9JJ8D/SSfA/0gnv/A/KLNK7e3tjPn5+f/29fj/8vD3//Px9//y8Pf/fILz/zQ/8P83QvD/N0Lw/zdC8P83QvD/N0Lw/zdB7/82QOz/Mz3gjPHx8bL5+fn/+fn5//n6+f/5+vn/+fn5/36G9v8yQPT/NkP0/zZD9P82Q/T/NkP0/zVC8v80QOz/M0Dq/zI+47Lz8/O2+fn5//n5+f/5+fn/+fn5//n5+f99hvb/MkD0/zZD9P82Q/T/NkP0/zVC8f8zP+f/Mj7k/zI+5P8xPd628vLymfn5+f/5+fn/+fn5//n5+f/5+fn/gYn2/zdE9P87R/T/O0f0/zZF8P8yQOP/MT/e/zE/3v8xP97/Lz3ZmfHx8Vz4+Pj3+fn5//n5+f/5+fn/+fn5/9fZ+P/Bxfj/wsb4/7vD+P87j/X/Dnzx/xF98f8RffH/EXzw9xZv5Vzr6+sY9/f3xvn5+f/5+fn/+fn5//n5+f/7+/n//Pz5//38+f/x+Pn/OrD+/wCY//8Amf//AJn//wCZ/cYAlPMY////APT09Fb4+Pjy+fn5//n5+f/5+fn/+fn5//n5+f/6+fn/7vX5/zmu/v8Al///AJj//wCY/vIAlfpWAJ//AOzs7ADm5uYF9vb2ePn5+fT5+fn/+fn5//n5+f/5+fn/+vn5/+71+f85rf7/AJb//wCY//QAlvx4AIzrBQCQ8gAAAAAA8PDwAOzs7Ab29vZd+Pj40vn5+fz5+fn/+fn5//n5+f/x9vn/bsP8/CGk/tIAlvxdAJDyBgCT9QAAAAAAAAAAAAAAAADn5+cAqKioAPT09CH39/dy+Pj4tvj4+NX4+PjV+Pj4tuvy93LD4fUhAAC7AESo6wAAAAAAAAAAAPAPAADAAwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBgIMDBoKPRwoD14tLhFrNy4RazcoD14tGgo9HAYCDAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+3/wANBR0KLxJuMUEYmGxKHKyiTh22x1Aeu9tRHr3jUR6941Aeu9tOHbbHShysokEYmGwvEm4xDQUeCv+6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoKPgAHAxAHNhR9PEkbqppRHr3hVCDE/FUgxv9VIMf/VSDH/1Ugxv9VIMb/VSDH/1Ugx/9VIMb/VCDE/FEevOFIG6maNRR8PAcDEAcaCj0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADVUP8AJg5YGUYao4BRH77kVSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMX/VB/E/1Qfw/9QHrvkRRmggCUOVhnQTv8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA////ADITdSpMHbKvVCDE+1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VCDE/1Mfwv9TH8H/Ux/B/1Mfwv9SH7/7ShytrzEScSr///8AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAMto/wBVPoYsUSC3v1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1QfxP9SHsD/Uh6//1Iev/9SHr//Uh6//1Iev/9SHr//SxywvzMTdyymPf8AAQACAAAAAAAAAAAAAAAAAAAAAAD19fUAnaKQHbep1rVfLcn/VB/G/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9UH8P/UR6+/1Eevf9RHr3/UR69/1Eevf9RHr3/UR69/1Eevf9RHr3/ShuttS0RaB1PHrkAAAAAAAAAAAAAAAAAeXl5ADY2Ngnf4NyO18zu/V8tyf9UH8b/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VB/D/1EevP9QHrr/UB67/1Aeu/9QHrv/UB67/1Aeu/9QHrv/UB67/1Aeu/9QHrr9RhqkjhEGKAknDloAAAAAAAAAAAD///8AxMTES/b39O3Zzu//Xy3J/1Qfxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Mfwv9QHbr/Tx24/08duP9PHbj/Tx24/08duP9PHbj/Tx24/08duP9PHbj/Tx24/08duf9NHLTtPheRS5s5/wAAAAAAm5ubAHBwcA/o6Oix+/z6/9jO7/9fLcn/VB/G/1Ugxv9VIMb/VSDG/1Ugxv9VIMb/VSDG/1Ugxv9TH8H/Tx24/04dtv9OHbb/Th22/04dtv9OHbb/Th22/04dtv9OHbb/Th22/04dtv9OHbb/Th22/04dtv9JG6mxIw1RDzAScQD///8AycnJRfX19fD7/Pr/2M3v/1wqyP9SHMX/UhzF/1Icxf9SHMX/UhzF/1Icxf9THcX/Ux7A/04ctf9NHLL/Thyz/04cs/9NHLP/TRyz/00cs/9OHLP/Thyz/04cs/9OHLP/Thyz/04cs/9NHLP/Thyz/0wcsPA/Fo9FYyTkAAAAAALk5OSN+fn5//r6+f/n4vT/noDd/5Z22v+Wdtr/lnba/5Z22v+Wdtr/mHfb/35g1/9KMMr/SC/H/0gvx/9IL8f/SC/H/0gvx/9IL8b/SC/G/0gvxv9HL8b/Ry/G/0cvxv9HL8b/Ry/G/0cvxv9HL8X/Ry7F/z8tuI0AAAACk5OTFu/v78X5+fn/+fn5//n5+f/6+vn/+fr5//n6+f/5+vn/+fr5//n6+f/9/fn/ub73/zhF8v82Q/L/NkPy/zZD8v82Q/L/NkPy/zZD8v82Q/L/NkPy/zZD8v82Q/L/NkPy/zZD8v82Q/L/NkPy/zVC8f81QvD/Mz/mxR8njhbDw8Mz9PT05fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z8+f+5vff/OEX0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P81QvH/NEHv/zRB7/8zQOrlKTO6M9XV1VD39/f0+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//Pz5/7m99/84RfT/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NULw/zRA7P80QOv/NEDr/zNA6fQsN8lQ3d3dYfj4+Pn5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/8/Pn/ub33/zhF9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zVB7/8zQOn/Mz/o/zM/6P8zQOj/Mz/n+S04zmHh4eFl+Pj4+vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z8+f+5vff/OEX0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P80Qe7/Mz/m/zM/5f8zP+b/Mz/m/zM/5v8yP+X6LjnPZeDg4Fr4+Pj3+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//Pz5/7m99/84RfT/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NEHs/zI+4/8yPuP/Mj7j/zI+4/8yPuP/Mj7j/zI+4fctOMxa3NzcQvf39+/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/8/Pn/ub33/zhF9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zZD9P82Q/T/NkP0/zRA6/8xPeH/MT3g/zE94P8xPeD/MT3g/zE94P8xPeD/MT3e7ys2xkLS0tIj9fX12fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//z8+f+4vff/NkP0/zNB9P80QfT/NEH0/zRB9P80QfT/NEH0/zZC8/81P+n/Mjze/zI73f8yO93/Mjvd/zI73f8yO93/Mjvd/zI73f8xO9rZKTO7I56engjy8vKu+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+/r5/9ze+P+covf/mqD3/5qg9/+aoPf/mqD3/5qg9/+aoPf/UoLz/x1p5/8eaeb/Hmnm/x5p5v8eaeX/Hmnl/x5p5f8eaOX/Hmjl/yBh3a4jJokI////AO3t7Wr5+fn++fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+vr5//z8+f/8/Pn//Pz5//z8+f/8/Pn//Pz5//z8+f9dvfz/AJf+/wCZ/v8Amf7/AJn+/wCZ/v8Amf7/AJn+/wCZ/v8AmP7+AJLxagC4/wDr6+sA4eHhJPb29tv5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/1u8/f8Alv//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCW/NsAieckAI/xALu7uwAAAAAA8vLygfn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/W7z9/wCW//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJP3gQAAAAAAcr8AAAAAAOzs7ADk5OQe9vb2zPn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f9bvP3/AJb//wCY//8AmP//AJj//wCY//8AmP//AJj//wCW/MwAi+oeAJDxAAAAAAAAAAAAsLCwAP///wDv7+9O+Pj47Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/1u8/f8Alv//AJj//wCY//8AmP//AJj//wCY//8Al/7sAJL0TgCr/wAAa7QAAAAAAAAAAAAAAAAA1tbWALS0tAPy8vJv+Pj49Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/W7z9/wCW//8AmP//AJj//wCY//8AmP//AJj+9ACU+G4AbrgDAIPaAAAAAAAAAAAAAAAAAAAAAAAAAAAA4uLiANfX1wbz8/Nz+Pj48Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f9bvP3/AJb//wCY//8AmP//AJj//wCY/vAAlflzAITcBgCK5wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+PjANjY2ATy8vJZ+Pj42vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/1u7/f8Alf//AJf//wCY//8Al/7aAJT4WQCE3AQAiucAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NTUAB8fHwDw8PAr9vb2nPj4+O35+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/rNv7/3bG/P9rwfztM6r7nACR9SsAER0AAIPZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOvr6wDj4+MG8vLyOvb29pD4+PjS+fn58vn5+f35+fn/+fn5//n5+f/5+fn/+fn5/fn5+fL6+fjS/Pj2kP338jr/+eIG//fqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADh4eEA1tbWAu/v7xv09PRJ9vb2dvb29pf39/eo9/f3qPb29pf29vZ29PT0Se/v7xvW1tYC4eHhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/gB///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABwAAAA8AAAAPgAAAH4AAAB/AAAA/4AAAf/gAAf/8AAP//wAP/',yellow:'data:image/vndmicrosofticon;base64,AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAZKhQAOWAiAEV0KgBFdCoAOWAiABkqFAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8ZAAAChAHAEp8JwBvu10AgNeSAInluACN7c4Aj/DXAI/w1wCN7c4AieW4AIDXkgBvu10ASnwnAAoQBwA8ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbLgAAAAAFAFmWMwB/1YwAj/DXAJX7+QCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJX7+QCP79cAftWMAFmVMwAAAAUAGy4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7v8AAD1mFQB6zXYAkPLdAJf+/gCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP7/AJf+/wCV/P4AjvDdAHjKdgA8ZBUA6f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AABWkCYAh+KoAJb8+QCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJf+/wCV+v8AlPr/AJT6/wCV+v8Akvf5AIPdqABTjCYA//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICABb//wAka5wqAozquwCY/v8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCX/f8Ak/j/AJP3/wCT9/8Ak/f/AJP3/wCT9/8Akvb/AIbiuwBZlyoA//8AAAECAAAAAAAAAAAAAAAAAAAAAADz8/MAqJaJHZDD5rQLnP7/AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8Alvz/AJL2/wCR9P8AkfT/AJH0/wCR9P8AkfT/AJH0/wCR9P8AkfT/AITftABQhh0AjO0AAAAAAAAAAAAAAAAAfX19ADw8PAni3tuPuuD5/Quc//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJb8/wCQ8/8Aj/H/AI/x/wCP8f8Aj/H/AI/x/wCP8f8Aj/H/AI/x/wCP8f8AjvD9AH7UjwAiOQkASHkAAAAAAAgICAD///8AxcXFT/j19O+94vv/Cpz//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCV+/8Aj/H/AI3u/wCN7v8Aje7/AI3u/wCN7v8Aje7/AI3u/wCN7v8Aje7/AI3u/wCO7v8AiunvAHC8TwD//wAABQgAqKioAHp6ehHp6em3/fv5/7zh+v8KnP//AJj//wCY//8AmP//AJj//wCY//8AmP//AJj//wCY//8Alfr/AI7u/wCM6/8AjOv/AIzr/wCM6/8AjOv/AIzr/wCM6/8AjOv/AIzr/wCM6/8AjOv/AIzr/wCM6/8Ag9y3AERyEQBenQD///8AzMzMTfb29vP9+/n/vOH6/wqb//8Alv//AJb//wCW//8Alv//AJb//wCW//8Al///AJT5/wCL6/8Aiej/AIno/wCJ6P8Aiej/AIno/wCJ6P8Aiej/AIno/wCJ6P8Aiej/AIno/wCJ6P8Aiej/AIno/wCH5fMAb75NAMP/AAAAAAXl5eWX+fn5//v6+f/T6vr/Wbv9/0+3/f9Qt/3/ULf9/1C3/f9Qt/3/Ubj9/zew+/8InO//B5nr/weZ6/8Hmev/B5nq/weZ6v8Hmer/B5nq/weZ6v8Hmer/B5jq/weY6v8HmOn/B5jp/weY6f8HmOn/Bpjp/weP15cBAAAFpKSkHfDw8M/5+fn/+fn5//n5+f/1+Pn/9Pf5//T3+f/09/n/9Pf5//T3+f/4+Pn/o+T6/wq//f8Hv/3/CL/9/wi//f8Iv/3/CL/9/wi//f8Iv/3/CL/8/wi+/P8Ivvz/CL78/wi+/P8Ivvz/CL78/we9+/8HvPr/BrbxzwR9pR3Ly8tA9fX17Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//36+f+l5vv/CcL//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hv/3/Br36/wa9+v8GuvbsBZnLQNra2mD39/f4+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//fr5/6Xm+/8Jwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B778/wa79/8Guvf/Brr3/wa59fgFo9hg4uLidPj4+P35+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/9+vn/peb7/wnB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//we++/8GufX/Brj0/wa49P8GuPT/Brfz/QWm3XTk5OR6+Pj4/fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//36+f+l5vv/CcH//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hvfr/Brfy/wa28f8GtvH/Brbx/wa28f8GtfD9BafdeuXl5W/4+Pj8+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn//fr5/6Xm+/8Jwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B7z5/wa17/8GtO7/BrTu/wa07v8GtO7/BrTu/waz7fwFpdtv4eHhVvj4+Pb5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/9+vn/peb7/wnB//8Hwf//B8H//wfB//8Hwf//B8H//wfB//8Hwf//B8H//we7+P8Gsu3/BrHr/wax6/8Gsev/BrHr/wax6/8Gsev/BrDq9gWh1Vba2toz9vb25vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//36+f+k5fv/BsH//wPA//8DwP//A8D//wPA//8DwP//A8D//wXA//8Guvb/BrDq/wau6P8Gruj/Bq7o/wau6P8Gruj/Bq7o/wau6P8GreXmBZnLM7+/vxH09PTC+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+/r5/83v+v9x2vz/btn9/2/Z/f9v2f3/b9n9/2/Z/f9v2f3/RdL5/yXG7v8mxOz/JsTs/ybE6/8mxOv/JsTr/yXE6/8lw+v/JcPr/yK95cIQirAR////APDw8IH5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+vn5//r5+f/6+fn/+vn5//r5+f/6+fn/+vn5//r5+f+H8Pz/Oer+/zzq/v886v7/POr+/zzq/v886v7/POr+/zzq/v886v3/OuDzgWz//wD09PQA5+fnNPf39+n5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/4Xw/f846///O+v//zvr//876///O+v//zvr//876///O+v//zvp/ek32+00Ouf6AMrKygCzs7MF8/Pzmvn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/hfD9/zjr//876///O+v//zvr//876///O+v//zvr//876///OuX5miqptwUwv88AAAAAAPPz8wDp6eku9/f33fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f+F8P3/OOv//zvr//876///O+v//zvr//876///O+v//zvp/d033O8uOuX5AAAAAAAAAAAAvr6+AP///wDx8fFl+Pj49fn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/4Xw/f846///O+v//zvr//876///O+v//zvr//876v71OeP2ZY7//wAus8IAAAAAAAAAAAAAAAAA4ODgANPT0wj09PSI+fn5+vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/hfD9/zjr//876///O+v//zvr//876///O+v/+jrm+Ygyx9gINdPlAAAAAAAAAAAAAAAAAAAAAAAAAAAA6enpAOHh4Q309PSM+fn5+Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f+F8P3/OOv//zvr//876///O+v//zvr//g65/qMNtXnDTjd7wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6enpAOLi4gr09PRw+Pj45/n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5/4Pw/f816///Oev//zvr//876v7nOub5cDbW5wo33O4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ODgANHR0QLx8fE89/f3sfn5+fX5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+f/5+fn/t/T7/4Xx/f+A8P31Xez8sTnk9zwuxdUCNtTkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAREREAP///wDo6OgM9PT0Tff396T4+Pjf+fn5+Pn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//n5+fj5+Pjf9vf3pPL09E3m6OgM7/3/APtbOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMjIwD19fUA4uLiBvHx8Sn19fVd9vb2jff396739/e99/f3vff396729vaN9fX1XfHx8Snl4uIG9PX1AFEnIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/wD///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABgAAAAcAAAAPgAAAH4AAAB/AAAA/4AAAf/AAAP/8AAP//wAP/KAAAABAAAAAgAAAAAQAgAAAAAAAABAAAEgsAABILAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABorgAAS34IAHTDNQCC22wAh+OMAIfjjACC22wAdMQ1AEx/CABorwAAAAAAAAAAAAAAAAAAAAAAAEBrAAAAAAAAecswAIzsngCU+OUAl/37AJj+/wCY/v8Al/37AJP35QCL6Z4Ad8gwAAAAAAA+aQAAAAAAcXd6AP8AAAAOiNtNAJP32gCY//8AmP//AJj//wCY//8AmP//AJb8/wCU+f8Ak/j/AI7w2gB+1E0AAAAAAEd4APn7/ADc2NU5T7P33gCX//8AmP//AJj//wCY//8AmP//AJX6/wCR8/8AkPL/AJDz/wCQ8/8AjOzeAHrOOQCR9AC3t7cO8e/vsGnA/f8Alf//AJf//wCX//8Al///AJP4/wCN7v8AjOz/AIzs/wCM7P8AjOz/AIzt/wCG4rAAY6oO4uLiT/j39/GIzfz/Mav+/zSs/v80rP7/FaH5/wOV7f8DlOv/A5Tr/wOU6/8DlOv/A5Tr/wOU6/8Dk+jxBIvVT+3t7ZT5+fn/8fb5/+vz+f/r9Pn/6vP5/1nR+/8EvPz/B738/we9/P8Hvfz/B738/we9/P8HvPv/B7r4/wax7ZTy8vK7+fn5//n5+f/6+fn/+vn5//n5+f9e1f3/A8D//wfB//8Hwf//B8H//wfB//8HwP3/Brv3/wa59f8GtO678/Pzwfn5+f/5+fn/+fn5//n5+f/4+fn/XtX9/wPA//8Hwf//B8H//wfB//8Hv/z/Brfz/wa17/8Gte//BrHqwfPz86X5+fn/+fn5//n5+f/5+fn/+Pn5/2DW/f8Gwf//CsL//wrC//8Jv/v/CLXu/wix6f8Isen/CLHp/wet5KXy8vJo+fn5+vn5+f/5+fn/+fn5//n5+f/I7vr/quf7/6zn+/+m5/v/Tdz5/yzV9P8u1fT/LtX0/y7U8/ooyOpo7OzsH/f399D5+fn/+fn5//n5+f/5+fn//Pr5//36+f/++vn/9fn5/2rv/v857P//POz//zzs//886/3QOuLzH////wD09PRh+fn59vn5+f/5+fn/+fn5//n5+f/5+fn/+fn5//H4+f9o7v7/OOv//zvr//876//2Ouf6YUH//wDu7u4A6enpB/b29oT5+fn3+fn5//n5+f/5+fn/+fn5//n5+f/x+Pn/Zu7+/zfr//876//3Ouj8hDfc7wc44PMAAAAAAPHx8QDu7u4I9vb2aPj4+Nn5+fn9+fn5//n5+f/5+fn/8/n5/4zx/P1S7P7ZO+n8aDfh9Ag55PcAAAAAAAAAAAAAAAAA6+vrAN/f3wH19fUo9/f3fvj4+MH4+Pje+Pj43vj4+MHq9vh+w/H2KADM5wFk4e8AAAAAAAAAAADwDwAA4AcAAMADAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAAgAEAAMADAADgBwAA'};return{FaviconsByHue:FaviconsByHue};});'use strict';Polymer('tr-ui-b-info-bar-group',{ready:function(){this.messages_=[];},clearMessages:function(){this.messages_=[];this.updateContents_();},addMessage:function(text,opt_buttons){opt_buttons=opt_buttons||[];for(var i=0;i<opt_buttons.length;i++){if(opt_buttons[i].buttonText===undefined)
+throw new Error('buttonText must be provided');if(opt_buttons[i].onClick===undefined)
+throw new Error('onClick must be provided');}
+this.messages_.push({text:text,buttons:opt_buttons||[]});this.updateContents_();},updateContents_:function(){this.$.messages.textContent='';this.messages_.forEach(function(message){var bar=document.createElement('tr-ui-b-info-bar');bar.message=message.text;bar.visible=true;message.buttons.forEach(function(button){bar.addButton(button.buttonText,button.onClick);},this);this.$.messages.appendChild(bar);},this);}});'use strict';tr.exportTo('tr.ui',function(){var Task=tr.b.Task;function FindController(brushingStateController){this.brushingStateController_=brushingStateController;this.filterHits_=new tr.model.EventSet();this.currentHitIndex_=-1;this.activePromise_=Promise.resolve();this.activeTask_=undefined;};FindController.prototype={__proto__:Object.prototype,get model(){return this.brushingStateController_.model;},get brushingStateController(){return this.brushingStateController_;},enqueueOperation_:function(operation){var task;if(operation instanceof tr.b.Task)
+task=operation;else
+task=new tr.b.Task(operation,this);if(this.activeTask_){this.activeTask_=this.activeTask_.enqueue(task);}else{this.activeTask_=task;this.activePromise_=Task.RunWhenIdle(this.activeTask_);this.activePromise_.then(function(){this.activePromise_=undefined;this.activeTask_=undefined;}.bind(this));}},startFiltering:function(filterText){var sc=this.brushingStateController_;if(!sc)
+return;this.enqueueOperation_(function(){this.filterHits_=new tr.model.EventSet();this.currentHitIndex_=-1;}.bind(this));var stateFromString;try{stateFromString=sc.uiStateFromString(filterText);}catch(e){this.enqueueOperation_(function(){var overlay=new tr.ui.b.Overlay();overlay.textContent=e.message;overlay.title='UI State Navigation Error';overlay.visible=true;});return this.activePromise_;}
+if(stateFromString!==undefined){this.enqueueOperation_(sc.navToPosition.bind(this,stateFromString,true));}else{if(filterText.length===0){this.enqueueOperation_(sc.findTextCleared.bind(sc));}else{var filter=new tr.c.FullTextFilter(filterText);var filterHits=new tr.model.EventSet();this.enqueueOperation_(sc.addAllEventsMatchingFilterToSelectionAsTask(filter,filterHits));this.enqueueOperation_(function(){this.filterHits_=filterHits;sc.findTextChangedTo(filterHits);}.bind(this));}}
+return this.activePromise_;},get filterHits(){return this.filterHits_;},get currentHitIndex(){return this.currentHitIndex_;},find_:function(dir){var firstHit=this.currentHitIndex_===-1;if(firstHit&&dir<0)
+this.currentHitIndex_=0;var N=this.filterHits.length;this.currentHitIndex_=(this.currentHitIndex_+dir+N)%N;if(!this.brushingStateController_)
+return;this.brushingStateController_.findFocusChangedTo(this.filterHits.subEventSet(this.currentHitIndex_,1));},findNext:function(){this.find_(1);},findPrevious:function(){this.find_(-1);}};return{FindController:FindController};});'use strict';tr.exportTo('tr.ui.b',function(){function TimingTool(viewport,targetElement){this.viewport_=viewport;this.onMouseMove_=this.onMouseMove_.bind(this);this.onDblClick_=this.onDblClick_.bind(this);this.targetElement_=targetElement;this.isMovingLeftEdge_=false;};TimingTool.prototype={onEnterTiming:function(e){this.targetElement_.addEventListener('mousemove',this.onMouseMove_);this.targetElement_.addEventListener('dblclick',this.onDblClick_);},onBeginTiming:function(e){if(!this.isTouchPointInsideTrackBounds_(e.clientX,e.clientY))
+return;var pt=this.getSnappedToEventPosition_(e);this.mouseDownAt_(pt.x,pt.y);this.updateSnapIndicators_(pt);},updateSnapIndicators_:function(pt){if(!pt.snapped)
+return;var ir=this.viewport_.interestRange;if(ir.min===pt.x)
+ir.leftSnapIndicator=new tr.ui.SnapIndicator(pt.y,pt.height);if(ir.max===pt.x)
+ir.rightSnapIndicator=new tr.ui.SnapIndicator(pt.y,pt.height);},onUpdateTiming:function(e){var pt=this.getSnappedToEventPosition_(e);this.mouseMoveAt_(pt.x,pt.y,true);this.updateSnapIndicators_(pt);},onEndTiming:function(e){this.mouseUp_();},onExitTiming:function(e){this.targetElement_.removeEventListener('mousemove',this.onMouseMove_);this.targetElement_.removeEventListener('dblclick',this.onDblClick_);},onMouseMove_:function(e){if(e.button)
+return;var worldX=this.getWorldXFromEvent_(e);this.mouseMoveAt_(worldX,e.clientY,false);},onDblClick_:function(e){console.error('not implemented');},isTouchPointInsideTrackBounds_:function(clientX,clientY){if(!this.viewport_||!this.viewport_.modelTrackContainer||!this.viewport_.modelTrackContainer.canvas)
+return false;var canvas=this.viewport_.modelTrackContainer.canvas;var canvasRect=canvas.getBoundingClientRect();if(clientX>=canvasRect.left&&clientX<=canvasRect.right&&clientY>=canvasRect.top&&clientY<=canvasRect.bottom)
+return true;return false;},mouseDownAt_:function(worldX,y){var ir=this.viewport_.interestRange;var dt=this.viewport_.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var nearnessThresholdWorld=dt.xViewVectorToWorld(6*pixelRatio);if(ir.isEmpty){ir.setMinAndMax(worldX,worldX);ir.rightSelected=true;this.isMovingLeftEdge_=false;return;}
+if(Math.abs(worldX-ir.min)<nearnessThresholdWorld){ir.leftSelected=true;ir.min=worldX;this.isMovingLeftEdge_=true;return;}
+if(Math.abs(worldX-ir.max)<nearnessThresholdWorld){ir.rightSelected=true;ir.max=worldX;this.isMovingLeftEdge_=false;return;}
+ir.setMinAndMax(worldX,worldX);ir.rightSelected=true;this.isMovingLeftEdge_=false;},mouseMoveAt_:function(worldX,y,mouseDown){var ir=this.viewport_.interestRange;if(mouseDown){this.updateMovingEdge_(worldX);return;}
+var ir=this.viewport_.interestRange;var dt=this.viewport_.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var nearnessThresholdWorld=dt.xViewVectorToWorld(6*pixelRatio);if(Math.abs(worldX-ir.min)<nearnessThresholdWorld){ir.leftSelected=true;ir.rightSelected=false;return;}
+if(Math.abs(worldX-ir.max)<nearnessThresholdWorld){ir.leftSelected=false;ir.rightSelected=true;return;}
+ir.leftSelected=false;ir.rightSelected=false;return;},updateMovingEdge_:function(newWorldX){var ir=this.viewport_.interestRange;var a=ir.min;var b=ir.max;if(this.isMovingLeftEdge_)
+a=newWorldX;else
+b=newWorldX;if(a<=b)
+ir.setMinAndMax(a,b);else
+ir.setMinAndMax(b,a);if(ir.min==newWorldX){this.isMovingLeftEdge_=true;ir.leftSelected=true;ir.rightSelected=false;}else{this.isMovingLeftEdge_=false;ir.leftSelected=false;ir.rightSelected=true;}},mouseUp_:function(){var dt=this.viewport_.currentDisplayTransform;var ir=this.viewport_.interestRange;ir.leftSelected=false;ir.rightSelected=false;var pixelRatio=window.devicePixelRatio||1;var minWidthValue=dt.xViewVectorToWorld(2*pixelRatio);if(ir.range<minWidthValue)
+ir.reset();},getWorldXFromEvent_:function(e){var pixelRatio=window.devicePixelRatio||1;var canvas=this.viewport_.modelTrackContainer.canvas;var worldOffset=canvas.getBoundingClientRect().left;var viewX=(e.clientX-worldOffset)*pixelRatio;return this.viewport_.currentDisplayTransform.xViewToWorld(viewX);},getSnappedToEventPosition_:function(e){var pixelRatio=window.devicePixelRatio||1;var EVENT_SNAP_RANGE=16*pixelRatio;var modelTrackContainer=this.viewport_.modelTrackContainer;var modelTrackContainerRect=modelTrackContainer.getBoundingClientRect();var viewport=this.viewport_;var dt=viewport.currentDisplayTransform;var worldMaxDist=dt.xViewVectorToWorld(EVENT_SNAP_RANGE);var worldX=this.getWorldXFromEvent_(e);var mouseY=e.clientY;var selection=new tr.model.EventSet();modelTrackContainer.addClosestEventToSelection(worldX,worldMaxDist,mouseY,mouseY,selection);if(!selection.length){modelTrackContainer.addClosestEventToSelection(worldX,worldMaxDist,modelTrackContainerRect.top,modelTrackContainerRect.bottom,selection);}
+var minDistX=worldMaxDist;var minDistY=Infinity;var pixWidth=dt.xViewVectorToWorld(1);var result={x:worldX,y:mouseY-modelTrackContainerRect.top,height:0,snapped:false};var eventBounds=new tr.b.Range();for(var i=0;i<selection.length;i++){var event=selection[i];var track=viewport.trackForEvent(event);var trackRect=track.getBoundingClientRect();eventBounds.reset();event.addBoundsToRange(eventBounds);var eventX;if(Math.abs(eventBounds.min-worldX)<Math.abs(eventBounds.max-worldX)){eventX=eventBounds.min;}else{eventX=eventBounds.max;}
+var distX=eventX-worldX;var eventY=trackRect.top;var eventHeight=trackRect.height;var distY=Math.abs(eventY+eventHeight/2-mouseY);if((distX<=minDistX||Math.abs(distX-minDistX)<pixWidth)&&distY<minDistY){minDistX=distX;minDistY=distY;result.x=eventX;result.y=eventY+
+modelTrackContainer.scrollTop-modelTrackContainerRect.top;result.height=eventHeight;result.snapped=true;}}
+return result;}};return{TimingTool:TimingTool};});'use strict';tr.exportTo('tr.ui',function(){var kDefaultPanAnimationDurationMs=100.0;function TimelineDisplayTransformPanAnimation(deltaX,deltaY,opt_durationMs){this.deltaX=deltaX;this.deltaY=deltaY;if(opt_durationMs===undefined)
+this.durationMs=kDefaultPanAnimationDurationMs;else
+this.durationMs=opt_durationMs;this.startPanX=undefined;this.startPanY=undefined;this.startTimeMs=undefined;}
+TimelineDisplayTransformPanAnimation.prototype={__proto__:tr.ui.b.Animation.prototype,get affectsPanY(){return this.deltaY!==0;},canTakeOverFor:function(existingAnimation){return existingAnimation instanceof TimelineDisplayTransformPanAnimation;},takeOverFor:function(existing,timestamp,target){var remainingDeltaXOnExisting=existing.goalPanX-target.panX;var remainingDeltaYOnExisting=existing.goalPanY-target.panY;var remainingTimeOnExisting=timestamp-(existing.startTimeMs+existing.durationMs);remainingTimeOnExisting=Math.max(remainingTimeOnExisting,0);this.deltaX+=remainingDeltaXOnExisting;this.deltaY+=remainingDeltaYOnExisting;this.durationMs+=remainingTimeOnExisting;},start:function(timestamp,target){this.startTimeMs=timestamp;this.startPanX=target.panX;this.startPanY=target.panY;},tick:function(timestamp,target){var percentDone=(timestamp-this.startTimeMs)/this.durationMs;percentDone=tr.b.clamp(percentDone,0,1);target.panX=tr.b.lerp(percentDone,this.startPanX,this.goalPanX);if(this.affectsPanY)
+target.panY=tr.b.lerp(percentDone,this.startPanY,this.goalPanY);return timestamp>=this.startTimeMs+this.durationMs;},get goalPanX(){return this.startPanX+this.deltaX;},get goalPanY(){return this.startPanY+this.deltaY;}};function TimelineDisplayTransformZoomToAnimation(goalFocalPointXWorld,goalFocalPointXView,goalFocalPointY,zoomInRatioX,opt_durationMs){this.goalFocalPointXWorld=goalFocalPointXWorld;this.goalFocalPointXView=goalFocalPointXView;this.goalFocalPointY=goalFocalPointY;this.zoomInRatioX=zoomInRatioX;if(opt_durationMs===undefined)
+this.durationMs=kDefaultPanAnimationDurationMs;else
+this.durationMs=opt_durationMs;this.startTimeMs=undefined;this.startScaleX=undefined;this.goalScaleX=undefined;this.startPanY=undefined;}
+TimelineDisplayTransformZoomToAnimation.prototype={__proto__:tr.ui.b.Animation.prototype,get affectsPanY(){return this.startPanY!=this.goalFocalPointY;},canTakeOverFor:function(existingAnimation){return false;},takeOverFor:function(existingAnimation,timestamp,target){this.goalScaleX=target.scaleX*this.zoomInRatioX;},start:function(timestamp,target){this.startTimeMs=timestamp;this.startScaleX=target.scaleX;this.goalScaleX=this.zoomInRatioX*target.scaleX;this.startPanY=target.panY;},tick:function(timestamp,target){var percentDone=(timestamp-this.startTimeMs)/this.durationMs;percentDone=tr.b.clamp(percentDone,0,1);target.scaleX=tr.b.lerp(percentDone,this.startScaleX,this.goalScaleX);if(this.affectsPanY){target.panY=tr.b.lerp(percentDone,this.startPanY,this.goalFocalPointY);}
+target.xPanWorldPosToViewPos(this.goalFocalPointXWorld,this.goalFocalPointXView);return timestamp>=this.startTimeMs+this.durationMs;}};return{TimelineDisplayTransformPanAnimation:TimelineDisplayTransformPanAnimation,TimelineDisplayTransformZoomToAnimation:TimelineDisplayTransformZoomToAnimation};});'use strict';tr.exportTo('tr.ui.tracks',function(){var DrawType={GENERAL_EVENT:1,INSTANT_EVENT:2,BACKGROUND:3,GRID:4,FLOW_ARROWS:5,MARKERS:6,HIGHLIGHTS:7,ANNOTATIONS:8};var DrawingContainer=tr.ui.b.define('drawing-container',tr.ui.tracks.Track);DrawingContainer.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('drawing-container');this.canvas_=document.createElement('canvas');this.canvas_.className='drawing-container-canvas';this.canvas_.style.left=tr.ui.b.constants.HEADING_WIDTH+'px';this.appendChild(this.canvas_);this.ctx_=this.canvas_.getContext('2d');this.viewportChange_=this.viewportChange_.bind(this);this.viewport.addEventListener('change',this.viewportChange_);},get canvas(){return this.canvas_;},context:function(){return this.ctx_;},viewportChange_:function(){this.invalidate();},invalidate:function(){if(this.rafPending_)
+return;this.rafPending_=true;tr.b.requestPreAnimationFrame(this.preDraw_,this);},preDraw_:function(){this.rafPending_=false;this.updateCanvasSizeIfNeeded_();tr.b.requestAnimationFrameInThisFrameIfPossible(this.draw_,this);},draw_:function(){this.ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height);var typesToDraw=[DrawType.BACKGROUND,DrawType.HIGHLIGHTS,DrawType.GRID,DrawType.INSTANT_EVENT,DrawType.GENERAL_EVENT,DrawType.MARKERS,DrawType.ANNOTATIONS,DrawType.FLOW_ARROWS];for(var idx in typesToDraw){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
+continue;this.children[i].drawTrack(typesToDraw[idx]);}}
+var pixelRatio=window.devicePixelRatio||1;var bounds=this.canvas_.getBoundingClientRect();var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);this.viewport.drawGridLines(this.ctx_,viewLWorld,viewRWorld);},updateCanvasSizeIfNeeded_:function(){var visibleChildTracks=tr.b.asArray(this.children).filter(this.visibleFilter_);var thisBounds=this.getBoundingClientRect();var firstChildTrackBounds=visibleChildTracks[0].getBoundingClientRect();var lastChildTrackBounds=visibleChildTracks[visibleChildTracks.length-1].getBoundingClientRect();var innerWidth=firstChildTrackBounds.width-
+tr.ui.b.constants.HEADING_WIDTH;var innerHeight=lastChildTrackBounds.bottom-firstChildTrackBounds.top;var pixelRatio=window.devicePixelRatio||1;if(this.canvas_.width!=innerWidth*pixelRatio){this.canvas_.width=innerWidth*pixelRatio;this.canvas_.style.width=innerWidth+'px';}
+if(this.canvas_.height!=innerHeight*pixelRatio){this.canvas_.height=innerHeight*pixelRatio;this.canvas_.style.height=innerHeight+'px';}},visibleFilter_:function(element){if(!(element instanceof tr.ui.tracks.Track))
+return false;return window.getComputedStyle(element).display!=='none';},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
+continue;var trackClientRect=this.children[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b){this.children[i].addClosestEventToSelection(worldX,worldMaxDist,loY,hiY,selection);}}
+tr.ui.tracks.Track.prototype.addClosestEventToSelection.apply(this,arguments);},addEventsToTrackMap:function(eventToTrackMap){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
+continue;this.children[i].addEventsToTrackMap(eventToTrackMap);}}};return{DrawingContainer:DrawingContainer,DrawType:DrawType};});'use strict';tr.exportTo('tr.model',function(){var SelectableItem=tr.model.SelectableItem;var SelectionState=tr.model.SelectionState;function ProxySelectableItem(modelItem){SelectableItem.call(this,modelItem);};ProxySelectableItem.prototype={__proto__:SelectableItem.prototype,get selectionState(){var modelItem=this.modelItem_;if(modelItem===undefined)
+return SelectionState.NONE;return modelItem.selectionState;}};return{ProxySelectableItem:ProxySelectableItem};});'use strict';tr.exportTo('tr.ui.tracks',function(){var EventPresenter=tr.ui.b.EventPresenter;var SelectionState=tr.model.SelectionState;var LetterDotTrack=tr.ui.b.define('letter-dot-track',tr.ui.tracks.Track);LetterDotTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('letter-dot-track');this.items_=undefined;this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},get items(){return this.items_;},set items(items){this.items_=items;this.invalidateDrawingContainer();},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;},get dumpRadiusView(){return 7*(window.devicePixelRatio||1);},draw:function(type,viewLWorld,viewRWorld){if(this.items_===undefined)
+return;switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawLetterDots_(viewLWorld,viewRWorld);break;}},drawLetterDots_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var height=bounds.height*pixelRatio;var halfHeight=height*0.5;var twoPi=Math.PI*2;var dt=this.viewport.currentDisplayTransform;var dumpRadiusView=this.dumpRadiusView;var itemRadiusWorld=dt.xViewVectorToWorld(height);var items=this.items_;var loI=tr.b.findLowIndexInSortedArray(items,function(item){return item.start;},viewLWorld);var oldFont=ctx.font;ctx.font='400 '+Math.floor(9*pixelRatio)+'px Arial';ctx.strokeStyle='rgb(0,0,0)';ctx.textBaseline='middle';ctx.textAlign='center';var drawItems=function(selected){for(var i=loI;i<items.length;++i){var item=items[i];var x=item.start;if(x-itemRadiusWorld>viewRWorld)
+break;if(item.selected!==selected)
+continue;var xView=dt.xWorldToView(x);ctx.fillStyle=EventPresenter.getSelectableItemColorAsString(item);ctx.beginPath();ctx.arc(xView,halfHeight,dumpRadiusView+0.5,0,twoPi);ctx.fill();if(item.selected){ctx.lineWidth=3;ctx.strokeStyle='rgb(100,100,0)';ctx.stroke();ctx.beginPath();ctx.arc(xView,halfHeight,dumpRadiusView,0,twoPi);ctx.lineWidth=1.5;ctx.strokeStyle='rgb(255,255,0)';ctx.stroke();}else{ctx.lineWidth=1;ctx.strokeStyle='rgb(0,0,0)';ctx.stroke();}
+ctx.fillStyle='rgb(255, 255, 255)';ctx.fillText(item.dotLetter,xView,halfHeight);}};drawItems(false);drawItems(true);ctx.lineWidth=1;ctx.font=oldFont;},addEventsToTrackMap:function(eventToTrackMap){if(this.items_===undefined)
+return;this.items_.forEach(function(item){item.addToTrackMap(eventToTrackMap,this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){if(this.items_===undefined)
+return;var itemRadiusWorld=viewPixWidthWorld*this.dumpRadiusView;tr.b.iterateOverIntersectingIntervals(this.items_,function(x){return x.start-itemRadiusWorld;},function(x){return 2*itemRadiusWorld;},loWX,hiWX,function(item){item.addToSelection(selection);}.bind(this));},addEventNearToProvidedEventToSelection:function(event,offset,selection){if(this.items_===undefined)
+return;var items=this.items_;var index=tr.b.findFirstIndexInArray(items,function(item){return item.modelItem===event;});if(index===-1)
+return false;var newIndex=index+offset;if(newIndex>=0&&newIndex<items.length){items[newIndex].addToSelection(selection);return true;}
+return false;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){if(this.items_===undefined)
+return;var item=tr.b.findClosestElementInSortedArray(this.items_,function(x){return x.start;},worldX,worldMaxDist);if(!item)
+return;item.addToSelection(selection);}};function LetterDot(modelItem,dotLetter,colorId,start){tr.model.ProxySelectableItem.call(this,modelItem);this.dotLetter=dotLetter;this.colorId=colorId;this.start=start;};LetterDot.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{LetterDotTrack:LetterDotTrack,LetterDot:LetterDot};});'use strict';tr.exportTo('tr.ui.tracks',function(){var AlertTrack=tr.ui.b.define('alert-track',tr.ui.tracks.LetterDotTrack);AlertTrack.prototype={__proto__:tr.ui.tracks.LetterDotTrack.prototype,decorate:function(viewport){tr.ui.tracks.LetterDotTrack.prototype.decorate.call(this,viewport);this.heading='Alerts';this.alerts_=undefined;},get alerts(){return this.alerts_;},set alerts(alerts){this.alerts_=alerts;if(alerts===undefined){this.items=undefined;return;}
+this.items=this.alerts_.map(function(alert){return new tr.ui.tracks.LetterDot(alert,String.fromCharCode(9888),alert.colorId,alert.start);});}};return{AlertTrack:AlertTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var Task=tr.b.Task;var ContainerTrack=tr.ui.b.define('container-track',tr.ui.tracks.Track);ContainerTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);},detach:function(){this.textContent='';},get tracks_(){var tracks=[];for(var i=0;i<this.children.length;i++){if(this.children[i]instanceof tr.ui.tracks.Track)
+tracks.push(this.children[i]);}
+return tracks;},drawTrack:function(type){this.tracks_.forEach(function(track){track.drawTrack(type);});},addIntersectingEventsInRangeToSelection:function(loVX,hiVX,loY,hiY,selection){for(var i=0;i<this.tracks_.length;i++){var trackClientRect=this.tracks_[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b)
+this.tracks_[i].addIntersectingEventsInRangeToSelection(loVX,hiVX,loY,hiY,selection);}
+tr.ui.tracks.Track.prototype.addIntersectingEventsInRangeToSelection.apply(this,arguments);},addEventsToTrackMap:function(eventToTrackMap){for(var i=0;i<this.children.length;++i)
+this.children[i].addEventsToTrackMap(eventToTrackMap);},addAllEventsMatchingFilterToSelection:function(filter,selection){for(var i=0;i<this.tracks_.length;i++)
+this.tracks_[i].addAllEventsMatchingFilterToSelection(filter,selection);},addAllEventsMatchingFilterToSelectionAsTask:function(filter,selection){var task=new Task();for(var i=0;i<this.tracks_.length;i++){task.subTask(function(i){return function(){this.tracks_[i].addAllEventsMatchingFilterToSelection(filter,selection);}}(i),this);}
+return task;},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){for(var i=0;i<this.tracks_.length;i++){var trackClientRect=this.tracks_[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b){this.tracks_[i].addClosestEventToSelection(worldX,worldMaxDist,loY,hiY,selection);}}
+tr.ui.tracks.Track.prototype.addClosestEventToSelection.apply(this,arguments);},addContainersToTrackMap:function(containerToTrackMap){this.tracks_.forEach(function(track){track.addContainersToTrackMap(containerToTrackMap);});},clearTracks_:function(){this.tracks_.forEach(function(track){this.removeChild(track);},this);}};return{ContainerTrack:ContainerTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartAxis(opt_min,opt_max){this.guid_=tr.b.GUID.allocate();this.bounds=new tr.b.Range();if(opt_min!==undefined)
+this.bounds.addValue(opt_min);if(opt_max!==undefined)
+this.bounds.addValue(opt_max);};ChartAxis.prototype={get guid(){return this.guid_;},valueToUnitRange:function(value){if(this.bounds.isEmpty)
+throw new Error('Chart axis bounds are empty');var bounds=this.bounds;if(bounds.range===0)
+return 0;return(value-bounds.min)/bounds.range;},autoSetFromSeries:function(series,opt_config){var range=new tr.b.Range();series.forEach(function(s){range.addRange(s.range);},this);this.autoSetFromRange(range,opt_config);},autoSetFromRange:function(range,opt_config){if(range.isEmpty)
+return;var bounds=this.bounds;if(bounds.isEmpty){bounds.addRange(range);return;}
+if(!opt_config)
+return;var useRangeMin=(opt_config.expandMin&&range.min<bounds.min||opt_config.shrinkMin&&range.min>bounds.min);var useRangeMax=(opt_config.expandMax&&range.max>bounds.max||opt_config.shrinkMax&&range.max<bounds.max);if(!useRangeMin&&!useRangeMax)
+return;if(useRangeMin&&useRangeMax){bounds.min=range.min;bounds.max=range.max;return;}
+if(useRangeMin){bounds.min=Math.min(range.min,bounds.max);}else{bounds.max=Math.max(range.max,bounds.min);}}};return{ChartAxis:ChartAxis};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartPoint(modelItem,x,y,opt_yBase){tr.model.ProxySelectableItem.call(this,modelItem);this.x=x;this.y=y;this.yBase=opt_yBase;};ChartPoint.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{ChartPoint:ChartPoint};});'use strict';tr.exportTo('tr.ui.tracks',function(){var EventPresenter=tr.ui.b.EventPresenter;var SelectionState=tr.model.SelectionState;var ChartSeriesType={LINE:0,AREA:1};var DEFAULT_RENDERING_CONFIG={chartType:ChartSeriesType.LINE,selectedPointSize:4,unselectedPointSize:3,colorId:0,lineWidth:1,skipDistance:1,unselectedPointDensityTransparent:0.10,unselectedPointDensityOpaque:0.05,backgroundOpacity:0.5};var LAST_POINT_WIDTH=16;var ChartSeriesComponent={BACKGROUND:0,LINE:1,DOTS:2};function ChartSeries(points,axis,opt_renderingConfig){this.points=points;this.axis=axis;this.useRenderingConfig_(opt_renderingConfig);}
+ChartSeries.prototype={useRenderingConfig_:function(opt_renderingConfig){var config=opt_renderingConfig||{};tr.b.iterItems(DEFAULT_RENDERING_CONFIG,function(key,defaultValue){var value=config[key];if(value===undefined)
+value=defaultValue;this[key+'_']=value;},this);this.topPadding=this.bottomPadding=Math.max(this.selectedPointSize_,this.unselectedPointSize_)/2;},get range(){var range=new tr.b.Range();this.points.forEach(function(point){range.addValue(point.y);},this);return range;},draw:function(ctx,transform,highDetails){if(this.points===undefined||this.points.length===0)
+return;if(this.chartType_===ChartSeriesType.AREA){this.drawComponent_(ctx,transform,ChartSeriesComponent.BACKGROUND,highDetails);}
+if(this.chartType_===ChartSeriesType.LINE||highDetails){this.drawComponent_(ctx,transform,ChartSeriesComponent.LINE,highDetails);}
+this.drawComponent_(ctx,transform,ChartSeriesComponent.DOTS,highDetails);},drawComponent_:function(ctx,transform,component,highDetails){var extraPixels=0;if(component===ChartSeriesComponent.DOTS){extraPixels=Math.max(this.selectedPointSize_,this.unselectedPointSize_);}
+var leftViewX=transform.leftViewX-extraPixels*transform.pixelRatio;var rightViewX=transform.rightViewX+
+extraPixels*transform.pixelRatio;var leftTimestamp=transform.leftTimestamp-extraPixels;var rightTimestamp=transform.rightTimestamp+extraPixels;var firstVisibleIndex=tr.b.findLowIndexInSortedArray(this.points,function(point){return point.x;},leftTimestamp);var lastVisibleIndex=tr.b.findLowIndexInSortedArray(this.points,function(point){return point.x;},rightTimestamp);if(lastVisibleIndex>=this.points.length||this.points[lastVisibleIndex].x>rightTimestamp){lastVisibleIndex--;}
+var viewSkipDistance=this.skipDistance_*transform.pixelRatio;var circleRadius;var squareSize;var squareHalfSize;var squareOpacity;switch(component){case ChartSeriesComponent.DOTS:ctx.strokeStyle=EventPresenter.getCounterSeriesColor(this.colorId_,SelectionState.NONE);ctx.lineWidth=transform.pixelRatio;circleRadius=(this.selectedPointSize_/2)*transform.pixelRatio;squareSize=this.unselectedPointSize_*transform.pixelRatio;squareHalfSize=squareSize/2;if(!highDetails){squareOpacity=0;break;}
+var visibleIndexRange=lastVisibleIndex-firstVisibleIndex;if(visibleIndexRange<=0){squareOpacity=1;break;}
+var visibleViewXRange=transform.worldXToViewX(this.points[lastVisibleIndex].x)-
+transform.worldXToViewX(this.points[firstVisibleIndex].x);if(visibleViewXRange===0){squareOpacity=1;break;}
+var density=visibleIndexRange/visibleViewXRange;var clampedDensity=tr.b.clamp(density,this.unselectedPointDensityOpaque_,this.unselectedPointDensityTransparent_);var densityRange=this.unselectedPointDensityTransparent_-
+this.unselectedPointDensityOpaque_;squareOpacity=(this.unselectedPointDensityTransparent_-clampedDensity)/densityRange;break;case ChartSeriesComponent.LINE:ctx.strokeStyle=EventPresenter.getCounterSeriesColor(this.colorId_,SelectionState.NONE);ctx.lineWidth=this.lineWidth_*transform.pixelRatio;break;case ChartSeriesComponent.BACKGROUND:break;default:throw new Error('Invalid component: '+component);}
+var previousViewX=undefined;var previousViewY=undefined;var previousViewYBase=undefined;var lastSelectionState=undefined;var baseSteps=undefined;var startIndex=Math.max(firstVisibleIndex-1,0);for(var i=startIndex;i<this.points.length;i++){var currentPoint=this.points[i];var currentViewX=transform.worldXToViewX(currentPoint.x);if(currentViewX>rightViewX){if(previousViewX!==undefined){previousViewX=currentViewX=rightViewX;if(component===ChartSeriesComponent.BACKGROUND||component===ChartSeriesComponent.LINE){ctx.lineTo(currentViewX,previousViewY);}}
+break;}
+if(i+1<this.points.length){var nextPoint=this.points[i+1];var nextViewX=transform.worldXToViewX(nextPoint.x);if(previousViewX!==undefined&&nextViewX-previousViewX<=viewSkipDistance&&nextViewX<rightViewX){continue;}
+if(currentViewX<leftViewX){currentViewX=leftViewX;}}
+if(previousViewX!==undefined&&currentViewX-previousViewX<viewSkipDistance){currentViewX=previousViewX+viewSkipDistance;}
+var currentViewY=Math.round(transform.worldYToViewY(currentPoint.y));var currentViewYBase;if(currentPoint.yBase===undefined){currentViewYBase=transform.outerBottomViewY;}else{currentViewYBase=Math.round(transform.worldYToViewY(currentPoint.yBase));}
+var currentSelectionState=currentPoint.selectionState;switch(component){case ChartSeriesComponent.DOTS:if(currentSelectionState!==lastSelectionState){if(currentSelectionState===SelectionState.SELECTED){ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState);}else if(squareOpacity>0){ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState,squareOpacity);}}
+if(currentSelectionState===SelectionState.SELECTED){ctx.beginPath();ctx.arc(currentViewX,currentViewY,circleRadius,0,2*Math.PI);ctx.fill();ctx.stroke();}else if(squareOpacity>0){ctx.fillRect(currentViewX-squareHalfSize,currentViewY-squareHalfSize,squareSize,squareSize);}
+break;case ChartSeriesComponent.LINE:if(previousViewX===undefined){ctx.beginPath();ctx.moveTo(currentViewX,currentViewY);}else{ctx.lineTo(currentViewX,previousViewY);}
+ctx.lineTo(currentViewX,currentViewY);break;case ChartSeriesComponent.BACKGROUND:if(previousViewX!==undefined)
+ctx.lineTo(currentViewX,previousViewY);if(currentSelectionState!==lastSelectionState){if(previousViewX!==undefined){var previousBaseStepViewX=currentViewX;for(var j=baseSteps.length-1;j>=0;j--){var baseStep=baseSteps[j];var baseStepViewX=baseStep.viewX;var baseStepViewY=baseStep.viewY;ctx.lineTo(previousBaseStepViewX,baseStepViewY);ctx.lineTo(baseStepViewX,baseStepViewY);previousBaseStepViewX=baseStepViewX;}
+ctx.closePath();ctx.fill();}
+ctx.beginPath();ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState,this.backgroundOpacity_);ctx.moveTo(currentViewX,currentViewYBase);baseSteps=[];}
+if(currentViewYBase!==previousViewYBase||currentSelectionState!==lastSelectionState){baseSteps.push({viewX:currentViewX,viewY:currentViewYBase});}
+ctx.lineTo(currentViewX,currentViewY);break;default:throw new Error('Not reachable');}
+previousViewX=currentViewX;previousViewY=currentViewY;previousViewYBase=currentViewYBase;lastSelectionState=currentSelectionState;}
+if(previousViewX!==undefined){switch(component){case ChartSeriesComponent.DOTS:break;case ChartSeriesComponent.LINE:ctx.stroke();break;case ChartSeriesComponent.BACKGROUND:var previousBaseStepViewX=currentViewX;for(var j=baseSteps.length-1;j>=0;j--){var baseStep=baseSteps[j];var baseStepViewX=baseStep.viewX;var baseStepViewY=baseStep.viewY;ctx.lineTo(previousBaseStepViewX,baseStepViewY);ctx.lineTo(baseStepViewX,baseStepViewY);previousBaseStepViewX=baseStepViewX;}
+ctx.closePath();ctx.fill();break;default:throw new Error('Not reachable');}}},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){var points=this.points;function getPointWidth(point,i){if(i===points.length-1)
+return LAST_POINT_WIDTH*viewPixWidthWorld;var nextPoint=points[i+1];return nextPoint.x-point.x;}
+function selectPoint(point){point.addToSelection(selection);}
+tr.b.iterateOverIntersectingIntervals(this.points,function(point){return point.x},getPointWidth,loWX,hiWX,selectPoint);},addEventNearToProvidedEventToSelection:function(event,offset,selection){if(this.points===undefined)
+return false;var index=tr.b.findFirstIndexInArray(this.points,function(point){return point.modelItem===event;},this);if(index===-1)
+return false;var newIndex=index+offset;if(newIndex<0||newIndex>=this.points.length)
+return false;this.points[newIndex].addToSelection(selection);return true;},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){if(this.points===undefined)
+return;var item=tr.b.findClosestElementInSortedArray(this.points,function(point){return point.x},worldX,worldMaxDist);if(!item)
+return;item.addToSelection(selection);}};return{ChartSeries:ChartSeries,ChartSeriesType:ChartSeriesType};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartTransform(displayTransform,axis,trackWidth,trackHeight,topPadding,bottomPadding,pixelRatio){this.pixelRatio=pixelRatio;this.leftViewX=0;this.rightViewX=trackWidth;this.leftTimestamp=displayTransform.xViewToWorld(this.leftViewX);this.rightTimestamp=displayTransform.xViewToWorld(this.rightViewX);this.displayTransform_=displayTransform;this.outerTopViewY=0;this.innerTopViewY=topPadding;this.innerBottomViewY=trackHeight-bottomPadding;this.outerBottomViewY=trackHeight;this.axis_=axis;this.innerHeight_=this.innerBottomViewY-this.innerTopViewY;};ChartTransform.prototype={worldXToViewX:function(worldX){return this.displayTransform_.xWorldToView(worldX);},viewXToWorldX:function(viewX){return this.displayTransform_.xViewToWorld(viewX);},worldYToViewY:function(worldY){var innerHeightCoefficient=1-this.axis_.valueToUnitRange(worldY);return innerHeightCoefficient*this.innerHeight_+this.innerTopViewY;}};return{ChartTransform:ChartTransform};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ChartTrack=tr.ui.b.define('chart-track',tr.ui.tracks.Track);ChartTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('chart-track');this.series_=undefined;this.axisGuidToAxisData_=undefined;this.topPadding_=undefined;this.bottomPadding_=undefined;this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},get series(){return this.series_;},set series(series){this.series_=series;this.calculateAxisDataAndPadding_();this.invalidateDrawingContainer();},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;this.invalidateDrawingContainer();},get hasVisibleContent(){return!!this.series&&this.series.length>0;},calculateAxisDataAndPadding_:function(){if(!this.series_){this.axisGuidToAxisData_=undefined;this.topPadding_=undefined;this.bottomPadding_=undefined;return;}
+var axisGuidToAxisData={};var topPadding=0;var bottomPadding=0;this.series_.forEach(function(series){var axis=series.axis;var axisGuid=axis.guid;if(!(axisGuid in axisGuidToAxisData)){axisGuidToAxisData[axisGuid]={axis:axis,series:[]};}
+axisGuidToAxisData[axisGuid].series.push(series);topPadding=Math.max(topPadding,series.topPadding);bottomPadding=Math.max(bottomPadding,series.bottomPadding);},this);this.axisGuidToAxisData_=axisGuidToAxisData;this.topPadding_=topPadding;this.bottomPadding_=bottomPadding;},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawChart_(viewLWorld,viewRWorld);break;}},drawChart_:function(viewLWorld,viewRWorld){if(!this.series_)
+return;var ctx=this.context();var displayTransform=this.viewport.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var highDetails=this.viewport.highDetails;var width=bounds.width*pixelRatio;var height=bounds.height*pixelRatio;var topPadding=this.topPadding_*pixelRatio;var bottomPadding=this.bottomPadding_*pixelRatio;ctx.save();ctx.beginPath();ctx.rect(0,0,width,height);ctx.clip();this.series_.forEach(function(series){var chartTransform=new tr.ui.tracks.ChartTransform(displayTransform,series.axis,width,height,topPadding,bottomPadding,pixelRatio);series.draw(ctx,chartTransform,highDetails);},this);ctx.restore();},addEventsToTrackMap:function(eventToTrackMap){this.series_.forEach(function(series){series.points.forEach(function(point){point.addToTrackMap(eventToTrackMap,this);},this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){this.series_.forEach(function(series){series.addIntersectingEventsInRangeToSelectionInWorldSpace(loWX,hiWX,viewPixWidthWorld,selection);},this);},addEventNearToProvidedEventToSelection:function(event,offset,selection){var foundItem=false;this.series_.forEach(function(series){foundItem=foundItem||series.addEventNearToProvidedEventToSelection(event,offset,selection);},this);return foundItem;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){this.series_.forEach(function(series){series.addClosestEventToSelection(worldX,worldMaxDist,loY,hiY,selection);},this);},autoSetAllAxes:function(opt_config){tr.b.iterItems(this.axisGuidToAxisData_,function(axisGuid,axisData){var axis=axisData.axis;var series=axisData.series;axis.autoSetFromSeries(series,opt_config);},this);},autoSetAxis:function(axis,opt_config){var series=this.axisGuidToAxisData_[axis.guid].series;axis.autoSetFromSeries(series,opt_config);}};return{ChartTrack:ChartTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ColorScheme=tr.b.ColorScheme;var ChartTrack=tr.ui.tracks.ChartTrack;var PowerSeriesTrack=tr.ui.b.define('power-series-track',ChartTrack);PowerSeriesTrack.prototype={__proto__:ChartTrack.prototype,decorate:function(viewport){ChartTrack.prototype.decorate.call(this,viewport);this.classList.add('power-series-track');this.heading='Power';this.powerSeries_=undefined;},set powerSeries(powerSeries){this.powerSeries_=powerSeries;this.series=this.buildChartSeries_();this.autoSetAllAxes({expandMax:true});},get hasVisibleContent(){return(this.powerSeries_&&this.powerSeries_.samples.length>0);},addContainersToTrackMap:function(containerToTrackMap){containerToTrackMap.addContainer(this.powerSeries_,this);},buildChartSeries_:function(){if(!this.hasVisibleContent)
+return[];var axis=new tr.ui.tracks.ChartAxis(0,undefined);var pts=this.powerSeries_.samples.map(function(smpl){return new tr.ui.tracks.ChartPoint(smpl,smpl.start,smpl.power);});var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.AREA,colorId:ColorScheme.getColorIdForGeneralPurposeString(this.heading)};return[new tr.ui.tracks.ChartSeries(pts,axis,renderingConfig)];}};return{PowerSeriesTrack:PowerSeriesTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SpacingTrack=tr.ui.b.define('spacing-track',tr.ui.tracks.Track);SpacingTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('spacing-track');this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},addAllEventsMatchingFilterToSelection:function(filter,selection){}};return{SpacingTrack:SpacingTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ContainerTrack=tr.ui.tracks.ContainerTrack;var DeviceTrack=tr.ui.b.define('device-track',ContainerTrack);DeviceTrack.prototype={__proto__:ContainerTrack.prototype,decorate:function(viewport){ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('device-track');this.device_=undefined;this.powerSeriesTrack_=undefined;},get device(){return this.device_;},set device(device){this.device_=device;this.updateContents_();},get powerSeriesTrack(){return this.powerSeriesTrack_;},get hasVisibleContent(){return(this.powerSeriesTrack_&&this.powerSeriesTrack_.hasVisibleContent);},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.ContainerTrack.prototype.addContainersToTrackMap.call(this,containerToTrackMap);containerToTrackMap.addContainer(this.device,this);},addEventsToTrackMap:function(eventToTrackMap){this.tracks_.forEach(function(track){track.addEventsToTrackMap(eventToTrackMap);});},appendPowerSeriesTrack_:function(){this.powerSeriesTrack_=new tr.ui.tracks.PowerSeriesTrack(this.viewport);this.powerSeriesTrack_.powerSeries=this.device.powerSeries;if(this.powerSeriesTrack_.hasVisibleContent){this.appendChild(this.powerSeriesTrack_);this.appendChild(new tr.ui.tracks.SpacingTrack(this.viewport));}},updateContents_:function(){this.clearTracks_();this.appendPowerSeriesTrack_();}};return{DeviceTrack:DeviceTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ColorScheme=tr.b.ColorScheme;var DISPLAYED_SIZE_NUMERIC_NAME=tr.model.MemoryAllocatorDump.DISPLAYED_SIZE_NUMERIC_NAME;var LIGHT=tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;var DETAILED=tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;function addDictionary(dstDict,srcDict){tr.b.iterItems(srcDict,function(key,value){var existingValue=dstDict[key];if(existingValue===undefined)
+existingValue=0;dstDict[key]=existingValue+value;});}
+function getProcessMemoryDumpAllocatorSizes(processMemoryDump){var allocatorDumps=processMemoryDump.memoryAllocatorDumps;if(allocatorDumps===undefined)
+return{};var allocatorSizes={};allocatorDumps.forEach(function(allocatorDump){if(allocatorDump.fullName==='tracing')
+return;var allocatorSize=allocatorDump.numerics[DISPLAYED_SIZE_NUMERIC_NAME];if(allocatorSize===undefined)
+return;var allocatorSizeValue=allocatorSize.value;if(allocatorSizeValue===undefined)
+return;allocatorSizes[allocatorDump.fullName]=allocatorSizeValue;});return allocatorSizes;};function getGlobalMemoryDumpAllocatorSizes(globalMemoryDump){var globalAllocatorSizes={};tr.b.iterItems(globalMemoryDump.processMemoryDumps,function(pid,processMemoryDump){addDictionary(globalAllocatorSizes,getProcessMemoryDumpAllocatorSizes(processMemoryDump));});return globalAllocatorSizes;}
+function buildAllocatedMemoryChartSeries(memoryDumps,memoryDumpToAllocatorSizesFn){var allocatorNameToPoints={};var dumpsData=memoryDumps.map(function(memoryDump){var allocatorSizes=memoryDumpToAllocatorSizesFn(memoryDump);tr.b.iterItems(allocatorSizes,function(allocatorName){allocatorNameToPoints[allocatorName]=[];});return{dump:memoryDump,sizes:allocatorSizes};});if(Object.keys(allocatorNameToPoints).length===0)
+return undefined;dumpsData.forEach(function(dumpData){var memoryDump=dumpData.dump;var allocatorSizes=dumpData.sizes;tr.b.iterItems(allocatorNameToPoints,function(allocatorName,points){var allocatorSize=allocatorSizes[allocatorName]||0;points.push(new tr.ui.tracks.ChartPoint(memoryDump,memoryDump.start,allocatorSize));});});var axis=new tr.ui.tracks.ChartAxis(0);var series=[];tr.b.iterItems(allocatorNameToPoints,function(allocatorName,points){var colorId=ColorScheme.getColorIdForGeneralPurposeString(allocatorName);var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.LINE,colorId:colorId};series.push(new tr.ui.tracks.ChartSeries(points,axis,renderingConfig));});return series;}
+function buildMemoryLetterDots(memoryDumps){var lightMemoryColorId=ColorScheme.getColorIdForReservedName('light_memory_dump');var detailedMemoryColorId=ColorScheme.getColorIdForReservedName('detailed_memory_dump');return memoryDumps.map(function(memoryDump){var memoryColorId;switch(memoryDump.levelOfDetail){case DETAILED:memoryColorId=detailedMemoryColorId;break;case LIGHT:default:memoryColorId=lightMemoryColorId;}
+return new tr.ui.tracks.LetterDot(memoryDump,'M',memoryColorId,memoryDump.start);});}
+function buildGlobalUsedMemoryChartSeries(globalMemoryDumps){var containsVmRegions=globalMemoryDumps.some(function(globalDump){for(var pid in globalDump.processMemoryDumps)
+if(globalDump.processMemoryDumps[pid].mostRecentVmRegions)
+return true;return false;});if(!containsVmRegions)
+return undefined;var pidToProcess={};globalMemoryDumps.forEach(function(globalDump){tr.b.iterItems(globalDump.processMemoryDumps,function(pid,processDump){pidToProcess[pid]=processDump.process;});});var pidToPoints={};tr.b.iterItems(pidToProcess,function(pid,process){pidToPoints[pid]=[];});globalMemoryDumps.forEach(function(globalDump){var pssBase=0;tr.b.iterItems(pidToPoints,function(pid,points){var processMemoryDump=globalDump.processMemoryDumps[pid];var cumulativePss=pssBase;if(processMemoryDump!==undefined){var vmRegions=processMemoryDump.mostRecentVmRegions;if(vmRegions!==undefined)
+cumulativePss+=vmRegions.byteStats.proportionalResident||0;}
+points.push(new tr.ui.tracks.ChartPoint(globalDump,globalDump.start,cumulativePss,pssBase));pssBase=cumulativePss;});});var axis=new tr.ui.tracks.ChartAxis(0);var series=[];tr.b.iterItems(pidToPoints,function(pid,points){var process=pidToProcess[pid];var colorId=ColorScheme.getColorIdForGeneralPurposeString(process.userFriendlyName);var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.AREA,colorId:colorId,backgroundOpacity:0.8};series.push(new tr.ui.tracks.ChartSeries(points,axis,renderingConfig));});series.reverse();return series;}
+function buildProcessAllocatedMemoryChartSeries(processMemoryDumps){return buildAllocatedMemoryChartSeries(processMemoryDumps,getProcessMemoryDumpAllocatorSizes);}
+function buildGlobalAllocatedMemoryChartSeries(globalMemoryDumps){return buildAllocatedMemoryChartSeries(globalMemoryDumps,getGlobalMemoryDumpAllocatorSizes);}
+return{buildMemoryLetterDots:buildMemoryLetterDots,buildGlobalUsedMemoryChartSeries:buildGlobalUsedMemoryChartSeries,buildProcessAllocatedMemoryChartSeries:buildProcessAllocatedMemoryChartSeries,buildGlobalAllocatedMemoryChartSeries:buildGlobalAllocatedMemoryChartSeries};});'use strict';tr.exportTo('tr.ui.tracks',function(){var USED_MEMORY_TRACK_HEIGHT=50;var ALLOCATED_MEMORY_TRACK_HEIGHT=50;var GlobalMemoryDumpTrack=tr.ui.b.define('global-memory-dump-track',tr.ui.tracks.ContainerTrack);GlobalMemoryDumpTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.memoryDumps_=undefined;},get memoryDumps(){return this.memoryDumps_;},set memoryDumps(memoryDumps){this.memoryDumps_=memoryDumps;this.updateContents_();},updateContents_:function(){this.clearTracks_();if(!this.memoryDumps_||!this.memoryDumps_.length)
+return;this.appendDumpDotsTrack_();this.appendUsedMemoryTrack_();this.appendAllocatedMemoryTrack_();},appendDumpDotsTrack_:function(){var items=tr.ui.tracks.buildMemoryLetterDots(this.memoryDumps_);if(!items)
+return;var track=new tr.ui.tracks.LetterDotTrack(this.viewport);track.heading='Memory Dumps';track.items=items;this.appendChild(track);},appendUsedMemoryTrack_:function(){var series=tr.ui.tracks.buildGlobalUsedMemoryChartSeries(this.memoryDumps_);if(!series)
+return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Memory per process';track.height=USED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);},appendAllocatedMemoryTrack_:function(){var series=tr.ui.tracks.buildGlobalAllocatedMemoryChartSeries(this.memoryDumps_);if(!series)
+return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Memory per component';track.height=ALLOCATED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);}};return{GlobalMemoryDumpTrack:GlobalMemoryDumpTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){function Highlighter(viewport){if(viewport===undefined){throw new Error('viewport must be provided');}
+this.viewport_=viewport;};Highlighter.prototype={__proto__:Object.prototype,processModel:function(model){throw new Error('processModel implementation missing');},drawHighlight:function(ctx,dt,viewLWorld,viewRWorld,viewHeight){throw new Error('drawHighlight implementation missing');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Highlighter;tr.b.decorateExtensionRegistry(Highlighter,options);return{Highlighter:Highlighter};});'use strict';tr.exportTo('tr.model',function(){var Settings=tr.b.Settings;function ModelSettings(model){this.model=model;this.objectsByKey_=[];this.nonuniqueKeys_=[];this.buildObjectsByKeyMap_();this.removeNonuniqueKeysFromSettings_();this.ephemeralSettingsByGUID_={};}
+ModelSettings.prototype={buildObjectsByKeyMap_:function(){var objects=[];this.model.iterateAllPersistableObjects(function(o){objects.push(o);});var objectsByKey={};var NONUNIQUE_KEY='nonuniqueKey';for(var i=0;i<objects.length;i++){var object=objects[i];var objectKey=object.getSettingsKey();if(!objectKey)
+continue;if(objectsByKey[objectKey]===undefined){objectsByKey[objectKey]=object;continue;}
+objectsByKey[objectKey]=NONUNIQUE_KEY;}
+var nonuniqueKeys={};tr.b.dictionaryKeys(objectsByKey).forEach(function(objectKey){if(objectsByKey[objectKey]!==NONUNIQUE_KEY)
+return;delete objectsByKey[objectKey];nonuniqueKeys[objectKey]=true;});this.nonuniqueKeys=nonuniqueKeys;this.objectsByKey_=objectsByKey;},removeNonuniqueKeysFromSettings_:function(){var settings=Settings.get('trace_model_settings',{});var settingsChanged=false;tr.b.dictionaryKeys(settings).forEach(function(objectKey){if(!this.nonuniqueKeys[objectKey])
+return;settingsChanged=true;delete settings[objectKey];},this);if(settingsChanged)
+Settings.set('trace_model_settings',settings);},hasUniqueSettingKey:function(object){var objectKey=object.getSettingsKey();if(!objectKey)
+return false;return this.objectsByKey_[objectKey]!==undefined;},getSettingFor:function(object,objectLevelKey,defaultValue){var objectKey=object.getSettingsKey();if(!objectKey||!this.objectsByKey_[objectKey]){var settings=this.getEphemeralSettingsFor_(object);var ephemeralValue=settings[objectLevelKey];if(ephemeralValue!==undefined)
+return ephemeralValue;return defaultValue;}
+var settings=Settings.get('trace_model_settings',{});if(!settings[objectKey])
+settings[objectKey]={};var value=settings[objectKey][objectLevelKey];if(value!==undefined)
+return value;return defaultValue;},setSettingFor:function(object,objectLevelKey,value){var objectKey=object.getSettingsKey();if(!objectKey||!this.objectsByKey_[objectKey]){this.getEphemeralSettingsFor_(object)[objectLevelKey]=value;return;}
+var settings=Settings.get('trace_model_settings',{});if(!settings[objectKey])
+settings[objectKey]={};if(settings[objectKey][objectLevelKey]===value)
+return;settings[objectKey][objectLevelKey]=value;Settings.set('trace_model_settings',settings);},getEphemeralSettingsFor_:function(object){if(object.guid===undefined)
+throw new Error('Only objects with GUIDs can be persisted');if(this.ephemeralSettingsByGUID_[object.guid]===undefined)
+this.ephemeralSettingsByGUID_[object.guid]={};return this.ephemeralSettingsByGUID_[object.guid];}};return{ModelSettings:ModelSettings};});'use strict';tr.exportTo('tr.ui.tracks',function(){var CounterTrack=tr.ui.b.define('counter-track',tr.ui.tracks.ChartTrack);CounterTrack.prototype={__proto__:tr.ui.tracks.ChartTrack.prototype,decorate:function(viewport){tr.ui.tracks.ChartTrack.prototype.decorate.call(this,viewport);this.classList.add('counter-track');},get counter(){return this.chart;},set counter(counter){this.heading=counter.name+': ';this.series=CounterTrack.buildChartSeriesFromCounter(counter);this.autoSetAllAxes({expandMax:true});},getModelEventFromItem:function(chartValue){return chartValue;}};CounterTrack.buildChartSeriesFromCounter=function(counter){var numSeries=counter.series.length;var totals=counter.totals;var chartAxis=new tr.ui.tracks.ChartAxis(0,undefined);var chartSeries=counter.series.map(function(series,seriesIndex){var chartPoints=series.samples.map(function(sample,sampleIndex){var total=totals[sampleIndex*numSeries+seriesIndex];return new tr.ui.tracks.ChartPoint(sample,sample.timestamp,total);});var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.AREA,colorId:series.color};return new tr.ui.tracks.ChartSeries(chartPoints,chartAxis,renderingConfig);});chartSeries.reverse();return chartSeries;};return{CounterTrack:CounterTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var startCompare=function(x,y){return x.start-y.start;}
+var FrameTrack=tr.ui.b.define('frame-track',tr.ui.tracks.LetterDotTrack);FrameTrack.prototype={__proto__:tr.ui.tracks.LetterDotTrack.prototype,decorate:function(viewport){tr.ui.tracks.LetterDotTrack.prototype.decorate.call(this,viewport);this.heading='Frames';this.frames_=undefined;this.items=undefined;},get frames(){return this.frames_;},set frames(frames){this.frames_=frames;if(frames===undefined)
+return;this.frames_=this.frames_.slice();this.frames_.sort(startCompare);this.items=this.frames_.map(function(frame){return new FrameDot(frame);});}};function FrameDot(frame){tr.ui.tracks.LetterDot.call(this,frame,'F',frame.colorId,frame.start);}
+FrameDot.prototype={__proto__:tr.ui.tracks.LetterDot.prototype};return{FrameTrack:FrameTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var MultiRowTrack=tr.ui.b.define('multi-row-track',tr.ui.tracks.ContainerTrack);MultiRowTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.tooltip_='';this.heading_='';this.groupingSource_=undefined;this.itemsToGroup_=undefined;this.defaultToCollapsedWhenSubRowCountMoreThan=1;this.itemsGroupedOnLastUpdateContents_=undefined;this.currentSubRows_=[];this.expanded_=true;},get itemsToGroup(){return this.itemsToGroup_;},setItemsToGroup:function(itemsToGroup,opt_groupingSource){this.itemsToGroup_=itemsToGroup;this.groupingSource_=opt_groupingSource;this.updateContents_();this.updateExpandedStateFromGroupingSource_();},get heading(){return this.heading_;},set heading(h){this.heading_=h;this.updateContents_();},get tooltip(){return this.tooltip_;},set tooltip(t){this.tooltip_=t;this.updateContents_();},get subRows(){return this.currentSubRows_;},get hasVisibleContent(){return this.children.length>0;},get expanded(){return this.expanded_;},set expanded(expanded){if(this.expanded_==expanded)
+return;this.expanded_=expanded;this.expandedStateChanged_();},onHeadingClicked_:function(e){if(this.subRows.length<=1)
+return;this.expanded=!this.expanded;if(this.groupingSource_){var modelSettings=new tr.model.ModelSettings(this.groupingSource_.model);modelSettings.setSettingFor(this.groupingSource_,'expanded',this.expanded);}
+e.stopPropagation();},updateExpandedStateFromGroupingSource_:function(){if(this.groupingSource_){var numSubRows=this.subRows.length;var modelSettings=new tr.model.ModelSettings(this.groupingSource_.model);if(numSubRows>1){var defaultExpanded;if(numSubRows>this.defaultToCollapsedWhenSubRowCountMoreThan){defaultExpanded=false;}else{defaultExpanded=true;}
+this.expanded=modelSettings.getSettingFor(this.groupingSource_,'expanded',defaultExpanded);}else{this.expanded=undefined;}}},expandedStateChanged_:function(){var minH=Math.max(2,Math.ceil(18/this.children.length));var h=(this.expanded_?18:minH)+'px';for(var i=0;i<this.children.length;i++){this.children[i].height=h;if(i===0)
+this.children[i].arrowVisible=true;this.children[i].expanded=this.expanded;}
+if(this.children.length===1){this.children[0].expanded=true;this.children[0].arrowVisible=false;}},updateContents_:function(){tr.ui.tracks.ContainerTrack.prototype.updateContents_.call(this);if(!this.itemsToGroup_){this.updateHeadingAndTooltip_();this.currentSubRows_=[];return;}
+if(this.areArrayContentsSame_(this.itemsGroupedOnLastUpdateContents_,this.itemsToGroup_)){this.updateHeadingAndTooltip_();return;}
+this.itemsGroupedOnLastUpdateContents_=this.itemsToGroup_;this.detach();if(!this.itemsToGroup_.length){this.currentSubRows_=[];return;}
+var subRows=this.buildSubRows_(this.itemsToGroup_);this.currentSubRows_=subRows;for(var srI=0;srI<subRows.length;srI++){var subRow=subRows[srI];if(!subRow.length)
+continue;var track=this.addSubTrack_(subRow);track.addEventListener('heading-clicked',this.onHeadingClicked_.bind(this));}
+this.updateHeadingAndTooltip_();this.expandedStateChanged_();},updateHeadingAndTooltip_:function(){if(!this.firstChild)
+return;this.firstChild.heading=this.heading_;this.firstChild.tooltip=this.tooltip_;},buildSubRows_:function(itemsToGroup){throw new Error('Not implemented');},addSubTrack_:function(subRowItems){throw new Error('Not implemented');},areArrayContentsSame_:function(a,b){if(!a||!b)
+return false;if(!a.length||!b.length)
+return false;if(a.length!=b.length)
+return false;for(var i=0;i<a.length;++i){if(a[i]!=b[i])
+return false;}
+return true;}};return{MultiRowTrack:MultiRowTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ObjectInstanceGroupTrack=tr.ui.b.define('object-instance-group-track',tr.ui.tracks.MultiRowTrack);ObjectInstanceGroupTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.classList.add('object-instance-group-track');this.objectInstances_=undefined;},get objectInstances(){return this.itemsToGroup;},set objectInstances(objectInstances){this.setItemsToGroup(objectInstances);},addSubTrack_:function(objectInstances){var hasMultipleRows=this.subRows.length>1;var track=new tr.ui.tracks.ObjectInstanceTrack(this.viewport);track.objectInstances=objectInstances;this.appendChild(track);return track;},buildSubRows_:function(objectInstances){objectInstances.sort(function(x,y){return x.creationTs-y.creationTs;});var subRows=[];for(var i=0;i<objectInstances.length;i++){var objectInstance=objectInstances[i];var found=false;for(var j=0;j<subRows.length;j++){var subRow=subRows[j];var lastItemInSubRow=subRow[subRow.length-1];if(objectInstance.creationTs>=lastItemInSubRow.deletionTs){found=true;subRow.push(objectInstance);break;}}
+if(!found){var subRow=[objectInstance];subRows.push(subRow);}}
+return subRows;},updateHeadingAndTooltip_:function(){}};return{ObjectInstanceGroupTrack:ObjectInstanceGroupTrack};});'use strict';tr.exportTo('tr.ui.b',function(){function FastRectRenderer(ctx,minRectSize,maxMergeDist,pallette){this.ctx_=ctx;this.minRectSize_=minRectSize;this.maxMergeDist_=maxMergeDist;this.pallette_=pallette;}
+FastRectRenderer.prototype={y_:0,h_:0,merging_:false,mergeStartX_:0,mergeCurRight_:0,mergedColorId_:0,mergedAlpha_:0,setYandH:function(y,h){if(this.y_===y&&this.h_===h)
+return;this.flush();this.y_=y;this.h_=h;},fillRect:function(x,w,colorId,alpha){var r=x+w;if(w<this.minRectSize_){if(r-this.mergeStartX_>this.maxMergeDist_)
+this.flush();if(!this.merging_){this.merging_=true;this.mergeStartX_=x;this.mergeCurRight_=r;this.mergedColorId_=colorId;this.mergedAlpha_=alpha;}else{this.mergeCurRight_=r;if(this.mergedAlpha_<alpha||(this.mergedAlpha_===alpha&&this.mergedColorId_<colorId)){this.mergedAlpha_=alpha;this.mergedColorId_=colorId;}}}else{if(this.merging_)
+this.flush();this.ctx_.fillStyle=this.pallette_[colorId];this.ctx_.globalAlpha=alpha;this.ctx_.fillRect(x,this.y_,w,this.h_);}},flush:function(){if(this.merging_){this.ctx_.fillStyle=this.pallette_[this.mergedColorId_];this.ctx_.globalAlpha=this.mergedAlpha_;this.ctx_.fillRect(this.mergeStartX_,this.y_,this.mergeCurRight_-this.mergeStartX_,this.h_);this.merging_=false;}}};return{FastRectRenderer:FastRectRenderer};});'use strict';tr.exportTo('tr.ui.tracks',function(){var RectTrack=tr.ui.b.define('rect-track',tr.ui.tracks.Track);RectTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('rect-track');this.asyncStyle_=false;this.rects_=null;this.heading_=document.createElement('tr-ui-heading');this.appendChild(this.heading_);},set heading(heading){this.heading_.heading=heading;},get heading(){return this.heading_.heading;},set tooltip(tooltip){this.heading_.tooltip=tooltip;},set selectionGenerator(generator){this.heading_.selectionGenerator=generator;},set expanded(expanded){this.heading_.expanded=!!expanded;},set arrowVisible(arrowVisible){this.heading_.arrowVisible=!!arrowVisible;},get expanded(){return this.heading_.expanded;},get asyncStyle(){return this.asyncStyle_;},set asyncStyle(v){this.asyncStyle_=!!v;},get rects(){return this.rects_;},set rects(rects){this.rects_=rects||[];this.invalidateDrawingContainer();},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;this.invalidateDrawingContainer();},get hasVisibleContent(){return this.rects_.length>0;},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawRects_(viewLWorld,viewRWorld);break;}},drawRects_:function(viewLWorld,viewRWorld){var ctx=this.context();ctx.save();var bounds=this.getBoundingClientRect();tr.ui.b.drawSlices(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,bounds.height,this.rects_,this.asyncStyle_);ctx.restore();if(bounds.height<=6)
+return;var fontSize,yOffset;if(bounds.height<15){fontSize=6;yOffset=1.0;}else{fontSize=10;yOffset=2.5;}
+tr.ui.b.drawLabels(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,this.rects_,this.asyncStyle_,fontSize,yOffset);},addEventsToTrackMap:function(eventToTrackMap){if(this.rects_===undefined||this.rects_===null)
+return;this.rects_.forEach(function(rect){rect.addToTrackMap(eventToTrackMap,this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onRect(rect){rect.addToSelection(selection);}
+onRect=onRect.bind(this);var instantEventWidth=2*viewPixWidthWorld;tr.b.iterateOverIntersectingIntervals(this.rects_,function(x){return x.start;},function(x){return x.duration==0?x.duration+instantEventWidth:x.duration;},loWX,hiWX,onRect);},addEventNearToProvidedEventToSelection:function(event,offset,selection){var index=tr.b.findFirstIndexInArray(this.rects_,function(rect){return rect.modelItem===event;});if(index===-1)
+return false;var newIndex=index+offset;if(newIndex<0||newIndex>=this.rects_.length)
+return false;this.rects_[newIndex].addToSelection(selection);return true;},addAllEventsMatchingFilterToSelection:function(filter,selection){for(var i=0;i<this.rects_.length;++i){var modelItem=this.rects_[i].modelItem;if(!modelItem)
+continue;if(filter.matchSlice(modelItem))
+selection.push(modelItem);}},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){var rect=tr.b.findClosestIntervalInSortedIntervals(this.rects_,function(x){return x.start;},function(x){return x.end;},worldX,worldMaxDist);if(!rect)
+return;rect.addToSelection(selection);}};function Rect(modelItem,title,colorId,start,duration){tr.model.ProxySelectableItem.call(this,modelItem);this.title=title;this.colorId=colorId;this.start=start;this.duration=duration;this.end=start+duration;};Rect.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{RectTrack:RectTrack,Rect:Rect};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ColorScheme=tr.b.ColorScheme;var ProcessSummaryTrack=tr.ui.b.define('process-summary-track',tr.ui.tracks.RectTrack);ProcessSummaryTrack.buildRectsFromProcess=function(process){if(!process)
+return[];var ops=[];var pushOp=function(isStart,time,slice){ops.push({isStart:isStart,time:time,slice:slice});};for(var tid in process.threads){var sliceGroup=process.threads[tid].sliceGroup;sliceGroup.topLevelSlices.forEach(function(slice){pushOp(true,slice.start,undefined);pushOp(false,slice.end,undefined);});sliceGroup.slices.forEach(function(slice){if(slice.important){pushOp(true,slice.start,slice);pushOp(false,slice.end,slice);}});}
+ops.sort(function(a,b){return a.time-b.time;});var rects=[];var genericColorId=ColorScheme.getColorIdForReservedName('generic_work');var pushRect=function(start,end,slice){rects.push(new tr.ui.tracks.Rect(slice,slice?slice.title:'',slice?slice.colorId:genericColorId,start,end-start));}
+var depth=0;var currentSlice=undefined;var lastStart=undefined;ops.forEach(function(op){depth+=op.isStart?1:-1;if(currentSlice){if(!op.isStart&&op.slice==currentSlice){pushRect(lastStart,op.time,currentSlice);lastStart=depth>=1?op.time:undefined;currentSlice=undefined;}}else{if(op.isStart){if(depth==1){lastStart=op.time;currentSlice=op.slice;}else if(op.slice){if(op.time!=lastStart){pushRect(lastStart,op.time,undefined);lastStart=op.time;}
+currentSlice=op.slice;}}else{if(depth==0){pushRect(lastStart,op.time,undefined);lastStart=undefined;}}}});return rects;};ProcessSummaryTrack.prototype={__proto__:tr.ui.tracks.RectTrack.prototype,decorate:function(viewport){tr.ui.tracks.RectTrack.prototype.decorate.call(this,viewport);},get process(){return this.process_;},set process(process){this.process_=process;this.rects=ProcessSummaryTrack.buildRectsFromProcess(process);}};return{ProcessSummaryTrack:ProcessSummaryTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SliceTrack=tr.ui.b.define('slice-track',tr.ui.tracks.RectTrack);SliceTrack.prototype={__proto__:tr.ui.tracks.RectTrack.prototype,decorate:function(viewport){tr.ui.tracks.RectTrack.prototype.decorate.call(this,viewport);},get slices(){return this.rects;},set slices(slices){this.rects=slices;}};return{SliceTrack:SliceTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var AsyncSliceGroupTrack=tr.ui.b.define('async-slice-group-track',tr.ui.tracks.MultiRowTrack);AsyncSliceGroupTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.classList.add('async-slice-group-track');this.group_=undefined;},addSubTrack_:function(slices){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;this.appendChild(track);track.asyncStyle=true;return track;},get group(){return this.group_;},set group(group){this.group_=group;this.setItemsToGroup(this.group_.slices,this.group_);},get eventContainer(){return this.group;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.MultiRowTrack.prototype.addContainersToTrackMap.apply(this,arguments);containerToTrackMap.addContainer(this.group,this);},buildSubRows_:function(slices,opt_skipSort){if(!opt_skipSort){slices.sort(function(x,y){return x.start-y.start;});}
+var findLevel=function(sliceToPut,rows,n){if(n>=rows.length)
+return true;var subRow=rows[n];var lastSliceInSubRow=subRow[subRow.length-1];if(sliceToPut.start>=lastSliceInSubRow.end){if(sliceToPut.subSlices===undefined||sliceToPut.subSlices.length===0){return true;}
+for(var i=0;i<sliceToPut.subSlices.length;i++){if(!findLevel(sliceToPut.subSlices[i],rows,n+1))
+return false;}
+return true;}
+return false;};var subRows=[];for(var i=0;i<slices.length;i++){var slice=slices[i];var found=false;var index=subRows.length;for(var j=0;j<subRows.length;j++){if(findLevel(slice,subRows,j)){found=true;index=j;break;}}
+if(!found)
+subRows.push([]);subRows[index].push(slice);var fitSubSlicesRecursively=function(subSlices,level,rows){if(subSlices===undefined||subSlices.length===0)
+return;if(level===rows.length)
+rows.push([]);for(var h=0;h<subSlices.length;h++){rows[level].push(subSlices[h]);fitSubSlicesRecursively(subSlices[h].subSlices,level+1,rows);}};fitSubSlicesRecursively(slice.subSlices,index+1,subRows);}
+return subRows;}};return{AsyncSliceGroupTrack:AsyncSliceGroupTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SampleTrack=tr.ui.b.define('sample-track',tr.ui.tracks.RectTrack);SampleTrack.prototype={__proto__:tr.ui.tracks.RectTrack.prototype,decorate:function(viewport){tr.ui.tracks.RectTrack.prototype.decorate.call(this,viewport);},get samples(){return this.rects;},set samples(samples){this.rects=samples;}};return{SampleTrack:SampleTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SliceGroupTrack=tr.ui.b.define('slice-group-track',tr.ui.tracks.MultiRowTrack);SliceGroupTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.classList.add('slice-group-track');this.group_=undefined;this.defaultToCollapsedWhenSubRowCountMoreThan=100;},addSubTrack_:function(slices){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;this.appendChild(track);return track;},get group(){return this.group_;},set group(group){this.group_=group;this.setItemsToGroup(this.group_.slices,this.group_);},get eventContainer(){return this.group;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.MultiRowTrack.prototype.addContainersToTrackMap.apply(this,arguments);containerToTrackMap.addContainer(this.group,this);},buildSubRows_:function(slices){var precisionUnit=this.group.model.intrinsicTimeUnit;if(!slices.length)
+return[];var ops=[];for(var i=0;i<slices.length;i++){if(slices[i].subSlices)
+slices[i].subSlices.splice(0,slices[i].subSlices.length);ops.push(i);}
+ops.sort(function(ix,iy){var x=slices[ix];var y=slices[iy];if(x.start!=y.start)
+return x.start-y.start;return ix-iy;});var subRows=[[]];this.badSlices_=[];for(var i=0;i<ops.length;i++){var op=ops[i];var slice=slices[op];var inserted=false;for(var j=subRows.length-1;j>=0;j--){if(subRows[j].length==0)
+continue;var insertedSlice=subRows[j][subRows[j].length-1];if(slice.start<insertedSlice.start){this.badSlices_.push(slice);inserted=true;}
+if(insertedSlice.bounds(slice,precisionUnit)){while(subRows.length<=j+1)
+subRows.push([]);subRows[j+1].push(slice);if(insertedSlice.subSlices)
+insertedSlice.subSlices.push(slice);inserted=true;break;}}
+if(inserted)
+continue;subRows[0].push(slice);}
+return subRows;}};return{SliceGroupTrack:SliceGroupTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ThreadTrack=tr.ui.b.define('thread-track',tr.ui.tracks.ContainerTrack);ThreadTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('thread-track');},get thread(){return this.thread_;},set thread(thread){this.thread_=thread;this.updateContents_();},get hasVisibleContent(){return this.tracks_.length>0;},get eventContainer(){return this.thread;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.ContainerTrack.prototype.addContainersToTrackMap.apply(this,arguments);containerToTrackMap.addContainer(this.thread,this);},updateContents_:function(){this.detach();if(!this.thread_)
+return;this.heading=this.thread_.userFriendlyName+': ';this.tooltip=this.thread_.userFriendlyDetails;if(this.thread_.asyncSliceGroup.length)
+this.appendAsyncSliceTracks_();this.appendThreadSamplesTracks_();if(this.thread_.timeSlices){var timeSlicesTrack=new tr.ui.tracks.SliceTrack(this.viewport);timeSlicesTrack.heading='';timeSlicesTrack.height=tr.ui.b.THIN_SLICE_HEIGHT+'px';timeSlicesTrack.slices=this.thread_.timeSlices;if(timeSlicesTrack.hasVisibleContent)
+this.appendChild(timeSlicesTrack);}
+if(this.thread_.sliceGroup.length){var track=new tr.ui.tracks.SliceGroupTrack(this.viewport);track.heading=this.thread_.userFriendlyName;track.tooltip=this.thread_.userFriendlyDetails;track.group=this.thread_.sliceGroup;if(track.hasVisibleContent)
+this.appendChild(track);}},appendAsyncSliceTracks_:function(){var subGroups=this.thread_.asyncSliceGroup.viewSubGroups;subGroups.forEach(function(subGroup){var asyncTrack=new tr.ui.tracks.AsyncSliceGroupTrack(this.viewport);var title=subGroup.slices[0].viewSubGroupTitle;asyncTrack.group=subGroup;asyncTrack.heading=title;if(asyncTrack.hasVisibleContent)
+this.appendChild(asyncTrack);},this);},appendThreadSamplesTracks_:function(){var threadSamples=this.thread_.samples;if(threadSamples===undefined||threadSamples.length===0)
+return;var samplesByTitle={};threadSamples.forEach(function(sample){if(samplesByTitle[sample.title]===undefined)
+samplesByTitle[sample.title]=[];samplesByTitle[sample.title].push(sample);});var sampleTitles=tr.b.dictionaryKeys(samplesByTitle);sampleTitles.sort();sampleTitles.forEach(function(sampleTitle){var samples=samplesByTitle[sampleTitle];var samplesTrack=new tr.ui.tracks.SampleTrack(this.viewport);samplesTrack.group=this.thread_;samplesTrack.samples=samples;samplesTrack.heading=this.thread_.userFriendlyName+': '+
+sampleTitle;samplesTrack.tooltip=this.thread_.userFriendlyDetails;samplesTrack.selectionGenerator=function(){var selection=new tr.model.EventSet();for(var i=0;i<samplesTrack.samples.length;i++){selection.push(samplesTrack.samples[i]);}
+return selection;};this.appendChild(samplesTrack);},this);},collapsedDidChange:function(collapsed){if(collapsed){var h=parseInt(this.tracks[0].height);for(var i=0;i<this.tracks.length;++i){if(h>2){this.tracks[i].height=Math.floor(h)+'px';}else{this.tracks[i].style.display='none';}
+h=h*0.5;}}else{for(var i=0;i<this.tracks.length;++i){this.tracks[i].height=this.tracks[0].height;this.tracks[i].style.display='';}}}};return{ThreadTrack:ThreadTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ObjectSnapshotView=tr.ui.analysis.ObjectSnapshotView;var ObjectInstanceView=tr.ui.analysis.ObjectInstanceView;var SpacingTrack=tr.ui.tracks.SpacingTrack;var ProcessTrackBase=tr.ui.b.define('process-track-base',tr.ui.tracks.ContainerTrack);ProcessTrackBase.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.processBase_=undefined;this.classList.add('process-track-base');this.classList.add('expanded');this.processNameEl_=tr.ui.b.createSpan();this.processNameEl_.classList.add('process-track-name');this.headerEl_=tr.ui.b.createDiv({className:'process-track-header'});this.headerEl_.appendChild(this.processNameEl_);this.headerEl_.addEventListener('click',this.onHeaderClick_.bind(this));this.appendChild(this.headerEl_);},get processBase(){return this.processBase_;},set processBase(processBase){this.processBase_=processBase;if(this.processBase_){var modelSettings=new tr.model.ModelSettings(this.processBase_.model);var defaultValue=this.processBase_.important;this.expanded=modelSettings.getSettingFor(this.processBase_,'expanded',defaultValue);}
+this.updateContents_();},get expanded(){return this.classList.contains('expanded');},set expanded(expanded){expanded=!!expanded;if(this.expanded===expanded)
+return;this.classList.toggle('expanded');this.viewport_.dispatchChangeEvent();if(!this.processBase_)
+return;var modelSettings=new tr.model.ModelSettings(this.processBase_.model);modelSettings.setSettingFor(this.processBase_,'expanded',expanded);this.updateContents_();this.viewport.rebuildEventToTrackMap();this.viewport.rebuildContainerToTrackMap();},get hasVisibleContent(){if(this.expanded)
+return this.children.length>1;return true;},onHeaderClick_:function(e){e.stopPropagation();e.preventDefault();this.expanded=!this.expanded;},updateContents_:function(){this.clearTracks_();if(!this.processBase_)
+return;this.processNameEl_.textContent=this.processBase_.userFriendlyName;this.headerEl_.title=this.processBase_.userFriendlyDetails;this.willAppendTracks_();if(this.expanded){this.appendMemoryDumpTrack_();this.appendObjectInstanceTracks_();this.appendCounterTracks_();this.appendFrameTrack_();this.appendThreadTracks_();}else{this.appendSummaryTrack_();}
+this.didAppendTracks_();},addEventsToTrackMap:function(eventToTrackMap){this.tracks_.forEach(function(track){track.addEventsToTrackMap(eventToTrackMap);});},willAppendTracks_:function(){},didAppendTracks_:function(){},appendMemoryDumpTrack_:function(){},appendSummaryTrack_:function(){var track=new tr.ui.tracks.ProcessSummaryTrack(this.viewport);track.process=this.process;if(!track.hasVisibleContent)
+return;this.appendChild(track);},appendFrameTrack_:function(){var frames=this.process?this.process.frames:undefined;if(!frames||!frames.length)
+return;var track=new tr.ui.tracks.FrameTrack(this.viewport);track.frames=frames;this.appendChild(track);},appendObjectInstanceTracks_:function(){var instancesByTypeName=this.processBase_.objects.getAllInstancesByTypeName();var instanceTypeNames=tr.b.dictionaryKeys(instancesByTypeName);instanceTypeNames.sort();var didAppendAtLeastOneTrack=false;instanceTypeNames.forEach(function(typeName){var allInstances=instancesByTypeName[typeName];var instanceViewInfo=ObjectInstanceView.getTypeInfo(undefined,typeName);var snapshotViewInfo=ObjectSnapshotView.getTypeInfo(undefined,typeName);if(instanceViewInfo&&!instanceViewInfo.metadata.showInTrackView)
+instanceViewInfo=undefined;if(snapshotViewInfo&&!snapshotViewInfo.metadata.showInTrackView)
+snapshotViewInfo=undefined;var hasViewInfo=instanceViewInfo||snapshotViewInfo;var visibleInstances=[];for(var i=0;i<allInstances.length;i++){var instance=allInstances[i];if(instance.snapshots.length===0)
+continue;if(instance.hasImplicitSnapshots&&!hasViewInfo)
+continue;visibleInstances.push(instance);}
+if(visibleInstances.length===0)
+return;var trackConstructor=tr.ui.tracks.ObjectInstanceTrack.getConstructor(undefined,typeName);if(!trackConstructor){var snapshotViewInfo=ObjectSnapshotView.getTypeInfo(undefined,typeName);if(snapshotViewInfo&&snapshotViewInfo.metadata.showInstances){trackConstructor=tr.ui.tracks.ObjectInstanceGroupTrack;}else{trackConstructor=tr.ui.tracks.ObjectInstanceTrack;}}
+var track=new trackConstructor(this.viewport);track.objectInstances=visibleInstances;this.appendChild(track);didAppendAtLeastOneTrack=true;},this);if(didAppendAtLeastOneTrack)
+this.appendChild(new SpacingTrack(this.viewport));},appendCounterTracks_:function(){var counters=tr.b.dictionaryValues(this.processBase.counters);counters.sort(tr.model.Counter.compare);counters.forEach(function(counter){var track=new tr.ui.tracks.CounterTrack(this.viewport);track.counter=counter;this.appendChild(track);this.appendChild(new SpacingTrack(this.viewport));}.bind(this));},appendThreadTracks_:function(){var threads=tr.b.dictionaryValues(this.processBase.threads);threads.sort(tr.model.Thread.compare);threads.forEach(function(thread){var track=new tr.ui.tracks.ThreadTrack(this.viewport);track.thread=thread;if(!track.hasVisibleContent)
+return;this.appendChild(track);this.appendChild(new SpacingTrack(this.viewport));}.bind(this));}};return{ProcessTrackBase:ProcessTrackBase};});'use strict';tr.exportTo('tr.ui.tracks',function(){var CpuTrack=tr.ui.b.define('cpu-track',tr.ui.tracks.ContainerTrack);CpuTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('cpu-track');this.detailedMode_=true;},get cpu(){return this.cpu_;},set cpu(cpu){this.cpu_=cpu;this.updateContents_();},get detailedMode(){return this.detailedMode_;},set detailedMode(detailedMode){this.detailedMode_=detailedMode;this.updateContents_();},get tooltip(){return this.tooltip_;},set tooltip(value){this.tooltip_=value;this.updateContents_();},get hasVisibleContent(){if(this.cpu_===undefined)
+return false;var cpu=this.cpu_;if(cpu.slices.length)
+return true;if(cpu.samples&&cpu.samples.length)
+return true;if(tr.b.dictionaryLength(cpu.counters)>0)
+return true;return false;},updateContents_:function(){this.detach();if(!this.cpu_)
+return;var slices=this.cpu_.slices;if(slices.length){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;track.heading=this.cpu_.userFriendlyName+':';this.appendChild(track);}
+if(this.detailedMode_){this.appendSamplesTracks_();for(var counterName in this.cpu_.counters){var counter=this.cpu_.counters[counterName];track=new tr.ui.tracks.CounterTrack(this.viewport);track.heading=this.cpu_.userFriendlyName+' '+
+counter.name+':';track.counter=counter;this.appendChild(track);}}},appendSamplesTracks_:function(){var samples=this.cpu_.samples;if(samples===undefined||samples.length===0)
+return;var samplesByTitle={};samples.forEach(function(sample){if(samplesByTitle[sample.title]===undefined)
+samplesByTitle[sample.title]=[];samplesByTitle[sample.title].push(sample);});var sampleTitles=tr.b.dictionaryKeys(samplesByTitle);sampleTitles.sort();sampleTitles.forEach(function(sampleTitle){var samples=samplesByTitle[sampleTitle];var samplesTrack=new tr.ui.tracks.SliceTrack(this.viewport);samplesTrack.group=this.cpu_;samplesTrack.slices=samples;samplesTrack.heading=this.cpu_.userFriendlyName+': '+
+sampleTitle;samplesTrack.tooltip=this.cpu_.userFriendlyDetails;samplesTrack.selectionGenerator=function(){var selection=new tr.model.EventSet();for(var i=0;i<samplesTrack.slices.length;i++){selection.push(samplesTrack.slices[i]);}
+return selection;};this.appendChild(samplesTrack);},this);}};return{CpuTrack:CpuTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var Cpu=tr.model.Cpu;var CpuTrack=tr.ui.tracks.cpu_track;var ProcessTrackBase=tr.ui.tracks.ProcessTrackBase;var SpacingTrack=tr.ui.tracks.SpacingTrack;var KernelTrack=tr.ui.b.define('kernel-track',ProcessTrackBase);KernelTrack.prototype={__proto__:ProcessTrackBase.prototype,decorate:function(viewport){ProcessTrackBase.prototype.decorate.call(this,viewport);},set kernel(kernel){this.processBase=kernel;},get kernel(){return this.processBase;},get eventContainer(){return this.kernel;},get hasVisibleContent(){return this.children.length>1;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.ProcessTrackBase.prototype.addContainersToTrackMap.call(this,containerToTrackMap);containerToTrackMap.addContainer(this.kernel,this);},willAppendTracks_:function(){var cpus=tr.b.dictionaryValues(this.kernel.cpus);cpus.sort(tr.model.Cpu.compare);var didAppendAtLeastOneTrack=false;for(var i=0;i<cpus.length;++i){var cpu=cpus[i];var track=new tr.ui.tracks.CpuTrack(this.viewport);track.detailedMode=this.expanded;track.cpu=cpu;if(!track.hasVisibleContent)
+continue;this.appendChild(track);didAppendAtLeastOneTrack=true;}
+if(didAppendAtLeastOneTrack)
+this.appendChild(new SpacingTrack(this.viewport));}};return{KernelTrack:KernelTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var InteractionTrack=tr.ui.b.define('interaction-track',tr.ui.tracks.MultiRowTrack);InteractionTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.heading='Interactions';this.subRows_=[];},set model(model){this.setItemsToGroup(model.userModel.expectations,{guid:tr.b.GUID.allocate(),model:model,getSettingsKey:function(){return undefined;}});},buildSubRows_:function(slices){if(this.subRows_.length)
+return this.subRows_;this.subRows_.push.apply(this.subRows_,tr.ui.tracks.AsyncSliceGroupTrack.prototype.buildSubRows_.call({},slices,true));return this.subRows_;},addSubTrack_:function(slices){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;this.appendChild(track);return track;}};return{InteractionTrack:InteractionTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ALLOCATED_MEMORY_TRACK_HEIGHT=50;var ProcessMemoryDumpTrack=tr.ui.b.define('process-memory-dump-track',tr.ui.tracks.ContainerTrack);ProcessMemoryDumpTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.memoryDumps_=undefined;},get memoryDumps(){return this.memoryDumps_;},set memoryDumps(memoryDumps){this.memoryDumps_=memoryDumps;this.updateContents_();},updateContents_:function(){this.clearTracks_();if(!this.memoryDumps_||!this.memoryDumps_.length)
+return;this.appendAllocatedMemoryTrack_();},appendAllocatedMemoryTrack_:function(){var series=tr.ui.tracks.buildProcessAllocatedMemoryChartSeries(this.memoryDumps_);if(!series)
+return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Memory per component';track.height=ALLOCATED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);}};return{ProcessMemoryDumpTrack:ProcessMemoryDumpTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ProcessTrackBase=tr.ui.tracks.ProcessTrackBase;var ProcessTrack=tr.ui.b.define('process-track',ProcessTrackBase);ProcessTrack.prototype={__proto__:ProcessTrackBase.prototype,decorate:function(viewport){tr.ui.tracks.ProcessTrackBase.prototype.decorate.call(this,viewport);},drawTrack:function(type){switch(type){case tr.ui.tracks.DrawType.INSTANT_EVENT:if(!this.processBase.instantEvents||this.processBase.instantEvents.length===0)
+break;var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);tr.ui.b.drawInstantSlicesAsLines(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,bounds.height,this.processBase.instantEvents,2);ctx.restore();break;case tr.ui.tracks.DrawType.BACKGROUND:this.drawBackground_();return;}
+tr.ui.tracks.ContainerTrack.prototype.drawTrack.call(this,type);},drawBackground_:function(){var ctx=this.context();var canvasBounds=ctx.canvas.getBoundingClientRect();var pixelRatio=window.devicePixelRatio||1;var draw=false;ctx.fillStyle='#eee';for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track)||(this.children[i]instanceof tr.ui.tracks.SpacingTrack))
+continue;draw=!draw;if(!draw)
+continue;var bounds=this.children[i].getBoundingClientRect();ctx.fillRect(0,pixelRatio*(bounds.top-canvasBounds.top),ctx.canvas.width,pixelRatio*bounds.height);}},set process(process){this.processBase=process;},get process(){return this.processBase;},get eventContainer(){return this.process;},addContainersToTrackMap:function(containerToTrackMap){tr.ui.tracks.ProcessTrackBase.prototype.addContainersToTrackMap.apply(this,arguments);containerToTrackMap.addContainer(this.process,this);},appendMemoryDumpTrack_:function(){var processMemoryDumps=this.process.memoryDumps;if(processMemoryDumps.length){var pmdt=new tr.ui.tracks.ProcessMemoryDumpTrack(this.viewport_);pmdt.memoryDumps=processMemoryDumps;this.appendChild(pmdt);}},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onPickHit(instantEvent){selection.push(instantEvent);}
+var instantEventWidth=2*viewPixWidthWorld;tr.b.iterateOverIntersectingIntervals(this.processBase.instantEvents,function(x){return x.start;},function(x){return x.duration+instantEventWidth;},loWX,hiWX,onPickHit.bind(this));tr.ui.tracks.ContainerTrack.prototype.addIntersectingEventsInRangeToSelectionInWorldSpace.apply(this,arguments);},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){this.addClosestInstantEventToSelection(this.processBase.instantEvents,worldX,worldMaxDist,selection);tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection.apply(this,arguments);}};return{ProcessTrack:ProcessTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SelectionState=tr.model.SelectionState;var EventPresenter=tr.ui.b.EventPresenter;var ModelTrack=tr.ui.b.define('model-track',tr.ui.tracks.ContainerTrack);ModelTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('model-track');var typeInfos=tr.ui.tracks.Highlighter.getAllRegisteredTypeInfos();this.highlighters_=typeInfos.map(function(typeInfo){return new typeInfo.constructor(viewport);});this.upperMode_=false;this.annotationViews_=[];},get upperMode(){return this.upperMode_;},set upperMode(upperMode){this.upperMode_=upperMode;this.updateContents_();},detach:function(){tr.ui.tracks.ContainerTrack.prototype.detach.call(this);},get model(){return this.model_;},set model(model){this.model_=model;this.updateContents_();this.model_.addEventListener('annotationChange',this.updateAnnotations_.bind(this));},get hasVisibleContent(){return this.children.length>0;},updateContents_:function(){this.textContent='';if(!this.model_)
+return;if(this.upperMode_)
+this.updateContentsForUpperMode_();else
+this.updateContentsForLowerMode_();},updateContentsForUpperMode_:function(){},updateContentsForLowerMode_:function(){if(this.model_.userModel.expectations.length){var mrt=new tr.ui.tracks.InteractionTrack(this.viewport_);mrt.model=this.model_;this.appendChild(mrt);}
+if(this.model_.alerts.length){var at=new tr.ui.tracks.AlertTrack(this.viewport_);at.alerts=this.model_.alerts;this.appendChild(at);}
+if(this.model_.globalMemoryDumps.length){var gmdt=new tr.ui.tracks.GlobalMemoryDumpTrack(this.viewport_);gmdt.memoryDumps=this.model_.globalMemoryDumps;this.appendChild(gmdt);}
+this.appendDeviceTrack_();this.appendKernelTrack_();var processes=this.model_.getAllProcesses();processes.sort(tr.model.Process.compare);for(var i=0;i<processes.length;++i){var process=processes[i];var track=new tr.ui.tracks.ProcessTrack(this.viewport);track.process=process;if(!track.hasVisibleContent)
+continue;this.appendChild(track);}
+this.viewport_.rebuildEventToTrackMap();this.viewport_.rebuildContainerToTrackMap();for(var i=0;i<this.highlighters_.length;i++){this.highlighters_[i].processModel(this.model_);}
+this.updateAnnotations_();},updateAnnotations_:function(){this.annotationViews_=[];var annotations=this.model_.getAllAnnotations();for(var i=0;i<annotations.length;i++){this.annotationViews_.push(annotations[i].getOrCreateView(this.viewport_));}
+this.invalidateDrawingContainer();},addEventsToTrackMap:function(eventToTrackMap){if(!this.model_)
+return;var tracks=this.children;for(var i=0;i<tracks.length;++i)
+tracks[i].addEventsToTrackMap(eventToTrackMap);if(this.instantEvents===undefined)
+return;var vp=this.viewport_;this.instantEvents.forEach(function(ev){eventToTrackMap.addEvent(ev,this);}.bind(this));},appendDeviceTrack_:function(){var device=this.model.device;var track=new tr.ui.tracks.DeviceTrack(this.viewport);track.device=this.model.device;if(!track.hasVisibleContent)
+return;this.appendChild(track);},appendKernelTrack_:function(){var kernel=this.model.kernel;var track=new tr.ui.tracks.KernelTrack(this.viewport);track.kernel=this.model.kernel;if(!track.hasVisibleContent)
+return;this.appendChild(track);},drawTrack:function(type){var ctx=this.context();if(!this.model_)
+return;var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);switch(type){case tr.ui.tracks.DrawType.GRID:this.viewport.drawMajorMarkLines(ctx);ctx.restore();return;case tr.ui.tracks.DrawType.FLOW_ARROWS:if(this.model_.flowIntervalTree.size===0){ctx.restore();return;}
+this.drawFlowArrows_(viewLWorld,viewRWorld);ctx.restore();return;case tr.ui.tracks.DrawType.INSTANT_EVENT:if(!this.model_.instantEvents||this.model_.instantEvents.length===0)
+break;tr.ui.b.drawInstantSlicesAsLines(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,bounds.height,this.model_.instantEvents,4);break;case tr.ui.tracks.DrawType.MARKERS:if(!this.viewport.interestRange.isEmpty){this.viewport.interestRange.draw(ctx,viewLWorld,viewRWorld);this.viewport.interestRange.drawIndicators(ctx,viewLWorld,viewRWorld);}
+ctx.restore();return;case tr.ui.tracks.DrawType.HIGHLIGHTS:for(var i=0;i<this.highlighters_.length;i++){this.highlighters_[i].drawHighlight(ctx,dt,viewLWorld,viewRWorld,bounds.height);}
+ctx.restore();return;case tr.ui.tracks.DrawType.ANNOTATIONS:for(var i=0;i<this.annotationViews_.length;i++){this.annotationViews_[i].draw(ctx);}
+ctx.restore();return;}
+ctx.restore();tr.ui.tracks.ContainerTrack.prototype.drawTrack.call(this,type);},drawFlowArrows_:function(viewLWorld,viewRWorld){var ctx=this.context();var dt=this.viewport.currentDisplayTransform;dt.applyTransformToCanvas(ctx);var pixWidth=dt.xViewVectorToWorld(1);ctx.strokeStyle='rgba(0, 0, 0, 0.4)';ctx.fillStyle='rgba(0, 0, 0, 0.4)';ctx.lineWidth=pixWidth>1.0?1:pixWidth;var events=this.model_.flowIntervalTree.findIntersection(viewLWorld,viewRWorld);var onlyHighlighted=!this.viewport.showFlowEvents;var canvasBounds=ctx.canvas.getBoundingClientRect();for(var i=0;i<events.length;++i){if(onlyHighlighted&&events[i].selectionState!==SelectionState.SELECTED&&events[i].selectionState!==SelectionState.HIGHLIGHTED)
+continue;this.drawFlowArrow_(ctx,events[i],canvasBounds,pixWidth);}},drawFlowArrow_:function(ctx,flowEvent,canvasBounds,pixWidth){var pixelRatio=window.devicePixelRatio||1;var startTrack=this.viewport.trackForEvent(flowEvent.startSlice);var endTrack=this.viewport.trackForEvent(flowEvent.endSlice);if(startTrack===undefined||endTrack===undefined)
+return;var startBounds=startTrack.getBoundingClientRect();var endBounds=endTrack.getBoundingClientRect();if(flowEvent.selectionState==SelectionState.SELECTED){ctx.shadowBlur=1;ctx.shadowColor='red';ctx.shadowOffsety=2;ctx.strokeStyle='red';}else if(flowEvent.selectionState==SelectionState.HIGHLIGHTED){ctx.shadowBlur=1;ctx.shadowColor='red';ctx.shadowOffsety=2;ctx.strokeStyle='red';}else if(flowEvent.selectionState==SelectionState.DIMMED){ctx.shadowBlur=0;ctx.shadowOffsetX=0;ctx.strokeStyle='rgba(0, 0, 0, 0.2)';}else{var hasBoost=false;var startSlice=flowEvent.startSlice;hasBoost|=startSlice.selectionState===SelectionState.SELECTED;hasBoost|=startSlice.selectionState===SelectionState.HIGHLIGHTED;var endSlice=flowEvent.endSlice;hasBoost|=endSlice.selectionState===SelectionState.SELECTED;hasBoost|=endSlice.selectionState===SelectionState.HIGHLIGHTED;if(hasBoost){ctx.shadowBlur=1;ctx.shadowColor='rgba(255, 0, 0, 0.4)';ctx.shadowOffsety=2;ctx.strokeStyle='rgba(255, 0, 0, 0.4)';}else{ctx.shadowBlur=0;ctx.shadowOffsetX=0;ctx.strokeStyle='rgba(0, 0, 0, 0.4)';}}
+var startSize=startBounds.left+startBounds.top+
+startBounds.bottom+startBounds.right;var endSize=endBounds.left+endBounds.top+
+endBounds.bottom+endBounds.right;if(startSize===0&&endSize===0)
+return;var startY=this.calculateTrackY_(startTrack,canvasBounds);var endY=this.calculateTrackY_(endTrack,canvasBounds);var pixelStartY=pixelRatio*startY;var pixelEndY=pixelRatio*endY;var half=(flowEvent.end-flowEvent.start)/2;ctx.beginPath();ctx.moveTo(flowEvent.start,pixelStartY);ctx.bezierCurveTo(flowEvent.start+half,pixelStartY,flowEvent.start+half,pixelEndY,flowEvent.end,pixelEndY);ctx.stroke();var arrowWidth=5*pixWidth*pixelRatio;var distance=flowEvent.end-flowEvent.start;if(distance<=(2*arrowWidth))
+return;var tipX=flowEvent.end;var tipY=pixelEndY;var arrowHeight=(endBounds.height/4)*pixelRatio;tr.ui.b.drawTriangle(ctx,tipX,tipY,tipX-arrowWidth,tipY-arrowHeight,tipX-arrowWidth,tipY+arrowHeight);ctx.fill();},calculateTrackY_:function(track,canvasBounds){var bounds=track.getBoundingClientRect();var size=bounds.left+bounds.top+bounds.bottom+bounds.right;if(size===0)
+return this.calculateTrackY_(track.parentNode,canvasBounds);return bounds.top-canvasBounds.top+(bounds.height/2);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onPickHit(instantEvent){selection.push(instantEvent);}
+var instantEventWidth=3*viewPixWidthWorld;tr.b.iterateOverIntersectingIntervals(this.model_.instantEvents,function(x){return x.start;},function(x){return x.duration+instantEventWidth;},loWX,hiWX,onPickHit.bind(this));tr.ui.tracks.ContainerTrack.prototype.addIntersectingEventsInRangeToSelectionInWorldSpace.apply(this,arguments);},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){this.addClosestInstantEventToSelection(this.model_.instantEvents,worldX,worldMaxDist,selection);tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection.apply(this,arguments);}};return{ModelTrack:ModelTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var RulerTrack=tr.ui.b.define('ruler-track',tr.ui.tracks.Track);var logOf10=Math.log(10);function log10(x){return Math.log(x)/logOf10;}
+RulerTrack.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('ruler-track');this.strings_secs_=[];this.strings_msecs_=[];this.strings_usecs_=[];this.strings_nsecs_=[];this.viewportChange_=this.viewportChange_.bind(this);viewport.addEventListener('change',this.viewportChange_);var heading=document.createElement('tr-ui-heading');heading.arrowVisible=false;this.appendChild(heading);},detach:function(){tr.ui.tracks.Track.prototype.detach.call(this);this.viewport.removeEventListener('change',this.viewportChange_);},viewportChange_:function(){if(this.viewport.interestRange.isEmpty)
+this.classList.remove('tall-mode');else
+this.classList.add('tall-mode');},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GRID:this.drawGrid_(viewLWorld,viewRWorld);break;case tr.ui.tracks.DrawType.MARKERS:if(!this.viewport.interestRange.isEmpty)
+this.viewport.interestRange.draw(this.context(),viewLWorld,viewRWorld);break;}},drawGrid_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var canvasBounds=ctx.canvas.getBoundingClientRect();var trackBounds=this.getBoundingClientRect();var width=canvasBounds.width*pixelRatio;var height=trackBounds.height*pixelRatio;var hasInterestRange=!this.viewport.interestRange.isEmpty;var rulerHeight=hasInterestRange?(height*2)/5:height;var vp=this.viewport;var dt=vp.currentDisplayTransform;var idealMajorMarkDistancePix=150*pixelRatio;var idealMajorMarkDistanceWorld=dt.xViewVectorToWorld(idealMajorMarkDistancePix);var majorMarkDistanceWorld;var conservativeGuess=Math.pow(10,Math.ceil(log10(idealMajorMarkDistanceWorld)));var divisors=[10,5,2,1];for(var i=0;i<divisors.length;++i){var tightenedGuess=conservativeGuess/divisors[i];if(dt.xWorldVectorToView(tightenedGuess)<idealMajorMarkDistancePix)
+continue;majorMarkDistanceWorld=conservativeGuess/divisors[i-1];break;}
+var unit;var unitDivisor;var tickLabels=undefined;if(majorMarkDistanceWorld<0.0001){unit='ns';unitDivisor=0.000001;tickLabels=this.strings_nsecs_;}else if(majorMarkDistanceWorld<0.1){unit='us';unitDivisor=0.001;tickLabels=this.strings_usecs_;}else if(majorMarkDistanceWorld<100){unit='ms';unitDivisor=1;tickLabels=this.strings_msecs_;}else{unit='s';unitDivisor=1000;tickLabels=this.strings_secs_;}
+var numTicksPerMajor=5;var minorMarkDistanceWorld=majorMarkDistanceWorld/numTicksPerMajor;var minorMarkDistancePx=dt.xWorldVectorToView(minorMarkDistanceWorld);var firstMajorMark=Math.floor(viewLWorld/majorMarkDistanceWorld)*majorMarkDistanceWorld;var minorTickH=Math.floor(rulerHeight*0.25);ctx.save();var pixelRatio=window.devicePixelRatio||1;ctx.lineWidth=Math.round(pixelRatio);var crispLineCorrection=(ctx.lineWidth%2)/2;ctx.translate(crispLineCorrection,-crispLineCorrection);ctx.fillStyle='rgb(0, 0, 0)';ctx.strokeStyle='rgb(0, 0, 0)';ctx.textAlign='left';ctx.textBaseline='top';ctx.font=(9*pixelRatio)+'px sans-serif';vp.majorMarkPositions=[];ctx.beginPath();for(var curX=firstMajorMark;curX<viewRWorld;curX+=majorMarkDistanceWorld){var curXView=Math.floor(dt.xWorldToView(curX));var unitValue=curX/unitDivisor;var roundedUnitValue=Math.round(unitValue*100000)/100000;if(!tickLabels[roundedUnitValue])
+tickLabels[roundedUnitValue]=roundedUnitValue+' '+unit;ctx.fillText(tickLabels[roundedUnitValue],curXView+(2*pixelRatio),0);vp.majorMarkPositions.push(curXView);tr.ui.b.drawLine(ctx,curXView,0,curXView,rulerHeight);for(var i=1;i<numTicksPerMajor;++i){var xView=Math.floor(curXView+minorMarkDistancePx*i);tr.ui.b.drawLine(ctx,xView,rulerHeight-minorTickH,xView,rulerHeight);}}
+ctx.strokeStyle='rgb(0, 0, 0)';tr.ui.b.drawLine(ctx,0,height,width,height);ctx.stroke();if(!hasInterestRange)
+return;tr.ui.b.drawLine(ctx,0,rulerHeight,width,rulerHeight);ctx.stroke();var displayDistance;var displayTextColor='rgb(0,0,0)';var arrowSpacing=10*pixelRatio;var arrowColor='rgb(128,121,121)';var arrowPosY=rulerHeight*1.75;var arrowWidthView=3*pixelRatio;var arrowLengthView=10*pixelRatio;var spaceForArrowsView=2*(arrowWidthView+arrowSpacing);ctx.textBaseline='middle';ctx.font=(14*pixelRatio)+'px sans-serif';var textPosY=arrowPosY;var interestRange=vp.interestRange;if(interestRange.range===0){var markerWorld=interestRange.min;var markerView=dt.xWorldToView(markerWorld);var displayValue=markerWorld/unitDivisor;displayValue=Math.abs((Math.round(displayValue*1000)/1000));var textToDraw=displayValue+' '+unit;var textLeftView=markerView+4*pixelRatio;var textWidthView=ctx.measureText(textToDraw).width;if(textLeftView+textWidthView>width)
+textLeftView=markerView-4*pixelRatio-textWidthView;ctx.fillStyle=displayTextColor;ctx.fillText(textToDraw,textLeftView,textPosY);return;}
+var leftMarker=interestRange.min;var rightMarker=interestRange.max;var leftMarkerView=dt.xWorldToView(leftMarker);var rightMarkerView=dt.xWorldToView(rightMarker);var distanceBetweenMarkers=interestRange.range;var distanceBetweenMarkersView=dt.xWorldVectorToView(distanceBetweenMarkers);var positionInMiddleOfMarkersView=leftMarkerView+(distanceBetweenMarkersView/2);if(distanceBetweenMarkers<0.0001){unit='ns';unitDivisor=0.000001;}else if(distanceBetweenMarkers<0.1){unit='us';unitDivisor=0.001;}else if(distanceBetweenMarkers<100){unit='ms';unitDivisor=1;}else{unit='s';unitDivisor=1000;}
+displayDistance=distanceBetweenMarkers/unitDivisor;var roundedDisplayDistance=Math.abs((Math.round(displayDistance*1000)/1000));var textToDraw=roundedDisplayDistance+' '+unit;var textWidthView=ctx.measureText(textToDraw).width;var spaceForArrowsAndTextView=textWidthView+spaceForArrowsView+arrowSpacing;var textLeftView=positionInMiddleOfMarkersView-textWidthView/2;var textRightView=textLeftView+textWidthView;if(spaceForArrowsAndTextView>distanceBetweenMarkersView){textLeftView=rightMarkerView+2*arrowSpacing;if(textLeftView+textWidthView>width)
+textLeftView=leftMarkerView-2*arrowSpacing-textWidthView;ctx.fillStyle=displayTextColor;ctx.fillText(textToDraw,textLeftView,textPosY);ctx.strokeStyle=arrowColor;ctx.beginPath();tr.ui.b.drawLine(ctx,leftMarkerView,arrowPosY,rightMarkerView,arrowPosY);ctx.stroke();ctx.fillStyle=arrowColor;tr.ui.b.drawArrow(ctx,leftMarkerView-1.5*arrowSpacing,arrowPosY,leftMarkerView,arrowPosY,arrowLengthView,arrowWidthView);tr.ui.b.drawArrow(ctx,rightMarkerView+1.5*arrowSpacing,arrowPosY,rightMarkerView,arrowPosY,arrowLengthView,arrowWidthView);}else if(spaceForArrowsView<=distanceBetweenMarkersView){var leftArrowStart;var rightArrowStart;if(spaceForArrowsAndTextView<=distanceBetweenMarkersView){ctx.fillStyle=displayTextColor;ctx.fillText(textToDraw,textLeftView,textPosY);leftArrowStart=textLeftView-arrowSpacing;rightArrowStart=textRightView+arrowSpacing;}else{leftArrowStart=positionInMiddleOfMarkersView;rightArrowStart=positionInMiddleOfMarkersView;}
+ctx.strokeStyle=arrowColor;ctx.fillStyle=arrowColor;tr.ui.b.drawArrow(ctx,leftArrowStart,arrowPosY,leftMarkerView,arrowPosY,arrowLengthView,arrowWidthView);tr.ui.b.drawArrow(ctx,rightArrowStart,arrowPosY,rightMarkerView,arrowPosY,arrowLengthView,arrowWidthView);}
+ctx.restore();},addIntersectingEventsInRangeToSelection:function(loVX,hiVX,loY,hiY,selection){},addAllEventsMatchingFilterToSelection:function(filter,selection){}};return{RulerTrack:RulerTrack};});'use strict';Polymer('tr-ui-timeline-track-view',{ready:function(){this.displayTransform_=new tr.ui.TimelineDisplayTransform();this.model_=undefined;this.timelineView_=undefined;this.viewport_=new tr.ui.TimelineViewport(this);this.viewportDisplayTransformAtMouseDown_=undefined;this.brushingStateController_=undefined;this.rulerTrackContainer_=new tr.ui.tracks.DrawingContainer(this.viewport_);this.appendChild(this.rulerTrackContainer_);this.rulerTrackContainer_.invalidate();this.rulerTrack_=new tr.ui.tracks.RulerTrack(this.viewport_);this.rulerTrackContainer_.appendChild(this.rulerTrack_);this.upperModelTrack_=new tr.ui.tracks.ModelTrack(this.viewport_);this.upperModelTrack_.upperMode=true;this.rulerTrackContainer_.appendChild(this.upperModelTrack_);this.modelTrackContainer_=new tr.ui.tracks.DrawingContainer(this.viewport_);this.appendChild(this.modelTrackContainer_);this.modelTrackContainer_.style.display='block';this.modelTrackContainer_.invalidate();this.viewport_.modelTrackContainer=this.modelTrackContainer_;this.modelTrack_=new tr.ui.tracks.ModelTrack(this.viewport_);this.modelTrackContainer_.appendChild(this.modelTrack_);this.timingTool_=new tr.ui.b.TimingTool(this.viewport_,this);this.initMouseModeSelector();this.hideDragBox_();this.initHintText_();this.onSelectionChanged_=this.onSelectionChanged_.bind(this);this.onDblClick_=this.onDblClick_.bind(this);this.addEventListener('dblclick',this.onDblClick_);this.onMouseWheel_=this.onMouseWheel_.bind(this);this.addEventListener('mousewheel',this.onMouseWheel_);this.onMouseDown_=this.onMouseDown_.bind(this);this.addEventListener('mousedown',this.onMouseDown_);this.onMouseMove_=this.onMouseMove_.bind(this);this.addEventListener('mousemove',this.onMouseMove_);this.onTouchStart_=this.onTouchStart_.bind(this);this.addEventListener('touchstart',this.onTouchStart_);this.onTouchMove_=this.onTouchMove_.bind(this);this.addEventListener('touchmove',this.onTouchMove_);this.onTouchEnd_=this.onTouchEnd_.bind(this);this.addEventListener('touchend',this.onTouchEnd_);this.addHotKeys_();this.mouseViewPosAtMouseDown_={x:0,y:0};this.lastMouseViewPos_={x:0,y:0};this.lastTouchViewPositions_=[];this.alert_=undefined;this.isPanningAndScanning_=false;this.isZooming_=false;},initMouseModeSelector:function(){this.mouseModeSelector_=document.createElement('tr-ui-b-mouse-mode-selector');this.mouseModeSelector_.targetElement=this;this.appendChild(this.mouseModeSelector_);this.mouseModeSelector_.addEventListener('beginpan',this.onBeginPanScan_.bind(this));this.mouseModeSelector_.addEventListener('updatepan',this.onUpdatePanScan_.bind(this));this.mouseModeSelector_.addEventListener('endpan',this.onEndPanScan_.bind(this));this.mouseModeSelector_.addEventListener('beginselection',this.onBeginSelection_.bind(this));this.mouseModeSelector_.addEventListener('updateselection',this.onUpdateSelection_.bind(this));this.mouseModeSelector_.addEventListener('endselection',this.onEndSelection_.bind(this));this.mouseModeSelector_.addEventListener('beginzoom',this.onBeginZoom_.bind(this));this.mouseModeSelector_.addEventListener('updatezoom',this.onUpdateZoom_.bind(this));this.mouseModeSelector_.addEventListener('endzoom',this.onEndZoom_.bind(this));this.mouseModeSelector_.addEventListener('entertiming',this.timingTool_.onEnterTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener('begintiming',this.timingTool_.onBeginTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener('updatetiming',this.timingTool_.onUpdateTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener('endtiming',this.timingTool_.onEndTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener('exittiming',this.timingTool_.onExitTiming.bind(this.timingTool_));var m=tr.ui.b.MOUSE_SELECTOR_MODE;this.mouseModeSelector_.supportedModeMask=m.SELECTION|m.PANSCAN|m.ZOOM|m.TIMING;this.mouseModeSelector_.settingsKey='timelineTrackView.mouseModeSelector';this.mouseModeSelector_.setKeyCodeForMode(m.PANSCAN,'2'.charCodeAt(0));this.mouseModeSelector_.setKeyCodeForMode(m.SELECTION,'1'.charCodeAt(0));this.mouseModeSelector_.setKeyCodeForMode(m.ZOOM,'3'.charCodeAt(0));this.mouseModeSelector_.setKeyCodeForMode(m.TIMING,'4'.charCodeAt(0));this.mouseModeSelector_.setModifierForAlternateMode(m.SELECTION,tr.ui.b.MODIFIER.SHIFT);this.mouseModeSelector_.setModifierForAlternateMode(m.PANSCAN,tr.ui.b.MODIFIER.SPACE);},get brushingStateController(){return this.brushingStateController_;},set brushingStateController(brushingStateController){if(this.brushingStateController_){this.brushingStateController_.removeEventListener('change',this.onSelectionChanged_);}
+this.brushingStateController_=brushingStateController;if(this.brushingStateController_){this.brushingStateController_.addEventListener('change',this.onSelectionChanged_);}},set timelineView(view){this.timelineView_=view;},onSelectionChanged_:function(){this.showHintText_('Press \'m\' to mark current selection');this.viewport_.dispatchChangeEvent();},set selection(selection){throw new Error('DO NOT CALL THIS');},set highlight(highlight){throw new Error('DO NOT CALL THIS');},detach:function(){this.modelTrack_.detach();this.upperModelTrack_.detach();this.viewport_.detach();},get viewport(){return this.viewport_;},get model(){return this.model_;},set model(model){if(!model)
+throw new Error('Model cannot be undefined');var modelInstanceChanged=this.model_!==model;this.model_=model;this.modelTrack_.model=model;this.upperModelTrack_.model=model;if(modelInstanceChanged)
+this.viewport_.setWhenPossible(this.setInitialViewport_.bind(this));},get hasVisibleContent(){return this.modelTrack_.hasVisibleContent||this.upperModelTrack_.hasVisibleContent;},setInitialViewport_:function(){this.modelTrackContainer_.updateCanvasSizeIfNeeded_();var w=this.modelTrackContainer_.canvas.width;var min;var range;if(this.model_.bounds.isEmpty){min=0;range=1000;}else if(this.model_.bounds.range===0){min=this.model_.bounds.min;range=1000;}else{min=this.model_.bounds.min;range=this.model_.bounds.range;}
+var boost=range*0.15;this.displayTransform_.set(this.viewport_.currentDisplayTransform);this.displayTransform_.xSetWorldBounds(min-boost,min+range+boost,w);this.viewport_.setDisplayTransformImmediately(this.displayTransform_);},addAllEventsMatchingFilterToSelectionAsTask:function(filter,selection){var modelTrack=this.modelTrack_;var firstT=modelTrack.addAllEventsMatchingFilterToSelectionAsTask(filter,selection);var lastT=firstT.after(function(){this.upperModelTrack_.addAllEventsMatchingFilterToSelection(filter,selection);},this);return firstT;},onMouseMove_:function(e){if(this.isZooming_)
+return;this.storeLastMousePos_(e);},onTouchStart_:function(e){this.storeLastTouchPositions_(e);this.focusElements_();},onTouchMove_:function(e){e.preventDefault();this.onUpdateTransformForTouch_(e);},onTouchEnd_:function(e){this.storeLastTouchPositions_(e);this.focusElements_();},addHotKeys_:function(){this.addKeyDownHotKeys_();this.addKeyPressHotKeys_();},addKeyPressHotKeys_:function(){var addBinding=function(dict){dict.eventType='keypress';dict.useCapture=false;dict.thisArg=this;var binding=new tr.ui.b.HotKey(dict);this.$.hotkey_controller.addHotKey(binding);}.bind(this);addBinding({keyCodes:['w'.charCodeAt(0),','.charCodeAt(0)],callback:function(e){this.zoomBy_(1.5,true);e.stopPropagation();}});addBinding({keyCodes:['s'.charCodeAt(0),'o'.charCodeAt(0)],callback:function(e){this.zoomBy_(1/1.5,true);e.stopPropagation();}});addBinding({keyCode:'g'.charCodeAt(0),callback:function(e){this.onGridToggle_(true);e.stopPropagation();}});addBinding({keyCode:'G'.charCodeAt(0),callback:function(e){this.onGridToggle_(false);e.stopPropagation();}});addBinding({keyCodes:['W'.charCodeAt(0),'<'.charCodeAt(0)],callback:function(e){this.zoomBy_(10,true);e.stopPropagation();}});addBinding({keyCodes:['S'.charCodeAt(0),'O'.charCodeAt(0)],callback:function(e){this.zoomBy_(1/10,true);e.stopPropagation();}});addBinding({keyCode:'a'.charCodeAt(0),callback:function(e){this.queueSmoothPan_(this.viewWidth_*0.3,0);e.stopPropagation();}});addBinding({keyCodes:['d'.charCodeAt(0),'e'.charCodeAt(0)],callback:function(e){this.queueSmoothPan_(this.viewWidth_*-0.3,0);e.stopPropagation();}});addBinding({keyCode:'A'.charCodeAt(0),callback:function(e){this.queueSmoothPan_(viewWidth*0.5,0);e.stopPropagation();}});addBinding({keyCode:'D'.charCodeAt(0),callback:function(e){this.queueSmoothPan_(viewWidth*-0.5,0);e.stopPropagation();}});addBinding({keyCode:'0'.charCodeAt(0),callback:function(e){this.setInitialViewport_();e.stopPropagation();}});addBinding({keyCode:'f'.charCodeAt(0),callback:function(e){this.zoomToSelection();e.stopPropagation();}});addBinding({keyCode:'m'.charCodeAt(0),callback:function(e){this.setCurrentSelectionAsInterestRange_();e.stopPropagation();}});addBinding({keyCode:'h'.charCodeAt(0),callback:function(e){this.toggleHighDetails_();e.stopPropagation();}});},get viewWidth_(){return this.modelTrackContainer_.canvas.clientWidth;},addKeyDownHotKeys_:function(){var addBinding=function(dict){dict.eventType='keydown';dict.useCapture=false;dict.thisArg=this;var binding=new tr.ui.b.HotKey(dict);this.$.hotkey_controller.addHotKey(binding);}.bind(this);addBinding({keyCode:37,callback:function(e){var curSel=this.brushingStateController_.selection;var sel=this.viewport.getShiftedSelection(curSel,-1);if(sel){this.brushingStateController.changeSelectionFromTimeline(sel);this.panToSelection();}else{this.queueSmoothPan_(this.viewWidth_*0.3,0);}
+e.preventDefault();e.stopPropagation();}});addBinding({keyCode:39,callback:function(e){var curSel=this.brushingStateController_.selection;var sel=this.viewport.getShiftedSelection(curSel,1);if(sel){this.brushingStateController.changeSelectionFromTimeline(sel);this.panToSelection();}else{this.queueSmoothPan_(-this.viewWidth_*0.3,0);}
+e.preventDefault();e.stopPropagation();}});},onDblClick_:function(e){if(this.mouseModeSelector_.mode!==tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION)
+return;var curSelection=this.brushingStateController_.selection;if(!curSelection.length||!curSelection[0].title)
+return;var selection=new tr.model.EventSet();var filter=new tr.c.ExactTitleFilter(curSelection[0].title);this.modelTrack_.addAllEventsMatchingFilterToSelection(filter,selection);this.brushingStateController.changeSelectionFromTimeline(selection);},onMouseWheel_:function(e){if(!e.altKey)
+return;var delta=e.wheelDelta/120;var zoomScale=Math.pow(1.5,delta);this.zoomBy_(zoomScale);e.preventDefault();},onMouseDown_:function(e){if(this.mouseModeSelector_.mode!==tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION)
+return;if(e.target!==this.rulerTrack_)
+return;this.dragBeginEvent_=undefined;if(this.xNavStringMarker_){this.model.removeAnnotation(this.xNavStringMarker_);this.xNavStringMarker_=undefined;}
+var dt=this.viewport_.currentDisplayTransform;tr.ui.b.trackMouseMovesUntilMouseUp(function(e){if(e.target===this.rulerTrack_)
+return;var relativePosition=this.extractRelativeMousePosition_(e);var loc=tr.model.Location.fromViewCoordinates(this.viewport_,relativePosition.x,relativePosition.y);if(!loc)
+return;if(this.guideLineAnnotation_===undefined){this.guideLineAnnotation_=new tr.model.XMarkerAnnotation(loc.xWorld);this.model.addAnnotation(this.guideLineAnnotation_);}else{this.guideLineAnnotation_.timestamp=loc.xWorld;this.modelTrackContainer_.invalidate();}
+var state=new tr.ui.b.UIState(loc,this.viewport_.currentDisplayTransform.scaleX);this.timelineView_.setFindCtlText(state.toUserFriendlyString(this.viewport_));}.bind(this),undefined,function onKeyUpDuringDrag(){if(this.dragBeginEvent_){this.setDragBoxPosition_(this.dragBoxXStart_,this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_);}}.bind(this));},queueSmoothPan_:function(viewDeltaX,deltaY){var deltaX=this.viewport_.currentDisplayTransform.xViewVectorToWorld(viewDeltaX);var animation=new tr.ui.TimelineDisplayTransformPanAnimation(deltaX,deltaY);this.viewport_.queueDisplayTransformAnimation(animation);},zoomBy_:function(scale,smooth){if(scale<=0){return;}
+smooth=!!smooth;var vp=this.viewport_;var pixelRatio=window.devicePixelRatio||1;var goalFocalPointXView=this.lastMouseViewPos_.x*pixelRatio;var goalFocalPointXWorld=vp.currentDisplayTransform.xViewToWorld(goalFocalPointXView);if(smooth){var animation=new tr.ui.TimelineDisplayTransformZoomToAnimation(goalFocalPointXWorld,goalFocalPointXView,vp.currentDisplayTransform.panY,scale);vp.queueDisplayTransformAnimation(animation);}else{this.displayTransform_.set(vp.currentDisplayTransform);this.displayTransform_.scaleX*=scale;this.displayTransform_.xPanWorldPosToViewPos(goalFocalPointXWorld,goalFocalPointXView,this.viewWidth_);vp.setDisplayTransformImmediately(this.displayTransform_);}},zoomToSelection:function(){if(!this.brushingStateController.selectionOfInterest.length)
+return;var bounds=this.brushingStateController.selectionOfInterest.bounds;if(!bounds.range)
+return;var worldCenter=bounds.center;var viewCenter=this.modelTrackContainer_.canvas.width/2;var adjustedWorldRange=bounds.range*1.25;var newScale=this.modelTrackContainer_.canvas.width/adjustedWorldRange;var zoomInRatio=newScale/this.viewport_.currentDisplayTransform.scaleX;var animation=new tr.ui.TimelineDisplayTransformZoomToAnimation(worldCenter,viewCenter,this.viewport_.currentDisplayTransform.panY,zoomInRatio);this.viewport_.queueDisplayTransformAnimation(animation);},panToSelection:function(){if(!this.brushingStateController.selectionOfInterest.length)
+return;var bounds=this.brushingStateController.selectionOfInterest.bounds;var worldCenter=bounds.center;var viewWidth=this.viewWidth_;var dt=this.viewport_.currentDisplayTransform;if(false&&!bounds.range){if(dt.xWorldToView(bounds.center)<0||dt.xWorldToView(bounds.center)>viewWidth){this.displayTransform_.set(dt);this.displayTransform_.xPanWorldPosToViewPos(worldCenter,'center',viewWidth);var deltaX=this.displayTransform_.panX-dt.panX;var animation=new tr.ui.TimelineDisplayTransformPanAnimation(deltaX,0);this.viewport_.queueDisplayTransformAnimation(animation);}
+return;}
+this.displayTransform_.set(dt);this.displayTransform_.xPanWorldBoundsIntoView(bounds.min,bounds.max,viewWidth);var deltaX=this.displayTransform_.panX-dt.panX;var animation=new tr.ui.TimelineDisplayTransformPanAnimation(deltaX,0);this.viewport_.queueDisplayTransformAnimation(animation);},navToPosition:function(uiState,showNavLine){var location=uiState.location;var scaleX=uiState.scaleX;var track=location.getContainingTrack(this.viewport_);var worldCenter=location.xWorld;var viewCenter=this.modelTrackContainer_.canvas.width/5;var zoomInRatio=scaleX/this.viewport_.currentDisplayTransform.scaleX;track.scrollIntoViewIfNeeded();var animation=new tr.ui.TimelineDisplayTransformZoomToAnimation(worldCenter,viewCenter,this.viewport_.currentDisplayTransform.panY,zoomInRatio);this.viewport_.queueDisplayTransformAnimation(animation);if(!showNavLine)
+return;if(this.xNavStringMarker_)
+this.model.removeAnnotation(this.xNavStringMarker_);this.xNavStringMarker_=new tr.model.XMarkerAnnotation(worldCenter);this.model.addAnnotation(this.xNavStringMarker_);},setCurrentSelectionAsInterestRange_:function(){var selectionBounds=this.brushingStateController_.selection.bounds;if(selectionBounds.empty){this.viewport_.interestRange.reset();return;}
+if(this.viewport_.interestRange.min==selectionBounds.min&&this.viewport_.interestRange.max==selectionBounds.max)
+this.viewport_.interestRange.reset();else
+this.viewport_.interestRange.set(selectionBounds);},toggleHighDetails_:function(){this.viewport_.highDetails=!this.viewport_.highDetails;},hideDragBox_:function(){this.$.drag_box.style.left='-1000px';this.$.drag_box.style.top='-1000px';this.$.drag_box.style.width=0;this.$.drag_box.style.height=0;},setDragBoxPosition_:function(xStart,yStart,xEnd,yEnd){var loY=Math.min(yStart,yEnd);var hiY=Math.max(yStart,yEnd);var loX=Math.min(xStart,xEnd);var hiX=Math.max(xStart,xEnd);var modelTrackRect=this.modelTrack_.getBoundingClientRect();var dragRect={left:loX,top:loY,width:hiX-loX,height:hiY-loY};dragRect.right=dragRect.left+dragRect.width;dragRect.bottom=dragRect.top+dragRect.height;var modelTrackContainerRect=this.modelTrackContainer_.getBoundingClientRect();var clipRect={left:modelTrackContainerRect.left,top:modelTrackContainerRect.top,right:modelTrackContainerRect.right,bottom:modelTrackContainerRect.bottom};var headingWidth=window.getComputedStyle(this.querySelector('tr-ui-heading')).width;var trackTitleWidth=parseInt(headingWidth);clipRect.left=clipRect.left+trackTitleWidth;var intersectRect_=function(r1,r2){if(r2.left>r1.right||r2.right<r1.left||r2.top>r1.bottom||r2.bottom<r1.top)
+return false;var results={};results.left=Math.max(r1.left,r2.left);results.top=Math.max(r1.top,r2.top);results.right=Math.min(r1.right,r2.right);results.bottom=Math.min(r1.bottom,r2.bottom);results.width=results.right-results.left;results.height=results.bottom-results.top;return results;};var finalDragBox=intersectRect_(clipRect,dragRect);this.$.drag_box.style.left=finalDragBox.left+'px';this.$.drag_box.style.width=finalDragBox.width+'px';this.$.drag_box.style.top=finalDragBox.top+'px';this.$.drag_box.style.height=finalDragBox.height+'px';this.$.drag_box.style.whiteSpace='nowrap';var pixelRatio=window.devicePixelRatio||1;var canv=this.modelTrackContainer_.canvas;var dt=this.viewport_.currentDisplayTransform;var loWX=dt.xViewToWorld((loX-canv.offsetLeft)*pixelRatio);var hiWX=dt.xViewToWorld((hiX-canv.offsetLeft)*pixelRatio);this.$.drag_box.textContent=tr.v.Unit.byName.timeDurationInMs.format(hiWX-loWX);var e=new tr.b.Event('selectionChanging');e.loWX=loWX;e.hiWX=hiWX;this.dispatchEvent(e);},onGridToggle_:function(left){var selection=this.brushingStateController_.selection;var tb=left?selection.bounds.min:selection.bounds.max;if(this.viewport_.gridEnabled&&this.viewport_.gridSide===left&&this.viewport_.gridInitialTimebase===tb){this.viewport_.gridside=undefined;this.viewport_.gridEnabled=false;this.viewport_.gridInitialTimebase=undefined;return;}
+var numIntervalsSinceStart=Math.ceil((tb-this.model_.bounds.min)/this.viewport_.gridStep_);this.viewport_.gridEnabled=true;this.viewport_.gridSide=left;this.viewport_.gridInitialTimebase=tb;this.viewport_.gridTimebase=tb-
+(numIntervalsSinceStart+1)*this.viewport_.gridStep_;},storeLastMousePos_:function(e){this.lastMouseViewPos_=this.extractRelativeMousePosition_(e);},storeLastTouchPositions_:function(e){this.lastTouchViewPositions_=this.extractRelativeTouchPositions_(e);},extractRelativeMousePosition_:function(e){var canv=this.modelTrackContainer_.canvas;return{x:e.clientX-canv.offsetLeft,y:e.clientY-canv.offsetTop};},extractRelativeTouchPositions_:function(e){var canv=this.modelTrackContainer_.canvas;var touches=[];for(var i=0;i<e.touches.length;++i){touches.push({x:e.touches[i].clientX-canv.offsetLeft,y:e.touches[i].clientY-canv.offsetTop});}
+return touches;},storeInitialMouseDownPos_:function(e){var position=this.extractRelativeMousePosition_(e);this.mouseViewPosAtMouseDown_.x=position.x;this.mouseViewPosAtMouseDown_.y=position.y;},focusElements_:function(){this.$.hotkey_controller.childRequestsGeneralFocus(this);},storeInitialInteractionPositionsAndFocus_:function(e){this.storeInitialMouseDownPos_(e);this.storeLastMousePos_(e);this.focusElements_();},onBeginPanScan_:function(e){var vp=this.viewport_;this.viewportDisplayTransformAtMouseDown_=vp.currentDisplayTransform.clone();this.isPanningAndScanning_=true;this.storeInitialInteractionPositionsAndFocus_(e);e.preventDefault();},onUpdatePanScan_:function(e){if(!this.isPanningAndScanning_)
+return;var viewWidth=this.viewWidth_;var pixelRatio=window.devicePixelRatio||1;var xDeltaView=pixelRatio*(this.lastMouseViewPos_.x-
+this.mouseViewPosAtMouseDown_.x);var yDelta=this.lastMouseViewPos_.y-
+this.mouseViewPosAtMouseDown_.y;this.displayTransform_.set(this.viewportDisplayTransformAtMouseDown_);this.displayTransform_.incrementPanXInViewUnits(xDeltaView);this.displayTransform_.panY-=yDelta;this.viewport_.setDisplayTransformImmediately(this.displayTransform_);e.preventDefault();e.stopPropagation();this.storeLastMousePos_(e);},onEndPanScan_:function(e){this.isPanningAndScanning_=false;this.storeLastMousePos_(e);if(!e.isClick)
+e.preventDefault();},onBeginSelection_:function(e){var canv=this.modelTrackContainer_.canvas;var rect=this.modelTrack_.getBoundingClientRect();var canvRect=canv.getBoundingClientRect();var inside=rect&&e.clientX>=rect.left&&e.clientX<rect.right&&e.clientY>=rect.top&&e.clientY<rect.bottom&&e.clientX>=canvRect.left&&e.clientX<canvRect.right;if(!inside)
+return;this.dragBeginEvent_=e;this.storeInitialInteractionPositionsAndFocus_(e);e.preventDefault();},onUpdateSelection_:function(e){if(!this.dragBeginEvent_)
+return;this.dragBoxXStart_=this.dragBeginEvent_.clientX;this.dragBoxXEnd_=e.clientX;this.dragBoxYStart_=this.dragBeginEvent_.clientY;this.dragBoxYEnd_=e.clientY;this.setDragBoxPosition_(this.dragBoxXStart_,this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_);},onEndSelection_:function(e){e.preventDefault();if(!this.dragBeginEvent_)
+return;this.hideDragBox_();var eDown=this.dragBeginEvent_;this.dragBeginEvent_=undefined;var loY=Math.min(eDown.clientY,e.clientY);var hiY=Math.max(eDown.clientY,e.clientY);var loX=Math.min(eDown.clientX,e.clientX);var hiX=Math.max(eDown.clientX,e.clientX);var canv=this.modelTrackContainer_.canvas;var worldOffset=canv.getBoundingClientRect().left;var loVX=loX-worldOffset;var hiVX=hiX-worldOffset;var selection=new tr.model.EventSet();if(eDown.appendSelection){var previousSelection=this.brushingStateController_.selection;if(previousSelection!==undefined)
+selection.addEventSet(previousSelection);}
+this.modelTrack_.addIntersectingEventsInRangeToSelection(loVX,hiVX,loY,hiY,selection);this.brushingStateController_.changeSelectionFromTimeline(selection);},onBeginZoom_:function(e){this.isZooming_=true;this.storeInitialInteractionPositionsAndFocus_(e);e.preventDefault();},onUpdateZoom_:function(e){if(!this.isZooming_)
+return;var newPosition=this.extractRelativeMousePosition_(e);var zoomScaleValue=1+(this.lastMouseViewPos_.y-
+newPosition.y)*0.01;this.zoomBy_(zoomScaleValue,false);this.storeLastMousePos_(e);},onEndZoom_:function(e){this.isZooming_=false;if(!e.isClick)
+e.preventDefault();},computeTouchCenter_:function(positions){var xSum=0;var ySum=0;for(var i=0;i<positions.length;++i){xSum+=positions[i].x;ySum+=positions[i].y;}
+return{x:xSum/positions.length,y:ySum/positions.length};},computeTouchSpan_:function(positions){var xMin=Number.MAX_VALUE;var yMin=Number.MAX_VALUE;var xMax=Number.MIN_VALUE;var yMax=Number.MIN_VALUE;for(var i=0;i<positions.length;++i){xMin=Math.min(xMin,positions[i].x);yMin=Math.min(yMin,positions[i].y);xMax=Math.max(xMax,positions[i].x);yMax=Math.max(yMax,positions[i].y);}
+return Math.sqrt((xMin-xMax)*(xMin-xMax)+
+(yMin-yMax)*(yMin-yMax));},onUpdateTransformForTouch_:function(e){var newPositions=this.extractRelativeTouchPositions_(e);var currentPositions=this.lastTouchViewPositions_;var newCenter=this.computeTouchCenter_(newPositions);var currentCenter=this.computeTouchCenter_(currentPositions);var newSpan=this.computeTouchSpan_(newPositions);var currentSpan=this.computeTouchSpan_(currentPositions);var vp=this.viewport_;var viewWidth=this.viewWidth_;var pixelRatio=window.devicePixelRatio||1;var xDelta=pixelRatio*(newCenter.x-currentCenter.x);var yDelta=newCenter.y-currentCenter.y;var zoomScaleValue=currentSpan>10?newSpan/currentSpan:1;var viewFocus=pixelRatio*newCenter.x;var worldFocus=vp.currentDisplayTransform.xViewToWorld(viewFocus);this.displayTransform_.set(vp.currentDisplayTransform);this.displayTransform_.scaleX*=zoomScaleValue;this.displayTransform_.xPanWorldPosToViewPos(worldFocus,viewFocus,viewWidth);this.displayTransform_.incrementPanXInViewUnits(xDelta);this.displayTransform_.panY-=yDelta;vp.setDisplayTransformImmediately(this.displayTransform_);this.storeLastTouchPositions_(e);},initHintText_:function(){this.$.hint_text.style.display='none';this.pendingHintTextClearTimeout_=undefined;},showHintText_:function(text){if(this.pendingHintTextClearTimeout_){window.clearTimeout(this.pendingHintTextClearTimeout_);this.pendingHintTextClearTimeout_=undefined;}
+this.pendingHintTextClearTimeout_=setTimeout(this.hideHintText_.bind(this),1000);this.$.hint_text.textContent=text;this.$.hint_text.style.display='';},hideHintText_:function(){this.pendingHintTextClearTimeout_=undefined;this.$.hint_text.style.display='none';}});'use strict';Polymer('tr-ui-find-control',{filterKeyDown:function(e){if(e.keyCode===27){var hkc=tr.b.getHotkeyControllerForElement(this);if(hkc){hkc.childRequestsBlur(this);}else{this.blur();}
+e.preventDefault();e.stopPropagation();return;}else if(e.keyCode===13){if(e.shiftKey)
+this.findPrevious();else
+this.findNext();}},filterBlur:function(e){this.updateHitCountEl();},filterFocus:function(e){this.$.filter.select();},filterMouseUp:function(e){e.preventDefault();},get controller(){return this.controller_;},set controller(c){this.controller_=c;this.updateHitCountEl();},focus:function(){this.$.filter.focus();},get hasFocus(){return this===document.activeElement;},filterTextChanged:function(){this.$.hitCount.textContent='';this.$.spinner.style.visibility='visible';this.controller.startFiltering(this.$.filter.value).then(function(){this.$.spinner.style.visibility='hidden';this.updateHitCountEl();}.bind(this));},findNext:function(){if(this.controller)
+this.controller.findNext();this.updateHitCountEl();},findPrevious:function(){if(this.controller)
+this.controller.findPrevious();this.updateHitCountEl();},updateHitCountEl:function(){if(!this.controller||!this.hasFocus){this.$.hitCount.textContent='';return;}
+var n=this.controller.filterHits.length;var i=n===0?-1:this.controller.currentHitIndex;this.$.hitCount.textContent=(i+1)+' of '+n;},setText:function(string){this.$.filter.value=string;}});'use strict';tr.exportTo('tr.e.tquery',function(){function Context(){this.event=undefined;this.ancestors=[];}
+Context.prototype={push:function(event){var ctx=new Context();ctx.ancestors=this.ancestors.slice();ctx.ancestors.push(event);return ctx;},pop:function(event){var ctx=new Context();ctx.event=this.ancestors[this.ancestors.length-1];ctx.ancestors=this.ancestors.slice(0,this.ancestors.length-1);return ctx;}};return{Context:Context};});'use strict';tr.exportTo('tr.e.tquery',function(){function Filter(){tr.c.ScriptingObject.call(this);}
+Filter.normalizeFilterExpression=function(filterExpression){if(filterExpression instanceof String||typeof(filterExpression)=='string'||filterExpression instanceof RegExp){var filter=new tr.e.tquery.FilterHasTitle(filterExpression);return filter;}
+return filterExpression;};Filter.prototype={__proto__:tr.c.ScriptingObject.prototype,evaluate:function(context){throw new Error('Not implemented');},matchValue_:function(value,expected){if(expected instanceof RegExp)
+return expected.test(value);else if(expected instanceof Function)
+return expected(value);return value===expected;}};return{Filter:Filter};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterAllOf(opt_subExpressions){tr.e.tquery.Filter.call(this);this.subExpressions=opt_subExpressions||[];}
+FilterAllOf.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpressions(exprs){this.subExpressions_=[];for(var i=0;i<exprs.length;i++){this.subExpressions_.push(tr.e.tquery.Filter.normalizeFilterExpression(exprs[i]));}},get subExpressions(){return this.subExpressions_;},evaluate:function(context){if(!this.subExpressions.length)
+return true;for(var i=0;i<this.subExpressions.length;i++){if(!this.subExpressions[i].evaluate(context))
+return false;}
+return true;}};tr.c.ScriptingObjectRegistry.register(function(){var exprs=[];for(var i=0;i<arguments.length;i++){exprs.push(arguments[i]);}
+return new FilterAllOf(exprs);},{name:'allOf'});return{FilterAllOf:FilterAllOf};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterNot(subExpression){tr.e.tquery.Filter.call(this);this.subExpression=subExpression;}
+FilterNot.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpression(expr){this.subExpression_=tr.e.tquery.Filter.normalizeFilterExpression(expr);},get subExpression(){return this.subExpression_;},evaluate:function(context){return!this.subExpression.evaluate(context);}};tr.c.ScriptingObjectRegistry.register(function(){var exprs=Array.prototype.slice.call(arguments);if(exprs.length!==1)
+throw new Error('not() must have exactly one subexpression');return new FilterNot(exprs[0]);},{name:'not'});return{FilterNot:FilterNot};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterAnyOf(opt_subExpressions){tr.e.tquery.Filter.call(this);this.subExpressions=opt_subExpressions||[];};FilterAnyOf.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpressions(exprs){this.subExpressions_=[];for(var i=0;i<exprs.length;i++){this.subExpressions_.push(tr.e.tquery.Filter.normalizeFilterExpression(exprs[i]));}},get subExpressions(){return this.subExpressions_;},evaluate:function(context){if(!this.subExpressions.length)
+return true;for(var i=0;i<this.subExpressions.length;i++){if(this.subExpressions[i].evaluate(context))
+return true;}
+return false;}};tr.c.ScriptingObjectRegistry.register(function(){var exprs=Array.prototype.slice.call(arguments);return new FilterAnyOf(exprs);},{name:'anyOf'});tr.c.ScriptingObjectRegistry.register(function(){var exprs=Array.prototype.slice.call(arguments);return new tr.e.tquery.FilterNot(new FilterAnyOf(exprs));},{name:'noneOf'});return{FilterAnyOf:FilterAnyOf};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasAncestor(opt_subExpression){this.subExpression=opt_subExpression;};FilterHasAncestor.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpression(expr){this.subExpression_=tr.e.tquery.Filter.normalizeFilterExpression(expr);},get subExpression(){return this.subExpression_;},evaluate:function(context){if(!this.subExpression)
+return context.ancestors.length>0;while(context.ancestors.length){context=context.pop();if(this.subExpression.evaluate(context))
+return true;}
+return false;}};tr.c.ScriptingObjectRegistry.register(function(subExpression){return new FilterHasAncestor(subExpression);},{name:'hasAncestor'});return{FilterHasAncestor:FilterHasAncestor};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasDuration(minValueOrExpected,opt_maxValue){if(minValueOrExpected!==undefined&&opt_maxValue!==undefined){this.minValue=minValueOrExpected;this.maxValue=opt_maxValue;}else{this.expected=minValueOrExpected;}};FilterHasDuration.prototype={__proto__:tr.e.tquery.Filter.prototype,evaluate:function(context){if(context.event.duration===undefined)
+return false;if(this.minValue!==undefined&&this.maxValue!==undefined){return context.event.duration>=this.minValue&&context.event.duration<=this.maxValue;}
+return this.matchValue_(context.event.duration,this.expected);}};tr.c.ScriptingObjectRegistry.register(function(minValueOrExpected,opt_maxValue){return new FilterHasDuration(minValueOrExpected,opt_maxValue);},{name:'hasDuration'});return{FilterHasDuration:FilterHasDuration};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasTitle(expected){tr.e.tquery.Filter.call(this);this.expected=expected;}
+FilterHasTitle.prototype={__proto__:tr.e.tquery.Filter.prototype,evaluate:function(context){return this.matchValue_(context.event.title,this.expected);}};tr.c.ScriptingObjectRegistry.register(function(expected){var filter=new tr.e.tquery.FilterHasTitle(expected);return filter;},{name:'hasTitle'});return{FilterHasTitle:FilterHasTitle};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterIsTopLevel(opt_subExpression){this.subExpression=opt_subExpression;}
+FilterIsTopLevel.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpression(expr){this.subExpression_=tr.e.tquery.Filter.normalizeFilterExpression(expr);},get subExpression(){return this.subExpression_;},evaluate:function(context){if(context.ancestors.length>0)
+return false;if(!this.subExpression)
+return true;return this.subExpression.evaluate(context);}};tr.c.ScriptingObjectRegistry.register(function(subExpression){return new FilterIsTopLevel(subExpression);},{name:'isTopLevel'});return{FilterIsTopLevel:FilterIsTopLevel};});'use strict';tr.exportTo('tr.e.tquery',function(){function addEventTreeToSelection(selection,event){selection.push(event);if(!event.subSlices)
+return;event.subSlices.forEach(addEventTreeToSelection.bind(undefined,selection));}
+function TQuery(model){tr.c.ScriptingObject.call(this);this.model_=model;this.parent_=undefined;this.filterExpression_=undefined;this.selection_=undefined;};TQuery.prototype={__proto__:tr.c.ScriptingObject.prototype,onModelChanged:function(model){this.model_=model;this.selection_=undefined;},get brushingStateController(){return this.brushingStateController_;},filter:function(filterExpression){var result=new TQuery(this.model_);result.parent_=this;result.filterExpression_=tr.e.tquery.Filter.normalizeFilterExpression(filterExpression);return result;},createFilterTaskGraph_:function(){var nodes=[];var node=this;while(node!==undefined){nodes.push(node);node=node.parent_;}
+var rootTask=new tr.b.Task();var lastTask=rootTask;for(var i=nodes.length-1;i>=0;i--){var node=nodes[i];if(node.selection_!==undefined)
+continue;node.selection_=new tr.model.EventSet();if(node.parent_===undefined){lastTask=lastTask.after(this.selectEverythingAsTask_(node.selection_));}else{var prevNode=nodes[i+1];lastTask=this.createFilterTaskForNode_(lastTask,node,prevNode);}}
+return{rootTask:rootTask,lastTask:lastTask,lastNode:node};},createFilterTaskForNode_:function(lastTask,node,prevNode){return lastTask.after(function(){node.evaluateFilterExpression_(prevNode.selection_,node.selection_);},this);},evaluateFilterExpression_:function(inputSelection,outputSelection){var seenEvents={};inputSelection.forEach(function(event){var context=new tr.e.tquery.Context();context.event=event;this.evaluateFilterExpressionForEvent_(context,inputSelection,outputSelection,seenEvents);}.bind(this));},evaluateFilterExpressionForEvent_:function(context,inputSelection,outputSelection,seenEvents){var event=context.event;if(inputSelection.contains(event)&&!seenEvents[event.guid]){seenEvents[event.guid]=true;if(!this.filterExpression_||this.filterExpression_.evaluate(context))
+outputSelection.push(event);}
+if(!event.subSlices)
+return;context=context.push(event);for(var i=0;i<event.subSlices.length;i++){context.event=event.subSlices[i];this.evaluateFilterExpressionForEvent_(context,inputSelection,outputSelection,seenEvents);}},selectEverythingAsTask_:function(selection){var filterTask=new tr.b.Task();this.model_.iterateAllEventContainers(function(container){filterTask.subTask(function(){container.iterateAllEventsInThisContainer(function(){return true;},addEventTreeToSelection.bind(undefined,selection));},this);},this);return filterTask;},ready:function(){return new Promise(function(resolve,reject){var graph=this.createFilterTaskGraph_();graph.lastTask=graph.lastTask.after(function(){resolve(this.selection_);},this);tr.b.Task.RunWhenIdle(graph.rootTask);}.bind(this));},get selection(){if(this.selection_===undefined){var graph=this.createFilterTaskGraph_();tr.b.Task.RunSynchronously(graph.rootTask);}
+return this.selection_;}};tr.c.ScriptingObjectRegistry.register(new TQuery(),{name:'$t'});return{TQuery:TQuery};});'use strict';Polymer('tr-ui-scripting-control',{_isEnterKey:function(event){return event.keyCode!==229&&event.keyIdentifier==='Enter';},_setFocused:function(focused){var promptEl=this.$.prompt;if(focused){promptEl.focus();this.$.root.classList.add('focused');if(promptEl.innerText.length>0){var sel=window.getSelection();sel.collapse(promptEl.firstChild,promptEl.innerText.length);}}else{promptEl.blur();this.$.root.classList.remove('focused');var parent=promptEl.parentElement;var nextEl=promptEl.nextSibling;promptEl.remove();parent.insertBefore(promptEl,nextEl);}},onConsoleFocus:function(e){e.stopPropagation();this._setFocused(true);},onConsoleBlur:function(e){e.stopPropagation();this._setFocused(false);},promptKeyDown:function(e){e.stopPropagation();if(!this._isEnterKey(e))
+return;e.preventDefault();var promptEl=this.$.prompt;var command=promptEl.innerText;if(command.length===0)
+return;promptEl.innerText='';this.addLine_(String.fromCharCode(187)+' '+command);try{var result=this.controller_.executeCommand(command);}catch(e){result=e.stack||e.stackTrace;}
+if(result instanceof tr.e.tquery.TQuery){result.ready().then(function(selection){this.addLine_(selection.length+' matches');this.controller_.brushingStateController.showScriptControlSelection(selection);}.bind(this));}else{this.addLine_(result);}
+promptEl.scrollIntoView();},addLine_:function(line){var historyEl=this.$.history;if(historyEl.innerText.length!==0)
+historyEl.innerText+='\n';historyEl.innerText+=line;},promptKeyPress:function(e){e.stopPropagation();},toggleVisibility:function(){var root=this.$.root;if(!this.visible){root.classList.remove('hidden');this._setFocused(true);}else{root.classList.add('hidden');this._setFocused(false);}},get hasFocus(){return this===document.activeElement;},get visible(){var root=this.$.root;return!root.classList.contains('hidden');},get controller(){return this.controller_;},set controller(c){this.controller_=c;}});'use strict';Polymer('tr-ui-side-panel-container',{ready:function(){this.activePanelContainer_=this.$.active_panel_container;this.tabStrip_=this.$.tab_strip;this.rangeOfInterest_=new tr.b.Range();this.brushingStateController_=undefined;this.onSelectionChanged_=this.onSelectionChanged_.bind(this);this.onModelChanged_=this.onModelChanged_.bind(this);},get brushingStateController(){return this.brushingStateController_;},set brushingStateController(brushingStateController){if(this.brushingStateController){this.brushingStateController_.removeEventListener('change',this.onSelectionChanged_);this.brushingStateController_.removeEventListener('model-changed',this.onModelChanged_);}
+this.brushingStateController_=brushingStateController;if(this.brushingStateController){this.brushingStateController_.addEventListener('change',this.onSelectionChanged_);this.brushingStateController_.addEventListener('model-changed',this.onModelChanged_);}},get selection(){return this.brushingStateController_.selection;},onSelectionChanged_:function(){if(this.activePanel)
+this.activePanel.selection=this.selection;},get model(){return this.brushingStateController_.model;},onModelChanged_:function(){this.activePanelType_=undefined;this.updateContents_();},get expanded(){this.hasAttribute('expanded');},get activePanel(){if(this.activePanelContainer_.children.length===0)
+return undefined;return this.activePanelContainer_.children[0];},get activePanelType(){return this.activePanelType_;},set activePanelType(panelType){if(this.model===undefined)
+throw new Error('Cannot activate panel without a model');var panel=undefined;if(panelType)
+panel=document.createElement(panelType);if(panel!==undefined&&!panel.supportsModel(this.model))
+throw new Error('Cannot activate panel: does not support this model');if(this.activePanelType){this.getLabelElementForPanelType_(this.activePanelType).removeAttribute('selected');}
+this.activePanelContainer_.textContent='';if(panelType===undefined){this.removeAttribute('expanded');this.activePanelType_=undefined;return;}
+this.getLabelElementForPanelType_(panelType).setAttribute('selected',true);this.setAttribute('expanded',true);this.activePanelContainer_.appendChild(panel);panel.rangeOfInterest=this.rangeOfInterest_;panel.selection=this.selection_;panel.model=this.model;this.activePanelType_=panelType;},getPanelTypeForConstructor_:function(constructor){for(var i=0;i<this.tabStrip_.children.length;i++){if(this.tabStrip_.children[i].panelType.constructor==constructor)
+return this.tabStrip_.children[i].panelType;}},getLabelElementForPanelType_:function(panelType){for(var i=0;i<this.tabStrip_.children.length;i++){if(this.tabStrip_.children[i].panelType==panelType)
+return this.tabStrip_.children[i];}
+return undefined;},updateContents_:function(){var previouslyActivePanelType=this.activePanelType;this.tabStrip_.textContent='';var supportedPanelTypes=[];var panelTypes=tr.ui.b.getPolymerElementsThatSubclass('tr-ui-side-panel');panelTypes.forEach(function(panelType){var labelEl=document.createElement('tab-strip-label');var panel=document.createElement(panelType);labelEl.textContent=panel.textLabel;labelEl.panelType=panelType;var supported=panel.supportsModel(this.model);if(this.model&&supported.supported){supportedPanelTypes.push(panelType);labelEl.setAttribute('enabled',true);labelEl.addEventListener('click',function(){this.activePanelType=this.activePanelType===panelType?undefined:panelType;}.bind(this));}else{labelEl.title='Not supported for the current trace: '+
+supported.reason;labelEl.style.display='none';}
+this.tabStrip_.appendChild(labelEl);},this);if(previouslyActivePanelType&&supportedPanelTypes.indexOf(previouslyActivePanelType)!=-1){this.activePanelType=previouslyActivePanelType;this.setAttribute('expanded',true);}else{this.activePanelContainer_.textContent='';this.removeAttribute('expanded');}},get rangeOfInterest(){return this.rangeOfInterest_;},set rangeOfInterest(range){if(range==undefined)
+throw new Error('Must not be undefined');this.rangeOfInterest_=range;if(this.activePanel)
+this.activePanel.rangeOfInterest=range;}});'use strict';Polymer('tr-ui-timeline-view-help-overlay',{ready:function(){var mod=tr.isMac?'cmd ':'ctrl';var spans=this.shadowRoot.querySelectorAll('span.mod');for(var i=0;i<spans.length;i++){spans[i].textContent=mod;}}});'use strict';tr.exportTo('tr.v',function(){function GenericTable(items){if(items!==undefined)
+this.items=items;else
+this.items=[];};GenericTable.prototype={};return{GenericTable:GenericTable};});'use strict';tr.exportTo('tr.v.ui',function(){var ArrayOfNumbersSummaryModes={AVERAGE_MODE:'average-mode',TOTAL_MODE:'total-mode'};return{ArrayOfNumbersSummaryModes:ArrayOfNumbersSummaryModes};});'use strict';Polymer('tr-v-ui-array-of-numbers-span',{created:function(){this.numbers_=undefined;this.summaryMode_=tr.v.ui.ArrayOfNumbersSummaryModes.AVERAGE_MODE;},get summaryMode(){return this.summaryMode_;},set summaryMode(summaryMode){this.summaryMode_=summaryMode;this.updateContents_();},get numbers(){return this.numbers_;},set numbers(numbers){if(numbers===undefined){this.numbers_=undefined;this.updateContents_();return;}
+if(!(numbers instanceof Array))
+throw new Error('Must provide an array');this.numbers_=numbers;this.updateContents_();},updateContents_:function(){if(this.numbers_===undefined){this.shadowRoot.textContent='-';return;}
+var ArrayOfNumbersSummaryModes=tr.v.ui.ArrayOfNumbersSummaryModes;var value;if(this.summaryMode_===ArrayOfNumbersSummaryModes.AVERAGE_MODE)
+value=tr.b.Statistics.mean(this.numbers_);else
+value=tr.b.Statistics.sum(this.numbers_);var valueRounded=Math.round(value*1000.0)/1000.0;this.shadowRoot.textContent=valueRounded;}});'use strict';tr.exportTo('tr.v.ui',function(){var TEXT_COLUMN_MODE=1;var NUMERIC_COLUMN_MODE=2;var ELEMENT_COLUMN_MODE=3;function isNumeric(value){if((typeof value)==='number')
+return true;else if(value instanceof Number)
+return true;return false;}
+function GenericTableViewTotalsItem(opt_values){if(opt_values!==undefined)
+this.values=opt_values;else
+this.values=[];}
+function GenericTableViewColumnDescriptor(fieldName,firstFieldValue){this.title=fieldName;this.fieldName=fieldName;this.updateModeGivenValue(firstFieldValue);}
+GenericTableViewColumnDescriptor.prototype={get columnMode(){return this.columnMode_;},get isInNumericMode(){return this.columnMode_===NUMERIC_COLUMN_MODE;},cmp:function(a,b){if(this.columnMode_===ELEMENT_COLUMN_MODE)
+return 0;return tr.b.comparePossiblyUndefinedValues(a,b,function(a,b){var vA=a[this.fieldName];var vB=b[this.fieldName];return tr.b.comparePossiblyUndefinedValues(vA,vB,function(vA,vB){if(vA.localeCompare)
+return vA.localeCompare(vB);return vA-vB;},this);},this);},updateModeGivenValue:function(fieldValue){if(this.columnMode_===undefined){if(fieldValue===undefined||fieldValue===null)
+return;if(isNumeric(fieldValue)){this.columnMode_=NUMERIC_COLUMN_MODE;return;}
+if(fieldValue instanceof HTMLElement){this.columnMode_=ELEMENT_COLUMN_MODE;return;}
+this.columnMode_=TEXT_COLUMN_MODE;return;}
+if(fieldValue===undefined||fieldValue===null)
+return;if(isNumeric(fieldValue))
+return;if(fieldValue instanceof HTMLElement){this.columnMode_=ELEMENT_COLUMN_MODE;return;}
+if(this.columnMode_===NUMERIC_COLUMN_MODE)
+this.columnMode_=TEXT_COLUMN_MODE;},value:function(item){var fieldValue=item[this.fieldName];if(fieldValue instanceof GenericTableViewTotalsItem){var span=document.createElement('tr-v-ui-array-of-numbers-span');span.summaryMode=tr.v.ui.ArrayOfNumbersSummaryModes.TOTAL_MODE;span.numbers=fieldValue.values;return span;}
+if(fieldValue===undefined)
+return'-';if(fieldValue instanceof HTMLElement)
+return fieldValue;if(fieldValue instanceof Object){var gov=document.createElement('tr-ui-a-generic-object-view');gov.object=fieldValue;return gov;}
+return fieldValue;}};Polymer('tr-v-ui-generic-table-view',{created:function(){this.items_=undefined;this.importantColumNames_=[];},get items(){return this.items_;},set items(itemsOrGenericTable){if(itemsOrGenericTable===undefined){this.items_=undefined;}else if(itemsOrGenericTable instanceof Array){this.items_=itemsOrGenericTable;}else if(itemsOrGenericTable instanceof tr.v.GenericTable){this.items_=itemsOrGenericTable.items;}
+this.updateContents_();},get importantColumNames(){return this.importantColumNames_;},set importantColumNames(importantColumNames){this.importantColumNames_=importantColumNames;this.updateContents_();},createColumns_:function(){var columnsByName={};this.items_.forEach(function(item){tr.b.iterItems(item,function(itemFieldName,itemFieldValue){var colDesc=columnsByName[itemFieldName];if(colDesc!==undefined){colDesc.updateModeGivenValue(itemFieldValue);return;}
+colDesc=new GenericTableViewColumnDescriptor(itemFieldName,itemFieldValue);columnsByName[itemFieldName]=colDesc;},this);},this);var columns=tr.b.dictionaryValues(columnsByName);if(columns.length===0)
+return undefined;var isColumnNameImportant={};var importantColumNames=this.importantColumNames||[];importantColumNames.forEach(function(icn){isColumnNameImportant[icn]=true;});columns.sort(function(a,b){var iA=isColumnNameImportant[a.title]?1:0;var iB=isColumnNameImportant[b.title]?1:0;if((iB-iA)!==0)
+return iB-iA;return a.title.localeCompare(b.title);});var colWidthPercentage;if(columns.length==1)
+colWidthPercentage='100%';else
+colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';columns[0].width='250px';for(var i=1;i<columns.length;i++)
+columns[i].width=colWidthPercentage;return columns;},createFooterRowsIfNeeded_:function(columns){var hasColumnThatIsNumeric=columns.some(function(column){return column.isInNumericMode;});if(!hasColumnThatIsNumeric)
+return[];var totalsItems={};columns.forEach(function(column){if(!column.isInNumericMode)
+return;var totalsItem=new GenericTableViewTotalsItem();this.items_.forEach(function(item){var fieldValue=item[column.fieldName];if(fieldValue===undefined||fieldValue===null)
+return;totalsItem.values.push(fieldValue);});totalsItems[column.fieldName]=totalsItem;},this);return[totalsItems];},updateContents_:function(){var columns;if(this.items_!==undefined)
+columns=this.createColumns_();if(!columns){this.$.table.tableColumns=[];this.$.table.tableRows=[];this.$.table.footerRows=[];return;}
+this.$.table.tableColumns=columns;this.$.table.tableRows=this.items_;this.$.table.footerRows=this.createFooterRowsIfNeeded_(columns);this.$.table.rebuild();},get selectionMode(){return this.$.table.selectionMode;},set selectionMode(selectionMode){this.$.table.selectionMode=selectionMode;},get rowHighlightStyle(){return this.$.table.rowHighlightStyle;},set rowHighlightStyle(rowHighlightStyle){this.$.table.rowHighlightStyle=rowHighlightStyle;},get cellHighlightStyle(){return this.$.table.cellHighlightStyle;},set cellHighlightStyle(cellHighlightStyle){this.$.table.cellHighlightStyle=cellHighlightStyle;}});return{GenericTableViewTotalsItem:GenericTableViewTotalsItem,GenericTableViewColumnDescriptor:GenericTableViewColumnDescriptor};});'use strict';Polymer('tr-ui-timeline-view-metadata-overlay',{created:function(){this.metadata_=undefined;},get metadata(){return this.metadata_;},set metadata(metadata){this.metadata_=metadata;this.$.gtv.items=this.metadata_;}});'use strict';Polymer('tr-v-ui-preferred-display-unit',{ready:function(){this.preferredTimeDisplayMode_=undefined;},attached:function(){tr.v.Unit.didPreferredTimeDisplayUnitChange();},detached:function(){tr.v.Unit.didPreferredTimeDisplayUnitChange();},get preferredTimeDisplayMode(){return this.preferredTimeDisplayMode_;},set preferredTimeDisplayMode(v){if(this.preferredTimeDisplayMode_===v)
+return;this.preferredTimeDisplayMode_=v;tr.v.Unit.didPreferredTimeDisplayUnitChange();}});'use strict';Polymer('tr-ui-timeline-view',{ready:function(){this.tabIndex=0;this.titleEl_=this.$.title;this.leftControlsEl_=this.$.left_controls;this.rightControlsEl_=this.$.right_controls;this.collapsingControlsEl_=this.$.collapsing_controls;this.sidePanelContainer_=this.$.side_panel_container;this.brushingStateController_=new tr.c.BrushingStateController(this);this.findCtl_=this.$.view_find_control;this.findCtl_.controller=new tr.ui.FindController(this.brushingStateController_);this.scriptingCtl_=document.createElement('tr-ui-scripting-control');this.scriptingCtl_.controller=new tr.c.ScriptingController(this.brushingStateController_);this.sidePanelContainer_.brushingStateController=this.brushingStateController_;if(window.tr.metrics&&window.tr.metrics.sh&&window.tr.metrics.sh.SystemHealthMetric){this.railScoreSpan_=document.createElement('tr-metrics-ui-sh-system-health-span');this.rightControls.appendChild(this.railScoreSpan_);}else{this.railScoreSpan_=undefined;}
+this.optionsDropdown_=this.$.view_options_dropdown;this.optionsDropdown_.iconElement.textContent='View Options';this.showFlowEvents_=false;this.optionsDropdown_.appendChild(tr.ui.b.createCheckBox(this,'showFlowEvents','tr.ui.TimelineView.showFlowEvents',false,'Flow events'));this.highlightVSync_=false;this.highlightVSyncCheckbox_=tr.ui.b.createCheckBox(this,'highlightVSync','tr.ui.TimelineView.highlightVSync',false,'Highlight VSync');this.optionsDropdown_.appendChild(this.highlightVSyncCheckbox_);this.initMetadataButton_();this.initConsoleButton_();this.initHelpButton_();this.collapsingControls.appendChild(this.scriptingCtl_);this.dragEl_=this.$.drag_handle;this.analysisEl_=this.$.analysis;this.analysisEl_.brushingStateController=this.brushingStateController_;this.addEventListener('requestSelectionChange',function(e){var sc=this.brushingStateController_;sc.changeSelectionFromRequestSelectionChangeEvent(e.selection);}.bind(this));this.onViewportChanged_=this.onViewportChanged_.bind(this);this.bindKeyListeners_();this.dragEl_.target=this.analysisEl_;},domReady:function(){this.trackViewContainer_=this.querySelector('#track_view_container');},get globalMode(){return this.hotkeyController.globalMode;},set globalMode(globalMode){globalMode=!!globalMode;this.brushingStateController_.historyEnabled=globalMode;this.hotkeyController.globalMode=globalMode;},get hotkeyController(){return this.$.hkc;},updateDocumentFavicon:function(){var hue;if(!this.model)
+hue='blue';else
+hue=this.model.faviconHue;var faviconData=tr.ui.b.FaviconsByHue[hue];if(faviconData===undefined)
+faviconData=tr.ui.b.FaviconsByHue['blue'];var link=document.head.querySelector('link[rel="shortcut icon"]');if(!link){link=document.createElement('link');link.rel='shortcut icon';document.head.appendChild(link);}
+link.href=faviconData;},get showFlowEvents(){return this.showFlowEvents_;},set showFlowEvents(showFlowEvents){this.showFlowEvents_=showFlowEvents;if(!this.trackView_)
+return;this.trackView_.viewport.showFlowEvents=showFlowEvents;},get highlightVSync(){return this.highlightVSync_;},set highlightVSync(highlightVSync){this.highlightVSync_=highlightVSync;if(!this.trackView_)
+return;this.trackView_.viewport.highlightVSync=highlightVSync;},initHelpButton_:function(){var helpButtonEl=this.$.view_help_button;function onClick(e){var dlg=new tr.ui.b.Overlay();dlg.title='Chrome Tracing Help';dlg.appendChild(document.createElement('tr-ui-timeline-view-help-overlay'));dlg.visible=true;e.stopPropagation();}
+helpButtonEl.addEventListener('click',onClick.bind(this));},initConsoleButton_:function(){var toggleEl=this.$.view_console_button;function onClick(e){this.scriptingCtl_.toggleVisibility();e.stopPropagation();return false;}
+toggleEl.addEventListener('click',onClick.bind(this));},initMetadataButton_:function(){var showEl=this.$.view_metadata_button;function onClick(e){var dlg=new tr.ui.b.Overlay();dlg.title='Metadata for trace';var metadataOverlay=document.createElement('tr-ui-timeline-view-metadata-overlay');metadataOverlay.metadata=this.model.metadata;dlg.appendChild(metadataOverlay);dlg.visible=true;e.stopPropagation();return false;}
+showEl.addEventListener('click',onClick.bind(this));this.updateMetadataButtonVisibility_();},updateMetadataButtonVisibility_:function(){var showEl=this.$.view_metadata_button;showEl.style.display=(this.model&&this.model.metadata.length)?'':'none';},get leftControls(){return this.leftControlsEl_;},get rightControls(){return this.rightControlsEl_;},get collapsingControls(){return this.collapsingControlsEl_;},get viewTitle(){return this.titleEl_.textContent.substring(this.titleEl_.textContent.length-2);},set viewTitle(text){if(text===undefined){this.titleEl_.textContent='';this.titleEl_.hidden=true;return;}
+this.titleEl_.hidden=false;this.titleEl_.textContent=text;},get model(){if(this.trackView_)
+return this.trackView_.model;return undefined;},set model(model){var modelInstanceChanged=model!=this.model;var modelValid=model&&!model.bounds.isEmpty;var importWarningsEl=this.shadowRoot.querySelector('#import-warnings');importWarningsEl.textContent='';if(modelInstanceChanged){if(this.railScoreSpan_)
+this.railScoreSpan_.model=undefined;this.trackViewContainer_.textContent='';if(this.trackView_){this.trackView_.viewport.removeEventListener('change',this.onViewportChanged_);this.trackView_.brushingStateController=undefined;this.trackView_.detach();this.trackView_=undefined;}
+this.brushingStateController_.modelWillChange();}
+if(modelValid&&!this.trackView_){this.trackView_=document.createElement('tr-ui-timeline-track-view');this.trackView_.timelineView=this;this.trackView.brushingStateController=this.brushingStateController_;this.trackViewContainer_.appendChild(this.trackView_);this.trackView_.viewport.addEventListener('change',this.onViewportChanged_);}
+if(modelValid){this.trackView_.model=model;this.trackView_.viewport.showFlowEvents=this.showFlowEvents;this.trackView_.viewport.highlightVSync=this.highlightVSync;if(this.railScoreSpan_)
+this.railScoreSpan_.model=model;this.$.display_unit.preferredTimeDisplayMode=model.intrinsicTimeUnit;}
+if(model){model.importWarningsThatShouldBeShownToUser.forEach(function(importWarning){importWarningsEl.addMessage('Import Warning: '+importWarning.type+': '+
+importWarning.message);},this);}
+if(modelInstanceChanged){this.updateMetadataButtonVisibility_();this.brushingStateController_.modelDidChange();this.onViewportChanged_();}},get brushingStateController(){return this.brushingStateController_;},get trackView(){return this.trackView_;},get settings(){if(!this.settings_)
+this.settings_=new tr.b.Settings();return this.settings_;},set focusElement(value){throw new Error('This is deprecated. Please set globalMode to true.');},bindKeyListeners_:function(){var hkc=this.hotkeyController;hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',keyCode:'`'.charCodeAt(0),useCapture:true,thisArg:this,callback:function(e){this.scriptingCtl_.toggleVisibility();if(!this.scriptingCtl_.hasFocus)
+this.focus();e.stopPropagation();}}));hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',keyCode:'/'.charCodeAt(0),useCapture:true,thisArg:this,callback:function(e){if(this.scriptingCtl_.hasFocus)
+return;if(this.findCtl_.hasFocus)
+this.focus();else
+this.findCtl_.focus();e.preventDefault();e.stopPropagation();}}));hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',keyCode:'?'.charCodeAt(0),useCapture:false,thisArg:this,callback:function(e){this.$.view_help_button.click();e.stopPropagation();}}));hkc.addHotKey(new tr.ui.b.HotKey({eventType:'keypress',keyCode:'v'.charCodeAt(0),useCapture:false,thisArg:this,callback:function(e){this.toggleHighlightVSync_();e.stopPropagation();}}));},onViewportChanged_:function(e){var spc=this.sidePanelContainer_;if(!this.trackView_){spc.rangeOfInterest.reset();return;}
+var vr=this.trackView_.viewport.interestRange.asRangeObject();if(!spc.rangeOfInterest.equals(vr))
+spc.rangeOfInterest=vr;if(this.railScoreSpan_&&this.model)
+this.railScoreSpan_.model=this.model;},toggleHighlightVSync_:function(){this.highlightVSyncCheckbox_.checked=!this.highlightVSyncCheckbox_.checked;},setFindCtlText:function(string){this.findCtl_.setText(string);}});'use strict';tr.exportTo('tr.ui.e.highlighter',function(){var Highlighter=tr.ui.tracks.Highlighter;function VSyncHighlighter(viewport){Highlighter.call(this,viewport);this.times_=[];}
 VSyncHighlighter.VSYNC_HIGHLIGHT_COLOR=new tr.b.Color(0,0,255);VSyncHighlighter.VSYNC_HIGHLIGHT_ALPHA=0.1;VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT=0.20;VSyncHighlighter.VSYNC_DENSITY_OPAQUE=0.10;VSyncHighlighter.VSYNC_DENSITY_RANGE=VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT-
 VSyncHighlighter.VSYNC_DENSITY_OPAQUE;VSyncHighlighter.generateStripes=function(times,minTime,maxTime){if(times.length===0)
 return[];var stripes=[];var lowIndex=tr.b.findLowIndexInSortedArray(times,function(time){return time;},minTime);var highIndex=lowIndex-1;while(times[highIndex+1]<=maxTime){highIndex++;}
@@ -7105,7 +7577,40 @@
 VSyncHighlighter.prototype={__proto__:Highlighter.prototype,processModel:function(model){this.times_=model.device.vSyncTimestamps;},drawHighlight:function(ctx,dt,viewLWorld,viewRWorld,viewHeight){if(!this.viewport_.highlightVSync){return;}
 var stripes=VSyncHighlighter.generateStripes(this.times_,viewLWorld,viewRWorld);if(stripes.length==0){return;}
 var stripeRange=stripes[stripes.length-1][1]-stripes[0][0];var stripeDensity=stripes.length/(dt.scaleX*stripeRange);var clampedStripeDensity=tr.b.clamp(stripeDensity,VSyncHighlighter.VSYNC_DENSITY_OPAQUE,VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT);var opacity=(VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT-clampedStripeDensity)/VSyncHighlighter.VSYNC_DENSITY_RANGE;if(opacity==0){return;}
-var pixelRatio=window.devicePixelRatio||1;var height=viewHeight*pixelRatio;var c=VSyncHighlighter.VSYNC_HIGHLIGHT_COLOR;ctx.fillStyle=c.toStringWithAlphaOverride(VSyncHighlighter.VSYNC_HIGHLIGHT_ALPHA*opacity);for(var i=0;i<stripes.length;i++){var xLeftView=dt.xWorldToView(stripes[i][0]);var xRightView=dt.xWorldToView(stripes[i][1]);ctx.fillRect(xLeftView,0,xRightView-xLeftView,height);}}};tr.ui.tracks.Highlighter.register(VSyncHighlighter);return{VSyncHighlighter:VSyncHighlighter};});
+var pixelRatio=window.devicePixelRatio||1;var height=viewHeight*pixelRatio;var c=VSyncHighlighter.VSYNC_HIGHLIGHT_COLOR;ctx.fillStyle=c.toStringWithAlphaOverride(VSyncHighlighter.VSYNC_HIGHLIGHT_ALPHA*opacity);for(var i=0;i<stripes.length;i++){var xLeftView=dt.xWorldToView(stripes[i][0]);var xRightView=dt.xWorldToView(stripes[i][1]);ctx.fillRect(xLeftView,0,xRightView-xLeftView,height);}}};tr.ui.tracks.Highlighter.register(VSyncHighlighter);return{VSyncHighlighter:VSyncHighlighter};});'use strict';tr.exportTo('tr.ui.b',function(){function Row(title,data,groupingKeyFuncs,rowStatsConstructor){this.title=title;this.data_=data;if(groupingKeyFuncs===undefined)
+groupingKeyFuncs=[];this.groupingKeyFuncs_=groupingKeyFuncs;this.rowStatsConstructor_=rowStatsConstructor;this.subRowsBuilt_=false;this.subRows_=undefined;this.rowStats_=undefined;}
+Row.prototype={getCurrentGroupingKeyFunc_:function(){if(this.groupingKeyFuncs_.length===0)
+return undefined;return this.groupingKeyFuncs_[0];},get data(){return this.data_;},get rowStats(){if(this.rowStats_===undefined){this.rowStats_=new this.rowStatsConstructor_(this);}
+return this.rowStats_;},rebuildSubRowsIfNeeded_:function(){if(this.subRowsBuilt_)
+return;this.subRowsBuilt_=true;var groupingKeyFunc=this.getCurrentGroupingKeyFunc_();if(groupingKeyFunc===undefined){this.subRows_=undefined;return;}
+var dataByKey={};var hasValues=false;this.data_.forEach(function(datum){var key=groupingKeyFunc(datum);hasValues=hasValues||(key!==undefined);if(dataByKey[key]===undefined)
+dataByKey[key]=[];dataByKey[key].push(datum);});if(!hasValues){this.subRows_=undefined;return;}
+this.subRows_=[];for(var key in dataByKey){var row=new Row(key,dataByKey[key],this.groupingKeyFuncs_.slice(1),this.rowStatsConstructor_);this.subRows_.push(row);}},get isExpanded(){return(this.subRows&&(this.subRows.length>0)&&(this.subRows.length<5));},get subRows(){this.rebuildSubRowsIfNeeded_();return this.subRows_;}};Polymer('tr-ui-b-grouping-table',{created:function(){this.dataToGroup_=undefined;this.groupBy_=undefined;this.rowStatsConstructor_=undefined;},get tableColumns(){return this.$.table.tableColumns;},set tableColumns(tableColumns){this.$.table.tableColumns=tableColumns;},get tableRows(){return this.$.table.tableRows;},get sortColumnIndex(){return this.$.table.sortColumnIndex;},set sortColumnIndex(sortColumnIndex){this.$.table.sortColumnIndex=sortColumnIndex;},get sortDescending(){return this.$.table.sortDescending;},set sortDescending(sortDescending){this.$.table.sortDescending=sortDescending;},get selectionMode(){return this.$.table.selectionMode;},set selectionMode(selectionMode){this.$.table.selectionMode=selectionMode;},get rowHighlightStyle(){return this.$.table.rowHighlightStyle;},set rowHighlightStyle(rowHighlightStyle){this.$.table.rowHighlightStyle=rowHighlightStyle;},get cellHighlightStyle(){return this.$.table.cellHighlightStyle;},set cellHighlightStyle(cellHighlightStyle){this.$.table.cellHighlightStyle=cellHighlightStyle;},get selectedColumnIndex(){return this.$.table.selectedColumnIndex;},set selectedColumnIndex(selectedColumnIndex){this.$.table.selectedColumnIndex=selectedColumnIndex;},get selectedTableRow(){return this.$.table.selectedTableRow;},set selectedTableRow(selectedTableRow){this.$.table.selectedTableRow=selectedTableRow;},get groupBy(){return this.groupBy_;},set groupBy(groupBy){this.groupBy_=groupBy;this.updateContents_();},get dataToGroup(){return this.dataToGroup_;},set dataToGroup(dataToGroup){this.dataToGroup_=dataToGroup;this.updateContents_();},get rowStatsConstructor(){return this.rowStatsConstructor_;},set rowStatsConstructor(rowStatsConstructor){this.rowStatsConstructor_=rowStatsConstructor;this.updateContents_();},rebuild:function(){this.$.table.rebuild();},updateContents_:function(){var groupBy=this.groupBy_||[];var dataToGroup=this.dataToGroup_||[];var rowStatsConstructor=this.rowStatsConstructor_||function(){};var superRow=new Row('',dataToGroup,groupBy,rowStatsConstructor);this.$.table.tableRows=superRow.subRows||[];}});return{};});'use strict';tr.exportTo('tr.ui.b',function(){var THIS_DOC=document._currentScript.ownerDocument;Polymer('tr-ui-b-grouping-table-groupby-picker',{created:function(){this.needsInit_=true;this.defaultGroupKeys_=undefined;this.possibleGroups_=[];this.settingsKey_=[];this.currentGroupKeys_=undefined;this.dragging_=false;},get defaultGroupKeys(){return this.defaultGroupKeys_;},set defaultGroupKeys(defaultGroupKeys){if(!this.needsInit_)
+throw new Error('Already initialized.');this.defaultGroupKeys_=defaultGroupKeys;this.maybeInit_();},get possibleGroups(){return this.possibleGroups_;},set possibleGroups(possibleGroups){if(!this.needsInit_)
+throw new Error('Already initialized.');this.possibleGroups_=possibleGroups;this.maybeInit_();},get settingsKey(){return this.settingsKey_;},set settingsKey(settingsKey){if(!this.needsInit_)
+throw new Error('Already initialized.');this.settingsKey_=settingsKey;this.maybeInit_();},maybeInit_:function(){if(!this.needsInit_)
+return;if(this.settingsKey_===undefined)
+return;if(this.defaultGroupKeys_===undefined)
+return;if(this.possibleGroups_===undefined)
+return;this.needsInit_=false;var addGroupEl=this.shadowRoot.querySelector('#add-group');addGroupEl.iconElement.textContent='Add another...';this.currentGroupKeys=tr.b.Settings.get(this.settingsKey_,this.defaultGroupKeys_);},get currentGroupKeys(){return this.currentGroupKeys_;},get currentGroups(){var groupsByKey={};this.possibleGroups_.forEach(function(group){groupsByKey[group.key]=group;});return this.currentGroupKeys_.map(function(groupKey){return groupsByKey[groupKey];});},set currentGroupKeys(currentGroupKeys){if(this.currentGroupKeys_===currentGroupKeys)
+return;if(!(currentGroupKeys instanceof Array))
+throw new Error('Must be array');this.currentGroupKeys_=currentGroupKeys;this.updateGroups_();tr.b.Settings.set(this.settingsKey_,this.currentGroupKeys_);var e=new tr.b.Event('current-groups-changed');this.dispatchEvent(e);},updateGroups_:function(){var groupsEl=this.shadowRoot.querySelector('groups');var addGroupEl=this.shadowRoot.querySelector('#add-group');groupsEl.textContent='';addGroupEl.textContent='';var unusedGroups={};var groupsByKey={};this.possibleGroups_.forEach(function(group){unusedGroups[group.key]=group;groupsByKey[group.key]=group;});this.currentGroupKeys_.forEach(function(key){delete unusedGroups[key];});var groupTemplateEl=THIS_DOC.querySelector('#tr-ui-b-grouping-table-groupby-picker-group-template');this.currentGroupKeys_.forEach(function(key,index){var group=groupsByKey[key];var groupEl=document.createElement('group');groupEl.groupKey=key;groupEl.appendChild(document.importNode(groupTemplateEl.content,true));groupEl.querySelector('#key').textContent=group.label;groupsEl.appendChild(groupEl);this.configureRemoveButtonForGroup_(groupEl);this.configureDragAndDropForGroup_(groupEl);},this);tr.b.iterItems(unusedGroups,function(key,group){var groupEl=document.createElement('possible-group');groupEl.textContent=group.label;groupEl.addEventListener('click',function(){var newKeys=this.currentGroupKeys.slice();newKeys.push(key);this.currentGroupKeys=newKeys;addGroupEl.close();}.bind(this));addGroupEl.appendChild(groupEl);},this);if(tr.b.dictionaryLength(unusedGroups)==0){addGroupEl.style.display='none';}else{addGroupEl.style.display='';}},configureRemoveButtonForGroup_:function(groupEl){var removeEl=groupEl.querySelector('#remove');removeEl.addEventListener('click',function(){var newKeys=this.currentGroupKeys.slice();var i=newKeys.indexOf(groupEl.groupKey);newKeys.splice(i,1);this.currentGroupKeys=newKeys;}.bind(this));groupEl.addEventListener('mouseenter',function(){removeEl.setAttribute('hovered',true);});groupEl.addEventListener('mouseleave',function(){removeEl.removeAttribute('hovered');});},configureDragAndDropForGroup_:function(groupEl){var groupsEl=groupEl.parentElement;groupEl.setAttribute('draggable',true);groupEl.addEventListener('dragstart',function(e){e.dataTransfer.setData('groupKey',groupEl.groupKey);groupEl.querySelector('#remove').removeAttribute('hovered');groupEl.classList.add('dragging');this.dragging_=true;}.bind(this));groupEl.addEventListener('dragend',function(e){console.log(e.type,groupEl.groupKey);for(var i=0;i<groupsEl.children.length;i++)
+groupsEl.children[i].classList.remove('drop-targeted');groupEl.classList.remove('dragging');this.dragging_=false;}.bind(this));groupEl.addEventListener('dragenter',function(e){if(!this.dragging_)
+return;groupEl.classList.add('drop-targeted');if(this.dragging_)
+e.preventDefault();}.bind(this));groupEl.addEventListener('dragleave',function(e){if(!this.dragging_)
+return;groupEl.classList.remove('drop-targeted');e.preventDefault();}.bind(this));groupEl.addEventListener('dragover',function(e){if(!this.dragging_)
+return;e.preventDefault();groupEl.classList.add('drop-targeted');}.bind(this));groupEl.addEventListener('drop',function(e){if(!this.dragging_)
+return;var srcKey=e.dataTransfer.getData('groupKey');var dstKey=groupEl.groupKey;if(srcKey===dstKey)
+return;var newKeys=this.currentGroupKeys_.slice();var srcIndex=this.currentGroupKeys_.indexOf(srcKey);newKeys.splice(srcIndex,1);var dstIndex=this.currentGroupKeys_.indexOf(dstKey);newKeys.splice(dstIndex,0,srcKey);this.currentGroupKeys=newKeys;e.dataTransfer.clearData();e.preventDefault();e.stopPropagation();}.bind(this));}});return{};});'use strict';(function(){Polymer('tr-ui-sp-file-size-stats-side-panel',{ready:function(){this.model_=undefined;this.selection_=new tr.model.EventSet();this.$.picker.settingsKey='tr-ui-sp-file-size-stats-side-panel-picker';this.$.picker.possibleGroups=[{key:'phase',label:'Event Type',dataFn:function(eventStat){return eventStat.phase;}},{key:'category',label:'Category',dataFn:function(eventStat){return eventStat.category;}},{key:'title',label:'Title',dataFn:function(eventStat){return eventStat.title;}}];this.$.picker.defaultGroupKeys=['phase','title'];this.$.picker.addEventListener('current-groups-changed',this.updateContents_.bind(this));},get textLabel(){return'File Size Stats';},supportsModel:function(m){if(!m){return{supported:false,reason:'No stats were collected for this file.'};}
+if(m.stats.allTraceEventStats.length===0){return{supported:false,reason:'No stats were collected for this file.'};}
+return{supported:true};},get model(){return this.model_;},set model(model){this.model_=model;this.updateContents_();},get rangeOfInterest(){return this.rangeOfInterest_;},set rangeOfInterest(rangeOfInterest){this.rangeOfInterest_=rangeOfInterest;},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;},createColumns_:function(stats){var columns=[{title:'Title',value:function(row){var titleEl=document.createElement('span');titleEl.textContent=row.title;titleEl.style.textOverflow='ellipsis';return titleEl;},cmp:function(a,b){return a.title.localeCompare(b.title);},width:'400px'},{title:'Num Events',textAlign:'right',value:function(row){return row.rowStats.numEvents;},cmp:function(a,b){return a.rowStats.numEvents-b.rowStats.numEvents;},width:'80px'}];if(stats&&stats.hasEventSizesinBytes){columns.push({title:'Bytes',textAlign:'right',value:function(row){var value=new tr.v.ScalarNumeric(tr.v.Unit.byName.sizeInBytes,row.rowStats.totalEventSizeinBytes);var spanEl=tr.v.ui.createScalarSpan(value);return spanEl;},cmp:function(a,b){return a.rowStats.totalEventSizeinBytes-
+b.rowStats.totalEventSizeinBytes;},width:'80px'});}
+return columns;},updateContents_:function(){var table=this.$.table;var columns=this.createColumns_(this.model.stats);table.rowStatsConstructor=function ModelStatsRowStats(row){var sum=tr.b.Statistics.sum(row.data,function(x){return x.numEvents;});var totalEventSizeinBytes=tr.b.Statistics.sum(row.data,function(x){return x.totalEventSizeinBytes;});return{numEvents:sum,totalEventSizeinBytes:totalEventSizeinBytes};};table.tableColumns=columns;table.sortColumnIndex=1;table.sortDescending=true;table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;table.groupBy=this.$.picker.currentGroups.map(function(group){return group.dataFn;});if(!this.model){table.dataToGroup=[];}else{table.dataToGroup=this.model.stats.allTraceEventStats;}
+this.$.table.rebuild();}});})();'use strict';Polymer('tr-ui-e-s-alerts-side-panel',{ready:function(){this.rangeOfInterest_=new tr.b.Range();this.selection_=undefined;},get model(){return this.model_;},set model(model){this.model_=model;this.updateContents_();},set selection(selection){},set rangeOfInterest(rangeOfInterest){},selectAlertsOfType:function(alertTypeString){var alertsOfType=this.model_.alerts.filter(function(alert){return alert.title===alertTypeString;});var event=new tr.model.RequestSelectionChangeEvent();event.selection=new tr.model.EventSet(alertsOfType);this.dispatchEvent(event);},alertsByType_:function(alerts){var alertsByType={};alerts.forEach(function(alert){if(!alertsByType[alert.title])
+alertsByType[alert.title]=[];alertsByType[alert.title].push(alert);});return alertsByType;},alertsTableRows_:function(alertsByType){return Object.keys(alertsByType).map(function(key){return{alertType:key,count:alertsByType[key].length};});},alertsTableColumns_:function(){return[{title:'Alert type',value:function(row){return row.alertType;},width:'180px'},{title:'Count',width:'100%',value:function(row){return row.count;}}];},createAlertsTable_:function(alerts){var alertsByType=this.alertsByType_(alerts);var table=document.createElement('tr-ui-b-table');table.tableColumns=this.alertsTableColumns_();table.tableRows=this.alertsTableRows_(alertsByType);table.selectionMode=tr.ui.b.TableFormat.SelectionMode.ROW;table.addEventListener('selection-changed',function(e){var row=table.selectedTableRow;if(row)
+this.selectAlertsOfType(row.alertType);}.bind(this));return table;},updateContents_:function(){this.$.result_area.textContent='';if(this.model_===undefined)
+return;var panel=this.createAlertsTable_(this.model_.alerts);this.$.result_area.appendChild(panel);},supportsModel:function(m){if(m==undefined){return{supported:false,reason:'Unknown tracing model'};}else if(m.alerts.length===0){return{supported:false,reason:'No alerts in tracing model'};}
+return{supported:true};},get textLabel(){return'Alerts';}});
 </script>
 </head>
   <body>
diff --git a/runtime/observatory/web/timeline.js b/runtime/observatory/web/timeline.js
index 9bdf46a..dea5542 100644
--- a/runtime/observatory/web/timeline.js
+++ b/runtime/observatory/web/timeline.js
@@ -2,6 +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.
 
+// Used to delay the initial timeline load until the timeline has finished
+// loading.
+timeline_loaded = false;
+timeline_vm_address = undefined;
+timeline_isolates = undefined;
+
+function registerForMessages() {
+  window.addEventListener("message", onMessage, false);
+}
+
+registerForMessages();
+
 function onModelLoaded() {
   viewer.globalMode = true;
   viewer.model = model;
@@ -26,9 +38,7 @@
   p.then(onModelLoaded, onImportFail);
 }
 
-function registerForMessages() {
-  window.addEventListener("message", onMessage, false);
-}
+
 
 function fetchUri(uri, onLoad, onError) {
   var xhr = new XMLHttpRequest();
@@ -55,15 +65,21 @@
 function fetchTimelineOnLoad(event) {
   var xhr = event.target;
   var response = JSON.parse(xhr.responseText);
-  var result = response['result'];
-  var newStackFrames = result['stackFrames'];  // Map.
-  var newTraceEvents = result['traceEvents'];  // List.
 
-  // Merge in timeline events.
-  traceObject.traceEvents = traceObject.traceEvents.concat(newTraceEvents);
-  for (var key in newStackFrames) {
-    if (newStackFrames.hasOwnProperty(key)) {
-      traceObject.stackFrames[key] = newStackFrames[key];
+  if (response.error) {
+    // Maybe profiling is disabled.
+    console.log("ERROR " + response.error.message);
+  } else {
+    var result = response['result'];
+    var newStackFrames = result['stackFrames'];  // Map.
+    var newTraceEvents = result['traceEvents'];  // List.
+
+    // Merge in timeline events.
+    traceObject.traceEvents = traceObject.traceEvents.concat(newTraceEvents);
+    for (var key in newStackFrames) {
+      if (newStackFrames.hasOwnProperty(key)) {
+        traceObject.stackFrames[key] = newStackFrames[key];
+      }
     }
   }
 
@@ -190,7 +206,13 @@
   var params = request['params'];
   switch (method) {
     case 'refresh':
-      fetchTimeline(params['vmAddress'], params['isolateIds']);
+      if (!timeline_loaded) {
+        timeline_vm_address = params['vmAddress'];
+        timeline_isolates = params['isolateIds'];
+        console.log('Delaying timeline refresh until loaded.');
+      } else {
+        fetchTimeline(params['vmAddress'], params['isolateIds']);
+      }
     break;
     case 'clear':
       clearTimeline();
@@ -215,7 +237,13 @@
   viewer.id = 'trace-viewer';
   viewer.globalMode = true;
   document.body.appendChild(viewer);
-  registerForMessages();
+  timeline_loaded = true;
+  if (timeline_vm_address != undefined) {
+    console.log('Triggering delayed timeline refresh.');
+    fetchTimeline(timeline_vm_address, timeline_isolates);
+    timeline_vm_address = undefined;
+    timeline_isolates = undefined;
+  }
 });
 
 console.log('loaded');
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index d1c6ef6..7e11bb3 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -102,6 +102,9 @@
 // the value defined in TargetConditionals.h
 #define TARGET_OS_MACOS 1
 #if TARGET_OS_IPHONE
+// Test for this #define by saying '#if TARGET_OS_IOS' rather than the usual
+// '#if defined(TARGET_OS_IOS)'. TARGET_OS_IOS is defined to be 0 in
+// XCode >= 7.0. See Issue #24453.
 #define TARGET_OS_IOS 1
 #endif
 
@@ -647,6 +650,14 @@
 #define STDERR_FILENO 2
 #endif
 
+// For checking deterministic graph generation, we can store instruction
+// tag in the ICData and check it when recreating the flow graph in
+// optimizing compiler. Enable it for other modes (product, release) if needed
+// for debugging.
+#if defined(DEBUG)
+#define TAG_IC_DATA
+#endif
+
 }  // namespace dart
 
 #endif  // PLATFORM_GLOBALS_H_
diff --git a/runtime/platform/text_buffer.cc b/runtime/platform/text_buffer.cc
index b9c6ac7..1536dac 100644
--- a/runtime/platform/text_buffer.cc
+++ b/runtime/platform/text_buffer.cc
@@ -48,6 +48,14 @@
 }
 
 
+void TextBuffer::AddRaw(const uint8_t* buffer,
+                        intptr_t buffer_length) {
+  EnsureCapacity(buffer_length);
+  memmove(&buf_[msg_len_], buffer, buffer_length);
+  msg_len_ += buffer_length;
+  buf_[msg_len_] = '\0';
+}
+
 intptr_t TextBuffer::Printf(const char* format, ...) {
   va_list args;
   va_start(args, format);
diff --git a/runtime/platform/text_buffer.h b/runtime/platform/text_buffer.h
index f8f0c2f..1908ecb 100644
--- a/runtime/platform/text_buffer.h
+++ b/runtime/platform/text_buffer.h
@@ -23,6 +23,8 @@
   void EscapeAndAddCodeUnit(uint32_t cu);
   void AddString(const char* s);
   void AddEscapedString(const char* s);
+  void AddRaw(const uint8_t* buffer,
+              intptr_t buffer_length);
 
   void Clear();
 
diff --git a/runtime/tests/vm/dart/byte_array_optimized_test.dart b/runtime/tests/vm/dart/byte_array_optimized_test.dart
index 8492798..755c3b1 100644
--- a/runtime/tests/vm/dart/byte_array_optimized_test.dart
+++ b/runtime/tests/vm/dart/byte_array_optimized_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library byte_array_test;
diff --git a/runtime/tests/vm/dart/byte_array_test.dart b/runtime/tests/vm/dart/byte_array_test.dart
index f1ff69e..048e2e7 100644
--- a/runtime/tests/vm/dart/byte_array_test.dart
+++ b/runtime/tests/vm/dart/byte_array_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization_counter_threshold=10 --disable_alloc_stubs_after_gc
+// VMOptions=--optimization_counter_threshold=10 --disable_alloc_stubs_after_gc --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library byte_array_test;
diff --git a/runtime/tests/vm/dart/inline_stack_frame_test.dart b/runtime/tests/vm/dart/inline_stack_frame_test.dart
index 62fa819..e553855 100644
--- a/runtime/tests/vm/dart/inline_stack_frame_test.dart
+++ b/runtime/tests/vm/dart/inline_stack_frame_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.
 
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index da20917..62cc6da 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -36,10 +36,6 @@
 [ $arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simarm64 || $arch == simmips ]
 cc/Service_Profile: Skip
 
-[ $arch == arm ]
-cc/Int8ListLengthMaxElements: Skip # Issue 23314
-cc/ArrayLengthMaxElements: Skip # Issue 23314
-
 [ $compiler == dart2js ]
 dart/redirection_type_shuffling_test: Skip # Depends on lazy enforcement of type bounds
 dart/byte_array_test: Skip # compilers not aware of byte arrays
@@ -55,13 +51,14 @@
 # minifying they can be renamed, which is issue 7953.
 dart/inline_stack_frame_test: RuntimeError, Pass # Issue 7953
 
+[ $compiler == dart2js && $cps_ir && $checked ]
+dart/*: Skip # checked mode + cpsir not supported yet. Issue 25761
+
 [ $compiler == dart2js || $compiler == dart2analyzer ]
 # Data uri's not supported by dart2js or the analyzer.
 dart/data_uri*test: Skip
 
 [ $arch == mips ]
-cc/StaticNonNullSumCallCodegen: Crash, Pass # Issue 17440
-cc/ArrayLengthMaxElements: Crash  # Issue 23275
 cc/Int8ListLengthMaxElements: Skip # Issue 23536, uses 1 GB memory.
 
 [ $arch == mips && $mode == debug ]
@@ -84,7 +81,7 @@
 [ $noopt ]
 dart/byte_array_test: Crash # Incompatible flag --disable_alloc_stubs_after_gc
 
-[ $noopt || $compiler == precompiler || $compiler == dart2app ]
+[ $noopt || $compiler == precompiler || $mode == product ]
 dart/redirection_type_shuffling_test: CompileTimeError # Imports dart:mirrors
 
 [ $noopt || $runtime == dart_precompiled ]
@@ -94,6 +91,7 @@
 
 [ $runtime == dart_product || $runtime == dart_precompiled ]
 dart/data_uri_spawn_test: SkipByDesign # Isolate.spawnUri
+dart/optimized_stacktrace_test: SkipByDesign # Requires line numbers
 
 [ $runtime == vm && $mode == product ]
 cc/IsolateSetCheckedMode: Fail,OK  # Expects exact type name.
diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn
index ea968d8..b19dfc8 100644
--- a/runtime/vm/BUILD.gn
+++ b/runtime/vm/BUILD.gn
@@ -100,17 +100,13 @@
   assert(defined(invoker.filename), "Need a filename in $target_name")
   assert(defined(invoker.kind), "Need kind in $target_name")
   assert(defined(invoker.output), "Need output in $target_name")
+  assert(defined(invoker.path), "Need path in $target_name")
   action(target_name) {
     visibility = [ ":*" ]  # Only targets in this file can see this.
     libname = invoker.libname
     filename = invoker.filename
     kind = invoker.kind
-
-    if (kind == "source") {
-      path = "../../sdk/lib/${filename}"
-    } else {
-      path = "../lib"
-    }
+    path = invoker.path
 
     lib_sources_gypi =
         exec_script("../../tools/gypi_to_gn.py",
@@ -155,17 +151,24 @@
   foreach(lib, invoker.sources) {
     libname = lib[0]
     filename = lib[1]
+    do_patch = lib[2]
+    source_path = lib[3]
     generate_library_source("generate_${filename}_cc_file") {
       libname = libname
       filename = filename
       kind = "source"
+      path = source_path
       output = "$target_gen_dir/${filename}_gen.cc"
     }
-    generate_library_source("generate_${filename}_patch_cc_file") {
-      libname = libname
-      filename = filename
-      kind = "patch"
-      output = "$target_gen_dir/${filename}_patch_gen.cc"
+    if (do_patch) {
+      patch_path = lib[4]
+      generate_library_source("generate_${filename}_patch_cc_file") {
+        libname = libname
+        filename = filename
+        kind = "patch"
+        path = patch_path
+        output = "$target_gen_dir/${filename}_patch_gen.cc"
+      }
     }
     lib_sources_gypi =
         exec_script("../../tools/gypi_to_gn.py",
@@ -173,10 +176,12 @@
                     "scope",
                     ["../lib/${filename}_sources.gypi"])
     libsources += rebase_path(lib_sources_gypi.sources, ".", "../lib")
-    liboutputs += ["$target_gen_dir/${filename}_gen.cc",
-                   "$target_gen_dir/${filename}_patch_gen.cc"]
-    libdeps += [":generate_${filename}_cc_file",
-                ":generate_${filename}_patch_cc_file"]
+    liboutputs += ["$target_gen_dir/${filename}_gen.cc"]
+    libdeps += [":generate_${filename}_cc_file"]
+    if (do_patch) {
+      liboutputs += ["$target_gen_dir/${filename}_patch_gen.cc"]
+      libdeps += [":generate_${filename}_patch_cc_file"]
+    }
   }
 
   static_library("libdart_lib_nosnapshot") {
@@ -207,17 +212,17 @@
 
 generate_core_libraries("core_libraries") {
   sources = [
-    ["async", "async"],
-    ["core", "core"],
-    ["collection", "collection"],
-    ["convert", "convert"],
-    ["developer", "developer"],
-    ["_internal", "internal"],
-    ["isolate", "isolate"],
-    ["math", "math"],
-    ["mirrors", "mirrors"],
-    ["profiler", "profiler"],
-    ["typed_data", "typed_data"],
-    ["_vmservice", "vmservice"],
+    ["async", "async", true, "../../sdk/lib/async", "../lib"],
+    ["core", "core", true, "../../sdk/lib/core", "../lib"],
+    ["collection", "collection", true, "../../sdk/lib/collection", "../lib"],
+    ["convert", "convert", true, "../../sdk/lib/convert", "../lib"],
+    ["developer", "developer", true, "../../sdk/lib/developer", "../lib"],
+    ["_internal", "internal", true, "../../sdk/lib/internal", "../lib"],
+    ["isolate", "isolate", true, "../../sdk/lib/isolate", "../lib"],
+    ["math", "math", true, "../../sdk/lib/math", "../lib"],
+    ["mirrors", "mirrors", true, "../../sdk/lib/mirrors", "../lib"],
+    ["profiler", "profiler", false, "../../sdk/lib/profiler"],
+    ["typed_data", "typed_data", false, "../lib"],
+    ["_vmservice", "vmservice", true, "../../sdk/lib/vmservice", "../lib"],
   ]
 }
diff --git a/runtime/vm/aot_optimizer.cc b/runtime/vm/aot_optimizer.cc
index f813eb8..7d005b1 100644
--- a/runtime/vm/aot_optimizer.cc
+++ b/runtime/vm/aot_optimizer.cc
@@ -29,6 +29,10 @@
 
 namespace dart {
 
+DEFINE_FLAG(int, max_exhaustive_polymorphic_checks, 5,
+            "If a call receiver is known to be of at most this many classes, "
+            "generate exhaustive class tests instead of a megamorphic call");
+
 // Quick access to the current isolate and zone.
 #define I (isolate())
 #define Z (zone())
@@ -227,32 +231,6 @@
     }
   }
 
-  // Check if getter or setter in function's class and class is currently leaf.
-  if (FLAG_guess_icdata_cid &&
-      ((call->token_kind() == Token::kGET) ||
-          (call->token_kind() == Token::kSET))) {
-    const Class& owner_class = Class::Handle(Z, function().Owner());
-    if (!owner_class.is_abstract() &&
-        !CHA::HasSubclasses(owner_class) &&
-        !CHA::IsImplemented(owner_class)) {
-      const Array& args_desc_array = Array::Handle(Z,
-          ArgumentsDescriptor::New(call->ArgumentCount(),
-                                   call->argument_names()));
-      ArgumentsDescriptor args_desc(args_desc_array);
-      const Function& function = Function::Handle(Z,
-          Resolver::ResolveDynamicForReceiverClass(owner_class,
-                                                   call->function_name(),
-                                                   args_desc));
-      if (!function.IsNull()) {
-        const ICData& ic_data = ICData::ZoneHandle(Z,
-            ICData::NewFrom(*call->ic_data(), class_ids.length()));
-        ic_data.AddReceiverCheck(owner_class.id(), function);
-        call->set_ic_data(&ic_data);
-        return true;
-      }
-    }
-  }
-
   return false;
 }
 
@@ -307,11 +285,11 @@
     return;
   }
 
-  const bool with_checks = false;
   PolymorphicInstanceCallInstr* specialized =
       new(Z) PolymorphicInstanceCallInstr(call->instance_call(),
                                           ic_data,
-                                          with_checks);
+                                          /* with_checks = */ false,
+                                          /* complete = */ false);
   call->ReplaceWith(specialized, current_iterator());
 }
 
@@ -1337,40 +1315,6 @@
 }
 
 
-// Use CHA to determine if the call needs a class check: if the callee's
-// receiver is the same as the caller's receiver and there are no overriden
-// callee functions, then no class check is needed.
-bool AotOptimizer::InstanceCallNeedsClassCheck(
-    InstanceCallInstr* call, RawFunction::Kind kind) const {
-  if (!FLAG_use_cha_deopt && !isolate()->all_classes_finalized()) {
-    // Even if class or function are private, lazy class finalization
-    // may later add overriding methods.
-    return true;
-  }
-  Definition* callee_receiver = call->ArgumentAt(0);
-  ASSERT(callee_receiver != NULL);
-  const Function& function = flow_graph_->function();
-  if (function.IsDynamicFunction() &&
-      callee_receiver->IsParameter() &&
-      (callee_receiver->AsParameter()->index() == 0)) {
-    const String& name = (kind == RawFunction::kMethodExtractor)
-        ? String::Handle(Z, Field::NameFromGetter(call->function_name()))
-        : call->function_name();
-    const Class& cls = Class::Handle(Z, function.Owner());
-    if (!thread()->cha()->HasOverride(cls, name)) {
-      if (FLAG_trace_cha) {
-        THR_Print("  **(CHA) Instance call needs no check, "
-            "no overrides of '%s' '%s'\n",
-            name.ToCString(), cls.ToCString());
-      }
-      thread()->cha()->AddToLeafClasses(cls);
-      return false;
-    }
-  }
-  return true;
-}
-
-
 bool AotOptimizer::InlineImplicitInstanceGetter(InstanceCallInstr* call) {
   ASSERT(call->HasICData());
   const ICData& ic_data = *call->ic_data();
@@ -1385,7 +1329,8 @@
       Field::ZoneHandle(Z, GetField(class_ids[0], field_name));
   ASSERT(!field.IsNull());
 
-  if (InstanceCallNeedsClassCheck(call, RawFunction::kImplicitGetter)) {
+  if (flow_graph()->InstanceCallNeedsClassCheck(
+          call, RawFunction::kImplicitGetter)) {
     return false;
   }
   LoadFieldInstr* load = new(Z) LoadFieldInstr(
@@ -2386,14 +2331,12 @@
       return;
     }
   }
-  const String& dst_name = String::ZoneHandle(Z,
-      Symbols::New(Exceptions::kCastErrorDstName));
   AssertAssignableInstr* assert_as =
       new(Z) AssertAssignableInstr(call->token_pos(),
                                    new(Z) Value(left),
                                    new(Z) Value(type_args),
                                    type,
-                                   dst_name,
+                                   Symbols::InTypeCast(),
                                    call->deopt_id());
   ReplaceCall(call, assert_as);
 }
@@ -2406,8 +2349,30 @@
   return false;
 }
 
-// Special optimizations when running in --noopt mode.
-void AotOptimizer::InstanceCallNoopt(InstanceCallInstr* instr) {
+
+static bool HasLikelySmiOperand(InstanceCallInstr* instr) {
+  // Phis with at least one known smi are // guessed to be likely smi as well.
+  for (intptr_t i = 0; i < instr->ArgumentCount(); ++i) {
+    PhiInstr* phi = instr->ArgumentAt(i)->AsPhi();
+    if (phi != NULL) {
+      for (intptr_t j = 0; j < phi->InputCount(); ++j) {
+        if (phi->InputAt(j)->Type()->ToCid() == kSmiCid) return true;
+      }
+    }
+  }
+  // If all of the inputs are known smis or the result of CheckedSmiOp,
+  // we guess the operand to be likely smi.
+  for (intptr_t i = 0; i < instr->ArgumentCount(); ++i) {
+    if (!instr->ArgumentAt(i)->IsCheckedSmiOp()) return false;
+  }
+  return true;
+}
+
+
+// Tries to optimize instance call by replacing it with a faster instruction
+// (e.g, binary op, field load, ..).
+void AotOptimizer::VisitInstanceCall(InstanceCallInstr* instr) {
+  ASSERT(FLAG_precompiled_mode);
   // TODO(srdjan): Investigate other attempts, as they are not allowed to
   // deoptimize.
 
@@ -2476,14 +2441,148 @@
   if (has_one_target) {
     RawFunction::Kind function_kind =
         Function::Handle(Z, unary_checks.GetTargetAt(0)).kind();
-    if (!InstanceCallNeedsClassCheck(instr, function_kind)) {
+    if (!flow_graph()->InstanceCallNeedsClassCheck(
+            instr, function_kind)) {
       PolymorphicInstanceCallInstr* call =
           new(Z) PolymorphicInstanceCallInstr(instr, unary_checks,
-                                              /* with_checks = */ false);
+                                              /* with_checks = */ false,
+                                              /* complete = */ true);
       instr->ReplaceWith(call, current_iterator());
       return;
     }
   }
+  switch (instr->token_kind()) {
+    case Token::kEQ:
+    case Token::kLT:
+    case Token::kLTE:
+    case Token::kGT:
+    case Token::kGTE:
+    case Token::kBIT_OR:
+    case Token::kBIT_XOR:
+    case Token::kBIT_AND:
+    case Token::kADD:
+    case Token::kSUB:
+    case Token::kMUL: {
+      if (HasOnlyTwoOf(*instr->ic_data(), kSmiCid) ||
+          HasLikelySmiOperand(instr)) {
+        Definition* left = instr->ArgumentAt(0);
+        Definition* right = instr->ArgumentAt(1);
+        CheckedSmiOpInstr* smi_op =
+            new(Z) CheckedSmiOpInstr(instr->token_kind(),
+                                     new(Z) Value(left),
+                                     new(Z) Value(right),
+                                     instr);
+
+        ReplaceCall(instr, smi_op);
+        return;
+      }
+      break;
+    }
+    default:
+      break;
+  }
+
+  // No IC data checks. Try resolve target using the propagated type.
+  // If the propagated type has a method with the target name and there are
+  // no overrides with that name according to CHA, call the method directly.
+  const intptr_t receiver_cid =
+      instr->PushArgumentAt(0)->value()->Type()->ToCid();
+  if (receiver_cid != kDynamicCid) {
+    const Class& receiver_class = Class::Handle(Z,
+        isolate()->class_table()->At(receiver_cid));
+
+    const Array& args_desc_array = Array::Handle(Z,
+        ArgumentsDescriptor::New(instr->ArgumentCount(),
+                                 instr->argument_names()));
+    ArgumentsDescriptor args_desc(args_desc_array);
+    const Function& function = Function::Handle(Z,
+        Resolver::ResolveDynamicForReceiverClass(
+            receiver_class,
+            instr->function_name(),
+            args_desc));
+    if (!function.IsNull()) {
+      if (!thread()->cha()->HasOverride(receiver_class,
+                                        instr->function_name())) {
+        if (FLAG_trace_cha) {
+          THR_Print("  **(CHA) Instance call needs no check, "
+              "no overrides of '%s' '%s'\n",
+              instr->function_name().ToCString(), receiver_class.ToCString());
+        }
+
+        // Create fake IC data with the resolved target.
+        const ICData& ic_data = ICData::Handle(
+            ICData::New(flow_graph_->function(),
+                        instr->function_name(),
+                        args_desc_array,
+                        Thread::kNoDeoptId,
+                        /* args_tested = */ 1));
+        ic_data.AddReceiverCheck(receiver_class.id(), function);
+        PolymorphicInstanceCallInstr* call =
+            new(Z) PolymorphicInstanceCallInstr(instr, ic_data,
+                                                /* with_checks = */ false,
+                                                /* complete = */ true);
+        instr->ReplaceWith(call, current_iterator());
+        return;
+      }
+    }
+  }
+
+  Definition* callee_receiver = instr->ArgumentAt(0);
+  const Function& function = flow_graph_->function();
+  if (function.IsDynamicFunction() &&
+      flow_graph_->IsReceiver(callee_receiver)) {
+    // Call receiver is method receiver.
+    Class& receiver_class = Class::Handle(Z, function.Owner());
+    GrowableArray<intptr_t> class_ids(6);
+    if (thread()->cha()->ConcreteSubclasses(receiver_class, &class_ids)) {
+      if (class_ids.length() <= FLAG_max_exhaustive_polymorphic_checks) {
+        if (FLAG_trace_cha) {
+          THR_Print("  **(CHA) Only %" Pd " concrete subclasses of %s for %s\n",
+                    class_ids.length(),
+                    receiver_class.ToCString(),
+                    instr->function_name().ToCString());
+        }
+
+        const Array& args_desc_array = Array::Handle(Z,
+            ArgumentsDescriptor::New(instr->ArgumentCount(),
+                                     instr->argument_names()));
+        ArgumentsDescriptor args_desc(args_desc_array);
+
+        const ICData& ic_data = ICData::Handle(
+            ICData::New(function,
+                        instr->function_name(),
+                        args_desc_array,
+                        Thread::kNoDeoptId,
+                        /* args_tested = */ 1));
+
+        Function& target = Function::Handle(Z);
+        Class& cls = Class::Handle(Z);
+        bool includes_dispatcher_case = false;
+        for (intptr_t i = 0; i < class_ids.length(); i++) {
+          intptr_t cid = class_ids[i];
+          cls = isolate()->class_table()->At(cid);
+          target = Resolver::ResolveDynamicForReceiverClass(
+              cls,
+              instr->function_name(),
+              args_desc);
+          if (target.IsNull()) {
+            // noSuchMethod, call through getter or closurization
+            includes_dispatcher_case = true;
+          } else {
+            ic_data.AddReceiverCheck(cid, target);
+          }
+        }
+        if (!includes_dispatcher_case && (ic_data.NumberOfChecks() > 0)) {
+          PolymorphicInstanceCallInstr* call =
+              new(Z) PolymorphicInstanceCallInstr(instr, ic_data,
+                                                  /* with_checks = */ true,
+                                                  /* complete = */ true);
+          instr->ReplaceWith(call, current_iterator());
+          return;
+        }
+      }
+    }
+  }
 
   // More than one targets. Generate generic polymorphic call without
   // deoptimization.
@@ -2493,62 +2592,11 @@
     // deoptimization is allowed.
     PolymorphicInstanceCallInstr* call =
         new(Z) PolymorphicInstanceCallInstr(instr, unary_checks,
-                                            /* with_checks = */ true);
+                                            /* with_checks = */ true,
+                                            /* complete = */ false);
     instr->ReplaceWith(call, current_iterator());
     return;
   }
-
-  // No IC data checks. Try resolve target using the propagated type.
-  // If the propagated type has a method with the target name and there are
-  // no overrides with that name according to CHA, call the method directly.
-  const intptr_t receiver_cid =
-      instr->PushArgumentAt(0)->value()->Type()->ToCid();
-  if (receiver_cid == kDynamicCid) return;
-  const Class& receiver_class = Class::Handle(Z,
-      isolate()->class_table()->At(receiver_cid));
-
-  const Array& args_desc_array = Array::Handle(Z,
-      ArgumentsDescriptor::New(instr->ArgumentCount(),
-                               instr->argument_names()));
-  ArgumentsDescriptor args_desc(args_desc_array);
-  const Function& function = Function::Handle(Z,
-      Resolver::ResolveDynamicForReceiverClass(
-          receiver_class,
-          instr->function_name(),
-          args_desc));
-  if (function.IsNull()) {
-    return;
-  }
-  if (!thread()->cha()->HasOverride(receiver_class, instr->function_name())) {
-    if (FLAG_trace_cha) {
-      THR_Print("  **(CHA) Instance call needs no check, "
-          "no overrides of '%s' '%s'\n",
-          instr->function_name().ToCString(), receiver_class.ToCString());
-    }
-    thread()->cha()->AddToLeafClasses(receiver_class);
-
-    // Create fake IC data with the resolved target.
-    const ICData& ic_data = ICData::Handle(
-        ICData::New(flow_graph_->function(),
-                    instr->function_name(),
-                    args_desc_array,
-                    Thread::kNoDeoptId,
-                    /* args_tested = */ 1));
-    ic_data.AddReceiverCheck(receiver_class.id(), function);
-    PolymorphicInstanceCallInstr* call =
-        new(Z) PolymorphicInstanceCallInstr(instr, ic_data,
-                                            /* with_checks = */ false);
-    instr->ReplaceWith(call, current_iterator());
-    return;
-  }
-}
-
-
-// Tries to optimize instance call by replacing it with a faster instruction
-// (e.g, binary op, field load, ..).
-void AotOptimizer::VisitInstanceCall(InstanceCallInstr* instr) {
-  ASSERT(FLAG_precompiled_mode);
-  InstanceCallNoopt(instr);
 }
 
 
@@ -2712,41 +2760,6 @@
 }
 
 
-void AotOptimizer::VisitAllocateContext(AllocateContextInstr* instr) {
-  // Replace generic allocation with a sequence of inlined allocation and
-  // explicit initalizing stores.
-  AllocateUninitializedContextInstr* replacement =
-      new AllocateUninitializedContextInstr(instr->token_pos(),
-                                            instr->num_context_variables());
-  instr->ReplaceWith(replacement, current_iterator());
-
-  StoreInstanceFieldInstr* store =
-      new(Z) StoreInstanceFieldInstr(Context::parent_offset(),
-                                     new Value(replacement),
-                                     new Value(flow_graph_->constant_null()),
-                                     kNoStoreBarrier,
-                                     instr->token_pos());
-  // Storing into uninitialized memory; remember to prevent dead store
-  // elimination and ensure proper GC barrier.
-  store->set_is_object_reference_initialization(true);
-  flow_graph_->InsertAfter(replacement, store, NULL, FlowGraph::kEffect);
-  Definition* cursor = store;
-  for (intptr_t i = 0; i < instr->num_context_variables(); ++i) {
-    store =
-        new(Z) StoreInstanceFieldInstr(Context::variable_offset(i),
-                                       new Value(replacement),
-                                       new Value(flow_graph_->constant_null()),
-                                       kNoStoreBarrier,
-                                       instr->token_pos());
-    // Storing into uninitialized memory; remember to prevent dead store
-    // elimination and ensure proper GC barrier.
-    store->set_is_object_reference_initialization(true);
-    flow_graph_->InsertAfter(cursor, store, NULL, FlowGraph::kEffect);
-    cursor = store;
-  }
-}
-
-
 void AotOptimizer::VisitLoadCodeUnits(LoadCodeUnitsInstr* instr) {
   // TODO(zerny): Use kUnboxedUint32 once it is fully supported/optimized.
 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
@@ -2790,7 +2803,8 @@
       Field::ZoneHandle(Z, GetField(class_id, field_name));
   ASSERT(!field.IsNull());
 
-  if (InstanceCallNeedsClassCheck(instr, RawFunction::kImplicitSetter)) {
+  if (flow_graph()->InstanceCallNeedsClassCheck(
+          instr, RawFunction::kImplicitSetter)) {
     return false;
   }
 
diff --git a/runtime/vm/aot_optimizer.h b/runtime/vm/aot_optimizer.h
index 3d1ed1b..97c996a 100644
--- a/runtime/vm/aot_optimizer.h
+++ b/runtime/vm/aot_optimizer.h
@@ -48,7 +48,6 @@
 
   virtual void VisitStaticCall(StaticCallInstr* instr);
   virtual void VisitInstanceCall(InstanceCallInstr* instr);
-  virtual void VisitAllocateContext(AllocateContextInstr* instr);
   virtual void VisitLoadCodeUnits(LoadCodeUnitsInstr* instr);
 
   void InsertBefore(Instruction* next,
@@ -67,7 +66,6 @@
 
   bool TryReplaceWithIndexedOp(InstanceCallInstr* call);
 
-
   bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind);
   bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind);
 
@@ -159,8 +157,6 @@
                                        Representation rep, intptr_t cid);
   bool TryStringLengthOneEquality(InstanceCallInstr* call, Token::Kind op_kind);
 
-  void InstanceCallNoopt(InstanceCallInstr* instr);
-
   RawField* GetField(intptr_t class_id, const String& field_name);
 
   Thread* thread() const { return flow_graph_->thread(); }
diff --git a/runtime/vm/assembler.cc b/runtime/vm/assembler.cc
index 318881c..fe775bf 100644
--- a/runtime/vm/assembler.cc
+++ b/runtime/vm/assembler.cc
@@ -244,6 +244,7 @@
 
 intptr_t ObjectPoolWrapper::AddObject(const Object& obj,
                                       Patchability patchable) {
+  ASSERT(obj.IsNotTemporaryScopedHandle());
   return AddObject(ObjectPoolWrapperEntry(&obj), patchable);
 }
 
@@ -255,6 +256,10 @@
 
 intptr_t ObjectPoolWrapper::AddObject(ObjectPoolWrapperEntry entry,
                                       Patchability patchable) {
+  ASSERT((entry.type_ != ObjectPool::kTaggedObject) ||
+         (entry.obj_->IsNotTemporaryScopedHandle() &&
+          (entry.equivalence_ == NULL ||
+           entry.equivalence_->IsNotTemporaryScopedHandle())));
   object_pool_.Add(entry);
   if (patchable == kNotPatchable) {
     // The object isn't patchable. Record the index for fast lookup.
@@ -275,7 +280,6 @@
       return idx;
     }
   }
-
   return AddObject(entry, patchable);
 }
 
@@ -288,8 +292,7 @@
 
 intptr_t ObjectPoolWrapper::FindObject(const Object& obj,
                                        const Object& equivalence) {
-  return FindObject(ObjectPoolWrapperEntry(&obj, &equivalence),
-                    kNotPatchable);
+  return FindObject(ObjectPoolWrapperEntry(&obj, &equivalence), kNotPatchable);
 }
 
 
diff --git a/runtime/vm/assembler.h b/runtime/vm/assembler.h
index 5d20c01..65820fe 100644
--- a/runtime/vm/assembler.h
+++ b/runtime/vm/assembler.h
@@ -247,16 +247,8 @@
   ObjIndexPair(Key key, Value value) : value_(value) {
     key_.type_ = key.type_;
     if (key.type_ == ObjectPool::kTaggedObject) {
-      if (key.obj_->IsNotTemporaryScopedHandle()) {
-        key_.obj_ = key.obj_;
-      } else {
-        key_.obj_ = &Object::ZoneHandle(key.obj_->raw());
-      }
-      if (key.equivalence_->IsNotTemporaryScopedHandle()) {
-        key_.equivalence_ = key.equivalence_;
-      } else {
-        key_.equivalence_ = &Object::ZoneHandle(key.equivalence_->raw());
-      }
+      key_.obj_ = key.obj_;
+      key_.equivalence_ = key.equivalence_;
     } else {
       key_.raw_value_ = key.raw_value_;
     }
@@ -273,20 +265,12 @@
     if (key.obj_->IsSmi()) {
       return Smi::Cast(*key.obj_).Value();
     }
-    if (key.obj_->IsDouble()) {
-      return static_cast<intptr_t>(
-          bit_cast<int32_t, float>(
-              static_cast<float>(Double::Cast(*key.obj_).value())));
-    }
-    if (key.obj_->IsMint()) {
-      return static_cast<intptr_t>(Mint::Cast(*key.obj_).value());
-    }
-    if (key.obj_->IsString()) {
-      return String::Cast(*key.obj_).Hash();
-    }
-    // TODO(fschneider): Add hash function for other classes commonly used as
-    // compile-time constants.
-    return key.obj_->GetClassId();
+    // TODO(asiva) For now we assert that the object is from Old space
+    // and use the address of the raw object, once the weak_entry_table code
+    // in heap allows for multiple thread access we should switch this code
+    // to create a temporary raw obj => id mapping and use that.
+    ASSERT(key.obj_->IsOld());
+    return reinterpret_cast<intptr_t>(key.obj_->raw());
   }
 
   static inline bool IsKeyEqual(Pair kv, Key key) {
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index 4043fc1..41ba7f5 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -2720,7 +2720,7 @@
                        Patchability patchable,
                        Register pp,
                        Condition cond) {
-  const Code& target_code = Code::Handle(stub_entry.code());
+  const Code& target_code = Code::ZoneHandle(stub_entry.code());
   const int32_t offset = ObjectPool::element_offset(
       object_pool_wrapper_.FindObject(target_code, patchable));
   LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag, pp, cond);
@@ -2744,7 +2744,7 @@
 
 void Assembler::BranchLink(const StubEntry& stub_entry,
                            Patchability patchable) {
-  const Code& code = Code::Handle(stub_entry.code());
+  const Code& code = Code::ZoneHandle(stub_entry.code());
   BranchLink(code, patchable);
 }
 
@@ -2754,9 +2754,16 @@
 }
 
 
+void Assembler::BranchLinkToRuntime() {
+  ldr(IP, Address(THR, Thread::call_to_runtime_entry_point_offset()));
+  ldr(CODE_REG, Address(THR, Thread::call_to_runtime_stub_offset()));
+  blx(IP);
+}
+
+
 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
                                           const Object& equivalence) {
-  const Code& target = Code::Handle(stub_entry.code());
+  const Code& target = Code::ZoneHandle(stub_entry.code());
   // Make sure that class CallPattern is able to patch the label referred
   // to by this code sequence.
   // For added code robustness, use 'blx lr' in a patchable sequence and
@@ -2776,7 +2783,7 @@
 
 
 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
-  BranchLinkPatchable(Code::Handle(stub_entry.code()));
+  BranchLinkPatchable(Code::ZoneHandle(stub_entry.code()));
 }
 
 
diff --git a/runtime/vm/assembler_arm.h b/runtime/vm/assembler_arm.h
index b3014fb..a85dd43 100644
--- a/runtime/vm/assembler_arm.h
+++ b/runtime/vm/assembler_arm.h
@@ -675,6 +675,7 @@
   void BranchLink(const StubEntry& stub_entry,
                   Patchability patchable = kNotPatchable);
   void BranchLink(const Code& code, Patchability patchable);
+  void BranchLinkToRuntime();
 
   // Branch and link to an entry address. Call sequence can be patched.
   void BranchLinkPatchable(const StubEntry& stub_entry);
diff --git a/runtime/vm/assembler_arm64.cc b/runtime/vm/assembler_arm64.cc
index 70b2f2c..28dc872 100644
--- a/runtime/vm/assembler_arm64.cc
+++ b/runtime/vm/assembler_arm64.cc
@@ -583,7 +583,7 @@
 void Assembler::Branch(const StubEntry& stub_entry,
                        Register pp,
                        Patchability patchable) {
-  const Code& target = Code::Handle(stub_entry.code());
+  const Code& target = Code::ZoneHandle(stub_entry.code());
   const int32_t offset = ObjectPool::element_offset(
       object_pool_wrapper_.FindObject(target, patchable));
   LoadWordFromPoolOffset(CODE_REG, offset, pp);
@@ -598,7 +598,7 @@
 
 void Assembler::BranchLink(const StubEntry& stub_entry,
                            Patchability patchable) {
-  const Code& target = Code::Handle(stub_entry.code());
+  const Code& target = Code::ZoneHandle(stub_entry.code());
   const int32_t offset = ObjectPool::element_offset(
       object_pool_wrapper_.FindObject(target, patchable));
   LoadWordFromPoolOffset(CODE_REG, offset);
@@ -612,9 +612,16 @@
 }
 
 
+void Assembler::BranchLinkToRuntime() {
+  ldr(LR, Address(THR, Thread::call_to_runtime_entry_point_offset()));
+  ldr(CODE_REG, Address(THR, Thread::call_to_runtime_stub_offset()));
+  blr(LR);
+}
+
+
 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
                                           const Object& equivalence) {
-  const Code& target = Code::Handle(stub_entry.code());
+  const Code& target = Code::ZoneHandle(stub_entry.code());
   const int32_t offset = ObjectPool::element_offset(
       object_pool_wrapper_.FindObject(target, equivalence));
   LoadWordFromPoolOffset(CODE_REG, offset);
diff --git a/runtime/vm/assembler_arm64.h b/runtime/vm/assembler_arm64.h
index 1475625..ee8eb70 100644
--- a/runtime/vm/assembler_arm64.h
+++ b/runtime/vm/assembler_arm64.h
@@ -1228,6 +1228,7 @@
                   Patchability patchable = kNotPatchable);
 
   void BranchLinkPatchable(const StubEntry& stub_entry);
+  void BranchLinkToRuntime();
 
   // Emit a call that shares its object pool entries with other calls
   // that have the same equivalence marker.
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index 2759cd2..b9e80d0 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -2645,6 +2645,12 @@
 }
 
 
+void Assembler::CallToRuntime() {
+  movl(CODE_REG, Address(THR, Thread::call_to_runtime_stub_offset()));
+  call(Address(THR, Thread::call_to_runtime_entry_point_offset()));
+}
+
+
 void Assembler::Jmp(const StubEntry& stub_entry) {
   const ExternalLabel label(stub_entry.EntryPoint());
   jmp(&label);
diff --git a/runtime/vm/assembler_ia32.h b/runtime/vm/assembler_ia32.h
index 075ac70..536a06e 100644
--- a/runtime/vm/assembler_ia32.h
+++ b/runtime/vm/assembler_ia32.h
@@ -738,6 +738,7 @@
   void CallRuntime(const RuntimeEntry& entry, intptr_t argument_count);
 
   void Call(const StubEntry& stub_entry);
+  void CallToRuntime();
 
   void Jmp(const StubEntry& stub_entry);
   void J(Condition condition, const StubEntry& stub_entry);
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index f5cbd1a..68794ed 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -493,9 +493,9 @@
 
 void Assembler::Branch(const StubEntry& stub_entry, Register pp) {
   ASSERT(!in_delay_slot_);
-  const Code& target_code = Code::Handle(stub_entry.code());
+  const Code& target_code = Code::ZoneHandle(stub_entry.code());
   const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindObject(target_code, kPatchable));
+      object_pool_wrapper_.AddObject(target_code, kPatchable));
   LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag, pp);
   lw(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
   jr(TMP);
@@ -524,18 +524,25 @@
 
 void Assembler::BranchLink(const StubEntry& stub_entry,
                            Patchability patchable) {
-  BranchLink(Code::Handle(stub_entry.code()), patchable);
+  BranchLink(Code::ZoneHandle(stub_entry.code()), patchable);
 }
 
 
 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
-  BranchLink(Code::Handle(stub_entry.code()), kPatchable);
+  BranchLink(Code::ZoneHandle(stub_entry.code()), kPatchable);
+}
+
+
+void Assembler::BranchLinkToRuntime() {
+  lw(T9, Address(THR, Thread::call_to_runtime_entry_point_offset()));
+  lw(CODE_REG, Address(THR, Thread::call_to_runtime_stub_offset()));
+  jalr(T9);
 }
 
 
 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
                                           const Object& equivalence) {
-  const Code& target = Code::Handle(stub_entry.code());
+  const Code& target = Code::ZoneHandle(stub_entry.code());
   ASSERT(!in_delay_slot_);
   const int32_t offset = ObjectPool::element_offset(
       object_pool_wrapper_.FindObject(target, equivalence));
diff --git a/runtime/vm/assembler_mips.h b/runtime/vm/assembler_mips.h
index 1654ac9..4e4f7f3 100644
--- a/runtime/vm/assembler_mips.h
+++ b/runtime/vm/assembler_mips.h
@@ -585,6 +585,12 @@
     EmitRType(SPECIAL2, rs, rd, rd, 0, CLZ);
   }
 
+  // Convert a double in ds to a 32-bit signed int in fd rounding towards 0.
+  void truncwd(FRegister fd, DRegister ds) {
+    FRegister fs = static_cast<FRegister>(ds * 2);
+    EmitFpuRType(COP1, FMT_D, F0, fs, fd, COP1_TRUNC_W);
+  }
+
   // Convert a 32-bit float in fs to a 64-bit double in dd.
   void cvtds(DRegister dd, FRegister fs) {
     FRegister fd = static_cast<FRegister>(dd * 2);
@@ -597,23 +603,12 @@
     EmitFpuRType(COP1, FMT_W, F0, fs, fd, COP1_CVT_D);
   }
 
-  // Converts a 64-bit signed int in fs to a double in fd.
-  void cvtdl(DRegister dd, DRegister ds) {
-    FRegister fs = static_cast<FRegister>(ds * 2);
-    FRegister fd = static_cast<FRegister>(dd * 2);
-    EmitFpuRType(COP1, FMT_L, F0, fs, fd, COP1_CVT_D);
-  }
-
+  // Convert a 64-bit double in ds to a 32-bit float in fd.
   void cvtsd(FRegister fd, DRegister ds) {
     FRegister fs = static_cast<FRegister>(ds * 2);
     EmitFpuRType(COP1, FMT_D, F0, fs, fd, COP1_CVT_S);
   }
 
-  void cvtwd(FRegister fd, DRegister ds) {
-    FRegister fs = static_cast<FRegister>(ds * 2);
-    EmitFpuRType(COP1, FMT_D, F0, fs, fd, COP1_CVT_W);
-  }
-
   void div(Register rs, Register rt) {
     EmitRType(SPECIAL, rs, rt, R0, 0, DIV);
   }
@@ -934,6 +929,7 @@
                   Patchability patchable = kNotPatchable);
 
   void BranchLinkPatchable(const StubEntry& stub_entry);
+  void BranchLinkToRuntime();
 
   // Emit a call that shares its object pool entries with other calls
   // that have the same equivalence marker.
diff --git a/runtime/vm/assembler_mips_test.cc b/runtime/vm/assembler_mips_test.cc
index e3cad3d..2072751 100644
--- a/runtime/vm/assembler_mips_test.cc
+++ b/runtime/vm/assembler_mips_test.cc
@@ -1976,6 +1976,101 @@
 }
 
 
+ASSEMBLER_TEST_GENERATE(Cop1TruncWD, assembler) {
+  __ LoadImmediate(D1, 42.9);
+  __ truncwd(F0, D1);
+  __ mfc1(V0, F0);
+  __ Ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Cop1TruncWD, test) {
+  typedef int (*SimpleCode)() DART_UNUSED;
+  EXPECT(test != NULL);
+  EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Cop1TruncWD_neg, assembler) {
+  __ LoadImmediate(D1, -42.9);
+  __ truncwd(F0, D1);
+  __ mfc1(V0, F0);
+  __ Ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Cop1TruncWD_neg, test) {
+  typedef int (*SimpleCode)() DART_UNUSED;
+  EXPECT(test != NULL);
+  EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Cop1TruncWD_NaN, assembler) {
+  // Double non-signaling NaN is 0x7FF8000000000000.
+  __ LoadImmediate(T0, 0x7FF80000);
+  __ mtc1(ZR, F2);  // Load upper bits of NaN.
+  __ mtc1(T0, F3);  // Load lower bits of NaN.
+  __ truncwd(F0, D1);
+  __ mfc1(V0, F0);
+  __ Ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Cop1TruncWD_NaN, test) {
+  typedef int (*SimpleCode)() DART_UNUSED;
+  EXPECT(test != NULL);
+  EXPECT_EQ(kMaxInt32, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Cop1TruncWD_Inf, assembler) {
+  __ LoadImmediate(T0, 0x7FF00000);  // +inf
+  __ mtc1(ZR, F2);
+  __ mtc1(T0, F3);
+  __ truncwd(F0, D1);
+  __ mfc1(V0, F0);
+  __ Ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Cop1TruncWD_Inf, test) {
+  typedef int (*SimpleCode)() DART_UNUSED;
+  EXPECT(test != NULL);
+  EXPECT_EQ(kMaxInt32, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Cop1TruncWD_Overflow, assembler) {
+  __ LoadImmediate(D1, 2.0*kMaxInt32);
+  __ truncwd(F0, D1);
+  __ mfc1(V0, F0);
+  __ Ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Cop1TruncWD_Overflow, test) {
+  typedef int (*SimpleCode)() DART_UNUSED;
+  EXPECT(test != NULL);
+  EXPECT_EQ(kMaxInt32, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Cop1TruncWD_Underflow, assembler) {
+  __ LoadImmediate(D1, 2.0*kMinInt32);
+  __ truncwd(F0, D1);
+  __ mfc1(V0, F0);
+  __ Ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Cop1TruncWD_Underflow, test) {
+  typedef int (*SimpleCode)() DART_UNUSED;
+  EXPECT(test != NULL);
+  EXPECT_EQ(kMaxInt32, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
+}
+
+
 ASSEMBLER_TEST_GENERATE(Cop1CvtDW, assembler) {
   __ LoadImmediate(T0, 42);
   __ mtc1(T0, F2);
@@ -2008,78 +2103,6 @@
 }
 
 
-ASSEMBLER_TEST_GENERATE(Cop1CvtDL, assembler) {
-  if (TargetCPUFeatures::mips_version() == MIPS32r2) {
-    __ LoadImmediate(T0, 0x1);
-    __ mtc1(ZR, F2);
-    __ mtc1(T0, F3);  // D0 <- 0x100000000 = 4294967296
-    __ cvtdl(D0, D1);
-  } else {
-    __ LoadImmediate(D0, 4294967296.0);
-  }
-  __ Ret();
-}
-
-
-ASSEMBLER_TEST_RUN(Cop1CvtDL, test) {
-  typedef double (*SimpleCode)() DART_UNUSED;
-  EXPECT(test != NULL);
-  double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry());
-  EXPECT_FLOAT_EQ(4294967296.0, res, 0.001);
-}
-
-
-ASSEMBLER_TEST_GENERATE(Cop1CvtDL_neg, assembler) {
-  if (TargetCPUFeatures::mips_version() == MIPS32r2) {
-    __ LoadImmediate(T0, 0xffffffff);
-    __ mtc1(T0, F2);
-    __ mtc1(T0, F3);  // D0 <- 0xffffffffffffffff = -1
-    __ cvtdl(D0, D1);
-  } else {
-    __ LoadImmediate(D0, -1.0);
-  }
-  __ Ret();
-}
-
-
-ASSEMBLER_TEST_RUN(Cop1CvtDL_neg, test) {
-  typedef double (*SimpleCode)() DART_UNUSED;
-  EXPECT(test != NULL);
-  double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry());
-  EXPECT_FLOAT_EQ(-1.0, res, 0.001);
-}
-
-
-ASSEMBLER_TEST_GENERATE(Cop1CvtWD, assembler) {
-  __ LoadImmediate(D1, 42.0);
-  __ cvtwd(F0, D1);
-  __ mfc1(V0, F0);
-  __ Ret();
-}
-
-
-ASSEMBLER_TEST_RUN(Cop1CvtWD, test) {
-  typedef int (*SimpleCode)() DART_UNUSED;
-  EXPECT(test != NULL);
-  EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
-}
-
-
-ASSEMBLER_TEST_GENERATE(Cop1CvtWD_neg, assembler) {
-  __ LoadImmediate(D1, -42.0);
-  __ cvtwd(F0, D1);
-  __ mfc1(V0, F0);
-  __ Ret();
-}
-
-
-ASSEMBLER_TEST_RUN(Cop1CvtWD_neg, test) {
-  typedef int (*SimpleCode)() DART_UNUSED;
-  EXPECT(test != NULL);
-  EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT32(SimpleCode, test->entry()));
-}
-
-
 ASSEMBLER_TEST_GENERATE(Cop1CvtSD, assembler) {
   __ LoadImmediate(D2, -42.42);
   __ cvtsd(F2, D2);
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index e80efe6..478c2ae 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -83,10 +83,10 @@
 
 void Assembler::CallPatchable(const StubEntry& stub_entry) {
   ASSERT(constant_pool_allowed());
-  const Code& target = Code::Handle(stub_entry.code());
+  const Code& target = Code::ZoneHandle(stub_entry.code());
   intptr_t call_start = buffer_.GetPosition();
-  const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindObject(target, kPatchable));
+  const intptr_t idx = object_pool_wrapper_.AddObject(target, kPatchable);
+  const int32_t offset = ObjectPool::element_offset(idx);
   LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
   movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
   call(TMP);
@@ -97,9 +97,9 @@
 void Assembler::CallWithEquivalence(const StubEntry& stub_entry,
                                     const Object& equivalence) {
   ASSERT(constant_pool_allowed());
-  const Code& target = Code::Handle(stub_entry.code());
-  const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindObject(target, equivalence));
+  const Code& target = Code::ZoneHandle(stub_entry.code());
+  const intptr_t idx = object_pool_wrapper_.FindObject(target, equivalence);
+  const int32_t offset = ObjectPool::element_offset(idx);
   LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
   movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
   call(TMP);
@@ -108,15 +108,22 @@
 
 void Assembler::Call(const StubEntry& stub_entry) {
   ASSERT(constant_pool_allowed());
-  const Code& target = Code::Handle(stub_entry.code());
-  const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindObject(target, kNotPatchable));
+  const Code& target = Code::ZoneHandle(stub_entry.code());
+  const intptr_t idx = object_pool_wrapper_.FindObject(target, kNotPatchable);
+  const int32_t offset = ObjectPool::element_offset(idx);
   LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
   movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
   call(TMP);
 }
 
 
+void Assembler::CallToRuntime() {
+  movq(TMP, Address(THR, Thread::call_to_runtime_entry_point_offset()));
+  movq(CODE_REG, Address(THR, Thread::call_to_runtime_stub_offset()));
+  call(TMP);
+}
+
+
 void Assembler::pushq(Register reg) {
   AssemblerBuffer::EnsureCapacity ensured(&buffer_);
   EmitRegisterREX(reg, REX_NONE);
@@ -2577,9 +2584,9 @@
 
 void Assembler::JmpPatchable(const StubEntry& stub_entry, Register pp) {
   ASSERT((pp != PP) || constant_pool_allowed());
-  const Code& target = Code::Handle(stub_entry.code());
-  const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindObject(target, kPatchable));
+  const Code& target = Code::ZoneHandle(stub_entry.code());
+  const intptr_t idx = object_pool_wrapper_.AddObject(target, kPatchable);
+  const int32_t offset = ObjectPool::element_offset(idx);
   movq(CODE_REG, Address::AddressBaseImm32(pp, offset - kHeapObjectTag));
   movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
   jmp(TMP);
@@ -2588,9 +2595,9 @@
 
 void Assembler::Jmp(const StubEntry& stub_entry, Register pp) {
   ASSERT((pp != PP) || constant_pool_allowed());
-  const Code& target = Code::Handle(stub_entry.code());
-  const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindObject(target, kNotPatchable));
+  const Code& target = Code::ZoneHandle(stub_entry.code());
+  const intptr_t idx = object_pool_wrapper_.FindObject(target, kNotPatchable);
+  const int32_t offset = ObjectPool::element_offset(idx);
   movq(CODE_REG, FieldAddress(pp, offset));
   movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
   jmp(TMP);
@@ -2790,9 +2797,10 @@
   if (Thread::CanLoadFromThread(object)) {
     movq(dst, Address(THR, Thread::OffsetFromThread(object)));
   } else if (CanLoadFromObjectPool(object)) {
-    const int32_t offset = ObjectPool::element_offset(
+    const intptr_t idx =
         is_unique ? object_pool_wrapper_.AddObject(object)
-                  : object_pool_wrapper_.FindObject(object));
+                  : object_pool_wrapper_.FindObject(object);
+    const int32_t offset = ObjectPool::element_offset(idx);
     LoadWordFromPoolOffset(dst, offset - kHeapObjectTag);
   } else {
     ASSERT(object.IsSmi() || object.InVMHeap());
@@ -2807,8 +2815,8 @@
                                            Register new_pp) {
   ASSERT(!constant_pool_allowed());
   ASSERT(new_pp != PP);
-  const int32_t offset =
-      ObjectPool::element_offset(object_pool_wrapper_.FindObject(function));
+  const intptr_t idx = object_pool_wrapper_.FindObject(function, kNotPatchable);
+  const int32_t offset = ObjectPool::element_offset(idx);
   movq(dst, Address::AddressBaseImm32(new_pp, offset - kHeapObjectTag));
 }
 
@@ -2860,8 +2868,8 @@
   if (Thread::CanLoadFromThread(object)) {
     cmpq(reg, Address(THR, Thread::OffsetFromThread(object)));
   } else if (CanLoadFromObjectPool(object)) {
-    const int32_t offset =
-        ObjectPool::element_offset(object_pool_wrapper_.FindObject(object));
+    const intptr_t idx = object_pool_wrapper_.FindObject(object, kNotPatchable);
+    const int32_t offset =  ObjectPool::element_offset(idx);
     cmpq(reg, Address(PP, offset-kHeapObjectTag));
   } else {
     ASSERT(object.IsSmi() || FLAG_allow_absolute_addresses);
diff --git a/runtime/vm/assembler_x64.h b/runtime/vm/assembler_x64.h
index 95c474b..4f6eac3 100644
--- a/runtime/vm/assembler_x64.h
+++ b/runtime/vm/assembler_x64.h
@@ -773,6 +773,7 @@
   void J(Condition condition, const StubEntry& stub_entry, Register pp);
   void CallPatchable(const StubEntry& stub_entry);
   void Call(const StubEntry& stub_entry);
+  void CallToRuntime();
   // Emit a call that shares its object pool entries with other calls
   // that have the same equivalence marker.
   void CallWithEquivalence(const StubEntry& stub_entry,
diff --git a/runtime/vm/ast.cc b/runtime/vm/ast.cc
index bb1b624..8ac98c2 100644
--- a/runtime/vm/ast.cc
+++ b/runtime/vm/ast.cc
@@ -13,14 +13,8 @@
 
 namespace dart {
 
-DEFINE_FLAG(bool, trace_ast_visitor, false,
-            "Trace AstVisitor.");
-
 #define DEFINE_VISIT_FUNCTION(BaseName)                                        \
 void BaseName##Node::Visit(AstNodeVisitor* visitor) {                          \
-  if (FLAG_trace_ast_visitor) {                                                \
-    THR_Print("Visiting %s\n", Name());                                        \
-  }                                                                            \
   visitor->Visit##BaseName##Node(this);                                        \
 }
 
@@ -110,13 +104,15 @@
 
 
 LocalVariable* LetNode::AddInitializer(AstNode* node) {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   initializers_.Add(node);
   char name[64];
   OS::SNPrint(name, sizeof(name), ":lt%s_%" Pd "",
       token_pos().ToCString(), vars_.length());
   LocalVariable* temp_var =
       new LocalVariable(token_pos(),
-                        String::ZoneHandle(Symbols::New(name)),
+                        String::ZoneHandle(zone, Symbols::New(thread, name)),
                         Object::dynamic_type());
   vars_.Add(temp_var);
   return temp_var;
@@ -641,7 +637,7 @@
         String::ZoneHandle(zone, Field::LookupSetterSymbol(field_name_));
     Function& setter = Function::ZoneHandle(zone);
     if (!setter_name.IsNull()) {
-      setter = Resolver::ResolveDynamicAnyArgs(cls(), setter_name);
+      setter = Resolver::ResolveDynamicAnyArgs(zone, cls(), setter_name);
     }
     if (setter.IsNull() || setter.is_abstract()) {
       // No instance setter found in super class chain,
diff --git a/runtime/vm/ast_printer_test.cc b/runtime/vm/ast_printer_test.cc
index 588d702..5b774e8 100644
--- a/runtime/vm/ast_printer_test.cc
+++ b/runtime/vm/ast_printer_test.cc
@@ -18,7 +18,7 @@
   const TokenPosition kPos = TokenPosition::kNoSource;
   LocalVariable* v =
       new LocalVariable(kPos,
-                        String::ZoneHandle(Symbols::New("wurscht")),
+                        String::ZoneHandle(Symbols::New(thread, "wurscht")),
                         Type::ZoneHandle(Type::DynamicType()));
   v->set_index(5);
   LoadLocalNode* ll = new LoadLocalNode(kPos, v);
diff --git a/runtime/vm/ast_test.cc b/runtime/vm/ast_test.cc
index 88096e9..90513c2 100644
--- a/runtime/vm/ast_test.cc
+++ b/runtime/vm/ast_test.cc
@@ -13,9 +13,10 @@
 namespace dart {
 
 TEST_CASE(Ast) {
-  LocalVariable* v = new LocalVariable(TokenPosition::kNoSource,
-                                       String::ZoneHandle(Symbols::New("v")),
-                                       Type::ZoneHandle(Type::DynamicType()));
+  LocalVariable* v = new LocalVariable(
+      TokenPosition::kNoSource,
+      String::ZoneHandle(Symbols::New(thread, "v")),
+      Type::ZoneHandle(Type::DynamicType()));
   AstNode* ll = new LoadLocalNode(TokenPosition::kNoSource, v);
   EXPECT(ll->IsLoadLocalNode());
   EXPECT(!ll->IsLiteralNode());
@@ -24,9 +25,10 @@
   v->set_index(1);
   EXPECT_EQ(1, v->index());
 
-  LocalVariable* p = new LocalVariable(TokenPosition::kNoSource,
-                                       String::ZoneHandle(Symbols::New("p")),
-                                       Type::ZoneHandle(Type::DynamicType()));
+  LocalVariable* p = new LocalVariable(
+      TokenPosition::kNoSource,
+      String::ZoneHandle(Symbols::New(thread, "p")),
+      Type::ZoneHandle(Type::DynamicType()));
   EXPECT(!p->HasIndex());
   p->set_index(-1);
   EXPECT(p->HasIndex());
diff --git a/runtime/vm/ast_transformer.cc b/runtime/vm/ast_transformer.cc
index 4b05867..a81babb 100644
--- a/runtime/vm/ast_transformer.cc
+++ b/runtime/vm/ast_transformer.cc
@@ -10,6 +10,9 @@
 
 namespace dart {
 
+// Quick access to the current thread.
+#define T (thread())
+
 // Quick access to the current zone.
 #define Z (thread()->zone())
 
@@ -66,14 +69,14 @@
 
 LocalVariable* AwaitTransformer::EnsureCurrentTempVar() {
   String& symbol =
-      String::ZoneHandle(Z, Symbols::NewFormatted("%d", temp_cnt_));
-  symbol = Symbols::FromConcat(Symbols::AwaitTempVarPrefix(), symbol);
+      String::ZoneHandle(Z, Symbols::NewFormatted(T, "%d", temp_cnt_));
+  symbol = Symbols::FromConcat(T, Symbols::AwaitTempVarPrefix(), symbol);
   ASSERT(!symbol.IsNull());
   // Look up the variable in the scope used for async temp variables.
   LocalVariable* await_tmp = async_temp_scope_->LocalLookupVariable(symbol);
   if (await_tmp == NULL) {
     // We need a new temp variable; add it to the function's top scope.
-    await_tmp = new (Z) LocalVariable(
+    await_tmp = new(Z) LocalVariable(
         TokenPosition::kNoSource, symbol, Object::dynamic_type());
     async_temp_scope_->AddVariable(await_tmp);
     // After adding it to the top scope, we can look it up from the preamble.
@@ -92,7 +95,7 @@
 }
 
 
-LocalVariable* AwaitTransformer::AddToPreambleNewTempVar(
+LocalVariable* AwaitTransformer::AddNewTempVarToPreamble(
     AstNode* node,
     TokenPosition token_pos) {
   LocalVariable* tmp_var = EnsureCurrentTempVar();
@@ -103,6 +106,12 @@
 }
 
 
+LoadLocalNode* AwaitTransformer::MakeName(AstNode* node) {
+  LocalVariable* temp = AddNewTempVarToPreamble(node, ST(node->token_pos()));
+  return new(Z) LoadLocalNode(ST(node->token_pos()), temp);
+}
+
+
 void AwaitTransformer::VisitLiteralNode(LiteralNode* node) {
   result_ = node;
 }
@@ -140,11 +149,11 @@
       preamble_->scope(), Symbols::AsyncOperationStackTraceParam());
 
   AstNode* transformed_expr = Transform(node->expr());
-  LocalVariable* await_temp = AddToPreambleNewTempVar(transformed_expr,
+  LocalVariable* await_temp = AddNewTempVarToPreamble(transformed_expr,
                                                       ST(node->token_pos()));
 
   AwaitMarkerNode* await_marker =
-      new (Z) AwaitMarkerNode(async_temp_scope_, node->scope(), token_pos);
+      new(Z) AwaitMarkerNode(async_temp_scope_, node->scope(), token_pos);
   preamble_->Add(await_marker);
 
   // :result_param = _awaitHelper(
@@ -154,14 +163,14 @@
       Z, async_lib.LookupFunctionAllowPrivate(Symbols::AsyncAwaitHelper()));
   ASSERT(!async_await_helper.IsNull());
   ArgumentListNode* async_await_helper_args =
-      new (Z) ArgumentListNode(token_pos);
+      new(Z) ArgumentListNode(token_pos);
   async_await_helper_args->Add(
       new(Z) LoadLocalNode(token_pos, await_temp));
   async_await_helper_args->Add(
       new(Z) LoadLocalNode(token_pos, async_then_callback));
   async_await_helper_args->Add(
       new(Z) LoadLocalNode(token_pos, async_catch_error_callback));
-  StaticCallNode* await_helper_call = new (Z) StaticCallNode(
+  StaticCallNode* await_helper_call = new(Z) StaticCallNode(
       node->token_pos(),
       async_await_helper,
       async_await_helper_args);
@@ -177,17 +186,17 @@
   // restoring the saved try context that lives on the stack and possibly the
   // saved try context of the outer try block.
   if (node->saved_try_ctx() != NULL) {
-    preamble_->Add(new (Z) StoreLocalNode(
+    preamble_->Add(new(Z) StoreLocalNode(
         token_pos,
         node->saved_try_ctx(),
-        new (Z) LoadLocalNode(token_pos,
-                              node->async_saved_try_ctx())));
+        new(Z) LoadLocalNode(token_pos,
+                             node->async_saved_try_ctx())));
     if (node->outer_saved_try_ctx() != NULL) {
-      preamble_->Add(new (Z) StoreLocalNode(
+      preamble_->Add(new(Z) StoreLocalNode(
           token_pos,
           node->outer_saved_try_ctx(),
-          new (Z) LoadLocalNode(token_pos,
-                                node->outer_async_saved_try_ctx())));
+          new(Z) LoadLocalNode(token_pos,
+                               node->outer_async_saved_try_ctx())));
     }
   } else {
     ASSERT(node->outer_saved_try_ctx() == NULL);
@@ -195,31 +204,31 @@
 
   // Load the async_op variable. It is unused, but the observatory uses it
   // to determine if a breakpoint is inside an asynchronous function.
-  LoadLocalNode* load_async_op = new (Z) LoadLocalNode(token_pos, async_op);
+  LoadLocalNode* load_async_op = new(Z) LoadLocalNode(token_pos, async_op);
   preamble_->Add(load_async_op);
 
-  LoadLocalNode* load_error_param = new (Z) LoadLocalNode(
+  LoadLocalNode* load_error_param = new(Z) LoadLocalNode(
       token_pos, error_param);
-  LoadLocalNode* load_stack_trace_param = new (Z) LoadLocalNode(
+  LoadLocalNode* load_stack_trace_param = new(Z) LoadLocalNode(
       token_pos, stack_trace_param);
-  SequenceNode* error_ne_null_branch = new (Z) SequenceNode(
+  SequenceNode* error_ne_null_branch = new(Z) SequenceNode(
       token_pos, ChainNewScope(preamble_->scope()));
-  error_ne_null_branch->Add(new (Z) ThrowNode(
+  error_ne_null_branch->Add(new(Z) ThrowNode(
       token_pos,
       load_error_param,
       load_stack_trace_param));
-  preamble_->Add(new (Z) IfNode(
+  preamble_->Add(new(Z) IfNode(
       token_pos,
-      new (Z) ComparisonNode(
+      new(Z) ComparisonNode(
           token_pos,
           Token::kNE,
           load_error_param,
-          new (Z) LiteralNode(token_pos,
+          new(Z) LiteralNode(token_pos,
                               Object::null_instance())),
           error_ne_null_branch,
           NULL));
 
-  LocalVariable* result = AddToPreambleNewTempVar(new(Z) LoadLocalNode(
+  LocalVariable* result = AddNewTempVarToPreamble(new(Z) LoadLocalNode(
       token_pos, result_param), ST(node->token_pos()));
   result_ = new(Z) LoadLocalNode(token_pos, result);
 }
@@ -247,7 +256,7 @@
   AstNode* result = NULL;
   const Token::Kind compare_logical_op = (logical_op == Token::kAND) ?
       Token::kEQ : Token::kNE;
-  SequenceNode* eval = new (Z) SequenceNode(
+  SequenceNode* eval = new(Z) SequenceNode(
       ST(new_left->token_pos()), ChainNewScope(preamble_->scope()));
   SequenceNode* saved_preamble = preamble_;
   preamble_ = eval;
@@ -268,7 +277,7 @@
 
 
 LocalScope* AwaitTransformer::ChainNewScope(LocalScope* parent) {
-  return new (Z) LocalScope(
+  return new(Z) LocalScope(
       parent, parent->function_level(), parent->loop_level());
 }
 
@@ -282,12 +291,10 @@
   } else {
     new_right = Transform(node->right());
   }
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) BinaryOpNode(node->token_pos(),
-                          node->kind(),
-                          new_left,
-                          new_right), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) BinaryOpNode(node->token_pos(),
+      node->kind(),
+      new_left,
+      new_right));
 }
 
 
@@ -296,34 +303,29 @@
   ASSERT((node->kind() != Token::kAND) && (node->kind() != Token::kOR));
   AstNode* new_left = Transform(node->left());
   AstNode* new_right = Transform(node->right());
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) BinaryOpWithMask32Node(node->token_pos(),
-                                    node->kind(),
-                                    new_left,
-                                    new_right,
-                                    node->mask32()), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) BinaryOpWithMask32Node(node->token_pos(),
+      node->kind(),
+      new_left,
+      new_right,
+      node->mask32()));
 }
 
 
 void AwaitTransformer::VisitComparisonNode(ComparisonNode* node) {
   AstNode* new_left = Transform(node->left());
   AstNode* new_right = Transform(node->right());
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) ComparisonNode(node->token_pos(),
-                            node->kind(),
-                            new_left,
-                            new_right), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) ComparisonNode(node->token_pos(),
+      node->kind(),
+      new_left,
+      new_right));
 }
 
 
 void AwaitTransformer::VisitUnaryOpNode(UnaryOpNode* node) {
   AstNode* new_operand = Transform(node->operand());
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) UnaryOpNode(node->token_pos(), node->kind(), new_operand),
-      ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) UnaryOpNode(node->token_pos(),
+      node->kind(),
+      new_operand));
 }
 
 
@@ -331,12 +333,12 @@
 //
 void AwaitTransformer::VisitConditionalExprNode(ConditionalExprNode* node) {
   AstNode* new_condition = Transform(node->condition());
-  SequenceNode* new_true = new (Z) SequenceNode(
+  SequenceNode* new_true = new(Z) SequenceNode(
       ST(node->true_expr()->token_pos()), ChainNewScope(preamble_->scope()));
   SequenceNode* saved_preamble = preamble_;
   preamble_ = new_true;
   AstNode* new_true_result = Transform(node->true_expr());
-  SequenceNode* new_false = new (Z) SequenceNode(
+  SequenceNode* new_false = new(Z) SequenceNode(
       ST(node->false_expr()->token_pos()), ChainNewScope(preamble_->scope()));
   preamble_ = new_false;
   AstNode* new_false_result = Transform(node->false_expr());
@@ -346,12 +348,10 @@
                                  new_true,
                                  new_false);
   preamble_->Add(new_if);
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) ConditionalExprNode(ST(node->token_pos()),
-                                 new_condition,
-                                 new_true_result,
-                                 new_false_result), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) ConditionalExprNode(ST(node->token_pos()),
+      new_condition,
+      new_true_result,
+      new_false_result));
 }
 
 
@@ -376,10 +376,8 @@
 
 void AwaitTransformer::VisitStringInterpolateNode(StringInterpolateNode* node) {
   ArrayNode* new_value = Transform(node->value())->AsArrayNode();
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) StringInterpolateNode(node->token_pos(),
-                                   new_value), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) StringInterpolateNode(node->token_pos(),
+      new_value));
 }
 
 
@@ -388,12 +386,10 @@
   if (new_receiver != NULL) {
     new_receiver = Transform(new_receiver);
   }
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) ClosureNode(node->token_pos(),
-                         node->function(),
-                         new_receiver,
-                         node->scope()), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) ClosureNode(node->token_pos(),
+      node->function(),
+      new_receiver,
+      node->scope()));
 }
 
 
@@ -401,47 +397,39 @@
   AstNode* new_receiver = Transform(node->receiver());
   ArgumentListNode* new_args =
       Transform(node->arguments())->AsArgumentListNode();
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) InstanceCallNode(node->token_pos(),
-                              new_receiver,
-                              node->function_name(),
-                              new_args,
-                              node->is_conditional()), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) InstanceCallNode(node->token_pos(),
+      new_receiver,
+      node->function_name(),
+      new_args,
+      node->is_conditional()));
 }
 
 
 void AwaitTransformer::VisitStaticCallNode(StaticCallNode* node) {
   ArgumentListNode* new_args =
       Transform(node->arguments())->AsArgumentListNode();
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) StaticCallNode(node->token_pos(),
-                            node->function(),
-                            new_args), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) StaticCallNode(node->token_pos(),
+      node->function(),
+      new_args));
 }
 
 
 void AwaitTransformer::VisitConstructorCallNode(ConstructorCallNode* node) {
   ArgumentListNode* new_args =
       Transform(node->arguments())->AsArgumentListNode();
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) ConstructorCallNode(node->token_pos(),
-                                 node->type_arguments(),
-                                 node->constructor(),
-                                 new_args), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) ConstructorCallNode(node->token_pos(),
+      node->type_arguments(),
+      node->constructor(),
+      new_args));
 }
 
 
 void AwaitTransformer::VisitInstanceGetterNode(InstanceGetterNode* node) {
   AstNode* new_receiver = Transform(node->receiver());
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) InstanceGetterNode(node->token_pos(),
-                                new_receiver,
-                                node->field_name(),
-                                node->is_conditional()), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) InstanceGetterNode(node->token_pos(),
+      new_receiver,
+      node->field_name(),
+      node->is_conditional()));
 }
 
 
@@ -451,13 +439,11 @@
     new_receiver = Transform(new_receiver);
   }
   AstNode* new_value = Transform(node->value());
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) InstanceSetterNode(node->token_pos(),
-                                new_receiver,
-                                node->field_name(),
-                                new_value,
-                                node->is_conditional()), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) InstanceSetterNode(node->token_pos(),
+      new_receiver,
+      node->field_name(),
+      new_value,
+      node->is_conditional()));
 }
 
 
@@ -472,9 +458,7 @@
                               node->cls(),
                               node->field_name());
   new_getter->set_owner(node->owner());
-  LocalVariable* result =
-      AddToPreambleNewTempVar(new_getter, ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new_getter);
 }
 
 
@@ -497,46 +481,43 @@
                                 node->function(),
                                 new_value);
 
-  LocalVariable* result =
-      AddToPreambleNewTempVar(new_setter, ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new_setter);
 }
 
 
 void AwaitTransformer::VisitLoadLocalNode(LoadLocalNode* node) {
-  result_ = node;
+  result_ = MakeName(node);
 }
 
 
 void AwaitTransformer::VisitStoreLocalNode(StoreLocalNode* node) {
   AstNode* new_value = Transform(node->value());
-  result_ = new(Z) StoreLocalNode(node->token_pos(), &node->local(), new_value);
+  result_ = MakeName(new(Z) StoreLocalNode(node->token_pos(),
+      &node->local(),
+      new_value));
 }
 
 
 void AwaitTransformer::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) {
-  result_ = node;
+  result_ = MakeName(node);
 }
 
 
 void AwaitTransformer::VisitStoreStaticFieldNode(StoreStaticFieldNode* node) {
   AstNode* new_value = Transform(node->value());
-  result_ = new(Z) StoreStaticFieldNode(
-      node->token_pos(),
+  result_ = MakeName(new(Z) StoreStaticFieldNode(node->token_pos(),
       Field::ZoneHandle(Z, node->field().Original()),
-      new_value);
+      new_value));
 }
 
 
 void AwaitTransformer::VisitLoadIndexedNode(LoadIndexedNode* node) {
   AstNode* new_array = Transform(node->array());
   AstNode* new_index = Transform(node->index_expr());
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) LoadIndexedNode(node->token_pos(),
-                             new_array,
-                             new_index,
-                             node->super_class()), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) LoadIndexedNode(node->token_pos(),
+      new_array,
+      new_index,
+      node->super_class()));
 }
 
 
@@ -544,24 +525,20 @@
   AstNode* new_array = Transform(node->array());
   AstNode* new_index = Transform(node->index_expr());
   AstNode* new_value = Transform(node->value());
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) StoreIndexedNode(node->token_pos(),
-                              new_array,
-                              new_index,
-                              new_value,
-                              node->super_class()), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) StoreIndexedNode(node->token_pos(),
+      new_array,
+      new_index,
+      new_value,
+      node->super_class()));
 }
 
 
 void AwaitTransformer::VisitAssignableNode(AssignableNode* node) {
   AstNode* new_expr = Transform(node->expr());
-  LocalVariable* result = AddToPreambleNewTempVar(
-      new(Z) AssignableNode(node->token_pos(),
-                            new_expr,
-                            node->type(),
-                            node->dst_name()), ST(node->token_pos()));
-  result_ = new(Z) LoadLocalNode(ST(node->token_pos()), result);
+  result_ = MakeName(new(Z) AssignableNode(node->token_pos(),
+      new_expr,
+      node->type(),
+      node->dst_name()));
 }
 
 
@@ -598,9 +575,9 @@
 
 void AwaitTransformer::VisitThrowNode(ThrowNode* node) {
   AstNode* new_exception = Transform(node->exception());
-  result_ = new(Z) ThrowNode(node->token_pos(),
-                             new_exception,
-                             node->stacktrace());
+  result_ = MakeName(new(Z) ThrowNode(node->token_pos(),
+      new_exception,
+      node->stacktrace()));
 }
 
 }  // namespace dart
diff --git a/runtime/vm/ast_transformer.h b/runtime/vm/ast_transformer.h
index 5930f41..e189afd 100644
--- a/runtime/vm/ast_transformer.h
+++ b/runtime/vm/ast_transformer.h
@@ -51,8 +51,9 @@
 
  private:
   LocalVariable* EnsureCurrentTempVar();
-  LocalVariable* AddToPreambleNewTempVar(AstNode* node,
+  LocalVariable* AddNewTempVarToPreamble(AstNode* node,
                                          TokenPosition token_pos);
+  LoadLocalNode* MakeName(AstNode* node);
   ArgumentListNode* TransformArguments(ArgumentListNode* node);
   AstNode* LazyTransform(const Token::Kind kind,
                          AstNode* new_left,
diff --git a/runtime/vm/atomic.h b/runtime/vm/atomic.h
index bd489d0..026762f 100644
--- a/runtime/vm/atomic.h
+++ b/runtime/vm/atomic.h
@@ -26,6 +26,7 @@
   // NOTE: Not to be used for any atomic operations involving memory locations
   // that are accessed by generated code.
   static void IncrementBy(intptr_t* p, intptr_t value);
+  static void IncrementInt64By(int64_t* p, int64_t value);
 
   // Atomically fetch the value at p and decrement the value at p.
   // Returns the original value at p.
@@ -53,6 +54,12 @@
   static uword LoadRelaxed(uword* ptr) {
     return *static_cast<volatile uword*>(ptr);
   }
+
+  // Performs a load of a word from 'ptr', but without any guarantees about
+  // memory order (i.e., no load barriers/fences).
+  static intptr_t LoadRelaxedIntPtr(intptr_t* ptr) {
+    return *static_cast<volatile intptr_t*>(ptr);
+  }
 };
 
 
diff --git a/runtime/vm/atomic_android.h b/runtime/vm/atomic_android.h
index c3727af..b994343 100644
--- a/runtime/vm/atomic_android.h
+++ b/runtime/vm/atomic_android.h
@@ -26,6 +26,11 @@
 }
 
 
+inline void AtomicOperations::IncrementInt64By(int64_t* p, int64_t value) {
+  __sync_fetch_and_add(p, value);
+}
+
+
 inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
   return __sync_fetch_and_sub(p, 1);
 }
diff --git a/runtime/vm/atomic_linux.h b/runtime/vm/atomic_linux.h
index 15f0396..615004a 100644
--- a/runtime/vm/atomic_linux.h
+++ b/runtime/vm/atomic_linux.h
@@ -26,6 +26,11 @@
 }
 
 
+inline void AtomicOperations::IncrementInt64By(int64_t* p, int64_t value) {
+  __sync_fetch_and_add(p, value);
+}
+
+
 inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
   return __sync_fetch_and_sub(p, 1);
 }
diff --git a/runtime/vm/atomic_macos.h b/runtime/vm/atomic_macos.h
index fd5af87..ae5da3a 100644
--- a/runtime/vm/atomic_macos.h
+++ b/runtime/vm/atomic_macos.h
@@ -26,6 +26,11 @@
 }
 
 
+inline void AtomicOperations::IncrementInt64By(int64_t* p, int64_t value) {
+  __sync_fetch_and_add(p, value);
+}
+
+
 inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
   return __sync_fetch_and_sub(p, 1);
 }
diff --git a/runtime/vm/atomic_win.h b/runtime/vm/atomic_win.h
index 1563035..38ec10a 100644
--- a/runtime/vm/atomic_win.h
+++ b/runtime/vm/atomic_win.h
@@ -41,6 +41,16 @@
 }
 
 
+inline void AtomicOperations::IncrementInt64By(int64_t* p, int64_t value) {
+#if defined(HOST_ARCH_IA32) || defined(HOST_ARCH_X64)
+  InterlockedExchangeAdd64(reinterpret_cast<LONGLONG*>(p),
+                           static_cast<LONGLONG>(value));
+#else
+#error Unsupported host architecture.
+#endif
+}
+
+
 inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
 #if defined(HOST_ARCH_X64)
   return static_cast<uintptr_t>(
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 1c59f8d..7750375 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -138,7 +138,7 @@
   bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary);
   bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary);
   TransitionNativeToVM transition(thread);
-  CompilerStats* stats = thread->isolate()->compiler_stats();
+  CompilerStats* stats = thread->isolate()->aggregate_compiler_stats();
   ASSERT(stats != NULL);
   stats->EnableBenchmark();
   Timer timer(true, "Compiler stats compiling all of Core lib");
@@ -174,7 +174,7 @@
         reinterpret_cast<Dart_NativeEntryResolver>(NativeResolver));
     EXPECT_VALID(lib);
   }
-  CompilerStats* stats = thread->isolate()->compiler_stats();
+  CompilerStats* stats = thread->isolate()->aggregate_compiler_stats();
   ASSERT(stats != NULL);
   stats->EnableBenchmark();
   Timer timer(true, "Compile all of dart2js benchmark");
diff --git a/runtime/vm/block_scheduler.cc b/runtime/vm/block_scheduler.cc
index 5b3d78d..9c00cfb 100644
--- a/runtime/vm/block_scheduler.cc
+++ b/runtime/vm/block_scheduler.cc
@@ -12,7 +12,7 @@
 namespace dart {
 
 static intptr_t GetEdgeCount(const Array& edge_counters, intptr_t edge_id) {
-  if (!FLAG_emit_edge_counters) {
+  if (!FLAG_reorder_basic_blocks) {
     // Assume everything was visited once.
     return 1;
   }
@@ -53,7 +53,7 @@
 
 
 void BlockScheduler::AssignEdgeWeights() const {
-  if (!FLAG_emit_edge_counters) {
+  if (!FLAG_reorder_basic_blocks) {
     return;
   }
 
@@ -61,7 +61,8 @@
       flow_graph()->parsed_function().function().ic_data_array());
   if (Compiler::IsBackgroundCompilation() && ic_data_array.IsNull()) {
     // Deferred loading cleared ic_data_array.
-    Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
+    Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+        "BlockScheduler: ICData array cleared");
   }
   ASSERT(!ic_data_array.IsNull());
   Array& edge_counters = Array::Handle();
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index 8cb5d77..9bde826 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -82,7 +82,7 @@
   INIT_LIBRARY(ObjectStore::kTypedData,
                typed_data,
                Bootstrap::typed_data_source_paths_,
-               Bootstrap::typed_data_patch_paths_),
+               NULL),
   INIT_LIBRARY(ObjectStore::kVMService,
                _vmservice,
                Bootstrap::_vmservice_source_paths_,
@@ -132,9 +132,9 @@
   const uint8_t* utf8_array = NULL;
   intptr_t file_length = -1;
 
-  Dart_FileOpenCallback file_open = Isolate::file_open_callback();
-  Dart_FileReadCallback file_read = Isolate::file_read_callback();
-  Dart_FileCloseCallback file_close = Isolate::file_close_callback();
+  Dart_FileOpenCallback file_open = Dart::file_open_callback();
+  Dart_FileReadCallback file_read = Dart::file_read_callback();
+  Dart_FileCloseCallback file_close = Dart::file_close_callback();
   if ((file_open != NULL) && (file_read != NULL) && (file_close != NULL)) {
     // Try to open and read the file.
     void* stream = (*file_open)(source_path, false);
@@ -300,7 +300,7 @@
       continue;
     }
 #endif  // !PRODUCT
-    uri = Symbols::New(bootstrap_libraries[i].uri_);
+    uri = Symbols::New(thread, bootstrap_libraries[i].uri_);
     lib = Library::LookupLibrary(uri);
     if (lib.IsNull()) {
       lib = Library::NewLibraryHelper(uri, false);
@@ -320,7 +320,7 @@
       continue;
     }
 #endif  // PRODUCT
-    uri = Symbols::New(bootstrap_libraries[i].uri_);
+    uri = Symbols::New(thread, bootstrap_libraries[i].uri_);
     lib = Library::LookupLibrary(uri);
     ASSERT(!lib.IsNull());
     source = GetLibrarySource(lib, uri, false);
@@ -338,7 +338,7 @@
     }
     // If a patch exists, load and patch the script.
     if (bootstrap_libraries[i].patch_paths_ != NULL) {
-      patch_uri = Symbols::New(bootstrap_libraries[i].patch_uri_);
+      patch_uri = Symbols::New(thread, bootstrap_libraries[i].patch_uri_);
       error = LoadPatchFiles(zone,
                              lib,
                              patch_uri,
@@ -355,9 +355,12 @@
     // Eagerly compile the _Closure class as it is the class of all closure
     // instances. This allows us to just finalize function types
     // without going through the hoops of trying to compile their scope class.
-    const Class& cls =
+    Class& cls =
         Class::Handle(zone, isolate->object_store()->closure_class());
     Compiler::CompileClass(cls);
+    // Eagerly compile Bool class, bool constants are used from within compiler.
+    cls = isolate->object_store()->bool_class();
+    Compiler::CompileClass(cls);
   }
 
   // Restore the library tag handler for the isolate.
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 02b1e3c..777f1f9 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -95,16 +95,17 @@
   V(Double_truncate, 1)                                                        \
   V(Double_toInt, 1)                                                           \
   V(Double_parse, 3)                                                           \
+  V(Double_toString, 1)                                                        \
   V(Double_toStringAsFixed, 2)                                                 \
   V(Double_toStringAsExponential, 2)                                           \
   V(Double_toStringAsPrecision, 2)                                             \
   V(Double_flipSignBit, 1)                                                     \
-  V(JSSyntaxRegExp_factory, 4)                                                 \
-  V(JSSyntaxRegExp_getPattern, 1)                                              \
-  V(JSSyntaxRegExp_getIsMultiLine, 1)                                          \
-  V(JSSyntaxRegExp_getIsCaseSensitive, 1)                                      \
-  V(JSSyntaxRegExp_getGroupCount, 1)                                           \
-  V(JSSyntaxRegExp_ExecuteMatch, 3)                                            \
+  V(RegExp_factory, 4)                                                         \
+  V(RegExp_getPattern, 1)                                                      \
+  V(RegExp_getIsMultiLine, 1)                                                  \
+  V(RegExp_getIsCaseSensitive, 1)                                              \
+  V(RegExp_getGroupCount, 1)                                                   \
+  V(RegExp_ExecuteMatch, 3)                                                    \
   V(List_allocate, 2)                                                          \
   V(List_getIndexed, 2)                                                        \
   V(List_setIndexed, 3)                                                        \
@@ -164,34 +165,34 @@
   V(Timeline_reportCompleteEvent, 5)                                           \
   V(Timeline_reportInstantEvent, 4)                                            \
   V(Timeline_reportTaskEvent, 6)                                               \
-  V(TypedData_Int8Array_new, 1)                                                \
-  V(TypedData_Uint8Array_new, 1)                                               \
-  V(TypedData_Uint8ClampedArray_new, 1)                                        \
-  V(TypedData_Int16Array_new, 1)                                               \
-  V(TypedData_Uint16Array_new, 1)                                              \
-  V(TypedData_Int32Array_new, 1)                                               \
-  V(TypedData_Uint32Array_new, 1)                                              \
-  V(TypedData_Int64Array_new, 1)                                               \
-  V(TypedData_Uint64Array_new, 1)                                              \
-  V(TypedData_Float32Array_new, 1)                                             \
-  V(TypedData_Float64Array_new, 1)                                             \
-  V(TypedData_Float32x4Array_new, 1)                                           \
-  V(TypedData_Int32x4Array_new, 1)                                             \
-  V(TypedData_Float64x2Array_new, 1)                                           \
-  V(ExternalTypedData_Int8Array_new, 1)                                        \
-  V(ExternalTypedData_Uint8Array_new, 1)                                       \
-  V(ExternalTypedData_Uint8ClampedArray_new, 1)                                \
-  V(ExternalTypedData_Int16Array_new, 1)                                       \
-  V(ExternalTypedData_Uint16Array_new, 1)                                      \
-  V(ExternalTypedData_Int32Array_new, 1)                                       \
-  V(ExternalTypedData_Uint32Array_new, 1)                                      \
-  V(ExternalTypedData_Int64Array_new, 1)                                       \
-  V(ExternalTypedData_Uint64Array_new, 1)                                      \
-  V(ExternalTypedData_Float32Array_new, 1)                                     \
-  V(ExternalTypedData_Float64Array_new, 1)                                     \
-  V(ExternalTypedData_Float32x4Array_new, 1)                                   \
-  V(ExternalTypedData_Int32x4Array_new, 1)                                     \
-  V(ExternalTypedData_Float64x2Array_new, 1)                                   \
+  V(TypedData_Int8Array_new, 2)                                                \
+  V(TypedData_Uint8Array_new, 2)                                               \
+  V(TypedData_Uint8ClampedArray_new, 2)                                        \
+  V(TypedData_Int16Array_new, 2)                                               \
+  V(TypedData_Uint16Array_new, 2)                                              \
+  V(TypedData_Int32Array_new, 2)                                               \
+  V(TypedData_Uint32Array_new, 2)                                              \
+  V(TypedData_Int64Array_new, 2)                                               \
+  V(TypedData_Uint64Array_new, 2)                                              \
+  V(TypedData_Float32Array_new, 2)                                             \
+  V(TypedData_Float64Array_new, 2)                                             \
+  V(TypedData_Float32x4Array_new, 2)                                           \
+  V(TypedData_Int32x4Array_new, 2)                                             \
+  V(TypedData_Float64x2Array_new, 2)                                           \
+  V(ExternalTypedData_Int8Array_new, 2)                                        \
+  V(ExternalTypedData_Uint8Array_new, 2)                                       \
+  V(ExternalTypedData_Uint8ClampedArray_new, 2)                                \
+  V(ExternalTypedData_Int16Array_new, 2)                                       \
+  V(ExternalTypedData_Uint16Array_new, 2)                                      \
+  V(ExternalTypedData_Int32Array_new, 2)                                       \
+  V(ExternalTypedData_Uint32Array_new, 2)                                      \
+  V(ExternalTypedData_Int64Array_new, 2)                                       \
+  V(ExternalTypedData_Uint64Array_new, 2)                                      \
+  V(ExternalTypedData_Float32Array_new, 2)                                     \
+  V(ExternalTypedData_Float64Array_new, 2)                                     \
+  V(ExternalTypedData_Float32x4Array_new, 2)                                   \
+  V(ExternalTypedData_Int32x4Array_new, 2)                                     \
+  V(ExternalTypedData_Float64x2Array_new, 2)                                   \
   V(TypedData_length, 1)                                                       \
   V(TypedData_setRange, 7)                                                     \
   V(TypedData_GetInt8, 2)                                                      \
@@ -352,7 +353,6 @@
   V(UserTag_makeCurrent, 1)                                                    \
   V(Profiler_getCurrentTag, 0)                                                 \
   V(ClassID_getID, 1)                                                          \
-  V(Num_toString, 1)                                                           \
   V(VMService_SendIsolateServiceMessage, 2)                                    \
   V(VMService_SendRootServiceMessage, 1)                                       \
   V(VMService_OnStart, 0)                                                      \
diff --git a/runtime/vm/cha.cc b/runtime/vm/cha.cc
index ed5255e..57214bb 100644
--- a/runtime/vm/cha.cc
+++ b/runtime/vm/cha.cc
@@ -48,6 +48,31 @@
 }
 
 
+bool CHA::ConcreteSubclasses(const Class& cls,
+                             GrowableArray<intptr_t> *class_ids) {
+  if (cls.InVMHeap()) return false;
+  if (cls.IsObjectClass()) return false;
+
+  if (!cls.is_abstract()) {
+    class_ids->Add(cls.id());
+  }
+
+  const GrowableObjectArray& direct_subclasses =
+      GrowableObjectArray::Handle(cls.direct_subclasses());
+  if (direct_subclasses.IsNull()) {
+    return true;
+  }
+  Class& subclass = Class::Handle();
+  for (intptr_t i = 0; i < direct_subclasses.Length(); i++) {
+    subclass ^= direct_subclasses.At(i);
+    if (!ConcreteSubclasses(subclass, class_ids)) {
+      return false;
+    }
+  }
+  return true;
+}
+
+
 bool CHA::IsImplemented(const Class& cls) {
   // Function type aliases have different type checking rules.
   ASSERT(!cls.IsTypedefClass());
diff --git a/runtime/vm/cha.h b/runtime/vm/cha.h
index fac6577..a1ea229 100644
--- a/runtime/vm/cha.h
+++ b/runtime/vm/cha.h
@@ -35,6 +35,11 @@
   static bool HasSubclasses(const Class& cls);
   bool HasSubclasses(intptr_t cid) const;
 
+  // Collect the concrete subclasses of 'cls' into 'class_ids'. Return true if
+  // the result is valid (may be invalid because we don't track the subclasses
+  // of classes allocated in the VM isolate or class Object).
+  bool ConcreteSubclasses(const Class& cls, GrowableArray<intptr_t> *class_ids);
+
   // Return true if the class is implemented by some other class.
   static bool IsImplemented(const Class& cls);
 
diff --git a/runtime/vm/cha_test.cc b/runtime/vm/cha_test.cc
index 7712324..0d0a1a4 100644
--- a/runtime/vm/cha_test.cc
+++ b/runtime/vm/cha_test.cc
@@ -42,19 +42,19 @@
   EXPECT(!lib.IsNull());
 
   const Class& class_a = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("A"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   EXPECT(!class_a.IsNull());
 
   const Class& class_b = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("B"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "B"))));
   EXPECT(!class_b.IsNull());
 
   const Class& class_c = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("C"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "C"))));
   EXPECT(!class_c.IsNull());
 
   const Class& class_d = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("D"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "D"))));
   EXPECT(!class_d.IsNull());
 
   const String& function_foo_name = String::Handle(String::New("foo"));
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index d1e9f5b..1db0305 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -456,10 +456,9 @@
 }
 
 
-RawAbstractType* ClassFinalizer::ResolveTypeClass(const Class& cls,
-                                                  const Type& type) {
+void ClassFinalizer::ResolveTypeClass(const Class& cls, const Type& type) {
   if (type.IsFinalized()) {
-    return type.raw();
+    return;
   }
   if (FLAG_trace_type_finalization) {
     THR_Print("Resolve type class of '%s'\n",
@@ -489,66 +488,61 @@
           "cannot resolve class '%s' from '%s'",
           String::Handle(unresolved_class.Name()).ToCString(),
           String::Handle(cls.Name()).ToCString());
-      return type.raw();
+      return;
     }
+    // Replace unresolved class with resolved type class.
+    type.set_type_class(type_class);
   }
-  // Promote the Type to a FunctionType in case its type class is a typedef.
-  if (type_class.IsTypedefClass()) {
-    return FunctionType::New(type_class,
-                             TypeArguments::Handle(type.arguments()),
-                             Function::Handle(type_class.signature_function()),
-                             type.token_pos());
+  // Promote the type to a function type in case its type class is a typedef.
+  // Note that the type may already be a function type if it was parsed as a
+  // formal parameter function type.
+  if (!type.IsFunctionType() &&
+      type_class.IsTypedefClass() &&
+      !type.IsMalformedOrMalbounded()) {
+    type.set_signature(Function::Handle(type_class.signature_function()));
   }
-  // Replace unresolved class with resolved type class.
-  type.set_type_class(type_class);
-  return type.raw();
+  ASSERT(!type_class.IsTypedefClass() ||
+         (type.signature() != Function::null()));
 }
 
 
-RawAbstractType* ClassFinalizer::ResolveType(const Class& cls,
-                                             const AbstractType& type) {
+void ClassFinalizer::ResolveType(const Class& cls, const AbstractType& type) {
   if (type.IsResolved()) {
-    return type.raw();
+    return;
   }
   if (FLAG_trace_type_finalization) {
     THR_Print("Resolve type '%s'\n", String::Handle(type.Name()).ToCString());
   }
-  AbstractType& resolved_type = AbstractType::Handle();
   if (type.IsType()) {
-    resolved_type = ResolveTypeClass(cls, Type::Cast(type));
-    if (resolved_type.IsMalformed()) {
-      ASSERT(resolved_type.IsResolved());
-      return resolved_type.raw();
+    ResolveTypeClass(cls, Type::Cast(type));
+    if (type.IsMalformed()) {
+      ASSERT(type.IsResolved());
+      return;
     }
-  } else {
-    ASSERT(type.IsFunctionType());
-    const Function& signature =
-        Function::Handle(FunctionType::Cast(type).signature());
-    const Class& scope_class =
-        Class::Handle(FunctionType::Cast(type).scope_class());
-    if (scope_class.IsTypedefClass()) {
-      ResolveSignature(scope_class, signature);
-    } else {
-      ResolveSignature(cls, signature);
-    }
-    resolved_type = type.raw();
   }
-  // Mark type as resolved before resolving its type arguments in order to avoid
-  // repeating resolution of recursive types.
-  resolved_type.SetIsResolved();
+  // Mark type as resolved before resolving its type arguments and, in case of a
+  // function type, its signature, in order to avoid cycles.
+  type.SetIsResolved();
   // Resolve type arguments, if any.
-  const TypeArguments& arguments =
-      TypeArguments::Handle(resolved_type.arguments());
+  const TypeArguments& arguments = TypeArguments::Handle(type.arguments());
   if (!arguments.IsNull()) {
     const intptr_t num_arguments = arguments.Length();
     AbstractType& type_argument = AbstractType::Handle();
     for (intptr_t i = 0; i < num_arguments; i++) {
       type_argument = arguments.TypeAt(i);
-      type_argument = ResolveType(cls, type_argument);
-      arguments.SetTypeAt(i, type_argument);
+      ResolveType(cls, type_argument);
     }
   }
-  return resolved_type.raw();
+  // Resolve signature if function type.
+  if (type.IsFunctionType()) {
+    const Function& signature = Function::Handle(Type::Cast(type).signature());
+    const Class& scope_class = Class::Handle(type.type_class());
+    if (scope_class.IsTypedefClass()) {
+      ResolveSignature(scope_class, signature);
+    } else {
+      ResolveSignature(cls, signature);
+    }
+  }
 }
 
 
@@ -654,13 +648,13 @@
     const Class& cls,
     const AbstractType& type,
     PendingTypes* pending_types) {
-  Zone* Z = Thread::Current()->zone();
+  Zone* zone = Thread::Current()->zone();
   // The type class does not need to be finalized in order to finalize the type,
   // however, it must at least be resolved (this was done as part of resolving
   // the type itself, a precondition to calling FinalizeType).
   // Also, the interfaces of the type class must be resolved and the type
   // parameters of the type class must be finalized.
-  Class& type_class = Class::Handle(Z, type.type_class());
+  Class& type_class = Class::Handle(zone, type.type_class());
   if (!type_class.is_type_finalized()) {
     FinalizeTypeParameters(type_class, pending_types);
     ResolveUpperBounds(type_class);
@@ -673,18 +667,18 @@
 
   // If we are not reifying types, drop type arguments.
   if (!FLAG_reify) {
-    type.set_arguments(TypeArguments::Handle(Z, TypeArguments::null()));
+    type.set_arguments(TypeArguments::Handle(zone, TypeArguments::null()));
   }
 
   // Initialize the type argument vector.
   // Check the number of parsed type arguments, if any.
   // Specifying no type arguments indicates a raw type, which is not an error.
   // However, type parameter bounds are checked below, even for a raw type.
-  TypeArguments& arguments = TypeArguments::Handle(Z, type.arguments());
+  TypeArguments& arguments = TypeArguments::Handle(zone, type.arguments());
   if (!arguments.IsNull() && (arguments.Length() != num_type_parameters)) {
     // Wrong number of type arguments. The type is mapped to the raw type.
     if (Isolate::Current()->error_on_bad_type()) {
-      const String& type_class_name = String::Handle(Z, type_class.Name());
+      const String& type_class_name = String::Handle(zone, type_class.Name());
       ReportError(cls, type.token_pos(),
                   "wrong number of type arguments for class '%s'",
                   type_class_name.ToCString());
@@ -704,7 +698,7 @@
   // The full type argument vector consists of the type arguments of the
   // super types of type_class, which are initialized from the parsed
   // type arguments, followed by the parsed type arguments.
-  TypeArguments& full_arguments = TypeArguments::Handle(Z);
+  TypeArguments& full_arguments = TypeArguments::Handle(zone);
   if (FLAG_reify && (num_type_arguments > 0)) {
     // If no type arguments were parsed and if the super types do not prepend
     // type arguments to the vector, we can leave the vector as null.
@@ -714,7 +708,7 @@
       // argument vector.
       const intptr_t offset = num_type_arguments - num_type_parameters;
       AbstractType& type_arg =
-          AbstractType::Handle(Z, Type::DynamicType());
+          AbstractType::Handle(zone, Type::DynamicType());
       // Leave the temporary type arguments at indices [0..offset[ as null.
       for (intptr_t i = 0; i < num_type_parameters; i++) {
         // If no type parameters were provided, a raw type is desired, so we
@@ -746,8 +740,8 @@
         }
       }
       if (offset > 0) {
-        TrailPtr instantiation_trail = new Trail(Z, 4);
-        Error& bound_error = Error::Handle(Z);
+        TrailPtr instantiation_trail = new Trail(zone, 4);
+        Error& bound_error = Error::Handle(zone);
         FinalizeTypeArguments(type_class, full_arguments, offset,
                               &bound_error, pending_types, instantiation_trail);
       }
@@ -768,8 +762,8 @@
            !full_arguments.IsRaw(0, num_type_arguments));
     if (FLAG_trace_type_finalization) {
       THR_Print("Marking type '%s' as finalized for class '%s'\n",
-                String::Handle(Z, type.Name()).ToCString(),
-                String::Handle(Z, cls.Name()).ToCString());
+                String::Handle(zone, type.Name()).ToCString(),
+                String::Handle(zone, cls.Name()).ToCString());
     }
     // Mark the type as finalized.
     type.SetIsFinalized();
@@ -846,7 +840,7 @@
         super_type_arg = super_type_args.TypeAt(i);
         if (!super_type_arg.IsTypeRef()) {
           if (super_type_arg.IsBeingFinalized()) {
-            ASSERT(super_type_arg.IsType() || super_type_arg.IsFunctionType());
+            ASSERT(super_type_arg.IsType());
             CheckRecursiveType(cls, super_type_arg, pending_types);
             if (FLAG_trace_type_finalization) {
               THR_Print("Creating TypeRef '%s': '%s'\n",
@@ -1005,8 +999,7 @@
               TypeParameter::Cast(type_arg).parameterized_class());
           AbstractType& bound = AbstractType::Handle(
               TypeParameter::Cast(type_arg).bound());
-          bound = ResolveType(type_arg_cls, bound);
-          TypeParameter::Cast(type_arg).set_bound(bound);
+          ResolveType(type_arg_cls, bound);
         }
         // This may be called only if type needs to be finalized, therefore
         // seems OK to allocate finalized types in old space.
@@ -1033,21 +1026,21 @@
 
 void ClassFinalizer::CheckTypeBounds(const Class& cls,
                                      const AbstractType& type) {
-  Zone* Z = Thread::Current()->zone();
-  ASSERT(type.IsType() || type.IsFunctionType());
+  Zone* zone = Thread::Current()->zone();
+  ASSERT(type.IsType());
   ASSERT(type.IsFinalized());
   ASSERT(!type.IsCanonical());
-  TypeArguments& arguments = TypeArguments::Handle(Z, type.arguments());
+  TypeArguments& arguments = TypeArguments::Handle(zone, type.arguments());
   if (arguments.IsNull()) {
     return;
   }
   if (FLAG_trace_type_finalization) {
     THR_Print("Checking bounds of type '%s' for class '%s'\n",
-              String::Handle(Z, type.Name()).ToCString(),
-              String::Handle(Z, cls.Name()).ToCString());
+              String::Handle(zone, type.Name()).ToCString(),
+              String::Handle(zone, cls.Name()).ToCString());
   }
-  const Class& type_class = Class::Handle(Z, type.type_class());
-  Error& bound_error = Error::Handle(Z);
+  const Class& type_class = Class::Handle(zone, type.type_class());
+  Error& bound_error = Error::Handle(zone);
   CheckTypeArgumentBounds(type_class, arguments, &bound_error);
   // CheckTypeArgumentBounds may have indirectly canonicalized this type.
   if (!type.IsCanonical()) {
@@ -1056,22 +1049,22 @@
     // The bound error will be ignored in production mode.
     if (!bound_error.IsNull()) {
       // No compile-time error during finalization.
-      const String& type_name = String::Handle(Z, type.UserVisibleName());
+      const String& type_name = String::Handle(zone, type.UserVisibleName());
       FinalizeMalboundedType(bound_error,
-                             Script::Handle(Z, cls.script()),
+                             Script::Handle(zone, cls.script()),
                              type,
                              "type '%s' has an out of bound type argument",
                              type_name.ToCString());
       if (FLAG_trace_type_finalization) {
         THR_Print("Marking type '%s' as malbounded: %s\n",
-                  String::Handle(Z, type.Name()).ToCString(),
-                  bound_error.ToCString());
+                  String::Handle(zone, type.Name()).ToCString(),
+                  bound_error.ToErrorCString());
       }
     }
   }
   if (FLAG_trace_type_finalization) {
     THR_Print("Done checking bounds of type '%s': %s\n",
-              String::Handle(Z, type.Name()).ToCString(),
+              String::Handle(zone, type.Name()).ToCString(),
               type.ToCString());
   }
 }
@@ -1091,7 +1084,7 @@
     if ((finalization >= kCanonicalize) &&
         !type.IsMalformed() &&
         !type.IsCanonical() &&
-        (type.IsType() || type.IsFunctionType())) {
+        type.IsType()) {
       CheckTypeBounds(cls, type);
       return type.Canonicalize();
     }
@@ -1109,25 +1102,24 @@
   // encountered here.
   ASSERT(!type.IsBeingFinalized());
 
-  Zone* Z = Thread::Current()->zone();
-  const AbstractType& resolved_type =
-      AbstractType::Handle(Z, ResolveType(cls, type));
+  Zone* zone = Thread::Current()->zone();
+  ResolveType(cls, type);
   // A malformed type gets mapped to a finalized type.
-  if (resolved_type.IsMalformed()) {
-    ASSERT(resolved_type.IsFinalized());
-    return resolved_type.raw();
+  if (type.IsMalformed()) {
+    ASSERT(type.IsFinalized());
+    return type.raw();
   }
 
   if (FLAG_trace_type_finalization) {
     THR_Print("Finalizing type '%s' for class '%s'\n",
-              String::Handle(Z, resolved_type.Name()).ToCString(),
-              String::Handle(Z, cls.Name()).ToCString());
+              String::Handle(zone, type.Name()).ToCString(),
+              String::Handle(zone, cls.Name()).ToCString());
   }
 
-  if (resolved_type.IsTypeParameter()) {
-    const TypeParameter& type_parameter = TypeParameter::Cast(resolved_type);
+  if (type.IsTypeParameter()) {
+    const TypeParameter& type_parameter = TypeParameter::Cast(type);
     const Class& parameterized_class =
-        Class::Handle(Z, type_parameter.parameterized_class());
+        Class::Handle(zone, type_parameter.parameterized_class());
     ASSERT(!parameterized_class.IsNull());
     // The index must reflect the position of this type parameter in the type
     // arguments vector of its parameterized class. The offset to add is the
@@ -1147,7 +1139,7 @@
 
     if (FLAG_trace_type_finalization) {
       THR_Print("Done finalizing type parameter '%s' with index %" Pd "\n",
-                String::Handle(Z, type_parameter.name()).ToCString(),
+                String::Handle(zone, type_parameter.name()).ToCString(),
                 type_parameter.index());
     }
 
@@ -1155,18 +1147,18 @@
     return type_parameter.raw();
   }
 
-  // At this point, we can only have a Type or a FunctionType.
-  ASSERT(resolved_type.IsType() || resolved_type.IsFunctionType());
+  // At this point, we can only have a Type.
+  ASSERT(type.IsType());
 
   // This type is the root type of the type graph if no pending types queue is
   // allocated yet.
   const bool is_root_type = (pending_types == NULL);
   if (is_root_type) {
-    pending_types = new PendingTypes(Z, 4);
+    pending_types = new PendingTypes(zone, 4);
   }
 
   const intptr_t num_expanded_type_arguments =
-      ExpandAndFinalizeTypeArguments(cls, resolved_type, pending_types);
+      ExpandAndFinalizeTypeArguments(cls, type, pending_types);
 
   // If we are done finalizing a graph of mutually recursive types, check their
   // bounds.
@@ -1179,18 +1171,18 @@
     }
   }
 
-  // If the type is a FunctionType, we also need to finalize the types in its
+  // If the type is a function type, we also need to finalize the types in its
   // signature, i.e. finalize the result type and parameter types of the
   // signature function of this function type.
   // We do this after marking this type as finalized in order to allow a
   // function type to refer to itself via its parameter types and result type.
   // Note that we do not instantiate these types according to the type
   // arguments. This will happen on demand when executing a type test.
-  if (resolved_type.IsFunctionType()) {
+  if (type.IsFunctionType()) {
     const Function& signature =
-        Function::Handle(Z, FunctionType::Cast(resolved_type).signature());
+        Function::Handle(zone, Type::Cast(type).signature());
     const Class& scope_class =
-        Class::Handle(Z, FunctionType::Cast(resolved_type).scope_class());
+        Class::Handle(zone, Type::Cast(type).type_class());
     if (scope_class.IsTypedefClass()) {
       FinalizeSignature(scope_class, signature);
     } else {
@@ -1200,24 +1192,24 @@
 
   if (FLAG_trace_type_finalization) {
     THR_Print("Done finalizing type '%s' with %" Pd " type args: %s\n",
-              String::Handle(Z, resolved_type.Name()).ToCString(),
+              String::Handle(zone, type.Name()).ToCString(),
               num_expanded_type_arguments,
-              resolved_type.ToCString());
+              type.ToCString());
   }
 
   if (finalization >= kCanonicalize) {
     if (FLAG_trace_type_finalization) {
       THR_Print("Canonicalizing type '%s'\n",
-                String::Handle(Z, resolved_type.Name()).ToCString());
+                String::Handle(zone, type.Name()).ToCString());
       AbstractType& canonical_type =
-          AbstractType::Handle(Z, resolved_type.Canonicalize());
+          AbstractType::Handle(zone, type.Canonicalize());
       THR_Print("Done canonicalizing type '%s'\n",
-                String::Handle(Z, canonical_type.Name()).ToCString());
+                String::Handle(zone, canonical_type.Name()).ToCString());
       return canonical_type.raw();
     }
-    return resolved_type.Canonicalize();
+    return type.Canonicalize();
   } else {
-    return resolved_type.raw();
+    return type.raw();
   }
 }
 
@@ -1228,18 +1220,12 @@
   AbstractType& type = AbstractType::Handle(function.result_type());
   // It is not a compile time error if this name does not resolve to a class or
   // interface.
-  AbstractType& resolved_type = AbstractType::Handle(ResolveType(cls, type));
-  if (resolved_type.raw() != type.raw()) {
-    function.set_result_type(resolved_type);
-  }
+  ResolveType(cls, type);
   // Resolve formal parameter types.
   const intptr_t num_parameters = function.NumParameters();
   for (intptr_t i = 0; i < num_parameters; i++) {
     type = function.ParameterTypeAt(i);
-    resolved_type = ResolveType(cls, type);
-    if (resolved_type.raw() != type.raw()) {
-      function.SetParameterTypeAt(i, resolved_type);
-    }
+    ResolveType(cls, type);
   }
 }
 
@@ -1330,8 +1316,7 @@
   for (intptr_t i = 0; i < num_type_params; i++) {
     type_param ^= type_params.TypeAt(i);
     bound = type_param.bound();
-    bound = ResolveType(cls, bound);
-    type_param.set_bound(bound);
+    ResolveType(cls, bound);
   }
 }
 
@@ -1382,14 +1367,14 @@
   //   instance method.
 
   // Resolve type of fields and check for conflicts in super classes.
-  Zone* Z = Thread::Current()->zone();
-  Array& array = Array::Handle(Z, cls.fields());
-  Field& field = Field::Handle(Z);
-  AbstractType& type = AbstractType::Handle(Z);
-  String& name = String::Handle(Z);
-  String& getter_name = String::Handle(Z);
-  String& setter_name = String::Handle(Z);
-  Class& super_class = Class::Handle(Z);
+  Zone* zone = Thread::Current()->zone();
+  Array& array = Array::Handle(zone, cls.fields());
+  Field& field = Field::Handle(zone);
+  AbstractType& type = AbstractType::Handle(zone);
+  String& name = String::Handle(zone);
+  String& getter_name = String::Handle(zone);
+  String& setter_name = String::Handle(zone);
+  Class& super_class = Class::Handle(zone);
   const intptr_t num_fields = array.Length();
   for (intptr_t i = 0; i < num_fields; i++) {
     field ^= array.At(i);
@@ -1401,15 +1386,15 @@
       getter_name = Field::GetterSymbol(name);
       super_class = FindSuperOwnerOfInstanceMember(cls, name, getter_name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(Z, cls.Name());
-        const String& super_class_name = String::Handle(Z, super_class.Name());
+        const String& class_name = String::Handle(zone, cls.Name());
+        const String& super_cls_name = String::Handle(zone, super_class.Name());
         ReportError(cls, field.token_pos(),
                     "static field '%s' of class '%s' conflicts with "
                     "instance member '%s' of super class '%s'",
                     name.ToCString(),
                     class_name.ToCString(),
                     name.ToCString(),
-                    super_class_name.ToCString());
+                    super_cls_name.ToCString());
       }
       // An implicit setter is not generated for a static field, therefore, we
       // cannot rely on the code below handling the static setter case to report
@@ -1417,15 +1402,15 @@
       setter_name = Field::SetterSymbol(name);
       super_class = FindSuperOwnerOfFunction(cls, setter_name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(Z, cls.Name());
-        const String& super_class_name = String::Handle(Z, super_class.Name());
+        const String& class_name = String::Handle(zone, cls.Name());
+        const String& super_cls_name = String::Handle(zone, super_class.Name());
         ReportError(cls, field.token_pos(),
                     "static field '%s' of class '%s' conflicts with "
                     "instance setter '%s=' of super class '%s'",
                     name.ToCString(),
                     class_name.ToCString(),
                     name.ToCString(),
-                    super_class_name.ToCString());
+                    super_cls_name.ToCString());
       }
 
     } else {
@@ -1433,15 +1418,15 @@
       // (but not getter).
       super_class = FindSuperOwnerOfFunction(cls, name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(Z, cls.Name());
-        const String& super_class_name = String::Handle(Z, super_class.Name());
+        const String& class_name = String::Handle(zone, cls.Name());
+        const String& super_cls_name = String::Handle(zone, super_class.Name());
         ReportError(cls, field.token_pos(),
                     "field '%s' of class '%s' conflicts with method '%s' "
                     "of super class '%s'",
                     name.ToCString(),
                     class_name.ToCString(),
                     name.ToCString(),
-                    super_class_name.ToCString());
+                    super_cls_name.ToCString());
       }
     }
     if (field.is_static() &&
@@ -1449,14 +1434,14 @@
         (field.StaticValue() != Object::sentinel().raw())) {
       // The parser does not preset the value if the type is a type parameter or
       // is parameterized unless the value is null.
-      Error& error = Error::Handle(Z);
+      Error& error = Error::Handle(zone);
       if (type.IsMalformedOrMalbounded()) {
         error = type.error();
       } else {
         ASSERT(type.IsInstantiated());
       }
       const Instance& const_value =
-          Instance::Handle(Z, field.StaticValue());
+          Instance::Handle(zone, field.StaticValue());
       if (!error.IsNull() ||
           (!type.IsDynamicType() &&
            !const_value.IsInstanceOf(type,
@@ -1464,10 +1449,11 @@
                                      &error))) {
         if (Isolate::Current()->error_on_bad_type()) {
           const AbstractType& const_value_type = AbstractType::Handle(
-              Z, const_value.GetType());
+              zone, const_value.GetType());
           const String& const_value_type_name = String::Handle(
-              Z, const_value_type.UserVisibleName());
-          const String& type_name = String::Handle(Z, type.UserVisibleName());
+              zone, const_value_type.UserVisibleName());
+          const String& type_name = String::Handle(
+              zone, type.UserVisibleName());
           ReportErrors(error, cls, field.token_pos(),
                        "error initializing static %s field '%s': "
                        "type '%s' is not a subtype of type '%s'",
@@ -1485,7 +1471,7 @@
           // we create an implicit static final getter and reset the field value
           // to the sentinel value.
           const Function& getter = Function::Handle(
-              Z,
+              zone,
               Function::New(getter_name,
                             RawFunction::kImplicitStaticFinalGetter,
                             /* is_static = */ true,
@@ -1504,22 +1490,22 @@
     }
   }
   // Collect interfaces, super interfaces, and super classes of this class.
-  GrowableArray<const Class*> interfaces(Z, 4);
+  GrowableArray<const Class*> interfaces(zone, 4);
   CollectInterfaces(cls, &interfaces);
   // Include superclasses in list of interfaces and super interfaces.
   super_class = cls.SuperClass();
   while (!super_class.IsNull()) {
-    interfaces.Add(&Class::ZoneHandle(Z, super_class.raw()));
+    interfaces.Add(&Class::ZoneHandle(zone, super_class.raw()));
     CollectInterfaces(super_class, &interfaces);
     super_class = super_class.SuperClass();
   }
   // Resolve function signatures and check for conflicts in super classes and
   // interfaces.
   array = cls.functions();
-  Function& function = Function::Handle(Z);
-  Function& overridden_function = Function::Handle(Z);
+  Function& function = Function::Handle(zone);
+  Function& overridden_function = Function::Handle(zone);
   const intptr_t num_functions = array.Length();
-  Error& error = Error::Handle(Z);
+  Error& error = Error::Handle(zone);
   for (intptr_t i = 0; i < num_functions; i++) {
     function ^= array.At(i);
     FinalizeSignature(cls, function);
@@ -1537,15 +1523,15 @@
         if (!overridden_function.IsNull() &&
             !function.HasCompatibleParametersWith(overridden_function,
                                                   &error)) {
-          const String& class_name = String::Handle(Z, cls.Name());
-          const String& super_class_name =
-              String::Handle(Z, super_class->Name());
+          const String& class_name = String::Handle(zone, cls.Name());
+          const String& super_cls_name =
+              String::Handle(zone, super_class->Name());
           ReportErrors(error, cls, function.token_pos(),
                        "class '%s' overrides method '%s' of super "
                        "class '%s' with incompatible parameters",
                        class_name.ToCString(),
                        name.ToCString(),
-                       super_class_name.ToCString());
+                       super_cls_name.ToCString());
         }
       }
     }
@@ -1553,16 +1539,16 @@
       if (function.is_static()) {
         super_class = FindSuperOwnerOfFunction(cls, name);
         if (!super_class.IsNull()) {
-          const String& class_name = String::Handle(Z, cls.Name());
-          const String& super_class_name =
-              String::Handle(Z, super_class.Name());
+          const String& class_name = String::Handle(zone, cls.Name());
+          const String& super_cls_name =
+              String::Handle(zone, super_class.Name());
           ReportError(cls, function.token_pos(),
                       "static setter '%s=' of class '%s' conflicts with "
                       "instance setter '%s=' of super class '%s'",
                       name.ToCString(),
                       class_name.ToCString(),
                       name.ToCString(),
-                      super_class_name.ToCString());
+                      super_cls_name.ToCString());
         }
       }
       continue;
@@ -1576,8 +1562,8 @@
     if (function.is_static()) {
       super_class = FindSuperOwnerOfInstanceMember(cls, name, getter_name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(Z, cls.Name());
-        const String& super_class_name = String::Handle(Z, super_class.Name());
+        const String& class_name = String::Handle(zone, cls.Name());
+        const String& super_cls_name = String::Handle(zone, super_class.Name());
         ReportError(cls, function.token_pos(),
                     "static %s '%s' of class '%s' conflicts with "
                     "instance member '%s' of super class '%s'",
@@ -1586,7 +1572,7 @@
                     name.ToCString(),
                     class_name.ToCString(),
                     name.ToCString(),
-                    super_class_name.ToCString());
+                    super_cls_name.ToCString());
       }
       if (function.IsRedirectingFactory()) {
         // The function may be a still unresolved redirecting factory. Do not
@@ -1594,7 +1580,7 @@
         // However, the redirection type should be finalized.
         // If the redirection type is from a deferred library and is not
         // yet loaded, do not attempt to resolve.
-        Type& type = Type::Handle(Z, function.RedirectionType());
+        Type& type = Type::Handle(zone, function.RedirectionType());
         if (IsLoaded(type)) {
           type ^= FinalizeType(cls, type, kCanonicalize);
           function.SetRedirectionType(type);
@@ -1604,15 +1590,15 @@
                function.IsImplicitGetterFunction()) {
       super_class = FindSuperOwnerOfFunction(cls, name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(Z, cls.Name());
-        const String& super_class_name = String::Handle(Z, super_class.Name());
+        const String& class_name = String::Handle(zone, cls.Name());
+        const String& super_cls_name = String::Handle(zone, super_class.Name());
         ReportError(cls, function.token_pos(),
                     "getter '%s' of class '%s' conflicts with "
                     "method '%s' of super class '%s'",
                     name.ToCString(),
                     class_name.ToCString(),
                     name.ToCString(),
-                    super_class_name.ToCString());
+                    super_cls_name.ToCString());
       }
     } else if (!function.IsSetterFunction() &&
                !function.IsImplicitSetterFunction()) {
@@ -1620,15 +1606,15 @@
       // have the same name. Thus, we do not need to check setters.
       super_class = FindSuperOwnerOfFunction(cls, getter_name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(Z, cls.Name());
-        const String& super_class_name = String::Handle(Z, super_class.Name());
+        const String& class_name = String::Handle(zone, cls.Name());
+        const String& super_cls_name = String::Handle(zone, super_class.Name());
         ReportError(cls, function.token_pos(),
                     "method '%s' of class '%s' conflicts with "
                     "getter '%s' of super class '%s'",
                     name.ToCString(),
                     class_name.ToCString(),
                     name.ToCString(),
-                    super_class_name.ToCString());
+                    super_cls_name.ToCString());
       }
     }
   }
@@ -1723,7 +1709,8 @@
       for (intptr_t i = 0; i < num_super_type_params; i++) {
         param ^= super_type_params.TypeAt(i);
         param_name = param.name();
-        param_name = Symbols::FromConcat(param_name, Symbols::Backtick());
+        param_name = Symbols::FromConcat(thread,
+                                         param_name, Symbols::Backtick());
         cloned_param = TypeParameter::New(mixin_app_class,
                                           cloned_index,
                                           param_name,
@@ -1904,7 +1891,8 @@
   // If this mixin alias is aliasing another mixin alias, another class
   // will be inserted via recursion. No need to check here.
   // The mixin type may or may not be finalized yet.
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   AbstractType& super_type = AbstractType::Handle(zone,
                                                   mixin_app_class.super_type());
   const Type& mixin_type = Type::Handle(zone, mixin_app_class.mixin());
@@ -1929,7 +1917,7 @@
   Class& inserted_class = Class::Handle(zone,
       library.LookupLocalClass(inserted_class_name));
   if (inserted_class.IsNull()) {
-    inserted_class_name = Symbols::New(inserted_class_name);
+    inserted_class_name = Symbols::New(thread, inserted_class_name);
     const Script& script = Script::Handle(zone, mixin_app_class.script());
     inserted_class = Class::New(
         inserted_class_name, script, mixin_app_class.token_pos());
@@ -2158,21 +2146,23 @@
     const Class& mixin_app,
     const Class& mixin_cls,
     const GrowableObjectArray& cloned_funcs) {
-  const String& mixin_name = String::Handle(mixin_app.Name());
-  const Class& super_class = Class::Handle(mixin_app.SuperClass());
-  const String& super_name = String::Handle(super_class.Name());
-  const Array& functions = Array::Handle(super_class.functions());
+  Thread* T = Thread::Current();
+  Zone* Z = T->zone();
+  const String& mixin_name = String::Handle(Z, mixin_app.Name());
+  const Class& super_class = Class::Handle(Z, mixin_app.SuperClass());
+  const String& super_name = String::Handle(Z, super_class.Name());
+  const Array& functions = Array::Handle(Z, super_class.functions());
   const intptr_t num_functions = functions.Length();
-  Function& func = Function::Handle();
+  Function& func = Function::Handle(Z);
   for (intptr_t i = 0; i < num_functions; i++) {
     func ^= functions.At(i);
     if (func.IsGenerativeConstructor()) {
       // Build constructor name from mixin application class name
       // and name of cloned super class constructor.
-      const String& ctor_name = String::Handle(func.name());
-      String& clone_name = String::Handle(
+      const String& ctor_name = String::Handle(Z, func.name());
+      String& clone_name = String::Handle(Z,
           String::SubString(ctor_name, super_name.Length()));
-      clone_name = Symbols::FromConcat(mixin_name, clone_name);
+      clone_name = Symbols::FromConcat(T, mixin_name, clone_name);
 
       if (FLAG_trace_class_finalization) {
         THR_Print("Cloning constructor '%s' as '%s'\n",
@@ -2184,9 +2174,9 @@
       // class. The source is the mixin class. The source may be needed
       // to parse field initializer expressions in the mixin class.
       const PatchClass& owner =
-          PatchClass::Handle(PatchClass::New(mixin_app, mixin_cls));
+          PatchClass::Handle(Z, PatchClass::New(mixin_app, mixin_cls));
 
-      const Function& clone = Function::Handle(
+      const Function& clone = Function::Handle(Z,
           Function::New(clone_name,
                         func.kind(),
                         func.is_static(),
@@ -2205,11 +2195,11 @@
       const intptr_t num_parameters = func.NumParameters();
       // The cloned ctor shares the parameter names array with the
       // original.
-      const Array& parameter_names = Array::Handle(func.parameter_names());
+      const Array& parameter_names = Array::Handle(Z, func.parameter_names());
       ASSERT(parameter_names.Length() == num_parameters);
       clone.set_parameter_names(parameter_names);
       // The parameter types of the cloned constructor are 'dynamic'.
-      clone.set_parameter_types(Array::Handle(Array::New(num_parameters)));
+      clone.set_parameter_types(Array::Handle(Z, Array::New(num_parameters)));
       for (intptr_t n = 0; n < num_parameters; n++) {
         clone.SetParameterTypeAt(n, Object::dynamic_type());
       }
@@ -2362,7 +2352,7 @@
   }
   if (cls.IsTypedefClass()) {
     const Function& signature = Function::Handle(cls.signature_function());
-    FunctionType& type = FunctionType::Handle(signature.SignatureType());
+    Type& type = Type::Handle(signature.SignatureType());
 
     // Check for illegal self references.
     GrowableArray<intptr_t> visited_aliases;
@@ -2441,7 +2431,12 @@
     // fields because type parameters are parsed before the class body. Since
     // 'ResolveAndFinalizeMemberTypes(cls)' has not been called yet, unfinalized
     // member types could choke the snapshotter.
-    ASSERT(Array::Handle(cls.functions()).Length() == 0);
+    // Or
+    // if the class is being refinalized because a patch is being applied
+    // after the class has been finalized then it is ok for the class to have
+    // functions.
+    ASSERT((Array::Handle(cls.functions()).Length() == 0) ||
+           cls.is_refinalize_after_patch());
   }
 }
 
@@ -2590,15 +2585,14 @@
                                         const AbstractType& type,
                                         GrowableArray<intptr_t>* visited) {
   ASSERT(visited != NULL);
-  AbstractType& resolved_type = AbstractType::Handle(ResolveType(cls, type));
+  ResolveType(cls, type);
   bool checking_typedef = false;
-  if ((resolved_type.IsType() || resolved_type.IsFunctionType()) &&
-      !resolved_type.IsMalformed()) {
+  if (type.IsType() && !type.IsMalformed()) {
     AbstractType& other_type = AbstractType::Handle();
-    if (resolved_type.IsFunctionType()) {
-      const Class& scope_class = Class::Handle(resolved_type.type_class());
+    if (type.IsFunctionType()) {
+      const Class& scope_class = Class::Handle(type.type_class());
       const Function& signature_function =
-          Function::Handle(FunctionType::Cast(resolved_type).signature());
+          Function::Handle(Type::Cast(type).signature());
       // The signature function of this function type may be a local signature
       // function used in a formal parameter type of the typedef signature, but
       // not the typedef signature function itself, thus not qualifying as an
@@ -2645,8 +2639,7 @@
         }
       }
     }
-    const TypeArguments& type_args =
-        TypeArguments::Handle(resolved_type.arguments());
+    const TypeArguments& type_args = TypeArguments::Handle(type.arguments());
     if (!type_args.IsNull()) {
       for (intptr_t i = 0; i < type_args.Length(); i++) {
         other_type = type_args.TypeAt(i);
@@ -2737,7 +2730,8 @@
     const MixinAppType& mixin_app_type) {
   // Lookup or create mixin application classes in the library of cls
   // and resolve super type and mixin types.
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   const Library& library = Library::Handle(zone, cls.library());
   ASSERT(!library.IsNull());
   const Script& script = Script::Handle(zone, cls.script());
@@ -2746,7 +2740,7 @@
       GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
   AbstractType& mixin_super_type =
       AbstractType::Handle(zone, mixin_app_type.super_type());
-  mixin_super_type = ResolveType(cls, mixin_super_type);
+  ResolveType(cls, mixin_super_type);
   ASSERT(mixin_super_type.HasResolvedTypeClass());  // Even if malformed.
   if (mixin_super_type.IsMalformedOrMalbounded()) {
     ReportError(Error::Handle(zone, mixin_super_type.error()));
@@ -2770,7 +2764,7 @@
   for (intptr_t i = 0; i < depth; i++) {
     mixin_type = mixin_app_type.MixinTypeAt(i);
     ASSERT(!mixin_type.IsNull());
-    mixin_type = ResolveType(cls, mixin_type);
+    ResolveType(cls, mixin_type);
     ASSERT(mixin_type.HasResolvedTypeClass());  // Even if malformed.
     ASSERT(mixin_type.IsType());
     const intptr_t num_super_type_args = type_args.Length();
@@ -2814,7 +2808,7 @@
                                           mixin_type_class_name);
     mixin_app_class = library.LookupLocalClass(mixin_app_class_name);
     if (mixin_app_class.IsNull()) {
-      mixin_app_class_name = Symbols::New(mixin_app_class_name);
+      mixin_app_class_name = Symbols::New(thread, mixin_app_class_name);
       mixin_app_class = Class::New(mixin_app_class_name,
                                    script,
                                    mixin_type.token_pos());
@@ -2931,7 +2925,7 @@
   Class& interface_class = Class::Handle(zone);
 
   // Resolve super type. Failures lead to a longjmp.
-  super_type = ResolveType(cls, super_type);
+  ResolveType(cls, super_type);
   if (super_type.IsMalformedOrMalbounded()) {
     ReportError(Error::Handle(zone, super_type.error()));
   }
@@ -3011,7 +3005,7 @@
   // Resolve interfaces. Failures lead to a longjmp.
   for (intptr_t i = 0; i < super_interfaces.Length(); i++) {
     interface ^= super_interfaces.At(i);
-    interface = ResolveType(cls, interface);
+    ResolveType(cls, interface);
     ASSERT(!interface.IsTypeParameter());  // Should be detected by parser.
     // A malbounded interface is only reported when involved in a type test.
     if (interface.IsMalformed()) {
diff --git a/runtime/vm/class_finalizer.h b/runtime/vm/class_finalizer.h
index e630df0..81850f6 100644
--- a/runtime/vm/class_finalizer.h
+++ b/runtime/vm/class_finalizer.h
@@ -89,8 +89,8 @@
 #endif  // defined(DART_NO_SNAPSHOT).
 
   // Resolve the class of the type, but not the type's type arguments.
-  // May promote the type from Type to FunctionType.
-  static RawAbstractType* ResolveTypeClass(const Class& cls, const Type& type);
+  // May promote the type to function type by setting its signature field.
+  static void ResolveTypeClass(const Class& cls, const Type& type);
 
   // Resolve the type and target of the redirecting factory.
   static void ResolveRedirectingFactory(const Class& cls,
@@ -111,8 +111,7 @@
   static void CheckForLegalConstClass(const Class& cls);
   static RawClass* ResolveClass(const Class& cls,
                                 const UnresolvedClass& unresolved_class);
-  static RawAbstractType* ResolveType(const Class& cls,
-                                      const AbstractType& type);
+  static void ResolveType(const Class& cls, const AbstractType& type);
   static void ResolveRedirectingFactoryTarget(
       const Class& cls,
       const Function& factory,
diff --git a/runtime/vm/class_finalizer_test.cc b/runtime/vm/class_finalizer_test.cc
index f1c492e..eb4447c 100644
--- a/runtime/vm/class_finalizer_test.cc
+++ b/runtime/vm/class_finalizer_test.cc
@@ -11,7 +11,8 @@
 
 
 static RawClass* CreateTestClass(const char* name) {
-  const String& class_name = String::Handle(Symbols::New(name));
+  const String& class_name = String::Handle(Symbols::New(Thread::Current(),
+                                                         name));
   const Script& script = Script::Handle();
   const Class& cls = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
@@ -74,7 +75,7 @@
 
 
 static RawLibrary* NewLib(const char* url_chars) {
-  String& url = String::ZoneHandle(Symbols::New(url_chars));
+  String& url = String::ZoneHandle(Symbols::New(Thread::Current(), url_chars));
   return Library::New(url);
 }
 
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 7129cf8..8cb9fa1 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.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/atomic.h"
 #include "vm/class_table.h"
 #include "vm/flags.h"
 #include "vm/freelist.h"
@@ -106,11 +107,9 @@
     // Add the vtable for this predefined class into the static vtable registry
     // if it has not been setup yet.
     cpp_vtable cls_vtable = cls.handle_vtable();
-    cpp_vtable table_entry = Object::builtin_vtables_[index];
-    ASSERT((table_entry == 0) || (table_entry == cls_vtable));
-    if (table_entry == 0) {
-      Object::builtin_vtables_[index] = cls_vtable;
-    }
+    AtomicOperations::CompareAndSwapWord(
+        &(Object::builtin_vtables_[index]), 0, cls_vtable);
+    ASSERT(Object::builtin_vtables_[index] == cls_vtable);
   } else {
     if (top_ == capacity_) {
       // Grow the capacity of the class table.
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc
index dad76d9..b7b4326 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -124,7 +124,7 @@
                               list_[i].pc_offset,
                               list_[i].needs_stacktrace,
                               has_catch_all);
-      handlers.SetHandledTypes(i, Array::null_array());
+      handlers.SetHandledTypes(i, Array::empty_array());
     } else {
       const bool has_catch_all = ContainsDynamic(*list_[i].handler_types);
       handlers.SetHandlerInfo(i,
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index 5f8bb1d..3cc1ef9 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -221,7 +221,7 @@
   const Library& lib = Library::Handle(Library::LookupLibrary(name));
   EXPECT(!lib.IsNull());
   Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("A"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   EXPECT(!cls.IsNull());
 
   // Now compile the two functions 'A.foo' and 'A.moo'
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 758c2e0..1aa9dda 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -186,21 +186,21 @@
 // Arg1: instantiator type arguments.
 // Return value: instantiated type.
 DEFINE_RUNTIME_ENTRY(InstantiateType, 2) {
-  AbstractType& type = AbstractType::CheckedHandle(arguments.ArgAt(0));
+  AbstractType& type = AbstractType::CheckedHandle(zone, arguments.ArgAt(0));
   const TypeArguments& instantiator =
-      TypeArguments::CheckedHandle(arguments.ArgAt(1));
+      TypeArguments::CheckedHandle(zone, arguments.ArgAt(1));
   ASSERT(!type.IsNull() && !type.IsInstantiated());
   ASSERT(instantiator.IsNull() || instantiator.IsInstantiated());
-  Error& bound_error = Error::Handle();
+  Error& bound_error = Error::Handle(zone);
   type =
       type.InstantiateFrom(instantiator, &bound_error, NULL, NULL, Heap::kOld);
   if (!bound_error.IsNull()) {
     // Throw a dynamic type error.
     const TokenPosition location = GetCallerLocation();
     String& bound_error_message =  String::Handle(
-        String::New(bound_error.ToErrorCString()));
+        zone, String::New(bound_error.ToErrorCString()));
     Exceptions::CreateAndThrowTypeError(
-        location, Symbols::Empty(), Symbols::Empty(),
+        location, AbstractType::Handle(zone), AbstractType::Handle(zone),
         Symbols::Empty(), bound_error_message);
     UNREACHABLE();
   }
@@ -220,16 +220,16 @@
 // Return value: instantiated type arguments.
 DEFINE_RUNTIME_ENTRY(InstantiateTypeArguments, 2) {
   TypeArguments& type_arguments =
-      TypeArguments::CheckedHandle(arguments.ArgAt(0));
+      TypeArguments::CheckedHandle(zone, arguments.ArgAt(0));
   const TypeArguments& instantiator =
-      TypeArguments::CheckedHandle(arguments.ArgAt(1));
+      TypeArguments::CheckedHandle(zone, arguments.ArgAt(1));
   ASSERT(!type_arguments.IsNull() && !type_arguments.IsInstantiated());
   ASSERT(instantiator.IsNull() || instantiator.IsInstantiated());
   // Code inlined in the caller should have optimized the case where the
   // instantiator can be reused as type argument vector.
   ASSERT(instantiator.IsNull() || !type_arguments.IsUninstantiatedIdentity());
   if (isolate->type_checks()) {
-    Error& bound_error = Error::Handle();
+    Error& bound_error = Error::Handle(zone);
     type_arguments =
         type_arguments.InstantiateAndCanonicalizeFrom(instantiator,
                                                       &bound_error);
@@ -237,9 +237,9 @@
       // Throw a dynamic type error.
       const TokenPosition location = GetCallerLocation();
       String& bound_error_message =  String::Handle(
-          String::New(bound_error.ToErrorCString()));
+          zone, String::New(bound_error.ToErrorCString()));
       Exceptions::CreateAndThrowTypeError(
-          location, Symbols::Empty(), Symbols::Empty(),
+          location, AbstractType::Handle(zone), AbstractType::Handle(zone),
           Symbols::Empty(), bound_error_message);
       UNREACHABLE();
     }
@@ -256,7 +256,7 @@
 // Arg0: number of variables.
 // Return value: newly allocated context.
 DEFINE_RUNTIME_ENTRY(AllocateContext, 1) {
-  const Smi& num_variables = Smi::CheckedHandle(arguments.ArgAt(0));
+  const Smi& num_variables = Smi::CheckedHandle(zone, arguments.ArgAt(0));
   arguments.SetReturn(Context::Handle(Context::New(num_variables.Value())));
 }
 
@@ -266,8 +266,9 @@
 // Arg0: the context to be cloned.
 // Return value: newly allocated context.
 DEFINE_RUNTIME_ENTRY(CloneContext, 1) {
-  const Context& ctx = Context::CheckedHandle(arguments.ArgAt(0));
-  Context& cloned_ctx = Context::Handle(Context::New(ctx.num_variables()));
+  const Context& ctx = Context::CheckedHandle(zone, arguments.ArgAt(0));
+  Context& cloned_ctx =
+      Context::Handle(zone, Context::New(ctx.num_variables()));
   cloned_ctx.set_parent(Context::Handle(ctx.parent()));
   Object& inst = Object::Handle(zone);
   for (int i = 0; i < ctx.num_variables(); i++) {
@@ -445,17 +446,18 @@
 // Arg3: SubtypeTestCache.
 // Return value: true or false, or may throw a type error in checked mode.
 DEFINE_RUNTIME_ENTRY(Instanceof, 4) {
-  const Instance& instance = Instance::CheckedHandle(arguments.ArgAt(0));
-  const AbstractType& type = AbstractType::CheckedHandle(arguments.ArgAt(1));
+  const Instance& instance = Instance::CheckedHandle(zone, arguments.ArgAt(0));
+  const AbstractType& type =
+      AbstractType::CheckedHandle(zone, arguments.ArgAt(1));
   const TypeArguments& instantiator_type_arguments =
-      TypeArguments::CheckedHandle(arguments.ArgAt(2));
+      TypeArguments::CheckedHandle(zone, arguments.ArgAt(2));
   const SubtypeTestCache& cache =
-      SubtypeTestCache::CheckedHandle(arguments.ArgAt(3));
+      SubtypeTestCache::CheckedHandle(zone, arguments.ArgAt(3));
   ASSERT(type.IsFinalized());
   ASSERT(!type.IsDynamicType());  // No need to check assignment.
   ASSERT(!type.IsMalformed());  // Already checked in code generator.
   ASSERT(!type.IsMalbounded());  // Already checked in code generator.
-  Error& bound_error = Error::Handle();
+  Error& bound_error = Error::Handle(zone);
   const Bool& result =
       Bool::Get(instance.IsInstanceOf(type,
                                       instantiator_type_arguments,
@@ -468,9 +470,9 @@
     // Throw a dynamic type error only if the instanceof test fails.
     const TokenPosition location = GetCallerLocation();
     String& bound_error_message =  String::Handle(
-        String::New(bound_error.ToErrorCString()));
+        zone, String::New(bound_error.ToErrorCString()));
     Exceptions::CreateAndThrowTypeError(
-        location, Symbols::Empty(), Symbols::Empty(),
+        location, AbstractType::Handle(zone), AbstractType::Handle(zone),
         Symbols::Empty(), bound_error_message);
     UNREACHABLE();
   }
@@ -489,19 +491,21 @@
 // Arg4: SubtypeTestCache.
 // Return value: instance if a subtype, otherwise throw a TypeError.
 DEFINE_RUNTIME_ENTRY(TypeCheck, 5) {
-  const Instance& src_instance = Instance::CheckedHandle(arguments.ArgAt(0));
-  AbstractType& dst_type = AbstractType::CheckedHandle(arguments.ArgAt(1));
+  const Instance& src_instance =
+      Instance::CheckedHandle(zone, arguments.ArgAt(0));
+  AbstractType& dst_type =
+      AbstractType::CheckedHandle(zone, arguments.ArgAt(1));
   const TypeArguments& instantiator_type_arguments =
-      TypeArguments::CheckedHandle(arguments.ArgAt(2));
-  const String& dst_name = String::CheckedHandle(arguments.ArgAt(3));
+      TypeArguments::CheckedHandle(zone, arguments.ArgAt(2));
+  const String& dst_name = String::CheckedHandle(zone, arguments.ArgAt(3));
   const SubtypeTestCache& cache =
-      SubtypeTestCache::CheckedHandle(arguments.ArgAt(4));
+      SubtypeTestCache::CheckedHandle(zone, arguments.ArgAt(4));
   ASSERT(!dst_type.IsDynamicType());  // No need to check assignment.
   ASSERT(!dst_type.IsMalformed());  // Already checked in code generator.
   ASSERT(!dst_type.IsMalbounded());  // Already checked in code generator.
   ASSERT(!src_instance.IsNull());  // Already checked in inlined code.
 
-  Error& bound_error = Error::Handle();
+  Error& bound_error = Error::Handle(zone);
   const bool is_instance_of = src_instance.IsInstanceOf(
       dst_type, instantiator_type_arguments, &bound_error);
 
@@ -513,25 +517,20 @@
   if (!is_instance_of) {
     // Throw a dynamic type error.
     const TokenPosition location = GetCallerLocation();
-    const AbstractType& src_type = AbstractType::Handle(src_instance.GetType());
-    String& src_type_name = String::Handle(src_type.UserVisibleName());
+    const AbstractType& src_type =
+        AbstractType::Handle(zone, src_instance.GetType());
     if (!dst_type.IsInstantiated()) {
       // Instantiate dst_type before reporting the error.
       dst_type = dst_type.InstantiateFrom(instantiator_type_arguments, NULL,
                                           NULL, NULL, Heap::kNew);
       // Note that instantiated dst_type may be malbounded.
     }
-    String& dst_type_name = String::Handle(dst_type.UserVisibleName());
-    String& bound_error_message =  String::Handle();
+    String& bound_error_message =  String::Handle(zone);
     if (!bound_error.IsNull()) {
       ASSERT(isolate->type_checks());
       bound_error_message = String::New(bound_error.ToErrorCString());
     }
-    if (src_type_name.Equals(dst_type_name)) {
-      src_type_name = src_type.UserVisibleNameWithURI();
-      dst_type_name = dst_type.UserVisibleNameWithURI();
-    }
-    Exceptions::CreateAndThrowTypeError(location, src_type_name, dst_type_name,
+    Exceptions::CreateAndThrowTypeError(location, src_type, dst_type,
                                         dst_name, bound_error_message);
     UNREACHABLE();
   }
@@ -548,17 +547,18 @@
 // Return value: none, throws TypeError or AssertionError.
 DEFINE_RUNTIME_ENTRY(NonBoolTypeError, 1) {
   const TokenPosition location = GetCallerLocation();
-  const Instance& src_instance = Instance::CheckedHandle(arguments.ArgAt(0));
+  const Instance& src_instance =
+      Instance::CheckedHandle(zone, arguments.ArgAt(0));
 
   if (src_instance.IsNull()) {
-    const Array& args = Array::Handle(Array::New(4));
-    args.SetAt(0, String::Handle(
+    const Array& args = Array::Handle(zone, Array::New(4));
+    args.SetAt(0, String::Handle(zone,
         String::New("Failed assertion: boolean expression must not be null")));
 
     // No source code for this assertion, set url to null.
-    args.SetAt(1, String::Handle(String::null()));
-    args.SetAt(2, Smi::Handle(Smi::New(0)));
-    args.SetAt(3, Smi::Handle(Smi::New(0)));
+    args.SetAt(1, String::Handle(zone, String::null()));
+    args.SetAt(2, Smi::Handle(zone, Smi::New(0)));
+    args.SetAt(3, Smi::Handle(zone, Smi::New(0)));
 
     Exceptions::ThrowByType(Exceptions::kAssertion, args);
     UNREACHABLE();
@@ -566,12 +566,10 @@
 
   ASSERT(!src_instance.IsBool());
   const Type& bool_interface = Type::Handle(Type::BoolType());
-  const AbstractType& src_type = AbstractType::Handle(src_instance.GetType());
-  const String& src_type_name = String::Handle(src_type.UserVisibleName());
-  const String& bool_type_name =
-      String::Handle(bool_interface.UserVisibleName());
-  const String& no_bound_error = String::Handle();
-  Exceptions::CreateAndThrowTypeError(location, src_type_name, bool_type_name,
+  const AbstractType& src_type =
+      AbstractType::Handle(zone, src_instance.GetType());
+  const String& no_bound_error = String::Handle(zone);
+  Exceptions::CreateAndThrowTypeError(location, src_type, bool_interface,
                                       Symbols::BooleanExpression(),
                                       no_bound_error);
   UNREACHABLE();
@@ -585,26 +583,14 @@
 // Return value: none, throws an exception.
 DEFINE_RUNTIME_ENTRY(BadTypeError, 3) {
   const TokenPosition location = GetCallerLocation();
-  const Instance& src_value = Instance::CheckedHandle(arguments.ArgAt(0));
-  const String& dst_name = String::CheckedHandle(arguments.ArgAt(1));
+  const Instance& src_value = Instance::CheckedHandle(zone, arguments.ArgAt(0));
+  const String& dst_name = String::CheckedHandle(zone, arguments.ArgAt(1));
   const AbstractType& dst_type =
-      AbstractType::CheckedHandle(arguments.ArgAt(2));
-  const AbstractType& src_type = AbstractType::Handle(src_value.GetType());
-  const String& src_type_name = String::Handle(src_type.UserVisibleName());
-
-  String& dst_type_name = String::Handle();
-  LanguageError& error = LanguageError::Handle(dst_type.error());
-  ASSERT(!error.IsNull());
-  if (error.kind() == Report::kMalformedType) {
-    dst_type_name = Symbols::Malformed().raw();
-  } else {
-    ASSERT(error.kind() == Report::kMalboundedType);
-    dst_type_name = Symbols::Malbounded().raw();
-  }
-  const String& error_message = String::ZoneHandle(
-      Symbols::New(error.ToErrorCString()));
+      AbstractType::CheckedHandle(zone, arguments.ArgAt(2));
+  const AbstractType& src_type =
+      AbstractType::Handle(zone, src_value.GetType());
   Exceptions::CreateAndThrowTypeError(
-      location, src_type_name, dst_type_name, dst_name, error_message);
+      location, src_type, dst_type, dst_name, String::Handle(zone));
   UNREACHABLE();
 }
 
@@ -631,19 +617,19 @@
   DartFrameIterator iterator;
   StackFrame* caller_frame = iterator.NextFrame();
   ASSERT(caller_frame != NULL);
-  const Code& caller_code = Code::Handle(caller_frame->LookupDartCode());
+  const Code& caller_code = Code::Handle(zone, caller_frame->LookupDartCode());
   ASSERT(!caller_code.IsNull());
   ASSERT(caller_code.is_optimized());
   const Function& target_function = Function::Handle(
-      caller_code.GetStaticCallTargetFunctionAt(caller_frame->pc()));
+      zone, caller_code.GetStaticCallTargetFunctionAt(caller_frame->pc()));
   if (!target_function.HasCode()) {
     const Error& error =
-        Error::Handle(Compiler::CompileFunction(thread, target_function));
+        Error::Handle(zone, Compiler::CompileFunction(thread, target_function));
     if (!error.IsNull()) {
       Exceptions::PropagateError(error);
     }
   }
-  const Code& target_code = Code::Handle(target_function.CurrentCode());
+  const Code& target_code = Code::Handle(zone, target_function.CurrentCode());
   // Before patching verify that we are not repeatedly patching to the same
   // target.
   ASSERT(target_code.raw() !=
@@ -684,8 +670,9 @@
   StackFrame* caller_frame = iterator.NextFrame();
   ASSERT(caller_frame != NULL);
   const Code& orig_stub = Code::Handle(
-      isolate->debugger()->GetPatchedStubAddress(caller_frame->pc()));
-  const Error& error = Error::Handle(isolate->debugger()->SignalBpReached());
+      zone, isolate->debugger()->GetPatchedStubAddress(caller_frame->pc()));
+  const Error& error =
+      Error::Handle(zone, isolate->debugger()->SignalBpReached());
   if (!error.IsNull()) {
     Exceptions::PropagateError(error);
     UNREACHABLE();
@@ -700,7 +687,7 @@
     return;
   }
   const Error& error =
-      Error::Handle(isolate->debugger()->DebuggerStepCallback());
+      Error::Handle(zone, isolate->debugger()->DebuggerStepCallback());
   if (!error.IsNull()) {
     Exceptions::PropagateError(error);
     UNREACHABLE();
@@ -1091,7 +1078,7 @@
     if (is_extractor) {
       field_name = String::SubString(field_name, 1);
       ASSERT(!Field::IsGetterName(field_name));
-      field_name = Symbols::New(field_name);
+      field_name = Symbols::New(thread, field_name);
 
       if (!Field::IsSetterName(field_name)) {
         const String& getter_name =
@@ -1275,17 +1262,17 @@
 #if defined(USING_SIMULATOR)
   uword stack_pos = Simulator::Current()->get_register(SPREG);
 #else
-  uword stack_pos = Isolate::GetCurrentStackPointer();
+  uword stack_pos = Thread::GetCurrentStackPointer();
 #endif
   // Always clear the stack overflow flags.  They are meant for this
   // particular stack overflow runtime call and are not meant to
   // persist.
-  uword stack_overflow_flags = isolate->GetAndClearStackOverflowFlags();
+  uword stack_overflow_flags = thread->GetAndClearStackOverflowFlags();
 
   // If an interrupt happens at the same time as a stack overflow, we
   // process the stack overflow now and leave the interrupt for next
   // time.
-  if (stack_pos < isolate->saved_stack_limit()) {
+  if (stack_pos < thread->saved_stack_limit()) {
     // Use the preallocated stack overflow exception to avoid calling
     // into dart code.
     const Instance& exception =
@@ -1302,7 +1289,7 @@
     // TODO(turnidge): To make --deoptimize_every and
     // --stacktrace-every faster we could move this increment/test to
     // the generated code.
-    int32_t count = isolate->IncrementAndGetStackOverflowCount();
+    int32_t count = thread->IncrementAndGetStackOverflowCount();
     if (FLAG_deoptimize_every > 0 &&
         (count % FLAG_deoptimize_every) == 0) {
       do_deopt = true;
@@ -1349,7 +1336,7 @@
       ActivationFrame* frame = stack->FrameAt(i);
       // Variable locations and number are unknown when precompiling.
       const int num_vars =
-         FLAG_precompiled_mode ? 0 : frame->NumLocalVariables();
+         FLAG_precompiled_runtime ? 0 : frame->NumLocalVariables();
       TokenPosition unused = TokenPosition::kNoSource;
       for (intptr_t v = 0; v < num_vars; v++) {
         frame->VariableAt(v, &var_name, &unused, &unused, &var_value);
@@ -1357,13 +1344,13 @@
     }
   }
 
-  const Error& error = Error::Handle(isolate->HandleInterrupts());
+  const Error& error = Error::Handle(thread->HandleInterrupts());
   if (!error.IsNull()) {
     Exceptions::PropagateError(error);
     UNREACHABLE();
   }
 
-  if ((stack_overflow_flags & Isolate::kOsrRequest) != 0) {
+  if ((stack_overflow_flags & Thread::kOsrRequest) != 0) {
     ASSERT(FLAG_use_osr);
     DartFrameIterator iterator;
     StackFrame* frame = iterator.NextFrame();
@@ -1806,6 +1793,17 @@
 // materialization phase.
 DEFINE_RUNTIME_ENTRY(DeoptimizeMaterialize, 0) {
 #if !defined(DART_PRECOMPILED_RUNTIME)
+#if defined(DEBUG)
+  {
+    // We may rendezvous for a safepoint at entry or GC from the allocations
+    // below. Check the stack is walkable.
+    StackFrameIterator frames_iterator(StackFrameIterator::kValidateFrames);
+    StackFrame* frame = frames_iterator.NextFrame();
+    while (frame != NULL) {
+      frame = frames_iterator.NextFrame();
+    }
+  }
+#endif
   DeoptContext* deopt_context = isolate->deopt_context();
   intptr_t deopt_arg_count = deopt_context->MaterializeDeferredObjects();
   isolate->set_deopt_context(NULL);
diff --git a/runtime/vm/code_generator_test.cc b/runtime/vm/code_generator_test.cc
index e3c33a5..b532cf1 100644
--- a/runtime/vm/code_generator_test.cc
+++ b/runtime/vm/code_generator_test.cc
@@ -47,7 +47,8 @@
 
 // Helper to allocate and return a LocalVariable.
 static LocalVariable* NewTestLocalVariable(const char* name) {
-  const String& variable_name = String::ZoneHandle(Symbols::New(name));
+  const String& variable_name = String::ZoneHandle(
+      Symbols::New(Thread::Current(), name));
   const Type& variable_type = Type::ZoneHandle(Type::DynamicType());
   return new LocalVariable(kPos, variable_name, variable_type);
 }
@@ -212,7 +213,8 @@
 
 
 static Library& MakeTestLibrary(const char* url) {
-  const String& lib_url = String::ZoneHandle(Symbols::New(url));
+  const String& lib_url = String::ZoneHandle(Symbols::New(Thread::Current(),
+                                                          url));
   Library& lib = Library::ZoneHandle(Library::New(lib_url));
   lib.Register();
   Library& core_lib = Library::Handle(Library::CoreLibrary());
@@ -225,7 +227,8 @@
 
 
 static RawClass* LookupClass(const Library& lib, const char* name) {
-  const String& cls_name = String::ZoneHandle(Symbols::New(name));
+  const String& cls_name = String::ZoneHandle(Symbols::New(Thread::Current(),
+                                                           name));
   return lib.LookupClass(cls_name);
 }
 
@@ -301,7 +304,8 @@
   EXPECT(!constructor.IsNull());
 
   // The unit test creates an instance of class A and calls function 'bar'.
-  String& function_bar_name = String::ZoneHandle(Symbols::New("bar"));
+  String& function_bar_name = String::ZoneHandle(Symbols::New(Thread::Current(),
+                                                              "bar"));
   ArgumentListNode* no_arguments = new ArgumentListNode(kPos);
   const TypeArguments& no_type_arguments = TypeArguments::ZoneHandle();
   InstanceCallNode* call_bar = new InstanceCallNode(
@@ -360,7 +364,8 @@
   app_lib ^= libs.At(num_libs - 1);
   ASSERT(!app_lib.IsNull());
   const Class& cls = Class::Handle(
-      app_lib.LookupClass(String::Handle(Symbols::New("A"))));
+      app_lib.LookupClass(String::Handle(Symbols::New(Thread::Current(),
+                                                      "A"))));
   EXPECT_EQ(cls.raw(), result.clazz());
 }
 
diff --git a/runtime/vm/code_patcher_arm64_test.cc b/runtime/vm/code_patcher_arm64_test.cc
index 32d8ada..f11b00a 100644
--- a/runtime/vm/code_patcher_arm64_test.cc
+++ b/runtime/vm/code_patcher_arm64_test.cc
@@ -21,11 +21,13 @@
 #define __ assembler->
 
 ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  Thread* thread = Thread::Current();
+  const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
-  const String& function_name = String::Handle(Symbols::New("callerFunction"));
+  const String& function_name = String::Handle(Symbols::New(thread,
+                                                            "callerFunction"));
   const Function& function = Function::Handle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/code_patcher_arm_test.cc b/runtime/vm/code_patcher_arm_test.cc
index 06b9f8c..a4cdfe5 100644
--- a/runtime/vm/code_patcher_arm_test.cc
+++ b/runtime/vm/code_patcher_arm_test.cc
@@ -21,11 +21,13 @@
 #define __ assembler->
 
 ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  Thread* thread = Thread::Current();
+  const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
-  const String& function_name = String::Handle(Symbols::New("callerFunction"));
+  const String& function_name = String::Handle(Symbols::New(thread,
+                                                            "callerFunction"));
   const Function& function = Function::Handle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/code_patcher_ia32_test.cc b/runtime/vm/code_patcher_ia32_test.cc
index 26fe49f..55fe98f 100644
--- a/runtime/vm/code_patcher_ia32_test.cc
+++ b/runtime/vm/code_patcher_ia32_test.cc
@@ -21,11 +21,13 @@
 #define __ assembler->
 
 ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  Thread* thread = Thread::Current();
+  const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
-  const String& function_name = String::Handle(Symbols::New("callerFunction"));
+  const String& function_name = String::Handle(Symbols::New(thread,
+                                                            "callerFunction"));
   const Function& function = Function::Handle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/code_patcher_mips_test.cc b/runtime/vm/code_patcher_mips_test.cc
index e99a987..0776083 100644
--- a/runtime/vm/code_patcher_mips_test.cc
+++ b/runtime/vm/code_patcher_mips_test.cc
@@ -21,11 +21,13 @@
 #define __ assembler->
 
 ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  Thread* thread = Thread::Current();
+  const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
-  const String& function_name = String::Handle(Symbols::New("callerFunction"));
+  const String& function_name = String::Handle(Symbols::New(thread,
+                                                            "callerFunction"));
   const Function& function = Function::Handle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/code_patcher_x64_test.cc b/runtime/vm/code_patcher_x64_test.cc
index 13d2978..5102226 100644
--- a/runtime/vm/code_patcher_x64_test.cc
+++ b/runtime/vm/code_patcher_x64_test.cc
@@ -21,11 +21,13 @@
 #define __ assembler->
 
 ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  Thread* thread = Thread::Current();
+  const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
-  const String& function_name = String::Handle(Symbols::New("callerFunction"));
+  const String& function_name = String::Handle(Symbols::New(thread,
+                                                            "callerFunction"));
   const Function& function = Function::Handle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index dd2ddee..fd0e748 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -40,6 +40,7 @@
 #include "vm/symbols.h"
 #include "vm/tags.h"
 #include "vm/thread_registry.h"
+#include "vm/timeline.h"
 #include "vm/timer.h"
 
 namespace dart {
@@ -61,7 +62,6 @@
     "Print the deopt-id to ICData map in optimizing compiler.");
 DEFINE_FLAG(bool, print_code_source_map, false, "Print code source map.");
 DEFINE_FLAG(bool, range_analysis, true, "Enable range analysis");
-DEFINE_FLAG(bool, reorder_basic_blocks, true, "Enable basic-block reordering.");
 DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations.");
 DEFINE_FLAG(bool, trace_optimizing_compiler, false,
     "Trace only optimizing compiler operations.");
@@ -107,6 +107,7 @@
   // Variables are allocated after compilation.
 }
 
+
 FlowGraph* IrregexpCompilationPipeline::BuildFlowGraph(
     Zone* zone,
     ParsedFunction* parsed_function,
@@ -133,10 +134,12 @@
                              result.num_blocks);
 }
 
+
 void IrregexpCompilationPipeline::FinalizeCompilation() {
   backtrack_goto_->ComputeOffsetTable();
 }
 
+
 CompilationPipeline* CompilationPipeline::New(Zone* zone,
                                               const Function& function) {
   if (function.IsIrregexpFunction()) {
@@ -276,7 +279,7 @@
 NOT_IN_PRODUCT(
   VMTagScope tagScope(thread, VMTag::kCompileClassTagId);
   TimelineDurationScope tds(thread,
-                            thread->isolate()->GetCompilerStream(),
+                            Timeline::GetCompilerStream(),
                             "CompileClass");
   if (tds.enabled()) {
     tds.SetNumArguments(1);
@@ -375,10 +378,12 @@
         optimized_(optimized),
         osr_id_(osr_id),
         thread_(Thread::Current()),
-        cha_invalidation_gen_at_start_(isolate()->cha_invalidation_gen()),
         field_invalidation_gen_at_start_(isolate()->field_invalidation_gen()),
-        prefix_invalidation_gen_at_start_(
-            isolate()->prefix_invalidation_gen()) {
+        loading_invalidation_gen_at_start_(
+            isolate()->loading_invalidation_gen()) {
+    if (Compiler::IsBackgroundCompilation()) {
+      isolate()->ClearDisablingFieldList();
+    }
   }
 
   bool Compile(CompilationPipeline* pipeline);
@@ -389,14 +394,11 @@
   intptr_t osr_id() const { return osr_id_; }
   Thread* thread() const { return thread_; }
   Isolate* isolate() const { return thread_->isolate(); }
-  uint32_t cha_invalidation_gen_at_start() const {
-    return cha_invalidation_gen_at_start_;
-  }
-  uint32_t field_invalidation_gen_at_start() const {
+  intptr_t field_invalidation_gen_at_start() const {
     return field_invalidation_gen_at_start_;
   }
-  uint32_t prefix_invalidation_gen_at_start() const {
-    return prefix_invalidation_gen_at_start_;
+  intptr_t loading_invalidation_gen_at_start() const {
+    return loading_invalidation_gen_at_start_;
   }
   void FinalizeCompilation(Assembler* assembler,
                            FlowGraphCompiler* graph_compiler,
@@ -406,14 +408,35 @@
   const bool optimized_;
   const intptr_t osr_id_;
   Thread* const thread_;
-  const uint32_t cha_invalidation_gen_at_start_;
-  const uint32_t field_invalidation_gen_at_start_;
-  const uint32_t prefix_invalidation_gen_at_start_;
+  const intptr_t field_invalidation_gen_at_start_;
+  const intptr_t loading_invalidation_gen_at_start_;
 
   DISALLOW_COPY_AND_ASSIGN(CompileParsedFunctionHelper);
 };
 
 
+// Returns true if any of disabling fields is inside the guarded_fields.
+// The number of guarded_fields and disabling-fields is expected to be small
+// (less than 5).
+static bool CheckDisablingFields(
+    Thread* thread,
+    const ZoneGrowableArray<const Field*>& guarded_fields) {
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
+  Field& field = Field::Handle(zone, isolate->GetDisablingField());
+  while (!field.IsNull()) {
+    for (intptr_t i = 0; i < guarded_fields.length(); i++) {
+      if (guarded_fields.At(i)->raw() == field.raw()) {
+        return true;
+      }
+    }
+    // Get next field.
+    field = isolate->GetDisablingField();
+  }
+  return false;
+}
+
+
 void CompileParsedFunctionHelper::FinalizeCompilation(
     Assembler* assembler,
     FlowGraphCompiler* graph_compiler,
@@ -485,10 +508,12 @@
   }
 );
   if (optimized()) {
+    bool code_was_installed = false;
     // Installs code while at safepoint.
     if (thread()->IsMutatorThread()) {
       const bool is_osr = osr_id() != Compiler::kNoOSRDeoptId;
       function.InstallOptimizedCode(code, is_osr);
+      code_was_installed = true;
     } else {
       // Background compilation.
       // Before installing code check generation counts if the code may
@@ -496,57 +521,59 @@
       const bool trace_compiler =
           FLAG_trace_compiler || FLAG_trace_optimizing_compiler;
       bool code_is_valid = true;
-      if (!thread()->cha()->leaf_classes().is_empty()) {
-        if (cha_invalidation_gen_at_start() !=
-            isolate()->cha_invalidation_gen()) {
-          code_is_valid = false;
-          if (trace_compiler) {
-            THR_Print("--> FAIL: CHA invalidation.");
-          }
-        }
-      }
       if (!flow_graph->parsed_function().guarded_fields()->is_empty()) {
         if (field_invalidation_gen_at_start() !=
             isolate()->field_invalidation_gen()) {
-          code_is_valid = false;
-          if (trace_compiler) {
-            THR_Print("--> FAIL: Field invalidation.");
-          }
+          const ZoneGrowableArray<const Field*>& guarded_fields =
+              *flow_graph->parsed_function().guarded_fields();
+          bool field_conflict = CheckDisablingFields(thread(), guarded_fields);
+          if (field_conflict) {
+            code_is_valid = false;
+            if (trace_compiler) {
+              THR_Print("--> FAIL: Field invalidation.");
+            }
+         }
         }
       }
-      if (parsed_function()->HasDeferredPrefixes()) {
-        if (prefix_invalidation_gen_at_start() !=
-            isolate()->prefix_invalidation_gen()) {
-          code_is_valid = false;
-          if (trace_compiler) {
-            THR_Print("--> FAIL: Prefix invalidation.");
-          }
+      if (loading_invalidation_gen_at_start() !=
+          isolate()->loading_invalidation_gen()) {
+        code_is_valid = false;
+        if (trace_compiler) {
+          THR_Print("--> FAIL: Loading invalidation.");
         }
       }
       if (code_is_valid) {
         const bool is_osr = osr_id() != Compiler::kNoOSRDeoptId;
-        ASSERT(!is_osr);  // OSR is compiled in background.
+        ASSERT(!is_osr);  // OSR is not compiled in background.
         function.InstallOptimizedCode(code, is_osr);
+        code_was_installed = true;
       }
       if (function.usage_counter() < 0) {
         // Reset to 0 so that it can be recompiled if needed.
-        function.set_usage_counter(0);
+        if (code_is_valid) {
+          function.set_usage_counter(0);
+        } else {
+          // Trigger another optimization pass soon.
+          function.set_usage_counter(FLAG_optimization_counter_threshold - 100);
+        }
       }
     }
 
-    // Register code with the classes it depends on because of CHA and
-    // fields it depends on because of store guards, unless we cannot
-    // deopt.
-    for (intptr_t i = 0;
-         i < thread()->cha()->leaf_classes().length();
-         ++i) {
-      thread()->cha()->leaf_classes()[i]->RegisterCHACode(code);
-    }
-    const ZoneGrowableArray<const Field*>& guarded_fields =
-        *flow_graph->parsed_function().guarded_fields();
-    for (intptr_t i = 0; i < guarded_fields.length(); i++) {
-      const Field* field = guarded_fields[i];
-      field->RegisterDependentCode(code);
+    if (code_was_installed) {
+      // Register code with the classes it depends on because of CHA and
+      // fields it depends on because of store guards, unless we cannot
+      // deopt.
+      for (intptr_t i = 0;
+           i < thread()->cha()->leaf_classes().length();
+           ++i) {
+        thread()->cha()->leaf_classes()[i]->RegisterCHACode(code);
+      }
+      const ZoneGrowableArray<const Field*>& guarded_fields =
+          *flow_graph->parsed_function().guarded_fields();
+      for (intptr_t i = 0; i < guarded_fields.length(); i++) {
+        const Field* field = guarded_fields[i];
+        field->RegisterDependentCode(code);
+      }
     }
   } else {  // not optimized.
     if (function.ic_data_array() == Array::null()) {
@@ -580,7 +607,7 @@
   bool is_compiled = false;
   Zone* const zone = thread()->zone();
   NOT_IN_PRODUCT(
-      TimelineStream* compiler_timeline = isolate()->GetCompilerStream());
+      TimelineStream* compiler_timeline = Timeline::GetCompilerStream());
   CSTAT_TIMER_SCOPE(thread(), codegen_timer);
   HANDLESCOPE(thread());
 
@@ -630,7 +657,8 @@
 
           if (Compiler::IsBackgroundCompilation() &&
               (function.ic_data_array() == Array::null())) {
-            Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
+            Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+                "RestoreICDataMap: ICData array cleared.");
           }
           if (FLAG_print_ic_data_map) {
             for (intptr_t i = 0; i < ic_data_array->length(); i++) {
@@ -701,8 +729,12 @@
                                                  compiler_timeline,
                                                  "OptimizationPasses"));
         inline_id_to_function.Add(&function);
-        inline_id_to_token_pos.Add(function.token_pos());
-        // Top scope function has no caller (-1).
+        // We do not add the token position now because we don't know the
+        // position of the inlined call until later. A side effect of this
+        // is that the length of |inline_id_to_function| is always larger
+        // than the length of |inline_id_to_token_pos| by one.
+        // Top scope function has no caller (-1). We do this because we expect
+        // all token positions to be at an inlined call.
         caller_inline_id.Add(-1);
         CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
 
@@ -1034,6 +1066,11 @@
             // Do not Garbage collect during this stage and instead allow the
             // heap to grow.
             NoHeapGrowthControlScope no_growth_control;
+            if (!isolate()->background_compiler()->is_running()) {
+              // The background compiler is being stopped.
+              Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+                  "Background compilation is being stopped");
+            }
             FinalizeCompilation(&assembler, &graph_compiler, flow_graph);
           }
           if (isolate()->heap()->NeedsGarbageCollection()) {
@@ -1108,6 +1145,7 @@
                                        bool optimized,
                                        intptr_t osr_id) {
   ASSERT(!FLAG_precompiled_mode);
+  ASSERT(!optimized || function.was_compiled());
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
     Thread* const thread = Thread::Current();
@@ -1137,6 +1175,9 @@
     if (optimized) {
       INC_STAT(thread, num_functions_optimized, 1);
     }
+    // Makes sure no classes are loaded during parsing in background.
+    const intptr_t loading_invalidation_gen_at_start =
+        isolate->loading_invalidation_gen();
     {
       HANDLESCOPE(thread);
       const int64_t num_tokens_before = STAT_VALUE(thread, num_tokens_consumed);
@@ -1147,10 +1188,36 @@
                num_tokens_after - num_tokens_before);
     }
 
+
     CompileParsedFunctionHelper helper(parsed_function, optimized, osr_id);
+
+    if (Compiler::IsBackgroundCompilation()) {
+      if (isolate->IsTopLevelParsing() ||
+              (loading_invalidation_gen_at_start !=
+               isolate->loading_invalidation_gen())) {
+        // Loading occured while parsing. We need to abort here because state
+        // changed while compiling.
+        Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+            "Invalidated state during parsing because of script loading");
+      }
+    }
+
     const bool success = helper.Compile(pipeline);
-    if (!success) {
+    if (success) {
+      if (!optimized) {
+        function.set_was_compiled(true);
+      }
+    } else {
       if (optimized) {
+        if (Compiler::IsBackgroundCompilation()) {
+          // Try again later, background compilation may abort because of
+          // state change during compilation.
+          if (FLAG_trace_compiler) {
+            THR_Print("Aborted background compilation: %s\n",
+                function.ToFullyQualifiedCString());
+          }
+          return Error::null();
+        }
         // Optimizer bailed out. Disable optimizations and never try again.
         if (trace_compiler) {
           THR_Print("--> disabling optimizations for '%s'\n",
@@ -1203,9 +1270,18 @@
     Thread* const thread = Thread::Current();
     StackZone stack_zone(thread);
     Error& error = Error::Handle();
-    // We got an error during compilation.
+    // We got an error during compilation or it is a bailout from background
+    // compilation (e.g., during parsing with EnsureIsFinalized).
     error = thread->sticky_error();
     thread->clear_sticky_error();
+    if (error.raw() == Object::background_compilation_error().raw()) {
+      // Exit compilation, retry it later.
+      if (FLAG_trace_bailout) {
+        THR_Print("Aborted background compilation: %s\n",
+            function.ToFullyQualifiedCString());
+      }
+      return Error::null();
+    }
     // Unoptimized compilation or precompilation may encounter compile-time
     // errors, but regular optimized compilation should not.
     ASSERT(!optimized);
@@ -1226,8 +1302,10 @@
   }
 #endif
   Isolate* isolate = thread->isolate();
+NOT_IN_PRODUCT(
   VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId);
-  TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "Function", function);
+  TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "CompileFunction", function);
+)  // !PRODUCT
 
   if (!isolate->compilation_allowed()) {
     FATAL3("Precompilation missed function %s (%s, %s)\n",
@@ -1282,9 +1360,13 @@
 RawError* Compiler::CompileOptimizedFunction(Thread* thread,
                                              const Function& function,
                                              intptr_t osr_id) {
+NOT_IN_PRODUCT(
   VMTagScope tagScope(thread, VMTag::kCompileOptimizedTagId);
-  TIMELINE_FUNCTION_COMPILATION_DURATION(thread,
-                                         "OptimizedFunction", function);
+  const char* event_name = IsBackgroundCompilation()
+      ? "BackgroundCompileOptimizedFunction"
+      : "CompileOptimizedFunction";
+  TIMELINE_FUNCTION_COMPILATION_DURATION(thread, event_name, function);
+)  // !PRODUCT
 
   // Optimization must happen in non-mutator/Dart thread if background
   // compilation is on. OSR compilation still occurs in the main thread.
@@ -1335,13 +1417,20 @@
   ASSERT(var_descs.IsNull());
   // IsIrregexpFunction have eager var descriptors generation.
   ASSERT(!function.IsIrregexpFunction());
-  // Parser should not produce any errors, therefore no LongJumpScope needed.
-  Parser::ParseFunction(parsed_function);
-  parsed_function->AllocateVariables();
-  var_descs = parsed_function->node_sequence()->scope()->
-      GetVarDescriptors(function);
-  ASSERT(!var_descs.IsNull());
-  code.set_var_descriptors(var_descs);
+  // In background compilation, parser can produce 'errors": bailouts
+  // if state changed while compiling in background.
+  LongJumpScope jump;
+  if (setjmp(*jump.Set()) == 0) {
+    Parser::ParseFunction(parsed_function);
+    parsed_function->AllocateVariables();
+    var_descs = parsed_function->node_sequence()->scope()->
+        GetVarDescriptors(function);
+    ASSERT(!var_descs.IsNull());
+    code.set_var_descriptors(var_descs);
+  } else {
+    // Only possible with background compilation.
+    ASSERT(Compiler::IsBackgroundCompilation());
+  }
 }
 
 
@@ -1445,14 +1534,14 @@
     // Function fits the bill.
     const char* kEvalConst = "eval_const";
     const Function& func = Function::ZoneHandle(Function::New(
-        String::Handle(Symbols::New(kEvalConst)),
+        String::Handle(Symbols::New(thread, kEvalConst)),
         RawFunction::kRegularFunction,
         true,  // static function
         false,  // not const function
         false,  // not abstract
         false,  // not external
         false,  // not native
-        Class::Handle(Type::Handle(Type::Function()).type_class()),
+        Class::Handle(Type::Handle(Type::DartFunctionType()).type_class()),
         fragment->token_pos()));
 
     func.set_result_type(Object::dynamic_type());
@@ -1493,9 +1582,18 @@
 }
 
 
-void Compiler::AbortBackgroundCompilation(intptr_t deopt_id) {
+void Compiler::AbortBackgroundCompilation(intptr_t deopt_id, const char* msg) {
   if (FLAG_trace_compiler) {
-    THR_Print("ABORT background compilation.");
+    THR_Print("ABORT background compilation: %s\n", msg);
+  }
+  TimelineStream* stream = Timeline::GetCompilerStream();
+  ASSERT(stream != NULL);
+  TimelineEvent* event = stream->StartEvent();
+  if (event != NULL) {
+    event->Instant("AbortBackgroundCompilation");
+    event->SetNumArguments(1);
+    event->CopyArgument(0, "reason", msg);
+    event->Complete();
   }
   ASSERT(Compiler::IsBackgroundCompilation());
   Thread::Current()->long_jump_base()->Jump(
@@ -1512,7 +1610,8 @@
     ASSERT(Thread::Current()->IsMutatorThread());
   }
 
-  ~QueueElement() {
+  virtual ~QueueElement() {
+    next_ = NULL;
     function_ = Function::null();
   }
 
@@ -1540,12 +1639,8 @@
 class BackgroundCompilationQueue {
  public:
   BackgroundCompilationQueue() : first_(NULL), last_(NULL) {}
-  ~BackgroundCompilationQueue() {
-    while (!IsEmpty()) {
-      QueueElement* e = Remove();
-      delete e;
-    }
-    ASSERT((first_ == NULL) && (last_ == NULL));
+  virtual ~BackgroundCompilationQueue() {
+    Clear();
   }
 
   void VisitObjectPointers(ObjectPointerVisitor* visitor) {
@@ -1561,13 +1656,16 @@
 
   void Add(QueueElement* value) {
     ASSERT(value != NULL);
+    ASSERT(value->next() == NULL);
     if (first_ == NULL) {
       first_ = value;
+      ASSERT(last_ == NULL);
     } else {
+      ASSERT(last_ != NULL);
       last_->set_next(value);
     }
-    value->set_next(NULL);
     last_ = value;
+    ASSERT(first_ != NULL && last_ != NULL);
   }
 
   QueueElement* Peek() const {
@@ -1604,6 +1702,14 @@
     return false;
   }
 
+  void Clear() {
+    while (!IsEmpty()) {
+      QueueElement* e = Remove();
+      delete e;
+    }
+    ASSERT((first_ == NULL) && (last_ == NULL));
+  }
+
  private:
   QueueElement* first_;
   QueueElement* last_;
@@ -1620,11 +1726,22 @@
 }
 
 
+// Fields all deleted in ::Stop; here clear them.
+BackgroundCompiler::~BackgroundCompiler() {
+  isolate_ = NULL;
+  running_ = false;
+  done_ = NULL;
+  queue_monitor_ = NULL;
+  done_monitor_ = NULL;
+  function_queue_ = NULL;
+}
+
+
 void BackgroundCompiler::Run() {
   while (running_) {
     // Maybe something is already in the queue, check first before waiting
     // to be notified.
-    bool result = Thread::EnterIsolateAsHelper(isolate_);
+    bool result = Thread::EnterIsolateAsHelper(isolate_, Thread::kCompilerTask);
     ASSERT(result);
     {
       Thread* thread = Thread::Current();
@@ -1632,8 +1749,12 @@
       Zone* zone = stack_zone.GetZone();
       HANDLESCOPE(thread);
       Function& function = Function::Handle(zone);
-      function = function_queue()->PeekFunction();
+      { MonitorLocker ml(queue_monitor_);
+        function = function_queue()->PeekFunction();
+      }
       while (running_ && !function.IsNull()) {
+        // Check that we have aggregated and cleared the stats.
+        ASSERT(thread->compiler_stats()->IsCleared());
         const Error& error = Error::Handle(zone,
             Compiler::CompileOptimizedFunction(thread,
                                                function,
@@ -1643,9 +1764,28 @@
         // unoptimized code. Any issues while optimizing are flagged by
         // making the result invalid.
         ASSERT(error.IsNull());
-        QueueElement* qelem = function_queue()->Remove();
-        delete qelem;
-        function = function_queue()->PeekFunction();
+#ifndef PRODUCT
+        Isolate* isolate = thread->isolate();
+        // We cannot aggregate stats if isolate is shutting down.
+        if (isolate->HasMutatorThread()) {
+          isolate->aggregate_compiler_stats()->Add(*thread->compiler_stats());
+        }
+        thread->compiler_stats()->Clear();
+#endif  // PRODUCT
+
+        QueueElement* qelem = NULL;
+        { MonitorLocker ml(queue_monitor_);
+          if (function_queue()->IsEmpty()) {
+            // We are shutting down, queue was cleared.
+            function = Function::null();
+          } else {
+            qelem = function_queue()->Remove();
+            function = function_queue()->PeekFunction();
+          }
+        }
+        if (qelem != NULL) {
+          delete qelem;
+        }
       }
     }
     Thread::ExitIsolateAsHelper();
@@ -1670,6 +1810,7 @@
 void BackgroundCompiler::CompileOptimized(const Function& function) {
   ASSERT(Thread::Current()->IsMutatorThread());
   MonitorLocker ml(queue_monitor_);
+  ASSERT(running_);
   if (function_queue()->ContainsObj(function)) {
     return;
   }
@@ -1684,8 +1825,8 @@
 }
 
 
-void BackgroundCompiler::Stop(BackgroundCompiler* task) {
-  ASSERT(Isolate::Current()->background_compiler() == task);
+void BackgroundCompiler::Stop(Isolate* isolate) {
+  BackgroundCompiler* task = isolate->background_compiler();
   ASSERT(task != NULL);
   BackgroundCompilationQueue* function_queue = task->function_queue();
 
@@ -1694,8 +1835,9 @@
   bool* task_done = task->done_;
   // Wake up compiler task and stop it.
   {
-    MonitorLocker ml(task->queue_monitor_);
+    MonitorLocker ml(queue_monitor);
     task->running_ = false;
+    function_queue->Clear();
     // 'task' will be deleted by thread pool.
     task = NULL;
     ml.Notify();   // Stop waiting for the queue.
@@ -1711,7 +1853,7 @@
   delete done_monitor;
   delete queue_monitor;
   delete function_queue;
-  Isolate::Current()->set_background_compiler(NULL);
+  isolate->set_background_compiler(NULL);
 }
 
 
@@ -1721,10 +1863,12 @@
   // 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());
 
@@ -1835,7 +1979,7 @@
 }
 
 
-void Compiler::AbortBackgroundCompilation(intptr_t deopt_id) {
+void Compiler::AbortBackgroundCompilation(intptr_t deopt_id, const char* msg) {
   UNREACHABLE();
 }
 
@@ -1850,7 +1994,7 @@
 }
 
 
-void BackgroundCompiler::Stop(BackgroundCompiler* task) {
+void BackgroundCompiler::Stop(Isolate* isolate) {
   UNREACHABLE();
 }
 
diff --git a/runtime/vm/compiler.h b/runtime/vm/compiler.h
index 01822ac..2f2eb1c 100644
--- a/runtime/vm/compiler.h
+++ b/runtime/vm/compiler.h
@@ -146,7 +146,8 @@
   // because the mutator thread changed the state (e.g., deoptimization,
   // deferred loading). The background compilation may retry to compile
   // the same function later.
-  static void AbortBackgroundCompilation(intptr_t deopt_id);
+  static void AbortBackgroundCompilation(intptr_t deopt_id,
+                                         const char* msg = "");
 };
 
 
@@ -156,9 +157,12 @@
 // No OSR compilation in the background compiler.
 class BackgroundCompiler : public ThreadPool::Task {
  public:
+  virtual ~BackgroundCompiler();
+
   static void EnsureInit(Thread* thread);
 
-  static void Stop(BackgroundCompiler* task);
+  // Stops background compiler of the given isolate.
+  static void Stop(Isolate* isolate);
 
   // Call to optimize a function in the background, enters the function in the
   // compilation queue.
@@ -167,6 +171,7 @@
   void VisitPointers(ObjectPointerVisitor* visitor);
 
   BackgroundCompilationQueue* function_queue() const { return function_queue_; }
+  bool is_running() const { return running_; }
 
  private:
   explicit BackgroundCompiler(Isolate* isolate);
diff --git a/runtime/vm/compiler_stats.cc b/runtime/vm/compiler_stats.cc
index 7905ed8..d23e6f0 100644
--- a/runtime/vm/compiler_stats.cc
+++ b/runtime/vm/compiler_stats.cc
@@ -20,9 +20,8 @@
 
 class TokenStreamVisitor : public ObjectVisitor {
  public:
-  TokenStreamVisitor(Isolate* isolate, CompilerStats* compiler_stats)
-      : ObjectVisitor(isolate),
-        obj_(Object::Handle()),
+  explicit TokenStreamVisitor(CompilerStats* compiler_stats)
+      : obj_(Object::Handle()),
         stats_(compiler_stats) {
   }
 
@@ -52,38 +51,15 @@
 
 CompilerStats::CompilerStats(Isolate* isolate)
     : isolate_(isolate),
-      parser_timer(true, "parser timer"),
-      scanner_timer(true, "scanner timer"),
-      codegen_timer(true, "codegen timer"),
-      graphbuilder_timer(true, "flow graph builder timer"),
-      ssa_timer(true, "flow graph SSA timer"),
-      graphinliner_timer(true, "flow graph inliner timer"),
-      graphinliner_parse_timer(true, "inliner parsing timer"),
-      graphinliner_build_timer(true, "inliner building timer"),
-      graphinliner_ssa_timer(true, "inliner SSA timer"),
-      graphinliner_opt_timer(true, "inliner optimization timer"),
-      graphinliner_subst_timer(true, "inliner substitution timer"),
-      graphoptimizer_timer(true, "flow graph optimizer timer"),
-      graphcompiler_timer(true, "flow graph compiler timer"),
-      codefinalizer_timer(true, "code finalization timer"),
-      num_tokens_total(0),
-      num_tokens_scanned(0),
-      num_tokens_consumed(0),
-      num_cached_consts(0),
-      num_const_cache_hits(0),
-      num_classes_parsed(0),
-      num_class_tokens(0),
-      num_functions_parsed(0),
-      num_functions_compiled(0),
-      num_functions_optimized(0),
-      num_func_tokens_compiled(0),
-      num_implicit_final_getters(0),
-      num_method_extractors(0),
-      src_length(0),
-      total_code_size(0),
-      total_instr_size(0),
-      pc_desc_size(0),
-      vardesc_size(0),
+#define INITIALIZE_TIMER(timer_name, description)                              \
+      timer_name(true, description),
+STAT_TIMERS(INITIALIZE_TIMER)
+#undef INITIALIZE_TIMER
+
+#define INITIALIZE_COUNTERS(counter_name)                                      \
+      counter_name(0),
+STAT_COUNTERS(INITIALIZE_COUNTERS)
+#undef INITIALIZE_COUNTERS
       text(NULL),
       use_benchmark_output(false) {
 }
@@ -91,6 +67,54 @@
 
 #ifndef PRODUCT
 
+
+// Used to aggregate stats. Must be atomic.
+void CompilerStats::Add(const CompilerStats& other) {
+#define ADD_TOTAL(timer_name, literal)                                         \
+  timer_name.AddTotal(other.timer_name);
+
+  STAT_TIMERS(ADD_TOTAL)
+#undef ADD_TOTAL
+
+#define ADD_COUNTER(counter_name)                                              \
+  AtomicOperations::IncrementInt64By(&counter_name, other.counter_name);
+
+  STAT_COUNTERS(ADD_COUNTER)
+#undef ADD_COUNTER
+}
+
+
+void CompilerStats::Clear() {
+#define CLEAR_TIMER(timer_name, literal)                                       \
+  timer_name.Reset();
+
+  STAT_TIMERS(CLEAR_TIMER)
+#undef CLEAR_TIMER
+
+#define CLEAR_COUNTER(counter_name)                                            \
+  counter_name = 0;
+
+  STAT_COUNTERS(CLEAR_COUNTER)
+#undef CLEAR_COUNTER
+}
+
+
+bool CompilerStats::IsCleared() const {
+#define CHECK_TIMERS(timer_name, literal)                                      \
+  if (!timer_name.IsReset()) return false;
+
+  STAT_TIMERS(CHECK_TIMERS)
+#undef CHECK_TIMERS
+
+#define CHECK_COUNTERS(counter_name)                                           \
+  if (counter_name != 0) return false;
+
+  STAT_COUNTERS(CHECK_COUNTERS)
+#undef CHECK_COUNTERS
+  return true;
+}
+
+
 // This function is used as a callback in the log object to which the
 // compiler stats are printed. It will be called only once, to print
 // the accumulated text when all of the compiler stats values are
@@ -99,7 +123,7 @@
 static void PrintToStats(const char* format, ...) {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
-  CompilerStats* stats = isolate->compiler_stats();
+  CompilerStats* stats = isolate->aggregate_compiler_stats();
   Zone* zone = thread->zone();
   ASSERT(stats != NULL);
   va_list args;
@@ -113,7 +137,7 @@
   // Traverse the heap and compute number of tokens in all
   // TokenStream objects.
   num_tokens_total = 0;
-  TokenStreamVisitor visitor(isolate_, this);
+  TokenStreamVisitor visitor(this);
   isolate_->heap()->IterateObjects(&visitor);
   Dart::vm_isolate()->heap()->IterateObjects(&visitor);
 }
diff --git a/runtime/vm/compiler_stats.h b/runtime/vm/compiler_stats.h
index 9b9e67b..5ed7537 100644
--- a/runtime/vm/compiler_stats.h
+++ b/runtime/vm/compiler_stats.h
@@ -6,6 +6,7 @@
 #define VM_COMPILER_STATS_H_
 
 #include "vm/allocation.h"
+#include "vm/atomic.h"
 #include "vm/flags.h"
 #include "vm/isolate.h"
 #include "vm/timer.h"
@@ -13,10 +14,47 @@
 
 namespace dart {
 
-
 DECLARE_FLAG(bool, compiler_stats);
 DECLARE_FLAG(bool, compiler_benchmark);
 
+
+#define STAT_TIMERS(V)                                                         \
+  V(parser_timer, "parser timer")                                              \
+  V(scanner_timer, "scanner timer")                                            \
+  V(codegen_timer, "codegen timer")                                            \
+  V(graphbuilder_timer, "flow graph builder timer")                            \
+  V(ssa_timer, "flow graph SSA timer")                                         \
+  V(graphinliner_timer, "flow graph inliner timer")                            \
+  V(graphinliner_parse_timer, "inliner parsing timer")                         \
+  V(graphinliner_build_timer, "inliner building timer")                        \
+  V(graphinliner_ssa_timer, "inliner SSA timer")                               \
+  V(graphinliner_opt_timer, "inliner optimization timer")                      \
+  V(graphinliner_subst_timer, "inliner substitution timer")                    \
+  V(graphoptimizer_timer, "flow graph optimizer timer")                        \
+  V(graphcompiler_timer, "flow graph compiler timer")                          \
+  V(codefinalizer_timer, "code finalization timer")                            \
+
+
+#define STAT_COUNTERS(V)                                                       \
+  V(num_tokens_total)                                                          \
+  V(num_tokens_scanned)                                                        \
+  V(num_tokens_consumed)                                                       \
+  V(num_cached_consts)                                                         \
+  V(num_const_cache_hits)                                                      \
+  V(num_classes_parsed)                                                        \
+  V(num_class_tokens)                                                          \
+  V(num_functions_parsed)                                                      \
+  V(num_functions_compiled)                                                    \
+  V(num_functions_optimized)                                                   \
+  V(num_func_tokens_compiled)                                                  \
+  V(num_implicit_final_getters)                                                \
+  V(num_method_extractors)                                                     \
+  V(src_length)                                                                \
+  V(total_code_size)                                                           \
+  V(total_instr_size)                                                          \
+  V(pc_desc_size)                                                              \
+  V(vardesc_size)                                                              \
+
 class CompilerStats {
  public:
   explicit CompilerStats(Isolate* isolate);
@@ -24,6 +62,8 @@
 
   Isolate* isolate_;
 
+  // We could use STAT_TIMERS and STAT_COUNTERS to declare fields, but then
+  // we would be losing the comments.
   Timer parser_timer;         // Cumulative runtime of parser.
   Timer scanner_timer;        // Cumulative runtime of scanner.
   Timer codegen_timer;        // Cumulative runtime of code generator.
@@ -63,28 +103,38 @@
   char* text;
   bool use_benchmark_output;
 
-  // Update stats that are computed, e.g. token count.
-  void Update();
 
   void EnableBenchmark();
   char* BenchmarkOutput();
   char* PrintToZone();
+
+  // Used to aggregate stats.
+  void Add(const CompilerStats& other);
+  void Clear();
+
+  bool IsCleared() const;
+
+ private:
+  // Update stats that are computed, e.g. token count.
+  void Update();
 };
 
+// Make increment atomic in case it occurs in parallel with aggregation from
+// other thread.
 #define INC_STAT(thread, counter, incr)                                        \
   if (FLAG_support_compiler_stats && FLAG_compiler_stats) {                    \
-    MutexLocker ml((thread)->isolate()->mutex());                              \
-    (thread)->isolate()->compiler_stats()->counter += (incr);                  \
+    AtomicOperations::IncrementInt64By(                                        \
+        &(thread)->compiler_stats()->counter, (incr));                         \
   }
 
 #define STAT_VALUE(thread, counter)                                            \
   ((FLAG_support_compiler_stats && FLAG_compiler_stats) ?                      \
-      (thread)->isolate()->compiler_stats()->counter : 0)
+      (thread)->compiler_stats()->counter : 0)
 
 #define CSTAT_TIMER_SCOPE(thr, t)                                              \
   TimerScope timer(FLAG_support_compiler_stats && FLAG_compiler_stats,         \
       (FLAG_support_compiler_stats && FLAG_compiler_stats) ?                   \
-      &((thr)->isolate()->compiler_stats()->t) : NULL,                         \
+      &((thr)->compiler_stats()->t) : NULL,                                    \
       thr);
 
 
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc
index 8dd7c2f..f2e138c 100644
--- a/runtime/vm/compiler_test.cc
+++ b/runtime/vm/compiler_test.cc
@@ -47,7 +47,7 @@
   EXPECT(CompilerTest::TestCompileScript(lib, script));
   EXPECT(ClassFinalizer::ProcessPendingClasses());
   Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("A"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   EXPECT(!cls.IsNull());
   String& function_foo_name = String::Handle(String::New("foo"));
   Function& function_foo =
@@ -87,7 +87,7 @@
   EXPECT(CompilerTest::TestCompileScript(lib, script));
   EXPECT(ClassFinalizer::ProcessPendingClasses());
   Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("A"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   EXPECT(!cls.IsNull());
   String& function_foo_name = String::Handle(String::New("foo"));
   Function& func =
@@ -109,7 +109,7 @@
   while (!func.HasOptimizedCode()) {
     ml.WaitWithSafepointCheck(thread, 1);
   }
-  BackgroundCompiler::Stop(isolate->background_compiler());
+  BackgroundCompiler::Stop(isolate);
 }
 
 
@@ -129,7 +129,7 @@
   RawLibrary* raw_library = Library::RawCast(Api::UnwrapHandle(lib));
   Library& lib_handle = Library::ZoneHandle(raw_library);
   Class& cls = Class::Handle(
-      lib_handle.LookupClass(String::Handle(Symbols::New("A"))));
+      lib_handle.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   EXPECT(!cls.IsNull());
 
   Zone* zone = thread->zone();
@@ -174,7 +174,9 @@
   String& expr_text = String::Handle();
   expr_text = String::New("apa + ' ${calc(10)}' + dot");
   Object& val = Object::Handle();
-  val = Instance::Cast(obj).Evaluate(expr_text,
+  const Class& receiver_cls = Class::Handle(obj.clazz());
+  val = Instance::Cast(obj).Evaluate(receiver_cls,
+                                     expr_text,
                                      Array::empty_array(),
                                      Array::empty_array());
   EXPECT(!val.IsNull());
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index fa21b0f..b8e7c2a 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -323,7 +323,7 @@
   // class ids. Otherwise LICM might potentially hoist incorrect code.
   const Object& value = instr->value()->definition()->constant_value();
   if (IsConstant(value) &&
-      CheckClassInstr::IsImmutableClassId(value.GetClassId())) {
+      !Field::IsExternalizableCid(value.GetClassId())) {
     SetValue(instr, value);
   } else {
     SetValue(instr, non_constant_);
@@ -805,7 +805,7 @@
   const Object& object = instr->object()->definition()->constant_value();
   if (IsConstant(object)) {
     cid = object.GetClassId();
-    if (CheckClassInstr::IsImmutableClassId(cid)) {
+    if (!Field::IsExternalizableCid(cid)) {
       SetValue(instr, Smi::ZoneHandle(Z, Smi::New(cid)));
       return;
     }
@@ -937,6 +937,11 @@
 }
 
 
+void ConstantPropagator::VisitCheckedSmiOp(CheckedSmiOpInstr* instr) {
+  SetValue(instr, non_constant_);
+}
+
+
 void ConstantPropagator::VisitBinarySmiOp(BinarySmiOpInstr* instr) {
   VisitBinaryIntegerOp(instr);
 }
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index 24110b4..5764745 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -246,6 +246,7 @@
 const Register ARGS_DESC_REG = R4;
 const Register CODE_REG = R6;
 const Register THR = R10;  // Caches current thread in generated code.
+const Register CALLEE_SAVED_TEMP = R6;
 
 // R15 encodes APSR in the vmrs instruction.
 const Register APSR = R15;
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index 7a0a18b..870bb34 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -117,7 +117,8 @@
 const Register ICREG = R5;  // IC data register.
 const Register ARGS_DESC_REG = R4;  // Arguments descriptor register.
 const Register THR = R26;  // Caches current thread in generated code.
-
+const Register CALLEE_SAVED_TEMP = R19;
+const Register CALLEE_SAVED_TEMP2 = R20;
 
 // Exception object is passed in this register to the catch handlers when an
 // exception is thrown.
diff --git a/runtime/vm/constants_ia32.h b/runtime/vm/constants_ia32.h
index 466dd42..adf988a 100644
--- a/runtime/vm/constants_ia32.h
+++ b/runtime/vm/constants_ia32.h
@@ -68,7 +68,8 @@
 const Register ICREG = ECX;  // IC data register.
 const Register ARGS_DESC_REG = EDX;  // Arguments descriptor register.
 const Register THR = ESI;  // Caches current thread in generated code.
-
+const Register CALLEE_SAVED_TEMP = EBX;
+const Register CALLEE_SAVED_TEMP2 = EDI;
 
 // Exception object is passed in this register to the catch handlers when an
 // exception is thrown.
diff --git a/runtime/vm/constants_mips.h b/runtime/vm/constants_mips.h
index ccf437a..9a79f53 100644
--- a/runtime/vm/constants_mips.h
+++ b/runtime/vm/constants_mips.h
@@ -186,7 +186,7 @@
 const Register ICREG = S5;  // IC data register.
 const Register ARGS_DESC_REG = S4;
 const Register THR = S3;  // Caches current thread in generated code.
-
+const Register CALLEE_SAVED_TEMP = S5;
 
 // The code that generates a comparison can be far away from the code that
 // generates the branch that uses the result of that comparison. In this case,
@@ -440,9 +440,9 @@
   COP1_SQRT = 0x04,
   COP1_MOV = 0x06,
   COP1_NEG = 0x07,
+  COP1_TRUNC_W = 0x0d,
   COP1_CVT_S = 0x20,
   COP1_CVT_D = 0x21,
-  COP1_CVT_W = 0x24,
   COP1_C_F = 0x30,
   COP1_C_UN = 0x31,
   COP1_C_EQ = 0x32,
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index 9c92faa..0cfee29 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -93,7 +93,7 @@
 const Register ARGS_DESC_REG = R10;  // Arguments descriptor register.
 const Register CODE_REG = R12;
 const Register THR = R14;  // Caches current thread in generated code.
-
+const Register CALLEE_SAVED_TEMP = R13;
 
 // Exception object is passed in this register to the catch handlers when an
 // exception is thrown.
diff --git a/runtime/vm/coverage.cc b/runtime/vm/coverage.cc
deleted file mode 100644
index 2e85c3d..0000000
--- a/runtime/vm/coverage.cc
+++ /dev/null
@@ -1,313 +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.
-
-#include "vm/coverage.h"
-
-#include "include/dart_api.h"
-
-#include "vm/compiler.h"
-#include "vm/isolate.h"
-#include "vm/json_stream.h"
-#include "vm/longjump.h"
-#include "vm/object.h"
-#include "vm/object_store.h"
-
-namespace dart {
-
-DEFINE_FLAG(charp, coverage_dir, NULL,
-            "Enable writing coverage data into specified directory.");
-
-
-class CoverageFilterAll : public CoverageFilter {
- public:
-  bool ShouldOutputCoverageFor(const Library& lib,
-                               const Script& script,
-                               const Class& cls,
-                               const Function& func) const {
-    return true;
-  }
-};
-
-
-// map[token_pos] -> line-number.
-static void ComputeTokenPosToLineNumberMap(const Script& script,
-                                           GrowableArray<intptr_t>* map) {
-  const TokenStream& tkns = TokenStream::Handle(script.tokens());
-  const intptr_t len = ExternalTypedData::Handle(tkns.GetStream()).Length();
-  map->SetLength(len);
-#if defined(DEBUG)
-  for (intptr_t i = 0; i < len; i++) {
-    (*map)[i] = -1;
-  }
-#endif
-  TokenStream::Iterator tkit(tkns,
-                             TokenPosition::kMinSource,
-                             TokenStream::Iterator::kAllTokens);
-  intptr_t cur_line = script.line_offset() + 1;
-  while (tkit.CurrentTokenKind() != Token::kEOS) {
-    const intptr_t position = tkit.CurrentPosition().Pos();
-    (*map)[position] = cur_line;
-    if (tkit.CurrentTokenKind() == Token::kNEWLINE) {
-      cur_line++;
-    }
-    tkit.Advance();
-  }
-}
-
-
-void CodeCoverage::CompileAndAdd(const Function& function,
-                                 const JSONArray& hits_or_sites,
-                                 const GrowableArray<intptr_t>& pos_to_line,
-                                 bool as_call_sites) {
-  if (!FLAG_support_coverage) {
-    return;
-  }
-  // If the function should not be compiled for coverage analysis, then just
-  // skip this method.
-  // TODO(iposva): Maybe we should skip synthesized methods in general too.
-  if (function.is_abstract() || function.IsRedirectingFactory()) {
-    return;
-  }
-  if (function.IsNonImplicitClosureFunction() &&
-      (function.context_scope() == ContextScope::null())) {
-    // TODO(iposva): This can arise if we attempt to compile an inner function
-    // before we have compiled its enclosing function or if the enclosing
-    // function failed to compile.
-    return;
-  }
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  // Make sure we have the unoptimized code for this function available.
-  if (Compiler::EnsureUnoptimizedCode(thread, function) != Error::null()) {
-    // Ignore the error and this function entirely.
-    return;
-  }
-  const Code& code = Code::Handle(zone, function.unoptimized_code());
-  ASSERT(!code.IsNull());
-
-  // Print the hit counts for all IC datas.
-  ZoneGrowableArray<const ICData*>* ic_data_array =
-      new(zone) ZoneGrowableArray<const ICData*>();
-  function.RestoreICDataMap(ic_data_array, false /* clone ic-data */);
-  const PcDescriptors& descriptors = PcDescriptors::Handle(
-      zone, code.pc_descriptors());
-
-  const TokenPosition begin_pos = function.token_pos();
-  const TokenPosition end_pos = function.end_token_pos();
-  intptr_t last_line = -1;
-  intptr_t last_count = 0;
-  // Only IC based calls have counting.
-  PcDescriptors::Iterator iter(descriptors,
-      RawPcDescriptors::kIcCall | RawPcDescriptors::kUnoptStaticCall);
-  while (iter.MoveNext()) {
-    HANDLESCOPE(thread);
-    const ICData* ic_data = (*ic_data_array)[iter.DeoptId()];
-    if (!ic_data->IsNull()) {
-      const TokenPosition token_pos = iter.TokenPos();
-      // Filter out descriptors that do not map to tokens in the source code.
-      if ((token_pos < begin_pos) || (token_pos > end_pos)) {
-        continue;
-      }
-      if (as_call_sites) {
-        bool is_static_call = iter.Kind() == RawPcDescriptors::kUnoptStaticCall;
-        ic_data->PrintToJSONArray(hits_or_sites,
-                                  token_pos,
-                                  is_static_call);
-      } else {
-        intptr_t line = pos_to_line[token_pos.Pos()];
-#if defined(DEBUG)
-        const Script& script = Script::Handle(zone, function.script());
-        intptr_t test_line = -1;
-        script.GetTokenLocation(token_pos, &test_line, NULL);
-        ASSERT(test_line == line);
-#endif
-        // Merge hit data where possible.
-        if (last_line == line) {
-          last_count += ic_data->AggregateCount();
-        } else {
-          if ((last_line != -1)) {
-            hits_or_sites.AddValue(last_line);
-            hits_or_sites.AddValue(last_count);
-          }
-          last_count = ic_data->AggregateCount();
-          last_line = line;
-        }
-      }
-    }
-  }
-  // Write last hit value if needed.
-  if (!as_call_sites && (last_line != -1)) {
-    hits_or_sites.AddValue(last_line);
-    hits_or_sites.AddValue(last_count);
-  }
-}
-
-
-void CodeCoverage::PrintClass(const Library& lib,
-                              const Class& cls,
-                              const JSONArray& jsarr,
-                              CoverageFilter* filter,
-                              bool as_call_sites) {
-  if (!FLAG_support_coverage) {
-    return;
-  }
-  Thread* thread = Thread::Current();
-  if (cls.EnsureIsFinalized(thread) != Error::null()) {
-    // Only classes that have been finalized do have a meaningful list of
-    // functions.
-    return;
-  }
-  Array& functions = Array::Handle(cls.functions());
-  ASSERT(!functions.IsNull());
-  Function& function = Function::Handle();
-  Script& script = Script::Handle();
-  String& saved_url = String::Handle();
-  String& url = String::Handle();
-  GrowableArray<intptr_t> pos_to_line;
-  int i = 0;
-  while (i < functions.Length()) {
-    HANDLESCOPE(thread);
-    function ^= functions.At(i);
-    script = function.script();
-    saved_url = script.url();
-    if (!filter->ShouldOutputCoverageFor(lib, script, cls, function)) {
-      i++;
-      continue;
-    }
-    if (!as_call_sites) {
-      ComputeTokenPosToLineNumberMap(script, &pos_to_line);
-    }
-    JSONObject jsobj(&jsarr);
-    jsobj.AddProperty("source", saved_url.ToCString());
-    jsobj.AddProperty("script", script);
-    JSONArray hits_or_sites(&jsobj, as_call_sites ? "callSites" : "hits");
-
-    // We stay within this loop while we are seeing functions from the same
-    // source URI.
-    while (i < functions.Length()) {
-      function ^= functions.At(i);
-      script = function.script();
-      url = script.url();
-      if (!url.Equals(saved_url)) {
-        pos_to_line.Clear();
-        break;
-      }
-      if (!filter->ShouldOutputCoverageFor(lib, script, cls, function)) {
-        i++;
-        continue;
-      }
-      CompileAndAdd(function, hits_or_sites, pos_to_line, as_call_sites);
-      i++;
-    }
-  }
-
-  // TODO(turnidge): This looks like it prints closures many, many times.
-  const GrowableObjectArray& closures = GrowableObjectArray::Handle(
-      thread->isolate()->object_store()->closure_functions());
-  pos_to_line.Clear();
-  // We need to keep rechecking the length of the closures array, as handling
-  // a closure potentially adds new entries to the end.
-  i = 0;
-  while (i < closures.Length()) {
-    HANDLESCOPE(thread);
-    function ^= closures.At(i);
-    if (function.Owner() != cls.raw()) {
-      i++;
-      continue;
-    }
-    script = function.script();
-    saved_url = script.url();
-    if (!filter->ShouldOutputCoverageFor(lib, script, cls, function)) {
-      i++;
-      continue;
-    }
-    ComputeTokenPosToLineNumberMap(script, &pos_to_line);
-    JSONObject jsobj(&jsarr);
-    jsobj.AddProperty("source", saved_url.ToCString());
-    jsobj.AddProperty("script", script);
-    JSONArray hits_or_sites(&jsobj, as_call_sites ? "callSites" : "hits");
-
-    // We stay within this loop while we are seeing functions from the same
-    // source URI.
-    while (i < closures.Length()) {
-      function ^= closures.At(i);
-      script = function.script();
-      url = script.url();
-      if (!url.Equals(saved_url)) {
-        pos_to_line.Clear();
-        break;
-      }
-      CompileAndAdd(function, hits_or_sites, pos_to_line, as_call_sites);
-      i++;
-    }
-  }
-}
-
-
-void CodeCoverage::Write(Thread* thread) {
-  if (!FLAG_support_coverage) {
-    return;
-  }
-  if (FLAG_coverage_dir == NULL) {
-    return;
-  }
-
-  Dart_FileOpenCallback file_open = Isolate::file_open_callback();
-  Dart_FileWriteCallback file_write = Isolate::file_write_callback();
-  Dart_FileCloseCallback file_close = Isolate::file_close_callback();
-  if ((file_open == NULL) || (file_write == NULL) || (file_close == NULL)) {
-    return;
-  }
-
-  JSONStream stream;
-  PrintJSON(thread, &stream, NULL, false);
-
-  intptr_t pid = OS::ProcessId();
-  char* filename = OS::SCreate(thread->zone(),
-      "%s/dart-cov-%" Pd "-%" Pd64 ".json",
-      FLAG_coverage_dir, pid, thread->isolate()->main_port());
-  void* file = (*file_open)(filename, true);
-  if (file == NULL) {
-    OS::Print("Failed to write coverage file: %s\n", filename);
-    return;
-  }
-  (*file_write)(stream.buffer()->buf(), stream.buffer()->length(), file);
-  (*file_close)(file);
-}
-
-
-void CodeCoverage::PrintJSON(Thread* thread,
-                             JSONStream* stream,
-                             CoverageFilter* filter,
-                             bool as_call_sites) {
-  if (!FLAG_support_coverage) {
-    return;
-  }
-  CoverageFilterAll default_filter;
-  if (filter == NULL) {
-    filter = &default_filter;
-  }
-  const GrowableObjectArray& libs = GrowableObjectArray::Handle(
-      thread->zone(),
-      thread->isolate()->object_store()->libraries());
-  Library& lib = Library::Handle();
-  Class& cls = Class::Handle();
-  JSONObject coverage(stream);
-  coverage.AddProperty("type", "CodeCoverage");
-  {
-    JSONArray jsarr(&coverage, "coverage");
-    for (int i = 0; i < libs.Length(); i++) {
-      lib ^= libs.At(i);
-      ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate);
-      while (it.HasNext()) {
-        cls = it.GetNextClass();
-        ASSERT(!cls.IsNull());
-        PrintClass(lib, cls, jsarr, filter, as_call_sites);
-      }
-    }
-  }
-}
-
-
-}  // namespace dart
diff --git a/runtime/vm/coverage.h b/runtime/vm/coverage.h
deleted file mode 100644
index 8c2ce23..0000000
--- a/runtime/vm/coverage.h
+++ /dev/null
@@ -1,57 +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.
-
-#ifndef VM_COVERAGE_H_
-#define VM_COVERAGE_H_
-
-#include "vm/allocation.h"
-#include "vm/flags.h"
-
-namespace dart {
-
-DECLARE_FLAG(charp, coverage_dir);
-
-// Forward declarations.
-class Class;
-class Function;
-template <typename T> class GrowableArray;
-class Isolate;
-class JSONArray;
-class JSONStream;
-class Library;
-class Script;
-class String;
-
-class CoverageFilter : public ValueObject {
- public:
-  virtual bool ShouldOutputCoverageFor(const Library& lib,
-                                       const Script& script,
-                                       const Class& cls,
-                                       const Function& func) const = 0;
-  virtual ~CoverageFilter() {}
-};
-
-class CodeCoverage : public AllStatic {
- public:
-  static void Write(Thread* thread);
-  static void PrintJSON(Thread* thread,
-                        JSONStream* stream,
-                        CoverageFilter* filter,
-                        bool as_call_sites);
-
- private:
-  static void PrintClass(const Library& lib,
-                         const Class& cls,
-                         const JSONArray& arr,
-                         CoverageFilter* filter,
-                         bool as_call_sites);
-  static void CompileAndAdd(const Function& function,
-                            const JSONArray& hits_or_sites,
-                            const GrowableArray<intptr_t>& pos_to_line,
-                            bool as_call_sites);
-};
-
-}  // namespace dart
-
-#endif  // VM_COVERAGE_H_
diff --git a/runtime/vm/coverage_test.cc b/runtime/vm/coverage_test.cc
deleted file mode 100644
index 025c6ed..0000000
--- a/runtime/vm/coverage_test.cc
+++ /dev/null
@@ -1,144 +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.
-
-#include "vm/coverage.h"
-#include "vm/dart_api_impl.h"
-#include "vm/unit_test.h"
-
-namespace dart {
-
-#ifndef PRODUCT
-
-static RawObject* ExecuteScript(const char* script) {
-  TransitionVMToNative transition(Thread::Current());
-  Dart_Handle h_lib = TestCase::LoadTestScript(script, NULL);
-  EXPECT_VALID(h_lib);
-  Library& lib = Library::Handle();
-  lib ^= Api::UnwrapHandle(h_lib);
-  EXPECT(!lib.IsNull());
-  Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL);
-  EXPECT_VALID(result);
-  return Api::UnwrapHandle(h_lib);
-}
-
-
-class FunctionCoverageFilter : public CoverageFilter {
- public:
-  explicit FunctionCoverageFilter(const Function& func) : func_(func) {}
-  bool ShouldOutputCoverageFor(const Library& lib,
-                               const Script& script,
-                               const Class& cls,
-                               const Function& func) const {
-    return func.raw() == func_.raw();
-  }
- private:
-  const Function& func_;
-};
-
-
-VM_TEST_CASE(Coverage_Empty) {
-  const char* kScript =
-      "main() {\n"
-      "}";
-
-  Library& lib = Library::Handle();
-  lib ^= ExecuteScript(kScript);
-  ASSERT(!lib.IsNull());
-
-  JSONStream js;
-  CodeCoverage::PrintJSON(thread, &js, NULL, false);
-
-  char buf[1024];
-  OS::SNPrint(buf, sizeof(buf),
-      "{\"source\":\"test-lib\",\"script\":{\"type\":\"@Script\","
-      "\"fixedId\":true,\"id\":\"libraries\\/%" Pd  "\\/scripts\\/test-lib\","
-      "\"uri\":\"test-lib\","
-      "\"_kind\":\"script\"},\"hits\":[]}", lib.index());
-  EXPECT_SUBSTRING(buf, js.ToCString());
-}
-
-
-VM_TEST_CASE(Coverage_MainWithClass) {
-  const char* kScript =
-      "class Foo {\n"
-      "  var x;\n"
-      "  Foo(this.x);\n"
-      "  bar() {\n"
-      "    x = x * x;\n"
-      "    x = x / 13;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  var foo = new Foo(7);\n"
-      "  foo.bar();\n"
-      "}\n";
-
-  Library& lib = Library::Handle();
-  lib ^= ExecuteScript(kScript);
-  ASSERT(!lib.IsNull());
-
-  JSONStream js;
-  CodeCoverage::PrintJSON(thread, &js, NULL, false);
-
-  char buf[1024];
-  // Coverage data is printed per class, i.e., there should be two sections
-  // for test-lib in the JSON data.
-
-  // Data for the actual class Foo.
-  OS::SNPrint(buf, sizeof(buf),
-      "{\"source\":\"test-lib\",\"script\":{\"type\":\"@Script\","
-      "\"fixedId\":true,\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\","
-      "\"uri\":\"test-lib\","
-      "\"_kind\":\"script\"},\"hits\":[3,1,5,4,6,3]}", lib.index());
-  EXPECT_SUBSTRING(buf, js.ToCString());
-
-  // Data for the fake class containing main().
-  OS::SNPrint(buf, sizeof(buf),
-      "{\"source\":\"test-lib\",\"script\":{\"type\":\"@Script\","
-      "\"fixedId\":true,\"id\":\"libraries\\/%" Pd  "\\/scripts\\/test-lib\","
-      "\"uri\":\"test-lib\","
-      "\"_kind\":\"script\"},\"hits\":[10,1,11,1]}", lib.index());
-  EXPECT_SUBSTRING(buf, js.ToCString());
-}
-
-
-VM_TEST_CASE(Coverage_FilterFunction) {
-  const char* kScript =
-      "class Foo {\n"
-      "  var x;\n"
-      "  var y;\n"
-      "  Foo(this.x);\n"
-      "  Foo.other(this.x, this.y);\n"
-      "  Foo.yetAnother();\n"
-      "}\n"
-      "main() {\n"
-      "  var foo = new Foo(7);\n"
-      "}\n";
-
-  Library& lib = Library::Handle();
-  lib ^= ExecuteScript(kScript);
-  ASSERT(!lib.IsNull());
-  const Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(String::New("Foo"))));
-  ASSERT(!cls.IsNull());
-  const Function& func = Function::Handle(
-      cls.LookupFunction(String::Handle(String::New("Foo.yetAnother"))));
-  ASSERT(!func.IsNull());
-
-  JSONStream js;
-  FunctionCoverageFilter filter(func);
-  CodeCoverage::PrintJSON(thread, &js, &filter, false);
-  // Only expect coverage data for Foo.yetAnother() on line 6.
-  char buf[1024];
-  OS::SNPrint(buf, sizeof(buf),
-      "{\"source\":\"test-lib\",\"script\":{\"type\":\"@Script\","
-      "\"fixedId\":true,\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\","
-      "\"uri\":\"test-lib\","
-      "\"_kind\":\"script\"},\"hits\":[6,0]}", lib.index());
-  EXPECT_SUBSTRING(buf, js.ToCString());
-}
-
-#endif  // !PRODUCT
-
-}  // namespace dart
diff --git a/runtime/vm/custom_isolate_test.cc b/runtime/vm/custom_isolate_test.cc
index d720f70..1f55a8e 100644
--- a/runtime/vm/custom_isolate_test.cc
+++ b/runtime/vm/custom_isolate_test.cc
@@ -321,7 +321,13 @@
   bool saved_flag = FLAG_trace_shutdown;
   FLAG_trace_shutdown = true;
   FLAG_verify_handles = true;
+#ifdef DEBUG
   FLAG_verify_on_transition = true;
+  // Cannot verify heap while running compilation in background. Issue #26149.
+  FLAG_background_compilation = false;
+  // Issue #26150.
+  FLAG_use_osr = false;
+#endif
   event_queue = new EventQueue();
 
   Dart_Isolate dart_isolate = TestCase::CreateTestIsolate();
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index bef0ebb..0041d9a 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -29,16 +29,14 @@
 #include "vm/symbols.h"
 #include "vm/thread_interrupter.h"
 #include "vm/thread_pool.h"
+#include "vm/timeline.h"
 #include "vm/virtual_memory.h"
 #include "vm/zone.h"
 
 namespace dart {
 
 DECLARE_FLAG(bool, print_class_table);
-DECLARE_FLAG(bool, trace_isolates);
 DECLARE_FLAG(bool, trace_time_all);
-DECLARE_FLAG(bool, pause_isolates_on_start);
-DECLARE_FLAG(bool, pause_isolates_on_exit);
 DEFINE_FLAG(bool, keep_code, false,
             "Keep deoptimized code for profiling.");
 DEFINE_FLAG(bool, shutdown, true, "Do a clean shutdown of the VM");
@@ -51,6 +49,12 @@
 ReadOnlyHandles* Dart::predefined_handles_ = NULL;
 const uint8_t* Dart::instructions_snapshot_buffer_ = NULL;
 const uint8_t* Dart::data_snapshot_buffer_ = NULL;
+Dart_ThreadExitCallback Dart::thread_exit_callback_ = NULL;
+Dart_FileOpenCallback Dart::file_open_callback_ = NULL;
+Dart_FileReadCallback Dart::file_read_callback_ = NULL;
+Dart_FileWriteCallback Dart::file_write_callback_ = NULL;
+Dart_FileCloseCallback Dart::file_close_callback_ = NULL;
+Dart_EntropySource Dart::entropy_source_callback_ = NULL;
 
 // Structure for managing read-only global handles allocation used for
 // creating global read-only handles that are pre created and initialized
@@ -81,6 +85,7 @@
                            const uint8_t* data_snapshot,
                            Dart_IsolateCreateCallback create,
                            Dart_IsolateShutdownCallback shutdown,
+                           Dart_ThreadExitCallback thread_exit,
                            Dart_FileOpenCallback file_open,
                            Dart_FileReadCallback file_read,
                            Dart_FileWriteCallback file_write,
@@ -91,8 +96,9 @@
   if (vm_isolate_ != NULL || !Flags::Initialized()) {
     return "VM already initialized or flags not initialized.";
   }
-  Isolate::SetFileCallbacks(file_open, file_read, file_write, file_close);
-  Isolate::SetEntropySourceCallback(entropy_source);
+  set_thread_exit_callback(thread_exit);
+  SetFileCallbacks(file_open, file_read, file_write, file_close);
+  set_entropy_source_callback(entropy_source);
   OS::InitOnce();
   VirtualMemory::InitOnce();
   OSThread::InitOnce();
@@ -155,9 +161,9 @@
       StubCode::InitOnce();
     }
     if (vm_isolate_snapshot != NULL) {
-      if (instructions_snapshot != NULL) {
-        vm_isolate_->SetupInstructionsSnapshotPage(instructions_snapshot);
-        ASSERT(data_snapshot != NULL);
+      NOT_IN_PRODUCT(TimelineDurationScope tds(Timeline::GetVMStream(),
+                                               "VMIsolateSnapshot"));
+      if (data_snapshot != NULL) {
         vm_isolate_->SetupDataSnapshotPage(data_snapshot);
       }
       const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot);
@@ -174,6 +180,13 @@
       if (!error.IsNull()) {
         return error.ToCString();
       }
+      NOT_IN_PRODUCT(if (tds.enabled()) {
+        tds.SetNumArguments(2);
+        tds.FormatArgument(0, "snapshotSize", "%" Pd, snapshot->length());
+        tds.FormatArgument(1, "heapSize", "%" Pd64,
+                           vm_isolate_->heap()->UsedInWords(Heap::kOld) *
+                           kWordSize);
+      });
       if (FLAG_trace_isolates) {
         OS::Print("Size of vm isolate snapshot = %" Pd "\n",
                   snapshot->length());
@@ -198,7 +211,11 @@
       return "SSE2 is required.";
     }
 #endif
-    Object::FinalizeVMIsolate(vm_isolate_);
+    {
+      NOT_IN_PRODUCT(TimelineDurationScope tds(Timeline::GetVMStream(),
+                                               "FinalizeVMIsolate"));
+      Object::FinalizeVMIsolate(vm_isolate_);
+    }
 #if defined(DEBUG)
     vm_isolate_->heap()->Verify(kRequireMarked);
 #endif
@@ -391,7 +408,9 @@
   Thread* T = Thread::Current();
   Isolate* I = T->isolate();
   NOT_IN_PRODUCT(
-    TimelineDurationScope tds(T, I->GetIsolateStream(), "InitializeIsolate");
+    TimelineDurationScope tds(T,
+                              Timeline::GetIsolateStream(),
+                              "InitializeIsolate");
     tds.SetNumArguments(1);
     tds.CopyArgument(0, "isolateName", I->name());
   )
@@ -400,7 +419,7 @@
   HandleScope handle_scope(T);
   {
     NOT_IN_PRODUCT(TimelineDurationScope tds(T,
-        I->GetIsolateStream(), "ObjectStore::Init"));
+        Timeline::GetIsolateStream(), "ObjectStore::Init"));
     ObjectStore::Init(I);
   }
 
@@ -411,7 +430,7 @@
   if (snapshot_buffer != NULL) {
     // Read the snapshot and setup the initial state.
     NOT_IN_PRODUCT(TimelineDurationScope tds(T,
-        I->GetIsolateStream(), "IsolateSnapshotReader"));
+        Timeline::GetIsolateStream(), "IsolateSnapshotReader"));
     // TODO(turnidge): Remove once length is not part of the snapshot.
     const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer);
     if (snapshot == NULL) {
@@ -432,6 +451,12 @@
     if (!error.IsNull()) {
       return error.raw();
     }
+    NOT_IN_PRODUCT(if (tds.enabled()) {
+      tds.SetNumArguments(2);
+      tds.FormatArgument(0, "snapshotSize", "%" Pd, snapshot->length());
+      tds.FormatArgument(1, "heapSize", "%" Pd64,
+                         I->heap()->UsedInWords(Heap::kOld) * kWordSize);
+    });
     if (FLAG_trace_isolates) {
       I->heap()->PrintSizes();
       MegamorphicCacheTable::PrintSizes(I);
@@ -449,7 +474,7 @@
 
   {
     NOT_IN_PRODUCT(TimelineDurationScope tds(T,
-        I->GetIsolateStream(), "StubCode::Init"));
+        Timeline::GetIsolateStream(), "StubCode::Init"));
     StubCode::Init(I);
   }
 
@@ -472,7 +497,7 @@
     }
   }
 
-  I->heap()->EnableGrowthControl();
+  I->heap()->InitGrowthControl();
   I->set_init_callback_data(data);
   Api::SetupAcquiredError(I);
   if (FLAG_print_class_table) {
diff --git a/runtime/vm/dart.h b/runtime/vm/dart.h
index aa43e12..afa2499 100644
--- a/runtime/vm/dart.h
+++ b/runtime/vm/dart.h
@@ -26,6 +26,7 @@
       const uint8_t* data_snapshot,
       Dart_IsolateCreateCallback create,
       Dart_IsolateShutdownCallback shutdown,
+      Dart_ThreadExitCallback thread_exit,
       Dart_FileOpenCallback file_open,
       Dart_FileReadCallback file_read,
       Dart_FileWriteCallback file_write,
@@ -76,6 +77,42 @@
     data_snapshot_buffer_ = buffer;
   }
 
+  static Dart_ThreadExitCallback thread_exit_callback() {
+    return thread_exit_callback_;
+  }
+  static void set_thread_exit_callback(Dart_ThreadExitCallback cback) {
+    thread_exit_callback_ = cback;
+  }
+  static void SetFileCallbacks(Dart_FileOpenCallback file_open,
+                               Dart_FileReadCallback file_read,
+                               Dart_FileWriteCallback file_write,
+                               Dart_FileCloseCallback file_close) {
+    file_open_callback_ = file_open;
+    file_read_callback_ = file_read;
+    file_write_callback_ = file_write;
+    file_close_callback_ = file_close;
+  }
+
+  static Dart_FileOpenCallback file_open_callback() {
+    return file_open_callback_;
+  }
+  static Dart_FileReadCallback file_read_callback() {
+    return file_read_callback_;
+  }
+  static Dart_FileWriteCallback file_write_callback() {
+    return file_write_callback_;
+  }
+  static Dart_FileCloseCallback file_close_callback() {
+    return file_close_callback_;
+  }
+
+  static void set_entropy_source_callback(Dart_EntropySource entropy_source) {
+    entropy_source_callback_ = entropy_source;
+  }
+  static Dart_EntropySource entropy_source_callback() {
+    return entropy_source_callback_;
+  }
+
  private:
   static void WaitForIsolateShutdown();
 
@@ -86,6 +123,12 @@
   static ReadOnlyHandles* predefined_handles_;
   static const uint8_t* instructions_snapshot_buffer_;
   static const uint8_t* data_snapshot_buffer_;
+  static Dart_ThreadExitCallback thread_exit_callback_;
+  static Dart_FileOpenCallback file_open_callback_;
+  static Dart_FileReadCallback file_read_callback_;
+  static Dart_FileWriteCallback file_write_callback_;
+  static Dart_FileCloseCallback file_close_callback_;
+  static Dart_EntropySource entropy_source_callback_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 4c6fd00..e8c31a9 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -59,6 +59,9 @@
 #endif  // defined(DART_NO_SNAPSHOT).
 DEFINE_FLAG(bool, verify_acquired_data, false,
             "Verify correct API acquire/release of typed data.");
+DEFINE_FLAG(bool, support_externalizable_strings, false,
+            "Support Dart_MakeExternalString.");
+
 
 ThreadLocalKey Api::api_native_key_ = kUnsetThreadLocalKey;
 Dart_Handle Api::true_handle_ = NULL;
@@ -78,12 +81,12 @@
 #ifndef PRODUCT
 #define API_TIMELINE_DURATION                                                  \
   TimelineDurationScope tds(Thread::Current(),                                 \
-                            Timeline::GetVMApiStream(),                        \
+                            Timeline::GetAPIStream(),                          \
                             CURRENT_FUNC)
 
 #define API_TIMELINE_BEGIN_END                                                 \
   TimelineBeginEndScope tbes(Thread::Current(),                                \
-                             Timeline::GetVMApiStream(),                       \
+                             Timeline::GetAPIStream(),                         \
                              CURRENT_FUNC)
 #else
 #define API_TIMELINE_DURATION do { } while (false)
@@ -97,7 +100,6 @@
 class FunctionVisitor : public ObjectVisitor {
  public:
   explicit FunctionVisitor(Thread* thread) :
-      ObjectVisitor(thread->isolate()),
       classHandle_(Class::Handle(thread->zone())),
       funcHandle_(Function::Handle(thread->zone())),
       typeHandle_(AbstractType::Handle(thread->zone())) {}
@@ -1139,13 +1141,14 @@
     Dart_IsolateInterruptCallback interrupt,
     Dart_IsolateUnhandledExceptionCallback unhandled,
     Dart_IsolateShutdownCallback shutdown,
+    Dart_ThreadExitCallback thread_exit,
     Dart_FileOpenCallback file_open,
     Dart_FileReadCallback file_read,
     Dart_FileWriteCallback file_write,
     Dart_FileCloseCallback file_close,
     Dart_EntropySource entropy_source,
     Dart_GetVMServiceAssetsArchive get_service_assets) {
-  if ((instructions_snapshot != NULL) && !FLAG_precompiled_mode) {
+  if ((instructions_snapshot != NULL) && !FLAG_precompiled_runtime) {
     return strdup("Flag --precompilation was not specified.");
   }
   if (interrupt != NULL) {
@@ -1160,6 +1163,7 @@
                                        instructions_snapshot,
                                        data_snapshot,
                                        create, shutdown,
+                                       thread_exit,
                                        file_open, file_read, file_write,
                                        file_close, entropy_source,
                                        get_service_assets);
@@ -1464,6 +1468,7 @@
     intptr_t* isolate_snapshot_size) {
   ASSERT(FLAG_load_deferred_eagerly);
   DARTSCOPE(Thread::Current());
+  API_TIMELINE_DURATION;
   Isolate* I = T->isolate();
   if (vm_isolate_snapshot_buffer != NULL &&
       vm_isolate_snapshot_size == NULL) {
@@ -1481,6 +1486,8 @@
     return state;
   }
   I->heap()->CollectAllGarbage();
+  I->StopBackgroundCompiler();
+
 #if defined(DEBUG)
   FunctionVisitor check_canonical(T);
   I->heap()->IterateObjects(&check_canonical);
@@ -1535,6 +1542,7 @@
 
 DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer,
                                                   intptr_t* size) {
+  API_TIMELINE_DURATION;
   return createLibrarySnapshot(Dart_Null(), buffer, size);
 }
 
@@ -1542,6 +1550,7 @@
 DART_EXPORT Dart_Handle Dart_CreateLibrarySnapshot(Dart_Handle library,
                                                    uint8_t** buffer,
                                                    intptr_t* size) {
+  API_TIMELINE_DURATION;
   return createLibrarySnapshot(library, buffer, size);
 }
 
@@ -1605,10 +1614,13 @@
 
 
 DART_EXPORT Dart_Handle Dart_RunLoop() {
-  Thread* T = Thread::Current();
-  Isolate* I = T->isolate();
-  CHECK_API_SCOPE(T);
-  CHECK_CALLBACK_STATE(T);
+  Isolate* I;
+  {
+    Thread* T = Thread::Current();
+    I = T->isolate();
+    CHECK_API_SCOPE(T);
+    CHECK_CALLBACK_STATE(T);
+  }
   API_TIMELINE_BEGIN_END;
   // The message handler run loop does not expect to have a current isolate
   // so we exit the isolate here and enter it again after the runloop is done.
@@ -1627,13 +1639,14 @@
     }
   }
   ::Dart_EnterIsolate(Api::CastIsolate(I));
-  if (T->sticky_error() != Object::null()) {
-    Dart_Handle error = Api::NewHandle(T, T->sticky_error());
-    T->clear_sticky_error();
+  if (I->sticky_error() != Object::null()) {
+    Dart_Handle error =
+        Api::NewHandle(Thread::Current(), I->sticky_error());
+    I->clear_sticky_error();
     return error;
   }
   if (FLAG_print_class_table) {
-    HANDLESCOPE(T);
+    HANDLESCOPE(Thread::Current());
     I->class_table()->Print();
   }
   return Api::Success();
@@ -2509,6 +2522,10 @@
                                                 void* peer,
                                                 Dart_PeerFinalizer cback) {
   DARTSCOPE(Thread::Current());
+  if (!FLAG_support_externalizable_strings) {
+    return Api::NewError("Dart_MakeExternalString with "
+                         "--support_externalizable_strings=false");
+  }
   const String& str_obj = Api::UnwrapStringHandle(Z, str);
   if (str_obj.IsExternal()) {
     return str;  // String is already an external string.
@@ -3487,8 +3504,8 @@
   }
   Object& result = Object::Handle(Z);
   result = GetByteBufferConstructor(T,
-                                    Symbols::_ByteBuffer(),
-                                    Symbols::_ByteBufferDot_New(),
+                                    Symbols::ByteBuffer(),
+                                    Symbols::ByteBufferDot_New(),
                                     1);
   ASSERT(!result.IsNull());
   ASSERT(result.IsFunction());
@@ -4252,7 +4269,7 @@
     // getter Function.
     Class& cls = Class::Handle(Z, Type::Cast(obj).type_class());
 
-    field = cls.LookupStaticField(field_name);
+    field = cls.LookupStaticFieldAllowPrivate(field_name);
     if (field.IsNull() || field.IsUninitialized()) {
       const String& getter_name =
           String::Handle(Z, Field::GetterName(field_name));
@@ -4382,7 +4399,7 @@
     // setter Function.
     Class& cls = Class::Handle(Z, Type::Cast(obj).type_class());
 
-    field = cls.LookupStaticField(field_name);
+    field = cls.LookupStaticFieldAllowPrivate(field_name);
     if (field.IsNull()) {
       String& setter_name = String::Handle(Z, Field::SetterName(field_name));
       setter = cls.LookupStaticFunctionAllowPrivate(setter_name);
@@ -4421,7 +4438,7 @@
     Class& cls = Class::Handle(Z, instance.clazz());
     String& setter_name = String::Handle(Z, Field::SetterName(field_name));
     while (!cls.IsNull()) {
-      field = cls.LookupInstanceField(field_name);
+      field = cls.LookupInstanceFieldAllowPrivate(field_name);
       if (!field.IsNull() && field.is_final()) {
         return Api::NewError("%s: cannot set final field '%s'.",
                              CURRENT_FUNC, field_name.ToCString());
@@ -4601,7 +4618,7 @@
   }
   CHECK_CALLBACK_STATE(T);
 
-  String& cls_symbol = String::Handle(Z, Symbols::New(cls_name));
+  String& cls_symbol = String::Handle(Z, Symbols::New(T, cls_name));
   const Class& cls = Class::Handle(Z,
       Class::NewNativeWrapper(lib, cls_symbol, field_count));
   if (cls.IsNull()) {
@@ -5455,7 +5472,7 @@
   CHECK_CALLBACK_STATE(T);
   CHECK_COMPILATION_ALLOWED(I);
 
-  const String& prefix_symbol = String::Handle(Z, Symbols::New(prefix_vm));
+  const String& prefix_symbol = String::Handle(Z, Symbols::New(T, prefix_vm));
   const Namespace& import_ns = Namespace::Handle(Z,
       Namespace::New(import_vm, Object::null_array(), Object::null_array()));
   if (prefix_vm.Length() == 0) {
@@ -5771,31 +5788,7 @@
 }
 
 
-DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask) {
-  if (!FLAG_support_timeline) {
-    return;
-  }
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  isolate->GetAPIStream()->set_enabled(
-      (stream_mask & DART_TIMELINE_STREAM_API) != 0);
-  isolate->GetCompilerStream()->set_enabled(
-      (stream_mask & DART_TIMELINE_STREAM_COMPILER) != 0);
-  isolate->GetDartStream()->set_enabled(
-      (stream_mask & DART_TIMELINE_STREAM_DART) != 0);
-  isolate->GetDebuggerStream()->set_enabled(
-      (stream_mask & DART_TIMELINE_STREAM_DEBUGGER) != 0);
-  isolate->GetEmbedderStream()->set_enabled(
-      (stream_mask & DART_TIMELINE_STREAM_EMBEDDER) != 0);
-  isolate->GetGCStream()->set_enabled(
-      (stream_mask & DART_TIMELINE_STREAM_GC) != 0);
-  isolate->GetIsolateStream()->set_enabled(
-      (stream_mask & DART_TIMELINE_STREAM_ISOLATE) != 0);
-}
-
-
 DART_EXPORT void Dart_GlobalTimelineSetRecordedStreams(int64_t stream_mask) {
-  // Per isolate overrides.
   if (!FLAG_support_timeline) {
     return;
   }
@@ -5811,6 +5804,8 @@
   const bool gc_enabled = (stream_mask & DART_TIMELINE_STREAM_GC) != 0;
   const bool isolate_enabled =
       (stream_mask & DART_TIMELINE_STREAM_ISOLATE) != 0;
+  const bool vm_enabled =
+      (stream_mask & DART_TIMELINE_STREAM_VM) != 0;
   Timeline::SetStreamAPIEnabled(api_enabled);
   Timeline::SetStreamCompilerEnabled(compiler_enabled);
   Timeline::SetStreamDartEnabled(dart_enabled);
@@ -5818,10 +5813,7 @@
   Timeline::SetStreamEmbedderEnabled(embedder_enabled);
   Timeline::SetStreamGCEnabled(gc_enabled);
   Timeline::SetStreamIsolateEnabled(isolate_enabled);
-  // VM wide.
-  const bool vm_enabled =
-      (stream_mask & DART_TIMELINE_STREAM_VM) != 0;
-  Timeline::GetVMStream()->set_enabled(vm_enabled);
+  Timeline::SetStreamVMEnabled(vm_enabled);
 }
 
 
@@ -5903,49 +5895,31 @@
   ASSERT(output[output_length - 1] == ']');
   // Replace the ']' with the null character.
   output[output_length - 1] = '\0';
+  char* start = &output[1];
   // We are skipping the '['.
   output_length -= 1;
 
-  // Start the stream.
-  StartStreamToConsumer(consumer, user_data, "timeline");
-
   DataStreamToConsumer(consumer,
                        user_data,
-                       &output[1],
+                       start,
                        output_length,
                        "timeline");
 
   // We stole the JSONStream's output buffer, free it.
   free(output);
 
-  // Finish the stream.
-  FinishStreamToConsumer(consumer, user_data, "timeline");
   return true;
 }
 
 
-DART_EXPORT bool Dart_TimelineGetTrace(Dart_StreamConsumer consumer,
-                                       void* user_data) {
+DART_EXPORT void Dart_SetEmbedderTimelineCallbacks(
+    Dart_EmbedderTimelineStartRecording start_recording,
+    Dart_EmbedderTimelineStopRecording stop_recording) {
   if (!FLAG_support_timeline) {
-    return false;
+    return;
   }
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  if (consumer == NULL) {
-    return false;
-  }
-  TimelineEventRecorder* timeline_recorder = Timeline::recorder();
-  if (timeline_recorder == NULL) {
-    // Nothing has been recorded.
-    return false;
-  }
-  Thread* T = Thread::Current();
-  StackZone zone(T);
-  Timeline::ReclaimCachedBlocksFromThreads();
-  JSONStream js;
-  IsolateTimelineEventFilter filter(isolate->main_port());
-  timeline_recorder->PrintTraceEvent(&js, &filter);
-  return StreamTraceEvents(consumer, user_data, &js);
+  Timeline::set_start_recording_cb(start_recording);
+  Timeline::set_stop_recording_cb(stop_recording);
 }
 
 
@@ -5967,136 +5941,88 @@
     return false;
   }
   Timeline::ReclaimCachedBlocksFromThreads();
+  bool success = false;
   JSONStream js;
   TimelineEventFilter filter;
   timeline_recorder->PrintTraceEvent(&js, &filter);
-  return StreamTraceEvents(consumer, user_data, &js);
+  StartStreamToConsumer(consumer, user_data, "timeline");
+  if (StreamTraceEvents(consumer, user_data, &js)) {
+    success = true;
+  }
+  FinishStreamToConsumer(consumer, user_data, "timeline");
+  return success;
 }
 
 
-DART_EXPORT Dart_Handle Dart_TimelineDuration(const char* label,
-                                              int64_t start_micros,
-                                              int64_t end_micros) {
+DART_EXPORT void Dart_TimelineEvent(const char* label,
+                                    int64_t timestamp0,
+                                    int64_t timestamp1_or_async_id,
+                                    Dart_Timeline_Event_Type type,
+                                    intptr_t argument_count,
+                                    const char** argument_names,
+                                    const char** argument_values) {
   if (!FLAG_support_timeline) {
-    return Api::Success();
+    return;
   }
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  if (label == NULL) {
-    RETURN_NULL_ERROR(label);
+  if (type < Dart_Timeline_Event_Begin) {
+    return;
   }
-  if (start_micros > end_micros) {
-    const char* msg = "%s: start_micros must be <= end_micros";
-    return Api::NewError(msg, CURRENT_FUNC);
+  if (type > Dart_Timeline_Event_Counter) {
+    return;
   }
-  TimelineStream* stream = isolate->GetEmbedderStream();
+  TimelineStream* stream = Timeline::GetEmbedderStream();
   ASSERT(stream != NULL);
   TimelineEvent* event = stream->StartEvent();
-  if (event != NULL) {
-    event->Duration(label, start_micros, end_micros);
-    event->Complete();
+  if (event == NULL) {
+    return;
   }
-  return Api::Success();
+  switch (type) {
+    case Dart_Timeline_Event_Begin:
+      event->Begin(label, timestamp0);
+    break;
+    case Dart_Timeline_Event_End:
+      event->End(label, timestamp0);
+    break;
+    case Dart_Timeline_Event_Instant:
+      event->Instant(label, timestamp0);
+    break;
+    case Dart_Timeline_Event_Duration:
+      event->Duration(label, timestamp0, timestamp1_or_async_id);
+    break;
+    case Dart_Timeline_Event_Async_Begin:
+      event->AsyncBegin(label, timestamp1_or_async_id, timestamp0);
+    break;
+    case Dart_Timeline_Event_Async_End:
+      event->AsyncEnd(label, timestamp1_or_async_id, timestamp0);
+    break;
+    case Dart_Timeline_Event_Async_Instant:
+      event->AsyncInstant(label, timestamp1_or_async_id, timestamp0);
+    break;
+    case Dart_Timeline_Event_Counter:
+      event->Counter(label, timestamp0);
+    break;
+    default:
+      FATAL("Unknown Dart_Timeline_Event_Type");
+  }
+  event->SetNumArguments(argument_count);
+  for (intptr_t i = 0; i < argument_count; i++) {
+    event->CopyArgument(i, argument_names[i], argument_values[i]);
+  }
+  event->Complete();
 }
 
 
-DART_EXPORT Dart_Handle Dart_TimelineInstant(const char* label) {
-  if (!FLAG_support_timeline) {
-    return Api::Success();
+DART_EXPORT void Dart_SetThreadName(const char* name) {
+  OSThread* thread = OSThread::Current();
+  if (thread == NULL) {
+    // VM is shutting down.
+    return;
   }
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  if (label == NULL) {
-    RETURN_NULL_ERROR(label);
-  }
-  TimelineStream* stream = isolate->GetEmbedderStream();
-  ASSERT(stream != NULL);
-  TimelineEvent* event = stream->StartEvent();
-  if (event != NULL) {
-    event->Instant(label);
-    event->Complete();
-  }
-  return Api::Success();
+  thread->SetName(name);
 }
 
 
-DART_EXPORT Dart_Handle Dart_TimelineAsyncBegin(const char* label,
-                                                int64_t* async_id) {
-  if (!FLAG_support_timeline) {
-    return Api::Success();
-  }
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  if (label == NULL) {
-    RETURN_NULL_ERROR(label);
-  }
-  if (async_id == NULL) {
-    RETURN_NULL_ERROR(async_id);
-  }
-  *async_id = -1;
-  TimelineStream* stream = isolate->GetEmbedderStream();
-  ASSERT(stream != NULL);
-  TimelineEvent* event = stream->StartEvent();
-  if (event != NULL) {
-    TimelineEventRecorder* recorder = Timeline::recorder();
-    ASSERT(recorder != NULL);
-    *async_id = recorder->GetNextAsyncId();
-    event->AsyncBegin(label, *async_id);
-    event->Complete();
-  }
-  return Api::Success();
-}
-
-
-DART_EXPORT Dart_Handle Dart_TimelineAsyncInstant(const char* label,
-                                                  int64_t async_id) {
-  if (!FLAG_support_timeline) {
-    return Api::Success();
-  }
-  if (async_id < 0) {
-    return Api::Success();
-  }
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  if (label == NULL) {
-    RETURN_NULL_ERROR(label);
-  }
-  TimelineStream* stream = isolate->GetEmbedderStream();
-  ASSERT(stream != NULL);
-  TimelineEvent* event = stream->StartEvent();
-  if (event != NULL) {
-    event->AsyncInstant(label, async_id);
-    event->Complete();
-  }
-  return Api::Success();
-}
-
-
-DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label,
-                                              int64_t async_id) {
-  if (!FLAG_support_timeline) {
-    return Api::Success();
-  }
-  if (async_id < 0) {
-    return Api::Success();
-  }
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  if (label == NULL) {
-    RETURN_NULL_ERROR(label);
-  }
-  TimelineStream* stream = isolate->GetEmbedderStream();
-  ASSERT(stream != NULL);
-  TimelineEvent* event = stream->StartEvent();
-  if (event != NULL) {
-    event->AsyncEnd(label, async_id);
-    event->Complete();
-  }
-  return Api::Success();
-}
-
-
-// The precompiler is included in dart_no_snapshot and dart_noopt, and
+// The precompiler is included in dart_bootstrap and dart_noopt, and
 // excluded from dart and dart_precompiled_runtime.
 #if !defined(DART_PRECOMPILER)
 
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
index 67c0257..f536e0b 100644
--- a/runtime/vm/dart_api_impl.h
+++ b/runtime/vm/dart_api_impl.h
@@ -57,7 +57,7 @@
 #define DARTSCOPE(thread)                                                      \
   Thread* T = (thread);                                                        \
   CHECK_API_SCOPE(T);                                                          \
-  TransitionNativeToVM trainsition(T);                                         \
+  TransitionNativeToVM transition(T);                                          \
   HANDLESCOPE(T);
 
 
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 91043ed..02c28db 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "bin/builtin.h"
+#include "vm/compiler.h"
 #include "include/dart_api.h"
 #include "include/dart_mirrors_api.h"
 #include "include/dart_native_api.h"
@@ -14,6 +15,7 @@
 #include "vm/dart_api_impl.h"
 #include "vm/dart_api_state.h"
 #include "vm/lockers.h"
+#include "vm/timeline.h"
 #include "vm/unit_test.h"
 #include "vm/verifier.h"
 
@@ -21,6 +23,7 @@
 
 DECLARE_FLAG(bool, verify_acquired_data);
 DECLARE_FLAG(bool, ignore_patch_signature_mismatch);
+DECLARE_FLAG(bool, support_externalizable_strings);
 
 #ifndef PRODUCT
 
@@ -5573,6 +5576,9 @@
 
 
 TEST_CASE(GetNativeArguments) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "import 'dart:nativewrappers';"
       "class MyObject extends NativeFieldWrapperClass2 {"
@@ -5619,6 +5625,8 @@
   Dart_Handle result = Dart_Invoke(lib, NewString("testMain"), 1, args);
   EXPECT_VALID(result);
   EXPECT(Dart_IsInteger(result));
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
@@ -8495,6 +8503,9 @@
 
 
 TEST_CASE(MakeExternalString) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   static int peer8 = 40;
   static int peer16 = 41;
   static int canonical_str_peer = 42;
@@ -8561,7 +8572,8 @@
 
     // Test with single character canonical string, it should not become
     // external string but the peer should be setup for it.
-    Dart_Handle canonical_str = Api::NewHandle(thread, Symbols::New("*"));
+    Dart_Handle canonical_str = Api::NewHandle(thread, Symbols::New(thread,
+                                                                    "*"));
     EXPECT(Dart_IsString(canonical_str));
     EXPECT(!Dart_IsExternalString(canonical_str));
     uint8_t ext_canonical_str[kLength];
@@ -8651,8 +8663,8 @@
     // Test with a symbol (hash value should be preserved on externalization).
     const char* symbol_ascii = "?unseen";
     expected_length = strlen(symbol_ascii);
-    Dart_Handle symbol_str =
-        Api::NewHandle(thread, Symbols::New(symbol_ascii, expected_length));
+    Dart_Handle symbol_str = Api::NewHandle(thread,
+        Symbols::New(thread, symbol_ascii, expected_length));
     EXPECT_VALID(symbol_str);
     EXPECT(Dart_IsString(symbol_str));
     EXPECT(Dart_IsStringLatin1(symbol_str));
@@ -8698,10 +8710,15 @@
   EXPECT_EQ(80, peer8);
   EXPECT_EQ(82, peer16);
   EXPECT_EQ(42, canonical_str_peer);  // "*" Symbol is not removed on GC.
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
 TEST_CASE(ExternalizeConstantStrings) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "String testMain() {\n"
       "  return 'constant string';\n"
@@ -8725,6 +8742,8 @@
   for (intptr_t i = 0; i < kExpectedLen; i++) {
     EXPECT_EQ(expected_str[i], ext_str[i]);
   }
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
@@ -8814,6 +8833,9 @@
 // Do not use guarding mechanism on externalizable classes, since their class
 // can change on the fly,
 TEST_CASE(GuardExternalizedString) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "main() {\n"
       "  var a = new A('hello');\n"
@@ -8849,10 +8871,15 @@
   result = Dart_IntegerToInt64(result, &value);
   EXPECT_VALID(result);
   EXPECT_EQ(10640000, value);
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
 TEST_CASE(ExternalStringDeoptimize) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "String str = 'A';\n"
       "class A {\n"
@@ -8884,10 +8911,15 @@
   result = Dart_IntegerToInt64(result, &value);
   EXPECT_VALID(result);
   EXPECT_EQ(260, value);
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
 TEST_CASE(ExternalStringPolymorphicDeoptimize) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "const strA = 'AAAA';\n"
       "class A {\n"
@@ -8920,10 +8952,15 @@
   result = Dart_BooleanValue(result, &value);
   EXPECT_VALID(result);
   EXPECT(value);
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
 TEST_CASE(ExternalStringGuardFieldDeoptimize) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "const strA = 'AAAA';\n"
       "class A {\n"
@@ -8961,10 +8998,15 @@
   result = Dart_BooleanValue(result, &value);
   EXPECT_VALID(result);
   EXPECT(value);
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
 TEST_CASE(ExternalStringStaticFieldDeoptimize) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "const strA = 'AAAA';\n"
       "class A {\n"
@@ -8997,10 +9039,15 @@
   result = Dart_BooleanValue(result, &value);
   EXPECT_VALID(result);
   EXPECT(value);
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
 TEST_CASE(ExternalStringTrimDoubleParse) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "String str = 'A';\n"
       "class A {\n"
@@ -9026,10 +9073,15 @@
   result = Dart_IntegerToInt64(result, &value);
   EXPECT_VALID(result);
   EXPECT_EQ(8, value);
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
 TEST_CASE(ExternalStringDoubleParse) {
+  const bool saved_flag = FLAG_support_externalizable_strings;
+  FLAG_support_externalizable_strings = true;
+
   const char* kScriptChars =
       "String str = 'A';\n"
       "class A {\n"
@@ -9055,11 +9107,13 @@
   result = Dart_IntegerToInt64(result, &value);
   EXPECT_VALID(result);
   EXPECT_EQ(8, value);
+
+  FLAG_support_externalizable_strings = saved_flag;
 }
 
 
 TEST_CASE(ExternalStringIndexOf) {
-    const char* kScriptChars =
+  const char* kScriptChars =
       "main(String pattern) {\n"
       "  var str = 'Hello World';\n"
       "  return str.indexOf(pattern);\n"
@@ -9190,11 +9244,15 @@
 TEST_CASE(Timeline_Dart_TimelineDuration) {
   Isolate* isolate = Isolate::Current();
   // Grab embedder stream.
-  TimelineStream* stream = isolate->GetEmbedderStream();
+  TimelineStream* stream = Timeline::GetEmbedderStream();
   // Make sure it is enabled.
   stream->set_enabled(true);
   // Add a duration event.
-  Dart_TimelineDuration("testDurationEvent", 0, 1);
+  Dart_TimelineEvent("testDurationEvent",
+                     0,
+                     1,
+                     Dart_Timeline_Event_Duration,
+                     0, NULL, NULL);
   // Check that it is in the output.
   TimelineEventRecorder* recorder = Timeline::recorder();
   Timeline::ReclaimCachedBlocksFromThreads();
@@ -9208,10 +9266,14 @@
 TEST_CASE(Timeline_Dart_TimelineInstant) {
   Isolate* isolate = Isolate::Current();
   // Grab embedder stream.
-  TimelineStream* stream = isolate->GetEmbedderStream();
+  TimelineStream* stream = Timeline::GetEmbedderStream();
   // Make sure it is enabled.
   stream->set_enabled(true);
-  Dart_TimelineInstant("testInstantEvent");
+  Dart_TimelineEvent("testInstantEvent",
+                     0,
+                     1,
+                     Dart_Timeline_Event_Instant,
+                     0, NULL, NULL);
   // Check that it is in the output.
   TimelineEventRecorder* recorder = Timeline::recorder();
   Timeline::ReclaimCachedBlocksFromThreads();
@@ -9223,17 +9285,16 @@
 
 
 TEST_CASE(Timeline_Dart_TimelineAsyncDisabled) {
-  Isolate* isolate = Isolate::Current();
   // Grab embedder stream.
-  TimelineStream* stream = isolate->GetEmbedderStream();
+  TimelineStream* stream = Timeline::GetEmbedderStream();
   // Make sure it is disabled.
   stream->set_enabled(false);
-  int64_t async_id = -1;
-  Dart_TimelineAsyncBegin("testAsyncEvent", &async_id);
-  // Expect that the |async_id| is negative because the stream is disabled.
-  EXPECT(async_id < 0);
-  // Call Dart_TimelineAsyncEnd with a negative async_id.
-  Dart_TimelineAsyncEnd("testAsyncEvent", async_id);
+  int64_t async_id = 99;
+  Dart_TimelineEvent("testAsyncEvent",
+                     0,
+                     async_id,
+                     Dart_Timeline_Event_Async_Begin,
+                     0, NULL, NULL);
   // Check that testAsync is not in the output.
   TimelineEventRecorder* recorder = Timeline::recorder();
   Timeline::ReclaimCachedBlocksFromThreads();
@@ -9247,15 +9308,15 @@
 TEST_CASE(Timeline_Dart_TimelineAsync) {
   Isolate* isolate = Isolate::Current();
   // Grab embedder stream.
-  TimelineStream* stream = isolate->GetEmbedderStream();
+  TimelineStream* stream = Timeline::GetEmbedderStream();
   // Make sure it is enabled.
   stream->set_enabled(true);
-  int64_t async_id = -1;
-  Dart_TimelineAsyncBegin("testAsyncEvent", &async_id);
-  // Expect that the |async_id| is >= 0.
-  EXPECT(async_id >= 0);
-
-  Dart_TimelineAsyncEnd("testAsyncEvent", async_id);
+  int64_t async_id = 99;
+  Dart_TimelineEvent("testAsyncEvent",
+                     0,
+                     async_id,
+                     Dart_Timeline_Event_Async_Begin,
+                     0, NULL, NULL);
 
   // Check that it is in the output.
   TimelineEventRecorder* recorder = Timeline::recorder();
@@ -9289,6 +9350,7 @@
     return;
   }
   ASSERT(state == Dart_StreamConsumer_kData);
+
   // Grow buffer.
   data->buffer = reinterpret_cast<uint8_t*>(
       realloc(data->buffer, data->buffer_length + buffer_length));
@@ -9314,7 +9376,7 @@
   bool success = false;
 
   // Enable recording of all streams.
-  Dart_TimelineSetRecordedStreams(DART_TIMELINE_STREAM_ALL);
+  Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_ALL);
 
   // Invoke main, which will be compiled resulting in a compiler event in
   // the timeline.
@@ -9326,7 +9388,7 @@
 
   // Grab the trace.
   AppendData data;
-  success = Dart_TimelineGetTrace(AppendStreamConsumer, &data);
+  success = Dart_GlobalTimelineGetTrace(AppendStreamConsumer, &data);
   EXPECT(success);
   buffer = reinterpret_cast<char*>(data.buffer);
   buffer_length = data.buffer_length;
@@ -9366,7 +9428,7 @@
   bool success = false;
 
   // Enable recording of the Dart stream.
-  Dart_TimelineSetRecordedStreams(DART_TIMELINE_STREAM_DART);
+  Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_DART);
 
   // Invoke main, which will add a new timeline event from Dart.
   Dart_Handle result = Dart_Invoke(lib,
@@ -9379,7 +9441,7 @@
   AppendData data;
   data.buffer = NULL;
   data.buffer_length = 0;
-  success = Dart_TimelineGetTrace(AppendStreamConsumer, &data);
+  success = Dart_GlobalTimelineGetTrace(AppendStreamConsumer, &data);
   EXPECT(success);
   buffer = reinterpret_cast<char*>(data.buffer);
   buffer_length = data.buffer_length;
@@ -9418,7 +9480,7 @@
   bool success = false;
 
   // Enable recording of all streams.
-  Dart_TimelineSetRecordedStreams(DART_TIMELINE_STREAM_ALL);
+  Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_ALL);
 
   // Invoke main, which will be compiled resulting in a compiler event in
   // the timeline.
@@ -9430,7 +9492,7 @@
 
   // Grab the trace.
   AppendData data;
-  success = Dart_TimelineGetTrace(AppendStreamConsumer, &data);
+  success = Dart_GlobalTimelineGetTrace(AppendStreamConsumer, &data);
   EXPECT(success);
   buffer = reinterpret_cast<char*>(data.buffer);
   buffer_length = data.buffer_length;
@@ -9479,7 +9541,7 @@
 
   // Grab the trace.
   AppendData data;
-  success = Dart_TimelineGetTrace(AppendStreamConsumer, &data);
+  success = Dart_GlobalTimelineGetTrace(AppendStreamConsumer, &data);
   EXPECT(success);
   buffer = reinterpret_cast<char*>(data.buffer);
   buffer_length = data.buffer_length;
@@ -9502,6 +9564,16 @@
 }
 
 
+static const char* arg_names[] = {
+  "arg0"
+};
+
+
+static const char* arg_values[] = {
+  "value0"
+};
+
+
 TEST_CASE(Timeline_Dart_GlobalTimelineGetTrace) {
   const char* kScriptChars =
     "bar() => 'z';\n"
@@ -9519,6 +9591,26 @@
     lib = TestCase::LoadTestScript(kScriptChars, NULL);
   }
 
+  {
+    // Add something to the embedder stream.
+    Dart_TimelineEvent("TRACE_EVENT",
+                       Dart_TimelineGetMicros(),
+                       0,
+                       Dart_Timeline_Event_Begin,
+                       1,
+                       &arg_names[0],
+                       &arg_values[0]);
+    // Add counter to the embedder stream.
+    Dart_TimelineEvent("COUNTER_EVENT",
+                       Dart_TimelineGetMicros(),
+                       0,
+                       Dart_Timeline_Event_Counter,
+                       0,
+                       NULL,
+                       NULL);
+    Dart_SetThreadName("CUSTOM THREAD NAME");
+  }
+
   // Invoke main, which will be compiled resulting in a compiler event in
   // the timeline.
   Dart_Handle result = Dart_Invoke(lib,
@@ -9558,6 +9650,11 @@
   EXPECT_SUBSTRING("\"name\":\"CompileFunction\"", buffer);
   EXPECT_SUBSTRING("\"function\":\"::_main\"", buffer);
   EXPECT_NOTSUBSTRING("\"function\":\"::_bar\"", buffer);
+  EXPECT_SUBSTRING("TRACE_EVENT", buffer);
+  EXPECT_SUBSTRING("arg0", buffer);
+  EXPECT_SUBSTRING("value0", buffer);
+  EXPECT_SUBSTRING("COUNTER_EVENT", buffer);
+  EXPECT_SUBSTRING("CUSTOM THREAD NAME", buffer);
 
   // Free buffer allocated by AppendStreamConsumer
   free(data.buffer);
@@ -9772,6 +9869,194 @@
   EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer);
 }
 
+static bool start_called = false;
+static bool stop_called = false;
+
+static void StartRecording() {
+  start_called = true;
+}
+
+static void StopRecording() {
+  stop_called = true;
+}
+
+
+TEST_CASE(Timeline_Dart_EmbedderTimelineStartStopRecording) {
+  Dart_SetEmbedderTimelineCallbacks(StartRecording, StopRecording);
+
+  EXPECT(!start_called);
+  EXPECT(!stop_called);
+  Timeline::SetStreamEmbedderEnabled(true);
+  EXPECT(start_called);
+  EXPECT(!stop_called);
+
+  start_called = false;
+  stop_called = false;
+  EXPECT(!start_called);
+  EXPECT(!stop_called);
+  Timeline::SetStreamEmbedderEnabled(false);
+  EXPECT(!start_called);
+  EXPECT(stop_called);
+}
+
+
+TEST_CASE(Dart_LoadLibraryPatch_1) {
+  const char* kScriptChars1 =
+      "class A {\n"
+      "  int foo() { return 10; }\n"
+      "  external int zoo();\n"
+      "  external static int moo();\n"
+      "}\n"
+      "main() { new A().foo(); }\n"
+      "foozoo() { new A().zoo(); }\n"
+      "foomoo() { A.moo(); }\n";
+
+  const char* kScriptChars2 =
+      "patch class A {\n"
+      "  /* patch */ int zoo() { return 1; }\n"
+      "  /* patch */ static int moo() { return 1; }\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars1, NULL);
+  Dart_Handle result = Dart_Invoke(lib,
+                                   NewString("main"),
+                                   0,
+                                   NULL);
+  EXPECT_VALID(result);
+  Dart_Handle url = NewString("test-lib-patch");
+  Dart_Handle source = NewString(kScriptChars2);
+  result = Dart_LibraryLoadPatch(lib, url, source);
+  EXPECT_VALID(result);
+  result = Dart_FinalizeLoading(false);
+  EXPECT_VALID(result);
+  result = Dart_Invoke(lib,
+                       NewString("foozoo"),
+                       0,
+                       NULL);
+  EXPECT_VALID(result);
+  result = Dart_Invoke(lib,
+                       NewString("foomoo"),
+                       0,
+                       NULL);
+  EXPECT_VALID(result);
+}
+
+
+TEST_CASE(Dart_LoadLibraryPatch_Error1) {
+  const char* kScriptChars1 =
+      "class A {\n"
+      "  int foo() { return 10; }\n"
+      "  external int zoo();\n"
+      "}\n"
+      "main() { new A().foo(); }\n"
+      "foozoo() { new A().zoo(); }\n";
+
+  const char* kScriptChars2 =
+      "patch class A {\n"
+      "  /* patch */ int zoo() { return 1; }\n"
+      "  /* patch */ int fld1;\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars1, NULL);
+  Dart_Handle result = Dart_Invoke(lib,
+                                   NewString("main"),
+                                   0,
+                                   NULL);
+  EXPECT_VALID(result);
+  Dart_Handle url = NewString("test-lib-patch");
+  Dart_Handle source = NewString(kScriptChars2);
+  // We don't expect to be able to patch in this case as new fields
+  // are being added.
+  result = Dart_LibraryLoadPatch(lib, url, source);
+  EXPECT_VALID(result);
+  result = Dart_FinalizeLoading(false);
+  EXPECT_VALID(result);
+  result = Dart_Invoke(lib,
+                       NewString("foozoo"),
+                       0,
+                       NULL);
+  EXPECT(Dart_IsError(result));
+}
+
+
+TEST_CASE(Dart_LoadLibraryPatch_Error2) {
+  const char* kScriptChars1 =
+      "class A {\n"
+      "  int foo() { return 10; }\n"
+      "  int zoo() { return 20; }\n"
+      "}\n"
+      "main() { new A().foo(); }\n"
+      "foozoo() { new A().zoo(); }\n";
+
+  const char* kScriptChars2 =
+      "patch class A {\n"
+      "  /* patch */ int zoo() { return 1; }\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars1, NULL);
+  Dart_Handle result = Dart_Invoke(lib,
+                                   NewString("main"),
+                                   0,
+                                   NULL);
+  EXPECT_VALID(result);
+  Dart_Handle url = NewString("test-lib-patch");
+  Dart_Handle source = NewString(kScriptChars2);
+  // We don't expect to be able to patch in this case as a non external
+  // method is being patched.
+  result = Dart_LibraryLoadPatch(lib, url, source);
+  EXPECT_VALID(result);
+  result = Dart_FinalizeLoading(false);
+  EXPECT_VALID(result);
+  result = Dart_Invoke(lib,
+                       NewString("foozoo"),
+                       0,
+                       NULL);
+  EXPECT(Dart_IsError(result));
+  OS::Print("Patched class executed\n");
+}
+
+
+TEST_CASE(Dart_LoadLibraryPatch_Error3) {
+  const char* kScriptChars1 =
+      "class A {\n"
+      "  int foo() { return 10; }\n"
+      "  external int zoo();\n"
+      "}\n"
+      "main() { new A().foo(); }\n"
+      "foozoo() { new A().zoo(); }\n";
+
+  const char* kScriptChars2 =
+      "patch class A {\n"
+      "  /* patch */ int zoo() { return 1; }\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars1, NULL);
+  Dart_Handle result = Dart_Invoke(lib,
+                                   NewString("main"),
+                                   0,
+                                   NULL);
+  // We invoke the foozoo method to ensure that code for 'zoo' is generated
+  // which throws NoSuchMethod.
+  result = Dart_Invoke(lib,
+                       NewString("foozoo"),
+                       0,
+                       NULL);
+  EXPECT(Dart_IsError(result));
+  Dart_Handle url = NewString("test-lib-patch");
+  Dart_Handle source = NewString(kScriptChars2);
+  // We don't expect to be able to patch in this case as the function being
+  // patched has already executed.
+  result = Dart_LibraryLoadPatch(lib, url, source);
+  EXPECT_VALID(result);
+  result = Dart_FinalizeLoading(false);
+  EXPECT_VALID(result);
+  result = Dart_Invoke(lib,
+                       NewString("foozoo"),
+                       0,
+                       NULL);
+  EXPECT(Dart_IsError(result));
+}
+
 #endif  // !PRODUCT
 
 }  // namespace dart
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 3845949..ea55b49 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -41,25 +41,23 @@
     // grows from high to low addresses).
     OSThread* os_thread = thread->os_thread();
     ASSERT(os_thread != NULL);
-    uword current_sp = Isolate::GetCurrentStackPointer();
+    uword current_sp = Thread::GetCurrentStackPointer();
     if (current_sp > os_thread->stack_base()) {
       os_thread->set_stack_base(current_sp);
     }
-    // Save the Isolate's current stack limit and adjust the stack
+    // Save the Thread's current stack limit and adjust the stack
     // limit based on the thread's stack_base.
-    Isolate* isolate = thread->isolate();
-    ASSERT(isolate == Isolate::Current());
-    saved_stack_limit_ = isolate->saved_stack_limit();
-    isolate->SetStackLimitFromStackBase(os_thread->stack_base());
+    ASSERT(thread->isolate() == Isolate::Current());
+    saved_stack_limit_ = thread->saved_stack_limit();
+    thread->SetStackLimitFromStackBase(os_thread->stack_base());
   }
 
   ~ScopedIsolateStackLimits() {
-    Isolate* isolate = thread_->isolate();
-    ASSERT(isolate == Isolate::Current());
+    ASSERT(thread_->isolate() == Isolate::Current());
     // Since we started with a stack limit of 0 we should be getting back
     // to a stack limit of 0 when all nested invocations are done and
     // we have bottomed out.
-    isolate->SetStackLimit(saved_stack_limit_);
+    thread_->SetStackLimit(saved_stack_limit_);
   }
 
  private:
@@ -138,12 +136,14 @@
 
 RawObject* DartEntry::InvokeClosure(const Array& arguments,
                                     const Array& arguments_descriptor) {
-  Instance& instance = Instance::Handle();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Instance& instance = Instance::Handle(zone);
   instance ^= arguments.At(0);
   // Get the entrypoint corresponding to the closure function or to the call
   // method of the instance. This will result in a compilation of the function
   // if it is not already compiled.
-  Function& function = Function::Handle();
+  Function& function = Function::Handle(zone);
   if (instance.IsCallable(&function)) {
     // Only invoke the function if its arguments are compatible.
     const ArgumentsDescriptor args_desc(arguments_descriptor);
@@ -162,29 +162,29 @@
     // call method. If the arguments didn't match, go to noSuchMethod instead
     // of infinitely recursing on the getter.
   } else {
-    const String& getter_name = String::Handle(Symbols::New("get:call"));
-    Class& cls = Class::Handle(instance.clazz());
+    const String& getter_name = Symbols::GetCall();
+    Class& cls = Class::Handle(zone, instance.clazz());
     while (!cls.IsNull()) {
       function ^= cls.LookupDynamicFunction(getter_name);
       if (!function.IsNull()) {
-        Isolate* isolate = Isolate::Current();
-        volatile uword c_stack_pos = Isolate::GetCurrentStackPointer();
+        Isolate* isolate = thread->isolate();
+        volatile uword c_stack_pos = Thread::GetCurrentStackPointer();
         volatile uword c_stack_limit = OSThread::Current()->stack_base() -
                                        OSThread::GetSpecifiedStackSize();
 #if !defined(USING_SIMULATOR)
-        ASSERT(c_stack_limit == isolate->saved_stack_limit());
+        ASSERT(c_stack_limit == thread->saved_stack_limit());
 #endif
 
         if (c_stack_pos < c_stack_limit) {
           const Instance& exception =
-            Instance::Handle(isolate->object_store()->stack_overflow());
-          return UnhandledException::New(exception, Stacktrace::Handle());
+            Instance::Handle(zone, isolate->object_store()->stack_overflow());
+          return UnhandledException::New(exception, Stacktrace::Handle(zone));
         }
 
-        const Array& getter_arguments = Array::Handle(Array::New(1));
+        const Array& getter_arguments = Array::Handle(zone, Array::New(1));
         getter_arguments.SetAt(0, instance);
         const Object& getter_result =
-              Object::Handle(DartEntry::InvokeFunction(function,
+              Object::Handle(zone, DartEntry::InvokeFunction(function,
                                                        getter_arguments));
         if (getter_result.IsError()) {
           return getter_result.raw();
@@ -195,8 +195,8 @@
         // This otherwise unnecessary handle is used to prevent clang from
         // doing tail call elimination, which would make the stack overflow
         // check above ineffective.
-        Object& result = Object::Handle(InvokeClosure(arguments,
-                                                      arguments_descriptor));
+        Object& result = Object::Handle(zone,
+            InvokeClosure(arguments, arguments_descriptor));
         return result.raw();
       }
       cls = cls.SuperClass();
diff --git a/runtime/vm/dart_entry_test.cc b/runtime/vm/dart_entry_test.cc
index a661d5b..d075819 100644
--- a/runtime/vm/dart_entry_test.cc
+++ b/runtime/vm/dart_entry_test.cc
@@ -30,7 +30,7 @@
   EXPECT_EQ(true, CompilerTest::TestCompileScript(lib, script));
   EXPECT(ClassFinalizer::ProcessPendingClasses());
   Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("A"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
   String& name = String::Handle(String::New("foo"));
   Function& function = Function::Handle(cls.LookupStaticFunction(name));
@@ -58,7 +58,7 @@
   EXPECT_EQ(true, CompilerTest::TestCompileScript(lib, script));
   EXPECT(ClassFinalizer::ProcessPendingClasses());
   Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("A"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
   String& name = String::Handle(String::New("foo"));
   Function& function = Function::Handle(cls.LookupStaticFunction(name));
@@ -84,14 +84,14 @@
   EXPECT_EQ(true, CompilerTest::TestCompileScript(lib, script));
   EXPECT(ClassFinalizer::ProcessPendingClasses());
   Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("A"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
 
   // Invoke the constructor.
   const Instance& instance = Instance::Handle(Instance::New(cls));
   const Array& constructor_arguments = Array::Handle(Array::New(1));
   constructor_arguments.SetAt(0, instance);
-  String& constructor_name = String::Handle(Symbols::New("A."));
+  String& constructor_name = String::Handle(Symbols::New(thread, "A."));
   Function& constructor =
     Function::Handle(cls.LookupConstructor(constructor_name));
   ASSERT(!constructor.IsNull());
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index dda7b34..aa66533 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -27,6 +27,7 @@
 #include "vm/stub_code.h"
 #include "vm/symbols.h"
 #include "vm/thread_interrupter.h"
+#include "vm/timeline.h"
 #include "vm/token_position.h"
 #include "vm/visitor.h"
 
@@ -44,7 +45,6 @@
             "handler instead.  This handler dispatches breakpoints to "
             "the VM service.");
 
-DECLARE_FLAG(bool, trace_isolates);
 DECLARE_FLAG(bool, warn_on_pause_with_no_debugger);
 
 
@@ -1071,12 +1071,14 @@
                         Array::Handle(Array::MakeArray(param_values)));
   } else {
     const Object& receiver = Object::Handle(GetReceiver());
+    const Class& method_cls = Class::Handle(function().origin());
     ASSERT(receiver.IsInstance() || receiver.IsNull());
     if (!(receiver.IsInstance() || receiver.IsNull())) {
       return Object::null();
     }
     const Instance& inst = Instance::Cast(receiver);
-    return inst.Evaluate(expr,
+    return inst.Evaluate(method_cls,
+                         expr,
                          Array::Handle(Array::MakeArray(param_names)),
                          Array::Handle(Array::MakeArray(param_values)));
   }
@@ -1519,7 +1521,7 @@
     }
     if (frame->IsDartFrame()) {
       code = frame->LookupDartCode();
-      if (code.is_optimized() && !FLAG_precompiled_mode) {
+      if (code.is_optimized() && !FLAG_precompiled_runtime) {
         deopt_frame = DeoptimizeToArray(thread, frame, code);
         for (InlinedFunctionsIterator it(code, frame->pc());
              !it.Done();
@@ -2362,7 +2364,8 @@
 
 RawObject* Debugger::GetStaticField(const Class& cls,
                                     const String& field_name) {
-  const Field& fld = Field::Handle(cls.LookupStaticField(field_name));
+  const Field& fld =
+      Field::Handle(cls.LookupStaticFieldAllowPrivate(field_name));
   if (!fld.IsNull()) {
     // Return the value in the field if it has been initialized already.
     const Instance& value = Instance::Handle(fld.StaticValue());
@@ -2558,7 +2561,7 @@
     Thread* thread = Thread::Current();
     DisableThreadInterruptsScope dtis(thread);
     TimelineDurationScope tds(thread,
-                              isolate_->GetDebuggerStream(),
+                              Timeline::GetDebuggerStream(),
                               "Debugger Pause");
     InvokeEventHandler(event);
   }
diff --git a/runtime/vm/debugger_api_impl.cc b/runtime/vm/debugger_api_impl.cc
index 829f0f5..f98b60a 100644
--- a/runtime/vm/debugger_api_impl.cc
+++ b/runtime/vm/debugger_api_impl.cc
@@ -568,7 +568,9 @@
                                           Array::empty_array()));
   } else if (target.IsInstance()) {
     const Instance& inst = Instance::Cast(target);
-    return Api::NewHandle(T, inst.Evaluate(expr,
+    const Class& receiver_cls = Class::Handle(Z, inst.clazz());
+    return Api::NewHandle(T, inst.Evaluate(receiver_cls,
+                                           expr,
                                            Array::empty_array(),
                                            Array::empty_array()));
   } else if (target.IsLibrary()) {
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 1aa11b7..ecef279 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -139,8 +139,7 @@
   deferred_objects_ = NULL;
   deferred_objects_count_ = 0;
   if (FLAG_support_timeline && (deopt_start_micros_ != 0)) {
-    Isolate* isolate = Isolate::Current();
-    TimelineStream* compiler_stream = isolate->GetCompilerStream();
+    TimelineStream* compiler_stream = Timeline::GetCompilerStream();
     ASSERT(compiler_stream != NULL);
     if (compiler_stream->Enabled()) {
       // Allocate all Dart objects needed before calling StartEvent,
@@ -667,9 +666,14 @@
       return;
     }
 
-    *dest_addr = reinterpret_cast<intptr_t>(Object::null());
-    deopt_context->DeferPcMarkerMaterialization(
-        object_table_index_, dest_addr);
+    // We don't always have the Code object for the frame's corresponding
+    // unoptimized code as it may have been collected. Use a stub as the pc
+    // marker until we can recreate that Code object during deferred
+    // materialization to maintain the invariant that Dart frames always have
+    // a pc marker.
+    *reinterpret_cast<RawObject**>(dest_addr) =
+        StubCode::FrameAwaitingMaterialization_entry()->code();
+    deopt_context->DeferPcMarkerMaterialization(object_table_index_, dest_addr);
   }
 
  private:
@@ -1179,11 +1183,11 @@
     MaterializeObjectInstr* mat = materializations_[i];
     // Class of the instance to allocate.
     AddConstant(mat->cls(), dest_index++);
-    AddConstant(Smi::Handle(Smi::New(mat->num_variables())), dest_index++);
+    AddConstant(Smi::ZoneHandle(Smi::New(mat->num_variables())), dest_index++);
     for (intptr_t i = 0; i < mat->InputCount(); i++) {
       if (!mat->InputAt(i)->BindsToConstantNull()) {
         // Emit offset-value pair.
-        AddConstant(Smi::Handle(Smi::New(mat->FieldOffsetAt(i))),
+        AddConstant(Smi::ZoneHandle(Smi::New(mat->FieldOffsetAt(i))),
                     dest_index++);
         AddCopy(mat->InputAt(i), mat->LocationAt(i), dest_index++);
       }
diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
index 1fe4215..9f3d4a3 100644
--- a/runtime/vm/disassembler.cc
+++ b/runtime/vm/disassembler.cc
@@ -99,8 +99,7 @@
 
 class FindAddrVisitor : public FindObjectVisitor {
  public:
-  explicit FindAddrVisitor(uword addr)
-      : FindObjectVisitor(Isolate::Current()), addr_(addr) { }
+  explicit FindAddrVisitor(uword addr) : addr_(addr) { }
   virtual ~FindAddrVisitor() { }
 
   virtual uword filter_addr() const { return addr_; }
@@ -194,6 +193,7 @@
   code.Disassemble();
   THR_Print("}\n");
 
+#if defined(TARGET_ARCH_IA32)
   THR_Print("Pointer offsets for function: {\n");
   // Pointer offsets are stored in descending order.
   Object& obj = Object::Handle();
@@ -204,6 +204,12 @@
               code.GetPointerOffsetAt(i), addr, obj.ToCString());
   }
   THR_Print("}\n");
+#else
+  ASSERT(code.pointer_offsets_length() == 0);
+#endif
+
+  const ObjectPool& object_pool = ObjectPool::Handle(code.GetObjectPool());
+  object_pool.DebugPrint();
 
   THR_Print("PC Descriptors for function '%s' {\n", function_fullname);
   PcDescriptors::PrintHeaderString();
@@ -234,9 +240,6 @@
     THR_Print("}\n");
   }
 
-  const ObjectPool& object_pool = ObjectPool::Handle(code.GetObjectPool());
-  object_pool.DebugPrint();
-
   THR_Print("Stackmaps for function '%s' {\n", function_fullname);
   if (code.stackmaps() != Array::null()) {
     const Array& stackmap_table = Array::Handle(code.stackmaps());
diff --git a/runtime/vm/disassembler_mips.cc b/runtime/vm/disassembler_mips.cc
index b9e0987..22fe462 100644
--- a/runtime/vm/disassembler_mips.cc
+++ b/runtime/vm/disassembler_mips.cc
@@ -581,12 +581,16 @@
         Format(instr, "c.ule.'fmt 'fs, 'ft");
         break;
       }
-      case COP1_CVT_D: {
-        Format(instr, "cvt.d.'fmt 'fd, 'fs");
+      case COP1_TRUNC_W: {
+        Format(instr, "trunc.w.'fmt 'fd, 'fs");
         break;
       }
-      case COP1_CVT_W: {
-        Format(instr, "cvt.w.'fmt 'fd, 'fs");
+      case COP1_CVT_S: {
+        Format(instr, "cvt.s.'fmt 'fd, 'fs");
+        break;
+      }
+      case COP1_CVT_D: {
+        Format(instr, "cvt.d.'fmt 'fd, 'fs");
         break;
       }
       default: {
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 84ca377..a215851 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -10,6 +10,7 @@
 #include "vm/dart_entry.h"
 #include "vm/debugger.h"
 #include "vm/flags.h"
+#include "vm/log.h"
 #include "vm/object.h"
 #include "vm/object_store.h"
 #include "vm/stack_frame.h"
@@ -23,9 +24,6 @@
             "Prints a stack trace everytime a throw occurs.");
 
 
-const char* Exceptions::kCastErrorDstName = "type cast";
-
-
 class StacktraceBuilder : public ValueObject {
  public:
   StacktraceBuilder() { }
@@ -240,7 +238,7 @@
       StubCode::JumpToExceptionHandler_entry()->EntryPoint());
 
   // Unpoison the stack before we tear it down in the generated stub code.
-  uword current_sp = Isolate::GetCurrentStackPointer() - 1024;
+  uword current_sp = Thread::GetCurrentStackPointer() - 1024;
   ASAN_UNPOISON(reinterpret_cast<void*>(current_sp),
                 stack_pointer - current_sp);
 
@@ -272,7 +270,8 @@
   AbstractType& type = AbstractType::Handle(zone, AbstractType::null());
   while (true) {
     if (test_class.raw() == error_class.raw()) {
-      return error_class.LookupInstanceField(Symbols::_stackTrace());
+      return error_class.LookupInstanceFieldAllowPrivate(
+          Symbols::_stackTrace());
     }
     type = test_class.super_type();
     if (type.IsNull()) return Field::null();
@@ -371,8 +370,8 @@
   ASSERT(handler_pc != 0);
 
   if (FLAG_print_stacktrace_at_throw) {
-    OS::Print("Exception '%s' thrown:\n", exception.ToCString());
-    OS::Print("%s\n", stacktrace.ToCString());
+    THR_Print("Exception '%s' thrown:\n", exception.ToCString());
+    THR_Print("%s\n", stacktrace.ToCString());
   }
   if (handler_exists) {
     // Found a dart handler for the exception, jump to it.
@@ -421,7 +420,10 @@
 // TODO(hausner): Rename this NewCoreInstance to call out the fact that
 // the class name is resolved in the core library implicitly?
 RawInstance* Exceptions::NewInstance(const char* class_name) {
-  const String& cls_name = String::Handle(Symbols::New(class_name));
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const String& cls_name = String::Handle(zone,
+                                          Symbols::New(thread, class_name));
   const Library& core_lib = Library::Handle(Library::CoreLibrary());
   // No ambiguity error expected: passing NULL.
   Class& cls = Class::Handle(core_lib.LookupClass(cls_name));
@@ -434,18 +436,20 @@
 // Allocate, initialize, and throw a TypeError or CastError.
 // If error_msg is not null, throw a TypeError, even for a type cast.
 void Exceptions::CreateAndThrowTypeError(TokenPosition location,
-                                         const String& src_type_name,
-                                         const String& dst_type_name,
+                                         const AbstractType& src_type,
+                                         const AbstractType& dst_type,
                                          const String& dst_name,
-                                         const String& error_msg) {
-  const Array& args = Array::Handle(Array::New(7));
+                                         const String& bound_error_msg) {
+  ASSERT(!dst_name.IsNull());  // Pass Symbols::Empty() instead.
+  Zone* zone = Thread::Current()->zone();
+  const Array& args = Array::Handle(zone, Array::New(4));
 
   ExceptionType exception_type =
-      (error_msg.IsNull() && dst_name.Equals(kCastErrorDstName)) ?
-          kCast : kType;
+      (bound_error_msg.IsNull() &&
+       (dst_name.raw() == Symbols::InTypeCast().raw())) ? kCast : kType;
 
   DartFrameIterator iterator;
-  const Script& script = Script::Handle(GetCallerScript(&iterator));
+  const Script& script = Script::Handle(zone, GetCallerScript(&iterator));
   intptr_t line;
   intptr_t column = -1;
   if (script.HasSource()) {
@@ -454,32 +458,77 @@
     script.GetTokenLocation(location, &line, NULL);
   }
   // Initialize '_url', '_line', and '_column' arguments.
-  args.SetAt(0, String::Handle(script.url()));
-  args.SetAt(1, Smi::Handle(Smi::New(line)));
-  args.SetAt(2, Smi::Handle(Smi::New(column)));
+  args.SetAt(0, String::Handle(zone, script.url()));
+  args.SetAt(1, Smi::Handle(zone, Smi::New(line)));
+  args.SetAt(2, Smi::Handle(zone, Smi::New(column)));
 
-  // Initialize '_srcType', '_dstType', '_dstName', and '_errorMsg'.
-  args.SetAt(3, src_type_name);
-  args.SetAt(4, dst_type_name);
-  args.SetAt(5, dst_name);
-  args.SetAt(6, error_msg);
+  // Construct '_errorMsg'.
+  const GrowableObjectArray& pieces = GrowableObjectArray::Handle(zone,
+      GrowableObjectArray::New(20));
+
+  // Print bound error first, if any.
+  if (!bound_error_msg.IsNull() && (bound_error_msg.Length() > 0)) {
+    pieces.Add(bound_error_msg);
+    pieces.Add(Symbols::NewLine());
+  }
+
+  // If dst_type is malformed or malbounded, only print the embedded error.
+  if (!dst_type.IsNull()) {
+    const LanguageError& error = LanguageError::Handle(zone, dst_type.error());
+    if (!error.IsNull()) {
+      // Print the embedded error only.
+      pieces.Add(String::Handle(zone, String::New(error.ToErrorCString())));
+      pieces.Add(Symbols::NewLine());
+    } else {
+      // Describe the type error.
+      if (!src_type.IsNull()) {
+        pieces.Add(Symbols::TypeQuote());
+        pieces.Add(String::Handle(zone, src_type.UserVisibleName()));
+        pieces.Add(Symbols::QuoteIsNotASubtypeOf());
+      }
+      pieces.Add(Symbols::TypeQuote());
+      pieces.Add(String::Handle(zone, dst_type.UserVisibleName()));
+      pieces.Add(Symbols::SingleQuote());
+      if (exception_type == kCast) {
+        pieces.Add(dst_name);
+      } else if (dst_name.Length() > 0) {
+        pieces.Add(Symbols::SpaceOfSpace());
+        pieces.Add(Symbols::SingleQuote());
+        pieces.Add(dst_name);
+        pieces.Add(Symbols::SingleQuote());
+      }
+      // Print URIs of src and dst types.
+      // Do not print "where" when no URIs get printed.
+      bool printed_where = false;
+      if (!src_type.IsNull()) {
+        const String& uris = String::Handle(zone, src_type.EnumerateURIs());
+        if (uris.Length() > Symbols::SpaceIsFromSpace().Length()) {
+          printed_where = true;
+          pieces.Add(Symbols::SpaceWhereNewLine());
+          pieces.Add(uris);
+        }
+      }
+      if (!dst_type.IsDynamicType() && !dst_type.IsVoidType()) {
+        const String& uris = String::Handle(zone, dst_type.EnumerateURIs());
+        if (uris.Length() > Symbols::SpaceIsFromSpace().Length()) {
+          if (!printed_where) {
+            pieces.Add(Symbols::SpaceWhereNewLine());
+          }
+          pieces.Add(uris);
+        }
+      }
+    }
+  }
+  const Array& arr = Array::Handle(zone, Array::MakeArray(pieces));
+  const String& error_msg = String::Handle(zone, String::ConcatAll(arr));
+  args.SetAt(3, error_msg);
 
   // Type errors in the core library may be difficult to diagnose.
   // Print type error information before throwing the error when debugging.
   if (FLAG_print_stacktrace_at_throw) {
-    if (!error_msg.IsNull()) {
-      OS::Print("%s\n", error_msg.ToCString());
-    }
-    OS::Print("'%s': Failed type check: line %" Pd " pos %" Pd ": ",
-              String::Handle(script.url()).ToCString(), line, column);
-    if (!dst_name.IsNull() && (dst_name.Length() > 0)) {
-      OS::Print("type '%s' is not a subtype of type '%s' of '%s'.\n",
-                src_type_name.ToCString(),
-                dst_type_name.ToCString(),
-                dst_name.ToCString());
-    } else {
-      OS::Print("type error.\n");
-    }
+    THR_Print("'%s': Failed type check: line %" Pd " pos %" Pd ": ",
+              String::Handle(zone, script.url()).ToCString(), line, column);
+    THR_Print("%s\n", error_msg.ToCString());
   }
 
   // Throw TypeError or CastError instance.
diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h
index 86e3261..e0a64c8 100644
--- a/runtime/vm/exceptions.h
+++ b/runtime/vm/exceptions.h
@@ -11,28 +11,21 @@
 namespace dart {
 
 // Forward declarations.
+class AbstractType;
 class Array;
-class Class;
 class DartFrameIterator;
 class Error;
 class Instance;
 class Integer;
-class Object;
 class RawInstance;
 class RawObject;
 class RawScript;
 class RawStacktrace;
-class RawString;
-class Script;
-class StackFrame;
-class Stacktrace;
 class String;
 class Thread;
 
 class Exceptions : AllStatic {
  public:
-  static const char* kCastErrorDstName;
-
   static void Throw(Thread* thread, const Instance& exception);
   static void ReThrow(Thread* thread,
                       const Instance& exception,
@@ -44,10 +37,10 @@
   static RawScript* GetCallerScript(DartFrameIterator* iterator);
   static RawInstance* NewInstance(const char* class_name);
   static void CreateAndThrowTypeError(TokenPosition location,
-                                      const String& src_type_name,
-                                      const String& dst_type_name,
+                                      const AbstractType& src_type,
+                                      const AbstractType& dst_type,
                                       const String& dst_name,
-                                      const String& error_msg);
+                                      const String& bound_error_msg);
 
   enum ExceptionType {
     kNone,
diff --git a/runtime/vm/find_code_object_test.cc b/runtime/vm/find_code_object_test.cc
index caece81..bac5c1e 100644
--- a/runtime/vm/find_code_object_test.cc
+++ b/runtime/vm/find_code_object_test.cc
@@ -55,7 +55,7 @@
   source = String::New(scriptChars);
   script = Script::New(url, source, RawScript::kScriptTag);
   EXPECT(CompilerTest::TestCompileScript(lib, script));
-  clsA = lib.LookupClass(String::Handle(Symbols::New("A")));
+  clsA = lib.LookupClass(String::Handle(Symbols::New(thread, "A")));
   EXPECT(!clsA.IsNull());
   ClassFinalizer::ProcessPendingClasses();
   for (int i = 0; i < kNumFunctions; i++) {
@@ -105,7 +105,7 @@
   source = String::New(scriptChars);
   script = Script::New(url, source, RawScript::kScriptTag);
   EXPECT(CompilerTest::TestCompileScript(lib, script));
-  clsB = lib.LookupClass(String::Handle(Symbols::New("B")));
+  clsB = lib.LookupClass(String::Handle(Symbols::New(thread, "B")));
   EXPECT(!clsB.IsNull());
   ClassFinalizer::ProcessPendingClasses();
   for (int i = 0; i < kNumFunctions; i++) {
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index 35a7756..bbc7f05 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -21,15 +21,17 @@
 //   R(name, product_value, type, default_value, comment)
 //   C(name, precompiled_value, product_value, type, default_value, comment)
 #define FLAG_LIST(P, R, D, C)                                                  \
-C(allow_absolute_addresses, false, true, bool, true,                           \
+P(allow_absolute_addresses, bool, true,                                        \
   "Allow embedding absolute addresses in generated code.")                     \
-C(always_megamorphic_calls, true, false, bool, false,                          \
+P(always_megamorphic_calls, bool, false,                                       \
   "Instance call always as megamorphic.")                                      \
 C(background_compilation, false, false, bool, false,                           \
   "Run optimizing compilation in background")                                  \
+R(break_at_isolate_spawn, false, bool, false,                                  \
+  "Insert a one-time breakpoint at the entrypoint for all spawned isolates")   \
 C(collect_code, false, true, bool, true,                                       \
   "Attempt to GC infrequently used code.")                                     \
-C(collect_dynamic_function_names, true, false, bool, false,                    \
+P(collect_dynamic_function_names, bool, false,                                 \
   "Collects all dynamic function names to identify unique targets")            \
 R(dedup_instructions, true, bool, false,                                       \
   "Canonicalize instructions when precompiling.")                              \
@@ -45,8 +47,6 @@
   "Disassemble optimized code.")                                               \
 R(dump_symbol_stats, false, bool, false,                                       \
   "Dump symbol table statistics")                                              \
-C(emit_edge_counters, false, true, bool, true,                                 \
-  "Emit edge counters")                                                        \
 R(enable_asserts, false, bool, false,                                          \
   "Enable assert statements.")                                                 \
 C(enable_mirrors, false, false, bool, true,                                    \
@@ -57,7 +57,10 @@
   "Report error for bad overrides.")                                           \
 R(error_on_bad_type, false, bool, false,                                       \
   "Report error for malformed types.")                                         \
-C(fields_may_be_reset, true, false, bool, false,                               \
+P(external_max_size, int, (kWordSize <= 4) ? 512 : 1024,                       \
+  "Max total size of external allocations in MB, or 0 for unlimited,"          \
+  "e.g: --external_max_size=1024 allows up to 1024MB of externals")            \
+P(fields_may_be_reset, bool, false,                                            \
   "Don't optimize away static field initialization")                           \
 C(force_clone_compiler_objects, false, false, bool, false,                     \
   "Force cloning of objects needed in compiler (ICData and Field).")           \
@@ -67,13 +70,13 @@
   "Ratio of getter/setter usage used for double field unboxing heuristics")    \
 P(guess_icdata_cid, bool, true,                                                \
   "Artificially create type feedback for arithmetic etc. operations")          \
-C(ic_range_profiling, false, true, bool, true,                                 \
+P(ic_range_profiling, bool, true,                                              \
   "Generate special IC stubs collecting range information ")                   \
-C(interpret_irregexp, true, false, bool, false,                                \
+P(interpret_irregexp, bool, false,                                             \
   "Use irregexp bytecode interpreter")                                         \
-C(lazy_dispatchers, false, true, bool, true,                                   \
+P(lazy_dispatchers, bool, true,                                                \
   "Generate dispatchers lazily")                                               \
-C(link_natives_lazily, true, false, bool, false,                               \
+P(link_natives_lazily, bool, false,                                            \
   "Link native calls lazily")                                                  \
 C(load_deferred_eagerly, true, true, bool, false,                              \
   "Load deferred libraries eagerly.")                                          \
@@ -85,22 +88,41 @@
   "Merge sin/cos into sincos")                                                 \
 P(new_gen_ext_limit, int, 64,                                                  \
   "maximum total external size (MB) in new gen before triggering GC")          \
-C(optimization_counter_threshold, -1, 30000, int, 30000,                       \
+P(new_gen_semi_max_size, int, (kWordSize <= 4) ? 16 : 32,                      \
+  "Max 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")     \
-C(polymorphic_with_deopt, false, true, bool, true,                             \
+P(old_gen_heap_size, int, (kWordSize <= 4) ? 1536 : 0,                         \
+  "Max size of old gen heap size in MB, or 0 for unlimited,"                   \
+  "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap")            \
+R(pause_isolates_on_start, false, bool, false,                                 \
+  "Pause isolates before starting.")                                           \
+R(pause_isolates_on_exit, false, bool, false,                                  \
+  "Pause isolates exiting.")                                                   \
+R(pause_isolates_on_unhandled_exceptions, false, bool, false,                  \
+  "Pause isolates on unhandled exceptions.")                                   \
+P(polymorphic_with_deopt, bool, true,                                          \
   "Polymorphic calls with deoptimization / megamorphic call")                  \
-C(precompiled_mode, true, false, bool, false,                                  \
-  "Precompilation compiler/runtime mode")                                      \
+P(precompiled_mode, bool, false,                                               \
+  "Precompilation compiler mode")                                              \
+C(precompiled_runtime, true, false, bool, false,                               \
+  "Precompiled runtime mode")                                                  \
 R(pretenure_all, false, bool, false,                                           \
   "Global pretenuring (for testing).")                                         \
 P(pretenure_interval, int, 10,                                                 \
   "Back off pretenuring after this many cycles.")                              \
 P(pretenure_threshold, int, 98,                                                \
   "Trigger pretenuring when this many percent are promoted.")                  \
+R(print_ssa_liveness, false, bool, false,                                      \
+  "Print liveness for ssa variables.")                                         \
+R(print_ssa_liveranges, false, bool, false,                                    \
+  "Print live ranges after allocation.")                                       \
 C(print_stop_message, false, false, bool, false,                               \
   "Print stop message.")                                                       \
 R(profiler, false, bool, true,                                                 \
   "Enable the profiler.")                                                      \
+P(reorder_basic_blocks, bool, true,                                            \
+  "Reorder basic blocks")                                                      \
 R(support_ast_printer, false, bool, true,                                      \
   "Support the AST printer.")                                                  \
 R(support_compiler_stats, false, bool, true,                                   \
@@ -113,28 +135,36 @@
   "Support the IL printer.")                                                   \
 R(support_service, false, bool, true,                                          \
   "Support the service protocol.")                                             \
-R(support_coverage, false, bool, true,                                         \
-  "Support code coverage.")                                                    \
 R(support_timeline, false, bool, true,                                         \
   "Support timeline.")                                                         \
 D(trace_cha, bool, false,                                                      \
   "Trace CHA operations")                                                      \
 D(trace_field_guards, bool, false,                                             \
   "Trace changes in field's cids.")                                            \
+D(trace_isolates, bool, false,                                                 \
+  "Trace isolate creation and shut down.")                                     \
 D(trace_handles, bool, false,                                                  \
   "Traces allocation of handles.")                                             \
 D(trace_optimization, bool, false,                                             \
   "Print optimization details.");                                              \
+R(trace_profiler, false, bool, false,                                          \
+  "Profiler trace")                                                            \
+D(trace_profiler_verbose, bool, false,                                         \
+  "Verbose profiler trace")                                                    \
+D(trace_ssa_allocator, bool, false,                                            \
+  "Trace register allocation over SSA.")                                       \
 D(trace_zones, bool, false,                                                    \
   "Traces allocation sizes in the zone.")                                      \
 P(truncating_left_shift, bool, true,                                           \
   "Optimize left shift to truncate if possible")                               \
-C(use_cha_deopt, false, true, bool, true,                                      \
+P(use_cha_deopt, bool, true,                                                   \
   "Use class hierarchy analysis even if it can cause deoptimization.")         \
-C(use_field_guards, false, true, bool, true,                                   \
+P(use_field_guards, bool, true,                                                \
   "Use field guards and track field types")                                    \
 C(use_osr, false, true, bool, true,                                            \
   "Use OSR")                                                                   \
+R(verbose_dev, false, bool, false,                                             \
+  "Enables verbose messages during development.")                              \
 P(verbose_gc, bool, false,                                                     \
   "Enables verbose GC.")                                                       \
 P(verbose_gc_hdr, int, 40,                                                     \
@@ -143,5 +173,8 @@
   "Enables heap verification after GC.")                                       \
 R(verify_before_gc, false, bool, false,                                        \
   "Enables heap verification before GC.")                                      \
+D(verify_on_transition, bool, false,                                           \
+  "Verify on dart <==> VM.")                                                   \
+
 
 #endif  // VM_FLAG_LIST_H_
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index 3296e09..8c69bc7 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -5,6 +5,7 @@
 #include "vm/flow_graph.h"
 
 #include "vm/bit_vector.h"
+#include "vm/cha.h"
 #include "vm/flow_graph_builder.h"
 #include "vm/flow_graph_compiler.h"
 #include "vm/flow_graph_range_analysis.h"
@@ -19,7 +20,6 @@
 DEFINE_FLAG(bool, trace_smi_widening, false, "Trace Smi->Int32 widening pass.");
 #endif
 DEFINE_FLAG(bool, prune_dead_locals, true, "optimize dead locals away");
-DECLARE_FLAG(bool, reorder_basic_blocks);
 DECLARE_FLAG(bool, verify_compiler);
 
 
@@ -105,8 +105,9 @@
 
 bool FlowGraph::ShouldReorderBlocks(const Function& function,
                                     bool is_optimized) {
-  return is_optimized && FLAG_reorder_basic_blocks &&
-      FLAG_emit_edge_counters && !function.is_intrinsic();
+  return is_optimized
+      && FLAG_reorder_basic_blocks
+      && !function.is_intrinsic();
 }
 
 
@@ -371,6 +372,92 @@
   }
 }
 
+void FlowGraph::ComputeIsReceiverRecursive(
+    PhiInstr* phi, GrowableArray<PhiInstr*>* unmark) const {
+  if (phi->is_receiver() != PhiInstr::kUnknownReceiver) return;
+  phi->set_is_receiver(PhiInstr::kReceiver);
+  for (intptr_t i = 0; i < phi->InputCount(); ++i) {
+    Definition* def = phi->InputAt(i)->definition();
+    if (def->IsParameter() && (def->AsParameter()->index() == 0)) continue;
+    if (!def->IsPhi()) {
+      phi->set_is_receiver(PhiInstr::kNotReceiver);
+      break;
+    }
+    ComputeIsReceiverRecursive(def->AsPhi(), unmark);
+    if (def->AsPhi()->is_receiver() == PhiInstr::kNotReceiver) {
+      phi->set_is_receiver(PhiInstr::kNotReceiver);
+      break;
+    }
+  }
+
+  if (phi->is_receiver() == PhiInstr::kNotReceiver) {
+    unmark->Add(phi);
+  }
+}
+
+
+void FlowGraph::ComputeIsReceiver(PhiInstr* phi) const {
+  GrowableArray<PhiInstr*> unmark;
+  ComputeIsReceiverRecursive(phi, &unmark);
+
+  // Now drain unmark.
+  while (!unmark.is_empty()) {
+    PhiInstr* phi = unmark.RemoveLast();
+    for (Value::Iterator it(phi->input_use_list()); !it.Done(); it.Advance()) {
+      PhiInstr* use = it.Current()->instruction()->AsPhi();
+      if ((use != NULL) && (use->is_receiver() == PhiInstr::kReceiver)) {
+        use->set_is_receiver(PhiInstr::kNotReceiver);
+        unmark.Add(use);
+      }
+    }
+  }
+}
+
+
+bool FlowGraph::IsReceiver(Definition* def) const {
+  if (def->IsParameter()) return (def->AsParameter()->index() == 0);
+  if (!def->IsPhi() || graph_entry()->catch_entries().is_empty()) return false;
+  PhiInstr* phi = def->AsPhi();
+  if (phi->is_receiver() != PhiInstr::kUnknownReceiver) {
+    return (phi->is_receiver() == PhiInstr::kReceiver);
+  }
+  // Not known if this phi is the receiver yet. Compute it now.
+  ComputeIsReceiver(phi);
+  return (phi->is_receiver() == PhiInstr::kReceiver);
+}
+
+
+// Use CHA to determine if the call needs a class check: if the callee's
+// receiver is the same as the caller's receiver and there are no overriden
+// callee functions, then no class check is needed.
+bool FlowGraph::InstanceCallNeedsClassCheck(InstanceCallInstr* call,
+                                            RawFunction::Kind kind) const {
+  if (!FLAG_use_cha_deopt && !isolate()->all_classes_finalized()) {
+    // Even if class or function are private, lazy class finalization
+    // may later add overriding methods.
+    return true;
+  }
+  Definition* callee_receiver = call->ArgumentAt(0);
+  ASSERT(callee_receiver != NULL);
+  if (function().IsDynamicFunction() && IsReceiver(callee_receiver)) {
+    const String& name = (kind == RawFunction::kMethodExtractor)
+        ? String::Handle(zone(), Field::NameFromGetter(call->function_name()))
+        : call->function_name();
+    const Class& cls = Class::Handle(zone(), function().Owner());
+    if (!thread()->cha()->HasOverride(cls, name)) {
+      if (FLAG_trace_cha) {
+        THR_Print("  **(CHA) Instance call needs no check, "
+            "no overrides of '%s' '%s'\n",
+            name.ToCString(), cls.ToCString());
+      }
+      thread()->cha()->AddToLeafClasses(cls);
+      return false;
+    }
+  }
+  return true;
+}
+
+
 
 bool FlowGraph::VerifyUseLists() {
   // Verify the initial definitions.
diff --git a/runtime/vm/flow_graph.h b/runtime/vm/flow_graph.h
index d4d9d2f..0c7aa52 100644
--- a/runtime/vm/flow_graph.h
+++ b/runtime/vm/flow_graph.h
@@ -159,6 +159,9 @@
     return current_ssa_temp_index();
   }
 
+  bool InstanceCallNeedsClassCheck(InstanceCallInstr* call,
+                                   RawFunction::Kind kind) const;
+
   Thread* thread() const { return thread_; }
   Zone* zone() const { return thread()->zone(); }
   Isolate* isolate() const { return thread()->isolate(); }
@@ -300,6 +303,8 @@
   // Remove environments from the instructions which do not deoptimize.
   void EliminateEnvironments();
 
+  bool IsReceiver(Definition* def) const;
+
  private:
   friend class IfConverter;
   friend class BranchSimplifier;
@@ -352,6 +357,10 @@
                         Value* use,
                         bool is_environment_use);
 
+  void ComputeIsReceiver(PhiInstr* phi) const;
+  void ComputeIsReceiverRecursive(PhiInstr* phi,
+                                  GrowableArray<PhiInstr*>* unmark) const;
+
   Thread* thread_;
 
   // DiscoverBlocks computes parent_ and assigned_vars_ which are then used
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index b9bb33c..e2ba4bf 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -14,13 +14,6 @@
 
 namespace dart {
 
-DEFINE_FLAG(bool, print_ssa_liveness, false,
-            "Print liveness for ssa variables.");
-DEFINE_FLAG(bool, trace_ssa_allocator, false,
-            "Trace register allocation over SSA.");
-DEFINE_FLAG(bool, print_ssa_liveranges, false,
-            "Print live ranges after allocation.");
-
 #if defined(DEBUG)
 #define TRACE_ALLOC(statement)                                                 \
   do {                                                                         \
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index c5460be..1f428174 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -40,10 +40,14 @@
             "Trace type check elimination at compile time.");
 
 DECLARE_FLAG(bool, profile_vm);
+DECLARE_FLAG(bool, support_externalizable_strings);
 
 // Quick access to the locally defined zone() method.
 #define Z (zone())
 
+// Quick access to the locally defined thread() method.
+#define T (thread())
+
 // Quick synthetic token position.
 #define ST(token_pos) ((token_pos).ToSynthetic())
 
@@ -1391,7 +1395,7 @@
       new(Z) ZoneGrowableArray<PushArgumentInstr*>(2);
   arguments->Add(push_left);
   arguments->Add(push_right);
-  const String& name = String::ZoneHandle(Z, Symbols::New(node->TokenName()));
+  const String& name = Symbols::Token(node->kind());
   const intptr_t kNumArgsChecked = 2;
   InstanceCallInstr* call = new(Z) InstanceCallInstr(node->token_pos(),
                                                      name,
@@ -1684,12 +1688,10 @@
   ValueGraphVisitor for_value(owner());
   node->left()->Visit(&for_value);
   Append(for_value);
-  const String& dst_name = String::ZoneHandle(
-      Z, Symbols::New(Exceptions::kCastErrorDstName));
   if (CanSkipTypeCheck(node->token_pos(),
                        for_value.value(),
                        type,
-                       dst_name)) {
+                       Symbols::InTypeCast())) {
     ReturnValue(for_value.value());
     return;
   }
@@ -1829,7 +1831,7 @@
   ASSERT(Token::IsRelationalOperator(node->kind()));
   InstanceCallInstr* comp = new(Z) InstanceCallInstr(
       node->token_pos(),
-      String::ZoneHandle(Z, Symbols::New(node->TokenName())),
+      Symbols::Token(node->kind()),
       node->kind(),
       arguments,
       Object::null_array(),
@@ -1865,7 +1867,7 @@
   arguments->Add(push_value);
   InstanceCallInstr* call = new(Z) InstanceCallInstr(
       node->token_pos(),
-      String::ZoneHandle(Z, Symbols::New(node->TokenName())),
+      Symbols::Token(node->kind()),
       node->kind(),
       arguments,
       Object::null_array(),
@@ -2176,8 +2178,13 @@
     }
     Goto(loop_entry);
     exit_ = loop_entry;
+    // Note: the stack overflow check happens on the back branch that jumps
+    // to the increment instruction. The token position for the overflow
+    // check must match the position of the increment expression, so that
+    // the context level (if any) matches the that of the increment
+    // expression.
     AddInstruction(
-        new(Z) CheckStackOverflowInstr(node->token_pos(),
+        new(Z) CheckStackOverflowInstr(node->increment()->token_pos(),
                                        owner()->loop_depth()));
   }
 
@@ -2297,7 +2304,7 @@
   OS::SNPrint(name, 64, ":tmp_local%" Pd, index);
   LocalVariable*  var =
       new(Z) LocalVariable(TokenPosition::kNoSource,
-                           String::ZoneHandle(Z, Symbols::New(name)),
+                           String::ZoneHandle(Z, Symbols::New(T, name)),
                            *value->Type()->ToAbstractType());
   var->set_index(index);
   return var;
@@ -2502,9 +2509,8 @@
   { LocalVariable* closure_tmp_var = EnterTempLocalScope(closure_val,
                                                          node->token_pos());
     // Store type arguments if scope class is generic.
-    const FunctionType& function_type =
-        FunctionType::ZoneHandle(Z, function.SignatureType());
-    const Class& scope_cls = Class::ZoneHandle(Z, function_type.scope_class());
+    const Type& function_type = Type::ZoneHandle(Z, function.SignatureType());
+    const Class& scope_cls = Class::ZoneHandle(Z, function_type.type_class());
     if (scope_cls.IsGeneric()) {
       ASSERT(function.Owner() == scope_cls.raw());
       Value* closure_tmp_val = Bind(new(Z) LoadLocalInstr(*closure_tmp_var,
@@ -2670,30 +2676,37 @@
 
 
 static intptr_t GetResultCidOfNativeFactory(const Function& function) {
-  const Class& function_class = Class::Handle(function.Owner());
-  if (function_class.library() == Library::TypedDataLibrary()) {
-    const String& function_name = String::Handle(function.name());
-    if (!String::EqualsIgnoringPrivateKey(function_name, Symbols::_New())) {
-      return kDynamicCid;
-    }
-    switch (function_class.id()) {
-      case kTypedDataInt8ArrayCid:
-      case kTypedDataUint8ArrayCid:
-      case kTypedDataUint8ClampedArrayCid:
-      case kTypedDataInt16ArrayCid:
-      case kTypedDataUint16ArrayCid:
-      case kTypedDataInt32ArrayCid:
-      case kTypedDataUint32ArrayCid:
-      case kTypedDataInt64ArrayCid:
-      case kTypedDataUint64ArrayCid:
-      case kTypedDataFloat32ArrayCid:
-      case kTypedDataFloat64ArrayCid:
-      case kTypedDataFloat32x4ArrayCid:
-      case kTypedDataInt32x4ArrayCid:
-        return function_class.id();
-      default:
-        return kDynamicCid;  // Unknown.
-    }
+  switch (function.recognized_kind()) {
+    case MethodRecognizer::kTypedData_Int8Array_factory:
+      return kTypedDataInt8ArrayCid;
+    case MethodRecognizer::kTypedData_Uint8Array_factory:
+      return kTypedDataUint8ArrayCid;
+    case MethodRecognizer::kTypedData_Uint8ClampedArray_factory:
+      return kTypedDataUint8ClampedArrayCid;
+    case MethodRecognizer::kTypedData_Int16Array_factory:
+      return kTypedDataInt16ArrayCid;
+    case MethodRecognizer::kTypedData_Uint16Array_factory:
+      return kTypedDataUint16ArrayCid;
+    case MethodRecognizer::kTypedData_Int32Array_factory:
+      return kTypedDataInt32ArrayCid;
+    case MethodRecognizer::kTypedData_Uint32Array_factory:
+      return kTypedDataUint32ArrayCid;
+    case MethodRecognizer::kTypedData_Int64Array_factory:
+      return kTypedDataInt64ArrayCid;
+    case MethodRecognizer::kTypedData_Uint64Array_factory:
+      return kTypedDataUint64ArrayCid;
+    case MethodRecognizer::kTypedData_Float32Array_factory:
+      return kTypedDataFloat32ArrayCid;
+    case MethodRecognizer::kTypedData_Float64Array_factory:
+      return kTypedDataFloat64ArrayCid;
+    case MethodRecognizer::kTypedData_Float32x4Array_factory:
+      return kTypedDataFloat32x4ArrayCid;
+    case MethodRecognizer::kTypedData_Int32x4Array_factory:
+      return kTypedDataInt32x4ArrayCid;
+    case MethodRecognizer::kTypedData_Float64x2Array_factory:
+      return kTypedDataFloat64x2ArrayCid;
+    default:
+      break;
   }
   return kDynamicCid;
 }
@@ -3216,7 +3229,8 @@
   if (node->is_super_getter()) {
     // Statically resolved instance getter, i.e. "super getter".
     ASSERT(node->receiver() != NULL);
-    getter_function = Resolver::ResolveDynamicAnyArgs(node->cls(), getter_name);
+    getter_function = Resolver::ResolveDynamicAnyArgs(Z,
+        node->cls(), getter_name);
     if (getter_function.IsNull()) {
       // Resolve and call noSuchMethod.
       ArgumentListNode* arguments = new(Z) ArgumentListNode(node->token_pos());
@@ -3459,6 +3473,7 @@
         LoadFieldInstr* load = BuildNativeGetter(
             node, MethodRecognizer::kStringBaseLength, String::length_offset(),
             Type::ZoneHandle(Z, Type::SmiType()), kSmiCid);
+        load->set_is_immutable(!FLAG_support_externalizable_strings);
         if (kind == MethodRecognizer::kStringBaseLength) {
           return ReturnDefinition(load);
         }
@@ -3783,9 +3798,8 @@
   Function* super_function = NULL;
   if (node->IsSuperLoad()) {
     // Resolve the load indexed operator in the super class.
-    super_function = &Function::ZoneHandle(
-          Z, Resolver::ResolveDynamicAnyArgs(node->super_class(),
-                                             Symbols::IndexToken()));
+    super_function = &Function::ZoneHandle(Z, Resolver::ResolveDynamicAnyArgs(Z,
+        node->super_class(), Symbols::IndexToken()));
     if (super_function->IsNull()) {
       // Could not resolve super operator. Generate call noSuchMethod() of the
       // super class instead.
@@ -3846,9 +3860,8 @@
   const TokenPosition token_pos = node->token_pos();
   if (node->IsSuperStore()) {
     // Resolve the store indexed operator in the super class.
-    super_function = &Function::ZoneHandle(
-        Z, Resolver::ResolveDynamicAnyArgs(node->super_class(),
-                                           Symbols::AssignIndexToken()));
+    super_function = &Function::ZoneHandle(Z, Resolver::ResolveDynamicAnyArgs(Z,
+        node->super_class(), Symbols::AssignIndexToken()));
     if (super_function->IsNull()) {
       // Could not resolve super operator. Generate call noSuchMethod() of the
       // super class instead.
@@ -3914,11 +3927,9 @@
   } else {
     // Generate dynamic call to operator []=.
     const intptr_t checked_argument_count = 2;  // Do not check for value type.
-    const String& name =
-        String::ZoneHandle(Z, Symbols::New(Token::Str(Token::kASSIGN_INDEX)));
     InstanceCallInstr* store =
         new(Z) InstanceCallInstr(token_pos,
-                                 name,
+                                 Symbols::AssignIndexToken(),
                                  Token::kASSIGN_INDEX,
                                  arguments,
                                  Object::null_array(),
@@ -4327,6 +4338,7 @@
   CatchBlockEntryInstr* catch_entry =
       new(Z) CatchBlockEntryInstr(owner()->AllocateBlockId(),
                                   catch_handler_index,
+                                  owner()->graph_entry(),
                                   catch_block->handler_types(),
                                   try_handler_index,
                                   catch_block->exception_var(),
@@ -4372,6 +4384,7 @@
     CatchBlockEntryInstr* finally_entry =
         new(Z) CatchBlockEntryInstr(owner()->AllocateBlockId(),
                                     original_handler_index,
+                                    owner()->graph_entry(),
                                     types,
                                     catch_handler_index,
                                     catch_block->exception_var(),
@@ -4461,7 +4474,7 @@
   arguments->Add(PushArgument(receiver_value));
   // String memberName.
   const String& member_name =
-      String::ZoneHandle(Z, Symbols::New(function_name));
+      String::ZoneHandle(Z, Symbols::New(T, function_name));
   Value* member_name_value = Bind(new(Z) ConstantInstr(member_name));
   arguments->Add(PushArgument(member_name_value));
   // Smi invocation_type.
@@ -4602,7 +4615,7 @@
 
 
 FlowGraph* FlowGraphBuilder::BuildGraph() {
-  VMTagScope tagScope(Thread::Current(),
+  VMTagScope tagScope(thread(),
                       VMTag::kCompileFlowGraphBuilderTagId,
                       FLAG_profile_vm);
   if (FLAG_support_ast_printer && FLAG_print_ast) {
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index 474bc4f..977df17 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -140,6 +140,10 @@
 
   void AddCatchEntry(CatchBlockEntryInstr* entry);
 
+  GraphEntryInstr* graph_entry() const {
+    return graph_entry_;
+  }
+
   intptr_t num_copied_params() const {
     return num_copied_params_;
   }
diff --git a/runtime/vm/flow_graph_builder_test.cc b/runtime/vm/flow_graph_builder_test.cc
index 36eebc1..10f93cb 100644
--- a/runtime/vm/flow_graph_builder_test.cc
+++ b/runtime/vm/flow_graph_builder_test.cc
@@ -284,7 +284,7 @@
 
   RawClass* GetClass(const Library& lib, const char* name) {
     const Class& cls = Class::Handle(
-        lib.LookupClass(String::Handle(Symbols::New(name))));
+        lib.LookupClass(String::Handle(Symbols::New(thread_, name))));
     EXPECT(!cls.IsNull());  // No ambiguity error expected.
     return cls.raw();
   }
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 5bc26af..cfdf133 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -59,18 +59,12 @@
 DECLARE_FLAG(int, inlining_constant_arguments_max_size_threshold);
 DECLARE_FLAG(int, inlining_constant_arguments_min_size_threshold);
 
-#if !defined(DART_PRECOMPILED_RUNTIME)
 static void PrecompilationModeHandler(bool value) {
   if (value) {
 #if defined(TARGET_ARCH_IA32)
     FATAL("Precompilation not supported on IA32");
 #endif
 
-#if defined(PRODUCT)
-    FATAL("dart_noopt not supported in product mode");
-#else
-    FLAG_support_debugger = false;
-
     // Flags affecting compilation only:
     // There is no counter feedback in precompilation, so ignore the counter
     // when making inlining decisions.
@@ -87,27 +81,31 @@
 
     FLAG_allow_absolute_addresses = false;
     FLAG_always_megamorphic_calls = true;
-    FLAG_background_compilation = false;
-    FLAG_collect_code = false;
     FLAG_collect_dynamic_function_names = true;
-    FLAG_deoptimize_alot = false;  // Used in some tests.
-    FLAG_deoptimize_every = 0;     // Used in some tests.
-    FLAG_emit_edge_counters = false;
-    FLAG_enable_mirrors = false;
     FLAG_fields_may_be_reset = true;
     FLAG_ic_range_profiling = false;
     FLAG_interpret_irregexp = true;
     FLAG_lazy_dispatchers = false;
     FLAG_link_natives_lazily = true;
-    FLAG_load_deferred_eagerly = true;
     FLAG_optimization_counter_threshold = -1;
     FLAG_polymorphic_with_deopt = false;
     FLAG_precompiled_mode = true;
-    FLAG_print_stop_message = false;
-    FLAG_use_cha_deopt = false;
+    FLAG_reorder_basic_blocks = false;
     FLAG_use_field_guards = false;
+    FLAG_use_cha_deopt = false;
+
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
+    // Set flags affecting runtime accordingly for dart_noopt.
+    FLAG_background_compilation = false;
+    FLAG_collect_code = false;
+    FLAG_support_debugger = false;
+    FLAG_deoptimize_alot = false;  // Used in some tests.
+    FLAG_deoptimize_every = 0;     // Used in some tests.
+    FLAG_enable_mirrors = false;
+    FLAG_load_deferred_eagerly = true;
+    FLAG_print_stop_message = false;
     FLAG_use_osr = false;
-#endif  // PRODUCT
+#endif
   }
 }
 
@@ -115,30 +113,17 @@
                     precompilation,
                     "Precompilation mode");
 
-#else  // DART_PRECOMPILED_RUNTIME
+#ifdef DART_PRECOMPILED_RUNTIME
 
-COMPILE_ASSERT(!FLAG_allow_absolute_addresses);
 COMPILE_ASSERT(!FLAG_background_compilation);
 COMPILE_ASSERT(!FLAG_collect_code);
 COMPILE_ASSERT(!FLAG_deoptimize_alot);  // Used in some tests.
-COMPILE_ASSERT(!FLAG_emit_edge_counters);
 COMPILE_ASSERT(!FLAG_enable_mirrors);
-COMPILE_ASSERT(!FLAG_ic_range_profiling);
-COMPILE_ASSERT(!FLAG_lazy_dispatchers);
-COMPILE_ASSERT(!FLAG_polymorphic_with_deopt);
+COMPILE_ASSERT(FLAG_precompiled_runtime);
 COMPILE_ASSERT(!FLAG_print_stop_message);
-COMPILE_ASSERT(!FLAG_use_cha_deopt);
-COMPILE_ASSERT(!FLAG_use_field_guards);
 COMPILE_ASSERT(!FLAG_use_osr);
-COMPILE_ASSERT(FLAG_always_megamorphic_calls);
-COMPILE_ASSERT(FLAG_collect_dynamic_function_names);
 COMPILE_ASSERT(FLAG_deoptimize_every == 0);  // Used in some tests.
-COMPILE_ASSERT(FLAG_fields_may_be_reset);
-COMPILE_ASSERT(FLAG_interpret_irregexp);
-COMPILE_ASSERT(FLAG_link_natives_lazily);
 COMPILE_ASSERT(FLAG_load_deferred_eagerly);
-COMPILE_ASSERT(FLAG_optimization_counter_threshold == -1);
-COMPILE_ASSERT(FLAG_precompiled_mode);
 
 #endif  // DART_PRECOMPILED_RUNTIME
 
@@ -270,7 +255,7 @@
 void FlowGraphCompiler::InitCompiler() {
 #ifndef PRODUCT
   TimelineDurationScope tds(thread(),
-                            isolate()->GetCompilerStream(),
+                            Timeline::GetCompilerStream(),
                             "InitCompiler");
 #endif  // !PRODUCT
   pc_descriptors_list_ = new(zone()) DescriptorList(64);
@@ -540,7 +525,13 @@
               IntervalStruct(prev_offset, prev_inlining_pos, prev_inlining_id));
           prev_offset = assembler()->CodeSize();
           prev_inlining_id = instr->inlining_id();
-          prev_inlining_pos = inline_id_to_token_pos_[prev_inlining_id];
+          if (prev_inlining_id < inline_id_to_token_pos_.length()) {
+            prev_inlining_pos = inline_id_to_token_pos_[prev_inlining_id];
+          } else {
+            // We will add this token position later when generating the
+            // profile.
+            prev_inlining_pos = TokenPosition::kNoSource;
+          }
           if (prev_inlining_id > max_inlining_id) {
             max_inlining_id = prev_inlining_id;
           }
@@ -817,7 +808,8 @@
 // and FlowGraphCompiler::SlowPathEnvironmentFor.
 // See StackFrame::VisitObjectPointers for the details of how stack map is
 // interpreted.
-void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) {
+void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs,
+                                        intptr_t slow_path_argument_count) {
   if (is_optimizing() || locs->live_registers()->HasUntaggedValues()) {
     const intptr_t spill_area_size = is_optimizing() ?
         flow_graph_.graph_entry()->spill_slot_count() : 0;
@@ -877,10 +869,17 @@
       }
     }
 
-    intptr_t register_bit_count = bitmap->Length() - spill_area_size;
+    // Arguments pushed on top of live registers in the slow path are tagged.
+    for (intptr_t i = 0; i < slow_path_argument_count; ++i) {
+      bitmap->Set(bitmap->Length(), true);
+    }
+
+    // The slow path area Outside the spill area contains are live registers
+    // and pushed arguments for calls inside the slow path.
+    intptr_t slow_path_bit_count = bitmap->Length() - spill_area_size;
     stackmap_table_builder()->AddEntry(assembler()->CodeSize(),
                                        bitmap,
-                                       register_bit_count);
+                                       slow_path_bit_count);
   }
 }
 
@@ -1110,7 +1109,7 @@
           *return_node.value()->AsLoadInstanceFieldNode();
       // Only intrinsify getter if the field cannot contain a mutable double.
       // Reading from a mutable double box requires allocating a fresh double.
-      if (load_node.field().guarded_cid() == kDynamicCid) {
+      if (!IsPotentialUnboxedField(load_node.field())) {
         GenerateInlinedGetter(load_node.field().Offset());
         return !FLAG_use_field_guards;
       }
@@ -1162,7 +1161,8 @@
   }
   if (FLAG_always_megamorphic_calls) {
     EmitMegamorphicInstanceCall(ic_data, argument_count,
-                                deopt_id, token_pos, locs);
+                                deopt_id, token_pos, locs,
+                                CatchClauseNode::kInvalidTryIndex);
     return;
   }
   ASSERT(!ic_data.IsNull());
@@ -1189,7 +1189,8 @@
 
   if (is_optimizing()) {
     EmitMegamorphicInstanceCall(ic_data, argument_count,
-                                deopt_id, token_pos, locs);
+                                deopt_id, token_pos, locs,
+                                CatchClauseNode::kInvalidTryIndex);
     return;
   }
 
@@ -1302,7 +1303,7 @@
 bool FlowGraphCompiler::NeedsEdgeCounter(TargetEntryInstr* block) {
   // Only emit an edge counter if there is not goto at the end of the block,
   // except for the entry block.
-  return (FLAG_emit_edge_counters
+  return (FLAG_reorder_basic_blocks
       && (!block->last_instruction()->IsGoto()
           || (block == flow_graph().graph_entry()->normal_entry())));
 }
@@ -1694,6 +1695,9 @@
   const ICData& ic_data = ICData::ZoneHandle(zone(), ICData::New(
       parsed_function().function(), target_name,
       arguments_descriptor, deopt_id, num_args_tested));
+#if defined(TAG_IC_DATA)
+  ic_data.set_tag(Instruction::kInstanceCall);
+#endif
   if (deopt_id_to_ic_data_ != NULL) {
     (*deopt_id_to_ic_data_)[deopt_id] = &ic_data;
   }
@@ -1718,6 +1722,9 @@
       parsed_function().function(), String::Handle(zone(), target.name()),
       arguments_descriptor, deopt_id, num_args_tested));
   ic_data.AddTarget(target);
+#if defined(TAG_IC_DATA)
+  ic_data.set_tag(Instruction::kStaticCall);
+#endif
   if (deopt_id_to_ic_data_ != NULL) {
     (*deopt_id_to_ic_data_)[deopt_id] = &ic_data;
   }
@@ -1836,7 +1843,8 @@
     const Array& argument_names,
     intptr_t deopt_id,
     TokenPosition token_pos,
-    LocationSummary* locs) {
+    LocationSummary* locs,
+    bool complete) {
   if (FLAG_polymorphic_with_deopt) {
     Label* deopt = AddDeoptStub(deopt_id,
                                 ICData::kDeoptPolymorphicInstanceCallTestFail);
@@ -1844,23 +1852,32 @@
     EmitTestAndCall(ic_data, argument_count, argument_names,
                     deopt,  // No cid match.
                     &ok,    // Found cid.
-                    deopt_id, token_pos, locs);
+                    deopt_id, token_pos, locs, complete);
     assembler()->Bind(&ok);
   } else {
-    // Instead of deoptimizing, do a megamorphic call when no matching
-    // cid found.
-    Label ok;
-    MegamorphicSlowPath* slow_path =
+    if (complete) {
+      Label ok;
+      EmitTestAndCall(ic_data, argument_count, argument_names,
+                      NULL,                      // No cid match.
+                      &ok,                       // Found cid.
+                      deopt_id, token_pos, locs, true);
+      assembler()->Bind(&ok);
+    } else {
+      // Instead of deoptimizing, do a megamorphic call when no matching
+      // cid found.
+      Label ok;
+      MegamorphicSlowPath* slow_path =
         new MegamorphicSlowPath(ic_data, argument_count, deopt_id,
                                 token_pos, locs, CurrentTryIndex());
-    AddSlowPathCode(slow_path);
-    EmitTestAndCall(ic_data, argument_count, argument_names,
-                    slow_path->entry_label(),  // No cid match.
-                    &ok,                       // Found cid.
-                    deopt_id, token_pos, locs);
+      AddSlowPathCode(slow_path);
+      EmitTestAndCall(ic_data, argument_count, argument_names,
+                      slow_path->entry_label(),  // No cid match.
+                      &ok,                       // Found cid.
+                      deopt_id, token_pos, locs, false);
 
-    assembler()->Bind(slow_path->exit_label());
-    assembler()->Bind(&ok);
+      assembler()->Bind(slow_path->exit_label());
+      assembler()->Bind(&ok);
+    }
   }
 }
 
diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h
index 60ce384..7c1fa0e 100644
--- a/runtime/vm/flow_graph_compiler.h
+++ b/runtime/vm/flow_graph_compiler.h
@@ -451,7 +451,8 @@
                                    const Array& argument_names,
                                    intptr_t deopt_id,
                                    TokenPosition token_pos,
-                                   LocationSummary* locs);
+                                   LocationSummary* locs,
+                                   bool complete);
 
   // Pass a value for try-index where block is not available (e.g. slow path).
   void EmitMegamorphicInstanceCall(
@@ -460,7 +461,8 @@
       intptr_t deopt_id,
       TokenPosition token_pos,
       LocationSummary* locs,
-      intptr_t try_index = CatchClauseNode::kInvalidTryIndex);
+      intptr_t try_index,
+      intptr_t slow_path_argument_count = 0);
 
   void EmitSwitchableInstanceCall(const ICData& ic_data,
                                   intptr_t argument_count,
@@ -475,7 +477,8 @@
                        Label* match_found,
                        intptr_t deopt_id,
                        TokenPosition token_index,
-                       LocationSummary* locs);
+                       LocationSummary* locs,
+                       bool complete);
 
   Condition EmitEqualityRegConstCompare(Register reg,
                                         const Object& obj,
@@ -514,7 +517,8 @@
                             intptr_t deopt_id,
                             TokenPosition token_pos);
 
-  void RecordSafepoint(LocationSummary* locs);
+  void RecordSafepoint(LocationSummary* locs,
+                       intptr_t slow_path_argument_count = 0);
 
   Label* AddDeoptStub(intptr_t deopt_id,
                       ICData::DeoptReasonId reason,
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index 8d6816a..ace14d0 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -121,7 +121,7 @@
   Zone* zone = compiler->zone();
 
   builder->AddPp(current->function(), slot_ix++);
-  builder->AddPcMarker(Function::Handle(zone), slot_ix++);
+  builder->AddPcMarker(Function::ZoneHandle(zone), slot_ix++);
   builder->AddCallerFp(slot_ix++);
   builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
@@ -516,7 +516,7 @@
     __ Bind(&fall_through);
     return type_test_cache.raw();
   }
-  if (type.IsType() || type.IsFunctionType()) {
+  if (type.IsType()) {
     const Register kInstanceReg = R0;
     const Register kTypeArgumentsReg = R1;
     __ tst(kInstanceReg, Operand(kSmiTagMask));  // Is instance Smi?
@@ -1309,7 +1309,8 @@
     intptr_t deopt_id,
     TokenPosition token_pos,
     LocationSummary* locs,
-    intptr_t try_index) {
+    intptr_t try_index,
+    intptr_t slow_path_argument_count) {
   const String& name = String::Handle(zone(), ic_data.target_name());
   const Array& arguments_descriptor =
       Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
@@ -1327,7 +1328,7 @@
   }
   __ blx(R1);
 
-  RecordSafepoint(locs);
+  RecordSafepoint(locs, slow_path_argument_count);
   const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (FLAG_precompiled_mode) {
     // Megamorphic calls may occur in slow path stubs.
@@ -1366,7 +1367,7 @@
   __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize);
   if (ic_data.NumArgsTested() == 1) {
     __ LoadUniqueObject(R9, ic_data);
-    __ BranchLinkPatchable(*StubCode::ICLookup_entry());
+    __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry());
   } else {
     const String& name = String::Handle(zone(), ic_data.target_name());
     const Array& arguments_descriptor =
@@ -1595,7 +1596,8 @@
                                         Label* match_found,
                                         intptr_t deopt_id,
                                         TokenPosition token_index,
-                                        LocationSummary* locs) {
+                                        LocationSummary* locs,
+                                        bool complete) {
   ASSERT(is_optimizing());
   __ Comment("EmitTestAndCall");
   const Array& arguments_descriptor =
@@ -1612,8 +1614,8 @@
   ASSERT(!ic_data.IsNull() && (kNumChecks > 0));
 
   Label after_smi_test;
-  __ tst(R0, Operand(kSmiTagMask));
   if (kFirstCheckIsSmi) {
+    __ tst(R0, Operand(kSmiTagMask));
     // Jump if receiver is not Smi.
     if (kNumChecks == 1) {
       __ b(failed, NE);
@@ -1637,7 +1639,10 @@
   } else {
     // Receiver is Smi, but Smi is not a valid class therefore fail.
     // (Smi class must be first in the list).
-    __ b(failed, EQ);
+    if (!complete) {
+      __ tst(R0, Operand(kSmiTagMask));
+      __ b(failed, EQ);
+    }
   }
   __ Bind(&after_smi_test);
 
@@ -1656,11 +1661,18 @@
     const bool kIsLastCheck = (i == (kSortedLen - 1));
     ASSERT(sorted[i].cid != kSmiCid);
     Label next_test;
-    __ CompareImmediate(R2, sorted[i].cid);
-    if (kIsLastCheck) {
-      __ b(failed, NE);
+    if (!complete) {
+      __ CompareImmediate(R2, sorted[i].cid);
+      if (kIsLastCheck) {
+        __ b(failed, NE);
+      } else {
+        __ b(&next_test, NE);
+      }
     } else {
-      __ b(&next_test, NE);
+      if (!kIsLastCheck) {
+        __ CompareImmediate(R2, sorted[i].cid);
+        __ b(&next_test, NE);
+      }
     }
     // 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.
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc
index 618e60d..f872532 100644
--- a/runtime/vm/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/flow_graph_compiler_arm64.cc
@@ -118,7 +118,7 @@
   Zone* zone = compiler->zone();
 
   builder->AddPp(current->function(), slot_ix++);
-  builder->AddPcMarker(Function::Handle(zone), slot_ix++);
+  builder->AddPcMarker(Function::ZoneHandle(zone), slot_ix++);
   builder->AddCallerFp(slot_ix++);
   builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
@@ -508,7 +508,7 @@
     __ Bind(&fall_through);
     return type_test_cache.raw();
   }
-  if (type.IsType() || type.IsFunctionType()) {
+  if (type.IsType()) {
     const Register kInstanceReg = R0;
     const Register kTypeArgumentsReg = R1;
     __ tsti(kInstanceReg, Immediate(kSmiTagMask));  // Is instance Smi?
@@ -1290,7 +1290,8 @@
     intptr_t deopt_id,
     TokenPosition token_pos,
     LocationSummary* locs,
-    intptr_t try_index) {
+    intptr_t try_index,
+    intptr_t slow_path_argument_count) {
   const String& name = String::Handle(zone(), ic_data.target_name());
   const Array& arguments_descriptor =
       Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
@@ -1308,7 +1309,7 @@
   }
   __ blr(R1);
 
-  RecordSafepoint(locs);
+  RecordSafepoint(locs, slow_path_argument_count);
   const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (FLAG_precompiled_mode) {
     // Megamorphic calls may occur in slow path stubs.
@@ -1346,7 +1347,7 @@
   __ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize);
   if (ic_data.NumArgsTested() == 1) {
     __ LoadUniqueObject(R5, ic_data);
-    __ BranchLinkPatchable(*StubCode::ICLookup_entry());
+    __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry());
   } else {
     const String& name = String::Handle(zone(), ic_data.target_name());
     const Array& arguments_descriptor =
@@ -1550,7 +1551,8 @@
                                         Label* match_found,
                                         intptr_t deopt_id,
                                         TokenPosition token_index,
-                                        LocationSummary* locs) {
+                                        LocationSummary* locs,
+                                        bool complete) {
   ASSERT(is_optimizing());
 
   __ Comment("EmitTestAndCall");
@@ -1568,8 +1570,8 @@
   ASSERT(!ic_data.IsNull() && (kNumChecks > 0));
 
   Label after_smi_test;
-  __ tsti(R0, Immediate(kSmiTagMask));
   if (kFirstCheckIsSmi) {
+    __ tsti(R0, Immediate(kSmiTagMask));
     // Jump if receiver is not Smi.
     if (kNumChecks == 1) {
       __ b(failed, NE);
@@ -1593,7 +1595,10 @@
   } else {
     // Receiver is Smi, but Smi is not a valid class therefore fail.
     // (Smi class must be first in the list).
-    __ b(failed, EQ);
+    if (!complete) {
+      __ tsti(R0, Immediate(kSmiTagMask));
+      __ b(failed, EQ);
+    }
   }
   __ Bind(&after_smi_test);
 
@@ -1612,11 +1617,18 @@
     const bool kIsLastCheck = (i == (kSortedLen - 1));
     ASSERT(sorted[i].cid != kSmiCid);
     Label next_test;
-    __ CompareImmediate(R2, sorted[i].cid);
-    if (kIsLastCheck) {
-      __ b(failed, NE);
+    if (!complete) {
+      __ CompareImmediate(R2, sorted[i].cid);
+      if (kIsLastCheck) {
+        __ b(failed, NE);
+      } else {
+        __ b(&next_test, NE);
+      }
     } else {
-      __ b(&next_test, NE);
+      if (!kIsLastCheck) {
+        __ CompareImmediate(R2, sorted[i].cid);
+        __ b(&next_test, NE);
+      }
     }
     // 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.
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index 2ede9e0..eac4f3c 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -120,7 +120,7 @@
 
   Zone* zone = compiler->zone();
 
-  builder->AddPcMarker(Function::Handle(zone), slot_ix++);
+  builder->AddPcMarker(Function::ZoneHandle(zone), slot_ix++);
   builder->AddCallerFp(slot_ix++);
   builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
@@ -520,7 +520,7 @@
     __ Bind(&fall_through);
     return type_test_cache.raw();
   }
-  if (type.IsType() || type.IsFunctionType()) {
+  if (type.IsType()) {
     const Register kInstanceReg = EAX;
     const Register kTypeArgumentsReg = EDX;
     __ testl(kInstanceReg, Immediate(kSmiTagMask));  // Is instance Smi?
@@ -1290,7 +1290,8 @@
     intptr_t deopt_id,
     TokenPosition token_pos,
     LocationSummary* locs,
-    intptr_t try_index) {
+    intptr_t try_index,
+    intptr_t slow_path_argument_count) {
   const String& name = String::Handle(zone(), ic_data.target_name());
   const Array& arguments_descriptor =
       Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
@@ -1310,7 +1311,7 @@
 
   AddCurrentDescriptor(RawPcDescriptors::kOther,
       Thread::kNoDeoptId, token_pos);
-  RecordSafepoint(locs);
+  RecordSafepoint(locs, slow_path_argument_count);
   const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   // Precompilation not implemented on ia32 platform.
   ASSERT(!FLAG_precompiled_mode);
@@ -1504,8 +1505,10 @@
                                         Label* match_found,
                                         intptr_t deopt_id,
                                         TokenPosition token_index,
-                                        LocationSummary* locs) {
+                                        LocationSummary* locs,
+                                        bool complete) {
   ASSERT(is_optimizing());
+  ASSERT(!complete);
   __ Comment("EmitTestAndCall");
   const Array& arguments_descriptor =
       Array::ZoneHandle(zone(), ArgumentsDescriptor::New(argument_count,
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index 8f51f86..3ec2756 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -117,7 +117,7 @@
   Zone* zone = compiler->zone();
 
   builder->AddPp(current->function(), slot_ix++);
-  builder->AddPcMarker(Function::Handle(zone), slot_ix++);
+  builder->AddPcMarker(Function::ZoneHandle(zone), slot_ix++);
   builder->AddCallerFp(slot_ix++);
   builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
@@ -504,7 +504,7 @@
     __ Bind(&fall_through);
     return type_test_cache.raw();
   }
-  if (type.IsType() || type.IsFunctionType()) {
+  if (type.IsType()) {
     const Register kInstanceReg = A0;
     const Register kTypeArgumentsReg = A1;
     __ andi(CMPRES1, kInstanceReg, Immediate(kSmiTagMask));
@@ -1317,7 +1317,8 @@
     intptr_t deopt_id,
     TokenPosition token_pos,
     LocationSummary* locs,
-    intptr_t try_index) {
+    intptr_t try_index,
+    intptr_t slow_path_argument_count) {
   const String& name = String::Handle(zone(), ic_data.target_name());
   const Array& arguments_descriptor =
       Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
@@ -1335,7 +1336,7 @@
   }
   __ jalr(T1);
 
-  RecordSafepoint(locs);
+  RecordSafepoint(locs, slow_path_argument_count);
   const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (FLAG_precompiled_mode) {
     // Megamorphic calls may occur in slow path stubs.
@@ -1373,7 +1374,7 @@
   __ lw(T0, Address(SP, (argument_count - 1) * kWordSize));
   if (ic_data.NumArgsTested() == 1) {
     __ LoadUniqueObject(S5, ic_data);
-    __ BranchLinkPatchable(*StubCode::ICLookup_entry());
+    __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry());
   } else {
     const String& name = String::Handle(zone(), ic_data.target_name());
     const Array& arguments_descriptor =
@@ -1619,7 +1620,8 @@
                                         Label* match_found,
                                         intptr_t deopt_id,
                                         TokenPosition token_index,
-                                        LocationSummary* locs) {
+                                        LocationSummary* locs,
+                                        bool complete) {
   ASSERT(is_optimizing());
   __ Comment("EmitTestAndCall");
   const Array& arguments_descriptor =
@@ -1636,8 +1638,8 @@
   ASSERT(!ic_data.IsNull() && (kNumChecks > 0));
 
   Label after_smi_test;
-  __ andi(CMPRES1, T0, Immediate(kSmiTagMask));
   if (kFirstCheckIsSmi) {
+    __ andi(CMPRES1, T0, Immediate(kSmiTagMask));
     // Jump if receiver is not Smi.
     if (kNumChecks == 1) {
       __ bne(CMPRES1, ZR, failed);
@@ -1661,7 +1663,10 @@
   } else {
     // Receiver is Smi, but Smi is not a valid class therefore fail.
     // (Smi class must be first in the list).
-    __ beq(CMPRES1, ZR, failed);
+    if (!complete) {
+      __ andi(CMPRES1, T0, Immediate(kSmiTagMask));
+      __ beq(CMPRES1, ZR, failed);
+    }
   }
 
   __ Bind(&after_smi_test);
@@ -1680,10 +1685,16 @@
     const bool kIsLastCheck = (i == (kSortedLen - 1));
     ASSERT(sorted[i].cid != kSmiCid);
     Label next_test;
-    if (kIsLastCheck) {
-      __ BranchNotEqual(T2, Immediate(sorted[i].cid), failed);
+    if (!complete) {
+      if (kIsLastCheck) {
+        __ BranchNotEqual(T2, Immediate(sorted[i].cid), failed);
+      } else {
+        __ BranchNotEqual(T2, Immediate(sorted[i].cid), &next_test);
+      }
     } else {
-      __ BranchNotEqual(T2, Immediate(sorted[i].cid), &next_test);
+      if (!kIsLastCheck) {
+        __ BranchNotEqual(T2, Immediate(sorted[i].cid), &next_test);
+      }
     }
     // 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.
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 800e1dc..e044923 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -118,7 +118,7 @@
   Zone* zone = compiler->zone();
 
   builder->AddPp(current->function(), slot_ix++);
-  builder->AddPcMarker(Function::Handle(zone), slot_ix++);
+  builder->AddPcMarker(Function::ZoneHandle(zone), slot_ix++);
   builder->AddCallerFp(slot_ix++);
   builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
@@ -515,7 +515,7 @@
     __ Bind(&fall_through);
     return type_test_cache.raw();
   }
-  if (type.IsType() || type.IsFunctionType()) {
+  if (type.IsType()) {
     const Register kInstanceReg = RAX;
     const Register kTypeArgumentsReg = RDX;
     __ testq(kInstanceReg, Immediate(kSmiTagMask));  // Is instance Smi?
@@ -1320,7 +1320,8 @@
     intptr_t deopt_id,
     TokenPosition token_pos,
     LocationSummary* locs,
-    intptr_t try_index) {
+    intptr_t try_index,
+    intptr_t slow_path_argument_count) {
   const String& name = String::Handle(zone(), ic_data.target_name());
   const Array& arguments_descriptor =
       Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
@@ -1338,7 +1339,7 @@
   }
   __ call(RCX);
 
-  RecordSafepoint(locs);
+  RecordSafepoint(locs, slow_path_argument_count);
   const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (FLAG_precompiled_mode) {
     // Megamorphic calls may occur in slow path stubs.
@@ -1376,7 +1377,7 @@
   __ movq(RDI, Address(RSP, (argument_count - 1) * kWordSize));
   if (ic_data.NumArgsTested() == 1) {
     __ LoadUniqueObject(RBX, ic_data);
-    __ CallPatchable(*StubCode::ICLookup_entry());
+    __ CallPatchable(*StubCode::ICLookupThroughFunction_entry());
   } else {
     const String& name = String::Handle(zone(), ic_data.target_name());
     const Array& arguments_descriptor =
@@ -1533,7 +1534,8 @@
                                         Label* match_found,
                                         intptr_t deopt_id,
                                         TokenPosition token_index,
-                                        LocationSummary* locs) {
+                                        LocationSummary* locs,
+                                        bool complete) {
   ASSERT(is_optimizing());
 
   __ Comment("EmitTestAndCall");
@@ -1551,8 +1553,8 @@
   ASSERT(!ic_data.IsNull() && (kNumChecks > 0));
 
   Label after_smi_test;
-  __ testq(RAX, Immediate(kSmiTagMask));
   if (kFirstCheckIsSmi) {
+    __ testq(RAX, Immediate(kSmiTagMask));
     // Jump if receiver is not Smi.
     if (kNumChecks == 1) {
       __ j(NOT_ZERO, failed);
@@ -1576,7 +1578,10 @@
   } else {
     // Receiver is Smi, but Smi is not a valid class therefore fail.
     // (Smi class must be first in the list).
-    __ j(ZERO, failed);
+    if (!complete) {
+      __ testq(RAX, Immediate(kSmiTagMask));
+      __ j(ZERO, failed);
+    }
   }
   __ Bind(&after_smi_test);
 
@@ -1595,11 +1600,18 @@
     const bool kIsLastCheck = (i == (kSortedLen - 1));
     ASSERT(sorted[i].cid != kSmiCid);
     Label next_test;
-    __ cmpl(RDI, Immediate(sorted[i].cid));
-    if (kIsLastCheck) {
-      __ j(NOT_EQUAL, failed);
+    if (!complete) {
+      __ cmpl(RDI, Immediate(sorted[i].cid));
+      if (kIsLastCheck) {
+        __ j(NOT_EQUAL, failed);
+      } else {
+        __ j(NOT_EQUAL, &next_test);
+      }
     } else {
-      __ j(NOT_EQUAL, &next_test);
+      if (!kIsLastCheck) {
+        __ cmpl(RDI, Immediate(sorted[i].cid));
+        __ j(NOT_EQUAL, &next_test);
+      }
     }
     // 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.
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 95a1c9f..471c511 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -14,7 +14,6 @@
 #include "vm/flow_graph_compiler.h"
 #include "vm/flow_graph_type_propagator.h"
 #include "vm/il_printer.h"
-#include "vm/intrinsifier.h"
 #include "vm/jit_optimizer.h"
 #include "vm/longjump.h"
 #include "vm/object.h"
@@ -64,6 +63,7 @@
 DECLARE_FLAG(int, max_deoptimization_counter_threshold);
 DECLARE_FLAG(bool, print_flow_graph);
 DECLARE_FLAG(bool, print_flow_graph_optimized);
+DECLARE_FLAG(bool, support_externalizable_strings);
 DECLARE_FLAG(bool, verify_compiler);
 
 // Quick access to the current zone.
@@ -591,6 +591,7 @@
         inlined_recursive_call_ = false;
       }
     }
+
     collected_call_sites_ = NULL;
     inlining_call_sites_ = NULL;
   }
@@ -610,7 +611,9 @@
     if (constant != NULL) {
       return new(Z) ConstantInstr(constant->value());
     } else {
-      return new(Z) ParameterInstr(i, graph->graph_entry());
+      ParameterInstr* param = new(Z) ParameterInstr(i, graph->graph_entry());
+      param->UpdateType(*argument->Type());
+      return param;
     }
   }
 
@@ -629,16 +632,33 @@
       return false;
     }
 
-    // Function has no type feedback. With precompilation we don't rely on
-    // type feedback.
-    if (!FLAG_precompiled_mode &&
-        function.ic_data_array() == Object::null()) {
+    // Don't inline any intrinsified functions in precompiled mode
+    // to reduce code size and make sure we use the intrinsic code.
+    if (FLAG_precompiled_mode && function.is_intrinsic()) {
+      TRACE_INLINING(THR_Print("     Bailout: intrinisic\n"));
+      PRINT_INLINING_TREE("intrinsic",
+          &call_data->caller, &function, call_data->call);
+      return false;
+    }
+
+    // Do not rely on function type feedback or presence of code to determine
+    // if a function was compiled.
+    if (!FLAG_precompiled_mode && !function.was_compiled()) {
       TRACE_INLINING(THR_Print("     Bailout: not compiled yet\n"));
       PRINT_INLINING_TREE("Not compiled",
           &call_data->caller, &function, call_data->call);
       return false;
     }
 
+    // Type feedback may have been cleared for this function (ClearICDataArray),
+    // but we need it for inlining.
+    if (!FLAG_precompiled_mode && (function.ic_data_array() == Array::null())) {
+      TRACE_INLINING(THR_Print("     Bailout: type feedback cleared\n"));
+      PRINT_INLINING_TREE("Not compiled",
+          &call_data->caller, &function, call_data->call);
+      return false;
+    }
+
     // Abort if this function has deoptimized too much.
     if (function.deoptimization_counter() >=
         FLAG_max_deoptimization_counter_threshold) {
@@ -694,14 +714,29 @@
       // Install bailout jump.
       LongJumpScope jump;
       if (setjmp(*jump.Set()) == 0) {
+        Isolate* isolate = Isolate::Current();
+        // Makes sure no classes are loaded during parsing in background.
+        const intptr_t loading_invalidation_gen_at_start =
+            isolate->loading_invalidation_gen();
         // Parse the callee function.
         bool in_cache;
         ParsedFunction* parsed_function;
-        {
+       {
           CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer);
           parsed_function = GetParsedFunction(function, &in_cache);
         }
 
+        if (Compiler::IsBackgroundCompilation()) {
+          if (isolate->IsTopLevelParsing() ||
+                  (loading_invalidation_gen_at_start !=
+                   isolate->loading_invalidation_gen())) {
+            // Loading occured while parsing. We need to abort here because
+            // state changed while compiling.
+            Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+                "Loading occured while parsing in inliner");
+          }
+        }
+
         // Load IC data for the callee.
         ZoneGrowableArray<const ICData*>* ic_data_array =
               new(Z) ZoneGrowableArray<const ICData*>();
@@ -709,7 +744,8 @@
         function.RestoreICDataMap(ic_data_array, clone_ic_data);
         if (Compiler::IsBackgroundCompilation() &&
             (function.ic_data_array() == Array::null())) {
-          Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
+          Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+              "ICData cleared while inlining");
         }
 
         // Build the callee graph.
@@ -810,6 +846,13 @@
             DEBUG_ASSERT(callee_graph->VerifyUseLists());
           } else {
             JitOptimizer optimizer(callee_graph);
+
+            optimizer.ApplyClassIds();
+            DEBUG_ASSERT(callee_graph->VerifyUseLists());
+
+            FlowGraphTypePropagator::Propagate(callee_graph);
+            DEBUG_ASSERT(callee_graph->VerifyUseLists());
+
             optimizer.ApplyICData();
             DEBUG_ASSERT(callee_graph->VerifyUseLists());
 
@@ -915,22 +958,30 @@
         ASSERT(error.IsLanguageError());
 
         if (LanguageError::Cast(error).kind() == Report::kBailout) {
-          thread()->set_deopt_id(prev_deopt_id);
-          TRACE_INLINING(THR_Print("     Bailout: %s\n",
-                                   error.ToErrorCString()));
-          PRINT_INLINING_TREE("Bailout",
-              &call_data->caller, &function, call);
-          return false;
+          if (error.raw() == Object::background_compilation_error().raw()) {
+             // Fall through to exit the compilation, and retry it later.
+          } else {
+            thread()->set_deopt_id(prev_deopt_id);
+            TRACE_INLINING(THR_Print("     Bailout: %s\n",
+                                     error.ToErrorCString()));
+            PRINT_INLINING_TREE("Bailout",
+                &call_data->caller, &function, call);
+            return false;
+          }
         } else {
           // Fall through to exit long jump scope.
+          ASSERT(FLAG_precompiled_mode);
         }
       }
     }
 
-    // Propagate a compile-time error. Only in precompilation do we attempt to
+    // Propagate a compile-time error. In precompilation we attempt to
     // inline functions that have never been compiled before; when JITing we
     // should only see compile-time errors in unoptimized compilation.
-    ASSERT(FLAG_precompiled_mode);
+    // In background compilation we may abort compilation as the state
+    // changes while compiling. Propagate that 'error' and retry compilation
+    // later.
+    ASSERT(FLAG_precompiled_mode || Compiler::IsBackgroundCompilation());
     Thread::Current()->long_jump_base()->Jump(1, error);
     UNREACHABLE();
     return false;
@@ -1085,27 +1136,12 @@
     return parsed_function;
   }
 
-  // Include special handling for List. factory: inlining it is not helpful
-  // if the incoming argument is a non-constant value.
-  // TODO(srdjan): Fix inlining of List. factory.
   void InlineStaticCalls() {
     const GrowableArray<CallSites::StaticCallInfo>& call_info =
         inlining_call_sites_->static_calls();
     TRACE_INLINING(THR_Print("  Static Calls (%" Pd ")\n", call_info.length()));
     for (intptr_t call_idx = 0; call_idx < call_info.length(); ++call_idx) {
       StaticCallInstr* call = call_info[call_idx].call;
-      if (call->function().name() == Symbols::ListFactory().raw()) {
-        // Inline only if no arguments or a constant was passed.
-        ASSERT(call->function().NumImplicitParameters() == 1);
-        ASSERT(call->ArgumentCount() <= 2);
-        // Arg 0: Instantiator type arguments.
-        // Arg 1: Length (optional).
-        if ((call->ArgumentCount() == 2) &&
-            (!call->PushArgumentAt(1)->value()->BindsToConstant())) {
-          // Do not inline since a non-constant argument was passed.
-          continue;
-        }
-      }
       const Function& target = call->function();
       if (!inliner_->AlwaysInline(target) &&
           (call_info[call_idx].ratio * 100) < FLAG_inlining_hotness) {
@@ -1182,7 +1218,7 @@
       PolymorphicInstanceCallInstr* call = call_info[call_idx].call;
       if (call->with_checks()) {
         // PolymorphicInliner introduces deoptimization paths.
-        if (!FLAG_polymorphic_with_deopt) {
+        if (!call->complete() && !FLAG_polymorphic_with_deopt) {
           TRACE_INLINING(THR_Print(
               "  => %s\n     Bailout: call with checks\n",
               call->instance_call()->function_name().ToCString()));
@@ -1599,18 +1635,21 @@
     if ((i == (inlined_variants_.length() - 1)) &&
         non_inlined_variants_.is_empty()) {
       // If it is the last variant use a check class id instruction which can
-      // deoptimize, followed unconditionally by the body.
-      RedefinitionInstr* cid_redefinition =
-          new RedefinitionInstr(new(Z) Value(load_cid));
-      cid_redefinition->set_ssa_temp_index(
-          owner_->caller_graph()->alloc_ssa_temp_index());
-      cursor = AppendInstruction(cursor, cid_redefinition);
-      CheckClassIdInstr* check_class_id = new(Z) CheckClassIdInstr(
-          new(Z) Value(cid_redefinition),
-          inlined_variants_[i].cid,
-          call_->deopt_id());
-      check_class_id->InheritDeoptTarget(zone(), call_);
-      cursor = AppendInstruction(cursor, check_class_id);
+      // deoptimize, followed unconditionally by the body. Omit the check if
+      // we know that we have covered all possible classes.
+      if (!call_->complete()) {
+        RedefinitionInstr* cid_redefinition =
+            new RedefinitionInstr(new(Z) Value(load_cid));
+        cid_redefinition->set_ssa_temp_index(
+            owner_->caller_graph()->alloc_ssa_temp_index());
+        cursor = AppendInstruction(cursor, cid_redefinition);
+        CheckClassIdInstr* check_class_id = new(Z) CheckClassIdInstr(
+            new(Z) Value(cid_redefinition),
+            inlined_variants_[i].cid,
+            call_->deopt_id());
+        check_class_id->InheritDeoptTarget(zone(), call_);
+        cursor = AppendInstruction(cursor, check_class_id);
+      }
 
       // The next instruction is the first instruction of the inlined body.
       // Handle the two possible cases (unshared and shared subsequent
@@ -1743,7 +1782,8 @@
     PolymorphicInstanceCallInstr* fallback_call =
         new PolymorphicInstanceCallInstr(call_->instance_call(),
                                          new_checks,
-                                         true);  // With checks.
+                                         /* with_checks = */ true,
+                                         call_->complete());
     fallback_call->set_ssa_temp_index(
         owner_->caller_graph()->alloc_ssa_temp_index());
     fallback_call->InheritDeoptTarget(zone(), call_);
@@ -1960,8 +2000,10 @@
   ASSERT(tp.IsReal() || tp.IsSynthetic() || tp.IsNoSource());
   inline_id_to_function_->Add(&function);
   inline_id_to_token_pos_->Add(tp);
-  ASSERT(inline_id_to_token_pos_->length() == inline_id_to_function_->length());
   caller_inline_id_->Add(parent_id);
+  // We always have one less token position than functions.
+  ASSERT(inline_id_to_token_pos_->length() ==
+         (inline_id_to_function_->length() - 1));
   return id;
 }
 
@@ -2748,6 +2790,7 @@
       Type::ZoneHandle(Z, Type::SmiType()),
       str->token_pos());
   length->set_result_cid(kSmiCid);
+  length->set_is_immutable(!FLAG_support_externalizable_strings);
   length->set_recognized_kind(MethodRecognizer::kStringBaseLength);
 
   cursor = flow_graph->AppendTo(cursor, length, NULL, FlowGraph::kValue);
@@ -2836,6 +2879,11 @@
                                                  const ICData& ic_data,
                                                  TargetEntryInstr** entry,
                                                  Definition** last) {
+  if (FLAG_precompiled_mode) {
+    // The graphs generated below include deopts.
+    return false;
+  }
+
   ICData& value_check = ICData::ZoneHandle(Z);
   MethodRecognizer::Kind kind = MethodRecognizer::RecognizeKind(target);
   switch (kind) {
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index df32f54..b1d188a 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -8,6 +8,7 @@
 #include "vm/bit_vector.h"
 #include "vm/il_printer.h"
 #include "vm/regexp_assembler.h"
+#include "vm/timeline.h"
 
 namespace dart {
 
@@ -20,8 +21,7 @@
 void FlowGraphTypePropagator::Propagate(FlowGraph* flow_graph) {
 #ifndef PRODUCT
   Thread* thread = flow_graph->thread();
-  Isolate* const isolate = flow_graph->isolate();
-  TimelineStream* compiler_timeline = isolate->GetCompilerStream();
+  TimelineStream* compiler_timeline = Timeline::GetCompilerStream();
   TimelineDurationScope tds2(thread,
                              compiler_timeline,
                              "FlowGraphTypePropagator");
@@ -270,7 +270,7 @@
   const intptr_t cid = guard->field().guarded_cid();
   if ((cid == kIllegalCid) ||
       (cid == kDynamicCid) ||
-      !CheckClassInstr::IsImmutableClassId(cid)) {
+      Field::IsExternalizableCid(cid)) {
     return;
   }
 
@@ -697,12 +697,15 @@
   // However there are parameters that are known to match their declared type:
   // for example receiver.
   GraphEntryInstr* graph_entry = block_->AsGraphEntry();
-  // Parameters at catch blocks and OSR entries have type dynamic.
+  if (graph_entry == NULL) {
+    graph_entry = block_->AsCatchBlockEntry()->graph_entry();
+  }
+  // Parameters at OSR entries have type dynamic.
   //
   // TODO(kmillikin): Use the actual type of the parameter at OSR entry.
   // The code below is not safe for OSR because it doesn't necessarily use
   // the correct scope.
-  if ((graph_entry == NULL) || graph_entry->IsCompiledForOsr()) {
+  if (graph_entry->IsCompiledForOsr()) {
     return CompileType::Dynamic();
   }
 
@@ -713,7 +716,7 @@
     // from being generated.
     switch (index()) {
       case RegExpMacroAssembler::kParamRegExpIndex:
-        return CompileType::FromCid(kJSRegExpCid);
+        return CompileType::FromCid(kRegExpCid);
       case RegExpMacroAssembler::kParamStringIndex:
         return CompileType::FromCid(function.string_specialization_cid());
       case RegExpMacroAssembler::kParamStartOffsetIndex:
@@ -724,12 +727,11 @@
     return CompileType::Dynamic();
   }
 
-  LocalScope* scope = graph_entry->parsed_function().node_sequence()->scope();
-  const AbstractType& type = scope->VariableAt(index())->type();
-
   // 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();
     if (type.IsObjectType() || type.IsNullType()) {
       // Receiver can be null.
       return CompileType::FromAbstractType(type, CompileType::kNullable);
@@ -780,7 +782,7 @@
   }
 
   intptr_t cid = value().GetClassId();
-  if (!CheckClassInstr::IsImmutableClassId(cid)) {
+  if (Field::IsExternalizableCid(cid)) {
     cid = kDynamicCid;
   }
 
@@ -963,7 +965,7 @@
       cid = obj.GetClassId();
     }
   }
-  if (!CheckClassInstr::IsImmutableClassId(cid)) {
+  if (Field::IsExternalizableCid(cid)) {
     cid = kDynamicCid;
   }
   return CompileType(is_nullable, cid, abstract_type);
@@ -981,8 +983,7 @@
     ASSERT(cls().id() == kClosureCid);
     return CompileType(CompileType::kNonNullable,
                        kClosureCid,
-                       &FunctionType::ZoneHandle(
-                           closure_function().SignatureType()));
+                       &Type::ZoneHandle(closure_function().SignatureType()));
   }
   // TODO(vegorov): Incorporate type arguments into the returned type.
   return CompileType::FromCid(cls().id());
@@ -1009,8 +1010,9 @@
 
   const AbstractType* abstract_type = NULL;
   if (Isolate::Current()->type_checks() &&
-      type().HasResolvedTypeClass() &&
-      !Field::IsExternalizableCid(Class::Handle(type().type_class()).id())) {
+      (type().IsFunctionType() ||
+       (type().HasResolvedTypeClass() &&
+       !Field::IsExternalizableCid(Class::Handle(type().type_class()).id())))) {
     abstract_type = &type();
   }
 
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index c9ac9fa..cc5db20 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -19,6 +19,7 @@
 #include "vm/thread_barrier.h"
 #include "vm/thread_pool.h"
 #include "vm/thread_registry.h"
+#include "vm/timeline.h"
 #include "vm/visitor.h"
 #include "vm/object_id_ring.h"
 
@@ -599,10 +600,13 @@
   }
 
   virtual void Run() {
-    bool result = Thread::EnterIsolateAsHelper(isolate_, true);
+    bool result =
+        Thread::EnterIsolateAsHelper(isolate_, Thread::kMarkerTask, true);
     ASSERT(result);
     {
-      StackZone stack_zone(Thread::Current());
+      Thread* thread = Thread::Current();
+      TIMELINE_FUNCTION_GC_DURATION(thread, "MarkTask");
+      StackZone stack_zone(thread);
       Zone* zone = stack_zone.GetZone();
       SkippedCodeFunctions* skipped_code_functions =
           collect_code_ ? new(zone) SkippedCodeFunctions() : NULL;
diff --git a/runtime/vm/gc_sweeper.cc b/runtime/vm/gc_sweeper.cc
index 0dcf62f..5b7949b 100644
--- a/runtime/vm/gc_sweeper.cc
+++ b/runtime/vm/gc_sweeper.cc
@@ -11,6 +11,7 @@
 #include "vm/pages.h"
 #include "vm/safepoint.h"
 #include "vm/thread_pool.h"
+#include "vm/timeline.h"
 
 namespace dart {
 
@@ -114,32 +115,36 @@
   }
 
   virtual void Run() {
-    bool result = Thread::EnterIsolateAsHelper(task_isolate_);
+    bool result = Thread::EnterIsolateAsHelper(task_isolate_,
+                                               Thread::kSweeperTask);
     ASSERT(result);
-    Thread* thread = Thread::Current();
-    GCSweeper sweeper;
+    {
+      Thread* thread = Thread::Current();
+      TIMELINE_FUNCTION_GC_DURATION(thread, "SweeperTask");
+      GCSweeper sweeper;
 
-    HeapPage* page = first_;
-    HeapPage* prev_page = NULL;
+      HeapPage* page = first_;
+      HeapPage* prev_page = NULL;
 
-    while (page != NULL) {
-      thread->CheckForSafepoint();
-      HeapPage* next_page = page->next();
-      ASSERT(page->type() == HeapPage::kData);
-      bool page_in_use = sweeper.SweepPage(page, freelist_, false);
-      if (page_in_use) {
-        prev_page = page;
-      } else {
-        old_space_->FreePage(page, prev_page);
+      while (page != NULL) {
+        thread->CheckForSafepoint();
+        HeapPage* next_page = page->next();
+        ASSERT(page->type() == HeapPage::kData);
+        bool page_in_use = sweeper.SweepPage(page, freelist_, false);
+        if (page_in_use) {
+          prev_page = page;
+        } else {
+          old_space_->FreePage(page, prev_page);
+        }
+        {
+          // Notify the mutator thread that we have added elements to the free
+          // list or that more capacity is available.
+          MonitorLocker ml(old_space_->tasks_lock());
+          ml.Notify();
+        }
+        if (page == last_) break;
+        page = next_page;
       }
-      {
-        // Notify the mutator thread that we have added elements to the free
-        // list or that more capacity is available.
-        MonitorLocker ml(old_space_->tasks_lock());
-        ml.Notify();
-      }
-      if (page == last_) break;
-      page = next_page;
     }
     // Exit isolate cleanly *before* notifying it, to avoid shutdown race.
     Thread::ExitIsolateAsHelper();
diff --git a/runtime/vm/guard_field_test.cc b/runtime/vm/guard_field_test.cc
index d0ecb6e..0e0972b 100644
--- a/runtime/vm/guard_field_test.cc
+++ b/runtime/vm/guard_field_test.cc
@@ -13,12 +13,14 @@
                       const char* field_name) {
   RawLibrary* raw_library = Library::RawCast(Api::UnwrapHandle(library));
   Library& lib = Library::ZoneHandle(raw_library);
-  const String& classname = String::Handle(Symbols::New(class_name));
+  const String& classname = String::Handle(Symbols::New(Thread::Current(),
+                                                        class_name));
   Class& cls = Class::Handle(lib.LookupClass(classname));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
 
   String& fieldname = String::Handle(String::New(field_name));
-  Field& field = Field::ZoneHandle(cls.LookupInstanceField(fieldname));
+  Field& field =
+      Field::ZoneHandle(cls.LookupInstanceFieldAllowPrivate(fieldname));
   EXPECT(!field.IsNull());
   return field.raw();
 }
diff --git a/runtime/vm/hash_table.h b/runtime/vm/hash_table.h
index c162232..f4eb375 100644
--- a/runtime/vm/hash_table.h
+++ b/runtime/vm/hash_table.h
@@ -151,21 +151,24 @@
   // Returns the entry that matches 'key', or -1 if none exists.
   template<typename Key>
   intptr_t FindKey(const Key& key) const {
-    ASSERT(NumOccupied() < NumEntries());
+    const intptr_t num_entries = NumEntries();
+    ASSERT(NumOccupied() < num_entries);
     // TODO(koda): Add salt.
-    intptr_t probe = static_cast<uword>(KeyTraits::Hash(key)) % NumEntries();
+    uword hash = KeyTraits::Hash(key);
+    intptr_t probe = hash % num_entries;
     // TODO(koda): Consider quadratic probing.
-    for (; ; probe = (probe + 1) % NumEntries()) {
+    while (true) {
       if (IsUnused(probe)) {
         return -1;
-      } else if (IsDeleted(probe)) {
-        continue;
-      } else {
+      } else if (!IsDeleted(probe)) {
         key_handle_ = GetKey(probe);
         if (KeyTraits::IsMatch(key, key_handle_)) {
           return probe;
         }
       }
+      // Advance probe.
+      probe++;
+      probe = (probe == num_entries) ? 0 : probe;
     }
     UNREACHABLE();
     return -1;
@@ -177,12 +180,14 @@
   //   and returns false.
   template<typename Key>
   bool FindKeyOrDeletedOrUnused(const Key& key, intptr_t* entry) const {
+    const intptr_t num_entries = NumEntries();
     ASSERT(entry != NULL);
-    ASSERT(NumOccupied() < NumEntries());
-    intptr_t probe = static_cast<uword>(KeyTraits::Hash(key)) % NumEntries();
+    ASSERT(NumOccupied() < num_entries);
+    uword hash = KeyTraits::Hash(key);
+    intptr_t probe = hash % num_entries;
     intptr_t deleted = -1;
     // TODO(koda): Consider quadratic probing.
-    for (; ; probe = (probe + 1) % NumEntries()) {
+    while (true) {
       if (IsUnused(probe)) {
         *entry = (deleted != -1) ? deleted : probe;
         return false;
@@ -197,6 +202,9 @@
           return true;
         }
       }
+      // Advance probe.
+      probe++;
+      probe = (probe == num_entries) ? 0 : probe;
     }
     UNREACHABLE();
     return false;
@@ -636,7 +644,7 @@
       BaseIterTable::InsertKey(entry, key);
       return key.raw();
     } else {
-      return BaseIterTable::GetPayload(entry, 0);
+      return BaseIterTable::GetKey(entry);
     }
   }
 
diff --git a/runtime/vm/hash_table_test.cc b/runtime/vm/hash_table_test.cc
index b646b32..f413932 100644
--- a/runtime/vm/hash_table_test.cc
+++ b/runtime/vm/hash_table_test.cc
@@ -20,6 +20,8 @@
 // easy to engineer collisions.
 class TestTraits {
  public:
+  static const char* Name() { return "TestTraits"; }
+
   static bool IsMatch(const char* key, const Object& obj) {
     return String::Cast(obj).Equals(key);
   }
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 8950958..0cd9f41 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -224,7 +224,7 @@
   ASSERT(old_space_->iterating_thread_ != thread());
 #endif
   while (old_space_->tasks() > 0) {
-    ml.Wait();
+    ml.WaitWithSafepointCheck(thread());
   }
 #if defined(DEBUG)
   ASSERT(old_space_->iterating_thread_ == NULL);
@@ -260,6 +260,12 @@
 }
 
 
+void Heap::IterateOldObjectsNoEmbedderPages(ObjectVisitor* visitor) const {
+  HeapIterationScope heap_iteration_scope;
+  old_space_.VisitObjectsNoEmbedderPages(visitor);
+}
+
+
 void Heap::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
   new_space_.VisitObjectPointers(visitor);
   old_space_.VisitObjectPointers(visitor);
@@ -367,11 +373,7 @@
     bool invoke_api_callbacks = (api_callbacks == kInvokeApiCallbacks);
     RecordBeforeGC(kNew, reason);
     VMTagScope tagScope(thread, VMTag::kGCNewSpaceTagId);
-#ifndef PRODUCT
-    TimelineDurationScope tds(thread,
-                              isolate()->GetGCStream(),
-                              "CollectNewGeneration");
-#endif  // !PRODUCT
+    TIMELINE_FUNCTION_GC_DURATION(thread, "CollectNewGeneration");
     UpdateClassHeapStatsBeforeGC(kNew);
     new_space_.Scavenge(invoke_api_callbacks);
     isolate()->class_table()->UpdatePromoted();
@@ -394,11 +396,7 @@
     bool invoke_api_callbacks = (api_callbacks == kInvokeApiCallbacks);
     RecordBeforeGC(kOld, reason);
     VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId);
-#ifndef PRODUCT
-    TimelineDurationScope tds(thread,
-                              isolate()->GetGCStream(),
-                              "CollectOldGeneration");
-#endif  // !PRODUCT
+    TIMELINE_FUNCTION_GC_DURATION(thread, "CollectOldGeneration");
     UpdateClassHeapStatsBeforeGC(kOld);
     old_space_.MarkSweep(invoke_api_callbacks);
     RecordAfterGC(kOld);
@@ -446,6 +444,19 @@
 }
 
 
+#if defined(DEBUG)
+void Heap::WaitForSweeperTasks() {
+  Thread* thread = Thread::Current();
+  {
+    MonitorLocker ml(old_space_.tasks_lock());
+    while (old_space_.tasks() > 0) {
+      ml.WaitWithSafepointCheck(thread);
+    }
+  }
+}
+#endif
+
+
 bool Heap::ShouldPretenure(intptr_t class_id) const {
   if (class_id == kOneByteStringCid) {
     return pretenure_policy_ > 0;
@@ -491,6 +502,11 @@
 }
 
 
+void Heap::InitGrowthControl() {
+  old_space_.InitGrowthControl();
+}
+
+
 void Heap::SetGrowthControlState(bool state) {
   old_space_.SetGrowthControlState(state);
 }
@@ -501,10 +517,10 @@
 }
 
 
-void Heap::WriteProtect(bool read_only, bool include_code_pages) {
+void Heap::WriteProtect(bool read_only) {
   read_only_ = read_only;
   new_space_.WriteProtect(read_only);
-  old_space_.WriteProtect(read_only, include_code_pages);
+  old_space_.WriteProtect(read_only);
 }
 
 
@@ -830,16 +846,15 @@
 }
 
 
-WritableVMIsolateScope::WritableVMIsolateScope(Thread* thread,
-                                               bool include_code_pages)
-    : StackResource(thread), include_code_pages_(include_code_pages) {
-  Dart::vm_isolate()->heap()->WriteProtect(false, include_code_pages_);
+WritableVMIsolateScope::WritableVMIsolateScope(Thread* thread)
+    : StackResource(thread) {
+  Dart::vm_isolate()->heap()->WriteProtect(false);
 }
 
 
 WritableVMIsolateScope::~WritableVMIsolateScope() {
   ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
-  Dart::vm_isolate()->heap()->WriteProtect(true, include_code_pages_);
+  Dart::vm_isolate()->heap()->WriteProtect(true);
 }
 
 }  // namespace dart
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index f116af55..287cbdc 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -102,6 +102,7 @@
 
   void IterateObjects(ObjectVisitor* visitor) const;
   void IterateOldObjects(ObjectVisitor* visitor) const;
+  void IterateOldObjectsNoEmbedderPages(ObjectVisitor* visitor) const;
   void IterateObjectPointers(ObjectVisitor* visitor) const;
 
   // Find an object by visiting all pointers in the specified heap space,
@@ -124,8 +125,13 @@
     return old_space_.NeedsGarbageCollection();
   }
 
+#if defined(DEBUG)
+  void WaitForSweeperTasks();
+#endif
+
   // Enables growth control on the page space heaps.  This should be
   // called before any user code is executed.
+  void InitGrowthControl();
   void EnableGrowthControl() { SetGrowthControlState(true); }
   void DisableGrowthControl() { SetGrowthControlState(false); }
   void SetGrowthControlState(bool state);
@@ -133,7 +139,7 @@
 
   // Protect access to the heap. Note: Code pages are made
   // executable/non-executable when 'read_only' is true/false, respectively.
-  void WriteProtect(bool read_only, bool include_code_pages);
+  void WriteProtect(bool read_only);
   void WriteProtectCode(bool read_only) {
     old_space_.WriteProtectCode(read_only);
   }
@@ -190,9 +196,11 @@
   // Associate an id with an object (used when serializing an object).
   // A non-existant id is equal to 0.
   void SetObjectId(RawObject* raw_obj, intptr_t object_id) {
+    ASSERT(Thread::Current()->IsMutatorThread());
     SetWeakEntry(raw_obj, kObjectIds, object_id);
   }
   intptr_t GetObjectId(RawObject* raw_obj) const {
+    ASSERT(Thread::Current()->IsMutatorThread());
     return GetWeakEntry(raw_obj, kObjectIds);
   }
   int64_t ObjectIdCount() const;
@@ -386,11 +394,8 @@
 // Note: During this scope, the code pages are non-executable.
 class WritableVMIsolateScope : StackResource {
  public:
-  explicit WritableVMIsolateScope(Thread* thread, bool include_code_pages);
+  explicit WritableVMIsolateScope(Thread* thread);
   ~WritableVMIsolateScope();
-
- private:
-  bool include_code_pages_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/heap_test.cc b/runtime/vm/heap_test.cc
index c76297d..ad01502 100644
--- a/runtime/vm/heap_test.cc
+++ b/runtime/vm/heap_test.cc
@@ -93,7 +93,7 @@
 
 static RawClass* GetClass(const Library& lib, const char* name) {
   const Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New(name))));
+      lib.LookupClass(String::Handle(Symbols::New(Thread::Current(), name))));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
   return cls.raw();
 }
@@ -236,8 +236,7 @@
 
 class FindOnly : public FindObjectVisitor {
  public:
-  FindOnly(Isolate* isolate, RawObject* target)
-      : FindObjectVisitor(isolate), target_(target) {
+  explicit FindOnly(RawObject* target) : target_(target) {
 #if defined(DEBUG)
     EXPECT_GT(Thread::Current()->no_safepoint_scope_depth(), 0);
 #endif
@@ -254,7 +253,7 @@
 
 class FindNothing : public FindObjectVisitor {
  public:
-  FindNothing() : FindObjectVisitor(Isolate::Current()) { }
+  FindNothing() { }
   virtual ~FindNothing() { }
   virtual bool FindObject(RawObject* obj) const { return false; }
 };
@@ -268,7 +267,7 @@
     const String& obj = String::Handle(String::New("x", spaces[space]));
     {
       NoSafepointScope no_safepoint;
-      FindOnly find_only(isolate, obj.raw());
+      FindOnly find_only(obj.raw());
       EXPECT(obj.raw() == heap->FindObject(&find_only));
     }
   }
@@ -284,9 +283,9 @@
   const String& obj = String::Handle(String::New("x", Heap::kOld));
   Heap* heap = Thread::Current()->isolate()->heap();
   EXPECT(heap->Contains(RawObject::ToAddr(obj.raw())));
-  heap->WriteProtect(true, true /* include_code_pages */);
+  heap->WriteProtect(true);
   EXPECT(heap->Contains(RawObject::ToAddr(obj.raw())));
-  heap->WriteProtect(false, true /* include_code_pages */);
+  heap->WriteProtect(false);
   EXPECT(heap->Contains(RawObject::ToAddr(obj.raw())));
 }
 
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index b3e48f1..cc62146 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -448,7 +448,10 @@
   }
   PrintICDataHelper(f, ic_data());
   if (with_checks()) {
-    f->Print(" WITH CHECKS");
+    f->Print(" WITH-CHECKS");
+  }
+  if (complete()) {
+    f->Print(" COMPLETE");
   }
 }
 
@@ -665,6 +668,15 @@
 }
 
 
+void CheckedSmiOpInstr::PrintOperandsTo(BufferFormatter* f) const {
+  f->Print("%s", Token::Str(op_kind()));
+  f->Print(", ");
+  left()->PrintTo(f);
+  f->Print(", ");
+  right()->PrintTo(f);
+}
+
+
 void BinaryIntegerOpInstr::PrintOperandsTo(BufferFormatter* f) const {
   f->Print("%s", Token::Str(op_kind()));
   if (is_truncating()) {
diff --git a/runtime/vm/instructions_x64.cc b/runtime/vm/instructions_x64.cc
index 2dc98bc..3fa610a 100644
--- a/runtime/vm/instructions_x64.cc
+++ b/runtime/vm/instructions_x64.cc
@@ -48,7 +48,11 @@
     int32_t offset = *reinterpret_cast<int32_t*>(pc + 3);
     return Thread::ObjectAtOffset(offset, obj);
   }
-  if (((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x5e)) ||
+  if (((bytes[0] == 0x41) && (bytes[1] == 0xff) && (bytes[2] == 0x76)) ||
+      ((bytes[0] == 0x49) && (bytes[1] == 0x3b) && (bytes[2] == 0x66)) ||
+      ((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x46)) ||
+      ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x5e)) ||
+      ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x66)) ||
       ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x6e))) {
     uint8_t offset = *reinterpret_cast<uint8_t*>(pc + 3);
     return Thread::ObjectAtOffset(offset, obj);
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 4f4032f..c68f277 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -36,6 +36,7 @@
 DEFINE_FLAG(bool, unbox_numeric_fields, true,
     "Support unboxed double and float32x4 fields.");
 DECLARE_FLAG(bool, eliminate_type_checks);
+DECLARE_FLAG(bool, support_externalizable_strings);
 
 
 #if defined(DEBUG)
@@ -89,7 +90,17 @@
   // computations added in the optimizing compiler.
   ASSERT(deopt_id_ != Thread::kNoDeoptId);
   if (deopt_id_ < ic_data_array.length()) {
-    return ic_data_array[deopt_id_];
+    const ICData* result = ic_data_array[deopt_id_];
+#if defined(TAG_IC_DATA)
+    if (result != NULL) {
+      if (result->tag() == -1) {
+        result->set_tag(tag());
+      } else if (result->tag() != tag()) {
+        FATAL("ICData tag mismatch");
+      }
+    }
+#endif
+    return result;
   }
   return NULL;
 }
@@ -133,6 +144,7 @@
       unary_checks_(unary_checks),
       cids_(unary_checks.NumberOfChecks()),
       licm_hoisted_(false),
+      is_dense_switch_(IsDenseCidRange(unary_checks)),
       token_pos_(token_pos) {
   ASSERT(unary_checks.IsZoneHandle());
   // Expected useful check data.
@@ -168,22 +180,11 @@
 }
 
 
-bool CheckClassInstr::IsImmutableClassId(intptr_t cid) {
-  switch (cid) {
-    case kOneByteStringCid:
-    case kTwoByteStringCid:
-      return false;
-    default:
-      return true;
-  }
-}
-
-
 static bool AreAllChecksImmutable(const ICData& checks) {
   const intptr_t len = checks.NumberOfChecks();
   for (intptr_t i = 0; i < len; i++) {
     if (checks.IsUsedAt(i)) {
-      if (!CheckClassInstr::IsImmutableClassId(
+      if (Field::IsExternalizableCid(
               checks.GetReceiverClassIdAt(i))) {
         return false;
       }
@@ -202,7 +203,7 @@
 
 EffectSet CheckClassIdInstr::Dependencies() const {
   // Externalization of strings via the API can change the class-id.
-  return !CheckClassInstr::IsImmutableClassId(cid_) ?
+  return Field::IsExternalizableCid(cid_) ?
       EffectSet::Externalization() : EffectSet::None();
 }
 
@@ -231,14 +232,24 @@
 }
 
 
+bool CheckClassInstr::IsDenseCidRange(const ICData& unary_checks) {
+  ASSERT(unary_checks.NumArgsTested() == 1);
+  // TODO(fschneider): Support smis in dense cid checks.
+  if (unary_checks.GetReceiverClassIdAt(0) == kSmiCid) return false;
+  if (unary_checks.NumberOfChecks() <= 2) return false;
+  intptr_t max = 0;
+  intptr_t min = kIntptrMax;
+  for (intptr_t i = 0; i < unary_checks.NumberOfChecks(); ++i) {
+    intptr_t cid = unary_checks.GetCidAt(i);
+    if (cid < min) min = cid;
+    if (cid > max) max = cid;
+  }
+  return (max - min) < kBitsPerWord;
+}
+
 
 bool CheckClassInstr::IsDenseSwitch() const {
-  if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) return false;
-  if (cids_.length() > 2 &&
-      cids_[cids_.length() - 1] - cids_[0] < kBitsPerWord) {
-    return true;
-  }
-  return false;
+  return is_dense_switch_;
 }
 
 
@@ -3041,8 +3052,8 @@
       ASSERT(call_ic_data->NumArgsTested() == 2);
       const String& name = String::Handle(zone, call_ic_data->target_name());
       const Class& smi_class = Class::Handle(zone, Smi::Class());
-      const Function& smi_op_target =
-          Function::Handle(Resolver::ResolveDynamicAnyArgs(smi_class, name));
+      const Function& smi_op_target = Function::Handle(zone,
+          Resolver::ResolveDynamicAnyArgs(zone, smi_class, name));
       if (call_ic_data->NumberOfChecks() == 0) {
         GrowableArray<intptr_t> class_ids(2);
         class_ids.Add(kSmiCid);
@@ -3127,7 +3138,8 @@
                                         instance_call()->argument_names(),
                                         deopt_id(),
                                         instance_call()->token_pos(),
-                                        locs());
+                                        locs(),
+                                        complete());
 }
 
 
@@ -3469,7 +3481,8 @@
     return this;
   }
   const intptr_t length = Smi::Cast(num_elements->BoundConstant()).Value();
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   GrowableHandlePtrArray<const String> pieces(zone, length);
   for (intptr_t i = 0; i < length; i++) {
     pieces.Add(Object::null_string());
@@ -3497,7 +3510,8 @@
         pieces.SetAt(store_index, String::Cast(obj));
       } else if (obj.IsSmi()) {
         const char* cstr = obj.ToCString();
-        pieces.SetAt(store_index, String::Handle(zone, Symbols::New(cstr)));
+        pieces.SetAt(store_index,
+            String::Handle(zone, String::New(cstr, Heap::kOld)));
       } else if (obj.IsBool()) {
         pieces.SetAt(store_index,
             Bool::Cast(obj).value() ? Symbols::True() : Symbols::False());
@@ -3511,9 +3525,8 @@
     }
   }
 
-  ASSERT(pieces.length() == length);
   const String& concatenated = String::ZoneHandle(zone,
-      Symbols::FromConcatAll(pieces));
+      Symbols::FromConcatAll(thread, pieces));
   return flow_graph->GetConstant(concatenated);
 }
 
@@ -3550,6 +3563,8 @@
     case MethodRecognizer::kMathTan:
     case MethodRecognizer::kMathAcos:
     case MethodRecognizer::kMathAsin:
+    case MethodRecognizer::kMathSin:
+    case MethodRecognizer::kMathCos:
       return 1;
     case MethodRecognizer::kDoubleMod:
     case MethodRecognizer::kMathDoublePow:
@@ -3636,6 +3651,10 @@
       return kLibcTanRuntimeEntry;
     case MethodRecognizer::kMathAsin:
       return kLibcAsinRuntimeEntry;
+    case MethodRecognizer::kMathSin:
+      return kLibcSinRuntimeEntry;
+    case MethodRecognizer::kMathCos:
+      return kLibcCosRuntimeEntry;
     case MethodRecognizer::kMathAcos:
       return kLibcAcosRuntimeEntry;
     case MethodRecognizer::kMathAtan:
@@ -3714,9 +3733,9 @@
 
 
 void NativeCallInstr::SetupNative() {
-  Zone* Z = Thread::Current()->zone();
-  const Class& cls = Class::Handle(Z, function().Owner());
-  const Library& library = Library::Handle(Z, cls.library());
+  Zone* zone = Thread::Current()->zone();
+  const Class& cls = Class::Handle(zone, function().Owner());
+  const Library& library = Library::Handle(zone, cls.library());
   const int num_params =
       NativeArguments::ParameterCountForResolution(function());
   bool auto_setup_scope = true;
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index f424c99..6e16c31 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -479,6 +479,7 @@
   M(AllocateUninitializedContext)                                              \
   M(CloneContext)                                                              \
   M(BinarySmiOp)                                                               \
+  M(CheckedSmiOp)                                                              \
   M(BinaryInt32Op)                                                             \
   M(UnarySmiOp)                                                                \
   M(UnaryDoubleOp)                                                             \
@@ -1557,12 +1558,14 @@
  public:
   CatchBlockEntryInstr(intptr_t block_id,
                        intptr_t try_index,
+                       GraphEntryInstr* graph_entry,
                        const Array& handler_types,
                        intptr_t catch_try_index,
                        const LocalVariable& exception_var,
                        const LocalVariable& stacktrace_var,
                        bool needs_stacktrace)
       : BlockEntryInstr(block_id, try_index),
+        graph_entry_(graph_entry),
         predecessor_(NULL),
         catch_handler_types_(Array::ZoneHandle(handler_types.raw())),
         catch_try_index_(catch_try_index),
@@ -1580,6 +1583,8 @@
     return predecessor_;
   }
 
+  GraphEntryInstr* graph_entry() const { return graph_entry_; }
+
   const LocalVariable& exception_var() const { return exception_var_; }
   const LocalVariable& stacktrace_var() const { return stacktrace_var_; }
 
@@ -1605,6 +1610,7 @@
     predecessor_ = predecessor;
   }
 
+  GraphEntryInstr* graph_entry_;
   BlockEntryInstr* predecessor_;
   const Array& catch_handler_types_;
   const intptr_t catch_try_index_;
@@ -1911,10 +1917,11 @@
   PhiInstr(JoinEntryInstr* block, intptr_t num_inputs)
     : block_(block),
       inputs_(num_inputs),
-      is_alive_(false),
       representation_(kTagged),
       reaching_defs_(NULL),
-      loop_variable_info_(NULL) {
+      loop_variable_info_(NULL),
+      is_alive_(false),
+      is_receiver_(kUnknownReceiver) {
     for (intptr_t i = 0; i < num_inputs; ++i) {
       inputs_.Add(NULL);
     }
@@ -1984,6 +1991,20 @@
 
   PRINT_TO_SUPPORT
 
+  enum ReceiverType {
+    kUnknownReceiver = -1,
+    kNotReceiver = 0,
+    kReceiver = 1
+  };
+
+  ReceiverType is_receiver() const {
+    return static_cast<ReceiverType>(is_receiver_);
+  }
+
+  void set_is_receiver(ReceiverType is_receiver) {
+    is_receiver_ = is_receiver;
+  }
+
  private:
   // Direct access to inputs_ in order to resize it due to unreachable
   // predecessors.
@@ -1993,11 +2014,11 @@
 
   JoinEntryInstr* block_;
   GrowableArray<Value*> inputs_;
-  bool is_alive_;
   Representation representation_;
-
   BitVector* reaching_defs_;
   InductionVariableInfo* loop_variable_info_;
+  bool is_alive_;
+  int8_t is_receiver_;
 
   DISALLOW_COPY_AND_ASSIGN(PhiInstr);
 };
@@ -2067,7 +2088,6 @@
 
   virtual EffectSet Effects() const { return EffectSet::None(); }
 
-
   virtual TokenPosition token_pos() const {
     return TokenPosition::kPushArgument;
   }
@@ -2872,17 +2892,20 @@
  public:
   PolymorphicInstanceCallInstr(InstanceCallInstr* instance_call,
                                const ICData& ic_data,
-                               bool with_checks)
+                               bool with_checks,
+                               bool complete)
       : TemplateDefinition(instance_call->deopt_id()),
         instance_call_(instance_call),
         ic_data_(ic_data),
-        with_checks_(with_checks) {
+        with_checks_(with_checks),
+        complete_(complete) {
     ASSERT(instance_call_ != NULL);
     ASSERT(ic_data.NumberOfChecks() > 0);
   }
 
   InstanceCallInstr* instance_call() const { return instance_call_; }
   bool with_checks() const { return with_checks_; }
+  bool complete() const { return complete_; }
   virtual TokenPosition token_pos() const {
     return instance_call_->token_pos();
   }
@@ -2914,6 +2937,7 @@
   InstanceCallInstr* instance_call_;
   const ICData& ic_data_;
   const bool with_checks_;
+  const bool complete_;
 
   DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr);
 };
@@ -6868,6 +6892,39 @@
 };
 
 
+class CheckedSmiOpInstr : public TemplateDefinition<2, Throws> {
+ public:
+  CheckedSmiOpInstr(Token::Kind op_kind,
+                    Value* left,
+                    Value* right,
+                    InstanceCallInstr* call)
+      : TemplateDefinition(call->deopt_id()),
+        call_(call),
+        op_kind_(op_kind) {
+    SetInputAt(0, left);
+    SetInputAt(1, right);
+  }
+
+  InstanceCallInstr* call() const { return call_; }
+  Token::Kind op_kind() const { return op_kind_; }
+  Value* left() const { return inputs_[0]; }
+  Value* right() const { return inputs_[1]; }
+
+  virtual bool CanDeoptimize() const { return true; }
+
+  virtual EffectSet Effects() const { return EffectSet::All(); }
+
+  PRINT_OPERANDS_TO_SUPPORT
+
+  DECLARE_INSTRUCTION(CheckedSmiOp)
+
+ private:
+  InstanceCallInstr* call_;
+  const Token::Kind op_kind_;
+  DISALLOW_COPY_AND_ASSIGN(CheckedSmiOpInstr);
+};
+
+
 class BinaryIntegerOpInstr : public TemplateDefinition<2, NoThrow, Pure> {
  public:
   BinaryIntegerOpInstr(Token::Kind op_kind,
@@ -7751,6 +7808,7 @@
   bool DeoptIfNotNull() const;
 
   bool IsDenseSwitch() const;
+  static bool IsDenseCidRange(const ICData& unary_checks);
   intptr_t ComputeCidMask() const;
   static bool IsDenseMask(intptr_t mask);
 
@@ -7761,14 +7819,13 @@
 
   void set_licm_hoisted(bool value) { licm_hoisted_ = value; }
 
-  static bool IsImmutableClassId(intptr_t cid);
-
   PRINT_OPERANDS_TO_SUPPORT
 
  private:
   const ICData& unary_checks_;
   GrowableArray<intptr_t> cids_;  // Sorted, lowest first.
   bool licm_hoisted_;
+  bool is_dense_switch_;
   const TokenPosition token_pos_;
 
   DISALLOW_COPY_AND_ASSIGN(CheckClassInstr);
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index df31e31..c7591b5 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -1581,7 +1581,8 @@
   if (field_cid == kDynamicCid) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldClassInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -1739,7 +1740,8 @@
   if (field().guarded_list_length() == Field::kNoFixedLength) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldLengthInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -2874,19 +2876,11 @@
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
     if (FLAG_use_osr && osr_entry_label()->IsLinked()) {
-      uword flags_address = Isolate::Current()->stack_overflow_flags_address();
       const Register value = instruction_->locs()->temp(0).reg();
       __ Comment("CheckStackOverflowSlowPathOsr");
       __ Bind(osr_entry_label());
-      if (FLAG_allow_absolute_addresses) {
-        __ LoadImmediate(IP, flags_address);
-        __ LoadImmediate(value, Isolate::kOsrRequest);
-        __ str(value, Address(IP));
-      } else {
-        __ LoadIsolate(IP);
-        __ LoadImmediate(value, Isolate::kOsrRequest);
-        __ str(value, Address(IP, Isolate::stack_overflow_flags_offset()));
-      }
+      __ LoadImmediate(value, Thread::kOsrRequest);
+      __ str(value, Address(THR, Thread::stack_overflow_flags_offset()));
     }
     __ Comment("CheckStackOverflowSlowPath");
     __ Bind(entry_label());
@@ -2928,13 +2922,7 @@
   CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this);
   compiler->AddSlowPathCode(slow_path);
 
-  if (compiler->is_optimizing() && FLAG_allow_absolute_addresses) {
-    __ LoadImmediate(IP, Isolate::Current()->stack_limit_address());
-    __ ldr(IP, Address(IP));
-  } else {
-    __ LoadIsolate(IP);
-    __ ldr(IP, Address(IP, Isolate::stack_limit_offset()));
-  }
+  __ ldr(IP, Address(THR, Thread::stack_limit_offset()));
   __ cmp(SP, Operand(IP));
   __ b(slow_path->entry_label(), LS);
   if (compiler->CanOSRFunction() && in_loop()) {
@@ -3050,6 +3038,131 @@
 }
 
 
+class CheckedSmiSlowPath : public SlowPathCode {
+ public:
+  CheckedSmiSlowPath(CheckedSmiOpInstr* instruction, intptr_t try_index)
+      : instruction_(instruction), try_index_(try_index) { }
+
+  virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
+    if (Assembler::EmittingComments()) {
+      __ Comment("slow path smi operation");
+    }
+    __ Bind(entry_label());
+    LocationSummary* locs = instruction_->locs();
+    Register result = locs->out(0).reg();
+    locs->live_registers()->Remove(Location::RegisterLocation(result));
+
+    compiler->SaveLiveRegisters(locs);
+    __ Push(locs->in(0).reg());
+    __ Push(locs->in(1).reg());
+    compiler->EmitMegamorphicInstanceCall(
+        *instruction_->call()->ic_data(),
+        instruction_->call()->ArgumentCount(),
+        instruction_->call()->deopt_id(),
+        instruction_->call()->token_pos(),
+        locs,
+        try_index_,
+        /* slow_path_argument_count = */ 2);
+    __ mov(result, Operand(R0));
+    compiler->RestoreLiveRegisters(locs);
+    __ b(exit_label());
+  }
+
+ private:
+  CheckedSmiOpInstr* instruction_;
+  intptr_t try_index_;
+};
+
+
+LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
+  const intptr_t kNumInputs = 2;
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new(zone) LocationSummary(
+      zone, kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_in(1, Location::RequiresRegister());
+  summary->set_out(0, Location::RequiresRegister());
+  return summary;
+}
+
+
+void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  CheckedSmiSlowPath* slow_path =
+      new CheckedSmiSlowPath(this, compiler->CurrentTryIndex());
+  compiler->AddSlowPathCode(slow_path);
+  // Test operands if necessary.
+  Register left = locs()->in(0).reg();
+  Register right = locs()->in(1).reg();
+  Register result = locs()->out(0).reg();
+  intptr_t left_cid = this->left()->Type()->ToCid();
+  intptr_t right_cid = this->right()->Type()->ToCid();
+  bool combined_smi_check = false;
+  if (this->left()->definition() == this->right()->definition()) {
+    __ tst(left, Operand(kSmiTagMask));
+  } else if (left_cid == kSmiCid) {
+    __ tst(right, Operand(kSmiTagMask));
+  } else if (right_cid == kSmiCid) {
+    __ tst(left, Operand(kSmiTagMask));
+  } else {
+    combined_smi_check = true;
+    __ orr(result, left, Operand(right));
+    __ tst(result, Operand(kSmiTagMask));
+  }
+  __ b(slow_path->entry_label(), NE);
+  switch (op_kind()) {
+    case Token::kADD:
+      __ adds(result, left, Operand(right));
+      __ b(slow_path->entry_label(), VS);
+      break;
+    case Token::kSUB:
+      __ subs(result, left, Operand(right));
+      __ b(slow_path->entry_label(), VS);
+      break;
+    case Token::kMUL:
+      __ SmiUntag(IP, left);
+      __ smull(result, IP, IP, right);
+      // IP: result bits 32..63.
+      __ cmp(IP, Operand(result, ASR, 31));
+      __ b(slow_path->entry_label(), NE);
+      break;
+    case Token::kBIT_OR:
+      // Operation may be part of combined smi check.
+      if (!combined_smi_check) {
+        __ orr(result, left, Operand(right));
+      }
+      break;
+    case Token::kBIT_AND:
+      __ and_(result, left, Operand(right));
+      break;
+    case Token::kBIT_XOR:
+      __ eor(result, left, Operand(right));
+      break;
+    case Token::kEQ:
+    case Token::kLT:
+    case Token::kLTE:
+    case Token::kGT:
+    case Token::kGTE: {
+      Label true_label, false_label, done;
+      BranchLabels labels = { &true_label, &false_label, &false_label };
+      Condition true_condition =
+          EmitSmiComparisonOp(compiler, locs(), op_kind());
+      EmitBranchOnCondition(compiler, true_condition, labels);
+      __ Bind(&false_label);
+      __ LoadObject(result, Bool::False());
+      __ b(&done);
+      __ Bind(&true_label);
+      __ LoadObject(result, Bool::True());
+      __ Bind(&done);
+      break;
+    }
+    default:
+      UNIMPLEMENTED();
+  }
+  __ Bind(slow_path->exit_label());
+}
+
+
 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 2;
@@ -6608,7 +6721,7 @@
 
 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   if (!compiler->is_optimizing()) {
-    if (FLAG_emit_edge_counters) {
+    if (FLAG_reorder_basic_blocks) {
       compiler->EmitEdgeCounter(block()->preorder_number());
     }
     // Add a deoptimization descriptor for deoptimizing instructions that
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index 79296b3..452b6ba 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -1438,7 +1438,8 @@
   if (field_cid == kDynamicCid) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldClassInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -1593,7 +1594,8 @@
   if (field().guarded_list_length() == Field::kNoFixedLength) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldLengthInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -2584,19 +2586,11 @@
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
     if (FLAG_use_osr && osr_entry_label()->IsLinked()) {
-      uword flags_address = Isolate::Current()->stack_overflow_flags_address();
       const Register value = instruction_->locs()->temp(0).reg();
       __ Comment("CheckStackOverflowSlowPathOsr");
       __ Bind(osr_entry_label());
-      if (FLAG_allow_absolute_addresses) {
-        __ LoadImmediate(TMP, flags_address);
-        __ LoadImmediate(value, Isolate::kOsrRequest);
-        __ str(value, Address(TMP));
-      } else {
-        __ LoadIsolate(TMP);
-        __ LoadImmediate(value, Isolate::kOsrRequest);
-        __ str(value, Address(TMP, Isolate::stack_overflow_flags_offset()));
-      }
+      __ LoadImmediate(value, Thread::kOsrRequest);
+      __ str(value, Address(THR, Thread::stack_overflow_flags_offset()));
     }
     __ Comment("CheckStackOverflowSlowPath");
     __ Bind(entry_label());
@@ -2638,13 +2632,7 @@
   CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this);
   compiler->AddSlowPathCode(slow_path);
 
-  if (compiler->is_optimizing() && FLAG_allow_absolute_addresses) {
-    __ LoadImmediate(TMP, Isolate::Current()->stack_limit_address());
-    __ ldr(TMP, Address(TMP));
-  } else {
-    __ LoadIsolate(TMP);
-    __ ldr(TMP, Address(TMP, Isolate::stack_limit_offset()));
-  }
+  __ ldr(TMP, Address(THR, Thread::stack_limit_offset()));
   __ CompareRegisters(SP, TMP);
   __ b(slow_path->entry_label(), LS);
   if (compiler->CanOSRFunction() && in_loop()) {
@@ -2766,6 +2754,133 @@
 }
 
 
+class CheckedSmiSlowPath : public SlowPathCode {
+ public:
+  CheckedSmiSlowPath(CheckedSmiOpInstr* instruction, intptr_t try_index)
+      : instruction_(instruction), try_index_(try_index) { }
+
+  virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
+    if (Assembler::EmittingComments()) {
+      __ Comment("slow path smi operation");
+    }
+    __ Bind(entry_label());
+    LocationSummary* locs = instruction_->locs();
+    Register result = locs->out(0).reg();
+    locs->live_registers()->Remove(Location::RegisterLocation(result));
+
+    compiler->SaveLiveRegisters(locs);
+    __ Push(locs->in(0).reg());
+    __ Push(locs->in(1).reg());
+    compiler->EmitMegamorphicInstanceCall(
+        *instruction_->call()->ic_data(),
+        instruction_->call()->ArgumentCount(),
+        instruction_->call()->deopt_id(),
+        instruction_->call()->token_pos(),
+        locs,
+        try_index_,
+        /* slow_path_argument_count = */ 2);
+    __ mov(result, R0);
+    compiler->RestoreLiveRegisters(locs);
+    __ b(exit_label());
+  }
+
+ private:
+  CheckedSmiOpInstr* instruction_;
+  intptr_t try_index_;
+};
+
+
+LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
+  const intptr_t kNumInputs = 2;
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new(zone) LocationSummary(
+      zone, kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_in(1, Location::RequiresRegister());
+  summary->set_out(0, Location::RequiresRegister());
+  return summary;
+}
+
+
+void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  CheckedSmiSlowPath* slow_path =
+      new CheckedSmiSlowPath(this, compiler->CurrentTryIndex());
+  compiler->AddSlowPathCode(slow_path);
+  // Test operands if necessary.
+  Register left = locs()->in(0).reg();
+  Register right = locs()->in(1).reg();
+  Register result = locs()->out(0).reg();
+  intptr_t left_cid = this->left()->Type()->ToCid();
+  intptr_t right_cid = this->right()->Type()->ToCid();
+  bool combined_smi_check = false;
+  if (this->left()->definition() == this->right()->definition()) {
+    __ tsti(left, Immediate(kSmiTagMask));
+  } else if (left_cid == kSmiCid) {
+    __ tsti(right, Immediate(kSmiTagMask));
+  } else if (right_cid == kSmiCid) {
+    __ tsti(left, Immediate(kSmiTagMask));
+  } else {
+    combined_smi_check = true;
+    __ orr(result, left, Operand(right));
+    __ tsti(result, Immediate(kSmiTagMask));
+  }
+
+  __ b(slow_path->entry_label(), NE);
+  switch (op_kind()) {
+    case Token::kADD:
+      __ adds(result, left, Operand(right));
+      __ b(slow_path->entry_label(), VS);
+      break;
+    case Token::kSUB:
+      __ subs(result, left, Operand(right));
+      __ b(slow_path->entry_label(), VS);
+      break;
+    case Token::kMUL:
+      __ SmiUntag(TMP, left);
+      __ mul(result, TMP, right);
+      __ smulh(TMP, TMP, right);
+      // TMP: result bits 64..127.
+      __ cmp(TMP, Operand(result, ASR, 63));
+      __ b(slow_path->entry_label(), NE);
+      break;
+    case Token::kBIT_OR:
+      // Operation may be part of combined smi check.
+      if (!combined_smi_check) {
+        __ orr(result, left, Operand(right));
+      }
+      break;
+    case Token::kBIT_AND:
+      __ and_(result, left, Operand(right));
+      break;
+    case Token::kBIT_XOR:
+      __ eor(result, left, Operand(right));
+      break;
+    case Token::kEQ:
+    case Token::kLT:
+    case Token::kLTE:
+    case Token::kGT:
+    case Token::kGTE: {
+      Label true_label, false_label, done;
+      BranchLabels labels = { &true_label, &false_label, &false_label };
+      Condition true_condition =
+          EmitSmiComparisonOp(compiler, locs(), op_kind());
+      EmitBranchOnCondition(compiler, true_condition, labels);
+      __ Bind(&false_label);
+      __ LoadObject(result, Bool::False());
+      __ b(&done);
+      __ Bind(&true_label);
+      __ LoadObject(result, Bool::True());
+      __ Bind(&done);
+      break;
+    }
+    default:
+      UNIMPLEMENTED();
+  }
+  __ Bind(slow_path->exit_label());
+}
+
+
 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 2;
@@ -3066,7 +3181,9 @@
   intptr_t right_cid = right()->Type()->ToCid();
   const Register left = locs()->in(0).reg();
   const Register right = locs()->in(1).reg();
-  if (left_cid == kSmiCid) {
+  if (this->left()->definition() == this->right()->definition()) {
+    __ tsti(left, Immediate(kSmiTagMask));
+  } else if (left_cid == kSmiCid) {
     __ tsti(right, Immediate(kSmiTagMask));
   } else if (right_cid == kSmiCid) {
     __ tsti(left, Immediate(kSmiTagMask));
@@ -5367,7 +5484,7 @@
 
 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   if (!compiler->is_optimizing()) {
-    if (FLAG_emit_edge_counters) {
+    if (FLAG_reorder_basic_blocks) {
       compiler->EmitEdgeCounter(block()->preorder_number());
     }
     // Add a deoptimization descriptor for deoptimizing instructions that
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index bebb561..8cae087 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -1412,7 +1412,8 @@
   if (field_cid == kDynamicCid) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldClassInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -1571,7 +1572,8 @@
   if (field().guarded_list_length() == Field::kNoFixedLength) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldLengthInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -2583,11 +2585,10 @@
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
     if (FLAG_use_osr && osr_entry_label()->IsLinked()) {
-      uword flags_address = Isolate::Current()->stack_overflow_flags_address();
       __ Comment("CheckStackOverflowSlowPathOsr");
       __ Bind(osr_entry_label());
-      __ movl(Address::Absolute(flags_address),
-              Immediate(Isolate::kOsrRequest));
+      __ movl(Address(THR, Thread::stack_overflow_flags_offset()),
+              Immediate(Thread::kOsrRequest));
     }
     __ Comment("CheckStackOverflowSlowPath");
     __ Bind(entry_label());
@@ -2629,13 +2630,7 @@
   CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this);
   compiler->AddSlowPathCode(slow_path);
 
-  if (compiler->is_optimizing()) {
-    __ cmpl(ESP, Address::Absolute(Isolate::Current()->stack_limit_address()));
-  } else {
-    Register tmp = locs()->temp(0).reg();
-    __ LoadIsolate(tmp);
-    __ cmpl(ESP, Address(tmp, Isolate::stack_limit_offset()));
-  }
+  __ cmpl(ESP, Address(THR, Thread::stack_limit_offset()));
   __ j(BELOW_EQUAL, slow_path->entry_label());
   if (compiler->CanOSRFunction() && in_loop()) {
     // In unoptimized code check the usage counter to trigger OSR at loop
@@ -2764,6 +2759,19 @@
 }
 
 
+LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
+  // Only for precompiled code, not on ia32 currently.
+  UNIMPLEMENTED();
+  return NULL;
+}
+
+
+void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  // Only for precompiled code, not on ia32 currently.
+  UNIMPLEMENTED();
+}
+
 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 2;
@@ -6507,7 +6515,7 @@
 
 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   if (!compiler->is_optimizing()) {
-    if (FLAG_emit_edge_counters) {
+    if (FLAG_reorder_basic_blocks) {
       compiler->EmitEdgeCounter(block()->preorder_number());
     }
     // Add a deoptimization descriptor for deoptimizing instructions that
@@ -6548,8 +6556,11 @@
 
   // Load code object from frame.
   __ movl(target_reg, Address(EBP, kPcMarkerSlotFromFp * kWordSize));
-  // Load instructions entry point.
-  __ movl(target_reg, FieldAddress(target_reg, Code::entry_point_offset()));
+  // Load instructions object (active_instructions and Code::entry_point() may
+  // not point to this instruction object any more; see Code::DisableDartCode).
+  __ movl(target_reg,
+      FieldAddress(target_reg, Code::saved_instructions_offset()));
+  __ addl(target_reg, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
 
   // Add the offset.
   Register offset_reg = locs()->in(0).reg();
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index f4b8032..a8595a8 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -1612,7 +1612,8 @@
   if (field_cid == kDynamicCid) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldClassInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -1770,7 +1771,8 @@
   if (field().guarded_list_length() == Field::kNoFixedLength) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldLengthInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -2702,19 +2704,11 @@
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
     if (FLAG_use_osr && osr_entry_label()->IsLinked()) {
-      uword flags_address = Isolate::Current()->stack_overflow_flags_address();
       Register value = instruction_->locs()->temp(0).reg();
       __ Comment("CheckStackOverflowSlowPathOsr");
       __ Bind(osr_entry_label());
-      if (FLAG_allow_absolute_addresses) {
-        __ LoadImmediate(TMP, flags_address);
-        __ LoadImmediate(value, Isolate::kOsrRequest);
-        __ sw(value, Address(TMP));
-      } else {
-        __ LoadIsolate(TMP);
-        __ LoadImmediate(value, Isolate::kOsrRequest);
-        __ sw(value, Address(TMP, Isolate::stack_overflow_flags_offset()));
-      }
+      __ LoadImmediate(value, Thread::kOsrRequest);
+      __ sw(value, Address(THR, Thread::stack_overflow_flags_offset()));
     }
     __ Comment("CheckStackOverflowSlowPath");
     __ Bind(entry_label());
@@ -2757,13 +2751,7 @@
   CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this);
   compiler->AddSlowPathCode(slow_path);
 
-  if (compiler->is_optimizing() && FLAG_allow_absolute_addresses) {
-    __ LoadImmediate(TMP, Isolate::Current()->stack_limit_address());
-    __ lw(CMPRES1, Address(TMP));
-  } else {
-    __ LoadIsolate(TMP);
-    __ lw(CMPRES1, Address(TMP, Isolate::stack_limit_offset()));
-  }
+  __ lw(CMPRES1, Address(THR, Thread::stack_limit_offset()));
   __ BranchUnsignedLessEqual(SP, CMPRES1, slow_path->entry_label());
   if (compiler->CanOSRFunction() && in_loop()) {
     Register temp = locs()->temp(0).reg();
@@ -2885,6 +2873,132 @@
 }
 
 
+class CheckedSmiSlowPath : public SlowPathCode {
+ public:
+  CheckedSmiSlowPath(CheckedSmiOpInstr* instruction, intptr_t try_index)
+      : instruction_(instruction), try_index_(try_index) { }
+
+  virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
+    if (Assembler::EmittingComments()) {
+      __ Comment("slow path smi operation");
+    }
+    __ Bind(entry_label());
+    LocationSummary* locs = instruction_->locs();
+    Register result = locs->out(0).reg();
+    locs->live_registers()->Remove(Location::RegisterLocation(result));
+
+    compiler->SaveLiveRegisters(locs);
+    __ Push(locs->in(0).reg());
+    __ Push(locs->in(1).reg());
+    compiler->EmitMegamorphicInstanceCall(
+        *instruction_->call()->ic_data(),
+        instruction_->call()->ArgumentCount(),
+        instruction_->call()->deopt_id(),
+        instruction_->call()->token_pos(),
+        locs,
+        try_index_,
+        /* slow_path_argument_count = */ 2);
+    __ mov(result, V0);
+    compiler->RestoreLiveRegisters(locs);
+    __ b(exit_label());
+  }
+
+ private:
+  CheckedSmiOpInstr* instruction_;
+  intptr_t try_index_;
+};
+
+
+LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
+  const intptr_t kNumInputs = 2;
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new(zone) LocationSummary(
+      zone, kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_in(1, Location::RequiresRegister());
+  summary->set_out(0, Location::RequiresRegister());
+  return summary;
+}
+
+
+void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  CheckedSmiSlowPath* slow_path =
+      new CheckedSmiSlowPath(this, compiler->CurrentTryIndex());
+  compiler->AddSlowPathCode(slow_path);
+  // Test operands if necessary.
+  Register left = locs()->in(0).reg();
+  Register right = locs()->in(1).reg();
+  Register result = locs()->out(0).reg();
+  intptr_t left_cid = this->left()->Type()->ToCid();
+  intptr_t right_cid = this->right()->Type()->ToCid();
+  bool combined_smi_check = false;
+  if (this->left()->definition() == this->right()->definition()) {
+    __ andi(CMPRES1, left, Immediate(kSmiTagMask));
+  } else if (left_cid == kSmiCid) {
+    __ andi(CMPRES1, right, Immediate(kSmiTagMask));
+  } else if (right_cid == kSmiCid) {
+    __ andi(CMPRES1, left, Immediate(kSmiTagMask));
+  } else {
+    combined_smi_check = true;
+    __ or_(result, left, right);
+    __ andi(CMPRES1, result, Immediate(kSmiTagMask));
+  }
+  __ bne(CMPRES1, ZR, slow_path->entry_label());
+  switch (op_kind()) {
+    case Token::kADD:
+      __ AdduDetectOverflow(result, left, right, CMPRES1);
+      __ bltz(CMPRES1, slow_path->entry_label());
+      break;
+    case Token::kSUB:
+      __ SubuDetectOverflow(result, left, right, CMPRES1);
+      __ bltz(CMPRES1, slow_path->entry_label());
+      break;
+    case Token::kMUL:
+      __ sra(TMP, left, kSmiTagSize);
+      __ mult(TMP, right);
+      __ mflo(result);
+      __ mfhi(CMPRES2);
+      __ sra(CMPRES1, result, 31);
+      __ bne(CMPRES1, CMPRES2, slow_path->entry_label());
+      break;
+    case Token::kBIT_OR:
+      // Operation part of combined smi check.
+      if (!combined_smi_check) {
+        __ or_(result, left, right);
+      }
+      break;
+    case Token::kBIT_AND:
+      __ and_(result, left, right);
+      break;
+    case Token::kBIT_XOR:
+      __ xor_(result, left, right);
+      break;
+    case Token::kEQ:
+    case Token::kLT:
+    case Token::kLTE:
+    case Token::kGT:
+    case Token::kGTE: {
+      Label true_label, false_label, done;
+      BranchLabels labels = { &true_label, &false_label, &false_label };
+      Condition true_condition =
+          EmitSmiComparisonOp(compiler, *locs(), op_kind());
+      EmitBranchOnCondition(compiler, true_condition, labels);
+      __ Bind(&false_label);
+      __ LoadObject(result, Bool::False());
+      __ b(&done);
+      __ Bind(&true_label);
+      __ LoadObject(result, Bool::True());
+      __ Bind(&done);
+      break;
+    }
+    default:
+      UNIMPLEMENTED();
+  }
+  __ Bind(slow_path->exit_label());
+}
+
+
 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 2;
@@ -4206,7 +4320,7 @@
   ASSERT(result == V0);
   ASSERT(result != value_obj);
   __ LoadDFromOffset(DTMP, value_obj, Double::value_offset() - kHeapObjectTag);
-  __ cvtwd(STMP1, DTMP);
+  __ truncwd(STMP1, DTMP);
   __ mfc1(result, STMP1);
 
   // Overflow is signaled with minint.
@@ -4229,7 +4343,7 @@
                                instance_call()->token_pos(),
                                target,
                                kNumberOfArguments,
-                               Object::null_array(),  // No argument names.,
+                               Object::null_array(),  // No argument names.
                                locs(),
                                ICData::Handle());
   __ Bind(&done);
@@ -4252,7 +4366,7 @@
   Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptDoubleToSmi);
   Register result = locs()->out(0).reg();
   DRegister value = locs()->in(0).fpu_reg();
-  __ cvtwd(STMP1, value);
+  __ truncwd(STMP1, value);
   __ mfc1(result, STMP1);
 
   // Check for overflow and that it fits into Smi.
@@ -5383,7 +5497,7 @@
 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   __ Comment("GotoInstr");
   if (!compiler->is_optimizing()) {
-    if (FLAG_emit_edge_counters) {
+    if (FLAG_reorder_basic_blocks) {
       compiler->EmitEdgeCounter(block()->preorder_number());
     }
     // Add a deoptimization descriptor for deoptimizing instructions that
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index ec108a8..8253b0c 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -479,8 +479,7 @@
 
 static Condition EmitInt64ComparisonOp(FlowGraphCompiler* compiler,
                                        const LocationSummary& locs,
-                                       Token::Kind kind,
-                                       BranchLabels labels) {
+                                       Token::Kind kind) {
   Location left = locs.in(0);
   Location right = locs.in(1);
   ASSERT(!left.IsConstant() || !right.IsConstant());
@@ -536,7 +535,7 @@
 Condition EqualityCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
                                                    BranchLabels labels) {
   if ((operation_cid() == kSmiCid) || (operation_cid() == kMintCid)) {
-    return EmitInt64ComparisonOp(compiler, *locs(), kind(), labels);
+    return EmitInt64ComparisonOp(compiler, *locs(), kind());
   } else {
     ASSERT(operation_cid() == kDoubleCid);
     return EmitDoubleComparisonOp(compiler, *locs(), kind(), labels);
@@ -727,7 +726,7 @@
 Condition RelationalOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
                                                 BranchLabels labels) {
   if ((operation_cid() == kSmiCid) || (operation_cid() == kMintCid)) {
-    return EmitInt64ComparisonOp(compiler, *locs(), kind(), labels);
+    return EmitInt64ComparisonOp(compiler, *locs(), kind());
   } else {
     ASSERT(operation_cid() == kDoubleCid);
     return EmitDoubleComparisonOp(compiler, *locs(), kind(), labels);
@@ -1454,7 +1453,8 @@
   if (field_cid == kDynamicCid) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldClassInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -1599,7 +1599,8 @@
   if (field().guarded_list_length() == Field::kNoFixedLength) {
     if (Compiler::IsBackgroundCompilation()) {
       // Field state changed while compiling.
-      Compiler::AbortBackgroundCompilation(deopt_id());
+      Compiler::AbortBackgroundCompilation(deopt_id(),
+          "GuardFieldLengthInstr: field state changed while compiling");
     }
     ASSERT(!compiler->is_optimizing());
     return;  // Nothing to emit.
@@ -2603,18 +2604,10 @@
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
     if (FLAG_use_osr && osr_entry_label()->IsLinked()) {
-      uword flags_address = Isolate::Current()->stack_overflow_flags_address();
-      Register temp = instruction_->locs()->temp(0).reg();
       __ Comment("CheckStackOverflowSlowPathOsr");
       __ Bind(osr_entry_label());
-      if (FLAG_allow_absolute_addresses) {
-        __ LoadImmediate(temp, Immediate(flags_address));
-        __ movq(Address(temp, 0), Immediate(Isolate::kOsrRequest));
-      } else {
-        __ LoadIsolate(TMP);
-        __ movq(Address(TMP, Isolate::stack_overflow_flags_offset()),
-                Immediate(Isolate::kOsrRequest));
-      }
+      __ movq(Address(THR, Thread::stack_overflow_flags_offset()),
+              Immediate(Thread::kOsrRequest));
     }
     __ Comment("CheckStackOverflowSlowPath");
     __ Bind(entry_label());
@@ -2659,14 +2652,7 @@
 
   Register temp = locs()->temp(0).reg();
   // Generate stack overflow check.
-  if (compiler->is_optimizing() && FLAG_allow_absolute_addresses) {
-    __ LoadImmediate(
-        temp, Immediate(Isolate::Current()->stack_limit_address()));
-    __ cmpq(RSP, Address(temp, 0));
-  } else {
-    __ LoadIsolate(temp);
-    __ cmpq(RSP, Address(temp, Isolate::stack_limit_offset()));
-  }
+  __ cmpq(RSP, Address(THR, Thread::stack_limit_offset()));
   __ j(BELOW_EQUAL, slow_path->entry_label());
   if (compiler->CanOSRFunction() && in_loop()) {
     // In unoptimized code check the usage counter to trigger OSR at loop
@@ -2793,6 +2779,150 @@
 }
 
 
+class CheckedSmiSlowPath : public SlowPathCode {
+ public:
+  CheckedSmiSlowPath(CheckedSmiOpInstr* instruction, intptr_t try_index)
+      : instruction_(instruction), try_index_(try_index) { }
+
+  virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
+    if (Assembler::EmittingComments()) {
+      __ Comment("slow path smi operation");
+    }
+    __ Bind(entry_label());
+    LocationSummary* locs = instruction_->locs();
+    Register result = locs->out(0).reg();
+    locs->live_registers()->Remove(Location::RegisterLocation(result));
+
+    compiler->SaveLiveRegisters(locs);
+    __ pushq(locs->in(0).reg());
+    __ pushq(locs->in(1).reg());
+    compiler->EmitMegamorphicInstanceCall(
+        *instruction_->call()->ic_data(),
+        instruction_->call()->ArgumentCount(),
+        instruction_->call()->deopt_id(),
+        instruction_->call()->token_pos(),
+        locs,
+        try_index_,
+        /* slow_path_argument_count = */ 2);
+    __ MoveRegister(result, RAX);
+    compiler->RestoreLiveRegisters(locs);
+    __ jmp(exit_label());
+  }
+
+ private:
+  CheckedSmiOpInstr* instruction_;
+  intptr_t try_index_;
+};
+
+
+LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
+  const intptr_t kNumInputs = 2;
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new(zone) LocationSummary(
+      zone, kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_in(1, Location::RequiresRegister());
+  switch (op_kind()) {
+    case Token::kEQ:
+    case Token::kLT:
+    case Token::kLTE:
+    case Token::kGT:
+    case Token::kGTE:
+    case Token::kADD:
+    case Token::kSUB:
+    case Token::kMUL:
+      summary->set_out(0, Location::RequiresRegister());
+      break;
+    case Token::kBIT_OR:
+    case Token::kBIT_AND:
+    case Token::kBIT_XOR:
+      summary->set_out(0, Location::SameAsFirstInput());
+      break;
+    default:
+      UNIMPLEMENTED();
+  }
+  return summary;
+}
+
+
+void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  CheckedSmiSlowPath* slow_path =
+      new CheckedSmiSlowPath(this, compiler->CurrentTryIndex());
+  compiler->AddSlowPathCode(slow_path);
+  // Test operands if necessary.
+
+  intptr_t left_cid = left()->Type()->ToCid();
+  intptr_t right_cid = right()->Type()->ToCid();
+  Register left = locs()->in(0).reg();
+  Register right = locs()->in(1).reg();
+  if (this->left()->definition() == this->right()->definition()) {
+    __ testq(left, Immediate(kSmiTagMask));
+  } else if (left_cid == kSmiCid) {
+    __ testq(right, Immediate(kSmiTagMask));
+  } else if (right_cid == kSmiCid) {
+    __ testq(left, Immediate(kSmiTagMask));
+  } else {
+    __ movq(TMP, left);
+    __ orq(TMP, right);
+    __ testq(TMP, Immediate(kSmiTagMask));
+  }
+  __ j(NOT_ZERO, slow_path->entry_label());
+  Register result = locs()->out(0).reg();
+  switch (op_kind()) {
+    case Token::kADD:
+      __ movq(result, left);
+      __ addq(result, right);
+      __ j(OVERFLOW, slow_path->entry_label());
+      break;
+    case Token::kSUB:
+      __ movq(result, left);
+      __ subq(result, right);
+      __ j(OVERFLOW, slow_path->entry_label());
+      break;
+    case Token::kMUL:
+      __ movq(result, left);
+      __ SmiUntag(result);
+      __ imulq(result, right);
+      __ j(OVERFLOW, slow_path->entry_label());
+      break;
+    case Token::kBIT_OR:
+      ASSERT(left == result);
+      __ orq(result, right);
+      break;
+    case Token::kBIT_AND:
+      ASSERT(left == result);
+      __ andq(result, right);
+      break;
+    case Token::kBIT_XOR:
+      ASSERT(left == result);
+      __ xorq(result, right);
+      break;
+    case Token::kEQ:
+    case Token::kLT:
+    case Token::kLTE:
+    case Token::kGT:
+    case Token::kGTE: {
+      Label true_label, false_label, done;
+      BranchLabels labels = { &true_label, &false_label, &false_label };
+      Condition true_condition =
+          EmitInt64ComparisonOp(compiler, *locs(), op_kind());
+      EmitBranchOnCondition(compiler, true_condition, labels);
+      __ Bind(&false_label);
+      __ LoadObject(result, Bool::False());
+      __ jmp(&done);
+      __ Bind(&true_label);
+      __ LoadObject(result, Bool::True());
+      __ Bind(&done);
+      break;
+    }
+    default:
+      UNIMPLEMENTED();
+  }
+  __ Bind(slow_path->exit_label());
+}
+
+
 static bool CanBeImmediate(const Object& constant) {
   return constant.IsSmi() &&
     Immediate(reinterpret_cast<int64_t>(constant.raw())).is_int32();
@@ -6130,7 +6260,7 @@
 
 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   if (!compiler->is_optimizing()) {
-    if (FLAG_emit_edge_counters) {
+    if (FLAG_reorder_basic_blocks) {
       compiler->EmitEdgeCounter(block()->preorder_number());
     }
     // Add a deoptimization descriptor for deoptimizing instructions that
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
index af15e7a..f42d85e 100644
--- a/runtime/vm/intrinsifier.cc
+++ b/runtime/vm/intrinsifier.cc
@@ -5,6 +5,7 @@
 
 #include "vm/assembler.h"
 #include "vm/compiler.h"
+#include "vm/cpu.h"
 #include "vm/flags.h"
 #include "vm/flow_graph.h"
 #include "vm/flow_graph_compiler.h"
@@ -21,16 +22,39 @@
 namespace dart {
 
 DEFINE_FLAG(bool, intrinsify, true, "Instrinsify when possible");
+DEFINE_FLAG(bool, trace_intrinsifier, false, "Trace intrinsifier");
 DECLARE_FLAG(bool, code_comments);
 DECLARE_FLAG(bool, print_flow_graph);
 DECLARE_FLAG(bool, print_flow_graph_optimized);
 
 bool Intrinsifier::CanIntrinsify(const Function& function) {
+  if (FLAG_trace_intrinsifier) {
+    THR_Print("CanIntrinsify %s ->", function.ToQualifiedCString());
+  }
   if (!FLAG_intrinsify) return false;
-  if (function.IsClosureFunction()) return false;
+  if (function.IsClosureFunction()) {
+    if (FLAG_trace_intrinsifier) {
+      THR_Print("No, closure function.\n");
+    }
+    return false;
+  }
   // Can occur because of compile-all flag.
-  if (function.is_external()) return false;
-  return function.is_intrinsic();
+  if (function.is_external()) {
+    if (FLAG_trace_intrinsifier) {
+      THR_Print("No, external function.\n");
+    }
+    return false;
+  }
+  if (!function.is_intrinsic()) {
+    if (FLAG_trace_intrinsifier) {
+      THR_Print("No, not intrinsic function.\n");
+    }
+    return false;
+  }
+  if (FLAG_trace_intrinsifier) {
+    THR_Print("Yes.\n");
+  }
+  return true;
 }
 
 
@@ -78,6 +102,7 @@
   lib = Library::MathLibrary();
   ASSERT(!lib.IsNull());
   MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION);
+  GRAPH_MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION);
 
   // Set up all dart:typed_data lib functions that can be intrinsified.
   lib = Library::TypedDataLibrary();
@@ -94,12 +119,11 @@
 }
 #endif  // defined(DART_NO_SNAPSHOT).
 
-
 static void EmitCodeFor(FlowGraphCompiler* compiler,
                         FlowGraph* graph) {
   // The FlowGraph here is constructed by the intrinsics builder methods, and
   // is different from compiler->flow_graph(), the original method's flow graph.
-  compiler->assembler()->Comment("Graph intrinsic");
+  compiler->assembler()->Comment("Graph intrinsic begin");
   for (intptr_t i = 0; i < graph->reverse_postorder().length(); i++) {
     BlockEntryInstr* block = graph->reverse_postorder()[i];
     if (block->IsGraphEntry()) continue;  // No code for graph entry needed.
@@ -115,6 +139,11 @@
       if (instr->IsParallelMove()) {
         compiler->parallel_move_resolver()->EmitNativeCode(
             instr->AsParallelMove());
+      } else if (instr->IsInvokeMathCFunction()) {
+        ASSERT(instr->locs() != NULL);
+        Intrinsifier::IntrinsicCallPrologue(compiler->assembler());
+        instr->EmitNativeCode(compiler);
+        Intrinsifier::IntrinsicCallEpilogue(compiler->assembler());
       } else {
         ASSERT(instr->locs() != NULL);
         // Calls are not supported in intrinsics code.
@@ -123,6 +152,7 @@
       }
     }
   }
+  compiler->assembler()->Comment("Graph intrinsic end");
 }
 
 
@@ -224,6 +254,11 @@
 }
 
 
+// Notes about the graph intrinsics:
+//
+// 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, TargetEntryInstr* entry)
@@ -269,17 +304,45 @@
         new ConstantInstr(Object::ZoneHandle(Object::null())));
   }
 
-  Definition* AddUnboxInstr(Representation rep, Value* value) {
+  Definition* AddUnboxInstr(Representation rep,
+                            Value* value,
+                            bool is_checked) {
     Definition* unboxed_value = AddDefinition(
         UnboxInstr::Create(rep, value, Thread::kNoDeoptId));
-    // Manually adjust reaching type because there is no type propagation
-    // when building intrinsics.
-    unboxed_value->AsUnbox()->value()->SetReachingType(ZoneCompileType::Wrap(
-        CompileType::FromCid(CidForRepresentation(rep))));
+    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(ZoneCompileType::Wrap(
+          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,
+                                     Thread::kNoDeoptId,
+                                     recognized_kind,
+                                     TokenPos());
+    AddDefinition(invoke_math_c_function);
+    return invoke_math_c_function;
+  }
+
+
   FlowGraph* flow_graph_;
   BlockEntryInstr* entry_;
   Instruction* current_;
@@ -460,7 +523,9 @@
   PrepareIndexedOp(&builder, array, index, TypedData::length_offset());
 
   Definition* unboxed_value =
-      builder.AddUnboxInstr(kUnboxedUint32, new Value(value));
+      builder.AddUnboxInstr(kUnboxedUint32,
+                            new Value(value),
+                            /* is_checked = */ true);
 
   builder.AddInstruction(
       new StoreIndexedInstr(new Value(array),
@@ -528,7 +593,9 @@
                           value_check,
                           builder.TokenPos()));
   Definition* double_value =
-      builder.AddUnboxInstr(kUnboxedDouble, new Value(value));
+      builder.AddUnboxInstr(kUnboxedDouble,
+                            new Value(value),
+                            /* is_checked = */ true);
 
   builder.AddInstruction(
       new StoreIndexedInstr(new Value(array),
@@ -596,10 +663,14 @@
                           value_check,
                           builder.TokenPos()));
   Definition* left_simd =
-      builder.AddUnboxInstr(kUnboxedFloat32x4, new Value(left));
+      builder.AddUnboxInstr(kUnboxedFloat32x4,
+                            new Value(left),
+                            /* is_checked = */ true);
 
   Definition* right_simd =
-      builder.AddUnboxInstr(kUnboxedFloat32x4, new Value(right));
+      builder.AddUnboxInstr(kUnboxedFloat32x4,
+                            new Value(right),
+                            /* is_checked = */ true);
 
   Definition* unboxed_result = builder.AddDefinition(
       new BinaryFloat32x4OpInstr(kind,
@@ -638,7 +709,9 @@
   Definition* receiver = builder.AddParameter(1);
 
   Definition* unboxed_receiver =
-      builder.AddUnboxInstr(kUnboxedFloat32x4, new Value(receiver));
+      builder.AddUnboxInstr(kUnboxedFloat32x4,
+                            new Value(receiver),
+                            /* is_checked = */ true);
 
   Definition* unboxed_result = builder.AddDefinition(
       new Simd32x4ShuffleInstr(kind,
@@ -872,7 +945,9 @@
 
   Definition* receiver = builder.AddParameter(1);
   Definition* unboxed_value =
-      builder.AddUnboxInstr(kUnboxedDouble, new Value(receiver));
+      builder.AddUnboxInstr(kUnboxedDouble,
+                            new Value(receiver),
+                            /* is_checked = */ true);
   Definition* unboxed_result = builder.AddDefinition(
       new UnaryDoubleOpInstr(Token::kNEGATE,
                              new Value(unboxed_value),
@@ -883,4 +958,185 @@
   return true;
 }
 
+
+static bool BuildInvokeMathCFunction(BlockBuilder* builder,
+                                     MethodRecognizer::Kind kind,
+                                     intptr_t num_parameters = 1) {
+  ZoneGrowableArray<Value*>* args =
+      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);
+    Definition* unboxed_value =
+        builder->AddUnboxInstr(kUnboxedDouble, value, /* is_checked = */ false);
+    args->Add(new Value(unboxed_value));
+  }
+
+  Definition* unboxed_result =
+      builder->InvokeMathCFunction(kind, args);
+
+  Definition* result = builder->AddDefinition(
+      BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result)));
+
+  builder->AddIntrinsicReturn(new Value(result));
+
+  return true;
+}
+
+
+bool Intrinsifier::Build_MathSin(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kMathSin);
+}
+
+
+bool Intrinsifier::Build_MathCos(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kMathCos);
+}
+
+
+bool Intrinsifier::Build_MathTan(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kMathTan);
+}
+
+
+bool Intrinsifier::Build_MathAsin(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kMathAsin);
+}
+
+
+bool Intrinsifier::Build_MathAcos(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kMathAcos);
+}
+
+
+bool Intrinsifier::Build_MathAtan(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kMathAtan);
+}
+
+
+bool Intrinsifier::Build_MathAtan2(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kMathAtan2,
+                                  /* num_parameters = */ 2);
+}
+
+
+bool Intrinsifier::Build_DoubleMod(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kDoubleMod,
+                                  /* num_parameters = */ 2);
+}
+
+
+bool Intrinsifier::Build_DoubleCeil(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+  // TODO(johnmccutchan): On X86 this intrinsic can be written in a different
+  // way.
+  if (TargetCPUFeatures::double_truncate_round_supported()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kDoubleCeil);
+}
+
+
+bool Intrinsifier::Build_DoubleFloor(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+  // TODO(johnmccutchan): On X86 this intrinsic can be written in a different
+  // way.
+  if (TargetCPUFeatures::double_truncate_round_supported()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kDoubleFloor);
+}
+
+
+bool Intrinsifier::Build_DoubleTruncate(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+  // TODO(johnmccutchan): On X86 this intrinsic can be written in a different
+  // way.
+  if (TargetCPUFeatures::double_truncate_round_supported()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kDoubleTruncate);
+}
+
+
+bool Intrinsifier::Build_DoubleRound(FlowGraph* flow_graph) {
+  if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  TargetEntryInstr* normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  return BuildInvokeMathCFunction(&builder,
+                                  MethodRecognizer::kDoubleRound);
+}
+
 }  // namespace dart
diff --git a/runtime/vm/intrinsifier.h b/runtime/vm/intrinsifier.h
index 0203632..1a7e07a 100644
--- a/runtime/vm/intrinsifier.h
+++ b/runtime/vm/intrinsifier.h
@@ -32,6 +32,9 @@
 
   static intptr_t ParameterSlotFromSp();
 
+  static void IntrinsicCallPrologue(Assembler* assembler);
+  static void IntrinsicCallEpilogue(Assembler* assembler);
+
  private:
   static bool CanIntrinsify(const Function& function);
 
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 0487fea..2fec757 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -32,6 +32,20 @@
 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; }
 
 
+void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
+  // Save LR by moving it to a callee saved temporary register.
+  assembler->Comment("IntrinsicCallPrologue");
+  assembler->mov(CALLEE_SAVED_TEMP, Operand(LR));
+}
+
+
+void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) {
+  // Restore LR.
+  assembler->Comment("IntrinsicCallEpilogue");
+  assembler->mov(LR, Operand(CALLEE_SAVED_TEMP));
+}
+
+
 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
 // update. Array length is always a Smi.
 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) {
@@ -245,12 +259,6 @@
 
 
 #define TYPED_DATA_ALLOCATOR(clazz)                                            \
-void Intrinsifier::TypedData_##clazz##_new(Assembler* assembler) {             \
-  intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
-  intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
-  int shift = GetScaleFactor(size);                                            \
-  TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, shift);   \
-}                                                                              \
 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) {         \
   intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
   intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
@@ -1294,11 +1302,12 @@
 // Both arguments are on stack.
 static void DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
   if (TargetCPUFeatures::vfp_supported()) {
-    Label fall_through;
+    Label fall_through, is_smi, double_op;
 
-    TestLastArgumentIsDouble(assembler, &fall_through, &fall_through);
+    TestLastArgumentIsDouble(assembler, &is_smi, &fall_through);
     // Both arguments are double, right operand is in R0.
     __ LoadDFromOffset(D1, R0, Double::value_offset() - kHeapObjectTag);
+    __ Bind(&double_op);
     __ ldr(R0, Address(SP, 1 * kWordSize));  // Left argument.
     __ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
     switch (kind) {
@@ -1313,6 +1322,11 @@
     __ TryAllocate(double_class, &fall_through, R0, R1);  // Result register.
     __ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
     __ Ret();
+    __ Bind(&is_smi);  // Convert R0 to a double.
+    __ SmiUntag(R0);
+    __ vmovsr(S0, R0);
+    __ vcvtdi(D1, S0);
+    __ b(&double_op);
     __ Bind(&fall_through);
   }
 }
@@ -1486,10 +1500,10 @@
       math_lib.LookupClassAllowPrivate(Symbols::_Random()));
   ASSERT(!random_class.IsNull());
   const Field& state_field = Field::ZoneHandle(
-      random_class.LookupInstanceField(Symbols::_state()));
+      random_class.LookupInstanceFieldAllowPrivate(Symbols::_state()));
   ASSERT(!state_field.IsNull());
   const Field& random_A_field = Field::ZoneHandle(
-      random_class.LookupStaticField(Symbols::_A()));
+      random_class.LookupStaticFieldAllowPrivate(Symbols::_A()));
   ASSERT(!random_A_field.IsNull());
   ASSERT(random_A_field.is_const());
   const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
@@ -2061,7 +2075,7 @@
 }
 
 
-void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) {
+void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) {
   if (FLAG_interpret_irregexp) return;
 
   static const intptr_t kRegExpParamOffset = 2 * kWordSize;
@@ -2080,7 +2094,7 @@
   __ LoadClassId(R1, R1);
   __ AddImmediate(R1, R1, -kOneByteStringCid);
   __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2));
-  __ ldr(R0, FieldAddress(R1, JSRegExp::function_offset(kOneByteStringCid)));
+  __ ldr(R0, FieldAddress(R1, RegExp::function_offset(kOneByteStringCid)));
 
   // Registers are now set up for the lazy compile stub. It expects the function
   // in R0, the argument descriptor in R4, and IC-Data in R9.
diff --git a/runtime/vm/intrinsifier_arm64.cc b/runtime/vm/intrinsifier_arm64.cc
index f12ea8d..fd0c053 100644
--- a/runtime/vm/intrinsifier_arm64.cc
+++ b/runtime/vm/intrinsifier_arm64.cc
@@ -31,6 +31,20 @@
 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; }
 
 
+void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
+  assembler->Comment("IntrinsicCallPrologue");
+  assembler->mov(CALLEE_SAVED_TEMP, LR);
+  assembler->mov(CALLEE_SAVED_TEMP2, R4);
+}
+
+
+void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) {
+  assembler->Comment("IntrinsicCallEpilogue");
+  assembler->mov(LR, CALLEE_SAVED_TEMP);
+  assembler->mov(R4, CALLEE_SAVED_TEMP2);
+}
+
+
 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
 // update. Array length is always a Smi.
 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) {
@@ -238,12 +252,6 @@
 
 
 #define TYPED_DATA_ALLOCATOR(clazz)                                            \
-void Intrinsifier::TypedData_##clazz##_new(Assembler* assembler) {             \
-  intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
-  intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
-  int shift = GetScaleFactor(size);                                            \
-  TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, shift);   \
-}                                                                              \
 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) {         \
   intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
   intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
@@ -1390,11 +1398,12 @@
 // Expects left argument to be double (receiver). Right argument is unknown.
 // Both arguments are on stack.
 static void DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
-  Label fall_through;
+  Label fall_through, is_smi, double_op;
 
-  TestLastArgumentIsDouble(assembler, &fall_through, &fall_through);
+  TestLastArgumentIsDouble(assembler, &is_smi, &fall_through);
   // Both arguments are double, right operand is in R0.
   __ LoadDFieldFromOffset(V1, R0, Double::value_offset());
+  __ Bind(&double_op);
   __ ldr(R0, Address(SP, 1 * kWordSize));  // Left argument.
   __ LoadDFieldFromOffset(V0, R0, Double::value_offset());
   switch (kind) {
@@ -1409,6 +1418,12 @@
   __ TryAllocate(double_class, &fall_through, R0, R1);
   __ StoreDFieldToOffset(V0, R0, Double::value_offset());
   __ ret();
+
+  __ Bind(&is_smi);  // Convert R0 to a double.
+  __ SmiUntag(R0);
+  __ scvtfdx(V1, R0);
+  __ b(&double_op);
+
   __ Bind(&fall_through);
 }
 
@@ -1567,10 +1582,10 @@
       math_lib.LookupClassAllowPrivate(Symbols::_Random()));
   ASSERT(!random_class.IsNull());
   const Field& state_field = Field::ZoneHandle(
-      random_class.LookupInstanceField(Symbols::_state()));
+      random_class.LookupInstanceFieldAllowPrivate(Symbols::_state()));
   ASSERT(!state_field.IsNull());
   const Field& random_A_field = Field::ZoneHandle(
-      random_class.LookupStaticField(Symbols::_A()));
+      random_class.LookupStaticFieldAllowPrivate(Symbols::_A()));
   ASSERT(!random_A_field.IsNull());
   ASSERT(random_A_field.is_const());
   const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
@@ -2136,7 +2151,7 @@
 }
 
 
-void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) {
+void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) {
   if (FLAG_interpret_irregexp) return;
 
   static const intptr_t kRegExpParamOffset = 2 * kWordSize;
@@ -2155,7 +2170,7 @@
   __ LoadClassId(R1, R1);
   __ AddImmediate(R1, R1, -kOneByteStringCid);
   __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2));
-  __ ldr(R0, FieldAddress(R1, JSRegExp::function_offset(kOneByteStringCid)));
+  __ ldr(R0, FieldAddress(R1, RegExp::function_offset(kOneByteStringCid)));
 
   // Registers are now set up for the lazy compile stub. It expects the function
   // in R0, the argument descriptor in R4, and IC-Data in R5.
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index 29870b2..fc1f3be 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -39,6 +39,20 @@
 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; }
 
 
+void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
+  assembler->Comment("IntrinsicCallPrologue");
+  assembler->movl(CALLEE_SAVED_TEMP, ICREG);
+  assembler->movl(CALLEE_SAVED_TEMP2, ARGS_DESC_REG);
+}
+
+
+void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) {
+  assembler->Comment("IntrinsicCallEpilogue");
+  assembler->movl(ICREG, CALLEE_SAVED_TEMP);
+  assembler->movl(ARGS_DESC_REG, CALLEE_SAVED_TEMP2);
+}
+
+
 static intptr_t ComputeObjectArrayTypeArgumentsOffset() {
   const Library& core_lib = Library::Handle(Library::CoreLibrary());
   const Class& cls = Class::Handle(
@@ -294,12 +308,6 @@
 
 
 #define TYPED_DATA_ALLOCATOR(clazz)                                            \
-void Intrinsifier::TypedData_##clazz##_new(Assembler* assembler) {             \
-  intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
-  intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
-  ScaleFactor scale = GetScaleFactor(size);                                    \
-  TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale);   \
-}                                                                              \
 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) {         \
   intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
   intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
@@ -1447,10 +1455,11 @@
 // Expects left argument to be double (receiver). Right argument is unknown.
 // Both arguments are on stack.
 static void DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
-  Label fall_through;
-  TestLastArgumentIsDouble(assembler, &fall_through, &fall_through);
+  Label fall_through, is_smi, double_op;
+  TestLastArgumentIsDouble(assembler, &is_smi, &fall_through);
   // Both arguments are double, right operand is in EAX.
   __ movsd(XMM1, FieldAddress(EAX, Double::value_offset()));
+  __ Bind(&double_op);
   __ movl(EAX, Address(ESP, + 2 * kWordSize));  // Left argument.
   __ movsd(XMM0, FieldAddress(EAX, Double::value_offset()));
   switch (kind) {
@@ -1469,6 +1478,10 @@
                  EBX);
   __ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
   __ ret();
+  __ Bind(&is_smi);
+  __ SmiUntag(EAX);
+  __ cvtsi2sd(XMM1, EAX);
+  __ jmp(&double_op);
   __ Bind(&fall_through);
 }
 
@@ -1628,10 +1641,10 @@
       math_lib.LookupClassAllowPrivate(Symbols::_Random()));
   ASSERT(!random_class.IsNull());
   const Field& state_field = Field::ZoneHandle(
-      random_class.LookupInstanceField(Symbols::_state()));
+      random_class.LookupInstanceFieldAllowPrivate(Symbols::_state()));
   ASSERT(!state_field.IsNull());
   const Field& random_A_field = Field::ZoneHandle(
-      random_class.LookupStaticField(Symbols::_A()));
+      random_class.LookupStaticFieldAllowPrivate(Symbols::_A()));
   ASSERT(!random_A_field.IsNull());
   ASSERT(random_A_field.is_const());
   const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
@@ -2089,7 +2102,7 @@
 }
 
 
-void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) {
+void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) {
   if (FLAG_interpret_irregexp) return;
 
   static const intptr_t kRegExpParamOffset = 3 * kWordSize;
@@ -2108,7 +2121,7 @@
   __ LoadClassId(EDI, EDI);
   __ SubImmediate(EDI, Immediate(kOneByteStringCid));
   __ movl(EAX, FieldAddress(EBX, EDI, TIMES_4,
-                            JSRegExp::function_offset(kOneByteStringCid)));
+                            RegExp::function_offset(kOneByteStringCid)));
 
   // Registers are now set up for the lazy compile stub. It expects the function
   // in EAX, the argument descriptor in EDX, and IC-Data in ECX.
diff --git a/runtime/vm/intrinsifier_mips.cc b/runtime/vm/intrinsifier_mips.cc
index 57cb4d6..2c13390 100644
--- a/runtime/vm/intrinsifier_mips.cc
+++ b/runtime/vm/intrinsifier_mips.cc
@@ -31,6 +31,18 @@
 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; }
 
 
+void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
+  assembler->Comment("IntrinsicCallPrologue");
+  assembler->mov(CALLEE_SAVED_TEMP, RA);
+}
+
+
+void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) {
+  assembler->Comment("IntrinsicCallEpilogue");
+  assembler->mov(RA, CALLEE_SAVED_TEMP);
+}
+
+
 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
 // update. Array length is always a Smi.
 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) {
@@ -238,12 +250,6 @@
 
 
 #define TYPED_DATA_ALLOCATOR(clazz)                                            \
-void Intrinsifier::TypedData_##clazz##_new(Assembler* assembler) {             \
-  intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
-  intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
-  int shift = GetScaleFactor(size);                                            \
-  TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, shift);   \
-}                                                                              \
 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) {         \
   intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
   intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
@@ -1353,8 +1359,9 @@
   __ Bind(&is_smi);
   __ SmiUntag(T0);
   __ mtc1(T0, STMP1);
-  __ cvtdw(D1, STMP1);
   __ b(&double_op);
+  __ delay_slot()->cvtdw(D1, STMP1);
+
 
   __ Bind(&fall_through);
 }
@@ -1388,12 +1395,13 @@
 // Expects left argument to be double (receiver). Right argument is unknown.
 // Both arguments are on stack.
 static void DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
-  Label fall_through;
+  Label fall_through, is_smi, double_op;
 
-  TestLastArgumentIsDouble(assembler, &fall_through, &fall_through);
+  TestLastArgumentIsDouble(assembler, &is_smi, &fall_through);
   // Both arguments are double, right operand is in T0.
   __ lwc1(F2, FieldAddress(T0, Double::value_offset()));
   __ lwc1(F3, FieldAddress(T0, Double::value_offset() + kWordSize));
+  __ Bind(&double_op);
   __ lw(T0, Address(SP, 1 * kWordSize));  // Left argument.
   __ lwc1(F0, FieldAddress(T0, Double::value_offset()));
   __ lwc1(F1, FieldAddress(T0, Double::value_offset() + kWordSize));
@@ -1411,6 +1419,13 @@
   __ Ret();
   __ delay_slot()->swc1(F1,
                         FieldAddress(V0, Double::value_offset() + kWordSize));
+
+  __ Bind(&is_smi);
+  __ SmiUntag(T0);
+  __ mtc1(T0, STMP1);
+  __ b(&double_op);
+  __ delay_slot()->cvtdw(D1, STMP1);
+
   __ Bind(&fall_through);
 }
 
@@ -1538,7 +1553,7 @@
   __ lw(T0, Address(SP, 0 * kWordSize));
   __ LoadDFromOffset(D0, T0, Double::value_offset() - kHeapObjectTag);
 
-  __ cvtwd(F2, D0);
+  __ truncwd(F2, D0);
   __ mfc1(V0, F2);
 
   // Overflow is signaled with minint.
@@ -1587,10 +1602,10 @@
       math_lib.LookupClassAllowPrivate(Symbols::_Random()));
   ASSERT(!random_class.IsNull());
   const Field& state_field = Field::ZoneHandle(
-      random_class.LookupInstanceField(Symbols::_state()));
+      random_class.LookupInstanceFieldAllowPrivate(Symbols::_state()));
   ASSERT(!state_field.IsNull());
   const Field& random_A_field = Field::ZoneHandle(
-      random_class.LookupStaticField(Symbols::_A()));
+      random_class.LookupStaticFieldAllowPrivate(Symbols::_A()));
   ASSERT(!random_A_field.IsNull());
   ASSERT(random_A_field.is_const());
   const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
@@ -2167,7 +2182,7 @@
 }
 
 
-void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) {
+void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) {
   if (FLAG_interpret_irregexp) return;
 
   static const intptr_t kRegExpParamOffset = 2 * kWordSize;
@@ -2187,7 +2202,7 @@
   __ AddImmediate(T2, -kOneByteStringCid);
   __ sll(T2, T2, kWordSizeLog2);
   __ addu(T2, T2, T1);
-  __ lw(T0, FieldAddress(T2, JSRegExp::function_offset(kOneByteStringCid)));
+  __ lw(T0, FieldAddress(T2, RegExp::function_offset(kOneByteStringCid)));
 
   // Registers are now set up for the lazy compile stub. It expects the function
   // in T0, the argument descriptor in S4, and IC-Data in S5.
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index e98777f..66bc4c2 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -31,6 +31,18 @@
 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; }
 
 
+void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
+  assembler->Comment("IntrinsicCallPrologue");
+  assembler->movq(CALLEE_SAVED_TEMP, R10);
+}
+
+
+void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) {
+  assembler->Comment("IntrinsicCallEpilogue");
+  assembler->movq(R10, CALLEE_SAVED_TEMP);
+}
+
+
 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) {
   if (Isolate::Current()->type_checks()) {
     return;
@@ -238,12 +250,6 @@
 
 
 #define TYPED_DATA_ALLOCATOR(clazz)                                            \
-void Intrinsifier::TypedData_##clazz##_new(Assembler* assembler) {             \
-  intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
-  intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
-  ScaleFactor scale = GetScaleFactor(size);                                    \
-  TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale);   \
-}                                                                              \
 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) {         \
   intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid);       \
   intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid);           \
@@ -1301,10 +1307,11 @@
 // Expects left argument to be double (receiver). Right argument is unknown.
 // Both arguments are on stack.
 static void DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
-  Label fall_through;
-  TestLastArgumentIsDouble(assembler, &fall_through, &fall_through);
+  Label fall_through, is_smi, double_op;
+  TestLastArgumentIsDouble(assembler, &is_smi, &fall_through);
   // Both arguments are double, right operand is in RAX.
   __ movsd(XMM1, FieldAddress(RAX, Double::value_offset()));
+  __ Bind(&double_op);
   __ movq(RAX, Address(RSP, + 2 * kWordSize));  // Left argument.
   __ movsd(XMM0, FieldAddress(RAX, Double::value_offset()));
   switch (kind) {
@@ -1323,6 +1330,10 @@
                  R13);
   __ movsd(FieldAddress(RAX, Double::value_offset()), XMM0);
   __ ret();
+  __ Bind(&is_smi);
+  __ SmiUntag(RAX);
+  __ cvtsi2sdq(XMM1, RAX);
+  __ jmp(&double_op);
   __ Bind(&fall_through);
 }
 
@@ -1482,10 +1493,10 @@
       math_lib.LookupClassAllowPrivate(Symbols::_Random()));
   ASSERT(!random_class.IsNull());
   const Field& state_field = Field::ZoneHandle(
-      random_class.LookupInstanceField(Symbols::_state()));
+      random_class.LookupInstanceFieldAllowPrivate(Symbols::_state()));
   ASSERT(!state_field.IsNull());
   const Field& random_A_field = Field::ZoneHandle(
-      random_class.LookupStaticField(Symbols::_A()));
+      random_class.LookupStaticFieldAllowPrivate(Symbols::_A()));
   ASSERT(!random_A_field.IsNull());
   ASSERT(random_A_field.is_const());
   const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
@@ -2045,7 +2056,7 @@
 }
 
 
-void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) {
+void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) {
   if (FLAG_interpret_irregexp) return;
 
   static const intptr_t kRegExpParamOffset = 3 * kWordSize;
@@ -2064,7 +2075,7 @@
   __ LoadClassId(RDI, RDI);
   __ SubImmediate(RDI, Immediate(kOneByteStringCid));
   __ movq(RAX, FieldAddress(RBX, RDI, TIMES_8,
-                            JSRegExp::function_offset(kOneByteStringCid)));
+                            RegExp::function_offset(kOneByteStringCid)));
 
   // Registers are now set up for the lazy compile stub. It expects the function
   // in RAX, the argument descriptor in R10, and IC-Data in RCX.
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 3fc7780..51e0c7e 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -12,7 +12,6 @@
 #include "vm/code_observers.h"
 #include "vm/compiler.h"
 #include "vm/compiler_stats.h"
-#include "vm/coverage.h"
 #include "vm/dart_api_message.h"
 #include "vm/dart_api_state.h"
 #include "vm/dart_entry.h"
@@ -53,30 +52,6 @@
 DECLARE_FLAG(bool, print_metrics);
 DECLARE_FLAG(bool, timing);
 DECLARE_FLAG(bool, trace_service);
-DECLARE_FLAG(bool, trace_service_verbose);
-
-DEFINE_FLAG(bool, trace_isolates, false,
-            "Trace isolate creation and shut down.");
-DEFINE_FLAG(bool, pause_isolates_on_start, false,
-            "Pause isolates before starting.");
-DEFINE_FLAG(bool, pause_isolates_on_exit, false,
-            "Pause isolates exiting.");
-DEFINE_FLAG(bool, pause_isolates_on_unhandled_exceptions, false,
-            "Pause isolates on unhandled exceptions.");
-
-DEFINE_FLAG(bool, break_at_isolate_spawn, false,
-            "Insert a one-time breakpoint at the entrypoint for all spawned "
-            "isolates");
-
-DEFINE_FLAG(int, new_gen_semi_max_size, (kWordSize <= 4) ? 16 : 32,
-            "Max size of new gen semi space in MB");
-DEFINE_FLAG(int, old_gen_heap_size, 0,
-            "Max size of old gen heap size in MB, or 0 for unlimited,"
-            "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap");
-DEFINE_FLAG(int, external_max_size, (kWordSize <= 4) ? 512 : 1024,
-            "Max total size of external allocations in MB, or 0 for unlimited,"
-            "e.g: --external_max_size=1024 allows up to 1024MB of externals");
-
 DECLARE_FLAG(bool, warn_on_pause_with_no_debugger);
 
 NOT_IN_PRODUCT(
@@ -149,12 +124,12 @@
 
 
 NoOOBMessageScope::NoOOBMessageScope(Thread* thread) : StackResource(thread) {
-  isolate()->DeferOOBMessageInterrupts();
+  thread->DeferOOBMessageInterrupts();
 }
 
 
 NoOOBMessageScope::~NoOOBMessageScope() {
-  isolate()->RestoreOOBMessageInterrupts();
+  thread()->RestoreOOBMessageInterrupts();
 }
 
 
@@ -432,8 +407,8 @@
 
 void IsolateMessageHandler::MessageNotify(Message::Priority priority) {
   if (priority >= Message::kOOBPriority) {
-    // Handle out of band messages even if the isolate is busy.
-    I->ScheduleInterrupts(Isolate::kMessageInterrupt);
+    // Handle out of band messages even if the mutator thread is busy.
+    I->ScheduleMessageInterrupts();
   }
   Dart_MessageNotifyCallback callback = I->message_notify_callback();
   if (callback) {
@@ -451,7 +426,9 @@
   Zone* zone = stack_zone.GetZone();
   HandleScope handle_scope(thread);
 #ifndef PRODUCT
-  TimelineDurationScope tds(thread, I->GetIsolateStream(), "HandleMessage");
+  TimelineDurationScope tds(thread,
+                            Timeline::GetIsolateStream(),
+                            "HandleMessage");
   tds.SetNumArguments(1);
   tds.CopyArgument(0, "isolateName", I->name());
 #endif
@@ -757,8 +734,7 @@
 // TODO(srdjan): Some Isolate monitors can be shared. Replace their usage with
 // that shared monitor.
 Isolate::Isolate(const Dart_IsolateFlags& api_flags)
-  :   stack_limit_(0),
-      store_buffer_(new StoreBuffer()),
+  :   store_buffer_(new StoreBuffer()),
       heap_(NULL),
       user_tag_(0),
       current_tag_(UserTag::null()),
@@ -791,11 +767,7 @@
       mutex_(new Mutex()),
       symbols_mutex_(new Mutex()),
       type_canonicalization_mutex_(new Mutex()),
-      saved_stack_limit_(0),
-      deferred_interrupts_mask_(0),
-      deferred_interrupts_(0),
-      stack_overflow_flags_(0),
-      stack_overflow_count_(0),
+      constant_canonicalization_mutex_(new Mutex()),
       message_handler_(NULL),
       spawn_state_(NULL),
       is_runnable_(false),
@@ -803,7 +775,6 @@
       gc_epilogue_callback_(NULL),
       defer_finalization_count_(0),
       deopt_context_(NULL),
-      compiler_stats_(NULL),
       is_service_isolate_(false),
       stacktrace_(NULL),
       stack_frame_index_(-1),
@@ -812,6 +783,7 @@
       object_id_ring_(NULL),
       tag_table_(GrowableObjectArray::null()),
       deoptimized_code_array_(GrowableObjectArray::null()),
+      sticky_error_(Error::null()),
       background_compiler_(NULL),
       pending_service_extension_calls_(GrowableObjectArray::null()),
       registered_service_extension_handlers_(GrowableObjectArray::null()),
@@ -820,11 +792,12 @@
       all_classes_finalized_(false),
       next_(NULL),
       pause_loop_monitor_(NULL),
-      cha_invalidation_gen_(kInvalidGen),
       field_invalidation_gen_(kInvalidGen),
-      prefix_invalidation_gen_(kInvalidGen),
-      boxed_field_list_mutex_(new Mutex()),
+      loading_invalidation_gen_(kInvalidGen),
+      top_level_parsing_count_(0),
+      field_list_mutex_(new Mutex()),
       boxed_field_list_(GrowableObjectArray::null()),
+      disabling_field_list_(GrowableObjectArray::null()),
       spawn_count_monitor_(new Monitor()),
       spawn_count_(0) {
   NOT_IN_PRODUCT(FlagsCopyFrom(api_flags));
@@ -856,6 +829,8 @@
   symbols_mutex_ = NULL;
   delete type_canonicalization_mutex_;
   type_canonicalization_mutex_ = NULL;
+  delete constant_canonicalization_mutex_;
+  constant_canonicalization_mutex_ = NULL;
   delete message_handler_;
   message_handler_ = NULL;  // Fail fast if we send messages to a dead isolate.
   ASSERT(deopt_context_ == NULL);  // No deopt in progress when isolate deleted.
@@ -866,14 +841,10 @@
   object_id_ring_ = NULL;
   delete pause_loop_monitor_;
   pause_loop_monitor_ = NULL;
-  delete boxed_field_list_mutex_;
-  boxed_field_list_mutex_ = NULL;
+  delete field_list_mutex_;
+  field_list_mutex_ = NULL;
   ASSERT(spawn_count_ == 0);
   delete spawn_count_monitor_;
-  if (compiler_stats_ != NULL) {
-    delete compiler_stats_;
-    compiler_stats_ = NULL;
-  }
   delete safepoint_handler_;
   delete thread_registry_;
 }
@@ -899,11 +870,6 @@
   ISOLATE_METRIC_LIST(ISOLATE_METRIC_INIT);
 #undef ISOLATE_METRIC_INIT
 
-#ifndef PRODUCT
-  // Initialize Timeline streams.
-  Timeline::SetupIsolateStreams(result);
-#endif  // !PRODUCT
-
   Heap::Init(result,
              is_vm_isolate
                  ? 0  // New gen size 0; VM isolate should only allocate in old.
@@ -952,13 +918,6 @@
     }
   }
 
-  if (FLAG_support_compiler_stats) {
-    result->compiler_stats_ = new CompilerStats(result);
-    if (FLAG_compiler_benchmark) {
-      result->compiler_stats_->EnableBenchmark();
-    }
-  }
-
   if (FLAG_support_service) {
     ObjectIdRing::Init(result);
   }
@@ -975,45 +934,6 @@
 }
 
 
-/* static */
-uword Isolate::GetCurrentStackPointer() {
-  // Since AddressSanitizer's detect_stack_use_after_return instruments the
-  // C++ code to give out fake stack addresses, we call a stub in that case.
-  uword (*func)() = reinterpret_cast<uword (*)()>(
-      StubCode::GetStackPointer_entry()->EntryPoint());
-  // But for performance (and to support simulators), we normally use a local.
-#if defined(__has_feature)
-#if __has_feature(address_sanitizer)
-  uword current_sp = func();
-  return current_sp;
-#else
-  uword stack_allocated_local_address = reinterpret_cast<uword>(&func);
-  return stack_allocated_local_address;
-#endif
-#else
-  uword stack_allocated_local_address = reinterpret_cast<uword>(&func);
-  return stack_allocated_local_address;
-#endif
-}
-
-
-void Isolate::SetupInstructionsSnapshotPage(
-    const uint8_t* instructions_snapshot_buffer) {
-  InstructionsSnapshot snapshot(instructions_snapshot_buffer);
-#if defined(DEBUG)
-  if (FLAG_trace_isolates) {
-    OS::Print("Precompiled instructions are at [0x%" Px ", 0x%" Px ")\n",
-              reinterpret_cast<uword>(snapshot.instructions_start()),
-              reinterpret_cast<uword>(snapshot.instructions_start()) +
-              snapshot.instructions_size());
-  }
-#endif
-  heap_->SetupExternalPage(snapshot.instructions_start(),
-                           snapshot.instructions_size(),
-                           /* is_executable = */ true);
-}
-
-
 void Isolate::SetupDataSnapshotPage(const uint8_t* data_snapshot_buffer) {
   DataSnapshot snapshot(data_snapshot_buffer);
 #if defined(DEBUG)
@@ -1030,6 +950,16 @@
 }
 
 
+void Isolate::ScheduleMessageInterrupts() {
+  // We take the threads lock here to ensure that the mutator thread does not
+  // exit the isolate while we are trying to schedule interrupts on it.
+  MonitorLocker ml(threads_lock());
+  Thread* mthread = mutator_thread();
+  if (mthread != NULL) {
+    mthread->ScheduleInterrupts(Thread::kMessageInterrupt);
+  }
+}
+
 
 void Isolate::set_debugger_name(const char* name) {
   free(debugger_name_);
@@ -1051,36 +981,6 @@
 }
 
 
-void Isolate::SetStackLimitFromStackBase(uword stack_base) {
-  // Set stack limit.
-#if defined(USING_SIMULATOR)
-  // Ignore passed-in native stack top and use Simulator stack top.
-  Simulator* sim = Simulator::Current();  // May allocate a simulator.
-  ASSERT(simulator() == sim);  // This isolate's simulator is the current one.
-  stack_base = sim->StackTop();
-  // The overflow area is accounted for by the simulator.
-#endif
-  SetStackLimit(stack_base - OSThread::GetSpecifiedStackSize());
-}
-
-
-void Isolate::SetStackLimit(uword limit) {
-  // The isolate setting the stack limit is not necessarily the isolate which
-  // the stack limit is being set on.
-  MutexLocker ml(mutex_);
-  if (stack_limit_ == saved_stack_limit_) {
-    // No interrupt pending, set stack_limit_ too.
-    stack_limit_ = limit;
-  }
-  saved_stack_limit_ = limit;
-}
-
-
-void Isolate::ClearStackLimit() {
-  SetStackLimit(~static_cast<uword>(0));
-}
-
-
 void Isolate::DoneLoading() {
   GrowableObjectArray& libs = GrowableObjectArray::Handle(current_zone(),
       object_store()->libraries());
@@ -1122,7 +1022,7 @@
   }
 #ifndef PRODUCT
   if (FLAG_support_timeline) {
-    TimelineStream* stream = GetIsolateStream();
+    TimelineStream* stream = Timeline::GetIsolateStream();
     ASSERT(stream != NULL);
     TimelineEvent* event = stream->StartEvent();
     if (event != NULL) {
@@ -1484,118 +1384,6 @@
 }
 
 
-void Isolate::ScheduleInterrupts(uword interrupt_bits) {
-  MutexLocker ml(mutex_);
-  ASSERT((interrupt_bits & ~kInterruptsMask) == 0);  // Must fit in mask.
-
-  // Check to see if any of the requested interrupts should be deferred.
-  uword defer_bits = interrupt_bits & deferred_interrupts_mask_;
-  if (defer_bits != 0) {
-    deferred_interrupts_ |= defer_bits;
-    interrupt_bits &= ~deferred_interrupts_mask_;
-    if (interrupt_bits == 0) {
-      return;
-    }
-  }
-
-  if (stack_limit_ == saved_stack_limit_) {
-    stack_limit_ = (~static_cast<uword>(0)) & ~kInterruptsMask;
-  }
-  stack_limit_ |= interrupt_bits;
-}
-
-
-uword Isolate::GetAndClearInterrupts() {
-  MutexLocker ml(mutex_);
-  if (stack_limit_ == saved_stack_limit_) {
-    return 0;  // No interrupt was requested.
-  }
-  uword interrupt_bits = stack_limit_ & kInterruptsMask;
-  stack_limit_ = saved_stack_limit_;
-  return interrupt_bits;
-}
-
-
-void Isolate::DeferOOBMessageInterrupts() {
-  MutexLocker ml(mutex_);
-  ASSERT(deferred_interrupts_mask_ == 0);
-  deferred_interrupts_mask_ = kMessageInterrupt;
-
-  if (stack_limit_ != saved_stack_limit_) {
-    // Defer any interrupts which are currently pending.
-    deferred_interrupts_ = stack_limit_ & deferred_interrupts_mask_;
-
-    // Clear deferrable interrupts, if present.
-    stack_limit_ &= ~deferred_interrupts_mask_;
-
-    if ((stack_limit_ & kInterruptsMask) == 0) {
-      // No other pending interrupts.  Restore normal stack limit.
-      stack_limit_ = saved_stack_limit_;
-    }
-  }
-  if (FLAG_trace_service && FLAG_trace_service_verbose) {
-    OS::Print("[+%" Pd64 "ms] Isolate %s deferring OOB interrupts\n",
-              Dart::timestamp(), name());
-  }
-}
-
-
-void Isolate::RestoreOOBMessageInterrupts() {
-  MutexLocker ml(mutex_);
-  ASSERT(deferred_interrupts_mask_ == kMessageInterrupt);
-  deferred_interrupts_mask_ = 0;
-  if (deferred_interrupts_ != 0) {
-    if (stack_limit_ == saved_stack_limit_) {
-      stack_limit_ = (~static_cast<uword>(0)) & ~kInterruptsMask;
-    }
-    stack_limit_ |= deferred_interrupts_;
-    deferred_interrupts_ = 0;
-  }
-  if (FLAG_trace_service && FLAG_trace_service_verbose) {
-    OS::Print("[+%" Pd64 "ms] Isolate %s restoring OOB interrupts\n",
-              Dart::timestamp(), name());
-  }
-}
-
-
-RawError* Isolate::HandleInterrupts() {
-  uword interrupt_bits = GetAndClearInterrupts();
-  if ((interrupt_bits & kVMInterrupt) != 0) {
-    if (store_buffer()->Overflowed()) {
-      if (FLAG_verbose_gc) {
-        OS::PrintErr("Scavenge scheduled by store buffer overflow.\n");
-      }
-      heap()->CollectGarbage(Heap::kNew);
-    }
-  }
-  if ((interrupt_bits & kMessageInterrupt) != 0) {
-    MessageHandler::MessageStatus status =
-        message_handler()->HandleOOBMessages();
-    if (status != MessageHandler::kOK) {
-      // False result from HandleOOBMessages signals that the isolate should
-      // be terminating.
-      if (FLAG_trace_isolates) {
-        OS::Print("[!] Terminating isolate due to OOB message:\n"
-                  "\tisolate:    %s\n", name());
-      }
-      Thread* thread = Thread::Current();
-      const Error& error = Error::Handle(thread->sticky_error());
-      ASSERT(!error.IsNull() && error.IsUnwindError());
-      thread->clear_sticky_error();
-      return error.raw();
-    }
-  }
-  return Error::null();
-}
-
-
-uword Isolate::GetAndClearStackOverflowFlags() {
-  uword stack_overflow_flags = stack_overflow_flags_;
-  stack_overflow_flags_ = 0;
-  return stack_overflow_flags;
-}
-
-
 void Isolate::AddClosureFunction(const Function& function) const {
   GrowableObjectArray& closures =
       GrowableObjectArray::Handle(object_store()->closure_functions());
@@ -1736,12 +1524,17 @@
 }
 
 
-void Isolate::Shutdown() {
-  ASSERT(this == Isolate::Current());
+void Isolate::StopBackgroundCompiler() {
   // Wait until all background compilation has finished.
   if (background_compiler_ != NULL) {
-    BackgroundCompiler::Stop(background_compiler_);
+    BackgroundCompiler::Stop(this);
   }
+}
+
+
+void Isolate::Shutdown() {
+  ASSERT(this == Isolate::Current());
+  StopBackgroundCompiler();
 
 #if defined(DEBUG)
   if (heap_ != NULL) {
@@ -1753,7 +1546,7 @@
   Thread* thread = Thread::Current();
 
   // Don't allow anymore dart code to execution on this isolate.
-  ClearStackLimit();
+  thread->ClearStackLimit();
 
   // First, perform higher-level cleanup that may need to allocate.
   {
@@ -1761,17 +1554,11 @@
     StackZone stack_zone(thread);
     HandleScope handle_scope(thread);
 
-    // Write out the coverage data if collection has been enabled.
-    if ((this != Dart::vm_isolate()) &&
-        !ServiceIsolate::IsServiceIsolateDescendant(this)) {
-      CodeCoverage::Write(thread);
-    }
-
     // Write compiler stats data if enabled.
     if (FLAG_support_compiler_stats && FLAG_compiler_stats
         && !ServiceIsolate::IsServiceIsolateDescendant(this)
         && (this != Dart::vm_isolate())) {
-      OS::Print("%s", compiler_stats()->PrintToZone());
+      OS::Print("%s", aggregate_compiler_stats()->PrintToZone());
     }
   }
 
@@ -1809,11 +1596,6 @@
 
 Dart_IsolateCreateCallback Isolate::create_callback_ = NULL;
 Dart_IsolateShutdownCallback Isolate::shutdown_callback_ = NULL;
-Dart_FileOpenCallback Isolate::file_open_callback_ = NULL;
-Dart_FileReadCallback Isolate::file_read_callback_ = NULL;
-Dart_FileWriteCallback Isolate::file_write_callback_ = NULL;
-Dart_FileCloseCallback Isolate::file_close_callback_ = NULL;
-Dart_EntropySource Isolate::entropy_source_callback_ = NULL;
 
 Monitor* Isolate::isolates_list_monitor_ = NULL;
 Isolate* Isolate::isolates_list_head_ = NULL;
@@ -1861,6 +1643,9 @@
   visitor->VisitPointer(
       reinterpret_cast<RawObject**>(&deoptimized_code_array_));
 
+  visitor->VisitPointer(
+        reinterpret_cast<RawObject**>(&sticky_error_));
+
   // Visit the pending service extension calls.
   visitor->VisitPointer(
       reinterpret_cast<RawObject**>(&pending_service_extension_calls_));
@@ -1869,12 +1654,18 @@
   visitor->VisitPointer(
       reinterpret_cast<RawObject**>(&registered_service_extension_handlers_));
 
-  // Visit the boxed_field_list.
+  // Visit the boxed_field_list_.
   // 'boxed_field_list_' access via mutator and background compilation threads
   // is guarded with a monitor. This means that we can visit it only
-  // when at safepoint or the boxed_field_list_mutex_ lock has been taken.
+  // when at safepoint or the field_list_mutex_ lock has been taken.
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&boxed_field_list_));
 
+  // Visit the disabling_field_list.
+  // 'disabling_field_list_' access via mutator and background compilation
+  // threads is guarded with a monitor. This means that we can visit it only
+  // when at safepoint or the field_list_mutex_ lock has been taken.
+  visitor->VisitPointer(reinterpret_cast<RawObject**>(&disabling_field_list_));
+
   // Visit objects in the debugger.
   if (FLAG_support_debugger) {
     debugger()->VisitObjectPointers(visitor);
@@ -1947,7 +1738,13 @@
   jsobj.AddProperty("pauseOnExit", message_handler()->should_pause_on_exit());
 
   if (debugger() != NULL) {
-    if (message_handler()->is_paused_on_start()) {
+    if (!is_runnable()) {
+      // Isolate is not yet runnable.
+      ASSERT(debugger()->PauseEvent() == NULL);
+      ServiceEvent pause_event(this, ServiceEvent::kNone);
+      jsobj.AddProperty("pauseEvent", &pause_event);
+    } else if (message_handler()->is_paused_on_start() ||
+               message_handler()->should_pause_on_start()) {
       ASSERT(debugger()->PauseEvent() == NULL);
       ServiceEvent pause_event(this, ServiceEvent::kPauseStart);
       jsobj.AddProperty("pauseEvent", &pause_event);
@@ -1987,6 +1784,10 @@
     Error& error = Error::Handle(Thread::Current()->sticky_error());
     ASSERT(!error.IsNull());
     jsobj.AddProperty("error", error, false);
+  } else if (sticky_error() != Object::null()) {
+    Error& error = Error::Handle(sticky_error());
+    ASSERT(!error.IsNull());
+    jsobj.AddProperty("error", error, false);
   }
 
   {
@@ -2072,6 +1873,11 @@
 }
 
 
+void Isolate::clear_sticky_error() {
+  sticky_error_ = Error::null();
+}
+
+
 void Isolate::set_pending_service_extension_calls(
       const GrowableObjectArray& value) {
   pending_service_extension_calls_ = value.raw();
@@ -2084,11 +1890,56 @@
 }
 
 
+// Used by mutator thread to notify background compiler which fields
+// triggered code invalidation.
+void Isolate::AddDisablingField(const Field& field) {
+  ASSERT(Thread::Current()->IsMutatorThread());
+  SafepointMutexLocker ml(field_list_mutex_);
+  if (disabling_field_list_ == GrowableObjectArray::null()) {
+    disabling_field_list_ = GrowableObjectArray::New(Heap::kOld);
+  }
+  const GrowableObjectArray& array =
+      GrowableObjectArray::Handle(disabling_field_list_);
+  array.Add(field, Heap::kOld);
+}
+
+
+RawField* Isolate::GetDisablingField() {
+  ASSERT(Compiler::IsBackgroundCompilation() &&
+         (!Isolate::Current()->HasMutatorThread() ||
+         Isolate::Current()->mutator_thread()->IsAtSafepoint()));
+  ASSERT(Thread::Current()->IsAtSafepoint());
+  if (disabling_field_list_ == GrowableObjectArray::null()) {
+    return Field::null();
+  }
+  const GrowableObjectArray& array =
+      GrowableObjectArray::Handle(disabling_field_list_);
+  if (array.Length() == 0) {
+    return Field::null();
+  }
+  return Field::RawCast(array.RemoveLast());
+}
+
+
+void Isolate::ClearDisablingFieldList() {
+  MutexLocker ml(field_list_mutex_);
+  if (disabling_field_list_ == GrowableObjectArray::null()) {
+    return;
+  }
+  const GrowableObjectArray& array =
+      GrowableObjectArray::Handle(disabling_field_list_);
+  if (array.Length() > 0) {
+    array.SetLength(0);
+  }
+}
+
+
 void Isolate::AddDeoptimizingBoxedField(const Field& field) {
+  ASSERT(Compiler::IsBackgroundCompilation());
   ASSERT(field.IsOriginal());
   // The enclosed code allocates objects and can potentially trigger a GC,
   // ensure that we account for safepoints when grabbing the lock.
-  SafepointMutexLocker ml(boxed_field_list_mutex_);
+  SafepointMutexLocker ml(field_list_mutex_);
   if (boxed_field_list_ == GrowableObjectArray::null()) {
     boxed_field_list_ = GrowableObjectArray::New(Heap::kOld);
   }
@@ -2099,7 +1950,8 @@
 
 
 RawField* Isolate::GetDeoptimizingBoxedField() {
-  MutexLocker ml(boxed_field_list_mutex_);
+  ASSERT(Thread::Current()->IsMutatorThread());
+  MutexLocker ml(field_list_mutex_);
   if (boxed_field_list_ == GrowableObjectArray::null()) {
     return Field::null();
   }
@@ -2583,6 +2435,16 @@
   // so we create a MonitorLocker object which does not do any
   // no_safepoint_scope_depth increments/decrements.
   MonitorLocker ml(threads_lock(), false);
+  if (is_mutator) {
+    if (thread->sticky_error() != Error::null()) {
+      ASSERT(sticky_error_ == Error::null());
+      sticky_error_ = thread->sticky_error();
+      thread->clear_sticky_error();
+    }
+  } else {
+    ASSERT(thread->api_top_scope_ == NULL);
+    ASSERT(thread->zone_ == NULL);
+  }
   if (!bypass_safepoint) {
     // Ensure that the thread reports itself as being at a safepoint.
     thread->EnterSafepoint();
@@ -2600,6 +2462,7 @@
   thread->set_os_thread(NULL);
   thread->set_execution_state(Thread::kThreadInVM);
   thread->set_safepoint_state(0);
+  thread->clear_pending_functions();
   ASSERT(thread->no_safepoint_scope_depth() == 0);
   // Return thread structure.
   thread_registry()->ReturnThreadLocked(is_mutator, thread);
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 9d6aa28..3250082 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -17,7 +17,6 @@
 #include "vm/tags.h"
 #include "vm/thread.h"
 #include "vm/os_thread.h"
-#include "vm/timeline.h"
 #include "vm/timer.h"
 #include "vm/token_position.h"
 
@@ -229,78 +228,10 @@
     library_tag_handler_ = value;
   }
 
-  void SetStackLimit(uword value);
-  void SetStackLimitFromStackBase(uword stack_base);
-  void ClearStackLimit();
-
-  // Returns the current C++ stack pointer. Equivalent taking the address of a
-  // stack allocated local, but plays well with AddressSanitizer.
-  // TODO(koda): Move to Thread.
-  static uword GetCurrentStackPointer();
-
-  void SetupInstructionsSnapshotPage(
-      const uint8_t* instructions_snapshot_buffer);
   void SetupDataSnapshotPage(
       const uint8_t* instructions_snapshot_buffer);
 
-  // Returns true if any of the interrupts specified by 'interrupt_bits' are
-  // currently scheduled for this isolate, but leaves them unchanged.
-  //
-  // NOTE: The read uses relaxed memory ordering, i.e., it is atomic and
-  // an interrupt is guaranteed to be observed eventually, but any further
-  // order guarantees must be ensured by other synchronization. See the
-  // tests in isolate_test.cc for example usage.
-  bool HasInterruptsScheduled(uword interrupt_bits) {
-    ASSERT(interrupt_bits == (interrupt_bits & kInterruptsMask));
-    uword limit = AtomicOperations::LoadRelaxed(&stack_limit_);
-    return (limit != saved_stack_limit_) &&
-        (((limit & kInterruptsMask) & interrupt_bits) != 0);
-  }
-
-  // Access to the current stack limit for generated code.  This may be
-  // overwritten with a special value to trigger interrupts.
-  uword stack_limit_address() const {
-    return reinterpret_cast<uword>(&stack_limit_);
-  }
-  static intptr_t stack_limit_offset() {
-    return OFFSET_OF(Isolate, stack_limit_);
-  }
-
-  // The true stack limit for this isolate.
-  uword saved_stack_limit() const { return saved_stack_limit_; }
-
-  // Stack overflow flags
-  enum {
-    kOsrRequest = 0x1,  // Current stack overflow caused by OSR request.
-  };
-
-  uword stack_overflow_flags_address() const {
-    return reinterpret_cast<uword>(&stack_overflow_flags_);
-  }
-  static intptr_t stack_overflow_flags_offset() {
-    return OFFSET_OF(Isolate, stack_overflow_flags_);
-  }
-
-  int32_t IncrementAndGetStackOverflowCount() {
-    return ++stack_overflow_count_;
-  }
-
-  // Retrieves and clears the stack overflow flags.  These are set by
-  // the generated code before the slow path runtime routine for a
-  // stack overflow is called.
-  uword GetAndClearStackOverflowFlags();
-
-  // Interrupt bits.
-  enum {
-    kVMInterrupt = 0x1,  // Internal VM checks: safepoints, store buffers, etc.
-    kMessageInterrupt = 0x2,  // An interrupt to process an out of band message.
-
-    kInterruptsMask = (kVMInterrupt | kMessageInterrupt),
-  };
-
-  void ScheduleInterrupts(uword interrupt_bits);
-  RawError* HandleInterrupts();
-  uword GetAndClearInterrupts();
+  void ScheduleMessageInterrupts();
 
   // Marks all libraries as loaded.
   void DoneLoading();
@@ -312,7 +243,12 @@
   void set_message_handler(MessageHandler* value) { message_handler_ = value; }
 
   bool is_runnable() const { return is_runnable_; }
-  void set_is_runnable(bool value) { is_runnable_ = value; }
+  void set_is_runnable(bool value) {
+    is_runnable_ = value;
+    if (is_runnable_) {
+      set_last_resume_timestamp();
+    }
+  }
 
   IsolateSpawnState* spawn_state() const { return spawn_state_; }
   void set_spawn_state(IsolateSpawnState* value) { spawn_state_ = value; }
@@ -322,6 +258,9 @@
   Mutex* type_canonicalization_mutex() const {
     return type_canonicalization_mutex_;
   }
+  Mutex* constant_canonicalization_mutex() const {
+    return constant_canonicalization_mutex_;
+  }
 
   Debugger* debugger() const {
     if (!FLAG_support_debugger) {
@@ -424,36 +363,6 @@
     return shutdown_callback_;
   }
 
-  static void SetFileCallbacks(Dart_FileOpenCallback file_open,
-                               Dart_FileReadCallback file_read,
-                               Dart_FileWriteCallback file_write,
-                               Dart_FileCloseCallback file_close) {
-    file_open_callback_ = file_open;
-    file_read_callback_ = file_read;
-    file_write_callback_ = file_write;
-    file_close_callback_ = file_close;
-  }
-
-  static Dart_FileOpenCallback file_open_callback() {
-    return file_open_callback_;
-  }
-  static Dart_FileReadCallback file_read_callback() {
-    return file_read_callback_;
-  }
-  static Dart_FileWriteCallback file_write_callback() {
-    return file_write_callback_;
-  }
-  static Dart_FileCloseCallback file_close_callback() {
-    return file_close_callback_;
-  }
-
-  static void SetEntropySourceCallback(Dart_EntropySource entropy_source) {
-    entropy_source_callback_ = entropy_source;
-  }
-  static Dart_EntropySource entropy_source_callback() {
-    return entropy_source_callback_;
-  }
-
   void set_object_id_ring(ObjectIdRing* ring) {
     object_id_ring_ = ring;
   }
@@ -461,6 +370,7 @@
     return object_id_ring_;
   }
 
+  bool IsDeoptimizing() const { return deopt_context_ != NULL; }
   DeoptContext* deopt_context() const { return deopt_context_; }
   void set_deopt_context(DeoptContext* value) {
     ASSERT(value == NULL || deopt_context_ == NULL);
@@ -508,8 +418,10 @@
 
   void PrintJSON(JSONStream* stream, bool ref = true);
 
-  CompilerStats* compiler_stats() {
-    return compiler_stats_;
+  // Mutator thread is used to aggregate compiler stats.
+  CompilerStats* aggregate_compiler_stats() {
+    ASSERT(HasMutatorThread());
+    return mutator_thread_->compiler_stats();
   }
 
   VMTagCounters* vm_tag_counters() {
@@ -534,18 +446,6 @@
   ISOLATE_METRIC_LIST(ISOLATE_METRIC_ACCESSOR);
 #undef ISOLATE_METRIC_ACCESSOR
 
-#ifndef PRODUCT
-#define ISOLATE_TIMELINE_STREAM_ACCESSOR(name, not_used)                       \
-  TimelineStream* Get##name##Stream() { return &stream_##name##_; }
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_ACCESSOR)
-#undef ISOLATE_TIMELINE_STREAM_ACCESSOR
-#else
-#define ISOLATE_TIMELINE_STREAM_ACCESSOR(name, not_used)                       \
-  TimelineStream* Get##name##Stream() { return NULL; }
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_ACCESSOR)
-#undef ISOLATE_TIMELINE_STREAM_ACCESSOR
-#endif  // !PRODUCT
-
   static intptr_t IsolateListLength();
 
   RawGrowableObjectArray* tag_table() const { return tag_table_; }
@@ -573,6 +473,9 @@
   void set_deoptimized_code_array(const GrowableObjectArray& value);
   void TrackDeoptimizedCode(const Code& code);
 
+  RawError* sticky_error() const { return sticky_error_; }
+  void clear_sticky_error();
+
   bool compilation_allowed() const { return compilation_allowed_; }
   void set_compilation_allowed(bool allowed) {
     compilation_allowed_ = allowed;
@@ -584,30 +487,48 @@
     all_classes_finalized_ = value;
   }
 
-  static const uint32_t kInvalidGen = 0;
-
-  void IncrCHAInvalidationGen() {
-    cha_invalidation_gen_++;
-    if (cha_invalidation_gen_ == kInvalidGen) cha_invalidation_gen_++;
+  // True during top level parsing.
+  bool IsTopLevelParsing() {
+    const intptr_t value =
+        AtomicOperations::LoadRelaxedIntPtr(&top_level_parsing_count_);
+    ASSERT(value >= 0);
+    return value > 0;
   }
-  void ResetCHAInvalidationGen() { cha_invalidation_gen_ = kInvalidGen; }
-  uint32_t cha_invalidation_gen() const { return cha_invalidation_gen_; }
 
+  void IncrTopLevelParsingCount() {
+    AtomicOperations::IncrementBy(&top_level_parsing_count_, 1);
+  }
+  void DecrTopLevelParsingCount() {
+    AtomicOperations::DecrementBy(&top_level_parsing_count_, 1);
+  }
+
+  static const intptr_t kInvalidGen = 0;
 
   void IncrFieldInvalidationGen() {
-    field_invalidation_gen_++;
-    if (field_invalidation_gen_ == kInvalidGen) field_invalidation_gen_++;
+    AtomicOperations::IncrementBy(&field_invalidation_gen_, 1);
+    if (field_invalidation_gen_ == kInvalidGen) {
+      AtomicOperations::IncrementBy(&field_invalidation_gen_, 1);
+    }
+  }
+  intptr_t field_invalidation_gen() const { return field_invalidation_gen_; }
+
+  void IncrLoadingInvalidationGen() {
+    AtomicOperations::IncrementBy(&loading_invalidation_gen_, 1);
+    if (loading_invalidation_gen_ == kInvalidGen) {
+      AtomicOperations::IncrementBy(&loading_invalidation_gen_, 1);
+    }
+  }
+  intptr_t loading_invalidation_gen() {
+    return AtomicOperations::LoadRelaxedIntPtr(&loading_invalidation_gen_);
   }
 
-  void ResetFieldInvalidationGen() { field_invalidation_gen_ = kInvalidGen; }
-  uint32_t field_invalidation_gen() const { return field_invalidation_gen_; }
-
-  void IncrPrefixInvalidationGen() {
-    prefix_invalidation_gen_++;
-    if (prefix_invalidation_gen_ == kInvalidGen) prefix_invalidation_gen_++;
-  }
-  void ResetPrefixInvalidationGen() { prefix_invalidation_gen_ = kInvalidGen; }
-  uint32_t prefix_invalidation_gen() const { return prefix_invalidation_gen_; }
+  // Used by mutator thread to notify background compiler which fields
+  // triggered code invalidation.
+  void AddDisablingField(const Field& field);
+  // Returns Field::null() if none available in the list. Can be called
+  // only from background compiler and while mutator thread is at safepoint.
+  RawField* GetDisablingField();
+  void ClearDisablingFieldList();
 
   // Used by background compiler which field became boxed and must trigger
   // deoptimization in the mutator thread.
@@ -662,10 +583,11 @@
   static void DisableIsolateCreation();
   static void EnableIsolateCreation();
 
+  void StopBackgroundCompiler();
+
  private:
   friend class Dart;  // Init, InitOnce, Shutdown.
   friend class IsolateKillerVisitor;  // Kill().
-  friend class NoOOBMessageScope;
 
   explicit Isolate(const Dart_IsolateFlags& api_flags);
 
@@ -692,9 +614,6 @@
     user_tag_ = tag;
   }
 
-  void DeferOOBMessageInterrupts();
-  void RestoreOOBMessageInterrupts();
-
   RawGrowableObjectArray* GetAndClearPendingServiceExtensionCalls();
   RawGrowableObjectArray* pending_service_extension_calls() const {
     return pending_service_extension_calls_;
@@ -719,9 +638,6 @@
   }
 
   // Accessed from generated code:
-  // TODO(asiva): Need to consider moving the stack_limit_ from isolate to
-  // being thread specific.
-  uword stack_limit_;
   StoreBuffer* store_buffer_;
   Heap* heap_;
   uword user_tag_;
@@ -755,14 +671,10 @@
   bool has_compiled_code_;  // Can check that no compilation occured.
   Random random_;
   Simulator* simulator_;
-  Mutex* mutex_;  // Protects stack_limit_, saved_stack_limit_, compiler stats.
+  Mutex* mutex_;  // Protects compiler stats.
   Mutex* symbols_mutex_;  // Protects concurrent access to the symbol table.
   Mutex* type_canonicalization_mutex_;  // Protects type canonicalization.
-  uword saved_stack_limit_;
-  uword deferred_interrupts_mask_;
-  uword deferred_interrupts_;
-  uword stack_overflow_flags_;
-  int32_t stack_overflow_count_;
+  Mutex* constant_canonicalization_mutex_;  // Protects const canonicalization.
   MessageHandler* message_handler_;
   IsolateSpawnState* spawn_state_;
   bool is_runnable_;
@@ -771,8 +683,6 @@
   intptr_t defer_finalization_count_;
   DeoptContext* deopt_context_;
 
-  CompilerStats* compiler_stats_;
-
   bool is_service_isolate_;
 
   // Isolate-specific flags.
@@ -799,6 +709,8 @@
 
   RawGrowableObjectArray* deoptimized_code_array_;
 
+  RawError* sticky_error_;
+
   // Background compilation.
   BackgroundCompiler* background_compiler_;
 
@@ -836,14 +748,17 @@
   // Invalidation generations; used to track events occuring in parallel
   // to background compilation. The counters may overflow, which is OK
   // since we check for equality to detect if an event occured.
-  uint32_t cha_invalidation_gen_;
-  uint32_t field_invalidation_gen_;
-  uint32_t prefix_invalidation_gen_;
+  intptr_t field_invalidation_gen_;
+  intptr_t loading_invalidation_gen_;
+  intptr_t top_level_parsing_count_;
 
-  // Protect access to boxed_field_list_.
-  Mutex* boxed_field_list_mutex_;
+  // Protect access to boxed_field_list_ and disabling_field_list_.
+  Mutex* field_list_mutex_;
   // List of fields that became boxed and that trigger deoptimization.
   RawGrowableObjectArray* boxed_field_list_;
+  // List of fields that were disabling code while background compiler
+  // was running.
+  RawGrowableObjectArray* disabling_field_list_;
 
   // This guards spawn_count_. An isolate cannot complete shutdown and be
   // destroyed while there are child isolates in the midst of a spawn.
@@ -855,20 +770,9 @@
   ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE);
 #undef ISOLATE_METRIC_VARIABLE
 
-#ifndef PRODUCT
-#define ISOLATE_TIMELINE_STREAM_VARIABLE(name, not_used)                       \
-  TimelineStream stream_##name##_;
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_VARIABLE)
-#undef ISOLATE_TIMELINE_STREAM_VARIABLE
-#endif  // !PRODUCT
 
   static Dart_IsolateCreateCallback create_callback_;
   static Dart_IsolateShutdownCallback shutdown_callback_;
-  static Dart_FileOpenCallback file_open_callback_;
-  static Dart_FileReadCallback file_read_callback_;
-  static Dart_FileWriteCallback file_write_callback_;
-  static Dart_FileCloseCallback file_close_callback_;
-  static Dart_EntropySource entropy_source_callback_;
   static Dart_IsolateInterruptCallback vmstats_callback_;
 
   static void WakePauseEventHandler(Dart_Isolate isolate);
@@ -893,7 +797,6 @@
   friend class ServiceIsolate;
   friend class Thread;
   friend class Timeline;
-  friend class IsolateTestHelper;
 
   DISALLOW_COPY_AND_ASSIGN(Isolate);
 };
@@ -913,9 +816,9 @@
     }
     if (saved_isolate_ != new_isolate_) {
       ASSERT(Isolate::Current() == NULL);
-      // Ensure this is not a nested 'isolate enter' with prior state.
-      ASSERT(new_isolate_->saved_stack_limit() == 0);
       Thread::EnterIsolate(new_isolate_);
+      // Ensure this is not a nested 'isolate enter' with prior state.
+      ASSERT(Thread::Current()->saved_stack_limit() == 0);
     }
   }
 
@@ -928,7 +831,7 @@
     if (saved_isolate_ != new_isolate_) {
       ASSERT(saved_isolate_ == NULL);
       // ASSERT that we have bottomed out of all Dart invocations.
-      ASSERT(new_isolate_->saved_stack_limit() == 0);
+      ASSERT(Thread::Current()->saved_stack_limit() == 0);
       Thread::ExitIsolate();
     }
   }
diff --git a/runtime/vm/isolate_test.cc b/runtime/vm/isolate_test.cc
index 6491c41..4e39113 100644
--- a/runtime/vm/isolate_test.cc
+++ b/runtime/vm/isolate_test.cc
@@ -89,21 +89,24 @@
   static const intptr_t kTaskCount;
   static const intptr_t kIterations;
 
-  InterruptChecker(Isolate* isolate,
-                   ThreadBarrier* barrier)
-    : isolate_(isolate),
+  InterruptChecker(Thread* thread, ThreadBarrier* barrier)
+    : thread_(thread),
       barrier_(barrier) {
   }
 
   virtual void Run() {
-    Thread::EnterIsolateAsHelper(isolate_);
+    Thread::EnterIsolateAsHelper(thread_->isolate(), Thread::kUnknownTask);
     // Tell main thread that we are ready.
     barrier_->Sync();
     for (intptr_t i = 0; i < kIterations; ++i) {
       // Busy wait for interrupts.
-      while (!isolate_->HasInterruptsScheduled(Isolate::kVMInterrupt)) {
-        // Do nothing.
-      }
+      uword limit = 0;
+      do {
+        limit = AtomicOperations::LoadRelaxed(
+            reinterpret_cast<uword*>(thread_->stack_limit_address()));
+      } while ((limit == thread_->saved_stack_limit_) ||
+               (((limit & Thread::kInterruptsMask) &
+                 Thread::kVMInterrupt) == 0));
       // Tell main thread that we observed the interrupt.
       barrier_->Sync();
     }
@@ -112,7 +115,7 @@
   }
 
  private:
-  Isolate* isolate_;
+  Thread* thread_;
   ThreadBarrier* barrier_;
 };
 
@@ -130,23 +133,23 @@
 // compiler and/or CPU could reorder operations to make the tasks observe the
 // round update *before* the interrupt is set.
 TEST_CASE(StackLimitInterrupts) {
-  Isolate* isolate = Thread::Current()->isolate();
+  Isolate* isolate = thread->isolate();
   ThreadBarrier barrier(InterruptChecker::kTaskCount + 1,
                         isolate->heap()->barrier(),
                         isolate->heap()->barrier_done());
   // Start all tasks. They will busy-wait until interrupted in the first round.
   for (intptr_t task = 0; task < InterruptChecker::kTaskCount; task++) {
-    Dart::thread_pool()->Run(new InterruptChecker(isolate, &barrier));
+    Dart::thread_pool()->Run(new InterruptChecker(thread, &barrier));
   }
   // Wait for all tasks to get ready for the first round.
   barrier.Sync();
   for (intptr_t i = 0; i < InterruptChecker::kIterations; ++i) {
-    isolate->ScheduleInterrupts(Isolate::kVMInterrupt);
+    thread->ScheduleInterrupts(Thread::kVMInterrupt);
     // Wait for all tasks to observe the interrupt.
     barrier.Sync();
     // Continue with next round.
-    uword interrupts = isolate->GetAndClearInterrupts();
-    EXPECT((interrupts & Isolate::kVMInterrupt) != 0);
+    uword interrupts = thread->GetAndClearInterrupts();
+    EXPECT((interrupts & Thread::kVMInterrupt) != 0);
   }
   barrier.Exit();
 }
@@ -154,17 +157,17 @@
 
 class IsolateTestHelper {
  public:
-  static uword GetStackLimit(Isolate* isolate) {
-    return isolate->stack_limit_;
+  static uword GetStackLimit(Thread* thread) {
+    return thread->stack_limit_;
   }
-  static uword GetSavedStackLimit(Isolate* isolate) {
-    return isolate->saved_stack_limit_;
+  static uword GetSavedStackLimit(Thread* thread) {
+    return thread->saved_stack_limit_;
   }
-  static uword GetDeferredInterruptsMask(Isolate* isolate) {
-    return isolate->deferred_interrupts_mask_;
+  static uword GetDeferredInterruptsMask(Thread* thread) {
+    return thread->deferred_interrupts_mask_;
   }
-  static uword GetDeferredInterrupts(Isolate* isolate) {
-    return isolate->deferred_interrupts_;
+  static uword GetDeferredInterrupts(Thread* thread) {
+    return thread->deferred_interrupts_;
   }
 };
 
@@ -172,82 +175,81 @@
 TEST_CASE(NoOOBMessageScope) {
   // EXPECT_EQ is picky about type agreement for its arguments.
   const uword kZero = 0;
-  const uword kMessageInterrupt = Isolate::kMessageInterrupt;
-  const uword kVMInterrupt = Isolate::kVMInterrupt;
+  const uword kMessageInterrupt = Thread::kMessageInterrupt;
+  const uword kVMInterrupt = Thread::kVMInterrupt;
   uword stack_limit;
   uword interrupt_bits;
 
   // Initially no interrupts are scheduled or deferred.
-  Isolate* isolate = Thread::Current()->isolate();
-  EXPECT_EQ(IsolateTestHelper::GetStackLimit(isolate),
-            IsolateTestHelper::GetSavedStackLimit(isolate));
-  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterruptsMask(isolate));
-  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterrupts(isolate));
+  EXPECT_EQ(IsolateTestHelper::GetStackLimit(thread),
+            IsolateTestHelper::GetSavedStackLimit(thread));
+  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterruptsMask(thread));
+  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterrupts(thread));
 
   {
     // Defer message interrupts.
-    NoOOBMessageScope no_msg_scope(Thread::Current());
-    EXPECT_EQ(IsolateTestHelper::GetStackLimit(isolate),
-              IsolateTestHelper::GetSavedStackLimit(isolate));
+    NoOOBMessageScope no_msg_scope(thread);
+    EXPECT_EQ(IsolateTestHelper::GetStackLimit(thread),
+              IsolateTestHelper::GetSavedStackLimit(thread));
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterruptsMask(isolate));
-    EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterrupts(isolate));
+              IsolateTestHelper::GetDeferredInterruptsMask(thread));
+    EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterrupts(thread));
 
     // Schedule a message, it is deferred.
-    isolate->ScheduleInterrupts(Isolate::kMessageInterrupt);
-    EXPECT_EQ(IsolateTestHelper::GetStackLimit(isolate),
-              IsolateTestHelper::GetSavedStackLimit(isolate));
+    thread->ScheduleInterrupts(Thread::kMessageInterrupt);
+    EXPECT_EQ(IsolateTestHelper::GetStackLimit(thread),
+              IsolateTestHelper::GetSavedStackLimit(thread));
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterruptsMask(isolate));
+              IsolateTestHelper::GetDeferredInterruptsMask(thread));
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterrupts(isolate));
+              IsolateTestHelper::GetDeferredInterrupts(thread));
 
     // Schedule a vm interrupt, it is not deferred.
-    isolate->ScheduleInterrupts(Isolate::kVMInterrupt);
-    stack_limit = IsolateTestHelper::GetStackLimit(isolate);
-    EXPECT_NE(stack_limit, IsolateTestHelper::GetSavedStackLimit(isolate));
-    EXPECT((stack_limit & Isolate::kVMInterrupt) != 0);
+    thread->ScheduleInterrupts(Thread::kVMInterrupt);
+    stack_limit = IsolateTestHelper::GetStackLimit(thread);
+    EXPECT_NE(stack_limit, IsolateTestHelper::GetSavedStackLimit(thread));
+    EXPECT((stack_limit & Thread::kVMInterrupt) != 0);
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterruptsMask(isolate));
+              IsolateTestHelper::GetDeferredInterruptsMask(thread));
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterrupts(isolate));
+              IsolateTestHelper::GetDeferredInterrupts(thread));
 
     // Clear the vm interrupt.  Message is still deferred.
-    interrupt_bits = isolate->GetAndClearInterrupts();
+    interrupt_bits = thread->GetAndClearInterrupts();
     EXPECT_EQ(kVMInterrupt, interrupt_bits);
-    EXPECT_EQ(IsolateTestHelper::GetStackLimit(isolate),
-              IsolateTestHelper::GetSavedStackLimit(isolate));
+    EXPECT_EQ(IsolateTestHelper::GetStackLimit(thread),
+              IsolateTestHelper::GetSavedStackLimit(thread));
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterruptsMask(isolate));
+              IsolateTestHelper::GetDeferredInterruptsMask(thread));
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterrupts(isolate));
+              IsolateTestHelper::GetDeferredInterrupts(thread));
   }
 
   // Restore message interrupts.  Message is now pending.
-  stack_limit = IsolateTestHelper::GetStackLimit(isolate);
-  EXPECT_NE(stack_limit, IsolateTestHelper::GetSavedStackLimit(isolate));
-  EXPECT((stack_limit & Isolate::kMessageInterrupt) != 0);
-  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterruptsMask(isolate));
-  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterrupts(isolate));
+  stack_limit = IsolateTestHelper::GetStackLimit(thread);
+  EXPECT_NE(stack_limit, IsolateTestHelper::GetSavedStackLimit(thread));
+  EXPECT((stack_limit & Thread::kMessageInterrupt) != 0);
+  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterruptsMask(thread));
+  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterrupts(thread));
 
   {
     // Defer message interrupts, again.  The pending interrupt is deferred.
-    NoOOBMessageScope no_msg_scope(Thread::Current());
-    EXPECT_EQ(IsolateTestHelper::GetStackLimit(isolate),
-              IsolateTestHelper::GetSavedStackLimit(isolate));
+    NoOOBMessageScope no_msg_scope(thread);
+    EXPECT_EQ(IsolateTestHelper::GetStackLimit(thread),
+              IsolateTestHelper::GetSavedStackLimit(thread));
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterruptsMask(isolate));
+              IsolateTestHelper::GetDeferredInterruptsMask(thread));
     EXPECT_EQ(kMessageInterrupt,
-              IsolateTestHelper::GetDeferredInterrupts(isolate));
+              IsolateTestHelper::GetDeferredInterrupts(thread));
   }
 
   // Restore, then clear interrupts.  The world is as it was.
-  interrupt_bits = isolate->GetAndClearInterrupts();
+  interrupt_bits = thread->GetAndClearInterrupts();
   EXPECT_EQ(kMessageInterrupt, interrupt_bits);
-  EXPECT_EQ(IsolateTestHelper::GetStackLimit(isolate),
-            IsolateTestHelper::GetSavedStackLimit(isolate));
-  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterruptsMask(isolate));
-  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterrupts(isolate));
+  EXPECT_EQ(IsolateTestHelper::GetStackLimit(thread),
+            IsolateTestHelper::GetSavedStackLimit(thread));
+  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterruptsMask(thread));
+  EXPECT_EQ(kZero, IsolateTestHelper::GetDeferredInterrupts(thread));
 }
 
 }  // namespace dart
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc
index f5f2211..8a22c85 100644
--- a/runtime/vm/jit_optimizer.cc
+++ b/runtime/vm/jit_optimizer.cc
@@ -96,6 +96,7 @@
     // to megamorphic call.
     return false;
   }
+
   GrowableArray<intptr_t> class_ids(call->ic_data()->NumArgsTested());
   ASSERT(call->ic_data()->NumArgsTested() <= call->ArgumentCount());
   for (intptr_t i = 0; i < call->ic_data()->NumArgsTested(); i++) {
@@ -249,10 +250,12 @@
   }
 
   const bool with_checks = false;
+  const bool complete = false;
   PolymorphicInstanceCallInstr* specialized =
       new(Z) PolymorphicInstanceCallInstr(call->instance_call(),
                                           ic_data,
-                                          with_checks);
+                                          with_checks,
+                                          complete);
   call->ReplaceWith(specialized, current_iterator());
 }
 
@@ -1283,40 +1286,6 @@
 }
 
 
-// Use CHA to determine if the call needs a class check: if the callee's
-// receiver is the same as the caller's receiver and there are no overriden
-// callee functions, then no class check is needed.
-bool JitOptimizer::InstanceCallNeedsClassCheck(
-    InstanceCallInstr* call, RawFunction::Kind kind) const {
-  if (!FLAG_use_cha_deopt && !isolate()->all_classes_finalized()) {
-    // Even if class or function are private, lazy class finalization
-    // may later add overriding methods.
-    return true;
-  }
-  Definition* callee_receiver = call->ArgumentAt(0);
-  ASSERT(callee_receiver != NULL);
-  const Function& function = flow_graph_->function();
-  if (function.IsDynamicFunction() &&
-      callee_receiver->IsParameter() &&
-      (callee_receiver->AsParameter()->index() == 0)) {
-    const String& name = (kind == RawFunction::kMethodExtractor)
-        ? String::Handle(Z, Field::NameFromGetter(call->function_name()))
-        : call->function_name();
-    const Class& cls = Class::Handle(Z, function.Owner());
-    if (!thread()->cha()->HasOverride(cls, name)) {
-      if (FLAG_trace_cha) {
-        THR_Print("  **(CHA) Instance call needs no check, "
-            "no overrides of '%s' '%s'\n",
-            name.ToCString(), cls.ToCString());
-      }
-      thread()->cha()->AddToLeafClasses(cls);
-      return false;
-    }
-  }
-  return true;
-}
-
-
 bool JitOptimizer::InlineImplicitInstanceGetter(InstanceCallInstr* call) {
   ASSERT(call->HasICData());
   const ICData& ic_data = *call->ic_data();
@@ -1331,7 +1300,8 @@
       Field::ZoneHandle(Z, GetField(class_ids[0], field_name));
   ASSERT(!field.IsNull());
 
-  if (InstanceCallNeedsClassCheck(call, RawFunction::kImplicitGetter)) {
+  if (flow_graph()->InstanceCallNeedsClassCheck(
+          call, RawFunction::kImplicitGetter)) {
     AddReceiverCheck(call);
   }
   LoadFieldInstr* load = new(Z) LoadFieldInstr(
@@ -2690,14 +2660,12 @@
       return;
     }
   }
-  const String& dst_name = String::ZoneHandle(Z,
-      Symbols::New(Exceptions::kCastErrorDstName));
   AssertAssignableInstr* assert_as =
       new(Z) AssertAssignableInstr(call->token_pos(),
                                    new(Z) Value(left),
                                    new(Z) Value(type_args),
                                    type,
-                                   dst_name,
+                                   Symbols::InTypeCast(),
                                    call->deopt_id());
   ReplaceCall(call, assert_as);
 }
@@ -2725,11 +2693,14 @@
   const ICData& unary_checks =
       ICData::ZoneHandle(Z, instr->ic_data()->AsUnaryClassChecks());
 
+  const bool is_dense = CheckClassInstr::IsDenseCidRange(unary_checks);
   const intptr_t max_checks = (op_kind == Token::kEQ)
       ? FLAG_max_equality_polymorphic_checks
       : FLAG_max_polymorphic_checks;
   if ((unary_checks.NumberOfChecks() > max_checks) &&
-      InstanceCallNeedsClassCheck(instr, RawFunction::kRegularFunction)) {
+      !is_dense &&
+      flow_graph()->InstanceCallNeedsClassCheck(
+          instr, RawFunction::kRegularFunction)) {
     // Too many checks, it will be megamorphic which needs unary checks.
     instr->set_ic_data(&unary_checks);
     return;
@@ -2784,16 +2755,18 @@
   if (has_one_target) {
     RawFunction::Kind function_kind =
         Function::Handle(Z, unary_checks.GetTargetAt(0)).kind();
-    if (!InstanceCallNeedsClassCheck(instr, function_kind)) {
+    if (!flow_graph()->InstanceCallNeedsClassCheck(instr, function_kind)) {
       PolymorphicInstanceCallInstr* call =
           new(Z) PolymorphicInstanceCallInstr(instr, unary_checks,
-                                              /* call_with_checks = */ false);
+                                              /* call_with_checks = */ false,
+                                              /* complete = */ false);
       instr->ReplaceWith(call, current_iterator());
       return;
     }
   }
 
-  if (unary_checks.NumberOfChecks() <= FLAG_max_polymorphic_checks) {
+  if ((unary_checks.NumberOfChecks() <= FLAG_max_polymorphic_checks) ||
+      (has_one_target && is_dense)) {
     bool call_with_checks;
     if (has_one_target && FLAG_polymorphic_with_deopt) {
       // Type propagation has not run yet, we cannot eliminate the check.
@@ -2805,7 +2778,8 @@
     }
     PolymorphicInstanceCallInstr* call =
         new(Z) PolymorphicInstanceCallInstr(instr, unary_checks,
-                                            call_with_checks);
+                                            call_with_checks,
+                                            /* complete = */ false);
     instr->ReplaceWith(call, current_iterator());
   }
 }
@@ -3116,10 +3090,12 @@
       Field::ZoneHandle(Z, GetField(class_id, field_name));
   ASSERT(!field.IsNull());
 
-  if (InstanceCallNeedsClassCheck(instr, RawFunction::kImplicitSetter)) {
+  if (flow_graph()->InstanceCallNeedsClassCheck(
+          instr, RawFunction::kImplicitSetter)) {
     AddReceiverCheck(instr);
   }
   if (field.guarded_cid() != kDynamicCid) {
+    ASSERT(FLAG_use_field_guards);
     InsertBefore(instr,
                  new(Z) GuardFieldClassInstr(
                      new(Z) Value(instr->ArgumentAt(1)),
@@ -3130,6 +3106,7 @@
   }
 
   if (field.needs_length_check()) {
+    ASSERT(FLAG_use_field_guards);
     InsertBefore(instr,
                  new(Z) GuardFieldLengthInstr(
                      new(Z) Value(instr->ArgumentAt(1)),
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 94928ab..a721c7e 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -20,6 +20,23 @@
 
 #ifndef PRODUCT
 
+void AppendJSONStreamConsumer(Dart_StreamConsumer_State state,
+                              const char* stream_name,
+                              const uint8_t* buffer,
+                              intptr_t buffer_length,
+                              void* user_data) {
+  if ((state == Dart_StreamConsumer_kStart) ||
+      (state == Dart_StreamConsumer_kFinish)) {
+    // Ignore.
+    return;
+  }
+  ASSERT(state == Dart_StreamConsumer_kData);
+  JSONStream* js = reinterpret_cast<JSONStream*>(user_data);
+  ASSERT(js != NULL);
+  js->AppendSerializedObject(buffer, buffer_length);
+}
+
+
 DECLARE_FLAG(bool, trace_service);
 
 JSONStream::JSONStream(intptr_t buf_size)
@@ -263,6 +280,11 @@
 }
 
 
+void JSONStream::AppendSerializedObject(const uint8_t* buffer,
+                                        intptr_t buffer_length) {
+  buffer_.AddRaw(buffer, buffer_length);
+}
+
 void JSONStream::AppendSerializedObject(const char* property_name,
                                         const char* serialized_object) {
   PrintCommaIfNeeded();
@@ -475,12 +497,18 @@
 }
 
 
-void JSONStream::PrintValue(TimelineEvent* timeline_event) {
+void JSONStream::PrintValue(const TimelineEvent* timeline_event) {
   PrintCommaIfNeeded();
   timeline_event->PrintJSON(this);
 }
 
 
+void JSONStream::PrintValue(const TimelineEventBlock* timeline_event_block) {
+  PrintCommaIfNeeded();
+  timeline_event_block->PrintJSON(this);
+}
+
+
 void JSONStream::PrintValueVM(bool ref) {
   PrintCommaIfNeeded();
   Service::PrintJSONForVM(this, ref);
@@ -593,12 +621,19 @@
 
 
 void JSONStream::PrintProperty(const char* name,
-                               TimelineEvent* timeline_event) {
+                               const TimelineEvent* timeline_event) {
   PrintPropertyName(name);
   PrintValue(timeline_event);
 }
 
 
+void JSONStream::PrintProperty(const char* name,
+                               const TimelineEventBlock* timeline_event_block) {
+  PrintPropertyName(name);
+  PrintValue(timeline_event_block);
+}
+
+
 void JSONStream::PrintfProperty(const char* name, const char* format, ...) {
   PrintPropertyName(name);
   va_list args;
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 8c145681..5b020b0 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -29,6 +29,7 @@
 class ServiceEvent;
 class String;
 class TimelineEvent;
+class TimelineEventBlock;
 class Zone;
 
 
@@ -54,6 +55,12 @@
   kIsolateMustBeRunnable   = 105,
 };
 
+// Expected that user_data is a JSONStream*.
+void AppendJSONStreamConsumer(Dart_StreamConsumer_State state,
+                              const char* stream_name,
+                              const uint8_t* buffer,
+                              intptr_t buffer_length,
+                              void* user_data);
 
 class JSONStream : ValueObject {
  public:
@@ -128,6 +135,12 @@
   // Append |serialized_object| to the stream.
   void AppendSerializedObject(const char* serialized_object);
 
+  void PrintCommaIfNeeded();
+
+  // Append |buffer| to the stream.
+  void AppendSerializedObject(const uint8_t* buffer,
+                              intptr_t buffer_length);
+
   // Append |serialized_object| to the stream with |property_name|.
   void AppendSerializedObject(const char* property_name,
                               const char* serialized_object);
@@ -162,7 +175,8 @@
   void PrintValue(MessageQueue* queue);
   void PrintValue(Isolate* isolate, bool ref = true);
   bool PrintValueStr(const String& s, intptr_t offset, intptr_t count);
-  void PrintValue(TimelineEvent* timeline_event);
+  void PrintValue(const TimelineEvent* timeline_event);
+  void PrintValue(const TimelineEventBlock* timeline_event_block);
   void PrintValueVM(bool ref = true);
 
   void PrintServiceId(const Object& o);
@@ -189,10 +203,11 @@
   void PrintProperty(const char* name, Metric* metric);
   void PrintProperty(const char* name, MessageQueue* queue);
   void PrintProperty(const char* name, Isolate* isolate);
-  void PrintProperty(const char* name, TimelineEvent* timeline_event);
+  void PrintProperty(const char* name, const TimelineEvent* timeline_event);
+  void PrintProperty(const char* name,
+                     const TimelineEventBlock* timeline_event_block);
   void PrintPropertyVM(const char* name, bool ref = true);
   void PrintPropertyName(const char* name);
-  void PrintCommaIfNeeded();
   bool NeedComma();
 
   bool AddDartString(const String& s, intptr_t offset, intptr_t count);
@@ -309,9 +324,14 @@
   void AddProperty(const char* name, Isolate* isolate) const {
     stream_->PrintProperty(name, isolate);
   }
-  void AddProperty(const char* name, TimelineEvent* timeline_event) const {
+  void AddProperty(const char* name,
+                   const TimelineEvent* timeline_event) const {
     stream_->PrintProperty(name, timeline_event);
   }
+  void AddProperty(const char* name,
+                   const TimelineEventBlock* timeline_event_block) const {
+    stream_->PrintProperty(name, timeline_event_block);
+  }
   void AddPropertyVM(const char* name, bool ref = true) const {
     stream_->PrintPropertyVM(name, ref);
   }
@@ -376,9 +396,12 @@
   void AddValue(MessageQueue* queue) const {
     stream_->PrintValue(queue);
   }
-  void AddValue(TimelineEvent* timeline_event) const {
+  void AddValue(const TimelineEvent* timeline_event) const {
     stream_->PrintValue(timeline_event);
   }
+  void AddValue(const TimelineEventBlock* timeline_event_block) const {
+    stream_->PrintValue(timeline_event_block);
+  }
   void AddValueVM(bool ref = true) const {
     stream_->PrintValueVM(ref);
   }
diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc
index 7c5b49f..e8c4f5d 100644
--- a/runtime/vm/json_test.cc
+++ b/runtime/vm/json_test.cc
@@ -315,6 +315,33 @@
   EXPECT(!js.ParamIs("dog", "banana"));
 }
 
+
+TEST_CASE(JSON_JSONStream_AppendJSONStreamConsumer) {
+  JSONStream js;
+
+  {
+    JSONObject obj(&js);
+    {
+      JSONArray arr(&obj, "test");
+      const char* test_data = "{a, b, c},";
+      AppendJSONStreamConsumer(Dart_StreamConsumer_kData, "",
+                               reinterpret_cast<const uint8_t*>(&test_data[0]),
+                               strlen(test_data),
+                               &js);
+      AppendJSONStreamConsumer(Dart_StreamConsumer_kData, "",
+                               reinterpret_cast<const uint8_t*>(&test_data[0]),
+                               strlen(test_data),
+                               &js);
+      AppendJSONStreamConsumer(Dart_StreamConsumer_kData, "",
+                               reinterpret_cast<const uint8_t*>(&test_data[0]),
+                               strlen(test_data) - 1,
+                               &js);
+    }
+  }
+
+  EXPECT_STREQ("{\"test\":[{a, b, c},{a, b, c},{a, b, c}]}", js.ToCString());
+}
+
 #endif  // !PRODUCT
 
 }  // namespace dart
diff --git a/runtime/vm/longjump.cc b/runtime/vm/longjump.cc
index 13e0133..2bc7e31 100644
--- a/runtime/vm/longjump.cc
+++ b/runtime/vm/longjump.cc
@@ -26,7 +26,7 @@
   // We do not want to jump past Dart frames.  Note that this code
   // assumes the stack grows from high to low.
   Thread* thread = Thread::Current();
-  uword jumpbuf_addr = Isolate::GetCurrentStackPointer();
+  uword jumpbuf_addr = Thread::GetCurrentStackPointer();
 #if defined(USING_SIMULATOR)
   Simulator* sim = Simulator::Current();
   // When using simulator, only mutator thread should refer to Simulator
diff --git a/runtime/vm/megamorphic_cache_table.cc b/runtime/vm/megamorphic_cache_table.cc
index 6c4ccf1..b793d35 100644
--- a/runtime/vm/megamorphic_cache_table.cc
+++ b/runtime/vm/megamorphic_cache_table.cc
@@ -61,7 +61,7 @@
   // it is considered in the search for an exception handler.
   code.set_exception_handlers(Object::empty_exception_handlers());
   const Class& cls =
-      Class::Handle(Type::Handle(Type::Function()).type_class());
+      Class::Handle(Type::Handle(Type::DartFunctionType()).type_class());
   const Function& function =
       Function::Handle(Function::New(Symbols::MegamorphicMiss(),
                                      RawFunction::kRegularFunction,
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index c1a9980..8784651 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -15,7 +15,6 @@
 
 namespace dart {
 
-DECLARE_FLAG(bool, trace_isolates);
 DECLARE_FLAG(bool, trace_service_pause_events);
 
 class MessageHandlerTask : public ThreadPool::Task {
@@ -325,7 +324,7 @@
     MonitorLocker ml(&monitor_);
     if (ShouldPauseOnStart(kOK)) {
       if (!is_paused_on_start()) {
-        PausedOnStartLocked(true);
+        PausedOnStartLocked(&ml, true);
       }
       // More messages may have come in before we (re)acquired the monitor.
       status = HandleMessages(&ml, false, false);
@@ -335,7 +334,7 @@
         task_ = NULL;  // No task in queue.
         return;
       } else {
-        PausedOnStartLocked(false);
+        PausedOnStartLocked(&ml, false);
       }
     }
 
@@ -368,7 +367,7 @@
             OS::PrintErr("Isolate %s paused before exiting. "
                          "Use the Observatory to release it.\n", name());
           }
-          PausedOnExitLocked(true);
+          PausedOnExitLocked(&ml, true);
           // More messages may have come in while we released the monitor.
           status = HandleMessages(&ml, false, false);
         }
@@ -378,11 +377,11 @@
           task_ = NULL;  // No task in queue.
           return;
         } else {
-          PausedOnExitLocked(false);
+          PausedOnExitLocked(&ml, false);
         }
       }
       if (FLAG_trace_isolates) {
-        if (status != kOK && isolate() != NULL) {
+        if (status != kOK && thread() != NULL) {
           const Error& error = Error::Handle(thread()->sticky_error());
           OS::Print("[-] Stopping message handler (%s):\n"
                     "\thandler:    %s\n"
@@ -454,11 +453,11 @@
 
 void MessageHandler::PausedOnStart(bool paused) {
   MonitorLocker ml(&monitor_);
-  PausedOnStartLocked(paused);
+  PausedOnStartLocked(&ml, paused);
 }
 
 
-void MessageHandler::PausedOnStartLocked(bool paused) {
+void MessageHandler::PausedOnStartLocked(MonitorLocker* ml, bool paused) {
   if (paused) {
     ASSERT(!is_paused_on_start_);
     is_paused_on_start_ = true;
@@ -473,9 +472,9 @@
     // NotifyPauseOnStart.  This avoids a dead lock that can occur
     // when this message handler tries to post a message while a
     // message is being posted to it.
-    monitor_.Exit();
+    ml->Exit();
     NotifyPauseOnStart();
-    monitor_.Enter();
+    ml->Enter();
   } else {
     // Resumed. Clear the resume request of the owning isolate.
     Isolate* owning_isolate = isolate();
@@ -488,11 +487,11 @@
 
 void MessageHandler::PausedOnExit(bool paused) {
   MonitorLocker ml(&monitor_);
-  PausedOnExitLocked(paused);
+  PausedOnExitLocked(&ml, paused);
 }
 
 
-void MessageHandler::PausedOnExitLocked(bool paused) {
+void MessageHandler::PausedOnExitLocked(MonitorLocker* ml, bool paused) {
   if (paused) {
     ASSERT(!is_paused_on_exit_);
     is_paused_on_exit_ = true;
@@ -507,9 +506,9 @@
     // NotifyPauseOnExit.  This avoids a dead lock that can
     // occur when this message handler tries to post a message
     // while a message is being posted to it.
-    monitor_.Exit();
+    ml->Exit();
     NotifyPauseOnExit();
-    monitor_.Enter();
+    ml->Enter();
   } else {
     // Resumed. Clear the resume request of the owning isolate.
     Isolate* owning_isolate = isolate();
@@ -520,38 +519,16 @@
 }
 
 
-MessageHandler::AcquiredQueues::AcquiredQueues()
-    : handler_(NULL) {
+MessageHandler::AcquiredQueues::AcquiredQueues(MessageHandler* handler)
+    : handler_(handler), ml_(&handler->monitor_) {
+  ASSERT(handler != NULL);
+  handler_->oob_message_handling_allowed_ = false;
 }
 
 
 MessageHandler::AcquiredQueues::~AcquiredQueues() {
-  Reset(NULL);
-}
-
-
-void MessageHandler::AcquiredQueues::Reset(MessageHandler* handler) {
-  if (handler_ != NULL) {
-    // Release ownership. The OOB flag is set without holding the monitor.
-    handler_->monitor_.Exit();
-    handler_->oob_message_handling_allowed_ = true;
-  }
-  handler_ = handler;
-  if (handler_ == NULL) {
-    return;
-  }
   ASSERT(handler_ != NULL);
-  // Take ownership. The OOB flag is set without holding the monitor.
-  handler_->oob_message_handling_allowed_ = false;
-  handler_->monitor_.Enter();
-}
-
-
-void MessageHandler::AcquireQueues(AcquiredQueues* acquired_queues) {
-  ASSERT(acquired_queues != NULL);
-  // No double dipping.
-  ASSERT(acquired_queues->handler_ == NULL);
-  acquired_queues->Reset(this);
+  handler_->oob_message_handling_allowed_ = true;
 }
 
 }  // namespace dart
diff --git a/runtime/vm/message_handler.h b/runtime/vm/message_handler.h
index 6f01328..1d039c5 100644
--- a/runtime/vm/message_handler.h
+++ b/runtime/vm/message_handler.h
@@ -6,15 +6,13 @@
 #define VM_MESSAGE_HANDLER_H_
 
 #include "vm/isolate.h"
+#include "vm/lockers.h"
 #include "vm/message.h"
 #include "vm/os_thread.h"
 #include "vm/thread_pool.h"
 
 namespace dart {
 
-// Forward declarations.
-class MonitorLocker;
-
 // A MessageHandler is an entity capable of accepting messages.
 class MessageHandler {
  protected:
@@ -122,9 +120,12 @@
   void PausedOnStart(bool paused);
   void PausedOnExit(bool paused);
 
+  // Gives temporary ownership of |queue| and |oob_queue|. Using this object
+  // has the side effect that no OOB messages will be handled if a stack
+  // overflow interrupt is delivered.
   class AcquiredQueues : public ValueObject {
    public:
-    AcquiredQueues();
+    explicit AcquiredQueues(MessageHandler* handler);
 
     ~AcquiredQueues();
 
@@ -143,18 +144,12 @@
     }
 
    private:
-    void Reset(MessageHandler* handler);
-
     MessageHandler* handler_;
+    SafepointMonitorLocker ml_;
 
     friend class MessageHandler;
   };
 
-  // Gives temporary ownership of |queue| and |oob_queue|. Calling this
-  // has the side effect that no OOB messages will be handled if a stack
-  // overflow interrupt is delivered.
-  void AcquireQueues(AcquiredQueues* acquired_queue);
-
 #if defined(DEBUG)
   // Check that it is safe to access this message handler.
   //
@@ -218,8 +213,8 @@
 
   // NOTE: These two functions release and reacquire the monitor, you may
   // need to call HandleMessages to ensure all pending messages are handled.
-  void PausedOnStartLocked(bool paused);
-  void PausedOnExitLocked(bool paused);
+  void PausedOnStartLocked(MonitorLocker* ml, bool paused);
+  void PausedOnExitLocked(MonitorLocker* ml, bool paused);
 
   // Dequeue the next message.  Prefer messages from the oob_queue_ to
   // messages from the queue_.
diff --git a/runtime/vm/message_handler_test.cc b/runtime/vm/message_handler_test.cc
index 314eb7c..e6a39a6 100644
--- a/runtime/vm/message_handler_test.cc
+++ b/runtime/vm/message_handler_test.cc
@@ -165,8 +165,7 @@
   EXPECT(!handler.HasOOBMessages());
   {
     // Acquire ownership of message handler queues, verify one regular message.
-    MessageHandler::AcquiredQueues aq;
-    handler.AcquireQueues(&aq);
+    MessageHandler::AcquiredQueues aq(&handler);
     EXPECT(aq.queue()->Length() == 1);
   }
 
@@ -177,8 +176,7 @@
   {
     // Acquire ownership of message handler queues, verify one regular and one
     // OOB message.
-    MessageHandler::AcquiredQueues aq;
-    handler.AcquireQueues(&aq);
+    MessageHandler::AcquiredQueues aq(&handler);
     EXPECT(aq.queue()->Length() == 1);
     EXPECT(aq.oob_queue()->Length() == 1);
   }
@@ -308,8 +306,7 @@
   EXPECT_EQ(port3, ports[1]);  // oob_message2, shutdown
   {
     // The oob queue has been cleared.  oob_message3 is gone.
-    MessageHandler::AcquiredQueues aq;
-    handler.AcquireQueues(&aq);
+    MessageHandler::AcquiredQueues aq(&handler);
     EXPECT(aq.oob_queue()->Length() == 0);
   }
   handler_peer.CloseAllPorts();
diff --git a/runtime/vm/method_recognizer.h b/runtime/vm/method_recognizer.h
index 87a524e..7efa6e7 100644
--- a/runtime/vm/method_recognizer.h
+++ b/runtime/vm/method_recognizer.h
@@ -43,106 +43,94 @@
   V(_IntegerImplementation, toDouble, IntegerToDouble, 150718448)              \
   V(_IntegerImplementation, _leftShiftWithMask32,                              \
       IntegerLeftShiftWithMask32, 1634465017)                                  \
-  V(_Double, truncateToDouble, DoubleTruncate, 791143891)                      \
-  V(_Double, roundToDouble, DoubleRound, 797558034)                            \
-  V(_Double, floorToDouble, DoubleFloor, 1789426271)                           \
-  V(_Double, ceilToDouble, DoubleCeil, 453271198)                              \
-  V(_Double, _modulo, DoubleMod, 1093862165)                                   \
   V(_Double, _add, DoubleAdd, 1190606283)                                      \
   V(_Double, _sub, DoubleSub, 1086286468)                                      \
   V(_Double, _mul, DoubleMul, 166332351)                                       \
   V(_Double, _div, DoubleDiv, 821396195)                                       \
-  V(::, sin, MathSin, 939048573)                                               \
-  V(::, cos, MathCos, 1148850331)                                              \
-  V(::, tan, MathTan, 179725235)                                               \
-  V(::, asin, MathAsin, 848695059)                                             \
-  V(::, acos, MathAcos, 337299516)                                             \
-  V(::, atan, MathAtan, 866406810)                                             \
-  V(::, atan2, MathAtan2, 1901969510)                                          \
   V(::, min, MathMin, 1115051548)                                              \
   V(::, max, MathMax, 1410473322)                                              \
   V(::, _doublePow, MathDoublePow, 562154128)                                  \
-  V(Float32x4, Float32x4., Float32x4Constructor, 1849420944)                   \
-  V(Float32x4, Float32x4.zero, Float32x4Zero, 762161262)                       \
-  V(Float32x4, Float32x4.splat, Float32x4Splat, 255855286)                     \
-  V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, 1718571366)\
-  V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1458098858)    \
-  V(_Float32x4, shuffle, Float32x4Shuffle, 2015957023)                         \
-  V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 1099087979)                   \
-  V(_Float32x4, get:signMask, Float32x4GetSignMask, 487049875)                 \
-  V(_Float32x4, _cmpequal, Float32x4Equal, 1069901308)                         \
-  V(_Float32x4, _cmpgt, Float32x4GreaterThan, 2112381651)                      \
-  V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1088241265)              \
-  V(_Float32x4, _cmplt, Float32x4LessThan, 2001171012)                         \
-  V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 1568686387)                 \
-  V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1833412828)                     \
-  V(_Float32x4, _min, Float32x4Min, 1194113943)                                \
-  V(_Float32x4, _max, Float32x4Max, 1876936155)                                \
-  V(_Float32x4, _scale, Float32x4Scale, 1176743640)                            \
-  V(_Float32x4, _sqrt, Float32x4Sqrt, 526238610)                               \
-  V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 860560177)           \
-  V(_Float32x4, _reciprocal, Float32x4Reciprocal, 1703468100)                  \
-  V(_Float32x4, _negate, Float32x4Negate, 1409902640)                          \
-  V(_Float32x4, _abs, Float32x4Absolute, 2116840471)                           \
-  V(_Float32x4, _clamp, Float32x4Clamp, 1789892357)                            \
-  V(_Float32x4, withX, Float32x4WithX, 1311992575)                             \
-  V(_Float32x4, withY, Float32x4WithY, 175290640)                              \
-  V(_Float32x4, withZ, Float32x4WithZ, 837367384)                              \
-  V(_Float32x4, withW, Float32x4WithW, 1625145605)                             \
-  V(Float64x2, Float64x2., Float64x2Constructor, 1428850802)                   \
-  V(Float64x2, Float64x2.zero, Float64x2Zero, 29170676)                        \
-  V(Float64x2, Float64x2.splat, Float64x2Splat, 1077183856)                    \
-  V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, 1752000980)    \
-  V(_Float64x2, get:x, Float64x2GetX, 1488958362)                              \
-  V(_Float64x2, get:y, Float64x2GetY, 1022688506)                              \
-  V(_Float64x2, _negate, Float64x2Negate, 960840275)                           \
-  V(_Float64x2, abs, Float64x2Abs, 52403783)                                   \
-  V(_Float64x2, sqrt, Float64x2Sqrt, 2012680669)                               \
-  V(_Float64x2, get:signMask, Float64x2GetSignMask, 668856717)                 \
-  V(_Float64x2, scale, Float64x2Scale, 646122081)                              \
-  V(_Float64x2, withX, Float64x2WithX, 489409269)                              \
-  V(_Float64x2, withY, Float64x2WithY, 943642284)                              \
-  V(_Float64x2, min, Float64x2Min, 685235702)                                  \
-  V(_Float64x2, max, Float64x2Max, 198659675)                                  \
-  V(Int32x4, Int32x4., Int32x4Constructor, 80862812)                           \
-  V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 1949580252)                 \
-  V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, 1611205288)  \
-  V(_Int32x4, get:flagX, Int32x4GetFlagX, 1446544324)                          \
-  V(_Int32x4, get:flagY, Int32x4GetFlagY, 1148149370)                          \
-  V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 550901369)                           \
-  V(_Int32x4, get:flagW, Int32x4GetFlagW, 1346664620)                          \
-  V(_Int32x4, get:signMask, Int32x4GetSignMask, 740215269)                     \
-  V(_Int32x4, shuffle, Int32x4Shuffle, 549194518)                              \
-  V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 1550866145)                       \
-  V(_Int32x4, select, Int32x4Select, 614943686)                                \
-  V(_Int32x4, withFlagX, Int32x4WithFlagX, 250974159)                          \
-  V(_Int32x4, withFlagY, Int32x4WithFlagY, 1686481348)                         \
-  V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 645582330)                          \
-  V(_Int32x4, withFlagW, Int32x4WithFlagW, 878364277)                          \
-  V(_Float32Array, [], Float32ArrayGetIndexed, 1002307136)                     \
-  V(_Float32Array, []=, Float32ArraySetIndexed, 279546769)                     \
-  V(_Int8Array, [], Int8ArrayGetIndexed, 1141846285)                           \
-  V(_Int8Array, []=, Int8ArraySetIndexed, 1486839324)                          \
-  V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 513704632)            \
-  V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 1015846567)          \
+  V(Float32x4, Float32x4., Float32x4Constructor, 93751705)                     \
+  V(Float32x4, Float32x4.zero, Float32x4Zero, 1193954374)                      \
+  V(Float32x4, Float32x4.splat, Float32x4Splat, 12296613)                      \
+  V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, 1188039061)\
+  V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1750763218)    \
+  V(Float32x4, shuffle, Float32x4Shuffle, 2015957023)                          \
+  V(Float32x4, shuffleMix, Float32x4ShuffleMix, 1099087979)                    \
+  V(Float32x4, get:signMask, Float32x4GetSignMask, 487049875)                  \
+  V(Float32x4, _cmpequal, Float32x4Equal, 1069901308)                          \
+  V(Float32x4, _cmpgt, Float32x4GreaterThan, 2112381651)                       \
+  V(Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1088241265)               \
+  V(Float32x4, _cmplt, Float32x4LessThan, 2001171012)                          \
+  V(Float32x4, _cmplte, Float32x4LessThanOrEqual, 1568686387)                  \
+  V(Float32x4, _cmpnequal, Float32x4NotEqual, 1833412828)                      \
+  V(Float32x4, _min, Float32x4Min, 1194113943)                                 \
+  V(Float32x4, _max, Float32x4Max, 1876936155)                                 \
+  V(Float32x4, _scale, Float32x4Scale, 1176743640)                             \
+  V(Float32x4, _sqrt, Float32x4Sqrt, 526238610)                                \
+  V(Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 860560177)            \
+  V(Float32x4, _reciprocal, Float32x4Reciprocal, 1703468100)                   \
+  V(Float32x4, _negate, Float32x4Negate, 1409902640)                           \
+  V(Float32x4, _abs, Float32x4Absolute, 2116840471)                            \
+  V(Float32x4, _clamp, Float32x4Clamp, 1789892357)                             \
+  V(Float32x4, withX, Float32x4WithX, 1311992575)                              \
+  V(Float32x4, withY, Float32x4WithY, 175290640)                               \
+  V(Float32x4, withZ, Float32x4WithZ, 837367384)                               \
+  V(Float32x4, withW, Float32x4WithW, 1625145605)                              \
+  V(Float64x2, Float64x2., Float64x2Constructor, 423355933)                    \
+  V(Float64x2, Float64x2.zero, Float64x2Zero, 2066666975)                      \
+  V(Float64x2, Float64x2.splat, Float64x2Splat, 716962994)                     \
+  V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, 792974246)     \
+  V(Float64x2, get:x, Float64x2GetX, 1488958362)                               \
+  V(Float64x2, get:y, Float64x2GetY, 1022688506)                               \
+  V(Float64x2, _negate, Float64x2Negate, 960840275)                            \
+  V(Float64x2, abs, Float64x2Abs, 52403783)                                    \
+  V(Float64x2, sqrt, Float64x2Sqrt, 2012680669)                                \
+  V(Float64x2, get:signMask, Float64x2GetSignMask, 668856717)                  \
+  V(Float64x2, scale, Float64x2Scale, 646122081)                               \
+  V(Float64x2, withX, Float64x2WithX, 489409269)                               \
+  V(Float64x2, withY, Float64x2WithY, 943642284)                               \
+  V(Float64x2, min, Float64x2Min, 685235702)                                   \
+  V(Float64x2, max, Float64x2Max, 198659675)                                   \
+  V(Int32x4, Int32x4., Int32x4Constructor, 649173415)                          \
+  V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 458597857)                  \
+  V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, 2122470988)  \
+  V(Int32x4, get:flagX, Int32x4GetFlagX, 1446544324)                           \
+  V(Int32x4, get:flagY, Int32x4GetFlagY, 1148149370)                           \
+  V(Int32x4, get:flagZ, Int32x4GetFlagZ, 550901369)                            \
+  V(Int32x4, get:flagW, Int32x4GetFlagW, 1346664620)                           \
+  V(Int32x4, get:signMask, Int32x4GetSignMask, 740215269)                      \
+  V(Int32x4, shuffle, Int32x4Shuffle, 549194518)                               \
+  V(Int32x4, shuffleMix, Int32x4ShuffleMix, 1550866145)                        \
+  V(Int32x4, select, Int32x4Select, 614943686)                                 \
+  V(Int32x4, withFlagX, Int32x4WithFlagX, 250974159)                           \
+  V(Int32x4, withFlagY, Int32x4WithFlagY, 1686481348)                          \
+  V(Int32x4, withFlagZ, Int32x4WithFlagZ, 645582330)                           \
+  V(Int32x4, withFlagW, Int32x4WithFlagW, 878364277)                           \
+  V(Float32List, [], Float32ArrayGetIndexed, 1002307136)                       \
+  V(Float32List, []=, Float32ArraySetIndexed, 279546769)                       \
+  V(Int8List, [], Int8ArrayGetIndexed, 1141846285)                             \
+  V(Int8List, []=, Int8ArraySetIndexed, 1486839324)                            \
+  V(Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 513704632)              \
+  V(Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 1015846567)            \
   V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed,       \
     513704632)                                                                 \
   V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed,      \
     1015846567)                                                                \
-  V(_Int16Array, [], Int16ArrayGetIndexed, 1826359619)                         \
-  V(_Int16Array, []=, Int16ArraySetIndexed, 1108689116)                        \
-  V(_Uint16Array, [], Uint16ArrayGetIndexed, 118958722)                        \
-  V(_Uint16Array, []=, Uint16ArraySetIndexed, 658824450)                       \
-  V(_Int32Array, [], Int32ArrayGetIndexed, 681203163)                          \
-  V(_Int32Array, []=, Int32ArraySetIndexed, 1786886245)                        \
-  V(_Int64Array, [], Int64ArrayGetIndexed, 1883155004)                         \
-  V(_Int64Array, []=, Int64ArraySetIndexed, 905815059)                         \
-  V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 694822356)                  \
-  V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1166109127)                \
-  V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 668249259)                      \
-  V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 654739449)                     \
-  V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 196472005)                  \
-  V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 1421858500)                \
+  V(Int16List, [], Int16ArrayGetIndexed, 1826359619)                           \
+  V(Int16List, []=, Int16ArraySetIndexed, 1108689116)                          \
+  V(Uint16List, [], Uint16ArrayGetIndexed, 118958722)                          \
+  V(Uint16List, []=, Uint16ArraySetIndexed, 658824450)                         \
+  V(Int32List, [], Int32ArrayGetIndexed, 681203163)                            \
+  V(Int32List, []=, Int32ArraySetIndexed, 1786886245)                          \
+  V(Int64List, [], Int64ArrayGetIndexed, 1883155004)                           \
+  V(Int64List, []=, Int64ArraySetIndexed, 905815059)                           \
+  V(Float32x4List, [], Float32x4ArrayGetIndexed, 694822356)                    \
+  V(Float32x4List, []=, Float32x4ArraySetIndexed, 1166109127)                  \
+  V(Int32x4List, [], Int32x4ArrayGetIndexed, 668249259)                        \
+  V(Int32x4List, []=, Int32x4ArraySetIndexed, 654739449)                       \
+  V(Float64x2List, [], Float64x2ArrayGetIndexed, 196472005)                    \
+  V(Float64x2List, []=, Float64x2ArraySetIndexed, 1421858500)                  \
   V(_Bigint, get:_neg, Bigint_getNeg, 1681019799)                              \
   V(_Bigint, get:_used, Bigint_getUsed, 1439136438)                            \
   V(_Bigint, get:_digits, Bigint_getDigits, 769722770)                         \
@@ -187,7 +175,7 @@
   V(_List, []=, ObjectArraySetIndexed, 886228780)                              \
   V(_GrowableList, .withData, GrowableArray_Allocate, 131424500)               \
   V(_GrowableList, add, GrowableArray_add, 242296201)                          \
-  V(_JSSyntaxRegExp, _ExecuteMatch, JSRegExp_ExecuteMatch, 1490503678)         \
+  V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 2077783530)                   \
   V(Object, ==, ObjectEquals, 291909336)                                       \
   V(Object, get:runtimeType, ObjectRuntimeType, 15188587)                      \
   V(_StringBase, get:hashCode, String_getHashCode, 2026040200)                 \
@@ -243,54 +231,48 @@
   V(::, sqrt, MathSqrt, 1446681622)                                            \
   V(_Random, _nextState, Random_nextState, 1241583299)                         \
 
+#define GRAPH_MATH_LIB_INTRINSIC_LIST(V)                                       \
+  V(::, sin, MathSin, 939048573)                                               \
+  V(::, cos, MathCos, 1148850331)                                              \
+  V(::, tan, MathTan, 179725235)                                               \
+  V(::, asin, MathAsin, 848695059)                                             \
+  V(::, acos, MathAcos, 337299516)                                             \
+  V(::, atan, MathAtan, 866406810)                                             \
+  V(::, atan2, MathAtan2, 1901969510)                                          \
 
 #define TYPED_DATA_LIB_INTRINSIC_LIST(V)                                       \
-  V(_Int8Array, _new, TypedData_Int8Array_new, 1025382728)                     \
-  V(_Uint8Array, _new, TypedData_Uint8Array_new, 1772090315)                   \
-  V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 1817995920)     \
-  V(_Int16Array, _new, TypedData_Int16Array_new, 857482727)                    \
-  V(_Uint16Array, _new, TypedData_Uint16Array_new, 224498043)                  \
-  V(_Int32Array, _new, TypedData_Int32Array_new, 662785062)                    \
-  V(_Uint32Array, _new, TypedData_Uint32Array_new, 457777042)                  \
-  V(_Int64Array, _new, TypedData_Int64Array_new, 11424776)                     \
-  V(_Uint64Array, _new, TypedData_Uint64Array_new, 580841705)                  \
-  V(_Float32Array, _new, TypedData_Float32Array_new, 141243383)                \
-  V(_Float64Array, _new, TypedData_Float64Array_new, 2054234881)               \
-  V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 1277009760)           \
-  V(_Int32x4Array, _new, TypedData_Int32x4Array_new, 366994774)                \
-  V(_Float64x2Array, _new, TypedData_Float64x2Array_new, 134695262)            \
-  V(_Int8Array, ., TypedData_Int8Array_factory, 484088513)                     \
-  V(_Uint8Array, ., TypedData_Uint8Array_factory, 1830561671)                  \
-  V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 980532456)     \
-  V(_Int16Array, ., TypedData_Int16Array_factory, 2095566414)                  \
-  V(_Uint16Array, ., TypedData_Uint16Array_factory, 248627537)                 \
-  V(_Int32Array, ., TypedData_Int32Array_factory, 836050202)                   \
-  V(_Uint32Array, ., TypedData_Uint32Array_factory, 102123815)                 \
-  V(_Int64Array, ., TypedData_Int64Array_factory, 1820730838)                  \
-  V(_Uint64Array, ., TypedData_Uint64Array_factory, 1668399825)                \
-  V(_Float32Array, ., TypedData_Float32Array_factory, 307228626)               \
-  V(_Float64Array, ., TypedData_Float64Array_factory, 1700923139)              \
-  V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 1083909924)          \
-  V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 803703492)               \
-  V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 944719167)           \
+  V(Int8List, ., TypedData_Int8Array_factory, 779569635)                       \
+  V(Uint8List, ., TypedData_Uint8Array_factory, 1790399545)                    \
+  V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 405875159)       \
+  V(Int16List, ., TypedData_Int16Array_factory, 347431914)                     \
+  V(Uint16List, ., TypedData_Uint16Array_factory, 121990116)                   \
+  V(Int32List, ., TypedData_Int32Array_factory, 1540657744)                    \
+  V(Uint32List, ., TypedData_Uint32Array_factory, 1012511652)                  \
+  V(Int64List, ., TypedData_Int64Array_factory, 1473796807)                    \
+  V(Uint64List, ., TypedData_Uint64Array_factory, 738799620)                   \
+  V(Float32List, ., TypedData_Float32Array_factory, 1938690635)                \
+  V(Float64List, ., TypedData_Float64Array_factory, 1344005361)                \
+  V(Float32x4List, ., TypedData_Float32x4Array_factory, 2055067416)            \
+  V(Int32x4List, ., TypedData_Int32x4Array_factory, 504220232)                 \
+  V(Float64x2List, ., TypedData_Float64x2Array_factory, 416019673)             \
 
 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
-  V(_Uint8Array, [], Uint8ArrayGetIndexed, 513704632)                          \
-  V(_Uint8Array, []=, Uint8ArraySetIndexed, 2123520783)                        \
+  V(Uint8List, [], Uint8ArrayGetIndexed, 513704632)                            \
+  V(Uint8List, []=, Uint8ArraySetIndexed, 2123520783)                          \
   V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 513704632)          \
   V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 2123520783)        \
-  V(_Uint32Array, [], Uint32ArrayGetIndexed, 1179675338)                       \
-  V(_Uint32Array, []=, Uint32ArraySetIndexed, 1455695417)                      \
-  V(_Float64Array, []=, Float64ArraySetIndexed, 1929239576)                    \
-  V(_Float64Array, [], Float64ArrayGetIndexed, 816943529)                      \
+  V(Uint32List, [], Uint32ArrayGetIndexed, 1179675338)                         \
+  V(Uint32List, []=, Uint32ArraySetIndexed, 1455695417)                        \
+  V(Float64List, []=, Float64ArraySetIndexed, 1929239576)                      \
+  V(Float64List, [], Float64ArrayGetIndexed, 816943529)                        \
   V(_TypedList, get:length, TypedDataLength, 546364442)                        \
-  V(_Float32x4, get:x, Float32x4ShuffleX, 1674625343)                          \
-  V(_Float32x4, get:y, Float32x4ShuffleY, 540293915)                           \
-  V(_Float32x4, get:z, Float32x4ShuffleZ, 320347578)                           \
-  V(_Float32x4, get:w, Float32x4ShuffleW, 1770606624)                          \
-  V(_Float32x4, _mul, Float32x4Mul, 861549065)                                 \
-  V(_Float32x4, _sub, Float32x4Sub, 460363214)                                 \
-  V(_Float32x4, _add, Float32x4Add, 1487592255)                                \
+  V(Float32x4, get:x, Float32x4ShuffleX, 1674625343)                           \
+  V(Float32x4, get:y, Float32x4ShuffleY, 540293915)                            \
+  V(Float32x4, get:z, Float32x4ShuffleZ, 320347578)                            \
+  V(Float32x4, get:w, Float32x4ShuffleW, 1770606624)                           \
+  V(Float32x4, _mul, Float32x4Mul, 861549065)                                  \
+  V(Float32x4, _sub, Float32x4Sub, 460363214)                                  \
+  V(Float32x4, _add, Float32x4Add, 1487592255)                                 \
 
 #define GRAPH_CORE_INTRINSICS_LIST(V)                                          \
   V(_List, get:length, ObjectArrayLength, 630471378)                           \
@@ -304,11 +286,18 @@
   V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650)                    \
   V(_GrowableList, []=, GrowableArraySetIndexed, 225246870)                    \
   V(_StringBase, get:length, StringBaseLength, 707533587)                      \
-  V(_Double, unary-, DoubleFlipSignBit, 1783281169)
+  V(_Double, unary-, DoubleFlipSignBit, 1783281169)                            \
+  V(_Double, truncateToDouble, DoubleTruncate, 791143891)                      \
+  V(_Double, roundToDouble, DoubleRound, 797558034)                            \
+  V(_Double, floorToDouble, DoubleFloor, 1789426271)                           \
+  V(_Double, ceilToDouble, DoubleCeil, 453271198)                              \
+  V(_Double, _modulo, DoubleMod, 1093862165)
+
 
 #define GRAPH_INTRINSICS_LIST(V)                                               \
   GRAPH_CORE_INTRINSICS_LIST(V)                                                \
   GRAPH_TYPED_DATA_INTRINSICS_LIST(V)                                          \
+  GRAPH_MATH_LIB_INTRINSIC_LIST(V)                                             \
 
 #define DEVELOPER_LIB_INTRINSIC_LIST(V)                                        \
   V(_UserTag, makeCurrent, UserTag_makeCurrent, 187721469)                     \
@@ -357,24 +346,24 @@
   V(_ImmutableList, [], ImmutableArrayGetIndexed, 360400496)                   \
   V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650)                    \
   V(_GrowableList, []=, GrowableArraySetIndexed, 225246870)                    \
-  V(_Float32Array, [], Float32ArrayGetIndexed, 1002307136)                     \
-  V(_Float32Array, []=, Float32ArraySetIndexed, 279546769)                     \
-  V(_Float64Array, [], Float64ArrayGetIndexed, 816943529)                      \
-  V(_Float64Array, []=, Float64ArraySetIndexed, 1929239576)                    \
-  V(_Int8Array, [], Int8ArrayGetIndexed, 1141846285)                           \
-  V(_Int8Array, []=, Int8ArraySetIndexed, 1486839324)                          \
-  V(_Uint8Array, [], Uint8ArrayGetIndexed, 513704632)                          \
-  V(_Uint8Array, []=, Uint8ArraySetIndexed, 2123520783)                        \
-  V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 513704632)            \
-  V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 1015846567)          \
-  V(_Uint16Array, [], Uint16ArrayGetIndexed, 118958722)                        \
-  V(_Uint16Array, []=, Uint16ArraySetIndexed, 658824450)                       \
-  V(_Int16Array, [], Int16ArrayGetIndexed, 1826359619)                         \
-  V(_Int16Array, []=, Int16ArraySetIndexed, 1108689116)                        \
-  V(_Int32Array, [], Int32ArrayGetIndexed, 681203163)                          \
-  V(_Int32Array, []=, Int32ArraySetIndexed, 1786886245)                        \
-  V(_Int64Array, [], Int64ArrayGetIndexed, 1883155004)                         \
-  V(_Int64Array, []=, Int64ArraySetIndexed, 905815059)                         \
+  V(Float32List, [], Float32ArrayGetIndexed, 1002307136)                       \
+  V(Float32List, []=, Float32ArraySetIndexed, 279546769)                       \
+  V(Float64List, [], Float64ArrayGetIndexed, 816943529)                        \
+  V(Float64List, []=, Float64ArraySetIndexed, 1929239576)                      \
+  V(Int8List, [], Int8ArrayGetIndexed, 1141846285)                             \
+  V(Int8List, []=, Int8ArraySetIndexed, 1486839324)                            \
+  V(Uint8List, [], Uint8ArrayGetIndexed, 513704632)                            \
+  V(Uint8List, []=, Uint8ArraySetIndexed, 2123520783)                          \
+  V(Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 513704632)              \
+  V(Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 1015846567)            \
+  V(Uint16List, [], Uint16ArrayGetIndexed, 118958722)                          \
+  V(Uint16List, []=, Uint16ArraySetIndexed, 658824450)                         \
+  V(Int16List, [], Int16ArrayGetIndexed, 1826359619)                           \
+  V(Int16List, []=, Int16ArraySetIndexed, 1108689116)                          \
+  V(Int32List, [], Int32ArrayGetIndexed, 681203163)                            \
+  V(Int32List, []=, Int32ArraySetIndexed, 1786886245)                          \
+  V(Int64List, [], Int64ArrayGetIndexed, 1883155004)                           \
+  V(Int64List, []=, Int64ArraySetIndexed, 905815059)                           \
   V(_Uint8ArrayView, [], Uint8ArrayViewGetIndexed, 215420949)                  \
   V(_Uint8ArrayView, []=, Uint8ArrayViewSetIndexed, 1138146450)                \
   V(_Int8ArrayView, [], Int8ArrayViewGetIndexed, 1003520035)                   \
@@ -426,20 +415,6 @@
   V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 340628211)          \
   V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 1340385546)   \
   V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 638315987)    \
-  V(Uint8List, ., Uint8ListFactory, 1885328419)                                \
-  V(Int8List, ., Int8ListFactory, 551286096)                                   \
-  V(Uint16List, ., Uint16ListFactory, 2018994846)                              \
-  V(Int16List, ., Int16ListFactory, 1934285336)                                \
-  V(Uint32List, ., Uint32ListFactory, 990865607)                               \
-  V(Int32List, ., Int32ListFactory, 2017670015)                                \
-  V(Uint64List, ., Uint64ListFactory, 1593070032)                              \
-  V(Int64List, ., Int64ListFactory, 1071205588)                                \
-  V(Float32List, ., Float32ListFactory, 1015272745)                            \
-  V(Float64List, ., Float64ListFactory, 626315429)                             \
-  V(Int32x4List, ., Int32x4ListFactory, 1693091079)                            \
-  V(Float32x4List, ., Float32x4ListFactory, 585154381)                         \
-  V(Float64x2List, ., Float64x2ListFactory, 874435184)
-
 
 // A list of core function that should never be inlined.
 #define INLINE_BLACK_LIST(V)                                                   \
@@ -451,6 +426,30 @@
   V(_Bigint, _sqrAdd, Bigint_sqrAdd, 372896038)                                \
   V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 540033329)            \
   V(_Montgomery, _mulMod, Montgomery_mulMod, 118781828)                        \
+  V(_Double, >, Double_greaterThan, 1413076759)                                \
+  V(_Double, >=, Double_greaterEqualThan, 1815180096)                          \
+  V(_Double, <, Double_lessThan, 652059836)                                    \
+  V(_Double, <=, Double_lessEqualThan, 512138528)                              \
+  V(_Double, ==, Double_equal, 752327620)                                      \
+  V(_Double, +, Double_add, 854024064)                                         \
+  V(_Double, -, Double_sub, 685132889)                                         \
+  V(_Double, *, Double_mul, 542254390)                                         \
+  V(_Double, /, Double_div, 1145710768)                                        \
+  V(_IntegerImplementation, +, Integer_add, 364498398)                         \
+  V(_IntegerImplementation, -, Integer_sub, 1682674911)                        \
+  V(_IntegerImplementation, *, Integer_mul, 1651115456)                        \
+  V(_IntegerImplementation, ~/, Integer_truncDivide, 108494012)                \
+  V(_IntegerImplementation, unary-, Integer_negate, 1507648892)                \
+  V(_IntegerImplementation, &, Integer_bitAnd, 286231290)                      \
+  V(_IntegerImplementation, |, Integer_bitOr, 1111108792)                      \
+  V(_IntegerImplementation, ^, Integer_bitXor, 1884808537)                     \
+  V(_IntegerImplementation, >, Integer_greaterThan, 293890061)                 \
+  V(_IntegerImplementation, ==, Integer_equal, 4489308)                        \
+  V(_IntegerImplementation, <, Integer_lessThan, 652059836)                    \
+  V(_IntegerImplementation, <=, Integer_lessEqualThan, 512138528)              \
+  V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1815180096)          \
+  V(_IntegerImplementation, <<, Integer_shl, 293751452)                        \
+  V(_IntegerImplementation, >>, Integer_sar, 125091101)                        \
 
 // A list of core functions that internally dispatch based on received id.
 #define POLYMORPHIC_TARGET_LIST(V)                                             \
@@ -488,7 +487,7 @@
   enum Kind {
     kUnknown,
 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name,
-RECOGNIZED_LIST(DEFINE_ENUM_LIST)
+    RECOGNIZED_LIST(DEFINE_ENUM_LIST)
 #undef DEFINE_ENUM_LIST
     kNumRecognizedMethods
   };
@@ -518,18 +517,18 @@
   V(_ListFactory, kArrayCid, 184405219)                                        \
   V(_GrowableListWithData, kGrowableObjectArrayCid, 131424500)                 \
   V(_GrowableListFactory, kGrowableObjectArrayCid, 664918385)                  \
-  V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 484088513)                      \
-  V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 1830561671)                   \
-  V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 980532456)      \
-  V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 2095566414)                   \
-  V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 248627537)                  \
-  V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 836050202)                    \
-  V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 102123815)                  \
-  V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 1820730838)                   \
-  V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 1668399825)                 \
-  V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 1700923139)               \
-  V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 307228626)                \
-  V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 1083909924)           \
+  V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 779569635)                      \
+  V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 1790399545)                   \
+  V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 405875159)      \
+  V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 347431914)                    \
+  V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 121990116)                  \
+  V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 1540657744)                   \
+  V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 1012511652)                 \
+  V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 1473796807)                   \
+  V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 738799620)                  \
+  V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 1344005361)               \
+  V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 1938690635)               \
+  V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 2055067416)           \
 
 
 // Class that recognizes factories and returns corresponding result cid.
diff --git a/runtime/vm/native_arguments.h b/runtime/vm/native_arguments.h
index af27a37..88bc411 100644
--- a/runtime/vm/native_arguments.h
+++ b/runtime/vm/native_arguments.h
@@ -15,7 +15,6 @@
 namespace dart {
 
 DECLARE_FLAG(bool, trace_natives);
-DECLARE_FLAG(bool, verify_on_transition);
 
 // Forward declarations.
 class BootstrapNatives;
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 300070b..2ce486b 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -38,6 +38,7 @@
 #include "vm/symbols.h"
 #include "vm/tags.h"
 #include "vm/thread_registry.h"
+#include "vm/timeline.h"
 #include "vm/timer.h"
 #include "vm/unicode.h"
 #include "vm/verified_memory.h"
@@ -59,11 +60,11 @@
 DEFINE_FLAG(bool, ignore_patch_signature_mismatch, false,
             "Ignore patch file member signature mismatch.");
 
-DECLARE_FLAG(charp, coverage_dir);
 DECLARE_FLAG(bool, show_invisible_frames);
 DECLARE_FLAG(bool, trace_deoptimization);
 DECLARE_FLAG(bool, trace_deoptimization_verbose);
 DECLARE_FLAG(bool, write_protect_code);
+DECLARE_FLAG(bool, support_externalizable_strings);
 
 
 static const char* const kGetterPrefix = "get:";
@@ -214,7 +215,8 @@
 //   _MyClass@6328321.named -> _MyClass.named
 //
 RawString* String::ScrubName(const String& name) {
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
 
 NOT_IN_PRODUCT(
   if (name.Equals(Symbols::TopLevel())) {
@@ -298,7 +300,7 @@
 
   if ((start == 0) && (dot_pos == -1)) {
     // This unmangled_name is fine as it is.
-    return Symbols::New(unmangled_name, sum_segment_len);
+    return Symbols::New(thread, unmangled_name, sum_segment_len);
   }
 
   // Drop the trailing dot if needed.
@@ -317,7 +319,7 @@
   unmangled_name = MergeSubStrings(zone, unmangled_segments, final_len);
 )
 
-  return Symbols::New(unmangled_name);
+  return Symbols::New(thread, unmangled_name);
 }
 
 
@@ -907,22 +909,14 @@
 // premark all objects in the vm_isolate_ heap.
 class PremarkingVisitor : public ObjectVisitor {
  public:
-  explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {}
+  PremarkingVisitor() { }
 
   void VisitObject(RawObject* obj) {
     // Free list elements should never be marked.
+    ASSERT(!obj->IsMarked());
     if (!obj->IsFreeListElement()) {
       ASSERT(obj->IsVMHeapObject());
-      if (obj->IsMarked()) {
-        // Precompiled objects are loaded pre-marked.
-        ASSERT(Dart::IsRunningPrecompiledCode());
-        ASSERT(obj->IsInstructions() ||
-               obj->IsPcDescriptors() ||
-               obj->IsStackmap() ||
-               obj->IsOneByteString());
-      } else {
-        obj->SetMarkBitUnsynchronized();
-      }
+      obj->SetMarkBitUnsynchronized();
     }
   }
 };
@@ -993,11 +987,10 @@
 
   {
     ASSERT(isolate == Dart::vm_isolate());
-    bool include_code_pages = !Dart::IsRunningPrecompiledCode();
-    WritableVMIsolateScope scope(Thread::Current(), include_code_pages);
-    PremarkingVisitor premarker(isolate);
+    WritableVMIsolateScope scope(Thread::Current());
+    PremarkingVisitor premarker;
     ASSERT(isolate->heap()->UsedInWords(Heap::kNew) == 0);
-    isolate->heap()->IterateOldObjects(&premarker);
+    isolate->heap()->IterateOldObjectsNoEmbedderPages(&premarker);
     // Make the VM isolate read-only again after setting all objects as marked.
   }
 }
@@ -1104,7 +1097,7 @@
   ASSERT(isolate == thread->isolate());
 NOT_IN_PRODUCT(
   TimelineDurationScope tds(thread,
-                            isolate->GetIsolateStream(),
+                            Timeline::GetIsolateStream(),
                             "Object::Init");
 )
 
@@ -1149,8 +1142,6 @@
 
   // Setup type class early in the process.
   const Class& type_cls = Class::Handle(zone, Class::New<Type>());
-  const Class& function_type_cls = Class::Handle(zone,
-                                                 Class::New<FunctionType>());
   const Class& type_ref_cls = Class::Handle(zone, Class::New<TypeRef>());
   const Class& type_parameter_cls = Class::Handle(zone,
                                                   Class::New<TypeParameter>());
@@ -1272,8 +1263,8 @@
   pending_classes.Add(stacktrace_cls);
   // Super type set below, after Object is allocated.
 
-  cls = Class::New<JSRegExp>();
-  RegisterPrivateClass(cls, Symbols::JSSyntaxRegExp(), core_lib);
+  cls = Class::New<RegExp>();
+  RegisterPrivateClass(cls, Symbols::_RegExp(), core_lib);
   pending_classes.Add(cls);
 
   // Initialize the base interfaces used by the core VM classes.
@@ -1313,9 +1304,6 @@
   RegisterPrivateClass(type_cls, Symbols::Type(), core_lib);
   pending_classes.Add(type_cls);
 
-  RegisterPrivateClass(function_type_cls, Symbols::FunctionType(), core_lib);
-  pending_classes.Add(function_type_cls);
-
   RegisterPrivateClass(type_ref_cls, Symbols::TypeRef(), core_lib);
   pending_classes.Add(type_ref_cls);
 
@@ -1437,10 +1425,10 @@
   ASSERT(!lib.IsNull());
   ASSERT(lib.raw() == Library::TypedDataLibrary());
 #define REGISTER_TYPED_DATA_CLASS(clazz)                                       \
-  cls = Class::NewTypedDataClass(kTypedData##clazz##Cid);                      \
-  RegisterPrivateClass(cls, Symbols::_##clazz(), lib);                         \
+  cls = Class::NewTypedDataClass(kTypedData##clazz##ArrayCid);                 \
+  RegisterClass(cls, Symbols::clazz##List(), lib);                             \
 
-  CLASS_LIST_TYPED_DATA(REGISTER_TYPED_DATA_CLASS);
+  DART_CLASS_LIST_TYPED_DATA(REGISTER_TYPED_DATA_CLASS);
 #undef REGISTER_TYPED_DATA_CLASS
 #define REGISTER_TYPED_DATA_VIEW_CLASS(clazz)                                  \
   cls = Class::NewTypedDataViewClass(kTypedData##clazz##ViewCid);              \
@@ -1459,46 +1447,39 @@
   cls = Class::New<Instance>(kByteBufferCid);
   cls.set_instance_size(0);
   cls.set_next_field_offset(-kWordSize);
-  RegisterPrivateClass(cls, Symbols::_ByteBuffer(), lib);
+  RegisterClass(cls, Symbols::ByteBuffer(), lib);
   pending_classes.Add(cls);
 
   CLASS_LIST_TYPED_DATA(REGISTER_EXT_TYPED_DATA_CLASS);
 #undef REGISTER_EXT_TYPED_DATA_CLASS
   // Register Float32x4 and Int32x4 in the object store.
   cls = Class::New<Float32x4>();
-  object_store->set_float32x4_class(cls);
-  RegisterPrivateClass(cls, Symbols::_Float32x4(), lib);
-  cls = Class::New<Int32x4>();
-  object_store->set_int32x4_class(cls);
-  RegisterPrivateClass(cls, Symbols::_Int32x4(), lib);
-  cls = Class::New<Float64x2>();
-  object_store->set_float64x2_class(cls);
-  RegisterPrivateClass(cls, Symbols::_Float64x2(), lib);
-
-  cls = Class::New<Instance>(kIllegalCid);
   RegisterClass(cls, Symbols::Float32x4(), lib);
   cls.set_num_type_arguments(0);
   cls.set_num_own_type_arguments(0);
   cls.set_is_prefinalized();
   pending_classes.Add(cls);
+  object_store->set_float32x4_class(cls);
   type = Type::NewNonParameterizedType(cls);
   object_store->set_float32x4_type(type);
 
-  cls = Class::New<Instance>(kIllegalCid);
+  cls = Class::New<Int32x4>();
   RegisterClass(cls, Symbols::Int32x4(), lib);
   cls.set_num_type_arguments(0);
   cls.set_num_own_type_arguments(0);
   cls.set_is_prefinalized();
   pending_classes.Add(cls);
+  object_store->set_int32x4_class(cls);
   type = Type::NewNonParameterizedType(cls);
   object_store->set_int32x4_type(type);
 
-  cls = Class::New<Instance>(kIllegalCid);
+  cls = Class::New<Float64x2>();
   RegisterClass(cls, Symbols::Float64x2(), lib);
   cls.set_num_type_arguments(0);
   cls.set_num_own_type_arguments(0);
   cls.set_is_prefinalized();
   pending_classes.Add(cls);
+  object_store->set_float64x2_class(cls);
   type = Type::NewNonParameterizedType(cls);
   object_store->set_float64x2_type(type);
 
@@ -1541,7 +1522,7 @@
   type = Type::NewNonParameterizedType(cls);
   object_store->set_double_type(type);
 
-  name = Symbols::New("String");
+  name = Symbols::_String().raw();
   cls = Class::New<Instance>(kIllegalCid);
   RegisterClass(cls, name, core_lib);
   cls.set_num_type_arguments(0);
@@ -1606,9 +1587,9 @@
   CLASS_LIST_NO_OBJECT(V)
 
 #define ADD_SET_FIELD(clazz)                                                   \
-  field_name = Symbols::New("cid"#clazz);                                      \
+  field_name = Symbols::New(thread, "cid"#clazz);                              \
   field = Field::New(field_name, true, false, true, false, cls,                \
-      Type::Handle(Type::IntType()), TokenPosition::kMinSource);             \
+      Type::Handle(Type::IntType()), TokenPosition::kMinSource);               \
   value = Smi::New(k##clazz##Cid);                                             \
   field.SetStaticValue(value, true);                                           \
   cls.AddField(field);                                                         \
@@ -1639,7 +1620,6 @@
 
   cls = Class::New<LibraryPrefix>();
   cls = Class::New<Type>();
-  cls = Class::New<FunctionType>();
   cls = Class::New<TypeRef>();
   cls = Class::New<TypeParameter>();
   cls = Class::New<BoundedType>();
@@ -1722,7 +1702,7 @@
   cls = Class::New<ReceivePort>();
   cls = Class::New<SendPort>();
   cls = Class::New<Stacktrace>();
-  cls = Class::New<JSRegExp>();
+  cls = Class::New<RegExp>();
   cls = Class::New<Number>();
 
   cls = Class::New<WeakProperty>();
@@ -2108,6 +2088,8 @@
 // Traits for looking up Functions by name.
 class ClassFunctionsTraits {
  public:
+  static const char* Name() { return "ClassFunctionsTraits"; }
+
   // Called when growing the table.
   static bool IsMatch(const Object& a, const Object& b) {
     ASSERT(a.IsFunction() && b.IsFunction());
@@ -2432,10 +2414,10 @@
       break;
     }
     sup_type = cls.super_type();
-    // A BoundedType, TypeRef, or FunctionType can appear as type argument of
+    // A BoundedType, TypeRef, or function type can appear as type argument of
     // sup_type, but not as sup_type itself.
     ASSERT(sup_type.IsType());
-    sup_type = ClassFinalizer::ResolveTypeClass(cls, Type::Cast(sup_type));
+    ClassFinalizer::ResolveTypeClass(cls, Type::Cast(sup_type));
     cls = sup_type.type_class();
     ASSERT(!cls.IsTypedefClass());
   } while (true);
@@ -2591,8 +2573,10 @@
 RawFunction* Class::CreateInvocationDispatcher(const String& target_name,
                                                const Array& args_desc,
                                                RawFunction::Kind kind) const {
-  Function& invocation = Function::Handle(
-      Function::New(String::Handle(Symbols::New(target_name)),
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Function& invocation = Function::Handle(zone,
+      Function::New(String::Handle(zone, Symbols::New(thread, target_name)),
                     kind,
                     false,  // Not static.
                     false,  // Not const.
@@ -2605,10 +2589,10 @@
   invocation.set_num_fixed_parameters(desc.PositionalCount());
   invocation.SetNumOptionalParameters(desc.NamedCount(),
                                       false);  // Not positional.
-  invocation.set_parameter_types(Array::Handle(Array::New(desc.Count(),
-                                                          Heap::kOld)));
-  invocation.set_parameter_names(Array::Handle(Array::New(desc.Count(),
-                                                          Heap::kOld)));
+  invocation.set_parameter_types(Array::Handle(zone, Array::New(desc.Count(),
+                                                                Heap::kOld)));
+  invocation.set_parameter_names(Array::Handle(zone, Array::New(desc.Count(),
+                                                                Heap::kOld)));
   // Receiver.
   invocation.SetParameterTypeAt(0, Object::dynamic_type());
   invocation.SetParameterNameAt(0, Symbols::This());
@@ -2618,14 +2602,15 @@
     invocation.SetParameterTypeAt(i, Object::dynamic_type());
     char name[64];
     OS::SNPrint(name, 64, ":p%" Pd, i);
-    invocation.SetParameterNameAt(i, String::Handle(Symbols::New(name)));
+    invocation.SetParameterNameAt(i, String::Handle(zone,
+        Symbols::New(thread, name)));
   }
 
   // Named parameters.
   for (; i < desc.Count(); i++) {
     invocation.SetParameterTypeAt(i, Object::dynamic_type());
     intptr_t index = i - desc.PositionalCount();
-    invocation.SetParameterNameAt(i, String::Handle(desc.NameAt(index)));
+    invocation.SetParameterNameAt(i, String::Handle(zone, desc.NameAt(index)));
   }
   invocation.set_result_type(Object::dynamic_type());
   invocation.set_is_debuggable(false);
@@ -2643,13 +2628,15 @@
 // is created and injected as a getter (under the name get:M) into the class
 // owning method M.
 RawFunction* Function::CreateMethodExtractor(const String& getter_name) const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   ASSERT(Field::IsGetterName(getter_name));
   const Function& closure_function =
-      Function::Handle(ImplicitClosureFunction());
+      Function::Handle(zone, ImplicitClosureFunction());
 
-  const Class& owner = Class::Handle(closure_function.Owner());
-  Function& extractor = Function::Handle(
-    Function::New(String::Handle(Symbols::New(getter_name)),
+  const Class& owner = Class::Handle(zone, closure_function.Owner());
+  Function& extractor = Function::Handle(zone,
+    Function::New(String::Handle(zone, Symbols::New(thread, getter_name)),
                   RawFunction::kMethodExtractor,
                   false,  // Not static.
                   false,  // Not const.
@@ -2745,9 +2732,7 @@
     }
   }
 
-  virtual void IncrementInvalidationGen() {
-    Isolate::Current()->IncrCHAInvalidationGen();
-  }
+  virtual void IncrementInvalidationGen() {}
 
  private:
   const Class& cls_;
@@ -2802,6 +2787,81 @@
 }
 
 
+bool Class::ValidatePostFinalizePatch(const Class& orig_class,
+                                      Error* error) const {
+  ASSERT(error != NULL);
+  // Not allowed to add new fields in a post finalization patch.
+  if (fields() != Object::empty_array().raw()) {
+    *error = LanguageError::NewFormatted(
+        *error,  // No previous error.
+        Script::Handle(script()),
+        token_pos(),
+        Report::AtLocation,
+        Report::kError,
+        Heap::kNew,
+        "new fields are not allowed for this patch");
+    return false;
+  }
+  // There seem to be no functions, the patch is pointless.
+  if (functions() == Object::empty_array().raw()) {
+    *error = LanguageError::NewFormatted(
+        *error,  // No previous error.
+        Script::Handle(script()),
+        token_pos(),
+        Report::AtLocation,
+        Report::kError,
+        Heap::kNew,
+        "no functions to patch");
+    return false;
+  }
+  // Iterate over all functions that will be patched and make sure
+  // the original function was declared 'external' and has not executed
+  // so far i.e no code has been generated for it.
+  Thread* thread = Thread::Current();
+  ASSERT(thread->IsMutatorThread());
+  Zone* zone = thread->zone();
+  const Array& funcs = Array::Handle(zone, functions());
+  Function& func = Function::Handle(zone);
+  Function& orig_func = Function::Handle(zone);
+  String& name = String::Handle(zone);
+  for (intptr_t i = 0; i < funcs.Length(); i++) {
+    func ^= funcs.At(i);
+    name ^= func.name();
+    orig_func ^= orig_class.LookupFunctionAllowPrivate(name);
+    if (!orig_func.IsNull()) {
+      if (!orig_func.is_external() || orig_func.HasCode()) {
+        // We can only patch external functions in a post finalized class.
+        *error = LanguageError::NewFormatted(
+            *error,  // No previous error.
+            Script::Handle(script()),
+            token_pos(),
+            Report::AtLocation,
+            Report::kError,
+            Heap::kNew,
+            !orig_func.is_external() ?
+            "'%s' is not external and therefore cannot be patched" :
+            "'%s' has already executed and therefore cannot be patched",
+            name.ToCString());
+        return false;
+      }
+    } else if (!Library::IsPrivate(name)) {
+      // We can only have new private functions that are added.
+      *error = LanguageError::NewFormatted(
+          *error,  // No previous error.
+          Script::Handle(script()),
+          token_pos(),
+          Report::AtLocation,
+          Report::kError,
+          Heap::kNew,
+          "'%s' is not private and therefore cannot be patched",
+          name.ToCString());
+      return false;
+    }
+  }
+  return true;
+}
+
+
 void Class::set_cha_codes(const Array& cache) const {
   StorePointer(&raw_ptr()->cha_codes_, cache.raw());
 }
@@ -2994,6 +3054,9 @@
   if (is_finalized()) {
     return Error::null();
   }
+  if (Compiler::IsBackgroundCompilation()) {
+    Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
+  }
   ASSERT(thread->IsMutatorThread());
   ASSERT(thread != NULL);
   const Error& error = Error::Handle(
@@ -3193,8 +3256,54 @@
   if (FLAG_show_internal_names) {
     return Name();
   }
-NOT_IN_PRODUCT(
   switch (id()) {
+    case kFloat32x4Cid:
+      return Symbols::Float32x4().raw();
+    case kInt32x4Cid:
+      return Symbols::Int32x4().raw();
+    case kTypedDataInt8ArrayCid:
+    case kExternalTypedDataInt8ArrayCid:
+      return Symbols::Int8List().raw();
+    case kTypedDataUint8ArrayCid:
+    case kExternalTypedDataUint8ArrayCid:
+      return Symbols::Uint8List().raw();
+    case kTypedDataUint8ClampedArrayCid:
+    case kExternalTypedDataUint8ClampedArrayCid:
+      return Symbols::Uint8ClampedList().raw();
+    case kTypedDataInt16ArrayCid:
+    case kExternalTypedDataInt16ArrayCid:
+      return Symbols::Int16List().raw();
+    case kTypedDataUint16ArrayCid:
+    case kExternalTypedDataUint16ArrayCid:
+      return Symbols::Uint16List().raw();
+    case kTypedDataInt32ArrayCid:
+    case kExternalTypedDataInt32ArrayCid:
+      return Symbols::Int32List().raw();
+    case kTypedDataUint32ArrayCid:
+    case kExternalTypedDataUint32ArrayCid:
+      return Symbols::Uint32List().raw();
+    case kTypedDataInt64ArrayCid:
+    case kExternalTypedDataInt64ArrayCid:
+      return Symbols::Int64List().raw();
+    case kTypedDataUint64ArrayCid:
+    case kExternalTypedDataUint64ArrayCid:
+      return Symbols::Uint64List().raw();
+    case kTypedDataInt32x4ArrayCid:
+    case kExternalTypedDataInt32x4ArrayCid:
+      return Symbols::Int32x4List().raw();
+    case kTypedDataFloat32x4ArrayCid:
+    case kExternalTypedDataFloat32x4ArrayCid:
+      return Symbols::Float32x4List().raw();
+    case kTypedDataFloat64x2ArrayCid:
+    case kExternalTypedDataFloat64x2ArrayCid:
+      return Symbols::Float64x2List().raw();
+    case kTypedDataFloat32ArrayCid:
+    case kExternalTypedDataFloat32ArrayCid:
+      return Symbols::Float32List().raw();
+    case kTypedDataFloat64ArrayCid:
+    case kExternalTypedDataFloat64ArrayCid:
+      return Symbols::Float64List().raw();
+NOT_IN_PRODUCT(
     case kNullCid:
       return Symbols::Null().raw();
     case kDynamicCid:
@@ -3279,54 +3388,8 @@
     case kImmutableArrayCid:
     case kGrowableObjectArrayCid:
       return Symbols::List().raw();
-    case kFloat32x4Cid:
-      return Symbols::Float32x4().raw();
-    case kInt32x4Cid:
-      return Symbols::Int32x4().raw();
-    case kTypedDataInt8ArrayCid:
-    case kExternalTypedDataInt8ArrayCid:
-      return Symbols::Int8List().raw();
-    case kTypedDataUint8ArrayCid:
-    case kExternalTypedDataUint8ArrayCid:
-      return Symbols::Uint8List().raw();
-    case kTypedDataUint8ClampedArrayCid:
-    case kExternalTypedDataUint8ClampedArrayCid:
-      return Symbols::Uint8ClampedList().raw();
-    case kTypedDataInt16ArrayCid:
-    case kExternalTypedDataInt16ArrayCid:
-      return Symbols::Int16List().raw();
-    case kTypedDataUint16ArrayCid:
-    case kExternalTypedDataUint16ArrayCid:
-      return Symbols::Uint16List().raw();
-    case kTypedDataInt32ArrayCid:
-    case kExternalTypedDataInt32ArrayCid:
-      return Symbols::Int32List().raw();
-    case kTypedDataUint32ArrayCid:
-    case kExternalTypedDataUint32ArrayCid:
-      return Symbols::Uint32List().raw();
-    case kTypedDataInt64ArrayCid:
-    case kExternalTypedDataInt64ArrayCid:
-      return Symbols::Int64List().raw();
-    case kTypedDataUint64ArrayCid:
-    case kExternalTypedDataUint64ArrayCid:
-      return Symbols::Uint64List().raw();
-    case kTypedDataInt32x4ArrayCid:
-    case kExternalTypedDataInt32x4ArrayCid:
-      return Symbols::Int32x4List().raw();
-    case kTypedDataFloat32x4ArrayCid:
-    case kExternalTypedDataFloat32x4ArrayCid:
-      return Symbols::Float32x4List().raw();
-    case kTypedDataFloat64x2ArrayCid:
-    case kExternalTypedDataFloat64x2ArrayCid:
-      return Symbols::Float64x2List().raw();
-    case kTypedDataFloat32ArrayCid:
-    case kExternalTypedDataFloat32ArrayCid:
-      return Symbols::Float32List().raw();
-    case kTypedDataFloat64ArrayCid:
-    case kExternalTypedDataFloat64ArrayCid:
-      return Symbols::Float64List().raw();
-  }
 )
+  }
   const String& name = String::Handle(Name());
   return String::ScrubName(name);
 }
@@ -3345,12 +3408,16 @@
 
 TokenPosition Class::ComputeEndTokenPos() const {
   // Return the begin token for synthetic classes.
-  if (IsMixinApplication() || IsTopLevel()) {
+  if (is_synthesized_class() || IsMixinApplication() || IsTopLevel()) {
     return token_pos();
   }
   const Script& scr = Script::Handle(script());
   ASSERT(!scr.IsNull());
   const TokenStream& tkns = TokenStream::Handle(scr.tokens());
+  if (tkns.IsNull()) {
+    ASSERT(Dart::IsRunningPrecompiledCode());
+    return TokenPosition::kNoSource;
+  }
   TokenStream::Iterator tkit(tkns,
                              token_pos(),
                              TokenStream::Iterator::kNoNewlines);
@@ -3438,6 +3505,14 @@
 }
 
 
+void Class::SetRefinalizeAfterPatch() const {
+  ASSERT(!IsTopLevel());
+  set_state_bits(ClassFinalizedBits::update(RawClass::kRefinalizeAfterPatch,
+                                            raw_ptr()->state_bits_));
+  set_state_bits(TypeFinalizedBit::update(false, raw_ptr()->state_bits_));
+}
+
+
 void Class::ResetFinalization() const {
   ASSERT(IsTopLevel());
   set_state_bits(ClassFinalizedBits::update(RawClass::kAllocated,
@@ -3637,8 +3712,8 @@
 }
 
 
-bool Class::IsFunctionClass() const {
-  return raw() == Type::Handle(Type::Function()).type_class();
+bool Class::IsDartFunctionClass() const {
+  return raw() == Type::Handle(Type::DartFunctionType()).type_class();
 }
 
 
@@ -3716,7 +3791,7 @@
                                      bound_trail,
                                      space);
     }
-    if (other.IsFunctionClass()) {
+    if (other.IsDartFunctionClass()) {
       // Check if type S has a call() method.
       Function& function = Function::Handle(zone,
           thsi.LookupDynamicFunctionAllowAbstract(Symbols::Call()));
@@ -4094,26 +4169,80 @@
   ASSERT(!flds.IsNull());
   intptr_t len = flds.Length();
   Field& field = thread->FieldHandle();
+  if (name.IsSymbol()) {
+    // Use fast raw pointer string compare for symbols.
+    for (intptr_t i = 0; i < len; i++) {
+      field ^= flds.At(i);
+      if (name.raw() == field.name()) {
+        if (kind == kInstance) {
+          return field.is_static() ? Field::null() : field.raw();
+        } else if (kind == kStatic) {
+          return field.is_static() ? field.raw() : Field::null();
+        }
+        ASSERT(kind == kAny);
+        return field.raw();
+      }
+    }
+  } else {
+    String& field_name = thread->StringHandle();
+    for (intptr_t i = 0; i < len; i++) {
+      field ^= flds.At(i);
+      field_name ^= field.name();
+      if (name.Equals(field_name)) {
+        if (kind == kInstance) {
+          return field.is_static() ? Field::null() : field.raw();
+        } else if (kind == kStatic) {
+          return field.is_static() ? field.raw() : Field::null();
+        }
+        ASSERT(kind == kAny);
+        return field.raw();
+      }
+    }
+  }
+  return Field::null();
+}
+
+
+RawField* Class::LookupFieldAllowPrivate(const String& name) const {
+  // Use slow string compare, ignoring privacy name mangling.
+  Thread* thread = Thread::Current();
+  if (EnsureIsFinalized(thread) != Error::null()) {
+    return Field::null();
+  }
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_FIELD_HANDLESCOPE(thread);
+  REUSABLE_STRING_HANDLESCOPE(thread);
+  Array& flds = thread->ArrayHandle();
+  flds ^= fields();
+  ASSERT(!flds.IsNull());
+  intptr_t len = flds.Length();
+  Field& field = thread->FieldHandle();
   String& field_name = thread->StringHandle();
   for (intptr_t i = 0; i < len; i++) {
     field ^= flds.At(i);
     field_name ^= field.name();
     if (String::EqualsIgnoringPrivateKey(field_name, name)) {
-      if (kind == kInstance) {
-        if (!field.is_static()) {
-          return field.raw();
-        }
-      } else if (kind == kStatic) {
-        if (field.is_static()) {
-          return field.raw();
-        }
-      } else if (kind == kAny) {
-        return field.raw();
-      }
-      return Field::null();
+      return field.raw();
     }
   }
-  // No field found.
+  return Field::null();
+}
+
+
+RawField* Class::LookupInstanceFieldAllowPrivate(const String& name) const {
+  Field& field = Field::Handle(LookupFieldAllowPrivate(name));
+  if (!field.IsNull() && !field.is_static()) {
+    return field.raw();
+  }
+  return Field::null();
+}
+
+
+RawField* Class::LookupStaticFieldAllowPrivate(const String& name) const {
+  Field& field = Field::Handle(LookupFieldAllowPrivate(name));
+  if (!field.IsNull() && field.is_static()) {
+    return field.raw();
+  }
   return Field::null();
 }
 
@@ -4217,6 +4346,104 @@
 }
 
 
+// Returns an instance of Double or Double::null().
+// 'index' points to either:
+// - constants_list_ position of found element, or
+// - constants_list_ position where new canonical can be inserted.
+RawDouble* Class::LookupCanonicalDouble(
+    Zone* zone, double value, intptr_t* index) const {
+  ASSERT(this->raw() == Isolate::Current()->object_store()->double_class());
+  const Array& constants = Array::Handle(zone, this->constants());
+  const intptr_t constants_len = constants.Length();
+  // Linear search to see whether this value is already present in the
+  // list of canonicalized constants.
+  Double& canonical_value = Double::Handle(zone);
+  while (*index < constants_len) {
+    canonical_value ^= constants.At(*index);
+    if (canonical_value.IsNull()) {
+      break;
+    }
+    if (canonical_value.BitwiseEqualsToDouble(value)) {
+      ASSERT(canonical_value.IsCanonical());
+      return canonical_value.raw();
+    }
+    *index = *index + 1;
+  }
+  return Double::null();
+}
+
+
+RawMint* Class::LookupCanonicalMint(
+    Zone* zone, int64_t value, intptr_t* index) const {
+  ASSERT(this->raw() == Isolate::Current()->object_store()->mint_class());
+  const Array& constants = Array::Handle(zone, this->constants());
+  const intptr_t constants_len = constants.Length();
+  // Linear search to see whether this value is already present in the
+  // list of canonicalized constants.
+  Mint& canonical_value = Mint::Handle(zone);
+  while (*index < constants_len) {
+    canonical_value ^= constants.At(*index);
+    if (canonical_value.IsNull()) {
+      break;
+    }
+    if (canonical_value.value() == value) {
+      ASSERT(canonical_value.IsCanonical());
+      return canonical_value.raw();
+    }
+    *index = *index + 1;
+  }
+  return Mint::null();
+}
+
+
+RawBigint* Class::LookupCanonicalBigint(Zone* zone,
+                                        const Bigint& value,
+                                        intptr_t* index) const {
+  ASSERT(this->raw() == Isolate::Current()->object_store()->bigint_class());
+  const Array& constants = Array::Handle(zone, this->constants());
+  const intptr_t constants_len = constants.Length();
+  // Linear search to see whether this value is already present in the
+  // list of canonicalized constants.
+  Bigint& canonical_value = Bigint::Handle(zone);
+  while (*index < constants_len) {
+    canonical_value ^= constants.At(*index);
+    if (canonical_value.IsNull()) {
+      break;
+    }
+    if (canonical_value.Equals(value)) {
+      ASSERT(canonical_value.IsCanonical());
+      return canonical_value.raw();
+    }
+    *index = *index + 1;
+  }
+  return Bigint::null();
+}
+
+
+RawInstance* Class::LookupCanonicalInstance(Zone* zone,
+                                            const Instance& value,
+                                            intptr_t* index) const {
+  ASSERT(this->raw() == value.clazz());
+  const Array& constants = Array::Handle(zone, this->constants());
+  const intptr_t constants_len = constants.Length();
+  // Linear search to see whether this value is already present in the
+  // list of canonicalized constants.
+  Instance& canonical_value = Instance::Handle(zone);
+  while (*index < constants_len) {
+    canonical_value ^= constants.At(*index);
+    if (canonical_value.IsNull()) {
+      break;
+    }
+    if (value.CanonicalizeEquals(canonical_value)) {
+      ASSERT(canonical_value.IsCanonical());
+      return canonical_value.raw();
+    }
+    *index = *index + 1;
+  }
+  return Instance::null();
+}
+
+
 void Class::InsertCanonicalConstant(intptr_t index,
                                     const Instance& constant) const {
   // The constant needs to be added to the list. Grow the list if it is full.
@@ -4234,6 +4461,21 @@
 }
 
 
+void Class::InsertCanonicalNumber(Zone* zone,
+                                  intptr_t index,
+                                  const Number& constant) const {
+  // The constant needs to be added to the list. Grow the list if it is full.
+  Array& canonical_list = Array::Handle(zone, constants());
+  const intptr_t list_len = canonical_list.Length();
+  if (index >= list_len) {
+    const intptr_t new_length = (list_len == 0) ? 4 : list_len + 4;
+    canonical_list ^= Array::Grow(canonical_list, new_length, Heap::kOld);
+    set_constants(canonical_list);
+  }
+  canonical_list.SetAt(index, constant);
+}
+
+
 RawUnresolvedClass* UnresolvedClass::New(const LibraryPrefix& library_prefix,
                                          const String& ident,
                                          TokenPosition token_pos) {
@@ -4273,15 +4515,16 @@
 
 RawString* UnresolvedClass::Name() const {
   if (library_prefix() != LibraryPrefix::null()) {
-    const LibraryPrefix& lib_prefix = LibraryPrefix::Handle(library_prefix());
-    String& name = String::Handle();
-    name = lib_prefix.name();  // Qualifier.
-    Zone* zone = Thread::Current()->zone();
+    Thread* thread = Thread::Current();
+    Zone* zone = thread->zone();
+    const LibraryPrefix& lib_prefix = LibraryPrefix::Handle(zone,
+                                                            library_prefix());
+    const String& name = String::Handle(zone, lib_prefix.name());  // Qualifier.
     GrowableHandlePtrArray<const String> strs(zone, 3);
     strs.Add(name);
     strs.Add(Symbols::Dot());
     strs.Add(String::Handle(zone, ident()));
-    return Symbols::FromConcatAll(strs);
+    return Symbols::FromConcatAll(thread, strs);
   } else {
     return ident();
   }
@@ -4330,13 +4573,14 @@
 RawString* TypeArguments::SubvectorName(intptr_t from_index,
                                         intptr_t len,
                                         NameVisibility name_visibility) const {
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   ASSERT(from_index + len <= Length());
   String& name = String::Handle(zone);
   const intptr_t num_strings = (len == 0) ? 2 : 2*len + 1;  // "<""T"", ""T"">".
   GrowableHandlePtrArray<const String> pieces(zone, num_strings);
   pieces.Add(Symbols::LAngleBracket());
-  AbstractType& type = AbstractType::Handle();
+  AbstractType& type = AbstractType::Handle(zone);
   for (intptr_t i = 0; i < len; i++) {
     type = TypeAt(from_index + i);
     name = type.BuildName(name_visibility);
@@ -4347,7 +4591,7 @@
   }
   pieces.Add(Symbols::RAngleBracket());
   ASSERT(pieces.length() == num_strings);
-  return Symbols::FromConcatAll(pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
@@ -5005,15 +5249,16 @@
   if (IsNull()) {
     return Symbols::Empty().raw();
   }
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   AbstractType& type = AbstractType::Handle(zone);
   const intptr_t num_types = Length();
-  GrowableHandlePtrArray<const String> pieces(zone, num_types);
+  const Array& pieces = Array::Handle(zone, Array::New(num_types));
   for (intptr_t i = 0; i < num_types; i++) {
     type = TypeAt(i);
-    pieces.Add(String::Handle(zone, type.EnumerateURIs()));
+    pieces.SetAt(i, String::Handle(zone, type.EnumerateURIs()));
   }
-  return Symbols::FromConcatAll(pieces);
+  return String::ConcatAll(pieces);
 }
 
 
@@ -5085,6 +5330,11 @@
 }
 
 
+intptr_t Function::Hash() const {
+  return String::HashRawSymbol(name());
+}
+
+
 bool Function::HasBreakpoint() const {
   if (!FLAG_support_debugger) {
     return false;
@@ -5340,12 +5590,12 @@
 }
 
 
-RawFunctionType* Function::SignatureType() const {
-  FunctionType& type = FunctionType::Handle();
+RawType* Function::SignatureType() const {
+  Type& type = Type::Handle();
   const Object& obj = Object::Handle(raw_ptr()->data_);
   if (IsSignatureFunction()) {
-    ASSERT(obj.IsNull() || obj.IsFunctionType());
-    type = obj.IsNull() ? FunctionType::null() : FunctionType::Cast(obj).raw();
+    ASSERT(obj.IsNull() || Type::Cast(obj).IsFunctionType());
+    type = obj.IsNull() ? Type::null() : Type::Cast(obj).raw();
   } else {
     ASSERT(IsClosureFunction());
     ASSERT(!obj.IsNull());
@@ -5381,18 +5631,15 @@
     const TypeArguments& signature_type_arguments =
         TypeArguments::Handle(scope_class.type_parameters());
     // Return the still unfinalized signature type.
-    type = FunctionType::New(scope_class,
-                             signature_type_arguments,
-                             *this,
-                             token_pos());
-
+    type = Type::New(scope_class, signature_type_arguments, token_pos());
+    type.set_signature(*this);
     SetSignatureType(type);
   }
   return type.raw();
 }
 
 
-void Function::SetSignatureType(const FunctionType& value) const {
+void Function::SetSignatureType(const Type& value) const {
   if (IsSignatureFunction()) {
     set_data(value);
   } else {
@@ -5527,7 +5774,7 @@
 //   invoke-field dispatcher: Array arguments descriptor
 //   redirecting constructor: RedirectionData
 //   closure function:        ClosureData
-//   irregexp function:       Array[0] = JSRegExp
+//   irregexp function:       Array[0] = RegExp
 //                            Array[1] = Smi string specialization cid
 //   native function:         Array[0] = String native name
 //                            Array[1] = Function implicit closure function
@@ -5561,10 +5808,10 @@
 }
 
 
-RawJSRegExp* Function::regexp() const {
+RawRegExp* Function::regexp() const {
   ASSERT(kind() == RawFunction::kIrregexpFunction);
   const Array& pair = Array::Cast(Object::Handle(raw_ptr()->data_));
-  return JSRegExp::RawCast(pair.At(0));
+  return RegExp::RawCast(pair.At(0));
 }
 
 
@@ -5575,7 +5822,7 @@
 }
 
 
-void Function::SetRegExpData(const JSRegExp& regexp,
+void Function::SetRegExpData(const RegExp& regexp,
                              intptr_t string_specialization_cid) const {
   ASSERT(kind() == RawFunction::kIrregexpFunction);
   ASSERT(RawObject::IsStringClassId(string_specialization_cid));
@@ -5673,7 +5920,7 @@
 }
 
 
-void Function::set_kind_tag(intptr_t value) const {
+void Function::set_kind_tag(uint32_t value) const {
   StoreNonPointer(&raw_ptr()->kind_tag_, static_cast<uint32_t>(value));
 }
 
@@ -5704,10 +5951,6 @@
 
 
 bool Function::IsOptimizable() const {
-  if (FLAG_coverage_dir != NULL) {
-    // Do not optimize if collecting coverage data.
-    return false;
-  }
   if (is_native()) {
     // Native methods don't need to be optimized.
     return false;
@@ -5748,6 +5991,7 @@
 bool Function::CanBeInlined() const {
   Thread* thread = Thread::Current();
   return is_inlinable() &&
+         !is_external() &&
          !is_generated_body() &&
          (!FLAG_support_debugger ||
           !thread->isolate()->debugger()->HasBreakpoint(*this, thread->zone()));
@@ -6056,11 +6300,15 @@
         Report::kError,
         Heap::kNew,
         "signature type '%s' of function '%s' is not a subtype of signature "
-        "type '%s' of function '%s'",
+        "type '%s' of function '%s' where\n%s%s",
         String::Handle(UserVisibleSignature()).ToCString(),
         String::Handle(UserVisibleName()).ToCString(),
         String::Handle(other.UserVisibleSignature()).ToCString(),
-        String::Handle(other.UserVisibleName()).ToCString());
+        String::Handle(other.UserVisibleName()).ToCString(),
+        String::Handle(Type::Handle(
+            SignatureType()).EnumerateURIs()).ToCString(),
+        String::Handle(Type::Handle(
+            other.SignatureType()).EnumerateURIs()).ToCString());
     return false;
   }
   // We should also check that if the other function explicitly specifies a
@@ -6320,6 +6568,7 @@
   result.set_is_generated_body(false);
   result.set_always_inline(false);
   result.set_is_polymorphic_target(false);
+  result.set_was_compiled(false);
   result.set_owner(owner);
   result.set_token_pos(token_pos);
   result.set_end_token_pos(token_pos);
@@ -6420,8 +6669,10 @@
 RawFunction* Function::NewEvalFunction(const Class& owner,
                                        const Script& script,
                                        bool is_static) {
-  const Function& result = Function::Handle(
-      Function::New(String::Handle(Symbols::New(":Eval")),
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const Function& result = Function::Handle(zone,
+      Function::New(String::Handle(Symbols::New(thread, ":Eval")),
                     RawFunction::kRegularFunction,
                     is_static,
                     /* is_const = */ false,
@@ -6495,8 +6746,7 @@
     param_name = ParameterNameAt(has_receiver - kClosure + i);
     closure_function.SetParameterNameAt(i, param_name);
   }
-  const FunctionType& signature_type =
-      FunctionType::Handle(closure_function.SignatureType());
+  const Type& signature_type = Type::Handle(closure_function.SignatureType());
   if (!signature_type.IsFinalized()) {
     ClassFinalizer::FinalizeType(
         Class::Handle(Owner()), signature_type, ClassFinalizer::kCanonicalize);
@@ -6518,23 +6768,25 @@
 
 
 RawString* Function::UserVisibleFormalParameters() const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   // Typically 3, 5,.. elements in 'pieces', e.g.:
   // '_LoadRequest', CommaSpace, '_LoadError'.
-  GrowableHandlePtrArray<const String> pieces(Thread::Current()->zone(), 5);
-  const TypeArguments& instantiator = TypeArguments::Handle();
-  BuildSignatureParameters(false, kUserVisibleName, instantiator, &pieces);
-  return Symbols::FromConcatAll(pieces);
+  GrowableHandlePtrArray<const String> pieces(zone, 5);
+  const TypeArguments& instantiator = TypeArguments::Handle(zone);
+  BuildSignatureParameters(thread, zone,
+                           false, kUserVisibleName, instantiator, &pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
 void Function::BuildSignatureParameters(
+    Thread* thread,
+    Zone* zone,
     bool instantiate,
     NameVisibility name_visibility,
     const TypeArguments& instantiator,
     GrowableHandlePtrArray<const String>* pieces) const {
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-
   AbstractType& param_type = AbstractType::Handle(zone);
   const intptr_t num_params = NumParameters();
   const intptr_t num_fixed_params = num_fixed_parameters();
@@ -6571,13 +6823,6 @@
       pieces->Add(Symbols::LBrace());
     }
     for (intptr_t i = num_fixed_params; i < num_params; i++) {
-      // The parameter name of an optional positional parameter does not need
-      // to be part of the signature, since it is not used.
-      if (num_opt_named_params > 0) {
-        name = ParameterNameAt(i);
-        pieces->Add(name);
-        pieces->Add(Symbols::ColonSpace());
-      }
       param_type = ParameterTypeAt(i);
       if (instantiate &&
           param_type.IsFinalized() &&
@@ -6588,6 +6833,13 @@
       ASSERT(!param_type.IsNull());
       name = param_type.BuildName(name_visibility);
       pieces->Add(name);
+      // The parameter name of an optional positional parameter does not need
+      // to be part of the signature, since it is not used.
+      if (num_opt_named_params > 0) {
+        name = ParameterNameAt(i);
+        pieces->Add(Symbols::Blank());
+        pieces->Add(name);
+      }
       if (i != (num_params - 1)) {
         pieces->Add(Symbols::CommaSpace());
       }
@@ -6619,7 +6871,7 @@
 
 RawInstance* Function::ImplicitInstanceClosure(const Instance& receiver) const {
   ASSERT(IsImplicitClosureFunction());
-  const FunctionType& signature_type = FunctionType::Handle(SignatureType());
+  const Type& signature_type = Type::Handle(SignatureType());
   const Class& cls = Class::Handle(signature_type.type_class());
   const Context& context = Context::Handle(Context::New(1));
   context.SetAt(0, receiver);
@@ -6674,7 +6926,8 @@
     }
   }
   pieces.Add(Symbols::LParen());
-  BuildSignatureParameters(instantiate,
+  BuildSignatureParameters(thread, zone,
+                           instantiate,
                            name_visibility,
                            instantiator,
                            &pieces);
@@ -6686,7 +6939,7 @@
   }
   name = res_type.BuildName(name_visibility);
   pieces.Add(name);
-  return Symbols::FromConcatAll(pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
@@ -6949,7 +7202,6 @@
       // This output can be copied into a file, then used with sed
       // to replace the old values.
       // sed -i .bak -f /tmp/newkeys runtime/vm/method_recognizer.h
-      // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h
       THR_Print("s/V(%s, %d)/V(%s, %d)/\n",
                 prefix, fp, prefix, SourceFingerprint());
     } else {
@@ -7031,7 +7283,7 @@
 }
 
 
-void ClosureData::set_signature_type(const FunctionType& value) const {
+void ClosureData::set_signature_type(const Type& value) const {
   StorePointer(&raw_ptr()->signature_type_, value.raw());
 }
 
@@ -7111,12 +7363,12 @@
 
 
 RawString* Field::GetterSymbol(const String& field_name) {
-  return Symbols::FromConcat(Symbols::GetterPrefix(), field_name);
+  return Symbols::FromGet(Thread::Current(), field_name);
 }
 
 
 RawString* Field::LookupGetterSymbol(const String& field_name) {
-  return Symbols::LookupFromConcat(Symbols::GetterPrefix(), field_name);
+  return Symbols::LookupFromGet(Thread::Current(), field_name);
 }
 
 
@@ -7126,23 +7378,23 @@
 
 
 RawString* Field::SetterSymbol(const String& field_name) {
-  return Symbols::FromConcat(Symbols::SetterPrefix(), field_name);
+  return Symbols::FromSet(Thread::Current(), field_name);
 }
 
 
 RawString* Field::LookupSetterSymbol(const String& field_name) {
-  return Symbols::LookupFromConcat(Symbols::SetterPrefix(), field_name);
+  return Symbols::LookupFromSet(Thread::Current(), field_name);
 }
 
 
 RawString* Field::NameFromGetter(const String& getter_name) {
-  return Symbols::New(getter_name, kGetterPrefixLength,
+  return Symbols::New(Thread::Current(), getter_name, kGetterPrefixLength,
       getter_name.Length() - kGetterPrefixLength);
 }
 
 
 RawString* Field::NameFromSetter(const String& setter_name) {
-  return Symbols::New(setter_name, kSetterPrefixLength,
+  return Symbols::New(Thread::Current(), setter_name, kSetterPrefixLength,
       setter_name.Length() - kSetterPrefixLength);
 }
 
@@ -7385,21 +7637,24 @@
 // field f and cache the closure in a newly created static field
 // named #f (or #f= in case of a setter).
 RawInstance* Field::AccessorClosure(bool make_setter) const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   ASSERT(is_static());
-  const Class& field_owner = Class::Handle(Owner());
+  const Class& field_owner = Class::Handle(zone, Owner());
 
-  String& closure_name = String::Handle(this->name());
-  closure_name = Symbols::FromConcat(Symbols::HashMark(), closure_name);
+  String& closure_name = String::Handle(zone, this->name());
+  closure_name = Symbols::FromConcat(thread, Symbols::HashMark(), closure_name);
   if (make_setter) {
-    closure_name = Symbols::FromConcat(Symbols::HashMark(), closure_name);
+    closure_name = Symbols::FromConcat(thread,
+        Symbols::HashMark(), closure_name);
   }
 
-  Field& closure_field = Field::Handle();
+  Field& closure_field = Field::Handle(zone);
   closure_field = field_owner.LookupStaticField(closure_name);
   if (!closure_field.IsNull()) {
     ASSERT(closure_field.is_static());
-    const Instance& closure =
-        Instance::Handle(closure_field.StaticValue());
+    const Instance& closure = Instance::Handle(zone,
+        closure_field.StaticValue());
     ASSERT(!closure.IsNull());
     ASSERT(closure.IsClosure());
     return closure.raw();
@@ -7407,8 +7662,8 @@
 
   // This is the first time a closure for this field is requested.
   // Create the closure and a new static field in which it is stored.
-  const char* field_name = String::Handle(name()).ToCString();
-  String& expr_src = String::Handle();
+  const char* field_name = String::Handle(zone, name()).ToCString();
+  String& expr_src = String::Handle(zone);
   if (make_setter) {
     expr_src =
         String::NewFormatted("(%s_) { return %s = %s_; }",
@@ -7416,10 +7671,10 @@
   } else {
     expr_src = String::NewFormatted("() { return %s; }", field_name);
   }
-  Object& result =
-      Object::Handle(field_owner.Evaluate(expr_src,
-                                          Object::empty_array(),
-                                          Object::empty_array()));
+  Object& result = Object::Handle(zone,
+      field_owner.Evaluate(expr_src,
+                           Object::empty_array(),
+                           Object::empty_array()));
   ASSERT(result.IsInstance());
   // The caller may expect the closure to be allocated in old space. Copy
   // the result here, since Object::Clone() is a private method.
@@ -7509,8 +7764,11 @@
 
 
 void Field::DeoptimizeDependentCode() const {
-  ASSERT(IsOriginal());
   ASSERT(Thread::Current()->IsMutatorThread());
+  ASSERT(IsOriginal());
+  if (FLAG_background_compilation) {
+    Isolate::Current()->AddDisablingField(*this);
+  }
   FieldDependentArray a(*this);
   a.DisableCode();
 }
@@ -7644,6 +7902,15 @@
 }
 
 
+bool Field::IsExternalizableCid(intptr_t cid) {
+  if (FLAG_support_externalizable_strings) {
+    return (cid == kOneByteStringCid) || (cid == kTwoByteStringCid);
+  } else {
+    return false;
+  }
+}
+
+
 void Field::InitializeGuardedListLengthInObjectOffset() const {
   ASSERT(IsOriginal());
   if (needs_length_check() &&
@@ -7868,7 +8135,7 @@
         }
       }
       if ((prev != Token::kINTERPOL_VAR) && (prev != Token::kINTERPOL_END)) {
-        literals.Add(Symbols::DoubleQuotes());
+        literals.Add(Symbols::DoubleQuote());
       }
       if (escape_characters) {
         literal = String::EscapeSpecialCharacters(literal);
@@ -7877,7 +8144,7 @@
         literals.Add(literal);
       }
       if ((next != Token::kINTERPOL_VAR) && (next != Token::kINTERPOL_START)) {
-        literals.Add(Symbols::DoubleQuotes());
+        literals.Add(Symbols::DoubleQuote());
       }
     } else if (curr == Token::kINTERPOL_VAR) {
       literals.Add(Symbols::Dollar());
@@ -8065,6 +8332,8 @@
 // It also supports lookup by TokenDescriptor.
 class CompressedTokenTraits {
  public:
+  static const char* Name() { return "CompressedTokenTraits"; }
+
   static bool IsMatch(const Scanner::TokenDescriptor& descriptor,
                       const Object& key) {
     if (!key.IsLiteralToken()) {
@@ -8409,10 +8678,7 @@
     Token::Kind kind = static_cast<Token::Kind>(
         Smi::Value(reinterpret_cast<RawSmi*>(obj.raw())));
     ASSERT(kind < Token::kNumTokens);
-    if (Token::IsPseudoKeyword(kind) || Token::IsKeyword(kind)) {
-      return Symbols::Keyword(kind).raw();
-    }
-    return Symbols::New(Token::Str(kind));
+    return Symbols::Token(kind).raw();
   } else {
     ASSERT(obj.IsLiteralToken());  // Must be a literal token.
     const LiteralToken& literal_token = LiteralToken::Cast(obj);
@@ -8705,6 +8971,10 @@
 
 RawString* Script::GetLine(intptr_t line_number, Heap::Space space) const {
   const String& src = String::Handle(Source());
+  if (src.IsNull()) {
+    ASSERT(Dart::IsRunningPrecompiledCode());
+    return Symbols::OptimizedOut().raw();
+  }
   intptr_t relative_line_number = line_number - line_offset();
   intptr_t current_line = 1;
   intptr_t line_start_idx = -1;
@@ -8805,8 +9075,10 @@
 RawScript* Script::New(const String& url,
                        const String& source,
                        RawScript::Kind kind) {
-  const Script& result = Script::Handle(Script::New());
-  result.set_url(String::Handle(Symbols::New(url)));
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const Script& result = Script::Handle(zone, Script::New());
+  result.set_url(String::Handle(zone, Symbols::New(thread, url)));
   result.set_source(source);
   result.set_kind(kind);
   result.SetLocationOffset(0, 0);
@@ -8823,10 +9095,10 @@
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
-  const GrowableObjectArray& libs = GrowableObjectArray::Handle(
-      zone, isolate->object_store()->libraries());
-  Library& lib = Library::Handle();
-  Array& scripts = Array::Handle();
+  const GrowableObjectArray& libs = GrowableObjectArray::Handle(zone,
+      isolate->object_store()->libraries());
+  Library& lib = Library::Handle(zone);
+  Array& scripts = Array::Handle(zone);
   for (intptr_t i = 0; i < libs.Length(); i++) {
     lib ^= libs.At(i);
     scripts = lib.LoadedScripts();
@@ -8990,6 +9262,8 @@
 // Traits for looking up Libraries by url in a hash set.
 class LibraryUrlTraits {
  public:
+  static const char* Name() { return "LibraryUrlTraits"; }
+
   // Called when growing the table.
   static bool IsMatch(const Object& a, const Object& b) {
     ASSERT(a.IsLibrary() && b.IsLibrary());
@@ -9081,49 +9355,57 @@
 }
 
 
-static RawString* MakeClassMetaName(const Class& cls) {
-  return Symbols::FromConcat(Symbols::At(), String::Handle(cls.Name()));
+static RawString* MakeClassMetaName(Thread* thread, Zone* zone,
+                                    const Class& cls) {
+  return Symbols::FromConcat(thread,
+                             Symbols::At(), String::Handle(zone, cls.Name()));
 }
 
 
-static RawString* MakeFieldMetaName(const Field& field) {
-  const String& cname =
-      String::Handle(MakeClassMetaName(Class::Handle(field.Origin())));
-  GrowableHandlePtrArray<const String> pieces(Thread::Current()->zone(), 3);
+static RawString* MakeFieldMetaName(Thread* thread, Zone* zone,
+                                    const Field& field) {
+  const String& cname = String::Handle(zone,
+      MakeClassMetaName(thread, zone, Class::Handle(zone, field.Origin())));
+  GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
   pieces.Add(String::Handle(field.name()));
-  return Symbols::FromConcatAll(pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
-static RawString* MakeFunctionMetaName(const Function& func) {
-  const String& cname =
-      String::Handle(MakeClassMetaName(Class::Handle(func.origin())));
-  GrowableHandlePtrArray<const String> pieces(Thread::Current()->zone(), 3);
+static RawString* MakeFunctionMetaName(Thread* thread, Zone* zone,
+                                       const Function& func) {
+  const String& cname = String::Handle(zone,
+      MakeClassMetaName(thread, zone, Class::Handle(zone, func.origin())));
+  GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
   pieces.Add(String::Handle(func.QualifiedScrubbedName()));
-  return Symbols::FromConcatAll(pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
-static RawString* MakeTypeParameterMetaName(const TypeParameter& param) {
-  const String& cname = String::Handle(
-      MakeClassMetaName(Class::Handle(param.parameterized_class())));
-  GrowableHandlePtrArray<const String> pieces(Thread::Current()->zone(), 3);
+static RawString* MakeTypeParameterMetaName(Thread* thread, Zone* zone,
+                                            const TypeParameter& param) {
+  const String& cname = String::Handle(zone,
+      MakeClassMetaName(thread, zone,
+                        Class::Handle(zone, param.parameterized_class())));
+  GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
   pieces.Add(String::Handle(param.name()));
-  return Symbols::FromConcatAll(pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
 void Library::AddMetadata(const Object& owner,
                           const String& name,
                           TokenPosition token_pos) const {
-  const String& metaname = String::Handle(Symbols::New(name));
-  const Field& field = Field::Handle(
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const String& metaname = String::Handle(zone, Symbols::New(thread, name));
+  const Field& field = Field::Handle(zone,
       Field::NewTopLevel(metaname,
                          false,  // is_final
                          false,  // is_const
@@ -9133,7 +9415,7 @@
   field.set_is_reflectable(false);
   field.SetStaticValue(Array::empty_array(), true);
   GrowableObjectArray& metadata =
-      GrowableObjectArray::Handle(this->metadata());
+      GrowableObjectArray::Handle(zone, this->metadata());
   metadata.Add(field, Heap::kOld);
 }
 
@@ -9141,34 +9423,43 @@
 void Library::AddClassMetadata(const Class& cls,
                                const Object& tl_owner,
                                TokenPosition token_pos) const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   // We use the toplevel class as the owner of a class's metadata field because
   // a class's metadata is in scope of the library, not the class.
   AddMetadata(tl_owner,
-              String::Handle(MakeClassMetaName(cls)),
+              String::Handle(zone, MakeClassMetaName(thread, zone, cls)),
               token_pos);
 }
 
 
 void Library::AddFieldMetadata(const Field& field,
                                TokenPosition token_pos) const {
-  AddMetadata(Object::Handle(field.RawOwner()),
-              String::Handle(MakeFieldMetaName(field)),
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  AddMetadata(Object::Handle(zone, field.RawOwner()),
+              String::Handle(zone, MakeFieldMetaName(thread, zone, field)),
               token_pos);
 }
 
 
 void Library::AddFunctionMetadata(const Function& func,
                                   TokenPosition token_pos) const {
-  AddMetadata(Object::Handle(func.RawOwner()),
-              String::Handle(MakeFunctionMetaName(func)),
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  AddMetadata(Object::Handle(zone, func.RawOwner()),
+              String::Handle(zone, MakeFunctionMetaName(thread, zone, func)),
               token_pos);
 }
 
 
 void Library::AddTypeParameterMetadata(const TypeParameter& param,
                                        TokenPosition token_pos) const {
-  AddMetadata(Class::Handle(param.parameterized_class()),
-              String::Handle(MakeTypeParameterMetaName(param)),
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  AddMetadata(Class::Handle(zone, param.parameterized_class()),
+              String::Handle(zone,
+                             MakeTypeParameterMetaName(thread, zone, param)),
               token_pos);
 }
 
@@ -9180,16 +9471,18 @@
 
 
 RawString* Library::MakeMetadataName(const Object& obj) const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   if (obj.IsClass()) {
-    return MakeClassMetaName(Class::Cast(obj));
+    return MakeClassMetaName(thread, zone, Class::Cast(obj));
   } else if (obj.IsField()) {
-    return MakeFieldMetaName(Field::Cast(obj));
+    return MakeFieldMetaName(thread, zone, Field::Cast(obj));
   } else if (obj.IsFunction()) {
-    return MakeFunctionMetaName(Function::Cast(obj));
+    return MakeFunctionMetaName(thread, zone, Function::Cast(obj));
   } else if (obj.IsLibrary()) {
     return Symbols::TopLevel().raw();
   } else if (obj.IsTypeParameter()) {
-    return MakeTypeParameterMetaName(TypeParameter::Cast(obj));
+    return MakeTypeParameterMetaName(thread, zone, TypeParameter::Cast(obj));
   }
   UNIMPLEMENTED();
   return String::null();
@@ -9239,14 +9532,13 @@
 
 static bool ShouldBePrivate(const String& name) {
   return
-      (name.Length() >= 1 &&
-       name.CharAt(0) == '_') ||
+      (name.Length() >= 1 && name.CharAt(0) == '_') ||
       (name.Length() >= 5 &&
-       (name.CharAt(4) == '_' &&
-        (name.CharAt(0) == 'g' || name.CharAt(0) == 's') &&
-        name.CharAt(1) == 'e' &&
-        name.CharAt(2) == 't' &&
-        name.CharAt(3) == ':'));
+        (name.CharAt(4) == '_' &&
+          (name.CharAt(0) == 'g' || name.CharAt(0) == 's') &&
+          name.CharAt(1) == 'e' &&
+          name.CharAt(2) == 't' &&
+          name.CharAt(3) == ':'));
 }
 
 
@@ -9261,11 +9553,15 @@
     // are not cached. This reduces the size of the the cache.
     return obj.raw();
   }
-  String& accessor_name = String::Handle(Field::GetterName(name));
-  obj = LookupLocalObject(accessor_name);
-  if (obj.IsNull()) {
-    accessor_name = Field::SetterName(name);
+  String& accessor_name = String::Handle(Field::LookupGetterSymbol(name));
+  if (!accessor_name.IsNull()) {
     obj = LookupLocalObject(accessor_name);
+  }
+  if (obj.IsNull()) {
+    accessor_name = Field::LookupSetterSymbol(name);
+    if (!accessor_name.IsNull()) {
+      obj = LookupLocalObject(accessor_name);
+    }
     if (obj.IsNull() && !ShouldBePrivate(name)) {
       obj = LookupImportedObject(name);
     }
@@ -9277,6 +9573,8 @@
 
 class StringEqualsTraits {
  public:
+  static const char* Name() { return "StringEqualsTraits"; }
+
   static bool IsMatch(const Object& a, const Object& b) {
     return String::Cast(a).Equals(String::Cast(b));
   }
@@ -9308,6 +9606,7 @@
 // the name does not resolve to anything in this library scope.
 void Library::AddToResolvedNamesCache(const String& name,
                                       const Object& obj) const {
+  ASSERT(!Compiler::IsBackgroundCompilation());
   if (!FLAG_use_lib_cache) {
     return;
   }
@@ -9366,6 +9665,7 @@
 
 
 void Library::AddObject(const Object& obj, const String& name) const {
+  ASSERT(!Compiler::IsBackgroundCompilation());
   ASSERT(obj.IsClass() ||
          obj.IsFunction() ||
          obj.IsField() ||
@@ -9403,23 +9703,42 @@
 }
 
 
-// Lookup a name in the library's re-export namespace. The name is
-// unmangled, i.e. no getter or setter names should be looked up.
+// Lookup a name in the library's re-export namespace.
+// This lookup can occur from two different threads: background compiler and
+// mutator thread.
 RawObject* Library::LookupReExport(const String& name) const {
   if (HasExports()) {
-    const Array& exports = Array::Handle(this->exports());
-    // Break potential export cycle while looking up name.
-    StorePointer(&raw_ptr()->exports_, Object::empty_array().raw());
+    const bool is_background_compiler = Compiler::IsBackgroundCompilation();
+    Array& exports = Array::Handle();
+    if (is_background_compiler) {
+      exports = this->exports2();
+      // Break potential export cycle while looking up name.
+      StorePointer(&raw_ptr()->exports2_, Object::empty_array().raw());
+    } else {
+      exports = this->exports();
+      // Break potential export cycle while looking up name.
+      StorePointer(&raw_ptr()->exports_, Object::empty_array().raw());
+    }
     Namespace& ns = Namespace::Handle();
     Object& obj = Object::Handle();
     for (int i = 0; i < exports.Length(); i++) {
       ns ^= exports.At(i);
       obj = ns.Lookup(name);
       if (!obj.IsNull()) {
-        break;
+        // The Lookup call above may return a setter x= when we are looking
+        // for the name x. Make sure we only return when a matching name
+        // is found.
+        String& obj_name = String::Handle(obj.DictionaryName());
+        if (Field::IsSetterName(obj_name) == Field::IsSetterName(name)) {
+          break;
+        }
       }
     }
-    StorePointer(&raw_ptr()->exports_, exports.raw());
+    if (is_background_compiler) {
+      StorePointer(&raw_ptr()->exports2_, exports.raw());
+    } else {
+      StorePointer(&raw_ptr()->exports_, exports.raw());
+    }
     return obj.raw();
   }
   return Object::null();
@@ -9453,6 +9772,7 @@
 
 
 void Library::ReplaceObject(const Object& obj, const String& name) const {
+  ASSERT(!Compiler::IsBackgroundCompilation());
   ASSERT(obj.IsClass() || obj.IsFunction() || obj.IsField());
   ASSERT(LookupLocalObject(name) != Object::null());
 
@@ -9465,6 +9785,7 @@
 
 
 bool Library::RemoveObject(const Object& obj, const String& name) const {
+  ASSERT(!Compiler::IsBackgroundCompilation());
   Object& entry = Object::Handle();
 
   intptr_t index;
@@ -9510,6 +9831,7 @@
 
 
 void Library::AddClass(const Class& cls) const {
+  ASSERT(!Compiler::IsBackgroundCompilation());
   const String& class_name = String::Handle(cls.Name());
   AddObject(cls, class_name);
   // Link class to this library.
@@ -9517,6 +9839,7 @@
   InvalidateResolvedName(class_name);
 }
 
+
 static void AddScriptIfUnique(const GrowableObjectArray& scripts,
                               const Script& candidate) {
   if (candidate.IsNull()) {
@@ -9535,6 +9858,7 @@
   scripts.Add(candidate);
 }
 
+
 RawArray* Library::LoadedScripts() const {
   // We compute the list of loaded scripts lazily. The result is
   // cached in loaded_scripts_.
@@ -9731,6 +10055,14 @@
           // The newly found object is exported from a Dart system
           // library. It is hidden by the previously found object.
           // We continue to search.
+        } else if (Field::IsSetterName(found_obj_name) &&
+                   !Field::IsSetterName(name)) {
+          // We are looking for an unmangled name or a getter, but
+          // the first object we found is a setter. Replace the first
+          // object with the one we just found.
+          first_import_lib_url = import_lib.url();
+          found_obj = obj.raw();
+          found_obj_name = found_obj.DictionaryName();
         } else {
           // We found two different objects with the same name.
           // Note that we need to compare the names again because
@@ -9858,6 +10190,7 @@
 void Library::DropDependencies() const {
   StorePointer(&raw_ptr()->imports_, Array::null());
   StorePointer(&raw_ptr()->exports_, Array::null());
+  StorePointer(&raw_ptr()->exports2_, Array::null());
 }
 
 
@@ -9890,6 +10223,7 @@
   intptr_t num_exports = exports.Length();
   exports = Array::Grow(exports, num_exports + 1);
   StorePointer(&raw_ptr()->exports_, exports.raw());
+  StorePointer(&raw_ptr()->exports2_, exports.raw());
   exports.SetAt(num_exports, ns);
 }
 
@@ -9957,6 +10291,8 @@
                                                Heap::kOld));
   result.StorePointer(&result.raw_ptr()->imports_, Object::empty_array().raw());
   result.StorePointer(&result.raw_ptr()->exports_, Object::empty_array().raw());
+  result.StorePointer(&result.raw_ptr()->exports2_,
+      Object::empty_array().raw());
   result.StorePointer(&result.raw_ptr()->loaded_scripts_, Array::null());
   result.StorePointer(&result.raw_ptr()->load_error_, Instance::null());
   result.set_native_entry_resolver(NULL);
@@ -10018,9 +10354,12 @@
 
 void Library::InitNativeWrappersLibrary(Isolate* isolate) {
   static const int kNumNativeWrappersClasses = 4;
-  ASSERT(kNumNativeWrappersClasses > 0 && kNumNativeWrappersClasses < 10);
+  COMPILE_ASSERT((kNumNativeWrappersClasses > 0) &&
+                 (kNumNativeWrappersClasses < 10));
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   const String& native_flds_lib_url = Symbols::DartNativeWrappers();
-  const Library& native_flds_lib = Library::Handle(
+  const Library& native_flds_lib = Library::Handle(zone,
       Library::NewLibraryHelper(native_flds_lib_url, false));
   const String& native_flds_lib_name = Symbols::DartNativeWrappersLibName();
   native_flds_lib.SetName(native_flds_lib_name);
@@ -10032,14 +10371,14 @@
   static const int kNameLength = 25;
   ASSERT(kNameLength == (strlen(kNativeWrappersClass) + 1 + 1));
   char name_buffer[kNameLength];
-  String& cls_name = String::Handle();
+  String& cls_name = String::Handle(zone);
   for (int fld_cnt = 1; fld_cnt <= kNumNativeWrappersClasses; fld_cnt++) {
     OS::SNPrint(name_buffer,
                 kNameLength,
                 "%s%d",
                 kNativeWrappersClass,
                 fld_cnt);
-    cls_name = Symbols::New(name_buffer);
+    cls_name = Symbols::New(thread, name_buffer);
     Class::NewNativeWrapper(native_flds_lib, cls_name, fld_cnt);
   }
   native_flds_lib.SetLoaded();
@@ -10134,11 +10473,14 @@
 
 
 RawClass* Library::LookupCoreClass(const String& class_name) {
-  const Library& core_lib = Library::Handle(Library::CoreLibrary());
-  String& name = String::Handle(class_name.raw());
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const Library& core_lib = Library::Handle(zone, Library::CoreLibrary());
+  String& name = String::Handle(zone, class_name.raw());
   if (class_name.CharAt(0) == kPrivateIdentifierStart) {
     // Private identifiers are mangled on a per library basis.
-    name = Symbols::FromConcat(name, String::Handle(core_lib.private_key()));
+    name = Symbols::FromConcat(thread,
+        name, String::Handle(zone, core_lib.private_key()));
   }
   return core_lib.LookupClass(name);
 }
@@ -10147,11 +10489,14 @@
 // Cannot handle qualified names properly as it only appends private key to
 // the end (e.g. _Alfa.foo -> _Alfa.foo@...).
 RawString* Library::PrivateName(const String& name) const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   ASSERT(IsPrivate(name));
   // ASSERT(strchr(name, '@') == NULL);
-  String& str = String::Handle();
+  String& str = String::Handle(zone);
   str = name.raw();
-  str = Symbols::FromConcat(str, String::Handle(this->private_key()));
+  str = Symbols::FromConcat(thread,
+                            str, String::Handle(zone, this->private_key()));
   return str.raw();
 }
 
@@ -10341,6 +10686,7 @@
   String& import_lib_url = String::Handle();
   String& first_import_lib_url = String::Handle();
   Object& found_obj = Object::Handle();
+  String& found_obj_name = String::Handle();
   for (intptr_t i = 0; i < num_imports(); i++) {
     import ^= imports.At(i);
     obj = import.Lookup(name);
@@ -10356,13 +10702,36 @@
           // from the Dart library.
           first_import_lib_url = import_lib.url();
           found_obj = obj.raw();
+          found_obj_name = found_obj.DictionaryName();
         } else if (import_lib_url.StartsWith(Symbols::DartScheme())) {
           // The newly found object is exported from a Dart system
           // library. It is hidden by the previously found object.
           // We continue to search.
+        } else if (Field::IsSetterName(found_obj_name) &&
+                   !Field::IsSetterName(name)) {
+          // We are looking for an unmangled name or a getter, but
+          // the first object we found is a setter. Replace the first
+          // object with the one we just found.
+          first_import_lib_url = import_lib.url();
+          found_obj = obj.raw();
+          found_obj_name = found_obj.DictionaryName();
         } else {
           // We found two different objects with the same name.
-          return Object::null();
+          // Note that we need to compare the names again because
+          // looking up an unmangled name can return a getter or a
+          // setter. A getter name is the same as the unmangled name,
+          // but a setter name is different from an unmangled name or a
+          // getter name.
+          if (Field::IsGetterName(found_obj_name)) {
+            found_obj_name = Field::NameFromGetter(found_obj_name);
+          }
+          String& second_obj_name = String::Handle(obj.DictionaryName());
+          if (Field::IsGetterName(second_obj_name)) {
+            second_obj_name = Field::NameFromGetter(second_obj_name);
+          }
+          if (found_obj_name.Equals(second_obj_name)) {
+            return Object::null();
+          }
         }
       }
     }
@@ -10473,9 +10842,7 @@
     }
   }
 
-  virtual void IncrementInvalidationGen() {
-    Isolate::Current()->IncrPrefixInvalidationGen();
-  }
+  virtual void IncrementInvalidationGen() {}
 
  private:
   const LibraryPrefix& prefix_;
@@ -10657,15 +11024,15 @@
   if (!Field::IsGetterName(name) &&
       !Field::IsSetterName(name) &&
       (obj.IsNull() || obj.IsLibraryPrefix())) {
-    const String& getter_name = String::Handle(Field::LookupGetterSymbol(name));
-    if (!getter_name.IsNull()) {
-      obj = lib.LookupEntry(getter_name, &ignore);
+    String& accessor_name = String::Handle(zone);
+    accessor_name ^= Field::LookupGetterSymbol(name);
+    if (!accessor_name.IsNull()) {
+      obj = lib.LookupEntry(accessor_name, &ignore);
     }
     if (obj.IsNull()) {
-      const String& setter_name =
-          String::Handle(Field::LookupSetterSymbol(name));
-      if (!setter_name.IsNull()) {
-        obj = lib.LookupEntry(setter_name, &ignore);
+      accessor_name ^= Field::LookupSetterSymbol(name);
+      if (!accessor_name.IsNull()) {
+        obj = lib.LookupEntry(accessor_name, &ignore);
       }
     }
   }
@@ -10674,6 +11041,15 @@
   if (obj.IsNull() || obj.IsLibraryPrefix()) {
     // Lookup in the re-exported symbols.
     obj = lib.LookupReExport(name);
+    if (obj.IsNull() && !Field::IsSetterName(name)) {
+      // LookupReExport() only returns objects that match the given name.
+      // If there is no field/func/getter, try finding a setter.
+      const String& setter_name =
+          String::Handle(zone, Field::LookupSetterSymbol(name));
+      if (!setter_name.IsNull()) {
+        obj = lib.LookupReExport(setter_name);
+      }
+    }
   }
   if (obj.IsNull() || HidesName(name) || obj.IsLibraryPrefix()) {
     return Object::null();
@@ -10753,14 +11129,16 @@
 RawFunction* Library::GetFunction(const GrowableArray<Library*>& libs,
                                   const char* class_name,
                                   const char* function_name) {
-  Function& func = Function::Handle();
-  String& class_str = String::Handle();
-  String& func_str = String::Handle();
-  Class& cls = Class::Handle();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Function& func = Function::Handle(zone);
+  String& class_str = String::Handle(zone);
+  String& func_str = String::Handle(zone);
+  Class& cls = Class::Handle(zone);
   for (intptr_t l = 0; l < libs.length(); l++) {
     const Library& lib = *libs[l];
     if (strcmp(class_name, "::") == 0) {
-      func_str = Symbols::New(function_name);
+      func_str = Symbols::New(thread, function_name);
       func = lib.LookupFunctionAllowPrivate(func_str);
     } else {
       class_str = String::New(class_name);
@@ -11366,7 +11744,7 @@
 
 RawStackmap* Stackmap::New(intptr_t pc_offset,
                            BitmapBuilder* bmap,
-                           intptr_t register_bit_count) {
+                           intptr_t slow_path_bit_count) {
   ASSERT(Object::stackmap_class() != Class::null());
   ASSERT(bmap != NULL);
   Stackmap& result = Stackmap::Handle();
@@ -11398,13 +11776,13 @@
   for (intptr_t i = 0; i < length; ++i) {
     result.SetBit(i, bmap->Get(i));
   }
-  result.SetRegisterBitCount(register_bit_count);
+  result.SetSlowPathBitCount(slow_path_bit_count);
   return result.raw();
 }
 
 
 RawStackmap* Stackmap::New(intptr_t length,
-                           intptr_t register_bit_count,
+                           intptr_t slow_path_bit_count,
                            intptr_t pc_offset) {
   ASSERT(Object::stackmap_class() != Class::null());
   Stackmap& result = Stackmap::Handle();
@@ -11432,7 +11810,7 @@
   // address.
   ASSERT(pc_offset >= 0);
   result.SetPcOffset(pc_offset);
-  result.SetRegisterBitCount(register_bit_count);
+  result.SetSlowPathBitCount(slow_path_bit_count);
   return result.raw();
 }
 
@@ -11666,6 +12044,7 @@
 void ExceptionHandlers::SetHandledTypes(intptr_t try_index,
                                         const Array& handled_types) const {
   ASSERT((try_index >= 0) && (try_index < num_entries()));
+  ASSERT(!handled_types.IsNull());
   const Array& handled_types_data =
       Array::Handle(raw_ptr()->handled_types_data_);
   handled_types_data.SetAt(try_index, handled_types);
@@ -11955,6 +12334,7 @@
   StorePointer(&raw_ptr()->args_descriptor_, value.raw());
 }
 
+
 void ICData::set_deopt_id(intptr_t value) const {
   ASSERT(value <= kMaxInt32);
   StoreNonPointer(&raw_ptr()->deopt_id_, value);
@@ -11967,6 +12347,12 @@
 }
 
 
+#if defined(TAG_IC_DATA)
+void ICData::set_tag(intptr_t value) const {
+  StoreNonPointer(&raw_ptr()->tag_, value);
+}
+#endif
+
 intptr_t ICData::NumArgsTested() const {
   return NumArgsTestedBits::decode(raw_ptr()->state_bits_);
 }
@@ -12189,8 +12575,18 @@
     data_pos = 0;
   }
   data.SetAt(data_pos, Smi::Handle(Smi::New(receiver_class_id)));
-  data.SetAt(data_pos + 1, target);
-  data.SetAt(data_pos + 2, Smi::Handle(Smi::New(count)));
+  if (Isolate::Current()->compilation_allowed()) {
+    data.SetAt(data_pos + 1, target);
+    data.SetAt(data_pos + 2, Smi::Handle(Smi::New(count)));
+  } else {
+    // Precompilation only, after all functions have been compiled.
+    ASSERT(target.HasCode());
+    const Code& code = Code::Handle(target.CurrentCode());
+    const Smi& entry_point =
+        Smi::Handle(Smi::FromAlignedAddress(code.EntryPoint()));
+    data.SetAt(data_pos + 1, code);
+    data.SetAt(data_pos + 2, entry_point);
+  }
   // Multithreaded access to ICData requires setting of array to be the last
   // operation.
   set_ic_data_array(data);
@@ -12264,6 +12660,7 @@
 
 
 RawFunction* ICData::GetTargetAt(intptr_t index) const {
+  ASSERT(Isolate::Current()->compilation_allowed());
   const intptr_t data_pos = index * TestEntryLength() + NumArgsTested();
   ASSERT(Object::Handle(Array::Handle(ic_data()).At(data_pos)).IsFunction());
 
@@ -12273,6 +12670,15 @@
 }
 
 
+RawObject* ICData::GetTargetOrCodeAt(intptr_t index) const {
+  const intptr_t data_pos = index * TestEntryLength() + NumArgsTested();
+
+  NoSafepointScope no_safepoint;
+  RawArray* raw_data = ic_data();
+  return raw_data->ptr()->data()[data_pos];
+}
+
+
 void ICData::IncrementCountAt(intptr_t index, intptr_t value) const {
   ASSERT(0 <= value);
   ASSERT(value <= Smi::kMaxValue);
@@ -12292,6 +12698,7 @@
 
 
 intptr_t ICData::GetCountAt(intptr_t index) const {
+  ASSERT(Isolate::Current()->compilation_allowed());
   const Array& data = Array::Handle(ic_data());
   const intptr_t data_pos = index * TestEntryLength() +
       CountIndexFor(NumArgsTested());
@@ -12310,6 +12717,24 @@
 }
 
 
+void ICData::SetCodeAt(intptr_t index, const Code& value) const {
+  ASSERT(!Isolate::Current()->compilation_allowed());
+  const Array& data = Array::Handle(ic_data());
+  const intptr_t data_pos = index * TestEntryLength() +
+      CodeIndexFor(NumArgsTested());
+  data.SetAt(data_pos, value);
+}
+
+
+void ICData::SetEntryPointAt(intptr_t index, const Smi& value) const {
+  ASSERT(!Isolate::Current()->compilation_allowed());
+  const Array& data = Array::Handle(ic_data());
+  const intptr_t data_pos = index * TestEntryLength() +
+      EntryPointIndexFor(NumArgsTested());
+  data.SetAt(data_pos, value);
+}
+
+
 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const {
   const intptr_t len = NumberOfChecks();
   for (intptr_t i = 0; i < len; i++) {
@@ -12508,6 +12933,9 @@
   result.set_arguments_descriptor(arguments_descriptor);
   result.set_deopt_id(deopt_id);
   result.set_state_bits(0);
+#if defined(TAG_IC_DATA)
+  result.set_tag(-1);
+#endif
   result.SetNumArgsTested(num_args_tested);
   return result.raw();
 }
@@ -12525,6 +12953,9 @@
   }
   result.set_deopt_id(Thread::kNoDeoptId);
   result.set_state_bits(0);
+#if defined(TAG_IC_DATA)
+  result.set_tag(-1);
+#endif
   return result.raw();
 }
 
@@ -12787,6 +13218,26 @@
 }
 
 
+uword Code::EntryPoint() const {
+  RawObject* instr = instructions();
+  if (!instr->IsHeapObject()) {
+    return active_entry_point();
+  } else {
+    return Instructions::EntryPoint(instructions());
+  }
+}
+
+
+intptr_t Code::Size() const {
+  RawObject* instr = instructions();
+  if (!instr->IsHeapObject()) {
+    return Smi::Value(raw_ptr()->precompiled_instructions_size_);
+  } else {
+    return instructions()->ptr()->size_;
+  }
+}
+
+
 bool Code::HasBreakpoint() const {
   if (!FLAG_support_debugger) {
     return false;
@@ -12795,6 +13246,15 @@
 }
 
 
+TokenPosition Code::GetTokenPositionAt(intptr_t offset) const {
+  const CodeSourceMap& map = CodeSourceMap::Handle(code_source_map());
+  if (map.IsNull()) {
+    return TokenPosition::kNoSource;
+  }
+  return map.TokenPositionForPCOffset(offset);
+}
+
+
 RawTypedData* Code::GetDeoptInfoAtPc(uword pc,
                                      ICData::DeoptReasonId* deopt_reason,
                                      uint32_t* deopt_flags) const {
@@ -13123,10 +13583,13 @@
     }
 
     // Hook up Code and Instructions objects.
-    code.SetActiveInstructions(instrs.raw());
     code.set_instructions(instrs.raw());
+    code.SetActiveInstructions(instrs.raw());
     code.set_is_alive(true);
 
+    ASSERT(code.EntryPoint() == instrs.EntryPoint());
+    ASSERT(code.Size() == instrs.size());
+
     // Set object pool in Instructions object.
     INC_STAT(Thread::Current(),
              total_code_size, object_pool.Length() * sizeof(uintptr_t));
@@ -13276,16 +13739,20 @@
   const Object& obj = Object::Handle(owner());
   if (obj.IsNull()) {
     // Regular stub.
+    Thread* thread = Thread::Current();
+    Zone* zone = thread->zone();
     const char* name = StubCode::NameOfStub(EntryPoint());
     ASSERT(name != NULL);
-    const String& stub_name = String::Handle(Symbols::New(name));
-    return Symbols::FromConcat(Symbols::StubPrefix(), stub_name);
+    const String& stub_name = String::Handle(zone, String::New(name));
+    return Symbols::FromConcat(thread, Symbols::StubPrefix(), stub_name);
   } else if (obj.IsClass()) {
     // Allocation stub.
+    Thread* thread = Thread::Current();
+    Zone* zone = thread->zone();
     const Class& cls = Class::Cast(obj);
-    String& cls_name = String::Handle(cls.ScrubbedName());
+    String& cls_name = String::Handle(zone, cls.ScrubbedName());
     ASSERT(!cls_name.IsNull());
-    return Symbols::FromConcat(Symbols::AllocationStubFor(), cls_name);
+    return Symbols::FromConcat(thread, Symbols::AllocationStubFor(), cls_name);
   } else {
     ASSERT(obj.IsFunction());
     // Dart function.
@@ -13324,9 +13791,10 @@
 void Code::DisableDartCode() const {
   DEBUG_ASSERT(IsMutatorOrAtSafepoint());
   ASSERT(IsFunctionCode());
-  ASSERT(instructions() == active_instructions());
+  ASSERT(!IsDisabled());
   const Code& new_code =
       Code::Handle(StubCode::FixCallersTarget_entry()->code());
+  ASSERT(new_code.instructions()->IsVMHeapObject());
   SetActiveInstructions(new_code.instructions());
 }
 
@@ -13334,9 +13802,10 @@
 void Code::DisableStubCode() const {
   ASSERT(Thread::Current()->IsMutatorThread());
   ASSERT(IsAllocationStubCode());
-  ASSERT(instructions() == active_instructions());
+  ASSERT(!IsDisabled());
   const Code& new_code =
       Code::Handle(StubCode::FixAllocationStubTarget_entry()->code());
+  ASSERT(new_code.instructions()->IsVMHeapObject());
   SetActiveInstructions(new_code.instructions());
 }
 
@@ -13345,7 +13814,6 @@
   DEBUG_ASSERT(IsMutatorOrAtSafepoint() || !is_alive());
   // RawInstructions are never allocated in New space and hence a
   // store buffer update is not needed here.
-  StorePointer(&raw_ptr()->active_instructions_, instructions);
   StoreNonPointer(&raw_ptr()->entry_point_,
                   reinterpret_cast<uword>(instructions->ptr()) +
                   Instructions::HeaderSize());
@@ -13399,8 +13867,13 @@
 
 
 void Code::GetInlinedFunctionsAt(
-    intptr_t offset, GrowableArray<Function*>* fs) const {
+    intptr_t offset,
+    GrowableArray<Function*>* fs,
+    GrowableArray<TokenPosition>* token_positions) const {
   fs->Clear();
+  if (token_positions != NULL) {
+    token_positions->Clear();
+  }
   const Array& intervals = Array::Handle(GetInlinedIntervals());
   if (intervals.IsNull() || (intervals.Length() == 0)) {
     // E.g., for code stubs.
@@ -13425,6 +13898,7 @@
 
   // Find all functions.
   const Array& id_map = Array::Handle(GetInlinedIdToFunction());
+  const Array& token_pos_map = Array::Handle(GetInlinedIdToTokenPos());
   Smi& temp_smi = Smi::Handle();
   temp_smi ^= intervals.At(found_interval_ix + Code::kInlIntInliningId);
   intptr_t inlining_id = temp_smi.Value();
@@ -13432,8 +13906,12 @@
   intptr_t caller_id = GetCallerId(inlining_id);
   while (inlining_id >= 0) {
     Function& function = Function::ZoneHandle();
-    function  ^= id_map.At(inlining_id);
+    function ^= id_map.At(inlining_id);
     fs->Add(&function);
+    if ((token_positions != NULL) && (inlining_id < token_pos_map.Length())) {
+      temp_smi ^= token_pos_map.At(inlining_id);
+      token_positions->Add(TokenPosition(temp_smi.Value()));
+    }
     inlining_id = caller_id;
     caller_id = GetCallerId(inlining_id);
   }
@@ -13557,7 +14035,12 @@
   for (intptr_t i = 0; i < num_variables(); i++) {
     IndentN(indent + 2);
     obj = At(i);
-    THR_Print("[%" Pd "] = %s\n", i, obj.ToCString());
+    const char* s = obj.ToCString();
+    if (strlen(s) > 50) {
+      THR_Print("[%" Pd "] = [first 50 chars:] %.50s...\n", i, s);
+    } else {
+      THR_Print("[%" Pd "] = %s\n", i, s);
+    }
   }
 
   const Context& parent_ctx = Context::Handle(parent());
@@ -14230,12 +14713,12 @@
 }
 
 
-RawObject* Instance::Evaluate(const String& expr,
+RawObject* Instance::Evaluate(const Class& method_cls,
+                              const String& expr,
                               const Array& param_names,
                               const Array& param_values) const {
-  const Class& cls = Class::Handle(clazz());
   const Function& eval_func =
-      Function::Handle(EvaluateHelper(cls, expr, param_names, false));
+      Function::Handle(EvaluateHelper(method_cls, expr, param_names, false));
   const Array& args = Array::Handle(Array::New(1 + param_values.Length()));
   PassiveObject& param = PassiveObject::Handle();
   args.SetAt(0, *this);
@@ -14305,12 +14788,13 @@
 #endif  // DEBUG
 
 
-bool Instance::CheckAndCanonicalizeFields(const char** error_str) const {
-  const Class& cls = Class::Handle(this->clazz());
+bool Instance::CheckAndCanonicalizeFields(Zone* zone,
+                                          const char** error_str) const {
+  const Class& cls = Class::Handle(zone, this->clazz());
   if (cls.id() >= kNumPredefinedCids) {
     // Iterate over all fields, canonicalize numbers and strings, expect all
     // other instances to be canonical otherwise report error (return false).
-    Object& obj = Object::Handle();
+    Object& obj = Object::Handle(zone);
     intptr_t end_field_offset = cls.instance_size() - kWordSize;
     for (intptr_t field_offset = 0;
          field_offset <= end_field_offset;
@@ -14323,8 +14807,7 @@
           this->SetFieldAtOffset(field_offset, obj);
         } else {
           ASSERT(error_str != NULL);
-          char* chars = OS::SCreate(Thread::Current()->zone(),
-              "field: %s\n", obj.ToCString());
+          char* chars = OS::SCreate(zone, "field: %s\n", obj.ToCString());
           *error_str = chars;
           return false;
         }
@@ -14347,57 +14830,42 @@
   if (this->IsCanonical()) {
     return this->raw();
   }
-  if (!CheckAndCanonicalizeFields(error_str)) {
-    return Instance::null();
-  }
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
+  if (!CheckAndCanonicalizeFields(zone, error_str)) {
+    return Instance::null();
+  }
   Isolate* isolate = thread->isolate();
   Instance& result = Instance::Handle(zone);
   const Class& cls = Class::Handle(zone, this->clazz());
-  Array& constants = Array::Handle(zone, cls.constants());
-  const intptr_t constants_len = constants.Length();
-  // Linear search to see whether this value is already present in the
-  // list of canonicalized constants.
   intptr_t index = 0;
-  while (index < constants_len) {
-    result ^= constants.At(index);
-    if (result.IsNull()) {
-      break;
-    }
-    if (this->CanonicalizeEquals(result)) {
-      ASSERT(result.IsCanonical());
-      return result.raw();
-    }
-    index++;
+  result ^= cls.LookupCanonicalInstance(zone, *this, &index);
+  if (!result.IsNull()) {
+    return result.raw();
   }
-  // The value needs to be added to the list. Grow the list if
-  // it is full.
-  result ^= this->raw();
-  if (result.IsNew() ||
-      (result.InVMHeap() && (isolate != Dart::vm_isolate()))) {
-    /**
-     * When a snapshot is generated on a 64 bit architecture and then read
-     * into a 32 bit architecture, values which are Smi on the 64 bit
-     * architecture could potentially be converted to Mint objects, however
-     * since Smi values do not have any notion of canonical bits we lose
-     * that information when the object becomes a Mint.
-     * Some of these values could be literal values and end up in the
-     * VM isolate heap. Later when these values are referenced in a
-     * constant list we try to ensure that all the objects in the list
-     * are canonical and try to canonicalize them. When these Mint objects
-     * are encountered they do not have the canonical bit set and
-     * canonicalizing them won't work as the VM heap is read only now.
-     * In these cases we clone the object into the isolate and then
-     * canonicalize it.
-     */
-    // Create a canonical object in old space.
-    result ^= Object::Clone(result, Heap::kOld);
+  {
+    SafepointMutexLocker ml(isolate->constant_canonicalization_mutex());
+    // Retry lookup.
+    {
+      result ^= cls.LookupCanonicalInstance(zone, *this, &index);
+      if (!result.IsNull()) {
+        return result.raw();
+      }
+    }
+
+    // The value needs to be added to the list. Grow the list if
+    // it is full.
+    result ^= this->raw();
+    ASSERT((isolate == Dart::vm_isolate()) || !result.InVMHeap());
+    if (result.IsNew()) {
+      // Create a canonical object in old space.
+      result ^= Object::Clone(result, Heap::kOld);
+    }
+    ASSERT(result.IsOld());
+    result.SetCanonical();
+    cls.InsertCanonicalConstant(index, result);
+    return result.raw();
   }
-  ASSERT(result.IsOld());
-  cls.InsertCanonicalConstant(index, result);
-  result.SetCanonical();
-  return result.raw();
 }
 
 
@@ -14409,8 +14877,8 @@
   if (cls.IsClosureClass()) {
     const Function& signature =
         Function::Handle(Closure::Cast(*this).function());
-    FunctionType& type = FunctionType::Handle(signature.SignatureType());
-    if (type.scope_class() == cls.raw()) {
+    Type& type = Type::Handle(signature.SignatureType());
+    if (type.type_class() == cls.raw()) {
       // Type is not parameterized.
       if (!type.IsCanonical()) {
         type ^= type.Canonicalize();
@@ -14418,11 +14886,11 @@
       }
       return type.raw();
     }
-    const Class& scope_cls = Class::Handle(type.scope_class());
+    const Class& scope_cls = Class::Handle(type.type_class());
     ASSERT(scope_cls.NumTypeArguments() > 0);
     TypeArguments& type_arguments = TypeArguments::Handle(GetTypeArguments());
-    type = FunctionType::New(
-        scope_cls, type_arguments, signature, TokenPosition::kNoSource);
+    type = Type::New(scope_cls, type_arguments, TokenPosition::kNoSource);
+    type.set_signature(signature);
     type.SetIsFinalized();
     type ^= type.Canonicalize();
     return type.raw();
@@ -14502,13 +14970,13 @@
       if (!instantiated_other.IsFunctionType()) {
         return false;
       }
-      other_signature = FunctionType::Cast(instantiated_other).signature();
+      other_signature = Type::Cast(instantiated_other).signature();
       other_type_arguments = instantiated_other.arguments();
     } else {
       if (!other.IsFunctionType()) {
         return false;
       }
-      other_signature = FunctionType::Cast(other).signature();
+      other_signature = Type::Cast(other).signature();
       other_type_arguments = other.arguments();
     }
     const Function& signature =
@@ -14573,7 +15041,7 @@
         return true;
       }
       const Function& other_signature = Function::Handle(
-          zone, FunctionType::Cast(instantiated_other).signature());
+          zone, Type::Cast(instantiated_other).signature());
       if (call.IsSubtypeOf(type_arguments,
                            other_signature,
                            other_type_arguments,
@@ -14605,7 +15073,8 @@
     return Integer::Cast(*this).Equals(other);
   }
   if (IsDouble() && other.IsDouble()) {
-    return Double::Cast(*this).CanonicalizeEquals(other);
+    double other_value = Double::Cast(other).value();
+    return Double::Cast(*this).BitwiseEqualsToDouble(other_value);
   }
   return false;
 }
@@ -15026,9 +15495,10 @@
 
 RawString* AbstractType::BuildName(NameVisibility name_visibility) const {
   ASSERT(name_visibility != kScrubbedName);
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   if (IsBoundedType()) {
-    const AbstractType& type = AbstractType::Handle(
+    const AbstractType& type = AbstractType::Handle(zone,
         BoundedType::Cast(*this).type());
     if (name_visibility == kUserVisibleName) {
       return type.BuildName(kUserVisibleName);
@@ -15038,8 +15508,8 @@
     pieces.Add(type_name);
     pieces.Add(Symbols::SpaceExtendsSpace());
     // Build the bound name without causing divergence.
-    const AbstractType& bound = AbstractType::Handle(
-        zone, BoundedType::Cast(*this).bound());
+    const AbstractType& bound = AbstractType::Handle(zone,
+        BoundedType::Cast(*this).bound());
     String& bound_name = String::Handle(zone);
     if (bound.IsTypeParameter()) {
       bound_name = TypeParameter::Cast(bound).name();
@@ -15054,7 +15524,7 @@
     } else {
       pieces.Add(Symbols::OptimizedOut());
     }
-    return Symbols::FromConcatAll(pieces);
+    return Symbols::FromConcatAll(thread, pieces);
   }
   if (IsTypeParameter()) {
     return TypeParameter::Cast(*this).name();
@@ -15069,8 +15539,8 @@
   Class& cls = Class::Handle(zone);
   if (IsFunctionType()) {
     cls = type_class();
-    const Function& signature_function = Function::Handle(
-        zone, FunctionType::Cast(*this).signature());
+    const Function& signature_function = Function::Handle(zone,
+        Type::Cast(*this).signature());
     if (!cls.IsTypedefClass() ||
         (cls.signature_function() != signature_function.raw())) {
       if (!IsFinalized() || IsBeingFinalized() || IsMalformed()) {
@@ -15145,7 +15615,7 @@
   // The name is only used for type checking and debugging purposes.
   // Unless profiling data shows otherwise, it is not worth caching the name in
   // the type.
-  return Symbols::FromConcatAll(pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
@@ -15163,16 +15633,20 @@
 //                            MyClass is from my_uri
 //                            int is from dart:core
 RawString* AbstractType::UserVisibleNameWithURI() const {
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(String::Handle(zone, BuildName(kUserVisibleName)));
-  pieces.Add(Symbols::SpaceWhereNewLine());
-  pieces.Add(String::Handle(zone, EnumerateURIs()));
-  return Symbols::FromConcatAll(pieces);
+  if (!IsDynamicType() && !IsVoidType()) {
+    pieces.Add(Symbols::SpaceWhereNewLine());
+    pieces.Add(String::Handle(zone, EnumerateURIs()));
+  }
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
 RawString* AbstractType::ClassName() const {
+  ASSERT(!IsFunctionType());
   if (HasResolvedTypeClass()) {
     return Class::Handle(type_class()).Name();
   } else {
@@ -15182,68 +15656,79 @@
 
 
 bool AbstractType::IsNullType() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Isolate::Current()->object_store()->null_class());
 }
 
 
 bool AbstractType::IsBoolType() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Isolate::Current()->object_store()->bool_class());
 }
 
 
 bool AbstractType::IsIntType() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Type::Handle(Type::IntType()).type_class());
 }
 
 
 bool AbstractType::IsDoubleType() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Type::Handle(Type::Double()).type_class());
 }
 
 
 bool AbstractType::IsFloat32x4Type() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Type::Handle(Type::Float32x4()).type_class());
 }
 
 
 bool AbstractType::IsFloat64x2Type() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Type::Handle(Type::Float64x2()).type_class());
 }
 
 
 bool AbstractType::IsInt32x4Type() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Type::Handle(Type::Int32x4()).type_class());
 }
 
 
 bool AbstractType::IsNumberType() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Type::Handle(Type::Number()).type_class());
 }
 
 
 bool AbstractType::IsSmiType() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Type::Handle(Type::SmiType()).type_class());
 }
 
 
 bool AbstractType::IsStringType() const {
-  return HasResolvedTypeClass() &&
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
       (type_class() == Type::Handle(Type::StringType()).type_class());
 }
 
 
 bool AbstractType::IsDartFunctionType() const {
-  return HasResolvedTypeClass() &&
-      (type_class() == Type::Handle(Type::Function()).type_class());
+  return !IsFunctionType() &&
+      HasResolvedTypeClass() &&
+      (type_class() == Type::Handle(Type::DartFunctionType()).type_class());
 }
 
 
@@ -15283,6 +15768,7 @@
   if (other.IsObjectType() || other.IsDynamicType()) {
     return true;
   }
+  Zone* zone = Thread::Current()->zone();
   if (IsBoundedType() || other.IsBoundedType()) {
     if (Equals(other)) {
       return true;
@@ -15292,9 +15778,30 @@
         AbstractType::Handle(BoundedType::Cast(*this).bound()).Equals(other)) {
       return true;
     }
-    return false;  // TODO(regis): We should return "maybe after instantiation".
+    // Bound checking at run time occurs when allocating an instance of a
+    // generic bounded type using a valid instantiator. The instantiator is
+    // the type of an instance successfully allocated, i.e. not containing
+    // unchecked bounds anymore.
+    // Therefore, when performing a type test at compile time (what is happening
+    // here), it is safe to ignore the bounds, since they will not exist at run
+    // time anymore.
+    if (IsBoundedType()) {
+      const AbstractType& bounded_type =
+          AbstractType::Handle(zone, BoundedType::Cast(*this).type());
+      return bounded_type.TypeTest(test_kind,
+                                   other,
+                                   bound_error,
+                                   bound_trail,
+                                   space);
+    }
+    const AbstractType& other_bounded_type =
+        AbstractType::Handle(zone, BoundedType::Cast(other).type());
+    return TypeTest(test_kind,
+                    other_bounded_type,
+                    bound_error,
+                    bound_trail,
+                    space);
   }
-  Zone* zone = Thread::Current()->zone();
   // Type parameters cannot be handled by Class::TypeTest().
   // When comparing two uninstantiated function types, one returning type
   // parameter K, the other returning type parameter V, we cannot assume that K
@@ -15319,7 +15826,7 @@
     // We may be checking bounds at finalization time and can encounter
     // a still unfinalized bound. Finalizing the bound here may lead to cycles.
     if (!bound.IsFinalized()) {
-      return false;    // TODO(regis): Return "maybe after instantiation".
+      return false;  // TODO(regis): Return "maybe after instantiation".
     }
     // The current bound_trail cannot be used, because operands are swapped and
     // the test is different anyway (more specific vs. subtype).
@@ -15340,10 +15847,10 @@
         return true;
       }
       const Function& other_fun =
-          Function::Handle(zone, FunctionType::Cast(other).signature());
+          Function::Handle(zone, Type::Cast(other).signature());
       // Check for two function types.
       const Function& fun =
-          Function::Handle(zone, FunctionType::Cast(*this).signature());
+          Function::Handle(zone, Type::Cast(*this).signature());
       return fun.TypeTest(test_kind,
                           TypeArguments::Handle(zone, arguments()),
                           other_fun,
@@ -15367,7 +15874,7 @@
           function.TypeTest(test_kind,
                             TypeArguments::Handle(zone, arguments()),
                             Function::Handle(
-                                zone, FunctionType::Cast(other).signature()),
+                                zone, Type::Cast(other).signature()),
                             TypeArguments::Handle(zone, other.arguments()),
                             bound_error,
                             space)) {
@@ -15477,7 +15984,7 @@
 }
 
 
-RawType* Type::Function() {
+RawType* Type::DartFunctionType() {
   return Isolate::Current()->object_store()->function_type();
 }
 
@@ -15509,6 +16016,13 @@
 }
 
 
+void Type::ResetIsFinalized() const {
+  ASSERT(IsFinalized());
+  set_type_state(RawType::kBeingFinalized);
+  SetIsFinalized();
+}
+
+
 void Type::SetIsBeingFinalized() const {
   ASSERT(IsResolved() && !IsFinalized() && !IsBeingFinalized());
   set_type_state(RawType::kBeingFinalized);
@@ -15516,31 +16030,40 @@
 
 
 bool Type::IsMalformed() const {
-  if (raw_ptr()->error_ == LanguageError::null()) {
-    return false;
+  if (raw_ptr()->sig_or_err_.error_ == LanguageError::null()) {
+    return false;  // Valid type, but not a function type.
   }
   const LanguageError& type_error = LanguageError::Handle(error());
+  if (type_error.IsNull()) {
+    return false;  // Valid function type.
+  }
   return type_error.kind() == Report::kMalformedType;
 }
 
 
 bool Type::IsMalbounded() const {
+  if (raw_ptr()->sig_or_err_.error_ == LanguageError::null()) {
+    return false;  // Valid type, but not a function type.
+  }
   if (!Isolate::Current()->type_checks()) {
     return false;
   }
-  if (raw_ptr()->error_ == LanguageError::null()) {
-    return false;
-  }
   const LanguageError& type_error = LanguageError::Handle(error());
+  if (type_error.IsNull()) {
+    return false;  // Valid function type.
+  }
   return type_error.kind() == Report::kMalboundedType;
 }
 
 
 bool Type::IsMalformedOrMalbounded() const {
-  if (raw_ptr()->error_ == LanguageError::null()) {
-    return false;
+  if (raw_ptr()->sig_or_err_.error_ == LanguageError::null()) {
+    return false;  // Valid type, but not a function type.
   }
   const LanguageError& type_error = LanguageError::Handle(error());
+  if (type_error.IsNull()) {
+    return false;  // Valid function type.
+  }
   if (type_error.kind() == Report::kMalformedType) {
     return true;
   }
@@ -15549,15 +16072,40 @@
 }
 
 
+RawLanguageError* Type::error() const {
+  const Object& type_error = Object::Handle(raw_ptr()->sig_or_err_.error_);
+  if (type_error.IsLanguageError()) {
+    return LanguageError::RawCast(type_error.raw());
+  }
+  return LanguageError::null();
+}
+
+
 void Type::set_error(const LanguageError& value) const {
-  StorePointer(&raw_ptr()->error_, value.raw());
+  StorePointer(&raw_ptr()->sig_or_err_.error_, value.raw());
+}
+
+
+RawFunction* Type::signature() const {
+  if (raw_ptr()->sig_or_err_.signature_ == Function::null()) {
+    return Function::null();
+  }
+  const Object& obj = Object::Handle(raw_ptr()->sig_or_err_.signature_);
+  if (obj.IsFunction()) {
+    return Function::RawCast(obj.raw());
+  }
+  ASSERT(obj.IsLanguageError());  // Type is malformed or malbounded.
+  return Function::null();
+}
+
+
+void Type::set_signature(const Function& value) const {
+  StorePointer(&raw_ptr()->sig_or_err_.signature_, value.raw());
 }
 
 
 void Type::SetIsResolved() const {
   ASSERT(!IsResolved());
-  // A Typedef is a FunctionType, not a type.
-  ASSERT(!Class::Handle(type_class()).IsTypedefClass());
   set_type_state(RawType::kResolved);
 }
 
@@ -15658,6 +16206,18 @@
   // with different instantiators. Allocate a new instantiated version of it.
   const Type& instantiated_type =
       Type::Handle(zone, Type::New(cls, type_arguments, token_pos(), space));
+  // Preserve the bound error if any.
+  if (IsMalbounded()) {
+    const LanguageError& bound_error = LanguageError::Handle(zone, error());
+    instantiated_type.set_error(bound_error);
+  }
+  // Preserve the signature if this type represents a function type.
+  // Note that the types in the signature remain unchanged. They get indirectly
+  // instantiated by instantiating the type arguments above.
+  const Function& sig_fun = Function::Handle(zone, signature());
+  if (!sig_fun.IsNull()) {
+    instantiated_type.set_signature(sig_fun);
+  }
   if (IsFinalized()) {
     instantiated_type.SetIsFinalized();
   } else {
@@ -15684,488 +16244,82 @@
     return false;
   }
   const Type& other_type = Type::Cast(other);
+  if (IsFunctionType() != other_type.IsFunctionType()) {
+    return false;
+  }
   ASSERT(IsResolved() && other_type.IsResolved());
   if (IsMalformed() || other_type.IsMalformed()) {
-    return false;
+    return false;  // Malformed types do not get canonicalized.
+  }
+  if (IsMalbounded() != other_type.IsMalbounded()) {
+    return false;  // Do not drop bound error.
   }
   if (type_class() != other_type.type_class()) {
     return false;
   }
   if (!IsFinalized() || !other_type.IsFinalized()) {
-    return false;
-  }
-  if (arguments() == other_type.arguments()) {
-    return true;
-  }
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  const Class& cls = Class::Handle(zone, type_class());
-  const intptr_t num_type_params = cls.NumTypeParameters(thread);
-  if (num_type_params == 0) {
-    // Shortcut unnecessary handle allocation below.
-    return true;
-  }
-  const intptr_t num_type_args = cls.NumTypeArguments();
-  const intptr_t from_index = num_type_args - num_type_params;
-  const TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
-  const TypeArguments& other_type_args = TypeArguments::Handle(
-      zone, other_type.arguments());
-  if (type_args.IsNull()) {
-    // Ignore from_index.
-    return other_type_args.IsRaw(0, num_type_args);
-  }
-  if (other_type_args.IsNull()) {
-    // Ignore from_index.
-    return type_args.IsRaw(0, num_type_args);
-  }
-  if (!type_args.IsSubvectorEquivalent(other_type_args,
-                                       from_index,
-                                       num_type_params)) {
-    return false;
-  }
-#ifdef DEBUG
-  if (from_index > 0) {
-    // Verify that the type arguments of the super class match, since they
-    // depend solely on the type parameters that were just verified to match.
-    ASSERT(type_args.Length() >= (from_index + num_type_params));
-    ASSERT(other_type_args.Length() >= (from_index + num_type_params));
-    AbstractType& type_arg = AbstractType::Handle(zone);
-    AbstractType& other_type_arg = AbstractType::Handle(zone);
-    for (intptr_t i = 0; i < from_index; i++) {
-      type_arg = type_args.TypeAt(i);
-      other_type_arg = other_type_args.TypeAt(i);
-      // Ignore bounds of bounded types.
-      while (type_arg.IsBoundedType()) {
-        type_arg = BoundedType::Cast(type_arg).type();
-      }
-      while (other_type_arg.IsBoundedType()) {
-        other_type_arg = BoundedType::Cast(other_type_arg).type();
-      }
-      ASSERT(type_arg.IsEquivalent(other_type_arg, trail));
-    }
-  }
-#endif
-  return true;
-}
-
-
-bool Type::IsRecursive() const {
-  return TypeArguments::Handle(arguments()).IsRecursive();
-}
-
-
-RawAbstractType* Type::CloneUnfinalized() const {
-  ASSERT(IsResolved());
-  if (IsFinalized()) {
-    return raw();
-  }
-  ASSERT(!IsMalformed());  // Malformed types are finalized.
-  ASSERT(!IsBeingFinalized());  // Cloning must occur prior to finalization.
-  TypeArguments& type_args = TypeArguments::Handle(arguments());
-  type_args = type_args.CloneUnfinalized();
-  const Type& clone = Type::Handle(
-      Type::New(Class::Handle(type_class()), type_args, token_pos()));
-  clone.SetIsResolved();
-  return clone.raw();
-}
-
-
-RawAbstractType* Type::CloneUninstantiated(const Class& new_owner,
-                                           TrailPtr trail) const {
-  ASSERT(IsFinalized());
-  ASSERT(!IsMalformed());
-  if (IsInstantiated()) {
-    return raw();
-  }
-  // We may recursively encounter a type already being cloned, because we clone
-  // the upper bounds of its uninstantiated type arguments in the same pass.
-  Type& clone = Type::Handle();
-  clone ^= OnlyBuddyInTrail(trail);
-  if (!clone.IsNull()) {
-    return clone.raw();
-  }
-  const Class& type_cls = Class::Handle(type_class());
-  clone = Type::New(type_cls, TypeArguments::Handle(), token_pos());
-  TypeArguments& type_args = TypeArguments::Handle(arguments());
-  // Upper bounds of uninstantiated type arguments may form a cycle.
-  if (type_args.IsRecursive() || !type_args.IsInstantiated()) {
-    AddOnlyBuddyToTrail(&trail, clone);
-  }
-  type_args = type_args.CloneUninstantiated(new_owner, trail);
-  clone.set_arguments(type_args);
-  clone.SetIsFinalized();
-  return clone.raw();
-}
-
-
-RawAbstractType* Type::Canonicalize(TrailPtr trail) const {
-  ASSERT(IsFinalized());
-  if (IsCanonical() || IsMalformed()) {
-    ASSERT(IsMalformed() || TypeArguments::Handle(arguments()).IsOld());
-    return this->raw();
-  }
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  Isolate* isolate = thread->isolate();
-  AbstractType& type = Type::Handle(zone);
-  const Class& cls = Class::Handle(zone, type_class());
-  ASSERT(!cls.IsTypedefClass());  // This type should be a FunctionType.
-  if (cls.raw() == Object::dynamic_class() && (isolate != Dart::vm_isolate())) {
-    return Object::dynamic_type().raw();
-  }
-  // Fast canonical lookup/registry for simple types.
-  if (!cls.IsGeneric() && !cls.IsClosureClass()) {
-    type = cls.CanonicalType();
-    if (type.IsNull()) {
-      ASSERT(!cls.raw()->IsVMHeapObject() || (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);
-      if (IsCanonical()) {
-        // Canonicalizing type_args canonicalized this type.
-        ASSERT(IsRecursive());
-        return this->raw();
-      }
-      set_arguments(type_args);
-      type = cls.CanonicalType();  // May be set while canonicalizing type args.
-      if (type.IsNull()) {
-        MutexLocker ml(isolate->type_canonicalization_mutex());
-        // Recheck if type exists.
-        type = cls.CanonicalType();
-        if (type.IsNull()) {
-          SetCanonical();
-          cls.set_canonical_types(*this);
-          return this->raw();
-        }
-      }
-    }
-    ASSERT(this->Equals(type));
-    ASSERT(type.IsCanonical());
-    return type.raw();
-  }
-
-  Array& canonical_types = Array::Handle(zone);
-  canonical_types ^= cls.canonical_types();
-  if (canonical_types.IsNull()) {
-    canonical_types = empty_array().raw();
-  }
-  intptr_t length = canonical_types.Length();
-  // Linear search to see whether this type is already present in the
-  // list of canonicalized types.
-  // TODO(asiva): Try to re-factor this lookup code to make sharing
-  // easy between the 4 versions of this loop.
-  intptr_t index = 1;  // Slot 0 is reserved for CanonicalType().
-  while (index < length) {
-    type ^= canonical_types.At(index);
-    if (type.IsNull()) {
-      break;
-    }
-    ASSERT(type.IsFinalized());
-    if (this->Equals(type)) {
-      ASSERT(type.IsCanonical());
-      return type.raw();
-    }
-    index++;
-  }
-  // The type was not found in the table. It is not canonical yet.
-
-  // Canonicalize the type arguments.
-  TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
-  // In case the type is first canonicalized at runtime, its type argument
-  // vector may be longer than necessary. This is not an issue.
-  ASSERT(type_args.IsNull() || (type_args.Length() >= cls.NumTypeArguments()));
-  type_args = type_args.Canonicalize(trail);
-  if (IsCanonical()) {
-    // Canonicalizing type_args canonicalized this type as a side effect.
-    ASSERT(IsRecursive());
-    return this->raw();
-  }
-  set_arguments(type_args);
-  ASSERT(type_args.IsNull() || type_args.IsOld());
-
-  return cls.LookupOrAddCanonicalType(*this, index);
-}
-
-
-RawString* Type::EnumerateURIs() const {
-  if (IsDynamicType()) {
-    return Symbols::Empty().raw();
-  }
-  Zone* zone = Thread::Current()->zone();
-  GrowableHandlePtrArray<const String> pieces(zone, 6);
-  const Class& cls = Class::Handle(zone, type_class());
-  pieces.Add(Symbols::TwoSpaces());
-  pieces.Add(String::Handle(zone, cls.UserVisibleName()));
-  pieces.Add(Symbols::SpaceIsFromSpace());
-  const Library& library = Library::Handle(zone, cls.library());
-  pieces.Add(String::Handle(zone, library.url()));
-  pieces.Add(Symbols::NewLine());
-  const TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
-  pieces.Add(String::Handle(zone, type_args.EnumerateURIs()));
-  return Symbols::FromConcatAll(pieces);
-}
-
-
-intptr_t Type::Hash() const {
-  ASSERT(IsFinalized());
-  uint32_t result = 1;
-  if (IsMalformed()) return result;
-  result = CombineHashes(result, Class::Handle(type_class()).id());
-  result = CombineHashes(result, TypeArguments::Handle(arguments()).Hash());
-  return FinalizeHash(result);
-}
-
-
-void Type::set_type_class(const Object& value) const {
-  ASSERT(!value.IsNull() && (value.IsClass() || value.IsUnresolvedClass()));
-  StorePointer(&raw_ptr()->type_class_, value.raw());
-}
-
-
-void Type::set_arguments(const TypeArguments& value) const {
-  ASSERT(!IsCanonical());
-  StorePointer(&raw_ptr()->arguments_, value.raw());
-}
-
-
-RawType* Type::New(Heap::Space space) {
-  RawObject* raw = Object::Allocate(Type::kClassId,
-                                    Type::InstanceSize(),
-                                    space);
-  return reinterpret_cast<RawType*>(raw);
-}
-
-
-RawType* Type::New(const Object& clazz,
-                   const TypeArguments& arguments,
-                   TokenPosition token_pos,
-                   Heap::Space space) {
-  const Type& result = Type::Handle(Type::New(space));
-  result.set_type_class(clazz);
-  result.set_arguments(arguments);
-  result.set_token_pos(token_pos);
-  result.StoreNonPointer(&result.raw_ptr()->type_state_, RawType::kAllocated);
-  return result.raw();
-}
-
-
-void Type::set_token_pos(TokenPosition token_pos) const {
-  ASSERT(!token_pos.IsClassifying());
-  StoreNonPointer(&raw_ptr()->token_pos_, token_pos);
-}
-
-
-void Type::set_type_state(int8_t state) const {
-  ASSERT((state >= RawType::kAllocated) &&
-         (state <= RawType::kFinalizedUninstantiated));
-  StoreNonPointer(&raw_ptr()->type_state_, state);
-}
-
-
-const char* Type::ToCString() const {
-  const char* unresolved = IsResolved() ? "" : "Unresolved ";
-  const TypeArguments& type_arguments = TypeArguments::Handle(arguments());
-  const char* class_name;
-  if (HasResolvedTypeClass()) {
-    class_name = String::Handle(
-        Class::Handle(type_class()).Name()).ToCString();
-  } else {
-    class_name = UnresolvedClass::Handle(unresolved_class()).ToCString();
-  }
-  if (type_arguments.IsNull()) {
-    return OS::SCreate(Thread::Current()->zone(),
-        "%sType: class '%s'", unresolved, class_name);
-  } else if (IsResolved() && IsFinalized() && IsRecursive()) {
-    const intptr_t hash = Hash();
-    const char* args_cstr = TypeArguments::Handle(arguments()).ToCString();
-    return OS::SCreate(Thread::Current()->zone(),
-        "Type: (@%p H%" Px ") class '%s', args:[%s]",
-        raw(), hash, class_name, args_cstr);
-  } else {
-    const char* args_cstr = TypeArguments::Handle(arguments()).ToCString();
-    return OS::SCreate(Thread::Current()->zone(),
-        "%sType: class '%s', args:[%s]", unresolved, class_name, args_cstr);
-  }
-}
-
-
-void FunctionType::SetIsFinalized() const {
-  ASSERT(!IsFinalized());
-  if (IsInstantiated()) {
-    set_type_state(RawFunctionType::kFinalizedInstantiated);
-  } else {
-    set_type_state(RawFunctionType::kFinalizedUninstantiated);
-  }
-}
-
-
-void FunctionType::ResetIsFinalized() const {
-  ASSERT(IsFinalized());
-  set_type_state(RawFunctionType::kBeingFinalized);
-  SetIsFinalized();
-}
-
-
-void FunctionType::SetIsBeingFinalized() const {
-  ASSERT(IsResolved() && !IsFinalized() && !IsBeingFinalized());
-  set_type_state(RawFunctionType::kBeingFinalized);
-}
-
-
-bool FunctionType::IsMalformed() const {
-  if (raw_ptr()->error_ == LanguageError::null()) {
-    return false;
-  }
-  const LanguageError& type_error = LanguageError::Handle(error());
-  return type_error.kind() == Report::kMalformedType;
-}
-
-
-bool FunctionType::IsMalbounded() const {
-  if (!Isolate::Current()->type_checks()) {
-    return false;
-  }
-  if (raw_ptr()->error_ == LanguageError::null()) {
-    return false;
-  }
-  const LanguageError& type_error = LanguageError::Handle(error());
-  return type_error.kind() == Report::kMalboundedType;
-}
-
-
-bool FunctionType::IsMalformedOrMalbounded() const {
-  if (raw_ptr()->error_ == LanguageError::null()) {
-    return false;
-  }
-  const LanguageError& type_error = LanguageError::Handle(error());
-  if (type_error.kind() == Report::kMalformedType) {
-    return true;
-  }
-  ASSERT(type_error.kind() == Report::kMalboundedType);
-  return Isolate::Current()->type_checks();
-}
-
-
-void FunctionType::set_error(const LanguageError& value) const {
-  StorePointer(&raw_ptr()->error_, value.raw());
-}
-
-
-void FunctionType::SetIsResolved() const {
-  ASSERT(!IsResolved());
-  set_type_state(RawFunctionType::kResolved);
-}
-
-
-bool FunctionType::IsInstantiated(TrailPtr trail) const {
-  if (raw_ptr()->type_state_ == RawFunctionType::kFinalizedInstantiated) {
-    return true;
-  }
-  if (raw_ptr()->type_state_ == RawFunctionType::kFinalizedUninstantiated) {
-    return false;
-  }
-  if (arguments() == TypeArguments::null()) {
-    return true;
-  }
-  const Class& scope_cls = Class::Handle(scope_class());
-  if (!scope_cls.IsGeneric()) {
-    ASSERT(scope_cls.IsClosureClass() || scope_cls.IsTypedefClass());
-    ASSERT(arguments() == TypeArguments::null());
-    return true;
-  }
-  const TypeArguments& type_arguments = TypeArguments::Handle(arguments());
-  const intptr_t num_type_args = scope_cls.NumTypeArguments();
-  const intptr_t num_type_params = scope_cls.NumTypeParameters();
-  // The vector may be longer than necessary. An empty vector is handled above.
-  ASSERT(type_arguments.Length() >= num_type_args);
-  return
-      (num_type_params == 0) ||
-      type_arguments.IsSubvectorInstantiated(num_type_args - num_type_params,
-                                             num_type_params);
-}
-
-
-RawAbstractType* FunctionType::InstantiateFrom(
-    const TypeArguments& instantiator_type_arguments,
-    Error* bound_error,
-    TrailPtr instantiation_trail,
-    TrailPtr bound_trail,
-    Heap::Space space) const {
-  Zone* zone = Thread::Current()->zone();
-  ASSERT(IsFinalized() || IsBeingFinalized());
-  ASSERT(!IsInstantiated());
-  ASSERT(!IsMalformed());  // FunctionType cannot be malformed.
-  // Instantiating this type with its own type arguments as instantiator can
-  // occur during finalization and bounds checking. Return the type unchanged.
-  if (arguments() == instantiator_type_arguments.raw()) {
-    return raw();
-  }
-  // Note that the scope class has to be resolved at this time, but not
-  // necessarily finalized yet. We may be checking bounds at compile time or
-  // finalizing the type argument vector of a recursive type.
-  const Class& cls = Class::Handle(zone, scope_class());
-  TypeArguments& type_arguments = TypeArguments::Handle(zone, arguments());
-  ASSERT(type_arguments.Length() == cls.NumTypeArguments());
-  type_arguments = type_arguments.InstantiateFrom(instantiator_type_arguments,
-                                                  bound_error,
-                                                  instantiation_trail,
-                                                  bound_trail,
-                                                  space);
-  // This uninstantiated type is not modified, as it can be instantiated
-  // with different instantiators. Allocate a new instantiated version of it.
-  const FunctionType& instantiated_type = FunctionType::Handle(zone,
-      FunctionType::New(cls,
-                        type_arguments,
-                        Function::Handle(zone, signature()),
-                        token_pos(),
-                        space));
-  if (IsFinalized()) {
-    instantiated_type.SetIsFinalized();
-  } else {
-    instantiated_type.SetIsResolved();
-  }
-  // Canonicalization is not part of instantiation.
-  return instantiated_type.raw();
-}
-
-
-bool FunctionType::IsEquivalent(const Instance& other, TrailPtr trail) const {
-  ASSERT(!IsNull());
-  if (raw() == other.raw()) {
-    return true;
-  }
-  if (!other.IsFunctionType()) {
-    return false;
-  }
-  const FunctionType& other_type = FunctionType::Cast(other);
-  ASSERT(IsResolved() && other_type.IsResolved());
-  if (IsMalformed() || other_type.IsMalformed()) {
-    return false;
-  }
-  if (scope_class() != other_type.scope_class()) {
-    return false;
+    return false;  // Too early to decide if equal.
   }
   if ((arguments() == other_type.arguments()) &&
       (signature() == other_type.signature())) {
     return true;
   }
-  if (!IsFinalized() || !other_type.IsFinalized()) {
-    return false;
-  }
-
-  // We do not instantiate the types of the signature. This happens on demand
-  // at runtime during a type test.
-  // Therefore, equal function types must have equal type arguments.
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
-  const TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
-  const TypeArguments& other_type_args = TypeArguments::Handle(
-      zone, other_type.arguments());
-  if (!type_args.Equals(other_type_args)) {
-    return false;
+  if (arguments() != other_type.arguments()) {
+  const Class& cls = Class::Handle(zone, type_class());
+    const intptr_t num_type_params = cls.NumTypeParameters(thread);
+    // Shortcut unnecessary handle allocation below if non-generic.
+    if (num_type_params > 0) {
+      const intptr_t num_type_args = cls.NumTypeArguments();
+      const intptr_t from_index = num_type_args - num_type_params;
+      const TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
+      const TypeArguments& other_type_args = TypeArguments::Handle(
+          zone, other_type.arguments());
+      if (type_args.IsNull()) {
+        // Ignore from_index.
+        if (!other_type_args.IsRaw(0, num_type_args)) {
+          return false;
+        }
+      } else if (other_type_args.IsNull()) {
+        // Ignore from_index.
+        if (!type_args.IsRaw(0, num_type_args)) {
+          return false;
+        }
+      } else if (!type_args.IsSubvectorEquivalent(other_type_args,
+                                                  from_index,
+                                                  num_type_params)) {
+        return false;
+      }
+#ifdef DEBUG
+      if (from_index > 0) {
+        // Verify that the type arguments of the super class match, since they
+        // depend solely on the type parameters that were just verified to
+        // match.
+        ASSERT(type_args.Length() >= (from_index + num_type_params));
+        ASSERT(other_type_args.Length() >= (from_index + num_type_params));
+        AbstractType& type_arg = AbstractType::Handle(zone);
+        AbstractType& other_type_arg = AbstractType::Handle(zone);
+        for (intptr_t i = 0; i < from_index; i++) {
+          type_arg = type_args.TypeAt(i);
+          other_type_arg = other_type_args.TypeAt(i);
+          // Ignore bounds of bounded types.
+          while (type_arg.IsBoundedType()) {
+            type_arg = BoundedType::Cast(type_arg).type();
+          }
+          while (other_type_arg.IsBoundedType()) {
+            other_type_arg = BoundedType::Cast(other_type_arg).type();
+          }
+          ASSERT(type_arg.IsEquivalent(other_type_arg, trail));
+        }
+      }
+#endif
+    }
   }
-
-  // Type arguments are equal.
+  if (!IsFunctionType()) {
+    return true;
+  }
+  ASSERT(Type::Cast(other).IsFunctionType());
   // Equal function types must have equal signature types and equal optional
   // named arguments.
   if (signature() == other_type.signature()) {
@@ -16230,32 +16384,62 @@
 }
 
 
-bool FunctionType::IsRecursive() const {
+bool Type::IsRecursive() const {
   return TypeArguments::Handle(arguments()).IsRecursive();
 }
 
 
-RawAbstractType* FunctionType::CloneUnfinalized() const {
+RawAbstractType* Type::CloneUnfinalized() const {
   ASSERT(IsResolved());
   if (IsFinalized()) {
     return raw();
   }
   ASSERT(!IsMalformed());  // Malformed types are finalized.
   ASSERT(!IsBeingFinalized());  // Cloning must occur prior to finalization.
-  TypeArguments& type_args = TypeArguments::Handle(arguments());
-  type_args = type_args.CloneUnfinalized();
-  const FunctionType& clone = FunctionType::Handle(
-      FunctionType::New(Class::Handle(scope_class()),
-                        type_args,
-                        Function::Handle(signature()),
-                        token_pos()));
+  Zone* zone = Thread::Current()->zone();
+  const TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
+  const TypeArguments& type_args_clone =
+      TypeArguments::Handle(zone, type_args.CloneUnfinalized());
+  if (type_args_clone.raw() == type_args.raw()) {
+    return raw();
+  }
+  const Type& clone = Type::Handle(zone,
+      Type::New(Class::Handle(zone, type_class()), type_args, token_pos()));
+  // Preserve the bound error if any.
+  if (IsMalbounded()) {
+    const LanguageError& bound_error = LanguageError::Handle(zone, error());
+    clone.set_error(bound_error);
+  }
+  // Clone the signature if this type represents a function type.
+  Function& fun = Function::Handle(zone, signature());
+  if (!fun.IsNull()) {
+    const Class& owner = Class::Handle(zone, fun.Owner());
+    Function& fun_clone = Function::Handle(zone,
+        Function::NewSignatureFunction(owner, TokenPosition::kNoSource));
+    AbstractType& type = AbstractType::Handle(zone, fun.result_type());
+    type = type.CloneUnfinalized();
+    fun_clone.set_result_type(type);
+    const intptr_t num_params = fun.NumParameters();
+    fun_clone.set_num_fixed_parameters(fun.num_fixed_parameters());
+    fun_clone.SetNumOptionalParameters(fun.NumOptionalParameters(),
+                                       fun.HasOptionalPositionalParameters());
+    fun_clone.set_parameter_types(Array::Handle(Array::New(num_params,
+                                                           Heap::kOld)));
+    for (intptr_t i = 0; i < num_params; i++) {
+      type = fun.ParameterTypeAt(i);
+      type = type.CloneUnfinalized();
+      fun_clone.SetParameterTypeAt(i, type);
+    }
+    fun_clone.set_parameter_names(Array::Handle(zone, fun.parameter_names()));
+    clone.set_signature(fun_clone);
+  }
   clone.SetIsResolved();
   return clone.raw();
 }
 
 
-RawAbstractType* FunctionType::CloneUninstantiated(const Class& new_owner,
-                                                   TrailPtr trail) const {
+RawAbstractType* Type::CloneUninstantiated(const Class& new_owner,
+                                           TrailPtr trail) const {
   ASSERT(IsFinalized());
   ASSERT(!IsMalformed());
   if (IsInstantiated()) {
@@ -16263,16 +16447,42 @@
   }
   // We may recursively encounter a type already being cloned, because we clone
   // the upper bounds of its uninstantiated type arguments in the same pass.
-  FunctionType& clone = FunctionType::Handle();
+  Zone* zone = Thread::Current()->zone();
+  Type& clone = Type::Handle(zone);
   clone ^= OnlyBuddyInTrail(trail);
   if (!clone.IsNull()) {
     return clone.raw();
   }
-  clone = FunctionType::New(Class::Handle(scope_class()),
-                            TypeArguments::Handle(),
-                            Function::Handle(signature()),
-                            token_pos());
-  TypeArguments& type_args = TypeArguments::Handle(arguments());
+  const Class& type_cls = Class::Handle(zone, type_class());
+  clone = Type::New(type_cls, TypeArguments::Handle(zone), token_pos());
+  // Preserve the bound error if any.
+  if (IsMalbounded()) {
+    const LanguageError& bound_error = LanguageError::Handle(zone, error());
+    clone.set_error(bound_error);
+  }
+  // Clone the signature if this type represents a function type.
+  const Function& fun = Function::Handle(zone, signature());
+  if (!fun.IsNull()) {
+    Function& fun_clone = Function::Handle(zone,
+        Function::NewSignatureFunction(new_owner, TokenPosition::kNoSource));
+    AbstractType& type = AbstractType::Handle(zone, fun.result_type());
+    type = type.CloneUninstantiated(new_owner, trail);
+    fun_clone.set_result_type(type);
+    const intptr_t num_params = fun.NumParameters();
+    fun_clone.set_num_fixed_parameters(fun.num_fixed_parameters());
+    fun_clone.SetNumOptionalParameters(fun.NumOptionalParameters(),
+                                       fun.HasOptionalPositionalParameters());
+    fun_clone.set_parameter_types(Array::Handle(Array::New(num_params,
+                                                           Heap::kOld)));
+    for (intptr_t i = 0; i < num_params; i++) {
+      type = fun.ParameterTypeAt(i);
+      type = type.CloneUninstantiated(new_owner, trail);
+      fun_clone.SetParameterTypeAt(i, type);
+    }
+    fun_clone.set_parameter_names(Array::Handle(zone, fun.parameter_names()));
+    clone.set_signature(fun_clone);
+  }
+  TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
   // Upper bounds of uninstantiated type arguments may form a cycle.
   if (type_args.IsRecursive() || !type_args.IsInstantiated()) {
     AddOnlyBuddyToTrail(&trail, clone);
@@ -16284,7 +16494,7 @@
 }
 
 
-RawAbstractType* FunctionType::Canonicalize(TrailPtr trail) const {
+RawAbstractType* Type::Canonicalize(TrailPtr trail) const {
   ASSERT(IsFinalized());
   if (IsCanonical() || IsMalformed()) {
     ASSERT(IsMalformed() || TypeArguments::Handle(arguments()).IsOld());
@@ -16292,10 +16502,46 @@
   }
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   AbstractType& type = Type::Handle(zone);
-  const Class& scope_cls = Class::Handle(zone, type_class());
+  const Class& cls = Class::Handle(zone, type_class());
+  if (cls.raw() == Object::dynamic_class() && (isolate != Dart::vm_isolate())) {
+    return Object::dynamic_type().raw();
+  }
+  // Fast canonical lookup/registry for simple types.
+  if (!cls.IsGeneric() && !cls.IsClosureClass()) {
+    ASSERT(!IsFunctionType() || cls.IsTypedefClass());
+    type = cls.CanonicalType();
+    if (type.IsNull()) {
+      ASSERT(!cls.raw()->IsVMHeapObject() || (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);
+      if (IsCanonical()) {
+        // Canonicalizing type_args canonicalized this type.
+        ASSERT(IsRecursive());
+        return this->raw();
+      }
+      set_arguments(type_args);
+      type = cls.CanonicalType();  // May be set while canonicalizing type args.
+      if (type.IsNull()) {
+        MutexLocker ml(isolate->type_canonicalization_mutex());
+        // Recheck if type exists.
+        type = cls.CanonicalType();
+        if (type.IsNull()) {
+          SetCanonical();
+          cls.set_canonical_types(*this);
+          return this->raw();
+        }
+      }
+    }
+    ASSERT(this->Equals(type));
+    ASSERT(type.IsCanonical());
+    return type.raw();
+  }
+
   Array& canonical_types = Array::Handle(zone);
-  canonical_types ^= scope_cls.canonical_types();
+  canonical_types ^= cls.canonical_types();
   if (canonical_types.IsNull()) {
     canonical_types = empty_array().raw();
   }
@@ -16323,8 +16569,7 @@
   TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
   // In case the type is first canonicalized at runtime, its type argument
   // vector may be longer than necessary. This is not an issue.
-  ASSERT(type_args.IsNull() ||
-         (type_args.Length() >= scope_cls.NumTypeArguments()));
+  ASSERT(type_args.IsNull() || (type_args.Length() >= cls.NumTypeArguments()));
   type_args = type_args.Canonicalize(trail);
   if (IsCanonical()) {
     // Canonicalizing type_args canonicalized this type as a side effect.
@@ -16334,163 +16579,188 @@
     return this->raw();
   }
   set_arguments(type_args);
-
-  // Replace the actual function by a signature function.
-  const Function& fun = Function::Handle(zone, signature());
-  if (!fun.IsSignatureFunction()) {
-    Function& sig_fun = Function::Handle(zone,
-        Function::NewSignatureFunction(scope_cls, TokenPosition::kNoSource));
-    type = fun.result_type();
-    type = type.Canonicalize(trail);
-    sig_fun.set_result_type(type);
-    const intptr_t num_params = fun.NumParameters();
-    sig_fun.set_num_fixed_parameters(fun.num_fixed_parameters());
-    sig_fun.SetNumOptionalParameters(fun.NumOptionalParameters(),
-                                     fun.HasOptionalPositionalParameters());
-    sig_fun.set_parameter_types(Array::Handle(Array::New(num_params,
-                                                         Heap::kOld)));
-    for (intptr_t i = 0; i < num_params; i++) {
-      type = fun.ParameterTypeAt(i);
-      type = type.Canonicalize(trail);
-      sig_fun.SetParameterTypeAt(i, type);
-    }
-    sig_fun.set_parameter_names(Array::Handle(zone, fun.parameter_names()));
-    set_signature(sig_fun);
-  }
   ASSERT(type_args.IsNull() || type_args.IsOld());
 
-  return scope_cls.LookupOrAddCanonicalType(*this, index);
+  // In case of a function type, replace the actual function by a signature
+  // function.
+  if (IsFunctionType()) {
+    const Function& fun = Function::Handle(zone, signature());
+    if (!fun.IsSignatureFunction()) {
+      Function& sig_fun = Function::Handle(zone,
+          Function::NewSignatureFunction(cls, TokenPosition::kNoSource));
+      type = fun.result_type();
+      type = type.Canonicalize(trail);
+      sig_fun.set_result_type(type);
+      const intptr_t num_params = fun.NumParameters();
+      sig_fun.set_num_fixed_parameters(fun.num_fixed_parameters());
+      sig_fun.SetNumOptionalParameters(fun.NumOptionalParameters(),
+                                       fun.HasOptionalPositionalParameters());
+      sig_fun.set_parameter_types(Array::Handle(Array::New(num_params,
+                                                           Heap::kOld)));
+      for (intptr_t i = 0; i < num_params; i++) {
+        type = fun.ParameterTypeAt(i);
+        type = type.Canonicalize(trail);
+        sig_fun.SetParameterTypeAt(i, type);
+      }
+      sig_fun.set_parameter_names(Array::Handle(zone, fun.parameter_names()));
+      set_signature(sig_fun);
+    }
+  }
+  return cls.LookupOrAddCanonicalType(*this, index);
 }
 
 
-RawString* FunctionType::EnumerateURIs() const {
-  Zone* zone = Thread::Current()->zone();
-  // The scope class and type arguments do not appear explicitly in the user
-  // visible name. The type arguments were used to instantiate the function type
-  // prior to this call.
-  const Function& sig_fun = Function::Handle(zone, signature());
-  AbstractType& type = AbstractType::Handle(zone);
-  const intptr_t num_params = sig_fun.NumParameters();
-  GrowableHandlePtrArray<const String> pieces(zone, num_params + 1);
-  for (intptr_t i = 0; i < num_params; i++) {
-    type = sig_fun.ParameterTypeAt(i);
-    pieces.Add(String::Handle(zone, type.EnumerateURIs()));
+RawString* Type::EnumerateURIs() const {
+  if (IsDynamicType() || IsVoidType()) {
+    return Symbols::Empty().raw();
   }
-  // Handle result type last, since it appears last in the user visible name.
-  type = sig_fun.result_type();
-  if (!type.IsDynamicType() && !type.IsVoidType()) {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  GrowableHandlePtrArray<const String> pieces(zone, 6);
+  if (IsFunctionType()) {
+    // The scope class and type arguments do not appear explicitly in the user
+    // visible name. The type arguments were used to instantiate the function
+    // type prior to this call.
+    const Function& sig_fun = Function::Handle(zone, signature());
+    AbstractType& type = AbstractType::Handle(zone);
+    const intptr_t num_params = sig_fun.NumParameters();
+    GrowableHandlePtrArray<const String> pieces(zone, num_params + 1);
+    for (intptr_t i = 0; i < num_params; i++) {
+      type = sig_fun.ParameterTypeAt(i);
+      pieces.Add(String::Handle(zone, type.EnumerateURIs()));
+    }
+    // Handle result type last, since it appears last in the user visible name.
+    type = sig_fun.result_type();
     pieces.Add(String::Handle(zone, type.EnumerateURIs()));
+  } else {
+    const Class& cls = Class::Handle(zone, type_class());
+    pieces.Add(Symbols::TwoSpaces());
+    pieces.Add(String::Handle(zone, cls.UserVisibleName()));
+    pieces.Add(Symbols::SpaceIsFromSpace());
+    const Library& library = Library::Handle(zone, cls.library());
+    pieces.Add(String::Handle(zone, library.url()));
+    pieces.Add(Symbols::NewLine());
+    const TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
+    pieces.Add(String::Handle(zone, type_args.EnumerateURIs()));
   }
-  return Symbols::FromConcatAll(pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
-intptr_t FunctionType::Hash() const {
+intptr_t Type::Hash() const {
   ASSERT(IsFinalized());
   uint32_t result = 1;
   if (IsMalformed()) return result;
-  result = CombineHashes(result, Class::Handle(scope_class()).id());
+  result = CombineHashes(result, Class::Handle(type_class()).id());
   result = CombineHashes(result, TypeArguments::Handle(arguments()).Hash());
-  const Function& sig_fun = Function::Handle(signature());
-  AbstractType& type = AbstractType::Handle(sig_fun.result_type());
-  result = CombineHashes(result, type.Hash());
-  result = CombineHashes(result, sig_fun.NumOptionalPositionalParameters());
-  const intptr_t num_params = sig_fun.NumParameters();
-  for (intptr_t i = 0; i < num_params; i++) {
-    type = sig_fun.ParameterTypeAt(i);
+  if (IsFunctionType()) {
+    const Function& sig_fun = Function::Handle(signature());
+    AbstractType& type = AbstractType::Handle(sig_fun.result_type());
     result = CombineHashes(result, type.Hash());
-  }
-  if (sig_fun.NumOptionalNamedParameters() > 0) {
-    String& param_name = String::Handle();
-    for (intptr_t i = sig_fun.num_fixed_parameters(); i < num_params; i++) {
-      param_name = sig_fun.ParameterNameAt(i);
-      result = CombineHashes(result, param_name.Hash());
+    result = CombineHashes(result, sig_fun.NumOptionalPositionalParameters());
+    const intptr_t num_params = sig_fun.NumParameters();
+    for (intptr_t i = 0; i < num_params; i++) {
+      type = sig_fun.ParameterTypeAt(i);
+      result = CombineHashes(result, type.Hash());
+    }
+    if (sig_fun.NumOptionalNamedParameters() > 0) {
+      String& param_name = String::Handle();
+      for (intptr_t i = sig_fun.num_fixed_parameters(); i < num_params; i++) {
+        param_name = sig_fun.ParameterNameAt(i);
+        result = CombineHashes(result, param_name.Hash());
+      }
     }
   }
   return FinalizeHash(result);
 }
 
 
-void FunctionType::set_scope_class(const Class& value) const {
-  ASSERT(!value.IsNull());
-  StorePointer(&raw_ptr()->scope_class_, value.raw());
+void Type::set_type_class(const Object& value) const {
+  ASSERT(!value.IsNull() && (value.IsClass() || value.IsUnresolvedClass()));
+  StorePointer(&raw_ptr()->type_class_, value.raw());
 }
 
 
-void FunctionType::set_arguments(const TypeArguments& value) const {
+void Type::set_arguments(const TypeArguments& value) const {
   ASSERT(!IsCanonical());
   StorePointer(&raw_ptr()->arguments_, value.raw());
 }
 
 
-void FunctionType::set_signature(const Function& value) const {
-  StorePointer(&raw_ptr()->signature_, value.raw());
-}
-
-
-RawFunctionType* FunctionType::New(Heap::Space space) {
-  RawObject* raw = Object::Allocate(FunctionType::kClassId,
-                                    FunctionType::InstanceSize(),
+RawType* Type::New(Heap::Space space) {
+  RawObject* raw = Object::Allocate(Type::kClassId,
+                                    Type::InstanceSize(),
                                     space);
-  return reinterpret_cast<RawFunctionType*>(raw);
+  return reinterpret_cast<RawType*>(raw);
 }
 
 
-RawFunctionType* FunctionType::New(const Class& clazz,
-                                   const TypeArguments& arguments,
-                                   const Function& signature,
-                                   TokenPosition token_pos,
-                                   Heap::Space space) {
-  const FunctionType& result = FunctionType::Handle(FunctionType::New(space));
-  result.set_scope_class(clazz);
+RawType* Type::New(const Object& clazz,
+                   const TypeArguments& arguments,
+                   TokenPosition token_pos,
+                   Heap::Space space) {
+  const Type& result = Type::Handle(Type::New(space));
+  result.set_type_class(clazz);
   result.set_arguments(arguments);
-  result.set_signature(signature);
   result.set_token_pos(token_pos);
-  result.StoreNonPointer(&result.raw_ptr()->type_state_,
-                         RawFunctionType::kAllocated);
+  result.StoreNonPointer(&result.raw_ptr()->type_state_, RawType::kAllocated);
   return result.raw();
 }
 
 
-void FunctionType::set_token_pos(TokenPosition token_pos) const {
+void Type::set_token_pos(TokenPosition token_pos) const {
   ASSERT(!token_pos.IsClassifying());
   StoreNonPointer(&raw_ptr()->token_pos_, token_pos);
 }
 
 
-void FunctionType::set_type_state(int8_t state) const {
-  ASSERT((state >= RawFunctionType::kAllocated) &&
-         (state <= RawFunctionType::kFinalizedUninstantiated));
+void Type::set_type_state(int8_t state) const {
+  ASSERT((state >= RawType::kAllocated) &&
+         (state <= RawType::kFinalizedUninstantiated));
   StoreNonPointer(&raw_ptr()->type_state_, state);
 }
 
 
-const char* FunctionType::ToCString() const {
+const char* Type::ToCString() const {
+  Zone* zone = Thread::Current()->zone();
   const char* unresolved = IsResolved() ? "" : "Unresolved ";
-  const Class& scope_cls = Class::Handle(scope_class());
-  const TypeArguments& type_arguments = TypeArguments::Handle(arguments());
-  const Function& signature_function = Function::Handle(signature());
-  const String& signature_string = IsFinalized() ?
-      String::Handle(
-          signature_function.InstantiatedSignatureFrom(type_arguments,
-                                                       kInternalName)) :
-      String::Handle(signature_function.Signature());
-  if (scope_cls.IsClosureClass()) {
-    ASSERT(arguments() == TypeArguments::null());
-    return OS::SCreate(
-        Thread::Current()->zone(),
-        "%sFunctionType: %s", unresolved, signature_string.ToCString());
+  const TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
+  const char* args_cstr = type_args.IsNull() ? "null" : type_args.ToCString();
+  Class& cls = Class::Handle(zone);
+  const char* class_name;
+  if (HasResolvedTypeClass()) {
+    cls = type_class();
+    class_name = String::Handle(zone, cls.Name()).ToCString();
+  } else {
+    class_name = UnresolvedClass::Handle(zone, unresolved_class()).ToCString();
   }
-  const char* class_name = String::Handle(scope_cls.Name()).ToCString();
-  const char* args_cstr =
-      type_arguments.IsNull() ? "null" : type_arguments.ToCString();
-  return OS::SCreate(
-      Thread::Current()->zone(),
-      "%s FunctionType: %s (scope_cls: %s, args: %s)",
-      unresolved,
-      signature_string.ToCString(),
-      class_name,
-      args_cstr);
+  if (IsFunctionType()) {
+    const Function& sig_fun = Function::Handle(zone, signature());
+    const String& sig = IsFinalized() ?
+        String::Handle(zone, sig_fun.InstantiatedSignatureFrom(type_args,
+                                                               kInternalName)) :
+        String::Handle(zone, sig_fun.Signature());
+    if (cls.IsClosureClass()) {
+      ASSERT(type_args.IsNull());
+      return OS::SCreate(zone, "%sFunction Type: %s",
+                         unresolved, sig.ToCString());
+    }
+    return OS::SCreate(zone, "%s Function Type: %s (class: %s, args: %s)",
+                       unresolved,
+                       sig.ToCString(),
+                       class_name,
+                       args_cstr);
+  }
+  if (type_args.IsNull()) {
+    return OS::SCreate(zone, "%sType: class '%s'", unresolved, class_name);
+  } else if (IsResolved() && IsFinalized() && IsRecursive()) {
+    const intptr_t hash = Hash();
+    return OS::SCreate(zone, "Type: (@%p H%" Px ") class '%s', args:[%s]",
+                       raw(), hash, class_name, args_cstr);
+  } else {
+    return OS::SCreate(zone, "%sType: class '%s', args:[%s]",
+                       unresolved, class_name, args_cstr);
+  }
 }
 
 
@@ -16589,7 +16859,21 @@
 
 
 RawString* TypeRef::EnumerateURIs() const {
-  return Symbols::Empty().raw();  // Break cycle.
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const AbstractType& ref_type = AbstractType::Handle(zone, type());
+  ASSERT(!ref_type.IsDynamicType() && !ref_type.IsVoidType());
+  GrowableHandlePtrArray<const String> pieces(zone, 6);
+  const Class& cls = Class::Handle(zone, ref_type.type_class());
+  pieces.Add(Symbols::TwoSpaces());
+  pieces.Add(String::Handle(zone, cls.UserVisibleName()));
+  // Break cycle by not printing type arguments, but '<optimized out>' instead.
+  pieces.Add(Symbols::OptimizedOut());
+  pieces.Add(Symbols::SpaceIsFromSpace());
+  const Library& library = Library::Handle(zone, cls.library());
+  pieces.Add(String::Handle(zone, library.url()));
+  pieces.Add(Symbols::NewLine());
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
@@ -16758,12 +17042,14 @@
           Report::kMalboundedType,
           Heap::kNew,
           "type parameter '%s' of class '%s' must extend bound '%s', "
-          "but type argument '%s' is not a subtype of '%s'\n",
+          "but type argument '%s' is not a subtype of '%s' where\n%s%s",
           type_param_name.ToCString(),
           class_name.ToCString(),
           declared_bound_name.ToCString(),
           bounded_type_name.ToCString(),
-          upper_bound_name.ToCString());
+          upper_bound_name.ToCString(),
+          String::Handle(bounded_type.EnumerateURIs()).ToCString(),
+          String::Handle(upper_bound.EnumerateURIs()).ToCString());
     }
   }
   return false;
@@ -16809,7 +17095,8 @@
 
 
 RawString* TypeParameter::EnumerateURIs() const {
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   GrowableHandlePtrArray<const String> pieces(zone, 4);
   pieces.Add(Symbols::TwoSpaces());
   pieces.Add(String::Handle(zone, name()));
@@ -16820,7 +17107,7 @@
   const Library& library = Library::Handle(zone, cls.library());
   pieces.Add(String::Handle(zone, library.url()));
   pieces.Add(Symbols::NewLine());
-  return Symbols::FromConcatAll(pieces);
+  return Symbols::FromConcatAll(thread, pieces);
 }
 
 
@@ -17050,9 +17337,12 @@
   if (IsFinalized()) {
     return raw();
   }
-  AbstractType& bounded_type = AbstractType::Handle(type());
-
-  bounded_type = bounded_type.CloneUnfinalized();
+  const AbstractType& bounded_type = AbstractType::Handle(type());
+  const AbstractType& bounded_type_clone =
+      AbstractType::Handle(bounded_type.CloneUnfinalized());
+  if (bounded_type_clone.raw() == bounded_type.raw()) {
+    return raw();
+  }
   // No need to clone bound or type parameter, as they are not part of the
   // finalization state of this bounded type.
   return BoundedType::New(bounded_type,
@@ -17193,6 +17483,61 @@
 }
 
 
+RawInstance* Number::CheckAndCanonicalize(const char** error_str) const {
+  intptr_t cid = GetClassId();
+  switch (cid) {
+    case kSmiCid:
+      return reinterpret_cast<RawSmi*>(raw_value());
+    case kMintCid:
+      return Mint::NewCanonical(Mint::Cast(*this).value());
+    case kDoubleCid:
+      return Double::NewCanonical(Double::Cast(*this).value());
+    case kBigintCid: {
+      Thread* thread = Thread::Current();
+      Zone* zone = thread->zone();
+      Isolate* isolate = thread->isolate();
+      if (!CheckAndCanonicalizeFields(zone, error_str)) {
+        return Instance::null();
+      }
+      Bigint& result = Bigint::Handle(zone);
+      const Class& cls = Class::Handle(zone, this->clazz());
+      intptr_t index = 0;
+      result ^= cls.LookupCanonicalBigint(zone, Bigint::Cast(*this), &index);
+      if (!result.IsNull()) {
+        return result.raw();
+      }
+      {
+        SafepointMutexLocker ml(isolate->constant_canonicalization_mutex());
+        // Retry lookup.
+        {
+          result ^= cls.LookupCanonicalBigint(
+              zone, Bigint::Cast(*this), &index);
+          if (!result.IsNull()) {
+            return result.raw();
+          }
+        }
+
+        // The value needs to be added to the list. Grow the list if
+        // it is full.
+        result ^= this->raw();
+        ASSERT((isolate == Dart::vm_isolate()) || !result.InVMHeap());
+        if (result.IsNew()) {
+          // Create a canonical object in old space.
+          result ^= Object::Clone(result, Heap::kOld);
+        }
+        ASSERT(result.IsOld());
+        result.SetCanonical();
+        cls.InsertCanonicalNumber(zone, index, result);
+        return result.raw();
+      }
+    }
+    default:
+      UNREACHABLE();
+  }
+  return Instance::null();
+}
+
+
 const char* Number::ToCString() const {
   // Number is an interface. No instances of Number should exist.
   UNREACHABLE();
@@ -17602,31 +17947,32 @@
 RawMint* Mint::NewCanonical(int64_t value) {
   // Do not allocate a Mint if Smi would do.
   ASSERT(!Smi::IsValid(value));
-  const Class& cls =
-      Class::Handle(Isolate::Current()->object_store()->mint_class());
-  const Array& constants = Array::Handle(cls.constants());
-  const intptr_t constants_len = constants.Length();
-  // Linear search to see whether this value is already present in the
-  // list of canonicalized constants.
-  Mint& canonical_value = Mint::Handle();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  const Class& cls = Class::Handle(zone, isolate->object_store()->mint_class());
+  Mint& canonical_value = Mint::Handle(zone);
   intptr_t index = 0;
-  while (index < constants_len) {
-    canonical_value ^= constants.At(index);
-    if (canonical_value.IsNull()) {
-      break;
-    }
-    if (canonical_value.value() == value) {
-      ASSERT(canonical_value.IsCanonical());
-      return canonical_value.raw();
-    }
-    index++;
+  canonical_value ^= cls.LookupCanonicalMint(zone, value, &index);
+  if (!canonical_value.IsNull()) {
+    return canonical_value.raw();
   }
-  // The value needs to be added to the constants list. Grow the list if
-  // it is full.
-  canonical_value = Mint::New(value, Heap::kOld);
-  cls.InsertCanonicalConstant(index, canonical_value);
-  canonical_value.SetCanonical();
-  return canonical_value.raw();
+  {
+    SafepointMutexLocker ml(isolate->constant_canonicalization_mutex());
+    // Retry lookup.
+    {
+      canonical_value ^= cls.LookupCanonicalMint(zone, value, &index);
+      if (!canonical_value.IsNull()) {
+        return canonical_value.raw();
+      }
+    }
+    canonical_value = Mint::New(value, Heap::kOld);
+    canonical_value.SetCanonical();
+    // The value needs to be added to the constants list. Grow the list if
+    // it is full.
+    cls.InsertCanonicalNumber(zone, index, canonical_value);
+    return canonical_value.raw();
+  }
 }
 
 
@@ -17750,30 +18096,35 @@
 
 
 RawDouble* Double::NewCanonical(double value) {
-  const Class& cls =
-      Class::Handle(Isolate::Current()->object_store()->double_class());
-  const Array& constants = Array::Handle(cls.constants());
-  const intptr_t constants_len = constants.Length();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  const Class& cls = Class::Handle(isolate->object_store()->double_class());
   // Linear search to see whether this value is already present in the
   // list of canonicalized constants.
-  Double& canonical_value = Double::Handle();
+  Double& canonical_value = Double::Handle(zone);
   intptr_t index = 0;
-  while (index < constants_len) {
-    canonical_value ^= constants.At(index);
-    if (canonical_value.IsNull()) {
-      break;
-    }
-    if (canonical_value.BitwiseEqualsToDouble(value)) {
-      return canonical_value.raw();
-    }
-    index++;
+
+  canonical_value ^= cls.LookupCanonicalDouble(zone, value, &index);
+  if (!canonical_value.IsNull()) {
+    return canonical_value.raw();
   }
-  // The value needs to be added to the constants list. Grow the list if
-  // it is full.
-  canonical_value = Double::New(value, Heap::kOld);
-  cls.InsertCanonicalConstant(index, canonical_value);
-  canonical_value.SetCanonical();
-  return canonical_value.raw();
+  {
+    SafepointMutexLocker ml(isolate->constant_canonicalization_mutex());
+    // Retry lookup.
+    {
+      canonical_value ^= cls.LookupCanonicalDouble(zone, value, &index);
+      if (!canonical_value.IsNull()) {
+        return canonical_value.raw();
+      }
+    }
+    canonical_value = Double::New(value, Heap::kOld);
+    canonical_value.SetCanonical();
+    // The value needs to be added to the constants list. Grow the list if
+    // it is full.
+    cls.InsertCanonicalNumber(zone, index, canonical_value);
+    return canonical_value.raw();
+  }
 }
 
 
@@ -17898,13 +18249,14 @@
 }
 
 
-bool Bigint::CheckAndCanonicalizeFields(const char** error_str) const {
+bool Bigint::CheckAndCanonicalizeFields(Zone* zone,
+                                        const char** error_str) const {
   // Bool field neg should always be canonical.
-  ASSERT(Bool::Handle(neg()).IsCanonical());
+  ASSERT(Bool::Handle(zone, neg()).IsCanonical());
   // Smi field used is canonical by definition.
   if (Used() > 0) {
     // Canonicalize TypedData field digits.
-    TypedData& digits_ = TypedData::Handle(digits());
+    TypedData& digits_ = TypedData::Handle(zone, digits());
     digits_ ^= digits_.CheckAndCanonicalize(NULL);
     ASSERT(!digits_.IsNull());
     set_digits(digits_);
@@ -18054,31 +18406,34 @@
 
 
 RawBigint* Bigint::NewCanonical(const String& str) {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   const Bigint& value = Bigint::Handle(
-      Bigint::NewFromCString(str.ToCString(), Heap::kOld));
+      zone, Bigint::NewFromCString(str.ToCString(), Heap::kOld));
   const Class& cls =
-      Class::Handle(Isolate::Current()->object_store()->bigint_class());
-  const Array& constants = Array::Handle(cls.constants());
-  const intptr_t constants_len = constants.Length();
-  // Linear search to see whether this value is already present in the
-  // list of canonicalized constants.
-  Bigint& canonical_value = Bigint::Handle();
+      Class::Handle(zone, isolate->object_store()->bigint_class());
   intptr_t index = 0;
-  while (index < constants_len) {
-    canonical_value ^= constants.At(index);
-    if (canonical_value.IsNull()) {
-      break;
-    }
-    if (canonical_value.Equals(value)) {
-      return canonical_value.raw();
-    }
-    index++;
+  Bigint& canonical_value = Bigint::Handle(zone);
+  canonical_value ^= cls.LookupCanonicalBigint(zone, value, &index);
+  if (!canonical_value.IsNull()) {
+    return canonical_value.raw();
   }
-  // The value needs to be added to the constants list. Grow the list if
-  // it is full.
-  cls.InsertCanonicalConstant(index, value);
-  value.SetCanonical();
-  return value.raw();
+  {
+    SafepointMutexLocker ml(isolate->constant_canonicalization_mutex());
+    // Retry lookup.
+    {
+      canonical_value ^= cls.LookupCanonicalBigint(zone, value, &index);
+      if (!canonical_value.IsNull()) {
+        return canonical_value.raw();
+      }
+    }
+    value.SetCanonical();
+    // The value needs to be added to the constants list. Grow the list if
+    // it is full.
+    cls.InsertCanonicalNumber(zone, index, value);
+    return value.raw();
+  }
 }
 
 
@@ -18878,7 +19233,7 @@
   if (IsCanonical()) {
     return this->raw();
   }
-  return Symbols::New(*this);
+  return Symbols::New(Thread::Current(), *this);
 }
 
 
@@ -19441,6 +19796,7 @@
                                 intptr_t length,
                                 void* peer,
                                 Dart_PeerFinalizer cback) const {
+  ASSERT(FLAG_support_externalizable_strings);
   String& result = String::Handle();
   void* external_data;
   Dart_WeakPersistentHandleFinalizer finalizer;
@@ -20315,14 +20671,7 @@
     return false;
   }
 
-  // Both arrays must have the same type arguments.
-  const TypeArguments& type_args = TypeArguments::Handle(GetTypeArguments());
-  const TypeArguments& other_type_args = TypeArguments::Handle(
-      other.GetTypeArguments());
-  if (!type_args.Equals(other_type_args)) {
-    return false;
-  }
-
+  // First check if both arrays have the same length and elements.
   const Array& other_arr = Array::Cast(other);
 
   intptr_t len = this->Length();
@@ -20335,6 +20684,14 @@
       return false;
     }
   }
+
+  // Now check if both arrays have the same type arguments.
+  const TypeArguments& type_args = TypeArguments::Handle(GetTypeArguments());
+  const TypeArguments& other_type_args = TypeArguments::Handle(
+      other.GetTypeArguments());
+  if (!type_args.Equals(other_type_args)) {
+    return false;
+  }
   return true;
 }
 
@@ -20480,8 +20837,9 @@
 }
 
 
-bool Array::CheckAndCanonicalizeFields(const char** error_str) const {
-  Object& obj = Object::Handle();
+bool Array::CheckAndCanonicalizeFields(Zone* zone,
+                                       const char** error_str) const {
+  Object& obj = Object::Handle(zone);
   // Iterate over all elements, canonicalize numbers and strings, expect all
   // other instances to be canonical otherwise report error (return false).
   for (intptr_t i = 0; i < Length(); i++) {
@@ -20551,44 +20909,6 @@
 }
 
 
-bool GrowableObjectArray::CanonicalizeEquals(const Instance& other) const {
-  // If both handles point to the same raw instance they are equal.
-  if (this->raw() == other.raw()) {
-    return true;
-  }
-
-  // Other instance must be non null and a GrowableObjectArray.
-  if (!other.IsGrowableObjectArray() || other.IsNull()) {
-    return false;
-  }
-
-  const GrowableObjectArray& other_arr = GrowableObjectArray::Cast(other);
-
-  // The capacity and length of both objects must be equal.
-  if (Capacity() != other_arr.Capacity() || Length() != other_arr.Length()) {
-    return false;
-  }
-
-  // Both arrays must have the same type arguments.
-  const TypeArguments& type_args = TypeArguments::Handle(GetTypeArguments());
-  const TypeArguments& other_type_args = TypeArguments::Handle(
-      other.GetTypeArguments());
-  if (!type_args.Equals(other_type_args)) {
-    return false;
-  }
-
-  // The data part in both arrays must be identical.
-  const Array& contents = Array::Handle(data());
-  const Array& other_contents = Array::Handle(other_arr.data());
-  for (intptr_t i = 0; i < Length(); i++) {
-    if (contents.At(i) != other_contents.At(i)) {
-      return false;
-    }
-  }
-  return true;
-}
-
-
 RawGrowableObjectArray* GrowableObjectArray::New(intptr_t capacity,
                                                  Heap::Space space) {
   const Array& data = Array::Handle(Array::New(capacity, space));
@@ -21354,7 +21674,9 @@
       code = CodeAtFrame(i);
       ASSERT(function.raw() == code.function());
       uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i));
-      if (code.is_optimized() && expand_inlined() && !FLAG_precompiled_mode) {
+      if (code.is_optimized() &&
+          expand_inlined() &&
+          !FLAG_precompiled_runtime) {
         // Traverse inlined frames.
         for (InlinedFunctionsIterator it(code, pc);
              !it.Done() && (*frame_index < max_frames); it.Advance()) {
@@ -21395,17 +21717,17 @@
 }
 
 
-void JSRegExp::set_pattern(const String& pattern) const {
+void RegExp::set_pattern(const String& pattern) const {
   StorePointer(&raw_ptr()->pattern_, pattern.raw());
 }
 
 
-void JSRegExp::set_function(intptr_t cid, const Function& value) const {
+void RegExp::set_function(intptr_t cid, const Function& value) const {
   StorePointer(FunctionAddr(cid), value.raw());
 }
 
 
-void JSRegExp::set_bytecode(bool is_one_byte, const TypedData& bytecode) const {
+void RegExp::set_bytecode(bool is_one_byte, const TypedData& bytecode) const {
   if (is_one_byte) {
     StorePointer(&raw_ptr()->one_byte_bytecode_, bytecode.raw());
   } else {
@@ -21414,16 +21736,16 @@
 }
 
 
-void JSRegExp::set_num_bracket_expressions(intptr_t value) const {
+void RegExp::set_num_bracket_expressions(intptr_t value) const {
   StoreSmi(&raw_ptr()->num_bracket_expressions_, Smi::New(value));
 }
 
 
-RawJSRegExp* JSRegExp::New(Heap::Space space) {
-  JSRegExp& result = JSRegExp::Handle();
+RawRegExp* RegExp::New(Heap::Space space) {
+  RegExp& result = RegExp::Handle();
   {
-    RawObject* raw = Object::Allocate(JSRegExp::kClassId,
-                                      JSRegExp::InstanceSize(),
+    RawObject* raw = Object::Allocate(RegExp::kClassId,
+                                      RegExp::InstanceSize(),
                                       space);
     NoSafepointScope no_safepoint;
     result ^= raw;
@@ -21435,21 +21757,21 @@
 }
 
 
-void* JSRegExp::GetDataStartAddress() const {
+void* RegExp::GetDataStartAddress() const {
   intptr_t addr = reinterpret_cast<intptr_t>(raw_ptr());
-  return reinterpret_cast<void*>(addr + sizeof(RawJSRegExp));
+  return reinterpret_cast<void*>(addr + sizeof(RawRegExp));
 }
 
 
-RawJSRegExp* JSRegExp::FromDataStartAddress(void* data) {
-  JSRegExp& regexp = JSRegExp::Handle();
-  intptr_t addr = reinterpret_cast<intptr_t>(data) - sizeof(RawJSRegExp);
+RawRegExp* RegExp::FromDataStartAddress(void* data) {
+  RegExp& regexp = RegExp::Handle();
+  intptr_t addr = reinterpret_cast<intptr_t>(data) - sizeof(RawRegExp);
   regexp ^= RawObject::FromAddr(addr);
   return regexp.raw();
 }
 
 
-const char* JSRegExp::Flags() const {
+const char* RegExp::Flags() const {
   switch (flags()) {
     case kGlobal | kIgnoreCase | kMultiLine :
     case kIgnoreCase | kMultiLine :
@@ -21467,14 +21789,14 @@
 }
 
 
-bool JSRegExp::CanonicalizeEquals(const Instance& other) const {
+bool RegExp::CanonicalizeEquals(const Instance& other) const {
   if (this->raw() == other.raw()) {
     return true;  // "===".
   }
-  if (other.IsNull() || !other.IsJSRegExp()) {
+  if (other.IsNull() || !other.IsRegExp()) {
     return false;
   }
-  const JSRegExp& other_js = JSRegExp::Cast(other);
+  const RegExp& other_js = RegExp::Cast(other);
   // Match the pattern.
   const String& str1 = String::Handle(pattern());
   const String& str2 = String::Handle(other_js.pattern());
@@ -21491,10 +21813,10 @@
 }
 
 
-const char* JSRegExp::ToCString() const {
+const char* RegExp::ToCString() const {
   const String& str = String::Handle(pattern());
   return OS::SCreate(Thread::Current()->zone(),
-      "JSRegExp: pattern=%s flags=%s", str.ToCString(), Flags());
+      "RegExp: pattern=%s flags=%s", str.ToCString(), Flags());
 }
 
 
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 8fafabc..6a2008f 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -262,15 +262,12 @@
         &raw()->ptr()->tags_, old_tags, new_tags);
   }
   bool IsCanonical() const {
-    ASSERT(!IsNull());
     return raw()->IsCanonical();
   }
   void SetCanonical() const {
-    ASSERT(!IsNull());
     raw()->SetCanonical();
   }
   void ClearCanonical() const {
-    ASSERT(!IsNull());
     raw()->ClearCanonical();
   }
   intptr_t GetClassId() const {
@@ -1105,7 +1102,7 @@
   bool IsObjectClass() const { return id() == kInstanceCid; }
 
   // Check if this class represents the 'Function' class.
-  bool IsFunctionClass() const;
+  bool IsDartFunctionClass() const;
 
   // Check if this class represents the 'Closure' class.
   bool IsClosureClass() const  { return id() == kClosureCid; }
@@ -1198,10 +1195,31 @@
   RawField* LookupInstanceField(const String& name) const;
   RawField* LookupStaticField(const String& name) const;
   RawField* LookupField(const String& name) const;
+  RawField* LookupFieldAllowPrivate(const String& name) const;
+  RawField* LookupInstanceFieldAllowPrivate(const String& name) const;
+  RawField* LookupStaticFieldAllowPrivate(const String& name) const;
 
   RawLibraryPrefix* LookupLibraryPrefix(const String& name) const;
 
+  // Returns an instance of Double or Double::null().
+  // 'index' points to either:
+  // - constants_list_ position of found element, or
+  // - constants_list_ position where new canonical can be inserted.
+  RawDouble* LookupCanonicalDouble(Zone* zone,
+                                   double value, intptr_t* index) const;
+  RawMint* LookupCanonicalMint(Zone* zone,
+                               int64_t value, intptr_t* index) const;
+  RawBigint* LookupCanonicalBigint(Zone* zone,
+                                   const Bigint& value, intptr_t* index) const;
+  // The methods above are more efficient than this generic one.
+  RawInstance* LookupCanonicalInstance(Zone* zone,
+                                       const Instance& value,
+                                       intptr_t* index) const;
+
   void InsertCanonicalConstant(intptr_t index, const Instance& constant) const;
+  void InsertCanonicalNumber(Zone* zone,
+                             intptr_t index,
+                             const Number& constant) const;
 
   intptr_t FindCanonicalTypeIndex(const AbstractType& needle) const;
   RawAbstractType* CanonicalTypeFromIndex(intptr_t idx) const;
@@ -1253,6 +1271,12 @@
 
   void set_is_prefinalized() const;
 
+  bool is_refinalize_after_patch() const {
+    return ClassFinalizedBits::decode(raw_ptr()->state_bits_)
+        == RawClass::kRefinalizeAfterPatch;
+  }
+
+  void SetRefinalizeAfterPatch() const;
   void ResetFinalization() const;
 
   bool is_marked_for_parsing() const {
@@ -1366,6 +1390,8 @@
   bool TraceAllocation(Isolate* isolate) const;
   void SetTraceAllocation(bool trace_allocation) const;
 
+  bool ValidatePostFinalizePatch(const Class& orig_class, Error* error) const;
+
  private:
   enum MemberKind {
     kAny = 0,
@@ -1502,7 +1528,6 @@
   friend class Instance;
   friend class Object;
   friend class Type;
-  friend class FunctionType;
   friend class Intrinsifier;
   friend class Precompiler;
 };
@@ -1914,6 +1939,10 @@
   RawFunction* GetTargetAt(intptr_t index) const;
   RawFunction* GetTargetForReceiverClassId(intptr_t class_id) const;
 
+  RawObject* GetTargetOrCodeAt(intptr_t index) const;
+  void SetCodeAt(intptr_t index, const Code& value) const;
+  void SetEntryPointAt(intptr_t index, const Smi& value) const;
+
   void IncrementCountAt(intptr_t index, intptr_t value) const;
   void SetCountAt(intptr_t index, intptr_t value) const;
   intptr_t GetCountAt(intptr_t index) const;
@@ -1950,10 +1979,16 @@
   static intptr_t TargetIndexFor(intptr_t num_args) {
     return num_args;
   }
+  static intptr_t CodeIndexFor(intptr_t num_args) {
+    return num_args;
+  }
 
   static intptr_t CountIndexFor(intptr_t num_args) {
     return (num_args + 1);
   }
+  static intptr_t EntryPointIndexFor(intptr_t num_args) {
+    return (num_args + 1);
+  }
 
   bool IsUsedAt(intptr_t i) const;
 
@@ -2046,6 +2081,11 @@
     kCachedICDataArrayCount = 4
   };
 
+#if defined(TAG_IC_DATA)
+  void set_tag(intptr_t value) const;
+  intptr_t tag() const { return raw_ptr()->tag_; }
+#endif
+
  private:
   static RawICData* New();
 
@@ -2125,16 +2165,16 @@
 
   // Return the type of this function's signature. It may not be canonical yet.
   // For example, if this function has a signature of the form
-  // '(T, [b: B, c: C]) => R', where 'T' and 'R' are type parameters of the
+  // '(T, [B, C]) => R', where 'T' and 'R' are type parameters of the
   // owner class of this function, then its signature type is a parameterized
-  // FunctionType with uninstantiated type arguments 'T' and 'R' as elements of
+  // function type with uninstantiated type arguments 'T' and 'R' as elements of
   // its type argument vector.
-  RawFunctionType* SignatureType() const;
+  RawType* SignatureType() const;
 
   // Update the signature type (with a canonical version).
-  void SetSignatureType(const FunctionType& value) const;
+  void SetSignatureType(const Type& value) const;
 
-  // Build a string of the form 'C<T, R>(T, {b: B, c: C}) => R' representing the
+  // Build a string of the form 'C<T, R>(T, {B b, C c}) => R' representing the
   // internal signature of the given function. In this example, T and R are
   // type parameters of class C, the owner of the function.
   RawString* Signature() const {
@@ -2142,7 +2182,7 @@
     return BuildSignature(instantiate, kInternalName, TypeArguments::Handle());
   }
 
-  // Build a string of the form '(T, {b: B, c: C}) => R' representing the
+  // Build a string of the form '(T, {B b, C c}) => R' representing the
   // user visible signature of the given function. In this example, T and R are
   // type parameters of class C, the owner of the function, also called the
   // scope class of the function type.
@@ -2154,9 +2194,9 @@
         instantiate, kUserVisibleName, TypeArguments::Handle());
   }
 
-  // Build a string of the form '(A, {b: B, c: C}) => D' representing the
+  // Build a string of the form '(A, {B b, C c}) => D' representing the
   // signature of the given function, where all generic types (e.g. '<T, R>' in
-  // 'C<T, R>(T, {b: B, c: C}) => R') are instantiated using the given
+  // 'C<T, R>(T, {B b, C c}) => R') are instantiated using the given
   // instantiator type argument vector of a C instance (e.g. '<A, D>').
   RawString* InstantiatedSignatureFrom(const TypeArguments& instantiator,
                                        NameVisibility name_visibility) const {
@@ -2168,7 +2208,7 @@
   // does not involve generic parameter types or generic result type.
   bool HasInstantiatedSignature() const;
 
-  // Build a string of the form 'T, {b: B, c: C} representing the user
+  // Build a string of the form 'T, {B b, C c}' representing the user
   // visible formal parameters of the function.
   RawString* UserVisibleFormalParameters() const;
 
@@ -2177,9 +2217,9 @@
   RawScript* script() const;
   RawObject* RawOwner() const { return raw_ptr()->owner_; }
 
-  RawJSRegExp* regexp() const;
+  RawRegExp* regexp() const;
   intptr_t string_specialization_cid() const;
-  void SetRegExpData(const JSRegExp& regexp,
+  void SetRegExpData(const RegExp& regexp,
                      intptr_t string_specialization_cid) const;
 
   RawString* native_name() const;
@@ -2228,6 +2268,8 @@
     return OFFSET_OF(RawFunction, entry_point_);
   }
 
+  virtual intptr_t Hash() const;
+
   // Returns true if there is at least one debugger breakpoint
   // set in this function.
   bool HasBreakpoint() const;
@@ -2402,10 +2444,11 @@
     StoreNonPointer(&raw_ptr()->usage_counter_, value);
   }
 
-  int16_t deoptimization_counter() const {
+  int8_t deoptimization_counter() const {
     return raw_ptr()->deoptimization_counter_;
   }
-  void set_deoptimization_counter(int16_t value) const {
+  void set_deoptimization_counter(int8_t value) const {
+    ASSERT(value >= 0);
     StoreNonPointer(&raw_ptr()->deoptimization_counter_, value);
   }
 
@@ -2687,6 +2730,14 @@
 
   void set_modifier(RawFunction::AsyncModifier value) const;
 
+  // 'was_compiled' is true if the function was compiled once in this
+  // VM instantiation. It independent from presence of type feedback
+  // (ic_data_array) and code, whihc may be loaded from a snapshot.
+  void set_was_compiled(bool value) const {
+    StoreNonPointer(&raw_ptr()->was_compiled_, value ? 1 : 0);
+  }
+  bool was_compiled() const { return raw_ptr()->was_compiled_ == 1; }
+
   // static: Considered during class-side or top-level resolution rather than
   //         instance-side resolution.
   // const: Valid target of a const constructor call.
@@ -2793,7 +2844,7 @@
   RawScript* eval_script() const;
   void set_eval_script(const Script& value) const;
   void set_num_optional_parameters(intptr_t value) const;  // Encoded value.
-  void set_kind_tag(intptr_t value) const;
+  void set_kind_tag(uint32_t value) const;
   void set_data(const Object& value) const;
 
   static RawFunction* New();
@@ -2801,6 +2852,8 @@
   RawString* QualifiedName(NameVisibility name_visibility) const;
 
   void BuildSignatureParameters(
+      Thread* thread,
+      Zone* zone,
       bool instantiate,
       NameVisibility name_visibility,
       const TypeArguments& instantiator,
@@ -2846,8 +2899,8 @@
   void set_parent_function(const Function& value) const;
 
   // Signature type of this closure function.
-  RawFunctionType* signature_type() const { return raw_ptr()->signature_type_; }
-  void set_signature_type(const FunctionType& value) const;
+  RawType* signature_type() const { return raw_ptr()->signature_type_; }
+  void set_signature_type(const Type& value) const;
 
   RawInstance* implicit_static_closure() const {
     return raw_ptr()->closure_;
@@ -3046,9 +3099,7 @@
     set_kind_bits(UnboxingCandidateBit::update(b, raw_ptr()->kind_bits_));
   }
 
-  static bool IsExternalizableCid(intptr_t cid) {
-    return (cid == kOneByteStringCid) || (cid == kTwoByteStringCid);
-  }
+  static bool IsExternalizableCid(intptr_t cid);
 
   enum {
     kUnknownLengthOffset = -1,
@@ -3531,6 +3582,7 @@
   // Library imports.
   RawArray* imports() const { return raw_ptr()->imports_; }
   RawArray* exports() const { return raw_ptr()->exports_; }
+  RawArray* exports2() const { return raw_ptr()->exports2_; }
   void AddImport(const Namespace& ns) const;
   intptr_t num_imports() const { return raw_ptr()->num_imports_; }
   RawNamespace* ImportAt(intptr_t index) const;
@@ -3835,7 +3887,10 @@
   intptr_t size() const { return raw_ptr()->size_; }  // Excludes HeaderSize().
 
   uword EntryPoint() const {
-    return reinterpret_cast<uword>(raw_ptr()) + HeaderSize();
+    return EntryPoint(raw());
+  }
+  static uword EntryPoint(RawInstructions* instr) {
+    return reinterpret_cast<uword>(instr->ptr()) + HeaderSize();
   }
 
   static const intptr_t kMaxElements = (kMaxInt32 -
@@ -4149,10 +4204,10 @@
     StoreNonPointer(&raw_ptr()->pc_offset_, value);
   }
 
-  intptr_t RegisterBitCount() const { return raw_ptr()->register_bit_count_; }
-  void SetRegisterBitCount(intptr_t register_bit_count) const {
-    ASSERT(register_bit_count < kMaxInt32);
-    StoreNonPointer(&raw_ptr()->register_bit_count_, register_bit_count);
+  intptr_t SlowPathBitCount() const { return raw_ptr()->slow_path_bit_count_; }
+  void SetSlowPathBitCount(intptr_t bit_count) const {
+    ASSERT(bit_count < kMaxInt32);
+    StoreNonPointer(&raw_ptr()->slow_path_bit_count_, bit_count);
   }
 
   bool Equals(const Stackmap& other) const {
@@ -4302,9 +4357,7 @@
 
 class Code : public Object {
  public:
-  RawInstructions* active_instructions() const {
-    return raw_ptr()->active_instructions_;
-  }
+  uword active_entry_point() const { return raw_ptr()->entry_point_; }
 
   RawInstructions* instructions() const { return raw_ptr()->instructions_; }
 
@@ -4334,20 +4387,15 @@
   }
   void set_is_alive(bool value) const;
 
-  uword EntryPoint() const {
-    return Instructions::Handle(instructions()).EntryPoint();
-  }
-  intptr_t Size() const {
-    const Instructions& instr = Instructions::Handle(instructions());
-    return instr.size();
-  }
+  uword EntryPoint() const;
+  intptr_t Size() const;
+
   RawObjectPool* GetObjectPool() const {
     return object_pool();
   }
   bool ContainsInstructionAt(uword addr) const {
-    const Instructions& instr = Instructions::Handle(instructions());
-    const uword offset = addr - instr.EntryPoint();
-    return offset < static_cast<uword>(instr.size());
+    const uword offset = addr - EntryPoint();
+    return offset < static_cast<uword>(Size());
   }
 
   // Returns true if there is a debugger breakpoint set in this code object.
@@ -4370,6 +4418,8 @@
     StorePointer(&raw_ptr()->code_source_map_, code_source_map.raw());
   }
 
+  TokenPosition GetTokenPositionAt(intptr_t offset) const;
+
   // Array of DeoptInfo objects.
   RawArray* deopt_info_array() const {
     return raw_ptr()->deopt_info_array_;
@@ -4468,8 +4518,12 @@
   RawArray* GetInlinedCallerIdMap() const;
   void SetInlinedCallerIdMap(const Array& value) const;
 
+  // If |token_positions| is not NULL it will be populated with the token
+  // positions of the inlined calls.
   void GetInlinedFunctionsAt(
-      intptr_t offset, GrowableArray<Function*>* fs) const;
+      intptr_t offset,
+      GrowableArray<Function*>* fs,
+      GrowableArray<TokenPosition>* token_positions = NULL) const;
 
   void DumpInlinedIntervals() const;
 
@@ -4580,12 +4634,11 @@
   void Enable() const {
     if (!IsDisabled()) return;
     ASSERT(Thread::Current()->IsMutatorThread());
-    ASSERT(instructions() != active_instructions());
     SetActiveInstructions(instructions());
   }
 
   bool IsDisabled() const {
-    return instructions() != active_instructions();
+    return active_entry_point() != EntryPoint();
   }
 
  private:
@@ -4611,8 +4664,7 @@
 
   class SlowFindRawCodeVisitor : public FindObjectVisitor {
    public:
-    explicit SlowFindRawCodeVisitor(uword pc)
-        : FindObjectVisitor(Isolate::Current()), pc_(pc) { }
+    explicit SlowFindRawCodeVisitor(uword pc) : pc_(pc) { }
     virtual ~SlowFindRawCodeVisitor() { }
 
     // Check if object matches find condition.
@@ -5110,7 +5162,8 @@
   virtual RawInstance* CheckAndCanonicalize(const char** error_str) const;
 
   // Returns true if all fields are OK for canonicalization.
-  virtual bool CheckAndCanonicalizeFields(const char** error_str) const;
+  virtual bool CheckAndCanonicalizeFields(Zone* zone,
+                                          const char** error_str) const;
 
   RawObject* GetField(const Field& field) const {
     return *FieldAddr(field);
@@ -5158,7 +5211,8 @@
   // error object if evaluating the expression fails. The method has
   // the formal parameters given in param_names, and is invoked with
   // the argument values given in param_values.
-  RawObject* Evaluate(const String& expr,
+  RawObject* Evaluate(const Class& method_cls,
+                      const String& expr,
                       const Array& param_names,
                       const Array& param_values) const;
 
@@ -5207,7 +5261,7 @@
   friend class Class;
   friend class Closure;
   friend class DeferredObject;
-  friend class JSRegExp;
+  friend class RegExp;
   friend class SnapshotWriter;
   friend class StubCode;
   friend class TypedDataView;
@@ -5302,6 +5356,9 @@
   virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const;
 
+  // Check if this type represents a function type.
+  virtual bool IsFunctionType() const { return false; }
+
   // Instantiate this type using the given type argument vector.
   // Return a new type, or return 'this' if it is already instantiated.
   // If bound_error is not NULL, it may be set to reflect a bound error.
@@ -5377,7 +5434,9 @@
 
   // Check if this type represents the 'dynamic' type.
   bool IsDynamicType() const {
-    return HasResolvedTypeClass() && (type_class() == Object::dynamic_class());
+    return !IsFunctionType() &&
+        HasResolvedTypeClass() &&
+        (type_class() == Object::dynamic_class());
   }
 
   // Check if this type represents the 'Null' type.
@@ -5385,12 +5444,15 @@
 
   // Check if this type represents the 'void' type.
   bool IsVoidType() const {
-    return HasResolvedTypeClass() && (type_class() == Object::void_class());
+    return !IsFunctionType() &&
+        HasResolvedTypeClass() &&
+        (type_class() == Object::void_class());
   }
 
   bool IsObjectType() const {
-    return HasResolvedTypeClass() &&
-    Class::Handle(type_class()).IsObjectClass();
+    return !IsFunctionType() &&
+        HasResolvedTypeClass() &&
+        Class::Handle(type_class()).IsObjectClass();
   }
 
   // Check if this type represents the 'bool' type.
@@ -5478,6 +5540,7 @@
         (raw_ptr()->type_state_ == RawType::kFinalizedUninstantiated);
   }
   virtual void SetIsFinalized() const;
+  void ResetIsFinalized() const;  // Ignore current state and set again.
   virtual bool IsBeingFinalized() const {
     return raw_ptr()->type_state_ == RawType::kBeingFinalized;
   }
@@ -5485,7 +5548,7 @@
   virtual bool IsMalformed() const;
   virtual bool IsMalbounded() const;
   virtual bool IsMalformedOrMalbounded() const;
-  virtual RawLanguageError* error() const { return raw_ptr()->error_; }
+  virtual RawLanguageError* error() const;
   virtual void set_error(const LanguageError& value) const;
   virtual bool IsResolved() const {
     return raw_ptr()->type_state_ >= RawType::kResolved;
@@ -5501,6 +5564,12 @@
   virtual bool IsInstantiated(TrailPtr trail = NULL) const;
   virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const;
+  // If signature is not null, this type represents a function type.
+  RawFunction* signature() const;
+  void set_signature(const Function& value) const;
+  virtual bool IsFunctionType() const {
+    return signature() != Function::null();
+  }
   virtual RawAbstractType* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       Error* bound_error,
@@ -5566,7 +5635,7 @@
   static RawType* ArrayType();
 
   // The 'Function' type.
-  static RawType* Function();
+  static RawType* DartFunctionType();
 
   // The finalized type of the given non-parameterized class.
   static RawType* NewNonParameterizedType(const Class& type_class);
@@ -5588,106 +5657,6 @@
 };
 
 
-// TODO(regis): FunctionType is very similar to Type. Instead of a separate
-// class FunctionType, we could consider an object of class Type as representing
-// a function type if it has a non-null function (signature) field.
-// In order to save space, we could reuse the error_ field? A malformed or
-// malbounded function type would lose its function reference, but the error
-// string would contain relevant info.
-
-// A FunctionType describes the signature of a function, i.e. the result type
-// and formal parameter types of the function, as well as the names of optional
-// named formal parameters.
-// If these types refer to type parameters of a class in scope, the function
-// type is generic. A generic function type may be instantiated by a type
-// argument vector.
-// Therefore, a FunctionType consists of a scope class, a type argument vector,
-// and a signature.
-// The scope class is either a generic class (or generic typedef) declaring the
-// type parameters referred to by the signature, or class _Closure in the
-// non-generic case (including the non-generic typedef case).
-// The type arguments specify an instantiation of the generic signature (null in
-// the non-generic case).
-// The signature is a reference to an actual closure function (kClosureFunction)
-// or to a signature function (kSignatureFunction).
-// Since typedefs cannot refer to themselves, directly or indirectly, a
-// FunctionType cannot be recursive. Only individual formal parameter types can.
-class FunctionType : public AbstractType {
- public:
-  virtual bool IsFinalized() const {
-    return
-        (raw_ptr()->type_state_ == RawFunctionType::kFinalizedInstantiated) ||
-        (raw_ptr()->type_state_ == RawFunctionType::kFinalizedUninstantiated);
-  }
-  virtual void SetIsFinalized() const;
-  void ResetIsFinalized() const;  // Ignore current state and set again.
-  virtual bool IsBeingFinalized() const {
-    return raw_ptr()->type_state_ == RawFunctionType::kBeingFinalized;
-  }
-  virtual void SetIsBeingFinalized() const;
-  virtual bool IsMalformed() const;
-  virtual bool IsMalbounded() const;
-  virtual bool IsMalformedOrMalbounded() const;
-  virtual RawLanguageError* error() const { return raw_ptr()->error_; }
-  virtual void set_error(const LanguageError& value) const;
-  virtual bool IsResolved() const {
-    return raw_ptr()->type_state_ >= RawFunctionType::kResolved;
-  }
-  virtual void SetIsResolved() const;
-  // The scope class of a FunctionType is always resolved. It has no actual
-  // type class. Returning false is important for the type testers to work, e.g.
-  // IsDynamicType(), IsBoolType(), etc...
-  virtual bool HasResolvedTypeClass() const { return false; }
-  // Return scope_class from virtual type_class() to factorize finalization
-  // with Type, also a parameterized type.
-  virtual RawClass* type_class() const { return scope_class(); }
-  RawClass* scope_class() const { return raw_ptr()->scope_class_; }
-  void set_scope_class(const Class& value) const;
-  virtual RawTypeArguments* arguments() const { return raw_ptr()->arguments_; }
-  virtual void set_arguments(const TypeArguments& value) const;
-  RawFunction* signature() const { return raw_ptr()->signature_; }
-  virtual TokenPosition token_pos() const { return raw_ptr()->token_pos_; }
-  virtual bool IsInstantiated(TrailPtr trail = NULL) const;
-  virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
-  virtual bool IsRecursive() const;
-  virtual RawAbstractType* InstantiateFrom(
-      const TypeArguments& instantiator_type_arguments,
-      Error* malformed_error,
-      TrailPtr instantiation_trail,
-      TrailPtr bound_trail,
-      Heap::Space space) const;
-  virtual RawAbstractType* CloneUnfinalized() const;
-  virtual RawAbstractType* CloneUninstantiated(
-      const Class& new_owner,
-      TrailPtr trail = NULL) const;
-  virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const;
-  virtual RawString* EnumerateURIs() const;
-
-  virtual intptr_t Hash() const;
-
-  static intptr_t InstanceSize() {
-    return RoundedAllocationSize(sizeof(RawFunctionType));
-  }
-
-  static RawFunctionType* New(const Class& scope_class,
-                              const TypeArguments& arguments,
-                              const Function& signature,
-                              TokenPosition token_pos,
-                              Heap::Space space = Heap::kOld);
-
- private:
-  void set_signature(const Function& value) const;
-  void set_token_pos(TokenPosition token_pos) const;
-  void set_type_state(int8_t state) const;
-
-  static RawFunctionType* New(Heap::Space space = Heap::kOld);
-
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(FunctionType, AbstractType);
-  friend class Class;
-  friend class TypeArguments;
-};
-
-
 // A TypeRef is used to break cycles in the representation of recursive types.
 // Its only field is the recursive AbstractType it refers to.
 // Note that the cycle always involves type arguments.
@@ -5710,7 +5679,6 @@
   }
   virtual bool IsResolved() const { return true; }
   virtual bool HasResolvedTypeClass() const {
-    // Returns false if the ref type is a function type.
     return AbstractType::Handle(type()).HasResolvedTypeClass();
   }
   RawAbstractType* type() const { return raw_ptr()->type_; }
@@ -5982,6 +5950,9 @@
   // TODO(iposva): Add more useful Number methods.
   RawString* ToString(Heap::Space space) const;
 
+  // Numbers are canonicalized differently from other instances/strings.
+  virtual RawInstance* CheckAndCanonicalize(const char** error_str) const;
+
  private:
   OBJECT_IMPLEMENTATION(Number, Instance);
 
@@ -6055,10 +6026,6 @@
   virtual bool Equals(const Instance& other) const;
   virtual bool IsZero() const { return Value() == 0; }
   virtual bool IsNegative() const { return Value() < 0; }
-  // Smi values are implicitly canonicalized.
-  virtual RawInstance* CheckAndCanonicalize(const char** error_str) const {
-    return reinterpret_cast<RawSmi*>(raw_value());
-  }
 
   virtual double AsDoubleValue() const;
   virtual int64_t AsInt64Value() const;
@@ -6076,6 +6043,11 @@
     return reinterpret_cast<RawSmi*>(raw_smi);
   }
 
+  static RawSmi* FromAlignedAddress(uword address) {
+    ASSERT((address & kSmiTagMask) == kSmiTag);
+    return reinterpret_cast<RawSmi*>(address);
+  }
+
   static RawClass* Class();
 
   static intptr_t Value(const RawSmi* raw_smi) {
@@ -6173,6 +6145,7 @@
 
   MINT_OBJECT_IMPLEMENTATION(Mint, Integer, Integer);
   friend class Class;
+  friend class Number;
 };
 
 
@@ -6189,7 +6162,8 @@
 
   virtual int CompareWith(const Integer& other) const;
 
-  virtual bool CheckAndCanonicalizeFields(const char** error_str) const;
+  virtual bool CheckAndCanonicalizeFields(Zone* zone,
+                                          const char** error_str) const;
 
   virtual bool FitsIntoSmi() const;
   bool FitsIntoInt64() const;
@@ -6304,6 +6278,7 @@
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Double, Number);
   friend class Class;
+  friend class Number;
 };
 
 
@@ -6435,6 +6410,7 @@
 
   bool StartsWith(const String& other) const;
 
+  // Strings are canonicalized using the symbol table.
   virtual RawInstance* CheckAndCanonicalize(const char** error_str) const;
 
   bool IsSymbol() const { return raw()->IsCanonical(); }
@@ -7138,7 +7114,8 @@
   }
 
   // Returns true if all elements are OK for canonicalization.
-  virtual bool CheckAndCanonicalizeFields(const char** error_str) const;
+  virtual bool CheckAndCanonicalizeFields(Zone* zone,
+                                          const char** error_str) const;
 
   // Make the array immutable to Dart code by switching the class pointer
   // to ImmutableArray.
@@ -7284,8 +7261,13 @@
     StorePointer(&raw_ptr()->type_arguments_, value.raw());
   }
 
-  virtual bool CanonicalizeEquals(const Instance& other) const;
+  // We don't expect a growable object array to be canonicalized.
+  virtual bool CanonicalizeEquals(const Instance& other) const {
+    UNREACHABLE();
+    return false;
+  }
 
+  // We don't expect a growable object array to be canonicalized.
   virtual RawInstance* CheckAndCanonicalize(const char** error_str) const {
     UNREACHABLE();
     return Instance::null();
@@ -7975,7 +7957,8 @@
   }
 
   // Returns true if all elements are OK for canonicalization.
-  virtual bool CheckAndCanonicalizeFields(const char** error_str) const {
+  virtual bool CheckAndCanonicalizeFields(Zone* zone,
+                                          const char** error_str) const {
     // None of the fields of a closure are instances.
     return true;
   }
@@ -8092,7 +8075,7 @@
 
 
 // Internal JavaScript regular expression object.
-class JSRegExp : public Instance {
+class RegExp : public Instance {
  public:
   // Meaning of RegExType:
   // kUninitialized: the type of th regexp has not been initialized yet.
@@ -8146,13 +8129,13 @@
   static intptr_t function_offset(intptr_t cid) {
     switch (cid) {
       case kOneByteStringCid:
-        return OFFSET_OF(RawJSRegExp, one_byte_function_);
+        return OFFSET_OF(RawRegExp, one_byte_function_);
       case kTwoByteStringCid:
-        return OFFSET_OF(RawJSRegExp, two_byte_function_);
+        return OFFSET_OF(RawRegExp, two_byte_function_);
       case kExternalOneByteStringCid:
-         return OFFSET_OF(RawJSRegExp, external_one_byte_function_);
+         return OFFSET_OF(RawRegExp, external_one_byte_function_);
       case kExternalTwoByteStringCid:
-        return OFFSET_OF(RawJSRegExp, external_two_byte_function_);
+        return OFFSET_OF(RawRegExp, external_two_byte_function_);
     }
 
     UNREACHABLE();
@@ -8183,16 +8166,16 @@
   }
 
   void* GetDataStartAddress() const;
-  static RawJSRegExp* FromDataStartAddress(void* data);
+  static RawRegExp* FromDataStartAddress(void* data);
   const char* Flags() const;
 
   virtual bool CanonicalizeEquals(const Instance& other) const;
 
   static intptr_t InstanceSize() {
-    return RoundedAllocationSize(sizeof(RawJSRegExp));
+    return RoundedAllocationSize(sizeof(RawRegExp));
   }
 
-  static RawJSRegExp* New(Heap::Space space = Heap::kNew);
+  static RawRegExp* New(Heap::Space space = Heap::kNew);
 
  private:
   void set_type(RegExType type) const {
@@ -8211,7 +8194,7 @@
     return FlagsBits::decode(raw_ptr()->type_flags_);
   }
 
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(JSRegExp, Instance);
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(RegExp, Instance);
   friend class Class;
 };
 
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 6c46997..bbecac7 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -138,7 +138,7 @@
 
 class Unmarker : public ObjectVisitor {
  public:
-  explicit Unmarker(Isolate* isolate) : ObjectVisitor(isolate) { }
+  Unmarker() { }
 
   void VisitObject(RawObject* obj) {
     if (obj->IsMarked()) {
@@ -147,7 +147,7 @@
   }
 
   static void UnmarkAll(Isolate* isolate) {
-    Unmarker unmarker(isolate);
+    Unmarker unmarker;
     isolate->heap()->IterateObjects(&unmarker);
   }
 
@@ -192,10 +192,8 @@
 
 class InstanceAccumulator : public ObjectVisitor {
  public:
-  explicit InstanceAccumulator(ObjectGraph::Stack* stack,
-                               intptr_t class_id,
-                               Isolate* isolate)
-    : ObjectVisitor(isolate), stack_(stack), class_id_(class_id) { }
+  InstanceAccumulator(ObjectGraph::Stack* stack, intptr_t class_id)
+      : stack_(stack), class_id_(class_id) { }
 
   void VisitObject(RawObject* obj) {
     if (obj->GetClassId() == class_id_) {
@@ -217,7 +215,7 @@
   NoSafepointScope no_safepoint_scope_;
   Stack stack(isolate());
 
-  InstanceAccumulator accumulator(&stack, class_id, isolate());
+  InstanceAccumulator accumulator(&stack, class_id);
   isolate()->heap()->IterateObjects(&accumulator);
 
   stack.TraverseGraph(visitor);
@@ -376,7 +374,7 @@
                            RawObject* target,
                            const Array& references,
                            Object* scratch)
-    : ObjectVisitor(isolate), ObjectPointerVisitor(isolate), source_(NULL),
+    : ObjectPointerVisitor(isolate), source_(NULL),
       target_(target), references_(references), scratch_(scratch), length_(0) {
     ASSERT(Thread::Current()->no_safepoint_scope_depth() != 0);
   }
@@ -511,9 +509,13 @@
 };
 
 
-intptr_t ObjectGraph::Serialize(WriteStream* stream) {
+intptr_t ObjectGraph::Serialize(WriteStream* stream, bool collect_garbage) {
+  if (collect_garbage) {
+    isolate()->heap()->CollectAllGarbage();
+  }
   // Current encoding assumes objects do not move, so promote everything to old.
   isolate()->heap()->new_space()->Evacuate();
+
   WriteGraphVisitor visitor(isolate(), stream);
   stream->WriteUnsigned(kObjectAlignment);
   stream->WriteUnsigned(0);
diff --git a/runtime/vm/object_graph.h b/runtime/vm/object_graph.h
index 5187d5e..70091d6 100644
--- a/runtime/vm/object_graph.h
+++ b/runtime/vm/object_graph.h
@@ -94,8 +94,10 @@
 
   // Write the isolate's object graph to 'stream'. Smis and nulls are omitted.
   // Returns the number of nodes in the stream, including the root.
+  // If collect_garabage is false, the graph will include weakly-reachable
+  // objects.
   // TODO(koda): Document format; support streaming/chunking.
-  intptr_t Serialize(WriteStream* stream);
+  intptr_t Serialize(WriteStream* stream, bool collect_garbage);
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph);
diff --git a/runtime/vm/object_id_ring_test.cc b/runtime/vm/object_id_ring_test.cc
index c85d44c..dd64aa5 100644
--- a/runtime/vm/object_id_ring_test.cc
+++ b/runtime/vm/object_id_ring_test.cc
@@ -37,7 +37,7 @@
   }
 
   static RawObject* MakeString(const char* s) {
-    return Symbols::New(s);
+    return Symbols::New(Thread::Current(), s);
   }
 
   static void ExpectString(RawObject* obj, const char* s) {
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index ba63134..90f9e1d 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -101,10 +101,19 @@
   jsobj.AddProperty("_implemented", is_implemented());
   jsobj.AddProperty("_patch", is_patch());
   jsobj.AddProperty("_traceAllocations", TraceAllocation(isolate));
+
   const Class& superClass = Class::Handle(SuperClass());
   if (!superClass.IsNull()) {
     jsobj.AddProperty("super", superClass);
   }
+  const AbstractType& superType = AbstractType::Handle(super_type());
+  if (!superType.IsNull()) {
+    jsobj.AddProperty("superType", superType);
+  }
+  const Type& mix = Type::Handle(mixin());
+  if (!mix.IsNull()) {
+    jsobj.AddProperty("mixin", mix);
+  }
   jsobj.AddProperty("library", Object::Handle(library()));
   const Script& script = Script::Handle(this->script());
   if (!script.IsNull()) {
@@ -1135,33 +1144,6 @@
 }
 
 
-void FunctionType::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  JSONObject jsobj(stream);
-  PrintSharedInstanceJSON(&jsobj, ref);
-  jsobj.AddProperty("kind", "FunctionType");
-  if (IsCanonical()) {
-    const Class& scope_cls = Class::Handle(scope_class());
-    intptr_t id = scope_cls.FindCanonicalTypeIndex(*this);
-    ASSERT(id >= 0);
-    intptr_t cid = scope_cls.id();
-    jsobj.AddFixedServiceId("classes/%" Pd "/types/%" Pd "", cid, id);
-    jsobj.AddProperty("scopeClass", scope_cls);
-  } else {
-    jsobj.AddServiceId(*this);
-  }
-  const String& user_name = String::Handle(UserVisibleName());
-  const String& vm_name = String::Handle(Name());
-  AddNameProperties(&jsobj, user_name, vm_name);
-  if (ref) {
-    return;
-  }
-  const TypeArguments& typeArgs = TypeArguments::Handle(arguments());
-  if (!typeArgs.IsNull()) {
-    jsobj.AddProperty("typeArguments", typeArgs);
-  }
-}
-
-
 void TypeRef::PrintJSONImpl(JSONStream* stream, bool ref) const {
   JSONObject jsobj(stream);
   PrintSharedInstanceJSON(&jsobj, ref);
@@ -1536,7 +1518,7 @@
 }
 
 
-void JSRegExp::PrintJSONImpl(JSONStream* stream, bool ref) const {
+void RegExp::PrintJSONImpl(JSONStream* stream, bool ref) const {
   JSONObject jsobj(stream);
   PrintSharedInstanceJSON(&jsobj, ref);
   jsobj.AddProperty("kind", "RegExp");
@@ -1560,6 +1542,12 @@
   jsobj.AddProperty("_externalOneByteFunction", func);
   func = function(kExternalTwoByteStringCid);
   jsobj.AddProperty("_externalTwoByteFunction", func);
+
+  TypedData& bc = TypedData::Handle();
+  bc = bytecode(true);
+  jsobj.AddProperty("_oneByteBytecode", bc);
+  bc = bytecode(false);
+  jsobj.AddProperty("_twoByteBytecode", bc);
 }
 
 
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index e793b9b..62718be 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -37,7 +37,7 @@
 
 VM_TEST_CASE(Class) {
   // Allocate the class first.
-  const String& class_name = String::Handle(Symbols::New("MyClass"));
+  const String& class_name = String::Handle(Symbols::New(thread, "MyClass"));
   const Script& script = Script::Handle();
   const Class& cls = Class::Handle(CreateDummyClass(class_name, script));
 
@@ -49,10 +49,10 @@
   const Array& interfaces = Array::Handle(Array::New(2));
   Class& interface = Class::Handle();
   String& interface_name = String::Handle();
-  interface_name = Symbols::New("Harley");
+  interface_name = Symbols::New(thread, "Harley");
   interface = CreateDummyClass(interface_name, script);
   interfaces.SetAt(0, Type::Handle(Type::NewNonParameterizedType(interface)));
-  interface_name = Symbols::New("Norton");
+  interface_name = Symbols::New(thread, "Norton");
   interface = CreateDummyClass(interface_name, script);
   interfaces.SetAt(1, Type::Handle(Type::NewNonParameterizedType(interface)));
   cls.set_interfaces(interfaces);
@@ -65,12 +65,12 @@
   const Array& functions = Array::Handle(Array::New(6));
   Function& function = Function::Handle();
   String& function_name = String::Handle();
-  function_name = Symbols::New("foo");
+  function_name = Symbols::New(thread, "foo");
   function = Function::New(
       function_name, RawFunction::kRegularFunction,
       false, false, false, false, false, cls, TokenPosition::kMinSource);
   functions.SetAt(0, function);
-  function_name = Symbols::New("bar");
+  function_name = Symbols::New(thread, "bar");
   function = Function::New(
       function_name, RawFunction::kRegularFunction,
       false, false, false, false, false, cls, TokenPosition::kMinSource);
@@ -83,24 +83,24 @@
                                     kAreOptionalPositional);
   functions.SetAt(1, function);
 
-  function_name = Symbols::New("baz");
+  function_name = Symbols::New(thread, "baz");
   function = Function::New(
       function_name, RawFunction::kRegularFunction,
       false, false, false, false, false, cls, TokenPosition::kMinSource);
   functions.SetAt(2, function);
 
-  function_name = Symbols::New("Foo");
+  function_name = Symbols::New(thread, "Foo");
   function = Function::New(
       function_name, RawFunction::kRegularFunction,
       true, false, false, false, false, cls, TokenPosition::kMinSource);
 
   functions.SetAt(3, function);
-  function_name = Symbols::New("Bar");
+  function_name = Symbols::New(thread, "Bar");
   function = Function::New(
       function_name, RawFunction::kRegularFunction,
       true, false, false, false, false, cls, TokenPosition::kMinSource);
   functions.SetAt(4, function);
-  function_name = Symbols::New("BaZ");
+  function_name = Symbols::New(thread, "BaZ");
   function = Function::New(
       function_name, RawFunction::kRegularFunction,
       true, false, false, false, false, cls, TokenPosition::kMinSource);
@@ -258,7 +258,7 @@
 
 VM_TEST_CASE(InstanceClass) {
   // Allocate the class first.
-  String& class_name = String::Handle(Symbols::New("EmptyClass"));
+  String& class_name = String::Handle(Symbols::New(thread, "EmptyClass"));
   Script& script = Script::Handle();
   const Class& empty_class =
       Class::Handle(CreateDummyClass(class_name, script));
@@ -274,7 +274,7 @@
   Instance& instance = Instance::Handle(Instance::New(empty_class));
   EXPECT_EQ(empty_class.raw(), instance.clazz());
 
-  class_name = Symbols::New("OneFieldClass");
+  class_name = Symbols::New(thread, "OneFieldClass");
   const Class& one_field_class =
       Class::Handle(CreateDummyClass(class_name, script));
 
@@ -285,7 +285,7 @@
   ClassFinalizer::FinalizeTypesInClass(one_field_class);
 
   const Array& one_fields = Array::Handle(Array::New(1));
-  const String& field_name = String::Handle(Symbols::New("the_field"));
+  const String& field_name = String::Handle(Symbols::New(thread, "the_field"));
   const Field& field = Field::Handle(
       Field::New(field_name, false, false, false, true, one_field_class,
                  Object::dynamic_type(), TokenPosition::kMinSource));
@@ -1826,84 +1826,85 @@
 
 
 VM_TEST_CASE(Symbol) {
-  const String& one = String::Handle(Symbols::New("Eins"));
+  const String& one = String::Handle(Symbols::New(thread, "Eins"));
   EXPECT(one.IsSymbol());
-  const String& two = String::Handle(Symbols::New("Zwei"));
-  const String& three = String::Handle(Symbols::New("Drei"));
-  const String& four = String::Handle(Symbols::New("Vier"));
-  const String& five = String::Handle(Symbols::New("Fuenf"));
-  const String& six = String::Handle(Symbols::New("Sechs"));
-  const String& seven = String::Handle(Symbols::New("Sieben"));
-  const String& eight = String::Handle(Symbols::New("Acht"));
-  const String& nine = String::Handle(Symbols::New("Neun"));
-  const String& ten = String::Handle(Symbols::New("Zehn"));
-  String& eins = String::Handle(Symbols::New("Eins"));
+  const String& two = String::Handle(Symbols::New(thread, "Zwei"));
+  const String& three = String::Handle(Symbols::New(thread, "Drei"));
+  const String& four = String::Handle(Symbols::New(thread, "Vier"));
+  const String& five = String::Handle(Symbols::New(thread, "Fuenf"));
+  const String& six = String::Handle(Symbols::New(thread, "Sechs"));
+  const String& seven = String::Handle(Symbols::New(thread, "Sieben"));
+  const String& eight = String::Handle(Symbols::New(thread, "Acht"));
+  const String& nine = String::Handle(Symbols::New(thread, "Neun"));
+  const String& ten = String::Handle(Symbols::New(thread, "Zehn"));
+  String& eins = String::Handle(Symbols::New(thread, "Eins"));
   EXPECT_EQ(one.raw(), eins.raw());
   EXPECT(one.raw() != two.raw());
   EXPECT(two.Equals(String::Handle(String::New("Zwei"))));
-  EXPECT_EQ(two.raw(), Symbols::New("Zwei"));
-  EXPECT_EQ(three.raw(), Symbols::New("Drei"));
-  EXPECT_EQ(four.raw(), Symbols::New("Vier"));
-  EXPECT_EQ(five.raw(), Symbols::New("Fuenf"));
-  EXPECT_EQ(six.raw(), Symbols::New("Sechs"));
-  EXPECT_EQ(seven.raw(), Symbols::New("Sieben"));
-  EXPECT_EQ(eight.raw(), Symbols::New("Acht"));
-  EXPECT_EQ(nine.raw(), Symbols::New("Neun"));
-  EXPECT_EQ(ten.raw(), Symbols::New("Zehn"));
+  EXPECT_EQ(two.raw(), Symbols::New(thread, "Zwei"));
+  EXPECT_EQ(three.raw(), Symbols::New(thread, "Drei"));
+  EXPECT_EQ(four.raw(), Symbols::New(thread, "Vier"));
+  EXPECT_EQ(five.raw(), Symbols::New(thread, "Fuenf"));
+  EXPECT_EQ(six.raw(), Symbols::New(thread, "Sechs"));
+  EXPECT_EQ(seven.raw(), Symbols::New(thread, "Sieben"));
+  EXPECT_EQ(eight.raw(), Symbols::New(thread, "Acht"));
+  EXPECT_EQ(nine.raw(), Symbols::New(thread, "Neun"));
+  EXPECT_EQ(ten.raw(), Symbols::New(thread, "Zehn"));
 
   // Make sure to cause symbol table overflow.
   for (int i = 0; i < 1024; i++) {
     char buf[256];
     OS::SNPrint(buf, sizeof(buf), "%d", i);
-    Symbols::New(buf);
+    Symbols::New(thread, buf);
   }
-  eins = Symbols::New("Eins");
+  eins = Symbols::New(thread, "Eins");
   EXPECT_EQ(one.raw(), eins.raw());
-  EXPECT_EQ(two.raw(), Symbols::New("Zwei"));
-  EXPECT_EQ(three.raw(), Symbols::New("Drei"));
-  EXPECT_EQ(four.raw(), Symbols::New("Vier"));
-  EXPECT_EQ(five.raw(), Symbols::New("Fuenf"));
-  EXPECT_EQ(six.raw(), Symbols::New("Sechs"));
-  EXPECT_EQ(seven.raw(), Symbols::New("Sieben"));
-  EXPECT_EQ(eight.raw(), Symbols::New("Acht"));
-  EXPECT_EQ(nine.raw(), Symbols::New("Neun"));
-  EXPECT_EQ(ten.raw(), Symbols::New("Zehn"));
+  EXPECT_EQ(two.raw(), Symbols::New(thread, "Zwei"));
+  EXPECT_EQ(three.raw(), Symbols::New(thread, "Drei"));
+  EXPECT_EQ(four.raw(), Symbols::New(thread, "Vier"));
+  EXPECT_EQ(five.raw(), Symbols::New(thread, "Fuenf"));
+  EXPECT_EQ(six.raw(), Symbols::New(thread, "Sechs"));
+  EXPECT_EQ(seven.raw(), Symbols::New(thread, "Sieben"));
+  EXPECT_EQ(eight.raw(), Symbols::New(thread, "Acht"));
+  EXPECT_EQ(nine.raw(), Symbols::New(thread, "Neun"));
+  EXPECT_EQ(ten.raw(), Symbols::New(thread, "Zehn"));
 
   // Symbols from Strings.
   eins = String::New("Eins");
   EXPECT(!eins.IsSymbol());
-  String& ein_symbol = String::Handle(Symbols::New(eins));
+  String& ein_symbol = String::Handle(Symbols::New(thread, eins));
   EXPECT_EQ(one.raw(), ein_symbol.raw());
   EXPECT(one.raw() != eins.raw());
 
   uint16_t char16[] = { 'E', 'l', 'f' };
-  String& elf1 = String::Handle(Symbols::FromUTF16(char16, 3));
+  String& elf1 = String::Handle(Symbols::FromUTF16(thread, char16, 3));
   int32_t char32[] = { 'E', 'l', 'f' };
-  String& elf2 = String::Handle(Symbols::FromUTF32(char32, 3));
+  String& elf2 = String::Handle(Symbols::FromUTF32(thread, char32, 3));
   EXPECT(elf1.IsSymbol());
   EXPECT(elf2.IsSymbol());
-  EXPECT_EQ(elf1.raw(), Symbols::New("Elf"));
-  EXPECT_EQ(elf2.raw(), Symbols::New("Elf"));
+  EXPECT_EQ(elf1.raw(), Symbols::New(thread, "Elf"));
+  EXPECT_EQ(elf2.raw(), Symbols::New(thread, "Elf"));
 }
 
 
 VM_TEST_CASE(SymbolUnicode) {
   uint16_t monkey_utf16[] = { 0xd83d, 0xdc35 };  // Unicode Monkey Face.
-  String& monkey = String::Handle(Symbols::FromUTF16(monkey_utf16, 2));
+  String& monkey = String::Handle(Symbols::FromUTF16(thread, monkey_utf16, 2));
   EXPECT(monkey.IsSymbol());
   const char monkey_utf8[] = {'\xf0', '\x9f', '\x90', '\xb5', 0};
-  EXPECT_EQ(monkey.raw(), Symbols::New(monkey_utf8));
+  EXPECT_EQ(monkey.raw(), Symbols::New(thread, monkey_utf8));
 
   int32_t kMonkeyFace = 0x1f435;
-  String& monkey2 = String::Handle(Symbols::FromCharCode(kMonkeyFace));
+  String& monkey2 = String::Handle(Symbols::FromCharCode(thread, kMonkeyFace));
   EXPECT_EQ(monkey.raw(), monkey2.raw());
 
   // Unicode cat face with tears of joy.
   int32_t kCatFaceWithTearsOfJoy = 0x1f639;
-  String& cat = String::Handle(Symbols::FromCharCode(kCatFaceWithTearsOfJoy));
+  String& cat = String::Handle(Symbols::FromCharCode(thread,
+                                                     kCatFaceWithTearsOfJoy));
 
   uint16_t cat_utf16[] = { 0xd83d, 0xde39 };
-  String& cat2 = String::Handle(Symbols::FromUTF16(cat_utf16, 2));
+  String& cat2 = String::Handle(Symbols::FromUTF16(thread, cat_utf16, 2));
   EXPECT(cat2.IsSymbol());
   EXPECT_EQ(cat2.raw(), cat.raw());
 }
@@ -2541,17 +2542,17 @@
       new LocalScope(parent_scope, local_scope_function_level, 0);
 
   const Type& dynamic_type = Type::ZoneHandle(Type::DynamicType());
-  const String& a = String::ZoneHandle(Symbols::New("a"));
+  const String& a = String::ZoneHandle(Symbols::New(thread, "a"));
   LocalVariable* var_a =
       new LocalVariable(TokenPosition::kNoSource, a, dynamic_type);
   parent_scope->AddVariable(var_a);
 
-  const String& b = String::ZoneHandle(Symbols::New("b"));
+  const String& b = String::ZoneHandle(Symbols::New(thread, "b"));
   LocalVariable* var_b =
       new LocalVariable(TokenPosition::kNoSource, b, dynamic_type);
   local_scope->AddVariable(var_b);
 
-  const String& c = String::ZoneHandle(Symbols::New("c"));
+  const String& c = String::ZoneHandle(Symbols::New(thread, "c"));
   LocalVariable* var_c =
       new LocalVariable(TokenPosition::kNoSource, c, dynamic_type);
   parent_scope->AddVariable(var_c);
@@ -2620,14 +2621,14 @@
 
 VM_TEST_CASE(Closure) {
   // Allocate the class first.
-  const String& class_name = String::Handle(Symbols::New("MyClass"));
+  const String& class_name = String::Handle(Symbols::New(thread, "MyClass"));
   const Script& script = Script::Handle();
   const Class& cls = Class::Handle(CreateDummyClass(class_name, script));
   const Array& functions = Array::Handle(Array::New(1));
 
   const Context& context = Context::Handle(Context::New(0));
   Function& parent = Function::Handle();
-  const String& parent_name = String::Handle(Symbols::New("foo_papa"));
+  const String& parent_name = String::Handle(Symbols::New(thread, "foo_papa"));
   parent = Function::New(parent_name, RawFunction::kRegularFunction,
                          false, false, false, false, false, cls,
                          TokenPosition::kMinSource);
@@ -2635,7 +2636,7 @@
   cls.SetFunctions(functions);
 
   Function& function = Function::Handle();
-  const String& function_name = String::Handle(Symbols::New("foo"));
+  const String& function_name = String::Handle(Symbols::New(thread, "foo"));
   function = Function::NewClosureFunction(
       function_name, parent, TokenPosition::kMinSource);
   const Closure& closure = Closure::Handle(Closure::New(function, context));
@@ -2690,15 +2691,16 @@
 
 
 static RawFunction* CreateFunction(const char* name) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
-  const String& lib_name = String::Handle(Symbols::New("ownerLibrary"));
+  Thread* thread = Thread::Current();
+  const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
+  const String& lib_name = String::Handle(Symbols::New(thread, "ownerLibrary"));
   const Script& script = Script::Handle();
   const Class& owner_class =
       Class::Handle(CreateDummyClass(class_name, script));
   const Library& owner_library =
       Library::Handle(CreateDummyLibrary(lib_name));
   owner_class.set_library(owner_library);
-  const String& function_name = String::ZoneHandle(Symbols::New(name));
+  const String& function_name = String::ZoneHandle(Symbols::New(thread, name));
   return Function::New(function_name, RawFunction::kRegularFunction,
                        true, false, false, false, false, owner_class,
                        TokenPosition::kMinSource);
@@ -2967,7 +2969,8 @@
 
 
 static RawClass* CreateTestClass(const char* name) {
-  const String& class_name = String::Handle(Symbols::New(name));
+  const String& class_name = String::Handle(Symbols::New(Thread::Current(),
+                                                         name));
   const Class& cls = Class::Handle(
       CreateDummyClass(class_name, Script::Handle()));
   return cls.raw();
@@ -2976,7 +2979,8 @@
 
 static RawField* CreateTestField(const char* name) {
   const Class& cls = Class::Handle(CreateTestClass("global:"));
-  const String& field_name = String::Handle(Symbols::New(name));
+  const String& field_name = String::Handle(Symbols::New(Thread::Current(),
+                                                         name));
   const Field& field =
       Field::Handle(Field::New(field_name, true, false, false, true, cls,
           Object::dynamic_type(), TokenPosition::kMinSource));
@@ -3008,7 +3012,8 @@
 
 
 static RawFunction* GetDummyTarget(const char* name) {
-  const String& function_name = String::Handle(Symbols::New(name));
+  const String& function_name = String::Handle(Symbols::New(Thread::Current(),
+                                                            name));
   const Class& cls = Class::Handle(
        CreateDummyClass(function_name, Script::Handle()));
   const bool is_static = false;
@@ -3032,7 +3037,7 @@
   Function& function = Function::Handle(GetDummyTarget("Bern"));
   const intptr_t id = 12;
   const intptr_t num_args_tested = 1;
-  const String& target_name = String::Handle(Symbols::New("Thun"));
+  const String& target_name = String::Handle(Symbols::New(thread, "Thun"));
   const Array& args_descriptor =
       Array::Handle(ArgumentsDescriptor::New(1, Object::null_array()));
   ICData& o1 = ICData::Handle();
@@ -3101,7 +3106,7 @@
 
 
 VM_TEST_CASE(SubtypeTestCache) {
-  String& class_name = String::Handle(Symbols::New("EmptyClass"));
+  String& class_name = String::Handle(Symbols::New(thread, "EmptyClass"));
   Script& script = Script::Handle();
   const Class& empty_class =
       Class::Handle(CreateDummyClass(class_name, script));
@@ -3781,7 +3786,7 @@
 
 static RawClass* GetClass(const Library& lib, const char* name) {
   const Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New(name))));
+      lib.LookupClass(String::Handle(Symbols::New(Thread::Current(), name))));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
   return cls.raw();
 }
@@ -3789,14 +3794,14 @@
 
 VM_TEST_CASE(FindClosureIndex) {
   // Allocate the class first.
-  const String& class_name = String::Handle(Symbols::New("MyClass"));
+  const String& class_name = String::Handle(Symbols::New(thread, "MyClass"));
   const Script& script = Script::Handle();
   const Class& cls = Class::Handle(CreateDummyClass(class_name, script));
   const Array& functions = Array::Handle(Array::New(1));
   const Isolate* iso = Isolate::Current();
 
   Function& parent = Function::Handle();
-  const String& parent_name = String::Handle(Symbols::New("foo_papa"));
+  const String& parent_name = String::Handle(Symbols::New(thread, "foo_papa"));
   parent = Function::New(parent_name, RawFunction::kRegularFunction,
                          false, false, false, false, false, cls,
                          TokenPosition::kMinSource);
@@ -3804,7 +3809,7 @@
   cls.SetFunctions(functions);
 
   Function& function = Function::Handle();
-  const String& function_name = String::Handle(Symbols::New("foo"));
+  const String& function_name = String::Handle(Symbols::New(thread, "foo"));
   function = Function::NewClosureFunction(function_name, parent,
                                           TokenPosition::kMinSource);
   // Add closure function to class.
@@ -3826,14 +3831,14 @@
 
 
 VM_TEST_CASE(FindInvocationDispatcherFunctionIndex) {
-  const String& class_name = String::Handle(Symbols::New("MyClass"));
+  const String& class_name = String::Handle(Symbols::New(thread, "MyClass"));
   const Script& script = Script::Handle();
   const Class& cls = Class::Handle(CreateDummyClass(class_name, script));
   ClassFinalizer::FinalizeTypesInClass(cls);
 
   const Array& functions = Array::Handle(Array::New(1));
   Function& parent = Function::Handle();
-  const String& parent_name = String::Handle(Symbols::New("foo_papa"));
+  const String& parent_name = String::Handle(Symbols::New(thread, "foo_papa"));
   parent = Function::New(parent_name, RawFunction::kRegularFunction,
                          false, false, false, false, false, cls,
                          TokenPosition::kMinSource);
@@ -3843,7 +3848,7 @@
 
   // Add invocation dispatcher.
   const String& invocation_dispatcher_name =
-      String::Handle(Symbols::New("myMethod"));
+      String::Handle(Symbols::New(thread, "myMethod"));
   const Array& args_desc = Array::Handle(ArgumentsDescriptor::New(1));
   Function& invocation_dispatcher = Function::Handle();
   invocation_dispatcher ^=
@@ -3944,17 +3949,18 @@
   res = lib.GetMetadata(func);
   PrintMetadata("A.aFunc", res);
 
-  func = lib.LookupLocalFunction(String::Handle(Symbols::New("main")));
+  func = lib.LookupLocalFunction(String::Handle(Symbols::New(thread, "main")));
   EXPECT(!func.IsNull());
   res = lib.GetMetadata(func);
   PrintMetadata("main", res);
 
-  func = lib.LookupLocalFunction(String::Handle(Symbols::New("get:tlGetter")));
+  func = lib.LookupLocalFunction(String::Handle(Symbols::New(thread,
+                                                             "get:tlGetter")));
   EXPECT(!func.IsNull());
   res = lib.GetMetadata(func);
   PrintMetadata("tlGetter", res);
 
-  field = lib.LookupLocalField(String::Handle(Symbols::New("gVar")));
+  field = lib.LookupLocalField(String::Handle(Symbols::New(thread, "gVar")));
   EXPECT(!field.IsNull());
   res = lib.GetMetadata(field);
   PrintMetadata("gVar", res);
@@ -4006,9 +4012,9 @@
   EXPECT(!lib.IsNull());
 
   const Class& class_a = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("A"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   const Class& class_b = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New("B"))));
+      lib.LookupClass(String::Handle(Symbols::New(thread, "B"))));
   const Function& a_test1 =
       Function::Handle(GetStaticFunction(class_a, "test1"));
   const Function& b_test1 =
@@ -4070,7 +4076,7 @@
   const Library& vmlib = Library::Handle(Library::LookupLibrary(name));
   EXPECT(!vmlib.IsNull());
   const Class& class_a = Class::Handle(
-      vmlib.LookupClass(String::Handle(Symbols::New("A"))));
+      vmlib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
   const Function& func_b =
       Function::Handle(GetFunction(class_a, "b"));
   EXPECT(func_b.CanBeInlined());
@@ -4121,7 +4127,7 @@
 class ObjectAccumulator : public ObjectVisitor {
  public:
   explicit ObjectAccumulator(GrowableArray<Object*>* objects)
-      : ObjectVisitor(Isolate::Current()), objects_(objects) {}
+      : objects_(objects) { }
   virtual ~ObjectAccumulator() { }
   virtual void VisitObject(RawObject* obj) {
     // Free-list elements cannot even be wrapped in handles.
@@ -4611,14 +4617,16 @@
 
 
 static void CheckConcatAll(const String* data[], intptr_t n) {
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   GrowableHandlePtrArray<const String> pieces(zone, n);
   const Array& array = Array::Handle(zone, Array::New(n));
   for (int i = 0; i < n; i++) {
     pieces.Add(*data[i]);
     array.SetAt(i, *data[i]);
   }
-  const String& res1 = String::Handle(zone, Symbols::FromConcatAll(pieces));
+  const String& res1 = String::Handle(zone, Symbols::FromConcatAll(thread,
+                                                                   pieces));
   const String& res2 = String::Handle(zone, String::ConcatAll(array));
   EXPECT(res1.Equals(res2));
 }
diff --git a/runtime/vm/os_android.cc b/runtime/vm/os_android.cc
index 5975735..03540bb 100644
--- a/runtime/vm/os_android.cc
+++ b/runtime/vm/os_android.cc
@@ -37,7 +37,7 @@
 class PerfCodeObserver : public CodeObserver {
  public:
   PerfCodeObserver() : out_file_(NULL) {
-    Dart_FileOpenCallback file_open = Isolate::file_open_callback();
+    Dart_FileOpenCallback file_open = Dart::file_open_callback();
     if (file_open == NULL) {
       return;
     }
@@ -48,7 +48,7 @@
   }
 
   ~PerfCodeObserver() {
-    Dart_FileCloseCallback file_close = Isolate::file_close_callback();
+    Dart_FileCloseCallback file_close = Dart::file_close_callback();
     if ((file_close == NULL) || (out_file_ == NULL)) {
       return;
     }
@@ -64,7 +64,7 @@
                       uword prologue_offset,
                       uword size,
                       bool optimized) {
-    Dart_FileWriteCallback file_write = Isolate::file_write_callback();
+    Dart_FileWriteCallback file_write = Dart::file_write_callback();
     if ((file_write == NULL) || (out_file_ == NULL)) {
       return;
     }
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc
index d97a3a7..edfb890 100644
--- a/runtime/vm/os_linux.cc
+++ b/runtime/vm/os_linux.cc
@@ -40,7 +40,7 @@
 class PerfCodeObserver : public CodeObserver {
  public:
   PerfCodeObserver() : out_file_(NULL) {
-    Dart_FileOpenCallback file_open = Isolate::file_open_callback();
+    Dart_FileOpenCallback file_open = Dart::file_open_callback();
     if (file_open == NULL) {
       return;
     }
@@ -51,7 +51,7 @@
   }
 
   ~PerfCodeObserver() {
-    Dart_FileCloseCallback file_close = Isolate::file_close_callback();
+    Dart_FileCloseCallback file_close = Dart::file_close_callback();
     if ((file_close == NULL) || (out_file_ == NULL)) {
       return;
     }
@@ -67,7 +67,7 @@
                       uword prologue_offset,
                       uword size,
                       bool optimized) {
-    Dart_FileWriteCallback file_write = Isolate::file_write_callback();
+    Dart_FileWriteCallback file_write = Dart::file_write_callback();
     if ((file_write == NULL) || (out_file_ == NULL)) {
       return;
     }
diff --git a/runtime/vm/os_thread.cc b/runtime/vm/os_thread.cc
index 0303161..947b7f6 100644
--- a/runtime/vm/os_thread.cc
+++ b/runtime/vm/os_thread.cc
@@ -8,6 +8,7 @@
 #include "vm/lockers.h"
 #include "vm/log.h"
 #include "vm/thread_interrupter.h"
+#include "vm/timeline.h"
 
 namespace dart {
 
@@ -62,6 +63,18 @@
 }
 
 
+
+void OSThread::SetName(const char* name) {
+  MutexLocker ml(thread_list_lock_);
+  // Clear the old thread name.
+  if (name_ != NULL) {
+    free(name_);
+    name_ = NULL;
+  }
+  set_name(name);
+}
+
+
 void OSThread::DisableThreadInterrupts() {
   ASSERT(OSThread::Current() == this);
   AtomicOperations::FetchAndIncrement(&thread_interrupt_disabled_);
diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h
index 2ca6a7c..e0b41ac 100644
--- a/runtime/vm/os_thread.h
+++ b/runtime/vm/os_thread.h
@@ -75,6 +75,8 @@
     return name_;
   }
 
+  void SetName(const char* name);
+
   void set_name(const char* name) {
     ASSERT(OSThread::Current() == this);
     ASSERT(name_ == NULL);
@@ -266,10 +268,6 @@
   Mutex();
   ~Mutex();
 
-  void Lock();
-  bool TryLock();  // Returns false if lock is busy and locking failed.
-  void Unlock();
-
 #if defined(DEBUG)
   bool IsOwnedByCurrentThread() const {
     return owner_ == OSThread::GetCurrentThreadId();
@@ -282,11 +280,22 @@
 #endif
 
  private:
+  void Lock();
+  bool TryLock();  // Returns false if lock is busy and locking failed.
+  void Unlock();
+
   MutexData data_;
 #if defined(DEBUG)
   ThreadId owner_;
 #endif  // defined(DEBUG)
 
+  friend class MutexLocker;
+  friend class SafepointMutexLocker;
+  friend class OSThreadIterator;
+  friend class TimelineEventBlockIterator;
+  friend class TimelineEventRecorder;
+  friend class PageSpace;
+  friend void Dart_TestMutex();
   DISALLOW_COPY_AND_ASSIGN(Mutex);
 };
 
@@ -303,18 +312,6 @@
   Monitor();
   ~Monitor();
 
-  bool TryEnter();  // Returns false if lock is busy and locking failed.
-  void Enter();
-  void Exit();
-
-  // Wait for notification or timeout.
-  WaitResult Wait(int64_t millis);
-  WaitResult WaitMicros(int64_t micros);
-
-  // Notify waiting threads.
-  void Notify();
-  void NotifyAll();
-
 #if defined(DEBUG)
   bool IsOwnedByCurrentThread() const {
     return owner_ == OSThread::GetCurrentThreadId();
@@ -327,11 +324,26 @@
 #endif
 
  private:
+  bool TryEnter();  // Returns false if lock is busy and locking failed.
+  void Enter();
+  void Exit();
+
+  // Wait for notification or timeout.
+  WaitResult Wait(int64_t millis);
+  WaitResult WaitMicros(int64_t micros);
+
+  // Notify waiting threads.
+  void Notify();
+  void NotifyAll();
+
   MonitorData data_;  // OS-specific data.
 #if defined(DEBUG)
   ThreadId owner_;
 #endif  // defined(DEBUG)
 
+  friend class MonitorLocker;
+  friend class SafepointMonitorLocker;
+  friend void Dart_TestMonitor();
   DISALLOW_COPY_AND_ASSIGN(Monitor);
 };
 
diff --git a/runtime/vm/os_thread_win.cc b/runtime/vm/os_thread_win.cc
index 3802a16..9d282bc 100644
--- a/runtime/vm/os_thread_win.cc
+++ b/runtime/vm/os_thread_win.cc
@@ -6,6 +6,7 @@
 #if defined(TARGET_OS_WINDOWS)
 
 #include "vm/growable_array.h"
+#include "vm/lockers.h"
 #include "vm/os_thread.h"
 
 #include <process.h>  // NOLINT
@@ -565,7 +566,7 @@
     // We only care about thread locals with destructors.
     return;
   }
-  mutex_->Lock();
+  MutexLocker ml(mutex_, false);
 #if defined(DEBUG)
   // Verify that we aren't added twice.
   for (intptr_t i = 0; i < thread_locals_->length(); i++) {
@@ -575,12 +576,12 @@
 #endif
   // Add to list.
   thread_locals_->Add(ThreadLocalEntry(key, destructor));
-  mutex_->Unlock();
 }
 
 
 void ThreadLocalData::RemoveThreadLocal(ThreadLocalKey key) {
-  ASSERT(thread_locals_ != NULL);  mutex_->Lock();
+  ASSERT(thread_locals_ != NULL);
+  MutexLocker ml(mutex_, false);
   intptr_t i = 0;
   for (; i < thread_locals_->length(); i++) {
     const ThreadLocalEntry& entry = thread_locals_->At(i);
@@ -590,11 +591,9 @@
   }
   if (i == thread_locals_->length()) {
     // Not found.
-    mutex_->Unlock();
     return;
   }
   thread_locals_->RemoveAt(i);
-  mutex_->Unlock();
 }
 
 
@@ -603,7 +602,7 @@
 void ThreadLocalData::RunDestructors() {
   ASSERT(thread_locals_ != NULL);
   ASSERT(mutex_ != NULL);
-  mutex_->Lock();
+  MutexLocker ml(mutex_, false);
   for (intptr_t i = 0; i < thread_locals_->length(); i++) {
     const ThreadLocalEntry& entry = thread_locals_->At(i);
     // We access the exiting thread's TLS variable here.
@@ -611,7 +610,6 @@
     // We invoke the constructor here.
     entry.destructor()(p);
   }
-  mutex_->Unlock();
 }
 
 
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 177b091..05e01fb 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -611,6 +611,15 @@
 }
 
 
+void PageSpace::VisitObjectsNoEmbedderPages(ObjectVisitor* visitor) const {
+  for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
+    if (!it.page()->embedder_allocated()) {
+      it.page()->VisitObjects(visitor);
+    }
+  }
+}
+
+
 void PageSpace::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
   for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
     it.page()->VisitObjectPointers(visitor);
@@ -652,15 +661,13 @@
 }
 
 
-void PageSpace::WriteProtect(bool read_only, bool include_code_pages) {
+void PageSpace::WriteProtect(bool read_only) {
   if (read_only) {
     // Avoid MakeIterable trying to write to the heap.
     AbandonBumpAllocation();
   }
   for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
-    HeapPage::PageType page_type = it.page()->type();
-    if ((page_type != HeapPage::kReadOnlyData) &&
-        ((page_type != HeapPage::kExecutable) || include_code_pages)) {
+    if (!it.page()->embedder_allocated()) {
       it.page()->WriteProtect(read_only);
     }
   }
@@ -698,8 +705,7 @@
 
 class HeapMapAsJSONVisitor : public ObjectVisitor {
  public:
-  explicit HeapMapAsJSONVisitor(JSONArray* array)
-      : ObjectVisitor(NULL), array_(array) {}
+  explicit HeapMapAsJSONVisitor(JSONArray* array) : array_(array) { }
   virtual void VisitObject(RawObject* obj) {
     array_->AddValue(obj->Size() / kObjectAlignment);
     array_->AddValue(obj->GetClassId());
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
index 12b193f..ff1ca15 100644
--- a/runtime/vm/pages.h
+++ b/runtime/vm/pages.h
@@ -52,6 +52,8 @@
     return type_;
   }
 
+  bool embedder_allocated() const { return memory_->embedder_allocated(); }
+
   void VisitObjects(ObjectVisitor* visitor) const;
   void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
 
@@ -141,8 +143,11 @@
     last_code_collection_in_us_ = t;
   }
 
-  void Enable(SpaceUsage current) {
+  void set_last_usage(SpaceUsage current) {
     last_usage_ = current;
+  }
+
+  void Enable() {
     is_enabled_ = true;
   }
   void Disable() {
@@ -251,6 +256,7 @@
   }
 
   void VisitObjects(ObjectVisitor* visitor) const;
+  void VisitObjectsNoEmbedderPages(ObjectVisitor* visitor) const;
   void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
 
   RawObject* FindObject(FindObjectVisitor* visitor,
@@ -265,9 +271,14 @@
 
   void StartEndAddress(uword* start, uword* end) const;
 
+  void InitGrowthControl() {
+    page_space_controller_.set_last_usage(usage_);
+    page_space_controller_.Enable();
+  }
+
   void SetGrowthControlState(bool state) {
     if (state) {
-      page_space_controller_.Enable(usage_);
+      page_space_controller_.Enable();
     } else {
       page_space_controller_.Disable();
     }
@@ -284,7 +295,7 @@
 
   // Note: Code pages are made executable/non-executable when 'read_only' is
   // true/false, respectively.
-  void WriteProtect(bool read_only, bool include_code_pages);
+  void WriteProtect(bool read_only);
   void WriteProtectCode(bool read_only);
 
   void AddGCTime(int64_t micros) {
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 78ca6a5..87146f6 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -35,6 +35,7 @@
 #include "vm/stack_frame.h"
 #include "vm/symbols.h"
 #include "vm/tags.h"
+#include "vm/timeline.h"
 #include "vm/timer.h"
 #include "vm/zone.h"
 
@@ -43,7 +44,9 @@
 DEFINE_FLAG(bool, enable_debug_break, false, "Allow use of break \"message\".");
 DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
 DEFINE_FLAG(bool, warn_mixin_typedef, true, "Warning on legacy mixin typedef.");
-DEFINE_FLAG(bool, conditional_directives, false,
+// TODO(floitsch): remove the conditional-directive flag, once we publicly
+// committed to the current version.
+DEFINE_FLAG(bool, conditional_directives, true,
     "Enable conditional directives");
 DEFINE_FLAG(bool, warn_super, false,
     "Warning if super initializer not last in initializer list.");
@@ -185,7 +188,7 @@
   if (!has_finally_return_temp_var()) {
     LocalVariable* temp = new(Z) LocalVariable(
         function_.token_pos(),
-        String::ZoneHandle(Z, Symbols::New(":finally_ret_val")),
+        Symbols::FinallyRetVal(),
         Object::dynamic_type());
     ASSERT(temp != NULL);
     temp->set_is_final();
@@ -490,6 +493,20 @@
 }
 
 
+// Set state and increments generational count so that thge background compiler
+// can detect if loading/top-level-parsing occured during compilation.
+class TopLevelParsingScope : public StackResource {
+ public:
+  explicit TopLevelParsingScope(Thread* thread) : StackResource(thread) {
+    isolate()->IncrTopLevelParsingCount();
+  }
+  ~TopLevelParsingScope() {
+    isolate()->DecrTopLevelParsingCount();
+    isolate()->IncrLoadingInvalidationGen();
+  }
+};
+
+
 void Parser::ParseCompilationUnit(const Library& library,
                                   const Script& script) {
   Thread* thread = Thread::Current();
@@ -498,7 +515,7 @@
   VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId);
 #ifndef PRODUCT
   TimelineDurationScope tds(thread,
-                            thread->isolate()->GetCompilerStream(),
+                            Timeline::GetCompilerStream(),
                             "CompileTopLevel");
   if (tds.enabled()) {
     tds.SetNumArguments(1);
@@ -506,6 +523,7 @@
   }
 #endif
 
+  TopLevelParsingScope scope(thread);
   Parser parser(script, library, TokenPosition::kMinSource);
   parser.ParseTopLevel();
 }
@@ -856,7 +874,7 @@
   const int64_t num_tokes_before = STAT_VALUE(thread, num_tokens_consumed);
 #ifndef PRODUCT
   TimelineDurationScope tds(thread,
-                            thread->isolate()->GetCompilerStream(),
+                            Timeline::GetCompilerStream(),
                             "ParseClass");
   if (tds.enabled()) {
     tds.SetNumArguments(1);
@@ -973,7 +991,7 @@
                       FLAG_profile_vm);
 #ifndef PRODUCT
   TimelineDurationScope tds(thread,
-                            thread->isolate()->GetCompilerStream(),
+                            Timeline::GetCompilerStream(),
                             "ParseFunction");
 #endif  // !PRODUCT
   ASSERT(thread->long_jump_base()->IsSafeToJump());
@@ -1217,7 +1235,7 @@
 
   const String& field_name = String::Handle(zone, field.name());
   String& init_name = String::Handle(zone,
-      Symbols::FromConcat(Symbols::InitPrefix(), field_name));
+      Symbols::FromConcat(thread, Symbols::InitPrefix(), field_name));
 
   const Script& script = Script::Handle(zone, field.Script());
   Object& initializer_owner = Object::Handle(field.Owner());
@@ -1558,7 +1576,7 @@
     ParamDesc p;
     char name[64];
     OS::SNPrint(name, 64, ":p%" Pd, i);
-    p.name = &String::ZoneHandle(Z, Symbols::New(name));
+    p.name = &String::ZoneHandle(Z, Symbols::New(T, name));
     p.type = &Object::dynamic_type();
     params.parameters->Add(p);
     params.num_fixed_parameters++;
@@ -1672,7 +1690,7 @@
     function_object = receiver;
   } else {
     const String& getter_name = String::ZoneHandle(Z,
-        Symbols::New(String::Handle(Z, Field::GetterSymbol(name))));
+        Field::GetterSymbol(name));
     function_object = new(Z) InstanceCallNode(
         token_pos, receiver, getter_name, no_args);
   }
@@ -1926,8 +1944,8 @@
                                          TokenPosition::kNoSource));
       signature_function.set_result_type(result_type);
       AddFormalParamsToFunction(&func_params, signature_function);
-      FunctionType& signature_type =
-          FunctionType::ZoneHandle(Z, signature_function.SignatureType());
+      Type& signature_type =
+          Type::ZoneHandle(Z, signature_function.SignatureType());
       if (!is_top_level_) {
         signature_type ^= ClassFinalizer::FinalizeType(
             current_class(), signature_type, ClassFinalizer::kCanonicalize);
@@ -2075,7 +2093,7 @@
                 String::Handle(Z, current_class().Name()).ToCString());
   }
   Function& super_func = Function::Handle(Z,
-      Resolver::ResolveDynamicAnyArgs(super_class, name));
+      Resolver::ResolveDynamicAnyArgs(Z, super_class, name));
   if (!super_func.IsNull() &&
       !super_func.AreValidArguments(arguments->length(),
                                     arguments->names(),
@@ -2083,13 +2101,13 @@
     super_func = Function::null();
   } else if (super_func.IsNull() && resolve_getter) {
     const String& getter_name = String::ZoneHandle(Z, Field::GetterName(name));
-    super_func = Resolver::ResolveDynamicAnyArgs(super_class, getter_name);
+    super_func = Resolver::ResolveDynamicAnyArgs(Z, super_class, getter_name);
     ASSERT(super_func.IsNull() ||
            (super_func.kind() != RawFunction::kImplicitStaticFinalGetter));
   }
   if (super_func.IsNull()) {
-    super_func =
-        Resolver::ResolveDynamicAnyArgs(super_class, Symbols::NoSuchMethod());
+    super_func = Resolver::ResolveDynamicAnyArgs(Z,
+        super_class, Symbols::NoSuchMethod());
     ASSERT(!super_func.IsNull());
     *is_no_such_method = true;
   } else {
@@ -2223,8 +2241,7 @@
   if ((op == Token::kNEGATE) ||
       (op == Token::kBIT_NOT)) {
     // Resolve the operator function in the superclass.
-    const String& operator_function_name =
-        String::ZoneHandle(Z, Symbols::New(Token::Str(op)));
+    const String& operator_function_name = Symbols::Token(op);
     ArgumentListNode* op_arguments = new ArgumentListNode(super_pos);
     AstNode* receiver = LoadReceiver(super_pos);
     op_arguments->Add(receiver);
@@ -2284,8 +2301,7 @@
     op_arguments->Add(other_operand);
 
     // Resolve the operator function in the superclass.
-    const String& operator_function_name =
-        String::ZoneHandle(Z, Symbols::New(Token::Str(op)));
+    const String& operator_function_name = Symbols::Token(op);
     const bool kResolveGetter = false;
     bool is_no_such_method = false;
     const Function& super_operator = Function::ZoneHandle(Z,
@@ -2317,7 +2333,7 @@
     // parameterized class, make sure that the receiver is captured as
     // instantiator.
     if (current_block_->scope->function_level() > 0) {
-      const FunctionType& signature_type = FunctionType::Handle(Z,
+      const Type& signature_type = Type::Handle(Z,
           implicit_closure_function.SignatureType());
       const Class& scope_class = Class::Handle(Z, signature_type.type_class());
       if (scope_class.IsGeneric()) {
@@ -2343,14 +2359,15 @@
       String::ZoneHandle(Z, Field::LookupGetterSymbol(field_name));
   Function& super_getter = Function::ZoneHandle(Z);
   if (!getter_name.IsNull()) {
-    super_getter = Resolver::ResolveDynamicAnyArgs(super_class, getter_name);
+    super_getter = Resolver::ResolveDynamicAnyArgs(Z, super_class, getter_name);
   }
   if (super_getter.IsNull()) {
     const String& setter_name =
         String::ZoneHandle(Z, Field::LookupSetterSymbol(field_name));
     Function& super_setter = Function::ZoneHandle(Z);
     if (!setter_name.IsNull()) {
-      super_setter = Resolver::ResolveDynamicAnyArgs(super_class, setter_name);
+      super_setter = Resolver::ResolveDynamicAnyArgs(Z,
+          super_class, setter_name);
     }
     if (super_setter.IsNull()) {
       // Check if this is an access to an implicit closure using 'super'.
@@ -2358,7 +2375,7 @@
       // accessing it as a getter, at runtime we will handle this by
       // creating an implicit closure of the function and returning it.
       const Function& super_function = Function::ZoneHandle(Z,
-          Resolver::ResolveDynamicAnyArgs(super_class, field_name));
+          Resolver::ResolveDynamicAnyArgs(Z, super_class, field_name));
       if (!super_function.IsNull()) {
         // In case CreateAssignmentNode is called later on this
         // CreateImplicitClosureNode, it will be replaced by a StaticSetterNode.
@@ -2390,7 +2407,7 @@
     return NULL;
   }
   String& super_ctor_name = String::Handle(Z, super_class.Name());
-  super_ctor_name = Symbols::FromConcat(super_ctor_name, Symbols::Dot());
+  super_ctor_name = Symbols::FromDot(T, super_ctor_name);
 
   ArgumentListNode* arguments = new ArgumentListNode(supercall_pos);
   // Implicit 'this' parameter is the first argument.
@@ -2410,8 +2427,8 @@
       // Generating a forwarding call to a named constructor 'C.n'.
       // Add the constructor name 'n' to the super constructor.
       const intptr_t kLen =  class_name.Length() + 1;
-      ctor_name = Symbols::New(ctor_name, kLen, ctor_name.Length() - kLen);
-      super_ctor_name = Symbols::FromConcat(super_ctor_name, ctor_name);
+      ctor_name = Symbols::New(T, ctor_name, kLen, ctor_name.Length() - kLen);
+      super_ctor_name = Symbols::FromConcat(T, super_ctor_name, ctor_name);
     }
   }
 
@@ -2449,10 +2466,10 @@
   const Class& super_class = Class::Handle(Z, cls.SuperClass());
   ASSERT(!super_class.IsNull());
   String& ctor_name = String::Handle(Z, super_class.Name());
-  ctor_name = Symbols::FromConcat(ctor_name, Symbols::Dot());
+  ctor_name =  Symbols::FromConcat(T, ctor_name, Symbols::Dot());
   if (CurrentToken() == Token::kPERIOD) {
     ConsumeToken();
-    ctor_name = Symbols::FromConcat(
+    ctor_name = Symbols::FromConcat(T,
         ctor_name, *ExpectIdentifier("constructor name expected"));
   }
   CheckToken(Token::kLPAREN, "parameter list expected");
@@ -2846,7 +2863,7 @@
     ConsumeToken();
     pieces.Add(*ExpectIdentifier("constructor name expected"));
   }
-  ctor_name = Symbols::FromConcatAll(pieces);
+  ctor_name = Symbols::FromConcatAll(T, pieces);
   CheckToken(Token::kLPAREN, "parameter list expected");
 
   ArgumentListNode* arguments = new ArgumentListNode(call_pos);
@@ -3606,7 +3623,7 @@
       // Patch up name for unary operator - so it does not clash with the
       // name for binary operator -.
       method->operator_token = Token::kNEGATE;
-      *method->name = Symbols::New(Token::Str(Token::kNEGATE));
+      *method->name = Symbols::Token(Token::kNEGATE).raw();
     }
     CheckOperatorArity(*method);
   }
@@ -3623,7 +3640,7 @@
       ASSERT(method->IsSetter());
       expected_num_parameters = (method->has_static) ? 1 : 2;
       method->dict_name = &String::ZoneHandle(Z,
-          Symbols::FromConcat(*method->name, Symbols::Equals()));
+          Symbols::FromConcat(T, *method->name, Symbols::Equals()));
       method->name = &String::ZoneHandle(Z, Field::SetterSymbol(*method->name));
     }
     if ((method->params.num_fixed_parameters != expected_num_parameters) ||
@@ -3708,7 +3725,7 @@
         pieces.Add(*ExpectIdentifier("constructor name expected"));
       }
       String& redir_name =
-          String::ZoneHandle(Z, Symbols::FromConcatAll(pieces));
+          String::ZoneHandle(Z, Symbols::FromConcatAll(T, pieces));
 
       method->redirect_name = &redir_name;
       CheckToken(Token::kLPAREN);
@@ -4239,7 +4256,7 @@
       member.dict_name = ExpectIdentifier("identifier expected");
       to_concat.Add(*member.dict_name);
     }
-    *member.name = Symbols::FromConcatAll(to_concat);
+    *member.name = Symbols::FromConcatAll(T, to_concat);
     CheckToken(Token::kLPAREN);
   } else if ((CurrentToken() == Token::kGET) && !member.has_var &&
              (LookaheadToken(1) != Token::kLPAREN) &&
@@ -4282,8 +4299,8 @@
     member.has_operator = true;
     member.kind = RawFunction::kRegularFunction;
     member.name_pos = this->TokenPos();
-    member.name =
-        &String::ZoneHandle(Z, Symbols::New(Token::Str(member.operator_token)));
+    member.name = &String::ZoneHandle(Z,
+        Symbols::Token(member.operator_token).raw());
     ConsumeToken();
   } else if (IsIdentifier()) {
     member.name = CurrentLiteral();
@@ -4549,8 +4566,11 @@
     cls.set_is_patch();
     // Apply the changes to the patched class looked up above.
     ASSERT(obj.raw() == library_.LookupLocalObject(class_name));
-    // The patched class must not be finalized yet.
-    ASSERT(!Class::Cast(obj).is_finalized());
+    const Class& orig_class = Class::Cast(obj);
+    if (orig_class.is_finalized()) {
+      orig_class.SetRefinalizeAfterPatch();
+      pending_classes.Add(orig_class, Heap::kOld);
+    }
     library_.AddPatchClass(cls);
   }
   pending_classes.Add(cls, Heap::kOld);
@@ -4618,6 +4638,14 @@
     const Class& orig_class = Class::Cast(obj);
     ASSERT(!orig_class.is_finalized());
     Error& error = Error::Handle(Z);
+    // Check if this is a case of patching a class after it has already
+    // been finalized.
+    if (orig_class.is_refinalize_after_patch()) {
+      if (!cls.ValidatePostFinalizePatch(orig_class, &error)) {
+        Report::LongJumpF(error, script_, class_pos,
+                          "patch validation failed, not applying patch.\n");
+      }
+    }
     if (!orig_class.ApplyPatch(cls, &error)) {
       Report::LongJumpF(error, script_, class_pos, "applying patch failed");
     }
@@ -4732,7 +4760,7 @@
     if (enum_ident->CharAt(0) == '_') {
       *enum_ident = String::ScrubName(*enum_ident);
     }
-    enum_value_name = Symbols::FromConcat(name_prefix, *enum_ident);
+    enum_value_name = Symbols::FromConcat(T, name_prefix, *enum_ident);
     enum_names.Add(enum_value_name, Heap::kOld);
 
     ConsumeToken();  // Enum value name.
@@ -4767,7 +4795,7 @@
   // Create a static field that contains the list of enumeration names.
   // Clone the _enum_names field from the helper class.
   Field& names_field = Field::Handle(Z,
-      helper_class.LookupStaticField(Symbols::_EnumNames()));
+      helper_class.LookupStaticFieldAllowPrivate(Symbols::_EnumNames()));
   ASSERT(!names_field.IsNull());
   names_field = names_field.Clone(cls);
   enum_members.AddField(names_field);
@@ -4799,7 +4827,7 @@
 void Parser::AddImplicitConstructor(const Class& cls) {
   // The implicit constructor is unnamed, has no explicit parameter.
   String& ctor_name = String::ZoneHandle(Z, cls.Name());
-  ctor_name = Symbols::FromConcat(ctor_name, Symbols::Dot());
+  ctor_name = Symbols::FromDot(T, ctor_name);
   // To indicate that this is an implicit constructor, we set the
   // token position and end token position of the function
   // to the token position of the class.
@@ -5751,7 +5779,7 @@
       pieces.Add(Symbols::Dot());
       pieces.Add(*ExpectIdentifier("malformed library name"));
     }
-    lib_name = Symbols::FromConcatAll(pieces);
+    lib_name = Symbols::FromConcatAll(T, pieces);
   }
   library_.SetName(lib_name);
   ExpectSemicolon();
@@ -6118,7 +6146,7 @@
 
 
 void Parser::CheckStack() {
-  volatile uword c_stack_pos = Isolate::GetCurrentStackPointer();
+  volatile uword c_stack_pos = Thread::GetCurrentStackPointer();
   volatile uword c_stack_base = OSThread::Current()->stack_base();
   volatile uword c_stack_limit =
       c_stack_base - OSThread::GetSpecifiedStackSize();
@@ -6561,8 +6589,7 @@
     // Create the closure containing the body of this generator function.
     String& generator_name = String::Handle(Z, innermost_function().name());
     body_closure_name =
-        Symbols::NewFormatted("<%s_sync_body>", generator_name.ToCString());
-    body_closure_name = Symbols::New(body_closure_name);
+        Symbols::NewFormatted(T, "<%s_sync_body>", generator_name.ToCString());
     body = Function::NewClosureFunction(body_closure_name,
                                         innermost_function(),
                                         func_pos);
@@ -6579,8 +6606,7 @@
     AddFormalParamsToFunction(&closure_params, body);
 
     // Finalize function type.
-    FunctionType& signature_type =
-        FunctionType::Handle(Z, body.SignatureType());
+    Type& signature_type = Type::Handle(Z, body.SignatureType());
     signature_type ^= ClassFinalizer::FinalizeType(
         current_class(), signature_type, ClassFinalizer::kCanonicalize);
     body.SetSignatureType(signature_type);
@@ -6694,8 +6720,8 @@
     // Create the closure containing the body of this async function.
     const String& async_func_name =
         String::Handle(Z, innermost_function().name());
-    String& closure_name = String::Handle(Z,
-        Symbols::NewFormatted("<%s_async_body>", async_func_name.ToCString()));
+    String& closure_name = String::Handle(Z, Symbols::NewFormatted(T,
+        "<%s_async_body>", async_func_name.ToCString()));
     closure = Function::NewClosureFunction(
         closure_name,
         innermost_function(),
@@ -6712,8 +6738,7 @@
     AddFormalParamsToFunction(&closure_params, closure);
 
     // Finalize function type.
-    FunctionType& signature_type =
-        FunctionType::Handle(Z, closure.SignatureType());
+    Type& signature_type = Type::Handle(Z, closure.SignatureType());
     signature_type ^= ClassFinalizer::FinalizeType(
         current_class(), signature_type, ClassFinalizer::kCanonicalize);
     closure.SetSignatureType(signature_type);
@@ -6828,13 +6853,11 @@
     // Create the closure containing the body of this async generator function.
     const String& async_generator_name =
         String::Handle(Z, innermost_function().name());
-    String& closure_name = String::Handle(Z,
-        Symbols::NewFormatted("<%s_async_gen_body>",
-                              async_generator_name.ToCString()));
-    closure = Function::NewClosureFunction(
-        String::Handle(Z, Symbols::New(closure_name)),
-        innermost_function(),
-        async_func_pos);
+    const String& closure_name = String::Handle(Z, Symbols::NewFormatted(T,
+          "<%s_async_gen_body>", async_generator_name.ToCString()));
+    closure = Function::NewClosureFunction(closure_name,
+                                           innermost_function(),
+                                           async_func_pos);
     closure.set_is_generated_body(true);
     closure.set_result_type(Object::dynamic_type());
     is_new_closure = true;
@@ -6848,8 +6871,7 @@
     AddFormalParamsToFunction(&closure_params, closure);
 
     // Finalize function type.
-    FunctionType& signature_type =
-        FunctionType::Handle(Z, closure.SignatureType());
+    Type& signature_type = Type::Handle(Z, closure.SignatureType());
     signature_type ^= ClassFinalizer::FinalizeType(
         current_class(), signature_type, ClassFinalizer::kCanonicalize);
     closure.SetSignatureType(signature_type);
@@ -7597,7 +7619,7 @@
   // passed as a function argument, or returned as a function result.
 
   LocalVariable* function_variable = NULL;
-  FunctionType& function_type = FunctionType::ZoneHandle(Z);
+  Type& function_type = Type::ZoneHandle(Z);
   if (variable_name != NULL) {
     // Since the function type depends on the signature of the closure function,
     // it cannot be determined before the formal parameter list of the closure
@@ -7606,10 +7628,10 @@
     // We temporarily use the Closure class as scope class.
     const Class& unknown_scope_class = Class::Handle(Z,
         I->object_store()->closure_class());
-    function_type = FunctionType::New(unknown_scope_class,
-                                      TypeArguments::Handle(Z),
-                                      function,
-                                      function_pos);
+    function_type = Type::New(unknown_scope_class,
+                              TypeArguments::Handle(Z),
+                              function_pos);
+    function_type.set_signature(function);
     function_type.SetIsFinalized();  // No finalization needed.
 
     // Add the function variable to the scope before parsing the function in
@@ -7637,8 +7659,7 @@
   INC_STAT(thread(), num_functions_parsed, 1);
 
   // Now that the local function has formal parameters, lookup the signature
-  FunctionType& signature_type =
-      FunctionType::ZoneHandle(Z, function.SignatureType());
+  Type& signature_type = Type::ZoneHandle(Z, function.SignatureType());
   signature_type ^= ClassFinalizer::FinalizeType(
       current_class(), signature_type, ClassFinalizer::kCanonicalize);
   function.SetSignatureType(signature_type);
@@ -7655,15 +7676,15 @@
     CaptureInstantiator();
   }
 
-  // A signature type itself cannot be malformed or malbounded, only its
+  // A local signature type itself cannot be malformed or malbounded, only its
   // signature function's result type or parameter types may be.
   ASSERT(!signature_type.IsMalformed());
   ASSERT(!signature_type.IsMalbounded());
 
   if (variable_name != NULL) {
     // Patch the function type of the variable now that the signature is known.
-    function_type.set_scope_class(
-        Class::Handle(Z, signature_type.scope_class()));
+    function_type.set_type_class(
+        Class::Handle(Z, signature_type.type_class()));
     function_type.set_arguments(
         TypeArguments::Handle(Z, signature_type.arguments()));
     ASSERT(function_type.signature() == function.raw());
@@ -8138,10 +8159,10 @@
 
 // Return true if the type class of the given value implements the
 // == operator.
-static bool ImplementsEqualOperator(const Instance& value) {
+static bool ImplementsEqualOperator(Zone* zone, const Instance& value) {
   Class& cls = Class::Handle(value.clazz());
-  const Function& equal_op = Function::Handle(
-      Resolver::ResolveDynamicAnyArgs(cls, Symbols::EqualOperator()));
+  const Function& equal_op = Function::Handle(zone,
+      Resolver::ResolveDynamicAnyArgs(zone, cls, Symbols::EqualOperator()));
   ASSERT(!equal_op.IsNull());
   cls = equal_op.Owner();
   return !cls.IsObjectClass();
@@ -8188,7 +8209,7 @@
       // Check that the type class does not override the == operator.
       // Check this only in the first loop iteration since all values
       // are of the same type, which we check above.
-      if (ImplementsEqualOperator(val)) {
+      if (ImplementsEqualOperator(Z, val)) {
         ReportError(val_pos,
                     "type class of case expression must not "
                     "implement operator ==");
@@ -8440,13 +8461,15 @@
 }
 
 
-static LocalVariable* LookupAsyncSavedTryContextVar(LocalScope* scope,
+static LocalVariable* LookupAsyncSavedTryContextVar(Thread* thread,
+                                                    LocalScope* scope,
                                                     uint16_t try_index) {
-  const String& async_saved_try_ctx_name =
-      String::ZoneHandle(Symbols::NewFormatted(
-          "%s%d",
-          Symbols::AsyncSavedTryCtxVarPrefix().ToCString(),
-          try_index));
+  Zone* zone = thread->zone();
+  const String& async_saved_try_ctx_name = String::ZoneHandle(zone,
+      Symbols::NewFormatted(thread,
+                            "%s%d",
+                            Symbols::AsyncSavedTryCtxVarPrefix().ToCString(),
+                            try_index));
   LocalVariable* var = scope->LocalLookupVariable(async_saved_try_ctx_name);
   ASSERT(var != NULL);
   return var;
@@ -8484,8 +8507,8 @@
       // The block declaring :saved_try_ctx_var variable is the parent of the
       // pushed try block.
       *saved_try_ctx = LookupSavedTryContextVar(scope->parent());
-      *async_saved_try_ctx = LookupAsyncSavedTryContextVar(async_temp_scope_,
-                                                           try_index);
+      *async_saved_try_ctx = LookupAsyncSavedTryContextVar(T,
+          async_temp_scope_, try_index);
       if ((try_stack_->outer_try() != NULL) && !try_stack_->inside_finally()) {
         // Collecting the outer try scope is not necessary if we
         // are in a finally block.
@@ -8493,8 +8516,8 @@
         try_index = try_stack_->outer_try()->try_index();
         if (scope->function_level() == current_function_level) {
           *outer_saved_try_ctx = LookupSavedTryContextVar(scope->parent());
-          *outer_async_saved_try_ctx =
-              LookupAsyncSavedTryContextVar(async_temp_scope_, try_index);
+          *outer_async_saved_try_ctx = LookupAsyncSavedTryContextVar(T,
+              async_temp_scope_, try_index);
         }
       }
     }
@@ -8519,7 +8542,7 @@
   ASSERT(!print_fn.IsNull());
   ArgumentListNode* one_arg =
       new(Z) ArgumentListNode(TokenPosition::kNoSource);
-  String& msg = String::ZoneHandle(Symbols::NewFormatted("%s", str));
+  String& msg = String::ZoneHandle(Symbols::NewFormatted(T, "%s", str));
   one_arg->Add(new(Z) LiteralNode(TokenPosition::kNoSource, msg));
   AstNode* print_call =
       new(Z) StaticCallNode(TokenPosition::kNoSource, print_fn, one_arg);
@@ -9179,9 +9202,8 @@
       if (scope->function_level() == current_block_->scope->function_level()) {
         LocalVariable* saved_try_ctx =
             LookupSavedTryContextVar(scope->parent());
-        LocalVariable* async_saved_try_ctx =
-            LookupAsyncSavedTryContextVar(async_temp_scope_,
-                                          try_stack_->try_index());
+        LocalVariable* async_saved_try_ctx = LookupAsyncSavedTryContextVar(T,
+            async_temp_scope_, try_stack_->try_index());
         current_block_->statements->Add(
             new (Z) StoreLocalNode(
                 TokenPosition::kNoSource,
@@ -9452,9 +9474,8 @@
       if (scope->function_level() == current_block_->scope->function_level()) {
         LocalVariable* saved_try_ctx =
             LookupSavedTryContextVar(scope->parent());
-        LocalVariable* async_saved_try_ctx =
-            LookupAsyncSavedTryContextVar(async_temp_scope_,
-                                          try_block->try_index());
+        LocalVariable* async_saved_try_ctx = LookupAsyncSavedTryContextVar(T,
+            async_temp_scope_, try_block->try_index());
         async_code->Add(
             new (Z) StoreLocalNode(
                 TokenPosition::kNoSource,
@@ -9482,9 +9503,10 @@
 
 void Parser::SetupSavedTryContext(LocalVariable* saved_try_context) {
   const String& async_saved_try_ctx_name = String::ZoneHandle(Z,
-      Symbols::NewFormatted("%s%d",
-                           Symbols::AsyncSavedTryCtxVarPrefix().ToCString(),
-                           last_used_try_index_ - 1));
+      Symbols::NewFormatted(T,
+                            "%s%d",
+                            Symbols::AsyncSavedTryCtxVarPrefix().ToCString(),
+                            last_used_try_index_ - 1));
   LocalVariable* async_saved_try_ctx = new (Z) LocalVariable(
       TokenPosition::kNoSource,
       async_saved_try_ctx_name,
@@ -10278,15 +10300,12 @@
       type_pos, Integer::ZoneHandle(Z, Integer::New(type_pos.value()))));
   // Src value argument.
   arguments->Add(new(Z) LiteralNode(type_pos, Object::null_instance()));
-  // Dst type name argument.
-  arguments->Add(new(Z) LiteralNode(type_pos, Symbols::Malformed()));
+  // Dst type argument.
+  arguments->Add(new(Z) LiteralNode(type_pos, type));
   // Dst name argument.
   arguments->Add(new(Z) LiteralNode(type_pos, Symbols::Empty()));
-  // Malformed type error or malbounded type error.
-  const Error& error = Error::Handle(Z, type.error());
-  ASSERT(!error.IsNull());
-  arguments->Add(new(Z) LiteralNode(type_pos, String::ZoneHandle(Z,
-      Symbols::New(error.ToErrorCString()))));
+  // Bound error msg argument.
+  arguments->Add(new(Z) LiteralNode(type_pos, Object::null_instance()));
   return MakeStaticCall(Symbols::TypeError(), method_name, arguments);
 }
 
@@ -10325,7 +10344,7 @@
   }
   // String memberName.
   arguments->Add(new(Z) LiteralNode(
-      call_pos, String::ZoneHandle(Z, Symbols::New(function_name))));
+      call_pos, String::ZoneHandle(Z, Symbols::New(T, function_name))));
   // Smi invocation_type.
   if (cls.IsTopLevel()) {
     ASSERT(im_call == InvocationMirror::kStatic ||
@@ -10493,7 +10512,7 @@
   OS::SNPrint(name, 64, ":%s%" Pd "", s, token_pos.value());
   LocalVariable* temp = new(Z) LocalVariable(
       token_pos,
-      String::ZoneHandle(Z, Symbols::New(name)),
+      String::ZoneHandle(Z, Symbols::New(T, name)),
       Object::dynamic_type());
   temp->set_is_final();
   current_block_->scope->AddVariable(temp);
@@ -10705,7 +10724,7 @@
     String& name = String::ZoneHandle(Z);
     const Class* target_cls = &current_class();
     if (original->IsTypeNode()) {
-      name = Symbols::New(original->AsTypeNode()->TypeName());
+      name = Symbols::New(T, original->AsTypeNode()->TypeName());
     } else if (original->IsLoadStaticFieldNode()) {
       name = original->AsLoadStaticFieldNode()->field().name();
       target_cls = &Class::Handle(Z,
@@ -11606,7 +11625,7 @@
       is_setter_name = true;
     }
   } else if (Token::CanBeOverloaded(CurrentToken())) {
-    extractor_name = Symbols::New(Token::Str(CurrentToken()));
+    extractor_name = Symbols::Token(CurrentToken()).raw();
     ConsumeToken();
   } else {
     ReportError("identifier or operator expected");
@@ -11632,7 +11651,14 @@
       // In the pathological case where a library imports itself with
       // a prefix, the name mangling does not help in hiding the private
       // name, so we explicitly prevent lookup of private names here.
-      obj = prefix.LookupObject(extractor_name);
+      if (is_setter_name) {
+        String& setter_name =
+            String::Handle(Z, Field::SetterName(extractor_name));
+        obj = prefix.LookupObject(setter_name);
+      }
+      if (obj.IsNull()) {
+        obj = prefix.LookupObject(extractor_name);
+      }
     }
     if (!prefix.is_loaded() && (parsed_function() != NULL)) {
       // Remember that this function depends on an import prefix of an
@@ -11726,7 +11752,7 @@
     pieces.Add(Symbols::SetterPrefix());
   }
   pieces.Add(extractor_name);
-  extractor_name = Symbols::FromConcatAll(pieces);
+  extractor_name = Symbols::FromConcatAll(T, pieces);
   return new(Z) InstanceGetterNode(property_pos, primary, extractor_name);
 }
 
@@ -11859,7 +11885,6 @@
   }
   // Resolve type arguments, if any.
   const TypeArguments& arguments = TypeArguments::Handle(Z, type->arguments());
-      TypeArguments::Handle(Z, type->arguments());
   if (!arguments.IsNull()) {
     const intptr_t num_arguments = arguments.Length();
     for (intptr_t i = 0; i < num_arguments; i++) {
@@ -11954,6 +11979,8 @@
 
 class ConstMapKeyEqualsTraits {
  public:
+  static const char* Name() { return "ConstMapKeyEqualsTraits"; }
+
   static bool IsMatch(const Object& a, const Object& b) {
     const Array& key1 = Array::Cast(a);
     const Array& key2 = Array::Cast(b);
@@ -12004,7 +12031,7 @@
   ConstantsMap constants(isolate()->object_store()->compile_time_constants());
   constants.InsertNewOrGetValue(key, value);
   if (FLAG_compiler_stats) {
-    isolate_->compiler_stats()->num_cached_consts = constants.NumOccupied();
+    thread_->compiler_stats()->num_cached_consts = constants.NumOccupied();
   }
   isolate()->object_store()->set_compile_time_constants(constants.Release());
 }
@@ -12023,7 +12050,7 @@
   // do not assert that 'compile_time_constants' has not changed.
   constants.Release();
   if (FLAG_compiler_stats && is_present) {
-    isolate_->compiler_stats()->num_const_cache_hits++;
+    thread_->compiler_stats()->num_const_cache_hits++;
   }
   return is_present;
 }
@@ -12917,7 +12944,7 @@
       if (!key_value.IsInteger() &&
           !key_value.IsString() &&
           (key_value.clazz() != I->object_store()->symbol_class()) &&
-          ImplementsEqualOperator(key_value)) {
+          ImplementsEqualOperator(Z, key_value)) {
         ReportError(key_pos, "key value must not implement operator ==");
       }
     }
@@ -13049,12 +13076,20 @@
     factory_type_args = factory_type_args.Canonicalize();
     ArgumentListNode* factory_param = new(Z) ArgumentListNode(literal_pos);
     // The kv_pair array is temporary and of element type dynamic. It is passed
-    // to the factory to initialize a properly typed map.
-    ArrayNode* kv_pairs = new(Z) ArrayNode(
-        TokenPos(),
-        Type::ZoneHandle(Z, Type::ArrayType()),
-        kv_pairs_list);
-    factory_param->Add(kv_pairs);
+    // to the factory to initialize a properly typed map. Pass a pre-allocated
+    // array for the common empty map literal case.
+    if (kv_pairs_list.length() == 0) {
+      LiteralNode* empty_array_literal =
+          new(Z) LiteralNode(TokenPos(), Object::empty_array());
+      factory_param->Add(empty_array_literal);
+    } else {
+      ArrayNode* kv_pairs = new(Z) ArrayNode(
+          TokenPos(),
+          Type::ZoneHandle(Z, Type::ArrayType()),
+          kv_pairs_list);
+      factory_param->Add(kv_pairs);
+    }
+
     return CreateConstructorCallNode(literal_pos,
                                      factory_type_args,
                                      factory_method,
@@ -13107,9 +13142,9 @@
       ConsumeToken();
       pieces.Add(*ExpectIdentifier("identifier expected"));
     }
-    symbol = Symbols::FromConcatAll(pieces);
+    symbol = Symbols::FromConcatAll(T, pieces);
   } else if (Token::CanBeOverloaded(CurrentToken())) {
-    symbol = Symbols::New(Token::Str(CurrentToken()));
+    symbol = Symbols::Token(CurrentToken()).raw();
     ConsumeToken();
   } else {
     ReportError("illegal symbol literal");
@@ -13156,8 +13191,8 @@
   }
 
   String& closure_name = String::Handle(Z, ctr.name());
-  closure_name = Symbols::FromConcat(Symbols::ConstructorClosurePrefix(),
-                                     closure_name);
+  closure_name = Symbols::FromConcat(T,
+      Symbols::ConstructorClosurePrefix(), closure_name);
 
   ParamList params;
   params.AddFinalParameter(token_pos,
@@ -13179,8 +13214,7 @@
   AddFormalParamsToFunction(&params, closure);
 
   // Finalize function type.
-  FunctionType& signature_type =
-      FunctionType::Handle(Z, closure.SignatureType());
+  Type& signature_type = Type::Handle(Z, closure.SignatureType());
   signature_type ^= ClassFinalizer::FinalizeType(
       current_class(), signature_type, ClassFinalizer::kCanonicalize);
   closure.SetSignatureType(signature_type);
@@ -13190,17 +13224,19 @@
 }
 
 
-static String& BuildConstructorName(const String& type_class_name,
+static String& BuildConstructorName(Thread* thread,
+                                    const String& type_class_name,
                                     const String* named_constructor) {
   // By convention, the static function implementing a named constructor 'C'
   // for class 'A' is labeled 'A.C', and the static function implementing the
   // unnamed constructor for class 'A' is labeled 'A.'.
   // This convention prevents users from explicitly calling constructors.
-  String& constructor_name =
-      String::Handle(Symbols::FromConcat(type_class_name, Symbols::Dot()));
+  Zone* zone = thread->zone();
+  String& constructor_name = String::Handle(zone,
+      Symbols::FromDot(thread, type_class_name));
   if (named_constructor != NULL) {
     constructor_name =
-        Symbols::FromConcat(constructor_name, *named_constructor);
+        Symbols::FromConcat(thread, constructor_name, *named_constructor);
   }
   return constructor_name;
 }
@@ -13239,8 +13275,8 @@
   Class& type_class = Class::Handle(Z, type.type_class());
   String& type_class_name = String::Handle(Z, type_class.Name());
   *type_arguments = type.arguments();
-  String& constructor_name =
-      BuildConstructorName(type_class_name, named_constructor);
+  String& constructor_name = BuildConstructorName(T,
+      type_class_name, named_constructor);
   *constructor = type_class.LookupConstructor(constructor_name);
   if (constructor->IsNull()) {
     *constructor = type_class.LookupFactory(constructor_name);
@@ -13281,7 +13317,7 @@
       (la3 == Token::kLT) || (la3 == Token::kPERIOD) || (la3 == Token::kHASH);
 
   LibraryPrefix& prefix = LibraryPrefix::ZoneHandle(Z);
-  AbstractType& type = AbstractType::Handle(Z,
+  AbstractType& type = AbstractType::ZoneHandle(Z,
       ParseType(ClassFinalizer::kCanonicalizeWellFormed,
                 allow_deferred_type,
                 consume_unresolved_prefix,
@@ -13290,7 +13326,7 @@
   if (FLAG_load_deferred_eagerly &&
       !prefix.IsNull() && prefix.is_deferred_load() && !prefix.is_loaded()) {
     // Add runtime check.
-    Type& malformed_type = Type::Handle(Z);
+    Type& malformed_type = Type::ZoneHandle(Z);
     malformed_type = ClassFinalizer::NewFinalizedMalformedType(
         Error::Handle(Z),  // No previous error.
         script_,
@@ -13380,8 +13416,8 @@
   AbstractType& type_bound = AbstractType::ZoneHandle(Z);
 
   // Make sure that an appropriate constructor exists.
-  String& constructor_name =
-      BuildConstructorName(type_class_name, named_constructor);
+  String& constructor_name = BuildConstructorName(T,
+              type_class_name, named_constructor);
   Function& constructor = Function::ZoneHandle(Z,
       type_class.LookupConstructor(constructor_name));
   if (constructor.IsNull()) {
@@ -13410,7 +13446,7 @@
                                     NULL);  // No existing function.
     } else if (constructor.IsRedirectingFactory()) {
       ClassFinalizer::ResolveRedirectingFactory(type_class, constructor);
-      Type& redirect_type = Type::Handle(Z, constructor.RedirectionType());
+      Type& redirect_type = Type::ZoneHandle(Z, constructor.RedirectionType());
       if (!redirect_type.IsMalformedOrMalbounded() &&
           !redirect_type.IsInstantiated()) {
         // The type arguments of the redirection type are instantiated from the
@@ -13649,7 +13685,7 @@
   }
   String& concatenated = String::ZoneHandle(Z);
   concatenated ^= result.raw();
-  concatenated = Symbols::New(concatenated);
+  concatenated = Symbols::New(T, concatenated);
   return concatenated;
 }
 
@@ -13747,7 +13783,8 @@
         ASSERT(part.IsString());
         pieces.Add(String::Cast(part));
       }
-      const String& lit = String::ZoneHandle(Z, Symbols::FromConcatAll(pieces));
+      const String& lit = String::ZoneHandle(Z,
+          Symbols::FromConcatAll(T, pieces));
       primary = new(Z) LiteralNode(literal_start, lit);
       // Caching of constant not necessary because the symbol lookup will
       // find the value next time.
@@ -13837,7 +13874,7 @@
           pieces.Add(Symbols::Dot());
           pieces.Add(ident);
           const String& qualified_name = String::ZoneHandle(Z,
-              Symbols::FromConcatAll(pieces));
+              Symbols::FromConcatAll(T, pieces));
           InvocationMirror::Type call_type =
               CurrentToken() == Token::kLPAREN ?
                   InvocationMirror::kMethod : InvocationMirror::kGetter;
@@ -13851,9 +13888,12 @@
         }
       } else if (FLAG_load_deferred_eagerly && prefix.is_deferred_load()) {
         // primary != NULL.
-        String& qualified_name = String::ZoneHandle(Z, prefix.name());
-        qualified_name = String::Concat(qualified_name, Symbols::Dot());
-        qualified_name = Symbols::FromConcat(qualified_name, ident);
+        GrowableHandlePtrArray<const String> pieces(Z, 3);
+        pieces.Add(String::Handle(Z, prefix.name()));
+        pieces.Add(Symbols::Dot());
+        pieces.Add(ident);
+        const String& qualified_name = String::ZoneHandle(Z,
+            Symbols::FromConcatAll(T, pieces));
         InvocationMirror::Type call_type =
             CurrentToken() == Token::kLPAREN ?
                 InvocationMirror::kMethod : InvocationMirror::kGetter;
diff --git a/runtime/vm/parser_test.cc b/runtime/vm/parser_test.cc
index 5889227..120e5ca 100644
--- a/runtime/vm/parser_test.cc
+++ b/runtime/vm/parser_test.cc
@@ -21,7 +21,8 @@
 static void DumpFunction(const Library& lib,
                          const char* cname,
                          const char* fname) {
-  const String& classname = String::Handle(Symbols::New(cname));
+  const String& classname = String::Handle(Symbols::New(Thread::Current(),
+                                                        cname));
   String& funcname = String::Handle(String::New(fname));
 
   bool retval;
@@ -56,7 +57,8 @@
                 const char* field_name,
                 bool expect_static,
                 bool is_final) {
-  const String& classname = String::Handle(Symbols::New(class_name));
+  const String& classname = String::Handle(Symbols::New(Thread::Current(),
+                                                        class_name));
   Class& cls = Class::Handle(lib.LookupClass(classname));
   EXPECT(!cls.IsNull());
 
@@ -65,7 +67,7 @@
   Function& function = Function::Handle();
   Field& field = Field::Handle();
   if (expect_static) {
-    field ^= cls.LookupStaticField(fieldname);
+    field ^= cls.LookupStaticFieldAllowPrivate(fieldname);
     functionname ^= Field::GetterName(fieldname);
     function ^= cls.LookupStaticFunction(functionname);
     EXPECT(function.IsNull());
@@ -73,7 +75,7 @@
     function ^= cls.LookupStaticFunction(functionname);
     EXPECT(function.IsNull());
   } else {
-    field ^= cls.LookupInstanceField(fieldname);
+    field ^= cls.LookupInstanceFieldAllowPrivate(fieldname);
     functionname ^= Field::GetterName(fieldname);
     function ^= cls.LookupDynamicFunction(functionname);
     EXPECT(!function.IsNull());
@@ -91,7 +93,8 @@
                    const char* class_name,
                    const char* function_name,
                    bool expect_static) {
-  const String& classname = String::Handle(Symbols::New(class_name));
+  const String& classname = String::Handle(Symbols::New(Thread::Current(),
+                                                        class_name));
   Class& cls = Class::Handle(lib.LookupClass(classname));
   EXPECT(!cls.IsNull());
 
diff --git a/runtime/vm/port.cc b/runtime/vm/port.cc
index a57b93f..3df0a63 100644
--- a/runtime/vm/port.cc
+++ b/runtime/vm/port.cc
@@ -14,8 +14,6 @@
 
 namespace dart {
 
-DECLARE_FLAG(bool, trace_isolates);
-
 Mutex* PortMap::mutex_ = NULL;
 PortMap::Entry* PortMap::map_ = NULL;
 MessageHandler* PortMap::deleted_entry_ = reinterpret_cast<MessageHandler*>(1);
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 2f876e0..fc83b31 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -39,6 +39,7 @@
 #include "vm/resolver.h"
 #include "vm/symbols.h"
 #include "vm/tags.h"
+#include "vm/timeline.h"
 #include "vm/timer.h"
 
 namespace dart {
@@ -148,6 +149,7 @@
     classes_to_retain_(),
     typeargs_to_retain_(),
     types_to_retain_(),
+    consts_to_retain_(),
     error_(Error::Handle()) {
 }
 
@@ -202,10 +204,17 @@
     TraceTypesFromRetainedClasses();
     DropTypes();
     DropTypeArguments();
+
+    // Clear these before dropping classes as they may hold onto otherwise
+    // dead instances of classes we will remove.
+    I->object_store()->set_compile_time_constants(Array::null_array());
+    I->object_store()->set_unique_dynamic_targets(Array::null_array());
+
     DropClasses();
     DropLibraries();
 
     BindStaticCalls();
+    SwitchICCalls();
 
     DedupStackmaps();
     DedupStackmapLists();
@@ -215,9 +224,6 @@
       DedupInstructions();
     }
 
-    I->object_store()->set_compile_time_constants(Array::null_array());
-    I->object_store()->set_unique_dynamic_targets(Array::null_array());
-
     zone_ = NULL;
   }
 
@@ -276,6 +282,14 @@
   }
 
   Dart_QualifiedFunctionName vm_entry_points[] = {
+    // TODO(rmacnak): These types are not allocated from C++ but they are
+    // cached in the object store. Consider clearing them from the object store
+    // before snapshotting and adjusting InitKnownObjects to allow their
+    // absence.
+    { "dart:async", "Future", "Future." },
+    { "dart:async", "Completer", "Completer." },
+    { "dart:async", "StreamIterator", "StreamIterator." },
+
     // Functions
     { "dart:async", "::", "_setScheduleImmediateClosure" },
     { "dart:core", "::", "_completeDeferredLoads" },
@@ -307,10 +321,12 @@
     { "dart:isolate", "_SendPortImpl", "send" },
     { "dart:typed_data", "ByteData", "ByteData." },
     { "dart:typed_data", "ByteData", "ByteData._view" },
-    { "dart:typed_data", "_ByteBuffer", "_ByteBuffer._New" },
+    { "dart:typed_data", "ByteBuffer", "ByteBuffer._New" },
+#if !defined(PRODUCT)
     { "dart:_vmservice", "::", "_registerIsolate" },
     { "dart:_vmservice", "::", "boot" },
     { "dart:developer", "Metrics", "_printMetrics" },
+#endif  // !PRODUCT
     // Fields
     { "dart:core", "Error", "_stackTrace" },
     { "dart:math", "_Random", "_state" },
@@ -332,9 +348,9 @@
   String& function_name = String::Handle(Z);
 
   for (intptr_t i = 0; entry_points[i].library_uri != NULL; i++) {
-    library_uri = Symbols::New(entry_points[i].library_uri);
-    class_name = Symbols::New(entry_points[i].class_name);
-    function_name = Symbols::New(entry_points[i].function_name);
+    library_uri = Symbols::New(thread(), entry_points[i].library_uri);
+    class_name = Symbols::New(thread(), entry_points[i].class_name);
+    function_name = Symbols::New(thread(), entry_points[i].function_name);
 
     lib = Library::LookupLibrary(library_uri);
     if (lib.IsNull()) {
@@ -366,7 +382,7 @@
 
       ASSERT(!cls.IsNull());
       func = cls.LookupFunctionAllowPrivate(function_name);
-      field = cls.LookupField(function_name);
+      field = cls.LookupFieldAllowPrivate(function_name);
     }
 
     if (func.IsNull() && field.IsNull()) {
@@ -409,6 +425,9 @@
     }
 
     CheckForNewDynamicFunctions();
+    if (!changed_) {
+      TraceConstFunctions();
+    }
   }
 }
 
@@ -581,11 +600,9 @@
       Array& types = Array::Handle(Z);
       for (intptr_t i = 0; i < handlers.num_entries(); i++) {
         types = handlers.GetHandledTypes(i);
-        if (!types.IsNull()) {
-          for (intptr_t j = 0; j < types.Length(); j++) {
-            type ^= types.At(j);
-            AddType(type);
-          }
+        for (intptr_t j = 0; j < types.Length(); j++) {
+          type ^= types.At(j);
+          AddType(type);
         }
       }
     }
@@ -614,14 +631,10 @@
     AddTypesOf(cls);
     const TypeArguments& vector = TypeArguments::Handle(Z, abstype.arguments());
     AddTypeArguments(vector);
-  } else if (abstype.IsFunctionType()) {
-    const FunctionType& func_type = FunctionType::Cast(abstype);
-    const Class& cls = Class::Handle(Z, func_type.scope_class());
-    AddTypesOf(cls);
-    const Function& func = Function::Handle(Z, func_type.signature());
-    AddTypesOf(func);
-    const TypeArguments& vector = TypeArguments::Handle(Z, abstype.arguments());
-    AddTypeArguments(vector);
+    if (type.IsFunctionType()) {
+      const Function& func = Function::Handle(Z, type.signature());
+      AddTypesOf(func);
+    }
   } else if (abstype.IsBoundedType()) {
     AbstractType& type = AbstractType::Handle(Z);
     type = BoundedType::Cast(abstype).type();
@@ -678,6 +691,8 @@
   // argument descriptors.
   if (!instance.IsCanonical()) return;
 
+  consts_to_retain_.Insert(&Instance::ZoneHandle(Z, instance.raw()));
+
   if (cls.NumTypeArguments() > 0) {
     AddTypeArguments(TypeArguments::Handle(Z, instance.GetTypeArguments()));
   }
@@ -831,14 +846,14 @@
     // Function fits the bill.
     const char* kEvalConst = "eval_const";
     const Function& func = Function::ZoneHandle(Function::New(
-        String::Handle(Symbols::New(kEvalConst)),
+        String::Handle(Symbols::New(thread, kEvalConst)),
         RawFunction::kRegularFunction,
         true,  // static function
         false,  // not const function
         false,  // not abstract
         false,  // not external
         false,  // not native
-        Class::Handle(Type::Handle(Type::Function()).type_class()),
+        Class::Handle(Type::Handle(Type::DartFunctionType()).type_class()),
         fragment->token_pos()));
 
     func.set_result_type(Object::dynamic_type());
@@ -974,14 +989,14 @@
         // Handle the implicit call type conversions.
         if (Field::IsGetterName(selector)) {
           selector2 = Field::NameFromGetter(selector);
-          selector3 = Symbols::Lookup(selector2);
+          selector3 = Symbols::Lookup(thread(), selector2);
           if (IsSent(selector2)) {
             // Call-through-getter.
             // Function is get:foo and somewhere foo is called.
             AddFunction(function);
           }
-          selector3 = Symbols::LookupFromConcat(Symbols::ClosurizePrefix(),
-                                                selector2);
+          selector3 = Symbols::LookupFromConcat(thread(),
+              Symbols::ClosurizePrefix(), selector2);
           if (IsSent(selector3)) {
             // Hash-closurization.
             // Function is get:foo and somewhere get:#foo is called.
@@ -995,8 +1010,8 @@
             AddFunction(function2);
           }
         } else if (Field::IsSetterName(selector)) {
-          selector2 = Symbols::LookupFromConcat(Symbols::ClosurizePrefix(),
-                                                selector);
+          selector2 = Symbols::LookupFromConcat(thread(),
+              Symbols::ClosurizePrefix(), selector);
           if (IsSent(selector2)) {
             // Hash-closurization.
             // Function is set:foo and somewhere get:#set:foo is called.
@@ -1021,8 +1036,8 @@
             function2 = function.GetMethodExtractor(selector2);
             AddFunction(function2);
           }
-          selector2 = Symbols::LookupFromConcat(Symbols::ClosurizePrefix(),
-                                                selector);
+          selector2 = Symbols::LookupFromConcat(thread(),
+              Symbols::ClosurizePrefix(), selector);
           if (IsSent(selector2)) {
             // Hash-closurization.
             // Function is foo and somewhere get:#foo is called.
@@ -1042,6 +1057,8 @@
 
 class NameFunctionsTraits {
  public:
+  static const char* Name() { return "NameFunctionsTraits"; }
+
   static bool IsMatch(const Object& a, const Object& b) {
     return a.IsString() && b.IsString() &&
         String::Cast(a).Equals(String::Cast(b));
@@ -1162,6 +1179,36 @@
 }
 
 
+void Precompiler::TraceConstFunctions() {
+  // Compilation of const accessors happens outside of the treeshakers
+  // queue, so we haven't previously scanned its literal pool.
+
+  Library& lib = Library::Handle(Z);
+  Class& cls = Class::Handle(Z);
+  Array& functions = Array::Handle(Z);
+  Function& function = Function::Handle(Z);
+
+  for (intptr_t i = 0; i < libraries_.Length(); i++) {
+    lib ^= libraries_.At(i);
+    ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate);
+    while (it.HasNext()) {
+      cls = it.GetNextClass();
+      if (cls.IsDynamicClass()) {
+        continue;  // class 'dynamic' is in the read-only VM isolate.
+      }
+
+      functions = cls.functions();
+      for (intptr_t j = 0; j < functions.Length(); j++) {
+        function ^= functions.At(j);
+        if (function.is_const() && function.HasCode()) {
+          AddCalleesOf(function);
+        }
+      }
+    }
+  }
+}
+
+
 void Precompiler::DropFunctions() {
   Library& lib = Library::Handle(Z);
   Class& cls = Class::Handle(Z);
@@ -1210,7 +1257,7 @@
           }
           dropped_function_count_++;
           if (FLAG_trace_precompiler) {
-            THR_Print("Precompilation dropping %s\n",
+            THR_Print("Dropping function %s\n",
                       function.ToLibNamePrefixedQualifiedCString());
           }
         }
@@ -1236,7 +1283,7 @@
     } else {
       dropped_function_count_++;
       if (FLAG_trace_precompiler) {
-        THR_Print("Precompilation dropping %s\n",
+        THR_Print("Dropping function %s\n",
                   function.ToLibNamePrefixedQualifiedCString());
       }
     }
@@ -1281,7 +1328,7 @@
           }
           dropped_field_count_++;
           if (FLAG_trace_precompiler) {
-            THR_Print("Precompilation dropping %s\n",
+            THR_Print("Dropping field %s\n",
                       field.ToCString());
           }
         }
@@ -1392,6 +1439,9 @@
   Library& lib = Library::Handle(Z);
   Class& cls = Class::Handle(Z);
   Array& members = Array::Handle(Z);
+  Array& constants = Array::Handle(Z);
+  GrowableObjectArray& retained_constants = GrowableObjectArray::Handle(Z);
+  Instance& constant = Instance::Handle(Z);
 
   for (intptr_t i = 0; i < libraries_.Length(); i++) {
     lib ^= libraries_.At(i);
@@ -1422,9 +1472,26 @@
         // them.
         retain = true;
       }
-      members = cls.constants();
-      if (members.Length() > 0) {
-        // --compile_all?
+
+      constants = cls.constants();
+      retained_constants = GrowableObjectArray::New();
+      for (intptr_t j = 0; j < constants.Length(); j++) {
+        constant ^= constants.At(j);
+        bool retain = consts_to_retain_.Lookup(&constant) != NULL;
+        if (retain) {
+          retained_constants.Add(constant);
+        }
+      }
+      if (retained_constants.Length() > 0) {
+        constants = Array::MakeArray(retained_constants);
+        cls.set_constants(constants);
+      } else {
+        constants = Object::empty_array().raw();
+        cls.set_constants(Object::empty_array());
+      }
+
+      if (constants.Length() > 0) {
+        ASSERT(retain);  // This shouldn't be the reason we keep a class.
         retain = true;
       }
 
@@ -1439,14 +1506,17 @@
 void Precompiler::DropClasses() {
   Library& lib = Library::Handle(Z);
   Class& cls = Class::Handle(Z);
-  Array& members = Array::Handle(Z);
+  Array& constants = Array::Handle(Z);
   String& name = String::Handle(Z);
 
 #if defined(DEBUG)
-  {
-    // Force GC for allocation stats.
-    I->heap()->CollectAllGarbage();
-  }
+  // We are about to remove classes from the class table. For this to be safe,
+  // there must be no instances of these classes on the heap, not even
+  // corpses because the class table entry may be used to find the size of
+  // corpses. Request a full GC and wait for the sweeper tasks to finish before
+  // we continue.
+  I->heap()->CollectAllGarbage();
+  I->heap()->WaitForSweeperTasks();
 #endif
 
   ClassTable* class_table = I->class_table();
@@ -1465,22 +1535,16 @@
       // removed.
       continue;
     }
-    if (cls.is_enum_class()) {
-      // Enum classes have live instances, so we cannot unregister
-      // them.
-      continue;
-    }
-    members = cls.constants();
-    if (members.Length() > 0) {
-      // --compile_all?
-      continue;
-    }
 
     bool retain = classes_to_retain_.Lookup(&cls) != NULL;
     if (retain) {
       continue;
     }
 
+    ASSERT(!cls.is_allocated());
+    constants = cls.constants();
+    ASSERT(constants.Length() == 0);
+
 #if defined(DEBUG)
     intptr_t instances =
         class_table->StatsWithUpdatedSize(cid)->post_gc.new_count +
@@ -1494,7 +1558,7 @@
 
     dropped_class_count_++;
     if (FLAG_trace_precompiler) {
-      THR_Print("Precompilation dropping %" Pd " %s\n", cid, cls.ToCString());
+      THR_Print("Dropping class %" Pd " %s\n", cid, cls.ToCString());
     }
 
 #if defined(DEBUG)
@@ -1531,7 +1595,7 @@
       dropped_library_count_++;
       lib.set_index(-1);
       if (FLAG_trace_precompiler) {
-        THR_Print("Precompilation dropping %s\n", lib.ToCString());
+        THR_Print("Dropping library %s\n", lib.ToCString());
       }
     }
   }
@@ -1601,6 +1665,84 @@
 }
 
 
+void Precompiler::SwitchICCalls() {
+  // Now that all functions have been compiled, we can switch to an instance
+  // call sequence that loads the Code object and entry point directly from
+  // the ic data array instead indirectly through a Function in the ic data
+  // array. Iterate all the object pools and rewrite the ic data from
+  // (cid, target function, count) to (cid, target code, entry point), and
+  // replace the ICLookupThroughFunction stub with ICLookupThroughCode.
+
+  class SwitchICCallsVisitor : public FunctionVisitor {
+   public:
+    explicit SwitchICCallsVisitor(Zone* zone) :
+        code_(Code::Handle(zone)),
+        pool_(ObjectPool::Handle(zone)),
+        entry_(Object::Handle(zone)),
+        ic_(ICData::Handle(zone)),
+        target_(Function::Handle(zone)),
+        target_code_(Code::Handle(zone)),
+        entry_point_(Smi::Handle(zone)) {
+    }
+
+    void VisitFunction(const Function& function) {
+      if (!function.HasCode()) {
+        ASSERT(function.HasImplicitClosureFunction());
+        return;
+      }
+
+      code_ = function.CurrentCode();
+      pool_ = code_.object_pool();
+      for (intptr_t i = 0; i < pool_.Length(); i++) {
+        if (pool_.InfoAt(i) != ObjectPool::kTaggedObject) continue;
+        entry_ = pool_.ObjectAt(i);
+        if (entry_.IsICData()) {
+          ic_ ^= entry_.raw();
+
+          // Only single check ICs are SwitchableCalls that use the ICLookup
+          // stubs. Some operators like + have ICData that check the types of
+          // arguments in addition to the receiver and use special stubs
+          // with fast paths for Smi operations.
+          if (ic_.NumArgsTested() != 1) continue;
+
+          for (intptr_t j = 0; j < ic_.NumberOfChecks(); j++) {
+            entry_ = ic_.GetTargetOrCodeAt(j);
+            if (entry_.IsFunction()) {
+              target_ ^= entry_.raw();
+              ASSERT(target_.HasCode());
+              target_code_ = target_.CurrentCode();
+              entry_point_ = Smi::FromAlignedAddress(target_code_.EntryPoint());
+              ic_.SetCodeAt(j, target_code_);
+              ic_.SetEntryPointAt(j, entry_point_);
+            } else {
+              // We've already seen and switched this ICData.
+              ASSERT(entry_.IsCode());
+            }
+          }
+        } else if (entry_.raw() ==
+                   StubCode::ICLookupThroughFunction_entry()->code()) {
+          target_code_ = StubCode::ICLookupThroughCode_entry()->code();
+          pool_.SetObjectAt(i, target_code_);
+        }
+      }
+    }
+
+   private:
+    Code& code_;
+    ObjectPool& pool_;
+    Object& entry_;
+    ICData& ic_;
+    Function& target_;
+    Code& target_code_;
+    Smi& entry_point_;
+  };
+
+  ASSERT(!I->compilation_allowed());
+  SwitchICCallsVisitor visitor(Z);
+  VisitFunctions(&visitor);
+}
+
+
 void Precompiler::DedupStackmaps() {
   class DedupStackmapsVisitor : public FunctionVisitor {
    public:
@@ -1927,7 +2069,7 @@
   bool is_compiled = false;
   Zone* const zone = thread()->zone();
 #ifndef PRODUCT
-  TimelineStream* compiler_timeline = isolate()->GetCompilerStream();
+  TimelineStream* compiler_timeline = Timeline::GetCompilerStream();
 #endif  // !PRODUCT
   CSTAT_TIMER_SCOPE(thread(), codegen_timer);
   HANDLESCOPE(thread());
@@ -2015,7 +2157,12 @@
                                   "OptimizationPasses");
 #endif  // !PRODUCT
         inline_id_to_function.Add(&function);
-        inline_id_to_token_pos.Add(function.token_pos());
+        // 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.
         // Top scope function has no caller (-1).
         caller_inline_id.Add(-1);
         CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
@@ -2531,7 +2678,7 @@
 RawError* Precompiler::CompileFunction(Thread* thread,
                                        const Function& function) {
   VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId);
-  TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "Function", function);
+  TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "CompileFunction", function);
 
   CompilationPipeline* pipeline =
       CompilationPipeline::New(thread->zone(), function);
diff --git a/runtime/vm/precompiler.h b/runtime/vm/precompiler.h
index 43b7b96..5799819 100644
--- a/runtime/vm/precompiler.h
+++ b/runtime/vm/precompiler.h
@@ -236,6 +236,29 @@
 typedef DirectChainedHashMap<TypeArgumentsKeyValueTrait> TypeArgumentsSet;
 
 
+class InstanceKeyValueTrait {
+ public:
+  // Typedefs needed for the DirectChainedHashMap template.
+  typedef const Instance* Key;
+  typedef const Instance* Value;
+  typedef const Instance* Pair;
+
+  static Key KeyOf(Pair kv) { return kv; }
+
+  static Value ValueOf(Pair kv) { return kv; }
+
+  static inline intptr_t Hashcode(Key key) {
+    return key->GetClassId();
+  }
+
+  static inline bool IsKeyEqual(Pair pair, Key key) {
+    return pair->raw() == key->raw();
+  }
+};
+
+typedef DirectChainedHashMap<InstanceKeyValueTrait> InstanceSet;
+
+
 class Precompiler : public ValueObject {
  public:
   static RawError* CompileAll(
@@ -284,6 +307,7 @@
 
   void ProcessFunction(const Function& function);
   void CheckForNewDynamicFunctions();
+  void TraceConstFunctions();
 
   void DropFunctions();
   void DropFields();
@@ -294,6 +318,7 @@
   void DropLibraries();
 
   void BindStaticCalls();
+  void SwitchICCalls();
   void DedupStackmaps();
   void DedupStackmapLists();
   void DedupInstructions();
@@ -340,12 +365,15 @@
   ClassSet classes_to_retain_;
   TypeArgumentsSet typeargs_to_retain_;
   AbstractTypeSet types_to_retain_;
+  InstanceSet consts_to_retain_;
   Error& error_;
 };
 
 
 class FunctionsTraits {
  public:
+  static const char* Name() { return "FunctionsTraits"; }
+
   static bool IsMatch(const Object& a, const Object& b) {
     Zone* zone = Thread::Current()->zone();
     String& a_s = String::Handle(zone);
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 0d1ad84..e597260 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -27,8 +27,8 @@
 namespace dart {
 
 static const intptr_t kSampleSize = 8;
+static const intptr_t kMaxSamplesPerTick = 4;
 
-DECLARE_FLAG(bool, trace_profiler);
 DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates.");
 
 #if defined(TARGET_OS_ANDROID) || defined(TARGET_ARCH_ARM64) ||                \
@@ -39,7 +39,7 @@
   DEFINE_FLAG(int, profile_period, 1000,
               "Time between profiler samples in microseconds. Minimum 50.");
 #endif
-DEFINE_FLAG(int, max_profile_depth, kSampleSize,
+DEFINE_FLAG(int, max_profile_depth, kSampleSize * kMaxSamplesPerTick,
             "Maximum number stack frames walked. Minimum 1. Maximum 255.");
 #if defined(USING_SIMULATOR)
 DEFINE_FLAG(bool, profile_vm, true,
@@ -307,6 +307,12 @@
 }
 
 
+bool SampleFilter::TaskFilterSample(Sample* sample) {
+  const intptr_t task = static_cast<intptr_t>(sample->thread_task());
+  return (task & thread_task_mask_) != 0;
+}
+
+
 ClearProfileVisitor::ClearProfileVisitor(Isolate* isolate)
     : SampleVisitor(isolate) {
 }
@@ -844,6 +850,7 @@
 #endif
   sample->set_vm_tag(vm_tag);
   sample->set_user_tag(isolate->user_tag());
+  sample->set_thread_task(thread->task_kind());
   return sample;
 }
 
@@ -887,7 +894,7 @@
   }
 
   if (FLAG_profile_vm) {
-    uintptr_t sp = Isolate::GetCurrentStackPointer();
+    uintptr_t sp = Thread::GetCurrentStackPointer();
     uintptr_t fp = 0;
     uintptr_t pc = GetProgramCounter();
 
@@ -938,6 +945,32 @@
 }
 
 
+void Profiler::SampleThreadSingleFrame(Thread* thread, uintptr_t pc) {
+  ASSERT(thread != NULL);
+  OSThread* os_thread = thread->os_thread();
+  ASSERT(os_thread != NULL);
+  Isolate* isolate = thread->isolate();
+
+  SampleBuffer* sample_buffer = Profiler::sample_buffer();
+  if (sample_buffer == NULL) {
+    // Profiler not initialized.
+    return;
+  }
+
+  // Setup sample.
+  Sample* sample = SetupSample(thread, sample_buffer, os_thread->trace_id());
+  // Increment counter for vm tag.
+  VMTagCounters* counters = isolate->vm_tag_counters();
+  ASSERT(counters != NULL);
+  if (thread->IsMutatorThread()) {
+    counters->Increment(sample->vm_tag());
+  }
+
+  // Write the single pc value.
+  sample->SetAt(0, pc);
+}
+
+
 void Profiler::SampleThread(Thread* thread,
                             const InterruptedThreadState& state) {
   ASSERT(thread != NULL);
@@ -945,6 +978,11 @@
   ASSERT(os_thread != NULL);
   Isolate* isolate = thread->isolate();
 
+  // Thread is not doing VM work.
+  if (thread->task_kind() == Thread::kUnknownTask) {
+    return;
+  }
+
   if (StubCode::HasBeenInitialized() &&
       StubCode::InJumpToExceptionHandlerStub(state.pc)) {
     // The JumpToExceptionHandler stub manually adjusts the stack pointer,
@@ -977,17 +1015,17 @@
     sp = state.csp;
   }
 
-  if (!InitialRegisterCheck(pc, fp, sp)) {
-    return;
-  }
-
   if (!CheckIsolate(isolate)) {
     return;
   }
 
-  if (!thread->IsMutatorThread()) {
-    // Not a mutator thread.
-    // TODO(johnmccutchan): Profile all threads with an isolate.
+  if (thread->IsMutatorThread() && isolate->IsDeoptimizing()) {
+    SampleThreadSingleFrame(thread, pc);
+    return;
+  }
+
+  if (!InitialRegisterCheck(pc, fp, sp)) {
+    SampleThreadSingleFrame(thread, pc);
     return;
   }
 
@@ -999,6 +1037,7 @@
                                         &stack_lower,
                                         &stack_upper)) {
     // Could not get stack boundary.
+    SampleThreadSingleFrame(thread, pc);
     return;
   }
 
@@ -1015,7 +1054,9 @@
   // Increment counter for vm tag.
   VMTagCounters* counters = isolate->vm_tag_counters();
   ASSERT(counters != NULL);
-  counters->Increment(sample->vm_tag());
+  if (thread->IsMutatorThread()) {
+    counters->Increment(sample->vm_tag());
+  }
 
   ProfilerNativeStackWalker native_stack_walker(isolate,
                                                 sample,
@@ -1084,9 +1125,7 @@
 
 class CodeLookupTableBuilder : public ObjectVisitor {
  public:
-  CodeLookupTableBuilder(Isolate* isolate, CodeLookupTable* table)
-      : ObjectVisitor(isolate),
-        table_(table) {
+  explicit CodeLookupTableBuilder(CodeLookupTable* table) : table_(table) {
     ASSERT(table_ != NULL);
   }
 
@@ -1122,7 +1161,7 @@
   code_objects_.Clear();
 
   // Add all found Code objects.
-  CodeLookupTableBuilder cltb(isolate, this);
+  CodeLookupTableBuilder cltb(this);
   vm_isolate->heap()->IterateOldObjects(&cltb);
   isolate->heap()->IterateOldObjects(&cltb);
 
@@ -1223,6 +1262,10 @@
       // Did not pass time filter.
       continue;
     }
+    if (!filter->TaskFilterSample(sample)) {
+      // Did not pass task filter.
+      continue;
+    }
     if (!filter->FilterSample(sample)) {
       // Did not pass filter.
       continue;
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index 0b1207f..096d429 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -53,6 +53,8 @@
                            const InterruptedThreadState& state);
 
  private:
+  // Does not walk the thread's stack.
+  static void SampleThreadSingleFrame(Thread* thread, uintptr_t pc);
   static bool initialized_;
 
   static SampleBuffer* sample_buffer_;
@@ -91,11 +93,14 @@
 class SampleFilter : public ValueObject {
  public:
   SampleFilter(Isolate* isolate,
+               intptr_t thread_task_mask,
                int64_t time_origin_micros,
                int64_t time_extent_micros)
       : isolate_(isolate),
+        thread_task_mask_(thread_task_mask),
         time_origin_micros_(time_origin_micros),
         time_extent_micros_(time_extent_micros) {
+    ASSERT(thread_task_mask != 0);
     ASSERT(time_origin_micros_ >= -1);
     ASSERT(time_extent_micros_ >= -1);
   }
@@ -114,9 +119,12 @@
   // Returns |true| if |sample| passes the time filter.
   bool TimeFilterSample(Sample* sample);
 
+  // Returns |true| if |sample| passes the thread task filter.
+  bool TaskFilterSample(Sample* sample);
+
  private:
   Isolate* isolate_;
-
+  intptr_t thread_task_mask_;
   int64_t time_origin_micros_;
   int64_t time_extent_micros_;
 };
@@ -274,6 +282,14 @@
     state_ = ClassAllocationSampleBit::update(allocation_sample, state_);
   }
 
+  Thread::TaskKind thread_task() const {
+    return ThreadTaskBit::decode(state_);
+  }
+
+  void set_thread_task(Thread::TaskKind task) {
+    state_ = ThreadTaskBit::update(task, state_);
+  }
+
   bool is_continuation_sample() const {
     return ContinuationSampleBit::decode(state_);
   }
@@ -338,6 +354,8 @@
     kTruncatedTraceBit = 5,
     kClassAllocationSampleBit = 6,
     kContinuationSampleBit = 7,
+    kThreadTaskBit = 8,  // 4 bits.
+    kNextFreeBit = 12,
   };
   class HeadSampleBit : public BitField<uword, bool, kHeadSampleBit, 1> {};
   class LeafFrameIsDart :
@@ -352,6 +370,8 @@
       : public BitField<uword, bool, kClassAllocationSampleBit, 1> {};
   class ContinuationSampleBit
       : public BitField<uword, bool, kContinuationSampleBit, 1> {};
+  class ThreadTaskBit
+      : public BitField<uword, Thread::TaskKind, kThreadTaskBit, 4> {};
 
   int64_t timestamp_;
   ThreadId tid_;
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 3de17c8..c0ac69d 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -5,6 +5,8 @@
 #include "vm/profiler_service.h"
 
 #include "vm/growable_array.h"
+#include "vm/hash_map.h"
+#include "vm/log.h"
 #include "vm/native_symbol.h"
 #include "vm/object.h"
 #include "vm/os.h"
@@ -16,8 +18,7 @@
 
 DECLARE_FLAG(int, max_profile_depth);
 DECLARE_FLAG(int, profile_period);
-
-DEFINE_FLAG(bool, trace_profiler, false, "Trace profiler.");
+DECLARE_FLAG(bool, show_invisible_frames);
 
 #ifndef PRODUCT
 
@@ -89,6 +90,23 @@
 };
 
 
+ProfileFunctionSourcePosition::ProfileFunctionSourcePosition(
+    TokenPosition token_pos)
+    : token_pos_(token_pos),
+      exclusive_ticks_(0),
+      inclusive_ticks_(0) {
+}
+
+
+void ProfileFunctionSourcePosition::Tick(bool exclusive) {
+  if (exclusive) {
+    exclusive_ticks_++;
+  } else {
+    inclusive_ticks_++;
+  }
+}
+
+
 ProfileFunction::ProfileFunction(Kind kind,
                   const char* name,
                   const Function& function,
@@ -98,6 +116,7 @@
       function_(Function::ZoneHandle(function.raw())),
       table_index_(table_index),
       profile_codes_(0),
+      source_position_ticks_(0),
       exclusive_ticks_(0),
       inclusive_ticks_(0),
       inclusive_serial_(-1) {
@@ -117,9 +136,22 @@
   return func_name.ToCString();
 }
 
-void ProfileFunction::Tick(bool exclusive, intptr_t inclusive_serial) {
+
+bool ProfileFunction::is_visible() const {
+  if (function_.IsNull()) {
+    // Some synthetic function.
+    return true;
+  }
+  return FLAG_show_invisible_frames || function_.is_visible();
+}
+
+
+void ProfileFunction::Tick(bool exclusive,
+                           intptr_t inclusive_serial,
+                           TokenPosition token_position) {
   if (exclusive) {
     exclusive_ticks_++;
+    TickSourcePosition(token_position, exclusive);
   }
   // Fall through and tick inclusive count too.
   if (inclusive_serial_ == inclusive_serial) {
@@ -128,6 +160,44 @@
   }
   inclusive_serial_ = inclusive_serial;
   inclusive_ticks_++;
+  TickSourcePosition(token_position, false);
+}
+
+
+void ProfileFunction::TickSourcePosition(TokenPosition token_position,
+                                         bool exclusive) {
+  intptr_t i = 0;
+  for (; i < source_position_ticks_.length(); i++) {
+    ProfileFunctionSourcePosition& position = source_position_ticks_[i];
+    if (position.token_pos().value() == token_position.value()) {
+      if (FLAG_trace_profiler_verbose) {
+        OS::Print("Ticking source position %s %s\n",
+                  exclusive ? "exclusive" : "inclusive",
+                  token_position.ToCString());
+      }
+      // Found existing position, tick it.
+      position.Tick(exclusive);
+      return;
+    }
+    if (position.token_pos().value() > token_position.value()) {
+      break;
+    }
+  }
+
+  // Add new one, sorted by token position value.
+  ProfileFunctionSourcePosition pfsp(token_position);
+  if (FLAG_trace_profiler_verbose) {
+    OS::Print("Ticking source position %s %s\n",
+              exclusive ? "exclusive" : "inclusive",
+              token_position.ToCString());
+  }
+  pfsp.Tick(exclusive);
+
+  if (i < source_position_ticks_.length()) {
+    source_position_ticks_.InsertAt(i, pfsp);
+  } else {
+    source_position_ticks_.Add(pfsp);
+  }
 }
 
 
@@ -189,6 +259,18 @@
 }
 
 
+bool ProfileFunction::GetSinglePosition(ProfileFunctionSourcePosition* pfsp) {
+  if (pfsp == NULL) {
+    return false;
+  }
+  if (source_position_ticks_.length() != 1) {
+    return false;
+  }
+  *pfsp = source_position_ticks_[0];
+  return true;
+}
+
+
 ProfileCodeAddress::ProfileCodeAddress(uword pc)
     : pc_(pc),
       exclusive_ticks_(0),
@@ -442,8 +524,8 @@
  public:
   ProfileFunctionTable()
       : null_function_(Function::ZoneHandle()),
-        table_(8),
-        unknown_function_(NULL) {
+        unknown_function_(NULL),
+        table_(8) {
     unknown_function_ = Add(ProfileFunction::kUnknownFunction,
                             "<unknown Dart function>");
   }
@@ -457,15 +539,9 @@
     return Add(function);
   }
 
-  intptr_t LookupIndex(const Function& function) {
+  ProfileFunction* Lookup(const Function& function) {
     ASSERT(!function.IsNull());
-    for (intptr_t i = 0; i < table_.length(); i++) {
-      ProfileFunction* profile_function = table_[i];
-      if (profile_function->function() == function.raw()) {
-        return i;
-      }
-    }
-    return -1;
+    return function_hash_.Lookup(&function);
   }
 
   ProfileFunction* GetUnknown() {
@@ -522,21 +598,37 @@
                             function,
                             table_.length());
     table_.Add(profile_function);
+    function_hash_.Insert(profile_function);
     return profile_function;
   }
 
-  ProfileFunction* Lookup(const Function& function) {
-    ASSERT(!function.IsNull());
-    intptr_t index = LookupIndex(function);
-    if (index == -1) {
-      return NULL;
+  // Needed for DirectChainedHashMap.
+  struct ProfileFunctionTableTrait {
+    typedef ProfileFunction* Value;
+    typedef const Function* Key;
+    typedef ProfileFunction* Pair;
+
+    static Key KeyOf(Pair kv) {
+      return kv->function();
     }
-    return table_[index];
-  }
+
+    static Value ValueOf(Pair kv) {
+      return kv;
+    }
+
+    static inline intptr_t Hashcode(Key key) {
+      return key->Hash();
+    }
+
+    static inline bool IsKeyEqual(Pair kv, Key key) {
+      return kv->function()->raw() == key->raw();
+    }
+  };
 
   const Function& null_function_;
-  ZoneGrowableArray<ProfileFunction*> table_;
   ProfileFunction* unknown_function_;
+  ZoneGrowableArray<ProfileFunction*> table_;
+  DirectChainedHashMap<ProfileFunctionTableTrait> function_hash_;
 };
 
 
@@ -973,6 +1065,160 @@
 };
 
 
+class ProfileCodeInlinedFunctionsCache : public ValueObject {
+ public:
+  ProfileCodeInlinedFunctionsCache()
+      : cache_cursor_(0),
+        last_hit_(0) {
+    for (intptr_t i = 0; i < kCacheSize; i++) {
+      cache_[i].Reset();
+    }
+    cache_hit_ = 0;
+    cache_miss_ = 0;
+  }
+
+  ~ProfileCodeInlinedFunctionsCache() {
+    if (FLAG_trace_profiler) {
+      intptr_t total = cache_hit_ + cache_miss_;
+      OS::Print("LOOKUPS: %" Pd " HITS: %" Pd " MISSES: %" Pd "\n",
+                total,
+                cache_hit_,
+                cache_miss_);
+    }
+  }
+
+  void Get(uword pc,
+           const Code& code,
+           ProcessedSample* sample,
+           intptr_t frame_index,
+           // Outputs:
+           GrowableArray<Function*>** inlined_functions,
+           GrowableArray<TokenPosition>** inlined_token_positions,
+           TokenPosition* token_position) {
+    const intptr_t offset = OffsetForPC(pc, code, sample, frame_index);
+    if (FindInCache(pc,
+                    offset,
+                    inlined_functions,
+                    inlined_token_positions,
+                    token_position)) {
+      // Found in cache.
+      return;
+    }
+    Add(pc, code, sample, frame_index,
+        inlined_functions, inlined_token_positions, token_position);
+  }
+
+ private:
+  bool FindInCache(uword pc,
+                   intptr_t offset,
+                   GrowableArray<Function*>** inlined_functions,
+                   GrowableArray<TokenPosition>** inlined_token_positions,
+                   TokenPosition* token_position) {
+    // Simple linear scan.
+    for (intptr_t i = 0; i < kCacheSize; i++) {
+      intptr_t index = (last_hit_ + i) % kCacheSize;
+      if ((cache_[index].pc == pc) && (cache_[index].offset == offset)) {
+        // Hit.
+        if (cache_[index].inlined_functions.length() == 0) {
+          *inlined_functions = NULL;
+          *inlined_token_positions = NULL;
+        } else {
+          *inlined_functions = &cache_[index].inlined_functions;
+          *inlined_token_positions = &cache_[index].inlined_token_positions;
+        }
+        *token_position = cache_[index].token_position;
+        cache_hit_++;
+        last_hit_ = index;
+        return true;
+      }
+    }
+    cache_miss_++;
+    return false;
+  }
+
+  // Add to cache and fill in outputs.
+  void Add(uword pc,
+           const Code& code,
+           ProcessedSample* sample,
+           intptr_t frame_index,
+           // Outputs:
+           GrowableArray<Function*>** inlined_functions,
+           GrowableArray<TokenPosition>** inlined_token_positions,
+           TokenPosition* token_position) {
+    const intptr_t offset = OffsetForPC(pc, code, sample, frame_index);
+    CacheEntry* cache_entry = &cache_[NextFreeIndex()];
+    cache_entry->pc = pc;
+    cache_entry->offset = offset;
+    code.GetInlinedFunctionsAt(offset,
+                               &(cache_entry->inlined_functions),
+                               &(cache_entry->inlined_token_positions));
+    cache_entry->token_position = code.GetTokenPositionAt(offset);
+    *token_position = (cache_entry->token_position);
+    if (cache_entry->inlined_functions.length() == 0) {
+      *inlined_functions = NULL;
+      *inlined_token_positions = NULL;
+      return;
+    }
+    // The inlined token position table does not include the token position
+    // of the final call. Insert it at the beginning because the table.
+    // is reversed.
+    cache_entry->inlined_token_positions.InsertAt(
+        0,
+        cache_entry->token_position);
+
+    // Write outputs.
+    *inlined_functions = &(cache_entry->inlined_functions);
+    *inlined_token_positions = &(cache_entry->inlined_token_positions);
+  }
+
+  intptr_t NextFreeIndex() {
+    cache_cursor_ = (cache_cursor_ + 1) % kCacheSize;
+    return cache_cursor_;
+  }
+
+  intptr_t OffsetForPC(uword pc,
+                       const Code& code,
+                       ProcessedSample* sample,
+                       intptr_t frame_index) {
+    intptr_t offset = pc - code.EntryPoint();
+    if (frame_index != 0) {
+      // The PC of frames below the top frame is a call's return address,
+      // which can belong to a different inlining interval than the call.
+      offset--;
+    } else if (sample->IsAllocationSample()) {
+      // Allocation samples skip the top frame, so the top frame's pc is
+      // also a call's return address.
+      offset--;
+    } else if (!sample->first_frame_executing()) {
+      // If the first frame wasn't executing code (i.e. we started to collect
+      // the stack trace at an exit frame), the top frame's pc is also a
+      // call's return address.
+      offset--;
+    }
+    return offset;
+  }
+
+  struct CacheEntry {
+    void Reset() {
+      pc = 0;
+      offset = 0;
+    }
+    uword pc;
+    intptr_t offset;
+    GrowableArray<Function*> inlined_functions;
+    GrowableArray<TokenPosition> inlined_token_positions;
+    TokenPosition token_position;
+  };
+
+  static const intptr_t kCacheSize = 128;
+  intptr_t cache_cursor_;
+  intptr_t last_hit_;
+  CacheEntry cache_[kCacheSize];
+  intptr_t cache_miss_;
+  intptr_t cache_hit_;
+};
+
+
 class ProfileBuilder : public ValueObject {
  public:
   enum ProfileInfoKind {
@@ -1387,17 +1633,28 @@
     const intptr_t code_index = profile_code->code_table_index();
     ASSERT(profile_code != NULL);
     const Code& code = Code::ZoneHandle(profile_code->code());
-    GrowableArray<Function*> inlined_functions;
+    GrowableArray<Function*>* inlined_functions = NULL;
+    GrowableArray<TokenPosition>* inlined_token_positions = NULL;
+    TokenPosition token_position = TokenPosition::kNoSource;
     if (!code.IsNull()) {
-      intptr_t offset = pc - code.EntryPoint();
-      if (frame_index != 0) {
-        // The PC of frames below the top frame is a call's return address,
-        // which can belong to a different inlining interval than the call.
-        offset--;
+      inlined_functions_cache_.Get(pc, code, sample, frame_index,
+                                   &inlined_functions,
+                                   &inlined_token_positions,
+                                   &token_position);
+      if (FLAG_trace_profiler_verbose) {
+        for (intptr_t i = 0; i < inlined_functions->length(); i++) {
+          const String& name =
+              String::Handle((*inlined_functions)[i]->QualifiedScrubbedName());
+          THR_Print("InlinedFunction[%" Pd "] = {%s, %s}\n",
+                    i,
+                    name.ToCString(),
+                    (*inlined_token_positions)[i].ToCString());
+        }
       }
-      code.GetInlinedFunctionsAt(offset, &inlined_functions);
     }
-    if (code.IsNull() || (inlined_functions.length() == 0)) {
+    if (code.IsNull() ||
+        (inlined_functions == NULL) ||
+        (inlined_functions->length() == 0)) {
       // No inlined functions.
       if (inclusive_tree_) {
         current = AppendKind(code, current);
@@ -1407,6 +1664,7 @@
                                 sample,
                                 frame_index,
                                 function,
+                                token_position,
                                 code_index);
       if (!inclusive_tree_) {
         current = AppendKind(code, current);
@@ -1417,11 +1675,12 @@
     ASSERT(code.is_optimized());
 
     if (inclusive_tree_) {
-      for (intptr_t i = inlined_functions.length() - 1; i >= 0; i--) {
-        Function* inlined_function = inlined_functions[i];
+      for (intptr_t i = inlined_functions->length() - 1; i >= 0; i--) {
+        Function* inlined_function = (*inlined_functions)[i];
         ASSERT(inlined_function != NULL);
         ASSERT(!inlined_function->IsNull());
-        const bool inliner = i == (inlined_functions.length() - 1);
+        TokenPosition inlined_token_position = (*inlined_token_positions)[i];
+        const bool inliner = i == (inlined_functions->length() - 1);
         if (inliner) {
           current = AppendKind(code, current);
         }
@@ -1430,6 +1689,7 @@
                                          sample,
                                          frame_index,
                                          inlined_function,
+                                         inlined_token_position,
                                          code_index);
         if (inliner) {
           current = AppendKind(kInlineStart, current);
@@ -1439,11 +1699,12 @@
     } else {
       // Append the inlined children.
       current = AppendKind(kInlineFinish, current);
-      for (intptr_t i = 0; i < inlined_functions.length(); i++) {
-        Function* inlined_function = inlined_functions[i];
+      for (intptr_t i = 0; i < inlined_functions->length(); i++) {
+        Function* inlined_function = (*inlined_functions)[i];
         ASSERT(inlined_function != NULL);
         ASSERT(!inlined_function->IsNull());
-        const bool inliner = i == (inlined_functions.length() - 1);
+        TokenPosition inlined_token_position = (*inlined_token_positions)[i];
+        const bool inliner = i == (inlined_functions->length() - 1);
         if (inliner) {
           current = AppendKind(kInlineStart, current);
         }
@@ -1452,6 +1713,7 @@
                                          sample,
                                          frame_index + i,
                                          inlined_function,
+                                         inlined_token_position,
                                          code_index);
         if (inliner) {
           current = AppendKind(code, current);
@@ -1468,6 +1730,7 @@
       ProcessedSample* sample,
       intptr_t frame_index,
       Function* inlined_function,
+      TokenPosition inlined_token_position,
       intptr_t code_index) {
     ProfileFunctionTable* function_table = profile_->functions_;
     ProfileFunction* function = function_table->LookupOrAdd(*inlined_function);
@@ -1477,6 +1740,7 @@
                            sample,
                            frame_index,
                            function,
+                           inlined_token_position,
                            code_index);
   }
 
@@ -1494,9 +1758,23 @@
                                            ProcessedSample* sample,
                                            intptr_t frame_index,
                                            ProfileFunction* function,
+                                           TokenPosition token_position,
                                            intptr_t code_index) {
+    if (!function->is_visible()) {
+      return current;
+    }
     if (tick_functions_) {
-      function->Tick(IsExecutingFrame(sample, frame_index), sample_index);
+      if (FLAG_trace_profiler_verbose) {
+        THR_Print("S[%" Pd "]F[%" Pd "] %s %s 0x%" Px "\n",
+                  sample_index,
+                  frame_index,
+                  function->Name(),
+                  token_position.ToCString(),
+                  sample->At(frame_index));
+      }
+      function->Tick(IsExecutingFrame(sample, frame_index),
+                     sample_index,
+                     token_position);
     }
     function->AddProfileCode(code_index);
     current = current->GetChild(function->table_index());
@@ -1974,7 +2252,7 @@
   const Function& null_function_;
   bool tick_functions_;
   bool inclusive_tree_;
-
+  ProfileCodeInlinedFunctionsCache inlined_functions_cache_;
   ProcessedSampleBuffer* samples_;
   ProfileInfoKind info_kind_;
 };  // ProfileBuilder.
@@ -2008,6 +2286,10 @@
 }
 
 
+intptr_t Profile::NumFunctions() const {
+  return functions_->length();
+}
+
 ProfileFunction* Profile::GetFunction(intptr_t index) {
   ASSERT(functions_ != NULL);
   return functions_->At(index);
@@ -2124,6 +2406,11 @@
 }
 
 
+ProfileFunction* Profile::FindFunction(const Function& function) {
+  return functions_->Lookup(function);
+}
+
+
 void Profile::PrintProfileJSON(JSONStream* stream) {
   ScopeTimer sw("Profile::PrintProfileJSON", FLAG_trace_profiler);
   JSONObject obj(stream);
@@ -2244,6 +2531,50 @@
 }
 
 
+const char* ProfileTrieWalker::CurrentToken() {
+  if (current_ == NULL) {
+    return NULL;
+  }
+  if (code_trie_) {
+    return NULL;
+  }
+  ProfileFunction* func = profile_->GetFunction(current_->table_index());
+  const Function& function = *(func->function());
+  if (function.IsNull()) {
+    // No function.
+    return NULL;
+  }
+  const Script& script = Script::Handle(function.script());
+  if (script.IsNull()) {
+    // No script.
+    return NULL;
+  }
+  const TokenStream& token_stream = TokenStream::Handle(script.tokens());
+  if (token_stream.IsNull()) {
+    // No token position.
+    return NULL;
+  }
+  ProfileFunctionSourcePosition pfsp(TokenPosition::kNoSource);
+  if (!func->GetSinglePosition(&pfsp)) {
+    // Not exactly one source position.
+    return NULL;
+  }
+  TokenPosition token_pos = pfsp.token_pos();
+  if (!token_pos.IsReal() && !token_pos.IsSynthetic()) {
+    // Not a location in a script.
+    return NULL;
+  }
+  if (token_pos.IsSynthetic()) {
+    token_pos = token_pos.FromSynthetic();
+  }
+  TokenStream::Iterator iterator(token_stream, token_pos);
+  const String& str = String::Handle(iterator.CurrentLiteral());
+  if (str.IsNull()) {
+    return NULL;
+  }
+  return str.ToCString();
+}
+
 bool ProfileTrieWalker::Down() {
   if ((current_ == NULL) || (current_->NumChildren() == 0)) {
     return false;
@@ -2310,9 +2641,11 @@
 class NoAllocationSampleFilter : public SampleFilter {
  public:
   NoAllocationSampleFilter(Isolate* isolate,
+                           intptr_t thread_task_mask,
                            int64_t time_origin_micros,
                            int64_t time_extent_micros)
       : SampleFilter(isolate,
+                     thread_task_mask,
                      time_origin_micros,
                      time_extent_micros) {
   }
@@ -2331,6 +2664,7 @@
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
   NoAllocationSampleFilter filter(isolate,
+                                  Thread::kMutatorTask,
                                   time_origin_micros,
                                   time_extent_micros);
   const bool as_timeline = false;
@@ -2342,9 +2676,11 @@
  public:
   ClassAllocationSampleFilter(Isolate* isolate,
                               const Class& cls,
+                              intptr_t thread_task_mask,
                               int64_t time_origin_micros,
                               int64_t time_extent_micros)
       : SampleFilter(isolate,
+                     thread_task_mask,
                      time_origin_micros,
                      time_extent_micros),
         cls_(Class::Handle(cls.raw())) {
@@ -2370,6 +2706,7 @@
   Isolate* isolate = thread->isolate();
   ClassAllocationSampleFilter filter(isolate,
                                      cls,
+                                     Thread::kMutatorTask,
                                      time_origin_micros,
                                      time_extent_micros);
   const bool as_timeline = false;
@@ -2383,7 +2720,12 @@
                                         int64_t time_extent_micros) {
   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,
+                                  thread_task_mask,
                                   time_origin_micros,
                                   time_extent_micros);
   const bool as_timeline = true;
diff --git a/runtime/vm/profiler_service.h b/runtime/vm/profiler_service.h
index 15f3f7d..0e0e6d3 100644
--- a/runtime/vm/profiler_service.h
+++ b/runtime/vm/profiler_service.h
@@ -12,6 +12,7 @@
 #include "vm/object.h"
 #include "vm/tags.h"
 #include "vm/thread_interrupter.h"
+#include "vm/token_position.h"
 
 // CPU Profile model and service protocol bits.
 // NOTE: For sampling and stack walking related code, see profiler.h.
@@ -30,6 +31,25 @@
 class SampleFilter;
 class ProcessedSampleBuffer;
 
+class ProfileFunctionSourcePosition {
+ public:
+  explicit ProfileFunctionSourcePosition(TokenPosition token_pos);
+
+  void Tick(bool exclusive);
+
+  TokenPosition token_pos() const { return token_pos_; }
+  intptr_t exclusive_ticks() const { return exclusive_ticks_; }
+  intptr_t inclusive_ticks() const { return inclusive_ticks_; }
+
+ private:
+  TokenPosition token_pos_;
+  intptr_t exclusive_ticks_;
+  intptr_t inclusive_ticks_;
+
+  DISALLOW_ALLOCATION();
+};
+
+
 // Profile data related to a |Function|.
 class ProfileFunction : public ZoneAllocated {
  public:
@@ -53,10 +73,12 @@
 
   const char* Name() const;
 
-  RawFunction* function() const {
-    return function_.raw();
+  const Function* function() const {
+    return &function_;
   }
 
+  bool is_visible() const;
+
   intptr_t table_index() const {
     return table_index_;
   }
@@ -72,18 +94,34 @@
     inclusive_ticks_++;
   }
 
-  void Tick(bool exclusive, intptr_t inclusive_serial);
+  void Tick(bool exclusive,
+            intptr_t inclusive_serial,
+            TokenPosition token_position);
 
   static const char* KindToCString(Kind kind);
 
   void PrintToJSONArray(JSONArray* functions);
 
+  // Returns true if the call was successful and |pfsp| is set.
+  bool GetSinglePosition(ProfileFunctionSourcePosition* pfsp);
+
+  void TickSourcePosition(TokenPosition token_position, bool exclusive);
+
+  intptr_t NumSourcePositions() const {
+    return source_position_ticks_.length();
+  }
+
+  const ProfileFunctionSourcePosition& GetSourcePosition(intptr_t i) const {
+    return source_position_ticks_.At(i);
+  }
+
  private:
   const Kind kind_;
   const char* name_;
   const Function& function_;
   const intptr_t table_index_;
   ZoneGrowableArray<intptr_t> profile_codes_;
+  ZoneGrowableArray<ProfileFunctionSourcePosition> source_position_ticks_;
 
   intptr_t exclusive_ticks_;
   intptr_t inclusive_ticks_;
@@ -319,6 +357,8 @@
   }
   intptr_t sample_count() const { return sample_count_; }
 
+  intptr_t NumFunctions() const;
+
   ProfileFunction* GetFunction(intptr_t index);
   ProfileCode* GetCode(intptr_t index);
   ProfileTrieNode* GetTrieRoot(TrieKind trie_kind);
@@ -326,6 +366,8 @@
   void PrintProfileJSON(JSONStream* stream);
   void PrintTimelineJSON(JSONStream* stream);
 
+  ProfileFunction* FindFunction(const Function& function);
+
  private:
   void PrintHeaderJSON(JSONObject* obj);
   void PrintTimelineFrameJSON(JSONObject* frames,
@@ -376,6 +418,12 @@
   // Return the number siblings (including yourself).
   intptr_t SiblingCount();
 
+  // If the following conditions are met returns the current token:
+  // 1) This is a function trie.
+  // 2) There is only one token position for a given function.
+  // Will return NULL otherwise.
+  const char* CurrentToken();
+
   bool Down();
   bool NextSibling();
 
diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
index f9ae241..1ecac9f 100644
--- a/runtime/vm/profiler_test.cc
+++ b/runtime/vm/profiler_test.cc
@@ -9,6 +9,7 @@
 #include "vm/globals.h"
 #include "vm/profiler.h"
 #include "vm/profiler_service.h"
+#include "vm/source_report.h"
 #include "vm/unit_test.h"
 
 namespace dart {
@@ -17,6 +18,26 @@
 
 DECLARE_FLAG(bool, profile_vm);
 DECLARE_FLAG(int, max_profile_depth);
+DECLARE_FLAG(bool, enable_inlining_annotations);
+DECLARE_FLAG(int, optimization_counter_threshold);
+
+template<typename T>
+class SetFlagScope : public ValueObject {
+ public:
+  SetFlagScope(T* flag, T value)
+      : flag_(flag),
+        original_value_(*flag) {
+    *flag_ = value;
+  }
+
+  ~SetFlagScope() {
+    *flag_ = original_value_;
+  }
+
+ private:
+  T* flag_;
+  T original_value_;
+};
 
 // Some tests are written assuming native stack trace profiling is disabled.
 class DisableNativeProfileScope : public ValueObject {
@@ -159,15 +180,16 @@
 
 static RawClass* GetClass(const Library& lib, const char* name) {
   const Class& cls = Class::Handle(
-      lib.LookupClassAllowPrivate(String::Handle(Symbols::New(name))));
+      lib.LookupClassAllowPrivate(String::Handle(Symbols::New(Thread::Current(),
+                                                              name))));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
   return cls.raw();
 }
 
 
 static RawFunction* GetFunction(const Library& lib, const char* name) {
-  const Function& func = Function::Handle(
-      lib.LookupFunctionAllowPrivate(String::Handle(Symbols::New(name))));
+  const Function& func = Function::Handle(lib.LookupFunctionAllowPrivate(
+      String::Handle(Symbols::New(Thread::Current(), name))));
   EXPECT(!func.IsNull());  // No ambiguity error expected.
   return func.raw();
 }
@@ -180,6 +202,7 @@
                    int64_t time_origin_micros = -1,
                    int64_t time_extent_micros = -1)
       : SampleFilter(isolate,
+                     Thread::kMutatorTask,
                      time_origin_micros,
                      time_extent_micros),
         cid_(cid),
@@ -937,7 +960,7 @@
       Library::Handle(isolate->object_store()->typed_data_library());
 
   const Class& float32_list_class =
-      Class::Handle(GetClass(typed_data_library, "_Float32Array"));
+      Class::Handle(GetClass(typed_data_library, "Float32List"));
   EXPECT(!float32_list_class.IsNull());
 
   Dart_Handle result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
@@ -969,10 +992,6 @@
 
     walker.Reset(Profile::kExclusiveCode);
     EXPECT(walker.Down());
-    EXPECT_STREQ("_Float32Array._new", walker.CurrentName());
-    EXPECT(walker.Down());
-    EXPECT_STREQ("_Float32Array._Float32Array", walker.CurrentName());
-    EXPECT(walker.Down());
     EXPECT_STREQ("Float32List.Float32List", walker.CurrentName());
     EXPECT(walker.Down());
     EXPECT_STREQ("foo", walker.CurrentName());
@@ -1091,6 +1110,7 @@
 
 TEST_CASE(Profiler_StringInterpolation) {
   DisableNativeProfileScope dnps;
+  DisableBackgroundCompilationScope dbcs;
   const char* kScript = "String foo(String a, String b) => '$a | $b';";
   Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
   EXPECT_VALID(lib);
@@ -1658,6 +1678,830 @@
   }
 }
 
+
+TEST_CASE(Profiler_BasicSourcePosition) {
+  DisableNativeProfileScope dnps;
+  DisableBackgroundCompilationScope dbcs;
+  const char* kScript =
+      "const AlwaysInline = 'AlwaysInline';\n"
+      "const NeverInline = 'NeverInline';\n"
+      "class A {\n"
+      "  var a;\n"
+      "  var b;\n"
+      "  @NeverInline A() { }\n"
+      "}\n"
+      "class B {\n"
+      "  @AlwaysInline\n"
+      "  static boo() {\n"
+      "    return new A();\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  B.boo();\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+
+  const Class& class_a = Class::Handle(GetClass(root_library, "A"));
+  EXPECT(!class_a.IsNull());
+
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  // Turn on allocation tracing for A.
+  class_a.SetTraceAllocation(true);
+
+  // Allocate one time.
+  result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_a.id());
+    profile.Build(thread, &filter, Profile::kNoTags);
+    // We should have one allocation samples.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    // Exclusive function: B.boo -> main.
+    walker.Reset(Profile::kExclusiveFunction);
+    // Move down from the root.
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.boo", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(1, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("A", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("main", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("boo", walker.CurrentToken());
+    EXPECT(!walker.Down());
+  }
+}
+
+
+TEST_CASE(Profiler_BasicSourcePositionOptimized) {
+  DisableNativeProfileScope dnps;
+  DisableBackgroundCompilationScope dbcs;
+  // We use the AlwaysInline and NeverInline annotations in this test.
+  SetFlagScope<bool> sfs(&FLAG_enable_inlining_annotations, true);
+  // Optimize quickly.
+  SetFlagScope<int> sfs2(&FLAG_optimization_counter_threshold, 5);
+  const char* kScript =
+      "const AlwaysInline = 'AlwaysInline';\n"
+      "const NeverInline = 'NeverInline';\n"
+      "class A {\n"
+      "  var a;\n"
+      "  var b;\n"
+      "  @NeverInline A() { }\n"
+      "}\n"
+      "class B {\n"
+      "  @AlwaysInline\n"
+      "  static boo() {\n"
+      "    return new A();\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  B.boo();\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+
+  const Class& class_a = Class::Handle(GetClass(root_library, "A"));
+  EXPECT(!class_a.IsNull());
+
+  const Function& main = Function::Handle(GetFunction(root_library, "main"));
+  EXPECT(!main.IsNull());
+
+  // Warm up function.
+  while (true) {
+    Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+    EXPECT_VALID(result);
+    const Code& code = Code::Handle(main.CurrentCode());
+    if (code.is_optimized()) {
+      // Warmed up.
+      break;
+    }
+  }
+
+  // Turn on allocation tracing for A.
+  class_a.SetTraceAllocation(true);
+
+  // Allocate one time.
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  // Still optimized.
+  const Code& code = Code::Handle(main.CurrentCode());
+  EXPECT(code.is_optimized());
+
+  {
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_a.id());
+    profile.Build(thread, &filter, Profile::kNoTags);
+    // We should have one allocation samples.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    // Exclusive function: B.boo -> main.
+    walker.Reset(Profile::kExclusiveFunction);
+    // Move down from the root.
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.boo", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(1, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("A", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("main", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("boo", walker.CurrentToken());
+    EXPECT(!walker.Down());
+  }
+}
+
+
+TEST_CASE(Profiler_SourcePosition) {
+  DisableNativeProfileScope dnps;
+  DisableBackgroundCompilationScope dbcs;
+  const char* kScript =
+      "const AlwaysInline = 'AlwaysInline';\n"
+      "const NeverInline = 'NeverInline';\n"
+      "class A {\n"
+      "  var a;\n"
+      "  var b;\n"
+      "  @NeverInline A() { }\n"
+      "}\n"
+      "class B {\n"
+      "  @NeverInline\n"
+      "  static oats() {\n"
+      "    return boo();\n"
+      "  }\n"
+      "  @AlwaysInline\n"
+      "  static boo() {\n"
+      "    return new A();\n"
+      "  }\n"
+      "}\n"
+      "class C {\n"
+      "  @NeverInline bacon() {\n"
+      "    return fox();\n"
+      "  }\n"
+      "  @AlwaysInline fox() {\n"
+      "    return B.oats();\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  new C()..bacon();\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+
+  const Class& class_a = Class::Handle(GetClass(root_library, "A"));
+  EXPECT(!class_a.IsNull());
+
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  // Turn on allocation tracing for A.
+  class_a.SetTraceAllocation(true);
+
+  // Allocate one time.
+  result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_a.id());
+    profile.Build(thread, &filter, Profile::kNoTags);
+    // We should have one allocation samples.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    // Exclusive function: B.boo -> main.
+    walker.Reset(Profile::kExclusiveFunction);
+    // Move down from the root.
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.boo", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(1, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("A", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.oats", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("boo", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.fox", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("oats", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.bacon", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("fox", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("main", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("bacon", walker.CurrentToken());
+    EXPECT(!walker.Down());
+  }
+}
+
+
+TEST_CASE(Profiler_SourcePositionOptimized) {
+  DisableNativeProfileScope dnps;
+  DisableBackgroundCompilationScope dbcs;
+  // We use the AlwaysInline and NeverInline annotations in this test.
+  SetFlagScope<bool> sfs(&FLAG_enable_inlining_annotations, true);
+  // Optimize quickly.
+  SetFlagScope<int> sfs2(&FLAG_optimization_counter_threshold, 5);
+
+  const char* kScript =
+      "const AlwaysInline = 'AlwaysInline';\n"
+      "const NeverInline = 'NeverInline';\n"
+      "class A {\n"
+      "  var a;\n"
+      "  var b;\n"
+      "  @NeverInline A() { }\n"
+      "}\n"
+      "class B {\n"
+      "  @NeverInline\n"
+      "  static oats() {\n"
+      "    return boo();\n"
+      "  }\n"
+      "  @AlwaysInline\n"
+      "  static boo() {\n"
+      "    return new A();\n"
+      "  }\n"
+      "}\n"
+      "class C {\n"
+      "  @NeverInline bacon() {\n"
+      "    return fox();\n"
+      "  }\n"
+      "  @AlwaysInline fox() {\n"
+      "    return B.oats();\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  new C()..bacon();\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+
+  const Class& class_a = Class::Handle(GetClass(root_library, "A"));
+  EXPECT(!class_a.IsNull());
+
+  const Function& main = Function::Handle(GetFunction(root_library, "main"));
+  EXPECT(!main.IsNull());
+
+  // Warm up function.
+  while (true) {
+    Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+    EXPECT_VALID(result);
+    const Code& code = Code::Handle(main.CurrentCode());
+    if (code.is_optimized()) {
+      // Warmed up.
+      break;
+    }
+  }
+
+  // Turn on allocation tracing for A.
+  class_a.SetTraceAllocation(true);
+
+  // Allocate one time.
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  // Still optimized.
+  const Code& code = Code::Handle(main.CurrentCode());
+  EXPECT(code.is_optimized());
+
+  {
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_a.id());
+    profile.Build(thread, &filter, Profile::kNoTags);
+    // We should have one allocation samples.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    // Exclusive function: B.boo -> main.
+    walker.Reset(Profile::kExclusiveFunction);
+    // Move down from the root.
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.boo", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(1, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("A", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.oats", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("boo", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.fox", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("oats", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.bacon", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("fox", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("main", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("bacon", walker.CurrentToken());
+    EXPECT(!walker.Down());
+  }
+}
+
+
+TEST_CASE(Profiler_BinaryOperatorSourcePosition) {
+  DisableNativeProfileScope dnps;
+  DisableBackgroundCompilationScope dbcs;
+  const char* kScript =
+      "const AlwaysInline = 'AlwaysInline';\n"
+      "const NeverInline = 'NeverInline';\n"
+      "class A {\n"
+      "  var a;\n"
+      "  var b;\n"
+      "  @NeverInline A() { }\n"
+      "}\n"
+      "class B {\n"
+      "  @NeverInline\n"
+      "  static oats() {\n"
+      "    return boo();\n"
+      "  }\n"
+      "  @AlwaysInline\n"
+      "  static boo() {\n"
+      "    return new A();\n"
+      "  }\n"
+      "}\n"
+      "class C {\n"
+      "  @NeverInline bacon() {\n"
+      "    return this + this;\n"
+      "  }\n"
+      "  @AlwaysInline operator+(C other) {\n"
+      "    return fox();\n"
+      "  }\n"
+      "  @AlwaysInline fox() {\n"
+      "    return B.oats();\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  new C()..bacon();\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+
+  const Class& class_a = Class::Handle(GetClass(root_library, "A"));
+  EXPECT(!class_a.IsNull());
+
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  // Turn on allocation tracing for A.
+  class_a.SetTraceAllocation(true);
+
+  // Allocate one time.
+  result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_a.id());
+    profile.Build(thread, &filter, Profile::kNoTags);
+    // We should have one allocation samples.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    // Exclusive function: B.boo -> main.
+    walker.Reset(Profile::kExclusiveFunction);
+    // Move down from the root.
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.boo", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(1, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("A", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.oats", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("boo", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.fox", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("oats", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.+", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("fox", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.bacon", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("+", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("main", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("bacon", walker.CurrentToken());
+    EXPECT(!walker.Down());
+  }
+}
+
+
+TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) {
+  DisableNativeProfileScope dnps;
+  DisableBackgroundCompilationScope dbcs;
+  // We use the AlwaysInline and NeverInline annotations in this test.
+  SetFlagScope<bool> sfs(&FLAG_enable_inlining_annotations, true);
+  // Optimize quickly.
+  SetFlagScope<int> sfs2(&FLAG_optimization_counter_threshold, 5);
+
+  const char* kScript =
+      "const AlwaysInline = 'AlwaysInline';\n"
+      "const NeverInline = 'NeverInline';\n"
+      "class A {\n"
+      "  var a;\n"
+      "  var b;\n"
+      "  @NeverInline A() { }\n"
+      "}\n"
+      "class B {\n"
+      "  @NeverInline\n"
+      "  static oats() {\n"
+      "    return boo();\n"
+      "  }\n"
+      "  @AlwaysInline\n"
+      "  static boo() {\n"
+      "    return new A();\n"
+      "  }\n"
+      "}\n"
+      "class C {\n"
+      "  @NeverInline bacon() {\n"
+      "    return this + this;\n"
+      "  }\n"
+      "  @AlwaysInline operator+(C other) {\n"
+      "    return fox();\n"
+      "  }\n"
+      "  @AlwaysInline fox() {\n"
+      "    return B.oats();\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  new C()..bacon();\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+
+  const Class& class_a = Class::Handle(GetClass(root_library, "A"));
+  EXPECT(!class_a.IsNull());
+
+  const Function& main = Function::Handle(GetFunction(root_library, "main"));
+  EXPECT(!main.IsNull());
+
+  // Warm up function.
+  while (true) {
+    Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+    EXPECT_VALID(result);
+    const Code& code = Code::Handle(main.CurrentCode());
+    if (code.is_optimized()) {
+      // Warmed up.
+      break;
+    }
+  }
+
+  // Turn on allocation tracing for A.
+  class_a.SetTraceAllocation(true);
+
+  // Allocate one time.
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  // Still optimized.
+  const Code& code = Code::Handle(main.CurrentCode());
+  EXPECT(code.is_optimized());
+
+  {
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_a.id());
+    profile.Build(thread, &filter, Profile::kNoTags);
+    // We should have one allocation samples.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    // Exclusive function: B.boo -> main.
+    walker.Reset(Profile::kExclusiveFunction);
+    // Move down from the root.
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.boo", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(1, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("A", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.oats", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("boo", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.fox", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("oats", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.+", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("fox", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("C.bacon", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("+", walker.CurrentToken());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("main", walker.CurrentName());
+    EXPECT_EQ(1, walker.CurrentNodeTickCount());
+    EXPECT_EQ(1, walker.CurrentInclusiveTicks());
+    EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+    EXPECT_STREQ("bacon", walker.CurrentToken());
+    EXPECT(!walker.Down());
+  }
+}
+
+
+static void InsertFakeSample(SampleBuffer* sample_buffer,
+                             uword* pc_offsets) {
+  ASSERT(sample_buffer != NULL);
+  Isolate* isolate = Isolate::Current();
+  Sample* sample = sample_buffer->ReserveSample();
+  ASSERT(sample != NULL);
+  sample->Init(isolate,
+               OS::GetCurrentMonotonicMicros(),
+               OSThread::Current()->trace_id());
+  sample->set_thread_task(Thread::kMutatorTask);
+
+  intptr_t i = 0;
+  while (pc_offsets[i] != 0) {
+    // When we collect a real stack trace, all PCs collected aside from the
+    // executing one (i == 0) are actually return addresses. Return addresses
+    // are one byte beyond the call instruction that is executing. The profiler
+    // accounts for this and subtracts one from these addresses when querying
+    // inline and token position ranges. To be consistent with real stack
+    // traces, we add one byte to all PCs except the executing one.
+    // See OffsetForPC in profiler_service.cc for more context.
+    const intptr_t return_address_offset = i > 0 ? 1 : 0;
+    sample->SetAt(i, pc_offsets[i] + return_address_offset);
+    i++;
+  }
+  sample->SetAt(i, 0);
+}
+
+
+static uword FindPCForTokenPosition(const Code& code,
+                                    const CodeSourceMap& code_source_map,
+                                    TokenPosition tp) {
+  CodeSourceMap::Iterator it(code_source_map);
+
+  while (it.MoveNext()) {
+    if (it.TokenPos() == tp) {
+      return it.PcOffset() + code.EntryPoint();
+    }
+  }
+
+  return 0;
+}
+
+
+TEST_CASE(Profiler_GetSourceReport) {
+  const char* kScript =
+      "doWork(i) => i * i;\n"
+      "main() {\n"
+      "  var sum = 0;\n"
+      "  for (var i = 0; i < 100; i++) {\n"
+      "     sum += doWork(i);\n"
+      "  }\n"
+      "  return sum;\n"
+      "}\n";
+
+  // Token position of * in `i * i`.
+  const TokenPosition squarePosition = TokenPosition(6);
+
+  // Token position of the call to `doWork`.
+  const TokenPosition callPosition = TokenPosition(39);
+
+  DisableNativeProfileScope dnps;
+  // Disable profiling for this thread.
+  DisableThreadInterruptsScope dtis(Thread::Current());
+
+  DisableBackgroundCompilationScope dbcs;
+
+  SampleBuffer* sample_buffer = Profiler::sample_buffer();
+  EXPECT(sample_buffer != NULL);
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+
+  // Invoke main so that it gets compiled.
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    // Clear the profile for this isolate.
+    ClearProfileVisitor cpv(Isolate::Current());
+    sample_buffer->VisitSamples(&cpv);
+  }
+
+  // Query the code object for main and determine the PC at some token
+  // positions.
+  const Function& main = Function::Handle(GetFunction(root_library, "main"));
+  EXPECT(!main.IsNull());
+
+  const Function& do_work =
+      Function::Handle(GetFunction(root_library, "doWork"));
+  EXPECT(!do_work.IsNull());
+
+  const Script& script = Script::Handle(main.script());
+  EXPECT(!script.IsNull());
+
+  const Code& main_code = Code::Handle(main.CurrentCode());
+  EXPECT(!main_code.IsNull());
+
+  const Code& do_work_code = Code::Handle(do_work.CurrentCode());
+  EXPECT(!do_work_code.IsNull());
+
+  const CodeSourceMap& main_code_source_map =
+      CodeSourceMap::Handle(main_code.code_source_map());
+  EXPECT(!main_code_source_map.IsNull());
+
+  const CodeSourceMap& do_work_code_source_map =
+      CodeSourceMap::Handle(do_work_code.code_source_map());
+  EXPECT(!do_work_code_source_map.IsNull());
+
+  // Dump code source map.
+  CodeSourceMap::Dump(do_work_code_source_map, do_work_code, main);
+  CodeSourceMap::Dump(main_code_source_map, main_code, main);
+
+  // Look up some source token position's pc.
+  uword squarePositionPc =
+      FindPCForTokenPosition(do_work_code,
+                             do_work_code_source_map,
+                             squarePosition);
+  EXPECT(squarePositionPc != 0);
+
+  uword callPositionPc =
+      FindPCForTokenPosition(main_code, main_code_source_map, callPosition);
+  EXPECT(callPositionPc != 0);
+
+  // Look up some classifying token position's pc.
+  uword controlFlowPc =
+      FindPCForTokenPosition(do_work_code,
+                             do_work_code_source_map,
+                             TokenPosition::kControlFlow);
+  EXPECT(controlFlowPc != 0);
+
+  uword tempMovePc =
+      FindPCForTokenPosition(main_code,
+                             main_code_source_map,
+                             TokenPosition::kTempMove);
+  EXPECT(tempMovePc != 0);
+
+  // Insert fake samples.
+
+  // Sample 1:
+  // squarePositionPc exclusive.
+  // callPositionPc inclusive.
+  uword sample1[] = {
+    squarePositionPc,  // doWork.
+    callPositionPc,    // main.
+    0
+  };
+
+  // Sample 2:
+  // squarePositionPc exclusive.
+  uword sample2[] = {
+    squarePositionPc,  // doWork.
+    0,
+  };
+
+  // Sample 3:
+  // controlFlowPc exclusive.
+  // callPositionPc inclusive.
+  uword sample3[] = {
+    controlFlowPc,   // doWork.
+    callPositionPc,  // main.
+    0
+  };
+
+  // Sample 4:
+  // tempMovePc exclusive.
+  uword sample4[] = {
+    tempMovePc,  // main.
+    0
+  };
+
+  InsertFakeSample(sample_buffer, &sample1[0]);
+  InsertFakeSample(sample_buffer, &sample2[0]);
+  InsertFakeSample(sample_buffer, &sample3[0]);
+  InsertFakeSample(sample_buffer, &sample4[0]);
+
+  // Generate source report for main.
+  SourceReport sourceReport(SourceReport::kProfile);
+  JSONStream js;
+  sourceReport.PrintJSON(&js,
+                         script,
+                         do_work.token_pos(),
+                         main.end_token_pos());
+
+  // Verify positions in do_work.
+  EXPECT_SUBSTRING("\"positions\":[\"ControlFlow\",6]", js.ToCString());
+  // Verify exclusive ticks in do_work.
+  EXPECT_SUBSTRING("\"exclusiveTicks\":[1,2]", js.ToCString());
+  // Verify inclusive ticks in do_work.
+  EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString());
+
+  // Verify positions in main.
+  EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString());
+  // Verify exclusive ticks in main.
+  EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString());
+  // Verify inclusive ticks in main.
+  EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString());
+}
+
 #endif  // !PRODUCT
 
 }  // namespace dart
diff --git a/runtime/vm/random.cc b/runtime/vm/random.cc
index 6f1b6eb..5153ffe 100644
--- a/runtime/vm/random.cc
+++ b/runtime/vm/random.cc
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "vm/random.h"
+#include "vm/dart.h"
 #include "vm/flags.h"
-#include "vm/isolate.h"
+#include "vm/os.h"
 
 namespace dart {
 
@@ -13,7 +14,7 @@
 Random::Random() {
   uint64_t seed = FLAG_random_seed;
   if (seed == 0) {
-    Dart_EntropySource callback = Isolate::entropy_source_callback();
+    Dart_EntropySource callback = Dart::entropy_source_callback();
     if (callback != NULL) {
       if (!callback(reinterpret_cast<uint8_t*>(&seed), sizeof(seed))) {
         // Callback failed. Reset the seed to 0.
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index d32b5ab..98553cd 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -343,13 +343,6 @@
 }
 
 
-intptr_t RawFunctionType::VisitFunctionTypePointers(
-    RawFunctionType* raw_obj, ObjectPointerVisitor* visitor) {
-  visitor->VisitPointers(raw_obj->from(), raw_obj->to());
-  return FunctionType::InstanceSize();
-}
-
-
 intptr_t RawTypeRef::VisitTypeRefPointers(
     RawTypeRef* raw_obj, ObjectPointerVisitor* visitor) {
   visitor->VisitPointers(raw_obj->from(), raw_obj->to());
@@ -542,8 +535,11 @@
 
   RawCode* obj = raw_obj->ptr();
   intptr_t length = Code::PtrOffBits::decode(obj->state_bits_);
+#if defined(TARGET_ARCH_IA32)
+  // On IA32 only we embed pointers to objects directly in the generated
+  // instructions. The variable portion of a Code object describes where to
+  // find those pointers for tracing.
   if (Code::AliveBit::decode(obj->state_bits_)) {
-    // Also visit all the embedded pointers in the corresponding instructions.
     uword entry_point = reinterpret_cast<uword>(obj->instructions_->ptr()) +
         Instructions::HeaderSize();
     for (intptr_t i = 0; i < length; i++) {
@@ -553,6 +549,12 @@
     }
   }
   return Code::InstanceSize(length);
+#else
+  // On all other architectures, objects are referenced indirectly through
+  // either an ObjectPool or Thread.
+  ASSERT(length == 0);
+  return Code::InstanceSize(0);
+#endif
 }
 
 
@@ -931,12 +933,12 @@
 }
 
 
-intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj,
-                                            ObjectPointerVisitor* visitor) {
+intptr_t RawRegExp::VisitRegExpPointers(RawRegExp* raw_obj,
+                                        ObjectPointerVisitor* visitor) {
   // Make sure that we got here with the tagged pointer as this.
   ASSERT(raw_obj->IsHeapObject());
   visitor->VisitPointers(raw_obj->from(), raw_obj->to());
-  return JSRegExp::InstanceSize();
+  return RegExp::InstanceSize();
 }
 
 
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index c30823f..6a5d626 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -52,7 +52,6 @@
     V(LibraryPrefix)                                                           \
     V(AbstractType)                                                            \
       V(Type)                                                                  \
-      V(FunctionType)                                                          \
       V(TypeRef)                                                               \
       V(TypeParameter)                                                         \
       V(BoundedType)                                                           \
@@ -75,7 +74,7 @@
     V(ReceivePort)                                                             \
     V(SendPort)                                                                \
     V(Stacktrace)                                                              \
-    V(JSRegExp)                                                                \
+    V(RegExp)                                                                  \
     V(WeakProperty)                                                            \
     V(MirrorReference)                                                         \
     V(LinkedHashMap)                                                           \
@@ -108,6 +107,22 @@
   V(Int32x4Array)                                                              \
   V(Float64x2Array)                                                            \
 
+#define DART_CLASS_LIST_TYPED_DATA(V)                                          \
+  V(Int8)                                                                      \
+  V(Uint8)                                                                     \
+  V(Uint8Clamped)                                                              \
+  V(Int16)                                                                     \
+  V(Uint16)                                                                    \
+  V(Int32)                                                                     \
+  V(Uint32)                                                                    \
+  V(Int64)                                                                     \
+  V(Uint64)                                                                    \
+  V(Float32)                                                                   \
+  V(Float64)                                                                   \
+  V(Float32x4)                                                                 \
+  V(Int32x4)                                                                   \
+  V(Float64x2)
+
 #define CLASS_LIST_FOR_HANDLES(V)                                              \
   CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY(V)                                 \
   V(Array)                                                                     \
@@ -662,6 +677,7 @@
     kAllocated = 0,  // Initial state.
     kPreFinalized,  // VM classes: size precomputed, but no checks done.
     kFinalized,  // Class parsed, finalized and ready for use.
+    kRefinalizeAfterPatch,  // Class needs to be refinalized (patched).
   };
 
  private:
@@ -836,7 +852,8 @@
   int32_t usage_counter_;  // Incremented while function is running.
   int16_t num_fixed_parameters_;
   int16_t num_optional_parameters_;  // > 0: positional; < 0: named.
-  int16_t deoptimization_counter_;
+  int8_t deoptimization_counter_;
+  int8_t was_compiled_;
   uint32_t kind_tag_;  // See Function::KindTagBits.
   uint16_t optimized_instruction_count_;
   uint16_t optimized_call_site_count_;
@@ -852,7 +869,7 @@
   }
   RawContextScope* context_scope_;
   RawFunction* parent_function_;  // Enclosing function of this local function.
-  RawFunctionType* signature_type_;
+  RawType* signature_type_;
   RawInstance* closure_;  // Closure object for static implicit closures.
   RawObject** to() {
     return reinterpret_cast<RawObject**>(&ptr()->closure_);
@@ -1004,10 +1021,13 @@
   RawString* private_key_;
   RawArray* dictionary_;         // Top-level names in this library.
   RawGrowableObjectArray* metadata_;  // Metadata on classes, methods etc.
-  RawClass* toplevel_class_;  // Class containing top-level elements.
+  RawClass* toplevel_class_;     // Class containing top-level elements.
   RawGrowableObjectArray* patch_classes_;
   RawArray* imports_;            // List of Namespaces imported without prefix.
   RawArray* exports_;            // List of re-exported Namespaces.
+  RawArray* exports2_;           // Copy of exports_, used by background
+                                 // compiler to detect cycles without colliding
+                                 // with mutator thread lookups.
   RawInstance* load_error_;      // Error iff load_state_ == kLoadError.
   RawObject** to_snapshot() {
     return reinterpret_cast<RawObject**>(&ptr()->load_error_);
@@ -1020,13 +1040,13 @@
 
   Dart_NativeEntryResolver native_entry_resolver_;  // Resolves natives.
   Dart_NativeEntrySymbol native_entry_symbol_resolver_;
-  classid_t index_;             // Library id number.
-  uint16_t num_imports_;        // Number of entries in imports_.
-  int8_t load_state_;           // Of type LibraryState.
+  classid_t index_;              // Library id number.
+  uint16_t num_imports_;         // Number of entries in imports_.
+  int8_t load_state_;            // Of type LibraryState.
   bool corelib_imported_;
   bool is_dart_scheme_;
-  bool debuggable_;             // True if debugger can stop in library.
-  bool is_in_fullsnapshot_;     // True if library is in a full snapshot.
+  bool debuggable_;              // True if debugger can stop in library.
+  bool is_in_fullsnapshot_;      // True if library is in a full snapshot.
 
   friend class Class;
   friend class Isolate;
@@ -1064,10 +1084,12 @@
   uword entry_point_;
 
   RawObject** from() {
-    return reinterpret_cast<RawObject**>(&ptr()->active_instructions_);
+    return reinterpret_cast<RawObject**>(&ptr()->instructions_);
   }
-  RawInstructions* active_instructions_;
-  RawInstructions* instructions_;
+  union {
+    RawInstructions* instructions_;
+    RawSmi* precompiled_instructions_size_;
+  };
   RawObjectPool* object_pool_;
   // If owner_ is Function::null() the owner is a regular stub.
   // If owner_ is a Class the owner is the allocation stub for that class.
@@ -1254,7 +1276,7 @@
   // as large as ~33 million entries. If that is sufficient, then these two
   // fields can be merged into a BitField.
   int32_t length_;  // Length of payload, in bits.
-  int32_t register_bit_count_;  // Live register bits, included in length_.
+  int32_t slow_path_bit_count_;  // Slow path live values, included in length_.
 
   // Offset from code entry point corresponding to this stack map
   // representation.
@@ -1455,7 +1477,11 @@
   }
   int32_t deopt_id_;     // Deoptimization id corresponding to this IC.
   uint32_t state_bits_;  // Number of arguments tested in IC, deopt reasons,
-                         // is closure call, JS warning issued, range feedback.
+                         // range feedback.
+#if defined(TAG_IC_DATA)
+  intptr_t tag_;  // Debugging, verifying that the icdata is assigned to the
+                  // same instruction again. Store -1 or Instruction::Tag.
+#endif
 };
 
 
@@ -1601,28 +1627,18 @@
   }
   RawObject* type_class_;  // Either resolved class or unresolved class.
   RawTypeArguments* arguments_;
-  RawLanguageError* error_;  // Error object if type is malformed or malbounded.
+  // This type object represents a function type if its signature field is a
+  // non-null function object.
+  // If this type is malformed or malbounded, the signature field gets
+  // overwritten by the error object in order to save space. If the type is a
+  // function type, its signature is lost, but the message in the error object
+  // can describe the issue without needing the signature.
+  union {
+    RawFunction* signature_;  // If not null, this type is a function type.
+    RawLanguageError* error_;  // If not null, type is malformed or malbounded.
+  } sig_or_err_;
   RawObject** to() {
-    return reinterpret_cast<RawObject**>(&ptr()->error_);
-  }
-  TokenPosition token_pos_;
-  int8_t type_state_;
-};
-
-
-class RawFunctionType : public RawAbstractType {
- private:
-  RAW_HEAP_OBJECT_IMPLEMENTATION(FunctionType);
-
-  RawObject** from() {
-    return reinterpret_cast<RawObject**>(&ptr()->scope_class_);
-  }
-  RawClass* scope_class_;
-  RawTypeArguments* arguments_;
-  RawFunction* signature_;
-  RawLanguageError* error_;  // Error object if type is malformed or malbounded.
-  RawObject** to() {
-    return reinterpret_cast<RawObject**>(&ptr()->error_);
+    return reinterpret_cast<RawObject**>(&ptr()->sig_or_err_.error_);
   }
   TokenPosition token_pos_;
   int8_t type_state_;
@@ -2059,8 +2075,8 @@
 
 
 // VM type for capturing JS regular expressions.
-class RawJSRegExp : public RawInstance {
-  RAW_HEAP_OBJECT_IMPLEMENTATION(JSRegExp);
+class RawRegExp : public RawInstance {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(RegExp);
 
   RawObject** from() {
     return reinterpret_cast<RawObject**>(&ptr()->num_bracket_expressions_);
@@ -2337,7 +2353,7 @@
          (index == kCodeCid) ||
          (index == kContextScopeCid) ||
          (index == kInstanceCid) ||
-         (index == kJSRegExpCid);
+         (index == kRegExpCid);
 }
 
 
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index ed22fa2..0ca54d8 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -281,83 +281,6 @@
 }
 
 
-RawFunctionType* FunctionType::ReadFrom(SnapshotReader* reader,
-                                        intptr_t object_id,
-                                        intptr_t tags,
-                                        Snapshot::Kind kind,
-                                        bool as_reference) {
-  ASSERT(reader != NULL);
-
-  // Determine if the scope class of this function type is in the full snapshot.
-  bool scopeclass_is_in_fullsnapshot = reader->Read<bool>();
-
-  // Allocate function type object.
-  FunctionType& function_type =
-      FunctionType::ZoneHandle(reader->zone(), NEW_OBJECT(FunctionType));
-  bool is_canonical = RawObject::IsCanonical(tags);
-  bool defer_canonicalization = is_canonical &&
-      (kind != Snapshot::kFull && scopeclass_is_in_fullsnapshot);
-  reader->AddBackRef(object_id,
-                     &function_type,
-                     kIsDeserialized,
-                     defer_canonicalization);
-
-  // Set all non object fields.
-  function_type.set_token_pos(
-      TokenPosition::SnapshotDecode(reader->Read<int32_t>()));
-  function_type.set_type_state(reader->Read<int8_t>());
-
-  // Set all the object fields.
-  READ_OBJECT_FIELDS(function_type,
-                     function_type.raw()->from(), function_type.raw()->to(),
-                     kAsReference);
-
-  // Set the canonical bit.
-  if (!defer_canonicalization && is_canonical) {
-    function_type.SetCanonical();
-  }
-
-  return function_type.raw();
-}
-
-
-void RawFunctionType::WriteTo(SnapshotWriter* writer,
-                              intptr_t object_id,
-                              Snapshot::Kind kind,
-                              bool as_reference) {
-  ASSERT(writer != NULL);
-
-  // Only resolved and finalized function types should be written to a snapshot.
-  ASSERT((ptr()->type_state_ == RawFunctionType::kFinalizedInstantiated) ||
-         (ptr()->type_state_ == RawFunctionType::kFinalizedUninstantiated));
-  ASSERT(ptr()->scope_class_ != Object::null());
-
-  // Write out the serialization header value for this object.
-  writer->WriteInlinedObjectHeader(object_id);
-
-  // Write out the class and tags information.
-  writer->WriteIndexedObject(kFunctionTypeCid);
-  writer->WriteTags(writer->GetObjectTags(this));
-
-  // Write out scopeclass_is_in_fullsnapshot first as this will
-  // help the reader decide on how to canonicalize the type object.
-  intptr_t tags = writer->GetObjectTags(ptr()->scope_class_);
-  bool scopeclass_is_in_fullsnapshot =
-      (ClassIdTag::decode(tags) == kClassCid) &&
-      Class::IsInFullSnapshot(reinterpret_cast<RawClass*>(ptr()->scope_class_));
-  writer->Write<bool>(scopeclass_is_in_fullsnapshot);
-
-  // Write out all the non object pointer fields.
-  writer->Write<int32_t>(ptr()->token_pos_.SnapshotEncode());
-  writer->Write<int8_t>(ptr()->type_state_);
-
-  // Write out all the object pointer fields.
-  ASSERT(ptr()->scope_class_ != Object::null());
-  SnapshotWriterVisitor visitor(writer, kAsReference);
-  visitor.VisitPointers(from(), to());
-}
-
-
 RawTypeRef* TypeRef::ReadFrom(SnapshotReader* reader,
                               intptr_t object_id,
                               intptr_t tags,
@@ -732,9 +655,8 @@
   // Signature type.
   writer->WriteObjectImpl(ptr()->signature_type_, kAsInlinedObject);
 
-  // Static closure/Closure allocation stub.
-  // We don't write the closure or allocation stub in the snapshot.
-  writer->WriteVMIsolateObject(kNullObject);
+  // Canonical static closure.
+  writer->WriteObjectImpl(ptr()->closure_, kAsInlinedObject);
 }
 
 
@@ -811,10 +733,11 @@
       func.set_optimized_call_site_count(0);
     } else {
       func.set_usage_counter(reader->Read<int32_t>());
-      func.set_deoptimization_counter(reader->Read<int16_t>());
+      func.set_deoptimization_counter(reader->Read<int8_t>());
       func.set_optimized_instruction_count(reader->Read<uint16_t>());
       func.set_optimized_call_site_count(reader->Read<uint16_t>());
     }
+    func.set_was_compiled(false);
 
     // Set all the object fields.
     READ_OBJECT_FIELDS(func,
@@ -892,7 +815,7 @@
       } else {
         writer->Write<int32_t>(0);
       }
-      writer->Write<int16_t>(ptr()->deoptimization_counter_);
+      writer->Write<int8_t>(ptr()->deoptimization_counter_);
       writer->Write<uint16_t>(ptr()->optimized_instruction_count_);
       writer->Write<uint16_t>(ptr()->optimized_call_site_count_);
     }
@@ -933,8 +856,6 @@
   if (reader->snapshot_code()) {
     field.set_token_pos(TokenPosition::kNoSource);
     ASSERT(!FLAG_use_field_guards);
-    field.set_guarded_cid(kDynamicCid);
-    field.set_is_nullable(true);
   } else {
     field.set_token_pos(
         TokenPosition::SnapshotDecode(reader->Read<int32_t>()));
@@ -951,8 +872,9 @@
                      field.raw()->from(), toobj,
                      kAsReference);
 
-  if (reader->snapshot_code()) {
-    ASSERT(!FLAG_use_field_guards);
+  if (!FLAG_use_field_guards) {
+    field.set_guarded_cid(kDynamicCid);
+    field.set_is_nullable(true);
     field.set_guarded_list_length(Field::kNoFixedLength);
     field.set_guarded_list_length_in_object_offset(Field::kUnknownLengthOffset);
   } else {
@@ -1417,6 +1339,19 @@
 }
 
 
+#if defined(DEBUG)
+static uword Checksum(uword entry, intptr_t size) {
+  uword sum = 0;
+  uword* start = reinterpret_cast<uword*>(entry);
+  uword* end = reinterpret_cast<uword*>(entry + size);
+  for (uword* cursor = start; cursor < end; cursor++) {
+    sum ^= *cursor;
+  }
+  return sum;
+}
+#endif
+
+
 RawCode* Code::ReadFrom(SnapshotReader* reader,
                         intptr_t object_id,
                         intptr_t tags,
@@ -1432,20 +1367,66 @@
   result.set_state_bits(reader->Read<int32_t>());
   result.set_lazy_deopt_pc_offset(-1);
 
-  // Set all the object fields.
-  READ_OBJECT_FIELDS(result,
-                     result.raw()->from(), result.raw()->to_snapshot(),
-                     kAsReference);
-  for (RawObject** ptr = result.raw()->to();
-       ptr > result.raw()->to_snapshot();
-       ptr--) {
-    result.StorePointer(ptr, Object::null());
-  }
+  int32_t text_offset = reader->Read<int32_t>();
+  int32_t instructions_size = reader->Read<int32_t>();
+  uword entry_point = reader->GetInstructionsAt(text_offset);
 
-  // Fix entry point.
-  uword new_entry = result.EntryPoint();
-  ASSERT(Dart::vm_isolate()->heap()->CodeContains(new_entry));
-  result.StoreNonPointer(&result.raw_ptr()->entry_point_, new_entry);
+#if defined(DEBUG)
+  uword expected_check = reader->Read<uword>();
+  uword actual_check = Checksum(entry_point, instructions_size);
+  ASSERT(expected_check == actual_check);
+#endif
+
+  result.StoreNonPointer(&result.raw_ptr()->entry_point_, entry_point);
+
+  result.StorePointer(reinterpret_cast<RawSmi*const*>(
+                          &result.raw_ptr()->instructions_),
+                      Smi::New(instructions_size));
+
+  (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference);
+  result.StorePointer(reinterpret_cast<RawObject*const*>(
+                          &result.raw_ptr()->object_pool_),
+                      reader->PassiveObjectHandle()->raw());
+
+  (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference);
+  result.StorePointer(&result.raw_ptr()->owner_,
+                      reader->PassiveObjectHandle()->raw());
+
+  (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference);
+  result.StorePointer(reinterpret_cast<RawObject*const*>(
+                          &result.raw_ptr()->exception_handlers_),
+                      reader->PassiveObjectHandle()->raw());
+
+  (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference);
+  result.StorePointer(reinterpret_cast<RawObject*const*>(
+                          &result.raw_ptr()->pc_descriptors_),
+                      reader->PassiveObjectHandle()->raw());
+
+  (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference);
+  result.StorePointer(reinterpret_cast<RawObject*const*>(
+                          &result.raw_ptr()->code_source_map_),
+                      reader->PassiveObjectHandle()->raw());
+
+  (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference);
+  result.StorePointer(reinterpret_cast<RawObject*const*>(
+                          &result.raw_ptr()->stackmaps_),
+                      reader->PassiveObjectHandle()->raw());
+
+  result.StorePointer(&result.raw_ptr()->deopt_info_array_,
+                      Array::null());
+  result.StorePointer(&result.raw_ptr()->static_calls_target_table_,
+                      Array::null());
+  result.StorePointer(&result.raw_ptr()->var_descriptors_,
+                      LocalVarDescriptors::null());
+  result.StorePointer(&result.raw_ptr()->inlined_metadata_,
+                      Array::null());
+  result.StorePointer(&result.raw_ptr()->comments_,
+                      Array::null());
+  result.StorePointer(&result.raw_ptr()->return_address_metadata_,
+                      Object::null());
+
+  ASSERT(result.Size() == instructions_size);
+  ASSERT(result.EntryPoint() == entry_point);
 
   return result.raw();
 }
@@ -1475,11 +1456,23 @@
   // Write out all the non object fields.
   writer->Write<int32_t>(ptr()->state_bits_);
 
-  // Write out all the object pointer fields.
-  SnapshotWriterVisitor visitor(writer, kAsReference);
-  visitor.VisitPointers(from(), to_snapshot());
+  RawInstructions* instr = ptr()->instructions_;
+  intptr_t size = instr->ptr()->size_;
+  int32_t text_offset = writer->GetInstructionsId(instr, this);
+  writer->Write<int32_t>(text_offset);
+  writer->Write<int32_t>(size);
+#if defined(DEBUG)
+  uword entry = ptr()->entry_point_;
+  uword check = Checksum(entry, size);
+  writer->Write<uword>(check);
+#endif
 
-  writer->SetInstructionsCode(ptr()->instructions_, this);
+  writer->WriteObjectImpl(ptr()->object_pool_, kAsReference);
+  writer->WriteObjectImpl(ptr()->owner_, kAsReference);
+  writer->WriteObjectImpl(ptr()->exception_handlers_, kAsReference);
+  writer->WriteObjectImpl(ptr()->pc_descriptors_, kAsReference);
+  writer->WriteObjectImpl(ptr()->code_source_map_, kAsReference);
+  writer->WriteObjectImpl(ptr()->stackmaps_, kAsReference);
 }
 
 
@@ -1488,21 +1481,8 @@
                                         intptr_t tags,
                                         Snapshot::Kind kind,
                                         bool as_reference) {
-  ASSERT(reader->snapshot_code());
-  ASSERT(kind == Snapshot::kFull);
-
-#ifdef DEBUG
-  intptr_t full_tags = static_cast<uword>(reader->Read<intptr_t>());
-#else
-  intptr_t full_tags = 0;  // unused in release mode
-#endif
-  intptr_t offset = reader->Read<int32_t>();
-  Instructions& result =
-      Instructions::ZoneHandle(reader->zone(),
-                               reader->GetInstructionsAt(offset, full_tags));
-  reader->AddBackRef(object_id, &result, kIsDeserialized);
-
-  return result.raw();
+  UNREACHABLE();
+  return Instructions::null();
 }
 
 
@@ -1510,24 +1490,7 @@
                               intptr_t object_id,
                               Snapshot::Kind kind,
                               bool as_reference) {
-  ASSERT(writer->snapshot_code());
-  ASSERT(kind == Snapshot::kFull);
-
-  writer->WriteInlinedObjectHeader(object_id);
-  writer->WriteVMIsolateObject(kInstructionsCid);
-  writer->WriteTags(writer->GetObjectTags(this));
-
-#ifdef DEBUG
-  // Instructions will be written pre-marked and in the VM heap. Write out
-  // the tags we expect to find when reading the snapshot for a sanity check
-  // that our offsets/alignment didn't get out of sync.
-  uword written_tags = writer->GetObjectTags(this);
-  written_tags = RawObject::VMHeapObjectTag::update(true, written_tags);
-  written_tags = RawObject::MarkBit::update(true, written_tags);
-  writer->Write<intptr_t>(written_tags);
-#endif
-
-  writer->Write<int32_t>(writer->GetInstructionsId(this));
+  UNREACHABLE();
 }
 
 
@@ -2009,6 +1972,9 @@
 
   result.set_deopt_id(reader->Read<int32_t>());
   result.set_state_bits(reader->Read<uint32_t>());
+#if defined(TAG_IC_DATA)
+  result.set_tag(reader->Read<int16_t>());
+#endif
 
   // Set all the object fields.
   RawObject** toobj = reader->snapshot_code()
@@ -2041,6 +2007,9 @@
   // Write out all the non object fields.
   writer->Write<int32_t>(ptr()->deopt_id_);
   writer->Write<uint32_t>(ptr()->state_bits_);
+#if defined(TAG_IC_DATA)
+  writer->Write<int16_t>(ptr()->tag_);
+#endif
 
   // Write out all the object pointer fields.
   // In precompiled snapshots, omit the owner field. The owner field may
@@ -2549,7 +2518,7 @@
     for (intptr_t i = 0; i < len; i++) {
       ptr[i] = reader->Read<CharacterType>();
     }
-    *str_obj ^= (*new_symbol)(ptr, len);
+    *str_obj ^= (*new_symbol)(reader->thread(), ptr, len);
   } else {
     // Set up the string object.
     *str_obj = StringType::New(len, HEAP_SPACE(kind));
@@ -3591,15 +3560,15 @@
 }
 
 
-RawJSRegExp* JSRegExp::ReadFrom(SnapshotReader* reader,
-                                intptr_t object_id,
-                                intptr_t tags,
-                                Snapshot::Kind kind,
-                                bool as_reference) {
+RawRegExp* RegExp::ReadFrom(SnapshotReader* reader,
+                            intptr_t object_id,
+                            intptr_t tags,
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   ASSERT(reader != NULL);
 
-  // Allocate JSRegExp object.
-  JSRegExp& regex = JSRegExp::ZoneHandle(reader->zone(), NEW_OBJECT(JSRegExp));
+  // Allocate RegExp object.
+  RegExp& regex = RegExp::ZoneHandle(reader->zone(), NEW_OBJECT(RegExp));
   reader->AddBackRef(object_id, &regex, kIsDeserialized);
 
   // Read and Set all the other fields.
@@ -3627,17 +3596,17 @@
 }
 
 
-void RawJSRegExp::WriteTo(SnapshotWriter* writer,
-                          intptr_t object_id,
-                          Snapshot::Kind kind,
-                          bool as_reference) {
+void RawRegExp::WriteTo(SnapshotWriter* writer,
+                        intptr_t object_id,
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
 
   // Write out the class and tags information.
-  writer->WriteIndexedObject(kJSRegExpCid);
+  writer->WriteIndexedObject(kRegExpCid);
   writer->WriteTags(writer->GetObjectTags(this));
 
   // Write out all the other fields.
diff --git a/runtime/vm/regexp.cc b/runtime/vm/regexp.cc
index e49c3d8..f119a25 100644
--- a/runtime/vm/regexp.cc
+++ b/runtime/vm/regexp.cc
@@ -5018,7 +5018,7 @@
   const intptr_t specialization_cid = function.string_specialization_cid();
   const bool is_one_byte = (specialization_cid == kOneByteStringCid ||
                             specialization_cid == kExternalOneByteStringCid);
-  JSRegExp& regexp = JSRegExp::Handle(zone, function.regexp());
+  RegExp& regexp = RegExp::Handle(zone, function.regexp());
   const String& pattern = String::Handle(zone, regexp.pattern());
 
   ASSERT(!regexp.IsNull());
@@ -5132,7 +5132,7 @@
 
 RegExpEngine::CompilationResult RegExpEngine::CompileBytecode(
     RegExpCompileData* data,
-    const JSRegExp& regexp,
+    const RegExp& regexp,
     bool is_one_byte,
     Zone* zone) {
   ASSERT(FLAG_interpret_irregexp);
@@ -5244,18 +5244,18 @@
 }
 
 
-static void CreateSpecializedFunction(Zone* zone,
-                                      const JSRegExp& regexp,
+static void CreateSpecializedFunction(Thread* thread, Zone* zone,
+                                      const RegExp& regexp,
                                       intptr_t specialization_cid,
                                       const Object& owner) {
   const intptr_t kParamCount = RegExpMacroAssembler::kParamCount;
 
   Function& fn = Function::Handle(zone, Function::New(
       // Append the regexp pattern to the function name.
-      String::Handle(zone, Symbols::New(
+      String::Handle(zone, Symbols::New(thread,
           String::Handle(zone, String::Concat(
               String::Handle(zone, String::Concat(
-                  Symbols::Irregexp(),
+                  Symbols::ColonMatcher(),
                   Symbols::ColonSpace(), Heap::kOld)),
               String::Handle(regexp.pattern()), Heap::kOld)))),
       RawFunction::kIrregexpFunction,
@@ -5297,11 +5297,12 @@
 }
 
 
-RawJSRegExp* RegExpEngine::CreateJSRegExp(Zone* zone,
-                                          const String& pattern,
-                                          bool multi_line,
-                                          bool ignore_case) {
-  const JSRegExp& regexp = JSRegExp::Handle(JSRegExp::New());
+RawRegExp* RegExpEngine::CreateRegExp(Thread* thread,
+                                      const String& pattern,
+                                      bool multi_line,
+                                      bool ignore_case) {
+  Zone* zone = thread->zone();
+  const RegExp& regexp = RegExp::Handle(RegExp::New());
 
   regexp.set_pattern(pattern);
 
@@ -5317,14 +5318,18 @@
   regexp.set_is_complex();
   regexp.set_is_global();   // All dart regexps are global.
 
-  const Library& lib = Library::Handle(zone, Library::CoreLibrary());
-  const Class& owner = Class::Handle(
-      zone, lib.LookupClass(Symbols::RegExp()));
+  if (!FLAG_interpret_irregexp) {
+    const Library& lib = Library::Handle(zone, Library::CoreLibrary());
+    const Class& owner = Class::Handle(zone,
+                                       lib.LookupClass(Symbols::RegExp()));
 
-  CreateSpecializedFunction(zone, regexp, kOneByteStringCid, owner);
-  CreateSpecializedFunction(zone, regexp, kTwoByteStringCid, owner);
-  CreateSpecializedFunction(zone, regexp, kExternalOneByteStringCid, owner);
-  CreateSpecializedFunction(zone, regexp, kExternalTwoByteStringCid, owner);
+    CreateSpecializedFunction(thread, zone, regexp, kOneByteStringCid, owner);
+    CreateSpecializedFunction(thread, zone, regexp, kTwoByteStringCid, owner);
+    CreateSpecializedFunction(thread, zone,
+                              regexp, kExternalOneByteStringCid, owner);
+    CreateSpecializedFunction(thread, zone,
+                              regexp, kExternalTwoByteStringCid, owner);
+  }
 
   return regexp.raw();
 }
diff --git a/runtime/vm/regexp.h b/runtime/vm/regexp.h
index 394279d..bc8edd5 100644
--- a/runtime/vm/regexp.h
+++ b/runtime/vm/regexp.h
@@ -1420,12 +1420,12 @@
 
   static CompilationResult CompileBytecode(
       RegExpCompileData* data,
-      const JSRegExp& regexp,
+      const RegExp& regexp,
       bool is_one_byte,
       Zone* zone);
 
-  static RawJSRegExp* CreateJSRegExp(
-      Zone* zone,
+  static RawRegExp* CreateRegExp(
+      Thread* thread,
       const String& pattern,
       bool multi_line,
       bool ignore_case);
diff --git a/runtime/vm/regexp_assembler_bytecode.cc b/runtime/vm/regexp_assembler_bytecode.cc
index 193616c..9586aea 100644
--- a/runtime/vm/regexp_assembler_bytecode.cc
+++ b/runtime/vm/regexp_assembler_bytecode.cc
@@ -452,7 +452,7 @@
 }
 
 
-static intptr_t Prepare(const JSRegExp& regexp,
+static intptr_t Prepare(const RegExp& regexp,
                         const String& subject,
                         Zone* zone) {
   bool is_one_byte = subject.IsOneByteString() ||
@@ -464,7 +464,7 @@
     const bool multiline = regexp.is_multi_line();
     RegExpCompileData* compile_data = new(zone) RegExpCompileData();
     if (!RegExpParser::ParseRegExp(pattern, multiline, compile_data)) {
-      // Parsing failures are handled in the JSRegExp factory constructor.
+      // Parsing failures are handled in the RegExp factory constructor.
       UNREACHABLE();
     }
 
@@ -491,7 +491,7 @@
 }
 
 
-static IrregexpInterpreter::IrregexpResult ExecRaw(const JSRegExp& regexp,
+static IrregexpInterpreter::IrregexpResult ExecRaw(const RegExp& regexp,
                                                    const String& subject,
                                                    intptr_t index,
                                                    int32_t* output,
@@ -537,7 +537,7 @@
 }
 
 
-RawInstance* BytecodeRegExpMacroAssembler::Interpret(const JSRegExp& regexp,
+RawInstance* BytecodeRegExpMacroAssembler::Interpret(const RegExp& regexp,
                                                      const String& subject,
                                                      const Smi& start_index,
                                                      Zone* zone) {
diff --git a/runtime/vm/regexp_assembler_bytecode.h b/runtime/vm/regexp_assembler_bytecode.h
index 2de00d0..da2a6d7 100644
--- a/runtime/vm/regexp_assembler_bytecode.h
+++ b/runtime/vm/regexp_assembler_bytecode.h
@@ -105,7 +105,7 @@
   virtual void PrintBlocks() { UNIMPLEMENTED(); }
   /////
 
-  static RawInstance* Interpret(const JSRegExp& regexp,
+  static RawInstance* Interpret(const RegExp& regexp,
                                 const String& str,
                                 const Smi& start_index,
                                 Zone* zone);
diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
index 1d6de6c..aac090e 100644
--- a/runtime/vm/regexp_assembler_ir.cc
+++ b/runtime/vm/regexp_assembler_ir.cc
@@ -311,7 +311,7 @@
 
 
 RawArray* IRRegExpMacroAssembler::Execute(
-    const JSRegExp& regexp,
+    const RegExp& regexp,
     const String& input,
     const Smi& start_offset,
     Zone* zone) {
@@ -429,12 +429,13 @@
 ConstantInstr* IRRegExpMacroAssembler::WordCharacterMapConstant() const {
   const Library& lib = Library::Handle(Z, Library::CoreLibrary());
   const Class& regexp_class = Class::Handle(Z,
-        lib.LookupClassAllowPrivate(Symbols::JSSyntaxRegExp()));
+        lib.LookupClassAllowPrivate(Symbols::_RegExp()));
   const Field& word_character_field = Field::ZoneHandle(Z,
-      regexp_class.LookupStaticField(Symbols::_wordCharacterMap()));
+      regexp_class.LookupStaticFieldAllowPrivate(Symbols::_wordCharacterMap()));
   ASSERT(!word_character_field.IsNull());
 
   if (word_character_field.IsUninitialized()) {
+    ASSERT(!Compiler::IsBackgroundCompilation());
     word_character_field.EvaluateInitializer();
   }
   ASSERT(!word_character_field.IsUninitialized());
diff --git a/runtime/vm/regexp_assembler_ir.h b/runtime/vm/regexp_assembler_ir.h
index eeb9f26..f898346 100644
--- a/runtime/vm/regexp_assembler_ir.h
+++ b/runtime/vm/regexp_assembler_ir.h
@@ -37,7 +37,7 @@
 
   virtual bool CanReadUnaligned();
 
-  static RawArray* Execute(const JSRegExp& regexp,
+  static RawArray* Execute(const RegExp& regexp,
                            const String& input,
                            const Smi& start_offset,
                            Zone* zone);
diff --git a/runtime/vm/regexp_parser.cc b/runtime/vm/regexp_parser.cc
index 7b0e01a..c4d471a 100644
--- a/runtime/vm/regexp_parser.cc
+++ b/runtime/vm/regexp_parser.cc
@@ -220,14 +220,14 @@
   VMTagScope tagScope(parsed_function->thread(),
                       VMTag::kCompileParseRegExpTagId);
   Zone* zone = parsed_function->zone();
-  JSRegExp& regexp = JSRegExp::Handle(parsed_function->function().regexp());
+  RegExp& regexp = RegExp::Handle(parsed_function->function().regexp());
 
   const String& pattern = String::Handle(regexp.pattern());
   const bool multiline = regexp.is_multi_line();
 
   RegExpCompileData* compile_data = new(zone) RegExpCompileData();
   if (!RegExpParser::ParseRegExp(pattern, multiline, compile_data)) {
-    // Parsing failures are handled in the JSRegExp factory constructor.
+    // Parsing failures are handled in the RegExp factory constructor.
     UNREACHABLE();
   }
 
diff --git a/runtime/vm/regexp_test.cc b/runtime/vm/regexp_test.cc
index d75dac4..3948f64 100644
--- a/runtime/vm/regexp_test.cc
+++ b/runtime/vm/regexp_test.cc
@@ -13,9 +13,10 @@
 namespace dart {
 
 static RawArray* Match(const String& pat, const String& str) {
-  Zone* zone = Thread::Current()->zone();
-  const JSRegExp& regexp = JSRegExp::Handle(
-      RegExpEngine::CreateJSRegExp(zone, pat, false, false));
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const RegExp& regexp = RegExp::Handle(
+      RegExpEngine::CreateRegExp(thread, pat, false, false));
   const Smi& idx = Smi::Handle(Smi::New(0));
   return IRRegExpMacroAssembler::Execute(regexp, str, idx, zone);
 }
diff --git a/runtime/vm/report.cc b/runtime/vm/report.cc
index 21bbdc8..b53c494 100644
--- a/runtime/vm/report.cc
+++ b/runtime/vm/report.cc
@@ -43,7 +43,7 @@
       // Only report the line position if we have the original source. We still
       // need to get a valid column so that we can report the ^ mark below the
       // snippet.
-      // Allocate formatted strings in old sapce as they may be created during
+      // Allocate formatted strings in old space as they may be created during
       // optimizing compilation. Those strings are created rarely and should not
       // polute old space.
       if (script.HasSource()) {
@@ -61,24 +61,23 @@
                                       line);
       }
       // Append the formatted error or warning message.
-      GrowableHandlePtrArray<const String> strs(Thread::Current()->zone(), 5);
-      strs.Add(result);
-      strs.Add(message);
+      const Array& strs = Array::Handle(
+          Array::New(6, Heap::kOld));
+      strs.SetAt(0, result);
+      strs.SetAt(1, message);
       // Append the source line.
       const String& script_line = String::Handle(
           script.GetLine(line, Heap::kOld));
       ASSERT(!script_line.IsNull());
-      strs.Add(Symbols::NewLine());
-      strs.Add(script_line);
-      strs.Add(Symbols::NewLine());
+      strs.SetAt(2, Symbols::NewLine());
+      strs.SetAt(3, script_line);
+      strs.SetAt(4, Symbols::NewLine());
       // Append the column marker.
       const String& column_line = String::Handle(
           String::NewFormatted(Heap::kOld,
                                "%*s\n", static_cast<int>(column), "^"));
-      strs.Add(column_line);
-      // TODO(srdjan): Use Strings::FromConcatAll in old space, once
-      // implemented.
-      result = Symbols::FromConcatAll(strs);
+      strs.SetAt(5, column_line);
+      result = String::ConcatAll(strs, Heap::kOld);
     } else {
       // Token position is unknown.
       result = String::NewFormatted(Heap::kOld, "'%s': %s: ",
@@ -118,7 +117,7 @@
                        const char* format, va_list args) {
   const Error& error = Error::Handle(LanguageError::NewFormattedV(
       prev_error, script, token_pos, Report::AtLocation,
-      kError, Heap::kNew,
+      kError, Heap::kOld,
       format, args));
   LongJump(error);
   UNREACHABLE();
@@ -159,7 +158,7 @@
   const Error& error = Error::Handle(
       LanguageError::NewFormattedV(Error::Handle(),  // No previous error.
                                    script, token_pos, report_after_token,
-                                   kind, Heap::kNew,
+                                   kind, Heap::kOld,
                                    format, args));
   LongJump(error);
   UNREACHABLE();
diff --git a/runtime/vm/resolver.cc b/runtime/vm/resolver.cc
index caaf556..95f8c62 100644
--- a/runtime/vm/resolver.cc
+++ b/runtime/vm/resolver.cc
@@ -36,9 +36,11 @@
     const String& function_name,
     const ArgumentsDescriptor& args_desc,
     bool allow_add) {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
 
-  Function& function = Function::Handle(
-      ResolveDynamicAnyArgs(receiver_class, function_name, allow_add));
+  Function& function = Function::Handle(zone,
+      ResolveDynamicAnyArgs(zone, receiver_class, function_name, allow_add));
 
   if (function.IsNull() ||
       !function.AreValidArguments(args_desc, NULL)) {
@@ -46,7 +48,7 @@
     // "noSuchMethod" function.
     if (FLAG_trace_resolving) {
       String& error_message =
-          String::Handle(Symbols::New("function not found"));
+          String::Handle(zone, Symbols::New(thread, "function not found"));
       if (!function.IsNull()) {
         // Obtain more detailed error message.
         function.AreValidArguments(args_desc, &error_message);
@@ -62,18 +64,19 @@
 
 
 RawFunction* Resolver::ResolveDynamicAnyArgs(
+    Zone* zone,
     const Class& receiver_class,
     const String& function_name,
     bool allow_add) {
-  Class& cls = Class::Handle(receiver_class.raw());
+  Class& cls = Class::Handle(zone, receiver_class.raw());
   if (FLAG_trace_resolving) {
     THR_Print("ResolveDynamic '%s' for class %s\n",
               function_name.ToCString(),
-              String::Handle(cls.Name()).ToCString());
+              String::Handle(zone, cls.Name()).ToCString());
   }
 
   const bool is_getter = Field::IsGetterName(function_name);
-  String& field_name = String::Handle();
+  String& field_name = String::Handle(zone);
   if (is_getter) {
     field_name ^= Field::NameFromGetter(function_name);
 
@@ -88,7 +91,7 @@
       field_name = String::SubString(field_name, 1);
       ASSERT(!Field::IsGetterName(field_name));
 
-      String& property_getter_name = String::Handle();
+      String& property_getter_name = String::Handle(zone);
       if (!Field::IsSetterName(field_name)) {
         // If this is not a setter, we need to look for both the regular
         // name and the getter name. (In the case of an operator, this
@@ -97,7 +100,7 @@
         property_getter_name = Field::GetterName(field_name);
       }
 
-      Function& function = Function::Handle();
+      Function& function = Function::Handle(zone);
       while (!cls.IsNull()) {
         function = cls.LookupDynamicFunction(field_name);
         if (!function.IsNull()) {
@@ -117,7 +120,7 @@
 
   // Now look for an instance function whose name matches function_name
   // in the class.
-  Function& function = Function::Handle();
+  Function& function = Function::Handle(zone);
   while (!cls.IsNull()) {
     function ^= cls.LookupDynamicFunction(function_name);
     if (!function.IsNull()) {
diff --git a/runtime/vm/resolver.h b/runtime/vm/resolver.h
index 32629aa..9a52ad3 100644
--- a/runtime/vm/resolver.h
+++ b/runtime/vm/resolver.h
@@ -37,6 +37,7 @@
 
   // If 'allow_add' is true we may add a function to the class during lookup.
   static RawFunction* ResolveDynamicAnyArgs(
+      Zone* zone,
       const Class& receiver_class,
       const String& function_name,
       bool allow_add = true);
diff --git a/runtime/vm/resolver_test.cc b/runtime/vm/resolver_test.cc
index f06e42f..52aa4b6 100644
--- a/runtime/vm/resolver_test.cc
+++ b/runtime/vm/resolver_test.cc
@@ -158,7 +158,7 @@
   const Library& lib = Library::Handle(Library::LookupLibrary(lib_name));
   ASSERT(!lib.IsNull());
   const Class& cls = Class::Handle(lib.LookupClass(
-      String::Handle(Symbols::New(test_class_name))));
+      String::Handle(Symbols::New(thread, test_class_name))));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
 
   Instance& receiver = Instance::Handle(Instance::New(cls));
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 101898f..b8d043b 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -14,12 +14,13 @@
 // Add function to a class and that class to the class dictionary so that
 // frame walking can be used.
 const Function& RegisterFakeFunction(const char* name, const Code& code) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  Thread* thread = Thread::Current();
+  const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class =
       Class::Handle(Class::New(class_name, script,
                                TokenPosition::kNoSource));
-  const String& function_name = String::ZoneHandle(Symbols::New(name));
+  const String& function_name = String::ZoneHandle(Symbols::New(thread, name));
   const Function& function = Function::ZoneHandle(
       Function::New(function_name,
                     RawFunction::kRegularFunction,
diff --git a/runtime/vm/runtime_entry_arm.cc b/runtime/vm/runtime_entry_arm.cc
index 35e15ea..a0bb2e9 100644
--- a/runtime/vm/runtime_entry_arm.cc
+++ b/runtime/vm/runtime_entry_arm.cc
@@ -53,7 +53,7 @@
     // informative error message.
     __ LoadFromOffset(kWord, R9, THR, Thread::OffsetFromThread(this));
     __ LoadImmediate(R4, argument_count);
-    __ BranchLink(*StubCode::CallToRuntime_entry(), kNotPatchable);
+    __ BranchLinkToRuntime();
   }
 }
 
diff --git a/runtime/vm/runtime_entry_arm64.cc b/runtime/vm/runtime_entry_arm64.cc
index 5b1605a..f9cd8c2 100644
--- a/runtime/vm/runtime_entry_arm64.cc
+++ b/runtime/vm/runtime_entry_arm64.cc
@@ -65,7 +65,7 @@
     // informative error message.
     __ ldr(R5, Address(THR, Thread::OffsetFromThread(this)));
     __ LoadImmediate(R4, argument_count);
-    __ BranchLink(*StubCode::CallToRuntime_entry());
+    __ BranchLinkToRuntime();
   }
 }
 
diff --git a/runtime/vm/runtime_entry_ia32.cc b/runtime/vm/runtime_entry_ia32.cc
index f16db03..fdb2464 100644
--- a/runtime/vm/runtime_entry_ia32.cc
+++ b/runtime/vm/runtime_entry_ia32.cc
@@ -38,7 +38,7 @@
     // informative error message.
     __ movl(ECX, Immediate(GetEntryPoint()));
     __ movl(EDX, Immediate(argument_count));
-    __ Call(*StubCode::CallToRuntime_entry());
+    __ CallToRuntime();
   }
 }
 
diff --git a/runtime/vm/runtime_entry_mips.cc b/runtime/vm/runtime_entry_mips.cc
index 31970fe..b310556 100644
--- a/runtime/vm/runtime_entry_mips.cc
+++ b/runtime/vm/runtime_entry_mips.cc
@@ -54,7 +54,7 @@
     // informative error message.
     __ lw(S5, Address(THR, Thread::OffsetFromThread(this)));
     __ LoadImmediate(S4, argument_count);
-    __ BranchLink(*StubCode::CallToRuntime_entry(), kNotPatchable);
+    __ BranchLinkToRuntime();
   }
 }
 
diff --git a/runtime/vm/runtime_entry_x64.cc b/runtime/vm/runtime_entry_x64.cc
index c3afdd8..84026ec 100644
--- a/runtime/vm/runtime_entry_x64.cc
+++ b/runtime/vm/runtime_entry_x64.cc
@@ -36,7 +36,7 @@
     // informative error message.
     __ movq(RBX, Address(THR, Thread::OffsetFromThread(this)));
     __ movq(R10, Immediate(argument_count));
-    __ Call(*StubCode::CallToRuntime_entry());
+    __ CallToRuntime();
   }
 }
 
diff --git a/runtime/vm/safepoint.cc b/runtime/vm/safepoint.cc
index 47ef257..6cbd0f7 100644
--- a/runtime/vm/safepoint.cc
+++ b/runtime/vm/safepoint.cc
@@ -82,7 +82,7 @@
           // get it to a safepoint and wait for it to check in.
           if (current->IsMutatorThread()) {
             ASSERT(T->isolate() != NULL);
-            T->isolate()->ScheduleInterrupts(Isolate::kVMInterrupt);
+            current->ScheduleInterruptsLocked(Thread::kVMInterrupt);
           }
           MonitorLocker sl(safepoint_lock_);
           ++number_threads_not_at_safepoint_;
@@ -96,8 +96,15 @@
   // Now wait for all threads that are not already at a safepoint to check-in.
   {
     MonitorLocker sl(safepoint_lock_);
+    intptr_t num_attempts = 0;
     while (number_threads_not_at_safepoint_ > 0) {
-      sl.Wait();
+      Monitor::WaitResult retval = sl.Wait(1000);
+      if (retval == Monitor::kTimedOut) {
+        num_attempts += 1;
+        OS::Print("Attempt:%" Pd " waiting for %d threads to check in\n",
+                  num_attempts,
+                  number_threads_not_at_safepoint_);
+      }
     }
   }
 }
diff --git a/runtime/vm/safepoint.h b/runtime/vm/safepoint.h
index 1c13a87..9477425 100644
--- a/runtime/vm/safepoint.h
+++ b/runtime/vm/safepoint.h
@@ -309,12 +309,6 @@
     } else {
       ASSERT(execution_state_ == Thread::kThreadInVM);
       thread()->set_execution_state(Thread::kThreadInVM);
-      // Fast check to see if a safepoint is requested or not.
-      // We do the more expensive operation of blocking the thread
-      // only if a safepoint is requested.
-      if (thread()->IsSafepointRequested()) {
-        handler()->BlockForSafepoint(thread());
-      }
     }
   }
 
diff --git a/runtime/vm/scanner.cc b/runtime/vm/scanner.cc
index a040476..9cbe84a 100644
--- a/runtime/vm/scanner.cc
+++ b/runtime/vm/scanner.cc
@@ -18,8 +18,9 @@
 DEFINE_FLAG(bool, print_tokens, false, "Print scanned tokens.");
 
 
-// Quick access to the locally defined zone() method.
+// Quick access to the locally defined zone() and thread() methods.
 #define Z (zone())
+#define T (thread())
 
 
 class ScanContext : public ZoneAllocated {
@@ -83,7 +84,8 @@
       saved_context_(NULL),
       private_key_(String::ZoneHandle(private_key.raw())),
       char_at_func_(src.CharAtFunc()),
-      zone_(Thread::Current()->zone()) {
+      thread_(Thread::Current()),
+      zone_(thread_->zone()) {
   Reset();
 }
 
@@ -93,7 +95,7 @@
 
 void Scanner::ErrorMsg(const char* msg) {
   current_token_.kind = Token::kERROR;
-  current_token_.literal = &String::ZoneHandle(Z, Symbols::New(msg));
+  current_token_.literal = &String::ZoneHandle(Z, Symbols::New(T, msg));
   current_token_.position = c0_pos_;
   token_start_ = lookahead_pos_;
   current_token_.offset = lookahead_pos_;
@@ -328,10 +330,10 @@
   // We did not read a keyword.
   current_token_.kind = Token::kIDENT;
   String& literal =
-      String::ZoneHandle(Z, Symbols::New(source_, ident_pos, ident_length));
+      String::ZoneHandle(Z, Symbols::New(T, source_, ident_pos, ident_length));
   if (ident_char0 == Library::kPrivateIdentifierStart) {
     // Private identifiers are mangled on a per library basis.
-    literal = Symbols::FromConcat(literal, private_key_);
+    literal = Symbols::FromConcat(T, literal, private_key_);
   }
   current_token_.literal = &literal;
 }
@@ -386,7 +388,7 @@
   if (current_token_.kind != Token::kILLEGAL) {
     intptr_t len = lookahead_pos_ - token_start_;
     const String& str =
-        String::ZoneHandle(Z, Symbols::New(source_, token_start_, len));
+        String::ZoneHandle(Z, Symbols::New(T, source_, token_start_, len));
     current_token_.literal = &str;
   }
 }
@@ -540,7 +542,7 @@
       ASSERT(string_chars.data() != NULL);
       // Strings are canonicalized: Allocate a symbol.
       current_token_.literal = &String::ZoneHandle(Z,
-          Symbols::FromUTF32(string_chars.data(), string_chars.length()));
+          Symbols::FromUTF32(T, string_chars.data(), string_chars.length()));
       // Preserve error tokens.
       if (current_token_.kind != Token::kERROR) {
         current_token_.kind = Token::kSTRING;
@@ -563,7 +565,8 @@
           ASSERT(string_chars.data() != NULL);
           // Strings are canonicalized: Allocate a symbol.
           current_token_.literal = &String::ZoneHandle(Z,
-              Symbols::FromUTF32(string_chars.data(), string_chars.length()));
+              Symbols::FromUTF32(T,
+                                 string_chars.data(), string_chars.length()));
         }
         EndStringLiteral();
         return;
@@ -970,7 +973,7 @@
     keywords_[i].kind = token;
     keywords_[i].keyword_chars = Token::Str(token);
     keywords_[i].keyword_len = strlen(Token::Str(token));
-    keywords_[i].keyword_symbol = &Symbols::Keyword(token);
+    keywords_[i].keyword_symbol = &Symbols::Token(token);
 
     int ch = keywords_[i].keyword_chars[0] - 'a';
     if (keywords_char_offset_[ch] == Token::kNumKeywords) {
diff --git a/runtime/vm/scanner.h b/runtime/vm/scanner.h
index 92ebcd6..8d5c6d5 100644
--- a/runtime/vm/scanner.h
+++ b/runtime/vm/scanner.h
@@ -180,6 +180,7 @@
 
   CharAtFunc CallCharAt() const { return char_at_func_; }
 
+  Thread* thread() const { return thread_; }
   Zone* zone() const { return zone_; }
 
   static void PrintTokens(const GrowableTokenStream& ts);
@@ -209,6 +210,7 @@
 
   const CharAtFunc char_at_func_;
 
+  Thread* thread_;
   Zone* zone_;
 
   static KeywordTable keywords_[Token::kNumKeywords];
diff --git a/runtime/vm/scavenger_test.cc b/runtime/vm/scavenger_test.cc
index 1ab6bdf..9776cca 100644
--- a/runtime/vm/scavenger_test.cc
+++ b/runtime/vm/scavenger_test.cc
@@ -12,7 +12,7 @@
 // Expects to visit no objects (since the space should be empty).
 class FailingObjectVisitor : public ObjectVisitor {
  public:
-  FailingObjectVisitor() : ObjectVisitor(NULL) {}
+  FailingObjectVisitor() { }
   virtual void VisitObject(RawObject* obj) {
     EXPECT(false);
   }
@@ -30,7 +30,7 @@
 // Expects to visit no objects (since the space should be empty).
 class FailingFindObjectVisitor : public FindObjectVisitor {
  public:
-  FailingFindObjectVisitor() : FindObjectVisitor(NULL) {}
+  FailingFindObjectVisitor() { }
   virtual bool FindObject(RawObject* obj) const {
     EXPECT(false);
     return false;
diff --git a/runtime/vm/scopes_test.cc b/runtime/vm/scopes_test.cc
index 8dac606..807f9f9 100644
--- a/runtime/vm/scopes_test.cc
+++ b/runtime/vm/scopes_test.cc
@@ -12,18 +12,18 @@
 TEST_CASE(LocalScope) {
   // Allocate a couple of local variables first.
   const Type& dynamic_type = Type::ZoneHandle(Type::DynamicType());
-  const String& a = String::ZoneHandle(Symbols::New("a"));
+  const String& a = String::ZoneHandle(Symbols::New(thread, "a"));
   LocalVariable* var_a =
       new LocalVariable(TokenPosition::kNoSource, a, dynamic_type);
   LocalVariable* inner_var_a =
       new LocalVariable(TokenPosition::kNoSource, a, dynamic_type);
-  const String& b = String::ZoneHandle(Symbols::New("b"));
+  const String& b = String::ZoneHandle(Symbols::New(thread, "b"));
   LocalVariable* var_b =
       new LocalVariable(TokenPosition::kNoSource, b, dynamic_type);
-  const String& c = String::ZoneHandle(Symbols::New("c"));
+  const String& c = String::ZoneHandle(Symbols::New(thread, "c"));
   LocalVariable* var_c =
       new LocalVariable(TokenPosition::kNoSource, c, dynamic_type);
-  const String& L = String::ZoneHandle(Symbols::New("L"));
+  const String& L = String::ZoneHandle(Symbols::New(thread, "L"));
   SourceLabel* label_L =
       new SourceLabel(TokenPosition::kNoSource, L, SourceLabel::kFor);
 
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index b7ac721..efed3c0 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -9,7 +9,6 @@
 #include "platform/globals.h"
 
 #include "vm/compiler.h"
-#include "vm/coverage.h"
 #include "vm/cpu.h"
 #include "vm/dart_api_impl.h"
 #include "vm/dart_api_state.h"
@@ -35,6 +34,7 @@
 #include "vm/source_report.h"
 #include "vm/stack_frame.h"
 #include "vm/symbols.h"
+#include "vm/timeline.h"
 #include "vm/unicode.h"
 #include "vm/version.h"
 
@@ -122,6 +122,7 @@
 StreamInfo Service::graph_stream("_Graph");
 StreamInfo Service::logging_stream("_Logging");
 StreamInfo Service::extension_stream("Extension");
+StreamInfo Service::timeline_stream("Timeline");
 
 static StreamInfo* streams_[] = {
   &Service::vm_stream,
@@ -132,6 +133,7 @@
   &Service::graph_stream,
   &Service::logging_stream,
   &Service::extension_stream,
+  &Service::timeline_stream,
 };
 
 
@@ -1030,11 +1032,12 @@
     params.AddProperty("streamId", stream_id);
     params.AddProperty("event", event);
   }
-  PostEvent(stream_id, event->KindAsCString(), &js);
+  PostEvent(event->isolate(), stream_id, event->KindAsCString(), &js);
 }
 
 
-void Service::PostEvent(const char* stream_id,
+void Service::PostEvent(Isolate* isolate,
+                        const char* stream_id,
                         const char* kind,
                         JSONStream* event) {
   ASSERT(stream_id != NULL);
@@ -1063,7 +1066,6 @@
   list_values[1] = &json_cobj;
 
   if (FLAG_trace_service) {
-    Isolate* isolate = Isolate::Current();
     const char* isolate_name = "<no current isolate>";
     if (isolate != NULL) {
       isolate_name = isolate->name();
@@ -1291,8 +1293,7 @@
   }
 
   {
-    MessageHandler::AcquiredQueues aq;
-    isolate->message_handler()->AcquireQueues(&aq);
+    MessageHandler::AcquiredQueues aq(isolate->message_handler());
     jsobj.AddProperty("messages", aq.queue());
   }
 
@@ -1679,8 +1680,7 @@
   if (!GetUnsignedIntegerId(parts[1], &message_id, 16)) {
     return Object::sentinel().raw();
   }
-  MessageHandler::AcquiredQueues aq;
-  thread->isolate()->message_handler()->AcquireQueues(&aq);
+  MessageHandler::AcquiredQueues aq(thread->isolate()->message_handler());
   Message* message = aq.queue()->FindMessageById(message_id);
   if (message == NULL) {
     // The user may try to load an expired message.
@@ -2149,8 +2149,10 @@
     // We don't use Instance::Cast here because it doesn't allow null.
     Instance& instance = Instance::Handle(zone);
     instance ^= obj.raw();
+    const Class& receiver_cls = Class::Handle(zone, instance.clazz());
     const Object& result =
-        Object::Handle(zone, instance.Evaluate(expr_str,
+        Object::Handle(zone, instance.Evaluate(receiver_cls,
+                                               expr_str,
                                                Array::empty_array(),
                                                Array::empty_array()));
     result.PrintJSON(js, true);
@@ -2158,8 +2160,7 @@
   }
   js->PrintError(kInvalidParams,
                  "%s: invalid 'targetId' parameter: "
-                 "id '%s' does not correspond to a "
-                 "library, class, or instance", js->method(), target_id);
+                 "Cannot evaluate against a VM-internal object", js->method());
   return true;
 }
 
@@ -2285,130 +2286,11 @@
 }
 
 
-class LibraryCoverageFilter : public CoverageFilter {
- public:
-  explicit LibraryCoverageFilter(const Library& lib) : lib_(lib) {}
-  bool ShouldOutputCoverageFor(const Library& lib,
-                               const Script& script,
-                               const Class& cls,
-                               const Function& func) const {
-    return lib.raw() == lib_.raw();
-  }
- private:
-  const Library& lib_;
-};
-
-
-class ScriptCoverageFilter : public CoverageFilter {
- public:
-  explicit ScriptCoverageFilter(const Script& script)
-      : script_(script) {}
-  bool ShouldOutputCoverageFor(const Library& lib,
-                               const Script& script,
-                               const Class& cls,
-                               const Function& func) const {
-    return script.raw() == script_.raw();
-  }
- private:
-  const Script& script_;
-};
-
-
-class ClassCoverageFilter : public CoverageFilter {
- public:
-  explicit ClassCoverageFilter(const Class& cls) : cls_(cls) {}
-  bool ShouldOutputCoverageFor(const Library& lib,
-                               const Script& script,
-                               const Class& cls,
-                               const Function& func) const {
-    return cls.raw() == cls_.raw();
-  }
- private:
-  const Class& cls_;
-};
-
-
-class FunctionCoverageFilter : public CoverageFilter {
- public:
-  explicit FunctionCoverageFilter(const Function& func) : func_(func) {}
-  bool ShouldOutputCoverageFor(const Library& lib,
-                               const Script& script,
-                               const Class& cls,
-                               const Function& func) const {
-    return func.raw() == func_.raw();
-  }
- private:
-  const Function& func_;
-};
-
-
-static bool GetHitsOrSites(Thread* thread, JSONStream* js, bool as_sites) {
-  if (!thread->isolate()->compilation_allowed()) {
-    js->PrintError(kFeatureDisabled,
-        "Cannot get coverage data when running a precompiled program.");
-    return true;
-  }
-  if (!js->HasParam("targetId")) {
-    CodeCoverage::PrintJSON(thread, js, NULL, as_sites);
-    return true;
-  }
-  const char* target_id = js->LookupParam("targetId");
-  Object& obj = Object::Handle(LookupHeapObject(thread, target_id, NULL));
-  if (obj.raw() == Object::sentinel().raw()) {
-    PrintInvalidParamError(js, "targetId");
-    return true;
-  }
-  if (obj.IsScript()) {
-    ScriptCoverageFilter sf(Script::Cast(obj));
-    CodeCoverage::PrintJSON(thread, js, &sf, as_sites);
-    return true;
-  }
-  if (obj.IsLibrary()) {
-    LibraryCoverageFilter lf(Library::Cast(obj));
-    CodeCoverage::PrintJSON(thread, js, &lf, as_sites);
-    return true;
-  }
-  if (obj.IsClass()) {
-    ClassCoverageFilter cf(Class::Cast(obj));
-    CodeCoverage::PrintJSON(thread, js, &cf, as_sites);
-    return true;
-  }
-  if (obj.IsFunction()) {
-    FunctionCoverageFilter ff(Function::Cast(obj));
-    CodeCoverage::PrintJSON(thread, js, &ff, as_sites);
-    return true;
-  }
-  js->PrintError(kInvalidParams,
-                 "%s: invalid 'targetId' parameter: "
-                 "id '%s' does not correspond to a "
-                 "script, library, class, or function",
-                 js->method(), target_id);
-  return true;
-}
-
-
-static const MethodParameter* get_coverage_params[] = {
-  RUNNABLE_ISOLATE_PARAMETER,
-  new IdParameter("targetId", false),
-  NULL,
-};
-
-
-static bool GetCoverage(Thread* thread, JSONStream* js) {
-  // TODO(rmacnak): Remove this response; it is subsumed by GetCallSiteData.
-  return GetHitsOrSites(thread, js, false);
-}
-
-
-static const char* kCallSitesStr = "_CallSites";
-static const char* kCoverageStr = "Coverage";
-static const char* kPossibleBreakpointsStr = "PossibleBreakpoints";
-
-
 static const char* const report_enum_names[] = {
-  kCallSitesStr,
-  kCoverageStr,
-  kPossibleBreakpointsStr,
+  SourceReport::kCallSitesStr,
+  SourceReport::kCoverageStr,
+  SourceReport::kPossibleBreakpointsStr,
+  SourceReport::kProfileStr,
   NULL,
 };
 
@@ -2436,12 +2318,14 @@
   const char** reports = reports_parameter->Parse(thread->zone(), reports_str);
   intptr_t report_set = 0;
   while (*reports != NULL) {
-    if (strcmp(*reports, kCallSitesStr) == 0) {
+    if (strcmp(*reports, SourceReport::kCallSitesStr) == 0) {
       report_set |= SourceReport::kCallSites;
-    } else if (strcmp(*reports, kCoverageStr) == 0) {
+    } else if (strcmp(*reports, SourceReport::kCoverageStr) == 0) {
       report_set |= SourceReport::kCoverage;
-    } else if (strcmp(*reports, kPossibleBreakpointsStr) == 0) {
+    } else if (strcmp(*reports, SourceReport::kPossibleBreakpointsStr) == 0) {
       report_set |= SourceReport::kPossibleBreakpoints;
+    } else if (strcmp(*reports, SourceReport::kProfileStr) == 0) {
+      report_set |= SourceReport::kProfile;
     }
     reports++;
   }
@@ -2490,18 +2374,6 @@
 }
 
 
-static const MethodParameter* get_call_site_data_params[] = {
-  RUNNABLE_ISOLATE_PARAMETER,
-  new IdParameter("targetId", false),
-  NULL,
-};
-
-
-static bool GetCallSiteData(Thread* thread, JSONStream* js) {
-  return GetHitsOrSites(thread, js, true);
-}
-
-
 static bool AddBreakpointCommon(Thread* thread,
                                 JSONStream* js,
                                 const String& script_uri) {
@@ -2872,9 +2744,8 @@
   "all",
 #define DEFINE_NAME(name, unused)                                              \
   #name,
-ISOLATE_TIMELINE_STREAM_LIST(DEFINE_NAME)
+TIMELINE_STREAM_LIST(DEFINE_NAME)
 #undef DEFINE_NAME
-  "VM",
   NULL
 };
 
@@ -2917,9 +2788,8 @@
 
 #define SET_ENABLE_STREAM(name, unused)                                        \
   Timeline::SetStream##name##Enabled(HasStream(recorded_streams, #name));
-ISOLATE_TIMELINE_STREAM_LIST(SET_ENABLE_STREAM);
+TIMELINE_STREAM_LIST(SET_ENABLE_STREAM);
 #undef SET_ENABLE_STREAM
-  Timeline::SetVMStreamEnabled(HasStream(recorded_streams, "VM"));
 
   PrintSuccess(js);
 
@@ -3016,6 +2886,16 @@
     PrintSuccess(js);
     return true;
   }
+  if (isolate->message_handler()->should_pause_on_start()) {
+    isolate->message_handler()->set_should_pause_on_start(false);
+    isolate->SetResumeRequest();
+    if (Service::debug_stream.enabled()) {
+      ServiceEvent event(isolate, ServiceEvent::kResume);
+      Service::HandleEvent(&event);
+    }
+    PrintSuccess(js);
+    return true;
+  }
   if (isolate->message_handler()->is_paused_on_exit()) {
     isolate->message_handler()->set_should_pause_on_exit(false);
     isolate->SetResumeRequest();
@@ -3262,13 +3142,16 @@
 
 static const MethodParameter* request_heap_snapshot_params[] = {
   RUNNABLE_ISOLATE_PARAMETER,
+  new BoolParameter("collectGarbage", false /* not required */),
   NULL,
 };
 
 
 static bool RequestHeapSnapshot(Thread* thread, JSONStream* js) {
+  const bool collect_garbage =
+      BoolParameter::Parse(js->LookupParam("collectGarbage"), true);
   if (Service::graph_stream.enabled()) {
-    Service::SendGraphEvent(thread);
+    Service::SendGraphEvent(thread, collect_garbage);
   }
   // TODO(koda): Provide some id that ties this request to async response(s).
   JSONObject jsobj(js);
@@ -3277,11 +3160,11 @@
 }
 
 
-void Service::SendGraphEvent(Thread* thread) {
+void Service::SendGraphEvent(Thread* thread, bool collect_garbage) {
   uint8_t* buffer = NULL;
   WriteStream stream(&buffer, &allocator, 1 * MB);
   ObjectGraph graph(thread);
-  intptr_t node_count = graph.Serialize(&stream);
+  intptr_t node_count = graph.Serialize(&stream, collect_garbage);
 
   // Chrome crashes receiving a single tens-of-megabytes blob, so send the
   // snapshot in megabyte-sized chunks instead.
@@ -3394,8 +3277,7 @@
 
 class ContainsAddressVisitor : public FindObjectVisitor {
  public:
-  ContainsAddressVisitor(Isolate* isolate, uword addr)
-      : FindObjectVisitor(isolate), addr_(addr) { }
+  explicit ContainsAddressVisitor(uword addr) : addr_(addr) { }
   virtual ~ContainsAddressVisitor() { }
 
   virtual uword filter_addr() const { return addr_; }
@@ -3426,7 +3308,7 @@
   {
     NoSafepointScope no_safepoint;
     Isolate* isolate = thread->isolate();
-    ContainsAddressVisitor visitor(isolate, addr);
+    ContainsAddressVisitor visitor(addr);
     object = isolate->heap()->FindObject(&visitor);
   }
 
@@ -3436,7 +3318,7 @@
 
   {
     NoSafepointScope no_safepoint;
-    ContainsAddressVisitor visitor(Dart::vm_isolate(), addr);
+    ContainsAddressVisitor visitor(addr);
     object = Dart::vm_isolate()->heap()->FindObject(&visitor);
   }
 
@@ -3715,7 +3597,7 @@
   JSONObject jsobj(js);
   jsobj.AddProperty("type", "Version");
   jsobj.AddProperty("major", static_cast<intptr_t>(3));
-  jsobj.AddProperty("minor", static_cast<intptr_t>(3));
+  jsobj.AddProperty("minor", static_cast<intptr_t>(4));
   jsobj.AddProperty("_privateMajor", static_cast<intptr_t>(0));
   jsobj.AddProperty("_privateMinor", static_cast<intptr_t>(0));
   return true;
@@ -4005,12 +3887,8 @@
     get_allocation_profile_params },
   { "_getAllocationSamples", GetAllocationSamples,
       get_allocation_samples_params },
-  { "_getCallSiteData", GetCallSiteData,
-    get_call_site_data_params },
   { "getClassList", GetClassList,
     get_class_list_params },
-  { "_getCoverage", GetCoverage,
-    get_coverage_params },
   { "_getCpuProfile", GetCpuProfile,
     get_cpu_profile_params },
   { "_getCpuProfileTimeline", GetCpuProfileTimeline,
@@ -4043,7 +3921,7 @@
     get_retained_size_params },
   { "_getRetainingPath", GetRetainingPath,
     get_retaining_path_params },
-  { "_getSourceReport", GetSourceReport,
+  { "getSourceReport", GetSourceReport,
     get_source_report_params },
   { "getStack", GetStack,
     get_stack_params },
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 164a94f..f38f7f83 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -105,7 +105,7 @@
       Dart_GetVMServiceAssetsArchive get_service_assets);
 
   static void SendEchoEvent(Isolate* isolate, const char* text);
-  static void SendGraphEvent(Thread* thread);
+  static void SendGraphEvent(Thread* thread, bool collect_garbage);
   static void SendInspectEvent(Isolate* isolate, const Object& inspectee);
 
   static void SendEmbedderEvent(Isolate* isolate,
@@ -144,6 +144,7 @@
   static StreamInfo graph_stream;
   static StreamInfo logging_stream;
   static StreamInfo extension_stream;
+  static StreamInfo timeline_stream;
 
   static bool ListenStream(const char* stream_id);
   static void CancelStream(const char* stream_id);
@@ -184,7 +185,8 @@
                                 const uint8_t* data,
                                 intptr_t size);
 
-  static void PostEvent(const char* stream_id,
+  static void PostEvent(Isolate* isolate,
+                        const char* stream_id,
                         const char* kind,
                         JSONStream* event);
 
diff --git a/runtime/vm/service/service.md b/runtime/vm/service/service.md
index 3153563..ee6d8e9 100644
--- a/runtime/vm/service/service.md
+++ b/runtime/vm/service/service.md
@@ -769,9 +769,10 @@
 -------- | -----------
 VM | VMUpdate
 Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate, ServiceExtensionAdded
-Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException, Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect
+Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException, Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect, None
 GC | GC
 Extension | Extension
+Timeline | TimelineEvents
 
 Additionally, some embedders provide the _Stdout_ and _Stderr_
 streams.  These streams allow the client to subscribe to writes to
@@ -970,11 +971,21 @@
   // The superclass of this class, if any.
   @Class super [optional];
 
-  // A list of interface types for this class.
+  // The supertype for this class, if any.
   //
   // The value will be of the kind: Type.
+  @Instance superType [optional];
+
+  // A list of interface types for this class.
+  //
+  // The values will be of the kind: Type.
   @Instance[] interfaces;
 
+  // The mixin type for this class, if any.
+  //
+  // The value will be of the kind: Type.
+  @Instance mixin [optional];
+
   // A list of fields in this class. Does not include fields from
   // superclasses.
   @Field[] fields;
@@ -1213,6 +1224,11 @@
   // This is provided for the Extension event.
   ExtensionData extensionData [optional];
 
+  // An array of TimelineEvents
+  //
+  // This is provided for the TimelineEvents event.
+  TimelineEvent[] timelineEvents [optional];
+
   // Is the isolate paused at an await, yield, or yield* statement?
   //
   // This is provided for the event kinds:
@@ -1271,6 +1287,10 @@
   // An isolate has started or resumed execution.
   Resume,
 
+  // Indicates an isolate is not yet runnable. Only appears in an Isolate's
+  // pauseEvent. Never sent over a stream.
+  None,
+
   // A breakpoint has been added for an isolate.
   BreakpointAdded,
 
@@ -2361,6 +2381,15 @@
 
 The _Success_ type is used to indicate that an operation completed successfully.
 
+### TimelineEvent
+
+```
+class TimelineEvent {
+}
+```
+
+An _TimelineEvent_ is an arbitrary map that contains a [Trace Event Format](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview) event.
+
 ### TypeArguments
 
 ```
@@ -2489,5 +2518,5 @@
 3.1 | Add the getSourceReport RPC.  The getObject RPC now accepts offset and count for string objects.  String objects now contain length, offset, and count properties.
 3.2 | Isolate objects now include the runnable bit and many debugger related RPCs will return an error if executed on an isolate before it is runnable.
 3.3 | Pause event now indicates if the isolate is paused at an await, yield, or yield* suspension point via the 'atAsyncSuspension' field. Resume command now supports the step parameter 'OverAsyncSuspension'. A Breakpoint added synthetically by an 'OverAsyncSuspension' resume command identifies itself as such via the 'isSyntheticAsyncContinuation' field.
-
+3.4 | Add the superType and mixin fields to Class. Added new pause event 'None'.
 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index 2e64c66..d34f439 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -42,6 +42,7 @@
       embedder_stream_id_(NULL),
       breakpoint_(NULL),
       top_frame_(NULL),
+      timeline_event_block_(NULL),
       extension_rpc_(NULL),
       exception_(NULL),
       at_async_jump_(false),
@@ -50,8 +51,13 @@
       bytes_(NULL),
       bytes_length_(0),
       timestamp_(OS::GetCurrentTimeMillis()) {
-  if ((event_kind == ServiceEvent::kPauseStart) ||
-      (event_kind == ServiceEvent::kPauseExit)) {
+  if ((event_kind == ServiceEvent::kPauseStart) &&
+      !isolate->message_handler()->is_paused_on_start()) {
+    // We will pause on start but the message handler lacks a valid
+    // paused timestamp because we haven't paused yet. Use the current time.
+    timestamp_ = OS::GetCurrentTimeMillis();
+  } else if ((event_kind == ServiceEvent::kPauseStart) ||
+             (event_kind == ServiceEvent::kPauseExit)) {
     timestamp_ = isolate->message_handler()->paused_timestamp();
   } else if (event_kind == ServiceEvent::kResume) {
     timestamp_ = isolate->last_resume_timestamp();
@@ -64,6 +70,7 @@
       kind_(TranslateEventKind(debugger_event->type())),
       breakpoint_(NULL),
       top_frame_(NULL),
+      timeline_event_block_(NULL),
       extension_rpc_(NULL),
       exception_(NULL),
       at_async_jump_(false),
@@ -115,6 +122,8 @@
       return "PauseInterrupted";
     case kPauseException:
       return "PauseException";
+    case kNone:
+      return "None";
     case kResume:
       return "Resume";
     case kBreakpointAdded:
@@ -137,6 +146,8 @@
       return "Illegal";
     case kExtension:
       return "Extension";
+    case kTimelineEvents:
+      return "TimelineEvents";
     default:
       UNREACHABLE();
       return "Unknown";
@@ -161,6 +172,7 @@
     case kPauseBreakpoint:
     case kPauseInterrupted:
     case kPauseException:
+    case kNone:
     case kResume:
     case kBreakpointAdded:
     case kBreakpointResolved:
@@ -181,6 +193,9 @@
     case kExtension:
       return Service::extension_stream.id();
 
+    case kTimelineEvents:
+      return Service::timeline_stream.id();
+
     default:
       UNREACHABLE();
       return NULL;
@@ -207,6 +222,9 @@
       jsobj.AddProperty("breakpoint", breakpoint());
     }
   }
+  if (kind() == kTimelineEvents) {
+    jsobj.AddProperty("timelineEvents", timeline_event_block_);
+  }
   if (kind() == kDebuggerSettingsUpdate) {
     JSONObject jssettings(&jsobj, "_debuggerSettings");
     isolate()->debugger()->PrintSettingsToJSONObject(&jssettings);
@@ -261,7 +279,7 @@
     jsobj->AddProperty("extensionKind",
                        extension_event_.event_kind->ToCString());
   }
-  if (kind() == kVMUpdate) {
+  if (isolate() == NULL) {
     jsobj->AddPropertyVM("vm");
   } else {
     jsobj->AddProperty("isolate", isolate());
diff --git a/runtime/vm/service_event.h b/runtime/vm/service_event.h
index e5afb6d..3ca26e4 100644
--- a/runtime/vm/service_event.h
+++ b/runtime/vm/service_event.h
@@ -8,6 +8,7 @@
 #include "vm/debugger.h"
 
 class DebuggerEvent;
+class TimelineEventBlock;
 
 namespace dart {
 
@@ -28,6 +29,7 @@
     kPauseBreakpoint,
     kPauseInterrupted,
     kPauseException,
+    kNone,               // isolate has not been made runnable yet.
     kResume,
     kBreakpointAdded,
     kBreakpointResolved,
@@ -43,6 +45,8 @@
 
     kExtension,
 
+    kTimelineEvents,
+
     kIllegal,
   };
 
@@ -182,6 +186,15 @@
     return timestamp_;
   }
 
+  const TimelineEventBlock* timeline_event_block() const {
+    return timeline_event_block_;
+  }
+
+  void set_timeline_event_block(const TimelineEventBlock* block) {
+    ASSERT(kind() == kTimelineEvents);
+    timeline_event_block_ = block;
+  }
+
   void PrintJSON(JSONStream* js) const;
 
   void PrintJSONHeader(JSONObject* jsobj) const;
@@ -193,6 +206,7 @@
   const char* embedder_stream_id_;
   Breakpoint* breakpoint_;
   ActivationFrame* top_frame_;
+  const TimelineEventBlock* timeline_event_block_;
   const String* extension_rpc_;
   const Object* exception_;
   bool at_async_jump_;
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index 86c8aab..cb14557 100644
--- a/runtime/vm/service_isolate.cc
+++ b/runtime/vm/service_isolate.cc
@@ -19,6 +19,7 @@
 #include "vm/service.h"
 #include "vm/symbols.h"
 #include "vm/thread_pool.h"
+#include "vm/timeline.h"
 
 namespace dart {
 
@@ -338,11 +339,17 @@
       return;
     }
 
+    bool got_unwind;
     {
       ASSERT(Isolate::Current() == NULL);
       StartIsolateScope start_scope(isolate);
       ServiceIsolate::ConstructExitMessageAndCache(isolate);
-      RunMain(isolate);
+      got_unwind = RunMain(isolate);
+    }
+
+    if (got_unwind) {
+      ShutdownIsolate(reinterpret_cast<uword>(isolate));
+      return;
     }
 
     ServiceIsolate::FinishedInitializing();
@@ -384,7 +391,7 @@
     ServiceIsolate::FinishedExiting();
   }
 
-  void RunMain(Isolate* I) {
+  bool RunMain(Isolate* I) {
     Thread* T = Thread::Current();
     ASSERT(I == T->isolate());
     StackZone zone(T);
@@ -397,7 +404,7 @@
         OS::Print("vm-service: Embedder did not install a script.");
       }
       // Service isolate is not supported by embedder.
-      return;
+      return false;
     }
     ASSERT(!root_library.IsNull());
     const String& entry_name = String::Handle(Z, String::New("main"));
@@ -409,7 +416,7 @@
       if (FLAG_trace_service) {
         OS::Print("vm-service: Embedder did not provide a main function.");
       }
-      return;
+      return false;
     }
     ASSERT(!entry.IsNull());
     const Object& result = Object::Handle(Z,
@@ -422,11 +429,15 @@
         OS::Print("vm-service: Calling main resulted in an error: %s",
                   error.ToErrorCString());
       }
-      return;
+      if (result.IsUnwindError()) {
+        return true;
+      }
+      return false;
     }
     ASSERT(result.IsReceivePort());
     const ReceivePort& rp = ReceivePort::Cast(result);
     ServiceIsolate::SetLoadPort(rp.Id());
+    return false;
   }
 };
 
@@ -461,7 +472,19 @@
 
 
 void ServiceIsolate::Shutdown() {
-  if (!IsRunning()) {
+  if (IsRunning()) {
+    {
+      MonitorLocker ml(monitor_);
+      shutting_down_ = true;
+    }
+    SendServiceExitMessage();
+    {
+      MonitorLocker ml(monitor_);
+      while (shutting_down_ && (port_ != ILLEGAL_PORT)) {
+        ml.Wait();
+      }
+    }
+  } else {
     if (isolate_ != NULL) {
       // TODO(johnmccutchan,turnidge) When it is possible to properly create
       // the VMService object and set up its shutdown handler in the service
@@ -469,18 +492,6 @@
       // can be removed.
       KillServiceIsolate();
     }
-    return;
-  }
-  {
-    MonitorLocker ml(monitor_);
-    shutting_down_ = true;
-  }
-  SendServiceExitMessage();
-  {
-    MonitorLocker ml(monitor_);
-    while (shutting_down_ && (port_ != ILLEGAL_PORT)) {
-      ml.Wait();
-    }
   }
   if (server_address_ != NULL) {
     free(server_address_);
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index b211fb7..5071bce 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -109,7 +109,7 @@
 
 static RawClass* GetClass(const Library& lib, const char* name) {
   const Class& cls = Class::Handle(
-      lib.LookupClass(String::Handle(Symbols::New(name))));
+      lib.LookupClass(String::Handle(Symbols::New(Thread::Current(), name))));
   EXPECT(!cls.IsNull());  // No ambiguity error expected.
   return cls.raw();
 }
diff --git a/runtime/vm/signal_handler_android.cc b/runtime/vm/signal_handler_android.cc
index a85dbb7..d41eb59 100644
--- a/runtime/vm/signal_handler_android.cc
+++ b/runtime/vm/signal_handler_android.cc
@@ -14,6 +14,8 @@
 
 #if defined(HOST_ARCH_IA32)
   pc = static_cast<uintptr_t>(mcontext.gregs[REG_EIP]);
+#elif defined(HOST_ARCH_X64)
+  pc = static_cast<uintptr_t>(mcontext.gregs[REG_RIP]);
 #elif defined(HOST_ARCH_ARM)
   pc = static_cast<uintptr_t>(mcontext.arm_pc);
 #elif defined(HOST_ARCH_ARM64)
@@ -30,6 +32,8 @@
 
 #if defined(HOST_ARCH_IA32)
   fp = static_cast<uintptr_t>(mcontext.gregs[REG_EBP]);
+#elif defined(HOST_ARCH_X64)
+  fp = static_cast<uintptr_t>(mcontext.gregs[REG_RBP]);
 #elif defined(HOST_ARCH_ARM)
   fp = static_cast<uintptr_t>(mcontext.arm_fp);
 #elif defined(HOST_ARCH_ARM64)
@@ -47,6 +51,8 @@
 
 #if defined(HOST_ARCH_IA32)
   sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
+#elif defined(HOST_ARCH_X64)
+  sp = static_cast<uintptr_t>(mcontext.gregs[REG_RSP]);
 #elif defined(HOST_ARCH_ARM)
   sp = static_cast<uintptr_t>(mcontext.arm_sp);
 #elif defined(HOST_ARCH_ARM64)
@@ -63,6 +69,8 @@
 
 #if defined(HOST_ARCH_IA32)
   sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
+#elif defined(HOST_ARCH_X64)
+  sp = static_cast<uintptr_t>(mcontext.gregs[REG_RSP]);
 #elif defined(HOST_ARCH_ARM)
   sp = static_cast<uintptr_t>(mcontext.arm_sp);
 #elif defined(HOST_ARCH_ARM64)
@@ -79,6 +87,8 @@
 
 #if defined(HOST_ARCH_IA32)
   lr = 0;
+#elif defined(HOST_ARCH_X64)
+  lr = 0;
 #elif defined(HOST_ARCH_ARM)
   lr = static_cast<uintptr_t>(mcontext.arm_lr);
 #elif defined(HOST_ARCH_ARM64)
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
index e5d06c8..1fcb66b 100644
--- a/runtime/vm/simulator_arm.cc
+++ b/runtime/vm/simulator_arm.cc
@@ -1137,7 +1137,7 @@
 void Simulator::ClearExclusive() {
   MutexLocker ml(exclusive_access_lock_);
   // Remove the reservation for this thread.
-  SetExclusiveAccess(NULL);
+  SetExclusiveAccess(0);
 }
 
 
@@ -1539,7 +1539,7 @@
             (redirection->call_kind() == kBootstrapNativeCall) ||
             (redirection->call_kind() == kNativeCall)) {
           // Set the top_exit_frame_info of this simulator to the native stack.
-          set_top_exit_frame_info(Isolate::GetCurrentStackPointer());
+          set_top_exit_frame_info(Thread::GetCurrentStackPointer());
         }
         if (redirection->call_kind() == kRuntimeCall) {
           NativeArguments arguments;
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index a19311d..cef6aa2 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -1611,7 +1611,7 @@
         (redirection->call_kind() == kBootstrapNativeCall) ||
         (redirection->call_kind() == kNativeCall)) {
       // Set the top_exit_frame_info of this simulator to the native stack.
-      set_top_exit_frame_info(Isolate::GetCurrentStackPointer());
+      set_top_exit_frame_info(Thread::GetCurrentStackPointer());
     }
     if (redirection->call_kind() == kRuntimeCall) {
       NativeArguments* arguments =
diff --git a/runtime/vm/simulator_mips.cc b/runtime/vm/simulator_mips.cc
index 074fc8c..244b331 100644
--- a/runtime/vm/simulator_mips.cc
+++ b/runtime/vm/simulator_mips.cc
@@ -1250,7 +1250,7 @@
           (redirection->call_kind() == kBootstrapNativeCall) ||
           (redirection->call_kind() == kNativeCall)) {
         // Set the top_exit_frame_info of this simulator to the native stack.
-        set_top_exit_frame_info(Isolate::GetCurrentStackPointer());
+        set_top_exit_frame_info(Thread::GetCurrentStackPointer());
       }
       if (redirection->call_kind() == kRuntimeCall) {
         NativeArguments arguments;
@@ -1888,6 +1888,28 @@
             (fs_val <= ft_val) || isnan(fs_val) || isnan(ft_val));
         break;
       }
+      case COP1_TRUNC_W: {
+        switch (instr->FormatField()) {
+          case FMT_D: {
+            double fs_dbl = get_fregister_double(instr->FsField());
+            int32_t fs_int;
+            if (isnan(fs_dbl) || isinf(fs_dbl) || (fs_dbl > kMaxInt32) ||
+                (fs_dbl < kMinInt32)) {
+              fs_int = kMaxInt32;
+            } else {
+              fs_int = static_cast<int32_t>(fs_dbl);
+            }
+            set_fregister(instr->FdField(), fs_int);
+            break;
+          }
+          default: {
+            OS::PrintErr("DecodeCop1: 0x%x\n", instr->InstructionBits());
+            UnimplementedInstruction(instr);
+            break;
+          }
+        }
+        break;
+      }
       case COP1_CVT_D: {
         switch (instr->FormatField()) {
           case FMT_W: {
@@ -1902,34 +1924,6 @@
             set_fregister_double(instr->FdField(), fs_dbl);
             break;
           }
-          case FMT_L: {
-            int64_t fs_int = get_fregister_long(instr->FsField());
-            double fs_dbl = static_cast<double>(fs_int);
-            set_fregister_double(instr->FdField(), fs_dbl);
-            break;
-          }
-          default: {
-            OS::PrintErr("DecodeCop1: 0x%x\n", instr->InstructionBits());
-            UnimplementedInstruction(instr);
-            break;
-          }
-        }
-        break;
-      }
-      case COP1_CVT_W: {
-        switch (instr->FormatField()) {
-          case FMT_D: {
-            double fs_dbl = get_fregister_double(instr->FsField());
-            int32_t fs_int;
-            if (isnan(fs_dbl) || isinf(fs_dbl) || (fs_dbl > INT_MAX) ||
-                (fs_dbl < INT_MIN)) {
-              fs_int = INT_MIN;
-            } else {
-              fs_int = static_cast<int32_t>(fs_dbl);
-            }
-            set_fregister(instr->FdField(), fs_int);
-            break;
-          }
           default: {
             OS::PrintErr("DecodeCop1: 0x%x\n", instr->InstructionBits());
             UnimplementedInstruction(instr);
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 294a90b..c455d30 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -627,6 +627,27 @@
       }
     }
 
+    if (snapshot_code()) {
+      ICData& ic = ICData::Handle(thread->zone());
+      Object& funcOrCode = Object::Handle(thread->zone());
+      Code& code = Code::Handle(thread->zone());
+      Smi& entry_point = Smi::Handle(thread->zone());
+      for (intptr_t i = 0; i < backward_references_->length(); i++) {
+        if ((*backward_references_)[i].reference()->IsICData()) {
+          ic ^= (*backward_references_)[i].reference()->raw();
+          for (intptr_t j = 0; j < ic.NumberOfChecks(); j++) {
+            funcOrCode = ic.GetTargetOrCodeAt(j);
+            if (funcOrCode.IsCode()) {
+              code ^= funcOrCode.raw();
+              entry_point = Smi::FromAlignedAddress(code.EntryPoint());
+              ic.SetEntryPointAt(j, entry_point);
+            }
+          }
+        }
+      }
+    }
+
+
     // Validate the class table.
 #if defined(DEBUG)
     isolate->ValidateClassTable();
@@ -939,11 +960,6 @@
 }
 
 
-RawFunctionType* SnapshotReader::NewFunctionType() {
-  ALLOC_NEW_OBJECT(FunctionType);
-}
-
-
 RawTypeRef* SnapshotReader::NewTypeRef() {
   ALLOC_NEW_OBJECT(TypeRef);
 }
@@ -1049,8 +1065,8 @@
 }
 
 
-RawJSRegExp* SnapshotReader::NewJSRegExp() {
-  ALLOC_NEW_OBJECT(JSRegExp);
+RawRegExp* SnapshotReader::NewRegExp() {
+  ALLOC_NEW_OBJECT(RegExp);
 }
 
 
@@ -1126,11 +1142,27 @@
 }
 
 
-int32_t InstructionsWriter::GetOffsetFor(RawInstructions* instructions) {
-  intptr_t heap_size = instructions->Size();
+int32_t InstructionsWriter::GetOffsetFor(RawInstructions* instructions,
+                                         RawCode* code) {
+#if defined(PRODUCT)
+  // Instructions are only dedup in product mode because it obfuscates profiler
+  // results.
+  for (intptr_t i = 0; i < instructions_.length(); i++) {
+    if (instructions_[i].raw_insns_ == instructions) {
+      return instructions_[i].offset_;
+    }
+  }
+#endif
+
+  intptr_t payload_size = instructions->ptr()->size_;
+  payload_size = Utils::RoundUp(payload_size, OS::PreferredCodeAlignment());
+
   intptr_t offset = next_offset_;
-  next_offset_ += heap_size;
-  instructions_.Add(InstructionsData(instructions));
+  ASSERT(Utils::IsAligned(next_offset_, OS::PreferredCodeAlignment()));
+  next_offset_ += payload_size;
+  ASSERT(Utils::IsAligned(next_offset_, OS::PreferredCodeAlignment()));
+  instructions_.Add(InstructionsData(instructions, code, offset));
+
   return offset;
 }
 
@@ -1157,19 +1189,19 @@
 
 
 void InstructionsWriter::WriteAssembly() {
-  Zone* Z = Thread::Current()->zone();
+  Zone* zone = Thread::Current()->zone();
 
   // Handlify collected raw pointers as building the names below
   // will allocate on the Dart heap.
   for (intptr_t i = 0; i < instructions_.length(); i++) {
     InstructionsData& data = instructions_[i];
-    data.insns_ = &Instructions::Handle(Z, data.raw_insns_);
+    data.insns_ = &Instructions::Handle(zone, data.raw_insns_);
     ASSERT(data.raw_code_ != NULL);
-    data.code_ = &Code::Handle(Z, data.raw_code_);
+    data.code_ = &Code::Handle(zone, data.raw_code_);
   }
   for (intptr_t i = 0; i < objects_.length(); i++) {
     ObjectData& data = objects_[i];
-    data.obj_ = &Object::Handle(Z, data.raw_obj_);
+    data.obj_ = &Object::Handle(zone, data.raw_obj_);
   }
 
   stream_.Print(".text\n");
@@ -1188,8 +1220,8 @@
     WriteWordLiteral(0);
   }
 
-  Object& owner = Object::Handle(Z);
-  String& str = String::Handle(Z);
+  Object& owner = Object::Handle(zone);
+  String& str = String::Handle(zone);
 
   for (intptr_t i = 0; i < instructions_.length(); i++) {
     const Instructions& insns = *instructions_[i].insns_;
@@ -1197,32 +1229,7 @@
 
     ASSERT(insns.raw()->Size() % sizeof(uint64_t) == 0);
 
-    {
-      // 1. Write from the header to the entry point.
-      NoSafepointScope no_safepoint;
-
-      uword beginning = reinterpret_cast<uword>(insns.raw_ptr());
-      uword entry = beginning + Instructions::HeaderSize();
-
-      ASSERT(Utils::IsAligned(beginning, sizeof(uint64_t)));
-      ASSERT(Utils::IsAligned(entry, sizeof(uint64_t)));
-
-      // Write Instructions with the mark and VM heap bits set.
-      uword marked_tags = insns.raw_ptr()->tags_;
-      marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
-      marked_tags = RawObject::MarkBit::update(true, marked_tags);
-
-      WriteWordLiteral(marked_tags);
-      beginning += sizeof(uword);
-
-      for (uword* cursor = reinterpret_cast<uword*>(beginning);
-           cursor < reinterpret_cast<uword*>(entry);
-           cursor++) {
-        WriteWordLiteral(*cursor);
-      }
-    }
-
-    // 2. Write a label at the entry point.
+    // 1. Write a label at the entry point.
     owner = code.owner();
     if (owner.IsNull()) {
       const char* name = StubCode::NameOfStub(insns.EntryPoint());
@@ -1241,11 +1248,13 @@
     }
 
     {
-      // 3. Write from the entry point to the end.
+      // 2. Write from the entry point to the end.
       NoSafepointScope no_safepoint;
       uword beginning = reinterpret_cast<uword>(insns.raw()) - kHeapObjectTag;
       uword entry = beginning + Instructions::HeaderSize();
-      uword end = beginning + insns.raw()->Size();
+      uword payload_size = insns.size();
+      payload_size = Utils::RoundUp(payload_size, OS::PreferredCodeAlignment());
+      uword end = entry + payload_size;
 
       ASSERT(Utils::IsAligned(beginning, sizeof(uint64_t)));
       ASSERT(Utils::IsAligned(entry, sizeof(uint64_t)));
@@ -1297,27 +1306,9 @@
 }
 
 
-RawInstructions* InstructionsReader::GetInstructionsAt(int32_t offset,
-                                                       uword expected_tags) {
+uword InstructionsReader::GetInstructionsAt(int32_t offset) {
   ASSERT(Utils::IsAligned(offset, OS::PreferredCodeAlignment()));
-
-  RawInstructions* result =
-      reinterpret_cast<RawInstructions*>(
-          reinterpret_cast<uword>(instructions_buffer_) +
-          offset + kHeapObjectTag);
-
-#ifdef DEBUG
-  uword actual_tags = result->ptr()->tags_;
-  if (actual_tags != expected_tags) {
-    FATAL2("Instructions tag mismatch: expected %" Pd ", saw %" Pd,
-           expected_tags,
-           actual_tags);
-  }
-#endif
-
-  ASSERT(result->IsMarked());
-
-  return result;
+  return reinterpret_cast<uword>(instructions_buffer_) + offset;
 }
 
 
@@ -1483,20 +1474,16 @@
 
 void SnapshotReader::ProcessDeferredCanonicalizations() {
   Type& typeobj = Type::Handle();
-  FunctionType& funtypeobj = FunctionType::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, a function type, or a type argument.
+      // Object should either be a type or a type argument.
       if (objref->IsType()) {
         typeobj ^= objref->raw();
         newobj = typeobj.Canonicalize();
-      } else if (objref->IsFunctionType()) {
-        funtypeobj ^= objref->raw();
-        newobj = funtypeobj.Canonicalize();
       } else {
         ASSERT(objref->IsTypeArguments());
         typeargs ^= objref->raw();
@@ -1858,13 +1845,11 @@
 class ScriptVisitor : public ObjectVisitor {
  public:
   explicit ScriptVisitor(Thread* thread) :
-      ObjectVisitor(thread->isolate()),
       objHandle_(Object::Handle(thread->zone())),
       count_(0),
       scripts_(NULL) {}
 
   ScriptVisitor(Thread* thread, const Array* scripts) :
-      ObjectVisitor(thread->isolate()),
       objHandle_(Object::Handle(thread->zone())),
       count_(0),
       scripts_(scripts) {}
@@ -1932,11 +1917,13 @@
   ScriptVisitor script_visitor(thread(), &scripts_);
   heap()->IterateOldObjects(&script_visitor);
 
-  // Stash the symbol table away for writing and reading into the vm isolate,
-  // and reset the symbol table for the regular isolate so that we do not
-  // write these symbols into the snapshot of a regular dart isolate.
-  symbol_table_ = object_store->symbol_table();
-  Symbols::SetupSymbolTable(isolate());
+  if (vm_isolate_snapshot_buffer != NULL) {
+    // Stash the symbol table away for writing and reading into the vm isolate,
+    // and reset the symbol table for the regular isolate so that we do not
+    // write these symbols into the snapshot of a regular dart isolate.
+    symbol_table_ = object_store->symbol_table();
+    Symbols::SetupSymbolTable(isolate());
+  }
 
   forward_list_ = new ForwardList(thread(), SnapshotWriter::FirstObjectId());
   ASSERT(forward_list_ != NULL);
@@ -1951,7 +1938,11 @@
 
 FullSnapshotWriter::~FullSnapshotWriter() {
   delete forward_list_;
-  symbol_table_ = Array::null();
+  // We may run Dart code afterwards, restore the symbol table if needed.
+  if (!symbol_table_.IsNull()) {
+    isolate()->object_store()->set_symbol_table(symbol_table_);
+    symbol_table_ = Array::null();
+  }
   scripts_ = Array::null();
 }
 
@@ -2284,7 +2275,7 @@
 class WriteInlinedObjectVisitor : public ObjectVisitor {
  public:
   explicit WriteInlinedObjectVisitor(SnapshotWriter* writer)
-      : ObjectVisitor(Isolate::Current()), writer_(writer) {}
+      : writer_(writer) {}
 
   virtual void VisitObject(RawObject* obj) {
     intptr_t object_id = writer_->forward_list_->FindObject(obj);
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 978dbd1..25dab12 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -52,13 +52,12 @@
 class RawFloat32x4;
 class RawFloat64x2;
 class RawFunction;
-class RawFunctionType;
 class RawGrowableObjectArray;
 class RawICData;
 class RawImmutableArray;
 class RawInstructions;
 class RawInt32x4;
-class RawJSRegExp;
+class RawRegExp;
 class RawLanguageError;
 class RawLibrary;
 class RawLibraryPrefix;
@@ -371,7 +370,7 @@
                             OS::PreferredCodeAlignment()));
   }
 
-  RawInstructions* GetInstructionsAt(int32_t offset, uword expected_tags);
+  uword GetInstructionsAt(int32_t offset);
   RawObject* GetObjectAt(int32_t offset);
 
  private:
@@ -445,7 +444,6 @@
   RawDouble* NewDouble(double value);
   RawUnresolvedClass* NewUnresolvedClass();
   RawType* NewType();
-  RawFunctionType* NewFunctionType();
   RawTypeRef* NewTypeRef();
   RawTypeParameter* NewTypeParameter();
   RawBoundedType* NewBoundedType();
@@ -483,10 +481,10 @@
   RawObject* NewInteger(int64_t value);
   RawStacktrace* NewStacktrace();
   RawWeakProperty* NewWeakProperty();
-  RawJSRegExp* NewJSRegExp();
+  RawRegExp* NewRegExp();
 
-  RawInstructions* GetInstructionsAt(int32_t offset, uword expected_tags) {
-    return instructions_reader_->GetInstructionsAt(offset, expected_tags);
+  uword GetInstructionsAt(int32_t offset) {
+    return instructions_reader_->GetInstructionsAt(offset);
   }
 
   RawObject* GetObjectAt(int32_t offset) {
@@ -612,7 +610,7 @@
   friend class ICData;
   friend class ImmutableArray;
   friend class Instructions;
-  friend class JSRegExp;
+  friend class RegExp;
   friend class LanguageError;
   friend class Library;
   friend class LibraryPrefix;
@@ -631,7 +629,6 @@
   friend class SubtypeTestCache;
   friend class TokenStream;
   friend class Type;
-  friend class FunctionType;
   friend class TypeArguments;
   friend class TypeParameter;
   friend class TypeRef;
@@ -865,26 +862,18 @@
 
   intptr_t binary_size() { return binary_size_; }
 
-  int32_t GetOffsetFor(RawInstructions* instructions);
+  int32_t GetOffsetFor(RawInstructions* instructions, RawCode* code);
 
   int32_t GetObjectOffsetFor(RawObject* raw_object);
 
-  void SetInstructionsCode(RawInstructions* insns, RawCode* code) {
-    for (intptr_t i = 0; i < instructions_.length(); i++) {
-      if (instructions_[i].raw_insns_ == insns) {
-        instructions_[i].raw_code_ = code;
-        return;
-      }
-    }
-    UNREACHABLE();
-  }
-
   void WriteAssembly();
 
  private:
   struct InstructionsData {
-    explicit InstructionsData(RawInstructions* insns)
-        : raw_insns_(insns), raw_code_(NULL) { }
+    explicit InstructionsData(RawInstructions* insns,
+                              RawCode* code,
+                              intptr_t offset)
+        : raw_insns_(insns), raw_code_(code), offset_(offset) { }
 
     union {
       RawInstructions* raw_insns_;
@@ -894,6 +883,7 @@
       RawCode* raw_code_;
       const Code* code_;
     };
+    intptr_t offset_;
   };
 
   struct ObjectData {
@@ -973,18 +963,14 @@
 
   static intptr_t FirstObjectId();
 
-  int32_t GetInstructionsId(RawInstructions* instructions) {
-    return instructions_writer_->GetOffsetFor(instructions);
+  int32_t GetInstructionsId(RawInstructions* instructions, RawCode* code) {
+    return instructions_writer_->GetOffsetFor(instructions, code);
   }
 
   int32_t GetObjectId(RawObject* raw) {
     return instructions_writer_->GetObjectOffsetFor(raw);
   }
 
-  void SetInstructionsCode(RawInstructions* instructions, RawCode* code) {
-    return instructions_writer_->SetInstructionsCode(instructions, code);
-  }
-
   void WriteFunctionId(RawFunction* func, bool owner_is_class);
 
   RawFunction* IsSerializableClosure(RawClosure* closure);
@@ -1051,6 +1037,7 @@
   friend class RawArray;
   friend class RawClass;
   friend class RawClosureData;
+  friend class RawCode;
   friend class RawContextScope;
   friend class RawExceptionHandlers;
   friend class RawField;
@@ -1058,7 +1045,7 @@
   friend class RawGrowableObjectArray;
   friend class RawImmutableArray;
   friend class RawInstructions;
-  friend class RawJSRegExp;
+  friend class RawRegExp;
   friend class RawLibrary;
   friend class RawLinkedHashMap;
   friend class RawLiteralToken;
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index 26dccc8..573addf 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -943,7 +943,7 @@
   Script& script = Script::Handle(Script::New(url,
                                               source,
                                               RawScript::kScriptTag));
-  const String& lib_url = String::Handle(Symbols::New("TestLib"));
+  const String& lib_url = String::Handle(Symbols::New(thread, "TestLib"));
   Library& lib = Library::Handle(Library::New(lib_url));
   lib.Register();
   EXPECT(CompilerTest::TestCompileScript(lib, script));
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index bbd35ab..1d3e818 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -5,11 +5,19 @@
 #include "vm/source_report.h"
 
 #include "vm/compiler.h"
+#include "vm/isolate.h"
 #include "vm/object.h"
 #include "vm/object_store.h"
+#include "vm/profiler.h"
+#include "vm/profiler_service.h"
 
 namespace dart {
 
+const char* SourceReport::kCallSitesStr = "_CallSites";
+const char* SourceReport::kCoverageStr = "Coverage";
+const char* SourceReport::kPossibleBreakpointsStr = "PossibleBreakpoints";
+const char* SourceReport::kProfileStr = "_Profile";
+
 SourceReport::SourceReport(intptr_t report_set, CompileMode compile_mode)
     : report_set_(report_set),
       compile_mode_(compile_mode),
@@ -17,6 +25,7 @@
       script_(NULL),
       start_pos_(TokenPosition::kNoSource),
       end_pos_(TokenPosition::kNoSource),
+      profile_(Isolate::Current()),
       next_script_index_(0) {
 }
 
@@ -32,6 +41,13 @@
   script_table_entries_.Clear();
   script_table_.Clear();
   next_script_index_ = 0;
+  if (IsReportRequested(kProfile)) {
+    // Build the profile.
+    SampleFilter samplesForIsolate(thread_->isolate(),
+                                   Thread::kMutatorTask,
+                                   -1, -1);
+    profile_.Build(thread, &samplesForIsolate, Profile::kNoTags);
+  }
 }
 
 
@@ -250,6 +266,58 @@
 }
 
 
+void SourceReport::PrintProfileData(JSONObject* jsobj,
+                                    ProfileFunction* profile_function) {
+  ASSERT(profile_function != NULL);
+  ASSERT(profile_function->NumSourcePositions() > 0);
+
+  {
+    JSONObject profile(jsobj, "profile");
+
+    {
+      JSONObject profileData(&profile, "metadata");
+      profileData.AddProperty("sampleCount", profile_.sample_count());
+    }
+
+    // Positions.
+    {
+      JSONArray positions(&profile, "positions");
+      for (intptr_t i = 0; i < profile_function->NumSourcePositions(); i++) {
+        const ProfileFunctionSourcePosition& position =
+            profile_function->GetSourcePosition(i);
+        if (position.token_pos().IsSourcePosition() &&
+            !position.token_pos().IsNoSource()) {
+          // Add as an integer.
+          positions.AddValue(position.token_pos().Pos());
+        } else {
+          // Add as a string.
+          positions.AddValue(position.token_pos().ToCString());
+        }
+      }
+    }
+
+    // Exclusive ticks.
+    {
+      JSONArray exclusiveTicks(&profile, "exclusiveTicks");
+      for (intptr_t i = 0; i < profile_function->NumSourcePositions(); i++) {
+        const ProfileFunctionSourcePosition& position =
+            profile_function->GetSourcePosition(i);
+        exclusiveTicks.AddValue(position.exclusive_ticks());
+      }
+    }
+    // Inclusive ticks.
+    {
+      JSONArray inclusiveTicks(&profile, "inclusiveTicks");
+      for (intptr_t i = 0; i < profile_function->NumSourcePositions(); i++) {
+        const ProfileFunctionSourcePosition& position =
+            profile_function->GetSourcePosition(i);
+        inclusiveTicks.AddValue(position.inclusive_ticks());
+      }
+    }
+  }
+}
+
+
 void SourceReport::PrintScriptTable(JSONArray* scripts) {
   for (int i = 0; i < script_table_entries_.length(); i++) {
     const Script* script = script_table_entries_[i].script;
@@ -311,6 +379,13 @@
   if (IsReportRequested(kPossibleBreakpoints)) {
     PrintPossibleBreakpointsData(&range, func, code);
   }
+  if (IsReportRequested(kProfile)) {
+    ProfileFunction* profile_function = profile_.FindFunction(func);
+    if ((profile_function != NULL) &&
+        (profile_function->NumSourcePositions() > 0)) {
+      PrintProfileData(&range, profile_function);
+    }
+  }
 }
 
 
diff --git a/runtime/vm/source_report.h b/runtime/vm/source_report.h
index 77bf6c2..cd2ad3a 100644
--- a/runtime/vm/source_report.h
+++ b/runtime/vm/source_report.h
@@ -9,6 +9,7 @@
 #include "vm/flags.h"
 #include "vm/hash_map.h"
 #include "vm/object.h"
+#include "vm/profiler_service.h"
 #include "vm/token_position.h"
 
 namespace dart {
@@ -22,8 +23,14 @@
     kCallSites           = 0x1,
     kCoverage            = 0x2,
     kPossibleBreakpoints = 0x4,
+    kProfile             = 0x8,
   };
 
+  static const char* kCallSitesStr;
+  static const char* kCoverageStr;
+  static const char* kPossibleBreakpointsStr;
+  static const char* kProfileStr;
+
   enum CompileMode {
     kNoCompile,
     kForceCompile
@@ -48,6 +55,7 @@
 
   Thread* thread() const { return thread_; }
   Zone* zone() const { return thread_->zone(); }
+  Isolate* isolate() const { return thread_->isolate(); }
 
   bool IsReportRequested(ReportKind report_kind);
   bool ShouldSkipFunction(const Function& func);
@@ -60,6 +68,7 @@
                          const Function& func, const Code& code);
   void PrintPossibleBreakpointsData(JSONObject* jsobj,
                                     const Function& func, const Code& code);
+  void PrintProfileData(JSONObject* jsobj, ProfileFunction* profile_function);
   void PrintScriptTable(JSONArray* jsarr);
 
   void VisitFunction(JSONArray* jsarr, const Function& func);
@@ -104,6 +113,7 @@
   const Script* script_;
   TokenPosition start_pos_;
   TokenPosition end_pos_;
+  Profile profile_;
   GrowableArray<ScriptTableEntry> script_table_entries_;
   DirectChainedHashMap<ScriptTableTrait> script_table_;
   intptr_t next_script_index_;
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index fb3d8d8..ebfe69e 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -28,7 +28,8 @@
   NoSafepointScope no_safepoint;
 #endif
   RawCode* code = GetCodeObject();
-  intptr_t cid = code->ptr()->owner_->GetClassId();
+  ASSERT(code != Object::null());
+  const intptr_t cid = code->ptr()->owner_->GetClassId();
   ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid);
   return cid == kNullCid || cid == kClassCid;
 }
@@ -100,8 +101,7 @@
     Array maps;
     maps = Array::null();
     Stackmap map;
-    const uword entry = reinterpret_cast<uword>(code.instructions()->ptr()) +
-                        Instructions::HeaderSize();
+    const uword entry = code.EntryPoint();
     map = code.GetStackmap(pc() - entry, &maps, &map);
     if (!map.IsNull()) {
       RawObject** first = reinterpret_cast<RawObject**>(sp());
@@ -112,19 +112,15 @@
       // visit frame slots which are marked as having objects.
       //
       // The layout of the frame is (lower addresses to the right):
-      // | spill slots | outgoing arguments | saved registers |
-      // |XXXXXXXXXXXXX|--------------------|XXXXXXXXXXXXXXXXX|
+      // | spill slots | outgoing arguments | saved registers | slow-path args |
+      // |XXXXXXXXXXXXX|--------------------|XXXXXXXXXXXXXXXXX|XXXXXXXXXXXXXXXX|
       //
       // The spill slots and any saved registers are described in the stack
       // map.  The outgoing arguments are assumed to be tagged; the number
       // of outgoing arguments is not explicitly tracked.
-      //
-      // TODO(kmillikin): This does not handle slow path calls with
-      // arguments, where the arguments are pushed after the live registers.
-      // Enable such calls.
       intptr_t length = map.Length();
       // Spill slots are at the 'bottom' of the frame.
-      intptr_t spill_slot_count = length - map.RegisterBitCount();
+      intptr_t spill_slot_count = length - map.SlowPathBitCount();
       for (intptr_t bit = 0; bit < spill_slot_count; ++bit) {
         if (map.IsObject(bit)) {
           visitor->VisitPointer(last);
@@ -154,6 +150,8 @@
       visitor->VisitPointers(first, last);
       return;
     }
+
+    // No stack map, fall through.
   }
   // For normal unoptimized Dart frames and Stub frames each slot
   // between the first and last included are tagged objects.
diff --git a/runtime/vm/store_buffer.cc b/runtime/vm/store_buffer.cc
index cc0a816..b257c0a 100644
--- a/runtime/vm/store_buffer.cc
+++ b/runtime/vm/store_buffer.cc
@@ -100,12 +100,13 @@
   BlockStack<Block::kSize>::PushBlockImpl(block);
   if ((policy == kCheckThreshold) && Overflowed()) {
     MutexLocker ml(mutex_);
-    Isolate* isolate = Isolate::Current();
+    Thread* thread = Thread::Current();
     // Sanity check: it makes no sense to schedule the GC in another isolate.
     // (If Isolate ever gets multiple store buffers, we should avoid this
     // coupling by passing in an explicit callback+parameter at construction.)
-    ASSERT(isolate->store_buffer() == this);
-    isolate->ScheduleInterrupts(Isolate::kVMInterrupt);
+    ASSERT(thread->isolate()->mutator_thread() == thread);
+    ASSERT(thread->isolate()->store_buffer() == this);
+    thread->ScheduleInterrupts(Thread::kVMInterrupt);
   }
 }
 
diff --git a/runtime/vm/stub_code.h b/runtime/vm/stub_code.h
index f451638..fed306b 100644
--- a/runtime/vm/stub_code.h
+++ b/runtime/vm/stub_code.h
@@ -35,7 +35,8 @@
   V(OptimizeFunction)                                                          \
   V(InvokeDartCode)                                                            \
   V(DebugStepCheck)                                                            \
-  V(ICLookup)                                                                  \
+  V(ICLookupThroughFunction)                                                   \
+  V(ICLookupThroughCode)                                                       \
   V(MegamorphicLookup)                                                         \
   V(FixAllocationStubTarget)                                                   \
   V(Deoptimize)                                                                \
@@ -62,6 +63,7 @@
   V(Subtype2TestCache)                                                         \
   V(Subtype3TestCache)                                                         \
   V(CallClosureNoSuchMethod)                                                   \
+  V(FrameAwaitingMaterialization)                                              \
 
 // Is it permitted for the stubs above to refer to Object::null(), which is
 // allocated in the VM isolate and shared across all isolates.
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 6b8812e..e5a03c7 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -2110,7 +2110,7 @@
 //  R1: target entry point
 //  CODE_REG: target Code object
 //  R4: arguments descriptor
-void StubCode::GenerateICLookupStub(Assembler* assembler) {
+void StubCode::GenerateICLookupThroughFunctionStub(Assembler* assembler) {
   Label loop, found, miss;
   __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset()));
   __ ldr(R8, FieldAddress(R9, ICData::ic_data_offset()));
@@ -2144,6 +2144,46 @@
   __ Ret();
 }
 
+
+void StubCode::GenerateICLookupThroughCodeStub(Assembler* assembler) {
+  Label loop, found, miss;
+  __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset()));
+  __ ldr(R8, FieldAddress(R9, ICData::ic_data_offset()));
+  __ AddImmediate(R8, R8, Array::data_offset() - kHeapObjectTag);
+  // R8: first IC entry
+  __ LoadTaggedClassIdMayBeSmi(R1, R0);
+  // R1: receiver cid as Smi
+
+  __ Bind(&loop);
+  __ ldr(R2, Address(R8, 0));
+  __ cmp(R1, Operand(R2));
+  __ b(&found, EQ);
+  __ CompareImmediate(R2, Smi::RawValue(kIllegalCid));
+  __ b(&miss, EQ);
+
+  const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+  __ AddImmediate(R8, entry_length);  // Next entry.
+  __ b(&loop);
+
+  __ Bind(&found);
+  const intptr_t code_offset = ICData::CodeIndexFor(1) * kWordSize;
+  const intptr_t entry_offset = ICData::EntryPointIndexFor(1) * kWordSize;
+  __ ldr(R1, Address(R8, entry_offset));
+  __ ldr(CODE_REG, Address(R8, code_offset));
+  __ Ret();
+
+  __ Bind(&miss);
+  __ LoadIsolate(R2);
+  __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset()));
+  __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset()));
+  __ Ret();
+}
+
+
+void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
+  __ bkpt(0);
+}
+
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_ARM
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index 61c3a4b..bddf296 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -2163,7 +2163,7 @@
 //  R1: target entry point
 //  CODE_REG: target Code object
 //  R4: arguments descriptor
-void StubCode::GenerateICLookupStub(Assembler* assembler) {
+void StubCode::GenerateICLookupThroughFunctionStub(Assembler* assembler) {
   Label loop, found, miss;
   __ ldr(R4, FieldAddress(R5, ICData::arguments_descriptor_offset()));
   __ ldr(R8, FieldAddress(R5, ICData::ic_data_offset()));
@@ -2197,6 +2197,46 @@
   __ ret();
 }
 
+
+void StubCode::GenerateICLookupThroughCodeStub(Assembler* assembler) {
+  Label loop, found, miss;
+  __ ldr(R4, FieldAddress(R5, ICData::arguments_descriptor_offset()));
+  __ ldr(R8, FieldAddress(R5, ICData::ic_data_offset()));
+  __ AddImmediate(R8, R8, Array::data_offset() - kHeapObjectTag);
+  // R8: first IC entry
+  __ LoadTaggedClassIdMayBeSmi(R1, R0);
+  // R1: receiver cid as Smi
+
+  __ Bind(&loop);
+  __ ldr(R2, Address(R8, 0));
+  __ cmp(R1, Operand(R2));
+  __ b(&found, EQ);
+  __ CompareImmediate(R2, Smi::RawValue(kIllegalCid));
+  __ b(&miss, EQ);
+
+  const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+  __ AddImmediate(R8, R8, entry_length);  // Next entry.
+  __ b(&loop);
+
+  __ Bind(&found);
+  const intptr_t code_offset = ICData::CodeIndexFor(1) * kWordSize;
+  const intptr_t entry_offset = ICData::EntryPointIndexFor(1) * kWordSize;
+  __ ldr(R1, Address(R8, entry_offset));
+  __ ldr(CODE_REG, Address(R8, code_offset));
+  __ ret();
+
+  __ Bind(&miss);
+  __ LoadIsolate(R2);
+  __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset()));
+  __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset()));
+  __ ret();
+}
+
+
+void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
+  __ brk(0);
+}
+
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_ARM64
diff --git a/runtime/vm/stub_code_arm64_test.cc b/runtime/vm/stub_code_arm64_test.cc
index 7cc0b65..d3a3a46 100644
--- a/runtime/vm/stub_code_arm64_test.cc
+++ b/runtime/vm/stub_code_arm64_test.cc
@@ -20,13 +20,15 @@
 namespace dart {
 
 static Function* CreateFunction(const char* name) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  const String& class_name = String::Handle(Symbols::New(Thread::Current(),
+                                                         "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
   const Library& lib = Library::Handle(Library::New(class_name));
   owner_class.set_library(lib);
-  const String& function_name = String::ZoneHandle(Symbols::New(name));
+  const String& function_name = String::ZoneHandle(
+      Symbols::New(Thread::Current(), name));
   Function& function = Function::ZoneHandle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/stub_code_arm_test.cc b/runtime/vm/stub_code_arm_test.cc
index e7c5bb9..3f0fe4c 100644
--- a/runtime/vm/stub_code_arm_test.cc
+++ b/runtime/vm/stub_code_arm_test.cc
@@ -20,13 +20,15 @@
 namespace dart {
 
 static Function* CreateFunction(const char* name) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  const String& class_name = String::Handle(Symbols::New(Thread::Current(),
+                                                         "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
   const Library& lib = Library::Handle(Library::New(class_name));
   owner_class.set_library(lib);
-  const String& function_name = String::ZoneHandle(Symbols::New(name));
+  const String& function_name = String::ZoneHandle(
+      Symbols::New(Thread::Current(), name));
   Function& function = Function::ZoneHandle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 640f0ec..2a4ed9b 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -2084,7 +2084,18 @@
 // Result:
 //  EBX: target entry point
 //  EDX: arguments descriptor
-void StubCode::GenerateICLookupStub(Assembler* assembler) {
+void StubCode::GenerateICLookupThroughFunctionStub(Assembler* assembler) {
+  __ int3();
+}
+
+
+void StubCode::GenerateICLookupThroughCodeStub(Assembler* assembler) {
+  __ int3();
+}
+
+
+
+void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
   __ int3();
 }
 
diff --git a/runtime/vm/stub_code_ia32_test.cc b/runtime/vm/stub_code_ia32_test.cc
index a3c20ec..34e8ef3 100644
--- a/runtime/vm/stub_code_ia32_test.cc
+++ b/runtime/vm/stub_code_ia32_test.cc
@@ -20,13 +20,15 @@
 namespace dart {
 
 static Function* CreateFunction(const char* name) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  const String& class_name = String::Handle(Symbols::New(Thread::Current(),
+                                                         "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
   const Library& lib = Library::Handle(Library::New(class_name));
   owner_class.set_library(lib);
-  const String& function_name = String::ZoneHandle(Symbols::New(name));
+  const String& function_name = String::ZoneHandle(
+      Symbols::New(Thread::Current(), name));
   Function& function = Function::ZoneHandle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
index b4965c33..7ae26bb 100644
--- a/runtime/vm/stub_code_mips.cc
+++ b/runtime/vm/stub_code_mips.cc
@@ -2278,7 +2278,7 @@
 //  T1: target entry point
 //  CODE_REG: target Code object
 //  S4: arguments descriptor
-void StubCode::GenerateICLookupStub(Assembler* assembler) {
+void StubCode::GenerateICLookupThroughFunctionStub(Assembler* assembler) {
   Label loop, found, miss;
   __ lw(T6, FieldAddress(S5, ICData::ic_data_offset()));
   __ lw(S4, FieldAddress(S5, ICData::arguments_descriptor_offset()));
@@ -2311,6 +2311,45 @@
   __ Ret();
 }
 
+
+void StubCode::GenerateICLookupThroughCodeStub(Assembler* assembler) {
+  Label loop, found, miss;
+  __ lw(T6, FieldAddress(S5, ICData::ic_data_offset()));
+  __ lw(S4, FieldAddress(S5, ICData::arguments_descriptor_offset()));
+  __ AddImmediate(T6, T6, Array::data_offset() - kHeapObjectTag);
+  // T6: first IC entry.
+  __ LoadTaggedClassIdMayBeSmi(T1, T0);
+  // T1: receiver cid as Smi
+
+  __ Bind(&loop);
+  __ lw(T2, Address(T6, 0));
+  __ beq(T1, T2, &found);
+  ASSERT(Smi::RawValue(kIllegalCid) == 0);
+  __ beq(T2, ZR, &miss);
+
+  const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+  __ AddImmediate(T6, entry_length);  // Next entry.
+  __ b(&loop);
+
+  __ Bind(&found);
+  const intptr_t code_offset = ICData::CodeIndexFor(1) * kWordSize;
+  const intptr_t entry_offset = ICData::EntryPointIndexFor(1) * kWordSize;
+  __ lw(T1, Address(T6, entry_offset));
+  __ lw(CODE_REG, Address(T6, code_offset));
+  __ Ret();
+
+  __ Bind(&miss);
+  __ LoadIsolate(T2);
+  __ lw(CODE_REG, Address(T2, Isolate::ic_miss_code_offset()));
+  __ lw(T1, FieldAddress(CODE_REG, Code::entry_point_offset()));
+  __ Ret();
+}
+
+
+void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
+  __ break_(0);
+}
+
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_MIPS
diff --git a/runtime/vm/stub_code_mips_test.cc b/runtime/vm/stub_code_mips_test.cc
index 7f6d177..c058dcd 100644
--- a/runtime/vm/stub_code_mips_test.cc
+++ b/runtime/vm/stub_code_mips_test.cc
@@ -20,13 +20,15 @@
 namespace dart {
 
 static Function* CreateFunction(const char* name) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  const String& class_name = String::Handle(Symbols::New(Thread::Current(),
+                                                         "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
   const Library& lib = Library::Handle(Library::New(class_name));
   owner_class.set_library(lib);
-  const String& function_name = String::ZoneHandle(Symbols::New(name));
+  const String& function_name = String::ZoneHandle(
+      Symbols::New(Thread::Current(), name));
   Function& function = Function::ZoneHandle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index b33ee01..db210a1 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -2092,6 +2092,7 @@
           FieldAddress(RBX, MegamorphicCache::arguments_descriptor_offset()));
   __ movq(RDI, FieldAddress(RBX, MegamorphicCache::buckets_offset()));
   __ movq(R9, FieldAddress(RBX, MegamorphicCache::mask_offset()));
+  // R10: arguments descriptor (result).
   // RDI: cache buckets array.
   // RBX: mask.
   __ movq(RCX, RAX);
@@ -2144,7 +2145,7 @@
 //  RCX: target entry point
 //  CODE_REG: target Code object
 //  R10: arguments descriptor
-void StubCode::GenerateICLookupStub(Assembler* assembler) {
+void StubCode::GenerateICLookupThroughFunctionStub(Assembler* assembler) {
   Label loop, found, miss;
 
   __ movq(R13, FieldAddress(RBX, ICData::ic_data_offset()));
@@ -2181,6 +2182,49 @@
   __ ret();
 }
 
+
+void StubCode::GenerateICLookupThroughCodeStub(Assembler* assembler) {
+  Label loop, found, miss;
+
+  __ movq(R13, FieldAddress(RBX, ICData::ic_data_offset()));
+  __ movq(R10, FieldAddress(RBX, ICData::arguments_descriptor_offset()));
+  __ leaq(R13, FieldAddress(R13, Array::data_offset()));
+  // R13: first IC entry
+  __ LoadTaggedClassIdMayBeSmi(RAX, RDI);
+  // RAX: receiver cid as Smi
+
+  __ Bind(&loop);
+  __ movq(R9, Address(R13, 0));
+  __ cmpq(RAX, R9);
+  __ j(EQUAL, &found, Assembler::kNearJump);
+
+  ASSERT(Smi::RawValue(kIllegalCid) == 0);
+  __ testq(R9, R9);
+  __ j(ZERO, &miss, Assembler::kNearJump);
+
+  const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+  __ addq(R13, Immediate(entry_length));  // Next entry.
+  __ jmp(&loop);
+
+  __ Bind(&found);
+  const intptr_t code_offset = ICData::CodeIndexFor(1) * kWordSize;
+  const intptr_t entry_offset = ICData::EntryPointIndexFor(1) * kWordSize;
+  __ movq(RCX, Address(R13, entry_offset));
+  __ movq(CODE_REG, Address(R13, code_offset));
+  __ ret();
+
+  __ Bind(&miss);
+  __ LoadIsolate(RAX);
+  __ movq(CODE_REG, Address(RAX, Isolate::ic_miss_code_offset()));
+  __ movq(RCX, FieldAddress(CODE_REG, Code::entry_point_offset()));
+  __ ret();
+}
+
+
+void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
+  __ int3();
+}
+
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_X64
diff --git a/runtime/vm/stub_code_x64_test.cc b/runtime/vm/stub_code_x64_test.cc
index b320f60..6b9b2af 100644
--- a/runtime/vm/stub_code_x64_test.cc
+++ b/runtime/vm/stub_code_x64_test.cc
@@ -20,13 +20,15 @@
 namespace dart {
 
 static Function* CreateFunction(const char* name) {
-  const String& class_name = String::Handle(Symbols::New("ownerClass"));
+  const String& class_name = String::Handle(Symbols::New(Thread::Current(),
+                                                         "ownerClass"));
   const Script& script = Script::Handle();
   const Class& owner_class = Class::Handle(
       Class::New(class_name, script, TokenPosition::kNoSource));
   const Library& lib = Library::Handle(Library::New(class_name));
   owner_class.set_library(lib);
-  const String& function_name = String::ZoneHandle(Symbols::New(name));
+  const String& function_name = String::ZoneHandle(
+      Symbols::New(Thread::Current(), name));
   Function& function = Function::ZoneHandle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, false, owner_class,
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index d35dc6d..5fb54bc 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -28,12 +28,13 @@
 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_LITERAL)
 #undef DEFINE_SYMBOL_LITERAL
 
-  "",  // matches kKwTableStart.
+  "",  // matches kTokenTableStart.
 
-#define DEFINE_KEYWORD_SYMBOL_INDEX(t, s, p, a)                                \
+#define DEFINE_TOKEN_SYMBOL_INDEX(t, s, p, a)                                  \
   s,
-  DART_KEYWORD_LIST(DEFINE_KEYWORD_SYMBOL_INDEX)
-#undef DEFINE_KEYWORD_SYMBOL_INDEX
+  DART_TOKEN_LIST(DEFINE_TOKEN_SYMBOL_INDEX)
+  DART_KEYWORD_LIST(DEFINE_TOKEN_SYMBOL_INDEX)
+#undef DEFINE_TOKEN_SYMBOL_INDEX
 };
 
 RawString* StringFrom(const uint8_t* data, intptr_t len, Heap::Space space) {
@@ -61,6 +62,10 @@
     return result.raw();
   }
   bool Equals(const String& other) const {
+    ASSERT(other.HasHash());
+    if (other.Hash() != hash_) {
+      return false;
+    }
     return other.Equals(data_, len_);
   }
   intptr_t Hash() const { return hash_; }
@@ -82,6 +87,10 @@
   }
   RawString* ToSymbol() const;
   bool Equals(const String& other) const {
+    ASSERT(other.HasHash());
+    if (other.Hash() != hash_) {
+      return false;
+    }
     return other.Equals(str_, begin_index_, len_);
   }
   intptr_t Hash() const { return hash_; }
@@ -114,6 +123,10 @@
       : str1_(str1), str2_(str2), hash_(String::HashConcat(str1, str2)) {}
   RawString* ToSymbol() const;
   bool Equals(const String& other) const {
+    ASSERT(other.HasHash());
+    if (other.Hash() != hash_) {
+      return false;
+    }
     return other.EqualsConcat(str1_, str2_);
   }
   intptr_t Hash() const { return hash_; }
@@ -134,8 +147,22 @@
 
 class SymbolTraits {
  public:
+  static const char* Name() { return "SymbolTraits"; }
+
   static bool IsMatch(const Object& a, const Object& b) {
-    return String::Cast(a).Equals(String::Cast(b));
+    const String& a_str = String::Cast(a);
+    const String& b_str = String::Cast(b);
+    ASSERT(a_str.HasHash());
+    ASSERT(b_str.HasHash());
+    if (a_str.Hash() != b_str.Hash()) {
+      return false;
+    }
+    intptr_t a_len = a_str.Length();
+    if (a_len != b_str.Length()) {
+      return false;
+    }
+    // Use a comparison which does not consider the state of the canonical bit.
+    return a_str.Equals(b_str, 0, a_len);
   }
   template<typename CharType>
   static bool IsMatch(const CharArray<CharType>& array, const Object& obj) {
@@ -180,13 +207,13 @@
 }
 
 
-const String& Symbols::Keyword(Token::Kind keyword) {
-  const int kw_index = keyword - Token::kFirstKeyword;
-  ASSERT((0 <= kw_index) && (kw_index < Token::kNumKeywords));
-  // First keyword symbol is in symbol_handles_[kKwTableStart + 1].
-  const intptr_t keyword_id = Symbols::kKwTableStart + 1 + kw_index;
-  ASSERT(symbol_handles_[keyword_id] != NULL);
-  return *symbol_handles_[keyword_id];
+const String& Symbols::Token(Token::Kind token) {
+  const int tok_index = token;
+  ASSERT((0 <= tok_index) && (tok_index < Token::kNumTokens));
+  // First keyword symbol is in symbol_handles_[kTokenTableStart + 1].
+  const intptr_t token_id = Symbols::kTokenTableStart + 1 + tok_index;
+  ASSERT(symbol_handles_[token_id] != NULL);
+  return *symbol_handles_[token_id];
 }
 
 
@@ -212,9 +239,8 @@
     String* str = String::ReadOnlyHandle();
     *str = OneByteString::New(names[i], Heap::kOld);
     str->Hash();
-    str->SetCanonical();
-    bool present = table.Insert(*str);
-    ASSERT(!present);
+    *str ^= table.InsertOrGet(*str);
+    str->SetCanonical();  // Make canonical once entered.
     symbol_handles_[i] = str;
   }
 
@@ -227,9 +253,9 @@
     String* str = String::ReadOnlyHandle();
     *str = OneByteString::New(&ch, 1, Heap::kOld);
     str->Hash();
-    str->SetCanonical();
-    bool present = table.Insert(*str);
-    ASSERT(!present);
+    *str ^= table.InsertOrGet(*str);
+    ASSERT(predefined_[c] == NULL);
+    str->SetCanonical();  // Make canonical once entered.
     predefined_[c] = str->raw();
     symbol_handles_[idx] = str;
   }
@@ -294,9 +320,8 @@
   for (intptr_t i = 1; i < Symbols::kNullCharId; i++) {
     str = OneByteString::New(names[i], Heap::kOld);
     str.Hash();
-    str.SetCanonical();
-    bool present = table.Insert(str);
-    ASSERT(!present);
+    str ^= table.InsertOrGet(str);
+    str.SetCanonical();  // Make canonical once entered.
   }
 
   // Add Latin1 characters as Symbols, so that Symbols::FromCharCode is fast.
@@ -307,9 +332,8 @@
     uint8_t ch = static_cast<uint8_t>(c);
     str = OneByteString::New(&ch, 1, Heap::kOld);
     str.Hash();
-    str.SetCanonical();
-    bool present = table.Insert(str);
-    ASSERT(!present);
+    str ^= table.InsertOrGet(str);
+    str.SetCanonical();  // Make canonical once entered.
   }
 
   isolate->object_store()->set_symbol_table(table.Release());
@@ -375,8 +399,7 @@
    public:
     SymbolCollector(Thread* thread,
                     GrowableArray<String*>* symbols)
-        : ObjectVisitor(thread->isolate()),
-          symbols_(symbols),
+        : symbols_(symbols),
           zone_(thread->zone()) {}
 
     void VisitObject(RawObject* obj) {
@@ -422,63 +445,88 @@
 }
 
 
-RawString* Symbols::New(const char* cstr, intptr_t len) {
+RawString* Symbols::New(Thread* thread, const char* cstr, intptr_t len) {
   ASSERT((cstr != NULL) && (len >= 0));
   const uint8_t* utf8_array = reinterpret_cast<const uint8_t*>(cstr);
-  return Symbols::FromUTF8(utf8_array, len);
+  return Symbols::FromUTF8(thread, utf8_array, len);
 }
 
 
-RawString* Symbols::FromUTF8(const uint8_t* utf8_array, intptr_t array_len) {
+RawString* Symbols::FromUTF8(Thread* thread,
+                             const uint8_t* utf8_array,
+                             intptr_t array_len) {
   if (array_len == 0 || utf8_array == NULL) {
-    return FromLatin1(reinterpret_cast<uint8_t*>(NULL), 0);
+    return FromLatin1(thread, reinterpret_cast<uint8_t*>(NULL), 0);
   }
   Utf8::Type type;
   intptr_t len = Utf8::CodeUnitCount(utf8_array, array_len, &type);
   ASSERT(len != 0);
-  Zone* zone = Thread::Current()->zone();
+  Zone* zone = thread->zone();
   if (type == Utf8::kLatin1) {
     uint8_t* characters = zone->Alloc<uint8_t>(len);
     Utf8::DecodeToLatin1(utf8_array, array_len, characters, len);
-    return FromLatin1(characters, len);
+    return FromLatin1(thread, characters, len);
   }
   ASSERT((type == Utf8::kBMP) || (type == Utf8::kSupplementary));
   uint16_t* characters = zone->Alloc<uint16_t>(len);
   Utf8::DecodeToUTF16(utf8_array, array_len, characters, len);
-  return FromUTF16(characters, len);
+  return FromUTF16(thread, characters, len);
 }
 
 
-RawString* Symbols::FromLatin1(const uint8_t* latin1_array, intptr_t len) {
-  return NewSymbol(Latin1Array(latin1_array, len));
+RawString* Symbols::FromLatin1(Thread* thread,
+                               const uint8_t* latin1_array,
+                               intptr_t len) {
+  return NewSymbol(thread, Latin1Array(latin1_array, len));
 }
 
 
-RawString* Symbols::FromUTF16(const uint16_t* utf16_array, intptr_t len) {
-  return NewSymbol(UTF16Array(utf16_array, len));
+RawString* Symbols::FromUTF16(Thread* thread,
+                              const uint16_t* utf16_array,
+                              intptr_t len) {
+  return NewSymbol(thread, UTF16Array(utf16_array, len));
 }
 
 
-RawString* Symbols::FromUTF32(const int32_t* utf32_array, intptr_t len) {
-  return NewSymbol(UTF32Array(utf32_array, len));
+RawString* Symbols::FromUTF32(Thread* thread,
+                              const int32_t* utf32_array,
+                              intptr_t len) {
+  return NewSymbol(thread, UTF32Array(utf32_array, len));
 }
 
 
-RawString* Symbols::FromConcat(const String& str1, const String& str2) {
+RawString* Symbols::FromConcat(Thread* thread,
+                               const String& str1,
+                               const String& str2) {
   if (str1.Length() == 0) {
-    return New(str2);
+    return New(thread, str2);
   } else if (str2.Length() == 0) {
-    return New(str1);
+    return New(thread, str1);
   } else {
-    return NewSymbol(ConcatString(str1, str2));
+    return NewSymbol(thread, ConcatString(str1, str2));
   }
 }
 
 
+RawString* Symbols::FromGet(Thread* thread, const String& str) {
+  return FromConcat(thread, GetterPrefix(), str);
+}
+
+
+RawString* Symbols::FromSet(Thread* thread, const String& str) {
+  return FromConcat(thread, SetterPrefix(), str);
+}
+
+
+RawString* Symbols::FromDot(Thread* thread, const String& str) {
+  return FromConcat(thread, str, Dot());
+}
+
+
 // TODO(srdjan): If this becomes performance critical code, consider looking
 // up symbol from hash of pieces instead of concatenating them first into
 // a string.
-RawString* Symbols::FromConcatAll(
+RawString* Symbols::FromConcatAll(Thread* thread,
     const GrowableHandlePtrArray<const String>& strs) {
   const intptr_t strs_length = strs.length();
   GrowableArray<intptr_t> lengths(strs_length);
@@ -500,7 +548,7 @@
   }
   const bool is_one_byte_string = char_size == kOneByteChar;
 
-  Zone* zone = Thread::Current()->zone();
+  Zone* zone = thread->zone();
   if (is_one_byte_string) {
     uint8_t* buffer = zone->Alloc<uint8_t>(len_sum);
     const uint8_t* const orig_buffer = buffer;
@@ -518,7 +566,7 @@
       }
     }
     ASSERT(len_sum == buffer - orig_buffer);
-    return Symbols::FromLatin1(orig_buffer, len_sum);
+    return Symbols::FromLatin1(thread, orig_buffer, len_sum);
   } else {
     uint16_t* buffer = zone->Alloc<uint16_t>(len_sum);
     const uint16_t* const orig_buffer = buffer;
@@ -545,16 +593,14 @@
       }
     }
     ASSERT(len_sum == buffer - orig_buffer);
-    return Symbols::FromUTF16(orig_buffer, len_sum);
+    return Symbols::FromUTF16(thread, orig_buffer, len_sum);
   }
 }
 
 
 // StringType can be StringSlice, ConcatString, or {Latin1,UTF16,UTF32}Array.
 template<typename StringType>
-RawString* Symbols::NewSymbol(const StringType& str) {
-  Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
+RawString* Symbols::NewSymbol(Thread* thread, const StringType& str) {
   Zone* zone = thread->zone();
   String& symbol = String::Handle(zone);
   {
@@ -564,6 +610,7 @@
     table.Release();
   }
   if (symbol.IsNull()) {
+    Isolate* isolate = thread->isolate();
     SafepointMutexLocker ml(isolate->symbols_mutex());
     SymbolTable table(zone, isolate->object_store()->symbol_table());
     symbol ^= table.InsertNewOrGet(str);
@@ -576,8 +623,7 @@
 
 
 template<typename StringType>
-RawString* Symbols::Lookup(const StringType& str) {
-  Thread* thread = Thread::Current();
+RawString* Symbols::Lookup(Thread* thread, const StringType& str) {
   Isolate* isolate = thread->isolate();
   Zone* zone = thread->zone();
   String& symbol = String::Handle(zone);
@@ -600,42 +646,63 @@
 }
 
 
-RawString* Symbols::LookupFromConcat(const String& str1, const String& str2) {
+RawString* Symbols::LookupFromConcat(
+    Thread* thread, const String& str1, const String& str2) {
   if (str1.Length() == 0) {
-    return Lookup(str2);
+    return Lookup(thread, str2);
   } else if (str2.Length() == 0) {
-    return Lookup(str1);
+    return Lookup(thread, str1);
   } else {
-    return Lookup(ConcatString(str1, str2));
+    return Lookup(thread, ConcatString(str1, str2));
   }
 }
 
 
-RawString* Symbols::New(const String& str) {
+RawString* Symbols::LookupFromGet(Thread* thread, const String& str) {
+  return LookupFromConcat(thread, GetterPrefix(), str);
+}
+
+
+RawString* Symbols::LookupFromSet(Thread* thread, const String& str) {
+  return LookupFromConcat(thread, SetterPrefix(), str);
+}
+
+
+RawString* Symbols::LookupFromDot(Thread* thread, const String& str) {
+  return LookupFromConcat(thread, str, Dot());
+}
+
+
+RawString* Symbols::New(Thread* thread, const String& str) {
   if (str.IsSymbol()) {
     return str.raw();
   }
-  return New(str, 0, str.Length());
+  return New(thread, str, 0, str.Length());
 }
 
 
-RawString* Symbols::New(const String& str, intptr_t begin_index, intptr_t len) {
-  return NewSymbol(StringSlice(str, begin_index, len));
+RawString* Symbols::New(Thread* thread,
+                        const String& str,
+                        intptr_t begin_index,
+                        intptr_t len) {
+  return NewSymbol(thread, StringSlice(str, begin_index, len));
 }
 
 
 
-RawString* Symbols::NewFormatted(const char* format, ...) {
+RawString* Symbols::NewFormatted(Thread* thread, const char* format, ...) {
   va_list args;
   va_start(args, format);
-  RawString* result = NewFormattedV(format, args);
+  RawString* result = NewFormattedV(thread, format, args);
   NoSafepointScope no_safepoint;
   va_end(args);
   return result;
 }
 
 
-RawString* Symbols::NewFormattedV(const char* format, va_list args) {
+RawString* Symbols::NewFormattedV(Thread* thread,
+                                  const char* format,
+                                  va_list args) {
   va_list args_copy;
   va_copy(args_copy, args);
   intptr_t len = OS::VSNPrint(NULL, 0, format, args_copy);
@@ -645,13 +712,13 @@
   char* buffer = zone->Alloc<char>(len + 1);
   OS::VSNPrint(buffer, (len + 1), format, args);
 
-  return Symbols::New(buffer);
+  return Symbols::New(thread, buffer);
 }
 
 
-RawString* Symbols::FromCharCode(int32_t char_code) {
+RawString* Symbols::FromCharCode(Thread* thread, int32_t char_code) {
   if (char_code > kMaxOneCharCodeSymbol) {
-    return FromUTF32(&char_code, 1);
+    return FromUTF32(thread, &char_code, 1);
   }
   return predefined_[char_code];
 }
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 9390ee1..f20aa44 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -33,6 +33,7 @@
   V(DefaultLabel, ":L")                                                        \
   V(Other, "other")                                                            \
   V(Call, "call")                                                              \
+  V(GetCall, "get:call")                                                       \
   V(Current, "current")                                                        \
   V(_current, "_current")                                                      \
   V(MoveNext, "moveNext")                                                      \
@@ -55,6 +56,7 @@
   V(Values, "values")                                                          \
   V(_EnumNames, "_enum_names")                                                 \
   V(ExprTemp, ":expr_temp")                                                    \
+  V(FinallyRetVal, ":finally_ret_val")                                         \
   V(AnonymousClosure, "<anonymous closure>")                                   \
   V(AnonymousSignature, "<anonymous signature>")                               \
   V(ImplicitClosure, "<implicit closure>")                                     \
@@ -137,7 +139,6 @@
   V(Dynamic, "dynamic")                                                        \
   V(UnresolvedClass, "UnresolvedClass")                                        \
   V(Type, "_Type")                                                             \
-  V(FunctionType, "_FunctionType")                                             \
   V(TypeRef, "_TypeRef")                                                       \
   V(TypeParameter, "_TypeParameter")                                           \
   V(BoundedType, "_BoundedType")                                               \
@@ -200,15 +201,12 @@
   V(_RawReceivePortImpl, "_RawReceivePortImpl")                                \
   V(_SendPortImpl, "_SendPortImpl")                                            \
   V(_StackTrace, "_StackTrace")                                                \
-  V(JSSyntaxRegExp, "_JSSyntaxRegExp")                                         \
+  V(_RegExp, "_RegExp")                                                        \
   V(RegExp, "RegExp")                                                          \
-  V(Irregexp, ":irregexp")                                                     \
+  V(ColonMatcher, ":matcher")                                                  \
   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")                                                        \
@@ -226,34 +224,20 @@
   V(Float64x2List, "Float64x2List")                                            \
   V(Float32List, "Float32List")                                                \
   V(Float64List, "Float64List")                                                \
-  V(_Int8Array, "_Int8Array")                                                  \
-  V(_Int8ArrayFactory, "_Int8Array.")                                          \
-  V(_Uint8Array, "_Uint8Array")                                                \
-  V(_Uint8ArrayFactory, "_Uint8Array.")                                        \
-  V(_Uint8ClampedArray, "_Uint8ClampedArray")                                  \
-  V(_Uint8ClampedArrayFactory, "_Uint8ClampedArray.")                          \
-  V(_Int16Array, "_Int16Array")                                                \
-  V(_Int16ArrayFactory, "_Int16Array.")                                        \
-  V(_Uint16Array, "_Uint16Array")                                              \
-  V(_Uint16ArrayFactory, "_Uint16Array.")                                      \
-  V(_Int32Array, "_Int32Array")                                                \
-  V(_Int32ArrayFactory, "_Int32Array.")                                        \
-  V(_Uint32Array, "_Uint32Array")                                              \
-  V(_Uint32ArrayFactory, "_Uint32Array.")                                      \
-  V(_Int64Array, "_Int64Array")                                                \
-  V(_Int64ArrayFactory, "_Int64Array.")                                        \
-  V(_Uint64Array, "_Uint64Array")                                              \
-  V(_Uint64ArrayFactory, "_Uint64Array.")                                      \
-  V(_Float32x4Array, "_Float32x4Array")                                        \
-  V(_Float32x4ArrayFactory, "_Float32x4Array.")                                \
-  V(_Int32x4Array, "_Int32x4Array")                                            \
-  V(_Int32x4ArrayFactory, "_Int32x4Array.")                                    \
-  V(_Float64x2Array, "_Float64x2Array")                                        \
-  V(_Float64x2ArrayFactory, "_Float64x2Array.")                                \
-  V(_Float32Array, "_Float32Array")                                            \
-  V(_Float32ArrayFactory, "_Float32Array.")                                    \
-  V(_Float64Array, "_Float64Array")                                            \
-  V(_Float64ArrayFactory, "_Float64Array.")                                    \
+  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")                          \
@@ -286,8 +270,8 @@
   V(ByteDataDot, "ByteData.")                                                  \
   V(ByteDataDot_view, "ByteData._view")                                        \
   V(_ByteDataView, "_ByteDataView")                                            \
-  V(_ByteBuffer, "_ByteBuffer")                                                \
-  V(_ByteBufferDot_New, "_ByteBuffer._New")                                    \
+  V(ByteBuffer, "ByteBuffer")                                                  \
+  V(ByteBufferDot_New, "ByteBuffer._New")                                      \
   V(_WeakProperty, "_WeakProperty")                                            \
   V(_MirrorReference, "_MirrorReference")                                      \
   V(InvocationMirror, "_InvocationMirror")                                     \
@@ -309,8 +293,6 @@
   V(NullThrownError, "NullThrownError")                                        \
   V(IsolateSpawnException, "IsolateSpawnException")                            \
   V(BooleanExpression, "boolean expression")                                   \
-  V(Malformed, "malformed")                                                    \
-  V(Malbounded, "malbounded")                                                  \
   V(MegamorphicMiss, "megamorphic_miss")                                       \
   V(CommaSpace, ", ")                                                          \
   V(ColonSpace, ": ")                                                          \
@@ -318,6 +300,9 @@
   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")                                                       \
@@ -333,7 +318,6 @@
   V(ClosurizePrefix, "get:#")                                                  \
   V(SetterPrefix, "set:")                                                      \
   V(InitPrefix, "init:")                                                       \
-  V(_New, "_new")                                                              \
   V(Index, "index")                                                            \
   V(DartScheme, "dart:")                                                       \
   V(DartSchemePrivate, "dart:_")                                               \
@@ -424,12 +408,13 @@
     PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_INDEX)
 #undef DEFINE_SYMBOL_INDEX
 
-    kKwTableStart,  // First keyword at kKwTableStart + 1.
+    kTokenTableStart,  // First token at kTokenTableStart + 1.
 
-#define DEFINE_KEYWORD_SYMBOL_INDEX(t, s, p, a)                                \
+#define DEFINE_TOKEN_SYMBOL_INDEX(t, s, p, a)                                  \
     t##Id,
-    DART_KEYWORD_LIST(DEFINE_KEYWORD_SYMBOL_INDEX)
-#undef DEFINE_KEYWORD_SYMBOL_INDEX
+    DART_TOKEN_LIST(DEFINE_TOKEN_SYMBOL_INDEX)
+    DART_KEYWORD_LIST(DEFINE_TOKEN_SYMBOL_INDEX)
+#undef DEFINE_TOKEN_SYMBOL_INDEX
 
     kNullCharId,  // One char code symbol starts here and takes up 256 entries.
     kMaxPredefinedId = kNullCharId + kMaxOneCharCodeSymbol + 1,
@@ -499,9 +484,12 @@
   static const String& NewLine() {
     return *(symbol_handles_[kNullCharId + '\n']);
   }
-  static const String& DoubleQuotes() {
+  static const String& DoubleQuote() {
     return *(symbol_handles_[kNullCharId + '"']);
   }
+  static const String& SingleQuote() {
+    return *(symbol_handles_[kNullCharId + '\'']);
+  }
   static const String& LowercaseR() {
     return *(symbol_handles_[kNullCharId + 'r']);
   }
@@ -539,7 +527,7 @@
     return *(symbol_handles_[kNullCharId + '~']);
   }
 
-  static const String& Empty() { return *(symbol_handles_[kKwTableStart]); }
+  static const String& Empty() { return *(symbol_handles_[kTokenTableStart]); }
   static const String& False() { return *(symbol_handles_[kFALSEId]); }
   static const String& Library() { return *(symbol_handles_[kLIBRARYId]); }
   static const String& Super() { return *(symbol_handles_[kSUPERId]); }
@@ -557,11 +545,12 @@
   // Access methods for symbol handles stored in the vm isolate for keywords.
 #define DEFINE_SYMBOL_HANDLE_ACCESSOR(t, s, p, a)                              \
   static const String& t() { return *(symbol_handles_[t##Id]); }
+  DART_TOKEN_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR)
   DART_KEYWORD_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR)
 #undef DEFINE_SYMBOL_HANDLE_ACCESSOR
 
-  // Get symbol for scanner keyword.
-  static const String& Keyword(Token::Kind keyword);
+  // Get symbol for scanner token.
+  static const String& Token(Token::Kind token);
 
   // Initialize frequently used symbols in the vm isolate.
   static void InitOnce(Isolate* isolate);
@@ -584,41 +573,58 @@
   // Creates a Symbol given a C string that is assumed to contain
   // UTF-8 encoded characters and '\0' is considered a termination character.
   // TODO(7123) - Rename this to FromCString(....).
-  static RawString* New(const char* cstr) {
-    return New(cstr, strlen(cstr));
+  static RawString* New(Thread* thread, const char* cstr) {
+    return New(thread, cstr, strlen(cstr));
   }
-  static RawString* New(const char* cstr, intptr_t length);
+  static RawString* New(Thread* thread, const char* cstr, intptr_t length);
 
   // Creates a new Symbol from an array of UTF-8 encoded characters.
-  static RawString* FromUTF8(const uint8_t* utf8_array, intptr_t len);
+  static RawString* FromUTF8(Thread* thread,
+                             const uint8_t* utf8_array,
+                             intptr_t len);
 
   // Creates a new Symbol from an array of Latin-1 encoded characters.
-  static RawString* FromLatin1(const uint8_t* latin1_array, intptr_t len);
+  static RawString* FromLatin1(Thread* thread,
+                               const uint8_t* latin1_array,
+                               intptr_t len);
 
   // Creates a new Symbol from an array of UTF-16 encoded characters.
-  static RawString* FromUTF16(const uint16_t* utf16_array, intptr_t len);
+  static RawString* FromUTF16(Thread* thread,
+                              const uint16_t* utf16_array,
+                              intptr_t len);
 
   // Creates a new Symbol from an array of UTF-32 encoded characters.
-  static RawString* FromUTF32(const int32_t* utf32_array, intptr_t len);
+  static RawString* FromUTF32(Thread* thread,
+                              const int32_t* utf32_array,
+                              intptr_t len);
 
-  static RawString* New(const String& str);
-  static RawString* New(const String& str,
+  static RawString* New(Thread* thread, const String& str);
+  static RawString* New(Thread* thread,
+                        const String& str,
                         intptr_t begin_index,
                         intptr_t length);
 
-  static RawString* NewFormatted(const char* format, ...)
-      PRINTF_ATTRIBUTE(1, 2);
-  static RawString* NewFormattedV(const char* format, va_list args);
+  static RawString* NewFormatted(Thread* thread, const char* format, ...)
+      PRINTF_ATTRIBUTE(2, 3);
+  static RawString* NewFormattedV(Thread* thread,
+                                  const char* format,
+                                  va_list args);
 
-  static RawString* FromConcat(const String& str1, const String& str2);
+  static RawString* FromConcat(Thread* thread,
+                               const String& str1,
+                               const String& str2);
 
-  static RawString* FromConcatAll(
+  static RawString* FromConcatAll(Thread* thread,
       const GrowableHandlePtrArray<const String>& strs);
 
+  static RawString* FromGet(Thread* thread, const String& str);
+  static RawString* FromSet(Thread* thread, const String& str);
+  static RawString* FromDot(Thread* thread, const String& str);
+
   // Returns char* of predefined symbol.
   static const char* Name(SymbolId symbol);
 
-  static RawString* FromCharCode(int32_t char_code);
+  static RawString* FromCharCode(Thread* thread, int32_t char_code);
 
   static RawString** PredefinedAddress() {
     return reinterpret_cast<RawString**>(&predefined_);
@@ -628,10 +634,16 @@
 
   // Returns Symbol::Null if no symbol is found.
   template<typename StringType>
-  static RawString* Lookup(const StringType& str);
+  static RawString* Lookup(Thread* thread, const StringType& str);
 
   // Returns Symbol::Null if no symbol is found.
-  static RawString* LookupFromConcat(const String& str1, const String& str2);
+  static RawString* LookupFromConcat(Thread* thread,
+                                     const String& str1,
+                                     const String& str2);
+
+  static RawString* LookupFromGet(Thread* thread, const String& str);
+  static RawString* LookupFromSet(Thread* thread, const String& str);
+  static RawString* LookupFromDot(Thread* thread, const String& str);
 
  private:
   enum {
@@ -644,7 +656,7 @@
                        intptr_t* capacity);
 
   template<typename StringType>
-  static RawString* NewSymbol(const StringType& str);
+  static RawString* NewSymbol(Thread* thread, const StringType& str);
 
   static intptr_t LookupVMSymbol(RawObject* obj);
   static RawObject* GetVMSymbol(intptr_t object_id);
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index c5c6e70..5775145 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -4,11 +4,13 @@
 
 #include "vm/thread.h"
 
+#include "vm/compiler_stats.h"
 #include "vm/dart_api_state.h"
 #include "vm/growable_array.h"
 #include "vm/isolate.h"
 #include "vm/lockers.h"
 #include "vm/log.h"
+#include "vm/message_handler.h"
 #include "vm/native_entry.h"
 #include "vm/object.h"
 #include "vm/os_thread.h"
@@ -21,9 +23,18 @@
 
 namespace dart {
 
+
+DECLARE_FLAG(bool, trace_service);
+DECLARE_FLAG(bool, trace_service_verbose);
+
+
 Thread::~Thread() {
   // We should cleanly exit any isolate before destruction.
   ASSERT(isolate_ == NULL);
+  if (compiler_stats_ != NULL) {
+    delete compiler_stats_;
+    compiler_stats_ = NULL;
+  }
   // There should be no top api scopes at this point.
   ASSERT(api_top_scope() == NULL);
   // Delete the resusable api scope if there is one.
@@ -49,17 +60,21 @@
 
 Thread::Thread(Isolate* isolate)
     : BaseThread(false),
-      os_thread_(NULL),
-      thread_lock_(new Monitor()),
+      stack_limit_(0),
+      stack_overflow_flags_(0),
       isolate_(NULL),
       heap_(NULL),
+      top_exit_frame_info_(0),
+      store_buffer_block_(NULL),
+      vm_tag_(0),
+      task_kind_(kUnknownTask),
+      os_thread_(NULL),
+      thread_lock_(new Monitor()),
       zone_(NULL),
       api_reusable_scope_(NULL),
       api_top_scope_(NULL),
-      top_exit_frame_info_(0),
       top_resource_(NULL),
       long_jump_base_(NULL),
-      store_buffer_block_(NULL),
       no_callback_scope_depth_(0),
 #if defined(DEBUG)
       top_handle_scope_(NULL),
@@ -67,11 +82,15 @@
       no_safepoint_scope_depth_(0),
 #endif
       reusable_handles_(),
+      saved_stack_limit_(0),
+      deferred_interrupts_mask_(0),
+      deferred_interrupts_(0),
+      stack_overflow_count_(0),
       cha_(NULL),
       deopt_id_(0),
-      vm_tag_(0),
       pending_functions_(GrowableObjectArray::null()),
       sticky_error_(Error::null()),
+      compiler_stats_(NULL),
       REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
       REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
       safepoint_state_(0),
@@ -97,6 +116,13 @@
   if ((Dart::vm_isolate() != NULL) && (isolate != Dart::vm_isolate())) {
     InitVMConstants();
   }
+
+  if (FLAG_support_compiler_stats) {
+    compiler_stats_ = new CompilerStats(isolate);
+    if (FLAG_compiler_benchmark) {
+      compiler_stats_->EnableBenchmark();
+    }
+  }
 }
 
 
@@ -211,6 +237,7 @@
   Thread* thread = isolate->ScheduleThread(kIsMutatorThread);
   if (thread != NULL) {
     ASSERT(thread->store_buffer_block_ == NULL);
+    thread->task_kind_ = kMutatorTask;
     thread->StoreBufferAcquire();
     return true;
   }
@@ -222,7 +249,7 @@
   Thread* thread = Thread::Current();
   ASSERT(thread != NULL && thread->IsMutatorThread());
   DEBUG_ASSERT(!thread->IsAnyReusableHandleScopeActive());
-
+  thread->task_kind_ = kUnknownTask;
   Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL);
   ASSERT(thread->execution_state() == Thread::kThreadInVM);
@@ -239,7 +266,10 @@
 }
 
 
-bool Thread::EnterIsolateAsHelper(Isolate* isolate, bool bypass_safepoint) {
+bool Thread::EnterIsolateAsHelper(Isolate* isolate,
+                                  TaskKind kind,
+                                  bool bypass_safepoint) {
+  ASSERT(kind != kMutatorTask);
   const bool kIsNotMutatorThread = false;
   Thread* thread = isolate->ScheduleThread(kIsNotMutatorThread,
                                            bypass_safepoint);
@@ -250,6 +280,7 @@
     thread->store_buffer_block_ =
         thread->isolate()->store_buffer()->PopEmptyBlock();
     // This thread should not be the main mutator.
+    thread->task_kind_ = kind;
     ASSERT(!thread->IsMutatorThread());
     return true;
   }
@@ -262,6 +293,9 @@
   ASSERT(thread != NULL);
   ASSERT(!thread->IsMutatorThread());
   ASSERT(thread->execution_state() == Thread::kThreadInVM);
+  thread->task_kind_ = kUnknownTask;
+  // Clear since GC will not visit the thread once it is unscheduled.
+  thread->ClearReusableHandles();
   thread->StoreBufferRelease();
   Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL);
@@ -282,6 +316,177 @@
 }
 
 
+void Thread::SetStackLimitFromStackBase(uword stack_base) {
+  // Set stack limit.
+#if defined(USING_SIMULATOR)
+  // Ignore passed-in native stack top and use Simulator stack top.
+  Simulator* sim = Simulator::Current();  // May allocate a simulator.
+  ASSERT(isolate()->simulator() == sim);  // Isolate's simulator is current one.
+  stack_base = sim->StackTop();
+  // The overflow area is accounted for by the simulator.
+#endif
+  SetStackLimit(stack_base - OSThread::GetSpecifiedStackSize());
+}
+
+
+void Thread::SetStackLimit(uword limit) {
+  // 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_) {
+    // No interrupt pending, set stack_limit_ too.
+    stack_limit_ = limit;
+  }
+  saved_stack_limit_ = limit;
+}
+
+
+void Thread::ClearStackLimit() {
+  SetStackLimit(~static_cast<uword>(0));
+}
+
+
+/* static */
+uword Thread::GetCurrentStackPointer() {
+  // Since AddressSanitizer's detect_stack_use_after_return instruments the
+  // C++ code to give out fake stack addresses, we call a stub in that case.
+  ASSERT(StubCode::GetStackPointer_entry() != NULL);
+  uword (*func)() = reinterpret_cast<uword (*)()>(
+      StubCode::GetStackPointer_entry()->EntryPoint());
+  // But for performance (and to support simulators), we normally use a local.
+#if defined(__has_feature)
+#if __has_feature(address_sanitizer)
+  uword current_sp = func();
+  return current_sp;
+#else
+  uword stack_allocated_local_address = reinterpret_cast<uword>(&func);
+  return stack_allocated_local_address;
+#endif
+#else
+  uword stack_allocated_local_address = reinterpret_cast<uword>(&func);
+  return stack_allocated_local_address;
+#endif
+}
+
+
+void Thread::ScheduleInterrupts(uword interrupt_bits) {
+  MonitorLocker ml(thread_lock_);
+  ScheduleInterruptsLocked(interrupt_bits);
+}
+
+
+void Thread::ScheduleInterruptsLocked(uword interrupt_bits) {
+  ASSERT(thread_lock_->IsOwnedByCurrentThread());
+  ASSERT((interrupt_bits & ~kInterruptsMask) == 0);  // Must fit in mask.
+
+  // Check to see if any of the requested interrupts should be deferred.
+  uword defer_bits = interrupt_bits & deferred_interrupts_mask_;
+  if (defer_bits != 0) {
+    deferred_interrupts_ |= defer_bits;
+    interrupt_bits &= ~deferred_interrupts_mask_;
+    if (interrupt_bits == 0) {
+      return;
+    }
+  }
+
+  if (stack_limit_ == saved_stack_limit_) {
+    stack_limit_ = (~static_cast<uword>(0)) & ~kInterruptsMask;
+  }
+  stack_limit_ |= interrupt_bits;
+}
+
+
+uword Thread::GetAndClearInterrupts() {
+  MonitorLocker ml(thread_lock_);
+  if (stack_limit_ == saved_stack_limit_) {
+    return 0;  // No interrupt was requested.
+  }
+  uword interrupt_bits = stack_limit_ & kInterruptsMask;
+  stack_limit_ = saved_stack_limit_;
+  return interrupt_bits;
+}
+
+
+void Thread::DeferOOBMessageInterrupts() {
+  MonitorLocker ml(thread_lock_);
+  ASSERT(deferred_interrupts_mask_ == 0);
+  deferred_interrupts_mask_ = kMessageInterrupt;
+
+  if (stack_limit_ != saved_stack_limit_) {
+    // Defer any interrupts which are currently pending.
+    deferred_interrupts_ = stack_limit_ & deferred_interrupts_mask_;
+
+    // Clear deferrable interrupts, if present.
+    stack_limit_ &= ~deferred_interrupts_mask_;
+
+    if ((stack_limit_ & kInterruptsMask) == 0) {
+      // No other pending interrupts.  Restore normal stack limit.
+      stack_limit_ = saved_stack_limit_;
+    }
+  }
+  if (FLAG_trace_service && FLAG_trace_service_verbose) {
+    OS::Print("[+%" Pd64 "ms] Isolate %s deferring OOB interrupts\n",
+              Dart::timestamp(), isolate()->name());
+  }
+}
+
+
+void Thread::RestoreOOBMessageInterrupts() {
+  MonitorLocker ml(thread_lock_);
+  ASSERT(deferred_interrupts_mask_ == kMessageInterrupt);
+  deferred_interrupts_mask_ = 0;
+  if (deferred_interrupts_ != 0) {
+    if (stack_limit_ == saved_stack_limit_) {
+      stack_limit_ = (~static_cast<uword>(0)) & ~kInterruptsMask;
+    }
+    stack_limit_ |= deferred_interrupts_;
+    deferred_interrupts_ = 0;
+  }
+  if (FLAG_trace_service && FLAG_trace_service_verbose) {
+    OS::Print("[+%" Pd64 "ms] Isolate %s restoring OOB interrupts\n",
+              Dart::timestamp(), isolate()->name());
+  }
+}
+
+
+RawError* Thread::HandleInterrupts() {
+  uword interrupt_bits = GetAndClearInterrupts();
+  if ((interrupt_bits & kVMInterrupt) != 0) {
+    if (isolate()->store_buffer()->Overflowed()) {
+      if (FLAG_verbose_gc) {
+        OS::PrintErr("Scavenge scheduled by store buffer overflow.\n");
+      }
+      heap()->CollectGarbage(Heap::kNew);
+    }
+  }
+  if ((interrupt_bits & kMessageInterrupt) != 0) {
+    MessageHandler::MessageStatus status =
+        isolate()->message_handler()->HandleOOBMessages();
+    if (status != MessageHandler::kOK) {
+      // False result from HandleOOBMessages signals that the isolate should
+      // be terminating.
+      if (FLAG_trace_isolates) {
+        OS::Print("[!] Terminating isolate due to OOB message:\n"
+                  "\tisolate:    %s\n", isolate()->name());
+      }
+      Thread* thread = Thread::Current();
+      const Error& error = Error::Handle(thread->sticky_error());
+      ASSERT(!error.IsNull() && error.IsUnwindError());
+      thread->clear_sticky_error();
+      return error.raw();
+    }
+  }
+  return Error::null();
+}
+
+
+uword Thread::GetAndClearStackOverflowFlags() {
+  uword stack_overflow_flags = stack_overflow_flags_;
+  stack_overflow_flags_ = 0;
+  return stack_overflow_flags;
+}
+
+
 void Thread::StoreBufferBlockProcess(StoreBuffer::ThresholdPolicy policy) {
   StoreBufferRelease(policy);
   StoreBufferAcquire();
@@ -357,9 +562,14 @@
 }
 
 
-void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor) {
+void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor,
+                                 bool validate_frames) {
   ASSERT(visitor != NULL);
 
+  if (zone_ != NULL) {
+    zone_->VisitObjectPointers(visitor);
+  }
+
   // Visit objects in thread specific handles area.
   reusable_handles_.VisitObjectPointers(visitor);
 
@@ -374,6 +584,15 @@
     scope->local_handles()->VisitObjectPointers(visitor);
     scope = scope->previous();
   }
+
+  // Iterate over all the stack frames and visit objects on the stack.
+  StackFrameIterator frames_iterator(top_exit_frame_info(),
+                                     validate_frames);
+  StackFrame* frame = frames_iterator.NextFrame();
+  while (frame != NULL) {
+    frame->VisitObjectPointers(visitor);
+    frame = frames_iterator.NextFrame();
+  }
 }
 
 
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 2d8531c..8e126f5 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -23,6 +23,7 @@
 class CHA;
 class Class;
 class Code;
+class CompilerStats;
 class Error;
 class ExceptionHandlers;
 class Field;
@@ -82,10 +83,14 @@
     StubCode::FixAllocationStubTarget_entry()->code(), NULL)                   \
   V(RawCode*, invoke_dart_code_stub_,                                          \
     StubCode::InvokeDartCode_entry()->code(), NULL)                            \
+  V(RawCode*, call_to_runtime_stub_,                                           \
+    StubCode::CallToRuntime_entry()->code(), NULL)                             \
 
 #define CACHED_ADDRESSES_LIST(V)                                               \
   V(uword, update_store_buffer_entry_point_,                                   \
     StubCode::UpdateStoreBuffer_entry()->EntryPoint(), 0)                      \
+  V(uword, call_to_runtime_entry_point_,                                       \
+    StubCode::CallToRuntime_entry()->EntryPoint(), 0)                          \
   V(uword, native_call_wrapper_entry_point_,                                   \
     NativeEntry::NativeCallWrapperEntry(), 0)                                  \
   V(RawString**, predefined_symbols_address_,                                  \
@@ -114,6 +119,14 @@
 // must currently be called manually (issue 23474).
 class Thread : public BaseThread {
  public:
+  // The kind of task this thread is performing. Sampled by the profiler.
+  enum TaskKind {
+    kUnknownTask = 0x0,
+    kMutatorTask = 0x1,
+    kCompilerTask = 0x2,
+    kSweeperTask = 0x4,
+    kMarkerTask = 0x8,
+  };
   ~Thread();
 
   // The currently executing thread, or NULL if not yet initialized.
@@ -135,12 +148,71 @@
   // SweeperTask (which uses the class table, which is copy-on-write).
   // TODO(koda): Properly synchronize heap access to expand allowed operations.
   static bool EnterIsolateAsHelper(Isolate* isolate,
+                                   TaskKind kind,
                                    bool bypass_safepoint = false);
   static void ExitIsolateAsHelper(bool bypass_safepoint = false);
 
   // Empties the store buffer block into the isolate.
   void PrepareForGC();
 
+  void SetStackLimit(uword value);
+  void SetStackLimitFromStackBase(uword stack_base);
+  void ClearStackLimit();
+
+  // Returns the current C++ stack pointer. Equivalent taking the address of a
+  // stack allocated local, but plays well with AddressSanitizer.
+  static uword GetCurrentStackPointer();
+
+  // Access to the current stack limit for generated code.  This may be
+  // overwritten with a special value to trigger interrupts.
+  uword stack_limit_address() const {
+    return reinterpret_cast<uword>(&stack_limit_);
+  }
+  static intptr_t stack_limit_offset() {
+    return OFFSET_OF(Thread, stack_limit_);
+  }
+
+  // The true stack limit for this isolate.
+  uword saved_stack_limit() const { return saved_stack_limit_; }
+
+  // Stack overflow flags
+  enum {
+    kOsrRequest = 0x1,  // Current stack overflow caused by OSR request.
+  };
+
+  uword stack_overflow_flags_address() const {
+    return reinterpret_cast<uword>(&stack_overflow_flags_);
+  }
+  static intptr_t stack_overflow_flags_offset() {
+    return OFFSET_OF(Thread, stack_overflow_flags_);
+  }
+
+  int32_t IncrementAndGetStackOverflowCount() {
+    return ++stack_overflow_count_;
+  }
+
+  TaskKind task_kind() const {
+    return task_kind_;
+  }
+
+  // Retrieves and clears the stack overflow flags.  These are set by
+  // the generated code before the slow path runtime routine for a
+  // stack overflow is called.
+  uword GetAndClearStackOverflowFlags();
+
+  // Interrupt bits.
+  enum {
+    kVMInterrupt = 0x1,  // Internal VM checks: safepoints, store buffers, etc.
+    kMessageInterrupt = 0x2,  // An interrupt to process an out of band message.
+
+    kInterruptsMask = (kVMInterrupt | kMessageInterrupt),
+  };
+
+  void ScheduleInterrupts(uword interrupt_bits);
+  void ScheduleInterruptsLocked(uword interrupt_bits);
+  RawError* HandleInterrupts();
+  uword GetAndClearInterrupts();
+
   // OSThread corresponding to this thread.
   OSThread* os_thread() const { return os_thread_; }
   void set_os_thread(OSThread* os_thread) {
@@ -372,6 +444,8 @@
   void set_sticky_error(const Error& value);
   void clear_sticky_error();
 
+  CompilerStats* compiler_stats() { return compiler_stats_; }
+
 #if defined(DEBUG)
 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object)                                \
   void set_reusable_##object##_handle_scope_active(bool value) {               \
@@ -517,7 +591,7 @@
   Thread* next() const { return next_; }
 
   // Visit all object pointers.
-  void VisitObjectPointers(ObjectPointerVisitor* visitor);
+  void VisitObjectPointers(ObjectPointerVisitor* visitor, bool validate_frames);
 
   bool IsValidLocalHandle(Dart_Handle object) const;
   int CountLocalHandles() const;
@@ -529,33 +603,15 @@
  private:
   template<class T> T* AllocateReusableHandle();
 
-  OSThread* os_thread_;
-  Monitor* thread_lock_;
+  // Accessed from generated code:
+  uword stack_limit_;
+  uword stack_overflow_flags_;
   Isolate* isolate_;
   Heap* heap_;
-  Zone* zone_;
-  ApiLocalScope* api_reusable_scope_;
-  ApiLocalScope* api_top_scope_;
   uword top_exit_frame_info_;
-  StackResource* top_resource_;
-  LongJumpScope* long_jump_base_;
   StoreBufferBlock* store_buffer_block_;
-  int32_t no_callback_scope_depth_;
-#if defined(DEBUG)
-  HandleScope* top_handle_scope_;
-  int32_t no_handle_scope_depth_;
-  int32_t no_safepoint_scope_depth_;
-#endif
-  VMHandles reusable_handles_;
-
-  // Compiler state:
-  CHA* cha_;
-  intptr_t deopt_id_;  // Compilation specific counter.
   uword vm_tag_;
-  RawGrowableObjectArray* pending_functions_;
-
-  RawError* sticky_error_;
-
+  TaskKind task_kind_;
   // State that is cached in the TLS for fast access in generated code.
 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value)      \
   type_name member_name;
@@ -572,6 +628,34 @@
 LEAF_RUNTIME_ENTRY_LIST(DECLARE_MEMBERS)
 #undef DECLARE_MEMBERS
 
+  OSThread* os_thread_;
+  Monitor* thread_lock_;
+  Zone* zone_;
+  ApiLocalScope* api_reusable_scope_;
+  ApiLocalScope* api_top_scope_;
+  StackResource* top_resource_;
+  LongJumpScope* long_jump_base_;
+  int32_t no_callback_scope_depth_;
+#if defined(DEBUG)
+  HandleScope* top_handle_scope_;
+  int32_t no_handle_scope_depth_;
+  int32_t no_safepoint_scope_depth_;
+#endif
+  VMHandles reusable_handles_;
+  uword saved_stack_limit_;
+  uint16_t deferred_interrupts_mask_;
+  uint16_t deferred_interrupts_;
+  int32_t stack_overflow_count_;
+
+  // Compiler state:
+  CHA* cha_;
+  intptr_t deopt_id_;  // Compilation specific counter.
+  RawGrowableObjectArray* pending_functions_;
+
+  RawError* sticky_error_;
+
+  CompilerStats* compiler_stats_;
+
   // Reusable handles support.
 #define REUSABLE_HANDLE_FIELDS(object)                                         \
   object* object##_handle_;
@@ -618,13 +702,19 @@
     OSThread::SetCurrentTLS(reinterpret_cast<uword>(current));
   }
 
+  void DeferOOBMessageInterrupts();
+  void RestoreOOBMessageInterrupts();
+
 #define REUSABLE_FRIEND_DECLARATION(name)                                      \
   friend class Reusable##name##HandleScope;
 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION)
 #undef REUSABLE_FRIEND_DECLARATION
 
   friend class ApiZone;
+  friend class InterruptChecker;
   friend class Isolate;
+  friend class IsolateTestHelper;
+  friend class NoOOBMessageScope;
   friend class Simulator;
   friend class StackZone;
   friend class ThreadRegistry;
diff --git a/runtime/vm/thread_interrupter.cc b/runtime/vm/thread_interrupter.cc
index e117703..1e0d8cf 100644
--- a/runtime/vm/thread_interrupter.cc
+++ b/runtime/vm/thread_interrupter.cc
@@ -98,7 +98,7 @@
     }
     shutdown_ = true;
     // Notify.
-    monitor_->Notify();
+    shutdown_ml.Notify();
     ASSERT(initialized_);
     if (FLAG_trace_thread_interrupter) {
       OS::Print("ThreadInterrupter shutting down.\n");
@@ -163,8 +163,8 @@
   }
   {
     intptr_t interrupted_thread_count = 0;
-    current_wait_time_ = interrupt_period_;
     MonitorLocker wait_ml(monitor_);
+    current_wait_time_ = interrupt_period_;
     while (!shutdown_) {
       intptr_t r = wait_ml.WaitMicros(current_wait_time_);
 
@@ -183,7 +183,7 @@
       interrupted_thread_count = 0;
 
       // Temporarily drop the monitor while we interrupt threads.
-      monitor_->Exit();
+      wait_ml.Exit();
 
       {
         OSThreadIterator it;
@@ -197,7 +197,7 @@
       }
 
       // Take the monitor lock again.
-      monitor_->Enter();
+      wait_ml.Enter();
 
       // Now that we have the lock, check if we were signaled to wake up while
       // interrupting threads.
diff --git a/runtime/vm/thread_pool.cc b/runtime/vm/thread_pool.cc
index b281d5c..fb0f7d7 100644
--- a/runtime/vm/thread_pool.cc
+++ b/runtime/vm/thread_pool.cc
@@ -4,6 +4,7 @@
 
 #include "vm/thread_pool.h"
 
+#include "vm/dart.h"
 #include "vm/flags.h"
 #include "vm/lockers.h"
 
@@ -432,6 +433,9 @@
   ThreadJoinId join_id = os_thread->join_id();
   ThreadPool* pool;
 
+  // Set the thread's stack_base based on the current stack pointer.
+  os_thread->set_stack_base(Thread::GetCurrentStackPointer());
+
   {
     MonitorLocker ml(&worker->monitor_);
     ASSERT(worker->task_);
@@ -480,6 +484,12 @@
     // wait for the thread to exit by joining on it in Shutdown().
     delete worker;
   }
+
+  // Call the thread exit hook here to notify the embedder that the
+  // thread pool thread is exiting.
+  if (Dart::thread_exit_callback() != NULL) {
+    (*Dart::thread_exit_callback())();
+  }
 }
 
 }  // namespace dart
diff --git a/runtime/vm/thread_registry.cc b/runtime/vm/thread_registry.cc
index 111ae57..c660843 100644
--- a/runtime/vm/thread_registry.cc
+++ b/runtime/vm/thread_registry.cc
@@ -56,7 +56,6 @@
   // Remove thread from the active list for the isolate.
   RemoveFromActiveListLocked(thread);
   if (!is_mutator) {
-    ASSERT(thread->api_top_scope() == NULL);
     ReturnToFreelistLocked(thread);
   }
 }
@@ -65,22 +64,20 @@
 void ThreadRegistry::VisitObjectPointers(ObjectPointerVisitor* visitor,
                                          bool validate_frames) {
   MonitorLocker ml(threads_lock());
+  bool mutator_thread_visited = false;
   Thread* thread = active_list_;
   while (thread != NULL) {
-    if (thread->zone() != NULL) {
-      thread->zone()->VisitObjectPointers(visitor);
-    }
-    thread->VisitObjectPointers(visitor);
-    // Iterate over all the stack frames and visit objects on the stack.
-    StackFrameIterator frames_iterator(thread->top_exit_frame_info(),
-                                       validate_frames);
-    StackFrame* frame = frames_iterator.NextFrame();
-    while (frame != NULL) {
-      frame->VisitObjectPointers(visitor);
-      frame = frames_iterator.NextFrame();
+    thread->VisitObjectPointers(visitor, validate_frames);
+    if (mutator_thread_ == thread) {
+      mutator_thread_visited = true;
     }
     thread = thread->next_;
   }
+  // Visit mutator thread even if it is not in the active list because of
+  // api handles.
+  if (!mutator_thread_visited && (mutator_thread_ != NULL)) {
+    mutator_thread_->VisitObjectPointers(visitor, validate_frames);
+  }
 }
 
 
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index a20d7a4..aa006df 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -111,7 +111,7 @@
                          intptr_t id)
       : isolate_(isolate), monitor_(monitor), done_(done), id_(id) {}
   virtual void Run() {
-    Thread::EnterIsolateAsHelper(isolate_);
+    Thread::EnterIsolateAsHelper(isolate_, Thread::kUnknownTask);
     {
       Thread* thread = Thread::Current();
       // Create a zone (which is also a stack resource) and exercise it a bit.
@@ -259,7 +259,7 @@
       local_done_(false) {}
 
   virtual void Run() {
-    Thread::EnterIsolateAsHelper(isolate_);
+    Thread::EnterIsolateAsHelper(isolate_, Thread::kUnknownTask);
     {
       MonitorLocker ml(monitor_);
       ++*expected_count_;
@@ -534,7 +534,7 @@
   }
 
   virtual void Run() {
-    Thread::EnterIsolateAsHelper(isolate_);
+    Thread::EnterIsolateAsHelper(isolate_, Thread::kUnknownTask);
     {
       Thread* thread = Thread::Current();
       StackZone stack_zone(thread);
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index be86154..68e0784 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -10,6 +10,7 @@
 #include "vm/lockers.h"
 #include "vm/log.h"
 #include "vm/object.h"
+#include "vm/service_event.h"
 #include "vm/thread.h"
 #include "vm/timeline.h"
 
@@ -18,6 +19,7 @@
 #ifndef PRODUCT
 
 DEFINE_FLAG(bool, complete_timeline, false, "Record the complete timeline");
+DEFINE_FLAG(bool, startup_timeline, false, "Record the startup timeline");
 DEFINE_FLAG(bool, trace_timeline, false,
             "Trace timeline backend");
 DEFINE_FLAG(bool, trace_timeline_analysis, false,
@@ -110,7 +112,8 @@
 
 // Returns true if |streams| contains |stream| or "all". Not case sensitive.
 static bool HasStream(MallocGrowableArray<char*>* streams, const char* stream) {
-  if ((FLAG_timeline_dir != NULL) || FLAG_timing || FLAG_complete_timeline) {
+  if ((FLAG_timeline_dir != NULL) ||
+      FLAG_timing || FLAG_complete_timeline || FLAG_startup_timeline) {
     return true;
   }
   for (intptr_t i = 0; i < streams->length(); i++) {
@@ -133,39 +136,61 @@
       (FLAG_timeline_dir != NULL) || FLAG_timing || FLAG_complete_timeline;
   if (use_endless_recorder) {
     recorder_ = new TimelineEventEndlessRecorder();
+  } else if (FLAG_startup_timeline) {
+    recorder_ = new TimelineEventStartupRecorder();
   } else if (use_ring_recorder) {
     recorder_ = new TimelineEventRingRecorder();
   }
   enabled_streams_ = GetEnabledByDefaultTimelineStreams();
-  vm_stream_.Init("VM", HasStream(enabled_streams_, "VM"), NULL);
-  vm_api_stream_.Init("API",
-                      HasStream(enabled_streams_, "API"),
-                      &stream_API_enabled_);
   // Global overrides.
-#define ISOLATE_TIMELINE_STREAM_FLAG_DEFAULT(name, not_used)                   \
-  stream_##name##_enabled_ = HasStream(enabled_streams_, #name);
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_FLAG_DEFAULT)
-#undef ISOLATE_TIMELINE_STREAM_FLAG_DEFAULT
+#define TIMELINE_STREAM_FLAG_DEFAULT(name, not_used)                           \
+  stream_##name##_enabled_ = HasStream(enabled_streams_, #name);               \
+  stream_##name##_.Init(#name,                                                 \
+                        stream_##name##_enabled_,                              \
+                        &stream_##name##_enabled_);
+  TIMELINE_STREAM_LIST(TIMELINE_STREAM_FLAG_DEFAULT)
+#undef TIMELINE_STREAM_FLAG_DEFAULT
+
+  if (stream_Embedder_enabled_ &&
+      (Timeline::get_start_recording_cb() != NULL)) {
+    Timeline::get_start_recording_cb()();
+  }
 }
 
 
-void Timeline::SetVMStreamEnabled(bool enabled) {
-  vm_stream_.set_enabled(enabled);
+void Timeline::StreamStateChange(const char* stream_name,
+                                 bool prev,
+                                 bool curr) {
+  if (prev == curr) {
+    return;
+  }
+  if (strcmp(stream_name, "Embedder") == 0) {
+    if (curr && (Timeline::get_start_recording_cb() != NULL)) {
+      Timeline::get_start_recording_cb()();
+    } else if (!curr && (Timeline::get_stop_recording_cb() != NULL)) {
+      Timeline::get_stop_recording_cb()();
+    }
+  }
 }
 
 
 void Timeline::Shutdown() {
   ASSERT(recorder_ != NULL);
+
+  if (stream_Embedder_enabled_ &&
+      (Timeline::get_stop_recording_cb() != NULL)) {
+    Timeline::get_stop_recording_cb()();
+  }
+
   if (FLAG_timeline_dir != NULL) {
     recorder_->WriteTo(FLAG_timeline_dir);
   }
+
   // Disable global streams.
-  vm_stream_.set_enabled(false);
-  vm_api_stream_.set_enabled(false);
-#define ISOLATE_TIMELINE_STREAM_DISABLE(name, not_used)                   \
+#define TIMELINE_STREAM_DISABLE(name, not_used)                                \
   stream_##name##_enabled_ = false;
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_DISABLE)
-#undef ISOLATE_TIMELINE_STREAM_DISABLE
+  TIMELINE_STREAM_LIST(TIMELINE_STREAM_DISABLE)
+#undef TIMELINE_STREAM_DISABLE
   delete recorder_;
   recorder_ = NULL;
   if (enabled_streams_ != NULL) {
@@ -180,30 +205,6 @@
 }
 
 
-void Timeline::SetupIsolateStreams(Isolate* isolate) {
-  if (!FLAG_support_timeline) {
-    return;
-  }
-#define ISOLATE_TIMELINE_STREAM_INIT(name, enabled_by_default)                 \
-  isolate->Get##name##Stream()->Init(                                          \
-      #name,                                                                   \
-      (enabled_by_default || HasStream(enabled_streams_, #name)),              \
-      Timeline::Stream##name##EnabledFlag());
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_INIT);
-#undef ISOLATE_TIMELINE_STREAM_INIT
-}
-
-
-TimelineStream* Timeline::GetVMStream() {
-  return &vm_stream_;
-}
-
-
-TimelineStream* Timeline::GetVMApiStream() {
-  return &vm_api_stream_;
-}
-
-
 void Timeline::ReclaimCachedBlocksFromThreads() {
   TimelineEventRecorder* recorder = Timeline::recorder();
   if (recorder == NULL) {
@@ -239,9 +240,8 @@
     JSONArray availableStreams(&obj, "availableStreams");
 #define ADD_STREAM_NAME(name, not_used)                                        \
     availableStreams.AddValue(#name);
-ISOLATE_TIMELINE_STREAM_LIST(ADD_STREAM_NAME);
+TIMELINE_STREAM_LIST(ADD_STREAM_NAME);
 #undef ADD_STREAM_NAME
-    availableStreams.AddValue("VM");
   }
   {
     JSONArray recordedStreams(&obj, "recordedStreams");
@@ -249,11 +249,8 @@
     if (stream_##name##_enabled_) {                                            \
       recordedStreams.AddValue(#name);                                         \
     }
-ISOLATE_TIMELINE_STREAM_LIST(ADD_RECORDED_STREAM_NAME);
+TIMELINE_STREAM_LIST(ADD_RECORDED_STREAM_NAME);
 #undef ADD_RECORDED_STREAM_NAME
-    if (vm_stream_.enabled()) {
-      recordedStreams.AddValue("VM");
-    }
   }
 }
 
@@ -269,14 +266,15 @@
 
 
 TimelineEventRecorder* Timeline::recorder_ = NULL;
-TimelineStream Timeline::vm_stream_;
-TimelineStream Timeline::vm_api_stream_;
 MallocGrowableArray<char*>* Timeline::enabled_streams_ = NULL;
+Dart_EmbedderTimelineStartRecording Timeline::start_recording_cb_ = NULL;
+Dart_EmbedderTimelineStopRecording Timeline::stop_recording_cb_ = NULL;
 
-#define ISOLATE_TIMELINE_STREAM_DEFINE_FLAG(name, enabled_by_default)          \
-  bool Timeline::stream_##name##_enabled_ = enabled_by_default;
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_DEFINE_FLAG)
-#undef ISOLATE_TIMELINE_STREAM_DEFINE_FLAG
+#define TIMELINE_STREAM_DEFINE(name, enabled_by_default)                       \
+  bool Timeline::stream_##name##_enabled_ = enabled_by_default;                \
+  TimelineStream Timeline::stream_##name##_;
+  TIMELINE_STREAM_LIST(TIMELINE_STREAM_DEFINE)
+#undef TIMELINE_STREAM_DEFINE
 
 TimelineEvent::TimelineEvent()
     : timestamp0_(0),
@@ -381,6 +379,18 @@
 }
 
 
+void TimelineEvent::Counter(const char* label, int64_t micros) {
+  Init(kCounter, label);
+  set_timestamp0(micros);
+}
+
+
+void TimelineEvent::Metadata(const char* label, int64_t micros) {
+  Init(kMetadata, label);
+  set_timestamp0(micros);
+}
+
+
 void TimelineEvent::CompleteWithPreSerializedJSON(const char* json) {
   set_pre_serialized_json(true);
   SetNumArguments(1);
@@ -579,6 +589,14 @@
       obj.AddPropertyF("id", "%" Px64 "", AsyncId());
     }
     break;
+    case kMetadata: {
+      obj.AddProperty("ph", "M");
+    }
+    break;
+    case kCounter: {
+      obj.AddProperty("ph", "C");
+    }
+    break;
     default:
       UNIMPLEMENTED();
   }
@@ -1011,9 +1029,9 @@
   if (!FLAG_support_service) {
     return;
   }
-  Dart_FileOpenCallback file_open = Isolate::file_open_callback();
-  Dart_FileWriteCallback file_write = Isolate::file_write_callback();
-  Dart_FileCloseCallback file_close = Isolate::file_close_callback();
+  Dart_FileOpenCallback file_open = Dart::file_open_callback();
+  Dart_FileWriteCallback file_write = Dart::file_write_callback();
+  Dart_FileCloseCallback file_close = Dart::file_close_callback();
   if ((file_open == NULL) || (file_write == NULL) || (file_close == NULL)) {
     return;
   }
@@ -1072,7 +1090,8 @@
 }
 
 
-TimelineEventRingRecorder::TimelineEventRingRecorder(intptr_t capacity)
+TimelineEventFixedBufferRecorder::TimelineEventFixedBufferRecorder(
+    intptr_t capacity)
     : blocks_(NULL),
       capacity_(capacity),
       num_blocks_(0),
@@ -1095,7 +1114,7 @@
 }
 
 
-TimelineEventRingRecorder::~TimelineEventRingRecorder() {
+TimelineEventFixedBufferRecorder::~TimelineEventFixedBufferRecorder() {
   // Delete all blocks.
   for (intptr_t i = 0; i < num_blocks_; i++) {
     TimelineEventBlock* block = blocks_[i];
@@ -1105,7 +1124,7 @@
 }
 
 
-void TimelineEventRingRecorder::PrintJSONEvents(
+void TimelineEventFixedBufferRecorder::PrintJSONEvents(
     JSONArray* events,
     TimelineEventFilter* filter) {
   if (!FLAG_support_service) {
@@ -1135,8 +1154,8 @@
 }
 
 
-void TimelineEventRingRecorder::PrintJSON(JSONStream* js,
-                                          TimelineEventFilter* filter) {
+void TimelineEventFixedBufferRecorder::PrintJSON(JSONStream* js,
+                                                 TimelineEventFilter* filter) {
   if (!FLAG_support_service) {
     return;
   }
@@ -1150,35 +1169,24 @@
 }
 
 
-void TimelineEventRingRecorder::PrintTraceEvent(JSONStream* js,
-                                                TimelineEventFilter* filter) {
+void TimelineEventFixedBufferRecorder::PrintTraceEvent(
+    JSONStream* js,
+    TimelineEventFilter* filter) {
   if (!FLAG_support_service) {
     return;
   }
   JSONArray events(js);
+  PrintJSONMeta(&events);
   PrintJSONEvents(&events, filter);
 }
 
 
-TimelineEventBlock* TimelineEventRingRecorder::GetHeadBlockLocked() {
+TimelineEventBlock* TimelineEventFixedBufferRecorder::GetHeadBlockLocked() {
   return blocks_[0];
 }
 
 
-TimelineEventBlock* TimelineEventRingRecorder::GetNewBlockLocked() {
-  // TODO(johnmccutchan): This function should only hand out blocks
-  // which have been marked as finished.
-  if (block_cursor_ == num_blocks_) {
-    block_cursor_ = 0;
-  }
-  TimelineEventBlock* block = blocks_[block_cursor_++];
-  block->Reset();
-  block->Open();
-  return block;
-}
-
-
-void TimelineEventRingRecorder::Clear() {
+void TimelineEventFixedBufferRecorder::Clear() {
   MutexLocker ml(&lock_);
   for (intptr_t i = 0; i < num_blocks_; i++) {
     TimelineEventBlock* block = blocks_[i];
@@ -1187,7 +1195,7 @@
 }
 
 
-intptr_t TimelineEventRingRecorder::FindOldestBlockIndex() const {
+intptr_t TimelineEventFixedBufferRecorder::FindOldestBlockIndex() const {
   int64_t earliest_time = kMaxInt64;
   intptr_t earliest_index = -1;
   for (intptr_t block_idx = 0; block_idx < num_blocks_; block_idx++) {
@@ -1205,12 +1213,12 @@
 }
 
 
-TimelineEvent* TimelineEventRingRecorder::StartEvent() {
+TimelineEvent* TimelineEventFixedBufferRecorder::StartEvent() {
   return ThreadBlockStartEvent();
 }
 
 
-void TimelineEventRingRecorder::CompleteEvent(TimelineEvent* event) {
+void TimelineEventFixedBufferRecorder::CompleteEvent(TimelineEvent* event) {
   if (event == NULL) {
     return;
   }
@@ -1218,15 +1226,39 @@
 }
 
 
-TimelineEventStreamingRecorder::TimelineEventStreamingRecorder() {
+TimelineEventBlock* TimelineEventRingRecorder::GetNewBlockLocked() {
+  // TODO(johnmccutchan): This function should only hand out blocks
+  // which have been marked as finished.
+  if (block_cursor_ == num_blocks_) {
+    block_cursor_ = 0;
+  }
+  TimelineEventBlock* block = blocks_[block_cursor_++];
+  block->Reset();
+  block->Open();
+  return block;
 }
 
 
-TimelineEventStreamingRecorder::~TimelineEventStreamingRecorder() {
+TimelineEventBlock* TimelineEventStartupRecorder::GetNewBlockLocked() {
+  if (block_cursor_ == num_blocks_) {
+    return NULL;
+  }
+  TimelineEventBlock* block = blocks_[block_cursor_++];
+  block->Reset();
+  block->Open();
+  return block;
 }
 
 
-void TimelineEventStreamingRecorder::PrintJSON(JSONStream* js,
+TimelineEventCallbackRecorder::TimelineEventCallbackRecorder() {
+}
+
+
+TimelineEventCallbackRecorder::~TimelineEventCallbackRecorder() {
+}
+
+
+void TimelineEventCallbackRecorder::PrintJSON(JSONStream* js,
                                                TimelineEventFilter* filter) {
   if (!FLAG_support_service) {
     return;
@@ -1240,7 +1272,7 @@
 }
 
 
-void TimelineEventStreamingRecorder::PrintTraceEvent(
+void TimelineEventCallbackRecorder::PrintTraceEvent(
     JSONStream* js,
     TimelineEventFilter* filter) {
   if (!FLAG_support_service) {
@@ -1250,14 +1282,14 @@
 }
 
 
-TimelineEvent* TimelineEventStreamingRecorder::StartEvent() {
+TimelineEvent* TimelineEventCallbackRecorder::StartEvent() {
   TimelineEvent* event = new TimelineEvent();
   return event;
 }
 
 
-void TimelineEventStreamingRecorder::CompleteEvent(TimelineEvent* event) {
-  StreamEvent(event);
+void TimelineEventCallbackRecorder::CompleteEvent(TimelineEvent* event) {
+  OnEvent(event);
   delete event;
 }
 
@@ -1290,6 +1322,7 @@
     return;
   }
   JSONArray events(js);
+  PrintJSONMeta(&events);
   PrintJSONEvents(&events, filter);
 }
 
@@ -1396,6 +1429,16 @@
 }
 
 
+void TimelineEventBlock::PrintJSON(JSONStream* js) const {
+  ASSERT(!in_use());
+  JSONArray events(js);
+  for (intptr_t i = 0; i < length(); i++) {
+    const TimelineEvent* event = At(i);
+    events.AddValue(event);
+  }
+}
+
+
 TimelineEvent* TimelineEventBlock::StartEvent() {
   ASSERT(!IsFull());
   if (FLAG_trace_timeline) {
@@ -1465,6 +1508,11 @@
     OS::Print("Finish block %p\n", this);
   }
   in_use_ = false;
+  if (Service::timeline_stream.enabled()) {
+    ServiceEvent service_event(NULL, ServiceEvent::kTimelineEvents);
+    service_event.set_timeline_event_block(this);
+    Service::HandleEvent(&service_event);
+  }
 }
 
 
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 6dfc8d2..9196ee0 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -5,6 +5,8 @@
 #ifndef VM_TIMELINE_H_
 #define VM_TIMELINE_H_
 
+#include "include/dart_tools_api.h"
+
 #include "vm/allocation.h"
 #include "vm/bitfield.h"
 #include "vm/os.h"
@@ -26,7 +28,7 @@
 class Zone;
 
 // (name, enabled by default for isolate).
-#define ISOLATE_TIMELINE_STREAM_LIST(V)                                        \
+#define TIMELINE_STREAM_LIST(V)                                                \
   V(API, false)                                                                \
   V(Compiler, false)                                                           \
   V(Dart, false)                                                               \
@@ -34,6 +36,7 @@
   V(Embedder, false)                                                           \
   V(GC, false)                                                                 \
   V(Isolate, false)                                                            \
+  V(VM, false)
 
 class Timeline : public AllStatic {
  public:
@@ -46,12 +49,6 @@
   // Access the global recorder. Not thread safe.
   static TimelineEventRecorder* recorder();
 
-  static void SetupIsolateStreams(Isolate* isolate);
-
-  static TimelineStream* GetVMStream();
-
-  static TimelineStream* GetVMApiStream();
-
   // Reclaim all |TimelineEventBlocks|s that are cached by threads.
   static void ReclaimCachedBlocksFromThreads();
 
@@ -60,27 +57,52 @@
   // Print information about streams to JSON.
   static void PrintFlagsToJSON(JSONStream* json);
 
-#define ISOLATE_TIMELINE_STREAM_FLAGS(name, not_used)                          \
+#define TIMELINE_STREAM_ACCESSOR(name, not_used)                       \
+  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)                                  \
   static const bool* Stream##name##EnabledFlag() {                             \
     return &stream_##name##_enabled_;                                          \
   }                                                                            \
   static void SetStream##name##Enabled(bool enabled) {                         \
+    StreamStateChange(#name, stream_##name##_enabled_, enabled);               \
     stream_##name##_enabled_ = enabled;                                        \
   }
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_FLAGS)
-#undef ISOLATE_TIMELINE_STREAM_FLAGS
-  static void SetVMStreamEnabled(bool enabled);
+  TIMELINE_STREAM_LIST(TIMELINE_STREAM_FLAGS)
+#undef TIMELINE_STREAM_FLAGS
+
+  static void set_start_recording_cb(
+      Dart_EmbedderTimelineStartRecording start_recording_cb) {
+    start_recording_cb_ = start_recording_cb;
+  }
+
+  static Dart_EmbedderTimelineStartRecording get_start_recording_cb() {
+    return start_recording_cb_;
+  }
+
+  static void set_stop_recording_cb(
+      Dart_EmbedderTimelineStopRecording stop_recording_cb) {
+    stop_recording_cb_ = stop_recording_cb;
+  }
+
+  static Dart_EmbedderTimelineStopRecording get_stop_recording_cb() {
+    return stop_recording_cb_;
+  }
 
  private:
+  static void StreamStateChange(const char* stream_name, bool prev, bool curr);
   static TimelineEventRecorder* recorder_;
-  static TimelineStream vm_stream_;
-  static TimelineStream vm_api_stream_;
   static MallocGrowableArray<char*>* enabled_streams_;
+  static Dart_EmbedderTimelineStartRecording start_recording_cb_;
+  static Dart_EmbedderTimelineStopRecording stop_recording_cb_;
 
-#define ISOLATE_TIMELINE_STREAM_DECLARE_FLAG(name, not_used)                   \
-  static bool stream_##name##_enabled_;
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_DECLARE_FLAG)
-#undef ISOLATE_TIMELINE_STREAM_DECLARE_FLAG
+#define TIMELINE_STREAM_DECLARE(name, not_used)                                \
+  static bool stream_##name##_enabled_;                                        \
+  static TimelineStream stream_##name##_;
+  TIMELINE_STREAM_LIST(TIMELINE_STREAM_DECLARE)
+#undef TIMELINE_STREAM_DECLARE
 
   friend class TimelineRecorderOverride;
   friend class ReclaimBlocksIsolateVisitor;
@@ -106,6 +128,8 @@
     kAsyncBegin,
     kAsyncInstant,
     kAsyncEnd,
+    kCounter,
+    kMetadata,
     kNumEventTypes,
   };
 
@@ -147,6 +171,12 @@
   void End(const char* label,
            int64_t micros = OS::GetCurrentMonotonicMicros());
 
+  void Counter(const char* label,
+               int64_t micros = OS::GetCurrentMonotonicMicros());
+
+  void Metadata(const char* label,
+                int64_t micros = OS::GetCurrentMonotonicMicros());
+
   // Completes this event with pre-serialized JSON. Copies |json|.
   void CompleteWithPreSerializedJSON(const char* json);
 
@@ -188,6 +218,10 @@
     return thread_;
   }
 
+  void set_thread(ThreadId tid) {
+    thread_ = tid;
+  }
+
   Dart_Port isolate_id() const {
     return isolate_id_;
   }
@@ -304,6 +338,7 @@
   friend class TimelineEventRecorder;
   friend class TimelineEventEndlessRecorder;
   friend class TimelineEventRingRecorder;
+  friend class TimelineEventStartupRecorder;
   friend class TimelineStream;
   friend class TimelineTestHelper;
   DISALLOW_COPY_AND_ASSIGN(TimelineEvent);
@@ -350,10 +385,10 @@
 };
 
 #ifndef PRODUCT
-#define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function)       \
+#define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, name, function)         \
   TimelineDurationScope tds(thread,                                            \
-                            thread->isolate()->GetCompilerStream(),            \
-                            "Compile" suffix);                                 \
+                            Timeline::GetCompilerStream(),                     \
+                            name);                                             \
   if (tds.enabled()) {                                                         \
     tds.SetNumArguments(1);                                                    \
     tds.CopyArgument(                                                          \
@@ -361,8 +396,12 @@
         "function",                                                            \
         function.ToLibNamePrefixedQualifiedCString());                         \
   }
+
+#define TIMELINE_FUNCTION_GC_DURATION(thread, name)                            \
+  TimelineDurationScope tds(thread, Timeline::GetGCStream(), name);
 #else
-#define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function)
+#define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, name, function)
+#define TIMELINE_FUNCTION_GC_DURATION(thread, name)
 #endif  // !PRODUCT
 
 // See |TimelineDurationScope| and |TimelineBeginEndScope|.
@@ -526,6 +565,8 @@
   }
 
  protected:
+  void PrintJSON(JSONStream* stream) const;
+
   TimelineEvent* StartEvent();
 
   TimelineEvent events_[kBlockSize];
@@ -542,9 +583,11 @@
 
   friend class Thread;
   friend class TimelineEventRecorder;
-  friend class TimelineEventRingRecorder;
   friend class TimelineEventEndlessRecorder;
+  friend class TimelineEventRingRecorder;
+  friend class TimelineEventStartupRecorder;
   friend class TimelineTestHelper;
+  friend class JSONStream;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(TimelineEventBlock);
@@ -656,26 +699,22 @@
 };
 
 
-// A recorder that stores events in a ring buffer of fixed capacity.
-class TimelineEventRingRecorder : public TimelineEventRecorder {
+// An abstract recorder that stores events in a buffer of fixed capacity.
+class TimelineEventFixedBufferRecorder : public TimelineEventRecorder {
  public:
   static const intptr_t kDefaultCapacity = 8192;
 
-  explicit TimelineEventRingRecorder(intptr_t capacity = kDefaultCapacity);
-  ~TimelineEventRingRecorder();
+  explicit TimelineEventFixedBufferRecorder(intptr_t capacity);
+  ~TimelineEventFixedBufferRecorder();
 
   void PrintJSON(JSONStream* js, TimelineEventFilter* filter);
   void PrintTraceEvent(JSONStream* js, TimelineEventFilter* filter);
-  const char* name() const {
-    return "ring";
-  }
 
  protected:
   TimelineEvent* StartEvent();
   void CompleteEvent(TimelineEvent* event);
   TimelineEventBlock* GetHeadBlockLocked();
   intptr_t FindOldestBlockIndex() const;
-  TimelineEventBlock* GetNewBlockLocked();
   void Clear();
 
   void PrintJSONEvents(JSONArray* array, TimelineEventFilter* filter);
@@ -687,21 +726,56 @@
 };
 
 
-// An abstract recorder that calls |StreamEvent| whenever an event is complete.
-class TimelineEventStreamingRecorder : public TimelineEventRecorder {
+// A recorder that stores events in a buffer of fixed capacity. When the buffer
+// is full, new events overwrite old events.
+class TimelineEventRingRecorder : public TimelineEventFixedBufferRecorder {
  public:
-  TimelineEventStreamingRecorder();
-  ~TimelineEventStreamingRecorder();
+  explicit TimelineEventRingRecorder(intptr_t capacity = kDefaultCapacity)
+      : TimelineEventFixedBufferRecorder(capacity) {}
+  ~TimelineEventRingRecorder() {}
+
+  const char* name() const {
+    return "ring";
+  }
+
+ protected:
+  TimelineEventBlock* GetNewBlockLocked();
+};
+
+
+// A recorder that stores events in a buffer of fixed capacity. When the buffer
+// is full, new events are dropped.
+class TimelineEventStartupRecorder : public TimelineEventFixedBufferRecorder {
+ public:
+  explicit TimelineEventStartupRecorder(intptr_t capacity = kDefaultCapacity)
+      : TimelineEventFixedBufferRecorder(capacity) {}
+  ~TimelineEventStartupRecorder() {}
+
+  const char* name() const {
+    return "startup";
+  }
+
+ protected:
+  TimelineEventBlock* GetNewBlockLocked();
+};
+
+
+// An abstract recorder that calls |OnEvent| whenever an event is complete.
+// This should only be used for testing.
+class TimelineEventCallbackRecorder : public TimelineEventRecorder {
+ public:
+  TimelineEventCallbackRecorder();
+  ~TimelineEventCallbackRecorder();
 
   void PrintJSON(JSONStream* js, TimelineEventFilter* filter);
   void PrintTraceEvent(JSONStream* js, TimelineEventFilter* filter);
 
-  // Called when |event| is ready to be streamed. It is unsafe to keep a
-  // reference to |event| as it may be freed as soon as this function returns.
-  virtual void StreamEvent(TimelineEvent* event) = 0;
+  // Called when |event| is completed. It is unsafe to keep a reference to
+  // |event| as it may be freed as soon as this function returns.
+  virtual void OnEvent(TimelineEvent* event) = 0;
 
   const char* name() const {
-    return "streaming";
+    return "callback";
   }
 
  protected:
diff --git a/runtime/vm/timeline_test.cc b/runtime/vm/timeline_test.cc
index 01d0c6a..db764ee 100644
--- a/runtime/vm/timeline_test.cc
+++ b/runtime/vm/timeline_test.cc
@@ -237,7 +237,7 @@
 
 
 // Count the number of each event type seen.
-class EventCounterRecorder : public TimelineEventStreamingRecorder {
+class EventCounterRecorder : public TimelineEventCallbackRecorder {
  public:
   EventCounterRecorder() {
     for (intptr_t i = 0; i < TimelineEvent::kNumEventTypes; i++) {
@@ -245,7 +245,7 @@
     }
   }
 
-  void StreamEvent(TimelineEvent* event) {
+  void OnEvent(TimelineEvent* event) {
     counts_[event->event_type()]++;
   }
 
@@ -258,7 +258,7 @@
 };
 
 
-TEST_CASE(TimelineEventStreamingRecorderBasic) {
+TEST_CASE(TimelineEventCallbackRecorderBasic) {
   EventCounterRecorder* recorder = new EventCounterRecorder();
   TimelineRecorderOverride override(recorder);
 
diff --git a/runtime/vm/timer.h b/runtime/vm/timer.h
index f3b15fa..01a6b6f 100644
--- a/runtime/vm/timer.h
+++ b/runtime/vm/timer.h
@@ -7,6 +7,7 @@
 
 #include "platform/utils.h"
 #include "vm/allocation.h"
+#include "vm/atomic.h"
 #include "vm/flags.h"
 #include "vm/os.h"
 
@@ -34,7 +35,8 @@
     stop_ = OS::GetCurrentTimeMicros();
     int64_t elapsed = ElapsedMicros();
     max_contiguous_ = Utils::Maximum(max_contiguous_, elapsed);
-    total_ += elapsed;
+    // Make increment atomic in case it occurs in parallel with aggregation.
+    AtomicOperations::IncrementInt64By(&total_, elapsed);
     running_ = false;
   }
 
@@ -65,6 +67,15 @@
     running_ = false;
   }
 
+  bool IsReset() const {
+    return (start_ == 0) && (stop_ == 0) && (total_ == 0) &&
+        (max_contiguous_ == 0) && !running_;
+  }
+
+  void AddTotal(const Timer& other) {
+    AtomicOperations::IncrementInt64By(&total_, other.total_);
+  }
+
   // Accessors.
   bool report() const { return report_; }
   bool running() const { return running_; }
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index de0f09c..24064f0 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -208,7 +208,8 @@
 
 
 void AssemblerTest::Assemble() {
-  const String& function_name = String::ZoneHandle(Symbols::New(name_));
+  const String& function_name = String::ZoneHandle(
+      Symbols::New(Thread::Current(), name_));
   const Class& cls = Class::ZoneHandle(
       Class::New(function_name,
                  Script::Handle(),
@@ -237,7 +238,8 @@
                                     new LocalScope(NULL, 0, 0))),
     default_parameter_values_(new ZoneGrowableArray<const Instance*> ()) {
   ASSERT(name != NULL);
-  const String& function_name = String::ZoneHandle(Symbols::New(name));
+  const String& function_name = String::ZoneHandle(
+      Symbols::New(Thread::Current(), name));
   // Add function to a class and that class to the class dictionary so that
   // frame walking can be used.
   const Class& cls = Class::ZoneHandle(
diff --git a/runtime/vm/verifier.cc b/runtime/vm/verifier.cc
index 18ad438..78b4697 100644
--- a/runtime/vm/verifier.cc
+++ b/runtime/vm/verifier.cc
@@ -17,9 +17,6 @@
 
 namespace dart {
 
-DEFINE_FLAG(bool, verify_on_transition, false, "Verify on dart <==> VM.");
-
-
 void VerifyObjectVisitor::VisitObject(RawObject* raw_obj) {
   if (raw_obj->IsHeapObject()) {
     uword raw_addr = RawObject::ToAddr(raw_obj);
@@ -45,7 +42,7 @@
     }
   }
   allocated_set_->Add(raw_obj);
-  raw_obj->Validate(isolate());
+  raw_obj->Validate(isolate_);
 }
 
 
diff --git a/runtime/vm/verifier.h b/runtime/vm/verifier.h
index 99b6056..a34d7f6 100644
--- a/runtime/vm/verifier.h
+++ b/runtime/vm/verifier.h
@@ -30,7 +30,7 @@
   VerifyObjectVisitor(Isolate* isolate,
                      ObjectSet* allocated_set,
                      MarkExpectation mark_expectation)
-      : ObjectVisitor(isolate),
+      : isolate_(isolate),
         allocated_set_(allocated_set),
         mark_expectation_(mark_expectation) {
   }
@@ -38,6 +38,7 @@
   virtual void VisitObject(RawObject* obj);
 
  private:
+  Isolate* isolate_;
   ObjectSet* allocated_set_;
   MarkExpectation mark_expectation_;
 
diff --git a/runtime/vm/virtual_memory_android.cc b/runtime/vm/virtual_memory_android.cc
index 16aa834..f84e2ef 100644
--- a/runtime/vm/virtual_memory_android.cc
+++ b/runtime/vm/virtual_memory_android.cc
@@ -83,6 +83,7 @@
 
 bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
   ASSERT(Thread::Current()->IsMutatorThread() ||
+         !Isolate::Current()->HasMutatorThread() ||
          Isolate::Current()->mutator_thread()->IsAtSafepoint());
   uword start_address = reinterpret_cast<uword>(address);
   uword end_address = start_address + size;
diff --git a/runtime/vm/virtual_memory_linux.cc b/runtime/vm/virtual_memory_linux.cc
index 0228f68..8973345 100644
--- a/runtime/vm/virtual_memory_linux.cc
+++ b/runtime/vm/virtual_memory_linux.cc
@@ -82,6 +82,7 @@
 
 bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
   ASSERT(Thread::Current()->IsMutatorThread() ||
+         !Isolate::Current()->HasMutatorThread() ||
          Isolate::Current()->mutator_thread()->IsAtSafepoint());
   uword start_address = reinterpret_cast<uword>(address);
   uword end_address = start_address + size;
diff --git a/runtime/vm/virtual_memory_macos.cc b/runtime/vm/virtual_memory_macos.cc
index 484ad78..1d23ead 100644
--- a/runtime/vm/virtual_memory_macos.cc
+++ b/runtime/vm/virtual_memory_macos.cc
@@ -83,6 +83,7 @@
 
 bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
   ASSERT(Thread::Current()->IsMutatorThread() ||
+         !Isolate::Current()->HasMutatorThread() ||
          Isolate::Current()->mutator_thread()->IsAtSafepoint());
   uword start_address = reinterpret_cast<uword>(address);
   uword end_address = start_address + size;
diff --git a/runtime/vm/virtual_memory_win.cc b/runtime/vm/virtual_memory_win.cc
index 2584613..8ea8fa5 100644
--- a/runtime/vm/virtual_memory_win.cc
+++ b/runtime/vm/virtual_memory_win.cc
@@ -66,6 +66,7 @@
 
 bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
   ASSERT(Thread::Current()->IsMutatorThread() ||
+         !Isolate::Current()->HasMutatorThread() ||
          Isolate::Current()->mutator_thread()->IsAtSafepoint());
   uword start_address = reinterpret_cast<uword>(address);
   uword end_address = start_address + size;
diff --git a/runtime/vm/visitor.h b/runtime/vm/visitor.h
index 9e8780b..3b071e2 100644
--- a/runtime/vm/visitor.h
+++ b/runtime/vm/visitor.h
@@ -18,8 +18,8 @@
 // An object pointer visitor interface.
 class ObjectPointerVisitor {
  public:
-  explicit ObjectPointerVisitor(Isolate* isolate) : isolate_(isolate) {}
-  virtual ~ObjectPointerVisitor() {}
+  explicit ObjectPointerVisitor(Isolate* isolate) : isolate_(isolate) { }
+  virtual ~ObjectPointerVisitor() { }
 
   Isolate* isolate() const { return isolate_; }
 
@@ -48,18 +48,14 @@
 // An object visitor interface.
 class ObjectVisitor {
  public:
-  explicit ObjectVisitor(Isolate* isolate) : isolate_(isolate) {}
+  ObjectVisitor() { }
 
-  virtual ~ObjectVisitor() {}
-
-  Isolate* isolate() const { return isolate_; }
+  virtual ~ObjectVisitor() { }
 
   // Invoked for each object.
   virtual void VisitObject(RawObject* obj) = 0;
 
  private:
-  Isolate* isolate_;
-
   DISALLOW_COPY_AND_ASSIGN(ObjectVisitor);
 };
 
@@ -67,8 +63,8 @@
 // An object finder visitor interface.
 class FindObjectVisitor {
  public:
-  explicit FindObjectVisitor(Isolate* isolate) : isolate_(isolate) {}
-  virtual ~FindObjectVisitor() {}
+  FindObjectVisitor() { }
+  virtual ~FindObjectVisitor() { }
 
   // Allow to specify a address filter.
   virtual uword filter_addr() const { return 0; }
@@ -81,9 +77,7 @@
   virtual bool FindObject(RawObject* obj) const = 0;
 
  private:
-  Isolate* isolate_;
-
-  DISALLOW_IMPLICIT_CONSTRUCTORS(FindObjectVisitor);
+  DISALLOW_COPY_AND_ASSIGN(FindObjectVisitor);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/vm.gypi b/runtime/vm/vm.gypi
index 0f857b3..a08a1b8 100644
--- a/runtime/vm/vm.gypi
+++ b/runtime/vm/vm.gypi
@@ -30,7 +30,6 @@
     'snapshot_test_in_dat_file': 'snapshot_test_in.dat',
     'snapshot_test_dart_file': 'snapshot_test.dart',
     'typed_data_cc_file': '<(gen_source_dir)/typed_data_gen.cc',
-    'typed_data_patch_cc_file': '<(gen_source_dir)/typed_data_patch_gen.cc',
     'vmservice_cc_file': '<(gen_source_dir)/vmservice_gen.cc',
     'vmservice_patch_cc_file': '<(gen_source_dir)/vmservice_patch_gen.cc',
   },
@@ -234,7 +233,6 @@
         'generate_mirrors_patch_cc_file#host',
         'generate_profiler_cc_file#host',
         'generate_typed_data_cc_file#host',
-        'generate_typed_data_patch_cc_file#host',
         'generate_vmservice_cc_file#host',
         'generate_vmservice_patch_cc_file#host',
       ],
@@ -273,7 +271,6 @@
         '<(mirrors_patch_cc_file)',
         '<(profiler_cc_file)',
         '<(typed_data_cc_file)',
-        '<(typed_data_patch_cc_file)',
         '<(vmservice_cc_file)',
         '<(vmservice_patch_cc_file)',
       ],
@@ -974,8 +971,8 @@
       'type': 'none',
       'toolsets':['host'],
       'includes': [
-        # Load the shared library sources.
-        '../../sdk/lib/typed_data/typed_data_sources.gypi',
+        # Load the runtime implementation sources.
+        '../lib/typed_data_sources.gypi',
       ],
       'sources/': [
         # Exclude all .[cc|h] files.
@@ -1010,46 +1007,6 @@
       ]
     },
     {
-      'target_name': 'generate_typed_data_patch_cc_file',
-      'type': 'none',
-      'toolsets':['host'],
-      'includes': [
-        # Load the runtime implementation sources.
-        '../lib/typed_data_sources.gypi',
-      ],
-      'sources/': [
-        # Exclude all .[cc|h] files.
-        # This is only here for reference. Excludes happen after
-        # variable expansion, so the script has to do its own
-        # exclude processing of the sources being passed.
-        ['exclude', '\\.cc|h$'],
-      ],
-      'actions': [
-        {
-          'action_name': 'generate_typed_data_patch_cc',
-          'inputs': [
-            '../tools/gen_library_src_paths.py',
-            '<(libgen_in_cc_file)',
-            '<@(_sources)',
-          ],
-          'outputs': [
-            '<(typed_data_patch_cc_file)',
-          ],
-          'action': [
-            'python',
-            'tools/gen_library_src_paths.py',
-            '--output', '<(typed_data_patch_cc_file)',
-            '--input_cc', '<(libgen_in_cc_file)',
-            '--include', 'vm/bootstrap.h',
-            '--var_name', 'dart::Bootstrap::typed_data_patch_paths_',
-            '--library_name', 'dart:typed_data',
-            '<@(_sources)',
-          ],
-          'message': 'Generating ''<(typed_data_patch_cc_file)'' file.'
-        },
-      ]
-    },
-    {
       'target_name': 'generate_profiler_cc_file',
       'type': 'none',
       'toolsets':['host'],
diff --git a/runtime/vm/vm_sources.gypi b/runtime/vm/vm_sources.gypi
index ee08b98..f73d16d 100644
--- a/runtime/vm/vm_sources.gypi
+++ b/runtime/vm/vm_sources.gypi
@@ -107,9 +107,6 @@
     'constants_ia32.h',
     'constants_mips.h',
     'constants_x64.h',
-    'coverage.cc',
-    'coverage.h',
-    'coverage_test.cc',
     'cpu.h',
     'cpu_arm.cc',
     'cpu_arm64.cc',
diff --git a/runtime/vm/weak_code.cc b/runtime/vm/weak_code.cc
index eb04d1f..1305443 100644
--- a/runtime/vm/weak_code.cc
+++ b/runtime/vm/weak_code.cc
@@ -66,7 +66,7 @@
   if (code_objects.IsNull()) {
     return;
   }
-  ASSERT(!FLAG_precompiled_mode);
+  ASSERT(!FLAG_precompiled_runtime);
   UpdateArrayTo(Object::null_array());
   // Disable all code on stack.
   Code& code = Code::Handle();
@@ -113,6 +113,7 @@
       function.SwitchToUnoptimizedCode();
     } else if (function.unoptimized_code() == code.raw()) {
       ReportSwitchingCode(code);
+      function.set_was_compiled(false);
       function.ClearICDataArray();
       // Remove the code object from the function. The next time the
       // function is invoked, it will be compiled again.
diff --git a/samples/samples.status b/samples/samples.status
index d9739f4..ac35013 100644
--- a/samples/samples.status
+++ b/samples/samples.status
@@ -11,6 +11,10 @@
 [ $compiler == dart2js && $runtime == none ]
 *: Fail, Pass # TODO(ahe): Triage these tests.
 
+[ $compiler == dart2js && $cps_ir && $checked ]
+sample_extension: Crash # Unable to compile UnsupportedError.message.
+
+
 [ $compiler == dart2analyzer ]
 build_dart: Skip
 
diff --git a/sdk/bin/dartdevc b/sdk/bin/dartdevc
new file mode 100755
index 0000000..331eb4e
--- /dev/null
+++ b/sdk/bin/dartdevc
@@ -0,0 +1,86 @@
+#!/usr/bin/env bash
+# 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.
+
+# Run dev compiler on the Dart VM. This script assumes the Dart repo's
+# directory structure.
+
+function follow_links() {
+  file="$1"
+  while [ -h "$file" ]; do
+    # On Mac OS, readlink -f doesn't work.
+    file="$(readlink "$file")"
+  done
+  echo "$file"
+}
+
+# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
+PROG_NAME="$(follow_links "$BASH_SOURCE")"
+
+# Handle the case where dart-sdk/bin has been symlinked to.
+BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
+SDK_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)"
+
+SDK_ARG="--dart-sdk=$SDK_DIR"
+
+DART="$BIN_DIR/dart"
+
+unset EXTRA_VM_OPTIONS
+declare -a EXTRA_VM_OPTIONS
+
+case $0 in
+  *_developer)
+    EXTRA_VM_OPTIONS+=('--checked')
+    ;;
+esac
+
+# We allow extra vm options to be passed in through an environment variable.
+if [[ $DART_VM_OPTIONS ]]; then
+  read -a OPTIONS <<< "$DART_VM_OPTIONS"
+  EXTRA_VM_OPTIONS+=("${OPTIONS[@]}")
+fi
+
+DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
+
+DEV_COMPILER="$DART_ROOT/third_party/pkg/dev_compiler/bin/dartdevc.dart"
+
+if [[ `uname` == 'Darwin' ]];
+then
+  OUT_DIR="$DART_ROOT/xcodebuild/"
+else
+  OUT_DIR="$DART_ROOT/out/"
+fi
+
+if [ -z "$DART_CONFIGURATION" ];
+then
+  DIRS=$( ls "$OUT_DIR" )
+  # list of possible configurations in decreasing desirability
+  CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32"
+    "ReleaseARM"    "ReleaseARM64"    "ReleaseARMV5TE"    "ReleaseMIPS"
+    "DebugARM"      "DebugARM64"      "DebugARMV5TE"      "DebugMIPS")
+  DART_CONFIGURATION="None"
+  for CONFIG in ${CONFIGS[*]}
+  do
+    for DIR in $DIRS;
+    do
+      if [ "$CONFIG" = "$DIR" ];
+      then
+        # choose most desirable configuration that is available and break
+        DART_CONFIGURATION="$DIR"
+        break 2
+      fi
+    done
+  done
+  if [ "$DART_CONFIGURATION" = "None" ]
+  then
+    echo "No valid dart configuration found in $OUT_DIR"
+    exit 1
+  fi
+fi
+
+BUILD_DIR="$OUT_DIR$DART_CONFIGURATION"
+
+PACKAGE_ROOT="$BUILD_DIR/packages/"
+
+exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$DEV_COMPILER" "$SDK_ARG" "$@"
diff --git a/sdk/bin/dartdevc.bat b/sdk/bin/dartdevc.bat
new file mode 100644
index 0000000..4e02005
--- /dev/null
+++ b/sdk/bin/dartdevc.bat
@@ -0,0 +1,73 @@
+@echo off
+REM Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+REM for details. All rights reserved. Use of this source code is governed by a
+REM BSD-style license that can be found in the LICENSE file.
+
+setlocal
+rem Handle the case where dart-sdk/bin has been symlinked to.
+set DIR_NAME_WITH_SLASH=%~dp0
+set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
+call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
+rem Get rid of surrounding quotes.
+for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
+
+set DART=%BIN_DIR%\dart
+
+rem Get absolute full name for SDK_DIR.
+for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
+
+rem Remove trailing backslash if there is one
+if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
+
+set SDK_ARG=--dart-sdk=%SDK_DIR%
+
+set EXTRA_VM_OPTIONS=
+
+rem We allow extra vm options to be passed in through an environment variable.
+if not "_%DART_VM_OPTIONS%_" == "__" (
+  set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% %DART_VM_OPTIONS%
+)
+
+rem Get absolute full name for DART_ROOT.
+for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi
+
+rem Remove trailing backslash if there is one
+if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
+
+set DEV_COMPILER=%DART_ROOT%\third_party\pkg\dev_compiler\bin\dartdevc.dart
+
+rem DART_CONFIGURATION defaults to ReleaseX64
+if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64
+
+set BUILD_DIR=%DART_ROOT%\build\%DART_CONFIGURATION%
+
+set PACKAGE_ROOT=%BUILD_DIR%\packages
+
+"%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "DEV_COMPILER%" "%SDK_ARG%" %*
+
+endlocal
+
+exit /b %errorlevel%
+
+rem Follow the symbolic links (junctions points) using `dir to determine the
+rem canonical path. Output with a link looks something like this
+rem
+rem 01/03/2013  10:11 PM    <JUNCTION>     abc def
+rem [c:\dart_bleeding\dart-repo.9\dart\build\ReleaseIA32\dart-sdk]
+rem
+rem So in the output of 'dir /a:l "targetdir"' we are looking for a filename
+rem surrounded by right angle bracket and left square bracket. Once we get
+rem the filename, which is name of the link, we recursively follow that.
+:follow_links
+setlocal
+for %%i in (%1) do set result=%%~fi
+set current=
+for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
+                                             ^| find ">     %~n1 ["`) do (
+  set current=%%i
+)
+if not "%current%"=="" call :follow_links "%current%", result
+endlocal & set %~2=%result%
+goto :eof
+
+:end
diff --git a/sdk/bin/dartdevc_sdk b/sdk/bin/dartdevc_sdk
new file mode 100755
index 0000000..7bc98de
--- /dev/null
+++ b/sdk/bin/dartdevc_sdk
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+# 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.
+
+# Run dev compiler on the Dart VM. This script assumes the Dart SDK's
+# directory structure.
+
+function follow_links() {
+  file="$1"
+  while [ -h "$file" ]; do
+    # On Mac OS, readlink -f doesn't work.
+    file="$(readlink "$file")"
+  done
+  echo "$file"
+}
+
+# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
+PROG_NAME="$(follow_links "$BASH_SOURCE")"
+
+# Handle the case where dart-sdk/bin has been symlinked to.
+BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
+SDK_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)"
+
+SDK_ARG="--dart-sdk=$SDK_DIR"
+
+SNAPSHOT="$BIN_DIR/snapshots/dartdevc.dart.snapshot"
+
+# We are running the snapshot in the built SDK.
+DART="$BIN_DIR/dart"
+exec "$DART" "$SNAPSHOT" "$SDK_ARG" "$@"
diff --git a/sdk/bin/dartdevc_sdk.bat b/sdk/bin/dartdevc_sdk.bat
new file mode 100644
index 0000000..72c2069
--- /dev/null
+++ b/sdk/bin/dartdevc_sdk.bat
@@ -0,0 +1,52 @@
+@echo off
+REM Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+REM for details. All rights reserved. Use of this source code is governed by a
+REM BSD-style license that can be found in the LICENSE file.
+
+setlocal
+rem Handle the case where dart-sdk/bin has been symlinked to.
+set DIR_NAME_WITH_SLASH=%~dp0
+set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
+call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
+rem Get rid of surrounding quotes.
+for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
+
+set DART=%BIN_DIR%\dart
+set SNAPSHOT=%BIN_DIR%\snapshots\dartdevc.dart.snapshot
+
+rem Get absolute full name for SDK_DIR.
+for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
+
+rem Remove trailing backslash if there is one
+if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
+
+set SDK_ARG=--dart-sdk=%SDK_DIR%
+
+"%DART%" "%SNAPSHOT%" "%SDK_ARG%" %*
+
+endlocal
+
+exit /b %errorlevel%
+
+rem Follow the symbolic links (junctions points) using `dir to determine the
+rem canonical path. Output with a link looks something like this
+rem
+rem 01/03/2013  10:11 PM    <JUNCTION>     abc def
+rem [c:\dart_bleeding\dart-repo.9\dart\build\ReleaseIA32\dart-sdk]
+rem
+rem So in the output of 'dir /a:l "targetdir"' we are looking for a filename
+rem surrounded by right angle bracket and left square bracket. Once we get
+rem the filename, which is name of the link, we recursively follow that.
+:follow_links
+setlocal
+for %%i in (%1) do set result=%%~fi
+set current=
+for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
+                                             ^| find ">     %~n1 ["`) do (
+  set current=%%i
+)
+if not "%current%"=="" call :follow_links "%current%", result
+endlocal & set %~2=%result%
+goto :eof
+
+:end
diff --git a/sdk/lib/_blink/dartium/_blink_dartium.dart b/sdk/lib/_blink/dartium/_blink_dartium.dart
index 4f88a3d..c0674f6 100644
--- a/sdk/lib/_blink/dartium/_blink_dartium.dart
+++ b/sdk/lib/_blink/dartium/_blink_dartium.dart
@@ -1,8 +1,10 @@
-// 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.
-
-// WARNING: Do not edit - generated code.
+/* 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.
+ *
+ * DO NOT EDIT
+ * Auto-generated _blink library.
+ */
 library dart.dom._blink;
 
 import 'dart:js' as js;
@@ -14,17 +16,22 @@
 
 dynamic resolver(String s) {
   if (s == "ANGLEInstancedArrays") return BlinkANGLEInstancedArrays.instance;
+  if (s == "AbstractWorker") return BlinkAbstractWorker.instance;
   if (s == "AnalyserNode") return BlinkAnalyserNode.instance;
   if (s == "Animation") return BlinkAnimation.instance;
-  if (s == "AnimationEffect") return BlinkAnimationEffect.instance;
-  if (s == "AnimationNode") return BlinkAnimationNode.instance;
-  if (s == "AnimationPlayer") return BlinkAnimationPlayer.instance;
+  if (s == "AnimationEffectReadOnly") return BlinkAnimationEffectReadOnly.instance;
+  if (s == "AnimationEffectTiming") return BlinkAnimationEffectTiming.instance;
+  if (s == "AnimationEvent") return BlinkAnimationEvent.instance;
   if (s == "AnimationPlayerEvent") return BlinkAnimationPlayerEvent.instance;
   if (s == "AnimationTimeline") return BlinkAnimationTimeline.instance;
+  if (s == "AppBannerPromptResult") return BlinkAppBannerPromptResult.instance;
   if (s == "ApplicationCache") return BlinkApplicationCache.instance;
   if (s == "ApplicationCacheErrorEvent") return BlinkApplicationCacheErrorEvent.instance;
+  if (s == "ArrayBuffer") return BlinkArrayBuffer.instance;
+  if (s == "ArrayBufferView") return BlinkArrayBufferView.instance;
   if (s == "Attr") return BlinkAttr.instance;
   if (s == "AudioBuffer") return BlinkAudioBuffer.instance;
+  if (s == "AudioBufferCallback") return BlinkAudioBufferCallback.instance;
   if (s == "AudioBufferSourceNode") return BlinkAudioBufferSourceNode.instance;
   if (s == "AudioContext") return BlinkAudioContext.instance;
   if (s == "AudioDestinationNode") return BlinkAudioDestinationNode.instance;
@@ -38,52 +45,66 @@
   if (s == "AutocompleteErrorEvent") return BlinkAutocompleteErrorEvent.instance;
   if (s == "BarProp") return BlinkBarProp.instance;
   if (s == "BatteryManager") return BlinkBatteryManager.instance;
+  if (s == "BeforeInstallPromptEvent") return BlinkBeforeInstallPromptEvent.instance;
   if (s == "BeforeUnloadEvent") return BlinkBeforeUnloadEvent.instance;
   if (s == "BiquadFilterNode") return BlinkBiquadFilterNode.instance;
   if (s == "Blob") return BlinkBlob.instance;
+  if (s == "Bluetooth") return BlinkBluetooth.instance;
+  if (s == "BluetoothDevice") return BlinkBluetoothDevice.instance;
+  if (s == "BluetoothGATTCharacteristic") return BlinkBluetoothGATTCharacteristic.instance;
+  if (s == "BluetoothGATTRemoteServer") return BlinkBluetoothGATTRemoteServer.instance;
+  if (s == "BluetoothGATTService") return BlinkBluetoothGATTService.instance;
+  if (s == "BluetoothUUID") return BlinkBluetoothUUID.instance;
   if (s == "Body") return BlinkBody.instance;
   if (s == "CDATASection") return BlinkCDATASection.instance;
+  if (s == "CHROMIUMSubscribeUniform") return BlinkCHROMIUMSubscribeUniform.instance;
+  if (s == "CHROMIUMValuebuffer") return BlinkCHROMIUMValuebuffer.instance;
   if (s == "CSS") return BlinkCSS.instance;
   if (s == "CSSCharsetRule") return BlinkCSSCharsetRule.instance;
   if (s == "CSSFontFaceRule") return BlinkCSSFontFaceRule.instance;
+  if (s == "CSSGroupingRule") return BlinkCSSGroupingRule.instance;
   if (s == "CSSImportRule") return BlinkCSSImportRule.instance;
   if (s == "CSSKeyframeRule") return BlinkCSSKeyframeRule.instance;
   if (s == "CSSKeyframesRule") return BlinkCSSKeyframesRule.instance;
   if (s == "CSSMediaRule") return BlinkCSSMediaRule.instance;
   if (s == "CSSPageRule") return BlinkCSSPageRule.instance;
-  if (s == "CSSPrimitiveValue") return BlinkCSSPrimitiveValue.instance;
   if (s == "CSSRule") return BlinkCSSRule.instance;
   if (s == "CSSRuleList") return BlinkCSSRuleList.instance;
   if (s == "CSSStyleDeclaration") return BlinkCSSStyleDeclaration.instance;
   if (s == "CSSStyleRule") return BlinkCSSStyleRule.instance;
   if (s == "CSSStyleSheet") return BlinkCSSStyleSheet.instance;
   if (s == "CSSSupportsRule") return BlinkCSSSupportsRule.instance;
-  if (s == "CSSUnknownRule") return BlinkCSSUnknownRule.instance;
-  if (s == "CSSValue") return BlinkCSSValue.instance;
-  if (s == "CSSValueList") return BlinkCSSValueList.instance;
   if (s == "CSSViewportRule") return BlinkCSSViewportRule.instance;
   if (s == "Cache") return BlinkCache.instance;
   if (s == "CacheStorage") return BlinkCacheStorage.instance;
-  if (s == "Canvas2DContextAttributes") return BlinkCanvas2DContextAttributes.instance;
   if (s == "CanvasGradient") return BlinkCanvasGradient.instance;
+  if (s == "CanvasPathMethods") return BlinkCanvasPathMethods.instance;
   if (s == "CanvasPattern") return BlinkCanvasPattern.instance;
   if (s == "CanvasRenderingContext2D") return BlinkCanvasRenderingContext2D.instance;
   if (s == "ChannelMergerNode") return BlinkChannelMergerNode.instance;
   if (s == "ChannelSplitterNode") return BlinkChannelSplitterNode.instance;
   if (s == "CharacterData") return BlinkCharacterData.instance;
+  if (s == "ChildNode") return BlinkChildNode.instance;
   if (s == "CircularGeofencingRegion") return BlinkCircularGeofencingRegion.instance;
+  if (s == "Client") return BlinkClient.instance;
   if (s == "ClientRect") return BlinkClientRect.instance;
   if (s == "ClientRectList") return BlinkClientRectList.instance;
+  if (s == "Clients") return BlinkClients.instance;
+  if (s == "ClipboardEvent") return BlinkClipboardEvent.instance;
   if (s == "CloseEvent") return BlinkCloseEvent.instance;
   if (s == "Comment") return BlinkComment.instance;
   if (s == "CompositionEvent") return BlinkCompositionEvent.instance;
+  if (s == "CompositorProxy") return BlinkCompositorProxy.instance;
+  if (s == "CompositorWorker") return BlinkCompositorWorker.instance;
+  if (s == "CompositorWorkerGlobalScope") return BlinkCompositorWorkerGlobalScope.instance;
   if (s == "Console") return BlinkConsole.instance;
   if (s == "ConsoleBase") return BlinkConsoleBase.instance;
   if (s == "ConvolverNode") return BlinkConvolverNode.instance;
   if (s == "Coordinates") return BlinkCoordinates.instance;
-  if (s == "Counter") return BlinkCounter.instance;
   if (s == "Credential") return BlinkCredential.instance;
   if (s == "CredentialsContainer") return BlinkCredentialsContainer.instance;
+  if (s == "CrossOriginConnectEvent") return BlinkCrossOriginConnectEvent.instance;
+  if (s == "CrossOriginServiceWorkerClient") return BlinkCrossOriginServiceWorkerClient.instance;
   if (s == "Crypto") return BlinkCrypto.instance;
   if (s == "CryptoKey") return BlinkCryptoKey.instance;
   if (s == "CustomEvent") return BlinkCustomEvent.instance;
@@ -106,8 +127,11 @@
   if (s == "DataTransfer") return BlinkDataTransfer.instance;
   if (s == "DataTransferItem") return BlinkDataTransferItem.instance;
   if (s == "DataTransferItemList") return BlinkDataTransferItemList.instance;
+  if (s == "DataView") return BlinkDataView.instance;
   if (s == "Database") return BlinkDatabase.instance;
+  if (s == "DatabaseCallback") return BlinkDatabaseCallback.instance;
   if (s == "DedicatedWorkerGlobalScope") return BlinkDedicatedWorkerGlobalScope.instance;
+  if (s == "DefaultSessionStartEvent") return BlinkDefaultSessionStartEvent.instance;
   if (s == "DelayNode") return BlinkDelayNode.instance;
   if (s == "DeprecatedStorageInfo") return BlinkDeprecatedStorageInfo.instance;
   if (s == "DeprecatedStorageQuota") return BlinkDeprecatedStorageQuota.instance;
@@ -128,39 +152,55 @@
   if (s == "EXTFragDepth") return BlinkEXTFragDepth.instance;
   if (s == "EXTShaderTextureLOD") return BlinkEXTShaderTextureLOD.instance;
   if (s == "EXTTextureFilterAnisotropic") return BlinkEXTTextureFilterAnisotropic.instance;
+  if (s == "EXTsRGB") return BlinkEXTsRGB.instance;
+  if (s == "EffectModel") return BlinkEffectModel.instance;
   if (s == "Element") return BlinkElement.instance;
+  if (s == "EntriesCallback") return BlinkEntriesCallback.instance;
   if (s == "Entry") return BlinkEntry.instance;
+  if (s == "EntryCallback") return BlinkEntryCallback.instance;
   if (s == "EntrySync") return BlinkEntrySync.instance;
+  if (s == "ErrorCallback") return BlinkErrorCallback.instance;
   if (s == "ErrorEvent") return BlinkErrorEvent.instance;
   if (s == "Event") return BlinkEvent.instance;
+  if (s == "EventListener") return BlinkEventListener.instance;
   if (s == "EventSource") return BlinkEventSource.instance;
   if (s == "EventTarget") return BlinkEventTarget.instance;
   if (s == "ExtendableEvent") return BlinkExtendableEvent.instance;
   if (s == "FederatedCredential") return BlinkFederatedCredential.instance;
   if (s == "FetchEvent") return BlinkFetchEvent.instance;
   if (s == "File") return BlinkFile.instance;
+  if (s == "FileCallback") return BlinkFileCallback.instance;
   if (s == "FileEntry") return BlinkFileEntry.instance;
   if (s == "FileEntrySync") return BlinkFileEntrySync.instance;
   if (s == "FileError") return BlinkFileError.instance;
   if (s == "FileList") return BlinkFileList.instance;
   if (s == "FileReader") return BlinkFileReader.instance;
   if (s == "FileReaderSync") return BlinkFileReaderSync.instance;
+  if (s == "FileSystemCallback") return BlinkFileSystemCallback.instance;
   if (s == "FileWriter") return BlinkFileWriter.instance;
+  if (s == "FileWriterCallback") return BlinkFileWriterCallback.instance;
   if (s == "FileWriterSync") return BlinkFileWriterSync.instance;
+  if (s == "Float32Array") return BlinkFloat32Array.instance;
+  if (s == "Float64Array") return BlinkFloat64Array.instance;
   if (s == "FocusEvent") return BlinkFocusEvent.instance;
   if (s == "FontFace") return BlinkFontFace.instance;
   if (s == "FontFaceSet") return BlinkFontFaceSet.instance;
+  if (s == "FontFaceSetForEachCallback") return BlinkFontFaceSetForEachCallback.instance;
   if (s == "FontFaceSetLoadEvent") return BlinkFontFaceSetLoadEvent.instance;
   if (s == "FormData") return BlinkFormData.instance;
+  if (s == "FrameRequestCallback") return BlinkFrameRequestCallback.instance;
   if (s == "GainNode") return BlinkGainNode.instance;
   if (s == "Gamepad") return BlinkGamepad.instance;
   if (s == "GamepadButton") return BlinkGamepadButton.instance;
   if (s == "GamepadEvent") return BlinkGamepadEvent.instance;
   if (s == "GamepadList") return BlinkGamepadList.instance;
   if (s == "Geofencing") return BlinkGeofencing.instance;
+  if (s == "GeofencingEvent") return BlinkGeofencingEvent.instance;
   if (s == "GeofencingRegion") return BlinkGeofencingRegion.instance;
   if (s == "Geolocation") return BlinkGeolocation.instance;
   if (s == "Geoposition") return BlinkGeoposition.instance;
+  if (s == "GlobalEventHandlers") return BlinkGlobalEventHandlers.instance;
+  if (s == "HMDVRDevice") return BlinkHMDVRDevice.instance;
   if (s == "HTMLAllCollection") return BlinkHTMLAllCollection.instance;
   if (s == "HTMLAnchorElement") return BlinkHTMLAnchorElement.instance;
   if (s == "HTMLAppletElement") return BlinkHTMLAppletElement.instance;
@@ -256,14 +296,13 @@
   if (s == "ImageBitmap") return BlinkImageBitmap.instance;
   if (s == "ImageData") return BlinkImageData.instance;
   if (s == "InjectedScriptHost") return BlinkInjectedScriptHost.instance;
-  if (s == "InputMethodContext") return BlinkInputMethodContext.instance;
-  if (s == "InspectorFrontendHost") return BlinkInspectorFrontendHost.instance;
-  if (s == "InspectorOverlayHost") return BlinkInspectorOverlayHost.instance;
-  if (s == "InstallEvent") return BlinkInstallEvent.instance;
+  if (s == "InputDevice") return BlinkInputDevice.instance;
+  if (s == "Int16Array") return BlinkInt16Array.instance;
+  if (s == "Int32Array") return BlinkInt32Array.instance;
+  if (s == "Int8Array") return BlinkInt8Array.instance;
   if (s == "Iterator") return BlinkIterator.instance;
-  if (s == "JavaScriptCallFrame") return BlinkJavaScriptCallFrame.instance;
   if (s == "KeyboardEvent") return BlinkKeyboardEvent.instance;
-  if (s == "LocalCredential") return BlinkLocalCredential.instance;
+  if (s == "KeyframeEffect") return BlinkKeyframeEffect.instance;
   if (s == "Location") return BlinkLocation.instance;
   if (s == "MIDIAccess") return BlinkMIDIAccess.instance;
   if (s == "MIDIConnectionEvent") return BlinkMIDIConnectionEvent.instance;
@@ -275,17 +314,21 @@
   if (s == "MIDIPort") return BlinkMIDIPort.instance;
   if (s == "MediaController") return BlinkMediaController.instance;
   if (s == "MediaDeviceInfo") return BlinkMediaDeviceInfo.instance;
+  if (s == "MediaDevices") return BlinkMediaDevices.instance;
   if (s == "MediaElementAudioSourceNode") return BlinkMediaElementAudioSourceNode.instance;
+  if (s == "MediaEncryptedEvent") return BlinkMediaEncryptedEvent.instance;
   if (s == "MediaError") return BlinkMediaError.instance;
   if (s == "MediaKeyError") return BlinkMediaKeyError.instance;
   if (s == "MediaKeyEvent") return BlinkMediaKeyEvent.instance;
   if (s == "MediaKeyMessageEvent") return BlinkMediaKeyMessageEvent.instance;
-  if (s == "MediaKeyNeededEvent") return BlinkMediaKeyNeededEvent.instance;
   if (s == "MediaKeySession") return BlinkMediaKeySession.instance;
+  if (s == "MediaKeyStatusMap") return BlinkMediaKeyStatusMap.instance;
+  if (s == "MediaKeySystemAccess") return BlinkMediaKeySystemAccess.instance;
   if (s == "MediaKeys") return BlinkMediaKeys.instance;
   if (s == "MediaList") return BlinkMediaList.instance;
   if (s == "MediaQueryList") return BlinkMediaQueryList.instance;
   if (s == "MediaQueryListEvent") return BlinkMediaQueryListEvent.instance;
+  if (s == "MediaSession") return BlinkMediaSession.instance;
   if (s == "MediaSource") return BlinkMediaSource.instance;
   if (s == "MediaStream") return BlinkMediaStream.instance;
   if (s == "MediaStreamAudioDestinationNode") return BlinkMediaStreamAudioDestinationNode.instance;
@@ -293,26 +336,40 @@
   if (s == "MediaStreamEvent") return BlinkMediaStreamEvent.instance;
   if (s == "MediaStreamTrack") return BlinkMediaStreamTrack.instance;
   if (s == "MediaStreamTrackEvent") return BlinkMediaStreamTrackEvent.instance;
+  if (s == "MediaStreamTrackSourcesCallback") return BlinkMediaStreamTrackSourcesCallback.instance;
   if (s == "MemoryInfo") return BlinkMemoryInfo.instance;
   if (s == "MessageChannel") return BlinkMessageChannel.instance;
   if (s == "MessageEvent") return BlinkMessageEvent.instance;
   if (s == "MessagePort") return BlinkMessagePort.instance;
   if (s == "Metadata") return BlinkMetadata.instance;
+  if (s == "MetadataCallback") return BlinkMetadataCallback.instance;
   if (s == "MimeType") return BlinkMimeType.instance;
   if (s == "MimeTypeArray") return BlinkMimeTypeArray.instance;
   if (s == "MouseEvent") return BlinkMouseEvent.instance;
+  if (s == "MutationCallback") return BlinkMutationCallback.instance;
   if (s == "MutationEvent") return BlinkMutationEvent.instance;
   if (s == "MutationObserver") return BlinkMutationObserver.instance;
   if (s == "MutationRecord") return BlinkMutationRecord.instance;
   if (s == "NamedNodeMap") return BlinkNamedNodeMap.instance;
   if (s == "Navigator") return BlinkNavigator.instance;
+  if (s == "NavigatorCPU") return BlinkNavigatorCPU.instance;
+  if (s == "NavigatorID") return BlinkNavigatorID.instance;
+  if (s == "NavigatorLanguage") return BlinkNavigatorLanguage.instance;
+  if (s == "NavigatorOnLine") return BlinkNavigatorOnLine.instance;
+  if (s == "NavigatorStorageUtils") return BlinkNavigatorStorageUtils.instance;
   if (s == "NavigatorUserMediaError") return BlinkNavigatorUserMediaError.instance;
+  if (s == "NavigatorUserMediaErrorCallback") return BlinkNavigatorUserMediaErrorCallback.instance;
+  if (s == "NavigatorUserMediaSuccessCallback") return BlinkNavigatorUserMediaSuccessCallback.instance;
   if (s == "NetworkInformation") return BlinkNetworkInformation.instance;
   if (s == "Node") return BlinkNode.instance;
   if (s == "NodeFilter") return BlinkNodeFilter.instance;
   if (s == "NodeIterator") return BlinkNodeIterator.instance;
   if (s == "NodeList") return BlinkNodeList.instance;
+  if (s == "NonDocumentTypeChildNode") return BlinkNonDocumentTypeChildNode.instance;
+  if (s == "NonElementParentNode") return BlinkNonElementParentNode.instance;
   if (s == "Notification") return BlinkNotification.instance;
+  if (s == "NotificationEvent") return BlinkNotificationEvent.instance;
+  if (s == "NotificationPermissionCallback") return BlinkNotificationPermissionCallback.instance;
   if (s == "OESElementIndexUint") return BlinkOESElementIndexUint.instance;
   if (s == "OESStandardDerivatives") return BlinkOESStandardDerivatives.instance;
   if (s == "OESTextureFloat") return BlinkOESTextureFloat.instance;
@@ -323,57 +380,79 @@
   if (s == "OfflineAudioCompletionEvent") return BlinkOfflineAudioCompletionEvent.instance;
   if (s == "OfflineAudioContext") return BlinkOfflineAudioContext.instance;
   if (s == "OscillatorNode") return BlinkOscillatorNode.instance;
-  if (s == "OverflowEvent") return BlinkOverflowEvent.instance;
   if (s == "PagePopupController") return BlinkPagePopupController.instance;
   if (s == "PageTransitionEvent") return BlinkPageTransitionEvent.instance;
   if (s == "PannerNode") return BlinkPannerNode.instance;
+  if (s == "ParentNode") return BlinkParentNode.instance;
+  if (s == "PasswordCredential") return BlinkPasswordCredential.instance;
   if (s == "Path2D") return BlinkPath2D.instance;
   if (s == "Performance") return BlinkPerformance.instance;
+  if (s == "PerformanceCompositeTiming") return BlinkPerformanceCompositeTiming.instance;
   if (s == "PerformanceEntry") return BlinkPerformanceEntry.instance;
   if (s == "PerformanceMark") return BlinkPerformanceMark.instance;
   if (s == "PerformanceMeasure") return BlinkPerformanceMeasure.instance;
   if (s == "PerformanceNavigation") return BlinkPerformanceNavigation.instance;
+  if (s == "PerformanceRenderTiming") return BlinkPerformanceRenderTiming.instance;
   if (s == "PerformanceResourceTiming") return BlinkPerformanceResourceTiming.instance;
   if (s == "PerformanceTiming") return BlinkPerformanceTiming.instance;
+  if (s == "PeriodicSyncEvent") return BlinkPeriodicSyncEvent.instance;
+  if (s == "PeriodicSyncManager") return BlinkPeriodicSyncManager.instance;
+  if (s == "PeriodicSyncRegistration") return BlinkPeriodicSyncRegistration.instance;
   if (s == "PeriodicWave") return BlinkPeriodicWave.instance;
+  if (s == "PermissionStatus") return BlinkPermissionStatus.instance;
+  if (s == "Permissions") return BlinkPermissions.instance;
   if (s == "Plugin") return BlinkPlugin.instance;
   if (s == "PluginArray") return BlinkPluginArray.instance;
   if (s == "PluginPlaceholderElement") return BlinkPluginPlaceholderElement.instance;
+  if (s == "PointerEvent") return BlinkPointerEvent.instance;
   if (s == "PopStateEvent") return BlinkPopStateEvent.instance;
+  if (s == "PositionCallback") return BlinkPositionCallback.instance;
   if (s == "PositionError") return BlinkPositionError.instance;
+  if (s == "PositionErrorCallback") return BlinkPositionErrorCallback.instance;
+  if (s == "PositionSensorVRDevice") return BlinkPositionSensorVRDevice.instance;
   if (s == "Presentation") return BlinkPresentation.instance;
+  if (s == "PresentationAvailability") return BlinkPresentationAvailability.instance;
+  if (s == "PresentationSession") return BlinkPresentationSession.instance;
   if (s == "ProcessingInstruction") return BlinkProcessingInstruction.instance;
   if (s == "ProgressEvent") return BlinkProgressEvent.instance;
+  if (s == "PromiseRejectionEvent") return BlinkPromiseRejectionEvent.instance;
   if (s == "PushEvent") return BlinkPushEvent.instance;
   if (s == "PushManager") return BlinkPushManager.instance;
-  if (s == "PushRegistration") return BlinkPushRegistration.instance;
-  if (s == "RGBColor") return BlinkRGBColor.instance;
+  if (s == "PushMessageData") return BlinkPushMessageData.instance;
+  if (s == "PushSubscription") return BlinkPushSubscription.instance;
   if (s == "RTCDTMFSender") return BlinkRTCDTMFSender.instance;
   if (s == "RTCDTMFToneChangeEvent") return BlinkRTCDTMFToneChangeEvent.instance;
   if (s == "RTCDataChannel") return BlinkRTCDataChannel.instance;
   if (s == "RTCDataChannelEvent") return BlinkRTCDataChannelEvent.instance;
+  if (s == "RTCErrorCallback") return BlinkRTCErrorCallback.instance;
   if (s == "RTCIceCandidate") return BlinkRTCIceCandidate.instance;
   if (s == "RTCIceCandidateEvent") return BlinkRTCIceCandidateEvent.instance;
   if (s == "RTCPeerConnection") return BlinkRTCPeerConnection.instance;
   if (s == "RTCSessionDescription") return BlinkRTCSessionDescription.instance;
+  if (s == "RTCSessionDescriptionCallback") return BlinkRTCSessionDescriptionCallback.instance;
+  if (s == "RTCStatsCallback") return BlinkRTCStatsCallback.instance;
   if (s == "RTCStatsReport") return BlinkRTCStatsReport.instance;
   if (s == "RTCStatsResponse") return BlinkRTCStatsResponse.instance;
   if (s == "RadioNodeList") return BlinkRadioNodeList.instance;
   if (s == "Range") return BlinkRange.instance;
+  if (s == "ReadableByteStream") return BlinkReadableByteStream.instance;
+  if (s == "ReadableByteStreamReader") return BlinkReadableByteStreamReader.instance;
   if (s == "ReadableStream") return BlinkReadableStream.instance;
-  if (s == "Rect") return BlinkRect.instance;
+  if (s == "ReadableStreamReader") return BlinkReadableStreamReader.instance;
   if (s == "RelatedEvent") return BlinkRelatedEvent.instance;
   if (s == "Request") return BlinkRequest.instance;
+  if (s == "RequestAnimationFrameCallback") return BlinkRequestAnimationFrameCallback.instance;
   if (s == "ResourceProgressEvent") return BlinkResourceProgressEvent.instance;
   if (s == "Response") return BlinkResponse.instance;
   if (s == "SQLError") return BlinkSQLError.instance;
   if (s == "SQLResultSet") return BlinkSQLResultSet.instance;
   if (s == "SQLResultSetRowList") return BlinkSQLResultSetRowList.instance;
+  if (s == "SQLStatementCallback") return BlinkSQLStatementCallback.instance;
+  if (s == "SQLStatementErrorCallback") return BlinkSQLStatementErrorCallback.instance;
   if (s == "SQLTransaction") return BlinkSQLTransaction.instance;
+  if (s == "SQLTransactionCallback") return BlinkSQLTransactionCallback.instance;
+  if (s == "SQLTransactionErrorCallback") return BlinkSQLTransactionErrorCallback.instance;
   if (s == "SVGAElement") return BlinkSVGAElement.instance;
-  if (s == "SVGAltGlyphDefElement") return BlinkSVGAltGlyphDefElement.instance;
-  if (s == "SVGAltGlyphElement") return BlinkSVGAltGlyphElement.instance;
-  if (s == "SVGAltGlyphItemElement") return BlinkSVGAltGlyphItemElement.instance;
   if (s == "SVGAngle") return BlinkSVGAngle.instance;
   if (s == "SVGAnimateElement") return BlinkSVGAnimateElement.instance;
   if (s == "SVGAnimateMotionElement") return BlinkSVGAnimateMotionElement.instance;
@@ -426,20 +505,13 @@
   if (s == "SVGFETileElement") return BlinkSVGFETileElement.instance;
   if (s == "SVGFETurbulenceElement") return BlinkSVGFETurbulenceElement.instance;
   if (s == "SVGFilterElement") return BlinkSVGFilterElement.instance;
-  if (s == "SVGFontElement") return BlinkSVGFontElement.instance;
-  if (s == "SVGFontFaceElement") return BlinkSVGFontFaceElement.instance;
-  if (s == "SVGFontFaceFormatElement") return BlinkSVGFontFaceFormatElement.instance;
-  if (s == "SVGFontFaceNameElement") return BlinkSVGFontFaceNameElement.instance;
-  if (s == "SVGFontFaceSrcElement") return BlinkSVGFontFaceSrcElement.instance;
-  if (s == "SVGFontFaceUriElement") return BlinkSVGFontFaceUriElement.instance;
+  if (s == "SVGFilterPrimitiveStandardAttributes") return BlinkSVGFilterPrimitiveStandardAttributes.instance;
+  if (s == "SVGFitToViewBox") return BlinkSVGFitToViewBox.instance;
   if (s == "SVGForeignObjectElement") return BlinkSVGForeignObjectElement.instance;
   if (s == "SVGGElement") return BlinkSVGGElement.instance;
   if (s == "SVGGeometryElement") return BlinkSVGGeometryElement.instance;
-  if (s == "SVGGlyphElement") return BlinkSVGGlyphElement.instance;
-  if (s == "SVGGlyphRefElement") return BlinkSVGGlyphRefElement.instance;
   if (s == "SVGGradientElement") return BlinkSVGGradientElement.instance;
   if (s == "SVGGraphicsElement") return BlinkSVGGraphicsElement.instance;
-  if (s == "SVGHKernElement") return BlinkSVGHKernElement.instance;
   if (s == "SVGImageElement") return BlinkSVGImageElement.instance;
   if (s == "SVGLength") return BlinkSVGLength.instance;
   if (s == "SVGLengthList") return BlinkSVGLengthList.instance;
@@ -450,7 +522,6 @@
   if (s == "SVGMaskElement") return BlinkSVGMaskElement.instance;
   if (s == "SVGMatrix") return BlinkSVGMatrix.instance;
   if (s == "SVGMetadataElement") return BlinkSVGMetadataElement.instance;
-  if (s == "SVGMissingGlyphElement") return BlinkSVGMissingGlyphElement.instance;
   if (s == "SVGNumber") return BlinkSVGNumber.instance;
   if (s == "SVGNumberList") return BlinkSVGNumberList.instance;
   if (s == "SVGPathElement") return BlinkSVGPathElement.instance;
@@ -484,7 +555,6 @@
   if (s == "SVGRadialGradientElement") return BlinkSVGRadialGradientElement.instance;
   if (s == "SVGRect") return BlinkSVGRect.instance;
   if (s == "SVGRectElement") return BlinkSVGRectElement.instance;
-  if (s == "SVGRenderingIntent") return BlinkSVGRenderingIntent.instance;
   if (s == "SVGSVGElement") return BlinkSVGSVGElement.instance;
   if (s == "SVGScriptElement") return BlinkSVGScriptElement.instance;
   if (s == "SVGSetElement") return BlinkSVGSetElement.instance;
@@ -494,6 +564,7 @@
   if (s == "SVGSwitchElement") return BlinkSVGSwitchElement.instance;
   if (s == "SVGSymbolElement") return BlinkSVGSymbolElement.instance;
   if (s == "SVGTSpanElement") return BlinkSVGTSpanElement.instance;
+  if (s == "SVGTests") return BlinkSVGTests.instance;
   if (s == "SVGTextContentElement") return BlinkSVGTextContentElement.instance;
   if (s == "SVGTextElement") return BlinkSVGTextElement.instance;
   if (s == "SVGTextPathElement") return BlinkSVGTextPathElement.instance;
@@ -501,24 +572,29 @@
   if (s == "SVGTitleElement") return BlinkSVGTitleElement.instance;
   if (s == "SVGTransform") return BlinkSVGTransform.instance;
   if (s == "SVGTransformList") return BlinkSVGTransformList.instance;
+  if (s == "SVGURIReference") return BlinkSVGURIReference.instance;
   if (s == "SVGUnitTypes") return BlinkSVGUnitTypes.instance;
   if (s == "SVGUseElement") return BlinkSVGUseElement.instance;
-  if (s == "SVGVKernElement") return BlinkSVGVKernElement.instance;
   if (s == "SVGViewElement") return BlinkSVGViewElement.instance;
   if (s == "SVGViewSpec") return BlinkSVGViewSpec.instance;
+  if (s == "SVGZoomAndPan") return BlinkSVGZoomAndPan.instance;
   if (s == "SVGZoomEvent") return BlinkSVGZoomEvent.instance;
   if (s == "Screen") return BlinkScreen.instance;
   if (s == "ScreenOrientation") return BlinkScreenOrientation.instance;
   if (s == "ScriptProcessorNode") return BlinkScriptProcessorNode.instance;
+  if (s == "ScrollState") return BlinkScrollState.instance;
   if (s == "SecurityPolicyViolationEvent") return BlinkSecurityPolicyViolationEvent.instance;
   if (s == "Selection") return BlinkSelection.instance;
+  if (s == "ServicePort") return BlinkServicePort.instance;
+  if (s == "ServicePortCollection") return BlinkServicePortCollection.instance;
+  if (s == "ServicePortConnectEvent") return BlinkServicePortConnectEvent.instance;
   if (s == "ServiceWorker") return BlinkServiceWorker.instance;
-  if (s == "ServiceWorkerClient") return BlinkServiceWorkerClient.instance;
-  if (s == "ServiceWorkerClients") return BlinkServiceWorkerClients.instance;
   if (s == "ServiceWorkerContainer") return BlinkServiceWorkerContainer.instance;
   if (s == "ServiceWorkerGlobalScope") return BlinkServiceWorkerGlobalScope.instance;
+  if (s == "ServiceWorkerMessageEvent") return BlinkServiceWorkerMessageEvent.instance;
   if (s == "ServiceWorkerRegistration") return BlinkServiceWorkerRegistration.instance;
   if (s == "ShadowRoot") return BlinkShadowRoot.instance;
+  if (s == "SharedArrayBuffer") return BlinkSharedArrayBuffer.instance;
   if (s == "SharedWorker") return BlinkSharedWorker.instance;
   if (s == "SharedWorkerGlobalScope") return BlinkSharedWorkerGlobalScope.instance;
   if (s == "SourceBuffer") return BlinkSourceBuffer.instance;
@@ -536,18 +612,26 @@
   if (s == "SpeechSynthesisEvent") return BlinkSpeechSynthesisEvent.instance;
   if (s == "SpeechSynthesisUtterance") return BlinkSpeechSynthesisUtterance.instance;
   if (s == "SpeechSynthesisVoice") return BlinkSpeechSynthesisVoice.instance;
+  if (s == "StashedMessagePort") return BlinkStashedMessagePort.instance;
+  if (s == "StashedPortCollection") return BlinkStashedPortCollection.instance;
+  if (s == "StereoPannerNode") return BlinkStereoPannerNode.instance;
   if (s == "Storage") return BlinkStorage.instance;
+  if (s == "StorageErrorCallback") return BlinkStorageErrorCallback.instance;
   if (s == "StorageEvent") return BlinkStorageEvent.instance;
   if (s == "StorageInfo") return BlinkStorageInfo.instance;
   if (s == "StorageQuota") return BlinkStorageQuota.instance;
+  if (s == "StorageQuotaCallback") return BlinkStorageQuotaCallback.instance;
+  if (s == "StorageUsageCallback") return BlinkStorageUsageCallback.instance;
   if (s == "Stream") return BlinkStream.instance;
+  if (s == "StringCallback") return BlinkStringCallback.instance;
   if (s == "StyleMedia") return BlinkStyleMedia.instance;
   if (s == "StyleSheet") return BlinkStyleSheet.instance;
   if (s == "StyleSheetList") return BlinkStyleSheetList.instance;
   if (s == "SubtleCrypto") return BlinkSubtleCrypto.instance;
+  if (s == "SyncEvent") return BlinkSyncEvent.instance;
+  if (s == "SyncManager") return BlinkSyncManager.instance;
+  if (s == "SyncRegistration") return BlinkSyncRegistration.instance;
   if (s == "Text") return BlinkText.instance;
-  if (s == "TextDecoder") return BlinkTextDecoder.instance;
-  if (s == "TextEncoder") return BlinkTextEncoder.instance;
   if (s == "TextEvent") return BlinkTextEvent.instance;
   if (s == "TextMetrics") return BlinkTextMetrics.instance;
   if (s == "TextTrack") return BlinkTextTrack.instance;
@@ -555,15 +639,27 @@
   if (s == "TextTrackCueList") return BlinkTextTrackCueList.instance;
   if (s == "TextTrackList") return BlinkTextTrackList.instance;
   if (s == "TimeRanges") return BlinkTimeRanges.instance;
-  if (s == "Timing") return BlinkTiming.instance;
+  if (s == "TimeoutHandler") return BlinkTimeoutHandler.instance;
   if (s == "Touch") return BlinkTouch.instance;
   if (s == "TouchEvent") return BlinkTouchEvent.instance;
   if (s == "TouchList") return BlinkTouchList.instance;
+  if (s == "TrackDefault") return BlinkTrackDefault.instance;
+  if (s == "TrackDefaultList") return BlinkTrackDefaultList.instance;
   if (s == "TrackEvent") return BlinkTrackEvent.instance;
   if (s == "TransitionEvent") return BlinkTransitionEvent.instance;
   if (s == "TreeWalker") return BlinkTreeWalker.instance;
   if (s == "UIEvent") return BlinkUIEvent.instance;
   if (s == "URL") return BlinkURL.instance;
+  if (s == "URLUtils") return BlinkURLUtils.instance;
+  if (s == "URLUtilsReadOnly") return BlinkURLUtilsReadOnly.instance;
+  if (s == "Uint16Array") return BlinkUint16Array.instance;
+  if (s == "Uint32Array") return BlinkUint32Array.instance;
+  if (s == "Uint8Array") return BlinkUint8Array.instance;
+  if (s == "Uint8ClampedArray") return BlinkUint8ClampedArray.instance;
+  if (s == "VRDevice") return BlinkVRDevice.instance;
+  if (s == "VREyeParameters") return BlinkVREyeParameters.instance;
+  if (s == "VRFieldOfView") return BlinkVRFieldOfView.instance;
+  if (s == "VRPositionState") return BlinkVRPositionState.instance;
   if (s == "VTTCue") return BlinkVTTCue.instance;
   if (s == "VTTRegion") return BlinkVTTRegion.instance;
   if (s == "VTTRegionList") return BlinkVTTRegionList.instance;
@@ -571,14 +667,16 @@
   if (s == "VideoPlaybackQuality") return BlinkVideoPlaybackQuality.instance;
   if (s == "VideoTrack") return BlinkVideoTrack.instance;
   if (s == "VideoTrackList") return BlinkVideoTrackList.instance;
+  if (s == "VoidCallback") return BlinkVoidCallback.instance;
   if (s == "WaveShaperNode") return BlinkWaveShaperNode.instance;
+  if (s == "WebGL2RenderingContext") return BlinkWebGL2RenderingContext.instance;
+  if (s == "WebGL2RenderingContextBase") return BlinkWebGL2RenderingContextBase.instance;
   if (s == "WebGLActiveInfo") return BlinkWebGLActiveInfo.instance;
   if (s == "WebGLBuffer") return BlinkWebGLBuffer.instance;
   if (s == "WebGLCompressedTextureATC") return BlinkWebGLCompressedTextureATC.instance;
   if (s == "WebGLCompressedTextureETC1") return BlinkWebGLCompressedTextureETC1.instance;
   if (s == "WebGLCompressedTexturePVRTC") return BlinkWebGLCompressedTexturePVRTC.instance;
   if (s == "WebGLCompressedTextureS3TC") return BlinkWebGLCompressedTextureS3TC.instance;
-  if (s == "WebGLContextAttributes") return BlinkWebGLContextAttributes.instance;
   if (s == "WebGLContextEvent") return BlinkWebGLContextEvent.instance;
   if (s == "WebGLDebugRendererInfo") return BlinkWebGLDebugRendererInfo.instance;
   if (s == "WebGLDebugShaders") return BlinkWebGLDebugShaders.instance;
@@ -587,23 +685,27 @@
   if (s == "WebGLFramebuffer") return BlinkWebGLFramebuffer.instance;
   if (s == "WebGLLoseContext") return BlinkWebGLLoseContext.instance;
   if (s == "WebGLProgram") return BlinkWebGLProgram.instance;
+  if (s == "WebGLQuery") return BlinkWebGLQuery.instance;
   if (s == "WebGLRenderbuffer") return BlinkWebGLRenderbuffer.instance;
   if (s == "WebGLRenderingContext") return BlinkWebGLRenderingContext.instance;
+  if (s == "WebGLRenderingContextBase") return BlinkWebGLRenderingContextBase.instance;
+  if (s == "WebGLSampler") return BlinkWebGLSampler.instance;
   if (s == "WebGLShader") return BlinkWebGLShader.instance;
   if (s == "WebGLShaderPrecisionFormat") return BlinkWebGLShaderPrecisionFormat.instance;
+  if (s == "WebGLSync") return BlinkWebGLSync.instance;
   if (s == "WebGLTexture") return BlinkWebGLTexture.instance;
+  if (s == "WebGLTransformFeedback") return BlinkWebGLTransformFeedback.instance;
   if (s == "WebGLUniformLocation") return BlinkWebGLUniformLocation.instance;
+  if (s == "WebGLVertexArrayObject") return BlinkWebGLVertexArrayObject.instance;
   if (s == "WebGLVertexArrayObjectOES") return BlinkWebGLVertexArrayObjectOES.instance;
-  if (s == "WebKitAnimationEvent") return BlinkWebKitAnimationEvent.instance;
-  if (s == "WebKitCSSFilterRule") return BlinkWebKitCSSFilterRule.instance;
-  if (s == "WebKitCSSFilterValue") return BlinkWebKitCSSFilterValue.instance;
   if (s == "WebKitCSSMatrix") return BlinkWebKitCSSMatrix.instance;
-  if (s == "WebKitCSSTransformValue") return BlinkWebKitCSSTransformValue.instance;
-  if (s == "WebKitGamepad") return BlinkWebKitGamepad.instance;
-  if (s == "WebKitGamepadList") return BlinkWebKitGamepadList.instance;
   if (s == "WebSocket") return BlinkWebSocket.instance;
   if (s == "WheelEvent") return BlinkWheelEvent.instance;
   if (s == "Window") return BlinkWindow.instance;
+  if (s == "WindowBase64") return BlinkWindowBase64.instance;
+  if (s == "WindowClient") return BlinkWindowClient.instance;
+  if (s == "WindowEventHandlers") return BlinkWindowEventHandlers.instance;
+  if (s == "WindowTimers") return BlinkWindowTimers.instance;
   if (s == "Worker") return BlinkWorker.instance;
   if (s == "WorkerConsole") return BlinkWorkerConsole.instance;
   if (s == "WorkerGlobalScope") return BlinkWorkerGlobalScope.instance;
@@ -621,6 +723,7 @@
   if (s == "XPathNSResolver") return BlinkXPathNSResolver.instance;
   if (s == "XPathResult") return BlinkXPathResult.instance;
   if (s == "XSLTProcessor") return BlinkXSLTProcessor.instance;
+
   // Failed to find it, check for custom renames
   dynamic obj = resolverMap[s];
   if (obj != null) return obj;
@@ -630,525 +733,652 @@
 class BlinkANGLEInstancedArrays {
   static final instance = new BlinkANGLEInstancedArrays();
 
-  drawArraysInstancedANGLE_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawArraysInstancedANGLE", [__arg_0, __arg_1]);
+  drawArraysInstancedANGLE_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "drawArraysInstancedANGLE", [__arg_0, __arg_1]);
 
-  drawArraysInstancedANGLE_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawArraysInstancedANGLE", [__arg_0, __arg_1, __arg_2]);
+  drawArraysInstancedANGLE_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "drawArraysInstancedANGLE", [__arg_0, __arg_1, __arg_2]);
 
-  drawArraysInstancedANGLE_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "drawArraysInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  drawArraysInstancedANGLE_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "drawArraysInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  drawElementsInstancedANGLE_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2]);
+  drawElementsInstancedANGLE_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2]);
 
-  drawElementsInstancedANGLE_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  drawElementsInstancedANGLE_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  drawElementsInstancedANGLE_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  drawElementsInstancedANGLE_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  vertexAttribDivisorANGLE_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribDivisorANGLE", []);
+  vertexAttribDivisorANGLE_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "vertexAttribDivisorANGLE", []);
 
-  vertexAttribDivisorANGLE_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribDivisorANGLE", [__arg_0]);
+  vertexAttribDivisorANGLE_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "vertexAttribDivisorANGLE", [__arg_0]);
 
-  vertexAttribDivisorANGLE_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribDivisorANGLE", [__arg_0, __arg_1]);
+  vertexAttribDivisorANGLE_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ANGLEInstancedArrays */, "vertexAttribDivisorANGLE", [__arg_0, __arg_1]);
+
+}
+
+class BlinkAbstractWorker {
+  static final instance = new BlinkAbstractWorker();
+
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AbstractWorker */, "onerror");
+
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AbstractWorker */, "onerror", __arg_0);
 
 }
 
 class BlinkAnalyserNode extends BlinkAudioNode {
   static final instance = new BlinkAnalyserNode();
 
-  fftSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fftSize");
+  fftSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnalyserNode */, "fftSize");
 
-  fftSize_Setter_(mthis, __arg_0) => mthis["fftSize"] = __arg_0;
+  fftSize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnalyserNode */, "fftSize", __arg_0);
 
-  frequencyBinCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frequencyBinCount");
+  frequencyBinCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnalyserNode */, "frequencyBinCount");
 
-  getByteFrequencyData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getByteFrequencyData", []);
+  maxDecibels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnalyserNode */, "maxDecibels");
 
-  getByteFrequencyData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getByteFrequencyData", [__arg_0]);
+  maxDecibels_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnalyserNode */, "maxDecibels", __arg_0);
 
-  getByteTimeDomainData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getByteTimeDomainData", []);
+  minDecibels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnalyserNode */, "minDecibels");
 
-  getByteTimeDomainData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getByteTimeDomainData", [__arg_0]);
+  minDecibels_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnalyserNode */, "minDecibels", __arg_0);
 
-  getFloatFrequencyData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFloatFrequencyData", []);
+  smoothingTimeConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnalyserNode */, "smoothingTimeConstant");
 
-  getFloatFrequencyData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFloatFrequencyData", [__arg_0]);
+  smoothingTimeConstant_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnalyserNode */, "smoothingTimeConstant", __arg_0);
 
-  getFloatTimeDomainData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFloatTimeDomainData", []);
+  getByteFrequencyData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AnalyserNode */, "getByteFrequencyData", []);
 
-  getFloatTimeDomainData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFloatTimeDomainData", [__arg_0]);
+  getByteFrequencyData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AnalyserNode */, "getByteFrequencyData", [__arg_0]);
 
-  maxDecibels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxDecibels");
+  getByteTimeDomainData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AnalyserNode */, "getByteTimeDomainData", []);
 
-  maxDecibels_Setter_(mthis, __arg_0) => mthis["maxDecibels"] = __arg_0;
+  getByteTimeDomainData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AnalyserNode */, "getByteTimeDomainData", [__arg_0]);
 
-  minDecibels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "minDecibels");
+  getFloatFrequencyData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AnalyserNode */, "getFloatFrequencyData", []);
 
-  minDecibels_Setter_(mthis, __arg_0) => mthis["minDecibels"] = __arg_0;
+  getFloatFrequencyData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AnalyserNode */, "getFloatFrequencyData", [__arg_0]);
 
-  smoothingTimeConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "smoothingTimeConstant");
+  getFloatTimeDomainData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AnalyserNode */, "getFloatTimeDomainData", []);
 
-  smoothingTimeConstant_Setter_(mthis, __arg_0) => mthis["smoothingTimeConstant"] = __arg_0;
+  getFloatTimeDomainData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AnalyserNode */, "getFloatTimeDomainData", [__arg_0]);
 
 }
 
-class BlinkAnimation extends BlinkAnimationNode {
+class BlinkAnimation extends BlinkEventTarget {
   static final instance = new BlinkAnimation();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Animation"), []);
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "currentTime");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Animation"), [__arg_0]);
+  currentTime_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Animation */, "currentTime", __arg_0);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Animation"), [__arg_0, __arg_1]);
+  effect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "effect");
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Animation"), [__arg_0, __arg_1, __arg_2]);
+  effect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Animation */, "effect", __arg_0);
+
+  endClip_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "endClip");
+
+  endClip_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Animation */, "endClip", __arg_0);
+
+  finished_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "finished");
+
+  onfinish_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "onfinish");
+
+  onfinish_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Animation */, "onfinish", __arg_0);
+
+  playState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "playState");
+
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "playbackRate");
+
+  playbackRate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Animation */, "playbackRate", __arg_0);
+
+  ready_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "ready");
+
+  startClip_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "startClip");
+
+  startClip_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Animation */, "startClip", __arg_0);
+
+  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Animation */, "startTime");
+
+  startTime_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Animation */, "startTime", __arg_0);
+
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Animation */, "cancel", []);
+
+  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Animation */, "finish", []);
+
+  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Animation */, "pause", []);
+
+  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Animation */, "play", []);
+
+  reverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Animation */, "reverse", []);
 
 }
 
-class BlinkAnimationEffect {
-  static final instance = new BlinkAnimationEffect();
+class BlinkAnimationEffectReadOnly {
+  static final instance = new BlinkAnimationEffectReadOnly();
+
+  computedTiming_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectReadOnly */, "computedTiming");
+
+  timing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectReadOnly */, "timing");
 
 }
 
-class BlinkAnimationNode {
-  static final instance = new BlinkAnimationNode();
+class BlinkAnimationEffectTiming {
+  static final instance = new BlinkAnimationEffectTiming();
 
-  activeDuration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeDuration");
+  delay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "delay");
 
-  currentIteration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentIteration");
+  delay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "delay", __arg_0);
 
-  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
+  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "direction");
 
-  endTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endTime");
+  direction_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "direction", __arg_0);
 
-  localTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localTime");
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "duration");
 
-  player_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "player");
+  duration_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "duration", __arg_0);
 
-  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startTime");
+  easing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "easing");
 
-  timing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timing");
+  easing_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "easing", __arg_0);
+
+  endDelay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "endDelay");
+
+  endDelay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "endDelay", __arg_0);
+
+  fill_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "fill");
+
+  fill_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "fill", __arg_0);
+
+  iterationStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "iterationStart");
+
+  iterationStart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "iterationStart", __arg_0);
+
+  iterations_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "iterations");
+
+  iterations_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "iterations", __arg_0);
+
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEffectTiming */, "playbackRate");
+
+  playbackRate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationEffectTiming */, "playbackRate", __arg_0);
 
 }
 
-class BlinkAnimationPlayer extends BlinkEventTarget {
-  static final instance = new BlinkAnimationPlayer();
+class BlinkAnimationEvent extends BlinkEvent {
+  static final instance = new BlinkAnimationEvent();
 
-  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancel", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("AnimationEvent");
 
-  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("AnimationEvent", [__arg_0]);
 
-  currentTime_Setter_(mthis, __arg_0) => mthis["currentTime"] = __arg_0;
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("AnimationEvent", [__arg_0, __arg_1]);
 
-  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "finish", []);
+  animationName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEvent */, "animationName");
 
-  onfinish_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfinish");
-
-  onfinish_Setter_(mthis, __arg_0) => mthis["onfinish"] = __arg_0;
-
-  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pause", []);
-
-  playState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playState");
-
-  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "play", []);
-
-  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
-
-  playbackRate_Setter_(mthis, __arg_0) => mthis["playbackRate"] = __arg_0;
-
-  reverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reverse", []);
-
-  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "source");
-
-  source_Setter_(mthis, __arg_0) => mthis["source"] = __arg_0;
-
-  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startTime");
-
-  startTime_Setter_(mthis, __arg_0) => mthis["startTime"] = __arg_0;
+  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationEvent */, "elapsedTime");
 
 }
 
 class BlinkAnimationPlayerEvent extends BlinkEvent {
   static final instance = new BlinkAnimationPlayerEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "AnimationPlayerEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("AnimationPlayerEvent");
 
-  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("AnimationPlayerEvent", [__arg_0]);
 
-  timelineTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timelineTime");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("AnimationPlayerEvent", [__arg_0, __arg_1]);
+
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationPlayerEvent */, "currentTime");
+
+  timelineTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationPlayerEvent */, "timelineTime");
 
 }
 
 class BlinkAnimationTimeline {
   static final instance = new BlinkAnimationTimeline();
 
-  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationTimeline */, "currentTime");
 
-  getAnimationPlayers_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAnimationPlayers", []);
+  currentTime_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationTimeline */, "currentTime", __arg_0);
 
-  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "play", []);
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AnimationTimeline */, "playbackRate");
 
-  play_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "play", [__arg_0]);
+  playbackRate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AnimationTimeline */, "playbackRate", __arg_0);
+
+  getAnimations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AnimationTimeline */, "getAnimations", []);
+
+  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AnimationTimeline */, "play", []);
+
+  play_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AnimationTimeline */, "play", [__arg_0]);
+
+}
+
+class BlinkAppBannerPromptResult {
+  static final instance = new BlinkAppBannerPromptResult();
+
+  outcome_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AppBannerPromptResult */, "outcome");
+
+  platform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AppBannerPromptResult */, "platform");
 
 }
 
 class BlinkApplicationCache extends BlinkEventTarget {
   static final instance = new BlinkApplicationCache();
 
-  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
+  oncached_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "oncached");
 
-  oncached_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncached");
+  oncached_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ApplicationCache */, "oncached", __arg_0);
 
-  oncached_Setter_(mthis, __arg_0) => mthis["oncached"] = __arg_0;
+  onchecking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "onchecking");
 
-  onchecking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchecking");
+  onchecking_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ApplicationCache */, "onchecking", __arg_0);
 
-  onchecking_Setter_(mthis, __arg_0) => mthis["onchecking"] = __arg_0;
+  ondownloading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "ondownloading");
 
-  ondownloading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondownloading");
+  ondownloading_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ApplicationCache */, "ondownloading", __arg_0);
 
-  ondownloading_Setter_(mthis, __arg_0) => mthis["ondownloading"] = __arg_0;
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "onerror");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ApplicationCache */, "onerror", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onnoupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "onnoupdate");
 
-  onnoupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onnoupdate");
+  onnoupdate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ApplicationCache */, "onnoupdate", __arg_0);
 
-  onnoupdate_Setter_(mthis, __arg_0) => mthis["onnoupdate"] = __arg_0;
+  onobsolete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "onobsolete");
 
-  onobsolete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onobsolete");
+  onobsolete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ApplicationCache */, "onobsolete", __arg_0);
 
-  onobsolete_Setter_(mthis, __arg_0) => mthis["onobsolete"] = __arg_0;
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "onprogress");
 
-  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ApplicationCache */, "onprogress", __arg_0);
 
-  onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
+  onupdateready_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "onupdateready");
 
-  onupdateready_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onupdateready");
+  onupdateready_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ApplicationCache */, "onupdateready", __arg_0);
 
-  onupdateready_Setter_(mthis, __arg_0) => mthis["onupdateready"] = __arg_0;
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCache */, "status");
 
-  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ApplicationCache */, "abort", []);
 
-  swapCache_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "swapCache", []);
+  swapCache_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ApplicationCache */, "swapCache", []);
 
-  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "update", []);
+  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ApplicationCache */, "update", []);
 
 }
 
 class BlinkApplicationCacheErrorEvent extends BlinkEvent {
   static final instance = new BlinkApplicationCacheErrorEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ApplicationCacheErrorEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("ApplicationCacheErrorEvent");
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("ApplicationCacheErrorEvent", [__arg_0]);
 
-  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reason");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("ApplicationCacheErrorEvent", [__arg_0, __arg_1]);
 
-  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCacheErrorEvent */, "message");
 
-  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
+  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCacheErrorEvent */, "reason");
+
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCacheErrorEvent */, "status");
+
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ApplicationCacheErrorEvent */, "url");
+
+}
+
+class BlinkArrayBuffer {
+  static final instance = new BlinkArrayBuffer();
+
+  byteLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ArrayBuffer */, "byteLength");
+
+}
+
+class BlinkArrayBufferView {
+  static final instance = new BlinkArrayBufferView();
+
+  buffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ArrayBufferView */, "buffer");
+
+  byteLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ArrayBufferView */, "byteLength");
+
+  byteOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ArrayBufferView */, "byteOffset");
 
 }
 
 class BlinkAttr extends BlinkNode {
   static final instance = new BlinkAttr();
 
-  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localName");
+  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "localName");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "name");
 
-  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "namespaceURI");
+  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "namespaceURI");
 
-  nodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nodeValue");
+  nodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "nodeValue");
 
-  nodeValue_Setter_(mthis, __arg_0) => mthis["nodeValue"] = __arg_0;
+  nodeValue_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Attr */, "nodeValue", __arg_0);
 
-  ownerElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerElement");
+  ownerElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "ownerElement");
 
-  prefix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "prefix");
+  prefix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "prefix");
 
-  specified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "specified");
+  specified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "specified");
 
-  textContent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textContent");
+  textContent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "textContent");
 
-  textContent_Setter_(mthis, __arg_0) => mthis["textContent"] = __arg_0;
+  textContent_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Attr */, "textContent", __arg_0);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Attr */, "value");
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Attr */, "value", __arg_0);
 
 }
 
 class BlinkAudioBuffer {
   static final instance = new BlinkAudioBuffer();
 
-  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBuffer */, "duration");
 
-  getChannelData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getChannelData", []);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBuffer */, "length");
 
-  getChannelData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getChannelData", [__arg_0]);
+  numberOfChannels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBuffer */, "numberOfChannels");
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  sampleRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBuffer */, "sampleRate");
 
-  numberOfChannels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfChannels");
+  copyFromChannel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "copyFromChannel", []);
 
-  sampleRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sampleRate");
+  copyFromChannel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "copyFromChannel", [__arg_0]);
+
+  copyFromChannel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "copyFromChannel", [__arg_0, __arg_1]);
+
+  copyFromChannel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "copyFromChannel", [__arg_0, __arg_1, __arg_2]);
+
+  copyToChannel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "copyToChannel", []);
+
+  copyToChannel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "copyToChannel", [__arg_0]);
+
+  copyToChannel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "copyToChannel", [__arg_0, __arg_1]);
+
+  copyToChannel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "copyToChannel", [__arg_0, __arg_1, __arg_2]);
+
+  getChannelData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "getChannelData", []);
+
+  getChannelData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioBuffer */, "getChannelData", [__arg_0]);
+
+}
+
+class BlinkAudioBufferCallback {
+  static final instance = new BlinkAudioBufferCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioBufferCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioBufferCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkAudioBufferSourceNode extends BlinkAudioSourceNode {
   static final instance = new BlinkAudioBufferSourceNode();
 
-  buffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffer");
+  buffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBufferSourceNode */, "buffer");
 
-  buffer_Setter_(mthis, __arg_0) => mthis["buffer"] = __arg_0;
+  buffer_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioBufferSourceNode */, "buffer", __arg_0);
 
-  loopEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loopEnd");
+  detune_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBufferSourceNode */, "detune");
 
-  loopEnd_Setter_(mthis, __arg_0) => mthis["loopEnd"] = __arg_0;
+  loop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBufferSourceNode */, "loop");
 
-  loopStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loopStart");
+  loop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioBufferSourceNode */, "loop", __arg_0);
 
-  loopStart_Setter_(mthis, __arg_0) => mthis["loopStart"] = __arg_0;
+  loopEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBufferSourceNode */, "loopEnd");
 
-  loop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loop");
+  loopEnd_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioBufferSourceNode */, "loopEnd", __arg_0);
 
-  loop_Setter_(mthis, __arg_0) => mthis["loop"] = __arg_0;
+  loopStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBufferSourceNode */, "loopStart");
 
-  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
+  loopStart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioBufferSourceNode */, "loopStart", __arg_0);
 
-  onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBufferSourceNode */, "onended");
 
-  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioBufferSourceNode */, "onended", __arg_0);
 
-  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioBufferSourceNode */, "playbackRate");
 
-  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0]);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioBufferSourceNode */, "start", []);
 
-  start_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0, __arg_1]);
+  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioBufferSourceNode */, "start", [__arg_0]);
 
-  start_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0, __arg_1, __arg_2]);
+  start_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioBufferSourceNode */, "start", [__arg_0, __arg_1]);
 
-  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
+  start_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioBufferSourceNode */, "start", [__arg_0, __arg_1, __arg_2]);
 
-  stop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stop", [__arg_0]);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioBufferSourceNode */, "stop", []);
+
+  stop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioBufferSourceNode */, "stop", [__arg_0]);
 
 }
 
 class BlinkAudioContext extends BlinkEventTarget {
   static final instance = new BlinkAudioContext();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "AudioContext"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("AudioContext");
 
-  createAnalyser_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createAnalyser", []);
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioContext */, "currentTime");
 
-  createBiquadFilter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createBiquadFilter", []);
+  destination_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioContext */, "destination");
 
-  createBufferSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createBufferSource", []);
+  listener_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioContext */, "listener");
 
-  createBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createBuffer", [__arg_0]);
+  onstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioContext */, "onstatechange");
 
-  createBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createBuffer", [__arg_0, __arg_1]);
+  onstatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioContext */, "onstatechange", __arg_0);
 
-  createBuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createBuffer", [__arg_0, __arg_1, __arg_2]);
+  sampleRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioContext */, "sampleRate");
 
-  createChannelMerger_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createChannelMerger", []);
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioContext */, "state");
 
-  createChannelMerger_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createChannelMerger", [__arg_0]);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "close", []);
 
-  createChannelSplitter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createChannelSplitter", []);
+  createAnalyser_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createAnalyser", []);
 
-  createChannelSplitter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createChannelSplitter", [__arg_0]);
+  createBiquadFilter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createBiquadFilter", []);
 
-  createConvolver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createConvolver", []);
+  createBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createBuffer", [__arg_0]);
 
-  createDelay_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDelay", []);
+  createBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createBuffer", [__arg_0, __arg_1]);
 
-  createDelay_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDelay", [__arg_0]);
+  createBuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createBuffer", [__arg_0, __arg_1, __arg_2]);
 
-  createDynamicsCompressor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDynamicsCompressor", []);
+  createBufferSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createBufferSource", []);
 
-  createGain_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createGain", []);
+  createChannelMerger_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createChannelMerger", []);
 
-  createMediaElementSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createMediaElementSource", []);
+  createChannelMerger_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createChannelMerger", [__arg_0]);
 
-  createMediaElementSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createMediaElementSource", [__arg_0]);
+  createChannelSplitter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createChannelSplitter", []);
 
-  createMediaStreamDestination_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createMediaStreamDestination", []);
+  createChannelSplitter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createChannelSplitter", [__arg_0]);
 
-  createMediaStreamSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createMediaStreamSource", []);
+  createConvolver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createConvolver", []);
 
-  createMediaStreamSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createMediaStreamSource", [__arg_0]);
+  createDelay_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createDelay", []);
 
-  createOscillator_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createOscillator", []);
+  createDelay_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createDelay", [__arg_0]);
 
-  createPanner_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createPanner", []);
+  createDynamicsCompressor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createDynamicsCompressor", []);
 
-  createPeriodicWave_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createPeriodicWave", []);
+  createGain_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createGain", []);
 
-  createPeriodicWave_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createPeriodicWave", [__arg_0]);
+  createMediaElementSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createMediaElementSource", []);
 
-  createPeriodicWave_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createPeriodicWave", [__arg_0, __arg_1]);
+  createMediaElementSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createMediaElementSource", [__arg_0]);
 
-  createScriptProcessor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createScriptProcessor", []);
+  createMediaStreamDestination_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createMediaStreamDestination", []);
 
-  createScriptProcessor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createScriptProcessor", [__arg_0]);
+  createMediaStreamSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createMediaStreamSource", []);
 
-  createScriptProcessor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createScriptProcessor", [__arg_0, __arg_1]);
+  createMediaStreamSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createMediaStreamSource", [__arg_0]);
 
-  createScriptProcessor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createScriptProcessor", [__arg_0, __arg_1, __arg_2]);
+  createOscillator_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createOscillator", []);
 
-  createWaveShaper_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createWaveShaper", []);
+  createPanner_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createPanner", []);
 
-  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
+  createPeriodicWave_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createPeriodicWave", []);
 
-  decodeAudioData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "decodeAudioData", []);
+  createPeriodicWave_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createPeriodicWave", [__arg_0]);
 
-  decodeAudioData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "decodeAudioData", [__arg_0]);
+  createPeriodicWave_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createPeriodicWave", [__arg_0, __arg_1]);
 
-  decodeAudioData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "decodeAudioData", [__arg_0, __arg_1]);
+  createScriptProcessor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createScriptProcessor", []);
 
-  decodeAudioData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "decodeAudioData", [__arg_0, __arg_1, __arg_2]);
+  createScriptProcessor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createScriptProcessor", [__arg_0]);
 
-  destination_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "destination");
+  createScriptProcessor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createScriptProcessor", [__arg_0, __arg_1]);
 
-  listener_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "listener");
+  createScriptProcessor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createScriptProcessor", [__arg_0, __arg_1, __arg_2]);
 
-  oncomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncomplete");
+  createStereoPanner_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createStereoPanner", []);
 
-  oncomplete_Setter_(mthis, __arg_0) => mthis["oncomplete"] = __arg_0;
+  createWaveShaper_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "createWaveShaper", []);
 
-  sampleRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sampleRate");
+  decodeAudioData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "decodeAudioData", []);
 
-  startRendering_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "startRendering", []);
+  decodeAudioData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "decodeAudioData", [__arg_0]);
+
+  decodeAudioData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "decodeAudioData", [__arg_0, __arg_1]);
+
+  decodeAudioData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "decodeAudioData", [__arg_0, __arg_1, __arg_2]);
+
+  resume_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "resume", []);
+
+  suspend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioContext */, "suspend", []);
 
 }
 
 class BlinkAudioDestinationNode extends BlinkAudioNode {
   static final instance = new BlinkAudioDestinationNode();
 
-  maxChannelCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxChannelCount");
+  maxChannelCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioDestinationNode */, "maxChannelCount");
 
 }
 
 class BlinkAudioListener {
   static final instance = new BlinkAudioListener();
 
-  dopplerFactor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dopplerFactor");
+  dopplerFactor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioListener */, "dopplerFactor");
 
-  dopplerFactor_Setter_(mthis, __arg_0) => mthis["dopplerFactor"] = __arg_0;
+  dopplerFactor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioListener */, "dopplerFactor", __arg_0);
 
-  setOrientation_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  speedOfSound_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioListener */, "speedOfSound");
 
-  setOrientation_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  speedOfSound_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioListener */, "speedOfSound", __arg_0);
 
-  setOrientation_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  setOrientation_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0]);
+  setOrientation_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1]);
+  setOrientation_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  setPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1, __arg_2]);
+  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setPosition", [__arg_0]);
 
-  setVelocity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0]);
+  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setPosition", [__arg_0, __arg_1]);
 
-  setVelocity_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0, __arg_1]);
+  setPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setPosition", [__arg_0, __arg_1, __arg_2]);
 
-  setVelocity_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0, __arg_1, __arg_2]);
+  setVelocity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setVelocity", [__arg_0]);
 
-  speedOfSound_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "speedOfSound");
+  setVelocity_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setVelocity", [__arg_0, __arg_1]);
 
-  speedOfSound_Setter_(mthis, __arg_0) => mthis["speedOfSound"] = __arg_0;
+  setVelocity_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioListener */, "setVelocity", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkAudioNode extends BlinkEventTarget {
   static final instance = new BlinkAudioNode();
 
-  channelCountMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "channelCountMode");
+  channelCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioNode */, "channelCount");
 
-  channelCountMode_Setter_(mthis, __arg_0) => mthis["channelCountMode"] = __arg_0;
+  channelCount_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioNode */, "channelCount", __arg_0);
 
-  channelCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "channelCount");
+  channelCountMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioNode */, "channelCountMode");
 
-  channelCount_Setter_(mthis, __arg_0) => mthis["channelCount"] = __arg_0;
+  channelCountMode_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioNode */, "channelCountMode", __arg_0);
 
-  channelInterpretation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "channelInterpretation");
+  channelInterpretation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioNode */, "channelInterpretation");
 
-  channelInterpretation_Setter_(mthis, __arg_0) => mthis["channelInterpretation"] = __arg_0;
+  channelInterpretation_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioNode */, "channelInterpretation", __arg_0);
 
-  connect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "connect", []);
+  context_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioNode */, "context");
 
-  connect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "connect", [__arg_0]);
+  numberOfInputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioNode */, "numberOfInputs");
 
-  connect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "connect", [__arg_0, __arg_1]);
+  numberOfOutputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioNode */, "numberOfOutputs");
 
-  connect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "connect", [__arg_0, __arg_1, __arg_2]);
+  connect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioNode */, "connect", []);
 
-  context_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "context");
+  connect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioNode */, "connect", [__arg_0]);
 
-  disconnect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "disconnect", []);
+  connect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioNode */, "connect", [__arg_0, __arg_1]);
 
-  disconnect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "disconnect", [__arg_0]);
+  connect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioNode */, "connect", [__arg_0, __arg_1, __arg_2]);
 
-  numberOfInputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfInputs");
+  disconnect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioNode */, "disconnect", []);
 
-  numberOfOutputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfOutputs");
+  disconnect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioNode */, "disconnect", [__arg_0]);
+
+  disconnect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioNode */, "disconnect", [__arg_0, __arg_1]);
+
+  disconnect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioNode */, "disconnect", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkAudioParam {
   static final instance = new BlinkAudioParam();
 
-  cancelScheduledValues_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancelScheduledValues", []);
+  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioParam */, "defaultValue");
 
-  cancelScheduledValues_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cancelScheduledValues", [__arg_0]);
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioParam */, "value");
 
-  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultValue");
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioParam */, "value", __arg_0);
 
-  exponentialRampToValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "exponentialRampToValueAtTime", []);
+  cancelScheduledValues_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "cancelScheduledValues", []);
 
-  exponentialRampToValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "exponentialRampToValueAtTime", [__arg_0]);
+  cancelScheduledValues_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "cancelScheduledValues", [__arg_0]);
 
-  exponentialRampToValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "exponentialRampToValueAtTime", [__arg_0, __arg_1]);
+  exponentialRampToValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "exponentialRampToValueAtTime", []);
 
-  linearRampToValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "linearRampToValueAtTime", []);
+  exponentialRampToValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "exponentialRampToValueAtTime", [__arg_0]);
 
-  linearRampToValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "linearRampToValueAtTime", [__arg_0]);
+  exponentialRampToValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "exponentialRampToValueAtTime", [__arg_0, __arg_1]);
 
-  linearRampToValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "linearRampToValueAtTime", [__arg_0, __arg_1]);
+  linearRampToValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "linearRampToValueAtTime", []);
 
-  setTargetAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTargetAtTime", [__arg_0]);
+  linearRampToValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "linearRampToValueAtTime", [__arg_0]);
 
-  setTargetAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setTargetAtTime", [__arg_0, __arg_1]);
+  linearRampToValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "linearRampToValueAtTime", [__arg_0, __arg_1]);
 
-  setTargetAtTime_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setTargetAtTime", [__arg_0, __arg_1, __arg_2]);
+  setTargetAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setTargetAtTime", [__arg_0]);
 
-  setValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setValueAtTime", []);
+  setTargetAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setTargetAtTime", [__arg_0, __arg_1]);
 
-  setValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setValueAtTime", [__arg_0]);
+  setTargetAtTime_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setTargetAtTime", [__arg_0, __arg_1, __arg_2]);
 
-  setValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setValueAtTime", [__arg_0, __arg_1]);
+  setValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setValueAtTime", []);
 
-  setValueCurveAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setValueCurveAtTime", [__arg_0]);
+  setValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setValueAtTime", [__arg_0]);
 
-  setValueCurveAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setValueCurveAtTime", [__arg_0, __arg_1]);
+  setValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setValueAtTime", [__arg_0, __arg_1]);
 
-  setValueCurveAtTime_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setValueCurveAtTime", [__arg_0, __arg_1, __arg_2]);
+  setValueCurveAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setValueCurveAtTime", [__arg_0]);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  setValueCurveAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setValueCurveAtTime", [__arg_0, __arg_1]);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  setValueCurveAtTime_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* AudioParam */, "setValueCurveAtTime", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkAudioProcessingEvent extends BlinkEvent {
   static final instance = new BlinkAudioProcessingEvent();
 
-  inputBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputBuffer");
+  inputBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioProcessingEvent */, "inputBuffer");
 
-  outputBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outputBuffer");
+  outputBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioProcessingEvent */, "outputBuffer");
 
-  playbackTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackTime");
+  playbackTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioProcessingEvent */, "playbackTime");
 
 }
 
@@ -1160,159 +1390,272 @@
 class BlinkAudioTrack {
   static final instance = new BlinkAudioTrack();
 
-  enabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "enabled");
+  enabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrack */, "enabled");
 
-  enabled_Setter_(mthis, __arg_0) => mthis["enabled"] = __arg_0;
+  enabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioTrack */, "enabled", __arg_0);
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrack */, "id");
 
-  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrack */, "kind");
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrack */, "label");
 
-  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "language");
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrack */, "language");
 
 }
 
 class BlinkAudioTrackList extends BlinkEventTarget {
   static final instance = new BlinkAudioTrackList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrackList */, "length");
 
-  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", []);
+  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrackList */, "onaddtrack");
 
-  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", [__arg_0]);
+  onaddtrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioTrackList */, "onaddtrack", __arg_0);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrackList */, "onchange");
 
-  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddtrack");
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioTrackList */, "onchange", __arg_0);
 
-  onaddtrack_Setter_(mthis, __arg_0) => mthis["onaddtrack"] = __arg_0;
+  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AudioTrackList */, "onremovetrack");
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  onremovetrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AudioTrackList */, "onremovetrack", __arg_0);
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioTrackList */, "__getter__", [__arg_0]);
 
-  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovetrack");
+  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* AudioTrackList */, "getTrackById", []);
 
-  onremovetrack_Setter_(mthis, __arg_0) => mthis["onremovetrack"] = __arg_0;
+  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* AudioTrackList */, "getTrackById", [__arg_0]);
 
 }
 
 class BlinkAutocompleteErrorEvent extends BlinkEvent {
   static final instance = new BlinkAutocompleteErrorEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "AutocompleteErrorEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("AutocompleteErrorEvent");
 
-  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reason");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("AutocompleteErrorEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("AutocompleteErrorEvent", [__arg_0, __arg_1]);
+
+  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AutocompleteErrorEvent */, "reason");
 
 }
 
 class BlinkBarProp {
   static final instance = new BlinkBarProp();
 
-  visible_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "visible");
+  visible_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BarProp */, "visible");
 
 }
 
 class BlinkBatteryManager extends BlinkEventTarget {
   static final instance = new BlinkBatteryManager();
 
-  chargingTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "chargingTime");
+  charging_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BatteryManager */, "charging");
 
-  charging_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charging");
+  chargingTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BatteryManager */, "chargingTime");
 
-  dischargingTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dischargingTime");
+  dischargingTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BatteryManager */, "dischargingTime");
 
-  level_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "level");
+  level_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BatteryManager */, "level");
 
-  onchargingchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchargingchange");
+  onchargingchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BatteryManager */, "onchargingchange");
 
-  onchargingchange_Setter_(mthis, __arg_0) => mthis["onchargingchange"] = __arg_0;
+  onchargingchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* BatteryManager */, "onchargingchange", __arg_0);
 
-  onchargingtimechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchargingtimechange");
+  onchargingtimechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BatteryManager */, "onchargingtimechange");
 
-  onchargingtimechange_Setter_(mthis, __arg_0) => mthis["onchargingtimechange"] = __arg_0;
+  onchargingtimechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* BatteryManager */, "onchargingtimechange", __arg_0);
 
-  ondischargingtimechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondischargingtimechange");
+  ondischargingtimechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BatteryManager */, "ondischargingtimechange");
 
-  ondischargingtimechange_Setter_(mthis, __arg_0) => mthis["ondischargingtimechange"] = __arg_0;
+  ondischargingtimechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* BatteryManager */, "ondischargingtimechange", __arg_0);
 
-  onlevelchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onlevelchange");
+  onlevelchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BatteryManager */, "onlevelchange");
 
-  onlevelchange_Setter_(mthis, __arg_0) => mthis["onlevelchange"] = __arg_0;
+  onlevelchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* BatteryManager */, "onlevelchange", __arg_0);
+
+}
+
+class BlinkBeforeInstallPromptEvent extends BlinkEvent {
+  static final instance = new BlinkBeforeInstallPromptEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("BeforeInstallPromptEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("BeforeInstallPromptEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("BeforeInstallPromptEvent", [__arg_0, __arg_1]);
+
+  platforms_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BeforeInstallPromptEvent */, "platforms");
+
+  userChoice_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BeforeInstallPromptEvent */, "userChoice");
+
+  prompt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* BeforeInstallPromptEvent */, "prompt", []);
 
 }
 
 class BlinkBeforeUnloadEvent extends BlinkEvent {
   static final instance = new BlinkBeforeUnloadEvent();
 
-  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "returnValue");
+  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BeforeUnloadEvent */, "returnValue");
 
-  returnValue_Setter_(mthis, __arg_0) => mthis["returnValue"] = __arg_0;
+  returnValue_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* BeforeUnloadEvent */, "returnValue", __arg_0);
 
 }
 
 class BlinkBiquadFilterNode extends BlinkAudioNode {
   static final instance = new BlinkBiquadFilterNode();
 
-  Q_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "Q");
+  Q_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BiquadFilterNode */, "Q");
 
-  detune_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "detune");
+  detune_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BiquadFilterNode */, "detune");
 
-  frequency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frequency");
+  frequency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BiquadFilterNode */, "frequency");
 
-  gain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gain");
+  gain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BiquadFilterNode */, "gain");
 
-  getFrequencyResponse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFrequencyResponse", [__arg_0]);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BiquadFilterNode */, "type");
 
-  getFrequencyResponse_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getFrequencyResponse", [__arg_0, __arg_1]);
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* BiquadFilterNode */, "type", __arg_0);
 
-  getFrequencyResponse_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getFrequencyResponse", [__arg_0, __arg_1, __arg_2]);
+  getFrequencyResponse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* BiquadFilterNode */, "getFrequencyResponse", [__arg_0]);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  getFrequencyResponse_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* BiquadFilterNode */, "getFrequencyResponse", [__arg_0, __arg_1]);
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  getFrequencyResponse_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* BiquadFilterNode */, "getFrequencyResponse", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkBlob {
   static final instance = new BlinkBlob();
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Blob");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Blob"), []);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Blob", [__arg_0]);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Blob"), [__arg_0]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("Blob", [__arg_0, __arg_1]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Blob"), [__arg_0, __arg_1]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("Blob", [__arg_0, __arg_1, __arg_2]);
 
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Blob */, "size");
 
-  slice_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "slice", []);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Blob */, "type");
 
-  slice_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "slice", [__arg_0]);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Blob */, "close", []);
 
-  slice_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "slice", [__arg_0, __arg_1]);
+  slice_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Blob */, "slice", []);
 
-  slice_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "slice", [__arg_0, __arg_1, __arg_2]);
+  slice_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Blob */, "slice", [__arg_0]);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  slice_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Blob */, "slice", [__arg_0, __arg_1]);
+
+  slice_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Blob */, "slice", [__arg_0, __arg_1, __arg_2]);
+
+}
+
+class BlinkBluetooth {
+  static final instance = new BlinkBluetooth();
+
+  requestDevice_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Bluetooth */, "requestDevice", []);
+
+  requestDevice_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Bluetooth */, "requestDevice", [__arg_0]);
+
+}
+
+class BlinkBluetoothDevice {
+  static final instance = new BlinkBluetoothDevice();
+
+  deviceClass_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothDevice */, "deviceClass");
+
+  instanceID_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothDevice */, "instanceID");
+
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothDevice */, "name");
+
+  paired_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothDevice */, "paired");
+
+  productID_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothDevice */, "productID");
+
+  productVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothDevice */, "productVersion");
+
+  vendorID_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothDevice */, "vendorID");
+
+  vendorIDSource_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothDevice */, "vendorIDSource");
+
+  connectGATT_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* BluetoothDevice */, "connectGATT", []);
+
+}
+
+class BlinkBluetoothGATTCharacteristic {
+  static final instance = new BlinkBluetoothGATTCharacteristic();
+
+  uuid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothGATTCharacteristic */, "uuid");
+
+  readValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* BluetoothGATTCharacteristic */, "readValue", []);
+
+  writeValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* BluetoothGATTCharacteristic */, "writeValue", []);
+
+  writeValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* BluetoothGATTCharacteristic */, "writeValue", [__arg_0]);
+
+}
+
+class BlinkBluetoothGATTRemoteServer {
+  static final instance = new BlinkBluetoothGATTRemoteServer();
+
+  connected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothGATTRemoteServer */, "connected");
+
+  getPrimaryService_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* BluetoothGATTRemoteServer */, "getPrimaryService", []);
+
+  getPrimaryService_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* BluetoothGATTRemoteServer */, "getPrimaryService", [__arg_0]);
+
+}
+
+class BlinkBluetoothGATTService {
+  static final instance = new BlinkBluetoothGATTService();
+
+  isPrimary_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothGATTService */, "isPrimary");
+
+  uuid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* BluetoothGATTService */, "uuid");
+
+  getCharacteristic_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* BluetoothGATTService */, "getCharacteristic", []);
+
+  getCharacteristic_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* BluetoothGATTService */, "getCharacteristic", [__arg_0]);
+
+}
+
+class BlinkBluetoothUUID {
+  static final instance = new BlinkBluetoothUUID();
+
+  canonicalUUID_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "BluetoothUUID") /* BluetoothUUID */, "canonicalUUID", []);
+
+  canonicalUUID_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "BluetoothUUID") /* BluetoothUUID */, "canonicalUUID", [__arg_0]);
+
+  getCharacteristic_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "BluetoothUUID") /* BluetoothUUID */, "getCharacteristic", []);
+
+  getCharacteristic_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "BluetoothUUID") /* BluetoothUUID */, "getCharacteristic", [__arg_0]);
+
+  getDescriptor_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "BluetoothUUID") /* BluetoothUUID */, "getDescriptor", []);
+
+  getDescriptor_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "BluetoothUUID") /* BluetoothUUID */, "getDescriptor", [__arg_0]);
+
+  getService_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "BluetoothUUID") /* BluetoothUUID */, "getService", []);
+
+  getService_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "BluetoothUUID") /* BluetoothUUID */, "getService", [__arg_0]);
 
 }
 
 class BlinkBody {
   static final instance = new BlinkBody();
 
-  arrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "arrayBuffer", []);
+  bodyUsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Body */, "bodyUsed");
 
-  blob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blob", []);
+  arrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Body */, "arrayBuffer", []);
 
-  bodyUsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bodyUsed");
+  blob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Body */, "blob", []);
 
-  json_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "json", []);
+  json_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Body */, "json", []);
 
-  text_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "text", []);
+  text_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Body */, "text", []);
 
 }
 
@@ -1321,740 +1664,769 @@
 
 }
 
+class BlinkCHROMIUMSubscribeUniform {
+  static final instance = new BlinkCHROMIUMSubscribeUniform();
+
+  bindValuebufferCHROMIUM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "bindValuebufferCHROMIUM", []);
+
+  bindValuebufferCHROMIUM_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "bindValuebufferCHROMIUM", [__arg_0]);
+
+  bindValuebufferCHROMIUM_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "bindValuebufferCHROMIUM", [__arg_0, __arg_1]);
+
+  createValuebufferCHROMIUM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "createValuebufferCHROMIUM", []);
+
+  deleteValuebufferCHROMIUM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "deleteValuebufferCHROMIUM", []);
+
+  deleteValuebufferCHROMIUM_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "deleteValuebufferCHROMIUM", [__arg_0]);
+
+  isValuebufferCHROMIUM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "isValuebufferCHROMIUM", []);
+
+  isValuebufferCHROMIUM_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "isValuebufferCHROMIUM", [__arg_0]);
+
+  populateSubscribedValuesCHROMIUM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "populateSubscribedValuesCHROMIUM", []);
+
+  populateSubscribedValuesCHROMIUM_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "populateSubscribedValuesCHROMIUM", [__arg_0]);
+
+  subscribeValueCHROMIUM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "subscribeValueCHROMIUM", []);
+
+  subscribeValueCHROMIUM_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "subscribeValueCHROMIUM", [__arg_0]);
+
+  subscribeValueCHROMIUM_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "subscribeValueCHROMIUM", [__arg_0, __arg_1]);
+
+  uniformValuebufferCHROMIUM_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "uniformValuebufferCHROMIUM", [__arg_0]);
+
+  uniformValuebufferCHROMIUM_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "uniformValuebufferCHROMIUM", [__arg_0, __arg_1]);
+
+  uniformValuebufferCHROMIUM_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CHROMIUMSubscribeUniform */, "uniformValuebufferCHROMIUM", [__arg_0, __arg_1, __arg_2]);
+
+}
+
+class BlinkCHROMIUMValuebuffer {
+  static final instance = new BlinkCHROMIUMValuebuffer();
+
+}
+
 class BlinkCSS {
   static final instance = new BlinkCSS();
 
-  supports_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "supports", []);
+  supports_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "CSS") /* CSS */, "supports", []);
 
-  supports_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "supports", [__arg_0]);
+  supports_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "CSS") /* CSS */, "supports", [__arg_0]);
 
-  supports_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "supports", [__arg_0, __arg_1]);
+  supports_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "CSS") /* CSS */, "supports", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCSSCharsetRule extends BlinkCSSRule {
   static final instance = new BlinkCSSCharsetRule();
 
-  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "encoding");
+  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSCharsetRule */, "encoding");
 
-  encoding_Setter_(mthis, __arg_0) => mthis["encoding"] = __arg_0;
+  encoding_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CSSCharsetRule */, "encoding", __arg_0);
 
 }
 
 class BlinkCSSFontFaceRule extends BlinkCSSRule {
   static final instance = new BlinkCSSFontFaceRule();
 
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSFontFaceRule */, "style");
+
+}
+
+class BlinkCSSGroupingRule extends BlinkCSSRule {
+  static final instance = new BlinkCSSGroupingRule();
+
+  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSGroupingRule */, "cssRules");
+
+  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSGroupingRule */, "deleteRule", []);
+
+  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSGroupingRule */, "deleteRule", [__arg_0]);
+
+  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSGroupingRule */, "insertRule", []);
+
+  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSGroupingRule */, "insertRule", [__arg_0]);
+
+  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CSSGroupingRule */, "insertRule", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCSSImportRule extends BlinkCSSRule {
   static final instance = new BlinkCSSImportRule();
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSImportRule */, "href");
 
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSImportRule */, "media");
 
-  styleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "styleSheet");
+  styleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSImportRule */, "styleSheet");
 
 }
 
 class BlinkCSSKeyframeRule extends BlinkCSSRule {
   static final instance = new BlinkCSSKeyframeRule();
 
-  keyText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyText");
+  keyText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSKeyframeRule */, "keyText");
 
-  keyText_Setter_(mthis, __arg_0) => mthis["keyText"] = __arg_0;
+  keyText_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CSSKeyframeRule */, "keyText", __arg_0);
 
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSKeyframeRule */, "style");
 
 }
 
 class BlinkCSSKeyframesRule extends BlinkCSSRule {
   static final instance = new BlinkCSSKeyframesRule();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSKeyframesRule */, "cssRules");
 
-  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssRules");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSKeyframesRule */, "name");
 
-  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", []);
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CSSKeyframesRule */, "name", __arg_0);
 
-  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSKeyframesRule */, "__getter__", [__arg_0]);
 
-  findRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "findRule", []);
+  appendRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSKeyframesRule */, "appendRule", []);
 
-  findRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "findRule", [__arg_0]);
+  appendRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSKeyframesRule */, "appendRule", [__arg_0]);
 
-  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", []);
+  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSKeyframesRule */, "deleteRule", []);
 
-  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0]);
+  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSKeyframesRule */, "deleteRule", [__arg_0]);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  findRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSKeyframesRule */, "findRule", []);
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  findRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSKeyframesRule */, "findRule", [__arg_0]);
 
 }
 
-class BlinkCSSMediaRule extends BlinkCSSRule {
+class BlinkCSSMediaRule extends BlinkCSSGroupingRule {
   static final instance = new BlinkCSSMediaRule();
 
-  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssRules");
-
-  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", []);
-
-  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", [__arg_0]);
-
-  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", []);
-
-  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0]);
-
-  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0, __arg_1]);
-
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSMediaRule */, "media");
 
 }
 
 class BlinkCSSPageRule extends BlinkCSSRule {
   static final instance = new BlinkCSSPageRule();
 
-  selectorText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectorText");
+  selectorText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSPageRule */, "selectorText");
 
-  selectorText_Setter_(mthis, __arg_0) => mthis["selectorText"] = __arg_0;
+  selectorText_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CSSPageRule */, "selectorText", __arg_0);
 
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
-
-}
-
-class BlinkCSSPrimitiveValue extends BlinkCSSValue {
-  static final instance = new BlinkCSSPrimitiveValue();
-
-  getCounterValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCounterValue", []);
-
-  getFloatValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFloatValue", []);
-
-  getFloatValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFloatValue", [__arg_0]);
-
-  getRGBColorValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRGBColorValue", []);
-
-  getRectValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRectValue", []);
-
-  getStringValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStringValue", []);
-
-  primitiveType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "primitiveType");
-
-  setFloatValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setFloatValue", []);
-
-  setFloatValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setFloatValue", [__arg_0]);
-
-  setFloatValue_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setFloatValue", [__arg_0, __arg_1]);
-
-  setStringValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStringValue", []);
-
-  setStringValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStringValue", [__arg_0]);
-
-  setStringValue_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setStringValue", [__arg_0, __arg_1]);
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSPageRule */, "style");
 
 }
 
 class BlinkCSSRule {
   static final instance = new BlinkCSSRule();
 
-  cssText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssText");
+  cssText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSRule */, "cssText");
 
-  cssText_Setter_(mthis, __arg_0) => mthis["cssText"] = __arg_0;
+  cssText_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CSSRule */, "cssText", __arg_0);
 
-  parentRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentRule");
+  parentRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSRule */, "parentRule");
 
-  parentStyleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentStyleSheet");
+  parentStyleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSRule */, "parentStyleSheet");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSRule */, "type");
 
 }
 
 class BlinkCSSRuleList {
   static final instance = new BlinkCSSRuleList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSRuleList */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSRuleList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSRuleList */, "item", [__arg_0]);
 
 }
 
 class BlinkCSSStyleDeclaration {
   static final instance = new BlinkCSSStyleDeclaration();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  cssText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSStyleDeclaration */, "cssText");
 
-  $__propertyQuery___Callback_1_(mthis, __arg_0) => mthis[__arg_0];
+  cssText_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CSSStyleDeclaration */, "cssText", __arg_0);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSStyleDeclaration */, "length");
 
-  cssText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssText");
+  parentRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSStyleDeclaration */, "parentRule");
 
-  cssText_Setter_(mthis, __arg_0) => mthis["cssText"] = __arg_0;
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleDeclaration */, "__getter__", [__arg_0]);
 
-  getPropertyPriority_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getPropertyPriority", []);
+  $__propertyQuery___Callback_1_(mthis, __arg_0) native "Blink_Operation_PQ_CSSStyleDeclaration";
 
-  getPropertyPriority_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getPropertyPriority", [__arg_0]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleDeclaration */, "__setter__", [__arg_0, __arg_1]);
 
-  getPropertyValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getPropertyValue", []);
+  getPropertyPriority_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleDeclaration */, "getPropertyPriority", []);
 
-  getPropertyValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getPropertyValue", [__arg_0]);
+  getPropertyPriority_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleDeclaration */, "getPropertyPriority", [__arg_0]);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  getPropertyValue_Callback_0_(mthis) native "Blink_Operation_0_CSSStyleDeclaration_getPropertyValue";
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  getPropertyValue_Callback_1_(mthis, __arg_0) native "Blink_Operation_CSSStyleDeclaration_getPropertyValue"; /* __arg_0 */
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleDeclaration */, "item", []);
 
-  parentRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentRule");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleDeclaration */, "item", [__arg_0]);
 
-  removeProperty_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeProperty", []);
+  removeProperty_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleDeclaration */, "removeProperty", []);
 
-  removeProperty_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeProperty", [__arg_0]);
+  removeProperty_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleDeclaration */, "removeProperty", [__arg_0]);
 
-  setProperty_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setProperty", []);
+  setProperty_Callback_1_(mthis, __arg_0) native "Blink_Operation_CSSStyleDeclaration_setProperty"; /* __arg_0 */
 
-  setProperty_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setProperty", [__arg_0]);
+  setProperty_Callback_2_(mthis, __arg_0, __arg_1) native "Blink_Operation_CSSStyleDeclaration_setProperty"; /* __arg_0, __arg_1 */
 
-  setProperty_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setProperty", [__arg_0, __arg_1]);
-
-  setProperty_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setProperty", [__arg_0, __arg_1, __arg_2]);
+  setProperty_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) native "Blink_Operation_CSSStyleDeclaration_setProperty"; /* __arg_0, __arg_1, __arg_2 */
 
 }
 
 class BlinkCSSStyleRule extends BlinkCSSRule {
   static final instance = new BlinkCSSStyleRule();
 
-  selectorText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectorText");
+  selectorText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSStyleRule */, "selectorText");
 
-  selectorText_Setter_(mthis, __arg_0) => mthis["selectorText"] = __arg_0;
+  selectorText_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CSSStyleRule */, "selectorText", __arg_0);
 
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSStyleRule */, "style");
 
 }
 
 class BlinkCSSStyleSheet extends BlinkStyleSheet {
   static final instance = new BlinkCSSStyleSheet();
 
-  addRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addRule", []);
+  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSStyleSheet */, "cssRules");
 
-  addRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addRule", [__arg_0]);
+  ownerRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSStyleSheet */, "ownerRule");
 
-  addRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addRule", [__arg_0, __arg_1]);
+  rules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSStyleSheet */, "rules");
 
-  addRule_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "addRule", [__arg_0, __arg_1, __arg_2]);
+  addRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "addRule", []);
 
-  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssRules");
+  addRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "addRule", [__arg_0]);
 
-  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", []);
+  addRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "addRule", [__arg_0, __arg_1]);
 
-  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", [__arg_0]);
+  addRule_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "addRule", [__arg_0, __arg_1, __arg_2]);
 
-  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", []);
+  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "deleteRule", []);
 
-  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0]);
+  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "deleteRule", [__arg_0]);
 
-  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0, __arg_1]);
+  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "insertRule", []);
 
-  ownerRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerRule");
+  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "insertRule", [__arg_0]);
 
-  removeRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeRule", []);
+  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "insertRule", [__arg_0, __arg_1]);
 
-  removeRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeRule", [__arg_0]);
+  removeRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "removeRule", []);
 
-  rules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rules");
+  removeRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSStyleSheet */, "removeRule", [__arg_0]);
 
 }
 
 class BlinkCSSSupportsRule extends BlinkCSSRule {
   static final instance = new BlinkCSSSupportsRule();
 
-  conditionText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "conditionText");
+  conditionText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSSupportsRule */, "conditionText");
 
-  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssRules");
+  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSSupportsRule */, "cssRules");
 
-  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", []);
+  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSSupportsRule */, "deleteRule", []);
 
-  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", [__arg_0]);
+  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSSupportsRule */, "deleteRule", [__arg_0]);
 
-  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", []);
+  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CSSSupportsRule */, "insertRule", []);
 
-  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0]);
+  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CSSSupportsRule */, "insertRule", [__arg_0]);
 
-  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0, __arg_1]);
-
-}
-
-class BlinkCSSUnknownRule extends BlinkCSSRule {
-  static final instance = new BlinkCSSUnknownRule();
-
-}
-
-class BlinkCSSValue {
-  static final instance = new BlinkCSSValue();
-
-  cssText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssText");
-
-  cssText_Setter_(mthis, __arg_0) => mthis["cssText"] = __arg_0;
-
-  cssValueType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssValueType");
-
-}
-
-class BlinkCSSValueList extends BlinkCSSValue {
-  static final instance = new BlinkCSSValueList();
-
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
-
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
-
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CSSSupportsRule */, "insertRule", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCSSViewportRule extends BlinkCSSRule {
   static final instance = new BlinkCSSViewportRule();
 
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CSSViewportRule */, "style");
 
 }
 
 class BlinkCache {
   static final instance = new BlinkCache();
 
-  addAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addAll", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "add", []);
 
-  addAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addAll", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "add", [__arg_0]);
 
-  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
+  addAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "addAll", []);
 
-  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
+  addAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "addAll", [__arg_0]);
 
-  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "delete", []);
 
-  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "delete", [__arg_0]);
 
-  delete_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0, __arg_1]);
+  delete_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "delete", [__arg_0, __arg_1]);
 
-  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "keys", []);
+  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "keys", []);
 
-  keys_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "keys", [__arg_0]);
+  keys_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "keys", [__arg_0]);
 
-  keys_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "keys", [__arg_0, __arg_1]);
+  keys_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "keys", [__arg_0, __arg_1]);
 
-  matchAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matchAll", []);
+  match_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "match", []);
 
-  matchAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matchAll", [__arg_0]);
+  match_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "match", [__arg_0]);
 
-  matchAll_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "matchAll", [__arg_0, __arg_1]);
+  match_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "match", [__arg_0, __arg_1]);
 
-  match_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "match", []);
+  put_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "put", []);
 
-  match_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "match", [__arg_0]);
+  put_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "put", [__arg_0]);
 
-  match_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "match", [__arg_0, __arg_1]);
-
-  put_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "put", []);
-
-  put_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "put", [__arg_0]);
-
-  put_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "put", [__arg_0, __arg_1]);
+  put_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Cache */, "put", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCacheStorage {
   static final instance = new BlinkCacheStorage();
 
-  create_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "create", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "delete", []);
 
-  create_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "create", [__arg_0]);
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "delete", [__arg_0]);
 
-  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
+  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "has", []);
 
-  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
+  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "has", [__arg_0]);
 
-  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
+  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "keys", []);
 
-  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
+  match_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "match", []);
 
-  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
+  match_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "match", [__arg_0]);
 
-  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
+  match_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "match", [__arg_0, __arg_1]);
 
-  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "keys", []);
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "open", []);
 
-}
-
-class BlinkCanvas2DContextAttributes {
-  static final instance = new BlinkCanvas2DContextAttributes();
-
-  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alpha");
-
-  alpha_Setter_(mthis, __arg_0) => mthis["alpha"] = __arg_0;
-
-  storage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "storage");
-
-  storage_Setter_(mthis, __arg_0) => mthis["storage"] = __arg_0;
+  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CacheStorage */, "open", [__arg_0]);
 
 }
 
 class BlinkCanvasGradient {
   static final instance = new BlinkCanvasGradient();
 
-  addColorStop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addColorStop", []);
+  addColorStop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasGradient */, "addColorStop", []);
 
-  addColorStop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addColorStop", [__arg_0]);
+  addColorStop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasGradient */, "addColorStop", [__arg_0]);
 
-  addColorStop_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addColorStop", [__arg_0, __arg_1]);
+  addColorStop_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasGradient */, "addColorStop", [__arg_0, __arg_1]);
+
+}
+
+class BlinkCanvasPathMethods {
+  static final instance = new BlinkCanvasPathMethods();
+
+  arc_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  arc_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  arc_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2]);
+
+  arcTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  arcTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  bezierCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  bezierCurveTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  bezierCurveTo_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  closePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "closePath", []);
+
+  ellipse_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  ellipse_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  ellipse_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  lineTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", []);
+
+  lineTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", [__arg_0]);
+
+  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", [__arg_0, __arg_1]);
+
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", []);
+
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", [__arg_0]);
+
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", [__arg_0, __arg_1]);
+
+  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1]);
+
+  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
+
+  quadraticCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  rect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1]);
+
+  rect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1, __arg_2]);
+
+  rect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkCanvasPattern {
   static final instance = new BlinkCanvasPattern();
 
-  setTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setTransform", []);
+  setTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPattern */, "setTransform", []);
 
-  setTransform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTransform", [__arg_0]);
+  setTransform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPattern */, "setTransform", [__arg_0]);
 
 }
 
 class BlinkCanvasRenderingContext2D {
   static final instance = new BlinkCanvasRenderingContext2D();
 
-  addHitRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addHitRegion", []);
+  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "canvas");
 
-  addHitRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addHitRegion", [__arg_0]);
+  currentTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "currentTransform");
 
-  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "arcTo", [__arg_0, __arg_1, __arg_2]);
+  currentTransform_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "currentTransform", __arg_0);
 
-  arcTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "direction");
 
-  arcTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  direction_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "direction", __arg_0);
 
-  arc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2]);
+  fillStyle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "fillStyle");
 
-  arc_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  fillStyle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "fillStyle", __arg_0);
 
-  arc_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  filter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "filter");
 
-  arc_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  filter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "filter", __arg_0);
 
-  beginPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "beginPath", []);
+  font_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "font");
 
-  bezierCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  font_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "font", __arg_0);
 
-  bezierCurveTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  globalAlpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "globalAlpha");
 
-  bezierCurveTo_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  globalAlpha_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "globalAlpha", __arg_0);
 
-  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "canvas");
+  globalCompositeOperation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "globalCompositeOperation");
 
-  clearHitRegions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearHitRegions", []);
+  globalCompositeOperation_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "globalCompositeOperation", __arg_0);
 
-  clearRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "clearRect", [__arg_0, __arg_1]);
+  imageSmoothingEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "imageSmoothingEnabled");
 
-  clearRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "clearRect", [__arg_0, __arg_1, __arg_2]);
+  imageSmoothingEnabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "imageSmoothingEnabled", __arg_0);
 
-  clearRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "clearRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  lineCap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "lineCap");
 
-  clip_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clip", []);
+  lineCap_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "lineCap", __arg_0);
 
-  clip_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clip", [__arg_0]);
+  lineDashOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "lineDashOffset");
 
-  clip_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "clip", [__arg_0, __arg_1]);
+  lineDashOffset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "lineDashOffset", __arg_0);
 
-  closePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "closePath", []);
+  lineJoin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "lineJoin");
 
-  createImageData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createImageData", []);
+  lineJoin_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "lineJoin", __arg_0);
 
-  createImageData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createImageData", [__arg_0]);
+  lineWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "lineWidth");
 
-  createImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createImageData", [__arg_0, __arg_1]);
+  lineWidth_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "lineWidth", __arg_0);
 
-  createLinearGradient_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createLinearGradient", [__arg_0, __arg_1]);
+  miterLimit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "miterLimit");
 
-  createLinearGradient_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createLinearGradient", [__arg_0, __arg_1, __arg_2]);
+  miterLimit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "miterLimit", __arg_0);
 
-  createLinearGradient_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createLinearGradient", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  shadowBlur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "shadowBlur");
 
-  createPattern_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createPattern", []);
+  shadowBlur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "shadowBlur", __arg_0);
 
-  createPattern_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createPattern", [__arg_0]);
+  shadowColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "shadowColor");
 
-  createPattern_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createPattern", [__arg_0, __arg_1]);
+  shadowColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "shadowColor", __arg_0);
 
-  createRadialGradient_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  shadowOffsetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "shadowOffsetX");
 
-  createRadialGradient_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  shadowOffsetX_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "shadowOffsetX", __arg_0);
 
-  createRadialGradient_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  shadowOffsetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "shadowOffsetY");
 
-  currentTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTransform");
+  shadowOffsetY_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "shadowOffsetY", __arg_0);
 
-  currentTransform_Setter_(mthis, __arg_0) => mthis["currentTransform"] = __arg_0;
+  strokeStyle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "strokeStyle");
 
-  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "direction");
+  strokeStyle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "strokeStyle", __arg_0);
 
-  direction_Setter_(mthis, __arg_0) => mthis["direction"] = __arg_0;
+  textAlign_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "textAlign");
 
-  drawFocusIfNeeded_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "drawFocusIfNeeded", []);
+  textAlign_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "textAlign", __arg_0);
 
-  drawFocusIfNeeded_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "drawFocusIfNeeded", [__arg_0]);
+  textBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "textBaseline");
 
-  drawFocusIfNeeded_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawFocusIfNeeded", [__arg_0, __arg_1]);
+  textBaseline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "textBaseline", __arg_0);
 
-  drawImage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0]);
+  webkitImageSmoothingEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CanvasRenderingContext2D */, "webkitImageSmoothingEnabled");
 
-  drawImage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1]);
+  webkitImageSmoothingEnabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CanvasRenderingContext2D */, "webkitImageSmoothingEnabled", __arg_0);
 
-  drawImage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1, __arg_2]);
+  addHitRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "addHitRegion", []);
 
-  drawImage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  addHitRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "addHitRegion", [__arg_0]);
 
-  drawImage_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  beginPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "beginPath", []);
 
-  drawImage_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  clearHitRegions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "clearHitRegions", []);
 
-  drawImage_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  clearRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "clearRect", [__arg_0, __arg_1]);
 
-  drawImage_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  clearRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "clearRect", [__arg_0, __arg_1, __arg_2]);
 
-  ellipse_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  clearRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "clearRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  ellipse_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  clip_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "clip", []);
 
-  ellipse_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  clip_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "clip", [__arg_0]);
 
-  ellipse_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  clip_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "clip", [__arg_0, __arg_1]);
 
-  fillRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "fillRect", [__arg_0, __arg_1]);
+  createImageData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createImageData", []);
 
-  fillRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "fillRect", [__arg_0, __arg_1, __arg_2]);
+  createImageData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createImageData", [__arg_0]);
 
-  fillRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "fillRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  createImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createImageData", [__arg_0, __arg_1]);
 
-  fillStyle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fillStyle");
+  createLinearGradient_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createLinearGradient", [__arg_0, __arg_1]);
 
-  fillStyle_Setter_(mthis, __arg_0) => mthis["fillStyle"] = __arg_0;
+  createLinearGradient_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createLinearGradient", [__arg_0, __arg_1, __arg_2]);
 
-  fillText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "fillText", [__arg_0]);
+  createLinearGradient_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createLinearGradient", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  fillText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "fillText", [__arg_0, __arg_1]);
+  createPattern_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createPattern", []);
 
-  fillText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "fillText", [__arg_0, __arg_1, __arg_2]);
+  createPattern_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createPattern", [__arg_0]);
 
-  fillText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "fillText", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  createPattern_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createPattern", [__arg_0, __arg_1]);
 
-  fill_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "fill", []);
+  createRadialGradient_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  fill_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "fill", [__arg_0]);
+  createRadialGradient_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  fill_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "fill", [__arg_0, __arg_1]);
+  createRadialGradient_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  font_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "font");
+  drawFocusIfNeeded_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawFocusIfNeeded", []);
 
-  font_Setter_(mthis, __arg_0) => mthis["font"] = __arg_0;
+  drawFocusIfNeeded_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawFocusIfNeeded", [__arg_0]);
 
-  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getContextAttributes", []);
+  drawFocusIfNeeded_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawFocusIfNeeded", [__arg_0, __arg_1]);
 
-  getImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getImageData", [__arg_0, __arg_1]);
+  drawImage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0]);
 
-  getImageData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getImageData", [__arg_0, __arg_1, __arg_2]);
+  drawImage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0, __arg_1]);
 
-  getImageData_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "getImageData", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  drawImage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0, __arg_1, __arg_2]);
 
-  getLineDash_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getLineDash", []);
+  drawImage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  globalAlpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "globalAlpha");
+  drawImage_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  globalAlpha_Setter_(mthis, __arg_0) => mthis["globalAlpha"] = __arg_0;
+  drawImage_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  globalCompositeOperation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "globalCompositeOperation");
+  drawImage_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  globalCompositeOperation_Setter_(mthis, __arg_0) => mthis["globalCompositeOperation"] = __arg_0;
+  drawImage_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  imageSmoothingEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "imageSmoothingEnabled");
+  drawImage_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
 
-  imageSmoothingEnabled_Setter_(mthis, __arg_0) => mthis["imageSmoothingEnabled"] = __arg_0;
+  fill_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fill", []);
 
-  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isContextLost", []);
+  fill_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fill", [__arg_0]);
 
-  isPointInPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInPath", []);
+  fill_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fill", [__arg_0, __arg_1]);
 
-  isPointInPath_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInPath", [__arg_0]);
+  fillRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fillRect", [__arg_0, __arg_1]);
+
+  fillRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fillRect", [__arg_0, __arg_1, __arg_2]);
+
+  fillRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fillRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  fillText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fillText", [__arg_0]);
+
+  fillText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fillText", [__arg_0, __arg_1]);
 
-  isPointInPath_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isPointInPath", [__arg_0, __arg_1]);
+  fillText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fillText", [__arg_0, __arg_1, __arg_2]);
 
-  isPointInPath_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "isPointInPath", [__arg_0, __arg_1, __arg_2]);
+  fillText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "fillText", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  isPointInPath_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "isPointInPath", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "getContextAttributes", []);
 
-  isPointInStroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", []);
+  getImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "getImageData", [__arg_0, __arg_1]);
 
-  isPointInStroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", [__arg_0]);
+  getImageData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "getImageData", [__arg_0, __arg_1, __arg_2]);
 
-  isPointInStroke_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", [__arg_0, __arg_1]);
+  getImageData_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "getImageData", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  isPointInStroke_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", [__arg_0, __arg_1, __arg_2]);
+  getLineDash_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "getLineDash", []);
 
-  lineCap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineCap");
+  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isContextLost", []);
 
-  lineCap_Setter_(mthis, __arg_0) => mthis["lineCap"] = __arg_0;
+  isPointInPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInPath", []);
 
-  lineDashOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineDashOffset");
+  isPointInPath_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInPath", [__arg_0]);
 
-  lineDashOffset_Setter_(mthis, __arg_0) => mthis["lineDashOffset"] = __arg_0;
+  isPointInPath_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInPath", [__arg_0, __arg_1]);
 
-  lineJoin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineJoin");
+  isPointInPath_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInPath", [__arg_0, __arg_1, __arg_2]);
 
-  lineJoin_Setter_(mthis, __arg_0) => mthis["lineJoin"] = __arg_0;
+  isPointInPath_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInPath", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  lineTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", []);
+  isPointInStroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInStroke", []);
 
-  lineTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", [__arg_0]);
+  isPointInStroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInStroke", [__arg_0]);
 
-  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", [__arg_0, __arg_1]);
+  isPointInStroke_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInStroke", [__arg_0, __arg_1]);
 
-  lineWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineWidth");
+  isPointInStroke_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "isPointInStroke", [__arg_0, __arg_1, __arg_2]);
 
-  lineWidth_Setter_(mthis, __arg_0) => mthis["lineWidth"] = __arg_0;
+  measureText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "measureText", []);
 
-  measureText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "measureText", []);
+  measureText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "measureText", [__arg_0]);
 
-  measureText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "measureText", [__arg_0]);
+  putImageData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "putImageData", [__arg_0]);
 
-  miterLimit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "miterLimit");
+  putImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "putImageData", [__arg_0, __arg_1]);
 
-  miterLimit_Setter_(mthis, __arg_0) => mthis["miterLimit"] = __arg_0;
+  putImageData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "putImageData", [__arg_0, __arg_1, __arg_2]);
 
-  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
+  putImageData_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "putImageData", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
+  putImageData_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
+  putImageData_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  putImageData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0]);
+  putImageData_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  putImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0, __arg_1]);
+  removeHitRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "removeHitRegion", []);
 
-  putImageData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0, __arg_1, __arg_2]);
+  removeHitRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "removeHitRegion", [__arg_0]);
 
-  putImageData_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  resetTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "resetTransform", []);
 
-  putImageData_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  restore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "restore", []);
 
-  putImageData_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  rotate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "rotate", []);
 
-  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1]);
+  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "rotate", [__arg_0]);
 
-  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
+  save_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "save", []);
 
-  quadraticCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "scale", []);
 
-  rect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "rect", [__arg_0, __arg_1]);
+  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "scale", [__arg_0]);
 
-  rect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "rect", [__arg_0, __arg_1, __arg_2]);
+  scale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "scale", [__arg_0, __arg_1]);
 
-  rect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "rect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  scrollPathIntoView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "scrollPathIntoView", []);
 
-  removeHitRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeHitRegion", []);
+  scrollPathIntoView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "scrollPathIntoView", [__arg_0]);
 
-  removeHitRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeHitRegion", [__arg_0]);
+  setLineDash_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "setLineDash", []);
 
-  resetTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resetTransform", []);
+  setLineDash_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "setLineDash", [__arg_0]);
 
-  restore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "restore", []);
+  setTransform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "setTransform", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  rotate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotate", []);
+  setTransform_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "setTransform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotate", [__arg_0]);
+  setTransform_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "setTransform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  save_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "save", []);
+  stroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "stroke", []);
 
-  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale", []);
+  stroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "stroke", [__arg_0]);
 
-  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0]);
+  strokeRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "strokeRect", [__arg_0, __arg_1]);
 
-  scale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0, __arg_1]);
+  strokeRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "strokeRect", [__arg_0, __arg_1, __arg_2]);
 
-  scrollPathIntoView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollPathIntoView", []);
+  strokeRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "strokeRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  scrollPathIntoView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollPathIntoView", [__arg_0]);
+  strokeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "strokeText", [__arg_0]);
 
-  setLineDash_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setLineDash", []);
+  strokeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "strokeText", [__arg_0, __arg_1]);
 
-  setLineDash_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setLineDash", [__arg_0]);
+  strokeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "strokeText", [__arg_0, __arg_1, __arg_2]);
 
-  setTransform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "setTransform", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  strokeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "strokeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  setTransform_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "setTransform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  transform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "transform", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  setTransform_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "setTransform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  transform_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "transform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  shadowBlur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowBlur");
+  transform_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "transform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  shadowBlur_Setter_(mthis, __arg_0) => mthis["shadowBlur"] = __arg_0;
+  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "translate", []);
 
-  shadowColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowColor");
+  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "translate", [__arg_0]);
 
-  shadowColor_Setter_(mthis, __arg_0) => mthis["shadowColor"] = __arg_0;
+  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasRenderingContext2D */, "translate", [__arg_0, __arg_1]);
 
-  shadowOffsetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowOffsetX");
+  arc_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  shadowOffsetX_Setter_(mthis, __arg_0) => mthis["shadowOffsetX"] = __arg_0;
+  arc_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  shadowOffsetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowOffsetY");
+  arc_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  shadowOffsetY_Setter_(mthis, __arg_0) => mthis["shadowOffsetY"] = __arg_0;
+  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2]);
 
-  strokeRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "strokeRect", [__arg_0, __arg_1]);
+  arcTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  strokeRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "strokeRect", [__arg_0, __arg_1, __arg_2]);
+  arcTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  strokeRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "strokeRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  bezierCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  strokeStyle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "strokeStyle");
+  bezierCurveTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  strokeStyle_Setter_(mthis, __arg_0) => mthis["strokeStyle"] = __arg_0;
+  bezierCurveTo_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  strokeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "strokeText", [__arg_0]);
+  closePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "closePath", []);
 
-  strokeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "strokeText", [__arg_0, __arg_1]);
+  ellipse_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  strokeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "strokeText", [__arg_0, __arg_1, __arg_2]);
+  ellipse_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  strokeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "strokeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  ellipse_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  stroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stroke", []);
+  lineTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", []);
 
-  stroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stroke", [__arg_0]);
+  lineTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", [__arg_0]);
 
-  textAlign_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textAlign");
+  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", [__arg_0, __arg_1]);
 
-  textAlign_Setter_(mthis, __arg_0) => mthis["textAlign"] = __arg_0;
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", []);
 
-  textBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textBaseline");
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", [__arg_0]);
 
-  textBaseline_Setter_(mthis, __arg_0) => mthis["textBaseline"] = __arg_0;
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", [__arg_0, __arg_1]);
 
-  transform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "transform", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1]);
 
-  transform_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "transform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
 
-  transform_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "transform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  quadraticCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translate", []);
+  rect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1]);
 
-  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0]);
+  rect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1, __arg_2]);
 
-  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1]);
+  rect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
@@ -2071,1868 +2443,2187 @@
 class BlinkCharacterData extends BlinkNode {
   static final instance = new BlinkCharacterData();
 
-  appendData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendData", []);
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CharacterData */, "data");
 
-  appendData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendData", [__arg_0]);
+  data_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CharacterData */, "data", __arg_0);
 
-  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CharacterData */, "length");
 
-  data_Setter_(mthis, __arg_0) => mthis["data"] = __arg_0;
+  appendData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "appendData", []);
 
-  deleteData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteData", []);
+  appendData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "appendData", [__arg_0]);
 
-  deleteData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteData", [__arg_0]);
+  deleteData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "deleteData", []);
 
-  deleteData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "deleteData", [__arg_0, __arg_1]);
+  deleteData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "deleteData", [__arg_0]);
 
-  insertData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertData", []);
+  deleteData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "deleteData", [__arg_0, __arg_1]);
 
-  insertData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertData", [__arg_0]);
+  insertData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "insertData", []);
 
-  insertData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertData", [__arg_0, __arg_1]);
+  insertData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "insertData", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  insertData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "insertData", [__arg_0, __arg_1]);
 
-  nextElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nextElementSibling");
+  replaceData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "replaceData", [__arg_0]);
 
-  previousElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousElementSibling");
+  replaceData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "replaceData", [__arg_0, __arg_1]);
 
-  replaceData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceData", [__arg_0]);
+  replaceData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "replaceData", [__arg_0, __arg_1, __arg_2]);
 
-  replaceData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceData", [__arg_0, __arg_1]);
+  substringData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "substringData", []);
 
-  replaceData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "replaceData", [__arg_0, __arg_1, __arg_2]);
+  substringData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "substringData", [__arg_0]);
 
-  substringData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "substringData", []);
+  substringData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CharacterData */, "substringData", [__arg_0, __arg_1]);
 
-  substringData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "substringData", [__arg_0]);
+  after_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "after", []);
 
-  substringData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "substringData", [__arg_0, __arg_1]);
+  after_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "after", [__arg_0]);
+
+  before_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "before", []);
+
+  before_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "before", [__arg_0]);
+
+  remove_Callback_0_(mthis) native "Blink_Operation_0_ChildNode_remove";
+
+  replaceWith_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "replaceWith", []);
+
+  replaceWith_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "replaceWith", [__arg_0]);
+
+  nextElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NonDocumentTypeChildNode */, "nextElementSibling");
+
+  previousElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NonDocumentTypeChildNode */, "previousElementSibling");
+
+}
+
+class BlinkChildNode {
+  static final instance = new BlinkChildNode();
+
+  after_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "after", []);
+
+  after_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "after", [__arg_0]);
+
+  before_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "before", []);
+
+  before_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "before", [__arg_0]);
+
+  remove_Callback_0_(mthis) native "Blink_Operation_0_ChildNode_remove";
+
+  replaceWith_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "replaceWith", []);
+
+  replaceWith_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "replaceWith", [__arg_0]);
 
 }
 
 class BlinkCircularGeofencingRegion extends BlinkGeofencingRegion {
   static final instance = new BlinkCircularGeofencingRegion();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CircularGeofencingRegion"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("CircularGeofencingRegion");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CircularGeofencingRegion"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("CircularGeofencingRegion", [__arg_0]);
 
-  latitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "latitude");
+  latitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CircularGeofencingRegion */, "latitude");
 
-  longitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "longitude");
+  longitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CircularGeofencingRegion */, "longitude");
 
-  radius_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radius");
+  radius_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CircularGeofencingRegion */, "radius");
+
+}
+
+class BlinkClient {
+  static final instance = new BlinkClient();
+
+  frameType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Client */, "frameType");
+
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Client */, "id");
+
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Client */, "url");
+
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Client */, "postMessage", []);
+
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Client */, "postMessage", [__arg_0]);
+
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Client */, "postMessage", [__arg_0, __arg_1]);
 
 }
 
 class BlinkClientRect {
   static final instance = new BlinkClientRect();
 
-  bottom_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bottom");
+  bottom_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ClientRect */, "bottom");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ClientRect */, "height");
 
-  left_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "left");
+  left_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ClientRect */, "left");
 
-  right_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "right");
+  right_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ClientRect */, "right");
 
-  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "top");
+  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ClientRect */, "top");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ClientRect */, "width");
 
 }
 
 class BlinkClientRectList {
   static final instance = new BlinkClientRectList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ClientRectList */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ClientRectList */, "__getter__", [__arg_0]);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ClientRectList */, "item", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ClientRectList */, "item", [__arg_0]);
+
+}
+
+class BlinkClients {
+  static final instance = new BlinkClients();
+
+  claim_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Clients */, "claim", []);
+
+  matchAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Clients */, "matchAll", []);
+
+  matchAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Clients */, "matchAll", [__arg_0]);
+
+  openWindow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Clients */, "openWindow", []);
+
+  openWindow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Clients */, "openWindow", [__arg_0]);
+
+}
+
+class BlinkClipboardEvent extends BlinkEvent {
+  static final instance = new BlinkClipboardEvent();
+
+  clipboardData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ClipboardEvent */, "clipboardData");
 
 }
 
 class BlinkCloseEvent extends BlinkEvent {
   static final instance = new BlinkCloseEvent();
 
-  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("CloseEvent");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CloseEvent"), [__arg_0, __arg_1]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("CloseEvent", [__arg_0]);
 
-  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reason");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("CloseEvent", [__arg_0, __arg_1]);
 
-  wasClean_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wasClean");
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CloseEvent */, "code");
+
+  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CloseEvent */, "reason");
+
+  wasClean_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CloseEvent */, "wasClean");
 
 }
 
 class BlinkComment extends BlinkCharacterData {
   static final instance = new BlinkComment();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Comment"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Comment");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Comment"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Comment", [__arg_0]);
 
 }
 
 class BlinkCompositionEvent extends BlinkUIEvent {
   static final instance = new BlinkCompositionEvent();
 
-  activeSegmentEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeSegmentEnd");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("CompositionEvent");
 
-  activeSegmentStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeSegmentStart");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("CompositionEvent", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CompositionEvent"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("CompositionEvent", [__arg_0, __arg_1]);
 
-  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CompositionEvent */, "data");
 
-  getSegments_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSegments", []);
+  initCompositionEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CompositionEvent */, "initCompositionEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initCompositionEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", []);
+  initCompositionEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CompositionEvent */, "initCompositionEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  initCompositionEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", [__arg_0]);
+  initCompositionEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CompositionEvent */, "initCompositionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  initCompositionEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", [__arg_0, __arg_1]);
+}
 
-  initCompositionEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", [__arg_0, __arg_1, __arg_2]);
+class BlinkCompositorProxy {
+  static final instance = new BlinkCompositorProxy();
 
-  initCompositionEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("CompositorProxy");
 
-  initCompositionEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("CompositorProxy", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("CompositorProxy", [__arg_0, __arg_1]);
+
+  opacity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CompositorProxy */, "opacity");
+
+  opacity_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CompositorProxy */, "opacity", __arg_0);
+
+  scrollLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CompositorProxy */, "scrollLeft");
+
+  scrollLeft_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CompositorProxy */, "scrollLeft", __arg_0);
+
+  scrollTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CompositorProxy */, "scrollTop");
+
+  scrollTop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CompositorProxy */, "scrollTop", __arg_0);
+
+  transform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CompositorProxy */, "transform");
+
+  transform_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CompositorProxy */, "transform", __arg_0);
+
+  disconnect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CompositorProxy */, "disconnect", []);
+
+  supports_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CompositorProxy */, "supports", []);
+
+  supports_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CompositorProxy */, "supports", [__arg_0]);
+
+}
+
+class BlinkCompositorWorker extends BlinkEventTarget {
+  static final instance = new BlinkCompositorWorker();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("CompositorWorker");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("CompositorWorker", [__arg_0]);
+
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CompositorWorker */, "onmessage");
+
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CompositorWorker */, "onmessage", __arg_0);
+
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorker */, "postMessage", []);
+
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorker */, "postMessage", [__arg_0]);
+
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorker */, "postMessage", [__arg_0, __arg_1]);
+
+  terminate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorker */, "terminate", []);
+
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AbstractWorker */, "onerror");
+
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AbstractWorker */, "onerror", __arg_0);
+
+}
+
+class BlinkCompositorWorkerGlobalScope extends BlinkWorkerGlobalScope {
+  static final instance = new BlinkCompositorWorkerGlobalScope();
+
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CompositorWorkerGlobalScope */, "onmessage");
+
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* CompositorWorkerGlobalScope */, "onmessage", __arg_0);
+
+  cancelAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorkerGlobalScope */, "cancelAnimationFrame", []);
+
+  cancelAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorkerGlobalScope */, "cancelAnimationFrame", [__arg_0]);
+
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorkerGlobalScope */, "postMessage", []);
+
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorkerGlobalScope */, "postMessage", [__arg_0]);
+
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorkerGlobalScope */, "postMessage", [__arg_0, __arg_1]);
+
+  requestAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorkerGlobalScope */, "requestAnimationFrame", []);
+
+  requestAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CompositorWorkerGlobalScope */, "requestAnimationFrame", [__arg_0]);
 
 }
 
 class BlinkConsole extends BlinkConsoleBase {
   static final instance = new BlinkConsole();
 
-  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "memory");
+  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Console */, "memory");
+
+  memory_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Console */, "memory", __arg_0);
 
 }
 
 class BlinkConsoleBase {
   static final instance = new BlinkConsoleBase();
 
-  assert_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "assert", []);
+  assert_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "assert", []);
 
-  assert_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "assert", [__arg_0]);
+  assert_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "assert", [__arg_0]);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  assert_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "assert", [__arg_0, __arg_1]);
 
-  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clear", [__arg_0]);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "clear", []);
 
-  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "count", []);
+  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "clear", [__arg_0]);
 
-  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "count", [__arg_0]);
+  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "count", []);
 
-  debug_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "debug", []);
+  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "count", [__arg_0]);
 
-  debug_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "debug", [__arg_0]);
+  debug_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "debug", []);
 
-  dir_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "dir", []);
+  debug_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "debug", [__arg_0]);
 
-  dir_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "dir", [__arg_0]);
+  dir_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "dir", []);
 
-  dirxml_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "dirxml", []);
+  dir_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "dir", [__arg_0]);
 
-  dirxml_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "dirxml", [__arg_0]);
+  dirxml_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "dirxml", []);
 
-  error_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "error", []);
+  dirxml_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "dirxml", [__arg_0]);
 
-  error_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "error", [__arg_0]);
+  error_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "error", []);
 
-  groupCollapsed_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "groupCollapsed", []);
+  error_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "error", [__arg_0]);
 
-  groupCollapsed_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "groupCollapsed", [__arg_0]);
+  group_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "group", []);
 
-  groupEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "groupEnd", []);
+  group_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "group", [__arg_0]);
 
-  group_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "group", []);
+  groupCollapsed_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "groupCollapsed", []);
 
-  group_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "group", [__arg_0]);
+  groupCollapsed_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "groupCollapsed", [__arg_0]);
 
-  info_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "info", []);
+  groupEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "groupEnd", []);
 
-  info_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "info", [__arg_0]);
+  info_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "info", []);
 
-  log_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "log", []);
+  info_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "info", [__arg_0]);
 
-  log_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "log", [__arg_0]);
+  log_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "log", []);
 
-  markTimeline_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "markTimeline", []);
+  log_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "log", [__arg_0]);
 
-  markTimeline_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "markTimeline", [__arg_0]);
+  markTimeline_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "markTimeline", []);
 
-  profileEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "profileEnd", []);
+  markTimeline_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "markTimeline", [__arg_0]);
 
-  profileEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "profileEnd", [__arg_0]);
+  profile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "profile", []);
 
-  profile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "profile", []);
+  profile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "profile", [__arg_0]);
 
-  profile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "profile", [__arg_0]);
+  profileEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "profileEnd", []);
 
-  table_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "table", []);
+  profileEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "profileEnd", [__arg_0]);
 
-  table_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "table", [__arg_0]);
+  table_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "table", []);
 
-  timeEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "timeEnd", []);
+  table_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "table", [__arg_0]);
 
-  timeEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "timeEnd", [__arg_0]);
+  time_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "time", []);
 
-  timeStamp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "timeStamp", []);
+  time_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "time", [__arg_0]);
 
-  timeStamp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "timeStamp", [__arg_0]);
+  timeEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "timeEnd", []);
 
-  time_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "time", []);
+  timeEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "timeEnd", [__arg_0]);
 
-  time_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "time", [__arg_0]);
+  timeStamp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "timeStamp", []);
 
-  timelineEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "timelineEnd", []);
+  timeStamp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "timeStamp", [__arg_0]);
 
-  timelineEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "timelineEnd", [__arg_0]);
+  timeline_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "timeline", []);
 
-  timeline_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "timeline", []);
+  timeline_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "timeline", [__arg_0]);
 
-  timeline_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "timeline", [__arg_0]);
+  timelineEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "timelineEnd", []);
 
-  trace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "trace", []);
+  timelineEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "timelineEnd", [__arg_0]);
 
-  trace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "trace", [__arg_0]);
+  trace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "trace", []);
 
-  warn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "warn", []);
+  trace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "trace", [__arg_0]);
 
-  warn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "warn", [__arg_0]);
+  warn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "warn", []);
+
+  warn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ConsoleBase */, "warn", [__arg_0]);
 
 }
 
 class BlinkConvolverNode extends BlinkAudioNode {
   static final instance = new BlinkConvolverNode();
 
-  buffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffer");
+  buffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ConvolverNode */, "buffer");
 
-  buffer_Setter_(mthis, __arg_0) => mthis["buffer"] = __arg_0;
+  buffer_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ConvolverNode */, "buffer", __arg_0);
 
-  normalize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "normalize");
+  normalize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ConvolverNode */, "normalize");
 
-  normalize_Setter_(mthis, __arg_0) => mthis["normalize"] = __arg_0;
+  normalize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ConvolverNode */, "normalize", __arg_0);
 
 }
 
 class BlinkCoordinates {
   static final instance = new BlinkCoordinates();
 
-  accuracy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "accuracy");
+  accuracy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Coordinates */, "accuracy");
 
-  altitudeAccuracy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altitudeAccuracy");
+  altitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Coordinates */, "altitude");
 
-  altitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altitude");
+  altitudeAccuracy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Coordinates */, "altitudeAccuracy");
 
-  heading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "heading");
+  heading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Coordinates */, "heading");
 
-  latitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "latitude");
+  latitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Coordinates */, "latitude");
 
-  longitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "longitude");
+  longitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Coordinates */, "longitude");
 
-  speed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "speed");
-
-}
-
-class BlinkCounter {
-  static final instance = new BlinkCounter();
-
-  identifier_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "identifier");
-
-  listStyle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "listStyle");
-
-  separator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "separator");
+  speed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Coordinates */, "speed");
 
 }
 
 class BlinkCredential {
   static final instance = new BlinkCredential();
 
-  avatarURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "avatarURL");
+  iconURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Credential */, "iconURL");
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Credential */, "id");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Credential */, "name");
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Credential */, "type");
 
 }
 
 class BlinkCredentialsContainer {
   static final instance = new BlinkCredentialsContainer();
 
-  notifyFailedSignIn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "notifyFailedSignIn", []);
+  notifySignedIn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CredentialsContainer */, "notifySignedIn", []);
 
-  notifyFailedSignIn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "notifyFailedSignIn", [__arg_0]);
+  notifySignedIn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CredentialsContainer */, "notifySignedIn", [__arg_0]);
 
-  notifySignedIn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "notifySignedIn", []);
+  request_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CredentialsContainer */, "request", []);
 
-  notifySignedIn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "notifySignedIn", [__arg_0]);
+  request_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CredentialsContainer */, "request", [__arg_0]);
 
-  notifySignedOut_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "notifySignedOut", []);
+  requireUserMediation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CredentialsContainer */, "requireUserMediation", []);
 
-  request_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "request", []);
+}
 
-  request_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "request", [__arg_0]);
+class BlinkCrossOriginConnectEvent extends BlinkEvent {
+  static final instance = new BlinkCrossOriginConnectEvent();
+
+  client_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CrossOriginConnectEvent */, "client");
+
+  acceptConnection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CrossOriginConnectEvent */, "acceptConnection", []);
+
+  acceptConnection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CrossOriginConnectEvent */, "acceptConnection", [__arg_0]);
+
+}
+
+class BlinkCrossOriginServiceWorkerClient extends BlinkEventTarget {
+  static final instance = new BlinkCrossOriginServiceWorkerClient();
+
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CrossOriginServiceWorkerClient */, "origin");
+
+  targetUrl_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CrossOriginServiceWorkerClient */, "targetUrl");
+
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CrossOriginServiceWorkerClient */, "postMessage", []);
+
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CrossOriginServiceWorkerClient */, "postMessage", [__arg_0]);
+
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CrossOriginServiceWorkerClient */, "postMessage", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCrypto {
   static final instance = new BlinkCrypto();
 
-  getRandomValues_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRandomValues", []);
+  subtle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Crypto */, "subtle");
 
-  getRandomValues_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRandomValues", [__arg_0]);
+  getRandomValues_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Crypto */, "getRandomValues", []);
 
-  subtle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "subtle");
+  getRandomValues_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Crypto */, "getRandomValues", [__arg_0]);
 
 }
 
 class BlinkCryptoKey {
   static final instance = new BlinkCryptoKey();
 
-  algorithm_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "algorithm");
+  algorithm_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CryptoKey */, "algorithm");
 
-  extractable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "extractable");
+  extractable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CryptoKey */, "extractable");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CryptoKey */, "type");
 
-  usages_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "usages");
+  usages_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CryptoKey */, "usages");
 
 }
 
 class BlinkCustomEvent extends BlinkEvent {
   static final instance = new BlinkCustomEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CustomEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("CustomEvent");
 
-  detail_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "detail");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("CustomEvent", [__arg_0]);
 
-  initCustomEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", []);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("CustomEvent", [__arg_0, __arg_1]);
 
-  initCustomEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", [__arg_0]);
+  detail_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* CustomEvent */, "detail");
 
-  initCustomEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", [__arg_0, __arg_1]);
+  initCustomEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CustomEvent */, "initCustomEvent", [__arg_0, __arg_1]);
 
-  initCustomEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", [__arg_0, __arg_1, __arg_2]);
+  initCustomEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CustomEvent */, "initCustomEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initCustomEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  initCustomEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CustomEvent */, "initCustomEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkDOMError {
   static final instance = new BlinkDOMError();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMError"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("DOMError");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMError"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("DOMError", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMError"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("DOMError", [__arg_0, __arg_1]);
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMError */, "message");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMError */, "name");
 
 }
 
 class BlinkDOMException {
   static final instance = new BlinkDOMException();
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMException */, "code");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMException */, "message");
 
-  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMException */, "name");
+
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMException */, "toString", []);
 
 }
 
 class BlinkDOMFileSystem {
   static final instance = new BlinkDOMFileSystem();
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMFileSystem */, "name");
 
-  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "root");
+  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMFileSystem */, "root");
 
 }
 
 class BlinkDOMFileSystemSync {
   static final instance = new BlinkDOMFileSystemSync();
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMFileSystemSync */, "name");
 
-  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "root");
+  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMFileSystemSync */, "root");
 
 }
 
 class BlinkDOMImplementation {
   static final instance = new BlinkDOMImplementation();
 
-  createDocumentType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDocumentType", [__arg_0]);
+  createDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "createDocument", [__arg_0]);
 
-  createDocumentType_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createDocumentType", [__arg_0, __arg_1]);
+  createDocument_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "createDocument", [__arg_0, __arg_1]);
 
-  createDocumentType_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createDocumentType", [__arg_0, __arg_1, __arg_2]);
+  createDocument_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "createDocument", [__arg_0, __arg_1, __arg_2]);
 
-  createDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDocument", []);
+  createDocumentType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "createDocumentType", [__arg_0]);
 
-  createDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDocument", [__arg_0]);
+  createDocumentType_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "createDocumentType", [__arg_0, __arg_1]);
 
-  createDocument_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createDocument", [__arg_0, __arg_1]);
+  createDocumentType_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "createDocumentType", [__arg_0, __arg_1, __arg_2]);
 
-  createDocument_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createDocument", [__arg_0, __arg_1, __arg_2]);
+  createHTMLDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "createHTMLDocument", []);
 
-  createHTMLDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createHTMLDocument", []);
+  createHTMLDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "createHTMLDocument", [__arg_0]);
 
-  createHTMLDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createHTMLDocument", [__arg_0]);
-
-  hasFeature_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasFeature", []);
-
-  hasFeature_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasFeature", [__arg_0]);
-
-  hasFeature_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "hasFeature", [__arg_0, __arg_1]);
+  hasFeature_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMImplementation */, "hasFeature", []);
 
 }
 
 class BlinkDOMMatrix extends BlinkDOMMatrixReadOnly {
   static final instance = new BlinkDOMMatrix();
 
-  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "a");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("DOMMatrix");
 
-  a_Setter_(mthis, __arg_0) => mthis["a"] = __arg_0;
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("DOMMatrix", [__arg_0]);
 
-  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "b");
+  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "a");
 
-  b_Setter_(mthis, __arg_0) => mthis["b"] = __arg_0;
+  a_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "a", __arg_0);
 
-  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "c");
+  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "b");
 
-  c_Setter_(mthis, __arg_0) => mthis["c"] = __arg_0;
+  b_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "b", __arg_0);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMMatrix"), []);
+  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "c");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMMatrix"), [__arg_0]);
+  c_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "c", __arg_0);
 
-  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "d");
+  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "d");
 
-  d_Setter_(mthis, __arg_0) => mthis["d"] = __arg_0;
+  d_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "d", __arg_0);
 
-  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "e");
+  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "e");
 
-  e_Setter_(mthis, __arg_0) => mthis["e"] = __arg_0;
+  e_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "e", __arg_0);
 
-  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "f");
+  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "f");
 
-  f_Setter_(mthis, __arg_0) => mthis["f"] = __arg_0;
+  f_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "f", __arg_0);
 
-  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m11");
+  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m11");
 
-  m11_Setter_(mthis, __arg_0) => mthis["m11"] = __arg_0;
+  m11_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m11", __arg_0);
 
-  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m12");
+  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m12");
 
-  m12_Setter_(mthis, __arg_0) => mthis["m12"] = __arg_0;
+  m12_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m12", __arg_0);
 
-  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m13");
+  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m13");
 
-  m13_Setter_(mthis, __arg_0) => mthis["m13"] = __arg_0;
+  m13_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m13", __arg_0);
 
-  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m14");
+  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m14");
 
-  m14_Setter_(mthis, __arg_0) => mthis["m14"] = __arg_0;
+  m14_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m14", __arg_0);
 
-  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m21");
+  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m21");
 
-  m21_Setter_(mthis, __arg_0) => mthis["m21"] = __arg_0;
+  m21_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m21", __arg_0);
 
-  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m22");
+  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m22");
 
-  m22_Setter_(mthis, __arg_0) => mthis["m22"] = __arg_0;
+  m22_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m22", __arg_0);
 
-  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m23");
+  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m23");
 
-  m23_Setter_(mthis, __arg_0) => mthis["m23"] = __arg_0;
+  m23_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m23", __arg_0);
 
-  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m24");
+  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m24");
 
-  m24_Setter_(mthis, __arg_0) => mthis["m24"] = __arg_0;
+  m24_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m24", __arg_0);
 
-  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m31");
+  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m31");
 
-  m31_Setter_(mthis, __arg_0) => mthis["m31"] = __arg_0;
+  m31_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m31", __arg_0);
 
-  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m32");
+  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m32");
 
-  m32_Setter_(mthis, __arg_0) => mthis["m32"] = __arg_0;
+  m32_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m32", __arg_0);
 
-  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m33");
+  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m33");
 
-  m33_Setter_(mthis, __arg_0) => mthis["m33"] = __arg_0;
+  m33_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m33", __arg_0);
 
-  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m34");
+  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m34");
 
-  m34_Setter_(mthis, __arg_0) => mthis["m34"] = __arg_0;
+  m34_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m34", __arg_0);
 
-  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m41");
+  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m41");
 
-  m41_Setter_(mthis, __arg_0) => mthis["m41"] = __arg_0;
+  m41_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m41", __arg_0);
 
-  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m42");
+  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m42");
 
-  m42_Setter_(mthis, __arg_0) => mthis["m42"] = __arg_0;
+  m42_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m42", __arg_0);
 
-  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m43");
+  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m43");
 
-  m43_Setter_(mthis, __arg_0) => mthis["m43"] = __arg_0;
+  m43_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m43", __arg_0);
 
-  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m44");
+  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrix */, "m44");
 
-  m44_Setter_(mthis, __arg_0) => mthis["m44"] = __arg_0;
+  m44_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMMatrix */, "m44", __arg_0);
 
-  multiplySelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "multiplySelf", []);
+  multiplySelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "multiplySelf", []);
 
-  multiplySelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "multiplySelf", [__arg_0]);
+  multiplySelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "multiplySelf", [__arg_0]);
 
-  preMultiplySelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "preMultiplySelf", []);
+  preMultiplySelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "preMultiplySelf", []);
 
-  preMultiplySelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "preMultiplySelf", [__arg_0]);
+  preMultiplySelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "preMultiplySelf", [__arg_0]);
 
-  scale3dSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", []);
+  scale3dSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scale3dSelf", []);
 
-  scale3dSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", [__arg_0]);
+  scale3dSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scale3dSelf", [__arg_0]);
 
-  scale3dSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", [__arg_0, __arg_1]);
+  scale3dSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scale3dSelf", [__arg_0, __arg_1]);
 
-  scale3dSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", [__arg_0, __arg_1, __arg_2]);
+  scale3dSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scale3dSelf", [__arg_0, __arg_1, __arg_2]);
 
-  scale3dSelf_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  scale3dSelf_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scale3dSelf", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  scaleNonUniformSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", []);
+  scaleNonUniformSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleNonUniformSelf", []);
 
-  scaleNonUniformSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0]);
+  scaleNonUniformSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleNonUniformSelf", [__arg_0]);
 
-  scaleNonUniformSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0, __arg_1]);
+  scaleNonUniformSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleNonUniformSelf", [__arg_0, __arg_1]);
 
-  scaleNonUniformSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2]);
+  scaleNonUniformSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2]);
 
-  scaleNonUniformSelf_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  scaleNonUniformSelf_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  scaleNonUniformSelf_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  scaleNonUniformSelf_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  scaleNonUniformSelf_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  scaleNonUniformSelf_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  scaleSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scaleSelf", []);
+  scaleSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleSelf", []);
 
-  scaleSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scaleSelf", [__arg_0]);
+  scaleSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleSelf", [__arg_0]);
 
-  scaleSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scaleSelf", [__arg_0, __arg_1]);
+  scaleSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleSelf", [__arg_0, __arg_1]);
 
-  scaleSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scaleSelf", [__arg_0, __arg_1, __arg_2]);
+  scaleSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "scaleSelf", [__arg_0, __arg_1, __arg_2]);
 
-  translateSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translateSelf", []);
+  translateSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "translateSelf", []);
 
-  translateSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translateSelf", [__arg_0]);
+  translateSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "translateSelf", [__arg_0]);
 
-  translateSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translateSelf", [__arg_0, __arg_1]);
+  translateSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "translateSelf", [__arg_0, __arg_1]);
 
-  translateSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "translateSelf", [__arg_0, __arg_1, __arg_2]);
+  translateSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrix */, "translateSelf", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkDOMMatrixReadOnly {
   static final instance = new BlinkDOMMatrixReadOnly();
 
-  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "a");
+  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "a");
 
-  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "b");
+  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "b");
 
-  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "c");
+  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "c");
 
-  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "d");
+  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "d");
 
-  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "e");
+  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "e");
 
-  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "f");
+  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "f");
 
-  is2D_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "is2D");
+  is2D_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "is2D");
 
-  isIdentity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isIdentity");
+  isIdentity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "isIdentity");
 
-  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m11");
+  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m11");
 
-  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m12");
+  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m12");
 
-  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m13");
+  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m13");
 
-  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m14");
+  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m14");
 
-  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m21");
+  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m21");
 
-  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m22");
+  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m22");
 
-  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m23");
+  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m23");
 
-  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m24");
+  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m24");
 
-  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m31");
+  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m31");
 
-  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m32");
+  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m32");
 
-  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m33");
+  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m33");
 
-  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m34");
+  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m34");
 
-  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m41");
+  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m41");
 
-  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m42");
+  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m42");
 
-  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m43");
+  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m43");
 
-  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m44");
+  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMMatrixReadOnly */, "m44");
 
-  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "multiply", []);
+  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "multiply", []);
 
-  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "multiply", [__arg_0]);
+  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "multiply", [__arg_0]);
 
-  scale3d_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", []);
+  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale", []);
 
-  scale3d_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", [__arg_0]);
+  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale", [__arg_0]);
 
-  scale3d_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", [__arg_0, __arg_1]);
+  scale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale", [__arg_0, __arg_1]);
 
-  scale3d_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", [__arg_0, __arg_1, __arg_2]);
+  scale_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale", [__arg_0, __arg_1, __arg_2]);
 
-  scale3d_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  scale3d_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale3d", []);
 
-  scaleNonUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", []);
+  scale3d_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale3d", [__arg_0]);
 
-  scaleNonUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0]);
+  scale3d_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale3d", [__arg_0, __arg_1]);
 
-  scaleNonUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0, __arg_1]);
+  scale3d_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale3d", [__arg_0, __arg_1, __arg_2]);
 
-  scaleNonUniform_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0, __arg_1, __arg_2]);
+  scale3d_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scale3d", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  scaleNonUniform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  scaleNonUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scaleNonUniform", []);
 
-  scaleNonUniform_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  scaleNonUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scaleNonUniform", [__arg_0]);
 
-  scaleNonUniform_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  scaleNonUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scaleNonUniform", [__arg_0, __arg_1]);
 
-  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale", []);
+  scaleNonUniform_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scaleNonUniform", [__arg_0, __arg_1, __arg_2]);
 
-  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0]);
+  scaleNonUniform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scaleNonUniform", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  scale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0, __arg_1]);
+  scaleNonUniform_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scaleNonUniform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  scale_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0, __arg_1, __arg_2]);
+  scaleNonUniform_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "scaleNonUniform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  toFloat32Array_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toFloat32Array", []);
+  toFloat32Array_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "toFloat32Array", []);
 
-  toFloat64Array_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toFloat64Array", []);
+  toFloat64Array_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "toFloat64Array", []);
 
-  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translate", []);
+  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "translate", []);
 
-  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0]);
+  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "translate", [__arg_0]);
 
-  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1]);
+  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "translate", [__arg_0, __arg_1]);
 
-  translate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1, __arg_2]);
+  translate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DOMMatrixReadOnly */, "translate", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkDOMParser {
   static final instance = new BlinkDOMParser();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMParser"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("DOMParser");
 
-  parseFromString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "parseFromString", []);
+  parseFromString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMParser */, "parseFromString", []);
 
-  parseFromString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "parseFromString", [__arg_0]);
+  parseFromString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMParser */, "parseFromString", [__arg_0]);
 
-  parseFromString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "parseFromString", [__arg_0, __arg_1]);
+  parseFromString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMParser */, "parseFromString", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDOMPoint extends BlinkDOMPointReadOnly {
   static final instance = new BlinkDOMPoint();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPoint"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("DOMPoint");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPoint"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("DOMPoint", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPoint"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("DOMPoint", [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPoint"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("DOMPoint", [__arg_0, __arg_1, __arg_2]);
 
-  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPoint"), [__arg_0, __arg_1, __arg_2, __arg_3]);
+  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callConstructor("DOMPoint", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  w_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "w");
+  w_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMPoint */, "w");
 
-  w_Setter_(mthis, __arg_0) => mthis["w"] = __arg_0;
+  w_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMPoint */, "w", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMPoint */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMPoint */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMPoint */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMPoint */, "y", __arg_0);
 
-  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMPoint */, "z");
 
-  z_Setter_(mthis, __arg_0) => mthis["z"] = __arg_0;
+  z_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMPoint */, "z", __arg_0);
 
 }
 
 class BlinkDOMPointReadOnly {
   static final instance = new BlinkDOMPointReadOnly();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPointReadOnly"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("DOMPointReadOnly", [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPointReadOnly"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("DOMPointReadOnly", [__arg_0, __arg_1, __arg_2]);
 
-  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPointReadOnly"), [__arg_0, __arg_1, __arg_2, __arg_3]);
+  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callConstructor("DOMPointReadOnly", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  w_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "w");
+  w_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMPointReadOnly */, "w");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMPointReadOnly */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMPointReadOnly */, "y");
 
-  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMPointReadOnly */, "z");
 
 }
 
 class BlinkDOMRect extends BlinkDOMRectReadOnly {
   static final instance = new BlinkDOMRect();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRect"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("DOMRect");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRect"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("DOMRect", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRect"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("DOMRect", [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRect"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("DOMRect", [__arg_0, __arg_1, __arg_2]);
 
-  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRect"), [__arg_0, __arg_1, __arg_2, __arg_3]);
+  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callConstructor("DOMRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRect */, "height");
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMRect */, "height", __arg_0);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRect */, "width");
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMRect */, "width", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRect */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMRect */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRect */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMRect */, "y", __arg_0);
 
 }
 
 class BlinkDOMRectReadOnly {
   static final instance = new BlinkDOMRectReadOnly();
 
-  bottom_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bottom");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("DOMRectReadOnly", [__arg_0, __arg_1]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRectReadOnly"), [__arg_0, __arg_1]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("DOMRectReadOnly", [__arg_0, __arg_1, __arg_2]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRectReadOnly"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callConstructor("DOMRectReadOnly", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRectReadOnly"), [__arg_0, __arg_1, __arg_2, __arg_3]);
+  bottom_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRectReadOnly */, "bottom");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRectReadOnly */, "height");
 
-  left_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "left");
+  left_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRectReadOnly */, "left");
 
-  right_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "right");
+  right_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRectReadOnly */, "right");
 
-  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "top");
+  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRectReadOnly */, "top");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRectReadOnly */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRectReadOnly */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMRectReadOnly */, "y");
 
 }
 
 class BlinkDOMSettableTokenList extends BlinkDOMTokenList {
   static final instance = new BlinkDOMSettableTokenList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMSettableTokenList */, "value");
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DOMSettableTokenList */, "value", __arg_0);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMSettableTokenList */, "item", []);
+
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMSettableTokenList */, "item", [__arg_0]);
 
 }
 
 class BlinkDOMStringList {
   static final instance = new BlinkDOMStringList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMStringList */, "length");
 
-  contains_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "contains", []);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringList */, "__getter__", [__arg_0]);
 
-  contains_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "contains", [__arg_0]);
+  contains_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringList */, "contains", []);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  contains_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringList */, "contains", [__arg_0]);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringList */, "item", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringList */, "item", [__arg_0]);
 
 }
 
 class BlinkDOMStringMap {
   static final instance = new BlinkDOMStringMap();
 
-  $__delete___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__delete__", [__arg_0]);
+  $__delete___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringMap */, "__delete__", [__arg_0]);
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringMap */, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringMap */, "__setter__", [__arg_0, __arg_1]);
+
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringMap */, "item", []);
+
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMStringMap */, "item", [__arg_0]);
 
 }
 
 class BlinkDOMTokenList {
   static final instance = new BlinkDOMTokenList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DOMTokenList */, "length");
 
-  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "add", []);
 
-  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "add", [__arg_0]);
 
-  contains_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "contains", []);
+  contains_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "contains", []);
 
-  contains_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "contains", [__arg_0]);
+  contains_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "contains", [__arg_0]);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "item", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "remove", []);
 
-  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "remove", [__arg_0]);
 
-  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0]);
+  toggle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "toggle", []);
 
-  toggle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toggle", []);
+  toggle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "toggle", [__arg_0]);
 
-  toggle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "toggle", [__arg_0]);
-
-  toggle_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "toggle", [__arg_0, __arg_1]);
+  toggle_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DOMTokenList */, "toggle", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDataTransfer {
   static final instance = new BlinkDataTransfer();
 
-  clearData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearData", []);
+  dropEffect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DataTransfer */, "dropEffect");
 
-  clearData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearData", [__arg_0]);
+  dropEffect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DataTransfer */, "dropEffect", __arg_0);
 
-  dropEffect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dropEffect");
+  effectAllowed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DataTransfer */, "effectAllowed");
 
-  dropEffect_Setter_(mthis, __arg_0) => mthis["dropEffect"] = __arg_0;
+  effectAllowed_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DataTransfer */, "effectAllowed", __arg_0);
 
-  effectAllowed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "effectAllowed");
+  files_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DataTransfer */, "files");
 
-  effectAllowed_Setter_(mthis, __arg_0) => mthis["effectAllowed"] = __arg_0;
+  items_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DataTransfer */, "items");
 
-  files_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "files");
+  types_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DataTransfer */, "types");
 
-  getData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getData", []);
+  clearData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "clearData", []);
 
-  getData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getData", [__arg_0]);
+  clearData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "clearData", [__arg_0]);
 
-  items_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "items");
+  getData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "getData", []);
 
-  setData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setData", []);
+  getData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "getData", [__arg_0]);
 
-  setData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setData", [__arg_0]);
+  setData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "setData", []);
 
-  setData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setData", [__arg_0, __arg_1]);
+  setData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "setData", [__arg_0]);
 
-  setDragImage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setDragImage", [__arg_0]);
+  setData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "setData", [__arg_0, __arg_1]);
 
-  setDragImage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setDragImage", [__arg_0, __arg_1]);
+  setDragImage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "setDragImage", [__arg_0]);
 
-  setDragImage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setDragImage", [__arg_0, __arg_1, __arg_2]);
+  setDragImage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "setDragImage", [__arg_0, __arg_1]);
 
-  types_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "types");
+  setDragImage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DataTransfer */, "setDragImage", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkDataTransferItem {
   static final instance = new BlinkDataTransferItem();
 
-  getAsFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAsFile", []);
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DataTransferItem */, "kind");
 
-  getAsString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAsString", []);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DataTransferItem */, "type");
 
-  getAsString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAsString", [__arg_0]);
+  getAsFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItem */, "getAsFile", []);
 
-  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
+  getAsString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItem */, "getAsString", []);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  getAsString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItem */, "getAsString", [__arg_0]);
 
-  webkitGetAsEntry_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetAsEntry", []);
+  webkitGetAsEntry_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItem */, "webkitGetAsEntry", []);
 
 }
 
 class BlinkDataTransferItemList {
   static final instance = new BlinkDataTransferItemList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DataTransferItemList */, "length");
 
-  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItemList */, "add", []);
 
-  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItemList */, "add", [__arg_0]);
 
-  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0, __arg_1]);
+  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItemList */, "add", [__arg_0, __arg_1]);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItemList */, "clear", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItemList */, "item", []);
 
-  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItemList */, "item", [__arg_0]);
 
-  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0]);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItemList */, "remove", []);
+
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DataTransferItemList */, "remove", [__arg_0]);
+
+}
+
+class BlinkDataView extends BlinkArrayBufferView {
+  static final instance = new BlinkDataView();
 
 }
 
 class BlinkDatabase {
   static final instance = new BlinkDatabase();
 
-  changeVersion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", []);
+  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Database */, "version");
 
-  changeVersion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", [__arg_0]);
+  changeVersion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "changeVersion", []);
 
-  changeVersion_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", [__arg_0, __arg_1]);
+  changeVersion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "changeVersion", [__arg_0]);
 
-  changeVersion_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", [__arg_0, __arg_1, __arg_2]);
+  changeVersion_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "changeVersion", [__arg_0, __arg_1]);
 
-  changeVersion_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  changeVersion_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "changeVersion", [__arg_0, __arg_1, __arg_2]);
 
-  changeVersion_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  changeVersion_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "changeVersion", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  readTransaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readTransaction", []);
+  changeVersion_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "changeVersion", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  readTransaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readTransaction", [__arg_0]);
+  readTransaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "readTransaction", []);
 
-  readTransaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "readTransaction", [__arg_0, __arg_1]);
+  readTransaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "readTransaction", [__arg_0]);
 
-  readTransaction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "readTransaction", [__arg_0, __arg_1, __arg_2]);
+  readTransaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "readTransaction", [__arg_0, __arg_1]);
 
-  transaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transaction", []);
+  readTransaction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "readTransaction", [__arg_0, __arg_1, __arg_2]);
 
-  transaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0]);
+  transaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "transaction", []);
 
-  transaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0, __arg_1]);
+  transaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "transaction", [__arg_0]);
 
-  transaction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0, __arg_1, __arg_2]);
+  transaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "transaction", [__arg_0, __arg_1]);
 
-  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "version");
+  transaction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Database */, "transaction", [__arg_0, __arg_1, __arg_2]);
+
+}
+
+class BlinkDatabaseCallback {
+  static final instance = new BlinkDatabaseCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DatabaseCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DatabaseCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkDedicatedWorkerGlobalScope extends BlinkWorkerGlobalScope {
   static final instance = new BlinkDedicatedWorkerGlobalScope();
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DedicatedWorkerGlobalScope */, "onmessage");
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* DedicatedWorkerGlobalScope */, "onmessage", __arg_0);
 
-  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DedicatedWorkerGlobalScope */, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DedicatedWorkerGlobalScope */, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DedicatedWorkerGlobalScope */, "postMessage", [__arg_0, __arg_1]);
+
+}
+
+class BlinkDefaultSessionStartEvent extends BlinkEvent {
+  static final instance = new BlinkDefaultSessionStartEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("DefaultSessionStartEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("DefaultSessionStartEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("DefaultSessionStartEvent", [__arg_0, __arg_1]);
+
+  session_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DefaultSessionStartEvent */, "session");
 
 }
 
 class BlinkDelayNode extends BlinkAudioNode {
   static final instance = new BlinkDelayNode();
 
-  delayTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "delayTime");
+  delayTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DelayNode */, "delayTime");
 
 }
 
 class BlinkDeprecatedStorageInfo {
   static final instance = new BlinkDeprecatedStorageInfo();
 
-  queryUsageAndQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", []);
+  queryUsageAndQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "queryUsageAndQuota", []);
 
-  queryUsageAndQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0]);
+  queryUsageAndQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "queryUsageAndQuota", [__arg_0]);
 
-  queryUsageAndQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0, __arg_1]);
+  queryUsageAndQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "queryUsageAndQuota", [__arg_0, __arg_1]);
 
-  queryUsageAndQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0, __arg_1, __arg_2]);
+  queryUsageAndQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "queryUsageAndQuota", [__arg_0, __arg_1, __arg_2]);
 
-  requestQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", []);
+  requestQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "requestQuota", []);
 
-  requestQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0]);
+  requestQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "requestQuota", [__arg_0]);
 
-  requestQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1]);
+  requestQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "requestQuota", [__arg_0, __arg_1]);
 
-  requestQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1, __arg_2]);
+  requestQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "requestQuota", [__arg_0, __arg_1, __arg_2]);
 
-  requestQuota_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  requestQuota_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageInfo */, "requestQuota", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkDeprecatedStorageQuota {
   static final instance = new BlinkDeprecatedStorageQuota();
 
-  queryUsageAndQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", []);
+  queryUsageAndQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageQuota */, "queryUsageAndQuota", []);
 
-  queryUsageAndQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0]);
+  queryUsageAndQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageQuota */, "queryUsageAndQuota", [__arg_0]);
 
-  queryUsageAndQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0, __arg_1]);
+  queryUsageAndQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageQuota */, "queryUsageAndQuota", [__arg_0, __arg_1]);
 
-  requestQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", []);
+  requestQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageQuota */, "requestQuota", []);
 
-  requestQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0]);
+  requestQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageQuota */, "requestQuota", [__arg_0]);
 
-  requestQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1]);
+  requestQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageQuota */, "requestQuota", [__arg_0, __arg_1]);
 
-  requestQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1, __arg_2]);
+  requestQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DeprecatedStorageQuota */, "requestQuota", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkDeviceAcceleration {
   static final instance = new BlinkDeviceAcceleration();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceAcceleration */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceAcceleration */, "y");
 
-  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceAcceleration */, "z");
 
 }
 
 class BlinkDeviceLightEvent extends BlinkEvent {
   static final instance = new BlinkDeviceLightEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DeviceLightEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("DeviceLightEvent");
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("DeviceLightEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("DeviceLightEvent", [__arg_0, __arg_1]);
+
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceLightEvent */, "value");
 
 }
 
 class BlinkDeviceMotionEvent extends BlinkEvent {
   static final instance = new BlinkDeviceMotionEvent();
 
-  accelerationIncludingGravity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "accelerationIncludingGravity");
+  acceleration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceMotionEvent */, "acceleration");
 
-  acceleration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "acceleration");
+  accelerationIncludingGravity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceMotionEvent */, "accelerationIncludingGravity");
 
-  initDeviceMotionEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", []);
+  interval_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceMotionEvent */, "interval");
 
-  initDeviceMotionEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0]);
+  rotationRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceMotionEvent */, "rotationRate");
 
-  initDeviceMotionEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0, __arg_1]);
+  initDeviceMotionEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* DeviceMotionEvent */, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  initDeviceMotionEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2]);
+  initDeviceMotionEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* DeviceMotionEvent */, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  initDeviceMotionEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
-
-  initDeviceMotionEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
-
-  initDeviceMotionEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
-
-  initDeviceMotionEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
-
-  interval_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "interval");
-
-  rotationRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rotationRate");
+  initDeviceMotionEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* DeviceMotionEvent */, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
 }
 
 class BlinkDeviceOrientationEvent extends BlinkEvent {
   static final instance = new BlinkDeviceOrientationEvent();
 
-  absolute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "absolute");
+  absolute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceOrientationEvent */, "absolute");
 
-  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alpha");
+  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceOrientationEvent */, "alpha");
 
-  beta_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "beta");
+  beta_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceOrientationEvent */, "beta");
 
-  gamma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gamma");
+  gamma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceOrientationEvent */, "gamma");
 
-  initDeviceOrientationEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", []);
+  initDeviceOrientationEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* DeviceOrientationEvent */, "initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  initDeviceOrientationEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", [__arg_0]);
+  initDeviceOrientationEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* DeviceOrientationEvent */, "initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  initDeviceOrientationEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", [__arg_0, __arg_1]);
-
-  initDeviceOrientationEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2]);
-
-  initDeviceOrientationEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
-
-  initDeviceOrientationEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
-
-  initDeviceOrientationEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
-
-  initDeviceOrientationEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  initDeviceOrientationEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* DeviceOrientationEvent */, "initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
 }
 
 class BlinkDeviceRotationRate {
   static final instance = new BlinkDeviceRotationRate();
 
-  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alpha");
+  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceRotationRate */, "alpha");
 
-  beta_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "beta");
+  beta_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceRotationRate */, "beta");
 
-  gamma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gamma");
+  gamma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DeviceRotationRate */, "gamma");
 
 }
 
 class BlinkDirectoryEntry extends BlinkEntry {
   static final instance = new BlinkDirectoryEntry();
 
-  createReader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createReader", []);
+  createReader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "createReader", []);
 
-  getDirectory_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", []);
+  getDirectory_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getDirectory", []);
 
-  getDirectory_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0]);
+  getDirectory_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getDirectory", [__arg_0]);
 
-  getDirectory_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0, __arg_1]);
+  getDirectory_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getDirectory", [__arg_0, __arg_1]);
 
-  getDirectory_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0, __arg_1, __arg_2]);
+  getDirectory_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getDirectory", [__arg_0, __arg_1, __arg_2]);
 
-  getDirectory_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  getDirectory_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getDirectory", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  getFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFile", []);
+  getFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getFile", []);
 
-  getFile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0]);
+  getFile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getFile", [__arg_0]);
 
-  getFile_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0, __arg_1]);
+  getFile_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getFile", [__arg_0, __arg_1]);
 
-  getFile_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0, __arg_1, __arg_2]);
+  getFile_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getFile", [__arg_0, __arg_1, __arg_2]);
 
-  getFile_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  getFile_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "getFile", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  removeRecursively_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeRecursively", []);
+  removeRecursively_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "removeRecursively", []);
 
-  removeRecursively_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeRecursively", [__arg_0]);
+  removeRecursively_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "removeRecursively", [__arg_0]);
 
-  removeRecursively_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeRecursively", [__arg_0, __arg_1]);
+  removeRecursively_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntry */, "removeRecursively", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDirectoryEntrySync extends BlinkEntrySync {
   static final instance = new BlinkDirectoryEntrySync();
 
-  createReader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createReader", []);
+  createReader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntrySync */, "createReader", []);
 
-  getDirectory_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", []);
+  getDirectory_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntrySync */, "getDirectory", []);
 
-  getDirectory_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0]);
+  getDirectory_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntrySync */, "getDirectory", [__arg_0]);
 
-  getDirectory_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0, __arg_1]);
+  getDirectory_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntrySync */, "getDirectory", [__arg_0, __arg_1]);
 
-  getFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFile", []);
+  getFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntrySync */, "getFile", []);
 
-  getFile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0]);
+  getFile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntrySync */, "getFile", [__arg_0]);
 
-  getFile_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0, __arg_1]);
+  getFile_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntrySync */, "getFile", [__arg_0, __arg_1]);
 
-  removeRecursively_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeRecursively", []);
+  removeRecursively_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryEntrySync */, "removeRecursively", []);
 
 }
 
 class BlinkDirectoryReader {
   static final instance = new BlinkDirectoryReader();
 
-  readEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readEntries", []);
+  readEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryReader */, "readEntries", []);
 
-  readEntries_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readEntries", [__arg_0]);
+  readEntries_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryReader */, "readEntries", [__arg_0]);
 
-  readEntries_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "readEntries", [__arg_0, __arg_1]);
+  readEntries_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryReader */, "readEntries", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDirectoryReaderSync {
   static final instance = new BlinkDirectoryReaderSync();
 
-  readEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readEntries", []);
+  readEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* DirectoryReaderSync */, "readEntries", []);
 
 }
 
 class BlinkDocument extends BlinkNode {
   static final instance = new BlinkDocument();
 
-  URL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "URL");
+  URL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "URL");
 
-  activeElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeElement");
+  activeElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "activeElement");
 
-  adoptNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "adoptNode", []);
+  anchors_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "anchors");
 
-  adoptNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "adoptNode", [__arg_0]);
+  applets_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "applets");
 
-  anchors_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "anchors");
+  body_Getter_(mthis) native "Blink_Getter_Document_body";
 
-  body_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "body");
+  body_Setter_(mthis, __arg_0) native "Blink_Setter_Document_body";
 
-  body_Setter_(mthis, __arg_0) => mthis["body"] = __arg_0;
+  characterSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "characterSet");
 
-  caretRangeFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "caretRangeFromPoint", []);
+  charset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "charset");
 
-  caretRangeFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "caretRangeFromPoint", [__arg_0]);
+  compatMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "compatMode");
 
-  caretRangeFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "caretRangeFromPoint", [__arg_0, __arg_1]);
+  contentType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "contentType");
 
-  characterSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "characterSet");
+  cookie_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "cookie");
 
-  charset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charset");
+  cookie_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "cookie", __arg_0);
 
-  charset_Setter_(mthis, __arg_0) => mthis["charset"] = __arg_0;
+  currentScript_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "currentScript");
 
-  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "childElementCount");
+  defaultCharset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "defaultCharset");
 
-  children_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "children");
+  defaultView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "defaultView");
 
-  compatMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "compatMode");
+  designMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "designMode");
 
-  contentType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentType");
+  designMode_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "designMode", __arg_0);
 
-  cookie_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cookie");
+  dir_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "dir");
 
-  cookie_Setter_(mthis, __arg_0) => mthis["cookie"] = __arg_0;
+  dir_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "dir", __arg_0);
 
-  createCDATASection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createCDATASection", []);
+  doctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "doctype");
 
-  createCDATASection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createCDATASection", [__arg_0]);
+  documentElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "documentElement");
 
-  createDocumentFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDocumentFragment", []);
+  documentURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "documentURI");
 
-  createElementNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createElementNS", []);
+  domain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "domain");
 
-  createElementNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createElementNS", [__arg_0]);
+  domain_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "domain", __arg_0);
 
-  createElementNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createElementNS", [__arg_0, __arg_1]);
+  embeds_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "embeds");
 
-  createElementNS_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createElementNS", [__arg_0, __arg_1, __arg_2]);
+  fonts_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "fonts");
 
-  createElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createElement", []);
+  forms_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "forms");
 
-  createElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createElement", [__arg_0]);
+  fullscreenElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "fullscreenElement");
 
-  createElement_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createElement", [__arg_0, __arg_1]);
+  fullscreenEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "fullscreenEnabled");
 
-  createEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createEvent", []);
+  head_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "head");
 
-  createEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createEvent", [__arg_0]);
+  hidden_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "hidden");
 
-  createNodeIterator_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createNodeIterator", []);
+  images_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "images");
 
-  createNodeIterator_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createNodeIterator", [__arg_0]);
+  implementation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "implementation");
 
-  createNodeIterator_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createNodeIterator", [__arg_0, __arg_1]);
+  inputEncoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "inputEncoding");
 
-  createNodeIterator_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createNodeIterator", [__arg_0, __arg_1, __arg_2]);
+  lastModified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "lastModified");
 
-  createRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createRange", []);
+  links_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "links");
 
-  createTextNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTextNode", []);
+  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "location");
 
-  createTextNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createTextNode", [__arg_0]);
+  onbeforecopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onbeforecopy");
 
-  createTouchList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTouchList", []);
+  onbeforecopy_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onbeforecopy", __arg_0);
 
-  createTouchList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createTouchList", [__arg_0]);
+  onbeforecut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onbeforecut");
 
-  createTouch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", []);
+  onbeforecut_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onbeforecut", __arg_0);
 
-  createTouch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0]);
+  onbeforepaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onbeforepaste");
 
-  createTouch_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+  onbeforepaste_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onbeforepaste", __arg_0);
 
-  createTouch_Callback_11_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
+  oncopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "oncopy");
 
-  createTouch_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1]);
+  oncopy_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "oncopy", __arg_0);
 
-  createTouch_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2]);
+  oncut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "oncut");
 
-  createTouch_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  oncut_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "oncut", __arg_0);
 
-  createTouch_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  onfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onfullscreenchange");
 
-  createTouch_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  onfullscreenchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onfullscreenchange", __arg_0);
 
-  createTouch_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  onfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onfullscreenerror");
 
-  createTouch_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  onfullscreenerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onfullscreenerror", __arg_0);
 
-  createTouch_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  onpaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onpaste");
 
-  createTreeWalker_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTreeWalker", []);
+  onpaste_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onpaste", __arg_0);
 
-  createTreeWalker_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createTreeWalker", [__arg_0]);
+  onpointerlockchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onpointerlockchange");
 
-  createTreeWalker_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createTreeWalker", [__arg_0, __arg_1]);
+  onpointerlockchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onpointerlockchange", __arg_0);
 
-  createTreeWalker_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createTreeWalker", [__arg_0, __arg_1, __arg_2]);
+  onpointerlockerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onpointerlockerror");
 
-  currentScript_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentScript");
+  onpointerlockerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onpointerlockerror", __arg_0);
 
-  defaultCharset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultCharset");
+  onreadystatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onreadystatechange");
 
-  defaultView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultView");
+  onreadystatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onreadystatechange", __arg_0);
 
-  doctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "doctype");
+  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onsearch");
 
-  documentElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "documentElement");
+  onsearch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onsearch", __arg_0);
 
-  documentURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "documentURI");
+  onsecuritypolicyviolation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onsecuritypolicyviolation");
 
-  domain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domain");
+  onsecuritypolicyviolation_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onsecuritypolicyviolation", __arg_0);
 
-  domain_Setter_(mthis, __arg_0) => mthis["domain"] = __arg_0;
+  onselectionchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onselectionchange");
 
-  elementFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", []);
+  onselectionchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onselectionchange", __arg_0);
 
-  elementFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", [__arg_0]);
+  onselectstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onselectstart");
 
-  elementFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", [__arg_0, __arg_1]);
+  onselectstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onselectstart", __arg_0);
 
-  embeds_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "embeds");
+  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "ontouchcancel");
 
-  execCommand_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "execCommand", []);
+  ontouchcancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "ontouchcancel", __arg_0);
 
-  execCommand_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "execCommand", [__arg_0]);
+  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "ontouchend");
 
-  execCommand_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "execCommand", [__arg_0, __arg_1]);
+  ontouchend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "ontouchend", __arg_0);
 
-  execCommand_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "execCommand", [__arg_0, __arg_1, __arg_2]);
+  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "ontouchmove");
 
-  exitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "exitFullscreen", []);
+  ontouchmove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "ontouchmove", __arg_0);
 
-  exitPointerLock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "exitPointerLock", []);
+  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "ontouchstart");
 
-  firstElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "firstElementChild");
+  ontouchstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "ontouchstart", __arg_0);
 
-  fonts_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fonts");
+  onwebkitfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onwebkitfullscreenchange");
 
-  forms_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "forms");
+  onwebkitfullscreenchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onwebkitfullscreenchange", __arg_0);
 
-  fullscreenElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fullscreenElement");
+  onwebkitfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onwebkitfullscreenerror");
 
-  fullscreenEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fullscreenEnabled");
+  onwebkitfullscreenerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onwebkitfullscreenerror", __arg_0);
 
-  getCSSCanvasContext_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getCSSCanvasContext", [__arg_0, __arg_1]);
+  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "onwheel");
 
-  getCSSCanvasContext_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getCSSCanvasContext", [__arg_0, __arg_1, __arg_2]);
+  onwheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "onwheel", __arg_0);
 
-  getCSSCanvasContext_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "getCSSCanvasContext", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "origin");
 
-  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", []);
+  plugins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "plugins");
 
-  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", [__arg_0]);
+  pointerLockElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "pointerLockElement");
 
-  getElementsByClassName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", []);
+  preferredStylesheetSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "preferredStylesheetSet");
 
-  getElementsByClassName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", [__arg_0]);
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "readyState");
 
-  getElementsByName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByName", []);
+  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "referrer");
 
-  getElementsByName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByName", [__arg_0]);
+  rootElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "rootElement");
 
-  getElementsByTagName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", []);
+  scripts_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "scripts");
 
-  getElementsByTagName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", [__arg_0]);
+  scrollingElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "scrollingElement");
 
-  head_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "head");
+  selectedStylesheetSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "selectedStylesheetSet");
 
-  hidden_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hidden");
+  selectedStylesheetSet_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "selectedStylesheetSet", __arg_0);
 
-  implementation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "implementation");
+  styleSheets_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "styleSheets");
 
-  importNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "importNode", []);
+  timeline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "timeline");
 
-  importNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "importNode", [__arg_0]);
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "title");
 
-  importNode_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "importNode", [__arg_0, __arg_1]);
+  title_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "title", __arg_0);
 
-  inputEncoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputEncoding");
+  visibilityState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "visibilityState");
 
-  lastElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastElementChild");
+  webkitCurrentFullScreenElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "webkitCurrentFullScreenElement");
 
-  lastModified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastModified");
+  webkitFullscreenElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "webkitFullscreenElement");
 
-  links_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "links");
+  webkitFullscreenEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "webkitFullscreenEnabled");
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  webkitHidden_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "webkitHidden");
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  webkitIsFullScreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "webkitIsFullScreen");
 
-  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocomplete");
+  webkitVisibilityState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "webkitVisibilityState");
 
-  onautocomplete_Setter_(mthis, __arg_0) => mthis["onautocomplete"] = __arg_0;
+  xmlEncoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "xmlEncoding");
 
-  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocompleteerror");
+  xmlStandalone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "xmlStandalone");
 
-  onautocompleteerror_Setter_(mthis, __arg_0) => mthis["onautocompleteerror"] = __arg_0;
+  xmlStandalone_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "xmlStandalone", __arg_0);
 
-  onbeforecopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforecopy");
+  xmlVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Document */, "xmlVersion");
 
-  onbeforecopy_Setter_(mthis, __arg_0) => mthis["onbeforecopy"] = __arg_0;
+  xmlVersion_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Document */, "xmlVersion", __arg_0);
 
-  onbeforecut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforecut");
+  adoptNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "adoptNode", []);
 
-  onbeforecut_Setter_(mthis, __arg_0) => mthis["onbeforecut"] = __arg_0;
+  adoptNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "adoptNode", [__arg_0]);
 
-  onbeforepaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforepaste");
+  caretRangeFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "caretRangeFromPoint", []);
 
-  onbeforepaste_Setter_(mthis, __arg_0) => mthis["onbeforepaste"] = __arg_0;
+  caretRangeFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "caretRangeFromPoint", [__arg_0]);
 
-  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
+  caretRangeFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "caretRangeFromPoint", [__arg_0, __arg_1]);
 
-  onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "close", []);
 
-  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncancel");
+  createAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createAttribute", []);
 
-  oncancel_Setter_(mthis, __arg_0) => mthis["oncancel"] = __arg_0;
+  createAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createAttribute", [__arg_0]);
 
-  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplay");
+  createAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createAttributeNS", []);
 
-  oncanplay_Setter_(mthis, __arg_0) => mthis["oncanplay"] = __arg_0;
+  createAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createAttributeNS", [__arg_0]);
 
-  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplaythrough");
+  createAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createAttributeNS", [__arg_0, __arg_1]);
 
-  oncanplaythrough_Setter_(mthis, __arg_0) => mthis["oncanplaythrough"] = __arg_0;
+  createCDATASection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createCDATASection", []);
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  createCDATASection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createCDATASection", [__arg_0]);
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  createComment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createComment", []);
 
-  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
+  createComment_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createComment", [__arg_0]);
 
-  onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
+  createDocumentFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createDocumentFragment", []);
 
-  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
+  createElement_Callback_0_(mthis) native "Blink_Operation_0_Document_createElement";
 
-  onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
+  createElement_Callback_1_(mthis, __arg_0) native "Blink_Operation_Document_createElement"; /* __arg_0 */
 
-  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncontextmenu");
+  createElement_Callback_2_(mthis, __arg_0, __arg_1) native "Blink_Operation_Document_createElement"; /* __arg_0, __arg_1 */
+
+  createElementNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createElementNS", []);
+
+  createElementNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createElementNS", [__arg_0]);
+
+  createElementNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createElementNS", [__arg_0, __arg_1]);
+
+  createElementNS_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createElementNS", [__arg_0, __arg_1, __arg_2]);
+
+  createEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createEvent", []);
+
+  createEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createEvent", [__arg_0]);
+
+  createExpression_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createExpression", []);
+
+  createExpression_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createExpression", [__arg_0]);
+
+  createExpression_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createExpression", [__arg_0, __arg_1]);
+
+  createNSResolver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createNSResolver", []);
+
+  createNSResolver_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createNSResolver", [__arg_0]);
+
+  createNodeIterator_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createNodeIterator", []);
+
+  createNodeIterator_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createNodeIterator", [__arg_0]);
+
+  createNodeIterator_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createNodeIterator", [__arg_0, __arg_1]);
+
+  createNodeIterator_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createNodeIterator", [__arg_0, __arg_1, __arg_2]);
+
+  createProcessingInstruction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createProcessingInstruction", []);
+
+  createProcessingInstruction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createProcessingInstruction", [__arg_0]);
+
+  createProcessingInstruction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createProcessingInstruction", [__arg_0, __arg_1]);
+
+  createRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createRange", []);
+
+  createTextNode_Callback_0_(mthis) native "Blink_Operation_0_Document_createTextNode";
+
+  createTextNode_Callback_1_(mthis, __arg_0) native "Blink_Operation_Document_createTextNode"; /* __arg_0 */
+
+  createTouch_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  createTouch_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  createTouch_Callback_11_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
+
+  createTouchList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTouchList", []);
+
+  createTouchList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTouchList", [__arg_0]);
+
+  createTreeWalker_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTreeWalker", []);
+
+  createTreeWalker_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTreeWalker", [__arg_0]);
+
+  createTreeWalker_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTreeWalker", [__arg_0, __arg_1]);
+
+  createTreeWalker_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "createTreeWalker", [__arg_0, __arg_1, __arg_2]);
+
+  elementFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "elementFromPoint", []);
+
+  elementFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "elementFromPoint", [__arg_0]);
+
+  elementFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "elementFromPoint", [__arg_0, __arg_1]);
+
+  elementsFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "elementsFromPoint", []);
+
+  elementsFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "elementsFromPoint", [__arg_0]);
+
+  elementsFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "elementsFromPoint", [__arg_0, __arg_1]);
+
+  evaluate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "evaluate", [__arg_0]);
+
+  evaluate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "evaluate", [__arg_0, __arg_1]);
+
+  evaluate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "evaluate", [__arg_0, __arg_1, __arg_2]);
+
+  evaluate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "evaluate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  evaluate_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "evaluate", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  execCommand_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "execCommand", []);
+
+  execCommand_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "execCommand", [__arg_0]);
+
+  execCommand_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "execCommand", [__arg_0, __arg_1]);
+
+  execCommand_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "execCommand", [__arg_0, __arg_1, __arg_2]);
+
+  exitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "exitFullscreen", []);
+
+  exitPointerLock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "exitPointerLock", []);
+
+  getCSSCanvasContext_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getCSSCanvasContext", [__arg_0, __arg_1]);
+
+  getCSSCanvasContext_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getCSSCanvasContext", [__arg_0, __arg_1, __arg_2]);
+
+  getCSSCanvasContext_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getCSSCanvasContext", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  getElementsByClassName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByClassName", []);
+
+  getElementsByClassName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByClassName", [__arg_0]);
+
+  getElementsByName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByName", []);
+
+  getElementsByName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByName", [__arg_0]);
+
+  getElementsByTagName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByTagName", []);
 
-  oncontextmenu_Setter_(mthis, __arg_0) => mthis["oncontextmenu"] = __arg_0;
+  getElementsByTagName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByTagName", [__arg_0]);
 
-  oncopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncopy");
+  getElementsByTagNameNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByTagNameNS", []);
 
-  oncopy_Setter_(mthis, __arg_0) => mthis["oncopy"] = __arg_0;
+  getElementsByTagNameNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByTagNameNS", [__arg_0]);
 
-  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
+  getElementsByTagNameNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getElementsByTagNameNS", [__arg_0, __arg_1]);
 
-  oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
+  getSelection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "getSelection", []);
 
-  oncut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncut");
+  hasFocus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "hasFocus", []);
 
-  oncut_Setter_(mthis, __arg_0) => mthis["oncut"] = __arg_0;
+  importNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "importNode", []);
 
-  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondblclick");
+  importNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "importNode", [__arg_0]);
 
-  ondblclick_Setter_(mthis, __arg_0) => mthis["ondblclick"] = __arg_0;
+  importNode_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "importNode", [__arg_0, __arg_1]);
 
-  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrag");
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "open", []);
 
-  ondrag_Setter_(mthis, __arg_0) => mthis["ondrag"] = __arg_0;
+  queryCommandEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandEnabled", []);
 
-  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragend");
+  queryCommandEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandEnabled", [__arg_0]);
 
-  ondragend_Setter_(mthis, __arg_0) => mthis["ondragend"] = __arg_0;
+  queryCommandIndeterm_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandIndeterm", []);
 
-  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragenter");
+  queryCommandIndeterm_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandIndeterm", [__arg_0]);
 
-  ondragenter_Setter_(mthis, __arg_0) => mthis["ondragenter"] = __arg_0;
+  queryCommandState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandState", []);
 
-  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragleave");
+  queryCommandState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandState", [__arg_0]);
 
-  ondragleave_Setter_(mthis, __arg_0) => mthis["ondragleave"] = __arg_0;
+  queryCommandSupported_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandSupported", []);
 
-  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragover");
+  queryCommandSupported_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandSupported", [__arg_0]);
 
-  ondragover_Setter_(mthis, __arg_0) => mthis["ondragover"] = __arg_0;
+  queryCommandValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandValue", []);
 
-  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragstart");
+  queryCommandValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "queryCommandValue", [__arg_0]);
 
-  ondragstart_Setter_(mthis, __arg_0) => mthis["ondragstart"] = __arg_0;
+  transformDocumentToTreeView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "transformDocumentToTreeView", []);
 
-  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrop");
+  transformDocumentToTreeView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "transformDocumentToTreeView", [__arg_0]);
 
-  ondrop_Setter_(mthis, __arg_0) => mthis["ondrop"] = __arg_0;
+  webkitCancelFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "webkitCancelFullScreen", []);
 
-  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondurationchange");
+  webkitExitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "webkitExitFullscreen", []);
 
-  ondurationchange_Setter_(mthis, __arg_0) => mthis["ondurationchange"] = __arg_0;
+  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "write", []);
 
-  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onemptied");
+  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "write", [__arg_0]);
 
-  onemptied_Setter_(mthis, __arg_0) => mthis["onemptied"] = __arg_0;
+  writeln_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "writeln", []);
 
-  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
+  writeln_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Document */, "writeln", [__arg_0]);
 
-  onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onabort");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onabort", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocomplete");
 
-  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
+  onautocomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocomplete", __arg_0);
 
-  onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror");
 
-  onfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfullscreenchange");
+  onautocompleteerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror", __arg_0);
 
-  onfullscreenchange_Setter_(mthis, __arg_0) => mthis["onfullscreenchange"] = __arg_0;
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onblur");
 
-  onfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfullscreenerror");
+  onblur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onblur", __arg_0);
 
-  onfullscreenerror_Setter_(mthis, __arg_0) => mthis["onfullscreenerror"] = __arg_0;
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncancel");
 
-  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninput");
+  oncancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncancel", __arg_0);
 
-  oninput_Setter_(mthis, __arg_0) => mthis["oninput"] = __arg_0;
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplay");
 
-  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninvalid");
+  oncanplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplay", __arg_0);
 
-  oninvalid_Setter_(mthis, __arg_0) => mthis["oninvalid"] = __arg_0;
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough");
 
-  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeydown");
+  oncanplaythrough_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough", __arg_0);
 
-  onkeydown_Setter_(mthis, __arg_0) => mthis["onkeydown"] = __arg_0;
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onchange");
 
-  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeypress");
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onchange", __arg_0);
 
-  onkeypress_Setter_(mthis, __arg_0) => mthis["onkeypress"] = __arg_0;
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclick");
 
-  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeyup");
+  onclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclick", __arg_0);
 
-  onkeyup_Setter_(mthis, __arg_0) => mthis["onkeyup"] = __arg_0;
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclose");
 
-  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclose", __arg_0);
 
-  onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncontextmenu");
 
-  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadeddata");
+  oncontextmenu_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncontextmenu", __arg_0);
 
-  onloadeddata_Setter_(mthis, __arg_0) => mthis["onloadeddata"] = __arg_0;
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncuechange");
 
-  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadedmetadata");
+  oncuechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncuechange", __arg_0);
 
-  onloadedmetadata_Setter_(mthis, __arg_0) => mthis["onloadedmetadata"] = __arg_0;
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondblclick");
 
-  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
+  ondblclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondblclick", __arg_0);
 
-  onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrag");
 
-  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousedown");
+  ondrag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrag", __arg_0);
 
-  onmousedown_Setter_(mthis, __arg_0) => mthis["onmousedown"] = __arg_0;
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragend");
 
-  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseenter");
+  ondragend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragend", __arg_0);
 
-  onmouseenter_Setter_(mthis, __arg_0) => mthis["onmouseenter"] = __arg_0;
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragenter");
 
-  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseleave");
+  ondragenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragenter", __arg_0);
 
-  onmouseleave_Setter_(mthis, __arg_0) => mthis["onmouseleave"] = __arg_0;
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragleave");
 
-  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousemove");
+  ondragleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragleave", __arg_0);
 
-  onmousemove_Setter_(mthis, __arg_0) => mthis["onmousemove"] = __arg_0;
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragover");
 
-  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseout");
+  ondragover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragover", __arg_0);
 
-  onmouseout_Setter_(mthis, __arg_0) => mthis["onmouseout"] = __arg_0;
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragstart");
 
-  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseover");
+  ondragstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragstart", __arg_0);
 
-  onmouseover_Setter_(mthis, __arg_0) => mthis["onmouseover"] = __arg_0;
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrop");
 
-  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseup");
+  ondrop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrop", __arg_0);
 
-  onmouseup_Setter_(mthis, __arg_0) => mthis["onmouseup"] = __arg_0;
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondurationchange");
 
-  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousewheel");
+  ondurationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondurationchange", __arg_0);
 
-  onmousewheel_Setter_(mthis, __arg_0) => mthis["onmousewheel"] = __arg_0;
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onemptied");
 
-  onpaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpaste");
+  onemptied_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onemptied", __arg_0);
 
-  onpaste_Setter_(mthis, __arg_0) => mthis["onpaste"] = __arg_0;
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onended");
 
-  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onended", __arg_0);
 
-  onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onerror");
 
-  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplay");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onerror", __arg_0);
 
-  onplay_Setter_(mthis, __arg_0) => mthis["onplay"] = __arg_0;
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onfocus");
 
-  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplaying");
+  onfocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onfocus", __arg_0);
 
-  onplaying_Setter_(mthis, __arg_0) => mthis["onplaying"] = __arg_0;
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninput");
 
-  onpointerlockchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpointerlockchange");
+  oninput_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninput", __arg_0);
 
-  onpointerlockchange_Setter_(mthis, __arg_0) => mthis["onpointerlockchange"] = __arg_0;
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninvalid");
 
-  onpointerlockerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpointerlockerror");
+  oninvalid_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninvalid", __arg_0);
 
-  onpointerlockerror_Setter_(mthis, __arg_0) => mthis["onpointerlockerror"] = __arg_0;
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeydown");
 
-  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
+  onkeydown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeydown", __arg_0);
 
-  onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeypress");
 
-  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onratechange");
+  onkeypress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeypress", __arg_0);
 
-  onratechange_Setter_(mthis, __arg_0) => mthis["onratechange"] = __arg_0;
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeyup");
 
-  onreadystatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreadystatechange");
+  onkeyup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeyup", __arg_0);
 
-  onreadystatechange_Setter_(mthis, __arg_0) => mthis["onreadystatechange"] = __arg_0;
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onload");
 
-  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreset");
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onload", __arg_0);
 
-  onreset_Setter_(mthis, __arg_0) => mthis["onreset"] = __arg_0;
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadeddata");
 
-  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
+  onloadeddata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadeddata", __arg_0);
 
-  onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata");
 
-  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
+  onloadedmetadata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata", __arg_0);
 
-  onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadstart");
 
-  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsearch");
+  onloadstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadstart", __arg_0);
 
-  onsearch_Setter_(mthis, __arg_0) => mthis["onsearch"] = __arg_0;
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousedown");
 
-  onsecuritypolicyviolation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsecuritypolicyviolation");
+  onmousedown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousedown", __arg_0);
 
-  onsecuritypolicyviolation_Setter_(mthis, __arg_0) => mthis["onsecuritypolicyviolation"] = __arg_0;
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseenter");
 
-  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeked");
+  onmouseenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseenter", __arg_0);
 
-  onseeked_Setter_(mthis, __arg_0) => mthis["onseeked"] = __arg_0;
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseleave");
 
-  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeking");
+  onmouseleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseleave", __arg_0);
 
-  onseeking_Setter_(mthis, __arg_0) => mthis["onseeking"] = __arg_0;
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousemove");
 
-  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselect");
+  onmousemove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousemove", __arg_0);
 
-  onselect_Setter_(mthis, __arg_0) => mthis["onselect"] = __arg_0;
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseout");
 
-  onselectionchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselectionchange");
+  onmouseout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseout", __arg_0);
 
-  onselectionchange_Setter_(mthis, __arg_0) => mthis["onselectionchange"] = __arg_0;
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseover");
 
-  onselectstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselectstart");
+  onmouseover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseover", __arg_0);
 
-  onselectstart_Setter_(mthis, __arg_0) => mthis["onselectstart"] = __arg_0;
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseup");
 
-  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
+  onmouseup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseup", __arg_0);
 
-  onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousewheel");
 
-  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstalled");
+  onmousewheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousewheel", __arg_0);
 
-  onstalled_Setter_(mthis, __arg_0) => mthis["onstalled"] = __arg_0;
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpause");
 
-  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsubmit");
+  onpause_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpause", __arg_0);
 
-  onsubmit_Setter_(mthis, __arg_0) => mthis["onsubmit"] = __arg_0;
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplay");
 
-  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuspend");
+  onplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplay", __arg_0);
 
-  onsuspend_Setter_(mthis, __arg_0) => mthis["onsuspend"] = __arg_0;
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplaying");
 
-  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeupdate");
+  onplaying_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplaying", __arg_0);
 
-  ontimeupdate_Setter_(mthis, __arg_0) => mthis["ontimeupdate"] = __arg_0;
+  onpointercancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointercancel");
 
-  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontoggle");
+  onpointercancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointercancel", __arg_0);
 
-  ontoggle_Setter_(mthis, __arg_0) => mthis["ontoggle"] = __arg_0;
+  onpointerdown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerdown");
 
-  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchcancel");
+  onpointerdown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerdown", __arg_0);
 
-  ontouchcancel_Setter_(mthis, __arg_0) => mthis["ontouchcancel"] = __arg_0;
+  onpointerenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerenter");
 
-  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchend");
+  onpointerenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerenter", __arg_0);
 
-  ontouchend_Setter_(mthis, __arg_0) => mthis["ontouchend"] = __arg_0;
+  onpointerleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerleave");
 
-  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchmove");
+  onpointerleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerleave", __arg_0);
 
-  ontouchmove_Setter_(mthis, __arg_0) => mthis["ontouchmove"] = __arg_0;
+  onpointermove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointermove");
 
-  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchstart");
+  onpointermove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointermove", __arg_0);
 
-  ontouchstart_Setter_(mthis, __arg_0) => mthis["ontouchstart"] = __arg_0;
+  onpointerout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerout");
 
-  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvolumechange");
+  onpointerout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerout", __arg_0);
 
-  onvolumechange_Setter_(mthis, __arg_0) => mthis["onvolumechange"] = __arg_0;
+  onpointerover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerover");
 
-  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwaiting");
+  onpointerover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerover", __arg_0);
 
-  onwaiting_Setter_(mthis, __arg_0) => mthis["onwaiting"] = __arg_0;
+  onpointerup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerup");
 
-  onwebkitfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitfullscreenchange");
+  onpointerup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerup", __arg_0);
 
-  onwebkitfullscreenchange_Setter_(mthis, __arg_0) => mthis["onwebkitfullscreenchange"] = __arg_0;
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onprogress");
 
-  onwebkitfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitfullscreenerror");
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onprogress", __arg_0);
 
-  onwebkitfullscreenerror_Setter_(mthis, __arg_0) => mthis["onwebkitfullscreenerror"] = __arg_0;
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onratechange");
 
-  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwheel");
+  onratechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onratechange", __arg_0);
 
-  onwheel_Setter_(mthis, __arg_0) => mthis["onwheel"] = __arg_0;
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onreset");
 
-  plugins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "plugins");
+  onreset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onreset", __arg_0);
 
-  pointerLockElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointerLockElement");
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onresize");
 
-  preferredStylesheetSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preferredStylesheetSet");
+  onresize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onresize", __arg_0);
 
-  queryCommandEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandEnabled", []);
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onscroll");
 
-  queryCommandEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandEnabled", [__arg_0]);
+  onscroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onscroll", __arg_0);
 
-  queryCommandIndeterm_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandIndeterm", []);
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeked");
 
-  queryCommandIndeterm_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandIndeterm", [__arg_0]);
+  onseeked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeked", __arg_0);
 
-  queryCommandState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandState", []);
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeking");
 
-  queryCommandState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandState", [__arg_0]);
+  onseeking_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeking", __arg_0);
 
-  queryCommandSupported_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandSupported", []);
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onselect");
 
-  queryCommandSupported_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandSupported", [__arg_0]);
+  onselect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onselect", __arg_0);
 
-  queryCommandValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandValue", []);
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onshow");
 
-  queryCommandValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandValue", [__arg_0]);
+  onshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onshow", __arg_0);
 
-  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", []);
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onstalled");
 
-  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", [__arg_0]);
+  onstalled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onstalled", __arg_0);
 
-  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", []);
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsubmit");
 
-  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", [__arg_0]);
+  onsubmit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsubmit", __arg_0);
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsuspend");
 
-  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "referrer");
+  onsuspend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsuspend", __arg_0);
 
-  registerElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "registerElement", []);
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontimeupdate");
 
-  registerElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "registerElement", [__arg_0]);
+  ontimeupdate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontimeupdate", __arg_0);
 
-  registerElement_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "registerElement", [__arg_0, __arg_1]);
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontoggle");
 
-  rootElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rootElement");
+  ontoggle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontoggle", __arg_0);
 
-  scripts_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scripts");
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onvolumechange");
 
-  selectedStylesheetSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectedStylesheetSet");
+  onvolumechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onvolumechange", __arg_0);
 
-  selectedStylesheetSet_Setter_(mthis, __arg_0) => mthis["selectedStylesheetSet"] = __arg_0;
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onwaiting");
 
-  styleSheets_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "styleSheets");
+  onwaiting_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onwaiting", __arg_0);
 
-  timeline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timeline");
+  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ParentNode */, "childElementCount");
 
-  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
+  children_Getter_(mthis) native "Blink_Getter_ParentNode_children";
 
-  title_Setter_(mthis, __arg_0) => mthis["title"] = __arg_0;
+  firstElementChild_Getter_(mthis) native "Blink_Getter_ParentNode_firstElementChild";
 
-  transformDocumentToTreeView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transformDocumentToTreeView", []);
+  lastElementChild_Getter_(mthis) native "Blink_Getter_ParentNode_lastElementChild";
 
-  transformDocumentToTreeView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transformDocumentToTreeView", [__arg_0]);
+  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "append", []);
 
-  visibilityState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "visibilityState");
+  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "append", [__arg_0]);
 
-  webkitCancelFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitCancelFullScreen", []);
+  prepend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "prepend", []);
 
-  webkitExitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitExitFullscreen", []);
+  prepend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "prepend", [__arg_0]);
 
-  webkitFullscreenElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitFullscreenElement");
+  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelector", []);
 
-  webkitFullscreenEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitFullscreenEnabled");
+  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelector", [__arg_0]);
 
-  webkitHidden_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitHidden");
+  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelectorAll", []);
 
-  webkitIsFullScreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitIsFullScreen");
+  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelectorAll", [__arg_0]);
 
-  webkitVisibilityState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitVisibilityState");
+  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NonElementParentNode */, "getElementById", []);
 
-  xmlEncoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xmlEncoding");
+  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NonElementParentNode */, "getElementById", [__arg_0]);
 
 }
 
 class BlinkDocumentFragment extends BlinkNode {
   static final instance = new BlinkDocumentFragment();
 
-  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "childElementCount");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("DocumentFragment");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DocumentFragment"), []);
+  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ParentNode */, "childElementCount");
 
-  firstElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "firstElementChild");
+  children_Getter_(mthis) native "Blink_Getter_ParentNode_children";
 
-  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", []);
+  firstElementChild_Getter_(mthis) native "Blink_Getter_ParentNode_firstElementChild";
 
-  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", [__arg_0]);
+  lastElementChild_Getter_(mthis) native "Blink_Getter_ParentNode_lastElementChild";
 
-  lastElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastElementChild");
+  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "append", []);
 
-  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", []);
+  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "append", [__arg_0]);
 
-  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", [__arg_0]);
+  prepend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "prepend", []);
 
-  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", []);
+  prepend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "prepend", [__arg_0]);
 
-  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", [__arg_0]);
+  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelector", []);
+
+  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelector", [__arg_0]);
+
+  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelectorAll", []);
+
+  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelectorAll", [__arg_0]);
+
+  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NonElementParentNode */, "getElementById", []);
+
+  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NonElementParentNode */, "getElementById", [__arg_0]);
 
 }
 
 class BlinkDocumentType extends BlinkNode {
   static final instance = new BlinkDocumentType();
 
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DocumentType */, "name");
+
+  publicId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DocumentType */, "publicId");
+
+  systemId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DocumentType */, "systemId");
+
+  after_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "after", []);
+
+  after_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "after", [__arg_0]);
+
+  before_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "before", []);
+
+  before_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "before", [__arg_0]);
+
+  remove_Callback_0_(mthis) native "Blink_Operation_0_ChildNode_remove";
+
+  replaceWith_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "replaceWith", []);
+
+  replaceWith_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "replaceWith", [__arg_0]);
+
 }
 
 class BlinkDynamicsCompressorNode extends BlinkAudioNode {
   static final instance = new BlinkDynamicsCompressorNode();
 
-  attack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attack");
+  attack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DynamicsCompressorNode */, "attack");
 
-  knee_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "knee");
+  knee_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DynamicsCompressorNode */, "knee");
 
-  ratio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ratio");
+  ratio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DynamicsCompressorNode */, "ratio");
 
-  reduction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reduction");
+  reduction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DynamicsCompressorNode */, "reduction");
 
-  release_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "release");
+  release_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DynamicsCompressorNode */, "release");
 
-  threshold_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "threshold");
+  threshold_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* DynamicsCompressorNode */, "threshold");
 
 }
 
@@ -3956,1936 +4647,3052 @@
 
 }
 
+class BlinkEXTsRGB {
+  static final instance = new BlinkEXTsRGB();
+
+}
+
+class BlinkEffectModel {
+  static final instance = new BlinkEffectModel();
+
+}
+
 class BlinkElement extends BlinkNode {
   static final instance = new BlinkElement();
 
-  animate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "animate", []);
+  attributes_Getter_(mthis) native "Blink_Getter_Element_attributes";
+
+  classList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "classList");
+
+  className_Getter_(mthis) native "Blink_Getter_Element_className";
+
+  className_Setter_(mthis, __arg_0) native "Blink_Setter_Element_className";
+
+  clientHeight_Getter_(mthis) native "Blink_Getter_Element_clientHeight";
+
+  clientLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "clientLeft");
+
+  clientTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "clientTop");
+
+  clientWidth_Getter_(mthis) native "Blink_Getter_Element_clientWidth";
+
+  computedName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "computedName");
+
+  computedRole_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "computedRole");
+
+  id_Getter_(mthis) native "Blink_Getter_Element_id";
+
+  id_Setter_(mthis, __arg_0) native "Blink_Setter_Element_id";
+
+  innerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "innerHTML");
+
+  innerHTML_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "innerHTML", __arg_0);
+
+  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "localName");
+
+  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "namespaceURI");
+
+  offsetHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "offsetHeight");
+
+  offsetLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "offsetLeft");
+
+  offsetParent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "offsetParent");
+
+  offsetTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "offsetTop");
+
+  offsetWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "offsetWidth");
+
+  onbeforecopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onbeforecopy");
+
+  onbeforecopy_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onbeforecopy", __arg_0);
+
+  onbeforecut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onbeforecut");
+
+  onbeforecut_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onbeforecut", __arg_0);
+
+  onbeforepaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onbeforepaste");
+
+  onbeforepaste_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onbeforepaste", __arg_0);
+
+  oncopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "oncopy");
+
+  oncopy_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "oncopy", __arg_0);
+
+  oncut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "oncut");
+
+  oncut_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "oncut", __arg_0);
+
+  onpaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onpaste");
+
+  onpaste_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onpaste", __arg_0);
+
+  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onsearch");
+
+  onsearch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onsearch", __arg_0);
+
+  onselectstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onselectstart");
+
+  onselectstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onselectstart", __arg_0);
+
+  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "ontouchcancel");
+
+  ontouchcancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "ontouchcancel", __arg_0);
+
+  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "ontouchend");
+
+  ontouchend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "ontouchend", __arg_0);
+
+  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "ontouchmove");
+
+  ontouchmove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "ontouchmove", __arg_0);
+
+  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "ontouchstart");
+
+  ontouchstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "ontouchstart", __arg_0);
+
+  onwebkitfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onwebkitfullscreenchange");
+
+  onwebkitfullscreenchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onwebkitfullscreenchange", __arg_0);
+
+  onwebkitfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onwebkitfullscreenerror");
+
+  onwebkitfullscreenerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onwebkitfullscreenerror", __arg_0);
+
+  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "onwheel");
+
+  onwheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "onwheel", __arg_0);
+
+  outerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "outerHTML");
+
+  outerHTML_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "outerHTML", __arg_0);
+
+  prefix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "prefix");
+
+  scrollHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "scrollHeight");
+
+  scrollLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "scrollLeft");
+
+  scrollLeft_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "scrollLeft", __arg_0);
+
+  scrollTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "scrollTop");
+
+  scrollTop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Element */, "scrollTop", __arg_0);
+
+  scrollWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "scrollWidth");
+
+  shadowRoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Element */, "shadowRoot");
+
+  tagName_Getter_(mthis) native "Blink_Getter_Element_tagName";
+
+  animate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "animate", []);
+
+  animate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "animate", [__arg_0]);
+
+  animate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "animate", [__arg_0, __arg_1]);
+
+  closest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "closest", []);
+
+  closest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "closest", [__arg_0]);
+
+  createShadowRoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "createShadowRoot", []);
+
+  createShadowRoot_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "createShadowRoot", [__arg_0]);
+
+  getAnimations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAnimations", []);
+
+  getAttribute_Callback_0_(mthis) native "Blink_Operation_0_Element_getAttribute";
+
+  getAttribute_Callback_1_(mthis, __arg_0) native "Blink_Operation_Element_getAttribute"; /* __arg_0 */
+
+  getAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAttributeNS", []);
+
+  getAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAttributeNS", [__arg_0]);
+
+  getAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAttributeNS", [__arg_0, __arg_1]);
+
+  getAttributeNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAttributeNode", []);
+
+  getAttributeNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAttributeNode", [__arg_0]);
+
+  getAttributeNodeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAttributeNodeNS", []);
+
+  getAttributeNodeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAttributeNodeNS", [__arg_0]);
+
+  getAttributeNodeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getAttributeNodeNS", [__arg_0, __arg_1]);
+
+  getBoundingClientRect_Callback_0_(mthis) native "Blink_Operation_0_Element_getBoundingClientRect";
+
+  getClientRects_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getClientRects", []);
+
+  getDestinationInsertionPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getDestinationInsertionPoints", []);
+
+  getElementsByClassName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getElementsByClassName", []);
+
+  getElementsByClassName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getElementsByClassName", [__arg_0]);
+
+  getElementsByTagName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getElementsByTagName", []);
+
+  getElementsByTagName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getElementsByTagName", [__arg_0]);
+
+  getElementsByTagNameNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getElementsByTagNameNS", []);
+
+  getElementsByTagNameNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getElementsByTagNameNS", [__arg_0]);
+
+  getElementsByTagNameNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "getElementsByTagNameNS", [__arg_0, __arg_1]);
+
+  hasAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "hasAttribute", []);
+
+  hasAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "hasAttribute", [__arg_0]);
+
+  hasAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "hasAttributeNS", []);
+
+  hasAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "hasAttributeNS", [__arg_0]);
+
+  hasAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "hasAttributeNS", [__arg_0, __arg_1]);
+
+  hasAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "hasAttributes", []);
+
+  insertAdjacentElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentElement", []);
+
+  insertAdjacentElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentElement", [__arg_0]);
+
+  insertAdjacentElement_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentElement", [__arg_0, __arg_1]);
+
+  insertAdjacentHTML_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentHTML", []);
+
+  insertAdjacentHTML_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentHTML", [__arg_0]);
+
+  insertAdjacentHTML_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentHTML", [__arg_0, __arg_1]);
+
+  insertAdjacentText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentText", []);
+
+  insertAdjacentText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentText", [__arg_0]);
+
+  insertAdjacentText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "insertAdjacentText", [__arg_0, __arg_1]);
+
+  matches_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "matches", []);
+
+  matches_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "matches", [__arg_0]);
+
+  removeAttribute_Callback_0_(mthis) native "Blink_Operation_0_Element_removeAttribute";
+
+  removeAttribute_Callback_1_(mthis, __arg_0) native "Blink_Operation_Element_removeAttribute"; /* __arg_0 */
+
+  removeAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "removeAttributeNS", []);
+
+  removeAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "removeAttributeNS", [__arg_0]);
+
+  removeAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "removeAttributeNS", [__arg_0, __arg_1]);
+
+  removeAttributeNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "removeAttributeNode", []);
+
+  removeAttributeNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "removeAttributeNode", [__arg_0]);
+
+  requestFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "requestFullscreen", []);
+
+  requestPointerLock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "requestPointerLock", []);
+
+  scroll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scroll", []);
+
+  scroll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scroll", [__arg_0]);
+
+  scroll_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scroll", [__arg_0, __arg_1]);
+
+  scrollBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollBy", []);
+
+  scrollBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollBy", [__arg_0]);
+
+  scrollBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollBy", [__arg_0, __arg_1]);
+
+  scrollIntoView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollIntoView", []);
+
+  scrollIntoView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollIntoView", [__arg_0]);
+
+  scrollIntoViewIfNeeded_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollIntoViewIfNeeded", []);
+
+  scrollIntoViewIfNeeded_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollIntoViewIfNeeded", [__arg_0]);
+
+  scrollTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollTo", []);
+
+  scrollTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollTo", [__arg_0]);
+
+  scrollTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "scrollTo", [__arg_0, __arg_1]);
+
+  setAttribute_Callback_0_(mthis) native "Blink_Operation_0_Element_setAttribute";
+
+  setAttribute_Callback_1_(mthis, __arg_0) native "Blink_Operation_Element_setAttribute"; /* __arg_0 */
+
+  setAttribute_Callback_2_(mthis, __arg_0, __arg_1) native "Blink_Operation_Element_setAttribute"; /* __arg_0, __arg_1 */
+
+  setAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "setAttributeNS", [__arg_0]);
+
+  setAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "setAttributeNS", [__arg_0, __arg_1]);
+
+  setAttributeNS_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "setAttributeNS", [__arg_0, __arg_1, __arg_2]);
+
+  setAttributeNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "setAttributeNode", []);
+
+  setAttributeNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "setAttributeNode", [__arg_0]);
+
+  setAttributeNodeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "setAttributeNodeNS", []);
+
+  setAttributeNodeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "setAttributeNodeNS", [__arg_0]);
+
+  webkitMatchesSelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "webkitMatchesSelector", []);
+
+  webkitMatchesSelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "webkitMatchesSelector", [__arg_0]);
+
+  webkitRequestFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Element */, "webkitRequestFullScreen", []);
+
+  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ParentNode */, "childElementCount");
+
+  children_Getter_(mthis) native "Blink_Getter_ParentNode_children";
+
+  firstElementChild_Getter_(mthis) native "Blink_Getter_ParentNode_firstElementChild";
+
+  lastElementChild_Getter_(mthis) native "Blink_Getter_ParentNode_lastElementChild";
+
+  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "append", []);
+
+  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "append", [__arg_0]);
+
+  prepend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "prepend", []);
+
+  prepend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "prepend", [__arg_0]);
+
+  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelector", []);
+
+  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelector", [__arg_0]);
+
+  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelectorAll", []);
+
+  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelectorAll", [__arg_0]);
+
+  after_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "after", []);
+
+  after_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "after", [__arg_0]);
+
+  before_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "before", []);
+
+  before_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "before", [__arg_0]);
+
+  remove_Callback_0_(mthis) native "Blink_Operation_0_ChildNode_remove";
+
+  replaceWith_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "replaceWith", []);
+
+  replaceWith_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ChildNode */, "replaceWith", [__arg_0]);
+
+  nextElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NonDocumentTypeChildNode */, "nextElementSibling");
+
+  previousElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NonDocumentTypeChildNode */, "previousElementSibling");
+
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onabort");
+
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onabort", __arg_0);
+
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocomplete");
+
+  onautocomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocomplete", __arg_0);
+
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror");
+
+  onautocompleteerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror", __arg_0);
+
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onblur");
+
+  onblur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onblur", __arg_0);
+
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncancel");
+
+  oncancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncancel", __arg_0);
+
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplay");
+
+  oncanplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplay", __arg_0);
+
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough");
+
+  oncanplaythrough_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough", __arg_0);
 
-  animate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "animate", [__arg_0]);
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onchange");
 
-  animate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "animate", [__arg_0, __arg_1]);
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onchange", __arg_0);
 
-  attributes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attributes");
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclick");
 
-  blur_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blur", []);
+  onclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclick", __arg_0);
 
-  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "childElementCount");
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclose");
 
-  children_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "children");
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclose", __arg_0);
 
-  classList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "classList");
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncontextmenu");
 
-  className_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "className");
+  oncontextmenu_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncontextmenu", __arg_0);
 
-  className_Setter_(mthis, __arg_0) => mthis["className"] = __arg_0;
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncuechange");
 
-  clientHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientHeight");
+  oncuechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncuechange", __arg_0);
 
-  clientLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientLeft");
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondblclick");
 
-  clientTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientTop");
+  ondblclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondblclick", __arg_0);
 
-  clientWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientWidth");
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrag");
 
-  createShadowRoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createShadowRoot", []);
+  ondrag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrag", __arg_0);
 
-  firstElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "firstElementChild");
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragend");
 
-  focus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "focus", []);
+  ondragend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragend", __arg_0);
 
-  getAnimationPlayers_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAnimationPlayers", []);
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragenter");
 
-  getAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAttributeNS", []);
+  ondragenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragenter", __arg_0);
 
-  getAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAttributeNS", [__arg_0]);
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragleave");
 
-  getAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getAttributeNS", [__arg_0, __arg_1]);
+  ondragleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragleave", __arg_0);
 
-  getAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAttribute", []);
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragover");
 
-  getAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAttribute", [__arg_0]);
+  ondragover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragover", __arg_0);
 
-  getBoundingClientRect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBoundingClientRect", []);
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragstart");
 
-  getClientRects_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getClientRects", []);
+  ondragstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragstart", __arg_0);
 
-  getDestinationInsertionPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDestinationInsertionPoints", []);
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrop");
 
-  getElementsByClassName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", []);
+  ondrop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrop", __arg_0);
 
-  getElementsByClassName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", [__arg_0]);
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondurationchange");
 
-  getElementsByTagName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", []);
+  ondurationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondurationchange", __arg_0);
 
-  getElementsByTagName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", [__arg_0]);
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onemptied");
 
-  hasAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasAttributeNS", []);
+  onemptied_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onemptied", __arg_0);
 
-  hasAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasAttributeNS", [__arg_0]);
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onended");
 
-  hasAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "hasAttributeNS", [__arg_0, __arg_1]);
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onended", __arg_0);
 
-  hasAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasAttribute", []);
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onerror");
 
-  hasAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasAttribute", [__arg_0]);
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onerror", __arg_0);
 
-  hasAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasAttributes", []);
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onfocus");
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  onfocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onfocus", __arg_0);
 
-  id_Setter_(mthis, __arg_0) => mthis["id"] = __arg_0;
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninput");
 
-  innerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerHTML");
+  oninput_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninput", __arg_0);
 
-  innerHTML_Setter_(mthis, __arg_0) => mthis["innerHTML"] = __arg_0;
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninvalid");
 
-  insertAdjacentElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentElement", []);
+  oninvalid_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninvalid", __arg_0);
 
-  insertAdjacentElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentElement", [__arg_0]);
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeydown");
 
-  insertAdjacentElement_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentElement", [__arg_0, __arg_1]);
+  onkeydown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeydown", __arg_0);
 
-  insertAdjacentHTML_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentHTML", []);
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeypress");
 
-  insertAdjacentHTML_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentHTML", [__arg_0]);
+  onkeypress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeypress", __arg_0);
 
-  insertAdjacentHTML_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentHTML", [__arg_0, __arg_1]);
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeyup");
 
-  insertAdjacentText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentText", []);
+  onkeyup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeyup", __arg_0);
 
-  insertAdjacentText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentText", [__arg_0]);
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onload");
 
-  insertAdjacentText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentText", [__arg_0, __arg_1]);
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onload", __arg_0);
 
-  lastElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastElementChild");
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadeddata");
 
-  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localName");
+  onloadeddata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadeddata", __arg_0);
 
-  matches_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matches", []);
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata");
 
-  matches_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matches", [__arg_0]);
+  onloadedmetadata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata", __arg_0);
 
-  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "namespaceURI");
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadstart");
 
-  nextElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nextElementSibling");
+  onloadstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadstart", __arg_0);
 
-  offsetHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetHeight");
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousedown");
 
-  offsetLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetLeft");
+  onmousedown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousedown", __arg_0);
 
-  offsetParent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetParent");
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseenter");
 
-  offsetTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetTop");
+  onmouseenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseenter", __arg_0);
 
-  offsetWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetWidth");
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseleave");
 
-  onbeforecopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforecopy");
+  onmouseleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseleave", __arg_0);
 
-  onbeforecopy_Setter_(mthis, __arg_0) => mthis["onbeforecopy"] = __arg_0;
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousemove");
 
-  onbeforecut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforecut");
+  onmousemove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousemove", __arg_0);
 
-  onbeforecut_Setter_(mthis, __arg_0) => mthis["onbeforecut"] = __arg_0;
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseout");
 
-  onbeforepaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforepaste");
+  onmouseout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseout", __arg_0);
 
-  onbeforepaste_Setter_(mthis, __arg_0) => mthis["onbeforepaste"] = __arg_0;
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseover");
 
-  oncopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncopy");
+  onmouseover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseover", __arg_0);
 
-  oncopy_Setter_(mthis, __arg_0) => mthis["oncopy"] = __arg_0;
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseup");
 
-  oncut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncut");
+  onmouseup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseup", __arg_0);
 
-  oncut_Setter_(mthis, __arg_0) => mthis["oncut"] = __arg_0;
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousewheel");
 
-  onpaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpaste");
+  onmousewheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousewheel", __arg_0);
 
-  onpaste_Setter_(mthis, __arg_0) => mthis["onpaste"] = __arg_0;
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpause");
 
-  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsearch");
+  onpause_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpause", __arg_0);
 
-  onsearch_Setter_(mthis, __arg_0) => mthis["onsearch"] = __arg_0;
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplay");
 
-  onselectstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselectstart");
+  onplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplay", __arg_0);
 
-  onselectstart_Setter_(mthis, __arg_0) => mthis["onselectstart"] = __arg_0;
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplaying");
 
-  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchcancel");
+  onplaying_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplaying", __arg_0);
 
-  ontouchcancel_Setter_(mthis, __arg_0) => mthis["ontouchcancel"] = __arg_0;
+  onpointercancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointercancel");
 
-  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchend");
+  onpointercancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointercancel", __arg_0);
 
-  ontouchend_Setter_(mthis, __arg_0) => mthis["ontouchend"] = __arg_0;
+  onpointerdown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerdown");
 
-  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchmove");
+  onpointerdown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerdown", __arg_0);
 
-  ontouchmove_Setter_(mthis, __arg_0) => mthis["ontouchmove"] = __arg_0;
+  onpointerenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerenter");
 
-  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchstart");
+  onpointerenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerenter", __arg_0);
 
-  ontouchstart_Setter_(mthis, __arg_0) => mthis["ontouchstart"] = __arg_0;
+  onpointerleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerleave");
 
-  onwebkitfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitfullscreenchange");
+  onpointerleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerleave", __arg_0);
 
-  onwebkitfullscreenchange_Setter_(mthis, __arg_0) => mthis["onwebkitfullscreenchange"] = __arg_0;
+  onpointermove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointermove");
 
-  onwebkitfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitfullscreenerror");
+  onpointermove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointermove", __arg_0);
 
-  onwebkitfullscreenerror_Setter_(mthis, __arg_0) => mthis["onwebkitfullscreenerror"] = __arg_0;
+  onpointerout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerout");
 
-  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwheel");
+  onpointerout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerout", __arg_0);
 
-  onwheel_Setter_(mthis, __arg_0) => mthis["onwheel"] = __arg_0;
+  onpointerover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerover");
 
-  outerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outerHTML");
+  onpointerover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerover", __arg_0);
 
-  outerHTML_Setter_(mthis, __arg_0) => mthis["outerHTML"] = __arg_0;
+  onpointerup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerup");
 
-  prefix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "prefix");
+  onpointerup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerup", __arg_0);
 
-  prefix_Setter_(mthis, __arg_0) => mthis["prefix"] = __arg_0;
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onprogress");
 
-  previousElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousElementSibling");
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onprogress", __arg_0);
 
-  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", []);
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onratechange");
 
-  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", [__arg_0]);
+  onratechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onratechange", __arg_0);
 
-  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", []);
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onreset");
 
-  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", [__arg_0]);
+  onreset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onreset", __arg_0);
 
-  removeAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeAttributeNS", []);
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onresize");
 
-  removeAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeAttributeNS", [__arg_0]);
+  onresize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onresize", __arg_0);
 
-  removeAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeAttributeNS", [__arg_0, __arg_1]);
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onscroll");
 
-  removeAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeAttribute", []);
+  onscroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onscroll", __arg_0);
 
-  removeAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeAttribute", [__arg_0]);
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeked");
 
-  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
+  onseeked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeked", __arg_0);
 
-  requestFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestFullscreen", []);
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeking");
 
-  requestPointerLock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestPointerLock", []);
+  onseeking_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeking", __arg_0);
 
-  scrollHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollHeight");
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onselect");
 
-  scrollIntoViewIfNeeded_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollIntoViewIfNeeded", []);
+  onselect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onselect", __arg_0);
 
-  scrollIntoViewIfNeeded_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollIntoViewIfNeeded", [__arg_0]);
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onshow");
 
-  scrollIntoView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollIntoView", []);
+  onshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onshow", __arg_0);
 
-  scrollIntoView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollIntoView", [__arg_0]);
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onstalled");
 
-  scrollLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollLeft");
+  onstalled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onstalled", __arg_0);
 
-  scrollLeft_Setter_(mthis, __arg_0) => mthis["scrollLeft"] = __arg_0;
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsubmit");
 
-  scrollTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollTop");
+  onsubmit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsubmit", __arg_0);
 
-  scrollTop_Setter_(mthis, __arg_0) => mthis["scrollTop"] = __arg_0;
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsuspend");
 
-  scrollWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollWidth");
+  onsuspend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsuspend", __arg_0);
 
-  setAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setAttributeNS", [__arg_0]);
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontimeupdate");
 
-  setAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setAttributeNS", [__arg_0, __arg_1]);
+  ontimeupdate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontimeupdate", __arg_0);
 
-  setAttributeNS_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setAttributeNS", [__arg_0, __arg_1, __arg_2]);
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontoggle");
 
-  setAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setAttribute", []);
+  ontoggle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontoggle", __arg_0);
 
-  setAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setAttribute", [__arg_0]);
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onvolumechange");
 
-  setAttribute_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setAttribute", [__arg_0, __arg_1]);
+  onvolumechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onvolumechange", __arg_0);
 
-  shadowRoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowRoot");
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onwaiting");
 
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
+  onwaiting_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onwaiting", __arg_0);
 
-  tagName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tagName");
+}
 
-  webkitRequestFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFullScreen", []);
+class BlinkEntriesCallback {
+  static final instance = new BlinkEntriesCallback();
 
-  webkitRequestFullScreen_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFullScreen", [__arg_0]);
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EntriesCallback */, "handleEvent", []);
 
-  webkitRequestFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFullscreen", []);
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* EntriesCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkEntry {
   static final instance = new BlinkEntry();
 
-  copyTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", []);
+  filesystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Entry */, "filesystem");
 
-  copyTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0]);
+  fullPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Entry */, "fullPath");
 
-  copyTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0, __arg_1]);
+  isDirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Entry */, "isDirectory");
 
-  copyTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0, __arg_1, __arg_2]);
+  isFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Entry */, "isFile");
 
-  copyTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Entry */, "name");
 
-  filesystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filesystem");
+  copyTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "copyTo", []);
 
-  fullPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fullPath");
+  copyTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "copyTo", [__arg_0]);
 
-  getMetadata_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getMetadata", []);
+  copyTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "copyTo", [__arg_0, __arg_1]);
 
-  getMetadata_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getMetadata", [__arg_0]);
+  copyTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "copyTo", [__arg_0, __arg_1, __arg_2]);
 
-  getMetadata_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getMetadata", [__arg_0, __arg_1]);
+  copyTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "copyTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  getParent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getParent", []);
+  getMetadata_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "getMetadata", []);
 
-  getParent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getParent", [__arg_0]);
+  getMetadata_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "getMetadata", [__arg_0]);
 
-  getParent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getParent", [__arg_0, __arg_1]);
+  getMetadata_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "getMetadata", [__arg_0, __arg_1]);
 
-  isDirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isDirectory");
+  getParent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "getParent", []);
 
-  isFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isFile");
+  getParent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "getParent", [__arg_0]);
 
-  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
+  getParent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "getParent", [__arg_0, __arg_1]);
 
-  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "moveTo", []);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "moveTo", [__arg_0]);
 
-  moveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1, __arg_2]);
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "moveTo", [__arg_0, __arg_1]);
 
-  moveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  moveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "moveTo", [__arg_0, __arg_1, __arg_2]);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  moveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "moveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "remove", []);
 
-  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0]);
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "remove", [__arg_0]);
 
-  remove_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0, __arg_1]);
+  remove_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "remove", [__arg_0, __arg_1]);
 
-  toURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toURL", []);
+  toURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Entry */, "toURL", []);
+
+}
+
+class BlinkEntryCallback {
+  static final instance = new BlinkEntryCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EntryCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* EntryCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkEntrySync {
   static final instance = new BlinkEntrySync();
 
-  copyTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", []);
+  filesystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EntrySync */, "filesystem");
 
-  copyTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0]);
+  fullPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EntrySync */, "fullPath");
 
-  copyTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0, __arg_1]);
+  isDirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EntrySync */, "isDirectory");
 
-  filesystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filesystem");
+  isFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EntrySync */, "isFile");
 
-  fullPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fullPath");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EntrySync */, "name");
 
-  getMetadata_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getMetadata", []);
+  copyTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "copyTo", []);
 
-  getParent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getParent", []);
+  copyTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "copyTo", [__arg_0]);
 
-  isDirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isDirectory");
+  copyTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "copyTo", [__arg_0, __arg_1]);
 
-  isFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isFile");
+  getMetadata_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "getMetadata", []);
 
-  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
+  getParent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "getParent", []);
 
-  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "moveTo", []);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "moveTo", [__arg_0]);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "moveTo", [__arg_0, __arg_1]);
 
-  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "remove", []);
 
-  toURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toURL", []);
+  toURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EntrySync */, "toURL", []);
+
+}
+
+class BlinkErrorCallback {
+  static final instance = new BlinkErrorCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ErrorCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ErrorCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkErrorEvent extends BlinkEvent {
   static final instance = new BlinkErrorEvent();
 
-  colno_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "colno");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("ErrorEvent");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ErrorEvent"), [__arg_0, __arg_1]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("ErrorEvent", [__arg_0]);
 
-  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("ErrorEvent", [__arg_0, __arg_1]);
 
-  filename_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filename");
+  colno_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ErrorEvent */, "colno");
 
-  lineno_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineno");
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ErrorEvent */, "error");
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  filename_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ErrorEvent */, "filename");
+
+  lineno_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ErrorEvent */, "lineno");
+
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ErrorEvent */, "message");
 
 }
 
 class BlinkEvent {
   static final instance = new BlinkEvent();
 
-  bubbles_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bubbles");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Event");
 
-  cancelBubble_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cancelBubble");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Event", [__arg_0]);
 
-  cancelBubble_Setter_(mthis, __arg_0) => mthis["cancelBubble"] = __arg_0;
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("Event", [__arg_0, __arg_1]);
 
-  cancelable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cancelable");
+  bubbles_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "bubbles");
 
-  clipboardData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clipboardData");
+  cancelBubble_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "cancelBubble");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Event"), [__arg_0, __arg_1]);
+  cancelBubble_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Event */, "cancelBubble", __arg_0);
 
-  currentTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTarget");
+  cancelable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "cancelable");
 
-  defaultPrevented_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultPrevented");
+  currentTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "currentTarget");
 
-  eventPhase_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "eventPhase");
+  defaultPrevented_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "defaultPrevented");
 
-  initEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initEvent", []);
+  eventPhase_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "eventPhase");
 
-  initEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initEvent", [__arg_0]);
+  path_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "path");
 
-  initEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initEvent", [__arg_0, __arg_1]);
+  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "returnValue");
 
-  initEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initEvent", [__arg_0, __arg_1, __arg_2]);
+  returnValue_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Event */, "returnValue", __arg_0);
 
-  path_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "path");
+  srcElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "srcElement");
 
-  preventDefault_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "preventDefault", []);
+  target_Getter_(mthis) native "Blink_Getter_Event_target";
 
-  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "returnValue");
+  timeStamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "timeStamp");
 
-  returnValue_Setter_(mthis, __arg_0) => mthis["returnValue"] = __arg_0;
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Event */, "type");
 
-  stopImmediatePropagation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stopImmediatePropagation", []);
+  initEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Event */, "initEvent", [__arg_0]);
 
-  stopPropagation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stopPropagation", []);
+  initEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Event */, "initEvent", [__arg_0, __arg_1]);
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  initEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Event */, "initEvent", [__arg_0, __arg_1, __arg_2]);
 
-  timeStamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timeStamp");
+  preventDefault_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Event */, "preventDefault", []);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  stopImmediatePropagation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Event */, "stopImmediatePropagation", []);
+
+  stopPropagation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Event */, "stopPropagation", []);
+
+}
+
+class BlinkEventListener {
+  static final instance = new BlinkEventListener();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EventListener */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* EventListener */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkEventSource extends BlinkEventTarget {
   static final instance = new BlinkEventSource();
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("EventSource");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "EventSource"), []);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("EventSource", [__arg_0]);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "EventSource"), [__arg_0]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("EventSource", [__arg_0, __arg_1]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "EventSource"), [__arg_0, __arg_1]);
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EventSource */, "onerror");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* EventSource */, "onerror", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EventSource */, "onmessage");
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* EventSource */, "onmessage", __arg_0);
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EventSource */, "onopen");
 
-  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onopen");
+  onopen_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* EventSource */, "onopen", __arg_0);
 
-  onopen_Setter_(mthis, __arg_0) => mthis["onopen"] = __arg_0;
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EventSource */, "readyState");
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EventSource */, "url");
 
-  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
+  withCredentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* EventSource */, "withCredentials");
 
-  withCredentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "withCredentials");
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EventSource */, "close", []);
 
 }
 
 class BlinkEventTarget {
   static final instance = new BlinkEventTarget();
 
-  addEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addEventListener", []);
+  addEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "addEventListener", []);
 
-  addEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addEventListener", [__arg_0]);
+  addEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "addEventListener", [__arg_0]);
 
-  addEventListener_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addEventListener", [__arg_0, __arg_1]);
+  addEventListener_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "addEventListener", [__arg_0, __arg_1]);
 
-  addEventListener_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "addEventListener", [__arg_0, __arg_1, __arg_2]);
+  addEventListener_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "addEventListener", [__arg_0, __arg_1, __arg_2]);
 
-  dispatchEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "dispatchEvent", []);
+  dispatchEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "dispatchEvent", []);
 
-  dispatchEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "dispatchEvent", [__arg_0]);
+  dispatchEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "dispatchEvent", [__arg_0]);
 
-  removeEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeEventListener", []);
+  removeEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "removeEventListener", []);
 
-  removeEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeEventListener", [__arg_0]);
+  removeEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "removeEventListener", [__arg_0]);
 
-  removeEventListener_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeEventListener", [__arg_0, __arg_1]);
+  removeEventListener_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "removeEventListener", [__arg_0, __arg_1]);
 
-  removeEventListener_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "removeEventListener", [__arg_0, __arg_1, __arg_2]);
+  removeEventListener_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* EventTarget */, "removeEventListener", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkExtendableEvent extends BlinkEvent {
   static final instance = new BlinkExtendableEvent();
 
-  waitUntil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "waitUntil", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("ExtendableEvent");
 
-  waitUntil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "waitUntil", [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("ExtendableEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("ExtendableEvent", [__arg_0, __arg_1]);
+
+  waitUntil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ExtendableEvent */, "waitUntil", []);
+
+  waitUntil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ExtendableEvent */, "waitUntil", [__arg_0]);
 
 }
 
 class BlinkFederatedCredential extends BlinkCredential {
   static final instance = new BlinkFederatedCredential();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FederatedCredential"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("FederatedCredential");
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FederatedCredential"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("FederatedCredential", [__arg_0]);
 
-  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FederatedCredential"), [__arg_0, __arg_1, __arg_2, __arg_3]);
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FederatedCredential */, "protocol");
 
-  federation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "federation");
+  provider_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FederatedCredential */, "provider");
 
 }
 
-class BlinkFetchEvent extends BlinkEvent {
+class BlinkFetchEvent extends BlinkExtendableEvent {
   static final instance = new BlinkFetchEvent();
 
-  isReload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isReload");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("FetchEvent");
 
-  request_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "request");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("FetchEvent", [__arg_0]);
 
-  respondWith_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "respondWith", []);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("FetchEvent", [__arg_0, __arg_1]);
 
-  respondWith_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "respondWith", [__arg_0]);
+  isReload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FetchEvent */, "isReload");
+
+  request_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FetchEvent */, "request");
+
+  respondWith_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FetchEvent */, "respondWith", []);
+
+  respondWith_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FetchEvent */, "respondWith", [__arg_0]);
 
 }
 
 class BlinkFile extends BlinkBlob {
   static final instance = new BlinkFile();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "File"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("File");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "File"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("File", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "File"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("File", [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "File"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("File", [__arg_0, __arg_1, __arg_2]);
 
-  lastModifiedDate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastModifiedDate");
+  lastModified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* File */, "lastModified");
 
-  lastModified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastModified");
+  lastModifiedDate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* File */, "lastModifiedDate");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* File */, "name");
 
-  webkitRelativePath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitRelativePath");
+  webkitRelativePath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* File */, "webkitRelativePath");
+
+}
+
+class BlinkFileCallback {
+  static final instance = new BlinkFileCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkFileEntry extends BlinkEntry {
   static final instance = new BlinkFileEntry();
 
-  createWriter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createWriter", []);
+  createWriter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileEntry */, "createWriter", []);
 
-  createWriter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createWriter", [__arg_0]);
+  createWriter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileEntry */, "createWriter", [__arg_0]);
 
-  createWriter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createWriter", [__arg_0, __arg_1]);
+  createWriter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FileEntry */, "createWriter", [__arg_0, __arg_1]);
 
-  file_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "file", []);
+  file_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileEntry */, "file", []);
 
-  file_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "file", [__arg_0]);
+  file_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileEntry */, "file", [__arg_0]);
 
-  file_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "file", [__arg_0, __arg_1]);
+  file_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FileEntry */, "file", [__arg_0, __arg_1]);
 
 }
 
 class BlinkFileEntrySync extends BlinkEntrySync {
   static final instance = new BlinkFileEntrySync();
 
-  createWriter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createWriter", []);
+  createWriter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileEntrySync */, "createWriter", []);
 
-  file_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "file", []);
+  file_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileEntrySync */, "file", []);
 
 }
 
 class BlinkFileError extends BlinkDOMError {
   static final instance = new BlinkFileError();
 
-  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileError */, "code");
 
 }
 
 class BlinkFileList {
   static final instance = new BlinkFileList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileList */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileList */, "item", [__arg_0]);
 
 }
 
 class BlinkFileReader extends BlinkEventTarget {
   static final instance = new BlinkFileReader();
 
-  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("FileReader");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FileReader"), []);
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "error");
 
-  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "onabort");
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileReader */, "onabort", __arg_0);
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "onerror");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileReader */, "onerror", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "onload");
 
-  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileReader */, "onload", __arg_0);
 
-  onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
+  onloadend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "onloadend");
 
-  onloadend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadend");
+  onloadend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileReader */, "onloadend", __arg_0);
 
-  onloadend_Setter_(mthis, __arg_0) => mthis["onloadend"] = __arg_0;
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "onloadstart");
 
-  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
+  onloadstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileReader */, "onloadstart", __arg_0);
 
-  onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "onprogress");
 
-  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileReader */, "onprogress", __arg_0);
 
-  onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "readyState");
 
-  readAsArrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsArrayBuffer", []);
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileReader */, "result");
 
-  readAsArrayBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsArrayBuffer", [__arg_0]);
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "abort", []);
 
-  readAsBinaryString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsBinaryString", []);
+  readAsArrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsArrayBuffer", []);
 
-  readAsBinaryString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsBinaryString", [__arg_0]);
+  readAsArrayBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsArrayBuffer", [__arg_0]);
 
-  readAsDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsDataURL", []);
+  readAsBinaryString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsBinaryString", []);
 
-  readAsDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsDataURL", [__arg_0]);
+  readAsBinaryString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsBinaryString", [__arg_0]);
 
-  readAsText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", []);
+  readAsDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsDataURL", []);
 
-  readAsText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", [__arg_0]);
+  readAsDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsDataURL", [__arg_0]);
 
-  readAsText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", [__arg_0, __arg_1]);
+  readAsText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsText", []);
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  readAsText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsText", [__arg_0]);
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  readAsText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FileReader */, "readAsText", [__arg_0, __arg_1]);
 
 }
 
 class BlinkFileReaderSync {
   static final instance = new BlinkFileReaderSync();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FileReaderSync"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("FileReaderSync");
 
-  readAsArrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsArrayBuffer", []);
+  readAsArrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsArrayBuffer", []);
 
-  readAsArrayBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsArrayBuffer", [__arg_0]);
+  readAsArrayBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsArrayBuffer", [__arg_0]);
 
-  readAsBinaryString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsBinaryString", []);
+  readAsBinaryString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsBinaryString", []);
 
-  readAsBinaryString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsBinaryString", [__arg_0]);
+  readAsBinaryString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsBinaryString", [__arg_0]);
 
-  readAsDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsDataURL", []);
+  readAsDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsDataURL", []);
 
-  readAsDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsDataURL", [__arg_0]);
+  readAsDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsDataURL", [__arg_0]);
 
-  readAsText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", []);
+  readAsText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsText", []);
 
-  readAsText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", [__arg_0]);
+  readAsText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsText", [__arg_0]);
 
-  readAsText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", [__arg_0, __arg_1]);
+  readAsText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FileReaderSync */, "readAsText", [__arg_0, __arg_1]);
+
+}
+
+class BlinkFileSystemCallback {
+  static final instance = new BlinkFileSystemCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileSystemCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileSystemCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkFileWriter extends BlinkEventTarget {
   static final instance = new BlinkFileWriter();
 
-  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "error");
 
-  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "length");
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "onabort");
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileWriter */, "onabort", __arg_0);
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "onerror");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileWriter */, "onerror", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "onprogress");
 
-  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileWriter */, "onprogress", __arg_0);
 
-  onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
+  onwrite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "onwrite");
 
-  onwrite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwrite");
+  onwrite_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileWriter */, "onwrite", __arg_0);
 
-  onwrite_Setter_(mthis, __arg_0) => mthis["onwrite"] = __arg_0;
+  onwriteend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "onwriteend");
 
-  onwriteend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwriteend");
+  onwriteend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileWriter */, "onwriteend", __arg_0);
 
-  onwriteend_Setter_(mthis, __arg_0) => mthis["onwriteend"] = __arg_0;
+  onwritestart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "onwritestart");
 
-  onwritestart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwritestart");
+  onwritestart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FileWriter */, "onwritestart", __arg_0);
 
-  onwritestart_Setter_(mthis, __arg_0) => mthis["onwritestart"] = __arg_0;
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "position");
 
-  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriter */, "readyState");
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileWriter */, "abort", []);
 
-  seek_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "seek", []);
+  seek_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileWriter */, "seek", []);
 
-  seek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "seek", [__arg_0]);
+  seek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileWriter */, "seek", [__arg_0]);
 
-  truncate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "truncate", []);
+  truncate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileWriter */, "truncate", []);
 
-  truncate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "truncate", [__arg_0]);
+  truncate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileWriter */, "truncate", [__arg_0]);
 
-  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "write", []);
+  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileWriter */, "write", []);
 
-  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "write", [__arg_0]);
+  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileWriter */, "write", [__arg_0]);
+
+}
+
+class BlinkFileWriterCallback {
+  static final instance = new BlinkFileWriterCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileWriterCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileWriterCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkFileWriterSync {
   static final instance = new BlinkFileWriterSync();
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriterSync */, "length");
 
-  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FileWriterSync */, "position");
 
-  seek_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "seek", []);
+  seek_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileWriterSync */, "seek", []);
 
-  seek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "seek", [__arg_0]);
+  seek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileWriterSync */, "seek", [__arg_0]);
 
-  truncate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "truncate", []);
+  truncate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileWriterSync */, "truncate", []);
 
-  truncate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "truncate", [__arg_0]);
+  truncate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileWriterSync */, "truncate", [__arg_0]);
 
-  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "write", []);
+  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FileWriterSync */, "write", []);
 
-  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "write", [__arg_0]);
+  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FileWriterSync */, "write", [__arg_0]);
+
+}
+
+class BlinkFloat32Array extends BlinkArrayBufferView {
+  static final instance = new BlinkFloat32Array();
+
+}
+
+class BlinkFloat64Array extends BlinkArrayBufferView {
+  static final instance = new BlinkFloat64Array();
 
 }
 
 class BlinkFocusEvent extends BlinkUIEvent {
   static final instance = new BlinkFocusEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FocusEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("FocusEvent");
 
-  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "relatedTarget");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("FocusEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("FocusEvent", [__arg_0, __arg_1]);
+
+  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FocusEvent */, "relatedTarget");
 
 }
 
 class BlinkFontFace {
   static final instance = new BlinkFontFace();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FontFace"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("FontFace");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FontFace"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("FontFace", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FontFace"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("FontFace", [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FontFace"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("FontFace", [__arg_0, __arg_1, __arg_2]);
 
-  family_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "family");
+  family_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "family");
 
-  family_Setter_(mthis, __arg_0) => mthis["family"] = __arg_0;
+  family_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFace */, "family", __arg_0);
 
-  featureSettings_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "featureSettings");
+  featureSettings_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "featureSettings");
 
-  featureSettings_Setter_(mthis, __arg_0) => mthis["featureSettings"] = __arg_0;
+  featureSettings_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFace */, "featureSettings", __arg_0);
 
-  load_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "load", []);
+  loaded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "loaded");
 
-  loaded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loaded");
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "status");
 
-  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
+  stretch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "stretch");
 
-  stretch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stretch");
+  stretch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFace */, "stretch", __arg_0);
 
-  stretch_Setter_(mthis, __arg_0) => mthis["stretch"] = __arg_0;
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "style");
 
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
+  style_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFace */, "style", __arg_0);
 
-  style_Setter_(mthis, __arg_0) => mthis["style"] = __arg_0;
+  unicodeRange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "unicodeRange");
 
-  unicodeRange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unicodeRange");
+  unicodeRange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFace */, "unicodeRange", __arg_0);
 
-  unicodeRange_Setter_(mthis, __arg_0) => mthis["unicodeRange"] = __arg_0;
+  variant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "variant");
 
-  variant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "variant");
+  variant_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFace */, "variant", __arg_0);
 
-  variant_Setter_(mthis, __arg_0) => mthis["variant"] = __arg_0;
+  weight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFace */, "weight");
 
-  weight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "weight");
+  weight_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFace */, "weight", __arg_0);
 
-  weight_Setter_(mthis, __arg_0) => mthis["weight"] = __arg_0;
+  load_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FontFace */, "load", []);
 
 }
 
 class BlinkFontFaceSet extends BlinkEventTarget {
   static final instance = new BlinkFontFaceSet();
 
-  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
+  onloading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFaceSet */, "onloading");
 
-  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
+  onloading_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFaceSet */, "onloading", __arg_0);
 
-  check_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "check", []);
+  onloadingdone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFaceSet */, "onloadingdone");
 
-  check_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "check", [__arg_0]);
+  onloadingdone_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFaceSet */, "onloadingdone", __arg_0);
 
-  check_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "check", [__arg_0, __arg_1]);
+  onloadingerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFaceSet */, "onloadingerror");
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  onloadingerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* FontFaceSet */, "onloadingerror", __arg_0);
 
-  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
+  ready_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFaceSet */, "ready");
 
-  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFaceSet */, "size");
 
-  forEach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "forEach", []);
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFaceSet */, "status");
 
-  forEach_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "forEach", [__arg_0]);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "add", []);
 
-  forEach_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "forEach", [__arg_0, __arg_1]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "add", [__arg_0]);
 
-  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
+  check_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "check", []);
 
-  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
+  check_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "check", [__arg_0]);
 
-  onloading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloading");
+  check_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "check", [__arg_0, __arg_1]);
 
-  onloading_Setter_(mthis, __arg_0) => mthis["onloading"] = __arg_0;
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "clear", []);
 
-  onloadingdone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadingdone");
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "delete", []);
 
-  onloadingdone_Setter_(mthis, __arg_0) => mthis["onloadingdone"] = __arg_0;
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "delete", [__arg_0]);
 
-  onloadingerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadingerror");
+  forEach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "forEach", []);
 
-  onloadingerror_Setter_(mthis, __arg_0) => mthis["onloadingerror"] = __arg_0;
+  forEach_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "forEach", [__arg_0]);
 
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
+  forEach_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "forEach", [__arg_0, __arg_1]);
 
-  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
+  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "has", []);
+
+  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "has", [__arg_0]);
+
+  load_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "load", []);
+
+  load_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "load", [__arg_0]);
+
+  load_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSet */, "load", [__arg_0, __arg_1]);
+
+}
+
+class BlinkFontFaceSetForEachCallback {
+  static final instance = new BlinkFontFaceSetForEachCallback();
+
+  handleItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSetForEachCallback */, "handleItem", [__arg_0]);
+
+  handleItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSetForEachCallback */, "handleItem", [__arg_0, __arg_1]);
+
+  handleItem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* FontFaceSetForEachCallback */, "handleItem", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkFontFaceSetLoadEvent extends BlinkEvent {
   static final instance = new BlinkFontFaceSetLoadEvent();
 
-  fontfaces_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fontfaces");
+  fontfaces_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* FontFaceSetLoadEvent */, "fontfaces");
 
 }
 
 class BlinkFormData {
   static final instance = new BlinkFormData();
 
-  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "append", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("FormData");
 
-  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("FormData", [__arg_0]);
 
-  append_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0, __arg_1]);
+  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "append", []);
 
-  append_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0, __arg_1, __arg_2]);
+  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "append", [__arg_0]);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FormData"), []);
+  append_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "append", [__arg_0, __arg_1]);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FormData"), [__arg_0]);
+  append_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "append", [__arg_0, __arg_1, __arg_2]);
+
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "delete", []);
+
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "delete", [__arg_0]);
+
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "get", []);
+
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "get", [__arg_0]);
+
+  getAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "getAll", []);
+
+  getAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "getAll", [__arg_0]);
+
+  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "has", []);
+
+  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "has", [__arg_0]);
+
+  set_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "set", []);
+
+  set_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "set", [__arg_0]);
+
+  set_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "set", [__arg_0, __arg_1]);
+
+  set_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* FormData */, "set", [__arg_0, __arg_1, __arg_2]);
+
+}
+
+class BlinkFrameRequestCallback {
+  static final instance = new BlinkFrameRequestCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* FrameRequestCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* FrameRequestCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkGainNode extends BlinkAudioNode {
   static final instance = new BlinkGainNode();
 
-  gain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gain");
+  gain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GainNode */, "gain");
 
 }
 
 class BlinkGamepad {
   static final instance = new BlinkGamepad();
 
-  axes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "axes");
+  axes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Gamepad */, "axes");
 
-  connected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connected");
+  buttons_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Gamepad */, "buttons");
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  connected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Gamepad */, "connected");
 
-  index_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "index");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Gamepad */, "id");
 
-  mapping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mapping");
+  index_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Gamepad */, "index");
 
-  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestamp");
+  mapping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Gamepad */, "mapping");
+
+  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Gamepad */, "timestamp");
 
 }
 
 class BlinkGamepadButton {
   static final instance = new BlinkGamepadButton();
 
-  pressed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pressed");
+  pressed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GamepadButton */, "pressed");
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GamepadButton */, "value");
 
 }
 
 class BlinkGamepadEvent extends BlinkEvent {
   static final instance = new BlinkGamepadEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "GamepadEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("GamepadEvent");
 
-  gamepad_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gamepad");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("GamepadEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("GamepadEvent", [__arg_0, __arg_1]);
+
+  gamepad_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GamepadEvent */, "gamepad");
 
 }
 
 class BlinkGamepadList {
   static final instance = new BlinkGamepadList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GamepadList */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* GamepadList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* GamepadList */, "item", [__arg_0]);
 
 }
 
 class BlinkGeofencing {
   static final instance = new BlinkGeofencing();
 
-  getRegisteredRegions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRegisteredRegions", []);
+  getRegisteredRegions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Geofencing */, "getRegisteredRegions", []);
 
-  registerRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "registerRegion", []);
+  registerRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Geofencing */, "registerRegion", []);
 
-  registerRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "registerRegion", [__arg_0]);
+  registerRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Geofencing */, "registerRegion", [__arg_0]);
 
-  unregisterRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unregisterRegion", []);
+  unregisterRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Geofencing */, "unregisterRegion", []);
 
-  unregisterRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "unregisterRegion", [__arg_0]);
+  unregisterRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Geofencing */, "unregisterRegion", [__arg_0]);
+
+}
+
+class BlinkGeofencingEvent extends BlinkEvent {
+  static final instance = new BlinkGeofencingEvent();
+
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GeofencingEvent */, "id");
+
+  region_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GeofencingEvent */, "region");
 
 }
 
 class BlinkGeofencingRegion {
   static final instance = new BlinkGeofencingRegion();
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GeofencingRegion */, "id");
 
 }
 
 class BlinkGeolocation {
   static final instance = new BlinkGeolocation();
 
-  clearWatch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearWatch", []);
+  clearWatch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "clearWatch", []);
 
-  clearWatch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearWatch", [__arg_0]);
+  clearWatch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "clearWatch", [__arg_0]);
 
-  getCurrentPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentPosition", []);
+  getCurrentPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "getCurrentPosition", []);
 
-  getCurrentPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentPosition", [__arg_0]);
+  getCurrentPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "getCurrentPosition", [__arg_0]);
 
-  getCurrentPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentPosition", [__arg_0, __arg_1]);
+  getCurrentPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "getCurrentPosition", [__arg_0, __arg_1]);
 
-  getCurrentPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentPosition", [__arg_0, __arg_1, __arg_2]);
+  getCurrentPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "getCurrentPosition", [__arg_0, __arg_1, __arg_2]);
 
-  watchPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "watchPosition", []);
+  watchPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "watchPosition", []);
 
-  watchPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "watchPosition", [__arg_0]);
+  watchPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "watchPosition", [__arg_0]);
 
-  watchPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "watchPosition", [__arg_0, __arg_1]);
+  watchPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "watchPosition", [__arg_0, __arg_1]);
 
-  watchPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "watchPosition", [__arg_0, __arg_1, __arg_2]);
+  watchPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Geolocation */, "watchPosition", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkGeoposition {
   static final instance = new BlinkGeoposition();
 
-  coords_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coords");
+  coords_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Geoposition */, "coords");
 
-  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestamp");
+  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Geoposition */, "timestamp");
+
+}
+
+class BlinkGlobalEventHandlers {
+  static final instance = new BlinkGlobalEventHandlers();
+
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onabort");
+
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onabort", __arg_0);
+
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocomplete");
+
+  onautocomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocomplete", __arg_0);
+
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror");
+
+  onautocompleteerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror", __arg_0);
+
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onblur");
+
+  onblur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onblur", __arg_0);
+
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncancel");
+
+  oncancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncancel", __arg_0);
+
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplay");
+
+  oncanplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplay", __arg_0);
+
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough");
+
+  oncanplaythrough_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough", __arg_0);
+
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onchange");
+
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onchange", __arg_0);
+
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclick");
+
+  onclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclick", __arg_0);
+
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclose");
+
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclose", __arg_0);
+
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncontextmenu");
+
+  oncontextmenu_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncontextmenu", __arg_0);
+
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncuechange");
+
+  oncuechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncuechange", __arg_0);
+
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondblclick");
+
+  ondblclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondblclick", __arg_0);
+
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrag");
+
+  ondrag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrag", __arg_0);
+
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragend");
+
+  ondragend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragend", __arg_0);
+
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragenter");
+
+  ondragenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragenter", __arg_0);
+
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragleave");
+
+  ondragleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragleave", __arg_0);
+
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragover");
+
+  ondragover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragover", __arg_0);
+
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragstart");
+
+  ondragstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragstart", __arg_0);
+
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrop");
+
+  ondrop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrop", __arg_0);
+
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondurationchange");
+
+  ondurationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondurationchange", __arg_0);
+
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onemptied");
+
+  onemptied_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onemptied", __arg_0);
+
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onended");
+
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onended", __arg_0);
+
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onerror");
+
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onerror", __arg_0);
+
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onfocus");
+
+  onfocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onfocus", __arg_0);
+
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninput");
+
+  oninput_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninput", __arg_0);
+
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninvalid");
+
+  oninvalid_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninvalid", __arg_0);
+
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeydown");
+
+  onkeydown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeydown", __arg_0);
+
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeypress");
+
+  onkeypress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeypress", __arg_0);
+
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeyup");
+
+  onkeyup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeyup", __arg_0);
+
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onload");
+
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onload", __arg_0);
+
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadeddata");
+
+  onloadeddata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadeddata", __arg_0);
+
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata");
+
+  onloadedmetadata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata", __arg_0);
+
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadstart");
+
+  onloadstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadstart", __arg_0);
+
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousedown");
+
+  onmousedown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousedown", __arg_0);
+
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseenter");
+
+  onmouseenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseenter", __arg_0);
+
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseleave");
+
+  onmouseleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseleave", __arg_0);
+
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousemove");
+
+  onmousemove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousemove", __arg_0);
+
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseout");
+
+  onmouseout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseout", __arg_0);
+
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseover");
+
+  onmouseover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseover", __arg_0);
+
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseup");
+
+  onmouseup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseup", __arg_0);
+
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousewheel");
+
+  onmousewheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousewheel", __arg_0);
+
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpause");
+
+  onpause_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpause", __arg_0);
+
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplay");
+
+  onplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplay", __arg_0);
+
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplaying");
+
+  onplaying_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplaying", __arg_0);
+
+  onpointercancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointercancel");
+
+  onpointercancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointercancel", __arg_0);
+
+  onpointerdown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerdown");
+
+  onpointerdown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerdown", __arg_0);
+
+  onpointerenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerenter");
+
+  onpointerenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerenter", __arg_0);
+
+  onpointerleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerleave");
+
+  onpointerleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerleave", __arg_0);
+
+  onpointermove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointermove");
+
+  onpointermove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointermove", __arg_0);
+
+  onpointerout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerout");
+
+  onpointerout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerout", __arg_0);
+
+  onpointerover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerover");
+
+  onpointerover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerover", __arg_0);
+
+  onpointerup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerup");
+
+  onpointerup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerup", __arg_0);
+
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onprogress");
+
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onprogress", __arg_0);
+
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onratechange");
+
+  onratechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onratechange", __arg_0);
+
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onreset");
+
+  onreset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onreset", __arg_0);
+
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onresize");
+
+  onresize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onresize", __arg_0);
+
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onscroll");
+
+  onscroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onscroll", __arg_0);
+
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeked");
+
+  onseeked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeked", __arg_0);
+
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeking");
+
+  onseeking_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeking", __arg_0);
+
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onselect");
+
+  onselect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onselect", __arg_0);
+
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onshow");
+
+  onshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onshow", __arg_0);
+
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onstalled");
+
+  onstalled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onstalled", __arg_0);
+
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsubmit");
+
+  onsubmit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsubmit", __arg_0);
+
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsuspend");
+
+  onsuspend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsuspend", __arg_0);
+
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontimeupdate");
+
+  ontimeupdate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontimeupdate", __arg_0);
+
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontoggle");
+
+  ontoggle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontoggle", __arg_0);
+
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onvolumechange");
+
+  onvolumechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onvolumechange", __arg_0);
+
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onwaiting");
+
+  onwaiting_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onwaiting", __arg_0);
+
+}
+
+class BlinkHMDVRDevice extends BlinkVRDevice {
+  static final instance = new BlinkHMDVRDevice();
+
+  getEyeParameters_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HMDVRDevice */, "getEyeParameters", []);
+
+  getEyeParameters_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HMDVRDevice */, "getEyeParameters", [__arg_0]);
+
+  setFieldOfView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HMDVRDevice */, "setFieldOfView", []);
+
+  setFieldOfView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HMDVRDevice */, "setFieldOfView", [__arg_0]);
+
+  setFieldOfView_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HMDVRDevice */, "setFieldOfView", [__arg_0, __arg_1]);
 
 }
 
 class BlinkHTMLAllCollection {
   static final instance = new BlinkHTMLAllCollection();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAllCollection */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLAllCollection */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLAllCollection */, "item", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLAllCollection */, "namedItem", []);
 
-  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
-
-  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLAllCollection */, "namedItem", [__arg_0]);
 
 }
 
 class BlinkHTMLAnchorElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLAnchorElement();
 
-  download_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "download");
+  charset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "charset");
 
-  download_Setter_(mthis, __arg_0) => mthis["download"] = __arg_0;
+  charset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "charset", __arg_0);
 
-  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
+  coords_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "coords");
 
-  hash_Setter_(mthis, __arg_0) => mthis["hash"] = __arg_0;
+  coords_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "coords", __arg_0);
 
-  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
+  download_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "download");
 
-  host_Setter_(mthis, __arg_0) => mthis["host"] = __arg_0;
+  download_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "download", __arg_0);
 
-  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
+  hreflang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "hreflang");
 
-  hostname_Setter_(mthis, __arg_0) => mthis["hostname"] = __arg_0;
+  hreflang_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "hreflang", __arg_0);
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "name");
 
-  href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "name", __arg_0);
 
-  hreflang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hreflang");
+  ping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "ping");
 
-  hreflang_Setter_(mthis, __arg_0) => mthis["hreflang"] = __arg_0;
+  ping_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "ping", __arg_0);
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  rel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "rel");
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  rel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "rel", __arg_0);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  rev_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "rev");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  rev_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "rev", __arg_0);
 
-  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
+  shape_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "shape");
 
-  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "password");
+  shape_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "shape", __arg_0);
 
-  password_Setter_(mthis, __arg_0) => mthis["password"] = __arg_0;
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "target");
 
-  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
+  target_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "target", __arg_0);
 
-  pathname_Setter_(mthis, __arg_0) => mthis["pathname"] = __arg_0;
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "text");
 
-  ping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ping");
+  text_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "text", __arg_0);
 
-  ping_Setter_(mthis, __arg_0) => mthis["ping"] = __arg_0;
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAnchorElement */, "type");
 
-  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAnchorElement */, "type", __arg_0);
 
-  port_Setter_(mthis, __arg_0) => mthis["port"] = __arg_0;
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "hash");
 
-  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
+  hash_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "hash", __arg_0);
 
-  protocol_Setter_(mthis, __arg_0) => mthis["protocol"] = __arg_0;
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "host");
 
-  rel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rel");
+  host_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "host", __arg_0);
 
-  rel_Setter_(mthis, __arg_0) => mthis["rel"] = __arg_0;
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "hostname");
 
-  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
+  hostname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "hostname", __arg_0);
 
-  search_Setter_(mthis, __arg_0) => mthis["search"] = __arg_0;
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "href");
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  href_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "href", __arg_0);
 
-  target_Setter_(mthis, __arg_0) => mthis["target"] = __arg_0;
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "origin");
 
-  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "password");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  password_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "password", __arg_0);
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "pathname");
 
-  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "username");
+  pathname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "pathname", __arg_0);
 
-  username_Setter_(mthis, __arg_0) => mthis["username"] = __arg_0;
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "port");
+
+  port_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "port", __arg_0);
+
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "protocol");
+
+  protocol_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "protocol", __arg_0);
+
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "search");
+
+  search_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "search", __arg_0);
+
+  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "username");
+
+  username_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "username", __arg_0);
+
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* URLUtils */, "toString", []);
 
 }
 
 class BlinkHTMLAppletElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLAppletElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "align");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "align", __arg_0);
+
+  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "alt");
+
+  alt_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "alt", __arg_0);
+
+  archive_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "archive");
+
+  archive_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "archive", __arg_0);
+
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "code");
+
+  code_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "code", __arg_0);
+
+  codeBase_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "codeBase");
+
+  codeBase_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "codeBase", __arg_0);
+
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "height");
+
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "height", __arg_0);
+
+  hspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "hspace");
+
+  hspace_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "hspace", __arg_0);
+
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "name");
+
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "name", __arg_0);
+
+  object_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "object");
+
+  object_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "object", __arg_0);
+
+  vspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "vspace");
+
+  vspace_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "vspace", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAppletElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAppletElement */, "width", __arg_0);
+
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLAppletElement */, "__getter__", [__arg_0]);
+
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLAppletElement */, "__setter__", [__arg_0, __arg_1]);
 
 }
 
 class BlinkHTMLAreaElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLAreaElement();
 
-  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alt");
+  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAreaElement */, "alt");
 
-  alt_Setter_(mthis, __arg_0) => mthis["alt"] = __arg_0;
+  alt_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAreaElement */, "alt", __arg_0);
 
-  coords_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coords");
+  coords_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAreaElement */, "coords");
 
-  coords_Setter_(mthis, __arg_0) => mthis["coords"] = __arg_0;
+  coords_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAreaElement */, "coords", __arg_0);
 
-  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
+  noHref_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAreaElement */, "noHref");
 
-  hash_Setter_(mthis, __arg_0) => mthis["hash"] = __arg_0;
+  noHref_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAreaElement */, "noHref", __arg_0);
 
-  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
+  ping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAreaElement */, "ping");
 
-  host_Setter_(mthis, __arg_0) => mthis["host"] = __arg_0;
+  ping_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAreaElement */, "ping", __arg_0);
 
-  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
+  shape_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAreaElement */, "shape");
 
-  hostname_Setter_(mthis, __arg_0) => mthis["hostname"] = __arg_0;
+  shape_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAreaElement */, "shape", __arg_0);
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLAreaElement */, "target");
 
-  href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
+  target_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLAreaElement */, "target", __arg_0);
 
-  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "hash");
 
-  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "password");
+  hash_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "hash", __arg_0);
 
-  password_Setter_(mthis, __arg_0) => mthis["password"] = __arg_0;
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "host");
 
-  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
+  host_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "host", __arg_0);
 
-  pathname_Setter_(mthis, __arg_0) => mthis["pathname"] = __arg_0;
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "hostname");
 
-  ping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ping");
+  hostname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "hostname", __arg_0);
 
-  ping_Setter_(mthis, __arg_0) => mthis["ping"] = __arg_0;
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "href");
 
-  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
+  href_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "href", __arg_0);
 
-  port_Setter_(mthis, __arg_0) => mthis["port"] = __arg_0;
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "origin");
 
-  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "password");
 
-  protocol_Setter_(mthis, __arg_0) => mthis["protocol"] = __arg_0;
+  password_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "password", __arg_0);
 
-  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "pathname");
 
-  search_Setter_(mthis, __arg_0) => mthis["search"] = __arg_0;
+  pathname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "pathname", __arg_0);
 
-  shape_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shape");
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "port");
 
-  shape_Setter_(mthis, __arg_0) => mthis["shape"] = __arg_0;
+  port_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "port", __arg_0);
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "protocol");
 
-  target_Setter_(mthis, __arg_0) => mthis["target"] = __arg_0;
+  protocol_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "protocol", __arg_0);
 
-  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "search");
 
-  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "username");
+  search_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "search", __arg_0);
 
-  username_Setter_(mthis, __arg_0) => mthis["username"] = __arg_0;
+  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "username");
+
+  username_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "username", __arg_0);
+
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* URLUtils */, "toString", []);
 
 }
 
 class BlinkHTMLAudioElement extends BlinkHTMLMediaElement {
   static final instance = new BlinkHTMLAudioElement();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Audio"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Audio");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Audio"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Audio", [__arg_0]);
 
 }
 
 class BlinkHTMLBRElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLBRElement();
 
+  clear_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBRElement */, "clear");
+
+  clear_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBRElement */, "clear", __arg_0);
+
 }
 
 class BlinkHTMLBaseElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLBaseElement();
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBaseElement */, "href");
 
-  href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
+  href_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBaseElement */, "href", __arg_0);
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBaseElement */, "target");
 
-  target_Setter_(mthis, __arg_0) => mthis["target"] = __arg_0;
+  target_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBaseElement */, "target", __arg_0);
 
 }
 
 class BlinkHTMLBodyElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLBodyElement();
 
-  onbeforeunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforeunload");
+  aLink_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "aLink");
 
-  onbeforeunload_Setter_(mthis, __arg_0) => mthis["onbeforeunload"] = __arg_0;
+  aLink_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "aLink", __arg_0);
 
-  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
+  background_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "background");
 
-  onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
+  background_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "background", __arg_0);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  bgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "bgColor");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  bgColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "bgColor", __arg_0);
 
-  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
+  link_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "link");
 
-  onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
+  link_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "link", __arg_0);
 
-  onhashchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onhashchange");
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "onblur");
 
-  onhashchange_Setter_(mthis, __arg_0) => mthis["onhashchange"] = __arg_0;
+  onblur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "onblur", __arg_0);
 
-  onlanguagechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onlanguagechange");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "onerror");
 
-  onlanguagechange_Setter_(mthis, __arg_0) => mthis["onlanguagechange"] = __arg_0;
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "onerror", __arg_0);
 
-  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "onfocus");
 
-  onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
+  onfocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "onfocus", __arg_0);
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "onload");
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "onload", __arg_0);
 
-  onoffline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onoffline");
+  onorientationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "onorientationchange");
 
-  onoffline_Setter_(mthis, __arg_0) => mthis["onoffline"] = __arg_0;
+  onorientationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "onorientationchange", __arg_0);
 
-  ononline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ononline");
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "onresize");
 
-  ononline_Setter_(mthis, __arg_0) => mthis["ononline"] = __arg_0;
+  onresize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "onresize", __arg_0);
 
-  onorientationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onorientationchange");
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "onscroll");
 
-  onorientationchange_Setter_(mthis, __arg_0) => mthis["onorientationchange"] = __arg_0;
+  onscroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "onscroll", __arg_0);
 
-  onpagehide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpagehide");
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "text");
 
-  onpagehide_Setter_(mthis, __arg_0) => mthis["onpagehide"] = __arg_0;
+  text_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "text", __arg_0);
 
-  onpageshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpageshow");
+  vLink_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLBodyElement */, "vLink");
 
-  onpageshow_Setter_(mthis, __arg_0) => mthis["onpageshow"] = __arg_0;
+  vLink_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLBodyElement */, "vLink", __arg_0);
 
-  onpopstate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpopstate");
+  onbeforeunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onbeforeunload");
 
-  onpopstate_Setter_(mthis, __arg_0) => mthis["onpopstate"] = __arg_0;
+  onbeforeunload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onbeforeunload", __arg_0);
 
-  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
+  onhashchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onhashchange");
 
-  onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
+  onhashchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onhashchange", __arg_0);
 
-  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
+  onlanguagechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onlanguagechange");
 
-  onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
+  onlanguagechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onlanguagechange", __arg_0);
 
-  onstorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstorage");
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onmessage");
 
-  onstorage_Setter_(mthis, __arg_0) => mthis["onstorage"] = __arg_0;
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onmessage", __arg_0);
 
-  onunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onunload");
+  onoffline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onoffline");
 
-  onunload_Setter_(mthis, __arg_0) => mthis["onunload"] = __arg_0;
+  onoffline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onoffline", __arg_0);
+
+  ononline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "ononline");
+
+  ononline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "ononline", __arg_0);
+
+  onpagehide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpagehide");
+
+  onpagehide_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpagehide", __arg_0);
+
+  onpageshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpageshow");
+
+  onpageshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpageshow", __arg_0);
+
+  onpopstate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpopstate");
+
+  onpopstate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpopstate", __arg_0);
+
+  onrejectionhandled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onrejectionhandled");
+
+  onrejectionhandled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onrejectionhandled", __arg_0);
+
+  onstorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onstorage");
+
+  onstorage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onstorage", __arg_0);
+
+  onunhandledrejection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onunhandledrejection");
+
+  onunhandledrejection_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onunhandledrejection", __arg_0);
+
+  onunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onunload");
+
+  onunload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onunload", __arg_0);
 
 }
 
 class BlinkHTMLButtonElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLButtonElement();
 
-  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "autofocus");
 
-  autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
+  autofocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "autofocus", __arg_0);
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "disabled");
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "disabled", __arg_0);
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "form");
 
-  formAction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formAction");
+  formAction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "formAction");
 
-  formAction_Setter_(mthis, __arg_0) => mthis["formAction"] = __arg_0;
+  formAction_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "formAction", __arg_0);
 
-  formEnctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formEnctype");
+  formEnctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "formEnctype");
 
-  formEnctype_Setter_(mthis, __arg_0) => mthis["formEnctype"] = __arg_0;
+  formEnctype_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "formEnctype", __arg_0);
 
-  formMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formMethod");
+  formMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "formMethod");
 
-  formMethod_Setter_(mthis, __arg_0) => mthis["formMethod"] = __arg_0;
+  formMethod_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "formMethod", __arg_0);
 
-  formNoValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formNoValidate");
+  formNoValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "formNoValidate");
 
-  formNoValidate_Setter_(mthis, __arg_0) => mthis["formNoValidate"] = __arg_0;
+  formNoValidate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "formNoValidate", __arg_0);
 
-  formTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formTarget");
+  formTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "formTarget");
 
-  formTarget_Setter_(mthis, __arg_0) => mthis["formTarget"] = __arg_0;
+  formTarget_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "formTarget", __arg_0);
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "labels");
 
-  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "name");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "name", __arg_0);
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "type");
 
-  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "type", __arg_0);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "validationMessage");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "validity");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "value");
 
-  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLButtonElement */, "value", __arg_0);
 
-  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLButtonElement */, "willValidate");
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLButtonElement */, "checkValidity", []);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLButtonElement */, "reportValidity", []);
 
-  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLButtonElement */, "setCustomValidity", []);
+
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLButtonElement */, "setCustomValidity", [__arg_0]);
 
 }
 
 class BlinkHTMLCanvasElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLCanvasElement();
 
-  getContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getContext", []);
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLCanvasElement */, "height");
 
-  getContext_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getContext", [__arg_0]);
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLCanvasElement */, "height", __arg_0);
 
-  getContext_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getContext", [__arg_0, __arg_1]);
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLCanvasElement */, "width");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLCanvasElement */, "width", __arg_0);
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  getContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLCanvasElement */, "getContext", []);
 
-  toDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toDataURL", []);
+  getContext_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLCanvasElement */, "getContext", [__arg_0]);
 
-  toDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "toDataURL", [__arg_0]);
+  getContext_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLCanvasElement */, "getContext", [__arg_0, __arg_1]);
 
-  toDataURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "toDataURL", [__arg_0, __arg_1]);
+  toDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLCanvasElement */, "toDataURL", []);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  toDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLCanvasElement */, "toDataURL", [__arg_0]);
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  toDataURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLCanvasElement */, "toDataURL", [__arg_0, __arg_1]);
 
 }
 
 class BlinkHTMLCollection {
   static final instance = new BlinkHTMLCollection();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) native "Blink_Getter_HTMLCollection_length";
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) native "Blink_Operation_0_HTMLCollection_item";
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) native "Blink_Operation_HTMLCollection_item"; /* __arg_0 */
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLCollection */, "namedItem", []);
 
-  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
-
-  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLCollection */, "namedItem", [__arg_0]);
 
 }
 
 class BlinkHTMLContentElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLContentElement();
 
-  getDistributedNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDistributedNodes", []);
+  select_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLContentElement */, "select");
 
-  select_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "select");
+  select_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLContentElement */, "select", __arg_0);
 
-  select_Setter_(mthis, __arg_0) => mthis["select"] = __arg_0;
+  getDistributedNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLContentElement */, "getDistributedNodes", []);
 
 }
 
 class BlinkHTMLDListElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDListElement();
 
+  compact_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDListElement */, "compact");
+
+  compact_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDListElement */, "compact", __arg_0);
+
 }
 
 class BlinkHTMLDataListElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDataListElement();
 
-  options_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "options");
+  options_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDataListElement */, "options");
 
 }
 
 class BlinkHTMLDetailsElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDetailsElement();
 
-  open_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "open");
+  open_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDetailsElement */, "open");
 
-  open_Setter_(mthis, __arg_0) => mthis["open"] = __arg_0;
+  open_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDetailsElement */, "open", __arg_0);
 
 }
 
 class BlinkHTMLDialogElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDialogElement();
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  open_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDialogElement */, "open");
 
-  close_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "close", [__arg_0]);
+  open_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDialogElement */, "open", __arg_0);
 
-  open_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "open");
+  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDialogElement */, "returnValue");
 
-  open_Setter_(mthis, __arg_0) => mthis["open"] = __arg_0;
+  returnValue_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDialogElement */, "returnValue", __arg_0);
 
-  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "returnValue");
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLDialogElement */, "close", []);
 
-  returnValue_Setter_(mthis, __arg_0) => mthis["returnValue"] = __arg_0;
+  close_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLDialogElement */, "close", [__arg_0]);
 
-  showModal_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "showModal", []);
+  show_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLDialogElement */, "show", []);
 
-  show_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "show", []);
+  showModal_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLDialogElement */, "showModal", []);
 
 }
 
 class BlinkHTMLDirectoryElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDirectoryElement();
 
+  compact_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDirectoryElement */, "compact");
+
+  compact_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDirectoryElement */, "compact", __arg_0);
+
 }
 
 class BlinkHTMLDivElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDivElement();
 
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDivElement */, "align");
+
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDivElement */, "align", __arg_0);
+
 }
 
 class BlinkHTMLDocument extends BlinkDocument {
   static final instance = new BlinkHTMLDocument();
 
-  alinkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alinkColor");
+  alinkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDocument */, "alinkColor");
 
-  alinkColor_Setter_(mthis, __arg_0) => mthis["alinkColor"] = __arg_0;
+  alinkColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDocument */, "alinkColor", __arg_0);
 
-  bgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bgColor");
+  all_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDocument */, "all");
 
-  bgColor_Setter_(mthis, __arg_0) => mthis["bgColor"] = __arg_0;
+  bgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDocument */, "bgColor");
 
-  captureEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "captureEvents", []);
+  bgColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDocument */, "bgColor", __arg_0);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  fgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDocument */, "fgColor");
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  fgColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDocument */, "fgColor", __arg_0);
 
-  compatMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "compatMode");
+  linkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDocument */, "linkColor");
 
-  fgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fgColor");
+  linkColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDocument */, "linkColor", __arg_0);
 
-  fgColor_Setter_(mthis, __arg_0) => mthis["fgColor"] = __arg_0;
+  vlinkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLDocument */, "vlinkColor");
 
-  linkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "linkColor");
+  vlinkColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLDocument */, "vlinkColor", __arg_0);
 
-  linkColor_Setter_(mthis, __arg_0) => mthis["linkColor"] = __arg_0;
+  captureEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLDocument */, "captureEvents", []);
 
-  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "open", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLDocument */, "clear", []);
 
-  releaseEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "releaseEvents", []);
-
-  vlinkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "vlinkColor");
-
-  vlinkColor_Setter_(mthis, __arg_0) => mthis["vlinkColor"] = __arg_0;
-
-  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "write", []);
-
-  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "write", [__arg_0]);
-
-  writeln_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "writeln", []);
-
-  writeln_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "writeln", [__arg_0]);
+  releaseEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLDocument */, "releaseEvents", []);
 
 }
 
 class BlinkHTMLElement extends BlinkElement {
   static final instance = new BlinkHTMLElement();
 
-  accessKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "accessKey");
+  accessKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "accessKey");
 
-  accessKey_Setter_(mthis, __arg_0) => mthis["accessKey"] = __arg_0;
+  accessKey_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "accessKey", __arg_0);
 
-  click_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "click", []);
+  contentEditable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "contentEditable");
 
-  contentEditable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentEditable");
+  contentEditable_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "contentEditable", __arg_0);
 
-  contentEditable_Setter_(mthis, __arg_0) => mthis["contentEditable"] = __arg_0;
+  contextMenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "contextMenu");
 
-  contextMenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contextMenu");
+  contextMenu_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "contextMenu", __arg_0);
 
-  contextMenu_Setter_(mthis, __arg_0) => mthis["contextMenu"] = __arg_0;
+  dataset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "dataset");
 
-  dir_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dir");
+  dir_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "dir");
 
-  dir_Setter_(mthis, __arg_0) => mthis["dir"] = __arg_0;
+  dir_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "dir", __arg_0);
 
-  draggable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "draggable");
+  draggable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "draggable");
 
-  draggable_Setter_(mthis, __arg_0) => mthis["draggable"] = __arg_0;
+  draggable_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "draggable", __arg_0);
 
-  hidden_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hidden");
+  hidden_Getter_(mthis) native "Blink_Getter_HTMLElement_hidden";
 
-  hidden_Setter_(mthis, __arg_0) => mthis["hidden"] = __arg_0;
+  hidden_Setter_(mthis, __arg_0) native "Blink_Setter_HTMLElement_hidden";
 
-  innerText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerText");
+  innerText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "innerText");
 
-  innerText_Setter_(mthis, __arg_0) => mthis["innerText"] = __arg_0;
+  innerText_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "innerText", __arg_0);
 
-  inputMethodContext_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputMethodContext");
+  isContentEditable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "isContentEditable");
 
-  isContentEditable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isContentEditable");
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "lang");
 
-  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
+  lang_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "lang", __arg_0);
 
-  lang_Setter_(mthis, __arg_0) => mthis["lang"] = __arg_0;
+  offsetHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "offsetHeight");
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  offsetLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "offsetLeft");
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  offsetParent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "offsetParent");
 
-  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocomplete");
+  offsetTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "offsetTop");
 
-  onautocomplete_Setter_(mthis, __arg_0) => mthis["onautocomplete"] = __arg_0;
+  offsetWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "offsetWidth");
 
-  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocompleteerror");
+  outerText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "outerText");
 
-  onautocompleteerror_Setter_(mthis, __arg_0) => mthis["onautocompleteerror"] = __arg_0;
+  outerText_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "outerText", __arg_0);
 
-  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
+  spellcheck_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "spellcheck");
 
-  onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
+  spellcheck_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "spellcheck", __arg_0);
 
-  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncancel");
+  style_Getter_(mthis) native "Blink_Getter_HTMLElement_style";
 
-  oncancel_Setter_(mthis, __arg_0) => mthis["oncancel"] = __arg_0;
+  tabIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "tabIndex");
 
-  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplay");
+  tabIndex_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "tabIndex", __arg_0);
 
-  oncanplay_Setter_(mthis, __arg_0) => mthis["oncanplay"] = __arg_0;
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "title");
 
-  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplaythrough");
+  title_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "title", __arg_0);
 
-  oncanplaythrough_Setter_(mthis, __arg_0) => mthis["oncanplaythrough"] = __arg_0;
+  translate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "translate");
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  translate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "translate", __arg_0);
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  webkitdropzone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLElement */, "webkitdropzone");
 
-  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
+  webkitdropzone_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLElement */, "webkitdropzone", __arg_0);
 
-  onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
+  blur_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLElement */, "blur", []);
 
-  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
+  click_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLElement */, "click", []);
 
-  onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
+  focus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLElement */, "focus", []);
 
-  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncontextmenu");
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onabort");
 
-  oncontextmenu_Setter_(mthis, __arg_0) => mthis["oncontextmenu"] = __arg_0;
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onabort", __arg_0);
 
-  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocomplete");
 
-  oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
+  onautocomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocomplete", __arg_0);
 
-  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondblclick");
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror");
 
-  ondblclick_Setter_(mthis, __arg_0) => mthis["ondblclick"] = __arg_0;
+  onautocompleteerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror", __arg_0);
 
-  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrag");
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onblur");
 
-  ondrag_Setter_(mthis, __arg_0) => mthis["ondrag"] = __arg_0;
+  onblur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onblur", __arg_0);
 
-  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragend");
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncancel");
 
-  ondragend_Setter_(mthis, __arg_0) => mthis["ondragend"] = __arg_0;
+  oncancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncancel", __arg_0);
 
-  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragenter");
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplay");
 
-  ondragenter_Setter_(mthis, __arg_0) => mthis["ondragenter"] = __arg_0;
+  oncanplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplay", __arg_0);
 
-  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragleave");
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough");
 
-  ondragleave_Setter_(mthis, __arg_0) => mthis["ondragleave"] = __arg_0;
+  oncanplaythrough_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough", __arg_0);
 
-  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragover");
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onchange");
 
-  ondragover_Setter_(mthis, __arg_0) => mthis["ondragover"] = __arg_0;
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onchange", __arg_0);
 
-  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragstart");
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclick");
 
-  ondragstart_Setter_(mthis, __arg_0) => mthis["ondragstart"] = __arg_0;
+  onclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclick", __arg_0);
 
-  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrop");
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclose");
 
-  ondrop_Setter_(mthis, __arg_0) => mthis["ondrop"] = __arg_0;
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclose", __arg_0);
 
-  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondurationchange");
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncontextmenu");
 
-  ondurationchange_Setter_(mthis, __arg_0) => mthis["ondurationchange"] = __arg_0;
+  oncontextmenu_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncontextmenu", __arg_0);
 
-  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onemptied");
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncuechange");
 
-  onemptied_Setter_(mthis, __arg_0) => mthis["onemptied"] = __arg_0;
+  oncuechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncuechange", __arg_0);
 
-  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondblclick");
 
-  onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
+  ondblclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondblclick", __arg_0);
+
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrag");
+
+  ondrag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrag", __arg_0);
+
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragend");
+
+  ondragend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragend", __arg_0);
+
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragenter");
+
+  ondragenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragenter", __arg_0);
+
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragleave");
+
+  ondragleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragleave", __arg_0);
+
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragover");
+
+  ondragover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragover", __arg_0);
+
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragstart");
+
+  ondragstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragstart", __arg_0);
+
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrop");
+
+  ondrop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrop", __arg_0);
+
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondurationchange");
+
+  ondurationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondurationchange", __arg_0);
+
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onemptied");
+
+  onemptied_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onemptied", __arg_0);
+
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onended");
+
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onended", __arg_0);
+
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onerror");
+
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onerror", __arg_0);
+
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onfocus");
+
+  onfocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onfocus", __arg_0);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninput");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  oninput_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninput", __arg_0);
 
-  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninvalid");
 
-  onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
+  oninvalid_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninvalid", __arg_0);
 
-  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninput");
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeydown");
 
-  oninput_Setter_(mthis, __arg_0) => mthis["oninput"] = __arg_0;
+  onkeydown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeydown", __arg_0);
 
-  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninvalid");
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeypress");
 
-  oninvalid_Setter_(mthis, __arg_0) => mthis["oninvalid"] = __arg_0;
+  onkeypress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeypress", __arg_0);
 
-  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeydown");
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeyup");
 
-  onkeydown_Setter_(mthis, __arg_0) => mthis["onkeydown"] = __arg_0;
+  onkeyup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeyup", __arg_0);
 
-  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeypress");
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onload");
 
-  onkeypress_Setter_(mthis, __arg_0) => mthis["onkeypress"] = __arg_0;
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onload", __arg_0);
 
-  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeyup");
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadeddata");
 
-  onkeyup_Setter_(mthis, __arg_0) => mthis["onkeyup"] = __arg_0;
+  onloadeddata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadeddata", __arg_0);
 
-  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata");
 
-  onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
+  onloadedmetadata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata", __arg_0);
 
-  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadeddata");
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadstart");
 
-  onloadeddata_Setter_(mthis, __arg_0) => mthis["onloadeddata"] = __arg_0;
+  onloadstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadstart", __arg_0);
 
-  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadedmetadata");
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousedown");
 
-  onloadedmetadata_Setter_(mthis, __arg_0) => mthis["onloadedmetadata"] = __arg_0;
+  onmousedown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousedown", __arg_0);
 
-  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseenter");
 
-  onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
+  onmouseenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseenter", __arg_0);
 
-  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousedown");
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseleave");
 
-  onmousedown_Setter_(mthis, __arg_0) => mthis["onmousedown"] = __arg_0;
+  onmouseleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseleave", __arg_0);
 
-  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseenter");
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousemove");
 
-  onmouseenter_Setter_(mthis, __arg_0) => mthis["onmouseenter"] = __arg_0;
+  onmousemove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousemove", __arg_0);
 
-  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseleave");
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseout");
 
-  onmouseleave_Setter_(mthis, __arg_0) => mthis["onmouseleave"] = __arg_0;
+  onmouseout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseout", __arg_0);
 
-  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousemove");
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseover");
 
-  onmousemove_Setter_(mthis, __arg_0) => mthis["onmousemove"] = __arg_0;
+  onmouseover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseover", __arg_0);
 
-  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseout");
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseup");
 
-  onmouseout_Setter_(mthis, __arg_0) => mthis["onmouseout"] = __arg_0;
+  onmouseup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseup", __arg_0);
 
-  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseover");
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousewheel");
 
-  onmouseover_Setter_(mthis, __arg_0) => mthis["onmouseover"] = __arg_0;
+  onmousewheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousewheel", __arg_0);
 
-  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseup");
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpause");
 
-  onmouseup_Setter_(mthis, __arg_0) => mthis["onmouseup"] = __arg_0;
+  onpause_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpause", __arg_0);
 
-  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousewheel");
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplay");
 
-  onmousewheel_Setter_(mthis, __arg_0) => mthis["onmousewheel"] = __arg_0;
+  onplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplay", __arg_0);
 
-  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplaying");
 
-  onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
+  onplaying_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplaying", __arg_0);
 
-  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplay");
+  onpointercancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointercancel");
 
-  onplay_Setter_(mthis, __arg_0) => mthis["onplay"] = __arg_0;
+  onpointercancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointercancel", __arg_0);
 
-  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplaying");
+  onpointerdown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerdown");
 
-  onplaying_Setter_(mthis, __arg_0) => mthis["onplaying"] = __arg_0;
+  onpointerdown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerdown", __arg_0);
 
-  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
+  onpointerenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerenter");
 
-  onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
+  onpointerenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerenter", __arg_0);
 
-  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onratechange");
+  onpointerleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerleave");
 
-  onratechange_Setter_(mthis, __arg_0) => mthis["onratechange"] = __arg_0;
+  onpointerleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerleave", __arg_0);
 
-  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreset");
+  onpointermove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointermove");
 
-  onreset_Setter_(mthis, __arg_0) => mthis["onreset"] = __arg_0;
+  onpointermove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointermove", __arg_0);
 
-  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
+  onpointerout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerout");
 
-  onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
+  onpointerout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerout", __arg_0);
 
-  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
+  onpointerover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerover");
 
-  onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
+  onpointerover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerover", __arg_0);
 
-  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeked");
+  onpointerup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerup");
 
-  onseeked_Setter_(mthis, __arg_0) => mthis["onseeked"] = __arg_0;
+  onpointerup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerup", __arg_0);
 
-  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeking");
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onprogress");
 
-  onseeking_Setter_(mthis, __arg_0) => mthis["onseeking"] = __arg_0;
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onprogress", __arg_0);
 
-  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselect");
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onratechange");
 
-  onselect_Setter_(mthis, __arg_0) => mthis["onselect"] = __arg_0;
+  onratechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onratechange", __arg_0);
 
-  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onreset");
 
-  onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
+  onreset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onreset", __arg_0);
 
-  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstalled");
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onresize");
 
-  onstalled_Setter_(mthis, __arg_0) => mthis["onstalled"] = __arg_0;
+  onresize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onresize", __arg_0);
 
-  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsubmit");
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onscroll");
 
-  onsubmit_Setter_(mthis, __arg_0) => mthis["onsubmit"] = __arg_0;
+  onscroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onscroll", __arg_0);
 
-  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuspend");
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeked");
 
-  onsuspend_Setter_(mthis, __arg_0) => mthis["onsuspend"] = __arg_0;
+  onseeked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeked", __arg_0);
 
-  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeupdate");
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeking");
 
-  ontimeupdate_Setter_(mthis, __arg_0) => mthis["ontimeupdate"] = __arg_0;
+  onseeking_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeking", __arg_0);
 
-  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontoggle");
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onselect");
 
-  ontoggle_Setter_(mthis, __arg_0) => mthis["ontoggle"] = __arg_0;
+  onselect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onselect", __arg_0);
 
-  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvolumechange");
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onshow");
 
-  onvolumechange_Setter_(mthis, __arg_0) => mthis["onvolumechange"] = __arg_0;
+  onshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onshow", __arg_0);
 
-  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwaiting");
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onstalled");
 
-  onwaiting_Setter_(mthis, __arg_0) => mthis["onwaiting"] = __arg_0;
+  onstalled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onstalled", __arg_0);
 
-  outerText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outerText");
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsubmit");
 
-  outerText_Setter_(mthis, __arg_0) => mthis["outerText"] = __arg_0;
+  onsubmit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsubmit", __arg_0);
 
-  spellcheck_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "spellcheck");
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsuspend");
 
-  spellcheck_Setter_(mthis, __arg_0) => mthis["spellcheck"] = __arg_0;
+  onsuspend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsuspend", __arg_0);
 
-  tabIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tabIndex");
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontimeupdate");
 
-  tabIndex_Setter_(mthis, __arg_0) => mthis["tabIndex"] = __arg_0;
+  ontimeupdate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontimeupdate", __arg_0);
 
-  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontoggle");
 
-  title_Setter_(mthis, __arg_0) => mthis["title"] = __arg_0;
+  ontoggle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontoggle", __arg_0);
 
-  translate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "translate");
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onvolumechange");
 
-  translate_Setter_(mthis, __arg_0) => mthis["translate"] = __arg_0;
+  onvolumechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onvolumechange", __arg_0);
 
-  webkitdropzone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitdropzone");
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onwaiting");
 
-  webkitdropzone_Setter_(mthis, __arg_0) => mthis["webkitdropzone"] = __arg_0;
+  onwaiting_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onwaiting", __arg_0);
 
 }
 
 class BlinkHTMLEmbedElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLEmbedElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLEmbedElement */, "align");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLEmbedElement */, "align", __arg_0);
 
-  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "align");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLEmbedElement */, "height");
 
-  align_Setter_(mthis, __arg_0) => mthis["align"] = __arg_0;
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLEmbedElement */, "height", __arg_0);
 
-  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSVGDocument", []);
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLEmbedElement */, "name");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLEmbedElement */, "name", __arg_0);
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLEmbedElement */, "src");
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLEmbedElement */, "src", __arg_0);
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLEmbedElement */, "type");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLEmbedElement */, "type", __arg_0);
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLEmbedElement */, "width");
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLEmbedElement */, "width", __arg_0);
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLEmbedElement */, "__getter__", [__arg_0]);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLEmbedElement */, "__setter__", [__arg_0, __arg_1]);
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
-
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
-
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLEmbedElement */, "getSVGDocument", []);
 
 }
 
 class BlinkHTMLFieldSetElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLFieldSetElement();
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFieldSetElement */, "disabled");
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFieldSetElement */, "disabled", __arg_0);
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  elements_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFieldSetElement */, "elements");
 
-  elements_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elements");
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFieldSetElement */, "form");
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFieldSetElement */, "name");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFieldSetElement */, "name", __arg_0);
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFieldSetElement */, "type");
 
-  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFieldSetElement */, "validationMessage");
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFieldSetElement */, "validity");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFieldSetElement */, "willValidate");
 
-  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFieldSetElement */, "checkValidity", []);
 
-  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFieldSetElement */, "reportValidity", []);
 
-  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFieldSetElement */, "setCustomValidity", []);
+
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFieldSetElement */, "setCustomValidity", [__arg_0]);
 
 }
 
 class BlinkHTMLFontElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLFontElement();
 
+  color_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFontElement */, "color");
+
+  color_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFontElement */, "color", __arg_0);
+
+  face_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFontElement */, "face");
+
+  face_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFontElement */, "face", __arg_0);
+
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFontElement */, "size");
+
+  size_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFontElement */, "size", __arg_0);
+
 }
 
 class BlinkHTMLFormControlsCollection extends BlinkHTMLCollection {
   static final instance = new BlinkHTMLFormControlsCollection();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormControlsCollection */, "item", []);
 
-  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormControlsCollection */, "item", [__arg_0]);
 
-  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormControlsCollection */, "namedItem", []);
+
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormControlsCollection */, "namedItem", [__arg_0]);
 
 }
 
 class BlinkHTMLFormElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLFormElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  acceptCharset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "acceptCharset");
 
-  acceptCharset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "acceptCharset");
+  acceptCharset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "acceptCharset", __arg_0);
 
-  acceptCharset_Setter_(mthis, __arg_0) => mthis["acceptCharset"] = __arg_0;
+  action_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "action");
 
-  action_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "action");
+  action_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "action", __arg_0);
 
-  action_Setter_(mthis, __arg_0) => mthis["action"] = __arg_0;
+  autocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "autocomplete");
 
-  autocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autocomplete");
+  autocomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "autocomplete", __arg_0);
 
-  autocomplete_Setter_(mthis, __arg_0) => mthis["autocomplete"] = __arg_0;
+  elements_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "elements");
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "encoding");
 
-  elements_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elements");
+  encoding_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "encoding", __arg_0);
 
-  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "encoding");
+  enctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "enctype");
 
-  encoding_Setter_(mthis, __arg_0) => mthis["encoding"] = __arg_0;
+  enctype_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "enctype", __arg_0);
 
-  enctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "enctype");
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "length");
 
-  enctype_Setter_(mthis, __arg_0) => mthis["enctype"] = __arg_0;
+  method_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "method");
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  method_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "method", __arg_0);
 
-  method_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "method");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "name");
 
-  method_Setter_(mthis, __arg_0) => mthis["method"] = __arg_0;
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "name", __arg_0);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  noValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "noValidate");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  noValidate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "noValidate", __arg_0);
 
-  noValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "noValidate");
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFormElement */, "target");
 
-  noValidate_Setter_(mthis, __arg_0) => mthis["noValidate"] = __arg_0;
+  target_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFormElement */, "target", __arg_0);
 
-  requestAutocomplete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestAutocomplete", []);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "__getter__", [__arg_0]);
 
-  reset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reset", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "checkValidity", []);
 
-  submit_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "submit", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "item", []);
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "item", [__arg_0]);
 
-  target_Setter_(mthis, __arg_0) => mthis["target"] = __arg_0;
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "reportValidity", []);
+
+  requestAutocomplete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "requestAutocomplete", []);
+
+  requestAutocomplete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "requestAutocomplete", [__arg_0]);
+
+  reset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "reset", []);
+
+  submit_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFormElement */, "submit", []);
 
 }
 
 class BlinkHTMLFrameElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLFrameElement();
 
+  contentDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "contentDocument");
+
+  contentWindow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "contentWindow");
+
+  frameBorder_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "frameBorder");
+
+  frameBorder_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameElement */, "frameBorder", __arg_0);
+
+  longDesc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "longDesc");
+
+  longDesc_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameElement */, "longDesc", __arg_0);
+
+  marginHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "marginHeight");
+
+  marginHeight_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameElement */, "marginHeight", __arg_0);
+
+  marginWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "marginWidth");
+
+  marginWidth_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameElement */, "marginWidth", __arg_0);
+
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "name");
+
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameElement */, "name", __arg_0);
+
+  noResize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "noResize");
+
+  noResize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameElement */, "noResize", __arg_0);
+
+  scrolling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "scrolling");
+
+  scrolling_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameElement */, "scrolling", __arg_0);
+
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameElement */, "src");
+
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameElement */, "src", __arg_0);
+
+  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFrameElement */, "getSVGDocument", []);
+
 }
 
 class BlinkHTMLFrameSetElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLFrameSetElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  cols_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "cols");
+
+  cols_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "cols", __arg_0);
+
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "onblur");
+
+  onblur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "onblur", __arg_0);
+
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "onerror");
+
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "onerror", __arg_0);
+
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "onfocus");
+
+  onfocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "onfocus", __arg_0);
+
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "onload");
+
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "onload", __arg_0);
+
+  onorientationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "onorientationchange");
+
+  onorientationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "onorientationchange", __arg_0);
+
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "onresize");
+
+  onresize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "onresize", __arg_0);
+
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "onscroll");
+
+  onscroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "onscroll", __arg_0);
+
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLFrameSetElement */, "rows");
+
+  rows_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLFrameSetElement */, "rows", __arg_0);
+
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLFrameSetElement */, "__getter__", [__arg_0]);
+
+  onbeforeunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onbeforeunload");
+
+  onbeforeunload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onbeforeunload", __arg_0);
+
+  onhashchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onhashchange");
+
+  onhashchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onhashchange", __arg_0);
+
+  onlanguagechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onlanguagechange");
+
+  onlanguagechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onlanguagechange", __arg_0);
+
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onmessage");
+
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onmessage", __arg_0);
+
+  onoffline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onoffline");
+
+  onoffline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onoffline", __arg_0);
+
+  ononline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "ononline");
+
+  ononline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "ononline", __arg_0);
+
+  onpagehide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpagehide");
+
+  onpagehide_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpagehide", __arg_0);
+
+  onpageshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpageshow");
+
+  onpageshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpageshow", __arg_0);
+
+  onpopstate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpopstate");
+
+  onpopstate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpopstate", __arg_0);
+
+  onrejectionhandled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onrejectionhandled");
+
+  onrejectionhandled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onrejectionhandled", __arg_0);
+
+  onstorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onstorage");
+
+  onstorage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onstorage", __arg_0);
+
+  onunhandledrejection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onunhandledrejection");
+
+  onunhandledrejection_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onunhandledrejection", __arg_0);
+
+  onunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onunload");
+
+  onunload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onunload", __arg_0);
 
 }
 
 class BlinkHTMLHRElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLHRElement();
 
-  color_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "color");
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLHRElement */, "align");
 
-  color_Setter_(mthis, __arg_0) => mthis["color"] = __arg_0;
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLHRElement */, "align", __arg_0);
+
+  color_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLHRElement */, "color");
+
+  color_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLHRElement */, "color", __arg_0);
+
+  noShade_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLHRElement */, "noShade");
+
+  noShade_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLHRElement */, "noShade", __arg_0);
+
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLHRElement */, "size");
+
+  size_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLHRElement */, "size", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLHRElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLHRElement */, "width", __arg_0);
 
 }
 
@@ -5897,940 +7704,1172 @@
 class BlinkHTMLHeadingElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLHeadingElement();
 
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLHeadingElement */, "align");
+
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLHeadingElement */, "align", __arg_0);
+
 }
 
 class BlinkHTMLHtmlElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLHtmlElement();
 
+  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLHtmlElement */, "version");
+
+  version_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLHtmlElement */, "version", __arg_0);
+
 }
 
 class BlinkHTMLIFrameElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLIFrameElement();
 
-  allowFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "allowFullscreen");
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "align");
 
-  allowFullscreen_Setter_(mthis, __arg_0) => mthis["allowFullscreen"] = __arg_0;
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "align", __arg_0);
 
-  contentDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentDocument");
+  allowFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "allowFullscreen");
 
-  contentWindow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentWindow");
+  allowFullscreen_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "allowFullscreen", __arg_0);
 
-  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSVGDocument", []);
+  contentDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "contentDocument");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  contentWindow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "contentWindow");
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  frameBorder_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "frameBorder");
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  frameBorder_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "frameBorder", __arg_0);
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "height");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "height", __arg_0);
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  longDesc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "longDesc");
 
-  sandbox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sandbox");
+  longDesc_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "longDesc", __arg_0);
 
-  sandbox_Setter_(mthis, __arg_0) => mthis["sandbox"] = __arg_0;
+  marginHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "marginHeight");
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  marginHeight_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "marginHeight", __arg_0);
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  marginWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "marginWidth");
 
-  srcdoc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "srcdoc");
+  marginWidth_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "marginWidth", __arg_0);
 
-  srcdoc_Setter_(mthis, __arg_0) => mthis["srcdoc"] = __arg_0;
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "name");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "name", __arg_0);
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  sandbox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "sandbox");
+
+  scrolling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "scrolling");
+
+  scrolling_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "scrolling", __arg_0);
+
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "src");
+
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "src", __arg_0);
+
+  srcdoc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "srcdoc");
+
+  srcdoc_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "srcdoc", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLIFrameElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLIFrameElement */, "width", __arg_0);
+
+  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLIFrameElement */, "getSVGDocument", []);
 
 }
 
 class BlinkHTMLImageElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLImageElement();
 
-  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alt");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Image");
 
-  alt_Setter_(mthis, __arg_0) => mthis["alt"] = __arg_0;
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Image", [__arg_0]);
 
-  border_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "border");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("Image", [__arg_0, __arg_1]);
 
-  border_Setter_(mthis, __arg_0) => mthis["border"] = __arg_0;
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "align");
 
-  complete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "complete");
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "align", __arg_0);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Image"), []);
+  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "alt");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Image"), [__arg_0]);
+  alt_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "alt", __arg_0);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Image"), [__arg_0, __arg_1]);
+  border_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "border");
 
-  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crossOrigin");
+  border_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "border", __arg_0);
 
-  crossOrigin_Setter_(mthis, __arg_0) => mthis["crossOrigin"] = __arg_0;
+  complete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "complete");
 
-  currentSrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentSrc");
+  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "crossOrigin");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  crossOrigin_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "crossOrigin", __arg_0);
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  currentSrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "currentSrc");
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "height");
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "height", __arg_0);
 
-  isMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isMap");
+  hspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "hspace");
 
-  isMap_Setter_(mthis, __arg_0) => mthis["isMap"] = __arg_0;
+  hspace_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "hspace", __arg_0);
 
-  lowsrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lowsrc");
+  isMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "isMap");
 
-  lowsrc_Setter_(mthis, __arg_0) => mthis["lowsrc"] = __arg_0;
+  isMap_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "isMap", __arg_0);
 
-  naturalHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "naturalHeight");
+  longDesc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "longDesc");
 
-  naturalWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "naturalWidth");
+  longDesc_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "longDesc", __arg_0);
 
-  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sizes");
+  lowsrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "lowsrc");
 
-  sizes_Setter_(mthis, __arg_0) => mthis["sizes"] = __arg_0;
+  lowsrc_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "lowsrc", __arg_0);
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "name");
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "name", __arg_0);
 
-  srcset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "srcset");
+  naturalHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "naturalHeight");
 
-  srcset_Setter_(mthis, __arg_0) => mthis["srcset"] = __arg_0;
+  naturalWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "naturalWidth");
 
-  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "useMap");
+  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "sizes");
 
-  useMap_Setter_(mthis, __arg_0) => mthis["useMap"] = __arg_0;
+  sizes_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "sizes", __arg_0);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "src");
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "src", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  srcset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "srcset");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  srcset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "srcset", __arg_0);
+
+  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "useMap");
+
+  useMap_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "useMap", __arg_0);
+
+  vspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "vspace");
+
+  vspace_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "vspace", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLImageElement */, "width", __arg_0);
+
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "x");
+
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLImageElement */, "y");
 
 }
 
 class BlinkHTMLInputElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLInputElement();
 
-  accept_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "accept");
+  accept_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "accept");
 
-  accept_Setter_(mthis, __arg_0) => mthis["accept"] = __arg_0;
+  accept_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "accept", __arg_0);
 
-  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alt");
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "align");
 
-  alt_Setter_(mthis, __arg_0) => mthis["alt"] = __arg_0;
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "align", __arg_0);
 
-  autocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autocomplete");
+  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "alt");
 
-  autocomplete_Setter_(mthis, __arg_0) => mthis["autocomplete"] = __arg_0;
+  alt_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "alt", __arg_0);
 
-  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
+  autocapitalize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "autocapitalize");
 
-  autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
+  autocapitalize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "autocapitalize", __arg_0);
 
-  capture_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "capture");
+  autocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "autocomplete");
 
-  capture_Setter_(mthis, __arg_0) => mthis["capture"] = __arg_0;
+  autocomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "autocomplete", __arg_0);
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "autofocus");
 
-  checked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "checked");
+  autofocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "autofocus", __arg_0);
 
-  checked_Setter_(mthis, __arg_0) => mthis["checked"] = __arg_0;
+  capture_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "capture");
 
-  defaultChecked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultChecked");
+  capture_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "capture", __arg_0);
 
-  defaultChecked_Setter_(mthis, __arg_0) => mthis["defaultChecked"] = __arg_0;
+  checked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "checked");
 
-  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultValue");
+  checked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "checked", __arg_0);
 
-  defaultValue_Setter_(mthis, __arg_0) => mthis["defaultValue"] = __arg_0;
+  defaultChecked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "defaultChecked");
 
-  dirName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dirName");
+  defaultChecked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "defaultChecked", __arg_0);
 
-  dirName_Setter_(mthis, __arg_0) => mthis["dirName"] = __arg_0;
+  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "defaultValue");
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  defaultValue_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "defaultValue", __arg_0);
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  dirName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "dirName");
 
-  files_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "files");
+  dirName_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "dirName", __arg_0);
 
-  files_Setter_(mthis, __arg_0) => mthis["files"] = __arg_0;
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "disabled");
 
-  formAction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formAction");
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "disabled", __arg_0);
 
-  formAction_Setter_(mthis, __arg_0) => mthis["formAction"] = __arg_0;
+  files_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "files");
 
-  formEnctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formEnctype");
+  files_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "files", __arg_0);
 
-  formEnctype_Setter_(mthis, __arg_0) => mthis["formEnctype"] = __arg_0;
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "form");
 
-  formMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formMethod");
+  formAction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "formAction");
 
-  formMethod_Setter_(mthis, __arg_0) => mthis["formMethod"] = __arg_0;
+  formAction_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "formAction", __arg_0);
 
-  formNoValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formNoValidate");
+  formEnctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "formEnctype");
 
-  formNoValidate_Setter_(mthis, __arg_0) => mthis["formNoValidate"] = __arg_0;
+  formEnctype_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "formEnctype", __arg_0);
 
-  formTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formTarget");
+  formMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "formMethod");
 
-  formTarget_Setter_(mthis, __arg_0) => mthis["formTarget"] = __arg_0;
+  formMethod_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "formMethod", __arg_0);
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  formNoValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "formNoValidate");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  formNoValidate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "formNoValidate", __arg_0);
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  formTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "formTarget");
 
-  incremental_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "incremental");
+  formTarget_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "formTarget", __arg_0);
 
-  incremental_Setter_(mthis, __arg_0) => mthis["incremental"] = __arg_0;
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "height");
 
-  indeterminate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "indeterminate");
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "height", __arg_0);
 
-  indeterminate_Setter_(mthis, __arg_0) => mthis["indeterminate"] = __arg_0;
+  incremental_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "incremental");
 
-  inputMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputMode");
+  incremental_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "incremental", __arg_0);
 
-  inputMode_Setter_(mthis, __arg_0) => mthis["inputMode"] = __arg_0;
+  indeterminate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "indeterminate");
 
-  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
+  indeterminate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "indeterminate", __arg_0);
 
-  list_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "list");
+  inputMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "inputMode");
 
-  maxLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxLength");
+  inputMode_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "inputMode", __arg_0);
 
-  maxLength_Setter_(mthis, __arg_0) => mthis["maxLength"] = __arg_0;
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "labels");
 
-  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "max");
+  list_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "list");
 
-  max_Setter_(mthis, __arg_0) => mthis["max"] = __arg_0;
+  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "max");
 
-  min_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "min");
+  max_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "max", __arg_0);
 
-  min_Setter_(mthis, __arg_0) => mthis["min"] = __arg_0;
+  maxLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "maxLength");
 
-  multiple_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "multiple");
+  maxLength_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "maxLength", __arg_0);
+
+  min_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "min");
+
+  min_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "min", __arg_0);
+
+  minLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "minLength");
+
+  minLength_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "minLength", __arg_0);
+
+  multiple_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "multiple");
+
+  multiple_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "multiple", __arg_0);
+
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "name");
 
-  multiple_Setter_(mthis, __arg_0) => mthis["multiple"] = __arg_0;
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "name", __arg_0);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  pattern_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "pattern");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  pattern_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "pattern", __arg_0);
 
-  pattern_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pattern");
+  placeholder_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "placeholder");
 
-  pattern_Setter_(mthis, __arg_0) => mthis["pattern"] = __arg_0;
+  placeholder_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "placeholder", __arg_0);
 
-  placeholder_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "placeholder");
+  readOnly_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "readOnly");
 
-  placeholder_Setter_(mthis, __arg_0) => mthis["placeholder"] = __arg_0;
+  readOnly_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "readOnly", __arg_0);
 
-  readOnly_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readOnly");
+  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "required");
 
-  readOnly_Setter_(mthis, __arg_0) => mthis["readOnly"] = __arg_0;
+  required_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "required", __arg_0);
 
-  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "required");
+  selectionDirection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "selectionDirection");
 
-  required_Setter_(mthis, __arg_0) => mthis["required"] = __arg_0;
+  selectionDirection_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "selectionDirection", __arg_0);
 
-  select_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "select", []);
+  selectionEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "selectionEnd");
 
-  selectionDirection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionDirection");
+  selectionEnd_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "selectionEnd", __arg_0);
 
-  selectionDirection_Setter_(mthis, __arg_0) => mthis["selectionDirection"] = __arg_0;
+  selectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "selectionStart");
 
-  selectionEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionEnd");
+  selectionStart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "selectionStart", __arg_0);
 
-  selectionEnd_Setter_(mthis, __arg_0) => mthis["selectionEnd"] = __arg_0;
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "size");
 
-  selectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionStart");
+  size_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "size", __arg_0);
 
-  selectionStart_Setter_(mthis, __arg_0) => mthis["selectionStart"] = __arg_0;
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "src");
 
-  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "src", __arg_0);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
+  step_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "step");
 
-  setRangeText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", []);
+  step_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "step", __arg_0);
 
-  setRangeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0]);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "type");
 
-  setRangeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1]);
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "type", __arg_0);
 
-  setRangeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1, __arg_2]);
+  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "useMap");
 
-  setRangeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  useMap_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "useMap", __arg_0);
 
-  setSelectionRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", []);
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "validationMessage");
 
-  setSelectionRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0]);
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "validity");
 
-  setSelectionRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0, __arg_1]);
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "value");
 
-  setSelectionRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0, __arg_1, __arg_2]);
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "value", __arg_0);
 
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
+  valueAsDate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "valueAsDate");
 
-  size_Setter_(mthis, __arg_0) => mthis["size"] = __arg_0;
+  valueAsDate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "valueAsDate", __arg_0);
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  valueAsNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "valueAsNumber");
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  valueAsNumber_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "valueAsNumber", __arg_0);
 
-  stepDown_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stepDown", []);
+  webkitEntries_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "webkitEntries");
 
-  stepDown_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stepDown", [__arg_0]);
+  webkitdirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "webkitdirectory");
 
-  stepUp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stepUp", []);
+  webkitdirectory_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "webkitdirectory", __arg_0);
 
-  stepUp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stepUp", [__arg_0]);
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "width");
 
-  step_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "step");
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLInputElement */, "width", __arg_0);
 
-  step_Setter_(mthis, __arg_0) => mthis["step"] = __arg_0;
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLInputElement */, "willValidate");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "checkValidity", []);
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "reportValidity", []);
 
-  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "useMap");
+  select_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "select", []);
 
-  useMap_Setter_(mthis, __arg_0) => mthis["useMap"] = __arg_0;
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setCustomValidity", []);
 
-  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setCustomValidity", [__arg_0]);
 
-  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
+  setRangeText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setRangeText", []);
 
-  valueAsDate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueAsDate");
+  setRangeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setRangeText", [__arg_0]);
 
-  valueAsDate_Setter_(mthis, __arg_0) => mthis["valueAsDate"] = __arg_0;
+  setRangeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setRangeText", [__arg_0, __arg_1]);
 
-  valueAsNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueAsNumber");
+  setRangeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setRangeText", [__arg_0, __arg_1, __arg_2]);
 
-  valueAsNumber_Setter_(mthis, __arg_0) => mthis["valueAsNumber"] = __arg_0;
+  setRangeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setRangeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  setSelectionRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setSelectionRange", []);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  setSelectionRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setSelectionRange", [__arg_0]);
 
-  webkitEntries_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitEntries");
+  setSelectionRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setSelectionRange", [__arg_0, __arg_1]);
 
-  webkitdirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitdirectory");
+  setSelectionRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "setSelectionRange", [__arg_0, __arg_1, __arg_2]);
 
-  webkitdirectory_Setter_(mthis, __arg_0) => mthis["webkitdirectory"] = __arg_0;
+  stepDown_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "stepDown", []);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  stepDown_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "stepDown", [__arg_0]);
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  stepUp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "stepUp", []);
 
-  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
+  stepUp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLInputElement */, "stepUp", [__arg_0]);
 
 }
 
 class BlinkHTMLKeygenElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLKeygenElement();
 
-  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "autofocus");
 
-  autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
+  autofocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLKeygenElement */, "autofocus", __arg_0);
 
-  challenge_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "challenge");
+  challenge_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "challenge");
 
-  challenge_Setter_(mthis, __arg_0) => mthis["challenge"] = __arg_0;
+  challenge_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLKeygenElement */, "challenge", __arg_0);
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "disabled");
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLKeygenElement */, "disabled", __arg_0);
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "form");
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  keytype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "keytype");
 
-  keytype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keytype");
+  keytype_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLKeygenElement */, "keytype", __arg_0);
 
-  keytype_Setter_(mthis, __arg_0) => mthis["keytype"] = __arg_0;
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "labels");
 
-  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "name");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLKeygenElement */, "name", __arg_0);
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "type");
 
-  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "validationMessage");
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "validity");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLKeygenElement */, "willValidate");
 
-  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLKeygenElement */, "checkValidity", []);
 
-  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLKeygenElement */, "reportValidity", []);
 
-  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLKeygenElement */, "setCustomValidity", []);
+
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLKeygenElement */, "setCustomValidity", [__arg_0]);
 
 }
 
 class BlinkHTMLLIElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLLIElement();
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLIElement */, "type");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLIElement */, "type", __arg_0);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLIElement */, "value");
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLIElement */, "value", __arg_0);
 
 }
 
 class BlinkHTMLLabelElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLLabelElement();
 
-  control_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "control");
+  control_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLabelElement */, "control");
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLabelElement */, "form");
 
-  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "htmlFor");
+  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLabelElement */, "htmlFor");
 
-  htmlFor_Setter_(mthis, __arg_0) => mthis["htmlFor"] = __arg_0;
+  htmlFor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLabelElement */, "htmlFor", __arg_0);
 
 }
 
 class BlinkHTMLLegendElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLLegendElement();
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLegendElement */, "align");
+
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLegendElement */, "align", __arg_0);
+
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLegendElement */, "form");
 
 }
 
 class BlinkHTMLLinkElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLLinkElement();
 
-  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crossOrigin");
+  charset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "charset");
 
-  crossOrigin_Setter_(mthis, __arg_0) => mthis["crossOrigin"] = __arg_0;
+  charset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "charset", __arg_0);
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "crossOrigin");
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  crossOrigin_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "crossOrigin", __arg_0);
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "disabled");
 
-  href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "disabled", __arg_0);
 
-  hreflang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hreflang");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "href");
 
-  hreflang_Setter_(mthis, __arg_0) => mthis["hreflang"] = __arg_0;
+  href_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "href", __arg_0);
 
-  import_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "import");
+  hreflang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "hreflang");
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  hreflang_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "hreflang", __arg_0);
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  import_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "import");
 
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "integrity");
 
-  media_Setter_(mthis, __arg_0) => mthis["media"] = __arg_0;
+  integrity_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "integrity", __arg_0);
 
-  rel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rel");
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "media");
 
-  rel_Setter_(mthis, __arg_0) => mthis["rel"] = __arg_0;
+  media_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "media", __arg_0);
 
-  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sheet");
+  rel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "rel");
 
-  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sizes");
+  rel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "rel", __arg_0);
 
-  sizes_Setter_(mthis, __arg_0) => mthis["sizes"] = __arg_0;
+  rev_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "rev");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  rev_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "rev", __arg_0);
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "sheet");
+
+  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "sizes");
+
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "target");
+
+  target_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "target", __arg_0);
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLLinkElement */, "type");
+
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLLinkElement */, "type", __arg_0);
 
 }
 
 class BlinkHTMLMapElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMapElement();
 
-  areas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "areas");
+  areas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMapElement */, "areas");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMapElement */, "name");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMapElement */, "name", __arg_0);
 
 }
 
 class BlinkHTMLMarqueeElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMarqueeElement();
 
+  behavior_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "behavior");
+
+  behavior_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "behavior", __arg_0);
+
+  bgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "bgColor");
+
+  bgColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "bgColor", __arg_0);
+
+  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "direction");
+
+  direction_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "direction", __arg_0);
+
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "height");
+
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "height", __arg_0);
+
+  hspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "hspace");
+
+  hspace_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "hspace", __arg_0);
+
+  loop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "loop");
+
+  loop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "loop", __arg_0);
+
+  scrollAmount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "scrollAmount");
+
+  scrollAmount_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "scrollAmount", __arg_0);
+
+  scrollDelay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "scrollDelay");
+
+  scrollDelay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "scrollDelay", __arg_0);
+
+  trueSpeed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "trueSpeed");
+
+  trueSpeed_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "trueSpeed", __arg_0);
+
+  vspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "vspace");
+
+  vspace_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "vspace", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMarqueeElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMarqueeElement */, "width", __arg_0);
+
+  attachedCallback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMarqueeElement */, "attachedCallback", []);
+
+  attributeChangedCallback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMarqueeElement */, "attributeChangedCallback", [__arg_0]);
+
+  attributeChangedCallback_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMarqueeElement */, "attributeChangedCallback", [__arg_0, __arg_1]);
+
+  attributeChangedCallback_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMarqueeElement */, "attributeChangedCallback", [__arg_0, __arg_1, __arg_2]);
+
+  createdCallback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMarqueeElement */, "createdCallback", []);
+
+  detachedCallback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMarqueeElement */, "detachedCallback", []);
+
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMarqueeElement */, "start", []);
+
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMarqueeElement */, "stop", []);
+
 }
 
 class BlinkHTMLMediaElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMediaElement();
 
-  addTextTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addTextTrack", []);
+  audioTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "audioTracks");
 
-  addTextTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addTextTrack", [__arg_0]);
+  autoplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "autoplay");
 
-  addTextTrack_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addTextTrack", [__arg_0, __arg_1]);
+  autoplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "autoplay", __arg_0);
 
-  addTextTrack_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "addTextTrack", [__arg_0, __arg_1, __arg_2]);
+  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "buffered");
 
-  audioTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "audioTracks");
+  controller_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "controller");
 
-  autoplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autoplay");
+  controller_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "controller", __arg_0);
 
-  autoplay_Setter_(mthis, __arg_0) => mthis["autoplay"] = __arg_0;
+  controls_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "controls");
 
-  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffered");
+  controls_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "controls", __arg_0);
 
-  canPlayType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "canPlayType", []);
+  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "crossOrigin");
 
-  canPlayType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "canPlayType", [__arg_0]);
+  crossOrigin_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "crossOrigin", __arg_0);
 
-  canPlayType_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "canPlayType", [__arg_0, __arg_1]);
+  currentSrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "currentSrc");
 
-  controller_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "controller");
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "currentTime");
 
-  controller_Setter_(mthis, __arg_0) => mthis["controller"] = __arg_0;
+  currentTime_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "currentTime", __arg_0);
 
-  controls_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "controls");
+  defaultMuted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "defaultMuted");
 
-  controls_Setter_(mthis, __arg_0) => mthis["controls"] = __arg_0;
+  defaultMuted_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "defaultMuted", __arg_0);
 
-  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crossOrigin");
+  defaultPlaybackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "defaultPlaybackRate");
 
-  crossOrigin_Setter_(mthis, __arg_0) => mthis["crossOrigin"] = __arg_0;
+  defaultPlaybackRate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "defaultPlaybackRate", __arg_0);
 
-  currentSrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentSrc");
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "duration");
 
-  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
+  ended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "ended");
 
-  currentTime_Setter_(mthis, __arg_0) => mthis["currentTime"] = __arg_0;
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "error");
 
-  defaultMuted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultMuted");
+  loop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "loop");
 
-  defaultMuted_Setter_(mthis, __arg_0) => mthis["defaultMuted"] = __arg_0;
+  loop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "loop", __arg_0);
 
-  defaultPlaybackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultPlaybackRate");
+  mediaGroup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "mediaGroup");
 
-  defaultPlaybackRate_Setter_(mthis, __arg_0) => mthis["defaultPlaybackRate"] = __arg_0;
+  mediaGroup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "mediaGroup", __arg_0);
 
-  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
+  mediaKeys_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "mediaKeys");
 
-  ended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ended");
+  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "muted");
 
-  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
+  muted_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "muted", __arg_0);
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  networkState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "networkState");
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  onencrypted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "onencrypted");
 
-  load_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "load", []);
+  onencrypted_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "onencrypted", __arg_0);
 
-  loop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loop");
+  onwebkitkeyadded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "onwebkitkeyadded");
 
-  loop_Setter_(mthis, __arg_0) => mthis["loop"] = __arg_0;
+  onwebkitkeyadded_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "onwebkitkeyadded", __arg_0);
 
-  mediaGroup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaGroup");
+  onwebkitkeyerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "onwebkitkeyerror");
 
-  mediaGroup_Setter_(mthis, __arg_0) => mthis["mediaGroup"] = __arg_0;
+  onwebkitkeyerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "onwebkitkeyerror", __arg_0);
 
-  mediaKeys_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaKeys");
+  onwebkitkeymessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "onwebkitkeymessage");
 
-  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "muted");
+  onwebkitkeymessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "onwebkitkeymessage", __arg_0);
 
-  muted_Setter_(mthis, __arg_0) => mthis["muted"] = __arg_0;
+  onwebkitneedkey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "onwebkitneedkey");
 
-  networkState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "networkState");
+  onwebkitneedkey_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "onwebkitneedkey", __arg_0);
 
-  onneedkey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onneedkey");
+  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "paused");
+
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "playbackRate");
+
+  playbackRate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "playbackRate", __arg_0);
+
+  played_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "played");
 
-  onneedkey_Setter_(mthis, __arg_0) => mthis["onneedkey"] = __arg_0;
+  preload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "preload");
 
-  onwebkitkeyadded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitkeyadded");
+  preload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "preload", __arg_0);
 
-  onwebkitkeyadded_Setter_(mthis, __arg_0) => mthis["onwebkitkeyadded"] = __arg_0;
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "readyState");
 
-  onwebkitkeyerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitkeyerror");
+  seekable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "seekable");
 
-  onwebkitkeyerror_Setter_(mthis, __arg_0) => mthis["onwebkitkeyerror"] = __arg_0;
+  seeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "seeking");
 
-  onwebkitkeymessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitkeymessage");
+  session_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "session");
 
-  onwebkitkeymessage_Setter_(mthis, __arg_0) => mthis["onwebkitkeymessage"] = __arg_0;
+  session_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "session", __arg_0);
 
-  onwebkitneedkey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitneedkey");
+  sinkId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "sinkId");
 
-  onwebkitneedkey_Setter_(mthis, __arg_0) => mthis["onwebkitneedkey"] = __arg_0;
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "src");
 
-  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pause", []);
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "src", __arg_0);
 
-  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "paused");
+  textTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "textTracks");
 
-  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "play", []);
+  videoTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "videoTracks");
 
-  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
+  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "volume");
 
-  playbackRate_Setter_(mthis, __arg_0) => mthis["playbackRate"] = __arg_0;
+  volume_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMediaElement */, "volume", __arg_0);
 
-  played_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "played");
+  webkitAudioDecodedByteCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "webkitAudioDecodedByteCount");
 
-  preload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preload");
+  webkitVideoDecodedByteCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMediaElement */, "webkitVideoDecodedByteCount");
 
-  preload_Setter_(mthis, __arg_0) => mthis["preload"] = __arg_0;
+  addTextTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "addTextTrack", []);
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  addTextTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "addTextTrack", [__arg_0]);
 
-  seekable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "seekable");
+  addTextTrack_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "addTextTrack", [__arg_0, __arg_1]);
 
-  seeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "seeking");
+  addTextTrack_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "addTextTrack", [__arg_0, __arg_1, __arg_2]);
 
-  setMediaKeys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setMediaKeys", []);
+  canPlayType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "canPlayType", []);
 
-  setMediaKeys_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setMediaKeys", [__arg_0]);
+  canPlayType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "canPlayType", [__arg_0]);
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  canPlayType_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "canPlayType", [__arg_0, __arg_1]);
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  load_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "load", []);
 
-  textTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textTracks");
+  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "pause", []);
 
-  videoTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "videoTracks");
+  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "play", []);
 
-  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "volume");
+  setMediaKeys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "setMediaKeys", []);
 
-  volume_Setter_(mthis, __arg_0) => mthis["volume"] = __arg_0;
+  setMediaKeys_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "setMediaKeys", [__arg_0]);
 
-  webkitAddKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", []);
+  setSinkId_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "setSinkId", []);
 
-  webkitAddKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", [__arg_0]);
+  setSinkId_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "setSinkId", [__arg_0]);
 
-  webkitAddKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", [__arg_0, __arg_1]);
+  webkitAddKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitAddKey", []);
 
-  webkitAddKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", [__arg_0, __arg_1, __arg_2]);
+  webkitAddKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitAddKey", [__arg_0]);
 
-  webkitAddKey_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  webkitAddKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitAddKey", [__arg_0, __arg_1]);
 
-  webkitAudioDecodedByteCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitAudioDecodedByteCount");
+  webkitAddKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitAddKey", [__arg_0, __arg_1, __arg_2]);
 
-  webkitCancelKeyRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitCancelKeyRequest", []);
+  webkitAddKey_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitAddKey", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  webkitCancelKeyRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitCancelKeyRequest", [__arg_0]);
+  webkitCancelKeyRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitCancelKeyRequest", []);
 
-  webkitCancelKeyRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitCancelKeyRequest", [__arg_0, __arg_1]);
+  webkitCancelKeyRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitCancelKeyRequest", [__arg_0]);
 
-  webkitGenerateKeyRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitGenerateKeyRequest", []);
+  webkitCancelKeyRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitCancelKeyRequest", [__arg_0, __arg_1]);
 
-  webkitGenerateKeyRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitGenerateKeyRequest", [__arg_0]);
+  webkitGenerateKeyRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitGenerateKeyRequest", []);
 
-  webkitGenerateKeyRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitGenerateKeyRequest", [__arg_0, __arg_1]);
+  webkitGenerateKeyRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitGenerateKeyRequest", [__arg_0]);
 
-  webkitVideoDecodedByteCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitVideoDecodedByteCount");
+  webkitGenerateKeyRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLMediaElement */, "webkitGenerateKeyRequest", [__arg_0, __arg_1]);
 
 }
 
 class BlinkHTMLMenuElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMenuElement();
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  compact_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuElement */, "compact");
 
-  label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
+  compact_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuElement */, "compact", __arg_0);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuElement */, "label");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  label_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuElement */, "label", __arg_0);
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuElement */, "type");
+
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuElement */, "type", __arg_0);
 
 }
 
 class BlinkHTMLMenuItemElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMenuItemElement();
 
-  checked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "checked");
+  checked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuItemElement */, "checked");
 
-  checked_Setter_(mthis, __arg_0) => mthis["checked"] = __arg_0;
+  checked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuItemElement */, "checked", __arg_0);
 
-  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "default");
+  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuItemElement */, "default");
 
-  default_Setter_(mthis, __arg_0) => mthis["default"] = __arg_0;
+  default_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuItemElement */, "default", __arg_0);
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuItemElement */, "disabled");
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuItemElement */, "disabled", __arg_0);
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  icon_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuItemElement */, "icon");
 
-  label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
+  icon_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuItemElement */, "icon", __arg_0);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuItemElement */, "label");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  label_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuItemElement */, "label", __arg_0);
+
+  radiogroup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuItemElement */, "radiogroup");
+
+  radiogroup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuItemElement */, "radiogroup", __arg_0);
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMenuItemElement */, "type");
+
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMenuItemElement */, "type", __arg_0);
 
 }
 
 class BlinkHTMLMetaElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMetaElement();
 
-  content_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "content");
+  content_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMetaElement */, "content");
 
-  content_Setter_(mthis, __arg_0) => mthis["content"] = __arg_0;
+  content_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMetaElement */, "content", __arg_0);
 
-  httpEquiv_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "httpEquiv");
+  httpEquiv_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMetaElement */, "httpEquiv");
 
-  httpEquiv_Setter_(mthis, __arg_0) => mthis["httpEquiv"] = __arg_0;
+  httpEquiv_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMetaElement */, "httpEquiv", __arg_0);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMetaElement */, "name");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMetaElement */, "name", __arg_0);
+
+  scheme_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMetaElement */, "scheme");
+
+  scheme_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMetaElement */, "scheme", __arg_0);
 
 }
 
 class BlinkHTMLMeterElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMeterElement();
 
-  high_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "high");
+  high_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMeterElement */, "high");
 
-  high_Setter_(mthis, __arg_0) => mthis["high"] = __arg_0;
+  high_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMeterElement */, "high", __arg_0);
 
-  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMeterElement */, "labels");
 
-  low_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "low");
+  low_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMeterElement */, "low");
 
-  low_Setter_(mthis, __arg_0) => mthis["low"] = __arg_0;
+  low_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMeterElement */, "low", __arg_0);
 
-  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "max");
+  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMeterElement */, "max");
 
-  max_Setter_(mthis, __arg_0) => mthis["max"] = __arg_0;
+  max_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMeterElement */, "max", __arg_0);
 
-  min_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "min");
+  min_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMeterElement */, "min");
 
-  min_Setter_(mthis, __arg_0) => mthis["min"] = __arg_0;
+  min_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMeterElement */, "min", __arg_0);
 
-  optimum_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "optimum");
+  optimum_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMeterElement */, "optimum");
 
-  optimum_Setter_(mthis, __arg_0) => mthis["optimum"] = __arg_0;
+  optimum_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMeterElement */, "optimum", __arg_0);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLMeterElement */, "value");
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLMeterElement */, "value", __arg_0);
 
 }
 
 class BlinkHTMLModElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLModElement();
 
-  cite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cite");
+  cite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLModElement */, "cite");
 
-  cite_Setter_(mthis, __arg_0) => mthis["cite"] = __arg_0;
+  cite_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLModElement */, "cite", __arg_0);
 
-  dateTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dateTime");
+  dateTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLModElement */, "dateTime");
 
-  dateTime_Setter_(mthis, __arg_0) => mthis["dateTime"] = __arg_0;
+  dateTime_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLModElement */, "dateTime", __arg_0);
 
 }
 
 class BlinkHTMLOListElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLOListElement();
 
-  reversed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reversed");
+  compact_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOListElement */, "compact");
 
-  reversed_Setter_(mthis, __arg_0) => mthis["reversed"] = __arg_0;
+  compact_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOListElement */, "compact", __arg_0);
 
-  start_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "start");
+  reversed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOListElement */, "reversed");
 
-  start_Setter_(mthis, __arg_0) => mthis["start"] = __arg_0;
+  reversed_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOListElement */, "reversed", __arg_0);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  start_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOListElement */, "start");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  start_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOListElement */, "start", __arg_0);
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOListElement */, "type");
+
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOListElement */, "type", __arg_0);
 
 }
 
 class BlinkHTMLObjectElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLObjectElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "align");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "align", __arg_0);
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  archive_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "archive");
 
-  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
+  archive_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "archive", __arg_0);
 
-  code_Setter_(mthis, __arg_0) => mthis["code"] = __arg_0;
+  border_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "border");
 
-  contentDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentDocument");
+  border_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "border", __arg_0);
 
-  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "code");
 
-  data_Setter_(mthis, __arg_0) => mthis["data"] = __arg_0;
+  code_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "code", __arg_0);
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  codeBase_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "codeBase");
 
-  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSVGDocument", []);
+  codeBase_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "codeBase", __arg_0);
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  codeType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "codeType");
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  codeType_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "codeType", __arg_0);
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  contentDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "contentDocument");
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "data");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  data_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "data", __arg_0);
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  declare_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "declare");
 
-  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
+  declare_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "declare", __arg_0);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "form");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "height");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "height", __arg_0);
 
-  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "useMap");
+  hspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "hspace");
 
-  useMap_Setter_(mthis, __arg_0) => mthis["useMap"] = __arg_0;
+  hspace_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "hspace", __arg_0);
 
-  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "name");
 
-  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "name", __arg_0);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  standby_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "standby");
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  standby_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "standby", __arg_0);
 
-  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "type");
+
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "type", __arg_0);
+
+  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "useMap");
+
+  useMap_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "useMap", __arg_0);
+
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "validationMessage");
+
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "validity");
+
+  vspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "vspace");
+
+  vspace_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "vspace", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLObjectElement */, "width", __arg_0);
+
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLObjectElement */, "willValidate");
+
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLObjectElement */, "__getter__", [__arg_0]);
+
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLObjectElement */, "__setter__", [__arg_0, __arg_1]);
+
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLObjectElement */, "checkValidity", []);
+
+  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLObjectElement */, "getSVGDocument", []);
+
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLObjectElement */, "reportValidity", []);
+
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLObjectElement */, "setCustomValidity", []);
+
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLObjectElement */, "setCustomValidity", [__arg_0]);
 
 }
 
 class BlinkHTMLOptGroupElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLOptGroupElement();
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptGroupElement */, "disabled");
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptGroupElement */, "disabled", __arg_0);
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptGroupElement */, "label");
 
-  label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
+  label_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptGroupElement */, "label", __arg_0);
 
 }
 
 class BlinkHTMLOptionElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLOptionElement();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Option"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Option");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Option"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Option", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Option"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("Option", [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Option"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("Option", [__arg_0, __arg_1, __arg_2]);
 
-  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Option"), [__arg_0, __arg_1, __arg_2, __arg_3]);
+  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callConstructor("Option", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  defaultSelected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultSelected");
+  defaultSelected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionElement */, "defaultSelected");
 
-  defaultSelected_Setter_(mthis, __arg_0) => mthis["defaultSelected"] = __arg_0;
+  defaultSelected_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptionElement */, "defaultSelected", __arg_0);
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionElement */, "disabled");
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptionElement */, "disabled", __arg_0);
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionElement */, "form");
 
-  index_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "index");
+  index_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionElement */, "index");
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionElement */, "label");
 
-  label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
+  label_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptionElement */, "label", __arg_0);
 
-  selected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selected");
+  selected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionElement */, "selected");
 
-  selected_Setter_(mthis, __arg_0) => mthis["selected"] = __arg_0;
+  selected_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptionElement */, "selected", __arg_0);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionElement */, "text");
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  text_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptionElement */, "text", __arg_0);
+
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionElement */, "value");
+
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptionElement */, "value", __arg_0);
 
 }
 
 class BlinkHTMLOptionsCollection extends BlinkHTMLCollection {
   static final instance = new BlinkHTMLOptionsCollection();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionsCollection */, "length");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  length_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptionsCollection */, "length", __arg_0);
+
+  selectedIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOptionsCollection */, "selectedIndex");
+
+  selectedIndex_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOptionsCollection */, "selectedIndex", __arg_0);
+
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "__setter__", [__arg_0, __arg_1]);
+
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "add", []);
+
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "add", [__arg_0]);
+
+  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "add", [__arg_0, __arg_1]);
+
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "item", []);
+
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "item", [__arg_0]);
+
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "namedItem", []);
+
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "namedItem", [__arg_0]);
+
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "remove", []);
+
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOptionsCollection */, "remove", [__arg_0]);
 
 }
 
 class BlinkHTMLOutputElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLOutputElement();
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "defaultValue");
 
-  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultValue");
+  defaultValue_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOutputElement */, "defaultValue", __arg_0);
 
-  defaultValue_Setter_(mthis, __arg_0) => mthis["defaultValue"] = __arg_0;
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "form");
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "htmlFor");
 
-  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "htmlFor");
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "labels");
 
-  htmlFor_Setter_(mthis, __arg_0) => mthis["htmlFor"] = __arg_0;
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "name");
 
-  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOutputElement */, "name", __arg_0);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "type");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "validationMessage");
 
-  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "validity");
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "value");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLOutputElement */, "value", __arg_0);
 
-  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLOutputElement */, "willValidate");
 
-  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOutputElement */, "checkValidity", []);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOutputElement */, "reportValidity", []);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOutputElement */, "setCustomValidity", []);
 
-  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLOutputElement */, "setCustomValidity", [__arg_0]);
 
 }
 
 class BlinkHTMLParagraphElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLParagraphElement();
 
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLParagraphElement */, "align");
+
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLParagraphElement */, "align", __arg_0);
+
 }
 
 class BlinkHTMLParamElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLParamElement();
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLParamElement */, "name");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLParamElement */, "name", __arg_0);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLParamElement */, "type");
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLParamElement */, "type", __arg_0);
+
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLParamElement */, "value");
+
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLParamElement */, "value", __arg_0);
+
+  valueType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLParamElement */, "valueType");
+
+  valueType_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLParamElement */, "valueType", __arg_0);
 
 }
 
@@ -6842,189 +8881,197 @@
 class BlinkHTMLPreElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLPreElement();
 
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLPreElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLPreElement */, "width", __arg_0);
+
 }
 
 class BlinkHTMLProgressElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLProgressElement();
 
-  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLProgressElement */, "labels");
 
-  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "max");
+  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLProgressElement */, "max");
 
-  max_Setter_(mthis, __arg_0) => mthis["max"] = __arg_0;
+  max_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLProgressElement */, "max", __arg_0);
 
-  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLProgressElement */, "position");
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLProgressElement */, "value");
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLProgressElement */, "value", __arg_0);
 
 }
 
 class BlinkHTMLQuoteElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLQuoteElement();
 
-  cite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cite");
+  cite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLQuoteElement */, "cite");
 
-  cite_Setter_(mthis, __arg_0) => mthis["cite"] = __arg_0;
+  cite_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLQuoteElement */, "cite", __arg_0);
 
 }
 
 class BlinkHTMLScriptElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLScriptElement();
 
-  async_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "async");
+  async_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "async");
 
-  async_Setter_(mthis, __arg_0) => mthis["async"] = __arg_0;
+  async_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "async", __arg_0);
 
-  charset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charset");
+  charset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "charset");
 
-  charset_Setter_(mthis, __arg_0) => mthis["charset"] = __arg_0;
+  charset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "charset", __arg_0);
 
-  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crossOrigin");
+  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "crossOrigin");
 
-  crossOrigin_Setter_(mthis, __arg_0) => mthis["crossOrigin"] = __arg_0;
+  crossOrigin_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "crossOrigin", __arg_0);
 
-  defer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defer");
+  defer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "defer");
 
-  defer_Setter_(mthis, __arg_0) => mthis["defer"] = __arg_0;
+  defer_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "defer", __arg_0);
 
-  event_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "event");
+  event_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "event");
 
-  event_Setter_(mthis, __arg_0) => mthis["event"] = __arg_0;
+  event_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "event", __arg_0);
 
-  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "htmlFor");
+  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "htmlFor");
 
-  htmlFor_Setter_(mthis, __arg_0) => mthis["htmlFor"] = __arg_0;
+  htmlFor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "htmlFor", __arg_0);
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "integrity");
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  integrity_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "integrity", __arg_0);
 
-  nonce_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nonce");
+  nonce_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "nonce");
 
-  nonce_Setter_(mthis, __arg_0) => mthis["nonce"] = __arg_0;
+  nonce_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "nonce", __arg_0);
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "src");
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "src", __arg_0);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "text");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  text_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "text", __arg_0);
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLScriptElement */, "type");
+
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLScriptElement */, "type", __arg_0);
 
 }
 
 class BlinkHTMLSelectElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLSelectElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "autofocus");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  autofocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "autofocus", __arg_0);
 
-  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "disabled");
 
-  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "disabled", __arg_0);
 
-  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0, __arg_1]);
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "form");
 
-  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "labels");
 
-  autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "length");
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  length_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "length", __arg_0);
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  multiple_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "multiple");
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  multiple_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "multiple", __arg_0);
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "name");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "name", __arg_0);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  options_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "options");
 
-  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
+  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "required");
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  required_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "required", __arg_0);
 
-  length_Setter_(mthis, __arg_0) => mthis["length"] = __arg_0;
+  selectedIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "selectedIndex");
 
-  multiple_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "multiple");
+  selectedIndex_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "selectedIndex", __arg_0);
 
-  multiple_Setter_(mthis, __arg_0) => mthis["multiple"] = __arg_0;
+  selectedOptions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "selectedOptions");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "size");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  size_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "size", __arg_0);
 
-  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "type");
 
-  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "validationMessage");
 
-  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "required");
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "validity");
 
-  required_Setter_(mthis, __arg_0) => mthis["required"] = __arg_0;
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "value");
 
-  selectedIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectedIndex");
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSelectElement */, "value", __arg_0);
 
-  selectedIndex_Setter_(mthis, __arg_0) => mthis["selectedIndex"] = __arg_0;
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSelectElement */, "willValidate");
 
-  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "__setter__", [__arg_0, __arg_1]);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "add", []);
 
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "add", [__arg_0]);
 
-  size_Setter_(mthis, __arg_0) => mthis["size"] = __arg_0;
+  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "add", [__arg_0, __arg_1]);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "checkValidity", []);
 
-  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "item", []);
 
-  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "item", [__arg_0]);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "namedItem", []);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "namedItem", [__arg_0]);
 
-  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "reportValidity", []);
+
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "setCustomValidity", []);
+
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLSelectElement */, "setCustomValidity", [__arg_0]);
 
 }
 
 class BlinkHTMLShadowElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLShadowElement();
 
-  getDistributedNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDistributedNodes", []);
+  getDistributedNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLShadowElement */, "getDistributedNodes", []);
 
 }
 
 class BlinkHTMLSourceElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLSourceElement();
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSourceElement */, "media");
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  media_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSourceElement */, "media", __arg_0);
 
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSourceElement */, "sizes");
 
-  media_Setter_(mthis, __arg_0) => mthis["media"] = __arg_0;
+  sizes_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSourceElement */, "sizes", __arg_0);
 
-  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sizes");
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSourceElement */, "src");
 
-  sizes_Setter_(mthis, __arg_0) => mthis["sizes"] = __arg_0;
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSourceElement */, "src", __arg_0);
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  srcset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSourceElement */, "srcset");
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  srcset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSourceElement */, "srcset", __arg_0);
 
-  srcset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "srcset");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLSourceElement */, "type");
 
-  srcset_Setter_(mthis, __arg_0) => mthis["srcset"] = __arg_0;
-
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
-
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLSourceElement */, "type", __arg_0);
 
 }
 
@@ -7036,297 +9083,451 @@
 class BlinkHTMLStyleElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLStyleElement();
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLStyleElement */, "disabled");
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLStyleElement */, "disabled", __arg_0);
 
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLStyleElement */, "media");
 
-  media_Setter_(mthis, __arg_0) => mthis["media"] = __arg_0;
+  media_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLStyleElement */, "media", __arg_0);
 
-  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sheet");
+  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLStyleElement */, "sheet");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLStyleElement */, "type");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLStyleElement */, "type", __arg_0);
 
 }
 
 class BlinkHTMLTableCaptionElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableCaptionElement();
 
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCaptionElement */, "align");
+
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCaptionElement */, "align", __arg_0);
+
 }
 
 class BlinkHTMLTableCellElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableCellElement();
 
-  cellIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cellIndex");
+  abbr_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "abbr");
 
-  colSpan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "colSpan");
+  abbr_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "abbr", __arg_0);
 
-  colSpan_Setter_(mthis, __arg_0) => mthis["colSpan"] = __arg_0;
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "align");
 
-  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "headers");
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "align", __arg_0);
 
-  headers_Setter_(mthis, __arg_0) => mthis["headers"] = __arg_0;
+  axis_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "axis");
 
-  rowSpan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rowSpan");
+  axis_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "axis", __arg_0);
 
-  rowSpan_Setter_(mthis, __arg_0) => mthis["rowSpan"] = __arg_0;
+  bgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "bgColor");
+
+  bgColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "bgColor", __arg_0);
+
+  cellIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "cellIndex");
+
+  ch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "ch");
+
+  ch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "ch", __arg_0);
+
+  chOff_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "chOff");
+
+  chOff_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "chOff", __arg_0);
+
+  colSpan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "colSpan");
+
+  colSpan_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "colSpan", __arg_0);
+
+  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "headers");
+
+  headers_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "headers", __arg_0);
+
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "height");
+
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "height", __arg_0);
+
+  noWrap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "noWrap");
+
+  noWrap_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "noWrap", __arg_0);
+
+  rowSpan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "rowSpan");
+
+  rowSpan_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "rowSpan", __arg_0);
+
+  scope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "scope");
+
+  scope_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "scope", __arg_0);
+
+  vAlign_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "vAlign");
+
+  vAlign_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "vAlign", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableCellElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableCellElement */, "width", __arg_0);
 
 }
 
 class BlinkHTMLTableColElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableColElement();
 
-  span_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "span");
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableColElement */, "align");
 
-  span_Setter_(mthis, __arg_0) => mthis["span"] = __arg_0;
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableColElement */, "align", __arg_0);
+
+  ch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableColElement */, "ch");
+
+  ch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableColElement */, "ch", __arg_0);
+
+  chOff_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableColElement */, "chOff");
+
+  chOff_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableColElement */, "chOff", __arg_0);
+
+  span_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableColElement */, "span");
+
+  span_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableColElement */, "span", __arg_0);
+
+  vAlign_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableColElement */, "vAlign");
+
+  vAlign_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableColElement */, "vAlign", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableColElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableColElement */, "width", __arg_0);
 
 }
 
 class BlinkHTMLTableElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableElement();
 
-  border_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "border");
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "align");
 
-  border_Setter_(mthis, __arg_0) => mthis["border"] = __arg_0;
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "align", __arg_0);
 
-  caption_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "caption");
+  bgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "bgColor");
 
-  caption_Setter_(mthis, __arg_0) => mthis["caption"] = __arg_0;
+  bgColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "bgColor", __arg_0);
 
-  createCaption_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createCaption", []);
+  border_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "border");
 
-  createTBody_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTBody", []);
+  border_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "border", __arg_0);
 
-  createTFoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTFoot", []);
+  caption_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "caption");
 
-  createTHead_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTHead", []);
+  caption_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "caption", __arg_0);
 
-  deleteCaption_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteCaption", []);
+  cellPadding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "cellPadding");
 
-  deleteRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRow", []);
+  cellPadding_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "cellPadding", __arg_0);
 
-  deleteRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRow", [__arg_0]);
+  cellSpacing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "cellSpacing");
 
-  deleteTFoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteTFoot", []);
+  cellSpacing_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "cellSpacing", __arg_0);
 
-  deleteTHead_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteTHead", []);
+  frame_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "frame");
 
-  insertRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRow", []);
+  frame_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "frame", __arg_0);
 
-  insertRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRow", [__arg_0]);
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "rows");
 
-  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rows");
+  rules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "rules");
 
-  tBodies_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tBodies");
+  rules_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "rules", __arg_0);
 
-  tFoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tFoot");
+  summary_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "summary");
 
-  tFoot_Setter_(mthis, __arg_0) => mthis["tFoot"] = __arg_0;
+  summary_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "summary", __arg_0);
 
-  tHead_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tHead");
+  tBodies_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "tBodies");
 
-  tHead_Setter_(mthis, __arg_0) => mthis["tHead"] = __arg_0;
+  tFoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "tFoot");
+
+  tFoot_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "tFoot", __arg_0);
+
+  tHead_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "tHead");
+
+  tHead_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "tHead", __arg_0);
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableElement */, "width");
+
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableElement */, "width", __arg_0);
+
+  createCaption_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "createCaption", []);
+
+  createTBody_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "createTBody", []);
+
+  createTFoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "createTFoot", []);
+
+  createTHead_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "createTHead", []);
+
+  deleteCaption_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "deleteCaption", []);
+
+  deleteRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "deleteRow", []);
+
+  deleteRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "deleteRow", [__arg_0]);
+
+  deleteTFoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "deleteTFoot", []);
+
+  deleteTHead_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "deleteTHead", []);
+
+  insertRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "insertRow", []);
+
+  insertRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableElement */, "insertRow", [__arg_0]);
 
 }
 
 class BlinkHTMLTableRowElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableRowElement();
 
-  cells_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cells");
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableRowElement */, "align");
 
-  deleteCell_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteCell", []);
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableRowElement */, "align", __arg_0);
 
-  deleteCell_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteCell", [__arg_0]);
+  bgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableRowElement */, "bgColor");
 
-  insertCell_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertCell", []);
+  bgColor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableRowElement */, "bgColor", __arg_0);
 
-  insertCell_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertCell", [__arg_0]);
+  cells_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableRowElement */, "cells");
 
-  rowIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rowIndex");
+  ch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableRowElement */, "ch");
 
-  sectionRowIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sectionRowIndex");
+  ch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableRowElement */, "ch", __arg_0);
+
+  chOff_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableRowElement */, "chOff");
+
+  chOff_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableRowElement */, "chOff", __arg_0);
+
+  rowIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableRowElement */, "rowIndex");
+
+  sectionRowIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableRowElement */, "sectionRowIndex");
+
+  vAlign_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableRowElement */, "vAlign");
+
+  vAlign_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableRowElement */, "vAlign", __arg_0);
+
+  deleteCell_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableRowElement */, "deleteCell", []);
+
+  deleteCell_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableRowElement */, "deleteCell", [__arg_0]);
+
+  insertCell_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableRowElement */, "insertCell", []);
+
+  insertCell_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableRowElement */, "insertCell", [__arg_0]);
 
 }
 
 class BlinkHTMLTableSectionElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableSectionElement();
 
-  deleteRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRow", []);
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableSectionElement */, "align");
 
-  deleteRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRow", [__arg_0]);
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableSectionElement */, "align", __arg_0);
 
-  insertRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRow", []);
+  ch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableSectionElement */, "ch");
 
-  insertRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRow", [__arg_0]);
+  ch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableSectionElement */, "ch", __arg_0);
 
-  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rows");
+  chOff_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableSectionElement */, "chOff");
+
+  chOff_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableSectionElement */, "chOff", __arg_0);
+
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableSectionElement */, "rows");
+
+  vAlign_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTableSectionElement */, "vAlign");
+
+  vAlign_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTableSectionElement */, "vAlign", __arg_0);
+
+  deleteRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableSectionElement */, "deleteRow", []);
+
+  deleteRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableSectionElement */, "deleteRow", [__arg_0]);
+
+  insertRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableSectionElement */, "insertRow", []);
+
+  insertRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTableSectionElement */, "insertRow", [__arg_0]);
 
 }
 
 class BlinkHTMLTemplateElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTemplateElement();
 
-  content_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "content");
+  content_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTemplateElement */, "content");
 
 }
 
 class BlinkHTMLTextAreaElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTextAreaElement();
 
-  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
+  autocapitalize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "autocapitalize");
 
-  autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
+  autocapitalize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "autocapitalize", __arg_0);
 
-  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "autofocus");
 
-  cols_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cols");
+  autofocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "autofocus", __arg_0);
 
-  cols_Setter_(mthis, __arg_0) => mthis["cols"] = __arg_0;
+  cols_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "cols");
 
-  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultValue");
+  cols_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "cols", __arg_0);
 
-  defaultValue_Setter_(mthis, __arg_0) => mthis["defaultValue"] = __arg_0;
+  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "defaultValue");
 
-  dirName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dirName");
+  defaultValue_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "defaultValue", __arg_0);
 
-  dirName_Setter_(mthis, __arg_0) => mthis["dirName"] = __arg_0;
+  dirName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "dirName");
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  dirName_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "dirName", __arg_0);
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "disabled");
 
-  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "disabled", __arg_0);
 
-  inputMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputMode");
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "form");
 
-  inputMode_Setter_(mthis, __arg_0) => mthis["inputMode"] = __arg_0;
+  inputMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "inputMode");
 
-  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
+  inputMode_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "inputMode", __arg_0);
 
-  maxLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxLength");
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "labels");
 
-  maxLength_Setter_(mthis, __arg_0) => mthis["maxLength"] = __arg_0;
+  maxLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "maxLength");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  maxLength_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "maxLength", __arg_0);
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  minLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "minLength");
 
-  placeholder_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "placeholder");
+  minLength_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "minLength", __arg_0);
 
-  placeholder_Setter_(mthis, __arg_0) => mthis["placeholder"] = __arg_0;
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "name");
 
-  readOnly_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readOnly");
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "name", __arg_0);
 
-  readOnly_Setter_(mthis, __arg_0) => mthis["readOnly"] = __arg_0;
+  placeholder_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "placeholder");
 
-  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "required");
+  placeholder_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "placeholder", __arg_0);
 
-  required_Setter_(mthis, __arg_0) => mthis["required"] = __arg_0;
+  readOnly_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "readOnly");
 
-  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rows");
+  readOnly_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "readOnly", __arg_0);
 
-  rows_Setter_(mthis, __arg_0) => mthis["rows"] = __arg_0;
+  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "required");
 
-  select_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "select", []);
+  required_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "required", __arg_0);
 
-  selectionDirection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionDirection");
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "rows");
 
-  selectionDirection_Setter_(mthis, __arg_0) => mthis["selectionDirection"] = __arg_0;
+  rows_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "rows", __arg_0);
 
-  selectionEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionEnd");
+  selectionDirection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "selectionDirection");
 
-  selectionEnd_Setter_(mthis, __arg_0) => mthis["selectionEnd"] = __arg_0;
+  selectionDirection_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "selectionDirection", __arg_0);
 
-  selectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionStart");
+  selectionEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "selectionEnd");
 
-  selectionStart_Setter_(mthis, __arg_0) => mthis["selectionStart"] = __arg_0;
+  selectionEnd_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "selectionEnd", __arg_0);
 
-  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
+  selectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "selectionStart");
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
+  selectionStart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "selectionStart", __arg_0);
 
-  setRangeText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", []);
+  textLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "textLength");
 
-  setRangeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0]);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "type");
 
-  setRangeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1]);
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "validationMessage");
 
-  setRangeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1, __arg_2]);
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "validity");
 
-  setRangeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "value");
 
-  setSelectionRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", []);
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "value", __arg_0);
 
-  setSelectionRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0]);
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "willValidate");
 
-  setSelectionRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0, __arg_1]);
+  wrap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTextAreaElement */, "wrap");
 
-  setSelectionRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0, __arg_1, __arg_2]);
+  wrap_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTextAreaElement */, "wrap", __arg_0);
 
-  textLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textLength");
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "checkValidity", []);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  reportValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "reportValidity", []);
 
-  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
+  select_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "select", []);
 
-  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setCustomValidity", []);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setCustomValidity", [__arg_0]);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  setRangeText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setRangeText", []);
 
-  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
+  setRangeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setRangeText", [__arg_0]);
 
-  wrap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wrap");
+  setRangeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setRangeText", [__arg_0, __arg_1]);
 
-  wrap_Setter_(mthis, __arg_0) => mthis["wrap"] = __arg_0;
+  setRangeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setRangeText", [__arg_0, __arg_1, __arg_2]);
+
+  setRangeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setRangeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  setSelectionRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setSelectionRange", []);
+
+  setSelectionRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setSelectionRange", [__arg_0]);
+
+  setSelectionRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setSelectionRange", [__arg_0, __arg_1]);
+
+  setSelectionRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* HTMLTextAreaElement */, "setSelectionRange", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkHTMLTitleElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTitleElement();
 
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTitleElement */, "text");
+
+  text_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTitleElement */, "text", __arg_0);
+
 }
 
 class BlinkHTMLTrackElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTrackElement();
 
-  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "default");
+  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTrackElement */, "default");
 
-  default_Setter_(mthis, __arg_0) => mthis["default"] = __arg_0;
+  default_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTrackElement */, "default", __arg_0);
 
-  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTrackElement */, "kind");
 
-  integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
+  kind_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTrackElement */, "kind", __arg_0);
 
-  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTrackElement */, "label");
 
-  kind_Setter_(mthis, __arg_0) => mthis["kind"] = __arg_0;
+  label_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTrackElement */, "label", __arg_0);
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTrackElement */, "readyState");
 
-  label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTrackElement */, "src");
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTrackElement */, "src", __arg_0);
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  srclang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTrackElement */, "srclang");
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  srclang_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLTrackElement */, "srclang", __arg_0);
 
-  srclang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "srclang");
-
-  srclang_Setter_(mthis, __arg_0) => mthis["srclang"] = __arg_0;
-
-  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLTrackElement */, "track");
 
 }
 
 class BlinkHTMLUListElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLUListElement();
 
+  compact_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLUListElement */, "compact");
+
+  compact_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLUListElement */, "compact", __arg_0);
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLUListElement */, "type");
+
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLUListElement */, "type", __arg_0);
+
 }
 
 class BlinkHTMLUnknownElement extends BlinkHTMLElement {
@@ -7337,1973 +9538,1950 @@
 class BlinkHTMLVideoElement extends BlinkHTMLMediaElement {
   static final instance = new BlinkHTMLVideoElement();
 
-  getVideoPlaybackQuality_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVideoPlaybackQuality", []);
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "height");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLVideoElement */, "height", __arg_0);
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  poster_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "poster");
 
-  poster_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "poster");
+  poster_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLVideoElement */, "poster", __arg_0);
 
-  poster_Setter_(mthis, __arg_0) => mthis["poster"] = __arg_0;
+  videoHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "videoHeight");
 
-  videoHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "videoHeight");
+  videoWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "videoWidth");
 
-  videoWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "videoWidth");
+  webkitDecodedFrameCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "webkitDecodedFrameCount");
 
-  webkitDecodedFrameCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitDecodedFrameCount");
+  webkitDisplayingFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "webkitDisplayingFullscreen");
 
-  webkitDisplayingFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitDisplayingFullscreen");
+  webkitDroppedFrameCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "webkitDroppedFrameCount");
 
-  webkitDroppedFrameCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitDroppedFrameCount");
+  webkitSupportsFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "webkitSupportsFullscreen");
 
-  webkitEnterFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitEnterFullScreen", []);
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HTMLVideoElement */, "width");
 
-  webkitEnterFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitEnterFullscreen", []);
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* HTMLVideoElement */, "width", __arg_0);
 
-  webkitExitFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitExitFullScreen", []);
+  getVideoPlaybackQuality_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLVideoElement */, "getVideoPlaybackQuality", []);
 
-  webkitExitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitExitFullscreen", []);
+  webkitEnterFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLVideoElement */, "webkitEnterFullScreen", []);
 
-  webkitSupportsFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitSupportsFullscreen");
+  webkitEnterFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLVideoElement */, "webkitEnterFullscreen", []);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  webkitExitFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLVideoElement */, "webkitExitFullScreen", []);
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  webkitExitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* HTMLVideoElement */, "webkitExitFullscreen", []);
 
 }
 
 class BlinkHashChangeEvent extends BlinkEvent {
   static final instance = new BlinkHashChangeEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "HashChangeEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("HashChangeEvent");
 
-  initHashChangeEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", []);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("HashChangeEvent", [__arg_0]);
 
-  initHashChangeEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", [__arg_0]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("HashChangeEvent", [__arg_0, __arg_1]);
 
-  initHashChangeEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", [__arg_0, __arg_1]);
+  newURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HashChangeEvent */, "newURL");
 
-  initHashChangeEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", [__arg_0, __arg_1, __arg_2]);
+  oldURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* HashChangeEvent */, "oldURL");
 
-  initHashChangeEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  initHashChangeEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* HashChangeEvent */, "initHashChangeEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initHashChangeEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  initHashChangeEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* HashChangeEvent */, "initHashChangeEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  newURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newURL");
-
-  oldURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oldURL");
+  initHashChangeEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* HashChangeEvent */, "initHashChangeEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
 }
 
 class BlinkHeaders {
   static final instance = new BlinkHeaders();
 
-  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "append", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Headers");
 
-  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0]);
-
-  append_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0, __arg_1]);
-
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Headers"), []);
-
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Headers"), [__arg_0]);
-
-  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
-
-  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
-
-  forEach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "forEach", []);
-
-  forEach_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "forEach", [__arg_0]);
-
-  forEach_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "forEach", [__arg_0, __arg_1]);
-
-  getAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAll", []);
-
-  getAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAll", [__arg_0]);
-
-  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
-
-  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
-
-  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
-
-  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
-
-  set_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "set", []);
-
-  set_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "set", [__arg_0]);
-
-  set_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "set", [__arg_0, __arg_1]);
-
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Headers", [__arg_0]);
 
 }
 
 class BlinkHistory {
   static final instance = new BlinkHistory();
 
-  back_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "back", []);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* History */, "length");
 
-  forward_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "forward", []);
+  options_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* History */, "options");
 
-  go_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "go", []);
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* History */, "state");
 
-  go_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "go", [__arg_0]);
+  back_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* History */, "back", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  forward_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* History */, "forward", []);
 
-  pushState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pushState", []);
+  go_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* History */, "go", []);
 
-  pushState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "pushState", [__arg_0]);
+  go_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* History */, "go", [__arg_0]);
 
-  pushState_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "pushState", [__arg_0, __arg_1]);
+  pushState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* History */, "pushState", [__arg_0]);
 
-  pushState_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "pushState", [__arg_0, __arg_1, __arg_2]);
+  pushState_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* History */, "pushState", [__arg_0, __arg_1]);
 
-  replaceState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceState", []);
+  pushState_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* History */, "pushState", [__arg_0, __arg_1, __arg_2]);
 
-  replaceState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceState", [__arg_0]);
+  pushState_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* History */, "pushState", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  replaceState_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceState", [__arg_0, __arg_1]);
+  replaceState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* History */, "replaceState", [__arg_0]);
 
-  replaceState_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "replaceState", [__arg_0, __arg_1, __arg_2]);
+  replaceState_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* History */, "replaceState", [__arg_0, __arg_1]);
 
-  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "state");
+  replaceState_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* History */, "replaceState", [__arg_0, __arg_1, __arg_2]);
+
+  replaceState_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* History */, "replaceState", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkIDBCursor {
   static final instance = new BlinkIDBCursor();
 
-  advance_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "advance", []);
+  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBCursor */, "direction");
 
-  advance_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "advance", [__arg_0]);
+  key_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBCursor */, "key");
 
-  continuePrimaryKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "continuePrimaryKey", []);
+  primaryKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBCursor */, "primaryKey");
 
-  continuePrimaryKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "continuePrimaryKey", [__arg_0]);
+  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBCursor */, "source");
 
-  continuePrimaryKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "continuePrimaryKey", [__arg_0, __arg_1]);
+  advance_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "advance", []);
 
-  continue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "continue", []);
+  advance_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "advance", [__arg_0]);
 
-  continue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "continue", [__arg_0]);
+  continue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "continue", []);
 
-  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
+  continue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "continue", [__arg_0]);
 
-  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "direction");
+  continuePrimaryKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "continuePrimaryKey", []);
 
-  key_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "key");
+  continuePrimaryKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "continuePrimaryKey", [__arg_0]);
 
-  primaryKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "primaryKey");
+  continuePrimaryKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "continuePrimaryKey", [__arg_0, __arg_1]);
 
-  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "source");
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "delete", []);
 
-  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "update", []);
+  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "update", []);
 
-  update_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "update", [__arg_0]);
+  update_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBCursor */, "update", [__arg_0]);
 
 }
 
 class BlinkIDBCursorWithValue extends BlinkIDBCursor {
   static final instance = new BlinkIDBCursorWithValue();
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBCursorWithValue */, "value");
 
 }
 
 class BlinkIDBDatabase extends BlinkEventTarget {
   static final instance = new BlinkIDBDatabase();
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBDatabase */, "name");
 
-  createObjectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createObjectStore", []);
+  objectStoreNames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBDatabase */, "objectStoreNames");
 
-  createObjectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createObjectStore", [__arg_0]);
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBDatabase */, "onabort");
 
-  createObjectStore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createObjectStore", [__arg_0, __arg_1]);
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBDatabase */, "onabort", __arg_0);
 
-  deleteObjectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteObjectStore", []);
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBDatabase */, "onclose");
 
-  deleteObjectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteObjectStore", [__arg_0]);
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBDatabase */, "onclose", __arg_0);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBDatabase */, "onerror");
 
-  objectStoreNames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "objectStoreNames");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBDatabase */, "onerror", __arg_0);
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  onversionchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBDatabase */, "onversionchange");
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  onversionchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBDatabase */, "onversionchange", __arg_0);
 
-  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
+  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBDatabase */, "version");
 
-  onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "close", []);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  createObjectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "createObjectStore", []);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  createObjectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "createObjectStore", [__arg_0]);
 
-  onversionchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onversionchange");
+  createObjectStore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "createObjectStore", [__arg_0, __arg_1]);
 
-  onversionchange_Setter_(mthis, __arg_0) => mthis["onversionchange"] = __arg_0;
+  deleteObjectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "deleteObjectStore", []);
 
-  transaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transaction", []);
+  deleteObjectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "deleteObjectStore", [__arg_0]);
 
-  transaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0]);
+  transaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "transaction", []);
 
-  transaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0, __arg_1]);
+  transaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "transaction", [__arg_0]);
 
-  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "version");
+  transaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBDatabase */, "transaction", [__arg_0, __arg_1]);
 
 }
 
 class BlinkIDBFactory {
   static final instance = new BlinkIDBFactory();
 
-  cmp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cmp", []);
+  cmp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "cmp", []);
 
-  cmp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cmp", [__arg_0]);
+  cmp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "cmp", [__arg_0]);
 
-  cmp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "cmp", [__arg_0, __arg_1]);
+  cmp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "cmp", [__arg_0, __arg_1]);
 
-  deleteDatabase_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteDatabase", []);
+  deleteDatabase_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "deleteDatabase", []);
 
-  deleteDatabase_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteDatabase", [__arg_0]);
+  deleteDatabase_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "deleteDatabase", [__arg_0]);
 
-  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "open", []);
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "open", []);
 
-  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0]);
+  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "open", [__arg_0]);
 
-  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1]);
+  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "open", [__arg_0, __arg_1]);
 
-  webkitGetDatabaseNames_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetDatabaseNames", []);
+  webkitGetDatabaseNames_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBFactory */, "webkitGetDatabaseNames", []);
 
 }
 
 class BlinkIDBIndex {
   static final instance = new BlinkIDBIndex();
 
-  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "count", []);
+  keyPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBIndex */, "keyPath");
 
-  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "count", [__arg_0]);
+  multiEntry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBIndex */, "multiEntry");
 
-  getKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getKey", []);
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBIndex */, "name");
 
-  getKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getKey", [__arg_0]);
+  objectStore_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBIndex */, "objectStore");
 
-  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
+  unique_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBIndex */, "unique");
 
-  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
+  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "count", []);
 
-  keyPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyPath");
+  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "count", [__arg_0]);
 
-  multiEntry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "multiEntry");
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "get", []);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "get", [__arg_0]);
 
-  objectStore_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "objectStore");
+  getAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "getAll", []);
 
-  openCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", []);
+  getAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "getAll", [__arg_0]);
 
-  openCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", [__arg_0]);
+  getAll_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "getAll", [__arg_0, __arg_1]);
 
-  openCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", [__arg_0, __arg_1]);
+  getAllKeys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "getAllKeys", []);
 
-  openKeyCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", []);
+  getAllKeys_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "getAllKeys", [__arg_0]);
 
-  openKeyCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", [__arg_0]);
+  getAllKeys_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "getAllKeys", [__arg_0, __arg_1]);
 
-  openKeyCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", [__arg_0, __arg_1]);
+  getKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "getKey", []);
 
-  unique_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unique");
+  getKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "getKey", [__arg_0]);
+
+  openCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "openCursor", []);
+
+  openCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "openCursor", [__arg_0]);
+
+  openCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "openCursor", [__arg_0, __arg_1]);
+
+  openKeyCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "openKeyCursor", []);
+
+  openKeyCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "openKeyCursor", [__arg_0]);
+
+  openKeyCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBIndex */, "openKeyCursor", [__arg_0, __arg_1]);
 
 }
 
 class BlinkIDBKeyRange {
   static final instance = new BlinkIDBKeyRange();
 
-  bound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "bound", []);
+  lower_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBKeyRange */, "lower");
 
-  bound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "bound", [__arg_0]);
+  lowerOpen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBKeyRange */, "lowerOpen");
 
-  bound_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "bound", [__arg_0, __arg_1]);
+  upper_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBKeyRange */, "upper");
 
-  bound_Callback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "bound", [__arg_0, __arg_1, __arg_2]);
+  upperOpen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBKeyRange */, "upperOpen");
 
-  bound_Callback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "bound", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  bound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "bound", []);
 
-  lowerBound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "lowerBound", []);
+  bound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "bound", [__arg_0]);
 
-  lowerBound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "lowerBound", [__arg_0]);
+  bound_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "bound", [__arg_0, __arg_1]);
 
-  lowerBound_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "lowerBound", [__arg_0, __arg_1]);
+  bound_Callback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "bound", [__arg_0, __arg_1, __arg_2]);
 
-  lowerOpen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lowerOpen");
+  bound_Callback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "bound", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  lower_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lower");
+  lowerBound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "lowerBound", []);
 
-  only_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "only", []);
+  lowerBound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "lowerBound", [__arg_0]);
 
-  only_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "only", [__arg_0]);
+  lowerBound_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "lowerBound", [__arg_0, __arg_1]);
 
-  upperBound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "upperBound", []);
+  only_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "only", []);
 
-  upperBound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "upperBound", [__arg_0]);
+  only_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "only", [__arg_0]);
 
-  upperBound_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "upperBound", [__arg_0, __arg_1]);
+  upperBound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "upperBound", []);
 
-  upperOpen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "upperOpen");
+  upperBound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "upperBound", [__arg_0]);
 
-  upper_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "upper");
+  upperBound_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange") /* IDBKeyRange */, "upperBound", [__arg_0, __arg_1]);
 
 }
 
 class BlinkIDBObjectStore {
   static final instance = new BlinkIDBObjectStore();
 
-  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
+  autoIncrement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBObjectStore */, "autoIncrement");
 
-  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
+  indexNames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBObjectStore */, "indexNames");
 
-  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0, __arg_1]);
+  keyPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBObjectStore */, "keyPath");
 
-  autoIncrement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autoIncrement");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBObjectStore */, "name");
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  transaction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBObjectStore */, "transaction");
 
-  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "count", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "add", []);
 
-  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "count", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "add", [__arg_0]);
 
-  createIndex_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createIndex", []);
+  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "add", [__arg_0, __arg_1]);
 
-  createIndex_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createIndex", [__arg_0]);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "clear", []);
 
-  createIndex_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createIndex", [__arg_0, __arg_1]);
+  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "count", []);
 
-  createIndex_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createIndex", [__arg_0, __arg_1, __arg_2]);
+  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "count", [__arg_0]);
 
-  deleteIndex_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteIndex", []);
+  createIndex_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "createIndex", []);
 
-  deleteIndex_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteIndex", [__arg_0]);
+  createIndex_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "createIndex", [__arg_0]);
 
-  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
+  createIndex_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "createIndex", [__arg_0, __arg_1]);
 
-  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
+  createIndex_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "createIndex", [__arg_0, __arg_1, __arg_2]);
 
-  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "delete", []);
 
-  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "delete", [__arg_0]);
 
-  indexNames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "indexNames");
+  deleteIndex_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "deleteIndex", []);
 
-  index_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "index", []);
+  deleteIndex_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "deleteIndex", [__arg_0]);
 
-  index_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "index", [__arg_0]);
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "get", []);
 
-  keyPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyPath");
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "get", [__arg_0]);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  getAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "getAll", []);
 
-  openCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", []);
+  getAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "getAll", [__arg_0]);
 
-  openCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", [__arg_0]);
+  getAll_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "getAll", [__arg_0, __arg_1]);
 
-  openCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", [__arg_0, __arg_1]);
+  getAllKeys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "getAllKeys", []);
 
-  openKeyCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", []);
+  getAllKeys_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "getAllKeys", [__arg_0]);
 
-  openKeyCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", [__arg_0]);
+  getAllKeys_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "getAllKeys", [__arg_0, __arg_1]);
 
-  openKeyCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", [__arg_0, __arg_1]);
+  index_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "index", []);
 
-  put_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "put", []);
+  index_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "index", [__arg_0]);
 
-  put_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "put", [__arg_0]);
+  openCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "openCursor", []);
 
-  put_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "put", [__arg_0, __arg_1]);
+  openCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "openCursor", [__arg_0]);
 
-  transaction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transaction");
+  openCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "openCursor", [__arg_0, __arg_1]);
+
+  openKeyCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "openKeyCursor", []);
+
+  openKeyCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "openKeyCursor", [__arg_0]);
+
+  openKeyCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "openKeyCursor", [__arg_0, __arg_1]);
+
+  put_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "put", []);
+
+  put_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "put", [__arg_0]);
+
+  put_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* IDBObjectStore */, "put", [__arg_0, __arg_1]);
 
 }
 
 class BlinkIDBOpenDBRequest extends BlinkIDBRequest {
   static final instance = new BlinkIDBOpenDBRequest();
 
-  onblocked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblocked");
+  onblocked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBOpenDBRequest */, "onblocked");
 
-  onblocked_Setter_(mthis, __arg_0) => mthis["onblocked"] = __arg_0;
+  onblocked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBOpenDBRequest */, "onblocked", __arg_0);
 
-  onupgradeneeded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onupgradeneeded");
+  onupgradeneeded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBOpenDBRequest */, "onupgradeneeded");
 
-  onupgradeneeded_Setter_(mthis, __arg_0) => mthis["onupgradeneeded"] = __arg_0;
+  onupgradeneeded_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBOpenDBRequest */, "onupgradeneeded", __arg_0);
 
 }
 
 class BlinkIDBRequest extends BlinkEventTarget {
   static final instance = new BlinkIDBRequest();
 
-  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBRequest */, "error");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBRequest */, "onerror");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBRequest */, "onerror", __arg_0);
 
-  onsuccess_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuccess");
+  onsuccess_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBRequest */, "onsuccess");
 
-  onsuccess_Setter_(mthis, __arg_0) => mthis["onsuccess"] = __arg_0;
+  onsuccess_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBRequest */, "onsuccess", __arg_0);
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBRequest */, "readyState");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBRequest */, "result");
 
-  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "source");
+  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBRequest */, "source");
 
-  transaction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transaction");
+  transaction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBRequest */, "transaction");
 
 }
 
 class BlinkIDBTransaction extends BlinkEventTarget {
   static final instance = new BlinkIDBTransaction();
 
-  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
+  db_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBTransaction */, "db");
 
-  db_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "db");
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBTransaction */, "error");
 
-  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBTransaction */, "mode");
 
-  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
+  objectStoreNames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBTransaction */, "objectStoreNames");
 
-  objectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "objectStore", []);
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBTransaction */, "onabort");
 
-  objectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "objectStore", [__arg_0]);
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBTransaction */, "onabort", __arg_0);
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  oncomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBTransaction */, "oncomplete");
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  oncomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBTransaction */, "oncomplete", __arg_0);
 
-  oncomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncomplete");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBTransaction */, "onerror");
 
-  oncomplete_Setter_(mthis, __arg_0) => mthis["oncomplete"] = __arg_0;
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* IDBTransaction */, "onerror", __arg_0);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBTransaction */, "abort", []);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  objectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* IDBTransaction */, "objectStore", []);
+
+  objectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* IDBTransaction */, "objectStore", [__arg_0]);
 
 }
 
 class BlinkIDBVersionChangeEvent extends BlinkEvent {
   static final instance = new BlinkIDBVersionChangeEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "IDBVersionChangeEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("IDBVersionChangeEvent");
 
-  dataLossMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dataLossMessage");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("IDBVersionChangeEvent", [__arg_0]);
 
-  dataLoss_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dataLoss");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("IDBVersionChangeEvent", [__arg_0, __arg_1]);
 
-  newVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newVersion");
+  dataLoss_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBVersionChangeEvent */, "dataLoss");
 
-  oldVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oldVersion");
+  dataLossMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBVersionChangeEvent */, "dataLossMessage");
+
+  newVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBVersionChangeEvent */, "newVersion");
+
+  oldVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* IDBVersionChangeEvent */, "oldVersion");
 
 }
 
 class BlinkImageBitmap {
   static final instance = new BlinkImageBitmap();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ImageBitmap */, "height");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ImageBitmap */, "width");
 
 }
 
 class BlinkImageData {
   static final instance = new BlinkImageData();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ImageData"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("ImageData");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ImageData"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("ImageData", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ImageData"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("ImageData", [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ImageData"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("ImageData", [__arg_0, __arg_1, __arg_2]);
 
-  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ImageData */, "data");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ImageData */, "height");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ImageData */, "width");
 
 }
 
 class BlinkInjectedScriptHost {
   static final instance = new BlinkInjectedScriptHost();
 
-  callFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "callFunction", []);
+  inspect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* InjectedScriptHost */, "inspect", []);
 
-  callFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "callFunction", [__arg_0]);
+  inspect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* InjectedScriptHost */, "inspect", [__arg_0]);
 
-  callFunction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "callFunction", [__arg_0, __arg_1]);
-
-  callFunction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "callFunction", [__arg_0, __arg_1, __arg_2]);
-
-  clearConsoleMessages_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearConsoleMessages", []);
-
-  collectionEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collectionEntries", []);
-
-  collectionEntries_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "collectionEntries", [__arg_0]);
-
-  debugFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "debugFunction", []);
-
-  debugFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "debugFunction", [__arg_0]);
-
-  eval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "eval", []);
-
-  eval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "eval", [__arg_0]);
-
-  evaluateWithExceptionDetails_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "evaluateWithExceptionDetails", []);
-
-  evaluateWithExceptionDetails_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "evaluateWithExceptionDetails", [__arg_0]);
-
-  functionDetails_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "functionDetails", []);
-
-  functionDetails_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "functionDetails", [__arg_0]);
-
-  getEventListeners_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEventListeners", []);
-
-  getEventListeners_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEventListeners", [__arg_0]);
-
-  getInternalProperties_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getInternalProperties", []);
-
-  getInternalProperties_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getInternalProperties", [__arg_0]);
-
-  inspect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "inspect", []);
-
-  inspect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "inspect", [__arg_0]);
-
-  inspect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "inspect", [__arg_0, __arg_1]);
-
-  inspectedObject_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "inspectedObject", []);
-
-  inspectedObject_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "inspectedObject", [__arg_0]);
-
-  internalConstructorName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "internalConstructorName", []);
-
-  internalConstructorName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "internalConstructorName", [__arg_0]);
-
-  isHTMLAllCollection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isHTMLAllCollection", []);
-
-  isHTMLAllCollection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isHTMLAllCollection", [__arg_0]);
-
-  monitorFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "monitorFunction", []);
-
-  monitorFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "monitorFunction", [__arg_0]);
-
-  setFunctionVariableValue_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setFunctionVariableValue", [__arg_0, __arg_1]);
-
-  setFunctionVariableValue_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setFunctionVariableValue", [__arg_0, __arg_1, __arg_2]);
-
-  setFunctionVariableValue_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "setFunctionVariableValue", [__arg_0, __arg_1, __arg_2, __arg_3]);
-
-  setNonEnumProperty_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setNonEnumProperty", [__arg_0]);
-
-  setNonEnumProperty_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setNonEnumProperty", [__arg_0, __arg_1]);
-
-  setNonEnumProperty_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setNonEnumProperty", [__arg_0, __arg_1, __arg_2]);
-
-  subtype_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "subtype", []);
-
-  subtype_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "subtype", [__arg_0]);
-
-  suppressWarningsAndCallFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "suppressWarningsAndCallFunction", []);
-
-  suppressWarningsAndCallFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "suppressWarningsAndCallFunction", [__arg_0]);
-
-  suppressWarningsAndCallFunction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "suppressWarningsAndCallFunction", [__arg_0, __arg_1]);
-
-  suppressWarningsAndCallFunction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "suppressWarningsAndCallFunction", [__arg_0, __arg_1, __arg_2]);
-
-  undebugFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "undebugFunction", []);
-
-  undebugFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "undebugFunction", [__arg_0]);
-
-  unmonitorFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unmonitorFunction", []);
-
-  unmonitorFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "unmonitorFunction", [__arg_0]);
+  inspect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* InjectedScriptHost */, "inspect", [__arg_0, __arg_1]);
 
 }
 
-class BlinkInputMethodContext extends BlinkEventTarget {
-  static final instance = new BlinkInputMethodContext();
+class BlinkInputDevice {
+  static final instance = new BlinkInputDevice();
 
-  compositionEndOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "compositionEndOffset");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("InputDevice");
 
-  compositionStartOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "compositionStartOffset");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("InputDevice", [__arg_0]);
 
-  confirmComposition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "confirmComposition", []);
-
-  locale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "locale");
-
-  oncandidatewindowhide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncandidatewindowhide");
-
-  oncandidatewindowhide_Setter_(mthis, __arg_0) => mthis["oncandidatewindowhide"] = __arg_0;
-
-  oncandidatewindowshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncandidatewindowshow");
-
-  oncandidatewindowshow_Setter_(mthis, __arg_0) => mthis["oncandidatewindowshow"] = __arg_0;
-
-  oncandidatewindowupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncandidatewindowupdate");
-
-  oncandidatewindowupdate_Setter_(mthis, __arg_0) => mthis["oncandidatewindowupdate"] = __arg_0;
-
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  firesTouchEvents_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* InputDevice */, "firesTouchEvents");
 
 }
 
-class BlinkInspectorFrontendHost {
-  static final instance = new BlinkInspectorFrontendHost();
-
-  copyText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "copyText", []);
-
-  copyText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "copyText", [__arg_0]);
-
-  getSelectionBackgroundColor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSelectionBackgroundColor", []);
-
-  getSelectionForegroundColor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSelectionForegroundColor", []);
-
-  isHostedMode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isHostedMode", []);
-
-  isUnderTest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isUnderTest", []);
-
-  isolatedFileSystem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isolatedFileSystem", []);
-
-  isolatedFileSystem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isolatedFileSystem", [__arg_0]);
-
-  isolatedFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isolatedFileSystem", [__arg_0, __arg_1]);
-
-  platform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "platform", []);
-
-  port_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "port", []);
-
-  recordActionTaken_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "recordActionTaken", []);
-
-  recordActionTaken_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "recordActionTaken", [__arg_0]);
-
-  recordPanelShown_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "recordPanelShown", []);
-
-  recordPanelShown_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "recordPanelShown", [__arg_0]);
-
-  sendMessageToBackend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "sendMessageToBackend", []);
-
-  sendMessageToBackend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sendMessageToBackend", [__arg_0]);
-
-  sendMessageToEmbedder_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "sendMessageToEmbedder", []);
-
-  sendMessageToEmbedder_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sendMessageToEmbedder", [__arg_0]);
-
-  setInjectedScriptForOrigin_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setInjectedScriptForOrigin", []);
-
-  setInjectedScriptForOrigin_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setInjectedScriptForOrigin", [__arg_0]);
-
-  setInjectedScriptForOrigin_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setInjectedScriptForOrigin", [__arg_0, __arg_1]);
-
-  setZoomFactor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setZoomFactor", []);
-
-  setZoomFactor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setZoomFactor", [__arg_0]);
-
-  showContextMenuAtPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenuAtPoint", [__arg_0]);
-
-  showContextMenuAtPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenuAtPoint", [__arg_0, __arg_1]);
-
-  showContextMenuAtPoint_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenuAtPoint", [__arg_0, __arg_1, __arg_2]);
-
-  showContextMenu_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenu", []);
-
-  showContextMenu_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenu", [__arg_0]);
-
-  showContextMenu_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenu", [__arg_0, __arg_1]);
-
-  upgradeDraggedFileSystemPermissions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "upgradeDraggedFileSystemPermissions", []);
-
-  upgradeDraggedFileSystemPermissions_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "upgradeDraggedFileSystemPermissions", [__arg_0]);
-
-  zoomFactor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "zoomFactor", []);
+class BlinkInt16Array extends BlinkArrayBufferView {
+  static final instance = new BlinkInt16Array();
 
 }
 
-class BlinkInspectorOverlayHost {
-  static final instance = new BlinkInspectorOverlayHost();
-
-  resume_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resume", []);
-
-  stepOver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stepOver", []);
+class BlinkInt32Array extends BlinkArrayBufferView {
+  static final instance = new BlinkInt32Array();
 
 }
 
-class BlinkInstallEvent extends BlinkExtendableEvent {
-  static final instance = new BlinkInstallEvent();
-
-  reloadAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reloadAll", []);
-
-  replace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replace", []);
+class BlinkInt8Array extends BlinkArrayBufferView {
+  static final instance = new BlinkInt8Array();
 
 }
 
 class BlinkIterator {
   static final instance = new BlinkIterator();
 
-  next_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "next", []);
+  next_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Iterator */, "next", []);
 
-  next_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "next", [__arg_0]);
-
-}
-
-class BlinkJavaScriptCallFrame {
-  static final instance = new BlinkJavaScriptCallFrame();
-
-  caller_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "caller");
-
-  column_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "column");
-
-  evaluateWithExceptionDetails_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "evaluateWithExceptionDetails", []);
-
-  evaluateWithExceptionDetails_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "evaluateWithExceptionDetails", [__arg_0]);
-
-  functionName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "functionName");
-
-  isAtReturn_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isAtReturn");
-
-  line_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "line");
-
-  restart_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "restart", []);
-
-  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "returnValue");
-
-  scopeChain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scopeChain");
-
-  scopeType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scopeType", []);
-
-  scopeType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scopeType", [__arg_0]);
-
-  setVariableValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setVariableValue", []);
-
-  setVariableValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setVariableValue", [__arg_0]);
-
-  setVariableValue_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setVariableValue", [__arg_0, __arg_1]);
-
-  setVariableValue_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setVariableValue", [__arg_0, __arg_1, __arg_2]);
-
-  sourceID_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sourceID");
-
-  stepInPositions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stepInPositions");
-
-  thisObject_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "thisObject");
-
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  next_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Iterator */, "next", [__arg_0]);
 
 }
 
 class BlinkKeyboardEvent extends BlinkUIEvent {
   static final instance = new BlinkKeyboardEvent();
 
-  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altKey");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("KeyboardEvent");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "KeyboardEvent"), [__arg_0, __arg_1]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("KeyboardEvent", [__arg_0]);
 
-  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ctrlKey");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("KeyboardEvent", [__arg_0, __arg_1]);
 
-  getModifierState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getModifierState", []);
+  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "altKey");
 
-  getModifierState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getModifierState", [__arg_0]);
+  charCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "charCode");
 
-  initKeyboardEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", []);
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "code");
 
-  initKeyboardEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0]);
+  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "ctrlKey");
 
-  initKeyboardEvent_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+  key_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "key");
 
-  initKeyboardEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1]);
+  keyCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "keyCode");
 
-  initKeyboardEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2]);
+  keyIdentifier_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "keyIdentifier");
 
-  initKeyboardEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  keyLocation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "keyLocation");
 
-  initKeyboardEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "location");
 
-  initKeyboardEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "metaKey");
 
-  initKeyboardEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  repeat_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "repeat");
 
-  initKeyboardEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "shiftKey");
 
-  initKeyboardEvent_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  which_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* KeyboardEvent */, "which");
 
-  keyIdentifier_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyIdentifier");
+  getModifierState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* KeyboardEvent */, "getModifierState", []);
 
-  keyLocation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyLocation");
+  getModifierState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* KeyboardEvent */, "getModifierState", [__arg_0]);
 
-  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "location");
+  initKeyboardEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* KeyboardEvent */, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "metaKey");
+  initKeyboardEvent_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* KeyboardEvent */, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
 
-  repeat_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "repeat");
-
-  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shiftKey");
+  initKeyboardEvent_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* KeyboardEvent */, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
 
 }
 
-class BlinkLocalCredential extends BlinkCredential {
-  static final instance = new BlinkLocalCredential();
+class BlinkKeyframeEffect extends BlinkAnimationEffectReadOnly {
+  static final instance = new BlinkKeyframeEffect();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "LocalCredential"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("KeyframeEffect");
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "LocalCredential"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("KeyframeEffect", [__arg_0]);
 
-  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "LocalCredential"), [__arg_0, __arg_1, __arg_2, __arg_3]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("KeyframeEffect", [__arg_0, __arg_1]);
 
-  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "password");
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("KeyframeEffect", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkLocation {
   static final instance = new BlinkLocation();
 
-  ancestorOrigins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ancestorOrigins");
+  ancestorOrigins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Location */, "ancestorOrigins");
 
-  assign_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "assign", []);
+  hash_Getter_(mthis) native "Blink_Getter_Location_hash";
 
-  assign_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "assign", [__arg_0]);
+  hash_Setter_(mthis, __arg_0) native "Blink_Setter_Location_hash";
 
-  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Location */, "host");
 
-  hash_Setter_(mthis, __arg_0) => mthis["hash"] = __arg_0;
+  host_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Location */, "host", __arg_0);
 
-  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Location */, "hostname");
 
-  host_Setter_(mthis, __arg_0) => mthis["host"] = __arg_0;
+  hostname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Location */, "hostname", __arg_0);
 
-  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
+  href_Getter_(mthis) native "Blink_Getter_Location_href";
 
-  hostname_Setter_(mthis, __arg_0) => mthis["hostname"] = __arg_0;
+  href_Setter_(mthis, __arg_0) native "Blink_Setter_Location_href";
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Location */, "origin");
 
-  href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Location */, "pathname");
 
-  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
+  pathname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Location */, "pathname", __arg_0);
 
-  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Location */, "port");
 
-  pathname_Setter_(mthis, __arg_0) => mthis["pathname"] = __arg_0;
+  port_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Location */, "port", __arg_0);
 
-  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Location */, "protocol");
 
-  port_Setter_(mthis, __arg_0) => mthis["port"] = __arg_0;
+  protocol_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Location */, "protocol", __arg_0);
 
-  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Location */, "search");
 
-  protocol_Setter_(mthis, __arg_0) => mthis["protocol"] = __arg_0;
+  search_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Location */, "search", __arg_0);
 
-  reload_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reload", []);
+  assign_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Location */, "assign", []);
 
-  replace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replace", []);
+  assign_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Location */, "assign", [__arg_0]);
 
-  replace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replace", [__arg_0]);
+  reload_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Location */, "reload", []);
 
-  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
+  replace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Location */, "replace", []);
 
-  search_Setter_(mthis, __arg_0) => mthis["search"] = __arg_0;
+  replace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Location */, "replace", [__arg_0]);
 
-  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Location */, "toString", []);
+
+  valueOf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Location */, "valueOf", []);
 
 }
 
 class BlinkMIDIAccess extends BlinkEventTarget {
   static final instance = new BlinkMIDIAccess();
 
-  inputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputs");
+  inputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIAccess */, "inputs");
 
-  onconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onconnect");
+  onstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIAccess */, "onstatechange");
 
-  onconnect_Setter_(mthis, __arg_0) => mthis["onconnect"] = __arg_0;
+  onstatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MIDIAccess */, "onstatechange", __arg_0);
 
-  ondisconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondisconnect");
+  outputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIAccess */, "outputs");
 
-  ondisconnect_Setter_(mthis, __arg_0) => mthis["ondisconnect"] = __arg_0;
-
-  outputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outputs");
-
-  sysexEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sysexEnabled");
+  sysexEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIAccess */, "sysexEnabled");
 
 }
 
 class BlinkMIDIConnectionEvent extends BlinkEvent {
   static final instance = new BlinkMIDIConnectionEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MIDIConnectionEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MIDIConnectionEvent");
 
-  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MIDIConnectionEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MIDIConnectionEvent", [__arg_0, __arg_1]);
+
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIConnectionEvent */, "port");
 
 }
 
 class BlinkMIDIInput extends BlinkMIDIPort {
   static final instance = new BlinkMIDIInput();
 
-  onmidimessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmidimessage");
+  onmidimessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIInput */, "onmidimessage");
 
-  onmidimessage_Setter_(mthis, __arg_0) => mthis["onmidimessage"] = __arg_0;
+  onmidimessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MIDIInput */, "onmidimessage", __arg_0);
 
 }
 
 class BlinkMIDIInputMap {
   static final instance = new BlinkMIDIInputMap();
 
-  entries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "entries", []);
-
-  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
-
-  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
-
-  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
-
-  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
-
-  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "keys", []);
-
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
-
-  values_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "values", []);
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIInputMap */, "size");
 
 }
 
 class BlinkMIDIMessageEvent extends BlinkEvent {
   static final instance = new BlinkMIDIMessageEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MIDIMessageEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MIDIMessageEvent");
 
-  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MIDIMessageEvent", [__arg_0]);
 
-  receivedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "receivedTime");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MIDIMessageEvent", [__arg_0, __arg_1]);
+
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIMessageEvent */, "data");
+
+  receivedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIMessageEvent */, "receivedTime");
 
 }
 
 class BlinkMIDIOutput extends BlinkMIDIPort {
   static final instance = new BlinkMIDIOutput();
 
-  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "send", []);
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MIDIOutput */, "send", []);
 
-  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0]);
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MIDIOutput */, "send", [__arg_0]);
 
-  send_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0, __arg_1]);
+  send_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* MIDIOutput */, "send", [__arg_0, __arg_1]);
 
 }
 
 class BlinkMIDIOutputMap {
   static final instance = new BlinkMIDIOutputMap();
 
-  entries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "entries", []);
-
-  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
-
-  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
-
-  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
-
-  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
-
-  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "keys", []);
-
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
-
-  values_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "values", []);
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIOutputMap */, "size");
 
 }
 
 class BlinkMIDIPort extends BlinkEventTarget {
   static final instance = new BlinkMIDIPort();
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  connection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIPort */, "connection");
 
-  manufacturer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "manufacturer");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIPort */, "id");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  manufacturer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIPort */, "manufacturer");
 
-  ondisconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondisconnect");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIPort */, "name");
 
-  ondisconnect_Setter_(mthis, __arg_0) => mthis["ondisconnect"] = __arg_0;
+  onstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIPort */, "onstatechange");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  onstatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MIDIPort */, "onstatechange", __arg_0);
 
-  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "version");
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIPort */, "state");
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIPort */, "type");
+
+  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MIDIPort */, "version");
+
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MIDIPort */, "close", []);
+
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MIDIPort */, "open", []);
 
 }
 
 class BlinkMediaController extends BlinkEventTarget {
   static final instance = new BlinkMediaController();
 
-  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffered");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaController");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaController"), []);
+  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "buffered");
 
-  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "currentTime");
 
-  currentTime_Setter_(mthis, __arg_0) => mthis["currentTime"] = __arg_0;
+  currentTime_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaController */, "currentTime", __arg_0);
 
-  defaultPlaybackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultPlaybackRate");
+  defaultPlaybackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "defaultPlaybackRate");
 
-  defaultPlaybackRate_Setter_(mthis, __arg_0) => mthis["defaultPlaybackRate"] = __arg_0;
+  defaultPlaybackRate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaController */, "defaultPlaybackRate", __arg_0);
 
-  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "duration");
 
-  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "muted");
+  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "muted");
 
-  muted_Setter_(mthis, __arg_0) => mthis["muted"] = __arg_0;
+  muted_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaController */, "muted", __arg_0);
 
-  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pause", []);
+  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "paused");
 
-  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "paused");
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "playbackRate");
 
-  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "play", []);
+  playbackRate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaController */, "playbackRate", __arg_0);
 
-  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
+  playbackState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "playbackState");
 
-  playbackRate_Setter_(mthis, __arg_0) => mthis["playbackRate"] = __arg_0;
+  played_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "played");
 
-  playbackState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackState");
+  seekable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "seekable");
 
-  played_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "played");
+  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaController */, "volume");
 
-  seekable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "seekable");
+  volume_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaController */, "volume", __arg_0);
 
-  unpause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unpause", []);
+  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaController */, "pause", []);
 
-  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "volume");
+  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaController */, "play", []);
 
-  volume_Setter_(mthis, __arg_0) => mthis["volume"] = __arg_0;
+  unpause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaController */, "unpause", []);
 
 }
 
 class BlinkMediaDeviceInfo {
   static final instance = new BlinkMediaDeviceInfo();
 
-  deviceId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deviceId");
+  deviceId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaDeviceInfo */, "deviceId");
 
-  groupId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "groupId");
+  groupId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaDeviceInfo */, "groupId");
 
-  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaDeviceInfo */, "kind");
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaDeviceInfo */, "label");
+
+}
+
+class BlinkMediaDevices {
+  static final instance = new BlinkMediaDevices();
+
+  enumerateDevices_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaDevices */, "enumerateDevices", []);
+
+  getUserMedia_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaDevices */, "getUserMedia", []);
+
+  getUserMedia_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaDevices */, "getUserMedia", [__arg_0]);
 
 }
 
 class BlinkMediaElementAudioSourceNode extends BlinkAudioSourceNode {
   static final instance = new BlinkMediaElementAudioSourceNode();
 
-  mediaElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaElement");
+  mediaElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaElementAudioSourceNode */, "mediaElement");
+
+}
+
+class BlinkMediaEncryptedEvent extends BlinkEvent {
+  static final instance = new BlinkMediaEncryptedEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaEncryptedEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MediaEncryptedEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MediaEncryptedEvent", [__arg_0, __arg_1]);
+
+  initData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaEncryptedEvent */, "initData");
+
+  initDataType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaEncryptedEvent */, "initDataType");
 
 }
 
 class BlinkMediaError {
   static final instance = new BlinkMediaError();
 
-  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaError */, "code");
 
 }
 
 class BlinkMediaKeyError {
   static final instance = new BlinkMediaKeyError();
 
-  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyError */, "code");
 
-  systemCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemCode");
+  systemCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyError */, "systemCode");
 
 }
 
 class BlinkMediaKeyEvent extends BlinkEvent {
   static final instance = new BlinkMediaKeyEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaKeyEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaKeyEvent");
 
-  defaultURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultURL");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MediaKeyEvent", [__arg_0]);
 
-  errorCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "errorCode");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MediaKeyEvent", [__arg_0, __arg_1]);
 
-  initData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "initData");
+  defaultURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyEvent */, "defaultURL");
 
-  keySystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keySystem");
+  errorCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyEvent */, "errorCode");
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  initData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyEvent */, "initData");
 
-  sessionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sessionId");
+  keySystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyEvent */, "keySystem");
 
-  systemCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemCode");
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyEvent */, "message");
+
+  sessionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyEvent */, "sessionId");
+
+  systemCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyEvent */, "systemCode");
 
 }
 
 class BlinkMediaKeyMessageEvent extends BlinkEvent {
   static final instance = new BlinkMediaKeyMessageEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaKeyMessageEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaKeyMessageEvent");
 
-  destinationURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "destinationURL");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MediaKeyMessageEvent", [__arg_0]);
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MediaKeyMessageEvent", [__arg_0, __arg_1]);
 
-}
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyMessageEvent */, "message");
 
-class BlinkMediaKeyNeededEvent extends BlinkEvent {
-  static final instance = new BlinkMediaKeyNeededEvent();
-
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaKeyNeededEvent"), [__arg_0, __arg_1]);
-
-  contentType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentType");
-
-  initData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "initData");
+  messageType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyMessageEvent */, "messageType");
 
 }
 
 class BlinkMediaKeySession extends BlinkEventTarget {
   static final instance = new BlinkMediaKeySession();
 
-  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "closed");
+  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeySession */, "closed");
 
-  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
+  expiration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeySession */, "expiration");
 
-  generateRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "generateRequest", []);
+  keyStatuses_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeySession */, "keyStatuses");
 
-  generateRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "generateRequest", [__arg_0]);
+  sessionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeySession */, "sessionId");
 
-  generateRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "generateRequest", [__arg_0, __arg_1]);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "close", []);
 
-  keySystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keySystem");
+  generateRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "generateRequest", []);
 
-  release_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "release", []);
+  generateRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "generateRequest", [__arg_0]);
 
-  sessionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sessionId");
+  generateRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "generateRequest", [__arg_0, __arg_1]);
 
-  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "update", []);
+  load_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "load", []);
 
-  update_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "update", [__arg_0]);
+  load_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "load", [__arg_0]);
+
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "remove", []);
+
+  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "update", []);
+
+  update_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySession */, "update", [__arg_0]);
+
+}
+
+class BlinkMediaKeyStatusMap {
+  static final instance = new BlinkMediaKeyStatusMap();
+
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeyStatusMap */, "size");
+
+}
+
+class BlinkMediaKeySystemAccess {
+  static final instance = new BlinkMediaKeySystemAccess();
+
+  keySystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaKeySystemAccess */, "keySystem");
+
+  createMediaKeys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySystemAccess */, "createMediaKeys", []);
+
+  getConfiguration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeySystemAccess */, "getConfiguration", []);
 
 }
 
 class BlinkMediaKeys {
   static final instance = new BlinkMediaKeys();
 
-  createSession_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSession", []);
+  createSession_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeys */, "createSession", []);
 
-  createSession_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSession", [__arg_0]);
+  createSession_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeys */, "createSession", [__arg_0]);
 
-  create_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaKeys"), "create", []);
+  setServerCertificate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeys */, "setServerCertificate", []);
 
-  create_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaKeys"), "create", [__arg_0]);
-
-  isTypeSupported_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaKeys"), "isTypeSupported", []);
-
-  isTypeSupported_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaKeys"), "isTypeSupported", [__arg_0]);
-
-  isTypeSupported_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaKeys"), "isTypeSupported", [__arg_0, __arg_1]);
-
-  keySystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keySystem");
+  setServerCertificate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaKeys */, "setServerCertificate", [__arg_0]);
 
 }
 
 class BlinkMediaList {
   static final instance = new BlinkMediaList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaList */, "length");
 
-  appendMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendMedium", []);
+  mediaText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaList */, "mediaText");
 
-  appendMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendMedium", [__arg_0]);
+  mediaText_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaList */, "mediaText", __arg_0);
 
-  deleteMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteMedium", []);
+  appendMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaList */, "appendMedium", []);
 
-  deleteMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteMedium", [__arg_0]);
+  appendMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaList */, "appendMedium", [__arg_0]);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  deleteMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaList */, "deleteMedium", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  deleteMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaList */, "deleteMedium", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaList */, "item", []);
 
-  mediaText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaText");
-
-  mediaText_Setter_(mthis, __arg_0) => mthis["mediaText"] = __arg_0;
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaList */, "item", [__arg_0]);
 
 }
 
 class BlinkMediaQueryList extends BlinkEventTarget {
   static final instance = new BlinkMediaQueryList();
 
-  addListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addListener", []);
+  matches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaQueryList */, "matches");
 
-  addListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addListener", [__arg_0]);
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaQueryList */, "media");
 
-  matches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "matches");
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaQueryList */, "onchange");
 
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaQueryList */, "onchange", __arg_0);
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  addListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaQueryList */, "addListener", []);
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  addListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaQueryList */, "addListener", [__arg_0]);
 
-  removeListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeListener", []);
+  removeListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaQueryList */, "removeListener", []);
 
-  removeListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeListener", [__arg_0]);
+  removeListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaQueryList */, "removeListener", [__arg_0]);
 
 }
 
 class BlinkMediaQueryListEvent extends BlinkEvent {
   static final instance = new BlinkMediaQueryListEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaQueryListEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaQueryListEvent");
 
-  matches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "matches");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MediaQueryListEvent", [__arg_0]);
 
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MediaQueryListEvent", [__arg_0, __arg_1]);
+
+  matches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaQueryListEvent */, "matches");
+
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaQueryListEvent */, "media");
+
+}
+
+class BlinkMediaSession {
+  static final instance = new BlinkMediaSession();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaSession");
+
+  activate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaSession */, "activate", []);
+
+  deactivate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaSession */, "deactivate", []);
 
 }
 
 class BlinkMediaSource extends BlinkEventTarget {
   static final instance = new BlinkMediaSource();
 
-  activeSourceBuffers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeSourceBuffers");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaSource");
 
-  addSourceBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addSourceBuffer", []);
+  activeSourceBuffers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaSource */, "activeSourceBuffers");
 
-  addSourceBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addSourceBuffer", [__arg_0]);
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaSource */, "duration");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaSource"), []);
+  duration_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaSource */, "duration", __arg_0);
 
-  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaSource */, "readyState");
 
-  duration_Setter_(mthis, __arg_0) => mthis["duration"] = __arg_0;
+  sourceBuffers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaSource */, "sourceBuffers");
 
-  endOfStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "endOfStream", []);
+  addSourceBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaSource */, "addSourceBuffer", []);
 
-  endOfStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "endOfStream", [__arg_0]);
+  addSourceBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaSource */, "addSourceBuffer", [__arg_0]);
 
-  isTypeSupported_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaSource"), "isTypeSupported", []);
+  endOfStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaSource */, "endOfStream", []);
 
-  isTypeSupported_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaSource"), "isTypeSupported", [__arg_0]);
+  endOfStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaSource */, "endOfStream", [__arg_0]);
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  isTypeSupported_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaSource") /* MediaSource */, "isTypeSupported", []);
 
-  removeSourceBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeSourceBuffer", []);
+  isTypeSupported_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaSource") /* MediaSource */, "isTypeSupported", [__arg_0]);
 
-  removeSourceBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeSourceBuffer", [__arg_0]);
+  removeSourceBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaSource */, "removeSourceBuffer", []);
 
-  sourceBuffers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sourceBuffers");
+  removeSourceBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaSource */, "removeSourceBuffer", [__arg_0]);
 
 }
 
 class BlinkMediaStream extends BlinkEventTarget {
   static final instance = new BlinkMediaStream();
 
-  addTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addTrack", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaStream");
 
-  addTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addTrack", [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MediaStream", [__arg_0]);
 
-  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clone", []);
+  active_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "active");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaStream"), []);
+  ended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "ended");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaStream"), [__arg_0]);
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "id");
 
-  ended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ended");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "label");
 
-  getAudioTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAudioTracks", []);
+  onactive_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "onactive");
 
-  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", []);
+  onactive_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStream */, "onactive", __arg_0);
 
-  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", [__arg_0]);
+  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "onaddtrack");
 
-  getTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTracks", []);
+  onaddtrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStream */, "onaddtrack", __arg_0);
 
-  getVideoTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVideoTracks", []);
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "onended");
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStream */, "onended", __arg_0);
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  oninactive_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "oninactive");
 
-  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddtrack");
+  oninactive_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStream */, "oninactive", __arg_0);
 
-  onaddtrack_Setter_(mthis, __arg_0) => mthis["onaddtrack"] = __arg_0;
+  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStream */, "onremovetrack");
 
-  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
+  onremovetrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStream */, "onremovetrack", __arg_0);
 
-  onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
+  addTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "addTrack", []);
 
-  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovetrack");
+  addTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "addTrack", [__arg_0]);
 
-  onremovetrack_Setter_(mthis, __arg_0) => mthis["onremovetrack"] = __arg_0;
+  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "clone", []);
 
-  removeTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeTrack", []);
+  getAudioTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "getAudioTracks", []);
 
-  removeTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeTrack", [__arg_0]);
+  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "getTrackById", []);
 
-  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
+  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "getTrackById", [__arg_0]);
+
+  getTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "getTracks", []);
+
+  getVideoTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "getVideoTracks", []);
+
+  removeTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "removeTrack", []);
+
+  removeTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "removeTrack", [__arg_0]);
+
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStream */, "stop", []);
 
 }
 
 class BlinkMediaStreamAudioDestinationNode extends BlinkAudioNode {
   static final instance = new BlinkMediaStreamAudioDestinationNode();
 
-  stream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stream");
+  stream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamAudioDestinationNode */, "stream");
 
 }
 
 class BlinkMediaStreamAudioSourceNode extends BlinkAudioSourceNode {
   static final instance = new BlinkMediaStreamAudioSourceNode();
 
-  mediaStream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaStream");
+  mediaStream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamAudioSourceNode */, "mediaStream");
 
 }
 
 class BlinkMediaStreamEvent extends BlinkEvent {
   static final instance = new BlinkMediaStreamEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaStreamEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MediaStreamEvent");
 
-  stream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stream");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MediaStreamEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MediaStreamEvent", [__arg_0, __arg_1]);
+
+  stream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamEvent */, "stream");
 
 }
 
 class BlinkMediaStreamTrack extends BlinkEventTarget {
   static final instance = new BlinkMediaStreamTrack();
 
-  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clone", []);
+  enabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "enabled");
 
-  enabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "enabled");
+  enabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStreamTrack */, "enabled", __arg_0);
 
-  enabled_Setter_(mthis, __arg_0) => mthis["enabled"] = __arg_0;
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "id");
 
-  getSources_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaStreamTrack"), "getSources", []);
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "kind");
 
-  getSources_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaStreamTrack"), "getSources", [__arg_0]);
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "label");
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "muted");
 
-  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "onended");
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStreamTrack */, "onended", __arg_0);
 
-  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "muted");
+  onmute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "onmute");
 
-  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
+  onmute_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStreamTrack */, "onmute", __arg_0);
 
-  onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
+  onunmute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "onunmute");
 
-  onmute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmute");
+  onunmute_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MediaStreamTrack */, "onunmute", __arg_0);
 
-  onmute_Setter_(mthis, __arg_0) => mthis["onmute"] = __arg_0;
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrack */, "readyState");
 
-  onunmute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onunmute");
+  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStreamTrack */, "clone", []);
 
-  onunmute_Setter_(mthis, __arg_0) => mthis["onunmute"] = __arg_0;
+  getSources_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaStreamTrack") /* MediaStreamTrack */, "getSources", []);
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  getSources_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaStreamTrack") /* MediaStreamTrack */, "getSources", [__arg_0]);
 
-  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStreamTrack */, "stop", []);
 
 }
 
 class BlinkMediaStreamTrackEvent extends BlinkEvent {
   static final instance = new BlinkMediaStreamTrackEvent();
 
-  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MediaStreamTrackEvent */, "track");
+
+}
+
+class BlinkMediaStreamTrackSourcesCallback {
+  static final instance = new BlinkMediaStreamTrackSourcesCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MediaStreamTrackSourcesCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MediaStreamTrackSourcesCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkMemoryInfo {
   static final instance = new BlinkMemoryInfo();
 
-  jsHeapSizeLimit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "jsHeapSizeLimit");
+  jsHeapSizeLimit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MemoryInfo */, "jsHeapSizeLimit");
 
-  totalJSHeapSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "totalJSHeapSize");
+  totalJSHeapSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MemoryInfo */, "totalJSHeapSize");
 
-  usedJSHeapSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "usedJSHeapSize");
+  usedJSHeapSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MemoryInfo */, "usedJSHeapSize");
 
 }
 
 class BlinkMessageChannel {
   static final instance = new BlinkMessageChannel();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MessageChannel"), []);
+  port1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MessageChannel */, "port1");
 
-  port1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port1");
-
-  port2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port2");
+  port2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MessageChannel */, "port2");
 
 }
 
 class BlinkMessageEvent extends BlinkEvent {
   static final instance = new BlinkMessageEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MessageEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MessageEvent");
 
-  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MessageEvent", [__arg_0]);
 
-  initMessageEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", []);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MessageEvent", [__arg_0, __arg_1]);
 
-  initMessageEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0]);
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MessageEvent */, "data");
 
-  initMessageEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1]);
+  lastEventId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MessageEvent */, "lastEventId");
 
-  initMessageEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1, __arg_2]);
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MessageEvent */, "origin");
 
-  initMessageEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  ports_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MessageEvent */, "ports");
 
-  initMessageEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MessageEvent */, "source");
 
-  initMessageEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  initMessageEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* MessageEvent */, "initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  initMessageEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  initMessageEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* MessageEvent */, "initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  initMessageEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
-
-  lastEventId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastEventId");
-
-  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
-
-  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "source");
+  initMessageEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* MessageEvent */, "initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
 }
 
 class BlinkMessagePort extends BlinkEventTarget {
   static final instance = new BlinkMessagePort();
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MessagePort */, "onmessage");
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* MessagePort */, "onmessage", __arg_0);
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MessagePort */, "close", []);
 
-  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MessagePort */, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MessagePort */, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* MessagePort */, "postMessage", [__arg_0, __arg_1]);
 
-  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MessagePort */, "start", []);
 
 }
 
 class BlinkMetadata {
   static final instance = new BlinkMetadata();
 
-  modificationTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "modificationTime");
+  modificationTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Metadata */, "modificationTime");
 
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Metadata */, "size");
+
+}
+
+class BlinkMetadataCallback {
+  static final instance = new BlinkMetadataCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MetadataCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MetadataCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkMimeType {
   static final instance = new BlinkMimeType();
 
-  description_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "description");
+  description_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MimeType */, "description");
 
-  enabledPlugin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "enabledPlugin");
+  enabledPlugin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MimeType */, "enabledPlugin");
 
-  suffixes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "suffixes");
+  suffixes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MimeType */, "suffixes");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MimeType */, "type");
 
 }
 
 class BlinkMimeTypeArray {
   static final instance = new BlinkMimeTypeArray();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MimeTypeArray */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MimeTypeArray */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MimeTypeArray */, "item", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MimeTypeArray */, "namedItem", []);
 
-  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
-
-  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MimeTypeArray */, "namedItem", [__arg_0]);
 
 }
 
 class BlinkMouseEvent extends BlinkUIEvent {
   static final instance = new BlinkMouseEvent();
 
-  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altKey");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MouseEvent");
 
-  button_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "button");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MouseEvent", [__arg_0]);
 
-  clientX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientX");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("MouseEvent", [__arg_0, __arg_1]);
 
-  clientY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientY");
+  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "altKey");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MouseEvent"), [__arg_0, __arg_1]);
+  button_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "button");
 
-  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ctrlKey");
+  buttons_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "buttons");
 
-  dataTransfer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dataTransfer");
+  clientX_Getter_(mthis) native "Blink_Getter_MouseEvent_clientX";
 
-  fromElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fromElement");
+  clientY_Getter_(mthis) native "Blink_Getter_MouseEvent_clientY";
 
-  initMouseEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", []);
+  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "ctrlKey");
 
-  initMouseEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0]);
+  dataTransfer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "dataTransfer");
 
-  initMouseEvent_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+  fromElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "fromElement");
 
-  initMouseEvent_Callback_11_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
+  layerX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "layerX");
 
-  initMouseEvent_Callback_12_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11]);
+  layerY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "layerY");
 
-  initMouseEvent_Callback_13_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12]);
+  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "metaKey");
 
-  initMouseEvent_Callback_14_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12, __arg_13) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12, __arg_13]);
+  movementX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "movementX");
 
-  initMouseEvent_Callback_15_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12, __arg_13, __arg_14) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12, __arg_13, __arg_14]);
+  movementY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "movementY");
 
-  initMouseEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1]);
+  offsetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "offsetX");
 
-  initMouseEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2]);
+  offsetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "offsetY");
 
-  initMouseEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  pageX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "pageX");
 
-  initMouseEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  pageY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "pageY");
 
-  initMouseEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  region_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "region");
 
-  initMouseEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "relatedTarget");
 
-  initMouseEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "screenX");
 
-  initMouseEvent_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "screenY");
 
-  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "metaKey");
+  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "shiftKey");
 
-  movementX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "movementX");
+  toElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "toElement");
 
-  movementY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "movementY");
+  webkitMovementX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "webkitMovementX");
 
-  offsetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetX");
+  webkitMovementY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "webkitMovementY");
 
-  offsetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetY");
+  which_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "which");
 
-  region_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "region");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "x");
 
-  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "relatedTarget");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MouseEvent */, "y");
 
-  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenX");
+  initMouseEvent_Callback_13_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12) => Blink_JsNative_DomException.callMethod(mthis /* MouseEvent */, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12]);
 
-  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenY");
+  initMouseEvent_Callback_14_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12, __arg_13) => Blink_JsNative_DomException.callMethod(mthis /* MouseEvent */, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12, __arg_13]);
 
-  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shiftKey");
+  initMouseEvent_Callback_15_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12, __arg_13, __arg_14) => Blink_JsNative_DomException.callMethod(mthis /* MouseEvent */, "initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12, __arg_13, __arg_14]);
 
-  toElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "toElement");
+}
 
-  webkitMovementX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitMovementX");
+class BlinkMutationCallback {
+  static final instance = new BlinkMutationCallback();
 
-  webkitMovementY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitMovementY");
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MutationCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MutationCallback */, "handleEvent", [__arg_0]);
+
+  handleEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* MutationCallback */, "handleEvent", [__arg_0, __arg_1]);
 
 }
 
 class BlinkMutationEvent extends BlinkEvent {
   static final instance = new BlinkMutationEvent();
 
-  attrChange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attrChange");
+  attrChange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationEvent */, "attrChange");
 
-  attrName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attrName");
+  attrName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationEvent */, "attrName");
 
-  initMutationEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", []);
+  newValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationEvent */, "newValue");
 
-  initMutationEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0]);
+  prevValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationEvent */, "prevValue");
 
-  initMutationEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1]);
+  relatedNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationEvent */, "relatedNode");
 
-  initMutationEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1, __arg_2]);
+  initMutationEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* MutationEvent */, "initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  initMutationEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  initMutationEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* MutationEvent */, "initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  initMutationEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
-
-  initMutationEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
-
-  initMutationEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
-
-  initMutationEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
-
-  newValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newValue");
-
-  prevValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "prevValue");
-
-  relatedNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "relatedNode");
+  initMutationEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* MutationEvent */, "initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
 }
 
 class BlinkMutationObserver {
   static final instance = new BlinkMutationObserver();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MutationObserver"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("MutationObserver");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MutationObserver"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("MutationObserver", [__arg_0]);
 
-  disconnect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "disconnect", []);
+  disconnect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MutationObserver */, "disconnect", []);
 
-  observe_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "observe", []);
+  observe_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MutationObserver */, "observe", []);
 
-  observe_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "observe", [__arg_0]);
+  observe_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* MutationObserver */, "observe", [__arg_0]);
 
-  observe_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "observe", [__arg_0, __arg_1]);
+  observe_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* MutationObserver */, "observe", [__arg_0, __arg_1]);
 
-  takeRecords_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "takeRecords", []);
+  takeRecords_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* MutationObserver */, "takeRecords", []);
 
 }
 
 class BlinkMutationRecord {
   static final instance = new BlinkMutationRecord();
 
-  addedNodes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "addedNodes");
+  addedNodes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "addedNodes");
 
-  attributeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attributeName");
+  attributeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "attributeName");
 
-  attributeNamespace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attributeNamespace");
+  attributeNamespace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "attributeNamespace");
 
-  nextSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nextSibling");
+  nextSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "nextSibling");
 
-  oldValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oldValue");
+  oldValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "oldValue");
 
-  previousSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousSibling");
+  previousSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "previousSibling");
 
-  removedNodes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "removedNodes");
+  removedNodes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "removedNodes");
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "target");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* MutationRecord */, "type");
 
 }
 
 class BlinkNamedNodeMap {
   static final instance = new BlinkNamedNodeMap();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NamedNodeMap */, "length");
 
-  getNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItemNS", []);
+  getNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "getNamedItem", []);
 
-  getNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItemNS", [__arg_0]);
+  getNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "getNamedItem", [__arg_0]);
 
-  getNamedItemNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItemNS", [__arg_0, __arg_1]);
+  getNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "getNamedItemNS", []);
 
-  getNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItem", []);
+  getNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "getNamedItemNS", [__arg_0]);
 
-  getNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItem", [__arg_0]);
+  getNamedItemNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "getNamedItemNS", [__arg_0, __arg_1]);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "item", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  removeNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "removeNamedItem", []);
 
-  removeNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItemNS", []);
+  removeNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "removeNamedItem", [__arg_0]);
 
-  removeNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItemNS", [__arg_0]);
+  removeNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "removeNamedItemNS", []);
 
-  removeNamedItemNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItemNS", [__arg_0, __arg_1]);
+  removeNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "removeNamedItemNS", [__arg_0]);
 
-  removeNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItem", []);
+  removeNamedItemNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "removeNamedItemNS", [__arg_0, __arg_1]);
 
-  removeNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItem", [__arg_0]);
+  setNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "setNamedItem", []);
 
-  setNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setNamedItemNS", []);
+  setNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "setNamedItem", [__arg_0]);
 
-  setNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setNamedItemNS", [__arg_0]);
+  setNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "setNamedItemNS", []);
 
-  setNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setNamedItem", []);
-
-  setNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setNamedItem", [__arg_0]);
+  setNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NamedNodeMap */, "setNamedItemNS", [__arg_0]);
 
 }
 
 class BlinkNavigator {
   static final instance = new BlinkNavigator();
 
-  appCodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appCodeName");
+  bluetooth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "bluetooth");
 
-  appName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appName");
+  connection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "connection");
 
-  appVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appVersion");
+  credentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "credentials");
 
-  connection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connection");
+  doNotTrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "doNotTrack");
 
-  cookieEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cookieEnabled");
+  geolocation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "geolocation");
 
-  credentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "credentials");
+  maxTouchPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "maxTouchPoints");
 
-  dartEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dartEnabled");
+  mediaDevices_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "mediaDevices");
 
-  doNotTrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "doNotTrack");
+  mimeTypes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "mimeTypes");
 
-  geofencing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "geofencing");
+  permissions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "permissions");
 
-  geolocation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "geolocation");
+  plugins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "plugins");
 
-  getBattery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBattery", []);
+  presentation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "presentation");
 
-  getGamepads_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getGamepads", []);
+  productSub_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "productSub");
 
-  getStorageUpdates_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStorageUpdates", []);
+  serviceWorker_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "serviceWorker");
 
-  hardwareConcurrency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hardwareConcurrency");
+  services_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "services");
 
-  isProtocolHandlerRegistered_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isProtocolHandlerRegistered", []);
+  storageQuota_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "storageQuota");
 
-  isProtocolHandlerRegistered_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isProtocolHandlerRegistered", [__arg_0]);
+  vendor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "vendor");
 
-  isProtocolHandlerRegistered_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isProtocolHandlerRegistered", [__arg_0, __arg_1]);
+  vendorSub_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "vendorSub");
 
-  javaEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "javaEnabled", []);
+  webkitPersistentStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "webkitPersistentStorage");
 
-  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "language");
+  webkitTemporaryStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Navigator */, "webkitTemporaryStorage");
 
-  languages_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "languages");
+  getBattery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "getBattery", []);
 
-  maxTouchPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxTouchPoints");
+  getGamepads_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "getGamepads", []);
 
-  mimeTypes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mimeTypes");
+  getVRDevices_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "getVRDevices", []);
 
-  onLine_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onLine");
+  isProtocolHandlerRegistered_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "isProtocolHandlerRegistered", []);
 
-  platform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "platform");
+  isProtocolHandlerRegistered_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "isProtocolHandlerRegistered", [__arg_0]);
 
-  plugins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "plugins");
+  isProtocolHandlerRegistered_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "isProtocolHandlerRegistered", [__arg_0, __arg_1]);
 
-  presentation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "presentation");
+  javaEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "javaEnabled", []);
 
-  productSub_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "productSub");
+  registerProtocolHandler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "registerProtocolHandler", [__arg_0]);
 
-  product_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "product");
+  registerProtocolHandler_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "registerProtocolHandler", [__arg_0, __arg_1]);
 
-  push_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "push");
+  registerProtocolHandler_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "registerProtocolHandler", [__arg_0, __arg_1, __arg_2]);
 
-  registerProtocolHandler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "registerProtocolHandler", [__arg_0]);
+  requestMIDIAccess_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "requestMIDIAccess", []);
 
-  registerProtocolHandler_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "registerProtocolHandler", [__arg_0, __arg_1]);
+  requestMIDIAccess_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "requestMIDIAccess", [__arg_0]);
 
-  registerProtocolHandler_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "registerProtocolHandler", [__arg_0, __arg_1, __arg_2]);
+  requestMediaKeySystemAccess_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "requestMediaKeySystemAccess", []);
 
-  sendBeacon_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "sendBeacon", []);
+  requestMediaKeySystemAccess_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "requestMediaKeySystemAccess", [__arg_0]);
 
-  sendBeacon_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sendBeacon", [__arg_0]);
+  requestMediaKeySystemAccess_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "requestMediaKeySystemAccess", [__arg_0, __arg_1]);
 
-  sendBeacon_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "sendBeacon", [__arg_0, __arg_1]);
+  sendBeacon_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "sendBeacon", []);
 
-  serviceWorker_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "serviceWorker");
+  sendBeacon_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "sendBeacon", [__arg_0]);
 
-  storageQuota_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "storageQuota");
+  sendBeacon_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "sendBeacon", [__arg_0, __arg_1]);
 
-  unregisterProtocolHandler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unregisterProtocolHandler", []);
+  unregisterProtocolHandler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "unregisterProtocolHandler", []);
 
-  unregisterProtocolHandler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "unregisterProtocolHandler", [__arg_0]);
+  unregisterProtocolHandler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "unregisterProtocolHandler", [__arg_0]);
 
-  unregisterProtocolHandler_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "unregisterProtocolHandler", [__arg_0, __arg_1]);
+  unregisterProtocolHandler_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "unregisterProtocolHandler", [__arg_0, __arg_1]);
 
-  userAgent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "userAgent");
+  webkitGetUserMedia_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "webkitGetUserMedia", [__arg_0]);
 
-  vendorSub_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "vendorSub");
+  webkitGetUserMedia_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "webkitGetUserMedia", [__arg_0, __arg_1]);
 
-  vendor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "vendor");
+  webkitGetUserMedia_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Navigator */, "webkitGetUserMedia", [__arg_0, __arg_1, __arg_2]);
 
-  vibrate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vibrate", []);
+  hardwareConcurrency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorCPU */, "hardwareConcurrency");
 
-  vibrate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vibrate", [__arg_0]);
+  appCodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appCodeName");
 
-  webkitGetGamepads_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetGamepads", []);
+  appName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appName");
 
-  webkitGetUserMedia_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetUserMedia", [__arg_0]);
+  appVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appVersion");
 
-  webkitGetUserMedia_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetUserMedia", [__arg_0, __arg_1]);
+  dartEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "dartEnabled");
 
-  webkitGetUserMedia_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetUserMedia", [__arg_0, __arg_1, __arg_2]);
+  platform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "platform");
 
-  webkitPersistentStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitPersistentStorage");
+  product_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "product");
 
-  webkitTemporaryStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitTemporaryStorage");
+  userAgent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "userAgent");
+
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorLanguage */, "language");
+
+  languages_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorLanguage */, "languages");
+
+  onLine_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorOnLine */, "onLine");
+
+  cookieEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorStorageUtils */, "cookieEnabled");
+
+  getStorageUpdates_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NavigatorStorageUtils */, "getStorageUpdates", []);
+
+}
+
+class BlinkNavigatorCPU {
+  static final instance = new BlinkNavigatorCPU();
+
+  hardwareConcurrency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorCPU */, "hardwareConcurrency");
+
+}
+
+class BlinkNavigatorID {
+  static final instance = new BlinkNavigatorID();
+
+  appCodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appCodeName");
+
+  appName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appName");
+
+  appVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appVersion");
+
+  dartEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "dartEnabled");
+
+  platform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "platform");
+
+  product_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "product");
+
+  userAgent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "userAgent");
+
+}
+
+class BlinkNavigatorLanguage {
+  static final instance = new BlinkNavigatorLanguage();
+
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorLanguage */, "language");
+
+  languages_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorLanguage */, "languages");
+
+}
+
+class BlinkNavigatorOnLine {
+  static final instance = new BlinkNavigatorOnLine();
+
+  onLine_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorOnLine */, "onLine");
+
+}
+
+class BlinkNavigatorStorageUtils {
+  static final instance = new BlinkNavigatorStorageUtils();
+
+  cookieEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorStorageUtils */, "cookieEnabled");
+
+  getStorageUpdates_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NavigatorStorageUtils */, "getStorageUpdates", []);
 
 }
 
 class BlinkNavigatorUserMediaError {
   static final instance = new BlinkNavigatorUserMediaError();
 
-  constraintName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "constraintName");
+  constraintName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorUserMediaError */, "constraintName");
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorUserMediaError */, "message");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorUserMediaError */, "name");
+
+}
+
+class BlinkNavigatorUserMediaErrorCallback {
+  static final instance = new BlinkNavigatorUserMediaErrorCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NavigatorUserMediaErrorCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NavigatorUserMediaErrorCallback */, "handleEvent", [__arg_0]);
+
+}
+
+class BlinkNavigatorUserMediaSuccessCallback {
+  static final instance = new BlinkNavigatorUserMediaSuccessCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NavigatorUserMediaSuccessCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NavigatorUserMediaSuccessCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkNetworkInformation extends BlinkEventTarget {
   static final instance = new BlinkNetworkInformation();
 
-  ontypechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontypechange");
+  ontypechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NetworkInformation */, "ontypechange");
 
-  ontypechange_Setter_(mthis, __arg_0) => mthis["ontypechange"] = __arg_0;
+  ontypechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* NetworkInformation */, "ontypechange", __arg_0);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NetworkInformation */, "type");
 
 }
 
 class BlinkNode extends BlinkEventTarget {
   static final instance = new BlinkNode();
 
-  appendChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendChild", []);
+  baseURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Node */, "baseURI");
 
-  appendChild_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendChild", [__arg_0]);
+  childNodes_Getter_(mthis) native "Blink_Getter_Node_childNodes";
 
-  baseURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseURI");
+  firstChild_Getter_(mthis) native "Blink_Getter_Node_firstChild";
 
-  childNodes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "childNodes");
+  lastChild_Getter_(mthis) native "Blink_Getter_Node_lastChild";
 
-  cloneNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cloneNode", []);
+  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Node */, "localName");
 
-  cloneNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cloneNode", [__arg_0]);
+  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Node */, "namespaceURI");
 
-  contains_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "contains", []);
+  nextSibling_Getter_(mthis) native "Blink_Getter_Node_nextSibling";
 
-  contains_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "contains", [__arg_0]);
+  nodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Node */, "nodeName");
 
-  firstChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "firstChild");
+  nodeType_Getter_(mthis) native "Blink_Getter_Node_nodeType";
 
-  hasChildNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasChildNodes", []);
+  nodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Node */, "nodeValue");
 
-  insertBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertBefore", []);
+  nodeValue_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Node */, "nodeValue", __arg_0);
 
-  insertBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertBefore", [__arg_0]);
+  ownerDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Node */, "ownerDocument");
 
-  insertBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertBefore", [__arg_0, __arg_1]);
+  parentElement_Getter_(mthis) native "Blink_Getter_Node_parentElement";
 
-  lastChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastChild");
+  parentNode_Getter_(mthis) native "Blink_Getter_Node_parentNode";
 
-  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localName");
+  previousSibling_Getter_(mthis) native "Blink_Getter_Node_previousSibling";
 
-  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "namespaceURI");
+  textContent_Getter_(mthis) native "Blink_Getter_Node_textContent";
 
-  nextSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nextSibling");
+  textContent_Setter_(mthis, __arg_0) native "Blink_Setter_Node_textContent";
 
-  nodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nodeName");
+  appendChild_Callback_0_(mthis) native "Blink_Operation_0_Node_appendChild";
 
-  nodeType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nodeType");
+  appendChild_Callback_1_(mthis, __arg_0) native "Blink_Operation_Node_appendChild"; /* __arg_0 */
 
-  nodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nodeValue");
+  cloneNode_Callback_0_(mthis) native "Blink_Operation_0_Node_cloneNode";
 
-  nodeValue_Setter_(mthis, __arg_0) => mthis["nodeValue"] = __arg_0;
+  cloneNode_Callback_1_(mthis, __arg_0) native "Blink_Operation_Node_cloneNode"; /* __arg_0 */
 
-  ownerDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerDocument");
+  compareDocumentPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "compareDocumentPosition", []);
 
-  parentElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentElement");
+  compareDocumentPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "compareDocumentPosition", [__arg_0]);
 
-  parentNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentNode");
+  contains_Callback_0_(mthis) native "Blink_Operation_0_Node_contains";
 
-  previousSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousSibling");
+  contains_Callback_1_(mthis, __arg_0) native "Blink_Operation_Node_contains"; /* __arg_0 */
 
-  removeChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeChild", []);
+  hasChildNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "hasChildNodes", []);
 
-  removeChild_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeChild", [__arg_0]);
+  insertBefore_Callback_0_(mthis) native "Blink_Operation_0_Node_insertBefore";
 
-  replaceChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceChild", []);
+  insertBefore_Callback_1_(mthis, __arg_0) native "Blink_Operation_Node_insertBefore"; /* __arg_0 */
 
-  replaceChild_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceChild", [__arg_0]);
+  insertBefore_Callback_2_(mthis, __arg_0, __arg_1) native "Blink_Operation_Node_insertBefore"; /* __arg_0, __arg_1 */
 
-  replaceChild_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceChild", [__arg_0, __arg_1]);
+  isDefaultNamespace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "isDefaultNamespace", []);
 
-  textContent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textContent");
+  isDefaultNamespace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "isDefaultNamespace", [__arg_0]);
 
-  textContent_Setter_(mthis, __arg_0) => mthis["textContent"] = __arg_0;
+  isEqualNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "isEqualNode", []);
+
+  isEqualNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "isEqualNode", [__arg_0]);
+
+  isSameNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "isSameNode", []);
+
+  isSameNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "isSameNode", [__arg_0]);
+
+  lookupNamespaceURI_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "lookupNamespaceURI", []);
+
+  lookupNamespaceURI_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "lookupNamespaceURI", [__arg_0]);
+
+  lookupPrefix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "lookupPrefix", []);
+
+  lookupPrefix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "lookupPrefix", [__arg_0]);
+
+  normalize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "normalize", []);
+
+  removeChild_Callback_0_(mthis) native "Blink_Operation_0_Node_removeChild";
+
+  removeChild_Callback_1_(mthis, __arg_0) native "Blink_Operation_Node_removeChild"; /* __arg_0 */
+
+  replaceChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "replaceChild", []);
+
+  replaceChild_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "replaceChild", [__arg_0]);
+
+  replaceChild_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Node */, "replaceChild", [__arg_0, __arg_1]);
 
 }
 
 class BlinkNodeFilter {
   static final instance = new BlinkNodeFilter();
 
+  acceptNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NodeFilter */, "acceptNode", []);
+
+  acceptNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NodeFilter */, "acceptNode", [__arg_0]);
+
 }
 
 class BlinkNodeIterator {
   static final instance = new BlinkNodeIterator();
 
-  detach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "detach", []);
+  filter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NodeIterator */, "filter");
 
-  nextNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "nextNode", []);
+  pointerBeforeReferenceNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NodeIterator */, "pointerBeforeReferenceNode");
 
-  pointerBeforeReferenceNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointerBeforeReferenceNode");
+  referenceNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NodeIterator */, "referenceNode");
 
-  previousNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "previousNode", []);
+  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NodeIterator */, "root");
 
-  referenceNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "referenceNode");
+  whatToShow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NodeIterator */, "whatToShow");
 
-  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "root");
+  detach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NodeIterator */, "detach", []);
 
-  whatToShow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "whatToShow");
+  nextNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NodeIterator */, "nextNode", []);
+
+  previousNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NodeIterator */, "previousNode", []);
 
 }
 
 class BlinkNodeList {
   static final instance = new BlinkNodeList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) native "Blink_Getter_NodeList_length";
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) native "Blink_Operation_0_NodeList_item";
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) native "Blink_Operation_NodeList_item"; /* __arg_0 */
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+}
+
+class BlinkNonDocumentTypeChildNode {
+  static final instance = new BlinkNonDocumentTypeChildNode();
+
+  nextElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NonDocumentTypeChildNode */, "nextElementSibling");
+
+  previousElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NonDocumentTypeChildNode */, "previousElementSibling");
+
+}
+
+class BlinkNonElementParentNode {
+  static final instance = new BlinkNonElementParentNode();
+
+  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NonElementParentNode */, "getElementById", []);
+
+  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NonElementParentNode */, "getElementById", [__arg_0]);
 
 }
 
 class BlinkNotification extends BlinkEventTarget {
   static final instance = new BlinkNotification();
 
-  body_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "body");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Notification");
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Notification", [__arg_0]);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Notification"), []);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("Notification", [__arg_0, __arg_1]);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Notification"), [__arg_0]);
+  body_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "body");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Notification"), [__arg_0, __arg_1]);
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "data");
 
-  dir_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dir");
+  dir_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "dir");
 
-  icon_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "icon");
+  icon_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "icon");
 
-  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "lang");
 
-  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "onclick");
 
-  onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
+  onclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Notification */, "onclick", __arg_0);
 
-  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "onclose");
 
-  onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Notification */, "onclose", __arg_0);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "onerror");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Notification */, "onerror", __arg_0);
 
-  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "onshow");
 
-  onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
+  onshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Notification */, "onshow", __arg_0);
 
-  permission_Getter_() => Blink_JsNative_DomException.getProperty(Blink_JsNative_DomException.getProperty(js.context, "Notification"), "permission");
+  permission_Getter_() => Blink_JsNative_DomException.getProperty(Blink_JsNative_DomException.getProperty(js.context, "Notification") /* Notification */, "permission");
 
-  requestPermission_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Notification"), "requestPermission", []);
+  silent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "silent");
 
-  requestPermission_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Notification"), "requestPermission", [__arg_0]);
+  tag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "tag");
 
-  tag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tag");
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "title");
 
-  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
+  vibrate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Notification */, "vibrate");
+
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Notification */, "close", []);
+
+  requestPermission_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Notification") /* Notification */, "requestPermission", []);
+
+  requestPermission_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Notification") /* Notification */, "requestPermission", [__arg_0]);
+
+}
+
+class BlinkNotificationEvent extends BlinkExtendableEvent {
+  static final instance = new BlinkNotificationEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("NotificationEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("NotificationEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("NotificationEvent", [__arg_0, __arg_1]);
+
+  notification_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NotificationEvent */, "notification");
+
+}
+
+class BlinkNotificationPermissionCallback {
+  static final instance = new BlinkNotificationPermissionCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* NotificationPermissionCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* NotificationPermissionCallback */, "handleEvent", [__arg_0]);
 
 }
 
@@ -9340,333 +11518,391 @@
 class BlinkOESVertexArrayObject {
   static final instance = new BlinkOESVertexArrayObject();
 
-  bindVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindVertexArrayOES", []);
+  bindVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* OESVertexArrayObject */, "bindVertexArrayOES", []);
 
-  bindVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindVertexArrayOES", [__arg_0]);
+  bindVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* OESVertexArrayObject */, "bindVertexArrayOES", [__arg_0]);
 
-  createVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createVertexArrayOES", []);
+  createVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* OESVertexArrayObject */, "createVertexArrayOES", []);
 
-  deleteVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteVertexArrayOES", []);
+  deleteVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* OESVertexArrayObject */, "deleteVertexArrayOES", []);
 
-  deleteVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteVertexArrayOES", [__arg_0]);
+  deleteVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* OESVertexArrayObject */, "deleteVertexArrayOES", [__arg_0]);
 
-  isVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isVertexArrayOES", []);
+  isVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* OESVertexArrayObject */, "isVertexArrayOES", []);
 
-  isVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isVertexArrayOES", [__arg_0]);
+  isVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* OESVertexArrayObject */, "isVertexArrayOES", [__arg_0]);
 
 }
 
 class BlinkOfflineAudioCompletionEvent extends BlinkEvent {
   static final instance = new BlinkOfflineAudioCompletionEvent();
 
-  renderedBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "renderedBuffer");
+  renderedBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* OfflineAudioCompletionEvent */, "renderedBuffer");
 
 }
 
 class BlinkOfflineAudioContext extends BlinkAudioContext {
   static final instance = new BlinkOfflineAudioContext();
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "OfflineAudioContext"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("OfflineAudioContext", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "OfflineAudioContext"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("OfflineAudioContext", [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "OfflineAudioContext"), [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("OfflineAudioContext", [__arg_0, __arg_1, __arg_2]);
+
+  oncomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* OfflineAudioContext */, "oncomplete");
+
+  oncomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* OfflineAudioContext */, "oncomplete", __arg_0);
+
+  startRendering_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* OfflineAudioContext */, "startRendering", []);
 
 }
 
 class BlinkOscillatorNode extends BlinkAudioSourceNode {
   static final instance = new BlinkOscillatorNode();
 
-  detune_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "detune");
+  detune_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* OscillatorNode */, "detune");
 
-  frequency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frequency");
+  frequency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* OscillatorNode */, "frequency");
 
-  noteOff_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "noteOff", []);
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* OscillatorNode */, "onended");
 
-  noteOff_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "noteOff", [__arg_0]);
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* OscillatorNode */, "onended", __arg_0);
 
-  noteOn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "noteOn", []);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* OscillatorNode */, "type");
 
-  noteOn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "noteOn", [__arg_0]);
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* OscillatorNode */, "type", __arg_0);
 
-  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
+  setPeriodicWave_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* OscillatorNode */, "setPeriodicWave", []);
 
-  onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
+  setPeriodicWave_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* OscillatorNode */, "setPeriodicWave", [__arg_0]);
 
-  setPeriodicWave_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setPeriodicWave", []);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* OscillatorNode */, "start", []);
 
-  setPeriodicWave_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setPeriodicWave", [__arg_0]);
+  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* OscillatorNode */, "start", [__arg_0]);
 
-  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* OscillatorNode */, "stop", []);
 
-  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0]);
-
-  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
-
-  stop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stop", [__arg_0]);
-
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
-
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
-
-}
-
-class BlinkOverflowEvent extends BlinkEvent {
-  static final instance = new BlinkOverflowEvent();
-
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "OverflowEvent"), [__arg_0, __arg_1]);
-
-  horizontalOverflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "horizontalOverflow");
-
-  orient_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orient");
-
-  verticalOverflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "verticalOverflow");
+  stop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* OscillatorNode */, "stop", [__arg_0]);
 
 }
 
 class BlinkPagePopupController {
   static final instance = new BlinkPagePopupController();
 
-  closePopup_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "closePopup", []);
+  closePopup_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "closePopup", []);
 
-  formatMonth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "formatMonth", []);
+  formatMonth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatMonth", []);
 
-  formatMonth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "formatMonth", [__arg_0]);
+  formatMonth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatMonth", [__arg_0]);
 
-  formatMonth_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "formatMonth", [__arg_0, __arg_1]);
+  formatMonth_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatMonth", [__arg_0, __arg_1]);
 
-  formatShortMonth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "formatShortMonth", []);
+  formatShortMonth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatShortMonth", []);
 
-  formatShortMonth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "formatShortMonth", [__arg_0]);
+  formatShortMonth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatShortMonth", [__arg_0]);
 
-  formatShortMonth_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "formatShortMonth", [__arg_0, __arg_1]);
+  formatShortMonth_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatShortMonth", [__arg_0, __arg_1]);
 
-  formatWeek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "formatWeek", [__arg_0]);
+  formatWeek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatWeek", [__arg_0]);
 
-  formatWeek_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "formatWeek", [__arg_0, __arg_1]);
+  formatWeek_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatWeek", [__arg_0, __arg_1]);
 
-  formatWeek_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "formatWeek", [__arg_0, __arg_1, __arg_2]);
+  formatWeek_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "formatWeek", [__arg_0, __arg_1, __arg_2]);
 
-  histogramEnumeration_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "histogramEnumeration", [__arg_0]);
+  histogramEnumeration_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "histogramEnumeration", [__arg_0]);
 
-  histogramEnumeration_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "histogramEnumeration", [__arg_0, __arg_1]);
+  histogramEnumeration_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "histogramEnumeration", [__arg_0, __arg_1]);
 
-  histogramEnumeration_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "histogramEnumeration", [__arg_0, __arg_1, __arg_2]);
+  histogramEnumeration_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "histogramEnumeration", [__arg_0, __arg_1, __arg_2]);
 
-  localizeNumberString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "localizeNumberString", []);
+  localizeNumberString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "localizeNumberString", []);
 
-  localizeNumberString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "localizeNumberString", [__arg_0]);
+  localizeNumberString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "localizeNumberString", [__arg_0]);
 
-  setValueAndClosePopup_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setValueAndClosePopup", []);
+  selectFontsFromOwnerDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "selectFontsFromOwnerDocument", []);
 
-  setValueAndClosePopup_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setValueAndClosePopup", [__arg_0]);
+  selectFontsFromOwnerDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "selectFontsFromOwnerDocument", [__arg_0]);
 
-  setValueAndClosePopup_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setValueAndClosePopup", [__arg_0, __arg_1]);
+  setValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "setValue", []);
 
-  setValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setValue", []);
+  setValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "setValue", [__arg_0]);
 
-  setValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setValue", [__arg_0]);
+  setValueAndClosePopup_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "setValueAndClosePopup", []);
+
+  setValueAndClosePopup_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "setValueAndClosePopup", [__arg_0]);
+
+  setValueAndClosePopup_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "setValueAndClosePopup", [__arg_0, __arg_1]);
+
+  setWindowRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "setWindowRect", [__arg_0, __arg_1]);
+
+  setWindowRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "setWindowRect", [__arg_0, __arg_1, __arg_2]);
+
+  setWindowRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* PagePopupController */, "setWindowRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkPageTransitionEvent extends BlinkEvent {
   static final instance = new BlinkPageTransitionEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "PageTransitionEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("PageTransitionEvent");
 
-  persisted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "persisted");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("PageTransitionEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("PageTransitionEvent", [__arg_0, __arg_1]);
+
+  persisted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PageTransitionEvent */, "persisted");
 
 }
 
 class BlinkPannerNode extends BlinkAudioNode {
   static final instance = new BlinkPannerNode();
 
-  coneInnerAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coneInnerAngle");
+  coneInnerAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PannerNode */, "coneInnerAngle");
 
-  coneInnerAngle_Setter_(mthis, __arg_0) => mthis["coneInnerAngle"] = __arg_0;
+  coneInnerAngle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PannerNode */, "coneInnerAngle", __arg_0);
 
-  coneOuterAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coneOuterAngle");
+  coneOuterAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PannerNode */, "coneOuterAngle");
 
-  coneOuterAngle_Setter_(mthis, __arg_0) => mthis["coneOuterAngle"] = __arg_0;
+  coneOuterAngle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PannerNode */, "coneOuterAngle", __arg_0);
 
-  coneOuterGain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coneOuterGain");
+  coneOuterGain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PannerNode */, "coneOuterGain");
 
-  coneOuterGain_Setter_(mthis, __arg_0) => mthis["coneOuterGain"] = __arg_0;
+  coneOuterGain_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PannerNode */, "coneOuterGain", __arg_0);
 
-  distanceModel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "distanceModel");
+  distanceModel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PannerNode */, "distanceModel");
 
-  distanceModel_Setter_(mthis, __arg_0) => mthis["distanceModel"] = __arg_0;
+  distanceModel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PannerNode */, "distanceModel", __arg_0);
 
-  maxDistance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxDistance");
+  maxDistance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PannerNode */, "maxDistance");
 
-  maxDistance_Setter_(mthis, __arg_0) => mthis["maxDistance"] = __arg_0;
+  maxDistance_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PannerNode */, "maxDistance", __arg_0);
 
-  panningModel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "panningModel");
+  panningModel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PannerNode */, "panningModel");
 
-  panningModel_Setter_(mthis, __arg_0) => mthis["panningModel"] = __arg_0;
+  panningModel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PannerNode */, "panningModel", __arg_0);
 
-  refDistance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "refDistance");
+  refDistance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PannerNode */, "refDistance");
 
-  refDistance_Setter_(mthis, __arg_0) => mthis["refDistance"] = __arg_0;
+  refDistance_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PannerNode */, "refDistance", __arg_0);
 
-  rolloffFactor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rolloffFactor");
+  rolloffFactor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PannerNode */, "rolloffFactor");
 
-  rolloffFactor_Setter_(mthis, __arg_0) => mthis["rolloffFactor"] = __arg_0;
+  rolloffFactor_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PannerNode */, "rolloffFactor", __arg_0);
 
-  setOrientation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0]);
+  setOrientation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setOrientation", [__arg_0]);
 
-  setOrientation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0, __arg_1]);
+  setOrientation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setOrientation", [__arg_0, __arg_1]);
 
-  setOrientation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0, __arg_1, __arg_2]);
+  setOrientation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setOrientation", [__arg_0, __arg_1, __arg_2]);
 
-  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0]);
+  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setPosition", [__arg_0]);
 
-  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1]);
+  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setPosition", [__arg_0, __arg_1]);
 
-  setPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1, __arg_2]);
+  setPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setPosition", [__arg_0, __arg_1, __arg_2]);
 
-  setVelocity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0]);
+  setVelocity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setVelocity", [__arg_0]);
 
-  setVelocity_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0, __arg_1]);
+  setVelocity_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setVelocity", [__arg_0, __arg_1]);
 
-  setVelocity_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0, __arg_1, __arg_2]);
+  setVelocity_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* PannerNode */, "setVelocity", [__arg_0, __arg_1, __arg_2]);
+
+}
+
+class BlinkParentNode {
+  static final instance = new BlinkParentNode();
+
+  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ParentNode */, "childElementCount");
+
+  children_Getter_(mthis) native "Blink_Getter_ParentNode_children";
+
+  firstElementChild_Getter_(mthis) native "Blink_Getter_ParentNode_firstElementChild";
+
+  lastElementChild_Getter_(mthis) native "Blink_Getter_ParentNode_lastElementChild";
+
+  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "append", []);
+
+  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "append", [__arg_0]);
+
+  prepend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "prepend", []);
+
+  prepend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "prepend", [__arg_0]);
+
+  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelector", []);
+
+  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelector", [__arg_0]);
+
+  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelectorAll", []);
+
+  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ParentNode */, "querySelectorAll", [__arg_0]);
+
+}
+
+class BlinkPasswordCredential extends BlinkCredential {
+  static final instance = new BlinkPasswordCredential();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("PasswordCredential");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("PasswordCredential", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("PasswordCredential", [__arg_0, __arg_1]);
+
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("PasswordCredential", [__arg_0, __arg_1, __arg_2]);
+
+  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callConstructor("PasswordCredential", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  formData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PasswordCredential */, "formData");
+
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PasswordCredential */, "password");
 
 }
 
 class BlinkPath2D {
   static final instance = new BlinkPath2D();
 
-  addPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addPath", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Path2D");
 
-  addPath_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addPath", [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Path2D", [__arg_0]);
 
-  addPath_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addPath", [__arg_0, __arg_1]);
+  addPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Path2D */, "addPath", []);
 
-  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "arcTo", [__arg_0, __arg_1, __arg_2]);
+  addPath_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Path2D */, "addPath", [__arg_0]);
 
-  arcTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  addPath_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Path2D */, "addPath", [__arg_0, __arg_1]);
 
-  arcTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  arc_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  arc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2]);
+  arc_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  arc_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  arc_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  arc_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2]);
 
-  arc_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  arcTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  bezierCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  arcTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "arcTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  bezierCurveTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  bezierCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  bezierCurveTo_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  bezierCurveTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  closePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "closePath", []);
+  bezierCurveTo_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Path2D"), []);
+  closePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "closePath", []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Path2D"), [__arg_0]);
+  ellipse_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  ellipse_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  ellipse_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  ellipse_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  ellipse_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  ellipse_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  lineTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", []);
 
-  ellipse_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  lineTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", [__arg_0]);
 
-  lineTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", []);
+  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "lineTo", [__arg_0, __arg_1]);
 
-  lineTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", [__arg_0]);
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", []);
 
-  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", [__arg_0, __arg_1]);
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", [__arg_0]);
 
-  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "moveTo", [__arg_0, __arg_1]);
 
-  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
+  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1]);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
+  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
 
-  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1]);
+  quadraticCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
+  rect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1]);
 
-  quadraticCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  rect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1, __arg_2]);
 
-  rect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "rect", [__arg_0, __arg_1]);
-
-  rect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "rect", [__arg_0, __arg_1, __arg_2]);
-
-  rect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "rect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  rect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* CanvasPathMethods */, "rect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkPerformance extends BlinkEventTarget {
   static final instance = new BlinkPerformance();
 
-  clearMarks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearMarks", []);
+  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Performance */, "memory");
 
-  clearMarks_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearMarks", [__arg_0]);
+  navigation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Performance */, "navigation");
 
-  clearMeasures_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearMeasures", []);
+  onframetimingbufferfull_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Performance */, "onframetimingbufferfull");
 
-  clearMeasures_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearMeasures", [__arg_0]);
+  onframetimingbufferfull_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Performance */, "onframetimingbufferfull", __arg_0);
 
-  getEntriesByName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByName", []);
+  onwebkitresourcetimingbufferfull_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Performance */, "onwebkitresourcetimingbufferfull");
 
-  getEntriesByName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByName", [__arg_0]);
+  onwebkitresourcetimingbufferfull_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Performance */, "onwebkitresourcetimingbufferfull", __arg_0);
 
-  getEntriesByName_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByName", [__arg_0, __arg_1]);
+  timing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Performance */, "timing");
 
-  getEntriesByType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByType", []);
+  clearFrameTimings_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "clearFrameTimings", []);
 
-  getEntriesByType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByType", [__arg_0]);
+  clearMarks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "clearMarks", []);
 
-  getEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEntries", []);
+  clearMarks_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "clearMarks", [__arg_0]);
 
-  mark_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "mark", []);
+  clearMeasures_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "clearMeasures", []);
 
-  mark_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "mark", [__arg_0]);
+  clearMeasures_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "clearMeasures", [__arg_0]);
 
-  measure_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "measure", []);
+  getEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "getEntries", []);
 
-  measure_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "measure", [__arg_0]);
+  getEntriesByName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "getEntriesByName", []);
 
-  measure_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "measure", [__arg_0, __arg_1]);
+  getEntriesByName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "getEntriesByName", [__arg_0]);
 
-  measure_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "measure", [__arg_0, __arg_1, __arg_2]);
+  getEntriesByName_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "getEntriesByName", [__arg_0, __arg_1]);
 
-  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "memory");
+  getEntriesByType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "getEntriesByType", []);
 
-  navigation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "navigation");
+  getEntriesByType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "getEntriesByType", [__arg_0]);
 
-  now_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "now", []);
+  mark_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "mark", []);
 
-  onwebkitresourcetimingbufferfull_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitresourcetimingbufferfull");
+  mark_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "mark", [__arg_0]);
 
-  onwebkitresourcetimingbufferfull_Setter_(mthis, __arg_0) => mthis["onwebkitresourcetimingbufferfull"] = __arg_0;
+  measure_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "measure", [__arg_0]);
 
-  timing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timing");
+  measure_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "measure", [__arg_0, __arg_1]);
 
-  webkitClearResourceTimings_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitClearResourceTimings", []);
+  measure_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "measure", [__arg_0, __arg_1, __arg_2]);
 
-  webkitSetResourceTimingBufferSize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitSetResourceTimingBufferSize", []);
+  now_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "now", []);
 
-  webkitSetResourceTimingBufferSize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitSetResourceTimingBufferSize", [__arg_0]);
+  setFrameTimingBufferSize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "setFrameTimingBufferSize", []);
+
+  setFrameTimingBufferSize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "setFrameTimingBufferSize", [__arg_0]);
+
+  webkitClearResourceTimings_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "webkitClearResourceTimings", []);
+
+  webkitSetResourceTimingBufferSize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "webkitSetResourceTimingBufferSize", []);
+
+  webkitSetResourceTimingBufferSize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Performance */, "webkitSetResourceTimingBufferSize", [__arg_0]);
+
+}
+
+class BlinkPerformanceCompositeTiming extends BlinkPerformanceEntry {
+  static final instance = new BlinkPerformanceCompositeTiming();
+
+  sourceFrame_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceCompositeTiming */, "sourceFrame");
 
 }
 
 class BlinkPerformanceEntry {
   static final instance = new BlinkPerformanceEntry();
 
-  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceEntry */, "duration");
 
-  entryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "entryType");
+  entryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceEntry */, "entryType");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceEntry */, "name");
 
-  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startTime");
+  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceEntry */, "startTime");
 
 }
 
@@ -9683,85 +11919,141 @@
 class BlinkPerformanceNavigation {
   static final instance = new BlinkPerformanceNavigation();
 
-  redirectCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectCount");
+  redirectCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceNavigation */, "redirectCount");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceNavigation */, "type");
+
+}
+
+class BlinkPerformanceRenderTiming extends BlinkPerformanceEntry {
+  static final instance = new BlinkPerformanceRenderTiming();
+
+  sourceFrame_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceRenderTiming */, "sourceFrame");
 
 }
 
 class BlinkPerformanceResourceTiming extends BlinkPerformanceEntry {
   static final instance = new BlinkPerformanceResourceTiming();
 
-  connectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connectEnd");
+  connectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "connectEnd");
 
-  connectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connectStart");
+  connectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "connectStart");
 
-  domainLookupEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domainLookupEnd");
+  domainLookupEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "domainLookupEnd");
 
-  domainLookupStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domainLookupStart");
+  domainLookupStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "domainLookupStart");
 
-  fetchStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fetchStart");
+  fetchStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "fetchStart");
 
-  initiatorType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "initiatorType");
+  initiatorType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "initiatorType");
 
-  redirectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectEnd");
+  redirectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "redirectEnd");
 
-  redirectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectStart");
+  redirectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "redirectStart");
 
-  requestStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requestStart");
+  requestStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "requestStart");
 
-  responseEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseEnd");
+  responseEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "responseEnd");
 
-  responseStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseStart");
+  responseStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "responseStart");
 
-  secureConnectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "secureConnectionStart");
+  secureConnectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "secureConnectionStart");
+
+  workerStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceResourceTiming */, "workerStart");
 
 }
 
 class BlinkPerformanceTiming {
   static final instance = new BlinkPerformanceTiming();
 
-  connectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connectEnd");
+  connectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "connectEnd");
 
-  connectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connectStart");
+  connectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "connectStart");
 
-  domComplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domComplete");
+  domComplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "domComplete");
 
-  domContentLoadedEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domContentLoadedEventEnd");
+  domContentLoadedEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "domContentLoadedEventEnd");
 
-  domContentLoadedEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domContentLoadedEventStart");
+  domContentLoadedEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "domContentLoadedEventStart");
 
-  domInteractive_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domInteractive");
+  domInteractive_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "domInteractive");
 
-  domLoading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domLoading");
+  domLoading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "domLoading");
 
-  domainLookupEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domainLookupEnd");
+  domainLookupEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "domainLookupEnd");
 
-  domainLookupStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domainLookupStart");
+  domainLookupStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "domainLookupStart");
 
-  fetchStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fetchStart");
+  fetchStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "fetchStart");
 
-  loadEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loadEventEnd");
+  loadEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "loadEventEnd");
 
-  loadEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loadEventStart");
+  loadEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "loadEventStart");
 
-  navigationStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "navigationStart");
+  navigationStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "navigationStart");
 
-  redirectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectEnd");
+  redirectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "redirectEnd");
 
-  redirectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectStart");
+  redirectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "redirectStart");
 
-  requestStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requestStart");
+  requestStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "requestStart");
 
-  responseEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseEnd");
+  responseEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "responseEnd");
 
-  responseStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseStart");
+  responseStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "responseStart");
 
-  secureConnectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "secureConnectionStart");
+  secureConnectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "secureConnectionStart");
 
-  unloadEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unloadEventEnd");
+  unloadEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "unloadEventEnd");
 
-  unloadEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unloadEventStart");
+  unloadEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PerformanceTiming */, "unloadEventStart");
+
+}
+
+class BlinkPeriodicSyncEvent extends BlinkExtendableEvent {
+  static final instance = new BlinkPeriodicSyncEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("PeriodicSyncEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("PeriodicSyncEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("PeriodicSyncEvent", [__arg_0, __arg_1]);
+
+  registration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PeriodicSyncEvent */, "registration");
+
+}
+
+class BlinkPeriodicSyncManager {
+  static final instance = new BlinkPeriodicSyncManager();
+
+  minPossiblePeriod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PeriodicSyncManager */, "minPossiblePeriod");
+
+  getRegistration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PeriodicSyncManager */, "getRegistration", []);
+
+  getRegistration_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PeriodicSyncManager */, "getRegistration", [__arg_0]);
+
+  getRegistrations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PeriodicSyncManager */, "getRegistrations", []);
+
+  permissionState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PeriodicSyncManager */, "permissionState", []);
+
+  register_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PeriodicSyncManager */, "register", []);
+
+  register_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PeriodicSyncManager */, "register", [__arg_0]);
+
+}
+
+class BlinkPeriodicSyncRegistration {
+  static final instance = new BlinkPeriodicSyncRegistration();
+
+  minPeriod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PeriodicSyncRegistration */, "minPeriod");
+
+  networkState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PeriodicSyncRegistration */, "networkState");
+
+  powerState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PeriodicSyncRegistration */, "powerState");
+
+  tag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PeriodicSyncRegistration */, "tag");
+
+  unregister_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PeriodicSyncRegistration */, "unregister", []);
 
 }
 
@@ -9770,796 +12062,1030 @@
 
 }
 
+class BlinkPermissionStatus extends BlinkEventTarget {
+  static final instance = new BlinkPermissionStatus();
+
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PermissionStatus */, "onchange");
+
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PermissionStatus */, "onchange", __arg_0);
+
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PermissionStatus */, "state");
+
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PermissionStatus */, "status");
+
+}
+
+class BlinkPermissions {
+  static final instance = new BlinkPermissions();
+
+  query_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Permissions */, "query", []);
+
+  query_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Permissions */, "query", [__arg_0]);
+
+}
+
 class BlinkPlugin {
   static final instance = new BlinkPlugin();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  description_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Plugin */, "description");
 
-  description_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "description");
+  filename_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Plugin */, "filename");
 
-  filename_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filename");
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Plugin */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Plugin */, "name");
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Plugin */, "item", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Plugin */, "item", [__arg_0]);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Plugin */, "namedItem", []);
 
-  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
-
-  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Plugin */, "namedItem", [__arg_0]);
 
 }
 
 class BlinkPluginArray {
   static final instance = new BlinkPluginArray();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PluginArray */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PluginArray */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PluginArray */, "item", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PluginArray */, "namedItem", []);
 
-  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PluginArray */, "namedItem", [__arg_0]);
 
-  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
+  refresh_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PluginArray */, "refresh", []);
 
-  refresh_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "refresh", []);
-
-  refresh_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "refresh", [__arg_0]);
+  refresh_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PluginArray */, "refresh", [__arg_0]);
 
 }
 
 class BlinkPluginPlaceholderElement extends BlinkHTMLDivElement {
   static final instance = new BlinkPluginPlaceholderElement();
 
-  createdCallback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createdCallback", []);
+  closeable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PluginPlaceholderElement */, "closeable");
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  closeable_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PluginPlaceholderElement */, "closeable", __arg_0);
 
-  message_Setter_(mthis, __arg_0) => mthis["message"] = __arg_0;
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PluginPlaceholderElement */, "message");
+
+  message_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PluginPlaceholderElement */, "message", __arg_0);
+
+  createdCallback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PluginPlaceholderElement */, "createdCallback", []);
+
+}
+
+class BlinkPointerEvent extends BlinkMouseEvent {
+  static final instance = new BlinkPointerEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("PointerEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("PointerEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("PointerEvent", [__arg_0, __arg_1]);
+
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PointerEvent */, "height");
+
+  isPrimary_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PointerEvent */, "isPrimary");
+
+  pointerId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PointerEvent */, "pointerId");
+
+  pointerType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PointerEvent */, "pointerType");
+
+  pressure_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PointerEvent */, "pressure");
+
+  tiltX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PointerEvent */, "tiltX");
+
+  tiltY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PointerEvent */, "tiltY");
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PointerEvent */, "width");
 
 }
 
 class BlinkPopStateEvent extends BlinkEvent {
   static final instance = new BlinkPopStateEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "PopStateEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("PopStateEvent");
 
-  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "state");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("PopStateEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("PopStateEvent", [__arg_0, __arg_1]);
+
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PopStateEvent */, "state");
+
+}
+
+class BlinkPositionCallback {
+  static final instance = new BlinkPositionCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PositionCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PositionCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkPositionError {
   static final instance = new BlinkPositionError();
 
-  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PositionError */, "code");
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PositionError */, "message");
+
+}
+
+class BlinkPositionErrorCallback {
+  static final instance = new BlinkPositionErrorCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PositionErrorCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PositionErrorCallback */, "handleEvent", [__arg_0]);
+
+}
+
+class BlinkPositionSensorVRDevice extends BlinkVRDevice {
+  static final instance = new BlinkPositionSensorVRDevice();
+
+  getImmediateState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PositionSensorVRDevice */, "getImmediateState", []);
+
+  getState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PositionSensorVRDevice */, "getState", []);
+
+  resetSensor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PositionSensorVRDevice */, "resetSensor", []);
 
 }
 
 class BlinkPresentation extends BlinkEventTarget {
   static final instance = new BlinkPresentation();
 
-  onavailablechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onavailablechange");
+  ondefaultsessionstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Presentation */, "ondefaultsessionstart");
 
-  onavailablechange_Setter_(mthis, __arg_0) => mthis["onavailablechange"] = __arg_0;
+  ondefaultsessionstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Presentation */, "ondefaultsessionstart", __arg_0);
+
+  session_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Presentation */, "session");
+
+  getAvailability_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Presentation */, "getAvailability", []);
+
+  getAvailability_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Presentation */, "getAvailability", [__arg_0]);
+
+  joinSession_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Presentation */, "joinSession", []);
+
+  joinSession_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Presentation */, "joinSession", [__arg_0]);
+
+  joinSession_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Presentation */, "joinSession", [__arg_0, __arg_1]);
+
+  startSession_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Presentation */, "startSession", []);
+
+  startSession_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Presentation */, "startSession", [__arg_0]);
+
+}
+
+class BlinkPresentationAvailability extends BlinkEventTarget {
+  static final instance = new BlinkPresentationAvailability();
+
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PresentationAvailability */, "onchange");
+
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PresentationAvailability */, "onchange", __arg_0);
+
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PresentationAvailability */, "value");
+
+}
+
+class BlinkPresentationSession extends BlinkEventTarget {
+  static final instance = new BlinkPresentationSession();
+
+  binaryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PresentationSession */, "binaryType");
+
+  binaryType_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PresentationSession */, "binaryType", __arg_0);
+
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PresentationSession */, "id");
+
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PresentationSession */, "onmessage");
+
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PresentationSession */, "onmessage", __arg_0);
+
+  onstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PresentationSession */, "onstatechange");
+
+  onstatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* PresentationSession */, "onstatechange", __arg_0);
+
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PresentationSession */, "state");
+
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PresentationSession */, "close", []);
+
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PresentationSession */, "send", []);
+
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PresentationSession */, "send", [__arg_0]);
 
 }
 
 class BlinkProcessingInstruction extends BlinkCharacterData {
   static final instance = new BlinkProcessingInstruction();
 
-  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sheet");
+  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ProcessingInstruction */, "sheet");
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ProcessingInstruction */, "target");
 
 }
 
 class BlinkProgressEvent extends BlinkEvent {
   static final instance = new BlinkProgressEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ProgressEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("ProgressEvent");
 
-  lengthComputable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lengthComputable");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("ProgressEvent", [__arg_0]);
 
-  loaded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loaded");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("ProgressEvent", [__arg_0, __arg_1]);
 
-  total_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "total");
+  lengthComputable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ProgressEvent */, "lengthComputable");
+
+  loaded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ProgressEvent */, "loaded");
+
+  total_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ProgressEvent */, "total");
 
 }
 
-class BlinkPushEvent extends BlinkEvent {
+class BlinkPromiseRejectionEvent extends BlinkEvent {
+  static final instance = new BlinkPromiseRejectionEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("PromiseRejectionEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("PromiseRejectionEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("PromiseRejectionEvent", [__arg_0, __arg_1]);
+
+  promise_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PromiseRejectionEvent */, "promise");
+
+  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PromiseRejectionEvent */, "reason");
+
+}
+
+class BlinkPushEvent extends BlinkExtendableEvent {
   static final instance = new BlinkPushEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "PushEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("PushEvent");
 
-  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("PushEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("PushEvent", [__arg_0, __arg_1]);
+
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PushEvent */, "data");
 
 }
 
 class BlinkPushManager {
   static final instance = new BlinkPushManager();
 
-  register_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "register", []);
+  getSubscription_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PushManager */, "getSubscription", []);
 
-  register_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "register", [__arg_0]);
+  permissionState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PushManager */, "permissionState", []);
+
+  permissionState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PushManager */, "permissionState", [__arg_0]);
+
+  subscribe_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PushManager */, "subscribe", []);
+
+  subscribe_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* PushManager */, "subscribe", [__arg_0]);
 
 }
 
-class BlinkPushRegistration {
-  static final instance = new BlinkPushRegistration();
+class BlinkPushMessageData {
+  static final instance = new BlinkPushMessageData();
 
-  pushEndpoint_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pushEndpoint");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("PushMessageData");
 
-  pushRegistrationId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pushRegistrationId");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("PushMessageData", [__arg_0]);
+
+  arrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PushMessageData */, "arrayBuffer", []);
+
+  blob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PushMessageData */, "blob", []);
+
+  json_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PushMessageData */, "json", []);
+
+  text_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PushMessageData */, "text", []);
 
 }
 
-class BlinkRGBColor {
-  static final instance = new BlinkRGBColor();
+class BlinkPushSubscription {
+  static final instance = new BlinkPushSubscription();
 
-  blue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "blue");
+  endpoint_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* PushSubscription */, "endpoint");
 
-  green_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "green");
-
-  red_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "red");
+  unsubscribe_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* PushSubscription */, "unsubscribe", []);
 
 }
 
 class BlinkRTCDTMFSender extends BlinkEventTarget {
   static final instance = new BlinkRTCDTMFSender();
 
-  canInsertDTMF_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "canInsertDTMF");
+  canInsertDTMF_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDTMFSender */, "canInsertDTMF");
 
-  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDTMFSender */, "duration");
 
-  insertDTMF_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertDTMF", []);
+  interToneGap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDTMFSender */, "interToneGap");
 
-  insertDTMF_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertDTMF", [__arg_0]);
+  ontonechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDTMFSender */, "ontonechange");
 
-  insertDTMF_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertDTMF", [__arg_0, __arg_1]);
+  ontonechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCDTMFSender */, "ontonechange", __arg_0);
 
-  insertDTMF_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "insertDTMF", [__arg_0, __arg_1, __arg_2]);
+  toneBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDTMFSender */, "toneBuffer");
 
-  interToneGap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "interToneGap");
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDTMFSender */, "track");
 
-  ontonechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontonechange");
+  insertDTMF_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCDTMFSender */, "insertDTMF", []);
 
-  ontonechange_Setter_(mthis, __arg_0) => mthis["ontonechange"] = __arg_0;
+  insertDTMF_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCDTMFSender */, "insertDTMF", [__arg_0]);
 
-  toneBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "toneBuffer");
+  insertDTMF_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCDTMFSender */, "insertDTMF", [__arg_0, __arg_1]);
 
-  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
+  insertDTMF_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* RTCDTMFSender */, "insertDTMF", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkRTCDTMFToneChangeEvent extends BlinkEvent {
   static final instance = new BlinkRTCDTMFToneChangeEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCDTMFToneChangeEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("RTCDTMFToneChangeEvent");
 
-  tone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tone");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("RTCDTMFToneChangeEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("RTCDTMFToneChangeEvent", [__arg_0, __arg_1]);
+
+  tone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDTMFToneChangeEvent */, "tone");
 
 }
 
 class BlinkRTCDataChannel extends BlinkEventTarget {
   static final instance = new BlinkRTCDataChannel();
 
-  binaryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "binaryType");
+  binaryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "binaryType");
 
-  binaryType_Setter_(mthis, __arg_0) => mthis["binaryType"] = __arg_0;
+  binaryType_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCDataChannel */, "binaryType", __arg_0);
 
-  bufferedAmount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bufferedAmount");
+  bufferedAmount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "bufferedAmount");
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "id");
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "label");
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  maxRetransmitTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "maxRetransmitTime");
 
-  maxRetransmitTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxRetransmitTime");
+  maxRetransmits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "maxRetransmits");
 
-  maxRetransmits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxRetransmits");
+  negotiated_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "negotiated");
 
-  negotiated_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "negotiated");
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "onclose");
 
-  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCDataChannel */, "onclose", __arg_0);
 
-  onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "onerror");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCDataChannel */, "onerror", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "onmessage");
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCDataChannel */, "onmessage", __arg_0);
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "onopen");
 
-  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onopen");
+  onopen_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCDataChannel */, "onopen", __arg_0);
 
-  onopen_Setter_(mthis, __arg_0) => mthis["onopen"] = __arg_0;
+  ordered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "ordered");
 
-  ordered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ordered");
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "protocol");
 
-  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "readyState");
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  reliable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannel */, "reliable");
 
-  reliable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reliable");
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCDataChannel */, "close", []);
 
-  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "send", []);
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCDataChannel */, "send", []);
 
-  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0]);
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCDataChannel */, "send", [__arg_0]);
 
 }
 
 class BlinkRTCDataChannelEvent extends BlinkEvent {
   static final instance = new BlinkRTCDataChannelEvent();
 
-  channel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "channel");
+  channel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCDataChannelEvent */, "channel");
+
+}
+
+class BlinkRTCErrorCallback {
+  static final instance = new BlinkRTCErrorCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCErrorCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCErrorCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkRTCIceCandidate {
   static final instance = new BlinkRTCIceCandidate();
 
-  candidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "candidate");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("RTCIceCandidate");
 
-  candidate_Setter_(mthis, __arg_0) => mthis["candidate"] = __arg_0;
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("RTCIceCandidate", [__arg_0]);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCIceCandidate"), []);
+  candidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCIceCandidate */, "candidate");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCIceCandidate"), [__arg_0]);
+  candidate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCIceCandidate */, "candidate", __arg_0);
 
-  sdpMLineIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sdpMLineIndex");
+  sdpMLineIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCIceCandidate */, "sdpMLineIndex");
 
-  sdpMLineIndex_Setter_(mthis, __arg_0) => mthis["sdpMLineIndex"] = __arg_0;
+  sdpMLineIndex_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCIceCandidate */, "sdpMLineIndex", __arg_0);
 
-  sdpMid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sdpMid");
+  sdpMid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCIceCandidate */, "sdpMid");
 
-  sdpMid_Setter_(mthis, __arg_0) => mthis["sdpMid"] = __arg_0;
+  sdpMid_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCIceCandidate */, "sdpMid", __arg_0);
 
 }
 
 class BlinkRTCIceCandidateEvent extends BlinkEvent {
   static final instance = new BlinkRTCIceCandidateEvent();
 
-  candidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "candidate");
+  candidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCIceCandidateEvent */, "candidate");
 
 }
 
 class BlinkRTCPeerConnection extends BlinkEventTarget {
   static final instance = new BlinkRTCPeerConnection();
 
-  addIceCandidate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addIceCandidate", [__arg_0]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("webkitRTCPeerConnection");
 
-  addIceCandidate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addIceCandidate", [__arg_0, __arg_1]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("webkitRTCPeerConnection", [__arg_0]);
 
-  addIceCandidate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "addIceCandidate", [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("webkitRTCPeerConnection", [__arg_0, __arg_1]);
 
-  addStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addStream", []);
+  iceConnectionState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "iceConnectionState");
 
-  addStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addStream", [__arg_0]);
+  iceGatheringState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "iceGatheringState");
 
-  addStream_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addStream", [__arg_0, __arg_1]);
+  localDescription_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "localDescription");
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  onaddstream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "onaddstream");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "webkitRTCPeerConnection"), []);
+  onaddstream_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCPeerConnection */, "onaddstream", __arg_0);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "webkitRTCPeerConnection"), [__arg_0]);
+  ondatachannel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "ondatachannel");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "webkitRTCPeerConnection"), [__arg_0, __arg_1]);
+  ondatachannel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCPeerConnection */, "ondatachannel", __arg_0);
 
-  createAnswer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createAnswer", []);
+  onicecandidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "onicecandidate");
 
-  createAnswer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createAnswer", [__arg_0]);
+  onicecandidate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCPeerConnection */, "onicecandidate", __arg_0);
 
-  createAnswer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createAnswer", [__arg_0, __arg_1]);
+  oniceconnectionstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "oniceconnectionstatechange");
 
-  createAnswer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createAnswer", [__arg_0, __arg_1, __arg_2]);
+  oniceconnectionstatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCPeerConnection */, "oniceconnectionstatechange", __arg_0);
 
-  createDTMFSender_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDTMFSender", []);
+  onnegotiationneeded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "onnegotiationneeded");
 
-  createDTMFSender_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDTMFSender", [__arg_0]);
+  onnegotiationneeded_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCPeerConnection */, "onnegotiationneeded", __arg_0);
 
-  createDataChannel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDataChannel", []);
+  onremovestream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "onremovestream");
 
-  createDataChannel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDataChannel", [__arg_0]);
+  onremovestream_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCPeerConnection */, "onremovestream", __arg_0);
 
-  createDataChannel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createDataChannel", [__arg_0, __arg_1]);
+  onsignalingstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "onsignalingstatechange");
 
-  createOffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createOffer", []);
+  onsignalingstatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCPeerConnection */, "onsignalingstatechange", __arg_0);
 
-  createOffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createOffer", [__arg_0]);
+  remoteDescription_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "remoteDescription");
 
-  createOffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createOffer", [__arg_0, __arg_1]);
+  signalingState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCPeerConnection */, "signalingState");
 
-  createOffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createOffer", [__arg_0, __arg_1, __arg_2]);
+  addIceCandidate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "addIceCandidate", [__arg_0]);
 
-  getLocalStreams_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getLocalStreams", []);
+  addIceCandidate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "addIceCandidate", [__arg_0, __arg_1]);
 
-  getRemoteStreams_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRemoteStreams", []);
+  addIceCandidate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "addIceCandidate", [__arg_0, __arg_1, __arg_2]);
 
-  getStats_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStats", []);
+  addStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "addStream", []);
 
-  getStats_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getStats", [__arg_0]);
+  addStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "addStream", [__arg_0]);
 
-  getStats_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getStats", [__arg_0, __arg_1]);
+  addStream_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "addStream", [__arg_0, __arg_1]);
 
-  getStreamById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStreamById", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "close", []);
 
-  getStreamById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getStreamById", [__arg_0]);
+  createAnswer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createAnswer", []);
 
-  iceConnectionState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "iceConnectionState");
+  createAnswer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createAnswer", [__arg_0]);
 
-  iceGatheringState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "iceGatheringState");
+  createAnswer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createAnswer", [__arg_0, __arg_1]);
 
-  localDescription_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localDescription");
+  createAnswer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createAnswer", [__arg_0, __arg_1, __arg_2]);
 
-  onaddstream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddstream");
+  createDTMFSender_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createDTMFSender", []);
 
-  onaddstream_Setter_(mthis, __arg_0) => mthis["onaddstream"] = __arg_0;
+  createDTMFSender_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createDTMFSender", [__arg_0]);
 
-  ondatachannel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondatachannel");
+  createDataChannel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createDataChannel", []);
 
-  ondatachannel_Setter_(mthis, __arg_0) => mthis["ondatachannel"] = __arg_0;
+  createDataChannel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createDataChannel", [__arg_0]);
 
-  onicecandidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onicecandidate");
+  createDataChannel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createDataChannel", [__arg_0, __arg_1]);
 
-  onicecandidate_Setter_(mthis, __arg_0) => mthis["onicecandidate"] = __arg_0;
+  createOffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createOffer", []);
 
-  oniceconnectionstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oniceconnectionstatechange");
+  createOffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createOffer", [__arg_0]);
 
-  oniceconnectionstatechange_Setter_(mthis, __arg_0) => mthis["oniceconnectionstatechange"] = __arg_0;
+  createOffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createOffer", [__arg_0, __arg_1]);
 
-  onnegotiationneeded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onnegotiationneeded");
+  createOffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "createOffer", [__arg_0, __arg_1, __arg_2]);
 
-  onnegotiationneeded_Setter_(mthis, __arg_0) => mthis["onnegotiationneeded"] = __arg_0;
+  getLocalStreams_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "getLocalStreams", []);
 
-  onremovestream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovestream");
+  getRemoteStreams_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "getRemoteStreams", []);
 
-  onremovestream_Setter_(mthis, __arg_0) => mthis["onremovestream"] = __arg_0;
+  getStats_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "getStats", []);
 
-  onsignalingstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsignalingstatechange");
+  getStats_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "getStats", [__arg_0]);
 
-  onsignalingstatechange_Setter_(mthis, __arg_0) => mthis["onsignalingstatechange"] = __arg_0;
+  getStats_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "getStats", [__arg_0, __arg_1]);
 
-  remoteDescription_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "remoteDescription");
+  getStreamById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "getStreamById", []);
 
-  removeStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeStream", []);
+  getStreamById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "getStreamById", [__arg_0]);
 
-  removeStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeStream", [__arg_0]);
+  removeStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "removeStream", []);
 
-  setLocalDescription_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setLocalDescription", []);
+  removeStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "removeStream", [__arg_0]);
 
-  setLocalDescription_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setLocalDescription", [__arg_0]);
+  setLocalDescription_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "setLocalDescription", []);
 
-  setLocalDescription_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setLocalDescription", [__arg_0, __arg_1]);
+  setLocalDescription_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "setLocalDescription", [__arg_0]);
 
-  setLocalDescription_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setLocalDescription", [__arg_0, __arg_1, __arg_2]);
+  setLocalDescription_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "setLocalDescription", [__arg_0, __arg_1]);
 
-  setRemoteDescription_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setRemoteDescription", []);
+  setLocalDescription_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "setLocalDescription", [__arg_0, __arg_1, __arg_2]);
 
-  setRemoteDescription_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRemoteDescription", [__arg_0]);
+  setRemoteDescription_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "setRemoteDescription", []);
 
-  setRemoteDescription_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRemoteDescription", [__arg_0, __arg_1]);
+  setRemoteDescription_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "setRemoteDescription", [__arg_0]);
 
-  setRemoteDescription_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setRemoteDescription", [__arg_0, __arg_1, __arg_2]);
+  setRemoteDescription_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "setRemoteDescription", [__arg_0, __arg_1]);
 
-  signalingState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "signalingState");
+  setRemoteDescription_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "setRemoteDescription", [__arg_0, __arg_1, __arg_2]);
 
-  updateIce_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "updateIce", []);
+  updateIce_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "updateIce", []);
 
-  updateIce_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "updateIce", [__arg_0]);
+  updateIce_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "updateIce", [__arg_0]);
 
-  updateIce_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "updateIce", [__arg_0, __arg_1]);
+  updateIce_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* RTCPeerConnection */, "updateIce", [__arg_0, __arg_1]);
 
 }
 
 class BlinkRTCSessionDescription {
   static final instance = new BlinkRTCSessionDescription();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCSessionDescription"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("RTCSessionDescription");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCSessionDescription"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("RTCSessionDescription", [__arg_0]);
 
-  sdp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sdp");
+  sdp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCSessionDescription */, "sdp");
 
-  sdp_Setter_(mthis, __arg_0) => mthis["sdp"] = __arg_0;
+  sdp_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCSessionDescription */, "sdp", __arg_0);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCSessionDescription */, "type");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RTCSessionDescription */, "type", __arg_0);
+
+}
+
+class BlinkRTCSessionDescriptionCallback {
+  static final instance = new BlinkRTCSessionDescriptionCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCSessionDescriptionCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCSessionDescriptionCallback */, "handleEvent", [__arg_0]);
+
+}
+
+class BlinkRTCStatsCallback {
+  static final instance = new BlinkRTCStatsCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCStatsCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCStatsCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkRTCStatsReport {
   static final instance = new BlinkRTCStatsReport();
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCStatsReport */, "id");
 
-  local_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "local");
+  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCStatsReport */, "timestamp");
 
-  names_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "names", []);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RTCStatsReport */, "type");
 
-  remote_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "remote");
+  names_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCStatsReport */, "names", []);
 
-  stat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stat", []);
+  stat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCStatsReport */, "stat", []);
 
-  stat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stat", [__arg_0]);
-
-  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestamp");
-
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  stat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCStatsReport */, "stat", [__arg_0]);
 
 }
 
 class BlinkRTCStatsResponse {
   static final instance = new BlinkRTCStatsResponse();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCStatsResponse */, "namedItem", []);
 
-  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RTCStatsResponse */, "namedItem", [__arg_0]);
 
-  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
-
-  result_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "result", []);
+  result_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RTCStatsResponse */, "result", []);
 
 }
 
 class BlinkRadioNodeList extends BlinkNodeList {
   static final instance = new BlinkRadioNodeList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RadioNodeList */, "value");
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* RadioNodeList */, "value", __arg_0);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RadioNodeList */, "item", []);
+
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RadioNodeList */, "item", [__arg_0]);
 
 }
 
 class BlinkRange {
   static final instance = new BlinkRange();
 
-  cloneContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cloneContents", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Range");
 
-  cloneRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cloneRange", []);
+  collapsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Range */, "collapsed");
 
-  collapse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collapse", []);
+  commonAncestorContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Range */, "commonAncestorContainer");
 
-  collapse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "collapse", [__arg_0]);
+  endContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Range */, "endContainer");
 
-  collapsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "collapsed");
+  endOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Range */, "endOffset");
 
-  commonAncestorContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "commonAncestorContainer");
+  startContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Range */, "startContainer");
 
-  compareBoundaryPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "compareBoundaryPoints", []);
+  startOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Range */, "startOffset");
 
-  compareBoundaryPoints_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "compareBoundaryPoints", [__arg_0]);
+  cloneContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "cloneContents", []);
 
-  compareBoundaryPoints_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "compareBoundaryPoints", [__arg_0, __arg_1]);
+  cloneRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "cloneRange", []);
 
-  compareNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "compareNode", []);
+  collapse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "collapse", []);
 
-  compareNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "compareNode", [__arg_0]);
+  collapse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "collapse", [__arg_0]);
 
-  comparePoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "comparePoint", []);
+  compareBoundaryPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "compareBoundaryPoints", []);
 
-  comparePoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "comparePoint", [__arg_0]);
+  compareBoundaryPoints_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "compareBoundaryPoints", [__arg_0]);
 
-  comparePoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "comparePoint", [__arg_0, __arg_1]);
+  compareBoundaryPoints_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "compareBoundaryPoints", [__arg_0, __arg_1]);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Range"), []);
+  comparePoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "comparePoint", []);
 
-  createContextualFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createContextualFragment", []);
+  comparePoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "comparePoint", [__arg_0]);
 
-  createContextualFragment_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createContextualFragment", [__arg_0]);
+  comparePoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "comparePoint", [__arg_0, __arg_1]);
 
-  deleteContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteContents", []);
+  createContextualFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "createContextualFragment", []);
 
-  detach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "detach", []);
+  createContextualFragment_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "createContextualFragment", [__arg_0]);
 
-  endContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endContainer");
+  deleteContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "deleteContents", []);
 
-  endOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endOffset");
+  detach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "detach", []);
 
-  expand_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "expand", []);
+  expand_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "expand", []);
 
-  expand_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "expand", [__arg_0]);
+  expand_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "expand", [__arg_0]);
 
-  extractContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "extractContents", []);
+  extractContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "extractContents", []);
 
-  getBoundingClientRect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBoundingClientRect", []);
+  getBoundingClientRect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "getBoundingClientRect", []);
 
-  getClientRects_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getClientRects", []);
+  getClientRects_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "getClientRects", []);
 
-  insertNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertNode", []);
+  insertNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "insertNode", []);
 
-  insertNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertNode", [__arg_0]);
+  insertNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "insertNode", [__arg_0]);
 
-  intersectsNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "intersectsNode", []);
+  intersectsNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "intersectsNode", []);
 
-  intersectsNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "intersectsNode", [__arg_0]);
+  intersectsNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "intersectsNode", [__arg_0]);
 
-  isPointInRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInRange", []);
+  isPointInRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "isPointInRange", []);
 
-  isPointInRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInRange", [__arg_0]);
+  isPointInRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "isPointInRange", [__arg_0]);
 
-  isPointInRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isPointInRange", [__arg_0, __arg_1]);
+  isPointInRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "isPointInRange", [__arg_0, __arg_1]);
 
-  selectNodeContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "selectNodeContents", []);
+  selectNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "selectNode", []);
 
-  selectNodeContents_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "selectNodeContents", [__arg_0]);
+  selectNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "selectNode", [__arg_0]);
 
-  selectNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "selectNode", []);
+  selectNodeContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "selectNodeContents", []);
 
-  selectNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "selectNode", [__arg_0]);
+  selectNodeContents_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "selectNodeContents", [__arg_0]);
 
-  setEndAfter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setEndAfter", []);
+  setEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setEnd", []);
 
-  setEndAfter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setEndAfter", [__arg_0]);
+  setEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setEnd", [__arg_0]);
 
-  setEndBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setEndBefore", []);
+  setEnd_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setEnd", [__arg_0, __arg_1]);
 
-  setEndBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setEndBefore", [__arg_0]);
+  setEndAfter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setEndAfter", []);
 
-  setEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setEnd", []);
+  setEndAfter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setEndAfter", [__arg_0]);
 
-  setEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setEnd", [__arg_0]);
+  setEndBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setEndBefore", []);
 
-  setEnd_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setEnd", [__arg_0, __arg_1]);
+  setEndBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setEndBefore", [__arg_0]);
 
-  setStartAfter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStartAfter", []);
+  setStart_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setStart", []);
 
-  setStartAfter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStartAfter", [__arg_0]);
+  setStart_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setStart", [__arg_0]);
 
-  setStartBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStartBefore", []);
+  setStart_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setStart", [__arg_0, __arg_1]);
 
-  setStartBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStartBefore", [__arg_0]);
+  setStartAfter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setStartAfter", []);
 
-  setStart_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStart", []);
+  setStartAfter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setStartAfter", [__arg_0]);
 
-  setStart_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStart", [__arg_0]);
+  setStartBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setStartBefore", []);
 
-  setStart_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setStart", [__arg_0, __arg_1]);
+  setStartBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "setStartBefore", [__arg_0]);
 
-  startContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startContainer");
+  surroundContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "surroundContents", []);
 
-  startOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startOffset");
+  surroundContents_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Range */, "surroundContents", [__arg_0]);
 
-  surroundContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "surroundContents", []);
+}
 
-  surroundContents_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "surroundContents", [__arg_0]);
+class BlinkReadableByteStream {
+  static final instance = new BlinkReadableByteStream();
+
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableByteStream */, "cancel", []);
+
+  cancel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ReadableByteStream */, "cancel", [__arg_0]);
+
+  getReader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableByteStream */, "getReader", []);
+
+}
+
+class BlinkReadableByteStreamReader {
+  static final instance = new BlinkReadableByteStreamReader();
+
+  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ReadableByteStreamReader */, "closed");
+
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableByteStreamReader */, "cancel", []);
+
+  cancel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ReadableByteStreamReader */, "cancel", [__arg_0]);
+
+  read_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableByteStreamReader */, "read", []);
+
+  releaseLock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableByteStreamReader */, "releaseLock", []);
 
 }
 
 class BlinkReadableStream {
   static final instance = new BlinkReadableStream();
 
-  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancel", []);
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableStream */, "cancel", []);
 
-  cancel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cancel", [__arg_0]);
+  cancel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ReadableStream */, "cancel", [__arg_0]);
 
-  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "closed");
-
-  read_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "read", []);
-
-  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "state");
-
-  wait_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "wait", []);
+  getReader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableStream */, "getReader", []);
 
 }
 
-class BlinkRect {
-  static final instance = new BlinkRect();
+class BlinkReadableStreamReader {
+  static final instance = new BlinkReadableStreamReader();
 
-  bottom_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bottom");
+  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ReadableStreamReader */, "closed");
 
-  left_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "left");
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableStreamReader */, "cancel", []);
 
-  right_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "right");
+  cancel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ReadableStreamReader */, "cancel", [__arg_0]);
 
-  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "top");
+  read_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableStreamReader */, "read", []);
+
+  releaseLock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ReadableStreamReader */, "releaseLock", []);
 
 }
 
 class BlinkRelatedEvent extends BlinkEvent {
   static final instance = new BlinkRelatedEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RelatedEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("RelatedEvent");
 
-  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "relatedTarget");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("RelatedEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("RelatedEvent", [__arg_0, __arg_1]);
+
+  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* RelatedEvent */, "relatedTarget");
 
 }
 
 class BlinkRequest {
   static final instance = new BlinkRequest();
 
-  arrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "arrayBuffer", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Request");
 
-  blob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blob", []);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Request", [__arg_0]);
 
-  bodyUsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bodyUsed");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("Request", [__arg_0, __arg_1]);
 
-  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clone", []);
+  context_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Request */, "context");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Request"), []);
+  credentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Request */, "credentials");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Request"), [__arg_0]);
+  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Request */, "headers");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Request"), [__arg_0, __arg_1]);
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Request */, "mode");
 
-  credentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "credentials");
+  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Request */, "referrer");
 
-  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "headers");
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Request */, "url");
 
-  json_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "json", []);
+  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Request */, "clone", []);
 
-  method_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "method");
+}
 
-  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
+class BlinkRequestAnimationFrameCallback {
+  static final instance = new BlinkRequestAnimationFrameCallback();
 
-  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "referrer");
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* RequestAnimationFrameCallback */, "handleEvent", []);
 
-  text_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "text", []);
-
-  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* RequestAnimationFrameCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkResourceProgressEvent extends BlinkProgressEvent {
   static final instance = new BlinkResourceProgressEvent();
 
-  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ResourceProgressEvent */, "url");
 
 }
 
 class BlinkResponse {
   static final instance = new BlinkResponse();
 
-  arrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "arrayBuffer", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Response");
 
-  blob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blob", []);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Response", [__arg_0]);
 
-  bodyUsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bodyUsed");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("Response", [__arg_0, __arg_1]);
 
-  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clone", []);
+  body_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Response */, "body");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Response"), []);
+  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Response */, "headers");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Response"), [__arg_0]);
+  ok_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Response */, "ok");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Response"), [__arg_0, __arg_1]);
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Response */, "status");
 
-  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "headers");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Response */, "type");
 
-  json_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "json", []);
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Response */, "url");
 
-  statusText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusText");
+  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Response */, "clone", []);
 
-  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
+  error_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Response") /* Response */, "error", []);
 
-  text_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "text", []);
+  redirect_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Response") /* Response */, "redirect", []);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  redirect_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Response") /* Response */, "redirect", [__arg_0]);
 
-  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
+  redirect_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Response") /* Response */, "redirect", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSQLError {
   static final instance = new BlinkSQLError();
 
-  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SQLError */, "code");
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SQLError */, "message");
 
 }
 
 class BlinkSQLResultSet {
   static final instance = new BlinkSQLResultSet();
 
-  insertId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "insertId");
+  insertId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SQLResultSet */, "insertId");
 
-  rowsAffected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rowsAffected");
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SQLResultSet */, "rows");
 
-  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rows");
+  rowsAffected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SQLResultSet */, "rowsAffected");
 
 }
 
 class BlinkSQLResultSetRowList {
   static final instance = new BlinkSQLResultSetRowList();
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SQLResultSetRowList */, "length");
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SQLResultSetRowList */, "item", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SQLResultSetRowList */, "item", [__arg_0]);
+
+}
+
+class BlinkSQLStatementCallback {
+  static final instance = new BlinkSQLStatementCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SQLStatementCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SQLStatementCallback */, "handleEvent", [__arg_0]);
+
+  handleEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SQLStatementCallback */, "handleEvent", [__arg_0, __arg_1]);
+
+}
+
+class BlinkSQLStatementErrorCallback {
+  static final instance = new BlinkSQLStatementErrorCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SQLStatementErrorCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SQLStatementErrorCallback */, "handleEvent", [__arg_0]);
+
+  handleEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SQLStatementErrorCallback */, "handleEvent", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSQLTransaction {
   static final instance = new BlinkSQLTransaction();
 
-  executeSql_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", []);
+  executeSql_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransaction */, "executeSql", []);
 
-  executeSql_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", [__arg_0]);
+  executeSql_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransaction */, "executeSql", [__arg_0]);
 
-  executeSql_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", [__arg_0, __arg_1]);
+  executeSql_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransaction */, "executeSql", [__arg_0, __arg_1]);
 
-  executeSql_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", [__arg_0, __arg_1, __arg_2]);
+  executeSql_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransaction */, "executeSql", [__arg_0, __arg_1, __arg_2]);
 
-  executeSql_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  executeSql_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransaction */, "executeSql", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+}
+
+class BlinkSQLTransactionCallback {
+  static final instance = new BlinkSQLTransactionCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransactionCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransactionCallback */, "handleEvent", [__arg_0]);
+
+}
+
+class BlinkSQLTransactionErrorCallback {
+  static final instance = new BlinkSQLTransactionErrorCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransactionErrorCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SQLTransactionErrorCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkSVGAElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGAElement();
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAElement */, "target");
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
-
-}
-
-class BlinkSVGAltGlyphDefElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGAltGlyphDefElement();
-
-}
-
-class BlinkSVGAltGlyphElement extends BlinkSVGTextPositioningElement {
-  static final instance = new BlinkSVGAltGlyphElement();
-
-  format_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "format");
-
-  format_Setter_(mthis, __arg_0) => mthis["format"] = __arg_0;
-
-  glyphRef_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "glyphRef");
-
-  glyphRef_Setter_(mthis, __arg_0) => mthis["glyphRef"] = __arg_0;
-
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
-
-}
-
-class BlinkSVGAltGlyphItemElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGAltGlyphItemElement();
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
 class BlinkSVGAngle {
   static final instance = new BlinkSVGAngle();
 
-  convertToSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "convertToSpecifiedUnits", []);
+  unitType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAngle */, "unitType");
 
-  convertToSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "convertToSpecifiedUnits", [__arg_0]);
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAngle */, "value");
 
-  newValueSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", []);
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAngle */, "value", __arg_0);
 
-  newValueSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", [__arg_0]);
+  valueAsString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAngle */, "valueAsString");
 
-  newValueSpecifiedUnits_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", [__arg_0, __arg_1]);
+  valueAsString_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAngle */, "valueAsString", __arg_0);
 
-  unitType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unitType");
+  valueInSpecifiedUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAngle */, "valueInSpecifiedUnits");
 
-  valueAsString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueAsString");
+  valueInSpecifiedUnits_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAngle */, "valueInSpecifiedUnits", __arg_0);
 
-  valueAsString_Setter_(mthis, __arg_0) => mthis["valueAsString"] = __arg_0;
+  convertToSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAngle */, "convertToSpecifiedUnits", []);
 
-  valueInSpecifiedUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueInSpecifiedUnits");
+  convertToSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGAngle */, "convertToSpecifiedUnits", [__arg_0]);
 
-  valueInSpecifiedUnits_Setter_(mthis, __arg_0) => mthis["valueInSpecifiedUnits"] = __arg_0;
+  newValueSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAngle */, "newValueSpecifiedUnits", []);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  newValueSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGAngle */, "newValueSpecifiedUnits", [__arg_0]);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  newValueSpecifiedUnits_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGAngle */, "newValueSpecifiedUnits", [__arg_0, __arg_1]);
 
 }
 
@@ -10581,223 +13107,223 @@
 class BlinkSVGAnimatedAngle {
   static final instance = new BlinkSVGAnimatedAngle();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedAngle */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedAngle */, "baseVal");
 
 }
 
 class BlinkSVGAnimatedBoolean {
   static final instance = new BlinkSVGAnimatedBoolean();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedBoolean */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedBoolean */, "baseVal");
 
-  baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
+  baseVal_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAnimatedBoolean */, "baseVal", __arg_0);
 
 }
 
 class BlinkSVGAnimatedEnumeration {
   static final instance = new BlinkSVGAnimatedEnumeration();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedEnumeration */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedEnumeration */, "baseVal");
 
-  baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
+  baseVal_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAnimatedEnumeration */, "baseVal", __arg_0);
 
 }
 
 class BlinkSVGAnimatedInteger {
   static final instance = new BlinkSVGAnimatedInteger();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedInteger */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedInteger */, "baseVal");
 
-  baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
+  baseVal_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAnimatedInteger */, "baseVal", __arg_0);
 
 }
 
 class BlinkSVGAnimatedLength {
   static final instance = new BlinkSVGAnimatedLength();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedLength */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedLength */, "baseVal");
 
 }
 
 class BlinkSVGAnimatedLengthList {
   static final instance = new BlinkSVGAnimatedLengthList();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedLengthList */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedLengthList */, "baseVal");
 
 }
 
 class BlinkSVGAnimatedNumber {
   static final instance = new BlinkSVGAnimatedNumber();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedNumber */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedNumber */, "baseVal");
 
-  baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
+  baseVal_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAnimatedNumber */, "baseVal", __arg_0);
 
 }
 
 class BlinkSVGAnimatedNumberList {
   static final instance = new BlinkSVGAnimatedNumberList();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedNumberList */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedNumberList */, "baseVal");
 
 }
 
 class BlinkSVGAnimatedPreserveAspectRatio {
   static final instance = new BlinkSVGAnimatedPreserveAspectRatio();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedPreserveAspectRatio */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedPreserveAspectRatio */, "baseVal");
 
 }
 
 class BlinkSVGAnimatedRect {
   static final instance = new BlinkSVGAnimatedRect();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedRect */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedRect */, "baseVal");
 
 }
 
 class BlinkSVGAnimatedString {
   static final instance = new BlinkSVGAnimatedString();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedString */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedString */, "baseVal");
 
-  baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
+  baseVal_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAnimatedString */, "baseVal", __arg_0);
 
 }
 
 class BlinkSVGAnimatedTransformList {
   static final instance = new BlinkSVGAnimatedTransformList();
 
-  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedTransformList */, "animVal");
 
-  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimatedTransformList */, "baseVal");
 
 }
 
 class BlinkSVGAnimationElement extends BlinkSVGElement {
   static final instance = new BlinkSVGAnimationElement();
 
-  beginElementAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "beginElementAt", []);
+  onbegin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimationElement */, "onbegin");
 
-  beginElementAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "beginElementAt", [__arg_0]);
+  onbegin_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAnimationElement */, "onbegin", __arg_0);
 
-  beginElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "beginElement", []);
+  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimationElement */, "onend");
 
-  endElementAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "endElementAt", []);
+  onend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAnimationElement */, "onend", __arg_0);
 
-  endElementAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "endElementAt", [__arg_0]);
+  onrepeat_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimationElement */, "onrepeat");
 
-  endElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "endElement", []);
+  onrepeat_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGAnimationElement */, "onrepeat", __arg_0);
 
-  getCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentTime", []);
+  targetElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGAnimationElement */, "targetElement");
 
-  getSimpleDuration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSimpleDuration", []);
+  beginElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "beginElement", []);
 
-  getStartTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStartTime", []);
+  beginElementAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "beginElementAt", []);
 
-  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
+  beginElementAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "beginElementAt", [__arg_0]);
 
-  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
+  endElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "endElement", []);
 
-  onbegin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbegin");
+  endElementAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "endElementAt", []);
 
-  onbegin_Setter_(mthis, __arg_0) => mthis["onbegin"] = __arg_0;
+  endElementAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "endElementAt", [__arg_0]);
 
-  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onend");
+  getCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "getCurrentTime", []);
 
-  onend_Setter_(mthis, __arg_0) => mthis["onend"] = __arg_0;
+  getSimpleDuration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "getSimpleDuration", []);
 
-  onrepeat_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onrepeat");
+  getStartTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGAnimationElement */, "getStartTime", []);
 
-  onrepeat_Setter_(mthis, __arg_0) => mthis["onrepeat"] = __arg_0;
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredExtensions");
 
-  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredFeatures");
 
-  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "systemLanguage");
 
-  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", []);
 
-  targetElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "targetElement");
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", [__arg_0]);
 
 }
 
 class BlinkSVGCircleElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGCircleElement();
 
-  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cx");
+  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGCircleElement */, "cx");
 
-  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cy");
+  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGCircleElement */, "cy");
 
-  r_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r");
+  r_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGCircleElement */, "r");
 
 }
 
 class BlinkSVGClipPathElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGClipPathElement();
 
-  clipPathUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clipPathUnits");
+  clipPathUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGClipPathElement */, "clipPathUnits");
 
 }
 
 class BlinkSVGComponentTransferFunctionElement extends BlinkSVGElement {
   static final instance = new BlinkSVGComponentTransferFunctionElement();
 
-  amplitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "amplitude");
+  amplitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGComponentTransferFunctionElement */, "amplitude");
 
-  exponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "exponent");
+  exponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGComponentTransferFunctionElement */, "exponent");
 
-  intercept_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "intercept");
+  intercept_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGComponentTransferFunctionElement */, "intercept");
 
-  offset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offset");
+  offset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGComponentTransferFunctionElement */, "offset");
 
-  slope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "slope");
+  slope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGComponentTransferFunctionElement */, "slope");
 
-  tableValues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tableValues");
+  tableValues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGComponentTransferFunctionElement */, "tableValues");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGComponentTransferFunctionElement */, "type");
 
 }
 
 class BlinkSVGCursorElement extends BlinkSVGElement {
   static final instance = new BlinkSVGCursorElement();
 
-  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGCursorElement */, "x");
 
-  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGCursorElement */, "y");
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
-  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredExtensions");
 
-  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredFeatures");
 
-  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "systemLanguage");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", []);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", [__arg_0]);
 
 }
 
@@ -10819,518 +13345,542 @@
 class BlinkSVGElement extends BlinkElement {
   static final instance = new BlinkSVGElement();
 
-  className_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "className");
+  className_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGElement */, "className");
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  ownerSVGElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGElement */, "ownerSVGElement");
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGElement */, "style");
 
-  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocomplete");
+  tabIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGElement */, "tabIndex");
 
-  onautocomplete_Setter_(mthis, __arg_0) => mthis["onautocomplete"] = __arg_0;
+  tabIndex_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGElement */, "tabIndex", __arg_0);
 
-  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocompleteerror");
+  viewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGElement */, "viewportElement");
 
-  onautocompleteerror_Setter_(mthis, __arg_0) => mthis["onautocompleteerror"] = __arg_0;
+  blur_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGElement */, "blur", []);
 
-  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
+  focus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGElement */, "focus", []);
 
-  onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onabort");
 
-  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncancel");
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onabort", __arg_0);
 
-  oncancel_Setter_(mthis, __arg_0) => mthis["oncancel"] = __arg_0;
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocomplete");
 
-  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplay");
+  onautocomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocomplete", __arg_0);
 
-  oncanplay_Setter_(mthis, __arg_0) => mthis["oncanplay"] = __arg_0;
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror");
 
-  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplaythrough");
+  onautocompleteerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror", __arg_0);
 
-  oncanplaythrough_Setter_(mthis, __arg_0) => mthis["oncanplaythrough"] = __arg_0;
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onblur");
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  onblur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onblur", __arg_0);
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncancel");
 
-  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
+  oncancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncancel", __arg_0);
 
-  onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplay");
 
-  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
+  oncanplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplay", __arg_0);
 
-  onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough");
 
-  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncontextmenu");
+  oncanplaythrough_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough", __arg_0);
 
-  oncontextmenu_Setter_(mthis, __arg_0) => mthis["oncontextmenu"] = __arg_0;
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onchange");
 
-  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onchange", __arg_0);
 
-  oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclick");
 
-  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondblclick");
+  onclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclick", __arg_0);
 
-  ondblclick_Setter_(mthis, __arg_0) => mthis["ondblclick"] = __arg_0;
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclose");
 
-  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrag");
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclose", __arg_0);
 
-  ondrag_Setter_(mthis, __arg_0) => mthis["ondrag"] = __arg_0;
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncontextmenu");
 
-  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragend");
+  oncontextmenu_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncontextmenu", __arg_0);
 
-  ondragend_Setter_(mthis, __arg_0) => mthis["ondragend"] = __arg_0;
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncuechange");
 
-  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragenter");
+  oncuechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncuechange", __arg_0);
 
-  ondragenter_Setter_(mthis, __arg_0) => mthis["ondragenter"] = __arg_0;
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondblclick");
 
-  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragleave");
+  ondblclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondblclick", __arg_0);
 
-  ondragleave_Setter_(mthis, __arg_0) => mthis["ondragleave"] = __arg_0;
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrag");
 
-  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragover");
+  ondrag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrag", __arg_0);
 
-  ondragover_Setter_(mthis, __arg_0) => mthis["ondragover"] = __arg_0;
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragend");
 
-  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragstart");
+  ondragend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragend", __arg_0);
 
-  ondragstart_Setter_(mthis, __arg_0) => mthis["ondragstart"] = __arg_0;
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragenter");
 
-  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrop");
+  ondragenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragenter", __arg_0);
 
-  ondrop_Setter_(mthis, __arg_0) => mthis["ondrop"] = __arg_0;
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragleave");
 
-  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondurationchange");
+  ondragleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragleave", __arg_0);
 
-  ondurationchange_Setter_(mthis, __arg_0) => mthis["ondurationchange"] = __arg_0;
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragover");
 
-  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onemptied");
+  ondragover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragover", __arg_0);
 
-  onemptied_Setter_(mthis, __arg_0) => mthis["onemptied"] = __arg_0;
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragstart");
 
-  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
+  ondragstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragstart", __arg_0);
 
-  onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrop");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  ondrop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrop", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondurationchange");
 
-  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
+  ondurationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondurationchange", __arg_0);
 
-  onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onemptied");
 
-  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninput");
+  onemptied_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onemptied", __arg_0);
 
-  oninput_Setter_(mthis, __arg_0) => mthis["oninput"] = __arg_0;
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onended");
 
-  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninvalid");
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onended", __arg_0);
 
-  oninvalid_Setter_(mthis, __arg_0) => mthis["oninvalid"] = __arg_0;
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onerror");
 
-  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeydown");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onerror", __arg_0);
 
-  onkeydown_Setter_(mthis, __arg_0) => mthis["onkeydown"] = __arg_0;
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onfocus");
 
-  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeypress");
+  onfocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onfocus", __arg_0);
 
-  onkeypress_Setter_(mthis, __arg_0) => mthis["onkeypress"] = __arg_0;
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninput");
 
-  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeyup");
+  oninput_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninput", __arg_0);
 
-  onkeyup_Setter_(mthis, __arg_0) => mthis["onkeyup"] = __arg_0;
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninvalid");
 
-  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
+  oninvalid_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninvalid", __arg_0);
+
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeydown");
+
+  onkeydown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeydown", __arg_0);
+
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeypress");
+
+  onkeypress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeypress", __arg_0);
+
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeyup");
+
+  onkeyup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeyup", __arg_0);
+
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onload");
+
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onload", __arg_0);
+
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadeddata");
+
+  onloadeddata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadeddata", __arg_0);
+
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata");
+
+  onloadedmetadata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata", __arg_0);
 
-  onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadstart");
 
-  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadeddata");
+  onloadstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadstart", __arg_0);
 
-  onloadeddata_Setter_(mthis, __arg_0) => mthis["onloadeddata"] = __arg_0;
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousedown");
 
-  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadedmetadata");
+  onmousedown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousedown", __arg_0);
 
-  onloadedmetadata_Setter_(mthis, __arg_0) => mthis["onloadedmetadata"] = __arg_0;
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseenter");
 
-  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
+  onmouseenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseenter", __arg_0);
 
-  onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseleave");
 
-  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousedown");
+  onmouseleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseleave", __arg_0);
 
-  onmousedown_Setter_(mthis, __arg_0) => mthis["onmousedown"] = __arg_0;
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousemove");
 
-  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseenter");
+  onmousemove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousemove", __arg_0);
 
-  onmouseenter_Setter_(mthis, __arg_0) => mthis["onmouseenter"] = __arg_0;
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseout");
 
-  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseleave");
+  onmouseout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseout", __arg_0);
 
-  onmouseleave_Setter_(mthis, __arg_0) => mthis["onmouseleave"] = __arg_0;
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseover");
 
-  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousemove");
+  onmouseover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseover", __arg_0);
 
-  onmousemove_Setter_(mthis, __arg_0) => mthis["onmousemove"] = __arg_0;
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseup");
 
-  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseout");
+  onmouseup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseup", __arg_0);
 
-  onmouseout_Setter_(mthis, __arg_0) => mthis["onmouseout"] = __arg_0;
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousewheel");
 
-  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseover");
+  onmousewheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousewheel", __arg_0);
 
-  onmouseover_Setter_(mthis, __arg_0) => mthis["onmouseover"] = __arg_0;
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpause");
 
-  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseup");
+  onpause_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpause", __arg_0);
 
-  onmouseup_Setter_(mthis, __arg_0) => mthis["onmouseup"] = __arg_0;
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplay");
 
-  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousewheel");
+  onplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplay", __arg_0);
 
-  onmousewheel_Setter_(mthis, __arg_0) => mthis["onmousewheel"] = __arg_0;
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplaying");
 
-  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
+  onplaying_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplaying", __arg_0);
 
-  onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
+  onpointercancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointercancel");
 
-  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplay");
+  onpointercancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointercancel", __arg_0);
 
-  onplay_Setter_(mthis, __arg_0) => mthis["onplay"] = __arg_0;
+  onpointerdown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerdown");
 
-  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplaying");
+  onpointerdown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerdown", __arg_0);
 
-  onplaying_Setter_(mthis, __arg_0) => mthis["onplaying"] = __arg_0;
+  onpointerenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerenter");
 
-  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
+  onpointerenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerenter", __arg_0);
 
-  onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
+  onpointerleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerleave");
 
-  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onratechange");
+  onpointerleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerleave", __arg_0);
 
-  onratechange_Setter_(mthis, __arg_0) => mthis["onratechange"] = __arg_0;
+  onpointermove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointermove");
 
-  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreset");
+  onpointermove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointermove", __arg_0);
 
-  onreset_Setter_(mthis, __arg_0) => mthis["onreset"] = __arg_0;
+  onpointerout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerout");
 
-  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
+  onpointerout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerout", __arg_0);
 
-  onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
+  onpointerover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerover");
 
-  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
+  onpointerover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerover", __arg_0);
 
-  onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
+  onpointerup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerup");
 
-  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeked");
+  onpointerup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerup", __arg_0);
 
-  onseeked_Setter_(mthis, __arg_0) => mthis["onseeked"] = __arg_0;
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onprogress");
 
-  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeking");
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onprogress", __arg_0);
 
-  onseeking_Setter_(mthis, __arg_0) => mthis["onseeking"] = __arg_0;
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onratechange");
 
-  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselect");
+  onratechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onratechange", __arg_0);
 
-  onselect_Setter_(mthis, __arg_0) => mthis["onselect"] = __arg_0;
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onreset");
 
-  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
+  onreset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onreset", __arg_0);
 
-  onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onresize");
 
-  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstalled");
+  onresize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onresize", __arg_0);
 
-  onstalled_Setter_(mthis, __arg_0) => mthis["onstalled"] = __arg_0;
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onscroll");
 
-  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsubmit");
+  onscroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onscroll", __arg_0);
 
-  onsubmit_Setter_(mthis, __arg_0) => mthis["onsubmit"] = __arg_0;
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeked");
 
-  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuspend");
+  onseeked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeked", __arg_0);
 
-  onsuspend_Setter_(mthis, __arg_0) => mthis["onsuspend"] = __arg_0;
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeking");
 
-  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeupdate");
+  onseeking_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeking", __arg_0);
 
-  ontimeupdate_Setter_(mthis, __arg_0) => mthis["ontimeupdate"] = __arg_0;
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onselect");
 
-  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontoggle");
+  onselect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onselect", __arg_0);
 
-  ontoggle_Setter_(mthis, __arg_0) => mthis["ontoggle"] = __arg_0;
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onshow");
 
-  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvolumechange");
+  onshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onshow", __arg_0);
 
-  onvolumechange_Setter_(mthis, __arg_0) => mthis["onvolumechange"] = __arg_0;
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onstalled");
 
-  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwaiting");
+  onstalled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onstalled", __arg_0);
 
-  onwaiting_Setter_(mthis, __arg_0) => mthis["onwaiting"] = __arg_0;
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsubmit");
 
-  ownerSVGElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerSVGElement");
+  onsubmit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsubmit", __arg_0);
 
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsuspend");
 
-  tabIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tabIndex");
+  onsuspend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsuspend", __arg_0);
 
-  tabIndex_Setter_(mthis, __arg_0) => mthis["tabIndex"] = __arg_0;
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontimeupdate");
 
-  viewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewportElement");
+  ontimeupdate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontimeupdate", __arg_0);
 
-  xmlbase_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xmlbase");
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontoggle");
 
-  xmlbase_Setter_(mthis, __arg_0) => mthis["xmlbase"] = __arg_0;
+  ontoggle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontoggle", __arg_0);
 
-  xmllang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xmllang");
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onvolumechange");
 
-  xmllang_Setter_(mthis, __arg_0) => mthis["xmllang"] = __arg_0;
+  onvolumechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onvolumechange", __arg_0);
 
-  xmlspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xmlspace");
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onwaiting");
 
-  xmlspace_Setter_(mthis, __arg_0) => mthis["xmlspace"] = __arg_0;
+  onwaiting_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onwaiting", __arg_0);
 
 }
 
 class BlinkSVGEllipseElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGEllipseElement();
 
-  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cx");
+  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGEllipseElement */, "cx");
 
-  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cy");
+  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGEllipseElement */, "cy");
 
-  rx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rx");
+  rx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGEllipseElement */, "rx");
 
-  ry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ry");
+  ry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGEllipseElement */, "ry");
 
 }
 
 class BlinkSVGFEBlendElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEBlendElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEBlendElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEBlendElement */, "in2");
 
-  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in2");
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEBlendElement */, "mode");
 
-  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEColorMatrixElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEColorMatrixElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEColorMatrixElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEColorMatrixElement */, "type");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  values_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEColorMatrixElement */, "values");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  values_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "values");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEComponentTransferElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEComponentTransferElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEComponentTransferElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFECompositeElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFECompositeElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFECompositeElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFECompositeElement */, "in2");
 
-  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in2");
+  k1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFECompositeElement */, "k1");
 
-  k1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "k1");
+  k2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFECompositeElement */, "k2");
 
-  k2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "k2");
+  k3_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFECompositeElement */, "k3");
 
-  k3_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "k3");
+  k4_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFECompositeElement */, "k4");
 
-  k4_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "k4");
+  operator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFECompositeElement */, "operator");
 
-  operator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "operator");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEConvolveMatrixElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEConvolveMatrixElement();
 
-  bias_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bias");
+  bias_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "bias");
 
-  divisor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "divisor");
+  divisor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "divisor");
 
-  edgeMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "edgeMode");
+  edgeMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "edgeMode");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  kernelMatrix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "kernelMatrix");
 
-  kernelMatrix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelMatrix");
+  kernelUnitLengthX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "kernelUnitLengthX");
 
-  kernelUnitLengthX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelUnitLengthX");
+  kernelUnitLengthY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "kernelUnitLengthY");
 
-  kernelUnitLengthY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelUnitLengthY");
+  orderX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "orderX");
 
-  orderX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orderX");
+  orderY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "orderY");
 
-  orderY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orderY");
+  preserveAlpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "preserveAlpha");
 
-  preserveAlpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAlpha");
+  targetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "targetX");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  targetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEConvolveMatrixElement */, "targetY");
 
-  targetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "targetX");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  targetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "targetY");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEDiffuseLightingElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEDiffuseLightingElement();
 
-  diffuseConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "diffuseConstant");
+  diffuseConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDiffuseLightingElement */, "diffuseConstant");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDiffuseLightingElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  kernelUnitLengthX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDiffuseLightingElement */, "kernelUnitLengthX");
 
-  kernelUnitLengthX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelUnitLengthX");
+  kernelUnitLengthY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDiffuseLightingElement */, "kernelUnitLengthY");
 
-  kernelUnitLengthY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelUnitLengthY");
+  surfaceScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDiffuseLightingElement */, "surfaceScale");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  surfaceScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "surfaceScale");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEDisplacementMapElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEDisplacementMapElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDisplacementMapElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDisplacementMapElement */, "in2");
 
-  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in2");
+  scale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDisplacementMapElement */, "scale");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  xChannelSelector_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDisplacementMapElement */, "xChannelSelector");
 
-  scale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scale");
+  yChannelSelector_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDisplacementMapElement */, "yChannelSelector");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  xChannelSelector_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xChannelSelector");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  yChannelSelector_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "yChannelSelector");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEDistantLightElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEDistantLightElement();
 
-  azimuth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "azimuth");
+  azimuth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDistantLightElement */, "azimuth");
 
-  elevation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elevation");
+  elevation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDistantLightElement */, "elevation");
 
 }
 
 class BlinkSVGFEDropShadowElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEDropShadowElement();
 
-  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dx");
+  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDropShadowElement */, "dx");
 
-  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dy");
+  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDropShadowElement */, "dy");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDropShadowElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  stdDeviationX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDropShadowElement */, "stdDeviationX");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  stdDeviationY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEDropShadowElement */, "stdDeviationY");
 
-  setStdDeviation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", []);
+  setStdDeviation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGFEDropShadowElement */, "setStdDeviation", []);
 
-  setStdDeviation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", [__arg_0]);
+  setStdDeviation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGFEDropShadowElement */, "setStdDeviation", [__arg_0]);
 
-  setStdDeviation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", [__arg_0, __arg_1]);
+  setStdDeviation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGFEDropShadowElement */, "setStdDeviation", [__arg_0, __arg_1]);
 
-  stdDeviationX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stdDeviationX");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  stdDeviationY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stdDeviationY");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEFloodElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEFloodElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
@@ -11357,283 +13907,271 @@
 class BlinkSVGFEGaussianBlurElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEGaussianBlurElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEGaussianBlurElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  stdDeviationX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEGaussianBlurElement */, "stdDeviationX");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  stdDeviationY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEGaussianBlurElement */, "stdDeviationY");
 
-  setStdDeviation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", []);
+  setStdDeviation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGFEGaussianBlurElement */, "setStdDeviation", []);
 
-  setStdDeviation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", [__arg_0]);
+  setStdDeviation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGFEGaussianBlurElement */, "setStdDeviation", [__arg_0]);
 
-  setStdDeviation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", [__arg_0, __arg_1]);
+  setStdDeviation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGFEGaussianBlurElement */, "setStdDeviation", [__arg_0, __arg_1]);
 
-  stdDeviationX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stdDeviationX");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  stdDeviationY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stdDeviationY");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEImageElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEImageElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEImageElement */, "preserveAspectRatio");
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
 class BlinkSVGFEMergeElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEMergeElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEMergeNodeElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEMergeNodeElement();
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEMergeNodeElement */, "in1");
 
 }
 
 class BlinkSVGFEMorphologyElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEMorphologyElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEMorphologyElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  operator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEMorphologyElement */, "operator");
 
-  operator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "operator");
+  radiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEMorphologyElement */, "radiusX");
 
-  radiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radiusX");
+  radiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEMorphologyElement */, "radiusY");
 
-  radiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radiusY");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEOffsetElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEOffsetElement();
 
-  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dx");
+  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEOffsetElement */, "dx");
 
-  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dy");
+  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEOffsetElement */, "dy");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEOffsetElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFEPointLightElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEPointLightElement();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEPointLightElement */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEPointLightElement */, "y");
 
-  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFEPointLightElement */, "z");
 
 }
 
 class BlinkSVGFESpecularLightingElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFESpecularLightingElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpecularLightingElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  kernelUnitLengthX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpecularLightingElement */, "kernelUnitLengthX");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  kernelUnitLengthY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpecularLightingElement */, "kernelUnitLengthY");
 
-  specularConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "specularConstant");
+  specularConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpecularLightingElement */, "specularConstant");
 
-  specularExponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "specularExponent");
+  specularExponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpecularLightingElement */, "specularExponent");
 
-  surfaceScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "surfaceScale");
+  surfaceScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpecularLightingElement */, "surfaceScale");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
+
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
+
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFESpotLightElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFESpotLightElement();
 
-  limitingConeAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "limitingConeAngle");
+  limitingConeAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpotLightElement */, "limitingConeAngle");
 
-  pointsAtX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointsAtX");
+  pointsAtX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpotLightElement */, "pointsAtX");
 
-  pointsAtY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointsAtY");
+  pointsAtY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpotLightElement */, "pointsAtY");
 
-  pointsAtZ_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointsAtZ");
+  pointsAtZ_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpotLightElement */, "pointsAtZ");
 
-  specularExponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "specularExponent");
+  specularExponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpotLightElement */, "specularExponent");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpotLightElement */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpotLightElement */, "y");
 
-  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFESpotLightElement */, "z");
 
 }
 
 class BlinkSVGFETileElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFETileElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFETileElement */, "in1");
 
-  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFETurbulenceElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFETurbulenceElement();
 
-  baseFrequencyX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseFrequencyX");
+  baseFrequencyX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFETurbulenceElement */, "baseFrequencyX");
 
-  baseFrequencyY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseFrequencyY");
+  baseFrequencyY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFETurbulenceElement */, "baseFrequencyY");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  numOctaves_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFETurbulenceElement */, "numOctaves");
 
-  numOctaves_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numOctaves");
+  seed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFETurbulenceElement */, "seed");
 
-  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
+  stitchTiles_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFETurbulenceElement */, "stitchTiles");
 
-  seed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "seed");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFETurbulenceElement */, "type");
 
-  stitchTiles_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stitchTiles");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
 class BlinkSVGFilterElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFilterElement();
 
-  filterResX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filterResX");
+  filterUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterElement */, "filterUnits");
 
-  filterResY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filterResY");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterElement */, "height");
 
-  filterUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filterUnits");
+  primitiveUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterElement */, "primitiveUnits");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterElement */, "width");
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterElement */, "x");
 
-  primitiveUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "primitiveUnits");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterElement */, "y");
 
-  setFilterRes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setFilterRes", []);
-
-  setFilterRes_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setFilterRes", [__arg_0]);
-
-  setFilterRes_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setFilterRes", [__arg_0, __arg_1]);
-
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
-
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
-
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
-class BlinkSVGFontElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGFontElement();
+class BlinkSVGFilterPrimitiveStandardAttributes {
+  static final instance = new BlinkSVGFilterPrimitiveStandardAttributes();
+
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "height");
+
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "result");
+
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "width");
+
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "x");
+
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFilterPrimitiveStandardAttributes */, "y");
 
 }
 
-class BlinkSVGFontFaceElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGFontFaceElement();
+class BlinkSVGFitToViewBox {
+  static final instance = new BlinkSVGFitToViewBox();
 
-}
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "preserveAspectRatio");
 
-class BlinkSVGFontFaceFormatElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGFontFaceFormatElement();
-
-}
-
-class BlinkSVGFontFaceNameElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGFontFaceNameElement();
-
-}
-
-class BlinkSVGFontFaceSrcElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGFontFaceSrcElement();
-
-}
-
-class BlinkSVGFontFaceUriElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGFontFaceUriElement();
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "viewBox");
 
 }
 
 class BlinkSVGForeignObjectElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGForeignObjectElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGForeignObjectElement */, "height");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGForeignObjectElement */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGForeignObjectElement */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGForeignObjectElement */, "y");
 
 }
 
@@ -11645,349 +14183,306 @@
 class BlinkSVGGeometryElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGGeometryElement();
 
-  isPointInFill_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInFill", []);
+  isPointInFill_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGGeometryElement */, "isPointInFill", []);
 
-  isPointInFill_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInFill", [__arg_0]);
+  isPointInFill_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGGeometryElement */, "isPointInFill", [__arg_0]);
 
-  isPointInStroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", []);
+  isPointInStroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGGeometryElement */, "isPointInStroke", []);
 
-  isPointInStroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", [__arg_0]);
-
-}
-
-class BlinkSVGGlyphElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGGlyphElement();
-
-}
-
-class BlinkSVGGlyphRefElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGGlyphRefElement();
-
-  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dx");
-
-  dx_Setter_(mthis, __arg_0) => mthis["dx"] = __arg_0;
-
-  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dy");
-
-  dy_Setter_(mthis, __arg_0) => mthis["dy"] = __arg_0;
-
-  format_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "format");
-
-  format_Setter_(mthis, __arg_0) => mthis["format"] = __arg_0;
-
-  glyphRef_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "glyphRef");
-
-  glyphRef_Setter_(mthis, __arg_0) => mthis["glyphRef"] = __arg_0;
-
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
-
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
-
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
-
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
-
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  isPointInStroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGGeometryElement */, "isPointInStroke", [__arg_0]);
 
 }
 
 class BlinkSVGGradientElement extends BlinkSVGElement {
   static final instance = new BlinkSVGGradientElement();
 
-  gradientTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gradientTransform");
+  gradientTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGGradientElement */, "gradientTransform");
 
-  gradientUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gradientUnits");
+  gradientUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGGradientElement */, "gradientUnits");
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  spreadMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGGradientElement */, "spreadMethod");
 
-  spreadMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "spreadMethod");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
 class BlinkSVGGraphicsElement extends BlinkSVGElement {
   static final instance = new BlinkSVGGraphicsElement();
 
-  farthestViewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "farthestViewportElement");
+  farthestViewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGGraphicsElement */, "farthestViewportElement");
 
-  getBBox_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBBox", []);
+  nearestViewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGGraphicsElement */, "nearestViewportElement");
 
-  getCTM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCTM", []);
+  transform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGGraphicsElement */, "transform");
 
-  getScreenCTM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getScreenCTM", []);
+  getBBox_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGGraphicsElement */, "getBBox", []);
 
-  getTransformToElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTransformToElement", []);
+  getCTM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGGraphicsElement */, "getCTM", []);
 
-  getTransformToElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTransformToElement", [__arg_0]);
+  getScreenCTM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGGraphicsElement */, "getScreenCTM", []);
 
-  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
+  getTransformToElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGGraphicsElement */, "getTransformToElement", []);
 
-  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
+  getTransformToElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGGraphicsElement */, "getTransformToElement", [__arg_0]);
 
-  nearestViewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nearestViewportElement");
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredExtensions");
 
-  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredFeatures");
 
-  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "systemLanguage");
 
-  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", []);
 
-  transform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transform");
-
-}
-
-class BlinkSVGHKernElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGHKernElement();
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", [__arg_0]);
 
 }
 
 class BlinkSVGImageElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGImageElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGImageElement */, "height");
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGImageElement */, "preserveAspectRatio");
 
-  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGImageElement */, "width");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGImageElement */, "x");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGImageElement */, "y");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
 class BlinkSVGLength {
   static final instance = new BlinkSVGLength();
 
-  convertToSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "convertToSpecifiedUnits", []);
+  unitType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLength */, "unitType");
 
-  convertToSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "convertToSpecifiedUnits", [__arg_0]);
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLength */, "value");
 
-  newValueSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", []);
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGLength */, "value", __arg_0);
 
-  newValueSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", [__arg_0]);
+  valueAsString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLength */, "valueAsString");
 
-  newValueSpecifiedUnits_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", [__arg_0, __arg_1]);
+  valueAsString_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGLength */, "valueAsString", __arg_0);
 
-  unitType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unitType");
+  valueInSpecifiedUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLength */, "valueInSpecifiedUnits");
 
-  valueAsString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueAsString");
+  valueInSpecifiedUnits_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGLength */, "valueInSpecifiedUnits", __arg_0);
 
-  valueAsString_Setter_(mthis, __arg_0) => mthis["valueAsString"] = __arg_0;
+  convertToSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLength */, "convertToSpecifiedUnits", []);
 
-  valueInSpecifiedUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueInSpecifiedUnits");
+  convertToSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGLength */, "convertToSpecifiedUnits", [__arg_0]);
 
-  valueInSpecifiedUnits_Setter_(mthis, __arg_0) => mthis["valueInSpecifiedUnits"] = __arg_0;
+  newValueSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLength */, "newValueSpecifiedUnits", []);
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  newValueSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGLength */, "newValueSpecifiedUnits", [__arg_0]);
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  newValueSpecifiedUnits_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGLength */, "newValueSpecifiedUnits", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGLengthList {
   static final instance = new BlinkSVGLengthList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLengthList */, "length");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLengthList */, "numberOfItems");
 
-  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "appendItem", []);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "appendItem", [__arg_0]);
 
-  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "clear", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "getItem", []);
 
-  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "getItem", [__arg_0]);
 
-  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "initialize", []);
 
-  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "insertItemBefore", []);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "insertItemBefore", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "insertItemBefore", [__arg_0, __arg_1]);
 
-  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "removeItem", []);
 
-  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "removeItem", [__arg_0]);
 
-  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "replaceItem", []);
 
-  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
+  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "replaceItem", [__arg_0]);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0]);
-
-  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGLengthList */, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGLineElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGLineElement();
 
-  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLineElement */, "x1");
 
-  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLineElement */, "x2");
 
-  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLineElement */, "y1");
 
-  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLineElement */, "y2");
 
 }
 
 class BlinkSVGLinearGradientElement extends BlinkSVGGradientElement {
   static final instance = new BlinkSVGLinearGradientElement();
 
-  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLinearGradientElement */, "x1");
 
-  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLinearGradientElement */, "x2");
 
-  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLinearGradientElement */, "y1");
 
-  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGLinearGradientElement */, "y2");
 
 }
 
 class BlinkSVGMPathElement extends BlinkSVGElement {
   static final instance = new BlinkSVGMPathElement();
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
 class BlinkSVGMarkerElement extends BlinkSVGElement {
   static final instance = new BlinkSVGMarkerElement();
 
-  markerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "markerHeight");
+  markerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMarkerElement */, "markerHeight");
 
-  markerUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "markerUnits");
+  markerUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMarkerElement */, "markerUnits");
 
-  markerWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "markerWidth");
+  markerWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMarkerElement */, "markerWidth");
 
-  orientAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orientAngle");
+  orientAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMarkerElement */, "orientAngle");
 
-  orientType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orientType");
+  orientType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMarkerElement */, "orientType");
 
-  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
+  refX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMarkerElement */, "refX");
 
-  refX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "refX");
+  refY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMarkerElement */, "refY");
 
-  refY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "refY");
+  setOrientToAngle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMarkerElement */, "setOrientToAngle", []);
 
-  setOrientToAngle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setOrientToAngle", []);
+  setOrientToAngle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMarkerElement */, "setOrientToAngle", [__arg_0]);
 
-  setOrientToAngle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setOrientToAngle", [__arg_0]);
+  setOrientToAuto_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMarkerElement */, "setOrientToAuto", []);
 
-  setOrientToAuto_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setOrientToAuto", []);
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "preserveAspectRatio");
 
-  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "viewBox");
 
 }
 
 class BlinkSVGMaskElement extends BlinkSVGElement {
   static final instance = new BlinkSVGMaskElement();
 
-  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMaskElement */, "height");
 
-  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
+  maskContentUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMaskElement */, "maskContentUnits");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  maskUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMaskElement */, "maskUnits");
 
-  maskContentUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maskContentUnits");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMaskElement */, "width");
 
-  maskUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maskUnits");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMaskElement */, "x");
 
-  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMaskElement */, "y");
 
-  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredExtensions");
 
-  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredFeatures");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "systemLanguage");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", []);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", [__arg_0]);
 
 }
 
 class BlinkSVGMatrix {
   static final instance = new BlinkSVGMatrix();
 
-  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "a");
+  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMatrix */, "a");
 
-  a_Setter_(mthis, __arg_0) => mthis["a"] = __arg_0;
+  a_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGMatrix */, "a", __arg_0);
 
-  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "b");
+  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMatrix */, "b");
 
-  b_Setter_(mthis, __arg_0) => mthis["b"] = __arg_0;
+  b_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGMatrix */, "b", __arg_0);
 
-  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "c");
+  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMatrix */, "c");
 
-  c_Setter_(mthis, __arg_0) => mthis["c"] = __arg_0;
+  c_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGMatrix */, "c", __arg_0);
 
-  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "d");
+  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMatrix */, "d");
 
-  d_Setter_(mthis, __arg_0) => mthis["d"] = __arg_0;
+  d_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGMatrix */, "d", __arg_0);
 
-  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "e");
+  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMatrix */, "e");
 
-  e_Setter_(mthis, __arg_0) => mthis["e"] = __arg_0;
+  e_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGMatrix */, "e", __arg_0);
 
-  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "f");
+  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGMatrix */, "f");
 
-  f_Setter_(mthis, __arg_0) => mthis["f"] = __arg_0;
+  f_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGMatrix */, "f", __arg_0);
 
-  flipX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "flipX", []);
+  flipX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "flipX", []);
 
-  flipY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "flipY", []);
+  flipY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "flipY", []);
 
-  inverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "inverse", []);
+  inverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "inverse", []);
 
-  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "multiply", []);
+  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "multiply", []);
 
-  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "multiply", [__arg_0]);
+  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "multiply", [__arg_0]);
 
-  rotateFromVector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotateFromVector", []);
+  rotate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "rotate", []);
 
-  rotateFromVector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotateFromVector", [__arg_0]);
+  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "rotate", [__arg_0]);
 
-  rotateFromVector_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "rotateFromVector", [__arg_0, __arg_1]);
+  rotateFromVector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "rotateFromVector", []);
 
-  rotate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotate", []);
+  rotateFromVector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "rotateFromVector", [__arg_0]);
 
-  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotate", [__arg_0]);
+  rotateFromVector_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "rotateFromVector", [__arg_0, __arg_1]);
 
-  scaleNonUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", []);
+  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "scale", []);
 
-  scaleNonUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0]);
+  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "scale", [__arg_0]);
 
-  scaleNonUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0, __arg_1]);
+  scaleNonUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "scaleNonUniform", []);
 
-  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale", []);
+  scaleNonUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "scaleNonUniform", [__arg_0]);
 
-  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0]);
+  scaleNonUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "scaleNonUniform", [__arg_0, __arg_1]);
 
-  skewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "skewX", []);
+  skewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "skewX", []);
 
-  skewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "skewX", [__arg_0]);
+  skewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "skewX", [__arg_0]);
 
-  skewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "skewY", []);
+  skewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "skewY", []);
 
-  skewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "skewY", [__arg_0]);
+  skewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "skewY", [__arg_0]);
 
-  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translate", []);
+  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "translate", []);
 
-  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0]);
+  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "translate", [__arg_0]);
 
-  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1]);
+  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGMatrix */, "translate", [__arg_0, __arg_1]);
 
 }
 
@@ -11996,262 +14491,255 @@
 
 }
 
-class BlinkSVGMissingGlyphElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGMissingGlyphElement();
-
-}
-
 class BlinkSVGNumber {
   static final instance = new BlinkSVGNumber();
 
-  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGNumber */, "value");
 
-  value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
+  value_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGNumber */, "value", __arg_0);
 
 }
 
 class BlinkSVGNumberList {
   static final instance = new BlinkSVGNumberList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGNumberList */, "length");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGNumberList */, "numberOfItems");
 
-  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "appendItem", []);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "appendItem", [__arg_0]);
 
-  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "clear", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "getItem", []);
 
-  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "getItem", [__arg_0]);
 
-  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "initialize", []);
 
-  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "insertItemBefore", []);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "insertItemBefore", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "insertItemBefore", [__arg_0, __arg_1]);
 
-  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "removeItem", []);
 
-  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "removeItem", [__arg_0]);
 
-  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "replaceItem", []);
 
-  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
+  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "replaceItem", [__arg_0]);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0]);
-
-  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGNumberList */, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGPathElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGPathElement();
 
-  animatedNormalizedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animatedNormalizedPathSegList");
+  animatedNormalizedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathElement */, "animatedNormalizedPathSegList");
 
-  animatedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animatedPathSegList");
+  animatedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathElement */, "animatedPathSegList");
 
-  createSVGPathSegArcAbs_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  normalizedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathElement */, "normalizedPathSegList");
 
-  createSVGPathSegArcAbs_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  pathLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathElement */, "pathLength");
 
-  createSVGPathSegArcAbs_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  pathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathElement */, "pathSegList");
 
-  createSVGPathSegArcRel_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  createSVGPathSegArcAbs_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  createSVGPathSegArcRel_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  createSVGPathSegArcAbs_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  createSVGPathSegArcRel_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  createSVGPathSegArcAbs_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  createSVGPathSegClosePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegClosePath", []);
+  createSVGPathSegArcRel_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  createSVGPathSegCurvetoCubicAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  createSVGPathSegArcRel_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  createSVGPathSegCurvetoCubicAbs_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  createSVGPathSegArcRel_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  createSVGPathSegCurvetoCubicAbs_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  createSVGPathSegClosePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegClosePath", []);
 
-  createSVGPathSegCurvetoCubicRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  createSVGPathSegCurvetoCubicAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoCubicRel_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  createSVGPathSegCurvetoCubicAbs_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  createSVGPathSegCurvetoCubicRel_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  createSVGPathSegCurvetoCubicAbs_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  createSVGPathSegCurvetoCubicSmoothAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoCubicRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoCubicSmoothAbs_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1, __arg_2]);
+  createSVGPathSegCurvetoCubicRel_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  createSVGPathSegCurvetoCubicSmoothAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  createSVGPathSegCurvetoCubicRel_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  createSVGPathSegCurvetoCubicSmoothRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoCubicSmoothAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoCubicSmoothRel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1, __arg_2]);
+  createSVGPathSegCurvetoCubicSmoothAbs_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1, __arg_2]);
 
-  createSVGPathSegCurvetoCubicSmoothRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  createSVGPathSegCurvetoCubicSmoothAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoQuadraticAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoCubicSmoothRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoQuadraticAbs_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1, __arg_2]);
+  createSVGPathSegCurvetoCubicSmoothRel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1, __arg_2]);
 
-  createSVGPathSegCurvetoQuadraticAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  createSVGPathSegCurvetoCubicSmoothRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoQuadraticRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoQuadraticAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoQuadraticRel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1, __arg_2]);
+  createSVGPathSegCurvetoQuadraticAbs_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1, __arg_2]);
 
-  createSVGPathSegCurvetoQuadraticRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  createSVGPathSegCurvetoQuadraticAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothAbs", []);
+  createSVGPathSegCurvetoQuadraticRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothAbs", [__arg_0]);
+  createSVGPathSegCurvetoQuadraticRel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1, __arg_2]);
 
-  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothAbs", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoQuadraticRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothRel", []);
+  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticSmoothAbs", []);
 
-  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothRel", [__arg_0]);
+  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticSmoothAbs", [__arg_0]);
 
-  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothRel", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticSmoothAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegLinetoAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoAbs", []);
+  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticSmoothRel", []);
 
-  createSVGPathSegLinetoAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoAbs", [__arg_0]);
+  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticSmoothRel", [__arg_0]);
 
-  createSVGPathSegLinetoAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoAbs", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegCurvetoQuadraticSmoothRel", [__arg_0, __arg_1]);
 
-  createSVGPathSegLinetoHorizontalAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoHorizontalAbs", []);
+  createSVGPathSegLinetoAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoAbs", []);
 
-  createSVGPathSegLinetoHorizontalAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoHorizontalAbs", [__arg_0]);
+  createSVGPathSegLinetoAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoAbs", [__arg_0]);
 
-  createSVGPathSegLinetoHorizontalRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoHorizontalRel", []);
+  createSVGPathSegLinetoAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegLinetoHorizontalRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoHorizontalRel", [__arg_0]);
+  createSVGPathSegLinetoHorizontalAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoHorizontalAbs", []);
 
-  createSVGPathSegLinetoRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoRel", []);
+  createSVGPathSegLinetoHorizontalAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoHorizontalAbs", [__arg_0]);
 
-  createSVGPathSegLinetoRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoRel", [__arg_0]);
+  createSVGPathSegLinetoHorizontalRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoHorizontalRel", []);
 
-  createSVGPathSegLinetoRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoRel", [__arg_0, __arg_1]);
+  createSVGPathSegLinetoHorizontalRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoHorizontalRel", [__arg_0]);
 
-  createSVGPathSegLinetoVerticalAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoVerticalAbs", []);
+  createSVGPathSegLinetoRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoRel", []);
 
-  createSVGPathSegLinetoVerticalAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoVerticalAbs", [__arg_0]);
+  createSVGPathSegLinetoRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoRel", [__arg_0]);
 
-  createSVGPathSegLinetoVerticalRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoVerticalRel", []);
+  createSVGPathSegLinetoRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoRel", [__arg_0, __arg_1]);
 
-  createSVGPathSegLinetoVerticalRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoVerticalRel", [__arg_0]);
+  createSVGPathSegLinetoVerticalAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoVerticalAbs", []);
 
-  createSVGPathSegMovetoAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoAbs", []);
+  createSVGPathSegLinetoVerticalAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoVerticalAbs", [__arg_0]);
 
-  createSVGPathSegMovetoAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoAbs", [__arg_0]);
+  createSVGPathSegLinetoVerticalRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoVerticalRel", []);
 
-  createSVGPathSegMovetoAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoAbs", [__arg_0, __arg_1]);
+  createSVGPathSegLinetoVerticalRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegLinetoVerticalRel", [__arg_0]);
 
-  createSVGPathSegMovetoRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoRel", []);
+  createSVGPathSegMovetoAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegMovetoAbs", []);
 
-  createSVGPathSegMovetoRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoRel", [__arg_0]);
+  createSVGPathSegMovetoAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegMovetoAbs", [__arg_0]);
 
-  createSVGPathSegMovetoRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoRel", [__arg_0, __arg_1]);
+  createSVGPathSegMovetoAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegMovetoAbs", [__arg_0, __arg_1]);
 
-  getPathSegAtLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getPathSegAtLength", []);
+  createSVGPathSegMovetoRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegMovetoRel", []);
 
-  getPathSegAtLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getPathSegAtLength", [__arg_0]);
+  createSVGPathSegMovetoRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegMovetoRel", [__arg_0]);
 
-  getPointAtLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getPointAtLength", []);
+  createSVGPathSegMovetoRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "createSVGPathSegMovetoRel", [__arg_0, __arg_1]);
 
-  getPointAtLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getPointAtLength", [__arg_0]);
+  getPathSegAtLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "getPathSegAtLength", []);
 
-  getTotalLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTotalLength", []);
+  getPathSegAtLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "getPathSegAtLength", [__arg_0]);
 
-  normalizedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "normalizedPathSegList");
+  getPointAtLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "getPointAtLength", []);
 
-  pathLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathLength");
+  getPointAtLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "getPointAtLength", [__arg_0]);
 
-  pathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathSegList");
+  getTotalLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathElement */, "getTotalLength", []);
 
 }
 
 class BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSeg();
 
-  pathSegTypeAsLetter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathSegTypeAsLetter");
+  pathSegType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSeg */, "pathSegType");
 
-  pathSegType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathSegType");
+  pathSegTypeAsLetter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSeg */, "pathSegTypeAsLetter");
 
 }
 
 class BlinkSVGPathSegArcAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegArcAbs();
 
-  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "angle");
+  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcAbs */, "angle");
 
-  angle_Setter_(mthis, __arg_0) => mthis["angle"] = __arg_0;
+  angle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcAbs */, "angle", __arg_0);
 
-  largeArcFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "largeArcFlag");
+  largeArcFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcAbs */, "largeArcFlag");
 
-  largeArcFlag_Setter_(mthis, __arg_0) => mthis["largeArcFlag"] = __arg_0;
+  largeArcFlag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcAbs */, "largeArcFlag", __arg_0);
 
-  r1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r1");
+  r1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcAbs */, "r1");
 
-  r1_Setter_(mthis, __arg_0) => mthis["r1"] = __arg_0;
+  r1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcAbs */, "r1", __arg_0);
 
-  r2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r2");
+  r2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcAbs */, "r2");
 
-  r2_Setter_(mthis, __arg_0) => mthis["r2"] = __arg_0;
+  r2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcAbs */, "r2", __arg_0);
 
-  sweepFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sweepFlag");
+  sweepFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcAbs */, "sweepFlag");
 
-  sweepFlag_Setter_(mthis, __arg_0) => mthis["sweepFlag"] = __arg_0;
+  sweepFlag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcAbs */, "sweepFlag", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcAbs */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcAbs */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcAbs */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcAbs */, "y", __arg_0);
 
 }
 
 class BlinkSVGPathSegArcRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegArcRel();
 
-  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "angle");
+  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcRel */, "angle");
 
-  angle_Setter_(mthis, __arg_0) => mthis["angle"] = __arg_0;
+  angle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcRel */, "angle", __arg_0);
 
-  largeArcFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "largeArcFlag");
+  largeArcFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcRel */, "largeArcFlag");
 
-  largeArcFlag_Setter_(mthis, __arg_0) => mthis["largeArcFlag"] = __arg_0;
+  largeArcFlag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcRel */, "largeArcFlag", __arg_0);
 
-  r1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r1");
+  r1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcRel */, "r1");
 
-  r1_Setter_(mthis, __arg_0) => mthis["r1"] = __arg_0;
+  r1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcRel */, "r1", __arg_0);
 
-  r2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r2");
+  r2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcRel */, "r2");
 
-  r2_Setter_(mthis, __arg_0) => mthis["r2"] = __arg_0;
+  r2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcRel */, "r2", __arg_0);
 
-  sweepFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sweepFlag");
+  sweepFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcRel */, "sweepFlag");
 
-  sweepFlag_Setter_(mthis, __arg_0) => mthis["sweepFlag"] = __arg_0;
+  sweepFlag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcRel */, "sweepFlag", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcRel */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcRel */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegArcRel */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegArcRel */, "y", __arg_0);
 
 }
 
@@ -12263,609 +14751,600 @@
 class BlinkSVGPathSegCurvetoCubicAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoCubicAbs();
 
-  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "x");
 
-  x1_Setter_(mthis, __arg_0) => mthis["x1"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "x", __arg_0);
 
-  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "x1");
 
-  x2_Setter_(mthis, __arg_0) => mthis["x2"] = __arg_0;
+  x1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "x1", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "x2");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "x2", __arg_0);
 
-  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "y");
 
-  y1_Setter_(mthis, __arg_0) => mthis["y1"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "y", __arg_0);
 
-  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "y1");
 
-  y2_Setter_(mthis, __arg_0) => mthis["y2"] = __arg_0;
+  y1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "y1", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "y2");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicAbs */, "y2", __arg_0);
 
 }
 
 class BlinkSVGPathSegCurvetoCubicRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoCubicRel();
 
-  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicRel */, "x");
 
-  x1_Setter_(mthis, __arg_0) => mthis["x1"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicRel */, "x", __arg_0);
 
-  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicRel */, "x1");
 
-  x2_Setter_(mthis, __arg_0) => mthis["x2"] = __arg_0;
+  x1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicRel */, "x1", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicRel */, "x2");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicRel */, "x2", __arg_0);
 
-  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicRel */, "y");
 
-  y1_Setter_(mthis, __arg_0) => mthis["y1"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicRel */, "y", __arg_0);
 
-  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicRel */, "y1");
 
-  y2_Setter_(mthis, __arg_0) => mthis["y2"] = __arg_0;
+  y1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicRel */, "y1", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicRel */, "y2");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicRel */, "y2", __arg_0);
 
 }
 
 class BlinkSVGPathSegCurvetoCubicSmoothAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoCubicSmoothAbs();
 
-  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicSmoothAbs */, "x");
 
-  x2_Setter_(mthis, __arg_0) => mthis["x2"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicSmoothAbs */, "x", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicSmoothAbs */, "x2");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicSmoothAbs */, "x2", __arg_0);
 
-  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicSmoothAbs */, "y");
 
-  y2_Setter_(mthis, __arg_0) => mthis["y2"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicSmoothAbs */, "y", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicSmoothAbs */, "y2");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicSmoothAbs */, "y2", __arg_0);
 
 }
 
 class BlinkSVGPathSegCurvetoCubicSmoothRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoCubicSmoothRel();
 
-  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicSmoothRel */, "x");
 
-  x2_Setter_(mthis, __arg_0) => mthis["x2"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicSmoothRel */, "x", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicSmoothRel */, "x2");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicSmoothRel */, "x2", __arg_0);
 
-  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicSmoothRel */, "y");
 
-  y2_Setter_(mthis, __arg_0) => mthis["y2"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicSmoothRel */, "y", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoCubicSmoothRel */, "y2");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y2_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoCubicSmoothRel */, "y2", __arg_0);
 
 }
 
 class BlinkSVGPathSegCurvetoQuadraticAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoQuadraticAbs();
 
-  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticAbs */, "x");
 
-  x1_Setter_(mthis, __arg_0) => mthis["x1"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticAbs */, "x", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticAbs */, "x1");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticAbs */, "x1", __arg_0);
 
-  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticAbs */, "y");
 
-  y1_Setter_(mthis, __arg_0) => mthis["y1"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticAbs */, "y", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticAbs */, "y1");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticAbs */, "y1", __arg_0);
 
 }
 
 class BlinkSVGPathSegCurvetoQuadraticRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoQuadraticRel();
 
-  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticRel */, "x");
 
-  x1_Setter_(mthis, __arg_0) => mthis["x1"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticRel */, "x", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticRel */, "x1");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticRel */, "x1", __arg_0);
 
-  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticRel */, "y");
 
-  y1_Setter_(mthis, __arg_0) => mthis["y1"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticRel */, "y", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticRel */, "y1");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y1_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticRel */, "y1", __arg_0);
 
 }
 
 class BlinkSVGPathSegCurvetoQuadraticSmoothAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoQuadraticSmoothAbs();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticSmoothAbs */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticSmoothAbs */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticSmoothAbs */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticSmoothAbs */, "y", __arg_0);
 
 }
 
 class BlinkSVGPathSegCurvetoQuadraticSmoothRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoQuadraticSmoothRel();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticSmoothRel */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticSmoothRel */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegCurvetoQuadraticSmoothRel */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegCurvetoQuadraticSmoothRel */, "y", __arg_0);
 
 }
 
 class BlinkSVGPathSegLinetoAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoAbs();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegLinetoAbs */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegLinetoAbs */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegLinetoAbs */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegLinetoAbs */, "y", __arg_0);
 
 }
 
 class BlinkSVGPathSegLinetoHorizontalAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoHorizontalAbs();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegLinetoHorizontalAbs */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegLinetoHorizontalAbs */, "x", __arg_0);
 
 }
 
 class BlinkSVGPathSegLinetoHorizontalRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoHorizontalRel();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegLinetoHorizontalRel */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegLinetoHorizontalRel */, "x", __arg_0);
 
 }
 
 class BlinkSVGPathSegLinetoRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoRel();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegLinetoRel */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegLinetoRel */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegLinetoRel */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegLinetoRel */, "y", __arg_0);
 
 }
 
 class BlinkSVGPathSegLinetoVerticalAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoVerticalAbs();
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegLinetoVerticalAbs */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegLinetoVerticalAbs */, "y", __arg_0);
 
 }
 
 class BlinkSVGPathSegLinetoVerticalRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoVerticalRel();
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegLinetoVerticalRel */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegLinetoVerticalRel */, "y", __arg_0);
 
 }
 
 class BlinkSVGPathSegList {
   static final instance = new BlinkSVGPathSegList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegList */, "length");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegList */, "numberOfItems");
 
-  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "appendItem", []);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "appendItem", [__arg_0]);
 
-  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "clear", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "getItem", []);
 
-  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "getItem", [__arg_0]);
 
-  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "initialize", []);
 
-  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "insertItemBefore", []);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "insertItemBefore", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "insertItemBefore", [__arg_0, __arg_1]);
 
-  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "removeItem", []);
 
-  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "removeItem", [__arg_0]);
 
-  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "replaceItem", []);
 
-  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
+  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "replaceItem", [__arg_0]);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0]);
-
-  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPathSegList */, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGPathSegMovetoAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegMovetoAbs();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegMovetoAbs */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegMovetoAbs */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegMovetoAbs */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegMovetoAbs */, "y", __arg_0);
 
 }
 
 class BlinkSVGPathSegMovetoRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegMovetoRel();
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegMovetoRel */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegMovetoRel */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPathSegMovetoRel */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPathSegMovetoRel */, "y", __arg_0);
 
 }
 
 class BlinkSVGPatternElement extends BlinkSVGElement {
   static final instance = new BlinkSVGPatternElement();
 
-  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPatternElement */, "height");
 
-  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
+  patternContentUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPatternElement */, "patternContentUnits");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  patternTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPatternElement */, "patternTransform");
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  patternUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPatternElement */, "patternUnits");
 
-  patternContentUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "patternContentUnits");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPatternElement */, "width");
 
-  patternTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "patternTransform");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPatternElement */, "x");
 
-  patternUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "patternUnits");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPatternElement */, "y");
 
-  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "preserveAspectRatio");
 
-  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "viewBox");
 
-  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
-  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredExtensions");
 
-  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredFeatures");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "systemLanguage");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", []);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", [__arg_0]);
 
 }
 
 class BlinkSVGPoint {
   static final instance = new BlinkSVGPoint();
 
-  matrixTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matrixTransform", []);
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPoint */, "x");
 
-  matrixTransform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matrixTransform", [__arg_0]);
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPoint */, "x", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPoint */, "y");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPoint */, "y", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  matrixTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPoint */, "matrixTransform", []);
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  matrixTransform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPoint */, "matrixTransform", [__arg_0]);
 
 }
 
 class BlinkSVGPointList {
   static final instance = new BlinkSVGPointList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPointList */, "length");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPointList */, "numberOfItems");
 
-  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "appendItem", []);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "appendItem", [__arg_0]);
 
-  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "clear", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "getItem", []);
 
-  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "getItem", [__arg_0]);
 
-  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "initialize", []);
 
-  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "insertItemBefore", []);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "insertItemBefore", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "insertItemBefore", [__arg_0, __arg_1]);
 
-  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "removeItem", []);
 
-  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "removeItem", [__arg_0]);
 
-  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "replaceItem", []);
 
-  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
+  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "replaceItem", [__arg_0]);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0]);
-
-  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGPointList */, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGPolygonElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGPolygonElement();
 
-  animatedPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animatedPoints");
+  animatedPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPolygonElement */, "animatedPoints");
 
-  points_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "points");
+  points_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPolygonElement */, "points");
 
 }
 
 class BlinkSVGPolylineElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGPolylineElement();
 
-  animatedPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animatedPoints");
+  animatedPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPolylineElement */, "animatedPoints");
 
-  points_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "points");
+  points_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPolylineElement */, "points");
 
 }
 
 class BlinkSVGPreserveAspectRatio {
   static final instance = new BlinkSVGPreserveAspectRatio();
 
-  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "align");
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPreserveAspectRatio */, "align");
 
-  align_Setter_(mthis, __arg_0) => mthis["align"] = __arg_0;
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPreserveAspectRatio */, "align", __arg_0);
 
-  meetOrSlice_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "meetOrSlice");
+  meetOrSlice_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGPreserveAspectRatio */, "meetOrSlice");
 
-  meetOrSlice_Setter_(mthis, __arg_0) => mthis["meetOrSlice"] = __arg_0;
+  meetOrSlice_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGPreserveAspectRatio */, "meetOrSlice", __arg_0);
 
 }
 
 class BlinkSVGRadialGradientElement extends BlinkSVGGradientElement {
   static final instance = new BlinkSVGRadialGradientElement();
 
-  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cx");
+  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRadialGradientElement */, "cx");
 
-  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cy");
+  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRadialGradientElement */, "cy");
 
-  fr_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fr");
+  fr_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRadialGradientElement */, "fr");
 
-  fx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fx");
+  fx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRadialGradientElement */, "fx");
 
-  fy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fy");
+  fy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRadialGradientElement */, "fy");
 
-  r_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r");
+  r_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRadialGradientElement */, "r");
 
 }
 
 class BlinkSVGRect {
   static final instance = new BlinkSVGRect();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRect */, "height");
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGRect */, "height", __arg_0);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRect */, "width");
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGRect */, "width", __arg_0);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRect */, "x");
 
-  x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
+  x_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGRect */, "x", __arg_0);
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRect */, "y");
 
-  y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
+  y_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGRect */, "y", __arg_0);
 
 }
 
 class BlinkSVGRectElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGRectElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRectElement */, "height");
 
-  rx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rx");
+  rx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRectElement */, "rx");
 
-  ry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ry");
+  ry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRectElement */, "ry");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRectElement */, "width");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRectElement */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
-
-}
-
-class BlinkSVGRenderingIntent {
-  static final instance = new BlinkSVGRenderingIntent();
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGRectElement */, "y");
 
 }
 
 class BlinkSVGSVGElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGSVGElement();
 
-  animationsPaused_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "animationsPaused", []);
+  currentScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "currentScale");
 
-  checkEnclosure_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkEnclosure", []);
+  currentScale_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGSVGElement */, "currentScale", __arg_0);
 
-  checkEnclosure_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "checkEnclosure", [__arg_0]);
+  currentTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "currentTranslate");
 
-  checkEnclosure_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "checkEnclosure", [__arg_0, __arg_1]);
+  currentView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "currentView");
 
-  checkIntersection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkIntersection", []);
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "height");
 
-  checkIntersection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "checkIntersection", [__arg_0]);
+  pixelUnitToMillimeterX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "pixelUnitToMillimeterX");
 
-  checkIntersection_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "checkIntersection", [__arg_0, __arg_1]);
+  pixelUnitToMillimeterY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "pixelUnitToMillimeterY");
 
-  createSVGAngle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGAngle", []);
+  screenPixelToMillimeterX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "screenPixelToMillimeterX");
 
-  createSVGLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGLength", []);
+  screenPixelToMillimeterY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "screenPixelToMillimeterY");
 
-  createSVGMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGMatrix", []);
+  useCurrentView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "useCurrentView");
 
-  createSVGNumber_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGNumber", []);
+  viewport_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "viewport");
 
-  createSVGPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPoint", []);
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "width");
 
-  createSVGRect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGRect", []);
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "x");
 
-  createSVGTransformFromMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransformFromMatrix", []);
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGSVGElement */, "y");
 
-  createSVGTransformFromMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransformFromMatrix", [__arg_0]);
+  animationsPaused_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "animationsPaused", []);
 
-  createSVGTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransform", []);
+  checkEnclosure_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "checkEnclosure", []);
 
-  currentScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentScale");
+  checkEnclosure_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "checkEnclosure", [__arg_0]);
 
-  currentScale_Setter_(mthis, __arg_0) => mthis["currentScale"] = __arg_0;
+  checkEnclosure_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "checkEnclosure", [__arg_0, __arg_1]);
 
-  currentTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTranslate");
+  checkIntersection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "checkIntersection", []);
 
-  currentView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentView");
+  checkIntersection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "checkIntersection", [__arg_0]);
 
-  deselectAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deselectAll", []);
+  checkIntersection_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "checkIntersection", [__arg_0, __arg_1]);
 
-  forceRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "forceRedraw", []);
+  createSVGAngle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGAngle", []);
 
-  getCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentTime", []);
+  createSVGLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGLength", []);
 
-  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", []);
+  createSVGMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGMatrix", []);
 
-  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", [__arg_0]);
+  createSVGNumber_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGNumber", []);
 
-  getEnclosureList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEnclosureList", []);
+  createSVGPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGPoint", []);
 
-  getEnclosureList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEnclosureList", [__arg_0]);
+  createSVGRect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGRect", []);
 
-  getEnclosureList_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getEnclosureList", [__arg_0, __arg_1]);
+  createSVGTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGTransform", []);
 
-  getIntersectionList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getIntersectionList", []);
+  createSVGTransformFromMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGTransformFromMatrix", []);
 
-  getIntersectionList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getIntersectionList", [__arg_0]);
+  createSVGTransformFromMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "createSVGTransformFromMatrix", [__arg_0]);
 
-  getIntersectionList_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getIntersectionList", [__arg_0, __arg_1]);
+  deselectAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "deselectAll", []);
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  forceRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "forceRedraw", []);
 
-  pauseAnimations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pauseAnimations", []);
+  getCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getCurrentTime", []);
 
-  pixelUnitToMillimeterX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pixelUnitToMillimeterX");
+  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getElementById", []);
 
-  pixelUnitToMillimeterY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pixelUnitToMillimeterY");
+  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getElementById", [__arg_0]);
 
-  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
+  getEnclosureList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getEnclosureList", []);
 
-  screenPixelToMillimeterX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenPixelToMillimeterX");
+  getEnclosureList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getEnclosureList", [__arg_0]);
 
-  screenPixelToMillimeterY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenPixelToMillimeterY");
+  getEnclosureList_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getEnclosureList", [__arg_0, __arg_1]);
 
-  setCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCurrentTime", []);
+  getIntersectionList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getIntersectionList", []);
 
-  setCurrentTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCurrentTime", [__arg_0]);
+  getIntersectionList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getIntersectionList", [__arg_0]);
 
-  suspendRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "suspendRedraw", []);
+  getIntersectionList_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "getIntersectionList", [__arg_0, __arg_1]);
 
-  suspendRedraw_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "suspendRedraw", [__arg_0]);
+  pauseAnimations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "pauseAnimations", []);
 
-  unpauseAnimations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unpauseAnimations", []);
+  setCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "setCurrentTime", []);
 
-  unsuspendRedrawAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unsuspendRedrawAll", []);
+  setCurrentTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "setCurrentTime", [__arg_0]);
 
-  unsuspendRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unsuspendRedraw", []);
+  suspendRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "suspendRedraw", []);
 
-  unsuspendRedraw_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "unsuspendRedraw", [__arg_0]);
+  suspendRedraw_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "suspendRedraw", [__arg_0]);
 
-  useCurrentView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "useCurrentView");
+  unpauseAnimations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "unpauseAnimations", []);
 
-  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
+  unsuspendRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "unsuspendRedraw", []);
 
-  viewport_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewport");
+  unsuspendRedraw_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "unsuspendRedraw", [__arg_0]);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  unsuspendRedrawAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGSVGElement */, "unsuspendRedrawAll", []);
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "preserveAspectRatio");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "viewBox");
 
-  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "zoomAndPan");
+  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomAndPan */, "zoomAndPan");
 
-  zoomAndPan_Setter_(mthis, __arg_0) => mthis["zoomAndPan"] = __arg_0;
+  zoomAndPan_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGZoomAndPan */, "zoomAndPan", __arg_0);
 
 }
 
 class BlinkSVGScriptElement extends BlinkSVGElement {
   static final instance = new BlinkSVGScriptElement();
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGScriptElement */, "type");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGScriptElement */, "type", __arg_0);
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
@@ -12877,73 +15356,71 @@
 class BlinkSVGStopElement extends BlinkSVGElement {
   static final instance = new BlinkSVGStopElement();
 
-  offset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offset");
+  offset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGStopElement */, "offset");
 
 }
 
 class BlinkSVGStringList {
   static final instance = new BlinkSVGStringList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGStringList */, "length");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGStringList */, "numberOfItems");
 
-  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "appendItem", []);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "appendItem", [__arg_0]);
 
-  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "clear", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "getItem", []);
 
-  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "getItem", [__arg_0]);
 
-  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "initialize", []);
 
-  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "insertItemBefore", []);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "insertItemBefore", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "insertItemBefore", [__arg_0, __arg_1]);
 
-  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "removeItem", []);
 
-  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "removeItem", [__arg_0]);
 
-  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "replaceItem", []);
 
-  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
+  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "replaceItem", [__arg_0]);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0]);
-
-  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGStringList */, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGStyleElement extends BlinkSVGElement {
   static final instance = new BlinkSVGStyleElement();
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGStyleElement */, "disabled");
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGStyleElement */, "disabled", __arg_0);
 
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGStyleElement */, "media");
 
-  media_Setter_(mthis, __arg_0) => mthis["media"] = __arg_0;
+  media_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGStyleElement */, "media", __arg_0);
 
-  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sheet");
+  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGStyleElement */, "sheet");
 
-  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGStyleElement */, "title");
 
-  title_Setter_(mthis, __arg_0) => mthis["title"] = __arg_0;
+  title_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGStyleElement */, "title", __arg_0);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGStyleElement */, "type");
 
-  type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
+  type_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGStyleElement */, "type", __arg_0);
 
 }
 
@@ -12955,9 +15432,9 @@
 class BlinkSVGSymbolElement extends BlinkSVGElement {
   static final instance = new BlinkSVGSymbolElement();
 
-  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "preserveAspectRatio");
 
-  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "viewBox");
 
 }
 
@@ -12966,48 +15443,63 @@
 
 }
 
+class BlinkSVGTests {
+  static final instance = new BlinkSVGTests();
+
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredExtensions");
+
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "requiredFeatures");
+
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTests */, "systemLanguage");
+
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", []);
+
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTests */, "hasExtension", [__arg_0]);
+
+}
+
 class BlinkSVGTextContentElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGTextContentElement();
 
-  getCharNumAtPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCharNumAtPosition", []);
+  lengthAdjust_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextContentElement */, "lengthAdjust");
 
-  getCharNumAtPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getCharNumAtPosition", [__arg_0]);
+  textLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextContentElement */, "textLength");
 
-  getComputedTextLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getComputedTextLength", []);
+  getCharNumAtPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getCharNumAtPosition", []);
 
-  getEndPositionOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEndPositionOfChar", []);
+  getCharNumAtPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getCharNumAtPosition", [__arg_0]);
 
-  getEndPositionOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEndPositionOfChar", [__arg_0]);
+  getComputedTextLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getComputedTextLength", []);
 
-  getExtentOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getExtentOfChar", []);
+  getEndPositionOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getEndPositionOfChar", []);
 
-  getExtentOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getExtentOfChar", [__arg_0]);
+  getEndPositionOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getEndPositionOfChar", [__arg_0]);
 
-  getNumberOfChars_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getNumberOfChars", []);
+  getExtentOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getExtentOfChar", []);
 
-  getRotationOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRotationOfChar", []);
+  getExtentOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getExtentOfChar", [__arg_0]);
 
-  getRotationOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRotationOfChar", [__arg_0]);
+  getNumberOfChars_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getNumberOfChars", []);
 
-  getStartPositionOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStartPositionOfChar", []);
+  getRotationOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getRotationOfChar", []);
 
-  getStartPositionOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getStartPositionOfChar", [__arg_0]);
+  getRotationOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getRotationOfChar", [__arg_0]);
 
-  getSubStringLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSubStringLength", []);
+  getStartPositionOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getStartPositionOfChar", []);
 
-  getSubStringLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getSubStringLength", [__arg_0]);
+  getStartPositionOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getStartPositionOfChar", [__arg_0]);
 
-  getSubStringLength_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getSubStringLength", [__arg_0, __arg_1]);
+  getSubStringLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getSubStringLength", []);
 
-  lengthAdjust_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lengthAdjust");
+  getSubStringLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getSubStringLength", [__arg_0]);
 
-  selectSubString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "selectSubString", []);
+  getSubStringLength_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "getSubStringLength", [__arg_0, __arg_1]);
 
-  selectSubString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "selectSubString", [__arg_0]);
+  selectSubString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "selectSubString", []);
 
-  selectSubString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "selectSubString", [__arg_0, __arg_1]);
+  selectSubString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "selectSubString", [__arg_0]);
 
-  textLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textLength");
+  selectSubString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGTextContentElement */, "selectSubString", [__arg_0, __arg_1]);
 
 }
 
@@ -13019,28 +15511,28 @@
 class BlinkSVGTextPathElement extends BlinkSVGTextContentElement {
   static final instance = new BlinkSVGTextPathElement();
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  method_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextPathElement */, "method");
 
-  method_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "method");
+  spacing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextPathElement */, "spacing");
 
-  spacing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "spacing");
+  startOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextPathElement */, "startOffset");
 
-  startOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startOffset");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
 class BlinkSVGTextPositioningElement extends BlinkSVGTextContentElement {
   static final instance = new BlinkSVGTextPositioningElement();
 
-  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dx");
+  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextPositioningElement */, "dx");
 
-  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dy");
+  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextPositioningElement */, "dy");
 
-  rotate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rotate");
+  rotate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextPositioningElement */, "rotate");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextPositioningElement */, "x");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTextPositioningElement */, "y");
 
 }
 
@@ -13052,90 +15544,95 @@
 class BlinkSVGTransform {
   static final instance = new BlinkSVGTransform();
 
-  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "angle");
+  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTransform */, "angle");
 
-  matrix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "matrix");
+  matrix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTransform */, "matrix");
 
-  setMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setMatrix", []);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTransform */, "type");
 
-  setMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setMatrix", [__arg_0]);
+  setMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setMatrix", []);
 
-  setRotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRotate", [__arg_0]);
+  setMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setMatrix", [__arg_0]);
 
-  setRotate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRotate", [__arg_0, __arg_1]);
+  setRotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setRotate", [__arg_0]);
 
-  setRotate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setRotate", [__arg_0, __arg_1, __arg_2]);
+  setRotate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setRotate", [__arg_0, __arg_1]);
 
-  setScale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setScale", []);
+  setRotate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setRotate", [__arg_0, __arg_1, __arg_2]);
 
-  setScale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setScale", [__arg_0]);
+  setScale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setScale", []);
 
-  setScale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setScale", [__arg_0, __arg_1]);
+  setScale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setScale", [__arg_0]);
 
-  setSkewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setSkewX", []);
+  setScale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setScale", [__arg_0, __arg_1]);
 
-  setSkewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setSkewX", [__arg_0]);
+  setSkewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setSkewX", []);
 
-  setSkewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setSkewY", []);
+  setSkewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setSkewX", [__arg_0]);
 
-  setSkewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setSkewY", [__arg_0]);
+  setSkewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setSkewY", []);
 
-  setTranslate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setTranslate", []);
+  setSkewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setSkewY", [__arg_0]);
 
-  setTranslate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTranslate", [__arg_0]);
+  setTranslate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setTranslate", []);
 
-  setTranslate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setTranslate", [__arg_0, __arg_1]);
+  setTranslate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setTranslate", [__arg_0]);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  setTranslate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransform */, "setTranslate", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGTransformList {
   static final instance = new BlinkSVGTransformList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTransformList */, "length");
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGTransformList */, "numberOfItems");
 
-  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "appendItem", []);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "appendItem", [__arg_0]);
 
-  consolidate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "consolidate", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "clear", []);
 
-  createSVGTransformFromMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransformFromMatrix", []);
+  consolidate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "consolidate", []);
 
-  createSVGTransformFromMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransformFromMatrix", [__arg_0]);
+  createSVGTransformFromMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "createSVGTransformFromMatrix", []);
 
-  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
+  createSVGTransformFromMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "createSVGTransformFromMatrix", [__arg_0]);
 
-  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "getItem", []);
 
-  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "getItem", [__arg_0]);
 
-  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "initialize", []);
 
-  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "insertItemBefore", []);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "insertItemBefore", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "insertItemBefore", [__arg_0, __arg_1]);
 
-  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "removeItem", []);
 
-  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "removeItem", [__arg_0]);
 
-  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "replaceItem", []);
 
-  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
+  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "replaceItem", [__arg_0]);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SVGTransformList */, "replaceItem", [__arg_0, __arg_1]);
 
-  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
+}
+
+class BlinkSVGURIReference {
+  static final instance = new BlinkSVGURIReference();
+
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
@@ -13147,1763 +15644,4516 @@
 class BlinkSVGUseElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGUseElement();
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGUseElement */, "height");
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGUseElement */, "width");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGUseElement */, "x");
 
-  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGUseElement */, "y");
 
-  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
-
-}
-
-class BlinkSVGVKernElement extends BlinkSVGElement {
-  static final instance = new BlinkSVGVKernElement();
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGURIReference */, "href");
 
 }
 
 class BlinkSVGViewElement extends BlinkSVGElement {
   static final instance = new BlinkSVGViewElement();
 
-  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
+  viewTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGViewElement */, "viewTarget");
 
-  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "preserveAspectRatio");
 
-  viewTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewTarget");
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "viewBox");
 
-  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "zoomAndPan");
+  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomAndPan */, "zoomAndPan");
 
-  zoomAndPan_Setter_(mthis, __arg_0) => mthis["zoomAndPan"] = __arg_0;
+  zoomAndPan_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGZoomAndPan */, "zoomAndPan", __arg_0);
 
 }
 
 class BlinkSVGViewSpec {
   static final instance = new BlinkSVGViewSpec();
 
-  preserveAspectRatioString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatioString");
+  preserveAspectRatioString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGViewSpec */, "preserveAspectRatioString");
 
-  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
+  transform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGViewSpec */, "transform");
 
-  transformString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transformString");
+  transformString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGViewSpec */, "transformString");
 
-  transform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transform");
+  viewBoxString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGViewSpec */, "viewBoxString");
 
-  viewBoxString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBoxString");
+  viewTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGViewSpec */, "viewTarget");
 
-  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
+  viewTargetString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGViewSpec */, "viewTargetString");
 
-  viewTargetString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewTargetString");
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "preserveAspectRatio");
 
-  viewTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewTarget");
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGFitToViewBox */, "viewBox");
 
-  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "zoomAndPan");
+  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomAndPan */, "zoomAndPan");
 
-  zoomAndPan_Setter_(mthis, __arg_0) => mthis["zoomAndPan"] = __arg_0;
+  zoomAndPan_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGZoomAndPan */, "zoomAndPan", __arg_0);
+
+}
+
+class BlinkSVGZoomAndPan {
+  static final instance = new BlinkSVGZoomAndPan();
+
+  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomAndPan */, "zoomAndPan");
+
+  zoomAndPan_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SVGZoomAndPan */, "zoomAndPan", __arg_0);
 
 }
 
 class BlinkSVGZoomEvent extends BlinkUIEvent {
   static final instance = new BlinkSVGZoomEvent();
 
-  newScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newScale");
+  newScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomEvent */, "newScale");
 
-  newTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newTranslate");
+  newTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomEvent */, "newTranslate");
 
-  previousScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousScale");
+  previousScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomEvent */, "previousScale");
 
-  previousTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousTranslate");
+  previousTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomEvent */, "previousTranslate");
 
-  zoomRectScreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "zoomRectScreen");
+  zoomRectScreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SVGZoomEvent */, "zoomRectScreen");
 
 }
 
 class BlinkScreen {
   static final instance = new BlinkScreen();
 
-  availHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "availHeight");
+  availHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "availHeight");
 
-  availLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "availLeft");
+  availLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "availLeft");
 
-  availTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "availTop");
+  availTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "availTop");
 
-  availWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "availWidth");
+  availWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "availWidth");
 
-  colorDepth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "colorDepth");
+  colorDepth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "colorDepth");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "height");
 
-  orientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orientation");
+  orientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "orientation");
 
-  pixelDepth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pixelDepth");
+  pixelDepth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "pixelDepth");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Screen */, "width");
 
 }
 
 class BlinkScreenOrientation extends BlinkEventTarget {
   static final instance = new BlinkScreenOrientation();
 
-  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "angle");
+  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScreenOrientation */, "angle");
 
-  lock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lock", []);
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScreenOrientation */, "onchange");
 
-  lock_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lock", [__arg_0]);
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ScreenOrientation */, "onchange", __arg_0);
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScreenOrientation */, "type");
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  lock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ScreenOrientation */, "lock", []);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  lock_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ScreenOrientation */, "lock", [__arg_0]);
 
-  unlock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unlock", []);
+  unlock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ScreenOrientation */, "unlock", []);
 
 }
 
 class BlinkScriptProcessorNode extends BlinkAudioNode {
   static final instance = new BlinkScriptProcessorNode();
 
-  bufferSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bufferSize");
+  bufferSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScriptProcessorNode */, "bufferSize");
 
-  onaudioprocess_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaudioprocess");
+  onaudioprocess_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScriptProcessorNode */, "onaudioprocess");
 
-  onaudioprocess_Setter_(mthis, __arg_0) => mthis["onaudioprocess"] = __arg_0;
+  onaudioprocess_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ScriptProcessorNode */, "onaudioprocess", __arg_0);
 
-  setEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setEventListener", []);
+  setEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ScriptProcessorNode */, "setEventListener", []);
 
-  setEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setEventListener", [__arg_0]);
+  setEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ScriptProcessorNode */, "setEventListener", [__arg_0]);
+
+}
+
+class BlinkScrollState {
+  static final instance = new BlinkScrollState();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("ScrollState");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("ScrollState", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("ScrollState", [__arg_0, __arg_1]);
+
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("ScrollState", [__arg_0, __arg_1, __arg_2]);
+
+  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callConstructor("ScrollState", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  constructorCallback_5_(__arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callConstructor("ScrollState", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  constructorCallback_6_(__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callConstructor("ScrollState", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  constructorCallback_7_(__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callConstructor("ScrollState", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  constructorCallback_8_(__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callConstructor("ScrollState", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  deltaGranularity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "deltaGranularity");
+
+  deltaX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "deltaX");
+
+  deltaY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "deltaY");
+
+  fromUserInput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "fromUserInput");
+
+  inInertialPhase_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "inInertialPhase");
+
+  isBeginning_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "isBeginning");
+
+  isEnding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "isEnding");
+
+  shouldPropagate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "shouldPropagate");
+
+  velocityX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "velocityX");
+
+  velocityY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ScrollState */, "velocityY");
+
+  consumeDelta_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ScrollState */, "consumeDelta", []);
+
+  consumeDelta_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ScrollState */, "consumeDelta", [__arg_0]);
+
+  consumeDelta_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ScrollState */, "consumeDelta", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSecurityPolicyViolationEvent extends BlinkEvent {
   static final instance = new BlinkSecurityPolicyViolationEvent();
 
-  blockedURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "blockedURI");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("SecurityPolicyViolationEvent");
 
-  columnNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "columnNumber");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("SecurityPolicyViolationEvent", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SecurityPolicyViolationEvent"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("SecurityPolicyViolationEvent", [__arg_0, __arg_1]);
 
-  documentURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "documentURI");
+  blockedURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "blockedURI");
 
-  effectiveDirective_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "effectiveDirective");
+  columnNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "columnNumber");
 
-  lineNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineNumber");
+  documentURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "documentURI");
 
-  originalPolicy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "originalPolicy");
+  effectiveDirective_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "effectiveDirective");
 
-  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "referrer");
+  lineNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "lineNumber");
 
-  sourceFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sourceFile");
+  originalPolicy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "originalPolicy");
 
-  statusCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusCode");
+  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "referrer");
 
-  violatedDirective_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "violatedDirective");
+  sourceFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "sourceFile");
+
+  statusCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "statusCode");
+
+  violatedDirective_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SecurityPolicyViolationEvent */, "violatedDirective");
 
 }
 
 class BlinkSelection {
   static final instance = new BlinkSelection();
 
-  addRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addRange", []);
+  anchorNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "anchorNode");
 
-  addRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addRange", [__arg_0]);
+  anchorOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "anchorOffset");
 
-  anchorNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "anchorNode");
+  baseNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "baseNode");
 
-  anchorOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "anchorOffset");
+  baseOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "baseOffset");
 
-  baseNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseNode");
+  extentNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "extentNode");
 
-  baseOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseOffset");
+  extentOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "extentOffset");
 
-  collapseToEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collapseToEnd", []);
+  focusNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "focusNode");
 
-  collapseToStart_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collapseToStart", []);
+  focusOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "focusOffset");
 
-  collapse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collapse", []);
+  isCollapsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "isCollapsed");
 
-  collapse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "collapse", [__arg_0]);
+  rangeCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "rangeCount");
 
-  collapse_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "collapse", [__arg_0, __arg_1]);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Selection */, "type");
 
-  containsNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "containsNode", []);
+  addRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "addRange", []);
 
-  containsNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "containsNode", [__arg_0]);
+  addRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "addRange", [__arg_0]);
 
-  containsNode_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "containsNode", [__arg_0, __arg_1]);
+  collapse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "collapse", []);
 
-  deleteFromDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteFromDocument", []);
+  collapse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "collapse", [__arg_0]);
 
-  empty_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "empty", []);
+  collapse_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "collapse", [__arg_0, __arg_1]);
 
-  extend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "extend", []);
+  collapseToEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "collapseToEnd", []);
 
-  extend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "extend", [__arg_0]);
+  collapseToStart_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "collapseToStart", []);
 
-  extend_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "extend", [__arg_0, __arg_1]);
+  containsNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "containsNode", []);
 
-  extentNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "extentNode");
+  containsNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "containsNode", [__arg_0]);
 
-  extentOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "extentOffset");
+  containsNode_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "containsNode", [__arg_0, __arg_1]);
 
-  focusNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "focusNode");
+  deleteFromDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "deleteFromDocument", []);
 
-  focusOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "focusOffset");
+  empty_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "empty", []);
 
-  getRangeAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRangeAt", []);
+  extend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "extend", []);
 
-  getRangeAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRangeAt", [__arg_0]);
+  extend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "extend", [__arg_0]);
 
-  isCollapsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isCollapsed");
+  extend_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "extend", [__arg_0, __arg_1]);
 
-  modify_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "modify", []);
+  getRangeAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "getRangeAt", []);
 
-  modify_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "modify", [__arg_0]);
+  getRangeAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "getRangeAt", [__arg_0]);
 
-  modify_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "modify", [__arg_0, __arg_1]);
+  modify_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "modify", [__arg_0]);
 
-  modify_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "modify", [__arg_0, __arg_1, __arg_2]);
+  modify_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "modify", [__arg_0, __arg_1]);
 
-  rangeCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeCount");
+  modify_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "modify", [__arg_0, __arg_1, __arg_2]);
 
-  removeAllRanges_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeAllRanges", []);
+  removeAllRanges_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "removeAllRanges", []);
 
-  selectAllChildren_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "selectAllChildren", []);
+  selectAllChildren_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "selectAllChildren", []);
 
-  selectAllChildren_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "selectAllChildren", [__arg_0]);
+  selectAllChildren_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "selectAllChildren", [__arg_0]);
 
-  setBaseAndExtent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", []);
+  setBaseAndExtent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "setBaseAndExtent", [__arg_0, __arg_1]);
 
-  setBaseAndExtent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", [__arg_0]);
+  setBaseAndExtent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "setBaseAndExtent", [__arg_0, __arg_1, __arg_2]);
 
-  setBaseAndExtent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", [__arg_0, __arg_1]);
+  setBaseAndExtent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "setBaseAndExtent", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  setBaseAndExtent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", [__arg_0, __arg_1, __arg_2]);
+  setPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "setPosition", []);
 
-  setBaseAndExtent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "setPosition", [__arg_0]);
 
-  setPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", []);
+  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Selection */, "setPosition", [__arg_0, __arg_1]);
 
-  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0]);
+}
 
-  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1]);
+class BlinkServicePort {
+  static final instance = new BlinkServicePort();
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServicePort */, "data");
+
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServicePort */, "name");
+
+  targetURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServicePort */, "targetURL");
+
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServicePort */, "close", []);
+
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServicePort */, "postMessage", []);
+
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServicePort */, "postMessage", [__arg_0]);
+
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ServicePort */, "postMessage", [__arg_0, __arg_1]);
+
+}
+
+class BlinkServicePortCollection extends BlinkEventTarget {
+  static final instance = new BlinkServicePortCollection();
+
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServicePortCollection */, "onclose");
+
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServicePortCollection */, "onclose", __arg_0);
+
+  onconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServicePortCollection */, "onconnect");
+
+  onconnect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServicePortCollection */, "onconnect", __arg_0);
+
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServicePortCollection */, "onmessage");
+
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServicePortCollection */, "onmessage", __arg_0);
+
+  connect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortCollection */, "connect", []);
+
+  connect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortCollection */, "connect", [__arg_0]);
+
+  connect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortCollection */, "connect", [__arg_0, __arg_1]);
+
+  match_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortCollection */, "match", []);
+
+  match_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortCollection */, "match", [__arg_0]);
+
+  matchAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortCollection */, "matchAll", []);
+
+  matchAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortCollection */, "matchAll", [__arg_0]);
+
+}
+
+class BlinkServicePortConnectEvent extends BlinkExtendableEvent {
+  static final instance = new BlinkServicePortConnectEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("ServicePortConnectEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("ServicePortConnectEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("ServicePortConnectEvent", [__arg_0, __arg_1]);
+
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServicePortConnectEvent */, "origin");
+
+  targetURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServicePortConnectEvent */, "targetURL");
+
+  respondWith_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortConnectEvent */, "respondWith", []);
+
+  respondWith_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServicePortConnectEvent */, "respondWith", [__arg_0]);
 
 }
 
 class BlinkServiceWorker extends BlinkEventTarget {
   static final instance = new BlinkServiceWorker();
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorker */, "onstatechange");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onstatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorker */, "onstatechange", __arg_0);
 
-  onstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstatechange");
+  scriptURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorker */, "scriptURL");
 
-  onstatechange_Setter_(mthis, __arg_0) => mthis["onstatechange"] = __arg_0;
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorker */, "state");
 
-  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorker */, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorker */, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorker */, "postMessage", [__arg_0, __arg_1]);
 
-  scriptURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scriptURL");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AbstractWorker */, "onerror");
 
-  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "state");
-
-  terminate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "terminate", []);
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AbstractWorker */, "onerror", __arg_0);
 
 }
 
-class BlinkServiceWorkerClient {
-  static final instance = new BlinkServiceWorkerClient();
-
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
-
-  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
-
-  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
-
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
-
-}
-
-class BlinkServiceWorkerClients {
-  static final instance = new BlinkServiceWorkerClients();
-
-  getAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAll", []);
-
-  getAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAll", [__arg_0]);
-
-}
-
-class BlinkServiceWorkerContainer {
+class BlinkServiceWorkerContainer extends BlinkEventTarget {
   static final instance = new BlinkServiceWorkerContainer();
 
-  controller_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "controller");
+  controller_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerContainer */, "controller");
 
-  getRegistration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRegistration", []);
+  oncontrollerchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerContainer */, "oncontrollerchange");
 
-  getRegistration_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRegistration", [__arg_0]);
+  oncontrollerchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerContainer */, "oncontrollerchange", __arg_0);
 
-  ready_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ready");
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerContainer */, "onmessage");
 
-  register_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "register", []);
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerContainer */, "onmessage", __arg_0);
 
-  register_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "register", [__arg_0]);
+  ready_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerContainer */, "ready");
 
-  register_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "register", [__arg_0, __arg_1]);
+  getRegistration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerContainer */, "getRegistration", []);
+
+  getRegistration_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerContainer */, "getRegistration", [__arg_0]);
+
+  getRegistrations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerContainer */, "getRegistrations", []);
+
+  register_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerContainer */, "register", []);
+
+  register_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerContainer */, "register", [__arg_0]);
+
+  register_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerContainer */, "register", [__arg_0, __arg_1]);
 
 }
 
 class BlinkServiceWorkerGlobalScope extends BlinkWorkerGlobalScope {
   static final instance = new BlinkServiceWorkerGlobalScope();
 
-  caches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "caches");
+  clients_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "clients");
 
-  clients_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clients");
+  onactivate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "onactivate");
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  onactivate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "onactivate", __arg_0);
 
-  fetch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "fetch", []);
+  oncrossoriginconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "oncrossoriginconnect");
 
-  fetch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "fetch", [__arg_0]);
+  oncrossoriginconnect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "oncrossoriginconnect", __arg_0);
 
-  fetch_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "fetch", [__arg_0, __arg_1]);
+  oncrossoriginmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "oncrossoriginmessage");
 
-  onactivate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onactivate");
+  oncrossoriginmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "oncrossoriginmessage", __arg_0);
 
-  onactivate_Setter_(mthis, __arg_0) => mthis["onactivate"] = __arg_0;
+  onfetch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "onfetch");
 
-  onfetch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfetch");
+  onfetch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "onfetch", __arg_0);
 
-  onfetch_Setter_(mthis, __arg_0) => mthis["onfetch"] = __arg_0;
+  ongeofenceenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "ongeofenceenter");
 
-  oninstall_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninstall");
+  ongeofenceenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "ongeofenceenter", __arg_0);
 
-  oninstall_Setter_(mthis, __arg_0) => mthis["oninstall"] = __arg_0;
+  ongeofenceleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "ongeofenceleave");
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  ongeofenceleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "ongeofenceleave", __arg_0);
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  oninstall_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "oninstall");
 
-  onpush_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpush");
+  oninstall_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "oninstall", __arg_0);
 
-  onpush_Setter_(mthis, __arg_0) => mthis["onpush"] = __arg_0;
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "onmessage");
 
-  onsync_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsync");
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "onmessage", __arg_0);
 
-  onsync_Setter_(mthis, __arg_0) => mthis["onsync"] = __arg_0;
+  onnotificationclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "onnotificationclick");
 
-  scope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scope");
+  onnotificationclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "onnotificationclick", __arg_0);
+
+  onnotificationerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "onnotificationerror");
+
+  onnotificationerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "onnotificationerror", __arg_0);
+
+  onperiodicsync_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "onperiodicsync");
+
+  onperiodicsync_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "onperiodicsync", __arg_0);
+
+  onpush_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "onpush");
+
+  onpush_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "onpush", __arg_0);
+
+  onsync_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "onsync");
+
+  onsync_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerGlobalScope */, "onsync", __arg_0);
+
+  ports_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "ports");
+
+  registration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerGlobalScope */, "registration");
+
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerGlobalScope */, "close", []);
+
+  fetch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerGlobalScope */, "fetch", []);
+
+  fetch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerGlobalScope */, "fetch", [__arg_0]);
+
+  fetch_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerGlobalScope */, "fetch", [__arg_0, __arg_1]);
+
+  skipWaiting_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerGlobalScope */, "skipWaiting", []);
+
+}
+
+class BlinkServiceWorkerMessageEvent extends BlinkEvent {
+  static final instance = new BlinkServiceWorkerMessageEvent();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("ServiceWorkerMessageEvent");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("ServiceWorkerMessageEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("ServiceWorkerMessageEvent", [__arg_0, __arg_1]);
+
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerMessageEvent */, "data");
+
+  lastEventId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerMessageEvent */, "lastEventId");
+
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerMessageEvent */, "origin");
+
+  ports_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerMessageEvent */, "ports");
+
+  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerMessageEvent */, "source");
 
 }
 
 class BlinkServiceWorkerRegistration extends BlinkEventTarget {
   static final instance = new BlinkServiceWorkerRegistration();
 
-  active_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "active");
+  active_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "active");
 
-  installing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "installing");
+  geofencing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "geofencing");
 
-  onupdatefound_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onupdatefound");
+  installing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "installing");
 
-  onupdatefound_Setter_(mthis, __arg_0) => mthis["onupdatefound"] = __arg_0;
+  onupdatefound_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "onupdatefound");
 
-  scope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scope");
+  onupdatefound_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ServiceWorkerRegistration */, "onupdatefound", __arg_0);
 
-  unregister_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unregister", []);
+  periodicSync_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "periodicSync");
 
-  waiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "waiting");
+  pushManager_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "pushManager");
+
+  scope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "scope");
+
+  sync_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "sync");
+
+  waiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ServiceWorkerRegistration */, "waiting");
+
+  getNotifications_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerRegistration */, "getNotifications", []);
+
+  getNotifications_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerRegistration */, "getNotifications", [__arg_0]);
+
+  showNotification_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerRegistration */, "showNotification", []);
+
+  showNotification_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerRegistration */, "showNotification", [__arg_0]);
+
+  showNotification_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerRegistration */, "showNotification", [__arg_0, __arg_1]);
+
+  unregister_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerRegistration */, "unregister", []);
+
+  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ServiceWorkerRegistration */, "update", []);
 
 }
 
 class BlinkShadowRoot extends BlinkDocumentFragment {
   static final instance = new BlinkShadowRoot();
 
-  activeElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeElement");
+  activeElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ShadowRoot */, "activeElement");
 
-  cloneNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cloneNode", []);
+  delegatesFocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ShadowRoot */, "delegatesFocus");
 
-  cloneNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cloneNode", [__arg_0]);
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ShadowRoot */, "host");
 
-  elementFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", []);
+  innerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ShadowRoot */, "innerHTML");
 
-  elementFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", [__arg_0]);
+  innerHTML_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* ShadowRoot */, "innerHTML", __arg_0);
 
-  elementFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", [__arg_0, __arg_1]);
+  olderShadowRoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ShadowRoot */, "olderShadowRoot");
 
-  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", []);
+  styleSheets_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ShadowRoot */, "styleSheets");
 
-  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", [__arg_0]);
+  cloneNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "cloneNode", []);
 
-  getElementsByClassName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", []);
+  cloneNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "cloneNode", [__arg_0]);
 
-  getElementsByClassName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", [__arg_0]);
+  elementFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "elementFromPoint", []);
 
-  getElementsByTagName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", []);
+  elementFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "elementFromPoint", [__arg_0]);
 
-  getElementsByTagName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", [__arg_0]);
+  elementFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "elementFromPoint", [__arg_0, __arg_1]);
 
-  getSelection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSelection", []);
+  elementsFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "elementsFromPoint", []);
 
-  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
+  elementsFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "elementsFromPoint", [__arg_0]);
 
-  innerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerHTML");
+  elementsFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "elementsFromPoint", [__arg_0, __arg_1]);
 
-  innerHTML_Setter_(mthis, __arg_0) => mthis["innerHTML"] = __arg_0;
+  getSelection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* ShadowRoot */, "getSelection", []);
 
-  olderShadowRoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "olderShadowRoot");
+}
 
-  styleSheets_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "styleSheets");
+class BlinkSharedArrayBuffer {
+  static final instance = new BlinkSharedArrayBuffer();
+
+  byteLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SharedArrayBuffer */, "byteLength");
 
 }
 
 class BlinkSharedWorker extends BlinkEventTarget {
   static final instance = new BlinkSharedWorker();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SharedWorker"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("SharedWorker");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SharedWorker"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("SharedWorker", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SharedWorker"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("SharedWorker", [__arg_0, __arg_1]);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SharedWorker */, "port");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  workerStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SharedWorker */, "workerStart");
 
-  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AbstractWorker */, "onerror");
 
-  workerStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "workerStart");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AbstractWorker */, "onerror", __arg_0);
 
 }
 
 class BlinkSharedWorkerGlobalScope extends BlinkWorkerGlobalScope {
   static final instance = new BlinkSharedWorkerGlobalScope();
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SharedWorkerGlobalScope */, "name");
 
-  onconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onconnect");
+  onconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SharedWorkerGlobalScope */, "onconnect");
 
-  onconnect_Setter_(mthis, __arg_0) => mthis["onconnect"] = __arg_0;
+  onconnect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SharedWorkerGlobalScope */, "onconnect", __arg_0);
 
 }
 
 class BlinkSourceBuffer extends BlinkEventTarget {
   static final instance = new BlinkSourceBuffer();
 
-  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
+  appendWindowEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceBuffer */, "appendWindowEnd");
 
-  appendBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendBuffer", []);
+  appendWindowEnd_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SourceBuffer */, "appendWindowEnd", __arg_0);
 
-  appendBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendBuffer", [__arg_0]);
+  appendWindowStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceBuffer */, "appendWindowStart");
 
-  appendStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendStream", []);
+  appendWindowStart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SourceBuffer */, "appendWindowStart", __arg_0);
 
-  appendStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendStream", [__arg_0]);
+  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceBuffer */, "buffered");
 
-  appendStream_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "appendStream", [__arg_0, __arg_1]);
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceBuffer */, "mode");
 
-  appendWindowEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appendWindowEnd");
+  mode_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SourceBuffer */, "mode", __arg_0);
 
-  appendWindowEnd_Setter_(mthis, __arg_0) => mthis["appendWindowEnd"] = __arg_0;
+  timestampOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceBuffer */, "timestampOffset");
 
-  appendWindowStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appendWindowStart");
+  timestampOffset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SourceBuffer */, "timestampOffset", __arg_0);
 
-  appendWindowStart_Setter_(mthis, __arg_0) => mthis["appendWindowStart"] = __arg_0;
+  trackDefaults_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceBuffer */, "trackDefaults");
 
-  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffered");
+  trackDefaults_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SourceBuffer */, "trackDefaults", __arg_0);
 
-  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
+  updating_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceBuffer */, "updating");
 
-  mode_Setter_(mthis, __arg_0) => mthis["mode"] = __arg_0;
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "abort", []);
 
-  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
+  appendBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "appendBuffer", []);
 
-  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0]);
+  appendBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "appendBuffer", [__arg_0]);
 
-  remove_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0, __arg_1]);
+  appendStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "appendStream", []);
 
-  timestampOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestampOffset");
+  appendStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "appendStream", [__arg_0]);
 
-  timestampOffset_Setter_(mthis, __arg_0) => mthis["timestampOffset"] = __arg_0;
+  appendStream_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "appendStream", [__arg_0, __arg_1]);
 
-  updating_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "updating");
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "remove", []);
+
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "remove", [__arg_0]);
+
+  remove_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SourceBuffer */, "remove", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSourceBufferList extends BlinkEventTarget {
   static final instance = new BlinkSourceBufferList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceBufferList */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SourceBufferList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SourceBufferList */, "item", [__arg_0]);
 
 }
 
 class BlinkSourceInfo {
   static final instance = new BlinkSourceInfo();
 
-  facing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "facing");
+  facing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceInfo */, "facing");
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceInfo */, "id");
 
-  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceInfo */, "kind");
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SourceInfo */, "label");
 
 }
 
 class BlinkSpeechGrammar {
   static final instance = new BlinkSpeechGrammar();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechGrammar"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("SpeechGrammar");
 
-  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechGrammar */, "src");
 
-  src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
+  src_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechGrammar */, "src", __arg_0);
 
-  weight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "weight");
+  weight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechGrammar */, "weight");
 
-  weight_Setter_(mthis, __arg_0) => mthis["weight"] = __arg_0;
+  weight_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechGrammar */, "weight", __arg_0);
 
 }
 
 class BlinkSpeechGrammarList {
   static final instance = new BlinkSpeechGrammarList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("SpeechGrammarList");
 
-  addFromString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addFromString", []);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechGrammarList */, "length");
 
-  addFromString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addFromString", [__arg_0]);
+  addFromString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechGrammarList */, "addFromString", []);
 
-  addFromString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addFromString", [__arg_0, __arg_1]);
+  addFromString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SpeechGrammarList */, "addFromString", [__arg_0]);
 
-  addFromUri_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addFromUri", []);
+  addFromString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SpeechGrammarList */, "addFromString", [__arg_0, __arg_1]);
 
-  addFromUri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addFromUri", [__arg_0]);
+  addFromUri_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechGrammarList */, "addFromUri", []);
 
-  addFromUri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addFromUri", [__arg_0, __arg_1]);
+  addFromUri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SpeechGrammarList */, "addFromUri", [__arg_0]);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechGrammarList"), []);
+  addFromUri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SpeechGrammarList */, "addFromUri", [__arg_0, __arg_1]);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechGrammarList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SpeechGrammarList */, "item", [__arg_0]);
 
 }
 
 class BlinkSpeechRecognition extends BlinkEventTarget {
   static final instance = new BlinkSpeechRecognition();
 
-  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("webkitSpeechRecognition");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "webkitSpeechRecognition"), []);
+  audioTrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "audioTrack");
 
-  continuous_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "continuous");
+  audioTrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "audioTrack", __arg_0);
 
-  continuous_Setter_(mthis, __arg_0) => mthis["continuous"] = __arg_0;
+  continuous_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "continuous");
 
-  grammars_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "grammars");
+  continuous_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "continuous", __arg_0);
 
-  grammars_Setter_(mthis, __arg_0) => mthis["grammars"] = __arg_0;
+  grammars_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "grammars");
 
-  interimResults_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "interimResults");
+  grammars_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "grammars", __arg_0);
 
-  interimResults_Setter_(mthis, __arg_0) => mthis["interimResults"] = __arg_0;
+  interimResults_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "interimResults");
 
-  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
+  interimResults_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "interimResults", __arg_0);
 
-  lang_Setter_(mthis, __arg_0) => mthis["lang"] = __arg_0;
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "lang");
 
-  maxAlternatives_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxAlternatives");
+  lang_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "lang", __arg_0);
 
-  maxAlternatives_Setter_(mthis, __arg_0) => mthis["maxAlternatives"] = __arg_0;
+  maxAlternatives_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "maxAlternatives");
 
-  onaudioend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaudioend");
+  maxAlternatives_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "maxAlternatives", __arg_0);
 
-  onaudioend_Setter_(mthis, __arg_0) => mthis["onaudioend"] = __arg_0;
+  onaudioend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onaudioend");
 
-  onaudiostart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaudiostart");
+  onaudioend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onaudioend", __arg_0);
 
-  onaudiostart_Setter_(mthis, __arg_0) => mthis["onaudiostart"] = __arg_0;
+  onaudiostart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onaudiostart");
 
-  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onend");
+  onaudiostart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onaudiostart", __arg_0);
 
-  onend_Setter_(mthis, __arg_0) => mthis["onend"] = __arg_0;
+  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onend");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onend", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onerror");
 
-  onnomatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onnomatch");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onerror", __arg_0);
 
-  onnomatch_Setter_(mthis, __arg_0) => mthis["onnomatch"] = __arg_0;
+  onnomatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onnomatch");
 
-  onresult_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresult");
+  onnomatch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onnomatch", __arg_0);
 
-  onresult_Setter_(mthis, __arg_0) => mthis["onresult"] = __arg_0;
+  onresult_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onresult");
 
-  onsoundend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsoundend");
+  onresult_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onresult", __arg_0);
 
-  onsoundend_Setter_(mthis, __arg_0) => mthis["onsoundend"] = __arg_0;
+  onsoundend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onsoundend");
 
-  onsoundstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsoundstart");
+  onsoundend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onsoundend", __arg_0);
 
-  onsoundstart_Setter_(mthis, __arg_0) => mthis["onsoundstart"] = __arg_0;
+  onsoundstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onsoundstart");
 
-  onspeechend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onspeechend");
+  onsoundstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onsoundstart", __arg_0);
 
-  onspeechend_Setter_(mthis, __arg_0) => mthis["onspeechend"] = __arg_0;
+  onspeechend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onspeechend");
 
-  onspeechstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onspeechstart");
+  onspeechend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onspeechend", __arg_0);
 
-  onspeechstart_Setter_(mthis, __arg_0) => mthis["onspeechstart"] = __arg_0;
+  onspeechstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onspeechstart");
 
-  onstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstart");
+  onspeechstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onspeechstart", __arg_0);
 
-  onstart_Setter_(mthis, __arg_0) => mthis["onstart"] = __arg_0;
+  onstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "onstart");
 
-  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
+  onstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "onstart", __arg_0);
 
-  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
+  serviceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognition */, "serviceURI");
+
+  serviceURI_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechRecognition */, "serviceURI", __arg_0);
+
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechRecognition */, "abort", []);
+
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechRecognition */, "start", []);
+
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechRecognition */, "stop", []);
 
 }
 
 class BlinkSpeechRecognitionAlternative {
   static final instance = new BlinkSpeechRecognitionAlternative();
 
-  confidence_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "confidence");
+  confidence_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionAlternative */, "confidence");
 
-  transcript_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transcript");
+  transcript_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionAlternative */, "transcript");
 
 }
 
 class BlinkSpeechRecognitionError extends BlinkEvent {
   static final instance = new BlinkSpeechRecognitionError();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechRecognitionError"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("SpeechRecognitionError");
 
-  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("SpeechRecognitionError", [__arg_0]);
 
-  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("SpeechRecognitionError", [__arg_0, __arg_1]);
+
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionError */, "error");
+
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionError */, "message");
 
 }
 
 class BlinkSpeechRecognitionEvent extends BlinkEvent {
   static final instance = new BlinkSpeechRecognitionEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechRecognitionEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("SpeechRecognitionEvent");
 
-  emma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "emma");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("SpeechRecognitionEvent", [__arg_0]);
 
-  interpretation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "interpretation");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("SpeechRecognitionEvent", [__arg_0, __arg_1]);
 
-  resultIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "resultIndex");
+  emma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionEvent */, "emma");
 
-  results_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "results");
+  interpretation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionEvent */, "interpretation");
+
+  resultIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionEvent */, "resultIndex");
+
+  results_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionEvent */, "results");
 
 }
 
 class BlinkSpeechRecognitionResult {
   static final instance = new BlinkSpeechRecognitionResult();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  isFinal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionResult */, "isFinal");
 
-  isFinal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isFinal");
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionResult */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechRecognitionResult */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SpeechRecognitionResult */, "item", [__arg_0]);
 
 }
 
 class BlinkSpeechRecognitionResultList {
   static final instance = new BlinkSpeechRecognitionResultList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechRecognitionResultList */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechRecognitionResultList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SpeechRecognitionResultList */, "item", [__arg_0]);
 
 }
 
 class BlinkSpeechSynthesis extends BlinkEventTarget {
   static final instance = new BlinkSpeechSynthesis();
 
-  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancel", []);
+  onvoiceschanged_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesis */, "onvoiceschanged");
 
-  getVoices_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVoices", []);
+  onvoiceschanged_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesis */, "onvoiceschanged", __arg_0);
 
-  onvoiceschanged_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvoiceschanged");
+  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesis */, "paused");
 
-  onvoiceschanged_Setter_(mthis, __arg_0) => mthis["onvoiceschanged"] = __arg_0;
+  pending_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesis */, "pending");
 
-  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pause", []);
+  speaking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesis */, "speaking");
 
-  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "paused");
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechSynthesis */, "cancel", []);
 
-  pending_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pending");
+  getVoices_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechSynthesis */, "getVoices", []);
 
-  resume_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resume", []);
+  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechSynthesis */, "pause", []);
 
-  speak_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "speak", []);
+  resume_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechSynthesis */, "resume", []);
 
-  speak_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "speak", [__arg_0]);
+  speak_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SpeechSynthesis */, "speak", []);
 
-  speaking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "speaking");
+  speak_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SpeechSynthesis */, "speak", [__arg_0]);
 
 }
 
 class BlinkSpeechSynthesisEvent extends BlinkEvent {
   static final instance = new BlinkSpeechSynthesisEvent();
 
-  charIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charIndex");
+  charIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisEvent */, "charIndex");
 
-  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elapsedTime");
+  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisEvent */, "elapsedTime");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisEvent */, "name");
+
+  utterance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisEvent */, "utterance");
 
 }
 
 class BlinkSpeechSynthesisUtterance extends BlinkEventTarget {
   static final instance = new BlinkSpeechSynthesisUtterance();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechSynthesisUtterance"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("SpeechSynthesisUtterance");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechSynthesisUtterance"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("SpeechSynthesisUtterance", [__arg_0]);
 
-  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "lang");
 
-  lang_Setter_(mthis, __arg_0) => mthis["lang"] = __arg_0;
+  lang_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "lang", __arg_0);
 
-  onboundary_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onboundary");
+  onboundary_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "onboundary");
 
-  onboundary_Setter_(mthis, __arg_0) => mthis["onboundary"] = __arg_0;
+  onboundary_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "onboundary", __arg_0);
 
-  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onend");
+  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "onend");
 
-  onend_Setter_(mthis, __arg_0) => mthis["onend"] = __arg_0;
+  onend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "onend", __arg_0);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "onerror");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "onerror", __arg_0);
 
-  onmark_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmark");
+  onmark_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "onmark");
 
-  onmark_Setter_(mthis, __arg_0) => mthis["onmark"] = __arg_0;
+  onmark_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "onmark", __arg_0);
 
-  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "onpause");
 
-  onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
+  onpause_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "onpause", __arg_0);
 
-  onresume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresume");
+  onresume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "onresume");
 
-  onresume_Setter_(mthis, __arg_0) => mthis["onresume"] = __arg_0;
+  onresume_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "onresume", __arg_0);
 
-  onstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstart");
+  onstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "onstart");
 
-  onstart_Setter_(mthis, __arg_0) => mthis["onstart"] = __arg_0;
+  onstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "onstart", __arg_0);
 
-  pitch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pitch");
+  pitch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "pitch");
 
-  pitch_Setter_(mthis, __arg_0) => mthis["pitch"] = __arg_0;
+  pitch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "pitch", __arg_0);
 
-  rate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rate");
+  rate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "rate");
 
-  rate_Setter_(mthis, __arg_0) => mthis["rate"] = __arg_0;
+  rate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "rate", __arg_0);
 
-  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "text");
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "text");
 
-  text_Setter_(mthis, __arg_0) => mthis["text"] = __arg_0;
+  text_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "text", __arg_0);
 
-  voice_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "voice");
+  voice_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "voice");
 
-  voice_Setter_(mthis, __arg_0) => mthis["voice"] = __arg_0;
+  voice_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "voice", __arg_0);
 
-  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "volume");
+  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisUtterance */, "volume");
 
-  volume_Setter_(mthis, __arg_0) => mthis["volume"] = __arg_0;
+  volume_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* SpeechSynthesisUtterance */, "volume", __arg_0);
 
 }
 
 class BlinkSpeechSynthesisVoice {
   static final instance = new BlinkSpeechSynthesisVoice();
 
-  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "default");
+  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisVoice */, "default");
 
-  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisVoice */, "lang");
 
-  localService_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localService");
+  localService_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisVoice */, "localService");
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisVoice */, "name");
 
-  voiceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "voiceURI");
+  voiceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SpeechSynthesisVoice */, "voiceURI");
+
+}
+
+class BlinkStashedMessagePort extends BlinkMessagePort {
+  static final instance = new BlinkStashedMessagePort();
+
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StashedMessagePort */, "name");
+
+}
+
+class BlinkStashedPortCollection extends BlinkEventTarget {
+  static final instance = new BlinkStashedPortCollection();
+
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StashedPortCollection */, "onmessage");
+
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* StashedPortCollection */, "onmessage", __arg_0);
+
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StashedPortCollection */, "add", []);
+
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StashedPortCollection */, "add", [__arg_0]);
+
+  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* StashedPortCollection */, "add", [__arg_0, __arg_1]);
+
+}
+
+class BlinkStereoPannerNode extends BlinkAudioNode {
+  static final instance = new BlinkStereoPannerNode();
+
+  pan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StereoPannerNode */, "pan");
 
 }
 
 class BlinkStorage {
   static final instance = new BlinkStorage();
 
-  $__delete___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__delete__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Storage */, "length");
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  $__delete___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "__delete__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "__getter__", [__arg_0]);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "__setter__", [__arg_0, __arg_1]);
 
-  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "clear", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "getItem", []);
 
-  key_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "key", []);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "getItem", [__arg_0]);
 
-  key_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "key", [__arg_0]);
+  key_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "key", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  key_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "key", [__arg_0]);
 
-  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "removeItem", []);
 
-  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "removeItem", [__arg_0]);
 
-  setItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setItem", []);
+  setItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "setItem", []);
 
-  setItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setItem", [__arg_0]);
+  setItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "setItem", [__arg_0]);
 
-  setItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setItem", [__arg_0, __arg_1]);
+  setItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Storage */, "setItem", [__arg_0, __arg_1]);
+
+}
+
+class BlinkStorageErrorCallback {
+  static final instance = new BlinkStorageErrorCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StorageErrorCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StorageErrorCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkStorageEvent extends BlinkEvent {
   static final instance = new BlinkStorageEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "StorageEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("StorageEvent");
 
-  initStorageEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", []);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("StorageEvent", [__arg_0]);
 
-  initStorageEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("StorageEvent", [__arg_0, __arg_1]);
 
-  initStorageEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1]);
+  key_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StorageEvent */, "key");
 
-  initStorageEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1, __arg_2]);
+  newValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StorageEvent */, "newValue");
 
-  initStorageEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  oldValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StorageEvent */, "oldValue");
 
-  initStorageEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  storageArea_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StorageEvent */, "storageArea");
 
-  initStorageEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StorageEvent */, "url");
 
-  initStorageEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  initStorageEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* StorageEvent */, "initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  initStorageEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  initStorageEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* StorageEvent */, "initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  key_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "key");
-
-  newValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newValue");
-
-  oldValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oldValue");
-
-  storageArea_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "storageArea");
-
-  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
+  initStorageEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* StorageEvent */, "initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
 }
 
 class BlinkStorageInfo {
   static final instance = new BlinkStorageInfo();
 
-  quota_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "quota");
+  quota_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StorageInfo */, "quota");
 
-  usage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "usage");
+  usage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StorageInfo */, "usage");
 
 }
 
 class BlinkStorageQuota {
   static final instance = new BlinkStorageQuota();
 
-  queryInfo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryInfo", []);
+  supportedTypes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StorageQuota */, "supportedTypes");
 
-  queryInfo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryInfo", [__arg_0]);
+  queryInfo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StorageQuota */, "queryInfo", []);
 
-  requestPersistentQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestPersistentQuota", []);
+  queryInfo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StorageQuota */, "queryInfo", [__arg_0]);
 
-  requestPersistentQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "requestPersistentQuota", [__arg_0]);
+  requestPersistentQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StorageQuota */, "requestPersistentQuota", []);
 
-  supportedTypes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "supportedTypes");
+  requestPersistentQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StorageQuota */, "requestPersistentQuota", [__arg_0]);
+
+}
+
+class BlinkStorageQuotaCallback {
+  static final instance = new BlinkStorageQuotaCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StorageQuotaCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StorageQuotaCallback */, "handleEvent", [__arg_0]);
+
+}
+
+class BlinkStorageUsageCallback {
+  static final instance = new BlinkStorageUsageCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StorageUsageCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StorageUsageCallback */, "handleEvent", [__arg_0]);
+
+  handleEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* StorageUsageCallback */, "handleEvent", [__arg_0, __arg_1]);
 
 }
 
 class BlinkStream {
   static final instance = new BlinkStream();
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Stream */, "type");
+
+}
+
+class BlinkStringCallback {
+  static final instance = new BlinkStringCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StringCallback */, "handleEvent", []);
+
+  handleEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StringCallback */, "handleEvent", [__arg_0]);
 
 }
 
 class BlinkStyleMedia {
   static final instance = new BlinkStyleMedia();
 
-  matchMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matchMedium", []);
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleMedia */, "type");
 
-  matchMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matchMedium", [__arg_0]);
+  matchMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StyleMedia */, "matchMedium", []);
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  matchMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StyleMedia */, "matchMedium", [__arg_0]);
 
 }
 
 class BlinkStyleSheet {
   static final instance = new BlinkStyleSheet();
 
-  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleSheet */, "disabled");
 
-  disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
+  disabled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* StyleSheet */, "disabled", __arg_0);
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleSheet */, "href");
 
-  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleSheet */, "media");
 
-  ownerNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerNode");
+  ownerNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleSheet */, "ownerNode");
 
-  parentStyleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentStyleSheet");
+  parentStyleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleSheet */, "parentStyleSheet");
 
-  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleSheet */, "title");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleSheet */, "type");
 
 }
 
 class BlinkStyleSheetList {
   static final instance = new BlinkStyleSheetList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* StyleSheetList */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StyleSheetList */, "__getter__", [__arg_0]);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* StyleSheetList */, "item", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* StyleSheetList */, "item", [__arg_0]);
 
 }
 
 class BlinkSubtleCrypto {
   static final instance = new BlinkSubtleCrypto();
 
-  decrypt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "decrypt", [__arg_0]);
+  decrypt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "decrypt", [__arg_0]);
 
-  decrypt_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "decrypt", [__arg_0, __arg_1]);
+  decrypt_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "decrypt", [__arg_0, __arg_1]);
 
-  decrypt_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "decrypt", [__arg_0, __arg_1, __arg_2]);
+  decrypt_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "decrypt", [__arg_0, __arg_1, __arg_2]);
 
-  digest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "digest", []);
+  deriveBits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "deriveBits", [__arg_0]);
 
-  digest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "digest", [__arg_0]);
+  deriveBits_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "deriveBits", [__arg_0, __arg_1]);
 
-  digest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "digest", [__arg_0, __arg_1]);
+  deriveBits_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "deriveBits", [__arg_0, __arg_1, __arg_2]);
 
-  encrypt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "encrypt", [__arg_0]);
+  digest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "digest", []);
 
-  encrypt_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "encrypt", [__arg_0, __arg_1]);
+  digest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "digest", [__arg_0]);
 
-  encrypt_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "encrypt", [__arg_0, __arg_1, __arg_2]);
+  digest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "digest", [__arg_0, __arg_1]);
 
-  exportKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "exportKey", []);
+  encrypt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "encrypt", [__arg_0]);
 
-  exportKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "exportKey", [__arg_0]);
+  encrypt_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "encrypt", [__arg_0, __arg_1]);
 
-  exportKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "exportKey", [__arg_0, __arg_1]);
+  encrypt_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "encrypt", [__arg_0, __arg_1, __arg_2]);
 
-  generateKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "generateKey", [__arg_0]);
+  exportKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "exportKey", []);
 
-  generateKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "generateKey", [__arg_0, __arg_1]);
+  exportKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "exportKey", [__arg_0]);
 
-  generateKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "generateKey", [__arg_0, __arg_1, __arg_2]);
+  exportKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "exportKey", [__arg_0, __arg_1]);
 
-  importKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "importKey", [__arg_0, __arg_1, __arg_2]);
+  sign_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "sign", [__arg_0]);
 
-  importKey_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "importKey", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  sign_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "sign", [__arg_0, __arg_1]);
 
-  importKey_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "importKey", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  sign_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "sign", [__arg_0, __arg_1, __arg_2]);
 
-  sign_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sign", [__arg_0]);
+  verify_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "verify", [__arg_0, __arg_1]);
 
-  sign_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "sign", [__arg_0, __arg_1]);
+  verify_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "verify", [__arg_0, __arg_1, __arg_2]);
 
-  sign_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "sign", [__arg_0, __arg_1, __arg_2]);
+  verify_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "verify", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  unwrapKey_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "unwrapKey", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  wrapKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "wrapKey", [__arg_0, __arg_1]);
 
-  unwrapKey_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "unwrapKey", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  wrapKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "wrapKey", [__arg_0, __arg_1, __arg_2]);
 
-  unwrapKey_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "unwrapKey", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  wrapKey_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* SubtleCrypto */, "wrapKey", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  verify_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "verify", [__arg_0, __arg_1]);
+}
 
-  verify_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "verify", [__arg_0, __arg_1, __arg_2]);
+class BlinkSyncEvent extends BlinkExtendableEvent {
+  static final instance = new BlinkSyncEvent();
 
-  verify_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "verify", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("SyncEvent");
 
-  wrapKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "wrapKey", [__arg_0, __arg_1]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("SyncEvent", [__arg_0]);
 
-  wrapKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "wrapKey", [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("SyncEvent", [__arg_0, __arg_1]);
 
-  wrapKey_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "wrapKey", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  registration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SyncEvent */, "registration");
+
+}
+
+class BlinkSyncManager {
+  static final instance = new BlinkSyncManager();
+
+  getRegistration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SyncManager */, "getRegistration", []);
+
+  getRegistration_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SyncManager */, "getRegistration", [__arg_0]);
+
+  getRegistrations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SyncManager */, "getRegistrations", []);
+
+  permissionState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SyncManager */, "permissionState", []);
+
+  register_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SyncManager */, "register", []);
+
+  register_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* SyncManager */, "register", [__arg_0]);
+
+}
+
+class BlinkSyncRegistration {
+  static final instance = new BlinkSyncRegistration();
+
+  tag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* SyncRegistration */, "tag");
+
+  unregister_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* SyncRegistration */, "unregister", []);
 
 }
 
 class BlinkText extends BlinkCharacterData {
   static final instance = new BlinkText();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Text"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Text");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Text"), [__arg_0]);
+  wholeText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Text */, "wholeText");
 
-  getDestinationInsertionPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDestinationInsertionPoints", []);
+  getDestinationInsertionPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Text */, "getDestinationInsertionPoints", []);
 
-  replaceWholeText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceWholeText", []);
+  splitText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Text */, "splitText", []);
 
-  replaceWholeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceWholeText", [__arg_0]);
-
-  splitText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "splitText", []);
-
-  splitText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "splitText", [__arg_0]);
-
-  wholeText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wholeText");
-
-}
-
-class BlinkTextDecoder {
-  static final instance = new BlinkTextDecoder();
-
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextDecoder"), []);
-
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextDecoder"), [__arg_0]);
-
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextDecoder"), [__arg_0, __arg_1]);
-
-  decode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "decode", []);
-
-  decode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "decode", [__arg_0]);
-
-  decode_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "decode", [__arg_0, __arg_1]);
-
-  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "encoding");
-
-  fatal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fatal");
-
-  ignoreBOM_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ignoreBOM");
-
-}
-
-class BlinkTextEncoder {
-  static final instance = new BlinkTextEncoder();
-
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextEncoder"), []);
-
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextEncoder"), [__arg_0]);
-
-  encode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "encode", []);
-
-  encode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "encode", [__arg_0]);
-
-  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "encoding");
+  splitText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Text */, "splitText", [__arg_0]);
 
 }
 
 class BlinkTextEvent extends BlinkUIEvent {
   static final instance = new BlinkTextEvent();
 
-  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextEvent */, "data");
 
-  initTextEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initTextEvent", []);
+  initTextEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* TextEvent */, "initTextEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initTextEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initTextEvent", [__arg_0]);
+  initTextEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* TextEvent */, "initTextEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  initTextEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initTextEvent", [__arg_0, __arg_1]);
-
-  initTextEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initTextEvent", [__arg_0, __arg_1, __arg_2]);
-
-  initTextEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initTextEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
-
-  initTextEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initTextEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  initTextEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* TextEvent */, "initTextEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
 }
 
 class BlinkTextMetrics {
   static final instance = new BlinkTextMetrics();
 
-  actualBoundingBoxAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "actualBoundingBoxAscent");
+  actualBoundingBoxAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "actualBoundingBoxAscent");
 
-  actualBoundingBoxDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "actualBoundingBoxDescent");
+  actualBoundingBoxDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "actualBoundingBoxDescent");
 
-  actualBoundingBoxLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "actualBoundingBoxLeft");
+  actualBoundingBoxLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "actualBoundingBoxLeft");
 
-  actualBoundingBoxRight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "actualBoundingBoxRight");
+  actualBoundingBoxRight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "actualBoundingBoxRight");
 
-  alphabeticBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alphabeticBaseline");
+  alphabeticBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "alphabeticBaseline");
 
-  emHeightAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "emHeightAscent");
+  emHeightAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "emHeightAscent");
 
-  emHeightDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "emHeightDescent");
+  emHeightDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "emHeightDescent");
 
-  fontBoundingBoxAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fontBoundingBoxAscent");
+  fontBoundingBoxAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "fontBoundingBoxAscent");
 
-  fontBoundingBoxDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fontBoundingBoxDescent");
+  fontBoundingBoxDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "fontBoundingBoxDescent");
 
-  hangingBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hangingBaseline");
+  hangingBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "hangingBaseline");
 
-  ideographicBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ideographicBaseline");
+  ideographicBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "ideographicBaseline");
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextMetrics */, "width");
 
 }
 
 class BlinkTextTrack extends BlinkEventTarget {
   static final instance = new BlinkTextTrack();
 
-  activeCues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeCues");
+  activeCues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "activeCues");
 
-  addCue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addCue", []);
+  cues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "cues");
 
-  addCue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addCue", [__arg_0]);
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "id");
 
-  addRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addRegion", []);
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "kind");
 
-  addRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addRegion", [__arg_0]);
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "label");
 
-  cues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cues");
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "language");
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "mode");
 
-  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
+  mode_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrack */, "mode", __arg_0);
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "oncuechange");
 
-  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "language");
+  oncuechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrack */, "oncuechange", __arg_0);
 
-  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
+  regions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrack */, "regions");
 
-  mode_Setter_(mthis, __arg_0) => mthis["mode"] = __arg_0;
+  addCue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TextTrack */, "addCue", []);
 
-  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
+  addCue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TextTrack */, "addCue", [__arg_0]);
 
-  oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
+  addRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TextTrack */, "addRegion", []);
 
-  regions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "regions");
+  addRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TextTrack */, "addRegion", [__arg_0]);
 
-  removeCue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeCue", []);
+  removeCue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TextTrack */, "removeCue", []);
 
-  removeCue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeCue", [__arg_0]);
+  removeCue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TextTrack */, "removeCue", [__arg_0]);
 
-  removeRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeRegion", []);
+  removeRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TextTrack */, "removeRegion", []);
 
-  removeRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeRegion", [__arg_0]);
+  removeRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TextTrack */, "removeRegion", [__arg_0]);
 
 }
 
 class BlinkTextTrackCue extends BlinkEventTarget {
   static final instance = new BlinkTextTrackCue();
 
-  endTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endTime");
+  endTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackCue */, "endTime");
 
-  endTime_Setter_(mthis, __arg_0) => mthis["endTime"] = __arg_0;
+  endTime_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackCue */, "endTime", __arg_0);
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackCue */, "id");
 
-  id_Setter_(mthis, __arg_0) => mthis["id"] = __arg_0;
+  id_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackCue */, "id", __arg_0);
 
-  onenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onenter");
+  onenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackCue */, "onenter");
 
-  onenter_Setter_(mthis, __arg_0) => mthis["onenter"] = __arg_0;
+  onenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackCue */, "onenter", __arg_0);
 
-  onexit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onexit");
+  onexit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackCue */, "onexit");
 
-  onexit_Setter_(mthis, __arg_0) => mthis["onexit"] = __arg_0;
+  onexit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackCue */, "onexit", __arg_0);
 
-  pauseOnExit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pauseOnExit");
+  pauseOnExit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackCue */, "pauseOnExit");
 
-  pauseOnExit_Setter_(mthis, __arg_0) => mthis["pauseOnExit"] = __arg_0;
+  pauseOnExit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackCue */, "pauseOnExit", __arg_0);
 
-  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startTime");
+  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackCue */, "startTime");
 
-  startTime_Setter_(mthis, __arg_0) => mthis["startTime"] = __arg_0;
+  startTime_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackCue */, "startTime", __arg_0);
 
-  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackCue */, "track");
 
 }
 
 class BlinkTextTrackCueList {
   static final instance = new BlinkTextTrackCueList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackCueList */, "length");
 
-  getCueById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCueById", []);
+  getCueById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TextTrackCueList */, "getCueById", []);
 
-  getCueById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getCueById", [__arg_0]);
+  getCueById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TextTrackCueList */, "getCueById", [__arg_0]);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TextTrackCueList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TextTrackCueList */, "item", [__arg_0]);
 
 }
 
 class BlinkTextTrackList extends BlinkEventTarget {
   static final instance = new BlinkTextTrackList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackList */, "length");
 
-  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", []);
+  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackList */, "onaddtrack");
 
-  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", [__arg_0]);
+  onaddtrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackList */, "onaddtrack", __arg_0);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackList */, "onchange");
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackList */, "onchange", __arg_0);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TextTrackList */, "onremovetrack");
 
-  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddtrack");
+  onremovetrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TextTrackList */, "onremovetrack", __arg_0);
 
-  onaddtrack_Setter_(mthis, __arg_0) => mthis["onaddtrack"] = __arg_0;
+  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TextTrackList */, "getTrackById", []);
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TextTrackList */, "getTrackById", [__arg_0]);
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TextTrackList */, "item", []);
 
-  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovetrack");
-
-  onremovetrack_Setter_(mthis, __arg_0) => mthis["onremovetrack"] = __arg_0;
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TextTrackList */, "item", [__arg_0]);
 
 }
 
 class BlinkTimeRanges {
   static final instance = new BlinkTimeRanges();
 
-  end_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "end", []);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TimeRanges */, "length");
 
-  end_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "end", [__arg_0]);
+  end_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TimeRanges */, "end", []);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  end_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TimeRanges */, "end", [__arg_0]);
 
-  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TimeRanges */, "start", []);
 
-  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0]);
+  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TimeRanges */, "start", [__arg_0]);
 
 }
 
-class BlinkTiming {
-  static final instance = new BlinkTiming();
+class BlinkTimeoutHandler {
+  static final instance = new BlinkTimeoutHandler();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
-
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
-
-  delay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "delay");
-
-  delay_Setter_(mthis, __arg_0) => mthis["delay"] = __arg_0;
-
-  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "direction");
-
-  direction_Setter_(mthis, __arg_0) => mthis["direction"] = __arg_0;
-
-  easing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "easing");
-
-  easing_Setter_(mthis, __arg_0) => mthis["easing"] = __arg_0;
-
-  endDelay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endDelay");
-
-  endDelay_Setter_(mthis, __arg_0) => mthis["endDelay"] = __arg_0;
-
-  fill_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fill");
-
-  fill_Setter_(mthis, __arg_0) => mthis["fill"] = __arg_0;
-
-  iterationStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "iterationStart");
-
-  iterationStart_Setter_(mthis, __arg_0) => mthis["iterationStart"] = __arg_0;
-
-  iterations_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "iterations");
-
-  iterations_Setter_(mthis, __arg_0) => mthis["iterations"] = __arg_0;
-
-  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
-
-  playbackRate_Setter_(mthis, __arg_0) => mthis["playbackRate"] = __arg_0;
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TimeoutHandler */, "handleEvent", []);
 
 }
 
 class BlinkTouch {
   static final instance = new BlinkTouch();
 
-  clientX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientX");
+  clientX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "clientX");
 
-  clientY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientY");
+  clientY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "clientY");
 
-  force_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "force");
+  force_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "force");
 
-  identifier_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "identifier");
+  identifier_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "identifier");
 
-  pageX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageX");
+  pageX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "pageX");
 
-  pageY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageY");
+  pageY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "pageY");
 
-  radiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radiusX");
+  radiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "radiusX");
 
-  radiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radiusY");
+  radiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "radiusY");
 
-  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenX");
+  rotationAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "rotationAngle");
 
-  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenY");
+  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "screenX");
 
-  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
+  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "screenY");
 
-  webkitForce_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitForce");
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "target");
 
-  webkitRadiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitRadiusX");
+  webkitForce_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "webkitForce");
 
-  webkitRadiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitRadiusY");
+  webkitRadiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "webkitRadiusX");
 
-  webkitRotationAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitRotationAngle");
+  webkitRadiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "webkitRadiusY");
+
+  webkitRotationAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Touch */, "webkitRotationAngle");
 
 }
 
 class BlinkTouchEvent extends BlinkUIEvent {
   static final instance = new BlinkTouchEvent();
 
-  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altKey");
+  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TouchEvent */, "altKey");
 
-  changedTouches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "changedTouches");
+  changedTouches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TouchEvent */, "changedTouches");
 
-  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ctrlKey");
+  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TouchEvent */, "ctrlKey");
 
-  initTouchEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", []);
+  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TouchEvent */, "metaKey");
 
-  initTouchEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0]);
+  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TouchEvent */, "shiftKey");
 
-  initTouchEvent_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+  targetTouches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TouchEvent */, "targetTouches");
 
-  initTouchEvent_Callback_11_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
+  touches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TouchEvent */, "touches");
 
-  initTouchEvent_Callback_12_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11]);
+  initTouchEvent_Callback_11_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10) => Blink_JsNative_DomException.callMethod(mthis /* TouchEvent */, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
 
-  initTouchEvent_Callback_13_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12]);
+  initTouchEvent_Callback_12_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11) => Blink_JsNative_DomException.callMethod(mthis /* TouchEvent */, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11]);
 
-  initTouchEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1]);
-
-  initTouchEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2]);
-
-  initTouchEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
-
-  initTouchEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
-
-  initTouchEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
-
-  initTouchEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
-
-  initTouchEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
-
-  initTouchEvent_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
-
-  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "metaKey");
-
-  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shiftKey");
-
-  targetTouches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "targetTouches");
-
-  touches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "touches");
+  initTouchEvent_Callback_13_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12) => Blink_JsNative_DomException.callMethod(mthis /* TouchEvent */, "initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10, __arg_11, __arg_12]);
 
 }
 
 class BlinkTouchList {
   static final instance = new BlinkTouchList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TouchList */, "length");
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TouchList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TouchList */, "item", [__arg_0]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+}
+
+class BlinkTrackDefault {
+  static final instance = new BlinkTrackDefault();
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("TrackDefault", [__arg_0, __arg_1]);
+
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("TrackDefault", [__arg_0, __arg_1, __arg_2]);
+
+  constructorCallback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callConstructor("TrackDefault", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  constructorCallback_5_(__arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callConstructor("TrackDefault", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  byteStreamTrackID_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TrackDefault */, "byteStreamTrackID");
+
+  kinds_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TrackDefault */, "kinds");
+
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TrackDefault */, "label");
+
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TrackDefault */, "language");
+
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TrackDefault */, "type");
+
+}
+
+class BlinkTrackDefaultList {
+  static final instance = new BlinkTrackDefaultList();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("TrackDefaultList");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("TrackDefaultList", [__arg_0]);
+
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TrackDefaultList */, "length");
+
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TrackDefaultList */, "item", []);
+
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* TrackDefaultList */, "item", [__arg_0]);
 
 }
 
 class BlinkTrackEvent extends BlinkEvent {
   static final instance = new BlinkTrackEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TrackEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("TrackEvent");
 
-  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("TrackEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("TrackEvent", [__arg_0, __arg_1]);
+
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TrackEvent */, "track");
 
 }
 
 class BlinkTransitionEvent extends BlinkEvent {
   static final instance = new BlinkTransitionEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TransitionEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("TransitionEvent");
 
-  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elapsedTime");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("TransitionEvent", [__arg_0]);
 
-  propertyName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "propertyName");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("TransitionEvent", [__arg_0, __arg_1]);
 
-  pseudoElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pseudoElement");
+  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TransitionEvent */, "elapsedTime");
+
+  propertyName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TransitionEvent */, "propertyName");
+
+  pseudoElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TransitionEvent */, "pseudoElement");
 
 }
 
 class BlinkTreeWalker {
   static final instance = new BlinkTreeWalker();
 
-  currentNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentNode");
+  currentNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TreeWalker */, "currentNode");
 
-  currentNode_Setter_(mthis, __arg_0) => mthis["currentNode"] = __arg_0;
+  currentNode_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* TreeWalker */, "currentNode", __arg_0);
 
-  expandEntityReferences_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "expandEntityReferences");
+  filter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TreeWalker */, "filter");
 
-  filter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filter");
+  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TreeWalker */, "root");
 
-  firstChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "firstChild", []);
+  whatToShow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* TreeWalker */, "whatToShow");
 
-  lastChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lastChild", []);
+  firstChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TreeWalker */, "firstChild", []);
 
-  nextNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "nextNode", []);
+  lastChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TreeWalker */, "lastChild", []);
 
-  nextSibling_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "nextSibling", []);
+  nextNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TreeWalker */, "nextNode", []);
 
-  parentNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "parentNode", []);
+  nextSibling_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TreeWalker */, "nextSibling", []);
 
-  previousNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "previousNode", []);
+  parentNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TreeWalker */, "parentNode", []);
 
-  previousSibling_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "previousSibling", []);
+  previousNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TreeWalker */, "previousNode", []);
 
-  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "root");
-
-  whatToShow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "whatToShow");
+  previousSibling_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* TreeWalker */, "previousSibling", []);
 
 }
 
 class BlinkUIEvent extends BlinkEvent {
   static final instance = new BlinkUIEvent();
 
-  charCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charCode");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("UIEvent");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "UIEvent"), [__arg_0, __arg_1]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("UIEvent", [__arg_0]);
 
-  detail_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "detail");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("UIEvent", [__arg_0, __arg_1]);
 
-  initUIEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", []);
+  charCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* UIEvent */, "charCode");
 
-  initUIEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", [__arg_0]);
+  detail_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* UIEvent */, "detail");
 
-  initUIEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", [__arg_0, __arg_1]);
+  keyCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* UIEvent */, "keyCode");
 
-  initUIEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", [__arg_0, __arg_1, __arg_2]);
+  sourceDevice_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* UIEvent */, "sourceDevice");
 
-  initUIEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  view_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* UIEvent */, "view");
 
-  initUIEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  which_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* UIEvent */, "which");
 
-  keyCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyCode");
+  initUIEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* UIEvent */, "initUIEvent", [__arg_0, __arg_1, __arg_2]);
 
-  layerX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "layerX");
+  initUIEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* UIEvent */, "initUIEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  layerY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "layerY");
-
-  pageX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageX");
-
-  pageY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageY");
-
-  view_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "view");
-
-  which_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "which");
+  initUIEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* UIEvent */, "initUIEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
 }
 
 class BlinkURL {
   static final instance = new BlinkURL();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "URL"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("URL");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "URL"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("URL", [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "URL"), [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("URL", [__arg_0, __arg_1]);
 
-  createObjectURL_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL"), "createObjectURL", []);
+  createObjectURL_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL") /* URL */, "createObjectURL", []);
 
-  createObjectURL_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL"), "createObjectURL", [__arg_0]);
+  createObjectURL_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL") /* URL */, "createObjectURL", [__arg_0]);
 
-  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
+  revokeObjectURL_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL") /* URL */, "revokeObjectURL", []);
 
-  hash_Setter_(mthis, __arg_0) => mthis["hash"] = __arg_0;
+  revokeObjectURL_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL") /* URL */, "revokeObjectURL", [__arg_0]);
 
-  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "hash");
 
-  host_Setter_(mthis, __arg_0) => mthis["host"] = __arg_0;
+  hash_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "hash", __arg_0);
 
-  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "host");
 
-  hostname_Setter_(mthis, __arg_0) => mthis["hostname"] = __arg_0;
+  host_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "host", __arg_0);
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "hostname");
 
-  href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
+  hostname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "hostname", __arg_0);
 
-  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "href");
 
-  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "password");
+  href_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "href", __arg_0);
 
-  password_Setter_(mthis, __arg_0) => mthis["password"] = __arg_0;
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "origin");
 
-  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "password");
 
-  pathname_Setter_(mthis, __arg_0) => mthis["pathname"] = __arg_0;
+  password_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "password", __arg_0);
 
-  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "pathname");
 
-  port_Setter_(mthis, __arg_0) => mthis["port"] = __arg_0;
+  pathname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "pathname", __arg_0);
 
-  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "port");
 
-  protocol_Setter_(mthis, __arg_0) => mthis["protocol"] = __arg_0;
+  port_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "port", __arg_0);
 
-  revokeObjectURL_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL"), "revokeObjectURL", []);
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "protocol");
 
-  revokeObjectURL_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL"), "revokeObjectURL", [__arg_0]);
+  protocol_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "protocol", __arg_0);
 
-  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "search");
 
-  search_Setter_(mthis, __arg_0) => mthis["search"] = __arg_0;
+  search_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "search", __arg_0);
 
-  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
+  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "username");
 
-  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "username");
+  username_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "username", __arg_0);
 
-  username_Setter_(mthis, __arg_0) => mthis["username"] = __arg_0;
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* URLUtils */, "toString", []);
+
+}
+
+class BlinkURLUtils {
+  static final instance = new BlinkURLUtils();
+
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "hash");
+
+  hash_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "hash", __arg_0);
+
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "host");
+
+  host_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "host", __arg_0);
+
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "hostname");
+
+  hostname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "hostname", __arg_0);
+
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "href");
+
+  href_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "href", __arg_0);
+
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "origin");
+
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "password");
+
+  password_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "password", __arg_0);
+
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "pathname");
+
+  pathname_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "pathname", __arg_0);
+
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "port");
+
+  port_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "port", __arg_0);
+
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "protocol");
+
+  protocol_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "protocol", __arg_0);
+
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "search");
+
+  search_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "search", __arg_0);
+
+  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtils */, "username");
+
+  username_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* URLUtils */, "username", __arg_0);
+
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* URLUtils */, "toString", []);
+
+}
+
+class BlinkURLUtilsReadOnly {
+  static final instance = new BlinkURLUtilsReadOnly();
+
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "hash");
+
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "host");
+
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "hostname");
+
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "href");
+
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "origin");
+
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "pathname");
+
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "port");
+
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "protocol");
+
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "search");
+
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* URLUtilsReadOnly */, "toString", []);
+
+}
+
+class BlinkUint16Array extends BlinkArrayBufferView {
+  static final instance = new BlinkUint16Array();
+
+}
+
+class BlinkUint32Array extends BlinkArrayBufferView {
+  static final instance = new BlinkUint32Array();
+
+}
+
+class BlinkUint8Array extends BlinkArrayBufferView {
+  static final instance = new BlinkUint8Array();
+
+}
+
+class BlinkUint8ClampedArray extends BlinkArrayBufferView {
+  static final instance = new BlinkUint8ClampedArray();
+
+}
+
+class BlinkVRDevice {
+  static final instance = new BlinkVRDevice();
+
+  deviceId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRDevice */, "deviceId");
+
+  deviceName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRDevice */, "deviceName");
+
+  hardwareUnitId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRDevice */, "hardwareUnitId");
+
+}
+
+class BlinkVREyeParameters {
+  static final instance = new BlinkVREyeParameters();
+
+  currentFieldOfView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VREyeParameters */, "currentFieldOfView");
+
+  eyeTranslation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VREyeParameters */, "eyeTranslation");
+
+  maximumFieldOfView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VREyeParameters */, "maximumFieldOfView");
+
+  minimumFieldOfView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VREyeParameters */, "minimumFieldOfView");
+
+  recommendedFieldOfView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VREyeParameters */, "recommendedFieldOfView");
+
+  renderRect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VREyeParameters */, "renderRect");
+
+}
+
+class BlinkVRFieldOfView {
+  static final instance = new BlinkVRFieldOfView();
+
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("VRFieldOfView");
+
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("VRFieldOfView", [__arg_0]);
+
+  downDegrees_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRFieldOfView */, "downDegrees");
+
+  downDegrees_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VRFieldOfView */, "downDegrees", __arg_0);
+
+  leftDegrees_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRFieldOfView */, "leftDegrees");
+
+  leftDegrees_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VRFieldOfView */, "leftDegrees", __arg_0);
+
+  rightDegrees_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRFieldOfView */, "rightDegrees");
+
+  rightDegrees_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VRFieldOfView */, "rightDegrees", __arg_0);
+
+  upDegrees_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRFieldOfView */, "upDegrees");
+
+  upDegrees_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VRFieldOfView */, "upDegrees", __arg_0);
+
+}
+
+class BlinkVRPositionState {
+  static final instance = new BlinkVRPositionState();
+
+  angularAcceleration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRPositionState */, "angularAcceleration");
+
+  angularVelocity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRPositionState */, "angularVelocity");
+
+  linearAcceleration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRPositionState */, "linearAcceleration");
+
+  linearVelocity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRPositionState */, "linearVelocity");
+
+  orientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRPositionState */, "orientation");
+
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRPositionState */, "position");
+
+  timeStamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VRPositionState */, "timeStamp");
 
 }
 
 class BlinkVTTCue extends BlinkTextTrackCue {
   static final instance = new BlinkVTTCue();
 
-  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "align");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("VTTCue", [__arg_0]);
 
-  align_Setter_(mthis, __arg_0) => mthis["align"] = __arg_0;
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("VTTCue", [__arg_0, __arg_1]);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "VTTCue"), [__arg_0]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callConstructor("VTTCue", [__arg_0, __arg_1, __arg_2]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "VTTCue"), [__arg_0, __arg_1]);
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTCue */, "align");
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "VTTCue"), [__arg_0, __arg_1, __arg_2]);
+  align_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTCue */, "align", __arg_0);
 
-  getCueAsHTML_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCueAsHTML", []);
+  line_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTCue */, "line");
 
-  line_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "line");
+  line_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTCue */, "line", __arg_0);
 
-  line_Setter_(mthis, __arg_0) => mthis["line"] = __arg_0;
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTCue */, "position");
 
-  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
+  position_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTCue */, "position", __arg_0);
 
-  position_Setter_(mthis, __arg_0) => mthis["position"] = __arg_0;
+  regionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTCue */, "regionId");
 
-  regionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "regionId");
+  regionId_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTCue */, "regionId", __arg_0);
 
-  regionId_Setter_(mthis, __arg_0) => mthis["regionId"] = __arg_0;
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTCue */, "size");
 
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
+  size_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTCue */, "size", __arg_0);
 
-  size_Setter_(mthis, __arg_0) => mthis["size"] = __arg_0;
+  snapToLines_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTCue */, "snapToLines");
 
-  snapToLines_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "snapToLines");
+  snapToLines_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTCue */, "snapToLines", __arg_0);
 
-  snapToLines_Setter_(mthis, __arg_0) => mthis["snapToLines"] = __arg_0;
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTCue */, "text");
 
-  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "text");
+  text_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTCue */, "text", __arg_0);
 
-  text_Setter_(mthis, __arg_0) => mthis["text"] = __arg_0;
+  vertical_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTCue */, "vertical");
 
-  vertical_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "vertical");
+  vertical_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTCue */, "vertical", __arg_0);
 
-  vertical_Setter_(mthis, __arg_0) => mthis["vertical"] = __arg_0;
+  getCueAsHTML_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* VTTCue */, "getCueAsHTML", []);
 
 }
 
 class BlinkVTTRegion {
   static final instance = new BlinkVTTRegion();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "VTTRegion"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("VTTRegion");
 
-  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "height");
 
-  height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
+  height_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTRegion */, "height", __arg_0);
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "id");
 
-  id_Setter_(mthis, __arg_0) => mthis["id"] = __arg_0;
+  id_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTRegion */, "id", __arg_0);
 
-  regionAnchorX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "regionAnchorX");
+  regionAnchorX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "regionAnchorX");
 
-  regionAnchorX_Setter_(mthis, __arg_0) => mthis["regionAnchorX"] = __arg_0;
+  regionAnchorX_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTRegion */, "regionAnchorX", __arg_0);
 
-  regionAnchorY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "regionAnchorY");
+  regionAnchorY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "regionAnchorY");
 
-  regionAnchorY_Setter_(mthis, __arg_0) => mthis["regionAnchorY"] = __arg_0;
+  regionAnchorY_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTRegion */, "regionAnchorY", __arg_0);
 
-  scroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scroll");
+  scroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "scroll");
 
-  scroll_Setter_(mthis, __arg_0) => mthis["scroll"] = __arg_0;
+  scroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTRegion */, "scroll", __arg_0);
 
-  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "track");
 
-  viewportAnchorX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewportAnchorX");
+  viewportAnchorX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "viewportAnchorX");
 
-  viewportAnchorX_Setter_(mthis, __arg_0) => mthis["viewportAnchorX"] = __arg_0;
+  viewportAnchorX_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTRegion */, "viewportAnchorX", __arg_0);
 
-  viewportAnchorY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewportAnchorY");
+  viewportAnchorY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "viewportAnchorY");
 
-  viewportAnchorY_Setter_(mthis, __arg_0) => mthis["viewportAnchorY"] = __arg_0;
+  viewportAnchorY_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTRegion */, "viewportAnchorY", __arg_0);
 
-  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegion */, "width");
 
-  width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
+  width_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VTTRegion */, "width", __arg_0);
 
 }
 
 class BlinkVTTRegionList {
   static final instance = new BlinkVTTRegionList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VTTRegionList */, "length");
 
-  getRegionById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRegionById", []);
+  getRegionById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* VTTRegionList */, "getRegionById", []);
 
-  getRegionById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRegionById", [__arg_0]);
+  getRegionById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* VTTRegionList */, "getRegionById", [__arg_0]);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* VTTRegionList */, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
-
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* VTTRegionList */, "item", [__arg_0]);
 
 }
 
 class BlinkValidityState {
   static final instance = new BlinkValidityState();
 
-  badInput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "badInput");
+  badInput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "badInput");
 
-  customError_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "customError");
+  customError_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "customError");
 
-  patternMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "patternMismatch");
+  patternMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "patternMismatch");
 
-  rangeOverflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeOverflow");
+  rangeOverflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "rangeOverflow");
 
-  rangeUnderflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeUnderflow");
+  rangeUnderflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "rangeUnderflow");
 
-  stepMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stepMismatch");
+  stepMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "stepMismatch");
 
-  tooLong_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tooLong");
+  tooLong_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "tooLong");
 
-  typeMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "typeMismatch");
+  tooShort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "tooShort");
 
-  valid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valid");
+  typeMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "typeMismatch");
 
-  valueMissing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueMissing");
+  valid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "valid");
+
+  valueMissing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* ValidityState */, "valueMissing");
 
 }
 
 class BlinkVideoPlaybackQuality {
   static final instance = new BlinkVideoPlaybackQuality();
 
-  corruptedVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "corruptedVideoFrames");
+  corruptedVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoPlaybackQuality */, "corruptedVideoFrames");
 
-  creationTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "creationTime");
+  creationTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoPlaybackQuality */, "creationTime");
 
-  droppedVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "droppedVideoFrames");
+  droppedVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoPlaybackQuality */, "droppedVideoFrames");
 
-  totalVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "totalVideoFrames");
+  totalVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoPlaybackQuality */, "totalVideoFrames");
 
 }
 
 class BlinkVideoTrack {
   static final instance = new BlinkVideoTrack();
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrack */, "id");
 
-  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrack */, "kind");
 
-  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrack */, "label");
 
-  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "language");
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrack */, "language");
 
-  selected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selected");
+  selected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrack */, "selected");
 
-  selected_Setter_(mthis, __arg_0) => mthis["selected"] = __arg_0;
+  selected_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VideoTrack */, "selected", __arg_0);
 
 }
 
 class BlinkVideoTrackList extends BlinkEventTarget {
   static final instance = new BlinkVideoTrackList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrackList */, "length");
 
-  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", []);
+  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrackList */, "onaddtrack");
 
-  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", [__arg_0]);
+  onaddtrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VideoTrackList */, "onaddtrack", __arg_0);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrackList */, "onchange");
 
-  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddtrack");
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VideoTrackList */, "onchange", __arg_0);
 
-  onaddtrack_Setter_(mthis, __arg_0) => mthis["onaddtrack"] = __arg_0;
+  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrackList */, "onremovetrack");
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  onremovetrack_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* VideoTrackList */, "onremovetrack", __arg_0);
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  selectedIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* VideoTrackList */, "selectedIndex");
 
-  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovetrack");
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* VideoTrackList */, "__getter__", [__arg_0]);
 
-  onremovetrack_Setter_(mthis, __arg_0) => mthis["onremovetrack"] = __arg_0;
+  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* VideoTrackList */, "getTrackById", []);
 
-  selectedIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectedIndex");
+  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* VideoTrackList */, "getTrackById", [__arg_0]);
+
+}
+
+class BlinkVoidCallback {
+  static final instance = new BlinkVoidCallback();
+
+  handleEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* VoidCallback */, "handleEvent", []);
 
 }
 
 class BlinkWaveShaperNode extends BlinkAudioNode {
   static final instance = new BlinkWaveShaperNode();
 
-  curve_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "curve");
+  curve_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WaveShaperNode */, "curve");
 
-  curve_Setter_(mthis, __arg_0) => mthis["curve"] = __arg_0;
+  curve_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WaveShaperNode */, "curve", __arg_0);
 
-  oversample_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oversample");
+  oversample_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WaveShaperNode */, "oversample");
 
-  oversample_Setter_(mthis, __arg_0) => mthis["oversample"] = __arg_0;
+  oversample_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WaveShaperNode */, "oversample", __arg_0);
+
+}
+
+class BlinkWebGL2RenderingContext {
+  static final instance = new BlinkWebGL2RenderingContext();
+
+  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "canvas");
+
+  drawingBufferHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "drawingBufferHeight");
+
+  drawingBufferWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "drawingBufferWidth");
+
+  activeTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "activeTexture", []);
+
+  activeTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "activeTexture", [__arg_0]);
+
+  attachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", []);
+
+  attachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", [__arg_0]);
+
+  attachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", [__arg_0, __arg_1]);
+
+  bindAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0]);
+
+  bindAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0, __arg_1]);
+
+  bindAttribLocation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0, __arg_1, __arg_2]);
+
+  bindBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", []);
+
+  bindBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", [__arg_0]);
+
+  bindBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", [__arg_0, __arg_1]);
+
+  bindFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", []);
+
+  bindFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", [__arg_0]);
+
+  bindFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", [__arg_0, __arg_1]);
+
+  bindRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", []);
+
+  bindRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", [__arg_0]);
+
+  bindRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", [__arg_0, __arg_1]);
+
+  bindTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", []);
+
+  bindTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", [__arg_0]);
+
+  bindTexture_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", [__arg_0, __arg_1]);
+
+  blendColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1]);
+
+  blendColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1, __arg_2]);
+
+  blendColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  blendEquation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquation", []);
+
+  blendEquation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquation", [__arg_0]);
+
+  blendEquationSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", []);
+
+  blendEquationSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", [__arg_0]);
+
+  blendEquationSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", [__arg_0, __arg_1]);
+
+  blendFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", []);
+
+  blendFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", [__arg_0]);
+
+  blendFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", [__arg_0, __arg_1]);
+
+  blendFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1]);
+
+  blendFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  blendFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  bufferData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0]);
+
+  bufferData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0, __arg_1]);
+
+  bufferData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0, __arg_1, __arg_2]);
+
+  bufferSubData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0]);
+
+  bufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0, __arg_1]);
+
+  bufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0, __arg_1, __arg_2]);
+
+  checkFramebufferStatus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "checkFramebufferStatus", []);
+
+  checkFramebufferStatus_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "checkFramebufferStatus", [__arg_0]);
+
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clear", []);
+
+  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clear", [__arg_0]);
+
+  clearColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1]);
+
+  clearColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1, __arg_2]);
+
+  clearColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  clearDepth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearDepth", []);
+
+  clearDepth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearDepth", [__arg_0]);
+
+  clearStencil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearStencil", []);
+
+  clearStencil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearStencil", [__arg_0]);
+
+  colorMask_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1]);
+
+  colorMask_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1, __arg_2]);
+
+  colorMask_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  compileShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compileShader", []);
+
+  compileShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compileShader", [__arg_0]);
+
+  compressedTexImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  compressedTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  compressedTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  compressedTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  compressedTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  compressedTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  copyTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  copyTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  copyTexImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  copyTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  copyTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  copyTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  createBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createBuffer", []);
+
+  createFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createFramebuffer", []);
+
+  createProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createProgram", []);
+
+  createRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createRenderbuffer", []);
+
+  createShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createShader", []);
+
+  createShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createShader", [__arg_0]);
+
+  createTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createTexture", []);
+
+  cullFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "cullFace", []);
+
+  cullFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "cullFace", [__arg_0]);
+
+  deleteBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteBuffer", []);
+
+  deleteBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteBuffer", [__arg_0]);
+
+  deleteFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteFramebuffer", []);
+
+  deleteFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteFramebuffer", [__arg_0]);
+
+  deleteProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteProgram", []);
+
+  deleteProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteProgram", [__arg_0]);
+
+  deleteRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteRenderbuffer", []);
+
+  deleteRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteRenderbuffer", [__arg_0]);
+
+  deleteShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteShader", []);
+
+  deleteShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteShader", [__arg_0]);
+
+  deleteTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteTexture", []);
+
+  deleteTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteTexture", [__arg_0]);
+
+  depthFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthFunc", []);
+
+  depthFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthFunc", [__arg_0]);
+
+  depthMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthMask", []);
+
+  depthMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthMask", [__arg_0]);
+
+  depthRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", []);
+
+  depthRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", [__arg_0]);
+
+  depthRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", [__arg_0, __arg_1]);
+
+  detachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", []);
+
+  detachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", [__arg_0]);
+
+  detachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", [__arg_0, __arg_1]);
+
+  disable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disable", []);
+
+  disable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disable", [__arg_0]);
+
+  disableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disableVertexAttribArray", []);
+
+  disableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disableVertexAttribArray", [__arg_0]);
+
+  drawArrays_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0]);
+
+  drawArrays_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0, __arg_1]);
+
+  drawArrays_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0, __arg_1, __arg_2]);
+
+  drawElements_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1]);
+
+  drawElements_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1, __arg_2]);
+
+  drawElements_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  enable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enable", []);
+
+  enable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enable", [__arg_0]);
+
+  enableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enableVertexAttribArray", []);
+
+  enableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enableVertexAttribArray", [__arg_0]);
+
+  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "finish", []);
+
+  flush_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "flush", []);
+
+  framebufferRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1]);
+
+  framebufferRenderbuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2]);
+
+  framebufferRenderbuffer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  framebufferTexture2D_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2]);
+
+  framebufferTexture2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  framebufferTexture2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  frontFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "frontFace", []);
+
+  frontFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "frontFace", [__arg_0]);
+
+  generateMipmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "generateMipmap", []);
+
+  generateMipmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "generateMipmap", [__arg_0]);
+
+  getActiveAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", []);
+
+  getActiveAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", [__arg_0]);
+
+  getActiveAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", [__arg_0, __arg_1]);
+
+  getActiveUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", []);
+
+  getActiveUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", [__arg_0]);
+
+  getActiveUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", [__arg_0, __arg_1]);
+
+  getAttachedShaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttachedShaders", []);
+
+  getAttachedShaders_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttachedShaders", [__arg_0]);
+
+  getAttribLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", []);
+
+  getAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", [__arg_0]);
+
+  getAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", [__arg_0, __arg_1]);
+
+  getBufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", []);
+
+  getBufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", [__arg_0]);
+
+  getBufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", [__arg_0, __arg_1]);
+
+  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getContextAttributes", []);
+
+  getError_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getError", []);
+
+  getExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getExtension", []);
+
+  getExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getExtension", [__arg_0]);
+
+  getFramebufferAttachmentParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0]);
+
+  getFramebufferAttachmentParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0, __arg_1]);
+
+  getFramebufferAttachmentParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0, __arg_1, __arg_2]);
+
+  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getParameter", []);
+
+  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getParameter", [__arg_0]);
+
+  getProgramInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramInfoLog", []);
+
+  getProgramInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramInfoLog", [__arg_0]);
+
+  getProgramParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", []);
+
+  getProgramParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", [__arg_0]);
+
+  getProgramParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", [__arg_0, __arg_1]);
+
+  getRenderbufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", []);
+
+  getRenderbufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", [__arg_0]);
+
+  getRenderbufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", [__arg_0, __arg_1]);
+
+  getShaderInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderInfoLog", []);
+
+  getShaderInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderInfoLog", [__arg_0]);
+
+  getShaderParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", []);
+
+  getShaderParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", [__arg_0]);
+
+  getShaderParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", [__arg_0, __arg_1]);
+
+  getShaderPrecisionFormat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", []);
+
+  getShaderPrecisionFormat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", [__arg_0]);
+
+  getShaderPrecisionFormat_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", [__arg_0, __arg_1]);
+
+  getShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderSource", []);
+
+  getShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderSource", [__arg_0]);
+
+  getSupportedExtensions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getSupportedExtensions", []);
+
+  getTexParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", []);
+
+  getTexParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", [__arg_0]);
+
+  getTexParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", [__arg_0, __arg_1]);
+
+  getUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", []);
+
+  getUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", [__arg_0]);
+
+  getUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", [__arg_0, __arg_1]);
+
+  getUniformLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", []);
+
+  getUniformLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", [__arg_0]);
+
+  getUniformLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", [__arg_0, __arg_1]);
+
+  getVertexAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", []);
+
+  getVertexAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", [__arg_0]);
+
+  getVertexAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", [__arg_0, __arg_1]);
+
+  getVertexAttribOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", []);
+
+  getVertexAttribOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", [__arg_0]);
+
+  getVertexAttribOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", [__arg_0, __arg_1]);
+
+  hint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", []);
+
+  hint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", [__arg_0]);
+
+  hint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", [__arg_0, __arg_1]);
+
+  isBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isBuffer", []);
+
+  isBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isBuffer", [__arg_0]);
+
+  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isContextLost", []);
+
+  isEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isEnabled", []);
+
+  isEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isEnabled", [__arg_0]);
+
+  isFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isFramebuffer", []);
+
+  isFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isFramebuffer", [__arg_0]);
+
+  isProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isProgram", []);
+
+  isProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isProgram", [__arg_0]);
+
+  isRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isRenderbuffer", []);
+
+  isRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isRenderbuffer", [__arg_0]);
+
+  isShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isShader", []);
+
+  isShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isShader", [__arg_0]);
+
+  isTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isTexture", []);
+
+  isTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isTexture", [__arg_0]);
+
+  lineWidth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "lineWidth", []);
+
+  lineWidth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "lineWidth", [__arg_0]);
+
+  linkProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "linkProgram", []);
+
+  linkProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "linkProgram", [__arg_0]);
+
+  pixelStorei_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", []);
+
+  pixelStorei_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", [__arg_0]);
+
+  pixelStorei_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", [__arg_0, __arg_1]);
+
+  polygonOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", []);
+
+  polygonOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", [__arg_0]);
+
+  polygonOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", [__arg_0, __arg_1]);
+
+  readPixels_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  readPixels_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  readPixels_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  renderbufferStorage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1]);
+
+  renderbufferStorage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1, __arg_2]);
+
+  renderbufferStorage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  sampleCoverage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", []);
+
+  sampleCoverage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", [__arg_0]);
+
+  sampleCoverage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", [__arg_0, __arg_1]);
+
+  scissor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1]);
+
+  scissor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1, __arg_2]);
+
+  scissor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  shaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", []);
+
+  shaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", [__arg_0]);
+
+  shaderSource_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", [__arg_0, __arg_1]);
+
+  stencilFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0]);
+
+  stencilFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0, __arg_1]);
+
+  stencilFunc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0, __arg_1, __arg_2]);
+
+  stencilFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1]);
+
+  stencilFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  stencilFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  stencilMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMask", []);
+
+  stencilMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMask", [__arg_0]);
+
+  stencilMaskSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", []);
+
+  stencilMaskSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", [__arg_0]);
+
+  stencilMaskSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", [__arg_0, __arg_1]);
+
+  stencilOp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0]);
+
+  stencilOp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0, __arg_1]);
+
+  stencilOp_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0, __arg_1, __arg_2]);
+
+  stencilOpSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1]);
+
+  stencilOpSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  stencilOpSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texImage2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  texImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  texParameterf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0]);
+
+  texParameterf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0, __arg_1]);
+
+  texParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0, __arg_1, __arg_2]);
+
+  texParameteri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0]);
+
+  texParameteri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0, __arg_1]);
+
+  texParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0, __arg_1, __arg_2]);
+
+  texSubImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  texSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texSubImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  uniform1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", []);
+
+  uniform1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", [__arg_0]);
+
+  uniform1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", [__arg_0, __arg_1]);
+
+  uniform1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", []);
+
+  uniform1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", [__arg_0]);
+
+  uniform1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", [__arg_0, __arg_1]);
+
+  uniform1i_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", []);
+
+  uniform1i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", [__arg_0]);
+
+  uniform1i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", [__arg_0, __arg_1]);
+
+  uniform1iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", []);
+
+  uniform1iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", [__arg_0]);
+
+  uniform1iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", [__arg_0, __arg_1]);
+
+  uniform2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0]);
+
+  uniform2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0, __arg_1]);
+
+  uniform2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", []);
+
+  uniform2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", [__arg_0]);
+
+  uniform2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", [__arg_0, __arg_1]);
+
+  uniform2i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0]);
+
+  uniform2i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0, __arg_1]);
+
+  uniform2i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform2iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", []);
+
+  uniform2iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", [__arg_0]);
+
+  uniform2iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", [__arg_0, __arg_1]);
+
+  uniform3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1]);
+
+  uniform3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", []);
+
+  uniform3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", [__arg_0]);
+
+  uniform3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", [__arg_0, __arg_1]);
+
+  uniform3i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1]);
+
+  uniform3i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform3i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform3iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", []);
+
+  uniform3iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", [__arg_0]);
+
+  uniform3iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", [__arg_0, __arg_1]);
+
+  uniform4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  uniform4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", []);
+
+  uniform4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", [__arg_0]);
+
+  uniform4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", [__arg_0, __arg_1]);
+
+  uniform4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform4i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform4i_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  uniform4iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", []);
+
+  uniform4iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", [__arg_0]);
+
+  uniform4iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", [__arg_0, __arg_1]);
+
+  uniformMatrix2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0]);
+
+  uniformMatrix2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0, __arg_1]);
+
+  uniformMatrix2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0]);
+
+  uniformMatrix3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0, __arg_1]);
+
+  uniformMatrix3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0]);
+
+  uniformMatrix4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0, __arg_1]);
+
+  uniformMatrix4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0, __arg_1, __arg_2]);
+
+  useProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "useProgram", []);
+
+  useProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "useProgram", [__arg_0]);
+
+  validateProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "validateProgram", []);
+
+  validateProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "validateProgram", [__arg_0]);
+
+  vertexAttrib1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", []);
+
+  vertexAttrib1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", [__arg_0]);
+
+  vertexAttrib1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", [__arg_0, __arg_1]);
+
+  vertexAttrib1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", []);
+
+  vertexAttrib1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", [__arg_0]);
+
+  vertexAttrib1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", [__arg_0, __arg_1]);
+
+  vertexAttrib2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0]);
+
+  vertexAttrib2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0, __arg_1]);
+
+  vertexAttrib2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", []);
+
+  vertexAttrib2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", [__arg_0]);
+
+  vertexAttrib2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", [__arg_0, __arg_1]);
+
+  vertexAttrib3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1]);
+
+  vertexAttrib3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttrib3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", []);
+
+  vertexAttrib3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", [__arg_0]);
+
+  vertexAttrib3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", [__arg_0, __arg_1]);
+
+  vertexAttrib4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttrib4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttrib4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", []);
+
+  vertexAttrib4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", [__arg_0]);
+
+  vertexAttrib4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", [__arg_0, __arg_1]);
+
+  vertexAttribPointer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribPointer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttribPointer_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  viewport_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1]);
+
+  viewport_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1, __arg_2]);
+
+  viewport_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  beginQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginQuery", []);
+
+  beginQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginQuery", [__arg_0]);
+
+  beginQuery_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginQuery", [__arg_0, __arg_1]);
+
+  beginTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginTransformFeedback", []);
+
+  beginTransformFeedback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginTransformFeedback", [__arg_0]);
+
+  bindBufferBase_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferBase", [__arg_0]);
+
+  bindBufferBase_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferBase", [__arg_0, __arg_1]);
+
+  bindBufferBase_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferBase", [__arg_0, __arg_1, __arg_2]);
+
+  bindBufferRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferRange", [__arg_0, __arg_1, __arg_2]);
+
+  bindBufferRange_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferRange", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  bindBufferRange_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferRange", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  bindSampler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindSampler", []);
+
+  bindSampler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindSampler", [__arg_0]);
+
+  bindSampler_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindSampler", [__arg_0, __arg_1]);
+
+  bindTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindTransformFeedback", []);
+
+  bindTransformFeedback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindTransformFeedback", [__arg_0]);
+
+  bindTransformFeedback_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindTransformFeedback", [__arg_0, __arg_1]);
+
+  bindVertexArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindVertexArray", []);
+
+  bindVertexArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindVertexArray", [__arg_0]);
+
+  blitFramebuffer_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "blitFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  blitFramebuffer_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "blitFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  blitFramebuffer_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "blitFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  clearBufferfi_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfi", [__arg_0, __arg_1]);
+
+  clearBufferfi_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfi", [__arg_0, __arg_1, __arg_2]);
+
+  clearBufferfi_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfi", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  clearBufferfv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfv", [__arg_0]);
+
+  clearBufferfv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfv", [__arg_0, __arg_1]);
+
+  clearBufferfv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfv", [__arg_0, __arg_1, __arg_2]);
+
+  clearBufferiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferiv", [__arg_0]);
+
+  clearBufferiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferiv", [__arg_0, __arg_1]);
+
+  clearBufferiv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferiv", [__arg_0, __arg_1, __arg_2]);
+
+  clearBufferuiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferuiv", [__arg_0]);
+
+  clearBufferuiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferuiv", [__arg_0, __arg_1]);
+
+  clearBufferuiv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferuiv", [__arg_0, __arg_1, __arg_2]);
+
+  clientWaitSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clientWaitSync", [__arg_0]);
+
+  clientWaitSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clientWaitSync", [__arg_0, __arg_1]);
+
+  clientWaitSync_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clientWaitSync", [__arg_0, __arg_1, __arg_2]);
+
+  compressedTexImage3D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  compressedTexImage3D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  compressedTexImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  compressedTexSubImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  compressedTexSubImage3D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  compressedTexSubImage3D_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  copyBufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyBufferSubData", [__arg_0, __arg_1, __arg_2]);
+
+  copyBufferSubData_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyBufferSubData", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  copyBufferSubData_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyBufferSubData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  copyTexSubImage3D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  copyTexSubImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  copyTexSubImage3D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  createQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "createQuery", []);
+
+  createSampler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "createSampler", []);
+
+  createTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "createTransformFeedback", []);
+
+  createVertexArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "createVertexArray", []);
+
+  deleteQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteQuery", []);
+
+  deleteQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteQuery", [__arg_0]);
+
+  deleteSampler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteSampler", []);
+
+  deleteSampler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteSampler", [__arg_0]);
+
+  deleteSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteSync", []);
+
+  deleteSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteSync", [__arg_0]);
+
+  deleteTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteTransformFeedback", []);
+
+  deleteTransformFeedback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteTransformFeedback", [__arg_0]);
+
+  deleteVertexArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteVertexArray", []);
+
+  deleteVertexArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteVertexArray", [__arg_0]);
+
+  drawArraysInstanced_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawArraysInstanced", [__arg_0, __arg_1]);
+
+  drawArraysInstanced_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawArraysInstanced", [__arg_0, __arg_1, __arg_2]);
+
+  drawArraysInstanced_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawArraysInstanced", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  drawBuffers_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawBuffers", []);
+
+  drawBuffers_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawBuffers", [__arg_0]);
+
+  drawElementsInstanced_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawElementsInstanced", [__arg_0, __arg_1, __arg_2]);
+
+  drawElementsInstanced_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawElementsInstanced", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  drawElementsInstanced_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawElementsInstanced", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  drawRangeElements_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawRangeElements", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  drawRangeElements_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawRangeElements", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  drawRangeElements_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawRangeElements", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  endQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "endQuery", []);
+
+  endQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "endQuery", [__arg_0]);
+
+  endTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "endTransformFeedback", []);
+
+  fenceSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "fenceSync", []);
+
+  fenceSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "fenceSync", [__arg_0]);
+
+  fenceSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "fenceSync", [__arg_0, __arg_1]);
+
+  framebufferTextureLayer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "framebufferTextureLayer", [__arg_0, __arg_1, __arg_2]);
+
+  framebufferTextureLayer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "framebufferTextureLayer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  framebufferTextureLayer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "framebufferTextureLayer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  getActiveUniformBlockName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockName", []);
+
+  getActiveUniformBlockName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockName", [__arg_0]);
+
+  getActiveUniformBlockName_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockName", [__arg_0, __arg_1]);
+
+  getActiveUniformBlockParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockParameter", [__arg_0]);
+
+  getActiveUniformBlockParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockParameter", [__arg_0, __arg_1]);
+
+  getActiveUniformBlockParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockParameter", [__arg_0, __arg_1, __arg_2]);
+
+  getActiveUniforms_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniforms", [__arg_0]);
+
+  getActiveUniforms_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniforms", [__arg_0, __arg_1]);
+
+  getActiveUniforms_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniforms", [__arg_0, __arg_1, __arg_2]);
+
+  getBufferSubData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getBufferSubData", [__arg_0]);
+
+  getBufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getBufferSubData", [__arg_0, __arg_1]);
+
+  getBufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getBufferSubData", [__arg_0, __arg_1, __arg_2]);
+
+  getFragDataLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getFragDataLocation", []);
+
+  getFragDataLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getFragDataLocation", [__arg_0]);
+
+  getFragDataLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getFragDataLocation", [__arg_0, __arg_1]);
+
+  getIndexedParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getIndexedParameter", []);
+
+  getIndexedParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getIndexedParameter", [__arg_0]);
+
+  getIndexedParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getIndexedParameter", [__arg_0, __arg_1]);
+
+  getInternalformatParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getInternalformatParameter", [__arg_0]);
+
+  getInternalformatParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getInternalformatParameter", [__arg_0, __arg_1]);
+
+  getInternalformatParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getInternalformatParameter", [__arg_0, __arg_1, __arg_2]);
+
+  getQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQuery", []);
+
+  getQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQuery", [__arg_0]);
+
+  getQuery_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQuery", [__arg_0, __arg_1]);
+
+  getQueryParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQueryParameter", []);
+
+  getQueryParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQueryParameter", [__arg_0]);
+
+  getQueryParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQueryParameter", [__arg_0, __arg_1]);
+
+  getSamplerParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSamplerParameter", []);
+
+  getSamplerParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSamplerParameter", [__arg_0]);
+
+  getSamplerParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSamplerParameter", [__arg_0, __arg_1]);
+
+  getSyncParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSyncParameter", []);
+
+  getSyncParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSyncParameter", [__arg_0]);
+
+  getSyncParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSyncParameter", [__arg_0, __arg_1]);
+
+  getTransformFeedbackVarying_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getTransformFeedbackVarying", []);
+
+  getTransformFeedbackVarying_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getTransformFeedbackVarying", [__arg_0]);
+
+  getTransformFeedbackVarying_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getTransformFeedbackVarying", [__arg_0, __arg_1]);
+
+  getUniformBlockIndex_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformBlockIndex", []);
+
+  getUniformBlockIndex_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformBlockIndex", [__arg_0]);
+
+  getUniformBlockIndex_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformBlockIndex", [__arg_0, __arg_1]);
+
+  getUniformIndices_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformIndices", []);
+
+  getUniformIndices_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformIndices", [__arg_0]);
+
+  getUniformIndices_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformIndices", [__arg_0, __arg_1]);
+
+  invalidateFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateFramebuffer", []);
+
+  invalidateFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateFramebuffer", [__arg_0]);
+
+  invalidateFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateFramebuffer", [__arg_0, __arg_1]);
+
+  invalidateSubFramebuffer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateSubFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  invalidateSubFramebuffer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateSubFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  invalidateSubFramebuffer_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateSubFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  isQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isQuery", []);
+
+  isQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isQuery", [__arg_0]);
+
+  isSampler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isSampler", []);
+
+  isSampler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isSampler", [__arg_0]);
+
+  isSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isSync", []);
+
+  isSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isSync", [__arg_0]);
+
+  isTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isTransformFeedback", []);
+
+  isTransformFeedback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isTransformFeedback", [__arg_0]);
+
+  isVertexArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isVertexArray", []);
+
+  isVertexArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isVertexArray", [__arg_0]);
+
+  pauseTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "pauseTransformFeedback", []);
+
+  readBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "readBuffer", []);
+
+  readBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "readBuffer", [__arg_0]);
+
+  renderbufferStorageMultisample_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "renderbufferStorageMultisample", [__arg_0, __arg_1, __arg_2]);
+
+  renderbufferStorageMultisample_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "renderbufferStorageMultisample", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  renderbufferStorageMultisample_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "renderbufferStorageMultisample", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  resumeTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "resumeTransformFeedback", []);
+
+  samplerParameterf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameterf", [__arg_0]);
+
+  samplerParameterf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameterf", [__arg_0, __arg_1]);
+
+  samplerParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameterf", [__arg_0, __arg_1, __arg_2]);
+
+  samplerParameteri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameteri", [__arg_0]);
+
+  samplerParameteri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameteri", [__arg_0, __arg_1]);
+
+  samplerParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameteri", [__arg_0, __arg_1, __arg_2]);
+
+  texImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texImage3D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  texImage3D_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  texStorage2D_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage2D", [__arg_0, __arg_1, __arg_2]);
+
+  texStorage2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texStorage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texStorage3D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage3D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texStorage3D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texStorage3D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texSubImage3D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texSubImage3D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  texSubImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texSubImage3D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  texSubImage3D_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  texSubImage3D_Callback_11_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
+
+  transformFeedbackVaryings_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "transformFeedbackVaryings", [__arg_0]);
+
+  transformFeedbackVaryings_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "transformFeedbackVaryings", [__arg_0, __arg_1]);
+
+  transformFeedbackVaryings_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "transformFeedbackVaryings", [__arg_0, __arg_1, __arg_2]);
+
+  uniform1ui_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1ui", []);
+
+  uniform1ui_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1ui", [__arg_0]);
+
+  uniform1ui_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1ui", [__arg_0, __arg_1]);
+
+  uniform1uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1uiv", []);
+
+  uniform1uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1uiv", [__arg_0]);
+
+  uniform1uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1uiv", [__arg_0, __arg_1]);
+
+  uniform2ui_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2ui", [__arg_0]);
+
+  uniform2ui_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2ui", [__arg_0, __arg_1]);
+
+  uniform2ui_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2ui", [__arg_0, __arg_1, __arg_2]);
+
+  uniform2uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2uiv", []);
+
+  uniform2uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2uiv", [__arg_0]);
+
+  uniform2uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2uiv", [__arg_0, __arg_1]);
+
+  uniform3ui_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3ui", [__arg_0, __arg_1]);
+
+  uniform3ui_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3ui", [__arg_0, __arg_1, __arg_2]);
+
+  uniform3ui_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3ui", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform3uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3uiv", []);
+
+  uniform3uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3uiv", [__arg_0]);
+
+  uniform3uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3uiv", [__arg_0, __arg_1]);
+
+  uniform4ui_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4ui", [__arg_0, __arg_1, __arg_2]);
+
+  uniform4ui_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4ui", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform4ui_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4ui", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  uniform4uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4uiv", []);
+
+  uniform4uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4uiv", [__arg_0]);
+
+  uniform4uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4uiv", [__arg_0, __arg_1]);
+
+  uniformBlockBinding_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformBlockBinding", [__arg_0]);
+
+  uniformBlockBinding_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformBlockBinding", [__arg_0, __arg_1]);
+
+  uniformBlockBinding_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformBlockBinding", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix2x3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x3fv", [__arg_0]);
+
+  uniformMatrix2x3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x3fv", [__arg_0, __arg_1]);
+
+  uniformMatrix2x3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x3fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix2x4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x4fv", [__arg_0]);
+
+  uniformMatrix2x4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x4fv", [__arg_0, __arg_1]);
+
+  uniformMatrix2x4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x4fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix3x2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x2fv", [__arg_0]);
+
+  uniformMatrix3x2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x2fv", [__arg_0, __arg_1]);
+
+  uniformMatrix3x2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x2fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix3x4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x4fv", [__arg_0]);
+
+  uniformMatrix3x4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x4fv", [__arg_0, __arg_1]);
+
+  uniformMatrix3x4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x4fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix4x2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x2fv", [__arg_0]);
+
+  uniformMatrix4x2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x2fv", [__arg_0, __arg_1]);
+
+  uniformMatrix4x2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x2fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix4x3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x3fv", [__arg_0]);
+
+  uniformMatrix4x3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x3fv", [__arg_0, __arg_1]);
+
+  uniformMatrix4x3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x3fv", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttribDivisor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribDivisor", []);
+
+  vertexAttribDivisor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribDivisor", [__arg_0]);
+
+  vertexAttribDivisor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribDivisor", [__arg_0, __arg_1]);
+
+  vertexAttribI4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4i", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttribI4i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribI4i_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4i", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttribI4iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4iv", []);
+
+  vertexAttribI4iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4iv", [__arg_0]);
+
+  vertexAttribI4iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4iv", [__arg_0, __arg_1]);
+
+  vertexAttribI4ui_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4ui", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttribI4ui_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4ui", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribI4ui_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4ui", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttribI4uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4uiv", []);
+
+  vertexAttribI4uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4uiv", [__arg_0]);
+
+  vertexAttribI4uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4uiv", [__arg_0, __arg_1]);
+
+  vertexAttribIPointer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribIPointer", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttribIPointer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribIPointer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribIPointer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribIPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  waitSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "waitSync", [__arg_0]);
+
+  waitSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "waitSync", [__arg_0, __arg_1]);
+
+  waitSync_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "waitSync", [__arg_0, __arg_1, __arg_2]);
+
+}
+
+class BlinkWebGL2RenderingContextBase {
+  static final instance = new BlinkWebGL2RenderingContextBase();
+
+  beginQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginQuery", []);
+
+  beginQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginQuery", [__arg_0]);
+
+  beginQuery_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginQuery", [__arg_0, __arg_1]);
+
+  beginTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginTransformFeedback", []);
+
+  beginTransformFeedback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "beginTransformFeedback", [__arg_0]);
+
+  bindBufferBase_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferBase", [__arg_0]);
+
+  bindBufferBase_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferBase", [__arg_0, __arg_1]);
+
+  bindBufferBase_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferBase", [__arg_0, __arg_1, __arg_2]);
+
+  bindBufferRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferRange", [__arg_0, __arg_1, __arg_2]);
+
+  bindBufferRange_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferRange", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  bindBufferRange_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindBufferRange", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  bindSampler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindSampler", []);
+
+  bindSampler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindSampler", [__arg_0]);
+
+  bindSampler_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindSampler", [__arg_0, __arg_1]);
+
+  bindTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindTransformFeedback", []);
+
+  bindTransformFeedback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindTransformFeedback", [__arg_0]);
+
+  bindTransformFeedback_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindTransformFeedback", [__arg_0, __arg_1]);
+
+  bindVertexArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindVertexArray", []);
+
+  bindVertexArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "bindVertexArray", [__arg_0]);
+
+  blitFramebuffer_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "blitFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  blitFramebuffer_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "blitFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  blitFramebuffer_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "blitFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  clearBufferfi_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfi", [__arg_0, __arg_1]);
+
+  clearBufferfi_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfi", [__arg_0, __arg_1, __arg_2]);
+
+  clearBufferfi_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfi", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  clearBufferfv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfv", [__arg_0]);
+
+  clearBufferfv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfv", [__arg_0, __arg_1]);
+
+  clearBufferfv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferfv", [__arg_0, __arg_1, __arg_2]);
+
+  clearBufferiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferiv", [__arg_0]);
+
+  clearBufferiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferiv", [__arg_0, __arg_1]);
+
+  clearBufferiv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferiv", [__arg_0, __arg_1, __arg_2]);
+
+  clearBufferuiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferuiv", [__arg_0]);
+
+  clearBufferuiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferuiv", [__arg_0, __arg_1]);
+
+  clearBufferuiv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clearBufferuiv", [__arg_0, __arg_1, __arg_2]);
+
+  clientWaitSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clientWaitSync", [__arg_0]);
+
+  clientWaitSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clientWaitSync", [__arg_0, __arg_1]);
+
+  clientWaitSync_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "clientWaitSync", [__arg_0, __arg_1, __arg_2]);
+
+  compressedTexImage3D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  compressedTexImage3D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  compressedTexImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  compressedTexSubImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  compressedTexSubImage3D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  compressedTexSubImage3D_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "compressedTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  copyBufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyBufferSubData", [__arg_0, __arg_1, __arg_2]);
+
+  copyBufferSubData_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyBufferSubData", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  copyBufferSubData_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyBufferSubData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  copyTexSubImage3D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  copyTexSubImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  copyTexSubImage3D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "copyTexSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  createQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "createQuery", []);
+
+  createSampler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "createSampler", []);
+
+  createTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "createTransformFeedback", []);
+
+  createVertexArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "createVertexArray", []);
+
+  deleteQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteQuery", []);
+
+  deleteQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteQuery", [__arg_0]);
+
+  deleteSampler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteSampler", []);
+
+  deleteSampler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteSampler", [__arg_0]);
+
+  deleteSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteSync", []);
+
+  deleteSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteSync", [__arg_0]);
+
+  deleteTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteTransformFeedback", []);
+
+  deleteTransformFeedback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteTransformFeedback", [__arg_0]);
+
+  deleteVertexArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteVertexArray", []);
+
+  deleteVertexArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "deleteVertexArray", [__arg_0]);
+
+  drawArraysInstanced_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawArraysInstanced", [__arg_0, __arg_1]);
+
+  drawArraysInstanced_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawArraysInstanced", [__arg_0, __arg_1, __arg_2]);
+
+  drawArraysInstanced_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawArraysInstanced", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  drawBuffers_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawBuffers", []);
+
+  drawBuffers_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawBuffers", [__arg_0]);
+
+  drawElementsInstanced_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawElementsInstanced", [__arg_0, __arg_1, __arg_2]);
+
+  drawElementsInstanced_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawElementsInstanced", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  drawElementsInstanced_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawElementsInstanced", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  drawRangeElements_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawRangeElements", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  drawRangeElements_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawRangeElements", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  drawRangeElements_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "drawRangeElements", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  endQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "endQuery", []);
+
+  endQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "endQuery", [__arg_0]);
+
+  endTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "endTransformFeedback", []);
+
+  fenceSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "fenceSync", []);
+
+  fenceSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "fenceSync", [__arg_0]);
+
+  fenceSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "fenceSync", [__arg_0, __arg_1]);
+
+  framebufferTextureLayer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "framebufferTextureLayer", [__arg_0, __arg_1, __arg_2]);
+
+  framebufferTextureLayer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "framebufferTextureLayer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  framebufferTextureLayer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "framebufferTextureLayer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  getActiveUniformBlockName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockName", []);
+
+  getActiveUniformBlockName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockName", [__arg_0]);
+
+  getActiveUniformBlockName_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockName", [__arg_0, __arg_1]);
+
+  getActiveUniformBlockParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockParameter", [__arg_0]);
+
+  getActiveUniformBlockParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockParameter", [__arg_0, __arg_1]);
+
+  getActiveUniformBlockParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniformBlockParameter", [__arg_0, __arg_1, __arg_2]);
+
+  getActiveUniforms_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniforms", [__arg_0]);
+
+  getActiveUniforms_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniforms", [__arg_0, __arg_1]);
+
+  getActiveUniforms_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getActiveUniforms", [__arg_0, __arg_1, __arg_2]);
+
+  getBufferSubData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getBufferSubData", [__arg_0]);
+
+  getBufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getBufferSubData", [__arg_0, __arg_1]);
+
+  getBufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getBufferSubData", [__arg_0, __arg_1, __arg_2]);
+
+  getFragDataLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getFragDataLocation", []);
+
+  getFragDataLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getFragDataLocation", [__arg_0]);
+
+  getFragDataLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getFragDataLocation", [__arg_0, __arg_1]);
+
+  getIndexedParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getIndexedParameter", []);
+
+  getIndexedParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getIndexedParameter", [__arg_0]);
+
+  getIndexedParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getIndexedParameter", [__arg_0, __arg_1]);
+
+  getInternalformatParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getInternalformatParameter", [__arg_0]);
+
+  getInternalformatParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getInternalformatParameter", [__arg_0, __arg_1]);
+
+  getInternalformatParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getInternalformatParameter", [__arg_0, __arg_1, __arg_2]);
+
+  getQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQuery", []);
+
+  getQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQuery", [__arg_0]);
+
+  getQuery_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQuery", [__arg_0, __arg_1]);
+
+  getQueryParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQueryParameter", []);
+
+  getQueryParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQueryParameter", [__arg_0]);
+
+  getQueryParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getQueryParameter", [__arg_0, __arg_1]);
+
+  getSamplerParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSamplerParameter", []);
+
+  getSamplerParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSamplerParameter", [__arg_0]);
+
+  getSamplerParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSamplerParameter", [__arg_0, __arg_1]);
+
+  getSyncParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSyncParameter", []);
+
+  getSyncParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSyncParameter", [__arg_0]);
+
+  getSyncParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getSyncParameter", [__arg_0, __arg_1]);
+
+  getTransformFeedbackVarying_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getTransformFeedbackVarying", []);
+
+  getTransformFeedbackVarying_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getTransformFeedbackVarying", [__arg_0]);
+
+  getTransformFeedbackVarying_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getTransformFeedbackVarying", [__arg_0, __arg_1]);
+
+  getUniformBlockIndex_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformBlockIndex", []);
+
+  getUniformBlockIndex_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformBlockIndex", [__arg_0]);
+
+  getUniformBlockIndex_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformBlockIndex", [__arg_0, __arg_1]);
+
+  getUniformIndices_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformIndices", []);
+
+  getUniformIndices_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformIndices", [__arg_0]);
+
+  getUniformIndices_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "getUniformIndices", [__arg_0, __arg_1]);
+
+  invalidateFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateFramebuffer", []);
+
+  invalidateFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateFramebuffer", [__arg_0]);
+
+  invalidateFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateFramebuffer", [__arg_0, __arg_1]);
+
+  invalidateSubFramebuffer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateSubFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  invalidateSubFramebuffer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateSubFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  invalidateSubFramebuffer_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "invalidateSubFramebuffer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  isQuery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isQuery", []);
+
+  isQuery_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isQuery", [__arg_0]);
+
+  isSampler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isSampler", []);
+
+  isSampler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isSampler", [__arg_0]);
+
+  isSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isSync", []);
+
+  isSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isSync", [__arg_0]);
+
+  isTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isTransformFeedback", []);
+
+  isTransformFeedback_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isTransformFeedback", [__arg_0]);
+
+  isVertexArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isVertexArray", []);
+
+  isVertexArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "isVertexArray", [__arg_0]);
+
+  pauseTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "pauseTransformFeedback", []);
+
+  readBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "readBuffer", []);
+
+  readBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "readBuffer", [__arg_0]);
+
+  renderbufferStorageMultisample_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "renderbufferStorageMultisample", [__arg_0, __arg_1, __arg_2]);
+
+  renderbufferStorageMultisample_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "renderbufferStorageMultisample", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  renderbufferStorageMultisample_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "renderbufferStorageMultisample", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  resumeTransformFeedback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "resumeTransformFeedback", []);
+
+  samplerParameterf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameterf", [__arg_0]);
+
+  samplerParameterf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameterf", [__arg_0, __arg_1]);
+
+  samplerParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameterf", [__arg_0, __arg_1, __arg_2]);
+
+  samplerParameteri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameteri", [__arg_0]);
+
+  samplerParameteri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameteri", [__arg_0, __arg_1]);
+
+  samplerParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "samplerParameteri", [__arg_0, __arg_1, __arg_2]);
+
+  texImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texImage3D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  texImage3D_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  texStorage2D_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage2D", [__arg_0, __arg_1, __arg_2]);
+
+  texStorage2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texStorage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texStorage3D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage3D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texStorage3D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texStorage3D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texStorage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texSubImage3D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texSubImage3D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  texSubImage3D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texSubImage3D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  texSubImage3D_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+
+  texSubImage3D_Callback_11_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "texSubImage3D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
+
+  transformFeedbackVaryings_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "transformFeedbackVaryings", [__arg_0]);
+
+  transformFeedbackVaryings_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "transformFeedbackVaryings", [__arg_0, __arg_1]);
+
+  transformFeedbackVaryings_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "transformFeedbackVaryings", [__arg_0, __arg_1, __arg_2]);
+
+  uniform1ui_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1ui", []);
+
+  uniform1ui_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1ui", [__arg_0]);
+
+  uniform1ui_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1ui", [__arg_0, __arg_1]);
+
+  uniform1uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1uiv", []);
+
+  uniform1uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1uiv", [__arg_0]);
+
+  uniform1uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform1uiv", [__arg_0, __arg_1]);
+
+  uniform2ui_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2ui", [__arg_0]);
+
+  uniform2ui_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2ui", [__arg_0, __arg_1]);
+
+  uniform2ui_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2ui", [__arg_0, __arg_1, __arg_2]);
+
+  uniform2uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2uiv", []);
+
+  uniform2uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2uiv", [__arg_0]);
+
+  uniform2uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform2uiv", [__arg_0, __arg_1]);
+
+  uniform3ui_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3ui", [__arg_0, __arg_1]);
+
+  uniform3ui_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3ui", [__arg_0, __arg_1, __arg_2]);
+
+  uniform3ui_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3ui", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform3uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3uiv", []);
+
+  uniform3uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3uiv", [__arg_0]);
+
+  uniform3uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform3uiv", [__arg_0, __arg_1]);
+
+  uniform4ui_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4ui", [__arg_0, __arg_1, __arg_2]);
+
+  uniform4ui_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4ui", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform4ui_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4ui", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  uniform4uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4uiv", []);
+
+  uniform4uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4uiv", [__arg_0]);
+
+  uniform4uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniform4uiv", [__arg_0, __arg_1]);
+
+  uniformBlockBinding_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformBlockBinding", [__arg_0]);
+
+  uniformBlockBinding_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformBlockBinding", [__arg_0, __arg_1]);
+
+  uniformBlockBinding_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformBlockBinding", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix2x3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x3fv", [__arg_0]);
+
+  uniformMatrix2x3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x3fv", [__arg_0, __arg_1]);
+
+  uniformMatrix2x3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x3fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix2x4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x4fv", [__arg_0]);
+
+  uniformMatrix2x4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x4fv", [__arg_0, __arg_1]);
+
+  uniformMatrix2x4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix2x4fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix3x2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x2fv", [__arg_0]);
+
+  uniformMatrix3x2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x2fv", [__arg_0, __arg_1]);
+
+  uniformMatrix3x2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x2fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix3x4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x4fv", [__arg_0]);
+
+  uniformMatrix3x4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x4fv", [__arg_0, __arg_1]);
+
+  uniformMatrix3x4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix3x4fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix4x2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x2fv", [__arg_0]);
+
+  uniformMatrix4x2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x2fv", [__arg_0, __arg_1]);
+
+  uniformMatrix4x2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x2fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix4x3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x3fv", [__arg_0]);
+
+  uniformMatrix4x3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x3fv", [__arg_0, __arg_1]);
+
+  uniformMatrix4x3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "uniformMatrix4x3fv", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttribDivisor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribDivisor", []);
+
+  vertexAttribDivisor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribDivisor", [__arg_0]);
+
+  vertexAttribDivisor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribDivisor", [__arg_0, __arg_1]);
+
+  vertexAttribI4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4i", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttribI4i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribI4i_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4i", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttribI4iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4iv", []);
+
+  vertexAttribI4iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4iv", [__arg_0]);
+
+  vertexAttribI4iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4iv", [__arg_0, __arg_1]);
+
+  vertexAttribI4ui_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4ui", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttribI4ui_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4ui", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribI4ui_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4ui", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttribI4uiv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4uiv", []);
+
+  vertexAttribI4uiv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4uiv", [__arg_0]);
+
+  vertexAttribI4uiv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribI4uiv", [__arg_0, __arg_1]);
+
+  vertexAttribIPointer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribIPointer", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttribIPointer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribIPointer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribIPointer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "vertexAttribIPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  waitSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "waitSync", [__arg_0]);
+
+  waitSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "waitSync", [__arg_0, __arg_1]);
+
+  waitSync_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGL2RenderingContextBase */, "waitSync", [__arg_0, __arg_1, __arg_2]);
+
+  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "canvas");
+
+  drawingBufferHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "drawingBufferHeight");
+
+  drawingBufferWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "drawingBufferWidth");
+
+  activeTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "activeTexture", []);
+
+  activeTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "activeTexture", [__arg_0]);
+
+  attachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", []);
+
+  attachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", [__arg_0]);
+
+  attachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", [__arg_0, __arg_1]);
+
+  bindAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0]);
+
+  bindAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0, __arg_1]);
+
+  bindAttribLocation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0, __arg_1, __arg_2]);
+
+  bindBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", []);
+
+  bindBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", [__arg_0]);
+
+  bindBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", [__arg_0, __arg_1]);
+
+  bindFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", []);
+
+  bindFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", [__arg_0]);
+
+  bindFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", [__arg_0, __arg_1]);
+
+  bindRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", []);
+
+  bindRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", [__arg_0]);
+
+  bindRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", [__arg_0, __arg_1]);
+
+  bindTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", []);
+
+  bindTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", [__arg_0]);
+
+  bindTexture_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", [__arg_0, __arg_1]);
+
+  blendColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1]);
+
+  blendColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1, __arg_2]);
+
+  blendColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  blendEquation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquation", []);
+
+  blendEquation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquation", [__arg_0]);
+
+  blendEquationSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", []);
+
+  blendEquationSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", [__arg_0]);
+
+  blendEquationSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", [__arg_0, __arg_1]);
+
+  blendFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", []);
+
+  blendFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", [__arg_0]);
+
+  blendFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", [__arg_0, __arg_1]);
+
+  blendFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1]);
+
+  blendFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  blendFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  bufferData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0]);
+
+  bufferData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0, __arg_1]);
+
+  bufferData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0, __arg_1, __arg_2]);
+
+  bufferSubData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0]);
+
+  bufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0, __arg_1]);
+
+  bufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0, __arg_1, __arg_2]);
+
+  checkFramebufferStatus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "checkFramebufferStatus", []);
+
+  checkFramebufferStatus_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "checkFramebufferStatus", [__arg_0]);
+
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clear", []);
+
+  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clear", [__arg_0]);
+
+  clearColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1]);
+
+  clearColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1, __arg_2]);
+
+  clearColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  clearDepth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearDepth", []);
+
+  clearDepth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearDepth", [__arg_0]);
+
+  clearStencil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearStencil", []);
+
+  clearStencil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearStencil", [__arg_0]);
+
+  colorMask_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1]);
+
+  colorMask_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1, __arg_2]);
+
+  colorMask_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  compileShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compileShader", []);
+
+  compileShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compileShader", [__arg_0]);
+
+  compressedTexImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  compressedTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  compressedTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  compressedTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  compressedTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  compressedTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  copyTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  copyTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  copyTexImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  copyTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  copyTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  copyTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  createBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createBuffer", []);
+
+  createFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createFramebuffer", []);
+
+  createProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createProgram", []);
+
+  createRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createRenderbuffer", []);
+
+  createShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createShader", []);
+
+  createShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createShader", [__arg_0]);
+
+  createTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createTexture", []);
+
+  cullFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "cullFace", []);
+
+  cullFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "cullFace", [__arg_0]);
+
+  deleteBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteBuffer", []);
+
+  deleteBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteBuffer", [__arg_0]);
+
+  deleteFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteFramebuffer", []);
+
+  deleteFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteFramebuffer", [__arg_0]);
+
+  deleteProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteProgram", []);
+
+  deleteProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteProgram", [__arg_0]);
+
+  deleteRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteRenderbuffer", []);
+
+  deleteRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteRenderbuffer", [__arg_0]);
+
+  deleteShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteShader", []);
+
+  deleteShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteShader", [__arg_0]);
+
+  deleteTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteTexture", []);
+
+  deleteTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteTexture", [__arg_0]);
+
+  depthFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthFunc", []);
+
+  depthFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthFunc", [__arg_0]);
+
+  depthMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthMask", []);
+
+  depthMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthMask", [__arg_0]);
+
+  depthRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", []);
+
+  depthRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", [__arg_0]);
+
+  depthRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", [__arg_0, __arg_1]);
+
+  detachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", []);
+
+  detachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", [__arg_0]);
+
+  detachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", [__arg_0, __arg_1]);
+
+  disable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disable", []);
+
+  disable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disable", [__arg_0]);
+
+  disableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disableVertexAttribArray", []);
+
+  disableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disableVertexAttribArray", [__arg_0]);
+
+  drawArrays_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0]);
+
+  drawArrays_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0, __arg_1]);
+
+  drawArrays_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0, __arg_1, __arg_2]);
+
+  drawElements_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1]);
+
+  drawElements_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1, __arg_2]);
+
+  drawElements_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  enable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enable", []);
+
+  enable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enable", [__arg_0]);
+
+  enableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enableVertexAttribArray", []);
+
+  enableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enableVertexAttribArray", [__arg_0]);
+
+  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "finish", []);
+
+  flush_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "flush", []);
+
+  framebufferRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1]);
+
+  framebufferRenderbuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2]);
+
+  framebufferRenderbuffer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  framebufferTexture2D_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2]);
+
+  framebufferTexture2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  framebufferTexture2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  frontFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "frontFace", []);
+
+  frontFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "frontFace", [__arg_0]);
+
+  generateMipmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "generateMipmap", []);
+
+  generateMipmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "generateMipmap", [__arg_0]);
+
+  getActiveAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", []);
+
+  getActiveAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", [__arg_0]);
+
+  getActiveAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", [__arg_0, __arg_1]);
+
+  getActiveUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", []);
+
+  getActiveUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", [__arg_0]);
+
+  getActiveUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", [__arg_0, __arg_1]);
+
+  getAttachedShaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttachedShaders", []);
+
+  getAttachedShaders_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttachedShaders", [__arg_0]);
+
+  getAttribLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", []);
+
+  getAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", [__arg_0]);
+
+  getAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", [__arg_0, __arg_1]);
+
+  getBufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", []);
+
+  getBufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", [__arg_0]);
+
+  getBufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", [__arg_0, __arg_1]);
+
+  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getContextAttributes", []);
+
+  getError_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getError", []);
+
+  getExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getExtension", []);
+
+  getExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getExtension", [__arg_0]);
+
+  getFramebufferAttachmentParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0]);
+
+  getFramebufferAttachmentParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0, __arg_1]);
+
+  getFramebufferAttachmentParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0, __arg_1, __arg_2]);
+
+  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getParameter", []);
+
+  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getParameter", [__arg_0]);
+
+  getProgramInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramInfoLog", []);
+
+  getProgramInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramInfoLog", [__arg_0]);
+
+  getProgramParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", []);
+
+  getProgramParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", [__arg_0]);
+
+  getProgramParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", [__arg_0, __arg_1]);
+
+  getRenderbufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", []);
+
+  getRenderbufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", [__arg_0]);
+
+  getRenderbufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", [__arg_0, __arg_1]);
+
+  getShaderInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderInfoLog", []);
+
+  getShaderInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderInfoLog", [__arg_0]);
+
+  getShaderParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", []);
+
+  getShaderParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", [__arg_0]);
+
+  getShaderParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", [__arg_0, __arg_1]);
+
+  getShaderPrecisionFormat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", []);
+
+  getShaderPrecisionFormat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", [__arg_0]);
+
+  getShaderPrecisionFormat_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", [__arg_0, __arg_1]);
+
+  getShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderSource", []);
+
+  getShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderSource", [__arg_0]);
+
+  getSupportedExtensions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getSupportedExtensions", []);
+
+  getTexParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", []);
+
+  getTexParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", [__arg_0]);
+
+  getTexParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", [__arg_0, __arg_1]);
+
+  getUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", []);
+
+  getUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", [__arg_0]);
+
+  getUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", [__arg_0, __arg_1]);
+
+  getUniformLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", []);
+
+  getUniformLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", [__arg_0]);
+
+  getUniformLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", [__arg_0, __arg_1]);
+
+  getVertexAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", []);
+
+  getVertexAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", [__arg_0]);
+
+  getVertexAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", [__arg_0, __arg_1]);
+
+  getVertexAttribOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", []);
+
+  getVertexAttribOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", [__arg_0]);
+
+  getVertexAttribOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", [__arg_0, __arg_1]);
+
+  hint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", []);
+
+  hint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", [__arg_0]);
+
+  hint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", [__arg_0, __arg_1]);
+
+  isBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isBuffer", []);
+
+  isBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isBuffer", [__arg_0]);
+
+  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isContextLost", []);
+
+  isEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isEnabled", []);
+
+  isEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isEnabled", [__arg_0]);
+
+  isFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isFramebuffer", []);
+
+  isFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isFramebuffer", [__arg_0]);
+
+  isProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isProgram", []);
+
+  isProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isProgram", [__arg_0]);
+
+  isRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isRenderbuffer", []);
+
+  isRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isRenderbuffer", [__arg_0]);
+
+  isShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isShader", []);
+
+  isShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isShader", [__arg_0]);
+
+  isTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isTexture", []);
+
+  isTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isTexture", [__arg_0]);
+
+  lineWidth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "lineWidth", []);
+
+  lineWidth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "lineWidth", [__arg_0]);
+
+  linkProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "linkProgram", []);
+
+  linkProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "linkProgram", [__arg_0]);
+
+  pixelStorei_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", []);
+
+  pixelStorei_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", [__arg_0]);
+
+  pixelStorei_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", [__arg_0, __arg_1]);
+
+  polygonOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", []);
+
+  polygonOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", [__arg_0]);
+
+  polygonOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", [__arg_0, __arg_1]);
+
+  readPixels_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  readPixels_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  readPixels_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  renderbufferStorage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1]);
+
+  renderbufferStorage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1, __arg_2]);
+
+  renderbufferStorage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  sampleCoverage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", []);
+
+  sampleCoverage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", [__arg_0]);
+
+  sampleCoverage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", [__arg_0, __arg_1]);
+
+  scissor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1]);
+
+  scissor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1, __arg_2]);
+
+  scissor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  shaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", []);
+
+  shaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", [__arg_0]);
+
+  shaderSource_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", [__arg_0, __arg_1]);
+
+  stencilFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0]);
+
+  stencilFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0, __arg_1]);
+
+  stencilFunc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0, __arg_1, __arg_2]);
+
+  stencilFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1]);
+
+  stencilFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  stencilFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  stencilMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMask", []);
+
+  stencilMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMask", [__arg_0]);
+
+  stencilMaskSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", []);
+
+  stencilMaskSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", [__arg_0]);
+
+  stencilMaskSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", [__arg_0, __arg_1]);
+
+  stencilOp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0]);
+
+  stencilOp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0, __arg_1]);
+
+  stencilOp_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0, __arg_1, __arg_2]);
+
+  stencilOpSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1]);
+
+  stencilOpSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  stencilOpSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texImage2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  texImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  texParameterf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0]);
+
+  texParameterf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0, __arg_1]);
+
+  texParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0, __arg_1, __arg_2]);
+
+  texParameteri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0]);
+
+  texParameteri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0, __arg_1]);
+
+  texParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0, __arg_1, __arg_2]);
+
+  texSubImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  texSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texSubImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  uniform1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", []);
+
+  uniform1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", [__arg_0]);
+
+  uniform1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", [__arg_0, __arg_1]);
+
+  uniform1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", []);
+
+  uniform1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", [__arg_0]);
+
+  uniform1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", [__arg_0, __arg_1]);
+
+  uniform1i_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", []);
+
+  uniform1i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", [__arg_0]);
+
+  uniform1i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", [__arg_0, __arg_1]);
+
+  uniform1iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", []);
+
+  uniform1iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", [__arg_0]);
+
+  uniform1iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", [__arg_0, __arg_1]);
+
+  uniform2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0]);
+
+  uniform2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0, __arg_1]);
+
+  uniform2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", []);
+
+  uniform2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", [__arg_0]);
+
+  uniform2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", [__arg_0, __arg_1]);
+
+  uniform2i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0]);
+
+  uniform2i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0, __arg_1]);
+
+  uniform2i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform2iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", []);
+
+  uniform2iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", [__arg_0]);
+
+  uniform2iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", [__arg_0, __arg_1]);
+
+  uniform3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1]);
+
+  uniform3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", []);
+
+  uniform3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", [__arg_0]);
+
+  uniform3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", [__arg_0, __arg_1]);
+
+  uniform3i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1]);
+
+  uniform3i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform3i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform3iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", []);
+
+  uniform3iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", [__arg_0]);
+
+  uniform3iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", [__arg_0, __arg_1]);
+
+  uniform4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  uniform4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", []);
+
+  uniform4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", [__arg_0]);
+
+  uniform4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", [__arg_0, __arg_1]);
+
+  uniform4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform4i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform4i_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  uniform4iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", []);
+
+  uniform4iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", [__arg_0]);
+
+  uniform4iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", [__arg_0, __arg_1]);
+
+  uniformMatrix2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0]);
+
+  uniformMatrix2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0, __arg_1]);
+
+  uniformMatrix2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0]);
+
+  uniformMatrix3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0, __arg_1]);
+
+  uniformMatrix3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0]);
+
+  uniformMatrix4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0, __arg_1]);
+
+  uniformMatrix4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0, __arg_1, __arg_2]);
+
+  useProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "useProgram", []);
+
+  useProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "useProgram", [__arg_0]);
+
+  validateProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "validateProgram", []);
+
+  validateProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "validateProgram", [__arg_0]);
+
+  vertexAttrib1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", []);
+
+  vertexAttrib1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", [__arg_0]);
+
+  vertexAttrib1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", [__arg_0, __arg_1]);
+
+  vertexAttrib1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", []);
+
+  vertexAttrib1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", [__arg_0]);
+
+  vertexAttrib1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", [__arg_0, __arg_1]);
+
+  vertexAttrib2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0]);
+
+  vertexAttrib2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0, __arg_1]);
+
+  vertexAttrib2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", []);
+
+  vertexAttrib2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", [__arg_0]);
+
+  vertexAttrib2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", [__arg_0, __arg_1]);
+
+  vertexAttrib3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1]);
+
+  vertexAttrib3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttrib3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", []);
+
+  vertexAttrib3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", [__arg_0]);
+
+  vertexAttrib3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", [__arg_0, __arg_1]);
+
+  vertexAttrib4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttrib4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttrib4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", []);
+
+  vertexAttrib4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", [__arg_0]);
+
+  vertexAttrib4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", [__arg_0, __arg_1]);
+
+  vertexAttribPointer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribPointer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttribPointer_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  viewport_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1]);
+
+  viewport_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1, __arg_2]);
+
+  viewport_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkWebGLActiveInfo {
   static final instance = new BlinkWebGLActiveInfo();
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLActiveInfo */, "name");
 
-  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLActiveInfo */, "size");
 
-  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLActiveInfo */, "type");
 
 }
 
@@ -14932,45 +20182,16 @@
 
 }
 
-class BlinkWebGLContextAttributes {
-  static final instance = new BlinkWebGLContextAttributes();
-
-  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alpha");
-
-  alpha_Setter_(mthis, __arg_0) => mthis["alpha"] = __arg_0;
-
-  antialias_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "antialias");
-
-  antialias_Setter_(mthis, __arg_0) => mthis["antialias"] = __arg_0;
-
-  depth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "depth");
-
-  depth_Setter_(mthis, __arg_0) => mthis["depth"] = __arg_0;
-
-  failIfMajorPerformanceCaveat_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "failIfMajorPerformanceCaveat");
-
-  failIfMajorPerformanceCaveat_Setter_(mthis, __arg_0) => mthis["failIfMajorPerformanceCaveat"] = __arg_0;
-
-  premultipliedAlpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "premultipliedAlpha");
-
-  premultipliedAlpha_Setter_(mthis, __arg_0) => mthis["premultipliedAlpha"] = __arg_0;
-
-  preserveDrawingBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveDrawingBuffer");
-
-  preserveDrawingBuffer_Setter_(mthis, __arg_0) => mthis["preserveDrawingBuffer"] = __arg_0;
-
-  stencil_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stencil");
-
-  stencil_Setter_(mthis, __arg_0) => mthis["stencil"] = __arg_0;
-
-}
-
 class BlinkWebGLContextEvent extends BlinkEvent {
   static final instance = new BlinkWebGLContextEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebGLContextEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("WebGLContextEvent");
 
-  statusMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusMessage");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("WebGLContextEvent", [__arg_0]);
+
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("WebGLContextEvent", [__arg_0, __arg_1]);
+
+  statusMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLContextEvent */, "statusMessage");
 
 }
 
@@ -14982,9 +20203,9 @@
 class BlinkWebGLDebugShaders {
   static final instance = new BlinkWebGLDebugShaders();
 
-  getTranslatedShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTranslatedShaderSource", []);
+  getTranslatedShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLDebugShaders */, "getTranslatedShaderSource", []);
 
-  getTranslatedShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTranslatedShaderSource", [__arg_0]);
+  getTranslatedShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLDebugShaders */, "getTranslatedShaderSource", [__arg_0]);
 
 }
 
@@ -14996,9 +20217,9 @@
 class BlinkWebGLDrawBuffers {
   static final instance = new BlinkWebGLDrawBuffers();
 
-  drawBuffersWEBGL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "drawBuffersWEBGL", []);
+  drawBuffersWEBGL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLDrawBuffers */, "drawBuffersWEBGL", []);
 
-  drawBuffersWEBGL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "drawBuffersWEBGL", [__arg_0]);
+  drawBuffersWEBGL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLDrawBuffers */, "drawBuffersWEBGL", [__arg_0]);
 
 }
 
@@ -15010,9 +20231,9 @@
 class BlinkWebGLLoseContext {
   static final instance = new BlinkWebGLLoseContext();
 
-  loseContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "loseContext", []);
+  loseContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLLoseContext */, "loseContext", []);
 
-  restoreContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "restoreContext", []);
+  restoreContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLLoseContext */, "restoreContext", []);
 
 }
 
@@ -15021,6 +20242,11 @@
 
 }
 
+class BlinkWebGLQuery {
+  static final instance = new BlinkWebGLQuery();
+
+}
+
 class BlinkWebGLRenderbuffer {
   static final instance = new BlinkWebGLRenderbuffer();
 
@@ -15029,711 +20255,1427 @@
 class BlinkWebGLRenderingContext {
   static final instance = new BlinkWebGLRenderingContext();
 
-  activeTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "activeTexture", []);
+  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "canvas");
+
+  drawingBufferHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "drawingBufferHeight");
+
+  drawingBufferWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "drawingBufferWidth");
+
+  activeTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "activeTexture", []);
+
+  activeTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "activeTexture", [__arg_0]);
+
+  attachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", []);
+
+  attachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", [__arg_0]);
+
+  attachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", [__arg_0, __arg_1]);
+
+  bindAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0]);
+
+  bindAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0, __arg_1]);
+
+  bindAttribLocation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0, __arg_1, __arg_2]);
+
+  bindBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", []);
+
+  bindBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", [__arg_0]);
+
+  bindBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", [__arg_0, __arg_1]);
+
+  bindFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", []);
+
+  bindFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", [__arg_0]);
+
+  bindFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", [__arg_0, __arg_1]);
+
+  bindRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", []);
+
+  bindRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", [__arg_0]);
+
+  bindRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", [__arg_0, __arg_1]);
+
+  bindTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", []);
+
+  bindTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", [__arg_0]);
+
+  bindTexture_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", [__arg_0, __arg_1]);
+
+  blendColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1]);
+
+  blendColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1, __arg_2]);
+
+  blendColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  blendEquation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquation", []);
+
+  blendEquation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquation", [__arg_0]);
+
+  blendEquationSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", []);
+
+  blendEquationSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", [__arg_0]);
+
+  blendEquationSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", [__arg_0, __arg_1]);
+
+  blendFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", []);
+
+  blendFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", [__arg_0]);
+
+  blendFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", [__arg_0, __arg_1]);
+
+  blendFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1]);
+
+  blendFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  blendFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  bufferData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0]);
+
+  bufferData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0, __arg_1]);
+
+  bufferData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0, __arg_1, __arg_2]);
+
+  bufferSubData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0]);
+
+  bufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0, __arg_1]);
+
+  bufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0, __arg_1, __arg_2]);
+
+  checkFramebufferStatus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "checkFramebufferStatus", []);
+
+  checkFramebufferStatus_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "checkFramebufferStatus", [__arg_0]);
+
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clear", []);
+
+  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clear", [__arg_0]);
+
+  clearColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1]);
+
+  clearColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1, __arg_2]);
+
+  clearColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  clearDepth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearDepth", []);
+
+  clearDepth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearDepth", [__arg_0]);
+
+  clearStencil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearStencil", []);
+
+  clearStencil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearStencil", [__arg_0]);
+
+  colorMask_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1]);
+
+  colorMask_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1, __arg_2]);
+
+  colorMask_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  compileShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compileShader", []);
+
+  compileShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compileShader", [__arg_0]);
+
+  compressedTexImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  compressedTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  compressedTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  compressedTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  compressedTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  compressedTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  copyTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  copyTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  copyTexImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  copyTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  copyTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  copyTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  createBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createBuffer", []);
+
+  createFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createFramebuffer", []);
+
+  createProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createProgram", []);
+
+  createRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createRenderbuffer", []);
+
+  createShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createShader", []);
+
+  createShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createShader", [__arg_0]);
+
+  createTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createTexture", []);
+
+  cullFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "cullFace", []);
+
+  cullFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "cullFace", [__arg_0]);
+
+  deleteBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteBuffer", []);
+
+  deleteBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteBuffer", [__arg_0]);
+
+  deleteFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteFramebuffer", []);
+
+  deleteFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteFramebuffer", [__arg_0]);
+
+  deleteProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteProgram", []);
+
+  deleteProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteProgram", [__arg_0]);
+
+  deleteRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteRenderbuffer", []);
+
+  deleteRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteRenderbuffer", [__arg_0]);
+
+  deleteShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteShader", []);
+
+  deleteShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteShader", [__arg_0]);
+
+  deleteTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteTexture", []);
+
+  deleteTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteTexture", [__arg_0]);
+
+  depthFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthFunc", []);
+
+  depthFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthFunc", [__arg_0]);
+
+  depthMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthMask", []);
+
+  depthMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthMask", [__arg_0]);
+
+  depthRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", []);
+
+  depthRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", [__arg_0]);
+
+  depthRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", [__arg_0, __arg_1]);
+
+  detachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", []);
+
+  detachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", [__arg_0]);
+
+  detachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", [__arg_0, __arg_1]);
+
+  disable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disable", []);
+
+  disable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disable", [__arg_0]);
+
+  disableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disableVertexAttribArray", []);
+
+  disableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disableVertexAttribArray", [__arg_0]);
+
+  drawArrays_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0]);
+
+  drawArrays_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0, __arg_1]);
+
+  drawArrays_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0, __arg_1, __arg_2]);
+
+  drawElements_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1]);
+
+  drawElements_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1, __arg_2]);
+
+  drawElements_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  enable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enable", []);
+
+  enable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enable", [__arg_0]);
+
+  enableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enableVertexAttribArray", []);
+
+  enableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enableVertexAttribArray", [__arg_0]);
+
+  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "finish", []);
+
+  flush_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "flush", []);
+
+  framebufferRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1]);
+
+  framebufferRenderbuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2]);
+
+  framebufferRenderbuffer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  framebufferTexture2D_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2]);
+
+  framebufferTexture2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  framebufferTexture2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  frontFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "frontFace", []);
+
+  frontFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "frontFace", [__arg_0]);
+
+  generateMipmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "generateMipmap", []);
+
+  generateMipmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "generateMipmap", [__arg_0]);
+
+  getActiveAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", []);
+
+  getActiveAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", [__arg_0]);
+
+  getActiveAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", [__arg_0, __arg_1]);
+
+  getActiveUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", []);
+
+  getActiveUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", [__arg_0]);
+
+  getActiveUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", [__arg_0, __arg_1]);
+
+  getAttachedShaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttachedShaders", []);
+
+  getAttachedShaders_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttachedShaders", [__arg_0]);
+
+  getAttribLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", []);
+
+  getAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", [__arg_0]);
+
+  getAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", [__arg_0, __arg_1]);
+
+  getBufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", []);
+
+  getBufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", [__arg_0]);
+
+  getBufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", [__arg_0, __arg_1]);
+
+  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getContextAttributes", []);
+
+  getError_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getError", []);
+
+  getExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getExtension", []);
+
+  getExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getExtension", [__arg_0]);
+
+  getFramebufferAttachmentParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0]);
+
+  getFramebufferAttachmentParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0, __arg_1]);
+
+  getFramebufferAttachmentParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0, __arg_1, __arg_2]);
+
+  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getParameter", []);
+
+  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getParameter", [__arg_0]);
+
+  getProgramInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramInfoLog", []);
+
+  getProgramInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramInfoLog", [__arg_0]);
+
+  getProgramParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", []);
+
+  getProgramParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", [__arg_0]);
+
+  getProgramParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", [__arg_0, __arg_1]);
+
+  getRenderbufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", []);
+
+  getRenderbufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", [__arg_0]);
+
+  getRenderbufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", [__arg_0, __arg_1]);
+
+  getShaderInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderInfoLog", []);
+
+  getShaderInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderInfoLog", [__arg_0]);
+
+  getShaderParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", []);
+
+  getShaderParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", [__arg_0]);
+
+  getShaderParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", [__arg_0, __arg_1]);
+
+  getShaderPrecisionFormat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", []);
+
+  getShaderPrecisionFormat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", [__arg_0]);
+
+  getShaderPrecisionFormat_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", [__arg_0, __arg_1]);
+
+  getShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderSource", []);
+
+  getShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderSource", [__arg_0]);
+
+  getSupportedExtensions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getSupportedExtensions", []);
+
+  getTexParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", []);
+
+  getTexParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", [__arg_0]);
+
+  getTexParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", [__arg_0, __arg_1]);
+
+  getUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", []);
+
+  getUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", [__arg_0]);
+
+  getUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", [__arg_0, __arg_1]);
+
+  getUniformLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", []);
+
+  getUniformLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", [__arg_0]);
+
+  getUniformLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", [__arg_0, __arg_1]);
+
+  getVertexAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", []);
+
+  getVertexAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", [__arg_0]);
+
+  getVertexAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", [__arg_0, __arg_1]);
+
+  getVertexAttribOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", []);
+
+  getVertexAttribOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", [__arg_0]);
+
+  getVertexAttribOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", [__arg_0, __arg_1]);
+
+  hint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", []);
+
+  hint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", [__arg_0]);
+
+  hint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", [__arg_0, __arg_1]);
+
+  isBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isBuffer", []);
+
+  isBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isBuffer", [__arg_0]);
+
+  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isContextLost", []);
+
+  isEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isEnabled", []);
+
+  isEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isEnabled", [__arg_0]);
+
+  isFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isFramebuffer", []);
+
+  isFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isFramebuffer", [__arg_0]);
+
+  isProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isProgram", []);
+
+  isProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isProgram", [__arg_0]);
+
+  isRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isRenderbuffer", []);
+
+  isRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isRenderbuffer", [__arg_0]);
+
+  isShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isShader", []);
+
+  isShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isShader", [__arg_0]);
+
+  isTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isTexture", []);
+
+  isTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isTexture", [__arg_0]);
+
+  lineWidth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "lineWidth", []);
+
+  lineWidth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "lineWidth", [__arg_0]);
+
+  linkProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "linkProgram", []);
+
+  linkProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "linkProgram", [__arg_0]);
+
+  pixelStorei_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", []);
+
+  pixelStorei_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", [__arg_0]);
+
+  pixelStorei_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", [__arg_0, __arg_1]);
+
+  polygonOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", []);
+
+  polygonOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", [__arg_0]);
+
+  polygonOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", [__arg_0, __arg_1]);
+
+  readPixels_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  readPixels_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  readPixels_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  renderbufferStorage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1]);
+
+  renderbufferStorage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1, __arg_2]);
+
+  renderbufferStorage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  sampleCoverage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", []);
+
+  sampleCoverage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", [__arg_0]);
+
+  sampleCoverage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", [__arg_0, __arg_1]);
+
+  scissor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1]);
+
+  scissor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1, __arg_2]);
+
+  scissor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  shaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", []);
+
+  shaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", [__arg_0]);
+
+  shaderSource_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", [__arg_0, __arg_1]);
+
+  stencilFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0]);
+
+  stencilFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0, __arg_1]);
+
+  stencilFunc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0, __arg_1, __arg_2]);
+
+  stencilFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1]);
+
+  stencilFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  stencilFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  stencilMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMask", []);
+
+  stencilMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMask", [__arg_0]);
+
+  stencilMaskSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", []);
+
+  stencilMaskSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", [__arg_0]);
+
+  stencilMaskSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", [__arg_0, __arg_1]);
+
+  stencilOp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0]);
+
+  stencilOp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0, __arg_1]);
+
+  stencilOp_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0, __arg_1, __arg_2]);
+
+  stencilOpSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1]);
+
+  stencilOpSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2]);
+
+  stencilOpSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texImage2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  texImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  texImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  texParameterf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0]);
+
+  texParameterf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0, __arg_1]);
+
+  texParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0, __arg_1, __arg_2]);
+
+  texParameteri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0]);
+
+  texParameteri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0, __arg_1]);
+
+  texParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0, __arg_1, __arg_2]);
+
+  texSubImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  texSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  texSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+
+  texSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+
+  texSubImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+
+  uniform1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", []);
+
+  uniform1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", [__arg_0]);
+
+  uniform1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", [__arg_0, __arg_1]);
+
+  uniform1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", []);
+
+  uniform1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", [__arg_0]);
+
+  uniform1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", [__arg_0, __arg_1]);
+
+  uniform1i_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", []);
+
+  uniform1i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", [__arg_0]);
+
+  uniform1i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", [__arg_0, __arg_1]);
+
+  uniform1iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", []);
+
+  uniform1iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", [__arg_0]);
+
+  uniform1iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", [__arg_0, __arg_1]);
+
+  uniform2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0]);
+
+  uniform2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0, __arg_1]);
+
+  uniform2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", []);
+
+  uniform2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", [__arg_0]);
+
+  uniform2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", [__arg_0, __arg_1]);
+
+  uniform2i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0]);
+
+  uniform2i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0, __arg_1]);
+
+  uniform2i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform2iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", []);
+
+  uniform2iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", [__arg_0]);
+
+  uniform2iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", [__arg_0, __arg_1]);
+
+  uniform3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1]);
+
+  uniform3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", []);
+
+  uniform3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", [__arg_0]);
+
+  uniform3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", [__arg_0, __arg_1]);
+
+  uniform3i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1]);
+
+  uniform3i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform3i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform3iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", []);
+
+  uniform3iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", [__arg_0]);
+
+  uniform3iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", [__arg_0, __arg_1]);
+
+  uniform4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2]);
+
+  uniform4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  uniform4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", []);
+
+  uniform4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", [__arg_0]);
+
+  uniform4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", [__arg_0, __arg_1]);
+
+  uniform4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2]);
+
+  uniform4i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  uniform4i_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  uniform4iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", []);
+
+  uniform4iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", [__arg_0]);
+
+  uniform4iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", [__arg_0, __arg_1]);
+
+  uniformMatrix2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0]);
+
+  uniformMatrix2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0, __arg_1]);
+
+  uniformMatrix2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0]);
+
+  uniformMatrix3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0, __arg_1]);
+
+  uniformMatrix3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0, __arg_1, __arg_2]);
+
+  uniformMatrix4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0]);
+
+  uniformMatrix4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0, __arg_1]);
+
+  uniformMatrix4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0, __arg_1, __arg_2]);
+
+  useProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "useProgram", []);
+
+  useProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "useProgram", [__arg_0]);
+
+  validateProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "validateProgram", []);
+
+  validateProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "validateProgram", [__arg_0]);
+
+  vertexAttrib1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", []);
+
+  vertexAttrib1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", [__arg_0]);
+
+  vertexAttrib1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", [__arg_0, __arg_1]);
+
+  vertexAttrib1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", []);
+
+  vertexAttrib1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", [__arg_0]);
+
+  vertexAttrib1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", [__arg_0, __arg_1]);
+
+  vertexAttrib2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0]);
+
+  vertexAttrib2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0, __arg_1]);
+
+  vertexAttrib2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", []);
+
+  vertexAttrib2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", [__arg_0]);
+
+  vertexAttrib2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", [__arg_0, __arg_1]);
+
+  vertexAttrib3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1]);
+
+  vertexAttrib3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttrib3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", []);
+
+  vertexAttrib3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", [__arg_0]);
+
+  vertexAttrib3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", [__arg_0, __arg_1]);
+
+  vertexAttrib4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2]);
+
+  vertexAttrib4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttrib4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttrib4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", []);
+
+  vertexAttrib4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", [__arg_0]);
+
+  vertexAttrib4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", [__arg_0, __arg_1]);
+
+  vertexAttribPointer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  vertexAttribPointer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  vertexAttribPointer_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+
+  viewport_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1]);
+
+  viewport_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1, __arg_2]);
+
+  viewport_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+}
+
+class BlinkWebGLRenderingContextBase {
+  static final instance = new BlinkWebGLRenderingContextBase();
+
+  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "canvas");
+
+  drawingBufferHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "drawingBufferHeight");
+
+  drawingBufferWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLRenderingContextBase */, "drawingBufferWidth");
 
-  activeTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "activeTexture", [__arg_0]);
+  activeTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "activeTexture", []);
 
-  attachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "attachShader", []);
+  activeTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "activeTexture", [__arg_0]);
 
-  attachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "attachShader", [__arg_0]);
+  attachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", []);
 
-  attachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "attachShader", [__arg_0, __arg_1]);
+  attachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", [__arg_0]);
 
-  bindAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindAttribLocation", [__arg_0]);
+  attachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "attachShader", [__arg_0, __arg_1]);
 
-  bindAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindAttribLocation", [__arg_0, __arg_1]);
+  bindAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0]);
 
-  bindAttribLocation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "bindAttribLocation", [__arg_0, __arg_1, __arg_2]);
+  bindAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0, __arg_1]);
 
-  bindBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindBuffer", []);
+  bindAttribLocation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindAttribLocation", [__arg_0, __arg_1, __arg_2]);
 
-  bindBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindBuffer", [__arg_0]);
+  bindBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", []);
 
-  bindBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindBuffer", [__arg_0, __arg_1]);
+  bindBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", [__arg_0]);
 
-  bindFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindFramebuffer", []);
+  bindBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindBuffer", [__arg_0, __arg_1]);
 
-  bindFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindFramebuffer", [__arg_0]);
+  bindFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", []);
 
-  bindFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindFramebuffer", [__arg_0, __arg_1]);
+  bindFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", [__arg_0]);
 
-  bindRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindRenderbuffer", []);
+  bindFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindFramebuffer", [__arg_0, __arg_1]);
 
-  bindRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindRenderbuffer", [__arg_0]);
+  bindRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", []);
 
-  bindRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindRenderbuffer", [__arg_0, __arg_1]);
+  bindRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", [__arg_0]);
 
-  bindTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindTexture", []);
+  bindRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindRenderbuffer", [__arg_0, __arg_1]);
 
-  bindTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindTexture", [__arg_0]);
+  bindTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", []);
 
-  bindTexture_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindTexture", [__arg_0, __arg_1]);
+  bindTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", [__arg_0]);
 
-  blendColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "blendColor", [__arg_0, __arg_1]);
+  bindTexture_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bindTexture", [__arg_0, __arg_1]);
 
-  blendColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "blendColor", [__arg_0, __arg_1, __arg_2]);
+  blendColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1]);
 
-  blendColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "blendColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  blendColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1, __arg_2]);
 
-  blendEquationSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blendEquationSeparate", []);
+  blendColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  blendEquationSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "blendEquationSeparate", [__arg_0]);
+  blendEquation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquation", []);
 
-  blendEquationSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "blendEquationSeparate", [__arg_0, __arg_1]);
+  blendEquation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquation", [__arg_0]);
 
-  blendEquation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blendEquation", []);
+  blendEquationSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", []);
 
-  blendEquation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "blendEquation", [__arg_0]);
+  blendEquationSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", [__arg_0]);
 
-  blendFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "blendFuncSeparate", [__arg_0, __arg_1]);
+  blendEquationSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendEquationSeparate", [__arg_0, __arg_1]);
 
-  blendFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+  blendFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", []);
 
-  blendFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  blendFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", [__arg_0]);
 
-  blendFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blendFunc", []);
+  blendFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFunc", [__arg_0, __arg_1]);
 
-  blendFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "blendFunc", [__arg_0]);
+  blendFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1]);
 
-  blendFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "blendFunc", [__arg_0, __arg_1]);
+  blendFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2]);
 
-  bufferData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bufferData", [__arg_0]);
+  blendFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  bufferData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bufferData", [__arg_0, __arg_1]);
+  bufferData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0]);
 
-  bufferData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "bufferData", [__arg_0, __arg_1, __arg_2]);
+  bufferData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0, __arg_1]);
 
-  bufferSubData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bufferSubData", [__arg_0]);
+  bufferData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferData", [__arg_0, __arg_1, __arg_2]);
 
-  bufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bufferSubData", [__arg_0, __arg_1]);
+  bufferSubData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0]);
 
-  bufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "bufferSubData", [__arg_0, __arg_1, __arg_2]);
+  bufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0, __arg_1]);
 
-  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "canvas");
+  bufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "bufferSubData", [__arg_0, __arg_1, __arg_2]);
 
-  checkFramebufferStatus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkFramebufferStatus", []);
+  checkFramebufferStatus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "checkFramebufferStatus", []);
 
-  checkFramebufferStatus_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "checkFramebufferStatus", [__arg_0]);
+  checkFramebufferStatus_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "checkFramebufferStatus", [__arg_0]);
 
-  clearColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "clearColor", [__arg_0, __arg_1]);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clear", []);
 
-  clearColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "clearColor", [__arg_0, __arg_1, __arg_2]);
+  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clear", [__arg_0]);
 
-  clearColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "clearColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  clearColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1]);
 
-  clearDepth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearDepth", []);
+  clearColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1, __arg_2]);
 
-  clearDepth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearDepth", [__arg_0]);
+  clearColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  clearStencil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearStencil", []);
+  clearDepth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearDepth", []);
 
-  clearStencil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearStencil", [__arg_0]);
+  clearDepth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearDepth", [__arg_0]);
 
-  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
+  clearStencil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearStencil", []);
 
-  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clear", [__arg_0]);
+  clearStencil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "clearStencil", [__arg_0]);
 
-  colorMask_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "colorMask", [__arg_0, __arg_1]);
+  colorMask_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1]);
 
-  colorMask_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "colorMask", [__arg_0, __arg_1, __arg_2]);
+  colorMask_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1, __arg_2]);
 
-  colorMask_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "colorMask", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  colorMask_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "colorMask", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  compileShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "compileShader", []);
+  compileShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compileShader", []);
 
-  compileShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "compileShader", [__arg_0]);
+  compileShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compileShader", [__arg_0]);
 
-  compressedTexImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  compressedTexImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  compressedTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  compressedTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  compressedTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  compressedTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  compressedTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  compressedTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  compressedTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  compressedTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  compressedTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  compressedTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "compressedTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  copyTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  copyTexImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  copyTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  copyTexImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  copyTexImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  copyTexImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  copyTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  copyTexSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  copyTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  copyTexSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  copyTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  copyTexSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  createBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createBuffer", []);
+  createBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createBuffer", []);
 
-  createFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createFramebuffer", []);
+  createFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createFramebuffer", []);
 
-  createProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createProgram", []);
+  createProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createProgram", []);
 
-  createRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createRenderbuffer", []);
+  createRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createRenderbuffer", []);
 
-  createShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createShader", []);
+  createShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createShader", []);
 
-  createShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createShader", [__arg_0]);
+  createShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createShader", [__arg_0]);
 
-  createTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTexture", []);
+  createTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "createTexture", []);
 
-  cullFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cullFace", []);
+  cullFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "cullFace", []);
 
-  cullFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cullFace", [__arg_0]);
+  cullFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "cullFace", [__arg_0]);
 
-  deleteBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteBuffer", []);
+  deleteBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteBuffer", []);
 
-  deleteBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteBuffer", [__arg_0]);
+  deleteBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteBuffer", [__arg_0]);
 
-  deleteFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteFramebuffer", []);
+  deleteFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteFramebuffer", []);
 
-  deleteFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteFramebuffer", [__arg_0]);
+  deleteFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteFramebuffer", [__arg_0]);
 
-  deleteProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteProgram", []);
+  deleteProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteProgram", []);
 
-  deleteProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteProgram", [__arg_0]);
+  deleteProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteProgram", [__arg_0]);
 
-  deleteRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRenderbuffer", []);
+  deleteRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteRenderbuffer", []);
 
-  deleteRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRenderbuffer", [__arg_0]);
+  deleteRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteRenderbuffer", [__arg_0]);
 
-  deleteShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteShader", []);
+  deleteShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteShader", []);
 
-  deleteShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteShader", [__arg_0]);
+  deleteShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteShader", [__arg_0]);
 
-  deleteTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteTexture", []);
+  deleteTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteTexture", []);
 
-  deleteTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteTexture", [__arg_0]);
+  deleteTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "deleteTexture", [__arg_0]);
 
-  depthFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "depthFunc", []);
+  depthFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthFunc", []);
 
-  depthFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "depthFunc", [__arg_0]);
+  depthFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthFunc", [__arg_0]);
 
-  depthMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "depthMask", []);
+  depthMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthMask", []);
 
-  depthMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "depthMask", [__arg_0]);
+  depthMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthMask", [__arg_0]);
 
-  depthRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "depthRange", []);
+  depthRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", []);
 
-  depthRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "depthRange", [__arg_0]);
+  depthRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", [__arg_0]);
 
-  depthRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "depthRange", [__arg_0, __arg_1]);
+  depthRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "depthRange", [__arg_0, __arg_1]);
 
-  detachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "detachShader", []);
+  detachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", []);
 
-  detachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "detachShader", [__arg_0]);
+  detachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", [__arg_0]);
 
-  detachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "detachShader", [__arg_0, __arg_1]);
+  detachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "detachShader", [__arg_0, __arg_1]);
 
-  disableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "disableVertexAttribArray", []);
+  disable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disable", []);
 
-  disableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "disableVertexAttribArray", [__arg_0]);
+  disable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disable", [__arg_0]);
 
-  disable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "disable", []);
+  disableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disableVertexAttribArray", []);
 
-  disable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "disable", [__arg_0]);
+  disableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "disableVertexAttribArray", [__arg_0]);
 
-  drawArrays_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "drawArrays", [__arg_0]);
+  drawArrays_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0]);
 
-  drawArrays_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawArrays", [__arg_0, __arg_1]);
+  drawArrays_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0, __arg_1]);
 
-  drawArrays_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawArrays", [__arg_0, __arg_1, __arg_2]);
+  drawArrays_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawArrays", [__arg_0, __arg_1, __arg_2]);
 
-  drawElements_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawElements", [__arg_0, __arg_1]);
+  drawElements_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1]);
 
-  drawElements_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawElements", [__arg_0, __arg_1, __arg_2]);
+  drawElements_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1, __arg_2]);
 
-  drawElements_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "drawElements", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  drawElements_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "drawElements", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  drawingBufferHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "drawingBufferHeight");
+  enable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enable", []);
 
-  drawingBufferWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "drawingBufferWidth");
+  enable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enable", [__arg_0]);
 
-  enableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "enableVertexAttribArray", []);
+  enableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enableVertexAttribArray", []);
 
-  enableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "enableVertexAttribArray", [__arg_0]);
+  enableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "enableVertexAttribArray", [__arg_0]);
 
-  enable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "enable", []);
+  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "finish", []);
 
-  enable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "enable", [__arg_0]);
+  flush_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "flush", []);
 
-  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "finish", []);
+  framebufferRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1]);
 
-  flush_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "flush", []);
+  framebufferRenderbuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2]);
 
-  framebufferRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "framebufferRenderbuffer", [__arg_0, __arg_1]);
+  framebufferRenderbuffer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  framebufferRenderbuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2]);
+  framebufferTexture2D_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2]);
 
-  framebufferRenderbuffer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  framebufferTexture2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  framebufferTexture2D_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2]);
+  framebufferTexture2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  framebufferTexture2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  frontFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "frontFace", []);
 
-  framebufferTexture2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  frontFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "frontFace", [__arg_0]);
 
-  frontFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "frontFace", []);
+  generateMipmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "generateMipmap", []);
 
-  frontFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "frontFace", [__arg_0]);
+  generateMipmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "generateMipmap", [__arg_0]);
 
-  generateMipmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "generateMipmap", []);
+  getActiveAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", []);
 
-  generateMipmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "generateMipmap", [__arg_0]);
+  getActiveAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", [__arg_0]);
 
-  getActiveAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getActiveAttrib", []);
+  getActiveAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveAttrib", [__arg_0, __arg_1]);
 
-  getActiveAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getActiveAttrib", [__arg_0]);
+  getActiveUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", []);
 
-  getActiveAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getActiveAttrib", [__arg_0, __arg_1]);
+  getActiveUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", [__arg_0]);
 
-  getActiveUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getActiveUniform", []);
+  getActiveUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getActiveUniform", [__arg_0, __arg_1]);
 
-  getActiveUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getActiveUniform", [__arg_0]);
+  getAttachedShaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttachedShaders", []);
 
-  getActiveUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getActiveUniform", [__arg_0, __arg_1]);
+  getAttachedShaders_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttachedShaders", [__arg_0]);
 
-  getAttachedShaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAttachedShaders", []);
+  getAttribLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", []);
 
-  getAttachedShaders_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAttachedShaders", [__arg_0]);
+  getAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", [__arg_0]);
 
-  getAttribLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAttribLocation", []);
+  getAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getAttribLocation", [__arg_0, __arg_1]);
 
-  getAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAttribLocation", [__arg_0]);
+  getBufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", []);
 
-  getAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getAttribLocation", [__arg_0, __arg_1]);
+  getBufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", [__arg_0]);
 
-  getBufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBufferParameter", []);
+  getBufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getBufferParameter", [__arg_0, __arg_1]);
 
-  getBufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getBufferParameter", [__arg_0]);
+  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getContextAttributes", []);
 
-  getBufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getBufferParameter", [__arg_0, __arg_1]);
+  getError_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getError", []);
 
-  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getContextAttributes", []);
+  getExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getExtension", []);
 
-  getError_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getError", []);
+  getExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getExtension", [__arg_0]);
 
-  getExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getExtension", []);
+  getFramebufferAttachmentParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0]);
 
-  getExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getExtension", [__arg_0]);
+  getFramebufferAttachmentParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0, __arg_1]);
 
-  getFramebufferAttachmentParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFramebufferAttachmentParameter", [__arg_0]);
+  getFramebufferAttachmentParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getFramebufferAttachmentParameter", [__arg_0, __arg_1, __arg_2]);
 
-  getFramebufferAttachmentParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getFramebufferAttachmentParameter", [__arg_0, __arg_1]);
+  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getParameter", []);
 
-  getFramebufferAttachmentParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getFramebufferAttachmentParameter", [__arg_0, __arg_1, __arg_2]);
+  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getParameter", [__arg_0]);
 
-  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", []);
+  getProgramInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramInfoLog", []);
 
-  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", [__arg_0]);
+  getProgramInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramInfoLog", [__arg_0]);
 
-  getProgramInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getProgramInfoLog", []);
+  getProgramParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", []);
 
-  getProgramInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getProgramInfoLog", [__arg_0]);
+  getProgramParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", [__arg_0]);
 
-  getProgramParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getProgramParameter", []);
+  getProgramParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getProgramParameter", [__arg_0, __arg_1]);
 
-  getProgramParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getProgramParameter", [__arg_0]);
+  getRenderbufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", []);
 
-  getProgramParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getProgramParameter", [__arg_0, __arg_1]);
+  getRenderbufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", [__arg_0]);
 
-  getRenderbufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRenderbufferParameter", []);
+  getRenderbufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getRenderbufferParameter", [__arg_0, __arg_1]);
 
-  getRenderbufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRenderbufferParameter", [__arg_0]);
+  getShaderInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderInfoLog", []);
 
-  getRenderbufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getRenderbufferParameter", [__arg_0, __arg_1]);
+  getShaderInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderInfoLog", [__arg_0]);
 
-  getShaderInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getShaderInfoLog", []);
+  getShaderParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", []);
 
-  getShaderInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getShaderInfoLog", [__arg_0]);
+  getShaderParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", [__arg_0]);
 
-  getShaderParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getShaderParameter", []);
+  getShaderParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderParameter", [__arg_0, __arg_1]);
 
-  getShaderParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getShaderParameter", [__arg_0]);
+  getShaderPrecisionFormat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", []);
 
-  getShaderParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getShaderParameter", [__arg_0, __arg_1]);
+  getShaderPrecisionFormat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", [__arg_0]);
 
-  getShaderPrecisionFormat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getShaderPrecisionFormat", []);
+  getShaderPrecisionFormat_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderPrecisionFormat", [__arg_0, __arg_1]);
 
-  getShaderPrecisionFormat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getShaderPrecisionFormat", [__arg_0]);
+  getShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderSource", []);
 
-  getShaderPrecisionFormat_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getShaderPrecisionFormat", [__arg_0, __arg_1]);
+  getShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getShaderSource", [__arg_0]);
 
-  getShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getShaderSource", []);
+  getSupportedExtensions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getSupportedExtensions", []);
 
-  getShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getShaderSource", [__arg_0]);
+  getTexParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", []);
 
-  getSupportedExtensions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSupportedExtensions", []);
+  getTexParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", [__arg_0]);
 
-  getTexParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTexParameter", []);
+  getTexParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getTexParameter", [__arg_0, __arg_1]);
 
-  getTexParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTexParameter", [__arg_0]);
+  getUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", []);
 
-  getTexParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getTexParameter", [__arg_0, __arg_1]);
+  getUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", [__arg_0]);
 
-  getUniformLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getUniformLocation", []);
+  getUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniform", [__arg_0, __arg_1]);
 
-  getUniformLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getUniformLocation", [__arg_0]);
+  getUniformLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", []);
 
-  getUniformLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getUniformLocation", [__arg_0, __arg_1]);
+  getUniformLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", [__arg_0]);
 
-  getUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getUniform", []);
+  getUniformLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getUniformLocation", [__arg_0, __arg_1]);
 
-  getUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getUniform", [__arg_0]);
+  getVertexAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", []);
 
-  getUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getUniform", [__arg_0, __arg_1]);
+  getVertexAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", [__arg_0]);
 
-  getVertexAttribOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttribOffset", []);
+  getVertexAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttrib", [__arg_0, __arg_1]);
 
-  getVertexAttribOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttribOffset", [__arg_0]);
+  getVertexAttribOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", []);
 
-  getVertexAttribOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttribOffset", [__arg_0, __arg_1]);
+  getVertexAttribOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", [__arg_0]);
 
-  getVertexAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttrib", []);
+  getVertexAttribOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "getVertexAttribOffset", [__arg_0, __arg_1]);
 
-  getVertexAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttrib", [__arg_0]);
+  hint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", []);
 
-  getVertexAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttrib", [__arg_0, __arg_1]);
+  hint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", [__arg_0]);
 
-  hint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hint", []);
+  hint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "hint", [__arg_0, __arg_1]);
 
-  hint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hint", [__arg_0]);
+  isBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isBuffer", []);
 
-  hint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "hint", [__arg_0, __arg_1]);
+  isBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isBuffer", [__arg_0]);
 
-  isBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isBuffer", []);
+  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isContextLost", []);
 
-  isBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isBuffer", [__arg_0]);
+  isEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isEnabled", []);
 
-  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isContextLost", []);
+  isEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isEnabled", [__arg_0]);
 
-  isEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isEnabled", []);
+  isFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isFramebuffer", []);
 
-  isEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isEnabled", [__arg_0]);
+  isFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isFramebuffer", [__arg_0]);
 
-  isFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isFramebuffer", []);
+  isProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isProgram", []);
 
-  isFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isFramebuffer", [__arg_0]);
+  isProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isProgram", [__arg_0]);
 
-  isProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isProgram", []);
+  isRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isRenderbuffer", []);
 
-  isProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isProgram", [__arg_0]);
+  isRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isRenderbuffer", [__arg_0]);
 
-  isRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isRenderbuffer", []);
+  isShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isShader", []);
 
-  isRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isRenderbuffer", [__arg_0]);
+  isShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isShader", [__arg_0]);
 
-  isShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isShader", []);
+  isTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isTexture", []);
 
-  isShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isShader", [__arg_0]);
+  isTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "isTexture", [__arg_0]);
 
-  isTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isTexture", []);
+  lineWidth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "lineWidth", []);
 
-  isTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isTexture", [__arg_0]);
+  lineWidth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "lineWidth", [__arg_0]);
 
-  lineWidth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lineWidth", []);
+  linkProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "linkProgram", []);
 
-  lineWidth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lineWidth", [__arg_0]);
+  linkProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "linkProgram", [__arg_0]);
 
-  linkProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "linkProgram", []);
+  pixelStorei_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", []);
 
-  linkProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "linkProgram", [__arg_0]);
+  pixelStorei_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", [__arg_0]);
 
-  pixelStorei_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pixelStorei", []);
+  pixelStorei_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "pixelStorei", [__arg_0, __arg_1]);
 
-  pixelStorei_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "pixelStorei", [__arg_0]);
+  polygonOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", []);
 
-  pixelStorei_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "pixelStorei", [__arg_0, __arg_1]);
+  polygonOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", [__arg_0]);
 
-  polygonOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "polygonOffset", []);
+  polygonOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "polygonOffset", [__arg_0, __arg_1]);
 
-  polygonOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "polygonOffset", [__arg_0]);
+  readPixels_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  polygonOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "polygonOffset", [__arg_0, __arg_1]);
+  readPixels_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  readPixels_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  readPixels_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  readPixels_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  renderbufferStorage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1]);
 
-  readPixels_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  renderbufferStorage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1, __arg_2]);
 
-  renderbufferStorage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "renderbufferStorage", [__arg_0, __arg_1]);
+  renderbufferStorage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "renderbufferStorage", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  renderbufferStorage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "renderbufferStorage", [__arg_0, __arg_1, __arg_2]);
+  sampleCoverage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", []);
 
-  renderbufferStorage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "renderbufferStorage", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  sampleCoverage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", [__arg_0]);
 
-  sampleCoverage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "sampleCoverage", []);
+  sampleCoverage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "sampleCoverage", [__arg_0, __arg_1]);
 
-  sampleCoverage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sampleCoverage", [__arg_0]);
+  scissor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1]);
 
-  sampleCoverage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "sampleCoverage", [__arg_0, __arg_1]);
+  scissor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1, __arg_2]);
 
-  scissor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scissor", [__arg_0, __arg_1]);
+  scissor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "scissor", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  scissor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scissor", [__arg_0, __arg_1, __arg_2]);
+  shaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", []);
 
-  scissor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "scissor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  shaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", [__arg_0]);
 
-  shaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "shaderSource", []);
+  shaderSource_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "shaderSource", [__arg_0, __arg_1]);
 
-  shaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "shaderSource", [__arg_0]);
+  stencilFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0]);
 
-  shaderSource_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "shaderSource", [__arg_0, __arg_1]);
+  stencilFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0, __arg_1]);
 
-  stencilFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilFuncSeparate", [__arg_0, __arg_1]);
+  stencilFunc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFunc", [__arg_0, __arg_1, __arg_2]);
 
-  stencilFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+  stencilFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1]);
 
-  stencilFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  stencilFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2]);
 
-  stencilFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stencilFunc", [__arg_0]);
+  stencilFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  stencilFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilFunc", [__arg_0, __arg_1]);
+  stencilMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMask", []);
 
-  stencilFunc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "stencilFunc", [__arg_0, __arg_1, __arg_2]);
+  stencilMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMask", [__arg_0]);
 
-  stencilMaskSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stencilMaskSeparate", []);
+  stencilMaskSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", []);
 
-  stencilMaskSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stencilMaskSeparate", [__arg_0]);
+  stencilMaskSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", [__arg_0]);
 
-  stencilMaskSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilMaskSeparate", [__arg_0, __arg_1]);
+  stencilMaskSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilMaskSeparate", [__arg_0, __arg_1]);
 
-  stencilMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stencilMask", []);
+  stencilOp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0]);
 
-  stencilMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stencilMask", [__arg_0]);
+  stencilOp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0, __arg_1]);
 
-  stencilOpSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilOpSeparate", [__arg_0, __arg_1]);
+  stencilOp_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOp", [__arg_0, __arg_1, __arg_2]);
 
-  stencilOpSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2]);
+  stencilOpSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1]);
 
-  stencilOpSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  stencilOpSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2]);
 
-  stencilOp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stencilOp", [__arg_0]);
+  stencilOpSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "stencilOpSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  stencilOp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilOp", [__arg_0, __arg_1]);
+  texImage2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  stencilOp_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "stencilOp", [__arg_0, __arg_1, __arg_2]);
+  texImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  texImage2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  texImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  texImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  texImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  texImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  texImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  texImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  texImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
 
-  texImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  texParameterf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0]);
 
-  texImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  texParameterf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0, __arg_1]);
 
-  texParameterf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "texParameterf", [__arg_0]);
+  texParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameterf", [__arg_0, __arg_1, __arg_2]);
 
-  texParameterf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "texParameterf", [__arg_0, __arg_1]);
+  texParameteri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0]);
 
-  texParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "texParameterf", [__arg_0, __arg_1, __arg_2]);
+  texParameteri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0, __arg_1]);
 
-  texParameteri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "texParameteri", [__arg_0]);
+  texParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texParameteri", [__arg_0, __arg_1, __arg_2]);
 
-  texParameteri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "texParameteri", [__arg_0, __arg_1]);
+  texSubImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  texParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "texParameteri", [__arg_0, __arg_1, __arg_2]);
+  texSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  texSubImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  texSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  texSubImage2D_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  texSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  texSubImage2D_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  texSubImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
 
-  texSubImage2D_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => Blink_JsNative_DomException.callMethod(mthis, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  uniform1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", []);
 
-  texSubImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => Blink_JsNative_DomException.callMethod(mthis, "texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  uniform1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", [__arg_0]);
 
-  uniform1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform1f", []);
+  uniform1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1f", [__arg_0, __arg_1]);
 
-  uniform1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform1f", [__arg_0]);
+  uniform1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", []);
 
-  uniform1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform1f", [__arg_0, __arg_1]);
+  uniform1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", [__arg_0]);
 
-  uniform1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform1fv", []);
+  uniform1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1fv", [__arg_0, __arg_1]);
 
-  uniform1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform1fv", [__arg_0]);
+  uniform1i_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", []);
 
-  uniform1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform1fv", [__arg_0, __arg_1]);
+  uniform1i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", [__arg_0]);
 
-  uniform1i_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform1i", []);
+  uniform1i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1i", [__arg_0, __arg_1]);
 
-  uniform1i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform1i", [__arg_0]);
+  uniform1iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", []);
 
-  uniform1i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform1i", [__arg_0, __arg_1]);
+  uniform1iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", [__arg_0]);
 
-  uniform1iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform1iv", []);
+  uniform1iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform1iv", [__arg_0, __arg_1]);
 
-  uniform1iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform1iv", [__arg_0]);
+  uniform2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0]);
 
-  uniform1iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform1iv", [__arg_0, __arg_1]);
+  uniform2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0, __arg_1]);
 
-  uniform2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform2f", [__arg_0]);
+  uniform2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2f", [__arg_0, __arg_1, __arg_2]);
 
-  uniform2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform2f", [__arg_0, __arg_1]);
+  uniform2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", []);
 
-  uniform2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform2f", [__arg_0, __arg_1, __arg_2]);
+  uniform2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", [__arg_0]);
 
-  uniform2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform2fv", []);
+  uniform2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2fv", [__arg_0, __arg_1]);
 
-  uniform2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform2fv", [__arg_0]);
+  uniform2i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0]);
 
-  uniform2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform2fv", [__arg_0, __arg_1]);
+  uniform2i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0, __arg_1]);
 
-  uniform2i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform2i", [__arg_0]);
+  uniform2i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2i", [__arg_0, __arg_1, __arg_2]);
 
-  uniform2i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform2i", [__arg_0, __arg_1]);
+  uniform2iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", []);
 
-  uniform2i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform2i", [__arg_0, __arg_1, __arg_2]);
+  uniform2iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", [__arg_0]);
 
-  uniform2iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform2iv", []);
+  uniform2iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform2iv", [__arg_0, __arg_1]);
 
-  uniform2iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform2iv", [__arg_0]);
+  uniform3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1]);
 
-  uniform2iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform2iv", [__arg_0, __arg_1]);
+  uniform3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1, __arg_2]);
 
-  uniform3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform3f", [__arg_0, __arg_1]);
+  uniform3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  uniform3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform3f", [__arg_0, __arg_1, __arg_2]);
+  uniform3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", []);
 
-  uniform3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "uniform3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  uniform3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", [__arg_0]);
 
-  uniform3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform3fv", []);
+  uniform3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3fv", [__arg_0, __arg_1]);
 
-  uniform3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform3fv", [__arg_0]);
+  uniform3i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1]);
 
-  uniform3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform3fv", [__arg_0, __arg_1]);
+  uniform3i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1, __arg_2]);
 
-  uniform3i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform3i", [__arg_0, __arg_1]);
+  uniform3i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3i", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  uniform3i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform3i", [__arg_0, __arg_1, __arg_2]);
+  uniform3iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", []);
 
-  uniform3i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "uniform3i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  uniform3iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", [__arg_0]);
 
-  uniform3iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform3iv", []);
+  uniform3iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform3iv", [__arg_0, __arg_1]);
 
-  uniform3iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform3iv", [__arg_0]);
+  uniform4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2]);
 
-  uniform3iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform3iv", [__arg_0, __arg_1]);
+  uniform4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  uniform4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform4f", [__arg_0, __arg_1, __arg_2]);
+  uniform4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  uniform4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  uniform4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", []);
 
-  uniform4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  uniform4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", [__arg_0]);
 
-  uniform4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform4fv", []);
+  uniform4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4fv", [__arg_0, __arg_1]);
 
-  uniform4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform4fv", [__arg_0]);
+  uniform4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2]);
 
-  uniform4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform4fv", [__arg_0, __arg_1]);
+  uniform4i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  uniform4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform4i", [__arg_0, __arg_1, __arg_2]);
+  uniform4i_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  uniform4i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  uniform4iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", []);
 
-  uniform4i_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  uniform4iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", [__arg_0]);
 
-  uniform4iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform4iv", []);
+  uniform4iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniform4iv", [__arg_0, __arg_1]);
 
-  uniform4iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform4iv", [__arg_0]);
+  uniformMatrix2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0]);
 
-  uniform4iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform4iv", [__arg_0, __arg_1]);
+  uniformMatrix2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0, __arg_1]);
 
-  uniformMatrix2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix2fv", [__arg_0]);
+  uniformMatrix2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix2fv", [__arg_0, __arg_1, __arg_2]);
 
-  uniformMatrix2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix2fv", [__arg_0, __arg_1]);
+  uniformMatrix3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0]);
 
-  uniformMatrix2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix2fv", [__arg_0, __arg_1, __arg_2]);
+  uniformMatrix3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0, __arg_1]);
 
-  uniformMatrix3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix3fv", [__arg_0]);
+  uniformMatrix3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix3fv", [__arg_0, __arg_1, __arg_2]);
 
-  uniformMatrix3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix3fv", [__arg_0, __arg_1]);
+  uniformMatrix4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0]);
 
-  uniformMatrix3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix3fv", [__arg_0, __arg_1, __arg_2]);
+  uniformMatrix4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0, __arg_1]);
 
-  uniformMatrix4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix4fv", [__arg_0]);
+  uniformMatrix4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "uniformMatrix4fv", [__arg_0, __arg_1, __arg_2]);
 
-  uniformMatrix4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix4fv", [__arg_0, __arg_1]);
+  useProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "useProgram", []);
 
-  uniformMatrix4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix4fv", [__arg_0, __arg_1, __arg_2]);
+  useProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "useProgram", [__arg_0]);
 
-  useProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "useProgram", []);
+  validateProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "validateProgram", []);
 
-  useProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "useProgram", [__arg_0]);
+  validateProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "validateProgram", [__arg_0]);
 
-  validateProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "validateProgram", []);
+  vertexAttrib1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", []);
 
-  validateProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "validateProgram", [__arg_0]);
+  vertexAttrib1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", [__arg_0]);
 
-  vertexAttrib1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1f", []);
+  vertexAttrib1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1f", [__arg_0, __arg_1]);
 
-  vertexAttrib1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1f", [__arg_0]);
+  vertexAttrib1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", []);
 
-  vertexAttrib1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1f", [__arg_0, __arg_1]);
+  vertexAttrib1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", [__arg_0]);
 
-  vertexAttrib1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1fv", []);
+  vertexAttrib1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib1fv", [__arg_0, __arg_1]);
 
-  vertexAttrib1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1fv", [__arg_0]);
+  vertexAttrib2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0]);
 
-  vertexAttrib1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1fv", [__arg_0, __arg_1]);
+  vertexAttrib2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0, __arg_1]);
 
-  vertexAttrib2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2f", [__arg_0]);
+  vertexAttrib2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2f", [__arg_0, __arg_1, __arg_2]);
 
-  vertexAttrib2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2f", [__arg_0, __arg_1]);
+  vertexAttrib2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", []);
 
-  vertexAttrib2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2f", [__arg_0, __arg_1, __arg_2]);
+  vertexAttrib2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", [__arg_0]);
 
-  vertexAttrib2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2fv", []);
+  vertexAttrib2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib2fv", [__arg_0, __arg_1]);
 
-  vertexAttrib2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2fv", [__arg_0]);
+  vertexAttrib3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1]);
 
-  vertexAttrib2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2fv", [__arg_0, __arg_1]);
+  vertexAttrib3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2]);
 
-  vertexAttrib3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3f", [__arg_0, __arg_1]);
+  vertexAttrib3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  vertexAttrib3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2]);
+  vertexAttrib3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", []);
 
-  vertexAttrib3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  vertexAttrib3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", [__arg_0]);
 
-  vertexAttrib3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3fv", []);
+  vertexAttrib3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib3fv", [__arg_0, __arg_1]);
 
-  vertexAttrib3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3fv", [__arg_0]);
+  vertexAttrib4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2]);
 
-  vertexAttrib3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3fv", [__arg_0, __arg_1]);
+  vertexAttrib4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  vertexAttrib4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2]);
+  vertexAttrib4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  vertexAttrib4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  vertexAttrib4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", []);
 
-  vertexAttrib4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  vertexAttrib4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", [__arg_0]);
 
-  vertexAttrib4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4fv", []);
+  vertexAttrib4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttrib4fv", [__arg_0, __arg_1]);
 
-  vertexAttrib4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4fv", [__arg_0]);
+  vertexAttribPointer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  vertexAttrib4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4fv", [__arg_0, __arg_1]);
+  vertexAttribPointer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  vertexAttribPointer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  vertexAttribPointer_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  vertexAttribPointer_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  viewport_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1]);
 
-  vertexAttribPointer_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  viewport_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1, __arg_2]);
 
-  viewport_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "viewport", [__arg_0, __arg_1]);
+  viewport_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebGLRenderingContextBase */, "viewport", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  viewport_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "viewport", [__arg_0, __arg_1, __arg_2]);
+}
 
-  viewport_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "viewport", [__arg_0, __arg_1, __arg_2, __arg_3]);
+class BlinkWebGLSampler {
+  static final instance = new BlinkWebGLSampler();
 
 }
 
@@ -15745,11 +21687,16 @@
 class BlinkWebGLShaderPrecisionFormat {
   static final instance = new BlinkWebGLShaderPrecisionFormat();
 
-  precision_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "precision");
+  precision_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLShaderPrecisionFormat */, "precision");
 
-  rangeMax_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeMax");
+  rangeMax_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLShaderPrecisionFormat */, "rangeMax");
 
-  rangeMin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeMin");
+  rangeMin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebGLShaderPrecisionFormat */, "rangeMin");
+
+}
+
+class BlinkWebGLSync {
+  static final instance = new BlinkWebGLSync();
 
 }
 
@@ -15758,998 +21705,1108 @@
 
 }
 
+class BlinkWebGLTransformFeedback {
+  static final instance = new BlinkWebGLTransformFeedback();
+
+}
+
 class BlinkWebGLUniformLocation {
   static final instance = new BlinkWebGLUniformLocation();
 
 }
 
+class BlinkWebGLVertexArrayObject {
+  static final instance = new BlinkWebGLVertexArrayObject();
+
+}
+
 class BlinkWebGLVertexArrayObjectOES {
   static final instance = new BlinkWebGLVertexArrayObjectOES();
 
 }
 
-class BlinkWebKitAnimationEvent extends BlinkEvent {
-  static final instance = new BlinkWebKitAnimationEvent();
-
-  animationName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animationName");
-
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebKitAnimationEvent"), [__arg_0, __arg_1]);
-
-  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elapsedTime");
-
-}
-
-class BlinkWebKitCSSFilterRule extends BlinkCSSRule {
-  static final instance = new BlinkWebKitCSSFilterRule();
-
-  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
-
-}
-
-class BlinkWebKitCSSFilterValue extends BlinkCSSValueList {
-  static final instance = new BlinkWebKitCSSFilterValue();
-
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
-
-  operationType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "operationType");
-
-}
-
 class BlinkWebKitCSSMatrix {
   static final instance = new BlinkWebKitCSSMatrix();
 
-  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "a");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("WebKitCSSMatrix");
 
-  a_Setter_(mthis, __arg_0) => mthis["a"] = __arg_0;
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("WebKitCSSMatrix", [__arg_0]);
 
-  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "b");
+  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "a");
 
-  b_Setter_(mthis, __arg_0) => mthis["b"] = __arg_0;
+  a_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "a", __arg_0);
 
-  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "c");
+  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "b");
 
-  c_Setter_(mthis, __arg_0) => mthis["c"] = __arg_0;
+  b_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "b", __arg_0);
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebKitCSSMatrix"), []);
+  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "c");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebKitCSSMatrix"), [__arg_0]);
+  c_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "c", __arg_0);
 
-  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "d");
+  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "d");
 
-  d_Setter_(mthis, __arg_0) => mthis["d"] = __arg_0;
+  d_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "d", __arg_0);
 
-  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "e");
+  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "e");
 
-  e_Setter_(mthis, __arg_0) => mthis["e"] = __arg_0;
+  e_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "e", __arg_0);
 
-  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "f");
+  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "f");
 
-  f_Setter_(mthis, __arg_0) => mthis["f"] = __arg_0;
+  f_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "f", __arg_0);
 
-  inverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "inverse", []);
+  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m11");
 
-  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m11");
+  m11_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m11", __arg_0);
 
-  m11_Setter_(mthis, __arg_0) => mthis["m11"] = __arg_0;
+  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m12");
 
-  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m12");
+  m12_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m12", __arg_0);
 
-  m12_Setter_(mthis, __arg_0) => mthis["m12"] = __arg_0;
+  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m13");
 
-  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m13");
+  m13_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m13", __arg_0);
 
-  m13_Setter_(mthis, __arg_0) => mthis["m13"] = __arg_0;
+  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m14");
 
-  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m14");
+  m14_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m14", __arg_0);
 
-  m14_Setter_(mthis, __arg_0) => mthis["m14"] = __arg_0;
+  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m21");
 
-  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m21");
+  m21_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m21", __arg_0);
 
-  m21_Setter_(mthis, __arg_0) => mthis["m21"] = __arg_0;
+  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m22");
 
-  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m22");
+  m22_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m22", __arg_0);
 
-  m22_Setter_(mthis, __arg_0) => mthis["m22"] = __arg_0;
+  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m23");
 
-  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m23");
+  m23_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m23", __arg_0);
 
-  m23_Setter_(mthis, __arg_0) => mthis["m23"] = __arg_0;
+  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m24");
 
-  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m24");
+  m24_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m24", __arg_0);
 
-  m24_Setter_(mthis, __arg_0) => mthis["m24"] = __arg_0;
+  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m31");
 
-  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m31");
+  m31_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m31", __arg_0);
 
-  m31_Setter_(mthis, __arg_0) => mthis["m31"] = __arg_0;
+  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m32");
 
-  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m32");
+  m32_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m32", __arg_0);
 
-  m32_Setter_(mthis, __arg_0) => mthis["m32"] = __arg_0;
+  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m33");
 
-  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m33");
+  m33_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m33", __arg_0);
 
-  m33_Setter_(mthis, __arg_0) => mthis["m33"] = __arg_0;
+  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m34");
 
-  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m34");
+  m34_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m34", __arg_0);
 
-  m34_Setter_(mthis, __arg_0) => mthis["m34"] = __arg_0;
+  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m41");
 
-  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m41");
+  m41_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m41", __arg_0);
 
-  m41_Setter_(mthis, __arg_0) => mthis["m41"] = __arg_0;
+  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m42");
 
-  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m42");
+  m42_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m42", __arg_0);
 
-  m42_Setter_(mthis, __arg_0) => mthis["m42"] = __arg_0;
+  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m43");
 
-  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m43");
+  m43_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m43", __arg_0);
 
-  m43_Setter_(mthis, __arg_0) => mthis["m43"] = __arg_0;
+  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebKitCSSMatrix */, "m44");
 
-  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m44");
+  m44_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebKitCSSMatrix */, "m44", __arg_0);
 
-  m44_Setter_(mthis, __arg_0) => mthis["m44"] = __arg_0;
-
-  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "multiply", []);
-
-  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "multiply", [__arg_0]);
-
-  rotateAxisAngle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotateAxisAngle", []);
-
-  rotateAxisAngle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotateAxisAngle", [__arg_0]);
-
-  rotateAxisAngle_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "rotateAxisAngle", [__arg_0, __arg_1]);
-
-  rotateAxisAngle_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "rotateAxisAngle", [__arg_0, __arg_1, __arg_2]);
-
-  rotateAxisAngle_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "rotateAxisAngle", [__arg_0, __arg_1, __arg_2, __arg_3]);
-
-  rotate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotate", []);
-
-  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotate", [__arg_0]);
-
-  rotate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "rotate", [__arg_0, __arg_1]);
-
-  rotate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "rotate", [__arg_0, __arg_1, __arg_2]);
-
-  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale", []);
-
-  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0]);
-
-  scale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0, __arg_1]);
-
-  scale_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0, __arg_1, __arg_2]);
-
-  setMatrixValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setMatrixValue", []);
-
-  setMatrixValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setMatrixValue", [__arg_0]);
-
-  skewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "skewX", []);
-
-  skewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "skewX", [__arg_0]);
-
-  skewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "skewY", []);
-
-  skewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "skewY", [__arg_0]);
-
-  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translate", []);
-
-  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0]);
-
-  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1]);
+  inverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "inverse", []);
 
-  translate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1, __arg_2]);
+  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "multiply", []);
 
-}
+  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "multiply", [__arg_0]);
 
-class BlinkWebKitCSSTransformValue extends BlinkCSSValueList {
-  static final instance = new BlinkWebKitCSSTransformValue();
+  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "rotate", [__arg_0]);
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  rotate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "rotate", [__arg_0, __arg_1]);
 
-  operationType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "operationType");
+  rotate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "rotate", [__arg_0, __arg_1, __arg_2]);
 
-}
+  rotateAxisAngle_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "rotateAxisAngle", [__arg_0, __arg_1]);
 
-class BlinkWebKitGamepad {
-  static final instance = new BlinkWebKitGamepad();
+  rotateAxisAngle_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "rotateAxisAngle", [__arg_0, __arg_1, __arg_2]);
 
-  axes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "axes");
+  rotateAxisAngle_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "rotateAxisAngle", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  buttons_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buttons");
+  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "scale", [__arg_0]);
 
-  connected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connected");
+  scale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "scale", [__arg_0, __arg_1]);
 
-  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
+  scale_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "scale", [__arg_0, __arg_1, __arg_2]);
 
-  index_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "index");
+  setMatrixValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "setMatrixValue", []);
 
-  mapping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mapping");
+  setMatrixValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "setMatrixValue", [__arg_0]);
 
-  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestamp");
+  skewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "skewX", []);
 
-}
+  skewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "skewX", [__arg_0]);
 
-class BlinkWebKitGamepadList {
-  static final instance = new BlinkWebKitGamepadList();
+  skewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "skewY", []);
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  skewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "skewY", [__arg_0]);
 
-  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
+  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "translate", [__arg_0]);
 
-  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
+  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "translate", [__arg_0, __arg_1]);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  translate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WebKitCSSMatrix */, "translate", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkWebSocket extends BlinkEventTarget {
   static final instance = new BlinkWebSocket();
 
-  URL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "URL");
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("WebSocket");
 
-  binaryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "binaryType");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("WebSocket", [__arg_0]);
 
-  binaryType_Setter_(mthis, __arg_0) => mthis["binaryType"] = __arg_0;
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("WebSocket", [__arg_0, __arg_1]);
 
-  bufferedAmount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bufferedAmount");
+  binaryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "binaryType");
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  binaryType_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebSocket */, "binaryType", __arg_0);
 
-  close_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "close", [__arg_0]);
+  bufferedAmount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "bufferedAmount");
 
-  close_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "close", [__arg_0, __arg_1]);
+  extensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "extensions");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebSocket"), []);
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "onclose");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebSocket"), [__arg_0]);
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebSocket */, "onclose", __arg_0);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebSocket"), [__arg_0, __arg_1]);
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "onerror");
 
-  extensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "extensions");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebSocket */, "onerror", __arg_0);
 
-  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "onmessage");
 
-  onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebSocket */, "onmessage", __arg_0);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "onopen");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onopen_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WebSocket */, "onopen", __arg_0);
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "protocol");
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "readyState");
 
-  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onopen");
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WebSocket */, "url");
 
-  onopen_Setter_(mthis, __arg_0) => mthis["onopen"] = __arg_0;
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebSocket */, "close", []);
 
-  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
+  close_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebSocket */, "close", [__arg_0]);
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  close_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WebSocket */, "close", [__arg_0, __arg_1]);
 
-  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "send", []);
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WebSocket */, "send", []);
 
-  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0]);
-
-  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WebSocket */, "send", [__arg_0]);
 
 }
 
 class BlinkWheelEvent extends BlinkMouseEvent {
   static final instance = new BlinkWheelEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WheelEvent"), [__arg_0, __arg_1]);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("WheelEvent");
 
-  deltaMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deltaMode");
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("WheelEvent", [__arg_0]);
 
-  deltaX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deltaX");
+  constructorCallback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callConstructor("WheelEvent", [__arg_0, __arg_1]);
 
-  deltaY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deltaY");
+  deltaMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WheelEvent */, "deltaMode");
 
-  deltaZ_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deltaZ");
+  deltaX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WheelEvent */, "deltaX");
 
-  wheelDeltaX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wheelDeltaX");
+  deltaY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WheelEvent */, "deltaY");
 
-  wheelDeltaY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wheelDeltaY");
+  deltaZ_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WheelEvent */, "deltaZ");
+
+  wheelDelta_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WheelEvent */, "wheelDelta");
+
+  wheelDeltaX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WheelEvent */, "wheelDeltaX");
+
+  wheelDeltaY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WheelEvent */, "wheelDeltaY");
 
 }
 
 class BlinkWindow extends BlinkEventTarget {
   static final instance = new BlinkWindow();
 
-  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
+  applicationCache_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "applicationCache");
 
-  CSS_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "CSS");
+  caches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "caches");
 
-  alert_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "alert", []);
+  clientInformation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "clientInformation");
 
-  alert_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "alert", [__arg_0]);
+  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "closed");
 
-  applicationCache_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "applicationCache");
+  console_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "console");
 
-  atob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "atob", []);
+  crypto_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "crypto");
 
-  atob_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "atob", [__arg_0]);
+  defaultStatus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "defaultStatus");
 
-  blur_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blur", []);
+  defaultStatus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "defaultStatus", __arg_0);
 
-  btoa_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "btoa", []);
+  defaultstatus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "defaultstatus");
 
-  btoa_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "btoa", [__arg_0]);
+  defaultstatus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "defaultstatus", __arg_0);
 
-  cancelAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancelAnimationFrame", []);
+  devicePixelRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "devicePixelRatio");
 
-  cancelAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cancelAnimationFrame", [__arg_0]);
+  document_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "document");
 
-  captureEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "captureEvents", []);
+  event_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "event");
 
-  clearInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearInterval", []);
+  event_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "event", __arg_0);
 
-  clearInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearInterval", [__arg_0]);
+  frameElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "frameElement");
 
-  clearTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearTimeout", []);
+  frames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "frames");
 
-  clearTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearTimeout", [__arg_0]);
+  history_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "history");
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  indexedDB_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "indexedDB");
 
-  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "closed");
+  innerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "innerHeight");
 
-  confirm_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "confirm", []);
+  innerWidth_Getter_(mthis) native "Blink_Getter_Window_innerWidth";
 
-  confirm_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "confirm", [__arg_0]);
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "length");
 
-  console_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "console");
+  localStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "localStorage");
 
-  crypto_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crypto");
+  location_Getter_(mthis) native "Blink_Getter_Window_location";
 
-  defaultStatus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultStatus");
+  locationbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "locationbar");
 
-  defaultStatus_Setter_(mthis, __arg_0) => mthis["defaultStatus"] = __arg_0;
+  menubar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "menubar");
 
-  defaultstatus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultstatus");
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "name");
 
-  defaultstatus_Setter_(mthis, __arg_0) => mthis["defaultstatus"] = __arg_0;
+  name_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "name", __arg_0);
 
-  devicePixelRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "devicePixelRatio");
+  navigator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "navigator");
 
-  document_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "document");
+  offscreenBuffering_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "offscreenBuffering");
 
-  event_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "event");
+  onanimationend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onanimationend");
 
-  event_Setter_(mthis, __arg_0) => mthis["event"] = __arg_0;
+  onanimationend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onanimationend", __arg_0);
 
-  find_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "find", []);
+  onanimationiteration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onanimationiteration");
 
-  find_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0]);
+  onanimationiteration_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onanimationiteration", __arg_0);
 
-  find_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0, __arg_1]);
+  onanimationstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onanimationstart");
 
-  find_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0, __arg_1, __arg_2]);
+  onanimationstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onanimationstart", __arg_0);
 
-  find_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  ondevicelight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "ondevicelight");
 
-  find_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  ondevicelight_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "ondevicelight", __arg_0);
 
-  find_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  ondevicemotion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "ondevicemotion");
 
-  find_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  ondevicemotion_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "ondevicemotion", __arg_0);
 
-  focus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "focus", []);
+  ondeviceorientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "ondeviceorientation");
 
-  frameElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frameElement");
+  ondeviceorientation_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "ondeviceorientation", __arg_0);
 
-  frames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frames");
+  onorientationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onorientationchange");
 
-  getComputedStyle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getComputedStyle", []);
+  onorientationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onorientationchange", __arg_0);
 
-  getComputedStyle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getComputedStyle", [__arg_0]);
+  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onsearch");
 
-  getComputedStyle_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getComputedStyle", [__arg_0, __arg_1]);
+  onsearch_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onsearch", __arg_0);
 
-  getMatchedCSSRules_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getMatchedCSSRules", []);
+  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "ontouchcancel");
 
-  getMatchedCSSRules_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getMatchedCSSRules", [__arg_0]);
+  ontouchcancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "ontouchcancel", __arg_0);
 
-  getMatchedCSSRules_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getMatchedCSSRules", [__arg_0, __arg_1]);
+  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "ontouchend");
 
-  getSelection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSelection", []);
+  ontouchend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "ontouchend", __arg_0);
 
-  history_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "history");
+  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "ontouchmove");
 
-  indexedDB_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "indexedDB");
+  ontouchmove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "ontouchmove", __arg_0);
 
-  innerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerHeight");
+  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "ontouchstart");
 
-  innerWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerWidth");
+  ontouchstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "ontouchstart", __arg_0);
 
-  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
+  ontransitionend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "ontransitionend");
 
-  localStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localStorage");
+  ontransitionend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "ontransitionend", __arg_0);
 
-  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "location");
+  onwebkitanimationend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onwebkitanimationend");
 
-  location_Setter_(mthis, __arg_0) => mthis["location"] = __arg_0;
+  onwebkitanimationend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onwebkitanimationend", __arg_0);
 
-  locationbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "locationbar");
+  onwebkitanimationiteration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onwebkitanimationiteration");
 
-  matchMedia_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matchMedia", []);
+  onwebkitanimationiteration_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onwebkitanimationiteration", __arg_0);
 
-  matchMedia_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matchMedia", [__arg_0]);
+  onwebkitanimationstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onwebkitanimationstart");
 
-  menubar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "menubar");
+  onwebkitanimationstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onwebkitanimationstart", __arg_0);
 
-  moveBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveBy", []);
+  onwebkittransitionend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onwebkittransitionend");
 
-  moveBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveBy", [__arg_0]);
+  onwebkittransitionend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onwebkittransitionend", __arg_0);
 
-  moveBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveBy", [__arg_0, __arg_1]);
+  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "onwheel");
 
-  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
+  onwheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "onwheel", __arg_0);
 
-  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
+  opener_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "opener");
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
+  opener_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "opener", __arg_0);
 
-  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
+  orientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "orientation");
 
-  name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
+  outerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "outerHeight");
 
-  navigator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "navigator");
+  outerWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "outerWidth");
 
-  offscreenBuffering_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offscreenBuffering");
+  pageXOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "pageXOffset");
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  pageYOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "pageYOffset");
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  parent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "parent");
 
-  onanimationend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onanimationend");
+  performance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "performance");
 
-  onanimationend_Setter_(mthis, __arg_0) => mthis["onanimationend"] = __arg_0;
+  personalbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "personalbar");
 
-  onanimationiteration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onanimationiteration");
+  screen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "screen");
 
-  onanimationiteration_Setter_(mthis, __arg_0) => mthis["onanimationiteration"] = __arg_0;
+  screenLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "screenLeft");
 
-  onanimationstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onanimationstart");
+  screenTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "screenTop");
 
-  onanimationstart_Setter_(mthis, __arg_0) => mthis["onanimationstart"] = __arg_0;
+  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "screenX");
 
-  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocomplete");
+  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "screenY");
 
-  onautocomplete_Setter_(mthis, __arg_0) => mthis["onautocomplete"] = __arg_0;
+  scrollX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "scrollX");
 
-  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocompleteerror");
+  scrollY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "scrollY");
 
-  onautocompleteerror_Setter_(mthis, __arg_0) => mthis["onautocompleteerror"] = __arg_0;
+  scrollbars_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "scrollbars");
 
-  onbeforeunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforeunload");
+  self_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "self");
 
-  onbeforeunload_Setter_(mthis, __arg_0) => mthis["onbeforeunload"] = __arg_0;
+  sessionStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "sessionStorage");
 
-  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
+  speechSynthesis_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "speechSynthesis");
 
-  onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "status");
 
-  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncancel");
+  status_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Window */, "status", __arg_0);
 
-  oncancel_Setter_(mthis, __arg_0) => mthis["oncancel"] = __arg_0;
+  statusbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "statusbar");
 
-  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplay");
+  styleMedia_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "styleMedia");
 
-  oncanplay_Setter_(mthis, __arg_0) => mthis["oncanplay"] = __arg_0;
+  toolbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "toolbar");
 
-  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplaythrough");
+  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "top");
 
-  oncanplaythrough_Setter_(mthis, __arg_0) => mthis["oncanplaythrough"] = __arg_0;
+  webkitIndexedDB_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "webkitIndexedDB");
 
-  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
+  webkitStorageInfo_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "webkitStorageInfo");
 
-  onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
+  window_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Window */, "window");
 
-  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "__getter__", [__arg_0]);
 
-  onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
+  alert_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "alert", []);
 
-  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
+  alert_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "alert", [__arg_0]);
 
-  onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
+  blur_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "blur", []);
 
-  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncontextmenu");
+  cancelAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "cancelAnimationFrame", []);
 
-  oncontextmenu_Setter_(mthis, __arg_0) => mthis["oncontextmenu"] = __arg_0;
+  cancelAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "cancelAnimationFrame", [__arg_0]);
 
-  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
+  captureEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "captureEvents", []);
 
-  oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "close", []);
 
-  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondblclick");
+  confirm_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "confirm", []);
 
-  ondblclick_Setter_(mthis, __arg_0) => mthis["ondblclick"] = __arg_0;
+  confirm_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "confirm", [__arg_0]);
 
-  ondevicelight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondevicelight");
+  createImageBitmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "createImageBitmap", []);
 
-  ondevicelight_Setter_(mthis, __arg_0) => mthis["ondevicelight"] = __arg_0;
+  createImageBitmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "createImageBitmap", [__arg_0]);
 
-  ondevicemotion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondevicemotion");
+  createImageBitmap_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "createImageBitmap", [__arg_0, __arg_1]);
 
-  ondevicemotion_Setter_(mthis, __arg_0) => mthis["ondevicemotion"] = __arg_0;
+  createImageBitmap_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "createImageBitmap", [__arg_0, __arg_1, __arg_2]);
 
-  ondeviceorientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondeviceorientation");
+  createImageBitmap_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "createImageBitmap", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  ondeviceorientation_Setter_(mthis, __arg_0) => mthis["ondeviceorientation"] = __arg_0;
+  createImageBitmap_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "createImageBitmap", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrag");
+  fetch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "fetch", []);
 
-  ondrag_Setter_(mthis, __arg_0) => mthis["ondrag"] = __arg_0;
+  fetch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "fetch", [__arg_0]);
 
-  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragend");
+  fetch_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "fetch", [__arg_0, __arg_1]);
 
-  ondragend_Setter_(mthis, __arg_0) => mthis["ondragend"] = __arg_0;
+  find_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragenter");
+  find_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  ondragenter_Setter_(mthis, __arg_0) => mthis["ondragenter"] = __arg_0;
+  find_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragleave");
+  focus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "focus", []);
 
-  ondragleave_Setter_(mthis, __arg_0) => mthis["ondragleave"] = __arg_0;
+  getComputedStyle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "getComputedStyle", []);
 
-  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragover");
+  getComputedStyle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "getComputedStyle", [__arg_0]);
 
-  ondragover_Setter_(mthis, __arg_0) => mthis["ondragover"] = __arg_0;
+  getComputedStyle_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "getComputedStyle", [__arg_0, __arg_1]);
 
-  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragstart");
+  getMatchedCSSRules_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "getMatchedCSSRules", []);
 
-  ondragstart_Setter_(mthis, __arg_0) => mthis["ondragstart"] = __arg_0;
+  getMatchedCSSRules_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "getMatchedCSSRules", [__arg_0]);
 
-  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrop");
+  getMatchedCSSRules_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "getMatchedCSSRules", [__arg_0, __arg_1]);
 
-  ondrop_Setter_(mthis, __arg_0) => mthis["ondrop"] = __arg_0;
+  getSelection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "getSelection", []);
 
-  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondurationchange");
+  matchMedia_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "matchMedia", []);
+
+  matchMedia_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "matchMedia", [__arg_0]);
+
+  moveBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "moveBy", []);
+
+  moveBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "moveBy", [__arg_0]);
+
+  moveBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "moveBy", [__arg_0, __arg_1]);
+
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "moveTo", []);
+
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "moveTo", [__arg_0]);
+
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "moveTo", [__arg_0, __arg_1]);
+
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "open", []);
+
+  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "open", [__arg_0]);
+
+  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "open", [__arg_0, __arg_1]);
+
+  open_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "open", [__arg_0, __arg_1, __arg_2]);
+
+  openDatabase_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "openDatabase", [__arg_0, __arg_1]);
+
+  openDatabase_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "openDatabase", [__arg_0, __arg_1, __arg_2]);
+
+  openDatabase_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "openDatabase", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  openDatabase_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "openDatabase", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "postMessage", []);
+
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "postMessage", [__arg_0]);
+
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "postMessage", [__arg_0, __arg_1]);
+
+  postMessage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "postMessage", [__arg_0, __arg_1, __arg_2]);
+
+  print_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "print", []);
+
+  prompt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "prompt", []);
+
+  prompt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "prompt", [__arg_0]);
+
+  prompt_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "prompt", [__arg_0, __arg_1]);
+
+  releaseEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "releaseEvents", []);
+
+  requestAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "requestAnimationFrame", []);
+
+  requestAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "requestAnimationFrame", [__arg_0]);
+
+  resizeBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "resizeBy", []);
+
+  resizeBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "resizeBy", [__arg_0]);
+
+  resizeBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "resizeBy", [__arg_0, __arg_1]);
+
+  resizeTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "resizeTo", []);
+
+  resizeTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "resizeTo", [__arg_0]);
+
+  resizeTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "resizeTo", [__arg_0, __arg_1]);
+
+  scroll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scroll", []);
+
+  scroll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scroll", [__arg_0]);
+
+  scroll_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scroll", [__arg_0, __arg_1]);
+
+  scroll_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scroll", [__arg_0, __arg_1, __arg_2]);
+
+  scrollBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scrollBy", []);
+
+  scrollBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scrollBy", [__arg_0]);
+
+  scrollBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scrollBy", [__arg_0, __arg_1]);
+
+  scrollBy_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scrollBy", [__arg_0, __arg_1, __arg_2]);
+
+  scrollTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scrollTo", []);
+
+  scrollTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scrollTo", [__arg_0]);
+
+  scrollTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scrollTo", [__arg_0, __arg_1]);
+
+  scrollTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "scrollTo", [__arg_0, __arg_1, __arg_2]);
+
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "stop", []);
+
+  webkitCancelAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitCancelAnimationFrame", []);
+
+  webkitCancelAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitCancelAnimationFrame", [__arg_0]);
+
+  webkitCancelRequestAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitCancelRequestAnimationFrame", []);
+
+  webkitCancelRequestAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitCancelRequestAnimationFrame", [__arg_0]);
+
+  webkitRequestAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitRequestAnimationFrame", []);
+
+  webkitRequestAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitRequestAnimationFrame", [__arg_0]);
+
+  webkitRequestFileSystem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitRequestFileSystem", [__arg_0]);
+
+  webkitRequestFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitRequestFileSystem", [__arg_0, __arg_1]);
+
+  webkitRequestFileSystem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2]);
+
+  webkitRequestFileSystem_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2, __arg_3]);
+
+  webkitResolveLocalFileSystemURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitResolveLocalFileSystemURL", []);
+
+  webkitResolveLocalFileSystemURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitResolveLocalFileSystemURL", [__arg_0]);
+
+  webkitResolveLocalFileSystemURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1]);
+
+  webkitResolveLocalFileSystemURL_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* Window */, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1, __arg_2]);
+
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onabort");
+
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onabort", __arg_0);
+
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocomplete");
+
+  onautocomplete_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocomplete", __arg_0);
+
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror");
+
+  onautocompleteerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onautocompleteerror", __arg_0);
+
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onblur");
+
+  onblur_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onblur", __arg_0);
+
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncancel");
+
+  oncancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncancel", __arg_0);
+
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplay");
+
+  oncanplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplay", __arg_0);
+
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough");
+
+  oncanplaythrough_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncanplaythrough", __arg_0);
+
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onchange");
+
+  onchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onchange", __arg_0);
+
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclick");
+
+  onclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclick", __arg_0);
+
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onclose");
+
+  onclose_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onclose", __arg_0);
+
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncontextmenu");
+
+  oncontextmenu_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncontextmenu", __arg_0);
+
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oncuechange");
+
+  oncuechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oncuechange", __arg_0);
+
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondblclick");
+
+  ondblclick_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondblclick", __arg_0);
 
-  ondurationchange_Setter_(mthis, __arg_0) => mthis["ondurationchange"] = __arg_0;
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrag");
 
-  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onemptied");
+  ondrag_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrag", __arg_0);
 
-  onemptied_Setter_(mthis, __arg_0) => mthis["onemptied"] = __arg_0;
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragend");
 
-  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
+  ondragend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragend", __arg_0);
 
-  onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragenter");
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  ondragenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragenter", __arg_0);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragleave");
 
-  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
+  ondragleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragleave", __arg_0);
 
-  onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragover");
 
-  onhashchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onhashchange");
+  ondragover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragover", __arg_0);
 
-  onhashchange_Setter_(mthis, __arg_0) => mthis["onhashchange"] = __arg_0;
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondragstart");
 
-  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninput");
+  ondragstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondragstart", __arg_0);
 
-  oninput_Setter_(mthis, __arg_0) => mthis["oninput"] = __arg_0;
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondrop");
 
-  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninvalid");
+  ondrop_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondrop", __arg_0);
 
-  oninvalid_Setter_(mthis, __arg_0) => mthis["oninvalid"] = __arg_0;
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ondurationchange");
 
-  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeydown");
+  ondurationchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ondurationchange", __arg_0);
 
-  onkeydown_Setter_(mthis, __arg_0) => mthis["onkeydown"] = __arg_0;
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onemptied");
 
-  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeypress");
+  onemptied_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onemptied", __arg_0);
 
-  onkeypress_Setter_(mthis, __arg_0) => mthis["onkeypress"] = __arg_0;
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onended");
 
-  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeyup");
+  onended_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onended", __arg_0);
 
-  onkeyup_Setter_(mthis, __arg_0) => mthis["onkeyup"] = __arg_0;
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onerror");
 
-  onlanguagechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onlanguagechange");
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onerror", __arg_0);
 
-  onlanguagechange_Setter_(mthis, __arg_0) => mthis["onlanguagechange"] = __arg_0;
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onfocus");
 
-  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
+  onfocus_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onfocus", __arg_0);
 
-  onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninput");
 
-  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadeddata");
+  oninput_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninput", __arg_0);
 
-  onloadeddata_Setter_(mthis, __arg_0) => mthis["onloadeddata"] = __arg_0;
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "oninvalid");
 
-  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadedmetadata");
+  oninvalid_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "oninvalid", __arg_0);
 
-  onloadedmetadata_Setter_(mthis, __arg_0) => mthis["onloadedmetadata"] = __arg_0;
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeydown");
 
-  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
+  onkeydown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeydown", __arg_0);
 
-  onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeypress");
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  onkeypress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeypress", __arg_0);
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onkeyup");
 
-  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousedown");
+  onkeyup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onkeyup", __arg_0);
 
-  onmousedown_Setter_(mthis, __arg_0) => mthis["onmousedown"] = __arg_0;
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onload");
 
-  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseenter");
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onload", __arg_0);
 
-  onmouseenter_Setter_(mthis, __arg_0) => mthis["onmouseenter"] = __arg_0;
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadeddata");
 
-  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseleave");
+  onloadeddata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadeddata", __arg_0);
 
-  onmouseleave_Setter_(mthis, __arg_0) => mthis["onmouseleave"] = __arg_0;
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata");
 
-  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousemove");
+  onloadedmetadata_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadedmetadata", __arg_0);
 
-  onmousemove_Setter_(mthis, __arg_0) => mthis["onmousemove"] = __arg_0;
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onloadstart");
 
-  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseout");
+  onloadstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onloadstart", __arg_0);
 
-  onmouseout_Setter_(mthis, __arg_0) => mthis["onmouseout"] = __arg_0;
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousedown");
 
-  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseover");
+  onmousedown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousedown", __arg_0);
 
-  onmouseover_Setter_(mthis, __arg_0) => mthis["onmouseover"] = __arg_0;
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseenter");
 
-  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseup");
+  onmouseenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseenter", __arg_0);
 
-  onmouseup_Setter_(mthis, __arg_0) => mthis["onmouseup"] = __arg_0;
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseleave");
 
-  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousewheel");
+  onmouseleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseleave", __arg_0);
 
-  onmousewheel_Setter_(mthis, __arg_0) => mthis["onmousewheel"] = __arg_0;
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousemove");
 
-  onoffline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onoffline");
+  onmousemove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousemove", __arg_0);
 
-  onoffline_Setter_(mthis, __arg_0) => mthis["onoffline"] = __arg_0;
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseout");
 
-  ononline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ononline");
+  onmouseout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseout", __arg_0);
 
-  ononline_Setter_(mthis, __arg_0) => mthis["ononline"] = __arg_0;
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseover");
 
-  onorientationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onorientationchange");
+  onmouseover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseover", __arg_0);
 
-  onorientationchange_Setter_(mthis, __arg_0) => mthis["onorientationchange"] = __arg_0;
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmouseup");
 
-  onpagehide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpagehide");
+  onmouseup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmouseup", __arg_0);
 
-  onpagehide_Setter_(mthis, __arg_0) => mthis["onpagehide"] = __arg_0;
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onmousewheel");
 
-  onpageshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpageshow");
+  onmousewheel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onmousewheel", __arg_0);
 
-  onpageshow_Setter_(mthis, __arg_0) => mthis["onpageshow"] = __arg_0;
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpause");
 
-  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
+  onpause_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpause", __arg_0);
 
-  onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplay");
 
-  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplay");
+  onplay_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplay", __arg_0);
 
-  onplay_Setter_(mthis, __arg_0) => mthis["onplay"] = __arg_0;
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onplaying");
 
-  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplaying");
+  onplaying_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onplaying", __arg_0);
 
-  onplaying_Setter_(mthis, __arg_0) => mthis["onplaying"] = __arg_0;
+  onpointercancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointercancel");
 
-  onpopstate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpopstate");
+  onpointercancel_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointercancel", __arg_0);
 
-  onpopstate_Setter_(mthis, __arg_0) => mthis["onpopstate"] = __arg_0;
+  onpointerdown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerdown");
 
-  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
+  onpointerdown_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerdown", __arg_0);
 
-  onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
+  onpointerenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerenter");
 
-  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onratechange");
+  onpointerenter_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerenter", __arg_0);
 
-  onratechange_Setter_(mthis, __arg_0) => mthis["onratechange"] = __arg_0;
+  onpointerleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerleave");
 
-  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreset");
+  onpointerleave_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerleave", __arg_0);
 
-  onreset_Setter_(mthis, __arg_0) => mthis["onreset"] = __arg_0;
+  onpointermove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointermove");
 
-  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
+  onpointermove_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointermove", __arg_0);
 
-  onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
+  onpointerout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerout");
 
-  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
+  onpointerout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerout", __arg_0);
 
-  onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
+  onpointerover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerover");
 
-  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsearch");
+  onpointerover_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerover", __arg_0);
 
-  onsearch_Setter_(mthis, __arg_0) => mthis["onsearch"] = __arg_0;
+  onpointerup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onpointerup");
 
-  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeked");
+  onpointerup_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onpointerup", __arg_0);
 
-  onseeked_Setter_(mthis, __arg_0) => mthis["onseeked"] = __arg_0;
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onprogress");
 
-  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeking");
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onprogress", __arg_0);
 
-  onseeking_Setter_(mthis, __arg_0) => mthis["onseeking"] = __arg_0;
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onratechange");
 
-  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselect");
+  onratechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onratechange", __arg_0);
 
-  onselect_Setter_(mthis, __arg_0) => mthis["onselect"] = __arg_0;
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onreset");
 
-  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
+  onreset_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onreset", __arg_0);
 
-  onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onresize");
 
-  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstalled");
+  onresize_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onresize", __arg_0);
 
-  onstalled_Setter_(mthis, __arg_0) => mthis["onstalled"] = __arg_0;
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onscroll");
 
-  onstorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstorage");
+  onscroll_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onscroll", __arg_0);
 
-  onstorage_Setter_(mthis, __arg_0) => mthis["onstorage"] = __arg_0;
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeked");
 
-  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsubmit");
+  onseeked_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeked", __arg_0);
 
-  onsubmit_Setter_(mthis, __arg_0) => mthis["onsubmit"] = __arg_0;
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onseeking");
 
-  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuspend");
+  onseeking_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onseeking", __arg_0);
 
-  onsuspend_Setter_(mthis, __arg_0) => mthis["onsuspend"] = __arg_0;
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onselect");
 
-  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeupdate");
+  onselect_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onselect", __arg_0);
 
-  ontimeupdate_Setter_(mthis, __arg_0) => mthis["ontimeupdate"] = __arg_0;
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onshow");
 
-  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontoggle");
+  onshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onshow", __arg_0);
 
-  ontoggle_Setter_(mthis, __arg_0) => mthis["ontoggle"] = __arg_0;
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onstalled");
 
-  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchcancel");
+  onstalled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onstalled", __arg_0);
 
-  ontouchcancel_Setter_(mthis, __arg_0) => mthis["ontouchcancel"] = __arg_0;
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsubmit");
 
-  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchend");
+  onsubmit_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsubmit", __arg_0);
 
-  ontouchend_Setter_(mthis, __arg_0) => mthis["ontouchend"] = __arg_0;
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onsuspend");
 
-  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchmove");
+  onsuspend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onsuspend", __arg_0);
 
-  ontouchmove_Setter_(mthis, __arg_0) => mthis["ontouchmove"] = __arg_0;
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontimeupdate");
 
-  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchstart");
+  ontimeupdate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontimeupdate", __arg_0);
 
-  ontouchstart_Setter_(mthis, __arg_0) => mthis["ontouchstart"] = __arg_0;
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "ontoggle");
 
-  ontransitionend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontransitionend");
+  ontoggle_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "ontoggle", __arg_0);
 
-  ontransitionend_Setter_(mthis, __arg_0) => mthis["ontransitionend"] = __arg_0;
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onvolumechange");
 
-  onunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onunload");
+  onvolumechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onvolumechange", __arg_0);
 
-  onunload_Setter_(mthis, __arg_0) => mthis["onunload"] = __arg_0;
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* GlobalEventHandlers */, "onwaiting");
 
-  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvolumechange");
+  onwaiting_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* GlobalEventHandlers */, "onwaiting", __arg_0);
 
-  onvolumechange_Setter_(mthis, __arg_0) => mthis["onvolumechange"] = __arg_0;
+  atob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "atob", []);
 
-  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwaiting");
+  atob_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "atob", [__arg_0]);
 
-  onwaiting_Setter_(mthis, __arg_0) => mthis["onwaiting"] = __arg_0;
+  btoa_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "btoa", []);
 
-  onwebkitanimationend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitanimationend");
+  btoa_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "btoa", [__arg_0]);
 
-  onwebkitanimationend_Setter_(mthis, __arg_0) => mthis["onwebkitanimationend"] = __arg_0;
+  onbeforeunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onbeforeunload");
 
-  onwebkitanimationiteration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitanimationiteration");
+  onbeforeunload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onbeforeunload", __arg_0);
 
-  onwebkitanimationiteration_Setter_(mthis, __arg_0) => mthis["onwebkitanimationiteration"] = __arg_0;
+  onhashchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onhashchange");
 
-  onwebkitanimationstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitanimationstart");
+  onhashchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onhashchange", __arg_0);
 
-  onwebkitanimationstart_Setter_(mthis, __arg_0) => mthis["onwebkitanimationstart"] = __arg_0;
+  onlanguagechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onlanguagechange");
 
-  onwebkittransitionend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkittransitionend");
+  onlanguagechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onlanguagechange", __arg_0);
 
-  onwebkittransitionend_Setter_(mthis, __arg_0) => mthis["onwebkittransitionend"] = __arg_0;
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onmessage");
 
-  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwheel");
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onmessage", __arg_0);
 
-  onwheel_Setter_(mthis, __arg_0) => mthis["onwheel"] = __arg_0;
+  onoffline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onoffline");
 
-  openDatabase_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openDatabase", [__arg_0, __arg_1]);
+  onoffline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onoffline", __arg_0);
 
-  openDatabase_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "openDatabase", [__arg_0, __arg_1, __arg_2]);
+  ononline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "ononline");
 
-  openDatabase_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "openDatabase", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  ononline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "ononline", __arg_0);
 
-  openDatabase_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "openDatabase", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  onpagehide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpagehide");
 
-  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "open", []);
+  onpagehide_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpagehide", __arg_0);
 
-  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0]);
+  onpageshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpageshow");
 
-  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1]);
+  onpageshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpageshow", __arg_0);
 
-  open_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1, __arg_2]);
+  onpopstate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpopstate");
 
-  opener_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "opener");
+  onpopstate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpopstate", __arg_0);
 
-  opener_Setter_(mthis, __arg_0) => mthis["opener"] = __arg_0;
+  onrejectionhandled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onrejectionhandled");
 
-  orientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orientation");
+  onrejectionhandled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onrejectionhandled", __arg_0);
 
-  outerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outerHeight");
+  onstorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onstorage");
 
-  outerWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outerWidth");
+  onstorage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onstorage", __arg_0);
 
-  pageXOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageXOffset");
+  onunhandledrejection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onunhandledrejection");
 
-  pageYOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageYOffset");
+  onunhandledrejection_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onunhandledrejection", __arg_0);
 
-  parent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parent");
+  onunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onunload");
 
-  performance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "performance");
+  onunload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onunload", __arg_0);
 
-  personalbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "personalbar");
+  clearInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearInterval", []);
 
-  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
+  clearInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearInterval", [__arg_0]);
 
-  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
+  clearTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearTimeout", []);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
+  clearTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearTimeout", [__arg_0]);
 
-  postMessage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1, __arg_2]);
+  setInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", []);
 
-  print_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "print", []);
+  setInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0]);
 
-  releaseEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "releaseEvents", []);
+  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0, __arg_1]);
 
-  requestAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestAnimationFrame", []);
+  setInterval_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0, __arg_1, __arg_2]);
 
-  requestAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "requestAnimationFrame", [__arg_0]);
+  setTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", []);
 
-  resizeBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resizeBy", []);
+  setTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0]);
 
-  resizeBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "resizeBy", [__arg_0]);
+  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0, __arg_1]);
 
-  resizeBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "resizeBy", [__arg_0, __arg_1]);
+  setTimeout_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0, __arg_1, __arg_2]);
 
-  resizeTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resizeTo", []);
+}
 
-  resizeTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "resizeTo", [__arg_0]);
+class BlinkWindowBase64 {
+  static final instance = new BlinkWindowBase64();
 
-  resizeTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "resizeTo", [__arg_0, __arg_1]);
+  atob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "atob", []);
 
-  screenLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenLeft");
+  atob_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "atob", [__arg_0]);
 
-  screenTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenTop");
+  btoa_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "btoa", []);
 
-  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenX");
+  btoa_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "btoa", [__arg_0]);
 
-  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenY");
+}
 
-  screen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screen");
+class BlinkWindowClient extends BlinkClient {
+  static final instance = new BlinkWindowClient();
 
-  scrollBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollBy", []);
+  focused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowClient */, "focused");
 
-  scrollBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollBy", [__arg_0]);
+  visibilityState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowClient */, "visibilityState");
 
-  scrollBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scrollBy", [__arg_0, __arg_1]);
+  focus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowClient */, "focus", []);
 
-  scrollBy_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scrollBy", [__arg_0, __arg_1, __arg_2]);
+}
 
-  scrollTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollTo", []);
+class BlinkWindowEventHandlers {
+  static final instance = new BlinkWindowEventHandlers();
 
-  scrollTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollTo", [__arg_0]);
+  onbeforeunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onbeforeunload");
 
-  scrollTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scrollTo", [__arg_0, __arg_1]);
+  onbeforeunload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onbeforeunload", __arg_0);
 
-  scrollTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scrollTo", [__arg_0, __arg_1, __arg_2]);
+  onhashchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onhashchange");
 
-  scrollX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollX");
+  onhashchange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onhashchange", __arg_0);
 
-  scrollY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollY");
+  onlanguagechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onlanguagechange");
 
-  scroll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scroll", []);
+  onlanguagechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onlanguagechange", __arg_0);
 
-  scroll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scroll", [__arg_0]);
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onmessage");
 
-  scroll_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scroll", [__arg_0, __arg_1]);
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onmessage", __arg_0);
 
-  scroll_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scroll", [__arg_0, __arg_1, __arg_2]);
+  onoffline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onoffline");
 
-  scrollbars_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollbars");
+  onoffline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onoffline", __arg_0);
 
-  self_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "self");
+  ononline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "ononline");
 
-  sessionStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sessionStorage");
+  ononline_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "ononline", __arg_0);
 
-  setInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", []);
+  onpagehide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpagehide");
 
-  setInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", [__arg_0]);
+  onpagehide_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpagehide", __arg_0);
 
-  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", [__arg_0, __arg_1]);
+  onpageshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpageshow");
 
-  setTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", []);
+  onpageshow_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpageshow", __arg_0);
 
-  setTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", [__arg_0]);
+  onpopstate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onpopstate");
 
-  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", [__arg_0, __arg_1]);
+  onpopstate_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onpopstate", __arg_0);
 
-  showModalDialog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "showModalDialog", []);
+  onrejectionhandled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onrejectionhandled");
 
-  showModalDialog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "showModalDialog", [__arg_0]);
+  onrejectionhandled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onrejectionhandled", __arg_0);
 
-  showModalDialog_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "showModalDialog", [__arg_0, __arg_1]);
+  onstorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onstorage");
 
-  showModalDialog_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "showModalDialog", [__arg_0, __arg_1, __arg_2]);
+  onstorage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onstorage", __arg_0);
 
-  speechSynthesis_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "speechSynthesis");
+  onunhandledrejection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onunhandledrejection");
 
-  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
+  onunhandledrejection_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onunhandledrejection", __arg_0);
 
-  status_Setter_(mthis, __arg_0) => mthis["status"] = __arg_0;
+  onunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WindowEventHandlers */, "onunload");
 
-  statusbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusbar");
+  onunload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WindowEventHandlers */, "onunload", __arg_0);
 
-  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
+}
 
-  styleMedia_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "styleMedia");
+class BlinkWindowTimers {
+  static final instance = new BlinkWindowTimers();
 
-  toolbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "toolbar");
+  clearInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearInterval", []);
 
-  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "top");
+  clearInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearInterval", [__arg_0]);
 
-  webkitRequestFileSystem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0]);
+  clearTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearTimeout", []);
 
-  webkitRequestFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1]);
+  clearTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearTimeout", [__arg_0]);
 
-  webkitRequestFileSystem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2]);
+  setInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", []);
 
-  webkitRequestFileSystem_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  setInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0]);
 
-  webkitResolveLocalFileSystemURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", []);
+  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0, __arg_1]);
 
-  webkitResolveLocalFileSystemURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0]);
+  setInterval_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0, __arg_1, __arg_2]);
 
-  webkitResolveLocalFileSystemURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1]);
+  setTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", []);
 
-  webkitResolveLocalFileSystemURL_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1, __arg_2]);
+  setTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0]);
 
-  webkitStorageInfo_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitStorageInfo");
+  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0, __arg_1]);
 
-  window_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "window");
+  setTimeout_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkWorker extends BlinkEventTarget {
   static final instance = new BlinkWorker();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Worker"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("Worker");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Worker"), [__arg_0]);
+  constructorCallback_1_(__arg_0) => Blink_JsNative_DomException.callConstructor("Worker", [__arg_0]);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* Worker */, "onmessage");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onmessage_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* Worker */, "onmessage", __arg_0);
 
-  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Worker */, "postMessage", []);
 
-  onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* Worker */, "postMessage", [__arg_0]);
 
-  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* Worker */, "postMessage", [__arg_0, __arg_1]);
 
-  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
+  terminate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* Worker */, "terminate", []);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* AbstractWorker */, "onerror");
 
-  terminate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "terminate", []);
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* AbstractWorker */, "onerror", __arg_0);
 
 }
 
@@ -16761,160 +22818,216 @@
 class BlinkWorkerGlobalScope extends BlinkEventTarget {
   static final instance = new BlinkWorkerGlobalScope();
 
-  atob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "atob", []);
+  caches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "caches");
 
-  atob_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "atob", [__arg_0]);
+  console_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "console");
 
-  btoa_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "btoa", []);
+  crypto_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "crypto");
 
-  btoa_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "btoa", [__arg_0]);
+  indexedDB_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "indexedDB");
 
-  clearInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearInterval", []);
+  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "location");
 
-  clearInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearInterval", [__arg_0]);
+  navigator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "navigator");
 
-  clearTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearTimeout", []);
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "onerror");
 
-  clearTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearTimeout", [__arg_0]);
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WorkerGlobalScope */, "onerror", __arg_0);
 
-  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
+  onrejectionhandled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "onrejectionhandled");
 
-  console_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "console");
+  onrejectionhandled_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WorkerGlobalScope */, "onrejectionhandled", __arg_0);
 
-  createImageBitmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createImageBitmap", []);
+  onunhandledrejection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "onunhandledrejection");
 
-  createImageBitmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createImageBitmap", [__arg_0]);
+  onunhandledrejection_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WorkerGlobalScope */, "onunhandledrejection", __arg_0);
 
-  createImageBitmap_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createImageBitmap", [__arg_0, __arg_1, __arg_2]);
+  performance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "performance");
 
-  createImageBitmap_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "createImageBitmap", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  self_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "self");
 
-  createImageBitmap_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "createImageBitmap", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  webkitIndexedDB_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerGlobalScope */, "webkitIndexedDB");
 
-  crypto_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crypto");
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "close", []);
 
-  importScripts_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "importScripts", []);
+  fetch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "fetch", []);
 
-  importScripts_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "importScripts", [__arg_0]);
+  fetch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "fetch", [__arg_0]);
 
-  indexedDB_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "indexedDB");
+  fetch_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "fetch", [__arg_0, __arg_1]);
 
-  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "location");
+  importScripts_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "importScripts", []);
 
-  navigator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "navigator");
+  importScripts_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "importScripts", [__arg_0]);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  webkitRequestFileSystem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitRequestFileSystem", []);
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  webkitRequestFileSystem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitRequestFileSystem", [__arg_0]);
 
-  performance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "performance");
+  webkitRequestFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitRequestFileSystem", [__arg_0, __arg_1]);
 
-  self_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "self");
+  webkitRequestFileSystem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2]);
 
-  setInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", []);
+  webkitRequestFileSystem_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  setInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", [__arg_0]);
+  webkitRequestFileSystemSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitRequestFileSystemSync", []);
 
-  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", [__arg_0, __arg_1]);
+  webkitRequestFileSystemSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitRequestFileSystemSync", [__arg_0]);
 
-  setTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", []);
+  webkitRequestFileSystemSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitRequestFileSystemSync", [__arg_0, __arg_1]);
 
-  setTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", [__arg_0]);
+  webkitResolveLocalFileSystemSyncURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitResolveLocalFileSystemSyncURL", []);
 
-  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", [__arg_0, __arg_1]);
+  webkitResolveLocalFileSystemSyncURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitResolveLocalFileSystemSyncURL", [__arg_0]);
 
-  webkitRequestFileSystemSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystemSync", []);
+  webkitResolveLocalFileSystemURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitResolveLocalFileSystemURL", []);
 
-  webkitRequestFileSystemSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystemSync", [__arg_0]);
+  webkitResolveLocalFileSystemURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitResolveLocalFileSystemURL", [__arg_0]);
 
-  webkitRequestFileSystemSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystemSync", [__arg_0, __arg_1]);
+  webkitResolveLocalFileSystemURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1]);
 
-  webkitRequestFileSystem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", []);
+  webkitResolveLocalFileSystemURL_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WorkerGlobalScope */, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1, __arg_2]);
 
-  webkitRequestFileSystem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0]);
+  atob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "atob", []);
 
-  webkitRequestFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1]);
+  atob_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "atob", [__arg_0]);
 
-  webkitRequestFileSystem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2]);
+  btoa_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "btoa", []);
 
-  webkitRequestFileSystem_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  btoa_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowBase64 */, "btoa", [__arg_0]);
 
-  webkitResolveLocalFileSystemSyncURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemSyncURL", []);
+  clearInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearInterval", []);
 
-  webkitResolveLocalFileSystemSyncURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemSyncURL", [__arg_0]);
+  clearInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearInterval", [__arg_0]);
 
-  webkitResolveLocalFileSystemURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", []);
+  clearTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearTimeout", []);
 
-  webkitResolveLocalFileSystemURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0]);
+  clearTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "clearTimeout", [__arg_0]);
 
-  webkitResolveLocalFileSystemURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1]);
+  setInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", []);
 
-  webkitResolveLocalFileSystemURL_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1, __arg_2]);
+  setInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0]);
+
+  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0, __arg_1]);
+
+  setInterval_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setInterval", [__arg_0, __arg_1, __arg_2]);
+
+  setTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", []);
+
+  setTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0]);
+
+  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0, __arg_1]);
+
+  setTimeout_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WindowTimers */, "setTimeout", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkWorkerLocation {
   static final instance = new BlinkWorkerLocation();
 
-  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "hash");
 
-  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "host");
 
-  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "hostname");
 
-  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "href");
 
-  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "origin");
 
-  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "pathname");
 
-  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "port");
 
-  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "protocol");
 
-  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* URLUtilsReadOnly */, "search");
 
-  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* URLUtilsReadOnly */, "toString", []);
 
 }
 
 class BlinkWorkerNavigator {
   static final instance = new BlinkWorkerNavigator();
 
-  appCodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appCodeName");
+  connection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerNavigator */, "connection");
 
-  appName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appName");
+  geofencing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerNavigator */, "geofencing");
 
-  appVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appVersion");
+  permissions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerNavigator */, "permissions");
 
-  connection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connection");
+  services_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerNavigator */, "services");
 
-  dartEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dartEnabled");
+  webkitPersistentStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerNavigator */, "webkitPersistentStorage");
 
-  geofencing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "geofencing");
+  webkitTemporaryStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerNavigator */, "webkitTemporaryStorage");
 
-  hardwareConcurrency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hardwareConcurrency");
+  hardwareConcurrency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorCPU */, "hardwareConcurrency");
 
-  onLine_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onLine");
+  appCodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appCodeName");
 
-  platform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "platform");
+  appName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appName");
 
-  product_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "product");
+  appVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "appVersion");
 
-  userAgent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "userAgent");
+  dartEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "dartEnabled");
 
-  webkitPersistentStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitPersistentStorage");
+  platform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "platform");
 
-  webkitTemporaryStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitTemporaryStorage");
+  product_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "product");
+
+  userAgent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorID */, "userAgent");
+
+  onLine_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* NavigatorOnLine */, "onLine");
 
 }
 
-class BlinkWorkerPerformance {
+class BlinkWorkerPerformance extends BlinkEventTarget {
   static final instance = new BlinkWorkerPerformance();
 
-  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "memory");
+  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerPerformance */, "memory");
 
-  now_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "now", []);
+  onwebkitresourcetimingbufferfull_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* WorkerPerformance */, "onwebkitresourcetimingbufferfull");
+
+  onwebkitresourcetimingbufferfull_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* WorkerPerformance */, "onwebkitresourcetimingbufferfull", __arg_0);
+
+  clearMarks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "clearMarks", []);
+
+  clearMarks_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "clearMarks", [__arg_0]);
+
+  clearMeasures_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "clearMeasures", []);
+
+  clearMeasures_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "clearMeasures", [__arg_0]);
+
+  getEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "getEntries", []);
+
+  getEntriesByName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "getEntriesByName", []);
+
+  getEntriesByName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "getEntriesByName", [__arg_0]);
+
+  getEntriesByName_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "getEntriesByName", [__arg_0, __arg_1]);
+
+  getEntriesByType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "getEntriesByType", []);
+
+  getEntriesByType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "getEntriesByType", [__arg_0]);
+
+  mark_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "mark", []);
+
+  mark_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "mark", [__arg_0]);
+
+  measure_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "measure", [__arg_0]);
+
+  measure_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "measure", [__arg_0, __arg_1]);
+
+  measure_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "measure", [__arg_0, __arg_1, __arg_2]);
+
+  now_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "now", []);
+
+  webkitClearResourceTimings_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "webkitClearResourceTimings", []);
+
+  webkitSetResourceTimingBufferSize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "webkitSetResourceTimingBufferSize", []);
+
+  webkitSetResourceTimingBufferSize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* WorkerPerformance */, "webkitSetResourceTimingBufferSize", [__arg_0]);
 
 }
 
@@ -16926,117 +23039,115 @@
 class BlinkXMLHttpRequest extends BlinkXMLHttpRequestEventTarget {
   static final instance = new BlinkXMLHttpRequest();
 
-  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("XMLHttpRequest");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XMLHttpRequest"), []);
+  onreadystatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "onreadystatechange");
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XMLHttpRequest"), [__arg_0]);
+  onreadystatechange_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequest */, "onreadystatechange", __arg_0);
 
-  getAllResponseHeaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAllResponseHeaders", []);
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "readyState");
 
-  getResponseHeader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getResponseHeader", []);
+  response_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "response");
 
-  getResponseHeader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getResponseHeader", [__arg_0]);
+  responseText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "responseText");
 
-  onreadystatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreadystatechange");
+  responseType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "responseType");
 
-  onreadystatechange_Setter_(mthis, __arg_0) => mthis["onreadystatechange"] = __arg_0;
+  responseType_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequest */, "responseType", __arg_0);
 
-  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "open", []);
+  responseURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "responseURL");
 
-  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0]);
+  responseXML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "responseXML");
 
-  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1]);
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "status");
 
-  open_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1, __arg_2]);
+  statusText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "statusText");
 
-  open_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  timeout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "timeout");
 
-  open_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  timeout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequest */, "timeout", __arg_0);
 
-  overrideMimeType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "overrideMimeType", []);
+  upload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "upload");
 
-  overrideMimeType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "overrideMimeType", [__arg_0]);
+  withCredentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequest */, "withCredentials");
 
-  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
+  withCredentials_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequest */, "withCredentials", __arg_0);
 
-  responseText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseText");
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "abort", []);
 
-  responseType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseType");
+  getAllResponseHeaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "getAllResponseHeaders", []);
 
-  responseType_Setter_(mthis, __arg_0) => mthis["responseType"] = __arg_0;
+  getResponseHeader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "getResponseHeader", []);
 
-  responseURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseURL");
+  getResponseHeader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "getResponseHeader", [__arg_0]);
 
-  responseXML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseXML");
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "open", []);
 
-  response_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "response");
+  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "open", [__arg_0]);
 
-  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "send", []);
+  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "open", [__arg_0, __arg_1]);
 
-  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0]);
+  open_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "open", [__arg_0, __arg_1, __arg_2]);
 
-  setRequestHeader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setRequestHeader", []);
+  open_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "open", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  setRequestHeader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRequestHeader", [__arg_0]);
+  open_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "open", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  setRequestHeader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRequestHeader", [__arg_0, __arg_1]);
+  overrideMimeType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "overrideMimeType", []);
 
-  statusText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusText");
+  overrideMimeType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "overrideMimeType", [__arg_0]);
 
-  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "send", []);
 
-  timeout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timeout");
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "send", [__arg_0]);
 
-  timeout_Setter_(mthis, __arg_0) => mthis["timeout"] = __arg_0;
+  setRequestHeader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "setRequestHeader", []);
 
-  upload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "upload");
+  setRequestHeader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "setRequestHeader", [__arg_0]);
 
-  withCredentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "withCredentials");
-
-  withCredentials_Setter_(mthis, __arg_0) => mthis["withCredentials"] = __arg_0;
+  setRequestHeader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XMLHttpRequest */, "setRequestHeader", [__arg_0, __arg_1]);
 
 }
 
 class BlinkXMLHttpRequestEventTarget extends BlinkEventTarget {
   static final instance = new BlinkXMLHttpRequestEventTarget();
 
-  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestEventTarget */, "onabort");
 
-  onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
+  onabort_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequestEventTarget */, "onabort", __arg_0);
 
-  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestEventTarget */, "onerror");
 
-  onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
+  onerror_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequestEventTarget */, "onerror", __arg_0);
 
-  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestEventTarget */, "onload");
 
-  onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
+  onload_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequestEventTarget */, "onload", __arg_0);
 
-  onloadend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadend");
+  onloadend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestEventTarget */, "onloadend");
 
-  onloadend_Setter_(mthis, __arg_0) => mthis["onloadend"] = __arg_0;
+  onloadend_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequestEventTarget */, "onloadend", __arg_0);
 
-  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestEventTarget */, "onloadstart");
 
-  onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
+  onloadstart_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequestEventTarget */, "onloadstart", __arg_0);
 
-  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestEventTarget */, "onprogress");
 
-  onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
+  onprogress_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequestEventTarget */, "onprogress", __arg_0);
 
-  ontimeout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeout");
+  ontimeout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestEventTarget */, "ontimeout");
 
-  ontimeout_Setter_(mthis, __arg_0) => mthis["ontimeout"] = __arg_0;
+  ontimeout_Setter_(mthis, __arg_0) => Blink_JsNative_DomException.setProperty(mthis /* XMLHttpRequestEventTarget */, "ontimeout", __arg_0);
 
 }
 
 class BlinkXMLHttpRequestProgressEvent extends BlinkProgressEvent {
   static final instance = new BlinkXMLHttpRequestProgressEvent();
 
-  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestProgressEvent */, "position");
 
-  totalSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "totalSize");
+  totalSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XMLHttpRequestProgressEvent */, "totalSize");
 
 }
 
@@ -17048,130 +23159,128 @@
 class BlinkXMLSerializer {
   static final instance = new BlinkXMLSerializer();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XMLSerializer"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("XMLSerializer");
 
-  serializeToString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "serializeToString", []);
+  serializeToString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XMLSerializer */, "serializeToString", []);
 
-  serializeToString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "serializeToString", [__arg_0]);
+  serializeToString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XMLSerializer */, "serializeToString", [__arg_0]);
 
 }
 
 class BlinkXPathEvaluator {
   static final instance = new BlinkXPathEvaluator();
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XPathEvaluator"), []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("XPathEvaluator");
 
-  createExpression_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createExpression", []);
+  createExpression_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "createExpression", []);
 
-  createExpression_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createExpression", [__arg_0]);
+  createExpression_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "createExpression", [__arg_0]);
 
-  createExpression_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createExpression", [__arg_0, __arg_1]);
+  createExpression_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "createExpression", [__arg_0, __arg_1]);
 
-  createNSResolver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createNSResolver", []);
+  createNSResolver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "createNSResolver", []);
 
-  createNSResolver_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createNSResolver", [__arg_0]);
+  createNSResolver_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "createNSResolver", [__arg_0]);
 
-  evaluate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", []);
+  evaluate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "evaluate", [__arg_0]);
 
-  evaluate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", [__arg_0]);
+  evaluate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "evaluate", [__arg_0, __arg_1]);
 
-  evaluate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", [__arg_0, __arg_1]);
+  evaluate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "evaluate", [__arg_0, __arg_1, __arg_2]);
 
-  evaluate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", [__arg_0, __arg_1, __arg_2]);
+  evaluate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "evaluate", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  evaluate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", [__arg_0, __arg_1, __arg_2, __arg_3]);
-
-  evaluate_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  evaluate_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => Blink_JsNative_DomException.callMethod(mthis /* XPathEvaluator */, "evaluate", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
 }
 
 class BlinkXPathExpression {
   static final instance = new BlinkXPathExpression();
 
-  evaluate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", []);
+  evaluate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XPathExpression */, "evaluate", []);
 
-  evaluate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", [__arg_0]);
+  evaluate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XPathExpression */, "evaluate", [__arg_0]);
 
-  evaluate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", [__arg_0, __arg_1]);
+  evaluate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XPathExpression */, "evaluate", [__arg_0, __arg_1]);
 
-  evaluate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", [__arg_0, __arg_1, __arg_2]);
+  evaluate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* XPathExpression */, "evaluate", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkXPathNSResolver {
   static final instance = new BlinkXPathNSResolver();
 
-  lookupNamespaceURI_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lookupNamespaceURI", []);
+  lookupNamespaceURI_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XPathNSResolver */, "lookupNamespaceURI", []);
 
-  lookupNamespaceURI_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lookupNamespaceURI", [__arg_0]);
+  lookupNamespaceURI_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XPathNSResolver */, "lookupNamespaceURI", [__arg_0]);
 
 }
 
 class BlinkXPathResult {
   static final instance = new BlinkXPathResult();
 
-  booleanValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "booleanValue");
+  booleanValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XPathResult */, "booleanValue");
 
-  invalidIteratorState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "invalidIteratorState");
+  invalidIteratorState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XPathResult */, "invalidIteratorState");
 
-  iterateNext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "iterateNext", []);
+  numberValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XPathResult */, "numberValue");
 
-  numberValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberValue");
+  resultType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XPathResult */, "resultType");
 
-  resultType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "resultType");
+  singleNodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XPathResult */, "singleNodeValue");
 
-  singleNodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "singleNodeValue");
+  snapshotLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XPathResult */, "snapshotLength");
 
-  snapshotItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "snapshotItem", []);
+  stringValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis /* XPathResult */, "stringValue");
 
-  snapshotItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "snapshotItem", [__arg_0]);
+  iterateNext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XPathResult */, "iterateNext", []);
 
-  snapshotLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "snapshotLength");
+  snapshotItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XPathResult */, "snapshotItem", []);
 
-  stringValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stringValue");
+  snapshotItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XPathResult */, "snapshotItem", [__arg_0]);
 
 }
 
 class BlinkXSLTProcessor {
   static final instance = new BlinkXSLTProcessor();
 
-  clearParameters_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearParameters", []);
+  constructorCallback_0_() => Blink_JsNative_DomException.callConstructor0("XSLTProcessor");
 
-  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XSLTProcessor"), []);
+  clearParameters_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "clearParameters", []);
 
-  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", []);
+  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "getParameter", []);
 
-  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", [__arg_0]);
+  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "getParameter", [__arg_0]);
 
-  getParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", [__arg_0, __arg_1]);
+  getParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "getParameter", [__arg_0, __arg_1]);
 
-  importStylesheet_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "importStylesheet", []);
+  importStylesheet_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "importStylesheet", []);
 
-  importStylesheet_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "importStylesheet", [__arg_0]);
+  importStylesheet_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "importStylesheet", [__arg_0]);
 
-  removeParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeParameter", []);
+  removeParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "removeParameter", []);
 
-  removeParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeParameter", [__arg_0]);
+  removeParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "removeParameter", [__arg_0]);
 
-  removeParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeParameter", [__arg_0, __arg_1]);
+  removeParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "removeParameter", [__arg_0, __arg_1]);
 
-  reset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reset", []);
+  reset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "reset", []);
 
-  setParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setParameter", [__arg_0]);
+  setParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "setParameter", [__arg_0]);
 
-  setParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setParameter", [__arg_0, __arg_1]);
+  setParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "setParameter", [__arg_0, __arg_1]);
 
-  setParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setParameter", [__arg_0, __arg_1, __arg_2]);
+  setParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "setParameter", [__arg_0, __arg_1, __arg_2]);
 
-  transformToDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transformToDocument", []);
+  transformToDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "transformToDocument", []);
 
-  transformToDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transformToDocument", [__arg_0]);
+  transformToDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "transformToDocument", [__arg_0]);
 
-  transformToFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transformToFragment", []);
+  transformToFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "transformToFragment", []);
 
-  transformToFragment_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transformToFragment", [__arg_0]);
+  transformToFragment_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "transformToFragment", [__arg_0]);
 
-  transformToFragment_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "transformToFragment", [__arg_0, __arg_1]);
+  transformToFragment_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis /* XSLTProcessor */, "transformToFragment", [__arg_0, __arg_1]);
 
 }
 
@@ -17188,46 +23297,16 @@
 
   static register(document, tag, customType, extendsTagName) native "Utils_register";
 
-  static createElement(document, tagName) native "Utils_createElement";
+  // Defines an interceptor if there is an appropriate JavaScript prototype to define it on.
+  // In any case, returns a typed JS wrapper compatibile with dart:html and the new
+  // typed JS Interop.
+  static defineInterceptorCustomElement(jsObject, Type type) native "Utils_defineInterceptorCustomElement";
+  static defineInterceptor(jsObject, Type type) native "Utils_defineInterceptor";
+  static setInstanceInterceptor(o, Type type, {bool customElement: false}) native "Utils_setInstanceInterceptor";
+  static setInstanceInterceptorCustomUpgrade(o) native "Utils_setInstanceInterceptorCustomUpgrade";
 
-  static constructElement(element_type, jsObject) native "Utils_constructor_create";
-
+  // This method will throw if the element isn't actually a real Element.
   static initializeCustomElement(element) native "Utils_initializeCustomElement";
-
-  static changeElementWrapper(element, type) native "Utils_changeElementWrapper";
-}
-
-class Blink_DOMWindowCrossFrame {
-  // FIXME: Return to using explicit cross frame entry points after roll to M35
-  static get_history(_DOMWindowCrossFrame) native "Window_history_cross_frame_Getter";
-
-  static get_location(_DOMWindowCrossFrame) native "Window_location_cross_frame_Getter";
-
-  static get_closed(_DOMWindowCrossFrame) native "Window_closed_Getter";
-
-  static get_opener(_DOMWindowCrossFrame) native "Window_opener_Getter";
-
-  static get_parent(_DOMWindowCrossFrame) native "Window_parent_Getter";
-
-  static get_top(_DOMWindowCrossFrame) native "Window_top_Getter";
-
-  static close(_DOMWindowCrossFrame) native "Window_close_Callback";
-
-  static postMessage(_DOMWindowCrossFrame, message, targetOrigin, [messagePorts]) native "Window_postMessage_Callback";
-}
-
-class Blink_HistoryCrossFrame {
-  // _HistoryCrossFrame native entry points
-  static back(_HistoryCrossFrame) native "History_back_Callback";
-
-  static forward(_HistoryCrossFrame) native "History_forward_Callback";
-
-  static go(_HistoryCrossFrame, distance) native "History_go_Callback";
-}
-
-class Blink_LocationCrossFrame {
-  // _LocationCrossFrame native entry points
-  static set_href(_LocationCrossFrame, h) native "Location_href_Setter";
 }
 
 class Blink_DOMStringMap {
@@ -17244,9 +23323,63 @@
 }
 
 // Calls through JsNative but returns DomException instead of error strings.
+class Stats {
+  Stats(this.name) {
+    counts = new Map<String, int>();
+  }
+
+  String name;
+  Map<String, int> counts;
+  clear() {
+    counts.clear();
+  }
+
+  track(String v) {
+    counts[v] = counts.putIfAbsent(v, ()=> 0) + 1;
+  }
+  toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('================');
+    sb.write('$name ${counts.length}');
+    var keys = counts.keys.toList();
+    keys.sort((a,b) => counts[b].compareTo(counts[a]));
+    for (var key in keys) {
+      print("$key => ${counts[key]}");
+    }
+    sb.write('---------------');
+    sb.write('================');
+    return sb;
+  }
+}
+
+bool TRACK_STATS = true;
+dumpStats() {
+  print("------------ STATS ----------------");
+  print(Blink_JsNative_DomException.getPropertyStats.toString()); 
+  print(Blink_JsNative_DomException.setPropertyStats.toString());
+  print(Blink_JsNative_DomException.callMethodStats.toString());
+  print(Blink_JsNative_DomException.constructorStats.toString());
+  print("-----------------------------------");
+}
+
+clearStats() {
+  Blink_JsNative_DomException.getPropertyStats.clear();
+  Blink_JsNative_DomException.setPropertyStats.clear();
+  Blink_JsNative_DomException.callMethodStats.clear();  
+  Blink_JsNative_DomException.constructorStats.clear();  
+}
+
 class Blink_JsNative_DomException {
-  static getProperty(js.JsObject o, name) {
+  static var getPropertyStats = new Stats('get property');
+  static var setPropertyStats = new Stats('set property');
+  static var callMethodStats = new Stats('call method');
+  static var constructorStats = new Stats('constructor');
+
+  static var constructors = new Map<String, dynamic>();
+
+  static getProperty(o, String name) {
     try {
+      if (TRACK_STATS) getPropertyStats.track(name);
       return js.JsNative.getProperty(o, name);
     } catch (e) {
       // Re-throw any errors (returned as a string) as a DomException.
@@ -17254,13 +23387,55 @@
     }
   }
 
-  static callMethod(js.JsObject o, String method, List args) {
+  static propertyQuery(o, String name) {
     try {
+      if (TRACK_STATS) getPropertyStats.track('__propertyQuery__');
+      return js.JsNative.getProperty(o, name);
+    } catch (e) {
+      // Re-throw any errors (returned as a string) as a DomException.
+      throw new DomException.jsInterop(e);
+    }
+  }
+
+  static callConstructor0(String name) {
+    try {
+      if (TRACK_STATS) constructorStats.track(name);
+      var constructor = constructors.putIfAbsent(name, () => js.context[name]);
+      return js.JsNative.callConstructor0(constructor);
+    } catch (e) {
+      // Re-throw any errors (returned as a string) as a DomException.
+      throw new DomException.jsInterop(e);
+    }
+  }
+
+  static callConstructor(String name, List args) {
+    try {
+      if (TRACK_STATS) constructorStats.track(name);
+      var constructor = constructors.putIfAbsent(name, () => js.context[name]);
+      return js.JsNative.callConstructor(constructor, args);
+    } catch (e) {
+      // Re-throw any errors (returned as a string) as a DomException.
+      throw new DomException.jsInterop(e);
+    }
+  }
+
+  static setProperty(o, String name, value) {
+    try {
+      if (TRACK_STATS) setPropertyStats.track(name);
+      return js.JsNative.setProperty(o, name, value);
+    } catch (e) {
+      // Re-throw any errors (returned as a string) as a DomException.
+      throw new DomException.jsInterop(e);
+    }
+  }
+
+  static callMethod(o, String method, List args) {
+    try {
+      if (TRACK_STATS) callMethodStats.track(method);
       return js.JsNative.callMethod(o, method, args);
     } catch (e) {
       // Re-throw any errors (returned as a string) as a DomException.
       throw new DomException.jsInterop(e);
     }
   }
-}
-
+}
\ No newline at end of file
diff --git a/sdk/lib/_internal/js_runtime/lib/io_patch.dart b/sdk/lib/_internal/js_runtime/lib/io_patch.dart
index 350ab96..e403844 100644
--- a/sdk/lib/_internal/js_runtime/lib/io_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/io_patch.dart
@@ -420,6 +420,11 @@
   static SecurityContext get defaultContext {
     throw new UnsupportedError("default SecurityContext getter");
   }
+
+  @patch
+  static bool get alpnSupported {
+    throw new UnsupportedError("SecurityContext alpnSupported getter");
+  }
 }
 
 @patch
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 4976562..7d2e968 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -1953,13 +1953,17 @@
     // Replace the patterns with a regular expression wildcard.
     // Note: in a perfect world, one would use "(.*)", but not in
     // JavaScript, "." does not match newlines.
-    String pattern = JS('String',
-                        r"#.replace('\\$arguments\\$', '((?:x|[^x])*)')"
-                        r".replace('\\$argumentsExpr\\$',  '((?:x|[^x])*)')"
-                        r".replace('\\$expr\\$',  '((?:x|[^x])*)')"
-                        r".replace('\\$method\\$',  '((?:x|[^x])*)')"
-                        r".replace('\\$receiver\\$',  '((?:x|[^x])*)')",
-                        message);
+    String pattern = JS(
+        'String',
+        r"#.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), "
+            r"'((?:x|[^x])*)')"
+        r".replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'),  "
+            r"'((?:x|[^x])*)')"
+        r".replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'),  '((?:x|[^x])*)')"
+        r".replace(new RegExp('\\\\\\$method\\\\\\$', 'g'),  '((?:x|[^x])*)')"
+        r".replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'),  "
+            r"'((?:x|[^x])*)')",
+        message);
 
     return new TypeErrorDecoder(arguments,
                                 argumentsExpr,
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index ad72431..a8e71f6 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -64,9 +64,11 @@
   static const int MASK_WHENCOMPLETE = 8;
   static const int STATE_CHAIN = 0;
   static const int STATE_THEN = MASK_VALUE;
-  static const int STATE_THEN_ONERROR = MASK_VALUE | MASK_ERROR;
+  // TODO(johnmccutchan): Remove the hard coded value. See #26030.
+  static const int STATE_THEN_ONERROR = 3;  // MASK_VALUE | MASK_ERROR.
   static const int STATE_CATCHERROR = MASK_ERROR;
-  static const int STATE_CATCHERROR_TEST = MASK_ERROR | MASK_TEST_ERROR;
+  // TODO(johnmccutchan): Remove the hard coded value. See #26030.
+  static const int STATE_CATCHERROR_TEST = 6;  // MASK_ERROR | MASK_TEST_ERROR.
   static const int STATE_WHENCOMPLETE = MASK_WHENCOMPLETE;
   // Listeners on the same future are linked through this link.
   _FutureListener _nextListener = null;
@@ -189,7 +191,7 @@
     _resultOrListeners = source;
   }
 
-  Future then(f(T value), { Function onError }) {
+  Future/*<S>*/ then/*<S>*/(f(T value), { Function onError }) {
     Zone currentZone = Zone.current;
     if (!identical(currentZone, _ROOT_ZONE)) {
       f = currentZone.registerUnaryCallback(f);
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index b69c6fc..87fc341 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -259,13 +259,13 @@
    *         _outputSink.add(data);
    *       }
    *
-   *       void addError(e, [st]) => _outputSink(e, st);
+   *       void addError(e, [st]) => _outputSink.addError(e, st);
    *       void close() => _outputSink.close();
    *     }
    *
    *     class DuplicationTransformer implements StreamTransformer<String, String> {
    *       // Some generic types ommitted for brevety.
-   *       Stream bind(Stream stream) => new Stream<String>.eventTransform(
+   *       Stream bind(Stream stream) => new Stream<String>.eventTransformed(
    *           stream,
    *           (EventSink sink) => new DuplicationSink(sink));
    *     }
@@ -532,7 +532,7 @@
    * If a broadcast stream is listened to more than once, each subscription
    * will individually call `convert` and expand the events.
    */
-  Stream/*<S>*/ expand(Iterable/*<S>*/ convert(T value)) {
+  Stream/*<S>*/ expand/*<S>*/(Iterable/*<S>*/ convert(T value)) {
     return new _ExpandStream<T, dynamic/*=S*/>(this, convert);
   }
 
@@ -566,7 +566,8 @@
    * The `streamTransformer` can decide whether it wants to return a
    * broadcast stream or not.
    */
-  Stream transform(StreamTransformer<T, dynamic> streamTransformer) {
+  Stream/*<S>*/ transform/*<S>*/(
+      StreamTransformer<T, dynamic/*=S*/ > streamTransformer) {
     return streamTransformer.bind(this);
   }
 
@@ -1696,7 +1697,7 @@
    */
   const factory StreamTransformer(
       StreamSubscription<T> transformer(Stream<S> stream, bool cancelOnError))
-      = _StreamSubscriptionTransformer;
+      = _StreamSubscriptionTransformer<S, T>;
 
   /**
    * Creates a [StreamTransformer] that delegates events to the given functions.
@@ -1713,7 +1714,7 @@
       void handleData(S data, EventSink<T> sink),
       void handleError(Object error, StackTrace stackTrace, EventSink<T> sink),
       void handleDone(EventSink<T> sink)})
-          = _StreamHandlerTransformer;
+          = _StreamHandlerTransformer<S, T>;
 
   /**
    * Transform the incoming [stream]'s events.
diff --git a/sdk/lib/collection/set.dart b/sdk/lib/collection/set.dart
index 309355c..4dd32cb 100644
--- a/sdk/lib/collection/set.dart
+++ b/sdk/lib/collection/set.dart
@@ -120,8 +120,8 @@
     return result;
   }
 
-  Iterable map(f(E element)) =>
-      new EfficientLengthMappedIterable<E, dynamic>(this, f);
+  Iterable/*<T>*/ map/*<T>*/(/*=T*/f(E element)) =>
+      new EfficientLengthMappedIterable<E, dynamic/*=T*/>(this, f);
 
   E get single {
     if (length > 1) throw IterableElementError.tooMany();
@@ -138,8 +138,8 @@
 
   Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f);
 
-  Iterable expand(Iterable f(E element)) =>
-      new ExpandIterable<E, dynamic>(this, f);
+  Iterable/*<T>*/ expand/*<T>*/(Iterable/*<T>*/ f(E element)) =>
+      new ExpandIterable<E, dynamic/*=T*/>(this, f);
 
   void forEach(void f(E element)) {
     for (E element in this) f(element);
@@ -157,8 +157,8 @@
     return value;
   }
 
-  dynamic fold(var initialValue,
-               dynamic combine(var previousValue, E element)) {
+  dynamic/*=T*/ fold/*<T>*/(var/*=T*/ initialValue,
+      dynamic/*=T*/ combine(var/*=T*/ previousValue, E element)) {
     var value = initialValue;
     for (E element in this) value = combine(value, element);
     return value;
diff --git a/sdk/lib/convert/ascii.dart b/sdk/lib/convert/ascii.dart
index c8b5903..6302333 100644
--- a/sdk/lib/convert/ascii.dart
+++ b/sdk/lib/convert/ascii.dart
@@ -69,7 +69,8 @@
 
 // Superclass for [AsciiEncoder] and [Latin1Encoder].
 // Generalizes common operations that only differ by a mask;
-class _UnicodeSubsetEncoder extends Converter<String, List<int>> {
+class _UnicodeSubsetEncoder extends
+    ChunkedConverter<String, List<int>, String, List<int>> {
   final int _subsetMask;
 
   const _UnicodeSubsetEncoder(this._subsetMask);
@@ -154,7 +155,8 @@
  * This class converts Latin-1 bytes (lists of unsigned 8-bit integers)
  * to a string.
  */
-abstract class _UnicodeSubsetDecoder extends Converter<List<int>, String> {
+abstract class _UnicodeSubsetDecoder extends
+    ChunkedConverter<List<int>, String, List<int>, String> {
   final bool _allowInvalid;
   final int _subsetMask;
 
diff --git a/sdk/lib/convert/base64.dart b/sdk/lib/convert/base64.dart
index eb7519a..ff3a439 100644
--- a/sdk/lib/convert/base64.dart
+++ b/sdk/lib/convert/base64.dart
@@ -5,13 +5,11 @@
 part of dart.convert;
 
 /**
- * An instance of [Base64Codec].
+ * A [base64](https://tools.ietf.org/html/rfc4648) encoder and decoder.
  *
- * This instance provides a convenient access to
- * [base64](https://tools.ietf.org/html/rfc4648) encoding and decoding.
- *
- * It encodes and decodes using the default base64 alphabet, does not allow
- * any invalid characters when decoding, and requires padding.
+ * It encodes using the default base64 alphabet,
+ * decodes using both the base64 and base64url alphabets,
+ * does not allow invalid characters and requires padding.
  *
  * Examples:
  *
@@ -21,6 +19,21 @@
  */
 const Base64Codec BASE64 = const Base64Codec();
 
+/**
+ * A [base64url](https://tools.ietf.org/html/rfc4648) encoder and decoder.
+ *
+ * It encodes and decodes using the base64url alphabet,
+ * decodes using both the base64 and base64url alphabets,
+ * does not allow invalid characters and requires padding.
+ *
+ * Examples:
+ *
+ *     var encoded = BASE64.encode([0x62, 0x6c, 0xc3, 0xa5, 0x62, 0xc3, 0xa6,
+ *                                  0x72, 0x67, 0x72, 0xc3, 0xb8, 0x64]);
+ *     var decoded = BASE64.decode("YmzDpWLDpnJncsO4ZAo=");
+ */
+const Base64Codec BASE64URL = const Base64Codec.urlSafe();
+
 // Constants used in more than one class.
 const int _paddingChar = 0x3d;  // '='.
 
@@ -30,15 +43,18 @@
  * A [Base64Codec] allows base64 encoding bytes into ASCII strings and
  * decoding valid encodings back to bytes.
  *
- * This implementation only handles the simplest RFC 4648 base-64 encoding.
+ * This implementation only handles the simplest RFC 4648 base64 and base64url
+ * encodings.
  * It does not allow invalid characters when decoding and it requires,
  * and generates, padding so that the input is always a multiple of four
  * characters.
  */
 class Base64Codec extends Codec<List<int>, String> {
-  const Base64Codec();
+  final Base64Encoder _encoder;
+  const Base64Codec() : _encoder = const Base64Encoder();
+  const Base64Codec.urlSafe() : _encoder = const Base64Encoder.urlSafe();
 
-  Base64Encoder get encoder => const Base64Encoder();
+  Base64Encoder get encoder => _encoder;
 
   Base64Decoder get decoder => const Base64Decoder();
 }
@@ -48,44 +64,46 @@
 // ------------------------------------------------------------------------
 
 /**
- * Base-64 encoding converter.
+ * Base64 and base64url encoding converter.
  *
- * Encodes lists of bytes using base64 encoding.
- * The result are ASCII strings using a restricted alphabet.
+ * Encodes lists of bytes using base64 or base64url encoding.
+ *
+ * The results are ASCII strings using a restricted alphabet.
  */
-class Base64Encoder extends Converter<List<int>, String> {
-  const Base64Encoder();
+class Base64Encoder extends
+    ChunkedConverter<List<int>, String, List<int>, String> {
+  final bool _urlSafe;
+
+  const Base64Encoder() : _urlSafe = false;
+  const Base64Encoder.urlSafe() : _urlSafe = true;
 
   String convert(List<int> input) {
     if (input.isEmpty) return "";
-    var encoder = new _Base64Encoder();
+    var encoder = new _Base64Encoder(_urlSafe);
     Uint8List buffer = encoder.encode(input, 0, input.length, true);
     return new String.fromCharCodes(buffer);
   }
 
   ByteConversionSink startChunkedConversion(Sink<String> sink) {
     if (sink is StringConversionSink) {
-      return new _Utf8Base64EncoderSink(sink.asUtf8Sink(false));
+      return new _Utf8Base64EncoderSink(sink.asUtf8Sink(false), _urlSafe);
     }
-    return new _AsciiBase64EncoderSink(sink);
-  }
-
-  Stream<String> bind(Stream<List<int>> stream) {
-    return new Stream<String>.eventTransformed(
-        stream,
-        (EventSink sink) =>
-            new _ConverterStreamEventSink<List<int>, String>(this, sink));
+    return new _AsciiBase64EncoderSink(sink, _urlSafe);
   }
 }
 
 /**
- * Helper class for encoding bytes to BASE-64.
+ * Helper class for encoding bytes to base64.
  */
 class _Base64Encoder {
   /** The RFC 4648 base64 encoding alphabet. */
   static const String _base64Alphabet =
       "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
+  /** The RFC 4648 base64url encoding alphabet. */
+  static const String _base64urlAlphabet =
+      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
+
   /** Shift-count to extract the values stored in [_state]. */
   static const int _valueShift = 2;
 
@@ -103,6 +121,12 @@
    */
   int _state = 0;
 
+  /** Alphabet used for encoding. */
+  final String _alphabet;
+
+  _Base64Encoder(bool urlSafe)
+      : _alphabet = urlSafe ? _base64urlAlphabet : _base64Alphabet;
+
   /** Encode count and bits into a value to be stored in [_state]. */
   static int _encodeState(int count, int bits) {
     assert(count <= _countMask);
@@ -148,15 +172,17 @@
       bufferLength += 4;  // Room for padding.
     }
     var output = createBuffer(bufferLength);
-    _state = encodeChunk(bytes, start, end, isLast, output, 0, _state);
+    _state = encodeChunk(_alphabet, bytes, start, end, isLast,
+                         output, 0, _state);
     if (bufferLength > 0) return output;
     // If the input plus the data in state is still less than three bytes,
     // there may not be any output.
     return null;
   }
 
-  static int encodeChunk(List<int> bytes, int start, int end, bool isLast,
-                          Uint8List output, int outputIndex, int state) {
+  static int encodeChunk(String alphabet,
+                         List<int> bytes, int start, int end, bool isLast,
+                         Uint8List output, int outputIndex, int state) {
     int bits = _stateBits(state);
     // Count number of missing bytes in three-byte chunk.
     int expectedChars = 3 - _stateCount(state);
@@ -172,20 +198,20 @@
       expectedChars--;
       if (expectedChars == 0) {
         output[outputIndex++] =
-            _base64Alphabet.codeUnitAt((bits >> 18) & _sixBitMask);
+            alphabet.codeUnitAt((bits >> 18) & _sixBitMask);
         output[outputIndex++] =
-            _base64Alphabet.codeUnitAt((bits >> 12) & _sixBitMask);
+            alphabet.codeUnitAt((bits >> 12) & _sixBitMask);
         output[outputIndex++] =
-            _base64Alphabet.codeUnitAt((bits >> 6) & _sixBitMask);
+            alphabet.codeUnitAt((bits >> 6) & _sixBitMask);
         output[outputIndex++] =
-            _base64Alphabet.codeUnitAt(bits & _sixBitMask);
+            alphabet.codeUnitAt(bits & _sixBitMask);
         expectedChars = 3;
         bits = 0;
       }
     }
     if (byteOr >= 0 && byteOr <= 255) {
       if (isLast && expectedChars < 3) {
-        writeFinalChunk(output, outputIndex, 3 - expectedChars, bits);
+        writeFinalChunk(alphabet, output, outputIndex, 3 - expectedChars, bits);
         return 0;
       }
       return _encodeState(3 - expectedChars, bits);
@@ -208,24 +234,25 @@
    * Only used when the [_state] contains a partial (1 or 2 byte)
    * input.
    */
-  static void writeFinalChunk(Uint8List output, int outputIndex,
+  static void writeFinalChunk(String alphabet,
+                              Uint8List output, int outputIndex,
                               int count, int bits) {
     assert(count > 0);
     if (count == 1) {
       output[outputIndex++] =
-          _base64Alphabet.codeUnitAt((bits >> 2) & _sixBitMask);
+          alphabet.codeUnitAt((bits >> 2) & _sixBitMask);
       output[outputIndex++] =
-          _base64Alphabet.codeUnitAt((bits << 4) & _sixBitMask);
+          alphabet.codeUnitAt((bits << 4) & _sixBitMask);
       output[outputIndex++] = _paddingChar;
       output[outputIndex++] = _paddingChar;
     } else {
       assert(count == 2);
       output[outputIndex++] =
-          _base64Alphabet.codeUnitAt((bits >> 10) & _sixBitMask);
+          alphabet.codeUnitAt((bits >> 10) & _sixBitMask);
       output[outputIndex++] =
-          _base64Alphabet.codeUnitAt((bits >> 4) & _sixBitMask);
+          alphabet.codeUnitAt((bits >> 4) & _sixBitMask);
       output[outputIndex++] =
-          _base64Alphabet.codeUnitAt((bits << 2) & _sixBitMask);
+          alphabet.codeUnitAt((bits << 2) & _sixBitMask);
       output[outputIndex++] = _paddingChar;
     }
   }
@@ -240,6 +267,8 @@
    */
   Uint8List bufferCache;
 
+  _BufferCachingBase64Encoder(bool urlSafe) : super(urlSafe);
+
   Uint8List createBuffer(int bufferLength) {
     if (bufferCache == null || bufferCache.length < bufferLength) {
       bufferCache = new Uint8List(bufferLength);
@@ -268,11 +297,11 @@
 }
 
 class _AsciiBase64EncoderSink extends _Base64EncoderSink {
-  final _Base64Encoder _encoder = new _BufferCachingBase64Encoder();
-
   final Sink<String> _sink;
+  final _Base64Encoder _encoder;
 
-  _AsciiBase64EncoderSink(this._sink);
+  _AsciiBase64EncoderSink(this._sink, bool urlSafe)
+      : _encoder = new _BufferCachingBase64Encoder(urlSafe);
 
   void _add(List<int> source, int start, int end, bool isLast) {
     Uint8List buffer = _encoder.encode(source, start, end, isLast);
@@ -288,9 +317,10 @@
 
 class _Utf8Base64EncoderSink extends _Base64EncoderSink {
   final ByteConversionSink _sink;
-  final _Base64Encoder _encoder = new _Base64Encoder();
+  final _Base64Encoder _encoder;
 
-  _Utf8Base64EncoderSink(this._sink);
+  _Utf8Base64EncoderSink(this._sink, bool urlSafe)
+      : _encoder = new _Base64Encoder(urlSafe);
 
   void _add(List<int> source, int start, int end, bool isLast) {
     Uint8List buffer = _encoder.encode(source, start, end, isLast);
@@ -304,7 +334,16 @@
 // Decoder
 // ------------------------------------------------------------------------
 
-class Base64Decoder extends Converter<String, List<int>> {
+/**
+ * Decoder for base64 encoded data.
+ *
+ * This decoder accepts both base64 and base64url ("url-safe") encodings.
+ *
+ * The encoding is required to be properly padded.
+ */
+class Base64Decoder extends
+    ChunkedConverter<String, List<int>, String, List<int>> {
+
   const Base64Decoder();
 
   List<int> convert(String input, [int start = 0, int end]) {
@@ -349,7 +388,7 @@
    *
    * Accepts the "URL-safe" alphabet as well (`-` and `_` are the
    * 62nd and 63rd alphabet characters), and considers `%` a padding
-   * character which mush be followed by `3D`, the percent-escape
+   * character, which mush then be followed by `3D`, the percent-escape
    * for `=`.
    */
   static final List<int> _inverseAlphabet = new Int8List.fromList([
@@ -371,7 +410,7 @@
   /**
    * Maintains the intermediate state of a partly-decoded input.
    *
-   * BASE-64 is decoded in chunks of four characters. If a chunk does not
+   * Base64 is decoded in chunks of four characters. If a chunk does not
    * contain a full block, the decoded bits (six per character) of the
    * available characters are stored in [_state] until the next call to
    * [_decode] or [_close].
@@ -618,7 +657,7 @@
    * Check that the remainder of the string is valid padding.
    *
    * Valid padding is a correct number (0, 1 or 2) of `=` characters
-   * or `%3D` sequences depending on the number of preceding BASE-64 characters.
+   * or `%3D` sequences depending on the number of preceding base64 characters.
    * The [state] parameter encodes which padding continuations are allowed
    * as the number of expected characters. That number is the number of
    * expected padding characters times 3 minus the number of padding characters
diff --git a/sdk/lib/convert/chunked_conversion.dart b/sdk/lib/convert/chunked_conversion.dart
index 4c962eb..d450c75 100644
--- a/sdk/lib/convert/chunked_conversion.dart
+++ b/sdk/lib/convert/chunked_conversion.dart
@@ -7,6 +7,57 @@
 typedef void _ChunkedConversionCallback<T>(T accumulated);
 
 /**
+ * A converter that supports chunked conversions.
+ *
+ * In addition to immediate conversions from [S] to [T], a chunked converter
+ * also supports longer-running conversions from [S2] to [T2].
+ *
+ * Frequently, the source and target types are the same, but this is not a
+ * requirement. In particular, converters that work with lists in the
+ * immediate conversion, could flatten the type for the chunked conversion.
+ *
+ * For example, the [LineSplitter] class returns a `List<String>` for the
+ * immediate conversion, but returns individual `String`s in the chunked
+ * conversion.
+ */
+abstract class ChunkedConverter<S, T, S2, T2> extends Converter<S, T> {
+
+  const ChunkedConverter();
+
+  /**
+   * Starts a chunked conversion.
+   *
+   * The returned sink serves as input for the long-running conversion. The
+   * given [sink] serves as output.
+   */
+  ChunkedConversionSink<S2> startChunkedConversion(Sink<T2> sink) {
+    throw new UnsupportedError(
+        "This converter does not support chunked conversions: $this");
+  }
+
+  Stream<T2> bind(Stream<S2> stream) {
+    return new Stream<T2>.eventTransformed(
+        stream,
+        (EventSink<T2> sink) =>
+            new _ConverterStreamEventSink<S2, T2>(this, sink));
+  }
+
+  /**
+   * Fuses this instance with the given [other] converter.
+   *
+   * If [other] is a ChunkedConverter (with matching generic types), returns a
+   * [ChunkedConverter].
+   */
+  Converter<S, dynamic> fuse(Converter<T, dynamic> other) {
+    if (other is ChunkedConverter<T, dynamic, T2, dynamic>) {
+      return new _FusedChunkedConverter<S, T, dynamic, S2, T2, dynamic>(
+          this, other);
+    }
+    return super.fuse(other);
+  }
+}
+
+/**
  * A [ChunkedConversionSink] is used to transmit data more efficiently between
  * two converters during chunked conversions.
  *
@@ -55,7 +106,7 @@
 }
 
 /**
- * This class converts implements the logic for a chunked conversion as a
+ * This class implements the logic for a chunked conversion as a
  * stream transformer.
  *
  * It is used as strategy in the [EventTransformStream].
@@ -71,9 +122,11 @@
    * The input sink for new data. All data that is received with
    * [handleData] is added into this sink.
    */
-  ChunkedConversionSink _chunkedSink;
+  ChunkedConversionSink<S> _chunkedSink;
 
-  _ConverterStreamEventSink(Converter converter, EventSink<T> sink)
+  _ConverterStreamEventSink(
+      Converter/*=ChunkedConverter<dynamic, dynamic, S, T>*/ converter,
+      EventSink<T> sink)
       : this._eventSink = sink,
         _chunkedSink = converter.startChunkedConversion(sink);
 
@@ -83,3 +136,20 @@
   }
   void close() => _chunkedSink.close();
 }
+
+/**
+ * Fuses two chunked converters.
+ */
+class _FusedChunkedConverter<S, M, T, S2, M2, T2> extends
+    ChunkedConverter<S, T, S2, T2> {
+  final ChunkedConverter<S, M, S2, M2> _first;
+  final ChunkedConverter<M, T, M2, T2> _second;
+
+  _FusedChunkedConverter(this._first, this._second);
+
+  T convert(S input) => _second.convert(_first.convert(input));
+
+  ChunkedConversionSink<S2> startChunkedConversion(Sink<T2> sink) {
+    return _first.startChunkedConversion(_second.startChunkedConversion(sink));
+  }
+}
diff --git a/sdk/lib/convert/converter.dart b/sdk/lib/convert/converter.dart
index 627e417..d6d9a9b 100644
--- a/sdk/lib/convert/converter.dart
+++ b/sdk/lib/convert/converter.dart
@@ -29,14 +29,22 @@
   }
 
   /**
-   * Starts a chunked conversion.
+   * Deprecated.
+   *
+   * Use the [ChunkedConverter] interface instead.
    */
+  @deprecated
   ChunkedConversionSink startChunkedConversion(Sink sink) {
     throw new UnsupportedError(
         "This converter does not support chunked conversions: $this");
   }
 
-  // Subclasses are encouraged to provide better types.
+  /**
+   * Deprecated.
+   *
+   * Use the [ChunkedConverter] interface instead.
+   */
+  @deprecated
   Stream bind(Stream stream) {
     return new Stream.eventTransformed(
         stream,
@@ -50,14 +58,10 @@
  * For a non-chunked conversion converts the input in sequence.
  */
 class _FusedConverter<S, M, T> extends Converter<S, T> {
-  final Converter _first;
-  final Converter _second;
+  final Converter<S, M> _first;
+  final Converter<M, T> _second;
 
   _FusedConverter(this._first, this._second);
 
   T convert(S input) => _second.convert(_first.convert(input));
-
-  ChunkedConversionSink startChunkedConversion(Sink sink) {
-    return _first.startChunkedConversion(_second.startChunkedConversion(sink));
-  }
 }
diff --git a/sdk/lib/convert/encoding.dart b/sdk/lib/convert/encoding.dart
index 696b5f0..fd6f91f 100644
--- a/sdk/lib/convert/encoding.dart
+++ b/sdk/lib/convert/encoding.dart
@@ -10,6 +10,9 @@
 abstract class Encoding extends Codec<String, List<int>> {
   const Encoding();
 
+  ChunkedConverter<String, List<int>, String, List<int>> get encoder;
+  ChunkedConverter<List<int>, String, List<int>, String> get decoder;
+
   Future<String> decodeStream(Stream<List<int>> byteStream) {
     return byteStream
       .transform(decoder)
diff --git a/sdk/lib/convert/html_escape.dart b/sdk/lib/convert/html_escape.dart
index 6b0a3fa..2a0af75 100644
--- a/sdk/lib/convert/html_escape.dart
+++ b/sdk/lib/convert/html_escape.dart
@@ -152,7 +152,7 @@
  * found to be easier to read if greater-than is also escaped whenever
  * less-than is.
  */
-class HtmlEscape extends Converter<String, String> {
+class HtmlEscape extends ChunkedConverter<String, String, String, String> {
 
   /** The [HtmlEscapeMode] used by the converter. */
   final HtmlEscapeMode mode;
diff --git a/sdk/lib/convert/json.dart b/sdk/lib/convert/json.dart
index ace76c2..e80a986 100644
--- a/sdk/lib/convert/json.dart
+++ b/sdk/lib/convert/json.dart
@@ -9,10 +9,10 @@
  *
  * The [unsupportedObject] field holds that object that failed to be serialized.
  *
- * If an object isn't directly serializable, the serializer calls the 'toJson'
+ * If an object isn't directly serializable, the serializer calls the `toJson`
  * method on the object. If that call fails, the error will be stored in the
  * [cause] field. If the call returns an object that isn't directly
- * serializable, the [cause] is be null.
+ * serializable, the [cause] is null.
  */
 class JsonUnsupportedObjectError extends Error {
   /** The object that could not be serialized. */
@@ -53,8 +53,8 @@
  *
  * Examples:
  *
- *    var encoded = JSON.encode([1, 2, { "a": null }]);
- *    var decoded = JSON.decode('["foo", { "bar": 499 }]');
+ *     var encoded = JSON.encode([1, 2, { "a": null }]);
+ *     var decoded = JSON.decode('["foo", { "bar": 499 }]');
  */
 const JsonCodec JSON = const JsonCodec();
 
@@ -68,8 +68,8 @@
  *
  * Examples:
  *
- *    var encoded = JSON.encode([1, 2, { "a": null }]);
- *    var decoded = JSON.decode('["foo", { "bar": 499 }]');
+ *     var encoded = JSON.encode([1, 2, { "a": null }]);
+ *     var decoded = JSON.decode('["foo", { "bar": 499 }]');
  */
 class JsonCodec extends Codec<Object, String> {
   final _Reviver _reviver;
@@ -78,24 +78,22 @@
   /**
    * Creates a `JsonCodec` with the given reviver and encoding function.
    *
-   * The [reviver] function is called during decoding. It is invoked
-   * once for each object or list property that has been parsed.
-   * The `key` argument is either the
-   * integer list index for a list property, the string map key for object
-   * properties, or `null` for the final result.
+   * The [reviver] function is called during decoding. It is invoked once for
+   * each object or list property that has been parsed.
+   * The `key` argument is either the integer list index for a list property,
+   * the string map key for object properties, or `null` for the final result.
    *
    * If [reviver] is omitted, it defaults to returning the value argument.
    *
    * The [toEncodable] function is used during encoding. It is invoked for
-   * values that are not directly encodable to a JSON1toE
-   * string (a value that is not a number, boolean, string, null, list or a map
-   * with string keys). The function must return an object that is directly
-   * encodable. The elements of a returned list and values of a returned map
-   * do not need be directly encodable, and if they aren't, `toEncodable` will
-   * be used on them as well.
-   * Please notice that it is possible to cause an infinite recursive
-   * regress in this way, by effectively creating an infinite data structure
-   * through repeated call to `toEncodable`.
+   * values that are not directly encodable to a string (a value that is not a
+   * number, boolean, string, null, list or a map with string keys). The
+   * function must return an object that is directly encodable. The elements of
+   * a returned list and values of a returned map do not need to be directly
+   * encodable, and if they aren't, `toEncodable` will be used on them as well.
+   * Please notice that it is possible to cause an infinite recursive regress
+   * in this way, by effectively creating an infinite data structure through
+   * repeated call to `toEncodable`.
    *
    * If [toEncodable] is omitted, it defaults to a function that returns the
    * result of calling `.toJson()` on the unencodable object.
@@ -161,7 +159,7 @@
 /**
  * This class converts JSON objects to strings.
  */
-class JsonEncoder extends Converter<Object, String> {
+class JsonEncoder extends ChunkedConverter<Object, String, Object, String> {
   /**
    * The string used for indention.
    *
@@ -220,14 +218,14 @@
    * Converts [object] to a JSON [String].
    *
    * Directly serializable values are [num], [String], [bool], and [Null], as
-   * well as some [List] and [Map] values.
-   * For [List], the elements must all be serializable.
-   * For [Map], the keys must be [String] and the values must be serializable.
+   * well as some [List] and [Map] values. For [List], the elements must all be
+   * serializable. For [Map], the keys must be [String] and the values must be
+   * serializable.
    *
-   * If a value is any other type is attempted serialized, the conversion
-   * function provided in the constructor is invoked with the object as argument
-   * and the result, which must be a directly serializable value,
-   * is serialized instead of the original value.
+   * If a value of any other type is attempted to be serialized, the
+   * `toEncodable` function provided in the constructor is called with the value
+   * as argument. The result, which must be a directly serializable value, is
+   * serialized instead of the original value.
    *
    * If the conversion throws, or returns a value that is not directly
    * serializable, a [JsonUnsupportedObjectError] exception is thrown.
@@ -267,7 +265,7 @@
     return new _JsonEncoderSink(sink, _toEncodable, indent);
   }
 
-  // Override the base-classes bind, to provide a better type.
+  // Override the base class's bind, to provide a better type.
   Stream<String> bind(Stream<Object> stream) => super.bind(stream);
 
   Converter<Object, dynamic> fuse(Converter<String, dynamic> other) {
@@ -285,7 +283,8 @@
  * a JSON string, and then UTF-8 encoding the string, but without
  * creating an intermediate string.
  */
-class JsonUtf8Encoder extends Converter<Object, List<int>> {
+class JsonUtf8Encoder extends
+    ChunkedConverter<Object, List<int>, Object, List<int>> {
   /** Default buffer size used by the JSON-to-UTF-8 encoder. */
   static const int DEFAULT_BUFFER_SIZE = 256;
   /** Indentation used in pretty-print mode, `null` if not pretty. */
@@ -304,20 +303,21 @@
    * If `indent` contains characters that are not valid JSON whitespace
    * characters, the result will not be valid JSON. JSON whitespace characters
    * are space (U+0020), tab (U+0009), line feed (U+000a) and carriage return
-   * (U+000d) (ECMA 404).
+   * (U+000d) ([ECMA
+   * 404](http://www.ecma-international.org/publications/standards/Ecma-404.htm)).
    *
    * The [bufferSize] is the size of the internal buffers used to collect
    * UTF-8 code units.
    * If using [startChunkedConversion], it will be the size of the chunks.
    *
-   * The JSON encoder handles numbers, strings, booleans, null, lists and
-   * maps directly.
+   * The JSON encoder handles numbers, strings, booleans, null, lists and maps
+   * directly.
    *
-   * Any other object is attempted converted by [toEncodable] to an
-   * object that is of one of the convertible types.
+   * Any other object is attempted converted by [toEncodable] to an object that
+   * is of one of the convertible types.
    *
-   * If [toEncodable] is omitted, it defaults to calling `.toJson()` on
-   * the object.
+   * If [toEncodable] is omitted, it defaults to calling `.toJson()` on the
+   * object.
    */
   JsonUtf8Encoder([String indent,
                    toEncodable(Object object),
@@ -391,7 +391,7 @@
                                     _indent, _bufferSize);
   }
 
-  // Override the base-classes bind, to provide a better type.
+  // Override the base class's bind, to provide a better type.
   Stream<List<int>> bind(Stream<Object> stream) {
     return super.bind(stream);
   }
@@ -474,7 +474,7 @@
 /**
  * This class parses JSON strings and builds the corresponding objects.
  */
-class JsonDecoder extends Converter<String, Object> {
+class JsonDecoder extends ChunkedConverter<String, Object, String, Object> {
   final _Reviver _reviver;
   /**
    * Constructs a new JsonDecoder.
@@ -487,8 +487,8 @@
    * Converts the given JSON-string [input] to its corresponding object.
    *
    * Parsed JSON values are of the types [num], [String], [bool], [Null],
-   * [List]s of parsed JSON values or [Map]s from [String] to parsed
-   * JSON values.
+   * [List]s of parsed JSON values or [Map]s from [String] to parsed JSON
+   * values.
    *
    * If `this` was initialized with a reviver, then the parsing operation
    * invokes the reviver on every object or list property that has been parsed.
@@ -501,14 +501,13 @@
   dynamic convert(String input) => _parseJson(input, _reviver);
 
   /**
-   * Starts a conversion from a chunked JSON string to its corresponding
-   * object.
+   * Starts a conversion from a chunked JSON string to its corresponding object.
    *
    * The output [sink] receives exactly one decoded element through `add`.
    */
   external StringConversionSink startChunkedConversion(Sink<Object> sink);
 
-  // Override the base-classes bind, to provide a better type.
+  // Override the base class's bind, to provide a better type.
   Stream<Object> bind(Stream<String> stream) => super.bind(stream);
 }
 
@@ -618,9 +617,8 @@
   /**
    * Check if an encountered object is already being traversed.
    *
-   * Records the object if it isn't already seen.
-   * Should have a matching call to [_removeSeen] when the object
-   * is no longer being traversed.
+   * Records the object if it isn't already seen. Should have a matching call to
+   * [_removeSeen] when the object is no longer being traversed.
    */
   void _checkCycle(object) {
     for (int i = 0; i < _seen.length; i++) {
@@ -632,7 +630,7 @@
   }
 
   /**
-   * Removes object from the list of currently traversed objects.
+   * Remove [object] from the list of currently traversed objects.
    *
    * Should be called in the opposite order of the matching [_checkCycle]
    * calls.
@@ -644,10 +642,10 @@
   }
 
   /**
-   * Writes an object.
+   * Write an object.
    *
-   * If the object isn't directly encodable, the [_toEncodable] function
-   * gets one chance to return a replacement which is encodable.
+   * If [object] isn't directly encodable, the [_toEncodable] function gets one
+   * chance to return a replacement which is encodable.
    */
   void writeObject(object) {
     // Tries stringifying object directly. If it's not a simple value, List or
@@ -667,7 +665,7 @@
   }
 
   /**
-   * Serializes a [num], [String], [bool], [Null], [List] or [Map] value.
+   * Serialize a [num], [String], [bool], [Null], [List] or [Map] value.
    *
    * Returns true if the value is one of these types, and false if not.
    * If a value is both a [List] and a [Map], it's serialized as a [List].
@@ -707,7 +705,7 @@
     }
   }
 
-  /** Serializes a [List]. */
+  /** Serialize a [List]. */
   void writeList(List list) {
     writeString('[');
     if (list.length > 0) {
@@ -720,7 +718,7 @@
     writeString(']');
   }
 
-  /** Serializes a [Map]. */
+  /** Serialize a [Map]. */
   bool writeMap(Map<String, Object> map) {
     if (map.isEmpty) {
       writeString("{}");
@@ -912,11 +910,11 @@
    *
    * Calls [addChunk] with slices of UTF-8 code units.
    * These will typically have size [bufferSize], but may be shorter.
-   * The buffers are not reused, so the [addChunk] call may keep and reuse
-   * the chunks.
+   * The buffers are not reused, so the [addChunk] call may keep and reuse the
+   * chunks.
    *
-   * If [indent] is non-`null`, the result will be "pretty-printed" with
-   * extra newlines and indentation, using [indent] as the indentation.
+   * If [indent] is non-`null`, the result will be "pretty-printed" with extra
+   * newlines and indentation, using [indent] as the indentation.
    */
   static void stringify(Object object,
                         List<int> indent,
diff --git a/sdk/lib/convert/latin1.dart b/sdk/lib/convert/latin1.dart
index 98d7ba5..1d8546d 100644
--- a/sdk/lib/convert/latin1.dart
+++ b/sdk/lib/convert/latin1.dart
@@ -59,9 +59,9 @@
     }
   }
 
-  Converter<String, List<int>> get encoder => const Latin1Encoder();
+  Latin1Encoder get encoder => const Latin1Encoder();
 
-  Converter<List<int>, String> get decoder =>
+  Latin1Decoder get decoder =>
       _allowInvalid ? const Latin1Decoder(allowInvalid: true)
                     : const Latin1Decoder(allowInvalid: false);
 }
diff --git a/sdk/lib/convert/line_splitter.dart b/sdk/lib/convert/line_splitter.dart
index b5ec32b..a9c9448 100644
--- a/sdk/lib/convert/line_splitter.dart
+++ b/sdk/lib/convert/line_splitter.dart
@@ -17,7 +17,8 @@
  *
  * The returned lines do not contain the line terminators.
  */
-class LineSplitter extends Converter<String, List<String>> {
+class LineSplitter extends
+    ChunkedConverter<String, List<String>, String, String> {
 
   const LineSplitter();
 
@@ -49,7 +50,29 @@
     }
   }
 
-  List<String> convert(String data) => split(data).toList();
+  List<String> convert(String data) {
+    List<String> lines = <String>[];
+    int end = data.length;
+    int sliceStart = 0;
+    int char = 0;
+    for (int i = 0; i < end; i++) {
+      int previousChar = char;
+      char = data.codeUnitAt(i);
+      if (char != _CR) {
+        if (char != _LF) continue;
+        if (previousChar == _CR) {
+          sliceStart = i + 1;
+          continue;
+        }
+      }
+      lines.add(data.substring(sliceStart, i));
+      sliceStart = i + 1;
+    }
+    if (sliceStart < end) {
+      lines.add(data.substring(sliceStart, end));
+    }
+    return lines;
+  }
 
   StringConversionSink startChunkedConversion(Sink<String> sink) {
     if (sink is! StringConversionSink) {
@@ -57,9 +80,6 @@
     }
     return new _LineSplitterSink(sink);
   }
-
-  // Override the base-class' bind, to provide a better type.
-  Stream<String> bind(Stream<String> stream) => super.bind(stream);
 }
 
 // TODO(floitsch): deal with utf8.
diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart
index 287d8ec..a93c9ae 100644
--- a/sdk/lib/convert/utf.dart
+++ b/sdk/lib/convert/utf.dart
@@ -76,7 +76,8 @@
  * This class converts strings to their UTF-8 code units (a list of
  * unsigned 8-bit integers).
  */
-class Utf8Encoder extends Converter<String, List<int>> {
+class Utf8Encoder extends
+    ChunkedConverter<String, List<int>, String, List<int>> {
 
   const Utf8Encoder();
 
@@ -304,7 +305,8 @@
  * This class converts UTF-8 code units (lists of unsigned 8-bit integers)
  * to a string.
  */
-class Utf8Decoder extends Converter<List<int>, String> {
+class Utf8Decoder extends
+    ChunkedConverter<List<int>, String, List<int>, String> {
   final bool _allowMalformed;
 
   /**
diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart
index 8009536..38587b1 100644
--- a/sdk/lib/core/num.dart
+++ b/sdk/lib/core/num.dart
@@ -374,8 +374,8 @@
    *     1234567.toStringAsPrecision(9); // 1234567.00
    *     12345678901234567890.toStringAsPrecision(20); // 12345678901234567168
    *     12345678901234567890.toStringAsPrecision(14); // 1.2345678901235e+19
-   *     0.00000012345.toPrecision(15); // 1.23450000000000e-7
-   *     0.0000012345.toPrecision(15);  // 0.00000123450000000000
+   *     0.00000012345.toStringAsPrecision(15); // 1.23450000000000e-7
+   *     0.0000012345.toStringAsPrecision(15);  // 0.00000123450000000000
    */
   String toStringAsPrecision(int precision);
 
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 25dce9d..50e16be 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -123,9 +123,6 @@
   throw new UnimplementedError();
 }
 
-/// Dartium functions that are a NOOP in dart2js.
-unwrap_jso(dartClass_instance) => dartClass_instance;
-wrap_jso(jsObject) => jsObject;
 createCustomUpgrader(Type customElementClass, $this) => $this;
 // 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
@@ -187,11 +184,6 @@
   @DocsEditable()
   String hreflang;
 
-  @DomName('HTMLAnchorElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String integrity;
-
   @DomName('HTMLAnchorElement.rel')
   @DocsEditable()
   String rel;
@@ -268,180 +260,79 @@
 @DomName('Animation')
 @Experimental() // untriaged
 @Native("Animation")
-class Animation extends AnimationNode {
+class Animation extends EventTarget {
   // To suppress missing implicit constructor warnings.
   factory Animation._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('Animation.Animation')
-  @DocsEditable()
-  factory Animation(Element target, List<Map> keyframes, [timingInput]) {
-    if ((keyframes is List<Map> || keyframes == null) && (target is Element || target == null) && timingInput == null) {
-      return Animation._create_1(target, keyframes);
-    }
-    if ((timingInput is num || timingInput == null) && (keyframes is List<Map> || keyframes == null) && (target is Element || target == null)) {
-      return Animation._create_2(target, keyframes, timingInput);
-    }
-    if ((timingInput is Map || timingInput == null) && (keyframes is List<Map> || keyframes == null) && (target is Element || target == null)) {
-      var timingInput_1 = convertDartToNative_Dictionary(timingInput);
-      return Animation._create_3(target, keyframes, timingInput_1);
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
-  }
-  static Animation _create_1(target, keyframes) => JS('Animation', 'new Animation(#,#)', target, keyframes);
-  static Animation _create_2(target, keyframes, timingInput) => JS('Animation', 'new Animation(#,#,#)', target, keyframes, timingInput);
-  static Animation _create_3(target, keyframes, timingInput) => JS('Animation', 'new Animation(#,#,#)', target, keyframes, timingInput);
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('AnimationEffect')
-@Experimental() // untriaged
-@Native("AnimationEffect")
-class AnimationEffect extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory AnimationEffect._() { throw new UnsupportedError("Not supported"); }
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('WebKitAnimationEvent')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
-@Native("WebKitAnimationEvent")
-class AnimationEvent extends Event {
-  // To suppress missing implicit constructor warnings.
-  factory AnimationEvent._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('WebKitAnimationEvent.animationName')
-  @DocsEditable()
-  final String animationName;
-
-  @DomName('WebKitAnimationEvent.elapsedTime')
-  @DocsEditable()
-  final double elapsedTime;
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('AnimationNode')
-@Experimental() // untriaged
-@Native("AnimationNode")
-class AnimationNode extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory AnimationNode._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('AnimationNode.activeDuration')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final double activeDuration;
-
-  @DomName('AnimationNode.currentIteration')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final int currentIteration;
-
-  @DomName('AnimationNode.duration')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final double duration;
-
-  @DomName('AnimationNode.endTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final double endTime;
-
-  @DomName('AnimationNode.localTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final double localTime;
-
-  @DomName('AnimationNode.player')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final AnimationPlayer player;
-
-  @DomName('AnimationNode.startTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final double startTime;
-
-  @DomName('AnimationNode.timing')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final Timing timing;
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('AnimationPlayer')
-@Experimental() // untriaged
-@Native("AnimationPlayer")
-class AnimationPlayer extends EventTarget {
-  // To suppress missing implicit constructor warnings.
-  factory AnimationPlayer._() { throw new UnsupportedError("Not supported"); }
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', '!!(document.body.animate)');
 
-  @DomName('AnimationPlayer.currentTime')
+  @DomName('Animation.currentTime')
   @DocsEditable()
   @Experimental() // untriaged
   num currentTime;
 
-  @DomName('AnimationPlayer.playState')
+  @DomName('Animation.effect')
+  @DocsEditable()
+  @Experimental() // untriaged
+  AnimationEffectReadOnly effect;
+
+  @DomName('Animation.endClip')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num endClip;
+
+  @DomName('Animation.finished')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Future finished;
+
+  @DomName('Animation.playState')
   @DocsEditable()
   @Experimental() // untriaged
   final String playState;
 
-  @DomName('AnimationPlayer.playbackRate')
+  @DomName('Animation.playbackRate')
   @DocsEditable()
   @Experimental() // untriaged
   num playbackRate;
 
-  @DomName('AnimationPlayer.source')
+  @DomName('Animation.ready')
   @DocsEditable()
   @Experimental() // untriaged
-  AnimationNode source;
+  final Future ready;
 
-  @DomName('AnimationPlayer.startTime')
+  @DomName('Animation.startClip')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num startClip;
+
+  @DomName('Animation.startTime')
   @DocsEditable()
   @Experimental() // untriaged
   num startTime;
 
-  @DomName('AnimationPlayer.cancel')
+  @DomName('Animation.cancel')
   @DocsEditable()
   @Experimental() // untriaged
   void cancel() native;
 
-  @DomName('AnimationPlayer.finish')
+  @DomName('Animation.finish')
   @DocsEditable()
   @Experimental() // untriaged
   void finish() native;
 
-  @DomName('AnimationPlayer.pause')
+  @DomName('Animation.pause')
   @DocsEditable()
   @Experimental() // untriaged
   void pause() native;
 
-  @DomName('AnimationPlayer.play')
+  @DomName('Animation.play')
   @DocsEditable()
   @Experimental() // untriaged
   void play() native;
 
-  @DomName('AnimationPlayer.reverse')
+  @DomName('Animation.reverse')
   @DocsEditable()
   @Experimental() // untriaged
   void reverse() native;
@@ -452,6 +343,129 @@
 
 
 @DocsEditable()
+@DomName('AnimationEffectReadOnly')
+@Experimental() // untriaged
+@Native("AnimationEffectReadOnly")
+class AnimationEffectReadOnly extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory AnimationEffectReadOnly._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('AnimationEffectReadOnly.computedTiming')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Map get computedTiming => convertNativeToDart_Dictionary(this._get_computedTiming);
+  @JSName('computedTiming')
+  @DomName('AnimationEffectReadOnly.computedTiming')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final dynamic _get_computedTiming;
+
+  @DomName('AnimationEffectReadOnly.timing')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final AnimationEffectTiming timing;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('AnimationEffectTiming')
+@Experimental() // untriaged
+@Native("AnimationEffectTiming")
+class AnimationEffectTiming extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory AnimationEffectTiming._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('AnimationEffectTiming.delay')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num delay;
+
+  @DomName('AnimationEffectTiming.direction')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String direction;
+
+  @DomName('AnimationEffectTiming.duration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  @Creates('Null')
+  @Returns('num|String')
+  Object duration;
+
+  @DomName('AnimationEffectTiming.easing')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String easing;
+
+  @DomName('AnimationEffectTiming.endDelay')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num endDelay;
+
+  @DomName('AnimationEffectTiming.fill')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String fill;
+
+  @DomName('AnimationEffectTiming.iterationStart')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num iterationStart;
+
+  @DomName('AnimationEffectTiming.iterations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num iterations;
+
+  @DomName('AnimationEffectTiming.playbackRate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num playbackRate;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('AnimationEvent')
+@Experimental() // untriaged
+@Native("AnimationEvent")
+class AnimationEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory AnimationEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('AnimationEvent.AnimationEvent')
+  @DocsEditable()
+  factory AnimationEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return AnimationEvent._create_1(type, eventInitDict_1);
+    }
+    return AnimationEvent._create_2(type);
+  }
+  static AnimationEvent _create_1(type, eventInitDict) => JS('AnimationEvent', 'new AnimationEvent(#,#)', type, eventInitDict);
+  static AnimationEvent _create_2(type) => JS('AnimationEvent', 'new AnimationEvent(#)', type);
+
+  @DomName('AnimationEvent.animationName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String animationName;
+
+  @DomName('AnimationEvent.elapsedTime')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double elapsedTime;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('AnimationPlayerEvent')
 @Experimental() // untriaged
 @Native("AnimationPlayerEvent")
@@ -459,6 +473,18 @@
   // To suppress missing implicit constructor warnings.
   factory AnimationPlayerEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('AnimationPlayerEvent.AnimationPlayerEvent')
+  @DocsEditable()
+  factory AnimationPlayerEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return AnimationPlayerEvent._create_1(type, eventInitDict_1);
+    }
+    return AnimationPlayerEvent._create_2(type);
+  }
+  static AnimationPlayerEvent _create_1(type, eventInitDict) => JS('AnimationPlayerEvent', 'new AnimationPlayerEvent(#,#)', type, eventInitDict);
+  static AnimationPlayerEvent _create_2(type) => JS('AnimationPlayerEvent', 'new AnimationPlayerEvent(#)', type);
+
   @DomName('AnimationPlayerEvent.currentTime')
   @DocsEditable()
   @Experimental() // untriaged
@@ -485,17 +511,45 @@
   @DomName('AnimationTimeline.currentTime')
   @DocsEditable()
   @Experimental() // untriaged
-  final double currentTime;
+  num currentTime;
 
-  @DomName('AnimationTimeline.getAnimationPlayers')
+  @DomName('AnimationTimeline.playbackRate')
   @DocsEditable()
   @Experimental() // untriaged
-  List<AnimationPlayer> getAnimationPlayers() native;
+  num playbackRate;
+
+  @DomName('AnimationTimeline.getAnimations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<Animation> getAnimations() native;
 
   @DomName('AnimationTimeline.play')
   @DocsEditable()
   @Experimental() // untriaged
-  AnimationPlayer play(AnimationNode source) native;
+  Animation play(AnimationEffectReadOnly source) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('AppBannerPromptResult')
+@Experimental() // untriaged
+@Native("AppBannerPromptResult")
+class AppBannerPromptResult extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory AppBannerPromptResult._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('AppBannerPromptResult.outcome')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String outcome;
+
+  @DomName('AppBannerPromptResult.platform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String platform;
 }
 // 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
@@ -694,6 +748,18 @@
   // To suppress missing implicit constructor warnings.
   factory ApplicationCacheErrorEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('ApplicationCacheErrorEvent.ApplicationCacheErrorEvent')
+  @DocsEditable()
+  factory ApplicationCacheErrorEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return ApplicationCacheErrorEvent._create_1(type, eventInitDict_1);
+    }
+    return ApplicationCacheErrorEvent._create_2(type);
+  }
+  static ApplicationCacheErrorEvent _create_1(type, eventInitDict) => JS('ApplicationCacheErrorEvent', 'new ApplicationCacheErrorEvent(#,#)', type, eventInitDict);
+  static ApplicationCacheErrorEvent _create_2(type) => JS('ApplicationCacheErrorEvent', 'new ApplicationCacheErrorEvent(#)', type);
+
   @DomName('ApplicationCacheErrorEvent.message')
   @DocsEditable()
   @Experimental() // untriaged
@@ -935,6 +1001,18 @@
   // To suppress missing implicit constructor warnings.
   factory AutocompleteErrorEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('AutocompleteErrorEvent.AutocompleteErrorEvent')
+  @DocsEditable()
+  factory AutocompleteErrorEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return AutocompleteErrorEvent._create_1(type, eventInitDict_1);
+    }
+    return AutocompleteErrorEvent._create_2(type);
+  }
+  static AutocompleteErrorEvent _create_1(type, eventInitDict) => JS('AutocompleteErrorEvent', 'new AutocompleteErrorEvent(#,#)', type, eventInitDict);
+  static AutocompleteErrorEvent _create_2(type) => JS('AutocompleteErrorEvent', 'new AutocompleteErrorEvent(#)', type);
+
   @DomName('AutocompleteErrorEvent.reason')
   @DocsEditable()
   final String reason;
@@ -1045,6 +1123,43 @@
 
 
 @DocsEditable()
+@DomName('BeforeInstallPromptEvent')
+@Experimental() // untriaged
+@Native("BeforeInstallPromptEvent")
+class BeforeInstallPromptEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory BeforeInstallPromptEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('BeforeInstallPromptEvent.BeforeInstallPromptEvent')
+  @DocsEditable()
+  factory BeforeInstallPromptEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return BeforeInstallPromptEvent._create_1(type, eventInitDict_1);
+    }
+    return BeforeInstallPromptEvent._create_2(type);
+  }
+  static BeforeInstallPromptEvent _create_1(type, eventInitDict) => JS('BeforeInstallPromptEvent', 'new BeforeInstallPromptEvent(#,#)', type, eventInitDict);
+  static BeforeInstallPromptEvent _create_2(type) => JS('BeforeInstallPromptEvent', 'new BeforeInstallPromptEvent(#)', type);
+
+  List<String> get platforms => JS("List<String>", "#.platforms", this);
+
+  @DomName('BeforeInstallPromptEvent.userChoice')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Future userChoice;
+
+  @DomName('BeforeInstallPromptEvent.prompt')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future prompt() native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('BeforeUnloadEvent')
 @Native("BeforeUnloadEvent")
 class BeforeUnloadEvent extends Event {
@@ -1111,6 +1226,204 @@
 
 
 @DocsEditable()
+@DomName('Bluetooth')
+@Experimental() // untriaged
+@Native("Bluetooth")
+class Bluetooth extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory Bluetooth._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('Bluetooth.requestDevice')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future requestDevice(Map options) {
+    var options_1 = convertDartToNative_Dictionary(options);
+    return _requestDevice_1(options_1);
+  }
+  @JSName('requestDevice')
+  @DomName('Bluetooth.requestDevice')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _requestDevice_1(options) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('BluetoothDevice')
+@Experimental() // untriaged
+@Native("BluetoothDevice")
+class BluetoothDevice extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothDevice._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('BluetoothDevice.deviceClass')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int deviceClass;
+
+  @DomName('BluetoothDevice.instanceID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String instanceID;
+
+  @DomName('BluetoothDevice.name')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String name;
+
+  @DomName('BluetoothDevice.paired')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool paired;
+
+  @DomName('BluetoothDevice.productID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int productID;
+
+  @DomName('BluetoothDevice.productVersion')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int productVersion;
+
+  @DomName('BluetoothDevice.vendorID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int vendorID;
+
+  @DomName('BluetoothDevice.vendorIDSource')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String vendorIDSource;
+
+  @JSName('connectGATT')
+  @DomName('BluetoothDevice.connectGATT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future connectGatt() native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('BluetoothGATTCharacteristic')
+@Experimental() // untriaged
+@Native("BluetoothGATTCharacteristic")
+class BluetoothGattCharacteristic extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothGattCharacteristic._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('BluetoothGATTCharacteristic.uuid')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String uuid;
+
+  @DomName('BluetoothGATTCharacteristic.readValue')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future readValue() native;
+
+  @DomName('BluetoothGATTCharacteristic.writeValue')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future writeValue(/*BufferSource*/ value) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('BluetoothGATTRemoteServer')
+@Experimental() // untriaged
+@Native("BluetoothGATTRemoteServer")
+class BluetoothGattRemoteServer extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothGattRemoteServer._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('BluetoothGATTRemoteServer.connected')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool connected;
+
+  @DomName('BluetoothGATTRemoteServer.getPrimaryService')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getPrimaryService(/*BluetoothServiceUUID*/ service) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('BluetoothGATTService')
+@Experimental() // untriaged
+@Native("BluetoothGATTService")
+class BluetoothGattService extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothGattService._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('BluetoothGATTService.isPrimary')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool isPrimary;
+
+  @DomName('BluetoothGATTService.uuid')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String uuid;
+
+  @DomName('BluetoothGATTService.getCharacteristic')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getCharacteristic(/*BluetoothCharacteristicUUID*/ characteristic) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('BluetoothUUID')
+@Experimental() // untriaged
+@Native("BluetoothUUID")
+class BluetoothUuid extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothUuid._() { throw new UnsupportedError("Not supported"); }
+
+  @JSName('canonicalUUID')
+  @DomName('BluetoothUUID.canonicalUUID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static String canonicalUuid(int alias) native;
+
+  @DomName('BluetoothUUID.getCharacteristic')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static String getCharacteristic(Object name) native;
+
+  @DomName('BluetoothUUID.getDescriptor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static String getDescriptor(Object name) native;
+
+  @DomName('BluetoothUUID.getService')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static String getService(Object name) native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('Body')
 @Experimental() // untriaged
 @Native("Body")
@@ -1444,6 +1757,11 @@
   @DocsEditable()
   bool checkValidity() native;
 
+  @DomName('HTMLButtonElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
+
   @DomName('HTMLButtonElement.setCustomValidity')
   @DocsEditable()
   void setCustomValidity(String error) native;
@@ -1475,21 +1793,11 @@
   // To suppress missing implicit constructor warnings.
   factory CacheStorage._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('CacheStorage.create')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future create(String cacheName) native;
-
   @DomName('CacheStorage.delete')
   @DocsEditable()
   @Experimental() // untriaged
   Future delete(String cacheName) native;
 
-  @DomName('CacheStorage.get')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future get(String cacheName) native;
-
   @DomName('CacheStorage.has')
   @DocsEditable()
   @Experimental() // untriaged
@@ -1499,29 +1807,32 @@
   @DocsEditable()
   @Experimental() // untriaged
   Future keys() native;
-}
-// 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.
 
-
-@DocsEditable()
-@DomName('Canvas2DContextAttributes')
-// http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL
-@Experimental()
-@Native("Canvas2DContextAttributes")
-class Canvas2DContextAttributes extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory Canvas2DContextAttributes._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('Canvas2DContextAttributes.alpha')
-  @DocsEditable()
-  bool alpha;
-
-  @DomName('Canvas2DContextAttributes.storage')
+  @DomName('CacheStorage.match')
   @DocsEditable()
   @Experimental() // untriaged
-  String storage;
+  Future match(/*RequestInfo*/ request, [Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _match_1(request, options_1);
+    }
+    return _match_2(request);
+  }
+  @JSName('match')
+  @DomName('CacheStorage.match')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _match_1(request, options) native;
+  @JSName('match')
+  @DomName('CacheStorage.match')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _match_2(request) native;
+
+  @DomName('CacheStorage.open')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future open(String cacheName) native;
 }
 // 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
@@ -1583,10 +1894,10 @@
   @DocsEditable()
   @Creates('CanvasRenderingContext2D|RenderingContext')
   @Returns('CanvasRenderingContext2D|RenderingContext|Null')
-  Object getContext(String contextId, [Map attrs]) {
-    if (attrs != null) {
-      var attrs_1 = convertDartToNative_Dictionary(attrs);
-      return _getContext_1(contextId, attrs_1);
+  Object getContext(String contextId, [Map attributes]) {
+    if (attributes != null) {
+      var attributes_1 = convertDartToNative_Dictionary(attributes);
+      return _getContext_1(contextId, attributes_1);
     }
     return _getContext_2(contextId);
   }
@@ -1595,7 +1906,7 @@
   @DocsEditable()
   @Creates('CanvasRenderingContext2D|RenderingContext')
   @Returns('CanvasRenderingContext2D|RenderingContext|Null')
-  Object _getContext_1(contextId, attrs) native;
+  Object _getContext_1(contextId, attributes) native;
   @JSName('getContext')
   @DomName('HTMLCanvasElement.getContext')
   @DocsEditable()
@@ -1606,7 +1917,7 @@
   @JSName('toDataURL')
   @DomName('HTMLCanvasElement.toDataURL')
   @DocsEditable()
-  String _toDataUrl(String type, [num quality]) native;
+  String _toDataUrl(String type, [arguments_OR_quality]) native;
 
   /// Stream of `webglcontextlost` events handled by this [CanvasElement].
   @DomName('HTMLCanvasElement.onwebglcontextlost')
@@ -1832,6 +2143,11 @@
   @Returns('String|CanvasGradient|CanvasPattern')
   Object fillStyle;
 
+  @DomName('CanvasRenderingContext2D.filter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String filter;
+
   @DomName('CanvasRenderingContext2D.font')
   @DocsEditable()
   String font;
@@ -1948,27 +2264,26 @@
   @DomName('CanvasRenderingContext2D.createImageData')
   @DocsEditable()
   @Creates('ImageData|=Object')
-  ImageData createImageData(num sw, num sh) {
-    return convertNativeToDart_ImageData(_createImageData_1(sw, sh));
+  ImageData createImageData(imagedata_OR_sw, [num sh]) {
+    if ((imagedata_OR_sw is ImageData) && sh == null) {
+      var imagedata_1 = convertDartToNative_ImageData(imagedata_OR_sw);
+      return convertNativeToDart_ImageData(_createImageData_1(imagedata_1));
+    }
+    if (sh != null && (imagedata_OR_sw is num)) {
+      return convertNativeToDart_ImageData(_createImageData_2(imagedata_OR_sw, sh));
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
   }
   @JSName('createImageData')
   @DomName('CanvasRenderingContext2D.createImageData')
   @DocsEditable()
   @Creates('ImageData|=Object')
-  _createImageData_1(sw, sh) native;
-
-  @DomName('CanvasRenderingContext2D.createImageData')
-  @DocsEditable()
-  @Creates('ImageData|=Object')
-  ImageData createImageDataFromImageData(ImageData imagedata) {
-    var imagedata_1 = convertDartToNative_ImageData(imagedata);
-    return convertNativeToDart_ImageData(_createImageDataFromImageData_1(imagedata_1));
-  }
+  _createImageData_1(imagedata) native;
   @JSName('createImageData')
   @DomName('CanvasRenderingContext2D.createImageData')
   @DocsEditable()
   @Creates('ImageData|=Object')
-  _createImageDataFromImageData_1(imagedata) native;
+  _createImageData_2(num sw, sh) native;
 
   @DomName('CanvasRenderingContext2D.createLinearGradient')
   @DocsEditable()
@@ -1976,12 +2291,7 @@
 
   @DomName('CanvasRenderingContext2D.createPattern')
   @DocsEditable()
-  CanvasPattern createPattern(canvas_OR_image, String repetitionType) native;
-
-  @JSName('createPattern')
-  @DomName('CanvasRenderingContext2D.createPattern')
-  @DocsEditable()
-  CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) native;
+  CanvasPattern createPattern(Object image, String repetitionType) native;
 
   @DomName('CanvasRenderingContext2D.createRadialGradient')
   @DocsEditable()
@@ -2000,7 +2310,15 @@
   @DocsEditable()
   // http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL
   @Experimental()
-  Canvas2DContextAttributes getContextAttributes() native;
+  Map getContextAttributes() {
+    return convertNativeToDart_Dictionary(_getContextAttributes_1());
+  }
+  @JSName('getContextAttributes')
+  @DomName('CanvasRenderingContext2D.getContextAttributes')
+  @DocsEditable()
+  // http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL
+  @Experimental()
+  _getContextAttributes_1() native;
 
   @DomName('CanvasRenderingContext2D.getImageData')
   @DocsEditable()
@@ -2156,6 +2474,11 @@
   void rect(num x, num y, num width, num height) native;
 
 
+  @DomName('CanvasRenderingContext2D.createImageDataFromImageData')
+  @DocsEditable()
+  ImageData createImageDataFromImageData(ImageData imagedata) =>
+    JS('ImageData', '#.createImageData(#)', this, imagedata);
+
   /**
    * Sets the color used inside shapes.
    * [r], [g], [b] are 0-255, [a] is 0-1.
@@ -2200,6 +2523,10 @@
        endAngle, anticlockwise);
   }
 
+  @DomName('CanvasRenderingContext2D.createPatternFromImage')
+  CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) =>
+    JS('CanvasPattern', '#.createPattern(#, #)', this, image, repetitionType);
+
   /**
    * Draws an image from a CanvasImageSource to an area of this canvas.
    *
@@ -2457,7 +2784,7 @@
 @DocsEditable()
 @DomName('CharacterData')
 @Native("CharacterData")
-class CharacterData extends Node implements ChildNode {
+class CharacterData extends Node implements NonDocumentTypeChildNode, ChildNode {
   // To suppress missing implicit constructor warnings.
   factory CharacterData._() { throw new UnsupportedError("Not supported"); }
 
@@ -2475,7 +2802,7 @@
 
   @DomName('CharacterData.deleteData')
   @DocsEditable()
-  void deleteData(int offset, int length) native;
+  void deleteData(int offset, int count) native;
 
   @DomName('CharacterData.insertData')
   @DocsEditable()
@@ -2483,14 +2810,26 @@
 
   @DomName('CharacterData.replaceData')
   @DocsEditable()
-  void replaceData(int offset, int length, String data) native;
+  void replaceData(int offset, int count, String data) native;
 
   @DomName('CharacterData.substringData')
   @DocsEditable()
-  String substringData(int offset, int length) native;
+  String substringData(int offset, int count) native;
 
   // From ChildNode
 
+  @DomName('CharacterData.after')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void after(Object nodes) native;
+
+  @DomName('CharacterData.before')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void before(Object nodes) native;
+
+  // From NonDocumentTypeChildNode
+
   @DomName('CharacterData.nextElementSibling')
   @DocsEditable()
   final Element nextElementSibling;
@@ -2511,9 +2850,9 @@
   // To suppress missing implicit constructor warnings.
   factory ChildNode._() { throw new UnsupportedError("Not supported"); }
 
-  final Element nextElementSibling;
+  void after(Object nodes);
 
-  final Element previousElementSibling;
+  void before(Object nodes);
 
   void remove();
 }
@@ -2523,6 +2862,19 @@
 
 
 @DocsEditable()
+@DomName('CHROMIUMValuebuffer')
+@Experimental() // untriaged
+@Native("CHROMIUMValuebuffer")
+class ChromiumValuebuffer extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory ChromiumValuebuffer._() { throw new UnsupportedError("Not supported"); }
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('CircularGeofencingRegion')
 @Experimental() // untriaged
 @Native("CircularGeofencingRegion")
@@ -2569,12 +2921,138 @@
 
 
 @DocsEditable()
+@DomName('Client')
+@Experimental() // untriaged
+@Native("Client")
+class Client extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory Client._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('Client.frameType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String frameType;
+
+  @DomName('Client.id')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String id;
+
+  @DomName('Client.url')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String url;
+
+  @DomName('Client.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      var message_1 = convertDartToNative_SerializedScriptValue(message);
+      _postMessage_1(message_1, transfer);
+      return;
+    }
+    var message_1 = convertDartToNative_SerializedScriptValue(message);
+    _postMessage_2(message_1);
+    return;
+  }
+  @JSName('postMessage')
+  @DomName('Client.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _postMessage_1(message, List<MessagePort> transfer) native;
+  @JSName('postMessage')
+  @DomName('Client.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _postMessage_2(message) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('Clients')
+@Experimental() // untriaged
+@Native("Clients")
+class Clients extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory Clients._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('Clients.claim')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future claim() native;
+
+  @DomName('Clients.matchAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future matchAll([Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _matchAll_1(options_1);
+    }
+    return _matchAll_2();
+  }
+  @JSName('matchAll')
+  @DomName('Clients.matchAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _matchAll_1(options) native;
+  @JSName('matchAll')
+  @DomName('Clients.matchAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _matchAll_2() native;
+
+  @DomName('Clients.openWindow')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future openWindow(String url) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('ClipboardEvent')
+@Experimental() // untriaged
+@Native("ClipboardEvent")
+class ClipboardEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory ClipboardEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ClipboardEvent.clipboardData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final DataTransfer clipboardData;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('CloseEvent')
 @Native("CloseEvent")
 class CloseEvent extends Event {
   // To suppress missing implicit constructor warnings.
   factory CloseEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('CloseEvent.CloseEvent')
+  @DocsEditable()
+  factory CloseEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return CloseEvent._create_1(type, eventInitDict_1);
+    }
+    return CloseEvent._create_2(type);
+  }
+  static CloseEvent _create_1(type, eventInitDict) => JS('CloseEvent', 'new CloseEvent(#,#)', type, eventInitDict);
+  static CloseEvent _create_2(type) => JS('CloseEvent', 'new CloseEvent(#)', type);
+
   @DomName('CloseEvent.code')
   @DocsEditable()
   final int code;
@@ -2634,32 +3112,27 @@
     return e;
   }
 
-  // To suppress missing implicit constructor warnings.
-  factory CompositionEvent._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('CompositionEvent.activeSegmentEnd')
+  @DomName('CompositionEvent.CompositionEvent')
   @DocsEditable()
-  @Experimental() // untriaged
-  final int activeSegmentEnd;
-
-  @DomName('CompositionEvent.activeSegmentStart')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final int activeSegmentStart;
+  factory CompositionEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return CompositionEvent._create_1(type, eventInitDict_1);
+    }
+    return CompositionEvent._create_2(type);
+  }
+  static CompositionEvent _create_1(type, eventInitDict) => JS('CompositionEvent', 'new CompositionEvent(#,#)', type, eventInitDict);
+  static CompositionEvent _create_2(type) => JS('CompositionEvent', 'new CompositionEvent(#)', type);
 
   @DomName('CompositionEvent.data')
   @DocsEditable()
   final String data;
 
-  @DomName('CompositionEvent.getSegments')
-  @DocsEditable()
-  @Experimental() // untriaged
-  List<int> getSegments() native;
-
   @JSName('initCompositionEvent')
   @DomName('CompositionEvent.initCompositionEvent')
   @DocsEditable()
-  void _initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native;
+  void _initCompositionEvent(String type, bool bubbles, bool cancelable, Window view, String data) native;
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2667,6 +3140,182 @@
 // BSD-style license that can be found in the LICENSE file.
 
 
+@DocsEditable()
+@DomName('CompositorProxy')
+@Experimental() // untriaged
+@Native("CompositorProxy")
+class CompositorProxy extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory CompositorProxy._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CompositorProxy.CompositorProxy')
+  @DocsEditable()
+  factory CompositorProxy(Element element, List<String> attributeArray) {
+    return CompositorProxy._create_1(element, attributeArray);
+  }
+  static CompositorProxy _create_1(element, attributeArray) => JS('CompositorProxy', 'new CompositorProxy(#,#)', element, attributeArray);
+
+  @DomName('CompositorProxy.opacity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num opacity;
+
+  @DomName('CompositorProxy.scrollLeft')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num scrollLeft;
+
+  @DomName('CompositorProxy.scrollTop')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num scrollTop;
+
+  @DomName('CompositorProxy.transform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomMatrix transform;
+
+  @DomName('CompositorProxy.disconnect')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void disconnect() native;
+
+  @DomName('CompositorProxy.supports')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool supports(String attribute) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('CompositorWorker')
+@Experimental() // untriaged
+@Native("CompositorWorker")
+class CompositorWorker extends EventTarget implements AbstractWorker {
+  // To suppress missing implicit constructor warnings.
+  factory CompositorWorker._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CompositorWorker.errorEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+
+  @DomName('CompositorWorker.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+  @DomName('CompositorWorker.CompositorWorker')
+  @DocsEditable()
+  factory CompositorWorker(String scriptUrl) {
+    return CompositorWorker._create_1(scriptUrl);
+  }
+  static CompositorWorker _create_1(scriptUrl) => JS('CompositorWorker', 'new CompositorWorker(#)', scriptUrl);
+
+  @DomName('CompositorWorker.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      var message_1 = convertDartToNative_SerializedScriptValue(message);
+      _postMessage_1(message_1, transfer);
+      return;
+    }
+    var message_1 = convertDartToNative_SerializedScriptValue(message);
+    _postMessage_2(message_1);
+    return;
+  }
+  @JSName('postMessage')
+  @DomName('CompositorWorker.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _postMessage_1(message, List<MessagePort> transfer) native;
+  @JSName('postMessage')
+  @DomName('CompositorWorker.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _postMessage_2(message) native;
+
+  @DomName('CompositorWorker.terminate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void terminate() native;
+
+  @DomName('CompositorWorker.onerror')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<Event> get onError => errorEvent.forTarget(this);
+
+  @DomName('CompositorWorker.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('CompositorWorkerGlobalScope')
+@Experimental() // untriaged
+@Native("CompositorWorkerGlobalScope")
+class CompositorWorkerGlobalScope extends WorkerGlobalScope {
+  // To suppress missing implicit constructor warnings.
+  factory CompositorWorkerGlobalScope._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CompositorWorkerGlobalScope.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+  @DomName('CompositorWorkerGlobalScope.cancelAnimationFrame')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void cancelAnimationFrame(int handle) native;
+
+  @DomName('CompositorWorkerGlobalScope.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void postMessage(/*any*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      var message_1 = convertDartToNative_SerializedScriptValue(message);
+      _postMessage_1(message_1, transfer);
+      return;
+    }
+    var message_1 = convertDartToNative_SerializedScriptValue(message);
+    _postMessage_2(message_1);
+    return;
+  }
+  @JSName('postMessage')
+  @DomName('CompositorWorkerGlobalScope.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _postMessage_1(message, List<MessagePort> transfer) native;
+  @JSName('postMessage')
+  @DomName('CompositorWorkerGlobalScope.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _postMessage_2(message) native;
+
+  @DomName('CompositorWorkerGlobalScope.requestAnimationFrame')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int requestAnimationFrame(FrameRequestCallback callback) native;
+
+  @DomName('CompositorWorkerGlobalScope.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+}
+// 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.
+
+
 @DomName('Console')
 class Console {
 
@@ -2780,6 +3429,12 @@
   // To suppress missing implicit constructor warnings.
   factory ConsoleBase._() { throw new UnsupportedError("Not supported"); }
 
+  @JSName('assert')
+  @DomName('ConsoleBase.assert')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void assertCondition(bool condition, Object arg) native;
+
   @DomName('ConsoleBase.timeline')
   @DocsEditable()
   @Experimental() // untriaged
@@ -2881,11 +3536,11 @@
   // To suppress missing implicit constructor warnings.
   factory Credential._() { throw new UnsupportedError("Not supported"); }
 
-  @JSName('avatarURL')
-  @DomName('Credential.avatarURL')
+  @JSName('iconURL')
+  @DomName('Credential.iconURL')
   @DocsEditable()
   @Experimental() // untriaged
-  final String avatarUrl;
+  final String iconUrl;
 
   @DomName('Credential.id')
   @DocsEditable()
@@ -2896,6 +3551,11 @@
   @DocsEditable()
   @Experimental() // untriaged
   final String name;
+
+  @DomName('Credential.type')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String type;
 }
 // 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
@@ -2910,21 +3570,11 @@
   // To suppress missing implicit constructor warnings.
   factory CredentialsContainer._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('CredentialsContainer.notifyFailedSignIn')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future notifyFailedSignIn(Credential credential) native;
-
   @DomName('CredentialsContainer.notifySignedIn')
   @DocsEditable()
   @Experimental() // untriaged
   Future notifySignedIn(Credential credential) native;
 
-  @DomName('CredentialsContainer.notifySignedOut')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future notifySignedOut() native;
-
   @DomName('CredentialsContainer.request')
   @DocsEditable()
   @Experimental() // untriaged
@@ -2945,6 +3595,81 @@
   @DocsEditable()
   @Experimental() // untriaged
   Future _request_2() native;
+
+  @DomName('CredentialsContainer.requireUserMediation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future requireUserMediation() native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('CrossOriginConnectEvent')
+@Experimental() // untriaged
+@Native("CrossOriginConnectEvent")
+class CrossOriginConnectEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory CrossOriginConnectEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CrossOriginConnectEvent.client')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final CrossOriginServiceWorkerClient client;
+
+  @DomName('CrossOriginConnectEvent.acceptConnection')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void acceptConnection(Future shouldAccept) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('CrossOriginServiceWorkerClient')
+@Experimental() // untriaged
+@Native("CrossOriginServiceWorkerClient")
+class CrossOriginServiceWorkerClient extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory CrossOriginServiceWorkerClient._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CrossOriginServiceWorkerClient.origin')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String origin;
+
+  @DomName('CrossOriginServiceWorkerClient.targetUrl')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String targetUrl;
+
+  @DomName('CrossOriginServiceWorkerClient.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      var message_1 = convertDartToNative_SerializedScriptValue(message);
+      _postMessage_1(message_1, transfer);
+      return;
+    }
+    var message_1 = convertDartToNative_SerializedScriptValue(message);
+    _postMessage_2(message_1);
+    return;
+  }
+  @JSName('postMessage')
+  @DomName('CrossOriginServiceWorkerClient.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _postMessage_1(message, List<MessagePort> transfer) native;
+  @JSName('postMessage')
+  @DomName('CrossOriginServiceWorkerClient.postMessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _postMessage_2(message) native;
 }
 // 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
@@ -2998,6 +3723,7 @@
   @DomName('CryptoKey.algorithm')
   @DocsEditable()
   @Experimental() // untriaged
+  @Creates('Null')
   final Object algorithm;
 
   @DomName('CryptoKey.extractable')
@@ -3031,12 +3757,12 @@
 
   @DomName('CSS.supports')
   @DocsEditable()
-  bool supports(String property, String value) native;
+  static bool supports(String property, String value) native;
 
   @JSName('supports')
   @DomName('CSS.supports')
   @DocsEditable()
-  bool supportsCondition(String conditionText) native;
+  static bool supportsCondition(String conditionText) native;
 }
 // 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
@@ -3062,26 +3788,6 @@
 
 
 @DocsEditable()
-@DomName('WebKitCSSFilterRule')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
-// http://www.w3.org/TR/filter-effects/
-@Native("WebKitCSSFilterRule")
-class CssFilterRule extends CssRule {
-  // To suppress missing implicit constructor warnings.
-  factory CssFilterRule._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('WebKitCSSFilterRule.style')
-  @DocsEditable()
-  final CssStyleDeclaration style;
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('CSSFontFaceRule')
 @Native("CSSFontFaceRule")
 class CssFontFaceRule extends CssRule {
@@ -3098,6 +3804,36 @@
 
 
 @DocsEditable()
+@DomName('CSSGroupingRule')
+@Experimental() // untriaged
+@Native("CSSGroupingRule")
+class CssGroupingRule extends CssRule {
+  // To suppress missing implicit constructor warnings.
+  factory CssGroupingRule._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CSSGroupingRule.cssRules')
+  @DocsEditable()
+  @Experimental() // untriaged
+  @Returns('_CssRuleList')
+  @Creates('_CssRuleList')
+  final List<CssRule> cssRules;
+
+  @DomName('CSSGroupingRule.deleteRule')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteRule(int index) native;
+
+  @DomName('CSSGroupingRule.insertRule')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int insertRule(String rule, int index) native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('CSSImportRule')
 @Native("CSSImportRule")
 class CssImportRule extends CssRule {
@@ -3169,21 +3905,20 @@
   @Experimental() // untriaged
   CssKeyframeRule __getter__(int index) native;
 
+  @DomName('CSSKeyframesRule.appendRule')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void appendRule(String rule) native;
+
   @DomName('CSSKeyframesRule.deleteRule')
   @DocsEditable()
   @Experimental() // untriaged
-  void deleteRule(String key) native;
+  void deleteRule(String select) native;
 
   @DomName('CSSKeyframesRule.findRule')
   @DocsEditable()
   @Experimental() // untriaged
-  CssKeyframeRule findRule(String key) native;
-
-  @JSName('insertRule')
-  @DomName('CSSKeyframesRule.insertRule')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void appendRule(String rule) native;
+  CssKeyframeRule findRule(String select) native;
 }
 // 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
@@ -3193,27 +3928,13 @@
 @DocsEditable()
 @DomName('CSSMediaRule')
 @Native("CSSMediaRule")
-class CssMediaRule extends CssRule {
+class CssMediaRule extends CssGroupingRule {
   // To suppress missing implicit constructor warnings.
   factory CssMediaRule._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('CSSMediaRule.cssRules')
-  @DocsEditable()
-  @Returns('_CssRuleList')
-  @Creates('_CssRuleList')
-  final List<CssRule> cssRules;
-
   @DomName('CSSMediaRule.media')
   @DocsEditable()
   final MediaList media;
-
-  @DomName('CSSMediaRule.deleteRule')
-  @DocsEditable()
-  void deleteRule(int index) native;
-
-  @DomName('CSSMediaRule.insertRule')
-  @DocsEditable()
-  int insertRule(String rule, int index) native;
 }
 // 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
@@ -3290,12 +4011,6 @@
   @Experimental() // untriaged
   static const int VIEWPORT_RULE = 15;
 
-  @DomName('CSSRule.WEBKIT_FILTER_RULE')
-  @DocsEditable()
-  // http://www.w3.org/TR/filter-effects/
-  @Experimental()
-  static const int WEBKIT_FILTER_RULE = 17;
-
   @DomName('CSSRule.WEBKIT_KEYFRAMES_RULE')
   @DocsEditable()
   // http://www.w3.org/TR/css3-animations/#cssrule
@@ -3439,23 +4154,14 @@
   @DocsEditable()
   final CssRule parentRule;
 
-  @DomName('CSSStyleDeclaration.__getter__')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Object __getter__(String name) native;
-
-  @DomName('CSSStyleDeclaration.__setter__')
-  @DocsEditable()
-  void __setter__(String propertyName, String propertyValue) native;
-
   @DomName('CSSStyleDeclaration.getPropertyPriority')
   @DocsEditable()
-  String getPropertyPriority(String propertyName) native;
+  String getPropertyPriority(String property) native;
 
   @JSName('getPropertyValue')
   @DomName('CSSStyleDeclaration.getPropertyValue')
   @DocsEditable()
-  String _getPropertyValue(String propertyName) native;
+  String _getPropertyValue(String property) native;
 
   @DomName('CSSStyleDeclaration.item')
   @DocsEditable()
@@ -3463,7 +4169,7 @@
 
   @DomName('CSSStyleDeclaration.removeProperty')
   @DocsEditable()
-  String removeProperty(String propertyName) native;
+  String removeProperty(String property) native;
 
 
   /** Gets the value of "background" */
@@ -8188,8 +8894,18 @@
     }
     return _detail;
   }
-  // To suppress missing implicit constructor warnings.
-  factory CustomEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CustomEvent.CustomEvent')
+  @DocsEditable()
+  factory CustomEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return CustomEvent._create_1(type, eventInitDict_1);
+    }
+    return CustomEvent._create_2(type);
+  }
+  static CustomEvent _create_1(type, eventInitDict) => JS('CustomEvent', 'new CustomEvent(#,#)', type, eventInitDict);
+  static CustomEvent _create_2(type) => JS('CustomEvent', 'new CustomEvent(#)', type);
 
   @DomName('CustomEvent._detail')
   @DocsEditable()
@@ -8205,7 +8921,7 @@
   @JSName('initCustomEvent')
   @DomName('CustomEvent.initCustomEvent')
   @DocsEditable()
-  void _initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg) native;
+  void _initCustomEvent(String type, bool bubbles, bool cancelable, Object detail) native;
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8308,17 +9024,17 @@
   @DomName('DataTransfer.clearData')
   @DocsEditable()
   @Experimental() // untriaged
-  void clearData([String type]) native;
+  void clearData([String format]) native;
 
   @DomName('DataTransfer.getData')
   @DocsEditable()
   @Experimental() // untriaged
-  String getData(String type) native;
+  String getData(String format) native;
 
   @DomName('DataTransfer.setData')
   @DocsEditable()
   @Experimental() // untriaged
-  void setData(String type, String data) native;
+  void setData(String format, String data) native;
 
   @DomName('DataTransfer.setDragImage')
   @DocsEditable()
@@ -8392,11 +9108,6 @@
   @DocsEditable()
   final int length;
 
-  @DomName('DataTransferItemList.__getter__')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DataTransferItem __getter__(int index) native;
-
   @DomName('DataTransferItemList.add')
   @DocsEditable()
   DataTransferItem add(data_OR_file, [String type]) native;
@@ -8415,6 +9126,10 @@
   @DocsEditable()
   void clear() native;
 
+  @DomName('DataTransferItemList.item')
+  @DocsEditable()
+  DataTransferItem item(int index) native;
+
   @DomName('DataTransferItemList.remove')
   @DocsEditable()
   @Experimental() // untriaged
@@ -8497,6 +9212,36 @@
 
 
 @DocsEditable()
+@DomName('DefaultSessionStartEvent')
+@Experimental() // untriaged
+@Native("DefaultSessionStartEvent")
+class DefaultSessionStartEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory DefaultSessionStartEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('DefaultSessionStartEvent.DefaultSessionStartEvent')
+  @DocsEditable()
+  factory DefaultSessionStartEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return DefaultSessionStartEvent._create_1(type, eventInitDict_1);
+    }
+    return DefaultSessionStartEvent._create_2(type);
+  }
+  static DefaultSessionStartEvent _create_1(type, eventInitDict) => JS('DefaultSessionStartEvent', 'new DefaultSessionStartEvent(#,#)', type, eventInitDict);
+  static DefaultSessionStartEvent _create_2(type) => JS('DefaultSessionStartEvent', 'new DefaultSessionStartEvent(#)', type);
+
+  @DomName('DefaultSessionStartEvent.session')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final PresentationSession session;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('DeprecatedStorageInfo')
 @Experimental() // untriaged
 @Native("DeprecatedStorageInfo")
@@ -8618,6 +9363,18 @@
   // To suppress missing implicit constructor warnings.
   factory DeviceLightEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('DeviceLightEvent.DeviceLightEvent')
+  @DocsEditable()
+  factory DeviceLightEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return DeviceLightEvent._create_1(type, eventInitDict_1);
+    }
+    return DeviceLightEvent._create_2(type);
+  }
+  static DeviceLightEvent _create_1(type, eventInitDict) => JS('DeviceLightEvent', 'new DeviceLightEvent(#,#)', type, eventInitDict);
+  static DeviceLightEvent _create_2(type) => JS('DeviceLightEvent', 'new DeviceLightEvent(#)', type);
+
   @DomName('DeviceLightEvent.value')
   @DocsEditable()
   @Experimental() // untriaged
@@ -9156,6 +9913,11 @@
   @DocsEditable()
   final String _lastModified;
 
+  @DomName('Document.origin')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String origin;
+
   @DomName('Document.pointerLockElement')
   @DocsEditable()
   @Experimental() // untriaged
@@ -9180,6 +9942,11 @@
   @Experimental() // untriaged
   final SvgSvgElement rootElement;
 
+  @DomName('Document.scrollingElement')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Element scrollingElement;
+
   @JSName('selectedStylesheetSet')
   @DomName('Document.selectedStylesheetSet')
   @DocsEditable()
@@ -9286,16 +10053,16 @@
   @DocsEditable()
   // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
   @Experimental()
-  Touch _createTouch(Window window, EventTarget target, int identifier, num pageX, num pageY, num screenX, num screenY, num webkitRadiusX, num webkitRadiusY, num webkitRotationAngle, num webkitForce) {
+  Touch _createTouch(Window window, EventTarget target, int identifier, num pageX, num pageY, num screenX, num screenY, num radiusX, num radiusY, num rotationAngle, num force) {
     var target_1 = _convertDartToNative_EventTarget(target);
-    return _createTouch_1(window, target_1, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce);
+    return _createTouch_1(window, target_1, identifier, pageX, pageY, screenX, screenY, radiusX, radiusY, rotationAngle, force);
   }
   @JSName('createTouch')
   @DomName('Document.createTouch')
   @DocsEditable()
   // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
   @Experimental()
-  Touch _createTouch_1(Window window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native;
+  Touch _createTouch_1(Window window, target, identifier, pageX, pageY, screenX, screenY, radiusX, radiusY, rotationAngle, force) native;
 
   @JSName('createTouchList')
   @DomName('Document.createTouchList')
@@ -9309,9 +10076,14 @@
   @DocsEditable()
   Element _elementFromPoint(int x, int y) native;
 
+  @DomName('Document.elementsFromPoint')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<Element> elementsFromPoint(int x, int y) native;
+
   @DomName('Document.execCommand')
   @DocsEditable()
-  bool execCommand(String command, bool userInterface, String value) native;
+  bool execCommand(String commandId, [bool showUI, String value]) native;
 
   @DomName('Document.exitFullscreen')
   @DocsEditable()
@@ -9330,10 +10102,6 @@
   @Experimental() // non-standard
   Object _getCssCanvasContext(String contextId, String name, int width, int height) native;
 
-  @DomName('Document.getElementById')
-  @DocsEditable()
-  Element getElementById(String elementId) native;
-
   @DomName('Document.getElementsByClassName')
   @DocsEditable()
   @Creates('NodeList|HtmlCollection')
@@ -9358,23 +10126,23 @@
 
   @DomName('Document.queryCommandEnabled')
   @DocsEditable()
-  bool queryCommandEnabled(String command) native;
+  bool queryCommandEnabled(String commandId) native;
 
   @DomName('Document.queryCommandIndeterm')
   @DocsEditable()
-  bool queryCommandIndeterm(String command) native;
+  bool queryCommandIndeterm(String commandId) native;
 
   @DomName('Document.queryCommandState')
   @DocsEditable()
-  bool queryCommandState(String command) native;
+  bool queryCommandState(String commandId) native;
 
   @DomName('Document.queryCommandSupported')
   @DocsEditable()
-  bool queryCommandSupported(String command) native;
+  bool queryCommandSupported(String commandId) native;
 
   @DomName('Document.queryCommandValue')
   @DocsEditable()
-  String queryCommandValue(String command) native;
+  String queryCommandValue(String commandId) native;
 
   @DomName('Document.transformDocumentToTreeView')
   @DocsEditable()
@@ -9390,6 +10158,12 @@
   // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-exitfullscreen
   void _webkitExitFullscreen() native;
 
+  // From NonElementParentNode
+
+  @DomName('Document.getElementById')
+  @DocsEditable()
+  Element getElementById(String elementId) native;
+
   // From ParentNode
 
   @JSName('childElementCount')
@@ -9495,12 +10269,12 @@
   /// Stream of `copy` events handled by this [Document].
   @DomName('Document.oncopy')
   @DocsEditable()
-  Stream<Event> get onCopy => Element.copyEvent.forTarget(this);
+  Stream<ClipboardEvent> get onCopy => Element.copyEvent.forTarget(this);
 
   /// Stream of `cut` events handled by this [Document].
   @DomName('Document.oncut')
   @DocsEditable()
-  Stream<Event> get onCut => Element.cutEvent.forTarget(this);
+  Stream<ClipboardEvent> get onCut => Element.cutEvent.forTarget(this);
 
   /// Stream of `doubleclick` events handled by this [Document].
   @DomName('Document.ondblclick')
@@ -9652,7 +10426,7 @@
   /// Stream of `paste` events handled by this [Document].
   @DomName('Document.onpaste')
   @DocsEditable()
-  Stream<Event> get onPaste => Element.pasteEvent.forTarget(this);
+  Stream<ClipboardEvent> get onPaste => Element.pasteEvent.forTarget(this);
 
   @DomName('Document.onpause')
   @DocsEditable()
@@ -9909,7 +10683,7 @@
 
 @DomName('DocumentFragment')
 @Native("DocumentFragment")
-class DocumentFragment extends Node implements ParentNode {
+class DocumentFragment extends Node implements NonElementParentNode, ParentNode {
   factory DocumentFragment() => document.createDocumentFragment();
 
   factory DocumentFragment.html(String html,
@@ -10024,6 +10798,8 @@
   // To suppress missing implicit constructor warnings.
   factory DocumentFragment._() { throw new UnsupportedError("Not supported"); }
 
+  // From NonElementParentNode
+
   @DomName('DocumentFragment.getElementById')
   @DocsEditable()
   @Experimental() // untriaged
@@ -10182,7 +10958,7 @@
 
   @DomName('DOMImplementation.hasFeature')
   @DocsEditable()
-  bool hasFeature(String feature, String version) native;
+  bool hasFeature() native;
 }
 // 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
@@ -10396,17 +11172,17 @@
   @DomName('DOMMatrix.scale3dSelf')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix scale3dSelf(num scale, [num ox, num oy, num oz]) native;
+  DomMatrix scale3dSelf(num scale, [num originX, num originY, num originZ]) native;
 
   @DomName('DOMMatrix.scaleNonUniformSelf')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix scaleNonUniformSelf(num sx, [num sy, num sz, num ox, num oy, num oz]) native;
+  DomMatrix scaleNonUniformSelf(num scaleX, [num scaleY, num scaleZ, num originX, num originY, num originZ]) native;
 
   @DomName('DOMMatrix.scaleSelf')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix scaleSelf(num scale, [num ox, num oy]) native;
+  DomMatrix scaleSelf(num scale, [num originX, num originY]) native;
 
   @DomName('DOMMatrix.translateSelf')
   @DocsEditable()
@@ -10554,17 +11330,17 @@
   @DomName('DOMMatrixReadOnly.scale')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix scale(num scale, [num ox, num oy]) native;
+  DomMatrix scale(num scale, [num originX, num originY]) native;
 
   @DomName('DOMMatrixReadOnly.scale3d')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix scale3d(num scale, [num ox, num oy, num oz]) native;
+  DomMatrix scale3d(num scale, [num originX, num originY, num originZ]) native;
 
   @DomName('DOMMatrixReadOnly.scaleNonUniform')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix scaleNonUniform(num sx, [num sy, num sz, num ox, num oy, num oz]) native;
+  DomMatrix scaleNonUniform(num scaleX, [num scaleY, num scaleZn, num originX, num originY, num originZ]) native;
 
   @DomName('DOMMatrixReadOnly.toFloat32Array')
   @DocsEditable()
@@ -10602,7 +11378,7 @@
 
   @DomName('DOMParser.parseFromString')
   @DocsEditable()
-  Document parseFromString(String str, String contentType) native;
+  Document parseFromString(String str, String type) native;
 }
 // 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
@@ -10620,29 +11396,33 @@
   @DomName('DOMPoint.DOMPoint')
   @DocsEditable()
   factory DomPoint([point_OR_x, num y, num z, num w]) {
-    if (point_OR_x == null && y == null && z == null && w == null) {
-      return DomPoint._create_1();
-    }
     if ((point_OR_x is Map || point_OR_x == null) && y == null && z == null && w == null) {
       var point_1 = convertDartToNative_Dictionary(point_OR_x);
-      return DomPoint._create_2(point_1);
+      return DomPoint._create_1(point_1);
+    }
+    if (point_OR_x == null && y == null && z == null && w == null) {
+      return DomPoint._create_2();
+    }
+    if ((point_OR_x is num || point_OR_x == null) && y == null && z == null && w == null) {
+      return DomPoint._create_3(point_OR_x);
     }
     if ((y is num || y == null) && (point_OR_x is num || point_OR_x == null) && z == null && w == null) {
-      return DomPoint._create_3(point_OR_x, y);
+      return DomPoint._create_4(point_OR_x, y);
     }
     if ((z is num || z == null) && (y is num || y == null) && (point_OR_x is num || point_OR_x == null) && w == null) {
-      return DomPoint._create_4(point_OR_x, y, z);
+      return DomPoint._create_5(point_OR_x, y, z);
     }
     if ((w is num || w == null) && (z is num || z == null) && (y is num || y == null) && (point_OR_x is num || point_OR_x == null)) {
-      return DomPoint._create_5(point_OR_x, y, z, w);
+      return DomPoint._create_6(point_OR_x, y, z, w);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
-  static DomPoint _create_1() => JS('DomPoint', 'new DOMPoint()');
-  static DomPoint _create_2(point_OR_x) => JS('DomPoint', 'new DOMPoint(#)', point_OR_x);
-  static DomPoint _create_3(point_OR_x, y) => JS('DomPoint', 'new DOMPoint(#,#)', point_OR_x, y);
-  static DomPoint _create_4(point_OR_x, y, z) => JS('DomPoint', 'new DOMPoint(#,#,#)', point_OR_x, y, z);
-  static DomPoint _create_5(point_OR_x, y, z, w) => JS('DomPoint', 'new DOMPoint(#,#,#,#)', point_OR_x, y, z, w);
+  static DomPoint _create_1(point_OR_x) => JS('DomPoint', 'new DOMPoint(#)', point_OR_x);
+  static DomPoint _create_2() => JS('DomPoint', 'new DOMPoint()');
+  static DomPoint _create_3(point_OR_x) => JS('DomPoint', 'new DOMPoint(#)', point_OR_x);
+  static DomPoint _create_4(point_OR_x, y) => JS('DomPoint', 'new DOMPoint(#,#)', point_OR_x, y);
+  static DomPoint _create_5(point_OR_x, y, z) => JS('DomPoint', 'new DOMPoint(#,#,#)', point_OR_x, y, z);
+  static DomPoint _create_6(point_OR_x, y, z, w) => JS('DomPoint', 'new DOMPoint(#,#,#,#)', point_OR_x, y, z, w);
 
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', '!!(window.DOMPoint) || !!(window.WebKitPoint)');
@@ -10881,10 +11661,6 @@
   @DomName('DOMSettableTokenList.value')
   @DocsEditable()
   String value;
-
-  @DomName('DOMSettableTokenList.__getter__')
-  @DocsEditable()
-  String __getter__(int index) native;
 }
 // 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
@@ -10894,7 +11670,7 @@
 @DocsEditable()
 @DomName('DOMStringList')
 @Native("DOMStringList")
-class DomStringList extends Interceptor with ListMixin<String>, ImmutableListMixin<String> implements JavaScriptIndexingBehavior, List<String> {
+class DomStringList extends Interceptor with ListMixin<String>, ImmutableListMixin<String> implements List<String> {
   // To suppress missing implicit constructor warnings.
   factory DomStringList._() { throw new UnsupportedError("Not supported"); }
 
@@ -10906,7 +11682,7 @@
     if (JS("bool", "# >>> 0 !== # || # >= #", index,
         index, index, length))
       throw new RangeError.index(index, this);
-    return JS("String", "#[#]", this, index);
+    return this.item(index);
   }
   void operator[]=(int index, String value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -10946,6 +11722,11 @@
   String elementAt(int index) => this[index];
   // -- end List<String> mixins.
 
+  @DomName('DOMStringList.__getter__')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String __getter__(int index) native;
+
   @DomName('DOMStringList.contains')
   @DocsEditable()
   bool contains(String string) native;
@@ -10965,11 +11746,13 @@
   // To suppress missing implicit constructor warnings.
   factory DomStringMap._() { throw new UnsupportedError("Not supported"); }
 
-  bool __delete__(index_OR_name);
+  void __delete__(index_OR_name);
 
-  String __getter__(index_OR_name);
+  String __getter__(int index);
 
   void __setter__(index_OR_name, String value);
+
+  String item(String name);
 }
 // 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
@@ -11014,6 +11797,19 @@
 // BSD-style license that can be found in the LICENSE file.
 
 
+@DocsEditable()
+@DomName('EffectModel')
+@Experimental() // untriaged
+@Native("EffectModel")
+class EffectModel extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory EffectModel._() { throw new UnsupportedError("Not supported"); }
+}
+// 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.
+
+
 class _ChildrenElementList extends ListBase<Element>
     implements NodeListWrapper {
   // Raw Element.
@@ -11314,12 +12110,12 @@
   /// Stream of `copy` events handled by this [Element].
   @DomName('Element.oncopy')
   @DocsEditable()
-  ElementStream<Event> get onCopy;
+  ElementStream<ClipboardEvent> get onCopy;
 
   /// Stream of `cut` events handled by this [Element].
   @DomName('Element.oncut')
   @DocsEditable()
-  ElementStream<Event> get onCut;
+  ElementStream<ClipboardEvent> get onCut;
 
   /// Stream of `doubleclick` events handled by this [Element].
   @DomName('Element.ondblclick')
@@ -11567,7 +12363,7 @@
   /// Stream of `paste` events handled by this [Element].
   @DomName('Element.onpaste')
   @DocsEditable()
-  ElementStream<Event> get onPaste;
+  ElementStream<ClipboardEvent> get onPaste;
 
   @DomName('Element.onpause')
   @DocsEditable()
@@ -11846,12 +12642,12 @@
   /// Stream of `copy` events handled by this [Element].
   @DomName('Element.oncopy')
   @DocsEditable()
-  ElementStream<Event> get onCopy => Element.copyEvent._forElementList(this);
+  ElementStream<ClipboardEvent> get onCopy => Element.copyEvent._forElementList(this);
 
   /// Stream of `cut` events handled by this [Element].
   @DomName('Element.oncut')
   @DocsEditable()
-  ElementStream<Event> get onCut => Element.cutEvent._forElementList(this);
+  ElementStream<ClipboardEvent> get onCut => Element.cutEvent._forElementList(this);
 
   /// Stream of `doubleclick` events handled by this [Element].
   @DomName('Element.ondblclick')
@@ -12099,7 +12895,7 @@
   /// Stream of `paste` events handled by this [Element].
   @DomName('Element.onpaste')
   @DocsEditable()
-  ElementStream<Event> get onPaste => Element.pasteEvent._forElementList(this);
+  ElementStream<ClipboardEvent> get onPaste => Element.pasteEvent._forElementList(this);
 
   @DomName('Element.onpause')
   @DocsEditable()
@@ -12267,7 +13063,7 @@
  */
 @DomName('Element')
 @Native("Element")
-class Element extends Node implements GlobalEventHandlers, ParentNode, ChildNode {
+class Element extends Node implements NonDocumentTypeChildNode, GlobalEventHandlers, ParentNode, ChildNode {
 
   /**
    * Creates an HTML element from a valid fragment of HTML.
@@ -12730,7 +13526,7 @@
    * on which the method is called, and calls the play() method of the
    * AnimationTimeline object of the document timeline of the node document
    * of the element, passing the newly created AnimationEffect as the argument
-   * to the method. Returns an AnimationPlayer for the effect.
+   * to the method. Returns an Animation for the effect.
    *
    * Examples
    *
@@ -12749,7 +13545,7 @@
   **/
   @Experimental()
   @SupportedBrowser(SupportedBrowser.CHROME, '36')
-  AnimationPlayer animate(Iterable<Map<String, dynamic>> frames, [timing]) {
+  Animation animate(Iterable<Map<String, dynamic>> frames, [timing]) {
     if (frames is! Iterable || !(frames.every((x) => x is Map))) {
       throw new ArgumentError("The frames parameter should be a List of Maps "
           "with frame information");
@@ -12770,7 +13566,7 @@
   @DomName('Element.animate')
   @JSName('animate')
   @Experimental() // untriaged
-  AnimationPlayer _animate(Object effect, [timing]) native;
+  Animation _animate(Object effect, [timing]) native;
   /**
    * Called by the DOM whenever an attribute on this has been changed.
    */
@@ -13391,6 +14187,10 @@
     return result;
   }
 
+  @DomName('Element.offsetParent')
+  @DocsEditable()
+  final Element offsetParent;
+
   @DomName('Element.offsetHeight')
   @DocsEditable()
   int get offsetHeight => JS('num', '#.offsetHeight', this).round();
@@ -13407,22 +14207,6 @@
   @DocsEditable()
   int get offsetWidth => JS('num', '#.offsetWidth', this).round();
 
-  @DomName('Element.clientHeight')
-  @DocsEditable()
-  int get clientHeight => JS('num', '#.clientHeight', this).round();
-
-  @DomName('Element.clientLeft')
-  @DocsEditable()
-  int get clientLeft => JS('num', '#.clientLeft', this).round();
-
-  @DomName('Element.clientTop')
-  @DocsEditable()
-  int get clientTop => JS('num', '#.clientTop', this).round();
-
-  @DomName('Element.clientWidth')
-  @DocsEditable()
-  int get clientWidth => JS('num', '#.clientWidth', this).round();
-
   @DomName('Element.scrollHeight')
   @DocsEditable()
   int get scrollHeight => JS('num', '#.scrollHeight', this).round();
@@ -13553,7 +14337,7 @@
    */
   @DomName('Element.copyEvent')
   @DocsEditable()
-  static const EventStreamProvider<Event> copyEvent = const EventStreamProvider<Event>('copy');
+  static const EventStreamProvider<ClipboardEvent> copyEvent = const EventStreamProvider<ClipboardEvent>('copy');
 
   /**
    * Static factory designed to expose `cut` events to event
@@ -13563,7 +14347,7 @@
    */
   @DomName('Element.cutEvent')
   @DocsEditable()
-  static const EventStreamProvider<Event> cutEvent = const EventStreamProvider<Event>('cut');
+  static const EventStreamProvider<ClipboardEvent> cutEvent = const EventStreamProvider<ClipboardEvent>('cut');
 
   /**
    * Static factory designed to expose `doubleclick` events to event
@@ -13888,7 +14672,7 @@
    */
   @DomName('Element.pasteEvent')
   @DocsEditable()
-  static const EventStreamProvider<Event> pasteEvent = const EventStreamProvider<Event>('paste');
+  static const EventStreamProvider<ClipboardEvent> pasteEvent = const EventStreamProvider<ClipboardEvent>('paste');
 
   @DomName('Element.pauseEvent')
   @DocsEditable()
@@ -14170,6 +14954,10 @@
   @Experimental() // nonstandard
   bool spellcheck;
 
+  @DomName('Element.style')
+  @DocsEditable()
+  final CssStyleDeclaration style;
+
   @DomName('Element.tabIndex')
   @DocsEditable()
   int tabIndex;
@@ -14217,10 +15005,18 @@
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute
   String dropzone;
 
+  @DomName('Element.blur')
+  @DocsEditable()
+  void blur() native;
+
   @DomName('Element.click')
   @DocsEditable()
   void click() native;
 
+  @DomName('Element.focus')
+  @DocsEditable()
+  void focus() native;
+
   @JSName('attributes')
   @DomName('Element.attributes')
   @DocsEditable()
@@ -14230,25 +15026,31 @@
   @DocsEditable()
   String className;
 
-  @JSName('clientHeight')
   @DomName('Element.clientHeight')
   @DocsEditable()
-  final int _clientHeight;
+  final int clientHeight;
 
-  @JSName('clientLeft')
   @DomName('Element.clientLeft')
   @DocsEditable()
-  final int _clientLeft;
+  final int clientLeft;
 
-  @JSName('clientTop')
   @DomName('Element.clientTop')
   @DocsEditable()
-  final int _clientTop;
+  final int clientTop;
 
-  @JSName('clientWidth')
   @DomName('Element.clientWidth')
   @DocsEditable()
-  final int _clientWidth;
+  final int clientWidth;
+
+  @DomName('Element.computedName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String computedName;
+
+  @DomName('Element.computedRole')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String computedRole;
 
   @DomName('Element.id')
   @DocsEditable()
@@ -14265,30 +15067,6 @@
   // Use implementation from Node.
   // final String _namespaceUri;
 
-  @JSName('offsetHeight')
-  @DomName('Element.offsetHeight')
-  @DocsEditable()
-  final int _offsetHeight;
-
-  @JSName('offsetLeft')
-  @DomName('Element.offsetLeft')
-  @DocsEditable()
-  final int _offsetLeft;
-
-  @DomName('Element.offsetParent')
-  @DocsEditable()
-  final Element offsetParent;
-
-  @JSName('offsetTop')
-  @DomName('Element.offsetTop')
-  @DocsEditable()
-  final int _offsetTop;
-
-  @JSName('offsetWidth')
-  @DomName('Element.offsetWidth')
-  @DocsEditable()
-  final int _offsetWidth;
-
   @JSName('outerHTML')
   @DomName('Element.outerHTML')
   @DocsEditable()
@@ -14314,26 +15092,19 @@
   @DocsEditable()
   final int _scrollWidth;
 
-  @DomName('Element.style')
-  @DocsEditable()
-  final CssStyleDeclaration style;
-
   @DomName('Element.tagName')
   @DocsEditable()
   final String tagName;
 
-  @DomName('Element.blur')
-  @DocsEditable()
-  void blur() native;
-
-  @DomName('Element.focus')
-  @DocsEditable()
-  void focus() native;
-
-  @DomName('Element.getAnimationPlayers')
+  @DomName('Element.closest')
   @DocsEditable()
   @Experimental() // untriaged
-  List<AnimationPlayer> getAnimationPlayers() native;
+  Element closest(String selectors) native;
+
+  @DomName('Element.getAnimations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<Animation> getAnimations() native;
 
   @DomName('Element.getAttribute')
   @DocsEditable()
@@ -14416,7 +15187,7 @@
   @DocsEditable()
   @Creates('NodeList|HtmlCollection')
   @Returns('NodeList|HtmlCollection')
-  List<Node> _getElementsByTagName(String name) native;
+  List<Node> _getElementsByTagName(String localName) native;
 
   @JSName('hasAttribute')
   @DomName('Element.hasAttribute')
@@ -14448,6 +15219,76 @@
   @Experimental() // untriaged
   void requestPointerLock() native;
 
+  @DomName('Element.scroll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void scroll([options_OR_x, num y]) {
+    if (options_OR_x == null && y == null) {
+      _scroll_1();
+      return;
+    }
+    if ((options_OR_x is Map) && y == null) {
+      var options_1 = convertDartToNative_Dictionary(options_OR_x);
+      _scroll_2(options_1);
+      return;
+    }
+    if (y != null && (options_OR_x is num)) {
+      _scroll_3(options_OR_x, y);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+  @JSName('scroll')
+  @DomName('Element.scroll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scroll_1() native;
+  @JSName('scroll')
+  @DomName('Element.scroll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scroll_2(options) native;
+  @JSName('scroll')
+  @DomName('Element.scroll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scroll_3(num x, y) native;
+
+  @DomName('Element.scrollBy')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void scrollBy([options_OR_x, num y]) {
+    if (options_OR_x == null && y == null) {
+      _scrollBy_1();
+      return;
+    }
+    if ((options_OR_x is Map) && y == null) {
+      var options_1 = convertDartToNative_Dictionary(options_OR_x);
+      _scrollBy_2(options_1);
+      return;
+    }
+    if (y != null && (options_OR_x is num)) {
+      _scrollBy_3(options_OR_x, y);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+  @JSName('scrollBy')
+  @DomName('Element.scrollBy')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scrollBy_1() native;
+  @JSName('scrollBy')
+  @DomName('Element.scrollBy')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scrollBy_2(options) native;
+  @JSName('scrollBy')
+  @DomName('Element.scrollBy')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scrollBy_3(num x, y) native;
+
   @JSName('scrollIntoView')
   @DomName('Element.scrollIntoView')
   @DocsEditable()
@@ -14460,16 +15301,63 @@
   @Experimental() // non-standard
   void _scrollIntoViewIfNeeded([bool centerIfNeeded]) native;
 
+  @DomName('Element.scrollTo')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void scrollTo([options_OR_x, num y]) {
+    if (options_OR_x == null && y == null) {
+      _scrollTo_1();
+      return;
+    }
+    if ((options_OR_x is Map) && y == null) {
+      var options_1 = convertDartToNative_Dictionary(options_OR_x);
+      _scrollTo_2(options_1);
+      return;
+    }
+    if (y != null && (options_OR_x is num)) {
+      _scrollTo_3(options_OR_x, y);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+  @JSName('scrollTo')
+  @DomName('Element.scrollTo')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scrollTo_1() native;
+  @JSName('scrollTo')
+  @DomName('Element.scrollTo')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scrollTo_2(options) native;
+  @JSName('scrollTo')
+  @DomName('Element.scrollTo')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _scrollTo_3(num x, y) native;
+
   @DomName('Element.setAttribute')
   @DocsEditable()
   void setAttribute(String name, String value) native;
 
   @DomName('Element.setAttributeNS')
   @DocsEditable()
-  void setAttributeNS(String namespaceURI, String qualifiedName, String value) native;
+  void setAttributeNS(String namespaceURI, String name, String value) native;
 
   // From ChildNode
 
+  @DomName('Element.after')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void after(Object nodes) native;
+
+  @DomName('Element.before')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void before(Object nodes) native;
+
+  // From NonDocumentTypeChildNode
+
   @DomName('Element.nextElementSibling')
   @DocsEditable()
   final Element nextElementSibling;
@@ -14582,12 +15470,12 @@
   /// Stream of `copy` events handled by this [Element].
   @DomName('Element.oncopy')
   @DocsEditable()
-  ElementStream<Event> get onCopy => copyEvent.forElement(this);
+  ElementStream<ClipboardEvent> get onCopy => copyEvent.forElement(this);
 
   /// Stream of `cut` events handled by this [Element].
   @DomName('Element.oncut')
   @DocsEditable()
-  ElementStream<Event> get onCut => cutEvent.forElement(this);
+  ElementStream<ClipboardEvent> get onCut => cutEvent.forElement(this);
 
   /// Stream of `doubleclick` events handled by this [Element].
   @DomName('Element.ondblclick')
@@ -14835,7 +15723,7 @@
   /// Stream of `paste` events handled by this [Element].
   @DomName('Element.onpaste')
   @DocsEditable()
-  ElementStream<Event> get onPaste => pasteEvent.forElement(this);
+  ElementStream<ClipboardEvent> get onPaste => pasteEvent.forElement(this);
 
   @DomName('Element.onpause')
   @DocsEditable()
@@ -15067,11 +15955,6 @@
   @DocsEditable()
   String height;
 
-  @DomName('HTMLEmbedElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String integrity;
-
   @DomName('HTMLEmbedElement.name')
   @DocsEditable()
   String name;
@@ -15261,6 +16144,18 @@
   // To suppress missing implicit constructor warnings.
   factory ErrorEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('ErrorEvent.ErrorEvent')
+  @DocsEditable()
+  factory ErrorEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return ErrorEvent._create_1(type, eventInitDict_1);
+    }
+    return ErrorEvent._create_2(type);
+  }
+  static ErrorEvent _create_1(type, eventInitDict) => JS('ErrorEvent', 'new ErrorEvent(#,#)', type, eventInitDict);
+  static ErrorEvent _create_2(type) => JS('ErrorEvent', 'new ErrorEvent(#)', type);
+
   @DomName('ErrorEvent.colno')
   @DocsEditable()
   @Experimental() // untriaged
@@ -15292,7 +16187,7 @@
 
 
 @DomName('Event')
-@Native("Event,InputEvent,ClipboardEvent")
+@Native("Event,InputEvent")
 class Event extends Interceptor {
   // In JS, canBubble and cancelable are technically required parameters to
   // init*Event. In practice, though, if they aren't provided they simply
@@ -15343,8 +16238,18 @@
     } while (target != null && target != currentTarget.parent);
     throw new StateError('No selector matched for populating matchedTarget.');
   }
-  // To suppress missing implicit constructor warnings.
-  factory Event._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('Event.Event')
+  @DocsEditable()
+  factory Event._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return Event._create_1(type, eventInitDict_1);
+    }
+    return Event._create_2(type);
+  }
+  static Event _create_1(type, eventInitDict) => JS('Event', 'new Event(#,#)', type, eventInitDict);
+  static Event _create_2(type) => JS('Event', 'new Event(#)', type);
 
   /**
    * This event is being handled by the event target.
@@ -15391,24 +16296,6 @@
   @DocsEditable()
   final bool cancelable;
 
-  /**
-   * Access to the system's clipboard data during copy, cut, and paste events.
-   *
-   * ## Other resources
-   *
-   * * [clipboardData specification](http://www.w3.org/TR/clipboard-apis/#attributes)
-   *   from W3C.
-   */
-  @DomName('Event.clipboardData')
-  @DocsEditable()
-  @SupportedBrowser(SupportedBrowser.CHROME)
-  @SupportedBrowser(SupportedBrowser.FIREFOX)
-  @SupportedBrowser(SupportedBrowser.SAFARI)
-  @Experimental()
-  // Part of copy/paste
-  @Experimental() // nonstandard
-  final DataTransfer clipboardData;
-
   @DomName('Event.currentTarget')
   @DocsEditable()
   EventTarget get currentTarget => _convertNativeToDart_EventTarget(this._get_currentTarget);
@@ -15416,7 +16303,7 @@
   @DomName('Event.currentTarget')
   @DocsEditable()
   @Creates('Null')
-  @Returns('EventTarget|=Object|Null')
+  @Returns('EventTarget|=Object')
   final dynamic _get_currentTarget;
 
   @DomName('Event.defaultPrevented')
@@ -15440,9 +16327,7 @@
   @DocsEditable()
   // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#extensions-to-event
   @Experimental()
-  @Returns('NodeList')
-  @Creates('NodeList')
-  final List<Node> path;
+  final List<EventTarget> path;
 
   @DomName('Event.target')
   @DocsEditable()
@@ -15451,7 +16336,7 @@
   @DomName('Event.target')
   @DocsEditable()
   @Creates('Node')
-  @Returns('EventTarget|=Object|Null')
+  @Returns('EventTarget|=Object')
   final dynamic _get_target;
 
   @DomName('Event.timeStamp')
@@ -15465,7 +16350,7 @@
   @JSName('initEvent')
   @DomName('Event.initEvent')
   @DocsEditable()
-  void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) native;
+  void _initEvent(String type, bool bubbles, bool cancelable) native;
 
   @DomName('Event.preventDefault')
   @DocsEditable()
@@ -15531,14 +16416,14 @@
 
   @DomName('EventSource.EventSource')
   @DocsEditable()
-  static EventSource _factoryEventSource(String url, [Map eventSourceInit]) {
-    if (eventSourceInit != null) {
-      var eventSourceInit_1 = convertDartToNative_Dictionary(eventSourceInit);
-      return EventSource._create_1(url, eventSourceInit_1);
+  static EventSource _factoryEventSource(String url, [Map eventSourceInitDict]) {
+    if (eventSourceInitDict != null) {
+      var eventSourceInitDict_1 = convertDartToNative_Dictionary(eventSourceInitDict);
+      return EventSource._create_1(url, eventSourceInitDict_1);
     }
     return EventSource._create_2(url);
   }
-  static EventSource _create_1(url, eventSourceInit) => JS('EventSource', 'new EventSource(#,#)', url, eventSourceInit);
+  static EventSource _create_1(url, eventSourceInitDict) => JS('EventSource', 'new EventSource(#,#)', url, eventSourceInitDict);
   static EventSource _create_2(url) => JS('EventSource', 'new EventSource(#)', url);
 
   @DomName('EventSource.CLOSED')
@@ -15713,7 +16598,7 @@
   @JSName('addEventListener')
   @DomName('EventTarget.addEventListener')
   @DocsEditable()
-  void _addEventListener([String type, EventListener listener, bool useCapture]) native;
+  void _addEventListener(String type, EventListener listener, [bool capture]) native;
 
   @DomName('EventTarget.dispatchEvent')
   @DocsEditable()
@@ -15722,7 +16607,7 @@
   @JSName('removeEventListener')
   @DomName('EventTarget.removeEventListener')
   @DocsEditable()
-  void _removeEventListener([String type, EventListener listener, bool useCapture]) native;
+  void _removeEventListener(String type, EventListener listener, [bool capture]) native;
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -15738,6 +16623,18 @@
   // To suppress missing implicit constructor warnings.
   factory ExtendableEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('ExtendableEvent.ExtendableEvent')
+  @DocsEditable()
+  factory ExtendableEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return ExtendableEvent._create_1(type, eventInitDict_1);
+    }
+    return ExtendableEvent._create_2(type);
+  }
+  static ExtendableEvent _create_1(type, eventInitDict) => JS('ExtendableEvent', 'new ExtendableEvent(#,#)', type, eventInitDict);
+  static ExtendableEvent _create_2(type) => JS('ExtendableEvent', 'new ExtendableEvent(#)', type);
+
   @DomName('ExtendableEvent.waitUntil')
   @DocsEditable()
   @Experimental() // untriaged
@@ -15758,15 +16655,21 @@
 
   @DomName('FederatedCredential.FederatedCredential')
   @DocsEditable()
-  factory FederatedCredential(String id, String name, String avatarURL, String federation) {
-    return FederatedCredential._create_1(id, name, avatarURL, federation);
+  factory FederatedCredential(Map data) {
+    var data_1 = convertDartToNative_Dictionary(data);
+    return FederatedCredential._create_1(data_1);
   }
-  static FederatedCredential _create_1(id, name, avatarURL, federation) => JS('FederatedCredential', 'new FederatedCredential(#,#,#,#)', id, name, avatarURL, federation);
+  static FederatedCredential _create_1(data) => JS('FederatedCredential', 'new FederatedCredential(#)', data);
 
-  @DomName('FederatedCredential.federation')
+  @DomName('FederatedCredential.protocol')
   @DocsEditable()
   @Experimental() // untriaged
-  final String federation;
+  final String protocol;
+
+  @DomName('FederatedCredential.provider')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String provider;
 }
 // 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
@@ -15777,10 +16680,22 @@
 @DomName('FetchEvent')
 @Experimental() // untriaged
 @Native("FetchEvent")
-class FetchEvent extends Event {
+class FetchEvent extends ExtendableEvent {
   // To suppress missing implicit constructor warnings.
   factory FetchEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('FetchEvent.FetchEvent')
+  @DocsEditable()
+  factory FetchEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return FetchEvent._create_1(type, eventInitDict_1);
+    }
+    return FetchEvent._create_2(type);
+  }
+  static FetchEvent _create_1(type, eventInitDict) => JS('FetchEvent', 'new FetchEvent(#,#)', type, eventInitDict);
+  static FetchEvent _create_2(type) => JS('FetchEvent', 'new FetchEvent(#)', type);
+
   @DomName('FetchEvent.isReload')
   @DocsEditable()
   @Experimental() // untriaged
@@ -15825,9 +16740,7 @@
 
   @DomName('HTMLFieldSetElement.elements')
   @DocsEditable()
-  @Returns('HtmlCollection')
-  @Creates('HtmlCollection')
-  final List<Node> elements;
+  final HtmlFormControlsCollection elements;
 
   @DomName('HTMLFieldSetElement.form')
   @DocsEditable()
@@ -15857,6 +16770,11 @@
   @DocsEditable()
   bool checkValidity() native;
 
+  @DomName('HTMLFieldSetElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
+
   @DomName('HTMLFieldSetElement.setCustomValidity')
   @DocsEditable()
   void setCustomValidity(String error) native;
@@ -15873,6 +16791,18 @@
   // To suppress missing implicit constructor warnings.
   factory File._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('File.File')
+  @DocsEditable()
+  factory File(List<Object> fileBits, String fileName, [Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return File._create_1(fileBits, fileName, options_1);
+    }
+    return File._create_2(fileBits, fileName);
+  }
+  static File _create_1(fileBits, fileName, options) => JS('File', 'new File(#,#,#)', fileBits, fileName, options);
+  static File _create_2(fileBits, fileName) => JS('File', 'new File(#,#)', fileBits, fileName);
+
   @DomName('File.lastModified')
   @DocsEditable()
   @Experimental() // untriaged
@@ -16212,7 +17142,7 @@
 
   @DomName('FileReader.readAsText')
   @DocsEditable()
-  void readAsText(Blob blob, [String encoding]) native;
+  void readAsText(Blob blob, [String label]) native;
 
   /// Stream of `abort` events handled by this [FileReader].
   @DomName('FileReader.onabort')
@@ -16471,6 +17401,18 @@
   // To suppress missing implicit constructor warnings.
   factory FocusEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('FocusEvent.FocusEvent')
+  @DocsEditable()
+  factory FocusEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return FocusEvent._create_1(type, eventInitDict_1);
+    }
+    return FocusEvent._create_2(type);
+  }
+  static FocusEvent _create_1(type, eventInitDict) => JS('FocusEvent', 'new FocusEvent(#,#)', type, eventInitDict);
+  static FocusEvent _create_2(type) => JS('FocusEvent', 'new FocusEvent(#)', type);
+
   @DomName('FocusEvent.relatedTarget')
   @DocsEditable()
   EventTarget get relatedTarget => _convertNativeToDart_EventTarget(this._get_relatedTarget);
@@ -16495,36 +17437,15 @@
 
   @DomName('FontFace.FontFace')
   @DocsEditable()
-  factory FontFace(String family, source, [Map descriptors]) {
-    if ((source is String || source == null) && (family is String || family == null) && descriptors == null) {
-      return FontFace._create_1(family, source);
-    }
-    if ((descriptors is Map || descriptors == null) && (source is String || source == null) && (family is String || family == null)) {
+  factory FontFace(String family, Object source, [Map descriptors]) {
+    if (descriptors != null) {
       var descriptors_1 = convertDartToNative_Dictionary(descriptors);
-      return FontFace._create_2(family, source, descriptors_1);
+      return FontFace._create_1(family, source, descriptors_1);
     }
-    if ((source is TypedData || source == null) && (family is String || family == null) && descriptors == null) {
-      return FontFace._create_3(family, source);
-    }
-    if ((descriptors is Map || descriptors == null) && (source is TypedData || source == null) && (family is String || family == null)) {
-      var descriptors_1 = convertDartToNative_Dictionary(descriptors);
-      return FontFace._create_4(family, source, descriptors_1);
-    }
-    if ((source is ByteBuffer || source == null) && (family is String || family == null) && descriptors == null) {
-      return FontFace._create_5(family, source);
-    }
-    if ((descriptors is Map || descriptors == null) && (source is ByteBuffer || source == null) && (family is String || family == null)) {
-      var descriptors_1 = convertDartToNative_Dictionary(descriptors);
-      return FontFace._create_6(family, source, descriptors_1);
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return FontFace._create_2(family, source);
   }
-  static FontFace _create_1(family, source) => JS('FontFace', 'new FontFace(#,#)', family, source);
-  static FontFace _create_2(family, source, descriptors) => JS('FontFace', 'new FontFace(#,#,#)', family, source, descriptors);
-  static FontFace _create_3(family, source) => JS('FontFace', 'new FontFace(#,#)', family, source);
-  static FontFace _create_4(family, source, descriptors) => JS('FontFace', 'new FontFace(#,#,#)', family, source, descriptors);
-  static FontFace _create_5(family, source) => JS('FontFace', 'new FontFace(#,#)', family, source);
-  static FontFace _create_6(family, source, descriptors) => JS('FontFace', 'new FontFace(#,#,#)', family, source, descriptors);
+  static FontFace _create_1(family, source, descriptors) => JS('FontFace', 'new FontFace(#,#,#)', family, source, descriptors);
+  static FontFace _create_2(family, source) => JS('FontFace', 'new FontFace(#,#)', family, source);
 
   @DomName('FontFace.family')
   @DocsEditable()
@@ -16695,6 +17616,31 @@
   @DomName('FormData.append')
   @DocsEditable()
   void appendBlob(String name, Blob value, [String filename]) native;
+
+  @DomName('FormData.delete')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void delete(String name) native;
+
+  @DomName('FormData.get')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object get(String name) native;
+
+  @DomName('FormData.getAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<Object> getAll(String name) native;
+
+  @DomName('FormData.has')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool has(String name) native;
+
+  @DomName('FormData.set')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void set(String name, value, [String filename]) native;
 }
 // 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
@@ -16762,12 +17708,22 @@
 
   @DomName('HTMLFormElement.__getter__')
   @DocsEditable()
-  Element __getter__(index_OR_name) native;
+  Object __getter__(String name) native;
 
   @DomName('HTMLFormElement.checkValidity')
   @DocsEditable()
   bool checkValidity() native;
 
+  @DomName('HTMLFormElement.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Element item(int index) native;
+
+  @DomName('HTMLFormElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
+
   @DomName('HTMLFormElement.requestAutocomplete')
   @DocsEditable()
   // http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-October/037711.html
@@ -16796,6 +17752,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.
 
+// WARNING: Do not edit - generated code.
+
+
+@DomName('FrameRequestCallback')
+@Experimental() // untriaged
+typedef void FrameRequestCallback(num highResTime);
+// 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.
+
 
 @DocsEditable()
 @DomName('Gamepad')
@@ -16810,6 +17776,10 @@
   @DocsEditable()
   final List<num> axes;
 
+  @DomName('Gamepad.buttons')
+  @DocsEditable()
+  final List<GamepadButton> buttons;
+
   @DomName('Gamepad.connected')
   @DocsEditable()
   @Experimental() // untriaged
@@ -16868,6 +17838,18 @@
   // To suppress missing implicit constructor warnings.
   factory GamepadEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('GamepadEvent.GamepadEvent')
+  @DocsEditable()
+  factory GamepadEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return GamepadEvent._create_1(type, eventInitDict_1);
+    }
+    return GamepadEvent._create_2(type);
+  }
+  static GamepadEvent _create_1(type, eventInitDict) => JS('GamepadEvent', 'new GamepadEvent(#,#)', type, eventInitDict);
+  static GamepadEvent _create_2(type) => JS('GamepadEvent', 'new GamepadEvent(#)', type);
+
   @DomName('GamepadEvent.gamepad')
   @DocsEditable()
   @Experimental() // untriaged
@@ -16907,6 +17889,29 @@
 
 
 @DocsEditable()
+@DomName('GeofencingEvent')
+@Experimental() // untriaged
+@Native("GeofencingEvent")
+class GeofencingEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory GeofencingEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('GeofencingEvent.id')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String id;
+
+  @DomName('GeofencingEvent.region')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final GeofencingRegion region;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('GeofencingRegion')
 @Experimental() // untriaged
 @Native("GeofencingRegion")
@@ -17699,8 +18704,18 @@
         type, convertDartToNative_Dictionary(options));
   }
 
-  // To suppress missing implicit constructor warnings.
-  factory HashChangeEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('HashChangeEvent.HashChangeEvent')
+  @DocsEditable()
+  factory HashChangeEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return HashChangeEvent._create_1(type, eventInitDict_1);
+    }
+    return HashChangeEvent._create_2(type);
+  }
+  static HashChangeEvent _create_1(type, eventInitDict) => JS('HashChangeEvent', 'new HashChangeEvent(#,#)', type, eventInitDict);
+  static HashChangeEvent _create_2(type) => JS('HashChangeEvent', 'new HashChangeEvent(#)', type);
 
   /// Checks if this type is supported on the current platform.
   static bool get supported => Device.isEventTypeSupported('HashChangeEvent');
@@ -17762,43 +18777,27 @@
     if (input == null) {
       return Headers._create_1();
     }
-    if ((input is Headers || input == null)) {
+    if ((input is Headers)) {
       return Headers._create_2(input);
     }
-    if ((input is Map || input == null)) {
+    if ((input is Map)) {
       var input_1 = convertDartToNative_Dictionary(input);
       return Headers._create_3(input_1);
     }
+    if ((input is List<Object>)) {
+      return Headers._create_4(input);
+    }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
   static Headers _create_1() => JS('Headers', 'new Headers()');
   static Headers _create_2(input) => JS('Headers', 'new Headers(#)', input);
   static Headers _create_3(input) => JS('Headers', 'new Headers(#)', input);
-
-  @DomName('Headers.size')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final int size;
-
-  @DomName('Headers.forEach')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void forEach(HeadersForEachCallback callback, [Object thisArg]) native;
+  static Headers _create_4(input) => JS('Headers', 'new Headers(#)', input);
 }
 // 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.
 
-// WARNING: Do not edit - generated code.
-
-
-@DomName('HeadersForEachCallback')
-@Experimental() // untriaged
-typedef void HeadersForEachCallback(String value, String key, Headers map);
-// 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.
-
 
 @DocsEditable()
 @DomName('HTMLHeadingElement')
@@ -17863,6 +18862,16 @@
   @DocsEditable()
   final int length;
 
+  @DomName('History.options')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Map get options => convertNativeToDart_Dictionary(this._get_options);
+  @JSName('options')
+  @DomName('History.options')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final dynamic _get_options;
+
   @DomName('History.state')
   @DocsEditable()
   dynamic get state => convertNativeToDart_SerializedScriptValue(this._get_state);
@@ -17883,7 +18892,7 @@
 
   @DomName('History.go')
   @DocsEditable()
-  void go(int distance) native;
+  void go([int delta]) native;
 
   @DomName('History.pushState')
   @DocsEditable()
@@ -17891,14 +18900,15 @@
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.IE, '10')
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  void pushState(/*any*/ data, String title, [String url]) {
-    if (url != null) {
+  void pushState(/*SerializedScriptValue*/ data, String title, String url, [Map options]) {
+    if (options != null) {
       var data_1 = convertDartToNative_SerializedScriptValue(data);
-      _pushState_1(data_1, title, url);
+      var options_2 = convertDartToNative_Dictionary(options);
+      _pushState_1(data_1, title, url, options_2);
       return;
     }
     var data_1 = convertDartToNative_SerializedScriptValue(data);
-    _pushState_2(data_1, title);
+    _pushState_2(data_1, title, url);
     return;
   }
   @JSName('pushState')
@@ -17908,7 +18918,7 @@
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.IE, '10')
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  void _pushState_1(data, title, url) native;
+  void _pushState_1(data, title, url, options) native;
   @JSName('pushState')
   @DomName('History.pushState')
   @DocsEditable()
@@ -17916,7 +18926,7 @@
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.IE, '10')
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  void _pushState_2(data, title) native;
+  void _pushState_2(data, title, url) native;
 
   @DomName('History.replaceState')
   @DocsEditable()
@@ -17924,14 +18934,15 @@
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.IE, '10')
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  void replaceState(/*any*/ data, String title, [String url]) {
-    if (url != null) {
+  void replaceState(/*SerializedScriptValue*/ data, String title, String url, [Map options]) {
+    if (options != null) {
       var data_1 = convertDartToNative_SerializedScriptValue(data);
-      _replaceState_1(data_1, title, url);
+      var options_2 = convertDartToNative_Dictionary(options);
+      _replaceState_1(data_1, title, url, options_2);
       return;
     }
     var data_1 = convertDartToNative_SerializedScriptValue(data);
-    _replaceState_2(data_1, title);
+    _replaceState_2(data_1, title, url);
     return;
   }
   @JSName('replaceState')
@@ -17941,7 +18952,7 @@
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.IE, '10')
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  void _replaceState_1(data, title, url) native;
+  void _replaceState_1(data, title, url, options) native;
   @JSName('replaceState')
   @DomName('History.replaceState')
   @DocsEditable()
@@ -17949,7 +18960,30 @@
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.IE, '10')
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  void _replaceState_2(data, title) native;
+  void _replaceState_2(data, title, url) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('HMDVRDevice')
+@Experimental() // untriaged
+@Native("HMDVRDevice")
+class HmdvrDevice extends VRDevice {
+  // To suppress missing implicit constructor warnings.
+  factory HmdvrDevice._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('HMDVRDevice.getEyeParameters')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VREyeParameters getEyeParameters(String whichEye) native;
+
+  @DomName('HMDVRDevice.setFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void setFieldOfView([VRFieldOfView leftFov, VRFieldOfView rightFov]) native;
 }
 // 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
@@ -18309,6 +19343,11 @@
   // To suppress missing implicit constructor warnings.
   factory HtmlFormControlsCollection._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('HTMLFormControlsCollection.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Node item(int index) native;
+
   @DomName('HTMLFormControlsCollection.namedItem')
   @DocsEditable()
   Object namedItem(String name) native;
@@ -18346,6 +19385,12 @@
 class HtmlOptionsCollection extends HtmlCollection {
   // To suppress missing implicit constructor warnings.
   factory HtmlOptionsCollection._() { throw new UnsupportedError("Not supported"); }
+
+  @JSName('item')
+  @DomName('HTMLOptionsCollection.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Node _item(int index) native;
 }
 // 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
@@ -18989,7 +20034,7 @@
   @DomName('XMLHttpRequest.getResponseHeader')
   @DocsEditable()
   @Unstable()
-  String getResponseHeader(String header) native;
+  String getResponseHeader(String name) native;
 
   /**
    * Specify a particular MIME type (such as `text/xml`) desired for the
@@ -19003,7 +20048,7 @@
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  void overrideMimeType(String override) native;
+  void overrideMimeType(String mime) native;
 
   /**
    * Send the request with any given `data`.
@@ -19020,7 +20065,7 @@
    */
   @DomName('XMLHttpRequest.send')
   @DocsEditable()
-  void send([data]) native;
+  void send([body_OR_data]) native;
 
   /**
    * Sets the value of an HTTP requst header.
@@ -19041,7 +20086,7 @@
    */
   @DomName('XMLHttpRequest.setRequestHeader')
   @DocsEditable()
-  void setRequestHeader(String header, String value) native;
+  void setRequestHeader(String name, String value) native;
 
   /// Stream of `readystatechange` events handled by this [HttpRequest].
 /**
@@ -19248,18 +20293,13 @@
   @DocsEditable()
   String height;
 
-  @DomName('HTMLIFrameElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String integrity;
-
   @DomName('HTMLIFrameElement.name')
   @DocsEditable()
   String name;
 
   @DomName('HTMLIFrameElement.sandbox')
   @DocsEditable()
-  String sandbox;
+  final DomSettableTokenList sandbox;
 
   @DomName('HTMLIFrameElement.src')
   @DocsEditable()
@@ -19309,21 +20349,21 @@
 
   @DomName('ImageData.ImageData')
   @DocsEditable()
-  factory ImageData(data_OR_width, int height_OR_width, [int height]) {
-    if ((height_OR_width is int || height_OR_width == null) && (data_OR_width is int || data_OR_width == null) && height == null) {
-      return ImageData._create_1(data_OR_width, height_OR_width);
+  factory ImageData(data_OR_sw, int sh_OR_sw, [int sh]) {
+    if ((sh_OR_sw is int) && (data_OR_sw is int) && sh == null) {
+      return ImageData._create_1(data_OR_sw, sh_OR_sw);
     }
-    if ((height_OR_width is int || height_OR_width == null) && (data_OR_width is Uint8ClampedList || data_OR_width == null) && height == null) {
-      return ImageData._create_2(data_OR_width, height_OR_width);
+    if ((sh_OR_sw is int) && (data_OR_sw is Uint8ClampedList) && sh == null) {
+      return ImageData._create_2(data_OR_sw, sh_OR_sw);
     }
-    if ((height is int || height == null) && (height_OR_width is int || height_OR_width == null) && (data_OR_width is Uint8ClampedList || data_OR_width == null)) {
-      return ImageData._create_3(data_OR_width, height_OR_width, height);
+    if ((sh is int) && (sh_OR_sw is int) && (data_OR_sw is Uint8ClampedList)) {
+      return ImageData._create_3(data_OR_sw, sh_OR_sw, sh);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
-  static ImageData _create_1(data_OR_width, height_OR_width) => JS('ImageData', 'new ImageData(#,#)', data_OR_width, height_OR_width);
-  static ImageData _create_2(data_OR_width, height_OR_width) => JS('ImageData', 'new ImageData(#,#)', data_OR_width, height_OR_width);
-  static ImageData _create_3(data_OR_width, height_OR_width, height) => JS('ImageData', 'new ImageData(#,#,#)', data_OR_width, height_OR_width, height);
+  static ImageData _create_1(data_OR_sw, sh_OR_sw) => JS('ImageData', 'new ImageData(#,#)', data_OR_sw, sh_OR_sw);
+  static ImageData _create_2(data_OR_sw, sh_OR_sw) => JS('ImageData', 'new ImageData(#,#)', data_OR_sw, sh_OR_sw);
+  static ImageData _create_3(data_OR_sw, sh_OR_sw, sh) => JS('ImageData', 'new ImageData(#,#,#)', data_OR_sw, sh_OR_sw, sh);
 
   @DomName('ImageData.data')
   @DocsEditable()
@@ -19388,11 +20428,6 @@
   @DocsEditable()
   int height;
 
-  @DomName('HTMLImageElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String integrity;
-
   @DomName('HTMLImageElement.isMap')
   @DocsEditable()
   bool isMap;
@@ -19451,6 +20486,36 @@
 // BSD-style license that can be found in the LICENSE file.
 
 
+@DocsEditable()
+@DomName('InputDevice')
+@Experimental() // untriaged
+@Native("InputDevice")
+class InputDevice extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory InputDevice._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('InputDevice.InputDevice')
+  @DocsEditable()
+  factory InputDevice([Map deviceInitDict]) {
+    if (deviceInitDict != null) {
+      var deviceInitDict_1 = convertDartToNative_Dictionary(deviceInitDict);
+      return InputDevice._create_1(deviceInitDict_1);
+    }
+    return InputDevice._create_2();
+  }
+  static InputDevice _create_1(deviceInitDict) => JS('InputDevice', 'new InputDevice(#)', deviceInitDict);
+  static InputDevice _create_2() => JS('InputDevice', 'new InputDevice()');
+
+  @DomName('InputDevice.firesTouchEvents')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool firesTouchEvents;
+}
+// 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.
+
+
 @DomName('HTMLInputElement')
 @Native("HTMLInputElement")
 class InputElement extends HtmlElement implements
@@ -19504,6 +20569,11 @@
   @DocsEditable()
   String alt;
 
+  @DomName('HTMLInputElement.autocapitalize')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String autocapitalize;
+
   @DomName('HTMLInputElement.autocomplete')
   @DocsEditable()
   String autocomplete;
@@ -19608,6 +20678,11 @@
   @DocsEditable()
   String min;
 
+  @DomName('HTMLInputElement.minLength')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int minLength;
+
   @DomName('HTMLInputElement.multiple')
   @DocsEditable()
   bool multiple;
@@ -19722,6 +20797,11 @@
   @DocsEditable()
   bool checkValidity() native;
 
+  @DomName('HTMLInputElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
+
   @DomName('HTMLInputElement.select')
   @DocsEditable()
   void select() native;
@@ -20309,66 +21389,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 
-@DocsEditable()
-@DomName('InputMethodContext')
-// http://www.w3.org/TR/ime-api/#idl-def-InputMethodContext
-@Experimental()
-@Native("InputMethodContext")
-class InputMethodContext extends EventTarget {
-  // To suppress missing implicit constructor warnings.
-  factory InputMethodContext._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('InputMethodContext.compositionEndOffset')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final int compositionEndOffset;
-
-  @DomName('InputMethodContext.compositionStartOffset')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final int compositionStartOffset;
-
-  @DomName('InputMethodContext.locale')
-  @DocsEditable()
-  final String locale;
-
-  @DomName('InputMethodContext.target')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final HtmlElement target;
-
-  @DomName('InputMethodContext.confirmComposition')
-  @DocsEditable()
-  void confirmComposition() native;
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('InstallEvent')
-@Experimental() // untriaged
-@Native("InstallEvent")
-class InstallEvent extends ExtendableEvent {
-  // To suppress missing implicit constructor warnings.
-  factory InstallEvent._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('InstallEvent.reloadAll')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future reloadAll() native;
-
-  @DomName('InstallEvent.replace')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void replace() native;
-}
-// 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.
-
-
 /**
  * An event that describes user interaction with the keyboard.
  *
@@ -20430,8 +21450,21 @@
 
   @DomName('KeyboardEvent.charCode')
   int get charCode => _charCode;
-  // To suppress missing implicit constructor warnings.
-  factory KeyboardEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('KeyboardEvent.which')
+  int get which => _which;
+
+  @DomName('KeyboardEvent.KeyboardEvent')
+  @DocsEditable()
+  factory KeyboardEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return KeyboardEvent._create_1(type, eventInitDict_1);
+    }
+    return KeyboardEvent._create_2(type);
+  }
+  static KeyboardEvent _create_1(type, eventInitDict) => JS('KeyboardEvent', 'new KeyboardEvent(#,#)', type, eventInitDict);
+  static KeyboardEvent _create_2(type) => JS('KeyboardEvent', 'new KeyboardEvent(#)', type);
 
   @DomName('KeyboardEvent.DOM_KEY_LOCATION_LEFT')
   @DocsEditable()
@@ -20457,10 +21490,20 @@
   @DocsEditable()
   final bool altKey;
 
+  @DomName('KeyboardEvent.code')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String code;
+
   @DomName('KeyboardEvent.ctrlKey')
   @DocsEditable()
   final bool ctrlKey;
 
+  @DomName('KeyboardEvent.key')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String key;
+
   @JSName('keyIdentifier')
   @DomName('KeyboardEvent.keyIdentifier')
   @DocsEditable()
@@ -20493,7 +21536,7 @@
   @DomName('KeyboardEvent.getModifierState')
   @DocsEditable()
   @Experimental() // untriaged
-  bool getModifierState(String keyArgument) native;
+  bool getModifierState(String keyArg) native;
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -20502,6 +21545,38 @@
 
 
 @DocsEditable()
+@DomName('KeyframeEffect')
+@Experimental() // untriaged
+@Native("KeyframeEffect")
+class KeyframeEffect extends AnimationEffectReadOnly {
+  // To suppress missing implicit constructor warnings.
+  factory KeyframeEffect._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('KeyframeEffect.KeyframeEffect')
+  @DocsEditable()
+  factory KeyframeEffect(Element target, List<Map> keyframes, [timing]) {
+    if ((keyframes is List<Map>) && (target is Element || target == null) && timing == null) {
+      return KeyframeEffect._create_1(target, keyframes);
+    }
+    if ((timing is num) && (keyframes is List<Map>) && (target is Element || target == null)) {
+      return KeyframeEffect._create_2(target, keyframes, timing);
+    }
+    if ((timing is Map) && (keyframes is List<Map>) && (target is Element || target == null)) {
+      var timing_1 = convertDartToNative_Dictionary(timing);
+      return KeyframeEffect._create_3(target, keyframes, timing_1);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+  static KeyframeEffect _create_1(target, keyframes) => JS('KeyframeEffect', 'new KeyframeEffect(#,#)', target, keyframes);
+  static KeyframeEffect _create_2(target, keyframes, timing) => JS('KeyframeEffect', 'new KeyframeEffect(#,#,#)', target, keyframes, timing);
+  static KeyframeEffect _create_3(target, keyframes, timing) => JS('KeyframeEffect', 'new KeyframeEffect(#,#,#)', target, keyframes, timing);
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('HTMLKeygenElement')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @SupportedBrowser(SupportedBrowser.SAFARI)
@@ -20576,6 +21651,11 @@
   @DocsEditable()
   bool checkValidity() native;
 
+  @DomName('HTMLKeygenElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
+
   @DomName('HTMLKeygenElement.setCustomValidity')
   @DocsEditable()
   void setCustomValidity(String error) native;
@@ -20742,31 +21822,6 @@
     return JS('bool', '("import" in #)', this);
   }
 }
-// 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.
-
-
-@DocsEditable()
-@DomName('LocalCredential')
-@Experimental() // untriaged
-@Native("LocalCredential")
-class LocalCredential extends Credential {
-  // To suppress missing implicit constructor warnings.
-  factory LocalCredential._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('LocalCredential.LocalCredential')
-  @DocsEditable()
-  factory LocalCredential(String id, String name, String avatarURL, String password) {
-    return LocalCredential._create_1(id, name, avatarURL, password);
-  }
-  static LocalCredential _create_1(id, name, avatarURL, password) => JS('LocalCredential', 'new LocalCredential(#,#,#,#)', id, name, avatarURL, password);
-
-  @DomName('LocalCredential.password')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final String password;
-}
 // 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.
@@ -20847,27 +21902,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.
 
-// WARNING: Do not edit - generated code.
-
-
-@DomName('MIDIErrorCallback')
-// http://webaudio.github.io/web-midi-api/#midierrorcallback
-@Experimental()
-typedef void MidiErrorCallback(DomError error);
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DomName('MIDISuccessCallback')
-@Experimental() // untriaged
-typedef void MidiSuccessCallback(MidiAccess access, bool sysex);
-// 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.
-
 
 @DocsEditable()
 @DomName('HTMLMapElement')
@@ -21010,12 +22044,33 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// WARNING: Do not edit - generated code.
 
-
-@DomName('MediaDeviceInfoCallback')
+@DocsEditable()
+@DomName('MediaDevices')
 @Experimental() // untriaged
-typedef void MediaDeviceInfoCallback(List<MediaDeviceInfo> devices);
+@Native("MediaDevices")
+class MediaDevices extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory MediaDevices._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MediaDevices.enumerateDevices')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future enumerateDevices() native;
+
+  @DomName('MediaDevices.getUserMedia')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getUserMedia(Map options) {
+    var options_1 = convertDartToNative_Dictionary(options);
+    return _getUserMedia_1(options_1);
+  }
+  @JSName('getUserMedia')
+  @DomName('MediaDevices.getUserMedia')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _getUserMedia_1(options) native;
+}
 // 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.
@@ -21181,11 +22236,6 @@
   @DocsEditable()
   final MediaError error;
 
-  @DomName('HTMLMediaElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String integrity;
-
   @DomName('HTMLMediaElement.loop')
   @DocsEditable()
   bool loop;
@@ -21236,6 +22286,16 @@
   @DocsEditable()
   final bool seeking;
 
+  @DomName('HTMLMediaElement.session')
+  @DocsEditable()
+  @Experimental() // untriaged
+  MediaSession session;
+
+  @DomName('HTMLMediaElement.sinkId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String sinkId;
+
   @DomName('HTMLMediaElement.src')
   @DocsEditable()
   String src;
@@ -21301,6 +22361,11 @@
   @Experimental() // untriaged
   Future setMediaKeys(MediaKeys mediaKeys) native;
 
+  @DomName('HTMLMediaElement.setSinkId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future setSinkId(String sinkId) native;
+
   @JSName('webkitAddKey')
   @DomName('HTMLMediaElement.webkitAddKey')
   @DocsEditable()
@@ -21362,6 +22427,41 @@
 
 
 @DocsEditable()
+@DomName('MediaEncryptedEvent')
+@Experimental() // untriaged
+@Native("MediaEncryptedEvent")
+class MediaEncryptedEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory MediaEncryptedEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MediaEncryptedEvent.MediaEncryptedEvent')
+  @DocsEditable()
+  factory MediaEncryptedEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MediaEncryptedEvent._create_1(type, eventInitDict_1);
+    }
+    return MediaEncryptedEvent._create_2(type);
+  }
+  static MediaEncryptedEvent _create_1(type, eventInitDict) => JS('MediaEncryptedEvent', 'new MediaEncryptedEvent(#,#)', type, eventInitDict);
+  static MediaEncryptedEvent _create_2(type) => JS('MediaEncryptedEvent', 'new MediaEncryptedEvent(#)', type);
+
+  @DomName('MediaEncryptedEvent.initData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final ByteBuffer initData;
+
+  @DomName('MediaEncryptedEvent.initDataType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String initDataType;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('MediaError')
 @Unstable()
 @Native("MediaError")
@@ -21377,12 +22477,6 @@
   @DocsEditable()
   static const int MEDIA_ERR_DECODE = 3;
 
-  @DomName('MediaError.MEDIA_ERR_ENCRYPTED')
-  @DocsEditable()
-  // https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html#error-codes
-  @Experimental()
-  static const int MEDIA_ERR_ENCRYPTED = 5;
-
   @DomName('MediaError.MEDIA_ERR_NETWORK')
   @DocsEditable()
   static const int MEDIA_ERR_NETWORK = 2;
@@ -21456,6 +22550,18 @@
   // To suppress missing implicit constructor warnings.
   factory MediaKeyEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('MediaKeyEvent.MediaKeyEvent')
+  @DocsEditable()
+  factory MediaKeyEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MediaKeyEvent._create_1(type, eventInitDict_1);
+    }
+    return MediaKeyEvent._create_2(type);
+  }
+  static MediaKeyEvent _create_1(type, eventInitDict) => JS('MediaKeyEvent', 'new MediaKeyEvent(#,#)', type, eventInitDict);
+  static MediaKeyEvent _create_2(type) => JS('MediaKeyEvent', 'new MediaKeyEvent(#)', type);
+
   @JSName('defaultURL')
   @DomName('MediaKeyEvent.defaultURL')
   @DocsEditable()
@@ -21499,37 +22605,26 @@
   // To suppress missing implicit constructor warnings.
   factory MediaKeyMessageEvent._() { throw new UnsupportedError("Not supported"); }
 
-  @JSName('destinationURL')
-  @DomName('MediaKeyMessageEvent.destinationURL')
+  @DomName('MediaKeyMessageEvent.MediaKeyMessageEvent')
   @DocsEditable()
-  final String destinationUrl;
+  factory MediaKeyMessageEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MediaKeyMessageEvent._create_1(type, eventInitDict_1);
+    }
+    return MediaKeyMessageEvent._create_2(type);
+  }
+  static MediaKeyMessageEvent _create_1(type, eventInitDict) => JS('MediaKeyMessageEvent', 'new MediaKeyMessageEvent(#,#)', type, eventInitDict);
+  static MediaKeyMessageEvent _create_2(type) => JS('MediaKeyMessageEvent', 'new MediaKeyMessageEvent(#)', type);
 
   @DomName('MediaKeyMessageEvent.message')
   @DocsEditable()
   final ByteBuffer message;
-}
-// 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.
 
-
-@DocsEditable()
-@DomName('MediaKeyNeededEvent')
-// https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html#dom-mediakeyneededevent
-@Experimental()
-@Native("MediaKeyNeededEvent")
-class MediaKeyNeededEvent extends Event {
-  // To suppress missing implicit constructor warnings.
-  factory MediaKeyNeededEvent._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('MediaKeyNeededEvent.contentType')
+  @DomName('MediaKeyMessageEvent.messageType')
   @DocsEditable()
   @Experimental() // untriaged
-  final String contentType;
-
-  @DomName('MediaKeyNeededEvent.initData')
-  @DocsEditable()
-  final Uint8List initData;
+  final String messageType;
 }
 // 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
@@ -21550,32 +22645,96 @@
   @Experimental() // untriaged
   final Future closed;
 
-  @DomName('MediaKeySession.error')
+  @DomName('MediaKeySession.expiration')
   @DocsEditable()
-  final MediaKeyError error;
+  @Experimental() // untriaged
+  final double expiration;
 
-  @DomName('MediaKeySession.keySystem')
+  @DomName('MediaKeySession.keyStatuses')
   @DocsEditable()
-  final String keySystem;
+  @Experimental() // untriaged
+  final MediaKeyStatusMap keyStatuses;
 
   @DomName('MediaKeySession.sessionId')
   @DocsEditable()
   final String sessionId;
 
+  @DomName('MediaKeySession.close')
+  @DocsEditable()
+  Future close() native;
+
   @DomName('MediaKeySession.generateRequest')
   @DocsEditable()
   @Experimental() // untriaged
-  Future generateRequest(String initDataType, initData) native;
+  Future generateRequest(String initDataType, /*BufferSource*/ initData) native;
 
-  @DomName('MediaKeySession.release')
+  @DomName('MediaKeySession.load')
   @DocsEditable()
   @Experimental() // untriaged
-  Future release() native;
+  Future load(String sessionId) native;
+
+  @DomName('MediaKeySession.remove')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future remove() native;
 
   @JSName('update')
   @DomName('MediaKeySession.update')
   @DocsEditable()
-  Future _update(response) native;
+  Future _update(/*BufferSource*/ response) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('MediaKeyStatusMap')
+@Experimental() // untriaged
+@Native("MediaKeyStatusMap")
+class MediaKeyStatusMap extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory MediaKeyStatusMap._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MediaKeyStatusMap.size')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int size;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('MediaKeySystemAccess')
+@Experimental() // untriaged
+@Native("MediaKeySystemAccess")
+class MediaKeySystemAccess extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory MediaKeySystemAccess._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MediaKeySystemAccess.keySystem')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String keySystem;
+
+  @DomName('MediaKeySystemAccess.createMediaKeys')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future createMediaKeys() native;
+
+  @DomName('MediaKeySystemAccess.getConfiguration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Map getConfiguration() {
+    return convertNativeToDart_Dictionary(_getConfiguration_1());
+  }
+  @JSName('getConfiguration')
+  @DomName('MediaKeySystemAccess.getConfiguration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  _getConfiguration_1() native;
 }
 // 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
@@ -21591,24 +22750,15 @@
   // To suppress missing implicit constructor warnings.
   factory MediaKeys._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('MediaKeys.keySystem')
-  @DocsEditable()
-  final String keySystem;
-
-  @DomName('MediaKeys.create')
-  @DocsEditable()
-  @Experimental() // untriaged
-  static Future create(String keySystem) native;
-
   @JSName('createSession')
   @DomName('MediaKeys.createSession')
   @DocsEditable()
   MediaKeySession _createSession([String sessionType]) native;
 
-  @DomName('MediaKeys.isTypeSupported')
+  @DomName('MediaKeys.setServerCertificate')
   @DocsEditable()
   @Experimental() // untriaged
-  static bool isTypeSupported(String keySystem, String contentType) native;
+  Future setServerCertificate(/*BufferSource*/ serverCertificate) native;
 }
 // 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
@@ -21633,11 +22783,11 @@
 
   @DomName('MediaList.appendMedium')
   @DocsEditable()
-  void appendMedium(String newMedium) native;
+  void appendMedium(String medium) native;
 
   @DomName('MediaList.deleteMedium')
   @DocsEditable()
-  void deleteMedium(String oldMedium) native;
+  void deleteMedium(String medium) native;
 
   @DomName('MediaList.item')
   @DocsEditable()
@@ -21695,6 +22845,18 @@
   // To suppress missing implicit constructor warnings.
   factory MediaQueryListEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('MediaQueryListEvent.MediaQueryListEvent')
+  @DocsEditable()
+  factory MediaQueryListEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MediaQueryListEvent._create_1(type, eventInitDict_1);
+    }
+    return MediaQueryListEvent._create_2(type);
+  }
+  static MediaQueryListEvent _create_1(type, eventInitDict) => JS('MediaQueryListEvent', 'new MediaQueryListEvent(#,#)', type, eventInitDict);
+  static MediaQueryListEvent _create_2(type) => JS('MediaQueryListEvent', 'new MediaQueryListEvent(#)', type);
+
   @DomName('MediaQueryListEvent.matches')
   @DocsEditable()
   @Experimental() // untriaged
@@ -21711,6 +22873,36 @@
 
 
 @DocsEditable()
+@DomName('MediaSession')
+@Experimental() // untriaged
+@Native("MediaSession")
+class MediaSession extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory MediaSession._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MediaSession.MediaSession')
+  @DocsEditable()
+  factory MediaSession() {
+    return MediaSession._create_1();
+  }
+  static MediaSession _create_1() => JS('MediaSession', 'new MediaSession()');
+
+  @DomName('MediaSession.activate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void activate() native;
+
+  @DomName('MediaSession.deactivate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deactivate() native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('MediaSource')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @SupportedBrowser(SupportedBrowser.IE, '11')
@@ -21825,6 +23017,11 @@
   static MediaStream _create_2(stream_OR_tracks) => JS('MediaStream', 'new MediaStream(#)', stream_OR_tracks);
   static MediaStream _create_3(stream_OR_tracks) => JS('MediaStream', 'new MediaStream(#)', stream_OR_tracks);
 
+  @DomName('MediaStream.active')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool active;
+
   @DomName('MediaStream.ended')
   @DocsEditable()
   final bool ended;
@@ -21922,6 +23119,18 @@
   // To suppress missing implicit constructor warnings.
   factory MediaStreamEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('MediaStreamEvent.MediaStreamEvent')
+  @DocsEditable()
+  factory MediaStreamEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MediaStreamEvent._create_1(type, eventInitDict_1);
+    }
+    return MediaStreamEvent._create_2(type);
+  }
+  static MediaStreamEvent _create_1(type, eventInitDict) => JS('MediaStreamEvent', 'new MediaStreamEvent(#,#)', type, eventInitDict);
+  static MediaStreamEvent _create_2(type) => JS('MediaStreamEvent', 'new MediaStreamEvent(#)', type);
+
   /// Checks if this type is supported on the current platform.
   static bool get supported => Device.isEventTypeSupported('MediaStreamEvent');
 
@@ -22175,11 +23384,21 @@
   @Experimental() // untriaged
   bool disabled;
 
+  @DomName('HTMLMenuItemElement.icon')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String icon;
+
   @DomName('HTMLMenuItemElement.label')
   @DocsEditable()
   @Experimental() // untriaged
   String label;
 
+  @DomName('HTMLMenuItemElement.radiogroup')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String radiogroup;
+
   @DomName('HTMLMenuItemElement.type')
   @DocsEditable()
   @Experimental() // untriaged
@@ -22234,12 +23453,14 @@
         lastEventId, source, messagePorts);
     return event;
   }
-  // To suppress missing implicit constructor warnings.
-  factory MessageEvent._() { throw new UnsupportedError("Not supported"); }
 
+  // TODO(alanknight): This really should be generated by the
+  // _OutputConversion in the systemnative.py script, but that doesn't
+  // use those conversions right now, so do this as a one-off.
   @DomName('MessageEvent.data')
   @DocsEditable()
   dynamic get data => convertNativeToDart_SerializedScriptValue(this._get_data);
+
   @JSName('data')
   @DomName('MessageEvent.data')
   @DocsEditable()
@@ -22247,6 +23468,20 @@
   @annotation_Returns_SerializedScriptValue
   final dynamic _get_data;
 
+
+
+  @DomName('MessageEvent.MessageEvent')
+  @DocsEditable()
+  factory MessageEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MessageEvent._create_1(type, eventInitDict_1);
+    }
+    return MessageEvent._create_2(type);
+  }
+  static MessageEvent _create_1(type, eventInitDict) => JS('MessageEvent', 'new MessageEvent(#,#)', type, eventInitDict);
+  static MessageEvent _create_2(type) => JS('MessageEvent', 'new MessageEvent(#)', type);
+
   @DomName('MessageEvent.lastEventId')
   @DocsEditable()
   @Unstable()
@@ -22269,7 +23504,7 @@
   @JSName('initMessageEvent')
   @DomName('MessageEvent.initMessageEvent')
   @DocsEditable()
-  void _initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List<MessagePort> messagePorts) native;
+  void _initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List<MessagePort> portsArg) native;
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -22475,26 +23710,6 @@
   // To suppress missing implicit constructor warnings.
   factory MidiAccess._() { throw new UnsupportedError("Not supported"); }
 
-  /**
-   * Static factory designed to expose `connect` events to event
-   * handlers that are not necessarily instances of [MidiAccess].
-   *
-   * See [EventStreamProvider] for usage information.
-   */
-  @DomName('MIDIAccess.connectEvent')
-  @DocsEditable()
-  static const EventStreamProvider<MidiConnectionEvent> connectEvent = const EventStreamProvider<MidiConnectionEvent>('connect');
-
-  /**
-   * Static factory designed to expose `disconnect` events to event
-   * handlers that are not necessarily instances of [MidiAccess].
-   *
-   * See [EventStreamProvider] for usage information.
-   */
-  @DomName('MIDIAccess.disconnectEvent')
-  @DocsEditable()
-  static const EventStreamProvider<MidiConnectionEvent> disconnectEvent = const EventStreamProvider<MidiConnectionEvent>('disconnect');
-
   @DomName('MIDIAccess.inputs')
   @DocsEditable()
   final MidiInputMap inputs;
@@ -22507,16 +23722,6 @@
   @DocsEditable()
   @Experimental() // untriaged
   final bool sysexEnabled;
-
-  /// Stream of `connect` events handled by this [MidiAccess].
-  @DomName('MIDIAccess.onconnect')
-  @DocsEditable()
-  Stream<MidiConnectionEvent> get onConnect => connectEvent.forTarget(this);
-
-  /// Stream of `disconnect` events handled by this [MidiAccess].
-  @DomName('MIDIAccess.ondisconnect')
-  @DocsEditable()
-  Stream<MidiConnectionEvent> get onDisconnect => disconnectEvent.forTarget(this);
 }
 // 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
@@ -22532,6 +23737,18 @@
   // To suppress missing implicit constructor warnings.
   factory MidiConnectionEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('MIDIConnectionEvent.MIDIConnectionEvent')
+  @DocsEditable()
+  factory MidiConnectionEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MidiConnectionEvent._create_1(type, eventInitDict_1);
+    }
+    return MidiConnectionEvent._create_2(type);
+  }
+  static MidiConnectionEvent _create_1(type, eventInitDict) => JS('MidiConnectionEvent', 'new MIDIConnectionEvent(#,#)', type, eventInitDict);
+  static MidiConnectionEvent _create_2(type) => JS('MidiConnectionEvent', 'new MIDIConnectionEvent(#)', type);
+
   @DomName('MIDIConnectionEvent.port')
   @DocsEditable()
   final MidiPort port;
@@ -22582,31 +23799,6 @@
   @DocsEditable()
   @Experimental() // untriaged
   final int size;
-
-  @DomName('MIDIInputMap.entries')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator entries() native;
-
-  @DomName('MIDIInputMap.get')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Object get(String id) native;
-
-  @DomName('MIDIInputMap.has')
-  @DocsEditable()
-  @Experimental() // untriaged
-  bool has(String key) native;
-
-  @DomName('MIDIInputMap.keys')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator keys() native;
-
-  @DomName('MIDIInputMap.values')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator values() native;
 }
 // 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
@@ -22622,6 +23814,18 @@
   // To suppress missing implicit constructor warnings.
   factory MidiMessageEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('MIDIMessageEvent.MIDIMessageEvent')
+  @DocsEditable()
+  factory MidiMessageEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MidiMessageEvent._create_1(type, eventInitDict_1);
+    }
+    return MidiMessageEvent._create_2(type);
+  }
+  static MidiMessageEvent _create_1(type, eventInitDict) => JS('MidiMessageEvent', 'new MIDIMessageEvent(#,#)', type, eventInitDict);
+  static MidiMessageEvent _create_2(type) => JS('MidiMessageEvent', 'new MIDIMessageEvent(#)', type);
+
   @DomName('MIDIMessageEvent.data')
   @DocsEditable()
   final Uint8List data;
@@ -22665,31 +23869,6 @@
   @DocsEditable()
   @Experimental() // untriaged
   final int size;
-
-  @DomName('MIDIOutputMap.entries')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator entries() native;
-
-  @DomName('MIDIOutputMap.get')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Object get(String id) native;
-
-  @DomName('MIDIOutputMap.has')
-  @DocsEditable()
-  @Experimental() // untriaged
-  bool has(String key) native;
-
-  @DomName('MIDIOutputMap.keys')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator keys() native;
-
-  @DomName('MIDIOutputMap.values')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator values() native;
 }
 // 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
@@ -22705,15 +23884,10 @@
   // To suppress missing implicit constructor warnings.
   factory MidiPort._() { throw new UnsupportedError("Not supported"); }
 
-  /**
-   * Static factory designed to expose `disconnect` events to event
-   * handlers that are not necessarily instances of [MidiPort].
-   *
-   * See [EventStreamProvider] for usage information.
-   */
-  @DomName('MIDIPort.disconnectEvent')
+  @DomName('MIDIPort.connection')
   @DocsEditable()
-  static const EventStreamProvider<MidiConnectionEvent> disconnectEvent = const EventStreamProvider<MidiConnectionEvent>('disconnect');
+  @Experimental() // untriaged
+  final String connection;
 
   @DomName('MIDIPort.id')
   @DocsEditable()
@@ -22727,6 +23901,11 @@
   @DocsEditable()
   final String name;
 
+  @DomName('MIDIPort.state')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String state;
+
   @DomName('MIDIPort.type')
   @DocsEditable()
   final String type;
@@ -22735,10 +23914,15 @@
   @DocsEditable()
   final String version;
 
-  /// Stream of `disconnect` events handled by this [MidiPort].
-  @DomName('MIDIPort.ondisconnect')
+  @DomName('MIDIPort.close')
   @DocsEditable()
-  Stream<MidiConnectionEvent> get onDisconnect => disconnectEvent.forTarget(this);
+  @Experimental() // untriaged
+  Future close() native;
+
+  @DomName('MIDIPort.open')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future open() native;
 }
 // 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
@@ -22830,10 +24014,6 @@
   MimeType elementAt(int index) => this[index];
   // -- end List<MimeType> mixins.
 
-  @DomName('MimeTypeArray.__getter__')
-  @DocsEditable()
-  MimeType __getter__(String name) native;
-
   @DomName('MimeTypeArray.item')
   @DocsEditable()
   MimeType item(int index) native;
@@ -22875,7 +24055,7 @@
 
 
 @DomName('MouseEvent')
-@Native("MouseEvent,DragEvent,PointerEvent,MSPointerEvent")
+@Native("MouseEvent,DragEvent")
 class MouseEvent extends UIEvent {
   factory MouseEvent(String type,
       {Window view, int detail: 0, int screenX: 0, int screenY: 0,
@@ -22892,8 +24072,18 @@
         button, relatedTarget);
     return event;
   }
-  // To suppress missing implicit constructor warnings.
-  factory MouseEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MouseEvent.MouseEvent')
+  @DocsEditable()
+  factory MouseEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return MouseEvent._create_1(type, eventInitDict_1);
+    }
+    return MouseEvent._create_2(type);
+  }
+  static MouseEvent _create_1(type, eventInitDict) => JS('MouseEvent', 'new MouseEvent(#,#)', type, eventInitDict);
+  static MouseEvent _create_2(type) => JS('MouseEvent', 'new MouseEvent(#)', type);
 
   @DomName('MouseEvent.altKey')
   @DocsEditable()
@@ -22903,6 +24093,11 @@
   @DocsEditable()
   final int button;
 
+  @DomName('MouseEvent.buttons')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int buttons;
+
   @JSName('clientX')
   @DomName('MouseEvent.clientX')
   @DocsEditable()
@@ -22934,6 +24129,18 @@
   @deprecated
   final Node fromElement;
 
+  @JSName('layerX')
+  @DomName('MouseEvent.layerX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int _layerX;
+
+  @JSName('layerY')
+  @DomName('MouseEvent.layerY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int _layerY;
+
   @DomName('MouseEvent.metaKey')
   @DocsEditable()
   final bool metaKey;
@@ -22950,6 +24157,18 @@
   @Experimental() // untriaged
   final int _movementY;
 
+  @JSName('pageX')
+  @DomName('MouseEvent.pageX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int _pageX;
+
+  @JSName('pageY')
+  @DomName('MouseEvent.pageY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int _pageY;
+
   @DomName('MouseEvent.region')
   @DocsEditable()
   @Experimental() // untriaged
@@ -22962,7 +24181,7 @@
   @DomName('MouseEvent.relatedTarget')
   @DocsEditable()
   @Creates('Node')
-  @Returns('EventTarget|=Object|Null')
+  @Returns('EventTarget|=Object')
   final dynamic _get_relatedTarget;
 
   @JSName('screenX')
@@ -23007,17 +24226,20 @@
   @Experimental()
   final int _webkitMovementY;
 
+  // Use implementation from UIEvent.
+  // final int _which;
+
   @DomName('MouseEvent.initMouseEvent')
   @DocsEditable()
-  void _initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) {
+  void _initMouseEvent(String type, bool bubbles, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) {
     var relatedTarget_1 = _convertDartToNative_EventTarget(relatedTarget);
-    _initMouseEvent_1(type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget_1);
+    _initMouseEvent_1(type, bubbles, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget_1);
     return;
   }
   @JSName('initMouseEvent')
   @DomName('MouseEvent.initMouseEvent')
   @DocsEditable()
-  void _initMouseEvent_1(type, canBubble, cancelable, Window view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) native;
+  void _initMouseEvent_1(type, bubbles, cancelable, Window view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) native;
 
 
   @DomName('MouseEvent.clientX')
@@ -23058,6 +24280,14 @@
   @DomName('MouseEvent.screenX')
   @DomName('MouseEvent.screenY')
   Point get screen => new Point(_screenX, _screenY);
+
+  @DomName('MouseEvent.layerX')
+  @DomName('MouseEvent.layerY')
+  Point get layer => new Point(_layerX, _layerY);
+
+  @DomName('MouseEvent.pageX')
+  @DomName('MouseEvent.pageY')
+  Point get page => new Point(_pageX, _pageY);
 }
 // 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
@@ -23237,7 +24467,7 @@
 
 @DomName('Navigator')
 @Native("Navigator")
-class Navigator extends Interceptor implements NavigatorCpu, NavigatorLanguage, NavigatorOnLine, NavigatorID {
+class Navigator extends Interceptor implements NavigatorStorageUtils, NavigatorCpu, NavigatorLanguage, NavigatorOnLine, NavigatorID {
 
   @DomName('Navigator.language')
   String get language => JS('String', '#.language || #.userLanguage', this,
@@ -23313,16 +24543,16 @@
   // To suppress missing implicit constructor warnings.
   factory Navigator._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('Navigator.bluetooth')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Bluetooth bluetooth;
+
   @DomName('Navigator.connection')
   @DocsEditable()
   @Experimental() // untriaged
   final NetworkInformation connection;
 
-  @DomName('Navigator.cookieEnabled')
-  @DocsEditable()
-  @Unstable()
-  final bool cookieEnabled;
-
   @DomName('Navigator.credentials')
   @DocsEditable()
   @Experimental() // untriaged
@@ -23334,11 +24564,6 @@
   @Experimental() // experimental
   final String doNotTrack;
 
-  @DomName('Navigator.geofencing')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final Geofencing geofencing;
-
   @DomName('Navigator.geolocation')
   @DocsEditable()
   @Unstable()
@@ -23349,11 +24574,21 @@
   @Experimental() // untriaged
   final int maxTouchPoints;
 
+  @DomName('Navigator.mediaDevices')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final MediaDevices mediaDevices;
+
   @DomName('Navigator.mimeTypes')
   @DocsEditable()
   @Experimental() // nonstandard
   final MimeTypeArray mimeTypes;
 
+  @DomName('Navigator.permissions')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Permissions permissions;
+
   @DomName('Navigator.presentation')
   @DocsEditable()
   @Experimental() // untriaged
@@ -23364,16 +24599,16 @@
   @Unstable()
   final String productSub;
 
-  @DomName('Navigator.push')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final PushManager push;
-
   @DomName('Navigator.serviceWorker')
   @DocsEditable()
   @Experimental() // untriaged
   final ServiceWorkerContainer serviceWorker;
 
+  @DomName('Navigator.services')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final ServicePortCollection services;
+
   @DomName('Navigator.storageQuota')
   @DocsEditable()
   @Experimental() // untriaged
@@ -23419,21 +24654,46 @@
   @Creates('_GamepadList')
   List<Gamepad> getGamepads() native;
 
-  @DomName('Navigator.getStorageUpdates')
+  @DomName('Navigator.getVRDevices')
   @DocsEditable()
-  // http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#navigatorstorageutils
-  @Experimental()
-  void getStorageUpdates() native;
+  @Experimental() // untriaged
+  Future getVRDevices() native;
 
   @DomName('Navigator.registerProtocolHandler')
   @DocsEditable()
   @Unstable()
   void registerProtocolHandler(String scheme, String url, String title) native;
 
+  @DomName('Navigator.requestMIDIAccess')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future requestMidiAccess([Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _requestMidiAccess_1(options_1);
+    }
+    return _requestMidiAccess_2();
+  }
+  @JSName('requestMIDIAccess')
+  @DomName('Navigator.requestMIDIAccess')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _requestMidiAccess_1(options) native;
+  @JSName('requestMIDIAccess')
+  @DomName('Navigator.requestMIDIAccess')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _requestMidiAccess_2() native;
+
+  @DomName('Navigator.requestMediaKeySystemAccess')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future requestMediaKeySystemAccess(String keySystem, List<Map> supportedConfigurations) native;
+
   @DomName('Navigator.sendBeacon')
   @DocsEditable()
   @Experimental() // untriaged
-  bool sendBeacon(String url, data) native;
+  bool sendBeacon(String url, Object data) native;
 
   // From NavigatorCPU
 
@@ -23489,6 +24749,19 @@
   @Unstable()
   final bool onLine;
 
+  // From NavigatorStorageUtils
+
+  @DomName('Navigator.cookieEnabled')
+  @DocsEditable()
+  @Unstable()
+  final bool cookieEnabled;
+
+  @DomName('Navigator.getStorageUpdates')
+  @DocsEditable()
+  // http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#navigatorstorageutils
+  @Experimental()
+  void getStorageUpdates() native;
+
 }
 // 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
@@ -23566,6 +24839,29 @@
 
 
 @DocsEditable()
+@DomName('NavigatorStorageUtils')
+@Experimental() // untriaged
+@Native("NavigatorStorageUtils")
+class NavigatorStorageUtils extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory NavigatorStorageUtils._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('NavigatorStorageUtils.cookieEnabled')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool cookieEnabled;
+
+  @DomName('NavigatorStorageUtils.getStorageUpdates')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void getStorageUpdates() native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('NavigatorUserMediaError')
 // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-NavigatorUserMediaError
 @Experimental()
@@ -24141,7 +25437,7 @@
    */
   @DomName('Node.appendChild')
   @DocsEditable()
-  Node append(Node newChild) native;
+  Node append(Node node) native;
 
   @JSName('cloneNode')
   /**
@@ -24193,17 +25489,17 @@
    */
   @DomName('Node.insertBefore')
   @DocsEditable()
-  Node insertBefore(Node newChild, Node refChild) native;
+  Node insertBefore(Node node, Node child) native;
 
   @JSName('removeChild')
   @DomName('Node.removeChild')
   @DocsEditable()
-  Node _removeChild(Node oldChild) native;
+  Node _removeChild(Node child) native;
 
   @JSName('replaceChild')
   @DomName('Node.replaceChild')
   @DocsEditable()
-  Node _replaceChild(Node newChild, Node oldChild) native;
+  Node _replaceChild(Node node, Node child) native;
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -24237,31 +25533,31 @@
 
   @DomName('NodeFilter.SHOW_COMMENT')
   @DocsEditable()
-  static const int SHOW_COMMENT = 0x00000080;
+  static const int SHOW_COMMENT = 0x80;
 
   @DomName('NodeFilter.SHOW_DOCUMENT')
   @DocsEditable()
-  static const int SHOW_DOCUMENT = 0x00000100;
+  static const int SHOW_DOCUMENT = 0x100;
 
   @DomName('NodeFilter.SHOW_DOCUMENT_FRAGMENT')
   @DocsEditable()
-  static const int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
+  static const int SHOW_DOCUMENT_FRAGMENT = 0x400;
 
   @DomName('NodeFilter.SHOW_DOCUMENT_TYPE')
   @DocsEditable()
-  static const int SHOW_DOCUMENT_TYPE = 0x00000200;
+  static const int SHOW_DOCUMENT_TYPE = 0x200;
 
   @DomName('NodeFilter.SHOW_ELEMENT')
   @DocsEditable()
-  static const int SHOW_ELEMENT = 0x00000001;
+  static const int SHOW_ELEMENT = 0x1;
 
   @DomName('NodeFilter.SHOW_PROCESSING_INSTRUCTION')
   @DocsEditable()
-  static const int SHOW_PROCESSING_INSTRUCTION = 0x00000040;
+  static const int SHOW_PROCESSING_INSTRUCTION = 0x40;
 
   @DomName('NodeFilter.SHOW_TEXT')
   @DocsEditable()
-  static const int SHOW_TEXT = 0x00000004;
+  static const int SHOW_TEXT = 0x4;
 }
 // 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
@@ -24372,6 +25668,47 @@
   @DocsEditable()
   Node _item(int index) native;
 }
+// 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.
+
+
+@DocsEditable()
+@DomName('NonDocumentTypeChildNode')
+@Experimental() // untriaged
+@Native("NonDocumentTypeChildNode")
+class NonDocumentTypeChildNode extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory NonDocumentTypeChildNode._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('NonDocumentTypeChildNode.nextElementSibling')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Element nextElementSibling;
+
+  @DomName('NonDocumentTypeChildNode.previousElementSibling')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Element previousElementSibling;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('NonElementParentNode')
+@Experimental() // untriaged
+@Native("NonElementParentNode")
+class NonElementParentNode extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory NonElementParentNode._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('NonElementParentNode.getElementById')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Element getElementById(String elementId) native;
+}
 // 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.
@@ -24457,6 +25794,13 @@
   @Experimental() // untriaged
   final String body;
 
+  @DomName('Notification.data')
+  @DocsEditable()
+  @Experimental() // untriaged
+  @annotation_Creates_SerializedScriptValue
+  @annotation_Returns_SerializedScriptValue
+  final Object data;
+
   @DomName('Notification.dir')
   @DocsEditable()
   @Experimental() // nonstandard
@@ -24476,6 +25820,11 @@
   @DocsEditable()
   final String permission;
 
+  @DomName('Notification.silent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool silent;
+
   @DomName('Notification.tag')
   @DocsEditable()
   @Experimental() // nonstandard
@@ -24486,6 +25835,11 @@
   @Experimental() // untriaged
   final String title;
 
+  @DomName('Notification.vibrate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final List<int> vibrate;
+
   @DomName('Notification.close')
   @DocsEditable()
   void close() native;
@@ -24530,6 +25884,36 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
+@DocsEditable()
+@DomName('NotificationEvent')
+@Experimental() // untriaged
+@Native("NotificationEvent")
+class NotificationEvent extends ExtendableEvent {
+  // To suppress missing implicit constructor warnings.
+  factory NotificationEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('NotificationEvent.NotificationEvent')
+  @DocsEditable()
+  factory NotificationEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return NotificationEvent._create_1(type, eventInitDict_1);
+    }
+    return NotificationEvent._create_2(type);
+  }
+  static NotificationEvent _create_1(type, eventInitDict) => JS('NotificationEvent', 'new NotificationEvent(#,#)', type, eventInitDict);
+  static NotificationEvent _create_2(type) => JS('NotificationEvent', 'new NotificationEvent(#)', type);
+
+  @DomName('NotificationEvent.notification')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Notification notification;
+}
+// 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.
+
 // WARNING: Do not edit - generated code.
 
 
@@ -24612,11 +25996,6 @@
   @DocsEditable()
   String height;
 
-  @DomName('HTMLObjectElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String integrity;
-
   @DomName('HTMLObjectElement.name')
   @DocsEditable()
   String name;
@@ -24657,6 +26036,11 @@
   @DocsEditable()
   bool checkValidity() native;
 
+  @DomName('HTMLObjectElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
+
   @DomName('HTMLObjectElement.setCustomValidity')
   @DocsEditable()
   void setCustomValidity(String error) native;
@@ -24836,6 +26220,11 @@
   @DocsEditable()
   bool checkValidity() native;
 
+  @DomName('HTMLOutputElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
+
   @DomName('HTMLOutputElement.setCustomValidity')
   @DocsEditable()
   void setCustomValidity(String error) native;
@@ -24846,43 +26235,6 @@
 
 
 @DocsEditable()
-@DomName('OverflowEvent')
-@Experimental() // nonstandard
-@Native("OverflowEvent")
-class OverflowEvent extends Event {
-  // To suppress missing implicit constructor warnings.
-  factory OverflowEvent._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('OverflowEvent.BOTH')
-  @DocsEditable()
-  static const int BOTH = 2;
-
-  @DomName('OverflowEvent.HORIZONTAL')
-  @DocsEditable()
-  static const int HORIZONTAL = 0;
-
-  @DomName('OverflowEvent.VERTICAL')
-  @DocsEditable()
-  static const int VERTICAL = 1;
-
-  @DomName('OverflowEvent.horizontalOverflow')
-  @DocsEditable()
-  final bool horizontalOverflow;
-
-  @DomName('OverflowEvent.orient')
-  @DocsEditable()
-  final int orient;
-
-  @DomName('OverflowEvent.verticalOverflow')
-  @DocsEditable()
-  final bool verticalOverflow;
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('PageTransitionEvent')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#pagetransitionevent
 @Experimental()
@@ -24891,6 +26243,18 @@
   // To suppress missing implicit constructor warnings.
   factory PageTransitionEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('PageTransitionEvent.PageTransitionEvent')
+  @DocsEditable()
+  factory PageTransitionEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return PageTransitionEvent._create_1(type, eventInitDict_1);
+    }
+    return PageTransitionEvent._create_2(type);
+  }
+  static PageTransitionEvent _create_1(type, eventInitDict) => JS('PageTransitionEvent', 'new PageTransitionEvent(#,#)', type, eventInitDict);
+  static PageTransitionEvent _create_2(type) => JS('PageTransitionEvent', 'new PageTransitionEvent(#)', type);
+
   @DomName('PageTransitionEvent.persisted')
   @DocsEditable()
   final bool persisted;
@@ -24978,6 +26342,44 @@
 
 
 @DocsEditable()
+@DomName('PasswordCredential')
+@Experimental() // untriaged
+@Native("PasswordCredential")
+class PasswordCredential extends Credential {
+  // To suppress missing implicit constructor warnings.
+  factory PasswordCredential._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PasswordCredential.PasswordCredential')
+  @DocsEditable()
+  factory PasswordCredential(String id, String password, [String name, String iconURL]) {
+    if (iconURL != null) {
+      return PasswordCredential._create_1(id, password, name, iconURL);
+    }
+    if (name != null) {
+      return PasswordCredential._create_2(id, password, name);
+    }
+    return PasswordCredential._create_3(id, password);
+  }
+  static PasswordCredential _create_1(id, password, name, iconURL) => JS('PasswordCredential', 'new PasswordCredential(#,#,#,#)', id, password, name, iconURL);
+  static PasswordCredential _create_2(id, password, name) => JS('PasswordCredential', 'new PasswordCredential(#,#,#)', id, password, name);
+  static PasswordCredential _create_3(id, password) => JS('PasswordCredential', 'new PasswordCredential(#,#)', id, password);
+
+  @DomName('PasswordCredential.formData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final FormData formData;
+
+  @DomName('PasswordCredential.password')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String password;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('Path2D')
 @Experimental() // untriaged
 @Native("Path2D")
@@ -25100,6 +26502,11 @@
   @DocsEditable()
   final PerformanceTiming timing;
 
+  @DomName('Performance.clearFrameTimings')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearFrameTimings() native;
+
   @DomName('Performance.clearMarks')
   @DocsEditable()
   // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/UserTiming/Overview.html#extensions-performance-interface
@@ -25146,6 +26553,11 @@
   @DocsEditable()
   double now() native;
 
+  @DomName('Performance.setFrameTimingBufferSize')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void setFrameTimingBufferSize(int maxSize) native;
+
   @JSName('webkitClearResourceTimings')
   @DomName('Performance.webkitClearResourceTimings')
   @DocsEditable()
@@ -25177,6 +26589,24 @@
 
 
 @DocsEditable()
+@DomName('PerformanceCompositeTiming')
+@Experimental() // untriaged
+@Native("PerformanceCompositeTiming")
+class PerformanceCompositeTiming extends PerformanceEntry {
+  // To suppress missing implicit constructor warnings.
+  factory PerformanceCompositeTiming._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PerformanceCompositeTiming.sourceFrame')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int sourceFrame;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('PerformanceEntry')
 // http://www.w3.org/TR/performance-timeline/#sec-PerformanceEntry-interface
 @Experimental()
@@ -25272,6 +26702,24 @@
 
 
 @DocsEditable()
+@DomName('PerformanceRenderTiming')
+@Experimental() // untriaged
+@Native("PerformanceRenderTiming")
+class PerformanceRenderTiming extends PerformanceEntry {
+  // To suppress missing implicit constructor warnings.
+  factory PerformanceRenderTiming._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PerformanceRenderTiming.sourceFrame')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int sourceFrame;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('PerformanceResourceTiming')
 // http://www.w3c-test.org/webperf/specs/ResourceTiming/#performanceresourcetiming
 @Experimental()
@@ -25330,6 +26778,11 @@
   @DomName('PerformanceResourceTiming.secureConnectionStart')
   @DocsEditable()
   final double secureConnectionStart;
+
+  @DomName('PerformanceResourceTiming.workerStart')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double workerStart;
 }
 // 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
@@ -25434,6 +26887,175 @@
 
 
 @DocsEditable()
+@DomName('PeriodicSyncEvent')
+@Experimental() // untriaged
+@Native("PeriodicSyncEvent")
+class PeriodicSyncEvent extends ExtendableEvent {
+  // To suppress missing implicit constructor warnings.
+  factory PeriodicSyncEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PeriodicSyncEvent.PeriodicSyncEvent')
+  @DocsEditable()
+  factory PeriodicSyncEvent(String type, Map init) {
+    var init_1 = convertDartToNative_Dictionary(init);
+    return PeriodicSyncEvent._create_1(type, init_1);
+  }
+  static PeriodicSyncEvent _create_1(type, init) => JS('PeriodicSyncEvent', 'new PeriodicSyncEvent(#,#)', type, init);
+
+  @DomName('PeriodicSyncEvent.registration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final PeriodicSyncRegistration registration;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('PeriodicSyncManager')
+@Experimental() // untriaged
+@Native("PeriodicSyncManager")
+class PeriodicSyncManager extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory PeriodicSyncManager._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PeriodicSyncManager.minPossiblePeriod')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int minPossiblePeriod;
+
+  @DomName('PeriodicSyncManager.getRegistration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistration(String tag) native;
+
+  @DomName('PeriodicSyncManager.getRegistrations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistrations() native;
+
+  @DomName('PeriodicSyncManager.permissionState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future permissionState() native;
+
+  @DomName('PeriodicSyncManager.register')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future register([Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _register_1(options_1);
+    }
+    return _register_2();
+  }
+  @JSName('register')
+  @DomName('PeriodicSyncManager.register')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _register_1(options) native;
+  @JSName('register')
+  @DomName('PeriodicSyncManager.register')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _register_2() native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('PeriodicSyncRegistration')
+@Experimental() // untriaged
+@Native("PeriodicSyncRegistration")
+class PeriodicSyncRegistration extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory PeriodicSyncRegistration._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PeriodicSyncRegistration.minPeriod')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int minPeriod;
+
+  @DomName('PeriodicSyncRegistration.networkState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String networkState;
+
+  @DomName('PeriodicSyncRegistration.powerState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String powerState;
+
+  @DomName('PeriodicSyncRegistration.tag')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String tag;
+
+  @DomName('PeriodicSyncRegistration.unregister')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future unregister() native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('PermissionStatus')
+@Experimental() // untriaged
+@Native("PermissionStatus")
+class PermissionStatus extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory PermissionStatus._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PermissionStatus.changeEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
+
+  @DomName('PermissionStatus.state')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String state;
+
+  @DomName('PermissionStatus.status')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String status;
+
+  @DomName('PermissionStatus.onchange')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<Event> get onChange => changeEvent.forTarget(this);
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('Permissions')
+@Experimental() // untriaged
+@Native("Permissions")
+class Permissions extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory Permissions._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('Permissions.query')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future query(Object permission) native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('HTMLPictureElement')
 @Experimental() // untriaged
 @Native("HTMLPictureElement")
@@ -25476,10 +27098,6 @@
   @DocsEditable()
   final String name;
 
-  @DomName('Plugin.__getter__')
-  @DocsEditable()
-  MimeType __getter__(String name) native;
-
   @DomName('Plugin.item')
   @DocsEditable()
   MimeType item(int index) native;
@@ -25549,10 +27167,6 @@
   Plugin elementAt(int index) => this[index];
   // -- end List<Plugin> mixins.
 
-  @DomName('PluginArray.__getter__')
-  @DocsEditable()
-  Plugin __getter__(String name) native;
-
   @DomName('PluginArray.item')
   @DocsEditable()
   Plugin item(int index) native;
@@ -25584,6 +27198,11 @@
    */
   PluginPlaceholderElement.created() : super.created();
 
+  @DomName('PluginPlaceholderElement.closeable')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool closeable;
+
   @DomName('PluginPlaceholderElement.message')
   @DocsEditable()
   @Experimental() // untriaged
@@ -25600,6 +27219,71 @@
 
 
 @DocsEditable()
+@DomName('PointerEvent')
+@Experimental() // untriaged
+@Native("PointerEvent")
+class PointerEvent extends MouseEvent {
+  // To suppress missing implicit constructor warnings.
+  factory PointerEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PointerEvent.PointerEvent')
+  @DocsEditable()
+  factory PointerEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return PointerEvent._create_1(type, eventInitDict_1);
+    }
+    return PointerEvent._create_2(type);
+  }
+  static PointerEvent _create_1(type, eventInitDict) => JS('PointerEvent', 'new PointerEvent(#,#)', type, eventInitDict);
+  static PointerEvent _create_2(type) => JS('PointerEvent', 'new PointerEvent(#)', type);
+
+  @DomName('PointerEvent.height')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double height;
+
+  @DomName('PointerEvent.isPrimary')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool isPrimary;
+
+  @DomName('PointerEvent.pointerId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int pointerId;
+
+  @DomName('PointerEvent.pointerType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String pointerType;
+
+  @DomName('PointerEvent.pressure')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double pressure;
+
+  @DomName('PointerEvent.tiltX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int tiltX;
+
+  @DomName('PointerEvent.tiltY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int tiltY;
+
+  @DomName('PointerEvent.width')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double width;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('PopStateEvent')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @SupportedBrowser(SupportedBrowser.FIREFOX)
@@ -25610,6 +27294,18 @@
   // To suppress missing implicit constructor warnings.
   factory PopStateEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('PopStateEvent.PopStateEvent')
+  @DocsEditable()
+  factory PopStateEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return PopStateEvent._create_1(type, eventInitDict_1);
+    }
+    return PopStateEvent._create_2(type);
+  }
+  static PopStateEvent _create_1(type, eventInitDict) => JS('PopStateEvent', 'new PopStateEvent(#,#)', type, eventInitDict);
+  static PopStateEvent _create_2(type) => JS('PopStateEvent', 'new PopStateEvent(#)', type);
+
   @DomName('PopStateEvent.state')
   @DocsEditable()
   dynamic get state => convertNativeToDart_SerializedScriptValue(this._get_state);
@@ -25679,6 +27375,34 @@
 
 
 @DocsEditable()
+@DomName('PositionSensorVRDevice')
+@Experimental() // untriaged
+@Native("PositionSensorVRDevice")
+class PositionSensorVRDevice extends VRDevice {
+  // To suppress missing implicit constructor warnings.
+  factory PositionSensorVRDevice._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PositionSensorVRDevice.getImmediateState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VRPositionState getImmediateState() native;
+
+  @DomName('PositionSensorVRDevice.getState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VRPositionState getState() native;
+
+  @DomName('PositionSensorVRDevice.resetSensor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void resetSensor() native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('HTMLPreElement')
 @Native("HTMLPreElement")
 class PreElement extends HtmlElement {
@@ -25707,6 +27431,102 @@
 class Presentation extends EventTarget {
   // To suppress missing implicit constructor warnings.
   factory Presentation._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('Presentation.session')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final PresentationSession session;
+
+  @DomName('Presentation.getAvailability')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getAvailability(String url) native;
+
+  @DomName('Presentation.joinSession')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future joinSession(String url, String presentationId) native;
+
+  @DomName('Presentation.startSession')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future startSession(String url) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('PresentationAvailability')
+@Experimental() // untriaged
+@Native("PresentationAvailability")
+class PresentationAvailability extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory PresentationAvailability._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PresentationAvailability.changeEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
+
+  @DomName('PresentationAvailability.value')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool value;
+
+  @DomName('PresentationAvailability.onchange')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<Event> get onChange => changeEvent.forTarget(this);
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('PresentationSession')
+@Experimental() // untriaged
+@Native("PresentationSession")
+class PresentationSession extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory PresentationSession._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PresentationSession.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+  @DomName('PresentationSession.binaryType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String binaryType;
+
+  @DomName('PresentationSession.id')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String id;
+
+  @DomName('PresentationSession.state')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String state;
+
+  @DomName('PresentationSession.close')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void close() native;
+
+  @DomName('PresentationSession.send')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void send(data_OR_message) native;
+
+  @DomName('PresentationSession.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
 }
 // 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
@@ -25790,6 +27610,18 @@
   // To suppress missing implicit constructor warnings.
   factory ProgressEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('ProgressEvent.ProgressEvent')
+  @DocsEditable()
+  factory ProgressEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return ProgressEvent._create_1(type, eventInitDict_1);
+    }
+    return ProgressEvent._create_2(type);
+  }
+  static ProgressEvent _create_1(type, eventInitDict) => JS('ProgressEvent', 'new ProgressEvent(#,#)', type, eventInitDict);
+  static ProgressEvent _create_2(type) => JS('ProgressEvent', 'new ProgressEvent(#)', type);
+
   @DomName('ProgressEvent.lengthComputable')
   @DocsEditable()
   final bool lengthComputable;
@@ -25808,17 +27640,64 @@
 
 
 @DocsEditable()
+@DomName('PromiseRejectionEvent')
+@Experimental() // untriaged
+@Native("PromiseRejectionEvent")
+class PromiseRejectionEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory PromiseRejectionEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PromiseRejectionEvent.PromiseRejectionEvent')
+  @DocsEditable()
+  factory PromiseRejectionEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return PromiseRejectionEvent._create_1(type, eventInitDict_1);
+    }
+    return PromiseRejectionEvent._create_2(type);
+  }
+  static PromiseRejectionEvent _create_1(type, eventInitDict) => JS('PromiseRejectionEvent', 'new PromiseRejectionEvent(#,#)', type, eventInitDict);
+  static PromiseRejectionEvent _create_2(type) => JS('PromiseRejectionEvent', 'new PromiseRejectionEvent(#)', type);
+
+  @DomName('PromiseRejectionEvent.promise')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Future promise;
+
+  @DomName('PromiseRejectionEvent.reason')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Object reason;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('PushEvent')
 @Experimental() // untriaged
 @Native("PushEvent")
-class PushEvent extends Event {
+class PushEvent extends ExtendableEvent {
   // To suppress missing implicit constructor warnings.
   factory PushEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('PushEvent.PushEvent')
+  @DocsEditable()
+  factory PushEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return PushEvent._create_1(type, eventInitDict_1);
+    }
+    return PushEvent._create_2(type);
+  }
+  static PushEvent _create_1(type, eventInitDict) => JS('PushEvent', 'new PushEvent(#,#)', type, eventInitDict);
+  static PushEvent _create_2(type) => JS('PushEvent', 'new PushEvent(#)', type);
+
   @DomName('PushEvent.data')
   @DocsEditable()
   @Experimental() // untriaged
-  final String data;
+  final PushMessageData data;
 }
 // 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
@@ -25833,10 +27712,52 @@
   // To suppress missing implicit constructor warnings.
   factory PushManager._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('PushManager.register')
+  @DomName('PushManager.getSubscription')
   @DocsEditable()
   @Experimental() // untriaged
-  Future register(String senderId) native;
+  Future getSubscription() native;
+
+  @DomName('PushManager.permissionState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future permissionState([Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _permissionState_1(options_1);
+    }
+    return _permissionState_2();
+  }
+  @JSName('permissionState')
+  @DomName('PushManager.permissionState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _permissionState_1(options) native;
+  @JSName('permissionState')
+  @DomName('PushManager.permissionState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _permissionState_2() native;
+
+  @DomName('PushManager.subscribe')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future subscribe([Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _subscribe_1(options_1);
+    }
+    return _subscribe_2();
+  }
+  @JSName('subscribe')
+  @DomName('PushManager.subscribe')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _subscribe_1(options) native;
+  @JSName('subscribe')
+  @DomName('PushManager.subscribe')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _subscribe_2() native;
 }
 // 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
@@ -25844,22 +27765,62 @@
 
 
 @DocsEditable()
-@DomName('PushRegistration')
+@DomName('PushMessageData')
 @Experimental() // untriaged
-@Native("PushRegistration")
-class PushRegistration extends Interceptor {
+@Native("PushMessageData")
+class PushMessageData extends Interceptor {
   // To suppress missing implicit constructor warnings.
-  factory PushRegistration._() { throw new UnsupportedError("Not supported"); }
+  factory PushMessageData._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('PushRegistration.pushEndpoint')
+  @DomName('PushMessageData.PushMessageData')
+  @DocsEditable()
+  factory PushMessageData(String message) {
+    return PushMessageData._create_1(message);
+  }
+  static PushMessageData _create_1(message) => JS('PushMessageData', 'new PushMessageData(#)', message);
+
+  @DomName('PushMessageData.arrayBuffer')
   @DocsEditable()
   @Experimental() // untriaged
-  final String pushEndpoint;
+  ByteBuffer arrayBuffer() native;
 
-  @DomName('PushRegistration.pushRegistrationId')
+  @DomName('PushMessageData.blob')
   @DocsEditable()
   @Experimental() // untriaged
-  final String pushRegistrationId;
+  Blob blob() native;
+
+  @DomName('PushMessageData.json')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object json() native;
+
+  @DomName('PushMessageData.text')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String text() native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('PushSubscription')
+@Experimental() // untriaged
+@Native("PushSubscription")
+class PushSubscription extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory PushSubscription._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PushSubscription.endpoint')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String endpoint;
+
+  @DomName('PushSubscription.unsubscribe')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future unsubscribe() native;
 }
 // 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
@@ -25946,26 +27907,6 @@
   @DocsEditable()
   static const int END_TO_START = 3;
 
-  @DomName('Range.NODE_AFTER')
-  @DocsEditable()
-  @Experimental() // nonstandard
-  static const int NODE_AFTER = 1;
-
-  @DomName('Range.NODE_BEFORE')
-  @DocsEditable()
-  @Experimental() // nonstandard
-  static const int NODE_BEFORE = 0;
-
-  @DomName('Range.NODE_BEFORE_AND_AFTER')
-  @DocsEditable()
-  @Experimental() // nonstandard
-  static const int NODE_BEFORE_AND_AFTER = 2;
-
-  @DomName('Range.NODE_INSIDE')
-  @DocsEditable()
-  @Experimental() // nonstandard
-  static const int NODE_INSIDE = 3;
-
   @DomName('Range.START_TO_END')
   @DocsEditable()
   static const int START_TO_END = 1;
@@ -26017,11 +27958,11 @@
 
   @DomName('Range.comparePoint')
   @DocsEditable()
-  int comparePoint(Node refNode, int offset) native;
+  int comparePoint(Node node, int offset) native;
 
   @DomName('Range.createContextualFragment')
   @DocsEditable()
-  DocumentFragment createContextualFragment(String html) native;
+  DocumentFragment createContextualFragment(String fragment) native;
 
   @DomName('Range.deleteContents')
   @DocsEditable()
@@ -26052,43 +27993,43 @@
 
   @DomName('Range.insertNode')
   @DocsEditable()
-  void insertNode(Node newNode) native;
+  void insertNode(Node node) native;
 
   @DomName('Range.isPointInRange')
   @DocsEditable()
-  bool isPointInRange(Node refNode, int offset) native;
+  bool isPointInRange(Node node, int offset) native;
 
   @DomName('Range.selectNode')
   @DocsEditable()
-  void selectNode(Node refNode) native;
+  void selectNode(Node node) native;
 
   @DomName('Range.selectNodeContents')
   @DocsEditable()
-  void selectNodeContents(Node refNode) native;
+  void selectNodeContents(Node node) native;
 
   @DomName('Range.setEnd')
   @DocsEditable()
-  void setEnd(Node refNode, int offset) native;
+  void setEnd(Node node, int offset) native;
 
   @DomName('Range.setEndAfter')
   @DocsEditable()
-  void setEndAfter(Node refNode) native;
+  void setEndAfter(Node node) native;
 
   @DomName('Range.setEndBefore')
   @DocsEditable()
-  void setEndBefore(Node refNode) native;
+  void setEndBefore(Node node) native;
 
   @DomName('Range.setStart')
   @DocsEditable()
-  void setStart(Node refNode, int offset) native;
+  void setStart(Node node, int offset) native;
 
   @DomName('Range.setStartAfter')
   @DocsEditable()
-  void setStartAfter(Node refNode) native;
+  void setStartAfter(Node node) native;
 
   @DomName('Range.setStartBefore')
   @DocsEditable()
-  void setStartBefore(Node refNode) native;
+  void setStartBefore(Node node) native;
 
   @DomName('Range.surroundContents')
   @DocsEditable()
@@ -26111,6 +28052,62 @@
 
 
 @DocsEditable()
+@DomName('ReadableByteStream')
+@Experimental() // untriaged
+@Native("ReadableByteStream")
+class ReadableByteStream extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory ReadableByteStream._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ReadableByteStream.cancel')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future cancel([Object reason]) native;
+
+  @DomName('ReadableByteStream.getReader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ReadableByteStreamReader getReader() native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('ReadableByteStreamReader')
+@Experimental() // untriaged
+@Native("ReadableByteStreamReader")
+class ReadableByteStreamReader extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory ReadableByteStreamReader._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ReadableByteStreamReader.closed')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Future closed;
+
+  @DomName('ReadableByteStreamReader.cancel')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future cancel([Object reason]) native;
+
+  @DomName('ReadableByteStreamReader.read')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future read() native;
+
+  @DomName('ReadableByteStreamReader.releaseLock')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void releaseLock() native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('ReadableStream')
 @Experimental() // untriaged
 @Native("ReadableStream")
@@ -26118,30 +28115,48 @@
   // To suppress missing implicit constructor warnings.
   factory ReadableStream._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('ReadableStream.closed')
+  @DomName('ReadableStream.cancel')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future cancel([Object reason]) native;
+
+  @DomName('ReadableStream.getReader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ReadableStreamReader getReader() native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('ReadableStreamReader')
+@Experimental() // untriaged
+@Native("ReadableStreamReader")
+class ReadableStreamReader extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory ReadableStreamReader._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ReadableStreamReader.closed')
   @DocsEditable()
   @Experimental() // untriaged
   final Future closed;
 
-  @DomName('ReadableStream.state')
+  @DomName('ReadableStreamReader.cancel')
   @DocsEditable()
   @Experimental() // untriaged
-  final String state;
+  Future cancel([Object reason]) native;
 
-  @DomName('ReadableStream.cancel')
+  @DomName('ReadableStreamReader.read')
   @DocsEditable()
   @Experimental() // untriaged
-  Future cancel(Object reason) native;
+  Future read() native;
 
-  @DomName('ReadableStream.read')
+  @DomName('ReadableStreamReader.releaseLock')
   @DocsEditable()
   @Experimental() // untriaged
-  Object read() native;
-
-  @DomName('ReadableStream.wait')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future wait() native;
+  void releaseLock() native;
 }
 // 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
@@ -26156,6 +28171,18 @@
   // To suppress missing implicit constructor warnings.
   factory RelatedEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('RelatedEvent.RelatedEvent')
+  @DocsEditable()
+  factory RelatedEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return RelatedEvent._create_1(type, eventInitDict_1);
+    }
+    return RelatedEvent._create_2(type);
+  }
+  static RelatedEvent _create_1(type, eventInitDict) => JS('RelatedEvent', 'new RelatedEvent(#,#)', type, eventInitDict);
+  static RelatedEvent _create_2(type) => JS('RelatedEvent', 'new RelatedEvent(#)', type);
+
   @DomName('RelatedEvent.relatedTarget')
   @DocsEditable()
   @Experimental() // untriaged
@@ -26432,6 +28459,14 @@
   // To suppress missing implicit constructor warnings.
   factory RtcDtmfToneChangeEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent')
+  @DocsEditable()
+  factory RtcDtmfToneChangeEvent(String type, Map eventInitDict) {
+    var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+    return RtcDtmfToneChangeEvent._create_1(type, eventInitDict_1);
+  }
+  static RtcDtmfToneChangeEvent _create_1(type, eventInitDict) => JS('RtcDtmfToneChangeEvent', 'new RTCDTMFToneChangeEvent(#,#)', type, eventInitDict);
+
   @DomName('RTCDTMFToneChangeEvent.tone')
   @DocsEditable()
   final String tone;
@@ -26908,14 +28943,6 @@
   @DocsEditable()
   final String id;
 
-  @DomName('RTCStatsReport.local')
-  @DocsEditable()
-  final RtcStatsReport local;
-
-  @DomName('RTCStatsReport.remote')
-  @DocsEditable()
-  final RtcStatsReport remote;
-
   @DomName('RTCStatsReport.timestamp')
   @DocsEditable()
   DateTime get timestamp => convertNativeToDart_DateTime(this._get_timestamp);
@@ -26951,10 +28978,6 @@
   // To suppress missing implicit constructor warnings.
   factory RtcStatsResponse._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('RTCStatsResponse.__getter__')
-  @DocsEditable()
-  RtcStatsReport __getter__(String name) native;
-
   @DomName('RTCStatsResponse.namedItem')
   @DocsEditable()
   RtcStatsReport namedItem(String name) native;
@@ -27133,6 +29156,113 @@
 
 
 @DocsEditable()
+@DomName('ScrollState')
+@Experimental() // untriaged
+@Native("ScrollState")
+class ScrollState extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory ScrollState._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ScrollState.ScrollState')
+  @DocsEditable()
+  factory ScrollState([num deltaX, num deltaY, num deltaGranularity, num velocityX, num velocityY, bool inInertialPhase, bool isBeginning, bool isEnding]) {
+    if (isEnding != null) {
+      return ScrollState._create_1(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase, isBeginning, isEnding);
+    }
+    if (isBeginning != null) {
+      return ScrollState._create_2(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase, isBeginning);
+    }
+    if (inInertialPhase != null) {
+      return ScrollState._create_3(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase);
+    }
+    if (velocityY != null) {
+      return ScrollState._create_4(deltaX, deltaY, deltaGranularity, velocityX, velocityY);
+    }
+    if (velocityX != null) {
+      return ScrollState._create_5(deltaX, deltaY, deltaGranularity, velocityX);
+    }
+    if (deltaGranularity != null) {
+      return ScrollState._create_6(deltaX, deltaY, deltaGranularity);
+    }
+    if (deltaY != null) {
+      return ScrollState._create_7(deltaX, deltaY);
+    }
+    if (deltaX != null) {
+      return ScrollState._create_8(deltaX);
+    }
+    return ScrollState._create_9();
+  }
+  static ScrollState _create_1(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase, isBeginning, isEnding) => JS('ScrollState', 'new ScrollState(#,#,#,#,#,#,#,#)', deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase, isBeginning, isEnding);
+  static ScrollState _create_2(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase, isBeginning) => JS('ScrollState', 'new ScrollState(#,#,#,#,#,#,#)', deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase, isBeginning);
+  static ScrollState _create_3(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase) => JS('ScrollState', 'new ScrollState(#,#,#,#,#,#)', deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase);
+  static ScrollState _create_4(deltaX, deltaY, deltaGranularity, velocityX, velocityY) => JS('ScrollState', 'new ScrollState(#,#,#,#,#)', deltaX, deltaY, deltaGranularity, velocityX, velocityY);
+  static ScrollState _create_5(deltaX, deltaY, deltaGranularity, velocityX) => JS('ScrollState', 'new ScrollState(#,#,#,#)', deltaX, deltaY, deltaGranularity, velocityX);
+  static ScrollState _create_6(deltaX, deltaY, deltaGranularity) => JS('ScrollState', 'new ScrollState(#,#,#)', deltaX, deltaY, deltaGranularity);
+  static ScrollState _create_7(deltaX, deltaY) => JS('ScrollState', 'new ScrollState(#,#)', deltaX, deltaY);
+  static ScrollState _create_8(deltaX) => JS('ScrollState', 'new ScrollState(#)', deltaX);
+  static ScrollState _create_9() => JS('ScrollState', 'new ScrollState()');
+
+  @DomName('ScrollState.deltaGranularity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double deltaGranularity;
+
+  @DomName('ScrollState.deltaX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double deltaX;
+
+  @DomName('ScrollState.deltaY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double deltaY;
+
+  @DomName('ScrollState.fromUserInput')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool fromUserInput;
+
+  @DomName('ScrollState.inInertialPhase')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool inInertialPhase;
+
+  @DomName('ScrollState.isBeginning')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool isBeginning;
+
+  @DomName('ScrollState.isEnding')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool isEnding;
+
+  @DomName('ScrollState.shouldPropagate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool shouldPropagate;
+
+  @DomName('ScrollState.velocityX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double velocityX;
+
+  @DomName('ScrollState.velocityY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double velocityY;
+
+  @DomName('ScrollState.consumeDelta')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void consumeDelta(num x, num y) native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('SecurityPolicyViolationEvent')
 // https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#securitypolicyviolationevent-events
 @Experimental()
@@ -27141,6 +29271,18 @@
   // To suppress missing implicit constructor warnings.
   factory SecurityPolicyViolationEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('SecurityPolicyViolationEvent.SecurityPolicyViolationEvent')
+  @DocsEditable()
+  factory SecurityPolicyViolationEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return SecurityPolicyViolationEvent._create_1(type, eventInitDict_1);
+    }
+    return SecurityPolicyViolationEvent._create_2(type);
+  }
+  static SecurityPolicyViolationEvent _create_1(type, eventInitDict) => JS('SecurityPolicyViolationEvent', 'new SecurityPolicyViolationEvent(#,#)', type, eventInitDict);
+  static SecurityPolicyViolationEvent _create_2(type) => JS('SecurityPolicyViolationEvent', 'new SecurityPolicyViolationEvent(#)', type);
+
   @JSName('blockedURI')
   @DomName('SecurityPolicyViolationEvent.blockedURI')
   @DocsEditable()
@@ -27270,12 +29412,12 @@
 
   @DomName('HTMLSelectElement.__setter__')
   @DocsEditable()
-  void __setter__(int index, OptionElement value) native;
+  void __setter__(int index, OptionElement option) native;
 
   @DomName('HTMLSelectElement.add')
   @DocsEditable()
   @Experimental() // untriaged
-  void add(HtmlElement element, int before) native;
+  void add(Object element, Object before) native;
 
   @DomName('HTMLSelectElement.checkValidity')
   @DocsEditable()
@@ -27287,7 +29429,12 @@
 
   @DomName('HTMLSelectElement.namedItem')
   @DocsEditable()
-  Element namedItem(String name) native;
+  OptionElement namedItem(String name) native;
+
+  @DomName('HTMLSelectElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
 
   @DomName('HTMLSelectElement.setCustomValidity')
   @DocsEditable()
@@ -27392,7 +29539,7 @@
   @DomName('Selection.containsNode')
   @DocsEditable()
   @Experimental() // non-standard
-  bool containsNode(Node node, bool allowPartial) native;
+  bool containsNode(Node node, bool allowPartialContainment) native;
 
   @DomName('Selection.deleteFromDocument')
   @DocsEditable()
@@ -27440,19 +29587,35 @@
 
 
 @DocsEditable()
-@DomName('ServiceWorkerClient')
+@DomName('ServicePort')
 @Experimental() // untriaged
-@Native("ServiceWorkerClient")
-class ServiceWorkerClient extends Interceptor {
+@Native("ServicePort")
+class ServicePort extends Interceptor {
   // To suppress missing implicit constructor warnings.
-  factory ServiceWorkerClient._() { throw new UnsupportedError("Not supported"); }
+  factory ServicePort._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('ServiceWorkerClient.id')
+  @DomName('ServicePort.data')
   @DocsEditable()
   @Experimental() // untriaged
-  final int id;
+  final Object data;
 
-  @DomName('ServiceWorkerClient.postMessage')
+  @DomName('ServicePort.name')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String name;
+
+  @JSName('targetURL')
+  @DomName('ServicePort.targetURL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String targetUrl;
+
+  @DomName('ServicePort.close')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void close() native;
+
+  @DomName('ServicePort.postMessage')
   @DocsEditable()
   @Experimental() // untriaged
   void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
@@ -27466,12 +29629,12 @@
     return;
   }
   @JSName('postMessage')
-  @DomName('ServiceWorkerClient.postMessage')
+  @DomName('ServicePort.postMessage')
   @DocsEditable()
   @Experimental() // untriaged
   void _postMessage_1(message, List<MessagePort> transfer) native;
   @JSName('postMessage')
-  @DomName('ServiceWorkerClient.postMessage')
+  @DomName('ServicePort.postMessage')
   @DocsEditable()
   @Experimental() // untriaged
   void _postMessage_2(message) native;
@@ -27482,33 +29645,118 @@
 
 
 @DocsEditable()
-@DomName('ServiceWorkerClients')
+@DomName('ServicePortCollection')
 @Experimental() // untriaged
-@Native("ServiceWorkerClients")
-class ServiceWorkerClients extends Interceptor {
+@Native("ServicePortCollection")
+class ServicePortCollection extends EventTarget {
   // To suppress missing implicit constructor warnings.
-  factory ServiceWorkerClients._() { throw new UnsupportedError("Not supported"); }
+  factory ServicePortCollection._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('ServiceWorkerClients.getAll')
+  @DomName('ServicePortCollection.messageEvent')
   @DocsEditable()
   @Experimental() // untriaged
-  Future getAll([Map options]) {
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+  @DomName('ServicePortCollection.connect')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future connect(String url, [Map options]) {
     if (options != null) {
       var options_1 = convertDartToNative_Dictionary(options);
-      return _getAll_1(options_1);
+      return _connect_1(url, options_1);
     }
-    return _getAll_2();
+    return _connect_2(url);
   }
-  @JSName('getAll')
-  @DomName('ServiceWorkerClients.getAll')
+  @JSName('connect')
+  @DomName('ServicePortCollection.connect')
   @DocsEditable()
   @Experimental() // untriaged
-  Future _getAll_1(options) native;
-  @JSName('getAll')
-  @DomName('ServiceWorkerClients.getAll')
+  Future _connect_1(url, options) native;
+  @JSName('connect')
+  @DomName('ServicePortCollection.connect')
   @DocsEditable()
   @Experimental() // untriaged
-  Future _getAll_2() native;
+  Future _connect_2(url) native;
+
+  @DomName('ServicePortCollection.match')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future match(Map options) {
+    var options_1 = convertDartToNative_Dictionary(options);
+    return _match_1(options_1);
+  }
+  @JSName('match')
+  @DomName('ServicePortCollection.match')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _match_1(options) native;
+
+  @DomName('ServicePortCollection.matchAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future matchAll([Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _matchAll_1(options_1);
+    }
+    return _matchAll_2();
+  }
+  @JSName('matchAll')
+  @DomName('ServicePortCollection.matchAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _matchAll_1(options) native;
+  @JSName('matchAll')
+  @DomName('ServicePortCollection.matchAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _matchAll_2() native;
+
+  @DomName('ServicePortCollection.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('ServicePortConnectEvent')
+@Experimental() // untriaged
+@Native("ServicePortConnectEvent")
+class ServicePortConnectEvent extends ExtendableEvent {
+  // To suppress missing implicit constructor warnings.
+  factory ServicePortConnectEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ServicePortConnectEvent.ServicePortConnectEvent')
+  @DocsEditable()
+  factory ServicePortConnectEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return ServicePortConnectEvent._create_1(type, eventInitDict_1);
+    }
+    return ServicePortConnectEvent._create_2(type);
+  }
+  static ServicePortConnectEvent _create_1(type, eventInitDict) => JS('ServicePortConnectEvent', 'new ServicePortConnectEvent(#,#)', type, eventInitDict);
+  static ServicePortConnectEvent _create_2(type) => JS('ServicePortConnectEvent', 'new ServicePortConnectEvent(#)', type);
+
+  @DomName('ServicePortConnectEvent.origin')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String origin;
+
+  @JSName('targetURL')
+  @DomName('ServicePortConnectEvent.targetURL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String targetUrl;
+
+  @DomName('ServicePortConnectEvent.respondWith')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future respondWith(Future response) native;
 }
 // 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
@@ -27519,10 +29767,15 @@
 @DomName('ServiceWorkerContainer')
 @Experimental() // untriaged
 @Native("ServiceWorkerContainer")
-class ServiceWorkerContainer extends Interceptor {
+class ServiceWorkerContainer extends EventTarget {
   // To suppress missing implicit constructor warnings.
   factory ServiceWorkerContainer._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('ServiceWorkerContainer.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
   @DomName('ServiceWorkerContainer.controller')
   @DocsEditable()
   @Experimental() // untriaged
@@ -27538,6 +29791,11 @@
   @Experimental() // untriaged
   Future getRegistration([String documentURL]) native;
 
+  @DomName('ServiceWorkerContainer.getRegistrations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistrations() native;
+
   @DomName('ServiceWorkerContainer.register')
   @DocsEditable()
   @Experimental() // untriaged
@@ -27558,6 +29816,11 @@
   @DocsEditable()
   @Experimental() // untriaged
   Future _register_2(url) native;
+
+  @DomName('ServiceWorkerContainer.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
 }
 // 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
@@ -27577,67 +29840,97 @@
   @Experimental() // untriaged
   static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
 
-  @DomName('ServiceWorkerGlobalScope.caches')
-  @DocsEditable()
-  @Experimental() // untriaged
-  final CacheStorage caches;
-
   @DomName('ServiceWorkerGlobalScope.clients')
   @DocsEditable()
   @Experimental() // untriaged
-  final ServiceWorkerClients clients;
+  final Clients clients;
 
-  @DomName('ServiceWorkerGlobalScope.scope')
+  @DomName('ServiceWorkerGlobalScope.ports')
   @DocsEditable()
   @Experimental() // untriaged
-  final String scope;
+  final StashedPortCollection ports;
 
-  @DomName('ServiceWorkerGlobalScope.fetch')
+  @DomName('ServiceWorkerGlobalScope.registration')
   @DocsEditable()
   @Experimental() // untriaged
-  Future _fetch(request, [Map requestInitDict]) {
-    if ((request is String || request == null) && requestInitDict == null) {
-      return _fetch_1(request);
-    }
-    if (requestInitDict != null && (request is String || request == null)) {
-      var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict);
-      return _fetch_2(request, requestInitDict_1);
-    }
-    if ((request is _Request || request == null) && requestInitDict == null) {
-      return _fetch_3(request);
-    }
-    if (requestInitDict != null && (request is _Request || request == null)) {
-      var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict);
-      return _fetch_4(request, requestInitDict_1);
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
-  }
-  @JSName('fetch')
-  @DomName('ServiceWorkerGlobalScope.fetch')
+  final ServiceWorkerRegistration registration;
+
+  @DomName('ServiceWorkerGlobalScope.skipWaiting')
   @DocsEditable()
   @Experimental() // untriaged
-  Future _fetch_1(String request) native;
-  @JSName('fetch')
-  @DomName('ServiceWorkerGlobalScope.fetch')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future _fetch_2(String request, requestInitDict) native;
-  @JSName('fetch')
-  @DomName('ServiceWorkerGlobalScope.fetch')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future _fetch_3(_Request request) native;
-  @JSName('fetch')
-  @DomName('ServiceWorkerGlobalScope.fetch')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future _fetch_4(_Request request, requestInitDict) native;
+  Future skipWaiting() native;
 
   @DomName('ServiceWorkerGlobalScope.onmessage')
   @DocsEditable()
   @Experimental() // untriaged
   Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
 }
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+// TODO(alanknight): Provide a nicer constructor that uses named parameters
+// rather than an initialization map.
+@DomName('ServiceWorkerMessageEvent')
+@Experimental() // untriaged
+@Native("ServiceWorkerMessageEvent")
+class ServiceWorkerMessageEvent extends Event {
+
+  // TODO(alanknight): This really should be generated by the
+  // _OutputConversion in the systemnative.py script, but that doesn't
+  // use those conversions right now, so do this as a one-off.
+  @DomName('ServiceWorkerMessageEvent.data')
+  @DocsEditable()
+  dynamic get data => convertNativeToDart_SerializedScriptValue(this._get_data);
+
+  @JSName('data')
+  @DomName('ServiceWorkerMessageEvent.data')
+  @DocsEditable()
+  @annotation_Creates_SerializedScriptValue
+  @annotation_Returns_SerializedScriptValue
+  final dynamic _get_data;
+
+  // To suppress missing implicit constructor warnings.
+  factory ServiceWorkerMessageEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ServiceWorkerMessageEvent.ServiceWorkerMessageEvent')
+  @DocsEditable()
+  factory ServiceWorkerMessageEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return ServiceWorkerMessageEvent._create_1(type, eventInitDict_1);
+    }
+    return ServiceWorkerMessageEvent._create_2(type);
+  }
+  static ServiceWorkerMessageEvent _create_1(type, eventInitDict) => JS('ServiceWorkerMessageEvent', 'new ServiceWorkerMessageEvent(#,#)', type, eventInitDict);
+  static ServiceWorkerMessageEvent _create_2(type) => JS('ServiceWorkerMessageEvent', 'new ServiceWorkerMessageEvent(#)', type);
+
+  @DomName('ServiceWorkerMessageEvent.lastEventId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String lastEventId;
+
+  @DomName('ServiceWorkerMessageEvent.origin')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String origin;
+
+  @DomName('ServiceWorkerMessageEvent.ports')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final List<MessagePort> ports;
+
+  @DomName('ServiceWorkerMessageEvent.source')
+  @DocsEditable()
+  @Experimental() // untriaged
+  @Creates('Null')
+  @Returns('_ServiceWorker|MessagePort')
+  final Object source;
+
+}
 // 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.
@@ -27656,25 +29949,92 @@
   @Experimental() // untriaged
   final _ServiceWorker active;
 
+  @DomName('ServiceWorkerRegistration.geofencing')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final Geofencing geofencing;
+
   @DomName('ServiceWorkerRegistration.installing')
   @DocsEditable()
   @Experimental() // untriaged
   final _ServiceWorker installing;
 
+  @DomName('ServiceWorkerRegistration.periodicSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final PeriodicSyncManager periodicSync;
+
+  @DomName('ServiceWorkerRegistration.pushManager')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final PushManager pushManager;
+
   @DomName('ServiceWorkerRegistration.scope')
   @DocsEditable()
   @Experimental() // untriaged
   final String scope;
 
+  @DomName('ServiceWorkerRegistration.sync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final SyncManager sync;
+
   @DomName('ServiceWorkerRegistration.waiting')
   @DocsEditable()
   @Experimental() // untriaged
   final _ServiceWorker waiting;
 
+  @DomName('ServiceWorkerRegistration.getNotifications')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getNotifications([Map filter]) {
+    if (filter != null) {
+      var filter_1 = convertDartToNative_Dictionary(filter);
+      return _getNotifications_1(filter_1);
+    }
+    return _getNotifications_2();
+  }
+  @JSName('getNotifications')
+  @DomName('ServiceWorkerRegistration.getNotifications')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _getNotifications_1(filter) native;
+  @JSName('getNotifications')
+  @DomName('ServiceWorkerRegistration.getNotifications')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _getNotifications_2() native;
+
+  @DomName('ServiceWorkerRegistration.showNotification')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future showNotification(String title, [Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _showNotification_1(title, options_1);
+    }
+    return _showNotification_2(title);
+  }
+  @JSName('showNotification')
+  @DomName('ServiceWorkerRegistration.showNotification')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _showNotification_1(title, options) native;
+  @JSName('showNotification')
+  @DomName('ServiceWorkerRegistration.showNotification')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _showNotification_2(title) native;
+
   @DomName('ServiceWorkerRegistration.unregister')
   @DocsEditable()
   @Experimental() // untriaged
   Future unregister() native;
+
+  @DomName('ServiceWorkerRegistration.update')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void update() native;
 }
 // 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
@@ -27731,6 +30091,11 @@
   @DocsEditable()
   final Element activeElement;
 
+  @DomName('ShadowRoot.delegatesFocus')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool delegatesFocus;
+
   @DomName('ShadowRoot.host')
   @DocsEditable()
   @Experimental() // untriaged
@@ -27762,17 +30127,10 @@
   @DocsEditable()
   Element elementFromPoint(int x, int y) native;
 
-  @DomName('ShadowRoot.getElementsByClassName')
+  @DomName('ShadowRoot.elementsFromPoint')
   @DocsEditable()
-  @Creates('NodeList|HtmlCollection')
-  @Returns('NodeList|HtmlCollection')
-  List<Node> getElementsByClassName(String className) native;
-
-  @DomName('ShadowRoot.getElementsByTagName')
-  @DocsEditable()
-  @Creates('NodeList|HtmlCollection')
-  @Returns('NodeList|HtmlCollection')
-  List<Node> getElementsByTagName(String tagName) native;
+  @Experimental() // untriaged
+  List<Element> elementsFromPoint(int x, int y) native;
 
   @DomName('ShadowRoot.getSelection')
   @DocsEditable()
@@ -27823,6 +30181,24 @@
 
 
 @DocsEditable()
+@DomName('SharedArrayBuffer')
+@Experimental() // untriaged
+@Native("SharedArrayBuffer")
+class SharedArrayBuffer extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory SharedArrayBuffer._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('SharedArrayBuffer.byteLength')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int byteLength;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('SharedWorker')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#shared-workers-and-the-sharedworker-interface
 @Experimental()
@@ -27933,6 +30309,11 @@
   @DocsEditable()
   num timestampOffset;
 
+  @DomName('SourceBuffer.trackDefaults')
+  @DocsEditable()
+  @Experimental() // untriaged
+  TrackDefaultList trackDefaults;
+
   @DomName('SourceBuffer.updating')
   @DocsEditable()
   @Experimental() // untriaged
@@ -28051,11 +30432,6 @@
    */
   SourceElement.created() : super.created();
 
-  @DomName('HTMLSourceElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String integrity;
-
   @DomName('HTMLSourceElement.media')
   @DocsEditable()
   String media;
@@ -28370,6 +30746,11 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', '!!(window.SpeechRecognition || window.webkitSpeechRecognition)');
 
+  @DomName('SpeechRecognition.audioTrack')
+  @DocsEditable()
+  @Experimental() // untriaged
+  MediaStreamTrack audioTrack;
+
   @DomName('SpeechRecognition.continuous')
   @DocsEditable()
   bool continuous;
@@ -28390,6 +30771,12 @@
   @DocsEditable()
   int maxAlternatives;
 
+  @JSName('serviceURI')
+  @DomName('SpeechRecognition.serviceURI')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String serviceUri;
+
   @DomName('SpeechRecognition.abort')
   @DocsEditable()
   void abort() native;
@@ -28500,6 +30887,18 @@
   // To suppress missing implicit constructor warnings.
   factory SpeechRecognitionError._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('SpeechRecognitionError.SpeechRecognitionError')
+  @DocsEditable()
+  factory SpeechRecognitionError(String type, [Map initDict]) {
+    if (initDict != null) {
+      var initDict_1 = convertDartToNative_Dictionary(initDict);
+      return SpeechRecognitionError._create_1(type, initDict_1);
+    }
+    return SpeechRecognitionError._create_2(type);
+  }
+  static SpeechRecognitionError _create_1(type, initDict) => JS('SpeechRecognitionError', 'new SpeechRecognitionError(#,#)', type, initDict);
+  static SpeechRecognitionError _create_2(type) => JS('SpeechRecognitionError', 'new SpeechRecognitionError(#)', type);
+
   @DomName('SpeechRecognitionError.error')
   @DocsEditable()
   final String error;
@@ -28523,6 +30922,18 @@
   // To suppress missing implicit constructor warnings.
   factory SpeechRecognitionEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('SpeechRecognitionEvent.SpeechRecognitionEvent')
+  @DocsEditable()
+  factory SpeechRecognitionEvent(String type, [Map initDict]) {
+    if (initDict != null) {
+      var initDict_1 = convertDartToNative_Dictionary(initDict);
+      return SpeechRecognitionEvent._create_1(type, initDict_1);
+    }
+    return SpeechRecognitionEvent._create_2(type);
+  }
+  static SpeechRecognitionEvent _create_1(type, initDict) => JS('SpeechRecognitionEvent', 'new SpeechRecognitionEvent(#,#)', type, initDict);
+  static SpeechRecognitionEvent _create_2(type) => JS('SpeechRecognitionEvent', 'new SpeechRecognitionEvent(#)', type);
+
   @DomName('SpeechRecognitionEvent.emma')
   @DocsEditable()
   final Document emma;
@@ -28639,6 +31050,11 @@
   @DomName('SpeechSynthesisEvent.name')
   @DocsEditable()
   final String name;
+
+  @DomName('SpeechSynthesisEvent.utterance')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final SpeechSynthesisUtterance utterance;
 }
 // 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
@@ -28835,6 +31251,52 @@
 // BSD-style license that can be found in the LICENSE file.
 
 
+@DocsEditable()
+@DomName('StashedMessagePort')
+@Experimental() // untriaged
+@Native("StashedMessagePort")
+class StashedMessagePort extends MessagePort {
+  // To suppress missing implicit constructor warnings.
+  factory StashedMessagePort._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('StashedMessagePort.name')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String name;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('StashedPortCollection')
+@Experimental() // untriaged
+@Native("StashedPortCollection")
+class StashedPortCollection extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory StashedPortCollection._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('StashedPortCollection.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+  @DomName('StashedPortCollection.add')
+  @DocsEditable()
+  @Experimental() // untriaged
+  StashedMessagePort add(String name, MessagePort port) native;
+
+  @DomName('StashedPortCollection.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+}
+// 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.
+
+
 /**
  * The type used by the
  * [Window.localStorage] and [Window.sessionStorage] properties.
@@ -28995,8 +31457,18 @@
         newValue, url, storageArea);
     return e;
   }
-  // To suppress missing implicit constructor warnings.
-  factory StorageEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('StorageEvent.StorageEvent')
+  @DocsEditable()
+  factory StorageEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return StorageEvent._create_1(type, eventInitDict_1);
+    }
+    return StorageEvent._create_2(type);
+  }
+  static StorageEvent _create_1(type, eventInitDict) => JS('StorageEvent', 'new StorageEvent(#,#)', type, eventInitDict);
+  static StorageEvent _create_2(type) => JS('StorageEvent', 'new StorageEvent(#)', type);
 
   @DomName('StorageEvent.key')
   @DocsEditable()
@@ -29216,6 +31688,104 @@
 
 
 @DocsEditable()
+@DomName('SyncEvent')
+@Experimental() // untriaged
+@Native("SyncEvent")
+class SyncEvent extends ExtendableEvent {
+  // To suppress missing implicit constructor warnings.
+  factory SyncEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('SyncEvent.SyncEvent')
+  @DocsEditable()
+  factory SyncEvent(String type, Map init) {
+    var init_1 = convertDartToNative_Dictionary(init);
+    return SyncEvent._create_1(type, init_1);
+  }
+  static SyncEvent _create_1(type, init) => JS('SyncEvent', 'new SyncEvent(#,#)', type, init);
+
+  @DomName('SyncEvent.registration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final SyncRegistration registration;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('SyncManager')
+@Experimental() // untriaged
+@Native("SyncManager")
+class SyncManager extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory SyncManager._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('SyncManager.getRegistration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistration(String tag) native;
+
+  @DomName('SyncManager.getRegistrations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistrations() native;
+
+  @DomName('SyncManager.permissionState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future permissionState() native;
+
+  @DomName('SyncManager.register')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future register([Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _register_1(options_1);
+    }
+    return _register_2();
+  }
+  @JSName('register')
+  @DomName('SyncManager.register')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _register_1(options) native;
+  @JSName('register')
+  @DomName('SyncManager.register')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _register_2() native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('SyncRegistration')
+@Experimental() // untriaged
+@Native("SyncRegistration")
+class SyncRegistration extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory SyncRegistration._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('SyncRegistration.tag')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String tag;
+
+  @DomName('SyncRegistration.unregister')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future unregister() native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('HTMLTableCaptionElement')
 @Native("HTMLTableCaptionElement")
 class TableCaptionElement extends HtmlElement {
@@ -29661,6 +32231,11 @@
    */
   TextAreaElement.created() : super.created();
 
+  @DomName('HTMLTextAreaElement.autocapitalize')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String autocapitalize;
+
   @DomName('HTMLTextAreaElement.autofocus')
   @DocsEditable()
   bool autofocus;
@@ -29703,6 +32278,11 @@
   @DocsEditable()
   int maxLength;
 
+  @DomName('HTMLTextAreaElement.minLength')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int minLength;
+
   @DomName('HTMLTextAreaElement.name')
   @DocsEditable()
   String name;
@@ -29767,6 +32347,11 @@
   @DocsEditable()
   bool checkValidity() native;
 
+  @DomName('HTMLTextAreaElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() native;
+
   @DomName('HTMLTextAreaElement.select')
   @DocsEditable()
   void select() native;
@@ -30240,69 +32825,6 @@
 
 
 @DocsEditable()
-@DomName('Timing')
-@Experimental() // untriaged
-@Native("Timing")
-class Timing extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory Timing._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('Timing.delay')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num delay;
-
-  @DomName('Timing.direction')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String direction;
-
-  @DomName('Timing.easing')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String easing;
-
-  @DomName('Timing.endDelay')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num endDelay;
-
-  @DomName('Timing.fill')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String fill;
-
-  @DomName('Timing.iterationStart')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num iterationStart;
-
-  @DomName('Timing.iterations')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num iterations;
-
-  @DomName('Timing.playbackRate')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num playbackRate;
-
-  @DomName('Timing.__getter__')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Object __getter__(String name) native;
-
-  @DomName('Timing.__setter__')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void __setter__(String name, num duration) native;
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('HTMLTitleElement')
 @Native("HTMLTitleElement")
 class TitleElement extends HtmlElement {
@@ -30374,6 +32896,11 @@
   @Experimental() // untriaged
   final double _radiusY;
 
+  @DomName('Touch.rotationAngle')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double rotationAngle;
+
   @JSName('screenX')
   @DomName('Touch.screenX')
   @DocsEditable()
@@ -30394,14 +32921,6 @@
   @Returns('Element|Document')
   final dynamic _get_target;
 
-  @JSName('webkitRotationAngle')
-  @DomName('Touch.webkitRotationAngle')
-  @DocsEditable()
-  @SupportedBrowser(SupportedBrowser.CHROME)
-  @SupportedBrowser(SupportedBrowser.SAFARI)
-  @Experimental()
-  final double rotationAngle;
-
 
 // As of Chrome 37, these all changed from long to double.  This code
 // preserves backwards compatability for the time being.
@@ -30593,6 +33112,91 @@
 
 
 @DocsEditable()
+@DomName('TrackDefault')
+@Experimental() // untriaged
+@Native("TrackDefault")
+class TrackDefault extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory TrackDefault._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('TrackDefault.TrackDefault')
+  @DocsEditable()
+  factory TrackDefault(String type, String language, String label, List<String> kinds, [String byteStreamTrackID]) {
+    if (byteStreamTrackID != null) {
+      List kinds_1 = convertDartToNative_StringArray(kinds);
+      return TrackDefault._create_1(type, language, label, kinds_1, byteStreamTrackID);
+    }
+    List kinds_1 = convertDartToNative_StringArray(kinds);
+    return TrackDefault._create_2(type, language, label, kinds_1);
+  }
+  static TrackDefault _create_1(type, language, label, kinds, byteStreamTrackID) => JS('TrackDefault', 'new TrackDefault(#,#,#,#,#)', type, language, label, kinds, byteStreamTrackID);
+  static TrackDefault _create_2(type, language, label, kinds) => JS('TrackDefault', 'new TrackDefault(#,#,#,#)', type, language, label, kinds);
+
+  @DomName('TrackDefault.byteStreamTrackID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String byteStreamTrackID;
+
+  @DomName('TrackDefault.kinds')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final List<String> kinds;
+
+  @DomName('TrackDefault.label')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String label;
+
+  @DomName('TrackDefault.language')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String language;
+
+  @DomName('TrackDefault.type')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String type;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('TrackDefaultList')
+@Experimental() // untriaged
+@Native("TrackDefaultList")
+class TrackDefaultList extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory TrackDefaultList._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('TrackDefaultList.TrackDefaultList')
+  @DocsEditable()
+  factory TrackDefaultList([List<TrackDefault> trackDefaults]) {
+    if (trackDefaults != null) {
+      return TrackDefaultList._create_1(trackDefaults);
+    }
+    return TrackDefaultList._create_2();
+  }
+  static TrackDefaultList _create_1(trackDefaults) => JS('TrackDefaultList', 'new TrackDefaultList(#)', trackDefaults);
+  static TrackDefaultList _create_2() => JS('TrackDefaultList', 'new TrackDefaultList()');
+
+  @DomName('TrackDefaultList.length')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int length;
+
+  @DomName('TrackDefaultList.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  TrackDefault item(int index) native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('HTMLTrackElement')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @SupportedBrowser(SupportedBrowser.IE, '10')
@@ -30638,11 +33242,6 @@
   @DocsEditable()
   bool defaultValue;
 
-  @DomName('HTMLTrackElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String integrity;
-
   @DomName('HTMLTrackElement.kind')
   @DocsEditable()
   String kind;
@@ -30680,6 +33279,18 @@
   // To suppress missing implicit constructor warnings.
   factory TrackEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('TrackEvent.TrackEvent')
+  @DocsEditable()
+  factory TrackEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return TrackEvent._create_1(type, eventInitDict_1);
+    }
+    return TrackEvent._create_2(type);
+  }
+  static TrackEvent _create_1(type, eventInitDict) => JS('TrackEvent', 'new TrackEvent(#,#)', type, eventInitDict);
+  static TrackEvent _create_2(type) => JS('TrackEvent', 'new TrackEvent(#)', type);
+
   @DomName('TrackEvent.track')
   @DocsEditable()
   @Creates('Null')
@@ -30697,6 +33308,18 @@
   // To suppress missing implicit constructor warnings.
   factory TransitionEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('TransitionEvent.TransitionEvent')
+  @DocsEditable()
+  factory TransitionEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return TransitionEvent._create_1(type, eventInitDict_1);
+    }
+    return TransitionEvent._create_2(type);
+  }
+  static TransitionEvent _create_1(type, eventInitDict) => JS('TransitionEvent', 'new TransitionEvent(#,#)', type, eventInitDict);
+  static TransitionEvent _create_2(type) => JS('TransitionEvent', 'new TransitionEvent(#)', type);
+
   @DomName('TransitionEvent.elapsedTime')
   @DocsEditable()
   final double elapsedTime;
@@ -30795,8 +33418,18 @@
     e._initUIEvent(type, canBubble, cancelable, view, detail);
     return e;
   }
-  // To suppress missing implicit constructor warnings.
-  factory UIEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('UIEvent.UIEvent')
+  @DocsEditable()
+  factory UIEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return UIEvent._create_1(type, eventInitDict_1);
+    }
+    return UIEvent._create_2(type);
+  }
+  static UIEvent _create_1(type, eventInitDict) => JS('UIEvent', 'new UIEvent(#,#)', type, eventInitDict);
+  static UIEvent _create_2(type) => JS('UIEvent', 'new UIEvent(#)', type);
 
   @JSName('charCode')
   @DomName('UIEvent.charCode')
@@ -30814,33 +33447,10 @@
   @Unstable()
   final int _keyCode;
 
-  @JSName('layerX')
-  @DomName('UIEvent.layerX')
+  @DomName('UIEvent.sourceDevice')
   @DocsEditable()
-  // http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents
-  @Experimental() // nonstandard
-  final int _layerX;
-
-  @JSName('layerY')
-  @DomName('UIEvent.layerY')
-  @DocsEditable()
-  // http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents
-  @Experimental() // nonstandard
-  final int _layerY;
-
-  @JSName('pageX')
-  @DomName('UIEvent.pageX')
-  @DocsEditable()
-  // http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents
-  @Experimental() // nonstandard
-  final int _pageX;
-
-  @JSName('pageY')
-  @DomName('UIEvent.pageY')
-  @DocsEditable()
-  // http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents
-  @Experimental() // nonstandard
-  final int _pageY;
+  @Experimental() // untriaged
+  final InputDevice sourceDevice;
 
   @DomName('UIEvent.view')
   @DocsEditable()
@@ -30852,24 +33462,17 @@
   @Returns('Window|=Object')
   final dynamic _get_view;
 
+  @JSName('which')
   @DomName('UIEvent.which')
   @DocsEditable()
   @Unstable()
-  final int which;
+  final int _which;
 
   @JSName('initUIEvent')
   @DomName('UIEvent.initUIEvent')
   @DocsEditable()
-  void _initUIEvent(String type, bool canBubble, bool cancelable, Window view, int detail) native;
+  void _initUIEvent(String type, bool bubbles, bool cancelable, Window view, int detail) native;
 
-
-  @DomName('UIEvent.layerX')
-  @DomName('UIEvent.layerY')
-  Point get layer => new Point(_layerX, _layerY);
-
-  @DomName('UIEvent.pageX')
-  @DomName('UIEvent.pageY')
-  Point get page => new Point(_pageX, _pageY);
 }
 // 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
@@ -31077,6 +33680,170 @@
 
 
 @DocsEditable()
+@DomName('VRDevice')
+@Experimental() // untriaged
+@Native("VRDevice")
+class VRDevice extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory VRDevice._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('VRDevice.deviceId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String deviceId;
+
+  @DomName('VRDevice.deviceName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String deviceName;
+
+  @DomName('VRDevice.hardwareUnitId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String hardwareUnitId;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('VREyeParameters')
+@Experimental() // untriaged
+@Native("VREyeParameters")
+class VREyeParameters extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory VREyeParameters._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('VREyeParameters.currentFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final VRFieldOfView currentFieldOfView;
+
+  @DomName('VREyeParameters.eyeTranslation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final DomPoint eyeTranslation;
+
+  @DomName('VREyeParameters.maximumFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final VRFieldOfView maximumFieldOfView;
+
+  @DomName('VREyeParameters.minimumFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final VRFieldOfView minimumFieldOfView;
+
+  @DomName('VREyeParameters.recommendedFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final VRFieldOfView recommendedFieldOfView;
+
+  @DomName('VREyeParameters.renderRect')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final _DomRect renderRect;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('VRFieldOfView')
+@Experimental() // untriaged
+@Native("VRFieldOfView")
+class VRFieldOfView extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory VRFieldOfView._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('VRFieldOfView.VRFieldOfView')
+  @DocsEditable()
+  factory VRFieldOfView([Map fov]) {
+    if (fov != null) {
+      var fov_1 = convertDartToNative_Dictionary(fov);
+      return VRFieldOfView._create_1(fov_1);
+    }
+    return VRFieldOfView._create_2();
+  }
+  static VRFieldOfView _create_1(fov) => JS('VRFieldOfView', 'new VRFieldOfView(#)', fov);
+  static VRFieldOfView _create_2() => JS('VRFieldOfView', 'new VRFieldOfView()');
+
+  @DomName('VRFieldOfView.downDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num downDegrees;
+
+  @DomName('VRFieldOfView.leftDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num leftDegrees;
+
+  @DomName('VRFieldOfView.rightDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num rightDegrees;
+
+  @DomName('VRFieldOfView.upDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num upDegrees;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('VRPositionState')
+@Experimental() // untriaged
+@Native("VRPositionState")
+class VRPositionState extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory VRPositionState._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('VRPositionState.angularAcceleration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final DomPoint angularAcceleration;
+
+  @DomName('VRPositionState.angularVelocity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final DomPoint angularVelocity;
+
+  @DomName('VRPositionState.linearAcceleration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final DomPoint linearAcceleration;
+
+  @DomName('VRPositionState.linearVelocity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final DomPoint linearVelocity;
+
+  @DomName('VRPositionState.orientation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final DomPoint orientation;
+
+  @DomName('VRPositionState.position')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final DomPoint position;
+
+  @DomName('VRPositionState.timeStamp')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final double timeStamp;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('ValidityState')
 @Native("ValidityState")
 class ValidityState extends Interceptor {
@@ -31111,6 +33878,11 @@
   @DocsEditable()
   final bool tooLong;
 
+  @DomName('ValidityState.tooShort')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool tooShort;
+
   @DomName('ValidityState.typeMismatch')
   @DocsEditable()
   final bool typeMismatch;
@@ -31357,12 +34129,16 @@
   @DomName('VTTCue.line')
   @DocsEditable()
   @Experimental() // untriaged
-  int line;
+  @Creates('Null')
+  @Returns('num|String')
+  Object line;
 
   @DomName('VTTCue.position')
   @DocsEditable()
   @Experimental() // untriaged
-  int position;
+  @Creates('Null')
+  @Returns('num|String')
+  Object position;
 
   @DomName('VTTCue.regionId')
   @DocsEditable()
@@ -31372,7 +34148,7 @@
   @DomName('VTTCue.size')
   @DocsEditable()
   @Experimental() // untriaged
-  int size;
+  num size;
 
   @DomName('VTTCue.snapToLines')
   @DocsEditable()
@@ -31581,22 +34357,14 @@
 
   @DomName('WebSocket.WebSocket')
   @DocsEditable()
-  factory WebSocket(String url, [protocol_OR_protocols]) {
-    if ((url is String || url == null) && protocol_OR_protocols == null) {
-      return WebSocket._create_1(url);
+  factory WebSocket(String url, [Object protocols]) {
+    if (protocols != null) {
+      return WebSocket._create_1(url, protocols);
     }
-    if ((protocol_OR_protocols is String || protocol_OR_protocols == null) && (url is String || url == null)) {
-      return WebSocket._create_2(url, protocol_OR_protocols);
-    }
-    if ((protocol_OR_protocols is List<String> || protocol_OR_protocols == null) && (url is String || url == null)) {
-      List protocols_1 = convertDartToNative_StringArray(protocol_OR_protocols);
-      return WebSocket._create_3(url, protocols_1);
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return WebSocket._create_2(url);
   }
-  static WebSocket _create_1(url) => JS('WebSocket', 'new WebSocket(#)', url);
-  static WebSocket _create_2(url, protocol_OR_protocols) => JS('WebSocket', 'new WebSocket(#,#)', url, protocol_OR_protocols);
-  static WebSocket _create_3(url, protocol_OR_protocols) => JS('WebSocket', 'new WebSocket(#,#)', url, protocol_OR_protocols);
+  static WebSocket _create_1(url, protocols) => JS('WebSocket', 'new WebSocket(#,#)', url, protocols);
+  static WebSocket _create_2(url) => JS('WebSocket', 'new WebSocket(#)', url);
 
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', 'typeof window.WebSocket != "undefined"');
@@ -31771,8 +34539,18 @@
 
   }
 
-  // To suppress missing implicit constructor warnings.
-  factory WheelEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('WheelEvent.WheelEvent')
+  @DocsEditable()
+  factory WheelEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return WheelEvent._create_1(type, eventInitDict_1);
+    }
+    return WheelEvent._create_2(type);
+  }
+  static WheelEvent _create_1(type, eventInitDict) => JS('WheelEvent', 'new WheelEvent(#,#)', type, eventInitDict);
+  static WheelEvent _create_2(type) => JS('WheelEvent', 'new WheelEvent(#)', type);
 
   @DomName('WheelEvent.DOM_DELTA_LINE')
   @DocsEditable()
@@ -32037,7 +34815,7 @@
    * for the animation to continue.
    */
   @DomName('Window.requestAnimationFrame')
-  int requestAnimationFrame(RequestAnimationFrameCallback callback) {
+  int requestAnimationFrame(FrameRequestCallback callback) {
     _ensureRequestAnimationFrame();
     return _requestAnimationFrame(_wrapZone(callback));
   }
@@ -32056,7 +34834,7 @@
   }
 
   @JSName('requestAnimationFrame')
-  int _requestAnimationFrame(RequestAnimationFrameCallback callback) native;
+  int _requestAnimationFrame(FrameRequestCallback callback) native;
 
   @JSName('cancelAnimationFrame')
   void _cancelAnimationFrame(int id) native;
@@ -32332,18 +35110,6 @@
   @Experimental()
   static const int TEMPORARY = 0;
 
-  @JSName('CSS')
-  /**
-   * Entrypoint for CSS-related functions.
-   *
-   * ## Other resources
-   *
-   * * [The CSS interface](http://dev.w3.org/csswg/css-conditional/#the-css-interface) from W3C.
-   */
-  @DomName('Window.CSS')
-  @DocsEditable()
-  final Css css;
-
   /**
    * The application cache for this window.
    *
@@ -32360,6 +35126,11 @@
   @DocsEditable()
   final ApplicationCache applicationCache;
 
+  @DomName('Window.caches')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final CacheStorage caches;
+
   @DomName('Window.closed')
   @DocsEditable()
   final bool closed;
@@ -32896,6 +35667,27 @@
   @DocsEditable()
   bool confirm([String message]) native;
 
+  @DomName('Window.fetch')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future fetch(/*RequestInfo*/ input, [Map init]) {
+    if (init != null) {
+      var init_1 = convertDartToNative_Dictionary(init);
+      return _fetch_1(input, init_1);
+    }
+    return _fetch_2(input);
+  }
+  @JSName('fetch')
+  @DomName('Window.fetch')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _fetch_1(input, init) native;
+  @JSName('fetch')
+  @DomName('Window.fetch')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _fetch_2(input) native;
+
   /**
    * Finds text in this window.
    *
@@ -32912,7 +35704,7 @@
   @JSName('getComputedStyle')
   @DomName('Window.getComputedStyle')
   @DocsEditable()
-  CssStyleDeclaration _getComputedStyle(Element element, String pseudoElement) native;
+  CssStyleDeclaration _getComputedStyle(Element elt, String pseudoElt) native;
 
   @JSName('getMatchedCSSRules')
   /**
@@ -32965,12 +35757,12 @@
    */
   @DomName('Window.moveBy')
   @DocsEditable()
-  void moveBy(num x, num y) native;
+  void moveBy(int x, int y) native;
 
   @JSName('moveTo')
   @DomName('Window.moveTo')
   @DocsEditable()
-  void _moveTo(num x, num y) native;
+  void _moveTo(int x, int y) native;
 
   /// *Deprecated.*
   @DomName('Window.openDatabase')
@@ -32985,7 +35777,7 @@
 
   @DomName('Window.postMessage')
   @DocsEditable()
-  void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List<MessagePort> transfer]) {
+  void postMessage(/*any*/ message, String targetOrigin, [List<MessagePort> transfer]) {
     if (transfer != null) {
       var message_1 = convertDartToNative_SerializedScriptValue(message);
       _postMessage_1(message_1, targetOrigin, transfer);
@@ -33026,7 +35818,7 @@
    */
   @DomName('Window.resizeBy')
   @DocsEditable()
-  void resizeBy(num x, num y) native;
+  void resizeBy(int x, int y) native;
 
   /**
    * Resizes this window to a specific width and height.
@@ -33038,7 +35830,7 @@
    */
   @DomName('Window.resizeTo')
   @DocsEditable()
-  void resizeTo(num width, num height) native;
+  void resizeTo(int x, int y) native;
 
   /**
    * Scrolls the page horizontally and vertically to a specific point.
@@ -33052,23 +35844,27 @@
    */
   @DomName('Window.scroll')
   @DocsEditable()
-  void scroll(x, y, [Map scrollOptions]) {
-    if ((y is num) && (x is num) && scrollOptions == null) {
-      _scroll_1(x, y);
+  void scroll([options_OR_x, y, Map scrollOptions]) {
+    if (options_OR_x == null && y == null && scrollOptions == null) {
+      _scroll_1();
       return;
     }
-    if (scrollOptions != null && (y is num) && (x is num)) {
+    if ((options_OR_x is Map) && y == null && scrollOptions == null) {
+      var options_1 = convertDartToNative_Dictionary(options_OR_x);
+      _scroll_2(options_1);
+      return;
+    }
+    if ((y is num) && (options_OR_x is num) && scrollOptions == null) {
+      _scroll_3(options_OR_x, y);
+      return;
+    }
+    if ((y is int) && (options_OR_x is int) && scrollOptions == null) {
+      _scroll_4(options_OR_x, y);
+      return;
+    }
+    if (scrollOptions != null && (y is int) && (options_OR_x is int)) {
       var scrollOptions_1 = convertDartToNative_Dictionary(scrollOptions);
-      _scroll_2(x, y, scrollOptions_1);
-      return;
-    }
-    if ((y is int) && (x is int) && scrollOptions == null) {
-      _scroll_3(x, y);
-      return;
-    }
-    if (scrollOptions != null && (y is int) && (x is int)) {
-      var scrollOptions_1 = convertDartToNative_Dictionary(scrollOptions);
-      _scroll_4(x, y, scrollOptions_1);
+      _scroll_5(options_OR_x, y, scrollOptions_1);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -33086,7 +35882,7 @@
    */
   @DomName('Window.scroll')
   @DocsEditable()
-  void _scroll_1(num x, num y) native;
+  void _scroll_1() native;
   @JSName('scroll')
   /**
    * Scrolls the page horizontally and vertically to a specific point.
@@ -33100,7 +35896,7 @@
    */
   @DomName('Window.scroll')
   @DocsEditable()
-  void _scroll_2(num x, num y, scrollOptions) native;
+  void _scroll_2(options) native;
   @JSName('scroll')
   /**
    * Scrolls the page horizontally and vertically to a specific point.
@@ -33114,7 +35910,7 @@
    */
   @DomName('Window.scroll')
   @DocsEditable()
-  void _scroll_3(int x, int y) native;
+  void _scroll_3(num x, num y) native;
   @JSName('scroll')
   /**
    * Scrolls the page horizontally and vertically to a specific point.
@@ -33128,7 +35924,21 @@
    */
   @DomName('Window.scroll')
   @DocsEditable()
-  void _scroll_4(int x, int y, scrollOptions) native;
+  void _scroll_4(int x, int y) native;
+  @JSName('scroll')
+  /**
+   * Scrolls the page horizontally and vertically to a specific point.
+   *
+   * This method is identical to [scrollTo].
+   *
+   * ## Other resources
+   *
+   * * [Window scroll](http://docs.webplatform.org/wiki/dom/methods/scroll)
+   *   from WebPlatform.org.
+   */
+  @DomName('Window.scroll')
+  @DocsEditable()
+  void _scroll_5(int x, int y, scrollOptions) native;
 
   /**
    * Scrolls the page horizontally and vertically by an offset.
@@ -33140,23 +35950,27 @@
    */
   @DomName('Window.scrollBy')
   @DocsEditable()
-  void scrollBy(x, y, [Map scrollOptions]) {
-    if ((y is num) && (x is num) && scrollOptions == null) {
-      _scrollBy_1(x, y);
+  void scrollBy([options_OR_x, y, Map scrollOptions]) {
+    if (options_OR_x == null && y == null && scrollOptions == null) {
+      _scrollBy_1();
       return;
     }
-    if (scrollOptions != null && (y is num) && (x is num)) {
+    if ((options_OR_x is Map) && y == null && scrollOptions == null) {
+      var options_1 = convertDartToNative_Dictionary(options_OR_x);
+      _scrollBy_2(options_1);
+      return;
+    }
+    if ((y is num) && (options_OR_x is num) && scrollOptions == null) {
+      _scrollBy_3(options_OR_x, y);
+      return;
+    }
+    if ((y is int) && (options_OR_x is int) && scrollOptions == null) {
+      _scrollBy_4(options_OR_x, y);
+      return;
+    }
+    if (scrollOptions != null && (y is int) && (options_OR_x is int)) {
       var scrollOptions_1 = convertDartToNative_Dictionary(scrollOptions);
-      _scrollBy_2(x, y, scrollOptions_1);
-      return;
-    }
-    if ((y is int) && (x is int) && scrollOptions == null) {
-      _scrollBy_3(x, y);
-      return;
-    }
-    if (scrollOptions != null && (y is int) && (x is int)) {
-      var scrollOptions_1 = convertDartToNative_Dictionary(scrollOptions);
-      _scrollBy_4(x, y, scrollOptions_1);
+      _scrollBy_5(options_OR_x, y, scrollOptions_1);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -33172,7 +35986,7 @@
    */
   @DomName('Window.scrollBy')
   @DocsEditable()
-  void _scrollBy_1(num x, num y) native;
+  void _scrollBy_1() native;
   @JSName('scrollBy')
   /**
    * Scrolls the page horizontally and vertically by an offset.
@@ -33184,7 +35998,7 @@
    */
   @DomName('Window.scrollBy')
   @DocsEditable()
-  void _scrollBy_2(num x, num y, scrollOptions) native;
+  void _scrollBy_2(options) native;
   @JSName('scrollBy')
   /**
    * Scrolls the page horizontally and vertically by an offset.
@@ -33196,7 +36010,7 @@
    */
   @DomName('Window.scrollBy')
   @DocsEditable()
-  void _scrollBy_3(int x, int y) native;
+  void _scrollBy_3(num x, num y) native;
   @JSName('scrollBy')
   /**
    * Scrolls the page horizontally and vertically by an offset.
@@ -33208,7 +36022,19 @@
    */
   @DomName('Window.scrollBy')
   @DocsEditable()
-  void _scrollBy_4(int x, int y, scrollOptions) native;
+  void _scrollBy_4(int x, int y) native;
+  @JSName('scrollBy')
+  /**
+   * Scrolls the page horizontally and vertically by an offset.
+   *
+   * ## Other resources
+   *
+   * * [Window scrollBy](http://docs.webplatform.org/wiki/dom/methods/scrollBy)
+   *   from WebPlatform.org.
+   */
+  @DomName('Window.scrollBy')
+  @DocsEditable()
+  void _scrollBy_5(int x, int y, scrollOptions) native;
 
   /**
    * Scrolls the page horizontally and vertically to a specific point.
@@ -33222,23 +36048,27 @@
    */
   @DomName('Window.scrollTo')
   @DocsEditable()
-  void scrollTo(x, y, [Map scrollOptions]) {
-    if ((y is num) && (x is num) && scrollOptions == null) {
-      _scrollTo_1(x, y);
+  void scrollTo([options_OR_x, y, Map scrollOptions]) {
+    if (options_OR_x == null && y == null && scrollOptions == null) {
+      _scrollTo_1();
       return;
     }
-    if (scrollOptions != null && (y is num) && (x is num)) {
+    if ((options_OR_x is Map) && y == null && scrollOptions == null) {
+      var options_1 = convertDartToNative_Dictionary(options_OR_x);
+      _scrollTo_2(options_1);
+      return;
+    }
+    if ((y is num) && (options_OR_x is num) && scrollOptions == null) {
+      _scrollTo_3(options_OR_x, y);
+      return;
+    }
+    if ((y is int) && (options_OR_x is int) && scrollOptions == null) {
+      _scrollTo_4(options_OR_x, y);
+      return;
+    }
+    if (scrollOptions != null && (y is int) && (options_OR_x is int)) {
       var scrollOptions_1 = convertDartToNative_Dictionary(scrollOptions);
-      _scrollTo_2(x, y, scrollOptions_1);
-      return;
-    }
-    if ((y is int) && (x is int) && scrollOptions == null) {
-      _scrollTo_3(x, y);
-      return;
-    }
-    if (scrollOptions != null && (y is int) && (x is int)) {
-      var scrollOptions_1 = convertDartToNative_Dictionary(scrollOptions);
-      _scrollTo_4(x, y, scrollOptions_1);
+      _scrollTo_5(options_OR_x, y, scrollOptions_1);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -33256,7 +36086,7 @@
    */
   @DomName('Window.scrollTo')
   @DocsEditable()
-  void _scrollTo_1(num x, num y) native;
+  void _scrollTo_1() native;
   @JSName('scrollTo')
   /**
    * Scrolls the page horizontally and vertically to a specific point.
@@ -33270,7 +36100,7 @@
    */
   @DomName('Window.scrollTo')
   @DocsEditable()
-  void _scrollTo_2(num x, num y, scrollOptions) native;
+  void _scrollTo_2(options) native;
   @JSName('scrollTo')
   /**
    * Scrolls the page horizontally and vertically to a specific point.
@@ -33284,7 +36114,7 @@
    */
   @DomName('Window.scrollTo')
   @DocsEditable()
-  void _scrollTo_3(int x, int y) native;
+  void _scrollTo_3(num x, num y) native;
   @JSName('scrollTo')
   /**
    * Scrolls the page horizontally and vertically to a specific point.
@@ -33298,21 +36128,21 @@
    */
   @DomName('Window.scrollTo')
   @DocsEditable()
-  void _scrollTo_4(int x, int y, scrollOptions) native;
-
+  void _scrollTo_4(int x, int y) native;
+  @JSName('scrollTo')
   /**
-   * Opens a new page as a modal dialog.
+   * Scrolls the page horizontally and vertically to a specific point.
+   *
+   * This method is identical to [scroll].
    *
    * ## Other resources
    *
-   * * [Dialogs implemented using separate
-   *   documents](http://www.w3.org/html/wg/drafts/html/master/webappapis.html#dialogs-implemented-using-separate-documents)
-   *   from W3C.
+   * * [Window scrollTo](http://docs.webplatform.org/wiki/dom/methods/scrollTo)
+   *   from WebPlatform.org.
    */
-  @DomName('Window.showModalDialog')
+  @DomName('Window.scrollTo')
   @DocsEditable()
-  @Creates('Null')
-  Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) native;
+  void _scrollTo_5(int x, int y, scrollOptions) native;
 
   /**
    * Stops the window from loading.
@@ -33393,33 +36223,43 @@
 
   @DomName('Window.atob')
   @DocsEditable()
-  String atob(String string) native;
+  String atob(String atob) native;
 
   @DomName('Window.btoa')
   @DocsEditable()
-  String btoa(String string) native;
+  String btoa(String btoa) native;
 
   // From WindowTimers
 
-  @JSName('clearInterval')
-  @DomName('Window.clearInterval')
-  @DocsEditable()
-  void _clearInterval(int handle) native;
-
-  @JSName('clearTimeout')
-  @DomName('Window.clearTimeout')
-  @DocsEditable()
-  void _clearTimeout(int handle) native;
-
   @JSName('setInterval')
   @DomName('Window.setInterval')
   @DocsEditable()
-  int _setInterval(Object handler, int timeout) native;
+  int _setInterval_String(String handler, [int timeout, Object arguments]) native;
 
   @JSName('setTimeout')
   @DomName('Window.setTimeout')
   @DocsEditable()
-  int _setTimeout(Object handler, int timeout) native;
+  int _setTimeout_String(String handler, [int timeout, Object arguments]) native;
+
+  @JSName('clearInterval')
+  @DomName('Window.clearInterval')
+  @DocsEditable()
+  void _clearInterval([int handle]) native;
+
+  @JSName('clearTimeout')
+  @DomName('Window.clearTimeout')
+  @DocsEditable()
+  void _clearTimeout([int handle]) native;
+
+  @JSName('setInterval')
+  @DomName('Window.setInterval')
+  @DocsEditable()
+  int _setInterval(Object handler, [int timeout]) native;
+
+  @JSName('setTimeout')
+  @DomName('Window.setTimeout')
+  @DocsEditable()
+  int _setTimeout(Object handler, [int timeout]) native;
 
   /// Stream of `contentloaded` events handled by this [Window].
   @DomName('Window.onDOMContentLoaded')
@@ -33928,9 +36768,37 @@
   // To suppress missing implicit constructor warnings.
   factory WindowBase64._() { throw new UnsupportedError("Not supported"); }
 
-  String atob(String string);
+  String atob(String atob);
 
-  String btoa(String string);
+  String btoa(String btoa);
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('WindowClient')
+@Experimental() // untriaged
+@Native("WindowClient")
+class WindowClient extends Client {
+  // To suppress missing implicit constructor warnings.
+  factory WindowClient._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('WindowClient.focused')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final bool focused;
+
+  @DomName('WindowClient.visibilityState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String visibilityState;
+
+  @DomName('WindowClient.focus')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future focus() native;
 }
 // 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
@@ -34146,6 +37014,11 @@
   @Experimental() // untriaged
   static const int TEMPORARY = 0;
 
+  @DomName('WorkerGlobalScope.caches')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final CacheStorage caches;
+
   @DomName('WorkerGlobalScope.console')
   @DocsEditable()
   @Experimental() // untriaged
@@ -34186,6 +37059,27 @@
   @Experimental() // untriaged
   void close() native;
 
+  @DomName('WorkerGlobalScope.fetch')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future fetch(/*RequestInfo*/ input, [Map init]) {
+    if (init != null) {
+      var init_1 = convertDartToNative_Dictionary(init);
+      return _fetch_1(input, init_1);
+    }
+    return _fetch_2(input);
+  }
+  @JSName('fetch')
+  @DomName('WorkerGlobalScope.fetch')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _fetch_1(input, init) native;
+  @JSName('fetch')
+  @DomName('WorkerGlobalScope.fetch')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future _fetch_2(input) native;
+
   @DomName('WorkerGlobalScope.importScripts')
   @DocsEditable()
   @Experimental() // untriaged
@@ -34250,38 +37144,50 @@
   @DomName('WorkerGlobalScope.atob')
   @DocsEditable()
   @Experimental() // untriaged
-  String atob(String string) native;
+  String atob(String atob) native;
 
   @DomName('WorkerGlobalScope.btoa')
   @DocsEditable()
   @Experimental() // untriaged
-  String btoa(String string) native;
+  String btoa(String btoa) native;
 
   // From WindowTimers
 
-  @JSName('clearInterval')
-  @DomName('WorkerGlobalScope.clearInterval')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void _clearInterval(int handle) native;
-
-  @JSName('clearTimeout')
-  @DomName('WorkerGlobalScope.clearTimeout')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void _clearTimeout(int handle) native;
-
   @JSName('setInterval')
   @DomName('WorkerGlobalScope.setInterval')
   @DocsEditable()
   @Experimental() // untriaged
-  int _setInterval(Object handler, int timeout) native;
+  int _setInterval_String(String handler, [int timeout, Object arguments]) native;
 
   @JSName('setTimeout')
   @DomName('WorkerGlobalScope.setTimeout')
   @DocsEditable()
   @Experimental() // untriaged
-  int _setTimeout(Object handler, int timeout) native;
+  int _setTimeout_String(String handler, [int timeout, Object arguments]) native;
+
+  @JSName('clearInterval')
+  @DomName('WorkerGlobalScope.clearInterval')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _clearInterval([int handle]) native;
+
+  @JSName('clearTimeout')
+  @DomName('WorkerGlobalScope.clearTimeout')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _clearTimeout([int handle]) native;
+
+  @JSName('setInterval')
+  @DomName('WorkerGlobalScope.setInterval')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int _setInterval(Object handler, [int timeout]) native;
+
+  @JSName('setTimeout')
+  @DomName('WorkerGlobalScope.setTimeout')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int _setTimeout(Object handler, [int timeout]) native;
 
   /// Stream of `error` events handled by this [WorkerGlobalScope].
   @DomName('WorkerGlobalScope.onerror')
@@ -34298,7 +37204,7 @@
 @DomName('WorkerPerformance')
 @Experimental() // untriaged
 @Native("WorkerPerformance")
-class WorkerPerformance extends Interceptor {
+class WorkerPerformance extends EventTarget {
   // To suppress missing implicit constructor warnings.
   factory WorkerPerformance._() { throw new UnsupportedError("Not supported"); }
 
@@ -34307,10 +37213,63 @@
   @Experimental() // untriaged
   final MemoryInfo memory;
 
+  @DomName('WorkerPerformance.clearMarks')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearMarks(String markName) native;
+
+  @DomName('WorkerPerformance.clearMeasures')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearMeasures(String measureName) native;
+
+  @DomName('WorkerPerformance.getEntries')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<PerformanceEntry> getEntries() native;
+
+  @DomName('WorkerPerformance.getEntriesByName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<PerformanceEntry> getEntriesByName(String name, String entryType) native;
+
+  @DomName('WorkerPerformance.getEntriesByType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<PerformanceEntry> getEntriesByType(String entryType) native;
+
+  @DomName('WorkerPerformance.mark')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void mark(String markName) native;
+
+  @DomName('WorkerPerformance.measure')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void measure(String measureName, String startMark, String endMark) native;
+
   @DomName('WorkerPerformance.now')
   @DocsEditable()
   @Experimental() // untriaged
   double now() native;
+
+  @JSName('webkitClearResourceTimings')
+  @DomName('WorkerPerformance.webkitClearResourceTimings')
+  @DocsEditable()
+  @SupportedBrowser(SupportedBrowser.CHROME)
+  @SupportedBrowser(SupportedBrowser.SAFARI)
+  @Experimental()
+  @Experimental() // untriaged
+  void clearResourceTimings() native;
+
+  @JSName('webkitSetResourceTimingBufferSize')
+  @DomName('WorkerPerformance.webkitSetResourceTimingBufferSize')
+  @DocsEditable()
+  @SupportedBrowser(SupportedBrowser.CHROME)
+  @SupportedBrowser(SupportedBrowser.SAFARI)
+  @Experimental()
+  @Experimental() // untriaged
+  void setResourceTimingBufferSize(int maxSize) native;
 }
 // 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
@@ -34343,7 +37302,7 @@
 
   @DomName('XPathEvaluator.evaluate')
   @DocsEditable()
-  XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult) native;
+  XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, [int type, Object inResult]) native;
 }
 // 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
@@ -34361,7 +37320,7 @@
 
   @DomName('XPathExpression.evaluate')
   @DocsEditable()
-  XPathResult evaluate(Node contextNode, int type, XPathResult inResult) native;
+  XPathResult evaluate(Node contextNode, [int type, Object inResult]) native;
 }
 // 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
@@ -34508,7 +37467,7 @@
 
   @DomName('XMLSerializer.serializeToString')
   @DocsEditable()
-  String serializeToString(Node node) native;
+  String serializeToString(Node root) native;
 }
 // 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
@@ -34546,7 +37505,7 @@
 
   @DomName('XSLTProcessor.importStylesheet')
   @DocsEditable()
-  void importStylesheet(Node stylesheet) native;
+  void importStylesheet(Node style) native;
 
   @DomName('XSLTProcessor.removeParameter')
   @DocsEditable()
@@ -34566,7 +37525,7 @@
 
   @DomName('XSLTProcessor.transformToFragment')
   @DocsEditable()
-  DocumentFragment transformToFragment(Node source, Document docVal) native;
+  DocumentFragment transformToFragment(Node source, Document output) native;
 }
 // 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
@@ -34610,48 +37569,6 @@
 
 
 @DocsEditable()
-@DomName('CSSPrimitiveValue')
-// http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
-@deprecated // deprecated
-@Native("CSSPrimitiveValue")
-abstract class _CSSPrimitiveValue extends _CSSValue {
-  // To suppress missing implicit constructor warnings.
-  factory _CSSPrimitiveValue._() { throw new UnsupportedError("Not supported"); }
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('CSSUnknownRule')
-// http://dev.w3.org/csswg/cssom/#the-cssstylesheet-interface
-@deprecated // deprecated
-@Native("CSSUnknownRule")
-abstract class _CSSUnknownRule extends CssRule {
-  // To suppress missing implicit constructor warnings.
-  factory _CSSUnknownRule._() { throw new UnsupportedError("Not supported"); }
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('CSSValue')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-@Native("CSSValue")
-abstract class _CSSValue extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory _CSSValue._() { throw new UnsupportedError("Not supported"); }
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('Cache')
 @Experimental() // untriaged
 @Native("Cache")
@@ -34842,7 +37759,7 @@
 @DocsEditable()
 @DomName('ClientRectList')
 @Native("ClientRectList,DOMRectList")
-class _ClientRectList extends Interceptor with ListMixin<Rectangle>, ImmutableListMixin<Rectangle> implements List<Rectangle>, JavaScriptIndexingBehavior {
+class _ClientRectList extends Interceptor with ListMixin<Rectangle>, ImmutableListMixin<Rectangle> implements List<Rectangle> {
   // To suppress missing implicit constructor warnings.
   factory _ClientRectList._() { throw new UnsupportedError("Not supported"); }
 
@@ -34854,7 +37771,7 @@
     if (JS("bool", "# >>> 0 !== # || # >= #", index,
         index, index, length))
       throw new RangeError.index(index, this);
-    return JS("Rectangle", "#[#]", this, index);
+    return this.item(index);
   }
   void operator[]=(int index, Rectangle value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -34894,6 +37811,11 @@
   Rectangle elementAt(int index) => this[index];
   // -- end List<Rectangle> mixins.
 
+  @DomName('ClientRectList.__getter__')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Rectangle __getter__(int index) native;
+
   @DomName('ClientRectList.item')
   @DocsEditable()
   Rectangle item(int index) native;
@@ -34904,20 +37826,6 @@
 
 
 @DocsEditable()
-@DomName('Counter')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-@Native("Counter")
-abstract class _Counter extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory _Counter._() { throw new UnsupportedError("Not supported"); }
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('CSSRuleList')
 @Native("CSSRuleList")
 class _CssRuleList extends Interceptor with ListMixin<CssRule>, ImmutableListMixin<CssRule> implements JavaScriptIndexingBehavior, List<CssRule> {
@@ -34982,72 +37890,6 @@
 
 
 @DocsEditable()
-@DomName('CSSValueList')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-@Native("CSSValueList")
-class _CssValueList extends _CSSValue with ListMixin<_CSSValue>, ImmutableListMixin<_CSSValue> implements JavaScriptIndexingBehavior, List<_CSSValue> {
-  // To suppress missing implicit constructor warnings.
-  factory _CssValueList._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('CSSValueList.length')
-  @DocsEditable()
-  int get length => JS("int", "#.length", this);
-
-  _CSSValue operator[](int index) {
-    if (JS("bool", "# >>> 0 !== # || # >= #", index,
-        index, index, length))
-      throw new RangeError.index(index, this);
-    return JS("_CSSValue", "#[#]", this, index);
-  }
-  void operator[]=(int index, _CSSValue value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<_CSSValue> mixins.
-  // _CSSValue is the element type.
-
-
-  set length(int value) {
-    throw new UnsupportedError("Cannot resize immutable List.");
-  }
-
-  _CSSValue get first {
-    if (this.length > 0) {
-      return JS('_CSSValue', '#[0]', this);
-    }
-    throw new StateError("No elements");
-  }
-
-  _CSSValue get last {
-    int len = this.length;
-    if (len > 0) {
-      return JS('_CSSValue', '#[#]', this, len - 1);
-    }
-    throw new StateError("No elements");
-  }
-
-  _CSSValue get single {
-    int len = this.length;
-    if (len == 1) {
-      return JS('_CSSValue', '#[0]', this);
-    }
-    if (len == 0) throw new StateError("No elements");
-    throw new StateError("More than one element");
-  }
-
-  _CSSValue elementAt(int index) => this[index];
-  // -- end List<_CSSValue> mixins.
-
-  @DomName('CSSValueList.item')
-  @DocsEditable()
-  _CSSValue item(int index) native;
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('DOMFileSystemSync')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @Experimental()
@@ -35522,37 +38364,33 @@
   Node elementAt(int index) => this[index];
   // -- end List<Node> mixins.
 
-  @DomName('NamedNodeMap.__getter__')
-  @DocsEditable()
-  Node __getter__(String name) native;
-
   @DomName('NamedNodeMap.getNamedItem')
   @DocsEditable()
-  Node getNamedItem(String name) native;
+  _Attr getNamedItem(String name) native;
 
   @DomName('NamedNodeMap.getNamedItemNS')
   @DocsEditable()
-  Node getNamedItemNS(String namespaceURI, String localName) native;
+  _Attr getNamedItemNS(String namespaceURI, String localName) native;
 
   @DomName('NamedNodeMap.item')
   @DocsEditable()
-  Node item(int index) native;
+  _Attr item(int index) native;
 
   @DomName('NamedNodeMap.removeNamedItem')
   @DocsEditable()
-  Node removeNamedItem(String name) native;
+  _Attr removeNamedItem(String name) native;
 
   @DomName('NamedNodeMap.removeNamedItemNS')
   @DocsEditable()
-  Node removeNamedItemNS(String namespaceURI, String localName) native;
+  _Attr removeNamedItemNS(String namespaceURI, String localName) native;
 
   @DomName('NamedNodeMap.setNamedItem')
   @DocsEditable()
-  Node setNamedItem(Node node) native;
+  _Attr setNamedItem(_Attr attr) native;
 
   @DomName('NamedNodeMap.setNamedItemNS')
   @DocsEditable()
-  Node setNamedItemNS(Node node) native;
+  _Attr setNamedItemNS(_Attr attr) native;
 }
 // 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
@@ -35567,20 +38405,6 @@
   // To suppress missing implicit constructor warnings.
   factory _PagePopupController._() { throw new UnsupportedError("Not supported"); }
 }
-// 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.
-
-
-@DocsEditable()
-@DomName('RGBColor')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-@Native("RGBColor")
-abstract class _RGBColor extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory _RGBColor._() { throw new UnsupportedError("Not supported"); }
-}
 // 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.
@@ -35596,20 +38420,6 @@
 
 
 @DocsEditable()
-@DomName('Rect')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-@Native("Rect")
-abstract class _Rect extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory _Rect._() { throw new UnsupportedError("Not supported"); }
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('Request')
 @Experimental() // untriaged
 @Native("Request")
@@ -35619,27 +38429,20 @@
 
   @DomName('Request.Request')
   @DocsEditable()
-  factory _Request(input, [Map requestInitDict]) {
-    if ((input is String || input == null) && requestInitDict == null) {
-      return _Request._create_1(input);
-    }
-    if ((requestInitDict is Map || requestInitDict == null) && (input is String || input == null)) {
+  factory _Request(Object input, [Map requestInitDict]) {
+    if (requestInitDict != null) {
       var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict);
-      return _Request._create_2(input, requestInitDict_1);
+      return _Request._create_1(input, requestInitDict_1);
     }
-    if ((input is _Request || input == null) && requestInitDict == null) {
-      return _Request._create_3(input);
-    }
-    if ((requestInitDict is Map || requestInitDict == null) && (input is _Request || input == null)) {
-      var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict);
-      return _Request._create_4(input, requestInitDict_1);
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _Request._create_2(input);
   }
-  static _Request _create_1(input) => JS('_Request', 'new Request(#)', input);
-  static _Request _create_2(input, requestInitDict) => JS('_Request', 'new Request(#,#)', input, requestInitDict);
-  static _Request _create_3(input) => JS('_Request', 'new Request(#)', input);
-  static _Request _create_4(input, requestInitDict) => JS('_Request', 'new Request(#,#)', input, requestInitDict);
+  static _Request _create_1(input, requestInitDict) => JS('_Request', 'new Request(#,#)', input, requestInitDict);
+  static _Request _create_2(input) => JS('_Request', 'new Request(#)', input);
+
+  @DomName('Request.context')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String context;
 
   @DomName('Request.credentials')
   @DocsEditable()
@@ -35686,45 +38489,19 @@
 
   @DomName('Response.Response')
   @DocsEditable()
-  factory _Response(body_OR_input, [Map requestInitDict_OR_responseInitDict]) {
-    if ((body_OR_input is String || body_OR_input == null) && requestInitDict_OR_responseInitDict == null) {
-      return _Response._create_1(body_OR_input);
+  factory _Response([Object body, Map responseInitDict]) {
+    if (responseInitDict != null) {
+      var responseInitDict_1 = convertDartToNative_Dictionary(responseInitDict);
+      return _Response._create_1(body, responseInitDict_1);
     }
-    if ((requestInitDict_OR_responseInitDict is Map || requestInitDict_OR_responseInitDict == null) && (body_OR_input is String || body_OR_input == null)) {
-      var responseInitDict_1 = convertDartToNative_Dictionary(requestInitDict_OR_responseInitDict);
-      return _Response._create_2(body_OR_input, responseInitDict_1);
+    if (body != null) {
+      return _Response._create_2(body);
     }
-    if ((body_OR_input is Blob || body_OR_input == null) && requestInitDict_OR_responseInitDict == null) {
-      return _Response._create_3(body_OR_input);
-    }
-    if ((requestInitDict_OR_responseInitDict is Map || requestInitDict_OR_responseInitDict == null) && (body_OR_input is Blob || body_OR_input == null)) {
-      var responseInitDict_1 = convertDartToNative_Dictionary(requestInitDict_OR_responseInitDict);
-      return _Response._create_4(body_OR_input, responseInitDict_1);
-    }
-    if ((body_OR_input is TypedData || body_OR_input == null) && requestInitDict_OR_responseInitDict == null) {
-      return _Response._create_5(body_OR_input);
-    }
-    if ((requestInitDict_OR_responseInitDict is Map || requestInitDict_OR_responseInitDict == null) && (body_OR_input is TypedData || body_OR_input == null)) {
-      var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict_OR_responseInitDict);
-      return _Response._create_6(body_OR_input, requestInitDict_1);
-    }
-    if ((body_OR_input is ByteBuffer || body_OR_input == null) && requestInitDict_OR_responseInitDict == null) {
-      return _Response._create_7(body_OR_input);
-    }
-    if ((requestInitDict_OR_responseInitDict is Map || requestInitDict_OR_responseInitDict == null) && (body_OR_input is ByteBuffer || body_OR_input == null)) {
-      var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict_OR_responseInitDict);
-      return _Response._create_8(body_OR_input, requestInitDict_1);
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _Response._create_3();
   }
-  static _Response _create_1(body_OR_input) => JS('_Response', 'new Response(#)', body_OR_input);
-  static _Response _create_2(body_OR_input, requestInitDict_OR_responseInitDict) => JS('_Response', 'new Response(#,#)', body_OR_input, requestInitDict_OR_responseInitDict);
-  static _Response _create_3(body_OR_input) => JS('_Response', 'new Response(#)', body_OR_input);
-  static _Response _create_4(body_OR_input, requestInitDict_OR_responseInitDict) => JS('_Response', 'new Response(#,#)', body_OR_input, requestInitDict_OR_responseInitDict);
-  static _Response _create_5(body_OR_input) => JS('_Response', 'new Response(#)', body_OR_input);
-  static _Response _create_6(body_OR_input, requestInitDict_OR_responseInitDict) => JS('_Response', 'new Response(#,#)', body_OR_input, requestInitDict_OR_responseInitDict);
-  static _Response _create_7(body_OR_input) => JS('_Response', 'new Response(#)', body_OR_input);
-  static _Response _create_8(body_OR_input, requestInitDict_OR_responseInitDict) => JS('_Response', 'new Response(#,#)', body_OR_input, requestInitDict_OR_responseInitDict);
+  static _Response _create_1(body, responseInitDict) => JS('_Response', 'new Response(#,#)', body, responseInitDict);
+  static _Response _create_2(body) => JS('_Response', 'new Response(#)', body);
+  static _Response _create_3() => JS('_Response', 'new Response()');
 }
 // 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
@@ -35894,20 +38671,6 @@
 
 
 @DocsEditable()
-@DomName('WebKitCSSFilterValue')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-@Native("WebKitCSSFilterValue")
-abstract class _WebKitCSSFilterValue extends _CssValueList {
-  // To suppress missing implicit constructor warnings.
-  factory _WebKitCSSFilterValue._() { throw new UnsupportedError("Not supported"); }
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('WebKitCSSMatrix')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @SupportedBrowser(SupportedBrowser.SAFARI)
@@ -35936,33 +38699,23 @@
 
 
 @DocsEditable()
-@DomName('WebKitCSSTransformValue')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-@Native("WebKitCSSTransformValue")
-abstract class _WebKitCSSTransformValue extends _CssValueList {
-  // To suppress missing implicit constructor warnings.
-  factory _WebKitCSSTransformValue._() { throw new UnsupportedError("Not supported"); }
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('WindowTimers')
 @Experimental() // untriaged
 abstract class _WindowTimers extends Interceptor {
   // To suppress missing implicit constructor warnings.
   factory _WindowTimers._() { throw new UnsupportedError("Not supported"); }
 
-  void _clearInterval(int handle);
+  int _setInterval_String(String handler, [int timeout, Object arguments]);
 
-  void _clearTimeout(int handle);
+  int _setTimeout_String(String handler, [int timeout, Object arguments]);
 
-  int _setInterval(Object handler, int timeout);
+  void _clearInterval([int handle]);
 
-  int _setTimeout(Object handler, int timeout);
+  void _clearTimeout([int handle]);
+
+  int _setInterval(Object handler, [int timeout]);
+
+  int _setTimeout(Object handler, [int timeout]);
 }
 // 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
@@ -40419,22 +43172,22 @@
   /** The "fixed" value of whether the alt key is being pressed. */
   bool _shadowAltKey;
 
-  /** Caculated value of what the estimated charCode is for this event. */
+  /** Calculated value of what the estimated charCode is for this event. */
   int _shadowCharCode;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int _shadowKeyCode;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int get keyCode => _shadowKeyCode;
 
-  /** Caculated value of what the estimated charCode is for this event. */
+  /** Calculated value of what the estimated charCode is for this event. */
   int get charCode => this.type == 'keypress' ? _shadowCharCode : 0;
 
-  /** Caculated value of whether the alt key is pressed is for this event. */
+  /** Calculated value of whether the alt key is pressed is for this event. */
   bool get altKey => _shadowAltKey;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int get which => keyCode;
 
   /** Accessor to the underlying keyCode value is the parent event. */
@@ -40571,23 +43324,22 @@
   static EventStreamProvider<KeyEvent> keyPressEvent =
       new _KeyboardEventHandler('keypress');
 
-  /** Accessor to the clipboardData available for this event. */
-  DataTransfer get clipboardData => _parent.clipboardData;
+  String get code => _parent.code;
   /** True if the ctrl key is pressed during this event. */
   bool get ctrlKey => _parent.ctrlKey;
   int get detail => _parent.detail;
+  String get key => _parent.key;
   /**
    * Accessor to the part of the keyboard that the key was pressed from (one of
    * KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT,
    * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK).
    */
   int get keyLocation => _parent.keyLocation;
-  Point get layer => _parent.layer;
   /** True if the Meta (or Mac command) key is pressed during this event. */
   bool get metaKey => _parent.metaKey;
-  Point get page => _parent.page;
   /** True if the shift key was pressed during this event. */
   bool get shiftKey => _parent.shiftKey;
+  InputDevice get sourceDevice => _parent.sourceDevice;
   Window get view => _parent.view;
   void _initUIEvent(String type, bool canBubble, bool cancelable,
       Window view, int detail) {
@@ -40597,6 +43349,8 @@
 
   int get _charCode => charCode;
   int get _keyCode => keyCode;
+  int get _which => which;
+
   String get _keyIdentifier {
     throw new UnsupportedError("keyIdentifier is unsupported.");
   }
@@ -40606,10 +43360,6 @@
     throw new UnsupportedError(
         "Cannot initialize a KeyboardEvent from a KeyEvent.");
   }
-  int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
   @Experimental() // untriaged
   bool getModifierState(String keyArgument) => throw new UnimplementedError();
   @Experimental() // untriaged
@@ -40658,8 +43408,6 @@
 
   bool get cancelable => wrapped.cancelable;
 
-  DataTransfer get clipboardData => wrapped.clipboardData;
-
   EventTarget get currentTarget => wrapped.currentTarget;
 
   bool get defaultPrevented => wrapped.defaultPrevented;
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index c306d5b..30f39f7 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -30,7 +30,6 @@
 import 'dart:html_common';
 import 'dart:indexed_db';
 import 'dart:indexed_db' show indexed_dbBlinkMap;
-import 'dart:indexed_db' show indexed_dbBlinkFunctionMap;
 import 'dart:isolate';
 import 'dart:js' as js;
 import "dart:convert";
@@ -40,16 +39,13 @@
 import 'dart:typed_data';
 import 'dart:web_gl' as gl;
 import 'dart:web_gl' show web_glBlinkMap;
-import 'dart:web_gl' show web_glBlinkFunctionMap;
 import 'dart:web_sql';
 import 'dart:svg' as svg;
 import 'dart:svg' show svgBlinkMap;
-import 'dart:svg' show svgBlinkFunctionMap;
 import 'dart:svg' show Matrix;
 import 'dart:svg' show SvgSvgElement;
 import 'dart:web_audio' as web_audio;
 import 'dart:web_audio' show web_audioBlinkMap;
-import 'dart:web_audio' show web_audioBlinkFunctionMap;
 import 'dart:_blink' as _blink;
 import 'dart:developer';
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -90,7 +86,7 @@
   if (_window != null) {
     return _window;
   }
-  _window = wrap_jso(js.JsNative.getProperty(js.context, 'window'));
+  _window = js.JsNative.toTypedObject(js.context);
   return _window;
 }
 
@@ -129,412 +125,468 @@
   'JsObject': () => js.JsObject,
   'JsFunction': () => js.JsFunction,
   'JsArray': () => js.JsArray,
-  'AbstractWorker': () => AbstractWorker,
-  'Animation': () => Animation,
-  'AnimationEffect': () => AnimationEffect,
-  'AnimationNode': () => AnimationNode,
-  'AnimationPlayer': () => AnimationPlayer,
-  'AnimationPlayerEvent': () => AnimationPlayerEvent,
-  'AnimationTimeline': () => AnimationTimeline,
-  'ApplicationCache': () => ApplicationCache,
-  'ApplicationCacheErrorEvent': () => ApplicationCacheErrorEvent,
-  'Attr': () => _Attr,
-  'AudioTrack': () => AudioTrack,
-  'AudioTrackList': () => AudioTrackList,
-  'AutocompleteErrorEvent': () => AutocompleteErrorEvent,
-  'BarProp': () => BarProp,
-  'BatteryManager': () => BatteryManager,
-  'BeforeUnloadEvent': () => BeforeUnloadEvent,
-  'Blob': () => Blob,
-  'Body': () => Body,
-  'CDATASection': () => CDataSection,
-  'CSS': () => Css,
-  'CSSCharsetRule': () => CssCharsetRule,
-  'CSSFontFaceRule': () => CssFontFaceRule,
-  'CSSImportRule': () => CssImportRule,
-  'CSSKeyframeRule': () => CssKeyframeRule,
-  'CSSKeyframesRule': () => CssKeyframesRule,
-  'CSSMediaRule': () => CssMediaRule,
-  'CSSPageRule': () => CssPageRule,
-  'CSSPrimitiveValue': () => _CSSPrimitiveValue,
-  'CSSRule': () => CssRule,
-  'CSSRuleList': () => _CssRuleList,
-  'CSSStyleDeclaration': () => CssStyleDeclaration,
-  'CSSStyleRule': () => CssStyleRule,
-  'CSSStyleSheet': () => CssStyleSheet,
-  'CSSSupportsRule': () => CssSupportsRule,
-  'CSSUnknownRule': () => _CSSUnknownRule,
-  'CSSValue': () => _CSSValue,
-  'CSSValueList': () => _CssValueList,
-  'CSSViewportRule': () => CssViewportRule,
-  'Cache': () => _Cache,
-  'CacheStorage': () => CacheStorage,
-  'Canvas2DContextAttributes': () => Canvas2DContextAttributes,
-  'CanvasGradient': () => CanvasGradient,
-  'CanvasPathMethods': () => _CanvasPathMethods,
-  'CanvasPattern': () => CanvasPattern,
-  'CanvasRenderingContext2D': () => CanvasRenderingContext2D,
-  'CharacterData': () => CharacterData,
-  'ChildNode': () => ChildNode,
-  'CircularGeofencingRegion': () => CircularGeofencingRegion,
-  'ClientRect': () => _ClientRect,
-  'ClientRectList': () => _ClientRectList,
-  'CloseEvent': () => CloseEvent,
-  'Comment': () => Comment,
-  'CompositionEvent': () => CompositionEvent,
-  'Console': () => Console,
-  'ConsoleBase': () => ConsoleBase,
-  'Coordinates': () => Coordinates,
-  'Counter': () => _Counter,
-  'Credential': () => Credential,
-  'CredentialsContainer': () => CredentialsContainer,
-  'Crypto': () => Crypto,
-  'CryptoKey': () => CryptoKey,
-  'CustomEvent': () => CustomEvent,
-  'DOMError': () => DomError,
-  'DOMException': () => DomException,
-  'DOMFileSystem': () => FileSystem,
-  'DOMFileSystemSync': () => _DOMFileSystemSync,
-  'DOMImplementation': () => DomImplementation,
-  'DOMMatrix': () => DomMatrix,
-  'DOMMatrixReadOnly': () => DomMatrixReadOnly,
-  'DOMParser': () => DomParser,
-  'DOMPoint': () => DomPoint,
-  'DOMPointReadOnly': () => DomPointReadOnly,
-  'DOMRect': () => _DomRect,
-  'DOMRectReadOnly': () => DomRectReadOnly,
-  'DOMSettableTokenList': () => DomSettableTokenList,
-  'DOMStringList': () => DomStringList,
-  'DOMStringMap': () => DomStringMap,
-  'DOMTokenList': () => DomTokenList,
-  'DataTransfer': () => DataTransfer,
-  'DataTransferItem': () => DataTransferItem,
-  'DataTransferItemList': () => DataTransferItemList,
-  'DedicatedWorkerGlobalScope': () => DedicatedWorkerGlobalScope,
-  'DeprecatedStorageInfo': () => DeprecatedStorageInfo,
-  'DeprecatedStorageQuota': () => DeprecatedStorageQuota,
-  'DeviceAcceleration': () => DeviceAcceleration,
-  'DeviceLightEvent': () => DeviceLightEvent,
-  'DeviceMotionEvent': () => DeviceMotionEvent,
-  'DeviceOrientationEvent': () => DeviceOrientationEvent,
-  'DeviceRotationRate': () => DeviceRotationRate,
-  'DirectoryEntry': () => DirectoryEntry,
-  'DirectoryEntrySync': () => _DirectoryEntrySync,
-  'DirectoryReader': () => DirectoryReader,
-  'DirectoryReaderSync': () => _DirectoryReaderSync,
-  'Document': () => Document,
-  'DocumentFragment': () => DocumentFragment,
-  'DocumentType': () => _DocumentType,
-  'Element': () => Element,
-  'Entry': () => Entry,
-  'EntrySync': () => _EntrySync,
-  'ErrorEvent': () => ErrorEvent,
-  'Event': () => Event,
-  'EventSource': () => EventSource,
-  'EventTarget': () => EventTarget,
-  'ExtendableEvent': () => ExtendableEvent,
-  'FederatedCredential': () => FederatedCredential,
-  'FetchEvent': () => FetchEvent,
-  'File': () => File,
-  'FileEntry': () => FileEntry,
-  'FileEntrySync': () => _FileEntrySync,
-  'FileError': () => FileError,
-  'FileList': () => FileList,
-  'FileReader': () => FileReader,
-  'FileReaderSync': () => _FileReaderSync,
-  'FileWriter': () => FileWriter,
-  'FileWriterSync': () => _FileWriterSync,
-  'FocusEvent': () => FocusEvent,
-  'FontFace': () => FontFace,
-  'FontFaceSet': () => FontFaceSet,
-  'FontFaceSetLoadEvent': () => FontFaceSetLoadEvent,
-  'FormData': () => FormData,
-  'Gamepad': () => Gamepad,
-  'GamepadButton': () => GamepadButton,
-  'GamepadEvent': () => GamepadEvent,
-  'GamepadList': () => _GamepadList,
-  'Geofencing': () => Geofencing,
-  'GeofencingRegion': () => GeofencingRegion,
-  'Geolocation': () => Geolocation,
-  'Geoposition': () => Geoposition,
-  'GlobalEventHandlers': () => GlobalEventHandlers,
-  'HTMLAllCollection': () => _HTMLAllCollection,
-  'HTMLAnchorElement': () => AnchorElement,
-  'HTMLAppletElement': () => _HTMLAppletElement,
-  'HTMLAreaElement': () => AreaElement,
-  'HTMLAudioElement': () => AudioElement,
-  'HTMLBRElement': () => BRElement,
-  'HTMLBaseElement': () => BaseElement,
-  'HTMLBodyElement': () => BodyElement,
-  'HTMLButtonElement': () => ButtonElement,
-  'HTMLCanvasElement': () => CanvasElement,
-  'HTMLCollection': () => HtmlCollection,
-  'HTMLContentElement': () => ContentElement,
-  'HTMLDListElement': () => DListElement,
-  'HTMLDataListElement': () => DataListElement,
-  'HTMLDetailsElement': () => DetailsElement,
-  'HTMLDialogElement': () => DialogElement,
-  'HTMLDirectoryElement': () => _HTMLDirectoryElement,
-  'HTMLDivElement': () => DivElement,
-  'HTMLDocument': () => HtmlDocument,
-  'HTMLElement': () => HtmlElement,
-  'HTMLEmbedElement': () => EmbedElement,
-  'HTMLFieldSetElement': () => FieldSetElement,
-  'HTMLFontElement': () => _HTMLFontElement,
-  'HTMLFormControlsCollection': () => HtmlFormControlsCollection,
-  'HTMLFormElement': () => FormElement,
-  'HTMLFrameElement': () => _HTMLFrameElement,
-  'HTMLFrameSetElement': () => _HTMLFrameSetElement,
-  'HTMLHRElement': () => HRElement,
-  'HTMLHeadElement': () => HeadElement,
-  'HTMLHeadingElement': () => HeadingElement,
-  'HTMLHtmlElement': () => HtmlHtmlElement,
-  'HTMLIFrameElement': () => IFrameElement,
-  'HTMLImageElement': () => ImageElement,
-  'HTMLInputElement': () => InputElement,
-  'HTMLKeygenElement': () => KeygenElement,
-  'HTMLLIElement': () => LIElement,
-  'HTMLLabelElement': () => LabelElement,
-  'HTMLLegendElement': () => LegendElement,
-  'HTMLLinkElement': () => LinkElement,
-  'HTMLMapElement': () => MapElement,
-  'HTMLMarqueeElement': () => _HTMLMarqueeElement,
-  'HTMLMediaElement': () => MediaElement,
-  'HTMLMenuElement': () => MenuElement,
-  'HTMLMenuItemElement': () => MenuItemElement,
-  'HTMLMetaElement': () => MetaElement,
-  'HTMLMeterElement': () => MeterElement,
-  'HTMLModElement': () => ModElement,
-  'HTMLOListElement': () => OListElement,
-  'HTMLObjectElement': () => ObjectElement,
-  'HTMLOptGroupElement': () => OptGroupElement,
-  'HTMLOptionElement': () => OptionElement,
-  'HTMLOptionsCollection': () => HtmlOptionsCollection,
-  'HTMLOutputElement': () => OutputElement,
-  'HTMLParagraphElement': () => ParagraphElement,
-  'HTMLParamElement': () => ParamElement,
-  'HTMLPictureElement': () => PictureElement,
-  'HTMLPreElement': () => PreElement,
-  'HTMLProgressElement': () => ProgressElement,
-  'HTMLQuoteElement': () => QuoteElement,
-  'HTMLScriptElement': () => ScriptElement,
-  'HTMLSelectElement': () => SelectElement,
-  'HTMLShadowElement': () => ShadowElement,
-  'HTMLSourceElement': () => SourceElement,
-  'HTMLSpanElement': () => SpanElement,
-  'HTMLStyleElement': () => StyleElement,
-  'HTMLTableCaptionElement': () => TableCaptionElement,
-  'HTMLTableCellElement': () => TableCellElement,
-  'HTMLTableColElement': () => TableColElement,
-  'HTMLTableElement': () => TableElement,
-  'HTMLTableRowElement': () => TableRowElement,
-  'HTMLTableSectionElement': () => TableSectionElement,
-  'HTMLTemplateElement': () => TemplateElement,
-  'HTMLTextAreaElement': () => TextAreaElement,
-  'HTMLTitleElement': () => TitleElement,
-  'HTMLTrackElement': () => TrackElement,
-  'HTMLUListElement': () => UListElement,
-  'HTMLUnknownElement': () => UnknownElement,
-  'HTMLVideoElement': () => VideoElement,
-  'HashChangeEvent': () => HashChangeEvent,
-  'Headers': () => Headers,
-  'History': () => History,
-  'ImageBitmap': () => ImageBitmap,
-  'ImageData': () => ImageData,
-  'InjectedScriptHost': () => InjectedScriptHost,
-  'InputMethodContext': () => InputMethodContext,
-  'InstallEvent': () => InstallEvent,
-  'Iterator': () => DomIterator,
-  'KeyboardEvent': () => KeyboardEvent,
-  'LocalCredential': () => LocalCredential,
-  'Location': () => Location,
-  'MIDIAccess': () => MidiAccess,
-  'MIDIConnectionEvent': () => MidiConnectionEvent,
-  'MIDIInput': () => MidiInput,
-  'MIDIInputMap': () => MidiInputMap,
-  'MIDIMessageEvent': () => MidiMessageEvent,
-  'MIDIOutput': () => MidiOutput,
-  'MIDIOutputMap': () => MidiOutputMap,
-  'MIDIPort': () => MidiPort,
-  'MediaController': () => MediaController,
-  'MediaDeviceInfo': () => MediaDeviceInfo,
-  'MediaError': () => MediaError,
-  'MediaKeyError': () => MediaKeyError,
-  'MediaKeyEvent': () => MediaKeyEvent,
-  'MediaKeyMessageEvent': () => MediaKeyMessageEvent,
-  'MediaKeyNeededEvent': () => MediaKeyNeededEvent,
-  'MediaKeySession': () => MediaKeySession,
-  'MediaKeys': () => MediaKeys,
-  'MediaList': () => MediaList,
-  'MediaQueryList': () => MediaQueryList,
-  'MediaQueryListEvent': () => MediaQueryListEvent,
-  'MediaSource': () => MediaSource,
-  'MediaStream': () => MediaStream,
-  'MediaStreamEvent': () => MediaStreamEvent,
-  'MediaStreamTrack': () => MediaStreamTrack,
-  'MediaStreamTrackEvent': () => MediaStreamTrackEvent,
-  'MemoryInfo': () => MemoryInfo,
-  'MessageChannel': () => MessageChannel,
-  'MessageEvent': () => MessageEvent,
-  'MessagePort': () => MessagePort,
-  'Metadata': () => Metadata,
-  'MimeType': () => MimeType,
-  'MimeTypeArray': () => MimeTypeArray,
-  'MouseEvent': () => MouseEvent,
-  'MutationEvent': () => _MutationEvent,
-  'MutationObserver': () => MutationObserver,
-  'MutationRecord': () => MutationRecord,
-  'NamedNodeMap': () => _NamedNodeMap,
-  'Navigator': () => Navigator,
-  'NavigatorCPU': () => NavigatorCpu,
-  'NavigatorID': () => NavigatorID,
-  'NavigatorLanguage': () => NavigatorLanguage,
-  'NavigatorOnLine': () => NavigatorOnLine,
-  'NavigatorUserMediaError': () => NavigatorUserMediaError,
-  'NetworkInformation': () => NetworkInformation,
-  'Node': () => Node,
-  'NodeFilter': () => NodeFilter,
-  'NodeIterator': () => NodeIterator,
-  'NodeList': () => NodeList,
-  'Notification': () => Notification,
-  'OverflowEvent': () => OverflowEvent,
-  'PagePopupController': () => _PagePopupController,
-  'PageTransitionEvent': () => PageTransitionEvent,
-  'ParentNode': () => ParentNode,
-  'Path2D': () => Path2D,
-  'Performance': () => Performance,
-  'PerformanceEntry': () => PerformanceEntry,
-  'PerformanceMark': () => PerformanceMark,
-  'PerformanceMeasure': () => PerformanceMeasure,
-  'PerformanceNavigation': () => PerformanceNavigation,
-  'PerformanceResourceTiming': () => PerformanceResourceTiming,
-  'PerformanceTiming': () => PerformanceTiming,
-  'Plugin': () => Plugin,
-  'PluginArray': () => PluginArray,
-  'PluginPlaceholderElement': () => PluginPlaceholderElement,
-  'PopStateEvent': () => PopStateEvent,
-  'PositionError': () => PositionError,
-  'Presentation': () => Presentation,
-  'ProcessingInstruction': () => ProcessingInstruction,
-  'ProgressEvent': () => ProgressEvent,
-  'PushEvent': () => PushEvent,
-  'PushManager': () => PushManager,
-  'PushRegistration': () => PushRegistration,
-  'RGBColor': () => _RGBColor,
-  'RTCDTMFSender': () => RtcDtmfSender,
-  'RTCDTMFToneChangeEvent': () => RtcDtmfToneChangeEvent,
-  'RTCDataChannel': () => RtcDataChannel,
-  'RTCDataChannelEvent': () => RtcDataChannelEvent,
-  'RTCIceCandidate': () => RtcIceCandidate,
-  'RTCIceCandidateEvent': () => RtcIceCandidateEvent,
-  'RTCPeerConnection': () => RtcPeerConnection,
-  'RTCSessionDescription': () => RtcSessionDescription,
-  'RTCStatsReport': () => RtcStatsReport,
-  'RTCStatsResponse': () => RtcStatsResponse,
-  'RadioNodeList': () => _RadioNodeList,
-  'Range': () => Range,
-  'ReadableStream': () => ReadableStream,
-  'Rect': () => _Rect,
-  'RelatedEvent': () => RelatedEvent,
-  'Request': () => _Request,
-  'ResourceProgressEvent': () => ResourceProgressEvent,
-  'Response': () => _Response,
-  'Screen': () => Screen,
-  'ScreenOrientation': () => ScreenOrientation,
-  'SecurityPolicyViolationEvent': () => SecurityPolicyViolationEvent,
-  'Selection': () => Selection,
-  'ServiceWorker': () => _ServiceWorker,
-  'ServiceWorkerClient': () => ServiceWorkerClient,
-  'ServiceWorkerClients': () => ServiceWorkerClients,
-  'ServiceWorkerContainer': () => ServiceWorkerContainer,
-  'ServiceWorkerGlobalScope': () => ServiceWorkerGlobalScope,
-  'ServiceWorkerRegistration': () => ServiceWorkerRegistration,
-  'ShadowRoot': () => ShadowRoot,
-  'SharedWorker': () => SharedWorker,
-  'SharedWorkerGlobalScope': () => SharedWorkerGlobalScope,
-  'SourceBuffer': () => SourceBuffer,
-  'SourceBufferList': () => SourceBufferList,
-  'SourceInfo': () => SourceInfo,
-  'SpeechGrammar': () => SpeechGrammar,
-  'SpeechGrammarList': () => SpeechGrammarList,
-  'SpeechRecognition': () => SpeechRecognition,
-  'SpeechRecognitionAlternative': () => SpeechRecognitionAlternative,
-  'SpeechRecognitionError': () => SpeechRecognitionError,
-  'SpeechRecognitionEvent': () => SpeechRecognitionEvent,
-  'SpeechRecognitionResult': () => SpeechRecognitionResult,
-  'SpeechRecognitionResultList': () => _SpeechRecognitionResultList,
-  'SpeechSynthesis': () => SpeechSynthesis,
-  'SpeechSynthesisEvent': () => SpeechSynthesisEvent,
-  'SpeechSynthesisUtterance': () => SpeechSynthesisUtterance,
-  'SpeechSynthesisVoice': () => SpeechSynthesisVoice,
-  'Storage': () => Storage,
-  'StorageEvent': () => StorageEvent,
-  'StorageInfo': () => StorageInfo,
-  'StorageQuota': () => StorageQuota,
-  'Stream': () => FileStream,
-  'StyleMedia': () => StyleMedia,
-  'StyleSheet': () => StyleSheet,
-  'StyleSheetList': () => _StyleSheetList,
-  'SubtleCrypto': () => _SubtleCrypto,
-  'Text': () => Text,
-  'TextEvent': () => TextEvent,
-  'TextMetrics': () => TextMetrics,
-  'TextTrack': () => TextTrack,
-  'TextTrackCue': () => TextTrackCue,
-  'TextTrackCueList': () => TextTrackCueList,
-  'TextTrackList': () => TextTrackList,
-  'TimeRanges': () => TimeRanges,
-  'Timing': () => Timing,
-  'Touch': () => Touch,
-  'TouchEvent': () => TouchEvent,
-  'TouchList': () => TouchList,
-  'TrackEvent': () => TrackEvent,
-  'TransitionEvent': () => TransitionEvent,
-  'TreeWalker': () => TreeWalker,
-  'UIEvent': () => UIEvent,
-  'URL': () => Url,
-  'URLUtils': () => UrlUtils,
-  'URLUtilsReadOnly': () => UrlUtilsReadOnly,
-  'VTTCue': () => VttCue,
-  'VTTRegion': () => VttRegion,
-  'VTTRegionList': () => VttRegionList,
-  'ValidityState': () => ValidityState,
-  'VideoPlaybackQuality': () => VideoPlaybackQuality,
-  'VideoTrack': () => VideoTrack,
-  'VideoTrackList': () => VideoTrackList,
-  'WebKitAnimationEvent': () => AnimationEvent,
-  'WebKitCSSFilterRule': () => CssFilterRule,
-  'WebKitCSSFilterValue': () => _WebKitCSSFilterValue,
-  'WebKitCSSMatrix': () => _WebKitCSSMatrix,
-  'WebKitCSSTransformValue': () => _WebKitCSSTransformValue,
-  'WebSocket': () => WebSocket,
-  'WheelEvent': () => WheelEvent,
-  'Window': () => Window,
-  'WindowBase64': () => WindowBase64,
-  'WindowEventHandlers': () => WindowEventHandlers,
-  'WindowTimers': () => _WindowTimers,
-  'Worker': () => Worker,
-  'WorkerConsole': () => WorkerConsole,
-  'WorkerGlobalScope': () => WorkerGlobalScope,
-  'WorkerLocation': () => _WorkerLocation,
-  'WorkerNavigator': () => _WorkerNavigator,
-  'WorkerPerformance': () => WorkerPerformance,
-  'XMLDocument': () => XmlDocument,
-  'XMLHttpRequest': () => HttpRequest,
-  'XMLHttpRequestEventTarget': () => HttpRequestEventTarget,
-  'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent,
-  'XMLHttpRequestUpload': () => HttpRequestUpload,
-  'XMLSerializer': () => XmlSerializer,
-  'XPathEvaluator': () => XPathEvaluator,
-  'XPathExpression': () => XPathExpression,
-  'XPathNSResolver': () => XPathNSResolver,
-  'XPathResult': () => XPathResult,
-  'XSLTProcessor': () => XsltProcessor,
+  // We have to call .instanceRuntimeType as these classes have a private
+  // implementation class defined dynamically at runtime via a patch file.
+  'JSObject': () => js.JSObject.instanceRuntimeType,
+  'JSFunction': () => js.JSFunction.instanceRuntimeType,
+  'JSArray': () => js.JSArray.instanceRuntimeType,
+  'AbstractWorker': () => AbstractWorker.instanceRuntimeType,
+  'Animation': () => Animation.instanceRuntimeType,
+  'AnimationEffectReadOnly': () => AnimationEffectReadOnly.instanceRuntimeType,
+  'AnimationEffectTiming': () => AnimationEffectTiming.instanceRuntimeType,
+  'AnimationEvent': () => AnimationEvent.instanceRuntimeType,
+  'AnimationPlayerEvent': () => AnimationPlayerEvent.instanceRuntimeType,
+  'AnimationTimeline': () => AnimationTimeline.instanceRuntimeType,
+  'AppBannerPromptResult': () => AppBannerPromptResult.instanceRuntimeType,
+  'ApplicationCache': () => ApplicationCache.instanceRuntimeType,
+  'ApplicationCacheErrorEvent': () => ApplicationCacheErrorEvent.instanceRuntimeType,
+  'Attr': () => _Attr.instanceRuntimeType,
+  'AudioTrack': () => AudioTrack.instanceRuntimeType,
+  'AudioTrackList': () => AudioTrackList.instanceRuntimeType,
+  'AutocompleteErrorEvent': () => AutocompleteErrorEvent.instanceRuntimeType,
+  'BarProp': () => BarProp.instanceRuntimeType,
+  'BatteryManager': () => BatteryManager.instanceRuntimeType,
+  'BeforeInstallPromptEvent': () => BeforeInstallPromptEvent.instanceRuntimeType,
+  'BeforeUnloadEvent': () => BeforeUnloadEvent.instanceRuntimeType,
+  'Blob': () => Blob.instanceRuntimeType,
+  'Bluetooth': () => Bluetooth.instanceRuntimeType,
+  'BluetoothDevice': () => BluetoothDevice.instanceRuntimeType,
+  'BluetoothGATTCharacteristic': () => BluetoothGattCharacteristic.instanceRuntimeType,
+  'BluetoothGATTRemoteServer': () => BluetoothGattRemoteServer.instanceRuntimeType,
+  'BluetoothGATTService': () => BluetoothGattService.instanceRuntimeType,
+  'BluetoothUUID': () => BluetoothUuid.instanceRuntimeType,
+  'Body': () => Body.instanceRuntimeType,
+  'CDATASection': () => CDataSection.instanceRuntimeType,
+  'CHROMIUMValuebuffer': () => ChromiumValuebuffer.instanceRuntimeType,
+  'CSS': () => Css.instanceRuntimeType,
+  'CSSCharsetRule': () => CssCharsetRule.instanceRuntimeType,
+  'CSSFontFaceRule': () => CssFontFaceRule.instanceRuntimeType,
+  'CSSGroupingRule': () => CssGroupingRule.instanceRuntimeType,
+  'CSSImportRule': () => CssImportRule.instanceRuntimeType,
+  'CSSKeyframeRule': () => CssKeyframeRule.instanceRuntimeType,
+  'CSSKeyframesRule': () => CssKeyframesRule.instanceRuntimeType,
+  'CSSMediaRule': () => CssMediaRule.instanceRuntimeType,
+  'CSSPageRule': () => CssPageRule.instanceRuntimeType,
+  'CSSRule': () => CssRule.instanceRuntimeType,
+  'CSSRuleList': () => _CssRuleList.instanceRuntimeType,
+  'CSSStyleDeclaration': () => CssStyleDeclaration.instanceRuntimeType,
+  'CSSStyleRule': () => CssStyleRule.instanceRuntimeType,
+  'CSSStyleSheet': () => CssStyleSheet.instanceRuntimeType,
+  'CSSSupportsRule': () => CssSupportsRule.instanceRuntimeType,
+  'CSSViewportRule': () => CssViewportRule.instanceRuntimeType,
+  'Cache': () => _Cache.instanceRuntimeType,
+  'CacheStorage': () => CacheStorage.instanceRuntimeType,
+  'CanvasGradient': () => CanvasGradient.instanceRuntimeType,
+  'CanvasPathMethods': () => _CanvasPathMethods.instanceRuntimeType,
+  'CanvasPattern': () => CanvasPattern.instanceRuntimeType,
+  'CanvasRenderingContext2D': () => CanvasRenderingContext2D.instanceRuntimeType,
+  'CharacterData': () => CharacterData.instanceRuntimeType,
+  'ChildNode': () => ChildNode.instanceRuntimeType,
+  'CircularGeofencingRegion': () => CircularGeofencingRegion.instanceRuntimeType,
+  'Client': () => Client.instanceRuntimeType,
+  'ClientRect': () => _ClientRect.instanceRuntimeType,
+  'ClientRectList': () => _ClientRectList.instanceRuntimeType,
+  'Clients': () => Clients.instanceRuntimeType,
+  'ClipboardEvent': () => ClipboardEvent.instanceRuntimeType,
+  'CloseEvent': () => CloseEvent.instanceRuntimeType,
+  'Comment': () => Comment.instanceRuntimeType,
+  'CompositionEvent': () => CompositionEvent.instanceRuntimeType,
+  'CompositorProxy': () => CompositorProxy.instanceRuntimeType,
+  'CompositorWorker': () => CompositorWorker.instanceRuntimeType,
+  'CompositorWorkerGlobalScope': () => CompositorWorkerGlobalScope.instanceRuntimeType,
+  'Console': () => Console.instanceRuntimeType,
+  'ConsoleBase': () => ConsoleBase.instanceRuntimeType,
+  'Coordinates': () => Coordinates.instanceRuntimeType,
+  'Credential': () => Credential.instanceRuntimeType,
+  'CredentialsContainer': () => CredentialsContainer.instanceRuntimeType,
+  'CrossOriginConnectEvent': () => CrossOriginConnectEvent.instanceRuntimeType,
+  'CrossOriginServiceWorkerClient': () => CrossOriginServiceWorkerClient.instanceRuntimeType,
+  'Crypto': () => Crypto.instanceRuntimeType,
+  'CryptoKey': () => CryptoKey.instanceRuntimeType,
+  'CustomEvent': () => CustomEvent.instanceRuntimeType,
+  'DOMError': () => DomError.instanceRuntimeType,
+  'DOMException': () => DomException.instanceRuntimeType,
+  'DOMFileSystem': () => FileSystem.instanceRuntimeType,
+  'DOMFileSystemSync': () => _DOMFileSystemSync.instanceRuntimeType,
+  'DOMImplementation': () => DomImplementation.instanceRuntimeType,
+  'DOMMatrix': () => DomMatrix.instanceRuntimeType,
+  'DOMMatrixReadOnly': () => DomMatrixReadOnly.instanceRuntimeType,
+  'DOMParser': () => DomParser.instanceRuntimeType,
+  'DOMPoint': () => DomPoint.instanceRuntimeType,
+  'DOMPointReadOnly': () => DomPointReadOnly.instanceRuntimeType,
+  'DOMRect': () => _DomRect.instanceRuntimeType,
+  'DOMRectReadOnly': () => DomRectReadOnly.instanceRuntimeType,
+  'DOMSettableTokenList': () => DomSettableTokenList.instanceRuntimeType,
+  'DOMStringList': () => DomStringList.instanceRuntimeType,
+  'DOMStringMap': () => DomStringMap.instanceRuntimeType,
+  'DOMTokenList': () => DomTokenList.instanceRuntimeType,
+  'DataTransfer': () => DataTransfer.instanceRuntimeType,
+  'DataTransferItem': () => DataTransferItem.instanceRuntimeType,
+  'DataTransferItemList': () => DataTransferItemList.instanceRuntimeType,
+  'DedicatedWorkerGlobalScope': () => DedicatedWorkerGlobalScope.instanceRuntimeType,
+  'DefaultSessionStartEvent': () => DefaultSessionStartEvent.instanceRuntimeType,
+  'DeprecatedStorageInfo': () => DeprecatedStorageInfo.instanceRuntimeType,
+  'DeprecatedStorageQuota': () => DeprecatedStorageQuota.instanceRuntimeType,
+  'DeviceAcceleration': () => DeviceAcceleration.instanceRuntimeType,
+  'DeviceLightEvent': () => DeviceLightEvent.instanceRuntimeType,
+  'DeviceMotionEvent': () => DeviceMotionEvent.instanceRuntimeType,
+  'DeviceOrientationEvent': () => DeviceOrientationEvent.instanceRuntimeType,
+  'DeviceRotationRate': () => DeviceRotationRate.instanceRuntimeType,
+  'DirectoryEntry': () => DirectoryEntry.instanceRuntimeType,
+  'DirectoryEntrySync': () => _DirectoryEntrySync.instanceRuntimeType,
+  'DirectoryReader': () => DirectoryReader.instanceRuntimeType,
+  'DirectoryReaderSync': () => _DirectoryReaderSync.instanceRuntimeType,
+  'Document': () => Document.instanceRuntimeType,
+  'DocumentFragment': () => DocumentFragment.instanceRuntimeType,
+  'DocumentType': () => _DocumentType.instanceRuntimeType,
+  'EffectModel': () => EffectModel.instanceRuntimeType,
+  'Element': () => Element.instanceRuntimeType,
+  'Entry': () => Entry.instanceRuntimeType,
+  'EntrySync': () => _EntrySync.instanceRuntimeType,
+  'ErrorEvent': () => ErrorEvent.instanceRuntimeType,
+  'Event': () => Event.instanceRuntimeType,
+  'EventSource': () => EventSource.instanceRuntimeType,
+  'EventTarget': () => EventTarget.instanceRuntimeType,
+  'ExtendableEvent': () => ExtendableEvent.instanceRuntimeType,
+  'FederatedCredential': () => FederatedCredential.instanceRuntimeType,
+  'FetchEvent': () => FetchEvent.instanceRuntimeType,
+  'File': () => File.instanceRuntimeType,
+  'FileEntry': () => FileEntry.instanceRuntimeType,
+  'FileEntrySync': () => _FileEntrySync.instanceRuntimeType,
+  'FileError': () => FileError.instanceRuntimeType,
+  'FileList': () => FileList.instanceRuntimeType,
+  'FileReader': () => FileReader.instanceRuntimeType,
+  'FileReaderSync': () => _FileReaderSync.instanceRuntimeType,
+  'FileWriter': () => FileWriter.instanceRuntimeType,
+  'FileWriterSync': () => _FileWriterSync.instanceRuntimeType,
+  'FocusEvent': () => FocusEvent.instanceRuntimeType,
+  'FontFace': () => FontFace.instanceRuntimeType,
+  'FontFaceSet': () => FontFaceSet.instanceRuntimeType,
+  'FontFaceSetLoadEvent': () => FontFaceSetLoadEvent.instanceRuntimeType,
+  'FormData': () => FormData.instanceRuntimeType,
+  'Gamepad': () => Gamepad.instanceRuntimeType,
+  'GamepadButton': () => GamepadButton.instanceRuntimeType,
+  'GamepadEvent': () => GamepadEvent.instanceRuntimeType,
+  'GamepadList': () => _GamepadList.instanceRuntimeType,
+  'Geofencing': () => Geofencing.instanceRuntimeType,
+  'GeofencingEvent': () => GeofencingEvent.instanceRuntimeType,
+  'GeofencingRegion': () => GeofencingRegion.instanceRuntimeType,
+  'Geolocation': () => Geolocation.instanceRuntimeType,
+  'Geoposition': () => Geoposition.instanceRuntimeType,
+  'GlobalEventHandlers': () => GlobalEventHandlers.instanceRuntimeType,
+  'HMDVRDevice': () => HmdvrDevice.instanceRuntimeType,
+  'HTMLAllCollection': () => _HTMLAllCollection.instanceRuntimeType,
+  'HTMLAnchorElement': () => AnchorElement.instanceRuntimeType,
+  'HTMLAppletElement': () => _HTMLAppletElement.instanceRuntimeType,
+  'HTMLAreaElement': () => AreaElement.instanceRuntimeType,
+  'HTMLAudioElement': () => AudioElement.instanceRuntimeType,
+  'HTMLBRElement': () => BRElement.instanceRuntimeType,
+  'HTMLBaseElement': () => BaseElement.instanceRuntimeType,
+  'HTMLBodyElement': () => BodyElement.instanceRuntimeType,
+  'HTMLButtonElement': () => ButtonElement.instanceRuntimeType,
+  'HTMLCanvasElement': () => CanvasElement.instanceRuntimeType,
+  'HTMLCollection': () => HtmlCollection.instanceRuntimeType,
+  'HTMLContentElement': () => ContentElement.instanceRuntimeType,
+  'HTMLDListElement': () => DListElement.instanceRuntimeType,
+  'HTMLDataListElement': () => DataListElement.instanceRuntimeType,
+  'HTMLDetailsElement': () => DetailsElement.instanceRuntimeType,
+  'HTMLDialogElement': () => DialogElement.instanceRuntimeType,
+  'HTMLDirectoryElement': () => _HTMLDirectoryElement.instanceRuntimeType,
+  'HTMLDivElement': () => DivElement.instanceRuntimeType,
+  'HTMLDocument': () => HtmlDocument.instanceRuntimeType,
+  'HTMLElement': () => HtmlElement.instanceRuntimeType,
+  'HTMLEmbedElement': () => EmbedElement.instanceRuntimeType,
+  'HTMLFieldSetElement': () => FieldSetElement.instanceRuntimeType,
+  'HTMLFontElement': () => _HTMLFontElement.instanceRuntimeType,
+  'HTMLFormControlsCollection': () => HtmlFormControlsCollection.instanceRuntimeType,
+  'HTMLFormElement': () => FormElement.instanceRuntimeType,
+  'HTMLFrameElement': () => _HTMLFrameElement.instanceRuntimeType,
+  'HTMLFrameSetElement': () => _HTMLFrameSetElement.instanceRuntimeType,
+  'HTMLHRElement': () => HRElement.instanceRuntimeType,
+  'HTMLHeadElement': () => HeadElement.instanceRuntimeType,
+  'HTMLHeadingElement': () => HeadingElement.instanceRuntimeType,
+  'HTMLHtmlElement': () => HtmlHtmlElement.instanceRuntimeType,
+  'HTMLIFrameElement': () => IFrameElement.instanceRuntimeType,
+  'HTMLImageElement': () => ImageElement.instanceRuntimeType,
+  'HTMLInputElement': () => InputElement.instanceRuntimeType,
+  'HTMLKeygenElement': () => KeygenElement.instanceRuntimeType,
+  'HTMLLIElement': () => LIElement.instanceRuntimeType,
+  'HTMLLabelElement': () => LabelElement.instanceRuntimeType,
+  'HTMLLegendElement': () => LegendElement.instanceRuntimeType,
+  'HTMLLinkElement': () => LinkElement.instanceRuntimeType,
+  'HTMLMapElement': () => MapElement.instanceRuntimeType,
+  'HTMLMarqueeElement': () => _HTMLMarqueeElement.instanceRuntimeType,
+  'HTMLMediaElement': () => MediaElement.instanceRuntimeType,
+  'HTMLMenuElement': () => MenuElement.instanceRuntimeType,
+  'HTMLMenuItemElement': () => MenuItemElement.instanceRuntimeType,
+  'HTMLMetaElement': () => MetaElement.instanceRuntimeType,
+  'HTMLMeterElement': () => MeterElement.instanceRuntimeType,
+  'HTMLModElement': () => ModElement.instanceRuntimeType,
+  'HTMLOListElement': () => OListElement.instanceRuntimeType,
+  'HTMLObjectElement': () => ObjectElement.instanceRuntimeType,
+  'HTMLOptGroupElement': () => OptGroupElement.instanceRuntimeType,
+  'HTMLOptionElement': () => OptionElement.instanceRuntimeType,
+  'HTMLOptionsCollection': () => HtmlOptionsCollection.instanceRuntimeType,
+  'HTMLOutputElement': () => OutputElement.instanceRuntimeType,
+  'HTMLParagraphElement': () => ParagraphElement.instanceRuntimeType,
+  'HTMLParamElement': () => ParamElement.instanceRuntimeType,
+  'HTMLPictureElement': () => PictureElement.instanceRuntimeType,
+  'HTMLPreElement': () => PreElement.instanceRuntimeType,
+  'HTMLProgressElement': () => ProgressElement.instanceRuntimeType,
+  'HTMLQuoteElement': () => QuoteElement.instanceRuntimeType,
+  'HTMLScriptElement': () => ScriptElement.instanceRuntimeType,
+  'HTMLSelectElement': () => SelectElement.instanceRuntimeType,
+  'HTMLShadowElement': () => ShadowElement.instanceRuntimeType,
+  'HTMLSourceElement': () => SourceElement.instanceRuntimeType,
+  'HTMLSpanElement': () => SpanElement.instanceRuntimeType,
+  'HTMLStyleElement': () => StyleElement.instanceRuntimeType,
+  'HTMLTableCaptionElement': () => TableCaptionElement.instanceRuntimeType,
+  'HTMLTableCellElement': () => TableCellElement.instanceRuntimeType,
+  'HTMLTableColElement': () => TableColElement.instanceRuntimeType,
+  'HTMLTableElement': () => TableElement.instanceRuntimeType,
+  'HTMLTableRowElement': () => TableRowElement.instanceRuntimeType,
+  'HTMLTableSectionElement': () => TableSectionElement.instanceRuntimeType,
+  'HTMLTemplateElement': () => TemplateElement.instanceRuntimeType,
+  'HTMLTextAreaElement': () => TextAreaElement.instanceRuntimeType,
+  'HTMLTitleElement': () => TitleElement.instanceRuntimeType,
+  'HTMLTrackElement': () => TrackElement.instanceRuntimeType,
+  'HTMLUListElement': () => UListElement.instanceRuntimeType,
+  'HTMLUnknownElement': () => UnknownElement.instanceRuntimeType,
+  'HTMLVideoElement': () => VideoElement.instanceRuntimeType,
+  'HashChangeEvent': () => HashChangeEvent.instanceRuntimeType,
+  'Headers': () => Headers.instanceRuntimeType,
+  'History': () => History.instanceRuntimeType,
+  'ImageBitmap': () => ImageBitmap.instanceRuntimeType,
+  'ImageData': () => ImageData.instanceRuntimeType,
+  'InjectedScriptHost': () => InjectedScriptHost.instanceRuntimeType,
+  'InputDevice': () => InputDevice.instanceRuntimeType,
+  'Iterator': () => DomIterator.instanceRuntimeType,
+  'KeyboardEvent': () => KeyboardEvent.instanceRuntimeType,
+  'KeyframeEffect': () => KeyframeEffect.instanceRuntimeType,
+  'Location': () => Location.instanceRuntimeType,
+  'MIDIAccess': () => MidiAccess.instanceRuntimeType,
+  'MIDIConnectionEvent': () => MidiConnectionEvent.instanceRuntimeType,
+  'MIDIInput': () => MidiInput.instanceRuntimeType,
+  'MIDIInputMap': () => MidiInputMap.instanceRuntimeType,
+  'MIDIMessageEvent': () => MidiMessageEvent.instanceRuntimeType,
+  'MIDIOutput': () => MidiOutput.instanceRuntimeType,
+  'MIDIOutputMap': () => MidiOutputMap.instanceRuntimeType,
+  'MIDIPort': () => MidiPort.instanceRuntimeType,
+  'MediaController': () => MediaController.instanceRuntimeType,
+  'MediaDeviceInfo': () => MediaDeviceInfo.instanceRuntimeType,
+  'MediaDevices': () => MediaDevices.instanceRuntimeType,
+  'MediaEncryptedEvent': () => MediaEncryptedEvent.instanceRuntimeType,
+  'MediaError': () => MediaError.instanceRuntimeType,
+  'MediaKeyError': () => MediaKeyError.instanceRuntimeType,
+  'MediaKeyEvent': () => MediaKeyEvent.instanceRuntimeType,
+  'MediaKeyMessageEvent': () => MediaKeyMessageEvent.instanceRuntimeType,
+  'MediaKeySession': () => MediaKeySession.instanceRuntimeType,
+  'MediaKeyStatusMap': () => MediaKeyStatusMap.instanceRuntimeType,
+  'MediaKeySystemAccess': () => MediaKeySystemAccess.instanceRuntimeType,
+  'MediaKeys': () => MediaKeys.instanceRuntimeType,
+  'MediaList': () => MediaList.instanceRuntimeType,
+  'MediaQueryList': () => MediaQueryList.instanceRuntimeType,
+  'MediaQueryListEvent': () => MediaQueryListEvent.instanceRuntimeType,
+  'MediaSession': () => MediaSession.instanceRuntimeType,
+  'MediaSource': () => MediaSource.instanceRuntimeType,
+  'MediaStream': () => MediaStream.instanceRuntimeType,
+  'MediaStreamEvent': () => MediaStreamEvent.instanceRuntimeType,
+  'MediaStreamTrack': () => MediaStreamTrack.instanceRuntimeType,
+  'MediaStreamTrackEvent': () => MediaStreamTrackEvent.instanceRuntimeType,
+  'MemoryInfo': () => MemoryInfo.instanceRuntimeType,
+  'MessageChannel': () => MessageChannel.instanceRuntimeType,
+  'MessageEvent': () => MessageEvent.instanceRuntimeType,
+  'MessagePort': () => MessagePort.instanceRuntimeType,
+  'Metadata': () => Metadata.instanceRuntimeType,
+  'MimeType': () => MimeType.instanceRuntimeType,
+  'MimeTypeArray': () => MimeTypeArray.instanceRuntimeType,
+  'MouseEvent': () => MouseEvent.instanceRuntimeType,
+  'MutationEvent': () => _MutationEvent.instanceRuntimeType,
+  'MutationObserver': () => MutationObserver.instanceRuntimeType,
+  'MutationRecord': () => MutationRecord.instanceRuntimeType,
+  'NamedNodeMap': () => _NamedNodeMap.instanceRuntimeType,
+  'Navigator': () => Navigator.instanceRuntimeType,
+  'NavigatorCPU': () => NavigatorCpu.instanceRuntimeType,
+  'NavigatorID': () => NavigatorID.instanceRuntimeType,
+  'NavigatorLanguage': () => NavigatorLanguage.instanceRuntimeType,
+  'NavigatorOnLine': () => NavigatorOnLine.instanceRuntimeType,
+  'NavigatorStorageUtils': () => NavigatorStorageUtils.instanceRuntimeType,
+  'NavigatorUserMediaError': () => NavigatorUserMediaError.instanceRuntimeType,
+  'NetworkInformation': () => NetworkInformation.instanceRuntimeType,
+  'Node': () => Node.instanceRuntimeType,
+  'NodeFilter': () => NodeFilter.instanceRuntimeType,
+  'NodeIterator': () => NodeIterator.instanceRuntimeType,
+  'NodeList': () => NodeList.instanceRuntimeType,
+  'NonDocumentTypeChildNode': () => NonDocumentTypeChildNode.instanceRuntimeType,
+  'NonElementParentNode': () => NonElementParentNode.instanceRuntimeType,
+  'Notification': () => Notification.instanceRuntimeType,
+  'NotificationEvent': () => NotificationEvent.instanceRuntimeType,
+  'PagePopupController': () => _PagePopupController.instanceRuntimeType,
+  'PageTransitionEvent': () => PageTransitionEvent.instanceRuntimeType,
+  'ParentNode': () => ParentNode.instanceRuntimeType,
+  'PasswordCredential': () => PasswordCredential.instanceRuntimeType,
+  'Path2D': () => Path2D.instanceRuntimeType,
+  'Performance': () => Performance.instanceRuntimeType,
+  'PerformanceCompositeTiming': () => PerformanceCompositeTiming.instanceRuntimeType,
+  'PerformanceEntry': () => PerformanceEntry.instanceRuntimeType,
+  'PerformanceMark': () => PerformanceMark.instanceRuntimeType,
+  'PerformanceMeasure': () => PerformanceMeasure.instanceRuntimeType,
+  'PerformanceNavigation': () => PerformanceNavigation.instanceRuntimeType,
+  'PerformanceRenderTiming': () => PerformanceRenderTiming.instanceRuntimeType,
+  'PerformanceResourceTiming': () => PerformanceResourceTiming.instanceRuntimeType,
+  'PerformanceTiming': () => PerformanceTiming.instanceRuntimeType,
+  'PeriodicSyncEvent': () => PeriodicSyncEvent.instanceRuntimeType,
+  'PeriodicSyncManager': () => PeriodicSyncManager.instanceRuntimeType,
+  'PeriodicSyncRegistration': () => PeriodicSyncRegistration.instanceRuntimeType,
+  'PermissionStatus': () => PermissionStatus.instanceRuntimeType,
+  'Permissions': () => Permissions.instanceRuntimeType,
+  'Plugin': () => Plugin.instanceRuntimeType,
+  'PluginArray': () => PluginArray.instanceRuntimeType,
+  'PluginPlaceholderElement': () => PluginPlaceholderElement.instanceRuntimeType,
+  'PointerEvent': () => PointerEvent.instanceRuntimeType,
+  'PopStateEvent': () => PopStateEvent.instanceRuntimeType,
+  'PositionError': () => PositionError.instanceRuntimeType,
+  'PositionSensorVRDevice': () => PositionSensorVRDevice.instanceRuntimeType,
+  'Presentation': () => Presentation.instanceRuntimeType,
+  'PresentationAvailability': () => PresentationAvailability.instanceRuntimeType,
+  'PresentationSession': () => PresentationSession.instanceRuntimeType,
+  'ProcessingInstruction': () => ProcessingInstruction.instanceRuntimeType,
+  'ProgressEvent': () => ProgressEvent.instanceRuntimeType,
+  'PromiseRejectionEvent': () => PromiseRejectionEvent.instanceRuntimeType,
+  'PushEvent': () => PushEvent.instanceRuntimeType,
+  'PushManager': () => PushManager.instanceRuntimeType,
+  'PushMessageData': () => PushMessageData.instanceRuntimeType,
+  'PushSubscription': () => PushSubscription.instanceRuntimeType,
+  'RTCDTMFSender': () => RtcDtmfSender.instanceRuntimeType,
+  'RTCDTMFToneChangeEvent': () => RtcDtmfToneChangeEvent.instanceRuntimeType,
+  'RTCDataChannel': () => RtcDataChannel.instanceRuntimeType,
+  'RTCDataChannelEvent': () => RtcDataChannelEvent.instanceRuntimeType,
+  'RTCIceCandidate': () => RtcIceCandidate.instanceRuntimeType,
+  'RTCIceCandidateEvent': () => RtcIceCandidateEvent.instanceRuntimeType,
+  'RTCPeerConnection': () => RtcPeerConnection.instanceRuntimeType,
+  'RTCSessionDescription': () => RtcSessionDescription.instanceRuntimeType,
+  'RTCStatsReport': () => RtcStatsReport.instanceRuntimeType,
+  'RTCStatsResponse': () => RtcStatsResponse.instanceRuntimeType,
+  'RadioNodeList': () => _RadioNodeList.instanceRuntimeType,
+  'Range': () => Range.instanceRuntimeType,
+  'ReadableByteStream': () => ReadableByteStream.instanceRuntimeType,
+  'ReadableByteStreamReader': () => ReadableByteStreamReader.instanceRuntimeType,
+  'ReadableStream': () => ReadableStream.instanceRuntimeType,
+  'ReadableStreamReader': () => ReadableStreamReader.instanceRuntimeType,
+  'RelatedEvent': () => RelatedEvent.instanceRuntimeType,
+  'Request': () => _Request.instanceRuntimeType,
+  'ResourceProgressEvent': () => ResourceProgressEvent.instanceRuntimeType,
+  'Response': () => _Response.instanceRuntimeType,
+  'Screen': () => Screen.instanceRuntimeType,
+  'ScreenOrientation': () => ScreenOrientation.instanceRuntimeType,
+  'ScrollState': () => ScrollState.instanceRuntimeType,
+  'SecurityPolicyViolationEvent': () => SecurityPolicyViolationEvent.instanceRuntimeType,
+  'Selection': () => Selection.instanceRuntimeType,
+  'ServicePort': () => ServicePort.instanceRuntimeType,
+  'ServicePortCollection': () => ServicePortCollection.instanceRuntimeType,
+  'ServicePortConnectEvent': () => ServicePortConnectEvent.instanceRuntimeType,
+  'ServiceWorker': () => _ServiceWorker.instanceRuntimeType,
+  'ServiceWorkerContainer': () => ServiceWorkerContainer.instanceRuntimeType,
+  'ServiceWorkerGlobalScope': () => ServiceWorkerGlobalScope.instanceRuntimeType,
+  'ServiceWorkerMessageEvent': () => ServiceWorkerMessageEvent.instanceRuntimeType,
+  'ServiceWorkerRegistration': () => ServiceWorkerRegistration.instanceRuntimeType,
+  'ShadowRoot': () => ShadowRoot.instanceRuntimeType,
+  'SharedArrayBuffer': () => SharedArrayBuffer.instanceRuntimeType,
+  'SharedWorker': () => SharedWorker.instanceRuntimeType,
+  'SharedWorkerGlobalScope': () => SharedWorkerGlobalScope.instanceRuntimeType,
+  'SourceBuffer': () => SourceBuffer.instanceRuntimeType,
+  'SourceBufferList': () => SourceBufferList.instanceRuntimeType,
+  'SourceInfo': () => SourceInfo.instanceRuntimeType,
+  'SpeechGrammar': () => SpeechGrammar.instanceRuntimeType,
+  'SpeechGrammarList': () => SpeechGrammarList.instanceRuntimeType,
+  'SpeechRecognition': () => SpeechRecognition.instanceRuntimeType,
+  'SpeechRecognitionAlternative': () => SpeechRecognitionAlternative.instanceRuntimeType,
+  'SpeechRecognitionError': () => SpeechRecognitionError.instanceRuntimeType,
+  'SpeechRecognitionEvent': () => SpeechRecognitionEvent.instanceRuntimeType,
+  'SpeechRecognitionResult': () => SpeechRecognitionResult.instanceRuntimeType,
+  'SpeechRecognitionResultList': () => _SpeechRecognitionResultList.instanceRuntimeType,
+  'SpeechSynthesis': () => SpeechSynthesis.instanceRuntimeType,
+  'SpeechSynthesisEvent': () => SpeechSynthesisEvent.instanceRuntimeType,
+  'SpeechSynthesisUtterance': () => SpeechSynthesisUtterance.instanceRuntimeType,
+  'SpeechSynthesisVoice': () => SpeechSynthesisVoice.instanceRuntimeType,
+  'StashedMessagePort': () => StashedMessagePort.instanceRuntimeType,
+  'StashedPortCollection': () => StashedPortCollection.instanceRuntimeType,
+  'Storage': () => Storage.instanceRuntimeType,
+  'StorageEvent': () => StorageEvent.instanceRuntimeType,
+  'StorageInfo': () => StorageInfo.instanceRuntimeType,
+  'StorageQuota': () => StorageQuota.instanceRuntimeType,
+  'Stream': () => FileStream.instanceRuntimeType,
+  'StyleMedia': () => StyleMedia.instanceRuntimeType,
+  'StyleSheet': () => StyleSheet.instanceRuntimeType,
+  'StyleSheetList': () => _StyleSheetList.instanceRuntimeType,
+  'SubtleCrypto': () => _SubtleCrypto.instanceRuntimeType,
+  'SyncEvent': () => SyncEvent.instanceRuntimeType,
+  'SyncManager': () => SyncManager.instanceRuntimeType,
+  'SyncRegistration': () => SyncRegistration.instanceRuntimeType,
+  'Text': () => Text.instanceRuntimeType,
+  'TextEvent': () => TextEvent.instanceRuntimeType,
+  'TextMetrics': () => TextMetrics.instanceRuntimeType,
+  'TextTrack': () => TextTrack.instanceRuntimeType,
+  'TextTrackCue': () => TextTrackCue.instanceRuntimeType,
+  'TextTrackCueList': () => TextTrackCueList.instanceRuntimeType,
+  'TextTrackList': () => TextTrackList.instanceRuntimeType,
+  'TimeRanges': () => TimeRanges.instanceRuntimeType,
+  'Touch': () => Touch.instanceRuntimeType,
+  'TouchEvent': () => TouchEvent.instanceRuntimeType,
+  'TouchList': () => TouchList.instanceRuntimeType,
+  'TrackDefault': () => TrackDefault.instanceRuntimeType,
+  'TrackDefaultList': () => TrackDefaultList.instanceRuntimeType,
+  'TrackEvent': () => TrackEvent.instanceRuntimeType,
+  'TransitionEvent': () => TransitionEvent.instanceRuntimeType,
+  'TreeWalker': () => TreeWalker.instanceRuntimeType,
+  'UIEvent': () => UIEvent.instanceRuntimeType,
+  'URL': () => Url.instanceRuntimeType,
+  'URLUtils': () => UrlUtils.instanceRuntimeType,
+  'URLUtilsReadOnly': () => UrlUtilsReadOnly.instanceRuntimeType,
+  'VRDevice': () => VRDevice.instanceRuntimeType,
+  'VREyeParameters': () => VREyeParameters.instanceRuntimeType,
+  'VRFieldOfView': () => VRFieldOfView.instanceRuntimeType,
+  'VRPositionState': () => VRPositionState.instanceRuntimeType,
+  'VTTCue': () => VttCue.instanceRuntimeType,
+  'VTTRegion': () => VttRegion.instanceRuntimeType,
+  'VTTRegionList': () => VttRegionList.instanceRuntimeType,
+  'ValidityState': () => ValidityState.instanceRuntimeType,
+  'VideoPlaybackQuality': () => VideoPlaybackQuality.instanceRuntimeType,
+  'VideoTrack': () => VideoTrack.instanceRuntimeType,
+  'VideoTrackList': () => VideoTrackList.instanceRuntimeType,
+  'WebKitCSSMatrix': () => _WebKitCSSMatrix.instanceRuntimeType,
+  'WebSocket': () => WebSocket.instanceRuntimeType,
+  'WheelEvent': () => WheelEvent.instanceRuntimeType,
+  'Window': () => Window.instanceRuntimeType,
+  'WindowBase64': () => WindowBase64.instanceRuntimeType,
+  'WindowClient': () => WindowClient.instanceRuntimeType,
+  'WindowEventHandlers': () => WindowEventHandlers.instanceRuntimeType,
+  'WindowTimers': () => _WindowTimers.instanceRuntimeType,
+  'Worker': () => Worker.instanceRuntimeType,
+  'WorkerConsole': () => WorkerConsole.instanceRuntimeType,
+  'WorkerGlobalScope': () => WorkerGlobalScope.instanceRuntimeType,
+  'WorkerLocation': () => _WorkerLocation.instanceRuntimeType,
+  'WorkerNavigator': () => _WorkerNavigator.instanceRuntimeType,
+  'WorkerPerformance': () => WorkerPerformance.instanceRuntimeType,
+  'XMLDocument': () => XmlDocument.instanceRuntimeType,
+  'XMLHttpRequest': () => HttpRequest.instanceRuntimeType,
+  'XMLHttpRequestEventTarget': () => HttpRequestEventTarget.instanceRuntimeType,
+  'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent.instanceRuntimeType,
+  'XMLHttpRequestUpload': () => HttpRequestUpload.instanceRuntimeType,
+  'XMLSerializer': () => XmlSerializer.instanceRuntimeType,
+  'XPathEvaluator': () => XPathEvaluator.instanceRuntimeType,
+  'XPathExpression': () => XPathExpression.instanceRuntimeType,
+  'XPathNSResolver': () => XPathNSResolver.instanceRuntimeType,
+  'XPathResult': () => XPathResult.instanceRuntimeType,
+  'XSLTProcessor': () => XsltProcessor.instanceRuntimeType,
 
 };
 
 // TODO(leafp): We may want to move this elsewhere if html becomes
 // a package to avoid dartium depending on pkg:html.
+@Deprecated("Internal Use Only")
+getHtmlCreateType(String key) => _getType(key);
+
 Type _getType(String key) {
   var result;
 
@@ -621,486 +673,45 @@
   return null;
 }
 
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final htmlBlinkFunctionMap = {
-  'Animation': () => Animation.internalCreateAnimation,
-  'AnimationEffect': () => AnimationEffect.internalCreateAnimationEffect,
-  'AnimationNode': () => AnimationNode.internalCreateAnimationNode,
-  'AnimationPlayer': () => AnimationPlayer.internalCreateAnimationPlayer,
-  'AnimationPlayerEvent': () => AnimationPlayerEvent.internalCreateAnimationPlayerEvent,
-  'AnimationTimeline': () => AnimationTimeline.internalCreateAnimationTimeline,
-  'ApplicationCache': () => ApplicationCache.internalCreateApplicationCache,
-  'ApplicationCacheErrorEvent': () => ApplicationCacheErrorEvent.internalCreateApplicationCacheErrorEvent,
-  'Attr': () => _Attr.internalCreate_Attr,
-  'AudioTrack': () => AudioTrack.internalCreateAudioTrack,
-  'AudioTrackList': () => AudioTrackList.internalCreateAudioTrackList,
-  'AutocompleteErrorEvent': () => AutocompleteErrorEvent.internalCreateAutocompleteErrorEvent,
-  'BarProp': () => BarProp.internalCreateBarProp,
-  'BatteryManager': () => BatteryManager.internalCreateBatteryManager,
-  'BeforeUnloadEvent': () => BeforeUnloadEvent.internalCreateBeforeUnloadEvent,
-  'Blob': () => Blob.internalCreateBlob,
-  'Body': () => Body.internalCreateBody,
-  'CDATASection': () => CDataSection.internalCreateCDataSection,
-  'CSS': () => Css.internalCreateCss,
-  'CSSCharsetRule': () => CssCharsetRule.internalCreateCssCharsetRule,
-  'CSSFontFaceRule': () => CssFontFaceRule.internalCreateCssFontFaceRule,
-  'CSSImportRule': () => CssImportRule.internalCreateCssImportRule,
-  'CSSKeyframeRule': () => CssKeyframeRule.internalCreateCssKeyframeRule,
-  'CSSKeyframesRule': () => CssKeyframesRule.internalCreateCssKeyframesRule,
-  'CSSMediaRule': () => CssMediaRule.internalCreateCssMediaRule,
-  'CSSPageRule': () => CssPageRule.internalCreateCssPageRule,
-  'CSSPrimitiveValue': () => _CSSPrimitiveValue.internalCreate_CSSPrimitiveValue,
-  'CSSRule': () => CssRule.internalCreateCssRule,
-  'CSSRuleList': () => _CssRuleList.internalCreate_CssRuleList,
-  'CSSStyleDeclaration': () => CssStyleDeclaration.internalCreateCssStyleDeclaration,
-  'CSSStyleRule': () => CssStyleRule.internalCreateCssStyleRule,
-  'CSSStyleSheet': () => CssStyleSheet.internalCreateCssStyleSheet,
-  'CSSSupportsRule': () => CssSupportsRule.internalCreateCssSupportsRule,
-  'CSSUnknownRule': () => _CSSUnknownRule.internalCreate_CSSUnknownRule,
-  'CSSValue': () => _CSSValue.internalCreate_CSSValue,
-  'CSSValueList': () => _CssValueList.internalCreate_CssValueList,
-  'CSSViewportRule': () => CssViewportRule.internalCreateCssViewportRule,
-  'Cache': () => _Cache.internalCreate_Cache,
-  'CacheStorage': () => CacheStorage.internalCreateCacheStorage,
-  'Canvas2DContextAttributes': () => Canvas2DContextAttributes.internalCreateCanvas2DContextAttributes,
-  'CanvasGradient': () => CanvasGradient.internalCreateCanvasGradient,
-  'CanvasPattern': () => CanvasPattern.internalCreateCanvasPattern,
-  'CanvasRenderingContext2D': () => CanvasRenderingContext2D.internalCreateCanvasRenderingContext2D,
-  'CharacterData': () => CharacterData.internalCreateCharacterData,
-  'CircularGeofencingRegion': () => CircularGeofencingRegion.internalCreateCircularGeofencingRegion,
-  'ClientRect': () => _ClientRect.internalCreate_ClientRect,
-  'ClientRectList': () => _ClientRectList.internalCreate_ClientRectList,
-  'CloseEvent': () => CloseEvent.internalCreateCloseEvent,
-  'Comment': () => Comment.internalCreateComment,
-  'CompositionEvent': () => CompositionEvent.internalCreateCompositionEvent,
-  'Console': () => Console.internalCreateConsole,
-  'ConsoleBase': () => ConsoleBase.internalCreateConsoleBase,
-  'Coordinates': () => Coordinates.internalCreateCoordinates,
-  'Counter': () => _Counter.internalCreate_Counter,
-  'Credential': () => Credential.internalCreateCredential,
-  'CredentialsContainer': () => CredentialsContainer.internalCreateCredentialsContainer,
-  'Crypto': () => Crypto.internalCreateCrypto,
-  'CryptoKey': () => CryptoKey.internalCreateCryptoKey,
-  'CustomEvent': () => CustomEvent.internalCreateCustomEvent,
-  'DOMError': () => DomError.internalCreateDomError,
-  'DOMException': () => DomException.internalCreateDomException,
-  'DOMFileSystem': () => FileSystem.internalCreateFileSystem,
-  'DOMFileSystemSync': () => _DOMFileSystemSync.internalCreate_DOMFileSystemSync,
-  'DOMImplementation': () => DomImplementation.internalCreateDomImplementation,
-  'DOMMatrix': () => DomMatrix.internalCreateDomMatrix,
-  'DOMMatrixReadOnly': () => DomMatrixReadOnly.internalCreateDomMatrixReadOnly,
-  'DOMParser': () => DomParser.internalCreateDomParser,
-  'DOMPoint': () => DomPoint.internalCreateDomPoint,
-  'DOMPointReadOnly': () => DomPointReadOnly.internalCreateDomPointReadOnly,
-  'DOMRect': () => _DomRect.internalCreate_DomRect,
-  'DOMRectReadOnly': () => DomRectReadOnly.internalCreateDomRectReadOnly,
-  'DOMSettableTokenList': () => DomSettableTokenList.internalCreateDomSettableTokenList,
-  'DOMStringList': () => DomStringList.internalCreateDomStringList,
-  'DOMTokenList': () => DomTokenList.internalCreateDomTokenList,
-  'DataTransfer': () => DataTransfer.internalCreateDataTransfer,
-  'DataTransferItem': () => DataTransferItem.internalCreateDataTransferItem,
-  'DataTransferItemList': () => DataTransferItemList.internalCreateDataTransferItemList,
-  'DedicatedWorkerGlobalScope': () => DedicatedWorkerGlobalScope.internalCreateDedicatedWorkerGlobalScope,
-  'DeprecatedStorageInfo': () => DeprecatedStorageInfo.internalCreateDeprecatedStorageInfo,
-  'DeprecatedStorageQuota': () => DeprecatedStorageQuota.internalCreateDeprecatedStorageQuota,
-  'DeviceAcceleration': () => DeviceAcceleration.internalCreateDeviceAcceleration,
-  'DeviceLightEvent': () => DeviceLightEvent.internalCreateDeviceLightEvent,
-  'DeviceMotionEvent': () => DeviceMotionEvent.internalCreateDeviceMotionEvent,
-  'DeviceOrientationEvent': () => DeviceOrientationEvent.internalCreateDeviceOrientationEvent,
-  'DeviceRotationRate': () => DeviceRotationRate.internalCreateDeviceRotationRate,
-  'DirectoryEntry': () => DirectoryEntry.internalCreateDirectoryEntry,
-  'DirectoryEntrySync': () => _DirectoryEntrySync.internalCreate_DirectoryEntrySync,
-  'DirectoryReader': () => DirectoryReader.internalCreateDirectoryReader,
-  'DirectoryReaderSync': () => _DirectoryReaderSync.internalCreate_DirectoryReaderSync,
-  'Document': () => Document.internalCreateDocument,
-  'DocumentFragment': () => DocumentFragment.internalCreateDocumentFragment,
-  'DocumentType': () => _DocumentType.internalCreate_DocumentType,
-  'Element': () => Element.internalCreateElement,
-  'Entry': () => Entry.internalCreateEntry,
-  'EntrySync': () => _EntrySync.internalCreate_EntrySync,
-  'ErrorEvent': () => ErrorEvent.internalCreateErrorEvent,
-  'Event': () => Event.internalCreateEvent,
-  'EventSource': () => EventSource.internalCreateEventSource,
-  'EventTarget': () => EventTarget.internalCreateEventTarget,
-  'ExtendableEvent': () => ExtendableEvent.internalCreateExtendableEvent,
-  'FederatedCredential': () => FederatedCredential.internalCreateFederatedCredential,
-  'FetchEvent': () => FetchEvent.internalCreateFetchEvent,
-  'File': () => File.internalCreateFile,
-  'FileEntry': () => FileEntry.internalCreateFileEntry,
-  'FileEntrySync': () => _FileEntrySync.internalCreate_FileEntrySync,
-  'FileError': () => FileError.internalCreateFileError,
-  'FileList': () => FileList.internalCreateFileList,
-  'FileReader': () => FileReader.internalCreateFileReader,
-  'FileReaderSync': () => _FileReaderSync.internalCreate_FileReaderSync,
-  'FileWriter': () => FileWriter.internalCreateFileWriter,
-  'FileWriterSync': () => _FileWriterSync.internalCreate_FileWriterSync,
-  'FocusEvent': () => FocusEvent.internalCreateFocusEvent,
-  'FontFace': () => FontFace.internalCreateFontFace,
-  'FontFaceSet': () => FontFaceSet.internalCreateFontFaceSet,
-  'FontFaceSetLoadEvent': () => FontFaceSetLoadEvent.internalCreateFontFaceSetLoadEvent,
-  'FormData': () => FormData.internalCreateFormData,
-  'Gamepad': () => Gamepad.internalCreateGamepad,
-  'GamepadButton': () => GamepadButton.internalCreateGamepadButton,
-  'GamepadEvent': () => GamepadEvent.internalCreateGamepadEvent,
-  'GamepadList': () => _GamepadList.internalCreate_GamepadList,
-  'Geofencing': () => Geofencing.internalCreateGeofencing,
-  'GeofencingRegion': () => GeofencingRegion.internalCreateGeofencingRegion,
-  'Geolocation': () => Geolocation.internalCreateGeolocation,
-  'Geoposition': () => Geoposition.internalCreateGeoposition,
-  'HTMLAllCollection': () => _HTMLAllCollection.internalCreate_HTMLAllCollection,
-  'HTMLAnchorElement': () => AnchorElement.internalCreateAnchorElement,
-  'HTMLAppletElement': () => _HTMLAppletElement.internalCreate_HTMLAppletElement,
-  'HTMLAreaElement': () => AreaElement.internalCreateAreaElement,
-  'HTMLAudioElement': () => AudioElement.internalCreateAudioElement,
-  'HTMLBRElement': () => BRElement.internalCreateBRElement,
-  'HTMLBaseElement': () => BaseElement.internalCreateBaseElement,
-  'HTMLBodyElement': () => BodyElement.internalCreateBodyElement,
-  'HTMLButtonElement': () => ButtonElement.internalCreateButtonElement,
-  'HTMLCanvasElement': () => CanvasElement.internalCreateCanvasElement,
-  'HTMLCollection': () => HtmlCollection.internalCreateHtmlCollection,
-  'HTMLContentElement': () => ContentElement.internalCreateContentElement,
-  'HTMLDListElement': () => DListElement.internalCreateDListElement,
-  'HTMLDataListElement': () => DataListElement.internalCreateDataListElement,
-  'HTMLDetailsElement': () => DetailsElement.internalCreateDetailsElement,
-  'HTMLDialogElement': () => DialogElement.internalCreateDialogElement,
-  'HTMLDirectoryElement': () => _HTMLDirectoryElement.internalCreate_HTMLDirectoryElement,
-  'HTMLDivElement': () => DivElement.internalCreateDivElement,
-  'HTMLDocument': () => HtmlDocument.internalCreateHtmlDocument,
-  'HTMLElement': () => HtmlElement.internalCreateHtmlElement,
-  'HTMLEmbedElement': () => EmbedElement.internalCreateEmbedElement,
-  'HTMLFieldSetElement': () => FieldSetElement.internalCreateFieldSetElement,
-  'HTMLFontElement': () => _HTMLFontElement.internalCreate_HTMLFontElement,
-  'HTMLFormControlsCollection': () => HtmlFormControlsCollection.internalCreateHtmlFormControlsCollection,
-  'HTMLFormElement': () => FormElement.internalCreateFormElement,
-  'HTMLFrameElement': () => _HTMLFrameElement.internalCreate_HTMLFrameElement,
-  'HTMLFrameSetElement': () => _HTMLFrameSetElement.internalCreate_HTMLFrameSetElement,
-  'HTMLHRElement': () => HRElement.internalCreateHRElement,
-  'HTMLHeadElement': () => HeadElement.internalCreateHeadElement,
-  'HTMLHeadingElement': () => HeadingElement.internalCreateHeadingElement,
-  'HTMLHtmlElement': () => HtmlHtmlElement.internalCreateHtmlHtmlElement,
-  'HTMLIFrameElement': () => IFrameElement.internalCreateIFrameElement,
-  'HTMLImageElement': () => ImageElement.internalCreateImageElement,
-  'HTMLInputElement': () => InputElement.internalCreateInputElement,
-  'HTMLKeygenElement': () => KeygenElement.internalCreateKeygenElement,
-  'HTMLLIElement': () => LIElement.internalCreateLIElement,
-  'HTMLLabelElement': () => LabelElement.internalCreateLabelElement,
-  'HTMLLegendElement': () => LegendElement.internalCreateLegendElement,
-  'HTMLLinkElement': () => LinkElement.internalCreateLinkElement,
-  'HTMLMapElement': () => MapElement.internalCreateMapElement,
-  'HTMLMarqueeElement': () => _HTMLMarqueeElement.internalCreate_HTMLMarqueeElement,
-  'HTMLMediaElement': () => MediaElement.internalCreateMediaElement,
-  'HTMLMenuElement': () => MenuElement.internalCreateMenuElement,
-  'HTMLMenuItemElement': () => MenuItemElement.internalCreateMenuItemElement,
-  'HTMLMetaElement': () => MetaElement.internalCreateMetaElement,
-  'HTMLMeterElement': () => MeterElement.internalCreateMeterElement,
-  'HTMLModElement': () => ModElement.internalCreateModElement,
-  'HTMLOListElement': () => OListElement.internalCreateOListElement,
-  'HTMLObjectElement': () => ObjectElement.internalCreateObjectElement,
-  'HTMLOptGroupElement': () => OptGroupElement.internalCreateOptGroupElement,
-  'HTMLOptionElement': () => OptionElement.internalCreateOptionElement,
-  'HTMLOptionsCollection': () => HtmlOptionsCollection.internalCreateHtmlOptionsCollection,
-  'HTMLOutputElement': () => OutputElement.internalCreateOutputElement,
-  'HTMLParagraphElement': () => ParagraphElement.internalCreateParagraphElement,
-  'HTMLParamElement': () => ParamElement.internalCreateParamElement,
-  'HTMLPictureElement': () => PictureElement.internalCreatePictureElement,
-  'HTMLPreElement': () => PreElement.internalCreatePreElement,
-  'HTMLProgressElement': () => ProgressElement.internalCreateProgressElement,
-  'HTMLQuoteElement': () => QuoteElement.internalCreateQuoteElement,
-  'HTMLScriptElement': () => ScriptElement.internalCreateScriptElement,
-  'HTMLSelectElement': () => SelectElement.internalCreateSelectElement,
-  'HTMLShadowElement': () => ShadowElement.internalCreateShadowElement,
-  'HTMLSourceElement': () => SourceElement.internalCreateSourceElement,
-  'HTMLSpanElement': () => SpanElement.internalCreateSpanElement,
-  'HTMLStyleElement': () => StyleElement.internalCreateStyleElement,
-  'HTMLTableCaptionElement': () => TableCaptionElement.internalCreateTableCaptionElement,
-  'HTMLTableCellElement': () => TableCellElement.internalCreateTableCellElement,
-  'HTMLTableColElement': () => TableColElement.internalCreateTableColElement,
-  'HTMLTableElement': () => TableElement.internalCreateTableElement,
-  'HTMLTableRowElement': () => TableRowElement.internalCreateTableRowElement,
-  'HTMLTableSectionElement': () => TableSectionElement.internalCreateTableSectionElement,
-  'HTMLTemplateElement': () => TemplateElement.internalCreateTemplateElement,
-  'HTMLTextAreaElement': () => TextAreaElement.internalCreateTextAreaElement,
-  'HTMLTitleElement': () => TitleElement.internalCreateTitleElement,
-  'HTMLTrackElement': () => TrackElement.internalCreateTrackElement,
-  'HTMLUListElement': () => UListElement.internalCreateUListElement,
-  'HTMLUnknownElement': () => UnknownElement.internalCreateUnknownElement,
-  'HTMLVideoElement': () => VideoElement.internalCreateVideoElement,
-  'HashChangeEvent': () => HashChangeEvent.internalCreateHashChangeEvent,
-  'Headers': () => Headers.internalCreateHeaders,
-  'History': () => History.internalCreateHistory,
-  'ImageBitmap': () => ImageBitmap.internalCreateImageBitmap,
-  'ImageData': () => ImageData.internalCreateImageData,
-  'InjectedScriptHost': () => InjectedScriptHost.internalCreateInjectedScriptHost,
-  'InputMethodContext': () => InputMethodContext.internalCreateInputMethodContext,
-  'InstallEvent': () => InstallEvent.internalCreateInstallEvent,
-  'Iterator': () => DomIterator.internalCreateDomIterator,
-  'KeyboardEvent': () => KeyboardEvent.internalCreateKeyboardEvent,
-  'LocalCredential': () => LocalCredential.internalCreateLocalCredential,
-  'Location': () => Location.internalCreateLocation,
-  'MIDIAccess': () => MidiAccess.internalCreateMidiAccess,
-  'MIDIConnectionEvent': () => MidiConnectionEvent.internalCreateMidiConnectionEvent,
-  'MIDIInput': () => MidiInput.internalCreateMidiInput,
-  'MIDIInputMap': () => MidiInputMap.internalCreateMidiInputMap,
-  'MIDIMessageEvent': () => MidiMessageEvent.internalCreateMidiMessageEvent,
-  'MIDIOutput': () => MidiOutput.internalCreateMidiOutput,
-  'MIDIOutputMap': () => MidiOutputMap.internalCreateMidiOutputMap,
-  'MIDIPort': () => MidiPort.internalCreateMidiPort,
-  'MediaController': () => MediaController.internalCreateMediaController,
-  'MediaDeviceInfo': () => MediaDeviceInfo.internalCreateMediaDeviceInfo,
-  'MediaError': () => MediaError.internalCreateMediaError,
-  'MediaKeyError': () => MediaKeyError.internalCreateMediaKeyError,
-  'MediaKeyEvent': () => MediaKeyEvent.internalCreateMediaKeyEvent,
-  'MediaKeyMessageEvent': () => MediaKeyMessageEvent.internalCreateMediaKeyMessageEvent,
-  'MediaKeyNeededEvent': () => MediaKeyNeededEvent.internalCreateMediaKeyNeededEvent,
-  'MediaKeySession': () => MediaKeySession.internalCreateMediaKeySession,
-  'MediaKeys': () => MediaKeys.internalCreateMediaKeys,
-  'MediaList': () => MediaList.internalCreateMediaList,
-  'MediaQueryList': () => MediaQueryList.internalCreateMediaQueryList,
-  'MediaQueryListEvent': () => MediaQueryListEvent.internalCreateMediaQueryListEvent,
-  'MediaSource': () => MediaSource.internalCreateMediaSource,
-  'MediaStream': () => MediaStream.internalCreateMediaStream,
-  'MediaStreamEvent': () => MediaStreamEvent.internalCreateMediaStreamEvent,
-  'MediaStreamTrack': () => MediaStreamTrack.internalCreateMediaStreamTrack,
-  'MediaStreamTrackEvent': () => MediaStreamTrackEvent.internalCreateMediaStreamTrackEvent,
-  'MemoryInfo': () => MemoryInfo.internalCreateMemoryInfo,
-  'MessageChannel': () => MessageChannel.internalCreateMessageChannel,
-  'MessageEvent': () => MessageEvent.internalCreateMessageEvent,
-  'MessagePort': () => MessagePort.internalCreateMessagePort,
-  'Metadata': () => Metadata.internalCreateMetadata,
-  'MimeType': () => MimeType.internalCreateMimeType,
-  'MimeTypeArray': () => MimeTypeArray.internalCreateMimeTypeArray,
-  'MouseEvent': () => MouseEvent.internalCreateMouseEvent,
-  'MutationEvent': () => _MutationEvent.internalCreate_MutationEvent,
-  'MutationObserver': () => MutationObserver.internalCreateMutationObserver,
-  'MutationRecord': () => MutationRecord.internalCreateMutationRecord,
-  'NamedNodeMap': () => _NamedNodeMap.internalCreate_NamedNodeMap,
-  'Navigator': () => Navigator.internalCreateNavigator,
-  'NavigatorUserMediaError': () => NavigatorUserMediaError.internalCreateNavigatorUserMediaError,
-  'NetworkInformation': () => NetworkInformation.internalCreateNetworkInformation,
-  'Node': () => Node.internalCreateNode,
-  'NodeFilter': () => NodeFilter.internalCreateNodeFilter,
-  'NodeIterator': () => NodeIterator.internalCreateNodeIterator,
-  'NodeList': () => NodeList.internalCreateNodeList,
-  'Notification': () => Notification.internalCreateNotification,
-  'OverflowEvent': () => OverflowEvent.internalCreateOverflowEvent,
-  'PagePopupController': () => _PagePopupController.internalCreate_PagePopupController,
-  'PageTransitionEvent': () => PageTransitionEvent.internalCreatePageTransitionEvent,
-  'Path2D': () => Path2D.internalCreatePath2D,
-  'Performance': () => Performance.internalCreatePerformance,
-  'PerformanceEntry': () => PerformanceEntry.internalCreatePerformanceEntry,
-  'PerformanceMark': () => PerformanceMark.internalCreatePerformanceMark,
-  'PerformanceMeasure': () => PerformanceMeasure.internalCreatePerformanceMeasure,
-  'PerformanceNavigation': () => PerformanceNavigation.internalCreatePerformanceNavigation,
-  'PerformanceResourceTiming': () => PerformanceResourceTiming.internalCreatePerformanceResourceTiming,
-  'PerformanceTiming': () => PerformanceTiming.internalCreatePerformanceTiming,
-  'Plugin': () => Plugin.internalCreatePlugin,
-  'PluginArray': () => PluginArray.internalCreatePluginArray,
-  'PluginPlaceholderElement': () => PluginPlaceholderElement.internalCreatePluginPlaceholderElement,
-  'PopStateEvent': () => PopStateEvent.internalCreatePopStateEvent,
-  'PositionError': () => PositionError.internalCreatePositionError,
-  'Presentation': () => Presentation.internalCreatePresentation,
-  'ProcessingInstruction': () => ProcessingInstruction.internalCreateProcessingInstruction,
-  'ProgressEvent': () => ProgressEvent.internalCreateProgressEvent,
-  'PushEvent': () => PushEvent.internalCreatePushEvent,
-  'PushManager': () => PushManager.internalCreatePushManager,
-  'PushRegistration': () => PushRegistration.internalCreatePushRegistration,
-  'RGBColor': () => _RGBColor.internalCreate_RGBColor,
-  'RTCDTMFSender': () => RtcDtmfSender.internalCreateRtcDtmfSender,
-  'RTCDTMFToneChangeEvent': () => RtcDtmfToneChangeEvent.internalCreateRtcDtmfToneChangeEvent,
-  'RTCDataChannel': () => RtcDataChannel.internalCreateRtcDataChannel,
-  'RTCDataChannelEvent': () => RtcDataChannelEvent.internalCreateRtcDataChannelEvent,
-  'RTCIceCandidate': () => RtcIceCandidate.internalCreateRtcIceCandidate,
-  'RTCIceCandidateEvent': () => RtcIceCandidateEvent.internalCreateRtcIceCandidateEvent,
-  'RTCPeerConnection': () => RtcPeerConnection.internalCreateRtcPeerConnection,
-  'RTCSessionDescription': () => RtcSessionDescription.internalCreateRtcSessionDescription,
-  'RTCStatsReport': () => RtcStatsReport.internalCreateRtcStatsReport,
-  'RTCStatsResponse': () => RtcStatsResponse.internalCreateRtcStatsResponse,
-  'RadioNodeList': () => _RadioNodeList.internalCreate_RadioNodeList,
-  'Range': () => Range.internalCreateRange,
-  'ReadableStream': () => ReadableStream.internalCreateReadableStream,
-  'Rect': () => _Rect.internalCreate_Rect,
-  'RelatedEvent': () => RelatedEvent.internalCreateRelatedEvent,
-  'Request': () => _Request.internalCreate_Request,
-  'ResourceProgressEvent': () => ResourceProgressEvent.internalCreateResourceProgressEvent,
-  'Response': () => _Response.internalCreate_Response,
-  'Screen': () => Screen.internalCreateScreen,
-  'ScreenOrientation': () => ScreenOrientation.internalCreateScreenOrientation,
-  'SecurityPolicyViolationEvent': () => SecurityPolicyViolationEvent.internalCreateSecurityPolicyViolationEvent,
-  'Selection': () => Selection.internalCreateSelection,
-  'ServiceWorker': () => _ServiceWorker.internalCreate_ServiceWorker,
-  'ServiceWorkerClient': () => ServiceWorkerClient.internalCreateServiceWorkerClient,
-  'ServiceWorkerClients': () => ServiceWorkerClients.internalCreateServiceWorkerClients,
-  'ServiceWorkerContainer': () => ServiceWorkerContainer.internalCreateServiceWorkerContainer,
-  'ServiceWorkerGlobalScope': () => ServiceWorkerGlobalScope.internalCreateServiceWorkerGlobalScope,
-  'ServiceWorkerRegistration': () => ServiceWorkerRegistration.internalCreateServiceWorkerRegistration,
-  'ShadowRoot': () => ShadowRoot.internalCreateShadowRoot,
-  'SharedWorker': () => SharedWorker.internalCreateSharedWorker,
-  'SharedWorkerGlobalScope': () => SharedWorkerGlobalScope.internalCreateSharedWorkerGlobalScope,
-  'SourceBuffer': () => SourceBuffer.internalCreateSourceBuffer,
-  'SourceBufferList': () => SourceBufferList.internalCreateSourceBufferList,
-  'SourceInfo': () => SourceInfo.internalCreateSourceInfo,
-  'SpeechGrammar': () => SpeechGrammar.internalCreateSpeechGrammar,
-  'SpeechGrammarList': () => SpeechGrammarList.internalCreateSpeechGrammarList,
-  'SpeechRecognition': () => SpeechRecognition.internalCreateSpeechRecognition,
-  'SpeechRecognitionAlternative': () => SpeechRecognitionAlternative.internalCreateSpeechRecognitionAlternative,
-  'SpeechRecognitionError': () => SpeechRecognitionError.internalCreateSpeechRecognitionError,
-  'SpeechRecognitionEvent': () => SpeechRecognitionEvent.internalCreateSpeechRecognitionEvent,
-  'SpeechRecognitionResult': () => SpeechRecognitionResult.internalCreateSpeechRecognitionResult,
-  'SpeechRecognitionResultList': () => _SpeechRecognitionResultList.internalCreate_SpeechRecognitionResultList,
-  'SpeechSynthesis': () => SpeechSynthesis.internalCreateSpeechSynthesis,
-  'SpeechSynthesisEvent': () => SpeechSynthesisEvent.internalCreateSpeechSynthesisEvent,
-  'SpeechSynthesisUtterance': () => SpeechSynthesisUtterance.internalCreateSpeechSynthesisUtterance,
-  'SpeechSynthesisVoice': () => SpeechSynthesisVoice.internalCreateSpeechSynthesisVoice,
-  'Storage': () => Storage.internalCreateStorage,
-  'StorageEvent': () => StorageEvent.internalCreateStorageEvent,
-  'StorageInfo': () => StorageInfo.internalCreateStorageInfo,
-  'StorageQuota': () => StorageQuota.internalCreateStorageQuota,
-  'Stream': () => FileStream.internalCreateFileStream,
-  'StyleMedia': () => StyleMedia.internalCreateStyleMedia,
-  'StyleSheet': () => StyleSheet.internalCreateStyleSheet,
-  'StyleSheetList': () => _StyleSheetList.internalCreate_StyleSheetList,
-  'SubtleCrypto': () => _SubtleCrypto.internalCreate_SubtleCrypto,
-  'Text': () => Text.internalCreateText,
-  'TextEvent': () => TextEvent.internalCreateTextEvent,
-  'TextMetrics': () => TextMetrics.internalCreateTextMetrics,
-  'TextTrack': () => TextTrack.internalCreateTextTrack,
-  'TextTrackCue': () => TextTrackCue.internalCreateTextTrackCue,
-  'TextTrackCueList': () => TextTrackCueList.internalCreateTextTrackCueList,
-  'TextTrackList': () => TextTrackList.internalCreateTextTrackList,
-  'TimeRanges': () => TimeRanges.internalCreateTimeRanges,
-  'Timing': () => Timing.internalCreateTiming,
-  'Touch': () => Touch.internalCreateTouch,
-  'TouchEvent': () => TouchEvent.internalCreateTouchEvent,
-  'TouchList': () => TouchList.internalCreateTouchList,
-  'TrackEvent': () => TrackEvent.internalCreateTrackEvent,
-  'TransitionEvent': () => TransitionEvent.internalCreateTransitionEvent,
-  'TreeWalker': () => TreeWalker.internalCreateTreeWalker,
-  'UIEvent': () => UIEvent.internalCreateUIEvent,
-  'URL': () => Url.internalCreateUrl,
-  'VTTCue': () => VttCue.internalCreateVttCue,
-  'VTTRegion': () => VttRegion.internalCreateVttRegion,
-  'VTTRegionList': () => VttRegionList.internalCreateVttRegionList,
-  'ValidityState': () => ValidityState.internalCreateValidityState,
-  'VideoPlaybackQuality': () => VideoPlaybackQuality.internalCreateVideoPlaybackQuality,
-  'VideoTrack': () => VideoTrack.internalCreateVideoTrack,
-  'VideoTrackList': () => VideoTrackList.internalCreateVideoTrackList,
-  'WebKitAnimationEvent': () => AnimationEvent.internalCreateAnimationEvent,
-  'WebKitCSSFilterRule': () => CssFilterRule.internalCreateCssFilterRule,
-  'WebKitCSSFilterValue': () => _WebKitCSSFilterValue.internalCreate_WebKitCSSFilterValue,
-  'WebKitCSSMatrix': () => _WebKitCSSMatrix.internalCreate_WebKitCSSMatrix,
-  'WebKitCSSTransformValue': () => _WebKitCSSTransformValue.internalCreate_WebKitCSSTransformValue,
-  'WebSocket': () => WebSocket.internalCreateWebSocket,
-  'WheelEvent': () => WheelEvent.internalCreateWheelEvent,
-  'Window': () => Window.internalCreateWindow,
-  'Worker': () => Worker.internalCreateWorker,
-  'WorkerConsole': () => WorkerConsole.internalCreateWorkerConsole,
-  'WorkerGlobalScope': () => WorkerGlobalScope.internalCreateWorkerGlobalScope,
-  'WorkerLocation': () => _WorkerLocation.internalCreate_WorkerLocation,
-  'WorkerNavigator': () => _WorkerNavigator.internalCreate_WorkerNavigator,
-  'WorkerPerformance': () => WorkerPerformance.internalCreateWorkerPerformance,
-  'XMLDocument': () => XmlDocument.internalCreateXmlDocument,
-  'XMLHttpRequest': () => HttpRequest.internalCreateHttpRequest,
-  'XMLHttpRequestEventTarget': () => HttpRequestEventTarget.internalCreateHttpRequestEventTarget,
-  'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent.internalCreate_XMLHttpRequestProgressEvent,
-  'XMLHttpRequestUpload': () => HttpRequestUpload.internalCreateHttpRequestUpload,
-  'XMLSerializer': () => XmlSerializer.internalCreateXmlSerializer,
-  'XPathEvaluator': () => XPathEvaluator.internalCreateXPathEvaluator,
-  'XPathExpression': () => XPathExpression.internalCreateXPathExpression,
-  'XPathNSResolver': () => XPathNSResolver.internalCreateXPathNSResolver,
-  'XPathResult': () => XPathResult.internalCreateXPathResult,
-  'XSLTProcessor': () => XsltProcessor.internalCreateXsltProcessor,
-  'polymer-element': () => HtmlElement.internalCreateHtmlElement,
+// TODO(jacobr): it would be nice to place these conversion methods in a consistent place for dart2js and dartium.
 
-};
-
-// TODO(terry): We may want to move this elsewhere if html becomes
-// a package to avoid dartium depending on pkg:html.
-@Deprecated("Internal Use Only")
-getHtmlCreateFunction(String key) {
-  var result;
-
-  // TODO(vsm): Add Cross Frame and JS types here as well.
-
-  // Check the html library.
-  result = _getHtmlFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the web gl library.
-  result = _getWebGlFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the indexed db library.
-  result = _getIndexDbFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the web audio library.
-  result = _getWebAudioFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the web sql library.
-  result = _getWebSqlFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the svg library.
-  result = _getSvgFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  return null;
+WindowBase _convertNativeToDart_Window(win) {
+  if (win == null) return null;
+  return _DOMWindowCrossFrame._createSafe(win);
 }
 
-Function _getHtmlFunction(String key) {
-  if (htmlBlinkFunctionMap.containsKey(key)) {
-    return htmlBlinkFunctionMap[key]();
+EventTarget _convertNativeToDart_EventTarget(e) {
+  if (e == null) {
+    return null;
   }
-  return null;
+  // Assume it's a Window if it contains the postMessage property.  It may be
+  // from a different frame - without a patched prototype - so we cannot
+  // rely on Dart type checking.
+  try {
+    if (js.JsNative.hasProperty(e, "postMessage")) {
+      var window = _DOMWindowCrossFrame._createSafe(e);
+      // If it's a native window.
+      if (window is EventTarget) {
+        return window;
+      }
+      return null;
+    }
+  } catch (err) {
+    print("Error calling _convertNativeToDart_EventTarget... $err");
+  }
+  return e;
 }
 
-Function _getWebGlFunction(String key) {
-  if (web_glBlinkFunctionMap.containsKey(key)) {
-    return web_glBlinkFunctionMap[key]();
-  }
-  return null;
+EventTarget _convertDartToNative_EventTarget(e) {
+  // _DOMWindowCrossFrame uses an interceptor so we don't need to do anything unlike Dart2Js.
+  return e;
 }
 
-Function _getIndexDbFunction(String key) {
-  if (indexed_dbBlinkFunctionMap.containsKey(key)) {
-    return indexed_dbBlinkFunctionMap[key]();
+_convertNativeToDart_XHR_Response(o) {
+  if (o is Document) {
+    return o;
   }
-  return null;
-}
-
-Function _getWebAudioFunction(String key) {
-  if (web_audioBlinkFunctionMap.containsKey(key)) {
-    return web_audioBlinkFunctionMap[key]();
-  }
-  return null;
-}
-
-Function _getWebSqlFunction(String key) {
-  if (web_sqlBlinkFunctionMap.containsKey(key)) {
-    return web_sqlBlinkFunctionMap[key]();
-  }
-  return null;
-}
-
-Function _getSvgFunction(String key) {
-  if (svgBlinkFunctionMap.containsKey(key)) {
-    return svgBlinkFunctionMap[key]();
-  }
-  return null;
+  return convertNativeToDart_SerializedScriptValue(o);
 }
 
 
@@ -1123,22 +734,14 @@
   var jsObject;
   var tag = "";
   var runtimeType = element.runtimeType;
-  if (runtimeType == HtmlElement) {
-    tag = element.localName;
-  } else if (runtimeType == TemplateElement) {
+  if (runtimeType == TemplateElement) {
     // Data binding with a Dart class.
     tag = element.attributes['is'];
-  } else if (runtimeType == js.JsObject) {
-    // It's a Polymer core element (written in JS).
-    // Make sure it's an element anything else we can ignore.
-    if (element.hasProperty('nodeType') && element['nodeType'] == 1) {
-      if (js.JsNative.callMethod(element, 'hasAttribute', ['is'])) {
-        // It's data binding use the is attribute.
-        tag = js.JsNative.callMethod(element, 'getAttribute', ['is']);
-      } else {
-        // It's a custom element we want the local name.
-        tag = element['localName'];
-      }
+  } else if (element is HtmlElement) {
+    tag = element.attributes['is'];
+    if (tag == null) {
+      // It's a custom element we want the local name.
+      tag = element.localName;
     }
   } else {
     throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, expected HtmlElement/HtmlTemplate/JsObject.');
@@ -1172,7 +775,7 @@
   var result = new Map();
   var keys = js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'Object'), 'keys', [jsObject]);
   for (var key in keys) {
-    result[key] = wrap_jso(js.JsNative.getProperty(jsObject, key));
+    result[key] = js.JsNative.getProperty(jsObject, key);
   }
   return result;
 }
@@ -1181,25 +784,7 @@
  * Upgrade the JS HTMLElement to the Dart class.  Used by Dart's Polymer.
  */
 _createCustomUpgrader(Type customElementClass, $this) {
-  var dartClass;
-  try {
-    dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
-  } catch (e) {
-    // Did the dartClass get allocated but the created failed?  Otherwise, other
-    // components inside of this failed somewhere (could be JS custom element).
-    if (dartClass != null) {
-      // Yes, mark as didn't upgrade.
-      dartClass._badUpgrade();
-    }
-    throw e;
-  } finally {
-    // Need to remember the Dart class that was created for this custom so
-    // return it and setup the blink_jsObject to the $this that we'll be working
-    // with as we talk to blink.
-    js.setDartHtmlWrapperFor($this, dartClass);
-  }
-
-  return dartClass;
+  return _blink.Blink_Utils.setInstanceInterceptor($this, customElementClass, customElement: true);
 }
 
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -1251,11 +836,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AnchorElement internalCreateAnchorElement() {
-    return new AnchorElement._internalWrap();
-  }
-
-  external factory AnchorElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnchorElement.internal_() : super.internal_();
@@ -1269,147 +850,137 @@
 
   @DomName('HTMLAnchorElement.download')
   @DocsEditable()
-  String get download => _blink.BlinkHTMLAnchorElement.instance.download_Getter_(unwrap_jso(this));
+  String get download => _blink.BlinkHTMLAnchorElement.instance.download_Getter_(this);
   
   @DomName('HTMLAnchorElement.download')
   @DocsEditable()
-  set download(String value) => _blink.BlinkHTMLAnchorElement.instance.download_Setter_(unwrap_jso(this), value);
+  set download(String value) => _blink.BlinkHTMLAnchorElement.instance.download_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.hreflang')
   @DocsEditable()
-  String get hreflang => _blink.BlinkHTMLAnchorElement.instance.hreflang_Getter_(unwrap_jso(this));
+  String get hreflang => _blink.BlinkHTMLAnchorElement.instance.hreflang_Getter_(this);
   
   @DomName('HTMLAnchorElement.hreflang')
   @DocsEditable()
-  set hreflang(String value) => _blink.BlinkHTMLAnchorElement.instance.hreflang_Setter_(unwrap_jso(this), value);
-  
-  @DomName('HTMLAnchorElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLAnchorElement.instance.integrity_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLAnchorElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLAnchorElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  set hreflang(String value) => _blink.BlinkHTMLAnchorElement.instance.hreflang_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.rel')
   @DocsEditable()
-  String get rel => _blink.BlinkHTMLAnchorElement.instance.rel_Getter_(unwrap_jso(this));
+  String get rel => _blink.BlinkHTMLAnchorElement.instance.rel_Getter_(this);
   
   @DomName('HTMLAnchorElement.rel')
   @DocsEditable()
-  set rel(String value) => _blink.BlinkHTMLAnchorElement.instance.rel_Setter_(unwrap_jso(this), value);
+  set rel(String value) => _blink.BlinkHTMLAnchorElement.instance.rel_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.target')
   @DocsEditable()
-  String get target => _blink.BlinkHTMLAnchorElement.instance.target_Getter_(unwrap_jso(this));
+  String get target => _blink.BlinkHTMLAnchorElement.instance.target_Getter_(this);
   
   @DomName('HTMLAnchorElement.target')
   @DocsEditable()
-  set target(String value) => _blink.BlinkHTMLAnchorElement.instance.target_Setter_(unwrap_jso(this), value);
+  set target(String value) => _blink.BlinkHTMLAnchorElement.instance.target_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLAnchorElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLAnchorElement.instance.type_Getter_(this);
   
   @DomName('HTMLAnchorElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLAnchorElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLAnchorElement.instance.type_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.hash')
   @DocsEditable()
-  String get hash => _blink.BlinkHTMLAnchorElement.instance.hash_Getter_(unwrap_jso(this));
+  String get hash => _blink.BlinkHTMLAnchorElement.instance.hash_Getter_(this);
   
   @DomName('HTMLAnchorElement.hash')
   @DocsEditable()
-  set hash(String value) => _blink.BlinkHTMLAnchorElement.instance.hash_Setter_(unwrap_jso(this), value);
+  set hash(String value) => _blink.BlinkHTMLAnchorElement.instance.hash_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.host')
   @DocsEditable()
-  String get host => _blink.BlinkHTMLAnchorElement.instance.host_Getter_(unwrap_jso(this));
+  String get host => _blink.BlinkHTMLAnchorElement.instance.host_Getter_(this);
   
   @DomName('HTMLAnchorElement.host')
   @DocsEditable()
-  set host(String value) => _blink.BlinkHTMLAnchorElement.instance.host_Setter_(unwrap_jso(this), value);
+  set host(String value) => _blink.BlinkHTMLAnchorElement.instance.host_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.hostname')
   @DocsEditable()
-  String get hostname => _blink.BlinkHTMLAnchorElement.instance.hostname_Getter_(unwrap_jso(this));
+  String get hostname => _blink.BlinkHTMLAnchorElement.instance.hostname_Getter_(this);
   
   @DomName('HTMLAnchorElement.hostname')
   @DocsEditable()
-  set hostname(String value) => _blink.BlinkHTMLAnchorElement.instance.hostname_Setter_(unwrap_jso(this), value);
+  set hostname(String value) => _blink.BlinkHTMLAnchorElement.instance.hostname_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.href')
   @DocsEditable()
-  String get href => _blink.BlinkHTMLAnchorElement.instance.href_Getter_(unwrap_jso(this));
+  String get href => _blink.BlinkHTMLAnchorElement.instance.href_Getter_(this);
   
   @DomName('HTMLAnchorElement.href')
   @DocsEditable()
-  set href(String value) => _blink.BlinkHTMLAnchorElement.instance.href_Setter_(unwrap_jso(this), value);
+  set href(String value) => _blink.BlinkHTMLAnchorElement.instance.href_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.origin')
   @DocsEditable()
   // WebKit only
   @Experimental() // non-standard
-  String get origin => _blink.BlinkHTMLAnchorElement.instance.origin_Getter_(unwrap_jso(this));
+  String get origin => _blink.BlinkHTMLAnchorElement.instance.origin_Getter_(this);
   
   @DomName('HTMLAnchorElement.password')
   @DocsEditable()
   @Experimental() // untriaged
-  String get password => _blink.BlinkHTMLAnchorElement.instance.password_Getter_(unwrap_jso(this));
+  String get password => _blink.BlinkHTMLAnchorElement.instance.password_Getter_(this);
   
   @DomName('HTMLAnchorElement.password')
   @DocsEditable()
   @Experimental() // untriaged
-  set password(String value) => _blink.BlinkHTMLAnchorElement.instance.password_Setter_(unwrap_jso(this), value);
+  set password(String value) => _blink.BlinkHTMLAnchorElement.instance.password_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.pathname')
   @DocsEditable()
-  String get pathname => _blink.BlinkHTMLAnchorElement.instance.pathname_Getter_(unwrap_jso(this));
+  String get pathname => _blink.BlinkHTMLAnchorElement.instance.pathname_Getter_(this);
   
   @DomName('HTMLAnchorElement.pathname')
   @DocsEditable()
-  set pathname(String value) => _blink.BlinkHTMLAnchorElement.instance.pathname_Setter_(unwrap_jso(this), value);
+  set pathname(String value) => _blink.BlinkHTMLAnchorElement.instance.pathname_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.port')
   @DocsEditable()
-  String get port => _blink.BlinkHTMLAnchorElement.instance.port_Getter_(unwrap_jso(this));
+  String get port => _blink.BlinkHTMLAnchorElement.instance.port_Getter_(this);
   
   @DomName('HTMLAnchorElement.port')
   @DocsEditable()
-  set port(String value) => _blink.BlinkHTMLAnchorElement.instance.port_Setter_(unwrap_jso(this), value);
+  set port(String value) => _blink.BlinkHTMLAnchorElement.instance.port_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.protocol')
   @DocsEditable()
-  String get protocol => _blink.BlinkHTMLAnchorElement.instance.protocol_Getter_(unwrap_jso(this));
+  String get protocol => _blink.BlinkHTMLAnchorElement.instance.protocol_Getter_(this);
   
   @DomName('HTMLAnchorElement.protocol')
   @DocsEditable()
-  set protocol(String value) => _blink.BlinkHTMLAnchorElement.instance.protocol_Setter_(unwrap_jso(this), value);
+  set protocol(String value) => _blink.BlinkHTMLAnchorElement.instance.protocol_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.search')
   @DocsEditable()
-  String get search => _blink.BlinkHTMLAnchorElement.instance.search_Getter_(unwrap_jso(this));
+  String get search => _blink.BlinkHTMLAnchorElement.instance.search_Getter_(this);
   
   @DomName('HTMLAnchorElement.search')
   @DocsEditable()
-  set search(String value) => _blink.BlinkHTMLAnchorElement.instance.search_Setter_(unwrap_jso(this), value);
+  set search(String value) => _blink.BlinkHTMLAnchorElement.instance.search_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.username')
   @DocsEditable()
   @Experimental() // untriaged
-  String get username => _blink.BlinkHTMLAnchorElement.instance.username_Getter_(unwrap_jso(this));
+  String get username => _blink.BlinkHTMLAnchorElement.instance.username_Getter_(this);
   
   @DomName('HTMLAnchorElement.username')
   @DocsEditable()
   @Experimental() // untriaged
-  set username(String value) => _blink.BlinkHTMLAnchorElement.instance.username_Setter_(unwrap_jso(this), value);
+  set username(String value) => _blink.BlinkHTMLAnchorElement.instance.username_Setter_(this, value);
   
   @DomName('HTMLAnchorElement.toString')
   @DocsEditable()
-  String toString() => _blink.BlinkHTMLAnchorElement.instance.toString_Callback_0_(unwrap_jso(this));
+  String toString() => _blink.BlinkHTMLAnchorElement.instance.toString_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1422,38 +993,121 @@
 @DocsEditable()
 @DomName('Animation')
 @Experimental() // untriaged
-class Animation extends AnimationNode {
+class Animation extends EventTarget {
   // To suppress missing implicit constructor warnings.
   factory Animation._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('Animation.Animation')
-  @DocsEditable()
-  factory Animation(Element target, List<Map> keyframes, [timingInput]) {
-    if ((keyframes is List<Map> || keyframes == null) && (target is Element || target == null) && timingInput == null) {
-      return wrap_jso(_blink.BlinkAnimation.instance.constructorCallback_2_(target, keyframes));
-    }
-    if ((timingInput is num || timingInput == null) && (keyframes is List<Map> || keyframes == null) && (target is Element || target == null)) {
-      return wrap_jso(_blink.BlinkAnimation.instance.constructorCallback_3_(target, keyframes, timingInput));
-    }
-    if ((timingInput is Map || timingInput == null) && (keyframes is List<Map> || keyframes == null) && (target is Element || target == null)) {
-      var timingInput_1 = convertDartToNative_Dictionary(timingInput);
-      return wrap_jso(_blink.BlinkAnimation.instance.constructorCallback_3_(target, keyframes, timingInput_1));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
-  }
-
 
   @Deprecated("Internal Use Only")
-  static Animation internalCreateAnimation() {
-    return new Animation._internalWrap();
-  }
-
-  external factory Animation._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Animation.internal_() : super.internal_();
 
 
+  /// Checks if this type is supported on the current platform.
+  static bool get supported => true;
+
+  @DomName('Animation.currentTime')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get currentTime => _blink.BlinkAnimation.instance.currentTime_Getter_(this);
+  
+  @DomName('Animation.currentTime')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set currentTime(num value) => _blink.BlinkAnimation.instance.currentTime_Setter_(this, value);
+  
+  @DomName('Animation.effect')
+  @DocsEditable()
+  @Experimental() // untriaged
+  AnimationEffectReadOnly get effect => _blink.BlinkAnimation.instance.effect_Getter_(this);
+  
+  @DomName('Animation.effect')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set effect(AnimationEffectReadOnly value) => _blink.BlinkAnimation.instance.effect_Setter_(this, value);
+  
+  @DomName('Animation.endClip')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get endClip => _blink.BlinkAnimation.instance.endClip_Getter_(this);
+  
+  @DomName('Animation.endClip')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set endClip(num value) => _blink.BlinkAnimation.instance.endClip_Setter_(this, value);
+  
+  @DomName('Animation.finished')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future get finished => convertNativePromiseToDartFuture(_blink.BlinkAnimation.instance.finished_Getter_(this));
+  
+  @DomName('Animation.playState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get playState => _blink.BlinkAnimation.instance.playState_Getter_(this);
+  
+  @DomName('Animation.playbackRate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get playbackRate => _blink.BlinkAnimation.instance.playbackRate_Getter_(this);
+  
+  @DomName('Animation.playbackRate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set playbackRate(num value) => _blink.BlinkAnimation.instance.playbackRate_Setter_(this, value);
+  
+  @DomName('Animation.ready')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future get ready => convertNativePromiseToDartFuture(_blink.BlinkAnimation.instance.ready_Getter_(this));
+  
+  @DomName('Animation.startClip')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get startClip => _blink.BlinkAnimation.instance.startClip_Getter_(this);
+  
+  @DomName('Animation.startClip')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set startClip(num value) => _blink.BlinkAnimation.instance.startClip_Setter_(this, value);
+  
+  @DomName('Animation.startTime')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get startTime => _blink.BlinkAnimation.instance.startTime_Getter_(this);
+  
+  @DomName('Animation.startTime')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set startTime(num value) => _blink.BlinkAnimation.instance.startTime_Setter_(this, value);
+  
+  @DomName('Animation.cancel')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void cancel() => _blink.BlinkAnimation.instance.cancel_Callback_0_(this);
+  
+  @DomName('Animation.finish')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void finish() => _blink.BlinkAnimation.instance.finish_Callback_0_(this);
+  
+  @DomName('Animation.pause')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void pause() => _blink.BlinkAnimation.instance.pause_Callback_0_(this);
+  
+  @DomName('Animation.play')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void play() => _blink.BlinkAnimation.instance.play_Callback_0_(this);
+  
+  @DomName('Animation.reverse')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void reverse() => _blink.BlinkAnimation.instance.reverse_Callback_0_(this);
+  
 }
 // 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
@@ -1463,27 +1117,29 @@
 
 
 @DocsEditable()
-@DomName('AnimationEffect')
+@DomName('AnimationEffectReadOnly')
 @Experimental() // untriaged
-class AnimationEffect extends DartHtmlDomObject {
+class AnimationEffectReadOnly extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
-  factory AnimationEffect._() { throw new UnsupportedError("Not supported"); }
+  factory AnimationEffectReadOnly._() { throw new UnsupportedError("Not supported"); }
+
 
   @Deprecated("Internal Use Only")
-  static AnimationEffect internalCreateAnimationEffect() {
-    return new AnimationEffect._internalWrap();
-  }
-
-  factory AnimationEffect._internalWrap() {
-    return new AnimationEffect.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
-  AnimationEffect.internal_() { }
+  AnimationEffectReadOnly.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
+  @DomName('AnimationEffectReadOnly.computedTiming')
+  @DocsEditable()
+  @Experimental() // untriaged
+   get computedTiming => convertNativeDictionaryToDartDictionary((_blink.BlinkAnimationEffectReadOnly.instance.computedTiming_Getter_(this)));
+  
+  @DomName('AnimationEffectReadOnly.timing')
+  @DocsEditable()
+  @Experimental() // untriaged
+  AnimationEffectTiming get timing => _blink.BlinkAnimationEffectReadOnly.instance.timing_Getter_(this);
+  
 }
 // 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
@@ -1493,203 +1149,151 @@
 
 
 @DocsEditable()
-@DomName('WebKitAnimationEvent')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@DomName('AnimationEffectTiming')
+@Experimental() // untriaged
+class AnimationEffectTiming extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory AnimationEffectTiming._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  AnimationEffectTiming.internal_() { }
+
+  @DomName('AnimationEffectTiming.delay')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get delay => _blink.BlinkAnimationEffectTiming.instance.delay_Getter_(this);
+  
+  @DomName('AnimationEffectTiming.delay')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set delay(num value) => _blink.BlinkAnimationEffectTiming.instance.delay_Setter_(this, value);
+  
+  @DomName('AnimationEffectTiming.direction')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get direction => _blink.BlinkAnimationEffectTiming.instance.direction_Getter_(this);
+  
+  @DomName('AnimationEffectTiming.direction')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set direction(String value) => _blink.BlinkAnimationEffectTiming.instance.direction_Setter_(this, value);
+  
+  @DomName('AnimationEffectTiming.duration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object get duration => (_blink.BlinkAnimationEffectTiming.instance.duration_Getter_(this));
+  
+  @DomName('AnimationEffectTiming.duration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set duration(Object value) => _blink.BlinkAnimationEffectTiming.instance.duration_Setter_(this, value);
+  
+  @DomName('AnimationEffectTiming.easing')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get easing => _blink.BlinkAnimationEffectTiming.instance.easing_Getter_(this);
+  
+  @DomName('AnimationEffectTiming.easing')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set easing(String value) => _blink.BlinkAnimationEffectTiming.instance.easing_Setter_(this, value);
+  
+  @DomName('AnimationEffectTiming.endDelay')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get endDelay => _blink.BlinkAnimationEffectTiming.instance.endDelay_Getter_(this);
+  
+  @DomName('AnimationEffectTiming.endDelay')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set endDelay(num value) => _blink.BlinkAnimationEffectTiming.instance.endDelay_Setter_(this, value);
+  
+  @DomName('AnimationEffectTiming.fill')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get fill => _blink.BlinkAnimationEffectTiming.instance.fill_Getter_(this);
+  
+  @DomName('AnimationEffectTiming.fill')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set fill(String value) => _blink.BlinkAnimationEffectTiming.instance.fill_Setter_(this, value);
+  
+  @DomName('AnimationEffectTiming.iterationStart')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get iterationStart => _blink.BlinkAnimationEffectTiming.instance.iterationStart_Getter_(this);
+  
+  @DomName('AnimationEffectTiming.iterationStart')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set iterationStart(num value) => _blink.BlinkAnimationEffectTiming.instance.iterationStart_Setter_(this, value);
+  
+  @DomName('AnimationEffectTiming.iterations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get iterations => _blink.BlinkAnimationEffectTiming.instance.iterations_Getter_(this);
+  
+  @DomName('AnimationEffectTiming.iterations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set iterations(num value) => _blink.BlinkAnimationEffectTiming.instance.iterations_Setter_(this, value);
+  
+  @DomName('AnimationEffectTiming.playbackRate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get playbackRate => _blink.BlinkAnimationEffectTiming.instance.playbackRate_Getter_(this);
+  
+  @DomName('AnimationEffectTiming.playbackRate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set playbackRate(num value) => _blink.BlinkAnimationEffectTiming.instance.playbackRate_Setter_(this, value);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('AnimationEvent')
+@Experimental() // untriaged
 class AnimationEvent extends Event {
   // To suppress missing implicit constructor warnings.
   factory AnimationEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static AnimationEvent internalCreateAnimationEvent() {
-    return new AnimationEvent._internalWrap();
+  @DomName('AnimationEvent.AnimationEvent')
+  @DocsEditable()
+  factory AnimationEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkAnimationEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkAnimationEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory AnimationEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimationEvent.internal_() : super.internal_();
 
 
-  @DomName('WebKitAnimationEvent.animationName')
-  @DocsEditable()
-  String get animationName => _blink.BlinkWebKitAnimationEvent.instance.animationName_Getter_(unwrap_jso(this));
-  
-  @DomName('WebKitAnimationEvent.elapsedTime')
-  @DocsEditable()
-  num get elapsedTime => _blink.BlinkWebKitAnimationEvent.instance.elapsedTime_Getter_(unwrap_jso(this));
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('AnimationNode')
-@Experimental() // untriaged
-class AnimationNode extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory AnimationNode._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static AnimationNode internalCreateAnimationNode() {
-    return new AnimationNode._internalWrap();
-  }
-
-  factory AnimationNode._internalWrap() {
-    return new AnimationNode.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  AnimationNode.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('AnimationNode.activeDuration')
+  @DomName('AnimationEvent.animationName')
   @DocsEditable()
   @Experimental() // untriaged
-  num get activeDuration => _blink.BlinkAnimationNode.instance.activeDuration_Getter_(unwrap_jso(this));
+  String get animationName => _blink.BlinkAnimationEvent.instance.animationName_Getter_(this);
   
-  @DomName('AnimationNode.currentIteration')
+  @DomName('AnimationEvent.elapsedTime')
   @DocsEditable()
   @Experimental() // untriaged
-  int get currentIteration => _blink.BlinkAnimationNode.instance.currentIteration_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationNode.duration')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get duration => _blink.BlinkAnimationNode.instance.duration_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationNode.endTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get endTime => _blink.BlinkAnimationNode.instance.endTime_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationNode.localTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get localTime => _blink.BlinkAnimationNode.instance.localTime_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationNode.player')
-  @DocsEditable()
-  @Experimental() // untriaged
-  AnimationPlayer get player => wrap_jso(_blink.BlinkAnimationNode.instance.player_Getter_(unwrap_jso(this)));
-  
-  @DomName('AnimationNode.startTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get startTime => _blink.BlinkAnimationNode.instance.startTime_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationNode.timing')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Timing get timing => wrap_jso(_blink.BlinkAnimationNode.instance.timing_Getter_(unwrap_jso(this)));
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('AnimationPlayer')
-@Experimental() // untriaged
-class AnimationPlayer extends EventTarget {
-  // To suppress missing implicit constructor warnings.
-  factory AnimationPlayer._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static AnimationPlayer internalCreateAnimationPlayer() {
-    return new AnimationPlayer._internalWrap();
-  }
-
-  external factory AnimationPlayer._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  AnimationPlayer.internal_() : super.internal_();
-
-
-  /// Checks if this type is supported on the current platform.
-  static bool get supported => true;
-
-  @DomName('AnimationPlayer.currentTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get currentTime => _blink.BlinkAnimationPlayer.instance.currentTime_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationPlayer.currentTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set currentTime(num value) => _blink.BlinkAnimationPlayer.instance.currentTime_Setter_(unwrap_jso(this), value);
-  
-  @DomName('AnimationPlayer.playState')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get playState => _blink.BlinkAnimationPlayer.instance.playState_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationPlayer.playbackRate')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get playbackRate => _blink.BlinkAnimationPlayer.instance.playbackRate_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationPlayer.playbackRate')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set playbackRate(num value) => _blink.BlinkAnimationPlayer.instance.playbackRate_Setter_(unwrap_jso(this), value);
-  
-  @DomName('AnimationPlayer.source')
-  @DocsEditable()
-  @Experimental() // untriaged
-  AnimationNode get source => wrap_jso(_blink.BlinkAnimationPlayer.instance.source_Getter_(unwrap_jso(this)));
-  
-  @DomName('AnimationPlayer.source')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set source(AnimationNode value) => _blink.BlinkAnimationPlayer.instance.source_Setter_(unwrap_jso(this), unwrap_jso(value));
-  
-  @DomName('AnimationPlayer.startTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get startTime => _blink.BlinkAnimationPlayer.instance.startTime_Getter_(unwrap_jso(this));
-  
-  @DomName('AnimationPlayer.startTime')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set startTime(num value) => _blink.BlinkAnimationPlayer.instance.startTime_Setter_(unwrap_jso(this), value);
-  
-  @DomName('AnimationPlayer.cancel')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void cancel() => _blink.BlinkAnimationPlayer.instance.cancel_Callback_0_(unwrap_jso(this));
-  
-  @DomName('AnimationPlayer.finish')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void finish() => _blink.BlinkAnimationPlayer.instance.finish_Callback_0_(unwrap_jso(this));
-  
-  @DomName('AnimationPlayer.pause')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void pause() => _blink.BlinkAnimationPlayer.instance.pause_Callback_0_(unwrap_jso(this));
-  
-  @DomName('AnimationPlayer.play')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void play() => _blink.BlinkAnimationPlayer.instance.play_Callback_0_(unwrap_jso(this));
-  
-  @DomName('AnimationPlayer.reverse')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void reverse() => _blink.BlinkAnimationPlayer.instance.reverse_Callback_0_(unwrap_jso(this));
+  num get elapsedTime => _blink.BlinkAnimationEvent.instance.elapsedTime_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1706,13 +1310,19 @@
   // To suppress missing implicit constructor warnings.
   factory AnimationPlayerEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static AnimationPlayerEvent internalCreateAnimationPlayerEvent() {
-    return new AnimationPlayerEvent._internalWrap();
+  @DomName('AnimationPlayerEvent.AnimationPlayerEvent')
+  @DocsEditable()
+  factory AnimationPlayerEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkAnimationPlayerEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkAnimationPlayerEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory AnimationPlayerEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimationPlayerEvent.internal_() : super.internal_();
@@ -1721,12 +1331,12 @@
   @DomName('AnimationPlayerEvent.currentTime')
   @DocsEditable()
   @Experimental() // untriaged
-  num get currentTime => _blink.BlinkAnimationPlayerEvent.instance.currentTime_Getter_(unwrap_jso(this));
+  num get currentTime => _blink.BlinkAnimationPlayerEvent.instance.currentTime_Getter_(this);
   
   @DomName('AnimationPlayerEvent.timelineTime')
   @DocsEditable()
   @Experimental() // untriaged
-  num get timelineTime => _blink.BlinkAnimationPlayerEvent.instance.timelineTime_Getter_(unwrap_jso(this));
+  num get timelineTime => _blink.BlinkAnimationPlayerEvent.instance.timelineTime_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1743,35 +1353,74 @@
   // To suppress missing implicit constructor warnings.
   factory AnimationTimeline._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimationTimeline internalCreateAnimationTimeline() {
-    return new AnimationTimeline._internalWrap();
-  }
 
-  factory AnimationTimeline._internalWrap() {
-    return new AnimationTimeline.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimationTimeline.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('AnimationTimeline.currentTime')
   @DocsEditable()
   @Experimental() // untriaged
-  num get currentTime => _blink.BlinkAnimationTimeline.instance.currentTime_Getter_(unwrap_jso(this));
+  num get currentTime => _blink.BlinkAnimationTimeline.instance.currentTime_Getter_(this);
   
-  @DomName('AnimationTimeline.getAnimationPlayers')
+  @DomName('AnimationTimeline.currentTime')
   @DocsEditable()
   @Experimental() // untriaged
-  List<AnimationPlayer> getAnimationPlayers() => wrap_jso(_blink.BlinkAnimationTimeline.instance.getAnimationPlayers_Callback_0_(unwrap_jso(this)));
+  set currentTime(num value) => _blink.BlinkAnimationTimeline.instance.currentTime_Setter_(this, value);
+  
+  @DomName('AnimationTimeline.playbackRate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get playbackRate => _blink.BlinkAnimationTimeline.instance.playbackRate_Getter_(this);
+  
+  @DomName('AnimationTimeline.playbackRate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set playbackRate(num value) => _blink.BlinkAnimationTimeline.instance.playbackRate_Setter_(this, value);
+  
+  @DomName('AnimationTimeline.getAnimations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<Animation> getAnimations() => (_blink.BlinkAnimationTimeline.instance.getAnimations_Callback_0_(this));
   
   @DomName('AnimationTimeline.play')
   @DocsEditable()
   @Experimental() // untriaged
-  AnimationPlayer play(AnimationNode source) => wrap_jso(_blink.BlinkAnimationTimeline.instance.play_Callback_1_(unwrap_jso(this), unwrap_jso(source)));
+  Animation play(AnimationEffectReadOnly source) => _blink.BlinkAnimationTimeline.instance.play_Callback_1_(this, source);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('AppBannerPromptResult')
+@Experimental() // untriaged
+class AppBannerPromptResult extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory AppBannerPromptResult._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  AppBannerPromptResult.internal_() { }
+
+  @DomName('AppBannerPromptResult.outcome')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get outcome => _blink.BlinkAppBannerPromptResult.instance.outcome_Getter_(this);
+  
+  @DomName('AppBannerPromptResult.platform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get platform => _blink.BlinkAppBannerPromptResult.instance.platform_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1878,11 +1527,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ApplicationCache internalCreateApplicationCache() {
-    return new ApplicationCache._internalWrap();
-  }
-
-  external factory ApplicationCache._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ApplicationCache.internal_() : super.internal_();
@@ -1917,19 +1562,19 @@
 
   @DomName('ApplicationCache.status')
   @DocsEditable()
-  int get status => _blink.BlinkApplicationCache.instance.status_Getter_(unwrap_jso(this));
+  int get status => _blink.BlinkApplicationCache.instance.status_Getter_(this);
   
   @DomName('ApplicationCache.abort')
   @DocsEditable()
-  void abort() => _blink.BlinkApplicationCache.instance.abort_Callback_0_(unwrap_jso(this));
+  void abort() => _blink.BlinkApplicationCache.instance.abort_Callback_0_(this);
   
   @DomName('ApplicationCache.swapCache')
   @DocsEditable()
-  void swapCache() => _blink.BlinkApplicationCache.instance.swapCache_Callback_0_(unwrap_jso(this));
+  void swapCache() => _blink.BlinkApplicationCache.instance.swapCache_Callback_0_(this);
   
   @DomName('ApplicationCache.update')
   @DocsEditable()
-  void update() => _blink.BlinkApplicationCache.instance.update_Callback_0_(unwrap_jso(this));
+  void update() => _blink.BlinkApplicationCache.instance.update_Callback_0_(this);
   
   /// Stream of `cached` events handled by this [ApplicationCache].
   @DomName('ApplicationCache.oncached')
@@ -1986,13 +1631,19 @@
   // To suppress missing implicit constructor warnings.
   factory ApplicationCacheErrorEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static ApplicationCacheErrorEvent internalCreateApplicationCacheErrorEvent() {
-    return new ApplicationCacheErrorEvent._internalWrap();
+  @DomName('ApplicationCacheErrorEvent.ApplicationCacheErrorEvent')
+  @DocsEditable()
+  factory ApplicationCacheErrorEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkApplicationCacheErrorEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkApplicationCacheErrorEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory ApplicationCacheErrorEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ApplicationCacheErrorEvent.internal_() : super.internal_();
@@ -2001,22 +1652,22 @@
   @DomName('ApplicationCacheErrorEvent.message')
   @DocsEditable()
   @Experimental() // untriaged
-  String get message => _blink.BlinkApplicationCacheErrorEvent.instance.message_Getter_(unwrap_jso(this));
+  String get message => _blink.BlinkApplicationCacheErrorEvent.instance.message_Getter_(this);
   
   @DomName('ApplicationCacheErrorEvent.reason')
   @DocsEditable()
   @Experimental() // untriaged
-  String get reason => _blink.BlinkApplicationCacheErrorEvent.instance.reason_Getter_(unwrap_jso(this));
+  String get reason => _blink.BlinkApplicationCacheErrorEvent.instance.reason_Getter_(this);
   
   @DomName('ApplicationCacheErrorEvent.status')
   @DocsEditable()
   @Experimental() // untriaged
-  int get status => _blink.BlinkApplicationCacheErrorEvent.instance.status_Getter_(unwrap_jso(this));
+  int get status => _blink.BlinkApplicationCacheErrorEvent.instance.status_Getter_(this);
   
   @DomName('ApplicationCacheErrorEvent.url')
   @DocsEditable()
   @Experimental() // untriaged
-  String get url => _blink.BlinkApplicationCacheErrorEvent.instance.url_Getter_(unwrap_jso(this));
+  String get url => _blink.BlinkApplicationCacheErrorEvent.instance.url_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2048,11 +1699,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AreaElement internalCreateAreaElement() {
-    return new AreaElement._internalWrap();
-  }
-
-  external factory AreaElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AreaElement.internal_() : super.internal_();
@@ -2066,129 +1713,129 @@
 
   @DomName('HTMLAreaElement.alt')
   @DocsEditable()
-  String get alt => _blink.BlinkHTMLAreaElement.instance.alt_Getter_(unwrap_jso(this));
+  String get alt => _blink.BlinkHTMLAreaElement.instance.alt_Getter_(this);
   
   @DomName('HTMLAreaElement.alt')
   @DocsEditable()
-  set alt(String value) => _blink.BlinkHTMLAreaElement.instance.alt_Setter_(unwrap_jso(this), value);
+  set alt(String value) => _blink.BlinkHTMLAreaElement.instance.alt_Setter_(this, value);
   
   @DomName('HTMLAreaElement.coords')
   @DocsEditable()
-  String get coords => _blink.BlinkHTMLAreaElement.instance.coords_Getter_(unwrap_jso(this));
+  String get coords => _blink.BlinkHTMLAreaElement.instance.coords_Getter_(this);
   
   @DomName('HTMLAreaElement.coords')
   @DocsEditable()
-  set coords(String value) => _blink.BlinkHTMLAreaElement.instance.coords_Setter_(unwrap_jso(this), value);
+  set coords(String value) => _blink.BlinkHTMLAreaElement.instance.coords_Setter_(this, value);
   
   @DomName('HTMLAreaElement.shape')
   @DocsEditable()
-  String get shape => _blink.BlinkHTMLAreaElement.instance.shape_Getter_(unwrap_jso(this));
+  String get shape => _blink.BlinkHTMLAreaElement.instance.shape_Getter_(this);
   
   @DomName('HTMLAreaElement.shape')
   @DocsEditable()
-  set shape(String value) => _blink.BlinkHTMLAreaElement.instance.shape_Setter_(unwrap_jso(this), value);
+  set shape(String value) => _blink.BlinkHTMLAreaElement.instance.shape_Setter_(this, value);
   
   @DomName('HTMLAreaElement.target')
   @DocsEditable()
-  String get target => _blink.BlinkHTMLAreaElement.instance.target_Getter_(unwrap_jso(this));
+  String get target => _blink.BlinkHTMLAreaElement.instance.target_Getter_(this);
   
   @DomName('HTMLAreaElement.target')
   @DocsEditable()
-  set target(String value) => _blink.BlinkHTMLAreaElement.instance.target_Setter_(unwrap_jso(this), value);
+  set target(String value) => _blink.BlinkHTMLAreaElement.instance.target_Setter_(this, value);
   
   @DomName('HTMLAreaElement.hash')
   @DocsEditable()
-  String get hash => _blink.BlinkHTMLAreaElement.instance.hash_Getter_(unwrap_jso(this));
+  String get hash => _blink.BlinkHTMLAreaElement.instance.hash_Getter_(this);
   
   @DomName('HTMLAreaElement.hash')
   @DocsEditable()
-  set hash(String value) => _blink.BlinkHTMLAreaElement.instance.hash_Setter_(unwrap_jso(this), value);
+  set hash(String value) => _blink.BlinkHTMLAreaElement.instance.hash_Setter_(this, value);
   
   @DomName('HTMLAreaElement.host')
   @DocsEditable()
-  String get host => _blink.BlinkHTMLAreaElement.instance.host_Getter_(unwrap_jso(this));
+  String get host => _blink.BlinkHTMLAreaElement.instance.host_Getter_(this);
   
   @DomName('HTMLAreaElement.host')
   @DocsEditable()
-  set host(String value) => _blink.BlinkHTMLAreaElement.instance.host_Setter_(unwrap_jso(this), value);
+  set host(String value) => _blink.BlinkHTMLAreaElement.instance.host_Setter_(this, value);
   
   @DomName('HTMLAreaElement.hostname')
   @DocsEditable()
-  String get hostname => _blink.BlinkHTMLAreaElement.instance.hostname_Getter_(unwrap_jso(this));
+  String get hostname => _blink.BlinkHTMLAreaElement.instance.hostname_Getter_(this);
   
   @DomName('HTMLAreaElement.hostname')
   @DocsEditable()
-  set hostname(String value) => _blink.BlinkHTMLAreaElement.instance.hostname_Setter_(unwrap_jso(this), value);
+  set hostname(String value) => _blink.BlinkHTMLAreaElement.instance.hostname_Setter_(this, value);
   
   @DomName('HTMLAreaElement.href')
   @DocsEditable()
-  String get href => _blink.BlinkHTMLAreaElement.instance.href_Getter_(unwrap_jso(this));
+  String get href => _blink.BlinkHTMLAreaElement.instance.href_Getter_(this);
   
   @DomName('HTMLAreaElement.href')
   @DocsEditable()
-  set href(String value) => _blink.BlinkHTMLAreaElement.instance.href_Setter_(unwrap_jso(this), value);
+  set href(String value) => _blink.BlinkHTMLAreaElement.instance.href_Setter_(this, value);
   
   @DomName('HTMLAreaElement.origin')
   @DocsEditable()
   @Experimental() // untriaged
-  String get origin => _blink.BlinkHTMLAreaElement.instance.origin_Getter_(unwrap_jso(this));
+  String get origin => _blink.BlinkHTMLAreaElement.instance.origin_Getter_(this);
   
   @DomName('HTMLAreaElement.password')
   @DocsEditable()
   @Experimental() // untriaged
-  String get password => _blink.BlinkHTMLAreaElement.instance.password_Getter_(unwrap_jso(this));
+  String get password => _blink.BlinkHTMLAreaElement.instance.password_Getter_(this);
   
   @DomName('HTMLAreaElement.password')
   @DocsEditable()
   @Experimental() // untriaged
-  set password(String value) => _blink.BlinkHTMLAreaElement.instance.password_Setter_(unwrap_jso(this), value);
+  set password(String value) => _blink.BlinkHTMLAreaElement.instance.password_Setter_(this, value);
   
   @DomName('HTMLAreaElement.pathname')
   @DocsEditable()
-  String get pathname => _blink.BlinkHTMLAreaElement.instance.pathname_Getter_(unwrap_jso(this));
+  String get pathname => _blink.BlinkHTMLAreaElement.instance.pathname_Getter_(this);
   
   @DomName('HTMLAreaElement.pathname')
   @DocsEditable()
-  set pathname(String value) => _blink.BlinkHTMLAreaElement.instance.pathname_Setter_(unwrap_jso(this), value);
+  set pathname(String value) => _blink.BlinkHTMLAreaElement.instance.pathname_Setter_(this, value);
   
   @DomName('HTMLAreaElement.port')
   @DocsEditable()
-  String get port => _blink.BlinkHTMLAreaElement.instance.port_Getter_(unwrap_jso(this));
+  String get port => _blink.BlinkHTMLAreaElement.instance.port_Getter_(this);
   
   @DomName('HTMLAreaElement.port')
   @DocsEditable()
-  set port(String value) => _blink.BlinkHTMLAreaElement.instance.port_Setter_(unwrap_jso(this), value);
+  set port(String value) => _blink.BlinkHTMLAreaElement.instance.port_Setter_(this, value);
   
   @DomName('HTMLAreaElement.protocol')
   @DocsEditable()
-  String get protocol => _blink.BlinkHTMLAreaElement.instance.protocol_Getter_(unwrap_jso(this));
+  String get protocol => _blink.BlinkHTMLAreaElement.instance.protocol_Getter_(this);
   
   @DomName('HTMLAreaElement.protocol')
   @DocsEditable()
-  set protocol(String value) => _blink.BlinkHTMLAreaElement.instance.protocol_Setter_(unwrap_jso(this), value);
+  set protocol(String value) => _blink.BlinkHTMLAreaElement.instance.protocol_Setter_(this, value);
   
   @DomName('HTMLAreaElement.search')
   @DocsEditable()
-  String get search => _blink.BlinkHTMLAreaElement.instance.search_Getter_(unwrap_jso(this));
+  String get search => _blink.BlinkHTMLAreaElement.instance.search_Getter_(this);
   
   @DomName('HTMLAreaElement.search')
   @DocsEditable()
-  set search(String value) => _blink.BlinkHTMLAreaElement.instance.search_Setter_(unwrap_jso(this), value);
+  set search(String value) => _blink.BlinkHTMLAreaElement.instance.search_Setter_(this, value);
   
   @DomName('HTMLAreaElement.username')
   @DocsEditable()
   @Experimental() // untriaged
-  String get username => _blink.BlinkHTMLAreaElement.instance.username_Getter_(unwrap_jso(this));
+  String get username => _blink.BlinkHTMLAreaElement.instance.username_Getter_(this);
   
   @DomName('HTMLAreaElement.username')
   @DocsEditable()
   @Experimental() // untriaged
-  set username(String value) => _blink.BlinkHTMLAreaElement.instance.username_Setter_(unwrap_jso(this), value);
+  set username(String value) => _blink.BlinkHTMLAreaElement.instance.username_Setter_(this, value);
   
   @DomName('HTMLAreaElement.toString')
   @DocsEditable()
   @Experimental() // untriaged
-  String toString() => _blink.BlinkHTMLAreaElement.instance.toString_Callback_0_(unwrap_jso(this));
+  String toString() => _blink.BlinkHTMLAreaElement.instance.toString_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2203,16 +1850,12 @@
   @DomName('HTMLAudioElement.HTMLAudioElement')
   @DocsEditable()
   factory AudioElement._([String src]) {
-    return wrap_jso(_blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src));
+    return _blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src);
   }
 
 
   @Deprecated("Internal Use Only")
-  static AudioElement internalCreateAudioElement() {
-    return new AudioElement._internalWrap();
-  }
-
-  external factory AudioElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioElement.internal_() : super.internal_();
@@ -2226,9 +1869,9 @@
 
   factory AudioElement([String src]) {
     if (src == null)
-      return wrap_jso(_blink.BlinkHTMLAudioElement.instance.constructorCallback_0_());
+      return _blink.BlinkHTMLAudioElement.instance.constructorCallback_0_();
     else
-      return wrap_jso(_blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src));
+      return _blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src);
   }
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2245,50 +1888,42 @@
   // To suppress missing implicit constructor warnings.
   factory AudioTrack._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AudioTrack internalCreateAudioTrack() {
-    return new AudioTrack._internalWrap();
-  }
 
-  factory AudioTrack._internalWrap() {
-    return new AudioTrack.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioTrack.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('AudioTrack.enabled')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get enabled => _blink.BlinkAudioTrack.instance.enabled_Getter_(unwrap_jso(this));
+  bool get enabled => _blink.BlinkAudioTrack.instance.enabled_Getter_(this);
   
   @DomName('AudioTrack.enabled')
   @DocsEditable()
   @Experimental() // untriaged
-  set enabled(bool value) => _blink.BlinkAudioTrack.instance.enabled_Setter_(unwrap_jso(this), value);
+  set enabled(bool value) => _blink.BlinkAudioTrack.instance.enabled_Setter_(this, value);
   
   @DomName('AudioTrack.id')
   @DocsEditable()
   @Experimental() // untriaged
-  String get id => _blink.BlinkAudioTrack.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkAudioTrack.instance.id_Getter_(this);
   
   @DomName('AudioTrack.kind')
   @DocsEditable()
   @Experimental() // untriaged
-  String get kind => _blink.BlinkAudioTrack.instance.kind_Getter_(unwrap_jso(this));
+  String get kind => _blink.BlinkAudioTrack.instance.kind_Getter_(this);
   
   @DomName('AudioTrack.label')
   @DocsEditable()
   @Experimental() // untriaged
-  String get label => _blink.BlinkAudioTrack.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkAudioTrack.instance.label_Getter_(this);
   
   @DomName('AudioTrack.language')
   @DocsEditable()
   @Experimental() // untriaged
-  String get language => _blink.BlinkAudioTrack.instance.language_Getter_(unwrap_jso(this));
+  String get language => _blink.BlinkAudioTrack.instance.language_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2312,11 +1947,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AudioTrackList internalCreateAudioTrackList() {
-    return new AudioTrackList._internalWrap();
-  }
-
-  external factory AudioTrackList._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioTrackList.internal_() : super.internal_();
@@ -2325,17 +1956,17 @@
   @DomName('AudioTrackList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkAudioTrackList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkAudioTrackList.instance.length_Getter_(this);
   
   @DomName('AudioTrackList.__getter__')
   @DocsEditable()
   @Experimental() // untriaged
-  AudioTrack __getter__(int index) => wrap_jso(_blink.BlinkAudioTrackList.instance.$__getter___Callback_1_(unwrap_jso(this), index));
+  AudioTrack __getter__(int index) => _blink.BlinkAudioTrackList.instance.$__getter___Callback_1_(this, index);
   
   @DomName('AudioTrackList.getTrackById')
   @DocsEditable()
   @Experimental() // untriaged
-  AudioTrack getTrackById(String id) => wrap_jso(_blink.BlinkAudioTrackList.instance.getTrackById_Callback_1_(unwrap_jso(this), id));
+  AudioTrack getTrackById(String id) => _blink.BlinkAudioTrackList.instance.getTrackById_Callback_1_(this, id);
   
   @DomName('AudioTrackList.onchange')
   @DocsEditable()
@@ -2358,13 +1989,19 @@
   // To suppress missing implicit constructor warnings.
   factory AutocompleteErrorEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static AutocompleteErrorEvent internalCreateAutocompleteErrorEvent() {
-    return new AutocompleteErrorEvent._internalWrap();
+  @DomName('AutocompleteErrorEvent.AutocompleteErrorEvent')
+  @DocsEditable()
+  factory AutocompleteErrorEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkAutocompleteErrorEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkAutocompleteErrorEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory AutocompleteErrorEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AutocompleteErrorEvent.internal_() : super.internal_();
@@ -2372,7 +2009,7 @@
 
   @DomName('AutocompleteErrorEvent.reason')
   @DocsEditable()
-  String get reason => _blink.BlinkAutocompleteErrorEvent.instance.reason_Getter_(unwrap_jso(this));
+  String get reason => _blink.BlinkAutocompleteErrorEvent.instance.reason_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2394,11 +2031,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static BRElement internalCreateBRElement() {
-    return new BRElement._internalWrap();
-  }
-
-  external factory BRElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   BRElement.internal_() : super.internal_();
@@ -2426,24 +2059,16 @@
   // To suppress missing implicit constructor warnings.
   factory BarProp._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static BarProp internalCreateBarProp() {
-    return new BarProp._internalWrap();
-  }
 
-  factory BarProp._internalWrap() {
-    return new BarProp.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   BarProp.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('BarProp.visible')
   @DocsEditable()
-  bool get visible => _blink.BlinkBarProp.instance.visible_Getter_(unwrap_jso(this));
+  bool get visible => _blink.BlinkBarProp.instance.visible_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2465,11 +2090,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static BaseElement internalCreateBaseElement() {
-    return new BaseElement._internalWrap();
-  }
-
-  external factory BaseElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   BaseElement.internal_() : super.internal_();
@@ -2483,19 +2104,19 @@
 
   @DomName('HTMLBaseElement.href')
   @DocsEditable()
-  String get href => _blink.BlinkHTMLBaseElement.instance.href_Getter_(unwrap_jso(this));
+  String get href => _blink.BlinkHTMLBaseElement.instance.href_Getter_(this);
   
   @DomName('HTMLBaseElement.href')
   @DocsEditable()
-  set href(String value) => _blink.BlinkHTMLBaseElement.instance.href_Setter_(unwrap_jso(this), value);
+  set href(String value) => _blink.BlinkHTMLBaseElement.instance.href_Setter_(this, value);
   
   @DomName('HTMLBaseElement.target')
   @DocsEditable()
-  String get target => _blink.BlinkHTMLBaseElement.instance.target_Getter_(unwrap_jso(this));
+  String get target => _blink.BlinkHTMLBaseElement.instance.target_Getter_(this);
   
   @DomName('HTMLBaseElement.target')
   @DocsEditable()
-  set target(String value) => _blink.BlinkHTMLBaseElement.instance.target_Setter_(unwrap_jso(this), value);
+  set target(String value) => _blink.BlinkHTMLBaseElement.instance.target_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2515,11 +2136,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static BatteryManager internalCreateBatteryManager() {
-    return new BatteryManager._internalWrap();
-  }
-
-  external factory BatteryManager._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   BatteryManager.internal_() : super.internal_();
@@ -2527,19 +2144,67 @@
 
   @DomName('BatteryManager.charging')
   @DocsEditable()
-  bool get charging => _blink.BlinkBatteryManager.instance.charging_Getter_(unwrap_jso(this));
+  bool get charging => _blink.BlinkBatteryManager.instance.charging_Getter_(this);
   
   @DomName('BatteryManager.chargingTime')
   @DocsEditable()
-  num get chargingTime => _blink.BlinkBatteryManager.instance.chargingTime_Getter_(unwrap_jso(this));
+  num get chargingTime => _blink.BlinkBatteryManager.instance.chargingTime_Getter_(this);
   
   @DomName('BatteryManager.dischargingTime')
   @DocsEditable()
-  num get dischargingTime => _blink.BlinkBatteryManager.instance.dischargingTime_Getter_(unwrap_jso(this));
+  num get dischargingTime => _blink.BlinkBatteryManager.instance.dischargingTime_Getter_(this);
   
   @DomName('BatteryManager.level')
   @DocsEditable()
-  num get level => _blink.BlinkBatteryManager.instance.level_Getter_(unwrap_jso(this));
+  num get level => _blink.BlinkBatteryManager.instance.level_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('BeforeInstallPromptEvent')
+@Experimental() // untriaged
+class BeforeInstallPromptEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory BeforeInstallPromptEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('BeforeInstallPromptEvent.BeforeInstallPromptEvent')
+  @DocsEditable()
+  factory BeforeInstallPromptEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkBeforeInstallPromptEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkBeforeInstallPromptEvent.instance.constructorCallback_1_(type);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  BeforeInstallPromptEvent.internal_() : super.internal_();
+
+
+  @DomName('BeforeInstallPromptEvent.platforms')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<String> get platforms => _blink.BlinkBeforeInstallPromptEvent.instance.platforms_Getter_(this);
+  
+  @DomName('BeforeInstallPromptEvent.userChoice')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future get userChoice => convertNativePromiseToDartFuture(_blink.BlinkBeforeInstallPromptEvent.instance.userChoice_Getter_(this));
+  
+  @DomName('BeforeInstallPromptEvent.prompt')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future prompt() => convertNativePromiseToDartFuture(_blink.BlinkBeforeInstallPromptEvent.instance.prompt_Callback_0_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2557,11 +2222,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static BeforeUnloadEvent internalCreateBeforeUnloadEvent() {
-    return new BeforeUnloadEvent._internalWrap();
-  }
-
-  external factory BeforeUnloadEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   BeforeUnloadEvent.internal_() : super.internal_();
@@ -2569,11 +2230,11 @@
 
   @DomName('BeforeUnloadEvent.returnValue')
   @DocsEditable()
-  String get returnValue => _blink.BlinkBeforeUnloadEvent.instance.returnValue_Getter_(unwrap_jso(this));
+  String get returnValue => _blink.BlinkBeforeUnloadEvent.instance.returnValue_Getter_(this);
   
   @DomName('BeforeUnloadEvent.returnValue')
   @DocsEditable()
-  set returnValue(String value) => _blink.BlinkBeforeUnloadEvent.instance.returnValue_Setter_(unwrap_jso(this), value);
+  set returnValue(String value) => _blink.BlinkBeforeUnloadEvent.instance.returnValue_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2586,60 +2247,52 @@
   // To suppress missing implicit constructor warnings.
   factory Blob._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Blob internalCreateBlob() {
-    return new Blob._internalWrap();
-  }
 
-  factory Blob._internalWrap() {
-    return new Blob.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Blob.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Blob.size')
   @DocsEditable()
-  int get size => _blink.BlinkBlob.instance.size_Getter_(unwrap_jso(this));
+  int get size => _blink.BlinkBlob.instance.size_Getter_(this);
   
   @DomName('Blob.type')
   @DocsEditable()
-  String get type => _blink.BlinkBlob.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkBlob.instance.type_Getter_(this);
   
   @DomName('Blob.close')
   @DocsEditable()
   @Experimental() // untriaged
-  void close() => _blink.BlinkBlob.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkBlob.instance.close_Callback_0_(this);
   
   Blob slice([int start, int end, String contentType]) {
     if (contentType != null) {
-      return wrap_jso(_blink.BlinkBlob.instance.slice_Callback_3_(unwrap_jso(this), start, end, contentType));
+      return _blink.BlinkBlob.instance.slice_Callback_3_(this, start, end, contentType);
     }
     if (end != null) {
-      return wrap_jso(_blink.BlinkBlob.instance.slice_Callback_2_(unwrap_jso(this), start, end));
+      return _blink.BlinkBlob.instance.slice_Callback_2_(this, start, end);
     }
     if (start != null) {
-      return wrap_jso(_blink.BlinkBlob.instance.slice_Callback_1_(unwrap_jso(this), start));
+      return _blink.BlinkBlob.instance.slice_Callback_1_(this, start);
     }
-    return wrap_jso(_blink.BlinkBlob.instance.slice_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkBlob.instance.slice_Callback_0_(this);
   }
 
   factory Blob(List blobParts, [String type, String endings]) {
     // TODO: any coercions on the elements of blobParts, e.g. coerce a typed
     // array to ArrayBuffer if it is a total view.
 
-    var parts = convertDartToNative_List(blobParts.map(unwrap_jso).toList());
+    var parts = convertDartToNative_List(blobParts);
     if (type == null && endings == null) {
-      return wrap_jso(_blink.BlinkBlob.instance.constructorCallback_1_(parts));
+      return _blink.BlinkBlob.instance.constructorCallback_1_(parts);
     }
     var bag = {};
     if (type != null) bag['type'] = type;
     if (endings != null) bag['endings'] = endings;
-    return wrap_jso(_blink.BlinkBlob.instance.constructorCallback_2_(parts,
-        convertDartToNative_Dictionary(bag)));
+    return _blink.BlinkBlob.instance.constructorCallback_2_(parts,
+        convertDartToNative_Dictionary(bag));
   }
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2650,51 +2303,285 @@
 
 
 @DocsEditable()
+@DomName('Bluetooth')
+@Experimental() // untriaged
+class Bluetooth extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory Bluetooth._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  Bluetooth.internal_() { }
+
+  @DomName('Bluetooth.requestDevice')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future requestDevice(Map options) => convertNativePromiseToDartFuture(_blink.BlinkBluetooth.instance.requestDevice_Callback_1_(this, convertDartToNative_Dictionary(options)));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('BluetoothDevice')
+@Experimental() // untriaged
+class BluetoothDevice extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothDevice._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  BluetoothDevice.internal_() { }
+
+  @DomName('BluetoothDevice.deviceClass')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get deviceClass => _blink.BlinkBluetoothDevice.instance.deviceClass_Getter_(this);
+  
+  @DomName('BluetoothDevice.instanceID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get instanceID => _blink.BlinkBluetoothDevice.instance.instanceID_Getter_(this);
+  
+  @DomName('BluetoothDevice.name')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get name => _blink.BlinkBluetoothDevice.instance.name_Getter_(this);
+  
+  @DomName('BluetoothDevice.paired')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get paired => _blink.BlinkBluetoothDevice.instance.paired_Getter_(this);
+  
+  @DomName('BluetoothDevice.productID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get productID => _blink.BlinkBluetoothDevice.instance.productID_Getter_(this);
+  
+  @DomName('BluetoothDevice.productVersion')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get productVersion => _blink.BlinkBluetoothDevice.instance.productVersion_Getter_(this);
+  
+  @DomName('BluetoothDevice.vendorID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get vendorID => _blink.BlinkBluetoothDevice.instance.vendorID_Getter_(this);
+  
+  @DomName('BluetoothDevice.vendorIDSource')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get vendorIDSource => _blink.BlinkBluetoothDevice.instance.vendorIDSource_Getter_(this);
+  
+  @DomName('BluetoothDevice.connectGATT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future connectGatt() => convertNativePromiseToDartFuture(_blink.BlinkBluetoothDevice.instance.connectGATT_Callback_0_(this));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('BluetoothGATTCharacteristic')
+@Experimental() // untriaged
+class BluetoothGattCharacteristic extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothGattCharacteristic._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  BluetoothGattCharacteristic.internal_() { }
+
+  @DomName('BluetoothGATTCharacteristic.uuid')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get uuid => _blink.BlinkBluetoothGATTCharacteristic.instance.uuid_Getter_(this);
+  
+  @DomName('BluetoothGATTCharacteristic.readValue')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future readValue() => convertNativePromiseToDartFuture(_blink.BlinkBluetoothGATTCharacteristic.instance.readValue_Callback_0_(this));
+  
+  @DomName('BluetoothGATTCharacteristic.writeValue')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future writeValue(/*BufferSource*/ value) => convertNativePromiseToDartFuture(_blink.BlinkBluetoothGATTCharacteristic.instance.writeValue_Callback_1_(this, value));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('BluetoothGATTRemoteServer')
+@Experimental() // untriaged
+class BluetoothGattRemoteServer extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothGattRemoteServer._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  BluetoothGattRemoteServer.internal_() { }
+
+  @DomName('BluetoothGATTRemoteServer.connected')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get connected => _blink.BlinkBluetoothGATTRemoteServer.instance.connected_Getter_(this);
+  
+  @DomName('BluetoothGATTRemoteServer.getPrimaryService')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getPrimaryService(/*BluetoothServiceUUID*/ service) => convertNativePromiseToDartFuture(_blink.BlinkBluetoothGATTRemoteServer.instance.getPrimaryService_Callback_1_(this, service));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('BluetoothGATTService')
+@Experimental() // untriaged
+class BluetoothGattService extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothGattService._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  BluetoothGattService.internal_() { }
+
+  @DomName('BluetoothGATTService.isPrimary')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get isPrimary => _blink.BlinkBluetoothGATTService.instance.isPrimary_Getter_(this);
+  
+  @DomName('BluetoothGATTService.uuid')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get uuid => _blink.BlinkBluetoothGATTService.instance.uuid_Getter_(this);
+  
+  @DomName('BluetoothGATTService.getCharacteristic')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getCharacteristic(/*BluetoothCharacteristicUUID*/ characteristic) => convertNativePromiseToDartFuture(_blink.BlinkBluetoothGATTService.instance.getCharacteristic_Callback_1_(this, characteristic));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('BluetoothUUID')
+@Experimental() // untriaged
+class BluetoothUuid extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory BluetoothUuid._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  BluetoothUuid.internal_() { }
+
+  @DomName('BluetoothUUID.canonicalUUID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static String canonicalUuid(int alias) => _blink.BlinkBluetoothUUID.instance.canonicalUUID_Callback_1_(alias);
+  
+  @DomName('BluetoothUUID.getCharacteristic')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static String getCharacteristic(Object name) => _blink.BlinkBluetoothUUID.instance.getCharacteristic_Callback_1_(name);
+  
+  @DomName('BluetoothUUID.getDescriptor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static String getDescriptor(Object name) => _blink.BlinkBluetoothUUID.instance.getDescriptor_Callback_1_(name);
+  
+  @DomName('BluetoothUUID.getService')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static String getService(Object name) => _blink.BlinkBluetoothUUID.instance.getService_Callback_1_(name);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('Body')
 @Experimental() // untriaged
 class Body extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Body._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Body internalCreateBody() {
-    return new Body._internalWrap();
-  }
 
-  factory Body._internalWrap() {
-    return new Body.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Body.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Body.bodyUsed')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get bodyUsed => _blink.BlinkBody.instance.bodyUsed_Getter_(unwrap_jso(this));
+  bool get bodyUsed => _blink.BlinkBody.instance.bodyUsed_Getter_(this);
   
   @DomName('Body.arrayBuffer')
   @DocsEditable()
   @Experimental() // untriaged
-  Future arrayBuffer() => wrap_jso(_blink.BlinkBody.instance.arrayBuffer_Callback_0_(unwrap_jso(this)));
+  Future arrayBuffer() => convertNativePromiseToDartFuture(_blink.BlinkBody.instance.arrayBuffer_Callback_0_(this));
   
   @DomName('Body.blob')
   @DocsEditable()
   @Experimental() // untriaged
-  Future blob() => wrap_jso(_blink.BlinkBody.instance.blob_Callback_0_(unwrap_jso(this)));
+  Future blob() => convertNativePromiseToDartFuture(_blink.BlinkBody.instance.blob_Callback_0_(this));
   
   @DomName('Body.json')
   @DocsEditable()
   @Experimental() // untriaged
-  Future json() => wrap_jso(_blink.BlinkBody.instance.json_Callback_0_(unwrap_jso(this)));
+  Future json() => convertNativePromiseToDartFuture(_blink.BlinkBody.instance.json_Callback_0_(this));
   
   @DomName('Body.text')
   @DocsEditable()
   @Experimental() // untriaged
-  Future text() => wrap_jso(_blink.BlinkBody.instance.text_Callback_0_(unwrap_jso(this)));
+  Future text() => convertNativePromiseToDartFuture(_blink.BlinkBody.instance.text_Callback_0_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2841,11 +2728,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static BodyElement internalCreateBodyElement() {
-    return new BodyElement._internalWrap();
-  }
-
-  external factory BodyElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   BodyElement.internal_() : super.internal_();
@@ -2942,11 +2825,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ButtonElement internalCreateButtonElement() {
-    return new ButtonElement._internalWrap();
-  }
-
-  external factory ButtonElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ButtonElement.internal_() : super.internal_();
@@ -2960,112 +2839,117 @@
 
   @DomName('HTMLButtonElement.autofocus')
   @DocsEditable()
-  bool get autofocus => _blink.BlinkHTMLButtonElement.instance.autofocus_Getter_(unwrap_jso(this));
+  bool get autofocus => _blink.BlinkHTMLButtonElement.instance.autofocus_Getter_(this);
   
   @DomName('HTMLButtonElement.autofocus')
   @DocsEditable()
-  set autofocus(bool value) => _blink.BlinkHTMLButtonElement.instance.autofocus_Setter_(unwrap_jso(this), value);
+  set autofocus(bool value) => _blink.BlinkHTMLButtonElement.instance.autofocus_Setter_(this, value);
   
   @DomName('HTMLButtonElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLButtonElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLButtonElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLButtonElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLButtonElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLButtonElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLButtonElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLButtonElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLButtonElement.instance.form_Getter_(this);
   
   @DomName('HTMLButtonElement.formAction')
   @DocsEditable()
-  String get formAction => _blink.BlinkHTMLButtonElement.instance.formAction_Getter_(unwrap_jso(this));
+  String get formAction => _blink.BlinkHTMLButtonElement.instance.formAction_Getter_(this);
   
   @DomName('HTMLButtonElement.formAction')
   @DocsEditable()
-  set formAction(String value) => _blink.BlinkHTMLButtonElement.instance.formAction_Setter_(unwrap_jso(this), value);
+  set formAction(String value) => _blink.BlinkHTMLButtonElement.instance.formAction_Setter_(this, value);
   
   @DomName('HTMLButtonElement.formEnctype')
   @DocsEditable()
-  String get formEnctype => _blink.BlinkHTMLButtonElement.instance.formEnctype_Getter_(unwrap_jso(this));
+  String get formEnctype => _blink.BlinkHTMLButtonElement.instance.formEnctype_Getter_(this);
   
   @DomName('HTMLButtonElement.formEnctype')
   @DocsEditable()
-  set formEnctype(String value) => _blink.BlinkHTMLButtonElement.instance.formEnctype_Setter_(unwrap_jso(this), value);
+  set formEnctype(String value) => _blink.BlinkHTMLButtonElement.instance.formEnctype_Setter_(this, value);
   
   @DomName('HTMLButtonElement.formMethod')
   @DocsEditable()
-  String get formMethod => _blink.BlinkHTMLButtonElement.instance.formMethod_Getter_(unwrap_jso(this));
+  String get formMethod => _blink.BlinkHTMLButtonElement.instance.formMethod_Getter_(this);
   
   @DomName('HTMLButtonElement.formMethod')
   @DocsEditable()
-  set formMethod(String value) => _blink.BlinkHTMLButtonElement.instance.formMethod_Setter_(unwrap_jso(this), value);
+  set formMethod(String value) => _blink.BlinkHTMLButtonElement.instance.formMethod_Setter_(this, value);
   
   @DomName('HTMLButtonElement.formNoValidate')
   @DocsEditable()
-  bool get formNoValidate => _blink.BlinkHTMLButtonElement.instance.formNoValidate_Getter_(unwrap_jso(this));
+  bool get formNoValidate => _blink.BlinkHTMLButtonElement.instance.formNoValidate_Getter_(this);
   
   @DomName('HTMLButtonElement.formNoValidate')
   @DocsEditable()
-  set formNoValidate(bool value) => _blink.BlinkHTMLButtonElement.instance.formNoValidate_Setter_(unwrap_jso(this), value);
+  set formNoValidate(bool value) => _blink.BlinkHTMLButtonElement.instance.formNoValidate_Setter_(this, value);
   
   @DomName('HTMLButtonElement.formTarget')
   @DocsEditable()
-  String get formTarget => _blink.BlinkHTMLButtonElement.instance.formTarget_Getter_(unwrap_jso(this));
+  String get formTarget => _blink.BlinkHTMLButtonElement.instance.formTarget_Getter_(this);
   
   @DomName('HTMLButtonElement.formTarget')
   @DocsEditable()
-  set formTarget(String value) => _blink.BlinkHTMLButtonElement.instance.formTarget_Setter_(unwrap_jso(this), value);
+  set formTarget(String value) => _blink.BlinkHTMLButtonElement.instance.formTarget_Setter_(this, value);
   
   @DomName('HTMLButtonElement.labels')
   @DocsEditable()
   @Unstable()
-  List<Node> get labels => wrap_jso(_blink.BlinkHTMLButtonElement.instance.labels_Getter_(unwrap_jso(this)));
+  List<Node> get labels => (_blink.BlinkHTMLButtonElement.instance.labels_Getter_(this));
   
   @DomName('HTMLButtonElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLButtonElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLButtonElement.instance.name_Getter_(this);
   
   @DomName('HTMLButtonElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLButtonElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLButtonElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLButtonElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLButtonElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLButtonElement.instance.type_Getter_(this);
   
   @DomName('HTMLButtonElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLButtonElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLButtonElement.instance.type_Setter_(this, value);
   
   @DomName('HTMLButtonElement.validationMessage')
   @DocsEditable()
-  String get validationMessage => _blink.BlinkHTMLButtonElement.instance.validationMessage_Getter_(unwrap_jso(this));
+  String get validationMessage => _blink.BlinkHTMLButtonElement.instance.validationMessage_Getter_(this);
   
   @DomName('HTMLButtonElement.validity')
   @DocsEditable()
-  ValidityState get validity => wrap_jso(_blink.BlinkHTMLButtonElement.instance.validity_Getter_(unwrap_jso(this)));
+  ValidityState get validity => _blink.BlinkHTMLButtonElement.instance.validity_Getter_(this);
   
   @DomName('HTMLButtonElement.value')
   @DocsEditable()
-  String get value => _blink.BlinkHTMLButtonElement.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkHTMLButtonElement.instance.value_Getter_(this);
   
   @DomName('HTMLButtonElement.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkHTMLButtonElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkHTMLButtonElement.instance.value_Setter_(this, value);
   
   @DomName('HTMLButtonElement.willValidate')
   @DocsEditable()
-  bool get willValidate => _blink.BlinkHTMLButtonElement.instance.willValidate_Getter_(unwrap_jso(this));
+  bool get willValidate => _blink.BlinkHTMLButtonElement.instance.willValidate_Getter_(this);
   
   @DomName('HTMLButtonElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLButtonElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLButtonElement.instance.checkValidity_Callback_0_(this);
+  
+  @DomName('HTMLButtonElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLButtonElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLButtonElement.setCustomValidity')
   @DocsEditable()
-  void setCustomValidity(String error) => _blink.BlinkHTMLButtonElement.instance.setCustomValidity_Callback_1_(unwrap_jso(this), error);
+  void setCustomValidity(String error) => _blink.BlinkHTMLButtonElement.instance.setCustomValidity_Callback_1_(this, error);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3085,11 +2969,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CDataSection internalCreateCDataSection() {
-    return new CDataSection._internalWrap();
-  }
-
-  external factory CDataSection._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CDataSection.internal_() : super.internal_();
@@ -3110,94 +2990,39 @@
   // To suppress missing implicit constructor warnings.
   factory CacheStorage._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CacheStorage internalCreateCacheStorage() {
-    return new CacheStorage._internalWrap();
-  }
 
-  factory CacheStorage._internalWrap() {
-    return new CacheStorage.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CacheStorage.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('CacheStorage.create')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future create(String cacheName) => wrap_jso(_blink.BlinkCacheStorage.instance.create_Callback_1_(unwrap_jso(this), cacheName));
-  
   @DomName('CacheStorage.delete')
   @DocsEditable()
   @Experimental() // untriaged
-  Future delete(String cacheName) => wrap_jso(_blink.BlinkCacheStorage.instance.delete_Callback_1_(unwrap_jso(this), cacheName));
-  
-  @DomName('CacheStorage.get')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future get(String cacheName) => wrap_jso(_blink.BlinkCacheStorage.instance.get_Callback_1_(unwrap_jso(this), cacheName));
+  Future delete(String cacheName) => convertNativePromiseToDartFuture(_blink.BlinkCacheStorage.instance.delete_Callback_1_(this, cacheName));
   
   @DomName('CacheStorage.has')
   @DocsEditable()
   @Experimental() // untriaged
-  Future has(String cacheName) => wrap_jso(_blink.BlinkCacheStorage.instance.has_Callback_1_(unwrap_jso(this), cacheName));
+  Future has(String cacheName) => convertNativePromiseToDartFuture(_blink.BlinkCacheStorage.instance.has_Callback_1_(this, cacheName));
   
   @DomName('CacheStorage.keys')
   @DocsEditable()
   @Experimental() // untriaged
-  Future keys() => wrap_jso(_blink.BlinkCacheStorage.instance.keys_Callback_0_(unwrap_jso(this)));
+  Future keys() => convertNativePromiseToDartFuture(_blink.BlinkCacheStorage.instance.keys_Callback_0_(this));
   
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('Canvas2DContextAttributes')
-// http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL
-@Experimental()
-class Canvas2DContextAttributes extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory Canvas2DContextAttributes._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static Canvas2DContextAttributes internalCreateCanvas2DContextAttributes() {
-    return new Canvas2DContextAttributes._internalWrap();
+  Future match(/*RequestInfo*/ request, [Map options]) {
+    if (options != null) {
+      return _blink.BlinkCacheStorage.instance.match_Callback_2_(this, request, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkCacheStorage.instance.match_Callback_1_(this, request);
   }
 
-  factory Canvas2DContextAttributes._internalWrap() {
-    return new Canvas2DContextAttributes.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  Canvas2DContextAttributes.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('Canvas2DContextAttributes.alpha')
-  @DocsEditable()
-  bool get alpha => _blink.BlinkCanvas2DContextAttributes.instance.alpha_Getter_(unwrap_jso(this));
-  
-  @DomName('Canvas2DContextAttributes.alpha')
-  @DocsEditable()
-  set alpha(bool value) => _blink.BlinkCanvas2DContextAttributes.instance.alpha_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Canvas2DContextAttributes.storage')
+  @DomName('CacheStorage.open')
   @DocsEditable()
   @Experimental() // untriaged
-  String get storage => _blink.BlinkCanvas2DContextAttributes.instance.storage_Getter_(unwrap_jso(this));
-  
-  @DomName('Canvas2DContextAttributes.storage')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set storage(String value) => _blink.BlinkCanvas2DContextAttributes.instance.storage_Setter_(unwrap_jso(this), value);
+  Future open(String cacheName) => convertNativePromiseToDartFuture(_blink.BlinkCacheStorage.instance.open_Callback_1_(this, cacheName));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3241,11 +3066,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CanvasElement internalCreateCanvasElement() {
-    return new CanvasElement._internalWrap();
-  }
-
-  external factory CanvasElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CanvasElement.internal_() : super.internal_();
@@ -3260,31 +3081,46 @@
   /// The height of this canvas element in CSS pixels.
   @DomName('HTMLCanvasElement.height')
   @DocsEditable()
-  int get height => _blink.BlinkHTMLCanvasElement.instance.height_Getter_(unwrap_jso(this));
+  int get height => _blink.BlinkHTMLCanvasElement.instance.height_Getter_(this);
   
   /// The height of this canvas element in CSS pixels.
   @DomName('HTMLCanvasElement.height')
   @DocsEditable()
-  set height(int value) => _blink.BlinkHTMLCanvasElement.instance.height_Setter_(unwrap_jso(this), value);
+  set height(int value) => _blink.BlinkHTMLCanvasElement.instance.height_Setter_(this, value);
   
   /// The width of this canvas element in CSS pixels.
   @DomName('HTMLCanvasElement.width')
   @DocsEditable()
-  int get width => _blink.BlinkHTMLCanvasElement.instance.width_Getter_(unwrap_jso(this));
+  int get width => _blink.BlinkHTMLCanvasElement.instance.width_Getter_(this);
   
   /// The width of this canvas element in CSS pixels.
   @DomName('HTMLCanvasElement.width')
   @DocsEditable()
-  set width(int value) => _blink.BlinkHTMLCanvasElement.instance.width_Setter_(unwrap_jso(this), value);
+  set width(int value) => _blink.BlinkHTMLCanvasElement.instance.width_Setter_(this, value);
   
-  @DomName('HTMLCanvasElement.getContext')
-  @DocsEditable()
-  Object getContext(String contextId, [Map attrs]) => wrap_jso(_blink.BlinkHTMLCanvasElement.instance.getContext_Callback_2_(unwrap_jso(this), contextId, convertDartToNative_Dictionary(attrs)));
-  
-  @DomName('HTMLCanvasElement.toDataURL')
-  @DocsEditable()
-  String _toDataUrl(String type, [num quality]) => _blink.BlinkHTMLCanvasElement.instance.toDataURL_Callback_2_(unwrap_jso(this), type, quality);
-  
+  Object getContext(String contextId, [Map attributes]) {
+    if (attributes != null) {
+      return _blink.BlinkHTMLCanvasElement.instance.getContext_Callback_2_(this, contextId, convertDartToNative_Dictionary(attributes));
+    }
+    return _blink.BlinkHTMLCanvasElement.instance.getContext_Callback_1_(this, contextId);
+  }
+
+  String _toDataUrl(String type, [arguments_OR_quality]) {
+    if ((type is String || type == null) && arguments_OR_quality == null) {
+      return _blink.BlinkHTMLCanvasElement.instance.toDataURL_Callback_1_(this, type);
+    }
+    if (arguments_OR_quality != null && (type is String || type == null)) {
+      return _blink.BlinkHTMLCanvasElement.instance.toDataURL_Callback_2_(this, type, arguments_OR_quality);
+    }
+    if ((type is String || type == null) && arguments_OR_quality == null) {
+      return _blink.BlinkHTMLCanvasElement.instance.toDataURL_Callback_1_(this, type);
+    }
+    if ((arguments_OR_quality is num || arguments_OR_quality == null) && (type is String || type == null)) {
+      return _blink.BlinkHTMLCanvasElement.instance.toDataURL_Callback_2_(this, type, arguments_OR_quality);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   /// Stream of `webglcontextlost` events handled by this [CanvasElement].
   @DomName('HTMLCanvasElement.onwebglcontextlost')
   @DocsEditable()
@@ -3415,21 +3251,13 @@
   // To suppress missing implicit constructor warnings.
   factory CanvasGradient._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CanvasGradient internalCreateCanvasGradient() {
-    return new CanvasGradient._internalWrap();
-  }
 
-  factory CanvasGradient._internalWrap() {
-    return new CanvasGradient.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CanvasGradient.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /**
    * Adds a color stop to this gradient at the offset.
    *
@@ -3441,7 +3269,7 @@
    */
   @DomName('CanvasGradient.addColorStop')
   @DocsEditable()
-  void addColorStop(num offset, String color) => _blink.BlinkCanvasGradient.instance.addColorStop_Callback_2_(unwrap_jso(this), offset, color);
+  void addColorStop(num offset, String color) => _blink.BlinkCanvasGradient.instance.addColorStop_Callback_2_(this, offset, color);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3485,25 +3313,17 @@
   // To suppress missing implicit constructor warnings.
   factory CanvasPattern._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CanvasPattern internalCreateCanvasPattern() {
-    return new CanvasPattern._internalWrap();
-  }
 
-  factory CanvasPattern._internalWrap() {
-    return new CanvasPattern.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CanvasPattern.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('CanvasPattern.setTransform')
   @DocsEditable()
   @Experimental() // untriaged
-  void setTransform(Matrix transform) => _blink.BlinkCanvasPattern.instance.setTransform_Callback_1_(unwrap_jso(this), unwrap_jso(transform));
+  void setTransform(Matrix transform) => _blink.BlinkCanvasPattern.instance.setTransform_Callback_1_(this, transform);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3520,77 +3340,79 @@
   // To suppress missing implicit constructor warnings.
   factory CanvasRenderingContext2D._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CanvasRenderingContext2D internalCreateCanvasRenderingContext2D() {
-    return new CanvasRenderingContext2D._internalWrap();
-  }
 
-  factory CanvasRenderingContext2D._internalWrap() {
-    return new CanvasRenderingContext2D.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CanvasRenderingContext2D.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('CanvasRenderingContext2D.canvas')
   @DocsEditable()
   @Experimental() // untriaged
-  CanvasElement get canvas => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.canvas_Getter_(unwrap_jso(this)));
+  CanvasElement get canvas => _blink.BlinkCanvasRenderingContext2D.instance.canvas_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.currentTransform')
   @DocsEditable()
   @Experimental() // untriaged
-  Matrix get currentTransform => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.currentTransform_Getter_(unwrap_jso(this)));
+  Matrix get currentTransform => _blink.BlinkCanvasRenderingContext2D.instance.currentTransform_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.currentTransform')
   @DocsEditable()
   @Experimental() // untriaged
-  set currentTransform(Matrix value) => _blink.BlinkCanvasRenderingContext2D.instance.currentTransform_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set currentTransform(Matrix value) => _blink.BlinkCanvasRenderingContext2D.instance.currentTransform_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.direction')
   @DocsEditable()
   @Experimental() // untriaged
-  String get direction => _blink.BlinkCanvasRenderingContext2D.instance.direction_Getter_(unwrap_jso(this));
+  String get direction => _blink.BlinkCanvasRenderingContext2D.instance.direction_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.direction')
   @DocsEditable()
   @Experimental() // untriaged
-  set direction(String value) => _blink.BlinkCanvasRenderingContext2D.instance.direction_Setter_(unwrap_jso(this), value);
+  set direction(String value) => _blink.BlinkCanvasRenderingContext2D.instance.direction_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.fillStyle')
   @DocsEditable()
-  Object get fillStyle => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.fillStyle_Getter_(unwrap_jso(this)));
+  Object get fillStyle => (_blink.BlinkCanvasRenderingContext2D.instance.fillStyle_Getter_(this));
   
   @DomName('CanvasRenderingContext2D.fillStyle')
   @DocsEditable()
-  set fillStyle(Object value) => _blink.BlinkCanvasRenderingContext2D.instance.fillStyle_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set fillStyle(Object value) => _blink.BlinkCanvasRenderingContext2D.instance.fillStyle_Setter_(this, value);
+  
+  @DomName('CanvasRenderingContext2D.filter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get filter => _blink.BlinkCanvasRenderingContext2D.instance.filter_Getter_(this);
+  
+  @DomName('CanvasRenderingContext2D.filter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set filter(String value) => _blink.BlinkCanvasRenderingContext2D.instance.filter_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.font')
   @DocsEditable()
-  String get font => _blink.BlinkCanvasRenderingContext2D.instance.font_Getter_(unwrap_jso(this));
+  String get font => _blink.BlinkCanvasRenderingContext2D.instance.font_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.font')
   @DocsEditable()
-  set font(String value) => _blink.BlinkCanvasRenderingContext2D.instance.font_Setter_(unwrap_jso(this), value);
+  set font(String value) => _blink.BlinkCanvasRenderingContext2D.instance.font_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.globalAlpha')
   @DocsEditable()
-  num get globalAlpha => _blink.BlinkCanvasRenderingContext2D.instance.globalAlpha_Getter_(unwrap_jso(this));
+  num get globalAlpha => _blink.BlinkCanvasRenderingContext2D.instance.globalAlpha_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.globalAlpha')
   @DocsEditable()
-  set globalAlpha(num value) => _blink.BlinkCanvasRenderingContext2D.instance.globalAlpha_Setter_(unwrap_jso(this), value);
+  set globalAlpha(num value) => _blink.BlinkCanvasRenderingContext2D.instance.globalAlpha_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.globalCompositeOperation')
   @DocsEditable()
-  String get globalCompositeOperation => _blink.BlinkCanvasRenderingContext2D.instance.globalCompositeOperation_Getter_(unwrap_jso(this));
+  String get globalCompositeOperation => _blink.BlinkCanvasRenderingContext2D.instance.globalCompositeOperation_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.globalCompositeOperation')
   @DocsEditable()
-  set globalCompositeOperation(String value) => _blink.BlinkCanvasRenderingContext2D.instance.globalCompositeOperation_Setter_(unwrap_jso(this), value);
+  set globalCompositeOperation(String value) => _blink.BlinkCanvasRenderingContext2D.instance.globalCompositeOperation_Setter_(this, value);
   
   /**
    * Whether images and patterns on this canvas will be smoothed when this
@@ -3605,7 +3427,7 @@
   @DomName('CanvasRenderingContext2D.imageSmoothingEnabled')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get imageSmoothingEnabled => _blink.BlinkCanvasRenderingContext2D.instance.imageSmoothingEnabled_Getter_(unwrap_jso(this));
+  bool get imageSmoothingEnabled => _blink.BlinkCanvasRenderingContext2D.instance.imageSmoothingEnabled_Getter_(this);
   
   /**
    * Whether images and patterns on this canvas will be smoothed when this
@@ -3620,235 +3442,191 @@
   @DomName('CanvasRenderingContext2D.imageSmoothingEnabled')
   @DocsEditable()
   @Experimental() // untriaged
-  set imageSmoothingEnabled(bool value) => _blink.BlinkCanvasRenderingContext2D.instance.imageSmoothingEnabled_Setter_(unwrap_jso(this), value);
+  set imageSmoothingEnabled(bool value) => _blink.BlinkCanvasRenderingContext2D.instance.imageSmoothingEnabled_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.lineCap')
   @DocsEditable()
-  String get lineCap => _blink.BlinkCanvasRenderingContext2D.instance.lineCap_Getter_(unwrap_jso(this));
+  String get lineCap => _blink.BlinkCanvasRenderingContext2D.instance.lineCap_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.lineCap')
   @DocsEditable()
-  set lineCap(String value) => _blink.BlinkCanvasRenderingContext2D.instance.lineCap_Setter_(unwrap_jso(this), value);
+  set lineCap(String value) => _blink.BlinkCanvasRenderingContext2D.instance.lineCap_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.lineDashOffset')
   @DocsEditable()
-  num get lineDashOffset => _blink.BlinkCanvasRenderingContext2D.instance.lineDashOffset_Getter_(unwrap_jso(this));
+  num get lineDashOffset => _blink.BlinkCanvasRenderingContext2D.instance.lineDashOffset_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.lineDashOffset')
   @DocsEditable()
-  set lineDashOffset(num value) => _blink.BlinkCanvasRenderingContext2D.instance.lineDashOffset_Setter_(unwrap_jso(this), value);
+  set lineDashOffset(num value) => _blink.BlinkCanvasRenderingContext2D.instance.lineDashOffset_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.lineJoin')
   @DocsEditable()
-  String get lineJoin => _blink.BlinkCanvasRenderingContext2D.instance.lineJoin_Getter_(unwrap_jso(this));
+  String get lineJoin => _blink.BlinkCanvasRenderingContext2D.instance.lineJoin_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.lineJoin')
   @DocsEditable()
-  set lineJoin(String value) => _blink.BlinkCanvasRenderingContext2D.instance.lineJoin_Setter_(unwrap_jso(this), value);
+  set lineJoin(String value) => _blink.BlinkCanvasRenderingContext2D.instance.lineJoin_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.lineWidth')
   @DocsEditable()
-  num get lineWidth => _blink.BlinkCanvasRenderingContext2D.instance.lineWidth_Getter_(unwrap_jso(this));
+  num get lineWidth => _blink.BlinkCanvasRenderingContext2D.instance.lineWidth_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.lineWidth')
   @DocsEditable()
-  set lineWidth(num value) => _blink.BlinkCanvasRenderingContext2D.instance.lineWidth_Setter_(unwrap_jso(this), value);
+  set lineWidth(num value) => _blink.BlinkCanvasRenderingContext2D.instance.lineWidth_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.miterLimit')
   @DocsEditable()
-  num get miterLimit => _blink.BlinkCanvasRenderingContext2D.instance.miterLimit_Getter_(unwrap_jso(this));
+  num get miterLimit => _blink.BlinkCanvasRenderingContext2D.instance.miterLimit_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.miterLimit')
   @DocsEditable()
-  set miterLimit(num value) => _blink.BlinkCanvasRenderingContext2D.instance.miterLimit_Setter_(unwrap_jso(this), value);
+  set miterLimit(num value) => _blink.BlinkCanvasRenderingContext2D.instance.miterLimit_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.shadowBlur')
   @DocsEditable()
-  num get shadowBlur => _blink.BlinkCanvasRenderingContext2D.instance.shadowBlur_Getter_(unwrap_jso(this));
+  num get shadowBlur => _blink.BlinkCanvasRenderingContext2D.instance.shadowBlur_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.shadowBlur')
   @DocsEditable()
-  set shadowBlur(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowBlur_Setter_(unwrap_jso(this), value);
+  set shadowBlur(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowBlur_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.shadowColor')
   @DocsEditable()
-  String get shadowColor => _blink.BlinkCanvasRenderingContext2D.instance.shadowColor_Getter_(unwrap_jso(this));
+  String get shadowColor => _blink.BlinkCanvasRenderingContext2D.instance.shadowColor_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.shadowColor')
   @DocsEditable()
-  set shadowColor(String value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowColor_Setter_(unwrap_jso(this), value);
+  set shadowColor(String value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowColor_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.shadowOffsetX')
   @DocsEditable()
-  num get shadowOffsetX => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetX_Getter_(unwrap_jso(this));
+  num get shadowOffsetX => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetX_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.shadowOffsetX')
   @DocsEditable()
-  set shadowOffsetX(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetX_Setter_(unwrap_jso(this), value);
+  set shadowOffsetX(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetX_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.shadowOffsetY')
   @DocsEditable()
-  num get shadowOffsetY => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetY_Getter_(unwrap_jso(this));
+  num get shadowOffsetY => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetY_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.shadowOffsetY')
   @DocsEditable()
-  set shadowOffsetY(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetY_Setter_(unwrap_jso(this), value);
+  set shadowOffsetY(num value) => _blink.BlinkCanvasRenderingContext2D.instance.shadowOffsetY_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.strokeStyle')
   @DocsEditable()
-  Object get strokeStyle => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.strokeStyle_Getter_(unwrap_jso(this)));
+  Object get strokeStyle => (_blink.BlinkCanvasRenderingContext2D.instance.strokeStyle_Getter_(this));
   
   @DomName('CanvasRenderingContext2D.strokeStyle')
   @DocsEditable()
-  set strokeStyle(Object value) => _blink.BlinkCanvasRenderingContext2D.instance.strokeStyle_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set strokeStyle(Object value) => _blink.BlinkCanvasRenderingContext2D.instance.strokeStyle_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.textAlign')
   @DocsEditable()
-  String get textAlign => _blink.BlinkCanvasRenderingContext2D.instance.textAlign_Getter_(unwrap_jso(this));
+  String get textAlign => _blink.BlinkCanvasRenderingContext2D.instance.textAlign_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.textAlign')
   @DocsEditable()
-  set textAlign(String value) => _blink.BlinkCanvasRenderingContext2D.instance.textAlign_Setter_(unwrap_jso(this), value);
+  set textAlign(String value) => _blink.BlinkCanvasRenderingContext2D.instance.textAlign_Setter_(this, value);
   
   @DomName('CanvasRenderingContext2D.textBaseline')
   @DocsEditable()
-  String get textBaseline => _blink.BlinkCanvasRenderingContext2D.instance.textBaseline_Getter_(unwrap_jso(this));
+  String get textBaseline => _blink.BlinkCanvasRenderingContext2D.instance.textBaseline_Getter_(this);
   
   @DomName('CanvasRenderingContext2D.textBaseline')
   @DocsEditable()
-  set textBaseline(String value) => _blink.BlinkCanvasRenderingContext2D.instance.textBaseline_Setter_(unwrap_jso(this), value);
+  set textBaseline(String value) => _blink.BlinkCanvasRenderingContext2D.instance.textBaseline_Setter_(this, value);
   
   void addHitRegion([Map options]) {
     if (options != null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.addHitRegion_Callback_1_(unwrap_jso(this), convertDartToNative_Dictionary(options));
+      _blink.BlinkCanvasRenderingContext2D.instance.addHitRegion_Callback_1_(this, convertDartToNative_Dictionary(options));
       return;
     }
-    _blink.BlinkCanvasRenderingContext2D.instance.addHitRegion_Callback_0_(unwrap_jso(this));
+    _blink.BlinkCanvasRenderingContext2D.instance.addHitRegion_Callback_0_(this);
     return;
   }
 
   @DomName('CanvasRenderingContext2D.beginPath')
   @DocsEditable()
-  void beginPath() => _blink.BlinkCanvasRenderingContext2D.instance.beginPath_Callback_0_(unwrap_jso(this));
+  void beginPath() => _blink.BlinkCanvasRenderingContext2D.instance.beginPath_Callback_0_(this);
   
   @DomName('CanvasRenderingContext2D.clearHitRegions')
   @DocsEditable()
   @Experimental() // untriaged
-  void clearHitRegions() => _blink.BlinkCanvasRenderingContext2D.instance.clearHitRegions_Callback_0_(unwrap_jso(this));
+  void clearHitRegions() => _blink.BlinkCanvasRenderingContext2D.instance.clearHitRegions_Callback_0_(this);
   
   @DomName('CanvasRenderingContext2D.clearRect')
   @DocsEditable()
-  void clearRect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.clearRect_Callback_4_(unwrap_jso(this), x, y, width, height);
+  void clearRect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.clearRect_Callback_4_(this, x, y, width, height);
   
   void clip([path_OR_winding, String winding]) {
     if (path_OR_winding == null && winding == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_0_(unwrap_jso(this));
+      _blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_0_(this);
       return;
     }
     if ((path_OR_winding is String) && winding == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_1_(unwrap_jso(this), unwrap_jso(path_OR_winding));
+      _blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_1_(this, path_OR_winding);
       return;
     }
     if ((path_OR_winding is Path2D) && winding == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_1_(unwrap_jso(this), unwrap_jso(path_OR_winding));
+      _blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_1_(this, path_OR_winding);
       return;
     }
     if ((winding is String) && (path_OR_winding is Path2D)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_2_(unwrap_jso(this), unwrap_jso(path_OR_winding), winding);
+      _blink.BlinkCanvasRenderingContext2D.instance.clip_Callback_2_(this, path_OR_winding, winding);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @DomName('CanvasRenderingContext2D.createImageData')
-  @DocsEditable()
-  ImageData createImageData(num sw, num sh) => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.createImageData_Callback_2_(unwrap_jso(this), sw, sh));
-  
-  @DomName('CanvasRenderingContext2D.createImageDataFromImageData')
-  @DocsEditable()
-  ImageData createImageDataFromImageData(ImageData imagedata) => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.createImageData_Callback_1_(unwrap_jso(this), unwrap_jso(imagedata)));
-  
-  @DomName('CanvasRenderingContext2D.createLinearGradient')
-  @DocsEditable()
-  CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.createLinearGradient_Callback_4_(unwrap_jso(this), x0, y0, x1, y1));
-  
-  CanvasPattern createPattern(canvas_OR_image, String repetitionType) {
-    if ((repetitionType is String || repetitionType == null) && (canvas_OR_image is CanvasElement)) {
-      return wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.createPattern_Callback_2_(unwrap_jso(this), unwrap_jso(canvas_OR_image), repetitionType));
+  ImageData createImageData(imagedata_OR_sw, [num sh]) {
+    if ((imagedata_OR_sw is ImageData) && sh == null) {
+      return _blink.BlinkCanvasRenderingContext2D.instance.createImageData_Callback_1_(this, imagedata_OR_sw);
     }
-    if ((repetitionType is String || repetitionType == null) && (canvas_OR_image is VideoElement)) {
-      return wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.createPattern_Callback_2_(unwrap_jso(this), unwrap_jso(canvas_OR_image), repetitionType));
+    if ((sh is num) && (imagedata_OR_sw is num)) {
+      return _blink.BlinkCanvasRenderingContext2D.instance.createImageData_Callback_2_(this, imagedata_OR_sw, sh);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @DomName('CanvasRenderingContext2D.createPatternFromImage')
+  @DomName('CanvasRenderingContext2D.createLinearGradient')
   @DocsEditable()
-  CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.createPattern_Callback_2_(unwrap_jso(this), unwrap_jso(image), repetitionType));
+  CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) => _blink.BlinkCanvasRenderingContext2D.instance.createLinearGradient_Callback_4_(this, x0, y0, x1, y1);
+  
+  @DomName('CanvasRenderingContext2D.createPattern')
+  @DocsEditable()
+  CanvasPattern createPattern(Object image, String repetitionType) => _blink.BlinkCanvasRenderingContext2D.instance.createPattern_Callback_2_(this, image, repetitionType);
   
   @DomName('CanvasRenderingContext2D.createRadialGradient')
   @DocsEditable()
-  CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.createRadialGradient_Callback_6_(unwrap_jso(this), x0, y0, r0, x1, y1, r1));
+  CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) => _blink.BlinkCanvasRenderingContext2D.instance.createRadialGradient_Callback_6_(this, x0, y0, r0, x1, y1, r1);
   
   void drawFocusIfNeeded(element_OR_path, [Element element]) {
     if ((element_OR_path is Element) && element == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawFocusIfNeeded_Callback_1_(unwrap_jso(this), unwrap_jso(element_OR_path));
+      _blink.BlinkCanvasRenderingContext2D.instance.drawFocusIfNeeded_Callback_1_(this, element_OR_path);
       return;
     }
     if ((element is Element) && (element_OR_path is Path2D)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawFocusIfNeeded_Callback_2_(unwrap_jso(this), unwrap_jso(element_OR_path), unwrap_jso(element));
+      _blink.BlinkCanvasRenderingContext2D.instance.drawFocusIfNeeded_Callback_2_(this, element_OR_path, element);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  void _drawImage(canvas_OR_image_OR_imageBitmap_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width, num height_OR_sh, num dx, num dy, num dw, num dh]) {
-    if ((sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageElement) && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y);
+  void _drawImage(Object image, num sx_OR_x, num sy_OR_y, [num sw_OR_width, num height_OR_sh, num dx, num dy, num dw, num dh]) {
+    if ((sy_OR_y is num) && (sx_OR_x is num) && image != null && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
+      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(this, image, sx_OR_x, sy_OR_y);
       return;
     }
-    if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageElement) && dx == null && dy == null && dw == null && dh == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
+    if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && image != null && dx == null && dy == null && dw == null && dh == null) {
+      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(this, image, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
       return;
     }
-    if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageElement)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
-      return;
-    }
-    if ((sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is CanvasElement) && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y);
-      return;
-    }
-    if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is CanvasElement) && dx == null && dy == null && dw == null && dh == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
-      return;
-    }
-    if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is CanvasElement)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
-      return;
-    }
-    if ((sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is VideoElement) && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y);
-      return;
-    }
-    if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is VideoElement) && dx == null && dy == null && dw == null && dh == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
-      return;
-    }
-    if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is VideoElement)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
-      return;
-    }
-    if ((sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageBitmap) && sw_OR_width == null && height_OR_sh == null && dx == null && dy == null && dw == null && dh == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_3_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y);
-      return;
-    }
-    if ((height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageBitmap) && dx == null && dy == null && dw == null && dh == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_5_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh);
-      return;
-    }
-    if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && (canvas_OR_image_OR_imageBitmap_OR_video is ImageBitmap)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(unwrap_jso(this), unwrap_jso(canvas_OR_image_OR_imageBitmap_OR_video), sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
+    if ((dh is num) && (dw is num) && (dy is num) && (dx is num) && (height_OR_sh is num) && (sw_OR_width is num) && (sy_OR_y is num) && (sx_OR_x is num) && image != null) {
+      _blink.BlinkCanvasRenderingContext2D.instance.drawImage_Callback_9_(this, image, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -3856,19 +3634,19 @@
 
   void fill([path_OR_winding, String winding]) {
     if (path_OR_winding == null && winding == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_0_(unwrap_jso(this));
+      _blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_0_(this);
       return;
     }
     if ((path_OR_winding is String) && winding == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_1_(unwrap_jso(this), unwrap_jso(path_OR_winding));
+      _blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_1_(this, path_OR_winding);
       return;
     }
     if ((path_OR_winding is Path2D) && winding == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_1_(unwrap_jso(this), unwrap_jso(path_OR_winding));
+      _blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_1_(this, path_OR_winding);
       return;
     }
     if ((winding is String) && (path_OR_winding is Path2D)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_2_(unwrap_jso(this), unwrap_jso(path_OR_winding), winding);
+      _blink.BlinkCanvasRenderingContext2D.instance.fill_Callback_2_(this, path_OR_winding, winding);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -3876,14 +3654,14 @@
 
   @DomName('CanvasRenderingContext2D.fillRect')
   @DocsEditable()
-  void fillRect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.fillRect_Callback_4_(unwrap_jso(this), x, y, width, height);
+  void fillRect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.fillRect_Callback_4_(this, x, y, width, height);
   
   void fillText(String text, num x, num y, [num maxWidth]) {
     if (maxWidth != null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.fillText_Callback_4_(unwrap_jso(this), text, x, y, maxWidth);
+      _blink.BlinkCanvasRenderingContext2D.instance.fillText_Callback_4_(this, text, x, y, maxWidth);
       return;
     }
-    _blink.BlinkCanvasRenderingContext2D.instance.fillText_Callback_3_(unwrap_jso(this), text, x, y);
+    _blink.BlinkCanvasRenderingContext2D.instance.fillText_Callback_3_(this, text, x, y);
     return;
   }
 
@@ -3891,58 +3669,58 @@
   @DocsEditable()
   // http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL
   @Experimental()
-  Canvas2DContextAttributes getContextAttributes() => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.getContextAttributes_Callback_0_(unwrap_jso(this)));
+   getContextAttributes() => convertNativeDictionaryToDartDictionary((_blink.BlinkCanvasRenderingContext2D.instance.getContextAttributes_Callback_0_(this)));
   
   @DomName('CanvasRenderingContext2D.getImageData')
   @DocsEditable()
-  ImageData getImageData(num sx, num sy, num sw, num sh) => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.getImageData_Callback_4_(unwrap_jso(this), sx, sy, sw, sh));
+  ImageData getImageData(num sx, num sy, num sw, num sh) => _blink.BlinkCanvasRenderingContext2D.instance.getImageData_Callback_4_(this, sx, sy, sw, sh);
   
   @DomName('CanvasRenderingContext2D.getLineDash')
   @DocsEditable()
-  List<num> _getLineDash() => _blink.BlinkCanvasRenderingContext2D.instance.getLineDash_Callback_0_(unwrap_jso(this));
+  List<num> _getLineDash() => _blink.BlinkCanvasRenderingContext2D.instance.getLineDash_Callback_0_(this);
   
   @DomName('CanvasRenderingContext2D.isContextLost')
   @DocsEditable()
   @Experimental() // untriaged
-  bool isContextLost() => _blink.BlinkCanvasRenderingContext2D.instance.isContextLost_Callback_0_(unwrap_jso(this));
+  bool isContextLost() => _blink.BlinkCanvasRenderingContext2D.instance.isContextLost_Callback_0_(this);
   
   bool isPointInPath(path_OR_x, num x_OR_y, [winding_OR_y, String winding]) {
     if ((x_OR_y is num) && (path_OR_x is num) && winding_OR_y == null && winding == null) {
-      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInPath_Callback_2_(unwrap_jso(this), unwrap_jso(path_OR_x), x_OR_y);
+      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInPath_Callback_2_(this, path_OR_x, x_OR_y);
     }
     if ((winding_OR_y is String) && (x_OR_y is num) && (path_OR_x is num) && winding == null) {
-      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInPath_Callback_3_(unwrap_jso(this), unwrap_jso(path_OR_x), x_OR_y, unwrap_jso(winding_OR_y));
+      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInPath_Callback_3_(this, path_OR_x, x_OR_y, winding_OR_y);
     }
     if ((winding_OR_y is num) && (x_OR_y is num) && (path_OR_x is Path2D) && winding == null) {
-      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInPath_Callback_3_(unwrap_jso(this), unwrap_jso(path_OR_x), x_OR_y, unwrap_jso(winding_OR_y));
+      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInPath_Callback_3_(this, path_OR_x, x_OR_y, winding_OR_y);
     }
     if ((winding is String) && (winding_OR_y is num) && (x_OR_y is num) && (path_OR_x is Path2D)) {
-      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInPath_Callback_4_(unwrap_jso(this), unwrap_jso(path_OR_x), x_OR_y, unwrap_jso(winding_OR_y), winding);
+      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInPath_Callback_4_(this, path_OR_x, x_OR_y, winding_OR_y, winding);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   bool isPointInStroke(path_OR_x, num x_OR_y, [num y]) {
     if ((x_OR_y is num) && (path_OR_x is num) && y == null) {
-      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInStroke_Callback_2_(unwrap_jso(this), unwrap_jso(path_OR_x), x_OR_y);
+      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInStroke_Callback_2_(this, path_OR_x, x_OR_y);
     }
     if ((y is num) && (x_OR_y is num) && (path_OR_x is Path2D)) {
-      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInStroke_Callback_3_(unwrap_jso(this), unwrap_jso(path_OR_x), x_OR_y, y);
+      return _blink.BlinkCanvasRenderingContext2D.instance.isPointInStroke_Callback_3_(this, path_OR_x, x_OR_y, y);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   @DomName('CanvasRenderingContext2D.measureText')
   @DocsEditable()
-  TextMetrics measureText(String text) => wrap_jso(_blink.BlinkCanvasRenderingContext2D.instance.measureText_Callback_1_(unwrap_jso(this), text));
+  TextMetrics measureText(String text) => _blink.BlinkCanvasRenderingContext2D.instance.measureText_Callback_1_(this, text);
   
   void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
     if ((dy is num) && (dx is num) && (imagedata is ImageData) && dirtyX == null && dirtyY == null && dirtyWidth == null && dirtyHeight == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.putImageData_Callback_3_(unwrap_jso(this), unwrap_jso(imagedata), dx, dy);
+      _blink.BlinkCanvasRenderingContext2D.instance.putImageData_Callback_3_(this, convertDartToNative_ImageData(imagedata), dx, dy);
       return;
     }
     if ((dirtyHeight is num) && (dirtyWidth is num) && (dirtyY is num) && (dirtyX is num) && (dy is num) && (dx is num) && (imagedata is ImageData)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.putImageData_Callback_7_(unwrap_jso(this), unwrap_jso(imagedata), dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
+      _blink.BlinkCanvasRenderingContext2D.instance.putImageData_Callback_7_(this, convertDartToNative_ImageData(imagedata), dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -3951,53 +3729,53 @@
   @DomName('CanvasRenderingContext2D.removeHitRegion')
   @DocsEditable()
   @Experimental() // untriaged
-  void removeHitRegion(String id) => _blink.BlinkCanvasRenderingContext2D.instance.removeHitRegion_Callback_1_(unwrap_jso(this), id);
+  void removeHitRegion(String id) => _blink.BlinkCanvasRenderingContext2D.instance.removeHitRegion_Callback_1_(this, id);
   
   @DomName('CanvasRenderingContext2D.resetTransform')
   @DocsEditable()
   @Experimental() // untriaged
-  void resetTransform() => _blink.BlinkCanvasRenderingContext2D.instance.resetTransform_Callback_0_(unwrap_jso(this));
+  void resetTransform() => _blink.BlinkCanvasRenderingContext2D.instance.resetTransform_Callback_0_(this);
   
   @DomName('CanvasRenderingContext2D.restore')
   @DocsEditable()
-  void restore() => _blink.BlinkCanvasRenderingContext2D.instance.restore_Callback_0_(unwrap_jso(this));
+  void restore() => _blink.BlinkCanvasRenderingContext2D.instance.restore_Callback_0_(this);
   
   @DomName('CanvasRenderingContext2D.rotate')
   @DocsEditable()
-  void rotate(num angle) => _blink.BlinkCanvasRenderingContext2D.instance.rotate_Callback_1_(unwrap_jso(this), angle);
+  void rotate(num angle) => _blink.BlinkCanvasRenderingContext2D.instance.rotate_Callback_1_(this, angle);
   
   @DomName('CanvasRenderingContext2D.save')
   @DocsEditable()
-  void save() => _blink.BlinkCanvasRenderingContext2D.instance.save_Callback_0_(unwrap_jso(this));
+  void save() => _blink.BlinkCanvasRenderingContext2D.instance.save_Callback_0_(this);
   
   @DomName('CanvasRenderingContext2D.scale')
   @DocsEditable()
-  void scale(num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.scale_Callback_2_(unwrap_jso(this), x, y);
+  void scale(num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.scale_Callback_2_(this, x, y);
   
   void scrollPathIntoView([Path2D path]) {
     if (path != null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.scrollPathIntoView_Callback_1_(unwrap_jso(this), unwrap_jso(path));
+      _blink.BlinkCanvasRenderingContext2D.instance.scrollPathIntoView_Callback_1_(this, path);
       return;
     }
-    _blink.BlinkCanvasRenderingContext2D.instance.scrollPathIntoView_Callback_0_(unwrap_jso(this));
+    _blink.BlinkCanvasRenderingContext2D.instance.scrollPathIntoView_Callback_0_(this);
     return;
   }
 
   @DomName('CanvasRenderingContext2D.setLineDash')
   @DocsEditable()
-  void setLineDash(List<num> dash) => _blink.BlinkCanvasRenderingContext2D.instance.setLineDash_Callback_1_(unwrap_jso(this), dash);
+  void setLineDash(List<num> dash) => _blink.BlinkCanvasRenderingContext2D.instance.setLineDash_Callback_1_(this, dash);
   
   @DomName('CanvasRenderingContext2D.setTransform')
   @DocsEditable()
-  void setTransform(num a, num b, num c, num d, num e, num f) => _blink.BlinkCanvasRenderingContext2D.instance.setTransform_Callback_6_(unwrap_jso(this), a, b, c, d, e, f);
+  void setTransform(num a, num b, num c, num d, num e, num f) => _blink.BlinkCanvasRenderingContext2D.instance.setTransform_Callback_6_(this, a, b, c, d, e, f);
   
   void stroke([Path2D path]) {
     if (path == null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.stroke_Callback_0_(unwrap_jso(this));
+      _blink.BlinkCanvasRenderingContext2D.instance.stroke_Callback_0_(this);
       return;
     }
     if ((path is Path2D)) {
-      _blink.BlinkCanvasRenderingContext2D.instance.stroke_Callback_1_(unwrap_jso(this), unwrap_jso(path));
+      _blink.BlinkCanvasRenderingContext2D.instance.stroke_Callback_1_(this, path);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -4005,63 +3783,68 @@
 
   @DomName('CanvasRenderingContext2D.strokeRect')
   @DocsEditable()
-  void strokeRect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.strokeRect_Callback_4_(unwrap_jso(this), x, y, width, height);
+  void strokeRect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.strokeRect_Callback_4_(this, x, y, width, height);
   
   void strokeText(String text, num x, num y, [num maxWidth]) {
     if (maxWidth != null) {
-      _blink.BlinkCanvasRenderingContext2D.instance.strokeText_Callback_4_(unwrap_jso(this), text, x, y, maxWidth);
+      _blink.BlinkCanvasRenderingContext2D.instance.strokeText_Callback_4_(this, text, x, y, maxWidth);
       return;
     }
-    _blink.BlinkCanvasRenderingContext2D.instance.strokeText_Callback_3_(unwrap_jso(this), text, x, y);
+    _blink.BlinkCanvasRenderingContext2D.instance.strokeText_Callback_3_(this, text, x, y);
     return;
   }
 
   @DomName('CanvasRenderingContext2D.transform')
   @DocsEditable()
-  void transform(num a, num b, num c, num d, num e, num f) => _blink.BlinkCanvasRenderingContext2D.instance.transform_Callback_6_(unwrap_jso(this), a, b, c, d, e, f);
+  void transform(num a, num b, num c, num d, num e, num f) => _blink.BlinkCanvasRenderingContext2D.instance.transform_Callback_6_(this, a, b, c, d, e, f);
   
   @DomName('CanvasRenderingContext2D.translate')
   @DocsEditable()
-  void translate(num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.translate_Callback_2_(unwrap_jso(this), x, y);
+  void translate(num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.translate_Callback_2_(this, x, y);
   
   @DomName('CanvasRenderingContext2D.arc')
   @DocsEditable()
-  void _arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise) => _blink.BlinkCanvasRenderingContext2D.instance.arc_Callback_6_(unwrap_jso(this), x, y, radius, startAngle, endAngle, anticlockwise);
+  void _arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise) => _blink.BlinkCanvasRenderingContext2D.instance.arc_Callback_6_(this, x, y, radius, startAngle, endAngle, anticlockwise);
   
   @DomName('CanvasRenderingContext2D.arcTo')
   @DocsEditable()
-  void arcTo(num x1, num y1, num x2, num y2, num radius) => _blink.BlinkCanvasRenderingContext2D.instance.arcTo_Callback_5_(unwrap_jso(this), x1, y1, x2, y2, radius);
+  void arcTo(num x1, num y1, num x2, num y2, num radius) => _blink.BlinkCanvasRenderingContext2D.instance.arcTo_Callback_5_(this, x1, y1, x2, y2, radius);
   
   @DomName('CanvasRenderingContext2D.bezierCurveTo')
   @DocsEditable()
-  void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.bezierCurveTo_Callback_6_(unwrap_jso(this), cp1x, cp1y, cp2x, cp2y, x, y);
+  void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.bezierCurveTo_Callback_6_(this, cp1x, cp1y, cp2x, cp2y, x, y);
   
   @DomName('CanvasRenderingContext2D.closePath')
   @DocsEditable()
-  void closePath() => _blink.BlinkCanvasRenderingContext2D.instance.closePath_Callback_0_(unwrap_jso(this));
+  void closePath() => _blink.BlinkCanvasRenderingContext2D.instance.closePath_Callback_0_(this);
   
   @DomName('CanvasRenderingContext2D.ellipse')
   @DocsEditable()
   @Experimental() // untriaged
-  void ellipse(num x, num y, num radiusX, num radiusY, num rotation, num startAngle, num endAngle, bool anticlockwise) => _blink.BlinkCanvasRenderingContext2D.instance.ellipse_Callback_8_(unwrap_jso(this), x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
+  void ellipse(num x, num y, num radiusX, num radiusY, num rotation, num startAngle, num endAngle, bool anticlockwise) => _blink.BlinkCanvasRenderingContext2D.instance.ellipse_Callback_8_(this, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
   
   @DomName('CanvasRenderingContext2D.lineTo')
   @DocsEditable()
-  void lineTo(num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.lineTo_Callback_2_(unwrap_jso(this), x, y);
+  void lineTo(num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.lineTo_Callback_2_(this, x, y);
   
   @DomName('CanvasRenderingContext2D.moveTo')
   @DocsEditable()
-  void moveTo(num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.moveTo_Callback_2_(unwrap_jso(this), x, y);
+  void moveTo(num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.moveTo_Callback_2_(this, x, y);
   
   @DomName('CanvasRenderingContext2D.quadraticCurveTo')
   @DocsEditable()
-  void quadraticCurveTo(num cpx, num cpy, num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.quadraticCurveTo_Callback_4_(unwrap_jso(this), cpx, cpy, x, y);
+  void quadraticCurveTo(num cpx, num cpy, num x, num y) => _blink.BlinkCanvasRenderingContext2D.instance.quadraticCurveTo_Callback_4_(this, cpx, cpy, x, y);
   
   @DomName('CanvasRenderingContext2D.rect')
   @DocsEditable()
-  void rect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.rect_Callback_4_(unwrap_jso(this), x, y, width, height);
+  void rect(num x, num y, num width, num height) => _blink.BlinkCanvasRenderingContext2D.instance.rect_Callback_4_(this, x, y, width, height);
   
 
+  @DomName('CanvasRenderingContext2D.createImageDataFromImageData')
+  @DocsEditable()
+  ImageData createImageDataFromImageData(ImageData imagedata) =>
+    this.createImageData(imagedata);
+
   /**
    * Sets the color used inside shapes.
    * [r], [g], [b] are 0-255, [a] is 0-1.
@@ -4105,6 +3888,10 @@
     _arc(x, y, radius, startAngle, endAngle, anticlockwise);
   }
 
+  @DomName('CanvasRenderingContext2D.createPatternFromImage')
+  CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) =>
+    createPattern(image, repetitionType);
+
   /**
    * Draws an image from a CanvasImageSource to an area of this canvas.
    *
@@ -4305,17 +4092,13 @@
 
 @DocsEditable()
 @DomName('CharacterData')
-class CharacterData extends Node implements ChildNode {
+class CharacterData extends Node implements NonDocumentTypeChildNode, ChildNode {
   // To suppress missing implicit constructor warnings.
   factory CharacterData._() { throw new UnsupportedError("Not supported"); }
 
 
   @Deprecated("Internal Use Only")
-  static CharacterData internalCreateCharacterData() {
-    return new CharacterData._internalWrap();
-  }
-
-  external factory CharacterData._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CharacterData.internal_() : super.internal_();
@@ -4323,43 +4106,53 @@
 
   @DomName('CharacterData.data')
   @DocsEditable()
-  String get data => _blink.BlinkCharacterData.instance.data_Getter_(unwrap_jso(this));
+  String get data => _blink.BlinkCharacterData.instance.data_Getter_(this);
   
   @DomName('CharacterData.data')
   @DocsEditable()
-  set data(String value) => _blink.BlinkCharacterData.instance.data_Setter_(unwrap_jso(this), value);
+  set data(String value) => _blink.BlinkCharacterData.instance.data_Setter_(this, value);
   
   @DomName('CharacterData.length')
   @DocsEditable()
-  int get length => _blink.BlinkCharacterData.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkCharacterData.instance.length_Getter_(this);
   
   @DomName('CharacterData.appendData')
   @DocsEditable()
-  void appendData(String data) => _blink.BlinkCharacterData.instance.appendData_Callback_1_(unwrap_jso(this), data);
+  void appendData(String data) => _blink.BlinkCharacterData.instance.appendData_Callback_1_(this, data);
   
   @DomName('CharacterData.deleteData')
   @DocsEditable()
-  void deleteData(int offset, int length) => _blink.BlinkCharacterData.instance.deleteData_Callback_2_(unwrap_jso(this), offset, length);
+  void deleteData(int offset, int count) => _blink.BlinkCharacterData.instance.deleteData_Callback_2_(this, offset, count);
   
   @DomName('CharacterData.insertData')
   @DocsEditable()
-  void insertData(int offset, String data) => _blink.BlinkCharacterData.instance.insertData_Callback_2_(unwrap_jso(this), offset, data);
+  void insertData(int offset, String data) => _blink.BlinkCharacterData.instance.insertData_Callback_2_(this, offset, data);
   
   @DomName('CharacterData.replaceData')
   @DocsEditable()
-  void replaceData(int offset, int length, String data) => _blink.BlinkCharacterData.instance.replaceData_Callback_3_(unwrap_jso(this), offset, length, data);
+  void replaceData(int offset, int count, String data) => _blink.BlinkCharacterData.instance.replaceData_Callback_3_(this, offset, count, data);
   
   @DomName('CharacterData.substringData')
   @DocsEditable()
-  String substringData(int offset, int length) => _blink.BlinkCharacterData.instance.substringData_Callback_2_(unwrap_jso(this), offset, length);
+  String substringData(int offset, int count) => _blink.BlinkCharacterData.instance.substringData_Callback_2_(this, offset, count);
+  
+  @DomName('CharacterData.after')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void after(Object nodes) => _blink.BlinkCharacterData.instance.after_Callback_1_(this, nodes);
+  
+  @DomName('CharacterData.before')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void before(Object nodes) => _blink.BlinkCharacterData.instance.before_Callback_1_(this, nodes);
   
   @DomName('CharacterData.nextElementSibling')
   @DocsEditable()
-  Element get nextElementSibling => wrap_jso(_blink.BlinkCharacterData.instance.nextElementSibling_Getter_(unwrap_jso(this)));
+  Element get nextElementSibling => _blink.BlinkCharacterData.instance.nextElementSibling_Getter_(this);
   
   @DomName('CharacterData.previousElementSibling')
   @DocsEditable()
-  Element get previousElementSibling => wrap_jso(_blink.BlinkCharacterData.instance.previousElementSibling_Getter_(unwrap_jso(this)));
+  Element get previousElementSibling => _blink.BlinkCharacterData.instance.previousElementSibling_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4376,15 +4169,15 @@
   // To suppress missing implicit constructor warnings.
   factory ChildNode._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('ChildNode.nextElementSibling')
+  @DomName('ChildNode.after')
   @DocsEditable()
   @Experimental() // untriaged
-  Element get nextElementSibling;
+  void after(Object nodes);
 
-  @DomName('ChildNode.previousElementSibling')
+  @DomName('ChildNode.before')
   @DocsEditable()
   @Experimental() // untriaged
-  Element get previousElementSibling;
+  void before(Object nodes);
 
   @DomName('ChildNode.remove')
   @DocsEditable()
@@ -4400,6 +4193,28 @@
 
 
 @DocsEditable()
+@DomName('CHROMIUMValuebuffer')
+@Experimental() // untriaged
+class ChromiumValuebuffer extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory ChromiumValuebuffer._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ChromiumValuebuffer.internal_() { }
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('CircularGeofencingRegion')
 @Experimental() // untriaged
 class CircularGeofencingRegion extends GeofencingRegion {
@@ -4410,16 +4225,12 @@
   @DocsEditable()
   factory CircularGeofencingRegion(Map init) {
     var init_1 = convertDartToNative_Dictionary(init);
-    return wrap_jso(_blink.BlinkCircularGeofencingRegion.instance.constructorCallback_1_(init_1));
+    return _blink.BlinkCircularGeofencingRegion.instance.constructorCallback_1_(init_1);
   }
 
 
   @Deprecated("Internal Use Only")
-  static CircularGeofencingRegion internalCreateCircularGeofencingRegion() {
-    return new CircularGeofencingRegion._internalWrap();
-  }
-
-  external factory CircularGeofencingRegion._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CircularGeofencingRegion.internal_() : super.internal_();
@@ -4438,17 +4249,130 @@
   @DomName('CircularGeofencingRegion.latitude')
   @DocsEditable()
   @Experimental() // untriaged
-  num get latitude => _blink.BlinkCircularGeofencingRegion.instance.latitude_Getter_(unwrap_jso(this));
+  num get latitude => _blink.BlinkCircularGeofencingRegion.instance.latitude_Getter_(this);
   
   @DomName('CircularGeofencingRegion.longitude')
   @DocsEditable()
   @Experimental() // untriaged
-  num get longitude => _blink.BlinkCircularGeofencingRegion.instance.longitude_Getter_(unwrap_jso(this));
+  num get longitude => _blink.BlinkCircularGeofencingRegion.instance.longitude_Getter_(this);
   
   @DomName('CircularGeofencingRegion.radius')
   @DocsEditable()
   @Experimental() // untriaged
-  num get radius => _blink.BlinkCircularGeofencingRegion.instance.radius_Getter_(unwrap_jso(this));
+  num get radius => _blink.BlinkCircularGeofencingRegion.instance.radius_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('Client')
+@Experimental() // untriaged
+class Client extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory Client._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  Client.internal_() { }
+
+  @DomName('Client.frameType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get frameType => _blink.BlinkClient.instance.frameType_Getter_(this);
+  
+  @DomName('Client.id')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get id => _blink.BlinkClient.instance.id_Getter_(this);
+  
+  @DomName('Client.url')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get url => _blink.BlinkClient.instance.url_Getter_(this);
+  
+  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      _blink.BlinkClient.instance.postMessage_Callback_2_(this, convertDartToNative_SerializedScriptValue(message), transfer);
+      return;
+    }
+    _blink.BlinkClient.instance.postMessage_Callback_1_(this, convertDartToNative_SerializedScriptValue(message));
+    return;
+  }
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('Clients')
+@Experimental() // untriaged
+class Clients extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory Clients._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  Clients.internal_() { }
+
+  @DomName('Clients.claim')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future claim() => convertNativePromiseToDartFuture(_blink.BlinkClients.instance.claim_Callback_0_(this));
+  
+  Future matchAll([Map options]) {
+    if (options != null) {
+      return _blink.BlinkClients.instance.matchAll_Callback_1_(this, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkClients.instance.matchAll_Callback_0_(this);
+  }
+
+  @DomName('Clients.openWindow')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future openWindow(String url) => convertNativePromiseToDartFuture(_blink.BlinkClients.instance.openWindow_Callback_1_(this, url));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('ClipboardEvent')
+@Experimental() // untriaged
+class ClipboardEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory ClipboardEvent._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ClipboardEvent.internal_() : super.internal_();
+
+
+  @DomName('ClipboardEvent.clipboardData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DataTransfer get clipboardData => _blink.BlinkClipboardEvent.instance.clipboardData_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4464,13 +4388,19 @@
   // To suppress missing implicit constructor warnings.
   factory CloseEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static CloseEvent internalCreateCloseEvent() {
-    return new CloseEvent._internalWrap();
+  @DomName('CloseEvent.CloseEvent')
+  @DocsEditable()
+  factory CloseEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkCloseEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkCloseEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory CloseEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CloseEvent.internal_() : super.internal_();
@@ -4478,15 +4408,15 @@
 
   @DomName('CloseEvent.code')
   @DocsEditable()
-  int get code => _blink.BlinkCloseEvent.instance.code_Getter_(unwrap_jso(this));
+  int get code => _blink.BlinkCloseEvent.instance.code_Getter_(this);
   
   @DomName('CloseEvent.reason')
   @DocsEditable()
-  String get reason => _blink.BlinkCloseEvent.instance.reason_Getter_(unwrap_jso(this));
+  String get reason => _blink.BlinkCloseEvent.instance.reason_Getter_(this);
   
   @DomName('CloseEvent.wasClean')
   @DocsEditable()
-  bool get wasClean => _blink.BlinkCloseEvent.instance.wasClean_Getter_(unwrap_jso(this));
+  bool get wasClean => _blink.BlinkCloseEvent.instance.wasClean_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4504,18 +4434,14 @@
   @DocsEditable()
   factory Comment([String data]) {
     if (data != null) {
-      return wrap_jso(_blink.BlinkComment.instance.constructorCallback_1_(data));
+      return _blink.BlinkComment.instance.constructorCallback_1_(data);
     }
-    return wrap_jso(_blink.BlinkComment.instance.constructorCallback_0_());
+    return _blink.BlinkComment.instance.constructorCallback_0_();
   }
 
 
   @Deprecated("Internal Use Only")
-  static Comment internalCreateComment() {
-    return new Comment._internalWrap();
-  }
-
-  external factory Comment._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Comment.internal_() : super.internal_();
@@ -4543,43 +4469,32 @@
     return e;
   }
 
-  // To suppress missing implicit constructor warnings.
-  factory CompositionEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CompositionEvent.CompositionEvent')
+  @DocsEditable()
+  factory CompositionEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkCompositionEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkCompositionEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static CompositionEvent internalCreateCompositionEvent() {
-    return new CompositionEvent._internalWrap();
-  }
-
-  external factory CompositionEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CompositionEvent.internal_() : super.internal_();
 
 
-  @DomName('CompositionEvent.activeSegmentEnd')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int get activeSegmentEnd => _blink.BlinkCompositionEvent.instance.activeSegmentEnd_Getter_(unwrap_jso(this));
-  
-  @DomName('CompositionEvent.activeSegmentStart')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int get activeSegmentStart => _blink.BlinkCompositionEvent.instance.activeSegmentStart_Getter_(unwrap_jso(this));
-  
   @DomName('CompositionEvent.data')
   @DocsEditable()
-  String get data => _blink.BlinkCompositionEvent.instance.data_Getter_(unwrap_jso(this));
-  
-  @DomName('CompositionEvent.getSegments')
-  @DocsEditable()
-  @Experimental() // untriaged
-  List<int> getSegments() => _blink.BlinkCompositionEvent.instance.getSegments_Callback_0_(unwrap_jso(this));
+  String get data => _blink.BlinkCompositionEvent.instance.data_Getter_(this);
   
   @DomName('CompositionEvent.initCompositionEvent')
   @DocsEditable()
-  void _initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) => _blink.BlinkCompositionEvent.instance.initCompositionEvent_Callback_5_(unwrap_jso(this), typeArg, canBubbleArg, cancelableArg, unwrap_jso(viewArg), dataArg);
+  void _initCompositionEvent(String type, bool bubbles, bool cancelable, Window view, String data) => _blink.BlinkCompositionEvent.instance.initCompositionEvent_Callback_5_(this, type, bubbles, cancelable, view, data);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4590,6 +4505,199 @@
 
 
 @DocsEditable()
+@DomName('CompositorProxy')
+@Experimental() // untriaged
+class CompositorProxy extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory CompositorProxy._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CompositorProxy.CompositorProxy')
+  @DocsEditable()
+  factory CompositorProxy(Element element, List<String> attributeArray) {
+    return _blink.BlinkCompositorProxy.instance.constructorCallback_2_(element, attributeArray);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  CompositorProxy.internal_() { }
+
+  @DomName('CompositorProxy.opacity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get opacity => _blink.BlinkCompositorProxy.instance.opacity_Getter_(this);
+  
+  @DomName('CompositorProxy.opacity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set opacity(num value) => _blink.BlinkCompositorProxy.instance.opacity_Setter_(this, value);
+  
+  @DomName('CompositorProxy.scrollLeft')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get scrollLeft => _blink.BlinkCompositorProxy.instance.scrollLeft_Getter_(this);
+  
+  @DomName('CompositorProxy.scrollLeft')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set scrollLeft(num value) => _blink.BlinkCompositorProxy.instance.scrollLeft_Setter_(this, value);
+  
+  @DomName('CompositorProxy.scrollTop')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get scrollTop => _blink.BlinkCompositorProxy.instance.scrollTop_Getter_(this);
+  
+  @DomName('CompositorProxy.scrollTop')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set scrollTop(num value) => _blink.BlinkCompositorProxy.instance.scrollTop_Setter_(this, value);
+  
+  @DomName('CompositorProxy.transform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomMatrix get transform => _blink.BlinkCompositorProxy.instance.transform_Getter_(this);
+  
+  @DomName('CompositorProxy.transform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set transform(DomMatrix value) => _blink.BlinkCompositorProxy.instance.transform_Setter_(this, value);
+  
+  @DomName('CompositorProxy.disconnect')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void disconnect() => _blink.BlinkCompositorProxy.instance.disconnect_Callback_0_(this);
+  
+  @DomName('CompositorProxy.supports')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool supports(String attribute) => _blink.BlinkCompositorProxy.instance.supports_Callback_1_(this, attribute);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('CompositorWorker')
+@Experimental() // untriaged
+class CompositorWorker extends EventTarget implements AbstractWorker {
+  // To suppress missing implicit constructor warnings.
+  factory CompositorWorker._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CompositorWorker.errorEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+
+  @DomName('CompositorWorker.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+  @DomName('CompositorWorker.CompositorWorker')
+  @DocsEditable()
+  factory CompositorWorker(String scriptUrl) {
+    return _blink.BlinkCompositorWorker.instance.constructorCallback_1_(scriptUrl);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  CompositorWorker.internal_() : super.internal_();
+
+
+  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      _blink.BlinkCompositorWorker.instance.postMessage_Callback_2_(this, convertDartToNative_SerializedScriptValue(message), transfer);
+      return;
+    }
+    _blink.BlinkCompositorWorker.instance.postMessage_Callback_1_(this, convertDartToNative_SerializedScriptValue(message));
+    return;
+  }
+
+  @DomName('CompositorWorker.terminate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void terminate() => _blink.BlinkCompositorWorker.instance.terminate_Callback_0_(this);
+  
+  @DomName('CompositorWorker.onerror')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<Event> get onError => errorEvent.forTarget(this);
+
+  @DomName('CompositorWorker.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('CompositorWorkerGlobalScope')
+@Experimental() // untriaged
+class CompositorWorkerGlobalScope extends WorkerGlobalScope {
+  // To suppress missing implicit constructor warnings.
+  factory CompositorWorkerGlobalScope._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CompositorWorkerGlobalScope.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  CompositorWorkerGlobalScope.internal_() : super.internal_();
+
+
+  @DomName('CompositorWorkerGlobalScope.cancelAnimationFrame')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void cancelAnimationFrame(int handle) => _blink.BlinkCompositorWorkerGlobalScope.instance.cancelAnimationFrame_Callback_1_(this, handle);
+  
+  void postMessage(Object message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      _blink.BlinkCompositorWorkerGlobalScope.instance.postMessage_Callback_2_(this, convertDartToNative_SerializedScriptValue(message), transfer);
+      return;
+    }
+    _blink.BlinkCompositorWorkerGlobalScope.instance.postMessage_Callback_1_(this, convertDartToNative_SerializedScriptValue(message));
+    return;
+  }
+
+  @DomName('CompositorWorkerGlobalScope.requestAnimationFrame')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int requestAnimationFrame(FrameRequestCallback callback) => _blink.BlinkCompositorWorkerGlobalScope.instance.requestAnimationFrame_Callback_1_(this, callback);
+  
+  @DomName('CompositorWorkerGlobalScope.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('Console')
 class Console extends ConsoleBase {
   // To suppress missing implicit constructor warnings.
@@ -4597,11 +4705,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Console internalCreateConsole() {
-    return new Console._internalWrap();
-  }
-
-  external factory Console._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Console.internal_() : super.internal_();
@@ -4610,7 +4714,12 @@
   @DomName('Console.memory')
   @DocsEditable()
   @Experimental()
-  MemoryInfo get memory => wrap_jso(_blink.BlinkConsole.instance.memory_Getter_(unwrap_jso(this)));
+  MemoryInfo get memory => _blink.BlinkConsole.instance.memory_Getter_(this);
+  
+  @DomName('Console.memory')
+  @DocsEditable()
+  @Experimental()
+  set memory(MemoryInfo value) => _blink.BlinkConsole.instance.memory_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4627,135 +4736,127 @@
   // To suppress missing implicit constructor warnings.
   factory ConsoleBase._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ConsoleBase internalCreateConsoleBase() {
-    return new ConsoleBase._internalWrap();
-  }
 
-  factory ConsoleBase._internalWrap() {
-    return new ConsoleBase.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ConsoleBase.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('ConsoleBase.assertCondition')
+  @DomName('ConsoleBase.assert')
   @DocsEditable()
   @Experimental() // untriaged
-  void assertCondition(bool condition, Object arg) => _blink.BlinkConsoleBase.instance.assert_Callback_2_(unwrap_jso(this), condition, arg);
+  void assertCondition(bool condition, Object arg) => _blink.BlinkConsoleBase.instance.assert_Callback_2_(this, condition, arg);
   
   @DomName('ConsoleBase.clear')
   @DocsEditable()
   @Experimental() // untriaged
-  void clear(Object arg) => _blink.BlinkConsoleBase.instance.clear_Callback_1_(unwrap_jso(this), arg);
+  void clear(Object arg) => _blink.BlinkConsoleBase.instance.clear_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.count')
   @DocsEditable()
   @Experimental() // untriaged
-  void count(Object arg) => _blink.BlinkConsoleBase.instance.count_Callback_1_(unwrap_jso(this), arg);
+  void count(Object arg) => _blink.BlinkConsoleBase.instance.count_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.debug')
   @DocsEditable()
   @Experimental() // untriaged
-  void debug(Object arg) => _blink.BlinkConsoleBase.instance.debug_Callback_1_(unwrap_jso(this), arg);
+  void debug(Object arg) => _blink.BlinkConsoleBase.instance.debug_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.dir')
   @DocsEditable()
   @Experimental() // untriaged
-  void dir(Object arg) => _blink.BlinkConsoleBase.instance.dir_Callback_1_(unwrap_jso(this), arg);
+  void dir(Object arg) => _blink.BlinkConsoleBase.instance.dir_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.dirxml')
   @DocsEditable()
   @Experimental() // untriaged
-  void dirxml(Object arg) => _blink.BlinkConsoleBase.instance.dirxml_Callback_1_(unwrap_jso(this), arg);
+  void dirxml(Object arg) => _blink.BlinkConsoleBase.instance.dirxml_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.error')
   @DocsEditable()
   @Experimental() // untriaged
-  void error(Object arg) => _blink.BlinkConsoleBase.instance.error_Callback_1_(unwrap_jso(this), arg);
+  void error(Object arg) => _blink.BlinkConsoleBase.instance.error_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.group')
   @DocsEditable()
   @Experimental() // untriaged
-  void group(Object arg) => _blink.BlinkConsoleBase.instance.group_Callback_1_(unwrap_jso(this), arg);
+  void group(Object arg) => _blink.BlinkConsoleBase.instance.group_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.groupCollapsed')
   @DocsEditable()
   @Experimental() // untriaged
-  void groupCollapsed(Object arg) => _blink.BlinkConsoleBase.instance.groupCollapsed_Callback_1_(unwrap_jso(this), arg);
+  void groupCollapsed(Object arg) => _blink.BlinkConsoleBase.instance.groupCollapsed_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.groupEnd')
   @DocsEditable()
   @Experimental() // untriaged
-  void groupEnd() => _blink.BlinkConsoleBase.instance.groupEnd_Callback_0_(unwrap_jso(this));
+  void groupEnd() => _blink.BlinkConsoleBase.instance.groupEnd_Callback_0_(this);
   
   @DomName('ConsoleBase.info')
   @DocsEditable()
   @Experimental() // untriaged
-  void info(Object arg) => _blink.BlinkConsoleBase.instance.info_Callback_1_(unwrap_jso(this), arg);
+  void info(Object arg) => _blink.BlinkConsoleBase.instance.info_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.log')
   @DocsEditable()
   @Experimental() // untriaged
-  void log(Object arg) => _blink.BlinkConsoleBase.instance.log_Callback_1_(unwrap_jso(this), arg);
+  void log(Object arg) => _blink.BlinkConsoleBase.instance.log_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.markTimeline')
   @DocsEditable()
   @Experimental() // untriaged
-  void markTimeline(String title) => _blink.BlinkConsoleBase.instance.markTimeline_Callback_1_(unwrap_jso(this), title);
+  void markTimeline(String title) => _blink.BlinkConsoleBase.instance.markTimeline_Callback_1_(this, title);
   
   @DomName('ConsoleBase.profile')
   @DocsEditable()
   @Experimental() // untriaged
-  void profile(String title) => _blink.BlinkConsoleBase.instance.profile_Callback_1_(unwrap_jso(this), title);
+  void profile(String title) => _blink.BlinkConsoleBase.instance.profile_Callback_1_(this, title);
   
   @DomName('ConsoleBase.profileEnd')
   @DocsEditable()
   @Experimental() // untriaged
-  void profileEnd(String title) => _blink.BlinkConsoleBase.instance.profileEnd_Callback_1_(unwrap_jso(this), title);
+  void profileEnd(String title) => _blink.BlinkConsoleBase.instance.profileEnd_Callback_1_(this, title);
   
   @DomName('ConsoleBase.table')
   @DocsEditable()
   @Experimental() // untriaged
-  void table(Object arg) => _blink.BlinkConsoleBase.instance.table_Callback_1_(unwrap_jso(this), arg);
+  void table(Object arg) => _blink.BlinkConsoleBase.instance.table_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.time')
   @DocsEditable()
   @Experimental() // untriaged
-  void time(String title) => _blink.BlinkConsoleBase.instance.time_Callback_1_(unwrap_jso(this), title);
+  void time(String title) => _blink.BlinkConsoleBase.instance.time_Callback_1_(this, title);
   
   @DomName('ConsoleBase.timeEnd')
   @DocsEditable()
   @Experimental() // untriaged
-  void timeEnd(String title) => _blink.BlinkConsoleBase.instance.timeEnd_Callback_1_(unwrap_jso(this), title);
+  void timeEnd(String title) => _blink.BlinkConsoleBase.instance.timeEnd_Callback_1_(this, title);
   
   @DomName('ConsoleBase.timeStamp')
   @DocsEditable()
   @Experimental() // untriaged
-  void timeStamp(String title) => _blink.BlinkConsoleBase.instance.timeStamp_Callback_1_(unwrap_jso(this), title);
+  void timeStamp(String title) => _blink.BlinkConsoleBase.instance.timeStamp_Callback_1_(this, title);
   
   @DomName('ConsoleBase.timeline')
   @DocsEditable()
   @Experimental() // untriaged
-  void timeline(String title) => _blink.BlinkConsoleBase.instance.timeline_Callback_1_(unwrap_jso(this), title);
+  void timeline(String title) => _blink.BlinkConsoleBase.instance.timeline_Callback_1_(this, title);
   
   @DomName('ConsoleBase.timelineEnd')
   @DocsEditable()
   @Experimental() // untriaged
-  void timelineEnd(String title) => _blink.BlinkConsoleBase.instance.timelineEnd_Callback_1_(unwrap_jso(this), title);
+  void timelineEnd(String title) => _blink.BlinkConsoleBase.instance.timelineEnd_Callback_1_(this, title);
   
   @DomName('ConsoleBase.trace')
   @DocsEditable()
   @Experimental() // untriaged
-  void trace(Object arg) => _blink.BlinkConsoleBase.instance.trace_Callback_1_(unwrap_jso(this), arg);
+  void trace(Object arg) => _blink.BlinkConsoleBase.instance.trace_Callback_1_(this, arg);
   
   @DomName('ConsoleBase.warn')
   @DocsEditable()
   @Experimental() // untriaged
-  void warn(Object arg) => _blink.BlinkConsoleBase.instance.warn_Callback_1_(unwrap_jso(this), arg);
+  void warn(Object arg) => _blink.BlinkConsoleBase.instance.warn_Callback_1_(this, arg);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4780,11 +4881,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ContentElement internalCreateContentElement() {
-    return new ContentElement._internalWrap();
-  }
-
-  external factory ContentElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ContentElement.internal_() : super.internal_();
@@ -4801,15 +4898,15 @@
 
   @DomName('HTMLContentElement.select')
   @DocsEditable()
-  String get select => _blink.BlinkHTMLContentElement.instance.select_Getter_(unwrap_jso(this));
+  String get select => _blink.BlinkHTMLContentElement.instance.select_Getter_(this);
   
   @DomName('HTMLContentElement.select')
   @DocsEditable()
-  set select(String value) => _blink.BlinkHTMLContentElement.instance.select_Setter_(unwrap_jso(this), value);
+  set select(String value) => _blink.BlinkHTMLContentElement.instance.select_Setter_(this, value);
   
   @DomName('HTMLContentElement.getDistributedNodes')
   @DocsEditable()
-  List<Node> getDistributedNodes() => wrap_jso(_blink.BlinkHTMLContentElement.instance.getDistributedNodes_Callback_0_(unwrap_jso(this)));
+  List<Node> getDistributedNodes() => (_blink.BlinkHTMLContentElement.instance.getDistributedNodes_Callback_0_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4825,48 +4922,40 @@
   // To suppress missing implicit constructor warnings.
   factory Coordinates._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Coordinates internalCreateCoordinates() {
-    return new Coordinates._internalWrap();
-  }
 
-  factory Coordinates._internalWrap() {
-    return new Coordinates.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Coordinates.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Coordinates.accuracy')
   @DocsEditable()
-  num get accuracy => _blink.BlinkCoordinates.instance.accuracy_Getter_(unwrap_jso(this));
+  num get accuracy => _blink.BlinkCoordinates.instance.accuracy_Getter_(this);
   
   @DomName('Coordinates.altitude')
   @DocsEditable()
-  num get altitude => _blink.BlinkCoordinates.instance.altitude_Getter_(unwrap_jso(this));
+  num get altitude => _blink.BlinkCoordinates.instance.altitude_Getter_(this);
   
   @DomName('Coordinates.altitudeAccuracy')
   @DocsEditable()
-  num get altitudeAccuracy => _blink.BlinkCoordinates.instance.altitudeAccuracy_Getter_(unwrap_jso(this));
+  num get altitudeAccuracy => _blink.BlinkCoordinates.instance.altitudeAccuracy_Getter_(this);
   
   @DomName('Coordinates.heading')
   @DocsEditable()
-  num get heading => _blink.BlinkCoordinates.instance.heading_Getter_(unwrap_jso(this));
+  num get heading => _blink.BlinkCoordinates.instance.heading_Getter_(this);
   
   @DomName('Coordinates.latitude')
   @DocsEditable()
-  num get latitude => _blink.BlinkCoordinates.instance.latitude_Getter_(unwrap_jso(this));
+  num get latitude => _blink.BlinkCoordinates.instance.latitude_Getter_(this);
   
   @DomName('Coordinates.longitude')
   @DocsEditable()
-  num get longitude => _blink.BlinkCoordinates.instance.longitude_Getter_(unwrap_jso(this));
+  num get longitude => _blink.BlinkCoordinates.instance.longitude_Getter_(this);
   
   @DomName('Coordinates.speed')
   @DocsEditable()
-  num get speed => _blink.BlinkCoordinates.instance.speed_Getter_(unwrap_jso(this));
+  num get speed => _blink.BlinkCoordinates.instance.speed_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4883,35 +4972,32 @@
   // To suppress missing implicit constructor warnings.
   factory Credential._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Credential internalCreateCredential() {
-    return new Credential._internalWrap();
-  }
 
-  factory Credential._internalWrap() {
-    return new Credential.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Credential.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('Credential.avatarURL')
+  @DomName('Credential.iconURL')
   @DocsEditable()
   @Experimental() // untriaged
-  String get avatarUrl => _blink.BlinkCredential.instance.avatarURL_Getter_(unwrap_jso(this));
+  String get iconUrl => _blink.BlinkCredential.instance.iconURL_Getter_(this);
   
   @DomName('Credential.id')
   @DocsEditable()
   @Experimental() // untriaged
-  String get id => _blink.BlinkCredential.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkCredential.instance.id_Getter_(this);
   
   @DomName('Credential.name')
   @DocsEditable()
   @Experimental() // untriaged
-  String get name => _blink.BlinkCredential.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkCredential.instance.name_Getter_(this);
+  
+  @DomName('Credential.type')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get type => _blink.BlinkCredential.instance.type_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4928,41 +5014,103 @@
   // To suppress missing implicit constructor warnings.
   factory CredentialsContainer._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CredentialsContainer internalCreateCredentialsContainer() {
-    return new CredentialsContainer._internalWrap();
-  }
 
-  factory CredentialsContainer._internalWrap() {
-    return new CredentialsContainer.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CredentialsContainer.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('CredentialsContainer.notifyFailedSignIn')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future notifyFailedSignIn(Credential credential) => wrap_jso(_blink.BlinkCredentialsContainer.instance.notifyFailedSignIn_Callback_1_(unwrap_jso(this), unwrap_jso(credential)));
-  
   @DomName('CredentialsContainer.notifySignedIn')
   @DocsEditable()
   @Experimental() // untriaged
-  Future notifySignedIn(Credential credential) => wrap_jso(_blink.BlinkCredentialsContainer.instance.notifySignedIn_Callback_1_(unwrap_jso(this), unwrap_jso(credential)));
-  
-  @DomName('CredentialsContainer.notifySignedOut')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future notifySignedOut() => wrap_jso(_blink.BlinkCredentialsContainer.instance.notifySignedOut_Callback_0_(unwrap_jso(this)));
+  Future notifySignedIn(Credential credential) => convertNativePromiseToDartFuture(_blink.BlinkCredentialsContainer.instance.notifySignedIn_Callback_1_(this, credential));
   
   Future request([Map options]) {
     if (options != null) {
-      return wrap_jso(_blink.BlinkCredentialsContainer.instance.request_Callback_1_(unwrap_jso(this), convertDartToNative_Dictionary(options)));
+      return _blink.BlinkCredentialsContainer.instance.request_Callback_1_(this, convertDartToNative_Dictionary(options));
     }
-    return wrap_jso(_blink.BlinkCredentialsContainer.instance.request_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkCredentialsContainer.instance.request_Callback_0_(this);
+  }
+
+  @DomName('CredentialsContainer.requireUserMediation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future requireUserMediation() => convertNativePromiseToDartFuture(_blink.BlinkCredentialsContainer.instance.requireUserMediation_Callback_0_(this));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('CrossOriginConnectEvent')
+@Experimental() // untriaged
+class CrossOriginConnectEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory CrossOriginConnectEvent._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  CrossOriginConnectEvent.internal_() : super.internal_();
+
+
+  @DomName('CrossOriginConnectEvent.client')
+  @DocsEditable()
+  @Experimental() // untriaged
+  CrossOriginServiceWorkerClient get client => _blink.BlinkCrossOriginConnectEvent.instance.client_Getter_(this);
+  
+  @DomName('CrossOriginConnectEvent.acceptConnection')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void acceptConnection(Future shouldAccept) => _blink.BlinkCrossOriginConnectEvent.instance.acceptConnection_Callback_1_(this, shouldAccept);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('CrossOriginServiceWorkerClient')
+@Experimental() // untriaged
+class CrossOriginServiceWorkerClient extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory CrossOriginServiceWorkerClient._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  CrossOriginServiceWorkerClient.internal_() : super.internal_();
+
+
+  @DomName('CrossOriginServiceWorkerClient.origin')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get origin => _blink.BlinkCrossOriginServiceWorkerClient.instance.origin_Getter_(this);
+  
+  @DomName('CrossOriginServiceWorkerClient.targetUrl')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get targetUrl => _blink.BlinkCrossOriginServiceWorkerClient.instance.targetUrl_Getter_(this);
+  
+  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      _blink.BlinkCrossOriginServiceWorkerClient.instance.postMessage_Callback_2_(this, convertDartToNative_SerializedScriptValue(message), transfer);
+      return;
+    }
+    _blink.BlinkCrossOriginServiceWorkerClient.instance.postMessage_Callback_1_(this, convertDartToNative_SerializedScriptValue(message));
+    return;
   }
 
 }
@@ -4993,32 +5141,24 @@
   // To suppress missing implicit constructor warnings.
   factory Crypto._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Crypto internalCreateCrypto() {
-    return new Crypto._internalWrap();
-  }
 
-  factory Crypto._internalWrap() {
-    return new Crypto.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Crypto.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
   @DomName('Crypto.subtle')
   @DocsEditable()
   @Experimental() // untriaged
-  _SubtleCrypto get subtle => wrap_jso(_blink.BlinkCrypto.instance.subtle_Getter_(unwrap_jso(this)));
+  _SubtleCrypto get subtle => _blink.BlinkCrypto.instance.subtle_Getter_(this);
   
   @DomName('Crypto.getRandomValues')
   @DocsEditable()
-  TypedData _getRandomValues(TypedData array) => wrap_jso(_blink.BlinkCrypto.instance.getRandomValues_Callback_1_(unwrap_jso(this), unwrap_jso(array)));
+  TypedData _getRandomValues(TypedData array) => _blink.BlinkCrypto.instance.getRandomValues_Callback_1_(this, array);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5035,40 +5175,32 @@
   // To suppress missing implicit constructor warnings.
   factory CryptoKey._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CryptoKey internalCreateCryptoKey() {
-    return new CryptoKey._internalWrap();
-  }
 
-  factory CryptoKey._internalWrap() {
-    return new CryptoKey.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CryptoKey.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('CryptoKey.algorithm')
   @DocsEditable()
   @Experimental() // untriaged
-  Object get algorithm => wrap_jso(_blink.BlinkCryptoKey.instance.algorithm_Getter_(unwrap_jso(this)));
+  Object get algorithm => (_blink.BlinkCryptoKey.instance.algorithm_Getter_(this));
   
   @DomName('CryptoKey.extractable')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get extractable => _blink.BlinkCryptoKey.instance.extractable_Getter_(unwrap_jso(this));
+  bool get extractable => _blink.BlinkCryptoKey.instance.extractable_Getter_(this);
   
   @DomName('CryptoKey.type')
   @DocsEditable()
   @Experimental() // untriaged
-  String get type => _blink.BlinkCryptoKey.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkCryptoKey.instance.type_Getter_(this);
   
   @DomName('CryptoKey.usages')
   @DocsEditable()
   @Experimental() // untriaged
-  List<String> get usages => _blink.BlinkCryptoKey.instance.usages_Getter_(unwrap_jso(this));
+  List<String> get usages => _blink.BlinkCryptoKey.instance.usages_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5086,28 +5218,20 @@
   // To suppress missing implicit constructor warnings.
   factory Css._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Css internalCreateCss() {
-    return new Css._internalWrap();
-  }
 
-  factory Css._internalWrap() {
-    return new Css.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Css.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('CSS.supports')
   @DocsEditable()
-  bool supports(String property, String value) => _blink.BlinkCSS.instance.supports_Callback_2_(unwrap_jso(this), property, value);
+  static bool supports(String property, String value) => _blink.BlinkCSS.instance.supports_Callback_2_(property, value);
   
   @DomName('CSS.supportsCondition')
   @DocsEditable()
-  bool supportsCondition(String conditionText) => _blink.BlinkCSS.instance.supports_Callback_1_(unwrap_jso(this), conditionText);
+  static bool supportsCondition(String conditionText) => _blink.BlinkCSS.instance.supports_Callback_1_(conditionText);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5127,11 +5251,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssCharsetRule internalCreateCssCharsetRule() {
-    return new CssCharsetRule._internalWrap();
-  }
-
-  external factory CssCharsetRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssCharsetRule.internal_() : super.internal_();
@@ -5139,45 +5259,11 @@
 
   @DomName('CSSCharsetRule.encoding')
   @DocsEditable()
-  String get encoding => _blink.BlinkCSSCharsetRule.instance.encoding_Getter_(unwrap_jso(this));
+  String get encoding => _blink.BlinkCSSCharsetRule.instance.encoding_Getter_(this);
   
   @DomName('CSSCharsetRule.encoding')
   @DocsEditable()
-  set encoding(String value) => _blink.BlinkCSSCharsetRule.instance.encoding_Setter_(unwrap_jso(this), value);
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('WebKitCSSFilterRule')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
-// http://www.w3.org/TR/filter-effects/
-class CssFilterRule extends CssRule {
-  // To suppress missing implicit constructor warnings.
-  factory CssFilterRule._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static CssFilterRule internalCreateCssFilterRule() {
-    return new CssFilterRule._internalWrap();
-  }
-
-  external factory CssFilterRule._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  CssFilterRule.internal_() : super.internal_();
-
-
-  @DomName('WebKitCSSFilterRule.style')
-  @DocsEditable()
-  CssStyleDeclaration get style => wrap_jso(_blink.BlinkWebKitCSSFilterRule.instance.style_Getter_(unwrap_jso(this)));
+  set encoding(String value) => _blink.BlinkCSSCharsetRule.instance.encoding_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5195,11 +5281,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssFontFaceRule internalCreateCssFontFaceRule() {
-    return new CssFontFaceRule._internalWrap();
-  }
-
-  external factory CssFontFaceRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssFontFaceRule.internal_() : super.internal_();
@@ -5207,7 +5289,45 @@
 
   @DomName('CSSFontFaceRule.style')
   @DocsEditable()
-  CssStyleDeclaration get style => wrap_jso(_blink.BlinkCSSFontFaceRule.instance.style_Getter_(unwrap_jso(this)));
+  CssStyleDeclaration get style => _blink.BlinkCSSFontFaceRule.instance.style_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('CSSGroupingRule')
+@Experimental() // untriaged
+class CssGroupingRule extends CssRule {
+  // To suppress missing implicit constructor warnings.
+  factory CssGroupingRule._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  CssGroupingRule.internal_() : super.internal_();
+
+
+  @DomName('CSSGroupingRule.cssRules')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<CssRule> get cssRules => _blink.BlinkCSSGroupingRule.instance.cssRules_Getter_(this);
+  
+  @DomName('CSSGroupingRule.deleteRule')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteRule(int index) => _blink.BlinkCSSGroupingRule.instance.deleteRule_Callback_1_(this, index);
+  
+  @DomName('CSSGroupingRule.insertRule')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int insertRule(String rule, int index) => _blink.BlinkCSSGroupingRule.instance.insertRule_Callback_2_(this, rule, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5225,11 +5345,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssImportRule internalCreateCssImportRule() {
-    return new CssImportRule._internalWrap();
-  }
-
-  external factory CssImportRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssImportRule.internal_() : super.internal_();
@@ -5237,15 +5353,15 @@
 
   @DomName('CSSImportRule.href')
   @DocsEditable()
-  String get href => _blink.BlinkCSSImportRule.instance.href_Getter_(unwrap_jso(this));
+  String get href => _blink.BlinkCSSImportRule.instance.href_Getter_(this);
   
   @DomName('CSSImportRule.media')
   @DocsEditable()
-  MediaList get media => wrap_jso(_blink.BlinkCSSImportRule.instance.media_Getter_(unwrap_jso(this)));
+  MediaList get media => _blink.BlinkCSSImportRule.instance.media_Getter_(this);
   
   @DomName('CSSImportRule.styleSheet')
   @DocsEditable()
-  CssStyleSheet get styleSheet => wrap_jso(_blink.BlinkCSSImportRule.instance.styleSheet_Getter_(unwrap_jso(this)));
+  CssStyleSheet get styleSheet => _blink.BlinkCSSImportRule.instance.styleSheet_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5264,11 +5380,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssKeyframeRule internalCreateCssKeyframeRule() {
-    return new CssKeyframeRule._internalWrap();
-  }
-
-  external factory CssKeyframeRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssKeyframeRule.internal_() : super.internal_();
@@ -5277,17 +5389,17 @@
   @DomName('CSSKeyframeRule.keyText')
   @DocsEditable()
   @Experimental() // untriaged
-  String get keyText => _blink.BlinkCSSKeyframeRule.instance.keyText_Getter_(unwrap_jso(this));
+  String get keyText => _blink.BlinkCSSKeyframeRule.instance.keyText_Getter_(this);
   
   @DomName('CSSKeyframeRule.keyText')
   @DocsEditable()
   @Experimental() // untriaged
-  set keyText(String value) => _blink.BlinkCSSKeyframeRule.instance.keyText_Setter_(unwrap_jso(this), value);
+  set keyText(String value) => _blink.BlinkCSSKeyframeRule.instance.keyText_Setter_(this, value);
   
   @DomName('CSSKeyframeRule.style')
   @DocsEditable()
   @Experimental() // untriaged
-  CssStyleDeclaration get style => wrap_jso(_blink.BlinkCSSKeyframeRule.instance.style_Getter_(unwrap_jso(this)));
+  CssStyleDeclaration get style => _blink.BlinkCSSKeyframeRule.instance.style_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5306,11 +5418,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssKeyframesRule internalCreateCssKeyframesRule() {
-    return new CssKeyframesRule._internalWrap();
-  }
-
-  external factory CssKeyframesRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssKeyframesRule.internal_() : super.internal_();
@@ -5319,37 +5427,37 @@
   @DomName('CSSKeyframesRule.cssRules')
   @DocsEditable()
   @Experimental() // untriaged
-  List<CssRule> get cssRules => wrap_jso(_blink.BlinkCSSKeyframesRule.instance.cssRules_Getter_(unwrap_jso(this)));
+  List<CssRule> get cssRules => _blink.BlinkCSSKeyframesRule.instance.cssRules_Getter_(this);
   
   @DomName('CSSKeyframesRule.name')
   @DocsEditable()
   @Experimental() // untriaged
-  String get name => _blink.BlinkCSSKeyframesRule.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkCSSKeyframesRule.instance.name_Getter_(this);
   
   @DomName('CSSKeyframesRule.name')
   @DocsEditable()
   @Experimental() // untriaged
-  set name(String value) => _blink.BlinkCSSKeyframesRule.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkCSSKeyframesRule.instance.name_Setter_(this, value);
   
   @DomName('CSSKeyframesRule.__getter__')
   @DocsEditable()
   @Experimental() // untriaged
-  CssKeyframeRule __getter__(int index) => wrap_jso(_blink.BlinkCSSKeyframesRule.instance.$__getter___Callback_1_(unwrap_jso(this), index));
+  CssKeyframeRule __getter__(int index) => _blink.BlinkCSSKeyframesRule.instance.$__getter___Callback_1_(this, index);
+  
+  @DomName('CSSKeyframesRule.appendRule')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void appendRule(String rule) => _blink.BlinkCSSKeyframesRule.instance.appendRule_Callback_1_(this, rule);
   
   @DomName('CSSKeyframesRule.deleteRule')
   @DocsEditable()
   @Experimental() // untriaged
-  void deleteRule(String key) => _blink.BlinkCSSKeyframesRule.instance.deleteRule_Callback_1_(unwrap_jso(this), key);
+  void deleteRule(String select) => _blink.BlinkCSSKeyframesRule.instance.deleteRule_Callback_1_(this, select);
   
   @DomName('CSSKeyframesRule.findRule')
   @DocsEditable()
   @Experimental() // untriaged
-  CssKeyframeRule findRule(String key) => wrap_jso(_blink.BlinkCSSKeyframesRule.instance.findRule_Callback_1_(unwrap_jso(this), key));
-  
-  @DomName('CSSKeyframesRule.insertRule')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void appendRule(String rule) => _blink.BlinkCSSKeyframesRule.instance.insertRule_Callback_1_(unwrap_jso(this), rule);
+  CssKeyframeRule findRule(String select) => _blink.BlinkCSSKeyframesRule.instance.findRule_Callback_1_(this, select);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5361,37 +5469,21 @@
 
 @DocsEditable()
 @DomName('CSSMediaRule')
-class CssMediaRule extends CssRule {
+class CssMediaRule extends CssGroupingRule {
   // To suppress missing implicit constructor warnings.
   factory CssMediaRule._() { throw new UnsupportedError("Not supported"); }
 
 
   @Deprecated("Internal Use Only")
-  static CssMediaRule internalCreateCssMediaRule() {
-    return new CssMediaRule._internalWrap();
-  }
-
-  external factory CssMediaRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssMediaRule.internal_() : super.internal_();
 
 
-  @DomName('CSSMediaRule.cssRules')
-  @DocsEditable()
-  List<CssRule> get cssRules => wrap_jso(_blink.BlinkCSSMediaRule.instance.cssRules_Getter_(unwrap_jso(this)));
-  
   @DomName('CSSMediaRule.media')
   @DocsEditable()
-  MediaList get media => wrap_jso(_blink.BlinkCSSMediaRule.instance.media_Getter_(unwrap_jso(this)));
-  
-  @DomName('CSSMediaRule.deleteRule')
-  @DocsEditable()
-  void deleteRule(int index) => _blink.BlinkCSSMediaRule.instance.deleteRule_Callback_1_(unwrap_jso(this), index);
-  
-  @DomName('CSSMediaRule.insertRule')
-  @DocsEditable()
-  int insertRule(String rule, int index) => _blink.BlinkCSSMediaRule.instance.insertRule_Callback_2_(unwrap_jso(this), rule, index);
+  MediaList get media => _blink.BlinkCSSMediaRule.instance.media_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5409,11 +5501,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssPageRule internalCreateCssPageRule() {
-    return new CssPageRule._internalWrap();
-  }
-
-  external factory CssPageRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssPageRule.internal_() : super.internal_();
@@ -5421,15 +5509,15 @@
 
   @DomName('CSSPageRule.selectorText')
   @DocsEditable()
-  String get selectorText => _blink.BlinkCSSPageRule.instance.selectorText_Getter_(unwrap_jso(this));
+  String get selectorText => _blink.BlinkCSSPageRule.instance.selectorText_Getter_(this);
   
   @DomName('CSSPageRule.selectorText')
   @DocsEditable()
-  set selectorText(String value) => _blink.BlinkCSSPageRule.instance.selectorText_Setter_(unwrap_jso(this), value);
+  set selectorText(String value) => _blink.BlinkCSSPageRule.instance.selectorText_Setter_(this, value);
   
   @DomName('CSSPageRule.style')
   @DocsEditable()
-  CssStyleDeclaration get style => wrap_jso(_blink.BlinkCSSPageRule.instance.style_Getter_(unwrap_jso(this)));
+  CssStyleDeclaration get style => _blink.BlinkCSSPageRule.instance.style_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5445,21 +5533,13 @@
   // To suppress missing implicit constructor warnings.
   factory CssRule._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CssRule internalCreateCssRule() {
-    return new CssRule._internalWrap();
-  }
 
-  factory CssRule._internalWrap() {
-    return new CssRule.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssRule.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('CSSRule.CHARSET_RULE')
   @DocsEditable()
   static const int CHARSET_RULE = 2;
@@ -5503,12 +5583,6 @@
   @Experimental() // untriaged
   static const int VIEWPORT_RULE = 15;
 
-  @DomName('CSSRule.WEBKIT_FILTER_RULE')
-  @DocsEditable()
-  // http://www.w3.org/TR/filter-effects/
-  @Experimental()
-  static const int WEBKIT_FILTER_RULE = 17;
-
   @DomName('CSSRule.WEBKIT_KEYFRAMES_RULE')
   @DocsEditable()
   // http://www.w3.org/TR/css3-animations/#cssrule
@@ -5523,23 +5597,23 @@
 
   @DomName('CSSRule.cssText')
   @DocsEditable()
-  String get cssText => _blink.BlinkCSSRule.instance.cssText_Getter_(unwrap_jso(this));
+  String get cssText => _blink.BlinkCSSRule.instance.cssText_Getter_(this);
   
   @DomName('CSSRule.cssText')
   @DocsEditable()
-  set cssText(String value) => _blink.BlinkCSSRule.instance.cssText_Setter_(unwrap_jso(this), value);
+  set cssText(String value) => _blink.BlinkCSSRule.instance.cssText_Setter_(this, value);
   
   @DomName('CSSRule.parentRule')
   @DocsEditable()
-  CssRule get parentRule => wrap_jso(_blink.BlinkCSSRule.instance.parentRule_Getter_(unwrap_jso(this)));
+  CssRule get parentRule => _blink.BlinkCSSRule.instance.parentRule_Getter_(this);
   
   @DomName('CSSRule.parentStyleSheet')
   @DocsEditable()
-  CssStyleSheet get parentStyleSheet => wrap_jso(_blink.BlinkCSSRule.instance.parentStyleSheet_Getter_(unwrap_jso(this)));
+  CssStyleSheet get parentStyleSheet => _blink.BlinkCSSRule.instance.parentStyleSheet_Getter_(this);
   
   @DomName('CSSRule.type')
   @DocsEditable()
-  int get type => _blink.BlinkCSSRule.instance.type_Getter_(unwrap_jso(this));
+  int get type => _blink.BlinkCSSRule.instance.type_Getter_(this);
   
 }
 
@@ -5601,7 +5675,7 @@
   }
 
   bool _hasProperty(String propertyName) =>
-      _blink.BlinkCSSStyleDeclaration.instance.$__propertyQuery___Callback_1_(unwrap_jso(this), propertyName) != null;
+      _blink.BlinkCSSStyleDeclaration.instance.$__propertyQuery___Callback_1_(this, propertyName);
 
   @DomName('CSSStyleDeclaration.setProperty')
   void setProperty(String propertyName, String value, [String priority]) {
@@ -5645,70 +5719,53 @@
   // To suppress missing implicit constructor warnings.
   factory CssStyleDeclaration._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CssStyleDeclaration internalCreateCssStyleDeclaration() {
-    return new CssStyleDeclaration._internalWrap();
-  }
 
-  factory CssStyleDeclaration._internalWrap() {
-    return new CssStyleDeclaration.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssStyleDeclaration.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('CSSStyleDeclaration.cssText')
   @DocsEditable()
-  String get cssText => _blink.BlinkCSSStyleDeclaration.instance.cssText_Getter_(unwrap_jso(this));
+  String get cssText => _blink.BlinkCSSStyleDeclaration.instance.cssText_Getter_(this);
   
   @DomName('CSSStyleDeclaration.cssText')
   @DocsEditable()
-  set cssText(String value) => _blink.BlinkCSSStyleDeclaration.instance.cssText_Setter_(unwrap_jso(this), value);
+  set cssText(String value) => _blink.BlinkCSSStyleDeclaration.instance.cssText_Setter_(this, value);
   
   @DomName('CSSStyleDeclaration.length')
   @DocsEditable()
-  int get length => _blink.BlinkCSSStyleDeclaration.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkCSSStyleDeclaration.instance.length_Getter_(this);
   
   @DomName('CSSStyleDeclaration.parentRule')
   @DocsEditable()
-  CssRule get parentRule => wrap_jso(_blink.BlinkCSSStyleDeclaration.instance.parentRule_Getter_(unwrap_jso(this)));
-  
-  @DomName('CSSStyleDeclaration.__getter__')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Object __getter__(String name) => wrap_jso(_blink.BlinkCSSStyleDeclaration.instance.$__getter___Callback_1_(unwrap_jso(this), name));
+  CssRule get parentRule => _blink.BlinkCSSStyleDeclaration.instance.parentRule_Getter_(this);
   
   @DomName('CSSStyleDeclaration.__propertyQuery__')
   @DocsEditable()
   @Experimental() // untriaged
-  bool __propertyQuery__(String name) => _blink.BlinkCSSStyleDeclaration.instance.$__propertyQuery___Callback_1_(unwrap_jso(this), name);
-  
-  @DomName('CSSStyleDeclaration.__setter__')
-  @DocsEditable()
-  void __setter__(String propertyName, String propertyValue) => _blink.BlinkCSSStyleDeclaration.instance.$__setter___Callback_2_(unwrap_jso(this), propertyName, propertyValue);
+  bool __propertyQuery__(String name) => _blink.BlinkCSSStyleDeclaration.instance.$__propertyQuery___Callback_1_(this, name);
   
   @DomName('CSSStyleDeclaration.getPropertyPriority')
   @DocsEditable()
-  String getPropertyPriority(String propertyName) => _blink.BlinkCSSStyleDeclaration.instance.getPropertyPriority_Callback_1_(unwrap_jso(this), propertyName);
+  String getPropertyPriority(String property) => _blink.BlinkCSSStyleDeclaration.instance.getPropertyPriority_Callback_1_(this, property);
   
   @DomName('CSSStyleDeclaration.getPropertyValue')
   @DocsEditable()
-  String _getPropertyValue(String propertyName) => _blink.BlinkCSSStyleDeclaration.instance.getPropertyValue_Callback_1_(unwrap_jso(this), propertyName);
+  String _getPropertyValue(String property) => _blink.BlinkCSSStyleDeclaration.instance.getPropertyValue_Callback_1_(this, property);
   
   @DomName('CSSStyleDeclaration.item')
   @DocsEditable()
-  String item(int index) => _blink.BlinkCSSStyleDeclaration.instance.item_Callback_1_(unwrap_jso(this), index);
+  String item(int index) => _blink.BlinkCSSStyleDeclaration.instance.item_Callback_1_(this, index);
   
   @DomName('CSSStyleDeclaration.removeProperty')
   @DocsEditable()
-  String removeProperty(String propertyName) => _blink.BlinkCSSStyleDeclaration.instance.removeProperty_Callback_1_(unwrap_jso(this), propertyName);
+  String removeProperty(String property) => _blink.BlinkCSSStyleDeclaration.instance.removeProperty_Callback_1_(this, property);
   
   @DomName('CSSStyleDeclaration.setProperty')
   @DocsEditable()
-  void _setProperty(String propertyName, String value, String priority) => _blink.BlinkCSSStyleDeclaration.instance.setProperty_Callback_3_(unwrap_jso(this), propertyName, value, priority);
+  void _setProperty(String property, String value, String priority) => _blink.BlinkCSSStyleDeclaration.instance.setProperty_Callback_3_(this, property, value, priority);
   
 }
 
@@ -8844,11 +8901,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssStyleRule internalCreateCssStyleRule() {
-    return new CssStyleRule._internalWrap();
-  }
-
-  external factory CssStyleRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssStyleRule.internal_() : super.internal_();
@@ -8856,15 +8909,15 @@
 
   @DomName('CSSStyleRule.selectorText')
   @DocsEditable()
-  String get selectorText => _blink.BlinkCSSStyleRule.instance.selectorText_Getter_(unwrap_jso(this));
+  String get selectorText => _blink.BlinkCSSStyleRule.instance.selectorText_Getter_(this);
   
   @DomName('CSSStyleRule.selectorText')
   @DocsEditable()
-  set selectorText(String value) => _blink.BlinkCSSStyleRule.instance.selectorText_Setter_(unwrap_jso(this), value);
+  set selectorText(String value) => _blink.BlinkCSSStyleRule.instance.selectorText_Setter_(this, value);
   
   @DomName('CSSStyleRule.style')
   @DocsEditable()
-  CssStyleDeclaration get style => wrap_jso(_blink.BlinkCSSStyleRule.instance.style_Getter_(unwrap_jso(this)));
+  CssStyleDeclaration get style => _blink.BlinkCSSStyleRule.instance.style_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8882,11 +8935,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssStyleSheet internalCreateCssStyleSheet() {
-    return new CssStyleSheet._internalWrap();
-  }
-
-  external factory CssStyleSheet._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssStyleSheet.internal_() : super.internal_();
@@ -8894,39 +8943,39 @@
 
   @DomName('CSSStyleSheet.cssRules')
   @DocsEditable()
-  List<CssRule> get cssRules => wrap_jso(_blink.BlinkCSSStyleSheet.instance.cssRules_Getter_(unwrap_jso(this)));
+  List<CssRule> get cssRules => _blink.BlinkCSSStyleSheet.instance.cssRules_Getter_(this);
   
   @DomName('CSSStyleSheet.ownerRule')
   @DocsEditable()
-  CssRule get ownerRule => wrap_jso(_blink.BlinkCSSStyleSheet.instance.ownerRule_Getter_(unwrap_jso(this)));
+  CssRule get ownerRule => _blink.BlinkCSSStyleSheet.instance.ownerRule_Getter_(this);
   
   @DomName('CSSStyleSheet.rules')
   @DocsEditable()
   @Experimental() // non-standard
-  List<CssRule> get rules => wrap_jso(_blink.BlinkCSSStyleSheet.instance.rules_Getter_(unwrap_jso(this)));
+  List<CssRule> get rules => _blink.BlinkCSSStyleSheet.instance.rules_Getter_(this);
   
   int addRule(String selector, String style, [int index]) {
     if (index != null) {
-      return _blink.BlinkCSSStyleSheet.instance.addRule_Callback_3_(unwrap_jso(this), selector, style, index);
+      return _blink.BlinkCSSStyleSheet.instance.addRule_Callback_3_(this, selector, style, index);
     }
-    return _blink.BlinkCSSStyleSheet.instance.addRule_Callback_2_(unwrap_jso(this), selector, style);
+    return _blink.BlinkCSSStyleSheet.instance.addRule_Callback_2_(this, selector, style);
   }
 
   @DomName('CSSStyleSheet.deleteRule')
   @DocsEditable()
-  void deleteRule(int index) => _blink.BlinkCSSStyleSheet.instance.deleteRule_Callback_1_(unwrap_jso(this), index);
+  void deleteRule(int index) => _blink.BlinkCSSStyleSheet.instance.deleteRule_Callback_1_(this, index);
   
   int insertRule(String rule, [int index]) {
     if (index != null) {
-      return _blink.BlinkCSSStyleSheet.instance.insertRule_Callback_2_(unwrap_jso(this), rule, index);
+      return _blink.BlinkCSSStyleSheet.instance.insertRule_Callback_2_(this, rule, index);
     }
-    return _blink.BlinkCSSStyleSheet.instance.insertRule_Callback_1_(unwrap_jso(this), rule);
+    return _blink.BlinkCSSStyleSheet.instance.insertRule_Callback_1_(this, rule);
   }
 
   @DomName('CSSStyleSheet.removeRule')
   @DocsEditable()
   @Experimental() // non-standard
-  void removeRule(int index) => _blink.BlinkCSSStyleSheet.instance.removeRule_Callback_1_(unwrap_jso(this), index);
+  void removeRule(int index) => _blink.BlinkCSSStyleSheet.instance.removeRule_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8944,11 +8993,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssSupportsRule internalCreateCssSupportsRule() {
-    return new CssSupportsRule._internalWrap();
-  }
-
-  external factory CssSupportsRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssSupportsRule.internal_() : super.internal_();
@@ -8956,19 +9001,19 @@
 
   @DomName('CSSSupportsRule.conditionText')
   @DocsEditable()
-  String get conditionText => _blink.BlinkCSSSupportsRule.instance.conditionText_Getter_(unwrap_jso(this));
+  String get conditionText => _blink.BlinkCSSSupportsRule.instance.conditionText_Getter_(this);
   
   @DomName('CSSSupportsRule.cssRules')
   @DocsEditable()
-  List<CssRule> get cssRules => wrap_jso(_blink.BlinkCSSSupportsRule.instance.cssRules_Getter_(unwrap_jso(this)));
+  List<CssRule> get cssRules => _blink.BlinkCSSSupportsRule.instance.cssRules_Getter_(this);
   
   @DomName('CSSSupportsRule.deleteRule')
   @DocsEditable()
-  void deleteRule(int index) => _blink.BlinkCSSSupportsRule.instance.deleteRule_Callback_1_(unwrap_jso(this), index);
+  void deleteRule(int index) => _blink.BlinkCSSSupportsRule.instance.deleteRule_Callback_1_(this, index);
   
   @DomName('CSSSupportsRule.insertRule')
   @DocsEditable()
-  int insertRule(String rule, int index) => _blink.BlinkCSSSupportsRule.instance.insertRule_Callback_2_(unwrap_jso(this), rule, index);
+  int insertRule(String rule, int index) => _blink.BlinkCSSSupportsRule.instance.insertRule_Callback_2_(this, rule, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8987,11 +9032,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CssViewportRule internalCreateCssViewportRule() {
-    return new CssViewportRule._internalWrap();
-  }
-
-  external factory CssViewportRule._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CssViewportRule.internal_() : super.internal_();
@@ -9000,7 +9041,7 @@
   @DomName('CSSViewportRule.style')
   @DocsEditable()
   @Experimental() // untriaged
-  CssStyleDeclaration get style => wrap_jso(_blink.BlinkCSSViewportRule.instance.style_Getter_(unwrap_jso(this)));
+  CssStyleDeclaration get style => _blink.BlinkCSSViewportRule.instance.style_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9025,6 +9066,7 @@
     // first-chance exceptions. Can expand this list in the future as needed.
     if (detail is List || detail is Map || detail is String || detail is num) {
       try {
+        detail = convertDartToNative_SerializedScriptValue(detail);
         e._initCustomEvent(type, canBubble, cancelable, detail);
       } catch(_) {
         e._initCustomEvent(type, canBubble, cancelable, null);
@@ -9033,9 +9075,6 @@
       e._initCustomEvent(type, canBubble, cancelable, null);
     }
 
-    // Need for identity.
-    js.setDartHtmlWrapperFor(e.blink_jsObject, e);
-
     return e;
   }
 
@@ -9046,16 +9085,20 @@
     }
     return _detail;
   }
-  // To suppress missing implicit constructor warnings.
-  factory CustomEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CustomEvent.CustomEvent')
+  @DocsEditable()
+  factory CustomEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkCustomEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkCustomEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static CustomEvent internalCreateCustomEvent() {
-    return new CustomEvent._internalWrap();
-  }
-
-  external factory CustomEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CustomEvent.internal_() : super.internal_();
@@ -9063,11 +9106,11 @@
 
   @DomName('CustomEvent.detail')
   @DocsEditable()
-  Object get _detail => wrap_jso(_blink.BlinkCustomEvent.instance.detail_Getter_(unwrap_jso(this)));
+  Object get _detail => convertNativeToDart_SerializedScriptValue(_blink.BlinkCustomEvent.instance.detail_Getter_(this));
   
   @DomName('CustomEvent.initCustomEvent')
   @DocsEditable()
-  void _initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg) => _blink.BlinkCustomEvent.instance.initCustomEvent_Callback_4_(unwrap_jso(this), typeArg, canBubbleArg, cancelableArg, detailArg);
+  void _initCustomEvent(String type, bool bubbles, bool cancelable, Object detail) => _blink.BlinkCustomEvent.instance.initCustomEvent_Callback_4_(this, type, bubbles, cancelable, detail);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9089,11 +9132,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DListElement internalCreateDListElement() {
-    return new DListElement._internalWrap();
-  }
-
-  external factory DListElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DListElement.internal_() : super.internal_();
@@ -9129,11 +9168,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DataListElement internalCreateDataListElement() {
-    return new DataListElement._internalWrap();
-  }
-
-  external factory DataListElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DataListElement.internal_() : super.internal_();
@@ -9150,7 +9185,7 @@
 
   @DomName('HTMLDataListElement.options')
   @DocsEditable()
-  List<Node> get options => wrap_jso(_blink.BlinkHTMLDataListElement.instance.options_Getter_(unwrap_jso(this)));
+  List<Node> get options => (_blink.BlinkHTMLDataListElement.instance.options_Getter_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9167,79 +9202,71 @@
   // To suppress missing implicit constructor warnings.
   factory DataTransfer._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DataTransfer internalCreateDataTransfer() {
-    return new DataTransfer._internalWrap();
-  }
 
-  factory DataTransfer._internalWrap() {
-    return new DataTransfer.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DataTransfer.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DataTransfer.dropEffect')
   @DocsEditable()
   @Experimental() // untriaged
-  String get dropEffect => _blink.BlinkDataTransfer.instance.dropEffect_Getter_(unwrap_jso(this));
+  String get dropEffect => _blink.BlinkDataTransfer.instance.dropEffect_Getter_(this);
   
   @DomName('DataTransfer.dropEffect')
   @DocsEditable()
   @Experimental() // untriaged
-  set dropEffect(String value) => _blink.BlinkDataTransfer.instance.dropEffect_Setter_(unwrap_jso(this), value);
+  set dropEffect(String value) => _blink.BlinkDataTransfer.instance.dropEffect_Setter_(this, value);
   
   @DomName('DataTransfer.effectAllowed')
   @DocsEditable()
   @Experimental() // untriaged
-  String get effectAllowed => _blink.BlinkDataTransfer.instance.effectAllowed_Getter_(unwrap_jso(this));
+  String get effectAllowed => _blink.BlinkDataTransfer.instance.effectAllowed_Getter_(this);
   
   @DomName('DataTransfer.effectAllowed')
   @DocsEditable()
   @Experimental() // untriaged
-  set effectAllowed(String value) => _blink.BlinkDataTransfer.instance.effectAllowed_Setter_(unwrap_jso(this), value);
+  set effectAllowed(String value) => _blink.BlinkDataTransfer.instance.effectAllowed_Setter_(this, value);
   
   @DomName('DataTransfer.files')
   @DocsEditable()
   @Experimental() // untriaged
-  List<File> get files => wrap_jso(_blink.BlinkDataTransfer.instance.files_Getter_(unwrap_jso(this)));
+  List<File> get files => (_blink.BlinkDataTransfer.instance.files_Getter_(this));
   
   @DomName('DataTransfer.items')
   @DocsEditable()
   @Experimental() // untriaged
-  DataTransferItemList get items => wrap_jso(_blink.BlinkDataTransfer.instance.items_Getter_(unwrap_jso(this)));
+  DataTransferItemList get items => _blink.BlinkDataTransfer.instance.items_Getter_(this);
   
   @DomName('DataTransfer.types')
   @DocsEditable()
   @Experimental() // untriaged
-  List<String> get types => _blink.BlinkDataTransfer.instance.types_Getter_(unwrap_jso(this));
+  List<String> get types => _blink.BlinkDataTransfer.instance.types_Getter_(this);
   
-  void clearData([String type]) {
-    if (type != null) {
-      _blink.BlinkDataTransfer.instance.clearData_Callback_1_(unwrap_jso(this), type);
+  void clearData([String format]) {
+    if (format != null) {
+      _blink.BlinkDataTransfer.instance.clearData_Callback_1_(this, format);
       return;
     }
-    _blink.BlinkDataTransfer.instance.clearData_Callback_0_(unwrap_jso(this));
+    _blink.BlinkDataTransfer.instance.clearData_Callback_0_(this);
     return;
   }
 
   @DomName('DataTransfer.getData')
   @DocsEditable()
   @Experimental() // untriaged
-  String getData(String type) => _blink.BlinkDataTransfer.instance.getData_Callback_1_(unwrap_jso(this), type);
+  String getData(String format) => _blink.BlinkDataTransfer.instance.getData_Callback_1_(this, format);
   
   @DomName('DataTransfer.setData')
   @DocsEditable()
   @Experimental() // untriaged
-  void setData(String type, String data) => _blink.BlinkDataTransfer.instance.setData_Callback_2_(unwrap_jso(this), type, data);
+  void setData(String format, String data) => _blink.BlinkDataTransfer.instance.setData_Callback_2_(this, format, data);
   
   @DomName('DataTransfer.setDragImage')
   @DocsEditable()
   @Experimental() // untriaged
-  void setDragImage(Element image, int x, int y) => _blink.BlinkDataTransfer.instance.setDragImage_Callback_3_(unwrap_jso(this), unwrap_jso(image), x, y);
+  void setDragImage(Element image, int x, int y) => _blink.BlinkDataTransfer.instance.setDragImage_Callback_3_(this, image, x, y);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9257,36 +9284,28 @@
   // To suppress missing implicit constructor warnings.
   factory DataTransferItem._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DataTransferItem internalCreateDataTransferItem() {
-    return new DataTransferItem._internalWrap();
-  }
 
-  factory DataTransferItem._internalWrap() {
-    return new DataTransferItem.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DataTransferItem.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DataTransferItem.kind')
   @DocsEditable()
-  String get kind => _blink.BlinkDataTransferItem.instance.kind_Getter_(unwrap_jso(this));
+  String get kind => _blink.BlinkDataTransferItem.instance.kind_Getter_(this);
   
   @DomName('DataTransferItem.type')
   @DocsEditable()
-  String get type => _blink.BlinkDataTransferItem.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkDataTransferItem.instance.type_Getter_(this);
   
   @DomName('DataTransferItem.getAsFile')
   @DocsEditable()
-  Blob getAsFile() => wrap_jso(_blink.BlinkDataTransferItem.instance.getAsFile_Callback_0_(unwrap_jso(this)));
+  Blob getAsFile() => _blink.BlinkDataTransferItem.instance.getAsFile_Callback_0_(this);
   
   @DomName('DataTransferItem.getAsString')
   @DocsEditable()
-  void _getAsString(_StringCallback callback) => _blink.BlinkDataTransferItem.instance.getAsString_Callback_1_(unwrap_jso(this), unwrap_jso((data) => callback(data)));
+  void _getAsString(_StringCallback callback) => _blink.BlinkDataTransferItem.instance.getAsString_Callback_1_(this, callback);
   
   Future<String> getAsString() {
     var completer = new Completer<String>();
@@ -9300,7 +9319,7 @@
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
-  Entry getAsEntry() => wrap_jso(_blink.BlinkDataTransferItem.instance.webkitGetAsEntry_Callback_0_(unwrap_jso(this)));
+  Entry getAsEntry() => _blink.BlinkDataTransferItem.instance.webkitGetAsEntry_Callback_0_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -9316,63 +9335,54 @@
   // To suppress missing implicit constructor warnings.
   factory DataTransferItemList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DataTransferItemList internalCreateDataTransferItemList() {
-    return new DataTransferItemList._internalWrap();
-  }
 
-  factory DataTransferItemList._internalWrap() {
-    return new DataTransferItemList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DataTransferItemList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DataTransferItemList.length')
   @DocsEditable()
-  int get length => _blink.BlinkDataTransferItemList.instance.length_Getter_(unwrap_jso(this));
-  
-  @DomName('DataTransferItemList.__getter__')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DataTransferItem __getter__(int index) => wrap_jso(_blink.BlinkDataTransferItemList.instance.$__getter___Callback_1_(unwrap_jso(this), index));
+  int get length => _blink.BlinkDataTransferItemList.instance.length_Getter_(this);
   
   DataTransferItem add(data_OR_file, [String type]) {
     if ((type is String) && (data_OR_file is String)) {
-      return wrap_jso(_blink.BlinkDataTransferItemList.instance.add_Callback_2_(unwrap_jso(this), unwrap_jso(data_OR_file), type));
+      return _blink.BlinkDataTransferItemList.instance.add_Callback_2_(this, data_OR_file, type);
     }
     if ((data_OR_file is File || data_OR_file == null) && type == null) {
-      return wrap_jso(_blink.BlinkDataTransferItemList.instance.add_Callback_1_(unwrap_jso(this), unwrap_jso(data_OR_file)));
+      return _blink.BlinkDataTransferItemList.instance.add_Callback_1_(this, data_OR_file);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   @DomName('DataTransferItemList.addData')
   @DocsEditable()
-  DataTransferItem addData(String data, String type) => wrap_jso(_blink.BlinkDataTransferItemList.instance.add_Callback_2_(unwrap_jso(this), data, type));
+  DataTransferItem addData(String data, String type) => _blink.BlinkDataTransferItemList.instance.add_Callback_2_(this, data, type);
   
   @DomName('DataTransferItemList.addFile')
   @DocsEditable()
-  DataTransferItem addFile(File file) => wrap_jso(_blink.BlinkDataTransferItemList.instance.add_Callback_1_(unwrap_jso(this), unwrap_jso(file)));
+  DataTransferItem addFile(File file) => _blink.BlinkDataTransferItemList.instance.add_Callback_1_(this, file);
   
   @DomName('DataTransferItemList.clear')
   @DocsEditable()
-  void clear() => _blink.BlinkDataTransferItemList.instance.clear_Callback_0_(unwrap_jso(this));
+  void clear() => _blink.BlinkDataTransferItemList.instance.clear_Callback_0_(this);
+  
+  @DomName('DataTransferItemList.item')
+  @DocsEditable()
+  DataTransferItem item(int index) => _blink.BlinkDataTransferItemList.instance.item_Callback_1_(this, index);
   
   @DomName('DataTransferItemList.remove')
   @DocsEditable()
   @Experimental() // untriaged
-  void remove(int index) => _blink.BlinkDataTransferItemList.instance.remove_Callback_1_(unwrap_jso(this), index);
+  void remove(int index) => _blink.BlinkDataTransferItemList.instance.remove_Callback_1_(this, index);
   
 
   DataTransferItem operator[] (int index) {
     // TODO(alanknight): I think that all the __getter__ generators should just
     // do property access, but that's major surgery. This one is a problem, so
     // just hard-code it for now.
-    return _blink.Blink_JsNative_DomException.getProperty(unwrap_jso(this), index);
+    return _blink.Blink_JsNative_DomException.getProperty(this, index);
   }
 
 }
@@ -9414,21 +9424,21 @@
 
 
   @Deprecated("Internal Use Only")
-  static DedicatedWorkerGlobalScope internalCreateDedicatedWorkerGlobalScope() {
-    return new DedicatedWorkerGlobalScope._internalWrap();
-  }
-
-  external factory DedicatedWorkerGlobalScope._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DedicatedWorkerGlobalScope.internal_() : super.internal_();
 
 
-  @DomName('DedicatedWorkerGlobalScope.postMessage')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void postMessage(Object message, [List<MessagePort> transfer]) => _blink.BlinkDedicatedWorkerGlobalScope.instance.postMessage_Callback_2_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(message), transfer);
-  
+  void postMessage(Object message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      _blink.BlinkDedicatedWorkerGlobalScope.instance.postMessage_Callback_2_(this, convertDartToNative_SerializedScriptValue(message), transfer);
+      return;
+    }
+    _blink.BlinkDedicatedWorkerGlobalScope.instance.postMessage_Callback_1_(this, convertDartToNative_SerializedScriptValue(message));
+    return;
+  }
+
   /// Stream of `message` events handled by this [DedicatedWorkerGlobalScope].
   @DomName('DedicatedWorkerGlobalScope.onmessage')
   @DocsEditable()
@@ -9444,27 +9454,57 @@
 
 
 @DocsEditable()
+@DomName('DefaultSessionStartEvent')
+@Experimental() // untriaged
+class DefaultSessionStartEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory DefaultSessionStartEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('DefaultSessionStartEvent.DefaultSessionStartEvent')
+  @DocsEditable()
+  factory DefaultSessionStartEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkDefaultSessionStartEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkDefaultSessionStartEvent.instance.constructorCallback_1_(type);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  DefaultSessionStartEvent.internal_() : super.internal_();
+
+
+  @DomName('DefaultSessionStartEvent.session')
+  @DocsEditable()
+  @Experimental() // untriaged
+  PresentationSession get session => _blink.BlinkDefaultSessionStartEvent.instance.session_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('DeprecatedStorageInfo')
 @Experimental() // untriaged
 class DeprecatedStorageInfo extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DeprecatedStorageInfo._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DeprecatedStorageInfo internalCreateDeprecatedStorageInfo() {
-    return new DeprecatedStorageInfo._internalWrap();
-  }
 
-  factory DeprecatedStorageInfo._internalWrap() {
-    return new DeprecatedStorageInfo.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DeprecatedStorageInfo.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DeprecatedStorageInfo.PERSISTENT')
   @DocsEditable()
   @Experimental() // untriaged
@@ -9477,27 +9517,27 @@
 
   void queryUsageAndQuota(int storageType, [StorageUsageCallback usageCallback, StorageErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkDeprecatedStorageInfo.instance.queryUsageAndQuota_Callback_3_(unwrap_jso(this), storageType, unwrap_jso((currentUsageInBytes, currentQuotaInBytes) => usageCallback(currentUsageInBytes, currentQuotaInBytes)), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDeprecatedStorageInfo.instance.queryUsageAndQuota_Callback_3_(this, storageType, usageCallback, errorCallback);
       return;
     }
     if (usageCallback != null) {
-      _blink.BlinkDeprecatedStorageInfo.instance.queryUsageAndQuota_Callback_2_(unwrap_jso(this), storageType, unwrap_jso((currentUsageInBytes, currentQuotaInBytes) => usageCallback(currentUsageInBytes, currentQuotaInBytes)));
+      _blink.BlinkDeprecatedStorageInfo.instance.queryUsageAndQuota_Callback_2_(this, storageType, usageCallback);
       return;
     }
-    _blink.BlinkDeprecatedStorageInfo.instance.queryUsageAndQuota_Callback_1_(unwrap_jso(this), storageType);
+    _blink.BlinkDeprecatedStorageInfo.instance.queryUsageAndQuota_Callback_1_(this, storageType);
     return;
   }
 
   void requestQuota(int storageType, int newQuotaInBytes, [StorageQuotaCallback quotaCallback, StorageErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkDeprecatedStorageInfo.instance.requestQuota_Callback_4_(unwrap_jso(this), storageType, newQuotaInBytes, unwrap_jso((grantedQuotaInBytes) => quotaCallback(grantedQuotaInBytes)), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDeprecatedStorageInfo.instance.requestQuota_Callback_4_(this, storageType, newQuotaInBytes, quotaCallback, errorCallback);
       return;
     }
     if (quotaCallback != null) {
-      _blink.BlinkDeprecatedStorageInfo.instance.requestQuota_Callback_3_(unwrap_jso(this), storageType, newQuotaInBytes, unwrap_jso((grantedQuotaInBytes) => quotaCallback(grantedQuotaInBytes)));
+      _blink.BlinkDeprecatedStorageInfo.instance.requestQuota_Callback_3_(this, storageType, newQuotaInBytes, quotaCallback);
       return;
     }
-    _blink.BlinkDeprecatedStorageInfo.instance.requestQuota_Callback_2_(unwrap_jso(this), storageType, newQuotaInBytes);
+    _blink.BlinkDeprecatedStorageInfo.instance.requestQuota_Callback_2_(this, storageType, newQuotaInBytes);
     return;
   }
 
@@ -9516,40 +9556,32 @@
   // To suppress missing implicit constructor warnings.
   factory DeprecatedStorageQuota._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DeprecatedStorageQuota internalCreateDeprecatedStorageQuota() {
-    return new DeprecatedStorageQuota._internalWrap();
-  }
 
-  factory DeprecatedStorageQuota._internalWrap() {
-    return new DeprecatedStorageQuota.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DeprecatedStorageQuota.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   void queryUsageAndQuota(StorageUsageCallback usageCallback, [StorageErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkDeprecatedStorageQuota.instance.queryUsageAndQuota_Callback_2_(unwrap_jso(this), unwrap_jso((currentUsageInBytes, currentQuotaInBytes) => usageCallback(currentUsageInBytes, currentQuotaInBytes)), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDeprecatedStorageQuota.instance.queryUsageAndQuota_Callback_2_(this, usageCallback, errorCallback);
       return;
     }
-    _blink.BlinkDeprecatedStorageQuota.instance.queryUsageAndQuota_Callback_1_(unwrap_jso(this), unwrap_jso((currentUsageInBytes, currentQuotaInBytes) => usageCallback(currentUsageInBytes, currentQuotaInBytes)));
+    _blink.BlinkDeprecatedStorageQuota.instance.queryUsageAndQuota_Callback_1_(this, usageCallback);
     return;
   }
 
   void requestQuota(int newQuotaInBytes, [StorageQuotaCallback quotaCallback, StorageErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkDeprecatedStorageQuota.instance.requestQuota_Callback_3_(unwrap_jso(this), newQuotaInBytes, unwrap_jso((grantedQuotaInBytes) => quotaCallback(grantedQuotaInBytes)), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDeprecatedStorageQuota.instance.requestQuota_Callback_3_(this, newQuotaInBytes, quotaCallback, errorCallback);
       return;
     }
     if (quotaCallback != null) {
-      _blink.BlinkDeprecatedStorageQuota.instance.requestQuota_Callback_2_(unwrap_jso(this), newQuotaInBytes, unwrap_jso((grantedQuotaInBytes) => quotaCallback(grantedQuotaInBytes)));
+      _blink.BlinkDeprecatedStorageQuota.instance.requestQuota_Callback_2_(this, newQuotaInBytes, quotaCallback);
       return;
     }
-    _blink.BlinkDeprecatedStorageQuota.instance.requestQuota_Callback_1_(unwrap_jso(this), newQuotaInBytes);
+    _blink.BlinkDeprecatedStorageQuota.instance.requestQuota_Callback_1_(this, newQuotaInBytes);
     return;
   }
 
@@ -9576,11 +9608,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DetailsElement internalCreateDetailsElement() {
-    return new DetailsElement._internalWrap();
-  }
-
-  external factory DetailsElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DetailsElement.internal_() : super.internal_();
@@ -9597,11 +9625,11 @@
 
   @DomName('HTMLDetailsElement.open')
   @DocsEditable()
-  bool get open => _blink.BlinkHTMLDetailsElement.instance.open_Getter_(unwrap_jso(this));
+  bool get open => _blink.BlinkHTMLDetailsElement.instance.open_Getter_(this);
   
   @DomName('HTMLDetailsElement.open')
   @DocsEditable()
-  set open(bool value) => _blink.BlinkHTMLDetailsElement.instance.open_Setter_(unwrap_jso(this), value);
+  set open(bool value) => _blink.BlinkHTMLDetailsElement.instance.open_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9619,32 +9647,24 @@
   // To suppress missing implicit constructor warnings.
   factory DeviceAcceleration._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DeviceAcceleration internalCreateDeviceAcceleration() {
-    return new DeviceAcceleration._internalWrap();
-  }
 
-  factory DeviceAcceleration._internalWrap() {
-    return new DeviceAcceleration.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DeviceAcceleration.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DeviceAcceleration.x')
   @DocsEditable()
-  num get x => _blink.BlinkDeviceAcceleration.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkDeviceAcceleration.instance.x_Getter_(this);
   
   @DomName('DeviceAcceleration.y')
   @DocsEditable()
-  num get y => _blink.BlinkDeviceAcceleration.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkDeviceAcceleration.instance.y_Getter_(this);
   
   @DomName('DeviceAcceleration.z')
   @DocsEditable()
-  num get z => _blink.BlinkDeviceAcceleration.instance.z_Getter_(unwrap_jso(this));
+  num get z => _blink.BlinkDeviceAcceleration.instance.z_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9661,13 +9681,19 @@
   // To suppress missing implicit constructor warnings.
   factory DeviceLightEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static DeviceLightEvent internalCreateDeviceLightEvent() {
-    return new DeviceLightEvent._internalWrap();
+  @DomName('DeviceLightEvent.DeviceLightEvent')
+  @DocsEditable()
+  factory DeviceLightEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkDeviceLightEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkDeviceLightEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory DeviceLightEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DeviceLightEvent.internal_() : super.internal_();
@@ -9676,7 +9702,7 @@
   @DomName('DeviceLightEvent.value')
   @DocsEditable()
   @Experimental() // untriaged
-  num get value => _blink.BlinkDeviceLightEvent.instance.value_Getter_(unwrap_jso(this));
+  num get value => _blink.BlinkDeviceLightEvent.instance.value_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9696,11 +9722,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DeviceMotionEvent internalCreateDeviceMotionEvent() {
-    return new DeviceMotionEvent._internalWrap();
-  }
-
-  external factory DeviceMotionEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DeviceMotionEvent.internal_() : super.internal_();
@@ -9708,24 +9730,24 @@
 
   @DomName('DeviceMotionEvent.acceleration')
   @DocsEditable()
-  DeviceAcceleration get acceleration => wrap_jso(_blink.BlinkDeviceMotionEvent.instance.acceleration_Getter_(unwrap_jso(this)));
+  DeviceAcceleration get acceleration => _blink.BlinkDeviceMotionEvent.instance.acceleration_Getter_(this);
   
   @DomName('DeviceMotionEvent.accelerationIncludingGravity')
   @DocsEditable()
-  DeviceAcceleration get accelerationIncludingGravity => wrap_jso(_blink.BlinkDeviceMotionEvent.instance.accelerationIncludingGravity_Getter_(unwrap_jso(this)));
+  DeviceAcceleration get accelerationIncludingGravity => _blink.BlinkDeviceMotionEvent.instance.accelerationIncludingGravity_Getter_(this);
   
   @DomName('DeviceMotionEvent.interval')
   @DocsEditable()
-  num get interval => _blink.BlinkDeviceMotionEvent.instance.interval_Getter_(unwrap_jso(this));
+  num get interval => _blink.BlinkDeviceMotionEvent.instance.interval_Getter_(this);
   
   @DomName('DeviceMotionEvent.rotationRate')
   @DocsEditable()
-  DeviceRotationRate get rotationRate => wrap_jso(_blink.BlinkDeviceMotionEvent.instance.rotationRate_Getter_(unwrap_jso(this)));
+  DeviceRotationRate get rotationRate => _blink.BlinkDeviceMotionEvent.instance.rotationRate_Getter_(this);
   
   @DomName('DeviceMotionEvent.initDeviceMotionEvent')
   @DocsEditable()
   @Experimental() // untriaged
-  void initDeviceMotionEvent(String type, bool bubbles, bool cancelable, DeviceAcceleration acceleration, DeviceAcceleration accelerationIncludingGravity, DeviceRotationRate rotationRate, num interval) => _blink.BlinkDeviceMotionEvent.instance.initDeviceMotionEvent_Callback_7_(unwrap_jso(this), type, bubbles, cancelable, unwrap_jso(acceleration), unwrap_jso(accelerationIncludingGravity), unwrap_jso(rotationRate), interval);
+  void initDeviceMotionEvent(String type, bool bubbles, bool cancelable, DeviceAcceleration acceleration, DeviceAcceleration accelerationIncludingGravity, DeviceRotationRate rotationRate, num interval) => _blink.BlinkDeviceMotionEvent.instance.initDeviceMotionEvent_Callback_7_(this, type, bubbles, cancelable, acceleration, accelerationIncludingGravity, rotationRate, interval);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -9751,11 +9773,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DeviceOrientationEvent internalCreateDeviceOrientationEvent() {
-    return new DeviceOrientationEvent._internalWrap();
-  }
-
-  external factory DeviceOrientationEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DeviceOrientationEvent.internal_() : super.internal_();
@@ -9763,23 +9781,23 @@
 
   @DomName('DeviceOrientationEvent.absolute')
   @DocsEditable()
-  bool get absolute => _blink.BlinkDeviceOrientationEvent.instance.absolute_Getter_(unwrap_jso(this));
+  bool get absolute => _blink.BlinkDeviceOrientationEvent.instance.absolute_Getter_(this);
   
   @DomName('DeviceOrientationEvent.alpha')
   @DocsEditable()
-  num get alpha => _blink.BlinkDeviceOrientationEvent.instance.alpha_Getter_(unwrap_jso(this));
+  num get alpha => _blink.BlinkDeviceOrientationEvent.instance.alpha_Getter_(this);
   
   @DomName('DeviceOrientationEvent.beta')
   @DocsEditable()
-  num get beta => _blink.BlinkDeviceOrientationEvent.instance.beta_Getter_(unwrap_jso(this));
+  num get beta => _blink.BlinkDeviceOrientationEvent.instance.beta_Getter_(this);
   
   @DomName('DeviceOrientationEvent.gamma')
   @DocsEditable()
-  num get gamma => _blink.BlinkDeviceOrientationEvent.instance.gamma_Getter_(unwrap_jso(this));
+  num get gamma => _blink.BlinkDeviceOrientationEvent.instance.gamma_Getter_(this);
   
   @DomName('DeviceOrientationEvent.initDeviceOrientationEvent')
   @DocsEditable()
-  void _initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) => _blink.BlinkDeviceOrientationEvent.instance.initDeviceOrientationEvent_Callback_7_(unwrap_jso(this), type, bubbles, cancelable, alpha, beta, gamma, absolute);
+  void _initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) => _blink.BlinkDeviceOrientationEvent.instance.initDeviceOrientationEvent_Callback_7_(this, type, bubbles, cancelable, alpha, beta, gamma, absolute);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9797,32 +9815,24 @@
   // To suppress missing implicit constructor warnings.
   factory DeviceRotationRate._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DeviceRotationRate internalCreateDeviceRotationRate() {
-    return new DeviceRotationRate._internalWrap();
-  }
 
-  factory DeviceRotationRate._internalWrap() {
-    return new DeviceRotationRate.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DeviceRotationRate.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DeviceRotationRate.alpha')
   @DocsEditable()
-  num get alpha => _blink.BlinkDeviceRotationRate.instance.alpha_Getter_(unwrap_jso(this));
+  num get alpha => _blink.BlinkDeviceRotationRate.instance.alpha_Getter_(this);
   
   @DomName('DeviceRotationRate.beta')
   @DocsEditable()
-  num get beta => _blink.BlinkDeviceRotationRate.instance.beta_Getter_(unwrap_jso(this));
+  num get beta => _blink.BlinkDeviceRotationRate.instance.beta_Getter_(this);
   
   @DomName('DeviceRotationRate.gamma')
   @DocsEditable()
-  num get gamma => _blink.BlinkDeviceRotationRate.instance.gamma_Getter_(unwrap_jso(this));
+  num get gamma => _blink.BlinkDeviceRotationRate.instance.gamma_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9841,11 +9851,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DialogElement internalCreateDialogElement() {
-    return new DialogElement._internalWrap();
-  }
-
-  external factory DialogElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DialogElement.internal_() : super.internal_();
@@ -9859,33 +9865,33 @@
 
   @DomName('HTMLDialogElement.open')
   @DocsEditable()
-  bool get open => _blink.BlinkHTMLDialogElement.instance.open_Getter_(unwrap_jso(this));
+  bool get open => _blink.BlinkHTMLDialogElement.instance.open_Getter_(this);
   
   @DomName('HTMLDialogElement.open')
   @DocsEditable()
-  set open(bool value) => _blink.BlinkHTMLDialogElement.instance.open_Setter_(unwrap_jso(this), value);
+  set open(bool value) => _blink.BlinkHTMLDialogElement.instance.open_Setter_(this, value);
   
   @DomName('HTMLDialogElement.returnValue')
   @DocsEditable()
   @Experimental() // untriaged
-  String get returnValue => _blink.BlinkHTMLDialogElement.instance.returnValue_Getter_(unwrap_jso(this));
+  String get returnValue => _blink.BlinkHTMLDialogElement.instance.returnValue_Getter_(this);
   
   @DomName('HTMLDialogElement.returnValue')
   @DocsEditable()
   @Experimental() // untriaged
-  set returnValue(String value) => _blink.BlinkHTMLDialogElement.instance.returnValue_Setter_(unwrap_jso(this), value);
+  set returnValue(String value) => _blink.BlinkHTMLDialogElement.instance.returnValue_Setter_(this, value);
   
   @DomName('HTMLDialogElement.close')
   @DocsEditable()
-  void close(String returnValue) => _blink.BlinkHTMLDialogElement.instance.close_Callback_1_(unwrap_jso(this), returnValue);
+  void close(String returnValue) => _blink.BlinkHTMLDialogElement.instance.close_Callback_1_(this, returnValue);
   
   @DomName('HTMLDialogElement.show')
   @DocsEditable()
-  void show() => _blink.BlinkHTMLDialogElement.instance.show_Callback_0_(unwrap_jso(this));
+  void show() => _blink.BlinkHTMLDialogElement.instance.show_Callback_0_(this);
   
   @DomName('HTMLDialogElement.showModal')
   @DocsEditable()
-  void showModal() => _blink.BlinkHTMLDialogElement.instance.showModal_Callback_0_(unwrap_jso(this));
+  void showModal() => _blink.BlinkHTMLDialogElement.instance.showModal_Callback_0_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -9939,11 +9945,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DirectoryEntry internalCreateDirectoryEntry() {
-    return new DirectoryEntry._internalWrap();
-  }
-
-  external factory DirectoryEntry._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DirectoryEntry.internal_() : super.internal_();
@@ -9951,22 +9953,22 @@
 
   @DomName('DirectoryEntry.createReader')
   @DocsEditable()
-  DirectoryReader createReader() => wrap_jso(_blink.BlinkDirectoryEntry.instance.createReader_Callback_0_(unwrap_jso(this)));
+  DirectoryReader createReader() => _blink.BlinkDirectoryEntry.instance.createReader_Callback_0_(this);
   
   void __getDirectory(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
     if (errorCallback != null) {
-      _blink.BlinkDirectoryEntry.instance.getDirectory_Callback_4_(unwrap_jso(this), path, convertDartToNative_Dictionary(options), unwrap_jso((entry) => successCallback(wrap_jso(entry))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDirectoryEntry.instance.getDirectory_Callback_4_(this, path, convertDartToNative_Dictionary(options), successCallback, errorCallback);
       return;
     }
     if (successCallback != null) {
-      _blink.BlinkDirectoryEntry.instance.getDirectory_Callback_3_(unwrap_jso(this), path, convertDartToNative_Dictionary(options), unwrap_jso((entry) => successCallback(wrap_jso(entry))));
+      _blink.BlinkDirectoryEntry.instance.getDirectory_Callback_3_(this, path, convertDartToNative_Dictionary(options), successCallback);
       return;
     }
     if (options != null) {
-      _blink.BlinkDirectoryEntry.instance.getDirectory_Callback_2_(unwrap_jso(this), path, convertDartToNative_Dictionary(options));
+      _blink.BlinkDirectoryEntry.instance.getDirectory_Callback_2_(this, path, convertDartToNative_Dictionary(options));
       return;
     }
-    _blink.BlinkDirectoryEntry.instance.getDirectory_Callback_1_(unwrap_jso(this), path);
+    _blink.BlinkDirectoryEntry.instance.getDirectory_Callback_1_(this, path);
     return;
   }
 
@@ -9980,18 +9982,18 @@
 
   void __getFile(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
     if (errorCallback != null) {
-      _blink.BlinkDirectoryEntry.instance.getFile_Callback_4_(unwrap_jso(this), path, convertDartToNative_Dictionary(options), unwrap_jso((entry) => successCallback(wrap_jso(entry))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDirectoryEntry.instance.getFile_Callback_4_(this, path, convertDartToNative_Dictionary(options), successCallback, errorCallback);
       return;
     }
     if (successCallback != null) {
-      _blink.BlinkDirectoryEntry.instance.getFile_Callback_3_(unwrap_jso(this), path, convertDartToNative_Dictionary(options), unwrap_jso((entry) => successCallback(wrap_jso(entry))));
+      _blink.BlinkDirectoryEntry.instance.getFile_Callback_3_(this, path, convertDartToNative_Dictionary(options), successCallback);
       return;
     }
     if (options != null) {
-      _blink.BlinkDirectoryEntry.instance.getFile_Callback_2_(unwrap_jso(this), path, convertDartToNative_Dictionary(options));
+      _blink.BlinkDirectoryEntry.instance.getFile_Callback_2_(this, path, convertDartToNative_Dictionary(options));
       return;
     }
-    _blink.BlinkDirectoryEntry.instance.getFile_Callback_1_(unwrap_jso(this), path);
+    _blink.BlinkDirectoryEntry.instance.getFile_Callback_1_(this, path);
     return;
   }
 
@@ -10005,10 +10007,10 @@
 
   void _removeRecursively(VoidCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkDirectoryEntry.instance.removeRecursively_Callback_2_(unwrap_jso(this), unwrap_jso(() => successCallback()), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDirectoryEntry.instance.removeRecursively_Callback_2_(this, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkDirectoryEntry.instance.removeRecursively_Callback_1_(unwrap_jso(this), unwrap_jso(() => successCallback()));
+    _blink.BlinkDirectoryEntry.instance.removeRecursively_Callback_1_(this, successCallback);
     return;
   }
 
@@ -10036,27 +10038,19 @@
   // To suppress missing implicit constructor warnings.
   factory DirectoryReader._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DirectoryReader internalCreateDirectoryReader() {
-    return new DirectoryReader._internalWrap();
-  }
 
-  factory DirectoryReader._internalWrap() {
-    return new DirectoryReader.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DirectoryReader.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   void _readEntries(_EntriesCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkDirectoryReader.instance.readEntries_Callback_2_(unwrap_jso(this), unwrap_jso((entries) => successCallback(wrap_jso(entries))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDirectoryReader.instance.readEntries_Callback_2_(this, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkDirectoryReader.instance.readEntries_Callback_1_(unwrap_jso(this), unwrap_jso((entries) => successCallback(wrap_jso(entries))));
+    _blink.BlinkDirectoryReader.instance.readEntries_Callback_1_(this, successCallback);
     return;
   }
 
@@ -10110,11 +10104,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DivElement internalCreateDivElement() {
-    return new DivElement._internalWrap();
-  }
-
-  external factory DivElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DivElement.internal_() : super.internal_();
@@ -10193,11 +10183,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Document internalCreateDocument() {
-    return new Document._internalWrap();
-  }
-
-  external factory Document._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Document.internal_() : super.internal_();
@@ -10206,129 +10192,139 @@
   @DomName('Document.activeElement')
   @DocsEditable()
   @Experimental() // untriaged
-  Element get activeElement => wrap_jso(_blink.BlinkDocument.instance.activeElement_Getter_(unwrap_jso(this)));
+  Element get activeElement => _blink.BlinkDocument.instance.activeElement_Getter_(this);
   
   @DomName('Document.body')
   @DocsEditable()
-  HtmlElement get _body => wrap_jso(_blink.BlinkDocument.instance.body_Getter_(unwrap_jso(this)));
+  HtmlElement get _body => _blink.BlinkDocument.instance.body_Getter_(this);
   
   @DomName('Document.body')
   @DocsEditable()
-  set _body(HtmlElement value) => _blink.BlinkDocument.instance.body_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set _body(HtmlElement value) => _blink.BlinkDocument.instance.body_Setter_(this, value);
   
   @DomName('Document.contentType')
   @DocsEditable()
   @Experimental() // untriaged
-  String get contentType => _blink.BlinkDocument.instance.contentType_Getter_(unwrap_jso(this));
+  String get contentType => _blink.BlinkDocument.instance.contentType_Getter_(this);
   
   @DomName('Document.cookie')
   @DocsEditable()
-  String get cookie => _blink.BlinkDocument.instance.cookie_Getter_(unwrap_jso(this));
+  String get cookie => _blink.BlinkDocument.instance.cookie_Getter_(this);
   
   @DomName('Document.cookie')
   @DocsEditable()
-  set cookie(String value) => _blink.BlinkDocument.instance.cookie_Setter_(unwrap_jso(this), value);
+  set cookie(String value) => _blink.BlinkDocument.instance.cookie_Setter_(this, value);
   
   @DomName('Document.currentScript')
   @DocsEditable()
   @Experimental() // untriaged
-  ScriptElement get currentScript => wrap_jso(_blink.BlinkDocument.instance.currentScript_Getter_(unwrap_jso(this)));
+  ScriptElement get currentScript => _blink.BlinkDocument.instance.currentScript_Getter_(this);
   
   @DomName('Document.defaultView')
   @DocsEditable()
-  WindowBase get window => wrap_jso(_blink.BlinkDocument.instance.defaultView_Getter_(unwrap_jso(this)));
+  WindowBase get window => _convertNativeToDart_Window(_blink.BlinkDocument.instance.defaultView_Getter_(this));
   
   @DomName('Document.documentElement')
   @DocsEditable()
-  Element get documentElement => wrap_jso(_blink.BlinkDocument.instance.documentElement_Getter_(unwrap_jso(this)));
+  Element get documentElement => _blink.BlinkDocument.instance.documentElement_Getter_(this);
   
   @DomName('Document.domain')
   @DocsEditable()
-  String get domain => _blink.BlinkDocument.instance.domain_Getter_(unwrap_jso(this));
+  String get domain => _blink.BlinkDocument.instance.domain_Getter_(this);
   
   @DomName('Document.fonts')
   @DocsEditable()
   @Experimental() // untriaged
-  FontFaceSet get fonts => wrap_jso(_blink.BlinkDocument.instance.fonts_Getter_(unwrap_jso(this)));
+  FontFaceSet get fonts => _blink.BlinkDocument.instance.fonts_Getter_(this);
   
   @DomName('Document.fullscreenElement')
   @DocsEditable()
   @Experimental() // untriaged
-  Element get fullscreenElement => wrap_jso(_blink.BlinkDocument.instance.fullscreenElement_Getter_(unwrap_jso(this)));
+  Element get fullscreenElement => _blink.BlinkDocument.instance.fullscreenElement_Getter_(this);
   
   @DomName('Document.fullscreenEnabled')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get fullscreenEnabled => _blink.BlinkDocument.instance.fullscreenEnabled_Getter_(unwrap_jso(this));
+  bool get fullscreenEnabled => _blink.BlinkDocument.instance.fullscreenEnabled_Getter_(this);
   
   @DomName('Document.head')
   @DocsEditable()
-  HeadElement get _head => wrap_jso(_blink.BlinkDocument.instance.head_Getter_(unwrap_jso(this)));
+  HeadElement get _head => _blink.BlinkDocument.instance.head_Getter_(this);
   
   @DomName('Document.hidden')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get hidden => _blink.BlinkDocument.instance.hidden_Getter_(unwrap_jso(this));
+  bool get hidden => _blink.BlinkDocument.instance.hidden_Getter_(this);
   
   @DomName('Document.implementation')
   @DocsEditable()
-  DomImplementation get implementation => wrap_jso(_blink.BlinkDocument.instance.implementation_Getter_(unwrap_jso(this)));
+  DomImplementation get implementation => _blink.BlinkDocument.instance.implementation_Getter_(this);
   
   @DomName('Document.lastModified')
   @DocsEditable()
-  String get _lastModified => _blink.BlinkDocument.instance.lastModified_Getter_(unwrap_jso(this));
+  String get _lastModified => _blink.BlinkDocument.instance.lastModified_Getter_(this);
+  
+  @DomName('Document.origin')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get origin => _blink.BlinkDocument.instance.origin_Getter_(this);
   
   @DomName('Document.pointerLockElement')
   @DocsEditable()
   @Experimental() // untriaged
-  Element get pointerLockElement => wrap_jso(_blink.BlinkDocument.instance.pointerLockElement_Getter_(unwrap_jso(this)));
+  Element get pointerLockElement => _blink.BlinkDocument.instance.pointerLockElement_Getter_(this);
   
   @DomName('Document.preferredStylesheetSet')
   @DocsEditable()
-  String get _preferredStylesheetSet => _blink.BlinkDocument.instance.preferredStylesheetSet_Getter_(unwrap_jso(this));
+  String get _preferredStylesheetSet => _blink.BlinkDocument.instance.preferredStylesheetSet_Getter_(this);
   
   @DomName('Document.readyState')
   @DocsEditable()
-  String get readyState => _blink.BlinkDocument.instance.readyState_Getter_(unwrap_jso(this));
+  String get readyState => _blink.BlinkDocument.instance.readyState_Getter_(this);
   
   @DomName('Document.referrer')
   @DocsEditable()
-  String get _referrer => _blink.BlinkDocument.instance.referrer_Getter_(unwrap_jso(this));
+  String get _referrer => _blink.BlinkDocument.instance.referrer_Getter_(this);
   
   @DomName('Document.rootElement')
   @DocsEditable()
   @Experimental() // untriaged
-  SvgSvgElement get rootElement => wrap_jso(_blink.BlinkDocument.instance.rootElement_Getter_(unwrap_jso(this)));
+  SvgSvgElement get rootElement => _blink.BlinkDocument.instance.rootElement_Getter_(this);
+  
+  @DomName('Document.scrollingElement')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Element get scrollingElement => _blink.BlinkDocument.instance.scrollingElement_Getter_(this);
   
   @DomName('Document.selectedStylesheetSet')
   @DocsEditable()
-  String get _selectedStylesheetSet => _blink.BlinkDocument.instance.selectedStylesheetSet_Getter_(unwrap_jso(this));
+  String get _selectedStylesheetSet => _blink.BlinkDocument.instance.selectedStylesheetSet_Getter_(this);
   
   @DomName('Document.selectedStylesheetSet')
   @DocsEditable()
-  set _selectedStylesheetSet(String value) => _blink.BlinkDocument.instance.selectedStylesheetSet_Setter_(unwrap_jso(this), value);
+  set _selectedStylesheetSet(String value) => _blink.BlinkDocument.instance.selectedStylesheetSet_Setter_(this, value);
   
   @DomName('Document.styleSheets')
   @DocsEditable()
-  List<StyleSheet> get _styleSheets => wrap_jso(_blink.BlinkDocument.instance.styleSheets_Getter_(unwrap_jso(this)));
+  List<StyleSheet> get _styleSheets => (_blink.BlinkDocument.instance.styleSheets_Getter_(this));
   
   @DomName('Document.timeline')
   @DocsEditable()
   @Experimental() // untriaged
-  AnimationTimeline get timeline => wrap_jso(_blink.BlinkDocument.instance.timeline_Getter_(unwrap_jso(this)));
+  AnimationTimeline get timeline => _blink.BlinkDocument.instance.timeline_Getter_(this);
   
   @DomName('Document.title')
   @DocsEditable()
-  String get _title => _blink.BlinkDocument.instance.title_Getter_(unwrap_jso(this));
+  String get _title => _blink.BlinkDocument.instance.title_Getter_(this);
   
   @DomName('Document.title')
   @DocsEditable()
-  set _title(String value) => _blink.BlinkDocument.instance.title_Setter_(unwrap_jso(this), value);
+  set _title(String value) => _blink.BlinkDocument.instance.title_Setter_(this, value);
   
   @DomName('Document.visibilityState')
   @DocsEditable()
   @Experimental() // untriaged
-  String get visibilityState => _blink.BlinkDocument.instance.visibilityState_Getter_(unwrap_jso(this));
+  String get visibilityState => _blink.BlinkDocument.instance.visibilityState_Getter_(this);
   
   @DomName('Document.webkitFullscreenElement')
   @DocsEditable()
@@ -10336,7 +10332,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-fullscreenelement
-  Element get _webkitFullscreenElement => wrap_jso(_blink.BlinkDocument.instance.webkitFullscreenElement_Getter_(unwrap_jso(this)));
+  Element get _webkitFullscreenElement => _blink.BlinkDocument.instance.webkitFullscreenElement_Getter_(this);
   
   @DomName('Document.webkitFullscreenEnabled')
   @DocsEditable()
@@ -10344,7 +10340,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-fullscreenenabled
-  bool get _webkitFullscreenEnabled => _blink.BlinkDocument.instance.webkitFullscreenEnabled_Getter_(unwrap_jso(this));
+  bool get _webkitFullscreenEnabled => _blink.BlinkDocument.instance.webkitFullscreenEnabled_Getter_(this);
   
   @DomName('Document.webkitHidden')
   @DocsEditable()
@@ -10352,7 +10348,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#document
-  bool get _webkitHidden => _blink.BlinkDocument.instance.webkitHidden_Getter_(unwrap_jso(this));
+  bool get _webkitHidden => _blink.BlinkDocument.instance.webkitHidden_Getter_(this);
   
   @DomName('Document.webkitVisibilityState')
   @DocsEditable()
@@ -10360,139 +10356,146 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#dom-document-visibilitystate
-  String get _webkitVisibilityState => _blink.BlinkDocument.instance.webkitVisibilityState_Getter_(unwrap_jso(this));
+  String get _webkitVisibilityState => _blink.BlinkDocument.instance.webkitVisibilityState_Getter_(this);
   
   @DomName('Document.adoptNode')
   @DocsEditable()
-  Node adoptNode(Node node) => wrap_jso(_blink.BlinkDocument.instance.adoptNode_Callback_1_(unwrap_jso(this), unwrap_jso(node)));
+  Node adoptNode(Node node) => _blink.BlinkDocument.instance.adoptNode_Callback_1_(this, node);
   
   @DomName('Document.caretRangeFromPoint')
   @DocsEditable()
   // http://www.w3.org/TR/2009/WD-cssom-view-20090804/#dom-documentview-caretrangefrompoint
   @Experimental()
-  Range _caretRangeFromPoint(int x, int y) => wrap_jso(_blink.BlinkDocument.instance.caretRangeFromPoint_Callback_2_(unwrap_jso(this), x, y));
+  Range _caretRangeFromPoint(int x, int y) => _blink.BlinkDocument.instance.caretRangeFromPoint_Callback_2_(this, x, y);
   
   @DomName('Document.createDocumentFragment')
   @DocsEditable()
-  DocumentFragment createDocumentFragment() => wrap_jso(_blink.BlinkDocument.instance.createDocumentFragment_Callback_0_(unwrap_jso(this)));
+  DocumentFragment createDocumentFragment() => _blink.BlinkDocument.instance.createDocumentFragment_Callback_0_(this);
   
   @DomName('Document.createElement')
   @DocsEditable()
-  Element _createElement(String localName_OR_tagName, [String typeExtension]) => wrap_jso(_blink.BlinkDocument.instance.createElement_Callback_2_(unwrap_jso(this), localName_OR_tagName, typeExtension));
+  Element _createElement(String localName_OR_tagName, [String typeExtension]) => _blink.BlinkDocument.instance.createElement_Callback_2_(this, localName_OR_tagName, typeExtension);
   
   @DomName('Document.createElementNS')
   @DocsEditable()
-  Element _createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) => wrap_jso(_blink.BlinkDocument.instance.createElementNS_Callback_3_(unwrap_jso(this), namespaceURI, qualifiedName, typeExtension));
+  Element _createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) => _blink.BlinkDocument.instance.createElementNS_Callback_3_(this, namespaceURI, qualifiedName, typeExtension);
   
   @DomName('Document.createEvent')
   @DocsEditable()
-  Event _createEvent(String eventType) => wrap_jso(_blink.BlinkDocument.instance.createEvent_Callback_1_(unwrap_jso(this), eventType));
+  Event _createEvent(String eventType) => _blink.BlinkDocument.instance.createEvent_Callback_1_(this, eventType);
   
   NodeIterator _createNodeIterator(Node root, [int whatToShow, NodeFilter filter]) {
     if (whatToShow != null) {
-      return wrap_jso(_blink.BlinkDocument.instance.createNodeIterator_Callback_3_(unwrap_jso(this), unwrap_jso(root), whatToShow, unwrap_jso(filter)));
+      return _blink.BlinkDocument.instance.createNodeIterator_Callback_3_(this, root, whatToShow, filter);
     }
-    return wrap_jso(_blink.BlinkDocument.instance.createNodeIterator_Callback_1_(unwrap_jso(this), unwrap_jso(root)));
+    return _blink.BlinkDocument.instance.createNodeIterator_Callback_1_(this, root);
   }
 
   @DomName('Document.createRange')
   @DocsEditable()
-  Range createRange() => wrap_jso(_blink.BlinkDocument.instance.createRange_Callback_0_(unwrap_jso(this)));
+  Range createRange() => _blink.BlinkDocument.instance.createRange_Callback_0_(this);
   
   @DomName('Document.createTextNode')
   @DocsEditable()
-  Text _createTextNode(String data) => wrap_jso(_blink.BlinkDocument.instance.createTextNode_Callback_1_(unwrap_jso(this), data));
+  Text _createTextNode(String data) => _blink.BlinkDocument.instance.createTextNode_Callback_1_(this, data);
   
   @DomName('Document.createTouch')
   @DocsEditable()
   // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
   @Experimental()
-  Touch _createTouch(Window window, EventTarget target, int identifier, num pageX, num pageY, num screenX, num screenY, num webkitRadiusX, num webkitRadiusY, num webkitRotationAngle, num webkitForce) => wrap_jso(_blink.BlinkDocument.instance.createTouch_Callback_11_(unwrap_jso(this), unwrap_jso(window), unwrap_jso(target), identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce));
+  Touch _createTouch(Window window, EventTarget target, int identifier, num pageX, num pageY, num screenX, num screenY, num radiusX, num radiusY, num rotationAngle, num force) => _blink.BlinkDocument.instance.createTouch_Callback_11_(this, window, _convertDartToNative_EventTarget(target), identifier, pageX, pageY, screenX, screenY, radiusX, radiusY, rotationAngle, force);
   
   @DomName('Document.createTouchList')
   @DocsEditable()
   // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
   @Experimental()
-  TouchList _createTouchList(Touch touches) => wrap_jso(_blink.BlinkDocument.instance.createTouchList_Callback_1_(unwrap_jso(this), unwrap_jso(touches)));
+  TouchList _createTouchList(Touch touches) => _blink.BlinkDocument.instance.createTouchList_Callback_1_(this, touches);
   
   TreeWalker _createTreeWalker(Node root, [int whatToShow, NodeFilter filter]) {
     if (whatToShow != null) {
-      return wrap_jso(_blink.BlinkDocument.instance.createTreeWalker_Callback_3_(unwrap_jso(this), unwrap_jso(root), whatToShow, unwrap_jso(filter)));
+      return _blink.BlinkDocument.instance.createTreeWalker_Callback_3_(this, root, whatToShow, filter);
     }
-    return wrap_jso(_blink.BlinkDocument.instance.createTreeWalker_Callback_1_(unwrap_jso(this), unwrap_jso(root)));
+    return _blink.BlinkDocument.instance.createTreeWalker_Callback_1_(this, root);
   }
 
   @DomName('Document.elementFromPoint')
   @DocsEditable()
-  Element _elementFromPoint(int x, int y) => wrap_jso(_blink.BlinkDocument.instance.elementFromPoint_Callback_2_(unwrap_jso(this), x, y));
+  Element _elementFromPoint(int x, int y) => _blink.BlinkDocument.instance.elementFromPoint_Callback_2_(this, x, y);
   
-  @DomName('Document.execCommand')
+  @DomName('Document.elementsFromPoint')
   @DocsEditable()
-  bool execCommand(String command, bool userInterface, String value) => _blink.BlinkDocument.instance.execCommand_Callback_3_(unwrap_jso(this), command, userInterface, value);
+  @Experimental() // untriaged
+  List<Element> elementsFromPoint(int x, int y) => (_blink.BlinkDocument.instance.elementsFromPoint_Callback_2_(this, x, y));
   
+  bool execCommand(String commandId, [bool showUI, String value]) {
+    if (value != null) {
+      return _blink.BlinkDocument.instance.execCommand_Callback_3_(this, commandId, showUI, value);
+    }
+    if (showUI != null) {
+      return _blink.BlinkDocument.instance.execCommand_Callback_2_(this, commandId, showUI);
+    }
+    return _blink.BlinkDocument.instance.execCommand_Callback_1_(this, commandId);
+  }
+
   @DomName('Document.exitFullscreen')
   @DocsEditable()
   @Experimental() // untriaged
-  void exitFullscreen() => _blink.BlinkDocument.instance.exitFullscreen_Callback_0_(unwrap_jso(this));
+  void exitFullscreen() => _blink.BlinkDocument.instance.exitFullscreen_Callback_0_(this);
   
   @DomName('Document.exitPointerLock')
   @DocsEditable()
   @Experimental() // untriaged
-  void exitPointerLock() => _blink.BlinkDocument.instance.exitPointerLock_Callback_0_(unwrap_jso(this));
+  void exitPointerLock() => _blink.BlinkDocument.instance.exitPointerLock_Callback_0_(this);
   
   @DomName('Document.getCSSCanvasContext')
   @DocsEditable()
   // https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/Functions.html
   @Experimental() // non-standard
-  Object _getCssCanvasContext(String contextId, String name, int width, int height) => wrap_jso(_blink.BlinkDocument.instance.getCSSCanvasContext_Callback_4_(unwrap_jso(this), contextId, name, width, height));
-  
-  @DomName('Document.getElementById')
-  @DocsEditable()
-  Element getElementById(String elementId) => wrap_jso(_blink.BlinkDocument.instance.getElementById_Callback_1_(unwrap_jso(this), elementId));
+  Object _getCssCanvasContext(String contextId, String name, int width, int height) => (_blink.BlinkDocument.instance.getCSSCanvasContext_Callback_4_(this, contextId, name, width, height));
   
   @DomName('Document.getElementsByClassName')
   @DocsEditable()
-  List<Node> getElementsByClassName(String classNames) => wrap_jso(_blink.BlinkDocument.instance.getElementsByClassName_Callback_1_(unwrap_jso(this), classNames));
+  List<Node> getElementsByClassName(String classNames) => (_blink.BlinkDocument.instance.getElementsByClassName_Callback_1_(this, classNames));
   
   @DomName('Document.getElementsByName')
   @DocsEditable()
-  List<Node> getElementsByName(String elementName) => wrap_jso(_blink.BlinkDocument.instance.getElementsByName_Callback_1_(unwrap_jso(this), elementName));
+  List<Node> getElementsByName(String elementName) => (_blink.BlinkDocument.instance.getElementsByName_Callback_1_(this, elementName));
   
   @DomName('Document.getElementsByTagName')
   @DocsEditable()
-  List<Node> getElementsByTagName(String localName) => wrap_jso(_blink.BlinkDocument.instance.getElementsByTagName_Callback_1_(unwrap_jso(this), localName));
+  List<Node> getElementsByTagName(String localName) => (_blink.BlinkDocument.instance.getElementsByTagName_Callback_1_(this, localName));
   
   Node importNode(Node node, [bool deep]) {
     if (deep != null) {
-      return wrap_jso(_blink.BlinkDocument.instance.importNode_Callback_2_(unwrap_jso(this), unwrap_jso(node), deep));
+      return _blink.BlinkDocument.instance.importNode_Callback_2_(this, node, deep);
     }
-    return wrap_jso(_blink.BlinkDocument.instance.importNode_Callback_1_(unwrap_jso(this), unwrap_jso(node)));
+    return _blink.BlinkDocument.instance.importNode_Callback_1_(this, node);
   }
 
   @DomName('Document.queryCommandEnabled')
   @DocsEditable()
-  bool queryCommandEnabled(String command) => _blink.BlinkDocument.instance.queryCommandEnabled_Callback_1_(unwrap_jso(this), command);
+  bool queryCommandEnabled(String commandId) => _blink.BlinkDocument.instance.queryCommandEnabled_Callback_1_(this, commandId);
   
   @DomName('Document.queryCommandIndeterm')
   @DocsEditable()
-  bool queryCommandIndeterm(String command) => _blink.BlinkDocument.instance.queryCommandIndeterm_Callback_1_(unwrap_jso(this), command);
+  bool queryCommandIndeterm(String commandId) => _blink.BlinkDocument.instance.queryCommandIndeterm_Callback_1_(this, commandId);
   
   @DomName('Document.queryCommandState')
   @DocsEditable()
-  bool queryCommandState(String command) => _blink.BlinkDocument.instance.queryCommandState_Callback_1_(unwrap_jso(this), command);
+  bool queryCommandState(String commandId) => _blink.BlinkDocument.instance.queryCommandState_Callback_1_(this, commandId);
   
   @DomName('Document.queryCommandSupported')
   @DocsEditable()
-  bool queryCommandSupported(String command) => _blink.BlinkDocument.instance.queryCommandSupported_Callback_1_(unwrap_jso(this), command);
+  bool queryCommandSupported(String commandId) => _blink.BlinkDocument.instance.queryCommandSupported_Callback_1_(this, commandId);
   
   @DomName('Document.queryCommandValue')
   @DocsEditable()
-  String queryCommandValue(String command) => _blink.BlinkDocument.instance.queryCommandValue_Callback_1_(unwrap_jso(this), command);
+  String queryCommandValue(String commandId) => _blink.BlinkDocument.instance.queryCommandValue_Callback_1_(this, commandId);
   
   @DomName('Document.transformDocumentToTreeView')
   @DocsEditable()
   @Experimental() // untriaged
-  void transformDocumentToTreeView(String noStyleMessage) => _blink.BlinkDocument.instance.transformDocumentToTreeView_Callback_1_(unwrap_jso(this), noStyleMessage);
+  void transformDocumentToTreeView(String noStyleMessage) => _blink.BlinkDocument.instance.transformDocumentToTreeView_Callback_1_(this, noStyleMessage);
   
   @DomName('Document.webkitExitFullscreen')
   @DocsEditable()
@@ -10500,23 +10503,27 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-exitfullscreen
-  void _webkitExitFullscreen() => _blink.BlinkDocument.instance.webkitExitFullscreen_Callback_0_(unwrap_jso(this));
+  void _webkitExitFullscreen() => _blink.BlinkDocument.instance.webkitExitFullscreen_Callback_0_(this);
+  
+  @DomName('Document.getElementById')
+  @DocsEditable()
+  Element getElementById(String elementId) => _blink.BlinkDocument.instance.getElementById_Callback_1_(this, elementId);
   
   @DomName('Document.childElementCount')
   @DocsEditable()
-  int get _childElementCount => _blink.BlinkDocument.instance.childElementCount_Getter_(unwrap_jso(this));
+  int get _childElementCount => _blink.BlinkDocument.instance.childElementCount_Getter_(this);
   
   @DomName('Document.children')
   @DocsEditable()
-  List<Node> get _children => wrap_jso(_blink.BlinkDocument.instance.children_Getter_(unwrap_jso(this)));
+  List<Node> get _children => (_blink.BlinkDocument.instance.children_Getter_(this));
   
   @DomName('Document.firstElementChild')
   @DocsEditable()
-  Element get _firstElementChild => wrap_jso(_blink.BlinkDocument.instance.firstElementChild_Getter_(unwrap_jso(this)));
+  Element get _firstElementChild => _blink.BlinkDocument.instance.firstElementChild_Getter_(this);
   
   @DomName('Document.lastElementChild')
   @DocsEditable()
-  Element get _lastElementChild => wrap_jso(_blink.BlinkDocument.instance.lastElementChild_Getter_(unwrap_jso(this)));
+  Element get _lastElementChild => _blink.BlinkDocument.instance.lastElementChild_Getter_(this);
   
   /**
    * Finds the first descendant element of this document that matches the
@@ -10537,11 +10544,11 @@
    */
   @DomName('Document.querySelector')
   @DocsEditable()
-  Element querySelector(String selectors) => wrap_jso(_blink.BlinkDocument.instance.querySelector_Callback_1_(unwrap_jso(this), selectors));
+  Element querySelector(String selectors) => _blink.BlinkDocument.instance.querySelector_Callback_1_(this, selectors);
   
   @DomName('Document.querySelectorAll')
   @DocsEditable()
-  List<Node> _querySelectorAll(String selectors) => wrap_jso(_blink.BlinkDocument.instance.querySelectorAll_Callback_1_(unwrap_jso(this), selectors));
+  List<Node> _querySelectorAll(String selectors) => (_blink.BlinkDocument.instance.querySelectorAll_Callback_1_(this, selectors));
   
   /// Stream of `abort` events handled by this [Document].
   @DomName('Document.onabort')
@@ -10596,12 +10603,12 @@
   /// Stream of `copy` events handled by this [Document].
   @DomName('Document.oncopy')
   @DocsEditable()
-  Stream<Event> get onCopy => Element.copyEvent.forTarget(this);
+  Stream<ClipboardEvent> get onCopy => Element.copyEvent.forTarget(this);
 
   /// Stream of `cut` events handled by this [Document].
   @DomName('Document.oncut')
   @DocsEditable()
-  Stream<Event> get onCut => Element.cutEvent.forTarget(this);
+  Stream<ClipboardEvent> get onCut => Element.cutEvent.forTarget(this);
 
   /// Stream of `doubleclick` events handled by this [Document].
   @DomName('Document.ondblclick')
@@ -10753,7 +10760,7 @@
   /// Stream of `paste` events handled by this [Document].
   @DomName('Document.onpaste')
   @DocsEditable()
-  Stream<Event> get onPaste => Element.pasteEvent.forTarget(this);
+  Stream<ClipboardEvent> get onPaste => Element.pasteEvent.forTarget(this);
 
   @DomName('Document.onpause')
   @DocsEditable()
@@ -10966,47 +10973,17 @@
 
   @DomName('Document.createElement')
   Element createElement(String tagName, [String typeExtension]) {
-    var newElement = (typeExtension == null) ?
-      _blink.BlinkDocument.instance.createElement_Callback_1_(unwrap_jso(this), tagName) :
-      _blink.BlinkDocument.instance.createElement_Callback_2_(unwrap_jso(this), tagName, typeExtension);
-
-    var wrapped = js.getDartHtmlWrapperFor(newElement);  // Here's our Dart class.
-    if (wrapped != null) {
-      wrapped.blink_jsObject = newElement;
-    } else {
-      wrapped = wrap_jso(newElement);
-      if (wrapped == null) {
-        wrapped = wrap_jso_custom_element(newElement);
-      } else {
-        js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);
-      }
-    }
-
-    return wrapped;
+    return (typeExtension == null) ?
+      _blink.BlinkDocument.instance.createElement_Callback_1_(this, tagName) :
+      _blink.BlinkDocument.instance.createElement_Callback_2_(this, tagName, typeExtension);
   }
 
   @DomName('Document.createElementNS')
   @DocsEditable()
   Element createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) {
-    var newElement = (typeExtension == null) ?
-      _blink.BlinkDocument.instance.createElementNS_Callback_2_(unwrap_jso(this), namespaceURI, qualifiedName) :
-      _blink.BlinkDocument.instance.createElementNS_Callback_3_(unwrap_jso(this), namespaceURI, qualifiedName, typeExtension);
-
-    var wrapped;
-
-    wrapped = js.getDartHtmlWrapperFor(newElement);  // Here's our Dart class.
-    if (wrapped != null) {
-      wrapped.blink_jsObject = newElement;
-    } else {
-      wrapped = wrap_jso(newElement);
-      if (wrapped == null) {
-        wrapped = wrap_jso_custom_element(newElement);
-      } else {
-        js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);  // Here's our Dart class.
-      }
-    }
-
-    return wrapped;
+    return (typeExtension == null) ?
+      _blink.BlinkDocument.instance.createElementNS_Callback_2_(this, namespaceURI, qualifiedName) :
+      _blink.BlinkDocument.instance.createElementNS_Callback_3_(this, namespaceURI, qualifiedName, typeExtension);    
   }
 
 }
@@ -11016,7 +10993,7 @@
 
 
 @DomName('DocumentFragment')
-class DocumentFragment extends Node implements ParentNode {
+class DocumentFragment extends Node implements NonElementParentNode, ParentNode {
   factory DocumentFragment() => document.createDocumentFragment();
 
   factory DocumentFragment.html(String html,
@@ -11130,11 +11107,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DocumentFragment internalCreateDocumentFragment() {
-    return new DocumentFragment._internalWrap();
-  }
-
-  external factory DocumentFragment._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DocumentFragment.internal_() : super.internal_();
@@ -11143,19 +11116,19 @@
   @DomName('DocumentFragment.getElementById')
   @DocsEditable()
   @Experimental() // untriaged
-  Element getElementById(String elementId) => wrap_jso(_blink.BlinkDocumentFragment.instance.getElementById_Callback_1_(unwrap_jso(this), elementId));
+  Element getElementById(String elementId) => _blink.BlinkDocumentFragment.instance.getElementById_Callback_1_(this, elementId);
   
   @DomName('DocumentFragment.childElementCount')
   @DocsEditable()
-  int get _childElementCount => _blink.BlinkDocumentFragment.instance.childElementCount_Getter_(unwrap_jso(this));
+  int get _childElementCount => _blink.BlinkDocumentFragment.instance.childElementCount_Getter_(this);
   
   @DomName('DocumentFragment.firstElementChild')
   @DocsEditable()
-  Element get _firstElementChild => wrap_jso(_blink.BlinkDocumentFragment.instance.firstElementChild_Getter_(unwrap_jso(this)));
+  Element get _firstElementChild => _blink.BlinkDocumentFragment.instance.firstElementChild_Getter_(this);
   
   @DomName('DocumentFragment.lastElementChild')
   @DocsEditable()
-  Element get _lastElementChild => wrap_jso(_blink.BlinkDocumentFragment.instance.lastElementChild_Getter_(unwrap_jso(this)));
+  Element get _lastElementChild => _blink.BlinkDocumentFragment.instance.lastElementChild_Getter_(this);
   
   /**
    * Finds the first descendant element of this document fragment that matches
@@ -11171,11 +11144,11 @@
    */
   @DomName('DocumentFragment.querySelector')
   @DocsEditable()
-  Element querySelector(String selectors) => wrap_jso(_blink.BlinkDocumentFragment.instance.querySelector_Callback_1_(unwrap_jso(this), selectors));
+  Element querySelector(String selectors) => _blink.BlinkDocumentFragment.instance.querySelector_Callback_1_(this, selectors);
   
   @DomName('DocumentFragment.querySelectorAll')
   @DocsEditable()
-  List<Node> _querySelectorAll(String selectors) => wrap_jso(_blink.BlinkDocumentFragment.instance.querySelectorAll_Callback_1_(unwrap_jso(this), selectors));
+  List<Node> _querySelectorAll(String selectors) => (_blink.BlinkDocumentFragment.instance.querySelectorAll_Callback_1_(this, selectors));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -11194,32 +11167,24 @@
   @DomName('DOMError.DOMError')
   @DocsEditable()
   factory DomError(String name, [String message]) {
-    return wrap_jso(_blink.BlinkDOMError.instance.constructorCallback_2_(name, message));
+    return _blink.BlinkDOMError.instance.constructorCallback_2_(name, message);
   }
 
+
   @Deprecated("Internal Use Only")
-  static DomError internalCreateDomError() {
-    return new DomError._internalWrap();
-  }
-
-  factory DomError._internalWrap() {
-    return new DomError.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomError.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DOMError.message')
   @DocsEditable()
   @Experimental() // untriaged
-  String get message => _blink.BlinkDOMError.instance.message_Getter_(unwrap_jso(this));
+  String get message => _blink.BlinkDOMError.instance.message_Getter_(this);
   
   @DomName('DOMError.name')
   @DocsEditable()
-  String get name => _blink.BlinkDOMError.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkDOMError.instance.name_Getter_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -11307,36 +11272,28 @@
   // To suppress missing implicit constructor warnings.
   factory DomImplementation._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DomImplementation internalCreateDomImplementation() {
-    return new DomImplementation._internalWrap();
-  }
 
-  factory DomImplementation._internalWrap() {
-    return new DomImplementation.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomImplementation.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DOMImplementation.createDocument')
   @DocsEditable()
-  XmlDocument createDocument(String namespaceURI, String qualifiedName, _DocumentType doctype) => wrap_jso(_blink.BlinkDOMImplementation.instance.createDocument_Callback_3_(unwrap_jso(this), namespaceURI, qualifiedName, unwrap_jso(doctype)));
+  XmlDocument createDocument(String namespaceURI, String qualifiedName, _DocumentType doctype) => _blink.BlinkDOMImplementation.instance.createDocument_Callback_3_(this, namespaceURI, qualifiedName, doctype);
   
   @DomName('DOMImplementation.createDocumentType')
   @DocsEditable()
-  _DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) => wrap_jso(_blink.BlinkDOMImplementation.instance.createDocumentType_Callback_3_(unwrap_jso(this), qualifiedName, publicId, systemId));
+  _DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) => _blink.BlinkDOMImplementation.instance.createDocumentType_Callback_3_(this, qualifiedName, publicId, systemId);
   
   @DomName('DOMImplementation.createHTMLDocument')
   @DocsEditable()
-  HtmlDocument createHtmlDocument(String title) => wrap_jso(_blink.BlinkDOMImplementation.instance.createHTMLDocument_Callback_1_(unwrap_jso(this), title));
+  HtmlDocument createHtmlDocument(String title) => _blink.BlinkDOMImplementation.instance.createHTMLDocument_Callback_1_(this, title);
   
   @DomName('DOMImplementation.hasFeature')
   @DocsEditable()
-  bool hasFeature(String feature, String version) => _blink.BlinkDOMImplementation.instance.hasFeature_Callback_2_(unwrap_jso(this), feature, version);
+  bool hasFeature() => _blink.BlinkDOMImplementation.instance.hasFeature_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -11353,26 +11310,18 @@
   // To suppress missing implicit constructor warnings.
   factory DomIterator._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DomIterator internalCreateDomIterator() {
-    return new DomIterator._internalWrap();
-  }
 
-  factory DomIterator._internalWrap() {
-    return new DomIterator.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomIterator.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   Object next([Object value]) {
     if (value != null) {
-      return wrap_jso(_blink.BlinkIterator.instance.next_Callback_1_(unwrap_jso(this), value));
+      return _blink.BlinkIterator.instance.next_Callback_1_(this, value);
     }
-    return wrap_jso(_blink.BlinkIterator.instance.next_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkIterator.instance.next_Callback_0_(this);
   }
 
 }
@@ -11394,21 +11343,17 @@
   @DocsEditable()
   factory DomMatrix([DomMatrixReadOnly other]) {
     if (other == null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.constructorCallback_0_());
+      return _blink.BlinkDOMMatrix.instance.constructorCallback_0_();
     }
     if ((other is DomMatrixReadOnly || other == null)) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.constructorCallback_1_(other));
+      return _blink.BlinkDOMMatrix.instance.constructorCallback_1_(other);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
 
   @Deprecated("Internal Use Only")
-  static DomMatrix internalCreateDomMatrix() {
-    return new DomMatrix._internalWrap();
-  }
-
-  external factory DomMatrix._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomMatrix.internal_() : super.internal_();
@@ -11417,280 +11362,280 @@
   @DomName('DOMMatrix.a')
   @DocsEditable()
   @Experimental() // untriaged
-  num get a => _blink.BlinkDOMMatrix.instance.a_Getter_(unwrap_jso(this));
+  num get a => _blink.BlinkDOMMatrix.instance.a_Getter_(this);
   
   @DomName('DOMMatrix.a')
   @DocsEditable()
   @Experimental() // untriaged
-  set a(num value) => _blink.BlinkDOMMatrix.instance.a_Setter_(unwrap_jso(this), value);
+  set a(num value) => _blink.BlinkDOMMatrix.instance.a_Setter_(this, value);
   
   @DomName('DOMMatrix.b')
   @DocsEditable()
   @Experimental() // untriaged
-  num get b => _blink.BlinkDOMMatrix.instance.b_Getter_(unwrap_jso(this));
+  num get b => _blink.BlinkDOMMatrix.instance.b_Getter_(this);
   
   @DomName('DOMMatrix.b')
   @DocsEditable()
   @Experimental() // untriaged
-  set b(num value) => _blink.BlinkDOMMatrix.instance.b_Setter_(unwrap_jso(this), value);
+  set b(num value) => _blink.BlinkDOMMatrix.instance.b_Setter_(this, value);
   
   @DomName('DOMMatrix.c')
   @DocsEditable()
   @Experimental() // untriaged
-  num get c => _blink.BlinkDOMMatrix.instance.c_Getter_(unwrap_jso(this));
+  num get c => _blink.BlinkDOMMatrix.instance.c_Getter_(this);
   
   @DomName('DOMMatrix.c')
   @DocsEditable()
   @Experimental() // untriaged
-  set c(num value) => _blink.BlinkDOMMatrix.instance.c_Setter_(unwrap_jso(this), value);
+  set c(num value) => _blink.BlinkDOMMatrix.instance.c_Setter_(this, value);
   
   @DomName('DOMMatrix.d')
   @DocsEditable()
   @Experimental() // untriaged
-  num get d => _blink.BlinkDOMMatrix.instance.d_Getter_(unwrap_jso(this));
+  num get d => _blink.BlinkDOMMatrix.instance.d_Getter_(this);
   
   @DomName('DOMMatrix.d')
   @DocsEditable()
   @Experimental() // untriaged
-  set d(num value) => _blink.BlinkDOMMatrix.instance.d_Setter_(unwrap_jso(this), value);
+  set d(num value) => _blink.BlinkDOMMatrix.instance.d_Setter_(this, value);
   
   @DomName('DOMMatrix.e')
   @DocsEditable()
   @Experimental() // untriaged
-  num get e => _blink.BlinkDOMMatrix.instance.e_Getter_(unwrap_jso(this));
+  num get e => _blink.BlinkDOMMatrix.instance.e_Getter_(this);
   
   @DomName('DOMMatrix.e')
   @DocsEditable()
   @Experimental() // untriaged
-  set e(num value) => _blink.BlinkDOMMatrix.instance.e_Setter_(unwrap_jso(this), value);
+  set e(num value) => _blink.BlinkDOMMatrix.instance.e_Setter_(this, value);
   
   @DomName('DOMMatrix.f')
   @DocsEditable()
   @Experimental() // untriaged
-  num get f => _blink.BlinkDOMMatrix.instance.f_Getter_(unwrap_jso(this));
+  num get f => _blink.BlinkDOMMatrix.instance.f_Getter_(this);
   
   @DomName('DOMMatrix.f')
   @DocsEditable()
   @Experimental() // untriaged
-  set f(num value) => _blink.BlinkDOMMatrix.instance.f_Setter_(unwrap_jso(this), value);
+  set f(num value) => _blink.BlinkDOMMatrix.instance.f_Setter_(this, value);
   
   @DomName('DOMMatrix.m11')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m11 => _blink.BlinkDOMMatrix.instance.m11_Getter_(unwrap_jso(this));
+  num get m11 => _blink.BlinkDOMMatrix.instance.m11_Getter_(this);
   
   @DomName('DOMMatrix.m11')
   @DocsEditable()
   @Experimental() // untriaged
-  set m11(num value) => _blink.BlinkDOMMatrix.instance.m11_Setter_(unwrap_jso(this), value);
+  set m11(num value) => _blink.BlinkDOMMatrix.instance.m11_Setter_(this, value);
   
   @DomName('DOMMatrix.m12')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m12 => _blink.BlinkDOMMatrix.instance.m12_Getter_(unwrap_jso(this));
+  num get m12 => _blink.BlinkDOMMatrix.instance.m12_Getter_(this);
   
   @DomName('DOMMatrix.m12')
   @DocsEditable()
   @Experimental() // untriaged
-  set m12(num value) => _blink.BlinkDOMMatrix.instance.m12_Setter_(unwrap_jso(this), value);
+  set m12(num value) => _blink.BlinkDOMMatrix.instance.m12_Setter_(this, value);
   
   @DomName('DOMMatrix.m13')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m13 => _blink.BlinkDOMMatrix.instance.m13_Getter_(unwrap_jso(this));
+  num get m13 => _blink.BlinkDOMMatrix.instance.m13_Getter_(this);
   
   @DomName('DOMMatrix.m13')
   @DocsEditable()
   @Experimental() // untriaged
-  set m13(num value) => _blink.BlinkDOMMatrix.instance.m13_Setter_(unwrap_jso(this), value);
+  set m13(num value) => _blink.BlinkDOMMatrix.instance.m13_Setter_(this, value);
   
   @DomName('DOMMatrix.m14')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m14 => _blink.BlinkDOMMatrix.instance.m14_Getter_(unwrap_jso(this));
+  num get m14 => _blink.BlinkDOMMatrix.instance.m14_Getter_(this);
   
   @DomName('DOMMatrix.m14')
   @DocsEditable()
   @Experimental() // untriaged
-  set m14(num value) => _blink.BlinkDOMMatrix.instance.m14_Setter_(unwrap_jso(this), value);
+  set m14(num value) => _blink.BlinkDOMMatrix.instance.m14_Setter_(this, value);
   
   @DomName('DOMMatrix.m21')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m21 => _blink.BlinkDOMMatrix.instance.m21_Getter_(unwrap_jso(this));
+  num get m21 => _blink.BlinkDOMMatrix.instance.m21_Getter_(this);
   
   @DomName('DOMMatrix.m21')
   @DocsEditable()
   @Experimental() // untriaged
-  set m21(num value) => _blink.BlinkDOMMatrix.instance.m21_Setter_(unwrap_jso(this), value);
+  set m21(num value) => _blink.BlinkDOMMatrix.instance.m21_Setter_(this, value);
   
   @DomName('DOMMatrix.m22')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m22 => _blink.BlinkDOMMatrix.instance.m22_Getter_(unwrap_jso(this));
+  num get m22 => _blink.BlinkDOMMatrix.instance.m22_Getter_(this);
   
   @DomName('DOMMatrix.m22')
   @DocsEditable()
   @Experimental() // untriaged
-  set m22(num value) => _blink.BlinkDOMMatrix.instance.m22_Setter_(unwrap_jso(this), value);
+  set m22(num value) => _blink.BlinkDOMMatrix.instance.m22_Setter_(this, value);
   
   @DomName('DOMMatrix.m23')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m23 => _blink.BlinkDOMMatrix.instance.m23_Getter_(unwrap_jso(this));
+  num get m23 => _blink.BlinkDOMMatrix.instance.m23_Getter_(this);
   
   @DomName('DOMMatrix.m23')
   @DocsEditable()
   @Experimental() // untriaged
-  set m23(num value) => _blink.BlinkDOMMatrix.instance.m23_Setter_(unwrap_jso(this), value);
+  set m23(num value) => _blink.BlinkDOMMatrix.instance.m23_Setter_(this, value);
   
   @DomName('DOMMatrix.m24')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m24 => _blink.BlinkDOMMatrix.instance.m24_Getter_(unwrap_jso(this));
+  num get m24 => _blink.BlinkDOMMatrix.instance.m24_Getter_(this);
   
   @DomName('DOMMatrix.m24')
   @DocsEditable()
   @Experimental() // untriaged
-  set m24(num value) => _blink.BlinkDOMMatrix.instance.m24_Setter_(unwrap_jso(this), value);
+  set m24(num value) => _blink.BlinkDOMMatrix.instance.m24_Setter_(this, value);
   
   @DomName('DOMMatrix.m31')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m31 => _blink.BlinkDOMMatrix.instance.m31_Getter_(unwrap_jso(this));
+  num get m31 => _blink.BlinkDOMMatrix.instance.m31_Getter_(this);
   
   @DomName('DOMMatrix.m31')
   @DocsEditable()
   @Experimental() // untriaged
-  set m31(num value) => _blink.BlinkDOMMatrix.instance.m31_Setter_(unwrap_jso(this), value);
+  set m31(num value) => _blink.BlinkDOMMatrix.instance.m31_Setter_(this, value);
   
   @DomName('DOMMatrix.m32')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m32 => _blink.BlinkDOMMatrix.instance.m32_Getter_(unwrap_jso(this));
+  num get m32 => _blink.BlinkDOMMatrix.instance.m32_Getter_(this);
   
   @DomName('DOMMatrix.m32')
   @DocsEditable()
   @Experimental() // untriaged
-  set m32(num value) => _blink.BlinkDOMMatrix.instance.m32_Setter_(unwrap_jso(this), value);
+  set m32(num value) => _blink.BlinkDOMMatrix.instance.m32_Setter_(this, value);
   
   @DomName('DOMMatrix.m33')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m33 => _blink.BlinkDOMMatrix.instance.m33_Getter_(unwrap_jso(this));
+  num get m33 => _blink.BlinkDOMMatrix.instance.m33_Getter_(this);
   
   @DomName('DOMMatrix.m33')
   @DocsEditable()
   @Experimental() // untriaged
-  set m33(num value) => _blink.BlinkDOMMatrix.instance.m33_Setter_(unwrap_jso(this), value);
+  set m33(num value) => _blink.BlinkDOMMatrix.instance.m33_Setter_(this, value);
   
   @DomName('DOMMatrix.m34')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m34 => _blink.BlinkDOMMatrix.instance.m34_Getter_(unwrap_jso(this));
+  num get m34 => _blink.BlinkDOMMatrix.instance.m34_Getter_(this);
   
   @DomName('DOMMatrix.m34')
   @DocsEditable()
   @Experimental() // untriaged
-  set m34(num value) => _blink.BlinkDOMMatrix.instance.m34_Setter_(unwrap_jso(this), value);
+  set m34(num value) => _blink.BlinkDOMMatrix.instance.m34_Setter_(this, value);
   
   @DomName('DOMMatrix.m41')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m41 => _blink.BlinkDOMMatrix.instance.m41_Getter_(unwrap_jso(this));
+  num get m41 => _blink.BlinkDOMMatrix.instance.m41_Getter_(this);
   
   @DomName('DOMMatrix.m41')
   @DocsEditable()
   @Experimental() // untriaged
-  set m41(num value) => _blink.BlinkDOMMatrix.instance.m41_Setter_(unwrap_jso(this), value);
+  set m41(num value) => _blink.BlinkDOMMatrix.instance.m41_Setter_(this, value);
   
   @DomName('DOMMatrix.m42')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m42 => _blink.BlinkDOMMatrix.instance.m42_Getter_(unwrap_jso(this));
+  num get m42 => _blink.BlinkDOMMatrix.instance.m42_Getter_(this);
   
   @DomName('DOMMatrix.m42')
   @DocsEditable()
   @Experimental() // untriaged
-  set m42(num value) => _blink.BlinkDOMMatrix.instance.m42_Setter_(unwrap_jso(this), value);
+  set m42(num value) => _blink.BlinkDOMMatrix.instance.m42_Setter_(this, value);
   
   @DomName('DOMMatrix.m43')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m43 => _blink.BlinkDOMMatrix.instance.m43_Getter_(unwrap_jso(this));
+  num get m43 => _blink.BlinkDOMMatrix.instance.m43_Getter_(this);
   
   @DomName('DOMMatrix.m43')
   @DocsEditable()
   @Experimental() // untriaged
-  set m43(num value) => _blink.BlinkDOMMatrix.instance.m43_Setter_(unwrap_jso(this), value);
+  set m43(num value) => _blink.BlinkDOMMatrix.instance.m43_Setter_(this, value);
   
   @DomName('DOMMatrix.m44')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m44 => _blink.BlinkDOMMatrix.instance.m44_Getter_(unwrap_jso(this));
+  num get m44 => _blink.BlinkDOMMatrix.instance.m44_Getter_(this);
   
   @DomName('DOMMatrix.m44')
   @DocsEditable()
   @Experimental() // untriaged
-  set m44(num value) => _blink.BlinkDOMMatrix.instance.m44_Setter_(unwrap_jso(this), value);
+  set m44(num value) => _blink.BlinkDOMMatrix.instance.m44_Setter_(this, value);
   
   @DomName('DOMMatrix.multiplySelf')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix multiplySelf(DomMatrix other) => wrap_jso(_blink.BlinkDOMMatrix.instance.multiplySelf_Callback_1_(unwrap_jso(this), unwrap_jso(other)));
+  DomMatrix multiplySelf(DomMatrix other) => _blink.BlinkDOMMatrix.instance.multiplySelf_Callback_1_(this, other);
   
   @DomName('DOMMatrix.preMultiplySelf')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix preMultiplySelf(DomMatrix other) => wrap_jso(_blink.BlinkDOMMatrix.instance.preMultiplySelf_Callback_1_(unwrap_jso(this), unwrap_jso(other)));
+  DomMatrix preMultiplySelf(DomMatrix other) => _blink.BlinkDOMMatrix.instance.preMultiplySelf_Callback_1_(this, other);
   
-  DomMatrix scale3dSelf(num scale, [num ox, num oy, num oz]) {
-    if (oz != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scale3dSelf_Callback_4_(unwrap_jso(this), scale, ox, oy, oz));
+  DomMatrix scale3dSelf(num scale, [num originX, num originY, num originZ]) {
+    if (originZ != null) {
+      return _blink.BlinkDOMMatrix.instance.scale3dSelf_Callback_4_(this, scale, originX, originY, originZ);
     }
-    if (oy != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scale3dSelf_Callback_3_(unwrap_jso(this), scale, ox, oy));
+    if (originY != null) {
+      return _blink.BlinkDOMMatrix.instance.scale3dSelf_Callback_3_(this, scale, originX, originY);
     }
-    if (ox != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scale3dSelf_Callback_2_(unwrap_jso(this), scale, ox));
+    if (originX != null) {
+      return _blink.BlinkDOMMatrix.instance.scale3dSelf_Callback_2_(this, scale, originX);
     }
-    return wrap_jso(_blink.BlinkDOMMatrix.instance.scale3dSelf_Callback_1_(unwrap_jso(this), scale));
+    return _blink.BlinkDOMMatrix.instance.scale3dSelf_Callback_1_(this, scale);
   }
 
-  DomMatrix scaleNonUniformSelf(num sx, [num sy, num sz, num ox, num oy, num oz]) {
-    if (oz != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_6_(unwrap_jso(this), sx, sy, sz, ox, oy, oz));
+  DomMatrix scaleNonUniformSelf(num scaleX, [num scaleY, num scaleZ, num originX, num originY, num originZ]) {
+    if (originZ != null) {
+      return _blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_6_(this, scaleX, scaleY, scaleZ, originX, originY, originZ);
     }
-    if (oy != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_5_(unwrap_jso(this), sx, sy, sz, ox, oy));
+    if (originY != null) {
+      return _blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_5_(this, scaleX, scaleY, scaleZ, originX, originY);
     }
-    if (ox != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_4_(unwrap_jso(this), sx, sy, sz, ox));
+    if (originX != null) {
+      return _blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_4_(this, scaleX, scaleY, scaleZ, originX);
     }
-    if (sz != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_3_(unwrap_jso(this), sx, sy, sz));
+    if (scaleZ != null) {
+      return _blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_3_(this, scaleX, scaleY, scaleZ);
     }
-    if (sy != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_2_(unwrap_jso(this), sx, sy));
+    if (scaleY != null) {
+      return _blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_2_(this, scaleX, scaleY);
     }
-    return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_1_(unwrap_jso(this), sx));
+    return _blink.BlinkDOMMatrix.instance.scaleNonUniformSelf_Callback_1_(this, scaleX);
   }
 
-  DomMatrix scaleSelf(num scale, [num ox, num oy]) {
-    if (oy != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleSelf_Callback_3_(unwrap_jso(this), scale, ox, oy));
+  DomMatrix scaleSelf(num scale, [num originX, num originY]) {
+    if (originY != null) {
+      return _blink.BlinkDOMMatrix.instance.scaleSelf_Callback_3_(this, scale, originX, originY);
     }
-    if (ox != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleSelf_Callback_2_(unwrap_jso(this), scale, ox));
+    if (originX != null) {
+      return _blink.BlinkDOMMatrix.instance.scaleSelf_Callback_2_(this, scale, originX);
     }
-    return wrap_jso(_blink.BlinkDOMMatrix.instance.scaleSelf_Callback_1_(unwrap_jso(this), scale));
+    return _blink.BlinkDOMMatrix.instance.scaleSelf_Callback_1_(this, scale);
   }
 
   DomMatrix translateSelf(num tx, num ty, [num tz]) {
     if (tz != null) {
-      return wrap_jso(_blink.BlinkDOMMatrix.instance.translateSelf_Callback_3_(unwrap_jso(this), tx, ty, tz));
+      return _blink.BlinkDOMMatrix.instance.translateSelf_Callback_3_(this, tx, ty, tz);
     }
-    return wrap_jso(_blink.BlinkDOMMatrix.instance.translateSelf_Callback_2_(unwrap_jso(this), tx, ty));
+    return _blink.BlinkDOMMatrix.instance.translateSelf_Callback_2_(this, tx, ty);
   }
 
 }
@@ -11708,203 +11653,195 @@
   // To suppress missing implicit constructor warnings.
   factory DomMatrixReadOnly._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DomMatrixReadOnly internalCreateDomMatrixReadOnly() {
-    return new DomMatrixReadOnly._internalWrap();
-  }
 
-  factory DomMatrixReadOnly._internalWrap() {
-    return new DomMatrixReadOnly.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomMatrixReadOnly.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DOMMatrixReadOnly.a')
   @DocsEditable()
   @Experimental() // untriaged
-  num get a => _blink.BlinkDOMMatrixReadOnly.instance.a_Getter_(unwrap_jso(this));
+  num get a => _blink.BlinkDOMMatrixReadOnly.instance.a_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.b')
   @DocsEditable()
   @Experimental() // untriaged
-  num get b => _blink.BlinkDOMMatrixReadOnly.instance.b_Getter_(unwrap_jso(this));
+  num get b => _blink.BlinkDOMMatrixReadOnly.instance.b_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.c')
   @DocsEditable()
   @Experimental() // untriaged
-  num get c => _blink.BlinkDOMMatrixReadOnly.instance.c_Getter_(unwrap_jso(this));
+  num get c => _blink.BlinkDOMMatrixReadOnly.instance.c_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.d')
   @DocsEditable()
   @Experimental() // untriaged
-  num get d => _blink.BlinkDOMMatrixReadOnly.instance.d_Getter_(unwrap_jso(this));
+  num get d => _blink.BlinkDOMMatrixReadOnly.instance.d_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.e')
   @DocsEditable()
   @Experimental() // untriaged
-  num get e => _blink.BlinkDOMMatrixReadOnly.instance.e_Getter_(unwrap_jso(this));
+  num get e => _blink.BlinkDOMMatrixReadOnly.instance.e_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.f')
   @DocsEditable()
   @Experimental() // untriaged
-  num get f => _blink.BlinkDOMMatrixReadOnly.instance.f_Getter_(unwrap_jso(this));
+  num get f => _blink.BlinkDOMMatrixReadOnly.instance.f_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.is2D')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get is2D => _blink.BlinkDOMMatrixReadOnly.instance.is2D_Getter_(unwrap_jso(this));
+  bool get is2D => _blink.BlinkDOMMatrixReadOnly.instance.is2D_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.isIdentity')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get isIdentity => _blink.BlinkDOMMatrixReadOnly.instance.isIdentity_Getter_(unwrap_jso(this));
+  bool get isIdentity => _blink.BlinkDOMMatrixReadOnly.instance.isIdentity_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m11')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m11 => _blink.BlinkDOMMatrixReadOnly.instance.m11_Getter_(unwrap_jso(this));
+  num get m11 => _blink.BlinkDOMMatrixReadOnly.instance.m11_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m12')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m12 => _blink.BlinkDOMMatrixReadOnly.instance.m12_Getter_(unwrap_jso(this));
+  num get m12 => _blink.BlinkDOMMatrixReadOnly.instance.m12_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m13')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m13 => _blink.BlinkDOMMatrixReadOnly.instance.m13_Getter_(unwrap_jso(this));
+  num get m13 => _blink.BlinkDOMMatrixReadOnly.instance.m13_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m14')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m14 => _blink.BlinkDOMMatrixReadOnly.instance.m14_Getter_(unwrap_jso(this));
+  num get m14 => _blink.BlinkDOMMatrixReadOnly.instance.m14_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m21')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m21 => _blink.BlinkDOMMatrixReadOnly.instance.m21_Getter_(unwrap_jso(this));
+  num get m21 => _blink.BlinkDOMMatrixReadOnly.instance.m21_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m22')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m22 => _blink.BlinkDOMMatrixReadOnly.instance.m22_Getter_(unwrap_jso(this));
+  num get m22 => _blink.BlinkDOMMatrixReadOnly.instance.m22_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m23')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m23 => _blink.BlinkDOMMatrixReadOnly.instance.m23_Getter_(unwrap_jso(this));
+  num get m23 => _blink.BlinkDOMMatrixReadOnly.instance.m23_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m24')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m24 => _blink.BlinkDOMMatrixReadOnly.instance.m24_Getter_(unwrap_jso(this));
+  num get m24 => _blink.BlinkDOMMatrixReadOnly.instance.m24_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m31')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m31 => _blink.BlinkDOMMatrixReadOnly.instance.m31_Getter_(unwrap_jso(this));
+  num get m31 => _blink.BlinkDOMMatrixReadOnly.instance.m31_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m32')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m32 => _blink.BlinkDOMMatrixReadOnly.instance.m32_Getter_(unwrap_jso(this));
+  num get m32 => _blink.BlinkDOMMatrixReadOnly.instance.m32_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m33')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m33 => _blink.BlinkDOMMatrixReadOnly.instance.m33_Getter_(unwrap_jso(this));
+  num get m33 => _blink.BlinkDOMMatrixReadOnly.instance.m33_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m34')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m34 => _blink.BlinkDOMMatrixReadOnly.instance.m34_Getter_(unwrap_jso(this));
+  num get m34 => _blink.BlinkDOMMatrixReadOnly.instance.m34_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m41')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m41 => _blink.BlinkDOMMatrixReadOnly.instance.m41_Getter_(unwrap_jso(this));
+  num get m41 => _blink.BlinkDOMMatrixReadOnly.instance.m41_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m42')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m42 => _blink.BlinkDOMMatrixReadOnly.instance.m42_Getter_(unwrap_jso(this));
+  num get m42 => _blink.BlinkDOMMatrixReadOnly.instance.m42_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m43')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m43 => _blink.BlinkDOMMatrixReadOnly.instance.m43_Getter_(unwrap_jso(this));
+  num get m43 => _blink.BlinkDOMMatrixReadOnly.instance.m43_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.m44')
   @DocsEditable()
   @Experimental() // untriaged
-  num get m44 => _blink.BlinkDOMMatrixReadOnly.instance.m44_Getter_(unwrap_jso(this));
+  num get m44 => _blink.BlinkDOMMatrixReadOnly.instance.m44_Getter_(this);
   
   @DomName('DOMMatrixReadOnly.multiply')
   @DocsEditable()
   @Experimental() // untriaged
-  DomMatrix multiply(DomMatrix other) => wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.multiply_Callback_1_(unwrap_jso(this), unwrap_jso(other)));
+  DomMatrix multiply(DomMatrix other) => _blink.BlinkDOMMatrixReadOnly.instance.multiply_Callback_1_(this, other);
   
-  DomMatrix scale(num scale, [num ox, num oy]) {
-    if (oy != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scale_Callback_3_(unwrap_jso(this), scale, ox, oy));
+  DomMatrix scale(num scale, [num originX, num originY]) {
+    if (originY != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scale_Callback_3_(this, scale, originX, originY);
     }
-    if (ox != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scale_Callback_2_(unwrap_jso(this), scale, ox));
+    if (originX != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scale_Callback_2_(this, scale, originX);
     }
-    return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scale_Callback_1_(unwrap_jso(this), scale));
+    return _blink.BlinkDOMMatrixReadOnly.instance.scale_Callback_1_(this, scale);
   }
 
-  DomMatrix scale3d(num scale, [num ox, num oy, num oz]) {
-    if (oz != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scale3d_Callback_4_(unwrap_jso(this), scale, ox, oy, oz));
+  DomMatrix scale3d(num scale, [num originX, num originY, num originZ]) {
+    if (originZ != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scale3d_Callback_4_(this, scale, originX, originY, originZ);
     }
-    if (oy != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scale3d_Callback_3_(unwrap_jso(this), scale, ox, oy));
+    if (originY != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scale3d_Callback_3_(this, scale, originX, originY);
     }
-    if (ox != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scale3d_Callback_2_(unwrap_jso(this), scale, ox));
+    if (originX != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scale3d_Callback_2_(this, scale, originX);
     }
-    return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scale3d_Callback_1_(unwrap_jso(this), scale));
+    return _blink.BlinkDOMMatrixReadOnly.instance.scale3d_Callback_1_(this, scale);
   }
 
-  DomMatrix scaleNonUniform(num sx, [num sy, num sz, num ox, num oy, num oz]) {
-    if (oz != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_6_(unwrap_jso(this), sx, sy, sz, ox, oy, oz));
+  DomMatrix scaleNonUniform(num scaleX, [num scaleY, num scaleZn, num originX, num originY, num originZ]) {
+    if (originZ != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_6_(this, scaleX, scaleY, scaleZn, originX, originY, originZ);
     }
-    if (oy != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_5_(unwrap_jso(this), sx, sy, sz, ox, oy));
+    if (originY != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_5_(this, scaleX, scaleY, scaleZn, originX, originY);
     }
-    if (ox != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_4_(unwrap_jso(this), sx, sy, sz, ox));
+    if (originX != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_4_(this, scaleX, scaleY, scaleZn, originX);
     }
-    if (sz != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_3_(unwrap_jso(this), sx, sy, sz));
+    if (scaleZn != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_3_(this, scaleX, scaleY, scaleZn);
     }
-    if (sy != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_2_(unwrap_jso(this), sx, sy));
+    if (scaleY != null) {
+      return _blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_2_(this, scaleX, scaleY);
     }
-    return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_1_(unwrap_jso(this), sx));
+    return _blink.BlinkDOMMatrixReadOnly.instance.scaleNonUniform_Callback_1_(this, scaleX);
   }
 
   @DomName('DOMMatrixReadOnly.toFloat32Array')
   @DocsEditable()
   @Experimental() // untriaged
-  Float32List toFloat32Array() => _blink.BlinkDOMMatrixReadOnly.instance.toFloat32Array_Callback_0_(unwrap_jso(this));
+  Float32List toFloat32Array() => _blink.BlinkDOMMatrixReadOnly.instance.toFloat32Array_Callback_0_(this);
   
   @DomName('DOMMatrixReadOnly.toFloat64Array')
   @DocsEditable()
   @Experimental() // untriaged
-  Float64List toFloat64Array() => _blink.BlinkDOMMatrixReadOnly.instance.toFloat64Array_Callback_0_(unwrap_jso(this));
+  Float64List toFloat64Array() => _blink.BlinkDOMMatrixReadOnly.instance.toFloat64Array_Callback_0_(this);
   
   DomMatrix translate(num tx, num ty, [num tz]) {
     if (tz != null) {
-      return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.translate_Callback_3_(unwrap_jso(this), tx, ty, tz));
+      return _blink.BlinkDOMMatrixReadOnly.instance.translate_Callback_3_(this, tx, ty, tz);
     }
-    return wrap_jso(_blink.BlinkDOMMatrixReadOnly.instance.translate_Callback_2_(unwrap_jso(this), tx, ty));
+    return _blink.BlinkDOMMatrixReadOnly.instance.translate_Callback_2_(this, tx, ty);
   }
 
 }
@@ -11924,27 +11861,19 @@
   @DomName('DOMParser.DOMParser')
   @DocsEditable()
   factory DomParser() {
-    return wrap_jso(_blink.BlinkDOMParser.instance.constructorCallback_0_());
+    return _blink.BlinkDOMParser.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static DomParser internalCreateDomParser() {
-    return new DomParser._internalWrap();
-  }
-
-  factory DomParser._internalWrap() {
-    return new DomParser.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomParser.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DOMParser.parseFromString')
   @DocsEditable()
-  Document parseFromString(String str, String contentType) => wrap_jso(_blink.BlinkDOMParser.instance.parseFromString_Callback_2_(unwrap_jso(this), str, contentType));
+  Document parseFromString(String str, String type) => _blink.BlinkDOMParser.instance.parseFromString_Callback_2_(this, str, type);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -11964,32 +11893,31 @@
   @DomName('DOMPoint.DOMPoint')
   @DocsEditable()
   factory DomPoint([point_OR_x, num y, num z, num w]) {
-    if (point_OR_x == null && y == null && z == null && w == null) {
-      return wrap_jso(_blink.BlinkDOMPoint.instance.constructorCallback_0_());
-    }
     if ((point_OR_x is Map || point_OR_x == null) && y == null && z == null && w == null) {
       var point_1 = convertDartToNative_Dictionary(point_OR_x);
-      return wrap_jso(_blink.BlinkDOMPoint.instance.constructorCallback_1_(point_1));
+      return _blink.BlinkDOMPoint.instance.constructorCallback_1_(point_1);
+    }
+    if (point_OR_x == null && y == null && z == null && w == null) {
+      return _blink.BlinkDOMPoint.instance.constructorCallback_0_();
+    }
+    if ((point_OR_x is num || point_OR_x == null) && y == null && z == null && w == null) {
+      return _blink.BlinkDOMPoint.instance.constructorCallback_1_(point_OR_x);
     }
     if ((y is num || y == null) && (point_OR_x is num || point_OR_x == null) && z == null && w == null) {
-      return wrap_jso(_blink.BlinkDOMPoint.instance.constructorCallback_2_(point_OR_x, y));
+      return _blink.BlinkDOMPoint.instance.constructorCallback_2_(point_OR_x, y);
     }
     if ((z is num || z == null) && (y is num || y == null) && (point_OR_x is num || point_OR_x == null) && w == null) {
-      return wrap_jso(_blink.BlinkDOMPoint.instance.constructorCallback_3_(point_OR_x, y, z));
+      return _blink.BlinkDOMPoint.instance.constructorCallback_3_(point_OR_x, y, z);
     }
     if ((w is num || w == null) && (z is num || z == null) && (y is num || y == null) && (point_OR_x is num || point_OR_x == null)) {
-      return wrap_jso(_blink.BlinkDOMPoint.instance.constructorCallback_4_(point_OR_x, y, z, w));
+      return _blink.BlinkDOMPoint.instance.constructorCallback_4_(point_OR_x, y, z, w);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
 
   @Deprecated("Internal Use Only")
-  static DomPoint internalCreateDomPoint() {
-    return new DomPoint._internalWrap();
-  }
-
-  external factory DomPoint._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomPoint.internal_() : super.internal_();
@@ -12001,42 +11929,42 @@
   @DomName('DOMPoint.w')
   @DocsEditable()
   @Experimental() // untriaged
-  num get w => _blink.BlinkDOMPoint.instance.w_Getter_(unwrap_jso(this));
+  num get w => _blink.BlinkDOMPoint.instance.w_Getter_(this);
   
   @DomName('DOMPoint.w')
   @DocsEditable()
   @Experimental() // untriaged
-  set w(num value) => _blink.BlinkDOMPoint.instance.w_Setter_(unwrap_jso(this), value);
+  set w(num value) => _blink.BlinkDOMPoint.instance.w_Setter_(this, value);
   
   @DomName('DOMPoint.x')
   @DocsEditable()
   @Experimental() // untriaged
-  num get x => _blink.BlinkDOMPoint.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkDOMPoint.instance.x_Getter_(this);
   
   @DomName('DOMPoint.x')
   @DocsEditable()
   @Experimental() // untriaged
-  set x(num value) => _blink.BlinkDOMPoint.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkDOMPoint.instance.x_Setter_(this, value);
   
   @DomName('DOMPoint.y')
   @DocsEditable()
   @Experimental() // untriaged
-  num get y => _blink.BlinkDOMPoint.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkDOMPoint.instance.y_Getter_(this);
   
   @DomName('DOMPoint.y')
   @DocsEditable()
   @Experimental() // untriaged
-  set y(num value) => _blink.BlinkDOMPoint.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkDOMPoint.instance.y_Setter_(this, value);
   
   @DomName('DOMPoint.z')
   @DocsEditable()
   @Experimental() // untriaged
-  num get z => _blink.BlinkDOMPoint.instance.z_Getter_(unwrap_jso(this));
+  num get z => _blink.BlinkDOMPoint.instance.z_Getter_(this);
   
   @DomName('DOMPoint.z')
   @DocsEditable()
   @Experimental() // untriaged
-  set z(num value) => _blink.BlinkDOMPoint.instance.z_Setter_(unwrap_jso(this), value);
+  set z(num value) => _blink.BlinkDOMPoint.instance.z_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -12056,43 +11984,35 @@
   @DomName('DOMPointReadOnly.DOMPointReadOnly')
   @DocsEditable()
   factory DomPointReadOnly(num x, num y, num z, num w) {
-    return wrap_jso(_blink.BlinkDOMPointReadOnly.instance.constructorCallback_4_(x, y, z, w));
+    return _blink.BlinkDOMPointReadOnly.instance.constructorCallback_4_(x, y, z, w);
   }
 
+
   @Deprecated("Internal Use Only")
-  static DomPointReadOnly internalCreateDomPointReadOnly() {
-    return new DomPointReadOnly._internalWrap();
-  }
-
-  factory DomPointReadOnly._internalWrap() {
-    return new DomPointReadOnly.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomPointReadOnly.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DOMPointReadOnly.w')
   @DocsEditable()
   @Experimental() // untriaged
-  num get w => _blink.BlinkDOMPointReadOnly.instance.w_Getter_(unwrap_jso(this));
+  num get w => _blink.BlinkDOMPointReadOnly.instance.w_Getter_(this);
   
   @DomName('DOMPointReadOnly.x')
   @DocsEditable()
   @Experimental() // untriaged
-  num get x => _blink.BlinkDOMPointReadOnly.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkDOMPointReadOnly.instance.x_Getter_(this);
   
   @DomName('DOMPointReadOnly.y')
   @DocsEditable()
   @Experimental() // untriaged
-  num get y => _blink.BlinkDOMPointReadOnly.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkDOMPointReadOnly.instance.y_Getter_(this);
   
   @DomName('DOMPointReadOnly.z')
   @DocsEditable()
   @Experimental() // untriaged
-  num get z => _blink.BlinkDOMPointReadOnly.instance.z_Getter_(unwrap_jso(this));
+  num get z => _blink.BlinkDOMPointReadOnly.instance.z_Getter_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -12200,61 +12120,55 @@
   @DomName('DOMRectReadOnly.DOMRectReadOnly')
   @DocsEditable()
   factory DomRectReadOnly(num x, num y, num width, num height) {
-    return wrap_jso(_blink.BlinkDOMRectReadOnly.instance.constructorCallback_4_(x, y, width, height));
+    return _blink.BlinkDOMRectReadOnly.instance.constructorCallback_4_(x, y, width, height);
   }
 
+
   @Deprecated("Internal Use Only")
-  static DomRectReadOnly internalCreateDomRectReadOnly() {
-    return new DomRectReadOnly._internalWrap();
-  }
-
-  factory DomRectReadOnly._internalWrap() {
-    return new DomRectReadOnly.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomRectReadOnly.internal_() { }
 
-
   @DomName('DOMRectReadOnly.bottom')
   @DocsEditable()
   @Experimental() // untriaged
-  num get bottom => _blink.BlinkDOMRectReadOnly.instance.bottom_Getter_(unwrap_jso(this));
+  num get bottom => _blink.BlinkDOMRectReadOnly.instance.bottom_Getter_(this);
   
   @DomName('DOMRectReadOnly.height')
   @DocsEditable()
   @Experimental() // untriaged
-  num get height => _blink.BlinkDOMRectReadOnly.instance.height_Getter_(unwrap_jso(this));
+  num get height => _blink.BlinkDOMRectReadOnly.instance.height_Getter_(this);
   
   @DomName('DOMRectReadOnly.left')
   @DocsEditable()
   @Experimental() // untriaged
-  num get left => _blink.BlinkDOMRectReadOnly.instance.left_Getter_(unwrap_jso(this));
+  num get left => _blink.BlinkDOMRectReadOnly.instance.left_Getter_(this);
   
   @DomName('DOMRectReadOnly.right')
   @DocsEditable()
   @Experimental() // untriaged
-  num get right => _blink.BlinkDOMRectReadOnly.instance.right_Getter_(unwrap_jso(this));
+  num get right => _blink.BlinkDOMRectReadOnly.instance.right_Getter_(this);
   
   @DomName('DOMRectReadOnly.top')
   @DocsEditable()
   @Experimental() // untriaged
-  num get top => _blink.BlinkDOMRectReadOnly.instance.top_Getter_(unwrap_jso(this));
+  num get top => _blink.BlinkDOMRectReadOnly.instance.top_Getter_(this);
   
   @DomName('DOMRectReadOnly.width')
   @DocsEditable()
   @Experimental() // untriaged
-  num get width => _blink.BlinkDOMRectReadOnly.instance.width_Getter_(unwrap_jso(this));
+  num get width => _blink.BlinkDOMRectReadOnly.instance.width_Getter_(this);
   
   @DomName('DOMRectReadOnly.x')
   @DocsEditable()
   @Experimental() // untriaged
-  num get x => _blink.BlinkDOMRectReadOnly.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkDOMRectReadOnly.instance.x_Getter_(this);
   
   @DomName('DOMRectReadOnly.y')
   @DocsEditable()
   @Experimental() // untriaged
-  num get y => _blink.BlinkDOMRectReadOnly.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkDOMRectReadOnly.instance.y_Getter_(this);
   }
 
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -12272,11 +12186,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DomSettableTokenList internalCreateDomSettableTokenList() {
-    return new DomSettableTokenList._internalWrap();
-  }
-
-  external factory DomSettableTokenList._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomSettableTokenList.internal_() : super.internal_();
@@ -12284,15 +12194,16 @@
 
   @DomName('DOMSettableTokenList.value')
   @DocsEditable()
-  String get value => _blink.BlinkDOMSettableTokenList.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkDOMSettableTokenList.instance.value_Getter_(this);
   
   @DomName('DOMSettableTokenList.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkDOMSettableTokenList.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkDOMSettableTokenList.instance.value_Setter_(this, value);
   
-  @DomName('DOMSettableTokenList.__getter__')
+  @DomName('DOMSettableTokenList.item')
   @DocsEditable()
-  String __getter__(int index) => _blink.BlinkDOMSettableTokenList.instance.$__getter___Callback_1_(unwrap_jso(this), index);
+  @Experimental() // untriaged
+  String item(int index) => _blink.BlinkDOMSettableTokenList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -12308,32 +12219,24 @@
   // To suppress missing implicit constructor warnings.
   factory DomStringList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DomStringList internalCreateDomStringList() {
-    return new DomStringList._internalWrap();
-  }
 
-  factory DomStringList._internalWrap() {
-    return new DomStringList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomStringList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DOMStringList.length')
   @DocsEditable()
-  int get length => _blink.BlinkDOMStringList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkDOMStringList.instance.length_Getter_(this);
   
   String operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return _blink.BlinkDOMStringList.instance.item_Callback_1_(unwrap_jso(this), index);
+    return _nativeIndexedGetter(index);
   }
 
-  String _nativeIndexedGetter(int index) => _blink.BlinkDOMStringList.instance.item_Callback_1_(unwrap_jso(this), index);
+  String _nativeIndexedGetter(int index) => (_blink.BlinkDOMStringList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, String value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -12373,13 +12276,18 @@
   String elementAt(int index) => this[index];
   // -- end List<String> mixins.
 
+  @DomName('DOMStringList.__getter__')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String __getter__(int index) => _blink.BlinkDOMStringList.instance.$__getter___Callback_1_(this, index);
+  
   @DomName('DOMStringList.contains')
   @DocsEditable()
-  bool contains(String string) => _blink.BlinkDOMStringList.instance.contains_Callback_1_(unwrap_jso(this), string);
+  bool contains(String string) => _blink.BlinkDOMStringList.instance.contains_Callback_1_(this, string);
   
   @DomName('DOMStringList.item')
   @DocsEditable()
-  String item(int index) => _blink.BlinkDOMStringList.instance.item_Callback_1_(unwrap_jso(this), index);
+  String item(int index) => _blink.BlinkDOMStringList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -12395,38 +12303,39 @@
   // To suppress missing implicit constructor warnings.
   factory DomStringMap._() { throw new UnsupportedError("Not supported"); }
 
-  bool __delete__(index_OR_name) {
-    if ((index_OR_name is int || index_OR_name == null)) {
-      return _blink.BlinkDOMStringMap.instance.$__delete___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
-    }
+  void __delete__(index_OR_name) {
     if ((index_OR_name is String || index_OR_name == null)) {
-      return _blink.BlinkDOMStringMap.instance.$__delete___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
+      _blink.BlinkDOMStringMap.instance.$__delete___Callback_1_(this, index_OR_name);
+      return;
+    }
+    if ((index_OR_name is int || index_OR_name == null)) {
+      _blink.BlinkDOMStringMap.instance.$__delete___Callback_1_(this, index_OR_name);
+      return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  String __getter__(index_OR_name) {
-    if ((index_OR_name is int || index_OR_name == null)) {
-      return _blink.BlinkDOMStringMap.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
-    }
-    if ((index_OR_name is String || index_OR_name == null)) {
-      return _blink.BlinkDOMStringMap.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
-  }
+  @DomName('DOMStringMap.__getter__')
+  @DocsEditable()
+  String __getter__(int index);
 
   void __setter__(index_OR_name, String value) {
-    if ((value is String || value == null) && (index_OR_name is int || index_OR_name == null)) {
-      _blink.BlinkDOMStringMap.instance.$__setter___Callback_2_(unwrap_jso(this), unwrap_jso(index_OR_name), value);
+    if ((value is String || value == null) && (index_OR_name is String || index_OR_name == null)) {
+      _blink.BlinkDOMStringMap.instance.$__setter___Callback_2_(this, index_OR_name, value);
       return;
     }
-    if ((value is String || value == null) && (index_OR_name is String || index_OR_name == null)) {
-      _blink.BlinkDOMStringMap.instance.$__setter___Callback_2_(unwrap_jso(this), unwrap_jso(index_OR_name), value);
+    if ((value is String || value == null) && (index_OR_name is int || index_OR_name == null)) {
+      _blink.BlinkDOMStringMap.instance.$__setter___Callback_2_(this, index_OR_name, value);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
+  @DomName('DOMStringMap.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String item(String name);
+
 }
 // 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
@@ -12441,48 +12350,40 @@
   // To suppress missing implicit constructor warnings.
   factory DomTokenList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DomTokenList internalCreateDomTokenList() {
-    return new DomTokenList._internalWrap();
-  }
 
-  factory DomTokenList._internalWrap() {
-    return new DomTokenList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DomTokenList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('DOMTokenList.length')
   @DocsEditable()
-  int get length => _blink.BlinkDOMTokenList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkDOMTokenList.instance.length_Getter_(this);
   
   @DomName('DOMTokenList.add')
   @DocsEditable()
   @Experimental() // untriaged
-  void add(String tokens) => _blink.BlinkDOMTokenList.instance.add_Callback_1_(unwrap_jso(this), tokens);
+  void add(String tokens) => _blink.BlinkDOMTokenList.instance.add_Callback_1_(this, tokens);
   
   @DomName('DOMTokenList.contains')
   @DocsEditable()
-  bool contains(String token) => _blink.BlinkDOMTokenList.instance.contains_Callback_1_(unwrap_jso(this), token);
+  bool contains(String token) => _blink.BlinkDOMTokenList.instance.contains_Callback_1_(this, token);
   
   @DomName('DOMTokenList.item')
   @DocsEditable()
-  String item(int index) => _blink.BlinkDOMTokenList.instance.item_Callback_1_(unwrap_jso(this), index);
+  String item(int index) => _blink.BlinkDOMTokenList.instance.item_Callback_1_(this, index);
   
   @DomName('DOMTokenList.remove')
   @DocsEditable()
   @Experimental() // untriaged
-  void remove(String tokens) => _blink.BlinkDOMTokenList.instance.remove_Callback_1_(unwrap_jso(this), tokens);
+  void remove(String tokens) => _blink.BlinkDOMTokenList.instance.remove_Callback_1_(this, tokens);
   
   bool toggle(String token, [bool force]) {
     if (force != null) {
-      return _blink.BlinkDOMTokenList.instance.toggle_Callback_2_(unwrap_jso(this), token, force);
+      return _blink.BlinkDOMTokenList.instance.toggle_Callback_2_(this, token, force);
     }
-    return _blink.BlinkDOMTokenList.instance.toggle_Callback_1_(unwrap_jso(this), token);
+    return _blink.BlinkDOMTokenList.instance.toggle_Callback_1_(this, token);
   }
 
 }
@@ -12490,6 +12391,28 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('EffectModel')
+@Experimental() // untriaged
+class EffectModel extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory EffectModel._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  EffectModel.internal_() { }
+
+}
+// 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.
+
 
 class _ChildrenElementList extends ListBase<Element>
     implements NodeListWrapper {
@@ -12792,12 +12715,12 @@
   /// Stream of `copy` events handled by this [Element].
   @DomName('Element.oncopy')
   @DocsEditable()
-  ElementStream<Event> get onCopy;
+  ElementStream<ClipboardEvent> get onCopy;
 
   /// Stream of `cut` events handled by this [Element].
   @DomName('Element.oncut')
   @DocsEditable()
-  ElementStream<Event> get onCut;
+  ElementStream<ClipboardEvent> get onCut;
 
   /// Stream of `doubleclick` events handled by this [Element].
   @DomName('Element.ondblclick')
@@ -13045,7 +12968,7 @@
   /// Stream of `paste` events handled by this [Element].
   @DomName('Element.onpaste')
   @DocsEditable()
-  ElementStream<Event> get onPaste;
+  ElementStream<ClipboardEvent> get onPaste;
 
   @DomName('Element.onpause')
   @DocsEditable()
@@ -13328,12 +13251,12 @@
   /// Stream of `copy` events handled by this [Element].
   @DomName('Element.oncopy')
   @DocsEditable()
-  ElementStream<Event> get onCopy => Element.copyEvent._forElementList(this);
+  ElementStream<ClipboardEvent> get onCopy => Element.copyEvent._forElementList(this);
 
   /// Stream of `cut` events handled by this [Element].
   @DomName('Element.oncut')
   @DocsEditable()
-  ElementStream<Event> get onCut => Element.cutEvent._forElementList(this);
+  ElementStream<ClipboardEvent> get onCut => Element.cutEvent._forElementList(this);
 
   /// Stream of `doubleclick` events handled by this [Element].
   @DomName('Element.ondblclick')
@@ -13581,7 +13504,7 @@
   /// Stream of `paste` events handled by this [Element].
   @DomName('Element.onpaste')
   @DocsEditable()
-  ElementStream<Event> get onPaste => Element.pasteEvent._forElementList(this);
+  ElementStream<ClipboardEvent> get onPaste => Element.pasteEvent._forElementList(this);
 
   @DomName('Element.onpause')
   @DocsEditable()
@@ -13748,7 +13671,7 @@
  * An abstract class, which all HTML elements extend.
  */
 @DomName('Element')
-class Element extends Node implements GlobalEventHandlers, ParentNode, ChildNode {
+class Element extends Node implements NonDocumentTypeChildNode, GlobalEventHandlers, ParentNode, ChildNode {
 
   /**
    * Creates an HTML element from a valid fragment of HTML.
@@ -13795,7 +13718,11 @@
    *     }
    *     document.registerElement('x-custom', CustomElement);
    */
-  Element.created() : super._created();
+  Element.created() : super._created() {
+    // Validate that this is a custom element & possibly perform additional
+    // initialization.
+    _blink.Blink_Utils.initializeCustomElement(this);
+  }
 
   /**
    * Creates the HTML element specified by the tag name.
@@ -14211,7 +14138,7 @@
    * on which the method is called, and calls the play() method of the
    * AnimationTimeline object of the document timeline of the node document
    * of the element, passing the newly created AnimationEffect as the argument
-   * to the method. Returns an AnimationPlayer for the effect.
+   * to the method. Returns an Animation for the effect.
    *
    * Examples
    *
@@ -14230,7 +14157,7 @@
   **/
   @Experimental()
   @SupportedBrowser(SupportedBrowser.CHROME, '36')
-  AnimationPlayer animate(Iterable<Map<String, dynamic>> frames, [timing]) {
+  Animation animate(Iterable<Map<String, dynamic>> frames, [timing]) {
     if (frames is! Iterable || !(frames.every((x) => x is Map))) {
       throw new ArgumentError("The frames parameter should be a List of Maps "
           "with frame information");
@@ -14684,24 +14611,20 @@
   static var _htmlCollection = js.context["HTMLCollection"];
   static var _nodeList = js.context["NodeList"];
 
+  static const _evilAttributeNames =
+      const ['attributes', 'lastChild', 'children', 'childNodes'];
+
   static bool _hasCorruptedAttributes(Element element) {
-    var attributes = unwrap_jso(element)["attributes"];
-    if (!attributes.instanceof(_namedNodeMap)) {
-      return true;
-    }
-    var childNodes = unwrap_jso(element.childNodes);
-    var length = childNodes["length"];
-    var lastChild = unwrap_jso(element.lastChild);
-    if (null != lastChild &&
-        lastChild != childNodes[length - 1]) {
-      return true;
-    }
-    var children = unwrap_jso(element._children);
-    if (null != children) { // On Safari, children can apparently be null.
-      if (!children.instanceof(_htmlCollection) ||
-          children.instanceof(_nodeList)) {
-	return true;
-      }
+    // We have trusted access to children and to attributes of objects,
+    // so we can inspect directly for attempts at DOM clobbering.
+    var child = element.firstChild;
+    while( child != null)  {
+      if (child is Element) {
+      for (var attributeName in ["id", "name"]) {
+        var childAttribute = child.getAttribute(attributeName);
+        if (_evilAttributeNames.contains(childAttribute)) return true;
+      }}
+      child = child.nextNode;
     }
     return false;
   }
@@ -14710,74 +14633,60 @@
   static bool _hasCorruptedAttributesAdditionalCheck(Element element) => false;
 
   static String _safeTagName(element) {
-    String result = 'element tag unavailable';
     try {
-      if (element.tagName is String) {
-        result = element.tagName;
-      }
+      // Safe as we plumb directly to a C++ native method.
+      return element.tagName;
     } catch (e) {}
-    return result;
+    return 'element tag unavailable';
   }
 
   // Need to explicitly delegate because Element is no longer abstract for Dartium.
-  bool get isContentEditable => _blink.BlinkHTMLElement.instance.isContentEditable_Getter_(unwrap_jso(this));
-  void click() => _blink.BlinkHTMLElement.instance.click_Callback_0_(unwrap_jso(this));
+  bool get isContentEditable => _blink.BlinkHTMLElement.instance.isContentEditable_Getter_(this);
+  void click() => _blink.BlinkHTMLElement.instance.click_Callback_0_(this);
+
+  @DomName('Element.offsetParent')
+  @DocsEditable()
+  Element get offsetParent => _blink.BlinkElement.instance.offsetParent_Getter_(this);
 
   @DomName('Element.offsetHeight')
   @DocsEditable()
-  int get offsetHeight => _blink.BlinkElement.instance.offsetHeight_Getter_(unwrap_jso(this)).round();
+  int get offsetHeight => _blink.BlinkElement.instance.offsetHeight_Getter_(this);
 
   @DomName('Element.offsetLeft')
   @DocsEditable()
-  int get offsetLeft => _blink.BlinkElement.instance.offsetLeft_Getter_(unwrap_jso(this)).round();
+  int get offsetLeft => _blink.BlinkElement.instance.offsetLeft_Getter_(this);
 
   @DomName('Element.offsetTop')
   @DocsEditable()
-  int get offsetTop => _blink.BlinkElement.instance.offsetTop_Getter_(unwrap_jso(this)).round();
+  int get offsetTop => _blink.BlinkElement.instance.offsetTop_Getter_(this);
 
   @DomName('Element.offsetWidth')
   @DocsEditable()
-  int get offsetWidth => _blink.BlinkElement.instance.offsetWidth_Getter_(unwrap_jso(this)).round();
-
-  @DomName('Element.clientHeight')
-  @DocsEditable()
-  int get clientHeight => _blink.BlinkElement.instance.clientHeight_Getter_(unwrap_jso(this)).round();
-
-  @DomName('Element.clientLeft')
-  @DocsEditable()
-  int get clientLeft => _blink.BlinkElement.instance.clientLeft_Getter_(unwrap_jso(this)).round();
-
-  @DomName('Element.clientTop')
-  @DocsEditable()
-  int get clientTop => _blink.BlinkElement.instance.clientTop_Getter_(unwrap_jso(this)).round();
-
-  @DomName('Element.clientWidth')
-  @DocsEditable()
-  int get clientWidth => _blink.BlinkElement.instance.clientWidth_Getter_(unwrap_jso(this)).round();
+  int get offsetWidth => _blink.BlinkElement.instance.offsetWidth_Getter_(this);
 
   @DomName('Element.scrollHeight')
   @DocsEditable()
-  int get scrollHeight => _blink.BlinkElement.instance.scrollHeight_Getter_(unwrap_jso(this)).round();
+  int get scrollHeight => _blink.BlinkElement.instance.scrollHeight_Getter_(this).round();
 
   @DomName('Element.scrollLeft')
   @DocsEditable()
-  int get scrollLeft => _blink.BlinkElement.instance.scrollLeft_Getter_(unwrap_jso(this)).round();
+  int get scrollLeft => _blink.BlinkElement.instance.scrollLeft_Getter_(this).round();
 
   @DomName('Element.scrollLeft')
   @DocsEditable()
-  set scrollLeft(int value) => _blink.BlinkElement.instance.scrollLeft_Setter_(unwrap_jso(this), value.round());
+  set scrollLeft(int value) => _blink.BlinkElement.instance.scrollLeft_Setter_(this, value.round());
 
   @DomName('Element.scrollTop')
   @DocsEditable()
-  int get scrollTop => _blink.BlinkElement.instance.scrollTop_Getter_(unwrap_jso(this)).round();
+  int get scrollTop => _blink.BlinkElement.instance.scrollTop_Getter_(this).round();
 
   @DomName('Element.scrollTop')
   @DocsEditable()
-  set scrollTop(int value) => _blink.BlinkElement.instance.scrollTop_Setter_(unwrap_jso(this), value.round());
+  set scrollTop(int value) => _blink.BlinkElement.instance.scrollTop_Setter_(this, value.round());
 
   @DomName('Element.scrollWidth')
   @DocsEditable()
-  int get scrollWidth => _blink.BlinkElement.instance.scrollWidth_Getter_(unwrap_jso(this)).round();
+  int get scrollWidth => _blink.BlinkElement.instance.scrollWidth_Getter_(this).round();
 
   // To suppress missing implicit constructor warnings.
   factory Element._() { throw new UnsupportedError("Not supported"); }
@@ -14880,7 +14789,7 @@
    */
   @DomName('Element.copyEvent')
   @DocsEditable()
-  static const EventStreamProvider<Event> copyEvent = const EventStreamProvider<Event>('copy');
+  static const EventStreamProvider<ClipboardEvent> copyEvent = const EventStreamProvider<ClipboardEvent>('copy');
 
   /**
    * Static factory designed to expose `cut` events to event
@@ -14890,7 +14799,7 @@
    */
   @DomName('Element.cutEvent')
   @DocsEditable()
-  static const EventStreamProvider<Event> cutEvent = const EventStreamProvider<Event>('cut');
+  static const EventStreamProvider<ClipboardEvent> cutEvent = const EventStreamProvider<ClipboardEvent>('cut');
 
   /**
    * Static factory designed to expose `doubleclick` events to event
@@ -15221,7 +15130,7 @@
    */
   @DomName('Element.pasteEvent')
   @DocsEditable()
-  static const EventStreamProvider<Event> pasteEvent = const EventStreamProvider<Event>('paste');
+  static const EventStreamProvider<ClipboardEvent> pasteEvent = const EventStreamProvider<ClipboardEvent>('paste');
 
   @DomName('Element.pauseEvent')
   @DocsEditable()
@@ -15452,11 +15361,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Element internalCreateElement() {
-    return new Element._internalWrap();
-  }
-
-  external factory Element._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Element.internal_() : super.internal_();
@@ -15476,6 +15381,8 @@
 
   bool spellcheck;
 
+  CssStyleDeclaration get style;
+
   int tabIndex;
 
   String title;
@@ -15484,156 +15391,154 @@
 
   String dropzone;
 
+  void blur();
+
+  void focus();
+
   @DomName('Element.attributes')
   @DocsEditable()
-  _NamedNodeMap get _attributes => wrap_jso(_blink.BlinkElement.instance.attributes_Getter_(unwrap_jso(this)));
+  _NamedNodeMap get _attributes => _blink.BlinkElement.instance.attributes_Getter_(this);
   
   @DomName('Element.className')
   @DocsEditable()
-  String get className => _blink.BlinkElement.instance.className_Getter_(unwrap_jso(this));
+  String get className => _blink.BlinkElement.instance.className_Getter_(this);
   
   @DomName('Element.className')
   @DocsEditable()
-  set className(String value) => _blink.BlinkElement.instance.className_Setter_(unwrap_jso(this), value);
+  set className(String value) => _blink.BlinkElement.instance.className_Setter_(this, value);
   
   @DomName('Element.clientHeight')
   @DocsEditable()
-  int get _clientHeight => _blink.BlinkElement.instance.clientHeight_Getter_(unwrap_jso(this));
+  int get clientHeight => _blink.BlinkElement.instance.clientHeight_Getter_(this);
   
   @DomName('Element.clientLeft')
   @DocsEditable()
-  int get _clientLeft => _blink.BlinkElement.instance.clientLeft_Getter_(unwrap_jso(this));
+  int get clientLeft => _blink.BlinkElement.instance.clientLeft_Getter_(this);
   
   @DomName('Element.clientTop')
   @DocsEditable()
-  int get _clientTop => _blink.BlinkElement.instance.clientTop_Getter_(unwrap_jso(this));
+  int get clientTop => _blink.BlinkElement.instance.clientTop_Getter_(this);
   
   @DomName('Element.clientWidth')
   @DocsEditable()
-  int get _clientWidth => _blink.BlinkElement.instance.clientWidth_Getter_(unwrap_jso(this));
+  int get clientWidth => _blink.BlinkElement.instance.clientWidth_Getter_(this);
+  
+  @DomName('Element.computedName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get computedName => _blink.BlinkElement.instance.computedName_Getter_(this);
+  
+  @DomName('Element.computedRole')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get computedRole => _blink.BlinkElement.instance.computedRole_Getter_(this);
   
   @DomName('Element.id')
   @DocsEditable()
-  String get id => _blink.BlinkElement.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkElement.instance.id_Getter_(this);
   
   @DomName('Element.id')
   @DocsEditable()
-  set id(String value) => _blink.BlinkElement.instance.id_Setter_(unwrap_jso(this), value);
+  set id(String value) => _blink.BlinkElement.instance.id_Setter_(this, value);
   
   @DomName('Element.innerHTML')
   @DocsEditable()
-  String get _innerHtml => _blink.BlinkElement.instance.innerHTML_Getter_(unwrap_jso(this));
+  String get _innerHtml => _blink.BlinkElement.instance.innerHTML_Getter_(this);
   
   @DomName('Element.innerHTML')
   @DocsEditable()
-  set _innerHtml(String value) => _blink.BlinkElement.instance.innerHTML_Setter_(unwrap_jso(this), value);
+  set _innerHtml(String value) => _blink.BlinkElement.instance.innerHTML_Setter_(this, value);
   
   @DomName('Element.localName')
   @DocsEditable()
   @Experimental() // untriaged
-  String get _localName => _blink.BlinkElement.instance.localName_Getter_(unwrap_jso(this));
+  String get _localName => _blink.BlinkElement.instance.localName_Getter_(this);
   
   @DomName('Element.namespaceURI')
   @DocsEditable()
   @Experimental() // untriaged
-  String get _namespaceUri => _blink.BlinkElement.instance.namespaceURI_Getter_(unwrap_jso(this));
-  
-  @DomName('Element.offsetHeight')
-  @DocsEditable()
-  int get _offsetHeight => _blink.BlinkElement.instance.offsetHeight_Getter_(unwrap_jso(this));
-  
-  @DomName('Element.offsetLeft')
-  @DocsEditable()
-  int get _offsetLeft => _blink.BlinkElement.instance.offsetLeft_Getter_(unwrap_jso(this));
-  
-  @DomName('Element.offsetParent')
-  @DocsEditable()
-  Element get offsetParent => wrap_jso(_blink.BlinkElement.instance.offsetParent_Getter_(unwrap_jso(this)));
-  
-  @DomName('Element.offsetTop')
-  @DocsEditable()
-  int get _offsetTop => _blink.BlinkElement.instance.offsetTop_Getter_(unwrap_jso(this));
-  
-  @DomName('Element.offsetWidth')
-  @DocsEditable()
-  int get _offsetWidth => _blink.BlinkElement.instance.offsetWidth_Getter_(unwrap_jso(this));
+  String get _namespaceUri => _blink.BlinkElement.instance.namespaceURI_Getter_(this);
   
   @DomName('Element.outerHTML')
   @DocsEditable()
-  String get outerHtml => _blink.BlinkElement.instance.outerHTML_Getter_(unwrap_jso(this));
+  String get outerHtml => _blink.BlinkElement.instance.outerHTML_Getter_(this);
   
   @DomName('Element.scrollHeight')
   @DocsEditable()
-  int get _scrollHeight => _blink.BlinkElement.instance.scrollHeight_Getter_(unwrap_jso(this));
+  int get _scrollHeight => _blink.BlinkElement.instance.scrollHeight_Getter_(this);
   
   @DomName('Element.scrollLeft')
   @DocsEditable()
-  num get _scrollLeft => _blink.BlinkElement.instance.scrollLeft_Getter_(unwrap_jso(this));
+  num get _scrollLeft => _blink.BlinkElement.instance.scrollLeft_Getter_(this);
   
   @DomName('Element.scrollLeft')
   @DocsEditable()
-  set _scrollLeft(num value) => _blink.BlinkElement.instance.scrollLeft_Setter_(unwrap_jso(this), value);
+  set _scrollLeft(num value) => _blink.BlinkElement.instance.scrollLeft_Setter_(this, value);
   
   @DomName('Element.scrollTop')
   @DocsEditable()
-  num get _scrollTop => _blink.BlinkElement.instance.scrollTop_Getter_(unwrap_jso(this));
+  num get _scrollTop => _blink.BlinkElement.instance.scrollTop_Getter_(this);
   
   @DomName('Element.scrollTop')
   @DocsEditable()
-  set _scrollTop(num value) => _blink.BlinkElement.instance.scrollTop_Setter_(unwrap_jso(this), value);
+  set _scrollTop(num value) => _blink.BlinkElement.instance.scrollTop_Setter_(this, value);
   
   @DomName('Element.scrollWidth')
   @DocsEditable()
-  int get _scrollWidth => _blink.BlinkElement.instance.scrollWidth_Getter_(unwrap_jso(this));
+  int get _scrollWidth => _blink.BlinkElement.instance.scrollWidth_Getter_(this);
   
   @DomName('Element.shadowRoot')
   @DocsEditable()
   // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#api-shadow-aware-create-shadow-root
   @Experimental()
-  ShadowRoot get shadowRoot => wrap_jso(_blink.BlinkElement.instance.shadowRoot_Getter_(unwrap_jso(this)));
-  
-  @DomName('Element.style')
-  @DocsEditable()
-  CssStyleDeclaration get style => wrap_jso(_blink.BlinkElement.instance.style_Getter_(unwrap_jso(this)));
+  ShadowRoot get shadowRoot => _blink.BlinkElement.instance.shadowRoot_Getter_(this);
   
   @DomName('Element.tagName')
   @DocsEditable()
-  String get tagName => _blink.BlinkElement.instance.tagName_Getter_(unwrap_jso(this));
+  String get tagName => _blink.BlinkElement.instance.tagName_Getter_(this);
   
-  @DomName('Element.animate')
+  Animation _animate(Object effect, [timing]) {
+    if (effect != null && timing == null) {
+      return _blink.BlinkElement.instance.animate_Callback_1_(this, effect);
+    }
+    if ((timing is num) && effect != null) {
+      return _blink.BlinkElement.instance.animate_Callback_2_(this, effect, timing);
+    }
+    if (timing != null && effect != null) {
+      return _blink.BlinkElement.instance.animate_Callback_2_(this, effect, timing);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('Element.closest')
   @DocsEditable()
   @Experimental() // untriaged
-  AnimationPlayer _animate(Object effect, [Object timing]) => wrap_jso(_blink.BlinkElement.instance.animate_Callback_2_(unwrap_jso(this), effect, timing));
+  Element closest(String selectors) => _blink.BlinkElement.instance.closest_Callback_1_(this, selectors);
   
-  @DomName('Element.blur')
-  @DocsEditable()
-  void blur() => _blink.BlinkElement.instance.blur_Callback_0_(unwrap_jso(this));
-  
-  @DomName('Element.createShadowRoot')
-  @DocsEditable()
-  @SupportedBrowser(SupportedBrowser.CHROME, '25')
-  @Experimental()
-  // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#api-shadow-aware-create-shadow-root
-  ShadowRoot createShadowRoot() => wrap_jso(_blink.BlinkElement.instance.createShadowRoot_Callback_0_(unwrap_jso(this)));
-  
-  @DomName('Element.focus')
-  @DocsEditable()
-  void focus() => _blink.BlinkElement.instance.focus_Callback_0_(unwrap_jso(this));
-  
-  @DomName('Element.getAnimationPlayers')
+  ShadowRoot createShadowRoot([Map shadowRootInitDict]) {
+    if (shadowRootInitDict == null) {
+      return _blink.BlinkElement.instance.createShadowRoot_Callback_0_(this);
+    }
+    if ((shadowRootInitDict is Map)) {
+      return _blink.BlinkElement.instance.createShadowRoot_Callback_1_(this, convertDartToNative_Dictionary(shadowRootInitDict));
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('Element.getAnimations')
   @DocsEditable()
   @Experimental() // untriaged
-  List<AnimationPlayer> getAnimationPlayers() => wrap_jso(_blink.BlinkElement.instance.getAnimationPlayers_Callback_0_(unwrap_jso(this)));
+  List<Animation> getAnimations() => (_blink.BlinkElement.instance.getAnimations_Callback_0_(this));
   
   @DomName('Element.getAttribute')
   @DocsEditable()
   @Experimental() // untriaged
-  String getAttribute(String name) => _blink.BlinkElement.instance.getAttribute_Callback_1_(unwrap_jso(this), name);
+  String getAttribute(String name) => _blink.BlinkElement.instance.getAttribute_Callback_1_(this, name);
   
   @DomName('Element.getAttributeNS')
   @DocsEditable()
   @Experimental() // untriaged
-  String getAttributeNS(String namespaceURI, String localName) => _blink.BlinkElement.instance.getAttributeNS_Callback_2_(unwrap_jso(this), namespaceURI, localName);
+  String getAttributeNS(String namespaceURI, String localName) => _blink.BlinkElement.instance.getAttributeNS_Callback_2_(this, namespaceURI, localName);
   
   /**
    * Returns the smallest bounding rectangle that encompasses this element's
@@ -15649,7 +15554,7 @@
    */
   @DomName('Element.getBoundingClientRect')
   @DocsEditable()
-  Rectangle getBoundingClientRect() => make_dart_rectangle(_blink.BlinkElement.instance.getBoundingClientRect_Callback_0_(unwrap_jso(this)));
+  Rectangle getBoundingClientRect() => make_dart_rectangle(_blink.BlinkElement.instance.getBoundingClientRect_Callback_0_(this));
   
   /**
    * Returns a list of bounding rectangles for each box associated with this
@@ -15665,7 +15570,7 @@
    */
   @DomName('Element.getClientRects')
   @DocsEditable()
-  List<Rectangle> getClientRects() => wrap_jso(_blink.BlinkElement.instance.getClientRects_Callback_0_(unwrap_jso(this)));
+  List<Rectangle> getClientRects() => _blink.BlinkElement.instance.getClientRects_Callback_0_(this);
   
   /**
    * Returns a list of shadow DOM insertion points to which this element is
@@ -15680,7 +15585,7 @@
   @DomName('Element.getDestinationInsertionPoints')
   @DocsEditable()
   @Experimental() // untriaged
-  List<Node> getDestinationInsertionPoints() => wrap_jso(_blink.BlinkElement.instance.getDestinationInsertionPoints_Callback_0_(unwrap_jso(this)));
+  List<Node> getDestinationInsertionPoints() => (_blink.BlinkElement.instance.getDestinationInsertionPoints_Callback_0_(this));
   
   /**
    * Returns a list of nodes with the given class name inside this element.
@@ -15693,111 +15598,169 @@
    */
   @DomName('Element.getElementsByClassName')
   @DocsEditable()
-  List<Node> getElementsByClassName(String classNames) => wrap_jso(_blink.BlinkElement.instance.getElementsByClassName_Callback_1_(unwrap_jso(this), classNames));
+  List<Node> getElementsByClassName(String classNames) => (_blink.BlinkElement.instance.getElementsByClassName_Callback_1_(this, classNames));
   
   @DomName('Element.getElementsByTagName')
   @DocsEditable()
-  List<Node> _getElementsByTagName(String name) => wrap_jso(_blink.BlinkElement.instance.getElementsByTagName_Callback_1_(unwrap_jso(this), name));
+  List<Node> _getElementsByTagName(String localName) => (_blink.BlinkElement.instance.getElementsByTagName_Callback_1_(this, localName));
   
   @DomName('Element.hasAttribute')
   @DocsEditable()
-  bool _hasAttribute(String name) => _blink.BlinkElement.instance.hasAttribute_Callback_1_(unwrap_jso(this), name);
+  bool _hasAttribute(String name) => _blink.BlinkElement.instance.hasAttribute_Callback_1_(this, name);
   
   @DomName('Element.hasAttributeNS')
   @DocsEditable()
-  bool _hasAttributeNS(String namespaceURI, String localName) => _blink.BlinkElement.instance.hasAttributeNS_Callback_2_(unwrap_jso(this), namespaceURI, localName);
+  bool _hasAttributeNS(String namespaceURI, String localName) => _blink.BlinkElement.instance.hasAttributeNS_Callback_2_(this, namespaceURI, localName);
   
   @DomName('Element.insertAdjacentElement')
   @DocsEditable()
   @Experimental() // untriaged
-  Element insertAdjacentElement(String where, Element element) => wrap_jso(_blink.BlinkElement.instance.insertAdjacentElement_Callback_2_(unwrap_jso(this), where, unwrap_jso(element)));
+  Element insertAdjacentElement(String where, Element element) => _blink.BlinkElement.instance.insertAdjacentElement_Callback_2_(this, where, element);
   
   @DomName('Element.insertAdjacentHTML')
   @DocsEditable()
   @Experimental() // untriaged
-  void _insertAdjacentHtml(String where, String html) => _blink.BlinkElement.instance.insertAdjacentHTML_Callback_2_(unwrap_jso(this), where, html);
+  void _insertAdjacentHtml(String position, String text) => _blink.BlinkElement.instance.insertAdjacentHTML_Callback_2_(this, position, text);
   
   @DomName('Element.insertAdjacentText')
   @DocsEditable()
   @Experimental() // untriaged
-  void insertAdjacentText(String where, String text) => _blink.BlinkElement.instance.insertAdjacentText_Callback_2_(unwrap_jso(this), where, text);
+  void insertAdjacentText(String where, String text) => _blink.BlinkElement.instance.insertAdjacentText_Callback_2_(this, where, text);
   
   @DomName('Element.matches')
   @DocsEditable()
   @Experimental() // untriaged
-  bool matches(String selectors) => _blink.BlinkElement.instance.matches_Callback_1_(unwrap_jso(this), selectors);
+  bool matches(String selectors) => _blink.BlinkElement.instance.matches_Callback_1_(this, selectors);
   
   @DomName('Element.removeAttribute')
   @DocsEditable()
-  void _removeAttribute(String name) => _blink.BlinkElement.instance.removeAttribute_Callback_1_(unwrap_jso(this), name);
+  void _removeAttribute(String name) => _blink.BlinkElement.instance.removeAttribute_Callback_1_(this, name);
   
   @DomName('Element.removeAttributeNS')
   @DocsEditable()
-  void _removeAttributeNS(String namespaceURI, String localName) => _blink.BlinkElement.instance.removeAttributeNS_Callback_2_(unwrap_jso(this), namespaceURI, localName);
+  void _removeAttributeNS(String namespaceURI, String localName) => _blink.BlinkElement.instance.removeAttributeNS_Callback_2_(this, namespaceURI, localName);
   
   @DomName('Element.requestFullscreen')
   @DocsEditable()
   @Experimental() // untriaged
-  void requestFullscreen() => _blink.BlinkElement.instance.requestFullscreen_Callback_0_(unwrap_jso(this));
+  void requestFullscreen() => _blink.BlinkElement.instance.requestFullscreen_Callback_0_(this);
   
   @DomName('Element.requestPointerLock')
   @DocsEditable()
   @Experimental() // untriaged
-  void requestPointerLock() => _blink.BlinkElement.instance.requestPointerLock_Callback_0_(unwrap_jso(this));
+  void requestPointerLock() => _blink.BlinkElement.instance.requestPointerLock_Callback_0_(this);
   
-  void _scrollIntoView([bool alignWithTop]) {
-    if (alignWithTop != null) {
-      _blink.BlinkElement.instance.scrollIntoView_Callback_1_(unwrap_jso(this), alignWithTop);
+  void scroll([options_OR_x, num y]) {
+    if (options_OR_x == null && y == null) {
+      _blink.BlinkElement.instance.scroll_Callback_0_(this);
       return;
     }
-    _blink.BlinkElement.instance.scrollIntoView_Callback_0_(unwrap_jso(this));
+    if ((options_OR_x is Map) && y == null) {
+      _blink.BlinkElement.instance.scroll_Callback_1_(this, options_OR_x);
+      return;
+    }
+    if ((y is num) && (options_OR_x is num)) {
+      _blink.BlinkElement.instance.scroll_Callback_2_(this, options_OR_x, y);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void scrollBy([options_OR_x, num y]) {
+    if (options_OR_x == null && y == null) {
+      _blink.BlinkElement.instance.scrollBy_Callback_0_(this);
+      return;
+    }
+    if ((options_OR_x is Map) && y == null) {
+      _blink.BlinkElement.instance.scrollBy_Callback_1_(this, options_OR_x);
+      return;
+    }
+    if ((y is num) && (options_OR_x is num)) {
+      _blink.BlinkElement.instance.scrollBy_Callback_2_(this, options_OR_x, y);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void _scrollIntoView([bool alignWithTop]) {
+    if (alignWithTop != null) {
+      _blink.BlinkElement.instance.scrollIntoView_Callback_1_(this, alignWithTop);
+      return;
+    }
+    _blink.BlinkElement.instance.scrollIntoView_Callback_0_(this);
     return;
   }
 
   void _scrollIntoViewIfNeeded([bool centerIfNeeded]) {
     if (centerIfNeeded != null) {
-      _blink.BlinkElement.instance.scrollIntoViewIfNeeded_Callback_1_(unwrap_jso(this), centerIfNeeded);
+      _blink.BlinkElement.instance.scrollIntoViewIfNeeded_Callback_1_(this, centerIfNeeded);
       return;
     }
-    _blink.BlinkElement.instance.scrollIntoViewIfNeeded_Callback_0_(unwrap_jso(this));
+    _blink.BlinkElement.instance.scrollIntoViewIfNeeded_Callback_0_(this);
     return;
   }
 
+  void scrollTo([options_OR_x, num y]) {
+    if (options_OR_x == null && y == null) {
+      _blink.BlinkElement.instance.scrollTo_Callback_0_(this);
+      return;
+    }
+    if ((options_OR_x is Map) && y == null) {
+      _blink.BlinkElement.instance.scrollTo_Callback_1_(this, options_OR_x);
+      return;
+    }
+    if ((y is num) && (options_OR_x is num)) {
+      _blink.BlinkElement.instance.scrollTo_Callback_2_(this, options_OR_x, y);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('Element.setAttribute')
   @DocsEditable()
-  void setAttribute(String name, String value) => _blink.BlinkElement.instance.setAttribute_Callback_2_(unwrap_jso(this), name, value);
+  void setAttribute(String name, String value) => _blink.BlinkElement.instance.setAttribute_Callback_2_(this, name, value);
   
   @DomName('Element.setAttributeNS')
   @DocsEditable()
-  void setAttributeNS(String namespaceURI, String qualifiedName, String value) => _blink.BlinkElement.instance.setAttributeNS_Callback_3_(unwrap_jso(this), namespaceURI, qualifiedName, value);
+  void setAttributeNS(String namespaceURI, String name, String value) => _blink.BlinkElement.instance.setAttributeNS_Callback_3_(this, namespaceURI, name, value);
   
-  @DomName('Element.nextElementSibling')
+  @DomName('Element.after')
   @DocsEditable()
-  Element get nextElementSibling => wrap_jso(_blink.BlinkElement.instance.nextElementSibling_Getter_(unwrap_jso(this)));
+  @Experimental() // untriaged
+  void after(Object nodes) => _blink.BlinkElement.instance.after_Callback_1_(this, nodes);
   
-  @DomName('Element.previousElementSibling')
+  @DomName('Element.before')
   @DocsEditable()
-  Element get previousElementSibling => wrap_jso(_blink.BlinkElement.instance.previousElementSibling_Getter_(unwrap_jso(this)));
+  @Experimental() // untriaged
+  void before(Object nodes) => _blink.BlinkElement.instance.before_Callback_1_(this, nodes);
   
   @DomName('Element.remove')
   @DocsEditable()
-  void remove() => _blink.BlinkElement.instance.remove_Callback_0_(unwrap_jso(this));
+  void remove() => _blink.BlinkElement.instance.remove_Callback_0_(this);
+  
+  @DomName('Element.nextElementSibling')
+  @DocsEditable()
+  Element get nextElementSibling => _blink.BlinkElement.instance.nextElementSibling_Getter_(this);
+  
+  @DomName('Element.previousElementSibling')
+  @DocsEditable()
+  Element get previousElementSibling => _blink.BlinkElement.instance.previousElementSibling_Getter_(this);
   
   @DomName('Element.childElementCount')
   @DocsEditable()
-  int get _childElementCount => _blink.BlinkElement.instance.childElementCount_Getter_(unwrap_jso(this));
+  int get _childElementCount => _blink.BlinkElement.instance.childElementCount_Getter_(this);
   
   @DomName('Element.children')
   @DocsEditable()
-  List<Node> get _children => wrap_jso(_blink.BlinkElement.instance.children_Getter_(unwrap_jso(this)));
+  List<Node> get _children => (_blink.BlinkElement.instance.children_Getter_(this));
   
   @DomName('Element.firstElementChild')
   @DocsEditable()
-  Element get _firstElementChild => wrap_jso(_blink.BlinkElement.instance.firstElementChild_Getter_(unwrap_jso(this)));
+  Element get _firstElementChild => _blink.BlinkElement.instance.firstElementChild_Getter_(this);
   
   @DomName('Element.lastElementChild')
   @DocsEditable()
-  Element get _lastElementChild => wrap_jso(_blink.BlinkElement.instance.lastElementChild_Getter_(unwrap_jso(this)));
+  Element get _lastElementChild => _blink.BlinkElement.instance.lastElementChild_Getter_(this);
   
   /**
    * Finds the first descendant element of this element that matches the
@@ -15817,11 +15780,11 @@
    */
   @DomName('Element.querySelector')
   @DocsEditable()
-  Element querySelector(String selectors) => wrap_jso(_blink.BlinkElement.instance.querySelector_Callback_1_(unwrap_jso(this), selectors));
+  Element querySelector(String selectors) => _blink.BlinkElement.instance.querySelector_Callback_1_(this, selectors);
   
   @DomName('Element.querySelectorAll')
   @DocsEditable()
-  List<Node> _querySelectorAll(String selectors) => wrap_jso(_blink.BlinkElement.instance.querySelectorAll_Callback_1_(unwrap_jso(this), selectors));
+  List<Node> _querySelectorAll(String selectors) => (_blink.BlinkElement.instance.querySelectorAll_Callback_1_(this, selectors));
   
   /// Stream of `abort` events handled by this [Element].
   @DomName('Element.onabort')
@@ -15876,12 +15839,12 @@
   /// Stream of `copy` events handled by this [Element].
   @DomName('Element.oncopy')
   @DocsEditable()
-  ElementStream<Event> get onCopy => copyEvent.forElement(this);
+  ElementStream<ClipboardEvent> get onCopy => copyEvent.forElement(this);
 
   /// Stream of `cut` events handled by this [Element].
   @DomName('Element.oncut')
   @DocsEditable()
-  ElementStream<Event> get onCut => cutEvent.forElement(this);
+  ElementStream<ClipboardEvent> get onCut => cutEvent.forElement(this);
 
   /// Stream of `doubleclick` events handled by this [Element].
   @DomName('Element.ondblclick')
@@ -16129,7 +16092,7 @@
   /// Stream of `paste` events handled by this [Element].
   @DomName('Element.onpaste')
   @DocsEditable()
-  ElementStream<Event> get onPaste => pasteEvent.forElement(this);
+  ElementStream<ClipboardEvent> get onPaste => pasteEvent.forElement(this);
 
   @DomName('Element.onpause')
   @DocsEditable()
@@ -16338,11 +16301,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static EmbedElement internalCreateEmbedElement() {
-    return new EmbedElement._internalWrap();
-  }
-
-  external factory EmbedElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   EmbedElement.internal_() : super.internal_();
@@ -16359,61 +16318,51 @@
 
   @DomName('HTMLEmbedElement.height')
   @DocsEditable()
-  String get height => _blink.BlinkHTMLEmbedElement.instance.height_Getter_(unwrap_jso(this));
+  String get height => _blink.BlinkHTMLEmbedElement.instance.height_Getter_(this);
   
   @DomName('HTMLEmbedElement.height')
   @DocsEditable()
-  set height(String value) => _blink.BlinkHTMLEmbedElement.instance.height_Setter_(unwrap_jso(this), value);
-  
-  @DomName('HTMLEmbedElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLEmbedElement.instance.integrity_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLEmbedElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLEmbedElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  set height(String value) => _blink.BlinkHTMLEmbedElement.instance.height_Setter_(this, value);
   
   @DomName('HTMLEmbedElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLEmbedElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLEmbedElement.instance.name_Getter_(this);
   
   @DomName('HTMLEmbedElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLEmbedElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLEmbedElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLEmbedElement.src')
   @DocsEditable()
-  String get src => _blink.BlinkHTMLEmbedElement.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkHTMLEmbedElement.instance.src_Getter_(this);
   
   @DomName('HTMLEmbedElement.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkHTMLEmbedElement.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkHTMLEmbedElement.instance.src_Setter_(this, value);
   
   @DomName('HTMLEmbedElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLEmbedElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLEmbedElement.instance.type_Getter_(this);
   
   @DomName('HTMLEmbedElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLEmbedElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLEmbedElement.instance.type_Setter_(this, value);
   
   @DomName('HTMLEmbedElement.width')
   @DocsEditable()
-  String get width => _blink.BlinkHTMLEmbedElement.instance.width_Getter_(unwrap_jso(this));
+  String get width => _blink.BlinkHTMLEmbedElement.instance.width_Getter_(this);
   
   @DomName('HTMLEmbedElement.width')
   @DocsEditable()
-  set width(String value) => _blink.BlinkHTMLEmbedElement.instance.width_Setter_(unwrap_jso(this), value);
+  set width(String value) => _blink.BlinkHTMLEmbedElement.instance.width_Setter_(this, value);
   
   @DomName('HTMLEmbedElement.__getter__')
   @DocsEditable()
-  bool __getter__(index_OR_name) => _blink.BlinkHTMLEmbedElement.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
+  bool __getter__(index_OR_name) => _blink.BlinkHTMLEmbedElement.instance.$__getter___Callback_1_(this, index_OR_name);
   
   @DomName('HTMLEmbedElement.__setter__')
   @DocsEditable()
-  void __setter__(index_OR_name, Node value) => _blink.BlinkHTMLEmbedElement.instance.$__setter___Callback_2_(unwrap_jso(this), unwrap_jso(index_OR_name), unwrap_jso(value));
+  void __setter__(index_OR_name, Node value) => _blink.BlinkHTMLEmbedElement.instance.$__setter___Callback_2_(this, index_OR_name, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -16442,55 +16391,47 @@
   // To suppress missing implicit constructor warnings.
   factory Entry._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Entry internalCreateEntry() {
-    return new Entry._internalWrap();
-  }
 
-  factory Entry._internalWrap() {
-    return new Entry.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Entry.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Entry.filesystem')
   @DocsEditable()
-  FileSystem get filesystem => wrap_jso(_blink.BlinkEntry.instance.filesystem_Getter_(unwrap_jso(this)));
+  FileSystem get filesystem => _blink.BlinkEntry.instance.filesystem_Getter_(this);
   
   @DomName('Entry.fullPath')
   @DocsEditable()
-  String get fullPath => _blink.BlinkEntry.instance.fullPath_Getter_(unwrap_jso(this));
+  String get fullPath => _blink.BlinkEntry.instance.fullPath_Getter_(this);
   
   @DomName('Entry.isDirectory')
   @DocsEditable()
-  bool get isDirectory => _blink.BlinkEntry.instance.isDirectory_Getter_(unwrap_jso(this));
+  bool get isDirectory => _blink.BlinkEntry.instance.isDirectory_Getter_(this);
   
   @DomName('Entry.isFile')
   @DocsEditable()
-  bool get isFile => _blink.BlinkEntry.instance.isFile_Getter_(unwrap_jso(this));
+  bool get isFile => _blink.BlinkEntry.instance.isFile_Getter_(this);
   
   @DomName('Entry.name')
   @DocsEditable()
-  String get name => _blink.BlinkEntry.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkEntry.instance.name_Getter_(this);
   
   void _copyTo(DirectoryEntry parent, {String name, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
     if (errorCallback != null) {
-      _blink.BlinkEntry.instance.copyTo_Callback_4_(unwrap_jso(this), unwrap_jso(parent), name, unwrap_jso((entry) => successCallback(wrap_jso(entry))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkEntry.instance.copyTo_Callback_4_(this, parent, name, successCallback, errorCallback);
       return;
     }
     if (successCallback != null) {
-      _blink.BlinkEntry.instance.copyTo_Callback_3_(unwrap_jso(this), unwrap_jso(parent), name, unwrap_jso((entry) => successCallback(wrap_jso(entry))));
+      _blink.BlinkEntry.instance.copyTo_Callback_3_(this, parent, name, successCallback);
       return;
     }
     if (name != null) {
-      _blink.BlinkEntry.instance.copyTo_Callback_2_(unwrap_jso(this), unwrap_jso(parent), name);
+      _blink.BlinkEntry.instance.copyTo_Callback_2_(this, parent, name);
       return;
     }
-    _blink.BlinkEntry.instance.copyTo_Callback_1_(unwrap_jso(this), unwrap_jso(parent));
+    _blink.BlinkEntry.instance.copyTo_Callback_1_(this, parent);
     return;
   }
 
@@ -16504,10 +16445,10 @@
 
   void _getMetadata(MetadataCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkEntry.instance.getMetadata_Callback_2_(unwrap_jso(this), unwrap_jso((metadata) => successCallback(wrap_jso(metadata))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkEntry.instance.getMetadata_Callback_2_(this, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkEntry.instance.getMetadata_Callback_1_(unwrap_jso(this), unwrap_jso((metadata) => successCallback(wrap_jso(metadata))));
+    _blink.BlinkEntry.instance.getMetadata_Callback_1_(this, successCallback);
     return;
   }
 
@@ -16521,14 +16462,14 @@
 
   void _getParent([_EntryCallback successCallback, _ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkEntry.instance.getParent_Callback_2_(unwrap_jso(this), unwrap_jso((entry) => successCallback(wrap_jso(entry))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkEntry.instance.getParent_Callback_2_(this, successCallback, errorCallback);
       return;
     }
     if (successCallback != null) {
-      _blink.BlinkEntry.instance.getParent_Callback_1_(unwrap_jso(this), unwrap_jso((entry) => successCallback(wrap_jso(entry))));
+      _blink.BlinkEntry.instance.getParent_Callback_1_(this, successCallback);
       return;
     }
-    _blink.BlinkEntry.instance.getParent_Callback_0_(unwrap_jso(this));
+    _blink.BlinkEntry.instance.getParent_Callback_0_(this);
     return;
   }
 
@@ -16542,18 +16483,18 @@
 
   void _moveTo(DirectoryEntry parent, {String name, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
     if (errorCallback != null) {
-      _blink.BlinkEntry.instance.moveTo_Callback_4_(unwrap_jso(this), unwrap_jso(parent), name, unwrap_jso((entry) => successCallback(wrap_jso(entry))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkEntry.instance.moveTo_Callback_4_(this, parent, name, successCallback, errorCallback);
       return;
     }
     if (successCallback != null) {
-      _blink.BlinkEntry.instance.moveTo_Callback_3_(unwrap_jso(this), unwrap_jso(parent), name, unwrap_jso((entry) => successCallback(wrap_jso(entry))));
+      _blink.BlinkEntry.instance.moveTo_Callback_3_(this, parent, name, successCallback);
       return;
     }
     if (name != null) {
-      _blink.BlinkEntry.instance.moveTo_Callback_2_(unwrap_jso(this), unwrap_jso(parent), name);
+      _blink.BlinkEntry.instance.moveTo_Callback_2_(this, parent, name);
       return;
     }
-    _blink.BlinkEntry.instance.moveTo_Callback_1_(unwrap_jso(this), unwrap_jso(parent));
+    _blink.BlinkEntry.instance.moveTo_Callback_1_(this, parent);
     return;
   }
 
@@ -16567,10 +16508,10 @@
 
   void _remove(VoidCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkEntry.instance.remove_Callback_2_(unwrap_jso(this), unwrap_jso(() => successCallback()), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkEntry.instance.remove_Callback_2_(this, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkEntry.instance.remove_Callback_1_(unwrap_jso(this), unwrap_jso(() => successCallback()));
+    _blink.BlinkEntry.instance.remove_Callback_1_(this, successCallback);
     return;
   }
 
@@ -16584,7 +16525,7 @@
 
   @DomName('Entry.toURL')
   @DocsEditable()
-  String toUrl() => _blink.BlinkEntry.instance.toURL_Callback_0_(unwrap_jso(this));
+  String toUrl() => _blink.BlinkEntry.instance.toURL_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -16623,13 +16564,19 @@
   // To suppress missing implicit constructor warnings.
   factory ErrorEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static ErrorEvent internalCreateErrorEvent() {
-    return new ErrorEvent._internalWrap();
+  @DomName('ErrorEvent.ErrorEvent')
+  @DocsEditable()
+  factory ErrorEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkErrorEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkErrorEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory ErrorEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ErrorEvent.internal_() : super.internal_();
@@ -16638,24 +16585,24 @@
   @DomName('ErrorEvent.colno')
   @DocsEditable()
   @Experimental() // untriaged
-  int get colno => _blink.BlinkErrorEvent.instance.colno_Getter_(unwrap_jso(this));
+  int get colno => _blink.BlinkErrorEvent.instance.colno_Getter_(this);
   
   @DomName('ErrorEvent.error')
   @DocsEditable()
   @Experimental() // untriaged
-  Object get error => wrap_jso(_blink.BlinkErrorEvent.instance.error_Getter_(unwrap_jso(this)));
+  Object get error => (_blink.BlinkErrorEvent.instance.error_Getter_(this));
   
   @DomName('ErrorEvent.filename')
   @DocsEditable()
-  String get filename => _blink.BlinkErrorEvent.instance.filename_Getter_(unwrap_jso(this));
+  String get filename => _blink.BlinkErrorEvent.instance.filename_Getter_(this);
   
   @DomName('ErrorEvent.lineno')
   @DocsEditable()
-  int get lineno => _blink.BlinkErrorEvent.instance.lineno_Getter_(unwrap_jso(this));
+  int get lineno => _blink.BlinkErrorEvent.instance.lineno_Getter_(this);
   
   @DomName('ErrorEvent.message')
   @DocsEditable()
-  String get message => _blink.BlinkErrorEvent.instance.message_Getter_(unwrap_jso(this));
+  String get message => _blink.BlinkErrorEvent.instance.message_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -16716,24 +16663,24 @@
     } while (target != null && target != currentTarget.parent);
     throw new StateError('No selector matched for populating matchedTarget.');
   }
-  // To suppress missing implicit constructor warnings.
-  factory Event._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('Event.Event')
+  @DocsEditable()
+  factory Event._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkEvent.instance.constructorCallback_1_(type);
+  }
+
 
   @Deprecated("Internal Use Only")
-  static Event internalCreateEvent() {
-    return new Event._internalWrap();
-  }
-
-  factory Event._internalWrap() {
-    return new Event.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Event.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /**
    * This event is being handled by the event target.
    *
@@ -16773,41 +16720,23 @@
 
   @DomName('Event.bubbles')
   @DocsEditable()
-  bool get bubbles => _blink.BlinkEvent.instance.bubbles_Getter_(unwrap_jso(this));
+  bool get bubbles => _blink.BlinkEvent.instance.bubbles_Getter_(this);
   
   @DomName('Event.cancelable')
   @DocsEditable()
-  bool get cancelable => _blink.BlinkEvent.instance.cancelable_Getter_(unwrap_jso(this));
-  
-  /**
-   * Access to the system's clipboard data during copy, cut, and paste events.
-   *
-   * ## Other resources
-   *
-   * * [clipboardData specification](http://www.w3.org/TR/clipboard-apis/#attributes)
-   *   from W3C.
-   */
-  @DomName('Event.clipboardData')
-  @DocsEditable()
-  @SupportedBrowser(SupportedBrowser.CHROME)
-  @SupportedBrowser(SupportedBrowser.FIREFOX)
-  @SupportedBrowser(SupportedBrowser.SAFARI)
-  @Experimental()
-  // Part of copy/paste
-  @Experimental() // nonstandard
-  DataTransfer get clipboardData => wrap_jso(_blink.BlinkEvent.instance.clipboardData_Getter_(unwrap_jso(this)));
+  bool get cancelable => _blink.BlinkEvent.instance.cancelable_Getter_(this);
   
   @DomName('Event.currentTarget')
   @DocsEditable()
-  EventTarget get currentTarget => wrap_jso(_blink.BlinkEvent.instance.currentTarget_Getter_(unwrap_jso(this)));
+  EventTarget get currentTarget => _convertNativeToDart_EventTarget(_blink.BlinkEvent.instance.currentTarget_Getter_(this));
   
   @DomName('Event.defaultPrevented')
   @DocsEditable()
-  bool get defaultPrevented => _blink.BlinkEvent.instance.defaultPrevented_Getter_(unwrap_jso(this));
+  bool get defaultPrevented => _blink.BlinkEvent.instance.defaultPrevented_Getter_(this);
   
   @DomName('Event.eventPhase')
   @DocsEditable()
-  int get eventPhase => _blink.BlinkEvent.instance.eventPhase_Getter_(unwrap_jso(this));
+  int get eventPhase => _blink.BlinkEvent.instance.eventPhase_Getter_(this);
   
   /**
    * This event's path, taking into account shadow DOM.
@@ -16822,35 +16751,35 @@
   @DocsEditable()
   // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#extensions-to-event
   @Experimental()
-  List<Node> get path => wrap_jso(_blink.BlinkEvent.instance.path_Getter_(unwrap_jso(this)));
+  List<EventTarget> get path => (_blink.BlinkEvent.instance.path_Getter_(this));
   
   @DomName('Event.target')
   @DocsEditable()
-  EventTarget get target => wrap_jso(_blink.BlinkEvent.instance.target_Getter_(unwrap_jso(this)));
+  EventTarget get target => _convertNativeToDart_EventTarget(_blink.BlinkEvent.instance.target_Getter_(this));
   
   @DomName('Event.timeStamp')
   @DocsEditable()
-  int get timeStamp => _blink.BlinkEvent.instance.timeStamp_Getter_(unwrap_jso(this));
+  int get timeStamp => _blink.BlinkEvent.instance.timeStamp_Getter_(this);
   
   @DomName('Event.type')
   @DocsEditable()
-  String get type => _blink.BlinkEvent.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkEvent.instance.type_Getter_(this);
   
   @DomName('Event.initEvent')
   @DocsEditable()
-  void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) => _blink.BlinkEvent.instance.initEvent_Callback_3_(unwrap_jso(this), eventTypeArg, canBubbleArg, cancelableArg);
+  void _initEvent(String type, bool bubbles, bool cancelable) => _blink.BlinkEvent.instance.initEvent_Callback_3_(this, type, bubbles, cancelable);
   
   @DomName('Event.preventDefault')
   @DocsEditable()
-  void preventDefault() => _blink.BlinkEvent.instance.preventDefault_Callback_0_(unwrap_jso(this));
+  void preventDefault() => _blink.BlinkEvent.instance.preventDefault_Callback_0_(this);
   
   @DomName('Event.stopImmediatePropagation')
   @DocsEditable()
-  void stopImmediatePropagation() => _blink.BlinkEvent.instance.stopImmediatePropagation_Callback_0_(unwrap_jso(this));
+  void stopImmediatePropagation() => _blink.BlinkEvent.instance.stopImmediatePropagation_Callback_0_(this);
   
   @DomName('Event.stopPropagation')
   @DocsEditable()
-  void stopPropagation() => _blink.BlinkEvent.instance.stopPropagation_Callback_0_(unwrap_jso(this));
+  void stopPropagation() => _blink.BlinkEvent.instance.stopPropagation_Callback_0_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -16903,21 +16832,17 @@
 
   @DomName('EventSource.EventSource')
   @DocsEditable()
-  static EventSource _factoryEventSource(String url, [Map eventSourceInit]) {
-    if (eventSourceInit != null) {
-      var eventSourceInit_1 = convertDartToNative_Dictionary(eventSourceInit);
-      return wrap_jso(_blink.BlinkEventSource.instance.constructorCallback_2_(url, eventSourceInit_1));
+  static EventSource _factoryEventSource(String url, [Map eventSourceInitDict]) {
+    if (eventSourceInitDict != null) {
+      var eventSourceInitDict_1 = convertDartToNative_Dictionary(eventSourceInitDict);
+      return _blink.BlinkEventSource.instance.constructorCallback_2_(url, eventSourceInitDict_1);
     }
-    return wrap_jso(_blink.BlinkEventSource.instance.constructorCallback_1_(url));
+    return _blink.BlinkEventSource.instance.constructorCallback_1_(url);
   }
 
 
   @Deprecated("Internal Use Only")
-  static EventSource internalCreateEventSource() {
-    return new EventSource._internalWrap();
-  }
-
-  external factory EventSource._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   EventSource.internal_() : super.internal_();
@@ -16937,19 +16862,19 @@
 
   @DomName('EventSource.readyState')
   @DocsEditable()
-  int get readyState => _blink.BlinkEventSource.instance.readyState_Getter_(unwrap_jso(this));
+  int get readyState => _blink.BlinkEventSource.instance.readyState_Getter_(this);
   
   @DomName('EventSource.url')
   @DocsEditable()
-  String get url => _blink.BlinkEventSource.instance.url_Getter_(unwrap_jso(this));
+  String get url => _blink.BlinkEventSource.instance.url_Getter_(this);
   
   @DomName('EventSource.withCredentials')
   @DocsEditable()
-  bool get withCredentials => _blink.BlinkEventSource.instance.withCredentials_Getter_(unwrap_jso(this));
+  bool get withCredentials => _blink.BlinkEventSource.instance.withCredentials_Getter_(this);
   
   @DomName('EventSource.close')
   @DocsEditable()
-  void close() => _blink.BlinkEventSource.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkEventSource.instance.close_Callback_0_(this);
   
   /// Stream of `error` events handled by this [EventSource].
   @DomName('EventSource.onerror')
@@ -17095,59 +17020,25 @@
   // To suppress missing implicit constructor warnings.
   factory EventTarget._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static EventTarget internalCreateEventTarget() {
-    return new EventTarget._internalWrap();
-  }
 
-  factory EventTarget._internalWrap() {
-    return new EventTarget.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   EventTarget.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  void _addEventListener([String type, EventListener listener, bool useCapture]) {
-    if (useCapture != null) {
-      _blink.BlinkEventTarget.instance.addEventListener_Callback_3_(unwrap_jso(this), type, unwrap_jso(js.allowInterop(listener)), useCapture);
-      return;
-    }
-    if (listener != null) {
-      _blink.BlinkEventTarget.instance.addEventListener_Callback_2_(unwrap_jso(this), type, unwrap_jso(js.allowInterop(listener)));
-      return;
-    }
-    if (type != null) {
-      _blink.BlinkEventTarget.instance.addEventListener_Callback_1_(unwrap_jso(this), type);
-      return;
-    }
-    _blink.BlinkEventTarget.instance.addEventListener_Callback_0_(unwrap_jso(this));
-    return;
-  }
-
+  @DomName('EventTarget.addEventListener')
+  @DocsEditable()
+  void _addEventListener(String type, EventListener listener, [bool capture]) => _blink.BlinkEventTarget.instance.addEventListener_Callback_3_(this, type, listener, capture);
+  
   @DomName('EventTarget.dispatchEvent')
   @DocsEditable()
-  bool dispatchEvent(Event event) => _blink.BlinkEventTarget.instance.dispatchEvent_Callback_1_(unwrap_jso(this), unwrap_jso(event));
+  bool dispatchEvent(Event event) => _blink.BlinkEventTarget.instance.dispatchEvent_Callback_1_(this, event);
   
-  void _removeEventListener([String type, EventListener listener, bool useCapture]) {
-    if (useCapture != null) {
-      _blink.BlinkEventTarget.instance.removeEventListener_Callback_3_(unwrap_jso(this), type, unwrap_jso(js.allowInterop(listener)), useCapture);
-      return;
-    }
-    if (listener != null) {
-      _blink.BlinkEventTarget.instance.removeEventListener_Callback_2_(unwrap_jso(this), type, unwrap_jso(js.allowInterop(listener)));
-      return;
-    }
-    if (type != null) {
-      _blink.BlinkEventTarget.instance.removeEventListener_Callback_1_(unwrap_jso(this), type);
-      return;
-    }
-    _blink.BlinkEventTarget.instance.removeEventListener_Callback_0_(unwrap_jso(this));
-    return;
-  }
-
+  @DomName('EventTarget.removeEventListener')
+  @DocsEditable()
+  void _removeEventListener(String type, EventListener listener, [bool capture]) => _blink.BlinkEventTarget.instance.removeEventListener_Callback_3_(this, type, listener, capture);
+  
 }
 // 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
@@ -17163,13 +17054,19 @@
   // To suppress missing implicit constructor warnings.
   factory ExtendableEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static ExtendableEvent internalCreateExtendableEvent() {
-    return new ExtendableEvent._internalWrap();
+  @DomName('ExtendableEvent.ExtendableEvent')
+  @DocsEditable()
+  factory ExtendableEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkExtendableEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkExtendableEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory ExtendableEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ExtendableEvent.internal_() : super.internal_();
@@ -17178,7 +17075,7 @@
   @DomName('ExtendableEvent.waitUntil')
   @DocsEditable()
   @Experimental() // untriaged
-  void waitUntil(Object value) => _blink.BlinkExtendableEvent.instance.waitUntil_Callback_1_(unwrap_jso(this), value);
+  void waitUntil(Object value) => _blink.BlinkExtendableEvent.instance.waitUntil_Callback_1_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -17197,26 +17094,28 @@
 
   @DomName('FederatedCredential.FederatedCredential')
   @DocsEditable()
-  factory FederatedCredential(String id, String name, String avatarURL, String federation) {
-    return wrap_jso(_blink.BlinkFederatedCredential.instance.constructorCallback_4_(id, name, avatarURL, federation));
+  factory FederatedCredential(Map data) {
+    var data_1 = convertDartToNative_Dictionary(data);
+    return _blink.BlinkFederatedCredential.instance.constructorCallback_1_(data_1);
   }
 
 
   @Deprecated("Internal Use Only")
-  static FederatedCredential internalCreateFederatedCredential() {
-    return new FederatedCredential._internalWrap();
-  }
-
-  external factory FederatedCredential._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FederatedCredential.internal_() : super.internal_();
 
 
-  @DomName('FederatedCredential.federation')
+  @DomName('FederatedCredential.protocol')
   @DocsEditable()
   @Experimental() // untriaged
-  String get federation => _blink.BlinkFederatedCredential.instance.federation_Getter_(unwrap_jso(this));
+  String get protocol => _blink.BlinkFederatedCredential.instance.protocol_Getter_(this);
+  
+  @DomName('FederatedCredential.provider')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get provider => _blink.BlinkFederatedCredential.instance.provider_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -17229,17 +17128,23 @@
 @DocsEditable()
 @DomName('FetchEvent')
 @Experimental() // untriaged
-class FetchEvent extends Event {
+class FetchEvent extends ExtendableEvent {
   // To suppress missing implicit constructor warnings.
   factory FetchEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static FetchEvent internalCreateFetchEvent() {
-    return new FetchEvent._internalWrap();
+  @DomName('FetchEvent.FetchEvent')
+  @DocsEditable()
+  factory FetchEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkFetchEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkFetchEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory FetchEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FetchEvent.internal_() : super.internal_();
@@ -17248,17 +17153,17 @@
   @DomName('FetchEvent.isReload')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get isReload => _blink.BlinkFetchEvent.instance.isReload_Getter_(unwrap_jso(this));
+  bool get isReload => _blink.BlinkFetchEvent.instance.isReload_Getter_(this);
   
   @DomName('FetchEvent.request')
   @DocsEditable()
   @Experimental() // untriaged
-  _Request get request => wrap_jso(_blink.BlinkFetchEvent.instance.request_Getter_(unwrap_jso(this)));
+  _Request get request => _blink.BlinkFetchEvent.instance.request_Getter_(this);
   
   @DomName('FetchEvent.respondWith')
   @DocsEditable()
   @Experimental() // untriaged
-  void respondWith(Object value) => _blink.BlinkFetchEvent.instance.respondWith_Callback_1_(unwrap_jso(this), value);
+  void respondWith(Object value) => _blink.BlinkFetchEvent.instance.respondWith_Callback_1_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -17281,11 +17186,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FieldSetElement internalCreateFieldSetElement() {
-    return new FieldSetElement._internalWrap();
-  }
-
-  external factory FieldSetElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FieldSetElement.internal_() : super.internal_();
@@ -17299,51 +17200,56 @@
 
   @DomName('HTMLFieldSetElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLFieldSetElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLFieldSetElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLFieldSetElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLFieldSetElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLFieldSetElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLFieldSetElement.elements')
   @DocsEditable()
-  List<Node> get elements => wrap_jso(_blink.BlinkHTMLFieldSetElement.instance.elements_Getter_(unwrap_jso(this)));
+  HtmlFormControlsCollection get elements => _blink.BlinkHTMLFieldSetElement.instance.elements_Getter_(this);
   
   @DomName('HTMLFieldSetElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLFieldSetElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLFieldSetElement.instance.form_Getter_(this);
   
   @DomName('HTMLFieldSetElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLFieldSetElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLFieldSetElement.instance.name_Getter_(this);
   
   @DomName('HTMLFieldSetElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLFieldSetElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLFieldSetElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLFieldSetElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLFieldSetElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLFieldSetElement.instance.type_Getter_(this);
   
   @DomName('HTMLFieldSetElement.validationMessage')
   @DocsEditable()
-  String get validationMessage => _blink.BlinkHTMLFieldSetElement.instance.validationMessage_Getter_(unwrap_jso(this));
+  String get validationMessage => _blink.BlinkHTMLFieldSetElement.instance.validationMessage_Getter_(this);
   
   @DomName('HTMLFieldSetElement.validity')
   @DocsEditable()
-  ValidityState get validity => wrap_jso(_blink.BlinkHTMLFieldSetElement.instance.validity_Getter_(unwrap_jso(this)));
+  ValidityState get validity => _blink.BlinkHTMLFieldSetElement.instance.validity_Getter_(this);
   
   @DomName('HTMLFieldSetElement.willValidate')
   @DocsEditable()
-  bool get willValidate => _blink.BlinkHTMLFieldSetElement.instance.willValidate_Getter_(unwrap_jso(this));
+  bool get willValidate => _blink.BlinkHTMLFieldSetElement.instance.willValidate_Getter_(this);
   
   @DomName('HTMLFieldSetElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLFieldSetElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLFieldSetElement.instance.checkValidity_Callback_0_(this);
+  
+  @DomName('HTMLFieldSetElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLFieldSetElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLFieldSetElement.setCustomValidity')
   @DocsEditable()
-  void setCustomValidity(String error) => _blink.BlinkHTMLFieldSetElement.instance.setCustomValidity_Callback_1_(unwrap_jso(this), error);
+  void setCustomValidity(String error) => _blink.BlinkHTMLFieldSetElement.instance.setCustomValidity_Callback_1_(this, error);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -17359,13 +17265,19 @@
   // To suppress missing implicit constructor warnings.
   factory File._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static File internalCreateFile() {
-    return new File._internalWrap();
+  @DomName('File.File')
+  @DocsEditable()
+  factory File(List<Object> fileBits, String fileName, [Map options]) {
+    if (options != null) {
+      var options_1 = convertDartToNative_Dictionary(options);
+      return _blink.BlinkFile.instance.constructorCallback_3_(fileBits, fileName, options_1);
+    }
+    return _blink.BlinkFile.instance.constructorCallback_2_(fileBits, fileName);
   }
 
-  external factory File._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   File.internal_() : super.internal_();
@@ -17374,15 +17286,15 @@
   @DomName('File.lastModified')
   @DocsEditable()
   @Experimental() // untriaged
-  int get lastModified => _blink.BlinkFile.instance.lastModified_Getter_(unwrap_jso(this));
+  int get lastModified => _blink.BlinkFile.instance.lastModified_Getter_(this);
   
   @DomName('File.lastModifiedDate')
   @DocsEditable()
-  DateTime get lastModifiedDate => _blink.BlinkFile.instance.lastModifiedDate_Getter_(unwrap_jso(this));
+  DateTime get lastModifiedDate => _blink.BlinkFile.instance.lastModifiedDate_Getter_(this);
   
   @DomName('File.name')
   @DocsEditable()
-  String get name => _blink.BlinkFile.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkFile.instance.name_Getter_(this);
   
   @DomName('File.webkitRelativePath')
   @DocsEditable()
@@ -17390,7 +17302,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://plus.sandbox.google.com/+AddyOsmani/posts/Dk5UhZ6zfF3
-  String get relativePath => _blink.BlinkFile.instance.webkitRelativePath_Getter_(unwrap_jso(this));
+  String get relativePath => _blink.BlinkFile.instance.webkitRelativePath_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -17421,11 +17333,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FileEntry internalCreateFileEntry() {
-    return new FileEntry._internalWrap();
-  }
-
-  external factory FileEntry._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FileEntry.internal_() : super.internal_();
@@ -17433,10 +17341,10 @@
 
   void _createWriter(_FileWriterCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkFileEntry.instance.createWriter_Callback_2_(unwrap_jso(this), unwrap_jso((fileWriter) => successCallback(wrap_jso(fileWriter))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkFileEntry.instance.createWriter_Callback_2_(this, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkFileEntry.instance.createWriter_Callback_1_(unwrap_jso(this), unwrap_jso((fileWriter) => successCallback(wrap_jso(fileWriter))));
+    _blink.BlinkFileEntry.instance.createWriter_Callback_1_(this, successCallback);
     return;
   }
 
@@ -17450,10 +17358,10 @@
 
   void _file(_FileCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkFileEntry.instance.file_Callback_2_(unwrap_jso(this), unwrap_jso((file) => successCallback(wrap_jso(file))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkFileEntry.instance.file_Callback_2_(this, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkFileEntry.instance.file_Callback_1_(unwrap_jso(this), unwrap_jso((file) => successCallback(wrap_jso(file))));
+    _blink.BlinkFileEntry.instance.file_Callback_1_(this, successCallback);
     return;
   }
 
@@ -17483,11 +17391,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FileError internalCreateFileError() {
-    return new FileError._internalWrap();
-  }
-
-  external factory FileError._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FileError.internal_() : super.internal_();
@@ -17543,7 +17447,7 @@
 
   @DomName('FileError.code')
   @DocsEditable()
-  int get code => _blink.BlinkFileError.instance.code_Getter_(unwrap_jso(this));
+  int get code => _blink.BlinkFileError.instance.code_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -17559,32 +17463,24 @@
   // To suppress missing implicit constructor warnings.
   factory FileList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static FileList internalCreateFileList() {
-    return new FileList._internalWrap();
-  }
 
-  factory FileList._internalWrap() {
-    return new FileList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FileList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('FileList.length')
   @DocsEditable()
-  int get length => _blink.BlinkFileList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkFileList.instance.length_Getter_(this);
   
   File operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkFileList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  File _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkFileList.instance.item_Callback_1_(unwrap_jso(this), index));
+  File _nativeIndexedGetter(int index) => (_blink.BlinkFileList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, File value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -17626,7 +17522,7 @@
 
   @DomName('FileList.item')
   @DocsEditable()
-  File item(int index) => wrap_jso(_blink.BlinkFileList.instance.item_Callback_1_(unwrap_jso(this), index));
+  File item(int index) => _blink.BlinkFileList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
@@ -17641,7 +17537,7 @@
   @DomName('FileReader.result')
   @DocsEditable()
   Object get result {
-    var res = _blink.BlinkFileReader.instance.result_Getter_(unwrap_jso(this));
+    var res = _blink.BlinkFileReader.instance.result_Getter_(this);
     if (res is ByteBuffer) {
       return new Uint8List.view(res);
     }
@@ -17714,16 +17610,12 @@
   @DomName('FileReader.FileReader')
   @DocsEditable()
   factory FileReader() {
-    return wrap_jso(_blink.BlinkFileReader.instance.constructorCallback_0_());
+    return _blink.BlinkFileReader.instance.constructorCallback_0_();
   }
 
 
   @Deprecated("Internal Use Only")
-  static FileReader internalCreateFileReader() {
-    return new FileReader._internalWrap();
-  }
-
-  external factory FileReader._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FileReader.internal_() : super.internal_();
@@ -17743,34 +17635,34 @@
 
   @DomName('FileReader.error')
   @DocsEditable()
-  FileError get error => wrap_jso(_blink.BlinkFileReader.instance.error_Getter_(unwrap_jso(this)));
+  FileError get error => _blink.BlinkFileReader.instance.error_Getter_(this);
   
   @DomName('FileReader.readyState')
   @DocsEditable()
-  int get readyState => _blink.BlinkFileReader.instance.readyState_Getter_(unwrap_jso(this));
+  int get readyState => _blink.BlinkFileReader.instance.readyState_Getter_(this);
   
   @DomName('FileReader.result')
   @DocsEditable()
-  Object get _result => wrap_jso(_blink.BlinkFileReader.instance.result_Getter_(unwrap_jso(this)));
+  Object get _result => (_blink.BlinkFileReader.instance.result_Getter_(this));
   
   @DomName('FileReader.abort')
   @DocsEditable()
-  void abort() => _blink.BlinkFileReader.instance.abort_Callback_0_(unwrap_jso(this));
+  void abort() => _blink.BlinkFileReader.instance.abort_Callback_0_(this);
   
   @DomName('FileReader.readAsArrayBuffer')
   @DocsEditable()
-  void readAsArrayBuffer(Blob blob) => _blink.BlinkFileReader.instance.readAsArrayBuffer_Callback_1_(unwrap_jso(this), unwrap_jso(blob));
+  void readAsArrayBuffer(Blob blob) => _blink.BlinkFileReader.instance.readAsArrayBuffer_Callback_1_(this, blob);
   
   @DomName('FileReader.readAsDataURL')
   @DocsEditable()
-  void readAsDataUrl(Blob blob) => _blink.BlinkFileReader.instance.readAsDataURL_Callback_1_(unwrap_jso(this), unwrap_jso(blob));
+  void readAsDataUrl(Blob blob) => _blink.BlinkFileReader.instance.readAsDataURL_Callback_1_(this, blob);
   
-  void readAsText(Blob blob, [String encoding]) {
-    if (encoding != null) {
-      _blink.BlinkFileReader.instance.readAsText_Callback_2_(unwrap_jso(this), unwrap_jso(blob), encoding);
+  void readAsText(Blob blob, [String label]) {
+    if (label != null) {
+      _blink.BlinkFileReader.instance.readAsText_Callback_2_(this, blob, label);
       return;
     }
-    _blink.BlinkFileReader.instance.readAsText_Callback_1_(unwrap_jso(this), unwrap_jso(blob));
+    _blink.BlinkFileReader.instance.readAsText_Callback_1_(this, blob);
     return;
   }
 
@@ -17819,25 +17711,17 @@
   // To suppress missing implicit constructor warnings.
   factory FileStream._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static FileStream internalCreateFileStream() {
-    return new FileStream._internalWrap();
-  }
 
-  factory FileStream._internalWrap() {
-    return new FileStream.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FileStream.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Stream.type')
   @DocsEditable()
   @Experimental() // untriaged
-  String get type => _blink.BlinkStream.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkStream.instance.type_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -17856,31 +17740,23 @@
   // To suppress missing implicit constructor warnings.
   factory FileSystem._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static FileSystem internalCreateFileSystem() {
-    return new FileSystem._internalWrap();
-  }
 
-  factory FileSystem._internalWrap() {
-    return new FileSystem.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FileSystem.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
   @DomName('DOMFileSystem.name')
   @DocsEditable()
-  String get name => _blink.BlinkDOMFileSystem.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkDOMFileSystem.instance.name_Getter_(this);
   
   @DomName('DOMFileSystem.root')
   @DocsEditable()
-  DirectoryEntry get root => wrap_jso(_blink.BlinkDOMFileSystem.instance.root_Getter_(unwrap_jso(this)));
+  DirectoryEntry get root => _blink.BlinkDOMFileSystem.instance.root_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -17971,11 +17847,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FileWriter internalCreateFileWriter() {
-    return new FileWriter._internalWrap();
-  }
-
-  external factory FileWriter._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FileWriter.internal_() : super.internal_();
@@ -17995,35 +17867,35 @@
 
   @DomName('FileWriter.error')
   @DocsEditable()
-  FileError get error => wrap_jso(_blink.BlinkFileWriter.instance.error_Getter_(unwrap_jso(this)));
+  FileError get error => _blink.BlinkFileWriter.instance.error_Getter_(this);
   
   @DomName('FileWriter.length')
   @DocsEditable()
-  int get length => _blink.BlinkFileWriter.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkFileWriter.instance.length_Getter_(this);
   
   @DomName('FileWriter.position')
   @DocsEditable()
-  int get position => _blink.BlinkFileWriter.instance.position_Getter_(unwrap_jso(this));
+  int get position => _blink.BlinkFileWriter.instance.position_Getter_(this);
   
   @DomName('FileWriter.readyState')
   @DocsEditable()
-  int get readyState => _blink.BlinkFileWriter.instance.readyState_Getter_(unwrap_jso(this));
+  int get readyState => _blink.BlinkFileWriter.instance.readyState_Getter_(this);
   
   @DomName('FileWriter.abort')
   @DocsEditable()
-  void abort() => _blink.BlinkFileWriter.instance.abort_Callback_0_(unwrap_jso(this));
+  void abort() => _blink.BlinkFileWriter.instance.abort_Callback_0_(this);
   
   @DomName('FileWriter.seek')
   @DocsEditable()
-  void seek(int position) => _blink.BlinkFileWriter.instance.seek_Callback_1_(unwrap_jso(this), position);
+  void seek(int position) => _blink.BlinkFileWriter.instance.seek_Callback_1_(this, position);
   
   @DomName('FileWriter.truncate')
   @DocsEditable()
-  void truncate(int size) => _blink.BlinkFileWriter.instance.truncate_Callback_1_(unwrap_jso(this), size);
+  void truncate(int size) => _blink.BlinkFileWriter.instance.truncate_Callback_1_(this, size);
   
   @DomName('FileWriter.write')
   @DocsEditable()
-  void write(Blob data) => _blink.BlinkFileWriter.instance.write_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+  void write(Blob data) => _blink.BlinkFileWriter.instance.write_Callback_1_(this, data);
   
   /// Stream of `abort` events handled by this [FileWriter].
   @DomName('FileWriter.onabort')
@@ -18080,13 +17952,19 @@
   // To suppress missing implicit constructor warnings.
   factory FocusEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static FocusEvent internalCreateFocusEvent() {
-    return new FocusEvent._internalWrap();
+  @DomName('FocusEvent.FocusEvent')
+  @DocsEditable()
+  factory FocusEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkFocusEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkFocusEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory FocusEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FocusEvent.internal_() : super.internal_();
@@ -18094,7 +17972,7 @@
 
   @DomName('FocusEvent.relatedTarget')
   @DocsEditable()
-  EventTarget get relatedTarget => wrap_jso(_blink.BlinkFocusEvent.instance.relatedTarget_Getter_(unwrap_jso(this)));
+  EventTarget get relatedTarget => _convertNativeToDart_EventTarget(_blink.BlinkFocusEvent.instance.relatedTarget_Getter_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18113,130 +17991,105 @@
 
   @DomName('FontFace.FontFace')
   @DocsEditable()
-  factory FontFace(String family, source, [Map descriptors]) {
-    if ((source is String || source == null) && (family is String || family == null) && descriptors == null) {
-      return wrap_jso(_blink.BlinkFontFace.instance.constructorCallback_2_(family, source));
-    }
-    if ((descriptors is Map || descriptors == null) && (source is String || source == null) && (family is String || family == null)) {
+  factory FontFace(String family, Object source, [Map descriptors]) {
+    if (descriptors != null) {
       var descriptors_1 = convertDartToNative_Dictionary(descriptors);
-      return wrap_jso(_blink.BlinkFontFace.instance.constructorCallback_3_(family, source, descriptors_1));
+      return _blink.BlinkFontFace.instance.constructorCallback_3_(family, source, descriptors_1);
     }
-    if ((source is TypedData || source == null) && (family is String || family == null) && descriptors == null) {
-      return wrap_jso(_blink.BlinkFontFace.instance.constructorCallback_2_(family, source));
-    }
-    if ((descriptors is Map || descriptors == null) && (source is TypedData || source == null) && (family is String || family == null)) {
-      var descriptors_1 = convertDartToNative_Dictionary(descriptors);
-      return wrap_jso(_blink.BlinkFontFace.instance.constructorCallback_3_(family, source, descriptors_1));
-    }
-    if ((source is ByteBuffer || source == null) && (family is String || family == null) && descriptors == null) {
-      return wrap_jso(_blink.BlinkFontFace.instance.constructorCallback_2_(family, source));
-    }
-    if ((descriptors is Map || descriptors == null) && (source is ByteBuffer || source == null) && (family is String || family == null)) {
-      var descriptors_1 = convertDartToNative_Dictionary(descriptors);
-      return wrap_jso(_blink.BlinkFontFace.instance.constructorCallback_3_(family, source, descriptors_1));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _blink.BlinkFontFace.instance.constructorCallback_2_(family, source);
   }
 
+
   @Deprecated("Internal Use Only")
-  static FontFace internalCreateFontFace() {
-    return new FontFace._internalWrap();
-  }
-
-  factory FontFace._internalWrap() {
-    return new FontFace.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FontFace.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('FontFace.family')
   @DocsEditable()
   @Experimental() // untriaged
-  String get family => _blink.BlinkFontFace.instance.family_Getter_(unwrap_jso(this));
+  String get family => _blink.BlinkFontFace.instance.family_Getter_(this);
   
   @DomName('FontFace.family')
   @DocsEditable()
   @Experimental() // untriaged
-  set family(String value) => _blink.BlinkFontFace.instance.family_Setter_(unwrap_jso(this), value);
+  set family(String value) => _blink.BlinkFontFace.instance.family_Setter_(this, value);
   
   @DomName('FontFace.featureSettings')
   @DocsEditable()
   @Experimental() // untriaged
-  String get featureSettings => _blink.BlinkFontFace.instance.featureSettings_Getter_(unwrap_jso(this));
+  String get featureSettings => _blink.BlinkFontFace.instance.featureSettings_Getter_(this);
   
   @DomName('FontFace.featureSettings')
   @DocsEditable()
   @Experimental() // untriaged
-  set featureSettings(String value) => _blink.BlinkFontFace.instance.featureSettings_Setter_(unwrap_jso(this), value);
+  set featureSettings(String value) => _blink.BlinkFontFace.instance.featureSettings_Setter_(this, value);
   
   @DomName('FontFace.loaded')
   @DocsEditable()
   @Experimental() // untriaged
-  Future get loaded => wrap_jso(_blink.BlinkFontFace.instance.loaded_Getter_(unwrap_jso(this)));
+  Future get loaded => convertNativePromiseToDartFuture(_blink.BlinkFontFace.instance.loaded_Getter_(this));
   
   @DomName('FontFace.status')
   @DocsEditable()
   @Experimental() // untriaged
-  String get status => _blink.BlinkFontFace.instance.status_Getter_(unwrap_jso(this));
+  String get status => _blink.BlinkFontFace.instance.status_Getter_(this);
   
   @DomName('FontFace.stretch')
   @DocsEditable()
   @Experimental() // untriaged
-  String get stretch => _blink.BlinkFontFace.instance.stretch_Getter_(unwrap_jso(this));
+  String get stretch => _blink.BlinkFontFace.instance.stretch_Getter_(this);
   
   @DomName('FontFace.stretch')
   @DocsEditable()
   @Experimental() // untriaged
-  set stretch(String value) => _blink.BlinkFontFace.instance.stretch_Setter_(unwrap_jso(this), value);
+  set stretch(String value) => _blink.BlinkFontFace.instance.stretch_Setter_(this, value);
   
   @DomName('FontFace.style')
   @DocsEditable()
   @Experimental() // untriaged
-  String get style => _blink.BlinkFontFace.instance.style_Getter_(unwrap_jso(this));
+  String get style => _blink.BlinkFontFace.instance.style_Getter_(this);
   
   @DomName('FontFace.style')
   @DocsEditable()
   @Experimental() // untriaged
-  set style(String value) => _blink.BlinkFontFace.instance.style_Setter_(unwrap_jso(this), value);
+  set style(String value) => _blink.BlinkFontFace.instance.style_Setter_(this, value);
   
   @DomName('FontFace.unicodeRange')
   @DocsEditable()
   @Experimental() // untriaged
-  String get unicodeRange => _blink.BlinkFontFace.instance.unicodeRange_Getter_(unwrap_jso(this));
+  String get unicodeRange => _blink.BlinkFontFace.instance.unicodeRange_Getter_(this);
   
   @DomName('FontFace.unicodeRange')
   @DocsEditable()
   @Experimental() // untriaged
-  set unicodeRange(String value) => _blink.BlinkFontFace.instance.unicodeRange_Setter_(unwrap_jso(this), value);
+  set unicodeRange(String value) => _blink.BlinkFontFace.instance.unicodeRange_Setter_(this, value);
   
   @DomName('FontFace.variant')
   @DocsEditable()
   @Experimental() // untriaged
-  String get variant => _blink.BlinkFontFace.instance.variant_Getter_(unwrap_jso(this));
+  String get variant => _blink.BlinkFontFace.instance.variant_Getter_(this);
   
   @DomName('FontFace.variant')
   @DocsEditable()
   @Experimental() // untriaged
-  set variant(String value) => _blink.BlinkFontFace.instance.variant_Setter_(unwrap_jso(this), value);
+  set variant(String value) => _blink.BlinkFontFace.instance.variant_Setter_(this, value);
   
   @DomName('FontFace.weight')
   @DocsEditable()
   @Experimental() // untriaged
-  String get weight => _blink.BlinkFontFace.instance.weight_Getter_(unwrap_jso(this));
+  String get weight => _blink.BlinkFontFace.instance.weight_Getter_(this);
   
   @DomName('FontFace.weight')
   @DocsEditable()
   @Experimental() // untriaged
-  set weight(String value) => _blink.BlinkFontFace.instance.weight_Setter_(unwrap_jso(this), value);
+  set weight(String value) => _blink.BlinkFontFace.instance.weight_Setter_(this, value);
   
   @DomName('FontFace.load')
   @DocsEditable()
   @Experimental() // untriaged
-  Future load() => wrap_jso(_blink.BlinkFontFace.instance.load_Callback_0_(unwrap_jso(this)));
+  Future load() => convertNativePromiseToDartFuture(_blink.BlinkFontFace.instance.load_Callback_0_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18255,11 +18108,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FontFaceSet internalCreateFontFaceSet() {
-    return new FontFaceSet._internalWrap();
-  }
-
-  external factory FontFaceSet._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FontFaceSet.internal_() : super.internal_();
@@ -18268,48 +18117,48 @@
   @DomName('FontFaceSet.size')
   @DocsEditable()
   @Experimental() // untriaged
-  int get size => _blink.BlinkFontFaceSet.instance.size_Getter_(unwrap_jso(this));
+  int get size => _blink.BlinkFontFaceSet.instance.size_Getter_(this);
   
   @DomName('FontFaceSet.status')
   @DocsEditable()
   @Experimental() // untriaged
-  String get status => _blink.BlinkFontFaceSet.instance.status_Getter_(unwrap_jso(this));
+  String get status => _blink.BlinkFontFaceSet.instance.status_Getter_(this);
   
   @DomName('FontFaceSet.add')
   @DocsEditable()
   @Experimental() // untriaged
-  void add(FontFace fontFace) => _blink.BlinkFontFaceSet.instance.add_Callback_1_(unwrap_jso(this), unwrap_jso(fontFace));
+  void add(FontFace fontFace) => _blink.BlinkFontFaceSet.instance.add_Callback_1_(this, fontFace);
   
   bool check(String font, [String text]) {
     if (text != null) {
-      return _blink.BlinkFontFaceSet.instance.check_Callback_2_(unwrap_jso(this), font, text);
+      return _blink.BlinkFontFaceSet.instance.check_Callback_2_(this, font, text);
     }
-    return _blink.BlinkFontFaceSet.instance.check_Callback_1_(unwrap_jso(this), font);
+    return _blink.BlinkFontFaceSet.instance.check_Callback_1_(this, font);
   }
 
   @DomName('FontFaceSet.clear')
   @DocsEditable()
   @Experimental() // untriaged
-  void clear() => _blink.BlinkFontFaceSet.instance.clear_Callback_0_(unwrap_jso(this));
+  void clear() => _blink.BlinkFontFaceSet.instance.clear_Callback_0_(this);
   
   @DomName('FontFaceSet.delete')
   @DocsEditable()
   @Experimental() // untriaged
-  bool delete(FontFace fontFace) => _blink.BlinkFontFaceSet.instance.delete_Callback_1_(unwrap_jso(this), unwrap_jso(fontFace));
+  bool delete(FontFace fontFace) => _blink.BlinkFontFaceSet.instance.delete_Callback_1_(this, fontFace);
   
   void forEach(FontFaceSetForEachCallback callback, [Object thisArg]) {
     if (thisArg != null) {
-      _blink.BlinkFontFaceSet.instance.forEach_Callback_2_(unwrap_jso(this), unwrap_jso((fontFace, fontFaceAgain, set) => callback(wrap_jso(fontFace), wrap_jso(fontFaceAgain), wrap_jso(set))), thisArg);
+      _blink.BlinkFontFaceSet.instance.forEach_Callback_2_(this, callback, thisArg);
       return;
     }
-    _blink.BlinkFontFaceSet.instance.forEach_Callback_1_(unwrap_jso(this), unwrap_jso((fontFace, fontFaceAgain, set) => callback(wrap_jso(fontFace), wrap_jso(fontFaceAgain), wrap_jso(set))));
+    _blink.BlinkFontFaceSet.instance.forEach_Callback_1_(this, callback);
     return;
   }
 
   @DomName('FontFaceSet.has')
   @DocsEditable()
   @Experimental() // untriaged
-  bool has(FontFace fontFace) => _blink.BlinkFontFaceSet.instance.has_Callback_1_(unwrap_jso(this), unwrap_jso(fontFace));
+  bool has(FontFace fontFace) => _blink.BlinkFontFaceSet.instance.has_Callback_1_(this, fontFace);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18338,11 +18187,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FontFaceSetLoadEvent internalCreateFontFaceSetLoadEvent() {
-    return new FontFaceSetLoadEvent._internalWrap();
-  }
-
-  external factory FontFaceSetLoadEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FontFaceSetLoadEvent.internal_() : super.internal_();
@@ -18351,7 +18196,7 @@
   @DomName('FontFaceSetLoadEvent.fontfaces')
   @DocsEditable()
   @Experimental() // untriaged
-  List<FontFace> get fontfaces => wrap_jso(_blink.BlinkFontFaceSetLoadEvent.instance.fontfaces_Getter_(unwrap_jso(this)));
+  List<FontFace> get fontfaces => (_blink.BlinkFontFaceSetLoadEvent.instance.fontfaces_Getter_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18373,37 +18218,65 @@
 
   @DomName('FormData.FormData')
   @DocsEditable()
-  factory FormData([FormElement form]) => wrap_jso(_create(form));
+  factory FormData([FormElement form]) => _create(form);
 
   @DocsEditable()
-  static FormData _create(form) => wrap_jso(_blink.BlinkFormData.instance.constructorCallback_1_(form));
+  static FormData _create(form) => _blink.BlinkFormData.instance.constructorCallback_1_(form);
+
 
   @Deprecated("Internal Use Only")
-  static FormData internalCreateFormData() {
-    return new FormData._internalWrap();
-  }
-
-  factory FormData._internalWrap() {
-    return new FormData.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FormData.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
   @DomName('FormData.append')
   @DocsEditable()
-  void append(String name, String value) => _blink.BlinkFormData.instance.append_Callback_2_(unwrap_jso(this), name, value);
+  void append(String name, String value) => _blink.BlinkFormData.instance.append_Callback_2_(this, name, value);
   
   @DomName('FormData.appendBlob')
   @DocsEditable()
-  void appendBlob(String name, Blob value, [String filename]) => _blink.BlinkFormData.instance.append_Callback_3_(unwrap_jso(this), name, unwrap_jso(value), filename);
+  void appendBlob(String name, Blob value, [String filename]) => _blink.BlinkFormData.instance.append_Callback_3_(this, name, value, filename);
   
+  @DomName('FormData.delete')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void delete(String name) => _blink.BlinkFormData.instance.delete_Callback_1_(this, name);
+  
+  @DomName('FormData.get')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object get(String name) => (_blink.BlinkFormData.instance.get_Callback_1_(this, name));
+  
+  @DomName('FormData.getAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<Object> getAll(String name) => _blink.BlinkFormData.instance.getAll_Callback_1_(this, name);
+  
+  @DomName('FormData.has')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool has(String name) => _blink.BlinkFormData.instance.has_Callback_1_(this, name);
+  
+  void set(String name, value, [String filename]) {
+    if ((value is Blob || value == null) && (name is String || name == null) && filename == null) {
+      _blink.BlinkFormData.instance.set_Callback_2_(this, name, value);
+      return;
+    }
+    if ((filename is String || filename == null) && (value is Blob || value == null) && (name is String || name == null)) {
+      _blink.BlinkFormData.instance.set_Callback_3_(this, name, value, filename);
+      return;
+    }
+    if ((value is String || value == null) && (name is String || name == null) && filename == null) {
+      _blink.BlinkFormData.instance.set_Callback_2_(this, name, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
 }
 // 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
@@ -18424,11 +18297,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FormElement internalCreateFormElement() {
-    return new FormElement._internalWrap();
-  }
-
-  external factory FormElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FormElement.internal_() : super.internal_();
@@ -18442,111 +18311,115 @@
 
   @DomName('HTMLFormElement.acceptCharset')
   @DocsEditable()
-  String get acceptCharset => _blink.BlinkHTMLFormElement.instance.acceptCharset_Getter_(unwrap_jso(this));
+  String get acceptCharset => _blink.BlinkHTMLFormElement.instance.acceptCharset_Getter_(this);
   
   @DomName('HTMLFormElement.acceptCharset')
   @DocsEditable()
-  set acceptCharset(String value) => _blink.BlinkHTMLFormElement.instance.acceptCharset_Setter_(unwrap_jso(this), value);
+  set acceptCharset(String value) => _blink.BlinkHTMLFormElement.instance.acceptCharset_Setter_(this, value);
   
   @DomName('HTMLFormElement.action')
   @DocsEditable()
-  String get action => _blink.BlinkHTMLFormElement.instance.action_Getter_(unwrap_jso(this));
+  String get action => _blink.BlinkHTMLFormElement.instance.action_Getter_(this);
   
   @DomName('HTMLFormElement.action')
   @DocsEditable()
-  set action(String value) => _blink.BlinkHTMLFormElement.instance.action_Setter_(unwrap_jso(this), value);
+  set action(String value) => _blink.BlinkHTMLFormElement.instance.action_Setter_(this, value);
   
   @DomName('HTMLFormElement.autocomplete')
   @DocsEditable()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofilling-form-controls:-the-autocomplete-attribute
   @Experimental()
-  String get autocomplete => _blink.BlinkHTMLFormElement.instance.autocomplete_Getter_(unwrap_jso(this));
+  String get autocomplete => _blink.BlinkHTMLFormElement.instance.autocomplete_Getter_(this);
   
   @DomName('HTMLFormElement.autocomplete')
   @DocsEditable()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofilling-form-controls:-the-autocomplete-attribute
   @Experimental()
-  set autocomplete(String value) => _blink.BlinkHTMLFormElement.instance.autocomplete_Setter_(unwrap_jso(this), value);
+  set autocomplete(String value) => _blink.BlinkHTMLFormElement.instance.autocomplete_Setter_(this, value);
   
   @DomName('HTMLFormElement.encoding')
   @DocsEditable()
-  String get encoding => _blink.BlinkHTMLFormElement.instance.encoding_Getter_(unwrap_jso(this));
+  String get encoding => _blink.BlinkHTMLFormElement.instance.encoding_Getter_(this);
   
   @DomName('HTMLFormElement.encoding')
   @DocsEditable()
-  set encoding(String value) => _blink.BlinkHTMLFormElement.instance.encoding_Setter_(unwrap_jso(this), value);
+  set encoding(String value) => _blink.BlinkHTMLFormElement.instance.encoding_Setter_(this, value);
   
   @DomName('HTMLFormElement.enctype')
   @DocsEditable()
-  String get enctype => _blink.BlinkHTMLFormElement.instance.enctype_Getter_(unwrap_jso(this));
+  String get enctype => _blink.BlinkHTMLFormElement.instance.enctype_Getter_(this);
   
   @DomName('HTMLFormElement.enctype')
   @DocsEditable()
-  set enctype(String value) => _blink.BlinkHTMLFormElement.instance.enctype_Setter_(unwrap_jso(this), value);
+  set enctype(String value) => _blink.BlinkHTMLFormElement.instance.enctype_Setter_(this, value);
   
   @DomName('HTMLFormElement.length')
   @DocsEditable()
-  int get length => _blink.BlinkHTMLFormElement.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkHTMLFormElement.instance.length_Getter_(this);
   
   @DomName('HTMLFormElement.method')
   @DocsEditable()
-  String get method => _blink.BlinkHTMLFormElement.instance.method_Getter_(unwrap_jso(this));
+  String get method => _blink.BlinkHTMLFormElement.instance.method_Getter_(this);
   
   @DomName('HTMLFormElement.method')
   @DocsEditable()
-  set method(String value) => _blink.BlinkHTMLFormElement.instance.method_Setter_(unwrap_jso(this), value);
+  set method(String value) => _blink.BlinkHTMLFormElement.instance.method_Setter_(this, value);
   
   @DomName('HTMLFormElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLFormElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLFormElement.instance.name_Getter_(this);
   
   @DomName('HTMLFormElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLFormElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLFormElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLFormElement.noValidate')
   @DocsEditable()
-  bool get noValidate => _blink.BlinkHTMLFormElement.instance.noValidate_Getter_(unwrap_jso(this));
+  bool get noValidate => _blink.BlinkHTMLFormElement.instance.noValidate_Getter_(this);
   
   @DomName('HTMLFormElement.noValidate')
   @DocsEditable()
-  set noValidate(bool value) => _blink.BlinkHTMLFormElement.instance.noValidate_Setter_(unwrap_jso(this), value);
+  set noValidate(bool value) => _blink.BlinkHTMLFormElement.instance.noValidate_Setter_(this, value);
   
   @DomName('HTMLFormElement.target')
   @DocsEditable()
-  String get target => _blink.BlinkHTMLFormElement.instance.target_Getter_(unwrap_jso(this));
+  String get target => _blink.BlinkHTMLFormElement.instance.target_Getter_(this);
   
   @DomName('HTMLFormElement.target')
   @DocsEditable()
-  set target(String value) => _blink.BlinkHTMLFormElement.instance.target_Setter_(unwrap_jso(this), value);
+  set target(String value) => _blink.BlinkHTMLFormElement.instance.target_Setter_(this, value);
   
-  Element __getter__(index_OR_name) {
-    if ((index_OR_name is int || index_OR_name == null)) {
-      return wrap_jso(_blink.BlinkHTMLFormElement.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name)));
-    }
-    if ((index_OR_name is String || index_OR_name == null)) {
-      return wrap_jso(_blink.BlinkHTMLFormElement.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name)));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
-  }
-
+  @DomName('HTMLFormElement.__getter__')
+  @DocsEditable()
+  Object __getter__(String name) => (_blink.BlinkHTMLFormElement.instance.$__getter___Callback_1_(this, name));
+  
   @DomName('HTMLFormElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLFormElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLFormElement.instance.checkValidity_Callback_0_(this);
+  
+  @DomName('HTMLFormElement.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Element item(int index) => _blink.BlinkHTMLFormElement.instance.item_Callback_1_(this, index);
+  
+  @DomName('HTMLFormElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLFormElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLFormElement.requestAutocomplete')
   @DocsEditable()
   // http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-October/037711.html
   @Experimental()
-  void requestAutocomplete(Map details) => _blink.BlinkHTMLFormElement.instance.requestAutocomplete_Callback_1_(unwrap_jso(this), convertDartToNative_Dictionary(details));
+  void requestAutocomplete(Map details) => _blink.BlinkHTMLFormElement.instance.requestAutocomplete_Callback_1_(this, convertDartToNative_Dictionary(details));
   
   @DomName('HTMLFormElement.reset')
   @DocsEditable()
-  void reset() => _blink.BlinkHTMLFormElement.instance.reset_Callback_0_(unwrap_jso(this));
+  void reset() => _blink.BlinkHTMLFormElement.instance.reset_Callback_0_(this);
   
   @DomName('HTMLFormElement.submit')
   @DocsEditable()
-  void submit() => _blink.BlinkHTMLFormElement.instance.submit_Callback_0_(unwrap_jso(this));
+  void submit() => _blink.BlinkHTMLFormElement.instance.submit_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18556,6 +18429,16 @@
 // WARNING: Do not edit - generated code.
 
 
+@DomName('FrameRequestCallback')
+@Experimental() // untriaged
+typedef void FrameRequestCallback(num highResTime);
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
 @DocsEditable()
 @DomName('Gamepad')
 // https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#gamepad-interface
@@ -18564,46 +18447,42 @@
   // To suppress missing implicit constructor warnings.
   factory Gamepad._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Gamepad internalCreateGamepad() {
-    return new Gamepad._internalWrap();
-  }
 
-  factory Gamepad._internalWrap() {
-    return new Gamepad.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Gamepad.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Gamepad.axes')
   @DocsEditable()
-  List<num> get axes => wrap_jso(_blink.BlinkGamepad.instance.axes_Getter_(unwrap_jso(this)));
+  List<num> get axes => _blink.BlinkGamepad.instance.axes_Getter_(this);
+  
+  @DomName('Gamepad.buttons')
+  @DocsEditable()
+  List<GamepadButton> get buttons => (_blink.BlinkGamepad.instance.buttons_Getter_(this));
   
   @DomName('Gamepad.connected')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get connected => _blink.BlinkGamepad.instance.connected_Getter_(unwrap_jso(this));
+  bool get connected => _blink.BlinkGamepad.instance.connected_Getter_(this);
   
   @DomName('Gamepad.id')
   @DocsEditable()
-  String get id => _blink.BlinkGamepad.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkGamepad.instance.id_Getter_(this);
   
   @DomName('Gamepad.index')
   @DocsEditable()
-  int get index => _blink.BlinkGamepad.instance.index_Getter_(unwrap_jso(this));
+  int get index => _blink.BlinkGamepad.instance.index_Getter_(this);
   
   @DomName('Gamepad.mapping')
   @DocsEditable()
   @Experimental() // untriaged
-  String get mapping => _blink.BlinkGamepad.instance.mapping_Getter_(unwrap_jso(this));
+  String get mapping => _blink.BlinkGamepad.instance.mapping_Getter_(this);
   
   @DomName('Gamepad.timestamp')
   @DocsEditable()
-  int get timestamp => _blink.BlinkGamepad.instance.timestamp_Getter_(unwrap_jso(this));
+  int get timestamp => _blink.BlinkGamepad.instance.timestamp_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18620,30 +18499,22 @@
   // To suppress missing implicit constructor warnings.
   factory GamepadButton._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static GamepadButton internalCreateGamepadButton() {
-    return new GamepadButton._internalWrap();
-  }
 
-  factory GamepadButton._internalWrap() {
-    return new GamepadButton.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   GamepadButton.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('GamepadButton.pressed')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get pressed => _blink.BlinkGamepadButton.instance.pressed_Getter_(unwrap_jso(this));
+  bool get pressed => _blink.BlinkGamepadButton.instance.pressed_Getter_(this);
   
   @DomName('GamepadButton.value')
   @DocsEditable()
   @Experimental() // untriaged
-  num get value => _blink.BlinkGamepadButton.instance.value_Getter_(unwrap_jso(this));
+  num get value => _blink.BlinkGamepadButton.instance.value_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18660,13 +18531,19 @@
   // To suppress missing implicit constructor warnings.
   factory GamepadEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static GamepadEvent internalCreateGamepadEvent() {
-    return new GamepadEvent._internalWrap();
+  @DomName('GamepadEvent.GamepadEvent')
+  @DocsEditable()
+  factory GamepadEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkGamepadEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkGamepadEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory GamepadEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   GamepadEvent.internal_() : super.internal_();
@@ -18675,7 +18552,7 @@
   @DomName('GamepadEvent.gamepad')
   @DocsEditable()
   @Experimental() // untriaged
-  Gamepad get gamepad => wrap_jso(_blink.BlinkGamepadEvent.instance.gamepad_Getter_(unwrap_jso(this)));
+  Gamepad get gamepad => _blink.BlinkGamepadEvent.instance.gamepad_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18692,35 +18569,60 @@
   // To suppress missing implicit constructor warnings.
   factory Geofencing._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Geofencing internalCreateGeofencing() {
-    return new Geofencing._internalWrap();
-  }
 
-  factory Geofencing._internalWrap() {
-    return new Geofencing.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Geofencing.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Geofencing.getRegisteredRegions')
   @DocsEditable()
   @Experimental() // untriaged
-  Future getRegisteredRegions() => wrap_jso(_blink.BlinkGeofencing.instance.getRegisteredRegions_Callback_0_(unwrap_jso(this)));
+  Future getRegisteredRegions() => convertNativePromiseToDartFuture(_blink.BlinkGeofencing.instance.getRegisteredRegions_Callback_0_(this));
   
   @DomName('Geofencing.registerRegion')
   @DocsEditable()
   @Experimental() // untriaged
-  Future registerRegion(GeofencingRegion region) => wrap_jso(_blink.BlinkGeofencing.instance.registerRegion_Callback_1_(unwrap_jso(this), unwrap_jso(region)));
+  Future registerRegion(GeofencingRegion region) => convertNativePromiseToDartFuture(_blink.BlinkGeofencing.instance.registerRegion_Callback_1_(this, region));
   
   @DomName('Geofencing.unregisterRegion')
   @DocsEditable()
   @Experimental() // untriaged
-  Future unregisterRegion(String regionId) => wrap_jso(_blink.BlinkGeofencing.instance.unregisterRegion_Callback_1_(unwrap_jso(this), regionId));
+  Future unregisterRegion(String regionId) => convertNativePromiseToDartFuture(_blink.BlinkGeofencing.instance.unregisterRegion_Callback_1_(this, regionId));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('GeofencingEvent')
+@Experimental() // untriaged
+class GeofencingEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory GeofencingEvent._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  GeofencingEvent.internal_() : super.internal_();
+
+
+  @DomName('GeofencingEvent.id')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get id => _blink.BlinkGeofencingEvent.instance.id_Getter_(this);
+  
+  @DomName('GeofencingEvent.region')
+  @DocsEditable()
+  @Experimental() // untriaged
+  GeofencingRegion get region => _blink.BlinkGeofencingEvent.instance.region_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18737,25 +18639,17 @@
   // To suppress missing implicit constructor warnings.
   factory GeofencingRegion._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static GeofencingRegion internalCreateGeofencingRegion() {
-    return new GeofencingRegion._internalWrap();
-  }
 
-  factory GeofencingRegion._internalWrap() {
-    return new GeofencingRegion.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   GeofencingRegion.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('GeofencingRegion.id')
   @DocsEditable()
   @Experimental() // untriaged
-  String get id => _blink.BlinkGeofencingRegion.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkGeofencingRegion.instance.id_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -18841,46 +18735,38 @@
   // To suppress missing implicit constructor warnings.
   factory Geolocation._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Geolocation internalCreateGeolocation() {
-    return new Geolocation._internalWrap();
-  }
 
-  factory Geolocation._internalWrap() {
-    return new Geolocation.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Geolocation.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Geolocation.clearWatch')
   @DocsEditable()
-  void _clearWatch(int watchID) => _blink.BlinkGeolocation.instance.clearWatch_Callback_1_(unwrap_jso(this), watchID);
+  void _clearWatch(int watchID) => _blink.BlinkGeolocation.instance.clearWatch_Callback_1_(this, watchID);
   
   void _getCurrentPosition(_PositionCallback successCallback, [_PositionErrorCallback errorCallback, Map options]) {
     if (options != null) {
-      _blink.BlinkGeolocation.instance.getCurrentPosition_Callback_3_(unwrap_jso(this), unwrap_jso((position) => successCallback(wrap_jso(position))), unwrap_jso((error) => errorCallback(wrap_jso(error))), convertDartToNative_Dictionary(options));
+      _blink.BlinkGeolocation.instance.getCurrentPosition_Callback_3_(this, successCallback, errorCallback, convertDartToNative_Dictionary(options));
       return;
     }
     if (errorCallback != null) {
-      _blink.BlinkGeolocation.instance.getCurrentPosition_Callback_2_(unwrap_jso(this), unwrap_jso((position) => successCallback(wrap_jso(position))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkGeolocation.instance.getCurrentPosition_Callback_2_(this, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkGeolocation.instance.getCurrentPosition_Callback_1_(unwrap_jso(this), unwrap_jso((position) => successCallback(wrap_jso(position))));
+    _blink.BlinkGeolocation.instance.getCurrentPosition_Callback_1_(this, successCallback);
     return;
   }
 
   int _watchPosition(_PositionCallback successCallback, [_PositionErrorCallback errorCallback, Map options]) {
     if (options != null) {
-      return _blink.BlinkGeolocation.instance.watchPosition_Callback_3_(unwrap_jso(this), unwrap_jso((position) => successCallback(wrap_jso(position))), unwrap_jso((error) => errorCallback(wrap_jso(error))), convertDartToNative_Dictionary(options));
+      return _blink.BlinkGeolocation.instance.watchPosition_Callback_3_(this, successCallback, errorCallback, convertDartToNative_Dictionary(options));
     }
     if (errorCallback != null) {
-      return _blink.BlinkGeolocation.instance.watchPosition_Callback_2_(unwrap_jso(this), unwrap_jso((position) => successCallback(wrap_jso(position))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      return _blink.BlinkGeolocation.instance.watchPosition_Callback_2_(this, successCallback, errorCallback);
     }
-    return _blink.BlinkGeolocation.instance.watchPosition_Callback_1_(unwrap_jso(this), unwrap_jso((position) => successCallback(wrap_jso(position))));
+    return _blink.BlinkGeolocation.instance.watchPosition_Callback_1_(this, successCallback);
   }
 }
 
@@ -18898,28 +18784,20 @@
   // To suppress missing implicit constructor warnings.
   factory Geoposition._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Geoposition internalCreateGeoposition() {
-    return new Geoposition._internalWrap();
-  }
 
-  factory Geoposition._internalWrap() {
-    return new Geoposition.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Geoposition.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Geoposition.coords')
   @DocsEditable()
-  Coordinates get coords => wrap_jso(_blink.BlinkGeoposition.instance.coords_Getter_(unwrap_jso(this)));
+  Coordinates get coords => _blink.BlinkGeoposition.instance.coords_Getter_(this);
   
   @DomName('Geoposition.timestamp')
   @DocsEditable()
-  int get timestamp => _blink.BlinkGeoposition.instance.timestamp_Getter_(unwrap_jso(this));
+  int get timestamp => _blink.BlinkGeoposition.instance.timestamp_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -19485,11 +19363,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static HRElement internalCreateHRElement() {
-    return new HRElement._internalWrap();
-  }
-
-  external factory HRElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HRElement.internal_() : super.internal_();
@@ -19504,12 +19378,12 @@
   @DomName('HTMLHRElement.color')
   @DocsEditable()
   @Experimental() // untriaged
-  String get color => _blink.BlinkHTMLHRElement.instance.color_Getter_(unwrap_jso(this));
+  String get color => _blink.BlinkHTMLHRElement.instance.color_Getter_(this);
   
   @DomName('HTMLHRElement.color')
   @DocsEditable()
   @Experimental() // untriaged
-  set color(String value) => _blink.BlinkHTMLHRElement.instance.color_Setter_(unwrap_jso(this), value);
+  set color(String value) => _blink.BlinkHTMLHRElement.instance.color_Setter_(this, value);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -19535,16 +19409,20 @@
     return event;
   }
 
-  // To suppress missing implicit constructor warnings.
-  factory HashChangeEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('HashChangeEvent.HashChangeEvent')
+  @DocsEditable()
+  factory HashChangeEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkHashChangeEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkHashChangeEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static HashChangeEvent internalCreateHashChangeEvent() {
-    return new HashChangeEvent._internalWrap();
-  }
-
-  external factory HashChangeEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HashChangeEvent.internal_() : super.internal_();
@@ -19555,15 +19433,15 @@
 
   @DomName('HashChangeEvent.newURL')
   @DocsEditable()
-  String get newUrl => _blink.BlinkHashChangeEvent.instance.newURL_Getter_(unwrap_jso(this));
+  String get newUrl => _blink.BlinkHashChangeEvent.instance.newURL_Getter_(this);
   
   @DomName('HashChangeEvent.oldURL')
   @DocsEditable()
-  String get oldUrl => _blink.BlinkHashChangeEvent.instance.oldURL_Getter_(unwrap_jso(this));
+  String get oldUrl => _blink.BlinkHashChangeEvent.instance.oldURL_Getter_(this);
   
   @DomName('HashChangeEvent.initHashChangeEvent')
   @DocsEditable()
-  void _initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) => _blink.BlinkHashChangeEvent.instance.initHashChangeEvent_Callback_5_(unwrap_jso(this), type, canBubble, cancelable, oldURL, newURL);
+  void _initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) => _blink.BlinkHashChangeEvent.instance.initHashChangeEvent_Callback_5_(this, type, canBubble, cancelable, oldURL, newURL);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -19585,11 +19463,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static HeadElement internalCreateHeadElement() {
-    return new HeadElement._internalWrap();
-  }
-
-  external factory HeadElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HeadElement.internal_() : super.internal_();
@@ -19620,47 +19494,28 @@
   @DocsEditable()
   factory Headers([input]) {
     if (input == null) {
-      return wrap_jso(_blink.BlinkHeaders.instance.constructorCallback_0_());
+      return _blink.BlinkHeaders.instance.constructorCallback_0_();
     }
-    if ((input is Headers || input == null)) {
-      return wrap_jso(_blink.BlinkHeaders.instance.constructorCallback_1_(input));
+    if ((input is Headers)) {
+      return _blink.BlinkHeaders.instance.constructorCallback_1_(input);
     }
-    if ((input is Map || input == null)) {
+    if ((input is Map)) {
       var input_1 = convertDartToNative_Dictionary(input);
-      return wrap_jso(_blink.BlinkHeaders.instance.constructorCallback_1_(input_1));
+      return _blink.BlinkHeaders.instance.constructorCallback_1_(input_1);
+    }
+    if ((input is List<Object>)) {
+      return _blink.BlinkHeaders.instance.constructorCallback_1_(input);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @Deprecated("Internal Use Only")
-  static Headers internalCreateHeaders() {
-    return new Headers._internalWrap();
-  }
 
-  factory Headers._internalWrap() {
-    return new Headers.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Headers.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('Headers.size')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int get size => _blink.BlinkHeaders.instance.size_Getter_(unwrap_jso(this));
-  
-  void forEach(HeadersForEachCallback callback, [Object thisArg]) {
-    if (thisArg != null) {
-      _blink.BlinkHeaders.instance.forEach_Callback_2_(unwrap_jso(this), unwrap_jso((String value, String key, map) => callback(value, key, wrap_jso(map))), thisArg);
-      return;
-    }
-    _blink.BlinkHeaders.instance.forEach_Callback_1_(unwrap_jso(this), unwrap_jso((String value, String key, map) => callback(value, key, wrap_jso(map))));
-    return;
-  }
-
 }
 // 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
@@ -19669,16 +19524,6 @@
 // WARNING: Do not edit - generated code.
 
 
-@DomName('HeadersForEachCallback')
-@Experimental() // untriaged
-typedef void HeadersForEachCallback(String value, String key, Headers map);
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
 @DocsEditable()
 @DomName('HTMLHeadingElement')
 class HeadingElement extends HtmlElement {
@@ -19711,11 +19556,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static HeadingElement internalCreateHeadingElement() {
-    return new HeadingElement._internalWrap();
-  }
-
-  external factory HeadingElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HeadingElement.internal_() : super.internal_();
@@ -19749,57 +19590,102 @@
   // To suppress missing implicit constructor warnings.
   factory History._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static History internalCreateHistory() {
-    return new History._internalWrap();
-  }
 
-  factory History._internalWrap() {
-    return new History.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   History.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('History.length')
   @DocsEditable()
-  int get length => _blink.BlinkHistory.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkHistory.instance.length_Getter_(this);
+  
+  @DomName('History.options')
+  @DocsEditable()
+  @Experimental() // untriaged
+   get options => convertNativeDictionaryToDartDictionary((_blink.BlinkHistory.instance.options_Getter_(this)));
   
   @DomName('History.state')
   @DocsEditable()
-  dynamic get state => wrap_jso(_blink.BlinkHistory.instance.state_Getter_(unwrap_jso(this)));
+  dynamic get state => convertNativeToDart_SerializedScriptValue(_blink.BlinkHistory.instance.state_Getter_(this));
   
   @DomName('History.back')
   @DocsEditable()
-  void back() => _blink.BlinkHistory.instance.back_Callback_0_(unwrap_jso(this));
+  void back() => _blink.BlinkHistory.instance.back_Callback_0_(this);
   
   @DomName('History.forward')
   @DocsEditable()
-  void forward() => _blink.BlinkHistory.instance.forward_Callback_0_(unwrap_jso(this));
+  void forward() => _blink.BlinkHistory.instance.forward_Callback_0_(this);
   
-  @DomName('History.go')
-  @DocsEditable()
-  void go(int distance) => _blink.BlinkHistory.instance.go_Callback_1_(unwrap_jso(this), distance);
-  
-  @DomName('History.pushState')
-  @DocsEditable()
-  @SupportedBrowser(SupportedBrowser.CHROME)
-  @SupportedBrowser(SupportedBrowser.FIREFOX)
-  @SupportedBrowser(SupportedBrowser.IE, '10')
-  @SupportedBrowser(SupportedBrowser.SAFARI)
-  void pushState(Object data, String title, [String url]) => _blink.BlinkHistory.instance.pushState_Callback_3_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(data), title, url);
-  
-  @DomName('History.replaceState')
-  @DocsEditable()
-  @SupportedBrowser(SupportedBrowser.CHROME)
-  @SupportedBrowser(SupportedBrowser.FIREFOX)
-  @SupportedBrowser(SupportedBrowser.IE, '10')
-  @SupportedBrowser(SupportedBrowser.SAFARI)
-  void replaceState(Object data, String title, [String url]) => _blink.BlinkHistory.instance.replaceState_Callback_3_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(data), title, url);
+  void go([int delta]) {
+    if (delta != null) {
+      _blink.BlinkHistory.instance.go_Callback_1_(this, delta);
+      return;
+    }
+    _blink.BlinkHistory.instance.go_Callback_0_(this);
+    return;
   }
+
+  void pushState(/*SerializedScriptValue*/ data, String title, String url, [Map options]) {
+    if (options != null) {
+      _blink.BlinkHistory.instance.pushState_Callback_4_(this, convertDartToNative_SerializedScriptValue(data), title, url, convertDartToNative_Dictionary(options));
+      return;
+    }
+    _blink.BlinkHistory.instance.pushState_Callback_3_(this, convertDartToNative_SerializedScriptValue(data), title, url);
+    return;
+  }
+
+  void replaceState(/*SerializedScriptValue*/ data, String title, String url, [Map options]) {
+    if (options != null) {
+      _blink.BlinkHistory.instance.replaceState_Callback_4_(this, convertDartToNative_SerializedScriptValue(data), title, url, convertDartToNative_Dictionary(options));
+      return;
+    }
+    _blink.BlinkHistory.instance.replaceState_Callback_3_(this, convertDartToNative_SerializedScriptValue(data), title, url);
+    return;
+  }
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('HMDVRDevice')
+@Experimental() // untriaged
+class HmdvrDevice extends VRDevice {
+  // To suppress missing implicit constructor warnings.
+  factory HmdvrDevice._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  HmdvrDevice.internal_() : super.internal_();
+
+
+  @DomName('HMDVRDevice.getEyeParameters')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VREyeParameters getEyeParameters(String whichEye) => _blink.BlinkHMDVRDevice.instance.getEyeParameters_Callback_1_(this, whichEye);
+  
+  void setFieldOfView([VRFieldOfView leftFov, VRFieldOfView rightFov]) {
+    if (rightFov != null) {
+      _blink.BlinkHMDVRDevice.instance.setFieldOfView_Callback_2_(this, leftFov, rightFov);
+      return;
+    }
+    if (leftFov != null) {
+      _blink.BlinkHMDVRDevice.instance.setFieldOfView_Callback_1_(this, leftFov);
+      return;
+    }
+    _blink.BlinkHMDVRDevice.instance.setFieldOfView_Callback_0_(this);
+    return;
+  }
+
+}
 // 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.
@@ -19813,32 +19699,24 @@
   // To suppress missing implicit constructor warnings.
   factory HtmlCollection._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static HtmlCollection internalCreateHtmlCollection() {
-    return new HtmlCollection._internalWrap();
-  }
 
-  factory HtmlCollection._internalWrap() {
-    return new HtmlCollection.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HtmlCollection.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('HTMLCollection.length')
   @DocsEditable()
-  int get length => _blink.BlinkHTMLCollection.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkHTMLCollection.instance.length_Getter_(this);
   
   Node operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkHTMLCollection.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  Node _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkHTMLCollection.instance.item_Callback_1_(unwrap_jso(this), index));
+  Node _nativeIndexedGetter(int index) => (_blink.BlinkHTMLCollection.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, Node value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -19880,11 +19758,11 @@
 
   @DomName('HTMLCollection.item')
   @DocsEditable()
-  Element item(int index) => wrap_jso(_blink.BlinkHTMLCollection.instance.item_Callback_1_(unwrap_jso(this), index));
+  Element item(int index) => _blink.BlinkHTMLCollection.instance.item_Callback_1_(this, index);
   
   @DomName('HTMLCollection.namedItem')
   @DocsEditable()
-  Element namedItem(String name) => wrap_jso(_blink.BlinkHTMLCollection.instance.namedItem_Callback_1_(unwrap_jso(this), name));
+  Element namedItem(String name) => _blink.BlinkHTMLCollection.instance.namedItem_Callback_1_(this, name);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -19901,11 +19779,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static HtmlDocument internalCreateHtmlDocument() {
-    return new HtmlDocument._internalWrap();
-  }
-
-  external factory HtmlDocument._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HtmlDocument.internal_() : super.internal_();
@@ -20243,6 +20117,10 @@
    */
   void registerElement(String tag, Type customElementClass,
       {String extendsTag}) {
+    // Hack to setup an interceptor for HTMLElement so it isn't changed when a custom element is created.
+    var jsHTMLElementPrototype = js.JsNative.getProperty(js.JsNative.getProperty(js.context, 'HTMLElement'),'prototype');
+    _blink.Blink_Utils.defineInterceptor(jsHTMLElementPrototype, HtmlElement.instanceRuntimeType);
+
     // Figure out which DOM class is being extended from the user's Dart class.
     var classMirror = reflectClass(customElementClass);
 
@@ -20294,9 +20172,6 @@
       }
       var elemProto = js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'Object'), "create", [js.JsNative.getProperty(baseElement, 'prototype')]);
 
-      // Remember for any upgrading done in wrap_jso.
-      addCustomElementType(tag, customElementClass, extendsTag);
-
       // TODO(terry): Hack to stop recursion re-creating custom element when the
       //              created() constructor of the custom element does e.g.,
       //
@@ -20308,77 +20183,46 @@
       //              until stack overflow.
       //
       //              See https://github.com/dart-lang/sdk/issues/23666
-      int creating = 0;
+      int creating = 0; // TODO(jacobr): I think I broke thise case. Will fix monday.
 
       // If any JS code is hooked we want to call it too.
-      var oldCreatedCallback = elemProto['createdCallback'];
-      var oldAttributeChangedCallback = elemProto['attributeChangedCallback'];
-      var oldAttachedCallback = elemProto['attachedCallback'];
-      var oldDetachedCallback = elemProto['detachedCallback'];
+      var oldCreatedCallback = js.JsNative.getProperty(elemProto, 'createdCallback');
+      var oldAttributeChangedCallback = js.JsNative.getProperty(elemProto, 'attributeChangedCallback');
+      var oldAttachedCallback = js.JsNative.getProperty(elemProto, 'attachedCallback');
+      var oldDetachedCallback = js.JsNative.getProperty(elemProto, 'detachedCallback');
 
-      // TODO(jacobr): warning:
-      elemProto['createdCallback'] = js.JsNative.withThis(($this) {
-        if (_getJSClassName(reflectClass(customElementClass).superclass) != null && creating < 2) {
-          creating++;
+      js.JsNative.setProperty(elemProto, 'createdCallback', js.allowInteropCaptureThis(($this) {
+        // The created callback has already been called by the very act of passing a JS
+        // custom element from JS to Dart.
 
-          var dartClass;
-          try {
-            if (extendsTag != null) {
-              // If we're extending a native element then create that element.
-              // Then upgrade that element to the customElementClass through
-              // normal flow.
-              dartClass = document.createElement(extendsTag);
-              js.setDartHtmlWrapperFor($this, dartClass);
-              dartClass.blink_jsObject = $this;
-            }
-
-            // Upgrade to the CustomElement Dart class.
-            dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
-          } catch (e) {
-            // Got a problem make it an HtmlElement and rethrow the error.
-            dartClass = HtmlElement.internalCreateHtmlElement();
-            // We need to remember the JS object (because constructElement failed
-            // it normally sets up the blink_jsObject.
-            dartClass.blink_jsObject = $this;
-
-            // Mark to only try this once don't try upgrading from HtmlElement
-            // to the user's Dart class - we had a problem.
-            dartClass._badUpgrade();
-            throw e;
-          } finally {
-            // Need to remember the Dart class that was created for this custom so
-            // return it and setup the blink_jsObject to the $this that we'll be working
-            // with as we talk to blink.
-            js.setDartHtmlWrapperFor($this, dartClass);
-
-            creating--;
-          }
-        }
+        //  Make element's interceptor a CustomElementClass.
+        _blink.Blink_Utils.setInstanceInterceptorCustomUpgrade($this);
 
         if (oldCreatedCallback != null)
-          oldCreatedCallback.apply([], thisArg: unwrap_jso($this));
-      });
-      elemProto['attributeChangedCallback'] = new js.JsFunction.withThis(($this, attrName, oldVal, newVal) {
+          oldCreatedCallback.apply([], thisArg: $this);
+      }));
+      js.JsNative.setProperty(elemProto, 'attributeChangedCallback', js.allowInteropCaptureThis(($this, attrName, oldVal, newVal) {
         $this.attributeChanged(attrName, oldVal, newVal);
 
         if (oldAttributeChangedCallback != null)
-          oldAttributeChangedCallback.apply([], thisArg: unwrap_jso($this));
-      });
-      elemProto['attachedCallback'] = new js.JsFunction.withThis(($this) {
+          oldAttributeChangedCallback.apply([], thisArg: $this);
+      }));
+      js.JsNative.setProperty(elemProto, 'attachedCallback', js.allowInteropCaptureThis(($this) {
         $this.attached();
 
         if (oldAttachedCallback != null)
-          oldAttachedCallback.apply([], thisArg: unwrap_jso($this));
-      });
-      elemProto['detachedCallback'] = new js.JsFunction.withThis(($this) {
+          oldAttachedCallback.apply([], thisArg: $this);
+      }));
+      js.JsNative.setProperty(elemProto, 'detachedCallback', js.allowInteropCaptureThis(($this) {
         $this.detached();
 
         if (oldDetachedCallback != null)
-          oldDetachedCallback.apply([], thisArg: unwrap_jso($this));
-      });
+          oldDetachedCallback.apply([], thisArg: $this);
+      }));
       // document.registerElement('x-foo', {prototype: elemProto, extends: extendsTag});
       var jsMap = new js.JsObject.jsify({'prototype': elemProto, 'extends': extendsTag});
-      js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'document'), 'registerElement', [tag, jsMap]);
+      _blink.Blink_Utils.defineInterceptorCustomElement(elemProto, customElementClass);
+      js.JsNative.callMethod(document, 'registerElement', [tag, jsMap]);
     }
   }
 
@@ -20701,11 +20545,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static HtmlElement internalCreateHtmlElement() {
-    return new HtmlElement._internalWrap();
-  }
-
-  external factory HtmlElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HtmlElement.internal_() : super.internal_();
@@ -20719,98 +20559,98 @@
 
   @DomName('HTMLElement.contentEditable')
   @DocsEditable()
-  String get contentEditable => _blink.BlinkHTMLElement.instance.contentEditable_Getter_(unwrap_jso(this));
+  String get contentEditable => _blink.BlinkHTMLElement.instance.contentEditable_Getter_(this);
   
   @DomName('HTMLElement.contentEditable')
   @DocsEditable()
-  set contentEditable(String value) => _blink.BlinkHTMLElement.instance.contentEditable_Setter_(unwrap_jso(this), value);
+  set contentEditable(String value) => _blink.BlinkHTMLElement.instance.contentEditable_Setter_(this, value);
   
   @DomName('HTMLElement.contextMenu')
   @DocsEditable()
   @Experimental() // untriaged
-  MenuElement get contextMenu => wrap_jso(_blink.BlinkHTMLElement.instance.contextMenu_Getter_(unwrap_jso(this)));
+  MenuElement get contextMenu => _blink.BlinkHTMLElement.instance.contextMenu_Getter_(this);
   
   @DomName('HTMLElement.contextMenu')
   @DocsEditable()
   @Experimental() // untriaged
-  set contextMenu(MenuElement value) => _blink.BlinkHTMLElement.instance.contextMenu_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set contextMenu(MenuElement value) => _blink.BlinkHTMLElement.instance.contextMenu_Setter_(this, value);
   
   @DomName('HTMLElement.dir')
   @DocsEditable()
-  String get dir => _blink.BlinkHTMLElement.instance.dir_Getter_(unwrap_jso(this));
+  String get dir => _blink.BlinkHTMLElement.instance.dir_Getter_(this);
   
   @DomName('HTMLElement.dir')
   @DocsEditable()
-  set dir(String value) => _blink.BlinkHTMLElement.instance.dir_Setter_(unwrap_jso(this), value);
+  set dir(String value) => _blink.BlinkHTMLElement.instance.dir_Setter_(this, value);
   
   @DomName('HTMLElement.draggable')
   @DocsEditable()
-  bool get draggable => _blink.BlinkHTMLElement.instance.draggable_Getter_(unwrap_jso(this));
+  bool get draggable => _blink.BlinkHTMLElement.instance.draggable_Getter_(this);
   
   @DomName('HTMLElement.draggable')
   @DocsEditable()
-  set draggable(bool value) => _blink.BlinkHTMLElement.instance.draggable_Setter_(unwrap_jso(this), value);
+  set draggable(bool value) => _blink.BlinkHTMLElement.instance.draggable_Setter_(this, value);
   
   @DomName('HTMLElement.hidden')
   @DocsEditable()
-  bool get hidden => _blink.BlinkHTMLElement.instance.hidden_Getter_(unwrap_jso(this));
+  bool get hidden => _blink.BlinkHTMLElement.instance.hidden_Getter_(this);
   
   @DomName('HTMLElement.hidden')
   @DocsEditable()
-  set hidden(bool value) => _blink.BlinkHTMLElement.instance.hidden_Setter_(unwrap_jso(this), value);
-  
-  @DomName('HTMLElement.inputMethodContext')
-  @DocsEditable()
-  @Experimental() // untriaged
-  InputMethodContext get inputMethodContext => wrap_jso(_blink.BlinkHTMLElement.instance.inputMethodContext_Getter_(unwrap_jso(this)));
+  set hidden(bool value) => _blink.BlinkHTMLElement.instance.hidden_Setter_(this, value);
   
   @DomName('HTMLElement.isContentEditable')
   @DocsEditable()
-  bool get isContentEditable => _blink.BlinkHTMLElement.instance.isContentEditable_Getter_(unwrap_jso(this));
+  bool get isContentEditable => _blink.BlinkHTMLElement.instance.isContentEditable_Getter_(this);
   
   @DomName('HTMLElement.lang')
   @DocsEditable()
-  String get lang => _blink.BlinkHTMLElement.instance.lang_Getter_(unwrap_jso(this));
+  String get lang => _blink.BlinkHTMLElement.instance.lang_Getter_(this);
   
   @DomName('HTMLElement.lang')
   @DocsEditable()
-  set lang(String value) => _blink.BlinkHTMLElement.instance.lang_Setter_(unwrap_jso(this), value);
+  set lang(String value) => _blink.BlinkHTMLElement.instance.lang_Setter_(this, value);
   
   @DomName('HTMLElement.spellcheck')
   @DocsEditable()
   // http://blog.whatwg.org/the-road-to-html-5-spellchecking
   @Experimental() // nonstandard
-  bool get spellcheck => _blink.BlinkHTMLElement.instance.spellcheck_Getter_(unwrap_jso(this));
+  bool get spellcheck => _blink.BlinkHTMLElement.instance.spellcheck_Getter_(this);
   
   @DomName('HTMLElement.spellcheck')
   @DocsEditable()
   // http://blog.whatwg.org/the-road-to-html-5-spellchecking
   @Experimental() // nonstandard
-  set spellcheck(bool value) => _blink.BlinkHTMLElement.instance.spellcheck_Setter_(unwrap_jso(this), value);
+  set spellcheck(bool value) => _blink.BlinkHTMLElement.instance.spellcheck_Setter_(this, value);
+  
+  @DomName('HTMLElement.style')
+  @DocsEditable()
+  @Experimental() // untriaged
+  CssStyleDeclaration get style => _blink.BlinkHTMLElement.instance.style_Getter_(this);
   
   @DomName('HTMLElement.tabIndex')
   @DocsEditable()
-  int get tabIndex => _blink.BlinkHTMLElement.instance.tabIndex_Getter_(unwrap_jso(this));
+  int get tabIndex => _blink.BlinkHTMLElement.instance.tabIndex_Getter_(this);
   
   @DomName('HTMLElement.tabIndex')
   @DocsEditable()
-  set tabIndex(int value) => _blink.BlinkHTMLElement.instance.tabIndex_Setter_(unwrap_jso(this), value);
+  set tabIndex(int value) => _blink.BlinkHTMLElement.instance.tabIndex_Setter_(this, value);
   
   @DomName('HTMLElement.title')
   @DocsEditable()
-  String get title => _blink.BlinkHTMLElement.instance.title_Getter_(unwrap_jso(this));
+  String get title => _blink.BlinkHTMLElement.instance.title_Getter_(this);
   
   @DomName('HTMLElement.title')
   @DocsEditable()
-  set title(String value) => _blink.BlinkHTMLElement.instance.title_Setter_(unwrap_jso(this), value);
+  set title(String value) => _blink.BlinkHTMLElement.instance.title_Setter_(this, value);
   
   @DomName('HTMLElement.translate')
   @DocsEditable()
-  bool get translate => _blink.BlinkHTMLElement.instance.translate_Getter_(unwrap_jso(this));
+  bool get translate => _blink.BlinkHTMLElement.instance.translate_Getter_(this);
   
   @DomName('HTMLElement.translate')
   @DocsEditable()
-  set translate(bool value) => _blink.BlinkHTMLElement.instance.translate_Setter_(unwrap_jso(this), value);
+  set translate(bool value) => _blink.BlinkHTMLElement.instance.translate_Setter_(this, value);
   
   @DomName('HTMLElement.webkitdropzone')
   @DocsEditable()
@@ -20818,7 +20658,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute
-  String get dropzone => _blink.BlinkHTMLElement.instance.webkitdropzone_Getter_(unwrap_jso(this));
+  String get dropzone => _blink.BlinkHTMLElement.instance.webkitdropzone_Getter_(this);
   
   @DomName('HTMLElement.webkitdropzone')
   @DocsEditable()
@@ -20826,11 +20666,21 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute
-  set dropzone(String value) => _blink.BlinkHTMLElement.instance.webkitdropzone_Setter_(unwrap_jso(this), value);
+  set dropzone(String value) => _blink.BlinkHTMLElement.instance.webkitdropzone_Setter_(this, value);
+  
+  @DomName('HTMLElement.blur')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blur() => _blink.BlinkHTMLElement.instance.blur_Callback_0_(this);
   
   @DomName('HTMLElement.click')
   @DocsEditable()
-  void click() => _blink.BlinkHTMLElement.instance.click_Callback_0_(unwrap_jso(this));
+  void click() => _blink.BlinkHTMLElement.instance.click_Callback_0_(this);
+  
+  @DomName('HTMLElement.focus')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void focus() => _blink.BlinkHTMLElement.instance.focus_Callback_0_(this);
   
   @DomName('HTMLElement.onabort')
   @DocsEditable()
@@ -21092,18 +20942,6 @@
   @Experimental() // untriaged
   ElementStream<Event> get onWaiting => waitingEvent.forElement(this);
 
-  // Flags to only try upgrading once. If there's a failure don't try upgrading
-  // anymore.
-  bool _badUpgradeOccurred = false;
-
-  /// Required for SDK Infrastructure. Internal use only.
-  ///
-  /// Did this encounter a failure attempting to upgrade to
-  /// a custom element.
-  @Deprecated("Required for SDK Infrastructure. Internal use only.")
-  bool get isBadUpgrade => _badUpgradeOccurred;
-
-  void _badUpgrade() { _badUpgradeOccurred = true; }
 }
 // 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
@@ -21120,19 +20958,20 @@
 
 
   @Deprecated("Internal Use Only")
-  static HtmlFormControlsCollection internalCreateHtmlFormControlsCollection() {
-    return new HtmlFormControlsCollection._internalWrap();
-  }
-
-  external factory HtmlFormControlsCollection._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HtmlFormControlsCollection.internal_() : super.internal_();
 
 
+  @DomName('HTMLFormControlsCollection.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Node item(int index) => _blink.BlinkHTMLFormControlsCollection.instance.item_Callback_1_(this, index);
+  
   @DomName('HTMLFormControlsCollection.namedItem')
   @DocsEditable()
-  Object namedItem(String name) => wrap_jso(_blink.BlinkHTMLFormControlsCollection.instance.namedItem_Callback_1_(unwrap_jso(this), name));
+  Object namedItem(String name) => (_blink.BlinkHTMLFormControlsCollection.instance.namedItem_Callback_1_(this, name));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -21154,11 +20993,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static HtmlHtmlElement internalCreateHtmlHtmlElement() {
-    return new HtmlHtmlElement._internalWrap();
-  }
-
-  external factory HtmlHtmlElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HtmlHtmlElement.internal_() : super.internal_();
@@ -21186,16 +21021,17 @@
 
 
   @Deprecated("Internal Use Only")
-  static HtmlOptionsCollection internalCreateHtmlOptionsCollection() {
-    return new HtmlOptionsCollection._internalWrap();
-  }
-
-  external factory HtmlOptionsCollection._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HtmlOptionsCollection.internal_() : super.internal_();
 
 
+  @DomName('HTMLOptionsCollection.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Node _item(int index) => _blink.BlinkHTMLOptionsCollection.instance.item_Callback_1_(this, index);
+  
 }
 // 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
@@ -21552,9 +21388,9 @@
   @DocsEditable()
   void open(String method, String url, {bool async, String user, String password}) {
     if (async == null && user == null && password == null) {
-      _blink.BlinkXMLHttpRequest.instance.open_Callback_2_(unwrap_jso(this), method, url);
+      _blink.BlinkXMLHttpRequest.instance.open_Callback_2_(this, method, url);
     } else {
-      _blink.BlinkXMLHttpRequest.instance.open_Callback_5_(unwrap_jso(this), method, url, async, user, password);
+      _blink.BlinkXMLHttpRequest.instance.open_Callback_5_(this, method, url, async, user, password);
     }
   }
 
@@ -21589,18 +21425,13 @@
    */
   @DomName('XMLHttpRequest.XMLHttpRequest')
   @DocsEditable()
-  factory HttpRequest() => wrap_jso(_create());
-
-  @DocsEditable()
-  static HttpRequest _create() => wrap_jso(_blink.BlinkXMLHttpRequest.instance.constructorCallback_0_());
+  factory HttpRequest() {
+    return _blink.BlinkXMLHttpRequest.instance.constructorCallback_0_();
+  }
 
 
   @Deprecated("Internal Use Only")
-  static HttpRequest internalCreateHttpRequest() {
-    return new HttpRequest._internalWrap();
-  }
-
-  external factory HttpRequest._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HttpRequest.internal_() : super.internal_();
@@ -21660,7 +21491,7 @@
    */
   @DomName('XMLHttpRequest.readyState')
   @DocsEditable()
-  int get readyState => _blink.BlinkXMLHttpRequest.instance.readyState_Getter_(unwrap_jso(this));
+  int get readyState => _blink.BlinkXMLHttpRequest.instance.readyState_Getter_(this);
   
   /**
    * The data received as a reponse from the request.
@@ -21675,14 +21506,14 @@
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.IE, '10')
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  Object get response => wrap_jso(_blink.BlinkXMLHttpRequest.instance.response_Getter_(unwrap_jso(this)));
+  Object get response => _convertNativeToDart_XHR_Response(_blink.BlinkXMLHttpRequest.instance.response_Getter_(this));
   
   /**
    * The response in String form or empty String on failure.
    */
   @DomName('XMLHttpRequest.responseText')
   @DocsEditable()
-  String get responseText => _blink.BlinkXMLHttpRequest.instance.responseText_Getter_(unwrap_jso(this));
+  String get responseText => _blink.BlinkXMLHttpRequest.instance.responseText_Getter_(this);
   
   /**
    * [String] telling the server the desired response format.
@@ -21697,7 +21528,7 @@
    */
   @DomName('XMLHttpRequest.responseType')
   @DocsEditable()
-  String get responseType => _blink.BlinkXMLHttpRequest.instance.responseType_Getter_(unwrap_jso(this));
+  String get responseType => _blink.BlinkXMLHttpRequest.instance.responseType_Getter_(this);
   
   /**
    * [String] telling the server the desired response format.
@@ -21712,12 +21543,12 @@
    */
   @DomName('XMLHttpRequest.responseType')
   @DocsEditable()
-  set responseType(String value) => _blink.BlinkXMLHttpRequest.instance.responseType_Setter_(unwrap_jso(this), value);
+  set responseType(String value) => _blink.BlinkXMLHttpRequest.instance.responseType_Setter_(this, value);
   
   @DomName('XMLHttpRequest.responseURL')
   @DocsEditable()
   @Experimental() // untriaged
-  String get responseUrl => _blink.BlinkXMLHttpRequest.instance.responseURL_Getter_(unwrap_jso(this));
+  String get responseUrl => _blink.BlinkXMLHttpRequest.instance.responseURL_Getter_(this);
   
   /**
    * The request response, or null on failure.
@@ -21728,7 +21559,7 @@
    */
   @DomName('XMLHttpRequest.responseXML')
   @DocsEditable()
-  Document get responseXml => wrap_jso(_blink.BlinkXMLHttpRequest.instance.responseXML_Getter_(unwrap_jso(this)));
+  Document get responseXml => _blink.BlinkXMLHttpRequest.instance.responseXML_Getter_(this);
   
   /**
    * The HTTP result code from the request (200, 404, etc).
@@ -21736,7 +21567,7 @@
    */
   @DomName('XMLHttpRequest.status')
   @DocsEditable()
-  int get status => _blink.BlinkXMLHttpRequest.instance.status_Getter_(unwrap_jso(this));
+  int get status => _blink.BlinkXMLHttpRequest.instance.status_Getter_(this);
   
   /**
    * The request response string (such as \"200 OK\").
@@ -21744,7 +21575,7 @@
    */
   @DomName('XMLHttpRequest.statusText')
   @DocsEditable()
-  String get statusText => _blink.BlinkXMLHttpRequest.instance.statusText_Getter_(unwrap_jso(this));
+  String get statusText => _blink.BlinkXMLHttpRequest.instance.statusText_Getter_(this);
   
   /**
    * Length of time before a request is automatically terminated.
@@ -21763,7 +21594,7 @@
   @DomName('XMLHttpRequest.timeout')
   @DocsEditable()
   @Experimental() // untriaged
-  int get timeout => _blink.BlinkXMLHttpRequest.instance.timeout_Getter_(unwrap_jso(this));
+  int get timeout => _blink.BlinkXMLHttpRequest.instance.timeout_Getter_(this);
   
   /**
    * Length of time before a request is automatically terminated.
@@ -21782,7 +21613,7 @@
   @DomName('XMLHttpRequest.timeout')
   @DocsEditable()
   @Experimental() // untriaged
-  set timeout(int value) => _blink.BlinkXMLHttpRequest.instance.timeout_Setter_(unwrap_jso(this), value);
+  set timeout(int value) => _blink.BlinkXMLHttpRequest.instance.timeout_Setter_(this, value);
   
   /**
    * [EventTarget] that can hold listeners to track the progress of the request.
@@ -21791,7 +21622,7 @@
   @DomName('XMLHttpRequest.upload')
   @DocsEditable()
   @Unstable()
-  HttpRequestUpload get upload => wrap_jso(_blink.BlinkXMLHttpRequest.instance.upload_Getter_(unwrap_jso(this)));
+  HttpRequestUpload get upload => _blink.BlinkXMLHttpRequest.instance.upload_Getter_(this);
   
   /**
    * True if cross-site requests should use credentials such as cookies
@@ -21801,7 +21632,7 @@
    */
   @DomName('XMLHttpRequest.withCredentials')
   @DocsEditable()
-  bool get withCredentials => _blink.BlinkXMLHttpRequest.instance.withCredentials_Getter_(unwrap_jso(this));
+  bool get withCredentials => _blink.BlinkXMLHttpRequest.instance.withCredentials_Getter_(this);
   
   /**
    * True if cross-site requests should use credentials such as cookies
@@ -21811,7 +21642,7 @@
    */
   @DomName('XMLHttpRequest.withCredentials')
   @DocsEditable()
-  set withCredentials(bool value) => _blink.BlinkXMLHttpRequest.instance.withCredentials_Setter_(unwrap_jso(this), value);
+  set withCredentials(bool value) => _blink.BlinkXMLHttpRequest.instance.withCredentials_Setter_(this, value);
   
   /**
    * Stop the current request.
@@ -21822,7 +21653,7 @@
    */
   @DomName('XMLHttpRequest.abort')
   @DocsEditable()
-  void abort() => _blink.BlinkXMLHttpRequest.instance.abort_Callback_0_(unwrap_jso(this));
+  void abort() => _blink.BlinkXMLHttpRequest.instance.abort_Callback_0_(this);
   
   /**
    * Retrieve all the response headers from a request.
@@ -21838,7 +21669,7 @@
   @DomName('XMLHttpRequest.getAllResponseHeaders')
   @DocsEditable()
   @Unstable()
-  String getAllResponseHeaders() => _blink.BlinkXMLHttpRequest.instance.getAllResponseHeaders_Callback_0_(unwrap_jso(this));
+  String getAllResponseHeaders() => _blink.BlinkXMLHttpRequest.instance.getAllResponseHeaders_Callback_0_(this);
   
   /**
    * Return the response header named `header`, or null if not found.
@@ -21850,7 +21681,7 @@
   @DomName('XMLHttpRequest.getResponseHeader')
   @DocsEditable()
   @Unstable()
-  String getResponseHeader(String header) => _blink.BlinkXMLHttpRequest.instance.getResponseHeader_Callback_1_(unwrap_jso(this), header);
+  String getResponseHeader(String name) => _blink.BlinkXMLHttpRequest.instance.getResponseHeader_Callback_1_(this, name);
   
   /**
    * Specify a particular MIME type (such as `text/xml`) desired for the
@@ -21864,25 +21695,44 @@
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  void overrideMimeType(String override) => _blink.BlinkXMLHttpRequest.instance.overrideMimeType_Callback_1_(unwrap_jso(this), override);
+  void overrideMimeType(String mime) => _blink.BlinkXMLHttpRequest.instance.overrideMimeType_Callback_1_(this, mime);
   
-  /**
-   * Send the request with any given `data`.
-   *
-   * Note: Most simple HTTP requests can be accomplished using the [getString],
-   * [request], [requestCrossOrigin], or [postFormData] methods. Use of this
-   * `send` method is intended only for more complext HTTP requests where
-   * finer-grained control is needed.
-   *
-   * ## Other resources
-   *
-   * * [XMLHttpRequest.send](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
-   *   from MDN.
-   */
-  @DomName('XMLHttpRequest.send')
-  @DocsEditable()
-  void send([data]) => _blink.BlinkXMLHttpRequest.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
-  
+  void send([body_OR_data]) {
+    if (body_OR_data != null) {
+      _blink.BlinkXMLHttpRequest.instance.send_Callback_1_(this, body_OR_data);
+      return;
+    }
+    if ((body_OR_data is TypedData || body_OR_data == null)) {
+      _blink.BlinkXMLHttpRequest.instance.send_Callback_1_(this, body_OR_data);
+      return;
+    }
+    if ((body_OR_data is ByteBuffer || body_OR_data == null)) {
+      _blink.BlinkXMLHttpRequest.instance.send_Callback_1_(this, body_OR_data);
+      return;
+    }
+    if ((body_OR_data is Document || body_OR_data == null)) {
+      _blink.BlinkXMLHttpRequest.instance.send_Callback_1_(this, body_OR_data);
+      return;
+    }
+    if ((body_OR_data is String || body_OR_data == null)) {
+      _blink.BlinkXMLHttpRequest.instance.send_Callback_1_(this, body_OR_data);
+      return;
+    }
+    if ((body_OR_data is FormData || body_OR_data == null)) {
+      _blink.BlinkXMLHttpRequest.instance.send_Callback_1_(this, body_OR_data);
+      return;
+    }
+    if ((body_OR_data is Blob || body_OR_data == null)) {
+      _blink.BlinkXMLHttpRequest.instance.send_Callback_1_(this, body_OR_data);
+      return;
+    }
+    if (body_OR_data == null) {
+      _blink.BlinkXMLHttpRequest.instance.send_Callback_0_(this);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   /**
    * Sets the value of an HTTP requst header.
    *
@@ -21902,7 +21752,7 @@
    */
   @DomName('XMLHttpRequest.setRequestHeader')
   @DocsEditable()
-  void setRequestHeader(String header, String value) => _blink.BlinkXMLHttpRequest.instance.setRequestHeader_Callback_2_(unwrap_jso(this), header, value);
+  void setRequestHeader(String name, String value) => _blink.BlinkXMLHttpRequest.instance.setRequestHeader_Callback_2_(this, name, value);
   
   /// Stream of `readystatechange` events handled by this [HttpRequest].
 /**
@@ -22007,11 +21857,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static HttpRequestEventTarget internalCreateHttpRequestEventTarget() {
-    return new HttpRequestEventTarget._internalWrap();
-  }
-
-  external factory HttpRequestEventTarget._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HttpRequestEventTarget.internal_() : super.internal_();
@@ -22085,11 +21931,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static HttpRequestUpload internalCreateHttpRequestUpload() {
-    return new HttpRequestUpload._internalWrap();
-  }
-
-  external factory HttpRequestUpload._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   HttpRequestUpload.internal_() : super.internal_();
@@ -22115,11 +21957,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static IFrameElement internalCreateIFrameElement() {
-    return new IFrameElement._internalWrap();
-  }
-
-  external factory IFrameElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   IFrameElement.internal_() : super.internal_();
@@ -22134,74 +21972,60 @@
   @DomName('HTMLIFrameElement.allowFullscreen')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get allowFullscreen => _blink.BlinkHTMLIFrameElement.instance.allowFullscreen_Getter_(unwrap_jso(this));
+  bool get allowFullscreen => _blink.BlinkHTMLIFrameElement.instance.allowFullscreen_Getter_(this);
   
   @DomName('HTMLIFrameElement.allowFullscreen')
   @DocsEditable()
   @Experimental() // untriaged
-  set allowFullscreen(bool value) => _blink.BlinkHTMLIFrameElement.instance.allowFullscreen_Setter_(unwrap_jso(this), value);
+  set allowFullscreen(bool value) => _blink.BlinkHTMLIFrameElement.instance.allowFullscreen_Setter_(this, value);
   
   @DomName('HTMLIFrameElement.contentWindow')
   @DocsEditable()
-  WindowBase get contentWindow => wrap_jso(_blink.BlinkHTMLIFrameElement.instance.contentWindow_Getter_(unwrap_jso(this)));
+  WindowBase get contentWindow => _convertNativeToDart_Window(_blink.BlinkHTMLIFrameElement.instance.contentWindow_Getter_(this));
   
   @DomName('HTMLIFrameElement.height')
   @DocsEditable()
-  String get height => _blink.BlinkHTMLIFrameElement.instance.height_Getter_(unwrap_jso(this));
+  String get height => _blink.BlinkHTMLIFrameElement.instance.height_Getter_(this);
   
   @DomName('HTMLIFrameElement.height')
   @DocsEditable()
-  set height(String value) => _blink.BlinkHTMLIFrameElement.instance.height_Setter_(unwrap_jso(this), value);
-  
-  @DomName('HTMLIFrameElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLIFrameElement.instance.integrity_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLIFrameElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLIFrameElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  set height(String value) => _blink.BlinkHTMLIFrameElement.instance.height_Setter_(this, value);
   
   @DomName('HTMLIFrameElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLIFrameElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLIFrameElement.instance.name_Getter_(this);
   
   @DomName('HTMLIFrameElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLIFrameElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLIFrameElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLIFrameElement.sandbox')
   @DocsEditable()
-  String get sandbox => _blink.BlinkHTMLIFrameElement.instance.sandbox_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLIFrameElement.sandbox')
-  @DocsEditable()
-  set sandbox(String value) => _blink.BlinkHTMLIFrameElement.instance.sandbox_Setter_(unwrap_jso(this), value);
+  DomSettableTokenList get sandbox => _blink.BlinkHTMLIFrameElement.instance.sandbox_Getter_(this);
   
   @DomName('HTMLIFrameElement.src')
   @DocsEditable()
-  String get src => _blink.BlinkHTMLIFrameElement.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkHTMLIFrameElement.instance.src_Getter_(this);
   
   @DomName('HTMLIFrameElement.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkHTMLIFrameElement.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkHTMLIFrameElement.instance.src_Setter_(this, value);
   
   @DomName('HTMLIFrameElement.srcdoc')
   @DocsEditable()
-  String get srcdoc => _blink.BlinkHTMLIFrameElement.instance.srcdoc_Getter_(unwrap_jso(this));
+  String get srcdoc => _blink.BlinkHTMLIFrameElement.instance.srcdoc_Getter_(this);
   
   @DomName('HTMLIFrameElement.srcdoc')
   @DocsEditable()
-  set srcdoc(String value) => _blink.BlinkHTMLIFrameElement.instance.srcdoc_Setter_(unwrap_jso(this), value);
+  set srcdoc(String value) => _blink.BlinkHTMLIFrameElement.instance.srcdoc_Setter_(this, value);
   
   @DomName('HTMLIFrameElement.width')
   @DocsEditable()
-  String get width => _blink.BlinkHTMLIFrameElement.instance.width_Getter_(unwrap_jso(this));
+  String get width => _blink.BlinkHTMLIFrameElement.instance.width_Getter_(this);
   
   @DomName('HTMLIFrameElement.width')
   @DocsEditable()
-  set width(String value) => _blink.BlinkHTMLIFrameElement.instance.width_Setter_(unwrap_jso(this), value);
+  set width(String value) => _blink.BlinkHTMLIFrameElement.instance.width_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -22218,30 +22042,22 @@
   // To suppress missing implicit constructor warnings.
   factory ImageBitmap._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ImageBitmap internalCreateImageBitmap() {
-    return new ImageBitmap._internalWrap();
-  }
 
-  factory ImageBitmap._internalWrap() {
-    return new ImageBitmap.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ImageBitmap.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('ImageBitmap.height')
   @DocsEditable()
   @Experimental() // untriaged
-  int get height => _blink.BlinkImageBitmap.instance.height_Getter_(unwrap_jso(this));
+  int get height => _blink.BlinkImageBitmap.instance.height_Getter_(this);
   
   @DomName('ImageBitmap.width')
   @DocsEditable()
   @Experimental() // untriaged
-  int get width => _blink.BlinkImageBitmap.instance.width_Getter_(unwrap_jso(this));
+  int get width => _blink.BlinkImageBitmap.instance.width_Getter_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -22264,42 +22080,37 @@
 
   @DomName('ImageData.ImageData')
   @DocsEditable()
-  factory ImageData(data_OR_width, int height_OR_width, [int height]) {
-    if ((height_OR_width is int || height_OR_width == null) && (data_OR_width is int || data_OR_width == null) && height == null) {
-      return wrap_jso(_blink.BlinkImageData.instance.constructorCallback_2_(data_OR_width, height_OR_width));
+  factory ImageData(data_OR_sw, int sh_OR_sw, [int sh]) {
+    if ((sh_OR_sw is int) && (data_OR_sw is int) && sh == null) {
+      return _blink.BlinkImageData.instance.constructorCallback_2_(data_OR_sw, sh_OR_sw);
     }
-    if ((height is int || height == null) && (height_OR_width is int || height_OR_width == null) && (data_OR_width is Uint8ClampedList || data_OR_width == null)) {
-      return wrap_jso(_blink.BlinkImageData.instance.constructorCallback_3_(data_OR_width, height_OR_width, height));
+    if ((sh_OR_sw is int) && (data_OR_sw is Uint8ClampedList) && sh == null) {
+      return _blink.BlinkImageData.instance.constructorCallback_2_(data_OR_sw, sh_OR_sw);
+    }
+    if ((sh is int) && (sh_OR_sw is int) && (data_OR_sw is Uint8ClampedList)) {
+      return _blink.BlinkImageData.instance.constructorCallback_3_(data_OR_sw, sh_OR_sw, sh);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @Deprecated("Internal Use Only")
-  static ImageData internalCreateImageData() {
-    return new ImageData._internalWrap();
-  }
 
-  factory ImageData._internalWrap() {
-    return new ImageData.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ImageData.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('ImageData.data')
   @DocsEditable()
-  Uint8ClampedList get _data => _blink.BlinkImageData.instance.data_Getter_(unwrap_jso(this));
+  Uint8ClampedList get _data => _blink.BlinkImageData.instance.data_Getter_(this);
   
   @DomName('ImageData.height')
   @DocsEditable()
-  int get height => _blink.BlinkImageData.instance.height_Getter_(unwrap_jso(this));
+  int get height => _blink.BlinkImageData.instance.height_Getter_(this);
   
   @DomName('ImageData.width')
   @DocsEditable()
-  int get width => _blink.BlinkImageData.instance.width_Getter_(unwrap_jso(this));
+  int get width => _blink.BlinkImageData.instance.width_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -22324,11 +22135,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ImageElement internalCreateImageElement() {
-    return new ImageElement._internalWrap();
-  }
-
-  external factory ImageElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ImageElement.internal_() : super.internal_();
@@ -22342,106 +22149,96 @@
 
   @DomName('HTMLImageElement.alt')
   @DocsEditable()
-  String get alt => _blink.BlinkHTMLImageElement.instance.alt_Getter_(unwrap_jso(this));
+  String get alt => _blink.BlinkHTMLImageElement.instance.alt_Getter_(this);
   
   @DomName('HTMLImageElement.alt')
   @DocsEditable()
-  set alt(String value) => _blink.BlinkHTMLImageElement.instance.alt_Setter_(unwrap_jso(this), value);
+  set alt(String value) => _blink.BlinkHTMLImageElement.instance.alt_Setter_(this, value);
   
   @DomName('HTMLImageElement.complete')
   @DocsEditable()
-  bool get complete => _blink.BlinkHTMLImageElement.instance.complete_Getter_(unwrap_jso(this));
+  bool get complete => _blink.BlinkHTMLImageElement.instance.complete_Getter_(this);
   
   @DomName('HTMLImageElement.crossOrigin')
   @DocsEditable()
-  String get crossOrigin => _blink.BlinkHTMLImageElement.instance.crossOrigin_Getter_(unwrap_jso(this));
+  String get crossOrigin => _blink.BlinkHTMLImageElement.instance.crossOrigin_Getter_(this);
   
   @DomName('HTMLImageElement.crossOrigin')
   @DocsEditable()
-  set crossOrigin(String value) => _blink.BlinkHTMLImageElement.instance.crossOrigin_Setter_(unwrap_jso(this), value);
+  set crossOrigin(String value) => _blink.BlinkHTMLImageElement.instance.crossOrigin_Setter_(this, value);
   
   @DomName('HTMLImageElement.currentSrc')
   @DocsEditable()
   @Experimental() // untriaged
-  String get currentSrc => _blink.BlinkHTMLImageElement.instance.currentSrc_Getter_(unwrap_jso(this));
+  String get currentSrc => _blink.BlinkHTMLImageElement.instance.currentSrc_Getter_(this);
   
   @DomName('HTMLImageElement.height')
   @DocsEditable()
-  int get height => _blink.BlinkHTMLImageElement.instance.height_Getter_(unwrap_jso(this));
+  int get height => _blink.BlinkHTMLImageElement.instance.height_Getter_(this);
   
   @DomName('HTMLImageElement.height')
   @DocsEditable()
-  set height(int value) => _blink.BlinkHTMLImageElement.instance.height_Setter_(unwrap_jso(this), value);
-  
-  @DomName('HTMLImageElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLImageElement.instance.integrity_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLImageElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLImageElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  set height(int value) => _blink.BlinkHTMLImageElement.instance.height_Setter_(this, value);
   
   @DomName('HTMLImageElement.isMap')
   @DocsEditable()
-  bool get isMap => _blink.BlinkHTMLImageElement.instance.isMap_Getter_(unwrap_jso(this));
+  bool get isMap => _blink.BlinkHTMLImageElement.instance.isMap_Getter_(this);
   
   @DomName('HTMLImageElement.isMap')
   @DocsEditable()
-  set isMap(bool value) => _blink.BlinkHTMLImageElement.instance.isMap_Setter_(unwrap_jso(this), value);
+  set isMap(bool value) => _blink.BlinkHTMLImageElement.instance.isMap_Setter_(this, value);
   
   @DomName('HTMLImageElement.naturalHeight')
   @DocsEditable()
-  int get naturalHeight => _blink.BlinkHTMLImageElement.instance.naturalHeight_Getter_(unwrap_jso(this));
+  int get naturalHeight => _blink.BlinkHTMLImageElement.instance.naturalHeight_Getter_(this);
   
   @DomName('HTMLImageElement.naturalWidth')
   @DocsEditable()
-  int get naturalWidth => _blink.BlinkHTMLImageElement.instance.naturalWidth_Getter_(unwrap_jso(this));
+  int get naturalWidth => _blink.BlinkHTMLImageElement.instance.naturalWidth_Getter_(this);
   
   @DomName('HTMLImageElement.sizes')
   @DocsEditable()
   @Experimental() // untriaged
-  String get sizes => _blink.BlinkHTMLImageElement.instance.sizes_Getter_(unwrap_jso(this));
+  String get sizes => _blink.BlinkHTMLImageElement.instance.sizes_Getter_(this);
   
   @DomName('HTMLImageElement.sizes')
   @DocsEditable()
   @Experimental() // untriaged
-  set sizes(String value) => _blink.BlinkHTMLImageElement.instance.sizes_Setter_(unwrap_jso(this), value);
+  set sizes(String value) => _blink.BlinkHTMLImageElement.instance.sizes_Setter_(this, value);
   
   @DomName('HTMLImageElement.src')
   @DocsEditable()
-  String get src => _blink.BlinkHTMLImageElement.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkHTMLImageElement.instance.src_Getter_(this);
   
   @DomName('HTMLImageElement.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkHTMLImageElement.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkHTMLImageElement.instance.src_Setter_(this, value);
   
   @DomName('HTMLImageElement.srcset')
   @DocsEditable()
   @Experimental() // untriaged
-  String get srcset => _blink.BlinkHTMLImageElement.instance.srcset_Getter_(unwrap_jso(this));
+  String get srcset => _blink.BlinkHTMLImageElement.instance.srcset_Getter_(this);
   
   @DomName('HTMLImageElement.srcset')
   @DocsEditable()
   @Experimental() // untriaged
-  set srcset(String value) => _blink.BlinkHTMLImageElement.instance.srcset_Setter_(unwrap_jso(this), value);
+  set srcset(String value) => _blink.BlinkHTMLImageElement.instance.srcset_Setter_(this, value);
   
   @DomName('HTMLImageElement.useMap')
   @DocsEditable()
-  String get useMap => _blink.BlinkHTMLImageElement.instance.useMap_Getter_(unwrap_jso(this));
+  String get useMap => _blink.BlinkHTMLImageElement.instance.useMap_Getter_(this);
   
   @DomName('HTMLImageElement.useMap')
   @DocsEditable()
-  set useMap(String value) => _blink.BlinkHTMLImageElement.instance.useMap_Setter_(unwrap_jso(this), value);
+  set useMap(String value) => _blink.BlinkHTMLImageElement.instance.useMap_Setter_(this, value);
   
   @DomName('HTMLImageElement.width')
   @DocsEditable()
-  int get width => _blink.BlinkHTMLImageElement.instance.width_Getter_(unwrap_jso(this));
+  int get width => _blink.BlinkHTMLImageElement.instance.width_Getter_(this);
   
   @DomName('HTMLImageElement.width')
   @DocsEditable()
-  set width(int value) => _blink.BlinkHTMLImageElement.instance.width_Setter_(unwrap_jso(this), value);
+  set width(int value) => _blink.BlinkHTMLImageElement.instance.width_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -22458,25 +22255,54 @@
   // To suppress missing implicit constructor warnings.
   factory InjectedScriptHost._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static InjectedScriptHost internalCreateInjectedScriptHost() {
-    return new InjectedScriptHost._internalWrap();
-  }
 
-  factory InjectedScriptHost._internalWrap() {
-    return new InjectedScriptHost.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   InjectedScriptHost.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('InjectedScriptHost.inspect')
   @DocsEditable()
   @Experimental() // untriaged
-  void inspect(Object objectId, Object hints) => _blink.BlinkInjectedScriptHost.instance.inspect_Callback_2_(unwrap_jso(this), objectId, hints);
+  void inspect(Object objectId, Object hints) => _blink.BlinkInjectedScriptHost.instance.inspect_Callback_2_(this, objectId, hints);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('InputDevice')
+@Experimental() // untriaged
+class InputDevice extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory InputDevice._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('InputDevice.InputDevice')
+  @DocsEditable()
+  factory InputDevice([Map deviceInitDict]) {
+    if (deviceInitDict != null) {
+      var deviceInitDict_1 = convertDartToNative_Dictionary(deviceInitDict);
+      return _blink.BlinkInputDevice.instance.constructorCallback_1_(deviceInitDict_1);
+    }
+    return _blink.BlinkInputDevice.instance.constructorCallback_0_();
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  InputDevice.internal_() { }
+
+  @DomName('InputDevice.firesTouchEvents')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get firesTouchEvents => _blink.BlinkInputDevice.instance.firesTouchEvents_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -22524,11 +22350,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static InputElement internalCreateInputElement() {
-    return new InputElement._internalWrap();
-  }
-
-  external factory InputElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   InputElement.internal_() : super.internal_();
@@ -22542,343 +22364,363 @@
 
   @DomName('HTMLInputElement.accept')
   @DocsEditable()
-  String get accept => _blink.BlinkHTMLInputElement.instance.accept_Getter_(unwrap_jso(this));
+  String get accept => _blink.BlinkHTMLInputElement.instance.accept_Getter_(this);
   
   @DomName('HTMLInputElement.accept')
   @DocsEditable()
-  set accept(String value) => _blink.BlinkHTMLInputElement.instance.accept_Setter_(unwrap_jso(this), value);
+  set accept(String value) => _blink.BlinkHTMLInputElement.instance.accept_Setter_(this, value);
   
   @DomName('HTMLInputElement.alt')
   @DocsEditable()
-  String get alt => _blink.BlinkHTMLInputElement.instance.alt_Getter_(unwrap_jso(this));
+  String get alt => _blink.BlinkHTMLInputElement.instance.alt_Getter_(this);
   
   @DomName('HTMLInputElement.alt')
   @DocsEditable()
-  set alt(String value) => _blink.BlinkHTMLInputElement.instance.alt_Setter_(unwrap_jso(this), value);
+  set alt(String value) => _blink.BlinkHTMLInputElement.instance.alt_Setter_(this, value);
+  
+  @DomName('HTMLInputElement.autocapitalize')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get autocapitalize => _blink.BlinkHTMLInputElement.instance.autocapitalize_Getter_(this);
+  
+  @DomName('HTMLInputElement.autocapitalize')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set autocapitalize(String value) => _blink.BlinkHTMLInputElement.instance.autocapitalize_Setter_(this, value);
   
   @DomName('HTMLInputElement.autocomplete')
   @DocsEditable()
-  String get autocomplete => _blink.BlinkHTMLInputElement.instance.autocomplete_Getter_(unwrap_jso(this));
+  String get autocomplete => _blink.BlinkHTMLInputElement.instance.autocomplete_Getter_(this);
   
   @DomName('HTMLInputElement.autocomplete')
   @DocsEditable()
-  set autocomplete(String value) => _blink.BlinkHTMLInputElement.instance.autocomplete_Setter_(unwrap_jso(this), value);
+  set autocomplete(String value) => _blink.BlinkHTMLInputElement.instance.autocomplete_Setter_(this, value);
   
   @DomName('HTMLInputElement.autofocus')
   @DocsEditable()
-  bool get autofocus => _blink.BlinkHTMLInputElement.instance.autofocus_Getter_(unwrap_jso(this));
+  bool get autofocus => _blink.BlinkHTMLInputElement.instance.autofocus_Getter_(this);
   
   @DomName('HTMLInputElement.autofocus')
   @DocsEditable()
-  set autofocus(bool value) => _blink.BlinkHTMLInputElement.instance.autofocus_Setter_(unwrap_jso(this), value);
+  set autofocus(bool value) => _blink.BlinkHTMLInputElement.instance.autofocus_Setter_(this, value);
   
   @DomName('HTMLInputElement.capture')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get capture => _blink.BlinkHTMLInputElement.instance.capture_Getter_(unwrap_jso(this));
+  bool get capture => _blink.BlinkHTMLInputElement.instance.capture_Getter_(this);
   
   @DomName('HTMLInputElement.capture')
   @DocsEditable()
   @Experimental() // untriaged
-  set capture(bool value) => _blink.BlinkHTMLInputElement.instance.capture_Setter_(unwrap_jso(this), value);
+  set capture(bool value) => _blink.BlinkHTMLInputElement.instance.capture_Setter_(this, value);
   
   @DomName('HTMLInputElement.checked')
   @DocsEditable()
-  bool get checked => _blink.BlinkHTMLInputElement.instance.checked_Getter_(unwrap_jso(this));
+  bool get checked => _blink.BlinkHTMLInputElement.instance.checked_Getter_(this);
   
   @DomName('HTMLInputElement.checked')
   @DocsEditable()
-  set checked(bool value) => _blink.BlinkHTMLInputElement.instance.checked_Setter_(unwrap_jso(this), value);
+  set checked(bool value) => _blink.BlinkHTMLInputElement.instance.checked_Setter_(this, value);
   
   @DomName('HTMLInputElement.defaultChecked')
   @DocsEditable()
-  bool get defaultChecked => _blink.BlinkHTMLInputElement.instance.defaultChecked_Getter_(unwrap_jso(this));
+  bool get defaultChecked => _blink.BlinkHTMLInputElement.instance.defaultChecked_Getter_(this);
   
   @DomName('HTMLInputElement.defaultChecked')
   @DocsEditable()
-  set defaultChecked(bool value) => _blink.BlinkHTMLInputElement.instance.defaultChecked_Setter_(unwrap_jso(this), value);
+  set defaultChecked(bool value) => _blink.BlinkHTMLInputElement.instance.defaultChecked_Setter_(this, value);
   
   @DomName('HTMLInputElement.defaultValue')
   @DocsEditable()
-  String get defaultValue => _blink.BlinkHTMLInputElement.instance.defaultValue_Getter_(unwrap_jso(this));
+  String get defaultValue => _blink.BlinkHTMLInputElement.instance.defaultValue_Getter_(this);
   
   @DomName('HTMLInputElement.defaultValue')
   @DocsEditable()
-  set defaultValue(String value) => _blink.BlinkHTMLInputElement.instance.defaultValue_Setter_(unwrap_jso(this), value);
+  set defaultValue(String value) => _blink.BlinkHTMLInputElement.instance.defaultValue_Setter_(this, value);
   
   @DomName('HTMLInputElement.dirName')
   @DocsEditable()
-  String get dirName => _blink.BlinkHTMLInputElement.instance.dirName_Getter_(unwrap_jso(this));
+  String get dirName => _blink.BlinkHTMLInputElement.instance.dirName_Getter_(this);
   
   @DomName('HTMLInputElement.dirName')
   @DocsEditable()
-  set dirName(String value) => _blink.BlinkHTMLInputElement.instance.dirName_Setter_(unwrap_jso(this), value);
+  set dirName(String value) => _blink.BlinkHTMLInputElement.instance.dirName_Setter_(this, value);
   
   @DomName('HTMLInputElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLInputElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLInputElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLInputElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLInputElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLInputElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLInputElement.files')
   @DocsEditable()
-  List<File> get files => wrap_jso(_blink.BlinkHTMLInputElement.instance.files_Getter_(unwrap_jso(this)));
+  List<File> get files => (_blink.BlinkHTMLInputElement.instance.files_Getter_(this));
   
   @DomName('HTMLInputElement.files')
   @DocsEditable()
-  set files(List<File> value) => _blink.BlinkHTMLInputElement.instance.files_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set files(List<File> value) => _blink.BlinkHTMLInputElement.instance.files_Setter_(this, value);
   
   @DomName('HTMLInputElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLInputElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLInputElement.instance.form_Getter_(this);
   
   @DomName('HTMLInputElement.formAction')
   @DocsEditable()
-  String get formAction => _blink.BlinkHTMLInputElement.instance.formAction_Getter_(unwrap_jso(this));
+  String get formAction => _blink.BlinkHTMLInputElement.instance.formAction_Getter_(this);
   
   @DomName('HTMLInputElement.formAction')
   @DocsEditable()
-  set formAction(String value) => _blink.BlinkHTMLInputElement.instance.formAction_Setter_(unwrap_jso(this), value);
+  set formAction(String value) => _blink.BlinkHTMLInputElement.instance.formAction_Setter_(this, value);
   
   @DomName('HTMLInputElement.formEnctype')
   @DocsEditable()
-  String get formEnctype => _blink.BlinkHTMLInputElement.instance.formEnctype_Getter_(unwrap_jso(this));
+  String get formEnctype => _blink.BlinkHTMLInputElement.instance.formEnctype_Getter_(this);
   
   @DomName('HTMLInputElement.formEnctype')
   @DocsEditable()
-  set formEnctype(String value) => _blink.BlinkHTMLInputElement.instance.formEnctype_Setter_(unwrap_jso(this), value);
+  set formEnctype(String value) => _blink.BlinkHTMLInputElement.instance.formEnctype_Setter_(this, value);
   
   @DomName('HTMLInputElement.formMethod')
   @DocsEditable()
-  String get formMethod => _blink.BlinkHTMLInputElement.instance.formMethod_Getter_(unwrap_jso(this));
+  String get formMethod => _blink.BlinkHTMLInputElement.instance.formMethod_Getter_(this);
   
   @DomName('HTMLInputElement.formMethod')
   @DocsEditable()
-  set formMethod(String value) => _blink.BlinkHTMLInputElement.instance.formMethod_Setter_(unwrap_jso(this), value);
+  set formMethod(String value) => _blink.BlinkHTMLInputElement.instance.formMethod_Setter_(this, value);
   
   @DomName('HTMLInputElement.formNoValidate')
   @DocsEditable()
-  bool get formNoValidate => _blink.BlinkHTMLInputElement.instance.formNoValidate_Getter_(unwrap_jso(this));
+  bool get formNoValidate => _blink.BlinkHTMLInputElement.instance.formNoValidate_Getter_(this);
   
   @DomName('HTMLInputElement.formNoValidate')
   @DocsEditable()
-  set formNoValidate(bool value) => _blink.BlinkHTMLInputElement.instance.formNoValidate_Setter_(unwrap_jso(this), value);
+  set formNoValidate(bool value) => _blink.BlinkHTMLInputElement.instance.formNoValidate_Setter_(this, value);
   
   @DomName('HTMLInputElement.formTarget')
   @DocsEditable()
-  String get formTarget => _blink.BlinkHTMLInputElement.instance.formTarget_Getter_(unwrap_jso(this));
+  String get formTarget => _blink.BlinkHTMLInputElement.instance.formTarget_Getter_(this);
   
   @DomName('HTMLInputElement.formTarget')
   @DocsEditable()
-  set formTarget(String value) => _blink.BlinkHTMLInputElement.instance.formTarget_Setter_(unwrap_jso(this), value);
+  set formTarget(String value) => _blink.BlinkHTMLInputElement.instance.formTarget_Setter_(this, value);
   
   @DomName('HTMLInputElement.height')
   @DocsEditable()
-  int get height => _blink.BlinkHTMLInputElement.instance.height_Getter_(unwrap_jso(this));
+  int get height => _blink.BlinkHTMLInputElement.instance.height_Getter_(this);
   
   @DomName('HTMLInputElement.height')
   @DocsEditable()
-  set height(int value) => _blink.BlinkHTMLInputElement.instance.height_Setter_(unwrap_jso(this), value);
+  set height(int value) => _blink.BlinkHTMLInputElement.instance.height_Setter_(this, value);
   
   @DomName('HTMLInputElement.incremental')
   @DocsEditable()
   // http://www.w3.org/TR/html-markup/input.search.html
   @Experimental()
-  bool get incremental => _blink.BlinkHTMLInputElement.instance.incremental_Getter_(unwrap_jso(this));
+  bool get incremental => _blink.BlinkHTMLInputElement.instance.incremental_Getter_(this);
   
   @DomName('HTMLInputElement.incremental')
   @DocsEditable()
   // http://www.w3.org/TR/html-markup/input.search.html
   @Experimental()
-  set incremental(bool value) => _blink.BlinkHTMLInputElement.instance.incremental_Setter_(unwrap_jso(this), value);
+  set incremental(bool value) => _blink.BlinkHTMLInputElement.instance.incremental_Setter_(this, value);
   
   @DomName('HTMLInputElement.indeterminate')
   @DocsEditable()
-  bool get indeterminate => _blink.BlinkHTMLInputElement.instance.indeterminate_Getter_(unwrap_jso(this));
+  bool get indeterminate => _blink.BlinkHTMLInputElement.instance.indeterminate_Getter_(this);
   
   @DomName('HTMLInputElement.indeterminate')
   @DocsEditable()
-  set indeterminate(bool value) => _blink.BlinkHTMLInputElement.instance.indeterminate_Setter_(unwrap_jso(this), value);
+  set indeterminate(bool value) => _blink.BlinkHTMLInputElement.instance.indeterminate_Setter_(this, value);
   
   @DomName('HTMLInputElement.inputMode')
   @DocsEditable()
   @Experimental() // untriaged
-  String get inputMode => _blink.BlinkHTMLInputElement.instance.inputMode_Getter_(unwrap_jso(this));
+  String get inputMode => _blink.BlinkHTMLInputElement.instance.inputMode_Getter_(this);
   
   @DomName('HTMLInputElement.inputMode')
   @DocsEditable()
   @Experimental() // untriaged
-  set inputMode(String value) => _blink.BlinkHTMLInputElement.instance.inputMode_Setter_(unwrap_jso(this), value);
+  set inputMode(String value) => _blink.BlinkHTMLInputElement.instance.inputMode_Setter_(this, value);
   
   @DomName('HTMLInputElement.labels')
   @DocsEditable()
-  List<Node> get labels => wrap_jso(_blink.BlinkHTMLInputElement.instance.labels_Getter_(unwrap_jso(this)));
+  List<Node> get labels => (_blink.BlinkHTMLInputElement.instance.labels_Getter_(this));
   
   @DomName('HTMLInputElement.list')
   @DocsEditable()
-  HtmlElement get list => wrap_jso(_blink.BlinkHTMLInputElement.instance.list_Getter_(unwrap_jso(this)));
+  HtmlElement get list => _blink.BlinkHTMLInputElement.instance.list_Getter_(this);
   
   @DomName('HTMLInputElement.max')
   @DocsEditable()
-  String get max => _blink.BlinkHTMLInputElement.instance.max_Getter_(unwrap_jso(this));
+  String get max => _blink.BlinkHTMLInputElement.instance.max_Getter_(this);
   
   @DomName('HTMLInputElement.max')
   @DocsEditable()
-  set max(String value) => _blink.BlinkHTMLInputElement.instance.max_Setter_(unwrap_jso(this), value);
+  set max(String value) => _blink.BlinkHTMLInputElement.instance.max_Setter_(this, value);
   
   @DomName('HTMLInputElement.maxLength')
   @DocsEditable()
-  int get maxLength => _blink.BlinkHTMLInputElement.instance.maxLength_Getter_(unwrap_jso(this));
+  int get maxLength => _blink.BlinkHTMLInputElement.instance.maxLength_Getter_(this);
   
   @DomName('HTMLInputElement.maxLength')
   @DocsEditable()
-  set maxLength(int value) => _blink.BlinkHTMLInputElement.instance.maxLength_Setter_(unwrap_jso(this), value);
+  set maxLength(int value) => _blink.BlinkHTMLInputElement.instance.maxLength_Setter_(this, value);
   
   @DomName('HTMLInputElement.min')
   @DocsEditable()
-  String get min => _blink.BlinkHTMLInputElement.instance.min_Getter_(unwrap_jso(this));
+  String get min => _blink.BlinkHTMLInputElement.instance.min_Getter_(this);
   
   @DomName('HTMLInputElement.min')
   @DocsEditable()
-  set min(String value) => _blink.BlinkHTMLInputElement.instance.min_Setter_(unwrap_jso(this), value);
+  set min(String value) => _blink.BlinkHTMLInputElement.instance.min_Setter_(this, value);
+  
+  @DomName('HTMLInputElement.minLength')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get minLength => _blink.BlinkHTMLInputElement.instance.minLength_Getter_(this);
+  
+  @DomName('HTMLInputElement.minLength')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set minLength(int value) => _blink.BlinkHTMLInputElement.instance.minLength_Setter_(this, value);
   
   @DomName('HTMLInputElement.multiple')
   @DocsEditable()
-  bool get multiple => _blink.BlinkHTMLInputElement.instance.multiple_Getter_(unwrap_jso(this));
+  bool get multiple => _blink.BlinkHTMLInputElement.instance.multiple_Getter_(this);
   
   @DomName('HTMLInputElement.multiple')
   @DocsEditable()
-  set multiple(bool value) => _blink.BlinkHTMLInputElement.instance.multiple_Setter_(unwrap_jso(this), value);
+  set multiple(bool value) => _blink.BlinkHTMLInputElement.instance.multiple_Setter_(this, value);
   
   @DomName('HTMLInputElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLInputElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLInputElement.instance.name_Getter_(this);
   
   @DomName('HTMLInputElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLInputElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLInputElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLInputElement.pattern')
   @DocsEditable()
-  String get pattern => _blink.BlinkHTMLInputElement.instance.pattern_Getter_(unwrap_jso(this));
+  String get pattern => _blink.BlinkHTMLInputElement.instance.pattern_Getter_(this);
   
   @DomName('HTMLInputElement.pattern')
   @DocsEditable()
-  set pattern(String value) => _blink.BlinkHTMLInputElement.instance.pattern_Setter_(unwrap_jso(this), value);
+  set pattern(String value) => _blink.BlinkHTMLInputElement.instance.pattern_Setter_(this, value);
   
   @DomName('HTMLInputElement.placeholder')
   @DocsEditable()
-  String get placeholder => _blink.BlinkHTMLInputElement.instance.placeholder_Getter_(unwrap_jso(this));
+  String get placeholder => _blink.BlinkHTMLInputElement.instance.placeholder_Getter_(this);
   
   @DomName('HTMLInputElement.placeholder')
   @DocsEditable()
-  set placeholder(String value) => _blink.BlinkHTMLInputElement.instance.placeholder_Setter_(unwrap_jso(this), value);
+  set placeholder(String value) => _blink.BlinkHTMLInputElement.instance.placeholder_Setter_(this, value);
   
   @DomName('HTMLInputElement.readOnly')
   @DocsEditable()
-  bool get readOnly => _blink.BlinkHTMLInputElement.instance.readOnly_Getter_(unwrap_jso(this));
+  bool get readOnly => _blink.BlinkHTMLInputElement.instance.readOnly_Getter_(this);
   
   @DomName('HTMLInputElement.readOnly')
   @DocsEditable()
-  set readOnly(bool value) => _blink.BlinkHTMLInputElement.instance.readOnly_Setter_(unwrap_jso(this), value);
+  set readOnly(bool value) => _blink.BlinkHTMLInputElement.instance.readOnly_Setter_(this, value);
   
   @DomName('HTMLInputElement.required')
   @DocsEditable()
-  bool get required => _blink.BlinkHTMLInputElement.instance.required_Getter_(unwrap_jso(this));
+  bool get required => _blink.BlinkHTMLInputElement.instance.required_Getter_(this);
   
   @DomName('HTMLInputElement.required')
   @DocsEditable()
-  set required(bool value) => _blink.BlinkHTMLInputElement.instance.required_Setter_(unwrap_jso(this), value);
+  set required(bool value) => _blink.BlinkHTMLInputElement.instance.required_Setter_(this, value);
   
   @DomName('HTMLInputElement.selectionDirection')
   @DocsEditable()
-  String get selectionDirection => _blink.BlinkHTMLInputElement.instance.selectionDirection_Getter_(unwrap_jso(this));
+  String get selectionDirection => _blink.BlinkHTMLInputElement.instance.selectionDirection_Getter_(this);
   
   @DomName('HTMLInputElement.selectionDirection')
   @DocsEditable()
-  set selectionDirection(String value) => _blink.BlinkHTMLInputElement.instance.selectionDirection_Setter_(unwrap_jso(this), value);
+  set selectionDirection(String value) => _blink.BlinkHTMLInputElement.instance.selectionDirection_Setter_(this, value);
   
   @DomName('HTMLInputElement.selectionEnd')
   @DocsEditable()
-  int get selectionEnd => _blink.BlinkHTMLInputElement.instance.selectionEnd_Getter_(unwrap_jso(this));
+  int get selectionEnd => _blink.BlinkHTMLInputElement.instance.selectionEnd_Getter_(this);
   
   @DomName('HTMLInputElement.selectionEnd')
   @DocsEditable()
-  set selectionEnd(int value) => _blink.BlinkHTMLInputElement.instance.selectionEnd_Setter_(unwrap_jso(this), value);
+  set selectionEnd(int value) => _blink.BlinkHTMLInputElement.instance.selectionEnd_Setter_(this, value);
   
   @DomName('HTMLInputElement.selectionStart')
   @DocsEditable()
-  int get selectionStart => _blink.BlinkHTMLInputElement.instance.selectionStart_Getter_(unwrap_jso(this));
+  int get selectionStart => _blink.BlinkHTMLInputElement.instance.selectionStart_Getter_(this);
   
   @DomName('HTMLInputElement.selectionStart')
   @DocsEditable()
-  set selectionStart(int value) => _blink.BlinkHTMLInputElement.instance.selectionStart_Setter_(unwrap_jso(this), value);
+  set selectionStart(int value) => _blink.BlinkHTMLInputElement.instance.selectionStart_Setter_(this, value);
   
   @DomName('HTMLInputElement.size')
   @DocsEditable()
-  int get size => _blink.BlinkHTMLInputElement.instance.size_Getter_(unwrap_jso(this));
+  int get size => _blink.BlinkHTMLInputElement.instance.size_Getter_(this);
   
   @DomName('HTMLInputElement.size')
   @DocsEditable()
-  set size(int value) => _blink.BlinkHTMLInputElement.instance.size_Setter_(unwrap_jso(this), value);
+  set size(int value) => _blink.BlinkHTMLInputElement.instance.size_Setter_(this, value);
   
   @DomName('HTMLInputElement.src')
   @DocsEditable()
-  String get src => _blink.BlinkHTMLInputElement.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkHTMLInputElement.instance.src_Getter_(this);
   
   @DomName('HTMLInputElement.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkHTMLInputElement.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkHTMLInputElement.instance.src_Setter_(this, value);
   
   @DomName('HTMLInputElement.step')
   @DocsEditable()
-  String get step => _blink.BlinkHTMLInputElement.instance.step_Getter_(unwrap_jso(this));
+  String get step => _blink.BlinkHTMLInputElement.instance.step_Getter_(this);
   
   @DomName('HTMLInputElement.step')
   @DocsEditable()
-  set step(String value) => _blink.BlinkHTMLInputElement.instance.step_Setter_(unwrap_jso(this), value);
+  set step(String value) => _blink.BlinkHTMLInputElement.instance.step_Setter_(this, value);
   
   @DomName('HTMLInputElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLInputElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLInputElement.instance.type_Getter_(this);
   
   @DomName('HTMLInputElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLInputElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLInputElement.instance.type_Setter_(this, value);
   
   @DomName('HTMLInputElement.validationMessage')
   @DocsEditable()
-  String get validationMessage => _blink.BlinkHTMLInputElement.instance.validationMessage_Getter_(unwrap_jso(this));
+  String get validationMessage => _blink.BlinkHTMLInputElement.instance.validationMessage_Getter_(this);
   
   @DomName('HTMLInputElement.validity')
   @DocsEditable()
-  ValidityState get validity => wrap_jso(_blink.BlinkHTMLInputElement.instance.validity_Getter_(unwrap_jso(this)));
+  ValidityState get validity => _blink.BlinkHTMLInputElement.instance.validity_Getter_(this);
   
   @DomName('HTMLInputElement.value')
   @DocsEditable()
-  String get value => _blink.BlinkHTMLInputElement.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkHTMLInputElement.instance.value_Getter_(this);
   
   @DomName('HTMLInputElement.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkHTMLInputElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkHTMLInputElement.instance.value_Setter_(this, value);
   
   @DomName('HTMLInputElement.valueAsDate')
   @DocsEditable()
-  DateTime get valueAsDate => _blink.BlinkHTMLInputElement.instance.valueAsDate_Getter_(unwrap_jso(this));
+  DateTime get valueAsDate => _blink.BlinkHTMLInputElement.instance.valueAsDate_Getter_(this);
   
   @DomName('HTMLInputElement.valueAsDate')
   @DocsEditable()
-  set valueAsDate(DateTime value) => _blink.BlinkHTMLInputElement.instance.valueAsDate_Setter_(unwrap_jso(this), value);
+  set valueAsDate(DateTime value) => _blink.BlinkHTMLInputElement.instance.valueAsDate_Setter_(this, value);
   
   @DomName('HTMLInputElement.valueAsNumber')
   @DocsEditable()
-  num get valueAsNumber => _blink.BlinkHTMLInputElement.instance.valueAsNumber_Getter_(unwrap_jso(this));
+  num get valueAsNumber => _blink.BlinkHTMLInputElement.instance.valueAsNumber_Getter_(this);
   
   @DomName('HTMLInputElement.valueAsNumber')
   @DocsEditable()
-  set valueAsNumber(num value) => _blink.BlinkHTMLInputElement.instance.valueAsNumber_Setter_(unwrap_jso(this), value);
+  set valueAsNumber(num value) => _blink.BlinkHTMLInputElement.instance.valueAsNumber_Setter_(this, value);
   
   @DomName('HTMLInputElement.webkitEntries')
   @DocsEditable()
@@ -22886,7 +22728,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#concept-input-type-file-selected
-  List<Entry> get entries => wrap_jso(_blink.BlinkHTMLInputElement.instance.webkitEntries_Getter_(unwrap_jso(this)));
+  List<Entry> get entries => (_blink.BlinkHTMLInputElement.instance.webkitEntries_Getter_(this));
   
   @DomName('HTMLInputElement.webkitdirectory')
   @DocsEditable()
@@ -22894,7 +22736,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://plus.sandbox.google.com/+AddyOsmani/posts/Dk5UhZ6zfF3
-  bool get directory => _blink.BlinkHTMLInputElement.instance.webkitdirectory_Getter_(unwrap_jso(this));
+  bool get directory => _blink.BlinkHTMLInputElement.instance.webkitdirectory_Getter_(this);
   
   @DomName('HTMLInputElement.webkitdirectory')
   @DocsEditable()
@@ -22902,43 +22744,48 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://plus.sandbox.google.com/+AddyOsmani/posts/Dk5UhZ6zfF3
-  set directory(bool value) => _blink.BlinkHTMLInputElement.instance.webkitdirectory_Setter_(unwrap_jso(this), value);
+  set directory(bool value) => _blink.BlinkHTMLInputElement.instance.webkitdirectory_Setter_(this, value);
   
   @DomName('HTMLInputElement.width')
   @DocsEditable()
-  int get width => _blink.BlinkHTMLInputElement.instance.width_Getter_(unwrap_jso(this));
+  int get width => _blink.BlinkHTMLInputElement.instance.width_Getter_(this);
   
   @DomName('HTMLInputElement.width')
   @DocsEditable()
-  set width(int value) => _blink.BlinkHTMLInputElement.instance.width_Setter_(unwrap_jso(this), value);
+  set width(int value) => _blink.BlinkHTMLInputElement.instance.width_Setter_(this, value);
   
   @DomName('HTMLInputElement.willValidate')
   @DocsEditable()
-  bool get willValidate => _blink.BlinkHTMLInputElement.instance.willValidate_Getter_(unwrap_jso(this));
+  bool get willValidate => _blink.BlinkHTMLInputElement.instance.willValidate_Getter_(this);
   
   @DomName('HTMLInputElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLInputElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLInputElement.instance.checkValidity_Callback_0_(this);
+  
+  @DomName('HTMLInputElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLInputElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLInputElement.select')
   @DocsEditable()
-  void select() => _blink.BlinkHTMLInputElement.instance.select_Callback_0_(unwrap_jso(this));
+  void select() => _blink.BlinkHTMLInputElement.instance.select_Callback_0_(this);
   
   @DomName('HTMLInputElement.setCustomValidity')
   @DocsEditable()
-  void setCustomValidity(String error) => _blink.BlinkHTMLInputElement.instance.setCustomValidity_Callback_1_(unwrap_jso(this), error);
+  void setCustomValidity(String error) => _blink.BlinkHTMLInputElement.instance.setCustomValidity_Callback_1_(this, error);
   
   void setRangeText(String replacement, {int start, int end, String selectionMode}) {
     if ((replacement is String || replacement == null) && start == null && end == null && selectionMode == null) {
-      _blink.BlinkHTMLInputElement.instance.setRangeText_Callback_1_(unwrap_jso(this), replacement);
+      _blink.BlinkHTMLInputElement.instance.setRangeText_Callback_1_(this, replacement);
       return;
     }
     if ((end is int || end == null) && (start is int || start == null) && (replacement is String || replacement == null) && selectionMode == null) {
-      _blink.BlinkHTMLInputElement.instance.setRangeText_Callback_3_(unwrap_jso(this), replacement, start, end);
+      _blink.BlinkHTMLInputElement.instance.setRangeText_Callback_3_(this, replacement, start, end);
       return;
     }
     if ((selectionMode is String || selectionMode == null) && (end is int || end == null) && (start is int || start == null) && (replacement is String || replacement == null)) {
-      _blink.BlinkHTMLInputElement.instance.setRangeText_Callback_4_(unwrap_jso(this), replacement, start, end, selectionMode);
+      _blink.BlinkHTMLInputElement.instance.setRangeText_Callback_4_(this, replacement, start, end, selectionMode);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -22946,28 +22793,28 @@
 
   void setSelectionRange(int start, int end, [String direction]) {
     if (direction != null) {
-      _blink.BlinkHTMLInputElement.instance.setSelectionRange_Callback_3_(unwrap_jso(this), start, end, direction);
+      _blink.BlinkHTMLInputElement.instance.setSelectionRange_Callback_3_(this, start, end, direction);
       return;
     }
-    _blink.BlinkHTMLInputElement.instance.setSelectionRange_Callback_2_(unwrap_jso(this), start, end);
+    _blink.BlinkHTMLInputElement.instance.setSelectionRange_Callback_2_(this, start, end);
     return;
   }
 
   void stepDown([int n]) {
     if (n != null) {
-      _blink.BlinkHTMLInputElement.instance.stepDown_Callback_1_(unwrap_jso(this), n);
+      _blink.BlinkHTMLInputElement.instance.stepDown_Callback_1_(this, n);
       return;
     }
-    _blink.BlinkHTMLInputElement.instance.stepDown_Callback_0_(unwrap_jso(this));
+    _blink.BlinkHTMLInputElement.instance.stepDown_Callback_0_(this);
     return;
   }
 
   void stepUp([int n]) {
     if (n != null) {
-      _blink.BlinkHTMLInputElement.instance.stepUp_Callback_1_(unwrap_jso(this), n);
+      _blink.BlinkHTMLInputElement.instance.stepUp_Callback_1_(this, n);
       return;
     }
-    _blink.BlinkHTMLInputElement.instance.stepUp_Callback_0_(unwrap_jso(this));
+    _blink.BlinkHTMLInputElement.instance.stepUp_Callback_0_(this);
     return;
   }
 
@@ -23531,94 +23378,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.
 
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('InputMethodContext')
-// http://www.w3.org/TR/ime-api/#idl-def-InputMethodContext
-@Experimental()
-class InputMethodContext extends EventTarget {
-  // To suppress missing implicit constructor warnings.
-  factory InputMethodContext._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static InputMethodContext internalCreateInputMethodContext() {
-    return new InputMethodContext._internalWrap();
-  }
-
-  external factory InputMethodContext._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  InputMethodContext.internal_() : super.internal_();
-
-
-  @DomName('InputMethodContext.compositionEndOffset')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int get compositionEndOffset => _blink.BlinkInputMethodContext.instance.compositionEndOffset_Getter_(unwrap_jso(this));
-  
-  @DomName('InputMethodContext.compositionStartOffset')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int get compositionStartOffset => _blink.BlinkInputMethodContext.instance.compositionStartOffset_Getter_(unwrap_jso(this));
-  
-  @DomName('InputMethodContext.locale')
-  @DocsEditable()
-  String get locale => _blink.BlinkInputMethodContext.instance.locale_Getter_(unwrap_jso(this));
-  
-  @DomName('InputMethodContext.target')
-  @DocsEditable()
-  @Experimental() // untriaged
-  HtmlElement get target => wrap_jso(_blink.BlinkInputMethodContext.instance.target_Getter_(unwrap_jso(this)));
-  
-  @DomName('InputMethodContext.confirmComposition')
-  @DocsEditable()
-  void confirmComposition() => _blink.BlinkInputMethodContext.instance.confirmComposition_Callback_0_(unwrap_jso(this));
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('InstallEvent')
-@Experimental() // untriaged
-class InstallEvent extends ExtendableEvent {
-  // To suppress missing implicit constructor warnings.
-  factory InstallEvent._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static InstallEvent internalCreateInstallEvent() {
-    return new InstallEvent._internalWrap();
-  }
-
-  external factory InstallEvent._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  InstallEvent.internal_() : super.internal_();
-
-
-  @DomName('InstallEvent.reloadAll')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future reloadAll() => wrap_jso(_blink.BlinkInstallEvent.instance.reloadAll_Callback_0_(unwrap_jso(this)));
-  
-  @DomName('InstallEvent.replace')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void replace() => _blink.BlinkInstallEvent.instance.replace_Callback_0_(unwrap_jso(this));
-  
-}
-// 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.
-
 
 @DomName('KeyboardEvent')
 class KeyboardEvent extends UIEvent {
@@ -23641,16 +23400,23 @@
 
   @DomName('KeyboardEvent.charCode')
   int get charCode => _charCode;
-  // To suppress missing implicit constructor warnings.
-  factory KeyboardEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('KeyboardEvent.which')
+  int get which => _which;
+
+  @DomName('KeyboardEvent.KeyboardEvent')
+  @DocsEditable()
+  factory KeyboardEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkKeyboardEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkKeyboardEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static KeyboardEvent internalCreateKeyboardEvent() {
-    return new KeyboardEvent._internalWrap();
-  }
-
-  external factory KeyboardEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   KeyboardEvent.internal_() : super.internal_();
@@ -23678,48 +23444,58 @@
 
   @DomName('KeyboardEvent.altKey')
   @DocsEditable()
-  bool get altKey => _blink.BlinkKeyboardEvent.instance.altKey_Getter_(unwrap_jso(this));
+  bool get altKey => _blink.BlinkKeyboardEvent.instance.altKey_Getter_(this);
+  
+  @DomName('KeyboardEvent.code')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get code => _blink.BlinkKeyboardEvent.instance.code_Getter_(this);
   
   @DomName('KeyboardEvent.ctrlKey')
   @DocsEditable()
-  bool get ctrlKey => _blink.BlinkKeyboardEvent.instance.ctrlKey_Getter_(unwrap_jso(this));
+  bool get ctrlKey => _blink.BlinkKeyboardEvent.instance.ctrlKey_Getter_(this);
+  
+  @DomName('KeyboardEvent.key')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get key => _blink.BlinkKeyboardEvent.instance.key_Getter_(this);
   
   @DomName('KeyboardEvent.keyIdentifier')
   @DocsEditable()
   @Experimental() // nonstandard
-  String get _keyIdentifier => _blink.BlinkKeyboardEvent.instance.keyIdentifier_Getter_(unwrap_jso(this));
+  String get _keyIdentifier => _blink.BlinkKeyboardEvent.instance.keyIdentifier_Getter_(this);
   
   @DomName('KeyboardEvent.keyLocation')
   @DocsEditable()
   @Experimental() // nonstandard
-  int get keyLocation => _blink.BlinkKeyboardEvent.instance.keyLocation_Getter_(unwrap_jso(this));
+  int get keyLocation => _blink.BlinkKeyboardEvent.instance.keyLocation_Getter_(this);
   
   @DomName('KeyboardEvent.location')
   @DocsEditable()
   @Experimental() // untriaged
-  int get location => _blink.BlinkKeyboardEvent.instance.location_Getter_(unwrap_jso(this));
+  int get location => _blink.BlinkKeyboardEvent.instance.location_Getter_(this);
   
   @DomName('KeyboardEvent.metaKey')
   @DocsEditable()
-  bool get metaKey => _blink.BlinkKeyboardEvent.instance.metaKey_Getter_(unwrap_jso(this));
+  bool get metaKey => _blink.BlinkKeyboardEvent.instance.metaKey_Getter_(this);
   
   @DomName('KeyboardEvent.repeat')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get repeat => _blink.BlinkKeyboardEvent.instance.repeat_Getter_(unwrap_jso(this));
+  bool get repeat => _blink.BlinkKeyboardEvent.instance.repeat_Getter_(this);
   
   @DomName('KeyboardEvent.shiftKey')
   @DocsEditable()
-  bool get shiftKey => _blink.BlinkKeyboardEvent.instance.shiftKey_Getter_(unwrap_jso(this));
+  bool get shiftKey => _blink.BlinkKeyboardEvent.instance.shiftKey_Getter_(this);
   
   @DomName('KeyboardEvent.getModifierState')
   @DocsEditable()
   @Experimental() // untriaged
-  bool getModifierState(String keyArgument) => _blink.BlinkKeyboardEvent.instance.getModifierState_Callback_1_(unwrap_jso(this), keyArgument);
+  bool getModifierState(String keyArg) => _blink.BlinkKeyboardEvent.instance.getModifierState_Callback_1_(this, keyArg);
   
   @DomName('KeyboardEvent.initKeyboardEvent')
   @DocsEditable()
-  void _initKeyboardEvent(String type, bool canBubble, bool cancelable, Window view, String keyIdentifier, int location, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) => _blink.BlinkKeyboardEvent.instance.initKeyboardEvent_Callback_10_(unwrap_jso(this), type, canBubble, cancelable, unwrap_jso(view), keyIdentifier, location, ctrlKey, altKey, shiftKey, metaKey);
+  void _initKeyboardEvent(String type, bool bubbles, bool cancelable, Window view, String keyIdentifier, int location, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) => _blink.BlinkKeyboardEvent.instance.initKeyboardEvent_Callback_10_(this, type, bubbles, cancelable, view, keyIdentifier, location, ctrlKey, altKey, shiftKey, metaKey);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -23730,6 +23506,45 @@
 
 
 @DocsEditable()
+@DomName('KeyframeEffect')
+@Experimental() // untriaged
+class KeyframeEffect extends AnimationEffectReadOnly {
+  // To suppress missing implicit constructor warnings.
+  factory KeyframeEffect._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('KeyframeEffect.KeyframeEffect')
+  @DocsEditable()
+  factory KeyframeEffect(Element target, List<Map> keyframes, [timing]) {
+    if ((keyframes is List<Map>) && (target is Element || target == null) && timing == null) {
+      return _blink.BlinkKeyframeEffect.instance.constructorCallback_2_(target, keyframes);
+    }
+    if ((timing is num) && (keyframes is List<Map>) && (target is Element || target == null)) {
+      return _blink.BlinkKeyframeEffect.instance.constructorCallback_3_(target, keyframes, timing);
+    }
+    if ((timing is Map) && (keyframes is List<Map>) && (target is Element || target == null)) {
+      var timing_1 = convertDartToNative_Dictionary(timing);
+      return _blink.BlinkKeyframeEffect.instance.constructorCallback_3_(target, keyframes, timing_1);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  KeyframeEffect.internal_() : super.internal_();
+
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('HTMLKeygenElement')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @SupportedBrowser(SupportedBrowser.SAFARI)
@@ -23745,11 +23560,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static KeygenElement internalCreateKeygenElement() {
-    return new KeygenElement._internalWrap();
-  }
-
-  external factory KeygenElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   KeygenElement.internal_() : super.internal_();
@@ -23766,76 +23577,81 @@
 
   @DomName('HTMLKeygenElement.autofocus')
   @DocsEditable()
-  bool get autofocus => _blink.BlinkHTMLKeygenElement.instance.autofocus_Getter_(unwrap_jso(this));
+  bool get autofocus => _blink.BlinkHTMLKeygenElement.instance.autofocus_Getter_(this);
   
   @DomName('HTMLKeygenElement.autofocus')
   @DocsEditable()
-  set autofocus(bool value) => _blink.BlinkHTMLKeygenElement.instance.autofocus_Setter_(unwrap_jso(this), value);
+  set autofocus(bool value) => _blink.BlinkHTMLKeygenElement.instance.autofocus_Setter_(this, value);
   
   @DomName('HTMLKeygenElement.challenge')
   @DocsEditable()
-  String get challenge => _blink.BlinkHTMLKeygenElement.instance.challenge_Getter_(unwrap_jso(this));
+  String get challenge => _blink.BlinkHTMLKeygenElement.instance.challenge_Getter_(this);
   
   @DomName('HTMLKeygenElement.challenge')
   @DocsEditable()
-  set challenge(String value) => _blink.BlinkHTMLKeygenElement.instance.challenge_Setter_(unwrap_jso(this), value);
+  set challenge(String value) => _blink.BlinkHTMLKeygenElement.instance.challenge_Setter_(this, value);
   
   @DomName('HTMLKeygenElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLKeygenElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLKeygenElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLKeygenElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLKeygenElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLKeygenElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLKeygenElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLKeygenElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLKeygenElement.instance.form_Getter_(this);
   
   @DomName('HTMLKeygenElement.keytype')
   @DocsEditable()
-  String get keytype => _blink.BlinkHTMLKeygenElement.instance.keytype_Getter_(unwrap_jso(this));
+  String get keytype => _blink.BlinkHTMLKeygenElement.instance.keytype_Getter_(this);
   
   @DomName('HTMLKeygenElement.keytype')
   @DocsEditable()
-  set keytype(String value) => _blink.BlinkHTMLKeygenElement.instance.keytype_Setter_(unwrap_jso(this), value);
+  set keytype(String value) => _blink.BlinkHTMLKeygenElement.instance.keytype_Setter_(this, value);
   
   @DomName('HTMLKeygenElement.labels')
   @DocsEditable()
   @Unstable()
-  List<Node> get labels => wrap_jso(_blink.BlinkHTMLKeygenElement.instance.labels_Getter_(unwrap_jso(this)));
+  List<Node> get labels => (_blink.BlinkHTMLKeygenElement.instance.labels_Getter_(this));
   
   @DomName('HTMLKeygenElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLKeygenElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLKeygenElement.instance.name_Getter_(this);
   
   @DomName('HTMLKeygenElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLKeygenElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLKeygenElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLKeygenElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLKeygenElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLKeygenElement.instance.type_Getter_(this);
   
   @DomName('HTMLKeygenElement.validationMessage')
   @DocsEditable()
-  String get validationMessage => _blink.BlinkHTMLKeygenElement.instance.validationMessage_Getter_(unwrap_jso(this));
+  String get validationMessage => _blink.BlinkHTMLKeygenElement.instance.validationMessage_Getter_(this);
   
   @DomName('HTMLKeygenElement.validity')
   @DocsEditable()
-  ValidityState get validity => wrap_jso(_blink.BlinkHTMLKeygenElement.instance.validity_Getter_(unwrap_jso(this)));
+  ValidityState get validity => _blink.BlinkHTMLKeygenElement.instance.validity_Getter_(this);
   
   @DomName('HTMLKeygenElement.willValidate')
   @DocsEditable()
-  bool get willValidate => _blink.BlinkHTMLKeygenElement.instance.willValidate_Getter_(unwrap_jso(this));
+  bool get willValidate => _blink.BlinkHTMLKeygenElement.instance.willValidate_Getter_(this);
   
   @DomName('HTMLKeygenElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLKeygenElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLKeygenElement.instance.checkValidity_Callback_0_(this);
+  
+  @DomName('HTMLKeygenElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLKeygenElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLKeygenElement.setCustomValidity')
   @DocsEditable()
-  void setCustomValidity(String error) => _blink.BlinkHTMLKeygenElement.instance.setCustomValidity_Callback_1_(unwrap_jso(this), error);
+  void setCustomValidity(String error) => _blink.BlinkHTMLKeygenElement.instance.setCustomValidity_Callback_1_(this, error);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -23857,11 +23673,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static LIElement internalCreateLIElement() {
-    return new LIElement._internalWrap();
-  }
-
-  external factory LIElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   LIElement.internal_() : super.internal_();
@@ -23875,11 +23687,11 @@
 
   @DomName('HTMLLIElement.value')
   @DocsEditable()
-  int get value => _blink.BlinkHTMLLIElement.instance.value_Getter_(unwrap_jso(this));
+  int get value => _blink.BlinkHTMLLIElement.instance.value_Getter_(this);
   
   @DomName('HTMLLIElement.value')
   @DocsEditable()
-  set value(int value) => _blink.BlinkHTMLLIElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(int value) => _blink.BlinkHTMLLIElement.instance.value_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -23901,11 +23713,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static LabelElement internalCreateLabelElement() {
-    return new LabelElement._internalWrap();
-  }
-
-  external factory LabelElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   LabelElement.internal_() : super.internal_();
@@ -23919,19 +23727,19 @@
 
   @DomName('HTMLLabelElement.control')
   @DocsEditable()
-  HtmlElement get control => wrap_jso(_blink.BlinkHTMLLabelElement.instance.control_Getter_(unwrap_jso(this)));
+  HtmlElement get control => _blink.BlinkHTMLLabelElement.instance.control_Getter_(this);
   
   @DomName('HTMLLabelElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLLabelElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLLabelElement.instance.form_Getter_(this);
   
   @DomName('HTMLLabelElement.htmlFor')
   @DocsEditable()
-  String get htmlFor => _blink.BlinkHTMLLabelElement.instance.htmlFor_Getter_(unwrap_jso(this));
+  String get htmlFor => _blink.BlinkHTMLLabelElement.instance.htmlFor_Getter_(this);
   
   @DomName('HTMLLabelElement.htmlFor')
   @DocsEditable()
-  set htmlFor(String value) => _blink.BlinkHTMLLabelElement.instance.htmlFor_Setter_(unwrap_jso(this), value);
+  set htmlFor(String value) => _blink.BlinkHTMLLabelElement.instance.htmlFor_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -23953,11 +23761,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static LegendElement internalCreateLegendElement() {
-    return new LegendElement._internalWrap();
-  }
-
-  external factory LegendElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   LegendElement.internal_() : super.internal_();
@@ -23971,7 +23775,7 @@
 
   @DomName('HTMLLegendElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLLegendElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLLegendElement.instance.form_Getter_(this);
   
 }
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
@@ -23991,11 +23795,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static LinkElement internalCreateLinkElement() {
-    return new LinkElement._internalWrap();
-  }
-
-  external factory LinkElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   LinkElement.internal_() : super.internal_();
@@ -24010,84 +23810,84 @@
   @DomName('HTMLLinkElement.crossOrigin')
   @DocsEditable()
   @Experimental() // untriaged
-  String get crossOrigin => _blink.BlinkHTMLLinkElement.instance.crossOrigin_Getter_(unwrap_jso(this));
+  String get crossOrigin => _blink.BlinkHTMLLinkElement.instance.crossOrigin_Getter_(this);
   
   @DomName('HTMLLinkElement.crossOrigin')
   @DocsEditable()
   @Experimental() // untriaged
-  set crossOrigin(String value) => _blink.BlinkHTMLLinkElement.instance.crossOrigin_Setter_(unwrap_jso(this), value);
+  set crossOrigin(String value) => _blink.BlinkHTMLLinkElement.instance.crossOrigin_Setter_(this, value);
   
   @DomName('HTMLLinkElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLLinkElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLLinkElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLLinkElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLLinkElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLLinkElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLLinkElement.href')
   @DocsEditable()
-  String get href => _blink.BlinkHTMLLinkElement.instance.href_Getter_(unwrap_jso(this));
+  String get href => _blink.BlinkHTMLLinkElement.instance.href_Getter_(this);
   
   @DomName('HTMLLinkElement.href')
   @DocsEditable()
-  set href(String value) => _blink.BlinkHTMLLinkElement.instance.href_Setter_(unwrap_jso(this), value);
+  set href(String value) => _blink.BlinkHTMLLinkElement.instance.href_Setter_(this, value);
   
   @DomName('HTMLLinkElement.hreflang')
   @DocsEditable()
-  String get hreflang => _blink.BlinkHTMLLinkElement.instance.hreflang_Getter_(unwrap_jso(this));
+  String get hreflang => _blink.BlinkHTMLLinkElement.instance.hreflang_Getter_(this);
   
   @DomName('HTMLLinkElement.hreflang')
   @DocsEditable()
-  set hreflang(String value) => _blink.BlinkHTMLLinkElement.instance.hreflang_Setter_(unwrap_jso(this), value);
+  set hreflang(String value) => _blink.BlinkHTMLLinkElement.instance.hreflang_Setter_(this, value);
   
   @DomName('HTMLLinkElement.import')
   @DocsEditable()
   // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/imports/index.html#interface-import
   @Experimental()
-  Document get import => wrap_jso(_blink.BlinkHTMLLinkElement.instance.import_Getter_(unwrap_jso(this)));
+  Document get import => _blink.BlinkHTMLLinkElement.instance.import_Getter_(this);
   
   @DomName('HTMLLinkElement.integrity')
   @DocsEditable()
   @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLLinkElement.instance.integrity_Getter_(unwrap_jso(this));
+  String get integrity => _blink.BlinkHTMLLinkElement.instance.integrity_Getter_(this);
   
   @DomName('HTMLLinkElement.integrity')
   @DocsEditable()
   @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLLinkElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  set integrity(String value) => _blink.BlinkHTMLLinkElement.instance.integrity_Setter_(this, value);
   
   @DomName('HTMLLinkElement.media')
   @DocsEditable()
-  String get media => _blink.BlinkHTMLLinkElement.instance.media_Getter_(unwrap_jso(this));
+  String get media => _blink.BlinkHTMLLinkElement.instance.media_Getter_(this);
   
   @DomName('HTMLLinkElement.media')
   @DocsEditable()
-  set media(String value) => _blink.BlinkHTMLLinkElement.instance.media_Setter_(unwrap_jso(this), value);
+  set media(String value) => _blink.BlinkHTMLLinkElement.instance.media_Setter_(this, value);
   
   @DomName('HTMLLinkElement.rel')
   @DocsEditable()
-  String get rel => _blink.BlinkHTMLLinkElement.instance.rel_Getter_(unwrap_jso(this));
+  String get rel => _blink.BlinkHTMLLinkElement.instance.rel_Getter_(this);
   
   @DomName('HTMLLinkElement.rel')
   @DocsEditable()
-  set rel(String value) => _blink.BlinkHTMLLinkElement.instance.rel_Setter_(unwrap_jso(this), value);
+  set rel(String value) => _blink.BlinkHTMLLinkElement.instance.rel_Setter_(this, value);
   
   @DomName('HTMLLinkElement.sheet')
   @DocsEditable()
-  StyleSheet get sheet => wrap_jso(_blink.BlinkHTMLLinkElement.instance.sheet_Getter_(unwrap_jso(this)));
+  StyleSheet get sheet => _blink.BlinkHTMLLinkElement.instance.sheet_Getter_(this);
   
   @DomName('HTMLLinkElement.sizes')
   @DocsEditable()
-  DomSettableTokenList get sizes => wrap_jso(_blink.BlinkHTMLLinkElement.instance.sizes_Getter_(unwrap_jso(this)));
+  DomSettableTokenList get sizes => _blink.BlinkHTMLLinkElement.instance.sizes_Getter_(this);
   
   @DomName('HTMLLinkElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLLinkElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLLinkElement.instance.type_Getter_(this);
   
   @DomName('HTMLLinkElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLLinkElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLLinkElement.instance.type_Setter_(this, value);
   
 
     /// Checks if HTML imports are supported on the current platform.
@@ -24095,44 +23895,6 @@
     return true;
   }
 }
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('LocalCredential')
-@Experimental() // untriaged
-class LocalCredential extends Credential {
-  // To suppress missing implicit constructor warnings.
-  factory LocalCredential._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('LocalCredential.LocalCredential')
-  @DocsEditable()
-  factory LocalCredential(String id, String name, String avatarURL, String password) {
-    return wrap_jso(_blink.BlinkLocalCredential.instance.constructorCallback_4_(id, name, avatarURL, password));
-  }
-
-
-  @Deprecated("Internal Use Only")
-  static LocalCredential internalCreateLocalCredential() {
-    return new LocalCredential._internalWrap();
-  }
-
-  external factory LocalCredential._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  LocalCredential.internal_() : super.internal_();
-
-
-  @DomName('LocalCredential.password')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get password => _blink.BlinkLocalCredential.instance.password_Getter_(unwrap_jso(this));
-  
-}
 // 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.
@@ -24144,111 +23906,103 @@
   // To suppress missing implicit constructor warnings.
   factory Location._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Location internalCreateLocation() {
-    return new Location._internalWrap();
-  }
 
-  factory Location._internalWrap() {
-    return new Location.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Location.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Location.ancestorOrigins')
   @DocsEditable()
   @Experimental() // nonstandard
-  List<String> get ancestorOrigins => wrap_jso(_blink.BlinkLocation.instance.ancestorOrigins_Getter_(unwrap_jso(this)));
+  List<String> get ancestorOrigins => _blink.BlinkLocation.instance.ancestorOrigins_Getter_(this);
   
   @DomName('Location.hash')
   @DocsEditable()
-  String get hash => _blink.BlinkLocation.instance.hash_Getter_(unwrap_jso(this));
+  String get hash => _blink.BlinkLocation.instance.hash_Getter_(this);
   
   @DomName('Location.hash')
   @DocsEditable()
-  set hash(String value) => _blink.BlinkLocation.instance.hash_Setter_(unwrap_jso(this), value);
+  set hash(String value) => _blink.BlinkLocation.instance.hash_Setter_(this, value);
   
   @DomName('Location.host')
   @DocsEditable()
-  String get host => _blink.BlinkLocation.instance.host_Getter_(unwrap_jso(this));
+  String get host => _blink.BlinkLocation.instance.host_Getter_(this);
   
   @DomName('Location.host')
   @DocsEditable()
-  set host(String value) => _blink.BlinkLocation.instance.host_Setter_(unwrap_jso(this), value);
+  set host(String value) => _blink.BlinkLocation.instance.host_Setter_(this, value);
   
   @DomName('Location.hostname')
   @DocsEditable()
-  String get hostname => _blink.BlinkLocation.instance.hostname_Getter_(unwrap_jso(this));
+  String get hostname => _blink.BlinkLocation.instance.hostname_Getter_(this);
   
   @DomName('Location.hostname')
   @DocsEditable()
-  set hostname(String value) => _blink.BlinkLocation.instance.hostname_Setter_(unwrap_jso(this), value);
+  set hostname(String value) => _blink.BlinkLocation.instance.hostname_Setter_(this, value);
   
   @DomName('Location.href')
   @DocsEditable()
-  String get href => _blink.BlinkLocation.instance.href_Getter_(unwrap_jso(this));
+  String get href => _blink.BlinkLocation.instance.href_Getter_(this);
   
   @DomName('Location.href')
   @DocsEditable()
-  set href(String value) => _blink.BlinkLocation.instance.href_Setter_(unwrap_jso(this), value);
+  set href(String value) => _blink.BlinkLocation.instance.href_Setter_(this, value);
   
   @DomName('Location.origin')
   @DocsEditable()
   // http://url.spec.whatwg.org/#urlutils Webkit Only
   @Experimental() // non-standard
-  String get origin => _blink.BlinkLocation.instance.origin_Getter_(unwrap_jso(this));
+  String get origin => _blink.BlinkLocation.instance.origin_Getter_(this);
   
   @DomName('Location.pathname')
   @DocsEditable()
-  String get pathname => _blink.BlinkLocation.instance.pathname_Getter_(unwrap_jso(this));
+  String get pathname => _blink.BlinkLocation.instance.pathname_Getter_(this);
   
   @DomName('Location.pathname')
   @DocsEditable()
-  set pathname(String value) => _blink.BlinkLocation.instance.pathname_Setter_(unwrap_jso(this), value);
+  set pathname(String value) => _blink.BlinkLocation.instance.pathname_Setter_(this, value);
   
   @DomName('Location.port')
   @DocsEditable()
-  String get port => _blink.BlinkLocation.instance.port_Getter_(unwrap_jso(this));
+  String get port => _blink.BlinkLocation.instance.port_Getter_(this);
   
   @DomName('Location.port')
   @DocsEditable()
-  set port(String value) => _blink.BlinkLocation.instance.port_Setter_(unwrap_jso(this), value);
+  set port(String value) => _blink.BlinkLocation.instance.port_Setter_(this, value);
   
   @DomName('Location.protocol')
   @DocsEditable()
-  String get protocol => _blink.BlinkLocation.instance.protocol_Getter_(unwrap_jso(this));
+  String get protocol => _blink.BlinkLocation.instance.protocol_Getter_(this);
   
   @DomName('Location.protocol')
   @DocsEditable()
-  set protocol(String value) => _blink.BlinkLocation.instance.protocol_Setter_(unwrap_jso(this), value);
+  set protocol(String value) => _blink.BlinkLocation.instance.protocol_Setter_(this, value);
   
   @DomName('Location.search')
   @DocsEditable()
-  String get search => _blink.BlinkLocation.instance.search_Getter_(unwrap_jso(this));
+  String get search => _blink.BlinkLocation.instance.search_Getter_(this);
   
   @DomName('Location.search')
   @DocsEditable()
-  set search(String value) => _blink.BlinkLocation.instance.search_Setter_(unwrap_jso(this), value);
+  set search(String value) => _blink.BlinkLocation.instance.search_Setter_(this, value);
   
   @DomName('Location.assign')
   @DocsEditable()
-  void assign([String url]) => _blink.BlinkLocation.instance.assign_Callback_1_(unwrap_jso(this), url);
+  void assign([String url]) => _blink.BlinkLocation.instance.assign_Callback_1_(this, url);
   
   @DomName('Location.reload')
   @DocsEditable()
-  void reload() => _blink.BlinkLocation.instance.reload_Callback_0_(unwrap_jso(this));
+  void reload() => _blink.BlinkLocation.instance.reload_Callback_0_(this);
   
   @DomName('Location.replace')
   @DocsEditable()
-  void replace(String url) => _blink.BlinkLocation.instance.replace_Callback_1_(unwrap_jso(this), url);
+  void replace(String url) => _blink.BlinkLocation.instance.replace_Callback_1_(this, url);
   
   @DomName('Location.toString')
   @DocsEditable()
-  String toString() => _blink.BlinkLocation.instance.toString_Callback_0_(unwrap_jso(this));
+  String toString() => _blink.BlinkLocation.instance.toString_Callback_0_(this);
   
 
 
@@ -24260,27 +24014,6 @@
 // WARNING: Do not edit - generated code.
 
 
-@DomName('MIDIErrorCallback')
-// http://webaudio.github.io/web-midi-api/#midierrorcallback
-@Experimental()
-typedef void MidiErrorCallback(DomError error);
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DomName('MIDISuccessCallback')
-@Experimental() // untriaged
-typedef void MidiSuccessCallback(MidiAccess access, bool sysex);
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
 @DocsEditable()
 @DomName('HTMLMapElement')
 class MapElement extends HtmlElement {
@@ -24293,11 +24026,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MapElement internalCreateMapElement() {
-    return new MapElement._internalWrap();
-  }
-
-  external factory MapElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MapElement.internal_() : super.internal_();
@@ -24311,15 +24040,15 @@
 
   @DomName('HTMLMapElement.areas')
   @DocsEditable()
-  List<Node> get areas => wrap_jso(_blink.BlinkHTMLMapElement.instance.areas_Getter_(unwrap_jso(this)));
+  List<Node> get areas => (_blink.BlinkHTMLMapElement.instance.areas_Getter_(this));
   
   @DomName('HTMLMapElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLMapElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLMapElement.instance.name_Getter_(this);
   
   @DomName('HTMLMapElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLMapElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLMapElement.instance.name_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -24340,16 +24069,12 @@
   @DomName('MediaController.MediaController')
   @DocsEditable()
   factory MediaController() {
-    return wrap_jso(_blink.BlinkMediaController.instance.constructorCallback_0_());
+    return _blink.BlinkMediaController.instance.constructorCallback_0_();
   }
 
 
   @Deprecated("Internal Use Only")
-  static MediaController internalCreateMediaController() {
-    return new MediaController._internalWrap();
-  }
-
-  external factory MediaController._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaController.internal_() : super.internal_();
@@ -24357,79 +24082,79 @@
 
   @DomName('MediaController.buffered')
   @DocsEditable()
-  TimeRanges get buffered => wrap_jso(_blink.BlinkMediaController.instance.buffered_Getter_(unwrap_jso(this)));
+  TimeRanges get buffered => _blink.BlinkMediaController.instance.buffered_Getter_(this);
   
   @DomName('MediaController.currentTime')
   @DocsEditable()
-  num get currentTime => _blink.BlinkMediaController.instance.currentTime_Getter_(unwrap_jso(this));
+  num get currentTime => _blink.BlinkMediaController.instance.currentTime_Getter_(this);
   
   @DomName('MediaController.currentTime')
   @DocsEditable()
-  set currentTime(num value) => _blink.BlinkMediaController.instance.currentTime_Setter_(unwrap_jso(this), value);
+  set currentTime(num value) => _blink.BlinkMediaController.instance.currentTime_Setter_(this, value);
   
   @DomName('MediaController.defaultPlaybackRate')
   @DocsEditable()
-  num get defaultPlaybackRate => _blink.BlinkMediaController.instance.defaultPlaybackRate_Getter_(unwrap_jso(this));
+  num get defaultPlaybackRate => _blink.BlinkMediaController.instance.defaultPlaybackRate_Getter_(this);
   
   @DomName('MediaController.defaultPlaybackRate')
   @DocsEditable()
-  set defaultPlaybackRate(num value) => _blink.BlinkMediaController.instance.defaultPlaybackRate_Setter_(unwrap_jso(this), value);
+  set defaultPlaybackRate(num value) => _blink.BlinkMediaController.instance.defaultPlaybackRate_Setter_(this, value);
   
   @DomName('MediaController.duration')
   @DocsEditable()
-  num get duration => _blink.BlinkMediaController.instance.duration_Getter_(unwrap_jso(this));
+  num get duration => _blink.BlinkMediaController.instance.duration_Getter_(this);
   
   @DomName('MediaController.muted')
   @DocsEditable()
-  bool get muted => _blink.BlinkMediaController.instance.muted_Getter_(unwrap_jso(this));
+  bool get muted => _blink.BlinkMediaController.instance.muted_Getter_(this);
   
   @DomName('MediaController.muted')
   @DocsEditable()
-  set muted(bool value) => _blink.BlinkMediaController.instance.muted_Setter_(unwrap_jso(this), value);
+  set muted(bool value) => _blink.BlinkMediaController.instance.muted_Setter_(this, value);
   
   @DomName('MediaController.paused')
   @DocsEditable()
-  bool get paused => _blink.BlinkMediaController.instance.paused_Getter_(unwrap_jso(this));
+  bool get paused => _blink.BlinkMediaController.instance.paused_Getter_(this);
   
   @DomName('MediaController.playbackRate')
   @DocsEditable()
-  num get playbackRate => _blink.BlinkMediaController.instance.playbackRate_Getter_(unwrap_jso(this));
+  num get playbackRate => _blink.BlinkMediaController.instance.playbackRate_Getter_(this);
   
   @DomName('MediaController.playbackRate')
   @DocsEditable()
-  set playbackRate(num value) => _blink.BlinkMediaController.instance.playbackRate_Setter_(unwrap_jso(this), value);
+  set playbackRate(num value) => _blink.BlinkMediaController.instance.playbackRate_Setter_(this, value);
   
   @DomName('MediaController.playbackState')
   @DocsEditable()
-  String get playbackState => _blink.BlinkMediaController.instance.playbackState_Getter_(unwrap_jso(this));
+  String get playbackState => _blink.BlinkMediaController.instance.playbackState_Getter_(this);
   
   @DomName('MediaController.played')
   @DocsEditable()
-  TimeRanges get played => wrap_jso(_blink.BlinkMediaController.instance.played_Getter_(unwrap_jso(this)));
+  TimeRanges get played => _blink.BlinkMediaController.instance.played_Getter_(this);
   
   @DomName('MediaController.seekable')
   @DocsEditable()
-  TimeRanges get seekable => wrap_jso(_blink.BlinkMediaController.instance.seekable_Getter_(unwrap_jso(this)));
+  TimeRanges get seekable => _blink.BlinkMediaController.instance.seekable_Getter_(this);
   
   @DomName('MediaController.volume')
   @DocsEditable()
-  num get volume => _blink.BlinkMediaController.instance.volume_Getter_(unwrap_jso(this));
+  num get volume => _blink.BlinkMediaController.instance.volume_Getter_(this);
   
   @DomName('MediaController.volume')
   @DocsEditable()
-  set volume(num value) => _blink.BlinkMediaController.instance.volume_Setter_(unwrap_jso(this), value);
+  set volume(num value) => _blink.BlinkMediaController.instance.volume_Setter_(this, value);
   
   @DomName('MediaController.pause')
   @DocsEditable()
-  void pause() => _blink.BlinkMediaController.instance.pause_Callback_0_(unwrap_jso(this));
+  void pause() => _blink.BlinkMediaController.instance.pause_Callback_0_(this);
   
   @DomName('MediaController.play')
   @DocsEditable()
-  void play() => _blink.BlinkMediaController.instance.play_Callback_0_(unwrap_jso(this));
+  void play() => _blink.BlinkMediaController.instance.play_Callback_0_(this);
   
   @DomName('MediaController.unpause')
   @DocsEditable()
-  void unpause() => _blink.BlinkMediaController.instance.unpause_Callback_0_(unwrap_jso(this));
+  void unpause() => _blink.BlinkMediaController.instance.unpause_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -24446,40 +24171,32 @@
   // To suppress missing implicit constructor warnings.
   factory MediaDeviceInfo._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MediaDeviceInfo internalCreateMediaDeviceInfo() {
-    return new MediaDeviceInfo._internalWrap();
-  }
 
-  factory MediaDeviceInfo._internalWrap() {
-    return new MediaDeviceInfo.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaDeviceInfo.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MediaDeviceInfo.deviceId')
   @DocsEditable()
   @Experimental() // untriaged
-  String get deviceId => _blink.BlinkMediaDeviceInfo.instance.deviceId_Getter_(unwrap_jso(this));
+  String get deviceId => _blink.BlinkMediaDeviceInfo.instance.deviceId_Getter_(this);
   
   @DomName('MediaDeviceInfo.groupId')
   @DocsEditable()
   @Experimental() // untriaged
-  String get groupId => _blink.BlinkMediaDeviceInfo.instance.groupId_Getter_(unwrap_jso(this));
+  String get groupId => _blink.BlinkMediaDeviceInfo.instance.groupId_Getter_(this);
   
   @DomName('MediaDeviceInfo.kind')
   @DocsEditable()
   @Experimental() // untriaged
-  String get kind => _blink.BlinkMediaDeviceInfo.instance.kind_Getter_(unwrap_jso(this));
+  String get kind => _blink.BlinkMediaDeviceInfo.instance.kind_Getter_(this);
   
   @DomName('MediaDeviceInfo.label')
   @DocsEditable()
   @Experimental() // untriaged
-  String get label => _blink.BlinkMediaDeviceInfo.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkMediaDeviceInfo.instance.label_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -24489,9 +24206,31 @@
 // WARNING: Do not edit - generated code.
 
 
-@DomName('MediaDeviceInfoCallback')
+@DocsEditable()
+@DomName('MediaDevices')
 @Experimental() // untriaged
-typedef void MediaDeviceInfoCallback(List<MediaDeviceInfo> devices);
+class MediaDevices extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory MediaDevices._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  MediaDevices.internal_() { }
+
+  @DomName('MediaDevices.enumerateDevices')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future enumerateDevices() => convertNativePromiseToDartFuture(_blink.BlinkMediaDevices.instance.enumerateDevices_Callback_0_(this));
+  
+  @DomName('MediaDevices.getUserMedia')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getUserMedia(Map options) => convertNativePromiseToDartFuture(_blink.BlinkMediaDevices.instance.getUserMedia_Callback_1_(this, convertDartToNative_Dictionary(options)));
+  
+}
 // 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.
@@ -24564,11 +24303,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MediaElement internalCreateMediaElement() {
-    return new MediaElement._internalWrap();
-  }
-
-  external factory MediaElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaElement.internal_() : super.internal_();
@@ -24619,192 +24354,197 @@
   @DomName('HTMLMediaElement.audioTracks')
   @DocsEditable()
   @Experimental() // untriaged
-  AudioTrackList get audioTracks => wrap_jso(_blink.BlinkHTMLMediaElement.instance.audioTracks_Getter_(unwrap_jso(this)));
+  AudioTrackList get audioTracks => _blink.BlinkHTMLMediaElement.instance.audioTracks_Getter_(this);
   
   @DomName('HTMLMediaElement.autoplay')
   @DocsEditable()
-  bool get autoplay => _blink.BlinkHTMLMediaElement.instance.autoplay_Getter_(unwrap_jso(this));
+  bool get autoplay => _blink.BlinkHTMLMediaElement.instance.autoplay_Getter_(this);
   
   @DomName('HTMLMediaElement.autoplay')
   @DocsEditable()
-  set autoplay(bool value) => _blink.BlinkHTMLMediaElement.instance.autoplay_Setter_(unwrap_jso(this), value);
+  set autoplay(bool value) => _blink.BlinkHTMLMediaElement.instance.autoplay_Setter_(this, value);
   
   @DomName('HTMLMediaElement.buffered')
   @DocsEditable()
-  TimeRanges get buffered => wrap_jso(_blink.BlinkHTMLMediaElement.instance.buffered_Getter_(unwrap_jso(this)));
+  TimeRanges get buffered => _blink.BlinkHTMLMediaElement.instance.buffered_Getter_(this);
   
   @DomName('HTMLMediaElement.controller')
   @DocsEditable()
-  MediaController get controller => wrap_jso(_blink.BlinkHTMLMediaElement.instance.controller_Getter_(unwrap_jso(this)));
+  MediaController get controller => _blink.BlinkHTMLMediaElement.instance.controller_Getter_(this);
   
   @DomName('HTMLMediaElement.controller')
   @DocsEditable()
-  set controller(MediaController value) => _blink.BlinkHTMLMediaElement.instance.controller_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set controller(MediaController value) => _blink.BlinkHTMLMediaElement.instance.controller_Setter_(this, value);
   
   @DomName('HTMLMediaElement.controls')
   @DocsEditable()
-  bool get controls => _blink.BlinkHTMLMediaElement.instance.controls_Getter_(unwrap_jso(this));
+  bool get controls => _blink.BlinkHTMLMediaElement.instance.controls_Getter_(this);
   
   @DomName('HTMLMediaElement.controls')
   @DocsEditable()
-  set controls(bool value) => _blink.BlinkHTMLMediaElement.instance.controls_Setter_(unwrap_jso(this), value);
+  set controls(bool value) => _blink.BlinkHTMLMediaElement.instance.controls_Setter_(this, value);
   
   @DomName('HTMLMediaElement.crossOrigin')
   @DocsEditable()
   @Experimental() // untriaged
-  String get crossOrigin => _blink.BlinkHTMLMediaElement.instance.crossOrigin_Getter_(unwrap_jso(this));
+  String get crossOrigin => _blink.BlinkHTMLMediaElement.instance.crossOrigin_Getter_(this);
   
   @DomName('HTMLMediaElement.crossOrigin')
   @DocsEditable()
   @Experimental() // untriaged
-  set crossOrigin(String value) => _blink.BlinkHTMLMediaElement.instance.crossOrigin_Setter_(unwrap_jso(this), value);
+  set crossOrigin(String value) => _blink.BlinkHTMLMediaElement.instance.crossOrigin_Setter_(this, value);
   
   @DomName('HTMLMediaElement.currentSrc')
   @DocsEditable()
-  String get currentSrc => _blink.BlinkHTMLMediaElement.instance.currentSrc_Getter_(unwrap_jso(this));
+  String get currentSrc => _blink.BlinkHTMLMediaElement.instance.currentSrc_Getter_(this);
   
   @DomName('HTMLMediaElement.currentTime')
   @DocsEditable()
-  num get currentTime => _blink.BlinkHTMLMediaElement.instance.currentTime_Getter_(unwrap_jso(this));
+  num get currentTime => _blink.BlinkHTMLMediaElement.instance.currentTime_Getter_(this);
   
   @DomName('HTMLMediaElement.currentTime')
   @DocsEditable()
-  set currentTime(num value) => _blink.BlinkHTMLMediaElement.instance.currentTime_Setter_(unwrap_jso(this), value);
+  set currentTime(num value) => _blink.BlinkHTMLMediaElement.instance.currentTime_Setter_(this, value);
   
   @DomName('HTMLMediaElement.defaultMuted')
   @DocsEditable()
-  bool get defaultMuted => _blink.BlinkHTMLMediaElement.instance.defaultMuted_Getter_(unwrap_jso(this));
+  bool get defaultMuted => _blink.BlinkHTMLMediaElement.instance.defaultMuted_Getter_(this);
   
   @DomName('HTMLMediaElement.defaultMuted')
   @DocsEditable()
-  set defaultMuted(bool value) => _blink.BlinkHTMLMediaElement.instance.defaultMuted_Setter_(unwrap_jso(this), value);
+  set defaultMuted(bool value) => _blink.BlinkHTMLMediaElement.instance.defaultMuted_Setter_(this, value);
   
   @DomName('HTMLMediaElement.defaultPlaybackRate')
   @DocsEditable()
-  num get defaultPlaybackRate => _blink.BlinkHTMLMediaElement.instance.defaultPlaybackRate_Getter_(unwrap_jso(this));
+  num get defaultPlaybackRate => _blink.BlinkHTMLMediaElement.instance.defaultPlaybackRate_Getter_(this);
   
   @DomName('HTMLMediaElement.defaultPlaybackRate')
   @DocsEditable()
-  set defaultPlaybackRate(num value) => _blink.BlinkHTMLMediaElement.instance.defaultPlaybackRate_Setter_(unwrap_jso(this), value);
+  set defaultPlaybackRate(num value) => _blink.BlinkHTMLMediaElement.instance.defaultPlaybackRate_Setter_(this, value);
   
   @DomName('HTMLMediaElement.duration')
   @DocsEditable()
-  num get duration => _blink.BlinkHTMLMediaElement.instance.duration_Getter_(unwrap_jso(this));
+  num get duration => _blink.BlinkHTMLMediaElement.instance.duration_Getter_(this);
   
   @DomName('HTMLMediaElement.ended')
   @DocsEditable()
-  bool get ended => _blink.BlinkHTMLMediaElement.instance.ended_Getter_(unwrap_jso(this));
+  bool get ended => _blink.BlinkHTMLMediaElement.instance.ended_Getter_(this);
   
   @DomName('HTMLMediaElement.error')
   @DocsEditable()
-  MediaError get error => wrap_jso(_blink.BlinkHTMLMediaElement.instance.error_Getter_(unwrap_jso(this)));
-  
-  @DomName('HTMLMediaElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLMediaElement.instance.integrity_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLMediaElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLMediaElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  MediaError get error => _blink.BlinkHTMLMediaElement.instance.error_Getter_(this);
   
   @DomName('HTMLMediaElement.loop')
   @DocsEditable()
-  bool get loop => _blink.BlinkHTMLMediaElement.instance.loop_Getter_(unwrap_jso(this));
+  bool get loop => _blink.BlinkHTMLMediaElement.instance.loop_Getter_(this);
   
   @DomName('HTMLMediaElement.loop')
   @DocsEditable()
-  set loop(bool value) => _blink.BlinkHTMLMediaElement.instance.loop_Setter_(unwrap_jso(this), value);
+  set loop(bool value) => _blink.BlinkHTMLMediaElement.instance.loop_Setter_(this, value);
   
   @DomName('HTMLMediaElement.mediaGroup')
   @DocsEditable()
-  String get mediaGroup => _blink.BlinkHTMLMediaElement.instance.mediaGroup_Getter_(unwrap_jso(this));
+  String get mediaGroup => _blink.BlinkHTMLMediaElement.instance.mediaGroup_Getter_(this);
   
   @DomName('HTMLMediaElement.mediaGroup')
   @DocsEditable()
-  set mediaGroup(String value) => _blink.BlinkHTMLMediaElement.instance.mediaGroup_Setter_(unwrap_jso(this), value);
+  set mediaGroup(String value) => _blink.BlinkHTMLMediaElement.instance.mediaGroup_Setter_(this, value);
   
   @DomName('HTMLMediaElement.mediaKeys')
   @DocsEditable()
   // https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html
   @Experimental()
-  MediaKeys get mediaKeys => wrap_jso(_blink.BlinkHTMLMediaElement.instance.mediaKeys_Getter_(unwrap_jso(this)));
+  MediaKeys get mediaKeys => _blink.BlinkHTMLMediaElement.instance.mediaKeys_Getter_(this);
   
   @DomName('HTMLMediaElement.muted')
   @DocsEditable()
-  bool get muted => _blink.BlinkHTMLMediaElement.instance.muted_Getter_(unwrap_jso(this));
+  bool get muted => _blink.BlinkHTMLMediaElement.instance.muted_Getter_(this);
   
   @DomName('HTMLMediaElement.muted')
   @DocsEditable()
-  set muted(bool value) => _blink.BlinkHTMLMediaElement.instance.muted_Setter_(unwrap_jso(this), value);
+  set muted(bool value) => _blink.BlinkHTMLMediaElement.instance.muted_Setter_(this, value);
   
   @DomName('HTMLMediaElement.networkState')
   @DocsEditable()
-  int get networkState => _blink.BlinkHTMLMediaElement.instance.networkState_Getter_(unwrap_jso(this));
+  int get networkState => _blink.BlinkHTMLMediaElement.instance.networkState_Getter_(this);
   
   @DomName('HTMLMediaElement.paused')
   @DocsEditable()
-  bool get paused => _blink.BlinkHTMLMediaElement.instance.paused_Getter_(unwrap_jso(this));
+  bool get paused => _blink.BlinkHTMLMediaElement.instance.paused_Getter_(this);
   
   @DomName('HTMLMediaElement.playbackRate')
   @DocsEditable()
-  num get playbackRate => _blink.BlinkHTMLMediaElement.instance.playbackRate_Getter_(unwrap_jso(this));
+  num get playbackRate => _blink.BlinkHTMLMediaElement.instance.playbackRate_Getter_(this);
   
   @DomName('HTMLMediaElement.playbackRate')
   @DocsEditable()
-  set playbackRate(num value) => _blink.BlinkHTMLMediaElement.instance.playbackRate_Setter_(unwrap_jso(this), value);
+  set playbackRate(num value) => _blink.BlinkHTMLMediaElement.instance.playbackRate_Setter_(this, value);
   
   @DomName('HTMLMediaElement.played')
   @DocsEditable()
-  TimeRanges get played => wrap_jso(_blink.BlinkHTMLMediaElement.instance.played_Getter_(unwrap_jso(this)));
+  TimeRanges get played => _blink.BlinkHTMLMediaElement.instance.played_Getter_(this);
   
   @DomName('HTMLMediaElement.preload')
   @DocsEditable()
-  String get preload => _blink.BlinkHTMLMediaElement.instance.preload_Getter_(unwrap_jso(this));
+  String get preload => _blink.BlinkHTMLMediaElement.instance.preload_Getter_(this);
   
   @DomName('HTMLMediaElement.preload')
   @DocsEditable()
-  set preload(String value) => _blink.BlinkHTMLMediaElement.instance.preload_Setter_(unwrap_jso(this), value);
+  set preload(String value) => _blink.BlinkHTMLMediaElement.instance.preload_Setter_(this, value);
   
   @DomName('HTMLMediaElement.readyState')
   @DocsEditable()
-  int get readyState => _blink.BlinkHTMLMediaElement.instance.readyState_Getter_(unwrap_jso(this));
+  int get readyState => _blink.BlinkHTMLMediaElement.instance.readyState_Getter_(this);
   
   @DomName('HTMLMediaElement.seekable')
   @DocsEditable()
-  TimeRanges get seekable => wrap_jso(_blink.BlinkHTMLMediaElement.instance.seekable_Getter_(unwrap_jso(this)));
+  TimeRanges get seekable => _blink.BlinkHTMLMediaElement.instance.seekable_Getter_(this);
   
   @DomName('HTMLMediaElement.seeking')
   @DocsEditable()
-  bool get seeking => _blink.BlinkHTMLMediaElement.instance.seeking_Getter_(unwrap_jso(this));
+  bool get seeking => _blink.BlinkHTMLMediaElement.instance.seeking_Getter_(this);
+  
+  @DomName('HTMLMediaElement.session')
+  @DocsEditable()
+  @Experimental() // untriaged
+  MediaSession get session => _blink.BlinkHTMLMediaElement.instance.session_Getter_(this);
+  
+  @DomName('HTMLMediaElement.session')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set session(MediaSession value) => _blink.BlinkHTMLMediaElement.instance.session_Setter_(this, value);
+  
+  @DomName('HTMLMediaElement.sinkId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get sinkId => _blink.BlinkHTMLMediaElement.instance.sinkId_Getter_(this);
   
   @DomName('HTMLMediaElement.src')
   @DocsEditable()
-  String get src => _blink.BlinkHTMLMediaElement.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkHTMLMediaElement.instance.src_Getter_(this);
   
   @DomName('HTMLMediaElement.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkHTMLMediaElement.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkHTMLMediaElement.instance.src_Setter_(this, value);
   
   @DomName('HTMLMediaElement.textTracks')
   @DocsEditable()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-media-texttracks
   @Experimental()
-  TextTrackList get textTracks => wrap_jso(_blink.BlinkHTMLMediaElement.instance.textTracks_Getter_(unwrap_jso(this)));
+  TextTrackList get textTracks => _blink.BlinkHTMLMediaElement.instance.textTracks_Getter_(this);
   
   @DomName('HTMLMediaElement.videoTracks')
   @DocsEditable()
   @Experimental() // untriaged
-  VideoTrackList get videoTracks => wrap_jso(_blink.BlinkHTMLMediaElement.instance.videoTracks_Getter_(unwrap_jso(this)));
+  VideoTrackList get videoTracks => _blink.BlinkHTMLMediaElement.instance.videoTracks_Getter_(this);
   
   @DomName('HTMLMediaElement.volume')
   @DocsEditable()
-  num get volume => _blink.BlinkHTMLMediaElement.instance.volume_Getter_(unwrap_jso(this));
+  num get volume => _blink.BlinkHTMLMediaElement.instance.volume_Getter_(this);
   
   @DomName('HTMLMediaElement.volume')
   @DocsEditable()
-  set volume(num value) => _blink.BlinkHTMLMediaElement.instance.volume_Setter_(unwrap_jso(this), value);
+  set volume(num value) => _blink.BlinkHTMLMediaElement.instance.volume_Setter_(this, value);
   
   @DomName('HTMLMediaElement.webkitAudioDecodedByteCount')
   @DocsEditable()
@@ -24812,7 +24552,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   @Experimental() // nonstandard
-  int get audioDecodedByteCount => _blink.BlinkHTMLMediaElement.instance.webkitAudioDecodedByteCount_Getter_(unwrap_jso(this));
+  int get audioDecodedByteCount => _blink.BlinkHTMLMediaElement.instance.webkitAudioDecodedByteCount_Getter_(this);
   
   @DomName('HTMLMediaElement.webkitVideoDecodedByteCount')
   @DocsEditable()
@@ -24820,48 +24560,59 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   @Experimental() // nonstandard
-  int get videoDecodedByteCount => _blink.BlinkHTMLMediaElement.instance.webkitVideoDecodedByteCount_Getter_(unwrap_jso(this));
+  int get videoDecodedByteCount => _blink.BlinkHTMLMediaElement.instance.webkitVideoDecodedByteCount_Getter_(this);
   
   TextTrack addTextTrack(String kind, [String label, String language]) {
     if (language != null) {
-      return wrap_jso(_blink.BlinkHTMLMediaElement.instance.addTextTrack_Callback_3_(unwrap_jso(this), kind, label, language));
+      return _blink.BlinkHTMLMediaElement.instance.addTextTrack_Callback_3_(this, kind, label, language);
     }
     if (label != null) {
-      return wrap_jso(_blink.BlinkHTMLMediaElement.instance.addTextTrack_Callback_2_(unwrap_jso(this), kind, label));
+      return _blink.BlinkHTMLMediaElement.instance.addTextTrack_Callback_2_(this, kind, label);
     }
-    return wrap_jso(_blink.BlinkHTMLMediaElement.instance.addTextTrack_Callback_1_(unwrap_jso(this), kind));
+    return _blink.BlinkHTMLMediaElement.instance.addTextTrack_Callback_1_(this, kind);
   }
 
   String canPlayType(String type, [String keySystem]) {
-    if (keySystem != null) {
-      return _blink.BlinkHTMLMediaElement.instance.canPlayType_Callback_2_(unwrap_jso(this), type, keySystem);
+    if ((type is String) && keySystem == null) {
+      return _blink.BlinkHTMLMediaElement.instance.canPlayType_Callback_1_(this, type);
     }
-    return _blink.BlinkHTMLMediaElement.instance.canPlayType_Callback_1_(unwrap_jso(this), type);
+    if ((type is String || type == null) && keySystem == null) {
+      return _blink.BlinkHTMLMediaElement.instance.canPlayType_Callback_1_(this, type);
+    }
+    if ((keySystem is String || keySystem == null) && (type is String || type == null)) {
+      return _blink.BlinkHTMLMediaElement.instance.canPlayType_Callback_2_(this, type, keySystem);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   @DomName('HTMLMediaElement.load')
   @DocsEditable()
-  void load() => _blink.BlinkHTMLMediaElement.instance.load_Callback_0_(unwrap_jso(this));
+  void load() => _blink.BlinkHTMLMediaElement.instance.load_Callback_0_(this);
   
   @DomName('HTMLMediaElement.pause')
   @DocsEditable()
-  void pause() => _blink.BlinkHTMLMediaElement.instance.pause_Callback_0_(unwrap_jso(this));
+  void pause() => _blink.BlinkHTMLMediaElement.instance.pause_Callback_0_(this);
   
   @DomName('HTMLMediaElement.play')
   @DocsEditable()
-  void play() => _blink.BlinkHTMLMediaElement.instance.play_Callback_0_(unwrap_jso(this));
+  void play() => _blink.BlinkHTMLMediaElement.instance.play_Callback_0_(this);
   
   @DomName('HTMLMediaElement.setMediaKeys')
   @DocsEditable()
   @Experimental() // untriaged
-  Future setMediaKeys(MediaKeys mediaKeys) => wrap_jso(_blink.BlinkHTMLMediaElement.instance.setMediaKeys_Callback_1_(unwrap_jso(this), unwrap_jso(mediaKeys)));
+  Future setMediaKeys(MediaKeys mediaKeys) => convertNativePromiseToDartFuture(_blink.BlinkHTMLMediaElement.instance.setMediaKeys_Callback_1_(this, mediaKeys));
+  
+  @DomName('HTMLMediaElement.setSinkId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future setSinkId(String sinkId) => convertNativePromiseToDartFuture(_blink.BlinkHTMLMediaElement.instance.setSinkId_Callback_1_(this, sinkId));
   
   void addKey(String keySystem, Uint8List key, [Uint8List initData, String sessionId]) {
     if (initData != null) {
-      _blink.BlinkHTMLMediaElement.instance.webkitAddKey_Callback_4_(unwrap_jso(this), keySystem, key, initData, sessionId);
+      _blink.BlinkHTMLMediaElement.instance.webkitAddKey_Callback_4_(this, keySystem, key, initData, sessionId);
       return;
     }
-    _blink.BlinkHTMLMediaElement.instance.webkitAddKey_Callback_2_(unwrap_jso(this), keySystem, key);
+    _blink.BlinkHTMLMediaElement.instance.webkitAddKey_Callback_2_(this, keySystem, key);
     return;
   }
 
@@ -24871,14 +24622,14 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html#extensions
-  void cancelKeyRequest(String keySystem, String sessionId) => _blink.BlinkHTMLMediaElement.instance.webkitCancelKeyRequest_Callback_2_(unwrap_jso(this), keySystem, sessionId);
+  void cancelKeyRequest(String keySystem, String sessionId) => _blink.BlinkHTMLMediaElement.instance.webkitCancelKeyRequest_Callback_2_(this, keySystem, sessionId);
   
   void generateKeyRequest(String keySystem, [Uint8List initData]) {
     if (initData != null) {
-      _blink.BlinkHTMLMediaElement.instance.webkitGenerateKeyRequest_Callback_2_(unwrap_jso(this), keySystem, initData);
+      _blink.BlinkHTMLMediaElement.instance.webkitGenerateKeyRequest_Callback_2_(this, keySystem, initData);
       return;
     }
-    _blink.BlinkHTMLMediaElement.instance.webkitGenerateKeyRequest_Callback_1_(unwrap_jso(this), keySystem);
+    _blink.BlinkHTMLMediaElement.instance.webkitGenerateKeyRequest_Callback_1_(this, keySystem);
     return;
   }
 
@@ -24919,27 +24670,62 @@
 
 
 @DocsEditable()
+@DomName('MediaEncryptedEvent')
+@Experimental() // untriaged
+class MediaEncryptedEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory MediaEncryptedEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MediaEncryptedEvent.MediaEncryptedEvent')
+  @DocsEditable()
+  factory MediaEncryptedEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMediaEncryptedEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMediaEncryptedEvent.instance.constructorCallback_1_(type);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  MediaEncryptedEvent.internal_() : super.internal_();
+
+
+  @DomName('MediaEncryptedEvent.initData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ByteBuffer get initData => _blink.BlinkMediaEncryptedEvent.instance.initData_Getter_(this);
+  
+  @DomName('MediaEncryptedEvent.initDataType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get initDataType => _blink.BlinkMediaEncryptedEvent.instance.initDataType_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('MediaError')
 @Unstable()
 class MediaError extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MediaError._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MediaError internalCreateMediaError() {
-    return new MediaError._internalWrap();
-  }
 
-  factory MediaError._internalWrap() {
-    return new MediaError.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaError.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MediaError.MEDIA_ERR_ABORTED')
   @DocsEditable()
   static const int MEDIA_ERR_ABORTED = 1;
@@ -24948,12 +24734,6 @@
   @DocsEditable()
   static const int MEDIA_ERR_DECODE = 3;
 
-  @DomName('MediaError.MEDIA_ERR_ENCRYPTED')
-  @DocsEditable()
-  // https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html#error-codes
-  @Experimental()
-  static const int MEDIA_ERR_ENCRYPTED = 5;
-
   @DomName('MediaError.MEDIA_ERR_NETWORK')
   @DocsEditable()
   static const int MEDIA_ERR_NETWORK = 2;
@@ -24964,7 +24744,7 @@
 
   @DomName('MediaError.code')
   @DocsEditable()
-  int get code => _blink.BlinkMediaError.instance.code_Getter_(unwrap_jso(this));
+  int get code => _blink.BlinkMediaError.instance.code_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -24982,21 +24762,13 @@
   // To suppress missing implicit constructor warnings.
   factory MediaKeyError._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MediaKeyError internalCreateMediaKeyError() {
-    return new MediaKeyError._internalWrap();
-  }
 
-  factory MediaKeyError._internalWrap() {
-    return new MediaKeyError.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaKeyError.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MediaKeyError.MEDIA_KEYERR_CLIENT')
   @DocsEditable()
   static const int MEDIA_KEYERR_CLIENT = 2;
@@ -25023,12 +24795,12 @@
 
   @DomName('MediaKeyError.code')
   @DocsEditable()
-  int get code => _blink.BlinkMediaKeyError.instance.code_Getter_(unwrap_jso(this));
+  int get code => _blink.BlinkMediaKeyError.instance.code_Getter_(this);
   
   @DomName('MediaKeyError.systemCode')
   @DocsEditable()
   @Experimental() // non-standard
-  int get systemCode => _blink.BlinkMediaKeyError.instance.systemCode_Getter_(unwrap_jso(this));
+  int get systemCode => _blink.BlinkMediaKeyError.instance.systemCode_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25046,13 +24818,19 @@
   // To suppress missing implicit constructor warnings.
   factory MediaKeyEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static MediaKeyEvent internalCreateMediaKeyEvent() {
-    return new MediaKeyEvent._internalWrap();
+  @DomName('MediaKeyEvent.MediaKeyEvent')
+  @DocsEditable()
+  factory MediaKeyEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMediaKeyEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMediaKeyEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory MediaKeyEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaKeyEvent.internal_() : super.internal_();
@@ -25060,31 +24838,31 @@
 
   @DomName('MediaKeyEvent.defaultURL')
   @DocsEditable()
-  String get defaultUrl => _blink.BlinkMediaKeyEvent.instance.defaultURL_Getter_(unwrap_jso(this));
+  String get defaultUrl => _blink.BlinkMediaKeyEvent.instance.defaultURL_Getter_(this);
   
   @DomName('MediaKeyEvent.errorCode')
   @DocsEditable()
-  MediaKeyError get errorCode => wrap_jso(_blink.BlinkMediaKeyEvent.instance.errorCode_Getter_(unwrap_jso(this)));
+  MediaKeyError get errorCode => _blink.BlinkMediaKeyEvent.instance.errorCode_Getter_(this);
   
   @DomName('MediaKeyEvent.initData')
   @DocsEditable()
-  Uint8List get initData => _blink.BlinkMediaKeyEvent.instance.initData_Getter_(unwrap_jso(this));
+  Uint8List get initData => _blink.BlinkMediaKeyEvent.instance.initData_Getter_(this);
   
   @DomName('MediaKeyEvent.keySystem')
   @DocsEditable()
-  String get keySystem => _blink.BlinkMediaKeyEvent.instance.keySystem_Getter_(unwrap_jso(this));
+  String get keySystem => _blink.BlinkMediaKeyEvent.instance.keySystem_Getter_(this);
   
   @DomName('MediaKeyEvent.message')
   @DocsEditable()
-  Uint8List get message => _blink.BlinkMediaKeyEvent.instance.message_Getter_(unwrap_jso(this));
+  Uint8List get message => _blink.BlinkMediaKeyEvent.instance.message_Getter_(this);
   
   @DomName('MediaKeyEvent.sessionId')
   @DocsEditable()
-  String get sessionId => _blink.BlinkMediaKeyEvent.instance.sessionId_Getter_(unwrap_jso(this));
+  String get sessionId => _blink.BlinkMediaKeyEvent.instance.sessionId_Getter_(this);
   
   @DomName('MediaKeyEvent.systemCode')
   @DocsEditable()
-  int get systemCode => _blink.BlinkMediaKeyEvent.instance.systemCode_Getter_(unwrap_jso(this));
+  int get systemCode => _blink.BlinkMediaKeyEvent.instance.systemCode_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25102,62 +24880,32 @@
   // To suppress missing implicit constructor warnings.
   factory MediaKeyMessageEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static MediaKeyMessageEvent internalCreateMediaKeyMessageEvent() {
-    return new MediaKeyMessageEvent._internalWrap();
+  @DomName('MediaKeyMessageEvent.MediaKeyMessageEvent')
+  @DocsEditable()
+  factory MediaKeyMessageEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMediaKeyMessageEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMediaKeyMessageEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory MediaKeyMessageEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaKeyMessageEvent.internal_() : super.internal_();
 
 
-  @DomName('MediaKeyMessageEvent.destinationURL')
-  @DocsEditable()
-  String get destinationUrl => _blink.BlinkMediaKeyMessageEvent.instance.destinationURL_Getter_(unwrap_jso(this));
-  
   @DomName('MediaKeyMessageEvent.message')
   @DocsEditable()
-  ByteBuffer get message => _blink.BlinkMediaKeyMessageEvent.instance.message_Getter_(unwrap_jso(this));
+  ByteBuffer get message => _blink.BlinkMediaKeyMessageEvent.instance.message_Getter_(this);
   
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('MediaKeyNeededEvent')
-// https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html#dom-mediakeyneededevent
-@Experimental()
-class MediaKeyNeededEvent extends Event {
-  // To suppress missing implicit constructor warnings.
-  factory MediaKeyNeededEvent._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static MediaKeyNeededEvent internalCreateMediaKeyNeededEvent() {
-    return new MediaKeyNeededEvent._internalWrap();
-  }
-
-  external factory MediaKeyNeededEvent._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  MediaKeyNeededEvent.internal_() : super.internal_();
-
-
-  @DomName('MediaKeyNeededEvent.contentType')
+  @DomName('MediaKeyMessageEvent.messageType')
   @DocsEditable()
   @Experimental() // untriaged
-  String get contentType => _blink.BlinkMediaKeyNeededEvent.instance.contentType_Getter_(unwrap_jso(this));
-  
-  @DomName('MediaKeyNeededEvent.initData')
-  @DocsEditable()
-  Uint8List get initData => _blink.BlinkMediaKeyNeededEvent.instance.initData_Getter_(unwrap_jso(this));
+  String get messageType => _blink.BlinkMediaKeyMessageEvent.instance.messageType_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25177,11 +24925,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MediaKeySession internalCreateMediaKeySession() {
-    return new MediaKeySession._internalWrap();
-  }
-
-  external factory MediaKeySession._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaKeySession.internal_() : super.internal_();
@@ -25190,45 +24934,109 @@
   @DomName('MediaKeySession.closed')
   @DocsEditable()
   @Experimental() // untriaged
-  Future get closed => wrap_jso(_blink.BlinkMediaKeySession.instance.closed_Getter_(unwrap_jso(this)));
+  Future get closed => convertNativePromiseToDartFuture(_blink.BlinkMediaKeySession.instance.closed_Getter_(this));
   
-  @DomName('MediaKeySession.error')
+  @DomName('MediaKeySession.expiration')
   @DocsEditable()
-  MediaKeyError get error => wrap_jso(_blink.BlinkMediaKeySession.instance.error_Getter_(unwrap_jso(this)));
+  @Experimental() // untriaged
+  num get expiration => _blink.BlinkMediaKeySession.instance.expiration_Getter_(this);
   
-  @DomName('MediaKeySession.keySystem')
+  @DomName('MediaKeySession.keyStatuses')
   @DocsEditable()
-  String get keySystem => _blink.BlinkMediaKeySession.instance.keySystem_Getter_(unwrap_jso(this));
+  @Experimental() // untriaged
+  MediaKeyStatusMap get keyStatuses => _blink.BlinkMediaKeySession.instance.keyStatuses_Getter_(this);
   
   @DomName('MediaKeySession.sessionId')
   @DocsEditable()
-  String get sessionId => _blink.BlinkMediaKeySession.instance.sessionId_Getter_(unwrap_jso(this));
+  String get sessionId => _blink.BlinkMediaKeySession.instance.sessionId_Getter_(this);
   
-  Future generateRequest(String initDataType, initData) {
-    if ((initData is TypedData) && (initDataType is String)) {
-      return wrap_jso(_blink.BlinkMediaKeySession.instance.generateRequest_Callback_2_(unwrap_jso(this), initDataType, unwrap_jso(initData)));
-    }
-    if ((initData is ByteBuffer) && (initDataType is String)) {
-      return wrap_jso(_blink.BlinkMediaKeySession.instance.generateRequest_Callback_2_(unwrap_jso(this), initDataType, unwrap_jso(initData)));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
-  }
-
-  @DomName('MediaKeySession.release')
+  @DomName('MediaKeySession.close')
+  @DocsEditable()
+  Future close() => convertNativePromiseToDartFuture(_blink.BlinkMediaKeySession.instance.close_Callback_0_(this));
+  
+  @DomName('MediaKeySession.generateRequest')
   @DocsEditable()
   @Experimental() // untriaged
-  Future release() => wrap_jso(_blink.BlinkMediaKeySession.instance.release_Callback_0_(unwrap_jso(this)));
+  Future generateRequest(String initDataType, /*BufferSource*/ initData) => convertNativePromiseToDartFuture(_blink.BlinkMediaKeySession.instance.generateRequest_Callback_2_(this, initDataType, initData));
   
-  Future _update(response) {
-    if ((response is TypedData)) {
-      return wrap_jso(_blink.BlinkMediaKeySession.instance.update_Callback_1_(unwrap_jso(this), unwrap_jso(response)));
-    }
-    if ((response is ByteBuffer)) {
-      return wrap_jso(_blink.BlinkMediaKeySession.instance.update_Callback_1_(unwrap_jso(this), unwrap_jso(response)));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
-  }
+  @DomName('MediaKeySession.load')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future load(String sessionId) => convertNativePromiseToDartFuture(_blink.BlinkMediaKeySession.instance.load_Callback_1_(this, sessionId));
+  
+  @DomName('MediaKeySession.remove')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future remove() => convertNativePromiseToDartFuture(_blink.BlinkMediaKeySession.instance.remove_Callback_0_(this));
+  
+  @DomName('MediaKeySession.update')
+  @DocsEditable()
+  Future _update(/*BufferSource*/ response) => convertNativePromiseToDartFuture(_blink.BlinkMediaKeySession.instance.update_Callback_1_(this, response));
+  
+}
+// 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.
 
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('MediaKeyStatusMap')
+@Experimental() // untriaged
+class MediaKeyStatusMap extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory MediaKeyStatusMap._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  MediaKeyStatusMap.internal_() { }
+
+  @DomName('MediaKeyStatusMap.size')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get size => _blink.BlinkMediaKeyStatusMap.instance.size_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('MediaKeySystemAccess')
+@Experimental() // untriaged
+class MediaKeySystemAccess extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory MediaKeySystemAccess._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  MediaKeySystemAccess.internal_() { }
+
+  @DomName('MediaKeySystemAccess.keySystem')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get keySystem => _blink.BlinkMediaKeySystemAccess.instance.keySystem_Getter_(this);
+  
+  @DomName('MediaKeySystemAccess.createMediaKeys')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future createMediaKeys() => convertNativePromiseToDartFuture(_blink.BlinkMediaKeySystemAccess.instance.createMediaKeys_Callback_0_(this));
+  
+  @DomName('MediaKeySystemAccess.getConfiguration')
+  @DocsEditable()
+  @Experimental() // untriaged
+   getConfiguration() => convertNativeDictionaryToDartDictionary((_blink.BlinkMediaKeySystemAccess.instance.getConfiguration_Callback_0_(this)));
+  
 }
 // 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
@@ -25245,41 +25053,24 @@
   // To suppress missing implicit constructor warnings.
   factory MediaKeys._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MediaKeys internalCreateMediaKeys() {
-    return new MediaKeys._internalWrap();
-  }
 
-  factory MediaKeys._internalWrap() {
-    return new MediaKeys.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaKeys.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('MediaKeys.keySystem')
-  @DocsEditable()
-  String get keySystem => _blink.BlinkMediaKeys.instance.keySystem_Getter_(unwrap_jso(this));
-  
-  @DomName('MediaKeys.create')
-  @DocsEditable()
-  @Experimental() // untriaged
-  static Future create(String keySystem) => wrap_jso(_blink.BlinkMediaKeys.instance.create_Callback_1_(keySystem));
-  
   MediaKeySession _createSession([String sessionType]) {
     if (sessionType != null) {
-      return wrap_jso(_blink.BlinkMediaKeys.instance.createSession_Callback_1_(unwrap_jso(this), sessionType));
+      return _blink.BlinkMediaKeys.instance.createSession_Callback_1_(this, sessionType);
     }
-    return wrap_jso(_blink.BlinkMediaKeys.instance.createSession_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkMediaKeys.instance.createSession_Callback_0_(this);
   }
 
-  @DomName('MediaKeys.isTypeSupported')
+  @DomName('MediaKeys.setServerCertificate')
   @DocsEditable()
   @Experimental() // untriaged
-  static bool isTypeSupported(String keySystem, String contentType) => _blink.BlinkMediaKeys.instance.isTypeSupported_Callback_2_(keySystem, contentType);
+  Future setServerCertificate(/*BufferSource*/ serverCertificate) => convertNativePromiseToDartFuture(_blink.BlinkMediaKeys.instance.setServerCertificate_Callback_1_(this, serverCertificate));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25296,44 +25087,36 @@
   // To suppress missing implicit constructor warnings.
   factory MediaList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MediaList internalCreateMediaList() {
-    return new MediaList._internalWrap();
-  }
 
-  factory MediaList._internalWrap() {
-    return new MediaList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MediaList.length')
   @DocsEditable()
-  int get length => _blink.BlinkMediaList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkMediaList.instance.length_Getter_(this);
   
   @DomName('MediaList.mediaText')
   @DocsEditable()
-  String get mediaText => _blink.BlinkMediaList.instance.mediaText_Getter_(unwrap_jso(this));
+  String get mediaText => _blink.BlinkMediaList.instance.mediaText_Getter_(this);
   
   @DomName('MediaList.mediaText')
   @DocsEditable()
-  set mediaText(String value) => _blink.BlinkMediaList.instance.mediaText_Setter_(unwrap_jso(this), value);
+  set mediaText(String value) => _blink.BlinkMediaList.instance.mediaText_Setter_(this, value);
   
   @DomName('MediaList.appendMedium')
   @DocsEditable()
-  void appendMedium(String newMedium) => _blink.BlinkMediaList.instance.appendMedium_Callback_1_(unwrap_jso(this), newMedium);
+  void appendMedium(String medium) => _blink.BlinkMediaList.instance.appendMedium_Callback_1_(this, medium);
   
   @DomName('MediaList.deleteMedium')
   @DocsEditable()
-  void deleteMedium(String oldMedium) => _blink.BlinkMediaList.instance.deleteMedium_Callback_1_(unwrap_jso(this), oldMedium);
+  void deleteMedium(String medium) => _blink.BlinkMediaList.instance.deleteMedium_Callback_1_(this, medium);
   
   @DomName('MediaList.item')
   @DocsEditable()
-  String item(int index) => _blink.BlinkMediaList.instance.item_Callback_1_(unwrap_jso(this), index);
+  String item(int index) => _blink.BlinkMediaList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25357,11 +25140,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MediaQueryList internalCreateMediaQueryList() {
-    return new MediaQueryList._internalWrap();
-  }
-
-  external factory MediaQueryList._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaQueryList.internal_() : super.internal_();
@@ -25369,19 +25148,19 @@
 
   @DomName('MediaQueryList.matches')
   @DocsEditable()
-  bool get matches => _blink.BlinkMediaQueryList.instance.matches_Getter_(unwrap_jso(this));
+  bool get matches => _blink.BlinkMediaQueryList.instance.matches_Getter_(this);
   
   @DomName('MediaQueryList.media')
   @DocsEditable()
-  String get media => _blink.BlinkMediaQueryList.instance.media_Getter_(unwrap_jso(this));
+  String get media => _blink.BlinkMediaQueryList.instance.media_Getter_(this);
   
   @DomName('MediaQueryList.addListener')
   @DocsEditable()
-  void addListener(EventListener listener) => _blink.BlinkMediaQueryList.instance.addListener_Callback_1_(unwrap_jso(this), unwrap_jso((event) => listener(wrap_jso(event))));
+  void addListener(EventListener listener) => _blink.BlinkMediaQueryList.instance.addListener_Callback_1_(this, listener);
   
   @DomName('MediaQueryList.removeListener')
   @DocsEditable()
-  void removeListener(EventListener listener) => _blink.BlinkMediaQueryList.instance.removeListener_Callback_1_(unwrap_jso(this), unwrap_jso(listener));
+  void removeListener(EventListener listener) => _blink.BlinkMediaQueryList.instance.removeListener_Callback_1_(this, listener);
   
   @DomName('MediaQueryList.onchange')
   @DocsEditable()
@@ -25403,13 +25182,19 @@
   // To suppress missing implicit constructor warnings.
   factory MediaQueryListEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static MediaQueryListEvent internalCreateMediaQueryListEvent() {
-    return new MediaQueryListEvent._internalWrap();
+  @DomName('MediaQueryListEvent.MediaQueryListEvent')
+  @DocsEditable()
+  factory MediaQueryListEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMediaQueryListEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMediaQueryListEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory MediaQueryListEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaQueryListEvent.internal_() : super.internal_();
@@ -25418,12 +25203,50 @@
   @DomName('MediaQueryListEvent.matches')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get matches => _blink.BlinkMediaQueryListEvent.instance.matches_Getter_(unwrap_jso(this));
+  bool get matches => _blink.BlinkMediaQueryListEvent.instance.matches_Getter_(this);
   
   @DomName('MediaQueryListEvent.media')
   @DocsEditable()
   @Experimental() // untriaged
-  String get media => _blink.BlinkMediaQueryListEvent.instance.media_Getter_(unwrap_jso(this));
+  String get media => _blink.BlinkMediaQueryListEvent.instance.media_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('MediaSession')
+@Experimental() // untriaged
+class MediaSession extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory MediaSession._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MediaSession.MediaSession')
+  @DocsEditable()
+  factory MediaSession() {
+    return _blink.BlinkMediaSession.instance.constructorCallback_0_();
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  MediaSession.internal_() { }
+
+  @DomName('MediaSession.activate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void activate() => _blink.BlinkMediaSession.instance.activate_Callback_0_(this);
+  
+  @DomName('MediaSession.deactivate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deactivate() => _blink.BlinkMediaSession.instance.deactivate_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25446,16 +25269,12 @@
   @DomName('MediaSource.MediaSource')
   @DocsEditable()
   factory MediaSource() {
-    return wrap_jso(_blink.BlinkMediaSource.instance.constructorCallback_0_());
+    return _blink.BlinkMediaSource.instance.constructorCallback_0_();
   }
 
 
   @Deprecated("Internal Use Only")
-  static MediaSource internalCreateMediaSource() {
-    return new MediaSource._internalWrap();
-  }
-
-  external factory MediaSource._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaSource.internal_() : super.internal_();
@@ -25466,34 +25285,34 @@
 
   @DomName('MediaSource.activeSourceBuffers')
   @DocsEditable()
-  SourceBufferList get activeSourceBuffers => wrap_jso(_blink.BlinkMediaSource.instance.activeSourceBuffers_Getter_(unwrap_jso(this)));
+  SourceBufferList get activeSourceBuffers => _blink.BlinkMediaSource.instance.activeSourceBuffers_Getter_(this);
   
   @DomName('MediaSource.duration')
   @DocsEditable()
-  num get duration => _blink.BlinkMediaSource.instance.duration_Getter_(unwrap_jso(this));
+  num get duration => _blink.BlinkMediaSource.instance.duration_Getter_(this);
   
   @DomName('MediaSource.duration')
   @DocsEditable()
-  set duration(num value) => _blink.BlinkMediaSource.instance.duration_Setter_(unwrap_jso(this), value);
+  set duration(num value) => _blink.BlinkMediaSource.instance.duration_Setter_(this, value);
   
   @DomName('MediaSource.readyState')
   @DocsEditable()
-  String get readyState => _blink.BlinkMediaSource.instance.readyState_Getter_(unwrap_jso(this));
+  String get readyState => _blink.BlinkMediaSource.instance.readyState_Getter_(this);
   
   @DomName('MediaSource.sourceBuffers')
   @DocsEditable()
-  SourceBufferList get sourceBuffers => wrap_jso(_blink.BlinkMediaSource.instance.sourceBuffers_Getter_(unwrap_jso(this)));
+  SourceBufferList get sourceBuffers => _blink.BlinkMediaSource.instance.sourceBuffers_Getter_(this);
   
   @DomName('MediaSource.addSourceBuffer')
   @DocsEditable()
-  SourceBuffer addSourceBuffer(String type) => wrap_jso(_blink.BlinkMediaSource.instance.addSourceBuffer_Callback_1_(unwrap_jso(this), type));
+  SourceBuffer addSourceBuffer(String type) => _blink.BlinkMediaSource.instance.addSourceBuffer_Callback_1_(this, type);
   
   void endOfStream([String error]) {
     if (error != null) {
-      _blink.BlinkMediaSource.instance.endOfStream_Callback_1_(unwrap_jso(this), error);
+      _blink.BlinkMediaSource.instance.endOfStream_Callback_1_(this, error);
       return;
     }
-    _blink.BlinkMediaSource.instance.endOfStream_Callback_0_(unwrap_jso(this));
+    _blink.BlinkMediaSource.instance.endOfStream_Callback_0_(this);
     return;
   }
 
@@ -25503,7 +25322,7 @@
   
   @DomName('MediaSource.removeSourceBuffer')
   @DocsEditable()
-  void removeSourceBuffer(SourceBuffer buffer) => _blink.BlinkMediaSource.instance.removeSourceBuffer_Callback_1_(unwrap_jso(this), unwrap_jso(buffer));
+  void removeSourceBuffer(SourceBuffer buffer) => _blink.BlinkMediaSource.instance.removeSourceBuffer_Callback_1_(this, buffer);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -25553,75 +25372,76 @@
   @DocsEditable()
   factory MediaStream([stream_OR_tracks]) {
     if (stream_OR_tracks == null) {
-      return wrap_jso(_blink.BlinkMediaStream.instance.constructorCallback_0_());
+      return _blink.BlinkMediaStream.instance.constructorCallback_0_();
     }
     if ((stream_OR_tracks is MediaStream || stream_OR_tracks == null)) {
-      return wrap_jso(_blink.BlinkMediaStream.instance.constructorCallback_1_(stream_OR_tracks));
+      return _blink.BlinkMediaStream.instance.constructorCallback_1_(stream_OR_tracks);
     }
     if ((stream_OR_tracks is List<MediaStreamTrack> || stream_OR_tracks == null)) {
-      return wrap_jso(_blink.BlinkMediaStream.instance.constructorCallback_1_(stream_OR_tracks));
+      return _blink.BlinkMediaStream.instance.constructorCallback_1_(stream_OR_tracks);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
 
   @Deprecated("Internal Use Only")
-  static MediaStream internalCreateMediaStream() {
-    return new MediaStream._internalWrap();
-  }
-
-  external factory MediaStream._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaStream.internal_() : super.internal_();
 
 
+  @DomName('MediaStream.active')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get active => _blink.BlinkMediaStream.instance.active_Getter_(this);
+  
   @DomName('MediaStream.ended')
   @DocsEditable()
-  bool get ended => _blink.BlinkMediaStream.instance.ended_Getter_(unwrap_jso(this));
+  bool get ended => _blink.BlinkMediaStream.instance.ended_Getter_(this);
   
   @DomName('MediaStream.id')
   @DocsEditable()
-  String get id => _blink.BlinkMediaStream.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkMediaStream.instance.id_Getter_(this);
   
   @DomName('MediaStream.label')
   @DocsEditable()
   @Experimental() // non-standard
-  String get label => _blink.BlinkMediaStream.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkMediaStream.instance.label_Getter_(this);
   
   @DomName('MediaStream.addTrack')
   @DocsEditable()
-  void addTrack(MediaStreamTrack track) => _blink.BlinkMediaStream.instance.addTrack_Callback_1_(unwrap_jso(this), unwrap_jso(track));
+  void addTrack(MediaStreamTrack track) => _blink.BlinkMediaStream.instance.addTrack_Callback_1_(this, track);
   
   @DomName('MediaStream.clone')
   @DocsEditable()
   @Experimental() // untriaged
-  MediaStream clone() => wrap_jso(_blink.BlinkMediaStream.instance.clone_Callback_0_(unwrap_jso(this)));
+  MediaStream clone() => _blink.BlinkMediaStream.instance.clone_Callback_0_(this);
   
   @DomName('MediaStream.getAudioTracks')
   @DocsEditable()
-  List<MediaStreamTrack> getAudioTracks() => wrap_jso(_blink.BlinkMediaStream.instance.getAudioTracks_Callback_0_(unwrap_jso(this)));
+  List<MediaStreamTrack> getAudioTracks() => (_blink.BlinkMediaStream.instance.getAudioTracks_Callback_0_(this));
   
   @DomName('MediaStream.getTrackById')
   @DocsEditable()
-  MediaStreamTrack getTrackById(String trackId) => wrap_jso(_blink.BlinkMediaStream.instance.getTrackById_Callback_1_(unwrap_jso(this), trackId));
+  MediaStreamTrack getTrackById(String trackId) => _blink.BlinkMediaStream.instance.getTrackById_Callback_1_(this, trackId);
   
   @DomName('MediaStream.getTracks')
   @DocsEditable()
   @Experimental() // untriaged
-  List<MediaStreamTrack> getTracks() => wrap_jso(_blink.BlinkMediaStream.instance.getTracks_Callback_0_(unwrap_jso(this)));
+  List<MediaStreamTrack> getTracks() => (_blink.BlinkMediaStream.instance.getTracks_Callback_0_(this));
   
   @DomName('MediaStream.getVideoTracks')
   @DocsEditable()
-  List<MediaStreamTrack> getVideoTracks() => wrap_jso(_blink.BlinkMediaStream.instance.getVideoTracks_Callback_0_(unwrap_jso(this)));
+  List<MediaStreamTrack> getVideoTracks() => (_blink.BlinkMediaStream.instance.getVideoTracks_Callback_0_(this));
   
   @DomName('MediaStream.removeTrack')
   @DocsEditable()
-  void removeTrack(MediaStreamTrack track) => _blink.BlinkMediaStream.instance.removeTrack_Callback_1_(unwrap_jso(this), unwrap_jso(track));
+  void removeTrack(MediaStreamTrack track) => _blink.BlinkMediaStream.instance.removeTrack_Callback_1_(this, track);
   
   @DomName('MediaStream.stop')
   @DocsEditable()
-  void stop() => _blink.BlinkMediaStream.instance.stop_Callback_0_(unwrap_jso(this));
+  void stop() => _blink.BlinkMediaStream.instance.stop_Callback_0_(this);
   
   /// Stream of `addtrack` events handled by this [MediaStream].
   @DomName('MediaStream.onaddtrack')
@@ -25664,13 +25484,19 @@
   // To suppress missing implicit constructor warnings.
   factory MediaStreamEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static MediaStreamEvent internalCreateMediaStreamEvent() {
-    return new MediaStreamEvent._internalWrap();
+  @DomName('MediaStreamEvent.MediaStreamEvent')
+  @DocsEditable()
+  factory MediaStreamEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMediaStreamEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMediaStreamEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory MediaStreamEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaStreamEvent.internal_() : super.internal_();
@@ -25681,7 +25507,7 @@
 
   @DomName('MediaStreamEvent.stream')
   @DocsEditable()
-  MediaStream get stream => wrap_jso(_blink.BlinkMediaStreamEvent.instance.stream_Getter_(unwrap_jso(this)));
+  MediaStream get stream => _blink.BlinkMediaStreamEvent.instance.stream_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25732,11 +25558,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MediaStreamTrack internalCreateMediaStreamTrack() {
-    return new MediaStreamTrack._internalWrap();
-  }
-
-  external factory MediaStreamTrack._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaStreamTrack.internal_() : super.internal_();
@@ -25744,42 +25566,42 @@
 
   @DomName('MediaStreamTrack.enabled')
   @DocsEditable()
-  bool get enabled => _blink.BlinkMediaStreamTrack.instance.enabled_Getter_(unwrap_jso(this));
+  bool get enabled => _blink.BlinkMediaStreamTrack.instance.enabled_Getter_(this);
   
   @DomName('MediaStreamTrack.enabled')
   @DocsEditable()
-  set enabled(bool value) => _blink.BlinkMediaStreamTrack.instance.enabled_Setter_(unwrap_jso(this), value);
+  set enabled(bool value) => _blink.BlinkMediaStreamTrack.instance.enabled_Setter_(this, value);
   
   @DomName('MediaStreamTrack.id')
   @DocsEditable()
-  String get id => _blink.BlinkMediaStreamTrack.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkMediaStreamTrack.instance.id_Getter_(this);
   
   @DomName('MediaStreamTrack.kind')
   @DocsEditable()
-  String get kind => _blink.BlinkMediaStreamTrack.instance.kind_Getter_(unwrap_jso(this));
+  String get kind => _blink.BlinkMediaStreamTrack.instance.kind_Getter_(this);
   
   @DomName('MediaStreamTrack.label')
   @DocsEditable()
-  String get label => _blink.BlinkMediaStreamTrack.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkMediaStreamTrack.instance.label_Getter_(this);
   
   @DomName('MediaStreamTrack.muted')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get muted => _blink.BlinkMediaStreamTrack.instance.muted_Getter_(unwrap_jso(this));
+  bool get muted => _blink.BlinkMediaStreamTrack.instance.muted_Getter_(this);
   
   @DomName('MediaStreamTrack.readyState')
   @DocsEditable()
-  String get readyState => _blink.BlinkMediaStreamTrack.instance.readyState_Getter_(unwrap_jso(this));
+  String get readyState => _blink.BlinkMediaStreamTrack.instance.readyState_Getter_(this);
   
   @DomName('MediaStreamTrack.clone')
   @DocsEditable()
   @Experimental() // untriaged
-  MediaStreamTrack clone() => wrap_jso(_blink.BlinkMediaStreamTrack.instance.clone_Callback_0_(unwrap_jso(this)));
+  MediaStreamTrack clone() => _blink.BlinkMediaStreamTrack.instance.clone_Callback_0_(this);
   
   @DomName('MediaStreamTrack.getSources')
   @DocsEditable()
   @Experimental() // untriaged
-  static void _getSources(MediaStreamTrackSourcesCallback callback) => _blink.BlinkMediaStreamTrack.instance.getSources_Callback_1_(unwrap_jso((sources) => callback(sources)));
+  static void _getSources(MediaStreamTrackSourcesCallback callback) => _blink.BlinkMediaStreamTrack.instance.getSources_Callback_1_(callback);
   
   static Future<List<SourceInfo>> getSources() {
     var completer = new Completer<List<SourceInfo>>();
@@ -25791,7 +25613,7 @@
   @DomName('MediaStreamTrack.stop')
   @DocsEditable()
   @Experimental() // untriaged
-  void stop() => _blink.BlinkMediaStreamTrack.instance.stop_Callback_0_(unwrap_jso(this));
+  void stop() => _blink.BlinkMediaStreamTrack.instance.stop_Callback_0_(this);
   
   /// Stream of `ended` events handled by this [MediaStreamTrack].
   @DomName('MediaStreamTrack.onended')
@@ -25827,11 +25649,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MediaStreamTrackEvent internalCreateMediaStreamTrackEvent() {
-    return new MediaStreamTrackEvent._internalWrap();
-  }
-
-  external factory MediaStreamTrackEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaStreamTrackEvent.internal_() : super.internal_();
@@ -25842,7 +25660,7 @@
 
   @DomName('MediaStreamTrackEvent.track')
   @DocsEditable()
-  MediaStreamTrack get track => wrap_jso(_blink.BlinkMediaStreamTrackEvent.instance.track_Getter_(unwrap_jso(this)));
+  MediaStreamTrack get track => _blink.BlinkMediaStreamTrackEvent.instance.track_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25869,32 +25687,24 @@
   // To suppress missing implicit constructor warnings.
   factory MemoryInfo._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MemoryInfo internalCreateMemoryInfo() {
-    return new MemoryInfo._internalWrap();
-  }
 
-  factory MemoryInfo._internalWrap() {
-    return new MemoryInfo.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MemoryInfo.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MemoryInfo.jsHeapSizeLimit')
   @DocsEditable()
-  int get jsHeapSizeLimit => _blink.BlinkMemoryInfo.instance.jsHeapSizeLimit_Getter_(unwrap_jso(this));
+  int get jsHeapSizeLimit => _blink.BlinkMemoryInfo.instance.jsHeapSizeLimit_Getter_(this);
   
   @DomName('MemoryInfo.totalJSHeapSize')
   @DocsEditable()
-  int get totalJSHeapSize => _blink.BlinkMemoryInfo.instance.totalJSHeapSize_Getter_(unwrap_jso(this));
+  int get totalJSHeapSize => _blink.BlinkMemoryInfo.instance.totalJSHeapSize_Getter_(this);
   
   @DomName('MemoryInfo.usedJSHeapSize')
   @DocsEditable()
-  int get usedJSHeapSize => _blink.BlinkMemoryInfo.instance.usedJSHeapSize_Getter_(unwrap_jso(this));
+  int get usedJSHeapSize => _blink.BlinkMemoryInfo.instance.usedJSHeapSize_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25926,11 +25736,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MenuElement internalCreateMenuElement() {
-    return new MenuElement._internalWrap();
-  }
-
-  external factory MenuElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MenuElement.internal_() : super.internal_();
@@ -25945,22 +25751,22 @@
   @DomName('HTMLMenuElement.label')
   @DocsEditable()
   @Experimental() // untriaged
-  String get label => _blink.BlinkHTMLMenuElement.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkHTMLMenuElement.instance.label_Getter_(this);
   
   @DomName('HTMLMenuElement.label')
   @DocsEditable()
   @Experimental() // untriaged
-  set label(String value) => _blink.BlinkHTMLMenuElement.instance.label_Setter_(unwrap_jso(this), value);
+  set label(String value) => _blink.BlinkHTMLMenuElement.instance.label_Setter_(this, value);
   
   @DomName('HTMLMenuElement.type')
   @DocsEditable()
   @Experimental() // untriaged
-  String get type => _blink.BlinkHTMLMenuElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLMenuElement.instance.type_Getter_(this);
   
   @DomName('HTMLMenuElement.type')
   @DocsEditable()
   @Experimental() // untriaged
-  set type(String value) => _blink.BlinkHTMLMenuElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLMenuElement.instance.type_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -25979,11 +25785,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MenuItemElement internalCreateMenuItemElement() {
-    return new MenuItemElement._internalWrap();
-  }
-
-  external factory MenuItemElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MenuItemElement.internal_() : super.internal_();
@@ -25998,52 +25800,72 @@
   @DomName('HTMLMenuItemElement.checked')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get checked => _blink.BlinkHTMLMenuItemElement.instance.checked_Getter_(unwrap_jso(this));
+  bool get checked => _blink.BlinkHTMLMenuItemElement.instance.checked_Getter_(this);
   
   @DomName('HTMLMenuItemElement.checked')
   @DocsEditable()
   @Experimental() // untriaged
-  set checked(bool value) => _blink.BlinkHTMLMenuItemElement.instance.checked_Setter_(unwrap_jso(this), value);
+  set checked(bool value) => _blink.BlinkHTMLMenuItemElement.instance.checked_Setter_(this, value);
   
   @DomName('HTMLMenuItemElement.default')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get defaultValue => _blink.BlinkHTMLMenuItemElement.instance.default_Getter_(unwrap_jso(this));
+  bool get defaultValue => _blink.BlinkHTMLMenuItemElement.instance.default_Getter_(this);
   
   @DomName('HTMLMenuItemElement.default')
   @DocsEditable()
   @Experimental() // untriaged
-  set defaultValue(bool value) => _blink.BlinkHTMLMenuItemElement.instance.default_Setter_(unwrap_jso(this), value);
+  set defaultValue(bool value) => _blink.BlinkHTMLMenuItemElement.instance.default_Setter_(this, value);
   
   @DomName('HTMLMenuItemElement.disabled')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get disabled => _blink.BlinkHTMLMenuItemElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLMenuItemElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLMenuItemElement.disabled')
   @DocsEditable()
   @Experimental() // untriaged
-  set disabled(bool value) => _blink.BlinkHTMLMenuItemElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLMenuItemElement.instance.disabled_Setter_(this, value);
+  
+  @DomName('HTMLMenuItemElement.icon')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get icon => _blink.BlinkHTMLMenuItemElement.instance.icon_Getter_(this);
+  
+  @DomName('HTMLMenuItemElement.icon')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set icon(String value) => _blink.BlinkHTMLMenuItemElement.instance.icon_Setter_(this, value);
   
   @DomName('HTMLMenuItemElement.label')
   @DocsEditable()
   @Experimental() // untriaged
-  String get label => _blink.BlinkHTMLMenuItemElement.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkHTMLMenuItemElement.instance.label_Getter_(this);
   
   @DomName('HTMLMenuItemElement.label')
   @DocsEditable()
   @Experimental() // untriaged
-  set label(String value) => _blink.BlinkHTMLMenuItemElement.instance.label_Setter_(unwrap_jso(this), value);
+  set label(String value) => _blink.BlinkHTMLMenuItemElement.instance.label_Setter_(this, value);
+  
+  @DomName('HTMLMenuItemElement.radiogroup')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get radiogroup => _blink.BlinkHTMLMenuItemElement.instance.radiogroup_Getter_(this);
+  
+  @DomName('HTMLMenuItemElement.radiogroup')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set radiogroup(String value) => _blink.BlinkHTMLMenuItemElement.instance.radiogroup_Setter_(this, value);
   
   @DomName('HTMLMenuItemElement.type')
   @DocsEditable()
   @Experimental() // untriaged
-  String get type => _blink.BlinkHTMLMenuItemElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLMenuItemElement.instance.type_Getter_(this);
   
   @DomName('HTMLMenuItemElement.type')
   @DocsEditable()
   @Experimental() // untriaged
-  set type(String value) => _blink.BlinkHTMLMenuItemElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLMenuItemElement.instance.type_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26060,28 +25882,20 @@
   // To suppress missing implicit constructor warnings.
   factory MessageChannel._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MessageChannel internalCreateMessageChannel() {
-    return new MessageChannel._internalWrap();
-  }
 
-  factory MessageChannel._internalWrap() {
-    return new MessageChannel.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MessageChannel.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MessageChannel.port1')
   @DocsEditable()
-  MessagePort get port1 => wrap_jso(_blink.BlinkMessageChannel.instance.port1_Getter_(unwrap_jso(this)));
+  MessagePort get port1 => _blink.BlinkMessageChannel.instance.port1_Getter_(this);
   
   @DomName('MessageChannel.port2')
   @DocsEditable()
-  MessagePort get port2 => wrap_jso(_blink.BlinkMessageChannel.instance.port2_Getter_(unwrap_jso(this)));
+  MessagePort get port2 => _blink.BlinkMessageChannel.instance.port2_Getter_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -26105,45 +25919,51 @@
         lastEventId, source, messagePorts);
     return event;
   }
-  // To suppress missing implicit constructor warnings.
-  factory MessageEvent._() { throw new UnsupportedError("Not supported"); }
+
+  // TODO(alanknight): This really should be generated by the
+  // _OutputConversion in the systemnative.py script, but that doesn't
+  // use those conversions right now, so do this as a one-off.
+  @DomName('MessageEvent.data')
+  @DocsEditable()
+  dynamic get data => convertNativeToDart_SerializedScriptValue(
+      _blink.BlinkMessageEvent.instance.data_Getter_(this));
+
+
+
+  @DomName('MessageEvent.MessageEvent')
+  @DocsEditable()
+  factory MessageEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMessageEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMessageEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static MessageEvent internalCreateMessageEvent() {
-    return new MessageEvent._internalWrap();
-  }
-
-  external factory MessageEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MessageEvent.internal_() : super.internal_();
 
 
-  @DomName('MessageEvent.data')
-  @DocsEditable()
-  // TODO(alanknight): This really should be generated by the
-  // _OutputConversion in the systemnative.py script, but that doesn't
-  // use those conversions right now, so do this as a one-off.
-  dynamic get data => convertNativeToDart_SerializedScriptValue(
-      _blink.BlinkMessageEvent.instance.data_Getter_(unwrap_jso(this)));
-
   @DomName('MessageEvent.lastEventId')
   @DocsEditable()
   @Unstable()
-  String get lastEventId => _blink.BlinkMessageEvent.instance.lastEventId_Getter_(unwrap_jso(this));
+  String get lastEventId => _blink.BlinkMessageEvent.instance.lastEventId_Getter_(this);
   
   @DomName('MessageEvent.origin')
   @DocsEditable()
-  String get origin => _blink.BlinkMessageEvent.instance.origin_Getter_(unwrap_jso(this));
+  String get origin => _blink.BlinkMessageEvent.instance.origin_Getter_(this);
   
   @DomName('MessageEvent.source')
   @DocsEditable()
-  EventTarget get source => wrap_jso(_blink.BlinkMessageEvent.instance.source_Getter_(unwrap_jso(this)));
+  EventTarget get source => _convertNativeToDart_EventTarget(_blink.BlinkMessageEvent.instance.source_Getter_(this));
   
   @DomName('MessageEvent.initMessageEvent')
   @DocsEditable()
-  void _initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List<MessagePort> messagePorts) => _blink.BlinkMessageEvent.instance.initMessageEvent_Callback_8_(unwrap_jso(this), typeArg, canBubbleArg, cancelableArg, dataArg, originArg, lastEventIdArg, unwrap_jso(sourceArg), unwrap_jso(messagePorts));
+  void _initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List<MessagePort> portsArg) => _blink.BlinkMessageEvent.instance.initMessageEvent_Callback_8_(this, typeArg, canBubbleArg, cancelableArg, dataArg, originArg, lastEventIdArg, sourceArg, portsArg);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26172,11 +25992,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MessagePort internalCreateMessagePort() {
-    return new MessagePort._internalWrap();
-  }
-
-  external factory MessagePort._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MessagePort.internal_() : super.internal_();
@@ -26184,15 +26000,20 @@
 
   @DomName('MessagePort.close')
   @DocsEditable()
-  void close() => _blink.BlinkMessagePort.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkMessagePort.instance.close_Callback_0_(this);
   
-  @DomName('MessagePort.postMessage')
-  @DocsEditable()
-  void postMessage(Object message, [List<MessagePort> transfer]) => _blink.BlinkMessagePort.instance.postMessage_Callback_2_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(message), transfer);
-  
+  void postMessage(Object message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      _blink.BlinkMessagePort.instance.postMessage_Callback_2_(this, convertDartToNative_SerializedScriptValue(message), transfer);
+      return;
+    }
+    _blink.BlinkMessagePort.instance.postMessage_Callback_1_(this, convertDartToNative_SerializedScriptValue(message));
+    return;
+  }
+
   @DomName('MessagePort.start')
   @DocsEditable()
-  void start() => _blink.BlinkMessagePort.instance.start_Callback_0_(unwrap_jso(this));
+  void start() => _blink.BlinkMessagePort.instance.start_Callback_0_(this);
   
   /// Stream of `message` events handled by this [MessagePort].
   @DomName('MessagePort.onmessage')
@@ -26219,11 +26040,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MetaElement internalCreateMetaElement() {
-    return new MetaElement._internalWrap();
-  }
-
-  external factory MetaElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MetaElement.internal_() : super.internal_();
@@ -26237,27 +26054,27 @@
 
   @DomName('HTMLMetaElement.content')
   @DocsEditable()
-  String get content => _blink.BlinkHTMLMetaElement.instance.content_Getter_(unwrap_jso(this));
+  String get content => _blink.BlinkHTMLMetaElement.instance.content_Getter_(this);
   
   @DomName('HTMLMetaElement.content')
   @DocsEditable()
-  set content(String value) => _blink.BlinkHTMLMetaElement.instance.content_Setter_(unwrap_jso(this), value);
+  set content(String value) => _blink.BlinkHTMLMetaElement.instance.content_Setter_(this, value);
   
   @DomName('HTMLMetaElement.httpEquiv')
   @DocsEditable()
-  String get httpEquiv => _blink.BlinkHTMLMetaElement.instance.httpEquiv_Getter_(unwrap_jso(this));
+  String get httpEquiv => _blink.BlinkHTMLMetaElement.instance.httpEquiv_Getter_(this);
   
   @DomName('HTMLMetaElement.httpEquiv')
   @DocsEditable()
-  set httpEquiv(String value) => _blink.BlinkHTMLMetaElement.instance.httpEquiv_Setter_(unwrap_jso(this), value);
+  set httpEquiv(String value) => _blink.BlinkHTMLMetaElement.instance.httpEquiv_Setter_(this, value);
   
   @DomName('HTMLMetaElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLMetaElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLMetaElement.instance.name_Getter_(this);
   
   @DomName('HTMLMetaElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLMetaElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLMetaElement.instance.name_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26275,28 +26092,20 @@
   // To suppress missing implicit constructor warnings.
   factory Metadata._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Metadata internalCreateMetadata() {
-    return new Metadata._internalWrap();
-  }
 
-  factory Metadata._internalWrap() {
-    return new Metadata.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Metadata.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Metadata.modificationTime')
   @DocsEditable()
-  DateTime get modificationTime => _blink.BlinkMetadata.instance.modificationTime_Getter_(unwrap_jso(this));
+  DateTime get modificationTime => _blink.BlinkMetadata.instance.modificationTime_Getter_(this);
   
   @DomName('Metadata.size')
   @DocsEditable()
-  int get size => _blink.BlinkMetadata.instance.size_Getter_(unwrap_jso(this));
+  int get size => _blink.BlinkMetadata.instance.size_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26333,11 +26142,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MeterElement internalCreateMeterElement() {
-    return new MeterElement._internalWrap();
-  }
-
-  external factory MeterElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MeterElement.internal_() : super.internal_();
@@ -26354,56 +26159,56 @@
 
   @DomName('HTMLMeterElement.high')
   @DocsEditable()
-  num get high => _blink.BlinkHTMLMeterElement.instance.high_Getter_(unwrap_jso(this));
+  num get high => _blink.BlinkHTMLMeterElement.instance.high_Getter_(this);
   
   @DomName('HTMLMeterElement.high')
   @DocsEditable()
-  set high(num value) => _blink.BlinkHTMLMeterElement.instance.high_Setter_(unwrap_jso(this), value);
+  set high(num value) => _blink.BlinkHTMLMeterElement.instance.high_Setter_(this, value);
   
   @DomName('HTMLMeterElement.labels')
   @DocsEditable()
   @Unstable()
-  List<Node> get labels => wrap_jso(_blink.BlinkHTMLMeterElement.instance.labels_Getter_(unwrap_jso(this)));
+  List<Node> get labels => (_blink.BlinkHTMLMeterElement.instance.labels_Getter_(this));
   
   @DomName('HTMLMeterElement.low')
   @DocsEditable()
-  num get low => _blink.BlinkHTMLMeterElement.instance.low_Getter_(unwrap_jso(this));
+  num get low => _blink.BlinkHTMLMeterElement.instance.low_Getter_(this);
   
   @DomName('HTMLMeterElement.low')
   @DocsEditable()
-  set low(num value) => _blink.BlinkHTMLMeterElement.instance.low_Setter_(unwrap_jso(this), value);
+  set low(num value) => _blink.BlinkHTMLMeterElement.instance.low_Setter_(this, value);
   
   @DomName('HTMLMeterElement.max')
   @DocsEditable()
-  num get max => _blink.BlinkHTMLMeterElement.instance.max_Getter_(unwrap_jso(this));
+  num get max => _blink.BlinkHTMLMeterElement.instance.max_Getter_(this);
   
   @DomName('HTMLMeterElement.max')
   @DocsEditable()
-  set max(num value) => _blink.BlinkHTMLMeterElement.instance.max_Setter_(unwrap_jso(this), value);
+  set max(num value) => _blink.BlinkHTMLMeterElement.instance.max_Setter_(this, value);
   
   @DomName('HTMLMeterElement.min')
   @DocsEditable()
-  num get min => _blink.BlinkHTMLMeterElement.instance.min_Getter_(unwrap_jso(this));
+  num get min => _blink.BlinkHTMLMeterElement.instance.min_Getter_(this);
   
   @DomName('HTMLMeterElement.min')
   @DocsEditable()
-  set min(num value) => _blink.BlinkHTMLMeterElement.instance.min_Setter_(unwrap_jso(this), value);
+  set min(num value) => _blink.BlinkHTMLMeterElement.instance.min_Setter_(this, value);
   
   @DomName('HTMLMeterElement.optimum')
   @DocsEditable()
-  num get optimum => _blink.BlinkHTMLMeterElement.instance.optimum_Getter_(unwrap_jso(this));
+  num get optimum => _blink.BlinkHTMLMeterElement.instance.optimum_Getter_(this);
   
   @DomName('HTMLMeterElement.optimum')
   @DocsEditable()
-  set optimum(num value) => _blink.BlinkHTMLMeterElement.instance.optimum_Setter_(unwrap_jso(this), value);
+  set optimum(num value) => _blink.BlinkHTMLMeterElement.instance.optimum_Setter_(this, value);
   
   @DomName('HTMLMeterElement.value')
   @DocsEditable()
-  num get value => _blink.BlinkHTMLMeterElement.instance.value_Getter_(unwrap_jso(this));
+  num get value => _blink.BlinkHTMLMeterElement.instance.value_Getter_(this);
   
   @DomName('HTMLMeterElement.value')
   @DocsEditable()
-  set value(num value) => _blink.BlinkHTMLMeterElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(num value) => _blink.BlinkHTMLMeterElement.instance.value_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26421,33 +26226,9 @@
   // To suppress missing implicit constructor warnings.
   factory MidiAccess._() { throw new UnsupportedError("Not supported"); }
 
-  /**
-   * Static factory designed to expose `connect` events to event
-   * handlers that are not necessarily instances of [MidiAccess].
-   *
-   * See [EventStreamProvider] for usage information.
-   */
-  @DomName('MIDIAccess.connectEvent')
-  @DocsEditable()
-  static const EventStreamProvider<MidiConnectionEvent> connectEvent = const EventStreamProvider<MidiConnectionEvent>('connect');
-
-  /**
-   * Static factory designed to expose `disconnect` events to event
-   * handlers that are not necessarily instances of [MidiAccess].
-   *
-   * See [EventStreamProvider] for usage information.
-   */
-  @DomName('MIDIAccess.disconnectEvent')
-  @DocsEditable()
-  static const EventStreamProvider<MidiConnectionEvent> disconnectEvent = const EventStreamProvider<MidiConnectionEvent>('disconnect');
-
 
   @Deprecated("Internal Use Only")
-  static MidiAccess internalCreateMidiAccess() {
-    return new MidiAccess._internalWrap();
-  }
-
-  external factory MidiAccess._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MidiAccess.internal_() : super.internal_();
@@ -26455,27 +26236,17 @@
 
   @DomName('MIDIAccess.inputs')
   @DocsEditable()
-  MidiInputMap get inputs => wrap_jso(_blink.BlinkMIDIAccess.instance.inputs_Getter_(unwrap_jso(this)));
+  MidiInputMap get inputs => _blink.BlinkMIDIAccess.instance.inputs_Getter_(this);
   
   @DomName('MIDIAccess.outputs')
   @DocsEditable()
-  MidiOutputMap get outputs => wrap_jso(_blink.BlinkMIDIAccess.instance.outputs_Getter_(unwrap_jso(this)));
+  MidiOutputMap get outputs => _blink.BlinkMIDIAccess.instance.outputs_Getter_(this);
   
   @DomName('MIDIAccess.sysexEnabled')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get sysexEnabled => _blink.BlinkMIDIAccess.instance.sysexEnabled_Getter_(unwrap_jso(this));
+  bool get sysexEnabled => _blink.BlinkMIDIAccess.instance.sysexEnabled_Getter_(this);
   
-  /// Stream of `connect` events handled by this [MidiAccess].
-  @DomName('MIDIAccess.onconnect')
-  @DocsEditable()
-  Stream<MidiConnectionEvent> get onConnect => connectEvent.forTarget(this);
-
-  /// Stream of `disconnect` events handled by this [MidiAccess].
-  @DomName('MIDIAccess.ondisconnect')
-  @DocsEditable()
-  Stream<MidiConnectionEvent> get onDisconnect => disconnectEvent.forTarget(this);
-
 }
 // 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
@@ -26492,13 +26263,19 @@
   // To suppress missing implicit constructor warnings.
   factory MidiConnectionEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static MidiConnectionEvent internalCreateMidiConnectionEvent() {
-    return new MidiConnectionEvent._internalWrap();
+  @DomName('MIDIConnectionEvent.MIDIConnectionEvent')
+  @DocsEditable()
+  factory MidiConnectionEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMIDIConnectionEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMIDIConnectionEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory MidiConnectionEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MidiConnectionEvent.internal_() : super.internal_();
@@ -26506,7 +26283,7 @@
 
   @DomName('MIDIConnectionEvent.port')
   @DocsEditable()
-  MidiPort get port => wrap_jso(_blink.BlinkMIDIConnectionEvent.instance.port_Getter_(unwrap_jso(this)));
+  MidiPort get port => _blink.BlinkMIDIConnectionEvent.instance.port_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26536,11 +26313,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MidiInput internalCreateMidiInput() {
-    return new MidiInput._internalWrap();
-  }
-
-  external factory MidiInput._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MidiInput.internal_() : super.internal_();
@@ -26566,50 +26339,17 @@
   // To suppress missing implicit constructor warnings.
   factory MidiInputMap._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MidiInputMap internalCreateMidiInputMap() {
-    return new MidiInputMap._internalWrap();
-  }
 
-  factory MidiInputMap._internalWrap() {
-    return new MidiInputMap.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MidiInputMap.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MIDIInputMap.size')
   @DocsEditable()
   @Experimental() // untriaged
-  int get size => _blink.BlinkMIDIInputMap.instance.size_Getter_(unwrap_jso(this));
-  
-  @DomName('MIDIInputMap.entries')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator entries() => wrap_jso(_blink.BlinkMIDIInputMap.instance.entries_Callback_0_(unwrap_jso(this)));
-  
-  @DomName('MIDIInputMap.get')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Object get(String id) => wrap_jso(_blink.BlinkMIDIInputMap.instance.get_Callback_1_(unwrap_jso(this), id));
-  
-  @DomName('MIDIInputMap.has')
-  @DocsEditable()
-  @Experimental() // untriaged
-  bool has(String key) => _blink.BlinkMIDIInputMap.instance.has_Callback_1_(unwrap_jso(this), key);
-  
-  @DomName('MIDIInputMap.keys')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator keys() => wrap_jso(_blink.BlinkMIDIInputMap.instance.keys_Callback_0_(unwrap_jso(this)));
-  
-  @DomName('MIDIInputMap.values')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator values() => wrap_jso(_blink.BlinkMIDIInputMap.instance.values_Callback_0_(unwrap_jso(this)));
+  int get size => _blink.BlinkMIDIInputMap.instance.size_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26627,13 +26367,19 @@
   // To suppress missing implicit constructor warnings.
   factory MidiMessageEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static MidiMessageEvent internalCreateMidiMessageEvent() {
-    return new MidiMessageEvent._internalWrap();
+  @DomName('MIDIMessageEvent.MIDIMessageEvent')
+  @DocsEditable()
+  factory MidiMessageEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMIDIMessageEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMIDIMessageEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory MidiMessageEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MidiMessageEvent.internal_() : super.internal_();
@@ -26641,11 +26387,11 @@
 
   @DomName('MIDIMessageEvent.data')
   @DocsEditable()
-  Uint8List get data => _blink.BlinkMIDIMessageEvent.instance.data_Getter_(unwrap_jso(this));
+  Uint8List get data => _blink.BlinkMIDIMessageEvent.instance.data_Getter_(this);
   
   @DomName('MIDIMessageEvent.receivedTime')
   @DocsEditable()
-  num get receivedTime => _blink.BlinkMIDIMessageEvent.instance.receivedTime_Getter_(unwrap_jso(this));
+  num get receivedTime => _blink.BlinkMIDIMessageEvent.instance.receivedTime_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26665,11 +26411,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MidiOutput internalCreateMidiOutput() {
-    return new MidiOutput._internalWrap();
-  }
-
-  external factory MidiOutput._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MidiOutput.internal_() : super.internal_();
@@ -26677,10 +26419,10 @@
 
   void send(Uint8List data, [num timestamp]) {
     if (timestamp != null) {
-      _blink.BlinkMIDIOutput.instance.send_Callback_2_(unwrap_jso(this), data, timestamp);
+      _blink.BlinkMIDIOutput.instance.send_Callback_2_(this, data, timestamp);
       return;
     }
-    _blink.BlinkMIDIOutput.instance.send_Callback_1_(unwrap_jso(this), data);
+    _blink.BlinkMIDIOutput.instance.send_Callback_1_(this, data);
     return;
   }
 
@@ -26699,50 +26441,17 @@
   // To suppress missing implicit constructor warnings.
   factory MidiOutputMap._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MidiOutputMap internalCreateMidiOutputMap() {
-    return new MidiOutputMap._internalWrap();
-  }
 
-  factory MidiOutputMap._internalWrap() {
-    return new MidiOutputMap.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MidiOutputMap.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MIDIOutputMap.size')
   @DocsEditable()
   @Experimental() // untriaged
-  int get size => _blink.BlinkMIDIOutputMap.instance.size_Getter_(unwrap_jso(this));
-  
-  @DomName('MIDIOutputMap.entries')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator entries() => wrap_jso(_blink.BlinkMIDIOutputMap.instance.entries_Callback_0_(unwrap_jso(this)));
-  
-  @DomName('MIDIOutputMap.get')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Object get(String id) => wrap_jso(_blink.BlinkMIDIOutputMap.instance.get_Callback_1_(unwrap_jso(this), id));
-  
-  @DomName('MIDIOutputMap.has')
-  @DocsEditable()
-  @Experimental() // untriaged
-  bool has(String key) => _blink.BlinkMIDIOutputMap.instance.has_Callback_1_(unwrap_jso(this), key);
-  
-  @DomName('MIDIOutputMap.keys')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator keys() => wrap_jso(_blink.BlinkMIDIOutputMap.instance.keys_Callback_0_(unwrap_jso(this)));
-  
-  @DomName('MIDIOutputMap.values')
-  @DocsEditable()
-  @Experimental() // untriaged
-  DomIterator values() => wrap_jso(_blink.BlinkMIDIOutputMap.instance.values_Callback_0_(unwrap_jso(this)));
+  int get size => _blink.BlinkMIDIOutputMap.instance.size_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26760,53 +26469,54 @@
   // To suppress missing implicit constructor warnings.
   factory MidiPort._() { throw new UnsupportedError("Not supported"); }
 
-  /**
-   * Static factory designed to expose `disconnect` events to event
-   * handlers that are not necessarily instances of [MidiPort].
-   *
-   * See [EventStreamProvider] for usage information.
-   */
-  @DomName('MIDIPort.disconnectEvent')
-  @DocsEditable()
-  static const EventStreamProvider<MidiConnectionEvent> disconnectEvent = const EventStreamProvider<MidiConnectionEvent>('disconnect');
-
 
   @Deprecated("Internal Use Only")
-  static MidiPort internalCreateMidiPort() {
-    return new MidiPort._internalWrap();
-  }
-
-  external factory MidiPort._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MidiPort.internal_() : super.internal_();
 
 
+  @DomName('MIDIPort.connection')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get connection => _blink.BlinkMIDIPort.instance.connection_Getter_(this);
+  
   @DomName('MIDIPort.id')
   @DocsEditable()
-  String get id => _blink.BlinkMIDIPort.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkMIDIPort.instance.id_Getter_(this);
   
   @DomName('MIDIPort.manufacturer')
   @DocsEditable()
-  String get manufacturer => _blink.BlinkMIDIPort.instance.manufacturer_Getter_(unwrap_jso(this));
+  String get manufacturer => _blink.BlinkMIDIPort.instance.manufacturer_Getter_(this);
   
   @DomName('MIDIPort.name')
   @DocsEditable()
-  String get name => _blink.BlinkMIDIPort.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkMIDIPort.instance.name_Getter_(this);
+  
+  @DomName('MIDIPort.state')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get state => _blink.BlinkMIDIPort.instance.state_Getter_(this);
   
   @DomName('MIDIPort.type')
   @DocsEditable()
-  String get type => _blink.BlinkMIDIPort.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkMIDIPort.instance.type_Getter_(this);
   
   @DomName('MIDIPort.version')
   @DocsEditable()
-  String get version => _blink.BlinkMIDIPort.instance.version_Getter_(unwrap_jso(this));
+  String get version => _blink.BlinkMIDIPort.instance.version_Getter_(this);
   
-  /// Stream of `disconnect` events handled by this [MidiPort].
-  @DomName('MIDIPort.ondisconnect')
+  @DomName('MIDIPort.close')
   @DocsEditable()
-  Stream<MidiConnectionEvent> get onDisconnect => disconnectEvent.forTarget(this);
-
+  @Experimental() // untriaged
+  Future close() => convertNativePromiseToDartFuture(_blink.BlinkMIDIPort.instance.close_Callback_0_(this));
+  
+  @DomName('MIDIPort.open')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future open() => convertNativePromiseToDartFuture(_blink.BlinkMIDIPort.instance.open_Callback_0_(this));
+  
 }
 // 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
@@ -26822,36 +26532,28 @@
   // To suppress missing implicit constructor warnings.
   factory MimeType._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MimeType internalCreateMimeType() {
-    return new MimeType._internalWrap();
-  }
 
-  factory MimeType._internalWrap() {
-    return new MimeType.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MimeType.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MimeType.description')
   @DocsEditable()
-  String get description => _blink.BlinkMimeType.instance.description_Getter_(unwrap_jso(this));
+  String get description => _blink.BlinkMimeType.instance.description_Getter_(this);
   
   @DomName('MimeType.enabledPlugin')
   @DocsEditable()
-  Plugin get enabledPlugin => wrap_jso(_blink.BlinkMimeType.instance.enabledPlugin_Getter_(unwrap_jso(this)));
+  Plugin get enabledPlugin => _blink.BlinkMimeType.instance.enabledPlugin_Getter_(this);
   
   @DomName('MimeType.suffixes')
   @DocsEditable()
-  String get suffixes => _blink.BlinkMimeType.instance.suffixes_Getter_(unwrap_jso(this));
+  String get suffixes => _blink.BlinkMimeType.instance.suffixes_Getter_(this);
   
   @DomName('MimeType.type')
   @DocsEditable()
-  String get type => _blink.BlinkMimeType.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkMimeType.instance.type_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -26868,32 +26570,24 @@
   // To suppress missing implicit constructor warnings.
   factory MimeTypeArray._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MimeTypeArray internalCreateMimeTypeArray() {
-    return new MimeTypeArray._internalWrap();
-  }
 
-  factory MimeTypeArray._internalWrap() {
-    return new MimeTypeArray.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MimeTypeArray.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MimeTypeArray.length')
   @DocsEditable()
-  int get length => _blink.BlinkMimeTypeArray.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkMimeTypeArray.instance.length_Getter_(this);
   
   MimeType operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkMimeTypeArray.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  MimeType _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkMimeTypeArray.instance.item_Callback_1_(unwrap_jso(this), index));
+  MimeType _nativeIndexedGetter(int index) => (_blink.BlinkMimeTypeArray.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, MimeType value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -26933,18 +26627,20 @@
   MimeType elementAt(int index) => this[index];
   // -- end List<MimeType> mixins.
 
-  @DomName('MimeTypeArray.__getter__')
-  @DocsEditable()
-  MimeType __getter__(String name) => wrap_jso(_blink.BlinkMimeTypeArray.instance.$__getter___Callback_1_(unwrap_jso(this), name));
-  
   @DomName('MimeTypeArray.item')
   @DocsEditable()
-  MimeType item(int index) => wrap_jso(_blink.BlinkMimeTypeArray.instance.item_Callback_1_(unwrap_jso(this), index));
+  MimeType item(int index) => _blink.BlinkMimeTypeArray.instance.item_Callback_1_(this, index);
   
-  @DomName('MimeTypeArray.namedItem')
-  @DocsEditable()
-  MimeType namedItem(String name) => wrap_jso(_blink.BlinkMimeTypeArray.instance.namedItem_Callback_1_(unwrap_jso(this), name));
-  
+  MimeType namedItem(String name) {
+    if ((name is String || name == null)) {
+      return _blink.BlinkMimeTypeArray.instance.namedItem_Callback_1_(this, name);
+    }
+    if ((name is String || name == null)) {
+      return _blink.BlinkMimeTypeArray.instance.namedItem_Callback_1_(this, name);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
 }
 // 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
@@ -26962,11 +26658,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ModElement internalCreateModElement() {
-    return new ModElement._internalWrap();
-  }
-
-  external factory ModElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ModElement.internal_() : super.internal_();
@@ -26980,19 +26672,19 @@
 
   @DomName('HTMLModElement.cite')
   @DocsEditable()
-  String get cite => _blink.BlinkHTMLModElement.instance.cite_Getter_(unwrap_jso(this));
+  String get cite => _blink.BlinkHTMLModElement.instance.cite_Getter_(this);
   
   @DomName('HTMLModElement.cite')
   @DocsEditable()
-  set cite(String value) => _blink.BlinkHTMLModElement.instance.cite_Setter_(unwrap_jso(this), value);
+  set cite(String value) => _blink.BlinkHTMLModElement.instance.cite_Setter_(this, value);
   
   @DomName('HTMLModElement.dateTime')
   @DocsEditable()
-  String get dateTime => _blink.BlinkHTMLModElement.instance.dateTime_Getter_(unwrap_jso(this));
+  String get dateTime => _blink.BlinkHTMLModElement.instance.dateTime_Getter_(this);
   
   @DomName('HTMLModElement.dateTime')
   @DocsEditable()
-  set dateTime(String value) => _blink.BlinkHTMLModElement.instance.dateTime_Setter_(unwrap_jso(this), value);
+  set dateTime(String value) => _blink.BlinkHTMLModElement.instance.dateTime_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -27019,16 +26711,20 @@
         button, relatedTarget);
     return event;
   }
-  // To suppress missing implicit constructor warnings.
-  factory MouseEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('MouseEvent.MouseEvent')
+  @DocsEditable()
+  factory MouseEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkMouseEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkMouseEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static MouseEvent internalCreateMouseEvent() {
-    return new MouseEvent._internalWrap();
-  }
-
-  external factory MouseEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MouseEvent.internal_() : super.internal_();
@@ -27036,28 +26732,33 @@
 
   @DomName('MouseEvent.altKey')
   @DocsEditable()
-  bool get altKey => _blink.BlinkMouseEvent.instance.altKey_Getter_(unwrap_jso(this));
+  bool get altKey => _blink.BlinkMouseEvent.instance.altKey_Getter_(this);
   
   @DomName('MouseEvent.button')
   @DocsEditable()
-  int get button => _blink.BlinkMouseEvent.instance.button_Getter_(unwrap_jso(this));
+  int get button => _blink.BlinkMouseEvent.instance.button_Getter_(this);
+  
+  @DomName('MouseEvent.buttons')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get buttons => _blink.BlinkMouseEvent.instance.buttons_Getter_(this);
   
   @DomName('MouseEvent.clientX')
   @DocsEditable()
-  int get _clientX => _blink.BlinkMouseEvent.instance.clientX_Getter_(unwrap_jso(this));
+  int get _clientX => _blink.BlinkMouseEvent.instance.clientX_Getter_(this);
   
   @DomName('MouseEvent.clientY')
   @DocsEditable()
-  int get _clientY => _blink.BlinkMouseEvent.instance.clientY_Getter_(unwrap_jso(this));
+  int get _clientY => _blink.BlinkMouseEvent.instance.clientY_Getter_(this);
   
   @DomName('MouseEvent.ctrlKey')
   @DocsEditable()
-  bool get ctrlKey => _blink.BlinkMouseEvent.instance.ctrlKey_Getter_(unwrap_jso(this));
+  bool get ctrlKey => _blink.BlinkMouseEvent.instance.ctrlKey_Getter_(this);
   
   @DomName('MouseEvent.dataTransfer')
   @DocsEditable()
   @Unstable()
-  DataTransfer get dataTransfer => wrap_jso(_blink.BlinkMouseEvent.instance.dataTransfer_Getter_(unwrap_jso(this)));
+  DataTransfer get dataTransfer => _blink.BlinkMouseEvent.instance.dataTransfer_Getter_(this);
   
   /**
    * The nonstandard way to access the element that the mouse comes
@@ -27069,52 +26770,72 @@
   @DomName('MouseEvent.fromElement')
   @DocsEditable()
   @deprecated
-  Node get fromElement => wrap_jso(_blink.BlinkMouseEvent.instance.fromElement_Getter_(unwrap_jso(this)));
+  Node get fromElement => _blink.BlinkMouseEvent.instance.fromElement_Getter_(this);
+  
+  @DomName('MouseEvent.layerX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get _layerX => _blink.BlinkMouseEvent.instance.layerX_Getter_(this);
+  
+  @DomName('MouseEvent.layerY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get _layerY => _blink.BlinkMouseEvent.instance.layerY_Getter_(this);
   
   @DomName('MouseEvent.metaKey')
   @DocsEditable()
-  bool get metaKey => _blink.BlinkMouseEvent.instance.metaKey_Getter_(unwrap_jso(this));
+  bool get metaKey => _blink.BlinkMouseEvent.instance.metaKey_Getter_(this);
   
   @DomName('MouseEvent.movementX')
   @DocsEditable()
   @Experimental() // untriaged
-  int get _movementX => _blink.BlinkMouseEvent.instance.movementX_Getter_(unwrap_jso(this));
+  int get _movementX => _blink.BlinkMouseEvent.instance.movementX_Getter_(this);
   
   @DomName('MouseEvent.movementY')
   @DocsEditable()
   @Experimental() // untriaged
-  int get _movementY => _blink.BlinkMouseEvent.instance.movementY_Getter_(unwrap_jso(this));
+  int get _movementY => _blink.BlinkMouseEvent.instance.movementY_Getter_(this);
   
   @DomName('MouseEvent.offsetX')
   @DocsEditable()
   @Unstable()
-  int get _offsetX => _blink.BlinkMouseEvent.instance.offsetX_Getter_(unwrap_jso(this));
+  int get _offsetX => _blink.BlinkMouseEvent.instance.offsetX_Getter_(this);
   
   @DomName('MouseEvent.offsetY')
   @DocsEditable()
   @Unstable()
-  int get _offsetY => _blink.BlinkMouseEvent.instance.offsetY_Getter_(unwrap_jso(this));
+  int get _offsetY => _blink.BlinkMouseEvent.instance.offsetY_Getter_(this);
+  
+  @DomName('MouseEvent.pageX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get _pageX => _blink.BlinkMouseEvent.instance.pageX_Getter_(this);
+  
+  @DomName('MouseEvent.pageY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get _pageY => _blink.BlinkMouseEvent.instance.pageY_Getter_(this);
   
   @DomName('MouseEvent.region')
   @DocsEditable()
   @Experimental() // untriaged
-  String get region => _blink.BlinkMouseEvent.instance.region_Getter_(unwrap_jso(this));
+  String get region => _blink.BlinkMouseEvent.instance.region_Getter_(this);
   
   @DomName('MouseEvent.relatedTarget')
   @DocsEditable()
-  EventTarget get relatedTarget => wrap_jso(_blink.BlinkMouseEvent.instance.relatedTarget_Getter_(unwrap_jso(this)));
+  EventTarget get relatedTarget => _convertNativeToDart_EventTarget(_blink.BlinkMouseEvent.instance.relatedTarget_Getter_(this));
   
   @DomName('MouseEvent.screenX')
   @DocsEditable()
-  int get _screenX => _blink.BlinkMouseEvent.instance.screenX_Getter_(unwrap_jso(this));
+  int get _screenX => _blink.BlinkMouseEvent.instance.screenX_Getter_(this);
   
   @DomName('MouseEvent.screenY')
   @DocsEditable()
-  int get _screenY => _blink.BlinkMouseEvent.instance.screenY_Getter_(unwrap_jso(this));
+  int get _screenY => _blink.BlinkMouseEvent.instance.screenY_Getter_(this);
   
   @DomName('MouseEvent.shiftKey')
   @DocsEditable()
-  bool get shiftKey => _blink.BlinkMouseEvent.instance.shiftKey_Getter_(unwrap_jso(this));
+  bool get shiftKey => _blink.BlinkMouseEvent.instance.shiftKey_Getter_(this);
   
   /**
    * The nonstandard way to access the element that the mouse goes
@@ -27126,25 +26847,30 @@
   @DomName('MouseEvent.toElement')
   @DocsEditable()
   @deprecated
-  Node get toElement => wrap_jso(_blink.BlinkMouseEvent.instance.toElement_Getter_(unwrap_jso(this)));
+  Node get toElement => _blink.BlinkMouseEvent.instance.toElement_Getter_(this);
   
   @DomName('MouseEvent.webkitMovementX')
   @DocsEditable()
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
-  int get _webkitMovementX => _blink.BlinkMouseEvent.instance.webkitMovementX_Getter_(unwrap_jso(this));
+  int get _webkitMovementX => _blink.BlinkMouseEvent.instance.webkitMovementX_Getter_(this);
   
   @DomName('MouseEvent.webkitMovementY')
   @DocsEditable()
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
-  int get _webkitMovementY => _blink.BlinkMouseEvent.instance.webkitMovementY_Getter_(unwrap_jso(this));
+  int get _webkitMovementY => _blink.BlinkMouseEvent.instance.webkitMovementY_Getter_(this);
+  
+  @DomName('MouseEvent.which')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get _which => _blink.BlinkMouseEvent.instance.which_Getter_(this);
   
   @DomName('MouseEvent.initMouseEvent')
   @DocsEditable()
-  void _initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) => _blink.BlinkMouseEvent.instance.initMouseEvent_Callback_15_(unwrap_jso(this), type, canBubble, cancelable, unwrap_jso(view), detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, unwrap_jso(relatedTarget));
+  void _initMouseEvent(String type, bool bubbles, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) => _blink.BlinkMouseEvent.instance.initMouseEvent_Callback_15_(this, type, bubbles, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, _convertDartToNative_EventTarget(relatedTarget));
   
 
   @deprecated
@@ -27187,6 +26913,14 @@
   @DomName('MouseEvent.screenX')
   @DomName('MouseEvent.screenY')
   Point get screen => new Point(_screenX, _screenY);
+
+  @DomName('MouseEvent.layerX')
+  @DomName('MouseEvent.layerY')
+  Point get layer => new Point(_layerX, _layerY);
+
+  @DomName('MouseEvent.pageX')
+  @DomName('MouseEvent.pageY')
+  Point get page => new Point(_pageX, _pageY);
 }
 // 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
@@ -27211,34 +26945,26 @@
 
   @DomName('MutationObserver.MutationObserver')
   @DocsEditable()
-  factory MutationObserver._(MutationCallback callback) => wrap_jso(_create(callback));
+  factory MutationObserver._(MutationCallback callback) => _create(callback);
+
 
   @Deprecated("Internal Use Only")
-  static MutationObserver internalCreateMutationObserver() {
-    return new MutationObserver._internalWrap();
-  }
-
-  factory MutationObserver._internalWrap() {
-    return new MutationObserver.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MutationObserver.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MutationObserver.disconnect')
   @DocsEditable()
-  void disconnect() => _blink.BlinkMutationObserver.instance.disconnect_Callback_0_(unwrap_jso(this));
+  void disconnect() => _blink.BlinkMutationObserver.instance.disconnect_Callback_0_(this);
   
   @DomName('MutationObserver.observe')
   @DocsEditable()
-  void _observe(Node target, Map options) => _blink.BlinkMutationObserver.instance.observe_Callback_2_(unwrap_jso(this), unwrap_jso(target), convertDartToNative_Dictionary(options));
+  void _observe(Node target, Map options) => _blink.BlinkMutationObserver.instance.observe_Callback_2_(this, target, convertDartToNative_Dictionary(options));
   
   @DomName('MutationObserver.takeRecords')
   @DocsEditable()
-  List<MutationRecord> takeRecords() => wrap_jso(_blink.BlinkMutationObserver.instance.takeRecords_Callback_0_(unwrap_jso(this)));
+  List<MutationRecord> takeRecords() => (_blink.BlinkMutationObserver.instance.takeRecords_Callback_0_(this));
   
   /**
    * Checks to see if the mutation observer API is supported on the current
@@ -27248,9 +26974,7 @@
     return true;
   }
   @DocsEditable()
-  static MutationObserver _create(callback) => wrap_jso(_blink.BlinkMutationObserver.instance.constructorCallback_1_((mutations, observer) {
-    callback(wrap_jso(mutations), wrap_jso(observer));
-  }));
+  static MutationObserver _create(callback) => _blink.BlinkMutationObserver.instance.constructorCallback_1_(callback);
 
   /**
    * Observes the target for the specified changes.
@@ -27325,56 +27049,48 @@
   // To suppress missing implicit constructor warnings.
   factory MutationRecord._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static MutationRecord internalCreateMutationRecord() {
-    return new MutationRecord._internalWrap();
-  }
 
-  factory MutationRecord._internalWrap() {
-    return new MutationRecord.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MutationRecord.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('MutationRecord.addedNodes')
   @DocsEditable()
-  List<Node> get addedNodes => wrap_jso(_blink.BlinkMutationRecord.instance.addedNodes_Getter_(unwrap_jso(this)));
+  List<Node> get addedNodes => (_blink.BlinkMutationRecord.instance.addedNodes_Getter_(this));
   
   @DomName('MutationRecord.attributeName')
   @DocsEditable()
-  String get attributeName => _blink.BlinkMutationRecord.instance.attributeName_Getter_(unwrap_jso(this));
+  String get attributeName => _blink.BlinkMutationRecord.instance.attributeName_Getter_(this);
   
   @DomName('MutationRecord.attributeNamespace')
   @DocsEditable()
-  String get attributeNamespace => _blink.BlinkMutationRecord.instance.attributeNamespace_Getter_(unwrap_jso(this));
+  String get attributeNamespace => _blink.BlinkMutationRecord.instance.attributeNamespace_Getter_(this);
   
   @DomName('MutationRecord.nextSibling')
   @DocsEditable()
-  Node get nextSibling => wrap_jso(_blink.BlinkMutationRecord.instance.nextSibling_Getter_(unwrap_jso(this)));
+  Node get nextSibling => _blink.BlinkMutationRecord.instance.nextSibling_Getter_(this);
   
   @DomName('MutationRecord.oldValue')
   @DocsEditable()
-  String get oldValue => _blink.BlinkMutationRecord.instance.oldValue_Getter_(unwrap_jso(this));
+  String get oldValue => _blink.BlinkMutationRecord.instance.oldValue_Getter_(this);
   
   @DomName('MutationRecord.previousSibling')
   @DocsEditable()
-  Node get previousSibling => wrap_jso(_blink.BlinkMutationRecord.instance.previousSibling_Getter_(unwrap_jso(this)));
+  Node get previousSibling => _blink.BlinkMutationRecord.instance.previousSibling_Getter_(this);
   
   @DomName('MutationRecord.removedNodes')
   @DocsEditable()
-  List<Node> get removedNodes => wrap_jso(_blink.BlinkMutationRecord.instance.removedNodes_Getter_(unwrap_jso(this)));
+  List<Node> get removedNodes => (_blink.BlinkMutationRecord.instance.removedNodes_Getter_(this));
   
   @DomName('MutationRecord.target')
   @DocsEditable()
-  Node get target => wrap_jso(_blink.BlinkMutationRecord.instance.target_Getter_(unwrap_jso(this)));
+  Node get target => _blink.BlinkMutationRecord.instance.target_Getter_(this);
   
   @DomName('MutationRecord.type')
   @DocsEditable()
-  String get type => _blink.BlinkMutationRecord.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkMutationRecord.instance.type_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -27383,7 +27099,7 @@
 
 
 @DomName('Navigator')
-class Navigator extends DartHtmlDomObject implements NavigatorCpu, NavigatorLanguage, NavigatorOnLine, NavigatorID {
+class Navigator extends DartHtmlDomObject implements NavigatorStorageUtils, NavigatorCpu, NavigatorLanguage, NavigatorOnLine, NavigatorID {
 
 
   /**
@@ -27444,96 +27160,93 @@
   // To suppress missing implicit constructor warnings.
   factory Navigator._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Navigator internalCreateNavigator() {
-    return new Navigator._internalWrap();
-  }
 
-  factory Navigator._internalWrap() {
-    return new Navigator.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Navigator.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
+  @DomName('Navigator.bluetooth')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Bluetooth get bluetooth => _blink.BlinkNavigator.instance.bluetooth_Getter_(this);
+  
   @DomName('Navigator.connection')
   @DocsEditable()
   @Experimental() // untriaged
-  NetworkInformation get connection => wrap_jso(_blink.BlinkNavigator.instance.connection_Getter_(unwrap_jso(this)));
-  
-  @DomName('Navigator.cookieEnabled')
-  @DocsEditable()
-  @Unstable()
-  bool get cookieEnabled => _blink.BlinkNavigator.instance.cookieEnabled_Getter_(unwrap_jso(this));
+  NetworkInformation get connection => _blink.BlinkNavigator.instance.connection_Getter_(this);
   
   @DomName('Navigator.credentials')
   @DocsEditable()
   @Experimental() // untriaged
-  CredentialsContainer get credentials => wrap_jso(_blink.BlinkNavigator.instance.credentials_Getter_(unwrap_jso(this)));
+  CredentialsContainer get credentials => _blink.BlinkNavigator.instance.credentials_Getter_(this);
   
   @DomName('Navigator.doNotTrack')
   @DocsEditable()
   // http://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html#js-dom
   @Experimental() // experimental
-  String get doNotTrack => _blink.BlinkNavigator.instance.doNotTrack_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.geofencing')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Geofencing get geofencing => wrap_jso(_blink.BlinkNavigator.instance.geofencing_Getter_(unwrap_jso(this)));
+  String get doNotTrack => _blink.BlinkNavigator.instance.doNotTrack_Getter_(this);
   
   @DomName('Navigator.geolocation')
   @DocsEditable()
   @Unstable()
-  Geolocation get geolocation => wrap_jso(_blink.BlinkNavigator.instance.geolocation_Getter_(unwrap_jso(this)));
+  Geolocation get geolocation => _blink.BlinkNavigator.instance.geolocation_Getter_(this);
   
   @DomName('Navigator.maxTouchPoints')
   @DocsEditable()
   @Experimental() // untriaged
-  int get maxTouchPoints => _blink.BlinkNavigator.instance.maxTouchPoints_Getter_(unwrap_jso(this));
+  int get maxTouchPoints => _blink.BlinkNavigator.instance.maxTouchPoints_Getter_(this);
+  
+  @DomName('Navigator.mediaDevices')
+  @DocsEditable()
+  @Experimental() // untriaged
+  MediaDevices get mediaDevices => _blink.BlinkNavigator.instance.mediaDevices_Getter_(this);
   
   @DomName('Navigator.mimeTypes')
   @DocsEditable()
   @Experimental() // nonstandard
-  MimeTypeArray get mimeTypes => wrap_jso(_blink.BlinkNavigator.instance.mimeTypes_Getter_(unwrap_jso(this)));
+  MimeTypeArray get mimeTypes => _blink.BlinkNavigator.instance.mimeTypes_Getter_(this);
+  
+  @DomName('Navigator.permissions')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Permissions get permissions => _blink.BlinkNavigator.instance.permissions_Getter_(this);
   
   @DomName('Navigator.presentation')
   @DocsEditable()
   @Experimental() // untriaged
-  Presentation get presentation => wrap_jso(_blink.BlinkNavigator.instance.presentation_Getter_(unwrap_jso(this)));
+  Presentation get presentation => _blink.BlinkNavigator.instance.presentation_Getter_(this);
   
   @DomName('Navigator.productSub')
   @DocsEditable()
   @Unstable()
-  String get productSub => _blink.BlinkNavigator.instance.productSub_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.push')
-  @DocsEditable()
-  @Experimental() // untriaged
-  PushManager get push => wrap_jso(_blink.BlinkNavigator.instance.push_Getter_(unwrap_jso(this)));
+  String get productSub => _blink.BlinkNavigator.instance.productSub_Getter_(this);
   
   @DomName('Navigator.serviceWorker')
   @DocsEditable()
   @Experimental() // untriaged
-  ServiceWorkerContainer get serviceWorker => wrap_jso(_blink.BlinkNavigator.instance.serviceWorker_Getter_(unwrap_jso(this)));
+  ServiceWorkerContainer get serviceWorker => _blink.BlinkNavigator.instance.serviceWorker_Getter_(this);
+  
+  @DomName('Navigator.services')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ServicePortCollection get services => _blink.BlinkNavigator.instance.services_Getter_(this);
   
   @DomName('Navigator.storageQuota')
   @DocsEditable()
   @Experimental() // untriaged
-  StorageQuota get storageQuota => wrap_jso(_blink.BlinkNavigator.instance.storageQuota_Getter_(unwrap_jso(this)));
+  StorageQuota get storageQuota => _blink.BlinkNavigator.instance.storageQuota_Getter_(this);
   
   @DomName('Navigator.vendor')
   @DocsEditable()
   @Unstable()
-  String get vendor => _blink.BlinkNavigator.instance.vendor_Getter_(unwrap_jso(this));
+  String get vendor => _blink.BlinkNavigator.instance.vendor_Getter_(this);
   
   @DomName('Navigator.vendorSub')
   @DocsEditable()
   @Unstable()
-  String get vendorSub => _blink.BlinkNavigator.instance.vendorSub_Getter_(unwrap_jso(this));
+  String get vendorSub => _blink.BlinkNavigator.instance.vendorSub_Getter_(this);
   
   @DomName('Navigator.webkitPersistentStorage')
   @DocsEditable()
@@ -27541,7 +27254,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // http://www.w3.org/TR/quota-api/#accessing-storagequota
-  DeprecatedStorageQuota get persistentStorage => wrap_jso(_blink.BlinkNavigator.instance.webkitPersistentStorage_Getter_(unwrap_jso(this)));
+  DeprecatedStorageQuota get persistentStorage => _blink.BlinkNavigator.instance.webkitPersistentStorage_Getter_(this);
   
   @DomName('Navigator.webkitTemporaryStorage')
   @DocsEditable()
@@ -27549,100 +27262,111 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // http://www.w3.org/TR/quota-api/#accessing-storagequota
-  DeprecatedStorageQuota get temporaryStorage => wrap_jso(_blink.BlinkNavigator.instance.webkitTemporaryStorage_Getter_(unwrap_jso(this)));
+  DeprecatedStorageQuota get temporaryStorage => _blink.BlinkNavigator.instance.webkitTemporaryStorage_Getter_(this);
   
   @DomName('Navigator.getBattery')
   @DocsEditable()
   @Experimental() // untriaged
-  Future getBattery() => wrap_jso(_blink.BlinkNavigator.instance.getBattery_Callback_0_(unwrap_jso(this)));
+  Future getBattery() => convertNativePromiseToDartFuture(_blink.BlinkNavigator.instance.getBattery_Callback_0_(this));
   
   @DomName('Navigator.getGamepads')
   @DocsEditable()
   @Experimental() // untriaged
-  List<Gamepad> getGamepads() => wrap_jso(_blink.BlinkNavigator.instance.getGamepads_Callback_0_(unwrap_jso(this)));
+  List<Gamepad> getGamepads() => (_blink.BlinkNavigator.instance.getGamepads_Callback_0_(this));
+  
+  @DomName('Navigator.getVRDevices')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getVRDevices() => convertNativePromiseToDartFuture(_blink.BlinkNavigator.instance.getVRDevices_Callback_0_(this));
+  
+  @DomName('Navigator.registerProtocolHandler')
+  @DocsEditable()
+  @Unstable()
+  void registerProtocolHandler(String scheme, String url, String title) => _blink.BlinkNavigator.instance.registerProtocolHandler_Callback_3_(this, scheme, url, title);
+  
+  Future requestMidiAccess([Map options]) {
+    if (options != null) {
+      return _blink.BlinkNavigator.instance.requestMIDIAccess_Callback_1_(this, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkNavigator.instance.requestMIDIAccess_Callback_0_(this);
+  }
+
+  @DomName('Navigator.requestMediaKeySystemAccess')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future requestMediaKeySystemAccess(String keySystem, List<Map> supportedConfigurations) => convertNativePromiseToDartFuture(_blink.BlinkNavigator.instance.requestMediaKeySystemAccess_Callback_2_(this, keySystem, supportedConfigurations));
+  
+  @DomName('Navigator.sendBeacon')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool sendBeacon(String url, Object data) => _blink.BlinkNavigator.instance.sendBeacon_Callback_2_(this, url, data);
+  
+  @DomName('Navigator.webkitGetUserMedia')
+  @DocsEditable()
+  // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia
+  @Experimental()
+  void _getUserMedia(Map options, _NavigatorUserMediaSuccessCallback successCallback, _NavigatorUserMediaErrorCallback errorCallback) => _blink.BlinkNavigator.instance.webkitGetUserMedia_Callback_3_(this, convertDartToNative_Dictionary(options), successCallback, errorCallback);
+  
+  @DomName('Navigator.hardwareConcurrency')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get hardwareConcurrency => _blink.BlinkNavigator.instance.hardwareConcurrency_Getter_(this);
+  
+  @DomName('Navigator.appCodeName')
+  @DocsEditable()
+  @Experimental() // non-standard
+  String get appCodeName => _blink.BlinkNavigator.instance.appCodeName_Getter_(this);
+  
+  @DomName('Navigator.appName')
+  @DocsEditable()
+  String get appName => _blink.BlinkNavigator.instance.appName_Getter_(this);
+  
+  @DomName('Navigator.appVersion')
+  @DocsEditable()
+  String get appVersion => _blink.BlinkNavigator.instance.appVersion_Getter_(this);
+  
+  @DomName('Navigator.dartEnabled')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get dartEnabled => _blink.BlinkNavigator.instance.dartEnabled_Getter_(this);
+  
+  @DomName('Navigator.platform')
+  @DocsEditable()
+  String get platform => _blink.BlinkNavigator.instance.platform_Getter_(this);
+  
+  @DomName('Navigator.product')
+  @DocsEditable()
+  @Unstable()
+  String get product => _blink.BlinkNavigator.instance.product_Getter_(this);
+  
+  @DomName('Navigator.userAgent')
+  @DocsEditable()
+  String get userAgent => _blink.BlinkNavigator.instance.userAgent_Getter_(this);
+  
+  @DomName('Navigator.language')
+  @DocsEditable()
+  String get language => _blink.BlinkNavigator.instance.language_Getter_(this);
+  
+  @DomName('Navigator.languages')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<String> get languages => _blink.BlinkNavigator.instance.languages_Getter_(this);
+  
+  @DomName('Navigator.onLine')
+  @DocsEditable()
+  @Unstable()
+  bool get onLine => _blink.BlinkNavigator.instance.onLine_Getter_(this);
+  
+  @DomName('Navigator.cookieEnabled')
+  @DocsEditable()
+  @Unstable()
+  bool get cookieEnabled => _blink.BlinkNavigator.instance.cookieEnabled_Getter_(this);
   
   @DomName('Navigator.getStorageUpdates')
   @DocsEditable()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#navigatorstorageutils
   @Experimental()
-  void getStorageUpdates() => _blink.BlinkNavigator.instance.getStorageUpdates_Callback_0_(unwrap_jso(this));
-  
-  @DomName('Navigator.registerProtocolHandler')
-  @DocsEditable()
-  @Unstable()
-  void registerProtocolHandler(String scheme, String url, String title) => _blink.BlinkNavigator.instance.registerProtocolHandler_Callback_3_(unwrap_jso(this), scheme, url, title);
-  
-  bool sendBeacon(String url, data) {
-    if ((data is String || data == null) && (url is String || url == null)) {
-      return _blink.BlinkNavigator.instance.sendBeacon_Callback_2_(unwrap_jso(this), url, unwrap_jso(data));
-    }
-    if ((data is TypedData || data == null) && (url is String || url == null)) {
-      return _blink.BlinkNavigator.instance.sendBeacon_Callback_2_(unwrap_jso(this), url, unwrap_jso(data));
-    }
-    if ((data is FormData || data == null) && (url is String || url == null)) {
-      return _blink.BlinkNavigator.instance.sendBeacon_Callback_2_(unwrap_jso(this), url, unwrap_jso(data));
-    }
-    if ((data is Blob || data == null) && (url is String || url == null)) {
-      return _blink.BlinkNavigator.instance.sendBeacon_Callback_2_(unwrap_jso(this), url, unwrap_jso(data));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
-  }
-
-  @DomName('Navigator.webkitGetUserMedia')
-  @DocsEditable()
-  // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia
-  @Experimental()
-  void _getUserMedia(Map options, _NavigatorUserMediaSuccessCallback successCallback, _NavigatorUserMediaErrorCallback errorCallback) => _blink.BlinkNavigator.instance.webkitGetUserMedia_Callback_3_(unwrap_jso(this), convertDartToNative_Dictionary(options), unwrap_jso((stream) => successCallback(wrap_jso(stream))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
-  
-  @DomName('Navigator.hardwareConcurrency')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int get hardwareConcurrency => _blink.BlinkNavigator.instance.hardwareConcurrency_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.appCodeName')
-  @DocsEditable()
-  @Experimental() // non-standard
-  String get appCodeName => _blink.BlinkNavigator.instance.appCodeName_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.appName')
-  @DocsEditable()
-  String get appName => _blink.BlinkNavigator.instance.appName_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.appVersion')
-  @DocsEditable()
-  String get appVersion => _blink.BlinkNavigator.instance.appVersion_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.dartEnabled')
-  @DocsEditable()
-  @Experimental() // untriaged
-  bool get dartEnabled => _blink.BlinkNavigator.instance.dartEnabled_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.platform')
-  @DocsEditable()
-  String get platform => _blink.BlinkNavigator.instance.platform_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.product')
-  @DocsEditable()
-  @Unstable()
-  String get product => _blink.BlinkNavigator.instance.product_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.userAgent')
-  @DocsEditable()
-  String get userAgent => _blink.BlinkNavigator.instance.userAgent_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.language')
-  @DocsEditable()
-  String get language => _blink.BlinkNavigator.instance.language_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.languages')
-  @DocsEditable()
-  @Experimental() // untriaged
-  List<String> get languages => _blink.BlinkNavigator.instance.languages_Getter_(unwrap_jso(this));
-  
-  @DomName('Navigator.onLine')
-  @DocsEditable()
-  @Unstable()
-  bool get onLine => _blink.BlinkNavigator.instance.onLine_Getter_(unwrap_jso(this));
+  void getStorageUpdates() => _blink.BlinkNavigator.instance.getStorageUpdates_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -27768,6 +27492,38 @@
 
 
 @DocsEditable()
+@DomName('NavigatorStorageUtils')
+@Experimental() // untriaged
+class NavigatorStorageUtils extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory NavigatorStorageUtils._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  NavigatorStorageUtils.internal_() { }
+
+  @DomName('NavigatorStorageUtils.cookieEnabled')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get cookieEnabled => _blink.BlinkNavigatorStorageUtils.instance.cookieEnabled_Getter_(this);
+  
+  @DomName('NavigatorStorageUtils.getStorageUpdates')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void getStorageUpdates() => _blink.BlinkNavigatorStorageUtils.instance.getStorageUpdates_Callback_0_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('NavigatorUserMediaError')
 // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-NavigatorUserMediaError
 @Experimental()
@@ -27775,32 +27531,24 @@
   // To suppress missing implicit constructor warnings.
   factory NavigatorUserMediaError._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static NavigatorUserMediaError internalCreateNavigatorUserMediaError() {
-    return new NavigatorUserMediaError._internalWrap();
-  }
 
-  factory NavigatorUserMediaError._internalWrap() {
-    return new NavigatorUserMediaError.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   NavigatorUserMediaError.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('NavigatorUserMediaError.constraintName')
   @DocsEditable()
-  String get constraintName => _blink.BlinkNavigatorUserMediaError.instance.constraintName_Getter_(unwrap_jso(this));
+  String get constraintName => _blink.BlinkNavigatorUserMediaError.instance.constraintName_Getter_(this);
   
   @DomName('NavigatorUserMediaError.message')
   @DocsEditable()
-  String get message => _blink.BlinkNavigatorUserMediaError.instance.message_Getter_(unwrap_jso(this));
+  String get message => _blink.BlinkNavigatorUserMediaError.instance.message_Getter_(this);
   
   @DomName('NavigatorUserMediaError.name')
   @DocsEditable()
-  String get name => _blink.BlinkNavigatorUserMediaError.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkNavigatorUserMediaError.instance.name_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -27841,11 +27589,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static NetworkInformation internalCreateNetworkInformation() {
-    return new NetworkInformation._internalWrap();
-  }
-
-  external factory NetworkInformation._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   NetworkInformation.internal_() : super.internal_();
@@ -27854,7 +27598,7 @@
   @DomName('NetworkInformation.type')
   @DocsEditable()
   @Experimental() // untriaged
-  String get type => _blink.BlinkNetworkInformation.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkNetworkInformation.instance.type_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -28033,14 +27777,7 @@
 class Node extends EventTarget {
 
   // Custom element created callback.
-  Node._created() : super._created() {
-    // By this point blink_jsObject should be setup if it's not then we weren't
-    // called by the registerElement createdCallback - probably created() was
-    // called directly which is verboten.
-    if (this.blink_jsObject == null) {
-      throw new DomException.jsInterop("the created constructor cannot be called directly");
-    }
-  }
+  Node._created() : super._created();
 
   /**
    * A modifiable list of this node's children.
@@ -28135,17 +27872,13 @@
    */
   @DomName('Node.childNodes')
   @DocsEditable()
-  List<Node> get childNodes => wrap_jso(_blink.BlinkNode.instance.childNodes_Getter_(unwrap_jso(this)));
+  List<Node> get childNodes => _blink.BlinkNode.instance.childNodes_Getter_(this);
   // To suppress missing implicit constructor warnings.
   factory Node._() { throw new UnsupportedError("Not supported"); }
 
 
   @Deprecated("Internal Use Only")
-  static Node internalCreateNode() {
-    return new Node._internalWrap();
-  }
-
-  external factory Node._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Node.internal_() : super.internal_();
@@ -28201,7 +27934,7 @@
 
   @DomName('Node.baseURI')
   @DocsEditable()
-  String get baseUri => _blink.BlinkNode.instance.baseURI_Getter_(unwrap_jso(this));
+  String get baseUri => _blink.BlinkNode.instance.baseURI_Getter_(this);
   
   /**
    * The first child of this node.
@@ -28213,7 +27946,7 @@
    */
   @DomName('Node.firstChild')
   @DocsEditable()
-  Node get firstChild => wrap_jso(_blink.BlinkNode.instance.firstChild_Getter_(unwrap_jso(this)));
+  Node get firstChild => _blink.BlinkNode.instance.firstChild_Getter_(this);
   
   /**
    * The last child of this node.
@@ -28225,15 +27958,15 @@
    */
   @DomName('Node.lastChild')
   @DocsEditable()
-  Node get lastChild => wrap_jso(_blink.BlinkNode.instance.lastChild_Getter_(unwrap_jso(this)));
+  Node get lastChild => _blink.BlinkNode.instance.lastChild_Getter_(this);
   
   @DomName('Node.localName')
   @DocsEditable()
-  String get _localName => _blink.BlinkNode.instance.localName_Getter_(unwrap_jso(this));
+  String get _localName => _blink.BlinkNode.instance.localName_Getter_(this);
   
   @DomName('Node.namespaceURI')
   @DocsEditable()
-  String get _namespaceUri => _blink.BlinkNode.instance.namespaceURI_Getter_(unwrap_jso(this));
+  String get _namespaceUri => _blink.BlinkNode.instance.namespaceURI_Getter_(this);
   
   /**
    * The next sibling node.
@@ -28245,7 +27978,7 @@
    */
   @DomName('Node.nextSibling')
   @DocsEditable()
-  Node get nextNode => wrap_jso(_blink.BlinkNode.instance.nextSibling_Getter_(unwrap_jso(this)));
+  Node get nextNode => _blink.BlinkNode.instance.nextSibling_Getter_(this);
   
   /**
    * The name of this node.
@@ -28260,7 +27993,7 @@
    */
   @DomName('Node.nodeName')
   @DocsEditable()
-  String get nodeName => _blink.BlinkNode.instance.nodeName_Getter_(unwrap_jso(this));
+  String get nodeName => _blink.BlinkNode.instance.nodeName_Getter_(this);
   
   /**
    * The type of node.
@@ -28287,7 +28020,7 @@
    */
   @DomName('Node.nodeType')
   @DocsEditable()
-  int get nodeType => _blink.BlinkNode.instance.nodeType_Getter_(unwrap_jso(this));
+  int get nodeType => _blink.BlinkNode.instance.nodeType_Getter_(this);
   
   /**
    * The value of this node.
@@ -28302,7 +28035,7 @@
    */
   @DomName('Node.nodeValue')
   @DocsEditable()
-  String get nodeValue => _blink.BlinkNode.instance.nodeValue_Getter_(unwrap_jso(this));
+  String get nodeValue => _blink.BlinkNode.instance.nodeValue_Getter_(this);
   
   /**
    * The document this node belongs to.
@@ -28316,7 +28049,7 @@
    */
   @DomName('Node.ownerDocument')
   @DocsEditable()
-  Document get ownerDocument => wrap_jso(_blink.BlinkNode.instance.ownerDocument_Getter_(unwrap_jso(this)));
+  Document get ownerDocument => _blink.BlinkNode.instance.ownerDocument_Getter_(this);
   
   /**
    * The parent element of this node.
@@ -28331,7 +28064,7 @@
    */
   @DomName('Node.parentElement')
   @DocsEditable()
-  Element get parent => wrap_jso(_blink.BlinkNode.instance.parentElement_Getter_(unwrap_jso(this)));
+  Element get parent => _blink.BlinkNode.instance.parentElement_Getter_(this);
   
   /**
    * The parent node of this node.
@@ -28343,7 +28076,7 @@
    */
   @DomName('Node.parentNode')
   @DocsEditable()
-  Node get parentNode => wrap_jso(_blink.BlinkNode.instance.parentNode_Getter_(unwrap_jso(this)));
+  Node get parentNode => _blink.BlinkNode.instance.parentNode_Getter_(this);
   
   /**
    * The previous sibling node.
@@ -28355,7 +28088,7 @@
    */
   @DomName('Node.previousSibling')
   @DocsEditable()
-  Node get previousNode => wrap_jso(_blink.BlinkNode.instance.previousSibling_Getter_(unwrap_jso(this)));
+  Node get previousNode => _blink.BlinkNode.instance.previousSibling_Getter_(this);
   
   /**
    * All text within this node and its decendents.
@@ -28367,7 +28100,7 @@
    */
   @DomName('Node.textContent')
   @DocsEditable()
-  String get text => _blink.BlinkNode.instance.textContent_Getter_(unwrap_jso(this));
+  String get text => _blink.BlinkNode.instance.textContent_Getter_(this);
   
   /**
    * All text within this node and its decendents.
@@ -28379,7 +28112,7 @@
    */
   @DomName('Node.textContent')
   @DocsEditable()
-  set text(String value) => _blink.BlinkNode.instance.textContent_Setter_(unwrap_jso(this), value);
+  set text(String value) => _blink.BlinkNode.instance.textContent_Setter_(this, value);
   
   /**
    * Adds a node to the end of the child [nodes] list of this node.
@@ -28392,7 +28125,7 @@
    */
   @DomName('Node.appendChild')
   @DocsEditable()
-  Node append(Node newChild) => wrap_jso(_blink.BlinkNode.instance.appendChild_Callback_1_(unwrap_jso(this), unwrap_jso(newChild)));
+  Node append(Node node) => _blink.BlinkNode.instance.appendChild_Callback_1_(this, node);
   
   /**
    * Returns a copy of this node.
@@ -28407,7 +28140,7 @@
    */
   @DomName('Node.cloneNode')
   @DocsEditable()
-  Node clone(bool deep) => wrap_jso(_blink.BlinkNode.instance.cloneNode_Callback_1_(unwrap_jso(this), deep));
+  Node clone(bool deep) => _blink.BlinkNode.instance.cloneNode_Callback_1_(this, deep);
   
   /**
    * Returns true if this node contains the specified node.
@@ -28419,7 +28152,7 @@
    */
   @DomName('Node.contains')
   @DocsEditable()
-  bool contains(Node other) => _blink.BlinkNode.instance.contains_Callback_1_(unwrap_jso(this), unwrap_jso(other));
+  bool contains(Node other) => _blink.BlinkNode.instance.contains_Callback_1_(this, other);
   
   /**
    * Returns true if this node has any children.
@@ -28431,7 +28164,7 @@
    */
   @DomName('Node.hasChildNodes')
   @DocsEditable()
-  bool hasChildNodes() => _blink.BlinkNode.instance.hasChildNodes_Callback_0_(unwrap_jso(this));
+  bool hasChildNodes() => _blink.BlinkNode.instance.hasChildNodes_Callback_0_(this);
   
   /**
    * Inserts all of the nodes into this node directly before refChild.
@@ -28443,15 +28176,15 @@
    */
   @DomName('Node.insertBefore')
   @DocsEditable()
-  Node insertBefore(Node newChild, Node refChild) => wrap_jso(_blink.BlinkNode.instance.insertBefore_Callback_2_(unwrap_jso(this), unwrap_jso(newChild), unwrap_jso(refChild)));
+  Node insertBefore(Node node, Node child) => _blink.BlinkNode.instance.insertBefore_Callback_2_(this, node, child);
   
   @DomName('Node.removeChild')
   @DocsEditable()
-  Node _removeChild(Node oldChild) => wrap_jso(_blink.BlinkNode.instance.removeChild_Callback_1_(unwrap_jso(this), unwrap_jso(oldChild)));
+  Node _removeChild(Node child) => _blink.BlinkNode.instance.removeChild_Callback_1_(this, child);
   
   @DomName('Node.replaceChild')
   @DocsEditable()
-  Node _replaceChild(Node newChild, Node oldChild) => wrap_jso(_blink.BlinkNode.instance.replaceChild_Callback_2_(unwrap_jso(this), unwrap_jso(newChild), unwrap_jso(oldChild)));
+  Node _replaceChild(Node node, Node child) => _blink.BlinkNode.instance.replaceChild_Callback_2_(this, node, child);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -28468,21 +28201,13 @@
   // To suppress missing implicit constructor warnings.
   factory NodeFilter._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static NodeFilter internalCreateNodeFilter() {
-    return new NodeFilter._internalWrap();
-  }
 
-  factory NodeFilter._internalWrap() {
-    return new NodeFilter.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   NodeFilter.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('NodeFilter.FILTER_ACCEPT')
   @DocsEditable()
   static const int FILTER_ACCEPT = 1;
@@ -28501,31 +28226,31 @@
 
   @DomName('NodeFilter.SHOW_COMMENT')
   @DocsEditable()
-  static const int SHOW_COMMENT = 0x00000080;
+  static const int SHOW_COMMENT = 0x80;
 
   @DomName('NodeFilter.SHOW_DOCUMENT')
   @DocsEditable()
-  static const int SHOW_DOCUMENT = 0x00000100;
+  static const int SHOW_DOCUMENT = 0x100;
 
   @DomName('NodeFilter.SHOW_DOCUMENT_FRAGMENT')
   @DocsEditable()
-  static const int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
+  static const int SHOW_DOCUMENT_FRAGMENT = 0x400;
 
   @DomName('NodeFilter.SHOW_DOCUMENT_TYPE')
   @DocsEditable()
-  static const int SHOW_DOCUMENT_TYPE = 0x00000200;
+  static const int SHOW_DOCUMENT_TYPE = 0x200;
 
   @DomName('NodeFilter.SHOW_ELEMENT')
   @DocsEditable()
-  static const int SHOW_ELEMENT = 0x00000001;
+  static const int SHOW_ELEMENT = 0x1;
 
   @DomName('NodeFilter.SHOW_PROCESSING_INSTRUCTION')
   @DocsEditable()
-  static const int SHOW_PROCESSING_INSTRUCTION = 0x00000040;
+  static const int SHOW_PROCESSING_INSTRUCTION = 0x40;
 
   @DomName('NodeFilter.SHOW_TEXT')
   @DocsEditable()
-  static const int SHOW_TEXT = 0x00000004;
+  static const int SHOW_TEXT = 0x4;
 
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -28542,48 +28267,40 @@
   // To suppress missing implicit constructor warnings.
   factory NodeIterator._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static NodeIterator internalCreateNodeIterator() {
-    return new NodeIterator._internalWrap();
-  }
 
-  factory NodeIterator._internalWrap() {
-    return new NodeIterator.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   NodeIterator.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('NodeIterator.pointerBeforeReferenceNode')
   @DocsEditable()
-  bool get pointerBeforeReferenceNode => _blink.BlinkNodeIterator.instance.pointerBeforeReferenceNode_Getter_(unwrap_jso(this));
+  bool get pointerBeforeReferenceNode => _blink.BlinkNodeIterator.instance.pointerBeforeReferenceNode_Getter_(this);
   
   @DomName('NodeIterator.referenceNode')
   @DocsEditable()
-  Node get referenceNode => wrap_jso(_blink.BlinkNodeIterator.instance.referenceNode_Getter_(unwrap_jso(this)));
+  Node get referenceNode => _blink.BlinkNodeIterator.instance.referenceNode_Getter_(this);
   
   @DomName('NodeIterator.root')
   @DocsEditable()
-  Node get root => wrap_jso(_blink.BlinkNodeIterator.instance.root_Getter_(unwrap_jso(this)));
+  Node get root => _blink.BlinkNodeIterator.instance.root_Getter_(this);
   
   @DomName('NodeIterator.whatToShow')
   @DocsEditable()
-  int get whatToShow => _blink.BlinkNodeIterator.instance.whatToShow_Getter_(unwrap_jso(this));
+  int get whatToShow => _blink.BlinkNodeIterator.instance.whatToShow_Getter_(this);
   
   @DomName('NodeIterator.detach')
   @DocsEditable()
-  void detach() => _blink.BlinkNodeIterator.instance.detach_Callback_0_(unwrap_jso(this));
+  void detach() => _blink.BlinkNodeIterator.instance.detach_Callback_0_(this);
   
   @DomName('NodeIterator.nextNode')
   @DocsEditable()
-  Node nextNode() => wrap_jso(_blink.BlinkNodeIterator.instance.nextNode_Callback_0_(unwrap_jso(this)));
+  Node nextNode() => _blink.BlinkNodeIterator.instance.nextNode_Callback_0_(this);
   
   @DomName('NodeIterator.previousNode')
   @DocsEditable()
-  Node previousNode() => wrap_jso(_blink.BlinkNodeIterator.instance.previousNode_Callback_0_(unwrap_jso(this)));
+  Node previousNode() => _blink.BlinkNodeIterator.instance.previousNode_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -28599,32 +28316,24 @@
   // To suppress missing implicit constructor warnings.
   factory NodeList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static NodeList internalCreateNodeList() {
-    return new NodeList._internalWrap();
-  }
 
-  factory NodeList._internalWrap() {
-    return new NodeList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   NodeList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('NodeList.length')
   @DocsEditable()
-  int get length => _blink.BlinkNodeList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkNodeList.instance.length_Getter_(this);
   
   Node operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkNodeList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  Node _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkNodeList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Node _nativeIndexedGetter(int index) => (_blink.BlinkNodeList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, Node value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -28666,7 +28375,66 @@
 
   @DomName('NodeList.item')
   @DocsEditable()
-  Node _item(int index) => wrap_jso(_blink.BlinkNodeList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Node _item(int index) => _blink.BlinkNodeList.instance.item_Callback_1_(this, index);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('NonDocumentTypeChildNode')
+@Experimental() // untriaged
+class NonDocumentTypeChildNode extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory NonDocumentTypeChildNode._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  NonDocumentTypeChildNode.internal_() { }
+
+  @DomName('NonDocumentTypeChildNode.nextElementSibling')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Element get nextElementSibling => _blink.BlinkNonDocumentTypeChildNode.instance.nextElementSibling_Getter_(this);
+  
+  @DomName('NonDocumentTypeChildNode.previousElementSibling')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Element get previousElementSibling => _blink.BlinkNonDocumentTypeChildNode.instance.previousElementSibling_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('NonElementParentNode')
+@Experimental() // untriaged
+class NonElementParentNode extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory NonElementParentNode._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  NonElementParentNode.internal_() { }
+
+  @DomName('NonElementParentNode.getElementById')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Element getElementById(String elementId) => _blink.BlinkNonElementParentNode.instance.getElementById_Callback_1_(this, elementId);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -28738,18 +28506,14 @@
   static Notification _factoryNotification(String title, [Map options]) {
     if (options != null) {
       var options_1 = convertDartToNative_Dictionary(options);
-      return wrap_jso(_blink.BlinkNotification.instance.constructorCallback_2_(title, options_1));
+      return _blink.BlinkNotification.instance.constructorCallback_2_(title, options_1);
     }
-    return wrap_jso(_blink.BlinkNotification.instance.constructorCallback_1_(title));
+    return _blink.BlinkNotification.instance.constructorCallback_1_(title);
   }
 
 
   @Deprecated("Internal Use Only")
-  static Notification internalCreateNotification() {
-    return new Notification._internalWrap();
-  }
-
-  external factory Notification._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Notification.internal_() : super.internal_();
@@ -28761,44 +28525,59 @@
   @DomName('Notification.body')
   @DocsEditable()
   @Experimental() // untriaged
-  String get body => _blink.BlinkNotification.instance.body_Getter_(unwrap_jso(this));
+  String get body => _blink.BlinkNotification.instance.body_Getter_(this);
+  
+  @DomName('Notification.data')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object get data => (_blink.BlinkNotification.instance.data_Getter_(this));
   
   @DomName('Notification.dir')
   @DocsEditable()
   @Experimental() // nonstandard
-  String get dir => _blink.BlinkNotification.instance.dir_Getter_(unwrap_jso(this));
+  String get dir => _blink.BlinkNotification.instance.dir_Getter_(this);
   
   @DomName('Notification.icon')
   @DocsEditable()
   @Experimental() // untriaged
-  String get icon => _blink.BlinkNotification.instance.icon_Getter_(unwrap_jso(this));
+  String get icon => _blink.BlinkNotification.instance.icon_Getter_(this);
   
   @DomName('Notification.lang')
   @DocsEditable()
   @Experimental() // untriaged
-  String get lang => _blink.BlinkNotification.instance.lang_Getter_(unwrap_jso(this));
+  String get lang => _blink.BlinkNotification.instance.lang_Getter_(this);
   
   @DomName('Notification.permission')
   @DocsEditable()
   String get permission => _blink.BlinkNotification.instance.permission_Getter_();
   
+  @DomName('Notification.silent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get silent => _blink.BlinkNotification.instance.silent_Getter_(this);
+  
   @DomName('Notification.tag')
   @DocsEditable()
   @Experimental() // nonstandard
-  String get tag => _blink.BlinkNotification.instance.tag_Getter_(unwrap_jso(this));
+  String get tag => _blink.BlinkNotification.instance.tag_Getter_(this);
   
   @DomName('Notification.title')
   @DocsEditable()
   @Experimental() // untriaged
-  String get title => _blink.BlinkNotification.instance.title_Getter_(unwrap_jso(this));
+  String get title => _blink.BlinkNotification.instance.title_Getter_(this);
+  
+  @DomName('Notification.vibrate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<int> get vibrate => _blink.BlinkNotification.instance.vibrate_Getter_(this);
   
   @DomName('Notification.close')
   @DocsEditable()
-  void close() => _blink.BlinkNotification.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkNotification.instance.close_Callback_0_(this);
   
   static void _requestPermission([_NotificationPermissionCallback callback]) {
     if (callback != null) {
-      _blink.BlinkNotification.instance.requestPermission_Callback_1_(unwrap_jso((permission) => callback(permission)));
+      _blink.BlinkNotification.instance.requestPermission_Callback_1_(callback);
       return;
     }
     _blink.BlinkNotification.instance.requestPermission_Callback_0_();
@@ -28840,6 +28619,44 @@
 // WARNING: Do not edit - generated code.
 
 
+@DocsEditable()
+@DomName('NotificationEvent')
+@Experimental() // untriaged
+class NotificationEvent extends ExtendableEvent {
+  // To suppress missing implicit constructor warnings.
+  factory NotificationEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('NotificationEvent.NotificationEvent')
+  @DocsEditable()
+  factory NotificationEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkNotificationEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkNotificationEvent.instance.constructorCallback_1_(type);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  NotificationEvent.internal_() : super.internal_();
+
+
+  @DomName('NotificationEvent.notification')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Notification get notification => _blink.BlinkNotificationEvent.instance.notification_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
 @DomName('NotificationPermissionCallback')
 // http://www.w3.org/TR/notifications/#notificationpermissioncallback
 @Experimental()
@@ -28863,11 +28680,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static OListElement internalCreateOListElement() {
-    return new OListElement._internalWrap();
-  }
-
-  external factory OListElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OListElement.internal_() : super.internal_();
@@ -28881,27 +28694,27 @@
 
   @DomName('HTMLOListElement.reversed')
   @DocsEditable()
-  bool get reversed => _blink.BlinkHTMLOListElement.instance.reversed_Getter_(unwrap_jso(this));
+  bool get reversed => _blink.BlinkHTMLOListElement.instance.reversed_Getter_(this);
   
   @DomName('HTMLOListElement.reversed')
   @DocsEditable()
-  set reversed(bool value) => _blink.BlinkHTMLOListElement.instance.reversed_Setter_(unwrap_jso(this), value);
+  set reversed(bool value) => _blink.BlinkHTMLOListElement.instance.reversed_Setter_(this, value);
   
   @DomName('HTMLOListElement.start')
   @DocsEditable()
-  int get start => _blink.BlinkHTMLOListElement.instance.start_Getter_(unwrap_jso(this));
+  int get start => _blink.BlinkHTMLOListElement.instance.start_Getter_(this);
   
   @DomName('HTMLOListElement.start')
   @DocsEditable()
-  set start(int value) => _blink.BlinkHTMLOListElement.instance.start_Setter_(unwrap_jso(this), value);
+  set start(int value) => _blink.BlinkHTMLOListElement.instance.start_Setter_(this, value);
   
   @DomName('HTMLOListElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLOListElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLOListElement.instance.type_Getter_(this);
   
   @DomName('HTMLOListElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLOListElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLOListElement.instance.type_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -28927,11 +28740,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ObjectElement internalCreateObjectElement() {
-    return new ObjectElement._internalWrap();
-  }
-
-  external factory ObjectElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ObjectElement.internal_() : super.internal_();
@@ -28948,93 +28757,88 @@
 
   @DomName('HTMLObjectElement.data')
   @DocsEditable()
-  String get data => _blink.BlinkHTMLObjectElement.instance.data_Getter_(unwrap_jso(this));
+  String get data => _blink.BlinkHTMLObjectElement.instance.data_Getter_(this);
   
   @DomName('HTMLObjectElement.data')
   @DocsEditable()
-  set data(String value) => _blink.BlinkHTMLObjectElement.instance.data_Setter_(unwrap_jso(this), value);
+  set data(String value) => _blink.BlinkHTMLObjectElement.instance.data_Setter_(this, value);
   
   @DomName('HTMLObjectElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLObjectElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLObjectElement.instance.form_Getter_(this);
   
   @DomName('HTMLObjectElement.height')
   @DocsEditable()
-  String get height => _blink.BlinkHTMLObjectElement.instance.height_Getter_(unwrap_jso(this));
+  String get height => _blink.BlinkHTMLObjectElement.instance.height_Getter_(this);
   
   @DomName('HTMLObjectElement.height')
   @DocsEditable()
-  set height(String value) => _blink.BlinkHTMLObjectElement.instance.height_Setter_(unwrap_jso(this), value);
-  
-  @DomName('HTMLObjectElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLObjectElement.instance.integrity_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLObjectElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLObjectElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  set height(String value) => _blink.BlinkHTMLObjectElement.instance.height_Setter_(this, value);
   
   @DomName('HTMLObjectElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLObjectElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLObjectElement.instance.name_Getter_(this);
   
   @DomName('HTMLObjectElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLObjectElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLObjectElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLObjectElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLObjectElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLObjectElement.instance.type_Getter_(this);
   
   @DomName('HTMLObjectElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLObjectElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLObjectElement.instance.type_Setter_(this, value);
   
   @DomName('HTMLObjectElement.useMap')
   @DocsEditable()
-  String get useMap => _blink.BlinkHTMLObjectElement.instance.useMap_Getter_(unwrap_jso(this));
+  String get useMap => _blink.BlinkHTMLObjectElement.instance.useMap_Getter_(this);
   
   @DomName('HTMLObjectElement.useMap')
   @DocsEditable()
-  set useMap(String value) => _blink.BlinkHTMLObjectElement.instance.useMap_Setter_(unwrap_jso(this), value);
+  set useMap(String value) => _blink.BlinkHTMLObjectElement.instance.useMap_Setter_(this, value);
   
   @DomName('HTMLObjectElement.validationMessage')
   @DocsEditable()
-  String get validationMessage => _blink.BlinkHTMLObjectElement.instance.validationMessage_Getter_(unwrap_jso(this));
+  String get validationMessage => _blink.BlinkHTMLObjectElement.instance.validationMessage_Getter_(this);
   
   @DomName('HTMLObjectElement.validity')
   @DocsEditable()
-  ValidityState get validity => wrap_jso(_blink.BlinkHTMLObjectElement.instance.validity_Getter_(unwrap_jso(this)));
+  ValidityState get validity => _blink.BlinkHTMLObjectElement.instance.validity_Getter_(this);
   
   @DomName('HTMLObjectElement.width')
   @DocsEditable()
-  String get width => _blink.BlinkHTMLObjectElement.instance.width_Getter_(unwrap_jso(this));
+  String get width => _blink.BlinkHTMLObjectElement.instance.width_Getter_(this);
   
   @DomName('HTMLObjectElement.width')
   @DocsEditable()
-  set width(String value) => _blink.BlinkHTMLObjectElement.instance.width_Setter_(unwrap_jso(this), value);
+  set width(String value) => _blink.BlinkHTMLObjectElement.instance.width_Setter_(this, value);
   
   @DomName('HTMLObjectElement.willValidate')
   @DocsEditable()
-  bool get willValidate => _blink.BlinkHTMLObjectElement.instance.willValidate_Getter_(unwrap_jso(this));
+  bool get willValidate => _blink.BlinkHTMLObjectElement.instance.willValidate_Getter_(this);
   
   @DomName('HTMLObjectElement.__getter__')
   @DocsEditable()
-  bool __getter__(index_OR_name) => _blink.BlinkHTMLObjectElement.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
+  bool __getter__(index_OR_name) => _blink.BlinkHTMLObjectElement.instance.$__getter___Callback_1_(this, index_OR_name);
   
   @DomName('HTMLObjectElement.__setter__')
   @DocsEditable()
-  void __setter__(index_OR_name, Node value) => _blink.BlinkHTMLObjectElement.instance.$__setter___Callback_2_(unwrap_jso(this), unwrap_jso(index_OR_name), unwrap_jso(value));
+  void __setter__(index_OR_name, Node value) => _blink.BlinkHTMLObjectElement.instance.$__setter___Callback_2_(this, index_OR_name, value);
   
   @DomName('HTMLObjectElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLObjectElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLObjectElement.instance.checkValidity_Callback_0_(this);
+  
+  @DomName('HTMLObjectElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLObjectElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLObjectElement.setCustomValidity')
   @DocsEditable()
-  void setCustomValidity(String error) => _blink.BlinkHTMLObjectElement.instance.setCustomValidity_Callback_1_(unwrap_jso(this), error);
+  void setCustomValidity(String error) => _blink.BlinkHTMLObjectElement.instance.setCustomValidity_Callback_1_(this, error);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29056,11 +28860,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static OptGroupElement internalCreateOptGroupElement() {
-    return new OptGroupElement._internalWrap();
-  }
-
-  external factory OptGroupElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OptGroupElement.internal_() : super.internal_();
@@ -29074,19 +28874,19 @@
 
   @DomName('HTMLOptGroupElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLOptGroupElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLOptGroupElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLOptGroupElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLOptGroupElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLOptGroupElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLOptGroupElement.label')
   @DocsEditable()
-  String get label => _blink.BlinkHTMLOptGroupElement.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkHTMLOptGroupElement.instance.label_Getter_(this);
   
   @DomName('HTMLOptGroupElement.label')
   @DocsEditable()
-  set label(String value) => _blink.BlinkHTMLOptGroupElement.instance.label_Setter_(unwrap_jso(this), value);
+  set label(String value) => _blink.BlinkHTMLOptGroupElement.instance.label_Setter_(this, value);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -29103,16 +28903,18 @@
   @DomName('HTMLOptionElement.HTMLOptionElement')
   @DocsEditable()
   factory OptionElement._([String data, String value, bool defaultSelected, bool selected]) {
-    return wrap_jso(_blink.BlinkHTMLOptionElement.instance.constructorCallback_4_(data, value, defaultSelected, selected));
+    if (selected != null) {
+      return _blink.BlinkHTMLOptionElement.instance.constructorCallback_4_(data, value, defaultSelected, selected);
+    }
+    if (defaultSelected != null) {
+      return _blink.BlinkHTMLOptionElement.instance.constructorCallback_3_(data, value, defaultSelected);
+    }
+    return _blink.BlinkHTMLOptionElement.instance.constructorCallback_2_(data, value);
   }
 
 
   @Deprecated("Internal Use Only")
-  static OptionElement internalCreateOptionElement() {
-    return new OptionElement._internalWrap();
-  }
-
-  external factory OptionElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OptionElement.internal_() : super.internal_();
@@ -29126,51 +28928,51 @@
 
   @DomName('HTMLOptionElement.defaultSelected')
   @DocsEditable()
-  bool get defaultSelected => _blink.BlinkHTMLOptionElement.instance.defaultSelected_Getter_(unwrap_jso(this));
+  bool get defaultSelected => _blink.BlinkHTMLOptionElement.instance.defaultSelected_Getter_(this);
   
   @DomName('HTMLOptionElement.defaultSelected')
   @DocsEditable()
-  set defaultSelected(bool value) => _blink.BlinkHTMLOptionElement.instance.defaultSelected_Setter_(unwrap_jso(this), value);
+  set defaultSelected(bool value) => _blink.BlinkHTMLOptionElement.instance.defaultSelected_Setter_(this, value);
   
   @DomName('HTMLOptionElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLOptionElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLOptionElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLOptionElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLOptionElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLOptionElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLOptionElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLOptionElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLOptionElement.instance.form_Getter_(this);
   
   @DomName('HTMLOptionElement.index')
   @DocsEditable()
-  int get index => _blink.BlinkHTMLOptionElement.instance.index_Getter_(unwrap_jso(this));
+  int get index => _blink.BlinkHTMLOptionElement.instance.index_Getter_(this);
   
   @DomName('HTMLOptionElement.label')
   @DocsEditable()
-  String get label => _blink.BlinkHTMLOptionElement.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkHTMLOptionElement.instance.label_Getter_(this);
   
   @DomName('HTMLOptionElement.label')
   @DocsEditable()
-  set label(String value) => _blink.BlinkHTMLOptionElement.instance.label_Setter_(unwrap_jso(this), value);
+  set label(String value) => _blink.BlinkHTMLOptionElement.instance.label_Setter_(this, value);
   
   @DomName('HTMLOptionElement.selected')
   @DocsEditable()
-  bool get selected => _blink.BlinkHTMLOptionElement.instance.selected_Getter_(unwrap_jso(this));
+  bool get selected => _blink.BlinkHTMLOptionElement.instance.selected_Getter_(this);
   
   @DomName('HTMLOptionElement.selected')
   @DocsEditable()
-  set selected(bool value) => _blink.BlinkHTMLOptionElement.instance.selected_Setter_(unwrap_jso(this), value);
+  set selected(bool value) => _blink.BlinkHTMLOptionElement.instance.selected_Setter_(this, value);
   
   @DomName('HTMLOptionElement.value')
   @DocsEditable()
-  String get value => _blink.BlinkHTMLOptionElement.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkHTMLOptionElement.instance.value_Getter_(this);
   
   @DomName('HTMLOptionElement.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkHTMLOptionElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkHTMLOptionElement.instance.value_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29195,11 +28997,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static OutputElement internalCreateOutputElement() {
-    return new OutputElement._internalWrap();
-  }
-
-  external factory OutputElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OutputElement.internal_() : super.internal_();
@@ -29216,115 +29014,69 @@
 
   @DomName('HTMLOutputElement.defaultValue')
   @DocsEditable()
-  String get defaultValue => _blink.BlinkHTMLOutputElement.instance.defaultValue_Getter_(unwrap_jso(this));
+  String get defaultValue => _blink.BlinkHTMLOutputElement.instance.defaultValue_Getter_(this);
   
   @DomName('HTMLOutputElement.defaultValue')
   @DocsEditable()
-  set defaultValue(String value) => _blink.BlinkHTMLOutputElement.instance.defaultValue_Setter_(unwrap_jso(this), value);
+  set defaultValue(String value) => _blink.BlinkHTMLOutputElement.instance.defaultValue_Setter_(this, value);
   
   @DomName('HTMLOutputElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLOutputElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLOutputElement.instance.form_Getter_(this);
   
   @DomName('HTMLOutputElement.htmlFor')
   @DocsEditable()
-  DomSettableTokenList get htmlFor => wrap_jso(_blink.BlinkHTMLOutputElement.instance.htmlFor_Getter_(unwrap_jso(this)));
+  DomSettableTokenList get htmlFor => _blink.BlinkHTMLOutputElement.instance.htmlFor_Getter_(this);
   
   @DomName('HTMLOutputElement.labels')
   @DocsEditable()
   @Unstable()
-  List<Node> get labels => wrap_jso(_blink.BlinkHTMLOutputElement.instance.labels_Getter_(unwrap_jso(this)));
+  List<Node> get labels => (_blink.BlinkHTMLOutputElement.instance.labels_Getter_(this));
   
   @DomName('HTMLOutputElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLOutputElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLOutputElement.instance.name_Getter_(this);
   
   @DomName('HTMLOutputElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLOutputElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLOutputElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLOutputElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLOutputElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLOutputElement.instance.type_Getter_(this);
   
   @DomName('HTMLOutputElement.validationMessage')
   @DocsEditable()
-  String get validationMessage => _blink.BlinkHTMLOutputElement.instance.validationMessage_Getter_(unwrap_jso(this));
+  String get validationMessage => _blink.BlinkHTMLOutputElement.instance.validationMessage_Getter_(this);
   
   @DomName('HTMLOutputElement.validity')
   @DocsEditable()
-  ValidityState get validity => wrap_jso(_blink.BlinkHTMLOutputElement.instance.validity_Getter_(unwrap_jso(this)));
+  ValidityState get validity => _blink.BlinkHTMLOutputElement.instance.validity_Getter_(this);
   
   @DomName('HTMLOutputElement.value')
   @DocsEditable()
-  String get value => _blink.BlinkHTMLOutputElement.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkHTMLOutputElement.instance.value_Getter_(this);
   
   @DomName('HTMLOutputElement.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkHTMLOutputElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkHTMLOutputElement.instance.value_Setter_(this, value);
   
   @DomName('HTMLOutputElement.willValidate')
   @DocsEditable()
-  bool get willValidate => _blink.BlinkHTMLOutputElement.instance.willValidate_Getter_(unwrap_jso(this));
+  bool get willValidate => _blink.BlinkHTMLOutputElement.instance.willValidate_Getter_(this);
   
   @DomName('HTMLOutputElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLOutputElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLOutputElement.instance.checkValidity_Callback_0_(this);
+  
+  @DomName('HTMLOutputElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLOutputElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLOutputElement.setCustomValidity')
   @DocsEditable()
-  void setCustomValidity(String error) => _blink.BlinkHTMLOutputElement.instance.setCustomValidity_Callback_1_(unwrap_jso(this), error);
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('OverflowEvent')
-@Experimental() // nonstandard
-class OverflowEvent extends Event {
-  // To suppress missing implicit constructor warnings.
-  factory OverflowEvent._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static OverflowEvent internalCreateOverflowEvent() {
-    return new OverflowEvent._internalWrap();
-  }
-
-  external factory OverflowEvent._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  OverflowEvent.internal_() : super.internal_();
-
-
-  @DomName('OverflowEvent.BOTH')
-  @DocsEditable()
-  static const int BOTH = 2;
-
-  @DomName('OverflowEvent.HORIZONTAL')
-  @DocsEditable()
-  static const int HORIZONTAL = 0;
-
-  @DomName('OverflowEvent.VERTICAL')
-  @DocsEditable()
-  static const int VERTICAL = 1;
-
-  @DomName('OverflowEvent.horizontalOverflow')
-  @DocsEditable()
-  bool get horizontalOverflow => _blink.BlinkOverflowEvent.instance.horizontalOverflow_Getter_(unwrap_jso(this));
-  
-  @DomName('OverflowEvent.orient')
-  @DocsEditable()
-  int get orient => _blink.BlinkOverflowEvent.instance.orient_Getter_(unwrap_jso(this));
-  
-  @DomName('OverflowEvent.verticalOverflow')
-  @DocsEditable()
-  bool get verticalOverflow => _blink.BlinkOverflowEvent.instance.verticalOverflow_Getter_(unwrap_jso(this));
+  void setCustomValidity(String error) => _blink.BlinkHTMLOutputElement.instance.setCustomValidity_Callback_1_(this, error);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29342,13 +29094,19 @@
   // To suppress missing implicit constructor warnings.
   factory PageTransitionEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static PageTransitionEvent internalCreatePageTransitionEvent() {
-    return new PageTransitionEvent._internalWrap();
+  @DomName('PageTransitionEvent.PageTransitionEvent')
+  @DocsEditable()
+  factory PageTransitionEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkPageTransitionEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkPageTransitionEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory PageTransitionEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PageTransitionEvent.internal_() : super.internal_();
@@ -29356,7 +29114,7 @@
 
   @DomName('PageTransitionEvent.persisted')
   @DocsEditable()
-  bool get persisted => _blink.BlinkPageTransitionEvent.instance.persisted_Getter_(unwrap_jso(this));
+  bool get persisted => _blink.BlinkPageTransitionEvent.instance.persisted_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29378,11 +29136,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ParagraphElement internalCreateParagraphElement() {
-    return new ParagraphElement._internalWrap();
-  }
-
-  external factory ParagraphElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ParagraphElement.internal_() : super.internal_();
@@ -29415,11 +29169,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ParamElement internalCreateParamElement() {
-    return new ParamElement._internalWrap();
-  }
-
-  external factory ParamElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ParamElement.internal_() : super.internal_();
@@ -29433,19 +29183,19 @@
 
   @DomName('HTMLParamElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLParamElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLParamElement.instance.name_Getter_(this);
   
   @DomName('HTMLParamElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLParamElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLParamElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLParamElement.value')
   @DocsEditable()
-  String get value => _blink.BlinkHTMLParamElement.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkHTMLParamElement.instance.value_Getter_(this);
   
   @DomName('HTMLParamElement.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkHTMLParamElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkHTMLParamElement.instance.value_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29501,6 +29251,51 @@
 
 
 @DocsEditable()
+@DomName('PasswordCredential')
+@Experimental() // untriaged
+class PasswordCredential extends Credential {
+  // To suppress missing implicit constructor warnings.
+  factory PasswordCredential._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PasswordCredential.PasswordCredential')
+  @DocsEditable()
+  factory PasswordCredential(String id, String password, [String name, String iconURL]) {
+    if (iconURL != null) {
+      return _blink.BlinkPasswordCredential.instance.constructorCallback_4_(id, password, name, iconURL);
+    }
+    if (name != null) {
+      return _blink.BlinkPasswordCredential.instance.constructorCallback_3_(id, password, name);
+    }
+    return _blink.BlinkPasswordCredential.instance.constructorCallback_2_(id, password);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PasswordCredential.internal_() : super.internal_();
+
+
+  @DomName('PasswordCredential.formData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  FormData get formData => _blink.BlinkPasswordCredential.instance.formData_Getter_(this);
+  
+  @DomName('PasswordCredential.password')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get password => _blink.BlinkPasswordCredential.instance.password_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('Path2D')
 @Experimental() // untriaged
 class Path2D extends DartHtmlDomObject implements _CanvasPathMethods {
@@ -29511,85 +29306,77 @@
   @DocsEditable()
   factory Path2D([path_OR_text]) {
     if (path_OR_text == null) {
-      return wrap_jso(_blink.BlinkPath2D.instance.constructorCallback_0_());
+      return _blink.BlinkPath2D.instance.constructorCallback_0_();
     }
     if ((path_OR_text is Path2D || path_OR_text == null)) {
-      return wrap_jso(_blink.BlinkPath2D.instance.constructorCallback_1_(path_OR_text));
+      return _blink.BlinkPath2D.instance.constructorCallback_1_(path_OR_text);
     }
     if ((path_OR_text is String || path_OR_text == null)) {
-      return wrap_jso(_blink.BlinkPath2D.instance.constructorCallback_1_(path_OR_text));
+      return _blink.BlinkPath2D.instance.constructorCallback_1_(path_OR_text);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @Deprecated("Internal Use Only")
-  static Path2D internalCreatePath2D() {
-    return new Path2D._internalWrap();
-  }
 
-  factory Path2D._internalWrap() {
-    return new Path2D.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Path2D.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   void addPath(Path2D path, [Matrix transform]) {
     if (transform != null) {
-      _blink.BlinkPath2D.instance.addPath_Callback_2_(unwrap_jso(this), unwrap_jso(path), unwrap_jso(transform));
+      _blink.BlinkPath2D.instance.addPath_Callback_2_(this, path, transform);
       return;
     }
-    _blink.BlinkPath2D.instance.addPath_Callback_1_(unwrap_jso(this), unwrap_jso(path));
+    _blink.BlinkPath2D.instance.addPath_Callback_1_(this, path);
     return;
   }
 
   @DomName('Path2D.arc')
   @DocsEditable()
   @Experimental() // untriaged
-  void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise) => _blink.BlinkPath2D.instance.arc_Callback_6_(unwrap_jso(this), x, y, radius, startAngle, endAngle, anticlockwise);
+  void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise) => _blink.BlinkPath2D.instance.arc_Callback_6_(this, x, y, radius, startAngle, endAngle, anticlockwise);
   
   @DomName('Path2D.arcTo')
   @DocsEditable()
   @Experimental() // untriaged
-  void arcTo(num x1, num y1, num x2, num y2, num radius) => _blink.BlinkPath2D.instance.arcTo_Callback_5_(unwrap_jso(this), x1, y1, x2, y2, radius);
+  void arcTo(num x1, num y1, num x2, num y2, num radius) => _blink.BlinkPath2D.instance.arcTo_Callback_5_(this, x1, y1, x2, y2, radius);
   
   @DomName('Path2D.bezierCurveTo')
   @DocsEditable()
   @Experimental() // untriaged
-  void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) => _blink.BlinkPath2D.instance.bezierCurveTo_Callback_6_(unwrap_jso(this), cp1x, cp1y, cp2x, cp2y, x, y);
+  void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) => _blink.BlinkPath2D.instance.bezierCurveTo_Callback_6_(this, cp1x, cp1y, cp2x, cp2y, x, y);
   
   @DomName('Path2D.closePath')
   @DocsEditable()
   @Experimental() // untriaged
-  void closePath() => _blink.BlinkPath2D.instance.closePath_Callback_0_(unwrap_jso(this));
+  void closePath() => _blink.BlinkPath2D.instance.closePath_Callback_0_(this);
   
   @DomName('Path2D.ellipse')
   @DocsEditable()
   @Experimental() // untriaged
-  void ellipse(num x, num y, num radiusX, num radiusY, num rotation, num startAngle, num endAngle, bool anticlockwise) => _blink.BlinkPath2D.instance.ellipse_Callback_8_(unwrap_jso(this), x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
+  void ellipse(num x, num y, num radiusX, num radiusY, num rotation, num startAngle, num endAngle, bool anticlockwise) => _blink.BlinkPath2D.instance.ellipse_Callback_8_(this, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
   
   @DomName('Path2D.lineTo')
   @DocsEditable()
   @Experimental() // untriaged
-  void lineTo(num x, num y) => _blink.BlinkPath2D.instance.lineTo_Callback_2_(unwrap_jso(this), x, y);
+  void lineTo(num x, num y) => _blink.BlinkPath2D.instance.lineTo_Callback_2_(this, x, y);
   
   @DomName('Path2D.moveTo')
   @DocsEditable()
   @Experimental() // untriaged
-  void moveTo(num x, num y) => _blink.BlinkPath2D.instance.moveTo_Callback_2_(unwrap_jso(this), x, y);
+  void moveTo(num x, num y) => _blink.BlinkPath2D.instance.moveTo_Callback_2_(this, x, y);
   
   @DomName('Path2D.quadraticCurveTo')
   @DocsEditable()
   @Experimental() // untriaged
-  void quadraticCurveTo(num cpx, num cpy, num x, num y) => _blink.BlinkPath2D.instance.quadraticCurveTo_Callback_4_(unwrap_jso(this), cpx, cpy, x, y);
+  void quadraticCurveTo(num cpx, num cpy, num x, num y) => _blink.BlinkPath2D.instance.quadraticCurveTo_Callback_4_(this, cpx, cpy, x, y);
   
   @DomName('Path2D.rect')
   @DocsEditable()
   @Experimental() // untriaged
-  void rect(num x, num y, num width, num height) => _blink.BlinkPath2D.instance.rect_Callback_4_(unwrap_jso(this), x, y, width, height);
+  void rect(num x, num y, num width, num height) => _blink.BlinkPath2D.instance.rect_Callback_4_(this, x, y, width, height);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29624,11 +29411,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Performance internalCreatePerformance() {
-    return new Performance._internalWrap();
-  }
-
-  external factory Performance._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Performance.internal_() : super.internal_();
@@ -29640,61 +29423,71 @@
   @DomName('Performance.memory')
   @DocsEditable()
   @Experimental() // nonstandard
-  MemoryInfo get memory => wrap_jso(_blink.BlinkPerformance.instance.memory_Getter_(unwrap_jso(this)));
+  MemoryInfo get memory => _blink.BlinkPerformance.instance.memory_Getter_(this);
   
   @DomName('Performance.navigation')
   @DocsEditable()
-  PerformanceNavigation get navigation => wrap_jso(_blink.BlinkPerformance.instance.navigation_Getter_(unwrap_jso(this)));
+  PerformanceNavigation get navigation => _blink.BlinkPerformance.instance.navigation_Getter_(this);
   
   @DomName('Performance.timing')
   @DocsEditable()
-  PerformanceTiming get timing => wrap_jso(_blink.BlinkPerformance.instance.timing_Getter_(unwrap_jso(this)));
+  PerformanceTiming get timing => _blink.BlinkPerformance.instance.timing_Getter_(this);
+  
+  @DomName('Performance.clearFrameTimings')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearFrameTimings() => _blink.BlinkPerformance.instance.clearFrameTimings_Callback_0_(this);
   
   @DomName('Performance.clearMarks')
   @DocsEditable()
   // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/UserTiming/Overview.html#extensions-performance-interface
   @Experimental()
-  void clearMarks(String markName) => _blink.BlinkPerformance.instance.clearMarks_Callback_1_(unwrap_jso(this), markName);
+  void clearMarks(String markName) => _blink.BlinkPerformance.instance.clearMarks_Callback_1_(this, markName);
   
   @DomName('Performance.clearMeasures')
   @DocsEditable()
   // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/UserTiming/Overview.html#extensions-performance-interface
   @Experimental()
-  void clearMeasures(String measureName) => _blink.BlinkPerformance.instance.clearMeasures_Callback_1_(unwrap_jso(this), measureName);
+  void clearMeasures(String measureName) => _blink.BlinkPerformance.instance.clearMeasures_Callback_1_(this, measureName);
   
   @DomName('Performance.getEntries')
   @DocsEditable()
   // http://www.w3.org/TR/performance-timeline/#sec-window.performance-attribute
   @Experimental()
-  List<PerformanceEntry> getEntries() => wrap_jso(_blink.BlinkPerformance.instance.getEntries_Callback_0_(unwrap_jso(this)));
+  List<PerformanceEntry> getEntries() => (_blink.BlinkPerformance.instance.getEntries_Callback_0_(this));
   
   @DomName('Performance.getEntriesByName')
   @DocsEditable()
   // http://www.w3.org/TR/performance-timeline/#sec-window.performance-attribute
   @Experimental()
-  List<PerformanceEntry> getEntriesByName(String name, String entryType) => wrap_jso(_blink.BlinkPerformance.instance.getEntriesByName_Callback_2_(unwrap_jso(this), name, entryType));
+  List<PerformanceEntry> getEntriesByName(String name, String entryType) => (_blink.BlinkPerformance.instance.getEntriesByName_Callback_2_(this, name, entryType));
   
   @DomName('Performance.getEntriesByType')
   @DocsEditable()
   // http://www.w3.org/TR/performance-timeline/#sec-window.performance-attribute
   @Experimental()
-  List<PerformanceEntry> getEntriesByType(String entryType) => wrap_jso(_blink.BlinkPerformance.instance.getEntriesByType_Callback_1_(unwrap_jso(this), entryType));
+  List<PerformanceEntry> getEntriesByType(String entryType) => (_blink.BlinkPerformance.instance.getEntriesByType_Callback_1_(this, entryType));
   
   @DomName('Performance.mark')
   @DocsEditable()
   // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/UserTiming/Overview.html#extensions-performance-interface
   @Experimental()
-  void mark(String markName) => _blink.BlinkPerformance.instance.mark_Callback_1_(unwrap_jso(this), markName);
+  void mark(String markName) => _blink.BlinkPerformance.instance.mark_Callback_1_(this, markName);
   
   @DomName('Performance.measure')
   @DocsEditable()
   // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/UserTiming/Overview.html#extensions-performance-interface
   @Experimental()
-  void measure(String measureName, String startMark, String endMark) => _blink.BlinkPerformance.instance.measure_Callback_3_(unwrap_jso(this), measureName, startMark, endMark);
+  void measure(String measureName, String startMark, String endMark) => _blink.BlinkPerformance.instance.measure_Callback_3_(this, measureName, startMark, endMark);
   
   @DomName('Performance.now')
   @DocsEditable()
-  num now() => _blink.BlinkPerformance.instance.now_Callback_0_(unwrap_jso(this));
+  num now() => _blink.BlinkPerformance.instance.now_Callback_0_(this);
+  
+  @DomName('Performance.setFrameTimingBufferSize')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void setFrameTimingBufferSize(int maxSize) => _blink.BlinkPerformance.instance.setFrameTimingBufferSize_Callback_1_(this, maxSize);
   
   @DomName('Performance.webkitClearResourceTimings')
   @DocsEditable()
@@ -29702,7 +29495,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // http://www.w3c-test.org/webperf/specs/ResourceTiming/#extensions-performance-interface
-  void clearResourceTimings() => _blink.BlinkPerformance.instance.webkitClearResourceTimings_Callback_0_(unwrap_jso(this));
+  void clearResourceTimings() => _blink.BlinkPerformance.instance.webkitClearResourceTimings_Callback_0_(this);
   
   @DomName('Performance.webkitSetResourceTimingBufferSize')
   @DocsEditable()
@@ -29710,7 +29503,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // http://www.w3c-test.org/webperf/specs/ResourceTiming/#performanceresourcetiming-methods
-  void setResourceTimingBufferSize(int maxSize) => _blink.BlinkPerformance.instance.webkitSetResourceTimingBufferSize_Callback_1_(unwrap_jso(this), maxSize);
+  void setResourceTimingBufferSize(int maxSize) => _blink.BlinkPerformance.instance.webkitSetResourceTimingBufferSize_Callback_1_(this, maxSize);
   
   /// Stream of `resourcetimingbufferfull` events handled by this [Performance].
   @DomName('Performance.onwebkitresourcetimingbufferfull')
@@ -29728,6 +29521,34 @@
 
 
 @DocsEditable()
+@DomName('PerformanceCompositeTiming')
+@Experimental() // untriaged
+class PerformanceCompositeTiming extends PerformanceEntry {
+  // To suppress missing implicit constructor warnings.
+  factory PerformanceCompositeTiming._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PerformanceCompositeTiming.internal_() : super.internal_();
+
+
+  @DomName('PerformanceCompositeTiming.sourceFrame')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get sourceFrame => _blink.BlinkPerformanceCompositeTiming.instance.sourceFrame_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('PerformanceEntry')
 // http://www.w3.org/TR/performance-timeline/#sec-PerformanceEntry-interface
 @Experimental()
@@ -29735,36 +29556,28 @@
   // To suppress missing implicit constructor warnings.
   factory PerformanceEntry._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PerformanceEntry internalCreatePerformanceEntry() {
-    return new PerformanceEntry._internalWrap();
-  }
 
-  factory PerformanceEntry._internalWrap() {
-    return new PerformanceEntry.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PerformanceEntry.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('PerformanceEntry.duration')
   @DocsEditable()
-  num get duration => _blink.BlinkPerformanceEntry.instance.duration_Getter_(unwrap_jso(this));
+  num get duration => _blink.BlinkPerformanceEntry.instance.duration_Getter_(this);
   
   @DomName('PerformanceEntry.entryType')
   @DocsEditable()
-  String get entryType => _blink.BlinkPerformanceEntry.instance.entryType_Getter_(unwrap_jso(this));
+  String get entryType => _blink.BlinkPerformanceEntry.instance.entryType_Getter_(this);
   
   @DomName('PerformanceEntry.name')
   @DocsEditable()
-  String get name => _blink.BlinkPerformanceEntry.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkPerformanceEntry.instance.name_Getter_(this);
   
   @DomName('PerformanceEntry.startTime')
   @DocsEditable()
-  num get startTime => _blink.BlinkPerformanceEntry.instance.startTime_Getter_(unwrap_jso(this));
+  num get startTime => _blink.BlinkPerformanceEntry.instance.startTime_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29784,11 +29597,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PerformanceMark internalCreatePerformanceMark() {
-    return new PerformanceMark._internalWrap();
-  }
-
-  external factory PerformanceMark._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PerformanceMark.internal_() : super.internal_();
@@ -29812,11 +29621,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PerformanceMeasure internalCreatePerformanceMeasure() {
-    return new PerformanceMeasure._internalWrap();
-  }
-
-  external factory PerformanceMeasure._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PerformanceMeasure.internal_() : super.internal_();
@@ -29837,21 +29642,13 @@
   // To suppress missing implicit constructor warnings.
   factory PerformanceNavigation._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PerformanceNavigation internalCreatePerformanceNavigation() {
-    return new PerformanceNavigation._internalWrap();
-  }
 
-  factory PerformanceNavigation._internalWrap() {
-    return new PerformanceNavigation.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PerformanceNavigation.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('PerformanceNavigation.TYPE_BACK_FORWARD')
   @DocsEditable()
   static const int TYPE_BACK_FORWARD = 2;
@@ -29870,11 +29667,39 @@
 
   @DomName('PerformanceNavigation.redirectCount')
   @DocsEditable()
-  int get redirectCount => _blink.BlinkPerformanceNavigation.instance.redirectCount_Getter_(unwrap_jso(this));
+  int get redirectCount => _blink.BlinkPerformanceNavigation.instance.redirectCount_Getter_(this);
   
   @DomName('PerformanceNavigation.type')
   @DocsEditable()
-  int get type => _blink.BlinkPerformanceNavigation.instance.type_Getter_(unwrap_jso(this));
+  int get type => _blink.BlinkPerformanceNavigation.instance.type_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PerformanceRenderTiming')
+@Experimental() // untriaged
+class PerformanceRenderTiming extends PerformanceEntry {
+  // To suppress missing implicit constructor warnings.
+  factory PerformanceRenderTiming._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PerformanceRenderTiming.internal_() : super.internal_();
+
+
+  @DomName('PerformanceRenderTiming.sourceFrame')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get sourceFrame => _blink.BlinkPerformanceRenderTiming.instance.sourceFrame_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29894,11 +29719,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PerformanceResourceTiming internalCreatePerformanceResourceTiming() {
-    return new PerformanceResourceTiming._internalWrap();
-  }
-
-  external factory PerformanceResourceTiming._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PerformanceResourceTiming.internal_() : super.internal_();
@@ -29906,54 +29727,59 @@
 
   @DomName('PerformanceResourceTiming.connectEnd')
   @DocsEditable()
-  num get connectEnd => _blink.BlinkPerformanceResourceTiming.instance.connectEnd_Getter_(unwrap_jso(this));
+  num get connectEnd => _blink.BlinkPerformanceResourceTiming.instance.connectEnd_Getter_(this);
   
   @DomName('PerformanceResourceTiming.connectStart')
   @DocsEditable()
-  num get connectStart => _blink.BlinkPerformanceResourceTiming.instance.connectStart_Getter_(unwrap_jso(this));
+  num get connectStart => _blink.BlinkPerformanceResourceTiming.instance.connectStart_Getter_(this);
   
   @DomName('PerformanceResourceTiming.domainLookupEnd')
   @DocsEditable()
-  num get domainLookupEnd => _blink.BlinkPerformanceResourceTiming.instance.domainLookupEnd_Getter_(unwrap_jso(this));
+  num get domainLookupEnd => _blink.BlinkPerformanceResourceTiming.instance.domainLookupEnd_Getter_(this);
   
   @DomName('PerformanceResourceTiming.domainLookupStart')
   @DocsEditable()
-  num get domainLookupStart => _blink.BlinkPerformanceResourceTiming.instance.domainLookupStart_Getter_(unwrap_jso(this));
+  num get domainLookupStart => _blink.BlinkPerformanceResourceTiming.instance.domainLookupStart_Getter_(this);
   
   @DomName('PerformanceResourceTiming.fetchStart')
   @DocsEditable()
-  num get fetchStart => _blink.BlinkPerformanceResourceTiming.instance.fetchStart_Getter_(unwrap_jso(this));
+  num get fetchStart => _blink.BlinkPerformanceResourceTiming.instance.fetchStart_Getter_(this);
   
   @DomName('PerformanceResourceTiming.initiatorType')
   @DocsEditable()
-  String get initiatorType => _blink.BlinkPerformanceResourceTiming.instance.initiatorType_Getter_(unwrap_jso(this));
+  String get initiatorType => _blink.BlinkPerformanceResourceTiming.instance.initiatorType_Getter_(this);
   
   @DomName('PerformanceResourceTiming.redirectEnd')
   @DocsEditable()
-  num get redirectEnd => _blink.BlinkPerformanceResourceTiming.instance.redirectEnd_Getter_(unwrap_jso(this));
+  num get redirectEnd => _blink.BlinkPerformanceResourceTiming.instance.redirectEnd_Getter_(this);
   
   @DomName('PerformanceResourceTiming.redirectStart')
   @DocsEditable()
-  num get redirectStart => _blink.BlinkPerformanceResourceTiming.instance.redirectStart_Getter_(unwrap_jso(this));
+  num get redirectStart => _blink.BlinkPerformanceResourceTiming.instance.redirectStart_Getter_(this);
   
   @DomName('PerformanceResourceTiming.requestStart')
   @DocsEditable()
   @Experimental() // nonstandard
-  num get requestStart => _blink.BlinkPerformanceResourceTiming.instance.requestStart_Getter_(unwrap_jso(this));
+  num get requestStart => _blink.BlinkPerformanceResourceTiming.instance.requestStart_Getter_(this);
   
   @DomName('PerformanceResourceTiming.responseEnd')
   @DocsEditable()
   @Experimental() // nonstandard
-  num get responseEnd => _blink.BlinkPerformanceResourceTiming.instance.responseEnd_Getter_(unwrap_jso(this));
+  num get responseEnd => _blink.BlinkPerformanceResourceTiming.instance.responseEnd_Getter_(this);
   
   @DomName('PerformanceResourceTiming.responseStart')
   @DocsEditable()
   @Experimental() // nonstandard
-  num get responseStart => _blink.BlinkPerformanceResourceTiming.instance.responseStart_Getter_(unwrap_jso(this));
+  num get responseStart => _blink.BlinkPerformanceResourceTiming.instance.responseStart_Getter_(this);
   
   @DomName('PerformanceResourceTiming.secureConnectionStart')
   @DocsEditable()
-  num get secureConnectionStart => _blink.BlinkPerformanceResourceTiming.instance.secureConnectionStart_Getter_(unwrap_jso(this));
+  num get secureConnectionStart => _blink.BlinkPerformanceResourceTiming.instance.secureConnectionStart_Getter_(this);
+  
+  @DomName('PerformanceResourceTiming.workerStart')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get workerStart => _blink.BlinkPerformanceResourceTiming.instance.workerStart_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29970,104 +29796,297 @@
   // To suppress missing implicit constructor warnings.
   factory PerformanceTiming._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PerformanceTiming internalCreatePerformanceTiming() {
-    return new PerformanceTiming._internalWrap();
-  }
 
-  factory PerformanceTiming._internalWrap() {
-    return new PerformanceTiming.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PerformanceTiming.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('PerformanceTiming.connectEnd')
   @DocsEditable()
-  int get connectEnd => _blink.BlinkPerformanceTiming.instance.connectEnd_Getter_(unwrap_jso(this));
+  int get connectEnd => _blink.BlinkPerformanceTiming.instance.connectEnd_Getter_(this);
   
   @DomName('PerformanceTiming.connectStart')
   @DocsEditable()
-  int get connectStart => _blink.BlinkPerformanceTiming.instance.connectStart_Getter_(unwrap_jso(this));
+  int get connectStart => _blink.BlinkPerformanceTiming.instance.connectStart_Getter_(this);
   
   @DomName('PerformanceTiming.domComplete')
   @DocsEditable()
-  int get domComplete => _blink.BlinkPerformanceTiming.instance.domComplete_Getter_(unwrap_jso(this));
+  int get domComplete => _blink.BlinkPerformanceTiming.instance.domComplete_Getter_(this);
   
   @DomName('PerformanceTiming.domContentLoadedEventEnd')
   @DocsEditable()
-  int get domContentLoadedEventEnd => _blink.BlinkPerformanceTiming.instance.domContentLoadedEventEnd_Getter_(unwrap_jso(this));
+  int get domContentLoadedEventEnd => _blink.BlinkPerformanceTiming.instance.domContentLoadedEventEnd_Getter_(this);
   
   @DomName('PerformanceTiming.domContentLoadedEventStart')
   @DocsEditable()
-  int get domContentLoadedEventStart => _blink.BlinkPerformanceTiming.instance.domContentLoadedEventStart_Getter_(unwrap_jso(this));
+  int get domContentLoadedEventStart => _blink.BlinkPerformanceTiming.instance.domContentLoadedEventStart_Getter_(this);
   
   @DomName('PerformanceTiming.domInteractive')
   @DocsEditable()
-  int get domInteractive => _blink.BlinkPerformanceTiming.instance.domInteractive_Getter_(unwrap_jso(this));
+  int get domInteractive => _blink.BlinkPerformanceTiming.instance.domInteractive_Getter_(this);
   
   @DomName('PerformanceTiming.domLoading')
   @DocsEditable()
-  int get domLoading => _blink.BlinkPerformanceTiming.instance.domLoading_Getter_(unwrap_jso(this));
+  int get domLoading => _blink.BlinkPerformanceTiming.instance.domLoading_Getter_(this);
   
   @DomName('PerformanceTiming.domainLookupEnd')
   @DocsEditable()
-  int get domainLookupEnd => _blink.BlinkPerformanceTiming.instance.domainLookupEnd_Getter_(unwrap_jso(this));
+  int get domainLookupEnd => _blink.BlinkPerformanceTiming.instance.domainLookupEnd_Getter_(this);
   
   @DomName('PerformanceTiming.domainLookupStart')
   @DocsEditable()
-  int get domainLookupStart => _blink.BlinkPerformanceTiming.instance.domainLookupStart_Getter_(unwrap_jso(this));
+  int get domainLookupStart => _blink.BlinkPerformanceTiming.instance.domainLookupStart_Getter_(this);
   
   @DomName('PerformanceTiming.fetchStart')
   @DocsEditable()
-  int get fetchStart => _blink.BlinkPerformanceTiming.instance.fetchStart_Getter_(unwrap_jso(this));
+  int get fetchStart => _blink.BlinkPerformanceTiming.instance.fetchStart_Getter_(this);
   
   @DomName('PerformanceTiming.loadEventEnd')
   @DocsEditable()
-  int get loadEventEnd => _blink.BlinkPerformanceTiming.instance.loadEventEnd_Getter_(unwrap_jso(this));
+  int get loadEventEnd => _blink.BlinkPerformanceTiming.instance.loadEventEnd_Getter_(this);
   
   @DomName('PerformanceTiming.loadEventStart')
   @DocsEditable()
-  int get loadEventStart => _blink.BlinkPerformanceTiming.instance.loadEventStart_Getter_(unwrap_jso(this));
+  int get loadEventStart => _blink.BlinkPerformanceTiming.instance.loadEventStart_Getter_(this);
   
   @DomName('PerformanceTiming.navigationStart')
   @DocsEditable()
-  int get navigationStart => _blink.BlinkPerformanceTiming.instance.navigationStart_Getter_(unwrap_jso(this));
+  int get navigationStart => _blink.BlinkPerformanceTiming.instance.navigationStart_Getter_(this);
   
   @DomName('PerformanceTiming.redirectEnd')
   @DocsEditable()
-  int get redirectEnd => _blink.BlinkPerformanceTiming.instance.redirectEnd_Getter_(unwrap_jso(this));
+  int get redirectEnd => _blink.BlinkPerformanceTiming.instance.redirectEnd_Getter_(this);
   
   @DomName('PerformanceTiming.redirectStart')
   @DocsEditable()
-  int get redirectStart => _blink.BlinkPerformanceTiming.instance.redirectStart_Getter_(unwrap_jso(this));
+  int get redirectStart => _blink.BlinkPerformanceTiming.instance.redirectStart_Getter_(this);
   
   @DomName('PerformanceTiming.requestStart')
   @DocsEditable()
-  int get requestStart => _blink.BlinkPerformanceTiming.instance.requestStart_Getter_(unwrap_jso(this));
+  int get requestStart => _blink.BlinkPerformanceTiming.instance.requestStart_Getter_(this);
   
   @DomName('PerformanceTiming.responseEnd')
   @DocsEditable()
-  int get responseEnd => _blink.BlinkPerformanceTiming.instance.responseEnd_Getter_(unwrap_jso(this));
+  int get responseEnd => _blink.BlinkPerformanceTiming.instance.responseEnd_Getter_(this);
   
   @DomName('PerformanceTiming.responseStart')
   @DocsEditable()
-  int get responseStart => _blink.BlinkPerformanceTiming.instance.responseStart_Getter_(unwrap_jso(this));
+  int get responseStart => _blink.BlinkPerformanceTiming.instance.responseStart_Getter_(this);
   
   @DomName('PerformanceTiming.secureConnectionStart')
   @DocsEditable()
-  int get secureConnectionStart => _blink.BlinkPerformanceTiming.instance.secureConnectionStart_Getter_(unwrap_jso(this));
+  int get secureConnectionStart => _blink.BlinkPerformanceTiming.instance.secureConnectionStart_Getter_(this);
   
   @DomName('PerformanceTiming.unloadEventEnd')
   @DocsEditable()
-  int get unloadEventEnd => _blink.BlinkPerformanceTiming.instance.unloadEventEnd_Getter_(unwrap_jso(this));
+  int get unloadEventEnd => _blink.BlinkPerformanceTiming.instance.unloadEventEnd_Getter_(this);
   
   @DomName('PerformanceTiming.unloadEventStart')
   @DocsEditable()
-  int get unloadEventStart => _blink.BlinkPerformanceTiming.instance.unloadEventStart_Getter_(unwrap_jso(this));
+  int get unloadEventStart => _blink.BlinkPerformanceTiming.instance.unloadEventStart_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PeriodicSyncEvent')
+@Experimental() // untriaged
+class PeriodicSyncEvent extends ExtendableEvent {
+  // To suppress missing implicit constructor warnings.
+  factory PeriodicSyncEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PeriodicSyncEvent.PeriodicSyncEvent')
+  @DocsEditable()
+  factory PeriodicSyncEvent(String type, Map init) {
+    var init_1 = convertDartToNative_Dictionary(init);
+    return _blink.BlinkPeriodicSyncEvent.instance.constructorCallback_2_(type, init_1);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PeriodicSyncEvent.internal_() : super.internal_();
+
+
+  @DomName('PeriodicSyncEvent.registration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  PeriodicSyncRegistration get registration => _blink.BlinkPeriodicSyncEvent.instance.registration_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PeriodicSyncManager')
+@Experimental() // untriaged
+class PeriodicSyncManager extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory PeriodicSyncManager._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PeriodicSyncManager.internal_() { }
+
+  @DomName('PeriodicSyncManager.minPossiblePeriod')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get minPossiblePeriod => _blink.BlinkPeriodicSyncManager.instance.minPossiblePeriod_Getter_(this);
+  
+  @DomName('PeriodicSyncManager.getRegistration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistration(String tag) => convertNativePromiseToDartFuture(_blink.BlinkPeriodicSyncManager.instance.getRegistration_Callback_1_(this, tag));
+  
+  @DomName('PeriodicSyncManager.getRegistrations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistrations() => convertNativePromiseToDartFuture(_blink.BlinkPeriodicSyncManager.instance.getRegistrations_Callback_0_(this));
+  
+  @DomName('PeriodicSyncManager.permissionState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future permissionState() => convertNativePromiseToDartFuture(_blink.BlinkPeriodicSyncManager.instance.permissionState_Callback_0_(this));
+  
+  Future register([Map options]) {
+    if (options != null) {
+      return _blink.BlinkPeriodicSyncManager.instance.register_Callback_1_(this, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkPeriodicSyncManager.instance.register_Callback_0_(this);
+  }
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PeriodicSyncRegistration')
+@Experimental() // untriaged
+class PeriodicSyncRegistration extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory PeriodicSyncRegistration._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PeriodicSyncRegistration.internal_() { }
+
+  @DomName('PeriodicSyncRegistration.minPeriod')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get minPeriod => _blink.BlinkPeriodicSyncRegistration.instance.minPeriod_Getter_(this);
+  
+  @DomName('PeriodicSyncRegistration.networkState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get networkState => _blink.BlinkPeriodicSyncRegistration.instance.networkState_Getter_(this);
+  
+  @DomName('PeriodicSyncRegistration.powerState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get powerState => _blink.BlinkPeriodicSyncRegistration.instance.powerState_Getter_(this);
+  
+  @DomName('PeriodicSyncRegistration.tag')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get tag => _blink.BlinkPeriodicSyncRegistration.instance.tag_Getter_(this);
+  
+  @DomName('PeriodicSyncRegistration.unregister')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future unregister() => convertNativePromiseToDartFuture(_blink.BlinkPeriodicSyncRegistration.instance.unregister_Callback_0_(this));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PermissionStatus')
+@Experimental() // untriaged
+class PermissionStatus extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory PermissionStatus._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PermissionStatus.changeEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PermissionStatus.internal_() : super.internal_();
+
+
+  @DomName('PermissionStatus.state')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get state => _blink.BlinkPermissionStatus.instance.state_Getter_(this);
+  
+  @DomName('PermissionStatus.status')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get status => _blink.BlinkPermissionStatus.instance.status_Getter_(this);
+  
+  @DomName('PermissionStatus.onchange')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<Event> get onChange => changeEvent.forTarget(this);
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('Permissions')
+@Experimental() // untriaged
+class Permissions extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory Permissions._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  Permissions.internal_() { }
+
+  @DomName('Permissions.query')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future query(Object permission) => convertNativePromiseToDartFuture(_blink.BlinkPermissions.instance.query_Callback_1_(this, permission));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30086,11 +30105,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PictureElement internalCreatePictureElement() {
-    return new PictureElement._internalWrap();
-  }
-
-  external factory PictureElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PictureElement.internal_() : super.internal_();
@@ -30117,49 +30132,43 @@
   // To suppress missing implicit constructor warnings.
   factory Plugin._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Plugin internalCreatePlugin() {
-    return new Plugin._internalWrap();
-  }
 
-  factory Plugin._internalWrap() {
-    return new Plugin.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Plugin.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Plugin.description')
   @DocsEditable()
-  String get description => _blink.BlinkPlugin.instance.description_Getter_(unwrap_jso(this));
+  String get description => _blink.BlinkPlugin.instance.description_Getter_(this);
   
   @DomName('Plugin.filename')
   @DocsEditable()
-  String get filename => _blink.BlinkPlugin.instance.filename_Getter_(unwrap_jso(this));
+  String get filename => _blink.BlinkPlugin.instance.filename_Getter_(this);
   
   @DomName('Plugin.length')
   @DocsEditable()
-  int get length => _blink.BlinkPlugin.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkPlugin.instance.length_Getter_(this);
   
   @DomName('Plugin.name')
   @DocsEditable()
-  String get name => _blink.BlinkPlugin.instance.name_Getter_(unwrap_jso(this));
-  
-  @DomName('Plugin.__getter__')
-  @DocsEditable()
-  MimeType __getter__(String name) => wrap_jso(_blink.BlinkPlugin.instance.$__getter___Callback_1_(unwrap_jso(this), name));
+  String get name => _blink.BlinkPlugin.instance.name_Getter_(this);
   
   @DomName('Plugin.item')
   @DocsEditable()
-  MimeType item(int index) => wrap_jso(_blink.BlinkPlugin.instance.item_Callback_1_(unwrap_jso(this), index));
+  MimeType item(int index) => _blink.BlinkPlugin.instance.item_Callback_1_(this, index);
   
-  @DomName('Plugin.namedItem')
-  @DocsEditable()
-  MimeType namedItem(String name) => wrap_jso(_blink.BlinkPlugin.instance.namedItem_Callback_1_(unwrap_jso(this), name));
-  
+  MimeType namedItem(String name) {
+    if ((name is String || name == null)) {
+      return _blink.BlinkPlugin.instance.namedItem_Callback_1_(this, name);
+    }
+    if ((name is String || name == null)) {
+      return _blink.BlinkPlugin.instance.namedItem_Callback_1_(this, name);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
 }
 // 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
@@ -30175,32 +30184,24 @@
   // To suppress missing implicit constructor warnings.
   factory PluginArray._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PluginArray internalCreatePluginArray() {
-    return new PluginArray._internalWrap();
-  }
 
-  factory PluginArray._internalWrap() {
-    return new PluginArray.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PluginArray.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('PluginArray.length')
   @DocsEditable()
-  int get length => _blink.BlinkPluginArray.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkPluginArray.instance.length_Getter_(this);
   
   Plugin operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkPluginArray.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  Plugin _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkPluginArray.instance.item_Callback_1_(unwrap_jso(this), index));
+  Plugin _nativeIndexedGetter(int index) => (_blink.BlinkPluginArray.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, Plugin value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -30240,21 +30241,23 @@
   Plugin elementAt(int index) => this[index];
   // -- end List<Plugin> mixins.
 
-  @DomName('PluginArray.__getter__')
-  @DocsEditable()
-  Plugin __getter__(String name) => wrap_jso(_blink.BlinkPluginArray.instance.$__getter___Callback_1_(unwrap_jso(this), name));
-  
   @DomName('PluginArray.item')
   @DocsEditable()
-  Plugin item(int index) => wrap_jso(_blink.BlinkPluginArray.instance.item_Callback_1_(unwrap_jso(this), index));
+  Plugin item(int index) => _blink.BlinkPluginArray.instance.item_Callback_1_(this, index);
   
-  @DomName('PluginArray.namedItem')
-  @DocsEditable()
-  Plugin namedItem(String name) => wrap_jso(_blink.BlinkPluginArray.instance.namedItem_Callback_1_(unwrap_jso(this), name));
-  
+  Plugin namedItem(String name) {
+    if ((name is String || name == null)) {
+      return _blink.BlinkPluginArray.instance.namedItem_Callback_1_(this, name);
+    }
+    if ((name is String || name == null)) {
+      return _blink.BlinkPluginArray.instance.namedItem_Callback_1_(this, name);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('PluginArray.refresh')
   @DocsEditable()
-  void refresh(bool reload) => _blink.BlinkPluginArray.instance.refresh_Callback_1_(unwrap_jso(this), reload);
+  void refresh(bool reload) => _blink.BlinkPluginArray.instance.refresh_Callback_1_(this, reload);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30273,11 +30276,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PluginPlaceholderElement internalCreatePluginPlaceholderElement() {
-    return new PluginPlaceholderElement._internalWrap();
-  }
-
-  external factory PluginPlaceholderElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PluginPlaceholderElement.internal_() : super.internal_();
@@ -30289,20 +30288,103 @@
    */
   PluginPlaceholderElement.created() : super.created();
 
-  @DomName('PluginPlaceholderElement.message')
+  @DomName('PluginPlaceholderElement.closeable')
   @DocsEditable()
   @Experimental() // untriaged
-  String get message => _blink.BlinkPluginPlaceholderElement.instance.message_Getter_(unwrap_jso(this));
+  bool get closeable => _blink.BlinkPluginPlaceholderElement.instance.closeable_Getter_(this);
+  
+  @DomName('PluginPlaceholderElement.closeable')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set closeable(bool value) => _blink.BlinkPluginPlaceholderElement.instance.closeable_Setter_(this, value);
   
   @DomName('PluginPlaceholderElement.message')
   @DocsEditable()
   @Experimental() // untriaged
-  set message(String value) => _blink.BlinkPluginPlaceholderElement.instance.message_Setter_(unwrap_jso(this), value);
+  String get message => _blink.BlinkPluginPlaceholderElement.instance.message_Getter_(this);
+  
+  @DomName('PluginPlaceholderElement.message')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set message(String value) => _blink.BlinkPluginPlaceholderElement.instance.message_Setter_(this, value);
   
   @DomName('PluginPlaceholderElement.createdCallback')
   @DocsEditable()
   @Experimental() // untriaged
-  void createdCallback() => _blink.BlinkPluginPlaceholderElement.instance.createdCallback_Callback_0_(unwrap_jso(this));
+  void createdCallback() => _blink.BlinkPluginPlaceholderElement.instance.createdCallback_Callback_0_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PointerEvent')
+@Experimental() // untriaged
+class PointerEvent extends MouseEvent {
+  // To suppress missing implicit constructor warnings.
+  factory PointerEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PointerEvent.PointerEvent')
+  @DocsEditable()
+  factory PointerEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkPointerEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkPointerEvent.instance.constructorCallback_1_(type);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PointerEvent.internal_() : super.internal_();
+
+
+  @DomName('PointerEvent.height')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get height => _blink.BlinkPointerEvent.instance.height_Getter_(this);
+  
+  @DomName('PointerEvent.isPrimary')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get isPrimary => _blink.BlinkPointerEvent.instance.isPrimary_Getter_(this);
+  
+  @DomName('PointerEvent.pointerId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get pointerId => _blink.BlinkPointerEvent.instance.pointerId_Getter_(this);
+  
+  @DomName('PointerEvent.pointerType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get pointerType => _blink.BlinkPointerEvent.instance.pointerType_Getter_(this);
+  
+  @DomName('PointerEvent.pressure')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get pressure => _blink.BlinkPointerEvent.instance.pressure_Getter_(this);
+  
+  @DomName('PointerEvent.tiltX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get tiltX => _blink.BlinkPointerEvent.instance.tiltX_Getter_(this);
+  
+  @DomName('PointerEvent.tiltY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get tiltY => _blink.BlinkPointerEvent.instance.tiltY_Getter_(this);
+  
+  @DomName('PointerEvent.width')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get width => _blink.BlinkPointerEvent.instance.width_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30322,13 +30404,19 @@
   // To suppress missing implicit constructor warnings.
   factory PopStateEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static PopStateEvent internalCreatePopStateEvent() {
-    return new PopStateEvent._internalWrap();
+  @DomName('PopStateEvent.PopStateEvent')
+  @DocsEditable()
+  factory PopStateEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkPopStateEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkPopStateEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory PopStateEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PopStateEvent.internal_() : super.internal_();
@@ -30336,7 +30424,7 @@
 
   @DomName('PopStateEvent.state')
   @DocsEditable()
-  Object get state => wrap_jso(_blink.BlinkPopStateEvent.instance.state_Getter_(unwrap_jso(this)));
+  Object get state => convertNativeToDart_SerializedScriptValue(_blink.BlinkPopStateEvent.instance.state_Getter_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30363,21 +30451,13 @@
   // To suppress missing implicit constructor warnings.
   factory PositionError._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PositionError internalCreatePositionError() {
-    return new PositionError._internalWrap();
-  }
 
-  factory PositionError._internalWrap() {
-    return new PositionError.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PositionError.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('PositionError.PERMISSION_DENIED')
   @DocsEditable()
   static const int PERMISSION_DENIED = 1;
@@ -30392,11 +30472,11 @@
 
   @DomName('PositionError.code')
   @DocsEditable()
-  int get code => _blink.BlinkPositionError.instance.code_Getter_(unwrap_jso(this));
+  int get code => _blink.BlinkPositionError.instance.code_Getter_(this);
   
   @DomName('PositionError.message')
   @DocsEditable()
-  String get message => _blink.BlinkPositionError.instance.message_Getter_(unwrap_jso(this));
+  String get message => _blink.BlinkPositionError.instance.message_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30417,6 +30497,44 @@
 
 
 @DocsEditable()
+@DomName('PositionSensorVRDevice')
+@Experimental() // untriaged
+class PositionSensorVRDevice extends VRDevice {
+  // To suppress missing implicit constructor warnings.
+  factory PositionSensorVRDevice._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PositionSensorVRDevice.internal_() : super.internal_();
+
+
+  @DomName('PositionSensorVRDevice.getImmediateState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VRPositionState getImmediateState() => _blink.BlinkPositionSensorVRDevice.instance.getImmediateState_Callback_0_(this);
+  
+  @DomName('PositionSensorVRDevice.getState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VRPositionState getState() => _blink.BlinkPositionSensorVRDevice.instance.getState_Callback_0_(this);
+  
+  @DomName('PositionSensorVRDevice.resetSensor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void resetSensor() => _blink.BlinkPositionSensorVRDevice.instance.resetSensor_Callback_0_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('HTMLPreElement')
 class PreElement extends HtmlElement {
   // To suppress missing implicit constructor warnings.
@@ -30428,11 +30546,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PreElement internalCreatePreElement() {
-    return new PreElement._internalWrap();
-  }
-
-  external factory PreElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PreElement.internal_() : super.internal_();
@@ -30461,16 +30575,148 @@
 
 
   @Deprecated("Internal Use Only")
-  static Presentation internalCreatePresentation() {
-    return new Presentation._internalWrap();
-  }
-
-  external factory Presentation._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Presentation.internal_() : super.internal_();
 
 
+  @DomName('Presentation.session')
+  @DocsEditable()
+  @Experimental() // untriaged
+  PresentationSession get session => _blink.BlinkPresentation.instance.session_Getter_(this);
+  
+  @DomName('Presentation.getAvailability')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getAvailability(String url) => convertNativePromiseToDartFuture(_blink.BlinkPresentation.instance.getAvailability_Callback_1_(this, url));
+  
+  @DomName('Presentation.joinSession')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future joinSession(String url, String presentationId) => convertNativePromiseToDartFuture(_blink.BlinkPresentation.instance.joinSession_Callback_2_(this, url, presentationId));
+  
+  @DomName('Presentation.startSession')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future startSession(String url) => convertNativePromiseToDartFuture(_blink.BlinkPresentation.instance.startSession_Callback_1_(this, url));
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PresentationAvailability')
+@Experimental() // untriaged
+class PresentationAvailability extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory PresentationAvailability._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PresentationAvailability.changeEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PresentationAvailability.internal_() : super.internal_();
+
+
+  @DomName('PresentationAvailability.value')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get value => _blink.BlinkPresentationAvailability.instance.value_Getter_(this);
+  
+  @DomName('PresentationAvailability.onchange')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<Event> get onChange => changeEvent.forTarget(this);
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PresentationSession')
+@Experimental() // untriaged
+class PresentationSession extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory PresentationSession._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PresentationSession.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PresentationSession.internal_() : super.internal_();
+
+
+  @DomName('PresentationSession.binaryType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get binaryType => _blink.BlinkPresentationSession.instance.binaryType_Getter_(this);
+  
+  @DomName('PresentationSession.binaryType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set binaryType(String value) => _blink.BlinkPresentationSession.instance.binaryType_Setter_(this, value);
+  
+  @DomName('PresentationSession.id')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get id => _blink.BlinkPresentationSession.instance.id_Getter_(this);
+  
+  @DomName('PresentationSession.state')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get state => _blink.BlinkPresentationSession.instance.state_Getter_(this);
+  
+  @DomName('PresentationSession.close')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void close() => _blink.BlinkPresentationSession.instance.close_Callback_0_(this);
+  
+  void send(data_OR_message) {
+    if ((data_OR_message is String || data_OR_message == null)) {
+      _blink.BlinkPresentationSession.instance.send_Callback_1_(this, data_OR_message);
+      return;
+    }
+    if ((data_OR_message is Blob || data_OR_message == null)) {
+      _blink.BlinkPresentationSession.instance.send_Callback_1_(this, data_OR_message);
+      return;
+    }
+    if ((data_OR_message is TypedData || data_OR_message == null)) {
+      _blink.BlinkPresentationSession.instance.send_Callback_1_(this, data_OR_message);
+      return;
+    }
+    if ((data_OR_message is ByteBuffer || data_OR_message == null)) {
+      _blink.BlinkPresentationSession.instance.send_Callback_1_(this, data_OR_message);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('PresentationSession.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+
 }
 // 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
@@ -30488,11 +30734,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ProcessingInstruction internalCreateProcessingInstruction() {
-    return new ProcessingInstruction._internalWrap();
-  }
-
-  external factory ProcessingInstruction._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ProcessingInstruction.internal_() : super.internal_();
@@ -30501,11 +30743,11 @@
   @DomName('ProcessingInstruction.sheet')
   @DocsEditable()
   @Experimental() // non-standard
-  StyleSheet get sheet => wrap_jso(_blink.BlinkProcessingInstruction.instance.sheet_Getter_(unwrap_jso(this)));
+  StyleSheet get sheet => _blink.BlinkProcessingInstruction.instance.sheet_Getter_(this);
   
   @DomName('ProcessingInstruction.target')
   @DocsEditable()
-  String get target => _blink.BlinkProcessingInstruction.instance.target_Getter_(unwrap_jso(this));
+  String get target => _blink.BlinkProcessingInstruction.instance.target_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30531,11 +30773,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ProgressElement internalCreateProgressElement() {
-    return new ProgressElement._internalWrap();
-  }
-
-  external factory ProgressElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ProgressElement.internal_() : super.internal_();
@@ -30553,27 +30791,27 @@
   @DomName('HTMLProgressElement.labels')
   @DocsEditable()
   @Unstable()
-  List<Node> get labels => wrap_jso(_blink.BlinkHTMLProgressElement.instance.labels_Getter_(unwrap_jso(this)));
+  List<Node> get labels => (_blink.BlinkHTMLProgressElement.instance.labels_Getter_(this));
   
   @DomName('HTMLProgressElement.max')
   @DocsEditable()
-  num get max => _blink.BlinkHTMLProgressElement.instance.max_Getter_(unwrap_jso(this));
+  num get max => _blink.BlinkHTMLProgressElement.instance.max_Getter_(this);
   
   @DomName('HTMLProgressElement.max')
   @DocsEditable()
-  set max(num value) => _blink.BlinkHTMLProgressElement.instance.max_Setter_(unwrap_jso(this), value);
+  set max(num value) => _blink.BlinkHTMLProgressElement.instance.max_Setter_(this, value);
   
   @DomName('HTMLProgressElement.position')
   @DocsEditable()
-  num get position => _blink.BlinkHTMLProgressElement.instance.position_Getter_(unwrap_jso(this));
+  num get position => _blink.BlinkHTMLProgressElement.instance.position_Getter_(this);
   
   @DomName('HTMLProgressElement.value')
   @DocsEditable()
-  num get value => _blink.BlinkHTMLProgressElement.instance.value_Getter_(unwrap_jso(this));
+  num get value => _blink.BlinkHTMLProgressElement.instance.value_Getter_(this);
   
   @DomName('HTMLProgressElement.value')
   @DocsEditable()
-  set value(num value) => _blink.BlinkHTMLProgressElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(num value) => _blink.BlinkHTMLProgressElement.instance.value_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30589,13 +30827,19 @@
   // To suppress missing implicit constructor warnings.
   factory ProgressEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static ProgressEvent internalCreateProgressEvent() {
-    return new ProgressEvent._internalWrap();
+  @DomName('ProgressEvent.ProgressEvent')
+  @DocsEditable()
+  factory ProgressEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkProgressEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkProgressEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory ProgressEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ProgressEvent.internal_() : super.internal_();
@@ -30603,15 +30847,58 @@
 
   @DomName('ProgressEvent.lengthComputable')
   @DocsEditable()
-  bool get lengthComputable => _blink.BlinkProgressEvent.instance.lengthComputable_Getter_(unwrap_jso(this));
+  bool get lengthComputable => _blink.BlinkProgressEvent.instance.lengthComputable_Getter_(this);
   
   @DomName('ProgressEvent.loaded')
   @DocsEditable()
-  int get loaded => _blink.BlinkProgressEvent.instance.loaded_Getter_(unwrap_jso(this));
+  int get loaded => _blink.BlinkProgressEvent.instance.loaded_Getter_(this);
   
   @DomName('ProgressEvent.total')
   @DocsEditable()
-  int get total => _blink.BlinkProgressEvent.instance.total_Getter_(unwrap_jso(this));
+  int get total => _blink.BlinkProgressEvent.instance.total_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PromiseRejectionEvent')
+@Experimental() // untriaged
+class PromiseRejectionEvent extends Event {
+  // To suppress missing implicit constructor warnings.
+  factory PromiseRejectionEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PromiseRejectionEvent.PromiseRejectionEvent')
+  @DocsEditable()
+  factory PromiseRejectionEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkPromiseRejectionEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkPromiseRejectionEvent.instance.constructorCallback_1_(type);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PromiseRejectionEvent.internal_() : super.internal_();
+
+
+  @DomName('PromiseRejectionEvent.promise')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future get promise => convertNativePromiseToDartFuture(_blink.BlinkPromiseRejectionEvent.instance.promise_Getter_(this));
+  
+  @DomName('PromiseRejectionEvent.reason')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object get reason => (_blink.BlinkPromiseRejectionEvent.instance.reason_Getter_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30624,17 +30911,23 @@
 @DocsEditable()
 @DomName('PushEvent')
 @Experimental() // untriaged
-class PushEvent extends Event {
+class PushEvent extends ExtendableEvent {
   // To suppress missing implicit constructor warnings.
   factory PushEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static PushEvent internalCreatePushEvent() {
-    return new PushEvent._internalWrap();
+  @DomName('PushEvent.PushEvent')
+  @DocsEditable()
+  factory PushEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkPushEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkPushEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory PushEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PushEvent.internal_() : super.internal_();
@@ -30643,7 +30936,7 @@
   @DomName('PushEvent.data')
   @DocsEditable()
   @Experimental() // untriaged
-  String get data => _blink.BlinkPushEvent.instance.data_Getter_(unwrap_jso(this));
+  PushMessageData get data => _blink.BlinkPushEvent.instance.data_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30660,25 +30953,79 @@
   // To suppress missing implicit constructor warnings.
   factory PushManager._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PushManager internalCreatePushManager() {
-    return new PushManager._internalWrap();
-  }
 
-  factory PushManager._internalWrap() {
-    return new PushManager.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PushManager.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('PushManager.register')
+  @DomName('PushManager.getSubscription')
   @DocsEditable()
   @Experimental() // untriaged
-  Future register(String senderId) => wrap_jso(_blink.BlinkPushManager.instance.register_Callback_1_(unwrap_jso(this), senderId));
+  Future getSubscription() => convertNativePromiseToDartFuture(_blink.BlinkPushManager.instance.getSubscription_Callback_0_(this));
+  
+  Future permissionState([Map options]) {
+    if (options != null) {
+      return _blink.BlinkPushManager.instance.permissionState_Callback_1_(this, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkPushManager.instance.permissionState_Callback_0_(this);
+  }
+
+  Future subscribe([Map options]) {
+    if (options != null) {
+      return _blink.BlinkPushManager.instance.subscribe_Callback_1_(this, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkPushManager.instance.subscribe_Callback_0_(this);
+  }
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('PushMessageData')
+@Experimental() // untriaged
+class PushMessageData extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory PushMessageData._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('PushMessageData.PushMessageData')
+  @DocsEditable()
+  factory PushMessageData(String message) {
+    return _blink.BlinkPushMessageData.instance.constructorCallback_1_(message);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  PushMessageData.internal_() { }
+
+  @DomName('PushMessageData.arrayBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ByteBuffer arrayBuffer() => _blink.BlinkPushMessageData.instance.arrayBuffer_Callback_0_(this);
+  
+  @DomName('PushMessageData.blob')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Blob blob() => _blink.BlinkPushMessageData.instance.blob_Callback_0_(this);
+  
+  @DomName('PushMessageData.json')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object json() => (_blink.BlinkPushMessageData.instance.json_Callback_0_(this));
+  
+  @DomName('PushMessageData.text')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String text() => _blink.BlinkPushMessageData.instance.text_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30689,36 +31036,28 @@
 
 
 @DocsEditable()
-@DomName('PushRegistration')
+@DomName('PushSubscription')
 @Experimental() // untriaged
-class PushRegistration extends DartHtmlDomObject {
+class PushSubscription extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
-  factory PushRegistration._() { throw new UnsupportedError("Not supported"); }
+  factory PushSubscription._() { throw new UnsupportedError("Not supported"); }
+
 
   @Deprecated("Internal Use Only")
-  static PushRegistration internalCreatePushRegistration() {
-    return new PushRegistration._internalWrap();
-  }
-
-  factory PushRegistration._internalWrap() {
-    return new PushRegistration.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
-  PushRegistration.internal_() { }
+  PushSubscription.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('PushRegistration.pushEndpoint')
+  @DomName('PushSubscription.endpoint')
   @DocsEditable()
   @Experimental() // untriaged
-  String get pushEndpoint => _blink.BlinkPushRegistration.instance.pushEndpoint_Getter_(unwrap_jso(this));
+  String get endpoint => _blink.BlinkPushSubscription.instance.endpoint_Getter_(this);
   
-  @DomName('PushRegistration.pushRegistrationId')
+  @DomName('PushSubscription.unsubscribe')
   @DocsEditable()
   @Experimental() // untriaged
-  String get pushRegistrationId => _blink.BlinkPushRegistration.instance.pushRegistrationId_Getter_(unwrap_jso(this));
+  Future unsubscribe() => convertNativePromiseToDartFuture(_blink.BlinkPushSubscription.instance.unsubscribe_Callback_0_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30740,11 +31079,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static QuoteElement internalCreateQuoteElement() {
-    return new QuoteElement._internalWrap();
-  }
-
-  external factory QuoteElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   QuoteElement.internal_() : super.internal_();
@@ -30758,11 +31093,11 @@
 
   @DomName('HTMLQuoteElement.cite')
   @DocsEditable()
-  String get cite => _blink.BlinkHTMLQuoteElement.instance.cite_Getter_(unwrap_jso(this));
+  String get cite => _blink.BlinkHTMLQuoteElement.instance.cite_Getter_(this);
   
   @DomName('HTMLQuoteElement.cite')
   @DocsEditable()
-  set cite(String value) => _blink.BlinkHTMLQuoteElement.instance.cite_Setter_(unwrap_jso(this), value);
+  set cite(String value) => _blink.BlinkHTMLQuoteElement.instance.cite_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -30815,21 +31150,13 @@
   // To suppress missing implicit constructor warnings.
   factory Range._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Range internalCreateRange() {
-    return new Range._internalWrap();
-  }
 
-  factory Range._internalWrap() {
-    return new Range.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Range.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Range.END_TO_END')
   @DocsEditable()
   static const int END_TO_END = 2;
@@ -30838,26 +31165,6 @@
   @DocsEditable()
   static const int END_TO_START = 3;
 
-  @DomName('Range.NODE_AFTER')
-  @DocsEditable()
-  @Experimental() // nonstandard
-  static const int NODE_AFTER = 1;
-
-  @DomName('Range.NODE_BEFORE')
-  @DocsEditable()
-  @Experimental() // nonstandard
-  static const int NODE_BEFORE = 0;
-
-  @DomName('Range.NODE_BEFORE_AND_AFTER')
-  @DocsEditable()
-  @Experimental() // nonstandard
-  static const int NODE_BEFORE_AND_AFTER = 2;
-
-  @DomName('Range.NODE_INSIDE')
-  @DocsEditable()
-  @Experimental() // nonstandard
-  static const int NODE_INSIDE = 3;
-
   @DomName('Range.START_TO_END')
   @DocsEditable()
   static const int START_TO_END = 1;
@@ -30868,126 +31175,126 @@
 
   @DomName('Range.collapsed')
   @DocsEditable()
-  bool get collapsed => _blink.BlinkRange.instance.collapsed_Getter_(unwrap_jso(this));
+  bool get collapsed => _blink.BlinkRange.instance.collapsed_Getter_(this);
   
   @DomName('Range.commonAncestorContainer')
   @DocsEditable()
-  Node get commonAncestorContainer => wrap_jso(_blink.BlinkRange.instance.commonAncestorContainer_Getter_(unwrap_jso(this)));
+  Node get commonAncestorContainer => _blink.BlinkRange.instance.commonAncestorContainer_Getter_(this);
   
   @DomName('Range.endContainer')
   @DocsEditable()
-  Node get endContainer => wrap_jso(_blink.BlinkRange.instance.endContainer_Getter_(unwrap_jso(this)));
+  Node get endContainer => _blink.BlinkRange.instance.endContainer_Getter_(this);
   
   @DomName('Range.endOffset')
   @DocsEditable()
-  int get endOffset => _blink.BlinkRange.instance.endOffset_Getter_(unwrap_jso(this));
+  int get endOffset => _blink.BlinkRange.instance.endOffset_Getter_(this);
   
   @DomName('Range.startContainer')
   @DocsEditable()
-  Node get startContainer => wrap_jso(_blink.BlinkRange.instance.startContainer_Getter_(unwrap_jso(this)));
+  Node get startContainer => _blink.BlinkRange.instance.startContainer_Getter_(this);
   
   @DomName('Range.startOffset')
   @DocsEditable()
-  int get startOffset => _blink.BlinkRange.instance.startOffset_Getter_(unwrap_jso(this));
+  int get startOffset => _blink.BlinkRange.instance.startOffset_Getter_(this);
   
   @DomName('Range.cloneContents')
   @DocsEditable()
-  DocumentFragment cloneContents() => wrap_jso(_blink.BlinkRange.instance.cloneContents_Callback_0_(unwrap_jso(this)));
+  DocumentFragment cloneContents() => _blink.BlinkRange.instance.cloneContents_Callback_0_(this);
   
   @DomName('Range.cloneRange')
   @DocsEditable()
-  Range cloneRange() => wrap_jso(_blink.BlinkRange.instance.cloneRange_Callback_0_(unwrap_jso(this)));
+  Range cloneRange() => _blink.BlinkRange.instance.cloneRange_Callback_0_(this);
   
   void collapse([bool toStart]) {
     if (toStart != null) {
-      _blink.BlinkRange.instance.collapse_Callback_1_(unwrap_jso(this), toStart);
+      _blink.BlinkRange.instance.collapse_Callback_1_(this, toStart);
       return;
     }
-    _blink.BlinkRange.instance.collapse_Callback_0_(unwrap_jso(this));
+    _blink.BlinkRange.instance.collapse_Callback_0_(this);
     return;
   }
 
   @DomName('Range.compareBoundaryPoints')
   @DocsEditable()
   @Experimental() // untriaged
-  int compareBoundaryPoints(int how, Range sourceRange) => _blink.BlinkRange.instance.compareBoundaryPoints_Callback_2_(unwrap_jso(this), how, unwrap_jso(sourceRange));
+  int compareBoundaryPoints(int how, Range sourceRange) => _blink.BlinkRange.instance.compareBoundaryPoints_Callback_2_(this, how, sourceRange);
   
   @DomName('Range.comparePoint')
   @DocsEditable()
-  int comparePoint(Node refNode, int offset) => _blink.BlinkRange.instance.comparePoint_Callback_2_(unwrap_jso(this), unwrap_jso(refNode), offset);
+  int comparePoint(Node node, int offset) => _blink.BlinkRange.instance.comparePoint_Callback_2_(this, node, offset);
   
   @DomName('Range.createContextualFragment')
   @DocsEditable()
-  DocumentFragment createContextualFragment(String html) => wrap_jso(_blink.BlinkRange.instance.createContextualFragment_Callback_1_(unwrap_jso(this), html));
+  DocumentFragment createContextualFragment(String fragment) => _blink.BlinkRange.instance.createContextualFragment_Callback_1_(this, fragment);
   
   @DomName('Range.deleteContents')
   @DocsEditable()
-  void deleteContents() => _blink.BlinkRange.instance.deleteContents_Callback_0_(unwrap_jso(this));
+  void deleteContents() => _blink.BlinkRange.instance.deleteContents_Callback_0_(this);
   
   @DomName('Range.detach')
   @DocsEditable()
-  void detach() => _blink.BlinkRange.instance.detach_Callback_0_(unwrap_jso(this));
+  void detach() => _blink.BlinkRange.instance.detach_Callback_0_(this);
   
   @DomName('Range.expand')
   @DocsEditable()
   @Experimental() // non-standard
-  void expand(String unit) => _blink.BlinkRange.instance.expand_Callback_1_(unwrap_jso(this), unit);
+  void expand(String unit) => _blink.BlinkRange.instance.expand_Callback_1_(this, unit);
   
   @DomName('Range.extractContents')
   @DocsEditable()
-  DocumentFragment extractContents() => wrap_jso(_blink.BlinkRange.instance.extractContents_Callback_0_(unwrap_jso(this)));
+  DocumentFragment extractContents() => _blink.BlinkRange.instance.extractContents_Callback_0_(this);
   
   @DomName('Range.getBoundingClientRect')
   @DocsEditable()
-  Rectangle getBoundingClientRect() => make_dart_rectangle(_blink.BlinkRange.instance.getBoundingClientRect_Callback_0_(unwrap_jso(this)));
+  Rectangle getBoundingClientRect() => make_dart_rectangle(_blink.BlinkRange.instance.getBoundingClientRect_Callback_0_(this));
   
   @DomName('Range.getClientRects')
   @DocsEditable()
-  List<Rectangle> getClientRects() => wrap_jso(_blink.BlinkRange.instance.getClientRects_Callback_0_(unwrap_jso(this)));
+  List<Rectangle> getClientRects() => _blink.BlinkRange.instance.getClientRects_Callback_0_(this);
   
   @DomName('Range.insertNode')
   @DocsEditable()
-  void insertNode(Node newNode) => _blink.BlinkRange.instance.insertNode_Callback_1_(unwrap_jso(this), unwrap_jso(newNode));
+  void insertNode(Node node) => _blink.BlinkRange.instance.insertNode_Callback_1_(this, node);
   
   @DomName('Range.isPointInRange')
   @DocsEditable()
-  bool isPointInRange(Node refNode, int offset) => _blink.BlinkRange.instance.isPointInRange_Callback_2_(unwrap_jso(this), unwrap_jso(refNode), offset);
+  bool isPointInRange(Node node, int offset) => _blink.BlinkRange.instance.isPointInRange_Callback_2_(this, node, offset);
   
   @DomName('Range.selectNode')
   @DocsEditable()
-  void selectNode(Node refNode) => _blink.BlinkRange.instance.selectNode_Callback_1_(unwrap_jso(this), unwrap_jso(refNode));
+  void selectNode(Node node) => _blink.BlinkRange.instance.selectNode_Callback_1_(this, node);
   
   @DomName('Range.selectNodeContents')
   @DocsEditable()
-  void selectNodeContents(Node refNode) => _blink.BlinkRange.instance.selectNodeContents_Callback_1_(unwrap_jso(this), unwrap_jso(refNode));
+  void selectNodeContents(Node node) => _blink.BlinkRange.instance.selectNodeContents_Callback_1_(this, node);
   
   @DomName('Range.setEnd')
   @DocsEditable()
-  void setEnd(Node refNode, int offset) => _blink.BlinkRange.instance.setEnd_Callback_2_(unwrap_jso(this), unwrap_jso(refNode), offset);
+  void setEnd(Node node, int offset) => _blink.BlinkRange.instance.setEnd_Callback_2_(this, node, offset);
   
   @DomName('Range.setEndAfter')
   @DocsEditable()
-  void setEndAfter(Node refNode) => _blink.BlinkRange.instance.setEndAfter_Callback_1_(unwrap_jso(this), unwrap_jso(refNode));
+  void setEndAfter(Node node) => _blink.BlinkRange.instance.setEndAfter_Callback_1_(this, node);
   
   @DomName('Range.setEndBefore')
   @DocsEditable()
-  void setEndBefore(Node refNode) => _blink.BlinkRange.instance.setEndBefore_Callback_1_(unwrap_jso(this), unwrap_jso(refNode));
+  void setEndBefore(Node node) => _blink.BlinkRange.instance.setEndBefore_Callback_1_(this, node);
   
   @DomName('Range.setStart')
   @DocsEditable()
-  void setStart(Node refNode, int offset) => _blink.BlinkRange.instance.setStart_Callback_2_(unwrap_jso(this), unwrap_jso(refNode), offset);
+  void setStart(Node node, int offset) => _blink.BlinkRange.instance.setStart_Callback_2_(this, node, offset);
   
   @DomName('Range.setStartAfter')
   @DocsEditable()
-  void setStartAfter(Node refNode) => _blink.BlinkRange.instance.setStartAfter_Callback_1_(unwrap_jso(this), unwrap_jso(refNode));
+  void setStartAfter(Node node) => _blink.BlinkRange.instance.setStartAfter_Callback_1_(this, node);
   
   @DomName('Range.setStartBefore')
   @DocsEditable()
-  void setStartBefore(Node refNode) => _blink.BlinkRange.instance.setStartBefore_Callback_1_(unwrap_jso(this), unwrap_jso(refNode));
+  void setStartBefore(Node node) => _blink.BlinkRange.instance.setStartBefore_Callback_1_(this, node);
   
   @DomName('Range.surroundContents')
   @DocsEditable()
-  void surroundContents(Node newParent) => _blink.BlinkRange.instance.surroundContents_Callback_1_(unwrap_jso(this), unwrap_jso(newParent));
+  void surroundContents(Node newParent) => _blink.BlinkRange.instance.surroundContents_Callback_1_(this, newParent);
   
 
   /**
@@ -31007,51 +31314,152 @@
 
 
 @DocsEditable()
+@DomName('ReadableByteStream')
+@Experimental() // untriaged
+class ReadableByteStream extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory ReadableByteStream._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ReadableByteStream.internal_() { }
+
+  Future cancel([Object reason]) {
+    if (reason != null) {
+      return _blink.BlinkReadableByteStream.instance.cancel_Callback_1_(this, reason);
+    }
+    return _blink.BlinkReadableByteStream.instance.cancel_Callback_0_(this);
+  }
+
+  @DomName('ReadableByteStream.getReader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ReadableByteStreamReader getReader() => _blink.BlinkReadableByteStream.instance.getReader_Callback_0_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('ReadableByteStreamReader')
+@Experimental() // untriaged
+class ReadableByteStreamReader extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory ReadableByteStreamReader._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ReadableByteStreamReader.internal_() { }
+
+  @DomName('ReadableByteStreamReader.closed')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future get closed => convertNativePromiseToDartFuture(_blink.BlinkReadableByteStreamReader.instance.closed_Getter_(this));
+  
+  Future cancel([Object reason]) {
+    if (reason != null) {
+      return _blink.BlinkReadableByteStreamReader.instance.cancel_Callback_1_(this, reason);
+    }
+    return _blink.BlinkReadableByteStreamReader.instance.cancel_Callback_0_(this);
+  }
+
+  @DomName('ReadableByteStreamReader.read')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future read() => convertNativePromiseToDartFuture(_blink.BlinkReadableByteStreamReader.instance.read_Callback_0_(this));
+  
+  @DomName('ReadableByteStreamReader.releaseLock')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void releaseLock() => _blink.BlinkReadableByteStreamReader.instance.releaseLock_Callback_0_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('ReadableStream')
 @Experimental() // untriaged
 class ReadableStream extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ReadableStream._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ReadableStream internalCreateReadableStream() {
-    return new ReadableStream._internalWrap();
-  }
 
-  factory ReadableStream._internalWrap() {
-    return new ReadableStream.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ReadableStream.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+  Future cancel([Object reason]) {
+    if (reason != null) {
+      return _blink.BlinkReadableStream.instance.cancel_Callback_1_(this, reason);
+    }
+    return _blink.BlinkReadableStream.instance.cancel_Callback_0_(this);
+  }
 
-  @DomName('ReadableStream.closed')
+  @DomName('ReadableStream.getReader')
   @DocsEditable()
   @Experimental() // untriaged
-  Future get closed => wrap_jso(_blink.BlinkReadableStream.instance.closed_Getter_(unwrap_jso(this)));
+  ReadableStreamReader getReader() => _blink.BlinkReadableStream.instance.getReader_Callback_0_(this);
   
-  @DomName('ReadableStream.state')
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('ReadableStreamReader')
+@Experimental() // untriaged
+class ReadableStreamReader extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory ReadableStreamReader._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ReadableStreamReader.internal_() { }
+
+  @DomName('ReadableStreamReader.closed')
   @DocsEditable()
   @Experimental() // untriaged
-  String get state => _blink.BlinkReadableStream.instance.state_Getter_(unwrap_jso(this));
+  Future get closed => convertNativePromiseToDartFuture(_blink.BlinkReadableStreamReader.instance.closed_Getter_(this));
   
-  @DomName('ReadableStream.cancel')
+  Future cancel([Object reason]) {
+    if (reason != null) {
+      return _blink.BlinkReadableStreamReader.instance.cancel_Callback_1_(this, reason);
+    }
+    return _blink.BlinkReadableStreamReader.instance.cancel_Callback_0_(this);
+  }
+
+  @DomName('ReadableStreamReader.read')
   @DocsEditable()
   @Experimental() // untriaged
-  Future cancel(Object reason) => wrap_jso(_blink.BlinkReadableStream.instance.cancel_Callback_1_(unwrap_jso(this), reason));
+  Future read() => convertNativePromiseToDartFuture(_blink.BlinkReadableStreamReader.instance.read_Callback_0_(this));
   
-  @DomName('ReadableStream.read')
+  @DomName('ReadableStreamReader.releaseLock')
   @DocsEditable()
   @Experimental() // untriaged
-  Object read() => wrap_jso(_blink.BlinkReadableStream.instance.read_Callback_0_(unwrap_jso(this)));
-  
-  @DomName('ReadableStream.wait')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Future wait() => wrap_jso(_blink.BlinkReadableStream.instance.wait_Callback_0_(unwrap_jso(this)));
+  void releaseLock() => _blink.BlinkReadableStreamReader.instance.releaseLock_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -31068,13 +31476,19 @@
   // To suppress missing implicit constructor warnings.
   factory RelatedEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static RelatedEvent internalCreateRelatedEvent() {
-    return new RelatedEvent._internalWrap();
+  @DomName('RelatedEvent.RelatedEvent')
+  @DocsEditable()
+  factory RelatedEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkRelatedEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkRelatedEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory RelatedEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RelatedEvent.internal_() : super.internal_();
@@ -31083,7 +31497,7 @@
   @DomName('RelatedEvent.relatedTarget')
   @DocsEditable()
   @Experimental() // untriaged
-  EventTarget get relatedTarget => wrap_jso(_blink.BlinkRelatedEvent.instance.relatedTarget_Getter_(unwrap_jso(this)));
+  EventTarget get relatedTarget => _convertNativeToDart_EventTarget(_blink.BlinkRelatedEvent.instance.relatedTarget_Getter_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -31112,11 +31526,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ResourceProgressEvent internalCreateResourceProgressEvent() {
-    return new ResourceProgressEvent._internalWrap();
-  }
-
-  external factory ResourceProgressEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ResourceProgressEvent.internal_() : super.internal_();
@@ -31124,7 +31534,7 @@
 
   @DomName('ResourceProgressEvent.url')
   @DocsEditable()
-  String get url => _blink.BlinkResourceProgressEvent.instance.url_Getter_(unwrap_jso(this));
+  String get url => _blink.BlinkResourceProgressEvent.instance.url_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -31184,11 +31594,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static RtcDataChannel internalCreateRtcDataChannel() {
-    return new RtcDataChannel._internalWrap();
-  }
-
-  external factory RtcDataChannel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcDataChannel.internal_() : super.internal_();
@@ -31196,77 +31602,77 @@
 
   @DomName('RTCDataChannel.binaryType')
   @DocsEditable()
-  String get binaryType => _blink.BlinkRTCDataChannel.instance.binaryType_Getter_(unwrap_jso(this));
+  String get binaryType => _blink.BlinkRTCDataChannel.instance.binaryType_Getter_(this);
   
   @DomName('RTCDataChannel.binaryType')
   @DocsEditable()
-  set binaryType(String value) => _blink.BlinkRTCDataChannel.instance.binaryType_Setter_(unwrap_jso(this), value);
+  set binaryType(String value) => _blink.BlinkRTCDataChannel.instance.binaryType_Setter_(this, value);
   
   @DomName('RTCDataChannel.bufferedAmount')
   @DocsEditable()
-  int get bufferedAmount => _blink.BlinkRTCDataChannel.instance.bufferedAmount_Getter_(unwrap_jso(this));
+  int get bufferedAmount => _blink.BlinkRTCDataChannel.instance.bufferedAmount_Getter_(this);
   
   @DomName('RTCDataChannel.id')
   @DocsEditable()
   @Experimental() // untriaged
-  int get id => _blink.BlinkRTCDataChannel.instance.id_Getter_(unwrap_jso(this));
+  int get id => _blink.BlinkRTCDataChannel.instance.id_Getter_(this);
   
   @DomName('RTCDataChannel.label')
   @DocsEditable()
-  String get label => _blink.BlinkRTCDataChannel.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkRTCDataChannel.instance.label_Getter_(this);
   
   @DomName('RTCDataChannel.maxRetransmitTime')
   @DocsEditable()
   @Experimental() // untriaged
-  int get maxRetransmitTime => _blink.BlinkRTCDataChannel.instance.maxRetransmitTime_Getter_(unwrap_jso(this));
+  int get maxRetransmitTime => _blink.BlinkRTCDataChannel.instance.maxRetransmitTime_Getter_(this);
   
   @DomName('RTCDataChannel.maxRetransmits')
   @DocsEditable()
   @Experimental() // untriaged
-  int get maxRetransmits => _blink.BlinkRTCDataChannel.instance.maxRetransmits_Getter_(unwrap_jso(this));
+  int get maxRetransmits => _blink.BlinkRTCDataChannel.instance.maxRetransmits_Getter_(this);
   
   @DomName('RTCDataChannel.negotiated')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get negotiated => _blink.BlinkRTCDataChannel.instance.negotiated_Getter_(unwrap_jso(this));
+  bool get negotiated => _blink.BlinkRTCDataChannel.instance.negotiated_Getter_(this);
   
   @DomName('RTCDataChannel.ordered')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get ordered => _blink.BlinkRTCDataChannel.instance.ordered_Getter_(unwrap_jso(this));
+  bool get ordered => _blink.BlinkRTCDataChannel.instance.ordered_Getter_(this);
   
   @DomName('RTCDataChannel.protocol')
   @DocsEditable()
   @Experimental() // untriaged
-  String get protocol => _blink.BlinkRTCDataChannel.instance.protocol_Getter_(unwrap_jso(this));
+  String get protocol => _blink.BlinkRTCDataChannel.instance.protocol_Getter_(this);
   
   @DomName('RTCDataChannel.readyState')
   @DocsEditable()
-  String get readyState => _blink.BlinkRTCDataChannel.instance.readyState_Getter_(unwrap_jso(this));
+  String get readyState => _blink.BlinkRTCDataChannel.instance.readyState_Getter_(this);
   
   @DomName('RTCDataChannel.reliable')
   @DocsEditable()
-  bool get reliable => _blink.BlinkRTCDataChannel.instance.reliable_Getter_(unwrap_jso(this));
+  bool get reliable => _blink.BlinkRTCDataChannel.instance.reliable_Getter_(this);
   
   @DomName('RTCDataChannel.close')
   @DocsEditable()
-  void close() => _blink.BlinkRTCDataChannel.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkRTCDataChannel.instance.close_Callback_0_(this);
   
   void send(data) {
     if ((data is String || data == null)) {
-      _blink.BlinkRTCDataChannel.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+      _blink.BlinkRTCDataChannel.instance.send_Callback_1_(this, data);
       return;
     }
     if ((data is Blob || data == null)) {
-      _blink.BlinkRTCDataChannel.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+      _blink.BlinkRTCDataChannel.instance.send_Callback_1_(this, data);
       return;
     }
     if ((data is TypedData || data == null)) {
-      _blink.BlinkRTCDataChannel.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+      _blink.BlinkRTCDataChannel.instance.send_Callback_1_(this, data);
       return;
     }
     if ((data is ByteBuffer || data == null)) {
-      _blink.BlinkRTCDataChannel.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+      _blink.BlinkRTCDataChannel.instance.send_Callback_1_(this, data);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -31274,19 +31680,19 @@
 
   @DomName('RTCDataChannel.sendBlob')
   @DocsEditable()
-  void sendBlob(Blob data) => _blink.BlinkRTCDataChannel.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+  void sendBlob(Blob data) => _blink.BlinkRTCDataChannel.instance.send_Callback_1_(this, data);
   
   @DomName('RTCDataChannel.sendByteBuffer')
   @DocsEditable()
-  void sendByteBuffer(ByteBuffer data) => _blink.BlinkRTCDataChannel.instance.send_Callback_1_(unwrap_jso(this), data);
+  void sendByteBuffer(ByteBuffer data) => _blink.BlinkRTCDataChannel.instance.send_Callback_1_(this, data);
   
   @DomName('RTCDataChannel.sendString')
   @DocsEditable()
-  void sendString(String data) => _blink.BlinkRTCDataChannel.instance.send_Callback_1_(unwrap_jso(this), data);
+  void sendString(String data) => _blink.BlinkRTCDataChannel.instance.send_Callback_1_(this, data);
   
   @DomName('RTCDataChannel.sendTypedData')
   @DocsEditable()
-  void sendTypedData(TypedData data) => _blink.BlinkRTCDataChannel.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+  void sendTypedData(TypedData data) => _blink.BlinkRTCDataChannel.instance.send_Callback_1_(this, data);
   
   /// Stream of `close` events handled by this [RtcDataChannel].
   @DomName('RTCDataChannel.onclose')
@@ -31326,11 +31732,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static RtcDataChannelEvent internalCreateRtcDataChannelEvent() {
-    return new RtcDataChannelEvent._internalWrap();
-  }
-
-  external factory RtcDataChannelEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcDataChannelEvent.internal_() : super.internal_();
@@ -31338,7 +31740,7 @@
 
   @DomName('RTCDataChannelEvent.channel')
   @DocsEditable()
-  RtcDataChannel get channel => wrap_jso(_blink.BlinkRTCDataChannelEvent.instance.channel_Getter_(unwrap_jso(this)));
+  RtcDataChannel get channel => _blink.BlinkRTCDataChannelEvent.instance.channel_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -31368,11 +31770,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static RtcDtmfSender internalCreateRtcDtmfSender() {
-    return new RtcDtmfSender._internalWrap();
-  }
-
-  external factory RtcDtmfSender._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcDtmfSender.internal_() : super.internal_();
@@ -31380,34 +31778,34 @@
 
   @DomName('RTCDTMFSender.canInsertDTMF')
   @DocsEditable()
-  bool get canInsertDtmf => _blink.BlinkRTCDTMFSender.instance.canInsertDTMF_Getter_(unwrap_jso(this));
+  bool get canInsertDtmf => _blink.BlinkRTCDTMFSender.instance.canInsertDTMF_Getter_(this);
   
   @DomName('RTCDTMFSender.duration')
   @DocsEditable()
-  int get duration => _blink.BlinkRTCDTMFSender.instance.duration_Getter_(unwrap_jso(this));
+  int get duration => _blink.BlinkRTCDTMFSender.instance.duration_Getter_(this);
   
   @DomName('RTCDTMFSender.interToneGap')
   @DocsEditable()
-  int get interToneGap => _blink.BlinkRTCDTMFSender.instance.interToneGap_Getter_(unwrap_jso(this));
+  int get interToneGap => _blink.BlinkRTCDTMFSender.instance.interToneGap_Getter_(this);
   
   @DomName('RTCDTMFSender.toneBuffer')
   @DocsEditable()
-  String get toneBuffer => _blink.BlinkRTCDTMFSender.instance.toneBuffer_Getter_(unwrap_jso(this));
+  String get toneBuffer => _blink.BlinkRTCDTMFSender.instance.toneBuffer_Getter_(this);
   
   @DomName('RTCDTMFSender.track')
   @DocsEditable()
-  MediaStreamTrack get track => wrap_jso(_blink.BlinkRTCDTMFSender.instance.track_Getter_(unwrap_jso(this)));
+  MediaStreamTrack get track => _blink.BlinkRTCDTMFSender.instance.track_Getter_(this);
   
   void insertDtmf(String tones, [int duration, int interToneGap]) {
     if (interToneGap != null) {
-      _blink.BlinkRTCDTMFSender.instance.insertDTMF_Callback_3_(unwrap_jso(this), tones, duration, interToneGap);
+      _blink.BlinkRTCDTMFSender.instance.insertDTMF_Callback_3_(this, tones, duration, interToneGap);
       return;
     }
     if (duration != null) {
-      _blink.BlinkRTCDTMFSender.instance.insertDTMF_Callback_2_(unwrap_jso(this), tones, duration);
+      _blink.BlinkRTCDTMFSender.instance.insertDTMF_Callback_2_(this, tones, duration);
       return;
     }
-    _blink.BlinkRTCDTMFSender.instance.insertDTMF_Callback_1_(unwrap_jso(this), tones);
+    _blink.BlinkRTCDTMFSender.instance.insertDTMF_Callback_1_(this, tones);
     return;
   }
 
@@ -31432,13 +31830,16 @@
   // To suppress missing implicit constructor warnings.
   factory RtcDtmfToneChangeEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static RtcDtmfToneChangeEvent internalCreateRtcDtmfToneChangeEvent() {
-    return new RtcDtmfToneChangeEvent._internalWrap();
+  @DomName('RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent')
+  @DocsEditable()
+  factory RtcDtmfToneChangeEvent(String type, Map eventInitDict) {
+    var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+    return _blink.BlinkRTCDTMFToneChangeEvent.instance.constructorCallback_2_(type, eventInitDict_1);
   }
 
-  external factory RtcDtmfToneChangeEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcDtmfToneChangeEvent.internal_() : super.internal_();
@@ -31446,7 +31847,7 @@
 
   @DomName('RTCDTMFToneChangeEvent.tone')
   @DocsEditable()
-  String get tone => _blink.BlinkRTCDTMFToneChangeEvent.instance.tone_Getter_(unwrap_jso(this));
+  String get tone => _blink.BlinkRTCDTMFToneChangeEvent.instance.tone_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -31467,49 +31868,41 @@
 
   @DomName('RTCIceCandidate.RTCIceCandidate')
   @DocsEditable()
-  factory RtcIceCandidate(Map dictionary) {
-    var dictionary_1 = convertDartToNative_Dictionary(dictionary);
-    return wrap_jso(_blink.BlinkRTCIceCandidate.instance.constructorCallback_1_(dictionary_1));
+  factory RtcIceCandidate(Map candidateInitDict) {
+    var candidateInitDict_1 = convertDartToNative_Dictionary(candidateInitDict);
+    return _blink.BlinkRTCIceCandidate.instance.constructorCallback_1_(candidateInitDict_1);
   }
 
+
   @Deprecated("Internal Use Only")
-  static RtcIceCandidate internalCreateRtcIceCandidate() {
-    return new RtcIceCandidate._internalWrap();
-  }
-
-  factory RtcIceCandidate._internalWrap() {
-    return new RtcIceCandidate.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcIceCandidate.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('RTCIceCandidate.candidate')
   @DocsEditable()
-  String get candidate => _blink.BlinkRTCIceCandidate.instance.candidate_Getter_(unwrap_jso(this));
+  String get candidate => _blink.BlinkRTCIceCandidate.instance.candidate_Getter_(this);
   
   @DomName('RTCIceCandidate.candidate')
   @DocsEditable()
-  set candidate(String value) => _blink.BlinkRTCIceCandidate.instance.candidate_Setter_(unwrap_jso(this), value);
+  set candidate(String value) => _blink.BlinkRTCIceCandidate.instance.candidate_Setter_(this, value);
   
   @DomName('RTCIceCandidate.sdpMLineIndex')
   @DocsEditable()
-  int get sdpMLineIndex => _blink.BlinkRTCIceCandidate.instance.sdpMLineIndex_Getter_(unwrap_jso(this));
+  int get sdpMLineIndex => _blink.BlinkRTCIceCandidate.instance.sdpMLineIndex_Getter_(this);
   
   @DomName('RTCIceCandidate.sdpMLineIndex')
   @DocsEditable()
-  set sdpMLineIndex(int value) => _blink.BlinkRTCIceCandidate.instance.sdpMLineIndex_Setter_(unwrap_jso(this), value);
+  set sdpMLineIndex(int value) => _blink.BlinkRTCIceCandidate.instance.sdpMLineIndex_Setter_(this, value);
   
   @DomName('RTCIceCandidate.sdpMid')
   @DocsEditable()
-  String get sdpMid => _blink.BlinkRTCIceCandidate.instance.sdpMid_Getter_(unwrap_jso(this));
+  String get sdpMid => _blink.BlinkRTCIceCandidate.instance.sdpMid_Getter_(this);
   
   @DomName('RTCIceCandidate.sdpMid')
   @DocsEditable()
-  set sdpMid(String value) => _blink.BlinkRTCIceCandidate.instance.sdpMid_Setter_(unwrap_jso(this), value);
+  set sdpMid(String value) => _blink.BlinkRTCIceCandidate.instance.sdpMid_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -31529,11 +31922,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static RtcIceCandidateEvent internalCreateRtcIceCandidateEvent() {
-    return new RtcIceCandidateEvent._internalWrap();
-  }
-
-  external factory RtcIceCandidateEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcIceCandidateEvent.internal_() : super.internal_();
@@ -31541,7 +31930,7 @@
 
   @DomName('RTCIceCandidateEvent.candidate')
   @DocsEditable()
-  RtcIceCandidate get candidate => wrap_jso(_blink.BlinkRTCIceCandidateEvent.instance.candidate_Getter_(unwrap_jso(this)));
+  RtcIceCandidate get candidate => _blink.BlinkRTCIceCandidateEvent.instance.candidate_Getter_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -31661,19 +32050,15 @@
     if (mediaConstraints != null) {
       var rtcConfiguration_1 = convertDartToNative_Dictionary(rtcConfiguration);
       var mediaConstraints_2 = convertDartToNative_Dictionary(mediaConstraints);
-      return wrap_jso(_blink.BlinkRTCPeerConnection.instance.constructorCallback_2_(rtcConfiguration_1, mediaConstraints_2));
+      return _blink.BlinkRTCPeerConnection.instance.constructorCallback_2_(rtcConfiguration_1, mediaConstraints_2);
     }
     var rtcConfiguration_1 = convertDartToNative_Dictionary(rtcConfiguration);
-    return wrap_jso(_blink.BlinkRTCPeerConnection.instance.constructorCallback_1_(rtcConfiguration_1));
+    return _blink.BlinkRTCPeerConnection.instance.constructorCallback_1_(rtcConfiguration_1);
   }
 
 
   @Deprecated("Internal Use Only")
-  static RtcPeerConnection internalCreateRtcPeerConnection() {
-    return new RtcPeerConnection._internalWrap();
-  }
-
-  external factory RtcPeerConnection._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcPeerConnection.internal_() : super.internal_();
@@ -31681,93 +32066,93 @@
 
   @DomName('RTCPeerConnection.iceConnectionState')
   @DocsEditable()
-  String get iceConnectionState => _blink.BlinkRTCPeerConnection.instance.iceConnectionState_Getter_(unwrap_jso(this));
+  String get iceConnectionState => _blink.BlinkRTCPeerConnection.instance.iceConnectionState_Getter_(this);
   
   @DomName('RTCPeerConnection.iceGatheringState')
   @DocsEditable()
-  String get iceGatheringState => _blink.BlinkRTCPeerConnection.instance.iceGatheringState_Getter_(unwrap_jso(this));
+  String get iceGatheringState => _blink.BlinkRTCPeerConnection.instance.iceGatheringState_Getter_(this);
   
   @DomName('RTCPeerConnection.localDescription')
   @DocsEditable()
-  RtcSessionDescription get localDescription => wrap_jso(_blink.BlinkRTCPeerConnection.instance.localDescription_Getter_(unwrap_jso(this)));
+  RtcSessionDescription get localDescription => _blink.BlinkRTCPeerConnection.instance.localDescription_Getter_(this);
   
   @DomName('RTCPeerConnection.remoteDescription')
   @DocsEditable()
-  RtcSessionDescription get remoteDescription => wrap_jso(_blink.BlinkRTCPeerConnection.instance.remoteDescription_Getter_(unwrap_jso(this)));
+  RtcSessionDescription get remoteDescription => _blink.BlinkRTCPeerConnection.instance.remoteDescription_Getter_(this);
   
   @DomName('RTCPeerConnection.signalingState')
   @DocsEditable()
-  String get signalingState => _blink.BlinkRTCPeerConnection.instance.signalingState_Getter_(unwrap_jso(this));
+  String get signalingState => _blink.BlinkRTCPeerConnection.instance.signalingState_Getter_(this);
   
   @DomName('RTCPeerConnection.addIceCandidate')
   @DocsEditable()
-  void addIceCandidate(RtcIceCandidate candidate, VoidCallback successCallback, _RtcErrorCallback failureCallback) => _blink.BlinkRTCPeerConnection.instance.addIceCandidate_Callback_3_(unwrap_jso(this), unwrap_jso(candidate), unwrap_jso(() => successCallback()), unwrap_jso((errorInformation) => failureCallback(errorInformation)));
+  void addIceCandidate(RtcIceCandidate candidate, VoidCallback successCallback, _RtcErrorCallback failureCallback) => _blink.BlinkRTCPeerConnection.instance.addIceCandidate_Callback_3_(this, candidate, successCallback, failureCallback);
   
   void addStream(MediaStream stream, [Map mediaConstraints]) {
     if (mediaConstraints != null) {
-      _blink.BlinkRTCPeerConnection.instance.addStream_Callback_2_(unwrap_jso(this), unwrap_jso(stream), convertDartToNative_Dictionary(mediaConstraints));
+      _blink.BlinkRTCPeerConnection.instance.addStream_Callback_2_(this, stream, convertDartToNative_Dictionary(mediaConstraints));
       return;
     }
-    _blink.BlinkRTCPeerConnection.instance.addStream_Callback_1_(unwrap_jso(this), unwrap_jso(stream));
+    _blink.BlinkRTCPeerConnection.instance.addStream_Callback_1_(this, stream);
     return;
   }
 
   @DomName('RTCPeerConnection.close')
   @DocsEditable()
-  void close() => _blink.BlinkRTCPeerConnection.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkRTCPeerConnection.instance.close_Callback_0_(this);
   
   void _createAnswer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
     if (mediaConstraints != null) {
-      _blink.BlinkRTCPeerConnection.instance.createAnswer_Callback_3_(unwrap_jso(this), unwrap_jso((sdp) => successCallback(wrap_jso(sdp))), unwrap_jso((errorInformation) => failureCallback(errorInformation)), convertDartToNative_Dictionary(mediaConstraints));
+      _blink.BlinkRTCPeerConnection.instance.createAnswer_Callback_3_(this, successCallback, failureCallback, convertDartToNative_Dictionary(mediaConstraints));
       return;
     }
-    _blink.BlinkRTCPeerConnection.instance.createAnswer_Callback_2_(unwrap_jso(this), unwrap_jso((sdp) => successCallback(wrap_jso(sdp))), unwrap_jso((errorInformation) => failureCallback(errorInformation)));
+    _blink.BlinkRTCPeerConnection.instance.createAnswer_Callback_2_(this, successCallback, failureCallback);
     return;
   }
 
   @DomName('RTCPeerConnection.createDTMFSender')
   @DocsEditable()
-  RtcDtmfSender createDtmfSender(MediaStreamTrack track) => wrap_jso(_blink.BlinkRTCPeerConnection.instance.createDTMFSender_Callback_1_(unwrap_jso(this), unwrap_jso(track)));
+  RtcDtmfSender createDtmfSender(MediaStreamTrack track) => _blink.BlinkRTCPeerConnection.instance.createDTMFSender_Callback_1_(this, track);
   
   RtcDataChannel createDataChannel(String label, [Map options]) {
     if (options != null) {
-      return wrap_jso(_blink.BlinkRTCPeerConnection.instance.createDataChannel_Callback_2_(unwrap_jso(this), label, convertDartToNative_Dictionary(options)));
+      return _blink.BlinkRTCPeerConnection.instance.createDataChannel_Callback_2_(this, label, convertDartToNative_Dictionary(options));
     }
-    return wrap_jso(_blink.BlinkRTCPeerConnection.instance.createDataChannel_Callback_1_(unwrap_jso(this), label));
+    return _blink.BlinkRTCPeerConnection.instance.createDataChannel_Callback_1_(this, label);
   }
 
   void _createOffer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map rtcOfferOptions]) {
     if (rtcOfferOptions != null) {
-      _blink.BlinkRTCPeerConnection.instance.createOffer_Callback_3_(unwrap_jso(this), unwrap_jso((sdp) => successCallback(wrap_jso(sdp))), unwrap_jso((errorInformation) => failureCallback(errorInformation)), convertDartToNative_Dictionary(rtcOfferOptions));
+      _blink.BlinkRTCPeerConnection.instance.createOffer_Callback_3_(this, successCallback, failureCallback, convertDartToNative_Dictionary(rtcOfferOptions));
       return;
     }
-    _blink.BlinkRTCPeerConnection.instance.createOffer_Callback_2_(unwrap_jso(this), unwrap_jso((sdp) => successCallback(wrap_jso(sdp))), unwrap_jso((errorInformation) => failureCallback(errorInformation)));
+    _blink.BlinkRTCPeerConnection.instance.createOffer_Callback_2_(this, successCallback, failureCallback);
     return;
   }
 
   @DomName('RTCPeerConnection.getLocalStreams')
   @DocsEditable()
-  List<MediaStream> getLocalStreams() => wrap_jso(_blink.BlinkRTCPeerConnection.instance.getLocalStreams_Callback_0_(unwrap_jso(this)));
+  List<MediaStream> getLocalStreams() => (_blink.BlinkRTCPeerConnection.instance.getLocalStreams_Callback_0_(this));
   
   @DomName('RTCPeerConnection.getRemoteStreams')
   @DocsEditable()
-  List<MediaStream> getRemoteStreams() => wrap_jso(_blink.BlinkRTCPeerConnection.instance.getRemoteStreams_Callback_0_(unwrap_jso(this)));
+  List<MediaStream> getRemoteStreams() => (_blink.BlinkRTCPeerConnection.instance.getRemoteStreams_Callback_0_(this));
   
   @DomName('RTCPeerConnection.getStats')
   @DocsEditable()
-  void _getStats(RtcStatsCallback successCallback, MediaStreamTrack selector) => _blink.BlinkRTCPeerConnection.instance.getStats_Callback_2_(unwrap_jso(this), unwrap_jso((response) => successCallback(wrap_jso(response))), unwrap_jso(selector));
+  void _getStats(RtcStatsCallback successCallback, MediaStreamTrack selector) => _blink.BlinkRTCPeerConnection.instance.getStats_Callback_2_(this, successCallback, selector);
   
   @DomName('RTCPeerConnection.getStreamById')
   @DocsEditable()
-  MediaStream getStreamById(String streamId) => wrap_jso(_blink.BlinkRTCPeerConnection.instance.getStreamById_Callback_1_(unwrap_jso(this), streamId));
+  MediaStream getStreamById(String streamId) => _blink.BlinkRTCPeerConnection.instance.getStreamById_Callback_1_(this, streamId);
   
   @DomName('RTCPeerConnection.removeStream')
   @DocsEditable()
-  void removeStream(MediaStream stream) => _blink.BlinkRTCPeerConnection.instance.removeStream_Callback_1_(unwrap_jso(this), unwrap_jso(stream));
+  void removeStream(MediaStream stream) => _blink.BlinkRTCPeerConnection.instance.removeStream_Callback_1_(this, stream);
   
   @DomName('RTCPeerConnection.setLocalDescription')
   @DocsEditable()
-  void _setLocalDescription(RtcSessionDescription description, [VoidCallback successCallback, _RtcErrorCallback failureCallback]) => _blink.BlinkRTCPeerConnection.instance.setLocalDescription_Callback_3_(unwrap_jso(this), unwrap_jso(description), unwrap_jso(() => successCallback()), unwrap_jso((errorInformation) => failureCallback(errorInformation)));
+  void _setLocalDescription(RtcSessionDescription description, [VoidCallback successCallback, _RtcErrorCallback failureCallback]) => _blink.BlinkRTCPeerConnection.instance.setLocalDescription_Callback_3_(this, description, successCallback, failureCallback);
   
   Future setLocalDescription(RtcSessionDescription description) {
     var completer = new Completer();
@@ -31779,7 +32164,7 @@
 
   @DomName('RTCPeerConnection.setRemoteDescription')
   @DocsEditable()
-  void _setRemoteDescription(RtcSessionDescription description, [VoidCallback successCallback, _RtcErrorCallback failureCallback]) => _blink.BlinkRTCPeerConnection.instance.setRemoteDescription_Callback_3_(unwrap_jso(this), unwrap_jso(description), unwrap_jso(() => successCallback()), unwrap_jso((errorInformation) => failureCallback(errorInformation)));
+  void _setRemoteDescription(RtcSessionDescription description, [VoidCallback successCallback, _RtcErrorCallback failureCallback]) => _blink.BlinkRTCPeerConnection.instance.setRemoteDescription_Callback_3_(this, description, successCallback, failureCallback);
   
   Future setRemoteDescription(RtcSessionDescription description) {
     var completer = new Completer();
@@ -31791,14 +32176,14 @@
 
   void updateIce([Map configuration, Map mediaConstraints]) {
     if (mediaConstraints != null) {
-      _blink.BlinkRTCPeerConnection.instance.updateIce_Callback_2_(unwrap_jso(this), convertDartToNative_Dictionary(configuration), convertDartToNative_Dictionary(mediaConstraints));
+      _blink.BlinkRTCPeerConnection.instance.updateIce_Callback_2_(this, convertDartToNative_Dictionary(configuration), convertDartToNative_Dictionary(mediaConstraints));
       return;
     }
     if (configuration != null) {
-      _blink.BlinkRTCPeerConnection.instance.updateIce_Callback_1_(unwrap_jso(this), convertDartToNative_Dictionary(configuration));
+      _blink.BlinkRTCPeerConnection.instance.updateIce_Callback_1_(this, convertDartToNative_Dictionary(configuration));
       return;
     }
-    _blink.BlinkRTCPeerConnection.instance.updateIce_Callback_0_(unwrap_jso(this));
+    _blink.BlinkRTCPeerConnection.instance.updateIce_Callback_0_(this);
     return;
   }
 
@@ -31859,41 +32244,33 @@
   factory RtcSessionDescription([Map descriptionInitDict]) {
     if (descriptionInitDict != null) {
       var descriptionInitDict_1 = convertDartToNative_Dictionary(descriptionInitDict);
-      return wrap_jso(_blink.BlinkRTCSessionDescription.instance.constructorCallback_1_(descriptionInitDict_1));
+      return _blink.BlinkRTCSessionDescription.instance.constructorCallback_1_(descriptionInitDict_1);
     }
-    return wrap_jso(_blink.BlinkRTCSessionDescription.instance.constructorCallback_0_());
+    return _blink.BlinkRTCSessionDescription.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static RtcSessionDescription internalCreateRtcSessionDescription() {
-    return new RtcSessionDescription._internalWrap();
-  }
-
-  factory RtcSessionDescription._internalWrap() {
-    return new RtcSessionDescription.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcSessionDescription.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('RTCSessionDescription.sdp')
   @DocsEditable()
-  String get sdp => _blink.BlinkRTCSessionDescription.instance.sdp_Getter_(unwrap_jso(this));
+  String get sdp => _blink.BlinkRTCSessionDescription.instance.sdp_Getter_(this);
   
   @DomName('RTCSessionDescription.sdp')
   @DocsEditable()
-  set sdp(String value) => _blink.BlinkRTCSessionDescription.instance.sdp_Setter_(unwrap_jso(this), value);
+  set sdp(String value) => _blink.BlinkRTCSessionDescription.instance.sdp_Setter_(this, value);
   
   @DomName('RTCSessionDescription.type')
   @DocsEditable()
-  String get type => _blink.BlinkRTCSessionDescription.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkRTCSessionDescription.instance.type_Getter_(this);
   
   @DomName('RTCSessionDescription.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkRTCSessionDescription.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkRTCSessionDescription.instance.type_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -31911,48 +32288,32 @@
   // To suppress missing implicit constructor warnings.
   factory RtcStatsReport._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static RtcStatsReport internalCreateRtcStatsReport() {
-    return new RtcStatsReport._internalWrap();
-  }
 
-  factory RtcStatsReport._internalWrap() {
-    return new RtcStatsReport.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcStatsReport.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('RTCStatsReport.id')
   @DocsEditable()
-  String get id => _blink.BlinkRTCStatsReport.instance.id_Getter_(unwrap_jso(this));
-  
-  @DomName('RTCStatsReport.local')
-  @DocsEditable()
-  RtcStatsReport get local => wrap_jso(_blink.BlinkRTCStatsReport.instance.local_Getter_(unwrap_jso(this)));
-  
-  @DomName('RTCStatsReport.remote')
-  @DocsEditable()
-  RtcStatsReport get remote => wrap_jso(_blink.BlinkRTCStatsReport.instance.remote_Getter_(unwrap_jso(this)));
+  String get id => _blink.BlinkRTCStatsReport.instance.id_Getter_(this);
   
   @DomName('RTCStatsReport.timestamp')
   @DocsEditable()
-  DateTime get timestamp => _blink.BlinkRTCStatsReport.instance.timestamp_Getter_(unwrap_jso(this));
+  DateTime get timestamp => _blink.BlinkRTCStatsReport.instance.timestamp_Getter_(this);
   
   @DomName('RTCStatsReport.type')
   @DocsEditable()
-  String get type => _blink.BlinkRTCStatsReport.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkRTCStatsReport.instance.type_Getter_(this);
   
   @DomName('RTCStatsReport.names')
   @DocsEditable()
-  List<String> names() => _blink.BlinkRTCStatsReport.instance.names_Callback_0_(unwrap_jso(this));
+  List<String> names() => _blink.BlinkRTCStatsReport.instance.names_Callback_0_(this);
   
   @DomName('RTCStatsReport.stat')
   @DocsEditable()
-  String stat(String name) => _blink.BlinkRTCStatsReport.instance.stat_Callback_1_(unwrap_jso(this), name);
+  String stat(String name) => _blink.BlinkRTCStatsReport.instance.stat_Callback_1_(this, name);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -31970,32 +32331,26 @@
   // To suppress missing implicit constructor warnings.
   factory RtcStatsResponse._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static RtcStatsResponse internalCreateRtcStatsResponse() {
-    return new RtcStatsResponse._internalWrap();
-  }
 
-  factory RtcStatsResponse._internalWrap() {
-    return new RtcStatsResponse.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RtcStatsResponse.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+  RtcStatsReport namedItem(String name) {
+    if ((name is String || name == null)) {
+      return _blink.BlinkRTCStatsResponse.instance.namedItem_Callback_1_(this, name);
+    }
+    if ((name is String || name == null)) {
+      return _blink.BlinkRTCStatsResponse.instance.namedItem_Callback_1_(this, name);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
 
-  @DomName('RTCStatsResponse.__getter__')
-  @DocsEditable()
-  RtcStatsReport __getter__(String name) => wrap_jso(_blink.BlinkRTCStatsResponse.instance.$__getter___Callback_1_(unwrap_jso(this), name));
-  
-  @DomName('RTCStatsResponse.namedItem')
-  @DocsEditable()
-  RtcStatsReport namedItem(String name) => wrap_jso(_blink.BlinkRTCStatsResponse.instance.namedItem_Callback_1_(unwrap_jso(this), name));
-  
   @DomName('RTCStatsResponse.result')
   @DocsEditable()
-  List<RtcStatsReport> result() => wrap_jso(_blink.BlinkRTCStatsResponse.instance.result_Callback_0_(unwrap_jso(this)));
+  List<RtcStatsReport> result() => _blink.BlinkRTCStatsResponse.instance.result_Callback_0_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -32016,59 +32371,51 @@
   // To suppress missing implicit constructor warnings.
   factory Screen._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Screen internalCreateScreen() {
-    return new Screen._internalWrap();
-  }
 
-  factory Screen._internalWrap() {
-    return new Screen.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Screen.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Screen.availHeight')
   @DocsEditable()
-  int get _availHeight => _blink.BlinkScreen.instance.availHeight_Getter_(unwrap_jso(this));
+  int get _availHeight => _blink.BlinkScreen.instance.availHeight_Getter_(this);
   
   @DomName('Screen.availLeft')
   @DocsEditable()
   @Experimental() // nonstandard
-  int get _availLeft => _blink.BlinkScreen.instance.availLeft_Getter_(unwrap_jso(this));
+  int get _availLeft => _blink.BlinkScreen.instance.availLeft_Getter_(this);
   
   @DomName('Screen.availTop')
   @DocsEditable()
   @Experimental() // nonstandard
-  int get _availTop => _blink.BlinkScreen.instance.availTop_Getter_(unwrap_jso(this));
+  int get _availTop => _blink.BlinkScreen.instance.availTop_Getter_(this);
   
   @DomName('Screen.availWidth')
   @DocsEditable()
-  int get _availWidth => _blink.BlinkScreen.instance.availWidth_Getter_(unwrap_jso(this));
+  int get _availWidth => _blink.BlinkScreen.instance.availWidth_Getter_(this);
   
   @DomName('Screen.colorDepth')
   @DocsEditable()
-  int get colorDepth => _blink.BlinkScreen.instance.colorDepth_Getter_(unwrap_jso(this));
+  int get colorDepth => _blink.BlinkScreen.instance.colorDepth_Getter_(this);
   
   @DomName('Screen.height')
   @DocsEditable()
-  int get height => _blink.BlinkScreen.instance.height_Getter_(unwrap_jso(this));
+  int get height => _blink.BlinkScreen.instance.height_Getter_(this);
   
   @DomName('Screen.orientation')
   @DocsEditable()
   @Experimental() // untriaged
-  ScreenOrientation get orientation => wrap_jso(_blink.BlinkScreen.instance.orientation_Getter_(unwrap_jso(this)));
+  ScreenOrientation get orientation => _blink.BlinkScreen.instance.orientation_Getter_(this);
   
   @DomName('Screen.pixelDepth')
   @DocsEditable()
-  int get pixelDepth => _blink.BlinkScreen.instance.pixelDepth_Getter_(unwrap_jso(this));
+  int get pixelDepth => _blink.BlinkScreen.instance.pixelDepth_Getter_(this);
   
   @DomName('Screen.width')
   @DocsEditable()
-  int get width => _blink.BlinkScreen.instance.width_Getter_(unwrap_jso(this));
+  int get width => _blink.BlinkScreen.instance.width_Getter_(this);
   }
 // 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
@@ -32091,11 +32438,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ScreenOrientation internalCreateScreenOrientation() {
-    return new ScreenOrientation._internalWrap();
-  }
-
-  external factory ScreenOrientation._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ScreenOrientation.internal_() : super.internal_();
@@ -32104,22 +32447,22 @@
   @DomName('ScreenOrientation.angle')
   @DocsEditable()
   @Experimental() // untriaged
-  int get angle => _blink.BlinkScreenOrientation.instance.angle_Getter_(unwrap_jso(this));
+  int get angle => _blink.BlinkScreenOrientation.instance.angle_Getter_(this);
   
   @DomName('ScreenOrientation.type')
   @DocsEditable()
   @Experimental() // untriaged
-  String get type => _blink.BlinkScreenOrientation.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkScreenOrientation.instance.type_Getter_(this);
   
   @DomName('ScreenOrientation.lock')
   @DocsEditable()
   @Experimental() // untriaged
-  Future lock(String orientation) => wrap_jso(_blink.BlinkScreenOrientation.instance.lock_Callback_1_(unwrap_jso(this), orientation));
+  Future lock(String orientation) => convertNativePromiseToDartFuture(_blink.BlinkScreenOrientation.instance.lock_Callback_1_(this, orientation));
   
   @DomName('ScreenOrientation.unlock')
   @DocsEditable()
   @Experimental() // untriaged
-  void unlock() => _blink.BlinkScreenOrientation.instance.unlock_Callback_0_(unwrap_jso(this));
+  void unlock() => _blink.BlinkScreenOrientation.instance.unlock_Callback_0_(this);
   
   @DomName('ScreenOrientation.onchange')
   @DocsEditable()
@@ -32146,11 +32489,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ScriptElement internalCreateScriptElement() {
-    return new ScriptElement._internalWrap();
-  }
-
-  external factory ScriptElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ScriptElement.internal_() : super.internal_();
@@ -32164,77 +32503,184 @@
 
   @DomName('HTMLScriptElement.async')
   @DocsEditable()
-  bool get async => _blink.BlinkHTMLScriptElement.instance.async_Getter_(unwrap_jso(this));
+  bool get async => _blink.BlinkHTMLScriptElement.instance.async_Getter_(this);
   
   @DomName('HTMLScriptElement.async')
   @DocsEditable()
-  set async(bool value) => _blink.BlinkHTMLScriptElement.instance.async_Setter_(unwrap_jso(this), value);
+  set async(bool value) => _blink.BlinkHTMLScriptElement.instance.async_Setter_(this, value);
   
   @DomName('HTMLScriptElement.charset')
   @DocsEditable()
-  String get charset => _blink.BlinkHTMLScriptElement.instance.charset_Getter_(unwrap_jso(this));
+  String get charset => _blink.BlinkHTMLScriptElement.instance.charset_Getter_(this);
   
   @DomName('HTMLScriptElement.charset')
   @DocsEditable()
-  set charset(String value) => _blink.BlinkHTMLScriptElement.instance.charset_Setter_(unwrap_jso(this), value);
+  set charset(String value) => _blink.BlinkHTMLScriptElement.instance.charset_Setter_(this, value);
   
   @DomName('HTMLScriptElement.crossOrigin')
   @DocsEditable()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#attr-script-crossorigin
   @Experimental()
-  String get crossOrigin => _blink.BlinkHTMLScriptElement.instance.crossOrigin_Getter_(unwrap_jso(this));
+  String get crossOrigin => _blink.BlinkHTMLScriptElement.instance.crossOrigin_Getter_(this);
   
   @DomName('HTMLScriptElement.crossOrigin')
   @DocsEditable()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#attr-script-crossorigin
   @Experimental()
-  set crossOrigin(String value) => _blink.BlinkHTMLScriptElement.instance.crossOrigin_Setter_(unwrap_jso(this), value);
+  set crossOrigin(String value) => _blink.BlinkHTMLScriptElement.instance.crossOrigin_Setter_(this, value);
   
   @DomName('HTMLScriptElement.defer')
   @DocsEditable()
-  bool get defer => _blink.BlinkHTMLScriptElement.instance.defer_Getter_(unwrap_jso(this));
+  bool get defer => _blink.BlinkHTMLScriptElement.instance.defer_Getter_(this);
   
   @DomName('HTMLScriptElement.defer')
   @DocsEditable()
-  set defer(bool value) => _blink.BlinkHTMLScriptElement.instance.defer_Setter_(unwrap_jso(this), value);
+  set defer(bool value) => _blink.BlinkHTMLScriptElement.instance.defer_Setter_(this, value);
   
   @DomName('HTMLScriptElement.integrity')
   @DocsEditable()
   @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLScriptElement.instance.integrity_Getter_(unwrap_jso(this));
+  String get integrity => _blink.BlinkHTMLScriptElement.instance.integrity_Getter_(this);
   
   @DomName('HTMLScriptElement.integrity')
   @DocsEditable()
   @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLScriptElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  set integrity(String value) => _blink.BlinkHTMLScriptElement.instance.integrity_Setter_(this, value);
   
   @DomName('HTMLScriptElement.nonce')
   @DocsEditable()
   // https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#interaction-with-the-script-src-directive
   @Experimental()
-  String get nonce => _blink.BlinkHTMLScriptElement.instance.nonce_Getter_(unwrap_jso(this));
+  String get nonce => _blink.BlinkHTMLScriptElement.instance.nonce_Getter_(this);
   
   @DomName('HTMLScriptElement.nonce')
   @DocsEditable()
   // https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#interaction-with-the-script-src-directive
   @Experimental()
-  set nonce(String value) => _blink.BlinkHTMLScriptElement.instance.nonce_Setter_(unwrap_jso(this), value);
+  set nonce(String value) => _blink.BlinkHTMLScriptElement.instance.nonce_Setter_(this, value);
   
   @DomName('HTMLScriptElement.src')
   @DocsEditable()
-  String get src => _blink.BlinkHTMLScriptElement.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkHTMLScriptElement.instance.src_Getter_(this);
   
   @DomName('HTMLScriptElement.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkHTMLScriptElement.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkHTMLScriptElement.instance.src_Setter_(this, value);
   
   @DomName('HTMLScriptElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLScriptElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLScriptElement.instance.type_Getter_(this);
   
   @DomName('HTMLScriptElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLScriptElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLScriptElement.instance.type_Setter_(this, value);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('ScrollState')
+@Experimental() // untriaged
+class ScrollState extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory ScrollState._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ScrollState.ScrollState')
+  @DocsEditable()
+  factory ScrollState([num deltaX, num deltaY, num deltaGranularity, num velocityX, num velocityY, bool inInertialPhase, bool isBeginning, bool isEnding]) {
+    if (isEnding != null) {
+      return _blink.BlinkScrollState.instance.constructorCallback_8_(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase, isBeginning, isEnding);
+    }
+    if (isBeginning != null) {
+      return _blink.BlinkScrollState.instance.constructorCallback_7_(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase, isBeginning);
+    }
+    if (inInertialPhase != null) {
+      return _blink.BlinkScrollState.instance.constructorCallback_6_(deltaX, deltaY, deltaGranularity, velocityX, velocityY, inInertialPhase);
+    }
+    if (velocityY != null) {
+      return _blink.BlinkScrollState.instance.constructorCallback_5_(deltaX, deltaY, deltaGranularity, velocityX, velocityY);
+    }
+    if (velocityX != null) {
+      return _blink.BlinkScrollState.instance.constructorCallback_4_(deltaX, deltaY, deltaGranularity, velocityX);
+    }
+    if (deltaGranularity != null) {
+      return _blink.BlinkScrollState.instance.constructorCallback_3_(deltaX, deltaY, deltaGranularity);
+    }
+    if (deltaY != null) {
+      return _blink.BlinkScrollState.instance.constructorCallback_2_(deltaX, deltaY);
+    }
+    if (deltaX != null) {
+      return _blink.BlinkScrollState.instance.constructorCallback_1_(deltaX);
+    }
+    return _blink.BlinkScrollState.instance.constructorCallback_0_();
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ScrollState.internal_() { }
+
+  @DomName('ScrollState.deltaGranularity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get deltaGranularity => _blink.BlinkScrollState.instance.deltaGranularity_Getter_(this);
+  
+  @DomName('ScrollState.deltaX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get deltaX => _blink.BlinkScrollState.instance.deltaX_Getter_(this);
+  
+  @DomName('ScrollState.deltaY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get deltaY => _blink.BlinkScrollState.instance.deltaY_Getter_(this);
+  
+  @DomName('ScrollState.fromUserInput')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get fromUserInput => _blink.BlinkScrollState.instance.fromUserInput_Getter_(this);
+  
+  @DomName('ScrollState.inInertialPhase')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get inInertialPhase => _blink.BlinkScrollState.instance.inInertialPhase_Getter_(this);
+  
+  @DomName('ScrollState.isBeginning')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get isBeginning => _blink.BlinkScrollState.instance.isBeginning_Getter_(this);
+  
+  @DomName('ScrollState.isEnding')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get isEnding => _blink.BlinkScrollState.instance.isEnding_Getter_(this);
+  
+  @DomName('ScrollState.shouldPropagate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get shouldPropagate => _blink.BlinkScrollState.instance.shouldPropagate_Getter_(this);
+  
+  @DomName('ScrollState.velocityX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get velocityX => _blink.BlinkScrollState.instance.velocityX_Getter_(this);
+  
+  @DomName('ScrollState.velocityY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get velocityY => _blink.BlinkScrollState.instance.velocityY_Getter_(this);
+  
+  @DomName('ScrollState.consumeDelta')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void consumeDelta(num x, num y) => _blink.BlinkScrollState.instance.consumeDelta_Callback_2_(this, x, y);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -32252,13 +32698,19 @@
   // To suppress missing implicit constructor warnings.
   factory SecurityPolicyViolationEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static SecurityPolicyViolationEvent internalCreateSecurityPolicyViolationEvent() {
-    return new SecurityPolicyViolationEvent._internalWrap();
+  @DomName('SecurityPolicyViolationEvent.SecurityPolicyViolationEvent')
+  @DocsEditable()
+  factory SecurityPolicyViolationEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkSecurityPolicyViolationEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkSecurityPolicyViolationEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory SecurityPolicyViolationEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SecurityPolicyViolationEvent.internal_() : super.internal_();
@@ -32266,44 +32718,44 @@
 
   @DomName('SecurityPolicyViolationEvent.blockedURI')
   @DocsEditable()
-  String get blockedUri => _blink.BlinkSecurityPolicyViolationEvent.instance.blockedURI_Getter_(unwrap_jso(this));
+  String get blockedUri => _blink.BlinkSecurityPolicyViolationEvent.instance.blockedURI_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.columnNumber')
   @DocsEditable()
-  int get columnNumber => _blink.BlinkSecurityPolicyViolationEvent.instance.columnNumber_Getter_(unwrap_jso(this));
+  int get columnNumber => _blink.BlinkSecurityPolicyViolationEvent.instance.columnNumber_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.documentURI')
   @DocsEditable()
-  String get documentUri => _blink.BlinkSecurityPolicyViolationEvent.instance.documentURI_Getter_(unwrap_jso(this));
+  String get documentUri => _blink.BlinkSecurityPolicyViolationEvent.instance.documentURI_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.effectiveDirective')
   @DocsEditable()
-  String get effectiveDirective => _blink.BlinkSecurityPolicyViolationEvent.instance.effectiveDirective_Getter_(unwrap_jso(this));
+  String get effectiveDirective => _blink.BlinkSecurityPolicyViolationEvent.instance.effectiveDirective_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.lineNumber')
   @DocsEditable()
-  int get lineNumber => _blink.BlinkSecurityPolicyViolationEvent.instance.lineNumber_Getter_(unwrap_jso(this));
+  int get lineNumber => _blink.BlinkSecurityPolicyViolationEvent.instance.lineNumber_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.originalPolicy')
   @DocsEditable()
-  String get originalPolicy => _blink.BlinkSecurityPolicyViolationEvent.instance.originalPolicy_Getter_(unwrap_jso(this));
+  String get originalPolicy => _blink.BlinkSecurityPolicyViolationEvent.instance.originalPolicy_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.referrer')
   @DocsEditable()
-  String get referrer => _blink.BlinkSecurityPolicyViolationEvent.instance.referrer_Getter_(unwrap_jso(this));
+  String get referrer => _blink.BlinkSecurityPolicyViolationEvent.instance.referrer_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.sourceFile')
   @DocsEditable()
-  String get sourceFile => _blink.BlinkSecurityPolicyViolationEvent.instance.sourceFile_Getter_(unwrap_jso(this));
+  String get sourceFile => _blink.BlinkSecurityPolicyViolationEvent.instance.sourceFile_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.statusCode')
   @DocsEditable()
   @Experimental() // untriaged
-  int get statusCode => _blink.BlinkSecurityPolicyViolationEvent.instance.statusCode_Getter_(unwrap_jso(this));
+  int get statusCode => _blink.BlinkSecurityPolicyViolationEvent.instance.statusCode_Getter_(this);
   
   @DomName('SecurityPolicyViolationEvent.violatedDirective')
   @DocsEditable()
-  String get violatedDirective => _blink.BlinkSecurityPolicyViolationEvent.instance.violatedDirective_Getter_(unwrap_jso(this));
+  String get violatedDirective => _blink.BlinkSecurityPolicyViolationEvent.instance.violatedDirective_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -32322,11 +32774,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SelectElement internalCreateSelectElement() {
-    return new SelectElement._internalWrap();
-  }
-
-  external factory SelectElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SelectElement.internal_() : super.internal_();
@@ -32340,125 +32788,130 @@
 
   @DomName('HTMLSelectElement.autofocus')
   @DocsEditable()
-  bool get autofocus => _blink.BlinkHTMLSelectElement.instance.autofocus_Getter_(unwrap_jso(this));
+  bool get autofocus => _blink.BlinkHTMLSelectElement.instance.autofocus_Getter_(this);
   
   @DomName('HTMLSelectElement.autofocus')
   @DocsEditable()
-  set autofocus(bool value) => _blink.BlinkHTMLSelectElement.instance.autofocus_Setter_(unwrap_jso(this), value);
+  set autofocus(bool value) => _blink.BlinkHTMLSelectElement.instance.autofocus_Setter_(this, value);
   
   @DomName('HTMLSelectElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLSelectElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLSelectElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLSelectElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLSelectElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLSelectElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLSelectElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLSelectElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLSelectElement.instance.form_Getter_(this);
   
   @DomName('HTMLSelectElement.labels')
   @DocsEditable()
   @Unstable()
-  List<Node> get labels => wrap_jso(_blink.BlinkHTMLSelectElement.instance.labels_Getter_(unwrap_jso(this)));
+  List<Node> get labels => (_blink.BlinkHTMLSelectElement.instance.labels_Getter_(this));
   
   @DomName('HTMLSelectElement.length')
   @DocsEditable()
-  int get length => _blink.BlinkHTMLSelectElement.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkHTMLSelectElement.instance.length_Getter_(this);
   
   @DomName('HTMLSelectElement.length')
   @DocsEditable()
-  set length(int value) => _blink.BlinkHTMLSelectElement.instance.length_Setter_(unwrap_jso(this), value);
+  set length(int value) => _blink.BlinkHTMLSelectElement.instance.length_Setter_(this, value);
   
   @DomName('HTMLSelectElement.multiple')
   @DocsEditable()
-  bool get multiple => _blink.BlinkHTMLSelectElement.instance.multiple_Getter_(unwrap_jso(this));
+  bool get multiple => _blink.BlinkHTMLSelectElement.instance.multiple_Getter_(this);
   
   @DomName('HTMLSelectElement.multiple')
   @DocsEditable()
-  set multiple(bool value) => _blink.BlinkHTMLSelectElement.instance.multiple_Setter_(unwrap_jso(this), value);
+  set multiple(bool value) => _blink.BlinkHTMLSelectElement.instance.multiple_Setter_(this, value);
   
   @DomName('HTMLSelectElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLSelectElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLSelectElement.instance.name_Getter_(this);
   
   @DomName('HTMLSelectElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLSelectElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLSelectElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLSelectElement.required')
   @DocsEditable()
-  bool get required => _blink.BlinkHTMLSelectElement.instance.required_Getter_(unwrap_jso(this));
+  bool get required => _blink.BlinkHTMLSelectElement.instance.required_Getter_(this);
   
   @DomName('HTMLSelectElement.required')
   @DocsEditable()
-  set required(bool value) => _blink.BlinkHTMLSelectElement.instance.required_Setter_(unwrap_jso(this), value);
+  set required(bool value) => _blink.BlinkHTMLSelectElement.instance.required_Setter_(this, value);
   
   @DomName('HTMLSelectElement.selectedIndex')
   @DocsEditable()
-  int get selectedIndex => _blink.BlinkHTMLSelectElement.instance.selectedIndex_Getter_(unwrap_jso(this));
+  int get selectedIndex => _blink.BlinkHTMLSelectElement.instance.selectedIndex_Getter_(this);
   
   @DomName('HTMLSelectElement.selectedIndex')
   @DocsEditable()
-  set selectedIndex(int value) => _blink.BlinkHTMLSelectElement.instance.selectedIndex_Setter_(unwrap_jso(this), value);
+  set selectedIndex(int value) => _blink.BlinkHTMLSelectElement.instance.selectedIndex_Setter_(this, value);
   
   @DomName('HTMLSelectElement.size')
   @DocsEditable()
-  int get size => _blink.BlinkHTMLSelectElement.instance.size_Getter_(unwrap_jso(this));
+  int get size => _blink.BlinkHTMLSelectElement.instance.size_Getter_(this);
   
   @DomName('HTMLSelectElement.size')
   @DocsEditable()
-  set size(int value) => _blink.BlinkHTMLSelectElement.instance.size_Setter_(unwrap_jso(this), value);
+  set size(int value) => _blink.BlinkHTMLSelectElement.instance.size_Setter_(this, value);
   
   @DomName('HTMLSelectElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLSelectElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLSelectElement.instance.type_Getter_(this);
   
   @DomName('HTMLSelectElement.validationMessage')
   @DocsEditable()
-  String get validationMessage => _blink.BlinkHTMLSelectElement.instance.validationMessage_Getter_(unwrap_jso(this));
+  String get validationMessage => _blink.BlinkHTMLSelectElement.instance.validationMessage_Getter_(this);
   
   @DomName('HTMLSelectElement.validity')
   @DocsEditable()
-  ValidityState get validity => wrap_jso(_blink.BlinkHTMLSelectElement.instance.validity_Getter_(unwrap_jso(this)));
+  ValidityState get validity => _blink.BlinkHTMLSelectElement.instance.validity_Getter_(this);
   
   @DomName('HTMLSelectElement.value')
   @DocsEditable()
-  String get value => _blink.BlinkHTMLSelectElement.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkHTMLSelectElement.instance.value_Getter_(this);
   
   @DomName('HTMLSelectElement.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkHTMLSelectElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkHTMLSelectElement.instance.value_Setter_(this, value);
   
   @DomName('HTMLSelectElement.willValidate')
   @DocsEditable()
-  bool get willValidate => _blink.BlinkHTMLSelectElement.instance.willValidate_Getter_(unwrap_jso(this));
+  bool get willValidate => _blink.BlinkHTMLSelectElement.instance.willValidate_Getter_(this);
   
   @DomName('HTMLSelectElement.__setter__')
   @DocsEditable()
-  void __setter__(int index, OptionElement value) => _blink.BlinkHTMLSelectElement.instance.$__setter___Callback_2_(unwrap_jso(this), index, unwrap_jso(value));
+  void __setter__(int index, OptionElement option) => _blink.BlinkHTMLSelectElement.instance.$__setter___Callback_2_(this, index, option);
   
   @DomName('HTMLSelectElement.add')
   @DocsEditable()
   @Experimental() // untriaged
-  void add(HtmlElement element, int before) => _blink.BlinkHTMLSelectElement.instance.add_Callback_2_(unwrap_jso(this), unwrap_jso(element), before);
+  void add(Object element, Object before) => _blink.BlinkHTMLSelectElement.instance.add_Callback_2_(this, element, before);
   
   @DomName('HTMLSelectElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLSelectElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLSelectElement.instance.checkValidity_Callback_0_(this);
   
   @DomName('HTMLSelectElement.item')
   @DocsEditable()
-  Element item(int index) => wrap_jso(_blink.BlinkHTMLSelectElement.instance.item_Callback_1_(unwrap_jso(this), index));
+  Element item(int index) => _blink.BlinkHTMLSelectElement.instance.item_Callback_1_(this, index);
   
   @DomName('HTMLSelectElement.namedItem')
   @DocsEditable()
-  Element namedItem(String name) => wrap_jso(_blink.BlinkHTMLSelectElement.instance.namedItem_Callback_1_(unwrap_jso(this), name));
+  OptionElement namedItem(String name) => _blink.BlinkHTMLSelectElement.instance.namedItem_Callback_1_(this, name);
+  
+  @DomName('HTMLSelectElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLSelectElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLSelectElement.setCustomValidity')
   @DocsEditable()
-  void setCustomValidity(String error) => _blink.BlinkHTMLSelectElement.instance.setCustomValidity_Callback_1_(unwrap_jso(this), error);
+  void setCustomValidity(String error) => _blink.BlinkHTMLSelectElement.instance.setCustomValidity_Callback_1_(this, error);
   
 
   // Override default options, since IE returns SelectElement itself and it
@@ -32492,142 +32945,134 @@
   // To suppress missing implicit constructor warnings.
   factory Selection._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Selection internalCreateSelection() {
-    return new Selection._internalWrap();
-  }
 
-  factory Selection._internalWrap() {
-    return new Selection.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Selection.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Selection.anchorNode')
   @DocsEditable()
-  Node get anchorNode => wrap_jso(_blink.BlinkSelection.instance.anchorNode_Getter_(unwrap_jso(this)));
+  Node get anchorNode => _blink.BlinkSelection.instance.anchorNode_Getter_(this);
   
   @DomName('Selection.anchorOffset')
   @DocsEditable()
-  int get anchorOffset => _blink.BlinkSelection.instance.anchorOffset_Getter_(unwrap_jso(this));
+  int get anchorOffset => _blink.BlinkSelection.instance.anchorOffset_Getter_(this);
   
   @DomName('Selection.baseNode')
   @DocsEditable()
   @Experimental() // non-standard
-  Node get baseNode => wrap_jso(_blink.BlinkSelection.instance.baseNode_Getter_(unwrap_jso(this)));
+  Node get baseNode => _blink.BlinkSelection.instance.baseNode_Getter_(this);
   
   @DomName('Selection.baseOffset')
   @DocsEditable()
   @Experimental() // non-standard
-  int get baseOffset => _blink.BlinkSelection.instance.baseOffset_Getter_(unwrap_jso(this));
+  int get baseOffset => _blink.BlinkSelection.instance.baseOffset_Getter_(this);
   
   @DomName('Selection.extentNode')
   @DocsEditable()
   @Experimental() // non-standard
-  Node get extentNode => wrap_jso(_blink.BlinkSelection.instance.extentNode_Getter_(unwrap_jso(this)));
+  Node get extentNode => _blink.BlinkSelection.instance.extentNode_Getter_(this);
   
   @DomName('Selection.extentOffset')
   @DocsEditable()
   @Experimental() // non-standard
-  int get extentOffset => _blink.BlinkSelection.instance.extentOffset_Getter_(unwrap_jso(this));
+  int get extentOffset => _blink.BlinkSelection.instance.extentOffset_Getter_(this);
   
   @DomName('Selection.focusNode')
   @DocsEditable()
-  Node get focusNode => wrap_jso(_blink.BlinkSelection.instance.focusNode_Getter_(unwrap_jso(this)));
+  Node get focusNode => _blink.BlinkSelection.instance.focusNode_Getter_(this);
   
   @DomName('Selection.focusOffset')
   @DocsEditable()
-  int get focusOffset => _blink.BlinkSelection.instance.focusOffset_Getter_(unwrap_jso(this));
+  int get focusOffset => _blink.BlinkSelection.instance.focusOffset_Getter_(this);
   
   @DomName('Selection.isCollapsed')
   @DocsEditable()
-  bool get isCollapsed => _blink.BlinkSelection.instance.isCollapsed_Getter_(unwrap_jso(this));
+  bool get isCollapsed => _blink.BlinkSelection.instance.isCollapsed_Getter_(this);
   
   @DomName('Selection.rangeCount')
   @DocsEditable()
-  int get rangeCount => _blink.BlinkSelection.instance.rangeCount_Getter_(unwrap_jso(this));
+  int get rangeCount => _blink.BlinkSelection.instance.rangeCount_Getter_(this);
   
   @DomName('Selection.type')
   @DocsEditable()
   @Experimental() // non-standard
-  String get type => _blink.BlinkSelection.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkSelection.instance.type_Getter_(this);
   
   @DomName('Selection.addRange')
   @DocsEditable()
-  void addRange(Range range) => _blink.BlinkSelection.instance.addRange_Callback_1_(unwrap_jso(this), unwrap_jso(range));
+  void addRange(Range range) => _blink.BlinkSelection.instance.addRange_Callback_1_(this, range);
   
   void collapse(Node node, [int offset]) {
     if (offset != null) {
-      _blink.BlinkSelection.instance.collapse_Callback_2_(unwrap_jso(this), unwrap_jso(node), offset);
+      _blink.BlinkSelection.instance.collapse_Callback_2_(this, node, offset);
       return;
     }
-    _blink.BlinkSelection.instance.collapse_Callback_1_(unwrap_jso(this), unwrap_jso(node));
+    _blink.BlinkSelection.instance.collapse_Callback_1_(this, node);
     return;
   }
 
   @DomName('Selection.collapseToEnd')
   @DocsEditable()
-  void collapseToEnd() => _blink.BlinkSelection.instance.collapseToEnd_Callback_0_(unwrap_jso(this));
+  void collapseToEnd() => _blink.BlinkSelection.instance.collapseToEnd_Callback_0_(this);
   
   @DomName('Selection.collapseToStart')
   @DocsEditable()
-  void collapseToStart() => _blink.BlinkSelection.instance.collapseToStart_Callback_0_(unwrap_jso(this));
+  void collapseToStart() => _blink.BlinkSelection.instance.collapseToStart_Callback_0_(this);
   
   @DomName('Selection.containsNode')
   @DocsEditable()
   @Experimental() // non-standard
-  bool containsNode(Node node, bool allowPartial) => _blink.BlinkSelection.instance.containsNode_Callback_2_(unwrap_jso(this), unwrap_jso(node), allowPartial);
+  bool containsNode(Node node, bool allowPartialContainment) => _blink.BlinkSelection.instance.containsNode_Callback_2_(this, node, allowPartialContainment);
   
   @DomName('Selection.deleteFromDocument')
   @DocsEditable()
-  void deleteFromDocument() => _blink.BlinkSelection.instance.deleteFromDocument_Callback_0_(unwrap_jso(this));
+  void deleteFromDocument() => _blink.BlinkSelection.instance.deleteFromDocument_Callback_0_(this);
   
   @DomName('Selection.empty')
   @DocsEditable()
   @Experimental() // non-standard
-  void empty() => _blink.BlinkSelection.instance.empty_Callback_0_(unwrap_jso(this));
+  void empty() => _blink.BlinkSelection.instance.empty_Callback_0_(this);
   
   void extend(Node node, [int offset]) {
     if (offset != null) {
-      _blink.BlinkSelection.instance.extend_Callback_2_(unwrap_jso(this), unwrap_jso(node), offset);
+      _blink.BlinkSelection.instance.extend_Callback_2_(this, node, offset);
       return;
     }
-    _blink.BlinkSelection.instance.extend_Callback_1_(unwrap_jso(this), unwrap_jso(node));
+    _blink.BlinkSelection.instance.extend_Callback_1_(this, node);
     return;
   }
 
   @DomName('Selection.getRangeAt')
   @DocsEditable()
-  Range getRangeAt(int index) => wrap_jso(_blink.BlinkSelection.instance.getRangeAt_Callback_1_(unwrap_jso(this), index));
+  Range getRangeAt(int index) => _blink.BlinkSelection.instance.getRangeAt_Callback_1_(this, index);
   
   @DomName('Selection.modify')
   @DocsEditable()
   @Experimental() // non-standard
-  void modify(String alter, String direction, String granularity) => _blink.BlinkSelection.instance.modify_Callback_3_(unwrap_jso(this), alter, direction, granularity);
+  void modify(String alter, String direction, String granularity) => _blink.BlinkSelection.instance.modify_Callback_3_(this, alter, direction, granularity);
   
   @DomName('Selection.removeAllRanges')
   @DocsEditable()
-  void removeAllRanges() => _blink.BlinkSelection.instance.removeAllRanges_Callback_0_(unwrap_jso(this));
+  void removeAllRanges() => _blink.BlinkSelection.instance.removeAllRanges_Callback_0_(this);
   
   @DomName('Selection.selectAllChildren')
   @DocsEditable()
-  void selectAllChildren(Node node) => _blink.BlinkSelection.instance.selectAllChildren_Callback_1_(unwrap_jso(this), unwrap_jso(node));
+  void selectAllChildren(Node node) => _blink.BlinkSelection.instance.selectAllChildren_Callback_1_(this, node);
   
   @DomName('Selection.setBaseAndExtent')
   @DocsEditable()
   @Experimental() // non-standard
-  void setBaseAndExtent(Node baseNode, int baseOffset, Node extentNode, int extentOffset) => _blink.BlinkSelection.instance.setBaseAndExtent_Callback_4_(unwrap_jso(this), unwrap_jso(baseNode), baseOffset, unwrap_jso(extentNode), extentOffset);
+  void setBaseAndExtent(Node baseNode, int baseOffset, Node extentNode, int extentOffset) => _blink.BlinkSelection.instance.setBaseAndExtent_Callback_4_(this, baseNode, baseOffset, extentNode, extentOffset);
   
   void setPosition(Node node, [int offset]) {
     if (offset != null) {
-      _blink.BlinkSelection.instance.setPosition_Callback_2_(unwrap_jso(this), unwrap_jso(node), offset);
+      _blink.BlinkSelection.instance.setPosition_Callback_2_(this, node, offset);
       return;
     }
-    _blink.BlinkSelection.instance.setPosition_Callback_1_(unwrap_jso(this), unwrap_jso(node));
+    _blink.BlinkSelection.instance.setPosition_Callback_1_(this, node);
     return;
   }
 
@@ -32640,37 +33085,48 @@
 
 
 @DocsEditable()
-@DomName('ServiceWorkerClient')
+@DomName('ServicePort')
 @Experimental() // untriaged
-class ServiceWorkerClient extends DartHtmlDomObject {
+class ServicePort extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
-  factory ServiceWorkerClient._() { throw new UnsupportedError("Not supported"); }
+  factory ServicePort._() { throw new UnsupportedError("Not supported"); }
+
 
   @Deprecated("Internal Use Only")
-  static ServiceWorkerClient internalCreateServiceWorkerClient() {
-    return new ServiceWorkerClient._internalWrap();
-  }
-
-  factory ServiceWorkerClient._internalWrap() {
-    return new ServiceWorkerClient.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
-  ServiceWorkerClient.internal_() { }
+  ServicePort.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('ServiceWorkerClient.id')
+  @DomName('ServicePort.data')
   @DocsEditable()
   @Experimental() // untriaged
-  int get id => _blink.BlinkServiceWorkerClient.instance.id_Getter_(unwrap_jso(this));
+  Object get data => (_blink.BlinkServicePort.instance.data_Getter_(this));
   
-  @DomName('ServiceWorkerClient.postMessage')
+  @DomName('ServicePort.name')
   @DocsEditable()
   @Experimental() // untriaged
-  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) => _blink.BlinkServiceWorkerClient.instance.postMessage_Callback_2_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(message), transfer);
+  String get name => _blink.BlinkServicePort.instance.name_Getter_(this);
   
+  @DomName('ServicePort.targetURL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get targetUrl => _blink.BlinkServicePort.instance.targetURL_Getter_(this);
+  
+  @DomName('ServicePort.close')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void close() => _blink.BlinkServicePort.instance.close_Callback_0_(this);
+  
+  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      _blink.BlinkServicePort.instance.postMessage_Callback_2_(this, convertDartToNative_SerializedScriptValue(message), transfer);
+      return;
+    }
+    _blink.BlinkServicePort.instance.postMessage_Callback_1_(this, convertDartToNative_SerializedScriptValue(message));
+    return;
+  }
+
 }
 // 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
@@ -32680,34 +33136,97 @@
 
 
 @DocsEditable()
-@DomName('ServiceWorkerClients')
+@DomName('ServicePortCollection')
 @Experimental() // untriaged
-class ServiceWorkerClients extends DartHtmlDomObject {
+class ServicePortCollection extends EventTarget {
   // To suppress missing implicit constructor warnings.
-  factory ServiceWorkerClients._() { throw new UnsupportedError("Not supported"); }
+  factory ServicePortCollection._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ServicePortCollection.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
 
   @Deprecated("Internal Use Only")
-  static ServiceWorkerClients internalCreateServiceWorkerClients() {
-    return new ServiceWorkerClients._internalWrap();
-  }
-
-  factory ServiceWorkerClients._internalWrap() {
-    return new ServiceWorkerClients.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
-  ServiceWorkerClients.internal_() { }
+  ServicePortCollection.internal_() : super.internal_();
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
 
-  Future getAll([Map options]) {
+  Future connect(String url, [Map options]) {
     if (options != null) {
-      return wrap_jso(_blink.BlinkServiceWorkerClients.instance.getAll_Callback_1_(unwrap_jso(this), convertDartToNative_Dictionary(options)));
+      return _blink.BlinkServicePortCollection.instance.connect_Callback_2_(this, url, convertDartToNative_Dictionary(options));
     }
-    return wrap_jso(_blink.BlinkServiceWorkerClients.instance.getAll_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkServicePortCollection.instance.connect_Callback_1_(this, url);
   }
 
+  @DomName('ServicePortCollection.match')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future match(Map options) => convertNativePromiseToDartFuture(_blink.BlinkServicePortCollection.instance.match_Callback_1_(this, convertDartToNative_Dictionary(options)));
+  
+  Future matchAll([Map options]) {
+    if (options != null) {
+      return _blink.BlinkServicePortCollection.instance.matchAll_Callback_1_(this, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkServicePortCollection.instance.matchAll_Callback_0_(this);
+  }
+
+  @DomName('ServicePortCollection.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('ServicePortConnectEvent')
+@Experimental() // untriaged
+class ServicePortConnectEvent extends ExtendableEvent {
+  // To suppress missing implicit constructor warnings.
+  factory ServicePortConnectEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ServicePortConnectEvent.ServicePortConnectEvent')
+  @DocsEditable()
+  factory ServicePortConnectEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkServicePortConnectEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkServicePortConnectEvent.instance.constructorCallback_1_(type);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ServicePortConnectEvent.internal_() : super.internal_();
+
+
+  @DomName('ServicePortConnectEvent.origin')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get origin => _blink.BlinkServicePortConnectEvent.instance.origin_Getter_(this);
+  
+  @DomName('ServicePortConnectEvent.targetURL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get targetUrl => _blink.BlinkServicePortConnectEvent.instance.targetURL_Getter_(this);
+  
+  @DomName('ServicePortConnectEvent.respondWith')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future respondWith(Future response) => convertNativePromiseToDartFuture(_blink.BlinkServicePortConnectEvent.instance.respondWith_Callback_1_(this, response));
+  
 }
 // 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
@@ -32719,49 +33238,57 @@
 @DocsEditable()
 @DomName('ServiceWorkerContainer')
 @Experimental() // untriaged
-class ServiceWorkerContainer extends DartHtmlDomObject {
+class ServiceWorkerContainer extends EventTarget {
   // To suppress missing implicit constructor warnings.
   factory ServiceWorkerContainer._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ServiceWorkerContainer internalCreateServiceWorkerContainer() {
-    return new ServiceWorkerContainer._internalWrap();
-  }
+  @DomName('ServiceWorkerContainer.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
 
-  factory ServiceWorkerContainer._internalWrap() {
-    return new ServiceWorkerContainer.internal_();
-  }
 
   @Deprecated("Internal Use Only")
-  ServiceWorkerContainer.internal_() { }
+  external static Type get instanceRuntimeType;
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+  @Deprecated("Internal Use Only")
+  ServiceWorkerContainer.internal_() : super.internal_();
+
 
   @DomName('ServiceWorkerContainer.controller')
   @DocsEditable()
   @Experimental() // untriaged
-  _ServiceWorker get controller => wrap_jso(_blink.BlinkServiceWorkerContainer.instance.controller_Getter_(unwrap_jso(this)));
+  _ServiceWorker get controller => _blink.BlinkServiceWorkerContainer.instance.controller_Getter_(this);
   
   @DomName('ServiceWorkerContainer.ready')
   @DocsEditable()
   @Experimental() // untriaged
-  Future get ready => wrap_jso(_blink.BlinkServiceWorkerContainer.instance.ready_Getter_(unwrap_jso(this)));
+  Future get ready => convertNativePromiseToDartFuture(_blink.BlinkServiceWorkerContainer.instance.ready_Getter_(this));
   
   Future getRegistration([String documentURL]) {
     if (documentURL != null) {
-      return wrap_jso(_blink.BlinkServiceWorkerContainer.instance.getRegistration_Callback_1_(unwrap_jso(this), documentURL));
+      return _blink.BlinkServiceWorkerContainer.instance.getRegistration_Callback_1_(this, documentURL);
     }
-    return wrap_jso(_blink.BlinkServiceWorkerContainer.instance.getRegistration_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkServiceWorkerContainer.instance.getRegistration_Callback_0_(this);
   }
 
+  @DomName('ServiceWorkerContainer.getRegistrations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistrations() => convertNativePromiseToDartFuture(_blink.BlinkServiceWorkerContainer.instance.getRegistrations_Callback_0_(this));
+  
   Future register(String url, [Map options]) {
     if (options != null) {
-      return wrap_jso(_blink.BlinkServiceWorkerContainer.instance.register_Callback_2_(unwrap_jso(this), url, convertDartToNative_Dictionary(options)));
+      return _blink.BlinkServiceWorkerContainer.instance.register_Callback_2_(this, url, convertDartToNative_Dictionary(options));
     }
-    return wrap_jso(_blink.BlinkServiceWorkerContainer.instance.register_Callback_1_(unwrap_jso(this), url));
+    return _blink.BlinkServiceWorkerContainer.instance.register_Callback_1_(this, url);
   }
 
+  @DomName('ServiceWorkerContainer.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+
 }
 // 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
@@ -32784,58 +33311,113 @@
 
 
   @Deprecated("Internal Use Only")
-  static ServiceWorkerGlobalScope internalCreateServiceWorkerGlobalScope() {
-    return new ServiceWorkerGlobalScope._internalWrap();
-  }
-
-  external factory ServiceWorkerGlobalScope._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ServiceWorkerGlobalScope.internal_() : super.internal_();
 
 
-  @DomName('ServiceWorkerGlobalScope.caches')
-  @DocsEditable()
-  @Experimental() // untriaged
-  CacheStorage get caches => wrap_jso(_blink.BlinkServiceWorkerGlobalScope.instance.caches_Getter_(unwrap_jso(this)));
-  
   @DomName('ServiceWorkerGlobalScope.clients')
   @DocsEditable()
   @Experimental() // untriaged
-  ServiceWorkerClients get clients => wrap_jso(_blink.BlinkServiceWorkerGlobalScope.instance.clients_Getter_(unwrap_jso(this)));
+  Clients get clients => _blink.BlinkServiceWorkerGlobalScope.instance.clients_Getter_(this);
   
-  @DomName('ServiceWorkerGlobalScope.scope')
+  @DomName('ServiceWorkerGlobalScope.ports')
   @DocsEditable()
   @Experimental() // untriaged
-  String get scope => _blink.BlinkServiceWorkerGlobalScope.instance.scope_Getter_(unwrap_jso(this));
+  StashedPortCollection get ports => _blink.BlinkServiceWorkerGlobalScope.instance.ports_Getter_(this);
+  
+  @DomName('ServiceWorkerGlobalScope.registration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ServiceWorkerRegistration get registration => _blink.BlinkServiceWorkerGlobalScope.instance.registration_Getter_(this);
   
   @DomName('ServiceWorkerGlobalScope.close')
   @DocsEditable()
   @Experimental() // untriaged
-  void close() => _blink.BlinkServiceWorkerGlobalScope.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkServiceWorkerGlobalScope.instance.close_Callback_0_(this);
   
-  Future _fetch(request, [Map requestInitDict]) {
-    if ((request is String || request == null) && requestInitDict == null) {
-      return wrap_jso(_blink.BlinkServiceWorkerGlobalScope.instance.fetch_Callback_1_(unwrap_jso(this), unwrap_jso(request)));
+  Future _fetch(/*RequestInfo*/ input, [Map init]) {
+    if (init != null) {
+      return _blink.BlinkServiceWorkerGlobalScope.instance.fetch_Callback_2_(this, input, convertDartToNative_Dictionary(init));
     }
-    if ((requestInitDict is Map || requestInitDict == null) && (request is String || request == null)) {
-      return wrap_jso(_blink.BlinkServiceWorkerGlobalScope.instance.fetch_Callback_2_(unwrap_jso(this), unwrap_jso(request), convertDartToNative_Dictionary(requestInitDict)));
-    }
-    if ((request is _Request || request == null) && requestInitDict == null) {
-      return wrap_jso(_blink.BlinkServiceWorkerGlobalScope.instance.fetch_Callback_1_(unwrap_jso(this), unwrap_jso(request)));
-    }
-    if ((requestInitDict is Map || requestInitDict == null) && (request is _Request || request == null)) {
-      return wrap_jso(_blink.BlinkServiceWorkerGlobalScope.instance.fetch_Callback_2_(unwrap_jso(this), unwrap_jso(request), convertDartToNative_Dictionary(requestInitDict)));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _blink.BlinkServiceWorkerGlobalScope.instance.fetch_Callback_1_(this, input);
   }
 
+  @DomName('ServiceWorkerGlobalScope.skipWaiting')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future skipWaiting() => convertNativePromiseToDartFuture(_blink.BlinkServiceWorkerGlobalScope.instance.skipWaiting_Callback_0_(this));
+  
   @DomName('ServiceWorkerGlobalScope.onmessage')
   @DocsEditable()
   @Experimental() // untriaged
   Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
 
 }
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+// TODO(alanknight): Provide a nicer constructor that uses named parameters
+// rather than an initialization map.
+@DomName('ServiceWorkerMessageEvent')
+@Experimental() // untriaged
+class ServiceWorkerMessageEvent extends Event {
+
+  // TODO(alanknight): This really should be generated by the
+  // _OutputConversion in the systemnative.py script, but that doesn't
+  // use those conversions right now, so do this as a one-off.
+  @DomName('ServiceWorkerMessageEvent.data')
+  @DocsEditable()
+  dynamic get data => convertNativeToDart_SerializedScriptValue(
+      _blink.BlinkMessageEvent.instance.data_Getter_(this));
+
+  // To suppress missing implicit constructor warnings.
+  factory ServiceWorkerMessageEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('ServiceWorkerMessageEvent.ServiceWorkerMessageEvent')
+  @DocsEditable()
+  factory ServiceWorkerMessageEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkServiceWorkerMessageEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkServiceWorkerMessageEvent.instance.constructorCallback_1_(type);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ServiceWorkerMessageEvent.internal_() : super.internal_();
+
+
+  @DomName('ServiceWorkerMessageEvent.lastEventId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get lastEventId => _blink.BlinkServiceWorkerMessageEvent.instance.lastEventId_Getter_(this);
+  
+  @DomName('ServiceWorkerMessageEvent.origin')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get origin => _blink.BlinkServiceWorkerMessageEvent.instance.origin_Getter_(this);
+  
+  @DomName('ServiceWorkerMessageEvent.ports')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<MessagePort> get ports => (_blink.BlinkServiceWorkerMessageEvent.instance.ports_Getter_(this));
+  
+  @DomName('ServiceWorkerMessageEvent.source')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object get source => (_blink.BlinkServiceWorkerMessageEvent.instance.source_Getter_(this));
+  
+}
 // 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.
@@ -32852,11 +33434,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ServiceWorkerRegistration internalCreateServiceWorkerRegistration() {
-    return new ServiceWorkerRegistration._internalWrap();
-  }
-
-  external factory ServiceWorkerRegistration._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ServiceWorkerRegistration.internal_() : super.internal_();
@@ -32865,27 +33443,66 @@
   @DomName('ServiceWorkerRegistration.active')
   @DocsEditable()
   @Experimental() // untriaged
-  _ServiceWorker get active => wrap_jso(_blink.BlinkServiceWorkerRegistration.instance.active_Getter_(unwrap_jso(this)));
+  _ServiceWorker get active => _blink.BlinkServiceWorkerRegistration.instance.active_Getter_(this);
+  
+  @DomName('ServiceWorkerRegistration.geofencing')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Geofencing get geofencing => _blink.BlinkServiceWorkerRegistration.instance.geofencing_Getter_(this);
   
   @DomName('ServiceWorkerRegistration.installing')
   @DocsEditable()
   @Experimental() // untriaged
-  _ServiceWorker get installing => wrap_jso(_blink.BlinkServiceWorkerRegistration.instance.installing_Getter_(unwrap_jso(this)));
+  _ServiceWorker get installing => _blink.BlinkServiceWorkerRegistration.instance.installing_Getter_(this);
+  
+  @DomName('ServiceWorkerRegistration.periodicSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  PeriodicSyncManager get periodicSync => _blink.BlinkServiceWorkerRegistration.instance.periodicSync_Getter_(this);
+  
+  @DomName('ServiceWorkerRegistration.pushManager')
+  @DocsEditable()
+  @Experimental() // untriaged
+  PushManager get pushManager => _blink.BlinkServiceWorkerRegistration.instance.pushManager_Getter_(this);
   
   @DomName('ServiceWorkerRegistration.scope')
   @DocsEditable()
   @Experimental() // untriaged
-  String get scope => _blink.BlinkServiceWorkerRegistration.instance.scope_Getter_(unwrap_jso(this));
+  String get scope => _blink.BlinkServiceWorkerRegistration.instance.scope_Getter_(this);
+  
+  @DomName('ServiceWorkerRegistration.sync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  SyncManager get sync => _blink.BlinkServiceWorkerRegistration.instance.sync_Getter_(this);
   
   @DomName('ServiceWorkerRegistration.waiting')
   @DocsEditable()
   @Experimental() // untriaged
-  _ServiceWorker get waiting => wrap_jso(_blink.BlinkServiceWorkerRegistration.instance.waiting_Getter_(unwrap_jso(this)));
+  _ServiceWorker get waiting => _blink.BlinkServiceWorkerRegistration.instance.waiting_Getter_(this);
   
+  Future getNotifications([Map filter]) {
+    if (filter != null) {
+      return _blink.BlinkServiceWorkerRegistration.instance.getNotifications_Callback_1_(this, convertDartToNative_Dictionary(filter));
+    }
+    return _blink.BlinkServiceWorkerRegistration.instance.getNotifications_Callback_0_(this);
+  }
+
+  Future showNotification(String title, [Map options]) {
+    if (options != null) {
+      return _blink.BlinkServiceWorkerRegistration.instance.showNotification_Callback_2_(this, title, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkServiceWorkerRegistration.instance.showNotification_Callback_1_(this, title);
+  }
+
   @DomName('ServiceWorkerRegistration.unregister')
   @DocsEditable()
   @Experimental() // untriaged
-  Future unregister() => wrap_jso(_blink.BlinkServiceWorkerRegistration.instance.unregister_Callback_0_(unwrap_jso(this)));
+  Future unregister() => convertNativePromiseToDartFuture(_blink.BlinkServiceWorkerRegistration.instance.unregister_Callback_0_(this));
+  
+  @DomName('ServiceWorkerRegistration.update')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void update() => _blink.BlinkServiceWorkerRegistration.instance.update_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -32910,11 +33527,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ShadowElement internalCreateShadowElement() {
-    return new ShadowElement._internalWrap();
-  }
-
-  external factory ShadowElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ShadowElement.internal_() : super.internal_();
@@ -32932,7 +33545,7 @@
   @DomName('HTMLShadowElement.getDistributedNodes')
   @DocsEditable()
   @Experimental() // untriaged
-  List<Node> getDistributedNodes() => wrap_jso(_blink.BlinkHTMLShadowElement.instance.getDistributedNodes_Callback_0_(unwrap_jso(this)));
+  List<Node> getDistributedNodes() => (_blink.BlinkHTMLShadowElement.instance.getDistributedNodes_Callback_0_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -32952,11 +33565,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ShadowRoot internalCreateShadowRoot() {
-    return new ShadowRoot._internalWrap();
-  }
-
-  external factory ShadowRoot._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ShadowRoot.internal_() : super.internal_();
@@ -32964,54 +33573,52 @@
 
   @DomName('ShadowRoot.activeElement')
   @DocsEditable()
-  Element get activeElement => wrap_jso(_blink.BlinkShadowRoot.instance.activeElement_Getter_(unwrap_jso(this)));
+  Element get activeElement => _blink.BlinkShadowRoot.instance.activeElement_Getter_(this);
+  
+  @DomName('ShadowRoot.delegatesFocus')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get delegatesFocus => _blink.BlinkShadowRoot.instance.delegatesFocus_Getter_(this);
   
   @DomName('ShadowRoot.host')
   @DocsEditable()
   @Experimental() // untriaged
-  Element get host => wrap_jso(_blink.BlinkShadowRoot.instance.host_Getter_(unwrap_jso(this)));
+  Element get host => _blink.BlinkShadowRoot.instance.host_Getter_(this);
   
   @DomName('ShadowRoot.innerHTML')
   @DocsEditable()
-  String get innerHtml => _blink.BlinkShadowRoot.instance.innerHTML_Getter_(unwrap_jso(this));
+  String get innerHtml => _blink.BlinkShadowRoot.instance.innerHTML_Getter_(this);
   
   @DomName('ShadowRoot.innerHTML')
   @DocsEditable()
-  set innerHtml(String value) => _blink.BlinkShadowRoot.instance.innerHTML_Setter_(unwrap_jso(this), value);
+  set innerHtml(String value) => _blink.BlinkShadowRoot.instance.innerHTML_Setter_(this, value);
   
   @DomName('ShadowRoot.olderShadowRoot')
   @DocsEditable()
   @Experimental() // untriaged
-  ShadowRoot get olderShadowRoot => wrap_jso(_blink.BlinkShadowRoot.instance.olderShadowRoot_Getter_(unwrap_jso(this)));
+  ShadowRoot get olderShadowRoot => _blink.BlinkShadowRoot.instance.olderShadowRoot_Getter_(this);
   
   @DomName('ShadowRoot.styleSheets')
   @DocsEditable()
   @Experimental() // untriaged
-  List<StyleSheet> get styleSheets => wrap_jso(_blink.BlinkShadowRoot.instance.styleSheets_Getter_(unwrap_jso(this)));
+  List<StyleSheet> get styleSheets => (_blink.BlinkShadowRoot.instance.styleSheets_Getter_(this));
   
   @DomName('ShadowRoot.cloneNode')
   @DocsEditable()
-  Node clone(bool deep) => wrap_jso(_blink.BlinkShadowRoot.instance.cloneNode_Callback_1_(unwrap_jso(this), deep));
+  Node clone(bool deep) => _blink.BlinkShadowRoot.instance.cloneNode_Callback_1_(this, deep);
   
   @DomName('ShadowRoot.elementFromPoint')
   @DocsEditable()
-  Element elementFromPoint(int x, int y) => wrap_jso(_blink.BlinkShadowRoot.instance.elementFromPoint_Callback_2_(unwrap_jso(this), x, y));
+  Element elementFromPoint(int x, int y) => _blink.BlinkShadowRoot.instance.elementFromPoint_Callback_2_(this, x, y);
   
-  @DomName('ShadowRoot.getElementById')
+  @DomName('ShadowRoot.elementsFromPoint')
   @DocsEditable()
-  Element getElementById(String elementId) => wrap_jso(_blink.BlinkShadowRoot.instance.getElementById_Callback_1_(unwrap_jso(this), elementId));
-  
-  @DomName('ShadowRoot.getElementsByClassName')
-  @DocsEditable()
-  List<Node> getElementsByClassName(String className) => wrap_jso(_blink.BlinkShadowRoot.instance.getElementsByClassName_Callback_1_(unwrap_jso(this), className));
-  
-  @DomName('ShadowRoot.getElementsByTagName')
-  @DocsEditable()
-  List<Node> getElementsByTagName(String tagName) => wrap_jso(_blink.BlinkShadowRoot.instance.getElementsByTagName_Callback_1_(unwrap_jso(this), tagName));
+  @Experimental() // untriaged
+  List<Element> elementsFromPoint(int x, int y) => (_blink.BlinkShadowRoot.instance.elementsFromPoint_Callback_2_(this, x, y));
   
   @DomName('ShadowRoot.getSelection')
   @DocsEditable()
-  Selection getSelection() => wrap_jso(_blink.BlinkShadowRoot.instance.getSelection_Callback_0_(unwrap_jso(this)));
+  Selection getSelection() => _blink.BlinkShadowRoot.instance.getSelection_Callback_0_(this);
   
   static final bool supported = true;
 
@@ -33058,6 +33665,33 @@
 
 
 @DocsEditable()
+@DomName('SharedArrayBuffer')
+@Experimental() // untriaged
+class SharedArrayBuffer extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory SharedArrayBuffer._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  SharedArrayBuffer.internal_() { }
+
+  @DomName('SharedArrayBuffer.byteLength')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get byteLength => _blink.BlinkSharedArrayBuffer.instance.byteLength_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('SharedWorker')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#shared-workers-and-the-sharedworker-interface
 @Experimental()
@@ -33073,16 +33707,12 @@
   @DomName('SharedWorker.SharedWorker')
   @DocsEditable()
   factory SharedWorker(String scriptURL, [String name]) {
-    return wrap_jso(_blink.BlinkSharedWorker.instance.constructorCallback_2_(scriptURL, name));
+    return _blink.BlinkSharedWorker.instance.constructorCallback_2_(scriptURL, name);
   }
 
 
   @Deprecated("Internal Use Only")
-  static SharedWorker internalCreateSharedWorker() {
-    return new SharedWorker._internalWrap();
-  }
-
-  external factory SharedWorker._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SharedWorker.internal_() : super.internal_();
@@ -33090,12 +33720,12 @@
 
   @DomName('SharedWorker.port')
   @DocsEditable()
-  MessagePort get port => wrap_jso(_blink.BlinkSharedWorker.instance.port_Getter_(unwrap_jso(this)));
+  MessagePort get port => _blink.BlinkSharedWorker.instance.port_Getter_(this);
   
   @DomName('SharedWorker.workerStart')
   @DocsEditable()
   @Experimental() // untriaged
-  num get workerStart => _blink.BlinkSharedWorker.instance.workerStart_Getter_(unwrap_jso(this));
+  num get workerStart => _blink.BlinkSharedWorker.instance.workerStart_Getter_(this);
   
   @DomName('SharedWorker.onerror')
   @DocsEditable()
@@ -33130,11 +33760,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SharedWorkerGlobalScope internalCreateSharedWorkerGlobalScope() {
-    return new SharedWorkerGlobalScope._internalWrap();
-  }
-
-  external factory SharedWorkerGlobalScope._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SharedWorkerGlobalScope.internal_() : super.internal_();
@@ -33143,7 +33769,7 @@
   @DomName('SharedWorkerGlobalScope.name')
   @DocsEditable()
   @Experimental() // untriaged
-  String get name => _blink.BlinkSharedWorkerGlobalScope.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkSharedWorkerGlobalScope.instance.name_Getter_(this);
   
   /// Stream of `connect` events handled by this [SharedWorkerGlobalScope].
   @DomName('SharedWorkerGlobalScope.onconnect')
@@ -33169,11 +33795,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SourceBuffer internalCreateSourceBuffer() {
-    return new SourceBuffer._internalWrap();
-  }
-
-  external factory SourceBuffer._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SourceBuffer.internal_() : super.internal_();
@@ -33182,77 +33804,87 @@
   @DomName('SourceBuffer.appendWindowEnd')
   @DocsEditable()
   @Experimental() // untriaged
-  num get appendWindowEnd => _blink.BlinkSourceBuffer.instance.appendWindowEnd_Getter_(unwrap_jso(this));
+  num get appendWindowEnd => _blink.BlinkSourceBuffer.instance.appendWindowEnd_Getter_(this);
   
   @DomName('SourceBuffer.appendWindowEnd')
   @DocsEditable()
   @Experimental() // untriaged
-  set appendWindowEnd(num value) => _blink.BlinkSourceBuffer.instance.appendWindowEnd_Setter_(unwrap_jso(this), value);
+  set appendWindowEnd(num value) => _blink.BlinkSourceBuffer.instance.appendWindowEnd_Setter_(this, value);
   
   @DomName('SourceBuffer.appendWindowStart')
   @DocsEditable()
   @Experimental() // untriaged
-  num get appendWindowStart => _blink.BlinkSourceBuffer.instance.appendWindowStart_Getter_(unwrap_jso(this));
+  num get appendWindowStart => _blink.BlinkSourceBuffer.instance.appendWindowStart_Getter_(this);
   
   @DomName('SourceBuffer.appendWindowStart')
   @DocsEditable()
   @Experimental() // untriaged
-  set appendWindowStart(num value) => _blink.BlinkSourceBuffer.instance.appendWindowStart_Setter_(unwrap_jso(this), value);
+  set appendWindowStart(num value) => _blink.BlinkSourceBuffer.instance.appendWindowStart_Setter_(this, value);
   
   @DomName('SourceBuffer.buffered')
   @DocsEditable()
-  TimeRanges get buffered => wrap_jso(_blink.BlinkSourceBuffer.instance.buffered_Getter_(unwrap_jso(this)));
+  TimeRanges get buffered => _blink.BlinkSourceBuffer.instance.buffered_Getter_(this);
   
   @DomName('SourceBuffer.mode')
   @DocsEditable()
   @Experimental() // untriaged
-  String get mode => _blink.BlinkSourceBuffer.instance.mode_Getter_(unwrap_jso(this));
+  String get mode => _blink.BlinkSourceBuffer.instance.mode_Getter_(this);
   
   @DomName('SourceBuffer.mode')
   @DocsEditable()
   @Experimental() // untriaged
-  set mode(String value) => _blink.BlinkSourceBuffer.instance.mode_Setter_(unwrap_jso(this), value);
+  set mode(String value) => _blink.BlinkSourceBuffer.instance.mode_Setter_(this, value);
   
   @DomName('SourceBuffer.timestampOffset')
   @DocsEditable()
-  num get timestampOffset => _blink.BlinkSourceBuffer.instance.timestampOffset_Getter_(unwrap_jso(this));
+  num get timestampOffset => _blink.BlinkSourceBuffer.instance.timestampOffset_Getter_(this);
   
   @DomName('SourceBuffer.timestampOffset')
   @DocsEditable()
-  set timestampOffset(num value) => _blink.BlinkSourceBuffer.instance.timestampOffset_Setter_(unwrap_jso(this), value);
+  set timestampOffset(num value) => _blink.BlinkSourceBuffer.instance.timestampOffset_Setter_(this, value);
+  
+  @DomName('SourceBuffer.trackDefaults')
+  @DocsEditable()
+  @Experimental() // untriaged
+  TrackDefaultList get trackDefaults => _blink.BlinkSourceBuffer.instance.trackDefaults_Getter_(this);
+  
+  @DomName('SourceBuffer.trackDefaults')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set trackDefaults(TrackDefaultList value) => _blink.BlinkSourceBuffer.instance.trackDefaults_Setter_(this, value);
   
   @DomName('SourceBuffer.updating')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get updating => _blink.BlinkSourceBuffer.instance.updating_Getter_(unwrap_jso(this));
+  bool get updating => _blink.BlinkSourceBuffer.instance.updating_Getter_(this);
   
   @DomName('SourceBuffer.abort')
   @DocsEditable()
-  void abort() => _blink.BlinkSourceBuffer.instance.abort_Callback_0_(unwrap_jso(this));
+  void abort() => _blink.BlinkSourceBuffer.instance.abort_Callback_0_(this);
   
   @DomName('SourceBuffer.appendBuffer')
   @DocsEditable()
   @Experimental() // untriaged
-  void appendBuffer(ByteBuffer data) => _blink.BlinkSourceBuffer.instance.appendBuffer_Callback_1_(unwrap_jso(this), data);
+  void appendBuffer(ByteBuffer data) => _blink.BlinkSourceBuffer.instance.appendBuffer_Callback_1_(this, data);
   
   void appendStream(FileStream stream, [int maxSize]) {
     if (maxSize != null) {
-      _blink.BlinkSourceBuffer.instance.appendStream_Callback_2_(unwrap_jso(this), unwrap_jso(stream), maxSize);
+      _blink.BlinkSourceBuffer.instance.appendStream_Callback_2_(this, stream, maxSize);
       return;
     }
-    _blink.BlinkSourceBuffer.instance.appendStream_Callback_1_(unwrap_jso(this), unwrap_jso(stream));
+    _blink.BlinkSourceBuffer.instance.appendStream_Callback_1_(this, stream);
     return;
   }
 
   @DomName('SourceBuffer.appendTypedData')
   @DocsEditable()
   @Experimental() // untriaged
-  void appendTypedData(TypedData data) => _blink.BlinkSourceBuffer.instance.appendBuffer_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+  void appendTypedData(TypedData data) => _blink.BlinkSourceBuffer.instance.appendBuffer_Callback_1_(this, data);
   
   @DomName('SourceBuffer.remove')
   @DocsEditable()
   @Experimental() // untriaged
-  void remove(num start, num end) => _blink.BlinkSourceBuffer.instance.remove_Callback_2_(unwrap_jso(this), start, end);
+  void remove(num start, num end) => _blink.BlinkSourceBuffer.instance.remove_Callback_2_(this, start, end);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -33272,11 +33904,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SourceBufferList internalCreateSourceBufferList() {
-    return new SourceBufferList._internalWrap();
-  }
-
-  external factory SourceBufferList._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SourceBufferList.internal_() : super.internal_();
@@ -33284,15 +33912,15 @@
 
   @DomName('SourceBufferList.length')
   @DocsEditable()
-  int get length => _blink.BlinkSourceBufferList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSourceBufferList.instance.length_Getter_(this);
   
   SourceBuffer operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkSourceBufferList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  SourceBuffer _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkSourceBufferList.instance.item_Callback_1_(unwrap_jso(this), index));
+  SourceBuffer _nativeIndexedGetter(int index) => (_blink.BlinkSourceBufferList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, SourceBuffer value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -33334,7 +33962,7 @@
 
   @DomName('SourceBufferList.item')
   @DocsEditable()
-  SourceBuffer item(int index) => wrap_jso(_blink.BlinkSourceBufferList.instance.item_Callback_1_(unwrap_jso(this), index));
+  SourceBuffer item(int index) => _blink.BlinkSourceBufferList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -33356,11 +33984,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SourceElement internalCreateSourceElement() {
-    return new SourceElement._internalWrap();
-  }
-
-  external factory SourceElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SourceElement.internal_() : super.internal_();
@@ -33372,59 +33996,49 @@
    */
   SourceElement.created() : super.created();
 
-  @DomName('HTMLSourceElement.integrity')
+  @DomName('HTMLSourceElement.media')
   @DocsEditable()
-  @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLSourceElement.instance.integrity_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLSourceElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLSourceElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  String get media => _blink.BlinkHTMLSourceElement.instance.media_Getter_(this);
   
   @DomName('HTMLSourceElement.media')
   @DocsEditable()
-  String get media => _blink.BlinkHTMLSourceElement.instance.media_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLSourceElement.media')
-  @DocsEditable()
-  set media(String value) => _blink.BlinkHTMLSourceElement.instance.media_Setter_(unwrap_jso(this), value);
+  set media(String value) => _blink.BlinkHTMLSourceElement.instance.media_Setter_(this, value);
   
   @DomName('HTMLSourceElement.sizes')
   @DocsEditable()
   @Experimental() // untriaged
-  String get sizes => _blink.BlinkHTMLSourceElement.instance.sizes_Getter_(unwrap_jso(this));
+  String get sizes => _blink.BlinkHTMLSourceElement.instance.sizes_Getter_(this);
   
   @DomName('HTMLSourceElement.sizes')
   @DocsEditable()
   @Experimental() // untriaged
-  set sizes(String value) => _blink.BlinkHTMLSourceElement.instance.sizes_Setter_(unwrap_jso(this), value);
+  set sizes(String value) => _blink.BlinkHTMLSourceElement.instance.sizes_Setter_(this, value);
   
   @DomName('HTMLSourceElement.src')
   @DocsEditable()
-  String get src => _blink.BlinkHTMLSourceElement.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkHTMLSourceElement.instance.src_Getter_(this);
   
   @DomName('HTMLSourceElement.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkHTMLSourceElement.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkHTMLSourceElement.instance.src_Setter_(this, value);
   
   @DomName('HTMLSourceElement.srcset')
   @DocsEditable()
   @Experimental() // untriaged
-  String get srcset => _blink.BlinkHTMLSourceElement.instance.srcset_Getter_(unwrap_jso(this));
+  String get srcset => _blink.BlinkHTMLSourceElement.instance.srcset_Getter_(this);
   
   @DomName('HTMLSourceElement.srcset')
   @DocsEditable()
   @Experimental() // untriaged
-  set srcset(String value) => _blink.BlinkHTMLSourceElement.instance.srcset_Setter_(unwrap_jso(this), value);
+  set srcset(String value) => _blink.BlinkHTMLSourceElement.instance.srcset_Setter_(this, value);
   
   @DomName('HTMLSourceElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLSourceElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLSourceElement.instance.type_Getter_(this);
   
   @DomName('HTMLSourceElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLSourceElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLSourceElement.instance.type_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -33441,40 +34055,32 @@
   // To suppress missing implicit constructor warnings.
   factory SourceInfo._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SourceInfo internalCreateSourceInfo() {
-    return new SourceInfo._internalWrap();
-  }
 
-  factory SourceInfo._internalWrap() {
-    return new SourceInfo.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SourceInfo.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SourceInfo.facing')
   @DocsEditable()
   @Experimental() // untriaged
-  String get facing => _blink.BlinkSourceInfo.instance.facing_Getter_(unwrap_jso(this));
+  String get facing => _blink.BlinkSourceInfo.instance.facing_Getter_(this);
   
   @DomName('SourceInfo.id')
   @DocsEditable()
   @Experimental() // untriaged
-  String get id => _blink.BlinkSourceInfo.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkSourceInfo.instance.id_Getter_(this);
   
   @DomName('SourceInfo.kind')
   @DocsEditable()
   @Experimental() // untriaged
-  String get kind => _blink.BlinkSourceInfo.instance.kind_Getter_(unwrap_jso(this));
+  String get kind => _blink.BlinkSourceInfo.instance.kind_Getter_(this);
   
   @DomName('SourceInfo.label')
   @DocsEditable()
   @Experimental() // untriaged
-  String get label => _blink.BlinkSourceInfo.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkSourceInfo.instance.label_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -33496,11 +34102,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SpanElement internalCreateSpanElement() {
-    return new SpanElement._internalWrap();
-  }
-
-  external factory SpanElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpanElement.internal_() : super.internal_();
@@ -33531,39 +34133,31 @@
   @DomName('SpeechGrammar.SpeechGrammar')
   @DocsEditable()
   factory SpeechGrammar() {
-    return wrap_jso(_blink.BlinkSpeechGrammar.instance.constructorCallback_0_());
+    return _blink.BlinkSpeechGrammar.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static SpeechGrammar internalCreateSpeechGrammar() {
-    return new SpeechGrammar._internalWrap();
-  }
-
-  factory SpeechGrammar._internalWrap() {
-    return new SpeechGrammar.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechGrammar.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SpeechGrammar.src')
   @DocsEditable()
-  String get src => _blink.BlinkSpeechGrammar.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkSpeechGrammar.instance.src_Getter_(this);
   
   @DomName('SpeechGrammar.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkSpeechGrammar.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkSpeechGrammar.instance.src_Setter_(this, value);
   
   @DomName('SpeechGrammar.weight')
   @DocsEditable()
-  num get weight => _blink.BlinkSpeechGrammar.instance.weight_Getter_(unwrap_jso(this));
+  num get weight => _blink.BlinkSpeechGrammar.instance.weight_Getter_(this);
   
   @DomName('SpeechGrammar.weight')
   @DocsEditable()
-  set weight(num value) => _blink.BlinkSpeechGrammar.instance.weight_Setter_(unwrap_jso(this), value);
+  set weight(num value) => _blink.BlinkSpeechGrammar.instance.weight_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -33584,35 +34178,27 @@
   @DomName('SpeechGrammarList.SpeechGrammarList')
   @DocsEditable()
   factory SpeechGrammarList() {
-    return wrap_jso(_blink.BlinkSpeechGrammarList.instance.constructorCallback_0_());
+    return _blink.BlinkSpeechGrammarList.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static SpeechGrammarList internalCreateSpeechGrammarList() {
-    return new SpeechGrammarList._internalWrap();
-  }
-
-  factory SpeechGrammarList._internalWrap() {
-    return new SpeechGrammarList.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechGrammarList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SpeechGrammarList.length')
   @DocsEditable()
-  int get length => _blink.BlinkSpeechGrammarList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSpeechGrammarList.instance.length_Getter_(this);
   
   SpeechGrammar operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkSpeechGrammarList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  SpeechGrammar _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkSpeechGrammarList.instance.item_Callback_1_(unwrap_jso(this), index));
+  SpeechGrammar _nativeIndexedGetter(int index) => (_blink.BlinkSpeechGrammarList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, SpeechGrammar value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -33654,25 +34240,25 @@
 
   void addFromString(String string, [num weight]) {
     if (weight != null) {
-      _blink.BlinkSpeechGrammarList.instance.addFromString_Callback_2_(unwrap_jso(this), string, weight);
+      _blink.BlinkSpeechGrammarList.instance.addFromString_Callback_2_(this, string, weight);
       return;
     }
-    _blink.BlinkSpeechGrammarList.instance.addFromString_Callback_1_(unwrap_jso(this), string);
+    _blink.BlinkSpeechGrammarList.instance.addFromString_Callback_1_(this, string);
     return;
   }
 
   void addFromUri(String src, [num weight]) {
     if (weight != null) {
-      _blink.BlinkSpeechGrammarList.instance.addFromUri_Callback_2_(unwrap_jso(this), src, weight);
+      _blink.BlinkSpeechGrammarList.instance.addFromUri_Callback_2_(this, src, weight);
       return;
     }
-    _blink.BlinkSpeechGrammarList.instance.addFromUri_Callback_1_(unwrap_jso(this), src);
+    _blink.BlinkSpeechGrammarList.instance.addFromUri_Callback_1_(this, src);
     return;
   }
 
   @DomName('SpeechGrammarList.item')
   @DocsEditable()
-  SpeechGrammar item(int index) => wrap_jso(_blink.BlinkSpeechGrammarList.instance.item_Callback_1_(unwrap_jso(this), index));
+  SpeechGrammar item(int index) => _blink.BlinkSpeechGrammarList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -33804,16 +34390,12 @@
   @DomName('SpeechRecognition.SpeechRecognition')
   @DocsEditable()
   factory SpeechRecognition() {
-    return wrap_jso(_blink.BlinkSpeechRecognition.instance.constructorCallback_0_());
+    return _blink.BlinkSpeechRecognition.instance.constructorCallback_0_();
   }
 
 
   @Deprecated("Internal Use Only")
-  static SpeechRecognition internalCreateSpeechRecognition() {
-    return new SpeechRecognition._internalWrap();
-  }
-
-  external factory SpeechRecognition._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechRecognition.internal_() : super.internal_();
@@ -33822,57 +34404,77 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
-  @DomName('SpeechRecognition.continuous')
+  @DomName('SpeechRecognition.audioTrack')
   @DocsEditable()
-  bool get continuous => _blink.BlinkSpeechRecognition.instance.continuous_Getter_(unwrap_jso(this));
+  @Experimental() // untriaged
+  MediaStreamTrack get audioTrack => _blink.BlinkSpeechRecognition.instance.audioTrack_Getter_(this);
+  
+  @DomName('SpeechRecognition.audioTrack')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set audioTrack(MediaStreamTrack value) => _blink.BlinkSpeechRecognition.instance.audioTrack_Setter_(this, value);
   
   @DomName('SpeechRecognition.continuous')
   @DocsEditable()
-  set continuous(bool value) => _blink.BlinkSpeechRecognition.instance.continuous_Setter_(unwrap_jso(this), value);
+  bool get continuous => _blink.BlinkSpeechRecognition.instance.continuous_Getter_(this);
+  
+  @DomName('SpeechRecognition.continuous')
+  @DocsEditable()
+  set continuous(bool value) => _blink.BlinkSpeechRecognition.instance.continuous_Setter_(this, value);
   
   @DomName('SpeechRecognition.grammars')
   @DocsEditable()
-  SpeechGrammarList get grammars => wrap_jso(_blink.BlinkSpeechRecognition.instance.grammars_Getter_(unwrap_jso(this)));
+  SpeechGrammarList get grammars => _blink.BlinkSpeechRecognition.instance.grammars_Getter_(this);
   
   @DomName('SpeechRecognition.grammars')
   @DocsEditable()
-  set grammars(SpeechGrammarList value) => _blink.BlinkSpeechRecognition.instance.grammars_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set grammars(SpeechGrammarList value) => _blink.BlinkSpeechRecognition.instance.grammars_Setter_(this, value);
   
   @DomName('SpeechRecognition.interimResults')
   @DocsEditable()
-  bool get interimResults => _blink.BlinkSpeechRecognition.instance.interimResults_Getter_(unwrap_jso(this));
+  bool get interimResults => _blink.BlinkSpeechRecognition.instance.interimResults_Getter_(this);
   
   @DomName('SpeechRecognition.interimResults')
   @DocsEditable()
-  set interimResults(bool value) => _blink.BlinkSpeechRecognition.instance.interimResults_Setter_(unwrap_jso(this), value);
+  set interimResults(bool value) => _blink.BlinkSpeechRecognition.instance.interimResults_Setter_(this, value);
   
   @DomName('SpeechRecognition.lang')
   @DocsEditable()
-  String get lang => _blink.BlinkSpeechRecognition.instance.lang_Getter_(unwrap_jso(this));
+  String get lang => _blink.BlinkSpeechRecognition.instance.lang_Getter_(this);
   
   @DomName('SpeechRecognition.lang')
   @DocsEditable()
-  set lang(String value) => _blink.BlinkSpeechRecognition.instance.lang_Setter_(unwrap_jso(this), value);
+  set lang(String value) => _blink.BlinkSpeechRecognition.instance.lang_Setter_(this, value);
   
   @DomName('SpeechRecognition.maxAlternatives')
   @DocsEditable()
-  int get maxAlternatives => _blink.BlinkSpeechRecognition.instance.maxAlternatives_Getter_(unwrap_jso(this));
+  int get maxAlternatives => _blink.BlinkSpeechRecognition.instance.maxAlternatives_Getter_(this);
   
   @DomName('SpeechRecognition.maxAlternatives')
   @DocsEditable()
-  set maxAlternatives(int value) => _blink.BlinkSpeechRecognition.instance.maxAlternatives_Setter_(unwrap_jso(this), value);
+  set maxAlternatives(int value) => _blink.BlinkSpeechRecognition.instance.maxAlternatives_Setter_(this, value);
+  
+  @DomName('SpeechRecognition.serviceURI')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get serviceUri => _blink.BlinkSpeechRecognition.instance.serviceURI_Getter_(this);
+  
+  @DomName('SpeechRecognition.serviceURI')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set serviceUri(String value) => _blink.BlinkSpeechRecognition.instance.serviceURI_Setter_(this, value);
   
   @DomName('SpeechRecognition.abort')
   @DocsEditable()
-  void abort() => _blink.BlinkSpeechRecognition.instance.abort_Callback_0_(unwrap_jso(this));
+  void abort() => _blink.BlinkSpeechRecognition.instance.abort_Callback_0_(this);
   
   @DomName('SpeechRecognition.start')
   @DocsEditable()
-  void start() => _blink.BlinkSpeechRecognition.instance.start_Callback_0_(unwrap_jso(this));
+  void start() => _blink.BlinkSpeechRecognition.instance.start_Callback_0_(this);
   
   @DomName('SpeechRecognition.stop')
   @DocsEditable()
-  void stop() => _blink.BlinkSpeechRecognition.instance.stop_Callback_0_(unwrap_jso(this));
+  void stop() => _blink.BlinkSpeechRecognition.instance.stop_Callback_0_(this);
   
   /// Stream of `audioend` events handled by this [SpeechRecognition].
   @DomName('SpeechRecognition.onaudioend')
@@ -33946,28 +34548,20 @@
   // To suppress missing implicit constructor warnings.
   factory SpeechRecognitionAlternative._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SpeechRecognitionAlternative internalCreateSpeechRecognitionAlternative() {
-    return new SpeechRecognitionAlternative._internalWrap();
-  }
 
-  factory SpeechRecognitionAlternative._internalWrap() {
-    return new SpeechRecognitionAlternative.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechRecognitionAlternative.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SpeechRecognitionAlternative.confidence')
   @DocsEditable()
-  num get confidence => _blink.BlinkSpeechRecognitionAlternative.instance.confidence_Getter_(unwrap_jso(this));
+  num get confidence => _blink.BlinkSpeechRecognitionAlternative.instance.confidence_Getter_(this);
   
   @DomName('SpeechRecognitionAlternative.transcript')
   @DocsEditable()
-  String get transcript => _blink.BlinkSpeechRecognitionAlternative.instance.transcript_Getter_(unwrap_jso(this));
+  String get transcript => _blink.BlinkSpeechRecognitionAlternative.instance.transcript_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -33986,13 +34580,19 @@
   // To suppress missing implicit constructor warnings.
   factory SpeechRecognitionError._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static SpeechRecognitionError internalCreateSpeechRecognitionError() {
-    return new SpeechRecognitionError._internalWrap();
+  @DomName('SpeechRecognitionError.SpeechRecognitionError')
+  @DocsEditable()
+  factory SpeechRecognitionError(String type, [Map initDict]) {
+    if (initDict != null) {
+      var initDict_1 = convertDartToNative_Dictionary(initDict);
+      return _blink.BlinkSpeechRecognitionError.instance.constructorCallback_2_(type, initDict_1);
+    }
+    return _blink.BlinkSpeechRecognitionError.instance.constructorCallback_1_(type);
   }
 
-  external factory SpeechRecognitionError._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechRecognitionError.internal_() : super.internal_();
@@ -34000,11 +34600,11 @@
 
   @DomName('SpeechRecognitionError.error')
   @DocsEditable()
-  String get error => _blink.BlinkSpeechRecognitionError.instance.error_Getter_(unwrap_jso(this));
+  String get error => _blink.BlinkSpeechRecognitionError.instance.error_Getter_(this);
   
   @DomName('SpeechRecognitionError.message')
   @DocsEditable()
-  String get message => _blink.BlinkSpeechRecognitionError.instance.message_Getter_(unwrap_jso(this));
+  String get message => _blink.BlinkSpeechRecognitionError.instance.message_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34023,13 +34623,19 @@
   // To suppress missing implicit constructor warnings.
   factory SpeechRecognitionEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static SpeechRecognitionEvent internalCreateSpeechRecognitionEvent() {
-    return new SpeechRecognitionEvent._internalWrap();
+  @DomName('SpeechRecognitionEvent.SpeechRecognitionEvent')
+  @DocsEditable()
+  factory SpeechRecognitionEvent(String type, [Map initDict]) {
+    if (initDict != null) {
+      var initDict_1 = convertDartToNative_Dictionary(initDict);
+      return _blink.BlinkSpeechRecognitionEvent.instance.constructorCallback_2_(type, initDict_1);
+    }
+    return _blink.BlinkSpeechRecognitionEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory SpeechRecognitionEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechRecognitionEvent.internal_() : super.internal_();
@@ -34037,19 +34643,19 @@
 
   @DomName('SpeechRecognitionEvent.emma')
   @DocsEditable()
-  Document get emma => wrap_jso(_blink.BlinkSpeechRecognitionEvent.instance.emma_Getter_(unwrap_jso(this)));
+  Document get emma => _blink.BlinkSpeechRecognitionEvent.instance.emma_Getter_(this);
   
   @DomName('SpeechRecognitionEvent.interpretation')
   @DocsEditable()
-  Document get interpretation => wrap_jso(_blink.BlinkSpeechRecognitionEvent.instance.interpretation_Getter_(unwrap_jso(this)));
+  Document get interpretation => _blink.BlinkSpeechRecognitionEvent.instance.interpretation_Getter_(this);
   
   @DomName('SpeechRecognitionEvent.resultIndex')
   @DocsEditable()
-  int get resultIndex => _blink.BlinkSpeechRecognitionEvent.instance.resultIndex_Getter_(unwrap_jso(this));
+  int get resultIndex => _blink.BlinkSpeechRecognitionEvent.instance.resultIndex_Getter_(this);
   
   @DomName('SpeechRecognitionEvent.results')
   @DocsEditable()
-  List<SpeechRecognitionResult> get results => wrap_jso(_blink.BlinkSpeechRecognitionEvent.instance.results_Getter_(unwrap_jso(this)));
+  List<SpeechRecognitionResult> get results => (_blink.BlinkSpeechRecognitionEvent.instance.results_Getter_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34068,32 +34674,24 @@
   // To suppress missing implicit constructor warnings.
   factory SpeechRecognitionResult._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SpeechRecognitionResult internalCreateSpeechRecognitionResult() {
-    return new SpeechRecognitionResult._internalWrap();
-  }
 
-  factory SpeechRecognitionResult._internalWrap() {
-    return new SpeechRecognitionResult.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechRecognitionResult.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SpeechRecognitionResult.isFinal')
   @DocsEditable()
-  bool get isFinal => _blink.BlinkSpeechRecognitionResult.instance.isFinal_Getter_(unwrap_jso(this));
+  bool get isFinal => _blink.BlinkSpeechRecognitionResult.instance.isFinal_Getter_(this);
   
   @DomName('SpeechRecognitionResult.length')
   @DocsEditable()
-  int get length => _blink.BlinkSpeechRecognitionResult.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSpeechRecognitionResult.instance.length_Getter_(this);
   
   @DomName('SpeechRecognitionResult.item')
   @DocsEditable()
-  SpeechRecognitionAlternative item(int index) => wrap_jso(_blink.BlinkSpeechRecognitionResult.instance.item_Callback_1_(unwrap_jso(this), index));
+  SpeechRecognitionAlternative item(int index) => _blink.BlinkSpeechRecognitionResult.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34113,11 +34711,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SpeechSynthesis internalCreateSpeechSynthesis() {
-    return new SpeechSynthesis._internalWrap();
-  }
-
-  external factory SpeechSynthesis._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechSynthesis.internal_() : super.internal_();
@@ -34125,35 +34719,35 @@
 
   @DomName('SpeechSynthesis.paused')
   @DocsEditable()
-  bool get paused => _blink.BlinkSpeechSynthesis.instance.paused_Getter_(unwrap_jso(this));
+  bool get paused => _blink.BlinkSpeechSynthesis.instance.paused_Getter_(this);
   
   @DomName('SpeechSynthesis.pending')
   @DocsEditable()
-  bool get pending => _blink.BlinkSpeechSynthesis.instance.pending_Getter_(unwrap_jso(this));
+  bool get pending => _blink.BlinkSpeechSynthesis.instance.pending_Getter_(this);
   
   @DomName('SpeechSynthesis.speaking')
   @DocsEditable()
-  bool get speaking => _blink.BlinkSpeechSynthesis.instance.speaking_Getter_(unwrap_jso(this));
+  bool get speaking => _blink.BlinkSpeechSynthesis.instance.speaking_Getter_(this);
   
   @DomName('SpeechSynthesis.cancel')
   @DocsEditable()
-  void cancel() => _blink.BlinkSpeechSynthesis.instance.cancel_Callback_0_(unwrap_jso(this));
+  void cancel() => _blink.BlinkSpeechSynthesis.instance.cancel_Callback_0_(this);
   
   @DomName('SpeechSynthesis.getVoices')
   @DocsEditable()
-  List<SpeechSynthesisVoice> getVoices() => wrap_jso(_blink.BlinkSpeechSynthesis.instance.getVoices_Callback_0_(unwrap_jso(this)));
+  List<SpeechSynthesisVoice> getVoices() => (_blink.BlinkSpeechSynthesis.instance.getVoices_Callback_0_(this));
   
   @DomName('SpeechSynthesis.pause')
   @DocsEditable()
-  void pause() => _blink.BlinkSpeechSynthesis.instance.pause_Callback_0_(unwrap_jso(this));
+  void pause() => _blink.BlinkSpeechSynthesis.instance.pause_Callback_0_(this);
   
   @DomName('SpeechSynthesis.resume')
   @DocsEditable()
-  void resume() => _blink.BlinkSpeechSynthesis.instance.resume_Callback_0_(unwrap_jso(this));
+  void resume() => _blink.BlinkSpeechSynthesis.instance.resume_Callback_0_(this);
   
   @DomName('SpeechSynthesis.speak')
   @DocsEditable()
-  void speak(SpeechSynthesisUtterance utterance) => _blink.BlinkSpeechSynthesis.instance.speak_Callback_1_(unwrap_jso(this), unwrap_jso(utterance));
+  void speak(SpeechSynthesisUtterance utterance) => _blink.BlinkSpeechSynthesis.instance.speak_Callback_1_(this, utterance);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34173,11 +34767,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SpeechSynthesisEvent internalCreateSpeechSynthesisEvent() {
-    return new SpeechSynthesisEvent._internalWrap();
-  }
-
-  external factory SpeechSynthesisEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechSynthesisEvent.internal_() : super.internal_();
@@ -34185,15 +34775,20 @@
 
   @DomName('SpeechSynthesisEvent.charIndex')
   @DocsEditable()
-  int get charIndex => _blink.BlinkSpeechSynthesisEvent.instance.charIndex_Getter_(unwrap_jso(this));
+  int get charIndex => _blink.BlinkSpeechSynthesisEvent.instance.charIndex_Getter_(this);
   
   @DomName('SpeechSynthesisEvent.elapsedTime')
   @DocsEditable()
-  num get elapsedTime => _blink.BlinkSpeechSynthesisEvent.instance.elapsedTime_Getter_(unwrap_jso(this));
+  num get elapsedTime => _blink.BlinkSpeechSynthesisEvent.instance.elapsedTime_Getter_(this);
   
   @DomName('SpeechSynthesisEvent.name')
   @DocsEditable()
-  String get name => _blink.BlinkSpeechSynthesisEvent.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkSpeechSynthesisEvent.instance.name_Getter_(this);
+  
+  @DomName('SpeechSynthesisEvent.utterance')
+  @DocsEditable()
+  @Experimental() // untriaged
+  SpeechSynthesisUtterance get utterance => _blink.BlinkSpeechSynthesisEvent.instance.utterance_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34284,16 +34879,12 @@
   @DomName('SpeechSynthesisUtterance.SpeechSynthesisUtterance')
   @DocsEditable()
   factory SpeechSynthesisUtterance([String text]) {
-    return wrap_jso(_blink.BlinkSpeechSynthesisUtterance.instance.constructorCallback_1_(text));
+    return _blink.BlinkSpeechSynthesisUtterance.instance.constructorCallback_1_(text);
   }
 
 
   @Deprecated("Internal Use Only")
-  static SpeechSynthesisUtterance internalCreateSpeechSynthesisUtterance() {
-    return new SpeechSynthesisUtterance._internalWrap();
-  }
-
-  external factory SpeechSynthesisUtterance._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechSynthesisUtterance.internal_() : super.internal_();
@@ -34301,51 +34892,51 @@
 
   @DomName('SpeechSynthesisUtterance.lang')
   @DocsEditable()
-  String get lang => _blink.BlinkSpeechSynthesisUtterance.instance.lang_Getter_(unwrap_jso(this));
+  String get lang => _blink.BlinkSpeechSynthesisUtterance.instance.lang_Getter_(this);
   
   @DomName('SpeechSynthesisUtterance.lang')
   @DocsEditable()
-  set lang(String value) => _blink.BlinkSpeechSynthesisUtterance.instance.lang_Setter_(unwrap_jso(this), value);
+  set lang(String value) => _blink.BlinkSpeechSynthesisUtterance.instance.lang_Setter_(this, value);
   
   @DomName('SpeechSynthesisUtterance.pitch')
   @DocsEditable()
-  num get pitch => _blink.BlinkSpeechSynthesisUtterance.instance.pitch_Getter_(unwrap_jso(this));
+  num get pitch => _blink.BlinkSpeechSynthesisUtterance.instance.pitch_Getter_(this);
   
   @DomName('SpeechSynthesisUtterance.pitch')
   @DocsEditable()
-  set pitch(num value) => _blink.BlinkSpeechSynthesisUtterance.instance.pitch_Setter_(unwrap_jso(this), value);
+  set pitch(num value) => _blink.BlinkSpeechSynthesisUtterance.instance.pitch_Setter_(this, value);
   
   @DomName('SpeechSynthesisUtterance.rate')
   @DocsEditable()
-  num get rate => _blink.BlinkSpeechSynthesisUtterance.instance.rate_Getter_(unwrap_jso(this));
+  num get rate => _blink.BlinkSpeechSynthesisUtterance.instance.rate_Getter_(this);
   
   @DomName('SpeechSynthesisUtterance.rate')
   @DocsEditable()
-  set rate(num value) => _blink.BlinkSpeechSynthesisUtterance.instance.rate_Setter_(unwrap_jso(this), value);
+  set rate(num value) => _blink.BlinkSpeechSynthesisUtterance.instance.rate_Setter_(this, value);
   
   @DomName('SpeechSynthesisUtterance.text')
   @DocsEditable()
-  String get text => _blink.BlinkSpeechSynthesisUtterance.instance.text_Getter_(unwrap_jso(this));
+  String get text => _blink.BlinkSpeechSynthesisUtterance.instance.text_Getter_(this);
   
   @DomName('SpeechSynthesisUtterance.text')
   @DocsEditable()
-  set text(String value) => _blink.BlinkSpeechSynthesisUtterance.instance.text_Setter_(unwrap_jso(this), value);
+  set text(String value) => _blink.BlinkSpeechSynthesisUtterance.instance.text_Setter_(this, value);
   
   @DomName('SpeechSynthesisUtterance.voice')
   @DocsEditable()
-  SpeechSynthesisVoice get voice => wrap_jso(_blink.BlinkSpeechSynthesisUtterance.instance.voice_Getter_(unwrap_jso(this)));
+  SpeechSynthesisVoice get voice => _blink.BlinkSpeechSynthesisUtterance.instance.voice_Getter_(this);
   
   @DomName('SpeechSynthesisUtterance.voice')
   @DocsEditable()
-  set voice(SpeechSynthesisVoice value) => _blink.BlinkSpeechSynthesisUtterance.instance.voice_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set voice(SpeechSynthesisVoice value) => _blink.BlinkSpeechSynthesisUtterance.instance.voice_Setter_(this, value);
   
   @DomName('SpeechSynthesisUtterance.volume')
   @DocsEditable()
-  num get volume => _blink.BlinkSpeechSynthesisUtterance.instance.volume_Getter_(unwrap_jso(this));
+  num get volume => _blink.BlinkSpeechSynthesisUtterance.instance.volume_Getter_(this);
   
   @DomName('SpeechSynthesisUtterance.volume')
   @DocsEditable()
-  set volume(num value) => _blink.BlinkSpeechSynthesisUtterance.instance.volume_Setter_(unwrap_jso(this), value);
+  set volume(num value) => _blink.BlinkSpeechSynthesisUtterance.instance.volume_Setter_(this, value);
   
   /// Stream of `boundary` events handled by this [SpeechSynthesisUtterance].
   @DomName('SpeechSynthesisUtterance.onboundary')
@@ -34398,46 +34989,104 @@
   // To suppress missing implicit constructor warnings.
   factory SpeechSynthesisVoice._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SpeechSynthesisVoice internalCreateSpeechSynthesisVoice() {
-    return new SpeechSynthesisVoice._internalWrap();
-  }
 
-  factory SpeechSynthesisVoice._internalWrap() {
-    return new SpeechSynthesisVoice.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SpeechSynthesisVoice.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SpeechSynthesisVoice.default')
   @DocsEditable()
-  bool get defaultValue => _blink.BlinkSpeechSynthesisVoice.instance.default_Getter_(unwrap_jso(this));
+  bool get defaultValue => _blink.BlinkSpeechSynthesisVoice.instance.default_Getter_(this);
   
   @DomName('SpeechSynthesisVoice.lang')
   @DocsEditable()
-  String get lang => _blink.BlinkSpeechSynthesisVoice.instance.lang_Getter_(unwrap_jso(this));
+  String get lang => _blink.BlinkSpeechSynthesisVoice.instance.lang_Getter_(this);
   
   @DomName('SpeechSynthesisVoice.localService')
   @DocsEditable()
-  bool get localService => _blink.BlinkSpeechSynthesisVoice.instance.localService_Getter_(unwrap_jso(this));
+  bool get localService => _blink.BlinkSpeechSynthesisVoice.instance.localService_Getter_(this);
   
   @DomName('SpeechSynthesisVoice.name')
   @DocsEditable()
-  String get name => _blink.BlinkSpeechSynthesisVoice.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkSpeechSynthesisVoice.instance.name_Getter_(this);
   
   @DomName('SpeechSynthesisVoice.voiceURI')
   @DocsEditable()
-  String get voiceUri => _blink.BlinkSpeechSynthesisVoice.instance.voiceURI_Getter_(unwrap_jso(this));
+  String get voiceUri => _blink.BlinkSpeechSynthesisVoice.instance.voiceURI_Getter_(this);
   
 }
 // 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.
 
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('StashedMessagePort')
+@Experimental() // untriaged
+class StashedMessagePort extends MessagePort {
+  // To suppress missing implicit constructor warnings.
+  factory StashedMessagePort._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  StashedMessagePort.internal_() : super.internal_();
+
+
+  @DomName('StashedMessagePort.name')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get name => _blink.BlinkStashedMessagePort.instance.name_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('StashedPortCollection')
+@Experimental() // untriaged
+class StashedPortCollection extends EventTarget {
+  // To suppress missing implicit constructor warnings.
+  factory StashedPortCollection._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('StashedPortCollection.messageEvent')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  StashedPortCollection.internal_() : super.internal_();
+
+
+  @DomName('StashedPortCollection.add')
+  @DocsEditable()
+  @Experimental() // untriaged
+  StashedMessagePort add(String name, MessagePort port) => _blink.BlinkStashedPortCollection.instance.add_Callback_2_(this, name, port);
+  
+  @DomName('StashedPortCollection.onmessage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+
+}
+// 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.
+
 
 /**
  * The type used by the
@@ -34524,52 +35173,44 @@
   // To suppress missing implicit constructor warnings.
   factory Storage._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Storage internalCreateStorage() {
-    return new Storage._internalWrap();
-  }
 
-  factory Storage._internalWrap() {
-    return new Storage.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Storage.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Storage.length')
   @DocsEditable()
-  int get _length => _blink.BlinkStorage.instance.length_Getter_(unwrap_jso(this));
+  int get _length => _blink.BlinkStorage.instance.length_Getter_(this);
   
   bool __delete__(index_OR_name) {
     if ((index_OR_name is int || index_OR_name == null)) {
-      return _blink.BlinkStorage.instance.$__delete___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
+      return _blink.BlinkStorage.instance.$__delete___Callback_1_(this, index_OR_name);
     }
     if ((index_OR_name is String || index_OR_name == null)) {
-      return _blink.BlinkStorage.instance.$__delete___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
+      return _blink.BlinkStorage.instance.$__delete___Callback_1_(this, index_OR_name);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   String __getter__(index_OR_name) {
     if ((index_OR_name is int || index_OR_name == null)) {
-      return _blink.BlinkStorage.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
+      return _blink.BlinkStorage.instance.$__getter___Callback_1_(this, index_OR_name);
     }
     if ((index_OR_name is String || index_OR_name == null)) {
-      return _blink.BlinkStorage.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name));
+      return _blink.BlinkStorage.instance.$__getter___Callback_1_(this, index_OR_name);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   void __setter__(index_OR_name, String value) {
     if ((value is String || value == null) && (index_OR_name is int || index_OR_name == null)) {
-      _blink.BlinkStorage.instance.$__setter___Callback_2_(unwrap_jso(this), unwrap_jso(index_OR_name), value);
+      _blink.BlinkStorage.instance.$__setter___Callback_2_(this, index_OR_name, value);
       return;
     }
     if ((value is String || value == null) && (index_OR_name is String || index_OR_name == null)) {
-      _blink.BlinkStorage.instance.$__setter___Callback_2_(unwrap_jso(this), unwrap_jso(index_OR_name), value);
+      _blink.BlinkStorage.instance.$__setter___Callback_2_(this, index_OR_name, value);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -34577,23 +35218,23 @@
 
   @DomName('Storage.clear')
   @DocsEditable()
-  void _clear() => _blink.BlinkStorage.instance.clear_Callback_0_(unwrap_jso(this));
+  void _clear() => _blink.BlinkStorage.instance.clear_Callback_0_(this);
   
   @DomName('Storage.getItem')
   @DocsEditable()
-  String _getItem(String key) => _blink.BlinkStorage.instance.getItem_Callback_1_(unwrap_jso(this), key);
+  String _getItem(String key) => _blink.BlinkStorage.instance.getItem_Callback_1_(this, key);
   
   @DomName('Storage.key')
   @DocsEditable()
-  String _key(int index) => _blink.BlinkStorage.instance.key_Callback_1_(unwrap_jso(this), index);
+  String _key(int index) => _blink.BlinkStorage.instance.key_Callback_1_(this, index);
   
   @DomName('Storage.removeItem')
   @DocsEditable()
-  void _removeItem(String key) => _blink.BlinkStorage.instance.removeItem_Callback_1_(unwrap_jso(this), key);
+  void _removeItem(String key) => _blink.BlinkStorage.instance.removeItem_Callback_1_(this, key);
   
   @DomName('Storage.setItem')
   @DocsEditable()
-  void _setItem(String key, String data) => _blink.BlinkStorage.instance.setItem_Callback_2_(unwrap_jso(this), key, data);
+  void _setItem(String key, String data) => _blink.BlinkStorage.instance.setItem_Callback_2_(this, key, data);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34626,16 +35267,20 @@
         newValue, url, storageArea);
     return e;
   }
-  // To suppress missing implicit constructor warnings.
-  factory StorageEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('StorageEvent.StorageEvent')
+  @DocsEditable()
+  factory StorageEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkStorageEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkStorageEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static StorageEvent internalCreateStorageEvent() {
-    return new StorageEvent._internalWrap();
-  }
-
-  external factory StorageEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StorageEvent.internal_() : super.internal_();
@@ -34643,27 +35288,27 @@
 
   @DomName('StorageEvent.key')
   @DocsEditable()
-  String get key => _blink.BlinkStorageEvent.instance.key_Getter_(unwrap_jso(this));
+  String get key => _blink.BlinkStorageEvent.instance.key_Getter_(this);
   
   @DomName('StorageEvent.newValue')
   @DocsEditable()
-  String get newValue => _blink.BlinkStorageEvent.instance.newValue_Getter_(unwrap_jso(this));
+  String get newValue => _blink.BlinkStorageEvent.instance.newValue_Getter_(this);
   
   @DomName('StorageEvent.oldValue')
   @DocsEditable()
-  String get oldValue => _blink.BlinkStorageEvent.instance.oldValue_Getter_(unwrap_jso(this));
+  String get oldValue => _blink.BlinkStorageEvent.instance.oldValue_Getter_(this);
   
   @DomName('StorageEvent.storageArea')
   @DocsEditable()
-  Storage get storageArea => wrap_jso(_blink.BlinkStorageEvent.instance.storageArea_Getter_(unwrap_jso(this)));
+  Storage get storageArea => _blink.BlinkStorageEvent.instance.storageArea_Getter_(this);
   
   @DomName('StorageEvent.url')
   @DocsEditable()
-  String get url => _blink.BlinkStorageEvent.instance.url_Getter_(unwrap_jso(this));
+  String get url => _blink.BlinkStorageEvent.instance.url_Getter_(this);
   
   @DomName('StorageEvent.initStorageEvent')
   @DocsEditable()
-  void _initStorageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, String keyArg, String oldValueArg, String newValueArg, String urlArg, Storage storageAreaArg) => _blink.BlinkStorageEvent.instance.initStorageEvent_Callback_8_(unwrap_jso(this), typeArg, canBubbleArg, cancelableArg, keyArg, oldValueArg, newValueArg, urlArg, unwrap_jso(storageAreaArg));
+  void _initStorageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, String keyArg, String oldValueArg, String newValueArg, String urlArg, Storage storageAreaArg) => _blink.BlinkStorageEvent.instance.initStorageEvent_Callback_8_(this, typeArg, canBubbleArg, cancelableArg, keyArg, oldValueArg, newValueArg, urlArg, storageAreaArg);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34681,30 +35326,22 @@
   // To suppress missing implicit constructor warnings.
   factory StorageInfo._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static StorageInfo internalCreateStorageInfo() {
-    return new StorageInfo._internalWrap();
-  }
 
-  factory StorageInfo._internalWrap() {
-    return new StorageInfo.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StorageInfo.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('StorageInfo.quota')
   @DocsEditable()
   @Experimental() // untriaged
-  int get quota => _blink.BlinkStorageInfo.instance.quota_Getter_(unwrap_jso(this));
+  int get quota => _blink.BlinkStorageInfo.instance.quota_Getter_(this);
   
   @DomName('StorageInfo.usage')
   @DocsEditable()
   @Experimental() // untriaged
-  int get usage => _blink.BlinkStorageInfo.instance.usage_Getter_(unwrap_jso(this));
+  int get usage => _blink.BlinkStorageInfo.instance.usage_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34722,35 +35359,27 @@
   // To suppress missing implicit constructor warnings.
   factory StorageQuota._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static StorageQuota internalCreateStorageQuota() {
-    return new StorageQuota._internalWrap();
-  }
 
-  factory StorageQuota._internalWrap() {
-    return new StorageQuota.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StorageQuota.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('StorageQuota.supportedTypes')
   @DocsEditable()
   @Experimental() // untriaged
-  List<String> get supportedTypes => wrap_jso(_blink.BlinkStorageQuota.instance.supportedTypes_Getter_(unwrap_jso(this)));
+  List<String> get supportedTypes => _blink.BlinkStorageQuota.instance.supportedTypes_Getter_(this);
   
   @DomName('StorageQuota.queryInfo')
   @DocsEditable()
   @Experimental() // untriaged
-  Future queryInfo(String type) => wrap_jso(_blink.BlinkStorageQuota.instance.queryInfo_Callback_1_(unwrap_jso(this), type));
+  Future queryInfo(String type) => convertNativePromiseToDartFuture(_blink.BlinkStorageQuota.instance.queryInfo_Callback_1_(this, type));
   
   @DomName('StorageQuota.requestPersistentQuota')
   @DocsEditable()
   @Experimental() // untriaged
-  Future requestPersistentQuota(int newQuota) => wrap_jso(_blink.BlinkStorageQuota.instance.requestPersistentQuota_Callback_1_(unwrap_jso(this), newQuota));
+  Future requestPersistentQuota(int newQuota) => convertNativePromiseToDartFuture(_blink.BlinkStorageQuota.instance.requestPersistentQuota_Callback_1_(this, newQuota));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34805,11 +35434,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static StyleElement internalCreateStyleElement() {
-    return new StyleElement._internalWrap();
-  }
-
-  external factory StyleElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StyleElement.internal_() : super.internal_();
@@ -34823,31 +35448,31 @@
 
   @DomName('HTMLStyleElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLStyleElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLStyleElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLStyleElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLStyleElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLStyleElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLStyleElement.media')
   @DocsEditable()
-  String get media => _blink.BlinkHTMLStyleElement.instance.media_Getter_(unwrap_jso(this));
+  String get media => _blink.BlinkHTMLStyleElement.instance.media_Getter_(this);
   
   @DomName('HTMLStyleElement.media')
   @DocsEditable()
-  set media(String value) => _blink.BlinkHTMLStyleElement.instance.media_Setter_(unwrap_jso(this), value);
+  set media(String value) => _blink.BlinkHTMLStyleElement.instance.media_Setter_(this, value);
   
   @DomName('HTMLStyleElement.sheet')
   @DocsEditable()
-  StyleSheet get sheet => wrap_jso(_blink.BlinkHTMLStyleElement.instance.sheet_Getter_(unwrap_jso(this)));
+  StyleSheet get sheet => _blink.BlinkHTMLStyleElement.instance.sheet_Getter_(this);
   
   @DomName('HTMLStyleElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLStyleElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLStyleElement.instance.type_Getter_(this);
   
   @DomName('HTMLStyleElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkHTMLStyleElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkHTMLStyleElement.instance.type_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34865,28 +35490,20 @@
   // To suppress missing implicit constructor warnings.
   factory StyleMedia._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static StyleMedia internalCreateStyleMedia() {
-    return new StyleMedia._internalWrap();
-  }
 
-  factory StyleMedia._internalWrap() {
-    return new StyleMedia.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StyleMedia.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('StyleMedia.type')
   @DocsEditable()
-  String get type => _blink.BlinkStyleMedia.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkStyleMedia.instance.type_Getter_(this);
   
   @DomName('StyleMedia.matchMedium')
   @DocsEditable()
-  bool matchMedium(String mediaquery) => _blink.BlinkStyleMedia.instance.matchMedium_Callback_1_(unwrap_jso(this), mediaquery);
+  bool matchMedium(String mediaquery) => _blink.BlinkStyleMedia.instance.matchMedium_Callback_1_(this, mediaquery);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34902,52 +35519,155 @@
   // To suppress missing implicit constructor warnings.
   factory StyleSheet._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static StyleSheet internalCreateStyleSheet() {
-    return new StyleSheet._internalWrap();
-  }
 
-  factory StyleSheet._internalWrap() {
-    return new StyleSheet.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StyleSheet.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('StyleSheet.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkStyleSheet.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkStyleSheet.instance.disabled_Getter_(this);
   
   @DomName('StyleSheet.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkStyleSheet.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkStyleSheet.instance.disabled_Setter_(this, value);
   
   @DomName('StyleSheet.href')
   @DocsEditable()
-  String get href => _blink.BlinkStyleSheet.instance.href_Getter_(unwrap_jso(this));
+  String get href => _blink.BlinkStyleSheet.instance.href_Getter_(this);
   
   @DomName('StyleSheet.media')
   @DocsEditable()
-  MediaList get media => wrap_jso(_blink.BlinkStyleSheet.instance.media_Getter_(unwrap_jso(this)));
+  MediaList get media => _blink.BlinkStyleSheet.instance.media_Getter_(this);
   
   @DomName('StyleSheet.ownerNode')
   @DocsEditable()
-  Node get ownerNode => wrap_jso(_blink.BlinkStyleSheet.instance.ownerNode_Getter_(unwrap_jso(this)));
+  Node get ownerNode => _blink.BlinkStyleSheet.instance.ownerNode_Getter_(this);
   
   @DomName('StyleSheet.parentStyleSheet')
   @DocsEditable()
-  StyleSheet get parentStyleSheet => wrap_jso(_blink.BlinkStyleSheet.instance.parentStyleSheet_Getter_(unwrap_jso(this)));
+  StyleSheet get parentStyleSheet => _blink.BlinkStyleSheet.instance.parentStyleSheet_Getter_(this);
   
   @DomName('StyleSheet.title')
   @DocsEditable()
-  String get title => _blink.BlinkStyleSheet.instance.title_Getter_(unwrap_jso(this));
+  String get title => _blink.BlinkStyleSheet.instance.title_Getter_(this);
   
   @DomName('StyleSheet.type')
   @DocsEditable()
-  String get type => _blink.BlinkStyleSheet.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkStyleSheet.instance.type_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('SyncEvent')
+@Experimental() // untriaged
+class SyncEvent extends ExtendableEvent {
+  // To suppress missing implicit constructor warnings.
+  factory SyncEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('SyncEvent.SyncEvent')
+  @DocsEditable()
+  factory SyncEvent(String type, Map init) {
+    var init_1 = convertDartToNative_Dictionary(init);
+    return _blink.BlinkSyncEvent.instance.constructorCallback_2_(type, init_1);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  SyncEvent.internal_() : super.internal_();
+
+
+  @DomName('SyncEvent.registration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  SyncRegistration get registration => _blink.BlinkSyncEvent.instance.registration_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('SyncManager')
+@Experimental() // untriaged
+class SyncManager extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory SyncManager._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  SyncManager.internal_() { }
+
+  @DomName('SyncManager.getRegistration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistration(String tag) => convertNativePromiseToDartFuture(_blink.BlinkSyncManager.instance.getRegistration_Callback_1_(this, tag));
+  
+  @DomName('SyncManager.getRegistrations')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future getRegistrations() => convertNativePromiseToDartFuture(_blink.BlinkSyncManager.instance.getRegistrations_Callback_0_(this));
+  
+  @DomName('SyncManager.permissionState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future permissionState() => convertNativePromiseToDartFuture(_blink.BlinkSyncManager.instance.permissionState_Callback_0_(this));
+  
+  Future register([Map options]) {
+    if (options != null) {
+      return _blink.BlinkSyncManager.instance.register_Callback_1_(this, convertDartToNative_Dictionary(options));
+    }
+    return _blink.BlinkSyncManager.instance.register_Callback_0_(this);
+  }
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('SyncRegistration')
+@Experimental() // untriaged
+class SyncRegistration extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory SyncRegistration._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  SyncRegistration.internal_() { }
+
+  @DomName('SyncRegistration.tag')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get tag => _blink.BlinkSyncRegistration.instance.tag_Getter_(this);
+  
+  @DomName('SyncRegistration.unregister')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future unregister() => convertNativePromiseToDartFuture(_blink.BlinkSyncRegistration.instance.unregister_Callback_0_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -34969,11 +35689,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TableCaptionElement internalCreateTableCaptionElement() {
-    return new TableCaptionElement._internalWrap();
-  }
-
-  external factory TableCaptionElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TableCaptionElement.internal_() : super.internal_();
@@ -35005,11 +35721,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TableCellElement internalCreateTableCellElement() {
-    return new TableCellElement._internalWrap();
-  }
-
-  external factory TableCellElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TableCellElement.internal_() : super.internal_();
@@ -35023,31 +35735,31 @@
 
   @DomName('HTMLTableCellElement.cellIndex')
   @DocsEditable()
-  int get cellIndex => _blink.BlinkHTMLTableCellElement.instance.cellIndex_Getter_(unwrap_jso(this));
+  int get cellIndex => _blink.BlinkHTMLTableCellElement.instance.cellIndex_Getter_(this);
   
   @DomName('HTMLTableCellElement.colSpan')
   @DocsEditable()
-  int get colSpan => _blink.BlinkHTMLTableCellElement.instance.colSpan_Getter_(unwrap_jso(this));
+  int get colSpan => _blink.BlinkHTMLTableCellElement.instance.colSpan_Getter_(this);
   
   @DomName('HTMLTableCellElement.colSpan')
   @DocsEditable()
-  set colSpan(int value) => _blink.BlinkHTMLTableCellElement.instance.colSpan_Setter_(unwrap_jso(this), value);
+  set colSpan(int value) => _blink.BlinkHTMLTableCellElement.instance.colSpan_Setter_(this, value);
   
   @DomName('HTMLTableCellElement.headers')
   @DocsEditable()
-  String get headers => _blink.BlinkHTMLTableCellElement.instance.headers_Getter_(unwrap_jso(this));
+  String get headers => _blink.BlinkHTMLTableCellElement.instance.headers_Getter_(this);
   
   @DomName('HTMLTableCellElement.headers')
   @DocsEditable()
-  set headers(String value) => _blink.BlinkHTMLTableCellElement.instance.headers_Setter_(unwrap_jso(this), value);
+  set headers(String value) => _blink.BlinkHTMLTableCellElement.instance.headers_Setter_(this, value);
   
   @DomName('HTMLTableCellElement.rowSpan')
   @DocsEditable()
-  int get rowSpan => _blink.BlinkHTMLTableCellElement.instance.rowSpan_Getter_(unwrap_jso(this));
+  int get rowSpan => _blink.BlinkHTMLTableCellElement.instance.rowSpan_Getter_(this);
   
   @DomName('HTMLTableCellElement.rowSpan')
   @DocsEditable()
-  set rowSpan(int value) => _blink.BlinkHTMLTableCellElement.instance.rowSpan_Setter_(unwrap_jso(this), value);
+  set rowSpan(int value) => _blink.BlinkHTMLTableCellElement.instance.rowSpan_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -35069,11 +35781,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TableColElement internalCreateTableColElement() {
-    return new TableColElement._internalWrap();
-  }
-
-  external factory TableColElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TableColElement.internal_() : super.internal_();
@@ -35087,11 +35795,11 @@
 
   @DomName('HTMLTableColElement.span')
   @DocsEditable()
-  int get span => _blink.BlinkHTMLTableColElement.instance.span_Getter_(unwrap_jso(this));
+  int get span => _blink.BlinkHTMLTableColElement.instance.span_Getter_(this);
   
   @DomName('HTMLTableColElement.span')
   @DocsEditable()
-  set span(int value) => _blink.BlinkHTMLTableColElement.instance.span_Setter_(unwrap_jso(this), value);
+  set span(int value) => _blink.BlinkHTMLTableColElement.instance.span_Setter_(this, value);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -35131,11 +35839,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TableElement internalCreateTableElement() {
-    return new TableElement._internalWrap();
-  }
-
-  external factory TableElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TableElement.internal_() : super.internal_();
@@ -35149,73 +35853,73 @@
 
   @DomName('HTMLTableElement.caption')
   @DocsEditable()
-  TableCaptionElement get caption => wrap_jso(_blink.BlinkHTMLTableElement.instance.caption_Getter_(unwrap_jso(this)));
+  TableCaptionElement get caption => _blink.BlinkHTMLTableElement.instance.caption_Getter_(this);
   
   @DomName('HTMLTableElement.caption')
   @DocsEditable()
-  set caption(TableCaptionElement value) => _blink.BlinkHTMLTableElement.instance.caption_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set caption(TableCaptionElement value) => _blink.BlinkHTMLTableElement.instance.caption_Setter_(this, value);
   
   @DomName('HTMLTableElement.rows')
   @DocsEditable()
-  List<Node> get _rows => wrap_jso(_blink.BlinkHTMLTableElement.instance.rows_Getter_(unwrap_jso(this)));
+  List<Node> get _rows => (_blink.BlinkHTMLTableElement.instance.rows_Getter_(this));
   
   @DomName('HTMLTableElement.tBodies')
   @DocsEditable()
-  List<Node> get _tBodies => wrap_jso(_blink.BlinkHTMLTableElement.instance.tBodies_Getter_(unwrap_jso(this)));
+  List<Node> get _tBodies => (_blink.BlinkHTMLTableElement.instance.tBodies_Getter_(this));
   
   @DomName('HTMLTableElement.tFoot')
   @DocsEditable()
-  TableSectionElement get tFoot => wrap_jso(_blink.BlinkHTMLTableElement.instance.tFoot_Getter_(unwrap_jso(this)));
+  TableSectionElement get tFoot => _blink.BlinkHTMLTableElement.instance.tFoot_Getter_(this);
   
   @DomName('HTMLTableElement.tFoot')
   @DocsEditable()
-  set tFoot(TableSectionElement value) => _blink.BlinkHTMLTableElement.instance.tFoot_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set tFoot(TableSectionElement value) => _blink.BlinkHTMLTableElement.instance.tFoot_Setter_(this, value);
   
   @DomName('HTMLTableElement.tHead')
   @DocsEditable()
-  TableSectionElement get tHead => wrap_jso(_blink.BlinkHTMLTableElement.instance.tHead_Getter_(unwrap_jso(this)));
+  TableSectionElement get tHead => _blink.BlinkHTMLTableElement.instance.tHead_Getter_(this);
   
   @DomName('HTMLTableElement.tHead')
   @DocsEditable()
-  set tHead(TableSectionElement value) => _blink.BlinkHTMLTableElement.instance.tHead_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set tHead(TableSectionElement value) => _blink.BlinkHTMLTableElement.instance.tHead_Setter_(this, value);
   
   @DomName('HTMLTableElement.createCaption')
   @DocsEditable()
-  HtmlElement _createCaption() => wrap_jso(_blink.BlinkHTMLTableElement.instance.createCaption_Callback_0_(unwrap_jso(this)));
+  HtmlElement _createCaption() => _blink.BlinkHTMLTableElement.instance.createCaption_Callback_0_(this);
   
   @DomName('HTMLTableElement.createTBody')
   @DocsEditable()
-  HtmlElement _createTBody() => wrap_jso(_blink.BlinkHTMLTableElement.instance.createTBody_Callback_0_(unwrap_jso(this)));
+  HtmlElement _createTBody() => _blink.BlinkHTMLTableElement.instance.createTBody_Callback_0_(this);
   
   @DomName('HTMLTableElement.createTFoot')
   @DocsEditable()
-  HtmlElement _createTFoot() => wrap_jso(_blink.BlinkHTMLTableElement.instance.createTFoot_Callback_0_(unwrap_jso(this)));
+  HtmlElement _createTFoot() => _blink.BlinkHTMLTableElement.instance.createTFoot_Callback_0_(this);
   
   @DomName('HTMLTableElement.createTHead')
   @DocsEditable()
-  HtmlElement _createTHead() => wrap_jso(_blink.BlinkHTMLTableElement.instance.createTHead_Callback_0_(unwrap_jso(this)));
+  HtmlElement _createTHead() => _blink.BlinkHTMLTableElement.instance.createTHead_Callback_0_(this);
   
   @DomName('HTMLTableElement.deleteCaption')
   @DocsEditable()
-  void deleteCaption() => _blink.BlinkHTMLTableElement.instance.deleteCaption_Callback_0_(unwrap_jso(this));
+  void deleteCaption() => _blink.BlinkHTMLTableElement.instance.deleteCaption_Callback_0_(this);
   
   @DomName('HTMLTableElement.deleteRow')
   @DocsEditable()
-  void deleteRow(int index) => _blink.BlinkHTMLTableElement.instance.deleteRow_Callback_1_(unwrap_jso(this), index);
+  void deleteRow(int index) => _blink.BlinkHTMLTableElement.instance.deleteRow_Callback_1_(this, index);
   
   @DomName('HTMLTableElement.deleteTFoot')
   @DocsEditable()
-  void deleteTFoot() => _blink.BlinkHTMLTableElement.instance.deleteTFoot_Callback_0_(unwrap_jso(this));
+  void deleteTFoot() => _blink.BlinkHTMLTableElement.instance.deleteTFoot_Callback_0_(this);
   
   @DomName('HTMLTableElement.deleteTHead')
   @DocsEditable()
-  void deleteTHead() => _blink.BlinkHTMLTableElement.instance.deleteTHead_Callback_0_(unwrap_jso(this));
+  void deleteTHead() => _blink.BlinkHTMLTableElement.instance.deleteTHead_Callback_0_(this);
   
   HtmlElement _insertRow([int index]) {
     if (index != null) {
-      return wrap_jso(_blink.BlinkHTMLTableElement.instance.insertRow_Callback_1_(unwrap_jso(this), index));
+      return _blink.BlinkHTMLTableElement.instance.insertRow_Callback_1_(this, index);
     }
-    return wrap_jso(_blink.BlinkHTMLTableElement.instance.insertRow_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkHTMLTableElement.instance.insertRow_Callback_0_(this);
   }
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -35247,11 +35951,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TableRowElement internalCreateTableRowElement() {
-    return new TableRowElement._internalWrap();
-  }
-
-  external factory TableRowElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TableRowElement.internal_() : super.internal_();
@@ -35265,25 +35965,25 @@
 
   @DomName('HTMLTableRowElement.cells')
   @DocsEditable()
-  List<Node> get _cells => wrap_jso(_blink.BlinkHTMLTableRowElement.instance.cells_Getter_(unwrap_jso(this)));
+  List<Node> get _cells => (_blink.BlinkHTMLTableRowElement.instance.cells_Getter_(this));
   
   @DomName('HTMLTableRowElement.rowIndex')
   @DocsEditable()
-  int get rowIndex => _blink.BlinkHTMLTableRowElement.instance.rowIndex_Getter_(unwrap_jso(this));
+  int get rowIndex => _blink.BlinkHTMLTableRowElement.instance.rowIndex_Getter_(this);
   
   @DomName('HTMLTableRowElement.sectionRowIndex')
   @DocsEditable()
-  int get sectionRowIndex => _blink.BlinkHTMLTableRowElement.instance.sectionRowIndex_Getter_(unwrap_jso(this));
+  int get sectionRowIndex => _blink.BlinkHTMLTableRowElement.instance.sectionRowIndex_Getter_(this);
   
   @DomName('HTMLTableRowElement.deleteCell')
   @DocsEditable()
-  void deleteCell(int index) => _blink.BlinkHTMLTableRowElement.instance.deleteCell_Callback_1_(unwrap_jso(this), index);
+  void deleteCell(int index) => _blink.BlinkHTMLTableRowElement.instance.deleteCell_Callback_1_(this, index);
   
   HtmlElement _insertCell([int index]) {
     if (index != null) {
-      return wrap_jso(_blink.BlinkHTMLTableRowElement.instance.insertCell_Callback_1_(unwrap_jso(this), index));
+      return _blink.BlinkHTMLTableRowElement.instance.insertCell_Callback_1_(this, index);
     }
-    return wrap_jso(_blink.BlinkHTMLTableRowElement.instance.insertCell_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkHTMLTableRowElement.instance.insertCell_Callback_0_(this);
   }
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -35311,11 +36011,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TableSectionElement internalCreateTableSectionElement() {
-    return new TableSectionElement._internalWrap();
-  }
-
-  external factory TableSectionElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TableSectionElement.internal_() : super.internal_();
@@ -35329,17 +36025,17 @@
 
   @DomName('HTMLTableSectionElement.rows')
   @DocsEditable()
-  List<Node> get _rows => wrap_jso(_blink.BlinkHTMLTableSectionElement.instance.rows_Getter_(unwrap_jso(this)));
+  List<Node> get _rows => (_blink.BlinkHTMLTableSectionElement.instance.rows_Getter_(this));
   
   @DomName('HTMLTableSectionElement.deleteRow')
   @DocsEditable()
-  void deleteRow(int index) => _blink.BlinkHTMLTableSectionElement.instance.deleteRow_Callback_1_(unwrap_jso(this), index);
+  void deleteRow(int index) => _blink.BlinkHTMLTableSectionElement.instance.deleteRow_Callback_1_(this, index);
   
   HtmlElement _insertRow([int index]) {
     if (index != null) {
-      return wrap_jso(_blink.BlinkHTMLTableSectionElement.instance.insertRow_Callback_1_(unwrap_jso(this), index));
+      return _blink.BlinkHTMLTableSectionElement.instance.insertRow_Callback_1_(this, index);
     }
-    return wrap_jso(_blink.BlinkHTMLTableSectionElement.instance.insertRow_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkHTMLTableSectionElement.instance.insertRow_Callback_0_(this);
   }
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -35364,11 +36060,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TemplateElement internalCreateTemplateElement() {
-    return new TemplateElement._internalWrap();
-  }
-
-  external factory TemplateElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TemplateElement.internal_() : super.internal_();
@@ -35385,7 +36077,7 @@
 
   @DomName('HTMLTemplateElement.content')
   @DocsEditable()
-  DocumentFragment get content => wrap_jso(_blink.BlinkHTMLTemplateElement.instance.content_Getter_(unwrap_jso(this)));
+  DocumentFragment get content => _blink.BlinkHTMLTemplateElement.instance.content_Getter_(this);
   
 
   /**
@@ -35419,11 +36111,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Text internalCreateText() {
-    return new Text._internalWrap();
-  }
-
-  external factory Text._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Text.internal_() : super.internal_();
@@ -35431,16 +36119,16 @@
 
   @DomName('Text.wholeText')
   @DocsEditable()
-  String get wholeText => _blink.BlinkText.instance.wholeText_Getter_(unwrap_jso(this));
+  String get wholeText => _blink.BlinkText.instance.wholeText_Getter_(this);
   
   @DomName('Text.getDestinationInsertionPoints')
   @DocsEditable()
   @Experimental() // untriaged
-  List<Node> getDestinationInsertionPoints() => wrap_jso(_blink.BlinkText.instance.getDestinationInsertionPoints_Callback_0_(unwrap_jso(this)));
+  List<Node> getDestinationInsertionPoints() => (_blink.BlinkText.instance.getDestinationInsertionPoints_Callback_0_(this));
   
   @DomName('Text.splitText')
   @DocsEditable()
-  Text splitText(int offset) => wrap_jso(_blink.BlinkText.instance.splitText_Callback_1_(unwrap_jso(this), offset));
+  Text splitText(int offset) => _blink.BlinkText.instance.splitText_Callback_1_(this, offset);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -35462,11 +36150,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextAreaElement internalCreateTextAreaElement() {
-    return new TextAreaElement._internalWrap();
-  }
-
-  external factory TextAreaElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextAreaElement.internal_() : super.internal_();
@@ -35478,196 +36162,221 @@
    */
   TextAreaElement.created() : super.created();
 
-  @DomName('HTMLTextAreaElement.autofocus')
+  @DomName('HTMLTextAreaElement.autocapitalize')
   @DocsEditable()
-  bool get autofocus => _blink.BlinkHTMLTextAreaElement.instance.autofocus_Getter_(unwrap_jso(this));
+  @Experimental() // untriaged
+  String get autocapitalize => _blink.BlinkHTMLTextAreaElement.instance.autocapitalize_Getter_(this);
+  
+  @DomName('HTMLTextAreaElement.autocapitalize')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set autocapitalize(String value) => _blink.BlinkHTMLTextAreaElement.instance.autocapitalize_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.autofocus')
   @DocsEditable()
-  set autofocus(bool value) => _blink.BlinkHTMLTextAreaElement.instance.autofocus_Setter_(unwrap_jso(this), value);
+  bool get autofocus => _blink.BlinkHTMLTextAreaElement.instance.autofocus_Getter_(this);
+  
+  @DomName('HTMLTextAreaElement.autofocus')
+  @DocsEditable()
+  set autofocus(bool value) => _blink.BlinkHTMLTextAreaElement.instance.autofocus_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.cols')
   @DocsEditable()
-  int get cols => _blink.BlinkHTMLTextAreaElement.instance.cols_Getter_(unwrap_jso(this));
+  int get cols => _blink.BlinkHTMLTextAreaElement.instance.cols_Getter_(this);
   
   @DomName('HTMLTextAreaElement.cols')
   @DocsEditable()
-  set cols(int value) => _blink.BlinkHTMLTextAreaElement.instance.cols_Setter_(unwrap_jso(this), value);
+  set cols(int value) => _blink.BlinkHTMLTextAreaElement.instance.cols_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.defaultValue')
   @DocsEditable()
-  String get defaultValue => _blink.BlinkHTMLTextAreaElement.instance.defaultValue_Getter_(unwrap_jso(this));
+  String get defaultValue => _blink.BlinkHTMLTextAreaElement.instance.defaultValue_Getter_(this);
   
   @DomName('HTMLTextAreaElement.defaultValue')
   @DocsEditable()
-  set defaultValue(String value) => _blink.BlinkHTMLTextAreaElement.instance.defaultValue_Setter_(unwrap_jso(this), value);
+  set defaultValue(String value) => _blink.BlinkHTMLTextAreaElement.instance.defaultValue_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.dirName')
   @DocsEditable()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#dom-textarea-dirname
   @Experimental()
-  String get dirName => _blink.BlinkHTMLTextAreaElement.instance.dirName_Getter_(unwrap_jso(this));
+  String get dirName => _blink.BlinkHTMLTextAreaElement.instance.dirName_Getter_(this);
   
   @DomName('HTMLTextAreaElement.dirName')
   @DocsEditable()
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#dom-textarea-dirname
   @Experimental()
-  set dirName(String value) => _blink.BlinkHTMLTextAreaElement.instance.dirName_Setter_(unwrap_jso(this), value);
+  set dirName(String value) => _blink.BlinkHTMLTextAreaElement.instance.dirName_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkHTMLTextAreaElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkHTMLTextAreaElement.instance.disabled_Getter_(this);
   
   @DomName('HTMLTextAreaElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkHTMLTextAreaElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkHTMLTextAreaElement.instance.disabled_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.form')
   @DocsEditable()
-  FormElement get form => wrap_jso(_blink.BlinkHTMLTextAreaElement.instance.form_Getter_(unwrap_jso(this)));
+  FormElement get form => _blink.BlinkHTMLTextAreaElement.instance.form_Getter_(this);
   
   @DomName('HTMLTextAreaElement.inputMode')
   @DocsEditable()
   @Experimental() // untriaged
-  String get inputMode => _blink.BlinkHTMLTextAreaElement.instance.inputMode_Getter_(unwrap_jso(this));
+  String get inputMode => _blink.BlinkHTMLTextAreaElement.instance.inputMode_Getter_(this);
   
   @DomName('HTMLTextAreaElement.inputMode')
   @DocsEditable()
   @Experimental() // untriaged
-  set inputMode(String value) => _blink.BlinkHTMLTextAreaElement.instance.inputMode_Setter_(unwrap_jso(this), value);
+  set inputMode(String value) => _blink.BlinkHTMLTextAreaElement.instance.inputMode_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.labels')
   @DocsEditable()
   @Unstable()
-  List<Node> get labels => wrap_jso(_blink.BlinkHTMLTextAreaElement.instance.labels_Getter_(unwrap_jso(this)));
+  List<Node> get labels => (_blink.BlinkHTMLTextAreaElement.instance.labels_Getter_(this));
   
   @DomName('HTMLTextAreaElement.maxLength')
   @DocsEditable()
-  int get maxLength => _blink.BlinkHTMLTextAreaElement.instance.maxLength_Getter_(unwrap_jso(this));
+  int get maxLength => _blink.BlinkHTMLTextAreaElement.instance.maxLength_Getter_(this);
   
   @DomName('HTMLTextAreaElement.maxLength')
   @DocsEditable()
-  set maxLength(int value) => _blink.BlinkHTMLTextAreaElement.instance.maxLength_Setter_(unwrap_jso(this), value);
+  set maxLength(int value) => _blink.BlinkHTMLTextAreaElement.instance.maxLength_Setter_(this, value);
+  
+  @DomName('HTMLTextAreaElement.minLength')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get minLength => _blink.BlinkHTMLTextAreaElement.instance.minLength_Getter_(this);
+  
+  @DomName('HTMLTextAreaElement.minLength')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set minLength(int value) => _blink.BlinkHTMLTextAreaElement.instance.minLength_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.name')
   @DocsEditable()
-  String get name => _blink.BlinkHTMLTextAreaElement.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkHTMLTextAreaElement.instance.name_Getter_(this);
   
   @DomName('HTMLTextAreaElement.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkHTMLTextAreaElement.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkHTMLTextAreaElement.instance.name_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.placeholder')
   @DocsEditable()
-  String get placeholder => _blink.BlinkHTMLTextAreaElement.instance.placeholder_Getter_(unwrap_jso(this));
+  String get placeholder => _blink.BlinkHTMLTextAreaElement.instance.placeholder_Getter_(this);
   
   @DomName('HTMLTextAreaElement.placeholder')
   @DocsEditable()
-  set placeholder(String value) => _blink.BlinkHTMLTextAreaElement.instance.placeholder_Setter_(unwrap_jso(this), value);
+  set placeholder(String value) => _blink.BlinkHTMLTextAreaElement.instance.placeholder_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.readOnly')
   @DocsEditable()
-  bool get readOnly => _blink.BlinkHTMLTextAreaElement.instance.readOnly_Getter_(unwrap_jso(this));
+  bool get readOnly => _blink.BlinkHTMLTextAreaElement.instance.readOnly_Getter_(this);
   
   @DomName('HTMLTextAreaElement.readOnly')
   @DocsEditable()
-  set readOnly(bool value) => _blink.BlinkHTMLTextAreaElement.instance.readOnly_Setter_(unwrap_jso(this), value);
+  set readOnly(bool value) => _blink.BlinkHTMLTextAreaElement.instance.readOnly_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.required')
   @DocsEditable()
-  bool get required => _blink.BlinkHTMLTextAreaElement.instance.required_Getter_(unwrap_jso(this));
+  bool get required => _blink.BlinkHTMLTextAreaElement.instance.required_Getter_(this);
   
   @DomName('HTMLTextAreaElement.required')
   @DocsEditable()
-  set required(bool value) => _blink.BlinkHTMLTextAreaElement.instance.required_Setter_(unwrap_jso(this), value);
+  set required(bool value) => _blink.BlinkHTMLTextAreaElement.instance.required_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.rows')
   @DocsEditable()
-  int get rows => _blink.BlinkHTMLTextAreaElement.instance.rows_Getter_(unwrap_jso(this));
+  int get rows => _blink.BlinkHTMLTextAreaElement.instance.rows_Getter_(this);
   
   @DomName('HTMLTextAreaElement.rows')
   @DocsEditable()
-  set rows(int value) => _blink.BlinkHTMLTextAreaElement.instance.rows_Setter_(unwrap_jso(this), value);
+  set rows(int value) => _blink.BlinkHTMLTextAreaElement.instance.rows_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.selectionDirection')
   @DocsEditable()
-  String get selectionDirection => _blink.BlinkHTMLTextAreaElement.instance.selectionDirection_Getter_(unwrap_jso(this));
+  String get selectionDirection => _blink.BlinkHTMLTextAreaElement.instance.selectionDirection_Getter_(this);
   
   @DomName('HTMLTextAreaElement.selectionDirection')
   @DocsEditable()
-  set selectionDirection(String value) => _blink.BlinkHTMLTextAreaElement.instance.selectionDirection_Setter_(unwrap_jso(this), value);
+  set selectionDirection(String value) => _blink.BlinkHTMLTextAreaElement.instance.selectionDirection_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.selectionEnd')
   @DocsEditable()
-  int get selectionEnd => _blink.BlinkHTMLTextAreaElement.instance.selectionEnd_Getter_(unwrap_jso(this));
+  int get selectionEnd => _blink.BlinkHTMLTextAreaElement.instance.selectionEnd_Getter_(this);
   
   @DomName('HTMLTextAreaElement.selectionEnd')
   @DocsEditable()
-  set selectionEnd(int value) => _blink.BlinkHTMLTextAreaElement.instance.selectionEnd_Setter_(unwrap_jso(this), value);
+  set selectionEnd(int value) => _blink.BlinkHTMLTextAreaElement.instance.selectionEnd_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.selectionStart')
   @DocsEditable()
-  int get selectionStart => _blink.BlinkHTMLTextAreaElement.instance.selectionStart_Getter_(unwrap_jso(this));
+  int get selectionStart => _blink.BlinkHTMLTextAreaElement.instance.selectionStart_Getter_(this);
   
   @DomName('HTMLTextAreaElement.selectionStart')
   @DocsEditable()
-  set selectionStart(int value) => _blink.BlinkHTMLTextAreaElement.instance.selectionStart_Setter_(unwrap_jso(this), value);
+  set selectionStart(int value) => _blink.BlinkHTMLTextAreaElement.instance.selectionStart_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.textLength')
   @DocsEditable()
-  int get textLength => _blink.BlinkHTMLTextAreaElement.instance.textLength_Getter_(unwrap_jso(this));
+  int get textLength => _blink.BlinkHTMLTextAreaElement.instance.textLength_Getter_(this);
   
   @DomName('HTMLTextAreaElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkHTMLTextAreaElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkHTMLTextAreaElement.instance.type_Getter_(this);
   
   @DomName('HTMLTextAreaElement.validationMessage')
   @DocsEditable()
-  String get validationMessage => _blink.BlinkHTMLTextAreaElement.instance.validationMessage_Getter_(unwrap_jso(this));
+  String get validationMessage => _blink.BlinkHTMLTextAreaElement.instance.validationMessage_Getter_(this);
   
   @DomName('HTMLTextAreaElement.validity')
   @DocsEditable()
-  ValidityState get validity => wrap_jso(_blink.BlinkHTMLTextAreaElement.instance.validity_Getter_(unwrap_jso(this)));
+  ValidityState get validity => _blink.BlinkHTMLTextAreaElement.instance.validity_Getter_(this);
   
   @DomName('HTMLTextAreaElement.value')
   @DocsEditable()
-  String get value => _blink.BlinkHTMLTextAreaElement.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkHTMLTextAreaElement.instance.value_Getter_(this);
   
   @DomName('HTMLTextAreaElement.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkHTMLTextAreaElement.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkHTMLTextAreaElement.instance.value_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.willValidate')
   @DocsEditable()
-  bool get willValidate => _blink.BlinkHTMLTextAreaElement.instance.willValidate_Getter_(unwrap_jso(this));
+  bool get willValidate => _blink.BlinkHTMLTextAreaElement.instance.willValidate_Getter_(this);
   
   @DomName('HTMLTextAreaElement.wrap')
   @DocsEditable()
-  String get wrap => _blink.BlinkHTMLTextAreaElement.instance.wrap_Getter_(unwrap_jso(this));
+  String get wrap => _blink.BlinkHTMLTextAreaElement.instance.wrap_Getter_(this);
   
   @DomName('HTMLTextAreaElement.wrap')
   @DocsEditable()
-  set wrap(String value) => _blink.BlinkHTMLTextAreaElement.instance.wrap_Setter_(unwrap_jso(this), value);
+  set wrap(String value) => _blink.BlinkHTMLTextAreaElement.instance.wrap_Setter_(this, value);
   
   @DomName('HTMLTextAreaElement.checkValidity')
   @DocsEditable()
-  bool checkValidity() => _blink.BlinkHTMLTextAreaElement.instance.checkValidity_Callback_0_(unwrap_jso(this));
+  bool checkValidity() => _blink.BlinkHTMLTextAreaElement.instance.checkValidity_Callback_0_(this);
+  
+  @DomName('HTMLTextAreaElement.reportValidity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool reportValidity() => _blink.BlinkHTMLTextAreaElement.instance.reportValidity_Callback_0_(this);
   
   @DomName('HTMLTextAreaElement.select')
   @DocsEditable()
-  void select() => _blink.BlinkHTMLTextAreaElement.instance.select_Callback_0_(unwrap_jso(this));
+  void select() => _blink.BlinkHTMLTextAreaElement.instance.select_Callback_0_(this);
   
   @DomName('HTMLTextAreaElement.setCustomValidity')
   @DocsEditable()
-  void setCustomValidity(String error) => _blink.BlinkHTMLTextAreaElement.instance.setCustomValidity_Callback_1_(unwrap_jso(this), error);
+  void setCustomValidity(String error) => _blink.BlinkHTMLTextAreaElement.instance.setCustomValidity_Callback_1_(this, error);
   
   void setRangeText(String replacement, {int start, int end, String selectionMode}) {
     if ((replacement is String || replacement == null) && start == null && end == null && selectionMode == null) {
-      _blink.BlinkHTMLTextAreaElement.instance.setRangeText_Callback_1_(unwrap_jso(this), replacement);
+      _blink.BlinkHTMLTextAreaElement.instance.setRangeText_Callback_1_(this, replacement);
       return;
     }
     if ((selectionMode is String || selectionMode == null) && (end is int || end == null) && (start is int || start == null) && (replacement is String || replacement == null)) {
-      _blink.BlinkHTMLTextAreaElement.instance.setRangeText_Callback_4_(unwrap_jso(this), replacement, start, end, selectionMode);
+      _blink.BlinkHTMLTextAreaElement.instance.setRangeText_Callback_4_(this, replacement, start, end, selectionMode);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -35675,10 +36384,10 @@
 
   void setSelectionRange(int start, int end, [String direction]) {
     if (direction != null) {
-      _blink.BlinkHTMLTextAreaElement.instance.setSelectionRange_Callback_3_(unwrap_jso(this), start, end, direction);
+      _blink.BlinkHTMLTextAreaElement.instance.setSelectionRange_Callback_3_(this, start, end, direction);
       return;
     }
-    _blink.BlinkHTMLTextAreaElement.instance.setSelectionRange_Callback_2_(unwrap_jso(this), start, end);
+    _blink.BlinkHTMLTextAreaElement.instance.setSelectionRange_Callback_2_(this, start, end);
     return;
   }
 
@@ -35707,11 +36416,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextEvent internalCreateTextEvent() {
-    return new TextEvent._internalWrap();
-  }
-
-  external factory TextEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextEvent.internal_() : super.internal_();
@@ -35719,11 +36424,11 @@
 
   @DomName('TextEvent.data')
   @DocsEditable()
-  String get data => _blink.BlinkTextEvent.instance.data_Getter_(unwrap_jso(this));
+  String get data => _blink.BlinkTextEvent.instance.data_Getter_(this);
   
   @DomName('TextEvent.initTextEvent')
   @DocsEditable()
-  void _initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) => _blink.BlinkTextEvent.instance.initTextEvent_Callback_5_(unwrap_jso(this), typeArg, canBubbleArg, cancelableArg, unwrap_jso(viewArg), dataArg);
+  void _initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) => _blink.BlinkTextEvent.instance.initTextEvent_Callback_5_(this, typeArg, canBubbleArg, cancelableArg, viewArg, dataArg);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -35739,79 +36444,71 @@
   // To suppress missing implicit constructor warnings.
   factory TextMetrics._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static TextMetrics internalCreateTextMetrics() {
-    return new TextMetrics._internalWrap();
-  }
 
-  factory TextMetrics._internalWrap() {
-    return new TextMetrics.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextMetrics.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('TextMetrics.actualBoundingBoxAscent')
   @DocsEditable()
   @Experimental() // untriaged
-  num get actualBoundingBoxAscent => _blink.BlinkTextMetrics.instance.actualBoundingBoxAscent_Getter_(unwrap_jso(this));
+  num get actualBoundingBoxAscent => _blink.BlinkTextMetrics.instance.actualBoundingBoxAscent_Getter_(this);
   
   @DomName('TextMetrics.actualBoundingBoxDescent')
   @DocsEditable()
   @Experimental() // untriaged
-  num get actualBoundingBoxDescent => _blink.BlinkTextMetrics.instance.actualBoundingBoxDescent_Getter_(unwrap_jso(this));
+  num get actualBoundingBoxDescent => _blink.BlinkTextMetrics.instance.actualBoundingBoxDescent_Getter_(this);
   
   @DomName('TextMetrics.actualBoundingBoxLeft')
   @DocsEditable()
   @Experimental() // untriaged
-  num get actualBoundingBoxLeft => _blink.BlinkTextMetrics.instance.actualBoundingBoxLeft_Getter_(unwrap_jso(this));
+  num get actualBoundingBoxLeft => _blink.BlinkTextMetrics.instance.actualBoundingBoxLeft_Getter_(this);
   
   @DomName('TextMetrics.actualBoundingBoxRight')
   @DocsEditable()
   @Experimental() // untriaged
-  num get actualBoundingBoxRight => _blink.BlinkTextMetrics.instance.actualBoundingBoxRight_Getter_(unwrap_jso(this));
+  num get actualBoundingBoxRight => _blink.BlinkTextMetrics.instance.actualBoundingBoxRight_Getter_(this);
   
   @DomName('TextMetrics.alphabeticBaseline')
   @DocsEditable()
   @Experimental() // untriaged
-  num get alphabeticBaseline => _blink.BlinkTextMetrics.instance.alphabeticBaseline_Getter_(unwrap_jso(this));
+  num get alphabeticBaseline => _blink.BlinkTextMetrics.instance.alphabeticBaseline_Getter_(this);
   
   @DomName('TextMetrics.emHeightAscent')
   @DocsEditable()
   @Experimental() // untriaged
-  num get emHeightAscent => _blink.BlinkTextMetrics.instance.emHeightAscent_Getter_(unwrap_jso(this));
+  num get emHeightAscent => _blink.BlinkTextMetrics.instance.emHeightAscent_Getter_(this);
   
   @DomName('TextMetrics.emHeightDescent')
   @DocsEditable()
   @Experimental() // untriaged
-  num get emHeightDescent => _blink.BlinkTextMetrics.instance.emHeightDescent_Getter_(unwrap_jso(this));
+  num get emHeightDescent => _blink.BlinkTextMetrics.instance.emHeightDescent_Getter_(this);
   
   @DomName('TextMetrics.fontBoundingBoxAscent')
   @DocsEditable()
   @Experimental() // untriaged
-  num get fontBoundingBoxAscent => _blink.BlinkTextMetrics.instance.fontBoundingBoxAscent_Getter_(unwrap_jso(this));
+  num get fontBoundingBoxAscent => _blink.BlinkTextMetrics.instance.fontBoundingBoxAscent_Getter_(this);
   
   @DomName('TextMetrics.fontBoundingBoxDescent')
   @DocsEditable()
   @Experimental() // untriaged
-  num get fontBoundingBoxDescent => _blink.BlinkTextMetrics.instance.fontBoundingBoxDescent_Getter_(unwrap_jso(this));
+  num get fontBoundingBoxDescent => _blink.BlinkTextMetrics.instance.fontBoundingBoxDescent_Getter_(this);
   
   @DomName('TextMetrics.hangingBaseline')
   @DocsEditable()
   @Experimental() // untriaged
-  num get hangingBaseline => _blink.BlinkTextMetrics.instance.hangingBaseline_Getter_(unwrap_jso(this));
+  num get hangingBaseline => _blink.BlinkTextMetrics.instance.hangingBaseline_Getter_(this);
   
   @DomName('TextMetrics.ideographicBaseline')
   @DocsEditable()
   @Experimental() // untriaged
-  num get ideographicBaseline => _blink.BlinkTextMetrics.instance.ideographicBaseline_Getter_(unwrap_jso(this));
+  num get ideographicBaseline => _blink.BlinkTextMetrics.instance.ideographicBaseline_Getter_(this);
   
   @DomName('TextMetrics.width')
   @DocsEditable()
-  num get width => _blink.BlinkTextMetrics.instance.width_Getter_(unwrap_jso(this));
+  num get width => _blink.BlinkTextMetrics.instance.width_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -35841,11 +36538,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextTrack internalCreateTextTrack() {
-    return new TextTrack._internalWrap();
-  }
-
-  external factory TextTrack._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextTrack.internal_() : super.internal_();
@@ -35853,59 +36546,59 @@
 
   @DomName('TextTrack.activeCues')
   @DocsEditable()
-  TextTrackCueList get activeCues => wrap_jso(_blink.BlinkTextTrack.instance.activeCues_Getter_(unwrap_jso(this)));
+  TextTrackCueList get activeCues => _blink.BlinkTextTrack.instance.activeCues_Getter_(this);
   
   @DomName('TextTrack.cues')
   @DocsEditable()
-  TextTrackCueList get cues => wrap_jso(_blink.BlinkTextTrack.instance.cues_Getter_(unwrap_jso(this)));
+  TextTrackCueList get cues => _blink.BlinkTextTrack.instance.cues_Getter_(this);
   
   @DomName('TextTrack.id')
   @DocsEditable()
   @Experimental() // untriaged
-  String get id => _blink.BlinkTextTrack.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkTextTrack.instance.id_Getter_(this);
   
   @DomName('TextTrack.kind')
   @DocsEditable()
-  String get kind => _blink.BlinkTextTrack.instance.kind_Getter_(unwrap_jso(this));
+  String get kind => _blink.BlinkTextTrack.instance.kind_Getter_(this);
   
   @DomName('TextTrack.label')
   @DocsEditable()
-  String get label => _blink.BlinkTextTrack.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkTextTrack.instance.label_Getter_(this);
   
   @DomName('TextTrack.language')
   @DocsEditable()
-  String get language => _blink.BlinkTextTrack.instance.language_Getter_(unwrap_jso(this));
+  String get language => _blink.BlinkTextTrack.instance.language_Getter_(this);
   
   @DomName('TextTrack.mode')
   @DocsEditable()
-  String get mode => _blink.BlinkTextTrack.instance.mode_Getter_(unwrap_jso(this));
+  String get mode => _blink.BlinkTextTrack.instance.mode_Getter_(this);
   
   @DomName('TextTrack.mode')
   @DocsEditable()
-  set mode(String value) => _blink.BlinkTextTrack.instance.mode_Setter_(unwrap_jso(this), value);
+  set mode(String value) => _blink.BlinkTextTrack.instance.mode_Setter_(this, value);
   
   @DomName('TextTrack.regions')
   @DocsEditable()
   @Experimental() // untriaged
-  VttRegionList get regions => wrap_jso(_blink.BlinkTextTrack.instance.regions_Getter_(unwrap_jso(this)));
+  VttRegionList get regions => _blink.BlinkTextTrack.instance.regions_Getter_(this);
   
   @DomName('TextTrack.addCue')
   @DocsEditable()
-  void addCue(TextTrackCue cue) => _blink.BlinkTextTrack.instance.addCue_Callback_1_(unwrap_jso(this), unwrap_jso(cue));
+  void addCue(TextTrackCue cue) => _blink.BlinkTextTrack.instance.addCue_Callback_1_(this, cue);
   
   @DomName('TextTrack.addRegion')
   @DocsEditable()
   @Experimental() // untriaged
-  void addRegion(VttRegion region) => _blink.BlinkTextTrack.instance.addRegion_Callback_1_(unwrap_jso(this), unwrap_jso(region));
+  void addRegion(VttRegion region) => _blink.BlinkTextTrack.instance.addRegion_Callback_1_(this, region);
   
   @DomName('TextTrack.removeCue')
   @DocsEditable()
-  void removeCue(TextTrackCue cue) => _blink.BlinkTextTrack.instance.removeCue_Callback_1_(unwrap_jso(this), unwrap_jso(cue));
+  void removeCue(TextTrackCue cue) => _blink.BlinkTextTrack.instance.removeCue_Callback_1_(this, cue);
   
   @DomName('TextTrack.removeRegion')
   @DocsEditable()
   @Experimental() // untriaged
-  void removeRegion(VttRegion region) => _blink.BlinkTextTrack.instance.removeRegion_Callback_1_(unwrap_jso(this), unwrap_jso(region));
+  void removeRegion(VttRegion region) => _blink.BlinkTextTrack.instance.removeRegion_Callback_1_(this, region);
   
   /// Stream of `cuechange` events handled by this [TextTrack].
   @DomName('TextTrack.oncuechange')
@@ -35950,11 +36643,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextTrackCue internalCreateTextTrackCue() {
-    return new TextTrackCue._internalWrap();
-  }
-
-  external factory TextTrackCue._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextTrackCue.internal_() : super.internal_();
@@ -35962,39 +36651,39 @@
 
   @DomName('TextTrackCue.endTime')
   @DocsEditable()
-  num get endTime => _blink.BlinkTextTrackCue.instance.endTime_Getter_(unwrap_jso(this));
+  num get endTime => _blink.BlinkTextTrackCue.instance.endTime_Getter_(this);
   
   @DomName('TextTrackCue.endTime')
   @DocsEditable()
-  set endTime(num value) => _blink.BlinkTextTrackCue.instance.endTime_Setter_(unwrap_jso(this), value);
+  set endTime(num value) => _blink.BlinkTextTrackCue.instance.endTime_Setter_(this, value);
   
   @DomName('TextTrackCue.id')
   @DocsEditable()
-  String get id => _blink.BlinkTextTrackCue.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkTextTrackCue.instance.id_Getter_(this);
   
   @DomName('TextTrackCue.id')
   @DocsEditable()
-  set id(String value) => _blink.BlinkTextTrackCue.instance.id_Setter_(unwrap_jso(this), value);
+  set id(String value) => _blink.BlinkTextTrackCue.instance.id_Setter_(this, value);
   
   @DomName('TextTrackCue.pauseOnExit')
   @DocsEditable()
-  bool get pauseOnExit => _blink.BlinkTextTrackCue.instance.pauseOnExit_Getter_(unwrap_jso(this));
+  bool get pauseOnExit => _blink.BlinkTextTrackCue.instance.pauseOnExit_Getter_(this);
   
   @DomName('TextTrackCue.pauseOnExit')
   @DocsEditable()
-  set pauseOnExit(bool value) => _blink.BlinkTextTrackCue.instance.pauseOnExit_Setter_(unwrap_jso(this), value);
+  set pauseOnExit(bool value) => _blink.BlinkTextTrackCue.instance.pauseOnExit_Setter_(this, value);
   
   @DomName('TextTrackCue.startTime')
   @DocsEditable()
-  num get startTime => _blink.BlinkTextTrackCue.instance.startTime_Getter_(unwrap_jso(this));
+  num get startTime => _blink.BlinkTextTrackCue.instance.startTime_Getter_(this);
   
   @DomName('TextTrackCue.startTime')
   @DocsEditable()
-  set startTime(num value) => _blink.BlinkTextTrackCue.instance.startTime_Setter_(unwrap_jso(this), value);
+  set startTime(num value) => _blink.BlinkTextTrackCue.instance.startTime_Setter_(this, value);
   
   @DomName('TextTrackCue.track')
   @DocsEditable()
-  TextTrack get track => wrap_jso(_blink.BlinkTextTrackCue.instance.track_Getter_(unwrap_jso(this)));
+  TextTrack get track => _blink.BlinkTextTrackCue.instance.track_Getter_(this);
   
   /// Stream of `enter` events handled by this [TextTrackCue].
   @DomName('TextTrackCue.onenter')
@@ -36022,32 +36711,24 @@
   // To suppress missing implicit constructor warnings.
   factory TextTrackCueList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static TextTrackCueList internalCreateTextTrackCueList() {
-    return new TextTrackCueList._internalWrap();
-  }
 
-  factory TextTrackCueList._internalWrap() {
-    return new TextTrackCueList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextTrackCueList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('TextTrackCueList.length')
   @DocsEditable()
-  int get length => _blink.BlinkTextTrackCueList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkTextTrackCueList.instance.length_Getter_(this);
   
   TextTrackCue operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkTextTrackCueList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  TextTrackCue _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkTextTrackCueList.instance.item_Callback_1_(unwrap_jso(this), index));
+  TextTrackCue _nativeIndexedGetter(int index) => (_blink.BlinkTextTrackCueList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, TextTrackCue value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -36089,11 +36770,11 @@
 
   @DomName('TextTrackCueList.getCueById')
   @DocsEditable()
-  TextTrackCue getCueById(String id) => wrap_jso(_blink.BlinkTextTrackCueList.instance.getCueById_Callback_1_(unwrap_jso(this), id));
+  TextTrackCue getCueById(String id) => _blink.BlinkTextTrackCueList.instance.getCueById_Callback_1_(this, id);
   
   @DomName('TextTrackCueList.item')
   @DocsEditable()
-  TextTrackCue item(int index) => wrap_jso(_blink.BlinkTextTrackCueList.instance.item_Callback_1_(unwrap_jso(this), index));
+  TextTrackCue item(int index) => _blink.BlinkTextTrackCueList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -36128,11 +36809,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextTrackList internalCreateTextTrackList() {
-    return new TextTrackList._internalWrap();
-  }
-
-  external factory TextTrackList._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextTrackList.internal_() : super.internal_();
@@ -36140,15 +36817,15 @@
 
   @DomName('TextTrackList.length')
   @DocsEditable()
-  int get length => _blink.BlinkTextTrackList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkTextTrackList.instance.length_Getter_(this);
   
   TextTrack operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkTextTrackList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  TextTrack _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkTextTrackList.instance.item_Callback_1_(unwrap_jso(this), index));
+  TextTrack _nativeIndexedGetter(int index) => (_blink.BlinkTextTrackList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, TextTrack value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -36191,11 +36868,11 @@
   @DomName('TextTrackList.getTrackById')
   @DocsEditable()
   @Experimental() // untriaged
-  TextTrack getTrackById(String id) => wrap_jso(_blink.BlinkTextTrackList.instance.getTrackById_Callback_1_(unwrap_jso(this), id));
+  TextTrack getTrackById(String id) => _blink.BlinkTextTrackList.instance.getTrackById_Callback_1_(this, id);
   
   @DomName('TextTrackList.item')
   @DocsEditable()
-  TextTrack item(int index) => wrap_jso(_blink.BlinkTextTrackList.instance.item_Callback_1_(unwrap_jso(this), index));
+  TextTrack item(int index) => _blink.BlinkTextTrackList.instance.item_Callback_1_(this, index);
   
   /// Stream of `addtrack` events handled by this [TextTrackList].
   @DomName('TextTrackList.onaddtrack')
@@ -36222,32 +36899,24 @@
   // To suppress missing implicit constructor warnings.
   factory TimeRanges._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static TimeRanges internalCreateTimeRanges() {
-    return new TimeRanges._internalWrap();
-  }
 
-  factory TimeRanges._internalWrap() {
-    return new TimeRanges.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TimeRanges.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('TimeRanges.length')
   @DocsEditable()
-  int get length => _blink.BlinkTimeRanges.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkTimeRanges.instance.length_Getter_(this);
   
   @DomName('TimeRanges.end')
   @DocsEditable()
-  num end(int index) => _blink.BlinkTimeRanges.instance.end_Callback_1_(unwrap_jso(this), index);
+  num end(int index) => _blink.BlinkTimeRanges.instance.end_Callback_1_(this, index);
   
   @DomName('TimeRanges.start')
   @DocsEditable()
-  num start(int index) => _blink.BlinkTimeRanges.instance.start_Callback_1_(unwrap_jso(this), index);
+  num start(int index) => _blink.BlinkTimeRanges.instance.start_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -36267,126 +36936,6 @@
 
 
 @DocsEditable()
-@DomName('Timing')
-@Experimental() // untriaged
-class Timing extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory Timing._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static Timing internalCreateTiming() {
-    return new Timing._internalWrap();
-  }
-
-  factory Timing._internalWrap() {
-    return new Timing.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  Timing.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('Timing.delay')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get delay => _blink.BlinkTiming.instance.delay_Getter_(unwrap_jso(this));
-  
-  @DomName('Timing.delay')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set delay(num value) => _blink.BlinkTiming.instance.delay_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Timing.direction')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get direction => _blink.BlinkTiming.instance.direction_Getter_(unwrap_jso(this));
-  
-  @DomName('Timing.direction')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set direction(String value) => _blink.BlinkTiming.instance.direction_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Timing.easing')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get easing => _blink.BlinkTiming.instance.easing_Getter_(unwrap_jso(this));
-  
-  @DomName('Timing.easing')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set easing(String value) => _blink.BlinkTiming.instance.easing_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Timing.endDelay')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get endDelay => _blink.BlinkTiming.instance.endDelay_Getter_(unwrap_jso(this));
-  
-  @DomName('Timing.endDelay')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set endDelay(num value) => _blink.BlinkTiming.instance.endDelay_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Timing.fill')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get fill => _blink.BlinkTiming.instance.fill_Getter_(unwrap_jso(this));
-  
-  @DomName('Timing.fill')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set fill(String value) => _blink.BlinkTiming.instance.fill_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Timing.iterationStart')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get iterationStart => _blink.BlinkTiming.instance.iterationStart_Getter_(unwrap_jso(this));
-  
-  @DomName('Timing.iterationStart')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set iterationStart(num value) => _blink.BlinkTiming.instance.iterationStart_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Timing.iterations')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get iterations => _blink.BlinkTiming.instance.iterations_Getter_(unwrap_jso(this));
-  
-  @DomName('Timing.iterations')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set iterations(num value) => _blink.BlinkTiming.instance.iterations_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Timing.playbackRate')
-  @DocsEditable()
-  @Experimental() // untriaged
-  num get playbackRate => _blink.BlinkTiming.instance.playbackRate_Getter_(unwrap_jso(this));
-  
-  @DomName('Timing.playbackRate')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set playbackRate(num value) => _blink.BlinkTiming.instance.playbackRate_Setter_(unwrap_jso(this), value);
-  
-  @DomName('Timing.__getter__')
-  @DocsEditable()
-  @Experimental() // untriaged
-  Object __getter__(String name) => wrap_jso(_blink.BlinkTiming.instance.$__getter___Callback_1_(unwrap_jso(this), name));
-  
-  @DomName('Timing.__setter__')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void __setter__(String name, num duration) => _blink.BlinkTiming.instance.$__setter___Callback_2_(unwrap_jso(this), name, duration);
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
 @DomName('HTMLTitleElement')
 class TitleElement extends HtmlElement {
   // To suppress missing implicit constructor warnings.
@@ -36398,11 +36947,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TitleElement internalCreateTitleElement() {
-    return new TitleElement._internalWrap();
-  }
-
-  external factory TitleElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TitleElement.internal_() : super.internal_();
@@ -36428,86 +36973,76 @@
   // To suppress missing implicit constructor warnings.
   factory Touch._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Touch internalCreateTouch() {
-    return new Touch._internalWrap();
-  }
 
-  factory Touch._internalWrap() {
-    return new Touch.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Touch.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('Touch.clientX')
   @DocsEditable()
-  num get _clientX => _blink.BlinkTouch.instance.clientX_Getter_(unwrap_jso(this));
+  num get _clientX => _blink.BlinkTouch.instance.clientX_Getter_(this);
   
   @DomName('Touch.clientY')
   @DocsEditable()
-  num get _clientY => _blink.BlinkTouch.instance.clientY_Getter_(unwrap_jso(this));
+  num get _clientY => _blink.BlinkTouch.instance.clientY_Getter_(this);
   
   @DomName('Touch.force')
   @DocsEditable()
   @Experimental() // untriaged
-  num get force => _blink.BlinkTouch.instance.force_Getter_(unwrap_jso(this));
+  num get force => _blink.BlinkTouch.instance.force_Getter_(this);
   
   @DomName('Touch.identifier')
   @DocsEditable()
-  int get identifier => _blink.BlinkTouch.instance.identifier_Getter_(unwrap_jso(this));
+  int get identifier => _blink.BlinkTouch.instance.identifier_Getter_(this);
   
   @DomName('Touch.pageX')
   @DocsEditable()
-  num get _pageX => _blink.BlinkTouch.instance.pageX_Getter_(unwrap_jso(this));
+  num get _pageX => _blink.BlinkTouch.instance.pageX_Getter_(this);
   
   @DomName('Touch.pageY')
   @DocsEditable()
-  num get _pageY => _blink.BlinkTouch.instance.pageY_Getter_(unwrap_jso(this));
+  num get _pageY => _blink.BlinkTouch.instance.pageY_Getter_(this);
   
   @DomName('Touch.radiusX')
   @DocsEditable()
   @Experimental() // untriaged
-  num get _radiusX => _blink.BlinkTouch.instance.radiusX_Getter_(unwrap_jso(this));
+  num get _radiusX => _blink.BlinkTouch.instance.radiusX_Getter_(this);
   
   @DomName('Touch.radiusY')
   @DocsEditable()
   @Experimental() // untriaged
-  num get _radiusY => _blink.BlinkTouch.instance.radiusY_Getter_(unwrap_jso(this));
+  num get _radiusY => _blink.BlinkTouch.instance.radiusY_Getter_(this);
+  
+  @DomName('Touch.rotationAngle')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get rotationAngle => _blink.BlinkTouch.instance.rotationAngle_Getter_(this);
   
   @DomName('Touch.screenX')
   @DocsEditable()
-  num get _screenX => _blink.BlinkTouch.instance.screenX_Getter_(unwrap_jso(this));
+  num get _screenX => _blink.BlinkTouch.instance.screenX_Getter_(this);
   
   @DomName('Touch.screenY')
   @DocsEditable()
-  num get _screenY => _blink.BlinkTouch.instance.screenY_Getter_(unwrap_jso(this));
+  num get _screenY => _blink.BlinkTouch.instance.screenY_Getter_(this);
   
   @DomName('Touch.target')
   @DocsEditable()
-  EventTarget get target => wrap_jso(_blink.BlinkTouch.instance.target_Getter_(unwrap_jso(this)));
-  
-  @DomName('Touch.webkitRotationAngle')
-  @DocsEditable()
-  @SupportedBrowser(SupportedBrowser.CHROME)
-  @SupportedBrowser(SupportedBrowser.SAFARI)
-  @Experimental()
-  num get rotationAngle => _blink.BlinkTouch.instance.webkitRotationAngle_Getter_(unwrap_jso(this));
+  EventTarget get target => _convertNativeToDart_EventTarget(_blink.BlinkTouch.instance.target_Getter_(this));
   
 
 // As of Chrome 37, these all changed from long to double.  This code
 // preserves backwards compatability for the time being.
-  int get __clientX => _blink.BlinkTouch.instance.clientX_Getter_(unwrap_jso(this)).round();
-  int get __clientY => _blink.BlinkTouch.instance.clientY_Getter_(unwrap_jso(this)).round();
-  int get __screenX => _blink.BlinkTouch.instance.screenX_Getter_(unwrap_jso(this)).round();
-  int get __screenY => _blink.BlinkTouch.instance.screenY_Getter_(unwrap_jso(this)).round();
-  int get __pageX => _blink.BlinkTouch.instance.pageX_Getter_(unwrap_jso(this)).round();
-  int get __pageY => _blink.BlinkTouch.instance.pageY_Getter_(unwrap_jso(this)).round();
-  int get __radiusX => _blink.BlinkTouch.instance.radiusX_Getter_(unwrap_jso(this)).round();
-  int get __radiusY => _blink.BlinkTouch.instance.radiusY_Getter_(unwrap_jso(this)).round();
+  int get __clientX => _blink.BlinkTouch.instance.clientX_Getter_(this).round();
+  int get __clientY => _blink.BlinkTouch.instance.clientY_Getter_(this).round();
+  int get __screenX => _blink.BlinkTouch.instance.screenX_Getter_(this).round();
+  int get __screenY => _blink.BlinkTouch.instance.screenY_Getter_(this).round();
+  int get __pageX => _blink.BlinkTouch.instance.pageX_Getter_(this).round();
+  int get __pageY => _blink.BlinkTouch.instance.pageY_Getter_(this).round();
+  int get __radiusX => _blink.BlinkTouch.instance.radiusX_Getter_(this).round();
+  int get __radiusY => _blink.BlinkTouch.instance.radiusY_Getter_(this).round();
 
   @DomName('Touch.clientX')
   @DomName('Touch.clientY')
@@ -36565,11 +37100,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TouchEvent internalCreateTouchEvent() {
-    return new TouchEvent._internalWrap();
-  }
-
-  external factory TouchEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TouchEvent.internal_() : super.internal_();
@@ -36577,35 +37108,35 @@
 
   @DomName('TouchEvent.altKey')
   @DocsEditable()
-  bool get altKey => _blink.BlinkTouchEvent.instance.altKey_Getter_(unwrap_jso(this));
+  bool get altKey => _blink.BlinkTouchEvent.instance.altKey_Getter_(this);
   
   @DomName('TouchEvent.changedTouches')
   @DocsEditable()
-  TouchList get changedTouches => wrap_jso(_blink.BlinkTouchEvent.instance.changedTouches_Getter_(unwrap_jso(this)));
+  TouchList get changedTouches => _blink.BlinkTouchEvent.instance.changedTouches_Getter_(this);
   
   @DomName('TouchEvent.ctrlKey')
   @DocsEditable()
-  bool get ctrlKey => _blink.BlinkTouchEvent.instance.ctrlKey_Getter_(unwrap_jso(this));
+  bool get ctrlKey => _blink.BlinkTouchEvent.instance.ctrlKey_Getter_(this);
   
   @DomName('TouchEvent.metaKey')
   @DocsEditable()
-  bool get metaKey => _blink.BlinkTouchEvent.instance.metaKey_Getter_(unwrap_jso(this));
+  bool get metaKey => _blink.BlinkTouchEvent.instance.metaKey_Getter_(this);
   
   @DomName('TouchEvent.shiftKey')
   @DocsEditable()
-  bool get shiftKey => _blink.BlinkTouchEvent.instance.shiftKey_Getter_(unwrap_jso(this));
+  bool get shiftKey => _blink.BlinkTouchEvent.instance.shiftKey_Getter_(this);
   
   @DomName('TouchEvent.targetTouches')
   @DocsEditable()
-  TouchList get targetTouches => wrap_jso(_blink.BlinkTouchEvent.instance.targetTouches_Getter_(unwrap_jso(this)));
+  TouchList get targetTouches => _blink.BlinkTouchEvent.instance.targetTouches_Getter_(this);
   
   @DomName('TouchEvent.touches')
   @DocsEditable()
-  TouchList get touches => wrap_jso(_blink.BlinkTouchEvent.instance.touches_Getter_(unwrap_jso(this)));
+  TouchList get touches => _blink.BlinkTouchEvent.instance.touches_Getter_(this);
   
   @DomName('TouchEvent.initTouchEvent')
   @DocsEditable()
-  void _initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, Window view, int unused1, int unused2, int unused3, int unused4, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) => _blink.BlinkTouchEvent.instance.initTouchEvent_Callback_13_(unwrap_jso(this), unwrap_jso(touches), unwrap_jso(targetTouches), unwrap_jso(changedTouches), type, unwrap_jso(view), unused1, unused2, unused3, unused4, ctrlKey, altKey, shiftKey, metaKey);
+  void _initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, Window view, int unused1, int unused2, int unused3, int unused4, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) => _blink.BlinkTouchEvent.instance.initTouchEvent_Callback_13_(this, touches, targetTouches, changedTouches, type, view, unused1, unused2, unused3, unused4, ctrlKey, altKey, shiftKey, metaKey);
   
 
   /**
@@ -36635,35 +37166,27 @@
   // To suppress missing implicit constructor warnings.
   factory TouchList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static TouchList internalCreateTouchList() {
-    return new TouchList._internalWrap();
-  }
 
-  factory TouchList._internalWrap() {
-    return new TouchList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TouchList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
   @DomName('TouchList.length')
   @DocsEditable()
-  int get length => _blink.BlinkTouchList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkTouchList.instance.length_Getter_(this);
   
   Touch operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkTouchList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  Touch _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkTouchList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Touch _nativeIndexedGetter(int index) => (_blink.BlinkTouchList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, Touch value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -36705,7 +37228,106 @@
 
   @DomName('TouchList.item')
   @DocsEditable()
-  Touch item(int index) => wrap_jso(_blink.BlinkTouchList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Touch item(int index) => _blink.BlinkTouchList.instance.item_Callback_1_(this, index);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('TrackDefault')
+@Experimental() // untriaged
+class TrackDefault extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory TrackDefault._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('TrackDefault.TrackDefault')
+  @DocsEditable()
+  factory TrackDefault(String type, String language, String label, List<String> kinds, [String byteStreamTrackID]) {
+    if (byteStreamTrackID != null) {
+      List kinds_1 = convertDartToNative_StringArray(kinds);
+      return _blink.BlinkTrackDefault.instance.constructorCallback_5_(type, language, label, kinds_1, byteStreamTrackID);
+    }
+    List kinds_1 = convertDartToNative_StringArray(kinds);
+    return _blink.BlinkTrackDefault.instance.constructorCallback_4_(type, language, label, kinds_1);
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  TrackDefault.internal_() { }
+
+  @DomName('TrackDefault.byteStreamTrackID')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get byteStreamTrackID => _blink.BlinkTrackDefault.instance.byteStreamTrackID_Getter_(this);
+  
+  @DomName('TrackDefault.kinds')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<String> get kinds => _blink.BlinkTrackDefault.instance.kinds_Getter_(this);
+  
+  @DomName('TrackDefault.label')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get label => _blink.BlinkTrackDefault.instance.label_Getter_(this);
+  
+  @DomName('TrackDefault.language')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get language => _blink.BlinkTrackDefault.instance.language_Getter_(this);
+  
+  @DomName('TrackDefault.type')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get type => _blink.BlinkTrackDefault.instance.type_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('TrackDefaultList')
+@Experimental() // untriaged
+class TrackDefaultList extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory TrackDefaultList._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('TrackDefaultList.TrackDefaultList')
+  @DocsEditable()
+  factory TrackDefaultList([List<TrackDefault> trackDefaults]) {
+    if (trackDefaults != null) {
+      return _blink.BlinkTrackDefaultList.instance.constructorCallback_1_(trackDefaults);
+    }
+    return _blink.BlinkTrackDefaultList.instance.constructorCallback_0_();
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  TrackDefaultList.internal_() { }
+
+  @DomName('TrackDefaultList.length')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get length => _blink.BlinkTrackDefaultList.instance.length_Getter_(this);
+  
+  @DomName('TrackDefaultList.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  TrackDefault item(int index) => _blink.BlinkTrackDefaultList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -36732,11 +37354,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TrackElement internalCreateTrackElement() {
-    return new TrackElement._internalWrap();
-  }
-
-  external factory TrackElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TrackElement.internal_() : super.internal_();
@@ -36769,61 +37387,51 @@
 
   @DomName('HTMLTrackElement.default')
   @DocsEditable()
-  bool get defaultValue => _blink.BlinkHTMLTrackElement.instance.default_Getter_(unwrap_jso(this));
+  bool get defaultValue => _blink.BlinkHTMLTrackElement.instance.default_Getter_(this);
   
   @DomName('HTMLTrackElement.default')
   @DocsEditable()
-  set defaultValue(bool value) => _blink.BlinkHTMLTrackElement.instance.default_Setter_(unwrap_jso(this), value);
-  
-  @DomName('HTMLTrackElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get integrity => _blink.BlinkHTMLTrackElement.instance.integrity_Getter_(unwrap_jso(this));
-  
-  @DomName('HTMLTrackElement.integrity')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set integrity(String value) => _blink.BlinkHTMLTrackElement.instance.integrity_Setter_(unwrap_jso(this), value);
+  set defaultValue(bool value) => _blink.BlinkHTMLTrackElement.instance.default_Setter_(this, value);
   
   @DomName('HTMLTrackElement.kind')
   @DocsEditable()
-  String get kind => _blink.BlinkHTMLTrackElement.instance.kind_Getter_(unwrap_jso(this));
+  String get kind => _blink.BlinkHTMLTrackElement.instance.kind_Getter_(this);
   
   @DomName('HTMLTrackElement.kind')
   @DocsEditable()
-  set kind(String value) => _blink.BlinkHTMLTrackElement.instance.kind_Setter_(unwrap_jso(this), value);
+  set kind(String value) => _blink.BlinkHTMLTrackElement.instance.kind_Setter_(this, value);
   
   @DomName('HTMLTrackElement.label')
   @DocsEditable()
-  String get label => _blink.BlinkHTMLTrackElement.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkHTMLTrackElement.instance.label_Getter_(this);
   
   @DomName('HTMLTrackElement.label')
   @DocsEditable()
-  set label(String value) => _blink.BlinkHTMLTrackElement.instance.label_Setter_(unwrap_jso(this), value);
+  set label(String value) => _blink.BlinkHTMLTrackElement.instance.label_Setter_(this, value);
   
   @DomName('HTMLTrackElement.readyState')
   @DocsEditable()
-  int get readyState => _blink.BlinkHTMLTrackElement.instance.readyState_Getter_(unwrap_jso(this));
+  int get readyState => _blink.BlinkHTMLTrackElement.instance.readyState_Getter_(this);
   
   @DomName('HTMLTrackElement.src')
   @DocsEditable()
-  String get src => _blink.BlinkHTMLTrackElement.instance.src_Getter_(unwrap_jso(this));
+  String get src => _blink.BlinkHTMLTrackElement.instance.src_Getter_(this);
   
   @DomName('HTMLTrackElement.src')
   @DocsEditable()
-  set src(String value) => _blink.BlinkHTMLTrackElement.instance.src_Setter_(unwrap_jso(this), value);
+  set src(String value) => _blink.BlinkHTMLTrackElement.instance.src_Setter_(this, value);
   
   @DomName('HTMLTrackElement.srclang')
   @DocsEditable()
-  String get srclang => _blink.BlinkHTMLTrackElement.instance.srclang_Getter_(unwrap_jso(this));
+  String get srclang => _blink.BlinkHTMLTrackElement.instance.srclang_Getter_(this);
   
   @DomName('HTMLTrackElement.srclang')
   @DocsEditable()
-  set srclang(String value) => _blink.BlinkHTMLTrackElement.instance.srclang_Setter_(unwrap_jso(this), value);
+  set srclang(String value) => _blink.BlinkHTMLTrackElement.instance.srclang_Setter_(this, value);
   
   @DomName('HTMLTrackElement.track')
   @DocsEditable()
-  TextTrack get track => wrap_jso(_blink.BlinkHTMLTrackElement.instance.track_Getter_(unwrap_jso(this)));
+  TextTrack get track => _blink.BlinkHTMLTrackElement.instance.track_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -36840,13 +37448,19 @@
   // To suppress missing implicit constructor warnings.
   factory TrackEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static TrackEvent internalCreateTrackEvent() {
-    return new TrackEvent._internalWrap();
+  @DomName('TrackEvent.TrackEvent')
+  @DocsEditable()
+  factory TrackEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkTrackEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkTrackEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory TrackEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TrackEvent.internal_() : super.internal_();
@@ -36854,7 +37468,7 @@
 
   @DomName('TrackEvent.track')
   @DocsEditable()
-  Object get track => wrap_jso(_blink.BlinkTrackEvent.instance.track_Getter_(unwrap_jso(this)));
+  Object get track => (_blink.BlinkTrackEvent.instance.track_Getter_(this));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -36870,13 +37484,19 @@
   // To suppress missing implicit constructor warnings.
   factory TransitionEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static TransitionEvent internalCreateTransitionEvent() {
-    return new TransitionEvent._internalWrap();
+  @DomName('TransitionEvent.TransitionEvent')
+  @DocsEditable()
+  factory TransitionEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkTransitionEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkTransitionEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory TransitionEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TransitionEvent.internal_() : super.internal_();
@@ -36884,15 +37504,15 @@
 
   @DomName('TransitionEvent.elapsedTime')
   @DocsEditable()
-  num get elapsedTime => _blink.BlinkTransitionEvent.instance.elapsedTime_Getter_(unwrap_jso(this));
+  num get elapsedTime => _blink.BlinkTransitionEvent.instance.elapsedTime_Getter_(this);
   
   @DomName('TransitionEvent.propertyName')
   @DocsEditable()
-  String get propertyName => _blink.BlinkTransitionEvent.instance.propertyName_Getter_(unwrap_jso(this));
+  String get propertyName => _blink.BlinkTransitionEvent.instance.propertyName_Getter_(this);
   
   @DomName('TransitionEvent.pseudoElement')
   @DocsEditable()
-  String get pseudoElement => _blink.BlinkTransitionEvent.instance.pseudoElement_Getter_(unwrap_jso(this));
+  String get pseudoElement => _blink.BlinkTransitionEvent.instance.pseudoElement_Getter_(this);
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -36909,68 +37529,60 @@
   // To suppress missing implicit constructor warnings.
   factory TreeWalker._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static TreeWalker internalCreateTreeWalker() {
-    return new TreeWalker._internalWrap();
-  }
 
-  factory TreeWalker._internalWrap() {
-    return new TreeWalker.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TreeWalker.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('TreeWalker.currentNode')
   @DocsEditable()
-  Node get currentNode => wrap_jso(_blink.BlinkTreeWalker.instance.currentNode_Getter_(unwrap_jso(this)));
+  Node get currentNode => _blink.BlinkTreeWalker.instance.currentNode_Getter_(this);
   
   @DomName('TreeWalker.currentNode')
   @DocsEditable()
-  set currentNode(Node value) => _blink.BlinkTreeWalker.instance.currentNode_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set currentNode(Node value) => _blink.BlinkTreeWalker.instance.currentNode_Setter_(this, value);
   
   @DomName('TreeWalker.filter')
   @DocsEditable()
-  NodeFilter get filter => wrap_jso(_blink.BlinkTreeWalker.instance.filter_Getter_(unwrap_jso(this)));
+  NodeFilter get filter => _blink.BlinkTreeWalker.instance.filter_Getter_(this);
   
   @DomName('TreeWalker.root')
   @DocsEditable()
-  Node get root => wrap_jso(_blink.BlinkTreeWalker.instance.root_Getter_(unwrap_jso(this)));
+  Node get root => _blink.BlinkTreeWalker.instance.root_Getter_(this);
   
   @DomName('TreeWalker.whatToShow')
   @DocsEditable()
-  int get whatToShow => _blink.BlinkTreeWalker.instance.whatToShow_Getter_(unwrap_jso(this));
+  int get whatToShow => _blink.BlinkTreeWalker.instance.whatToShow_Getter_(this);
   
   @DomName('TreeWalker.firstChild')
   @DocsEditable()
-  Node firstChild() => wrap_jso(_blink.BlinkTreeWalker.instance.firstChild_Callback_0_(unwrap_jso(this)));
+  Node firstChild() => _blink.BlinkTreeWalker.instance.firstChild_Callback_0_(this);
   
   @DomName('TreeWalker.lastChild')
   @DocsEditable()
-  Node lastChild() => wrap_jso(_blink.BlinkTreeWalker.instance.lastChild_Callback_0_(unwrap_jso(this)));
+  Node lastChild() => _blink.BlinkTreeWalker.instance.lastChild_Callback_0_(this);
   
   @DomName('TreeWalker.nextNode')
   @DocsEditable()
-  Node nextNode() => wrap_jso(_blink.BlinkTreeWalker.instance.nextNode_Callback_0_(unwrap_jso(this)));
+  Node nextNode() => _blink.BlinkTreeWalker.instance.nextNode_Callback_0_(this);
   
   @DomName('TreeWalker.nextSibling')
   @DocsEditable()
-  Node nextSibling() => wrap_jso(_blink.BlinkTreeWalker.instance.nextSibling_Callback_0_(unwrap_jso(this)));
+  Node nextSibling() => _blink.BlinkTreeWalker.instance.nextSibling_Callback_0_(this);
   
   @DomName('TreeWalker.parentNode')
   @DocsEditable()
-  Node parentNode() => wrap_jso(_blink.BlinkTreeWalker.instance.parentNode_Callback_0_(unwrap_jso(this)));
+  Node parentNode() => _blink.BlinkTreeWalker.instance.parentNode_Callback_0_(this);
   
   @DomName('TreeWalker.previousNode')
   @DocsEditable()
-  Node previousNode() => wrap_jso(_blink.BlinkTreeWalker.instance.previousNode_Callback_0_(unwrap_jso(this)));
+  Node previousNode() => _blink.BlinkTreeWalker.instance.previousNode_Callback_0_(this);
   
   @DomName('TreeWalker.previousSibling')
   @DocsEditable()
-  Node previousSibling() => wrap_jso(_blink.BlinkTreeWalker.instance.previousSibling_Callback_0_(unwrap_jso(this)));
+  Node previousSibling() => _blink.BlinkTreeWalker.instance.previousSibling_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -36998,16 +37610,20 @@
     e._initUIEvent(type, canBubble, cancelable, view, detail);
     return e;
   }
-  // To suppress missing implicit constructor warnings.
-  factory UIEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('UIEvent.UIEvent')
+  @DocsEditable()
+  factory UIEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkUIEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkUIEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static UIEvent internalCreateUIEvent() {
-    return new UIEvent._internalWrap();
-  }
-
-  external factory UIEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   UIEvent.internal_() : super.internal_();
@@ -37016,62 +37632,35 @@
   @DomName('UIEvent.charCode')
   @DocsEditable()
   @Unstable()
-  int get _charCode => _blink.BlinkUIEvent.instance.charCode_Getter_(unwrap_jso(this));
+  int get _charCode => _blink.BlinkUIEvent.instance.charCode_Getter_(this);
   
   @DomName('UIEvent.detail')
   @DocsEditable()
-  int get detail => _blink.BlinkUIEvent.instance.detail_Getter_(unwrap_jso(this));
+  int get detail => _blink.BlinkUIEvent.instance.detail_Getter_(this);
   
   @DomName('UIEvent.keyCode')
   @DocsEditable()
   @Unstable()
-  int get _keyCode => _blink.BlinkUIEvent.instance.keyCode_Getter_(unwrap_jso(this));
+  int get _keyCode => _blink.BlinkUIEvent.instance.keyCode_Getter_(this);
   
-  @DomName('UIEvent.layerX')
+  @DomName('UIEvent.sourceDevice')
   @DocsEditable()
-  // http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents
-  @Experimental() // nonstandard
-  int get _layerX => _blink.BlinkUIEvent.instance.layerX_Getter_(unwrap_jso(this));
-  
-  @DomName('UIEvent.layerY')
-  @DocsEditable()
-  // http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents
-  @Experimental() // nonstandard
-  int get _layerY => _blink.BlinkUIEvent.instance.layerY_Getter_(unwrap_jso(this));
-  
-  @DomName('UIEvent.pageX')
-  @DocsEditable()
-  // http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents
-  @Experimental() // nonstandard
-  int get _pageX => _blink.BlinkUIEvent.instance.pageX_Getter_(unwrap_jso(this));
-  
-  @DomName('UIEvent.pageY')
-  @DocsEditable()
-  // http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevents
-  @Experimental() // nonstandard
-  int get _pageY => _blink.BlinkUIEvent.instance.pageY_Getter_(unwrap_jso(this));
+  @Experimental() // untriaged
+  InputDevice get sourceDevice => _blink.BlinkUIEvent.instance.sourceDevice_Getter_(this);
   
   @DomName('UIEvent.view')
   @DocsEditable()
-  WindowBase get view => wrap_jso(_blink.BlinkUIEvent.instance.view_Getter_(unwrap_jso(this)));
+  WindowBase get view => _convertNativeToDart_Window(_blink.BlinkUIEvent.instance.view_Getter_(this));
   
   @DomName('UIEvent.which')
   @DocsEditable()
   @Unstable()
-  int get which => _blink.BlinkUIEvent.instance.which_Getter_(unwrap_jso(this));
+  int get _which => _blink.BlinkUIEvent.instance.which_Getter_(this);
   
   @DomName('UIEvent.initUIEvent')
   @DocsEditable()
-  void _initUIEvent(String type, bool canBubble, bool cancelable, Window view, int detail) => _blink.BlinkUIEvent.instance.initUIEvent_Callback_5_(unwrap_jso(this), type, canBubble, cancelable, unwrap_jso(view), detail);
+  void _initUIEvent(String type, bool bubbles, bool cancelable, Window view, int detail) => _blink.BlinkUIEvent.instance.initUIEvent_Callback_5_(this, type, bubbles, cancelable, view, detail);
   
-
-  @DomName('UIEvent.layerX')
-  @DomName('UIEvent.layerY')
-  Point get layer => new Point(_layerX, _layerY);
-
-  @DomName('UIEvent.pageX')
-  @DomName('UIEvent.pageY')
-  Point get page => new Point(_pageX, _pageY);
 }
 // 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
@@ -37092,11 +37681,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static UListElement internalCreateUListElement() {
-    return new UListElement._internalWrap();
-  }
-
-  external factory UListElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   UListElement.internal_() : super.internal_();
@@ -37124,11 +37709,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static UnknownElement internalCreateUnknownElement() {
-    return new UnknownElement._internalWrap();
-  }
-
-  external factory UnknownElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   UnknownElement.internal_() : super.internal_();
@@ -37154,45 +37735,37 @@
   // To suppress missing implicit constructor warnings.
   factory Url._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Url internalCreateUrl() {
-    return new Url._internalWrap();
-  }
 
-  factory Url._internalWrap() {
-    return new Url.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Url.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   static String createObjectUrl(blob_OR_source_OR_stream) {
     if ((blob_OR_source_OR_stream is Blob || blob_OR_source_OR_stream == null)) {
-      return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
+      return _blink.BlinkURL.instance.createObjectURL_Callback_1_(blob_OR_source_OR_stream);
     }
     if ((blob_OR_source_OR_stream is MediaSource)) {
-      return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
+      return _blink.BlinkURL.instance.createObjectURL_Callback_1_(blob_OR_source_OR_stream);
     }
     if ((blob_OR_source_OR_stream is MediaStream)) {
-      return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
+      return _blink.BlinkURL.instance.createObjectURL_Callback_1_(blob_OR_source_OR_stream);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   @DomName('URL.createObjectUrlFromBlob')
   @DocsEditable()
-  static String createObjectUrlFromBlob(Blob blob) => _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob));
+  static String createObjectUrlFromBlob(Blob blob) => _blink.BlinkURL.instance.createObjectURL_Callback_1_(blob);
   
   @DomName('URL.createObjectUrlFromSource')
   @DocsEditable()
-  static String createObjectUrlFromSource(MediaSource source) => _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(source));
+  static String createObjectUrlFromSource(MediaSource source) => _blink.BlinkURL.instance.createObjectURL_Callback_1_(source);
   
   @DomName('URL.createObjectUrlFromStream')
   @DocsEditable()
-  static String createObjectUrlFromStream(MediaStream stream) => _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(stream));
+  static String createObjectUrlFromStream(MediaStream stream) => _blink.BlinkURL.instance.createObjectURL_Callback_1_(stream);
   
   @DomName('URL.revokeObjectURL')
   @DocsEditable()
@@ -37201,112 +37774,112 @@
   @DomName('URL.hash')
   @DocsEditable()
   @Experimental() // untriaged
-  String get hash => _blink.BlinkURL.instance.hash_Getter_(unwrap_jso(this));
+  String get hash => _blink.BlinkURL.instance.hash_Getter_(this);
   
   @DomName('URL.hash')
   @DocsEditable()
   @Experimental() // untriaged
-  set hash(String value) => _blink.BlinkURL.instance.hash_Setter_(unwrap_jso(this), value);
+  set hash(String value) => _blink.BlinkURL.instance.hash_Setter_(this, value);
   
   @DomName('URL.host')
   @DocsEditable()
   @Experimental() // untriaged
-  String get host => _blink.BlinkURL.instance.host_Getter_(unwrap_jso(this));
+  String get host => _blink.BlinkURL.instance.host_Getter_(this);
   
   @DomName('URL.host')
   @DocsEditable()
   @Experimental() // untriaged
-  set host(String value) => _blink.BlinkURL.instance.host_Setter_(unwrap_jso(this), value);
+  set host(String value) => _blink.BlinkURL.instance.host_Setter_(this, value);
   
   @DomName('URL.hostname')
   @DocsEditable()
   @Experimental() // untriaged
-  String get hostname => _blink.BlinkURL.instance.hostname_Getter_(unwrap_jso(this));
+  String get hostname => _blink.BlinkURL.instance.hostname_Getter_(this);
   
   @DomName('URL.hostname')
   @DocsEditable()
   @Experimental() // untriaged
-  set hostname(String value) => _blink.BlinkURL.instance.hostname_Setter_(unwrap_jso(this), value);
+  set hostname(String value) => _blink.BlinkURL.instance.hostname_Setter_(this, value);
   
   @DomName('URL.href')
   @DocsEditable()
   @Experimental() // untriaged
-  String get href => _blink.BlinkURL.instance.href_Getter_(unwrap_jso(this));
+  String get href => _blink.BlinkURL.instance.href_Getter_(this);
   
   @DomName('URL.href')
   @DocsEditable()
   @Experimental() // untriaged
-  set href(String value) => _blink.BlinkURL.instance.href_Setter_(unwrap_jso(this), value);
+  set href(String value) => _blink.BlinkURL.instance.href_Setter_(this, value);
   
   @DomName('URL.origin')
   @DocsEditable()
   @Experimental() // untriaged
-  String get origin => _blink.BlinkURL.instance.origin_Getter_(unwrap_jso(this));
+  String get origin => _blink.BlinkURL.instance.origin_Getter_(this);
   
   @DomName('URL.password')
   @DocsEditable()
   @Experimental() // untriaged
-  String get password => _blink.BlinkURL.instance.password_Getter_(unwrap_jso(this));
+  String get password => _blink.BlinkURL.instance.password_Getter_(this);
   
   @DomName('URL.password')
   @DocsEditable()
   @Experimental() // untriaged
-  set password(String value) => _blink.BlinkURL.instance.password_Setter_(unwrap_jso(this), value);
+  set password(String value) => _blink.BlinkURL.instance.password_Setter_(this, value);
   
   @DomName('URL.pathname')
   @DocsEditable()
   @Experimental() // untriaged
-  String get pathname => _blink.BlinkURL.instance.pathname_Getter_(unwrap_jso(this));
+  String get pathname => _blink.BlinkURL.instance.pathname_Getter_(this);
   
   @DomName('URL.pathname')
   @DocsEditable()
   @Experimental() // untriaged
-  set pathname(String value) => _blink.BlinkURL.instance.pathname_Setter_(unwrap_jso(this), value);
+  set pathname(String value) => _blink.BlinkURL.instance.pathname_Setter_(this, value);
   
   @DomName('URL.port')
   @DocsEditable()
   @Experimental() // untriaged
-  String get port => _blink.BlinkURL.instance.port_Getter_(unwrap_jso(this));
+  String get port => _blink.BlinkURL.instance.port_Getter_(this);
   
   @DomName('URL.port')
   @DocsEditable()
   @Experimental() // untriaged
-  set port(String value) => _blink.BlinkURL.instance.port_Setter_(unwrap_jso(this), value);
+  set port(String value) => _blink.BlinkURL.instance.port_Setter_(this, value);
   
   @DomName('URL.protocol')
   @DocsEditable()
   @Experimental() // untriaged
-  String get protocol => _blink.BlinkURL.instance.protocol_Getter_(unwrap_jso(this));
+  String get protocol => _blink.BlinkURL.instance.protocol_Getter_(this);
   
   @DomName('URL.protocol')
   @DocsEditable()
   @Experimental() // untriaged
-  set protocol(String value) => _blink.BlinkURL.instance.protocol_Setter_(unwrap_jso(this), value);
+  set protocol(String value) => _blink.BlinkURL.instance.protocol_Setter_(this, value);
   
   @DomName('URL.search')
   @DocsEditable()
   @Experimental() // untriaged
-  String get search => _blink.BlinkURL.instance.search_Getter_(unwrap_jso(this));
+  String get search => _blink.BlinkURL.instance.search_Getter_(this);
   
   @DomName('URL.search')
   @DocsEditable()
   @Experimental() // untriaged
-  set search(String value) => _blink.BlinkURL.instance.search_Setter_(unwrap_jso(this), value);
+  set search(String value) => _blink.BlinkURL.instance.search_Setter_(this, value);
   
   @DomName('URL.username')
   @DocsEditable()
   @Experimental() // untriaged
-  String get username => _blink.BlinkURL.instance.username_Getter_(unwrap_jso(this));
+  String get username => _blink.BlinkURL.instance.username_Getter_(this);
   
   @DomName('URL.username')
   @DocsEditable()
   @Experimental() // untriaged
-  set username(String value) => _blink.BlinkURL.instance.username_Setter_(unwrap_jso(this), value);
+  set username(String value) => _blink.BlinkURL.instance.username_Setter_(this, value);
   
   @DomName('URL.toString')
   @DocsEditable()
   @Experimental() // untriaged
-  String toString() => _blink.BlinkURL.instance.toString_Callback_0_(unwrap_jso(this));
+  String toString() => _blink.BlinkURL.instance.toString_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -37507,65 +38080,280 @@
 
 
 @DocsEditable()
+@DomName('VRDevice')
+@Experimental() // untriaged
+class VRDevice extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory VRDevice._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  VRDevice.internal_() { }
+
+  @DomName('VRDevice.deviceId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get deviceId => _blink.BlinkVRDevice.instance.deviceId_Getter_(this);
+  
+  @DomName('VRDevice.deviceName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get deviceName => _blink.BlinkVRDevice.instance.deviceName_Getter_(this);
+  
+  @DomName('VRDevice.hardwareUnitId')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get hardwareUnitId => _blink.BlinkVRDevice.instance.hardwareUnitId_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('VREyeParameters')
+@Experimental() // untriaged
+class VREyeParameters extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory VREyeParameters._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  VREyeParameters.internal_() { }
+
+  @DomName('VREyeParameters.currentFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VRFieldOfView get currentFieldOfView => _blink.BlinkVREyeParameters.instance.currentFieldOfView_Getter_(this);
+  
+  @DomName('VREyeParameters.eyeTranslation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomPoint get eyeTranslation => _blink.BlinkVREyeParameters.instance.eyeTranslation_Getter_(this);
+  
+  @DomName('VREyeParameters.maximumFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VRFieldOfView get maximumFieldOfView => _blink.BlinkVREyeParameters.instance.maximumFieldOfView_Getter_(this);
+  
+  @DomName('VREyeParameters.minimumFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VRFieldOfView get minimumFieldOfView => _blink.BlinkVREyeParameters.instance.minimumFieldOfView_Getter_(this);
+  
+  @DomName('VREyeParameters.recommendedFieldOfView')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VRFieldOfView get recommendedFieldOfView => _blink.BlinkVREyeParameters.instance.recommendedFieldOfView_Getter_(this);
+  
+  @DomName('VREyeParameters.renderRect')
+  @DocsEditable()
+  @Experimental() // untriaged
+  _DomRect get renderRect => _blink.BlinkVREyeParameters.instance.renderRect_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('VRFieldOfView')
+@Experimental() // untriaged
+class VRFieldOfView extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory VRFieldOfView._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('VRFieldOfView.VRFieldOfView')
+  @DocsEditable()
+  factory VRFieldOfView([Map fov]) {
+    if (fov != null) {
+      var fov_1 = convertDartToNative_Dictionary(fov);
+      return _blink.BlinkVRFieldOfView.instance.constructorCallback_1_(fov_1);
+    }
+    return _blink.BlinkVRFieldOfView.instance.constructorCallback_0_();
+  }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  VRFieldOfView.internal_() { }
+
+  @DomName('VRFieldOfView.downDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get downDegrees => _blink.BlinkVRFieldOfView.instance.downDegrees_Getter_(this);
+  
+  @DomName('VRFieldOfView.downDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set downDegrees(num value) => _blink.BlinkVRFieldOfView.instance.downDegrees_Setter_(this, value);
+  
+  @DomName('VRFieldOfView.leftDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get leftDegrees => _blink.BlinkVRFieldOfView.instance.leftDegrees_Getter_(this);
+  
+  @DomName('VRFieldOfView.leftDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set leftDegrees(num value) => _blink.BlinkVRFieldOfView.instance.leftDegrees_Setter_(this, value);
+  
+  @DomName('VRFieldOfView.rightDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get rightDegrees => _blink.BlinkVRFieldOfView.instance.rightDegrees_Getter_(this);
+  
+  @DomName('VRFieldOfView.rightDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set rightDegrees(num value) => _blink.BlinkVRFieldOfView.instance.rightDegrees_Setter_(this, value);
+  
+  @DomName('VRFieldOfView.upDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get upDegrees => _blink.BlinkVRFieldOfView.instance.upDegrees_Getter_(this);
+  
+  @DomName('VRFieldOfView.upDegrees')
+  @DocsEditable()
+  @Experimental() // untriaged
+  set upDegrees(num value) => _blink.BlinkVRFieldOfView.instance.upDegrees_Setter_(this, value);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('VRPositionState')
+@Experimental() // untriaged
+class VRPositionState extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory VRPositionState._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  VRPositionState.internal_() { }
+
+  @DomName('VRPositionState.angularAcceleration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomPoint get angularAcceleration => _blink.BlinkVRPositionState.instance.angularAcceleration_Getter_(this);
+  
+  @DomName('VRPositionState.angularVelocity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomPoint get angularVelocity => _blink.BlinkVRPositionState.instance.angularVelocity_Getter_(this);
+  
+  @DomName('VRPositionState.linearAcceleration')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomPoint get linearAcceleration => _blink.BlinkVRPositionState.instance.linearAcceleration_Getter_(this);
+  
+  @DomName('VRPositionState.linearVelocity')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomPoint get linearVelocity => _blink.BlinkVRPositionState.instance.linearVelocity_Getter_(this);
+  
+  @DomName('VRPositionState.orientation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomPoint get orientation => _blink.BlinkVRPositionState.instance.orientation_Getter_(this);
+  
+  @DomName('VRPositionState.position')
+  @DocsEditable()
+  @Experimental() // untriaged
+  DomPoint get position => _blink.BlinkVRPositionState.instance.position_Getter_(this);
+  
+  @DomName('VRPositionState.timeStamp')
+  @DocsEditable()
+  @Experimental() // untriaged
+  num get timeStamp => _blink.BlinkVRPositionState.instance.timeStamp_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('ValidityState')
 class ValidityState extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ValidityState._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ValidityState internalCreateValidityState() {
-    return new ValidityState._internalWrap();
-  }
 
-  factory ValidityState._internalWrap() {
-    return new ValidityState.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ValidityState.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('ValidityState.badInput')
   @DocsEditable()
-  bool get badInput => _blink.BlinkValidityState.instance.badInput_Getter_(unwrap_jso(this));
+  bool get badInput => _blink.BlinkValidityState.instance.badInput_Getter_(this);
   
   @DomName('ValidityState.customError')
   @DocsEditable()
-  bool get customError => _blink.BlinkValidityState.instance.customError_Getter_(unwrap_jso(this));
+  bool get customError => _blink.BlinkValidityState.instance.customError_Getter_(this);
   
   @DomName('ValidityState.patternMismatch')
   @DocsEditable()
-  bool get patternMismatch => _blink.BlinkValidityState.instance.patternMismatch_Getter_(unwrap_jso(this));
+  bool get patternMismatch => _blink.BlinkValidityState.instance.patternMismatch_Getter_(this);
   
   @DomName('ValidityState.rangeOverflow')
   @DocsEditable()
-  bool get rangeOverflow => _blink.BlinkValidityState.instance.rangeOverflow_Getter_(unwrap_jso(this));
+  bool get rangeOverflow => _blink.BlinkValidityState.instance.rangeOverflow_Getter_(this);
   
   @DomName('ValidityState.rangeUnderflow')
   @DocsEditable()
-  bool get rangeUnderflow => _blink.BlinkValidityState.instance.rangeUnderflow_Getter_(unwrap_jso(this));
+  bool get rangeUnderflow => _blink.BlinkValidityState.instance.rangeUnderflow_Getter_(this);
   
   @DomName('ValidityState.stepMismatch')
   @DocsEditable()
-  bool get stepMismatch => _blink.BlinkValidityState.instance.stepMismatch_Getter_(unwrap_jso(this));
+  bool get stepMismatch => _blink.BlinkValidityState.instance.stepMismatch_Getter_(this);
   
   @DomName('ValidityState.tooLong')
   @DocsEditable()
-  bool get tooLong => _blink.BlinkValidityState.instance.tooLong_Getter_(unwrap_jso(this));
+  bool get tooLong => _blink.BlinkValidityState.instance.tooLong_Getter_(this);
+  
+  @DomName('ValidityState.tooShort')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get tooShort => _blink.BlinkValidityState.instance.tooShort_Getter_(this);
   
   @DomName('ValidityState.typeMismatch')
   @DocsEditable()
-  bool get typeMismatch => _blink.BlinkValidityState.instance.typeMismatch_Getter_(unwrap_jso(this));
+  bool get typeMismatch => _blink.BlinkValidityState.instance.typeMismatch_Getter_(this);
   
   @DomName('ValidityState.valid')
   @DocsEditable()
-  bool get valid => _blink.BlinkValidityState.instance.valid_Getter_(unwrap_jso(this));
+  bool get valid => _blink.BlinkValidityState.instance.valid_Getter_(this);
   
   @DomName('ValidityState.valueMissing')
   @DocsEditable()
-  bool get valueMissing => _blink.BlinkValidityState.instance.valueMissing_Getter_(unwrap_jso(this));
+  bool get valueMissing => _blink.BlinkValidityState.instance.valueMissing_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -37584,11 +38372,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static VideoElement internalCreateVideoElement() {
-    return new VideoElement._internalWrap();
-  }
-
-  external factory VideoElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   VideoElement.internal_() : super.internal_();
@@ -37602,54 +38386,54 @@
 
   @DomName('HTMLVideoElement.height')
   @DocsEditable()
-  int get height => _blink.BlinkHTMLVideoElement.instance.height_Getter_(unwrap_jso(this));
+  int get height => _blink.BlinkHTMLVideoElement.instance.height_Getter_(this);
   
   @DomName('HTMLVideoElement.height')
   @DocsEditable()
-  set height(int value) => _blink.BlinkHTMLVideoElement.instance.height_Setter_(unwrap_jso(this), value);
+  set height(int value) => _blink.BlinkHTMLVideoElement.instance.height_Setter_(this, value);
   
   @DomName('HTMLVideoElement.poster')
   @DocsEditable()
-  String get poster => _blink.BlinkHTMLVideoElement.instance.poster_Getter_(unwrap_jso(this));
+  String get poster => _blink.BlinkHTMLVideoElement.instance.poster_Getter_(this);
   
   @DomName('HTMLVideoElement.poster')
   @DocsEditable()
-  set poster(String value) => _blink.BlinkHTMLVideoElement.instance.poster_Setter_(unwrap_jso(this), value);
+  set poster(String value) => _blink.BlinkHTMLVideoElement.instance.poster_Setter_(this, value);
   
   @DomName('HTMLVideoElement.videoHeight')
   @DocsEditable()
-  int get videoHeight => _blink.BlinkHTMLVideoElement.instance.videoHeight_Getter_(unwrap_jso(this));
+  int get videoHeight => _blink.BlinkHTMLVideoElement.instance.videoHeight_Getter_(this);
   
   @DomName('HTMLVideoElement.videoWidth')
   @DocsEditable()
-  int get videoWidth => _blink.BlinkHTMLVideoElement.instance.videoWidth_Getter_(unwrap_jso(this));
+  int get videoWidth => _blink.BlinkHTMLVideoElement.instance.videoWidth_Getter_(this);
   
   @DomName('HTMLVideoElement.webkitDecodedFrameCount')
   @DocsEditable()
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
-  int get decodedFrameCount => _blink.BlinkHTMLVideoElement.instance.webkitDecodedFrameCount_Getter_(unwrap_jso(this));
+  int get decodedFrameCount => _blink.BlinkHTMLVideoElement.instance.webkitDecodedFrameCount_Getter_(this);
   
   @DomName('HTMLVideoElement.webkitDroppedFrameCount')
   @DocsEditable()
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
-  int get droppedFrameCount => _blink.BlinkHTMLVideoElement.instance.webkitDroppedFrameCount_Getter_(unwrap_jso(this));
+  int get droppedFrameCount => _blink.BlinkHTMLVideoElement.instance.webkitDroppedFrameCount_Getter_(this);
   
   @DomName('HTMLVideoElement.width')
   @DocsEditable()
-  int get width => _blink.BlinkHTMLVideoElement.instance.width_Getter_(unwrap_jso(this));
+  int get width => _blink.BlinkHTMLVideoElement.instance.width_Getter_(this);
   
   @DomName('HTMLVideoElement.width')
   @DocsEditable()
-  set width(int value) => _blink.BlinkHTMLVideoElement.instance.width_Setter_(unwrap_jso(this), value);
+  set width(int value) => _blink.BlinkHTMLVideoElement.instance.width_Setter_(this, value);
   
   @DomName('HTMLVideoElement.getVideoPlaybackQuality')
   @DocsEditable()
   @Experimental() // untriaged
-  VideoPlaybackQuality getVideoPlaybackQuality() => wrap_jso(_blink.BlinkHTMLVideoElement.instance.getVideoPlaybackQuality_Callback_0_(unwrap_jso(this)));
+  VideoPlaybackQuality getVideoPlaybackQuality() => _blink.BlinkHTMLVideoElement.instance.getVideoPlaybackQuality_Callback_0_(this);
   
   @DomName('HTMLVideoElement.webkitEnterFullscreen')
   @DocsEditable()
@@ -37657,7 +38441,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
-  void enterFullscreen() => _blink.BlinkHTMLVideoElement.instance.webkitEnterFullscreen_Callback_0_(unwrap_jso(this));
+  void enterFullscreen() => _blink.BlinkHTMLVideoElement.instance.webkitEnterFullscreen_Callback_0_(this);
   
   @DomName('HTMLVideoElement.webkitExitFullscreen')
   @DocsEditable()
@@ -37665,7 +38449,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#dom-document-exitfullscreen
-  void exitFullscreen() => _blink.BlinkHTMLVideoElement.instance.webkitExitFullscreen_Callback_0_(unwrap_jso(this));
+  void exitFullscreen() => _blink.BlinkHTMLVideoElement.instance.webkitExitFullscreen_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -37682,40 +38466,32 @@
   // To suppress missing implicit constructor warnings.
   factory VideoPlaybackQuality._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static VideoPlaybackQuality internalCreateVideoPlaybackQuality() {
-    return new VideoPlaybackQuality._internalWrap();
-  }
 
-  factory VideoPlaybackQuality._internalWrap() {
-    return new VideoPlaybackQuality.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   VideoPlaybackQuality.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('VideoPlaybackQuality.corruptedVideoFrames')
   @DocsEditable()
   @Experimental() // untriaged
-  int get corruptedVideoFrames => _blink.BlinkVideoPlaybackQuality.instance.corruptedVideoFrames_Getter_(unwrap_jso(this));
+  int get corruptedVideoFrames => _blink.BlinkVideoPlaybackQuality.instance.corruptedVideoFrames_Getter_(this);
   
   @DomName('VideoPlaybackQuality.creationTime')
   @DocsEditable()
   @Experimental() // untriaged
-  num get creationTime => _blink.BlinkVideoPlaybackQuality.instance.creationTime_Getter_(unwrap_jso(this));
+  num get creationTime => _blink.BlinkVideoPlaybackQuality.instance.creationTime_Getter_(this);
   
   @DomName('VideoPlaybackQuality.droppedVideoFrames')
   @DocsEditable()
   @Experimental() // untriaged
-  int get droppedVideoFrames => _blink.BlinkVideoPlaybackQuality.instance.droppedVideoFrames_Getter_(unwrap_jso(this));
+  int get droppedVideoFrames => _blink.BlinkVideoPlaybackQuality.instance.droppedVideoFrames_Getter_(this);
   
   @DomName('VideoPlaybackQuality.totalVideoFrames')
   @DocsEditable()
   @Experimental() // untriaged
-  int get totalVideoFrames => _blink.BlinkVideoPlaybackQuality.instance.totalVideoFrames_Getter_(unwrap_jso(this));
+  int get totalVideoFrames => _blink.BlinkVideoPlaybackQuality.instance.totalVideoFrames_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -37732,50 +38508,42 @@
   // To suppress missing implicit constructor warnings.
   factory VideoTrack._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static VideoTrack internalCreateVideoTrack() {
-    return new VideoTrack._internalWrap();
-  }
 
-  factory VideoTrack._internalWrap() {
-    return new VideoTrack.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   VideoTrack.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('VideoTrack.id')
   @DocsEditable()
   @Experimental() // untriaged
-  String get id => _blink.BlinkVideoTrack.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkVideoTrack.instance.id_Getter_(this);
   
   @DomName('VideoTrack.kind')
   @DocsEditable()
   @Experimental() // untriaged
-  String get kind => _blink.BlinkVideoTrack.instance.kind_Getter_(unwrap_jso(this));
+  String get kind => _blink.BlinkVideoTrack.instance.kind_Getter_(this);
   
   @DomName('VideoTrack.label')
   @DocsEditable()
   @Experimental() // untriaged
-  String get label => _blink.BlinkVideoTrack.instance.label_Getter_(unwrap_jso(this));
+  String get label => _blink.BlinkVideoTrack.instance.label_Getter_(this);
   
   @DomName('VideoTrack.language')
   @DocsEditable()
   @Experimental() // untriaged
-  String get language => _blink.BlinkVideoTrack.instance.language_Getter_(unwrap_jso(this));
+  String get language => _blink.BlinkVideoTrack.instance.language_Getter_(this);
   
   @DomName('VideoTrack.selected')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get selected => _blink.BlinkVideoTrack.instance.selected_Getter_(unwrap_jso(this));
+  bool get selected => _blink.BlinkVideoTrack.instance.selected_Getter_(this);
   
   @DomName('VideoTrack.selected')
   @DocsEditable()
   @Experimental() // untriaged
-  set selected(bool value) => _blink.BlinkVideoTrack.instance.selected_Setter_(unwrap_jso(this), value);
+  set selected(bool value) => _blink.BlinkVideoTrack.instance.selected_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -37799,11 +38567,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static VideoTrackList internalCreateVideoTrackList() {
-    return new VideoTrackList._internalWrap();
-  }
-
-  external factory VideoTrackList._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   VideoTrackList.internal_() : super.internal_();
@@ -37812,22 +38576,22 @@
   @DomName('VideoTrackList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkVideoTrackList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkVideoTrackList.instance.length_Getter_(this);
   
   @DomName('VideoTrackList.selectedIndex')
   @DocsEditable()
   @Experimental() // untriaged
-  int get selectedIndex => _blink.BlinkVideoTrackList.instance.selectedIndex_Getter_(unwrap_jso(this));
+  int get selectedIndex => _blink.BlinkVideoTrackList.instance.selectedIndex_Getter_(this);
   
   @DomName('VideoTrackList.__getter__')
   @DocsEditable()
   @Experimental() // untriaged
-  VideoTrack __getter__(int index) => wrap_jso(_blink.BlinkVideoTrackList.instance.$__getter___Callback_1_(unwrap_jso(this), index));
+  VideoTrack __getter__(int index) => _blink.BlinkVideoTrackList.instance.$__getter___Callback_1_(this, index);
   
   @DomName('VideoTrackList.getTrackById')
   @DocsEditable()
   @Experimental() // untriaged
-  VideoTrack getTrackById(String id) => wrap_jso(_blink.BlinkVideoTrackList.instance.getTrackById_Callback_1_(unwrap_jso(this), id));
+  VideoTrack getTrackById(String id) => _blink.BlinkVideoTrackList.instance.getTrackById_Callback_1_(this, id);
   
   @DomName('VideoTrackList.onchange')
   @DocsEditable()
@@ -37863,16 +38627,12 @@
   @DomName('VTTCue.VTTCue')
   @DocsEditable()
   factory VttCue(num startTime, num endTime, String text) {
-    return wrap_jso(_blink.BlinkVTTCue.instance.constructorCallback_3_(startTime, endTime, text));
+    return _blink.BlinkVTTCue.instance.constructorCallback_3_(startTime, endTime, text);
   }
 
 
   @Deprecated("Internal Use Only")
-  static VttCue internalCreateVttCue() {
-    return new VttCue._internalWrap();
-  }
-
-  external factory VttCue._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   VttCue.internal_() : super.internal_();
@@ -37881,87 +38641,87 @@
   @DomName('VTTCue.align')
   @DocsEditable()
   @Experimental() // untriaged
-  String get align => _blink.BlinkVTTCue.instance.align_Getter_(unwrap_jso(this));
+  String get align => _blink.BlinkVTTCue.instance.align_Getter_(this);
   
   @DomName('VTTCue.align')
   @DocsEditable()
   @Experimental() // untriaged
-  set align(String value) => _blink.BlinkVTTCue.instance.align_Setter_(unwrap_jso(this), value);
+  set align(String value) => _blink.BlinkVTTCue.instance.align_Setter_(this, value);
   
   @DomName('VTTCue.line')
   @DocsEditable()
   @Experimental() // untriaged
-  int get line => _blink.BlinkVTTCue.instance.line_Getter_(unwrap_jso(this));
+  Object get line => (_blink.BlinkVTTCue.instance.line_Getter_(this));
   
   @DomName('VTTCue.line')
   @DocsEditable()
   @Experimental() // untriaged
-  set line(int value) => _blink.BlinkVTTCue.instance.line_Setter_(unwrap_jso(this), value);
+  set line(Object value) => _blink.BlinkVTTCue.instance.line_Setter_(this, value);
   
   @DomName('VTTCue.position')
   @DocsEditable()
   @Experimental() // untriaged
-  int get position => _blink.BlinkVTTCue.instance.position_Getter_(unwrap_jso(this));
+  Object get position => (_blink.BlinkVTTCue.instance.position_Getter_(this));
   
   @DomName('VTTCue.position')
   @DocsEditable()
   @Experimental() // untriaged
-  set position(int value) => _blink.BlinkVTTCue.instance.position_Setter_(unwrap_jso(this), value);
+  set position(Object value) => _blink.BlinkVTTCue.instance.position_Setter_(this, value);
   
   @DomName('VTTCue.regionId')
   @DocsEditable()
   @Experimental() // untriaged
-  String get regionId => _blink.BlinkVTTCue.instance.regionId_Getter_(unwrap_jso(this));
+  String get regionId => _blink.BlinkVTTCue.instance.regionId_Getter_(this);
   
   @DomName('VTTCue.regionId')
   @DocsEditable()
   @Experimental() // untriaged
-  set regionId(String value) => _blink.BlinkVTTCue.instance.regionId_Setter_(unwrap_jso(this), value);
+  set regionId(String value) => _blink.BlinkVTTCue.instance.regionId_Setter_(this, value);
   
   @DomName('VTTCue.size')
   @DocsEditable()
   @Experimental() // untriaged
-  int get size => _blink.BlinkVTTCue.instance.size_Getter_(unwrap_jso(this));
+  num get size => _blink.BlinkVTTCue.instance.size_Getter_(this);
   
   @DomName('VTTCue.size')
   @DocsEditable()
   @Experimental() // untriaged
-  set size(int value) => _blink.BlinkVTTCue.instance.size_Setter_(unwrap_jso(this), value);
+  set size(num value) => _blink.BlinkVTTCue.instance.size_Setter_(this, value);
   
   @DomName('VTTCue.snapToLines')
   @DocsEditable()
   @Experimental() // untriaged
-  bool get snapToLines => _blink.BlinkVTTCue.instance.snapToLines_Getter_(unwrap_jso(this));
+  bool get snapToLines => _blink.BlinkVTTCue.instance.snapToLines_Getter_(this);
   
   @DomName('VTTCue.snapToLines')
   @DocsEditable()
   @Experimental() // untriaged
-  set snapToLines(bool value) => _blink.BlinkVTTCue.instance.snapToLines_Setter_(unwrap_jso(this), value);
+  set snapToLines(bool value) => _blink.BlinkVTTCue.instance.snapToLines_Setter_(this, value);
   
   @DomName('VTTCue.text')
   @DocsEditable()
   @Experimental() // untriaged
-  String get text => _blink.BlinkVTTCue.instance.text_Getter_(unwrap_jso(this));
+  String get text => _blink.BlinkVTTCue.instance.text_Getter_(this);
   
   @DomName('VTTCue.text')
   @DocsEditable()
   @Experimental() // untriaged
-  set text(String value) => _blink.BlinkVTTCue.instance.text_Setter_(unwrap_jso(this), value);
+  set text(String value) => _blink.BlinkVTTCue.instance.text_Setter_(this, value);
   
   @DomName('VTTCue.vertical')
   @DocsEditable()
   @Experimental() // untriaged
-  String get vertical => _blink.BlinkVTTCue.instance.vertical_Getter_(unwrap_jso(this));
+  String get vertical => _blink.BlinkVTTCue.instance.vertical_Getter_(this);
   
   @DomName('VTTCue.vertical')
   @DocsEditable()
   @Experimental() // untriaged
-  set vertical(String value) => _blink.BlinkVTTCue.instance.vertical_Setter_(unwrap_jso(this), value);
+  set vertical(String value) => _blink.BlinkVTTCue.instance.vertical_Setter_(this, value);
   
   @DomName('VTTCue.getCueAsHTML')
   @DocsEditable()
   @Experimental() // untriaged
-  DocumentFragment getCueAsHtml() => wrap_jso(_blink.BlinkVTTCue.instance.getCueAsHTML_Callback_0_(unwrap_jso(this)));
+  DocumentFragment getCueAsHtml() => _blink.BlinkVTTCue.instance.getCueAsHTML_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -37981,108 +38741,100 @@
   @DomName('VTTRegion.VTTRegion')
   @DocsEditable()
   factory VttRegion() {
-    return wrap_jso(_blink.BlinkVTTRegion.instance.constructorCallback_0_());
+    return _blink.BlinkVTTRegion.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static VttRegion internalCreateVttRegion() {
-    return new VttRegion._internalWrap();
-  }
-
-  factory VttRegion._internalWrap() {
-    return new VttRegion.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   VttRegion.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('VTTRegion.height')
   @DocsEditable()
   @Experimental() // untriaged
-  int get height => _blink.BlinkVTTRegion.instance.height_Getter_(unwrap_jso(this));
+  int get height => _blink.BlinkVTTRegion.instance.height_Getter_(this);
   
   @DomName('VTTRegion.height')
   @DocsEditable()
   @Experimental() // untriaged
-  set height(int value) => _blink.BlinkVTTRegion.instance.height_Setter_(unwrap_jso(this), value);
+  set height(int value) => _blink.BlinkVTTRegion.instance.height_Setter_(this, value);
   
   @DomName('VTTRegion.id')
   @DocsEditable()
   @Experimental() // untriaged
-  String get id => _blink.BlinkVTTRegion.instance.id_Getter_(unwrap_jso(this));
+  String get id => _blink.BlinkVTTRegion.instance.id_Getter_(this);
   
   @DomName('VTTRegion.id')
   @DocsEditable()
   @Experimental() // untriaged
-  set id(String value) => _blink.BlinkVTTRegion.instance.id_Setter_(unwrap_jso(this), value);
+  set id(String value) => _blink.BlinkVTTRegion.instance.id_Setter_(this, value);
   
   @DomName('VTTRegion.regionAnchorX')
   @DocsEditable()
   @Experimental() // untriaged
-  num get regionAnchorX => _blink.BlinkVTTRegion.instance.regionAnchorX_Getter_(unwrap_jso(this));
+  num get regionAnchorX => _blink.BlinkVTTRegion.instance.regionAnchorX_Getter_(this);
   
   @DomName('VTTRegion.regionAnchorX')
   @DocsEditable()
   @Experimental() // untriaged
-  set regionAnchorX(num value) => _blink.BlinkVTTRegion.instance.regionAnchorX_Setter_(unwrap_jso(this), value);
+  set regionAnchorX(num value) => _blink.BlinkVTTRegion.instance.regionAnchorX_Setter_(this, value);
   
   @DomName('VTTRegion.regionAnchorY')
   @DocsEditable()
   @Experimental() // untriaged
-  num get regionAnchorY => _blink.BlinkVTTRegion.instance.regionAnchorY_Getter_(unwrap_jso(this));
+  num get regionAnchorY => _blink.BlinkVTTRegion.instance.regionAnchorY_Getter_(this);
   
   @DomName('VTTRegion.regionAnchorY')
   @DocsEditable()
   @Experimental() // untriaged
-  set regionAnchorY(num value) => _blink.BlinkVTTRegion.instance.regionAnchorY_Setter_(unwrap_jso(this), value);
+  set regionAnchorY(num value) => _blink.BlinkVTTRegion.instance.regionAnchorY_Setter_(this, value);
   
   @DomName('VTTRegion.scroll')
   @DocsEditable()
   @Experimental() // untriaged
-  String get scroll => _blink.BlinkVTTRegion.instance.scroll_Getter_(unwrap_jso(this));
+  String get scroll => _blink.BlinkVTTRegion.instance.scroll_Getter_(this);
   
   @DomName('VTTRegion.scroll')
   @DocsEditable()
   @Experimental() // untriaged
-  set scroll(String value) => _blink.BlinkVTTRegion.instance.scroll_Setter_(unwrap_jso(this), value);
+  set scroll(String value) => _blink.BlinkVTTRegion.instance.scroll_Setter_(this, value);
   
   @DomName('VTTRegion.track')
   @DocsEditable()
   @Experimental() // untriaged
-  TextTrack get track => wrap_jso(_blink.BlinkVTTRegion.instance.track_Getter_(unwrap_jso(this)));
+  TextTrack get track => _blink.BlinkVTTRegion.instance.track_Getter_(this);
   
   @DomName('VTTRegion.viewportAnchorX')
   @DocsEditable()
   @Experimental() // untriaged
-  num get viewportAnchorX => _blink.BlinkVTTRegion.instance.viewportAnchorX_Getter_(unwrap_jso(this));
+  num get viewportAnchorX => _blink.BlinkVTTRegion.instance.viewportAnchorX_Getter_(this);
   
   @DomName('VTTRegion.viewportAnchorX')
   @DocsEditable()
   @Experimental() // untriaged
-  set viewportAnchorX(num value) => _blink.BlinkVTTRegion.instance.viewportAnchorX_Setter_(unwrap_jso(this), value);
+  set viewportAnchorX(num value) => _blink.BlinkVTTRegion.instance.viewportAnchorX_Setter_(this, value);
   
   @DomName('VTTRegion.viewportAnchorY')
   @DocsEditable()
   @Experimental() // untriaged
-  num get viewportAnchorY => _blink.BlinkVTTRegion.instance.viewportAnchorY_Getter_(unwrap_jso(this));
+  num get viewportAnchorY => _blink.BlinkVTTRegion.instance.viewportAnchorY_Getter_(this);
   
   @DomName('VTTRegion.viewportAnchorY')
   @DocsEditable()
   @Experimental() // untriaged
-  set viewportAnchorY(num value) => _blink.BlinkVTTRegion.instance.viewportAnchorY_Setter_(unwrap_jso(this), value);
+  set viewportAnchorY(num value) => _blink.BlinkVTTRegion.instance.viewportAnchorY_Setter_(this, value);
   
   @DomName('VTTRegion.width')
   @DocsEditable()
   @Experimental() // untriaged
-  num get width => _blink.BlinkVTTRegion.instance.width_Getter_(unwrap_jso(this));
+  num get width => _blink.BlinkVTTRegion.instance.width_Getter_(this);
   
   @DomName('VTTRegion.width')
   @DocsEditable()
   @Experimental() // untriaged
-  set width(num value) => _blink.BlinkVTTRegion.instance.width_Setter_(unwrap_jso(this), value);
+  set width(num value) => _blink.BlinkVTTRegion.instance.width_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -38099,35 +38851,27 @@
   // To suppress missing implicit constructor warnings.
   factory VttRegionList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static VttRegionList internalCreateVttRegionList() {
-    return new VttRegionList._internalWrap();
-  }
 
-  factory VttRegionList._internalWrap() {
-    return new VttRegionList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   VttRegionList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('VTTRegionList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkVTTRegionList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkVTTRegionList.instance.length_Getter_(this);
   
   @DomName('VTTRegionList.getRegionById')
   @DocsEditable()
   @Experimental() // untriaged
-  VttRegion getRegionById(String id) => wrap_jso(_blink.BlinkVTTRegionList.instance.getRegionById_Callback_1_(unwrap_jso(this), id));
+  VttRegion getRegionById(String id) => _blink.BlinkVTTRegionList.instance.getRegionById_Callback_1_(this, id);
   
   @DomName('VTTRegionList.item')
   @DocsEditable()
   @Experimental() // untriaged
-  VttRegion item(int index) => wrap_jso(_blink.BlinkVTTRegionList.instance.item_Callback_1_(unwrap_jso(this), index));
+  VttRegion item(int index) => _blink.BlinkVTTRegionList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -38224,27 +38968,16 @@
 
   @DomName('WebSocket.WebSocket')
   @DocsEditable()
-  factory WebSocket(String url, [protocol_OR_protocols]) {
-    if ((url is String || url == null) && protocol_OR_protocols == null) {
-      return wrap_jso(_blink.BlinkWebSocket.instance.constructorCallback_1_(url));
+  factory WebSocket(String url, [Object protocols]) {
+    if (protocols != null) {
+      return _blink.BlinkWebSocket.instance.constructorCallback_2_(url, protocols);
     }
-    if ((protocol_OR_protocols is String || protocol_OR_protocols == null) && (url is String || url == null)) {
-      return wrap_jso(_blink.BlinkWebSocket.instance.constructorCallback_2_(url, protocol_OR_protocols));
-    }
-    if ((protocol_OR_protocols is List<String> || protocol_OR_protocols == null) && (url is String || url == null)) {
-      List protocols_1 = convertDartToNative_StringArray(protocol_OR_protocols);
-      return wrap_jso(_blink.BlinkWebSocket.instance.constructorCallback_2_(url, protocols_1));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _blink.BlinkWebSocket.instance.constructorCallback_1_(url);
   }
 
 
   @Deprecated("Internal Use Only")
-  static WebSocket internalCreateWebSocket() {
-    return new WebSocket._internalWrap();
-  }
-
-  external factory WebSocket._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   WebSocket.internal_() : super.internal_();
@@ -38271,60 +39004,60 @@
 
   @DomName('WebSocket.binaryType')
   @DocsEditable()
-  String get binaryType => _blink.BlinkWebSocket.instance.binaryType_Getter_(unwrap_jso(this));
+  String get binaryType => _blink.BlinkWebSocket.instance.binaryType_Getter_(this);
   
   @DomName('WebSocket.binaryType')
   @DocsEditable()
-  set binaryType(String value) => _blink.BlinkWebSocket.instance.binaryType_Setter_(unwrap_jso(this), value);
+  set binaryType(String value) => _blink.BlinkWebSocket.instance.binaryType_Setter_(this, value);
   
   @DomName('WebSocket.bufferedAmount')
   @DocsEditable()
-  int get bufferedAmount => _blink.BlinkWebSocket.instance.bufferedAmount_Getter_(unwrap_jso(this));
+  int get bufferedAmount => _blink.BlinkWebSocket.instance.bufferedAmount_Getter_(this);
   
   @DomName('WebSocket.extensions')
   @DocsEditable()
-  String get extensions => _blink.BlinkWebSocket.instance.extensions_Getter_(unwrap_jso(this));
+  String get extensions => _blink.BlinkWebSocket.instance.extensions_Getter_(this);
   
   @DomName('WebSocket.protocol')
   @DocsEditable()
-  String get protocol => _blink.BlinkWebSocket.instance.protocol_Getter_(unwrap_jso(this));
+  String get protocol => _blink.BlinkWebSocket.instance.protocol_Getter_(this);
   
   @DomName('WebSocket.readyState')
   @DocsEditable()
-  int get readyState => _blink.BlinkWebSocket.instance.readyState_Getter_(unwrap_jso(this));
+  int get readyState => _blink.BlinkWebSocket.instance.readyState_Getter_(this);
   
   @DomName('WebSocket.url')
   @DocsEditable()
-  String get url => _blink.BlinkWebSocket.instance.url_Getter_(unwrap_jso(this));
+  String get url => _blink.BlinkWebSocket.instance.url_Getter_(this);
   
   void close([int code, String reason]) {
     if (reason != null) {
-      _blink.BlinkWebSocket.instance.close_Callback_2_(unwrap_jso(this), code, reason);
+      _blink.BlinkWebSocket.instance.close_Callback_2_(this, code, reason);
       return;
     }
     if (code != null) {
-      _blink.BlinkWebSocket.instance.close_Callback_1_(unwrap_jso(this), code);
+      _blink.BlinkWebSocket.instance.close_Callback_1_(this, code);
       return;
     }
-    _blink.BlinkWebSocket.instance.close_Callback_0_(unwrap_jso(this));
+    _blink.BlinkWebSocket.instance.close_Callback_0_(this);
     return;
   }
 
   void send(data) {
-    if ((data is String || data == null)) {
-      _blink.BlinkWebSocket.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+    if ((data is String)) {
+      _blink.BlinkWebSocket.instance.send_Callback_1_(this, data);
       return;
     }
-    if ((data is Blob || data == null)) {
-      _blink.BlinkWebSocket.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+    if ((data is Blob)) {
+      _blink.BlinkWebSocket.instance.send_Callback_1_(this, data);
       return;
     }
-    if ((data is TypedData || data == null)) {
-      _blink.BlinkWebSocket.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+    if ((data is TypedData)) {
+      _blink.BlinkWebSocket.instance.send_Callback_1_(this, data);
       return;
     }
-    if ((data is ByteBuffer || data == null)) {
-      _blink.BlinkWebSocket.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+    if ((data is ByteBuffer)) {
+      _blink.BlinkWebSocket.instance.send_Callback_1_(this, data);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
@@ -38332,19 +39065,19 @@
 
   @DomName('WebSocket.sendBlob')
   @DocsEditable()
-  void sendBlob(Blob data) => _blink.BlinkWebSocket.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+  void sendBlob(Blob data) => _blink.BlinkWebSocket.instance.send_Callback_1_(this, data);
   
   @DomName('WebSocket.sendByteBuffer')
   @DocsEditable()
-  void sendByteBuffer(ByteBuffer data) => _blink.BlinkWebSocket.instance.send_Callback_1_(unwrap_jso(this), data);
+  void sendByteBuffer(ByteBuffer data) => _blink.BlinkWebSocket.instance.send_Callback_1_(this, data);
   
   @DomName('WebSocket.sendString')
   @DocsEditable()
-  void sendString(String data) => _blink.BlinkWebSocket.instance.send_Callback_1_(unwrap_jso(this), data);
+  void sendString(String data) => _blink.BlinkWebSocket.instance.send_Callback_1_(this, data);
   
   @DomName('WebSocket.sendTypedData')
   @DocsEditable()
-  void sendTypedData(TypedData data) => _blink.BlinkWebSocket.instance.send_Callback_1_(unwrap_jso(this), unwrap_jso(data));
+  void sendTypedData(TypedData data) => _blink.BlinkWebSocket.instance.send_Callback_1_(this, data);
   
   /// Stream of `close` events handled by this [WebSocket].
   @DomName('WebSocket.onclose')
@@ -38404,19 +39137,23 @@
       'relatedTarget': relatedTarget,
     };
 
-    return wrap_jso(_blink.BlinkWheelEvent.instance.constructorCallback_2_(type, convertDartToNative_Dictionary(options)));
+    return _blink.BlinkWheelEvent.instance.constructorCallback_2_(type, convertDartToNative_Dictionary(options));
   }
 
-  // To suppress missing implicit constructor warnings.
-  factory WheelEvent._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('WheelEvent.WheelEvent')
+  @DocsEditable()
+  factory WheelEvent._(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkWheelEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkWheelEvent.instance.constructorCallback_1_(type);
+  }
 
 
   @Deprecated("Internal Use Only")
-  static WheelEvent internalCreateWheelEvent() {
-    return new WheelEvent._internalWrap();
-  }
-
-  external factory WheelEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   WheelEvent.internal_() : super.internal_();
@@ -38436,19 +39173,19 @@
 
   @DomName('WheelEvent.deltaMode')
   @DocsEditable()
-  int get deltaMode => _blink.BlinkWheelEvent.instance.deltaMode_Getter_(unwrap_jso(this));
+  int get deltaMode => _blink.BlinkWheelEvent.instance.deltaMode_Getter_(this);
   
   @DomName('WheelEvent.deltaX')
   @DocsEditable()
-  num get _deltaX => _blink.BlinkWheelEvent.instance.deltaX_Getter_(unwrap_jso(this));
+  num get _deltaX => _blink.BlinkWheelEvent.instance.deltaX_Getter_(this);
   
   @DomName('WheelEvent.deltaY')
   @DocsEditable()
-  num get _deltaY => _blink.BlinkWheelEvent.instance.deltaY_Getter_(unwrap_jso(this));
+  num get _deltaY => _blink.BlinkWheelEvent.instance.deltaY_Getter_(this);
   
   @DomName('WheelEvent.deltaZ')
   @DocsEditable()
-  num get deltaZ => _blink.BlinkWheelEvent.instance.deltaZ_Getter_(unwrap_jso(this));
+  num get deltaZ => _blink.BlinkWheelEvent.instance.deltaZ_Getter_(this);
   
 
   /**
@@ -38555,7 +39292,7 @@
    * for the animation to continue.
    */
   @DomName('Window.requestAnimationFrame')
-  int requestAnimationFrame(RequestAnimationFrameCallback callback) {
+  int requestAnimationFrame(FrameRequestCallback callback) {
     return _requestAnimationFrame(_wrapZone(callback));
   }
 
@@ -38752,11 +39489,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Window internalCreateWindow() {
-    return new Window._internalWrap();
-  }
-
-  external factory Window._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Window.internal_() : super.internal_();
@@ -38797,17 +39530,6 @@
   static const int TEMPORARY = 0;
 
   /**
-   * Entrypoint for CSS-related functions.
-   *
-   * ## Other resources
-   *
-   * * [The CSS interface](http://dev.w3.org/csswg/css-conditional/#the-css-interface) from W3C.
-   */
-  @DomName('Window.CSS')
-  @DocsEditable()
-  Css get css => wrap_jso(_blink.BlinkWindow.instance.CSS_Getter_(unwrap_jso(this)));
-  
-  /**
    * The application cache for this window.
    *
    * ## Other resources
@@ -38821,15 +39543,20 @@
    */
   @DomName('Window.applicationCache')
   @DocsEditable()
-  ApplicationCache get applicationCache => wrap_jso(_blink.BlinkWindow.instance.applicationCache_Getter_(unwrap_jso(this)));
+  ApplicationCache get applicationCache => _blink.BlinkWindow.instance.applicationCache_Getter_(this);
+  
+  @DomName('Window.caches')
+  @DocsEditable()
+  @Experimental() // untriaged
+  CacheStorage get caches => _blink.BlinkWindow.instance.caches_Getter_(this);
   
   @DomName('Window.closed')
   @DocsEditable()
-  bool get closed => _blink.BlinkWindow.instance.closed_Getter_(unwrap_jso(this));
+  bool get closed => _blink.BlinkWindow.instance.closed_Getter_(this);
   
   @DomName('Window.console')
   @DocsEditable()
-  Console get console => wrap_jso(_blink.BlinkWindow.instance.console_Getter_(unwrap_jso(this)));
+  Console get console => _blink.BlinkWindow.instance.console_Getter_(this);
   
   /**
    * Entrypoint for the browser's cryptographic functions.
@@ -38842,31 +39569,31 @@
   @DocsEditable()
   // http://www.w3.org/TR/WebCryptoAPI/
   @Experimental()
-  Crypto get crypto => wrap_jso(_blink.BlinkWindow.instance.crypto_Getter_(unwrap_jso(this)));
+  Crypto get crypto => _blink.BlinkWindow.instance.crypto_Getter_(this);
   
   /// *Deprecated*.
   @DomName('Window.defaultStatus')
   @DocsEditable()
   @Experimental() // non-standard
-  String get defaultStatus => _blink.BlinkWindow.instance.defaultStatus_Getter_(unwrap_jso(this));
+  String get defaultStatus => _blink.BlinkWindow.instance.defaultStatus_Getter_(this);
   
   /// *Deprecated*.
   @DomName('Window.defaultStatus')
   @DocsEditable()
   @Experimental() // non-standard
-  set defaultStatus(String value) => _blink.BlinkWindow.instance.defaultStatus_Setter_(unwrap_jso(this), value);
+  set defaultStatus(String value) => _blink.BlinkWindow.instance.defaultStatus_Setter_(this, value);
   
   /// *Deprecated*.
   @DomName('Window.defaultstatus')
   @DocsEditable()
   @Experimental() // non-standard
-  String get defaultstatus => _blink.BlinkWindow.instance.defaultstatus_Getter_(unwrap_jso(this));
+  String get defaultstatus => _blink.BlinkWindow.instance.defaultstatus_Getter_(this);
   
   /// *Deprecated*.
   @DomName('Window.defaultstatus')
   @DocsEditable()
   @Experimental() // non-standard
-  set defaultstatus(String value) => _blink.BlinkWindow.instance.defaultstatus_Setter_(unwrap_jso(this), value);
+  set defaultstatus(String value) => _blink.BlinkWindow.instance.defaultstatus_Setter_(this, value);
   
   /**
    * The ratio between physical pixels and logical CSS pixels.
@@ -38882,11 +39609,11 @@
   @DocsEditable()
   // http://www.quirksmode.org/blog/archives/2012/06/devicepixelrati.html
   @Experimental() // non-standard
-  num get devicePixelRatio => _blink.BlinkWindow.instance.devicePixelRatio_Getter_(unwrap_jso(this));
+  num get devicePixelRatio => _blink.BlinkWindow.instance.devicePixelRatio_Getter_(this);
   
   @DomName('Window.document')
   @DocsEditable()
-  Document get document => wrap_jso(_blink.BlinkWindow.instance.document_Getter_(unwrap_jso(this)));
+  Document get document => _blink.BlinkWindow.instance.document_Getter_(this);
   
   /**
    * The current session history for this window's newest document.
@@ -38898,7 +39625,7 @@
    */
   @DomName('Window.history')
   @DocsEditable()
-  History get history => wrap_jso(_blink.BlinkWindow.instance.history_Getter_(unwrap_jso(this)));
+  History get history => _blink.BlinkWindow.instance.history_Getter_(this);
   
   @DomName('Window.indexedDB')
   @DocsEditable()
@@ -38906,7 +39633,7 @@
   @SupportedBrowser(SupportedBrowser.FIREFOX, '15')
   @SupportedBrowser(SupportedBrowser.IE, '10')
   @Experimental()
-  IdbFactory get indexedDB => wrap_jso(_blink.BlinkWindow.instance.indexedDB_Getter_(unwrap_jso(this)));
+  IdbFactory get indexedDB => _blink.BlinkWindow.instance.indexedDB_Getter_(this);
   
   /**
    * The height of the viewport including scrollbars.
@@ -38918,7 +39645,7 @@
    */
   @DomName('Window.innerHeight')
   @DocsEditable()
-  int get innerHeight => _blink.BlinkWindow.instance.innerHeight_Getter_(unwrap_jso(this));
+  int get innerHeight => _blink.BlinkWindow.instance.innerHeight_Getter_(this);
   
   /**
    * The width of the viewport including scrollbars.
@@ -38930,7 +39657,7 @@
    */
   @DomName('Window.innerWidth')
   @DocsEditable()
-  int get innerWidth => _blink.BlinkWindow.instance.innerWidth_Getter_(unwrap_jso(this));
+  int get innerWidth => _blink.BlinkWindow.instance.innerWidth_Getter_(this);
   
   /**
    * Storage for this window that persists across sessions.
@@ -38946,11 +39673,11 @@
    */
   @DomName('Window.localStorage')
   @DocsEditable()
-  Storage get localStorage => wrap_jso(_blink.BlinkWindow.instance.localStorage_Getter_(unwrap_jso(this)));
+  Storage get localStorage => _blink.BlinkWindow.instance.localStorage_Getter_(this);
   
   @DomName('Window.location')
   @DocsEditable()
-  Location get location => wrap_jso(_blink.BlinkWindow.instance.location_Getter_(unwrap_jso(this)));
+  Location get location => _blink.BlinkWindow.instance.location_Getter_(this);
   
   /**
    * This window's location bar, which displays the URL.
@@ -38963,7 +39690,7 @@
    */
   @DomName('Window.locationbar')
   @DocsEditable()
-  BarProp get locationbar => wrap_jso(_blink.BlinkWindow.instance.locationbar_Getter_(unwrap_jso(this)));
+  BarProp get locationbar => _blink.BlinkWindow.instance.locationbar_Getter_(this);
   
   /**
    * This window's menu bar, which displays menu commands.
@@ -38976,7 +39703,7 @@
    */
   @DomName('Window.menubar')
   @DocsEditable()
-  BarProp get menubar => wrap_jso(_blink.BlinkWindow.instance.menubar_Getter_(unwrap_jso(this)));
+  BarProp get menubar => _blink.BlinkWindow.instance.menubar_Getter_(this);
   
   /**
    * The name of this window.
@@ -38988,7 +39715,7 @@
    */
   @DomName('Window.name')
   @DocsEditable()
-  String get name => _blink.BlinkWindow.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkWindow.instance.name_Getter_(this);
   
   /**
    * The name of this window.
@@ -39000,7 +39727,7 @@
    */
   @DomName('Window.name')
   @DocsEditable()
-  set name(String value) => _blink.BlinkWindow.instance.name_Setter_(unwrap_jso(this), value);
+  set name(String value) => _blink.BlinkWindow.instance.name_Setter_(this, value);
   
   /**
    * The user agent accessing this window.
@@ -39013,7 +39740,7 @@
    */
   @DomName('Window.navigator')
   @DocsEditable()
-  Navigator get navigator => wrap_jso(_blink.BlinkWindow.instance.navigator_Getter_(unwrap_jso(this)));
+  Navigator get navigator => _blink.BlinkWindow.instance.navigator_Getter_(this);
   
   /**
    * Whether objects are drawn offscreen before being displayed.
@@ -39026,20 +39753,20 @@
   @DomName('Window.offscreenBuffering')
   @DocsEditable()
   @Experimental() // non-standard
-  bool get offscreenBuffering => _blink.BlinkWindow.instance.offscreenBuffering_Getter_(unwrap_jso(this));
+  bool get offscreenBuffering => _blink.BlinkWindow.instance.offscreenBuffering_Getter_(this);
   
   @DomName('Window.opener')
   @DocsEditable()
-  WindowBase get opener => wrap_jso(_blink.BlinkWindow.instance.opener_Getter_(unwrap_jso(this)));
+  WindowBase get opener => _convertNativeToDart_Window(_blink.BlinkWindow.instance.opener_Getter_(this));
   
   @DomName('Window.opener')
   @DocsEditable()
-  set opener(Window value) => _blink.BlinkWindow.instance.opener_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set opener(Window value) => _blink.BlinkWindow.instance.opener_Setter_(this, value);
   
   @DomName('Window.orientation')
   @DocsEditable()
   @Experimental() // untriaged
-  int get orientation => _blink.BlinkWindow.instance.orientation_Getter_(unwrap_jso(this));
+  int get orientation => _blink.BlinkWindow.instance.orientation_Getter_(this);
   
   /**
    * The height of this window including all user interface elements.
@@ -39051,7 +39778,7 @@
    */
   @DomName('Window.outerHeight')
   @DocsEditable()
-  int get outerHeight => _blink.BlinkWindow.instance.outerHeight_Getter_(unwrap_jso(this));
+  int get outerHeight => _blink.BlinkWindow.instance.outerHeight_Getter_(this);
   
   /**
    * The width of the window including all user interface elements.
@@ -39063,7 +39790,7 @@
    */
   @DomName('Window.outerWidth')
   @DocsEditable()
-  int get outerWidth => _blink.BlinkWindow.instance.outerWidth_Getter_(unwrap_jso(this));
+  int get outerWidth => _blink.BlinkWindow.instance.outerWidth_Getter_(this);
   
   /**
    * The distance this window has been scrolled horizontally.
@@ -39080,7 +39807,7 @@
    */
   @DomName('Window.pageXOffset')
   @DocsEditable()
-  num get _pageXOffset => _blink.BlinkWindow.instance.pageXOffset_Getter_(unwrap_jso(this));
+  num get _pageXOffset => _blink.BlinkWindow.instance.pageXOffset_Getter_(this);
   
   /**
    * The distance this window has been scrolled vertically.
@@ -39097,11 +39824,11 @@
    */
   @DomName('Window.pageYOffset')
   @DocsEditable()
-  num get _pageYOffset => _blink.BlinkWindow.instance.pageYOffset_Getter_(unwrap_jso(this));
+  num get _pageYOffset => _blink.BlinkWindow.instance.pageYOffset_Getter_(this);
   
   @DomName('Window.parent')
   @DocsEditable()
-  WindowBase get parent => wrap_jso(_blink.BlinkWindow.instance.parent_Getter_(unwrap_jso(this)));
+  WindowBase get parent => _convertNativeToDart_Window(_blink.BlinkWindow.instance.parent_Getter_(this));
   
   /**
    * Timing and navigation data for this window.
@@ -39119,7 +39846,7 @@
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.FIREFOX)
   @SupportedBrowser(SupportedBrowser.IE)
-  Performance get performance => wrap_jso(_blink.BlinkWindow.instance.performance_Getter_(unwrap_jso(this)));
+  Performance get performance => _blink.BlinkWindow.instance.performance_Getter_(this);
   
   /**
    * Information about the screen displaying this window.
@@ -39131,7 +39858,7 @@
    */
   @DomName('Window.screen')
   @DocsEditable()
-  Screen get screen => wrap_jso(_blink.BlinkWindow.instance.screen_Getter_(unwrap_jso(this)));
+  Screen get screen => _blink.BlinkWindow.instance.screen_Getter_(this);
   
   /**
    * The distance from the left side of the screen to the left side of this
@@ -39144,7 +39871,7 @@
    */
   @DomName('Window.screenLeft')
   @DocsEditable()
-  int get screenLeft => _blink.BlinkWindow.instance.screenLeft_Getter_(unwrap_jso(this));
+  int get screenLeft => _blink.BlinkWindow.instance.screenLeft_Getter_(this);
   
   /**
    * The distance from the top of the screen to the top of this window.
@@ -39156,7 +39883,7 @@
    */
   @DomName('Window.screenTop')
   @DocsEditable()
-  int get screenTop => _blink.BlinkWindow.instance.screenTop_Getter_(unwrap_jso(this));
+  int get screenTop => _blink.BlinkWindow.instance.screenTop_Getter_(this);
   
   /**
    * The distance from the left side of the screen to the mouse pointer.
@@ -39168,7 +39895,7 @@
    */
   @DomName('Window.screenX')
   @DocsEditable()
-  int get screenX => _blink.BlinkWindow.instance.screenX_Getter_(unwrap_jso(this));
+  int get screenX => _blink.BlinkWindow.instance.screenX_Getter_(this);
   
   /**
    * The distance from the top of the screen to the mouse pointer.
@@ -39180,15 +39907,15 @@
    */
   @DomName('Window.screenY')
   @DocsEditable()
-  int get screenY => _blink.BlinkWindow.instance.screenY_Getter_(unwrap_jso(this));
+  int get screenY => _blink.BlinkWindow.instance.screenY_Getter_(this);
   
   @DomName('Window.scrollX')
   @DocsEditable()
-  num get _scrollX => _blink.BlinkWindow.instance.scrollX_Getter_(unwrap_jso(this));
+  num get _scrollX => _blink.BlinkWindow.instance.scrollX_Getter_(this);
   
   @DomName('Window.scrollY')
   @DocsEditable()
-  num get _scrollY => _blink.BlinkWindow.instance.scrollY_Getter_(unwrap_jso(this));
+  num get _scrollY => _blink.BlinkWindow.instance.scrollY_Getter_(this);
   
   /**
    * This window's scroll bars.
@@ -39201,7 +39928,7 @@
    */
   @DomName('Window.scrollbars')
   @DocsEditable()
-  BarProp get scrollbars => wrap_jso(_blink.BlinkWindow.instance.scrollbars_Getter_(unwrap_jso(this)));
+  BarProp get scrollbars => _blink.BlinkWindow.instance.scrollbars_Getter_(this);
   
   /**
    * The current window.
@@ -39213,7 +39940,7 @@
    */
   @DomName('Window.self')
   @DocsEditable()
-  WindowBase get self => wrap_jso(_blink.BlinkWindow.instance.self_Getter_(unwrap_jso(this)));
+  WindowBase get self => _convertNativeToDart_Window(_blink.BlinkWindow.instance.self_Getter_(this));
   
   /**
    * Storage for this window that is cleared when this session ends.
@@ -39230,7 +39957,7 @@
    */
   @DomName('Window.sessionStorage')
   @DocsEditable()
-  Storage get sessionStorage => wrap_jso(_blink.BlinkWindow.instance.sessionStorage_Getter_(unwrap_jso(this)));
+  Storage get sessionStorage => _blink.BlinkWindow.instance.sessionStorage_Getter_(this);
   
   /**
    * Access to speech synthesis in the browser.
@@ -39245,17 +39972,17 @@
   @DocsEditable()
   // https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#tts-section
   @Experimental()
-  SpeechSynthesis get speechSynthesis => wrap_jso(_blink.BlinkWindow.instance.speechSynthesis_Getter_(unwrap_jso(this)));
+  SpeechSynthesis get speechSynthesis => _blink.BlinkWindow.instance.speechSynthesis_Getter_(this);
   
   /// *Deprecated*.
   @DomName('Window.status')
   @DocsEditable()
-  String get status => _blink.BlinkWindow.instance.status_Getter_(unwrap_jso(this));
+  String get status => _blink.BlinkWindow.instance.status_Getter_(this);
   
   /// *Deprecated*.
   @DomName('Window.status')
   @DocsEditable()
-  set status(String value) => _blink.BlinkWindow.instance.status_Setter_(unwrap_jso(this), value);
+  set status(String value) => _blink.BlinkWindow.instance.status_Setter_(this, value);
   
   /**
    * This window's status bar.
@@ -39268,7 +39995,7 @@
    */
   @DomName('Window.statusbar')
   @DocsEditable()
-  BarProp get statusbar => wrap_jso(_blink.BlinkWindow.instance.statusbar_Getter_(unwrap_jso(this)));
+  BarProp get statusbar => _blink.BlinkWindow.instance.statusbar_Getter_(this);
   
   /**
    * Access to CSS media queries.
@@ -39283,7 +40010,7 @@
   @DocsEditable()
   // http://developer.apple.com/library/safari/#documentation/SafariDOMAdditions/Reference/StyleMedia/StyleMedia/StyleMedia.html
   @Experimental() // nonstandard
-  StyleMedia get styleMedia => wrap_jso(_blink.BlinkWindow.instance.styleMedia_Getter_(unwrap_jso(this)));
+  StyleMedia get styleMedia => _blink.BlinkWindow.instance.styleMedia_Getter_(this);
   
   /**
    * This window's tool bar.
@@ -39296,11 +40023,11 @@
    */
   @DomName('Window.toolbar')
   @DocsEditable()
-  BarProp get toolbar => wrap_jso(_blink.BlinkWindow.instance.toolbar_Getter_(unwrap_jso(this)));
+  BarProp get toolbar => _blink.BlinkWindow.instance.toolbar_Getter_(this);
   
   @DomName('Window.top')
   @DocsEditable()
-  WindowBase get top => wrap_jso(_blink.BlinkWindow.instance.top_Getter_(unwrap_jso(this)));
+  WindowBase get top => _convertNativeToDart_Window(_blink.BlinkWindow.instance.top_Getter_(this));
   
   /**
    * The current window.
@@ -39312,40 +40039,47 @@
    */
   @DomName('Window.window')
   @DocsEditable()
-  WindowBase get window => wrap_jso(_blink.BlinkWindow.instance.window_Getter_(unwrap_jso(this)));
+  WindowBase get window => _convertNativeToDart_Window(_blink.BlinkWindow.instance.window_Getter_(this));
   
   WindowBase __getter__(index_OR_name) {
     if ((index_OR_name is int)) {
-      return wrap_jso(_blink.BlinkWindow.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name)));
+      return _blink.BlinkWindow.instance.$__getter___Callback_1_(this, index_OR_name);
     }
     if ((index_OR_name is String)) {
-      return wrap_jso(_blink.BlinkWindow.instance.$__getter___Callback_1_(unwrap_jso(this), unwrap_jso(index_OR_name)));
+      return _blink.BlinkWindow.instance.$__getter___Callback_1_(this, index_OR_name);
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   void alert([String message]) {
     if (message != null) {
-      _blink.BlinkWindow.instance.alert_Callback_1_(unwrap_jso(this), message);
+      _blink.BlinkWindow.instance.alert_Callback_1_(this, message);
       return;
     }
-    _blink.BlinkWindow.instance.alert_Callback_0_(unwrap_jso(this));
+    _blink.BlinkWindow.instance.alert_Callback_0_(this);
     return;
   }
 
   @DomName('Window.cancelAnimationFrame')
   @DocsEditable()
-  void cancelAnimationFrame(int id) => _blink.BlinkWindow.instance.cancelAnimationFrame_Callback_1_(unwrap_jso(this), id);
+  void cancelAnimationFrame(int handle) => _blink.BlinkWindow.instance.cancelAnimationFrame_Callback_1_(this, handle);
   
   @DomName('Window.close')
   @DocsEditable()
-  void close() => _blink.BlinkWindow.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkWindow.instance.close_Callback_0_(this);
   
   bool confirm([String message]) {
     if (message != null) {
-      return _blink.BlinkWindow.instance.confirm_Callback_1_(unwrap_jso(this), message);
+      return _blink.BlinkWindow.instance.confirm_Callback_1_(this, message);
     }
-    return _blink.BlinkWindow.instance.confirm_Callback_0_(unwrap_jso(this));
+    return _blink.BlinkWindow.instance.confirm_Callback_0_(this);
+  }
+
+  Future fetch(/*RequestInfo*/ input, [Map init]) {
+    if (init != null) {
+      return _blink.BlinkWindow.instance.fetch_Callback_2_(this, input, convertDartToNative_Dictionary(init));
+    }
+    return _blink.BlinkWindow.instance.fetch_Callback_1_(this, input);
   }
 
   /**
@@ -39359,11 +40093,11 @@
   @DomName('Window.find')
   @DocsEditable()
   @Experimental() // non-standard
-  bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog) => _blink.BlinkWindow.instance.find_Callback_7_(unwrap_jso(this), string, caseSensitive, backwards, wrap, wholeWord, searchInFrames, showDialog);
+  bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog) => _blink.BlinkWindow.instance.find_Callback_7_(this, string, caseSensitive, backwards, wrap, wholeWord, searchInFrames, showDialog);
   
   @DomName('Window.getComputedStyle')
   @DocsEditable()
-  CssStyleDeclaration _getComputedStyle(Element element, String pseudoElement) => wrap_jso(_blink.BlinkWindow.instance.getComputedStyle_Callback_2_(unwrap_jso(this), unwrap_jso(element), pseudoElement));
+  CssStyleDeclaration _getComputedStyle(Element elt, String pseudoElt) => _blink.BlinkWindow.instance.getComputedStyle_Callback_2_(this, elt, pseudoElt);
   
   /**
    * Returns all CSS rules that apply to the element's pseudo-element.
@@ -39371,7 +40105,7 @@
   @DomName('Window.getMatchedCSSRules')
   @DocsEditable()
   @Experimental() // non-standard
-  List<CssRule> getMatchedCssRules(Element element, String pseudoElement) => wrap_jso(_blink.BlinkWindow.instance.getMatchedCSSRules_Callback_2_(unwrap_jso(this), unwrap_jso(element), pseudoElement));
+  List<CssRule> getMatchedCssRules(Element element, String pseudoElement) => _blink.BlinkWindow.instance.getMatchedCSSRules_Callback_2_(this, element, pseudoElement);
   
   /**
    * Returns the currently selected text.
@@ -39383,7 +40117,7 @@
    */
   @DomName('Window.getSelection')
   @DocsEditable()
-  Selection getSelection() => wrap_jso(_blink.BlinkWindow.instance.getSelection_Callback_0_(unwrap_jso(this)));
+  Selection getSelection() => _blink.BlinkWindow.instance.getSelection_Callback_0_(this);
   
   /**
    * Returns a list of media queries for the given query string.
@@ -39398,7 +40132,7 @@
    */
   @DomName('Window.matchMedia')
   @DocsEditable()
-  MediaQueryList matchMedia(String query) => wrap_jso(_blink.BlinkWindow.instance.matchMedia_Callback_1_(unwrap_jso(this), query));
+  MediaQueryList matchMedia(String query) => _blink.BlinkWindow.instance.matchMedia_Callback_1_(this, query);
   
   /**
    * Moves this window.
@@ -39413,26 +40147,26 @@
    */
   @DomName('Window.moveBy')
   @DocsEditable()
-  void moveBy(num x, num y) => _blink.BlinkWindow.instance.moveBy_Callback_2_(unwrap_jso(this), x, y);
+  void moveBy(int x, int y) => _blink.BlinkWindow.instance.moveBy_Callback_2_(this, x, y);
   
   @DomName('Window.moveTo')
   @DocsEditable()
-  void _moveTo(num x, num y) => _blink.BlinkWindow.instance.moveTo_Callback_2_(unwrap_jso(this), x, y);
+  void _moveTo(int x, int y) => _blink.BlinkWindow.instance.moveTo_Callback_2_(this, x, y);
   
   @DomName('Window.open')
   @DocsEditable()
-  WindowBase open(String url, String name, [String options]) => wrap_jso(_blink.BlinkWindow.instance.open_Callback_3_(unwrap_jso(this), url, name, options));
+  WindowBase open(String url, String target, [String features]) => _convertNativeToDart_Window(_blink.BlinkWindow.instance.open_Callback_3_(this, url, target, features));
   
   SqlDatabase openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) {
     if (creationCallback != null) {
-      return wrap_jso(_blink.BlinkWindow.instance.openDatabase_Callback_5_(unwrap_jso(this), name, version, displayName, estimatedSize, unwrap_jso((database) => creationCallback(wrap_jso(database)))));
+      return _blink.BlinkWindow.instance.openDatabase_Callback_5_(this, name, version, displayName, estimatedSize, creationCallback);
     }
-    return wrap_jso(_blink.BlinkWindow.instance.openDatabase_Callback_4_(unwrap_jso(this), name, version, displayName, estimatedSize));
+    return _blink.BlinkWindow.instance.openDatabase_Callback_4_(this, name, version, displayName, estimatedSize);
   }
 
   @DomName('Window.postMessage')
   @DocsEditable()
-  void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List<MessagePort> transfer]) => _blink.BlinkWindow.instance.postMessage_Callback_3_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(message), targetOrigin, transfer);
+  void postMessage(Object message, String targetOrigin, [List<MessagePort> transfer]) => _blink.BlinkWindow.instance.postMessage_Callback_3_(this, convertDartToNative_SerializedScriptValue(message), targetOrigin, transfer);
   
   /**
    * Opens the print dialog for this window.
@@ -39444,11 +40178,11 @@
    */
   @DomName('Window.print')
   @DocsEditable()
-  void print() => _blink.BlinkWindow.instance.print_Callback_0_(unwrap_jso(this));
+  void print() => _blink.BlinkWindow.instance.print_Callback_0_(this);
   
   @DomName('Window.requestAnimationFrame')
   @DocsEditable()
-  int _requestAnimationFrame(RequestAnimationFrameCallback callback) => _blink.BlinkWindow.instance.requestAnimationFrame_Callback_1_(unwrap_jso(this), unwrap_jso((highResTime) => callback(highResTime)));
+  int _requestAnimationFrame(FrameRequestCallback callback) => _blink.BlinkWindow.instance.requestAnimationFrame_Callback_1_(this, callback);
   
   /**
    * Resizes this window by an offset.
@@ -39460,7 +40194,7 @@
    */
   @DomName('Window.resizeBy')
   @DocsEditable()
-  void resizeBy(num x, num y) => _blink.BlinkWindow.instance.resizeBy_Callback_2_(unwrap_jso(this), x, y);
+  void resizeBy(int x, int y) => _blink.BlinkWindow.instance.resizeBy_Callback_2_(this, x, y);
   
   /**
    * Resizes this window to a specific width and height.
@@ -39472,82 +40206,81 @@
    */
   @DomName('Window.resizeTo')
   @DocsEditable()
-  void resizeTo(num width, num height) => _blink.BlinkWindow.instance.resizeTo_Callback_2_(unwrap_jso(this), width, height);
+  void resizeTo(int x, int y) => _blink.BlinkWindow.instance.resizeTo_Callback_2_(this, x, y);
   
-  void scroll(x, y, [Map scrollOptions]) {
-    if ((y is num) && (x is num) && scrollOptions == null) {
-      _blink.BlinkWindow.instance.scroll_Callback_2_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y));
+  void scroll([options_OR_x, y, Map scrollOptions]) {
+    if (options_OR_x == null && y == null && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scroll_Callback_0_(this);
       return;
     }
-    if ((scrollOptions is Map) && (y is num) && (x is num)) {
-      _blink.BlinkWindow.instance.scroll_Callback_3_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y), convertDartToNative_Dictionary(scrollOptions));
+    if ((options_OR_x is Map) && y == null && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scroll_Callback_1_(this, options_OR_x);
       return;
     }
-    if ((y is int) && (x is int) && scrollOptions == null) {
-      _blink.BlinkWindow.instance.scroll_Callback_2_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y));
+    if ((y is num) && (options_OR_x is num) && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scroll_Callback_2_(this, options_OR_x, y);
       return;
     }
-    if ((scrollOptions is Map) && (y is int) && (x is int)) {
-      _blink.BlinkWindow.instance.scroll_Callback_3_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y), convertDartToNative_Dictionary(scrollOptions));
+    if ((y is int) && (options_OR_x is int) && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scroll_Callback_2_(this, options_OR_x, y);
+      return;
+    }
+    if ((scrollOptions is Map) && (y is int) && (options_OR_x is int)) {
+      _blink.BlinkWindow.instance.scroll_Callback_3_(this, options_OR_x, y, convertDartToNative_Dictionary(scrollOptions));
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  void scrollBy(x, y, [Map scrollOptions]) {
-    if ((y is num) && (x is num) && scrollOptions == null) {
-      _blink.BlinkWindow.instance.scrollBy_Callback_2_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y));
+  void scrollBy([options_OR_x, y, Map scrollOptions]) {
+    if (options_OR_x == null && y == null && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scrollBy_Callback_0_(this);
       return;
     }
-    if ((scrollOptions is Map) && (y is num) && (x is num)) {
-      _blink.BlinkWindow.instance.scrollBy_Callback_3_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y), convertDartToNative_Dictionary(scrollOptions));
+    if ((options_OR_x is Map) && y == null && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scrollBy_Callback_1_(this, options_OR_x);
       return;
     }
-    if ((y is int) && (x is int) && scrollOptions == null) {
-      _blink.BlinkWindow.instance.scrollBy_Callback_2_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y));
+    if ((y is num) && (options_OR_x is num) && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scrollBy_Callback_2_(this, options_OR_x, y);
       return;
     }
-    if ((scrollOptions is Map) && (y is int) && (x is int)) {
-      _blink.BlinkWindow.instance.scrollBy_Callback_3_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y), convertDartToNative_Dictionary(scrollOptions));
+    if ((y is int) && (options_OR_x is int) && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scrollBy_Callback_2_(this, options_OR_x, y);
+      return;
+    }
+    if ((scrollOptions is Map) && (y is int) && (options_OR_x is int)) {
+      _blink.BlinkWindow.instance.scrollBy_Callback_3_(this, options_OR_x, y, convertDartToNative_Dictionary(scrollOptions));
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  void scrollTo(x, y, [Map scrollOptions]) {
-    if ((y is num) && (x is num) && scrollOptions == null) {
-      _blink.BlinkWindow.instance.scrollTo_Callback_2_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y));
+  void scrollTo([options_OR_x, y, Map scrollOptions]) {
+    if (options_OR_x == null && y == null && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scrollTo_Callback_0_(this);
       return;
     }
-    if ((scrollOptions is Map) && (y is num) && (x is num)) {
-      _blink.BlinkWindow.instance.scrollTo_Callback_3_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y), convertDartToNative_Dictionary(scrollOptions));
+    if ((options_OR_x is Map) && y == null && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scrollTo_Callback_1_(this, options_OR_x);
       return;
     }
-    if ((y is int) && (x is int) && scrollOptions == null) {
-      _blink.BlinkWindow.instance.scrollTo_Callback_2_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y));
+    if ((y is num) && (options_OR_x is num) && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scrollTo_Callback_2_(this, options_OR_x, y);
       return;
     }
-    if ((scrollOptions is Map) && (y is int) && (x is int)) {
-      _blink.BlinkWindow.instance.scrollTo_Callback_3_(unwrap_jso(this), unwrap_jso(x), unwrap_jso(y), convertDartToNative_Dictionary(scrollOptions));
+    if ((y is int) && (options_OR_x is int) && scrollOptions == null) {
+      _blink.BlinkWindow.instance.scrollTo_Callback_2_(this, options_OR_x, y);
+      return;
+    }
+    if ((scrollOptions is Map) && (y is int) && (options_OR_x is int)) {
+      _blink.BlinkWindow.instance.scrollTo_Callback_3_(this, options_OR_x, y, convertDartToNative_Dictionary(scrollOptions));
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
   /**
-   * Opens a new page as a modal dialog.
-   *
-   * ## Other resources
-   *
-   * * [Dialogs implemented using separate
-   *   documents](http://www.w3.org/html/wg/drafts/html/master/webappapis.html#dialogs-implemented-using-separate-documents)
-   *   from W3C.
-   */
-  @DomName('Window.showModalDialog')
-  @DocsEditable()
-  Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) => wrap_jso(_blink.BlinkWindow.instance.showModalDialog_Callback_3_(unwrap_jso(this), url, dialogArgs, featureArgs));
-  
-  /**
    * Stops the window from loading.
    *
    * ## Other resources
@@ -39558,14 +40291,14 @@
    */
   @DomName('Window.stop')
   @DocsEditable()
-  void stop() => _blink.BlinkWindow.instance.stop_Callback_0_(unwrap_jso(this));
+  void stop() => _blink.BlinkWindow.instance.stop_Callback_0_(this);
   
   void __requestFileSystem(int type, int size, _FileSystemCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkWindow.instance.webkitRequestFileSystem_Callback_4_(unwrap_jso(this), type, size, unwrap_jso((fileSystem) => successCallback(wrap_jso(fileSystem))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkWindow.instance.webkitRequestFileSystem_Callback_4_(this, type, size, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkWindow.instance.webkitRequestFileSystem_Callback_3_(unwrap_jso(this), type, size, unwrap_jso((fileSystem) => successCallback(wrap_jso(fileSystem))));
+    _blink.BlinkWindow.instance.webkitRequestFileSystem_Callback_3_(this, type, size, successCallback);
     return;
   }
 
@@ -39579,10 +40312,10 @@
 
   void _resolveLocalFileSystemUrl(String url, _EntryCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkWindow.instance.webkitResolveLocalFileSystemURL_Callback_3_(unwrap_jso(this), url, unwrap_jso((entry) => successCallback(wrap_jso(entry))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkWindow.instance.webkitResolveLocalFileSystemURL_Callback_3_(this, url, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkWindow.instance.webkitResolveLocalFileSystemURL_Callback_2_(unwrap_jso(this), url, unwrap_jso((entry) => successCallback(wrap_jso(entry))));
+    _blink.BlinkWindow.instance.webkitResolveLocalFileSystemURL_Callback_2_(this, url, successCallback);
     return;
   }
 
@@ -39596,28 +40329,58 @@
 
   @DomName('Window.atob')
   @DocsEditable()
-  String atob(String string) => _blink.BlinkWindow.instance.atob_Callback_1_(unwrap_jso(this), string);
+  String atob(String atob) => _blink.BlinkWindow.instance.atob_Callback_1_(this, atob);
   
   @DomName('Window.btoa')
   @DocsEditable()
-  String btoa(String string) => _blink.BlinkWindow.instance.btoa_Callback_1_(unwrap_jso(this), string);
+  String btoa(String btoa) => _blink.BlinkWindow.instance.btoa_Callback_1_(this, btoa);
   
-  @DomName('Window.clearInterval')
-  @DocsEditable()
-  void _clearInterval(int handle) => _blink.BlinkWindow.instance.clearInterval_Callback_1_(unwrap_jso(this), handle);
-  
-  @DomName('Window.clearTimeout')
-  @DocsEditable()
-  void _clearTimeout(int handle) => _blink.BlinkWindow.instance.clearTimeout_Callback_1_(unwrap_jso(this), handle);
-  
-  @DomName('Window.setInterval')
-  @DocsEditable()
-  int _setInterval(Object handler, int timeout) => _blink.BlinkWindow.instance.setInterval_Callback_2_(unwrap_jso(this), handler, timeout);
-  
-  @DomName('Window.setTimeout')
-  @DocsEditable()
-  int _setTimeout(Object handler, int timeout) => _blink.BlinkWindow.instance.setTimeout_Callback_2_(unwrap_jso(this), handler, timeout);
-  
+  int _setInterval_String(String handler, [int timeout, Object arguments]) {
+    if (timeout != null) {
+      return _blink.BlinkWindow.instance.setInterval_Callback_3_(this, handler, timeout, arguments);
+    }
+    return _blink.BlinkWindow.instance.setInterval_Callback_1_(this, handler);
+  }
+
+  int _setTimeout_String(String handler, [int timeout, Object arguments]) {
+    if (timeout != null) {
+      return _blink.BlinkWindow.instance.setTimeout_Callback_3_(this, handler, timeout, arguments);
+    }
+    return _blink.BlinkWindow.instance.setTimeout_Callback_1_(this, handler);
+  }
+
+  void _clearInterval([int handle]) {
+    if (handle != null) {
+      _blink.BlinkWindow.instance.clearInterval_Callback_1_(this, handle);
+      return;
+    }
+    _blink.BlinkWindow.instance.clearInterval_Callback_0_(this);
+    return;
+  }
+
+  void _clearTimeout([int handle]) {
+    if (handle != null) {
+      _blink.BlinkWindow.instance.clearTimeout_Callback_1_(this, handle);
+      return;
+    }
+    _blink.BlinkWindow.instance.clearTimeout_Callback_0_(this);
+    return;
+  }
+
+  int _setInterval(Object handler, [int timeout]) {
+    if (timeout != null) {
+      return _blink.BlinkWindow.instance.setInterval_Callback_2_(this, handler, timeout);
+    }
+    return _blink.BlinkWindow.instance.setInterval_Callback_1_(this, handler);
+  }
+
+  int _setTimeout(Object handler, [int timeout]) {
+    if (timeout != null) {
+      return _blink.BlinkWindow.instance.setTimeout_Callback_2_(this, handler, timeout);
+    }
+    return _blink.BlinkWindow.instance.setTimeout_Callback_1_(this, handler);
+  }
+
   /// Stream of `contentloaded` events handled by this [Window].
   @DomName('Window.onDOMContentLoaded')
   @DocsEditable()
@@ -40025,19 +40788,19 @@
 
   @DomName('Window.pageXOffset')
   @DocsEditable()
-  int get pageXOffset => _blink.BlinkWindow.instance.pageXOffset_Getter_(unwrap_jso(this)).round();
+  int get pageXOffset => _blink.BlinkWindow.instance.pageXOffset_Getter_(this).round();
 
   @DomName('Window.pageYOffset')
   @DocsEditable()
-  int get pageYOffset => _blink.BlinkWindow.instance.pageYOffset_Getter_(unwrap_jso(this)).round();
+  int get pageYOffset => _blink.BlinkWindow.instance.pageYOffset_Getter_(this).round();
 
   @DomName('Window.scrollX')
   @DocsEditable()
-  int get scrollX => _blink.BlinkWindow.instance.scrollX_Getter_(unwrap_jso(this)).round();
+  int get scrollX => _blink.BlinkWindow.instance.scrollX_Getter_(this).round();
 
   @DomName('Window.scrollY')
   @DocsEditable()
-  int get scrollY => _blink.BlinkWindow.instance.scrollY_Getter_(unwrap_jso(this)).round();
+  int get scrollY => _blink.BlinkWindow.instance.scrollY_Getter_(this).round();
 }
 
 
@@ -40082,18 +40845,56 @@
   @DomName('WindowBase64.atob')
   @DocsEditable()
   @Experimental() // untriaged
-  String atob(String string);
+  String atob(String atob);
 
   @DomName('WindowBase64.btoa')
   @DocsEditable()
   @Experimental() // untriaged
-  String btoa(String string);
+  String btoa(String btoa);
 
 }
 // 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.
 
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('WindowClient')
+@Experimental() // untriaged
+class WindowClient extends Client {
+  // To suppress missing implicit constructor warnings.
+  factory WindowClient._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  WindowClient.internal_() : super.internal_();
+
+
+  @DomName('WindowClient.focused')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool get focused => _blink.BlinkWindowClient.instance.focused_Getter_(this);
+  
+  @DomName('WindowClient.visibilityState')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get visibilityState => _blink.BlinkWindowClient.instance.visibilityState_Getter_(this);
+  
+  @DomName('WindowClient.focus')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future focus() => convertNativePromiseToDartFuture(_blink.BlinkWindowClient.instance.focus_Callback_0_(this));
+  
+}
+// 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.
+
 
 @DocsEditable()
 @DomName('WindowEventHandlers')
@@ -40215,16 +41016,12 @@
   @DomName('Worker.Worker')
   @DocsEditable()
   factory Worker(String scriptUrl) {
-    return wrap_jso(_blink.BlinkWorker.instance.constructorCallback_1_(scriptUrl));
+    return _blink.BlinkWorker.instance.constructorCallback_1_(scriptUrl);
   }
 
 
   @Deprecated("Internal Use Only")
-  static Worker internalCreateWorker() {
-    return new Worker._internalWrap();
-  }
-
-  external factory Worker._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Worker.internal_() : super.internal_();
@@ -40233,13 +41030,18 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
-  @DomName('Worker.postMessage')
-  @DocsEditable()
-  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) => _blink.BlinkWorker.instance.postMessage_Callback_2_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(message), transfer);
-  
+  void postMessage(/*SerializedScriptValue*/ message, [List<MessagePort> transfer]) {
+    if (transfer != null) {
+      _blink.BlinkWorker.instance.postMessage_Callback_2_(this, convertDartToNative_SerializedScriptValue(message), transfer);
+      return;
+    }
+    _blink.BlinkWorker.instance.postMessage_Callback_1_(this, convertDartToNative_SerializedScriptValue(message));
+    return;
+  }
+
   @DomName('Worker.terminate')
   @DocsEditable()
-  void terminate() => _blink.BlinkWorker.instance.terminate_Callback_0_(unwrap_jso(this));
+  void terminate() => _blink.BlinkWorker.instance.terminate_Callback_0_(this);
   
   /// Stream of `error` events handled by this [Worker].
   @DomName('Worker.onerror')
@@ -40269,11 +41071,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static WorkerConsole internalCreateWorkerConsole() {
-    return new WorkerConsole._internalWrap();
-  }
-
-  external factory WorkerConsole._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   WorkerConsole.internal_() : super.internal_();
@@ -40307,11 +41105,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static WorkerGlobalScope internalCreateWorkerGlobalScope() {
-    return new WorkerGlobalScope._internalWrap();
-  }
-
-  external factory WorkerGlobalScope._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   WorkerGlobalScope.internal_() : super.internal_();
@@ -40327,61 +41121,73 @@
   @Experimental() // untriaged
   static const int TEMPORARY = 0;
 
+  @DomName('WorkerGlobalScope.caches')
+  @DocsEditable()
+  @Experimental() // untriaged
+  CacheStorage get caches => _blink.BlinkWorkerGlobalScope.instance.caches_Getter_(this);
+  
   @DomName('WorkerGlobalScope.console')
   @DocsEditable()
   @Experimental() // untriaged
-  WorkerConsole get console => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.console_Getter_(unwrap_jso(this)));
+  WorkerConsole get console => _blink.BlinkWorkerGlobalScope.instance.console_Getter_(this);
   
   @DomName('WorkerGlobalScope.crypto')
   @DocsEditable()
   @Experimental() // untriaged
-  Crypto get crypto => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.crypto_Getter_(unwrap_jso(this)));
+  Crypto get crypto => _blink.BlinkWorkerGlobalScope.instance.crypto_Getter_(this);
   
   @DomName('WorkerGlobalScope.indexedDB')
   @DocsEditable()
   @Experimental() // untriaged
-  IdbFactory get indexedDB => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.indexedDB_Getter_(unwrap_jso(this)));
+  IdbFactory get indexedDB => _blink.BlinkWorkerGlobalScope.instance.indexedDB_Getter_(this);
   
   @DomName('WorkerGlobalScope.location')
   @DocsEditable()
   @Experimental() // untriaged
-  _WorkerLocation get location => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.location_Getter_(unwrap_jso(this)));
+  _WorkerLocation get location => _blink.BlinkWorkerGlobalScope.instance.location_Getter_(this);
   
   @DomName('WorkerGlobalScope.navigator')
   @DocsEditable()
   @Experimental() // untriaged
-  _WorkerNavigator get navigator => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.navigator_Getter_(unwrap_jso(this)));
+  _WorkerNavigator get navigator => _blink.BlinkWorkerGlobalScope.instance.navigator_Getter_(this);
   
   @DomName('WorkerGlobalScope.performance')
   @DocsEditable()
   @Experimental() // untriaged
-  WorkerPerformance get performance => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.performance_Getter_(unwrap_jso(this)));
+  WorkerPerformance get performance => _blink.BlinkWorkerGlobalScope.instance.performance_Getter_(this);
   
   @DomName('WorkerGlobalScope.self')
   @DocsEditable()
   @Experimental() // untriaged
-  WorkerGlobalScope get self => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.self_Getter_(unwrap_jso(this)));
+  WorkerGlobalScope get self => _blink.BlinkWorkerGlobalScope.instance.self_Getter_(this);
   
   @DomName('WorkerGlobalScope.close')
   @DocsEditable()
   @Experimental() // untriaged
-  void close() => _blink.BlinkWorkerGlobalScope.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkWorkerGlobalScope.instance.close_Callback_0_(this);
   
+  Future fetch(/*RequestInfo*/ input, [Map init]) {
+    if (init != null) {
+      return _blink.BlinkWorkerGlobalScope.instance.fetch_Callback_2_(this, input, convertDartToNative_Dictionary(init));
+    }
+    return _blink.BlinkWorkerGlobalScope.instance.fetch_Callback_1_(this, input);
+  }
+
   @DomName('WorkerGlobalScope.importScripts')
   @DocsEditable()
   @Experimental() // untriaged
-  void importScripts(String urls) => _blink.BlinkWorkerGlobalScope.instance.importScripts_Callback_1_(unwrap_jso(this), urls);
+  void importScripts(String urls) => _blink.BlinkWorkerGlobalScope.instance.importScripts_Callback_1_(this, urls);
   
   void _webkitRequestFileSystem(int type, int size, [_FileSystemCallback successCallback, _ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkWorkerGlobalScope.instance.webkitRequestFileSystem_Callback_4_(unwrap_jso(this), type, size, unwrap_jso((fileSystem) => successCallback(wrap_jso(fileSystem))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkWorkerGlobalScope.instance.webkitRequestFileSystem_Callback_4_(this, type, size, successCallback, errorCallback);
       return;
     }
     if (successCallback != null) {
-      _blink.BlinkWorkerGlobalScope.instance.webkitRequestFileSystem_Callback_3_(unwrap_jso(this), type, size, unwrap_jso((fileSystem) => successCallback(wrap_jso(fileSystem))));
+      _blink.BlinkWorkerGlobalScope.instance.webkitRequestFileSystem_Callback_3_(this, type, size, successCallback);
       return;
     }
-    _blink.BlinkWorkerGlobalScope.instance.webkitRequestFileSystem_Callback_2_(unwrap_jso(this), type, size);
+    _blink.BlinkWorkerGlobalScope.instance.webkitRequestFileSystem_Callback_2_(this, type, size);
     return;
   }
 
@@ -40399,7 +41205,7 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   @Experimental() // untriaged
-  _DOMFileSystemSync requestFileSystemSync(int type, int size) => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.webkitRequestFileSystemSync_Callback_2_(unwrap_jso(this), type, size));
+  _DOMFileSystemSync requestFileSystemSync(int type, int size) => _blink.BlinkWorkerGlobalScope.instance.webkitRequestFileSystemSync_Callback_2_(this, type, size);
   
   @DomName('WorkerGlobalScope.webkitResolveLocalFileSystemSyncURL')
   @DocsEditable()
@@ -40407,14 +41213,14 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
   @Experimental() // untriaged
-  _EntrySync resolveLocalFileSystemSyncUrl(String url) => wrap_jso(_blink.BlinkWorkerGlobalScope.instance.webkitResolveLocalFileSystemSyncURL_Callback_1_(unwrap_jso(this), url));
+  _EntrySync resolveLocalFileSystemSyncUrl(String url) => _blink.BlinkWorkerGlobalScope.instance.webkitResolveLocalFileSystemSyncURL_Callback_1_(this, url);
   
   void _webkitResolveLocalFileSystemUrl(String url, _EntryCallback successCallback, [_ErrorCallback errorCallback]) {
     if (errorCallback != null) {
-      _blink.BlinkWorkerGlobalScope.instance.webkitResolveLocalFileSystemURL_Callback_3_(unwrap_jso(this), url, unwrap_jso((entry) => successCallback(wrap_jso(entry))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkWorkerGlobalScope.instance.webkitResolveLocalFileSystemURL_Callback_3_(this, url, successCallback, errorCallback);
       return;
     }
-    _blink.BlinkWorkerGlobalScope.instance.webkitResolveLocalFileSystemURL_Callback_2_(unwrap_jso(this), url, unwrap_jso((entry) => successCallback(wrap_jso(entry))));
+    _blink.BlinkWorkerGlobalScope.instance.webkitResolveLocalFileSystemURL_Callback_2_(this, url, successCallback);
     return;
   }
 
@@ -40429,33 +41235,59 @@
   @DomName('WorkerGlobalScope.atob')
   @DocsEditable()
   @Experimental() // untriaged
-  String atob(String string) => _blink.BlinkWorkerGlobalScope.instance.atob_Callback_1_(unwrap_jso(this), string);
+  String atob(String atob) => _blink.BlinkWorkerGlobalScope.instance.atob_Callback_1_(this, atob);
   
   @DomName('WorkerGlobalScope.btoa')
   @DocsEditable()
   @Experimental() // untriaged
-  String btoa(String string) => _blink.BlinkWorkerGlobalScope.instance.btoa_Callback_1_(unwrap_jso(this), string);
+  String btoa(String btoa) => _blink.BlinkWorkerGlobalScope.instance.btoa_Callback_1_(this, btoa);
   
-  @DomName('WorkerGlobalScope.clearInterval')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void _clearInterval(int handle) => _blink.BlinkWorkerGlobalScope.instance.clearInterval_Callback_1_(unwrap_jso(this), handle);
-  
-  @DomName('WorkerGlobalScope.clearTimeout')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void _clearTimeout(int handle) => _blink.BlinkWorkerGlobalScope.instance.clearTimeout_Callback_1_(unwrap_jso(this), handle);
-  
-  @DomName('WorkerGlobalScope.setInterval')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int _setInterval(Object handler, int timeout) => _blink.BlinkWorkerGlobalScope.instance.setInterval_Callback_2_(unwrap_jso(this), handler, timeout);
-  
-  @DomName('WorkerGlobalScope.setTimeout')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int _setTimeout(Object handler, int timeout) => _blink.BlinkWorkerGlobalScope.instance.setTimeout_Callback_2_(unwrap_jso(this), handler, timeout);
-  
+  int _setInterval_String(String handler, [int timeout, Object arguments]) {
+    if (timeout != null) {
+      return _blink.BlinkWorkerGlobalScope.instance.setInterval_Callback_3_(this, handler, timeout, arguments);
+    }
+    return _blink.BlinkWorkerGlobalScope.instance.setInterval_Callback_1_(this, handler);
+  }
+
+  int _setTimeout_String(String handler, [int timeout, Object arguments]) {
+    if (timeout != null) {
+      return _blink.BlinkWorkerGlobalScope.instance.setTimeout_Callback_3_(this, handler, timeout, arguments);
+    }
+    return _blink.BlinkWorkerGlobalScope.instance.setTimeout_Callback_1_(this, handler);
+  }
+
+  void _clearInterval([int handle]) {
+    if (handle != null) {
+      _blink.BlinkWorkerGlobalScope.instance.clearInterval_Callback_1_(this, handle);
+      return;
+    }
+    _blink.BlinkWorkerGlobalScope.instance.clearInterval_Callback_0_(this);
+    return;
+  }
+
+  void _clearTimeout([int handle]) {
+    if (handle != null) {
+      _blink.BlinkWorkerGlobalScope.instance.clearTimeout_Callback_1_(this, handle);
+      return;
+    }
+    _blink.BlinkWorkerGlobalScope.instance.clearTimeout_Callback_0_(this);
+    return;
+  }
+
+  int _setInterval(Object handler, [int timeout]) {
+    if (timeout != null) {
+      return _blink.BlinkWorkerGlobalScope.instance.setInterval_Callback_2_(this, handler, timeout);
+    }
+    return _blink.BlinkWorkerGlobalScope.instance.setInterval_Callback_1_(this, handler);
+  }
+
+  int _setTimeout(Object handler, [int timeout]) {
+    if (timeout != null) {
+      return _blink.BlinkWorkerGlobalScope.instance.setTimeout_Callback_2_(this, handler, timeout);
+    }
+    return _blink.BlinkWorkerGlobalScope.instance.setTimeout_Callback_1_(this, handler);
+  }
+
   /// Stream of `error` events handled by this [WorkerGlobalScope].
   @DomName('WorkerGlobalScope.onerror')
   @DocsEditable()
@@ -40473,34 +41305,78 @@
 @DocsEditable()
 @DomName('WorkerPerformance')
 @Experimental() // untriaged
-class WorkerPerformance extends DartHtmlDomObject {
+class WorkerPerformance extends EventTarget {
   // To suppress missing implicit constructor warnings.
   factory WorkerPerformance._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static WorkerPerformance internalCreateWorkerPerformance() {
-    return new WorkerPerformance._internalWrap();
-  }
-
-  factory WorkerPerformance._internalWrap() {
-    return new WorkerPerformance.internal_();
-  }
 
   @Deprecated("Internal Use Only")
-  WorkerPerformance.internal_() { }
+  external static Type get instanceRuntimeType;
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+  @Deprecated("Internal Use Only")
+  WorkerPerformance.internal_() : super.internal_();
+
 
   @DomName('WorkerPerformance.memory')
   @DocsEditable()
   @Experimental() // untriaged
-  MemoryInfo get memory => wrap_jso(_blink.BlinkWorkerPerformance.instance.memory_Getter_(unwrap_jso(this)));
+  MemoryInfo get memory => _blink.BlinkWorkerPerformance.instance.memory_Getter_(this);
+  
+  @DomName('WorkerPerformance.clearMarks')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearMarks(String markName) => _blink.BlinkWorkerPerformance.instance.clearMarks_Callback_1_(this, markName);
+  
+  @DomName('WorkerPerformance.clearMeasures')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearMeasures(String measureName) => _blink.BlinkWorkerPerformance.instance.clearMeasures_Callback_1_(this, measureName);
+  
+  @DomName('WorkerPerformance.getEntries')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<PerformanceEntry> getEntries() => (_blink.BlinkWorkerPerformance.instance.getEntries_Callback_0_(this));
+  
+  @DomName('WorkerPerformance.getEntriesByName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<PerformanceEntry> getEntriesByName(String name, String entryType) => (_blink.BlinkWorkerPerformance.instance.getEntriesByName_Callback_2_(this, name, entryType));
+  
+  @DomName('WorkerPerformance.getEntriesByType')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<PerformanceEntry> getEntriesByType(String entryType) => (_blink.BlinkWorkerPerformance.instance.getEntriesByType_Callback_1_(this, entryType));
+  
+  @DomName('WorkerPerformance.mark')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void mark(String markName) => _blink.BlinkWorkerPerformance.instance.mark_Callback_1_(this, markName);
+  
+  @DomName('WorkerPerformance.measure')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void measure(String measureName, String startMark, String endMark) => _blink.BlinkWorkerPerformance.instance.measure_Callback_3_(this, measureName, startMark, endMark);
   
   @DomName('WorkerPerformance.now')
   @DocsEditable()
   @Experimental() // untriaged
-  num now() => _blink.BlinkWorkerPerformance.instance.now_Callback_0_(unwrap_jso(this));
+  num now() => _blink.BlinkWorkerPerformance.instance.now_Callback_0_(this);
+  
+  @DomName('WorkerPerformance.webkitClearResourceTimings')
+  @DocsEditable()
+  @SupportedBrowser(SupportedBrowser.CHROME)
+  @SupportedBrowser(SupportedBrowser.SAFARI)
+  @Experimental()
+  @Experimental() // untriaged
+  void clearResourceTimings() => _blink.BlinkWorkerPerformance.instance.webkitClearResourceTimings_Callback_0_(this);
+  
+  @DomName('WorkerPerformance.webkitSetResourceTimingBufferSize')
+  @DocsEditable()
+  @SupportedBrowser(SupportedBrowser.CHROME)
+  @SupportedBrowser(SupportedBrowser.SAFARI)
+  @Experimental()
+  @Experimental() // untriaged
+  void setResourceTimingBufferSize(int maxSize) => _blink.BlinkWorkerPerformance.instance.webkitSetResourceTimingBufferSize_Callback_1_(this, maxSize);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -40521,36 +41397,31 @@
   @DomName('XPathEvaluator.XPathEvaluator')
   @DocsEditable()
   factory XPathEvaluator() {
-    return wrap_jso(_blink.BlinkXPathEvaluator.instance.constructorCallback_0_());
+    return _blink.BlinkXPathEvaluator.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static XPathEvaluator internalCreateXPathEvaluator() {
-    return new XPathEvaluator._internalWrap();
-  }
-
-  factory XPathEvaluator._internalWrap() {
-    return new XPathEvaluator.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   XPathEvaluator.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('XPathEvaluator.createExpression')
   @DocsEditable()
-  XPathExpression createExpression(String expression, XPathNSResolver resolver) => wrap_jso(_blink.BlinkXPathEvaluator.instance.createExpression_Callback_2_(unwrap_jso(this), expression, unwrap_jso(resolver)));
+  XPathExpression createExpression(String expression, XPathNSResolver resolver) => _blink.BlinkXPathEvaluator.instance.createExpression_Callback_2_(this, expression, resolver);
   
   @DomName('XPathEvaluator.createNSResolver')
   @DocsEditable()
-  XPathNSResolver createNSResolver(Node nodeResolver) => wrap_jso(_blink.BlinkXPathEvaluator.instance.createNSResolver_Callback_1_(unwrap_jso(this), unwrap_jso(nodeResolver)));
+  XPathNSResolver createNSResolver(Node nodeResolver) => _blink.BlinkXPathEvaluator.instance.createNSResolver_Callback_1_(this, nodeResolver);
   
-  @DomName('XPathEvaluator.evaluate')
-  @DocsEditable()
-  XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult) => wrap_jso(_blink.BlinkXPathEvaluator.instance.evaluate_Callback_5_(unwrap_jso(this), expression, unwrap_jso(contextNode), unwrap_jso(resolver), type, unwrap_jso(inResult)));
-  
+  XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, [int type, Object inResult]) {
+    if (type != null) {
+      return _blink.BlinkXPathEvaluator.instance.evaluate_Callback_5_(this, expression, contextNode, resolver, type, inResult);
+    }
+    return _blink.BlinkXPathEvaluator.instance.evaluate_Callback_3_(this, expression, contextNode, resolver);
+  }
+
 }
 // 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
@@ -40567,25 +41438,20 @@
   // To suppress missing implicit constructor warnings.
   factory XPathExpression._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static XPathExpression internalCreateXPathExpression() {
-    return new XPathExpression._internalWrap();
-  }
 
-  factory XPathExpression._internalWrap() {
-    return new XPathExpression.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   XPathExpression.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+  XPathResult evaluate(Node contextNode, [int type, Object inResult]) {
+    if (type != null) {
+      return _blink.BlinkXPathExpression.instance.evaluate_Callback_3_(this, contextNode, type, inResult);
+    }
+    return _blink.BlinkXPathExpression.instance.evaluate_Callback_1_(this, contextNode);
+  }
 
-  @DomName('XPathExpression.evaluate')
-  @DocsEditable()
-  XPathResult evaluate(Node contextNode, int type, XPathResult inResult) => wrap_jso(_blink.BlinkXPathExpression.instance.evaluate_Callback_3_(unwrap_jso(this), unwrap_jso(contextNode), type, unwrap_jso(inResult)));
-  
 }
 // 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
@@ -40602,24 +41468,16 @@
   // To suppress missing implicit constructor warnings.
   factory XPathNSResolver._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static XPathNSResolver internalCreateXPathNSResolver() {
-    return new XPathNSResolver._internalWrap();
-  }
 
-  factory XPathNSResolver._internalWrap() {
-    return new XPathNSResolver.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   XPathNSResolver.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('XPathNSResolver.lookupNamespaceURI')
   @DocsEditable()
-  String lookupNamespaceUri(String prefix) => _blink.BlinkXPathNSResolver.instance.lookupNamespaceURI_Callback_1_(unwrap_jso(this), prefix);
+  String lookupNamespaceUri(String prefix) => _blink.BlinkXPathNSResolver.instance.lookupNamespaceURI_Callback_1_(this, prefix);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -40637,21 +41495,13 @@
   // To suppress missing implicit constructor warnings.
   factory XPathResult._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static XPathResult internalCreateXPathResult() {
-    return new XPathResult._internalWrap();
-  }
 
-  factory XPathResult._internalWrap() {
-    return new XPathResult.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   XPathResult.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('XPathResult.ANY_TYPE')
   @DocsEditable()
   static const int ANY_TYPE = 0;
@@ -40694,39 +41544,39 @@
 
   @DomName('XPathResult.booleanValue')
   @DocsEditable()
-  bool get booleanValue => _blink.BlinkXPathResult.instance.booleanValue_Getter_(unwrap_jso(this));
+  bool get booleanValue => _blink.BlinkXPathResult.instance.booleanValue_Getter_(this);
   
   @DomName('XPathResult.invalidIteratorState')
   @DocsEditable()
-  bool get invalidIteratorState => _blink.BlinkXPathResult.instance.invalidIteratorState_Getter_(unwrap_jso(this));
+  bool get invalidIteratorState => _blink.BlinkXPathResult.instance.invalidIteratorState_Getter_(this);
   
   @DomName('XPathResult.numberValue')
   @DocsEditable()
-  num get numberValue => _blink.BlinkXPathResult.instance.numberValue_Getter_(unwrap_jso(this));
+  num get numberValue => _blink.BlinkXPathResult.instance.numberValue_Getter_(this);
   
   @DomName('XPathResult.resultType')
   @DocsEditable()
-  int get resultType => _blink.BlinkXPathResult.instance.resultType_Getter_(unwrap_jso(this));
+  int get resultType => _blink.BlinkXPathResult.instance.resultType_Getter_(this);
   
   @DomName('XPathResult.singleNodeValue')
   @DocsEditable()
-  Node get singleNodeValue => wrap_jso(_blink.BlinkXPathResult.instance.singleNodeValue_Getter_(unwrap_jso(this)));
+  Node get singleNodeValue => _blink.BlinkXPathResult.instance.singleNodeValue_Getter_(this);
   
   @DomName('XPathResult.snapshotLength')
   @DocsEditable()
-  int get snapshotLength => _blink.BlinkXPathResult.instance.snapshotLength_Getter_(unwrap_jso(this));
+  int get snapshotLength => _blink.BlinkXPathResult.instance.snapshotLength_Getter_(this);
   
   @DomName('XPathResult.stringValue')
   @DocsEditable()
-  String get stringValue => _blink.BlinkXPathResult.instance.stringValue_Getter_(unwrap_jso(this));
+  String get stringValue => _blink.BlinkXPathResult.instance.stringValue_Getter_(this);
   
   @DomName('XPathResult.iterateNext')
   @DocsEditable()
-  Node iterateNext() => wrap_jso(_blink.BlinkXPathResult.instance.iterateNext_Callback_0_(unwrap_jso(this)));
+  Node iterateNext() => _blink.BlinkXPathResult.instance.iterateNext_Callback_0_(this);
   
   @DomName('XPathResult.snapshotItem')
   @DocsEditable()
-  Node snapshotItem(int index) => wrap_jso(_blink.BlinkXPathResult.instance.snapshotItem_Callback_1_(unwrap_jso(this), index));
+  Node snapshotItem(int index) => _blink.BlinkXPathResult.instance.snapshotItem_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -40745,11 +41595,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static XmlDocument internalCreateXmlDocument() {
-    return new XmlDocument._internalWrap();
-  }
-
-  external factory XmlDocument._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   XmlDocument.internal_() : super.internal_();
@@ -40774,27 +41620,19 @@
   @DomName('XMLSerializer.XMLSerializer')
   @DocsEditable()
   factory XmlSerializer() {
-    return wrap_jso(_blink.BlinkXMLSerializer.instance.constructorCallback_0_());
+    return _blink.BlinkXMLSerializer.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static XmlSerializer internalCreateXmlSerializer() {
-    return new XmlSerializer._internalWrap();
-  }
-
-  factory XmlSerializer._internalWrap() {
-    return new XmlSerializer.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   XmlSerializer.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('XMLSerializer.serializeToString')
   @DocsEditable()
-  String serializeToString(Node node) => _blink.BlinkXMLSerializer.instance.serializeToString_Callback_1_(unwrap_jso(this), unwrap_jso(node));
+  String serializeToString(Node root) => _blink.BlinkXMLSerializer.instance.serializeToString_Callback_1_(this, root);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -40817,58 +41655,50 @@
   @DomName('XSLTProcessor.XSLTProcessor')
   @DocsEditable()
   factory XsltProcessor() {
-    return wrap_jso(_blink.BlinkXSLTProcessor.instance.constructorCallback_0_());
+    return _blink.BlinkXSLTProcessor.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static XsltProcessor internalCreateXsltProcessor() {
-    return new XsltProcessor._internalWrap();
-  }
-
-  factory XsltProcessor._internalWrap() {
-    return new XsltProcessor.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   XsltProcessor.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
   @DomName('XSLTProcessor.clearParameters')
   @DocsEditable()
-  void clearParameters() => _blink.BlinkXSLTProcessor.instance.clearParameters_Callback_0_(unwrap_jso(this));
+  void clearParameters() => _blink.BlinkXSLTProcessor.instance.clearParameters_Callback_0_(this);
   
   @DomName('XSLTProcessor.getParameter')
   @DocsEditable()
-  String getParameter(String namespaceURI, String localName) => _blink.BlinkXSLTProcessor.instance.getParameter_Callback_2_(unwrap_jso(this), namespaceURI, localName);
+  String getParameter(String namespaceURI, String localName) => _blink.BlinkXSLTProcessor.instance.getParameter_Callback_2_(this, namespaceURI, localName);
   
   @DomName('XSLTProcessor.importStylesheet')
   @DocsEditable()
-  void importStylesheet(Node stylesheet) => _blink.BlinkXSLTProcessor.instance.importStylesheet_Callback_1_(unwrap_jso(this), unwrap_jso(stylesheet));
+  void importStylesheet(Node style) => _blink.BlinkXSLTProcessor.instance.importStylesheet_Callback_1_(this, style);
   
   @DomName('XSLTProcessor.removeParameter')
   @DocsEditable()
-  void removeParameter(String namespaceURI, String localName) => _blink.BlinkXSLTProcessor.instance.removeParameter_Callback_2_(unwrap_jso(this), namespaceURI, localName);
+  void removeParameter(String namespaceURI, String localName) => _blink.BlinkXSLTProcessor.instance.removeParameter_Callback_2_(this, namespaceURI, localName);
   
   @DomName('XSLTProcessor.reset')
   @DocsEditable()
-  void reset() => _blink.BlinkXSLTProcessor.instance.reset_Callback_0_(unwrap_jso(this));
+  void reset() => _blink.BlinkXSLTProcessor.instance.reset_Callback_0_(this);
   
   @DomName('XSLTProcessor.setParameter')
   @DocsEditable()
-  void setParameter(String namespaceURI, String localName, String value) => _blink.BlinkXSLTProcessor.instance.setParameter_Callback_3_(unwrap_jso(this), namespaceURI, localName, value);
+  void setParameter(String namespaceURI, String localName, String value) => _blink.BlinkXSLTProcessor.instance.setParameter_Callback_3_(this, namespaceURI, localName, value);
   
   @DomName('XSLTProcessor.transformToDocument')
   @DocsEditable()
-  Document transformToDocument(Node source) => wrap_jso(_blink.BlinkXSLTProcessor.instance.transformToDocument_Callback_1_(unwrap_jso(this), unwrap_jso(source)));
+  Document transformToDocument(Node source) => _blink.BlinkXSLTProcessor.instance.transformToDocument_Callback_1_(this, source);
   
   @DomName('XSLTProcessor.transformToFragment')
   @DocsEditable()
-  DocumentFragment transformToFragment(Node source, Document docVal) => wrap_jso(_blink.BlinkXSLTProcessor.instance.transformToFragment_Callback_2_(unwrap_jso(this), unwrap_jso(source), unwrap_jso(docVal)));
+  DocumentFragment transformToFragment(Node source, Document output) => _blink.BlinkXSLTProcessor.instance.transformToFragment_Callback_2_(this, source, output);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -40886,11 +41716,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _Attr internalCreate_Attr() {
-    return new _Attr._internalWrap();
-  }
-
-  external factory _Attr._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _Attr.internal_() : super.internal_();
@@ -40899,39 +41725,39 @@
   @DomName('Attr.localName')
   @DocsEditable()
   @Experimental() // untriaged
-  String get _localName => _blink.BlinkAttr.instance.localName_Getter_(unwrap_jso(this));
+  String get _localName => _blink.BlinkAttr.instance.localName_Getter_(this);
   
   @DomName('Attr.name')
   @DocsEditable()
-  String get name => _blink.BlinkAttr.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkAttr.instance.name_Getter_(this);
   
   @DomName('Attr.namespaceURI')
   @DocsEditable()
   @Experimental() // untriaged
-  String get _namespaceUri => _blink.BlinkAttr.instance.namespaceURI_Getter_(unwrap_jso(this));
+  String get _namespaceUri => _blink.BlinkAttr.instance.namespaceURI_Getter_(this);
   
   @DomName('Attr.nodeValue')
   @DocsEditable()
   @Experimental() // untriaged
-  String get nodeValue => _blink.BlinkAttr.instance.nodeValue_Getter_(unwrap_jso(this));
+  String get nodeValue => _blink.BlinkAttr.instance.nodeValue_Getter_(this);
   
   @DomName('Attr.textContent')
   @DocsEditable()
   @Experimental() // untriaged
-  String get text => _blink.BlinkAttr.instance.textContent_Getter_(unwrap_jso(this));
+  String get text => _blink.BlinkAttr.instance.textContent_Getter_(this);
   
   @DomName('Attr.textContent')
   @DocsEditable()
   @Experimental() // untriaged
-  set text(String value) => _blink.BlinkAttr.instance.textContent_Setter_(unwrap_jso(this), value);
+  set text(String value) => _blink.BlinkAttr.instance.textContent_Setter_(this, value);
   
   @DomName('Attr.value')
   @DocsEditable()
-  String get value => _blink.BlinkAttr.instance.value_Getter_(unwrap_jso(this));
+  String get value => _blink.BlinkAttr.instance.value_Getter_(this);
   
   @DomName('Attr.value')
   @DocsEditable()
-  set value(String value) => _blink.BlinkAttr.instance.value_Setter_(unwrap_jso(this), value);
+  set value(String value) => _blink.BlinkAttr.instance.value_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -40942,114 +41768,19 @@
 
 
 @DocsEditable()
-@DomName('CSSPrimitiveValue')
-// http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
-@deprecated // deprecated
-class _CSSPrimitiveValue extends _CSSValue {
-  // To suppress missing implicit constructor warnings.
-  factory _CSSPrimitiveValue._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _CSSPrimitiveValue internalCreate_CSSPrimitiveValue() {
-    return new _CSSPrimitiveValue._internalWrap();
-  }
-
-  external factory _CSSPrimitiveValue._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _CSSPrimitiveValue.internal_() : super.internal_();
-
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('CSSUnknownRule')
-// http://dev.w3.org/csswg/cssom/#the-cssstylesheet-interface
-@deprecated // deprecated
-class _CSSUnknownRule extends CssRule {
-  // To suppress missing implicit constructor warnings.
-  factory _CSSUnknownRule._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _CSSUnknownRule internalCreate_CSSUnknownRule() {
-    return new _CSSUnknownRule._internalWrap();
-  }
-
-  external factory _CSSUnknownRule._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _CSSUnknownRule.internal_() : super.internal_();
-
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('CSSValue')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-class _CSSValue extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory _CSSValue._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static _CSSValue internalCreate_CSSValue() {
-    return new _CSSValue._internalWrap();
-  }
-
-  factory _CSSValue._internalWrap() {
-    return new _CSSValue.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  _CSSValue.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
 @DomName('Cache')
 @Experimental() // untriaged
 class _Cache extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _Cache._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _Cache internalCreate_Cache() {
-    return new _Cache._internalWrap();
-  }
 
-  factory _Cache._internalWrap() {
-    return new _Cache.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _Cache.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -41167,42 +41898,36 @@
     // To suppress missing implicit constructor warnings.
   factory _ClientRect._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _ClientRect internalCreate_ClientRect() {
-    return new _ClientRect._internalWrap();
-  }
 
-  factory _ClientRect._internalWrap() {
-    return new _ClientRect.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _ClientRect.internal_() { }
 
-
   @DomName('ClientRect.bottom')
   @DocsEditable()
-  num get bottom => _blink.BlinkClientRect.instance.bottom_Getter_(unwrap_jso(this));
+  num get bottom => _blink.BlinkClientRect.instance.bottom_Getter_(this);
   
   @DomName('ClientRect.height')
   @DocsEditable()
-  num get height => _blink.BlinkClientRect.instance.height_Getter_(unwrap_jso(this));
+  num get height => _blink.BlinkClientRect.instance.height_Getter_(this);
   
   @DomName('ClientRect.left')
   @DocsEditable()
-  num get left => _blink.BlinkClientRect.instance.left_Getter_(unwrap_jso(this));
+  num get left => _blink.BlinkClientRect.instance.left_Getter_(this);
   
   @DomName('ClientRect.right')
   @DocsEditable()
-  num get right => _blink.BlinkClientRect.instance.right_Getter_(unwrap_jso(this));
+  num get right => _blink.BlinkClientRect.instance.right_Getter_(this);
   
   @DomName('ClientRect.top')
   @DocsEditable()
-  num get top => _blink.BlinkClientRect.instance.top_Getter_(unwrap_jso(this));
+  num get top => _blink.BlinkClientRect.instance.top_Getter_(this);
   
   @DomName('ClientRect.width')
   @DocsEditable()
-  num get width => _blink.BlinkClientRect.instance.width_Getter_(unwrap_jso(this));
+  num get width => _blink.BlinkClientRect.instance.width_Getter_(this);
   }
 
 /**
@@ -41254,32 +41979,24 @@
   // To suppress missing implicit constructor warnings.
   factory _ClientRectList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _ClientRectList internalCreate_ClientRectList() {
-    return new _ClientRectList._internalWrap();
-  }
 
-  factory _ClientRectList._internalWrap() {
-    return new _ClientRectList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _ClientRectList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('ClientRectList.length')
   @DocsEditable()
-  int get length => _blink.BlinkClientRectList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkClientRectList.instance.length_Getter_(this);
   
   Rectangle operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkClientRectList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  Rectangle _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkClientRectList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Rectangle _nativeIndexedGetter(int index) => (_blink.BlinkClientRectList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, Rectangle value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -41319,9 +42036,14 @@
   Rectangle elementAt(int index) => this[index];
   // -- end List<Rectangle> mixins.
 
+  @DomName('ClientRectList.__getter__')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Rectangle __getter__(int index) => make_dart_rectangle(_blink.BlinkClientRectList.instance.$__getter___Callback_1_(this, index));
+  
   @DomName('ClientRectList.item')
   @DocsEditable()
-  Rectangle item(int index) => make_dart_rectangle(_blink.BlinkClientRectList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Rectangle item(int index) => make_dart_rectangle(_blink.BlinkClientRectList.instance.item_Callback_1_(this, index));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -41332,68 +42054,29 @@
 
 
 @DocsEditable()
-@DomName('Counter')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-class _Counter extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory _Counter._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static _Counter internalCreate_Counter() {
-    return new _Counter._internalWrap();
-  }
-
-  factory _Counter._internalWrap() {
-    return new _Counter.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  _Counter.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
 @DomName('CSSRuleList')
 class _CssRuleList extends DartHtmlDomObject with ListMixin<CssRule>, ImmutableListMixin<CssRule> implements List<CssRule> {
   // To suppress missing implicit constructor warnings.
   factory _CssRuleList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _CssRuleList internalCreate_CssRuleList() {
-    return new _CssRuleList._internalWrap();
-  }
 
-  factory _CssRuleList._internalWrap() {
-    return new _CssRuleList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _CssRuleList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('CSSRuleList.length')
   @DocsEditable()
-  int get length => _blink.BlinkCSSRuleList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkCSSRuleList.instance.length_Getter_(this);
   
   CssRule operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkCSSRuleList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  CssRule _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkCSSRuleList.instance.item_Callback_1_(unwrap_jso(this), index));
+  CssRule _nativeIndexedGetter(int index) => (_blink.BlinkCSSRuleList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, CssRule value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -41435,89 +42118,7 @@
 
   @DomName('CSSRuleList.item')
   @DocsEditable()
-  CssRule item(int index) => wrap_jso(_blink.BlinkCSSRuleList.instance.item_Callback_1_(unwrap_jso(this), index));
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('CSSValueList')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-class _CssValueList extends _CSSValue with ListMixin<_CSSValue>, ImmutableListMixin<_CSSValue> implements List<_CSSValue> {
-  // To suppress missing implicit constructor warnings.
-  factory _CssValueList._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _CssValueList internalCreate_CssValueList() {
-    return new _CssValueList._internalWrap();
-  }
-
-  external factory _CssValueList._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _CssValueList.internal_() : super.internal_();
-
-
-  @DomName('CSSValueList.length')
-  @DocsEditable()
-  int get length => _blink.BlinkCSSValueList.instance.length_Getter_(unwrap_jso(this));
-  
-  _CSSValue operator[](int index) {
-    if (index < 0 || index >= length)
-      throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkCSSValueList.instance.item_Callback_1_(unwrap_jso(this), index));
-  }
-
-  _CSSValue _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkCSSValueList.instance.item_Callback_1_(unwrap_jso(this), index));
-
-  void operator[]=(int index, _CSSValue value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<_CSSValue> mixins.
-  // _CSSValue is the element type.
-
-
-  set length(int value) {
-    throw new UnsupportedError("Cannot resize immutable List.");
-  }
-
-  _CSSValue get first {
-    if (this.length > 0) {
-      return _nativeIndexedGetter(0);
-    }
-    throw new StateError("No elements");
-  }
-
-  _CSSValue get last {
-    int len = this.length;
-    if (len > 0) {
-      return _nativeIndexedGetter(len - 1);
-    }
-    throw new StateError("No elements");
-  }
-
-  _CSSValue get single {
-    int len = this.length;
-    if (len == 1) {
-      return _nativeIndexedGetter(0);
-    }
-    if (len == 0) throw new StateError("No elements");
-    throw new StateError("More than one element");
-  }
-
-  _CSSValue elementAt(int index) => this[index];
-  // -- end List<_CSSValue> mixins.
-
-  @DomName('CSSValueList.item')
-  @DocsEditable()
-  _CSSValue item(int index) => wrap_jso(_blink.BlinkCSSValueList.instance.item_Callback_1_(unwrap_jso(this), index));
+  CssRule item(int index) => _blink.BlinkCSSRuleList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -41536,21 +42137,13 @@
   // To suppress missing implicit constructor warnings.
   factory _DOMFileSystemSync._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _DOMFileSystemSync internalCreate_DOMFileSystemSync() {
-    return new _DOMFileSystemSync._internalWrap();
-  }
 
-  factory _DOMFileSystemSync._internalWrap() {
-    return new _DOMFileSystemSync.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _DOMFileSystemSync.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -41569,11 +42162,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _DirectoryEntrySync internalCreate_DirectoryEntrySync() {
-    return new _DirectoryEntrySync._internalWrap();
-  }
-
-  external factory _DirectoryEntrySync._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _DirectoryEntrySync.internal_() : super.internal_();
@@ -41595,21 +42184,13 @@
   // To suppress missing implicit constructor warnings.
   factory _DirectoryReaderSync._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _DirectoryReaderSync internalCreate_DirectoryReaderSync() {
-    return new _DirectoryReaderSync._internalWrap();
-  }
 
-  factory _DirectoryReaderSync._internalWrap() {
-    return new _DirectoryReaderSync.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _DirectoryReaderSync.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -41626,19 +42207,15 @@
 
 
   @Deprecated("Internal Use Only")
-  static _DocumentType internalCreate_DocumentType() {
-    return new _DocumentType._internalWrap();
-  }
-
-  external factory _DocumentType._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _DocumentType.internal_() : super.internal_();
 
 
   // Override this methods for Dartium _DocumentType can't be abstract.
-  Element get nextElementSibling => wrap_jso(_blink.BlinkDocumentType.instance.nextElementSibling_Getter_(unwrap_jso(this)));
-  Element get previousElementSibling => wrap_jso(_blink.BlinkDocumentType.instance.previousElementSibling_Getter_(unwrap_jso(this)));
+  Element get nextElementSibling => _blink.BlinkDocumentType.instance.nextElementSibling_Getter_(this);
+  Element get previousElementSibling => _blink.BlinkDocumentType.instance.previousElementSibling_Getter_(this);
 }
 
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -41659,27 +42236,23 @@
   @DocsEditable()
   factory _DomRect([num x, num y, num width, num height]) {
     if (height != null) {
-      return wrap_jso(_blink.BlinkDOMRect.instance.constructorCallback_4_(x, y, width, height));
+      return _blink.BlinkDOMRect.instance.constructorCallback_4_(x, y, width, height);
     }
     if (width != null) {
-      return wrap_jso(_blink.BlinkDOMRect.instance.constructorCallback_3_(x, y, width));
+      return _blink.BlinkDOMRect.instance.constructorCallback_3_(x, y, width);
     }
     if (y != null) {
-      return wrap_jso(_blink.BlinkDOMRect.instance.constructorCallback_2_(x, y));
+      return _blink.BlinkDOMRect.instance.constructorCallback_2_(x, y);
     }
     if (x != null) {
-      return wrap_jso(_blink.BlinkDOMRect.instance.constructorCallback_1_(x));
+      return _blink.BlinkDOMRect.instance.constructorCallback_1_(x);
     }
-    return wrap_jso(_blink.BlinkDOMRect.instance.constructorCallback_0_());
+    return _blink.BlinkDOMRect.instance.constructorCallback_0_();
   }
 
 
   @Deprecated("Internal Use Only")
-  static _DomRect internalCreate_DomRect() {
-    return new _DomRect._internalWrap();
-  }
-
-  external factory _DomRect._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _DomRect.internal_() : super.internal_();
@@ -41688,42 +42261,42 @@
   @DomName('DOMRect.height')
   @DocsEditable()
   @Experimental() // untriaged
-  num get height => _blink.BlinkDOMRect.instance.height_Getter_(unwrap_jso(this));
+  num get height => _blink.BlinkDOMRect.instance.height_Getter_(this);
   
   @DomName('DOMRect.height')
   @DocsEditable()
   @Experimental() // untriaged
-  set height(num value) => _blink.BlinkDOMRect.instance.height_Setter_(unwrap_jso(this), value);
+  set height(num value) => _blink.BlinkDOMRect.instance.height_Setter_(this, value);
   
   @DomName('DOMRect.width')
   @DocsEditable()
   @Experimental() // untriaged
-  num get width => _blink.BlinkDOMRect.instance.width_Getter_(unwrap_jso(this));
+  num get width => _blink.BlinkDOMRect.instance.width_Getter_(this);
   
   @DomName('DOMRect.width')
   @DocsEditable()
   @Experimental() // untriaged
-  set width(num value) => _blink.BlinkDOMRect.instance.width_Setter_(unwrap_jso(this), value);
+  set width(num value) => _blink.BlinkDOMRect.instance.width_Setter_(this, value);
   
   @DomName('DOMRect.x')
   @DocsEditable()
   @Experimental() // untriaged
-  num get x => _blink.BlinkDOMRect.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkDOMRect.instance.x_Getter_(this);
   
   @DomName('DOMRect.x')
   @DocsEditable()
   @Experimental() // untriaged
-  set x(num value) => _blink.BlinkDOMRect.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkDOMRect.instance.x_Setter_(this, value);
   
   @DomName('DOMRect.y')
   @DocsEditable()
   @Experimental() // untriaged
-  num get y => _blink.BlinkDOMRect.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkDOMRect.instance.y_Getter_(this);
   
   @DomName('DOMRect.y')
   @DocsEditable()
   @Experimental() // untriaged
-  set y(num value) => _blink.BlinkDOMRect.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkDOMRect.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -41741,21 +42314,13 @@
   // To suppress missing implicit constructor warnings.
   factory _EntrySync._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _EntrySync internalCreate_EntrySync() {
-    return new _EntrySync._internalWrap();
-  }
 
-  factory _EntrySync._internalWrap() {
-    return new _EntrySync.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _EntrySync.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -41774,11 +42339,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _FileEntrySync internalCreate_FileEntrySync() {
-    return new _FileEntrySync._internalWrap();
-  }
-
-  external factory _FileEntrySync._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _FileEntrySync.internal_() : super.internal_();
@@ -41803,24 +42364,16 @@
   @DomName('FileReaderSync.FileReaderSync')
   @DocsEditable()
   factory _FileReaderSync() {
-    return wrap_jso(_blink.BlinkFileReaderSync.instance.constructorCallback_0_());
+    return _blink.BlinkFileReaderSync.instance.constructorCallback_0_();
   }
 
+
   @Deprecated("Internal Use Only")
-  static _FileReaderSync internalCreate_FileReaderSync() {
-    return new _FileReaderSync._internalWrap();
-  }
-
-  factory _FileReaderSync._internalWrap() {
-    return new _FileReaderSync.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _FileReaderSync.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -41837,21 +42390,13 @@
   // To suppress missing implicit constructor warnings.
   factory _FileWriterSync._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _FileWriterSync internalCreate_FileWriterSync() {
-    return new _FileWriterSync._internalWrap();
-  }
 
-  factory _FileWriterSync._internalWrap() {
-    return new _FileWriterSync.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _FileWriterSync.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -41868,32 +42413,24 @@
   // To suppress missing implicit constructor warnings.
   factory _GamepadList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _GamepadList internalCreate_GamepadList() {
-    return new _GamepadList._internalWrap();
-  }
 
-  factory _GamepadList._internalWrap() {
-    return new _GamepadList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _GamepadList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('GamepadList.length')
   @DocsEditable()
-  int get length => _blink.BlinkGamepadList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkGamepadList.instance.length_Getter_(this);
   
   Gamepad operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkGamepadList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  Gamepad _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkGamepadList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Gamepad _nativeIndexedGetter(int index) => (_blink.BlinkGamepadList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, Gamepad value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -41935,7 +42472,7 @@
 
   @DomName('GamepadList.item')
   @DocsEditable()
-  Gamepad item(int index) => wrap_jso(_blink.BlinkGamepadList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Gamepad item(int index) => _blink.BlinkGamepadList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -41953,25 +42490,23 @@
   // To suppress missing implicit constructor warnings.
   factory _HTMLAllCollection._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _HTMLAllCollection internalCreate_HTMLAllCollection() {
-    return new _HTMLAllCollection._internalWrap();
-  }
 
-  factory _HTMLAllCollection._internalWrap() {
-    return new _HTMLAllCollection.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _HTMLAllCollection.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+  Element _item(int index) {
+    if ((index is int || index == null)) {
+      return _blink.BlinkHTMLAllCollection.instance.item_Callback_1_(this, index);
+    }
+    if ((index is int || index == null)) {
+      return _blink.BlinkHTMLAllCollection.instance.item_Callback_1_(this, index);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
 
-  @DomName('HTMLAllCollection.item')
-  @DocsEditable()
-  Element _item(int index) => wrap_jso(_blink.BlinkHTMLAllCollection.instance.item_Callback_1_(unwrap_jso(this), index));
-  
 }
 // 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
@@ -41990,11 +42525,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _HTMLAppletElement internalCreate_HTMLAppletElement() {
-    return new _HTMLAppletElement._internalWrap();
-  }
-
-  external factory _HTMLAppletElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _HTMLAppletElement.internal_() : super.internal_();
@@ -42024,11 +42555,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _HTMLDirectoryElement internalCreate_HTMLDirectoryElement() {
-    return new _HTMLDirectoryElement._internalWrap();
-  }
-
-  external factory _HTMLDirectoryElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _HTMLDirectoryElement.internal_() : super.internal_();
@@ -42058,11 +42585,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _HTMLFontElement internalCreate_HTMLFontElement() {
-    return new _HTMLFontElement._internalWrap();
-  }
-
-  external factory _HTMLFontElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _HTMLFontElement.internal_() : super.internal_();
@@ -42092,11 +42615,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _HTMLFrameElement internalCreate_HTMLFrameElement() {
-    return new _HTMLFrameElement._internalWrap();
-  }
-
-  external factory _HTMLFrameElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _HTMLFrameElement.internal_() : super.internal_();
@@ -42124,11 +42643,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _HTMLFrameSetElement internalCreate_HTMLFrameSetElement() {
-    return new _HTMLFrameSetElement._internalWrap();
-  }
-
-  external factory _HTMLFrameSetElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _HTMLFrameSetElement.internal_() : super.internal_();
@@ -42167,11 +42682,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _HTMLMarqueeElement internalCreate_HTMLMarqueeElement() {
-    return new _HTMLMarqueeElement._internalWrap();
-  }
-
-  external factory _HTMLMarqueeElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _HTMLMarqueeElement.internal_() : super.internal_();
@@ -42207,11 +42718,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _MutationEvent internalCreate_MutationEvent() {
-    return new _MutationEvent._internalWrap();
-  }
-
-  external factory _MutationEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _MutationEvent.internal_() : super.internal_();
@@ -42233,32 +42740,24 @@
   // To suppress missing implicit constructor warnings.
   factory _NamedNodeMap._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _NamedNodeMap internalCreate_NamedNodeMap() {
-    return new _NamedNodeMap._internalWrap();
-  }
 
-  factory _NamedNodeMap._internalWrap() {
-    return new _NamedNodeMap.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _NamedNodeMap.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('NamedNodeMap.length')
   @DocsEditable()
-  int get length => _blink.BlinkNamedNodeMap.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkNamedNodeMap.instance.length_Getter_(this);
   
   Node operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkNamedNodeMap.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  Node _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkNamedNodeMap.instance.item_Callback_1_(unwrap_jso(this), index));
+  Node _nativeIndexedGetter(int index) => (_blink.BlinkNamedNodeMap.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, Node value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -42298,37 +42797,39 @@
   Node elementAt(int index) => this[index];
   // -- end List<Node> mixins.
 
-  @DomName('NamedNodeMap.__getter__')
-  @DocsEditable()
-  Node __getter__(String name) => wrap_jso(_blink.BlinkNamedNodeMap.instance.$__getter___Callback_1_(unwrap_jso(this), name));
-  
-  @DomName('NamedNodeMap.getNamedItem')
-  @DocsEditable()
-  Node getNamedItem(String name) => wrap_jso(_blink.BlinkNamedNodeMap.instance.getNamedItem_Callback_1_(unwrap_jso(this), name));
-  
+  _Attr getNamedItem(String name) {
+    if ((name is String)) {
+      return _blink.BlinkNamedNodeMap.instance.getNamedItem_Callback_1_(this, name);
+    }
+    if ((name is String)) {
+      return _blink.BlinkNamedNodeMap.instance.getNamedItem_Callback_1_(this, name);
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('NamedNodeMap.getNamedItemNS')
   @DocsEditable()
-  Node getNamedItemNS(String namespaceURI, String localName) => wrap_jso(_blink.BlinkNamedNodeMap.instance.getNamedItemNS_Callback_2_(unwrap_jso(this), namespaceURI, localName));
+  _Attr getNamedItemNS(String namespaceURI, String localName) => _blink.BlinkNamedNodeMap.instance.getNamedItemNS_Callback_2_(this, namespaceURI, localName);
   
   @DomName('NamedNodeMap.item')
   @DocsEditable()
-  Node item(int index) => wrap_jso(_blink.BlinkNamedNodeMap.instance.item_Callback_1_(unwrap_jso(this), index));
+  _Attr item(int index) => _blink.BlinkNamedNodeMap.instance.item_Callback_1_(this, index);
   
   @DomName('NamedNodeMap.removeNamedItem')
   @DocsEditable()
-  Node removeNamedItem(String name) => wrap_jso(_blink.BlinkNamedNodeMap.instance.removeNamedItem_Callback_1_(unwrap_jso(this), name));
+  _Attr removeNamedItem(String name) => _blink.BlinkNamedNodeMap.instance.removeNamedItem_Callback_1_(this, name);
   
   @DomName('NamedNodeMap.removeNamedItemNS')
   @DocsEditable()
-  Node removeNamedItemNS(String namespaceURI, String localName) => wrap_jso(_blink.BlinkNamedNodeMap.instance.removeNamedItemNS_Callback_2_(unwrap_jso(this), namespaceURI, localName));
+  _Attr removeNamedItemNS(String namespaceURI, String localName) => _blink.BlinkNamedNodeMap.instance.removeNamedItemNS_Callback_2_(this, namespaceURI, localName);
   
   @DomName('NamedNodeMap.setNamedItem')
   @DocsEditable()
-  Node setNamedItem(Node node) => wrap_jso(_blink.BlinkNamedNodeMap.instance.setNamedItem_Callback_1_(unwrap_jso(this), unwrap_jso(node)));
+  _Attr setNamedItem(_Attr attr) => _blink.BlinkNamedNodeMap.instance.setNamedItem_Callback_1_(this, attr);
   
   @DomName('NamedNodeMap.setNamedItemNS')
   @DocsEditable()
-  Node setNamedItemNS(Node node) => wrap_jso(_blink.BlinkNamedNodeMap.instance.setNamedItemNS_Callback_1_(unwrap_jso(this), unwrap_jso(node)));
+  _Attr setNamedItemNS(_Attr attr) => _blink.BlinkNamedNodeMap.instance.setNamedItemNS_Callback_1_(this, attr);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -42345,52 +42846,13 @@
   // To suppress missing implicit constructor warnings.
   factory _PagePopupController._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _PagePopupController internalCreate_PagePopupController() {
-    return new _PagePopupController._internalWrap();
-  }
 
-  factory _PagePopupController._internalWrap() {
-    return new _PagePopupController.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _PagePopupController.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('RGBColor')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-class _RGBColor extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory _RGBColor._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static _RGBColor internalCreate_RGBColor() {
-    return new _RGBColor._internalWrap();
-  }
-
-  factory _RGBColor._internalWrap() {
-    return new _RGBColor.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  _RGBColor.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -42404,47 +42866,17 @@
 
 
   @Deprecated("Internal Use Only")
-  static _RadioNodeList internalCreate_RadioNodeList() {
-    return new _RadioNodeList._internalWrap();
-  }
-
-  external factory _RadioNodeList._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _RadioNodeList.internal_() : super.internal_();
 
 
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('Rect')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-class _Rect extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory _Rect._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static _Rect internalCreate_Rect() {
-    return new _Rect._internalWrap();
-  }
-
-  factory _Rect._internalWrap() {
-    return new _Rect.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  _Rect.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
+  @DomName('RadioNodeList.item')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Node _item(int index) => _blink.BlinkRadioNodeList.instance.item_Callback_1_(this, index);
+  
 }
 // 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
@@ -42462,65 +42894,56 @@
 
   @DomName('Request.Request')
   @DocsEditable()
-  factory _Request(input, [Map requestInitDict]) {
-    if ((input is String || input == null) && requestInitDict == null) {
-      return wrap_jso(_blink.BlinkRequest.instance.constructorCallback_1_(input));
-    }
-    if ((requestInitDict is Map || requestInitDict == null) && (input is String || input == null)) {
+  factory _Request(Object input, [Map requestInitDict]) {
+    if (requestInitDict != null) {
       var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict);
-      return wrap_jso(_blink.BlinkRequest.instance.constructorCallback_2_(input, requestInitDict_1));
+      return _blink.BlinkRequest.instance.constructorCallback_2_(input, requestInitDict_1);
     }
-    if ((input is _Request || input == null) && requestInitDict == null) {
-      return wrap_jso(_blink.BlinkRequest.instance.constructorCallback_1_(input));
-    }
-    if ((requestInitDict is Map || requestInitDict == null) && (input is _Request || input == null)) {
-      var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict);
-      return wrap_jso(_blink.BlinkRequest.instance.constructorCallback_2_(input, requestInitDict_1));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _blink.BlinkRequest.instance.constructorCallback_1_(input);
   }
 
 
   @Deprecated("Internal Use Only")
-  static _Request internalCreate_Request() {
-    return new _Request._internalWrap();
-  }
-
-  external factory _Request._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _Request.internal_() : super.internal_();
 
 
+  @DomName('Request.context')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get context => _blink.BlinkRequest.instance.context_Getter_(this);
+  
   @DomName('Request.credentials')
   @DocsEditable()
   @Experimental() // untriaged
-  String get credentials => _blink.BlinkRequest.instance.credentials_Getter_(unwrap_jso(this));
+  String get credentials => _blink.BlinkRequest.instance.credentials_Getter_(this);
   
   @DomName('Request.headers')
   @DocsEditable()
   @Experimental() // untriaged
-  Headers get headers => wrap_jso(_blink.BlinkRequest.instance.headers_Getter_(unwrap_jso(this)));
+  Headers get headers => _blink.BlinkRequest.instance.headers_Getter_(this);
   
   @DomName('Request.mode')
   @DocsEditable()
   @Experimental() // untriaged
-  String get mode => _blink.BlinkRequest.instance.mode_Getter_(unwrap_jso(this));
+  String get mode => _blink.BlinkRequest.instance.mode_Getter_(this);
   
   @DomName('Request.referrer')
   @DocsEditable()
   @Experimental() // untriaged
-  String get referrer => _blink.BlinkRequest.instance.referrer_Getter_(unwrap_jso(this));
+  String get referrer => _blink.BlinkRequest.instance.referrer_Getter_(this);
   
   @DomName('Request.url')
   @DocsEditable()
   @Experimental() // untriaged
-  String get url => _blink.BlinkRequest.instance.url_Getter_(unwrap_jso(this));
+  String get url => _blink.BlinkRequest.instance.url_Getter_(this);
   
   @DomName('Request.clone')
   @DocsEditable()
   @Experimental() // untriaged
-  _Request clone() => wrap_jso(_blink.BlinkRequest.instance.clone_Callback_0_(unwrap_jso(this)));
+  _Request clone() => _blink.BlinkRequest.instance.clone_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -42539,45 +42962,20 @@
 
   @DomName('Response.Response')
   @DocsEditable()
-  factory _Response(body_OR_input, [Map requestInitDict_OR_responseInitDict]) {
-    if ((body_OR_input is String || body_OR_input == null) && requestInitDict_OR_responseInitDict == null) {
-      return wrap_jso(_blink.BlinkResponse.instance.constructorCallback_1_(body_OR_input));
+  factory _Response([Object body, Map responseInitDict]) {
+    if (responseInitDict != null) {
+      var responseInitDict_1 = convertDartToNative_Dictionary(responseInitDict);
+      return _blink.BlinkResponse.instance.constructorCallback_2_(body, responseInitDict_1);
     }
-    if ((requestInitDict_OR_responseInitDict is Map || requestInitDict_OR_responseInitDict == null) && (body_OR_input is String || body_OR_input == null)) {
-      var responseInitDict_1 = convertDartToNative_Dictionary(requestInitDict_OR_responseInitDict);
-      return wrap_jso(_blink.BlinkResponse.instance.constructorCallback_2_(body_OR_input, responseInitDict_1));
+    if (body != null) {
+      return _blink.BlinkResponse.instance.constructorCallback_1_(body);
     }
-    if ((body_OR_input is Blob || body_OR_input == null) && requestInitDict_OR_responseInitDict == null) {
-      return wrap_jso(_blink.BlinkResponse.instance.constructorCallback_1_(body_OR_input));
-    }
-    if ((requestInitDict_OR_responseInitDict is Map || requestInitDict_OR_responseInitDict == null) && (body_OR_input is Blob || body_OR_input == null)) {
-      var responseInitDict_1 = convertDartToNative_Dictionary(requestInitDict_OR_responseInitDict);
-      return wrap_jso(_blink.BlinkResponse.instance.constructorCallback_2_(body_OR_input, responseInitDict_1));
-    }
-    if ((body_OR_input is TypedData || body_OR_input == null) && requestInitDict_OR_responseInitDict == null) {
-      return wrap_jso(_blink.BlinkResponse.instance.constructorCallback_1_(body_OR_input));
-    }
-    if ((requestInitDict_OR_responseInitDict is Map || requestInitDict_OR_responseInitDict == null) && (body_OR_input is TypedData || body_OR_input == null)) {
-      var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict_OR_responseInitDict);
-      return wrap_jso(_blink.BlinkResponse.instance.constructorCallback_2_(body_OR_input, requestInitDict_1));
-    }
-    if ((body_OR_input is ByteBuffer || body_OR_input == null) && requestInitDict_OR_responseInitDict == null) {
-      return wrap_jso(_blink.BlinkResponse.instance.constructorCallback_1_(body_OR_input));
-    }
-    if ((requestInitDict_OR_responseInitDict is Map || requestInitDict_OR_responseInitDict == null) && (body_OR_input is ByteBuffer || body_OR_input == null)) {
-      var requestInitDict_1 = convertDartToNative_Dictionary(requestInitDict_OR_responseInitDict);
-      return wrap_jso(_blink.BlinkResponse.instance.constructorCallback_2_(body_OR_input, requestInitDict_1));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _blink.BlinkResponse.instance.constructorCallback_0_();
   }
 
 
   @Deprecated("Internal Use Only")
-  static _Response internalCreate_Response() {
-    return new _Response._internalWrap();
-  }
-
-  external factory _Response._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _Response.internal_() : super.internal_();
@@ -42598,11 +42996,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _ServiceWorker internalCreate_ServiceWorker() {
-    return new _ServiceWorker._internalWrap();
-  }
-
-  external factory _ServiceWorker._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _ServiceWorker.internal_() : super.internal_();
@@ -42627,32 +43021,24 @@
   // To suppress missing implicit constructor warnings.
   factory _SpeechRecognitionResultList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _SpeechRecognitionResultList internalCreate_SpeechRecognitionResultList() {
-    return new _SpeechRecognitionResultList._internalWrap();
-  }
 
-  factory _SpeechRecognitionResultList._internalWrap() {
-    return new _SpeechRecognitionResultList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _SpeechRecognitionResultList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SpeechRecognitionResultList.length')
   @DocsEditable()
-  int get length => _blink.BlinkSpeechRecognitionResultList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSpeechRecognitionResultList.instance.length_Getter_(this);
   
   SpeechRecognitionResult operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkSpeechRecognitionResultList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  SpeechRecognitionResult _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkSpeechRecognitionResultList.instance.item_Callback_1_(unwrap_jso(this), index));
+  SpeechRecognitionResult _nativeIndexedGetter(int index) => (_blink.BlinkSpeechRecognitionResultList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, SpeechRecognitionResult value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -42694,7 +43080,7 @@
 
   @DomName('SpeechRecognitionResultList.item')
   @DocsEditable()
-  SpeechRecognitionResult item(int index) => wrap_jso(_blink.BlinkSpeechRecognitionResultList.instance.item_Callback_1_(unwrap_jso(this), index));
+  SpeechRecognitionResult item(int index) => _blink.BlinkSpeechRecognitionResultList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -42710,32 +43096,24 @@
   // To suppress missing implicit constructor warnings.
   factory _StyleSheetList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _StyleSheetList internalCreate_StyleSheetList() {
-    return new _StyleSheetList._internalWrap();
-  }
 
-  factory _StyleSheetList._internalWrap() {
-    return new _StyleSheetList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _StyleSheetList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('StyleSheetList.length')
   @DocsEditable()
-  int get length => _blink.BlinkStyleSheetList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkStyleSheetList.instance.length_Getter_(this);
   
   StyleSheet operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkStyleSheetList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  StyleSheet _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkStyleSheetList.instance.item_Callback_1_(unwrap_jso(this), index));
+  StyleSheet _nativeIndexedGetter(int index) => (_blink.BlinkStyleSheetList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, StyleSheet value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -42777,11 +43155,11 @@
 
   @DomName('StyleSheetList.__getter__')
   @DocsEditable()
-  CssStyleSheet __getter__(String name) => wrap_jso(_blink.BlinkStyleSheetList.instance.$__getter___Callback_1_(unwrap_jso(this), name));
+  CssStyleSheet __getter__(String name) => _blink.BlinkStyleSheetList.instance.$__getter___Callback_1_(this, name);
   
   @DomName('StyleSheetList.item')
   @DocsEditable()
-  StyleSheet item(int index) => wrap_jso(_blink.BlinkStyleSheetList.instance.item_Callback_1_(unwrap_jso(this), index));
+  StyleSheet item(int index) => _blink.BlinkStyleSheetList.instance.item_Callback_1_(this, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -42798,49 +43176,13 @@
   // To suppress missing implicit constructor warnings.
   factory _SubtleCrypto._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _SubtleCrypto internalCreate_SubtleCrypto() {
-    return new _SubtleCrypto._internalWrap();
-  }
 
-  factory _SubtleCrypto._internalWrap() {
-    return new _SubtleCrypto.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _SubtleCrypto.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('WebKitCSSFilterValue')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-class _WebKitCSSFilterValue extends _CssValueList {
-  // To suppress missing implicit constructor warnings.
-  factory _WebKitCSSFilterValue._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _WebKitCSSFilterValue internalCreate_WebKitCSSFilterValue() {
-    return new _WebKitCSSFilterValue._internalWrap();
-  }
-
-  external factory _WebKitCSSFilterValue._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _WebKitCSSFilterValue.internal_() : super.internal_();
-
-
 }
 // 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
@@ -42863,52 +43205,16 @@
   @DomName('WebKitCSSMatrix.WebKitCSSMatrix')
   @DocsEditable()
   factory _WebKitCSSMatrix([String cssValue]) {
-    return wrap_jso(_blink.BlinkWebKitCSSMatrix.instance.constructorCallback_1_(cssValue));
+    return _blink.BlinkWebKitCSSMatrix.instance.constructorCallback_1_(cssValue);
   }
 
+
   @Deprecated("Internal Use Only")
-  static _WebKitCSSMatrix internalCreate_WebKitCSSMatrix() {
-    return new _WebKitCSSMatrix._internalWrap();
-  }
-
-  factory _WebKitCSSMatrix._internalWrap() {
-    return new _WebKitCSSMatrix.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _WebKitCSSMatrix.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('WebKitCSSTransformValue')
-// http://dev.w3.org/csswg/cssom/
-@deprecated // deprecated
-class _WebKitCSSTransformValue extends _CssValueList {
-  // To suppress missing implicit constructor warnings.
-  factory _WebKitCSSTransformValue._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _WebKitCSSTransformValue internalCreate_WebKitCSSTransformValue() {
-    return new _WebKitCSSTransformValue._internalWrap();
-  }
-
-  external factory _WebKitCSSTransformValue._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _WebKitCSSTransformValue.internal_() : super.internal_();
-
-
 }
 // 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
@@ -42924,25 +43230,51 @@
   // To suppress missing implicit constructor warnings.
   factory _WindowTimers._() { throw new UnsupportedError("Not supported"); }
 
-  @DomName('WindowTimers.clearInterval')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void _clearInterval(int handle);
+  int _setInterval_String(String handler, [int timeout, Object arguments]) {
+    if (timeout != null) {
+      return _blink.BlinkWindowTimers.instance.setInterval_Callback_3_(this, handler, timeout, arguments);
+    }
+    return _blink.BlinkWindowTimers.instance.setInterval_Callback_1_(this, handler);
+  }
 
-  @DomName('WindowTimers.clearTimeout')
-  @DocsEditable()
-  @Experimental() // untriaged
-  void _clearTimeout(int handle);
+  int _setTimeout_String(String handler, [int timeout, Object arguments]) {
+    if (timeout != null) {
+      return _blink.BlinkWindowTimers.instance.setTimeout_Callback_3_(this, handler, timeout, arguments);
+    }
+    return _blink.BlinkWindowTimers.instance.setTimeout_Callback_1_(this, handler);
+  }
 
-  @DomName('WindowTimers.setInterval')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int _setInterval(Object handler, int timeout);
+  void _clearInterval([int handle]) {
+    if (handle != null) {
+      _blink.BlinkWindowTimers.instance.clearInterval_Callback_1_(this, handle);
+      return;
+    }
+    _blink.BlinkWindowTimers.instance.clearInterval_Callback_0_(this);
+    return;
+  }
 
-  @DomName('WindowTimers.setTimeout')
-  @DocsEditable()
-  @Experimental() // untriaged
-  int _setTimeout(Object handler, int timeout);
+  void _clearTimeout([int handle]) {
+    if (handle != null) {
+      _blink.BlinkWindowTimers.instance.clearTimeout_Callback_1_(this, handle);
+      return;
+    }
+    _blink.BlinkWindowTimers.instance.clearTimeout_Callback_0_(this);
+    return;
+  }
+
+  int _setInterval(Object handler, [int timeout]) {
+    if (timeout != null) {
+      return _blink.BlinkWindowTimers.instance.setInterval_Callback_2_(this, handler, timeout);
+    }
+    return _blink.BlinkWindowTimers.instance.setInterval_Callback_1_(this, handler);
+  }
+
+  int _setTimeout(Object handler, [int timeout]) {
+    if (timeout != null) {
+      return _blink.BlinkWindowTimers.instance.setTimeout_Callback_2_(this, handler, timeout);
+    }
+    return _blink.BlinkWindowTimers.instance.setTimeout_Callback_1_(this, handler);
+  }
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -42958,31 +43290,23 @@
   // To suppress missing implicit constructor warnings.
   factory _WorkerLocation._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _WorkerLocation internalCreate_WorkerLocation() {
-    return new _WorkerLocation._internalWrap();
-  }
 
-  factory _WorkerLocation._internalWrap() {
-    return new _WorkerLocation.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _WorkerLocation.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   // Override these methods for Dartium _WorkerLocation can't be abstract.
-  String get hash => _blink.BlinkWorkerLocation.instance.hash_Getter_(unwrap_jso(this));
-  String get host => _blink.BlinkWorkerLocation.instance.host_Getter_(unwrap_jso(this));
-  String get hostname => _blink.BlinkWorkerLocation.instance.hostname_Getter_(unwrap_jso(this));
-  String get href => _blink.BlinkWorkerLocation.instance.href_Getter_(unwrap_jso(this));
-  String get origin => _blink.BlinkWorkerLocation.instance.origin_Getter_(unwrap_jso(this));
-  String get pathname => _blink.BlinkWorkerLocation.instance.pathname_Getter_(unwrap_jso(this));
-  String get port => _blink.BlinkWorkerLocation.instance.port_Getter_(unwrap_jso(this));
-  String get protocol => _blink.BlinkWorkerLocation.instance.protocol_Getter_(unwrap_jso(this));
-  String get search => _blink.BlinkWorkerLocation.instance.search_Getter_(unwrap_jso(this));
+  String get hash => _blink.BlinkWorkerLocation.instance.hash_Getter_(this);
+  String get host => _blink.BlinkWorkerLocation.instance.host_Getter_(this);
+  String get hostname => _blink.BlinkWorkerLocation.instance.hostname_Getter_(this);
+  String get href => _blink.BlinkWorkerLocation.instance.href_Getter_(this);
+  String get origin => _blink.BlinkWorkerLocation.instance.origin_Getter_(this);
+  String get pathname => _blink.BlinkWorkerLocation.instance.pathname_Getter_(this);
+  String get port => _blink.BlinkWorkerLocation.instance.port_Getter_(this);
+  String get protocol => _blink.BlinkWorkerLocation.instance.protocol_Getter_(this);
+  String get search => _blink.BlinkWorkerLocation.instance.search_Getter_(this);
 }
 
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -42998,31 +43322,23 @@
   // To suppress missing implicit constructor warnings.
   factory _WorkerNavigator._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static _WorkerNavigator internalCreate_WorkerNavigator() {
-    return new _WorkerNavigator._internalWrap();
-  }
 
-  factory _WorkerNavigator._internalWrap() {
-    return new _WorkerNavigator.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _WorkerNavigator.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   // Override these methods for Dartium _WorkerNavigator can't be abstract.
-  String get appCodeName => _blink.BlinkWorkerNavigator.instance.appCodeName_Getter_(unwrap_jso(this));
-  String get appName => _blink.BlinkWorkerNavigator.instance.appCodeName_Getter_(unwrap_jso(this));
-  String get appVersion => _blink.BlinkWorkerNavigator.instance.appVersion_Getter_(unwrap_jso(this));
-  bool get dartEnabled => _blink.BlinkWorkerNavigator.instance.dartEnabled_Getter_(unwrap_jso(this));
-  String get platform => _blink.BlinkWorkerNavigator.instance.platform_Getter_(unwrap_jso(this));
-  String get product => _blink.BlinkWorkerNavigator.instance.product_Getter_(unwrap_jso(this));
-  String get userAgent => _blink.BlinkWorkerNavigator.instance.userAgent_Getter_(unwrap_jso(this));
-  int get hardwareConcurrency => _blink.BlinkWorkerNavigator.instance.hardwareConcurrency_Getter_(unwrap_jso(this));
-  bool get onLine => _blink.BlinkWorkerNavigator.instance.onLine_Getter_(unwrap_jso(this));
+  String get appCodeName => _blink.BlinkWorkerNavigator.instance.appCodeName_Getter_(this);
+  String get appName => _blink.BlinkWorkerNavigator.instance.appCodeName_Getter_(this);
+  String get appVersion => _blink.BlinkWorkerNavigator.instance.appVersion_Getter_(this);
+  bool get dartEnabled => _blink.BlinkWorkerNavigator.instance.dartEnabled_Getter_(this);
+  String get platform => _blink.BlinkWorkerNavigator.instance.platform_Getter_(this);
+  String get product => _blink.BlinkWorkerNavigator.instance.product_Getter_(this);
+  String get userAgent => _blink.BlinkWorkerNavigator.instance.userAgent_Getter_(this);
+  int get hardwareConcurrency => _blink.BlinkWorkerNavigator.instance.hardwareConcurrency_Getter_(this);
+  bool get onLine => _blink.BlinkWorkerNavigator.instance.onLine_Getter_(this);
 }
 
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -43041,11 +43357,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _XMLHttpRequestProgressEvent internalCreate_XMLHttpRequestProgressEvent() {
-    return new _XMLHttpRequestProgressEvent._internalWrap();
-  }
-
-  external factory _XMLHttpRequestProgressEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _XMLHttpRequestProgressEvent.internal_() : super.internal_();
@@ -47213,40 +47525,11 @@
   }
 
   Element upgrade(element) {
-    var jsObject;
-    var tag;
-    var isNativeElementExtension = false;
-
-    try {
-      tag = _getCustomElementName(element);
-    } catch (e) {
-      isNativeElementExtension = element.localName == _extendsTag;
+    // Only exact type matches are supported- cannot be a subclass.
+    if (element.runtimeType != _nativeType) {
+      throw new ArgumentError('element is not subclass of $_nativeType');
     }
-
-    if (element.runtimeType == HtmlElement || element.runtimeType == TemplateElement) {
-      if (tag != _extendsTag) {
-        throw new UnsupportedError('$tag is not registered.');
-      }
-      jsObject = unwrap_jso(element);
-    } else if (element.runtimeType == js.JsObject) {
-      // It's a Polymer core element (written in JS).
-      jsObject = element;
-    } else if (isNativeElementExtension) {
-      // Extending a native element.
-      jsObject = element.blink_jsObject;
-
-      // Element to extend is the real tag.
-      tag = element.localName;
-    } else if (tag != null && element.localName != tag) {
-      throw new UnsupportedError('Element is incorrect type. Got ${element.runtimeType}, expected native Html or Svg element to extend.');
-    } else if (tag == null) {
-      throw new UnsupportedError('Element is incorrect type. Got ${element.runtimeType}, expected HtmlElement/JsObject.');
-    }
-
-    // Remember Dart class to tagName for any upgrading done in wrap_jso.
-    addCustomElementType(tag, _type, _extendsTag);
-
-    return _createCustomUpgrader(_type, jsObject);
+    return _createCustomUpgrader(_type, element);
   }
 }
 
@@ -47338,35 +47621,29 @@
 @Experimental()
 class KeyEvent extends _WrappedEvent implements KeyboardEvent {
   /** Needed because KeyboardEvent is implements.
-   *  TODO(terry): Consider making blink_jsObject private (add underscore) for
-   *               all blink_jsObject.  Then needed private wrap/unwrap_jso
-   *               functions that delegate to a public wrap/unwrap_jso.
    */
-  @Deprecated("Internal Use Only")
-  js.JsObject blink_jsObject;
-
   /** The parent KeyboardEvent that this KeyEvent is wrapping and "fixing". */
   KeyboardEvent _parent;
 
   /** The "fixed" value of whether the alt key is being pressed. */
   bool _shadowAltKey;
 
-  /** Caculated value of what the estimated charCode is for this event. */
+  /** Calculated value of what the estimated charCode is for this event. */
   int _shadowCharCode;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int _shadowKeyCode;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int get keyCode => _shadowKeyCode;
 
-  /** Caculated value of what the estimated charCode is for this event. */
+  /** Calculated value of what the estimated charCode is for this event. */
   int get charCode => this.type == 'keypress' ? _shadowCharCode : 0;
 
-  /** Caculated value of whether the alt key is pressed is for this event. */
+  /** Calculated value of whether the alt key is pressed is for this event. */
   bool get altKey => _shadowAltKey;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int get which => keyCode;
 
   /** Accessor to the underlying keyCode value is the parent event. */
@@ -47421,8 +47698,6 @@
   /** The currently registered target for this event. */
   EventTarget get currentTarget => _currentTarget;
 
-  /** Accessor to the clipboardData available for this event. */
-  DataTransfer get clipboardData => _parent.clipboardData;
   /** True if the ctrl key is pressed during this event. */
   bool get ctrlKey => _parent.ctrlKey;
   int get detail => _parent.detail;
@@ -47432,10 +47707,8 @@
    * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK).
    */
   int get keyLocation => _parent.keyLocation;
-  Point get layer => _parent.layer;
   /** True if the Meta (or Mac command) key is pressed during this event. */
   bool get metaKey => _parent.metaKey;
-  Point get page => _parent.page;
   /** True if the shift key was pressed during this event. */
   bool get shiftKey => _parent.shiftKey;
   Window get view => _parent.view;
@@ -47447,6 +47720,7 @@
 
   int get _charCode => charCode;
   int get _keyCode => keyCode;
+  int get _which => which;
   String get _keyIdentifier {
     throw new UnsupportedError("keyIdentifier is unsupported.");
   }
@@ -47456,10 +47730,6 @@
     throw new UnsupportedError(
         "Cannot initialize a KeyboardEvent from a KeyEvent.");
   }
-  int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
   @Experimental() // untriaged
   bool getModifierState(String keyArgument) => throw new UnimplementedError();
   @Experimental() // untriaged
@@ -47495,15 +47765,14 @@
 
 /**
  * Helper class to implement custom events which wrap DOM events.
+ * TODO(jacobr): consider using dart JsNative.$setInstanceInterceptor
+ * instead of using wrappers as that would allow passing these wrappers
+ * back through dispatchEvent unlike the current implementation.
+ * See https://github.com/dart-lang/sdk/issues/16869
  */
 class _WrappedEvent implements Event {
   /** Needed because KeyboardEvent is implements.
-   *  TODO(terry): Consider making blink_jsObject private (add underscore) for
-   *               all blink_jsObject.  Then needed private wrap/unwrap_jso
-   *               functions that delegate to a public wrap/unwrap_jso.
    */
-  js.JsObject blink_jsObject;
-
   final Event wrapped;
 
   /** The CSS selector involved with event delegation. */
@@ -47515,8 +47784,6 @@
 
   bool get cancelable => wrapped.cancelable;
 
-  DataTransfer get clipboardData => wrapped.clipboardData;
-
   EventTarget get currentTarget => wrapped.currentTarget;
 
   bool get defaultPrevented => wrapped.defaultPrevented;
@@ -47664,12 +47931,12 @@
 
 
 class _Property {
-  _Property(this.name) :
-      _hasValue = false,
-      writable = false,
-      isMethod = false,
-      isOwn = true,
-      wasThrown = false;
+  _Property(this.name)
+      : _hasValue = false,
+        writable = false,
+        isMethod = false,
+        isOwn = true,
+        wasThrown = false;
 
   bool get hasValue => _hasValue;
   get value => _value;
@@ -47689,6 +47956,203 @@
   bool wasThrown;
 }
 
+/**
+ * Manager for navigating between libraries from the devtools console.
+ */
+class _LibraryManager {
+  /**
+   * Current active library
+   */
+  static var _currentLibrary;
+  static var _validCache = false;
+
+  static List<Uri> _libraryUris;
+
+  // List of all maps to check to determine if there is an exact match.
+  static Map<String, List<Uri>> _fastPaths;
+
+  static void _addFastPath(String key, Uri uri) {
+    _fastPaths.putIfAbsent(key, () => <Uri>[]).add(uri);
+  }
+
+  static cache() {
+    if (_validCache) return;
+    _validCache = true;
+    _libraryUris = <Uri>[];
+    _fastPaths = new Map<String, List<Uri>>();
+    var system = currentMirrorSystem();
+    system.libraries.forEach((uri, library) {
+      _libraryUris.add(uri);
+      _addFastPath(uri.toString(), uri);
+      _addFastPath(MirrorSystem.getName(library.simpleName), uri);
+    });
+  }
+
+  static String get currentLibrary {
+    if (_currentLibrary == null) {
+      _currentLibrary =
+          currentMirrorSystem().isolate.rootLibrary.uri.toString();
+    }
+    return _currentLibrary;
+  }
+
+  /**
+   * Find libraries matching a given name.
+   *
+   * Uses heuristics to only return a single match when the user intent is
+   * generally unambiguous.
+   */
+  static List<Uri> findMatches(String name) {
+    cache();
+    var nameAsFile = name.endsWith('.dart') ? name : '${name}.dart';
+    // Perfect match first.
+    var fastPatchMatches = _fastPaths[name];
+    if (fastPatchMatches != null) {
+      return fastPatchMatches.toList();
+    }
+
+    // Exact match for file path.
+    var matches = new LinkedHashSet<Uri>();
+    for (var uri in _libraryUris) {
+      if (uri.path == name || uri.path == nameAsFile) matches.add(uri);
+    }
+    if (matches.isNotEmpty) return matches.toList();
+
+    // Exact match for file name.
+    if (name != nameAsFile) {
+      for (var uri in _libraryUris) {
+        if (uri.pathSegments.isNotEmpty &&
+            (uri.pathSegments.last == nameAsFile)) {
+          matches.add(uri);
+        }
+      }
+      if (matches.isNotEmpty) return matches.toList();
+    }
+
+    for (var uri in _libraryUris) {
+      if (uri.pathSegments.isNotEmpty && (uri.pathSegments.last == name)) {
+        matches.add(uri);
+      }
+    }
+    if (matches.isNotEmpty) return matches.toList();
+
+    // Partial match on path.
+    for (var uri in _libraryUris) {
+      if (uri.path.contains(name)) {
+        matches.add(uri);
+      }
+    }
+    if (matches.isNotEmpty) return matches.toList();
+
+    // Partial match on entire uri.
+    for (var uri in _libraryUris) {
+      if (uri.toString().contains(name)) {
+        matches.add(uri);
+      }
+    }
+
+    if (matches.isNotEmpty) return matches.toList();
+
+    // Partial match on entire uri ignoring case.
+    name = name.toLowerCase();
+    for (var uri in _libraryUris) {
+      if (uri.toString().toLowerCase().contains(name)) {
+        matches.add(uri);
+      }
+    }
+    return matches.toList();
+  }
+
+  static setLibrary([String name]) {
+    // Bust cache in case library list has changed. Ideally we would listen for
+    // when libraries are loaded and invalidate based on that.
+    _validCache = false;
+    cache();
+    if (name == null) {
+      window.console
+        ..group("Current library: $_currentLibrary")
+        ..groupCollapsed("All libraries:");
+      _listLibraries();
+      window.console..groupEnd()..groupEnd();
+      return;
+    }
+    var matches = findMatches(name);
+    if (matches.length != 1) {
+      if (matches.length > 1) {
+        window.console.warn("Ambiguous library name: $name");
+      }
+      showMatches(name, matches);
+      return;
+    }
+    _currentLibrary = matches.first.toString();
+    window.console.log("Set library to $_currentLibrary");
+  }
+
+  static getLibrary() {
+    return currentLibrary;
+  }
+
+  static List<Uri> _sortUris(Iterable<Uri> uris) {
+    return (uris.toList())
+      ..sort((Uri a, Uri b) {
+        if (a.scheme != b.scheme) {
+          if (a.scheme == 'dart') return -1;
+          if (b.scheme == 'dart') return 1;
+          return a.scheme.compareTo(b.scheme);
+        }
+        return a.toString().compareTo(b.toString());
+      });
+  }
+
+  static void listLibraries() {
+    _validCache = false;
+    cache();
+    _listLibraries();
+  }
+
+  static void _listLibraries() {
+    window.console.log(_sortUris(_libraryUris).join("\n"));
+  }
+
+  // Workaround to allow calling console.log with an arbitrary number of
+  // arguments.
+  static void _log(List<String> args) {
+    js.JsNative.callMethod(window.console, 'log', args);
+  }
+
+  static showMatches(String key, Iterable<Uri> uris) {
+    var boldPairs = [];
+    var sb = new StringBuffer();
+    if (uris.isEmpty) {
+      window.console.group("All libraries:");
+      _listLibraries();
+      window.console
+        ..groupEnd()
+        ..error("No library names or URIs match '$key'");
+      return;
+    }
+    sb.write("${uris.length} matches\n");
+    var lowerCaseKey = key.toLowerCase();
+    for (var uri in uris) {
+      var txt = uri.toString();
+      int index = txt.toLowerCase().indexOf(lowerCaseKey);
+      if (index != -1) {
+        // %c enables styling console log messages with css
+        // specified at the end of the console.
+        sb..write(txt.substring(0, index))..write('%c');
+        var matchEnd = index + key.length;
+        sb
+          ..write(txt.substring(index, matchEnd))
+          ..write('%c')
+          ..write(txt.substring(matchEnd))
+          ..write('\n');
+        boldPairs..add('font-weight: bold')..add('font-weight: normal');
+      }
+    }
+    _log([sb.toString()]..addAll(boldPairs));
+  }
+}
+
 class _ConsoleVariables {
   Map<String, Object> _data = new Map<String, Object>();
 
@@ -47734,15 +48198,15 @@
 }
 
 class _MethodTrampoline extends _Trampoline {
-  _MethodTrampoline(ObjectMirror receiver, MethodMirror methodMirror,
-      Symbol selector) :
-      super(receiver, methodMirror, selector);
+  _MethodTrampoline(
+      ObjectMirror receiver, MethodMirror methodMirror, Symbol selector)
+      : super(receiver, methodMirror, selector);
 
   noSuchMethod(Invocation msg) {
     if (msg.memberName != #call) return super.noSuchMethod(msg);
-    return _receiver.invoke(_selector,
-                            msg.positionalArguments,
-                            msg.namedArguments).reflectee;
+    return _receiver
+        .invoke(_selector, msg.positionalArguments, msg.namedArguments)
+        .reflectee;
   }
 }
 
@@ -47750,9 +48214,9 @@
  * Invocation trampoline class used to closurize getters.
  */
 class _GetterTrampoline extends _Trampoline {
-  _GetterTrampoline(ObjectMirror receiver, MethodMirror methodMirror,
-      Symbol selector) :
-      super(receiver, methodMirror, selector);
+  _GetterTrampoline(
+      ObjectMirror receiver, MethodMirror methodMirror, Symbol selector)
+      : super(receiver, methodMirror, selector);
 
   call() => _receiver.getField(_selector).reflectee;
 }
@@ -47761,9 +48225,9 @@
  * Invocation trampoline class used to closurize setters.
  */
 class _SetterTrampoline extends _Trampoline {
-  _SetterTrampoline(ObjectMirror receiver, MethodMirror methodMirror,
-      Symbol selector) :
-      super(receiver, methodMirror, selector);
+  _SetterTrampoline(
+      ObjectMirror receiver, MethodMirror methodMirror, Symbol selector)
+      : super(receiver, methodMirror, selector);
 
   call(value) {
     _receiver.setField(_selector, value);
@@ -47776,15 +48240,13 @@
   static DateTime doubleToDateTime(double dateTime) {
     try {
       return new DateTime.fromMillisecondsSinceEpoch(dateTime.toInt());
-    } catch(_) {
+    } catch (_) {
       // TODO(antonnm): treat exceptions properly in bindings and
       // find out how to treat NaNs.
       return null;
     }
   }
 
-  static maybeUnwrapJso(obj) => unwrap_jso(obj);
-
   static List convertToList(List list) {
     // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it.
     final length = list.length;
@@ -47823,7 +48285,10 @@
 
   static Map createMap() => {};
 
-  static parseJson(String jsonSource) => const JsonDecoder().convert(jsonSource);
+  static parseJson(String jsonSource) =>
+      const JsonDecoder().convert(jsonSource);
+
+  static String getLibraryUrl() => _LibraryManager.currentLibrary;
 
   static makeUnimplementedError(String fileName, int lineNo) {
     return new UnsupportedError('[info: $fileName:$lineNo]');
@@ -47848,14 +48313,14 @@
     return element;
   }
 
-  static window() => wrap_jso(js.context['window']);
-
-  static forwardingPrint(String message) => _blink.Blink_Utils.forwardingPrint(message);
+  static forwardingPrint(String message) =>
+      _blink.Blink_Utils.forwardingPrint(message);
   static void spawnDomHelper(Function f, int replyTo) =>
       _blink.Blink_Utils.spawnDomHelper(f, replyTo);
 
   // TODO(vsm): Make this API compatible with spawnUri.  It should also
   // return a Future<Isolate>.
+  // TODO(jacobr): IS THIS RIGHT? I worry we have broken conversion from Promise to Future.
   static spawnDomUri(String uri) => _blink.Blink_Utils.spawnDomUri(uri);
 
   // The following methods were added for debugger integration to make working
@@ -47882,8 +48347,8 @@
    */
   static Map<String, dynamic> createLocalVariablesMap(List localVariables) {
     var map = {};
-    for (int i = 0; i < localVariables.length; i+=2) {
-      map[stripMemberName(localVariables[i])] = localVariables[i+1];
+    for (int i = 0; i < localVariables.length; i += 2) {
+      map[stripMemberName(localVariables[i])] = localVariables[i + 1];
     }
     return map;
   }
@@ -47912,8 +48377,8 @@
    * [_consoleTempVariables, 40, 2, someValue, someOtherValue]]
    * </code>
    */
-  static List wrapExpressionAsClosure(String expression, List locals,
-      bool includeCommandLineAPI) {
+  static List wrapExpressionAsClosure(
+      String expression, List locals, bool includeCommandLineAPI) {
     var args = {};
     var sb = new StringBuffer("(");
     addArg(arg, value) {
@@ -47948,26 +48413,24 @@
       final _SET_VARIABLE = new RegExp("^(\\s*)(\\w+)(\\s*=)");
       // Match trailing semicolons.
       final _ENDING_SEMICOLONS = new RegExp("(;\\s*)*\$");
-      expression = expression.replaceAllMapped(_VARIABLE_DECLARATION,
-          (match) {
-            var variableName = match[2];
-            // Set the console variable if it isn't already set.
-            if (!_consoleTempVariables._data.containsKey(variableName)) {
-              _consoleTempVariables._data[variableName] = null;
-            }
-            return "${match[1]}\$consoleVariables.${variableName}";
-          });
+      expression = expression.replaceAllMapped(_VARIABLE_DECLARATION, (match) {
+        var variableName = match[2];
+        // Set the console variable if it isn't already set.
+        if (!_consoleTempVariables._data.containsKey(variableName)) {
+          _consoleTempVariables._data[variableName] = null;
+        }
+        return "${match[1]}\$consoleVariables.${variableName}";
+      });
 
-      expression = expression.replaceAllMapped(_SET_VARIABLE,
-          (match) {
-            var variableName = match[2];
-            // Only rewrite if the name matches an existing console variable.
-            if (_consoleTempVariables._data.containsKey(variableName)) {
-              return "${match[1]}\$consoleVariables.${variableName}${match[3]}";
-            } else {
-              return match[0];
-            }
-          });
+      expression = expression.replaceAllMapped(_SET_VARIABLE, (match) {
+        var variableName = match[2];
+        // Only rewrite if the name matches an existing console variable.
+        if (_consoleTempVariables._data.containsKey(variableName)) {
+          return "${match[1]}\$consoleVariables.${variableName}${match[3]}";
+        } else {
+          return match[0];
+        }
+      });
 
       // We only allow dart expressions not Dart statements. Silently remove
       // trailing semicolons the user might have added by accident to reduce the
@@ -47976,8 +48439,8 @@
     }
 
     if (locals != null) {
-      for (int i = 0; i < locals.length; i+= 2) {
-        addArg(locals[i], locals[i+1]);
+      for (int i = 0; i < locals.length; i += 2) {
+        addArg(locals[i], locals[i + 1]);
       }
     }
     // Inject all the already defined console variables.
@@ -47992,12 +48455,12 @@
     return [sb.toString(), args.values.toList(growable: false)];
   }
 
-  static String _getShortSymbolName(Symbol symbol,
-                                    DeclarationMirror declaration) {
+  static String _getShortSymbolName(
+      Symbol symbol, DeclarationMirror declaration) {
     var name = MirrorSystem.getName(symbol);
     if (declaration is MethodMirror) {
-      if (declaration.isSetter && name[name.length-1] == "=") {
-        return name.substring(0, name.length-1);
+      if (declaration.isSetter && name[name.length - 1] == "=") {
+        return name.substring(0, name.length - 1);
       }
       if (declaration.isConstructor) {
         return name.substring(name.indexOf('.') + 1);
@@ -48007,6 +48470,38 @@
   }
 
   /**
+   * Handle special console commands such as $lib and $libs that should not be
+   * evaluated as Dart expressions and instead should be interpreted directly.
+   * Commands supported:
+   * library <-- shows the current library and lists all libraries.
+   * library "library_uri" <-- select a specific library
+   * library "library_uri_fragment"
+   */
+  static bool maybeHandleSpecialConsoleCommand(String expression) {
+    expression = expression.trim();
+    var setLibraryCommand = r'library ';
+    if (expression == r'library') {
+      _LibraryManager.setLibrary();
+      return true;
+    }
+    if (expression.startsWith(setLibraryCommand)) {
+      expression = expression.substring(setLibraryCommand.length);
+      if (expression.length >= 2) {
+        String start = expression[0];
+        String end = expression[expression.length - 1];
+        // TODO(jacobr): maybe we should require quotes.
+        if ((start == "'" && end == "'") || (start == '"' && end == '"')) {
+          expression = expression.substring(1, expression.length - 1);
+        }
+      }
+
+      _LibraryManager.setLibrary(expression);
+      return true;
+    }
+    return false;
+  }
+
+  /**
    * Returns a list of completions to use if the receiver is o.
    */
   static List<String> getCompletions(o) {
@@ -48016,19 +48511,17 @@
       map.forEach((symbol, mirror) {
         if (mirror.isStatic == isStatic && !mirror.isPrivate) {
           var name = MirrorSystem.getName(symbol);
-          if (mirror is MethodMirror && mirror.isSetter)
-            name = name.substring(0, name.length - 1);
+          if (mirror is MethodMirror && mirror.isSetter) name =
+              name.substring(0, name.length - 1);
           completions.add(name);
         }
       });
     }
 
     addForClass(ClassMirror mirror, bool isStatic) {
-      if (mirror == null)
-        return;
+      if (mirror == null) return;
       addAll(mirror.declarations, isStatic);
-      if (mirror.superclass != null)
-        addForClass(mirror.superclass, isStatic);
+      if (mirror.superclass != null) addForClass(mirror.superclass, isStatic);
       for (var interface in mirror.superinterfaces) {
         addForClass(interface, isStatic);
       }
@@ -48046,8 +48539,8 @@
    * Adds all candidate String completitions from [declarations] to [output]
    * filtering based on [staticContext] and [includePrivate].
    */
-  static void _getCompletionsHelper(ClassMirror classMirror,
-      bool staticContext, LibraryMirror libraryMirror, Set<String> output) {
+  static void _getCompletionsHelper(ClassMirror classMirror, bool staticContext,
+      LibraryMirror libraryMirror, Set<String> output) {
     bool includePrivate = libraryMirror == classMirror.owner;
     classMirror.declarations.forEach((symbol, declaration) {
       if (!includePrivate && declaration.isPrivate) return;
@@ -48070,12 +48563,11 @@
 
     if (!staticContext) {
       for (var interface in classMirror.superinterfaces) {
-        _getCompletionsHelper(interface, staticContext,
-            libraryMirror, output);
+        _getCompletionsHelper(interface, staticContext, libraryMirror, output);
       }
       if (classMirror.superclass != null) {
-        _getCompletionsHelper(classMirror.superclass, staticContext,
-            libraryMirror, output);
+        _getCompletionsHelper(
+            classMirror.superclass, staticContext, libraryMirror, output);
       }
     }
   }
@@ -48142,13 +48634,13 @@
   }
 
   static final SIDE_EFFECT_FREE_LIBRARIES = new Set<String>()
-      ..add('dart:html')
-      ..add('dart:indexed_db')
-      ..add('dart:svg')
-      ..add('dart:typed_data')
-      ..add('dart:web_audio')
-      ..add('dart:web_gl')
-      ..add('dart:web_sql');
+    ..add('dart:html')
+    ..add('dart:indexed_db')
+    ..add('dart:svg')
+    ..add('dart:typed_data')
+    ..add('dart:web_audio')
+    ..add('dart:web_gl')
+    ..add('dart:web_sql');
 
   static LibraryMirror _getLibrary(MethodMirror methodMirror) {
     var owner = methodMirror.owner;
@@ -48167,8 +48659,8 @@
    * In the future we should consider adding an annotation to tag getters
    * in user libraries as side effect free.
    */
-  static bool _isSideEffectFreeGetter(MethodMirror methodMirror,
-      LibraryMirror libraryMirror) {
+  static bool _isSideEffectFreeGetter(
+      MethodMirror methodMirror, LibraryMirror libraryMirror) {
     // This matches JavaScript behavior. We should consider displaying
     // getters for all dart platform libraries rather than just the DOM
     // libraries.
@@ -48180,11 +48672,11 @@
    * Whether we should treat a property as a field for the purposes of the
    * debugger.
    */
-  static bool treatPropertyAsField(MethodMirror methodMirror,
-      LibraryMirror libraryMirror) {
+  static bool treatPropertyAsField(
+      MethodMirror methodMirror, LibraryMirror libraryMirror) {
     return (methodMirror.isGetter || methodMirror.isSetter) &&
-          (methodMirror.isSynthetic ||
-              _isSideEffectFreeGetter(methodMirror,libraryMirror));
+        (methodMirror.isSynthetic ||
+            _isSideEffectFreeGetter(methodMirror, libraryMirror));
   }
 
   // TODO(jacobr): generate more concise function descriptions instead of
@@ -48201,27 +48693,36 @@
 
   static List getInvocationTrampolineDetails(_Trampoline method) {
     var loc = method._methodMirror.location;
-    return [loc.line, loc.column, loc.sourceUri.toString(),
-        MirrorSystem.getName(method._selector)];
+    return [
+      loc.line,
+      loc.column,
+      loc.sourceUri.toString(),
+      MirrorSystem.getName(method._selector)
+    ];
   }
 
-  static List getLibraryProperties(String libraryUrl, bool ownProperties,
-      bool accessorPropertiesOnly) {
+  static List getLibraryProperties(
+      String libraryUrl, bool ownProperties, bool accessorPropertiesOnly) {
     var properties = new Map<String, _Property>();
     var libraryMirror = getLibraryMirror(libraryUrl);
-    _addInstanceMirrors(libraryMirror, libraryMirror,
+    _addInstanceMirrors(
+        libraryMirror,
+        libraryMirror,
         libraryMirror.declarations,
-        ownProperties, accessorPropertiesOnly, false, false,
+        ownProperties,
+        accessorPropertiesOnly,
+        false,
+        false,
         properties);
     if (!accessorPropertiesOnly) {
       // We need to add class properties for all classes in the library.
       libraryMirror.declarations.forEach((symbol, declarationMirror) {
         if (declarationMirror is ClassMirror) {
           var name = MirrorSystem.getName(symbol);
-          if (declarationMirror.hasReflectedType
-              && !properties.containsKey(name)) {
+          if (declarationMirror.hasReflectedType &&
+              !properties.containsKey(name)) {
             properties[name] = new _Property(name)
-                ..value = declarationMirror.reflectedType;
+              ..value = declarationMirror.reflectedType;
           }
         }
       });
@@ -48229,34 +48730,44 @@
     return packageProperties(properties);
   }
 
-  static List getObjectProperties(o, bool ownProperties,
-      bool accessorPropertiesOnly) {
+  static List getObjectProperties(
+      o, bool ownProperties, bool accessorPropertiesOnly) {
     var properties = new Map<String, _Property>();
     var names = new Set<String>();
     var objectMirror = reflect(o);
     var classMirror = objectMirror.type;
-    _addInstanceMirrors(objectMirror, classMirror.owner,
+    _addInstanceMirrors(
+        objectMirror,
+        classMirror.owner,
         classMirror.instanceMembers,
-        ownProperties, accessorPropertiesOnly, false, true,
+        ownProperties,
+        accessorPropertiesOnly,
+        false,
+        true,
         properties);
     return packageProperties(properties);
   }
 
-  static List getObjectClassProperties(o, bool ownProperties,
-      bool accessorPropertiesOnly) {
+  static List getObjectClassProperties(
+      o, bool ownProperties, bool accessorPropertiesOnly) {
     var properties = new Map<String, _Property>();
     var objectMirror = reflect(o);
     var classMirror = objectMirror.type;
-    _addInstanceMirrors(objectMirror, classMirror.owner,
+    _addInstanceMirrors(
+        objectMirror,
+        classMirror.owner,
         classMirror.instanceMembers,
-        ownProperties, accessorPropertiesOnly, true, false,
+        ownProperties,
+        accessorPropertiesOnly,
+        true,
+        false,
         properties);
     _addStatics(classMirror, properties, accessorPropertiesOnly);
     return packageProperties(properties);
   }
 
-  static List getClassProperties(Type t, bool ownProperties,
-      bool accessorPropertiesOnly) {
+  static List getClassProperties(
+      Type t, bool ownProperties, bool accessorPropertiesOnly) {
     var properties = new Map<String, _Property>();
     var classMirror = reflectClass(t);
     _addStatics(classMirror, properties, accessorPropertiesOnly);
@@ -48264,8 +48775,7 @@
   }
 
   static void _addStatics(ClassMirror classMirror,
-                          Map<String, _Property> properties,
-                          bool accessorPropertiesOnly) {
+      Map<String, _Property> properties, bool accessorPropertiesOnly) {
     var libraryMirror = classMirror.owner;
     classMirror.declarations.forEach((symbol, declaration) {
       var name = _getShortSymbolName(symbol, declaration);
@@ -48274,8 +48784,8 @@
         if (accessorPropertiesOnly) return;
         if (!declaration.isStatic) return;
         properties.putIfAbsent(name, () => new _Property(name))
-            ..value = classMirror.getField(symbol).reflectee
-            ..writable = !declaration.isFinal && !declaration.isConst;
+          ..value = classMirror.getField(symbol).reflectee
+          ..writable = !declaration.isFinal && !declaration.isConst;
       } else if (declaration is MethodMirror) {
         MethodMirror methodMirror = declaration;
         // FIXMEDART: should we display constructors?
@@ -48297,31 +48807,35 @@
     });
   }
 
-  static void _fillMethodMirrorProperty(LibraryMirror libraryMirror,
-        methodOwner, MethodMirror methodMirror, Symbol symbol,
-        bool accessorPropertiesOnly, _Property property) {
+  static void _fillMethodMirrorProperty(
+      LibraryMirror libraryMirror,
+      methodOwner,
+      MethodMirror methodMirror,
+      Symbol symbol,
+      bool accessorPropertiesOnly,
+      _Property property) {
     if (methodMirror.isRegularMethod) {
       property
-          ..value = new _MethodTrampoline(methodOwner, methodMirror, symbol)
-          ..isMethod = true;
+        ..value = new _MethodTrampoline(methodOwner, methodMirror, symbol)
+        ..isMethod = true;
     } else if (methodMirror.isGetter) {
       if (treatPropertyAsField(methodMirror, libraryMirror)) {
         try {
           property.value = methodOwner.getField(symbol).reflectee;
         } catch (e) {
           property
-              ..wasThrown = true
-              ..value = e;
+            ..wasThrown = true
+            ..value = e;
         }
       } else if (accessorPropertiesOnly) {
-        property.getter = new _GetterTrampoline(methodOwner,
-            methodMirror, symbol);
+        property.getter =
+            new _GetterTrampoline(methodOwner, methodMirror, symbol);
       }
     } else if (methodMirror.isSetter) {
       if (accessorPropertiesOnly &&
           !treatPropertyAsField(methodMirror, libraryMirror)) {
-        property.setter = new _SetterTrampoline(methodOwner,
-            methodMirror, MirrorSystem.getSymbol(property.name, libraryMirror));
+        property.setter = new _SetterTrampoline(methodOwner, methodMirror,
+            MirrorSystem.getSymbol(property.name, libraryMirror));
       }
       property.writable = true;
     }
@@ -48341,8 +48855,10 @@
       ObjectMirror objectMirror,
       LibraryMirror libraryMirror,
       Map<Symbol, Mirror> declarations,
-      bool ownProperties, bool accessorPropertiesOnly,
-      bool hideFields, bool hideMethods,
+      bool ownProperties,
+      bool accessorPropertiesOnly,
+      bool hideFields,
+      bool hideMethods,
       Map<String, _Property> properties) {
     declarations.forEach((symbol, declaration) {
       if (declaration is TypedefMirror || declaration is ClassMirror) return;
@@ -48353,7 +48869,8 @@
               treatPropertyAsField(declaration, libraryMirror));
       if ((isField && hideFields) || (hideMethods && !isField)) return;
       if (accessorPropertiesOnly) {
-        if (declaration is VariableMirror || declaration.isRegularMethod ||
+        if (declaration is VariableMirror ||
+            declaration.isRegularMethod ||
             isField) {
           return;
         }
@@ -48365,8 +48882,8 @@
       var property = properties.putIfAbsent(name, () => new _Property(name));
       if (declaration is VariableMirror) {
         property
-            ..value = objectMirror.getField(symbol).reflectee
-            ..writable = !declaration.isFinal && !declaration.isConst;
+          ..value = objectMirror.getField(symbol).reflectee
+          ..writable = !declaration.isFinal && !declaration.isConst;
         return;
       }
       _fillMethodMirrorProperty(libraryMirror, objectMirror, declaration,
@@ -48381,15 +48898,17 @@
   static List packageProperties(Map<String, _Property> properties) {
     var ret = [];
     for (var property in properties.values) {
-      ret.addAll([property.name,
-                  property.setter,
-                  property.getter,
-                  property.value,
-                  property.hasValue,
-                  property.writable,
-                  property.isMethod,
-                  property.isOwn,
-                  property.wasThrown]);
+      ret.addAll([
+        property.name,
+        property.setter,
+        property.getter,
+        property.value,
+        property.hasValue,
+        property.writable,
+        property.isMethod,
+        property.isOwn,
+        property.wasThrown
+      ]);
     }
     return ret;
   }
@@ -48408,9 +48927,10 @@
         LibraryMirror library = classMirror.owner;
         if (!attemptedLibraries.contains(library)) {
           try {
-            return objectMirror.getField(
-                MirrorSystem.getSymbol(propertyName, library)).reflectee;
-          } catch (e) { }
+            return objectMirror
+                .getField(MirrorSystem.getSymbol(propertyName, library))
+                .reflectee;
+          } catch (e) {}
           attemptedLibraries.add(library);
         }
         classMirror = classMirror.superclass;
@@ -48418,8 +48938,9 @@
       return null;
     }
     try {
-      return objectMirror.getField(
-          MirrorSystem.getSymbol(propertyName)).reflectee;
+      return objectMirror
+          .getField(MirrorSystem.getSymbol(propertyName))
+          .reflectee;
     } catch (e) {
       return null;
     }
@@ -48431,24 +48952,25 @@
    */
   static List consoleApi(host) {
     return [
-        "inspect",
-        (o) {
-          return host.callMethod("_inspect", [unwrap_jso(o)]);
-        },
-        "dir",
-        window().console.dir,
-        "dirxml",
-        window().console.dirxml
-        // FIXME: add copy method.
-        ];
+      "inspect",
+      (o) {
+        js.JsNative.callMethod(host, "_inspect", [o]);
+        return o;
+      },
+      "dir",
+      window.console.dir,
+      "dirxml",
+      window.console.dirxml
+      // FIXME: add copy method.
+    ];
   }
 
   static List getMapKeyList(Map map) => map.keys.toList();
 
   static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError;
 
-  static void register(Document document, String tag, Type type,
-      String extendsTagName) {
+  static void register(
+      Document document, String tag, Type type, String extendsTagName) {
     var nativeClass = _validateCustomType(type);
 
     if (extendsTagName == null) {
@@ -48462,73 +48984,90 @@
   }
 
   static void _register(Document document, String tag, Type customType,
-    String extendsTagName) => _blink.Blink_Utils.register(unwrap_jso(document), tag, customType, extendsTagName);
+          String extendsTagName) =>
+      _blink.Blink_Utils.register(document, tag, customType, extendsTagName);
 
   static Element createElement(Document document, String tagName) =>
-    wrap_jso(_blink.Blink_Utils.createElement(unwrap_jso(document), tagName));
-
-  static Element changeElementWrapper(HtmlElement element, Type type) =>
-    _blink.Blink_Utils.changeElementWrapper(unwrap_jso(element), type);
+      _blink.Blink_Utils.createElement(document, tagName);
 }
 
-class _DOMWindowCrossFrame extends DartHtmlDomObject implements
-    WindowBase {
-  /** Needed because KeyboardEvent is implements.
-   *  TODO(terry): Consider making blink_jsObject private (add underscore) for
-   *               all blink_jsObject.  Then needed private wrap/unwrap_jso
-   *               functions that delegate to a public wrap/unwrap_jso.
-   */
-  js.JsObject blink_jsObject;
-
+class _DOMWindowCrossFrame extends DartHtmlDomObject implements WindowBase {
   _DOMWindowCrossFrame.internal();
 
+  static _createSafe(win) {
+    if (identical(win, window)) {
+      // The current Window object is the only window object that should not
+      // use _DOMWindowCrossFrame.
+      return window;
+    }
+    return win is _DOMWindowCrossFrame ? win : _blink.Blink_Utils.setInstanceInterceptor(win, _DOMWindowCrossFrame);
+  }
+
   // Fields.
-  HistoryBase get history => _blink.Blink_DOMWindowCrossFrame.get_history(this);
-  LocationBase get location => _blink.Blink_DOMWindowCrossFrame.get_location(this);
-  bool get closed => _blink.Blink_DOMWindowCrossFrame.get_closed(this);
-  WindowBase get opener => _blink.Blink_DOMWindowCrossFrame.get_opener(this);
-  WindowBase get parent => _blink.Blink_DOMWindowCrossFrame.get_parent(this);
-  WindowBase get top => _blink.Blink_DOMWindowCrossFrame.get_top(this);
+  HistoryBase get history {
+    var history =  _blink.BlinkWindow.instance.history_Getter_(this);
+    return history is _HistoryCrossFrame ? history : _blink.Blink_Utils.setInstanceInterceptor(history, _HistoryCrossFrame);
+  }
+
+  LocationBase get location {
+    var location = _blink.BlinkWindow.instance.location_Getter_(this);
+    return location is _LocationCrossFrame ? location : _blink.Blink_Utils.setInstanceInterceptor(location, _LocationCrossFrame);
+  }
+
+  bool get closed => _blink.BlinkWindow.instance.closed_Getter_(this);
+  WindowBase get opener => _convertNativeToDart_Window(_blink.BlinkWindow.instance.opener_Getter_(this));
+  WindowBase get parent => _convertNativeToDart_Window(_blink.BlinkWindow.instance.parent_Getter_(this));
+  WindowBase get top => _convertNativeToDart_Window(_blink.BlinkWindow.instance.top_Getter_(this));
 
   // Methods.
-  void close() => _blink.Blink_DOMWindowCrossFrame.close(this);
-  void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) =>
-    _blink.Blink_DOMWindowCrossFrame.postMessage(this, message, targetOrigin, messagePorts);
+  void close() => _blink.BlinkWindow.instance.close_Callback_0_(this);
+  void postMessage(Object message, String targetOrigin, [List<MessagePort> transfer]) => _blink.BlinkWindow.instance.postMessage_Callback_3_(this, convertDartToNative_SerializedScriptValue(message), targetOrigin, transfer);
 
   // Implementation support.
   String get typeName => "Window";
 
   // TODO(efortuna): Remove this method. dartbug.com/16814
   Events get on => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+      'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
-  void _addEventListener([String type, EventListener listener, bool useCapture])
-      => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+  void _addEventListener(
+          [String type, EventListener listener, bool useCapture]) =>
+      throw new UnsupportedError(
+          'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
-  void addEventListener(String type, EventListener listener, [bool useCapture])
-      => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+  void addEventListener(String type, EventListener listener,
+          [bool useCapture]) =>
+      throw new UnsupportedError(
+          'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
   bool dispatchEvent(Event event) => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+      'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
-  void _removeEventListener([String type, EventListener listener,
-      bool useCapture]) => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+  void _removeEventListener(
+          [String type, EventListener listener, bool useCapture]) =>
+      throw new UnsupportedError(
+          'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
   void removeEventListener(String type, EventListener listener,
-      [bool useCapture]) => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+          [bool useCapture]) =>
+      throw new UnsupportedError(
+          'You can only attach EventListeners to your own window.');
 }
 
 class _HistoryCrossFrame extends DartHtmlDomObject implements HistoryBase {
   _HistoryCrossFrame.internal();
 
   // Methods.
-  void back() => _blink.Blink_HistoryCrossFrame.back(this);
-  void forward() => _blink.Blink_HistoryCrossFrame.forward(this);
-  void go(int distance) => _blink.Blink_HistoryCrossFrame.go(this, distance);
+  void back() => _blink.BlinkHistory.instance.back_Callback_0_(this);
+  void forward() => _blink.BlinkHistory.instance.forward_Callback_0_(this);
+  void go([int delta]) {
+    if (delta != null) {
+      _blink.BlinkHistory.instance.go_Callback_1_(this, delta);
+      return;
+    }
+    _blink.BlinkHistory.instance.go_Callback_0_(this);
+    return;
+  }
 
   // Implementation support.
   String get typeName => "History";
@@ -48538,33 +49077,12 @@
   _LocationCrossFrame.internal();
 
   // Fields.
-  set href(String h) => _blink.Blink_LocationCrossFrame.set_href(this, h);
+  set href(String value) => _blink.BlinkLocation.instance.href_Setter_(this, value);
 
   // Implementation support.
   String get typeName => "Location";
 }
 
-class _DOMStringMap extends DartHtmlDomObject implements Map<String, String> {
-  _DOMStringMap.internal();
-
-  bool containsValue(String value) => Maps.containsValue(this, value);
-  bool containsKey(String key) => _blink.Blink_DOMStringMap.containsKey(this, key);
-  String operator [](String key) => _blink.Blink_DOMStringMap.item(this, key);
-  void operator []=(String key, String value) => _blink.Blink_DOMStringMap.setItem(this, key, value);
-  String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, key, ifAbsent);
-  String remove(String key) => _blink.Blink_DOMStringMap.remove(this, key);
-  void clear() => Maps.clear(this);
-  void forEach(void f(String key, String value)) => Maps.forEach(this, f);
-  Iterable<String> get keys => _blink.Blink_DOMStringMap.get_keys(this);
-  Iterable<String> get values => Maps.getValues(this);
-  int get length => Maps.length(this);
-  bool get isEmpty => Maps.isEmpty(this);
-  bool get isNotEmpty => Maps.isNotEmpty(this);
-  void addAll(Map<String, String> other) {
-    other.forEach((key, value) => this[key] = value);
-  }
-}
-
 // TODO(vsm): Remove DOM isolate code once we have Dartium isolates
 // as workers.  This is only used to support
 // printing and timers in background isolates. As workers they should
@@ -48582,8 +49100,9 @@
   return completer.future;
 }
 
-Future<SendPort> _spawnDomHelper(Function f) =>
-    _makeSendPortFuture((portId) { _Utils.spawnDomHelper(f, portId); });
+Future<SendPort> _spawnDomHelper(Function f) => _makeSendPortFuture((portId) {
+      _Utils.spawnDomHelper(f, portId);
+    });
 
 final Future<SendPort> __HELPER_ISOLATE_PORT =
     _spawnDomHelper(_helperIsolateMain);
@@ -48625,10 +49144,15 @@
     if (cmd == _NEW_TIMER) {
       final duration = new Duration(milliseconds: msg[1]);
       bool periodic = msg[2];
-      ping() { replyTo.send(_TIMER_PING); };
-      _TIMER_REGISTRY[replyTo] = periodic ?
-          new Timer.periodic(duration, (_) { ping(); }) :
-          new Timer(duration, ping);
+      ping() {
+        replyTo.send(_TIMER_PING);
+      }
+      ;
+      _TIMER_REGISTRY[replyTo] = periodic
+          ? new Timer.periodic(duration, (_) {
+              ping();
+            })
+          : new Timer(duration, ping);
     } else if (cmd == _CANCEL_TIMER) {
       _TIMER_REGISTRY.remove(replyTo).cancel();
     } else if (cmd == _PRINT) {
@@ -48641,7 +49165,7 @@
 
 final _printClosure = (s) => window.console.log(s);
 final _pureIsolatePrintClosure = (s) {
-    _sendToHelperIsolate([_PRINT, s], null);
+  _sendToHelperIsolate([_PRINT, s], null);
 };
 
 final _forwardingPrintClosure = _Utils.forwardingPrint;
@@ -48650,7 +49174,7 @@
 
 final _pureIsolateUriBaseClosure = () {
   throw new UnimplementedError("Uri.base on a background isolate "
-                               "is not supported in the browser");
+      "is not supported in the browser");
 };
 
 class _Timer implements Timer {
@@ -48661,13 +49185,17 @@
   _Timer(int milliSeconds, void callback(Timer timer), bool repeating) {
     if (repeating) {
       _state = (window._setInterval(() {
-        callback(this);
-      }, milliSeconds) << 1) | _STATE_INTERVAL;
+                callback(this);
+              }, milliSeconds) <<
+              1) |
+          _STATE_INTERVAL;
     } else {
       _state = (window._setTimeout(() {
-        _state = null;
-        callback(this);
-      }, milliSeconds) << 1) | _STATE_TIMEOUT;
+                _state = null;
+                callback(this);
+              }, milliSeconds) <<
+              1) |
+          _STATE_TIMEOUT;
     }
   }
 
@@ -48687,8 +49215,8 @@
 
 get _timerFactoryClosure =>
     (int milliSeconds, void callback(Timer timer), bool repeating) {
-  return new _Timer(milliSeconds, callback, repeating);
-};
+      return new _Timer(milliSeconds, callback, repeating);
+    };
 
 class _PureIsolateTimer implements Timer {
   bool _isActive = true;
@@ -48728,7 +49256,7 @@
 
 get _pureIsolateTimerFactoryClosure =>
     ((int milliSeconds, void callback(Timer time), bool repeating) =>
-  new _PureIsolateTimer(milliSeconds, callback, repeating));
+        new _PureIsolateTimer(milliSeconds, callback, repeating));
 
 class _ScheduleImmediateHelper {
   MutationObserver _observer;
@@ -48767,13 +49295,12 @@
     new _ScheduleImmediateHelper();
 
 get _scheduleImmediateClosure => (void callback()) {
-  _scheduleImmediateHelper._schedule(callback);
-};
+      _scheduleImmediateHelper._schedule(callback);
+    };
 
 get _pureIsolateScheduleImmediateClosure => ((void callback()) =>
-  throw new UnimplementedError("scheduleMicrotask in background isolates "
-                               "are not supported in the browser"));
+    throw new UnimplementedError("scheduleMicrotask in background isolates "
+        "are not supported in the browser"));
 
 // Class for unsupported native browser 'DOM' objects.
-class _UnsupportedBrowserObject extends DartHtmlDomObject {
-}
+class _UnsupportedBrowserObject extends DartHtmlDomObject {}
diff --git a/sdk/lib/html/html_common/conversions_dart2js.dart b/sdk/lib/html/html_common/conversions_dart2js.dart
index b7f3d7c..b5a1064 100644
--- a/sdk/lib/html/html_common/conversions_dart2js.dart
+++ b/sdk/lib/html/html_common/conversions_dart2js.dart
@@ -91,9 +91,3 @@
   var newPromise = JS('', '#.then(#)["catch"](#)', promise, then, error);
   return completer.future;
 }
-
-/// Wrap a JS object with an instance of the matching dart:html class. Used only in Dartium.
-wrap_jso(jsObject) => jsObject;
-
-/// Find the underlying JS object for a dart:html Dart object.
-unwrap_jso(dartClass_instance) => dartClass_instance;
diff --git a/sdk/lib/html/html_common/conversions_dartium.dart b/sdk/lib/html/html_common/conversions_dartium.dart
index 90fe55d..ce45920 100644
--- a/sdk/lib/html/html_common/conversions_dartium.dart
+++ b/sdk/lib/html/html_common/conversions_dartium.dart
@@ -7,74 +7,155 @@
     new _AcceptStructuredCloneDartium().convertNativeToDart_AcceptStructuredClone(object, mustCopy: mustCopy);
 
 class _StructuredCloneDartium extends _StructuredClone {
-  newJsMap() => new js.JsObject(js.context["Object"]);
-  putIntoMap(map, key, value) => map[key] = value;
-  // TODO(alanknight): Don't create two extra lists to get a fixed-length JS list.
-  newJsList(length) => new js.JsArray.from(new List(length));
-  cloneNotRequired(e) => e is js.JsObject;
+  newJsMap() => js.JsNative.newObject();
+  putIntoMap(map, key, value) => js.JsNative.setProperty(map, key, value);
+  newJsList(length) => js.JsNative.newArray()..length = length;
+  cloneNotRequired(e) =>
+      e is js.JSObject || e is TypedData || e is ByteBuffer;
 }
 
-class _AcceptStructuredCloneDartium extends _AcceptStructuredClone {
+/// A version of _AcceptStructuredClone, but using a different algorithm
+/// so we can take advantage of an identity HashMap on Dartium without
+/// the bad side-effect of modifying the JS source objects if we do the same in
+/// dart2js.
+///
+/// This no longer inherits anything from _AcceptStructuredClone
+/// and is never used polymorphically with it, so it doesn't inherit.
+class _AcceptStructuredCloneDartium {
   newDartList(length) => new List(length);
 
-  // JsObjects won't be identical, but will be equal only if the underlying
-  // Js entities are identical.
-  bool identicalInJs(a, b) =>
-      (a is js.JsObject) ? a == b : identical(a, b);
+  // As long as we stick to JSObject instead of intermingling legacy JsObject,
+  // we can simply use identical.
+  bool identicalInJs(a, b) => identical(a, b);
 
   void forEachJsField(jsObject, action) {
-    var keys = js.context["Object"].callMethod("keys", [jsObject]);
+    var keys = js.JsNative.callMethod(_object, "keys", [jsObject]);
     for (var key in keys) {
-      action(key, jsObject[key]);
+      action(key, js.JsNative.getProperty(jsObject, key));
     }
   }
+
+  // Keep track of the clones, keyed by the original object. If we're
+  // not copying, these may be the same.
+  var clones = new HashMap.identity();
+  bool mustCopy = false;
+
+  Object findSlot(value) {
+    return clones.putIfAbsent(value, () => null);
+  }
+
+  writeSlot(original, x) { clones[original] = x; }
+
+  walk(e) {
+    if (e == null) return e;
+    if (e is bool) return e;
+    if (e is num) return e;
+    if (e is String) return e;
+    if (e is DateTime) return e;
+
+    if (isJavaScriptRegExp(e)) {
+      // TODO(sra).
+      throw new UnimplementedError('structured clone of RegExp');
+    }
+
+    if (isJavaScriptPromise(e)) {
+      return convertNativePromiseToDartFuture(e);
+    }
+
+    if (isJavaScriptSimpleObject(e)) {
+      // TODO(sra): If mustCopy is false, swizzle the prototype for one of a Map
+      // implementation that uses the properies as storage.
+      var copy = findSlot(e);
+      if (copy != null) return copy;
+      copy = {};
+
+      writeSlot(e, copy);
+      forEachJsField(e, (key, value) => copy[key] = walk(value));
+      return copy;
+    }
+
+    if (isJavaScriptArray(e)) {
+      var copy = findSlot(e);
+      if (copy != null) return copy;
+
+      int length = e.length;
+      // Since a JavaScript Array is an instance of Dart List, we can modify it
+      // in-place unless we must copy.
+      copy = mustCopy ? newDartList(length) : e;
+      writeSlot(e, copy);
+
+      for (int i = 0; i < length; i++) {
+        copy[i] = walk(e[i]);
+      }
+      return copy;
+    }
+
+    // Assume anything else is already a valid Dart object, either by having
+    // already been processed, or e.g. a clonable native class.
+    return e;
+  }
+
+  convertNativeToDart_AcceptStructuredClone(object, {mustCopy: false}) {
+    this.mustCopy = mustCopy;
+    var copy = walk(object);
+    return copy;
+  }
 }
 
-final _dateConstructor = js.context["Date"];
-final _regexConstructor = js.context["RegExp"];
+final _dateConstructor = js.JsNative.getProperty(window, "Date");
+final _regexConstructor = js.JsNative.getProperty(window, "RegExp");
 
-bool isJavaScriptDate(value) => value is js.JsObject && value.instanceof(_dateConstructor);
-bool isJavaScriptRegExp(value) => value is js.JsObject && value.instanceof(_regexConstructor);
-bool isJavaScriptArray(value) => value is js.JsArray;
+bool isJavaScriptDate(value) => value is js.JSObject && js.JsNative.instanceof(value, _dateConstructor);
+bool isJavaScriptRegExp(value) => value is js.JSObject && js.JsNative.instanceof(value, _regexConstructor);
+bool isJavaScriptArray(value) => value is js.JSArray;
 
-final _object = js.context["Object"];
-final _getPrototypeOf = _object["getPrototypeOf"];
+final _object = js.JsNative.getProperty(window, "Object");
+final _getPrototypeOf = js.JsNative.getProperty(_object, "getPrototypeOf");
 _getProto(object) {
-  return _getPrototypeOf.apply([object]);
+  return _getPrototypeOf(object);
 }
-final _objectProto = js.context["Object"]["prototype"];
+final _objectProto = js.JsNative.getProperty(_object, "prototype");
 
 bool isJavaScriptSimpleObject(value) {
-  if (value is! js.JsObject) return false;
+  if (value is! js.JSObject) return false;
   var proto = _getProto(value);
   return proto == _objectProto || proto == null;
 }
+
+// TODO(jacobr): this makes little sense unless we are doing something
+// ambitious to make Dartium and Dart2Js interop well with each other.
 bool isImmutableJavaScriptArray(value) =>
-    isJavaScriptArray(value) && value["immutable$list"] != null;
+    isJavaScriptArray(value) && js.JsNative.getProperty(value, "immutable$list") != null;
 
-final _promiseConstructor = js.context['Promise'];
-bool isJavaScriptPromise(value) => value is js.JsObject && value['constructor'] == _promiseConstructor;
+final _promiseConstructor = js.JsNative.getProperty(window, 'Promise');
+bool isJavaScriptPromise(value) => value is js.JSObject && identical(js.JsNative.getProperty(value, 'constructor'), _promiseConstructor);
 
-Future convertNativePromiseToDartFuture(js.JsObject promise) {
+Future convertNativePromiseToDartFuture(js.JSObject promise) {
   var completer = new Completer();
-  var newPromise = promise
-    .callMethod("then", [(result) => completer.complete(result)])
-    .callMethod("catch", [(result) => completer.completeError(result)]);
+  var newPromise = js.JsNative.callMethod(js.JsNative.callMethod(promise,
+    "then", [js.allowInterop((result) => completer.complete(result))]),
+    "catch", [js.allowInterop((result) => completer.completeError(result))]);
   return completer.future;
 }
 
 convertDartToNative_DateTime(DateTime date) {
-  return new js.JsObject(js.context["Date"], [date.millisecondsSinceEpoch]);
+  return date;
 }
 
 /// Creates a Dart Rectangle from a Javascript object with properties
-/// left, top, width and height. Used internally in Dartium.
-Rectangle make_dart_rectangle(r) =>
-    r == null ? null : new Rectangle(
-    js.JsNative.getProperty(r, 'left'),
-    js.JsNative.getProperty(r, 'top'),
-    js.JsNative.getProperty(r, 'width'),
-    js.JsNative.getProperty(r, 'height'));
+/// left, top, width and height or a 4 element array of integers. Used internally in Dartium.
+Rectangle make_dart_rectangle(r) {
+  if (r == null) return null;
+  if (r is List) {
+    return new Rectangle(r[0], r[1], r[2], r[3]);
+  }
+
+  return new Rectangle(
+      js.JsNative.getProperty(r, 'left'),
+      js.JsNative.getProperty(r, 'top'),
+      js.JsNative.getProperty(r, 'width'),
+      js.JsNative.getProperty(r, 'height'));
+}
 
 // Converts a flat Dart map into a JavaScript object with properties this is
 // is the Dartium only version it uses dart:js.
@@ -82,16 +163,16 @@
 // code in html_common and be more general.
 convertDartToNative_Dictionary(Map dict) {
   if (dict == null) return null;
-  var jsObject = new js.JsObject(js.JsNative.getProperty(js.context, 'Object'));
+  var jsObject = js.JsNative.newObject();
   dict.forEach((String key, value) {
     if (value is List) {
-      var jsArray = new js.JsArray();
+      var jsArray = js.JsNative.newArray();
       value.forEach((elem) {
         jsArray.add(elem is Map ? convertDartToNative_Dictionary(elem): elem);
       });
-      jsObject[key] = jsArray;
+      js.JsNative.setProperty(jsObject, key, jsArray);
     } else {
-      jsObject[key] = value;
+      js.JsNative.setProperty(jsObject, key, value);
     }
   });
   return jsObject;
@@ -120,7 +201,15 @@
 
 // Helper function to wrapped a returned dictionary from blink to a Dart looking
 // class.
-convertNativeDictionaryToDartDictionary(Map values) => new _ReturnedDictionary(values);
+convertNativeDictionaryToDartDictionary(values) {
+  if (values is! Map) {
+    // TODO(jacobr): wish wwe didn't have to do this.
+    values = convertNativeToDart_SerializedScriptValue(values);
+  }
+  return values != null ? new _ReturnedDictionary(values) : null;
+}
+
+convertNativeToDart_Dictionary(values) => convertNativeToDart_SerializedScriptValue(values);
 
 // Conversion function place holder (currently not used in dart2js or dartium).
 List convertDartToNative_StringArray(List<String> input) => input;
@@ -128,284 +217,65 @@
 // Converts a Dart list into a JsArray. For the Dartium version only.
 convertDartToNative_List(List input) => new js.JsArray()..addAll(input);
 
-/// Find the underlying JS object for a dart:html Dart object.
-unwrap_jso(dartClass_instance) => js.unwrap_jso(dartClass_instance);
-
-// Flag to disable JS interop asserts.  Setting to false will speed up the
-// wrap_jso calls.
-bool interop_checks = false;
-
-/// Wrap a JS object with an instance of the matching dart:html class. Used only in Dartium.
-wrap_jso(jsObject) {
+// Incredibly slow implementation to lookup the runtime type for an object.
+// Fortunately, performance doesn't matter much as the results are cached
+// as long as the object being looked up has a valid prototype.
+// TODO(jacobr): we should track the # of lookups to ensure that things aren't
+// going off the rails due to objects with null prototypes, etc.
+// Note: unlike all other methods in this class, here we intentionally use
+// the old JsObject types to bootstrap the new typed bindings.
+Type lookupType(js.JsObject jsObject, bool isElement) {
   try {
-    if (jsObject is! js.JsObject || jsObject == null) {
-      // JS Interop converted the object to a Dart class e.g., Uint8ClampedList.
-      // or it's a simple type.
-      return jsObject;
-    }
-
-    var wrapper = js.getDartHtmlWrapperFor(jsObject);
-    // if we have a wrapper return the Dart instance.
-    if (wrapper != null) {
-      return wrapper;
-    }
-
-    if (jsObject is js.JsArray) {
-      wrapper = new js.JSArray.create(jsObject);
-      js.setDartHtmlWrapperFor(jsObject, wrapper);
-      return wrapper;
-    }
-    if (jsObject is js.JsFunction) {
-      wrapper = new js.JSFunction.create(jsObject);
-      js.setDartHtmlWrapperFor(jsObject, wrapper);
-      return wrapper;
-    }
-
-    // Try the most general type conversions on it.
-    // TODO(alanknight): We may be able to do better. This maintains identity,
-    // which is useful, but expensive. And if we nest something that only
-    // this conversion handles, how does that work? e.g. a list of maps of elements.
-    var converted = convertNativeToDart_SerializedScriptValue(jsObject);
-    if (!identical(converted, jsObject)) {
-      return converted;
-    }
+  // TODO(jacobr): add static methods that return the runtime type of the patch
+  // class so that this code works as expected.
+  if (jsObject is js.JsArray) {
+    return js.JSArray.instanceRuntimeType;
+  }
+  if (jsObject is js.JsFunction) {
+    return js.JSFunction.instanceRuntimeType;
+  }
 
     var constructor = js.JsNative.getProperty(jsObject, 'constructor');
     if (constructor == null) {
       // Perfectly valid case for JavaScript objects where __proto__ has
       // intentionally been set to null.
-      js.setDartHtmlWrapperFor(jsObject, new js.JSObject.create(jsObject));
-      return jsObject;
+      // We should track and warn about this case as peformance will be poor.
+      return js.JSObject.instanceRuntimeType;
     }
     var jsTypeName = js.JsNative.getProperty(constructor, 'name');
     if (jsTypeName is! String || jsTypeName.length == 0) {
       // Not an html type.
-      wrapper = new js.JSObject.create(jsObject);
-      js.setDartHtmlWrapperFor(jsObject, wrapper);
-      return wrapper;
+      return js.JSObject.instanceRuntimeType;
     }
 
     var dartClass_instance;
     var customElementClass = null;
-    var extendsTag = "";
-    var custom = getCustomElementEntry(jsObject);
-    if (custom != null) {
-      customElementClass = custom['type'];
-      extendsTag = custom['extends'];
-    }
+    var extendsTag = "";    
 
-    // Only allow custom elements to be created in the html or svg default
-    // namespace.
-    var func;
-    var defaultNS = jsObject['namespaceURI'] == 'http://www.w3.org/1999/xhtml' ||
-        jsObject['namespaceURI'] ==  'http://www.w3.org/2000/svg';
-    if (customElementClass != null && extendsTag == "" && defaultNS) {
-      // The customElementClass is known but we can't create the real class so
-      // create the HtmlElement and it will get upgraded when registerElement's
-      // createdCallback is called.
-      func = getHtmlCreateFunction('HTMLElement');
-    } else {
-      func = getHtmlCreateFunction(jsTypeName);
-      if (func == null) {
-        // Start walking the prototype chain looking for a JS class.
-        var prototype = jsObject['__proto__'];
-        var keepWalking = true;
-        while (keepWalking && prototype.hasProperty('__proto__')) {
-          prototype = prototype['__proto__'];
-          if (prototype != null && prototype is Element &&
-              prototype.blink_jsObject != null) {
-            // We're a Dart class that's pointing to a JS class.
-            var blinkJso = prototype.blink_jsObject;
-            jsTypeName = blinkJso['constructor']['name'];
-            func = getHtmlCreateFunction(jsTypeName);
-            keepWalking = func == null;
-          }
-        }
+    Type type = getHtmlCreateType(jsTypeName);
+    if (type != null) return type;
+
+    // Start walking the prototype chain looking for a JS class.
+    var prototype = js.JsNative.getProperty(jsObject, '__proto__');
+    while (prototype != null) {
+      // We're a Dart class that's pointing to a JS class.
+      var constructor = js.JsNative.getProperty(prototype, 'constructor');
+      if (constructor != null) {          
+        jsTypeName = js.JsNative.getProperty(constructor, 'name');
+        type = getHtmlCreateType(jsTypeName);
+        if (type != null) return type;
       }
+      prototype = js.JsNative.getProperty(prototype, '__proto__');
     }
-
-    // Can we construct a Dart class?
-    if (func != null) {
-      dartClass_instance = func();
-
-      // Wrap our Dart instance in both directions.
-      dartClass_instance.blink_jsObject = jsObject;
-      js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
-    }
-
-    // TODO(jacobr): cache that this is not a dart:html JS class.
-    return dartClass_instance;
-  } catch (e, stacktrace) {
-    if (interop_checks) {
-      if (e is DebugAssertException) window.console
-          .log("${e.message}\n ${stacktrace}");
-      else window.console.log("${stacktrace}");
+  } catch (e) {
+    // This case can happen for cross frame objects.
+    if (js.JsNative.hasProperty(e, "postMessage")) {
+      // assume this is a Window. To match Dart2JS, separate conversion code
+      // in dart:html will switch the wrapper to a cross frame window as
+      // required.
+      // TODO(jacobr): we could consider removing this code completely.
+      return Window.instanceRuntimeType;
     }
   }
-
-  return null;
-}
-
-/**
- * Create Dart class that maps to the JS Type, add the JsObject as an expando
- * on the Dart class and return the created Dart class.
- */
-wrap_jso_no_SerializedScriptvalue(jsObject) {
-  try {
-    if (jsObject is! js.JsObject || jsObject == null) {
-      // JS Interop converted the object to a Dart class e.g., Uint8ClampedList.
-      // or it's a simple type.
-      return jsObject;
-    }
-
-    // TODO(alanknight): With upgraded custom elements this causes a failure because
-    // we need a new wrapper after the type changes. We could possibly invalidate this
-    // if the constructor name didn't match?
-    var wrapper = js.getDartHtmlWrapperFor(jsObject);
-    if (wrapper != null) {
-      return wrapper;
-    }
-
-    if (jsObject is js.JsArray) {
-      wrapper = new js.JSArray.create(jsObject);
-      js.setDartHtmlWrapperFor(jsObject, wrapper);
-      return wrapper;
-    }
-    if (jsObject is js.JsFunction) {
-      wrapper = new js.JSFunction.create(jsObject);
-      js.setDartHtmlWrapperFor(jsObject, wrapper);
-      return wrapper;
-    }
-
-    var constructor = js.JsNative.getProperty(jsObject, 'constructor');
-    if (constructor == null) {
-      // Perfectly valid case for JavaScript objects where __proto__ has
-      // intentionally been set to null.
-      js.setDartHtmlWrapperFor(jsObject, new js.JSObject.create(jsObject));
-      return jsObject;
-    }
-    var jsTypeName = js.JsNative.getProperty(constructor, 'name');
-    if (jsTypeName is! String || jsTypeName.length == 0) {
-      // Not an html type.
-      wrapper = new js.JSObject.create(jsObject);
-      js.setDartHtmlWrapperFor(jsObject, wrapper);
-      return wrapper;
-    }
-
-    var func = getHtmlCreateFunction(jsTypeName);
-    if (func != null) {
-      var dartClass_instance = func();
-      dartClass_instance.blink_jsObject = jsObject;
-      js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
-      return dartClass_instance;
-    }
-    wrapper = new js.JSObject.create(jsObject);
-    js.setDartHtmlWrapperFor(jsObject, wrapper);
-    return wrapper;
-  } catch (e, stacktrace) {
-    if (interop_checks) {
-      if (e is DebugAssertException) window.console
-          .log("${e.message}\n ${stacktrace}");
-      else window.console.log("${stacktrace}");
-    }
-  }
-
-  return null;
-}
-
-/**
- * Create Dart class that maps to the JS Type that is the JS type being
- * extended using JS interop createCallback (we need the base type of the
- * custom element) not the Dart created constructor.
- */
-wrap_jso_custom_element(jsObject) {
-  try {
-    if (jsObject is! js.JsObject) {
-      // JS Interop converted the object to a Dart class e.g., Uint8ClampedList.
-      return jsObject;
-    }
-
-    // Find out what object we're extending.
-    var objectName = jsObject.toString();
-    // Expect to see something like '[object HTMLElement]'.
-    if (!objectName.startsWith('[object ')) {
-      return jsObject;
-    }
-
-    var extendsClass = objectName.substring(8, objectName.length - 1);
-    var func = getHtmlCreateFunction(extendsClass);
-    if (interop_checks)
-      debug_or_assert("func != null name = ${extendsClass}", func != null);
-    var dartClass_instance = func();
-    dartClass_instance.blink_jsObject = jsObject;
-    return dartClass_instance;
-  } catch(e, stacktrace){
-    if (interop_checks) {
-      if (e is DebugAssertException)
-        window.console.log("${e.message}\n ${stacktrace}");
-      else
-        window.console.log("${stacktrace}");
-    }
-
-    // Problem?
-    return null;
-  }
-}
-
-getCustomElementEntry(element) {
-  var hasAttribute = false;
-
-  var jsObject;
-  var tag = "";
-  var runtimeType = element.runtimeType;
-  if (runtimeType == HtmlElement) {
-    tag = element.localName;
-  } else if (runtimeType == TemplateElement) {
-    // Data binding with a Dart class.
-    tag = element.attributes['is'];
-  } else if (runtimeType == js.JsObject) {
-    // It's a Polymer core element (written in JS).
-    // Make sure it's an element anything else we can ignore.
-    if (element.hasProperty('nodeType') && element['nodeType'] == 1) {
-      if (js.JsNative.callMethod(element, 'hasAttribute', ['is'])) {
-        hasAttribute = true;
-        // It's data binding use the is attribute.
-        tag = js.JsNative.callMethod(element, 'getAttribute', ['is']);
-      } else {
-        // It's a custom element we want the local name.
-        tag = element['localName'];
-      }
-    }
-  } else {
-    throw new UnsupportedError(
-        'Element is incorrect type. Got ${runtimeType}, expected HtmlElement/HtmlTemplate/JsObject.');
-  }
-
-  var entry = _knownCustomElements[tag];
-  if (entry != null) {
-    // If there's an 'is' attribute then check if the extends tag registered
-    // matches the tag if so then return the entry that's registered for this
-    // extendsTag or if there's no 'is' tag then return the entry found.
-    if ((hasAttribute && entry['extends'] == tag) || !hasAttribute) {
-      return entry;
-    }
-  }
-
-  return null;
-}
-
-// List of known tagName to DartClass for custom elements, used for upgrade.
-var _knownCustomElements = new Map<String, Map<Type, String>>();
-
-void addCustomElementType(String tagName, Type dartClass, [String extendTag]) {
-  _knownCustomElements[tagName] =
-      {'type': dartClass, 'extends': extendTag != null ? extendTag : "" };
-}
-
-Type getCustomElementType(object) {
-  var entry = getCustomElementEntry(object);
-  if (entry != null) {
-    return entry['type'];
-  }
-  return null;
+  return js.JSObject.instanceRuntimeType;
 }
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
index 1f80c9d..f969eb3 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -774,6 +774,16 @@
   @annotation_Creates_SerializedScriptValue
   Request _get(Object key) native;
 
+  @DomName('IDBIndex.getAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Request getAll(Object range, [int maxCount]) native;
+
+  @DomName('IDBIndex.getAllKeys')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Request getAllKeys(Object range, [int maxCount]) native;
+
   @JSName('getKey')
   @DomName('IDBIndex.getKey')
   @DocsEditable()
@@ -1072,41 +1082,21 @@
 
   @DomName('IDBObjectStore.createIndex')
   @DocsEditable()
-  Index _createIndex(String name, keyPath, [Map options]) {
-    if ((keyPath is String || keyPath == null) && options == null) {
-      return _createIndex_1(name, keyPath);
-    }
-    if (options != null && (keyPath is String || keyPath == null)) {
+  Index _createIndex(String name, Object keyPath, [Map options]) {
+    if (options != null) {
       var options_1 = convertDartToNative_Dictionary(options);
-      return _createIndex_2(name, keyPath, options_1);
+      return _createIndex_1(name, keyPath, options_1);
     }
-    if ((keyPath is List<String> || keyPath == null) && options == null) {
-      List keyPath_1 = convertDartToNative_StringArray(keyPath);
-      return _createIndex_3(name, keyPath_1);
-    }
-    if (options != null && (keyPath is List<String> || keyPath == null)) {
-      List keyPath_1 = convertDartToNative_StringArray(keyPath);
-      var options_2 = convertDartToNative_Dictionary(options);
-      return _createIndex_4(name, keyPath_1, options_2);
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _createIndex_2(name, keyPath);
   }
   @JSName('createIndex')
   @DomName('IDBObjectStore.createIndex')
   @DocsEditable()
-  Index _createIndex_1(name, String keyPath) native;
+  Index _createIndex_1(name, keyPath, options) native;
   @JSName('createIndex')
   @DomName('IDBObjectStore.createIndex')
   @DocsEditable()
-  Index _createIndex_2(name, String keyPath, options) native;
-  @JSName('createIndex')
-  @DomName('IDBObjectStore.createIndex')
-  @DocsEditable()
-  Index _createIndex_3(name, List keyPath) native;
-  @JSName('createIndex')
-  @DomName('IDBObjectStore.createIndex')
-  @DocsEditable()
-  Index _createIndex_4(name, List keyPath, options) native;
+  Index _createIndex_2(name, keyPath) native;
 
   @JSName('delete')
   @DomName('IDBObjectStore.delete')
@@ -1125,6 +1115,16 @@
   @annotation_Creates_SerializedScriptValue
   Request _get(Object key) native;
 
+  @DomName('IDBObjectStore.getAll')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Request getAll(Object range, [int maxCount]) native;
+
+  @DomName('IDBObjectStore.getAllKeys')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Request getAllKeys(Object range, [int maxCount]) native;
+
   @DomName('IDBObjectStore.index')
   @DocsEditable()
   Index index(String name) native;
@@ -1394,6 +1394,13 @@
   @DocsEditable()
   final String mode;
 
+  @DomName('IDBTransaction.objectStoreNames')
+  @DocsEditable()
+  @Experimental() // untriaged
+  @Returns('DomStringList')
+  @Creates('DomStringList')
+  final List<String> objectStoreNames;
+
   @DomName('IDBTransaction.abort')
   @DocsEditable()
   void abort() native;
@@ -1431,6 +1438,18 @@
   // To suppress missing implicit constructor warnings.
   factory VersionChangeEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('IDBVersionChangeEvent.IDBVersionChangeEvent')
+  @DocsEditable()
+  factory VersionChangeEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return VersionChangeEvent._create_1(type, eventInitDict_1);
+    }
+    return VersionChangeEvent._create_2(type);
+  }
+  static VersionChangeEvent _create_1(type, eventInitDict) => JS('VersionChangeEvent', 'new IDBVersionChangeEvent(#,#)', type, eventInitDict);
+  static VersionChangeEvent _create_2(type) => JS('VersionChangeEvent', 'new IDBVersionChangeEvent(#)', type);
+
   @DomName('IDBVersionChangeEvent.dataLoss')
   @DocsEditable()
   @Experimental() // untriaged
diff --git a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
index 36b35e3..39c78ed 100644
--- a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
+++ b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
@@ -110,37 +110,83 @@
 // FIXME: Can we make this private?
 @Deprecated("Internal Use Only")
 final indexed_dbBlinkMap = {
-  'IDBCursor': () => Cursor,
-  'IDBCursorWithValue': () => CursorWithValue,
-  'IDBDatabase': () => Database,
-  'IDBFactory': () => IdbFactory,
-  'IDBIndex': () => Index,
-  'IDBKeyRange': () => KeyRange,
-  'IDBObjectStore': () => ObjectStore,
-  'IDBOpenDBRequest': () => OpenDBRequest,
-  'IDBRequest': () => Request,
-  'IDBTransaction': () => Transaction,
-  'IDBVersionChangeEvent': () => VersionChangeEvent,
+  'IDBCursor': () => Cursor.instanceRuntimeType,
+  'IDBCursorWithValue': () => CursorWithValue.instanceRuntimeType,
+  'IDBDatabase': () => Database.instanceRuntimeType,
+  'IDBFactory': () => IdbFactory.instanceRuntimeType,
+  'IDBIndex': () => Index.instanceRuntimeType,
+  'IDBKeyRange': () => KeyRange.instanceRuntimeType,
+  'IDBObjectStore': () => ObjectStore.instanceRuntimeType,
+  'IDBOpenDBRequest': () => OpenDBRequest.instanceRuntimeType,
+  'IDBRequest': () => Request.instanceRuntimeType,
+  'IDBTransaction': () => Transaction.instanceRuntimeType,
+  'IDBVersionChangeEvent': () => VersionChangeEvent.instanceRuntimeType,
 
 };
 
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final indexed_dbBlinkFunctionMap = {
-  'IDBCursor': () => Cursor.internalCreateCursor,
-  'IDBCursorWithValue': () => CursorWithValue.internalCreateCursorWithValue,
-  'IDBDatabase': () => Database.internalCreateDatabase,
-  'IDBFactory': () => IdbFactory.internalCreateIdbFactory,
-  'IDBIndex': () => Index.internalCreateIndex,
-  'IDBKeyRange': () => KeyRange.internalCreateKeyRange,
-  'IDBObjectStore': () => ObjectStore.internalCreateObjectStore,
-  'IDBOpenDBRequest': () => OpenDBRequest.internalCreateOpenDBRequest,
-  'IDBRequest': () => Request.internalCreateRequest,
-  'IDBTransaction': () => Transaction.internalCreateTransaction,
-  'IDBVersionChangeEvent': () => VersionChangeEvent.internalCreateVersionChangeEvent,
 
-};
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+//
+// Per http://www.w3.org/TR/IndexedDB/#key-construct
+//
+// "A value is said to be a valid key if it is one of the following types: Array
+// JavaScript objects [ECMA-262], DOMString [WEBIDL], Date [ECMA-262] or float
+// [WEBIDL]. However Arrays are only valid keys if every item in the array is
+// defined and is a valid key (i.e. sparse arrays can not be valid keys) and if
+// the Array doesn't directly or indirectly contain itself. Any non-numeric
+// properties are ignored, and thus does not affect whether the Array is a valid
+// key. Additionally, if the value is of type float, it is only a valid key if
+// it is not NaN, and if the value is of type Date it is only a valid key if its
+// [[PrimitiveValue]] internal property, as defined by [ECMA-262], is not NaN."
+
+// What is required is to ensure that an Lists in the key are actually
+// JavaScript arrays, and any Dates are JavaScript Dates.
+
+
+/**
+ * Converts a native IDBKey into a Dart object.
+ *
+ * May return the original input.  May mutate the original input (but will be
+ * idempotent if mutation occurs).  It is assumed that this conversion happens
+ * on native IDBKeys on all paths that return IDBKeys from native DOM calls.
+ *
+ * If necessary, JavaScript Dates are converted into Dart Dates.
+ */
+_convertNativeToDart_IDBKey(nativeKey) {
+  containsDate(object) {
+    if (object is DateTime) return true;
+    if (object is List) {
+      for (int i = 0; i < object.length; i++) {
+        if (containsDate(object[i])) return true;
+      }
+    }
+    return false;  // number, string.
+  }
+  if (nativeKey is DateTime) {
+    throw new UnimplementedError('Key containing DateTime');
+  }
+  // TODO: Cache conversion somewhere?
+  return nativeKey;
+}
+
+/**
+ * Converts a Dart object into a valid IDBKey.
+ *
+ * May return the original input.  Does not mutate input.
+ *
+ * If necessary, [dartKey] may be copied to ensure all lists are converted into
+ * JavaScript Arrays and Dart Dates into JavaScript Dates.
+ */
+_convertDartToNative_IDBKey(dartKey) {
+  // TODO: Implement.
+  return dartKey;
+}
+
+
+
+/// May modify original.  If so, action is idempotent.
+_convertNativeToDart_IDBAny(object) {
+  return convertNativeToDart_AcceptStructuredClone(object, mustCopy: false);
+}// 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.
 
@@ -169,62 +215,54 @@
     // To suppress missing implicit constructor warnings.
   factory Cursor._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Cursor internalCreateCursor() {
-    return new Cursor._internalWrap();
-  }
 
-  factory Cursor._internalWrap() {
-    return new Cursor.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Cursor.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('IDBCursor.direction')
   @DocsEditable()
-  String get direction => _blink.BlinkIDBCursor.instance.direction_Getter_(unwrap_jso(this));
+  String get direction => _blink.BlinkIDBCursor.instance.direction_Getter_(this);
   
   @DomName('IDBCursor.key')
   @DocsEditable()
-  Object get key => wrap_jso(_blink.BlinkIDBCursor.instance.key_Getter_(unwrap_jso(this)));
+  Object get key => (_blink.BlinkIDBCursor.instance.key_Getter_(this));
   
   @DomName('IDBCursor.primaryKey')
   @DocsEditable()
-  Object get primaryKey => wrap_jso(_blink.BlinkIDBCursor.instance.primaryKey_Getter_(unwrap_jso(this)));
+  Object get primaryKey => (_blink.BlinkIDBCursor.instance.primaryKey_Getter_(this));
   
   @DomName('IDBCursor.source')
   @DocsEditable()
-  Object get source => wrap_jso(_blink.BlinkIDBCursor.instance.source_Getter_(unwrap_jso(this)));
+  Object get source => (_blink.BlinkIDBCursor.instance.source_Getter_(this));
   
   @DomName('IDBCursor.advance')
   @DocsEditable()
-  void advance(int count) => _blink.BlinkIDBCursor.instance.advance_Callback_1_(unwrap_jso(this), count);
+  void advance(int count) => _blink.BlinkIDBCursor.instance.advance_Callback_1_(this, count);
   
   @DomName('IDBCursor.continuePrimaryKey')
   @DocsEditable()
   @Experimental() // untriaged
-  void continuePrimaryKey(Object key, Object primaryKey) => _blink.BlinkIDBCursor.instance.continuePrimaryKey_Callback_2_(unwrap_jso(this), key, primaryKey);
+  void continuePrimaryKey(Object key, Object primaryKey) => _blink.BlinkIDBCursor.instance.continuePrimaryKey_Callback_2_(this, key, primaryKey);
   
   @DomName('IDBCursor.delete')
   @DocsEditable()
-  Request _delete() => wrap_jso(_blink.BlinkIDBCursor.instance.delete_Callback_0_(unwrap_jso(this)));
+  Request _delete() => _blink.BlinkIDBCursor.instance.delete_Callback_0_(this);
   
   void next([Object key]) {
     if (key != null) {
-      _blink.BlinkIDBCursor.instance.continue_Callback_1_(unwrap_jso(this), key);
+      _blink.BlinkIDBCursor.instance.continue_Callback_1_(this, key);
       return;
     }
-    _blink.BlinkIDBCursor.instance.continue_Callback_0_(unwrap_jso(this));
+    _blink.BlinkIDBCursor.instance.continue_Callback_0_(this);
     return;
   }
 
   @DomName('IDBCursor.update')
   @DocsEditable()
-  Request _update(Object value) => wrap_jso(_blink.BlinkIDBCursor.instance.update_Callback_1_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(value)));
+  Request _update(Object value) => _blink.BlinkIDBCursor.instance.update_Callback_1_(this, convertDartToNative_SerializedScriptValue(value));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -243,11 +281,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CursorWithValue internalCreateCursorWithValue() {
-    return new CursorWithValue._internalWrap();
-  }
-
-  external factory CursorWithValue._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CursorWithValue.internal_() : super.internal_();
@@ -255,7 +289,7 @@
 
   @DomName('IDBCursorWithValue.value')
   @DocsEditable()
-  Object get value => wrap_jso(_blink.BlinkIDBCursorWithValue.instance.value_Getter_(unwrap_jso(this)));
+  Object get value => _convertNativeToDart_IDBAny(_blink.BlinkIDBCursorWithValue.instance.value_Getter_(this));
   
 }
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -298,14 +332,14 @@
     if (storeName_OR_storeNames == null) {
       throw new ArgumentError("stores may not be null in transaction");
     } else if (storeName_OR_storeNames is String || storeName_OR_storeNames is DomStringList) {
-      names = unwrap_jso(storeName_OR_storeNames);
+      names = storeName_OR_storeNames;
     } else if (storeName_OR_storeNames is List<String>) {
       names = convertDartToNative_List(storeName_OR_storeNames);
     } else {
       throw new ArgumentError("Invalid store(s) $store_Name_OR_storeNames");
     }
 
-    return wrap_jso(_blink.BlinkIDBDatabase.instance.transaction_Callback_2_(unwrap_jso(this), names, mode));
+    return _blink.BlinkIDBDatabase.instance.transaction_Callback_2_(this, names, mode);
   }
 
   Transaction transactionList(List<String> storeNames, String mode) => transaction(storeNames, mode);
@@ -359,11 +393,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Database internalCreateDatabase() {
-    return new Database._internalWrap();
-  }
-
-  external factory Database._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Database.internal_() : super.internal_();
@@ -371,30 +401,30 @@
 
   @DomName('IDBDatabase.name')
   @DocsEditable()
-  String get name => _blink.BlinkIDBDatabase.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkIDBDatabase.instance.name_Getter_(this);
   
   @DomName('IDBDatabase.objectStoreNames')
   @DocsEditable()
-  List<String> get objectStoreNames => wrap_jso(_blink.BlinkIDBDatabase.instance.objectStoreNames_Getter_(unwrap_jso(this)));
+  List<String> get objectStoreNames => _blink.BlinkIDBDatabase.instance.objectStoreNames_Getter_(this);
   
   @DomName('IDBDatabase.version')
   @DocsEditable()
-  Object get version => wrap_jso(_blink.BlinkIDBDatabase.instance.version_Getter_(unwrap_jso(this)));
+  Object get version => (_blink.BlinkIDBDatabase.instance.version_Getter_(this));
   
   @DomName('IDBDatabase.close')
   @DocsEditable()
-  void close() => _blink.BlinkIDBDatabase.instance.close_Callback_0_(unwrap_jso(this));
+  void close() => _blink.BlinkIDBDatabase.instance.close_Callback_0_(this);
   
   ObjectStore _createObjectStore(String name, [Map options]) {
     if (options != null) {
-      return wrap_jso(_blink.BlinkIDBDatabase.instance.createObjectStore_Callback_2_(unwrap_jso(this), name, convertDartToNative_Dictionary(options)));
+      return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_2_(this, name, convertDartToNative_Dictionary(options));
     }
-    return wrap_jso(_blink.BlinkIDBDatabase.instance.createObjectStore_Callback_1_(unwrap_jso(this), name));
+    return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_1_(this, name);
   }
 
   @DomName('IDBDatabase.deleteObjectStore')
   @DocsEditable()
-  void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.instance.deleteObjectStore_Callback_1_(unwrap_jso(this), name);
+  void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.instance.deleteObjectStore_Callback_1_(this, name);
   
   /// Stream of `abort` events handled by this [Database].
   @DomName('IDBDatabase.onabort')
@@ -508,34 +538,26 @@
   // To suppress missing implicit constructor warnings.
   factory IdbFactory._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static IdbFactory internalCreateIdbFactory() {
-    return new IdbFactory._internalWrap();
-  }
 
-  factory IdbFactory._internalWrap() {
-    return new IdbFactory.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   IdbFactory.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('IDBFactory.cmp')
   @DocsEditable()
-  int cmp(Object first, Object second) => _blink.BlinkIDBFactory.instance.cmp_Callback_2_(unwrap_jso(this), first, second);
+  int cmp(Object first, Object second) => _blink.BlinkIDBFactory.instance.cmp_Callback_2_(this, first, second);
   
   @DomName('IDBFactory.deleteDatabase')
   @DocsEditable()
-  OpenDBRequest _deleteDatabase(String name) => wrap_jso(_blink.BlinkIDBFactory.instance.deleteDatabase_Callback_1_(unwrap_jso(this), name));
+  OpenDBRequest _deleteDatabase(String name) => _blink.BlinkIDBFactory.instance.deleteDatabase_Callback_1_(this, name);
   
   OpenDBRequest _open(String name, [int version]) {
     if (version != null) {
-      return wrap_jso(_blink.BlinkIDBFactory.instance.open_Callback_2_(unwrap_jso(this), name, version));
+      return _blink.BlinkIDBFactory.instance.open_Callback_2_(this, name, version);
     }
-    return wrap_jso(_blink.BlinkIDBFactory.instance.open_Callback_1_(unwrap_jso(this), name));
+    return _blink.BlinkIDBFactory.instance.open_Callback_1_(this, name);
   }
 
   @DomName('IDBFactory.webkitGetDatabaseNames')
@@ -543,7 +565,7 @@
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
   @Experimental()
-  Request _webkitGetDatabaseNames() => wrap_jso(_blink.BlinkIDBFactory.instance.webkitGetDatabaseNames_Callback_0_(unwrap_jso(this)));
+  Request _webkitGetDatabaseNames() => _blink.BlinkIDBFactory.instance.webkitGetDatabaseNames_Callback_0_(this);
   
 }
 
@@ -661,65 +683,71 @@
     // To suppress missing implicit constructor warnings.
   factory Index._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Index internalCreateIndex() {
-    return new Index._internalWrap();
-  }
 
-  factory Index._internalWrap() {
-    return new Index.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Index.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('IDBIndex.keyPath')
   @DocsEditable()
-  Object get keyPath => wrap_jso(_blink.BlinkIDBIndex.instance.keyPath_Getter_(unwrap_jso(this)));
+  Object get keyPath => (_blink.BlinkIDBIndex.instance.keyPath_Getter_(this));
   
   @DomName('IDBIndex.multiEntry')
   @DocsEditable()
-  bool get multiEntry => _blink.BlinkIDBIndex.instance.multiEntry_Getter_(unwrap_jso(this));
+  bool get multiEntry => _blink.BlinkIDBIndex.instance.multiEntry_Getter_(this);
   
   @DomName('IDBIndex.name')
   @DocsEditable()
-  String get name => _blink.BlinkIDBIndex.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkIDBIndex.instance.name_Getter_(this);
   
   @DomName('IDBIndex.objectStore')
   @DocsEditable()
-  ObjectStore get objectStore => wrap_jso(_blink.BlinkIDBIndex.instance.objectStore_Getter_(unwrap_jso(this)));
+  ObjectStore get objectStore => _blink.BlinkIDBIndex.instance.objectStore_Getter_(this);
   
   @DomName('IDBIndex.unique')
   @DocsEditable()
-  bool get unique => _blink.BlinkIDBIndex.instance.unique_Getter_(unwrap_jso(this));
+  bool get unique => _blink.BlinkIDBIndex.instance.unique_Getter_(this);
   
   @DomName('IDBIndex.count')
   @DocsEditable()
-  Request _count(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.count_Callback_1_(unwrap_jso(this), key));
+  Request _count(Object key) => _blink.BlinkIDBIndex.instance.count_Callback_1_(this, key);
   
   @DomName('IDBIndex.get')
   @DocsEditable()
-  Request _get(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.get_Callback_1_(unwrap_jso(this), key));
+  Request _get(Object key) => _blink.BlinkIDBIndex.instance.get_Callback_1_(this, key);
   
+  Request getAll(Object range, [int maxCount]) {
+    if (maxCount != null) {
+      return _blink.BlinkIDBIndex.instance.getAll_Callback_2_(this, range, maxCount);
+    }
+    return _blink.BlinkIDBIndex.instance.getAll_Callback_1_(this, range);
+  }
+
+  Request getAllKeys(Object range, [int maxCount]) {
+    if (maxCount != null) {
+      return _blink.BlinkIDBIndex.instance.getAllKeys_Callback_2_(this, range, maxCount);
+    }
+    return _blink.BlinkIDBIndex.instance.getAllKeys_Callback_1_(this, range);
+  }
+
   @DomName('IDBIndex.getKey')
   @DocsEditable()
-  Request _getKey(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.getKey_Callback_1_(unwrap_jso(this), key));
+  Request _getKey(Object key) => _blink.BlinkIDBIndex.instance.getKey_Callback_1_(this, key);
   
   Request _openCursor(Object range, [String direction]) {
     if (direction != null) {
-      return wrap_jso(_blink.BlinkIDBIndex.instance.openCursor_Callback_2_(unwrap_jso(this), range, direction));
+      return _blink.BlinkIDBIndex.instance.openCursor_Callback_2_(this, range, direction);
     }
-    return wrap_jso(_blink.BlinkIDBIndex.instance.openCursor_Callback_1_(unwrap_jso(this), range));
+    return _blink.BlinkIDBIndex.instance.openCursor_Callback_1_(this, range);
   }
 
   Request _openKeyCursor(Object range, [String direction]) {
     if (direction != null) {
-      return wrap_jso(_blink.BlinkIDBIndex.instance.openKeyCursor_Callback_2_(unwrap_jso(this), range, direction));
+      return _blink.BlinkIDBIndex.instance.openKeyCursor_Callback_2_(this, range, direction);
     }
-    return wrap_jso(_blink.BlinkIDBIndex.instance.openKeyCursor_Callback_1_(unwrap_jso(this), range));
+    return _blink.BlinkIDBIndex.instance.openKeyCursor_Callback_1_(this, range);
   }
 
 }
@@ -752,64 +780,56 @@
   // To suppress missing implicit constructor warnings.
   factory KeyRange._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static KeyRange internalCreateKeyRange() {
-    return new KeyRange._internalWrap();
-  }
 
-  factory KeyRange._internalWrap() {
-    return new KeyRange.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   KeyRange.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('IDBKeyRange.lower')
   @DocsEditable()
-  Object get lower => wrap_jso(_blink.BlinkIDBKeyRange.instance.lower_Getter_(unwrap_jso(this)));
+  Object get lower => (_blink.BlinkIDBKeyRange.instance.lower_Getter_(this));
   
   @DomName('IDBKeyRange.lowerOpen')
   @DocsEditable()
-  bool get lowerOpen => _blink.BlinkIDBKeyRange.instance.lowerOpen_Getter_(unwrap_jso(this));
+  bool get lowerOpen => _blink.BlinkIDBKeyRange.instance.lowerOpen_Getter_(this);
   
   @DomName('IDBKeyRange.upper')
   @DocsEditable()
-  Object get upper => wrap_jso(_blink.BlinkIDBKeyRange.instance.upper_Getter_(unwrap_jso(this)));
+  Object get upper => (_blink.BlinkIDBKeyRange.instance.upper_Getter_(this));
   
   @DomName('IDBKeyRange.upperOpen')
   @DocsEditable()
-  bool get upperOpen => _blink.BlinkIDBKeyRange.instance.upperOpen_Getter_(unwrap_jso(this));
+  bool get upperOpen => _blink.BlinkIDBKeyRange.instance.upperOpen_Getter_(this);
   
   static KeyRange bound_(Object lower, Object upper, [bool lowerOpen, bool upperOpen]) {
     if (upperOpen != null) {
-      return wrap_jso(_blink.BlinkIDBKeyRange.instance.bound_Callback_4_(lower, upper, lowerOpen, upperOpen));
+      return _blink.BlinkIDBKeyRange.instance.bound_Callback_4_(lower, upper, lowerOpen, upperOpen);
     }
     if (lowerOpen != null) {
-      return wrap_jso(_blink.BlinkIDBKeyRange.instance.bound_Callback_3_(lower, upper, lowerOpen));
+      return _blink.BlinkIDBKeyRange.instance.bound_Callback_3_(lower, upper, lowerOpen);
     }
-    return wrap_jso(_blink.BlinkIDBKeyRange.instance.bound_Callback_2_(lower, upper));
+    return _blink.BlinkIDBKeyRange.instance.bound_Callback_2_(lower, upper);
   }
 
   static KeyRange lowerBound_(Object bound, [bool open]) {
     if (open != null) {
-      return wrap_jso(_blink.BlinkIDBKeyRange.instance.lowerBound_Callback_2_(bound, open));
+      return _blink.BlinkIDBKeyRange.instance.lowerBound_Callback_2_(bound, open);
     }
-    return wrap_jso(_blink.BlinkIDBKeyRange.instance.lowerBound_Callback_1_(bound));
+    return _blink.BlinkIDBKeyRange.instance.lowerBound_Callback_1_(bound);
   }
 
   @DomName('IDBKeyRange.only_')
   @DocsEditable()
   @Experimental() // non-standard
-  static KeyRange only_(Object value) => wrap_jso(_blink.BlinkIDBKeyRange.instance.only_Callback_1_(value));
+  static KeyRange only_(Object value) => _blink.BlinkIDBKeyRange.instance.only_Callback_1_(value);
   
   static KeyRange upperBound_(Object bound, [bool open]) {
     if (open != null) {
-      return wrap_jso(_blink.BlinkIDBKeyRange.instance.upperBound_Callback_2_(bound, open));
+      return _blink.BlinkIDBKeyRange.instance.upperBound_Callback_2_(bound, open);
     }
-    return wrap_jso(_blink.BlinkIDBKeyRange.instance.upperBound_Callback_1_(bound));
+    return _blink.BlinkIDBKeyRange.instance.upperBound_Callback_1_(bound);
   }
 
 }
@@ -951,107 +971,104 @@
   // To suppress missing implicit constructor warnings.
   factory ObjectStore._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ObjectStore internalCreateObjectStore() {
-    return new ObjectStore._internalWrap();
-  }
 
-  factory ObjectStore._internalWrap() {
-    return new ObjectStore.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ObjectStore.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('IDBObjectStore.autoIncrement')
   @DocsEditable()
-  bool get autoIncrement => _blink.BlinkIDBObjectStore.instance.autoIncrement_Getter_(unwrap_jso(this));
+  bool get autoIncrement => _blink.BlinkIDBObjectStore.instance.autoIncrement_Getter_(this);
   
   @DomName('IDBObjectStore.indexNames')
   @DocsEditable()
-  List<String> get indexNames => wrap_jso(_blink.BlinkIDBObjectStore.instance.indexNames_Getter_(unwrap_jso(this)));
+  List<String> get indexNames => _blink.BlinkIDBObjectStore.instance.indexNames_Getter_(this);
   
   @DomName('IDBObjectStore.keyPath')
   @DocsEditable()
-  Object get keyPath => wrap_jso(_blink.BlinkIDBObjectStore.instance.keyPath_Getter_(unwrap_jso(this)));
+  Object get keyPath => (_blink.BlinkIDBObjectStore.instance.keyPath_Getter_(this));
   
   @DomName('IDBObjectStore.name')
   @DocsEditable()
-  String get name => _blink.BlinkIDBObjectStore.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkIDBObjectStore.instance.name_Getter_(this);
   
   @DomName('IDBObjectStore.transaction')
   @DocsEditable()
-  Transaction get transaction => wrap_jso(_blink.BlinkIDBObjectStore.instance.transaction_Getter_(unwrap_jso(this)));
+  Transaction get transaction => _blink.BlinkIDBObjectStore.instance.transaction_Getter_(this);
   
   Request _add(Object value, [Object key]) {
     if (key != null) {
-      return wrap_jso(_blink.BlinkIDBObjectStore.instance.add_Callback_2_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(value), convertDartToNative_SerializedScriptValue(key)));
+      return _blink.BlinkIDBObjectStore.instance.add_Callback_2_(this, convertDartToNative_SerializedScriptValue(value), convertDartToNative_SerializedScriptValue(key));
     }
-    return wrap_jso(_blink.BlinkIDBObjectStore.instance.add_Callback_1_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(value)));
+    return _blink.BlinkIDBObjectStore.instance.add_Callback_1_(this, convertDartToNative_SerializedScriptValue(value));
   }
 
   @DomName('IDBObjectStore.clear')
   @DocsEditable()
-  Request _clear() => wrap_jso(_blink.BlinkIDBObjectStore.instance.clear_Callback_0_(unwrap_jso(this)));
+  Request _clear() => _blink.BlinkIDBObjectStore.instance.clear_Callback_0_(this);
   
   @DomName('IDBObjectStore.count')
   @DocsEditable()
-  Request _count(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.count_Callback_1_(unwrap_jso(this), key));
+  Request _count(Object key) => _blink.BlinkIDBObjectStore.instance.count_Callback_1_(this, key);
   
-  Index _createIndex(String name, keyPath, [Map options]) {
-    if ((keyPath is String || keyPath == null) && (name is String || name == null) && options == null) {
-      return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_jso(this), name, unwrap_jso(keyPath)));
+  Index _createIndex(String name, Object keyPath, [Map options]) {
+    if (options != null) {
+      return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(this, name, keyPath, convertDartToNative_Dictionary(options));
     }
-    if ((options is Map || options == null) && (keyPath is String || keyPath == null) && (name is String || name == null)) {
-      return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_jso(this), name, unwrap_jso(keyPath), convertDartToNative_Dictionary(options)));
-    }
-    if ((keyPath is List<String> || keyPath == null) && (name is String || name == null) && options == null) {
-      return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_jso(this), name, unwrap_jso(keyPath)));
-    }
-    if ((options is Map || options == null) && (keyPath is List<String> || keyPath == null) && (name is String || name == null)) {
-      return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_jso(this), name, unwrap_jso(keyPath), convertDartToNative_Dictionary(options)));
-    }
-    throw new ArgumentError("Incorrect number or type of arguments");
+    return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(this, name, keyPath);
   }
 
   @DomName('IDBObjectStore.delete')
   @DocsEditable()
-  Request _delete(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.delete_Callback_1_(unwrap_jso(this), key));
+  Request _delete(Object key) => _blink.BlinkIDBObjectStore.instance.delete_Callback_1_(this, key);
   
   @DomName('IDBObjectStore.deleteIndex')
   @DocsEditable()
-  void deleteIndex(String name) => _blink.BlinkIDBObjectStore.instance.deleteIndex_Callback_1_(unwrap_jso(this), name);
+  void deleteIndex(String name) => _blink.BlinkIDBObjectStore.instance.deleteIndex_Callback_1_(this, name);
   
   @DomName('IDBObjectStore.get')
   @DocsEditable()
-  Request _get(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.get_Callback_1_(unwrap_jso(this), key));
+  Request _get(Object key) => _blink.BlinkIDBObjectStore.instance.get_Callback_1_(this, key);
   
+  Request getAll(Object range, [int maxCount]) {
+    if (maxCount != null) {
+      return _blink.BlinkIDBObjectStore.instance.getAll_Callback_2_(this, range, maxCount);
+    }
+    return _blink.BlinkIDBObjectStore.instance.getAll_Callback_1_(this, range);
+  }
+
+  Request getAllKeys(Object range, [int maxCount]) {
+    if (maxCount != null) {
+      return _blink.BlinkIDBObjectStore.instance.getAllKeys_Callback_2_(this, range, maxCount);
+    }
+    return _blink.BlinkIDBObjectStore.instance.getAllKeys_Callback_1_(this, range);
+  }
+
   @DomName('IDBObjectStore.index')
   @DocsEditable()
-  Index index(String name) => wrap_jso(_blink.BlinkIDBObjectStore.instance.index_Callback_1_(unwrap_jso(this), name));
+  Index index(String name) => _blink.BlinkIDBObjectStore.instance.index_Callback_1_(this, name);
   
   Request _openCursor(Object range, [String direction]) {
     if (direction != null) {
-      return wrap_jso(_blink.BlinkIDBObjectStore.instance.openCursor_Callback_2_(unwrap_jso(this), range, direction));
+      return _blink.BlinkIDBObjectStore.instance.openCursor_Callback_2_(this, range, direction);
     }
-    return wrap_jso(_blink.BlinkIDBObjectStore.instance.openCursor_Callback_1_(unwrap_jso(this), range));
+    return _blink.BlinkIDBObjectStore.instance.openCursor_Callback_1_(this, range);
   }
 
   Request openKeyCursor(Object range, [String direction]) {
     if (direction != null) {
-      return wrap_jso(_blink.BlinkIDBObjectStore.instance.openKeyCursor_Callback_2_(unwrap_jso(this), range, direction));
+      return _blink.BlinkIDBObjectStore.instance.openKeyCursor_Callback_2_(this, range, direction);
     }
-    return wrap_jso(_blink.BlinkIDBObjectStore.instance.openKeyCursor_Callback_1_(unwrap_jso(this), range));
+    return _blink.BlinkIDBObjectStore.instance.openKeyCursor_Callback_1_(this, range);
   }
 
   Request _put(Object value, [Object key]) {
     if (key != null) {
-      return wrap_jso(_blink.BlinkIDBObjectStore.instance.put_Callback_2_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(value), convertDartToNative_SerializedScriptValue(key)));
+      return _blink.BlinkIDBObjectStore.instance.put_Callback_2_(this, convertDartToNative_SerializedScriptValue(value), convertDartToNative_SerializedScriptValue(key));
     }
-    return wrap_jso(_blink.BlinkIDBObjectStore.instance.put_Callback_1_(unwrap_jso(this), convertDartToNative_SerializedScriptValue(value)));
+    return _blink.BlinkIDBObjectStore.instance.put_Callback_1_(this, convertDartToNative_SerializedScriptValue(value));
   }
 
 
@@ -1118,11 +1135,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static OpenDBRequest internalCreateOpenDBRequest() {
-    return new OpenDBRequest._internalWrap();
-  }
-
-  external factory OpenDBRequest._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OpenDBRequest.internal_() : super.internal_();
@@ -1175,11 +1188,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Request internalCreateRequest() {
-    return new Request._internalWrap();
-  }
-
-  external factory Request._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Request.internal_() : super.internal_();
@@ -1187,23 +1196,23 @@
 
   @DomName('IDBRequest.error')
   @DocsEditable()
-  DomError get error => wrap_jso(_blink.BlinkIDBRequest.instance.error_Getter_(unwrap_jso(this)));
+  DomError get error => _blink.BlinkIDBRequest.instance.error_Getter_(this);
   
   @DomName('IDBRequest.readyState')
   @DocsEditable()
-  String get readyState => _blink.BlinkIDBRequest.instance.readyState_Getter_(unwrap_jso(this));
+  String get readyState => _blink.BlinkIDBRequest.instance.readyState_Getter_(this);
   
   @DomName('IDBRequest.result')
   @DocsEditable()
-  Object get result => wrap_jso(_blink.BlinkIDBRequest.instance.result_Getter_(unwrap_jso(this)));
+  Object get result => _convertNativeToDart_IDBAny(_blink.BlinkIDBRequest.instance.result_Getter_(this));
   
   @DomName('IDBRequest.source')
   @DocsEditable()
-  Object get source => wrap_jso(_blink.BlinkIDBRequest.instance.source_Getter_(unwrap_jso(this)));
+  Object get source => (_blink.BlinkIDBRequest.instance.source_Getter_(this));
   
   @DomName('IDBRequest.transaction')
   @DocsEditable()
-  Transaction get transaction => wrap_jso(_blink.BlinkIDBRequest.instance.transaction_Getter_(unwrap_jso(this)));
+  Transaction get transaction => _blink.BlinkIDBRequest.instance.transaction_Getter_(this);
   
   /// Stream of `error` events handled by this [Request].
   @DomName('IDBRequest.onerror')
@@ -1288,11 +1297,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static Transaction internalCreateTransaction() {
-    return new Transaction._internalWrap();
-  }
-
-  external factory Transaction._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Transaction.internal_() : super.internal_();
@@ -1300,23 +1305,28 @@
 
   @DomName('IDBTransaction.db')
   @DocsEditable()
-  Database get db => wrap_jso(_blink.BlinkIDBTransaction.instance.db_Getter_(unwrap_jso(this)));
+  Database get db => _blink.BlinkIDBTransaction.instance.db_Getter_(this);
   
   @DomName('IDBTransaction.error')
   @DocsEditable()
-  DomError get error => wrap_jso(_blink.BlinkIDBTransaction.instance.error_Getter_(unwrap_jso(this)));
+  DomError get error => _blink.BlinkIDBTransaction.instance.error_Getter_(this);
   
   @DomName('IDBTransaction.mode')
   @DocsEditable()
-  String get mode => _blink.BlinkIDBTransaction.instance.mode_Getter_(unwrap_jso(this));
+  String get mode => _blink.BlinkIDBTransaction.instance.mode_Getter_(this);
+  
+  @DomName('IDBTransaction.objectStoreNames')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<String> get objectStoreNames => _blink.BlinkIDBTransaction.instance.objectStoreNames_Getter_(this);
   
   @DomName('IDBTransaction.abort')
   @DocsEditable()
-  void abort() => _blink.BlinkIDBTransaction.instance.abort_Callback_0_(unwrap_jso(this));
+  void abort() => _blink.BlinkIDBTransaction.instance.abort_Callback_0_(this);
   
   @DomName('IDBTransaction.objectStore')
   @DocsEditable()
-  ObjectStore objectStore(String name) => wrap_jso(_blink.BlinkIDBTransaction.instance.objectStore_Callback_1_(unwrap_jso(this), name));
+  ObjectStore objectStore(String name) => _blink.BlinkIDBTransaction.instance.objectStore_Callback_1_(this, name);
   
   /// Stream of `abort` events handled by this [Transaction].
   @DomName('IDBTransaction.onabort')
@@ -1348,13 +1358,19 @@
   // To suppress missing implicit constructor warnings.
   factory VersionChangeEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static VersionChangeEvent internalCreateVersionChangeEvent() {
-    return new VersionChangeEvent._internalWrap();
+  @DomName('IDBVersionChangeEvent.IDBVersionChangeEvent')
+  @DocsEditable()
+  factory VersionChangeEvent(String type, [Map eventInitDict]) {
+    if (eventInitDict != null) {
+      var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
+      return _blink.BlinkIDBVersionChangeEvent.instance.constructorCallback_2_(type, eventInitDict_1);
+    }
+    return _blink.BlinkIDBVersionChangeEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory VersionChangeEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   VersionChangeEvent.internal_() : super.internal_();
@@ -1363,19 +1379,19 @@
   @DomName('IDBVersionChangeEvent.dataLoss')
   @DocsEditable()
   @Experimental() // untriaged
-  String get dataLoss => _blink.BlinkIDBVersionChangeEvent.instance.dataLoss_Getter_(unwrap_jso(this));
+  String get dataLoss => _blink.BlinkIDBVersionChangeEvent.instance.dataLoss_Getter_(this);
   
   @DomName('IDBVersionChangeEvent.dataLossMessage')
   @DocsEditable()
   @Experimental() // untriaged
-  String get dataLossMessage => _blink.BlinkIDBVersionChangeEvent.instance.dataLossMessage_Getter_(unwrap_jso(this));
+  String get dataLossMessage => _blink.BlinkIDBVersionChangeEvent.instance.dataLossMessage_Getter_(this);
   
   @DomName('IDBVersionChangeEvent.newVersion')
   @DocsEditable()
-  int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Getter_(unwrap_jso(this));
+  int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Getter_(this);
   
   @DomName('IDBVersionChangeEvent.oldVersion')
   @DocsEditable()
-  int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Getter_(unwrap_jso(this));
+  int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Getter_(this);
   
 }
diff --git a/sdk/lib/internal/iterable.dart b/sdk/lib/internal/iterable.dart
index 9a5f29f..7104c27 100644
--- a/sdk/lib/internal/iterable.dart
+++ b/sdk/lib/internal/iterable.dart
@@ -172,7 +172,8 @@
 
   Iterable<E> where(bool test(E element)) => super.where(test);
 
-  Iterable map(f(E element)) => new MappedListIterable(this, f);
+  Iterable/*<T>*/ map/*<T>*/(/*=T*/ f(E element)) =>
+      new MappedListIterable<E, dynamic/*=T*/ >(this, f);
 
   E reduce(E combine(var value, E element)) {
     int length = this.length;
@@ -188,7 +189,9 @@
     return value;
   }
 
-  fold(var initialValue, combine(var previousValue, E element)) {
+  /*=T*/ fold/*<T>*/(
+      var/*=T*/ initialValue, /*=T*/ combine(
+          var/*=T*/ previousValue, E element)) {
     var value = initialValue;
     int length = this.length;
     for (int i = 0; i < length; i++) {
@@ -555,7 +558,7 @@
 
 class TakeWhileIterator<E> extends Iterator<E> {
   final Iterator<E> _iterator;
-  final _ElementPredicate _f;
+  final _ElementPredicate<E> _f;
   bool _isFinished = false;
 
   TakeWhileIterator(this._iterator, bool this._f(E element));
@@ -637,7 +640,7 @@
 
 class SkipWhileIterable<E> extends Iterable<E> {
   final Iterable<E> _iterable;
-  final _ElementPredicate _f;
+  final _ElementPredicate<E> _f;
 
   SkipWhileIterable(this._iterable, bool this._f(E element));
 
@@ -648,7 +651,7 @@
 
 class SkipWhileIterator<E> extends Iterator<E> {
   final Iterator<E> _iterator;
-  final _ElementPredicate _f;
+  final _ElementPredicate<E> _f;
   bool _hasSkipped = false;
 
   SkipWhileIterator(this._iterator, bool this._f(E element));
@@ -713,13 +716,15 @@
 
   Iterable<E> where(bool test(E element)) => this;
 
-  Iterable map(f(E element)) => const EmptyIterable();
+  Iterable/*<T>*/ map/*<T>*/(/*=T*/ f(E element)) => const EmptyIterable();
 
   E reduce(E combine(E value, E element)) {
     throw IterableElementError.noElement();
   }
 
-  fold(var initialValue, combine(var previousValue, E element)) {
+  /*=T*/ fold/*<T>*/(
+      var/*=T*/ initialValue, /*=T*/ combine(
+          var/*=T*/ previousValue, E element)) {
     return initialValue;
   }
 
@@ -737,9 +742,9 @@
 
   Iterable<E> takeWhile(bool test(E element)) => this;
 
-  List toList({ bool growable: true }) => growable ? <E>[] : new List<E>(0);
+  List<E> toList({bool growable: true}) => growable ? <E>[] : new List<E>(0);
 
-  Set toSet() => new Set<E>();
+  Set<E> toSet() => new Set<E>();
 }
 
 /** The always empty iterator. */
@@ -749,12 +754,6 @@
   E get current => null;
 }
 
-/** An [Iterator] that can move in both directions. */
-abstract class BidirectionalIterator<T> implements Iterator<T> {
-  bool movePrevious();
-}
-
-
 /**
  * Creates errors throw by [Iterable] when the element count is wrong.
  */
diff --git a/sdk/lib/io/data_transformer.dart b/sdk/lib/io/data_transformer.dart
index 144234d..12d623a 100644
--- a/sdk/lib/io/data_transformer.dart
+++ b/sdk/lib/io/data_transformer.dart
@@ -147,7 +147,7 @@
   /**
    * Get a [ZLibEncoder] for encoding to `ZLib` compressed data.
    */
-  Converter<List<int>, List<int>> get encoder =>
+  ZLibEncoder get encoder =>
       new ZLibEncoder(gzip: false, level: level, windowBits: windowBits,
                       memLevel: memLevel, strategy: strategy,
                       dictionary: dictionary, raw: raw);
@@ -155,7 +155,7 @@
   /**
    * Get a [ZLibDecoder] for decoding `ZLib` compressed data.
    */
-  Converter<List<int>, List<int>> get decoder =>
+  ZLibDecoder get decoder =>
       new ZLibDecoder(windowBits: windowBits, dictionary: dictionary, raw: raw);
 }
 
@@ -259,7 +259,7 @@
   /**
    * Get a [ZLibEncoder] for encoding to `GZip` compressed data.
    */
-  Converter<List<int>, List<int>> get encoder =>
+  ZLibEncoder get encoder =>
       new ZLibEncoder(gzip: true, level: level, windowBits: windowBits,
                       memLevel: memLevel, strategy: strategy,
                       dictionary: dictionary, raw: raw);
@@ -267,7 +267,7 @@
   /**
    * Get a [ZLibDecoder] for decoding `GZip` compressed data.
    */
-  Converter<List<int>, List<int>> get decoder =>
+  ZLibDecoder get decoder =>
       new ZLibDecoder(windowBits: windowBits, dictionary: dictionary, raw: raw);
 }
 
@@ -275,7 +275,8 @@
  * The [ZLibEncoder] encoder is used by [ZLibCodec] and [GZipCodec] to compress
  * data.
  */
-class ZLibEncoder extends Converter<List<int>, List<int>> {
+class ZLibEncoder extends
+    ChunkedConverter<List<int>, List<int>, List<int>, List<int>> {
   /**
    * When true, `GZip` frames will be added to the compressed data.
    */
@@ -378,7 +379,8 @@
 /**
  * The [ZLibDecoder] is used by [ZLibCodec] and [GZipCodec] to decompress data.
  */
-class ZLibDecoder extends Converter<List<int>, List<int>> {
+class ZLibDecoder extends
+    ChunkedConverter<List<int>, List<int>, List<int>, List<int>> {
   /**
    * Base two logarithm of the window size (the size of the history buffer). It
    * should be in the range `8..15`. Larger values result in better compression
@@ -518,7 +520,6 @@
       _closed = true;
       throw e;
     }
-    if (!_closed) _filter.end();
     _closed = true;
     _sink.close();
   }
@@ -545,13 +546,6 @@
    */
   List<int> processed({bool flush: true, bool end: false});
 
-  /**
-   * Mark the filter as closed. Always call this method for any filter created
-   * to avoid leaking resources. [end] can be called at any time, but any
-   * successive calls to [process] or [processed] will fail.
-   */
-  void end();
-
   external static _Filter _newZLibDeflateFilter(bool gzip, int level,
                                                 int windowBits, int memLevel,
                                                 int strategy,
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index cf8dec0..07ef23e 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -842,7 +842,9 @@
   }
 
   void _tryFilter() {
-    if (_status == CLOSED) return;
+    if (_status == CLOSED) {
+      return;
+    }
     if (_filterPending && !_filterActive) {
       _filterActive = true;
       _filterPending = false;
@@ -858,7 +860,9 @@
         if (_filterStatus.writeEmpty && _closedWrite && !_socketClosedWrite) {
           // Checks for and handles all cases of partially closed sockets.
           shutdown(SocketDirection.SEND);
-          if (_status == CLOSED) return;
+          if (_status == CLOSED) {
+            return;
+          }
         }
         if (_filterStatus.readEmpty && _socketClosedRead && !_closedRead) {
           if (_status == HANDSHAKE) {
@@ -870,14 +874,26 @@
           }
           _closeHandler();
         }
-        if (_status == CLOSED) return;
+        if (_status == CLOSED) {
+          return;
+        }
         if (_filterStatus.progress) {
           _filterPending = true;
-          if (_filterStatus.writePlaintextNoLongerFull) _sendWriteEvent();
-          if (_filterStatus.readEncryptedNoLongerFull) _readSocket();
-          if (_filterStatus.writeEncryptedNoLongerEmpty) _writeSocket();
-          if (_filterStatus.readPlaintextNoLongerEmpty) _scheduleReadEvent();
-          if (_status == HANDSHAKE) _secureHandshake();
+          if (_filterStatus.writeEncryptedNoLongerEmpty) {
+            _writeSocket();
+          }
+          if (_filterStatus.writePlaintextNoLongerFull) {
+            _sendWriteEvent();
+          }
+          if (_filterStatus.readEncryptedNoLongerFull) {
+            _readSocket();
+          }
+          if (_filterStatus.readPlaintextNoLongerEmpty) {
+            _scheduleReadEvent();
+          }
+          if (_status == HANDSHAKE) {
+            _secureHandshake();
+          }
         }
         _tryFilter();
       }).catchError(_reportError);
@@ -970,8 +986,16 @@
 
     return _IOService._dispatch(_SSL_PROCESS_FILTER, args).then((response) {
       if (response.length == 2) {
-        _reportError(new TlsException('${response[1]} error ${response[0]}'),
-                     null);
+        if (wasInHandshake) {
+          // If we're in handshake, throw a handshake error.
+          _reportError(
+              new HandshakeException('${response[1]} error ${response[0]}'),
+              null);
+        } else {
+          // If we're connected, throw a TLS error.
+          _reportError(new TlsException('${response[1]} error ${response[0]}'),
+                       null);
+        }
       }
       int start(int index) => response[2 * index];
       int end(int index) => response[2 * index + 1];
diff --git a/sdk/lib/io/security_context.dart b/sdk/lib/io/security_context.dart
index 86dfc96..1909571 100644
--- a/sdk/lib/io/security_context.dart
+++ b/sdk/lib/io/security_context.dart
@@ -14,6 +14,10 @@
  *
  * Certificates and keys can be added to a SecurityContext from either PEM
  * or PKCS12 containers.
+ *
+ * iOS note: Some methods to add, remove, and inspect certificates are not yet
+ * implemented. However, the platform's built-in trusted certificates can
+ * be used, by way of [SecurityContext.defaultContext].
  */
 abstract class SecurityContext {
   external factory SecurityContext();
@@ -24,8 +28,10 @@
    * This object can also be accessed, and modified, directly.
    * Each isolate has a different [defaultContext] object.
    * The [defaultContext] object uses a list of well-known trusted
-   * certificate authorities as its trusted roots.  This list is
-   * taken from Mozilla, who maintains it as part of Firefox.
+   * certificate authorities as its trusted roots. On Linux and Windows, this
+   * list is taken from Mozilla, who maintains it as part of Firefox. On,
+   * MacOS, iOS, and Android, this list comes from the trusted certificates
+   * stores built in to the platforms.
    */
   external static SecurityContext get defaultContext;
 
@@ -41,6 +47,8 @@
    *
    * NB: This function calls [ReadFileAsBytesSync], and will block on file IO.
    * Prefer using [usePrivateKeyBytes].
+   *
+   * iOS note: Not yet implemented.
    */
   void usePrivateKey(String file, {String password});
 
@@ -49,6 +57,8 @@
    *
    * Like [usePrivateKey], but takes the contents of the file as a list
    * of bytes.
+   *
+   * iOS note: Not yet implemented.
    */
   void usePrivateKeyBytes(List<int> keyBytes, {String password});
 
@@ -72,6 +82,13 @@
    * client connections, when connecting to a secure server.
    *
    * Like [setTrustedCertificates] but takes the contents of the file.
+   *
+   * iOS note: On iOS, this call takes only the bytes for a single DER
+   * encoded X509 certificate. It may be called multiple times to add
+   * multiple trusted certificates to the context. A DER encoded certificate
+   * can be obtained from a PEM encoded certificate by using the openssl tool:
+   *
+   *   $ openssl x509 -outform der -in cert.pem -out cert.der
    */
   void setTrustedCertificatesBytes(List<int> certBytes, {String password});
 
@@ -89,6 +106,8 @@
    *
    * NB: This function calls [ReadFileAsBytesSync], and will block on file IO.
    * Prefer using [useCertificateChainBytes].
+   *
+   * iOS note: Not yet implemented.
    */
   void useCertificateChain(String file, {String password});
 
@@ -97,6 +116,8 @@
    * when making secure connections, including the server certificate.
    *
    * Like [useCertificateChain] but takes the contents of the file.
+   *
+   * iOS note: Not yet implemented.
    */
   void useCertificateChainBytes(List<int> chainBytes, {String password});
 
@@ -113,6 +134,8 @@
    *
    * NB: This function calls [ReadFileAsBytesSync], and will block on file IO.
    * Prefer using [setClientAuthoritiesBytes].
+   *
+   * iOS note: Not yet implemented.
    */
   void setClientAuthorities(String file, {String password});
 
@@ -122,10 +145,17 @@
    * client.
    *
    * Like [setClientAuthority] but takes the contents of the file.
+   *
+   * iOS note: Not yet implemented.
    */
   void setClientAuthoritiesBytes(List<int> authCertBytes, {String password});
 
   /**
+   * Whether the platform supports ALPN.
+   */
+  external static bool get alpnSupported;
+
+  /**
    * Sets the list of application-level protocols supported by a client
    * connection or server connection. The ALPN (application level protocol
    * negotiation) extension to TLS allows a client to send a list of
diff --git a/sdk/lib/io/string_transformer.dart b/sdk/lib/io/string_transformer.dart
index 16e721b..b6f4524 100644
--- a/sdk/lib/io/string_transformer.dart
+++ b/sdk/lib/io/string_transformer.dart
@@ -25,7 +25,7 @@
   List<int> encode(String input) => encoder.convert(input);
   String decode(List<int> encoded) => decoder.convert(encoded);
 
-  Converter<String, List<int>> get encoder {
+  ChunkedConverter<String, List<int>, String, List<int>> get encoder {
     if (Platform.operatingSystem == "windows") {
       return const _WindowsCodePageEncoder();
     } else {
@@ -33,7 +33,7 @@
     }
   }
 
-  Converter<List<int>, String> get decoder {
+  ChunkedConverter<List<int>, String, List<int>, String> get decoder {
     if (Platform.operatingSystem == "windows") {
       return const _WindowsCodePageDecoder();
     } else {
@@ -42,7 +42,8 @@
   }
 }
 
-class _WindowsCodePageEncoder extends Converter<String, List<int>> {
+class _WindowsCodePageEncoder
+    extends ChunkedConverter<String, List<int>, String, List<int>> {
 
   const _WindowsCodePageEncoder();
 
@@ -97,7 +98,8 @@
 }
 
 
-class _WindowsCodePageDecoder extends Converter<List<int>, String> {
+class _WindowsCodePageDecoder
+    extends ChunkedConverter<List<int>, String, List<int>, String> {
 
   const _WindowsCodePageDecoder();
 
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index 2aa894c..6acd661 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -581,7 +581,6 @@
 
     if ((serverSide && clientNoContextTakeover) ||
         (!serverSide && serverNoContextTakeover)) {
-      decoder.end();
       decoder = null;
     }
 
@@ -614,7 +613,6 @@
 
     if ((!serverSide && clientNoContextTakeover) ||
         (serverSide && serverNoContextTakeover)) {
-      encoder.end();
       encoder = null;
     }
 
diff --git a/sdk/lib/js/dartium/cached_patches.dart b/sdk/lib/js/dartium/cached_patches.dart
new file mode 100644
index 0000000..f6bb4ab
--- /dev/null
+++ b/sdk/lib/js/dartium/cached_patches.dart
@@ -0,0 +1,6040 @@
+// START_OF_CACHED_PATCHES
+// 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.
+
+// DO NOT EDIT GENERATED FILE.
+
+library cached_patches;
+
+var cached_patches = {
+"dart:html": ["dart:html", "dart:html_js_interop_patch.dart", """import 'dart:js' as js_library;
+
+/**
+ * Placeholder object for cases where we need to determine exactly how many
+ * args were passed to a function.
+ */
+const _UNDEFINED_JS_CONST = const Object();
+
+patch class AbstractWorker {
+  static Type get instanceRuntimeType => AbstractWorkerImpl;
+
+}
+class AbstractWorkerImpl extends AbstractWorker implements js_library.JSObjectInterfacesDom {
+  AbstractWorkerImpl.internal_() : super.internal_();
+  get runtimeType => AbstractWorker;
+  toString() => super.toString();
+}
+patch class AnchorElement {
+  static Type get instanceRuntimeType => AnchorElementImpl;
+
+}
+class AnchorElementImpl extends AnchorElement implements js_library.JSObjectInterfacesDom {
+  AnchorElementImpl.internal_() : super.internal_();
+  get runtimeType => AnchorElement;
+  toString() => super.toString();
+}
+patch class Animation {
+  static Type get instanceRuntimeType => AnimationImpl;
+
+}
+class AnimationImpl extends Animation implements js_library.JSObjectInterfacesDom {
+  AnimationImpl.internal_() : super.internal_();
+  get runtimeType => Animation;
+  toString() => super.toString();
+}
+patch class AnimationEffectReadOnly {
+  static Type get instanceRuntimeType => AnimationEffectReadOnlyImpl;
+
+}
+class AnimationEffectReadOnlyImpl extends AnimationEffectReadOnly implements js_library.JSObjectInterfacesDom {
+  AnimationEffectReadOnlyImpl.internal_() : super.internal_();
+  get runtimeType => AnimationEffectReadOnly;
+  toString() => super.toString();
+}
+patch class AnimationEffectTiming {
+  static Type get instanceRuntimeType => AnimationEffectTimingImpl;
+
+}
+class AnimationEffectTimingImpl extends AnimationEffectTiming implements js_library.JSObjectInterfacesDom {
+  AnimationEffectTimingImpl.internal_() : super.internal_();
+  get runtimeType => AnimationEffectTiming;
+  toString() => super.toString();
+}
+patch class AnimationEvent {
+  static Type get instanceRuntimeType => AnimationEventImpl;
+
+}
+class AnimationEventImpl extends AnimationEvent implements js_library.JSObjectInterfacesDom {
+  AnimationEventImpl.internal_() : super.internal_();
+  get runtimeType => AnimationEvent;
+  toString() => super.toString();
+}
+patch class AnimationPlayerEvent {
+  static Type get instanceRuntimeType => AnimationPlayerEventImpl;
+
+}
+class AnimationPlayerEventImpl extends AnimationPlayerEvent implements js_library.JSObjectInterfacesDom {
+  AnimationPlayerEventImpl.internal_() : super.internal_();
+  get runtimeType => AnimationPlayerEvent;
+  toString() => super.toString();
+}
+patch class AnimationTimeline {
+  static Type get instanceRuntimeType => AnimationTimelineImpl;
+
+}
+class AnimationTimelineImpl extends AnimationTimeline implements js_library.JSObjectInterfacesDom {
+  AnimationTimelineImpl.internal_() : super.internal_();
+  get runtimeType => AnimationTimeline;
+  toString() => super.toString();
+}
+patch class AppBannerPromptResult {
+  static Type get instanceRuntimeType => AppBannerPromptResultImpl;
+
+}
+class AppBannerPromptResultImpl extends AppBannerPromptResult implements js_library.JSObjectInterfacesDom {
+  AppBannerPromptResultImpl.internal_() : super.internal_();
+  get runtimeType => AppBannerPromptResult;
+  toString() => super.toString();
+}
+patch class ApplicationCache {
+  static Type get instanceRuntimeType => ApplicationCacheImpl;
+
+}
+class ApplicationCacheImpl extends ApplicationCache implements js_library.JSObjectInterfacesDom {
+  ApplicationCacheImpl.internal_() : super.internal_();
+  get runtimeType => ApplicationCache;
+  toString() => super.toString();
+}
+patch class ApplicationCacheErrorEvent {
+  static Type get instanceRuntimeType => ApplicationCacheErrorEventImpl;
+
+}
+class ApplicationCacheErrorEventImpl extends ApplicationCacheErrorEvent implements js_library.JSObjectInterfacesDom {
+  ApplicationCacheErrorEventImpl.internal_() : super.internal_();
+  get runtimeType => ApplicationCacheErrorEvent;
+  toString() => super.toString();
+}
+patch class AreaElement {
+  static Type get instanceRuntimeType => AreaElementImpl;
+
+}
+class AreaElementImpl extends AreaElement implements js_library.JSObjectInterfacesDom {
+  AreaElementImpl.internal_() : super.internal_();
+  get runtimeType => AreaElement;
+  toString() => super.toString();
+}
+patch class AudioElement {
+  static Type get instanceRuntimeType => AudioElementImpl;
+
+}
+class AudioElementImpl extends AudioElement implements js_library.JSObjectInterfacesDom {
+  AudioElementImpl.internal_() : super.internal_();
+  get runtimeType => AudioElement;
+  toString() => super.toString();
+}
+patch class AudioTrack {
+  static Type get instanceRuntimeType => AudioTrackImpl;
+
+}
+class AudioTrackImpl extends AudioTrack implements js_library.JSObjectInterfacesDom {
+  AudioTrackImpl.internal_() : super.internal_();
+  get runtimeType => AudioTrack;
+  toString() => super.toString();
+}
+patch class AudioTrackList {
+  static Type get instanceRuntimeType => AudioTrackListImpl;
+
+}
+class AudioTrackListImpl extends AudioTrackList implements js_library.JSObjectInterfacesDom {
+  AudioTrackListImpl.internal_() : super.internal_();
+  get runtimeType => AudioTrackList;
+  toString() => super.toString();
+}
+patch class AutocompleteErrorEvent {
+  static Type get instanceRuntimeType => AutocompleteErrorEventImpl;
+
+}
+class AutocompleteErrorEventImpl extends AutocompleteErrorEvent implements js_library.JSObjectInterfacesDom {
+  AutocompleteErrorEventImpl.internal_() : super.internal_();
+  get runtimeType => AutocompleteErrorEvent;
+  toString() => super.toString();
+}
+patch class BRElement {
+  static Type get instanceRuntimeType => BRElementImpl;
+
+}
+class BRElementImpl extends BRElement implements js_library.JSObjectInterfacesDom {
+  BRElementImpl.internal_() : super.internal_();
+  get runtimeType => BRElement;
+  toString() => super.toString();
+}
+patch class BarProp {
+  static Type get instanceRuntimeType => BarPropImpl;
+
+}
+class BarPropImpl extends BarProp implements js_library.JSObjectInterfacesDom {
+  BarPropImpl.internal_() : super.internal_();
+  get runtimeType => BarProp;
+  toString() => super.toString();
+}
+patch class BaseElement {
+  static Type get instanceRuntimeType => BaseElementImpl;
+
+}
+class BaseElementImpl extends BaseElement implements js_library.JSObjectInterfacesDom {
+  BaseElementImpl.internal_() : super.internal_();
+  get runtimeType => BaseElement;
+  toString() => super.toString();
+}
+patch class BatteryManager {
+  static Type get instanceRuntimeType => BatteryManagerImpl;
+
+}
+class BatteryManagerImpl extends BatteryManager implements js_library.JSObjectInterfacesDom {
+  BatteryManagerImpl.internal_() : super.internal_();
+  get runtimeType => BatteryManager;
+  toString() => super.toString();
+}
+patch class BeforeInstallPromptEvent {
+  static Type get instanceRuntimeType => BeforeInstallPromptEventImpl;
+
+}
+class BeforeInstallPromptEventImpl extends BeforeInstallPromptEvent implements js_library.JSObjectInterfacesDom {
+  BeforeInstallPromptEventImpl.internal_() : super.internal_();
+  get runtimeType => BeforeInstallPromptEvent;
+  toString() => super.toString();
+}
+patch class BeforeUnloadEvent {
+  static Type get instanceRuntimeType => BeforeUnloadEventImpl;
+
+}
+class BeforeUnloadEventImpl extends BeforeUnloadEvent implements js_library.JSObjectInterfacesDom {
+  BeforeUnloadEventImpl.internal_() : super.internal_();
+  get runtimeType => BeforeUnloadEvent;
+  toString() => super.toString();
+}
+patch class Blob {
+  static Type get instanceRuntimeType => BlobImpl;
+
+}
+class BlobImpl extends Blob implements js_library.JSObjectInterfacesDom {
+  BlobImpl.internal_() : super.internal_();
+  get runtimeType => Blob;
+  toString() => super.toString();
+}
+patch class Bluetooth {
+  static Type get instanceRuntimeType => BluetoothImpl;
+
+}
+class BluetoothImpl extends Bluetooth implements js_library.JSObjectInterfacesDom {
+  BluetoothImpl.internal_() : super.internal_();
+  get runtimeType => Bluetooth;
+  toString() => super.toString();
+}
+patch class BluetoothDevice {
+  static Type get instanceRuntimeType => BluetoothDeviceImpl;
+
+}
+class BluetoothDeviceImpl extends BluetoothDevice implements js_library.JSObjectInterfacesDom {
+  BluetoothDeviceImpl.internal_() : super.internal_();
+  get runtimeType => BluetoothDevice;
+  toString() => super.toString();
+}
+patch class BluetoothGattCharacteristic {
+  static Type get instanceRuntimeType => BluetoothGattCharacteristicImpl;
+
+}
+class BluetoothGattCharacteristicImpl extends BluetoothGattCharacteristic implements js_library.JSObjectInterfacesDom {
+  BluetoothGattCharacteristicImpl.internal_() : super.internal_();
+  get runtimeType => BluetoothGattCharacteristic;
+  toString() => super.toString();
+}
+patch class BluetoothGattRemoteServer {
+  static Type get instanceRuntimeType => BluetoothGattRemoteServerImpl;
+
+}
+class BluetoothGattRemoteServerImpl extends BluetoothGattRemoteServer implements js_library.JSObjectInterfacesDom {
+  BluetoothGattRemoteServerImpl.internal_() : super.internal_();
+  get runtimeType => BluetoothGattRemoteServer;
+  toString() => super.toString();
+}
+patch class BluetoothGattService {
+  static Type get instanceRuntimeType => BluetoothGattServiceImpl;
+
+}
+class BluetoothGattServiceImpl extends BluetoothGattService implements js_library.JSObjectInterfacesDom {
+  BluetoothGattServiceImpl.internal_() : super.internal_();
+  get runtimeType => BluetoothGattService;
+  toString() => super.toString();
+}
+patch class BluetoothUuid {
+  static Type get instanceRuntimeType => BluetoothUuidImpl;
+
+}
+class BluetoothUuidImpl extends BluetoothUuid implements js_library.JSObjectInterfacesDom {
+  BluetoothUuidImpl.internal_() : super.internal_();
+  get runtimeType => BluetoothUuid;
+  toString() => super.toString();
+}
+patch class Body {
+  static Type get instanceRuntimeType => BodyImpl;
+
+}
+class BodyImpl extends Body implements js_library.JSObjectInterfacesDom {
+  BodyImpl.internal_() : super.internal_();
+  get runtimeType => Body;
+  toString() => super.toString();
+}
+patch class BodyElement {
+  static Type get instanceRuntimeType => BodyElementImpl;
+
+}
+class BodyElementImpl extends BodyElement implements js_library.JSObjectInterfacesDom {
+  BodyElementImpl.internal_() : super.internal_();
+  get runtimeType => BodyElement;
+  toString() => super.toString();
+}
+patch class ButtonElement {
+  static Type get instanceRuntimeType => ButtonElementImpl;
+
+}
+class ButtonElementImpl extends ButtonElement implements js_library.JSObjectInterfacesDom {
+  ButtonElementImpl.internal_() : super.internal_();
+  get runtimeType => ButtonElement;
+  toString() => super.toString();
+}
+patch class CDataSection {
+  static Type get instanceRuntimeType => CDataSectionImpl;
+
+}
+class CDataSectionImpl extends CDataSection implements js_library.JSObjectInterfacesDom {
+  CDataSectionImpl.internal_() : super.internal_();
+  get runtimeType => CDataSection;
+  toString() => super.toString();
+}
+patch class CacheStorage {
+  static Type get instanceRuntimeType => CacheStorageImpl;
+
+}
+class CacheStorageImpl extends CacheStorage implements js_library.JSObjectInterfacesDom {
+  CacheStorageImpl.internal_() : super.internal_();
+  get runtimeType => CacheStorage;
+  toString() => super.toString();
+}
+patch class CanvasElement {
+  static Type get instanceRuntimeType => CanvasElementImpl;
+
+}
+class CanvasElementImpl extends CanvasElement implements js_library.JSObjectInterfacesDom {
+  CanvasElementImpl.internal_() : super.internal_();
+  get runtimeType => CanvasElement;
+  toString() => super.toString();
+}
+patch class CanvasGradient {
+  static Type get instanceRuntimeType => CanvasGradientImpl;
+
+}
+class CanvasGradientImpl extends CanvasGradient implements js_library.JSObjectInterfacesDom {
+  CanvasGradientImpl.internal_() : super.internal_();
+  get runtimeType => CanvasGradient;
+  toString() => super.toString();
+}
+patch class CanvasPattern {
+  static Type get instanceRuntimeType => CanvasPatternImpl;
+
+}
+class CanvasPatternImpl extends CanvasPattern implements js_library.JSObjectInterfacesDom {
+  CanvasPatternImpl.internal_() : super.internal_();
+  get runtimeType => CanvasPattern;
+  toString() => super.toString();
+}
+patch class CanvasRenderingContext2D {
+  static Type get instanceRuntimeType => CanvasRenderingContext2DImpl;
+
+}
+class CanvasRenderingContext2DImpl extends CanvasRenderingContext2D implements js_library.JSObjectInterfacesDom {
+  CanvasRenderingContext2DImpl.internal_() : super.internal_();
+  get runtimeType => CanvasRenderingContext2D;
+  toString() => super.toString();
+}
+patch class CharacterData {
+  static Type get instanceRuntimeType => CharacterDataImpl;
+
+}
+class CharacterDataImpl extends CharacterData implements js_library.JSObjectInterfacesDom {
+  CharacterDataImpl.internal_() : super.internal_();
+  get runtimeType => CharacterData;
+  toString() => super.toString();
+}
+patch class ChildNode {
+  static Type get instanceRuntimeType => ChildNodeImpl;
+
+}
+class ChildNodeImpl extends ChildNode implements js_library.JSObjectInterfacesDom {
+  ChildNodeImpl.internal_() : super.internal_();
+  get runtimeType => ChildNode;
+  toString() => super.toString();
+}
+patch class ChromiumValuebuffer {
+  static Type get instanceRuntimeType => ChromiumValuebufferImpl;
+
+}
+class ChromiumValuebufferImpl extends ChromiumValuebuffer implements js_library.JSObjectInterfacesDom {
+  ChromiumValuebufferImpl.internal_() : super.internal_();
+  get runtimeType => ChromiumValuebuffer;
+  toString() => super.toString();
+}
+patch class CircularGeofencingRegion {
+  static Type get instanceRuntimeType => CircularGeofencingRegionImpl;
+
+}
+class CircularGeofencingRegionImpl extends CircularGeofencingRegion implements js_library.JSObjectInterfacesDom {
+  CircularGeofencingRegionImpl.internal_() : super.internal_();
+  get runtimeType => CircularGeofencingRegion;
+  toString() => super.toString();
+}
+patch class Client {
+  static Type get instanceRuntimeType => ClientImpl;
+
+}
+class ClientImpl extends Client implements js_library.JSObjectInterfacesDom {
+  ClientImpl.internal_() : super.internal_();
+  get runtimeType => Client;
+  toString() => super.toString();
+}
+patch class Clients {
+  static Type get instanceRuntimeType => ClientsImpl;
+
+}
+class ClientsImpl extends Clients implements js_library.JSObjectInterfacesDom {
+  ClientsImpl.internal_() : super.internal_();
+  get runtimeType => Clients;
+  toString() => super.toString();
+}
+patch class ClipboardEvent {
+  static Type get instanceRuntimeType => ClipboardEventImpl;
+
+}
+class ClipboardEventImpl extends ClipboardEvent implements js_library.JSObjectInterfacesDom {
+  ClipboardEventImpl.internal_() : super.internal_();
+  get runtimeType => ClipboardEvent;
+  toString() => super.toString();
+}
+patch class CloseEvent {
+  static Type get instanceRuntimeType => CloseEventImpl;
+
+}
+class CloseEventImpl extends CloseEvent implements js_library.JSObjectInterfacesDom {
+  CloseEventImpl.internal_() : super.internal_();
+  get runtimeType => CloseEvent;
+  toString() => super.toString();
+}
+patch class Comment {
+  static Type get instanceRuntimeType => CommentImpl;
+
+}
+class CommentImpl extends Comment implements js_library.JSObjectInterfacesDom {
+  CommentImpl.internal_() : super.internal_();
+  get runtimeType => Comment;
+  toString() => super.toString();
+}
+patch class CompositionEvent {
+  static Type get instanceRuntimeType => CompositionEventImpl;
+
+}
+class CompositionEventImpl extends CompositionEvent implements js_library.JSObjectInterfacesDom {
+  CompositionEventImpl.internal_() : super.internal_();
+  get runtimeType => CompositionEvent;
+  toString() => super.toString();
+}
+patch class CompositorProxy {
+  static Type get instanceRuntimeType => CompositorProxyImpl;
+
+}
+class CompositorProxyImpl extends CompositorProxy implements js_library.JSObjectInterfacesDom {
+  CompositorProxyImpl.internal_() : super.internal_();
+  get runtimeType => CompositorProxy;
+  toString() => super.toString();
+}
+patch class CompositorWorker {
+  static Type get instanceRuntimeType => CompositorWorkerImpl;
+
+}
+class CompositorWorkerImpl extends CompositorWorker implements js_library.JSObjectInterfacesDom {
+  CompositorWorkerImpl.internal_() : super.internal_();
+  get runtimeType => CompositorWorker;
+  toString() => super.toString();
+}
+patch class CompositorWorkerGlobalScope {
+  static Type get instanceRuntimeType => CompositorWorkerGlobalScopeImpl;
+
+}
+class CompositorWorkerGlobalScopeImpl extends CompositorWorkerGlobalScope implements js_library.JSObjectInterfacesDom {
+  CompositorWorkerGlobalScopeImpl.internal_() : super.internal_();
+  get runtimeType => CompositorWorkerGlobalScope;
+  toString() => super.toString();
+}
+patch class Console {
+  static Type get instanceRuntimeType => ConsoleImpl;
+
+}
+class ConsoleImpl extends Console implements js_library.JSObjectInterfacesDom {
+  ConsoleImpl.internal_() : super.internal_();
+  get runtimeType => Console;
+  toString() => super.toString();
+}
+patch class ConsoleBase {
+  static Type get instanceRuntimeType => ConsoleBaseImpl;
+
+}
+class ConsoleBaseImpl extends ConsoleBase implements js_library.JSObjectInterfacesDom {
+  ConsoleBaseImpl.internal_() : super.internal_();
+  get runtimeType => ConsoleBase;
+  toString() => super.toString();
+}
+patch class ContentElement {
+  static Type get instanceRuntimeType => ContentElementImpl;
+
+}
+class ContentElementImpl extends ContentElement implements js_library.JSObjectInterfacesDom {
+  ContentElementImpl.internal_() : super.internal_();
+  get runtimeType => ContentElement;
+  toString() => super.toString();
+}
+patch class Coordinates {
+  static Type get instanceRuntimeType => CoordinatesImpl;
+
+}
+class CoordinatesImpl extends Coordinates implements js_library.JSObjectInterfacesDom {
+  CoordinatesImpl.internal_() : super.internal_();
+  get runtimeType => Coordinates;
+  toString() => super.toString();
+}
+patch class Credential {
+  static Type get instanceRuntimeType => CredentialImpl;
+
+}
+class CredentialImpl extends Credential implements js_library.JSObjectInterfacesDom {
+  CredentialImpl.internal_() : super.internal_();
+  get runtimeType => Credential;
+  toString() => super.toString();
+}
+patch class CredentialsContainer {
+  static Type get instanceRuntimeType => CredentialsContainerImpl;
+
+}
+class CredentialsContainerImpl extends CredentialsContainer implements js_library.JSObjectInterfacesDom {
+  CredentialsContainerImpl.internal_() : super.internal_();
+  get runtimeType => CredentialsContainer;
+  toString() => super.toString();
+}
+patch class CrossOriginConnectEvent {
+  static Type get instanceRuntimeType => CrossOriginConnectEventImpl;
+
+}
+class CrossOriginConnectEventImpl extends CrossOriginConnectEvent implements js_library.JSObjectInterfacesDom {
+  CrossOriginConnectEventImpl.internal_() : super.internal_();
+  get runtimeType => CrossOriginConnectEvent;
+  toString() => super.toString();
+}
+patch class CrossOriginServiceWorkerClient {
+  static Type get instanceRuntimeType => CrossOriginServiceWorkerClientImpl;
+
+}
+class CrossOriginServiceWorkerClientImpl extends CrossOriginServiceWorkerClient implements js_library.JSObjectInterfacesDom {
+  CrossOriginServiceWorkerClientImpl.internal_() : super.internal_();
+  get runtimeType => CrossOriginServiceWorkerClient;
+  toString() => super.toString();
+}
+patch class Crypto {
+  static Type get instanceRuntimeType => CryptoImpl;
+
+}
+class CryptoImpl extends Crypto implements js_library.JSObjectInterfacesDom {
+  CryptoImpl.internal_() : super.internal_();
+  get runtimeType => Crypto;
+  toString() => super.toString();
+}
+patch class CryptoKey {
+  static Type get instanceRuntimeType => CryptoKeyImpl;
+
+}
+class CryptoKeyImpl extends CryptoKey implements js_library.JSObjectInterfacesDom {
+  CryptoKeyImpl.internal_() : super.internal_();
+  get runtimeType => CryptoKey;
+  toString() => super.toString();
+}
+patch class Css {
+  static Type get instanceRuntimeType => CssImpl;
+
+}
+class CssImpl extends Css implements js_library.JSObjectInterfacesDom {
+  CssImpl.internal_() : super.internal_();
+  get runtimeType => Css;
+  toString() => super.toString();
+}
+patch class CssCharsetRule {
+  static Type get instanceRuntimeType => CssCharsetRuleImpl;
+
+}
+class CssCharsetRuleImpl extends CssCharsetRule implements js_library.JSObjectInterfacesDom {
+  CssCharsetRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssCharsetRule;
+  toString() => super.toString();
+}
+patch class CssFontFaceRule {
+  static Type get instanceRuntimeType => CssFontFaceRuleImpl;
+
+}
+class CssFontFaceRuleImpl extends CssFontFaceRule implements js_library.JSObjectInterfacesDom {
+  CssFontFaceRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssFontFaceRule;
+  toString() => super.toString();
+}
+patch class CssGroupingRule {
+  static Type get instanceRuntimeType => CssGroupingRuleImpl;
+
+}
+class CssGroupingRuleImpl extends CssGroupingRule implements js_library.JSObjectInterfacesDom {
+  CssGroupingRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssGroupingRule;
+  toString() => super.toString();
+}
+patch class CssImportRule {
+  static Type get instanceRuntimeType => CssImportRuleImpl;
+
+}
+class CssImportRuleImpl extends CssImportRule implements js_library.JSObjectInterfacesDom {
+  CssImportRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssImportRule;
+  toString() => super.toString();
+}
+patch class CssKeyframeRule {
+  static Type get instanceRuntimeType => CssKeyframeRuleImpl;
+
+}
+class CssKeyframeRuleImpl extends CssKeyframeRule implements js_library.JSObjectInterfacesDom {
+  CssKeyframeRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssKeyframeRule;
+  toString() => super.toString();
+}
+patch class CssKeyframesRule {
+  static Type get instanceRuntimeType => CssKeyframesRuleImpl;
+
+}
+class CssKeyframesRuleImpl extends CssKeyframesRule implements js_library.JSObjectInterfacesDom {
+  CssKeyframesRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssKeyframesRule;
+  toString() => super.toString();
+}
+patch class CssMediaRule {
+  static Type get instanceRuntimeType => CssMediaRuleImpl;
+
+}
+class CssMediaRuleImpl extends CssMediaRule implements js_library.JSObjectInterfacesDom {
+  CssMediaRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssMediaRule;
+  toString() => super.toString();
+}
+patch class CssPageRule {
+  static Type get instanceRuntimeType => CssPageRuleImpl;
+
+}
+class CssPageRuleImpl extends CssPageRule implements js_library.JSObjectInterfacesDom {
+  CssPageRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssPageRule;
+  toString() => super.toString();
+}
+patch class CssRule {
+  static Type get instanceRuntimeType => CssRuleImpl;
+
+}
+class CssRuleImpl extends CssRule implements js_library.JSObjectInterfacesDom {
+  CssRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssRule;
+  toString() => super.toString();
+}
+patch class CssStyleDeclaration {
+  static Type get instanceRuntimeType => CssStyleDeclarationImpl;
+
+}
+class CssStyleDeclarationImpl extends CssStyleDeclaration implements js_library.JSObjectInterfacesDom {
+  CssStyleDeclarationImpl.internal_() : super.internal_();
+  get runtimeType => CssStyleDeclaration;
+  toString() => super.toString();
+}
+patch class CssStyleRule {
+  static Type get instanceRuntimeType => CssStyleRuleImpl;
+
+}
+class CssStyleRuleImpl extends CssStyleRule implements js_library.JSObjectInterfacesDom {
+  CssStyleRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssStyleRule;
+  toString() => super.toString();
+}
+patch class CssStyleSheet {
+  static Type get instanceRuntimeType => CssStyleSheetImpl;
+
+}
+class CssStyleSheetImpl extends CssStyleSheet implements js_library.JSObjectInterfacesDom {
+  CssStyleSheetImpl.internal_() : super.internal_();
+  get runtimeType => CssStyleSheet;
+  toString() => super.toString();
+}
+patch class CssSupportsRule {
+  static Type get instanceRuntimeType => CssSupportsRuleImpl;
+
+}
+class CssSupportsRuleImpl extends CssSupportsRule implements js_library.JSObjectInterfacesDom {
+  CssSupportsRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssSupportsRule;
+  toString() => super.toString();
+}
+patch class CssViewportRule {
+  static Type get instanceRuntimeType => CssViewportRuleImpl;
+
+}
+class CssViewportRuleImpl extends CssViewportRule implements js_library.JSObjectInterfacesDom {
+  CssViewportRuleImpl.internal_() : super.internal_();
+  get runtimeType => CssViewportRule;
+  toString() => super.toString();
+}
+patch class CustomEvent {
+  static Type get instanceRuntimeType => CustomEventImpl;
+
+}
+class CustomEventImpl extends CustomEvent implements js_library.JSObjectInterfacesDom {
+  CustomEventImpl.internal_() : super.internal_();
+  get runtimeType => CustomEvent;
+  toString() => super.toString();
+}
+patch class DListElement {
+  static Type get instanceRuntimeType => DListElementImpl;
+
+}
+class DListElementImpl extends DListElement implements js_library.JSObjectInterfacesDom {
+  DListElementImpl.internal_() : super.internal_();
+  get runtimeType => DListElement;
+  toString() => super.toString();
+}
+patch class DataListElement {
+  static Type get instanceRuntimeType => DataListElementImpl;
+
+}
+class DataListElementImpl extends DataListElement implements js_library.JSObjectInterfacesDom {
+  DataListElementImpl.internal_() : super.internal_();
+  get runtimeType => DataListElement;
+  toString() => super.toString();
+}
+patch class DataTransfer {
+  static Type get instanceRuntimeType => DataTransferImpl;
+
+}
+class DataTransferImpl extends DataTransfer implements js_library.JSObjectInterfacesDom {
+  DataTransferImpl.internal_() : super.internal_();
+  get runtimeType => DataTransfer;
+  toString() => super.toString();
+}
+patch class DataTransferItem {
+  static Type get instanceRuntimeType => DataTransferItemImpl;
+
+}
+class DataTransferItemImpl extends DataTransferItem implements js_library.JSObjectInterfacesDom {
+  DataTransferItemImpl.internal_() : super.internal_();
+  get runtimeType => DataTransferItem;
+  toString() => super.toString();
+}
+patch class DataTransferItemList {
+  static Type get instanceRuntimeType => DataTransferItemListImpl;
+
+}
+class DataTransferItemListImpl extends DataTransferItemList implements js_library.JSObjectInterfacesDom {
+  DataTransferItemListImpl.internal_() : super.internal_();
+  get runtimeType => DataTransferItemList;
+  toString() => super.toString();
+}
+patch class DedicatedWorkerGlobalScope {
+  static Type get instanceRuntimeType => DedicatedWorkerGlobalScopeImpl;
+
+}
+class DedicatedWorkerGlobalScopeImpl extends DedicatedWorkerGlobalScope implements js_library.JSObjectInterfacesDom {
+  DedicatedWorkerGlobalScopeImpl.internal_() : super.internal_();
+  get runtimeType => DedicatedWorkerGlobalScope;
+  toString() => super.toString();
+}
+patch class DefaultSessionStartEvent {
+  static Type get instanceRuntimeType => DefaultSessionStartEventImpl;
+
+}
+class DefaultSessionStartEventImpl extends DefaultSessionStartEvent implements js_library.JSObjectInterfacesDom {
+  DefaultSessionStartEventImpl.internal_() : super.internal_();
+  get runtimeType => DefaultSessionStartEvent;
+  toString() => super.toString();
+}
+patch class DeprecatedStorageInfo {
+  static Type get instanceRuntimeType => DeprecatedStorageInfoImpl;
+
+}
+class DeprecatedStorageInfoImpl extends DeprecatedStorageInfo implements js_library.JSObjectInterfacesDom {
+  DeprecatedStorageInfoImpl.internal_() : super.internal_();
+  get runtimeType => DeprecatedStorageInfo;
+  toString() => super.toString();
+}
+patch class DeprecatedStorageQuota {
+  static Type get instanceRuntimeType => DeprecatedStorageQuotaImpl;
+
+}
+class DeprecatedStorageQuotaImpl extends DeprecatedStorageQuota implements js_library.JSObjectInterfacesDom {
+  DeprecatedStorageQuotaImpl.internal_() : super.internal_();
+  get runtimeType => DeprecatedStorageQuota;
+  toString() => super.toString();
+}
+patch class DetailsElement {
+  static Type get instanceRuntimeType => DetailsElementImpl;
+
+}
+class DetailsElementImpl extends DetailsElement implements js_library.JSObjectInterfacesDom {
+  DetailsElementImpl.internal_() : super.internal_();
+  get runtimeType => DetailsElement;
+  toString() => super.toString();
+}
+patch class DeviceAcceleration {
+  static Type get instanceRuntimeType => DeviceAccelerationImpl;
+
+}
+class DeviceAccelerationImpl extends DeviceAcceleration implements js_library.JSObjectInterfacesDom {
+  DeviceAccelerationImpl.internal_() : super.internal_();
+  get runtimeType => DeviceAcceleration;
+  toString() => super.toString();
+}
+patch class DeviceLightEvent {
+  static Type get instanceRuntimeType => DeviceLightEventImpl;
+
+}
+class DeviceLightEventImpl extends DeviceLightEvent implements js_library.JSObjectInterfacesDom {
+  DeviceLightEventImpl.internal_() : super.internal_();
+  get runtimeType => DeviceLightEvent;
+  toString() => super.toString();
+}
+patch class DeviceMotionEvent {
+  static Type get instanceRuntimeType => DeviceMotionEventImpl;
+
+}
+class DeviceMotionEventImpl extends DeviceMotionEvent implements js_library.JSObjectInterfacesDom {
+  DeviceMotionEventImpl.internal_() : super.internal_();
+  get runtimeType => DeviceMotionEvent;
+  toString() => super.toString();
+}
+patch class DeviceOrientationEvent {
+  static Type get instanceRuntimeType => DeviceOrientationEventImpl;
+
+}
+class DeviceOrientationEventImpl extends DeviceOrientationEvent implements js_library.JSObjectInterfacesDom {
+  DeviceOrientationEventImpl.internal_() : super.internal_();
+  get runtimeType => DeviceOrientationEvent;
+  toString() => super.toString();
+}
+patch class DeviceRotationRate {
+  static Type get instanceRuntimeType => DeviceRotationRateImpl;
+
+}
+class DeviceRotationRateImpl extends DeviceRotationRate implements js_library.JSObjectInterfacesDom {
+  DeviceRotationRateImpl.internal_() : super.internal_();
+  get runtimeType => DeviceRotationRate;
+  toString() => super.toString();
+}
+patch class DialogElement {
+  static Type get instanceRuntimeType => DialogElementImpl;
+
+}
+class DialogElementImpl extends DialogElement implements js_library.JSObjectInterfacesDom {
+  DialogElementImpl.internal_() : super.internal_();
+  get runtimeType => DialogElement;
+  toString() => super.toString();
+}
+patch class DirectoryEntry {
+  static Type get instanceRuntimeType => DirectoryEntryImpl;
+
+}
+class DirectoryEntryImpl extends DirectoryEntry implements js_library.JSObjectInterfacesDom {
+  DirectoryEntryImpl.internal_() : super.internal_();
+  get runtimeType => DirectoryEntry;
+  toString() => super.toString();
+}
+patch class DirectoryReader {
+  static Type get instanceRuntimeType => DirectoryReaderImpl;
+
+}
+class DirectoryReaderImpl extends DirectoryReader implements js_library.JSObjectInterfacesDom {
+  DirectoryReaderImpl.internal_() : super.internal_();
+  get runtimeType => DirectoryReader;
+  toString() => super.toString();
+}
+patch class DivElement {
+  static Type get instanceRuntimeType => DivElementImpl;
+
+}
+class DivElementImpl extends DivElement implements js_library.JSObjectInterfacesDom {
+  DivElementImpl.internal_() : super.internal_();
+  get runtimeType => DivElement;
+  toString() => super.toString();
+}
+patch class Document {
+  static Type get instanceRuntimeType => DocumentImpl;
+
+}
+class DocumentImpl extends Document implements js_library.JSObjectInterfacesDom {
+  DocumentImpl.internal_() : super.internal_();
+  get runtimeType => Document;
+  toString() => super.toString();
+}
+patch class DocumentFragment {
+  static Type get instanceRuntimeType => DocumentFragmentImpl;
+
+}
+class DocumentFragmentImpl extends DocumentFragment implements js_library.JSObjectInterfacesDom {
+  DocumentFragmentImpl.internal_() : super.internal_();
+  get runtimeType => DocumentFragment;
+  toString() => super.toString();
+}
+patch class DomError {
+  static Type get instanceRuntimeType => DomErrorImpl;
+
+}
+class DomErrorImpl extends DomError implements js_library.JSObjectInterfacesDom {
+  DomErrorImpl.internal_() : super.internal_();
+  get runtimeType => DomError;
+  toString() => super.toString();
+}
+patch class DomException {
+  static Type get instanceRuntimeType => DomExceptionImpl;
+
+}
+class DomExceptionImpl extends DomException implements js_library.JSObjectInterfacesDom {
+  DomExceptionImpl.internal_() : super.internal_();
+  get runtimeType => DomException;
+  toString() => super.toString();
+}
+patch class DomImplementation {
+  static Type get instanceRuntimeType => DomImplementationImpl;
+
+}
+class DomImplementationImpl extends DomImplementation implements js_library.JSObjectInterfacesDom {
+  DomImplementationImpl.internal_() : super.internal_();
+  get runtimeType => DomImplementation;
+  toString() => super.toString();
+}
+patch class DomIterator {
+  static Type get instanceRuntimeType => DomIteratorImpl;
+
+}
+class DomIteratorImpl extends DomIterator implements js_library.JSObjectInterfacesDom {
+  DomIteratorImpl.internal_() : super.internal_();
+  get runtimeType => DomIterator;
+  toString() => super.toString();
+}
+patch class DomMatrix {
+  static Type get instanceRuntimeType => DomMatrixImpl;
+
+}
+class DomMatrixImpl extends DomMatrix implements js_library.JSObjectInterfacesDom {
+  DomMatrixImpl.internal_() : super.internal_();
+  get runtimeType => DomMatrix;
+  toString() => super.toString();
+}
+patch class DomMatrixReadOnly {
+  static Type get instanceRuntimeType => DomMatrixReadOnlyImpl;
+
+}
+class DomMatrixReadOnlyImpl extends DomMatrixReadOnly implements js_library.JSObjectInterfacesDom {
+  DomMatrixReadOnlyImpl.internal_() : super.internal_();
+  get runtimeType => DomMatrixReadOnly;
+  toString() => super.toString();
+}
+patch class DomParser {
+  static Type get instanceRuntimeType => DomParserImpl;
+
+}
+class DomParserImpl extends DomParser implements js_library.JSObjectInterfacesDom {
+  DomParserImpl.internal_() : super.internal_();
+  get runtimeType => DomParser;
+  toString() => super.toString();
+}
+patch class DomPoint {
+  static Type get instanceRuntimeType => DomPointImpl;
+
+}
+class DomPointImpl extends DomPoint implements js_library.JSObjectInterfacesDom {
+  DomPointImpl.internal_() : super.internal_();
+  get runtimeType => DomPoint;
+  toString() => super.toString();
+}
+patch class DomPointReadOnly {
+  static Type get instanceRuntimeType => DomPointReadOnlyImpl;
+
+}
+class DomPointReadOnlyImpl extends DomPointReadOnly implements js_library.JSObjectInterfacesDom {
+  DomPointReadOnlyImpl.internal_() : super.internal_();
+  get runtimeType => DomPointReadOnly;
+  toString() => super.toString();
+}
+patch class DomRectReadOnly {
+  static Type get instanceRuntimeType => DomRectReadOnlyImpl;
+
+}
+class DomRectReadOnlyImpl extends DomRectReadOnly implements js_library.JSObjectInterfacesDom {
+  DomRectReadOnlyImpl.internal_() : super.internal_();
+  get runtimeType => DomRectReadOnly;
+  toString() => super.toString();
+}
+patch class DomSettableTokenList {
+  static Type get instanceRuntimeType => DomSettableTokenListImpl;
+
+}
+class DomSettableTokenListImpl extends DomSettableTokenList implements js_library.JSObjectInterfacesDom {
+  DomSettableTokenListImpl.internal_() : super.internal_();
+  get runtimeType => DomSettableTokenList;
+  toString() => super.toString();
+}
+patch class DomStringList {
+  static Type get instanceRuntimeType => DomStringListImpl;
+
+}
+class DomStringListImpl extends DomStringList implements js_library.JSObjectInterfacesDom {
+  DomStringListImpl.internal_() : super.internal_();
+  get runtimeType => DomStringList;
+  toString() => super.toString();
+}
+patch class DomStringMap {
+  static Type get instanceRuntimeType => DomStringMapImpl;
+
+}
+class DomStringMapImpl extends DomStringMap implements js_library.JSObjectInterfacesDom {
+  DomStringMapImpl.internal_() : super.internal_();
+  get runtimeType => DomStringMap;
+  toString() => super.toString();
+}
+patch class DomTokenList {
+  static Type get instanceRuntimeType => DomTokenListImpl;
+
+}
+class DomTokenListImpl extends DomTokenList implements js_library.JSObjectInterfacesDom {
+  DomTokenListImpl.internal_() : super.internal_();
+  get runtimeType => DomTokenList;
+  toString() => super.toString();
+}
+patch class EffectModel {
+  static Type get instanceRuntimeType => EffectModelImpl;
+
+}
+class EffectModelImpl extends EffectModel implements js_library.JSObjectInterfacesDom {
+  EffectModelImpl.internal_() : super.internal_();
+  get runtimeType => EffectModel;
+  toString() => super.toString();
+}
+patch class Element {
+  static Type get instanceRuntimeType => ElementImpl;
+
+}
+class ElementImpl extends Element implements js_library.JSObjectInterfacesDom {
+  ElementImpl.internal_() : super.internal_();
+  get runtimeType => Element;
+  toString() => super.toString();
+}
+patch class EmbedElement {
+  static Type get instanceRuntimeType => EmbedElementImpl;
+
+}
+class EmbedElementImpl extends EmbedElement implements js_library.JSObjectInterfacesDom {
+  EmbedElementImpl.internal_() : super.internal_();
+  get runtimeType => EmbedElement;
+  toString() => super.toString();
+}
+patch class Entry {
+  static Type get instanceRuntimeType => EntryImpl;
+
+}
+class EntryImpl extends Entry implements js_library.JSObjectInterfacesDom {
+  EntryImpl.internal_() : super.internal_();
+  get runtimeType => Entry;
+  toString() => super.toString();
+}
+patch class ErrorEvent {
+  static Type get instanceRuntimeType => ErrorEventImpl;
+
+}
+class ErrorEventImpl extends ErrorEvent implements js_library.JSObjectInterfacesDom {
+  ErrorEventImpl.internal_() : super.internal_();
+  get runtimeType => ErrorEvent;
+  toString() => super.toString();
+}
+patch class Event {
+  static Type get instanceRuntimeType => EventImpl;
+
+}
+class EventImpl extends Event implements js_library.JSObjectInterfacesDom {
+  EventImpl.internal_() : super.internal_();
+  get runtimeType => Event;
+  toString() => super.toString();
+}
+patch class EventSource {
+  static Type get instanceRuntimeType => EventSourceImpl;
+
+}
+class EventSourceImpl extends EventSource implements js_library.JSObjectInterfacesDom {
+  EventSourceImpl.internal_() : super.internal_();
+  get runtimeType => EventSource;
+  toString() => super.toString();
+}
+patch class EventTarget {
+  static Type get instanceRuntimeType => EventTargetImpl;
+
+}
+class EventTargetImpl extends EventTarget implements js_library.JSObjectInterfacesDom {
+  EventTargetImpl.internal_() : super.internal_();
+  get runtimeType => EventTarget;
+  toString() => super.toString();
+}
+patch class ExtendableEvent {
+  static Type get instanceRuntimeType => ExtendableEventImpl;
+
+}
+class ExtendableEventImpl extends ExtendableEvent implements js_library.JSObjectInterfacesDom {
+  ExtendableEventImpl.internal_() : super.internal_();
+  get runtimeType => ExtendableEvent;
+  toString() => super.toString();
+}
+patch class FederatedCredential {
+  static Type get instanceRuntimeType => FederatedCredentialImpl;
+
+}
+class FederatedCredentialImpl extends FederatedCredential implements js_library.JSObjectInterfacesDom {
+  FederatedCredentialImpl.internal_() : super.internal_();
+  get runtimeType => FederatedCredential;
+  toString() => super.toString();
+}
+patch class FetchEvent {
+  static Type get instanceRuntimeType => FetchEventImpl;
+
+}
+class FetchEventImpl extends FetchEvent implements js_library.JSObjectInterfacesDom {
+  FetchEventImpl.internal_() : super.internal_();
+  get runtimeType => FetchEvent;
+  toString() => super.toString();
+}
+patch class FieldSetElement {
+  static Type get instanceRuntimeType => FieldSetElementImpl;
+
+}
+class FieldSetElementImpl extends FieldSetElement implements js_library.JSObjectInterfacesDom {
+  FieldSetElementImpl.internal_() : super.internal_();
+  get runtimeType => FieldSetElement;
+  toString() => super.toString();
+}
+patch class File {
+  static Type get instanceRuntimeType => FileImpl;
+
+}
+class FileImpl extends File implements js_library.JSObjectInterfacesDom {
+  FileImpl.internal_() : super.internal_();
+  get runtimeType => File;
+  toString() => super.toString();
+}
+patch class FileEntry {
+  static Type get instanceRuntimeType => FileEntryImpl;
+
+}
+class FileEntryImpl extends FileEntry implements js_library.JSObjectInterfacesDom {
+  FileEntryImpl.internal_() : super.internal_();
+  get runtimeType => FileEntry;
+  toString() => super.toString();
+}
+patch class FileError {
+  static Type get instanceRuntimeType => FileErrorImpl;
+
+}
+class FileErrorImpl extends FileError implements js_library.JSObjectInterfacesDom {
+  FileErrorImpl.internal_() : super.internal_();
+  get runtimeType => FileError;
+  toString() => super.toString();
+}
+patch class FileList {
+  static Type get instanceRuntimeType => FileListImpl;
+
+}
+class FileListImpl extends FileList implements js_library.JSObjectInterfacesDom {
+  FileListImpl.internal_() : super.internal_();
+  get runtimeType => FileList;
+  toString() => super.toString();
+}
+patch class FileReader {
+  static Type get instanceRuntimeType => FileReaderImpl;
+
+}
+class FileReaderImpl extends FileReader implements js_library.JSObjectInterfacesDom {
+  FileReaderImpl.internal_() : super.internal_();
+  get runtimeType => FileReader;
+  toString() => super.toString();
+}
+patch class FileStream {
+  static Type get instanceRuntimeType => FileStreamImpl;
+
+}
+class FileStreamImpl extends FileStream implements js_library.JSObjectInterfacesDom {
+  FileStreamImpl.internal_() : super.internal_();
+  get runtimeType => FileStream;
+  toString() => super.toString();
+}
+patch class FileSystem {
+  static Type get instanceRuntimeType => FileSystemImpl;
+
+}
+class FileSystemImpl extends FileSystem implements js_library.JSObjectInterfacesDom {
+  FileSystemImpl.internal_() : super.internal_();
+  get runtimeType => FileSystem;
+  toString() => super.toString();
+}
+patch class FileWriter {
+  static Type get instanceRuntimeType => FileWriterImpl;
+
+}
+class FileWriterImpl extends FileWriter implements js_library.JSObjectInterfacesDom {
+  FileWriterImpl.internal_() : super.internal_();
+  get runtimeType => FileWriter;
+  toString() => super.toString();
+}
+patch class FocusEvent {
+  static Type get instanceRuntimeType => FocusEventImpl;
+
+}
+class FocusEventImpl extends FocusEvent implements js_library.JSObjectInterfacesDom {
+  FocusEventImpl.internal_() : super.internal_();
+  get runtimeType => FocusEvent;
+  toString() => super.toString();
+}
+patch class FontFace {
+  static Type get instanceRuntimeType => FontFaceImpl;
+
+}
+class FontFaceImpl extends FontFace implements js_library.JSObjectInterfacesDom {
+  FontFaceImpl.internal_() : super.internal_();
+  get runtimeType => FontFace;
+  toString() => super.toString();
+}
+patch class FontFaceSet {
+  static Type get instanceRuntimeType => FontFaceSetImpl;
+
+}
+class FontFaceSetImpl extends FontFaceSet implements js_library.JSObjectInterfacesDom {
+  FontFaceSetImpl.internal_() : super.internal_();
+  get runtimeType => FontFaceSet;
+  toString() => super.toString();
+}
+patch class FontFaceSetLoadEvent {
+  static Type get instanceRuntimeType => FontFaceSetLoadEventImpl;
+
+}
+class FontFaceSetLoadEventImpl extends FontFaceSetLoadEvent implements js_library.JSObjectInterfacesDom {
+  FontFaceSetLoadEventImpl.internal_() : super.internal_();
+  get runtimeType => FontFaceSetLoadEvent;
+  toString() => super.toString();
+}
+patch class FormData {
+  static Type get instanceRuntimeType => FormDataImpl;
+
+}
+class FormDataImpl extends FormData implements js_library.JSObjectInterfacesDom {
+  FormDataImpl.internal_() : super.internal_();
+  get runtimeType => FormData;
+  toString() => super.toString();
+}
+patch class FormElement {
+  static Type get instanceRuntimeType => FormElementImpl;
+
+}
+class FormElementImpl extends FormElement implements js_library.JSObjectInterfacesDom {
+  FormElementImpl.internal_() : super.internal_();
+  get runtimeType => FormElement;
+  toString() => super.toString();
+}
+patch class Gamepad {
+  static Type get instanceRuntimeType => GamepadImpl;
+
+}
+class GamepadImpl extends Gamepad implements js_library.JSObjectInterfacesDom {
+  GamepadImpl.internal_() : super.internal_();
+  get runtimeType => Gamepad;
+  toString() => super.toString();
+}
+patch class GamepadButton {
+  static Type get instanceRuntimeType => GamepadButtonImpl;
+
+}
+class GamepadButtonImpl extends GamepadButton implements js_library.JSObjectInterfacesDom {
+  GamepadButtonImpl.internal_() : super.internal_();
+  get runtimeType => GamepadButton;
+  toString() => super.toString();
+}
+patch class GamepadEvent {
+  static Type get instanceRuntimeType => GamepadEventImpl;
+
+}
+class GamepadEventImpl extends GamepadEvent implements js_library.JSObjectInterfacesDom {
+  GamepadEventImpl.internal_() : super.internal_();
+  get runtimeType => GamepadEvent;
+  toString() => super.toString();
+}
+patch class Geofencing {
+  static Type get instanceRuntimeType => GeofencingImpl;
+
+}
+class GeofencingImpl extends Geofencing implements js_library.JSObjectInterfacesDom {
+  GeofencingImpl.internal_() : super.internal_();
+  get runtimeType => Geofencing;
+  toString() => super.toString();
+}
+patch class GeofencingEvent {
+  static Type get instanceRuntimeType => GeofencingEventImpl;
+
+}
+class GeofencingEventImpl extends GeofencingEvent implements js_library.JSObjectInterfacesDom {
+  GeofencingEventImpl.internal_() : super.internal_();
+  get runtimeType => GeofencingEvent;
+  toString() => super.toString();
+}
+patch class GeofencingRegion {
+  static Type get instanceRuntimeType => GeofencingRegionImpl;
+
+}
+class GeofencingRegionImpl extends GeofencingRegion implements js_library.JSObjectInterfacesDom {
+  GeofencingRegionImpl.internal_() : super.internal_();
+  get runtimeType => GeofencingRegion;
+  toString() => super.toString();
+}
+patch class Geolocation {
+  static Type get instanceRuntimeType => GeolocationImpl;
+
+}
+class GeolocationImpl extends Geolocation implements js_library.JSObjectInterfacesDom {
+  GeolocationImpl.internal_() : super.internal_();
+  get runtimeType => Geolocation;
+  toString() => super.toString();
+}
+patch class Geoposition {
+  static Type get instanceRuntimeType => GeopositionImpl;
+
+}
+class GeopositionImpl extends Geoposition implements js_library.JSObjectInterfacesDom {
+  GeopositionImpl.internal_() : super.internal_();
+  get runtimeType => Geoposition;
+  toString() => super.toString();
+}
+patch class GlobalEventHandlers {
+  static Type get instanceRuntimeType => GlobalEventHandlersImpl;
+
+}
+class GlobalEventHandlersImpl extends GlobalEventHandlers implements js_library.JSObjectInterfacesDom {
+  GlobalEventHandlersImpl.internal_() : super.internal_();
+  get runtimeType => GlobalEventHandlers;
+  toString() => super.toString();
+}
+patch class HRElement {
+  static Type get instanceRuntimeType => HRElementImpl;
+
+}
+class HRElementImpl extends HRElement implements js_library.JSObjectInterfacesDom {
+  HRElementImpl.internal_() : super.internal_();
+  get runtimeType => HRElement;
+  toString() => super.toString();
+}
+patch class HashChangeEvent {
+  static Type get instanceRuntimeType => HashChangeEventImpl;
+
+}
+class HashChangeEventImpl extends HashChangeEvent implements js_library.JSObjectInterfacesDom {
+  HashChangeEventImpl.internal_() : super.internal_();
+  get runtimeType => HashChangeEvent;
+  toString() => super.toString();
+}
+patch class HeadElement {
+  static Type get instanceRuntimeType => HeadElementImpl;
+
+}
+class HeadElementImpl extends HeadElement implements js_library.JSObjectInterfacesDom {
+  HeadElementImpl.internal_() : super.internal_();
+  get runtimeType => HeadElement;
+  toString() => super.toString();
+}
+patch class Headers {
+  static Type get instanceRuntimeType => HeadersImpl;
+
+}
+class HeadersImpl extends Headers implements js_library.JSObjectInterfacesDom {
+  HeadersImpl.internal_() : super.internal_();
+  get runtimeType => Headers;
+  toString() => super.toString();
+}
+patch class HeadingElement {
+  static Type get instanceRuntimeType => HeadingElementImpl;
+
+}
+class HeadingElementImpl extends HeadingElement implements js_library.JSObjectInterfacesDom {
+  HeadingElementImpl.internal_() : super.internal_();
+  get runtimeType => HeadingElement;
+  toString() => super.toString();
+}
+patch class History {
+  static Type get instanceRuntimeType => HistoryImpl;
+
+}
+class HistoryImpl extends History implements js_library.JSObjectInterfacesDom {
+  HistoryImpl.internal_() : super.internal_();
+  get runtimeType => History;
+  toString() => super.toString();
+}
+patch class HmdvrDevice {
+  static Type get instanceRuntimeType => HmdvrDeviceImpl;
+
+}
+class HmdvrDeviceImpl extends HmdvrDevice implements js_library.JSObjectInterfacesDom {
+  HmdvrDeviceImpl.internal_() : super.internal_();
+  get runtimeType => HmdvrDevice;
+  toString() => super.toString();
+}
+patch class HtmlCollection {
+  static Type get instanceRuntimeType => HtmlCollectionImpl;
+
+}
+class HtmlCollectionImpl extends HtmlCollection implements js_library.JSObjectInterfacesDom {
+  HtmlCollectionImpl.internal_() : super.internal_();
+  get runtimeType => HtmlCollection;
+  toString() => super.toString();
+}
+patch class HtmlDocument {
+  static Type get instanceRuntimeType => HtmlDocumentImpl;
+
+}
+class HtmlDocumentImpl extends HtmlDocument implements js_library.JSObjectInterfacesDom {
+  HtmlDocumentImpl.internal_() : super.internal_();
+  get runtimeType => HtmlDocument;
+  toString() => super.toString();
+}
+patch class HtmlElement {
+  static Type get instanceRuntimeType => HtmlElementImpl;
+
+}
+class HtmlElementImpl extends HtmlElement implements js_library.JSObjectInterfacesDom {
+  HtmlElementImpl.internal_() : super.internal_();
+  get runtimeType => HtmlElement;
+  toString() => super.toString();
+}
+patch class HtmlFormControlsCollection {
+  static Type get instanceRuntimeType => HtmlFormControlsCollectionImpl;
+
+}
+class HtmlFormControlsCollectionImpl extends HtmlFormControlsCollection implements js_library.JSObjectInterfacesDom {
+  HtmlFormControlsCollectionImpl.internal_() : super.internal_();
+  get runtimeType => HtmlFormControlsCollection;
+  toString() => super.toString();
+}
+patch class HtmlHtmlElement {
+  static Type get instanceRuntimeType => HtmlHtmlElementImpl;
+
+}
+class HtmlHtmlElementImpl extends HtmlHtmlElement implements js_library.JSObjectInterfacesDom {
+  HtmlHtmlElementImpl.internal_() : super.internal_();
+  get runtimeType => HtmlHtmlElement;
+  toString() => super.toString();
+}
+patch class HtmlOptionsCollection {
+  static Type get instanceRuntimeType => HtmlOptionsCollectionImpl;
+
+}
+class HtmlOptionsCollectionImpl extends HtmlOptionsCollection implements js_library.JSObjectInterfacesDom {
+  HtmlOptionsCollectionImpl.internal_() : super.internal_();
+  get runtimeType => HtmlOptionsCollection;
+  toString() => super.toString();
+}
+patch class HttpRequest {
+  static Type get instanceRuntimeType => HttpRequestImpl;
+
+}
+class HttpRequestImpl extends HttpRequest implements js_library.JSObjectInterfacesDom {
+  HttpRequestImpl.internal_() : super.internal_();
+  get runtimeType => HttpRequest;
+  toString() => super.toString();
+}
+patch class HttpRequestEventTarget {
+  static Type get instanceRuntimeType => HttpRequestEventTargetImpl;
+
+}
+class HttpRequestEventTargetImpl extends HttpRequestEventTarget implements js_library.JSObjectInterfacesDom {
+  HttpRequestEventTargetImpl.internal_() : super.internal_();
+  get runtimeType => HttpRequestEventTarget;
+  toString() => super.toString();
+}
+patch class HttpRequestUpload {
+  static Type get instanceRuntimeType => HttpRequestUploadImpl;
+
+}
+class HttpRequestUploadImpl extends HttpRequestUpload implements js_library.JSObjectInterfacesDom {
+  HttpRequestUploadImpl.internal_() : super.internal_();
+  get runtimeType => HttpRequestUpload;
+  toString() => super.toString();
+}
+patch class IFrameElement {
+  static Type get instanceRuntimeType => IFrameElementImpl;
+
+}
+class IFrameElementImpl extends IFrameElement implements js_library.JSObjectInterfacesDom {
+  IFrameElementImpl.internal_() : super.internal_();
+  get runtimeType => IFrameElement;
+  toString() => super.toString();
+}
+patch class ImageBitmap {
+  static Type get instanceRuntimeType => ImageBitmapImpl;
+
+}
+class ImageBitmapImpl extends ImageBitmap implements js_library.JSObjectInterfacesDom {
+  ImageBitmapImpl.internal_() : super.internal_();
+  get runtimeType => ImageBitmap;
+  toString() => super.toString();
+}
+patch class ImageData {
+  static Type get instanceRuntimeType => ImageDataImpl;
+
+}
+class ImageDataImpl extends ImageData implements js_library.JSObjectInterfacesDom {
+  ImageDataImpl.internal_() : super.internal_();
+  get runtimeType => ImageData;
+  toString() => super.toString();
+}
+patch class ImageElement {
+  static Type get instanceRuntimeType => ImageElementImpl;
+
+}
+class ImageElementImpl extends ImageElement implements js_library.JSObjectInterfacesDom {
+  ImageElementImpl.internal_() : super.internal_();
+  get runtimeType => ImageElement;
+  toString() => super.toString();
+}
+patch class InjectedScriptHost {
+  static Type get instanceRuntimeType => InjectedScriptHostImpl;
+
+}
+class InjectedScriptHostImpl extends InjectedScriptHost implements js_library.JSObjectInterfacesDom {
+  InjectedScriptHostImpl.internal_() : super.internal_();
+  get runtimeType => InjectedScriptHost;
+  toString() => super.toString();
+}
+patch class InputDevice {
+  static Type get instanceRuntimeType => InputDeviceImpl;
+
+}
+class InputDeviceImpl extends InputDevice implements js_library.JSObjectInterfacesDom {
+  InputDeviceImpl.internal_() : super.internal_();
+  get runtimeType => InputDevice;
+  toString() => super.toString();
+}
+patch class InputElement {
+  static Type get instanceRuntimeType => InputElementImpl;
+
+}
+class InputElementImpl extends InputElement implements js_library.JSObjectInterfacesDom {
+  InputElementImpl.internal_() : super.internal_();
+  get runtimeType => InputElement;
+  toString() => super.toString();
+}
+patch class KeyboardEvent {
+  static Type get instanceRuntimeType => KeyboardEventImpl;
+
+}
+class KeyboardEventImpl extends KeyboardEvent implements js_library.JSObjectInterfacesDom {
+  KeyboardEventImpl.internal_() : super.internal_();
+  get runtimeType => KeyboardEvent;
+  toString() => super.toString();
+}
+patch class KeyframeEffect {
+  static Type get instanceRuntimeType => KeyframeEffectImpl;
+
+}
+class KeyframeEffectImpl extends KeyframeEffect implements js_library.JSObjectInterfacesDom {
+  KeyframeEffectImpl.internal_() : super.internal_();
+  get runtimeType => KeyframeEffect;
+  toString() => super.toString();
+}
+patch class KeygenElement {
+  static Type get instanceRuntimeType => KeygenElementImpl;
+
+}
+class KeygenElementImpl extends KeygenElement implements js_library.JSObjectInterfacesDom {
+  KeygenElementImpl.internal_() : super.internal_();
+  get runtimeType => KeygenElement;
+  toString() => super.toString();
+}
+patch class LIElement {
+  static Type get instanceRuntimeType => LIElementImpl;
+
+}
+class LIElementImpl extends LIElement implements js_library.JSObjectInterfacesDom {
+  LIElementImpl.internal_() : super.internal_();
+  get runtimeType => LIElement;
+  toString() => super.toString();
+}
+patch class LabelElement {
+  static Type get instanceRuntimeType => LabelElementImpl;
+
+}
+class LabelElementImpl extends LabelElement implements js_library.JSObjectInterfacesDom {
+  LabelElementImpl.internal_() : super.internal_();
+  get runtimeType => LabelElement;
+  toString() => super.toString();
+}
+patch class LegendElement {
+  static Type get instanceRuntimeType => LegendElementImpl;
+
+}
+class LegendElementImpl extends LegendElement implements js_library.JSObjectInterfacesDom {
+  LegendElementImpl.internal_() : super.internal_();
+  get runtimeType => LegendElement;
+  toString() => super.toString();
+}
+patch class LinkElement {
+  static Type get instanceRuntimeType => LinkElementImpl;
+
+}
+class LinkElementImpl extends LinkElement implements js_library.JSObjectInterfacesDom {
+  LinkElementImpl.internal_() : super.internal_();
+  get runtimeType => LinkElement;
+  toString() => super.toString();
+}
+patch class Location {
+  static Type get instanceRuntimeType => LocationImpl;
+
+}
+class LocationImpl extends Location implements js_library.JSObjectInterfacesDom {
+  LocationImpl.internal_() : super.internal_();
+  get runtimeType => Location;
+  toString() => super.toString();
+}
+patch class MapElement {
+  static Type get instanceRuntimeType => MapElementImpl;
+
+}
+class MapElementImpl extends MapElement implements js_library.JSObjectInterfacesDom {
+  MapElementImpl.internal_() : super.internal_();
+  get runtimeType => MapElement;
+  toString() => super.toString();
+}
+patch class MediaController {
+  static Type get instanceRuntimeType => MediaControllerImpl;
+
+}
+class MediaControllerImpl extends MediaController implements js_library.JSObjectInterfacesDom {
+  MediaControllerImpl.internal_() : super.internal_();
+  get runtimeType => MediaController;
+  toString() => super.toString();
+}
+patch class MediaDeviceInfo {
+  static Type get instanceRuntimeType => MediaDeviceInfoImpl;
+
+}
+class MediaDeviceInfoImpl extends MediaDeviceInfo implements js_library.JSObjectInterfacesDom {
+  MediaDeviceInfoImpl.internal_() : super.internal_();
+  get runtimeType => MediaDeviceInfo;
+  toString() => super.toString();
+}
+patch class MediaDevices {
+  static Type get instanceRuntimeType => MediaDevicesImpl;
+
+}
+class MediaDevicesImpl extends MediaDevices implements js_library.JSObjectInterfacesDom {
+  MediaDevicesImpl.internal_() : super.internal_();
+  get runtimeType => MediaDevices;
+  toString() => super.toString();
+}
+patch class MediaElement {
+  static Type get instanceRuntimeType => MediaElementImpl;
+
+}
+class MediaElementImpl extends MediaElement implements js_library.JSObjectInterfacesDom {
+  MediaElementImpl.internal_() : super.internal_();
+  get runtimeType => MediaElement;
+  toString() => super.toString();
+}
+patch class MediaEncryptedEvent {
+  static Type get instanceRuntimeType => MediaEncryptedEventImpl;
+
+}
+class MediaEncryptedEventImpl extends MediaEncryptedEvent implements js_library.JSObjectInterfacesDom {
+  MediaEncryptedEventImpl.internal_() : super.internal_();
+  get runtimeType => MediaEncryptedEvent;
+  toString() => super.toString();
+}
+patch class MediaError {
+  static Type get instanceRuntimeType => MediaErrorImpl;
+
+}
+class MediaErrorImpl extends MediaError implements js_library.JSObjectInterfacesDom {
+  MediaErrorImpl.internal_() : super.internal_();
+  get runtimeType => MediaError;
+  toString() => super.toString();
+}
+patch class MediaKeyError {
+  static Type get instanceRuntimeType => MediaKeyErrorImpl;
+
+}
+class MediaKeyErrorImpl extends MediaKeyError implements js_library.JSObjectInterfacesDom {
+  MediaKeyErrorImpl.internal_() : super.internal_();
+  get runtimeType => MediaKeyError;
+  toString() => super.toString();
+}
+patch class MediaKeyEvent {
+  static Type get instanceRuntimeType => MediaKeyEventImpl;
+
+}
+class MediaKeyEventImpl extends MediaKeyEvent implements js_library.JSObjectInterfacesDom {
+  MediaKeyEventImpl.internal_() : super.internal_();
+  get runtimeType => MediaKeyEvent;
+  toString() => super.toString();
+}
+patch class MediaKeyMessageEvent {
+  static Type get instanceRuntimeType => MediaKeyMessageEventImpl;
+
+}
+class MediaKeyMessageEventImpl extends MediaKeyMessageEvent implements js_library.JSObjectInterfacesDom {
+  MediaKeyMessageEventImpl.internal_() : super.internal_();
+  get runtimeType => MediaKeyMessageEvent;
+  toString() => super.toString();
+}
+patch class MediaKeySession {
+  static Type get instanceRuntimeType => MediaKeySessionImpl;
+
+}
+class MediaKeySessionImpl extends MediaKeySession implements js_library.JSObjectInterfacesDom {
+  MediaKeySessionImpl.internal_() : super.internal_();
+  get runtimeType => MediaKeySession;
+  toString() => super.toString();
+}
+patch class MediaKeyStatusMap {
+  static Type get instanceRuntimeType => MediaKeyStatusMapImpl;
+
+}
+class MediaKeyStatusMapImpl extends MediaKeyStatusMap implements js_library.JSObjectInterfacesDom {
+  MediaKeyStatusMapImpl.internal_() : super.internal_();
+  get runtimeType => MediaKeyStatusMap;
+  toString() => super.toString();
+}
+patch class MediaKeySystemAccess {
+  static Type get instanceRuntimeType => MediaKeySystemAccessImpl;
+
+}
+class MediaKeySystemAccessImpl extends MediaKeySystemAccess implements js_library.JSObjectInterfacesDom {
+  MediaKeySystemAccessImpl.internal_() : super.internal_();
+  get runtimeType => MediaKeySystemAccess;
+  toString() => super.toString();
+}
+patch class MediaKeys {
+  static Type get instanceRuntimeType => MediaKeysImpl;
+
+}
+class MediaKeysImpl extends MediaKeys implements js_library.JSObjectInterfacesDom {
+  MediaKeysImpl.internal_() : super.internal_();
+  get runtimeType => MediaKeys;
+  toString() => super.toString();
+}
+patch class MediaList {
+  static Type get instanceRuntimeType => MediaListImpl;
+
+}
+class MediaListImpl extends MediaList implements js_library.JSObjectInterfacesDom {
+  MediaListImpl.internal_() : super.internal_();
+  get runtimeType => MediaList;
+  toString() => super.toString();
+}
+patch class MediaQueryList {
+  static Type get instanceRuntimeType => MediaQueryListImpl;
+
+}
+class MediaQueryListImpl extends MediaQueryList implements js_library.JSObjectInterfacesDom {
+  MediaQueryListImpl.internal_() : super.internal_();
+  get runtimeType => MediaQueryList;
+  toString() => super.toString();
+}
+patch class MediaQueryListEvent {
+  static Type get instanceRuntimeType => MediaQueryListEventImpl;
+
+}
+class MediaQueryListEventImpl extends MediaQueryListEvent implements js_library.JSObjectInterfacesDom {
+  MediaQueryListEventImpl.internal_() : super.internal_();
+  get runtimeType => MediaQueryListEvent;
+  toString() => super.toString();
+}
+patch class MediaSession {
+  static Type get instanceRuntimeType => MediaSessionImpl;
+
+}
+class MediaSessionImpl extends MediaSession implements js_library.JSObjectInterfacesDom {
+  MediaSessionImpl.internal_() : super.internal_();
+  get runtimeType => MediaSession;
+  toString() => super.toString();
+}
+patch class MediaSource {
+  static Type get instanceRuntimeType => MediaSourceImpl;
+
+}
+class MediaSourceImpl extends MediaSource implements js_library.JSObjectInterfacesDom {
+  MediaSourceImpl.internal_() : super.internal_();
+  get runtimeType => MediaSource;
+  toString() => super.toString();
+}
+patch class MediaStream {
+  static Type get instanceRuntimeType => MediaStreamImpl;
+
+}
+class MediaStreamImpl extends MediaStream implements js_library.JSObjectInterfacesDom {
+  MediaStreamImpl.internal_() : super.internal_();
+  get runtimeType => MediaStream;
+  toString() => super.toString();
+}
+patch class MediaStreamEvent {
+  static Type get instanceRuntimeType => MediaStreamEventImpl;
+
+}
+class MediaStreamEventImpl extends MediaStreamEvent implements js_library.JSObjectInterfacesDom {
+  MediaStreamEventImpl.internal_() : super.internal_();
+  get runtimeType => MediaStreamEvent;
+  toString() => super.toString();
+}
+patch class MediaStreamTrack {
+  static Type get instanceRuntimeType => MediaStreamTrackImpl;
+
+}
+class MediaStreamTrackImpl extends MediaStreamTrack implements js_library.JSObjectInterfacesDom {
+  MediaStreamTrackImpl.internal_() : super.internal_();
+  get runtimeType => MediaStreamTrack;
+  toString() => super.toString();
+}
+patch class MediaStreamTrackEvent {
+  static Type get instanceRuntimeType => MediaStreamTrackEventImpl;
+
+}
+class MediaStreamTrackEventImpl extends MediaStreamTrackEvent implements js_library.JSObjectInterfacesDom {
+  MediaStreamTrackEventImpl.internal_() : super.internal_();
+  get runtimeType => MediaStreamTrackEvent;
+  toString() => super.toString();
+}
+patch class MemoryInfo {
+  static Type get instanceRuntimeType => MemoryInfoImpl;
+
+}
+class MemoryInfoImpl extends MemoryInfo implements js_library.JSObjectInterfacesDom {
+  MemoryInfoImpl.internal_() : super.internal_();
+  get runtimeType => MemoryInfo;
+  toString() => super.toString();
+}
+patch class MenuElement {
+  static Type get instanceRuntimeType => MenuElementImpl;
+
+}
+class MenuElementImpl extends MenuElement implements js_library.JSObjectInterfacesDom {
+  MenuElementImpl.internal_() : super.internal_();
+  get runtimeType => MenuElement;
+  toString() => super.toString();
+}
+patch class MenuItemElement {
+  static Type get instanceRuntimeType => MenuItemElementImpl;
+
+}
+class MenuItemElementImpl extends MenuItemElement implements js_library.JSObjectInterfacesDom {
+  MenuItemElementImpl.internal_() : super.internal_();
+  get runtimeType => MenuItemElement;
+  toString() => super.toString();
+}
+patch class MessageChannel {
+  static Type get instanceRuntimeType => MessageChannelImpl;
+
+}
+class MessageChannelImpl extends MessageChannel implements js_library.JSObjectInterfacesDom {
+  MessageChannelImpl.internal_() : super.internal_();
+  get runtimeType => MessageChannel;
+  toString() => super.toString();
+}
+patch class MessageEvent {
+  static Type get instanceRuntimeType => MessageEventImpl;
+
+}
+class MessageEventImpl extends MessageEvent implements js_library.JSObjectInterfacesDom {
+  MessageEventImpl.internal_() : super.internal_();
+  get runtimeType => MessageEvent;
+  toString() => super.toString();
+}
+patch class MessagePort {
+  static Type get instanceRuntimeType => MessagePortImpl;
+
+}
+class MessagePortImpl extends MessagePort implements js_library.JSObjectInterfacesDom {
+  MessagePortImpl.internal_() : super.internal_();
+  get runtimeType => MessagePort;
+  toString() => super.toString();
+}
+patch class MetaElement {
+  static Type get instanceRuntimeType => MetaElementImpl;
+
+}
+class MetaElementImpl extends MetaElement implements js_library.JSObjectInterfacesDom {
+  MetaElementImpl.internal_() : super.internal_();
+  get runtimeType => MetaElement;
+  toString() => super.toString();
+}
+patch class Metadata {
+  static Type get instanceRuntimeType => MetadataImpl;
+
+}
+class MetadataImpl extends Metadata implements js_library.JSObjectInterfacesDom {
+  MetadataImpl.internal_() : super.internal_();
+  get runtimeType => Metadata;
+  toString() => super.toString();
+}
+patch class MeterElement {
+  static Type get instanceRuntimeType => MeterElementImpl;
+
+}
+class MeterElementImpl extends MeterElement implements js_library.JSObjectInterfacesDom {
+  MeterElementImpl.internal_() : super.internal_();
+  get runtimeType => MeterElement;
+  toString() => super.toString();
+}
+patch class MidiAccess {
+  static Type get instanceRuntimeType => MidiAccessImpl;
+
+}
+class MidiAccessImpl extends MidiAccess implements js_library.JSObjectInterfacesDom {
+  MidiAccessImpl.internal_() : super.internal_();
+  get runtimeType => MidiAccess;
+  toString() => super.toString();
+}
+patch class MidiConnectionEvent {
+  static Type get instanceRuntimeType => MidiConnectionEventImpl;
+
+}
+class MidiConnectionEventImpl extends MidiConnectionEvent implements js_library.JSObjectInterfacesDom {
+  MidiConnectionEventImpl.internal_() : super.internal_();
+  get runtimeType => MidiConnectionEvent;
+  toString() => super.toString();
+}
+patch class MidiInput {
+  static Type get instanceRuntimeType => MidiInputImpl;
+
+}
+class MidiInputImpl extends MidiInput implements js_library.JSObjectInterfacesDom {
+  MidiInputImpl.internal_() : super.internal_();
+  get runtimeType => MidiInput;
+  toString() => super.toString();
+}
+patch class MidiInputMap {
+  static Type get instanceRuntimeType => MidiInputMapImpl;
+
+}
+class MidiInputMapImpl extends MidiInputMap implements js_library.JSObjectInterfacesDom {
+  MidiInputMapImpl.internal_() : super.internal_();
+  get runtimeType => MidiInputMap;
+  toString() => super.toString();
+}
+patch class MidiMessageEvent {
+  static Type get instanceRuntimeType => MidiMessageEventImpl;
+
+}
+class MidiMessageEventImpl extends MidiMessageEvent implements js_library.JSObjectInterfacesDom {
+  MidiMessageEventImpl.internal_() : super.internal_();
+  get runtimeType => MidiMessageEvent;
+  toString() => super.toString();
+}
+patch class MidiOutput {
+  static Type get instanceRuntimeType => MidiOutputImpl;
+
+}
+class MidiOutputImpl extends MidiOutput implements js_library.JSObjectInterfacesDom {
+  MidiOutputImpl.internal_() : super.internal_();
+  get runtimeType => MidiOutput;
+  toString() => super.toString();
+}
+patch class MidiOutputMap {
+  static Type get instanceRuntimeType => MidiOutputMapImpl;
+
+}
+class MidiOutputMapImpl extends MidiOutputMap implements js_library.JSObjectInterfacesDom {
+  MidiOutputMapImpl.internal_() : super.internal_();
+  get runtimeType => MidiOutputMap;
+  toString() => super.toString();
+}
+patch class MidiPort {
+  static Type get instanceRuntimeType => MidiPortImpl;
+
+}
+class MidiPortImpl extends MidiPort implements js_library.JSObjectInterfacesDom {
+  MidiPortImpl.internal_() : super.internal_();
+  get runtimeType => MidiPort;
+  toString() => super.toString();
+}
+patch class MimeType {
+  static Type get instanceRuntimeType => MimeTypeImpl;
+
+}
+class MimeTypeImpl extends MimeType implements js_library.JSObjectInterfacesDom {
+  MimeTypeImpl.internal_() : super.internal_();
+  get runtimeType => MimeType;
+  toString() => super.toString();
+}
+patch class MimeTypeArray {
+  static Type get instanceRuntimeType => MimeTypeArrayImpl;
+
+}
+class MimeTypeArrayImpl extends MimeTypeArray implements js_library.JSObjectInterfacesDom {
+  MimeTypeArrayImpl.internal_() : super.internal_();
+  get runtimeType => MimeTypeArray;
+  toString() => super.toString();
+}
+patch class ModElement {
+  static Type get instanceRuntimeType => ModElementImpl;
+
+}
+class ModElementImpl extends ModElement implements js_library.JSObjectInterfacesDom {
+  ModElementImpl.internal_() : super.internal_();
+  get runtimeType => ModElement;
+  toString() => super.toString();
+}
+patch class MouseEvent {
+  static Type get instanceRuntimeType => MouseEventImpl;
+
+}
+class MouseEventImpl extends MouseEvent implements js_library.JSObjectInterfacesDom {
+  MouseEventImpl.internal_() : super.internal_();
+  get runtimeType => MouseEvent;
+  toString() => super.toString();
+}
+patch class MutationObserver {
+  static Type get instanceRuntimeType => MutationObserverImpl;
+
+}
+class MutationObserverImpl extends MutationObserver implements js_library.JSObjectInterfacesDom {
+  MutationObserverImpl.internal_() : super.internal_();
+  get runtimeType => MutationObserver;
+  toString() => super.toString();
+}
+patch class MutationRecord {
+  static Type get instanceRuntimeType => MutationRecordImpl;
+
+}
+class MutationRecordImpl extends MutationRecord implements js_library.JSObjectInterfacesDom {
+  MutationRecordImpl.internal_() : super.internal_();
+  get runtimeType => MutationRecord;
+  toString() => super.toString();
+}
+patch class Navigator {
+  static Type get instanceRuntimeType => NavigatorImpl;
+
+}
+class NavigatorImpl extends Navigator implements js_library.JSObjectInterfacesDom {
+  NavigatorImpl.internal_() : super.internal_();
+  get runtimeType => Navigator;
+  toString() => super.toString();
+}
+patch class NavigatorCpu {
+  static Type get instanceRuntimeType => NavigatorCpuImpl;
+
+}
+class NavigatorCpuImpl extends NavigatorCpu implements js_library.JSObjectInterfacesDom {
+  NavigatorCpuImpl.internal_() : super.internal_();
+  get runtimeType => NavigatorCpu;
+  toString() => super.toString();
+}
+patch class NavigatorID {
+  static Type get instanceRuntimeType => NavigatorIDImpl;
+
+}
+class NavigatorIDImpl extends NavigatorID implements js_library.JSObjectInterfacesDom {
+  NavigatorIDImpl.internal_() : super.internal_();
+  get runtimeType => NavigatorID;
+  toString() => super.toString();
+}
+patch class NavigatorLanguage {
+  static Type get instanceRuntimeType => NavigatorLanguageImpl;
+
+}
+class NavigatorLanguageImpl extends NavigatorLanguage implements js_library.JSObjectInterfacesDom {
+  NavigatorLanguageImpl.internal_() : super.internal_();
+  get runtimeType => NavigatorLanguage;
+  toString() => super.toString();
+}
+patch class NavigatorOnLine {
+  static Type get instanceRuntimeType => NavigatorOnLineImpl;
+
+}
+class NavigatorOnLineImpl extends NavigatorOnLine implements js_library.JSObjectInterfacesDom {
+  NavigatorOnLineImpl.internal_() : super.internal_();
+  get runtimeType => NavigatorOnLine;
+  toString() => super.toString();
+}
+patch class NavigatorStorageUtils {
+  static Type get instanceRuntimeType => NavigatorStorageUtilsImpl;
+
+}
+class NavigatorStorageUtilsImpl extends NavigatorStorageUtils implements js_library.JSObjectInterfacesDom {
+  NavigatorStorageUtilsImpl.internal_() : super.internal_();
+  get runtimeType => NavigatorStorageUtils;
+  toString() => super.toString();
+}
+patch class NavigatorUserMediaError {
+  static Type get instanceRuntimeType => NavigatorUserMediaErrorImpl;
+
+}
+class NavigatorUserMediaErrorImpl extends NavigatorUserMediaError implements js_library.JSObjectInterfacesDom {
+  NavigatorUserMediaErrorImpl.internal_() : super.internal_();
+  get runtimeType => NavigatorUserMediaError;
+  toString() => super.toString();
+}
+patch class NetworkInformation {
+  static Type get instanceRuntimeType => NetworkInformationImpl;
+
+}
+class NetworkInformationImpl extends NetworkInformation implements js_library.JSObjectInterfacesDom {
+  NetworkInformationImpl.internal_() : super.internal_();
+  get runtimeType => NetworkInformation;
+  toString() => super.toString();
+}
+patch class Node {
+  static Type get instanceRuntimeType => NodeImpl;
+
+}
+class NodeImpl extends Node implements js_library.JSObjectInterfacesDom {
+  NodeImpl.internal_() : super.internal_();
+  get runtimeType => Node;
+  toString() => super.toString();
+}
+patch class NodeFilter {
+  static Type get instanceRuntimeType => NodeFilterImpl;
+
+}
+class NodeFilterImpl extends NodeFilter implements js_library.JSObjectInterfacesDom {
+  NodeFilterImpl.internal_() : super.internal_();
+  get runtimeType => NodeFilter;
+  toString() => super.toString();
+}
+patch class NodeIterator {
+  static Type get instanceRuntimeType => NodeIteratorImpl;
+
+}
+class NodeIteratorImpl extends NodeIterator implements js_library.JSObjectInterfacesDom {
+  NodeIteratorImpl.internal_() : super.internal_();
+  get runtimeType => NodeIterator;
+  toString() => super.toString();
+}
+patch class NodeList {
+  static Type get instanceRuntimeType => NodeListImpl;
+
+}
+class NodeListImpl extends NodeList implements js_library.JSObjectInterfacesDom {
+  NodeListImpl.internal_() : super.internal_();
+  get runtimeType => NodeList;
+  toString() => super.toString();
+}
+patch class NonDocumentTypeChildNode {
+  static Type get instanceRuntimeType => NonDocumentTypeChildNodeImpl;
+
+}
+class NonDocumentTypeChildNodeImpl extends NonDocumentTypeChildNode implements js_library.JSObjectInterfacesDom {
+  NonDocumentTypeChildNodeImpl.internal_() : super.internal_();
+  get runtimeType => NonDocumentTypeChildNode;
+  toString() => super.toString();
+}
+patch class NonElementParentNode {
+  static Type get instanceRuntimeType => NonElementParentNodeImpl;
+
+}
+class NonElementParentNodeImpl extends NonElementParentNode implements js_library.JSObjectInterfacesDom {
+  NonElementParentNodeImpl.internal_() : super.internal_();
+  get runtimeType => NonElementParentNode;
+  toString() => super.toString();
+}
+patch class Notification {
+  static Type get instanceRuntimeType => NotificationImpl;
+
+}
+class NotificationImpl extends Notification implements js_library.JSObjectInterfacesDom {
+  NotificationImpl.internal_() : super.internal_();
+  get runtimeType => Notification;
+  toString() => super.toString();
+}
+patch class NotificationEvent {
+  static Type get instanceRuntimeType => NotificationEventImpl;
+
+}
+class NotificationEventImpl extends NotificationEvent implements js_library.JSObjectInterfacesDom {
+  NotificationEventImpl.internal_() : super.internal_();
+  get runtimeType => NotificationEvent;
+  toString() => super.toString();
+}
+patch class OListElement {
+  static Type get instanceRuntimeType => OListElementImpl;
+
+}
+class OListElementImpl extends OListElement implements js_library.JSObjectInterfacesDom {
+  OListElementImpl.internal_() : super.internal_();
+  get runtimeType => OListElement;
+  toString() => super.toString();
+}
+patch class ObjectElement {
+  static Type get instanceRuntimeType => ObjectElementImpl;
+
+}
+class ObjectElementImpl extends ObjectElement implements js_library.JSObjectInterfacesDom {
+  ObjectElementImpl.internal_() : super.internal_();
+  get runtimeType => ObjectElement;
+  toString() => super.toString();
+}
+patch class OptGroupElement {
+  static Type get instanceRuntimeType => OptGroupElementImpl;
+
+}
+class OptGroupElementImpl extends OptGroupElement implements js_library.JSObjectInterfacesDom {
+  OptGroupElementImpl.internal_() : super.internal_();
+  get runtimeType => OptGroupElement;
+  toString() => super.toString();
+}
+patch class OptionElement {
+  static Type get instanceRuntimeType => OptionElementImpl;
+
+}
+class OptionElementImpl extends OptionElement implements js_library.JSObjectInterfacesDom {
+  OptionElementImpl.internal_() : super.internal_();
+  get runtimeType => OptionElement;
+  toString() => super.toString();
+}
+patch class OutputElement {
+  static Type get instanceRuntimeType => OutputElementImpl;
+
+}
+class OutputElementImpl extends OutputElement implements js_library.JSObjectInterfacesDom {
+  OutputElementImpl.internal_() : super.internal_();
+  get runtimeType => OutputElement;
+  toString() => super.toString();
+}
+patch class PageTransitionEvent {
+  static Type get instanceRuntimeType => PageTransitionEventImpl;
+
+}
+class PageTransitionEventImpl extends PageTransitionEvent implements js_library.JSObjectInterfacesDom {
+  PageTransitionEventImpl.internal_() : super.internal_();
+  get runtimeType => PageTransitionEvent;
+  toString() => super.toString();
+}
+patch class ParagraphElement {
+  static Type get instanceRuntimeType => ParagraphElementImpl;
+
+}
+class ParagraphElementImpl extends ParagraphElement implements js_library.JSObjectInterfacesDom {
+  ParagraphElementImpl.internal_() : super.internal_();
+  get runtimeType => ParagraphElement;
+  toString() => super.toString();
+}
+patch class ParamElement {
+  static Type get instanceRuntimeType => ParamElementImpl;
+
+}
+class ParamElementImpl extends ParamElement implements js_library.JSObjectInterfacesDom {
+  ParamElementImpl.internal_() : super.internal_();
+  get runtimeType => ParamElement;
+  toString() => super.toString();
+}
+patch class ParentNode {
+  static Type get instanceRuntimeType => ParentNodeImpl;
+
+}
+class ParentNodeImpl extends ParentNode implements js_library.JSObjectInterfacesDom {
+  ParentNodeImpl.internal_() : super.internal_();
+  get runtimeType => ParentNode;
+  toString() => super.toString();
+}
+patch class PasswordCredential {
+  static Type get instanceRuntimeType => PasswordCredentialImpl;
+
+}
+class PasswordCredentialImpl extends PasswordCredential implements js_library.JSObjectInterfacesDom {
+  PasswordCredentialImpl.internal_() : super.internal_();
+  get runtimeType => PasswordCredential;
+  toString() => super.toString();
+}
+patch class Path2D {
+  static Type get instanceRuntimeType => Path2DImpl;
+
+}
+class Path2DImpl extends Path2D implements js_library.JSObjectInterfacesDom {
+  Path2DImpl.internal_() : super.internal_();
+  get runtimeType => Path2D;
+  toString() => super.toString();
+}
+patch class Performance {
+  static Type get instanceRuntimeType => PerformanceImpl;
+
+}
+class PerformanceImpl extends Performance implements js_library.JSObjectInterfacesDom {
+  PerformanceImpl.internal_() : super.internal_();
+  get runtimeType => Performance;
+  toString() => super.toString();
+}
+patch class PerformanceCompositeTiming {
+  static Type get instanceRuntimeType => PerformanceCompositeTimingImpl;
+
+}
+class PerformanceCompositeTimingImpl extends PerformanceCompositeTiming implements js_library.JSObjectInterfacesDom {
+  PerformanceCompositeTimingImpl.internal_() : super.internal_();
+  get runtimeType => PerformanceCompositeTiming;
+  toString() => super.toString();
+}
+patch class PerformanceEntry {
+  static Type get instanceRuntimeType => PerformanceEntryImpl;
+
+}
+class PerformanceEntryImpl extends PerformanceEntry implements js_library.JSObjectInterfacesDom {
+  PerformanceEntryImpl.internal_() : super.internal_();
+  get runtimeType => PerformanceEntry;
+  toString() => super.toString();
+}
+patch class PerformanceMark {
+  static Type get instanceRuntimeType => PerformanceMarkImpl;
+
+}
+class PerformanceMarkImpl extends PerformanceMark implements js_library.JSObjectInterfacesDom {
+  PerformanceMarkImpl.internal_() : super.internal_();
+  get runtimeType => PerformanceMark;
+  toString() => super.toString();
+}
+patch class PerformanceMeasure {
+  static Type get instanceRuntimeType => PerformanceMeasureImpl;
+
+}
+class PerformanceMeasureImpl extends PerformanceMeasure implements js_library.JSObjectInterfacesDom {
+  PerformanceMeasureImpl.internal_() : super.internal_();
+  get runtimeType => PerformanceMeasure;
+  toString() => super.toString();
+}
+patch class PerformanceNavigation {
+  static Type get instanceRuntimeType => PerformanceNavigationImpl;
+
+}
+class PerformanceNavigationImpl extends PerformanceNavigation implements js_library.JSObjectInterfacesDom {
+  PerformanceNavigationImpl.internal_() : super.internal_();
+  get runtimeType => PerformanceNavigation;
+  toString() => super.toString();
+}
+patch class PerformanceRenderTiming {
+  static Type get instanceRuntimeType => PerformanceRenderTimingImpl;
+
+}
+class PerformanceRenderTimingImpl extends PerformanceRenderTiming implements js_library.JSObjectInterfacesDom {
+  PerformanceRenderTimingImpl.internal_() : super.internal_();
+  get runtimeType => PerformanceRenderTiming;
+  toString() => super.toString();
+}
+patch class PerformanceResourceTiming {
+  static Type get instanceRuntimeType => PerformanceResourceTimingImpl;
+
+}
+class PerformanceResourceTimingImpl extends PerformanceResourceTiming implements js_library.JSObjectInterfacesDom {
+  PerformanceResourceTimingImpl.internal_() : super.internal_();
+  get runtimeType => PerformanceResourceTiming;
+  toString() => super.toString();
+}
+patch class PerformanceTiming {
+  static Type get instanceRuntimeType => PerformanceTimingImpl;
+
+}
+class PerformanceTimingImpl extends PerformanceTiming implements js_library.JSObjectInterfacesDom {
+  PerformanceTimingImpl.internal_() : super.internal_();
+  get runtimeType => PerformanceTiming;
+  toString() => super.toString();
+}
+patch class PeriodicSyncEvent {
+  static Type get instanceRuntimeType => PeriodicSyncEventImpl;
+
+}
+class PeriodicSyncEventImpl extends PeriodicSyncEvent implements js_library.JSObjectInterfacesDom {
+  PeriodicSyncEventImpl.internal_() : super.internal_();
+  get runtimeType => PeriodicSyncEvent;
+  toString() => super.toString();
+}
+patch class PeriodicSyncManager {
+  static Type get instanceRuntimeType => PeriodicSyncManagerImpl;
+
+}
+class PeriodicSyncManagerImpl extends PeriodicSyncManager implements js_library.JSObjectInterfacesDom {
+  PeriodicSyncManagerImpl.internal_() : super.internal_();
+  get runtimeType => PeriodicSyncManager;
+  toString() => super.toString();
+}
+patch class PeriodicSyncRegistration {
+  static Type get instanceRuntimeType => PeriodicSyncRegistrationImpl;
+
+}
+class PeriodicSyncRegistrationImpl extends PeriodicSyncRegistration implements js_library.JSObjectInterfacesDom {
+  PeriodicSyncRegistrationImpl.internal_() : super.internal_();
+  get runtimeType => PeriodicSyncRegistration;
+  toString() => super.toString();
+}
+patch class PermissionStatus {
+  static Type get instanceRuntimeType => PermissionStatusImpl;
+
+}
+class PermissionStatusImpl extends PermissionStatus implements js_library.JSObjectInterfacesDom {
+  PermissionStatusImpl.internal_() : super.internal_();
+  get runtimeType => PermissionStatus;
+  toString() => super.toString();
+}
+patch class Permissions {
+  static Type get instanceRuntimeType => PermissionsImpl;
+
+}
+class PermissionsImpl extends Permissions implements js_library.JSObjectInterfacesDom {
+  PermissionsImpl.internal_() : super.internal_();
+  get runtimeType => Permissions;
+  toString() => super.toString();
+}
+patch class PictureElement {
+  static Type get instanceRuntimeType => PictureElementImpl;
+
+}
+class PictureElementImpl extends PictureElement implements js_library.JSObjectInterfacesDom {
+  PictureElementImpl.internal_() : super.internal_();
+  get runtimeType => PictureElement;
+  toString() => super.toString();
+}
+patch class Plugin {
+  static Type get instanceRuntimeType => PluginImpl;
+
+}
+class PluginImpl extends Plugin implements js_library.JSObjectInterfacesDom {
+  PluginImpl.internal_() : super.internal_();
+  get runtimeType => Plugin;
+  toString() => super.toString();
+}
+patch class PluginArray {
+  static Type get instanceRuntimeType => PluginArrayImpl;
+
+}
+class PluginArrayImpl extends PluginArray implements js_library.JSObjectInterfacesDom {
+  PluginArrayImpl.internal_() : super.internal_();
+  get runtimeType => PluginArray;
+  toString() => super.toString();
+}
+patch class PluginPlaceholderElement {
+  static Type get instanceRuntimeType => PluginPlaceholderElementImpl;
+
+}
+class PluginPlaceholderElementImpl extends PluginPlaceholderElement implements js_library.JSObjectInterfacesDom {
+  PluginPlaceholderElementImpl.internal_() : super.internal_();
+  get runtimeType => PluginPlaceholderElement;
+  toString() => super.toString();
+}
+patch class PointerEvent {
+  static Type get instanceRuntimeType => PointerEventImpl;
+
+}
+class PointerEventImpl extends PointerEvent implements js_library.JSObjectInterfacesDom {
+  PointerEventImpl.internal_() : super.internal_();
+  get runtimeType => PointerEvent;
+  toString() => super.toString();
+}
+patch class PopStateEvent {
+  static Type get instanceRuntimeType => PopStateEventImpl;
+
+}
+class PopStateEventImpl extends PopStateEvent implements js_library.JSObjectInterfacesDom {
+  PopStateEventImpl.internal_() : super.internal_();
+  get runtimeType => PopStateEvent;
+  toString() => super.toString();
+}
+patch class PositionError {
+  static Type get instanceRuntimeType => PositionErrorImpl;
+
+}
+class PositionErrorImpl extends PositionError implements js_library.JSObjectInterfacesDom {
+  PositionErrorImpl.internal_() : super.internal_();
+  get runtimeType => PositionError;
+  toString() => super.toString();
+}
+patch class PositionSensorVRDevice {
+  static Type get instanceRuntimeType => PositionSensorVRDeviceImpl;
+
+}
+class PositionSensorVRDeviceImpl extends PositionSensorVRDevice implements js_library.JSObjectInterfacesDom {
+  PositionSensorVRDeviceImpl.internal_() : super.internal_();
+  get runtimeType => PositionSensorVRDevice;
+  toString() => super.toString();
+}
+patch class PreElement {
+  static Type get instanceRuntimeType => PreElementImpl;
+
+}
+class PreElementImpl extends PreElement implements js_library.JSObjectInterfacesDom {
+  PreElementImpl.internal_() : super.internal_();
+  get runtimeType => PreElement;
+  toString() => super.toString();
+}
+patch class Presentation {
+  static Type get instanceRuntimeType => PresentationImpl;
+
+}
+class PresentationImpl extends Presentation implements js_library.JSObjectInterfacesDom {
+  PresentationImpl.internal_() : super.internal_();
+  get runtimeType => Presentation;
+  toString() => super.toString();
+}
+patch class PresentationAvailability {
+  static Type get instanceRuntimeType => PresentationAvailabilityImpl;
+
+}
+class PresentationAvailabilityImpl extends PresentationAvailability implements js_library.JSObjectInterfacesDom {
+  PresentationAvailabilityImpl.internal_() : super.internal_();
+  get runtimeType => PresentationAvailability;
+  toString() => super.toString();
+}
+patch class PresentationSession {
+  static Type get instanceRuntimeType => PresentationSessionImpl;
+
+}
+class PresentationSessionImpl extends PresentationSession implements js_library.JSObjectInterfacesDom {
+  PresentationSessionImpl.internal_() : super.internal_();
+  get runtimeType => PresentationSession;
+  toString() => super.toString();
+}
+patch class ProcessingInstruction {
+  static Type get instanceRuntimeType => ProcessingInstructionImpl;
+
+}
+class ProcessingInstructionImpl extends ProcessingInstruction implements js_library.JSObjectInterfacesDom {
+  ProcessingInstructionImpl.internal_() : super.internal_();
+  get runtimeType => ProcessingInstruction;
+  toString() => super.toString();
+}
+patch class ProgressElement {
+  static Type get instanceRuntimeType => ProgressElementImpl;
+
+}
+class ProgressElementImpl extends ProgressElement implements js_library.JSObjectInterfacesDom {
+  ProgressElementImpl.internal_() : super.internal_();
+  get runtimeType => ProgressElement;
+  toString() => super.toString();
+}
+patch class ProgressEvent {
+  static Type get instanceRuntimeType => ProgressEventImpl;
+
+}
+class ProgressEventImpl extends ProgressEvent implements js_library.JSObjectInterfacesDom {
+  ProgressEventImpl.internal_() : super.internal_();
+  get runtimeType => ProgressEvent;
+  toString() => super.toString();
+}
+patch class PromiseRejectionEvent {
+  static Type get instanceRuntimeType => PromiseRejectionEventImpl;
+
+}
+class PromiseRejectionEventImpl extends PromiseRejectionEvent implements js_library.JSObjectInterfacesDom {
+  PromiseRejectionEventImpl.internal_() : super.internal_();
+  get runtimeType => PromiseRejectionEvent;
+  toString() => super.toString();
+}
+patch class PushEvent {
+  static Type get instanceRuntimeType => PushEventImpl;
+
+}
+class PushEventImpl extends PushEvent implements js_library.JSObjectInterfacesDom {
+  PushEventImpl.internal_() : super.internal_();
+  get runtimeType => PushEvent;
+  toString() => super.toString();
+}
+patch class PushManager {
+  static Type get instanceRuntimeType => PushManagerImpl;
+
+}
+class PushManagerImpl extends PushManager implements js_library.JSObjectInterfacesDom {
+  PushManagerImpl.internal_() : super.internal_();
+  get runtimeType => PushManager;
+  toString() => super.toString();
+}
+patch class PushMessageData {
+  static Type get instanceRuntimeType => PushMessageDataImpl;
+
+}
+class PushMessageDataImpl extends PushMessageData implements js_library.JSObjectInterfacesDom {
+  PushMessageDataImpl.internal_() : super.internal_();
+  get runtimeType => PushMessageData;
+  toString() => super.toString();
+}
+patch class PushSubscription {
+  static Type get instanceRuntimeType => PushSubscriptionImpl;
+
+}
+class PushSubscriptionImpl extends PushSubscription implements js_library.JSObjectInterfacesDom {
+  PushSubscriptionImpl.internal_() : super.internal_();
+  get runtimeType => PushSubscription;
+  toString() => super.toString();
+}
+patch class QuoteElement {
+  static Type get instanceRuntimeType => QuoteElementImpl;
+
+}
+class QuoteElementImpl extends QuoteElement implements js_library.JSObjectInterfacesDom {
+  QuoteElementImpl.internal_() : super.internal_();
+  get runtimeType => QuoteElement;
+  toString() => super.toString();
+}
+patch class Range {
+  static Type get instanceRuntimeType => RangeImpl;
+
+}
+class RangeImpl extends Range implements js_library.JSObjectInterfacesDom {
+  RangeImpl.internal_() : super.internal_();
+  get runtimeType => Range;
+  toString() => super.toString();
+}
+patch class ReadableByteStream {
+  static Type get instanceRuntimeType => ReadableByteStreamImpl;
+
+}
+class ReadableByteStreamImpl extends ReadableByteStream implements js_library.JSObjectInterfacesDom {
+  ReadableByteStreamImpl.internal_() : super.internal_();
+  get runtimeType => ReadableByteStream;
+  toString() => super.toString();
+}
+patch class ReadableByteStreamReader {
+  static Type get instanceRuntimeType => ReadableByteStreamReaderImpl;
+
+}
+class ReadableByteStreamReaderImpl extends ReadableByteStreamReader implements js_library.JSObjectInterfacesDom {
+  ReadableByteStreamReaderImpl.internal_() : super.internal_();
+  get runtimeType => ReadableByteStreamReader;
+  toString() => super.toString();
+}
+patch class ReadableStream {
+  static Type get instanceRuntimeType => ReadableStreamImpl;
+
+}
+class ReadableStreamImpl extends ReadableStream implements js_library.JSObjectInterfacesDom {
+  ReadableStreamImpl.internal_() : super.internal_();
+  get runtimeType => ReadableStream;
+  toString() => super.toString();
+}
+patch class ReadableStreamReader {
+  static Type get instanceRuntimeType => ReadableStreamReaderImpl;
+
+}
+class ReadableStreamReaderImpl extends ReadableStreamReader implements js_library.JSObjectInterfacesDom {
+  ReadableStreamReaderImpl.internal_() : super.internal_();
+  get runtimeType => ReadableStreamReader;
+  toString() => super.toString();
+}
+patch class RelatedEvent {
+  static Type get instanceRuntimeType => RelatedEventImpl;
+
+}
+class RelatedEventImpl extends RelatedEvent implements js_library.JSObjectInterfacesDom {
+  RelatedEventImpl.internal_() : super.internal_();
+  get runtimeType => RelatedEvent;
+  toString() => super.toString();
+}
+patch class ResourceProgressEvent {
+  static Type get instanceRuntimeType => ResourceProgressEventImpl;
+
+}
+class ResourceProgressEventImpl extends ResourceProgressEvent implements js_library.JSObjectInterfacesDom {
+  ResourceProgressEventImpl.internal_() : super.internal_();
+  get runtimeType => ResourceProgressEvent;
+  toString() => super.toString();
+}
+patch class RtcDataChannel {
+  static Type get instanceRuntimeType => RtcDataChannelImpl;
+
+}
+class RtcDataChannelImpl extends RtcDataChannel implements js_library.JSObjectInterfacesDom {
+  RtcDataChannelImpl.internal_() : super.internal_();
+  get runtimeType => RtcDataChannel;
+  toString() => super.toString();
+}
+patch class RtcDataChannelEvent {
+  static Type get instanceRuntimeType => RtcDataChannelEventImpl;
+
+}
+class RtcDataChannelEventImpl extends RtcDataChannelEvent implements js_library.JSObjectInterfacesDom {
+  RtcDataChannelEventImpl.internal_() : super.internal_();
+  get runtimeType => RtcDataChannelEvent;
+  toString() => super.toString();
+}
+patch class RtcDtmfSender {
+  static Type get instanceRuntimeType => RtcDtmfSenderImpl;
+
+}
+class RtcDtmfSenderImpl extends RtcDtmfSender implements js_library.JSObjectInterfacesDom {
+  RtcDtmfSenderImpl.internal_() : super.internal_();
+  get runtimeType => RtcDtmfSender;
+  toString() => super.toString();
+}
+patch class RtcDtmfToneChangeEvent {
+  static Type get instanceRuntimeType => RtcDtmfToneChangeEventImpl;
+
+}
+class RtcDtmfToneChangeEventImpl extends RtcDtmfToneChangeEvent implements js_library.JSObjectInterfacesDom {
+  RtcDtmfToneChangeEventImpl.internal_() : super.internal_();
+  get runtimeType => RtcDtmfToneChangeEvent;
+  toString() => super.toString();
+}
+patch class RtcIceCandidate {
+  static Type get instanceRuntimeType => RtcIceCandidateImpl;
+
+}
+class RtcIceCandidateImpl extends RtcIceCandidate implements js_library.JSObjectInterfacesDom {
+  RtcIceCandidateImpl.internal_() : super.internal_();
+  get runtimeType => RtcIceCandidate;
+  toString() => super.toString();
+}
+patch class RtcIceCandidateEvent {
+  static Type get instanceRuntimeType => RtcIceCandidateEventImpl;
+
+}
+class RtcIceCandidateEventImpl extends RtcIceCandidateEvent implements js_library.JSObjectInterfacesDom {
+  RtcIceCandidateEventImpl.internal_() : super.internal_();
+  get runtimeType => RtcIceCandidateEvent;
+  toString() => super.toString();
+}
+patch class RtcPeerConnection {
+  static Type get instanceRuntimeType => RtcPeerConnectionImpl;
+
+}
+class RtcPeerConnectionImpl extends RtcPeerConnection implements js_library.JSObjectInterfacesDom {
+  RtcPeerConnectionImpl.internal_() : super.internal_();
+  get runtimeType => RtcPeerConnection;
+  toString() => super.toString();
+}
+patch class RtcSessionDescription {
+  static Type get instanceRuntimeType => RtcSessionDescriptionImpl;
+
+}
+class RtcSessionDescriptionImpl extends RtcSessionDescription implements js_library.JSObjectInterfacesDom {
+  RtcSessionDescriptionImpl.internal_() : super.internal_();
+  get runtimeType => RtcSessionDescription;
+  toString() => super.toString();
+}
+patch class RtcStatsReport {
+  static Type get instanceRuntimeType => RtcStatsReportImpl;
+
+}
+class RtcStatsReportImpl extends RtcStatsReport implements js_library.JSObjectInterfacesDom {
+  RtcStatsReportImpl.internal_() : super.internal_();
+  get runtimeType => RtcStatsReport;
+  toString() => super.toString();
+}
+patch class RtcStatsResponse {
+  static Type get instanceRuntimeType => RtcStatsResponseImpl;
+
+}
+class RtcStatsResponseImpl extends RtcStatsResponse implements js_library.JSObjectInterfacesDom {
+  RtcStatsResponseImpl.internal_() : super.internal_();
+  get runtimeType => RtcStatsResponse;
+  toString() => super.toString();
+}
+patch class Screen {
+  static Type get instanceRuntimeType => ScreenImpl;
+
+}
+class ScreenImpl extends Screen implements js_library.JSObjectInterfacesDom {
+  ScreenImpl.internal_() : super.internal_();
+  get runtimeType => Screen;
+  toString() => super.toString();
+}
+patch class ScreenOrientation {
+  static Type get instanceRuntimeType => ScreenOrientationImpl;
+
+}
+class ScreenOrientationImpl extends ScreenOrientation implements js_library.JSObjectInterfacesDom {
+  ScreenOrientationImpl.internal_() : super.internal_();
+  get runtimeType => ScreenOrientation;
+  toString() => super.toString();
+}
+patch class ScriptElement {
+  static Type get instanceRuntimeType => ScriptElementImpl;
+
+}
+class ScriptElementImpl extends ScriptElement implements js_library.JSObjectInterfacesDom {
+  ScriptElementImpl.internal_() : super.internal_();
+  get runtimeType => ScriptElement;
+  toString() => super.toString();
+}
+patch class ScrollState {
+  static Type get instanceRuntimeType => ScrollStateImpl;
+
+}
+class ScrollStateImpl extends ScrollState implements js_library.JSObjectInterfacesDom {
+  ScrollStateImpl.internal_() : super.internal_();
+  get runtimeType => ScrollState;
+  toString() => super.toString();
+}
+patch class SecurityPolicyViolationEvent {
+  static Type get instanceRuntimeType => SecurityPolicyViolationEventImpl;
+
+}
+class SecurityPolicyViolationEventImpl extends SecurityPolicyViolationEvent implements js_library.JSObjectInterfacesDom {
+  SecurityPolicyViolationEventImpl.internal_() : super.internal_();
+  get runtimeType => SecurityPolicyViolationEvent;
+  toString() => super.toString();
+}
+patch class SelectElement {
+  static Type get instanceRuntimeType => SelectElementImpl;
+
+}
+class SelectElementImpl extends SelectElement implements js_library.JSObjectInterfacesDom {
+  SelectElementImpl.internal_() : super.internal_();
+  get runtimeType => SelectElement;
+  toString() => super.toString();
+}
+patch class Selection {
+  static Type get instanceRuntimeType => SelectionImpl;
+
+}
+class SelectionImpl extends Selection implements js_library.JSObjectInterfacesDom {
+  SelectionImpl.internal_() : super.internal_();
+  get runtimeType => Selection;
+  toString() => super.toString();
+}
+patch class ServicePort {
+  static Type get instanceRuntimeType => ServicePortImpl;
+
+}
+class ServicePortImpl extends ServicePort implements js_library.JSObjectInterfacesDom {
+  ServicePortImpl.internal_() : super.internal_();
+  get runtimeType => ServicePort;
+  toString() => super.toString();
+}
+patch class ServicePortCollection {
+  static Type get instanceRuntimeType => ServicePortCollectionImpl;
+
+}
+class ServicePortCollectionImpl extends ServicePortCollection implements js_library.JSObjectInterfacesDom {
+  ServicePortCollectionImpl.internal_() : super.internal_();
+  get runtimeType => ServicePortCollection;
+  toString() => super.toString();
+}
+patch class ServicePortConnectEvent {
+  static Type get instanceRuntimeType => ServicePortConnectEventImpl;
+
+}
+class ServicePortConnectEventImpl extends ServicePortConnectEvent implements js_library.JSObjectInterfacesDom {
+  ServicePortConnectEventImpl.internal_() : super.internal_();
+  get runtimeType => ServicePortConnectEvent;
+  toString() => super.toString();
+}
+patch class ServiceWorkerContainer {
+  static Type get instanceRuntimeType => ServiceWorkerContainerImpl;
+
+}
+class ServiceWorkerContainerImpl extends ServiceWorkerContainer implements js_library.JSObjectInterfacesDom {
+  ServiceWorkerContainerImpl.internal_() : super.internal_();
+  get runtimeType => ServiceWorkerContainer;
+  toString() => super.toString();
+}
+patch class ServiceWorkerGlobalScope {
+  static Type get instanceRuntimeType => ServiceWorkerGlobalScopeImpl;
+
+}
+class ServiceWorkerGlobalScopeImpl extends ServiceWorkerGlobalScope implements js_library.JSObjectInterfacesDom {
+  ServiceWorkerGlobalScopeImpl.internal_() : super.internal_();
+  get runtimeType => ServiceWorkerGlobalScope;
+  toString() => super.toString();
+}
+patch class ServiceWorkerMessageEvent {
+  static Type get instanceRuntimeType => ServiceWorkerMessageEventImpl;
+
+}
+class ServiceWorkerMessageEventImpl extends ServiceWorkerMessageEvent implements js_library.JSObjectInterfacesDom {
+  ServiceWorkerMessageEventImpl.internal_() : super.internal_();
+  get runtimeType => ServiceWorkerMessageEvent;
+  toString() => super.toString();
+}
+patch class ServiceWorkerRegistration {
+  static Type get instanceRuntimeType => ServiceWorkerRegistrationImpl;
+
+}
+class ServiceWorkerRegistrationImpl extends ServiceWorkerRegistration implements js_library.JSObjectInterfacesDom {
+  ServiceWorkerRegistrationImpl.internal_() : super.internal_();
+  get runtimeType => ServiceWorkerRegistration;
+  toString() => super.toString();
+}
+patch class ShadowElement {
+  static Type get instanceRuntimeType => ShadowElementImpl;
+
+}
+class ShadowElementImpl extends ShadowElement implements js_library.JSObjectInterfacesDom {
+  ShadowElementImpl.internal_() : super.internal_();
+  get runtimeType => ShadowElement;
+  toString() => super.toString();
+}
+patch class ShadowRoot {
+  static Type get instanceRuntimeType => ShadowRootImpl;
+
+}
+class ShadowRootImpl extends ShadowRoot implements js_library.JSObjectInterfacesDom {
+  ShadowRootImpl.internal_() : super.internal_();
+  get runtimeType => ShadowRoot;
+  toString() => super.toString();
+}
+patch class SharedArrayBuffer {
+  static Type get instanceRuntimeType => SharedArrayBufferImpl;
+
+}
+class SharedArrayBufferImpl extends SharedArrayBuffer implements js_library.JSObjectInterfacesDom {
+  SharedArrayBufferImpl.internal_() : super.internal_();
+  get runtimeType => SharedArrayBuffer;
+  toString() => super.toString();
+}
+patch class SharedWorker {
+  static Type get instanceRuntimeType => SharedWorkerImpl;
+
+}
+class SharedWorkerImpl extends SharedWorker implements js_library.JSObjectInterfacesDom {
+  SharedWorkerImpl.internal_() : super.internal_();
+  get runtimeType => SharedWorker;
+  toString() => super.toString();
+}
+patch class SharedWorkerGlobalScope {
+  static Type get instanceRuntimeType => SharedWorkerGlobalScopeImpl;
+
+}
+class SharedWorkerGlobalScopeImpl extends SharedWorkerGlobalScope implements js_library.JSObjectInterfacesDom {
+  SharedWorkerGlobalScopeImpl.internal_() : super.internal_();
+  get runtimeType => SharedWorkerGlobalScope;
+  toString() => super.toString();
+}
+patch class SourceBuffer {
+  static Type get instanceRuntimeType => SourceBufferImpl;
+
+}
+class SourceBufferImpl extends SourceBuffer implements js_library.JSObjectInterfacesDom {
+  SourceBufferImpl.internal_() : super.internal_();
+  get runtimeType => SourceBuffer;
+  toString() => super.toString();
+}
+patch class SourceBufferList {
+  static Type get instanceRuntimeType => SourceBufferListImpl;
+
+}
+class SourceBufferListImpl extends SourceBufferList implements js_library.JSObjectInterfacesDom {
+  SourceBufferListImpl.internal_() : super.internal_();
+  get runtimeType => SourceBufferList;
+  toString() => super.toString();
+}
+patch class SourceElement {
+  static Type get instanceRuntimeType => SourceElementImpl;
+
+}
+class SourceElementImpl extends SourceElement implements js_library.JSObjectInterfacesDom {
+  SourceElementImpl.internal_() : super.internal_();
+  get runtimeType => SourceElement;
+  toString() => super.toString();
+}
+patch class SourceInfo {
+  static Type get instanceRuntimeType => SourceInfoImpl;
+
+}
+class SourceInfoImpl extends SourceInfo implements js_library.JSObjectInterfacesDom {
+  SourceInfoImpl.internal_() : super.internal_();
+  get runtimeType => SourceInfo;
+  toString() => super.toString();
+}
+patch class SpanElement {
+  static Type get instanceRuntimeType => SpanElementImpl;
+
+}
+class SpanElementImpl extends SpanElement implements js_library.JSObjectInterfacesDom {
+  SpanElementImpl.internal_() : super.internal_();
+  get runtimeType => SpanElement;
+  toString() => super.toString();
+}
+patch class SpeechGrammar {
+  static Type get instanceRuntimeType => SpeechGrammarImpl;
+
+}
+class SpeechGrammarImpl extends SpeechGrammar implements js_library.JSObjectInterfacesDom {
+  SpeechGrammarImpl.internal_() : super.internal_();
+  get runtimeType => SpeechGrammar;
+  toString() => super.toString();
+}
+patch class SpeechGrammarList {
+  static Type get instanceRuntimeType => SpeechGrammarListImpl;
+
+}
+class SpeechGrammarListImpl extends SpeechGrammarList implements js_library.JSObjectInterfacesDom {
+  SpeechGrammarListImpl.internal_() : super.internal_();
+  get runtimeType => SpeechGrammarList;
+  toString() => super.toString();
+}
+patch class SpeechRecognition {
+  static Type get instanceRuntimeType => SpeechRecognitionImpl;
+
+}
+class SpeechRecognitionImpl extends SpeechRecognition implements js_library.JSObjectInterfacesDom {
+  SpeechRecognitionImpl.internal_() : super.internal_();
+  get runtimeType => SpeechRecognition;
+  toString() => super.toString();
+}
+patch class SpeechRecognitionAlternative {
+  static Type get instanceRuntimeType => SpeechRecognitionAlternativeImpl;
+
+}
+class SpeechRecognitionAlternativeImpl extends SpeechRecognitionAlternative implements js_library.JSObjectInterfacesDom {
+  SpeechRecognitionAlternativeImpl.internal_() : super.internal_();
+  get runtimeType => SpeechRecognitionAlternative;
+  toString() => super.toString();
+}
+patch class SpeechRecognitionError {
+  static Type get instanceRuntimeType => SpeechRecognitionErrorImpl;
+
+}
+class SpeechRecognitionErrorImpl extends SpeechRecognitionError implements js_library.JSObjectInterfacesDom {
+  SpeechRecognitionErrorImpl.internal_() : super.internal_();
+  get runtimeType => SpeechRecognitionError;
+  toString() => super.toString();
+}
+patch class SpeechRecognitionEvent {
+  static Type get instanceRuntimeType => SpeechRecognitionEventImpl;
+
+}
+class SpeechRecognitionEventImpl extends SpeechRecognitionEvent implements js_library.JSObjectInterfacesDom {
+  SpeechRecognitionEventImpl.internal_() : super.internal_();
+  get runtimeType => SpeechRecognitionEvent;
+  toString() => super.toString();
+}
+patch class SpeechRecognitionResult {
+  static Type get instanceRuntimeType => SpeechRecognitionResultImpl;
+
+}
+class SpeechRecognitionResultImpl extends SpeechRecognitionResult implements js_library.JSObjectInterfacesDom {
+  SpeechRecognitionResultImpl.internal_() : super.internal_();
+  get runtimeType => SpeechRecognitionResult;
+  toString() => super.toString();
+}
+patch class SpeechSynthesis {
+  static Type get instanceRuntimeType => SpeechSynthesisImpl;
+
+}
+class SpeechSynthesisImpl extends SpeechSynthesis implements js_library.JSObjectInterfacesDom {
+  SpeechSynthesisImpl.internal_() : super.internal_();
+  get runtimeType => SpeechSynthesis;
+  toString() => super.toString();
+}
+patch class SpeechSynthesisEvent {
+  static Type get instanceRuntimeType => SpeechSynthesisEventImpl;
+
+}
+class SpeechSynthesisEventImpl extends SpeechSynthesisEvent implements js_library.JSObjectInterfacesDom {
+  SpeechSynthesisEventImpl.internal_() : super.internal_();
+  get runtimeType => SpeechSynthesisEvent;
+  toString() => super.toString();
+}
+patch class SpeechSynthesisUtterance {
+  static Type get instanceRuntimeType => SpeechSynthesisUtteranceImpl;
+
+}
+class SpeechSynthesisUtteranceImpl extends SpeechSynthesisUtterance implements js_library.JSObjectInterfacesDom {
+  SpeechSynthesisUtteranceImpl.internal_() : super.internal_();
+  get runtimeType => SpeechSynthesisUtterance;
+  toString() => super.toString();
+}
+patch class SpeechSynthesisVoice {
+  static Type get instanceRuntimeType => SpeechSynthesisVoiceImpl;
+
+}
+class SpeechSynthesisVoiceImpl extends SpeechSynthesisVoice implements js_library.JSObjectInterfacesDom {
+  SpeechSynthesisVoiceImpl.internal_() : super.internal_();
+  get runtimeType => SpeechSynthesisVoice;
+  toString() => super.toString();
+}
+patch class StashedMessagePort {
+  static Type get instanceRuntimeType => StashedMessagePortImpl;
+
+}
+class StashedMessagePortImpl extends StashedMessagePort implements js_library.JSObjectInterfacesDom {
+  StashedMessagePortImpl.internal_() : super.internal_();
+  get runtimeType => StashedMessagePort;
+  toString() => super.toString();
+}
+patch class StashedPortCollection {
+  static Type get instanceRuntimeType => StashedPortCollectionImpl;
+
+}
+class StashedPortCollectionImpl extends StashedPortCollection implements js_library.JSObjectInterfacesDom {
+  StashedPortCollectionImpl.internal_() : super.internal_();
+  get runtimeType => StashedPortCollection;
+  toString() => super.toString();
+}
+patch class Storage {
+  static Type get instanceRuntimeType => StorageImpl;
+
+}
+class StorageImpl extends Storage implements js_library.JSObjectInterfacesDom {
+  StorageImpl.internal_() : super.internal_();
+  get runtimeType => Storage;
+  toString() => super.toString();
+}
+patch class StorageEvent {
+  static Type get instanceRuntimeType => StorageEventImpl;
+
+}
+class StorageEventImpl extends StorageEvent implements js_library.JSObjectInterfacesDom {
+  StorageEventImpl.internal_() : super.internal_();
+  get runtimeType => StorageEvent;
+  toString() => super.toString();
+}
+patch class StorageInfo {
+  static Type get instanceRuntimeType => StorageInfoImpl;
+
+}
+class StorageInfoImpl extends StorageInfo implements js_library.JSObjectInterfacesDom {
+  StorageInfoImpl.internal_() : super.internal_();
+  get runtimeType => StorageInfo;
+  toString() => super.toString();
+}
+patch class StorageQuota {
+  static Type get instanceRuntimeType => StorageQuotaImpl;
+
+}
+class StorageQuotaImpl extends StorageQuota implements js_library.JSObjectInterfacesDom {
+  StorageQuotaImpl.internal_() : super.internal_();
+  get runtimeType => StorageQuota;
+  toString() => super.toString();
+}
+patch class StyleElement {
+  static Type get instanceRuntimeType => StyleElementImpl;
+
+}
+class StyleElementImpl extends StyleElement implements js_library.JSObjectInterfacesDom {
+  StyleElementImpl.internal_() : super.internal_();
+  get runtimeType => StyleElement;
+  toString() => super.toString();
+}
+patch class StyleMedia {
+  static Type get instanceRuntimeType => StyleMediaImpl;
+
+}
+class StyleMediaImpl extends StyleMedia implements js_library.JSObjectInterfacesDom {
+  StyleMediaImpl.internal_() : super.internal_();
+  get runtimeType => StyleMedia;
+  toString() => super.toString();
+}
+patch class StyleSheet {
+  static Type get instanceRuntimeType => StyleSheetImpl;
+
+}
+class StyleSheetImpl extends StyleSheet implements js_library.JSObjectInterfacesDom {
+  StyleSheetImpl.internal_() : super.internal_();
+  get runtimeType => StyleSheet;
+  toString() => super.toString();
+}
+patch class SyncEvent {
+  static Type get instanceRuntimeType => SyncEventImpl;
+
+}
+class SyncEventImpl extends SyncEvent implements js_library.JSObjectInterfacesDom {
+  SyncEventImpl.internal_() : super.internal_();
+  get runtimeType => SyncEvent;
+  toString() => super.toString();
+}
+patch class SyncManager {
+  static Type get instanceRuntimeType => SyncManagerImpl;
+
+}
+class SyncManagerImpl extends SyncManager implements js_library.JSObjectInterfacesDom {
+  SyncManagerImpl.internal_() : super.internal_();
+  get runtimeType => SyncManager;
+  toString() => super.toString();
+}
+patch class SyncRegistration {
+  static Type get instanceRuntimeType => SyncRegistrationImpl;
+
+}
+class SyncRegistrationImpl extends SyncRegistration implements js_library.JSObjectInterfacesDom {
+  SyncRegistrationImpl.internal_() : super.internal_();
+  get runtimeType => SyncRegistration;
+  toString() => super.toString();
+}
+patch class TableCaptionElement {
+  static Type get instanceRuntimeType => TableCaptionElementImpl;
+
+}
+class TableCaptionElementImpl extends TableCaptionElement implements js_library.JSObjectInterfacesDom {
+  TableCaptionElementImpl.internal_() : super.internal_();
+  get runtimeType => TableCaptionElement;
+  toString() => super.toString();
+}
+patch class TableCellElement {
+  static Type get instanceRuntimeType => TableCellElementImpl;
+
+}
+class TableCellElementImpl extends TableCellElement implements js_library.JSObjectInterfacesDom {
+  TableCellElementImpl.internal_() : super.internal_();
+  get runtimeType => TableCellElement;
+  toString() => super.toString();
+}
+patch class TableColElement {
+  static Type get instanceRuntimeType => TableColElementImpl;
+
+}
+class TableColElementImpl extends TableColElement implements js_library.JSObjectInterfacesDom {
+  TableColElementImpl.internal_() : super.internal_();
+  get runtimeType => TableColElement;
+  toString() => super.toString();
+}
+patch class TableElement {
+  static Type get instanceRuntimeType => TableElementImpl;
+
+}
+class TableElementImpl extends TableElement implements js_library.JSObjectInterfacesDom {
+  TableElementImpl.internal_() : super.internal_();
+  get runtimeType => TableElement;
+  toString() => super.toString();
+}
+patch class TableRowElement {
+  static Type get instanceRuntimeType => TableRowElementImpl;
+
+}
+class TableRowElementImpl extends TableRowElement implements js_library.JSObjectInterfacesDom {
+  TableRowElementImpl.internal_() : super.internal_();
+  get runtimeType => TableRowElement;
+  toString() => super.toString();
+}
+patch class TableSectionElement {
+  static Type get instanceRuntimeType => TableSectionElementImpl;
+
+}
+class TableSectionElementImpl extends TableSectionElement implements js_library.JSObjectInterfacesDom {
+  TableSectionElementImpl.internal_() : super.internal_();
+  get runtimeType => TableSectionElement;
+  toString() => super.toString();
+}
+patch class TemplateElement {
+  static Type get instanceRuntimeType => TemplateElementImpl;
+
+}
+class TemplateElementImpl extends TemplateElement implements js_library.JSObjectInterfacesDom {
+  TemplateElementImpl.internal_() : super.internal_();
+  get runtimeType => TemplateElement;
+  toString() => super.toString();
+}
+patch class Text {
+  static Type get instanceRuntimeType => TextImpl;
+
+}
+class TextImpl extends Text implements js_library.JSObjectInterfacesDom {
+  TextImpl.internal_() : super.internal_();
+  get runtimeType => Text;
+  toString() => super.toString();
+}
+patch class TextAreaElement {
+  static Type get instanceRuntimeType => TextAreaElementImpl;
+
+}
+class TextAreaElementImpl extends TextAreaElement implements js_library.JSObjectInterfacesDom {
+  TextAreaElementImpl.internal_() : super.internal_();
+  get runtimeType => TextAreaElement;
+  toString() => super.toString();
+}
+patch class TextEvent {
+  static Type get instanceRuntimeType => TextEventImpl;
+
+}
+class TextEventImpl extends TextEvent implements js_library.JSObjectInterfacesDom {
+  TextEventImpl.internal_() : super.internal_();
+  get runtimeType => TextEvent;
+  toString() => super.toString();
+}
+patch class TextMetrics {
+  static Type get instanceRuntimeType => TextMetricsImpl;
+
+}
+class TextMetricsImpl extends TextMetrics implements js_library.JSObjectInterfacesDom {
+  TextMetricsImpl.internal_() : super.internal_();
+  get runtimeType => TextMetrics;
+  toString() => super.toString();
+}
+patch class TextTrack {
+  static Type get instanceRuntimeType => TextTrackImpl;
+
+}
+class TextTrackImpl extends TextTrack implements js_library.JSObjectInterfacesDom {
+  TextTrackImpl.internal_() : super.internal_();
+  get runtimeType => TextTrack;
+  toString() => super.toString();
+}
+patch class TextTrackCue {
+  static Type get instanceRuntimeType => TextTrackCueImpl;
+
+}
+class TextTrackCueImpl extends TextTrackCue implements js_library.JSObjectInterfacesDom {
+  TextTrackCueImpl.internal_() : super.internal_();
+  get runtimeType => TextTrackCue;
+  toString() => super.toString();
+}
+patch class TextTrackCueList {
+  static Type get instanceRuntimeType => TextTrackCueListImpl;
+
+}
+class TextTrackCueListImpl extends TextTrackCueList implements js_library.JSObjectInterfacesDom {
+  TextTrackCueListImpl.internal_() : super.internal_();
+  get runtimeType => TextTrackCueList;
+  toString() => super.toString();
+}
+patch class TextTrackList {
+  static Type get instanceRuntimeType => TextTrackListImpl;
+
+}
+class TextTrackListImpl extends TextTrackList implements js_library.JSObjectInterfacesDom {
+  TextTrackListImpl.internal_() : super.internal_();
+  get runtimeType => TextTrackList;
+  toString() => super.toString();
+}
+patch class TimeRanges {
+  static Type get instanceRuntimeType => TimeRangesImpl;
+
+}
+class TimeRangesImpl extends TimeRanges implements js_library.JSObjectInterfacesDom {
+  TimeRangesImpl.internal_() : super.internal_();
+  get runtimeType => TimeRanges;
+  toString() => super.toString();
+}
+patch class TitleElement {
+  static Type get instanceRuntimeType => TitleElementImpl;
+
+}
+class TitleElementImpl extends TitleElement implements js_library.JSObjectInterfacesDom {
+  TitleElementImpl.internal_() : super.internal_();
+  get runtimeType => TitleElement;
+  toString() => super.toString();
+}
+patch class Touch {
+  static Type get instanceRuntimeType => TouchImpl;
+
+}
+class TouchImpl extends Touch implements js_library.JSObjectInterfacesDom {
+  TouchImpl.internal_() : super.internal_();
+  get runtimeType => Touch;
+  toString() => super.toString();
+}
+patch class TouchEvent {
+  static Type get instanceRuntimeType => TouchEventImpl;
+
+}
+class TouchEventImpl extends TouchEvent implements js_library.JSObjectInterfacesDom {
+  TouchEventImpl.internal_() : super.internal_();
+  get runtimeType => TouchEvent;
+  toString() => super.toString();
+}
+patch class TouchList {
+  static Type get instanceRuntimeType => TouchListImpl;
+
+}
+class TouchListImpl extends TouchList implements js_library.JSObjectInterfacesDom {
+  TouchListImpl.internal_() : super.internal_();
+  get runtimeType => TouchList;
+  toString() => super.toString();
+}
+patch class TrackDefault {
+  static Type get instanceRuntimeType => TrackDefaultImpl;
+
+}
+class TrackDefaultImpl extends TrackDefault implements js_library.JSObjectInterfacesDom {
+  TrackDefaultImpl.internal_() : super.internal_();
+  get runtimeType => TrackDefault;
+  toString() => super.toString();
+}
+patch class TrackDefaultList {
+  static Type get instanceRuntimeType => TrackDefaultListImpl;
+
+}
+class TrackDefaultListImpl extends TrackDefaultList implements js_library.JSObjectInterfacesDom {
+  TrackDefaultListImpl.internal_() : super.internal_();
+  get runtimeType => TrackDefaultList;
+  toString() => super.toString();
+}
+patch class TrackElement {
+  static Type get instanceRuntimeType => TrackElementImpl;
+
+}
+class TrackElementImpl extends TrackElement implements js_library.JSObjectInterfacesDom {
+  TrackElementImpl.internal_() : super.internal_();
+  get runtimeType => TrackElement;
+  toString() => super.toString();
+}
+patch class TrackEvent {
+  static Type get instanceRuntimeType => TrackEventImpl;
+
+}
+class TrackEventImpl extends TrackEvent implements js_library.JSObjectInterfacesDom {
+  TrackEventImpl.internal_() : super.internal_();
+  get runtimeType => TrackEvent;
+  toString() => super.toString();
+}
+patch class TransitionEvent {
+  static Type get instanceRuntimeType => TransitionEventImpl;
+
+}
+class TransitionEventImpl extends TransitionEvent implements js_library.JSObjectInterfacesDom {
+  TransitionEventImpl.internal_() : super.internal_();
+  get runtimeType => TransitionEvent;
+  toString() => super.toString();
+}
+patch class TreeWalker {
+  static Type get instanceRuntimeType => TreeWalkerImpl;
+
+}
+class TreeWalkerImpl extends TreeWalker implements js_library.JSObjectInterfacesDom {
+  TreeWalkerImpl.internal_() : super.internal_();
+  get runtimeType => TreeWalker;
+  toString() => super.toString();
+}
+patch class UIEvent {
+  static Type get instanceRuntimeType => UIEventImpl;
+
+}
+class UIEventImpl extends UIEvent implements js_library.JSObjectInterfacesDom {
+  UIEventImpl.internal_() : super.internal_();
+  get runtimeType => UIEvent;
+  toString() => super.toString();
+}
+patch class UListElement {
+  static Type get instanceRuntimeType => UListElementImpl;
+
+}
+class UListElementImpl extends UListElement implements js_library.JSObjectInterfacesDom {
+  UListElementImpl.internal_() : super.internal_();
+  get runtimeType => UListElement;
+  toString() => super.toString();
+}
+patch class UnknownElement {
+  static Type get instanceRuntimeType => UnknownElementImpl;
+
+}
+class UnknownElementImpl extends UnknownElement implements js_library.JSObjectInterfacesDom {
+  UnknownElementImpl.internal_() : super.internal_();
+  get runtimeType => UnknownElement;
+  toString() => super.toString();
+}
+patch class Url {
+  static Type get instanceRuntimeType => UrlImpl;
+
+}
+class UrlImpl extends Url implements js_library.JSObjectInterfacesDom {
+  UrlImpl.internal_() : super.internal_();
+  get runtimeType => Url;
+  toString() => super.toString();
+}
+patch class UrlUtils {
+  static Type get instanceRuntimeType => UrlUtilsImpl;
+
+}
+class UrlUtilsImpl extends UrlUtils implements js_library.JSObjectInterfacesDom {
+  UrlUtilsImpl.internal_() : super.internal_();
+  get runtimeType => UrlUtils;
+  toString() => super.toString();
+}
+patch class UrlUtilsReadOnly {
+  static Type get instanceRuntimeType => UrlUtilsReadOnlyImpl;
+
+}
+class UrlUtilsReadOnlyImpl extends UrlUtilsReadOnly implements js_library.JSObjectInterfacesDom {
+  UrlUtilsReadOnlyImpl.internal_() : super.internal_();
+  get runtimeType => UrlUtilsReadOnly;
+  toString() => super.toString();
+}
+patch class VRDevice {
+  static Type get instanceRuntimeType => VRDeviceImpl;
+
+}
+class VRDeviceImpl extends VRDevice implements js_library.JSObjectInterfacesDom {
+  VRDeviceImpl.internal_() : super.internal_();
+  get runtimeType => VRDevice;
+  toString() => super.toString();
+}
+patch class VREyeParameters {
+  static Type get instanceRuntimeType => VREyeParametersImpl;
+
+}
+class VREyeParametersImpl extends VREyeParameters implements js_library.JSObjectInterfacesDom {
+  VREyeParametersImpl.internal_() : super.internal_();
+  get runtimeType => VREyeParameters;
+  toString() => super.toString();
+}
+patch class VRFieldOfView {
+  static Type get instanceRuntimeType => VRFieldOfViewImpl;
+
+}
+class VRFieldOfViewImpl extends VRFieldOfView implements js_library.JSObjectInterfacesDom {
+  VRFieldOfViewImpl.internal_() : super.internal_();
+  get runtimeType => VRFieldOfView;
+  toString() => super.toString();
+}
+patch class VRPositionState {
+  static Type get instanceRuntimeType => VRPositionStateImpl;
+
+}
+class VRPositionStateImpl extends VRPositionState implements js_library.JSObjectInterfacesDom {
+  VRPositionStateImpl.internal_() : super.internal_();
+  get runtimeType => VRPositionState;
+  toString() => super.toString();
+}
+patch class ValidityState {
+  static Type get instanceRuntimeType => ValidityStateImpl;
+
+}
+class ValidityStateImpl extends ValidityState implements js_library.JSObjectInterfacesDom {
+  ValidityStateImpl.internal_() : super.internal_();
+  get runtimeType => ValidityState;
+  toString() => super.toString();
+}
+patch class VideoElement {
+  static Type get instanceRuntimeType => VideoElementImpl;
+
+}
+class VideoElementImpl extends VideoElement implements js_library.JSObjectInterfacesDom {
+  VideoElementImpl.internal_() : super.internal_();
+  get runtimeType => VideoElement;
+  toString() => super.toString();
+}
+patch class VideoPlaybackQuality {
+  static Type get instanceRuntimeType => VideoPlaybackQualityImpl;
+
+}
+class VideoPlaybackQualityImpl extends VideoPlaybackQuality implements js_library.JSObjectInterfacesDom {
+  VideoPlaybackQualityImpl.internal_() : super.internal_();
+  get runtimeType => VideoPlaybackQuality;
+  toString() => super.toString();
+}
+patch class VideoTrack {
+  static Type get instanceRuntimeType => VideoTrackImpl;
+
+}
+class VideoTrackImpl extends VideoTrack implements js_library.JSObjectInterfacesDom {
+  VideoTrackImpl.internal_() : super.internal_();
+  get runtimeType => VideoTrack;
+  toString() => super.toString();
+}
+patch class VideoTrackList {
+  static Type get instanceRuntimeType => VideoTrackListImpl;
+
+}
+class VideoTrackListImpl extends VideoTrackList implements js_library.JSObjectInterfacesDom {
+  VideoTrackListImpl.internal_() : super.internal_();
+  get runtimeType => VideoTrackList;
+  toString() => super.toString();
+}
+patch class VttCue {
+  static Type get instanceRuntimeType => VttCueImpl;
+
+}
+class VttCueImpl extends VttCue implements js_library.JSObjectInterfacesDom {
+  VttCueImpl.internal_() : super.internal_();
+  get runtimeType => VttCue;
+  toString() => super.toString();
+}
+patch class VttRegion {
+  static Type get instanceRuntimeType => VttRegionImpl;
+
+}
+class VttRegionImpl extends VttRegion implements js_library.JSObjectInterfacesDom {
+  VttRegionImpl.internal_() : super.internal_();
+  get runtimeType => VttRegion;
+  toString() => super.toString();
+}
+patch class VttRegionList {
+  static Type get instanceRuntimeType => VttRegionListImpl;
+
+}
+class VttRegionListImpl extends VttRegionList implements js_library.JSObjectInterfacesDom {
+  VttRegionListImpl.internal_() : super.internal_();
+  get runtimeType => VttRegionList;
+  toString() => super.toString();
+}
+patch class WebSocket {
+  static Type get instanceRuntimeType => WebSocketImpl;
+
+}
+class WebSocketImpl extends WebSocket implements js_library.JSObjectInterfacesDom {
+  WebSocketImpl.internal_() : super.internal_();
+  get runtimeType => WebSocket;
+  toString() => super.toString();
+}
+patch class WheelEvent {
+  static Type get instanceRuntimeType => WheelEventImpl;
+
+}
+class WheelEventImpl extends WheelEvent implements js_library.JSObjectInterfacesDom {
+  WheelEventImpl.internal_() : super.internal_();
+  get runtimeType => WheelEvent;
+  toString() => super.toString();
+}
+patch class Window {
+  static Type get instanceRuntimeType => WindowImpl;
+
+}
+class WindowImpl extends Window implements js_library.JSObjectInterfacesDom {
+  WindowImpl.internal_() : super.internal_();
+  get runtimeType => Window;
+  toString() => super.toString();
+}
+patch class WindowBase64 {
+  static Type get instanceRuntimeType => WindowBase64Impl;
+
+}
+class WindowBase64Impl extends WindowBase64 implements js_library.JSObjectInterfacesDom {
+  WindowBase64Impl.internal_() : super.internal_();
+  get runtimeType => WindowBase64;
+  toString() => super.toString();
+}
+patch class WindowClient {
+  static Type get instanceRuntimeType => WindowClientImpl;
+
+}
+class WindowClientImpl extends WindowClient implements js_library.JSObjectInterfacesDom {
+  WindowClientImpl.internal_() : super.internal_();
+  get runtimeType => WindowClient;
+  toString() => super.toString();
+}
+patch class WindowEventHandlers {
+  static Type get instanceRuntimeType => WindowEventHandlersImpl;
+
+}
+class WindowEventHandlersImpl extends WindowEventHandlers implements js_library.JSObjectInterfacesDom {
+  WindowEventHandlersImpl.internal_() : super.internal_();
+  get runtimeType => WindowEventHandlers;
+  toString() => super.toString();
+}
+patch class Worker {
+  static Type get instanceRuntimeType => WorkerImpl;
+
+}
+class WorkerImpl extends Worker implements js_library.JSObjectInterfacesDom {
+  WorkerImpl.internal_() : super.internal_();
+  get runtimeType => Worker;
+  toString() => super.toString();
+}
+patch class WorkerConsole {
+  static Type get instanceRuntimeType => WorkerConsoleImpl;
+
+}
+class WorkerConsoleImpl extends WorkerConsole implements js_library.JSObjectInterfacesDom {
+  WorkerConsoleImpl.internal_() : super.internal_();
+  get runtimeType => WorkerConsole;
+  toString() => super.toString();
+}
+patch class WorkerGlobalScope {
+  static Type get instanceRuntimeType => WorkerGlobalScopeImpl;
+
+}
+class WorkerGlobalScopeImpl extends WorkerGlobalScope implements js_library.JSObjectInterfacesDom {
+  WorkerGlobalScopeImpl.internal_() : super.internal_();
+  get runtimeType => WorkerGlobalScope;
+  toString() => super.toString();
+}
+patch class WorkerPerformance {
+  static Type get instanceRuntimeType => WorkerPerformanceImpl;
+
+}
+class WorkerPerformanceImpl extends WorkerPerformance implements js_library.JSObjectInterfacesDom {
+  WorkerPerformanceImpl.internal_() : super.internal_();
+  get runtimeType => WorkerPerformance;
+  toString() => super.toString();
+}
+patch class XPathEvaluator {
+  static Type get instanceRuntimeType => XPathEvaluatorImpl;
+
+}
+class XPathEvaluatorImpl extends XPathEvaluator implements js_library.JSObjectInterfacesDom {
+  XPathEvaluatorImpl.internal_() : super.internal_();
+  get runtimeType => XPathEvaluator;
+  toString() => super.toString();
+}
+patch class XPathExpression {
+  static Type get instanceRuntimeType => XPathExpressionImpl;
+
+}
+class XPathExpressionImpl extends XPathExpression implements js_library.JSObjectInterfacesDom {
+  XPathExpressionImpl.internal_() : super.internal_();
+  get runtimeType => XPathExpression;
+  toString() => super.toString();
+}
+patch class XPathNSResolver {
+  static Type get instanceRuntimeType => XPathNSResolverImpl;
+
+}
+class XPathNSResolverImpl extends XPathNSResolver implements js_library.JSObjectInterfacesDom {
+  XPathNSResolverImpl.internal_() : super.internal_();
+  get runtimeType => XPathNSResolver;
+  toString() => super.toString();
+}
+patch class XPathResult {
+  static Type get instanceRuntimeType => XPathResultImpl;
+
+}
+class XPathResultImpl extends XPathResult implements js_library.JSObjectInterfacesDom {
+  XPathResultImpl.internal_() : super.internal_();
+  get runtimeType => XPathResult;
+  toString() => super.toString();
+}
+patch class XmlDocument {
+  static Type get instanceRuntimeType => XmlDocumentImpl;
+
+}
+class XmlDocumentImpl extends XmlDocument implements js_library.JSObjectInterfacesDom {
+  XmlDocumentImpl.internal_() : super.internal_();
+  get runtimeType => XmlDocument;
+  toString() => super.toString();
+}
+patch class XmlSerializer {
+  static Type get instanceRuntimeType => XmlSerializerImpl;
+
+}
+class XmlSerializerImpl extends XmlSerializer implements js_library.JSObjectInterfacesDom {
+  XmlSerializerImpl.internal_() : super.internal_();
+  get runtimeType => XmlSerializer;
+  toString() => super.toString();
+}
+patch class XsltProcessor {
+  static Type get instanceRuntimeType => XsltProcessorImpl;
+
+}
+class XsltProcessorImpl extends XsltProcessor implements js_library.JSObjectInterfacesDom {
+  XsltProcessorImpl.internal_() : super.internal_();
+  get runtimeType => XsltProcessor;
+  toString() => super.toString();
+}
+patch class _Attr {
+  static Type get instanceRuntimeType => _AttrImpl;
+
+}
+class _AttrImpl extends _Attr implements js_library.JSObjectInterfacesDom {
+  _AttrImpl.internal_() : super.internal_();
+  get runtimeType => _Attr;
+  toString() => super.toString();
+}
+patch class _Cache {
+  static Type get instanceRuntimeType => _CacheImpl;
+
+}
+class _CacheImpl extends _Cache implements js_library.JSObjectInterfacesDom {
+  _CacheImpl.internal_() : super.internal_();
+  get runtimeType => _Cache;
+  toString() => super.toString();
+}
+patch class _CanvasPathMethods {
+  static Type get instanceRuntimeType => _CanvasPathMethodsImpl;
+
+}
+class _CanvasPathMethodsImpl extends _CanvasPathMethods implements js_library.JSObjectInterfacesDom {
+  _CanvasPathMethodsImpl.internal_() : super.internal_();
+  get runtimeType => _CanvasPathMethods;
+  toString() => super.toString();
+}
+patch class _ClientRect {
+  static Type get instanceRuntimeType => _ClientRectImpl;
+
+}
+class _ClientRectImpl extends _ClientRect implements js_library.JSObjectInterfacesDom {
+  _ClientRectImpl.internal_() : super.internal_();
+  get runtimeType => _ClientRect;
+  toString() => super.toString();
+}
+patch class _ClientRectList {
+  static Type get instanceRuntimeType => _ClientRectListImpl;
+
+}
+class _ClientRectListImpl extends _ClientRectList implements js_library.JSObjectInterfacesDom {
+  _ClientRectListImpl.internal_() : super.internal_();
+  get runtimeType => _ClientRectList;
+  toString() => super.toString();
+}
+patch class _CssRuleList {
+  static Type get instanceRuntimeType => _CssRuleListImpl;
+
+}
+class _CssRuleListImpl extends _CssRuleList implements js_library.JSObjectInterfacesDom {
+  _CssRuleListImpl.internal_() : super.internal_();
+  get runtimeType => _CssRuleList;
+  toString() => super.toString();
+}
+patch class _DOMFileSystemSync {
+  static Type get instanceRuntimeType => _DOMFileSystemSyncImpl;
+
+}
+class _DOMFileSystemSyncImpl extends _DOMFileSystemSync implements js_library.JSObjectInterfacesDom {
+  _DOMFileSystemSyncImpl.internal_() : super.internal_();
+  get runtimeType => _DOMFileSystemSync;
+  toString() => super.toString();
+}
+patch class _DirectoryEntrySync {
+  static Type get instanceRuntimeType => _DirectoryEntrySyncImpl;
+
+}
+class _DirectoryEntrySyncImpl extends _DirectoryEntrySync implements js_library.JSObjectInterfacesDom {
+  _DirectoryEntrySyncImpl.internal_() : super.internal_();
+  get runtimeType => _DirectoryEntrySync;
+  toString() => super.toString();
+}
+patch class _DirectoryReaderSync {
+  static Type get instanceRuntimeType => _DirectoryReaderSyncImpl;
+
+}
+class _DirectoryReaderSyncImpl extends _DirectoryReaderSync implements js_library.JSObjectInterfacesDom {
+  _DirectoryReaderSyncImpl.internal_() : super.internal_();
+  get runtimeType => _DirectoryReaderSync;
+  toString() => super.toString();
+}
+patch class _DocumentType {
+  static Type get instanceRuntimeType => _DocumentTypeImpl;
+
+}
+class _DocumentTypeImpl extends _DocumentType implements js_library.JSObjectInterfacesDom {
+  _DocumentTypeImpl.internal_() : super.internal_();
+  get runtimeType => _DocumentType;
+  toString() => super.toString();
+}
+patch class _DomRect {
+  static Type get instanceRuntimeType => _DomRectImpl;
+
+}
+class _DomRectImpl extends _DomRect implements js_library.JSObjectInterfacesDom {
+  _DomRectImpl.internal_() : super.internal_();
+  get runtimeType => _DomRect;
+  toString() => super.toString();
+}
+patch class _EntrySync {
+  static Type get instanceRuntimeType => _EntrySyncImpl;
+
+}
+class _EntrySyncImpl extends _EntrySync implements js_library.JSObjectInterfacesDom {
+  _EntrySyncImpl.internal_() : super.internal_();
+  get runtimeType => _EntrySync;
+  toString() => super.toString();
+}
+patch class _FileEntrySync {
+  static Type get instanceRuntimeType => _FileEntrySyncImpl;
+
+}
+class _FileEntrySyncImpl extends _FileEntrySync implements js_library.JSObjectInterfacesDom {
+  _FileEntrySyncImpl.internal_() : super.internal_();
+  get runtimeType => _FileEntrySync;
+  toString() => super.toString();
+}
+patch class _FileReaderSync {
+  static Type get instanceRuntimeType => _FileReaderSyncImpl;
+
+}
+class _FileReaderSyncImpl extends _FileReaderSync implements js_library.JSObjectInterfacesDom {
+  _FileReaderSyncImpl.internal_() : super.internal_();
+  get runtimeType => _FileReaderSync;
+  toString() => super.toString();
+}
+patch class _FileWriterSync {
+  static Type get instanceRuntimeType => _FileWriterSyncImpl;
+
+}
+class _FileWriterSyncImpl extends _FileWriterSync implements js_library.JSObjectInterfacesDom {
+  _FileWriterSyncImpl.internal_() : super.internal_();
+  get runtimeType => _FileWriterSync;
+  toString() => super.toString();
+}
+patch class _GamepadList {
+  static Type get instanceRuntimeType => _GamepadListImpl;
+
+}
+class _GamepadListImpl extends _GamepadList implements js_library.JSObjectInterfacesDom {
+  _GamepadListImpl.internal_() : super.internal_();
+  get runtimeType => _GamepadList;
+  toString() => super.toString();
+}
+patch class _HTMLAllCollection {
+  static Type get instanceRuntimeType => _HTMLAllCollectionImpl;
+
+}
+class _HTMLAllCollectionImpl extends _HTMLAllCollection implements js_library.JSObjectInterfacesDom {
+  _HTMLAllCollectionImpl.internal_() : super.internal_();
+  get runtimeType => _HTMLAllCollection;
+  toString() => super.toString();
+}
+patch class _HTMLAppletElement {
+  static Type get instanceRuntimeType => _HTMLAppletElementImpl;
+
+}
+class _HTMLAppletElementImpl extends _HTMLAppletElement implements js_library.JSObjectInterfacesDom {
+  _HTMLAppletElementImpl.internal_() : super.internal_();
+  get runtimeType => _HTMLAppletElement;
+  toString() => super.toString();
+}
+patch class _HTMLDirectoryElement {
+  static Type get instanceRuntimeType => _HTMLDirectoryElementImpl;
+
+}
+class _HTMLDirectoryElementImpl extends _HTMLDirectoryElement implements js_library.JSObjectInterfacesDom {
+  _HTMLDirectoryElementImpl.internal_() : super.internal_();
+  get runtimeType => _HTMLDirectoryElement;
+  toString() => super.toString();
+}
+patch class _HTMLFontElement {
+  static Type get instanceRuntimeType => _HTMLFontElementImpl;
+
+}
+class _HTMLFontElementImpl extends _HTMLFontElement implements js_library.JSObjectInterfacesDom {
+  _HTMLFontElementImpl.internal_() : super.internal_();
+  get runtimeType => _HTMLFontElement;
+  toString() => super.toString();
+}
+patch class _HTMLFrameElement {
+  static Type get instanceRuntimeType => _HTMLFrameElementImpl;
+
+}
+class _HTMLFrameElementImpl extends _HTMLFrameElement implements js_library.JSObjectInterfacesDom {
+  _HTMLFrameElementImpl.internal_() : super.internal_();
+  get runtimeType => _HTMLFrameElement;
+  toString() => super.toString();
+}
+patch class _HTMLFrameSetElement {
+  static Type get instanceRuntimeType => _HTMLFrameSetElementImpl;
+
+}
+class _HTMLFrameSetElementImpl extends _HTMLFrameSetElement implements js_library.JSObjectInterfacesDom {
+  _HTMLFrameSetElementImpl.internal_() : super.internal_();
+  get runtimeType => _HTMLFrameSetElement;
+  toString() => super.toString();
+}
+patch class _HTMLMarqueeElement {
+  static Type get instanceRuntimeType => _HTMLMarqueeElementImpl;
+
+}
+class _HTMLMarqueeElementImpl extends _HTMLMarqueeElement implements js_library.JSObjectInterfacesDom {
+  _HTMLMarqueeElementImpl.internal_() : super.internal_();
+  get runtimeType => _HTMLMarqueeElement;
+  toString() => super.toString();
+}
+patch class _MutationEvent {
+  static Type get instanceRuntimeType => _MutationEventImpl;
+
+}
+class _MutationEventImpl extends _MutationEvent implements js_library.JSObjectInterfacesDom {
+  _MutationEventImpl.internal_() : super.internal_();
+  get runtimeType => _MutationEvent;
+  toString() => super.toString();
+}
+patch class _NamedNodeMap {
+  static Type get instanceRuntimeType => _NamedNodeMapImpl;
+
+}
+class _NamedNodeMapImpl extends _NamedNodeMap implements js_library.JSObjectInterfacesDom {
+  _NamedNodeMapImpl.internal_() : super.internal_();
+  get runtimeType => _NamedNodeMap;
+  toString() => super.toString();
+}
+patch class _PagePopupController {
+  static Type get instanceRuntimeType => _PagePopupControllerImpl;
+
+}
+class _PagePopupControllerImpl extends _PagePopupController implements js_library.JSObjectInterfacesDom {
+  _PagePopupControllerImpl.internal_() : super.internal_();
+  get runtimeType => _PagePopupController;
+  toString() => super.toString();
+}
+patch class _RadioNodeList {
+  static Type get instanceRuntimeType => _RadioNodeListImpl;
+
+}
+class _RadioNodeListImpl extends _RadioNodeList implements js_library.JSObjectInterfacesDom {
+  _RadioNodeListImpl.internal_() : super.internal_();
+  get runtimeType => _RadioNodeList;
+  toString() => super.toString();
+}
+patch class _Request {
+  static Type get instanceRuntimeType => _RequestImpl;
+
+}
+class _RequestImpl extends _Request implements js_library.JSObjectInterfacesDom {
+  _RequestImpl.internal_() : super.internal_();
+  get runtimeType => _Request;
+  toString() => super.toString();
+}
+patch class _Response {
+  static Type get instanceRuntimeType => _ResponseImpl;
+
+}
+class _ResponseImpl extends _Response implements js_library.JSObjectInterfacesDom {
+  _ResponseImpl.internal_() : super.internal_();
+  get runtimeType => _Response;
+  toString() => super.toString();
+}
+patch class _ServiceWorker {
+  static Type get instanceRuntimeType => _ServiceWorkerImpl;
+
+}
+class _ServiceWorkerImpl extends _ServiceWorker implements js_library.JSObjectInterfacesDom {
+  _ServiceWorkerImpl.internal_() : super.internal_();
+  get runtimeType => _ServiceWorker;
+  toString() => super.toString();
+}
+patch class _SpeechRecognitionResultList {
+  static Type get instanceRuntimeType => _SpeechRecognitionResultListImpl;
+
+}
+class _SpeechRecognitionResultListImpl extends _SpeechRecognitionResultList implements js_library.JSObjectInterfacesDom {
+  _SpeechRecognitionResultListImpl.internal_() : super.internal_();
+  get runtimeType => _SpeechRecognitionResultList;
+  toString() => super.toString();
+}
+patch class _StyleSheetList {
+  static Type get instanceRuntimeType => _StyleSheetListImpl;
+
+}
+class _StyleSheetListImpl extends _StyleSheetList implements js_library.JSObjectInterfacesDom {
+  _StyleSheetListImpl.internal_() : super.internal_();
+  get runtimeType => _StyleSheetList;
+  toString() => super.toString();
+}
+patch class _SubtleCrypto {
+  static Type get instanceRuntimeType => _SubtleCryptoImpl;
+
+}
+class _SubtleCryptoImpl extends _SubtleCrypto implements js_library.JSObjectInterfacesDom {
+  _SubtleCryptoImpl.internal_() : super.internal_();
+  get runtimeType => _SubtleCrypto;
+  toString() => super.toString();
+}
+patch class _WebKitCSSMatrix {
+  static Type get instanceRuntimeType => _WebKitCSSMatrixImpl;
+
+}
+class _WebKitCSSMatrixImpl extends _WebKitCSSMatrix implements js_library.JSObjectInterfacesDom {
+  _WebKitCSSMatrixImpl.internal_() : super.internal_();
+  get runtimeType => _WebKitCSSMatrix;
+  toString() => super.toString();
+}
+patch class _WindowTimers {
+  static Type get instanceRuntimeType => _WindowTimersImpl;
+
+}
+class _WindowTimersImpl extends _WindowTimers implements js_library.JSObjectInterfacesDom {
+  _WindowTimersImpl.internal_() : super.internal_();
+  get runtimeType => _WindowTimers;
+  toString() => super.toString();
+}
+patch class _WorkerLocation {
+  static Type get instanceRuntimeType => _WorkerLocationImpl;
+
+}
+class _WorkerLocationImpl extends _WorkerLocation implements js_library.JSObjectInterfacesDom {
+  _WorkerLocationImpl.internal_() : super.internal_();
+  get runtimeType => _WorkerLocation;
+  toString() => super.toString();
+}
+patch class _WorkerNavigator {
+  static Type get instanceRuntimeType => _WorkerNavigatorImpl;
+
+}
+class _WorkerNavigatorImpl extends _WorkerNavigator implements js_library.JSObjectInterfacesDom {
+  _WorkerNavigatorImpl.internal_() : super.internal_();
+  get runtimeType => _WorkerNavigator;
+  toString() => super.toString();
+}
+patch class _XMLHttpRequestProgressEvent {
+  static Type get instanceRuntimeType => _XMLHttpRequestProgressEventImpl;
+
+}
+class _XMLHttpRequestProgressEventImpl extends _XMLHttpRequestProgressEvent implements js_library.JSObjectInterfacesDom {
+  _XMLHttpRequestProgressEventImpl.internal_() : super.internal_();
+  get runtimeType => _XMLHttpRequestProgressEvent;
+  toString() => super.toString();
+}
+
+"""],
+"dart:indexed_db": ["dart:indexed_db", "dart:indexed_db_js_interop_patch.dart", """import 'dart:js' as js_library;
+
+/**
+ * Placeholder object for cases where we need to determine exactly how many
+ * args were passed to a function.
+ */
+const _UNDEFINED_JS_CONST = const Object();
+
+patch class Cursor {
+  static Type get instanceRuntimeType => CursorImpl;
+
+}
+class CursorImpl extends Cursor implements js_library.JSObjectInterfacesDom {
+  CursorImpl.internal_() : super.internal_();
+  get runtimeType => Cursor;
+  toString() => super.toString();
+}
+patch class CursorWithValue {
+  static Type get instanceRuntimeType => CursorWithValueImpl;
+
+}
+class CursorWithValueImpl extends CursorWithValue implements js_library.JSObjectInterfacesDom {
+  CursorWithValueImpl.internal_() : super.internal_();
+  get runtimeType => CursorWithValue;
+  toString() => super.toString();
+}
+patch class Database {
+  static Type get instanceRuntimeType => DatabaseImpl;
+
+}
+class DatabaseImpl extends Database implements js_library.JSObjectInterfacesDom {
+  DatabaseImpl.internal_() : super.internal_();
+  get runtimeType => Database;
+  toString() => super.toString();
+}
+patch class IdbFactory {
+  static Type get instanceRuntimeType => IdbFactoryImpl;
+
+}
+class IdbFactoryImpl extends IdbFactory implements js_library.JSObjectInterfacesDom {
+  IdbFactoryImpl.internal_() : super.internal_();
+  get runtimeType => IdbFactory;
+  toString() => super.toString();
+}
+patch class Index {
+  static Type get instanceRuntimeType => IndexImpl;
+
+}
+class IndexImpl extends Index implements js_library.JSObjectInterfacesDom {
+  IndexImpl.internal_() : super.internal_();
+  get runtimeType => Index;
+  toString() => super.toString();
+}
+patch class KeyRange {
+  static Type get instanceRuntimeType => KeyRangeImpl;
+
+}
+class KeyRangeImpl extends KeyRange implements js_library.JSObjectInterfacesDom {
+  KeyRangeImpl.internal_() : super.internal_();
+  get runtimeType => KeyRange;
+  toString() => super.toString();
+}
+patch class ObjectStore {
+  static Type get instanceRuntimeType => ObjectStoreImpl;
+
+}
+class ObjectStoreImpl extends ObjectStore implements js_library.JSObjectInterfacesDom {
+  ObjectStoreImpl.internal_() : super.internal_();
+  get runtimeType => ObjectStore;
+  toString() => super.toString();
+}
+patch class OpenDBRequest {
+  static Type get instanceRuntimeType => OpenDBRequestImpl;
+
+}
+class OpenDBRequestImpl extends OpenDBRequest implements js_library.JSObjectInterfacesDom {
+  OpenDBRequestImpl.internal_() : super.internal_();
+  get runtimeType => OpenDBRequest;
+  toString() => super.toString();
+}
+patch class Request {
+  static Type get instanceRuntimeType => RequestImpl;
+
+}
+class RequestImpl extends Request implements js_library.JSObjectInterfacesDom {
+  RequestImpl.internal_() : super.internal_();
+  get runtimeType => Request;
+  toString() => super.toString();
+}
+patch class Transaction {
+  static Type get instanceRuntimeType => TransactionImpl;
+
+}
+class TransactionImpl extends Transaction implements js_library.JSObjectInterfacesDom {
+  TransactionImpl.internal_() : super.internal_();
+  get runtimeType => Transaction;
+  toString() => super.toString();
+}
+patch class VersionChangeEvent {
+  static Type get instanceRuntimeType => VersionChangeEventImpl;
+
+}
+class VersionChangeEventImpl extends VersionChangeEvent implements js_library.JSObjectInterfacesDom {
+  VersionChangeEventImpl.internal_() : super.internal_();
+  get runtimeType => VersionChangeEvent;
+  toString() => super.toString();
+}
+
+"""],
+"dart:web_gl": ["dart:web_gl", "dart:web_gl_js_interop_patch.dart", """import 'dart:js' as js_library;
+
+/**
+ * Placeholder object for cases where we need to determine exactly how many
+ * args were passed to a function.
+ */
+const _UNDEFINED_JS_CONST = const Object();
+
+patch class ActiveInfo {
+  static Type get instanceRuntimeType => ActiveInfoImpl;
+
+}
+class ActiveInfoImpl extends ActiveInfo implements js_library.JSObjectInterfacesDom {
+  ActiveInfoImpl.internal_() : super.internal_();
+  get runtimeType => ActiveInfo;
+  toString() => super.toString();
+}
+patch class AngleInstancedArrays {
+  static Type get instanceRuntimeType => AngleInstancedArraysImpl;
+
+}
+class AngleInstancedArraysImpl extends AngleInstancedArrays implements js_library.JSObjectInterfacesDom {
+  AngleInstancedArraysImpl.internal_() : super.internal_();
+  get runtimeType => AngleInstancedArrays;
+  toString() => super.toString();
+}
+patch class Buffer {
+  static Type get instanceRuntimeType => BufferImpl;
+
+}
+class BufferImpl extends Buffer implements js_library.JSObjectInterfacesDom {
+  BufferImpl.internal_() : super.internal_();
+  get runtimeType => Buffer;
+  toString() => super.toString();
+}
+patch class ChromiumSubscribeUniform {
+  static Type get instanceRuntimeType => ChromiumSubscribeUniformImpl;
+
+}
+class ChromiumSubscribeUniformImpl extends ChromiumSubscribeUniform implements js_library.JSObjectInterfacesDom {
+  ChromiumSubscribeUniformImpl.internal_() : super.internal_();
+  get runtimeType => ChromiumSubscribeUniform;
+  toString() => super.toString();
+}
+patch class CompressedTextureAtc {
+  static Type get instanceRuntimeType => CompressedTextureAtcImpl;
+
+}
+class CompressedTextureAtcImpl extends CompressedTextureAtc implements js_library.JSObjectInterfacesDom {
+  CompressedTextureAtcImpl.internal_() : super.internal_();
+  get runtimeType => CompressedTextureAtc;
+  toString() => super.toString();
+}
+patch class CompressedTextureETC1 {
+  static Type get instanceRuntimeType => CompressedTextureETC1Impl;
+
+}
+class CompressedTextureETC1Impl extends CompressedTextureETC1 implements js_library.JSObjectInterfacesDom {
+  CompressedTextureETC1Impl.internal_() : super.internal_();
+  get runtimeType => CompressedTextureETC1;
+  toString() => super.toString();
+}
+patch class CompressedTexturePvrtc {
+  static Type get instanceRuntimeType => CompressedTexturePvrtcImpl;
+
+}
+class CompressedTexturePvrtcImpl extends CompressedTexturePvrtc implements js_library.JSObjectInterfacesDom {
+  CompressedTexturePvrtcImpl.internal_() : super.internal_();
+  get runtimeType => CompressedTexturePvrtc;
+  toString() => super.toString();
+}
+patch class CompressedTextureS3TC {
+  static Type get instanceRuntimeType => CompressedTextureS3TCImpl;
+
+}
+class CompressedTextureS3TCImpl extends CompressedTextureS3TC implements js_library.JSObjectInterfacesDom {
+  CompressedTextureS3TCImpl.internal_() : super.internal_();
+  get runtimeType => CompressedTextureS3TC;
+  toString() => super.toString();
+}
+patch class ContextEvent {
+  static Type get instanceRuntimeType => ContextEventImpl;
+
+}
+class ContextEventImpl extends ContextEvent implements js_library.JSObjectInterfacesDom {
+  ContextEventImpl.internal_() : super.internal_();
+  get runtimeType => ContextEvent;
+  toString() => super.toString();
+}
+patch class DebugRendererInfo {
+  static Type get instanceRuntimeType => DebugRendererInfoImpl;
+
+}
+class DebugRendererInfoImpl extends DebugRendererInfo implements js_library.JSObjectInterfacesDom {
+  DebugRendererInfoImpl.internal_() : super.internal_();
+  get runtimeType => DebugRendererInfo;
+  toString() => super.toString();
+}
+patch class DebugShaders {
+  static Type get instanceRuntimeType => DebugShadersImpl;
+
+}
+class DebugShadersImpl extends DebugShaders implements js_library.JSObjectInterfacesDom {
+  DebugShadersImpl.internal_() : super.internal_();
+  get runtimeType => DebugShaders;
+  toString() => super.toString();
+}
+patch class DepthTexture {
+  static Type get instanceRuntimeType => DepthTextureImpl;
+
+}
+class DepthTextureImpl extends DepthTexture implements js_library.JSObjectInterfacesDom {
+  DepthTextureImpl.internal_() : super.internal_();
+  get runtimeType => DepthTexture;
+  toString() => super.toString();
+}
+patch class DrawBuffers {
+  static Type get instanceRuntimeType => DrawBuffersImpl;
+
+}
+class DrawBuffersImpl extends DrawBuffers implements js_library.JSObjectInterfacesDom {
+  DrawBuffersImpl.internal_() : super.internal_();
+  get runtimeType => DrawBuffers;
+  toString() => super.toString();
+}
+patch class EXTsRgb {
+  static Type get instanceRuntimeType => EXTsRgbImpl;
+
+}
+class EXTsRgbImpl extends EXTsRgb implements js_library.JSObjectInterfacesDom {
+  EXTsRgbImpl.internal_() : super.internal_();
+  get runtimeType => EXTsRgb;
+  toString() => super.toString();
+}
+patch class ExtBlendMinMax {
+  static Type get instanceRuntimeType => ExtBlendMinMaxImpl;
+
+}
+class ExtBlendMinMaxImpl extends ExtBlendMinMax implements js_library.JSObjectInterfacesDom {
+  ExtBlendMinMaxImpl.internal_() : super.internal_();
+  get runtimeType => ExtBlendMinMax;
+  toString() => super.toString();
+}
+patch class ExtFragDepth {
+  static Type get instanceRuntimeType => ExtFragDepthImpl;
+
+}
+class ExtFragDepthImpl extends ExtFragDepth implements js_library.JSObjectInterfacesDom {
+  ExtFragDepthImpl.internal_() : super.internal_();
+  get runtimeType => ExtFragDepth;
+  toString() => super.toString();
+}
+patch class ExtShaderTextureLod {
+  static Type get instanceRuntimeType => ExtShaderTextureLodImpl;
+
+}
+class ExtShaderTextureLodImpl extends ExtShaderTextureLod implements js_library.JSObjectInterfacesDom {
+  ExtShaderTextureLodImpl.internal_() : super.internal_();
+  get runtimeType => ExtShaderTextureLod;
+  toString() => super.toString();
+}
+patch class ExtTextureFilterAnisotropic {
+  static Type get instanceRuntimeType => ExtTextureFilterAnisotropicImpl;
+
+}
+class ExtTextureFilterAnisotropicImpl extends ExtTextureFilterAnisotropic implements js_library.JSObjectInterfacesDom {
+  ExtTextureFilterAnisotropicImpl.internal_() : super.internal_();
+  get runtimeType => ExtTextureFilterAnisotropic;
+  toString() => super.toString();
+}
+patch class Framebuffer {
+  static Type get instanceRuntimeType => FramebufferImpl;
+
+}
+class FramebufferImpl extends Framebuffer implements js_library.JSObjectInterfacesDom {
+  FramebufferImpl.internal_() : super.internal_();
+  get runtimeType => Framebuffer;
+  toString() => super.toString();
+}
+patch class LoseContext {
+  static Type get instanceRuntimeType => LoseContextImpl;
+
+}
+class LoseContextImpl extends LoseContext implements js_library.JSObjectInterfacesDom {
+  LoseContextImpl.internal_() : super.internal_();
+  get runtimeType => LoseContext;
+  toString() => super.toString();
+}
+patch class OesElementIndexUint {
+  static Type get instanceRuntimeType => OesElementIndexUintImpl;
+
+}
+class OesElementIndexUintImpl extends OesElementIndexUint implements js_library.JSObjectInterfacesDom {
+  OesElementIndexUintImpl.internal_() : super.internal_();
+  get runtimeType => OesElementIndexUint;
+  toString() => super.toString();
+}
+patch class OesStandardDerivatives {
+  static Type get instanceRuntimeType => OesStandardDerivativesImpl;
+
+}
+class OesStandardDerivativesImpl extends OesStandardDerivatives implements js_library.JSObjectInterfacesDom {
+  OesStandardDerivativesImpl.internal_() : super.internal_();
+  get runtimeType => OesStandardDerivatives;
+  toString() => super.toString();
+}
+patch class OesTextureFloat {
+  static Type get instanceRuntimeType => OesTextureFloatImpl;
+
+}
+class OesTextureFloatImpl extends OesTextureFloat implements js_library.JSObjectInterfacesDom {
+  OesTextureFloatImpl.internal_() : super.internal_();
+  get runtimeType => OesTextureFloat;
+  toString() => super.toString();
+}
+patch class OesTextureFloatLinear {
+  static Type get instanceRuntimeType => OesTextureFloatLinearImpl;
+
+}
+class OesTextureFloatLinearImpl extends OesTextureFloatLinear implements js_library.JSObjectInterfacesDom {
+  OesTextureFloatLinearImpl.internal_() : super.internal_();
+  get runtimeType => OesTextureFloatLinear;
+  toString() => super.toString();
+}
+patch class OesTextureHalfFloat {
+  static Type get instanceRuntimeType => OesTextureHalfFloatImpl;
+
+}
+class OesTextureHalfFloatImpl extends OesTextureHalfFloat implements js_library.JSObjectInterfacesDom {
+  OesTextureHalfFloatImpl.internal_() : super.internal_();
+  get runtimeType => OesTextureHalfFloat;
+  toString() => super.toString();
+}
+patch class OesTextureHalfFloatLinear {
+  static Type get instanceRuntimeType => OesTextureHalfFloatLinearImpl;
+
+}
+class OesTextureHalfFloatLinearImpl extends OesTextureHalfFloatLinear implements js_library.JSObjectInterfacesDom {
+  OesTextureHalfFloatLinearImpl.internal_() : super.internal_();
+  get runtimeType => OesTextureHalfFloatLinear;
+  toString() => super.toString();
+}
+patch class OesVertexArrayObject {
+  static Type get instanceRuntimeType => OesVertexArrayObjectImpl;
+
+}
+class OesVertexArrayObjectImpl extends OesVertexArrayObject implements js_library.JSObjectInterfacesDom {
+  OesVertexArrayObjectImpl.internal_() : super.internal_();
+  get runtimeType => OesVertexArrayObject;
+  toString() => super.toString();
+}
+patch class Program {
+  static Type get instanceRuntimeType => ProgramImpl;
+
+}
+class ProgramImpl extends Program implements js_library.JSObjectInterfacesDom {
+  ProgramImpl.internal_() : super.internal_();
+  get runtimeType => Program;
+  toString() => super.toString();
+}
+patch class Query {
+  static Type get instanceRuntimeType => QueryImpl;
+
+}
+class QueryImpl extends Query implements js_library.JSObjectInterfacesDom {
+  QueryImpl.internal_() : super.internal_();
+  get runtimeType => Query;
+  toString() => super.toString();
+}
+patch class Renderbuffer {
+  static Type get instanceRuntimeType => RenderbufferImpl;
+
+}
+class RenderbufferImpl extends Renderbuffer implements js_library.JSObjectInterfacesDom {
+  RenderbufferImpl.internal_() : super.internal_();
+  get runtimeType => Renderbuffer;
+  toString() => super.toString();
+}
+patch class RenderingContext {
+  static Type get instanceRuntimeType => RenderingContextImpl;
+
+}
+class RenderingContextImpl extends RenderingContext implements js_library.JSObjectInterfacesDom {
+  RenderingContextImpl.internal_() : super.internal_();
+  get runtimeType => RenderingContext;
+  toString() => super.toString();
+}
+patch class RenderingContext2 {
+  static Type get instanceRuntimeType => RenderingContext2Impl;
+
+}
+class RenderingContext2Impl extends RenderingContext2 implements js_library.JSObjectInterfacesDom {
+  RenderingContext2Impl.internal_() : super.internal_();
+  get runtimeType => RenderingContext2;
+  toString() => super.toString();
+}
+patch class Sampler {
+  static Type get instanceRuntimeType => SamplerImpl;
+
+}
+class SamplerImpl extends Sampler implements js_library.JSObjectInterfacesDom {
+  SamplerImpl.internal_() : super.internal_();
+  get runtimeType => Sampler;
+  toString() => super.toString();
+}
+patch class Shader {
+  static Type get instanceRuntimeType => ShaderImpl;
+
+}
+class ShaderImpl extends Shader implements js_library.JSObjectInterfacesDom {
+  ShaderImpl.internal_() : super.internal_();
+  get runtimeType => Shader;
+  toString() => super.toString();
+}
+patch class ShaderPrecisionFormat {
+  static Type get instanceRuntimeType => ShaderPrecisionFormatImpl;
+
+}
+class ShaderPrecisionFormatImpl extends ShaderPrecisionFormat implements js_library.JSObjectInterfacesDom {
+  ShaderPrecisionFormatImpl.internal_() : super.internal_();
+  get runtimeType => ShaderPrecisionFormat;
+  toString() => super.toString();
+}
+patch class Sync {
+  static Type get instanceRuntimeType => SyncImpl;
+
+}
+class SyncImpl extends Sync implements js_library.JSObjectInterfacesDom {
+  SyncImpl.internal_() : super.internal_();
+  get runtimeType => Sync;
+  toString() => super.toString();
+}
+patch class Texture {
+  static Type get instanceRuntimeType => TextureImpl;
+
+}
+class TextureImpl extends Texture implements js_library.JSObjectInterfacesDom {
+  TextureImpl.internal_() : super.internal_();
+  get runtimeType => Texture;
+  toString() => super.toString();
+}
+patch class TransformFeedback {
+  static Type get instanceRuntimeType => TransformFeedbackImpl;
+
+}
+class TransformFeedbackImpl extends TransformFeedback implements js_library.JSObjectInterfacesDom {
+  TransformFeedbackImpl.internal_() : super.internal_();
+  get runtimeType => TransformFeedback;
+  toString() => super.toString();
+}
+patch class UniformLocation {
+  static Type get instanceRuntimeType => UniformLocationImpl;
+
+}
+class UniformLocationImpl extends UniformLocation implements js_library.JSObjectInterfacesDom {
+  UniformLocationImpl.internal_() : super.internal_();
+  get runtimeType => UniformLocation;
+  toString() => super.toString();
+}
+patch class VertexArrayObject {
+  static Type get instanceRuntimeType => VertexArrayObjectImpl;
+
+}
+class VertexArrayObjectImpl extends VertexArrayObject implements js_library.JSObjectInterfacesDom {
+  VertexArrayObjectImpl.internal_() : super.internal_();
+  get runtimeType => VertexArrayObject;
+  toString() => super.toString();
+}
+patch class VertexArrayObjectOes {
+  static Type get instanceRuntimeType => VertexArrayObjectOesImpl;
+
+}
+class VertexArrayObjectOesImpl extends VertexArrayObjectOes implements js_library.JSObjectInterfacesDom {
+  VertexArrayObjectOesImpl.internal_() : super.internal_();
+  get runtimeType => VertexArrayObjectOes;
+  toString() => super.toString();
+}
+patch class _WebGL2RenderingContextBase {
+  static Type get instanceRuntimeType => _WebGL2RenderingContextBaseImpl;
+
+}
+class _WebGL2RenderingContextBaseImpl extends _WebGL2RenderingContextBase implements js_library.JSObjectInterfacesDom {
+  _WebGL2RenderingContextBaseImpl.internal_() : super.internal_();
+  get runtimeType => _WebGL2RenderingContextBase;
+  toString() => super.toString();
+}
+patch class _WebGLRenderingContextBase {
+  static Type get instanceRuntimeType => _WebGLRenderingContextBaseImpl;
+
+}
+class _WebGLRenderingContextBaseImpl extends _WebGLRenderingContextBase implements js_library.JSObjectInterfacesDom {
+  _WebGLRenderingContextBaseImpl.internal_() : super.internal_();
+  get runtimeType => _WebGLRenderingContextBase;
+  toString() => super.toString();
+}
+
+"""],
+"dart:web_sql": ["dart:web_sql", "dart:web_sql_js_interop_patch.dart", """import 'dart:js' as js_library;
+
+/**
+ * Placeholder object for cases where we need to determine exactly how many
+ * args were passed to a function.
+ */
+const _UNDEFINED_JS_CONST = const Object();
+
+patch class SqlDatabase {
+  static Type get instanceRuntimeType => SqlDatabaseImpl;
+
+}
+class SqlDatabaseImpl extends SqlDatabase implements js_library.JSObjectInterfacesDom {
+  SqlDatabaseImpl.internal_() : super.internal_();
+  get runtimeType => SqlDatabase;
+  toString() => super.toString();
+}
+patch class SqlError {
+  static Type get instanceRuntimeType => SqlErrorImpl;
+
+}
+class SqlErrorImpl extends SqlError implements js_library.JSObjectInterfacesDom {
+  SqlErrorImpl.internal_() : super.internal_();
+  get runtimeType => SqlError;
+  toString() => super.toString();
+}
+patch class SqlResultSet {
+  static Type get instanceRuntimeType => SqlResultSetImpl;
+
+}
+class SqlResultSetImpl extends SqlResultSet implements js_library.JSObjectInterfacesDom {
+  SqlResultSetImpl.internal_() : super.internal_();
+  get runtimeType => SqlResultSet;
+  toString() => super.toString();
+}
+patch class SqlResultSetRowList {
+  static Type get instanceRuntimeType => SqlResultSetRowListImpl;
+
+}
+class SqlResultSetRowListImpl extends SqlResultSetRowList implements js_library.JSObjectInterfacesDom {
+  SqlResultSetRowListImpl.internal_() : super.internal_();
+  get runtimeType => SqlResultSetRowList;
+  toString() => super.toString();
+}
+patch class SqlTransaction {
+  static Type get instanceRuntimeType => SqlTransactionImpl;
+
+}
+class SqlTransactionImpl extends SqlTransaction implements js_library.JSObjectInterfacesDom {
+  SqlTransactionImpl.internal_() : super.internal_();
+  get runtimeType => SqlTransaction;
+  toString() => super.toString();
+}
+
+"""],
+"dart:svg": ["dart:svg", "dart:svg_js_interop_patch.dart", """import 'dart:js' as js_library;
+
+/**
+ * Placeholder object for cases where we need to determine exactly how many
+ * args were passed to a function.
+ */
+const _UNDEFINED_JS_CONST = const Object();
+
+patch class AElement {
+  static Type get instanceRuntimeType => AElementImpl;
+
+}
+class AElementImpl extends AElement implements js_library.JSObjectInterfacesDom {
+  AElementImpl.internal_() : super.internal_();
+  get runtimeType => AElement;
+  toString() => super.toString();
+}
+patch class Angle {
+  static Type get instanceRuntimeType => AngleImpl;
+
+}
+class AngleImpl extends Angle implements js_library.JSObjectInterfacesDom {
+  AngleImpl.internal_() : super.internal_();
+  get runtimeType => Angle;
+  toString() => super.toString();
+}
+patch class AnimateElement {
+  static Type get instanceRuntimeType => AnimateElementImpl;
+
+}
+class AnimateElementImpl extends AnimateElement implements js_library.JSObjectInterfacesDom {
+  AnimateElementImpl.internal_() : super.internal_();
+  get runtimeType => AnimateElement;
+  toString() => super.toString();
+}
+patch class AnimateMotionElement {
+  static Type get instanceRuntimeType => AnimateMotionElementImpl;
+
+}
+class AnimateMotionElementImpl extends AnimateMotionElement implements js_library.JSObjectInterfacesDom {
+  AnimateMotionElementImpl.internal_() : super.internal_();
+  get runtimeType => AnimateMotionElement;
+  toString() => super.toString();
+}
+patch class AnimateTransformElement {
+  static Type get instanceRuntimeType => AnimateTransformElementImpl;
+
+}
+class AnimateTransformElementImpl extends AnimateTransformElement implements js_library.JSObjectInterfacesDom {
+  AnimateTransformElementImpl.internal_() : super.internal_();
+  get runtimeType => AnimateTransformElement;
+  toString() => super.toString();
+}
+patch class AnimatedAngle {
+  static Type get instanceRuntimeType => AnimatedAngleImpl;
+
+}
+class AnimatedAngleImpl extends AnimatedAngle implements js_library.JSObjectInterfacesDom {
+  AnimatedAngleImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedAngle;
+  toString() => super.toString();
+}
+patch class AnimatedBoolean {
+  static Type get instanceRuntimeType => AnimatedBooleanImpl;
+
+}
+class AnimatedBooleanImpl extends AnimatedBoolean implements js_library.JSObjectInterfacesDom {
+  AnimatedBooleanImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedBoolean;
+  toString() => super.toString();
+}
+patch class AnimatedEnumeration {
+  static Type get instanceRuntimeType => AnimatedEnumerationImpl;
+
+}
+class AnimatedEnumerationImpl extends AnimatedEnumeration implements js_library.JSObjectInterfacesDom {
+  AnimatedEnumerationImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedEnumeration;
+  toString() => super.toString();
+}
+patch class AnimatedInteger {
+  static Type get instanceRuntimeType => AnimatedIntegerImpl;
+
+}
+class AnimatedIntegerImpl extends AnimatedInteger implements js_library.JSObjectInterfacesDom {
+  AnimatedIntegerImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedInteger;
+  toString() => super.toString();
+}
+patch class AnimatedLength {
+  static Type get instanceRuntimeType => AnimatedLengthImpl;
+
+}
+class AnimatedLengthImpl extends AnimatedLength implements js_library.JSObjectInterfacesDom {
+  AnimatedLengthImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedLength;
+  toString() => super.toString();
+}
+patch class AnimatedLengthList {
+  static Type get instanceRuntimeType => AnimatedLengthListImpl;
+
+}
+class AnimatedLengthListImpl extends AnimatedLengthList implements js_library.JSObjectInterfacesDom {
+  AnimatedLengthListImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedLengthList;
+  toString() => super.toString();
+}
+patch class AnimatedNumber {
+  static Type get instanceRuntimeType => AnimatedNumberImpl;
+
+}
+class AnimatedNumberImpl extends AnimatedNumber implements js_library.JSObjectInterfacesDom {
+  AnimatedNumberImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedNumber;
+  toString() => super.toString();
+}
+patch class AnimatedNumberList {
+  static Type get instanceRuntimeType => AnimatedNumberListImpl;
+
+}
+class AnimatedNumberListImpl extends AnimatedNumberList implements js_library.JSObjectInterfacesDom {
+  AnimatedNumberListImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedNumberList;
+  toString() => super.toString();
+}
+patch class AnimatedPreserveAspectRatio {
+  static Type get instanceRuntimeType => AnimatedPreserveAspectRatioImpl;
+
+}
+class AnimatedPreserveAspectRatioImpl extends AnimatedPreserveAspectRatio implements js_library.JSObjectInterfacesDom {
+  AnimatedPreserveAspectRatioImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedPreserveAspectRatio;
+  toString() => super.toString();
+}
+patch class AnimatedRect {
+  static Type get instanceRuntimeType => AnimatedRectImpl;
+
+}
+class AnimatedRectImpl extends AnimatedRect implements js_library.JSObjectInterfacesDom {
+  AnimatedRectImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedRect;
+  toString() => super.toString();
+}
+patch class AnimatedString {
+  static Type get instanceRuntimeType => AnimatedStringImpl;
+
+}
+class AnimatedStringImpl extends AnimatedString implements js_library.JSObjectInterfacesDom {
+  AnimatedStringImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedString;
+  toString() => super.toString();
+}
+patch class AnimatedTransformList {
+  static Type get instanceRuntimeType => AnimatedTransformListImpl;
+
+}
+class AnimatedTransformListImpl extends AnimatedTransformList implements js_library.JSObjectInterfacesDom {
+  AnimatedTransformListImpl.internal_() : super.internal_();
+  get runtimeType => AnimatedTransformList;
+  toString() => super.toString();
+}
+patch class AnimationElement {
+  static Type get instanceRuntimeType => AnimationElementImpl;
+
+}
+class AnimationElementImpl extends AnimationElement implements js_library.JSObjectInterfacesDom {
+  AnimationElementImpl.internal_() : super.internal_();
+  get runtimeType => AnimationElement;
+  toString() => super.toString();
+}
+patch class CircleElement {
+  static Type get instanceRuntimeType => CircleElementImpl;
+
+}
+class CircleElementImpl extends CircleElement implements js_library.JSObjectInterfacesDom {
+  CircleElementImpl.internal_() : super.internal_();
+  get runtimeType => CircleElement;
+  toString() => super.toString();
+}
+patch class ClipPathElement {
+  static Type get instanceRuntimeType => ClipPathElementImpl;
+
+}
+class ClipPathElementImpl extends ClipPathElement implements js_library.JSObjectInterfacesDom {
+  ClipPathElementImpl.internal_() : super.internal_();
+  get runtimeType => ClipPathElement;
+  toString() => super.toString();
+}
+patch class DefsElement {
+  static Type get instanceRuntimeType => DefsElementImpl;
+
+}
+class DefsElementImpl extends DefsElement implements js_library.JSObjectInterfacesDom {
+  DefsElementImpl.internal_() : super.internal_();
+  get runtimeType => DefsElement;
+  toString() => super.toString();
+}
+patch class DescElement {
+  static Type get instanceRuntimeType => DescElementImpl;
+
+}
+class DescElementImpl extends DescElement implements js_library.JSObjectInterfacesDom {
+  DescElementImpl.internal_() : super.internal_();
+  get runtimeType => DescElement;
+  toString() => super.toString();
+}
+patch class DiscardElement {
+  static Type get instanceRuntimeType => DiscardElementImpl;
+
+}
+class DiscardElementImpl extends DiscardElement implements js_library.JSObjectInterfacesDom {
+  DiscardElementImpl.internal_() : super.internal_();
+  get runtimeType => DiscardElement;
+  toString() => super.toString();
+}
+patch class EllipseElement {
+  static Type get instanceRuntimeType => EllipseElementImpl;
+
+}
+class EllipseElementImpl extends EllipseElement implements js_library.JSObjectInterfacesDom {
+  EllipseElementImpl.internal_() : super.internal_();
+  get runtimeType => EllipseElement;
+  toString() => super.toString();
+}
+patch class FEBlendElement {
+  static Type get instanceRuntimeType => FEBlendElementImpl;
+
+}
+class FEBlendElementImpl extends FEBlendElement implements js_library.JSObjectInterfacesDom {
+  FEBlendElementImpl.internal_() : super.internal_();
+  get runtimeType => FEBlendElement;
+  toString() => super.toString();
+}
+patch class FEColorMatrixElement {
+  static Type get instanceRuntimeType => FEColorMatrixElementImpl;
+
+}
+class FEColorMatrixElementImpl extends FEColorMatrixElement implements js_library.JSObjectInterfacesDom {
+  FEColorMatrixElementImpl.internal_() : super.internal_();
+  get runtimeType => FEColorMatrixElement;
+  toString() => super.toString();
+}
+patch class FEComponentTransferElement {
+  static Type get instanceRuntimeType => FEComponentTransferElementImpl;
+
+}
+class FEComponentTransferElementImpl extends FEComponentTransferElement implements js_library.JSObjectInterfacesDom {
+  FEComponentTransferElementImpl.internal_() : super.internal_();
+  get runtimeType => FEComponentTransferElement;
+  toString() => super.toString();
+}
+patch class FECompositeElement {
+  static Type get instanceRuntimeType => FECompositeElementImpl;
+
+}
+class FECompositeElementImpl extends FECompositeElement implements js_library.JSObjectInterfacesDom {
+  FECompositeElementImpl.internal_() : super.internal_();
+  get runtimeType => FECompositeElement;
+  toString() => super.toString();
+}
+patch class FEConvolveMatrixElement {
+  static Type get instanceRuntimeType => FEConvolveMatrixElementImpl;
+
+}
+class FEConvolveMatrixElementImpl extends FEConvolveMatrixElement implements js_library.JSObjectInterfacesDom {
+  FEConvolveMatrixElementImpl.internal_() : super.internal_();
+  get runtimeType => FEConvolveMatrixElement;
+  toString() => super.toString();
+}
+patch class FEDiffuseLightingElement {
+  static Type get instanceRuntimeType => FEDiffuseLightingElementImpl;
+
+}
+class FEDiffuseLightingElementImpl extends FEDiffuseLightingElement implements js_library.JSObjectInterfacesDom {
+  FEDiffuseLightingElementImpl.internal_() : super.internal_();
+  get runtimeType => FEDiffuseLightingElement;
+  toString() => super.toString();
+}
+patch class FEDisplacementMapElement {
+  static Type get instanceRuntimeType => FEDisplacementMapElementImpl;
+
+}
+class FEDisplacementMapElementImpl extends FEDisplacementMapElement implements js_library.JSObjectInterfacesDom {
+  FEDisplacementMapElementImpl.internal_() : super.internal_();
+  get runtimeType => FEDisplacementMapElement;
+  toString() => super.toString();
+}
+patch class FEDistantLightElement {
+  static Type get instanceRuntimeType => FEDistantLightElementImpl;
+
+}
+class FEDistantLightElementImpl extends FEDistantLightElement implements js_library.JSObjectInterfacesDom {
+  FEDistantLightElementImpl.internal_() : super.internal_();
+  get runtimeType => FEDistantLightElement;
+  toString() => super.toString();
+}
+patch class FEFloodElement {
+  static Type get instanceRuntimeType => FEFloodElementImpl;
+
+}
+class FEFloodElementImpl extends FEFloodElement implements js_library.JSObjectInterfacesDom {
+  FEFloodElementImpl.internal_() : super.internal_();
+  get runtimeType => FEFloodElement;
+  toString() => super.toString();
+}
+patch class FEFuncAElement {
+  static Type get instanceRuntimeType => FEFuncAElementImpl;
+
+}
+class FEFuncAElementImpl extends FEFuncAElement implements js_library.JSObjectInterfacesDom {
+  FEFuncAElementImpl.internal_() : super.internal_();
+  get runtimeType => FEFuncAElement;
+  toString() => super.toString();
+}
+patch class FEFuncBElement {
+  static Type get instanceRuntimeType => FEFuncBElementImpl;
+
+}
+class FEFuncBElementImpl extends FEFuncBElement implements js_library.JSObjectInterfacesDom {
+  FEFuncBElementImpl.internal_() : super.internal_();
+  get runtimeType => FEFuncBElement;
+  toString() => super.toString();
+}
+patch class FEFuncGElement {
+  static Type get instanceRuntimeType => FEFuncGElementImpl;
+
+}
+class FEFuncGElementImpl extends FEFuncGElement implements js_library.JSObjectInterfacesDom {
+  FEFuncGElementImpl.internal_() : super.internal_();
+  get runtimeType => FEFuncGElement;
+  toString() => super.toString();
+}
+patch class FEFuncRElement {
+  static Type get instanceRuntimeType => FEFuncRElementImpl;
+
+}
+class FEFuncRElementImpl extends FEFuncRElement implements js_library.JSObjectInterfacesDom {
+  FEFuncRElementImpl.internal_() : super.internal_();
+  get runtimeType => FEFuncRElement;
+  toString() => super.toString();
+}
+patch class FEGaussianBlurElement {
+  static Type get instanceRuntimeType => FEGaussianBlurElementImpl;
+
+}
+class FEGaussianBlurElementImpl extends FEGaussianBlurElement implements js_library.JSObjectInterfacesDom {
+  FEGaussianBlurElementImpl.internal_() : super.internal_();
+  get runtimeType => FEGaussianBlurElement;
+  toString() => super.toString();
+}
+patch class FEImageElement {
+  static Type get instanceRuntimeType => FEImageElementImpl;
+
+}
+class FEImageElementImpl extends FEImageElement implements js_library.JSObjectInterfacesDom {
+  FEImageElementImpl.internal_() : super.internal_();
+  get runtimeType => FEImageElement;
+  toString() => super.toString();
+}
+patch class FEMergeElement {
+  static Type get instanceRuntimeType => FEMergeElementImpl;
+
+}
+class FEMergeElementImpl extends FEMergeElement implements js_library.JSObjectInterfacesDom {
+  FEMergeElementImpl.internal_() : super.internal_();
+  get runtimeType => FEMergeElement;
+  toString() => super.toString();
+}
+patch class FEMergeNodeElement {
+  static Type get instanceRuntimeType => FEMergeNodeElementImpl;
+
+}
+class FEMergeNodeElementImpl extends FEMergeNodeElement implements js_library.JSObjectInterfacesDom {
+  FEMergeNodeElementImpl.internal_() : super.internal_();
+  get runtimeType => FEMergeNodeElement;
+  toString() => super.toString();
+}
+patch class FEMorphologyElement {
+  static Type get instanceRuntimeType => FEMorphologyElementImpl;
+
+}
+class FEMorphologyElementImpl extends FEMorphologyElement implements js_library.JSObjectInterfacesDom {
+  FEMorphologyElementImpl.internal_() : super.internal_();
+  get runtimeType => FEMorphologyElement;
+  toString() => super.toString();
+}
+patch class FEOffsetElement {
+  static Type get instanceRuntimeType => FEOffsetElementImpl;
+
+}
+class FEOffsetElementImpl extends FEOffsetElement implements js_library.JSObjectInterfacesDom {
+  FEOffsetElementImpl.internal_() : super.internal_();
+  get runtimeType => FEOffsetElement;
+  toString() => super.toString();
+}
+patch class FEPointLightElement {
+  static Type get instanceRuntimeType => FEPointLightElementImpl;
+
+}
+class FEPointLightElementImpl extends FEPointLightElement implements js_library.JSObjectInterfacesDom {
+  FEPointLightElementImpl.internal_() : super.internal_();
+  get runtimeType => FEPointLightElement;
+  toString() => super.toString();
+}
+patch class FESpecularLightingElement {
+  static Type get instanceRuntimeType => FESpecularLightingElementImpl;
+
+}
+class FESpecularLightingElementImpl extends FESpecularLightingElement implements js_library.JSObjectInterfacesDom {
+  FESpecularLightingElementImpl.internal_() : super.internal_();
+  get runtimeType => FESpecularLightingElement;
+  toString() => super.toString();
+}
+patch class FESpotLightElement {
+  static Type get instanceRuntimeType => FESpotLightElementImpl;
+
+}
+class FESpotLightElementImpl extends FESpotLightElement implements js_library.JSObjectInterfacesDom {
+  FESpotLightElementImpl.internal_() : super.internal_();
+  get runtimeType => FESpotLightElement;
+  toString() => super.toString();
+}
+patch class FETileElement {
+  static Type get instanceRuntimeType => FETileElementImpl;
+
+}
+class FETileElementImpl extends FETileElement implements js_library.JSObjectInterfacesDom {
+  FETileElementImpl.internal_() : super.internal_();
+  get runtimeType => FETileElement;
+  toString() => super.toString();
+}
+patch class FETurbulenceElement {
+  static Type get instanceRuntimeType => FETurbulenceElementImpl;
+
+}
+class FETurbulenceElementImpl extends FETurbulenceElement implements js_library.JSObjectInterfacesDom {
+  FETurbulenceElementImpl.internal_() : super.internal_();
+  get runtimeType => FETurbulenceElement;
+  toString() => super.toString();
+}
+patch class FilterElement {
+  static Type get instanceRuntimeType => FilterElementImpl;
+
+}
+class FilterElementImpl extends FilterElement implements js_library.JSObjectInterfacesDom {
+  FilterElementImpl.internal_() : super.internal_();
+  get runtimeType => FilterElement;
+  toString() => super.toString();
+}
+patch class FilterPrimitiveStandardAttributes {
+  static Type get instanceRuntimeType => FilterPrimitiveStandardAttributesImpl;
+
+}
+class FilterPrimitiveStandardAttributesImpl extends FilterPrimitiveStandardAttributes implements js_library.JSObjectInterfacesDom {
+  FilterPrimitiveStandardAttributesImpl.internal_() : super.internal_();
+  get runtimeType => FilterPrimitiveStandardAttributes;
+  toString() => super.toString();
+}
+patch class FitToViewBox {
+  static Type get instanceRuntimeType => FitToViewBoxImpl;
+
+}
+class FitToViewBoxImpl extends FitToViewBox implements js_library.JSObjectInterfacesDom {
+  FitToViewBoxImpl.internal_() : super.internal_();
+  get runtimeType => FitToViewBox;
+  toString() => super.toString();
+}
+patch class ForeignObjectElement {
+  static Type get instanceRuntimeType => ForeignObjectElementImpl;
+
+}
+class ForeignObjectElementImpl extends ForeignObjectElement implements js_library.JSObjectInterfacesDom {
+  ForeignObjectElementImpl.internal_() : super.internal_();
+  get runtimeType => ForeignObjectElement;
+  toString() => super.toString();
+}
+patch class GElement {
+  static Type get instanceRuntimeType => GElementImpl;
+
+}
+class GElementImpl extends GElement implements js_library.JSObjectInterfacesDom {
+  GElementImpl.internal_() : super.internal_();
+  get runtimeType => GElement;
+  toString() => super.toString();
+}
+patch class GeometryElement {
+  static Type get instanceRuntimeType => GeometryElementImpl;
+
+}
+class GeometryElementImpl extends GeometryElement implements js_library.JSObjectInterfacesDom {
+  GeometryElementImpl.internal_() : super.internal_();
+  get runtimeType => GeometryElement;
+  toString() => super.toString();
+}
+patch class GraphicsElement {
+  static Type get instanceRuntimeType => GraphicsElementImpl;
+
+}
+class GraphicsElementImpl extends GraphicsElement implements js_library.JSObjectInterfacesDom {
+  GraphicsElementImpl.internal_() : super.internal_();
+  get runtimeType => GraphicsElement;
+  toString() => super.toString();
+}
+patch class ImageElement {
+  static Type get instanceRuntimeType => ImageElementImpl;
+
+}
+class ImageElementImpl extends ImageElement implements js_library.JSObjectInterfacesDom {
+  ImageElementImpl.internal_() : super.internal_();
+  get runtimeType => ImageElement;
+  toString() => super.toString();
+}
+patch class Length {
+  static Type get instanceRuntimeType => LengthImpl;
+
+}
+class LengthImpl extends Length implements js_library.JSObjectInterfacesDom {
+  LengthImpl.internal_() : super.internal_();
+  get runtimeType => Length;
+  toString() => super.toString();
+}
+patch class LengthList {
+  static Type get instanceRuntimeType => LengthListImpl;
+
+}
+class LengthListImpl extends LengthList implements js_library.JSObjectInterfacesDom {
+  LengthListImpl.internal_() : super.internal_();
+  get runtimeType => LengthList;
+  toString() => super.toString();
+}
+patch class LineElement {
+  static Type get instanceRuntimeType => LineElementImpl;
+
+}
+class LineElementImpl extends LineElement implements js_library.JSObjectInterfacesDom {
+  LineElementImpl.internal_() : super.internal_();
+  get runtimeType => LineElement;
+  toString() => super.toString();
+}
+patch class LinearGradientElement {
+  static Type get instanceRuntimeType => LinearGradientElementImpl;
+
+}
+class LinearGradientElementImpl extends LinearGradientElement implements js_library.JSObjectInterfacesDom {
+  LinearGradientElementImpl.internal_() : super.internal_();
+  get runtimeType => LinearGradientElement;
+  toString() => super.toString();
+}
+patch class MarkerElement {
+  static Type get instanceRuntimeType => MarkerElementImpl;
+
+}
+class MarkerElementImpl extends MarkerElement implements js_library.JSObjectInterfacesDom {
+  MarkerElementImpl.internal_() : super.internal_();
+  get runtimeType => MarkerElement;
+  toString() => super.toString();
+}
+patch class MaskElement {
+  static Type get instanceRuntimeType => MaskElementImpl;
+
+}
+class MaskElementImpl extends MaskElement implements js_library.JSObjectInterfacesDom {
+  MaskElementImpl.internal_() : super.internal_();
+  get runtimeType => MaskElement;
+  toString() => super.toString();
+}
+patch class Matrix {
+  static Type get instanceRuntimeType => MatrixImpl;
+
+}
+class MatrixImpl extends Matrix implements js_library.JSObjectInterfacesDom {
+  MatrixImpl.internal_() : super.internal_();
+  get runtimeType => Matrix;
+  toString() => super.toString();
+}
+patch class MetadataElement {
+  static Type get instanceRuntimeType => MetadataElementImpl;
+
+}
+class MetadataElementImpl extends MetadataElement implements js_library.JSObjectInterfacesDom {
+  MetadataElementImpl.internal_() : super.internal_();
+  get runtimeType => MetadataElement;
+  toString() => super.toString();
+}
+patch class Number {
+  static Type get instanceRuntimeType => NumberImpl;
+
+}
+class NumberImpl extends Number implements js_library.JSObjectInterfacesDom {
+  NumberImpl.internal_() : super.internal_();
+  get runtimeType => Number;
+  toString() => super.toString();
+}
+patch class NumberList {
+  static Type get instanceRuntimeType => NumberListImpl;
+
+}
+class NumberListImpl extends NumberList implements js_library.JSObjectInterfacesDom {
+  NumberListImpl.internal_() : super.internal_();
+  get runtimeType => NumberList;
+  toString() => super.toString();
+}
+patch class PathElement {
+  static Type get instanceRuntimeType => PathElementImpl;
+
+}
+class PathElementImpl extends PathElement implements js_library.JSObjectInterfacesDom {
+  PathElementImpl.internal_() : super.internal_();
+  get runtimeType => PathElement;
+  toString() => super.toString();
+}
+patch class PathSeg {
+  static Type get instanceRuntimeType => PathSegImpl;
+
+}
+class PathSegImpl extends PathSeg implements js_library.JSObjectInterfacesDom {
+  PathSegImpl.internal_() : super.internal_();
+  get runtimeType => PathSeg;
+  toString() => super.toString();
+}
+patch class PathSegArcAbs {
+  static Type get instanceRuntimeType => PathSegArcAbsImpl;
+
+}
+class PathSegArcAbsImpl extends PathSegArcAbs implements js_library.JSObjectInterfacesDom {
+  PathSegArcAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegArcAbs;
+  toString() => super.toString();
+}
+patch class PathSegArcRel {
+  static Type get instanceRuntimeType => PathSegArcRelImpl;
+
+}
+class PathSegArcRelImpl extends PathSegArcRel implements js_library.JSObjectInterfacesDom {
+  PathSegArcRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegArcRel;
+  toString() => super.toString();
+}
+patch class PathSegClosePath {
+  static Type get instanceRuntimeType => PathSegClosePathImpl;
+
+}
+class PathSegClosePathImpl extends PathSegClosePath implements js_library.JSObjectInterfacesDom {
+  PathSegClosePathImpl.internal_() : super.internal_();
+  get runtimeType => PathSegClosePath;
+  toString() => super.toString();
+}
+patch class PathSegCurvetoCubicAbs {
+  static Type get instanceRuntimeType => PathSegCurvetoCubicAbsImpl;
+
+}
+class PathSegCurvetoCubicAbsImpl extends PathSegCurvetoCubicAbs implements js_library.JSObjectInterfacesDom {
+  PathSegCurvetoCubicAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegCurvetoCubicAbs;
+  toString() => super.toString();
+}
+patch class PathSegCurvetoCubicRel {
+  static Type get instanceRuntimeType => PathSegCurvetoCubicRelImpl;
+
+}
+class PathSegCurvetoCubicRelImpl extends PathSegCurvetoCubicRel implements js_library.JSObjectInterfacesDom {
+  PathSegCurvetoCubicRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegCurvetoCubicRel;
+  toString() => super.toString();
+}
+patch class PathSegCurvetoCubicSmoothAbs {
+  static Type get instanceRuntimeType => PathSegCurvetoCubicSmoothAbsImpl;
+
+}
+class PathSegCurvetoCubicSmoothAbsImpl extends PathSegCurvetoCubicSmoothAbs implements js_library.JSObjectInterfacesDom {
+  PathSegCurvetoCubicSmoothAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegCurvetoCubicSmoothAbs;
+  toString() => super.toString();
+}
+patch class PathSegCurvetoCubicSmoothRel {
+  static Type get instanceRuntimeType => PathSegCurvetoCubicSmoothRelImpl;
+
+}
+class PathSegCurvetoCubicSmoothRelImpl extends PathSegCurvetoCubicSmoothRel implements js_library.JSObjectInterfacesDom {
+  PathSegCurvetoCubicSmoothRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegCurvetoCubicSmoothRel;
+  toString() => super.toString();
+}
+patch class PathSegCurvetoQuadraticAbs {
+  static Type get instanceRuntimeType => PathSegCurvetoQuadraticAbsImpl;
+
+}
+class PathSegCurvetoQuadraticAbsImpl extends PathSegCurvetoQuadraticAbs implements js_library.JSObjectInterfacesDom {
+  PathSegCurvetoQuadraticAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegCurvetoQuadraticAbs;
+  toString() => super.toString();
+}
+patch class PathSegCurvetoQuadraticRel {
+  static Type get instanceRuntimeType => PathSegCurvetoQuadraticRelImpl;
+
+}
+class PathSegCurvetoQuadraticRelImpl extends PathSegCurvetoQuadraticRel implements js_library.JSObjectInterfacesDom {
+  PathSegCurvetoQuadraticRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegCurvetoQuadraticRel;
+  toString() => super.toString();
+}
+patch class PathSegCurvetoQuadraticSmoothAbs {
+  static Type get instanceRuntimeType => PathSegCurvetoQuadraticSmoothAbsImpl;
+
+}
+class PathSegCurvetoQuadraticSmoothAbsImpl extends PathSegCurvetoQuadraticSmoothAbs implements js_library.JSObjectInterfacesDom {
+  PathSegCurvetoQuadraticSmoothAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegCurvetoQuadraticSmoothAbs;
+  toString() => super.toString();
+}
+patch class PathSegCurvetoQuadraticSmoothRel {
+  static Type get instanceRuntimeType => PathSegCurvetoQuadraticSmoothRelImpl;
+
+}
+class PathSegCurvetoQuadraticSmoothRelImpl extends PathSegCurvetoQuadraticSmoothRel implements js_library.JSObjectInterfacesDom {
+  PathSegCurvetoQuadraticSmoothRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegCurvetoQuadraticSmoothRel;
+  toString() => super.toString();
+}
+patch class PathSegLinetoAbs {
+  static Type get instanceRuntimeType => PathSegLinetoAbsImpl;
+
+}
+class PathSegLinetoAbsImpl extends PathSegLinetoAbs implements js_library.JSObjectInterfacesDom {
+  PathSegLinetoAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegLinetoAbs;
+  toString() => super.toString();
+}
+patch class PathSegLinetoHorizontalAbs {
+  static Type get instanceRuntimeType => PathSegLinetoHorizontalAbsImpl;
+
+}
+class PathSegLinetoHorizontalAbsImpl extends PathSegLinetoHorizontalAbs implements js_library.JSObjectInterfacesDom {
+  PathSegLinetoHorizontalAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegLinetoHorizontalAbs;
+  toString() => super.toString();
+}
+patch class PathSegLinetoHorizontalRel {
+  static Type get instanceRuntimeType => PathSegLinetoHorizontalRelImpl;
+
+}
+class PathSegLinetoHorizontalRelImpl extends PathSegLinetoHorizontalRel implements js_library.JSObjectInterfacesDom {
+  PathSegLinetoHorizontalRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegLinetoHorizontalRel;
+  toString() => super.toString();
+}
+patch class PathSegLinetoRel {
+  static Type get instanceRuntimeType => PathSegLinetoRelImpl;
+
+}
+class PathSegLinetoRelImpl extends PathSegLinetoRel implements js_library.JSObjectInterfacesDom {
+  PathSegLinetoRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegLinetoRel;
+  toString() => super.toString();
+}
+patch class PathSegLinetoVerticalAbs {
+  static Type get instanceRuntimeType => PathSegLinetoVerticalAbsImpl;
+
+}
+class PathSegLinetoVerticalAbsImpl extends PathSegLinetoVerticalAbs implements js_library.JSObjectInterfacesDom {
+  PathSegLinetoVerticalAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegLinetoVerticalAbs;
+  toString() => super.toString();
+}
+patch class PathSegLinetoVerticalRel {
+  static Type get instanceRuntimeType => PathSegLinetoVerticalRelImpl;
+
+}
+class PathSegLinetoVerticalRelImpl extends PathSegLinetoVerticalRel implements js_library.JSObjectInterfacesDom {
+  PathSegLinetoVerticalRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegLinetoVerticalRel;
+  toString() => super.toString();
+}
+patch class PathSegList {
+  static Type get instanceRuntimeType => PathSegListImpl;
+
+}
+class PathSegListImpl extends PathSegList implements js_library.JSObjectInterfacesDom {
+  PathSegListImpl.internal_() : super.internal_();
+  get runtimeType => PathSegList;
+  toString() => super.toString();
+}
+patch class PathSegMovetoAbs {
+  static Type get instanceRuntimeType => PathSegMovetoAbsImpl;
+
+}
+class PathSegMovetoAbsImpl extends PathSegMovetoAbs implements js_library.JSObjectInterfacesDom {
+  PathSegMovetoAbsImpl.internal_() : super.internal_();
+  get runtimeType => PathSegMovetoAbs;
+  toString() => super.toString();
+}
+patch class PathSegMovetoRel {
+  static Type get instanceRuntimeType => PathSegMovetoRelImpl;
+
+}
+class PathSegMovetoRelImpl extends PathSegMovetoRel implements js_library.JSObjectInterfacesDom {
+  PathSegMovetoRelImpl.internal_() : super.internal_();
+  get runtimeType => PathSegMovetoRel;
+  toString() => super.toString();
+}
+patch class PatternElement {
+  static Type get instanceRuntimeType => PatternElementImpl;
+
+}
+class PatternElementImpl extends PatternElement implements js_library.JSObjectInterfacesDom {
+  PatternElementImpl.internal_() : super.internal_();
+  get runtimeType => PatternElement;
+  toString() => super.toString();
+}
+patch class Point {
+  static Type get instanceRuntimeType => PointImpl;
+
+}
+class PointImpl extends Point implements js_library.JSObjectInterfacesDom {
+  PointImpl.internal_() : super.internal_();
+  get runtimeType => Point;
+  toString() => super.toString();
+}
+patch class PointList {
+  static Type get instanceRuntimeType => PointListImpl;
+
+}
+class PointListImpl extends PointList implements js_library.JSObjectInterfacesDom {
+  PointListImpl.internal_() : super.internal_();
+  get runtimeType => PointList;
+  toString() => super.toString();
+}
+patch class PolygonElement {
+  static Type get instanceRuntimeType => PolygonElementImpl;
+
+}
+class PolygonElementImpl extends PolygonElement implements js_library.JSObjectInterfacesDom {
+  PolygonElementImpl.internal_() : super.internal_();
+  get runtimeType => PolygonElement;
+  toString() => super.toString();
+}
+patch class PolylineElement {
+  static Type get instanceRuntimeType => PolylineElementImpl;
+
+}
+class PolylineElementImpl extends PolylineElement implements js_library.JSObjectInterfacesDom {
+  PolylineElementImpl.internal_() : super.internal_();
+  get runtimeType => PolylineElement;
+  toString() => super.toString();
+}
+patch class PreserveAspectRatio {
+  static Type get instanceRuntimeType => PreserveAspectRatioImpl;
+
+}
+class PreserveAspectRatioImpl extends PreserveAspectRatio implements js_library.JSObjectInterfacesDom {
+  PreserveAspectRatioImpl.internal_() : super.internal_();
+  get runtimeType => PreserveAspectRatio;
+  toString() => super.toString();
+}
+patch class RadialGradientElement {
+  static Type get instanceRuntimeType => RadialGradientElementImpl;
+
+}
+class RadialGradientElementImpl extends RadialGradientElement implements js_library.JSObjectInterfacesDom {
+  RadialGradientElementImpl.internal_() : super.internal_();
+  get runtimeType => RadialGradientElement;
+  toString() => super.toString();
+}
+patch class Rect {
+  static Type get instanceRuntimeType => RectImpl;
+
+}
+class RectImpl extends Rect implements js_library.JSObjectInterfacesDom {
+  RectImpl.internal_() : super.internal_();
+  get runtimeType => Rect;
+  toString() => super.toString();
+}
+patch class RectElement {
+  static Type get instanceRuntimeType => RectElementImpl;
+
+}
+class RectElementImpl extends RectElement implements js_library.JSObjectInterfacesDom {
+  RectElementImpl.internal_() : super.internal_();
+  get runtimeType => RectElement;
+  toString() => super.toString();
+}
+patch class ScriptElement {
+  static Type get instanceRuntimeType => ScriptElementImpl;
+
+}
+class ScriptElementImpl extends ScriptElement implements js_library.JSObjectInterfacesDom {
+  ScriptElementImpl.internal_() : super.internal_();
+  get runtimeType => ScriptElement;
+  toString() => super.toString();
+}
+patch class SetElement {
+  static Type get instanceRuntimeType => SetElementImpl;
+
+}
+class SetElementImpl extends SetElement implements js_library.JSObjectInterfacesDom {
+  SetElementImpl.internal_() : super.internal_();
+  get runtimeType => SetElement;
+  toString() => super.toString();
+}
+patch class StopElement {
+  static Type get instanceRuntimeType => StopElementImpl;
+
+}
+class StopElementImpl extends StopElement implements js_library.JSObjectInterfacesDom {
+  StopElementImpl.internal_() : super.internal_();
+  get runtimeType => StopElement;
+  toString() => super.toString();
+}
+patch class StringList {
+  static Type get instanceRuntimeType => StringListImpl;
+
+}
+class StringListImpl extends StringList implements js_library.JSObjectInterfacesDom {
+  StringListImpl.internal_() : super.internal_();
+  get runtimeType => StringList;
+  toString() => super.toString();
+}
+patch class StyleElement {
+  static Type get instanceRuntimeType => StyleElementImpl;
+
+}
+class StyleElementImpl extends StyleElement implements js_library.JSObjectInterfacesDom {
+  StyleElementImpl.internal_() : super.internal_();
+  get runtimeType => StyleElement;
+  toString() => super.toString();
+}
+patch class SvgElement {
+  static Type get instanceRuntimeType => SvgElementImpl;
+
+}
+class SvgElementImpl extends SvgElement implements js_library.JSObjectInterfacesDom {
+  SvgElementImpl.internal_() : super.internal_();
+  get runtimeType => SvgElement;
+  toString() => super.toString();
+}
+patch class SvgSvgElement {
+  static Type get instanceRuntimeType => SvgSvgElementImpl;
+
+}
+class SvgSvgElementImpl extends SvgSvgElement implements js_library.JSObjectInterfacesDom {
+  SvgSvgElementImpl.internal_() : super.internal_();
+  get runtimeType => SvgSvgElement;
+  toString() => super.toString();
+}
+patch class SwitchElement {
+  static Type get instanceRuntimeType => SwitchElementImpl;
+
+}
+class SwitchElementImpl extends SwitchElement implements js_library.JSObjectInterfacesDom {
+  SwitchElementImpl.internal_() : super.internal_();
+  get runtimeType => SwitchElement;
+  toString() => super.toString();
+}
+patch class SymbolElement {
+  static Type get instanceRuntimeType => SymbolElementImpl;
+
+}
+class SymbolElementImpl extends SymbolElement implements js_library.JSObjectInterfacesDom {
+  SymbolElementImpl.internal_() : super.internal_();
+  get runtimeType => SymbolElement;
+  toString() => super.toString();
+}
+patch class TSpanElement {
+  static Type get instanceRuntimeType => TSpanElementImpl;
+
+}
+class TSpanElementImpl extends TSpanElement implements js_library.JSObjectInterfacesDom {
+  TSpanElementImpl.internal_() : super.internal_();
+  get runtimeType => TSpanElement;
+  toString() => super.toString();
+}
+patch class Tests {
+  static Type get instanceRuntimeType => TestsImpl;
+
+}
+class TestsImpl extends Tests implements js_library.JSObjectInterfacesDom {
+  TestsImpl.internal_() : super.internal_();
+  get runtimeType => Tests;
+  toString() => super.toString();
+}
+patch class TextContentElement {
+  static Type get instanceRuntimeType => TextContentElementImpl;
+
+}
+class TextContentElementImpl extends TextContentElement implements js_library.JSObjectInterfacesDom {
+  TextContentElementImpl.internal_() : super.internal_();
+  get runtimeType => TextContentElement;
+  toString() => super.toString();
+}
+patch class TextElement {
+  static Type get instanceRuntimeType => TextElementImpl;
+
+}
+class TextElementImpl extends TextElement implements js_library.JSObjectInterfacesDom {
+  TextElementImpl.internal_() : super.internal_();
+  get runtimeType => TextElement;
+  toString() => super.toString();
+}
+patch class TextPathElement {
+  static Type get instanceRuntimeType => TextPathElementImpl;
+
+}
+class TextPathElementImpl extends TextPathElement implements js_library.JSObjectInterfacesDom {
+  TextPathElementImpl.internal_() : super.internal_();
+  get runtimeType => TextPathElement;
+  toString() => super.toString();
+}
+patch class TextPositioningElement {
+  static Type get instanceRuntimeType => TextPositioningElementImpl;
+
+}
+class TextPositioningElementImpl extends TextPositioningElement implements js_library.JSObjectInterfacesDom {
+  TextPositioningElementImpl.internal_() : super.internal_();
+  get runtimeType => TextPositioningElement;
+  toString() => super.toString();
+}
+patch class TitleElement {
+  static Type get instanceRuntimeType => TitleElementImpl;
+
+}
+class TitleElementImpl extends TitleElement implements js_library.JSObjectInterfacesDom {
+  TitleElementImpl.internal_() : super.internal_();
+  get runtimeType => TitleElement;
+  toString() => super.toString();
+}
+patch class Transform {
+  static Type get instanceRuntimeType => TransformImpl;
+
+}
+class TransformImpl extends Transform implements js_library.JSObjectInterfacesDom {
+  TransformImpl.internal_() : super.internal_();
+  get runtimeType => Transform;
+  toString() => super.toString();
+}
+patch class TransformList {
+  static Type get instanceRuntimeType => TransformListImpl;
+
+}
+class TransformListImpl extends TransformList implements js_library.JSObjectInterfacesDom {
+  TransformListImpl.internal_() : super.internal_();
+  get runtimeType => TransformList;
+  toString() => super.toString();
+}
+patch class UnitTypes {
+  static Type get instanceRuntimeType => UnitTypesImpl;
+
+}
+class UnitTypesImpl extends UnitTypes implements js_library.JSObjectInterfacesDom {
+  UnitTypesImpl.internal_() : super.internal_();
+  get runtimeType => UnitTypes;
+  toString() => super.toString();
+}
+patch class UriReference {
+  static Type get instanceRuntimeType => UriReferenceImpl;
+
+}
+class UriReferenceImpl extends UriReference implements js_library.JSObjectInterfacesDom {
+  UriReferenceImpl.internal_() : super.internal_();
+  get runtimeType => UriReference;
+  toString() => super.toString();
+}
+patch class UseElement {
+  static Type get instanceRuntimeType => UseElementImpl;
+
+}
+class UseElementImpl extends UseElement implements js_library.JSObjectInterfacesDom {
+  UseElementImpl.internal_() : super.internal_();
+  get runtimeType => UseElement;
+  toString() => super.toString();
+}
+patch class ViewElement {
+  static Type get instanceRuntimeType => ViewElementImpl;
+
+}
+class ViewElementImpl extends ViewElement implements js_library.JSObjectInterfacesDom {
+  ViewElementImpl.internal_() : super.internal_();
+  get runtimeType => ViewElement;
+  toString() => super.toString();
+}
+patch class ViewSpec {
+  static Type get instanceRuntimeType => ViewSpecImpl;
+
+}
+class ViewSpecImpl extends ViewSpec implements js_library.JSObjectInterfacesDom {
+  ViewSpecImpl.internal_() : super.internal_();
+  get runtimeType => ViewSpec;
+  toString() => super.toString();
+}
+patch class ZoomAndPan {
+  static Type get instanceRuntimeType => ZoomAndPanImpl;
+
+}
+class ZoomAndPanImpl extends ZoomAndPan implements js_library.JSObjectInterfacesDom {
+  ZoomAndPanImpl.internal_() : super.internal_();
+  get runtimeType => ZoomAndPan;
+  toString() => super.toString();
+}
+patch class ZoomEvent {
+  static Type get instanceRuntimeType => ZoomEventImpl;
+
+}
+class ZoomEventImpl extends ZoomEvent implements js_library.JSObjectInterfacesDom {
+  ZoomEventImpl.internal_() : super.internal_();
+  get runtimeType => ZoomEvent;
+  toString() => super.toString();
+}
+patch class _GradientElement {
+  static Type get instanceRuntimeType => _GradientElementImpl;
+
+}
+class _GradientElementImpl extends _GradientElement implements js_library.JSObjectInterfacesDom {
+  _GradientElementImpl.internal_() : super.internal_();
+  get runtimeType => _GradientElement;
+  toString() => super.toString();
+}
+patch class _SVGComponentTransferFunctionElement {
+  static Type get instanceRuntimeType => _SVGComponentTransferFunctionElementImpl;
+
+}
+class _SVGComponentTransferFunctionElementImpl extends _SVGComponentTransferFunctionElement implements js_library.JSObjectInterfacesDom {
+  _SVGComponentTransferFunctionElementImpl.internal_() : super.internal_();
+  get runtimeType => _SVGComponentTransferFunctionElement;
+  toString() => super.toString();
+}
+patch class _SVGCursorElement {
+  static Type get instanceRuntimeType => _SVGCursorElementImpl;
+
+}
+class _SVGCursorElementImpl extends _SVGCursorElement implements js_library.JSObjectInterfacesDom {
+  _SVGCursorElementImpl.internal_() : super.internal_();
+  get runtimeType => _SVGCursorElement;
+  toString() => super.toString();
+}
+patch class _SVGFEDropShadowElement {
+  static Type get instanceRuntimeType => _SVGFEDropShadowElementImpl;
+
+}
+class _SVGFEDropShadowElementImpl extends _SVGFEDropShadowElement implements js_library.JSObjectInterfacesDom {
+  _SVGFEDropShadowElementImpl.internal_() : super.internal_();
+  get runtimeType => _SVGFEDropShadowElement;
+  toString() => super.toString();
+}
+patch class _SVGMPathElement {
+  static Type get instanceRuntimeType => _SVGMPathElementImpl;
+
+}
+class _SVGMPathElementImpl extends _SVGMPathElement implements js_library.JSObjectInterfacesDom {
+  _SVGMPathElementImpl.internal_() : super.internal_();
+  get runtimeType => _SVGMPathElement;
+  toString() => super.toString();
+}
+
+"""],
+"dart:web_audio": ["dart:web_audio", "dart:web_audio_js_interop_patch.dart", """import 'dart:js' as js_library;
+
+/**
+ * Placeholder object for cases where we need to determine exactly how many
+ * args were passed to a function.
+ */
+const _UNDEFINED_JS_CONST = const Object();
+
+patch class AnalyserNode {
+  static Type get instanceRuntimeType => AnalyserNodeImpl;
+
+}
+class AnalyserNodeImpl extends AnalyserNode implements js_library.JSObjectInterfacesDom {
+  AnalyserNodeImpl.internal_() : super.internal_();
+  get runtimeType => AnalyserNode;
+  toString() => super.toString();
+}
+patch class AudioBuffer {
+  static Type get instanceRuntimeType => AudioBufferImpl;
+
+}
+class AudioBufferImpl extends AudioBuffer implements js_library.JSObjectInterfacesDom {
+  AudioBufferImpl.internal_() : super.internal_();
+  get runtimeType => AudioBuffer;
+  toString() => super.toString();
+}
+patch class AudioBufferSourceNode {
+  static Type get instanceRuntimeType => AudioBufferSourceNodeImpl;
+
+}
+class AudioBufferSourceNodeImpl extends AudioBufferSourceNode implements js_library.JSObjectInterfacesDom {
+  AudioBufferSourceNodeImpl.internal_() : super.internal_();
+  get runtimeType => AudioBufferSourceNode;
+  toString() => super.toString();
+}
+patch class AudioContext {
+  static Type get instanceRuntimeType => AudioContextImpl;
+
+}
+class AudioContextImpl extends AudioContext implements js_library.JSObjectInterfacesDom {
+  AudioContextImpl.internal_() : super.internal_();
+  get runtimeType => AudioContext;
+  toString() => super.toString();
+}
+patch class AudioDestinationNode {
+  static Type get instanceRuntimeType => AudioDestinationNodeImpl;
+
+}
+class AudioDestinationNodeImpl extends AudioDestinationNode implements js_library.JSObjectInterfacesDom {
+  AudioDestinationNodeImpl.internal_() : super.internal_();
+  get runtimeType => AudioDestinationNode;
+  toString() => super.toString();
+}
+patch class AudioListener {
+  static Type get instanceRuntimeType => AudioListenerImpl;
+
+}
+class AudioListenerImpl extends AudioListener implements js_library.JSObjectInterfacesDom {
+  AudioListenerImpl.internal_() : super.internal_();
+  get runtimeType => AudioListener;
+  toString() => super.toString();
+}
+patch class AudioNode {
+  static Type get instanceRuntimeType => AudioNodeImpl;
+
+}
+class AudioNodeImpl extends AudioNode implements js_library.JSObjectInterfacesDom {
+  AudioNodeImpl.internal_() : super.internal_();
+  get runtimeType => AudioNode;
+  toString() => super.toString();
+}
+patch class AudioParam {
+  static Type get instanceRuntimeType => AudioParamImpl;
+
+}
+class AudioParamImpl extends AudioParam implements js_library.JSObjectInterfacesDom {
+  AudioParamImpl.internal_() : super.internal_();
+  get runtimeType => AudioParam;
+  toString() => super.toString();
+}
+patch class AudioProcessingEvent {
+  static Type get instanceRuntimeType => AudioProcessingEventImpl;
+
+}
+class AudioProcessingEventImpl extends AudioProcessingEvent implements js_library.JSObjectInterfacesDom {
+  AudioProcessingEventImpl.internal_() : super.internal_();
+  get runtimeType => AudioProcessingEvent;
+  toString() => super.toString();
+}
+patch class AudioSourceNode {
+  static Type get instanceRuntimeType => AudioSourceNodeImpl;
+
+}
+class AudioSourceNodeImpl extends AudioSourceNode implements js_library.JSObjectInterfacesDom {
+  AudioSourceNodeImpl.internal_() : super.internal_();
+  get runtimeType => AudioSourceNode;
+  toString() => super.toString();
+}
+patch class BiquadFilterNode {
+  static Type get instanceRuntimeType => BiquadFilterNodeImpl;
+
+}
+class BiquadFilterNodeImpl extends BiquadFilterNode implements js_library.JSObjectInterfacesDom {
+  BiquadFilterNodeImpl.internal_() : super.internal_();
+  get runtimeType => BiquadFilterNode;
+  toString() => super.toString();
+}
+patch class ChannelMergerNode {
+  static Type get instanceRuntimeType => ChannelMergerNodeImpl;
+
+}
+class ChannelMergerNodeImpl extends ChannelMergerNode implements js_library.JSObjectInterfacesDom {
+  ChannelMergerNodeImpl.internal_() : super.internal_();
+  get runtimeType => ChannelMergerNode;
+  toString() => super.toString();
+}
+patch class ChannelSplitterNode {
+  static Type get instanceRuntimeType => ChannelSplitterNodeImpl;
+
+}
+class ChannelSplitterNodeImpl extends ChannelSplitterNode implements js_library.JSObjectInterfacesDom {
+  ChannelSplitterNodeImpl.internal_() : super.internal_();
+  get runtimeType => ChannelSplitterNode;
+  toString() => super.toString();
+}
+patch class ConvolverNode {
+  static Type get instanceRuntimeType => ConvolverNodeImpl;
+
+}
+class ConvolverNodeImpl extends ConvolverNode implements js_library.JSObjectInterfacesDom {
+  ConvolverNodeImpl.internal_() : super.internal_();
+  get runtimeType => ConvolverNode;
+  toString() => super.toString();
+}
+patch class DelayNode {
+  static Type get instanceRuntimeType => DelayNodeImpl;
+
+}
+class DelayNodeImpl extends DelayNode implements js_library.JSObjectInterfacesDom {
+  DelayNodeImpl.internal_() : super.internal_();
+  get runtimeType => DelayNode;
+  toString() => super.toString();
+}
+patch class DynamicsCompressorNode {
+  static Type get instanceRuntimeType => DynamicsCompressorNodeImpl;
+
+}
+class DynamicsCompressorNodeImpl extends DynamicsCompressorNode implements js_library.JSObjectInterfacesDom {
+  DynamicsCompressorNodeImpl.internal_() : super.internal_();
+  get runtimeType => DynamicsCompressorNode;
+  toString() => super.toString();
+}
+patch class GainNode {
+  static Type get instanceRuntimeType => GainNodeImpl;
+
+}
+class GainNodeImpl extends GainNode implements js_library.JSObjectInterfacesDom {
+  GainNodeImpl.internal_() : super.internal_();
+  get runtimeType => GainNode;
+  toString() => super.toString();
+}
+patch class MediaElementAudioSourceNode {
+  static Type get instanceRuntimeType => MediaElementAudioSourceNodeImpl;
+
+}
+class MediaElementAudioSourceNodeImpl extends MediaElementAudioSourceNode implements js_library.JSObjectInterfacesDom {
+  MediaElementAudioSourceNodeImpl.internal_() : super.internal_();
+  get runtimeType => MediaElementAudioSourceNode;
+  toString() => super.toString();
+}
+patch class MediaStreamAudioDestinationNode {
+  static Type get instanceRuntimeType => MediaStreamAudioDestinationNodeImpl;
+
+}
+class MediaStreamAudioDestinationNodeImpl extends MediaStreamAudioDestinationNode implements js_library.JSObjectInterfacesDom {
+  MediaStreamAudioDestinationNodeImpl.internal_() : super.internal_();
+  get runtimeType => MediaStreamAudioDestinationNode;
+  toString() => super.toString();
+}
+patch class MediaStreamAudioSourceNode {
+  static Type get instanceRuntimeType => MediaStreamAudioSourceNodeImpl;
+
+}
+class MediaStreamAudioSourceNodeImpl extends MediaStreamAudioSourceNode implements js_library.JSObjectInterfacesDom {
+  MediaStreamAudioSourceNodeImpl.internal_() : super.internal_();
+  get runtimeType => MediaStreamAudioSourceNode;
+  toString() => super.toString();
+}
+patch class OfflineAudioCompletionEvent {
+  static Type get instanceRuntimeType => OfflineAudioCompletionEventImpl;
+
+}
+class OfflineAudioCompletionEventImpl extends OfflineAudioCompletionEvent implements js_library.JSObjectInterfacesDom {
+  OfflineAudioCompletionEventImpl.internal_() : super.internal_();
+  get runtimeType => OfflineAudioCompletionEvent;
+  toString() => super.toString();
+}
+patch class OfflineAudioContext {
+  static Type get instanceRuntimeType => OfflineAudioContextImpl;
+
+}
+class OfflineAudioContextImpl extends OfflineAudioContext implements js_library.JSObjectInterfacesDom {
+  OfflineAudioContextImpl.internal_() : super.internal_();
+  get runtimeType => OfflineAudioContext;
+  toString() => super.toString();
+}
+patch class OscillatorNode {
+  static Type get instanceRuntimeType => OscillatorNodeImpl;
+
+}
+class OscillatorNodeImpl extends OscillatorNode implements js_library.JSObjectInterfacesDom {
+  OscillatorNodeImpl.internal_() : super.internal_();
+  get runtimeType => OscillatorNode;
+  toString() => super.toString();
+}
+patch class PannerNode {
+  static Type get instanceRuntimeType => PannerNodeImpl;
+
+}
+class PannerNodeImpl extends PannerNode implements js_library.JSObjectInterfacesDom {
+  PannerNodeImpl.internal_() : super.internal_();
+  get runtimeType => PannerNode;
+  toString() => super.toString();
+}
+patch class PeriodicWave {
+  static Type get instanceRuntimeType => PeriodicWaveImpl;
+
+}
+class PeriodicWaveImpl extends PeriodicWave implements js_library.JSObjectInterfacesDom {
+  PeriodicWaveImpl.internal_() : super.internal_();
+  get runtimeType => PeriodicWave;
+  toString() => super.toString();
+}
+patch class ScriptProcessorNode {
+  static Type get instanceRuntimeType => ScriptProcessorNodeImpl;
+
+}
+class ScriptProcessorNodeImpl extends ScriptProcessorNode implements js_library.JSObjectInterfacesDom {
+  ScriptProcessorNodeImpl.internal_() : super.internal_();
+  get runtimeType => ScriptProcessorNode;
+  toString() => super.toString();
+}
+patch class StereoPannerNode {
+  static Type get instanceRuntimeType => StereoPannerNodeImpl;
+
+}
+class StereoPannerNodeImpl extends StereoPannerNode implements js_library.JSObjectInterfacesDom {
+  StereoPannerNodeImpl.internal_() : super.internal_();
+  get runtimeType => StereoPannerNode;
+  toString() => super.toString();
+}
+patch class WaveShaperNode {
+  static Type get instanceRuntimeType => WaveShaperNodeImpl;
+
+}
+class WaveShaperNodeImpl extends WaveShaperNode implements js_library.JSObjectInterfacesDom {
+  WaveShaperNodeImpl.internal_() : super.internal_();
+  get runtimeType => WaveShaperNode;
+  toString() => super.toString();
+}
+
+"""],
+
+};
+// END_OF_CACHED_PATCHES
diff --git a/sdk/lib/js/dartium/js_dartium.dart b/sdk/lib/js/dartium/js_dartium.dart
index d2b1f39..97e927e 100644
--- a/sdk/lib/js/dartium/js_dartium.dart
+++ b/sdk/lib/js/dartium/js_dartium.dart
@@ -92,9 +92,13 @@
 import 'dart:math' as math;
 import 'dart:mirrors' as mirrors;
 import 'dart:html' as html;
+import 'dart:_blink' as _blink;
 import 'dart:html_common' as html_common;
 import 'dart:indexed_db' as indexed_db;
 import 'dart:typed_data';
+import 'dart:core';
+
+import 'cached_patches.dart';
 
 // Pretend we are always in checked mode as we aren't interested in users
 // running Dartium code outside of checked mode.
@@ -117,7 +121,7 @@
       varArgs[mirrors.MirrorSystem.getName(symbol)] = val;
     });
     return invocation.positionalArguments.toList()
-      ..add(maybeWrapTypedInterop(new JsObject.jsify(varArgs)));
+      ..add(JsNative.jsify(varArgs));
   }
 }
 
@@ -279,12 +283,9 @@
 _finalizeJsInterfaces() native "Js_finalizeJsInterfaces";
 
 String _getJsName(mirrors.DeclarationMirror mirror) {
-  for (var annotation in mirror.metadata) {
-    if (mirrors.MirrorSystem.getName(annotation.type.simpleName) == "JS") {
-      mirrors.LibraryMirror library = annotation.type.owner;
-      var uri = library.uri;
-      // make sure the annotation is from package://js
-      if (uri.scheme == 'package' && uri.path == 'js/js.dart') {
+  if (_atJsType != null) {
+    for (var annotation in mirror.metadata) {
+      if (annotation.type.reflectedType == _atJsType) {
         try {
           var name = annotation.reflectee.name;
           return name != null ? name : "";
@@ -312,6 +313,8 @@
 
 bool _hasJsName(mirrors.DeclarationMirror mirror) => _getJsName(mirror) != null;
 
+var _domNameType;
+
 bool hasDomName(mirrors.DeclarationMirror mirror) {
   var location = mirror.location;
   if (location == null || location.sourceUri.scheme != 'dart') return false;
@@ -357,12 +360,21 @@
   return sb.toString();
 }
 
+// TODO(jacobr): remove these helpers and add JsNative.setPropertyDotted,
+// getPropertyDotted, and callMethodDotted helpers that would be simpler
+// and more efficient.
 String _accessJsPathSetter(String path) {
   var parts = path.split(".");
   return "${_JS_LIBRARY_PREFIX}.JsNative.setProperty(${_accessJsPathHelper(parts.getRange(0, parts.length - 1))
       }, '${parts.last}', v)";
 }
 
+String _accessJsPathCallMethodHelper(String path) {
+  var parts = path.split(".");
+  return "${_JS_LIBRARY_PREFIX}.JsNative.callMethod(${_accessJsPathHelper(parts.getRange(0, parts.length - 1))
+      }, '${parts.last}',";
+}
+
 @Deprecated("Internal Use Only")
 void addMemberHelper(
     mirrors.MethodMirror declaration, String path, StringBuffer sb,
@@ -382,11 +394,11 @@
   sb.write(" ");
   if (declaration.isGetter) {
     sb.write(
-        "get $name => ${_JS_LIBRARY_PREFIX}.maybeWrapTypedInterop(${_accessJsPath(path)});");
+        "get $name => ${_accessJsPath(path)};");
   } else if (declaration.isSetter) {
     sb.write("set $name(v) {\n"
         "  ${_JS_LIBRARY_PREFIX}.safeForTypedInterop(v);\n"
-        "  return ${_JS_LIBRARY_PREFIX}.maybeWrapTypedInterop(${_accessJsPathSetter(path)});\n"
+        "  return ${_accessJsPathSetter(path)};\n"
         "}\n");
   } else {
     sb.write("$name(");
@@ -419,19 +431,19 @@
     for (var arg in args) {
       sb.write("  ${_JS_LIBRARY_PREFIX}.safeForTypedInterop($arg);\n");
     }
-    sb.write("  return ${_JS_LIBRARY_PREFIX}.maybeWrapTypedInterop(");
+    sb.write("  return ");
     if (declaration.isConstructor) {
-      sb.write("new ${_JS_LIBRARY_PREFIX}.JsObject(");
+      sb.write("${_JS_LIBRARY_PREFIX}.JsNative.callConstructor(");
+      sb..write(_accessJsPath(path))..write(",");
+    } else {
+      sb.write(_accessJsPathCallMethodHelper(path));
     }
-    sb
-      ..write(_accessJsPath(path))
-      ..write(declaration.isConstructor ? "," : ".apply(")
-      ..write("[${args.join(",")}]");
+    sb.write("[${args.join(",")}]");
 
     if (hasOptional) {
       sb.write(".takeWhile((i) => i != ${_UNDEFINED_VAR}).toList()");
     }
-    sb.write("));");
+    sb.write(");");
     sb.write("}\n");
   }
   sb.write("\n");
@@ -445,12 +457,52 @@
   return false;
 }
 
-List<String> _generateExternalMethods() {
+List<String> _generateExternalMethods(List<String> libraryPaths, bool useCachedPatches) {
   var staticCodegen = <String>[];
-  mirrors.currentMirrorSystem().libraries.forEach((uri, library) {
+
+  if (libraryPaths.length == 0) {
+    mirrors.currentMirrorSystem().libraries.forEach((uri, library) {
+      var library_name = "${uri.scheme}:${uri.path}";
+      if (useCachedPatches && cached_patches.containsKey(library_name)) {
+        // Use the pre-generated patch files for DOM dart:nnnn libraries.
+        var patch = cached_patches[library_name];
+        staticCodegen.addAll(patch);
+      } else if (_hasJsName(library)) {
+        // Library marked with @JS
+        _generateLibraryCodegen(uri, library, staticCodegen);
+      } else if (!useCachedPatches) {
+        // Can't use the cached patches file, instead this is a signal to generate
+        // the patches for this file.
+        _generateLibraryCodegen(uri, library, staticCodegen);
+      }
+    });    // End of library foreach
+  } else {
+    // Used to generate cached_patches.dart file for all IDL generated dart:
+    // files to the WebKit DOM.
+    for (var library_name in libraryPaths) {
+      var parts = library_name.split(':');
+      var uri = new Uri(scheme: parts[0], path: parts[1]);
+      var library = mirrors.currentMirrorSystem().libraries[uri];
+      _generateLibraryCodegen(uri, library, staticCodegen);
+    }
+  }
+
+  return staticCodegen;
+}
+
+_generateLibraryCodegen(uri, library, staticCodegen) {
+    // Is it a dart generated library?
+    var dartLibrary = uri.scheme == 'dart';  
+
     var sb = new StringBuffer();
     String jsLibraryName = _getJsName(library);
-    library.declarations.forEach((name, declaration) {
+
+    // Sort by patch file by its declaration name.
+    var sortedDeclKeys = library.declarations.keys.toList();
+    sortedDeclKeys.sort((a, b) => mirrors.MirrorSystem.getName(a).compareTo(mirrors.MirrorSystem.getName(b)));
+
+    sortedDeclKeys.forEach((name) {
+      var declaration = library.declarations[name];
       if (declaration is mirrors.MethodMirror) {
         if ((_hasJsName(declaration) || jsLibraryName != null) &&
             _isExternal(declaration)) {
@@ -458,7 +510,7 @@
         }
       } else if (declaration is mirrors.ClassMirror) {
         mirrors.ClassMirror clazz = declaration;
-        var isDom = hasDomName(clazz);
+        var isDom = dartLibrary ? hasDomName(clazz) : false;
         var isJsInterop = _hasJsName(clazz);
         if (isDom || isJsInterop) {
           // TODO(jacobr): verify class implements JavaScriptObject.
@@ -490,7 +542,7 @@
                     ..write('}');
                 }
                 sbPatch.write(") {\n"
-                    "    var ret = new ${_JS_LIBRARY_PREFIX}.JsObject.jsify({});\n");
+                    "    var ret = ${_JS_LIBRARY_PREFIX}.JsNative.newObject();\n");
                 i = 0;
                 for (var p in declaration.parameters) {
                   assert(p.isNamed); // TODO(jacobr): throw.
@@ -499,14 +551,14 @@
                       mirrors.MirrorSystem.getName(p.simpleName));
                   sbPatch.write("    if($name != ${_UNDEFINED_VAR}) {\n"
                       "      ${_JS_LIBRARY_PREFIX}.safeForTypedInterop($name);\n"
-                      "      ret['$jsName'] = $name;\n"
+                      "      ${_JS_LIBRARY_PREFIX}.JsNative.setProperty(ret, '$jsName', $name);\n"
                       "    }\n");
                   i++;
                 }
 
                 sbPatch.write(
-                    "    return new ${_JS_LIBRARY_PREFIX}.JSObject.create(ret);\n"
-                    "  }\n");
+                  "  return ret;"
+                  "}\n");
               } else if (declaration.isConstructor ||
                   declaration.isFactoryConstructor) {
                 sbPatch.write("  ");
@@ -519,7 +571,7 @@
                     isStatic: true,
                     memberName: className);
               }
-            });
+            });   // End of clazz.declarations.forEach 
 
             clazz.staticMembers.forEach((memberName, member) {
               if (_isExternal(member)) {
@@ -535,8 +587,7 @@
             });
           }
           if (isDom) {
-            sbPatch.write("  factory ${className}._internalWrap() => "
-                "new ${classNameImpl}.internal_();\n");
+            sbPatch.write("  static Type get instanceRuntimeType => ${classNameImpl};\n");
           }
           if (sbPatch.isNotEmpty) {
             var typeVariablesClause = '';
@@ -578,18 +629,35 @@
 ${sb}
 """);
     }
-  });
-
-  return staticCodegen;
 }
 
+// Remember the @JS type to compare annotation type.
+var _atJsType = -1;
+
 /**
  * Generates part files defining source code for JSObjectImpl, all DOM classes
  * classes. This codegen  is needed so that type checks for all registered
  * JavaScript interop classes pass.
+ * If genCachedPatches is true then the patch files don't exist this is a special
+ * signal to generate and emit the patches to stdout to be captured and put into
+ * the file sdk/lib/js/dartium/cached_patches.dart
  */
-List<String> _generateInteropPatchFiles() {
-  var ret = _generateExternalMethods();
+List<String> _generateInteropPatchFiles(List<String> libraryPaths, genCachedPatches) {
+  // Cache the @JS Type.
+  if (_atJsType == -1) {
+    var uri = new Uri(scheme: "package", path: "js/js.dart");
+    var jsLibrary = mirrors.currentMirrorSystem().libraries[uri];
+    if (jsLibrary != null) {
+      // @ JS used somewhere.
+      var jsDeclaration = jsLibrary.declarations[new Symbol("JS")];
+      _atJsType = jsDeclaration.reflectedType;
+    } else {
+      // @ JS not used in any library.
+      _atJsType = null;
+    }
+  }
+
+  var ret = _generateExternalMethods(libraryPaths, genCachedPatches ? false : true);
   var libraryPrefixes = new Map<mirrors.LibraryMirror, String>();
   var prefixNames = new Set<String>();
   var sb = new StringBuffer();
@@ -671,27 +739,15 @@
 }
 
 patch class JSObject {
-  factory JSObject.create(JsObject jsObject) {
-    var ret = new JSObjectImpl.internal()..blink_jsObject = jsObject;
-    jsObject._dartHtmlWrapper = ret;
-    return ret;
-  }
+  static Type get instanceRuntimeType => JSObjectImpl;
 }
 
 patch class JSFunction {
-  factory JSFunction.create(JsObject jsObject) {
-    var ret = new JSFunctionImpl.internal()..blink_jsObject = jsObject;
-    jsObject._dartHtmlWrapper = ret;
-    return ret;
-  }
+  static Type get instanceRuntimeType => JSFunctionImpl;
 }
 
 patch class JSArray {
-  factory JSArray.create(JsObject jsObject) {
-    var ret = new JSArrayImpl.internal()..blink_jsObject = jsObject;
-    jsObject._dartHtmlWrapper = ret;
-    return ret;
-  }
+  static Type get instanceRuntimeType => JSArrayImpl;
 }
 
 _registerAllJsInterfaces() {
@@ -873,49 +929,44 @@
   return _cachedContext;
 }
 
-@Deprecated("Internal Use Only")
-maybeWrapTypedInterop(o) => html_common.wrap_jso_no_SerializedScriptvalue(o);
-
-_maybeWrap(o) {
-  var wrapped = html_common.wrap_jso_no_SerializedScriptvalue(o);
-  if (identical(wrapped, o)) return o;
-  return (wrapped is html.Blob ||
-      wrapped is html.Event ||
-      wrapped is indexed_db.KeyRange ||
-      wrapped is html.ImageData ||
-      wrapped is html.Node ||
-      wrapped is TypedData ||
-      wrapped is html.Window) ? wrapped : o;
+_lookupType(o, bool isCrossFrame, bool isElement) {
+  try {
+   var type = html_common.lookupType(o, isElement);
+   var typeMirror = mirrors.reflectType(type);
+   var legacyInteropConvertToNative = typeMirror.isSubtypeOf(mirrors.reflectType(html.Blob)) ||
+        typeMirror.isSubtypeOf(mirrors.reflectType(html.Event)) ||
+        typeMirror.isSubtypeOf(mirrors.reflectType(indexed_db.KeyRange)) ||
+        typeMirror.isSubtypeOf(mirrors.reflectType(html.ImageData)) ||
+        typeMirror.isSubtypeOf(mirrors.reflectType(html.Node)) ||
+//        TypedData is removed from this list as it is converted directly
+//        rather than flowing through the interceptor code path.
+//        typeMirror.isSubtypeOf(mirrors.reflectType(typed_data.TypedData)) ||
+        typeMirror.isSubtypeOf(mirrors.reflectType(html.Window));
+    if (isCrossFrame && !typeMirror.isSubtypeOf(mirrors.reflectType(html.Window))) {
+      // TODO(jacobr): evaluate using the true cross frame Window class, etc.
+      // as well as triggering that legacy JS Interop returns raw JsObject
+      // instances.
+      legacyInteropConvertToNative = false;
+    }
+    return [type, legacyInteropConvertToNative];
+  } catch (e) { }
+  return [JSObject.instanceRuntimeType, false];
 }
 
 /**
- * Get the dart wrapper object for object. Top-level so we
- * we can access it from other libraries without it being
- * a public instance field on JsObject.
+ * Base class for both the legacy JsObject class and the modern JSObject class.
+ * This allows the JsNative utility class tobehave identically whether it is
+ * called on a JsObject or a JSObject.
  */
-@Deprecated("Internal Use Only")
-getDartHtmlWrapperFor(JsObject object) => object._dartHtmlWrapper;
+class _JSObjectBase extends NativeFieldWrapperClass2 {
+  String _toString() native "JSObject_toString";
+  _callMethod(String name, List args) native "JSObject_callMethod";
+  _operator_getter(String property) native "JSObject_[]";
+  _operator_setter(String property, value) native "JSObject_[]=";
+  bool _hasProperty(String property) native "JsObject_hasProperty";
+  bool _instanceof(/*JsFunction|JSFunction*/ type) native "JsObject_instanceof";
 
-/**
- * Set the dart wrapper object for object. Top-level so we
- * we can access it from other libraries without it being
- * a public instance field on JsObject.
- */
-@Deprecated("Internal Use Only")
-void setDartHtmlWrapperFor(JsObject object, wrapper) {
-  object._dartHtmlWrapper = wrapper;
-}
-
-/**
- * Used by callMethod to get the JS object for each argument passed if the
- * argument is a Dart class instance that delegates to a DOM object.  See
- * wrap_jso defined in dart:html.
- */
-@Deprecated("Internal Use Only")
-unwrap_jso(dartClass_instance) {
-  if (dartClass_instance is JSObject &&
-      dartClass_instance is! JsObject) return dartClass_instance.blink_jsObject;
-  else return dartClass_instance;
+  int get hashCode native "JSObject_hashCode";
 }
 
 /**
@@ -924,22 +975,16 @@
  * The properties of the JavaScript object are accessible via the `[]` and
  * `[]=` operators. Methods are callable via [callMethod].
  */
-class JsObject extends NativeFieldWrapperClass2 {
+class JsObject extends _JSObjectBase {
   JsObject.internal();
 
   /**
-   * If this JsObject is wrapped, e.g. DOM objects, then we can save the
-   * wrapper here and preserve its identity.
-   */
-  var _dartHtmlWrapper;
-
-  /**
    * Constructs a new JavaScript object from [constructor] and returns a proxy
    * to it.
    */
   factory JsObject(JsFunction constructor, [List arguments]) {
     try {
-      return html_common.unwrap_jso(_create(constructor, arguments));
+      return _create(constructor, arguments);
     } catch (e) {
       // Re-throw any errors (returned as a string) as a DomException.
       throw new html.DomException.jsInterop(e);
@@ -964,6 +1009,7 @@
     if (object is num || object is String || object is bool || object == null) {
       throw new ArgumentError("object cannot be a num, string, bool, or null");
     }
+    if (object is JsObject) return object;
     return _fromBrowserObject(object);
   }
 
@@ -985,7 +1031,7 @@
 
   static JsObject _jsify(object) native "JsObject_jsify";
 
-  static JsObject _fromBrowserObject(object) => html_common.unwrap_jso(object);
+  static JsObject _fromBrowserObject(object) native "JsObject_fromBrowserObject";
 
   /**
    * Returns the value associated with [property] from the proxied JavaScript
@@ -995,14 +1041,14 @@
    */
   operator [](property) {
     try {
-      return _maybeWrap(_operator_getter(property));
+      return _operator_getterLegacy(property);
     } catch (e) {
       // Re-throw any errors (returned as a string) as a DomException.
       throw new html.DomException.jsInterop(e);
     }
   }
 
-  _operator_getter(property) native "JsObject_[]";
+  _operator_getterLegacy(property) native "JsObject_[]Legacy";
 
   /**
    * Sets the value associated with [property] on the proxied JavaScript
@@ -1012,27 +1058,23 @@
    */
   operator []=(property, value) {
     try {
-      _operator_setter(property, value);
+      _operator_setterLegacy(property, value);
     } catch (e) {
       // Re-throw any errors (returned as a string) as a DomException.
       throw new html.DomException.jsInterop(e);
     }
   }
 
-  _operator_setter(property, value) native "JsObject_[]=";
+  _operator_setterLegacy(property, value) native "JsObject_[]=Legacy";
 
   int get hashCode native "JsObject_hashCode";
 
   operator ==(other) {
-    var is_JsObject = other is JsObject;
-    if (!is_JsObject) {
-      other = html_common.unwrap_jso(other);
-      is_JsObject = other is JsObject;
-    }
-    return is_JsObject && _identityEquality(this, other);
+    if (other is! JsObject && other is! JSObject) return false;
+    return _identityEquality(this, other);
   }
 
-  static bool _identityEquality(JsObject a, JsObject b)
+  static bool _identityEquality(a, b)
       native "JsObject_identityEquality";
 
   /**
@@ -1041,7 +1083,7 @@
    *
    * This is the equivalent of the `in` operator in JavaScript.
    */
-  bool hasProperty(String property) native "JsObject_hasProperty";
+  bool hasProperty(String property) => _hasProperty(property);
 
   /**
    * Removes [property] from the JavaScript object.
@@ -1055,7 +1097,7 @@
    *
    * This is the equivalent of the `instanceof` operator in JavaScript.
    */
-  bool instanceof(JsFunction type) native "JsObject_instanceof";
+  bool instanceof(JsFunction type) => _instanceof(type);
 
   /**
    * Returns the result of the JavaScript objects `toString` method.
@@ -1078,7 +1120,7 @@
    */
   callMethod(String method, [List args]) {
     try {
-      return _maybeWrap(_callMethod(method, args));
+      return _callMethodLegacy(method, args);
     } catch (e) {
       if (hasProperty(method)) {
         // Return a DomException if DOM call returned an error.
@@ -1089,19 +1131,26 @@
     }
   }
 
-  _callMethod(String name, List args) native "JsObject_callMethod";
+  _callMethodLegacy(String name, List args) native "JsObject_callMethodLegacy";
 }
 
+
 /// Base class for all JS objects used through dart:html and typed JS interop.
 @Deprecated("Internal Use Only")
-class JSObject {
+class JSObject extends _JSObjectBase {
   JSObject.internal() {}
-  external factory JSObject.create(JsObject jsObject);
+  external static Type get instanceRuntimeType;
 
-  @Deprecated("Internal Use Only")
-  JsObject blink_jsObject;
-
-  String toString() => blink_jsObject.toString();
+  /**
+   * Returns the result of the JavaScript objects `toString` method.
+   */
+  String toString() {
+    try {
+      return _toString();
+    } catch (e) {
+      return super.toString();
+    }
+  }
 
   noSuchMethod(Invocation invocation) {
     throwError() {
@@ -1118,7 +1167,7 @@
             !_allowedMethods.containsKey(invocation.memberName)) {
           throwError();
         }
-        var ret = maybeWrapTypedInterop(blink_jsObject._operator_getter(name));
+        var ret = _operator_getter(name);
         if (matches != null) return ret;
         if (ret is Function ||
             (ret is JsFunction /* shouldn't be needed in the future*/) &&
@@ -1127,7 +1176,7 @@
         throwError();
       } else {
         // TODO(jacobr): should we throw if the JavaScript object doesn't have the property?
-        return maybeWrapTypedInterop(blink_jsObject._operator_getter(name));
+        return _operator_getter(name);
       }
     } else if (invocation.isSetter) {
       if (CHECK_JS_INVOCATIONS) {
@@ -1137,8 +1186,7 @@
       }
       assert(name.endsWith("="));
       name = name.substring(0, name.length - 1);
-      return maybeWrapTypedInterop(blink_jsObject._operator_setter(
-          name, invocation.positionalArguments.first));
+      return _operator_setter(name, invocation.positionalArguments.first);
     } else {
       // TODO(jacobr): also allow calling getters that look like functions.
       var matches;
@@ -1147,8 +1195,7 @@
         if (matches == null ||
             !matches.checkInvocation(invocation)) throwError();
       }
-      var ret = maybeWrapTypedInterop(
-          blink_jsObject._callMethod(name, _buildArgs(invocation)));
+      var ret = _callMethod(name, _buildArgs(invocation));
       if (CHECK_JS_INVOCATIONS) {
         if (!matches._checkReturnType(ret)) {
           html.window.console.error("Return value for method: ${name} is "
@@ -1164,21 +1211,56 @@
 @Deprecated("Internal Use Only")
 class JSArray extends JSObject with ListMixin {
   JSArray.internal() : super.internal();
-  external factory JSArray.create(JsObject jsObject);
-  operator [](int index) =>
-      maybeWrapTypedInterop(JsNative.getArrayIndex(blink_jsObject, index));
+  external static Type get instanceRuntimeType;
 
-  operator []=(int index, value) => blink_jsObject[index] = value;
+  // Reuse JsArray_length as length behavior is unchanged.
+  int get length native "JsArray_length";
 
-  int get length => blink_jsObject.length;
-  int set length(int newLength) => blink_jsObject.length = newLength;
+  set length(int length) {
+    _operator_setter('length', length);
+  }
+
+  _checkIndex(int index, {bool insert: false}) {
+    int length = insert ? this.length + 1 : this.length;
+    if (index is int && (index < 0 || index >= length)) {
+      throw new RangeError.range(index, 0, length);
+    }
+  }
+
+  _checkRange(int start, int end) {
+    int cachedLength = this.length;
+    if (start < 0 || start > cachedLength) {
+      throw new RangeError.range(start, 0, cachedLength);
+    }
+    if (end < start || end > cachedLength) {
+      throw new RangeError.range(end, start, cachedLength);
+    }
+  }
+
+  _indexed_getter(int index) native "JSArray_indexed_getter";
+  _indexed_setter(int index, o) native "JSArray_indexed_setter";
+
+  // Methods required by ListMixin
+
+  operator [](index) {
+    if (index is int) {
+      _checkIndex(index);
+    }
+
+    return _indexed_getter(index);
+  }
+
+  void operator []=(int index, value) {
+    _checkIndex(index);
+    _indexed_setter(index, value);
+  }
 }
 
 @Deprecated("Internal Use Only")
 class JSFunction extends JSObject implements Function {
   JSFunction.internal() : super.internal();
 
-  external factory JSFunction.create(JsObject jsObject);
+  external static Type get instanceRuntimeType;
 
   call(
       [a1 = _UNDEFINED,
@@ -1191,48 +1273,49 @@
       a8 = _UNDEFINED,
       a9 = _UNDEFINED,
       a10 = _UNDEFINED]) {
-    return maybeWrapTypedInterop(blink_jsObject
-        .apply(_stripUndefinedArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10])));
+    return _apply(_stripUndefinedArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]));
   }
 
   noSuchMethod(Invocation invocation) {
     if (invocation.isMethod && invocation.memberName == #call) {
-      return maybeWrapTypedInterop(
-          blink_jsObject.apply(_buildArgs(invocation)));
+      return _apply(_buildArgs(invocation));
     }
     return super.noSuchMethod(invocation);
   }
+
+  dynamic _apply(List args, {thisArg}) native "JSFunction_apply";
+
+  static JSFunction _createWithThis(Function f) native "JSFunction_createWithThis";
+  static JSFunction _create(Function f) native "JSFunction_create";
 }
 
 // JavaScript interop methods that do not automatically wrap to dart:html types.
 // Warning: this API is not exposed to dart:js.
+// TODO(jacobr): rename to JSNative and make at least part of this API public.
 @Deprecated("Internal Use Only")
 class JsNative {
-  static getProperty(o, name) {
-    o = unwrap_jso(o);
-    return o != null ? o._operator_getter(name) : null;
-  }
+  static JSObject jsify(object) native "JSObject_jsify";
+  static JSObject newObject() native "JSObject_newObject";
+  static JSArray newArray() native "JSObject_newArray";
 
-  static setProperty(o, name, value) {
-    return unwrap_jso(o)._operator_setter(name, value);
-  }
+  static hasProperty(_JSObjectBase o, name) => o._hasProperty(name);
+  static getProperty(_JSObjectBase o, name) => o._operator_getter(name);
+  static setProperty(_JSObjectBase o, name, value) => o._operator_setter(name, value);
+  static callMethod(_JSObjectBase o, String method, List args) => o._callMethod(method, args);
+  static instanceof(_JSObjectBase o, /*JsFunction|JSFunction*/ type) => o._instanceof(type);
+  static callConstructor0(_JSObjectBase constructor) native "JSNative_callConstructor0";
+  static callConstructor(_JSObjectBase constructor, List args) native "JSNative_callConstructor";
 
-  static callMethod(o, String method, List args) {
-    return unwrap_jso(o)._callMethod(method, args);
-  }
-
-  static getArrayIndex(JsArray array, int index) {
-    array._checkIndex(index);
-    return getProperty(array, index);
-  }
+  static toTypedObject(JsObject o) native "JSNative_toTypedObject";
 
   /**
    * Same behavior as new JsFunction.withThis except that JavaScript "this" is not
    * wrapped.
    */
-  static JsFunction withThis(Function f) native "JsFunction_withThisNoWrap";
+  static JSFunction withThis(Function f) native "JsFunction_withThisNoWrap";
 }
 
+
 /**
  * Proxies a JavaScript Function object.
  */
@@ -1250,7 +1333,7 @@
    * supplied it is the value of `this` for the invocation.
    */
   dynamic apply(List args, {thisArg}) =>
-      _maybeWrap(_apply(args, thisArg: thisArg));
+      _apply(args, thisArg: thisArg);
 
   dynamic _apply(List args, {thisArg}) native "JsFunction_apply";
 
@@ -1402,15 +1485,6 @@
   }
 }
 
-List _stripAndWrapArgs(Iterable args) {
-  var ret = [];
-  for (var arg in args) {
-    if (arg == _UNDEFINED) break;
-    ret.add(maybeWrapTypedInterop(arg));
-  }
-  return ret;
-}
-
 /**
  * Returns a method that can be called with an arbitrary number (for n less
  * than 11) of arguments without violating Dart type checks.
@@ -1429,90 +1503,6 @@
     jsFunction._applyDebuggerOnly(
         _stripUndefinedArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]));
 
-/// This helper is purely a hack so we can reuse JsFunction.withThis even when
-/// we don't care about passing JS "this". In an ideal world we would implement
-/// helpers in C++ that directly implement allowInterop and
-/// allowInteropCaptureThis.
-class _CreateDartFunctionForInteropIgnoreThis implements Function {
-  Function _fn;
-
-  _CreateDartFunctionForInteropIgnoreThis(this._fn);
-
-  call(
-      [ignoredThis = _UNDEFINED,
-      a1 = _UNDEFINED,
-      a2 = _UNDEFINED,
-      a3 = _UNDEFINED,
-      a4 = _UNDEFINED,
-      a5 = _UNDEFINED,
-      a6 = _UNDEFINED,
-      a7 = _UNDEFINED,
-      a8 = _UNDEFINED,
-      a9 = _UNDEFINED,
-      a10 = _UNDEFINED]) {
-    var ret = Function.apply(
-        _fn, _stripAndWrapArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]));
-    safeForTypedInterop(ret);
-    return ret;
-  }
-
-  noSuchMethod(Invocation invocation) {
-    if (invocation.isMethod && invocation.memberName == #call) {
-      // Named arguments not yet supported.
-      if (invocation.namedArguments.isNotEmpty) return;
-      var ret = Function.apply(
-          _fn, _stripAndWrapArgs(invocation.positionalArguments.skip(1)));
-      // TODO(jacobr): it would be nice to check that the return value is safe
-      // for interop but we don't want to break existing addEventListener users.
-      // safeForTypedInterop(ret);
-      safeForTypedInterop(ret);
-      return ret;
-    }
-    return super.noSuchMethod(invocation);
-  }
-}
-
-/// See comment for [_CreateDartFunctionForInteropIgnoreThis].
-/// This Function exists purely because JsObject doesn't have the DOM type
-/// conversion semantics we want for JS typed interop.
-class _CreateDartFunctionForInterop implements Function {
-  Function _fn;
-
-  _CreateDartFunctionForInterop(this._fn);
-
-  call(
-      [a1 = _UNDEFINED,
-      a2 = _UNDEFINED,
-      a3 = _UNDEFINED,
-      a4 = _UNDEFINED,
-      a5 = _UNDEFINED,
-      a6 = _UNDEFINED,
-      a7 = _UNDEFINED,
-      a8 = _UNDEFINED,
-      a9 = _UNDEFINED,
-      a10 = _UNDEFINED]) {
-    var ret = Function.apply(
-        _fn, _stripAndWrapArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]));
-    safeForTypedInterop(ret);
-    return ret;
-  }
-
-  noSuchMethod(Invocation invocation) {
-    if (invocation.isMethod && invocation.memberName == #call) {
-      // Named arguments not yet supported.
-      if (invocation.namedArguments.isNotEmpty) return;
-      var ret = Function.apply(
-          _fn, _stripAndWrapArgs(invocation.positionalArguments));
-      safeForTypedInterop(ret);
-      return ret;
-    }
-    return super.noSuchMethod(invocation);
-  }
-}
-
-/// Cached JSFunction associated with the Dart Function.
-Expando<JSFunction> _interopExpando = new Expando<JSFunction>();
-
 /// Returns a wrapper around function [f] that can be called from JavaScript
 /// using the package:js Dart-JavaScript interop.
 ///
@@ -1529,14 +1519,7 @@
     // The function is already a JSFunction... no need to do anything.
     return f;
   } else {
-    var ret = _interopExpando[f];
-    if (ret == null) {
-      // TODO(jacobr): we could optimize this.
-      ret = new JSFunction.create(new JsFunction.withThis(
-          new _CreateDartFunctionForInteropIgnoreThis(f)));
-      _interopExpando[f] = ret;
-    }
-    return ret;
+    return JSFunction._create(f);
   }
 }
 
@@ -1560,10 +1543,11 @@
     var ret = _interopCaptureThisExpando[f];
     if (ret == null) {
       // TODO(jacobr): we could optimize this.
-      ret = new JSFunction.create(
-          new JsFunction.withThis(new _CreateDartFunctionForInterop(f)));
+      ret = JSFunction._createWithThis(f);
       _interopCaptureThisExpando[f] = ret;
     }
     return ret;
   }
 }
+
+debugPrint(_) {}
\ No newline at end of file
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index 5cb2ace..4b967b9 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -75,49 +75,6 @@
 
 
 @DocsEditable()
-@DomName('SVGAltGlyphElement')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.FIREFOX)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Unstable()
-@Native("SVGAltGlyphElement")
-class AltGlyphElement extends TextPositioningElement implements UriReference {
-  // To suppress missing implicit constructor warnings.
-  factory AltGlyphElement._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGAltGlyphElement.SVGAltGlyphElement')
-  @DocsEditable()
-  factory AltGlyphElement() => _SvgElementFactoryProvider.createSvgElement_tag("altGlyph");
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  AltGlyphElement.created() : super.created();
-
-  /// Checks if this type is supported on the current platform.
-  static bool get supported => SvgElement.isTagSupported('altGlyph') && (new SvgElement.tag('altGlyph') is AltGlyphElement);
-
-  @DomName('SVGAltGlyphElement.format')
-  @DocsEditable()
-  String format;
-
-  @DomName('SVGAltGlyphElement.glyphRef')
-  @DocsEditable()
-  String glyphRef;
-
-  // From SVGURIReference
-
-  @DomName('SVGAltGlyphElement.href')
-  @DocsEditable()
-  final AnimatedString href;
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('SVGAngle')
 @Unstable()
 @Native("SVGAngle")
@@ -1991,6 +1948,16 @@
   @DocsEditable()
   final AnimatedString in1;
 
+  @DomName('SVGFESpecularLightingElement.kernelUnitLengthX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final AnimatedNumber kernelUnitLengthX;
+
+  @DomName('SVGFESpecularLightingElement.kernelUnitLengthY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final AnimatedNumber kernelUnitLengthY;
+
   @DomName('SVGFESpecularLightingElement.specularConstant')
   @DocsEditable()
   final AnimatedNumber specularConstant;
@@ -2273,14 +2240,6 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => SvgElement.isTagSupported('filter') && (new SvgElement.tag('filter') is FilterElement);
 
-  @DomName('SVGFilterElement.filterResX')
-  @DocsEditable()
-  final AnimatedInteger filterResX;
-
-  @DomName('SVGFilterElement.filterResY')
-  @DocsEditable()
-  final AnimatedInteger filterResY;
-
   @DomName('SVGFilterElement.filterUnits')
   @DocsEditable()
   final AnimatedEnumeration filterUnits;
@@ -2305,10 +2264,6 @@
   @DocsEditable()
   final AnimatedLength y;
 
-  @DomName('SVGFilterElement.setFilterRes')
-  @DocsEditable()
-  void setFilterRes(int filterResX, int filterResY) native;
-
   // From SVGURIReference
 
   @DomName('SVGFilterElement.href')
@@ -2727,11 +2682,11 @@
   @DomName('SVGLengthList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, Length value) native;
+  void __setter__(int index, Length newItem) native;
 
   @DomName('SVGLengthList.appendItem')
   @DocsEditable()
-  Length appendItem(Length item) native;
+  Length appendItem(Length newItem) native;
 
   @DomName('SVGLengthList.clear')
   @DocsEditable()
@@ -2743,11 +2698,11 @@
 
   @DomName('SVGLengthList.initialize')
   @DocsEditable()
-  Length initialize(Length item) native;
+  Length initialize(Length newItem) native;
 
   @DomName('SVGLengthList.insertItemBefore')
   @DocsEditable()
-  Length insertItemBefore(Length item, int index) native;
+  Length insertItemBefore(Length newItem, int index) native;
 
   @DomName('SVGLengthList.removeItem')
   @DocsEditable()
@@ -2755,7 +2710,7 @@
 
   @DomName('SVGLengthList.replaceItem')
   @DocsEditable()
-  Length replaceItem(Length item, int index) native;
+  Length replaceItem(Length newItem, int index) native;
 }
 // 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
@@ -3179,11 +3134,11 @@
   @DomName('SVGNumberList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, Number value) native;
+  void __setter__(int index, Number newItem) native;
 
   @DomName('SVGNumberList.appendItem')
   @DocsEditable()
-  Number appendItem(Number item) native;
+  Number appendItem(Number newItem) native;
 
   @DomName('SVGNumberList.clear')
   @DocsEditable()
@@ -3195,11 +3150,11 @@
 
   @DomName('SVGNumberList.initialize')
   @DocsEditable()
-  Number initialize(Number item) native;
+  Number initialize(Number newItem) native;
 
   @DomName('SVGNumberList.insertItemBefore')
   @DocsEditable()
-  Number insertItemBefore(Number item, int index) native;
+  Number insertItemBefore(Number newItem, int index) native;
 
   @DomName('SVGNumberList.removeItem')
   @DocsEditable()
@@ -3207,7 +3162,7 @@
 
   @DomName('SVGNumberList.replaceItem')
   @DocsEditable()
-  Number replaceItem(Number item, int index) native;
+  Number replaceItem(Number newItem, int index) native;
 }
 // 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
@@ -3966,7 +3921,7 @@
   @DomName('SVGPathSegList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, PathSeg value) native;
+  void __setter__(int index, PathSeg newItem) native;
 
   @DomName('SVGPathSegList.appendItem')
   @DocsEditable()
@@ -4173,11 +4128,11 @@
   @DomName('SVGPointList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, Point value) native;
+  void __setter__(int index, Point newItem) native;
 
   @DomName('SVGPointList.appendItem')
   @DocsEditable()
-  Point appendItem(Point item) native;
+  Point appendItem(Point newItem) native;
 
   @DomName('SVGPointList.clear')
   @DocsEditable()
@@ -4189,11 +4144,11 @@
 
   @DomName('SVGPointList.initialize')
   @DocsEditable()
-  Point initialize(Point item) native;
+  Point initialize(Point newItem) native;
 
   @DomName('SVGPointList.insertItemBefore')
   @DocsEditable()
-  Point insertItemBefore(Point item, int index) native;
+  Point insertItemBefore(Point newItem, int index) native;
 
   @DomName('SVGPointList.removeItem')
   @DocsEditable()
@@ -4201,7 +4156,7 @@
 
   @DomName('SVGPointList.replaceItem')
   @DocsEditable()
-  Point replaceItem(Point item, int index) native;
+  Point replaceItem(Point newItem, int index) native;
 }
 // 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
@@ -4471,43 +4426,6 @@
 
 
 @DocsEditable()
-@DomName('SVGRenderingIntent')
-@Unstable()
-@Native("SVGRenderingIntent")
-class RenderingIntent extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory RenderingIntent._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_ABSOLUTE_COLORIMETRIC')
-  @DocsEditable()
-  static const int RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_AUTO')
-  @DocsEditable()
-  static const int RENDERING_INTENT_AUTO = 1;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_PERCEPTUAL')
-  @DocsEditable()
-  static const int RENDERING_INTENT_PERCEPTUAL = 2;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_RELATIVE_COLORIMETRIC')
-  @DocsEditable()
-  static const int RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_SATURATION')
-  @DocsEditable()
-  static const int RENDERING_INTENT_SATURATION = 4;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_UNKNOWN')
-  @DocsEditable()
-  static const int RENDERING_INTENT_UNKNOWN = 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.
-
-
-@DocsEditable()
 @DomName('SVGScriptElement')
 @Unstable()
 @Native("SVGScriptElement")
@@ -4661,11 +4579,11 @@
   @DomName('SVGStringList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, String value) native;
+  void __setter__(int index, String newItem) native;
 
   @DomName('SVGStringList.appendItem')
   @DocsEditable()
-  String appendItem(String item) native;
+  String appendItem(String newItem) native;
 
   @DomName('SVGStringList.clear')
   @DocsEditable()
@@ -4677,7 +4595,7 @@
 
   @DomName('SVGStringList.initialize')
   @DocsEditable()
-  String initialize(String item) native;
+  String initialize(String newItem) native;
 
   @DomName('SVGStringList.insertItemBefore')
   @DocsEditable()
@@ -4689,7 +4607,7 @@
 
   @DomName('SVGStringList.replaceItem')
   @DocsEditable()
-  String replaceItem(String item, int index) native;
+  String replaceItem(String newItem, int index) native;
 }
 // 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
@@ -5178,19 +5096,15 @@
   @DocsEditable()
   final SvgElement viewportElement;
 
-  @DomName('SVGElement.xmlbase')
-  @DocsEditable()
-  String xmlbase;
-
-  @DomName('SVGElement.xmllang')
+  @DomName('SVGElement.blur')
   @DocsEditable()
   @Experimental() // untriaged
-  String xmllang;
+  void blur() native;
 
-  @DomName('SVGElement.xmlspace')
+  @DomName('SVGElement.focus')
   @DocsEditable()
   @Experimental() // untriaged
-  String xmlspace;
+  void focus() native;
 
   @DomName('SVGElement.onabort')
   @DocsEditable()
@@ -5799,11 +5713,11 @@
 
   @DomName('SVGTextContentElement.getEndPositionOfChar')
   @DocsEditable()
-  Point getEndPositionOfChar(int offset) native;
+  Point getEndPositionOfChar(int charnum) native;
 
   @DomName('SVGTextContentElement.getExtentOfChar')
   @DocsEditable()
-  Rect getExtentOfChar(int offset) native;
+  Rect getExtentOfChar(int charnum) native;
 
   @DomName('SVGTextContentElement.getNumberOfChars')
   @DocsEditable()
@@ -5811,19 +5725,19 @@
 
   @DomName('SVGTextContentElement.getRotationOfChar')
   @DocsEditable()
-  double getRotationOfChar(int offset) native;
+  double getRotationOfChar(int charnum) native;
 
   @DomName('SVGTextContentElement.getStartPositionOfChar')
   @DocsEditable()
-  Point getStartPositionOfChar(int offset) native;
+  Point getStartPositionOfChar(int charnum) native;
 
   @DomName('SVGTextContentElement.getSubStringLength')
   @DocsEditable()
-  double getSubStringLength(int offset, int length) native;
+  double getSubStringLength(int charnum, int nchars) native;
 
   @DomName('SVGTextContentElement.selectSubString')
   @DocsEditable()
-  void selectSubString(int offset, int length) native;
+  void selectSubString(int charnum, int nchars) native;
 }
 // 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
@@ -6117,11 +6031,11 @@
   @DomName('SVGTransformList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, Transform value) native;
+  void __setter__(int index, Transform newItem) native;
 
   @DomName('SVGTransformList.appendItem')
   @DocsEditable()
-  Transform appendItem(Transform item) native;
+  Transform appendItem(Transform newItem) native;
 
   @DomName('SVGTransformList.clear')
   @DocsEditable()
@@ -6142,11 +6056,11 @@
 
   @DomName('SVGTransformList.initialize')
   @DocsEditable()
-  Transform initialize(Transform item) native;
+  Transform initialize(Transform newItem) native;
 
   @DomName('SVGTransformList.insertItemBefore')
   @DocsEditable()
-  Transform insertItemBefore(Transform item, int index) native;
+  Transform insertItemBefore(Transform newItem, int index) native;
 
   @DomName('SVGTransformList.removeItem')
   @DocsEditable()
@@ -6154,7 +6068,7 @@
 
   @DomName('SVGTransformList.replaceItem')
   @DocsEditable()
-  Transform replaceItem(Transform item, int index) native;
+  Transform replaceItem(Transform newItem, int index) native;
 }
 // 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
@@ -6457,44 +6371,6 @@
 
 
 @DocsEditable()
-@DomName('SVGAltGlyphDefElement')
-@Unstable()
-@Native("SVGAltGlyphDefElement")
-abstract class _SVGAltGlyphDefElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGAltGlyphDefElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGAltGlyphDefElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGAltGlyphItemElement')
-@Unstable()
-@Native("SVGAltGlyphItemElement")
-abstract class _SVGAltGlyphItemElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGAltGlyphItemElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGAltGlyphItemElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('SVGComponentTransferFunctionElement')
 @Unstable()
 @Native("SVGComponentTransferFunctionElement")
@@ -6569,189 +6445,6 @@
 
 
 @DocsEditable()
-@DomName('SVGFontElement')
-@Unstable()
-@Native("SVGFontElement")
-abstract class _SVGFontElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceElement')
-@Unstable()
-@Native("SVGFontFaceElement")
-abstract class _SVGFontFaceElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceFormatElement')
-@Unstable()
-@Native("SVGFontFaceFormatElement")
-abstract class _SVGFontFaceFormatElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceFormatElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceFormatElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceNameElement')
-@Unstable()
-@Native("SVGFontFaceNameElement")
-abstract class _SVGFontFaceNameElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceNameElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceNameElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceSrcElement')
-@Unstable()
-@Native("SVGFontFaceSrcElement")
-abstract class _SVGFontFaceSrcElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceSrcElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceSrcElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceUriElement')
-@Unstable()
-@Native("SVGFontFaceUriElement")
-abstract class _SVGFontFaceUriElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceUriElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceUriElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGGlyphElement')
-@Unstable()
-@Native("SVGGlyphElement")
-abstract class _SVGGlyphElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGGlyphElement._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGGlyphElement.SVGGlyphElement')
-  @DocsEditable()
-  factory _SVGGlyphElement() => _SvgElementFactoryProvider.createSvgElement_tag("glyph");
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGGlyphElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGGlyphRefElement')
-@Unstable()
-@Native("SVGGlyphRefElement")
-abstract class _SVGGlyphRefElement extends SvgElement implements UriReference {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGGlyphRefElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGGlyphRefElement.created() : super.created();
-
-  // From SVGURIReference
-
-}
-
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGHKernElement')
-@Unstable()
-@Native("SVGHKernElement")
-abstract class _SVGHKernElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGHKernElement._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGHKernElement.SVGHKernElement')
-  @DocsEditable()
-  factory _SVGHKernElement() => _SvgElementFactoryProvider.createSvgElement_tag("hkern");
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGHKernElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('SVGMPathElement')
 @Native("SVGMPathElement")
 abstract class _SVGMPathElement extends SvgElement implements UriReference {
@@ -6772,45 +6465,3 @@
 
 }
 
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGMissingGlyphElement')
-@Unstable()
-@Native("SVGMissingGlyphElement")
-abstract class _SVGMissingGlyphElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGMissingGlyphElement._() { throw new UnsupportedError("Not supported"); }
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGMissingGlyphElement.created() : super.created();
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGVKernElement')
-@Unstable()
-@Native("SVGVKernElement")
-abstract class _SVGVKernElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGVKernElement._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGVKernElement.SVGVKernElement')
-  @DocsEditable()
-  factory _SVGVKernElement() => _SvgElementFactoryProvider.createSvgElement_tag("vkern");
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGVKernElement.created() : super.created();
-}
diff --git a/sdk/lib/svg/dartium/svg_dartium.dart b/sdk/lib/svg/dartium/svg_dartium.dart
index 7795952..72bce94 100644
--- a/sdk/lib/svg/dartium/svg_dartium.dart
+++ b/sdk/lib/svg/dartium/svg_dartium.dart
@@ -26,291 +26,133 @@
 // FIXME: Can we make this private?
 @Deprecated("Internal Use Only")
 final svgBlinkMap = {
-  'SVGAElement': () => AElement,
-  'SVGAltGlyphDefElement': () => _SVGAltGlyphDefElement,
-  'SVGAltGlyphElement': () => AltGlyphElement,
-  'SVGAltGlyphItemElement': () => _SVGAltGlyphItemElement,
-  'SVGAngle': () => Angle,
-  'SVGAnimateElement': () => AnimateElement,
-  'SVGAnimateMotionElement': () => AnimateMotionElement,
-  'SVGAnimateTransformElement': () => AnimateTransformElement,
-  'SVGAnimatedAngle': () => AnimatedAngle,
-  'SVGAnimatedBoolean': () => AnimatedBoolean,
-  'SVGAnimatedEnumeration': () => AnimatedEnumeration,
-  'SVGAnimatedInteger': () => AnimatedInteger,
-  'SVGAnimatedLength': () => AnimatedLength,
-  'SVGAnimatedLengthList': () => AnimatedLengthList,
-  'SVGAnimatedNumber': () => AnimatedNumber,
-  'SVGAnimatedNumberList': () => AnimatedNumberList,
-  'SVGAnimatedPreserveAspectRatio': () => AnimatedPreserveAspectRatio,
-  'SVGAnimatedRect': () => AnimatedRect,
-  'SVGAnimatedString': () => AnimatedString,
-  'SVGAnimatedTransformList': () => AnimatedTransformList,
-  'SVGAnimationElement': () => AnimationElement,
-  'SVGCircleElement': () => CircleElement,
-  'SVGClipPathElement': () => ClipPathElement,
-  'SVGComponentTransferFunctionElement': () => _SVGComponentTransferFunctionElement,
-  'SVGCursorElement': () => _SVGCursorElement,
-  'SVGDefsElement': () => DefsElement,
-  'SVGDescElement': () => DescElement,
-  'SVGDiscardElement': () => DiscardElement,
-  'SVGElement': () => SvgElement,
-  'SVGEllipseElement': () => EllipseElement,
-  'SVGFEBlendElement': () => FEBlendElement,
-  'SVGFEColorMatrixElement': () => FEColorMatrixElement,
-  'SVGFEComponentTransferElement': () => FEComponentTransferElement,
-  'SVGFECompositeElement': () => FECompositeElement,
-  'SVGFEConvolveMatrixElement': () => FEConvolveMatrixElement,
-  'SVGFEDiffuseLightingElement': () => FEDiffuseLightingElement,
-  'SVGFEDisplacementMapElement': () => FEDisplacementMapElement,
-  'SVGFEDistantLightElement': () => FEDistantLightElement,
-  'SVGFEDropShadowElement': () => _SVGFEDropShadowElement,
-  'SVGFEFloodElement': () => FEFloodElement,
-  'SVGFEFuncAElement': () => FEFuncAElement,
-  'SVGFEFuncBElement': () => FEFuncBElement,
-  'SVGFEFuncGElement': () => FEFuncGElement,
-  'SVGFEFuncRElement': () => FEFuncRElement,
-  'SVGFEGaussianBlurElement': () => FEGaussianBlurElement,
-  'SVGFEImageElement': () => FEImageElement,
-  'SVGFEMergeElement': () => FEMergeElement,
-  'SVGFEMergeNodeElement': () => FEMergeNodeElement,
-  'SVGFEMorphologyElement': () => FEMorphologyElement,
-  'SVGFEOffsetElement': () => FEOffsetElement,
-  'SVGFEPointLightElement': () => FEPointLightElement,
-  'SVGFESpecularLightingElement': () => FESpecularLightingElement,
-  'SVGFESpotLightElement': () => FESpotLightElement,
-  'SVGFETileElement': () => FETileElement,
-  'SVGFETurbulenceElement': () => FETurbulenceElement,
-  'SVGFilterElement': () => FilterElement,
-  'SVGFilterPrimitiveStandardAttributes': () => FilterPrimitiveStandardAttributes,
-  'SVGFitToViewBox': () => FitToViewBox,
-  'SVGFontElement': () => _SVGFontElement,
-  'SVGFontFaceElement': () => _SVGFontFaceElement,
-  'SVGFontFaceFormatElement': () => _SVGFontFaceFormatElement,
-  'SVGFontFaceNameElement': () => _SVGFontFaceNameElement,
-  'SVGFontFaceSrcElement': () => _SVGFontFaceSrcElement,
-  'SVGFontFaceUriElement': () => _SVGFontFaceUriElement,
-  'SVGForeignObjectElement': () => ForeignObjectElement,
-  'SVGGElement': () => GElement,
-  'SVGGeometryElement': () => GeometryElement,
-  'SVGGlyphElement': () => _SVGGlyphElement,
-  'SVGGlyphRefElement': () => _SVGGlyphRefElement,
-  'SVGGradientElement': () => _GradientElement,
-  'SVGGraphicsElement': () => GraphicsElement,
-  'SVGHKernElement': () => _SVGHKernElement,
-  'SVGImageElement': () => ImageElement,
-  'SVGLength': () => Length,
-  'SVGLengthList': () => LengthList,
-  'SVGLineElement': () => LineElement,
-  'SVGLinearGradientElement': () => LinearGradientElement,
-  'SVGMPathElement': () => _SVGMPathElement,
-  'SVGMarkerElement': () => MarkerElement,
-  'SVGMaskElement': () => MaskElement,
-  'SVGMatrix': () => Matrix,
-  'SVGMetadataElement': () => MetadataElement,
-  'SVGMissingGlyphElement': () => _SVGMissingGlyphElement,
-  'SVGNumber': () => Number,
-  'SVGNumberList': () => NumberList,
-  'SVGPathElement': () => PathElement,
-  'SVGPathSeg': () => PathSeg,
-  'SVGPathSegArcAbs': () => PathSegArcAbs,
-  'SVGPathSegArcRel': () => PathSegArcRel,
-  'SVGPathSegClosePath': () => PathSegClosePath,
-  'SVGPathSegCurvetoCubicAbs': () => PathSegCurvetoCubicAbs,
-  'SVGPathSegCurvetoCubicRel': () => PathSegCurvetoCubicRel,
-  'SVGPathSegCurvetoCubicSmoothAbs': () => PathSegCurvetoCubicSmoothAbs,
-  'SVGPathSegCurvetoCubicSmoothRel': () => PathSegCurvetoCubicSmoothRel,
-  'SVGPathSegCurvetoQuadraticAbs': () => PathSegCurvetoQuadraticAbs,
-  'SVGPathSegCurvetoQuadraticRel': () => PathSegCurvetoQuadraticRel,
-  'SVGPathSegCurvetoQuadraticSmoothAbs': () => PathSegCurvetoQuadraticSmoothAbs,
-  'SVGPathSegCurvetoQuadraticSmoothRel': () => PathSegCurvetoQuadraticSmoothRel,
-  'SVGPathSegLinetoAbs': () => PathSegLinetoAbs,
-  'SVGPathSegLinetoHorizontalAbs': () => PathSegLinetoHorizontalAbs,
-  'SVGPathSegLinetoHorizontalRel': () => PathSegLinetoHorizontalRel,
-  'SVGPathSegLinetoRel': () => PathSegLinetoRel,
-  'SVGPathSegLinetoVerticalAbs': () => PathSegLinetoVerticalAbs,
-  'SVGPathSegLinetoVerticalRel': () => PathSegLinetoVerticalRel,
-  'SVGPathSegList': () => PathSegList,
-  'SVGPathSegMovetoAbs': () => PathSegMovetoAbs,
-  'SVGPathSegMovetoRel': () => PathSegMovetoRel,
-  'SVGPatternElement': () => PatternElement,
-  'SVGPoint': () => Point,
-  'SVGPointList': () => PointList,
-  'SVGPolygonElement': () => PolygonElement,
-  'SVGPolylineElement': () => PolylineElement,
-  'SVGPreserveAspectRatio': () => PreserveAspectRatio,
-  'SVGRadialGradientElement': () => RadialGradientElement,
-  'SVGRect': () => Rect,
-  'SVGRectElement': () => RectElement,
-  'SVGRenderingIntent': () => RenderingIntent,
-  'SVGSVGElement': () => SvgSvgElement,
-  'SVGScriptElement': () => ScriptElement,
-  'SVGSetElement': () => SetElement,
-  'SVGStopElement': () => StopElement,
-  'SVGStringList': () => StringList,
-  'SVGStyleElement': () => StyleElement,
-  'SVGSwitchElement': () => SwitchElement,
-  'SVGSymbolElement': () => SymbolElement,
-  'SVGTSpanElement': () => TSpanElement,
-  'SVGTests': () => Tests,
-  'SVGTextContentElement': () => TextContentElement,
-  'SVGTextElement': () => TextElement,
-  'SVGTextPathElement': () => TextPathElement,
-  'SVGTextPositioningElement': () => TextPositioningElement,
-  'SVGTitleElement': () => TitleElement,
-  'SVGTransform': () => Transform,
-  'SVGTransformList': () => TransformList,
-  'SVGURIReference': () => UriReference,
-  'SVGUnitTypes': () => UnitTypes,
-  'SVGUseElement': () => UseElement,
-  'SVGVKernElement': () => _SVGVKernElement,
-  'SVGViewElement': () => ViewElement,
-  'SVGViewSpec': () => ViewSpec,
-  'SVGZoomAndPan': () => ZoomAndPan,
-  'SVGZoomEvent': () => ZoomEvent,
-
-};
-
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final svgBlinkFunctionMap = {
-  'SVGAElement': () => AElement.internalCreateAElement,
-  'SVGAltGlyphDefElement': () => _SVGAltGlyphDefElement.internalCreate_SVGAltGlyphDefElement,
-  'SVGAltGlyphElement': () => AltGlyphElement.internalCreateAltGlyphElement,
-  'SVGAltGlyphItemElement': () => _SVGAltGlyphItemElement.internalCreate_SVGAltGlyphItemElement,
-  'SVGAngle': () => Angle.internalCreateAngle,
-  'SVGAnimateElement': () => AnimateElement.internalCreateAnimateElement,
-  'SVGAnimateMotionElement': () => AnimateMotionElement.internalCreateAnimateMotionElement,
-  'SVGAnimateTransformElement': () => AnimateTransformElement.internalCreateAnimateTransformElement,
-  'SVGAnimatedAngle': () => AnimatedAngle.internalCreateAnimatedAngle,
-  'SVGAnimatedBoolean': () => AnimatedBoolean.internalCreateAnimatedBoolean,
-  'SVGAnimatedEnumeration': () => AnimatedEnumeration.internalCreateAnimatedEnumeration,
-  'SVGAnimatedInteger': () => AnimatedInteger.internalCreateAnimatedInteger,
-  'SVGAnimatedLength': () => AnimatedLength.internalCreateAnimatedLength,
-  'SVGAnimatedLengthList': () => AnimatedLengthList.internalCreateAnimatedLengthList,
-  'SVGAnimatedNumber': () => AnimatedNumber.internalCreateAnimatedNumber,
-  'SVGAnimatedNumberList': () => AnimatedNumberList.internalCreateAnimatedNumberList,
-  'SVGAnimatedPreserveAspectRatio': () => AnimatedPreserveAspectRatio.internalCreateAnimatedPreserveAspectRatio,
-  'SVGAnimatedRect': () => AnimatedRect.internalCreateAnimatedRect,
-  'SVGAnimatedString': () => AnimatedString.internalCreateAnimatedString,
-  'SVGAnimatedTransformList': () => AnimatedTransformList.internalCreateAnimatedTransformList,
-  'SVGAnimationElement': () => AnimationElement.internalCreateAnimationElement,
-  'SVGCircleElement': () => CircleElement.internalCreateCircleElement,
-  'SVGClipPathElement': () => ClipPathElement.internalCreateClipPathElement,
-  'SVGComponentTransferFunctionElement': () => _SVGComponentTransferFunctionElement.internalCreate_SVGComponentTransferFunctionElement,
-  'SVGCursorElement': () => _SVGCursorElement.internalCreate_SVGCursorElement,
-  'SVGDefsElement': () => DefsElement.internalCreateDefsElement,
-  'SVGDescElement': () => DescElement.internalCreateDescElement,
-  'SVGDiscardElement': () => DiscardElement.internalCreateDiscardElement,
-  'SVGElement': () => SvgElement.internalCreateSvgElement,
-  'SVGEllipseElement': () => EllipseElement.internalCreateEllipseElement,
-  'SVGFEBlendElement': () => FEBlendElement.internalCreateFEBlendElement,
-  'SVGFEColorMatrixElement': () => FEColorMatrixElement.internalCreateFEColorMatrixElement,
-  'SVGFEComponentTransferElement': () => FEComponentTransferElement.internalCreateFEComponentTransferElement,
-  'SVGFECompositeElement': () => FECompositeElement.internalCreateFECompositeElement,
-  'SVGFEConvolveMatrixElement': () => FEConvolveMatrixElement.internalCreateFEConvolveMatrixElement,
-  'SVGFEDiffuseLightingElement': () => FEDiffuseLightingElement.internalCreateFEDiffuseLightingElement,
-  'SVGFEDisplacementMapElement': () => FEDisplacementMapElement.internalCreateFEDisplacementMapElement,
-  'SVGFEDistantLightElement': () => FEDistantLightElement.internalCreateFEDistantLightElement,
-  'SVGFEDropShadowElement': () => _SVGFEDropShadowElement.internalCreate_SVGFEDropShadowElement,
-  'SVGFEFloodElement': () => FEFloodElement.internalCreateFEFloodElement,
-  'SVGFEFuncAElement': () => FEFuncAElement.internalCreateFEFuncAElement,
-  'SVGFEFuncBElement': () => FEFuncBElement.internalCreateFEFuncBElement,
-  'SVGFEFuncGElement': () => FEFuncGElement.internalCreateFEFuncGElement,
-  'SVGFEFuncRElement': () => FEFuncRElement.internalCreateFEFuncRElement,
-  'SVGFEGaussianBlurElement': () => FEGaussianBlurElement.internalCreateFEGaussianBlurElement,
-  'SVGFEImageElement': () => FEImageElement.internalCreateFEImageElement,
-  'SVGFEMergeElement': () => FEMergeElement.internalCreateFEMergeElement,
-  'SVGFEMergeNodeElement': () => FEMergeNodeElement.internalCreateFEMergeNodeElement,
-  'SVGFEMorphologyElement': () => FEMorphologyElement.internalCreateFEMorphologyElement,
-  'SVGFEOffsetElement': () => FEOffsetElement.internalCreateFEOffsetElement,
-  'SVGFEPointLightElement': () => FEPointLightElement.internalCreateFEPointLightElement,
-  'SVGFESpecularLightingElement': () => FESpecularLightingElement.internalCreateFESpecularLightingElement,
-  'SVGFESpotLightElement': () => FESpotLightElement.internalCreateFESpotLightElement,
-  'SVGFETileElement': () => FETileElement.internalCreateFETileElement,
-  'SVGFETurbulenceElement': () => FETurbulenceElement.internalCreateFETurbulenceElement,
-  'SVGFilterElement': () => FilterElement.internalCreateFilterElement,
-  'SVGFontElement': () => _SVGFontElement.internalCreate_SVGFontElement,
-  'SVGFontFaceElement': () => _SVGFontFaceElement.internalCreate_SVGFontFaceElement,
-  'SVGFontFaceFormatElement': () => _SVGFontFaceFormatElement.internalCreate_SVGFontFaceFormatElement,
-  'SVGFontFaceNameElement': () => _SVGFontFaceNameElement.internalCreate_SVGFontFaceNameElement,
-  'SVGFontFaceSrcElement': () => _SVGFontFaceSrcElement.internalCreate_SVGFontFaceSrcElement,
-  'SVGFontFaceUriElement': () => _SVGFontFaceUriElement.internalCreate_SVGFontFaceUriElement,
-  'SVGForeignObjectElement': () => ForeignObjectElement.internalCreateForeignObjectElement,
-  'SVGGElement': () => GElement.internalCreateGElement,
-  'SVGGeometryElement': () => GeometryElement.internalCreateGeometryElement,
-  'SVGGlyphElement': () => _SVGGlyphElement.internalCreate_SVGGlyphElement,
-  'SVGGlyphRefElement': () => _SVGGlyphRefElement.internalCreate_SVGGlyphRefElement,
-  'SVGGradientElement': () => _GradientElement.internalCreate_GradientElement,
-  'SVGGraphicsElement': () => GraphicsElement.internalCreateGraphicsElement,
-  'SVGHKernElement': () => _SVGHKernElement.internalCreate_SVGHKernElement,
-  'SVGImageElement': () => ImageElement.internalCreateImageElement,
-  'SVGLength': () => Length.internalCreateLength,
-  'SVGLengthList': () => LengthList.internalCreateLengthList,
-  'SVGLineElement': () => LineElement.internalCreateLineElement,
-  'SVGLinearGradientElement': () => LinearGradientElement.internalCreateLinearGradientElement,
-  'SVGMPathElement': () => _SVGMPathElement.internalCreate_SVGMPathElement,
-  'SVGMarkerElement': () => MarkerElement.internalCreateMarkerElement,
-  'SVGMaskElement': () => MaskElement.internalCreateMaskElement,
-  'SVGMatrix': () => Matrix.internalCreateMatrix,
-  'SVGMetadataElement': () => MetadataElement.internalCreateMetadataElement,
-  'SVGMissingGlyphElement': () => _SVGMissingGlyphElement.internalCreate_SVGMissingGlyphElement,
-  'SVGNumber': () => Number.internalCreateNumber,
-  'SVGNumberList': () => NumberList.internalCreateNumberList,
-  'SVGPathElement': () => PathElement.internalCreatePathElement,
-  'SVGPathSeg': () => PathSeg.internalCreatePathSeg,
-  'SVGPathSegArcAbs': () => PathSegArcAbs.internalCreatePathSegArcAbs,
-  'SVGPathSegArcRel': () => PathSegArcRel.internalCreatePathSegArcRel,
-  'SVGPathSegClosePath': () => PathSegClosePath.internalCreatePathSegClosePath,
-  'SVGPathSegCurvetoCubicAbs': () => PathSegCurvetoCubicAbs.internalCreatePathSegCurvetoCubicAbs,
-  'SVGPathSegCurvetoCubicRel': () => PathSegCurvetoCubicRel.internalCreatePathSegCurvetoCubicRel,
-  'SVGPathSegCurvetoCubicSmoothAbs': () => PathSegCurvetoCubicSmoothAbs.internalCreatePathSegCurvetoCubicSmoothAbs,
-  'SVGPathSegCurvetoCubicSmoothRel': () => PathSegCurvetoCubicSmoothRel.internalCreatePathSegCurvetoCubicSmoothRel,
-  'SVGPathSegCurvetoQuadraticAbs': () => PathSegCurvetoQuadraticAbs.internalCreatePathSegCurvetoQuadraticAbs,
-  'SVGPathSegCurvetoQuadraticRel': () => PathSegCurvetoQuadraticRel.internalCreatePathSegCurvetoQuadraticRel,
-  'SVGPathSegCurvetoQuadraticSmoothAbs': () => PathSegCurvetoQuadraticSmoothAbs.internalCreatePathSegCurvetoQuadraticSmoothAbs,
-  'SVGPathSegCurvetoQuadraticSmoothRel': () => PathSegCurvetoQuadraticSmoothRel.internalCreatePathSegCurvetoQuadraticSmoothRel,
-  'SVGPathSegLinetoAbs': () => PathSegLinetoAbs.internalCreatePathSegLinetoAbs,
-  'SVGPathSegLinetoHorizontalAbs': () => PathSegLinetoHorizontalAbs.internalCreatePathSegLinetoHorizontalAbs,
-  'SVGPathSegLinetoHorizontalRel': () => PathSegLinetoHorizontalRel.internalCreatePathSegLinetoHorizontalRel,
-  'SVGPathSegLinetoRel': () => PathSegLinetoRel.internalCreatePathSegLinetoRel,
-  'SVGPathSegLinetoVerticalAbs': () => PathSegLinetoVerticalAbs.internalCreatePathSegLinetoVerticalAbs,
-  'SVGPathSegLinetoVerticalRel': () => PathSegLinetoVerticalRel.internalCreatePathSegLinetoVerticalRel,
-  'SVGPathSegList': () => PathSegList.internalCreatePathSegList,
-  'SVGPathSegMovetoAbs': () => PathSegMovetoAbs.internalCreatePathSegMovetoAbs,
-  'SVGPathSegMovetoRel': () => PathSegMovetoRel.internalCreatePathSegMovetoRel,
-  'SVGPatternElement': () => PatternElement.internalCreatePatternElement,
-  'SVGPoint': () => Point.internalCreatePoint,
-  'SVGPointList': () => PointList.internalCreatePointList,
-  'SVGPolygonElement': () => PolygonElement.internalCreatePolygonElement,
-  'SVGPolylineElement': () => PolylineElement.internalCreatePolylineElement,
-  'SVGPreserveAspectRatio': () => PreserveAspectRatio.internalCreatePreserveAspectRatio,
-  'SVGRadialGradientElement': () => RadialGradientElement.internalCreateRadialGradientElement,
-  'SVGRect': () => Rect.internalCreateRect,
-  'SVGRectElement': () => RectElement.internalCreateRectElement,
-  'SVGRenderingIntent': () => RenderingIntent.internalCreateRenderingIntent,
-  'SVGSVGElement': () => SvgSvgElement.internalCreateSvgSvgElement,
-  'SVGScriptElement': () => ScriptElement.internalCreateScriptElement,
-  'SVGSetElement': () => SetElement.internalCreateSetElement,
-  'SVGStopElement': () => StopElement.internalCreateStopElement,
-  'SVGStringList': () => StringList.internalCreateStringList,
-  'SVGStyleElement': () => StyleElement.internalCreateStyleElement,
-  'SVGSwitchElement': () => SwitchElement.internalCreateSwitchElement,
-  'SVGSymbolElement': () => SymbolElement.internalCreateSymbolElement,
-  'SVGTSpanElement': () => TSpanElement.internalCreateTSpanElement,
-  'SVGTextContentElement': () => TextContentElement.internalCreateTextContentElement,
-  'SVGTextElement': () => TextElement.internalCreateTextElement,
-  'SVGTextPathElement': () => TextPathElement.internalCreateTextPathElement,
-  'SVGTextPositioningElement': () => TextPositioningElement.internalCreateTextPositioningElement,
-  'SVGTitleElement': () => TitleElement.internalCreateTitleElement,
-  'SVGTransform': () => Transform.internalCreateTransform,
-  'SVGTransformList': () => TransformList.internalCreateTransformList,
-  'SVGUnitTypes': () => UnitTypes.internalCreateUnitTypes,
-  'SVGUseElement': () => UseElement.internalCreateUseElement,
-  'SVGVKernElement': () => _SVGVKernElement.internalCreate_SVGVKernElement,
-  'SVGViewElement': () => ViewElement.internalCreateViewElement,
-  'SVGViewSpec': () => ViewSpec.internalCreateViewSpec,
-  'SVGZoomEvent': () => ZoomEvent.internalCreateZoomEvent,
+  'SVGAElement': () => AElement.instanceRuntimeType,
+  'SVGAngle': () => Angle.instanceRuntimeType,
+  'SVGAnimateElement': () => AnimateElement.instanceRuntimeType,
+  'SVGAnimateMotionElement': () => AnimateMotionElement.instanceRuntimeType,
+  'SVGAnimateTransformElement': () => AnimateTransformElement.instanceRuntimeType,
+  'SVGAnimatedAngle': () => AnimatedAngle.instanceRuntimeType,
+  'SVGAnimatedBoolean': () => AnimatedBoolean.instanceRuntimeType,
+  'SVGAnimatedEnumeration': () => AnimatedEnumeration.instanceRuntimeType,
+  'SVGAnimatedInteger': () => AnimatedInteger.instanceRuntimeType,
+  'SVGAnimatedLength': () => AnimatedLength.instanceRuntimeType,
+  'SVGAnimatedLengthList': () => AnimatedLengthList.instanceRuntimeType,
+  'SVGAnimatedNumber': () => AnimatedNumber.instanceRuntimeType,
+  'SVGAnimatedNumberList': () => AnimatedNumberList.instanceRuntimeType,
+  'SVGAnimatedPreserveAspectRatio': () => AnimatedPreserveAspectRatio.instanceRuntimeType,
+  'SVGAnimatedRect': () => AnimatedRect.instanceRuntimeType,
+  'SVGAnimatedString': () => AnimatedString.instanceRuntimeType,
+  'SVGAnimatedTransformList': () => AnimatedTransformList.instanceRuntimeType,
+  'SVGAnimationElement': () => AnimationElement.instanceRuntimeType,
+  'SVGCircleElement': () => CircleElement.instanceRuntimeType,
+  'SVGClipPathElement': () => ClipPathElement.instanceRuntimeType,
+  'SVGComponentTransferFunctionElement': () => _SVGComponentTransferFunctionElement.instanceRuntimeType,
+  'SVGCursorElement': () => _SVGCursorElement.instanceRuntimeType,
+  'SVGDefsElement': () => DefsElement.instanceRuntimeType,
+  'SVGDescElement': () => DescElement.instanceRuntimeType,
+  'SVGDiscardElement': () => DiscardElement.instanceRuntimeType,
+  'SVGElement': () => SvgElement.instanceRuntimeType,
+  'SVGEllipseElement': () => EllipseElement.instanceRuntimeType,
+  'SVGFEBlendElement': () => FEBlendElement.instanceRuntimeType,
+  'SVGFEColorMatrixElement': () => FEColorMatrixElement.instanceRuntimeType,
+  'SVGFEComponentTransferElement': () => FEComponentTransferElement.instanceRuntimeType,
+  'SVGFECompositeElement': () => FECompositeElement.instanceRuntimeType,
+  'SVGFEConvolveMatrixElement': () => FEConvolveMatrixElement.instanceRuntimeType,
+  'SVGFEDiffuseLightingElement': () => FEDiffuseLightingElement.instanceRuntimeType,
+  'SVGFEDisplacementMapElement': () => FEDisplacementMapElement.instanceRuntimeType,
+  'SVGFEDistantLightElement': () => FEDistantLightElement.instanceRuntimeType,
+  'SVGFEDropShadowElement': () => _SVGFEDropShadowElement.instanceRuntimeType,
+  'SVGFEFloodElement': () => FEFloodElement.instanceRuntimeType,
+  'SVGFEFuncAElement': () => FEFuncAElement.instanceRuntimeType,
+  'SVGFEFuncBElement': () => FEFuncBElement.instanceRuntimeType,
+  'SVGFEFuncGElement': () => FEFuncGElement.instanceRuntimeType,
+  'SVGFEFuncRElement': () => FEFuncRElement.instanceRuntimeType,
+  'SVGFEGaussianBlurElement': () => FEGaussianBlurElement.instanceRuntimeType,
+  'SVGFEImageElement': () => FEImageElement.instanceRuntimeType,
+  'SVGFEMergeElement': () => FEMergeElement.instanceRuntimeType,
+  'SVGFEMergeNodeElement': () => FEMergeNodeElement.instanceRuntimeType,
+  'SVGFEMorphologyElement': () => FEMorphologyElement.instanceRuntimeType,
+  'SVGFEOffsetElement': () => FEOffsetElement.instanceRuntimeType,
+  'SVGFEPointLightElement': () => FEPointLightElement.instanceRuntimeType,
+  'SVGFESpecularLightingElement': () => FESpecularLightingElement.instanceRuntimeType,
+  'SVGFESpotLightElement': () => FESpotLightElement.instanceRuntimeType,
+  'SVGFETileElement': () => FETileElement.instanceRuntimeType,
+  'SVGFETurbulenceElement': () => FETurbulenceElement.instanceRuntimeType,
+  'SVGFilterElement': () => FilterElement.instanceRuntimeType,
+  'SVGFilterPrimitiveStandardAttributes': () => FilterPrimitiveStandardAttributes.instanceRuntimeType,
+  'SVGFitToViewBox': () => FitToViewBox.instanceRuntimeType,
+  'SVGForeignObjectElement': () => ForeignObjectElement.instanceRuntimeType,
+  'SVGGElement': () => GElement.instanceRuntimeType,
+  'SVGGeometryElement': () => GeometryElement.instanceRuntimeType,
+  'SVGGradientElement': () => _GradientElement.instanceRuntimeType,
+  'SVGGraphicsElement': () => GraphicsElement.instanceRuntimeType,
+  'SVGImageElement': () => ImageElement.instanceRuntimeType,
+  'SVGLength': () => Length.instanceRuntimeType,
+  'SVGLengthList': () => LengthList.instanceRuntimeType,
+  'SVGLineElement': () => LineElement.instanceRuntimeType,
+  'SVGLinearGradientElement': () => LinearGradientElement.instanceRuntimeType,
+  'SVGMPathElement': () => _SVGMPathElement.instanceRuntimeType,
+  'SVGMarkerElement': () => MarkerElement.instanceRuntimeType,
+  'SVGMaskElement': () => MaskElement.instanceRuntimeType,
+  'SVGMatrix': () => Matrix.instanceRuntimeType,
+  'SVGMetadataElement': () => MetadataElement.instanceRuntimeType,
+  'SVGNumber': () => Number.instanceRuntimeType,
+  'SVGNumberList': () => NumberList.instanceRuntimeType,
+  'SVGPathElement': () => PathElement.instanceRuntimeType,
+  'SVGPathSeg': () => PathSeg.instanceRuntimeType,
+  'SVGPathSegArcAbs': () => PathSegArcAbs.instanceRuntimeType,
+  'SVGPathSegArcRel': () => PathSegArcRel.instanceRuntimeType,
+  'SVGPathSegClosePath': () => PathSegClosePath.instanceRuntimeType,
+  'SVGPathSegCurvetoCubicAbs': () => PathSegCurvetoCubicAbs.instanceRuntimeType,
+  'SVGPathSegCurvetoCubicRel': () => PathSegCurvetoCubicRel.instanceRuntimeType,
+  'SVGPathSegCurvetoCubicSmoothAbs': () => PathSegCurvetoCubicSmoothAbs.instanceRuntimeType,
+  'SVGPathSegCurvetoCubicSmoothRel': () => PathSegCurvetoCubicSmoothRel.instanceRuntimeType,
+  'SVGPathSegCurvetoQuadraticAbs': () => PathSegCurvetoQuadraticAbs.instanceRuntimeType,
+  'SVGPathSegCurvetoQuadraticRel': () => PathSegCurvetoQuadraticRel.instanceRuntimeType,
+  'SVGPathSegCurvetoQuadraticSmoothAbs': () => PathSegCurvetoQuadraticSmoothAbs.instanceRuntimeType,
+  'SVGPathSegCurvetoQuadraticSmoothRel': () => PathSegCurvetoQuadraticSmoothRel.instanceRuntimeType,
+  'SVGPathSegLinetoAbs': () => PathSegLinetoAbs.instanceRuntimeType,
+  'SVGPathSegLinetoHorizontalAbs': () => PathSegLinetoHorizontalAbs.instanceRuntimeType,
+  'SVGPathSegLinetoHorizontalRel': () => PathSegLinetoHorizontalRel.instanceRuntimeType,
+  'SVGPathSegLinetoRel': () => PathSegLinetoRel.instanceRuntimeType,
+  'SVGPathSegLinetoVerticalAbs': () => PathSegLinetoVerticalAbs.instanceRuntimeType,
+  'SVGPathSegLinetoVerticalRel': () => PathSegLinetoVerticalRel.instanceRuntimeType,
+  'SVGPathSegList': () => PathSegList.instanceRuntimeType,
+  'SVGPathSegMovetoAbs': () => PathSegMovetoAbs.instanceRuntimeType,
+  'SVGPathSegMovetoRel': () => PathSegMovetoRel.instanceRuntimeType,
+  'SVGPatternElement': () => PatternElement.instanceRuntimeType,
+  'SVGPoint': () => Point.instanceRuntimeType,
+  'SVGPointList': () => PointList.instanceRuntimeType,
+  'SVGPolygonElement': () => PolygonElement.instanceRuntimeType,
+  'SVGPolylineElement': () => PolylineElement.instanceRuntimeType,
+  'SVGPreserveAspectRatio': () => PreserveAspectRatio.instanceRuntimeType,
+  'SVGRadialGradientElement': () => RadialGradientElement.instanceRuntimeType,
+  'SVGRect': () => Rect.instanceRuntimeType,
+  'SVGRectElement': () => RectElement.instanceRuntimeType,
+  'SVGSVGElement': () => SvgSvgElement.instanceRuntimeType,
+  'SVGScriptElement': () => ScriptElement.instanceRuntimeType,
+  'SVGSetElement': () => SetElement.instanceRuntimeType,
+  'SVGStopElement': () => StopElement.instanceRuntimeType,
+  'SVGStringList': () => StringList.instanceRuntimeType,
+  'SVGStyleElement': () => StyleElement.instanceRuntimeType,
+  'SVGSwitchElement': () => SwitchElement.instanceRuntimeType,
+  'SVGSymbolElement': () => SymbolElement.instanceRuntimeType,
+  'SVGTSpanElement': () => TSpanElement.instanceRuntimeType,
+  'SVGTests': () => Tests.instanceRuntimeType,
+  'SVGTextContentElement': () => TextContentElement.instanceRuntimeType,
+  'SVGTextElement': () => TextElement.instanceRuntimeType,
+  'SVGTextPathElement': () => TextPathElement.instanceRuntimeType,
+  'SVGTextPositioningElement': () => TextPositioningElement.instanceRuntimeType,
+  'SVGTitleElement': () => TitleElement.instanceRuntimeType,
+  'SVGTransform': () => Transform.instanceRuntimeType,
+  'SVGTransformList': () => TransformList.instanceRuntimeType,
+  'SVGURIReference': () => UriReference.instanceRuntimeType,
+  'SVGUnitTypes': () => UnitTypes.instanceRuntimeType,
+  'SVGUseElement': () => UseElement.instanceRuntimeType,
+  'SVGViewElement': () => ViewElement.instanceRuntimeType,
+  'SVGViewSpec': () => ViewSpec.instanceRuntimeType,
+  'SVGZoomAndPan': () => ZoomAndPan.instanceRuntimeType,
+  'SVGZoomEvent': () => ZoomEvent.instanceRuntimeType,
 
 };
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -345,11 +187,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AElement internalCreateAElement() {
-    return new AElement._internalWrap();
-  }
-
-  external factory AElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AElement.internal_() : super.internal_();
@@ -363,74 +201,11 @@
 
   @DomName('SVGAElement.target')
   @DocsEditable()
-  AnimatedString get target => wrap_jso(_blink.BlinkSVGAElement.instance.target_Getter_(unwrap_jso(this)));
+  AnimatedString get target => _blink.BlinkSVGAElement.instance.target_Getter_(this);
   
   @DomName('SVGAElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGAElement.instance.href_Getter_(unwrap_jso(this)));
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGAltGlyphElement')
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.FIREFOX)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Unstable()
-class AltGlyphElement extends TextPositioningElement implements UriReference {
-  // To suppress missing implicit constructor warnings.
-  factory AltGlyphElement._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGAltGlyphElement.SVGAltGlyphElement')
-  @DocsEditable()
-  factory AltGlyphElement() => _SvgElementFactoryProvider.createSvgElement_tag("altGlyph");
-
-
-  @Deprecated("Internal Use Only")
-  static AltGlyphElement internalCreateAltGlyphElement() {
-    return new AltGlyphElement._internalWrap();
-  }
-
-  external factory AltGlyphElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  AltGlyphElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  AltGlyphElement.created() : super.created();
-
-  /// Checks if this type is supported on the current platform.
-  static bool get supported => true;
-
-  @DomName('SVGAltGlyphElement.format')
-  @DocsEditable()
-  String get format => _blink.BlinkSVGAltGlyphElement.instance.format_Getter_(unwrap_jso(this));
-  
-  @DomName('SVGAltGlyphElement.format')
-  @DocsEditable()
-  set format(String value) => _blink.BlinkSVGAltGlyphElement.instance.format_Setter_(unwrap_jso(this), value);
-  
-  @DomName('SVGAltGlyphElement.glyphRef')
-  @DocsEditable()
-  String get glyphRef => _blink.BlinkSVGAltGlyphElement.instance.glyphRef_Getter_(unwrap_jso(this));
-  
-  @DomName('SVGAltGlyphElement.glyphRef')
-  @DocsEditable()
-  set glyphRef(String value) => _blink.BlinkSVGAltGlyphElement.instance.glyphRef_Setter_(unwrap_jso(this), value);
-  
-  @DomName('SVGAltGlyphElement.href')
-  @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGAltGlyphElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGAElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -447,21 +222,13 @@
   // To suppress missing implicit constructor warnings.
   factory Angle._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Angle internalCreateAngle() {
-    return new Angle._internalWrap();
-  }
 
-  factory Angle._internalWrap() {
-    return new Angle.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Angle.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAngle.SVG_ANGLETYPE_DEG')
   @DocsEditable()
   static const int SVG_ANGLETYPE_DEG = 2;
@@ -484,39 +251,39 @@
 
   @DomName('SVGAngle.unitType')
   @DocsEditable()
-  int get unitType => _blink.BlinkSVGAngle.instance.unitType_Getter_(unwrap_jso(this));
+  int get unitType => _blink.BlinkSVGAngle.instance.unitType_Getter_(this);
   
   @DomName('SVGAngle.value')
   @DocsEditable()
-  num get value => _blink.BlinkSVGAngle.instance.value_Getter_(unwrap_jso(this));
+  num get value => _blink.BlinkSVGAngle.instance.value_Getter_(this);
   
   @DomName('SVGAngle.value')
   @DocsEditable()
-  set value(num value) => _blink.BlinkSVGAngle.instance.value_Setter_(unwrap_jso(this), value);
+  set value(num value) => _blink.BlinkSVGAngle.instance.value_Setter_(this, value);
   
   @DomName('SVGAngle.valueAsString')
   @DocsEditable()
-  String get valueAsString => _blink.BlinkSVGAngle.instance.valueAsString_Getter_(unwrap_jso(this));
+  String get valueAsString => _blink.BlinkSVGAngle.instance.valueAsString_Getter_(this);
   
   @DomName('SVGAngle.valueAsString')
   @DocsEditable()
-  set valueAsString(String value) => _blink.BlinkSVGAngle.instance.valueAsString_Setter_(unwrap_jso(this), value);
+  set valueAsString(String value) => _blink.BlinkSVGAngle.instance.valueAsString_Setter_(this, value);
   
   @DomName('SVGAngle.valueInSpecifiedUnits')
   @DocsEditable()
-  num get valueInSpecifiedUnits => _blink.BlinkSVGAngle.instance.valueInSpecifiedUnits_Getter_(unwrap_jso(this));
+  num get valueInSpecifiedUnits => _blink.BlinkSVGAngle.instance.valueInSpecifiedUnits_Getter_(this);
   
   @DomName('SVGAngle.valueInSpecifiedUnits')
   @DocsEditable()
-  set valueInSpecifiedUnits(num value) => _blink.BlinkSVGAngle.instance.valueInSpecifiedUnits_Setter_(unwrap_jso(this), value);
+  set valueInSpecifiedUnits(num value) => _blink.BlinkSVGAngle.instance.valueInSpecifiedUnits_Setter_(this, value);
   
   @DomName('SVGAngle.convertToSpecifiedUnits')
   @DocsEditable()
-  void convertToSpecifiedUnits(int unitType) => _blink.BlinkSVGAngle.instance.convertToSpecifiedUnits_Callback_1_(unwrap_jso(this), unitType);
+  void convertToSpecifiedUnits(int unitType) => _blink.BlinkSVGAngle.instance.convertToSpecifiedUnits_Callback_1_(this, unitType);
   
   @DomName('SVGAngle.newValueSpecifiedUnits')
   @DocsEditable()
-  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) => _blink.BlinkSVGAngle.instance.newValueSpecifiedUnits_Callback_2_(unwrap_jso(this), unitType, valueInSpecifiedUnits);
+  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) => _blink.BlinkSVGAngle.instance.newValueSpecifiedUnits_Callback_2_(this, unitType, valueInSpecifiedUnits);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -542,11 +309,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AnimateElement internalCreateAnimateElement() {
-    return new AnimateElement._internalWrap();
-  }
-
-  external factory AnimateElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimateElement.internal_() : super.internal_();
@@ -585,11 +348,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AnimateMotionElement internalCreateAnimateMotionElement() {
-    return new AnimateMotionElement._internalWrap();
-  }
-
-  external factory AnimateMotionElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimateMotionElement.internal_() : super.internal_();
@@ -628,11 +387,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AnimateTransformElement internalCreateAnimateTransformElement() {
-    return new AnimateTransformElement._internalWrap();
-  }
-
-  external factory AnimateTransformElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimateTransformElement.internal_() : super.internal_();
@@ -662,28 +417,20 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedAngle._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedAngle internalCreateAnimatedAngle() {
-    return new AnimatedAngle._internalWrap();
-  }
 
-  factory AnimatedAngle._internalWrap() {
-    return new AnimatedAngle.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedAngle.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedAngle.animVal')
   @DocsEditable()
-  Angle get animVal => wrap_jso(_blink.BlinkSVGAnimatedAngle.instance.animVal_Getter_(unwrap_jso(this)));
+  Angle get animVal => _blink.BlinkSVGAnimatedAngle.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedAngle.baseVal')
   @DocsEditable()
-  Angle get baseVal => wrap_jso(_blink.BlinkSVGAnimatedAngle.instance.baseVal_Getter_(unwrap_jso(this)));
+  Angle get baseVal => _blink.BlinkSVGAnimatedAngle.instance.baseVal_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -700,32 +447,24 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedBoolean._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedBoolean internalCreateAnimatedBoolean() {
-    return new AnimatedBoolean._internalWrap();
-  }
 
-  factory AnimatedBoolean._internalWrap() {
-    return new AnimatedBoolean.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedBoolean.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedBoolean.animVal')
   @DocsEditable()
-  bool get animVal => _blink.BlinkSVGAnimatedBoolean.instance.animVal_Getter_(unwrap_jso(this));
+  bool get animVal => _blink.BlinkSVGAnimatedBoolean.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedBoolean.baseVal')
   @DocsEditable()
-  bool get baseVal => _blink.BlinkSVGAnimatedBoolean.instance.baseVal_Getter_(unwrap_jso(this));
+  bool get baseVal => _blink.BlinkSVGAnimatedBoolean.instance.baseVal_Getter_(this);
   
   @DomName('SVGAnimatedBoolean.baseVal')
   @DocsEditable()
-  set baseVal(bool value) => _blink.BlinkSVGAnimatedBoolean.instance.baseVal_Setter_(unwrap_jso(this), value);
+  set baseVal(bool value) => _blink.BlinkSVGAnimatedBoolean.instance.baseVal_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -742,32 +481,24 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedEnumeration._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedEnumeration internalCreateAnimatedEnumeration() {
-    return new AnimatedEnumeration._internalWrap();
-  }
 
-  factory AnimatedEnumeration._internalWrap() {
-    return new AnimatedEnumeration.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedEnumeration.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedEnumeration.animVal')
   @DocsEditable()
-  int get animVal => _blink.BlinkSVGAnimatedEnumeration.instance.animVal_Getter_(unwrap_jso(this));
+  int get animVal => _blink.BlinkSVGAnimatedEnumeration.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedEnumeration.baseVal')
   @DocsEditable()
-  int get baseVal => _blink.BlinkSVGAnimatedEnumeration.instance.baseVal_Getter_(unwrap_jso(this));
+  int get baseVal => _blink.BlinkSVGAnimatedEnumeration.instance.baseVal_Getter_(this);
   
   @DomName('SVGAnimatedEnumeration.baseVal')
   @DocsEditable()
-  set baseVal(int value) => _blink.BlinkSVGAnimatedEnumeration.instance.baseVal_Setter_(unwrap_jso(this), value);
+  set baseVal(int value) => _blink.BlinkSVGAnimatedEnumeration.instance.baseVal_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -784,32 +515,24 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedInteger._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedInteger internalCreateAnimatedInteger() {
-    return new AnimatedInteger._internalWrap();
-  }
 
-  factory AnimatedInteger._internalWrap() {
-    return new AnimatedInteger.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedInteger.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedInteger.animVal')
   @DocsEditable()
-  int get animVal => _blink.BlinkSVGAnimatedInteger.instance.animVal_Getter_(unwrap_jso(this));
+  int get animVal => _blink.BlinkSVGAnimatedInteger.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedInteger.baseVal')
   @DocsEditable()
-  int get baseVal => _blink.BlinkSVGAnimatedInteger.instance.baseVal_Getter_(unwrap_jso(this));
+  int get baseVal => _blink.BlinkSVGAnimatedInteger.instance.baseVal_Getter_(this);
   
   @DomName('SVGAnimatedInteger.baseVal')
   @DocsEditable()
-  set baseVal(int value) => _blink.BlinkSVGAnimatedInteger.instance.baseVal_Setter_(unwrap_jso(this), value);
+  set baseVal(int value) => _blink.BlinkSVGAnimatedInteger.instance.baseVal_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -826,28 +549,20 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedLength._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedLength internalCreateAnimatedLength() {
-    return new AnimatedLength._internalWrap();
-  }
 
-  factory AnimatedLength._internalWrap() {
-    return new AnimatedLength.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedLength.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedLength.animVal')
   @DocsEditable()
-  Length get animVal => wrap_jso(_blink.BlinkSVGAnimatedLength.instance.animVal_Getter_(unwrap_jso(this)));
+  Length get animVal => _blink.BlinkSVGAnimatedLength.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedLength.baseVal')
   @DocsEditable()
-  Length get baseVal => wrap_jso(_blink.BlinkSVGAnimatedLength.instance.baseVal_Getter_(unwrap_jso(this)));
+  Length get baseVal => _blink.BlinkSVGAnimatedLength.instance.baseVal_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -864,28 +579,20 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedLengthList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedLengthList internalCreateAnimatedLengthList() {
-    return new AnimatedLengthList._internalWrap();
-  }
 
-  factory AnimatedLengthList._internalWrap() {
-    return new AnimatedLengthList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedLengthList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedLengthList.animVal')
   @DocsEditable()
-  LengthList get animVal => wrap_jso(_blink.BlinkSVGAnimatedLengthList.instance.animVal_Getter_(unwrap_jso(this)));
+  LengthList get animVal => _blink.BlinkSVGAnimatedLengthList.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedLengthList.baseVal')
   @DocsEditable()
-  LengthList get baseVal => wrap_jso(_blink.BlinkSVGAnimatedLengthList.instance.baseVal_Getter_(unwrap_jso(this)));
+  LengthList get baseVal => _blink.BlinkSVGAnimatedLengthList.instance.baseVal_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -902,32 +609,24 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedNumber._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedNumber internalCreateAnimatedNumber() {
-    return new AnimatedNumber._internalWrap();
-  }
 
-  factory AnimatedNumber._internalWrap() {
-    return new AnimatedNumber.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedNumber.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedNumber.animVal')
   @DocsEditable()
-  num get animVal => _blink.BlinkSVGAnimatedNumber.instance.animVal_Getter_(unwrap_jso(this));
+  num get animVal => _blink.BlinkSVGAnimatedNumber.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedNumber.baseVal')
   @DocsEditable()
-  num get baseVal => _blink.BlinkSVGAnimatedNumber.instance.baseVal_Getter_(unwrap_jso(this));
+  num get baseVal => _blink.BlinkSVGAnimatedNumber.instance.baseVal_Getter_(this);
   
   @DomName('SVGAnimatedNumber.baseVal')
   @DocsEditable()
-  set baseVal(num value) => _blink.BlinkSVGAnimatedNumber.instance.baseVal_Setter_(unwrap_jso(this), value);
+  set baseVal(num value) => _blink.BlinkSVGAnimatedNumber.instance.baseVal_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -944,28 +643,20 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedNumberList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedNumberList internalCreateAnimatedNumberList() {
-    return new AnimatedNumberList._internalWrap();
-  }
 
-  factory AnimatedNumberList._internalWrap() {
-    return new AnimatedNumberList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedNumberList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedNumberList.animVal')
   @DocsEditable()
-  NumberList get animVal => wrap_jso(_blink.BlinkSVGAnimatedNumberList.instance.animVal_Getter_(unwrap_jso(this)));
+  NumberList get animVal => _blink.BlinkSVGAnimatedNumberList.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedNumberList.baseVal')
   @DocsEditable()
-  NumberList get baseVal => wrap_jso(_blink.BlinkSVGAnimatedNumberList.instance.baseVal_Getter_(unwrap_jso(this)));
+  NumberList get baseVal => _blink.BlinkSVGAnimatedNumberList.instance.baseVal_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -982,28 +673,20 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedPreserveAspectRatio._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedPreserveAspectRatio internalCreateAnimatedPreserveAspectRatio() {
-    return new AnimatedPreserveAspectRatio._internalWrap();
-  }
 
-  factory AnimatedPreserveAspectRatio._internalWrap() {
-    return new AnimatedPreserveAspectRatio.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedPreserveAspectRatio.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedPreserveAspectRatio.animVal')
   @DocsEditable()
-  PreserveAspectRatio get animVal => wrap_jso(_blink.BlinkSVGAnimatedPreserveAspectRatio.instance.animVal_Getter_(unwrap_jso(this)));
+  PreserveAspectRatio get animVal => _blink.BlinkSVGAnimatedPreserveAspectRatio.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedPreserveAspectRatio.baseVal')
   @DocsEditable()
-  PreserveAspectRatio get baseVal => wrap_jso(_blink.BlinkSVGAnimatedPreserveAspectRatio.instance.baseVal_Getter_(unwrap_jso(this)));
+  PreserveAspectRatio get baseVal => _blink.BlinkSVGAnimatedPreserveAspectRatio.instance.baseVal_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1020,28 +703,20 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedRect._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedRect internalCreateAnimatedRect() {
-    return new AnimatedRect._internalWrap();
-  }
 
-  factory AnimatedRect._internalWrap() {
-    return new AnimatedRect.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedRect.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedRect.animVal')
   @DocsEditable()
-  Rect get animVal => wrap_jso(_blink.BlinkSVGAnimatedRect.instance.animVal_Getter_(unwrap_jso(this)));
+  Rect get animVal => _blink.BlinkSVGAnimatedRect.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedRect.baseVal')
   @DocsEditable()
-  Rect get baseVal => wrap_jso(_blink.BlinkSVGAnimatedRect.instance.baseVal_Getter_(unwrap_jso(this)));
+  Rect get baseVal => _blink.BlinkSVGAnimatedRect.instance.baseVal_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1058,32 +733,24 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedString._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedString internalCreateAnimatedString() {
-    return new AnimatedString._internalWrap();
-  }
 
-  factory AnimatedString._internalWrap() {
-    return new AnimatedString.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedString.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedString.animVal')
   @DocsEditable()
-  String get animVal => _blink.BlinkSVGAnimatedString.instance.animVal_Getter_(unwrap_jso(this));
+  String get animVal => _blink.BlinkSVGAnimatedString.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedString.baseVal')
   @DocsEditable()
-  String get baseVal => _blink.BlinkSVGAnimatedString.instance.baseVal_Getter_(unwrap_jso(this));
+  String get baseVal => _blink.BlinkSVGAnimatedString.instance.baseVal_Getter_(this);
   
   @DomName('SVGAnimatedString.baseVal')
   @DocsEditable()
-  set baseVal(String value) => _blink.BlinkSVGAnimatedString.instance.baseVal_Setter_(unwrap_jso(this), value);
+  set baseVal(String value) => _blink.BlinkSVGAnimatedString.instance.baseVal_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1100,28 +767,20 @@
   // To suppress missing implicit constructor warnings.
   factory AnimatedTransformList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AnimatedTransformList internalCreateAnimatedTransformList() {
-    return new AnimatedTransformList._internalWrap();
-  }
 
-  factory AnimatedTransformList._internalWrap() {
-    return new AnimatedTransformList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimatedTransformList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGAnimatedTransformList.animVal')
   @DocsEditable()
-  TransformList get animVal => wrap_jso(_blink.BlinkSVGAnimatedTransformList.instance.animVal_Getter_(unwrap_jso(this)));
+  TransformList get animVal => _blink.BlinkSVGAnimatedTransformList.instance.animVal_Getter_(this);
   
   @DomName('SVGAnimatedTransformList.baseVal')
   @DocsEditable()
-  TransformList get baseVal => wrap_jso(_blink.BlinkSVGAnimatedTransformList.instance.baseVal_Getter_(unwrap_jso(this)));
+  TransformList get baseVal => _blink.BlinkSVGAnimatedTransformList.instance.baseVal_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1144,11 +803,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AnimationElement internalCreateAnimationElement() {
-    return new AnimationElement._internalWrap();
-  }
-
-  external factory AnimationElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnimationElement.internal_() : super.internal_();
@@ -1162,51 +817,51 @@
 
   @DomName('SVGAnimationElement.targetElement')
   @DocsEditable()
-  SvgElement get targetElement => wrap_jso(_blink.BlinkSVGAnimationElement.instance.targetElement_Getter_(unwrap_jso(this)));
+  SvgElement get targetElement => _blink.BlinkSVGAnimationElement.instance.targetElement_Getter_(this);
   
   @DomName('SVGAnimationElement.beginElement')
   @DocsEditable()
-  void beginElement() => _blink.BlinkSVGAnimationElement.instance.beginElement_Callback_0_(unwrap_jso(this));
+  void beginElement() => _blink.BlinkSVGAnimationElement.instance.beginElement_Callback_0_(this);
   
   @DomName('SVGAnimationElement.beginElementAt')
   @DocsEditable()
-  void beginElementAt(num offset) => _blink.BlinkSVGAnimationElement.instance.beginElementAt_Callback_1_(unwrap_jso(this), offset);
+  void beginElementAt(num offset) => _blink.BlinkSVGAnimationElement.instance.beginElementAt_Callback_1_(this, offset);
   
   @DomName('SVGAnimationElement.endElement')
   @DocsEditable()
-  void endElement() => _blink.BlinkSVGAnimationElement.instance.endElement_Callback_0_(unwrap_jso(this));
+  void endElement() => _blink.BlinkSVGAnimationElement.instance.endElement_Callback_0_(this);
   
   @DomName('SVGAnimationElement.endElementAt')
   @DocsEditable()
-  void endElementAt(num offset) => _blink.BlinkSVGAnimationElement.instance.endElementAt_Callback_1_(unwrap_jso(this), offset);
+  void endElementAt(num offset) => _blink.BlinkSVGAnimationElement.instance.endElementAt_Callback_1_(this, offset);
   
   @DomName('SVGAnimationElement.getCurrentTime')
   @DocsEditable()
-  num getCurrentTime() => _blink.BlinkSVGAnimationElement.instance.getCurrentTime_Callback_0_(unwrap_jso(this));
+  num getCurrentTime() => _blink.BlinkSVGAnimationElement.instance.getCurrentTime_Callback_0_(this);
   
   @DomName('SVGAnimationElement.getSimpleDuration')
   @DocsEditable()
-  num getSimpleDuration() => _blink.BlinkSVGAnimationElement.instance.getSimpleDuration_Callback_0_(unwrap_jso(this));
+  num getSimpleDuration() => _blink.BlinkSVGAnimationElement.instance.getSimpleDuration_Callback_0_(this);
   
   @DomName('SVGAnimationElement.getStartTime')
   @DocsEditable()
-  num getStartTime() => _blink.BlinkSVGAnimationElement.instance.getStartTime_Callback_0_(unwrap_jso(this));
+  num getStartTime() => _blink.BlinkSVGAnimationElement.instance.getStartTime_Callback_0_(this);
   
   @DomName('SVGAnimationElement.requiredExtensions')
   @DocsEditable()
-  StringList get requiredExtensions => wrap_jso(_blink.BlinkSVGAnimationElement.instance.requiredExtensions_Getter_(unwrap_jso(this)));
+  StringList get requiredExtensions => _blink.BlinkSVGAnimationElement.instance.requiredExtensions_Getter_(this);
   
   @DomName('SVGAnimationElement.requiredFeatures')
   @DocsEditable()
-  StringList get requiredFeatures => wrap_jso(_blink.BlinkSVGAnimationElement.instance.requiredFeatures_Getter_(unwrap_jso(this)));
+  StringList get requiredFeatures => _blink.BlinkSVGAnimationElement.instance.requiredFeatures_Getter_(this);
   
   @DomName('SVGAnimationElement.systemLanguage')
   @DocsEditable()
-  StringList get systemLanguage => wrap_jso(_blink.BlinkSVGAnimationElement.instance.systemLanguage_Getter_(unwrap_jso(this)));
+  StringList get systemLanguage => _blink.BlinkSVGAnimationElement.instance.systemLanguage_Getter_(this);
   
   @DomName('SVGAnimationElement.hasExtension')
   @DocsEditable()
-  bool hasExtension(String extension) => _blink.BlinkSVGAnimationElement.instance.hasExtension_Callback_1_(unwrap_jso(this), extension);
+  bool hasExtension(String extension) => _blink.BlinkSVGAnimationElement.instance.hasExtension_Callback_1_(this, extension);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1229,11 +884,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static CircleElement internalCreateCircleElement() {
-    return new CircleElement._internalWrap();
-  }
-
-  external factory CircleElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CircleElement.internal_() : super.internal_();
@@ -1247,15 +898,15 @@
 
   @DomName('SVGCircleElement.cx')
   @DocsEditable()
-  AnimatedLength get cx => wrap_jso(_blink.BlinkSVGCircleElement.instance.cx_Getter_(unwrap_jso(this)));
+  AnimatedLength get cx => _blink.BlinkSVGCircleElement.instance.cx_Getter_(this);
   
   @DomName('SVGCircleElement.cy')
   @DocsEditable()
-  AnimatedLength get cy => wrap_jso(_blink.BlinkSVGCircleElement.instance.cy_Getter_(unwrap_jso(this)));
+  AnimatedLength get cy => _blink.BlinkSVGCircleElement.instance.cy_Getter_(this);
   
   @DomName('SVGCircleElement.r')
   @DocsEditable()
-  AnimatedLength get r => wrap_jso(_blink.BlinkSVGCircleElement.instance.r_Getter_(unwrap_jso(this)));
+  AnimatedLength get r => _blink.BlinkSVGCircleElement.instance.r_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1278,11 +929,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ClipPathElement internalCreateClipPathElement() {
-    return new ClipPathElement._internalWrap();
-  }
-
-  external factory ClipPathElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ClipPathElement.internal_() : super.internal_();
@@ -1296,7 +943,7 @@
 
   @DomName('SVGClipPathElement.clipPathUnits')
   @DocsEditable()
-  AnimatedEnumeration get clipPathUnits => wrap_jso(_blink.BlinkSVGClipPathElement.instance.clipPathUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get clipPathUnits => _blink.BlinkSVGClipPathElement.instance.clipPathUnits_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1319,11 +966,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DefsElement internalCreateDefsElement() {
-    return new DefsElement._internalWrap();
-  }
-
-  external factory DefsElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DefsElement.internal_() : super.internal_();
@@ -1356,11 +999,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DescElement internalCreateDescElement() {
-    return new DescElement._internalWrap();
-  }
-
-  external factory DescElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DescElement.internal_() : super.internal_();
@@ -1389,11 +1028,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DiscardElement internalCreateDiscardElement() {
-    return new DiscardElement._internalWrap();
-  }
-
-  external factory DiscardElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DiscardElement.internal_() : super.internal_();
@@ -1426,11 +1061,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static EllipseElement internalCreateEllipseElement() {
-    return new EllipseElement._internalWrap();
-  }
-
-  external factory EllipseElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   EllipseElement.internal_() : super.internal_();
@@ -1444,19 +1075,19 @@
 
   @DomName('SVGEllipseElement.cx')
   @DocsEditable()
-  AnimatedLength get cx => wrap_jso(_blink.BlinkSVGEllipseElement.instance.cx_Getter_(unwrap_jso(this)));
+  AnimatedLength get cx => _blink.BlinkSVGEllipseElement.instance.cx_Getter_(this);
   
   @DomName('SVGEllipseElement.cy')
   @DocsEditable()
-  AnimatedLength get cy => wrap_jso(_blink.BlinkSVGEllipseElement.instance.cy_Getter_(unwrap_jso(this)));
+  AnimatedLength get cy => _blink.BlinkSVGEllipseElement.instance.cy_Getter_(this);
   
   @DomName('SVGEllipseElement.rx')
   @DocsEditable()
-  AnimatedLength get rx => wrap_jso(_blink.BlinkSVGEllipseElement.instance.rx_Getter_(unwrap_jso(this)));
+  AnimatedLength get rx => _blink.BlinkSVGEllipseElement.instance.rx_Getter_(this);
   
   @DomName('SVGEllipseElement.ry')
   @DocsEditable()
-  AnimatedLength get ry => wrap_jso(_blink.BlinkSVGEllipseElement.instance.ry_Getter_(unwrap_jso(this)));
+  AnimatedLength get ry => _blink.BlinkSVGEllipseElement.instance.ry_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1483,11 +1114,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEBlendElement internalCreateFEBlendElement() {
-    return new FEBlendElement._internalWrap();
-  }
-
-  external factory FEBlendElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEBlendElement.internal_() : super.internal_();
@@ -1528,35 +1155,35 @@
 
   @DomName('SVGFEBlendElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEBlendElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEBlendElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEBlendElement.in2')
   @DocsEditable()
-  AnimatedString get in2 => wrap_jso(_blink.BlinkSVGFEBlendElement.instance.in2_Getter_(unwrap_jso(this)));
+  AnimatedString get in2 => _blink.BlinkSVGFEBlendElement.instance.in2_Getter_(this);
   
   @DomName('SVGFEBlendElement.mode')
   @DocsEditable()
-  AnimatedEnumeration get mode => wrap_jso(_blink.BlinkSVGFEBlendElement.instance.mode_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get mode => _blink.BlinkSVGFEBlendElement.instance.mode_Getter_(this);
   
   @DomName('SVGFEBlendElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEBlendElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEBlendElement.instance.height_Getter_(this);
   
   @DomName('SVGFEBlendElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEBlendElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEBlendElement.instance.result_Getter_(this);
   
   @DomName('SVGFEBlendElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEBlendElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEBlendElement.instance.width_Getter_(this);
   
   @DomName('SVGFEBlendElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEBlendElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEBlendElement.instance.x_Getter_(this);
   
   @DomName('SVGFEBlendElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEBlendElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEBlendElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1583,11 +1210,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEColorMatrixElement internalCreateFEColorMatrixElement() {
-    return new FEColorMatrixElement._internalWrap();
-  }
-
-  external factory FEColorMatrixElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEColorMatrixElement.internal_() : super.internal_();
@@ -1624,35 +1247,35 @@
 
   @DomName('SVGFEColorMatrixElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEColorMatrixElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEColorMatrixElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEColorMatrixElement.type')
   @DocsEditable()
-  AnimatedEnumeration get type => wrap_jso(_blink.BlinkSVGFEColorMatrixElement.instance.type_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get type => _blink.BlinkSVGFEColorMatrixElement.instance.type_Getter_(this);
   
   @DomName('SVGFEColorMatrixElement.values')
   @DocsEditable()
-  AnimatedNumberList get values => wrap_jso(_blink.BlinkSVGFEColorMatrixElement.instance.values_Getter_(unwrap_jso(this)));
+  AnimatedNumberList get values => _blink.BlinkSVGFEColorMatrixElement.instance.values_Getter_(this);
   
   @DomName('SVGFEColorMatrixElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEColorMatrixElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEColorMatrixElement.instance.height_Getter_(this);
   
   @DomName('SVGFEColorMatrixElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEColorMatrixElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEColorMatrixElement.instance.result_Getter_(this);
   
   @DomName('SVGFEColorMatrixElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEColorMatrixElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEColorMatrixElement.instance.width_Getter_(this);
   
   @DomName('SVGFEColorMatrixElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEColorMatrixElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEColorMatrixElement.instance.x_Getter_(this);
   
   @DomName('SVGFEColorMatrixElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEColorMatrixElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEColorMatrixElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1679,11 +1302,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEComponentTransferElement internalCreateFEComponentTransferElement() {
-    return new FEComponentTransferElement._internalWrap();
-  }
-
-  external factory FEComponentTransferElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEComponentTransferElement.internal_() : super.internal_();
@@ -1700,27 +1319,27 @@
 
   @DomName('SVGFEComponentTransferElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEComponentTransferElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEComponentTransferElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEComponentTransferElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEComponentTransferElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEComponentTransferElement.instance.height_Getter_(this);
   
   @DomName('SVGFEComponentTransferElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEComponentTransferElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEComponentTransferElement.instance.result_Getter_(this);
   
   @DomName('SVGFEComponentTransferElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEComponentTransferElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEComponentTransferElement.instance.width_Getter_(this);
   
   @DomName('SVGFEComponentTransferElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEComponentTransferElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEComponentTransferElement.instance.x_Getter_(this);
   
   @DomName('SVGFEComponentTransferElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEComponentTransferElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEComponentTransferElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1739,11 +1358,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FECompositeElement internalCreateFECompositeElement() {
-    return new FECompositeElement._internalWrap();
-  }
-
-  external factory FECompositeElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FECompositeElement.internal_() : super.internal_();
@@ -1785,51 +1400,51 @@
 
   @DomName('SVGFECompositeElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFECompositeElement.instance.in1_Getter_(this);
   
   @DomName('SVGFECompositeElement.in2')
   @DocsEditable()
-  AnimatedString get in2 => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.in2_Getter_(unwrap_jso(this)));
+  AnimatedString get in2 => _blink.BlinkSVGFECompositeElement.instance.in2_Getter_(this);
   
   @DomName('SVGFECompositeElement.k1')
   @DocsEditable()
-  AnimatedNumber get k1 => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.k1_Getter_(unwrap_jso(this)));
+  AnimatedNumber get k1 => _blink.BlinkSVGFECompositeElement.instance.k1_Getter_(this);
   
   @DomName('SVGFECompositeElement.k2')
   @DocsEditable()
-  AnimatedNumber get k2 => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.k2_Getter_(unwrap_jso(this)));
+  AnimatedNumber get k2 => _blink.BlinkSVGFECompositeElement.instance.k2_Getter_(this);
   
   @DomName('SVGFECompositeElement.k3')
   @DocsEditable()
-  AnimatedNumber get k3 => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.k3_Getter_(unwrap_jso(this)));
+  AnimatedNumber get k3 => _blink.BlinkSVGFECompositeElement.instance.k3_Getter_(this);
   
   @DomName('SVGFECompositeElement.k4')
   @DocsEditable()
-  AnimatedNumber get k4 => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.k4_Getter_(unwrap_jso(this)));
+  AnimatedNumber get k4 => _blink.BlinkSVGFECompositeElement.instance.k4_Getter_(this);
   
   @DomName('SVGFECompositeElement.operator')
   @DocsEditable()
-  AnimatedEnumeration get operator => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.operator_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get operator => _blink.BlinkSVGFECompositeElement.instance.operator_Getter_(this);
   
   @DomName('SVGFECompositeElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFECompositeElement.instance.height_Getter_(this);
   
   @DomName('SVGFECompositeElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFECompositeElement.instance.result_Getter_(this);
   
   @DomName('SVGFECompositeElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFECompositeElement.instance.width_Getter_(this);
   
   @DomName('SVGFECompositeElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFECompositeElement.instance.x_Getter_(this);
   
   @DomName('SVGFECompositeElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFECompositeElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFECompositeElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1856,11 +1471,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEConvolveMatrixElement internalCreateFEConvolveMatrixElement() {
-    return new FEConvolveMatrixElement._internalWrap();
-  }
-
-  external factory FEConvolveMatrixElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEConvolveMatrixElement.internal_() : super.internal_();
@@ -1893,71 +1504,71 @@
 
   @DomName('SVGFEConvolveMatrixElement.bias')
   @DocsEditable()
-  AnimatedNumber get bias => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.bias_Getter_(unwrap_jso(this)));
+  AnimatedNumber get bias => _blink.BlinkSVGFEConvolveMatrixElement.instance.bias_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.divisor')
   @DocsEditable()
-  AnimatedNumber get divisor => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.divisor_Getter_(unwrap_jso(this)));
+  AnimatedNumber get divisor => _blink.BlinkSVGFEConvolveMatrixElement.instance.divisor_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.edgeMode')
   @DocsEditable()
-  AnimatedEnumeration get edgeMode => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.edgeMode_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get edgeMode => _blink.BlinkSVGFEConvolveMatrixElement.instance.edgeMode_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEConvolveMatrixElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.kernelMatrix')
   @DocsEditable()
-  AnimatedNumberList get kernelMatrix => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.kernelMatrix_Getter_(unwrap_jso(this)));
+  AnimatedNumberList get kernelMatrix => _blink.BlinkSVGFEConvolveMatrixElement.instance.kernelMatrix_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.kernelUnitLengthX')
   @DocsEditable()
-  AnimatedNumber get kernelUnitLengthX => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.kernelUnitLengthX_Getter_(unwrap_jso(this)));
+  AnimatedNumber get kernelUnitLengthX => _blink.BlinkSVGFEConvolveMatrixElement.instance.kernelUnitLengthX_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.kernelUnitLengthY')
   @DocsEditable()
-  AnimatedNumber get kernelUnitLengthY => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.kernelUnitLengthY_Getter_(unwrap_jso(this)));
+  AnimatedNumber get kernelUnitLengthY => _blink.BlinkSVGFEConvolveMatrixElement.instance.kernelUnitLengthY_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.orderX')
   @DocsEditable()
-  AnimatedInteger get orderX => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.orderX_Getter_(unwrap_jso(this)));
+  AnimatedInteger get orderX => _blink.BlinkSVGFEConvolveMatrixElement.instance.orderX_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.orderY')
   @DocsEditable()
-  AnimatedInteger get orderY => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.orderY_Getter_(unwrap_jso(this)));
+  AnimatedInteger get orderY => _blink.BlinkSVGFEConvolveMatrixElement.instance.orderY_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.preserveAlpha')
   @DocsEditable()
-  AnimatedBoolean get preserveAlpha => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.preserveAlpha_Getter_(unwrap_jso(this)));
+  AnimatedBoolean get preserveAlpha => _blink.BlinkSVGFEConvolveMatrixElement.instance.preserveAlpha_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.targetX')
   @DocsEditable()
-  AnimatedInteger get targetX => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.targetX_Getter_(unwrap_jso(this)));
+  AnimatedInteger get targetX => _blink.BlinkSVGFEConvolveMatrixElement.instance.targetX_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.targetY')
   @DocsEditable()
-  AnimatedInteger get targetY => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.targetY_Getter_(unwrap_jso(this)));
+  AnimatedInteger get targetY => _blink.BlinkSVGFEConvolveMatrixElement.instance.targetY_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEConvolveMatrixElement.instance.height_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEConvolveMatrixElement.instance.result_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEConvolveMatrixElement.instance.width_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEConvolveMatrixElement.instance.x_Getter_(this);
   
   @DomName('SVGFEConvolveMatrixElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEConvolveMatrixElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEConvolveMatrixElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1984,11 +1595,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEDiffuseLightingElement internalCreateFEDiffuseLightingElement() {
-    return new FEDiffuseLightingElement._internalWrap();
-  }
-
-  external factory FEDiffuseLightingElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEDiffuseLightingElement.internal_() : super.internal_();
@@ -2005,43 +1612,43 @@
 
   @DomName('SVGFEDiffuseLightingElement.diffuseConstant')
   @DocsEditable()
-  AnimatedNumber get diffuseConstant => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.diffuseConstant_Getter_(unwrap_jso(this)));
+  AnimatedNumber get diffuseConstant => _blink.BlinkSVGFEDiffuseLightingElement.instance.diffuseConstant_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEDiffuseLightingElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.kernelUnitLengthX')
   @DocsEditable()
-  AnimatedNumber get kernelUnitLengthX => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.kernelUnitLengthX_Getter_(unwrap_jso(this)));
+  AnimatedNumber get kernelUnitLengthX => _blink.BlinkSVGFEDiffuseLightingElement.instance.kernelUnitLengthX_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.kernelUnitLengthY')
   @DocsEditable()
-  AnimatedNumber get kernelUnitLengthY => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.kernelUnitLengthY_Getter_(unwrap_jso(this)));
+  AnimatedNumber get kernelUnitLengthY => _blink.BlinkSVGFEDiffuseLightingElement.instance.kernelUnitLengthY_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.surfaceScale')
   @DocsEditable()
-  AnimatedNumber get surfaceScale => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.surfaceScale_Getter_(unwrap_jso(this)));
+  AnimatedNumber get surfaceScale => _blink.BlinkSVGFEDiffuseLightingElement.instance.surfaceScale_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEDiffuseLightingElement.instance.height_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEDiffuseLightingElement.instance.result_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEDiffuseLightingElement.instance.width_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEDiffuseLightingElement.instance.x_Getter_(this);
   
   @DomName('SVGFEDiffuseLightingElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEDiffuseLightingElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEDiffuseLightingElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2068,11 +1675,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEDisplacementMapElement internalCreateFEDisplacementMapElement() {
-    return new FEDisplacementMapElement._internalWrap();
-  }
-
-  external factory FEDisplacementMapElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEDisplacementMapElement.internal_() : super.internal_();
@@ -2109,43 +1712,43 @@
 
   @DomName('SVGFEDisplacementMapElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEDisplacementMapElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.in2')
   @DocsEditable()
-  AnimatedString get in2 => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.in2_Getter_(unwrap_jso(this)));
+  AnimatedString get in2 => _blink.BlinkSVGFEDisplacementMapElement.instance.in2_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.scale')
   @DocsEditable()
-  AnimatedNumber get scale => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.scale_Getter_(unwrap_jso(this)));
+  AnimatedNumber get scale => _blink.BlinkSVGFEDisplacementMapElement.instance.scale_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.xChannelSelector')
   @DocsEditable()
-  AnimatedEnumeration get xChannelSelector => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.xChannelSelector_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get xChannelSelector => _blink.BlinkSVGFEDisplacementMapElement.instance.xChannelSelector_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.yChannelSelector')
   @DocsEditable()
-  AnimatedEnumeration get yChannelSelector => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.yChannelSelector_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get yChannelSelector => _blink.BlinkSVGFEDisplacementMapElement.instance.yChannelSelector_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEDisplacementMapElement.instance.height_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEDisplacementMapElement.instance.result_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEDisplacementMapElement.instance.width_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEDisplacementMapElement.instance.x_Getter_(this);
   
   @DomName('SVGFEDisplacementMapElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEDisplacementMapElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEDisplacementMapElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2172,11 +1775,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEDistantLightElement internalCreateFEDistantLightElement() {
-    return new FEDistantLightElement._internalWrap();
-  }
-
-  external factory FEDistantLightElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEDistantLightElement.internal_() : super.internal_();
@@ -2193,11 +1792,11 @@
 
   @DomName('SVGFEDistantLightElement.azimuth')
   @DocsEditable()
-  AnimatedNumber get azimuth => wrap_jso(_blink.BlinkSVGFEDistantLightElement.instance.azimuth_Getter_(unwrap_jso(this)));
+  AnimatedNumber get azimuth => _blink.BlinkSVGFEDistantLightElement.instance.azimuth_Getter_(this);
   
   @DomName('SVGFEDistantLightElement.elevation')
   @DocsEditable()
-  AnimatedNumber get elevation => wrap_jso(_blink.BlinkSVGFEDistantLightElement.instance.elevation_Getter_(unwrap_jso(this)));
+  AnimatedNumber get elevation => _blink.BlinkSVGFEDistantLightElement.instance.elevation_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2224,11 +1823,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEFloodElement internalCreateFEFloodElement() {
-    return new FEFloodElement._internalWrap();
-  }
-
-  external factory FEFloodElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEFloodElement.internal_() : super.internal_();
@@ -2245,23 +1840,23 @@
 
   @DomName('SVGFEFloodElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEFloodElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEFloodElement.instance.height_Getter_(this);
   
   @DomName('SVGFEFloodElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEFloodElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEFloodElement.instance.result_Getter_(this);
   
   @DomName('SVGFEFloodElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEFloodElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEFloodElement.instance.width_Getter_(this);
   
   @DomName('SVGFEFloodElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEFloodElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEFloodElement.instance.x_Getter_(this);
   
   @DomName('SVGFEFloodElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEFloodElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEFloodElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2288,11 +1883,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEFuncAElement internalCreateFEFuncAElement() {
-    return new FEFuncAElement._internalWrap();
-  }
-
-  external factory FEFuncAElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEFuncAElement.internal_() : super.internal_();
@@ -2332,11 +1923,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEFuncBElement internalCreateFEFuncBElement() {
-    return new FEFuncBElement._internalWrap();
-  }
-
-  external factory FEFuncBElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEFuncBElement.internal_() : super.internal_();
@@ -2376,11 +1963,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEFuncGElement internalCreateFEFuncGElement() {
-    return new FEFuncGElement._internalWrap();
-  }
-
-  external factory FEFuncGElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEFuncGElement.internal_() : super.internal_();
@@ -2420,11 +2003,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEFuncRElement internalCreateFEFuncRElement() {
-    return new FEFuncRElement._internalWrap();
-  }
-
-  external factory FEFuncRElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEFuncRElement.internal_() : super.internal_();
@@ -2464,11 +2043,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEGaussianBlurElement internalCreateFEGaussianBlurElement() {
-    return new FEGaussianBlurElement._internalWrap();
-  }
-
-  external factory FEGaussianBlurElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEGaussianBlurElement.internal_() : super.internal_();
@@ -2485,39 +2060,39 @@
 
   @DomName('SVGFEGaussianBlurElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEGaussianBlurElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEGaussianBlurElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEGaussianBlurElement.stdDeviationX')
   @DocsEditable()
-  AnimatedNumber get stdDeviationX => wrap_jso(_blink.BlinkSVGFEGaussianBlurElement.instance.stdDeviationX_Getter_(unwrap_jso(this)));
+  AnimatedNumber get stdDeviationX => _blink.BlinkSVGFEGaussianBlurElement.instance.stdDeviationX_Getter_(this);
   
   @DomName('SVGFEGaussianBlurElement.stdDeviationY')
   @DocsEditable()
-  AnimatedNumber get stdDeviationY => wrap_jso(_blink.BlinkSVGFEGaussianBlurElement.instance.stdDeviationY_Getter_(unwrap_jso(this)));
+  AnimatedNumber get stdDeviationY => _blink.BlinkSVGFEGaussianBlurElement.instance.stdDeviationY_Getter_(this);
   
   @DomName('SVGFEGaussianBlurElement.setStdDeviation')
   @DocsEditable()
-  void setStdDeviation(num stdDeviationX, num stdDeviationY) => _blink.BlinkSVGFEGaussianBlurElement.instance.setStdDeviation_Callback_2_(unwrap_jso(this), stdDeviationX, stdDeviationY);
+  void setStdDeviation(num stdDeviationX, num stdDeviationY) => _blink.BlinkSVGFEGaussianBlurElement.instance.setStdDeviation_Callback_2_(this, stdDeviationX, stdDeviationY);
   
   @DomName('SVGFEGaussianBlurElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEGaussianBlurElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEGaussianBlurElement.instance.height_Getter_(this);
   
   @DomName('SVGFEGaussianBlurElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEGaussianBlurElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEGaussianBlurElement.instance.result_Getter_(this);
   
   @DomName('SVGFEGaussianBlurElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEGaussianBlurElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEGaussianBlurElement.instance.width_Getter_(this);
   
   @DomName('SVGFEGaussianBlurElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEGaussianBlurElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEGaussianBlurElement.instance.x_Getter_(this);
   
   @DomName('SVGFEGaussianBlurElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEGaussianBlurElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEGaussianBlurElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2544,11 +2119,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEImageElement internalCreateFEImageElement() {
-    return new FEImageElement._internalWrap();
-  }
-
-  external factory FEImageElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEImageElement.internal_() : super.internal_();
@@ -2565,31 +2136,31 @@
 
   @DomName('SVGFEImageElement.preserveAspectRatio')
   @DocsEditable()
-  AnimatedPreserveAspectRatio get preserveAspectRatio => wrap_jso(_blink.BlinkSVGFEImageElement.instance.preserveAspectRatio_Getter_(unwrap_jso(this)));
+  AnimatedPreserveAspectRatio get preserveAspectRatio => _blink.BlinkSVGFEImageElement.instance.preserveAspectRatio_Getter_(this);
   
   @DomName('SVGFEImageElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEImageElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEImageElement.instance.height_Getter_(this);
   
   @DomName('SVGFEImageElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEImageElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEImageElement.instance.result_Getter_(this);
   
   @DomName('SVGFEImageElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEImageElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEImageElement.instance.width_Getter_(this);
   
   @DomName('SVGFEImageElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEImageElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEImageElement.instance.x_Getter_(this);
   
   @DomName('SVGFEImageElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEImageElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEImageElement.instance.y_Getter_(this);
   
   @DomName('SVGFEImageElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGFEImageElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGFEImageElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2616,11 +2187,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEMergeElement internalCreateFEMergeElement() {
-    return new FEMergeElement._internalWrap();
-  }
-
-  external factory FEMergeElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEMergeElement.internal_() : super.internal_();
@@ -2637,23 +2204,23 @@
 
   @DomName('SVGFEMergeElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEMergeElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEMergeElement.instance.height_Getter_(this);
   
   @DomName('SVGFEMergeElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEMergeElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEMergeElement.instance.result_Getter_(this);
   
   @DomName('SVGFEMergeElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEMergeElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEMergeElement.instance.width_Getter_(this);
   
   @DomName('SVGFEMergeElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEMergeElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEMergeElement.instance.x_Getter_(this);
   
   @DomName('SVGFEMergeElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEMergeElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEMergeElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2680,11 +2247,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEMergeNodeElement internalCreateFEMergeNodeElement() {
-    return new FEMergeNodeElement._internalWrap();
-  }
-
-  external factory FEMergeNodeElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEMergeNodeElement.internal_() : super.internal_();
@@ -2701,7 +2264,7 @@
 
   @DomName('SVGFEMergeNodeElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEMergeNodeElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEMergeNodeElement.instance.in1_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2724,11 +2287,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEMorphologyElement internalCreateFEMorphologyElement() {
-    return new FEMorphologyElement._internalWrap();
-  }
-
-  external factory FEMorphologyElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEMorphologyElement.internal_() : super.internal_();
@@ -2754,39 +2313,39 @@
 
   @DomName('SVGFEMorphologyElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEMorphologyElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEMorphologyElement.operator')
   @DocsEditable()
-  AnimatedEnumeration get operator => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.operator_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get operator => _blink.BlinkSVGFEMorphologyElement.instance.operator_Getter_(this);
   
   @DomName('SVGFEMorphologyElement.radiusX')
   @DocsEditable()
-  AnimatedNumber get radiusX => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.radiusX_Getter_(unwrap_jso(this)));
+  AnimatedNumber get radiusX => _blink.BlinkSVGFEMorphologyElement.instance.radiusX_Getter_(this);
   
   @DomName('SVGFEMorphologyElement.radiusY')
   @DocsEditable()
-  AnimatedNumber get radiusY => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.radiusY_Getter_(unwrap_jso(this)));
+  AnimatedNumber get radiusY => _blink.BlinkSVGFEMorphologyElement.instance.radiusY_Getter_(this);
   
   @DomName('SVGFEMorphologyElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEMorphologyElement.instance.height_Getter_(this);
   
   @DomName('SVGFEMorphologyElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEMorphologyElement.instance.result_Getter_(this);
   
   @DomName('SVGFEMorphologyElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEMorphologyElement.instance.width_Getter_(this);
   
   @DomName('SVGFEMorphologyElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEMorphologyElement.instance.x_Getter_(this);
   
   @DomName('SVGFEMorphologyElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEMorphologyElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEMorphologyElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2813,11 +2372,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEOffsetElement internalCreateFEOffsetElement() {
-    return new FEOffsetElement._internalWrap();
-  }
-
-  external factory FEOffsetElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEOffsetElement.internal_() : super.internal_();
@@ -2834,35 +2389,35 @@
 
   @DomName('SVGFEOffsetElement.dx')
   @DocsEditable()
-  AnimatedNumber get dx => wrap_jso(_blink.BlinkSVGFEOffsetElement.instance.dx_Getter_(unwrap_jso(this)));
+  AnimatedNumber get dx => _blink.BlinkSVGFEOffsetElement.instance.dx_Getter_(this);
   
   @DomName('SVGFEOffsetElement.dy')
   @DocsEditable()
-  AnimatedNumber get dy => wrap_jso(_blink.BlinkSVGFEOffsetElement.instance.dy_Getter_(unwrap_jso(this)));
+  AnimatedNumber get dy => _blink.BlinkSVGFEOffsetElement.instance.dy_Getter_(this);
   
   @DomName('SVGFEOffsetElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFEOffsetElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFEOffsetElement.instance.in1_Getter_(this);
   
   @DomName('SVGFEOffsetElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEOffsetElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEOffsetElement.instance.height_Getter_(this);
   
   @DomName('SVGFEOffsetElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEOffsetElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFEOffsetElement.instance.result_Getter_(this);
   
   @DomName('SVGFEOffsetElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEOffsetElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFEOffsetElement.instance.width_Getter_(this);
   
   @DomName('SVGFEOffsetElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEOffsetElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFEOffsetElement.instance.x_Getter_(this);
   
   @DomName('SVGFEOffsetElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEOffsetElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFEOffsetElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2889,11 +2444,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FEPointLightElement internalCreateFEPointLightElement() {
-    return new FEPointLightElement._internalWrap();
-  }
-
-  external factory FEPointLightElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FEPointLightElement.internal_() : super.internal_();
@@ -2910,15 +2461,15 @@
 
   @DomName('SVGFEPointLightElement.x')
   @DocsEditable()
-  AnimatedNumber get x => wrap_jso(_blink.BlinkSVGFEPointLightElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedNumber get x => _blink.BlinkSVGFEPointLightElement.instance.x_Getter_(this);
   
   @DomName('SVGFEPointLightElement.y')
   @DocsEditable()
-  AnimatedNumber get y => wrap_jso(_blink.BlinkSVGFEPointLightElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedNumber get y => _blink.BlinkSVGFEPointLightElement.instance.y_Getter_(this);
   
   @DomName('SVGFEPointLightElement.z')
   @DocsEditable()
-  AnimatedNumber get z => wrap_jso(_blink.BlinkSVGFEPointLightElement.instance.z_Getter_(unwrap_jso(this)));
+  AnimatedNumber get z => _blink.BlinkSVGFEPointLightElement.instance.z_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -2945,11 +2496,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FESpecularLightingElement internalCreateFESpecularLightingElement() {
-    return new FESpecularLightingElement._internalWrap();
-  }
-
-  external factory FESpecularLightingElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FESpecularLightingElement.internal_() : super.internal_();
@@ -2966,39 +2513,49 @@
 
   @DomName('SVGFESpecularLightingElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFESpecularLightingElement.instance.in1_Getter_(this);
+  
+  @DomName('SVGFESpecularLightingElement.kernelUnitLengthX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  AnimatedNumber get kernelUnitLengthX => _blink.BlinkSVGFESpecularLightingElement.instance.kernelUnitLengthX_Getter_(this);
+  
+  @DomName('SVGFESpecularLightingElement.kernelUnitLengthY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  AnimatedNumber get kernelUnitLengthY => _blink.BlinkSVGFESpecularLightingElement.instance.kernelUnitLengthY_Getter_(this);
   
   @DomName('SVGFESpecularLightingElement.specularConstant')
   @DocsEditable()
-  AnimatedNumber get specularConstant => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.specularConstant_Getter_(unwrap_jso(this)));
+  AnimatedNumber get specularConstant => _blink.BlinkSVGFESpecularLightingElement.instance.specularConstant_Getter_(this);
   
   @DomName('SVGFESpecularLightingElement.specularExponent')
   @DocsEditable()
-  AnimatedNumber get specularExponent => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.specularExponent_Getter_(unwrap_jso(this)));
+  AnimatedNumber get specularExponent => _blink.BlinkSVGFESpecularLightingElement.instance.specularExponent_Getter_(this);
   
   @DomName('SVGFESpecularLightingElement.surfaceScale')
   @DocsEditable()
-  AnimatedNumber get surfaceScale => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.surfaceScale_Getter_(unwrap_jso(this)));
+  AnimatedNumber get surfaceScale => _blink.BlinkSVGFESpecularLightingElement.instance.surfaceScale_Getter_(this);
   
   @DomName('SVGFESpecularLightingElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFESpecularLightingElement.instance.height_Getter_(this);
   
   @DomName('SVGFESpecularLightingElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFESpecularLightingElement.instance.result_Getter_(this);
   
   @DomName('SVGFESpecularLightingElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFESpecularLightingElement.instance.width_Getter_(this);
   
   @DomName('SVGFESpecularLightingElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFESpecularLightingElement.instance.x_Getter_(this);
   
   @DomName('SVGFESpecularLightingElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFESpecularLightingElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFESpecularLightingElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3025,11 +2582,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FESpotLightElement internalCreateFESpotLightElement() {
-    return new FESpotLightElement._internalWrap();
-  }
-
-  external factory FESpotLightElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FESpotLightElement.internal_() : super.internal_();
@@ -3046,35 +2599,35 @@
 
   @DomName('SVGFESpotLightElement.limitingConeAngle')
   @DocsEditable()
-  AnimatedNumber get limitingConeAngle => wrap_jso(_blink.BlinkSVGFESpotLightElement.instance.limitingConeAngle_Getter_(unwrap_jso(this)));
+  AnimatedNumber get limitingConeAngle => _blink.BlinkSVGFESpotLightElement.instance.limitingConeAngle_Getter_(this);
   
   @DomName('SVGFESpotLightElement.pointsAtX')
   @DocsEditable()
-  AnimatedNumber get pointsAtX => wrap_jso(_blink.BlinkSVGFESpotLightElement.instance.pointsAtX_Getter_(unwrap_jso(this)));
+  AnimatedNumber get pointsAtX => _blink.BlinkSVGFESpotLightElement.instance.pointsAtX_Getter_(this);
   
   @DomName('SVGFESpotLightElement.pointsAtY')
   @DocsEditable()
-  AnimatedNumber get pointsAtY => wrap_jso(_blink.BlinkSVGFESpotLightElement.instance.pointsAtY_Getter_(unwrap_jso(this)));
+  AnimatedNumber get pointsAtY => _blink.BlinkSVGFESpotLightElement.instance.pointsAtY_Getter_(this);
   
   @DomName('SVGFESpotLightElement.pointsAtZ')
   @DocsEditable()
-  AnimatedNumber get pointsAtZ => wrap_jso(_blink.BlinkSVGFESpotLightElement.instance.pointsAtZ_Getter_(unwrap_jso(this)));
+  AnimatedNumber get pointsAtZ => _blink.BlinkSVGFESpotLightElement.instance.pointsAtZ_Getter_(this);
   
   @DomName('SVGFESpotLightElement.specularExponent')
   @DocsEditable()
-  AnimatedNumber get specularExponent => wrap_jso(_blink.BlinkSVGFESpotLightElement.instance.specularExponent_Getter_(unwrap_jso(this)));
+  AnimatedNumber get specularExponent => _blink.BlinkSVGFESpotLightElement.instance.specularExponent_Getter_(this);
   
   @DomName('SVGFESpotLightElement.x')
   @DocsEditable()
-  AnimatedNumber get x => wrap_jso(_blink.BlinkSVGFESpotLightElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedNumber get x => _blink.BlinkSVGFESpotLightElement.instance.x_Getter_(this);
   
   @DomName('SVGFESpotLightElement.y')
   @DocsEditable()
-  AnimatedNumber get y => wrap_jso(_blink.BlinkSVGFESpotLightElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedNumber get y => _blink.BlinkSVGFESpotLightElement.instance.y_Getter_(this);
   
   @DomName('SVGFESpotLightElement.z')
   @DocsEditable()
-  AnimatedNumber get z => wrap_jso(_blink.BlinkSVGFESpotLightElement.instance.z_Getter_(unwrap_jso(this)));
+  AnimatedNumber get z => _blink.BlinkSVGFESpotLightElement.instance.z_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3101,11 +2654,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FETileElement internalCreateFETileElement() {
-    return new FETileElement._internalWrap();
-  }
-
-  external factory FETileElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FETileElement.internal_() : super.internal_();
@@ -3122,27 +2671,27 @@
 
   @DomName('SVGFETileElement.in1')
   @DocsEditable()
-  AnimatedString get in1 => wrap_jso(_blink.BlinkSVGFETileElement.instance.in1_Getter_(unwrap_jso(this)));
+  AnimatedString get in1 => _blink.BlinkSVGFETileElement.instance.in1_Getter_(this);
   
   @DomName('SVGFETileElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFETileElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFETileElement.instance.height_Getter_(this);
   
   @DomName('SVGFETileElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFETileElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFETileElement.instance.result_Getter_(this);
   
   @DomName('SVGFETileElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFETileElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFETileElement.instance.width_Getter_(this);
   
   @DomName('SVGFETileElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFETileElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFETileElement.instance.x_Getter_(this);
   
   @DomName('SVGFETileElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFETileElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFETileElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3169,11 +2718,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FETurbulenceElement internalCreateFETurbulenceElement() {
-    return new FETurbulenceElement._internalWrap();
-  }
-
-  external factory FETurbulenceElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FETurbulenceElement.internal_() : super.internal_();
@@ -3214,47 +2759,47 @@
 
   @DomName('SVGFETurbulenceElement.baseFrequencyX')
   @DocsEditable()
-  AnimatedNumber get baseFrequencyX => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.baseFrequencyX_Getter_(unwrap_jso(this)));
+  AnimatedNumber get baseFrequencyX => _blink.BlinkSVGFETurbulenceElement.instance.baseFrequencyX_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.baseFrequencyY')
   @DocsEditable()
-  AnimatedNumber get baseFrequencyY => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.baseFrequencyY_Getter_(unwrap_jso(this)));
+  AnimatedNumber get baseFrequencyY => _blink.BlinkSVGFETurbulenceElement.instance.baseFrequencyY_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.numOctaves')
   @DocsEditable()
-  AnimatedInteger get numOctaves => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.numOctaves_Getter_(unwrap_jso(this)));
+  AnimatedInteger get numOctaves => _blink.BlinkSVGFETurbulenceElement.instance.numOctaves_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.seed')
   @DocsEditable()
-  AnimatedNumber get seed => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.seed_Getter_(unwrap_jso(this)));
+  AnimatedNumber get seed => _blink.BlinkSVGFETurbulenceElement.instance.seed_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.stitchTiles')
   @DocsEditable()
-  AnimatedEnumeration get stitchTiles => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.stitchTiles_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get stitchTiles => _blink.BlinkSVGFETurbulenceElement.instance.stitchTiles_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.type')
   @DocsEditable()
-  AnimatedEnumeration get type => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.type_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get type => _blink.BlinkSVGFETurbulenceElement.instance.type_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFETurbulenceElement.instance.height_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.result')
   @DocsEditable()
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.result_Getter_(unwrap_jso(this)));
+  AnimatedString get result => _blink.BlinkSVGFETurbulenceElement.instance.result_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFETurbulenceElement.instance.width_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFETurbulenceElement.instance.x_Getter_(this);
   
   @DomName('SVGFETurbulenceElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFETurbulenceElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGFETurbulenceElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3281,11 +2826,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static FilterElement internalCreateFilterElement() {
-    return new FilterElement._internalWrap();
-  }
-
-  external factory FilterElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   FilterElement.internal_() : super.internal_();
@@ -3300,45 +2841,33 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
-  @DomName('SVGFilterElement.filterResX')
-  @DocsEditable()
-  AnimatedInteger get filterResX => wrap_jso(_blink.BlinkSVGFilterElement.instance.filterResX_Getter_(unwrap_jso(this)));
-  
-  @DomName('SVGFilterElement.filterResY')
-  @DocsEditable()
-  AnimatedInteger get filterResY => wrap_jso(_blink.BlinkSVGFilterElement.instance.filterResY_Getter_(unwrap_jso(this)));
-  
   @DomName('SVGFilterElement.filterUnits')
   @DocsEditable()
-  AnimatedEnumeration get filterUnits => wrap_jso(_blink.BlinkSVGFilterElement.instance.filterUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get filterUnits => _blink.BlinkSVGFilterElement.instance.filterUnits_Getter_(this);
   
   @DomName('SVGFilterElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFilterElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFilterElement.instance.height_Getter_(this);
   
   @DomName('SVGFilterElement.primitiveUnits')
   @DocsEditable()
-  AnimatedEnumeration get primitiveUnits => wrap_jso(_blink.BlinkSVGFilterElement.instance.primitiveUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get primitiveUnits => _blink.BlinkSVGFilterElement.instance.primitiveUnits_Getter_(this);
   
   @DomName('SVGFilterElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFilterElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGFilterElement.instance.width_Getter_(this);
   
   @DomName('SVGFilterElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFilterElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGFilterElement.instance.x_Getter_(this);
   
   @DomName('SVGFilterElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFilterElement.instance.y_Getter_(unwrap_jso(this)));
-  
-  @DomName('SVGFilterElement.setFilterRes')
-  @DocsEditable()
-  void setFilterRes(int filterResX, int filterResY) => _blink.BlinkSVGFilterElement.instance.setFilterRes_Callback_2_(unwrap_jso(this), filterResX, filterResY);
+  AnimatedLength get y => _blink.BlinkSVGFilterElement.instance.y_Getter_(this);
   
   @DomName('SVGFilterElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGFilterElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGFilterElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3422,11 +2951,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ForeignObjectElement internalCreateForeignObjectElement() {
-    return new ForeignObjectElement._internalWrap();
-  }
-
-  external factory ForeignObjectElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ForeignObjectElement.internal_() : super.internal_();
@@ -3443,19 +2968,19 @@
 
   @DomName('SVGForeignObjectElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGForeignObjectElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGForeignObjectElement.instance.height_Getter_(this);
   
   @DomName('SVGForeignObjectElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGForeignObjectElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGForeignObjectElement.instance.width_Getter_(this);
   
   @DomName('SVGForeignObjectElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGForeignObjectElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGForeignObjectElement.instance.x_Getter_(this);
   
   @DomName('SVGForeignObjectElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGForeignObjectElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGForeignObjectElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3478,11 +3003,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static GElement internalCreateGElement() {
-    return new GElement._internalWrap();
-  }
-
-  external factory GElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   GElement.internal_() : super.internal_();
@@ -3511,11 +3032,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static GeometryElement internalCreateGeometryElement() {
-    return new GeometryElement._internalWrap();
-  }
-
-  external factory GeometryElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   GeometryElement.internal_() : super.internal_();
@@ -3530,12 +3047,12 @@
   @DomName('SVGGeometryElement.isPointInFill')
   @DocsEditable()
   @Experimental() // untriaged
-  bool isPointInFill(Point point) => _blink.BlinkSVGGeometryElement.instance.isPointInFill_Callback_1_(unwrap_jso(this), unwrap_jso(point));
+  bool isPointInFill(Point point) => _blink.BlinkSVGGeometryElement.instance.isPointInFill_Callback_1_(this, point);
   
   @DomName('SVGGeometryElement.isPointInStroke')
   @DocsEditable()
   @Experimental() // untriaged
-  bool isPointInStroke(Point point) => _blink.BlinkSVGGeometryElement.instance.isPointInStroke_Callback_1_(unwrap_jso(this), unwrap_jso(point));
+  bool isPointInStroke(Point point) => _blink.BlinkSVGGeometryElement.instance.isPointInStroke_Callback_1_(this, point);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3554,11 +3071,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static GraphicsElement internalCreateGraphicsElement() {
-    return new GraphicsElement._internalWrap();
-  }
-
-  external factory GraphicsElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   GraphicsElement.internal_() : super.internal_();
@@ -3573,57 +3086,57 @@
   @DomName('SVGGraphicsElement.farthestViewportElement')
   @DocsEditable()
   @Experimental() // untriaged
-  SvgElement get farthestViewportElement => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.farthestViewportElement_Getter_(unwrap_jso(this)));
+  SvgElement get farthestViewportElement => _blink.BlinkSVGGraphicsElement.instance.farthestViewportElement_Getter_(this);
   
   @DomName('SVGGraphicsElement.nearestViewportElement')
   @DocsEditable()
   @Experimental() // untriaged
-  SvgElement get nearestViewportElement => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.nearestViewportElement_Getter_(unwrap_jso(this)));
+  SvgElement get nearestViewportElement => _blink.BlinkSVGGraphicsElement.instance.nearestViewportElement_Getter_(this);
   
   @DomName('SVGGraphicsElement.transform')
   @DocsEditable()
   @Experimental() // untriaged
-  AnimatedTransformList get transform => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.transform_Getter_(unwrap_jso(this)));
+  AnimatedTransformList get transform => _blink.BlinkSVGGraphicsElement.instance.transform_Getter_(this);
   
   @DomName('SVGGraphicsElement.getBBox')
   @DocsEditable()
   @Experimental() // untriaged
-  Rect getBBox() => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.getBBox_Callback_0_(unwrap_jso(this)));
+  Rect getBBox() => _blink.BlinkSVGGraphicsElement.instance.getBBox_Callback_0_(this);
   
   @DomName('SVGGraphicsElement.getCTM')
   @DocsEditable()
   @Experimental() // untriaged
-  Matrix getCtm() => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.getCTM_Callback_0_(unwrap_jso(this)));
+  Matrix getCtm() => _blink.BlinkSVGGraphicsElement.instance.getCTM_Callback_0_(this);
   
   @DomName('SVGGraphicsElement.getScreenCTM')
   @DocsEditable()
   @Experimental() // untriaged
-  Matrix getScreenCtm() => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.getScreenCTM_Callback_0_(unwrap_jso(this)));
+  Matrix getScreenCtm() => _blink.BlinkSVGGraphicsElement.instance.getScreenCTM_Callback_0_(this);
   
   @DomName('SVGGraphicsElement.getTransformToElement')
   @DocsEditable()
   @Experimental() // untriaged
-  Matrix getTransformToElement(SvgElement element) => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.getTransformToElement_Callback_1_(unwrap_jso(this), unwrap_jso(element)));
+  Matrix getTransformToElement(SvgElement element) => _blink.BlinkSVGGraphicsElement.instance.getTransformToElement_Callback_1_(this, element);
   
   @DomName('SVGGraphicsElement.requiredExtensions')
   @DocsEditable()
   @Experimental() // untriaged
-  StringList get requiredExtensions => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.requiredExtensions_Getter_(unwrap_jso(this)));
+  StringList get requiredExtensions => _blink.BlinkSVGGraphicsElement.instance.requiredExtensions_Getter_(this);
   
   @DomName('SVGGraphicsElement.requiredFeatures')
   @DocsEditable()
   @Experimental() // untriaged
-  StringList get requiredFeatures => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.requiredFeatures_Getter_(unwrap_jso(this)));
+  StringList get requiredFeatures => _blink.BlinkSVGGraphicsElement.instance.requiredFeatures_Getter_(this);
   
   @DomName('SVGGraphicsElement.systemLanguage')
   @DocsEditable()
   @Experimental() // untriaged
-  StringList get systemLanguage => wrap_jso(_blink.BlinkSVGGraphicsElement.instance.systemLanguage_Getter_(unwrap_jso(this)));
+  StringList get systemLanguage => _blink.BlinkSVGGraphicsElement.instance.systemLanguage_Getter_(this);
   
   @DomName('SVGGraphicsElement.hasExtension')
   @DocsEditable()
   @Experimental() // untriaged
-  bool hasExtension(String extension) => _blink.BlinkSVGGraphicsElement.instance.hasExtension_Callback_1_(unwrap_jso(this), extension);
+  bool hasExtension(String extension) => _blink.BlinkSVGGraphicsElement.instance.hasExtension_Callback_1_(this, extension);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3646,11 +3159,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ImageElement internalCreateImageElement() {
-    return new ImageElement._internalWrap();
-  }
-
-  external factory ImageElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ImageElement.internal_() : super.internal_();
@@ -3664,27 +3173,27 @@
 
   @DomName('SVGImageElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGImageElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGImageElement.instance.height_Getter_(this);
   
   @DomName('SVGImageElement.preserveAspectRatio')
   @DocsEditable()
-  AnimatedPreserveAspectRatio get preserveAspectRatio => wrap_jso(_blink.BlinkSVGImageElement.instance.preserveAspectRatio_Getter_(unwrap_jso(this)));
+  AnimatedPreserveAspectRatio get preserveAspectRatio => _blink.BlinkSVGImageElement.instance.preserveAspectRatio_Getter_(this);
   
   @DomName('SVGImageElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGImageElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGImageElement.instance.width_Getter_(this);
   
   @DomName('SVGImageElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGImageElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGImageElement.instance.x_Getter_(this);
   
   @DomName('SVGImageElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGImageElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGImageElement.instance.y_Getter_(this);
   
   @DomName('SVGImageElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGImageElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGImageElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3701,21 +3210,13 @@
   // To suppress missing implicit constructor warnings.
   factory Length._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Length internalCreateLength() {
-    return new Length._internalWrap();
-  }
 
-  factory Length._internalWrap() {
-    return new Length.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Length.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGLength.SVG_LENGTHTYPE_CM')
   @DocsEditable()
   static const int SVG_LENGTHTYPE_CM = 6;
@@ -3762,39 +3263,39 @@
 
   @DomName('SVGLength.unitType')
   @DocsEditable()
-  int get unitType => _blink.BlinkSVGLength.instance.unitType_Getter_(unwrap_jso(this));
+  int get unitType => _blink.BlinkSVGLength.instance.unitType_Getter_(this);
   
   @DomName('SVGLength.value')
   @DocsEditable()
-  num get value => _blink.BlinkSVGLength.instance.value_Getter_(unwrap_jso(this));
+  num get value => _blink.BlinkSVGLength.instance.value_Getter_(this);
   
   @DomName('SVGLength.value')
   @DocsEditable()
-  set value(num value) => _blink.BlinkSVGLength.instance.value_Setter_(unwrap_jso(this), value);
+  set value(num value) => _blink.BlinkSVGLength.instance.value_Setter_(this, value);
   
   @DomName('SVGLength.valueAsString')
   @DocsEditable()
-  String get valueAsString => _blink.BlinkSVGLength.instance.valueAsString_Getter_(unwrap_jso(this));
+  String get valueAsString => _blink.BlinkSVGLength.instance.valueAsString_Getter_(this);
   
   @DomName('SVGLength.valueAsString')
   @DocsEditable()
-  set valueAsString(String value) => _blink.BlinkSVGLength.instance.valueAsString_Setter_(unwrap_jso(this), value);
+  set valueAsString(String value) => _blink.BlinkSVGLength.instance.valueAsString_Setter_(this, value);
   
   @DomName('SVGLength.valueInSpecifiedUnits')
   @DocsEditable()
-  num get valueInSpecifiedUnits => _blink.BlinkSVGLength.instance.valueInSpecifiedUnits_Getter_(unwrap_jso(this));
+  num get valueInSpecifiedUnits => _blink.BlinkSVGLength.instance.valueInSpecifiedUnits_Getter_(this);
   
   @DomName('SVGLength.valueInSpecifiedUnits')
   @DocsEditable()
-  set valueInSpecifiedUnits(num value) => _blink.BlinkSVGLength.instance.valueInSpecifiedUnits_Setter_(unwrap_jso(this), value);
+  set valueInSpecifiedUnits(num value) => _blink.BlinkSVGLength.instance.valueInSpecifiedUnits_Setter_(this, value);
   
   @DomName('SVGLength.convertToSpecifiedUnits')
   @DocsEditable()
-  void convertToSpecifiedUnits(int unitType) => _blink.BlinkSVGLength.instance.convertToSpecifiedUnits_Callback_1_(unwrap_jso(this), unitType);
+  void convertToSpecifiedUnits(int unitType) => _blink.BlinkSVGLength.instance.convertToSpecifiedUnits_Callback_1_(this, unitType);
   
   @DomName('SVGLength.newValueSpecifiedUnits')
   @DocsEditable()
-  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) => _blink.BlinkSVGLength.instance.newValueSpecifiedUnits_Callback_2_(unwrap_jso(this), unitType, valueInSpecifiedUnits);
+  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) => _blink.BlinkSVGLength.instance.newValueSpecifiedUnits_Callback_2_(this, unitType, valueInSpecifiedUnits);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3811,29 +3312,21 @@
   // To suppress missing implicit constructor warnings.
   factory LengthList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static LengthList internalCreateLengthList() {
-    return new LengthList._internalWrap();
-  }
 
-  factory LengthList._internalWrap() {
-    return new LengthList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   LengthList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGLengthList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkSVGLengthList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSVGLengthList.instance.length_Getter_(this);
   
   @DomName('SVGLengthList.numberOfItems')
   @DocsEditable()
-  int get numberOfItems => _blink.BlinkSVGLengthList.instance.numberOfItems_Getter_(unwrap_jso(this));
+  int get numberOfItems => _blink.BlinkSVGLengthList.instance.numberOfItems_Getter_(this);
   
   Length operator[](int index) {
     if (index < 0 || index >= length)
@@ -3882,35 +3375,35 @@
   @DomName('SVGLengthList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, Length value) => _blink.BlinkSVGLengthList.instance.$__setter___Callback_2_(unwrap_jso(this), index, unwrap_jso(value));
+  void __setter__(int index, Length newItem) => _blink.BlinkSVGLengthList.instance.$__setter___Callback_2_(this, index, newItem);
   
   @DomName('SVGLengthList.appendItem')
   @DocsEditable()
-  Length appendItem(Length item) => wrap_jso(_blink.BlinkSVGLengthList.instance.appendItem_Callback_1_(unwrap_jso(this), unwrap_jso(item)));
+  Length appendItem(Length newItem) => _blink.BlinkSVGLengthList.instance.appendItem_Callback_1_(this, newItem);
   
   @DomName('SVGLengthList.clear')
   @DocsEditable()
-  void clear() => _blink.BlinkSVGLengthList.instance.clear_Callback_0_(unwrap_jso(this));
+  void clear() => _blink.BlinkSVGLengthList.instance.clear_Callback_0_(this);
   
   @DomName('SVGLengthList.getItem')
   @DocsEditable()
-  Length getItem(int index) => wrap_jso(_blink.BlinkSVGLengthList.instance.getItem_Callback_1_(unwrap_jso(this), index));
+  Length getItem(int index) => _blink.BlinkSVGLengthList.instance.getItem_Callback_1_(this, index);
   
   @DomName('SVGLengthList.initialize')
   @DocsEditable()
-  Length initialize(Length item) => wrap_jso(_blink.BlinkSVGLengthList.instance.initialize_Callback_1_(unwrap_jso(this), unwrap_jso(item)));
+  Length initialize(Length newItem) => _blink.BlinkSVGLengthList.instance.initialize_Callback_1_(this, newItem);
   
   @DomName('SVGLengthList.insertItemBefore')
   @DocsEditable()
-  Length insertItemBefore(Length item, int index) => wrap_jso(_blink.BlinkSVGLengthList.instance.insertItemBefore_Callback_2_(unwrap_jso(this), unwrap_jso(item), index));
+  Length insertItemBefore(Length newItem, int index) => _blink.BlinkSVGLengthList.instance.insertItemBefore_Callback_2_(this, newItem, index);
   
   @DomName('SVGLengthList.removeItem')
   @DocsEditable()
-  Length removeItem(int index) => wrap_jso(_blink.BlinkSVGLengthList.instance.removeItem_Callback_1_(unwrap_jso(this), index));
+  Length removeItem(int index) => _blink.BlinkSVGLengthList.instance.removeItem_Callback_1_(this, index);
   
   @DomName('SVGLengthList.replaceItem')
   @DocsEditable()
-  Length replaceItem(Length item, int index) => wrap_jso(_blink.BlinkSVGLengthList.instance.replaceItem_Callback_2_(unwrap_jso(this), unwrap_jso(item), index));
+  Length replaceItem(Length newItem, int index) => _blink.BlinkSVGLengthList.instance.replaceItem_Callback_2_(this, newItem, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3933,11 +3426,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static LineElement internalCreateLineElement() {
-    return new LineElement._internalWrap();
-  }
-
-  external factory LineElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   LineElement.internal_() : super.internal_();
@@ -3951,19 +3440,19 @@
 
   @DomName('SVGLineElement.x1')
   @DocsEditable()
-  AnimatedLength get x1 => wrap_jso(_blink.BlinkSVGLineElement.instance.x1_Getter_(unwrap_jso(this)));
+  AnimatedLength get x1 => _blink.BlinkSVGLineElement.instance.x1_Getter_(this);
   
   @DomName('SVGLineElement.x2')
   @DocsEditable()
-  AnimatedLength get x2 => wrap_jso(_blink.BlinkSVGLineElement.instance.x2_Getter_(unwrap_jso(this)));
+  AnimatedLength get x2 => _blink.BlinkSVGLineElement.instance.x2_Getter_(this);
   
   @DomName('SVGLineElement.y1')
   @DocsEditable()
-  AnimatedLength get y1 => wrap_jso(_blink.BlinkSVGLineElement.instance.y1_Getter_(unwrap_jso(this)));
+  AnimatedLength get y1 => _blink.BlinkSVGLineElement.instance.y1_Getter_(this);
   
   @DomName('SVGLineElement.y2')
   @DocsEditable()
-  AnimatedLength get y2 => wrap_jso(_blink.BlinkSVGLineElement.instance.y2_Getter_(unwrap_jso(this)));
+  AnimatedLength get y2 => _blink.BlinkSVGLineElement.instance.y2_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3986,11 +3475,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static LinearGradientElement internalCreateLinearGradientElement() {
-    return new LinearGradientElement._internalWrap();
-  }
-
-  external factory LinearGradientElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   LinearGradientElement.internal_() : super.internal_();
@@ -4004,19 +3489,19 @@
 
   @DomName('SVGLinearGradientElement.x1')
   @DocsEditable()
-  AnimatedLength get x1 => wrap_jso(_blink.BlinkSVGLinearGradientElement.instance.x1_Getter_(unwrap_jso(this)));
+  AnimatedLength get x1 => _blink.BlinkSVGLinearGradientElement.instance.x1_Getter_(this);
   
   @DomName('SVGLinearGradientElement.x2')
   @DocsEditable()
-  AnimatedLength get x2 => wrap_jso(_blink.BlinkSVGLinearGradientElement.instance.x2_Getter_(unwrap_jso(this)));
+  AnimatedLength get x2 => _blink.BlinkSVGLinearGradientElement.instance.x2_Getter_(this);
   
   @DomName('SVGLinearGradientElement.y1')
   @DocsEditable()
-  AnimatedLength get y1 => wrap_jso(_blink.BlinkSVGLinearGradientElement.instance.y1_Getter_(unwrap_jso(this)));
+  AnimatedLength get y1 => _blink.BlinkSVGLinearGradientElement.instance.y1_Getter_(this);
   
   @DomName('SVGLinearGradientElement.y2')
   @DocsEditable()
-  AnimatedLength get y2 => wrap_jso(_blink.BlinkSVGLinearGradientElement.instance.y2_Getter_(unwrap_jso(this)));
+  AnimatedLength get y2 => _blink.BlinkSVGLinearGradientElement.instance.y2_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4039,11 +3524,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MarkerElement internalCreateMarkerElement() {
-    return new MarkerElement._internalWrap();
-  }
-
-  external factory MarkerElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MarkerElement.internal_() : super.internal_();
@@ -4081,47 +3562,47 @@
 
   @DomName('SVGMarkerElement.markerHeight')
   @DocsEditable()
-  AnimatedLength get markerHeight => wrap_jso(_blink.BlinkSVGMarkerElement.instance.markerHeight_Getter_(unwrap_jso(this)));
+  AnimatedLength get markerHeight => _blink.BlinkSVGMarkerElement.instance.markerHeight_Getter_(this);
   
   @DomName('SVGMarkerElement.markerUnits')
   @DocsEditable()
-  AnimatedEnumeration get markerUnits => wrap_jso(_blink.BlinkSVGMarkerElement.instance.markerUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get markerUnits => _blink.BlinkSVGMarkerElement.instance.markerUnits_Getter_(this);
   
   @DomName('SVGMarkerElement.markerWidth')
   @DocsEditable()
-  AnimatedLength get markerWidth => wrap_jso(_blink.BlinkSVGMarkerElement.instance.markerWidth_Getter_(unwrap_jso(this)));
+  AnimatedLength get markerWidth => _blink.BlinkSVGMarkerElement.instance.markerWidth_Getter_(this);
   
   @DomName('SVGMarkerElement.orientAngle')
   @DocsEditable()
-  AnimatedAngle get orientAngle => wrap_jso(_blink.BlinkSVGMarkerElement.instance.orientAngle_Getter_(unwrap_jso(this)));
+  AnimatedAngle get orientAngle => _blink.BlinkSVGMarkerElement.instance.orientAngle_Getter_(this);
   
   @DomName('SVGMarkerElement.orientType')
   @DocsEditable()
-  AnimatedEnumeration get orientType => wrap_jso(_blink.BlinkSVGMarkerElement.instance.orientType_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get orientType => _blink.BlinkSVGMarkerElement.instance.orientType_Getter_(this);
   
   @DomName('SVGMarkerElement.refX')
   @DocsEditable()
-  AnimatedLength get refX => wrap_jso(_blink.BlinkSVGMarkerElement.instance.refX_Getter_(unwrap_jso(this)));
+  AnimatedLength get refX => _blink.BlinkSVGMarkerElement.instance.refX_Getter_(this);
   
   @DomName('SVGMarkerElement.refY')
   @DocsEditable()
-  AnimatedLength get refY => wrap_jso(_blink.BlinkSVGMarkerElement.instance.refY_Getter_(unwrap_jso(this)));
+  AnimatedLength get refY => _blink.BlinkSVGMarkerElement.instance.refY_Getter_(this);
   
   @DomName('SVGMarkerElement.setOrientToAngle')
   @DocsEditable()
-  void setOrientToAngle(Angle angle) => _blink.BlinkSVGMarkerElement.instance.setOrientToAngle_Callback_1_(unwrap_jso(this), unwrap_jso(angle));
+  void setOrientToAngle(Angle angle) => _blink.BlinkSVGMarkerElement.instance.setOrientToAngle_Callback_1_(this, angle);
   
   @DomName('SVGMarkerElement.setOrientToAuto')
   @DocsEditable()
-  void setOrientToAuto() => _blink.BlinkSVGMarkerElement.instance.setOrientToAuto_Callback_0_(unwrap_jso(this));
+  void setOrientToAuto() => _blink.BlinkSVGMarkerElement.instance.setOrientToAuto_Callback_0_(this);
   
   @DomName('SVGMarkerElement.preserveAspectRatio')
   @DocsEditable()
-  AnimatedPreserveAspectRatio get preserveAspectRatio => wrap_jso(_blink.BlinkSVGMarkerElement.instance.preserveAspectRatio_Getter_(unwrap_jso(this)));
+  AnimatedPreserveAspectRatio get preserveAspectRatio => _blink.BlinkSVGMarkerElement.instance.preserveAspectRatio_Getter_(this);
   
   @DomName('SVGMarkerElement.viewBox')
   @DocsEditable()
-  AnimatedRect get viewBox => wrap_jso(_blink.BlinkSVGMarkerElement.instance.viewBox_Getter_(unwrap_jso(this)));
+  AnimatedRect get viewBox => _blink.BlinkSVGMarkerElement.instance.viewBox_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4144,11 +3625,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MaskElement internalCreateMaskElement() {
-    return new MaskElement._internalWrap();
-  }
-
-  external factory MaskElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MaskElement.internal_() : super.internal_();
@@ -4162,43 +3639,43 @@
 
   @DomName('SVGMaskElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGMaskElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGMaskElement.instance.height_Getter_(this);
   
   @DomName('SVGMaskElement.maskContentUnits')
   @DocsEditable()
-  AnimatedEnumeration get maskContentUnits => wrap_jso(_blink.BlinkSVGMaskElement.instance.maskContentUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get maskContentUnits => _blink.BlinkSVGMaskElement.instance.maskContentUnits_Getter_(this);
   
   @DomName('SVGMaskElement.maskUnits')
   @DocsEditable()
-  AnimatedEnumeration get maskUnits => wrap_jso(_blink.BlinkSVGMaskElement.instance.maskUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get maskUnits => _blink.BlinkSVGMaskElement.instance.maskUnits_Getter_(this);
   
   @DomName('SVGMaskElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGMaskElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGMaskElement.instance.width_Getter_(this);
   
   @DomName('SVGMaskElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGMaskElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGMaskElement.instance.x_Getter_(this);
   
   @DomName('SVGMaskElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGMaskElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGMaskElement.instance.y_Getter_(this);
   
   @DomName('SVGMaskElement.requiredExtensions')
   @DocsEditable()
-  StringList get requiredExtensions => wrap_jso(_blink.BlinkSVGMaskElement.instance.requiredExtensions_Getter_(unwrap_jso(this)));
+  StringList get requiredExtensions => _blink.BlinkSVGMaskElement.instance.requiredExtensions_Getter_(this);
   
   @DomName('SVGMaskElement.requiredFeatures')
   @DocsEditable()
-  StringList get requiredFeatures => wrap_jso(_blink.BlinkSVGMaskElement.instance.requiredFeatures_Getter_(unwrap_jso(this)));
+  StringList get requiredFeatures => _blink.BlinkSVGMaskElement.instance.requiredFeatures_Getter_(this);
   
   @DomName('SVGMaskElement.systemLanguage')
   @DocsEditable()
-  StringList get systemLanguage => wrap_jso(_blink.BlinkSVGMaskElement.instance.systemLanguage_Getter_(unwrap_jso(this)));
+  StringList get systemLanguage => _blink.BlinkSVGMaskElement.instance.systemLanguage_Getter_(this);
   
   @DomName('SVGMaskElement.hasExtension')
   @DocsEditable()
-  bool hasExtension(String extension) => _blink.BlinkSVGMaskElement.instance.hasExtension_Callback_1_(unwrap_jso(this), extension);
+  bool hasExtension(String extension) => _blink.BlinkSVGMaskElement.instance.hasExtension_Callback_1_(this, extension);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4215,112 +3692,104 @@
   // To suppress missing implicit constructor warnings.
   factory Matrix._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Matrix internalCreateMatrix() {
-    return new Matrix._internalWrap();
-  }
 
-  factory Matrix._internalWrap() {
-    return new Matrix.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Matrix.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGMatrix.a')
   @DocsEditable()
-  num get a => _blink.BlinkSVGMatrix.instance.a_Getter_(unwrap_jso(this));
+  num get a => _blink.BlinkSVGMatrix.instance.a_Getter_(this);
   
   @DomName('SVGMatrix.a')
   @DocsEditable()
-  set a(num value) => _blink.BlinkSVGMatrix.instance.a_Setter_(unwrap_jso(this), value);
+  set a(num value) => _blink.BlinkSVGMatrix.instance.a_Setter_(this, value);
   
   @DomName('SVGMatrix.b')
   @DocsEditable()
-  num get b => _blink.BlinkSVGMatrix.instance.b_Getter_(unwrap_jso(this));
+  num get b => _blink.BlinkSVGMatrix.instance.b_Getter_(this);
   
   @DomName('SVGMatrix.b')
   @DocsEditable()
-  set b(num value) => _blink.BlinkSVGMatrix.instance.b_Setter_(unwrap_jso(this), value);
+  set b(num value) => _blink.BlinkSVGMatrix.instance.b_Setter_(this, value);
   
   @DomName('SVGMatrix.c')
   @DocsEditable()
-  num get c => _blink.BlinkSVGMatrix.instance.c_Getter_(unwrap_jso(this));
+  num get c => _blink.BlinkSVGMatrix.instance.c_Getter_(this);
   
   @DomName('SVGMatrix.c')
   @DocsEditable()
-  set c(num value) => _blink.BlinkSVGMatrix.instance.c_Setter_(unwrap_jso(this), value);
+  set c(num value) => _blink.BlinkSVGMatrix.instance.c_Setter_(this, value);
   
   @DomName('SVGMatrix.d')
   @DocsEditable()
-  num get d => _blink.BlinkSVGMatrix.instance.d_Getter_(unwrap_jso(this));
+  num get d => _blink.BlinkSVGMatrix.instance.d_Getter_(this);
   
   @DomName('SVGMatrix.d')
   @DocsEditable()
-  set d(num value) => _blink.BlinkSVGMatrix.instance.d_Setter_(unwrap_jso(this), value);
+  set d(num value) => _blink.BlinkSVGMatrix.instance.d_Setter_(this, value);
   
   @DomName('SVGMatrix.e')
   @DocsEditable()
-  num get e => _blink.BlinkSVGMatrix.instance.e_Getter_(unwrap_jso(this));
+  num get e => _blink.BlinkSVGMatrix.instance.e_Getter_(this);
   
   @DomName('SVGMatrix.e')
   @DocsEditable()
-  set e(num value) => _blink.BlinkSVGMatrix.instance.e_Setter_(unwrap_jso(this), value);
+  set e(num value) => _blink.BlinkSVGMatrix.instance.e_Setter_(this, value);
   
   @DomName('SVGMatrix.f')
   @DocsEditable()
-  num get f => _blink.BlinkSVGMatrix.instance.f_Getter_(unwrap_jso(this));
+  num get f => _blink.BlinkSVGMatrix.instance.f_Getter_(this);
   
   @DomName('SVGMatrix.f')
   @DocsEditable()
-  set f(num value) => _blink.BlinkSVGMatrix.instance.f_Setter_(unwrap_jso(this), value);
+  set f(num value) => _blink.BlinkSVGMatrix.instance.f_Setter_(this, value);
   
   @DomName('SVGMatrix.flipX')
   @DocsEditable()
-  Matrix flipX() => wrap_jso(_blink.BlinkSVGMatrix.instance.flipX_Callback_0_(unwrap_jso(this)));
+  Matrix flipX() => _blink.BlinkSVGMatrix.instance.flipX_Callback_0_(this);
   
   @DomName('SVGMatrix.flipY')
   @DocsEditable()
-  Matrix flipY() => wrap_jso(_blink.BlinkSVGMatrix.instance.flipY_Callback_0_(unwrap_jso(this)));
+  Matrix flipY() => _blink.BlinkSVGMatrix.instance.flipY_Callback_0_(this);
   
   @DomName('SVGMatrix.inverse')
   @DocsEditable()
-  Matrix inverse() => wrap_jso(_blink.BlinkSVGMatrix.instance.inverse_Callback_0_(unwrap_jso(this)));
+  Matrix inverse() => _blink.BlinkSVGMatrix.instance.inverse_Callback_0_(this);
   
   @DomName('SVGMatrix.multiply')
   @DocsEditable()
-  Matrix multiply(Matrix secondMatrix) => wrap_jso(_blink.BlinkSVGMatrix.instance.multiply_Callback_1_(unwrap_jso(this), unwrap_jso(secondMatrix)));
+  Matrix multiply(Matrix secondMatrix) => _blink.BlinkSVGMatrix.instance.multiply_Callback_1_(this, secondMatrix);
   
   @DomName('SVGMatrix.rotate')
   @DocsEditable()
-  Matrix rotate(num angle) => wrap_jso(_blink.BlinkSVGMatrix.instance.rotate_Callback_1_(unwrap_jso(this), angle));
+  Matrix rotate(num angle) => _blink.BlinkSVGMatrix.instance.rotate_Callback_1_(this, angle);
   
   @DomName('SVGMatrix.rotateFromVector')
   @DocsEditable()
-  Matrix rotateFromVector(num x, num y) => wrap_jso(_blink.BlinkSVGMatrix.instance.rotateFromVector_Callback_2_(unwrap_jso(this), x, y));
+  Matrix rotateFromVector(num x, num y) => _blink.BlinkSVGMatrix.instance.rotateFromVector_Callback_2_(this, x, y);
   
   @DomName('SVGMatrix.scale')
   @DocsEditable()
-  Matrix scale(num scaleFactor) => wrap_jso(_blink.BlinkSVGMatrix.instance.scale_Callback_1_(unwrap_jso(this), scaleFactor));
+  Matrix scale(num scaleFactor) => _blink.BlinkSVGMatrix.instance.scale_Callback_1_(this, scaleFactor);
   
   @DomName('SVGMatrix.scaleNonUniform')
   @DocsEditable()
-  Matrix scaleNonUniform(num scaleFactorX, num scaleFactorY) => wrap_jso(_blink.BlinkSVGMatrix.instance.scaleNonUniform_Callback_2_(unwrap_jso(this), scaleFactorX, scaleFactorY));
+  Matrix scaleNonUniform(num scaleFactorX, num scaleFactorY) => _blink.BlinkSVGMatrix.instance.scaleNonUniform_Callback_2_(this, scaleFactorX, scaleFactorY);
   
   @DomName('SVGMatrix.skewX')
   @DocsEditable()
-  Matrix skewX(num angle) => wrap_jso(_blink.BlinkSVGMatrix.instance.skewX_Callback_1_(unwrap_jso(this), angle));
+  Matrix skewX(num angle) => _blink.BlinkSVGMatrix.instance.skewX_Callback_1_(this, angle);
   
   @DomName('SVGMatrix.skewY')
   @DocsEditable()
-  Matrix skewY(num angle) => wrap_jso(_blink.BlinkSVGMatrix.instance.skewY_Callback_1_(unwrap_jso(this), angle));
+  Matrix skewY(num angle) => _blink.BlinkSVGMatrix.instance.skewY_Callback_1_(this, angle);
   
   @DomName('SVGMatrix.translate')
   @DocsEditable()
-  Matrix translate(num x, num y) => wrap_jso(_blink.BlinkSVGMatrix.instance.translate_Callback_2_(unwrap_jso(this), x, y));
+  Matrix translate(num x, num y) => _blink.BlinkSVGMatrix.instance.translate_Callback_2_(this, x, y);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4339,11 +3808,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MetadataElement internalCreateMetadataElement() {
-    return new MetadataElement._internalWrap();
-  }
-
-  external factory MetadataElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MetadataElement.internal_() : super.internal_();
@@ -4370,28 +3835,20 @@
   // To suppress missing implicit constructor warnings.
   factory Number._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Number internalCreateNumber() {
-    return new Number._internalWrap();
-  }
 
-  factory Number._internalWrap() {
-    return new Number.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Number.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGNumber.value')
   @DocsEditable()
-  num get value => _blink.BlinkSVGNumber.instance.value_Getter_(unwrap_jso(this));
+  num get value => _blink.BlinkSVGNumber.instance.value_Getter_(this);
   
   @DomName('SVGNumber.value')
   @DocsEditable()
-  set value(num value) => _blink.BlinkSVGNumber.instance.value_Setter_(unwrap_jso(this), value);
+  set value(num value) => _blink.BlinkSVGNumber.instance.value_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4408,29 +3865,21 @@
   // To suppress missing implicit constructor warnings.
   factory NumberList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static NumberList internalCreateNumberList() {
-    return new NumberList._internalWrap();
-  }
 
-  factory NumberList._internalWrap() {
-    return new NumberList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   NumberList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGNumberList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkSVGNumberList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSVGNumberList.instance.length_Getter_(this);
   
   @DomName('SVGNumberList.numberOfItems')
   @DocsEditable()
-  int get numberOfItems => _blink.BlinkSVGNumberList.instance.numberOfItems_Getter_(unwrap_jso(this));
+  int get numberOfItems => _blink.BlinkSVGNumberList.instance.numberOfItems_Getter_(this);
   
   Number operator[](int index) {
     if (index < 0 || index >= length)
@@ -4479,35 +3928,35 @@
   @DomName('SVGNumberList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, Number value) => _blink.BlinkSVGNumberList.instance.$__setter___Callback_2_(unwrap_jso(this), index, unwrap_jso(value));
+  void __setter__(int index, Number newItem) => _blink.BlinkSVGNumberList.instance.$__setter___Callback_2_(this, index, newItem);
   
   @DomName('SVGNumberList.appendItem')
   @DocsEditable()
-  Number appendItem(Number item) => wrap_jso(_blink.BlinkSVGNumberList.instance.appendItem_Callback_1_(unwrap_jso(this), unwrap_jso(item)));
+  Number appendItem(Number newItem) => _blink.BlinkSVGNumberList.instance.appendItem_Callback_1_(this, newItem);
   
   @DomName('SVGNumberList.clear')
   @DocsEditable()
-  void clear() => _blink.BlinkSVGNumberList.instance.clear_Callback_0_(unwrap_jso(this));
+  void clear() => _blink.BlinkSVGNumberList.instance.clear_Callback_0_(this);
   
   @DomName('SVGNumberList.getItem')
   @DocsEditable()
-  Number getItem(int index) => wrap_jso(_blink.BlinkSVGNumberList.instance.getItem_Callback_1_(unwrap_jso(this), index));
+  Number getItem(int index) => _blink.BlinkSVGNumberList.instance.getItem_Callback_1_(this, index);
   
   @DomName('SVGNumberList.initialize')
   @DocsEditable()
-  Number initialize(Number item) => wrap_jso(_blink.BlinkSVGNumberList.instance.initialize_Callback_1_(unwrap_jso(this), unwrap_jso(item)));
+  Number initialize(Number newItem) => _blink.BlinkSVGNumberList.instance.initialize_Callback_1_(this, newItem);
   
   @DomName('SVGNumberList.insertItemBefore')
   @DocsEditable()
-  Number insertItemBefore(Number item, int index) => wrap_jso(_blink.BlinkSVGNumberList.instance.insertItemBefore_Callback_2_(unwrap_jso(this), unwrap_jso(item), index));
+  Number insertItemBefore(Number newItem, int index) => _blink.BlinkSVGNumberList.instance.insertItemBefore_Callback_2_(this, newItem, index);
   
   @DomName('SVGNumberList.removeItem')
   @DocsEditable()
-  Number removeItem(int index) => wrap_jso(_blink.BlinkSVGNumberList.instance.removeItem_Callback_1_(unwrap_jso(this), index));
+  Number removeItem(int index) => _blink.BlinkSVGNumberList.instance.removeItem_Callback_1_(this, index);
   
   @DomName('SVGNumberList.replaceItem')
   @DocsEditable()
-  Number replaceItem(Number item, int index) => wrap_jso(_blink.BlinkSVGNumberList.instance.replaceItem_Callback_2_(unwrap_jso(this), unwrap_jso(item), index));
+  Number replaceItem(Number newItem, int index) => _blink.BlinkSVGNumberList.instance.replaceItem_Callback_2_(this, newItem, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4530,11 +3979,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathElement internalCreatePathElement() {
-    return new PathElement._internalWrap();
-  }
-
-  external factory PathElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathElement.internal_() : super.internal_();
@@ -4548,111 +3993,111 @@
 
   @DomName('SVGPathElement.animatedNormalizedPathSegList')
   @DocsEditable()
-  PathSegList get animatedNormalizedPathSegList => wrap_jso(_blink.BlinkSVGPathElement.instance.animatedNormalizedPathSegList_Getter_(unwrap_jso(this)));
+  PathSegList get animatedNormalizedPathSegList => _blink.BlinkSVGPathElement.instance.animatedNormalizedPathSegList_Getter_(this);
   
   @DomName('SVGPathElement.animatedPathSegList')
   @DocsEditable()
-  PathSegList get animatedPathSegList => wrap_jso(_blink.BlinkSVGPathElement.instance.animatedPathSegList_Getter_(unwrap_jso(this)));
+  PathSegList get animatedPathSegList => _blink.BlinkSVGPathElement.instance.animatedPathSegList_Getter_(this);
   
   @DomName('SVGPathElement.normalizedPathSegList')
   @DocsEditable()
-  PathSegList get normalizedPathSegList => wrap_jso(_blink.BlinkSVGPathElement.instance.normalizedPathSegList_Getter_(unwrap_jso(this)));
+  PathSegList get normalizedPathSegList => _blink.BlinkSVGPathElement.instance.normalizedPathSegList_Getter_(this);
   
   @DomName('SVGPathElement.pathLength')
   @DocsEditable()
-  AnimatedNumber get pathLength => wrap_jso(_blink.BlinkSVGPathElement.instance.pathLength_Getter_(unwrap_jso(this)));
+  AnimatedNumber get pathLength => _blink.BlinkSVGPathElement.instance.pathLength_Getter_(this);
   
   @DomName('SVGPathElement.pathSegList')
   @DocsEditable()
-  PathSegList get pathSegList => wrap_jso(_blink.BlinkSVGPathElement.instance.pathSegList_Getter_(unwrap_jso(this)));
+  PathSegList get pathSegList => _blink.BlinkSVGPathElement.instance.pathSegList_Getter_(this);
   
   @DomName('SVGPathElement.createSVGPathSegArcAbs')
   @DocsEditable()
-  PathSegArcAbs createSvgPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegArcAbs_Callback_7_(unwrap_jso(this), x, y, r1, r2, angle, largeArcFlag, sweepFlag));
+  PathSegArcAbs createSvgPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) => _blink.BlinkSVGPathElement.instance.createSVGPathSegArcAbs_Callback_7_(this, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
   
   @DomName('SVGPathElement.createSVGPathSegArcRel')
   @DocsEditable()
-  PathSegArcRel createSvgPathSegArcRel(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegArcRel_Callback_7_(unwrap_jso(this), x, y, r1, r2, angle, largeArcFlag, sweepFlag));
+  PathSegArcRel createSvgPathSegArcRel(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) => _blink.BlinkSVGPathElement.instance.createSVGPathSegArcRel_Callback_7_(this, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
   
   @DomName('SVGPathElement.createSVGPathSegClosePath')
   @DocsEditable()
-  PathSegClosePath createSvgPathSegClosePath() => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegClosePath_Callback_0_(unwrap_jso(this)));
+  PathSegClosePath createSvgPathSegClosePath() => _blink.BlinkSVGPathElement.instance.createSVGPathSegClosePath_Callback_0_(this);
   
   @DomName('SVGPathElement.createSVGPathSegCurvetoCubicAbs')
   @DocsEditable()
-  PathSegCurvetoCubicAbs createSvgPathSegCurvetoCubicAbs(num x, num y, num x1, num y1, num x2, num y2) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoCubicAbs_Callback_6_(unwrap_jso(this), x, y, x1, y1, x2, y2));
+  PathSegCurvetoCubicAbs createSvgPathSegCurvetoCubicAbs(num x, num y, num x1, num y1, num x2, num y2) => _blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoCubicAbs_Callback_6_(this, x, y, x1, y1, x2, y2);
   
   @DomName('SVGPathElement.createSVGPathSegCurvetoCubicRel')
   @DocsEditable()
-  PathSegCurvetoCubicRel createSvgPathSegCurvetoCubicRel(num x, num y, num x1, num y1, num x2, num y2) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoCubicRel_Callback_6_(unwrap_jso(this), x, y, x1, y1, x2, y2));
+  PathSegCurvetoCubicRel createSvgPathSegCurvetoCubicRel(num x, num y, num x1, num y1, num x2, num y2) => _blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoCubicRel_Callback_6_(this, x, y, x1, y1, x2, y2);
   
   @DomName('SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs')
   @DocsEditable()
-  PathSegCurvetoCubicSmoothAbs createSvgPathSegCurvetoCubicSmoothAbs(num x, num y, num x2, num y2) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoCubicSmoothAbs_Callback_4_(unwrap_jso(this), x, y, x2, y2));
+  PathSegCurvetoCubicSmoothAbs createSvgPathSegCurvetoCubicSmoothAbs(num x, num y, num x2, num y2) => _blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoCubicSmoothAbs_Callback_4_(this, x, y, x2, y2);
   
   @DomName('SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel')
   @DocsEditable()
-  PathSegCurvetoCubicSmoothRel createSvgPathSegCurvetoCubicSmoothRel(num x, num y, num x2, num y2) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoCubicSmoothRel_Callback_4_(unwrap_jso(this), x, y, x2, y2));
+  PathSegCurvetoCubicSmoothRel createSvgPathSegCurvetoCubicSmoothRel(num x, num y, num x2, num y2) => _blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoCubicSmoothRel_Callback_4_(this, x, y, x2, y2);
   
   @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticAbs')
   @DocsEditable()
-  PathSegCurvetoQuadraticAbs createSvgPathSegCurvetoQuadraticAbs(num x, num y, num x1, num y1) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoQuadraticAbs_Callback_4_(unwrap_jso(this), x, y, x1, y1));
+  PathSegCurvetoQuadraticAbs createSvgPathSegCurvetoQuadraticAbs(num x, num y, num x1, num y1) => _blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoQuadraticAbs_Callback_4_(this, x, y, x1, y1);
   
   @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticRel')
   @DocsEditable()
-  PathSegCurvetoQuadraticRel createSvgPathSegCurvetoQuadraticRel(num x, num y, num x1, num y1) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoQuadraticRel_Callback_4_(unwrap_jso(this), x, y, x1, y1));
+  PathSegCurvetoQuadraticRel createSvgPathSegCurvetoQuadraticRel(num x, num y, num x1, num y1) => _blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoQuadraticRel_Callback_4_(this, x, y, x1, y1);
   
   @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs')
   @DocsEditable()
-  PathSegCurvetoQuadraticSmoothAbs createSvgPathSegCurvetoQuadraticSmoothAbs(num x, num y) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_2_(unwrap_jso(this), x, y));
+  PathSegCurvetoQuadraticSmoothAbs createSvgPathSegCurvetoQuadraticSmoothAbs(num x, num y) => _blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_2_(this, x, y);
   
   @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel')
   @DocsEditable()
-  PathSegCurvetoQuadraticSmoothRel createSvgPathSegCurvetoQuadraticSmoothRel(num x, num y) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoQuadraticSmoothRel_Callback_2_(unwrap_jso(this), x, y));
+  PathSegCurvetoQuadraticSmoothRel createSvgPathSegCurvetoQuadraticSmoothRel(num x, num y) => _blink.BlinkSVGPathElement.instance.createSVGPathSegCurvetoQuadraticSmoothRel_Callback_2_(this, x, y);
   
   @DomName('SVGPathElement.createSVGPathSegLinetoAbs')
   @DocsEditable()
-  PathSegLinetoAbs createSvgPathSegLinetoAbs(num x, num y) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoAbs_Callback_2_(unwrap_jso(this), x, y));
+  PathSegLinetoAbs createSvgPathSegLinetoAbs(num x, num y) => _blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoAbs_Callback_2_(this, x, y);
   
   @DomName('SVGPathElement.createSVGPathSegLinetoHorizontalAbs')
   @DocsEditable()
-  PathSegLinetoHorizontalAbs createSvgPathSegLinetoHorizontalAbs(num x) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoHorizontalAbs_Callback_1_(unwrap_jso(this), x));
+  PathSegLinetoHorizontalAbs createSvgPathSegLinetoHorizontalAbs(num x) => _blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoHorizontalAbs_Callback_1_(this, x);
   
   @DomName('SVGPathElement.createSVGPathSegLinetoHorizontalRel')
   @DocsEditable()
-  PathSegLinetoHorizontalRel createSvgPathSegLinetoHorizontalRel(num x) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoHorizontalRel_Callback_1_(unwrap_jso(this), x));
+  PathSegLinetoHorizontalRel createSvgPathSegLinetoHorizontalRel(num x) => _blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoHorizontalRel_Callback_1_(this, x);
   
   @DomName('SVGPathElement.createSVGPathSegLinetoRel')
   @DocsEditable()
-  PathSegLinetoRel createSvgPathSegLinetoRel(num x, num y) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoRel_Callback_2_(unwrap_jso(this), x, y));
+  PathSegLinetoRel createSvgPathSegLinetoRel(num x, num y) => _blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoRel_Callback_2_(this, x, y);
   
   @DomName('SVGPathElement.createSVGPathSegLinetoVerticalAbs')
   @DocsEditable()
-  PathSegLinetoVerticalAbs createSvgPathSegLinetoVerticalAbs(num y) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoVerticalAbs_Callback_1_(unwrap_jso(this), y));
+  PathSegLinetoVerticalAbs createSvgPathSegLinetoVerticalAbs(num y) => _blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoVerticalAbs_Callback_1_(this, y);
   
   @DomName('SVGPathElement.createSVGPathSegLinetoVerticalRel')
   @DocsEditable()
-  PathSegLinetoVerticalRel createSvgPathSegLinetoVerticalRel(num y) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoVerticalRel_Callback_1_(unwrap_jso(this), y));
+  PathSegLinetoVerticalRel createSvgPathSegLinetoVerticalRel(num y) => _blink.BlinkSVGPathElement.instance.createSVGPathSegLinetoVerticalRel_Callback_1_(this, y);
   
   @DomName('SVGPathElement.createSVGPathSegMovetoAbs')
   @DocsEditable()
-  PathSegMovetoAbs createSvgPathSegMovetoAbs(num x, num y) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegMovetoAbs_Callback_2_(unwrap_jso(this), x, y));
+  PathSegMovetoAbs createSvgPathSegMovetoAbs(num x, num y) => _blink.BlinkSVGPathElement.instance.createSVGPathSegMovetoAbs_Callback_2_(this, x, y);
   
   @DomName('SVGPathElement.createSVGPathSegMovetoRel')
   @DocsEditable()
-  PathSegMovetoRel createSvgPathSegMovetoRel(num x, num y) => wrap_jso(_blink.BlinkSVGPathElement.instance.createSVGPathSegMovetoRel_Callback_2_(unwrap_jso(this), x, y));
+  PathSegMovetoRel createSvgPathSegMovetoRel(num x, num y) => _blink.BlinkSVGPathElement.instance.createSVGPathSegMovetoRel_Callback_2_(this, x, y);
   
   @DomName('SVGPathElement.getPathSegAtLength')
   @DocsEditable()
-  int getPathSegAtLength(num distance) => _blink.BlinkSVGPathElement.instance.getPathSegAtLength_Callback_1_(unwrap_jso(this), distance);
+  int getPathSegAtLength(num distance) => _blink.BlinkSVGPathElement.instance.getPathSegAtLength_Callback_1_(this, distance);
   
   @DomName('SVGPathElement.getPointAtLength')
   @DocsEditable()
-  Point getPointAtLength(num distance) => wrap_jso(_blink.BlinkSVGPathElement.instance.getPointAtLength_Callback_1_(unwrap_jso(this), distance));
+  Point getPointAtLength(num distance) => _blink.BlinkSVGPathElement.instance.getPointAtLength_Callback_1_(this, distance);
   
   @DomName('SVGPathElement.getTotalLength')
   @DocsEditable()
-  num getTotalLength() => _blink.BlinkSVGPathElement.instance.getTotalLength_Callback_0_(unwrap_jso(this));
+  num getTotalLength() => _blink.BlinkSVGPathElement.instance.getTotalLength_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4669,21 +4114,13 @@
   // To suppress missing implicit constructor warnings.
   factory PathSeg._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PathSeg internalCreatePathSeg() {
-    return new PathSeg._internalWrap();
-  }
 
-  factory PathSeg._internalWrap() {
-    return new PathSeg.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSeg.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGPathSeg.PATHSEG_ARC_ABS')
   @DocsEditable()
   static const int PATHSEG_ARC_ABS = 10;
@@ -4766,11 +4203,11 @@
 
   @DomName('SVGPathSeg.pathSegType')
   @DocsEditable()
-  int get pathSegType => _blink.BlinkSVGPathSeg.instance.pathSegType_Getter_(unwrap_jso(this));
+  int get pathSegType => _blink.BlinkSVGPathSeg.instance.pathSegType_Getter_(this);
   
   @DomName('SVGPathSeg.pathSegTypeAsLetter')
   @DocsEditable()
-  String get pathSegTypeAsLetter => _blink.BlinkSVGPathSeg.instance.pathSegTypeAsLetter_Getter_(unwrap_jso(this));
+  String get pathSegTypeAsLetter => _blink.BlinkSVGPathSeg.instance.pathSegTypeAsLetter_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4789,11 +4226,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegArcAbs internalCreatePathSegArcAbs() {
-    return new PathSegArcAbs._internalWrap();
-  }
-
-  external factory PathSegArcAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegArcAbs.internal_() : super.internal_();
@@ -4801,59 +4234,59 @@
 
   @DomName('SVGPathSegArcAbs.angle')
   @DocsEditable()
-  num get angle => _blink.BlinkSVGPathSegArcAbs.instance.angle_Getter_(unwrap_jso(this));
+  num get angle => _blink.BlinkSVGPathSegArcAbs.instance.angle_Getter_(this);
   
   @DomName('SVGPathSegArcAbs.angle')
   @DocsEditable()
-  set angle(num value) => _blink.BlinkSVGPathSegArcAbs.instance.angle_Setter_(unwrap_jso(this), value);
+  set angle(num value) => _blink.BlinkSVGPathSegArcAbs.instance.angle_Setter_(this, value);
   
   @DomName('SVGPathSegArcAbs.largeArcFlag')
   @DocsEditable()
-  bool get largeArcFlag => _blink.BlinkSVGPathSegArcAbs.instance.largeArcFlag_Getter_(unwrap_jso(this));
+  bool get largeArcFlag => _blink.BlinkSVGPathSegArcAbs.instance.largeArcFlag_Getter_(this);
   
   @DomName('SVGPathSegArcAbs.largeArcFlag')
   @DocsEditable()
-  set largeArcFlag(bool value) => _blink.BlinkSVGPathSegArcAbs.instance.largeArcFlag_Setter_(unwrap_jso(this), value);
+  set largeArcFlag(bool value) => _blink.BlinkSVGPathSegArcAbs.instance.largeArcFlag_Setter_(this, value);
   
   @DomName('SVGPathSegArcAbs.r1')
   @DocsEditable()
-  num get r1 => _blink.BlinkSVGPathSegArcAbs.instance.r1_Getter_(unwrap_jso(this));
+  num get r1 => _blink.BlinkSVGPathSegArcAbs.instance.r1_Getter_(this);
   
   @DomName('SVGPathSegArcAbs.r1')
   @DocsEditable()
-  set r1(num value) => _blink.BlinkSVGPathSegArcAbs.instance.r1_Setter_(unwrap_jso(this), value);
+  set r1(num value) => _blink.BlinkSVGPathSegArcAbs.instance.r1_Setter_(this, value);
   
   @DomName('SVGPathSegArcAbs.r2')
   @DocsEditable()
-  num get r2 => _blink.BlinkSVGPathSegArcAbs.instance.r2_Getter_(unwrap_jso(this));
+  num get r2 => _blink.BlinkSVGPathSegArcAbs.instance.r2_Getter_(this);
   
   @DomName('SVGPathSegArcAbs.r2')
   @DocsEditable()
-  set r2(num value) => _blink.BlinkSVGPathSegArcAbs.instance.r2_Setter_(unwrap_jso(this), value);
+  set r2(num value) => _blink.BlinkSVGPathSegArcAbs.instance.r2_Setter_(this, value);
   
   @DomName('SVGPathSegArcAbs.sweepFlag')
   @DocsEditable()
-  bool get sweepFlag => _blink.BlinkSVGPathSegArcAbs.instance.sweepFlag_Getter_(unwrap_jso(this));
+  bool get sweepFlag => _blink.BlinkSVGPathSegArcAbs.instance.sweepFlag_Getter_(this);
   
   @DomName('SVGPathSegArcAbs.sweepFlag')
   @DocsEditable()
-  set sweepFlag(bool value) => _blink.BlinkSVGPathSegArcAbs.instance.sweepFlag_Setter_(unwrap_jso(this), value);
+  set sweepFlag(bool value) => _blink.BlinkSVGPathSegArcAbs.instance.sweepFlag_Setter_(this, value);
   
   @DomName('SVGPathSegArcAbs.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegArcAbs.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegArcAbs.instance.x_Getter_(this);
   
   @DomName('SVGPathSegArcAbs.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegArcAbs.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegArcAbs.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegArcAbs.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegArcAbs.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegArcAbs.instance.y_Getter_(this);
   
   @DomName('SVGPathSegArcAbs.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegArcAbs.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegArcAbs.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4872,11 +4305,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegArcRel internalCreatePathSegArcRel() {
-    return new PathSegArcRel._internalWrap();
-  }
-
-  external factory PathSegArcRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegArcRel.internal_() : super.internal_();
@@ -4884,59 +4313,59 @@
 
   @DomName('SVGPathSegArcRel.angle')
   @DocsEditable()
-  num get angle => _blink.BlinkSVGPathSegArcRel.instance.angle_Getter_(unwrap_jso(this));
+  num get angle => _blink.BlinkSVGPathSegArcRel.instance.angle_Getter_(this);
   
   @DomName('SVGPathSegArcRel.angle')
   @DocsEditable()
-  set angle(num value) => _blink.BlinkSVGPathSegArcRel.instance.angle_Setter_(unwrap_jso(this), value);
+  set angle(num value) => _blink.BlinkSVGPathSegArcRel.instance.angle_Setter_(this, value);
   
   @DomName('SVGPathSegArcRel.largeArcFlag')
   @DocsEditable()
-  bool get largeArcFlag => _blink.BlinkSVGPathSegArcRel.instance.largeArcFlag_Getter_(unwrap_jso(this));
+  bool get largeArcFlag => _blink.BlinkSVGPathSegArcRel.instance.largeArcFlag_Getter_(this);
   
   @DomName('SVGPathSegArcRel.largeArcFlag')
   @DocsEditable()
-  set largeArcFlag(bool value) => _blink.BlinkSVGPathSegArcRel.instance.largeArcFlag_Setter_(unwrap_jso(this), value);
+  set largeArcFlag(bool value) => _blink.BlinkSVGPathSegArcRel.instance.largeArcFlag_Setter_(this, value);
   
   @DomName('SVGPathSegArcRel.r1')
   @DocsEditable()
-  num get r1 => _blink.BlinkSVGPathSegArcRel.instance.r1_Getter_(unwrap_jso(this));
+  num get r1 => _blink.BlinkSVGPathSegArcRel.instance.r1_Getter_(this);
   
   @DomName('SVGPathSegArcRel.r1')
   @DocsEditable()
-  set r1(num value) => _blink.BlinkSVGPathSegArcRel.instance.r1_Setter_(unwrap_jso(this), value);
+  set r1(num value) => _blink.BlinkSVGPathSegArcRel.instance.r1_Setter_(this, value);
   
   @DomName('SVGPathSegArcRel.r2')
   @DocsEditable()
-  num get r2 => _blink.BlinkSVGPathSegArcRel.instance.r2_Getter_(unwrap_jso(this));
+  num get r2 => _blink.BlinkSVGPathSegArcRel.instance.r2_Getter_(this);
   
   @DomName('SVGPathSegArcRel.r2')
   @DocsEditable()
-  set r2(num value) => _blink.BlinkSVGPathSegArcRel.instance.r2_Setter_(unwrap_jso(this), value);
+  set r2(num value) => _blink.BlinkSVGPathSegArcRel.instance.r2_Setter_(this, value);
   
   @DomName('SVGPathSegArcRel.sweepFlag')
   @DocsEditable()
-  bool get sweepFlag => _blink.BlinkSVGPathSegArcRel.instance.sweepFlag_Getter_(unwrap_jso(this));
+  bool get sweepFlag => _blink.BlinkSVGPathSegArcRel.instance.sweepFlag_Getter_(this);
   
   @DomName('SVGPathSegArcRel.sweepFlag')
   @DocsEditable()
-  set sweepFlag(bool value) => _blink.BlinkSVGPathSegArcRel.instance.sweepFlag_Setter_(unwrap_jso(this), value);
+  set sweepFlag(bool value) => _blink.BlinkSVGPathSegArcRel.instance.sweepFlag_Setter_(this, value);
   
   @DomName('SVGPathSegArcRel.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegArcRel.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegArcRel.instance.x_Getter_(this);
   
   @DomName('SVGPathSegArcRel.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegArcRel.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegArcRel.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegArcRel.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegArcRel.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegArcRel.instance.y_Getter_(this);
   
   @DomName('SVGPathSegArcRel.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegArcRel.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegArcRel.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -4955,11 +4384,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegClosePath internalCreatePathSegClosePath() {
-    return new PathSegClosePath._internalWrap();
-  }
-
-  external factory PathSegClosePath._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegClosePath.internal_() : super.internal_();
@@ -4982,11 +4407,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegCurvetoCubicAbs internalCreatePathSegCurvetoCubicAbs() {
-    return new PathSegCurvetoCubicAbs._internalWrap();
-  }
-
-  external factory PathSegCurvetoCubicAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegCurvetoCubicAbs.internal_() : super.internal_();
@@ -4994,51 +4415,51 @@
 
   @DomName('SVGPathSegCurvetoCubicAbs.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicAbs.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicAbs.x1')
   @DocsEditable()
-  num get x1 => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x1_Getter_(unwrap_jso(this));
+  num get x1 => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x1_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicAbs.x1')
   @DocsEditable()
-  set x1(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x1_Setter_(unwrap_jso(this), value);
+  set x1(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x1_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicAbs.x2')
   @DocsEditable()
-  num get x2 => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x2_Getter_(unwrap_jso(this));
+  num get x2 => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x2_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicAbs.x2')
   @DocsEditable()
-  set x2(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x2_Setter_(unwrap_jso(this), value);
+  set x2(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.x2_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicAbs.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicAbs.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicAbs.y1')
   @DocsEditable()
-  num get y1 => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y1_Getter_(unwrap_jso(this));
+  num get y1 => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y1_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicAbs.y1')
   @DocsEditable()
-  set y1(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y1_Setter_(unwrap_jso(this), value);
+  set y1(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y1_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicAbs.y2')
   @DocsEditable()
-  num get y2 => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y2_Getter_(unwrap_jso(this));
+  num get y2 => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y2_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicAbs.y2')
   @DocsEditable()
-  set y2(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y2_Setter_(unwrap_jso(this), value);
+  set y2(num value) => _blink.BlinkSVGPathSegCurvetoCubicAbs.instance.y2_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5057,11 +4478,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegCurvetoCubicRel internalCreatePathSegCurvetoCubicRel() {
-    return new PathSegCurvetoCubicRel._internalWrap();
-  }
-
-  external factory PathSegCurvetoCubicRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegCurvetoCubicRel.internal_() : super.internal_();
@@ -5069,51 +4486,51 @@
 
   @DomName('SVGPathSegCurvetoCubicRel.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicRel.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicRel.x1')
   @DocsEditable()
-  num get x1 => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x1_Getter_(unwrap_jso(this));
+  num get x1 => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x1_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicRel.x1')
   @DocsEditable()
-  set x1(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x1_Setter_(unwrap_jso(this), value);
+  set x1(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x1_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicRel.x2')
   @DocsEditable()
-  num get x2 => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x2_Getter_(unwrap_jso(this));
+  num get x2 => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x2_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicRel.x2')
   @DocsEditable()
-  set x2(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x2_Setter_(unwrap_jso(this), value);
+  set x2(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.x2_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicRel.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicRel.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicRel.y1')
   @DocsEditable()
-  num get y1 => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y1_Getter_(unwrap_jso(this));
+  num get y1 => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y1_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicRel.y1')
   @DocsEditable()
-  set y1(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y1_Setter_(unwrap_jso(this), value);
+  set y1(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y1_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicRel.y2')
   @DocsEditable()
-  num get y2 => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y2_Getter_(unwrap_jso(this));
+  num get y2 => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y2_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicRel.y2')
   @DocsEditable()
-  set y2(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y2_Setter_(unwrap_jso(this), value);
+  set y2(num value) => _blink.BlinkSVGPathSegCurvetoCubicRel.instance.y2_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5132,11 +4549,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegCurvetoCubicSmoothAbs internalCreatePathSegCurvetoCubicSmoothAbs() {
-    return new PathSegCurvetoCubicSmoothAbs._internalWrap();
-  }
-
-  external factory PathSegCurvetoCubicSmoothAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegCurvetoCubicSmoothAbs.internal_() : super.internal_();
@@ -5144,35 +4557,35 @@
 
   @DomName('SVGPathSegCurvetoCubicSmoothAbs.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.x_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicSmoothAbs.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicSmoothAbs.x2')
   @DocsEditable()
-  num get x2 => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.x2_Getter_(unwrap_jso(this));
+  num get x2 => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.x2_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicSmoothAbs.x2')
   @DocsEditable()
-  set x2(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.x2_Setter_(unwrap_jso(this), value);
+  set x2(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.x2_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicSmoothAbs.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.y_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicSmoothAbs.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.y_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicSmoothAbs.y2')
   @DocsEditable()
-  num get y2 => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.y2_Getter_(unwrap_jso(this));
+  num get y2 => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.y2_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicSmoothAbs.y2')
   @DocsEditable()
-  set y2(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.y2_Setter_(unwrap_jso(this), value);
+  set y2(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothAbs.instance.y2_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5191,11 +4604,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegCurvetoCubicSmoothRel internalCreatePathSegCurvetoCubicSmoothRel() {
-    return new PathSegCurvetoCubicSmoothRel._internalWrap();
-  }
-
-  external factory PathSegCurvetoCubicSmoothRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegCurvetoCubicSmoothRel.internal_() : super.internal_();
@@ -5203,35 +4612,35 @@
 
   @DomName('SVGPathSegCurvetoCubicSmoothRel.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.x_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicSmoothRel.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicSmoothRel.x2')
   @DocsEditable()
-  num get x2 => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.x2_Getter_(unwrap_jso(this));
+  num get x2 => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.x2_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicSmoothRel.x2')
   @DocsEditable()
-  set x2(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.x2_Setter_(unwrap_jso(this), value);
+  set x2(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.x2_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicSmoothRel.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.y_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicSmoothRel.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.y_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoCubicSmoothRel.y2')
   @DocsEditable()
-  num get y2 => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.y2_Getter_(unwrap_jso(this));
+  num get y2 => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.y2_Getter_(this);
   
   @DomName('SVGPathSegCurvetoCubicSmoothRel.y2')
   @DocsEditable()
-  set y2(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.y2_Setter_(unwrap_jso(this), value);
+  set y2(num value) => _blink.BlinkSVGPathSegCurvetoCubicSmoothRel.instance.y2_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5250,11 +4659,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegCurvetoQuadraticAbs internalCreatePathSegCurvetoQuadraticAbs() {
-    return new PathSegCurvetoQuadraticAbs._internalWrap();
-  }
-
-  external factory PathSegCurvetoQuadraticAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegCurvetoQuadraticAbs.internal_() : super.internal_();
@@ -5262,35 +4667,35 @@
 
   @DomName('SVGPathSegCurvetoQuadraticAbs.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.x_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticAbs.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoQuadraticAbs.x1')
   @DocsEditable()
-  num get x1 => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.x1_Getter_(unwrap_jso(this));
+  num get x1 => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.x1_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticAbs.x1')
   @DocsEditable()
-  set x1(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.x1_Setter_(unwrap_jso(this), value);
+  set x1(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.x1_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoQuadraticAbs.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.y_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticAbs.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.y_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoQuadraticAbs.y1')
   @DocsEditable()
-  num get y1 => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.y1_Getter_(unwrap_jso(this));
+  num get y1 => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.y1_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticAbs.y1')
   @DocsEditable()
-  set y1(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.y1_Setter_(unwrap_jso(this), value);
+  set y1(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticAbs.instance.y1_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5309,11 +4714,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegCurvetoQuadraticRel internalCreatePathSegCurvetoQuadraticRel() {
-    return new PathSegCurvetoQuadraticRel._internalWrap();
-  }
-
-  external factory PathSegCurvetoQuadraticRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegCurvetoQuadraticRel.internal_() : super.internal_();
@@ -5321,35 +4722,35 @@
 
   @DomName('SVGPathSegCurvetoQuadraticRel.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.x_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticRel.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoQuadraticRel.x1')
   @DocsEditable()
-  num get x1 => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.x1_Getter_(unwrap_jso(this));
+  num get x1 => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.x1_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticRel.x1')
   @DocsEditable()
-  set x1(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.x1_Setter_(unwrap_jso(this), value);
+  set x1(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.x1_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoQuadraticRel.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.y_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticRel.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.y_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoQuadraticRel.y1')
   @DocsEditable()
-  num get y1 => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.y1_Getter_(unwrap_jso(this));
+  num get y1 => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.y1_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticRel.y1')
   @DocsEditable()
-  set y1(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.y1_Setter_(unwrap_jso(this), value);
+  set y1(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticRel.instance.y1_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5368,11 +4769,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegCurvetoQuadraticSmoothAbs internalCreatePathSegCurvetoQuadraticSmoothAbs() {
-    return new PathSegCurvetoQuadraticSmoothAbs._internalWrap();
-  }
-
-  external factory PathSegCurvetoQuadraticSmoothAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegCurvetoQuadraticSmoothAbs.internal_() : super.internal_();
@@ -5380,19 +4777,19 @@
 
   @DomName('SVGPathSegCurvetoQuadraticSmoothAbs.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothAbs.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothAbs.instance.x_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticSmoothAbs.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothAbs.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothAbs.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoQuadraticSmoothAbs.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothAbs.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothAbs.instance.y_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticSmoothAbs.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothAbs.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothAbs.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5411,11 +4808,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegCurvetoQuadraticSmoothRel internalCreatePathSegCurvetoQuadraticSmoothRel() {
-    return new PathSegCurvetoQuadraticSmoothRel._internalWrap();
-  }
-
-  external factory PathSegCurvetoQuadraticSmoothRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegCurvetoQuadraticSmoothRel.internal_() : super.internal_();
@@ -5423,19 +4816,19 @@
 
   @DomName('SVGPathSegCurvetoQuadraticSmoothRel.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothRel.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothRel.instance.x_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticSmoothRel.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothRel.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothRel.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegCurvetoQuadraticSmoothRel.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothRel.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothRel.instance.y_Getter_(this);
   
   @DomName('SVGPathSegCurvetoQuadraticSmoothRel.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothRel.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegCurvetoQuadraticSmoothRel.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5454,11 +4847,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegLinetoAbs internalCreatePathSegLinetoAbs() {
-    return new PathSegLinetoAbs._internalWrap();
-  }
-
-  external factory PathSegLinetoAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegLinetoAbs.internal_() : super.internal_();
@@ -5466,19 +4855,19 @@
 
   @DomName('SVGPathSegLinetoAbs.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegLinetoAbs.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegLinetoAbs.instance.x_Getter_(this);
   
   @DomName('SVGPathSegLinetoAbs.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegLinetoAbs.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegLinetoAbs.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegLinetoAbs.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegLinetoAbs.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegLinetoAbs.instance.y_Getter_(this);
   
   @DomName('SVGPathSegLinetoAbs.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegLinetoAbs.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegLinetoAbs.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5497,11 +4886,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegLinetoHorizontalAbs internalCreatePathSegLinetoHorizontalAbs() {
-    return new PathSegLinetoHorizontalAbs._internalWrap();
-  }
-
-  external factory PathSegLinetoHorizontalAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegLinetoHorizontalAbs.internal_() : super.internal_();
@@ -5509,11 +4894,11 @@
 
   @DomName('SVGPathSegLinetoHorizontalAbs.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegLinetoHorizontalAbs.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegLinetoHorizontalAbs.instance.x_Getter_(this);
   
   @DomName('SVGPathSegLinetoHorizontalAbs.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegLinetoHorizontalAbs.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegLinetoHorizontalAbs.instance.x_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5532,11 +4917,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegLinetoHorizontalRel internalCreatePathSegLinetoHorizontalRel() {
-    return new PathSegLinetoHorizontalRel._internalWrap();
-  }
-
-  external factory PathSegLinetoHorizontalRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegLinetoHorizontalRel.internal_() : super.internal_();
@@ -5544,11 +4925,11 @@
 
   @DomName('SVGPathSegLinetoHorizontalRel.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegLinetoHorizontalRel.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegLinetoHorizontalRel.instance.x_Getter_(this);
   
   @DomName('SVGPathSegLinetoHorizontalRel.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegLinetoHorizontalRel.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegLinetoHorizontalRel.instance.x_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5567,11 +4948,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegLinetoRel internalCreatePathSegLinetoRel() {
-    return new PathSegLinetoRel._internalWrap();
-  }
-
-  external factory PathSegLinetoRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegLinetoRel.internal_() : super.internal_();
@@ -5579,19 +4956,19 @@
 
   @DomName('SVGPathSegLinetoRel.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegLinetoRel.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegLinetoRel.instance.x_Getter_(this);
   
   @DomName('SVGPathSegLinetoRel.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegLinetoRel.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegLinetoRel.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegLinetoRel.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegLinetoRel.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegLinetoRel.instance.y_Getter_(this);
   
   @DomName('SVGPathSegLinetoRel.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegLinetoRel.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegLinetoRel.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5610,11 +4987,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegLinetoVerticalAbs internalCreatePathSegLinetoVerticalAbs() {
-    return new PathSegLinetoVerticalAbs._internalWrap();
-  }
-
-  external factory PathSegLinetoVerticalAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegLinetoVerticalAbs.internal_() : super.internal_();
@@ -5622,11 +4995,11 @@
 
   @DomName('SVGPathSegLinetoVerticalAbs.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegLinetoVerticalAbs.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegLinetoVerticalAbs.instance.y_Getter_(this);
   
   @DomName('SVGPathSegLinetoVerticalAbs.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegLinetoVerticalAbs.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegLinetoVerticalAbs.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5645,11 +5018,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegLinetoVerticalRel internalCreatePathSegLinetoVerticalRel() {
-    return new PathSegLinetoVerticalRel._internalWrap();
-  }
-
-  external factory PathSegLinetoVerticalRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegLinetoVerticalRel.internal_() : super.internal_();
@@ -5657,11 +5026,11 @@
 
   @DomName('SVGPathSegLinetoVerticalRel.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegLinetoVerticalRel.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegLinetoVerticalRel.instance.y_Getter_(this);
   
   @DomName('SVGPathSegLinetoVerticalRel.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegLinetoVerticalRel.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegLinetoVerticalRel.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5678,29 +5047,21 @@
   // To suppress missing implicit constructor warnings.
   factory PathSegList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PathSegList internalCreatePathSegList() {
-    return new PathSegList._internalWrap();
-  }
 
-  factory PathSegList._internalWrap() {
-    return new PathSegList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGPathSegList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkSVGPathSegList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSVGPathSegList.instance.length_Getter_(this);
   
   @DomName('SVGPathSegList.numberOfItems')
   @DocsEditable()
-  int get numberOfItems => _blink.BlinkSVGPathSegList.instance.numberOfItems_Getter_(unwrap_jso(this));
+  int get numberOfItems => _blink.BlinkSVGPathSegList.instance.numberOfItems_Getter_(this);
   
   PathSeg operator[](int index) {
     if (index < 0 || index >= length)
@@ -5749,35 +5110,35 @@
   @DomName('SVGPathSegList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, PathSeg value) => _blink.BlinkSVGPathSegList.instance.$__setter___Callback_2_(unwrap_jso(this), index, unwrap_jso(value));
+  void __setter__(int index, PathSeg newItem) => _blink.BlinkSVGPathSegList.instance.$__setter___Callback_2_(this, index, newItem);
   
   @DomName('SVGPathSegList.appendItem')
   @DocsEditable()
-  PathSeg appendItem(PathSeg newItem) => wrap_jso(_blink.BlinkSVGPathSegList.instance.appendItem_Callback_1_(unwrap_jso(this), unwrap_jso(newItem)));
+  PathSeg appendItem(PathSeg newItem) => _blink.BlinkSVGPathSegList.instance.appendItem_Callback_1_(this, newItem);
   
   @DomName('SVGPathSegList.clear')
   @DocsEditable()
-  void clear() => _blink.BlinkSVGPathSegList.instance.clear_Callback_0_(unwrap_jso(this));
+  void clear() => _blink.BlinkSVGPathSegList.instance.clear_Callback_0_(this);
   
   @DomName('SVGPathSegList.getItem')
   @DocsEditable()
-  PathSeg getItem(int index) => wrap_jso(_blink.BlinkSVGPathSegList.instance.getItem_Callback_1_(unwrap_jso(this), index));
+  PathSeg getItem(int index) => _blink.BlinkSVGPathSegList.instance.getItem_Callback_1_(this, index);
   
   @DomName('SVGPathSegList.initialize')
   @DocsEditable()
-  PathSeg initialize(PathSeg newItem) => wrap_jso(_blink.BlinkSVGPathSegList.instance.initialize_Callback_1_(unwrap_jso(this), unwrap_jso(newItem)));
+  PathSeg initialize(PathSeg newItem) => _blink.BlinkSVGPathSegList.instance.initialize_Callback_1_(this, newItem);
   
   @DomName('SVGPathSegList.insertItemBefore')
   @DocsEditable()
-  PathSeg insertItemBefore(PathSeg newItem, int index) => wrap_jso(_blink.BlinkSVGPathSegList.instance.insertItemBefore_Callback_2_(unwrap_jso(this), unwrap_jso(newItem), index));
+  PathSeg insertItemBefore(PathSeg newItem, int index) => _blink.BlinkSVGPathSegList.instance.insertItemBefore_Callback_2_(this, newItem, index);
   
   @DomName('SVGPathSegList.removeItem')
   @DocsEditable()
-  PathSeg removeItem(int index) => wrap_jso(_blink.BlinkSVGPathSegList.instance.removeItem_Callback_1_(unwrap_jso(this), index));
+  PathSeg removeItem(int index) => _blink.BlinkSVGPathSegList.instance.removeItem_Callback_1_(this, index);
   
   @DomName('SVGPathSegList.replaceItem')
   @DocsEditable()
-  PathSeg replaceItem(PathSeg newItem, int index) => wrap_jso(_blink.BlinkSVGPathSegList.instance.replaceItem_Callback_2_(unwrap_jso(this), unwrap_jso(newItem), index));
+  PathSeg replaceItem(PathSeg newItem, int index) => _blink.BlinkSVGPathSegList.instance.replaceItem_Callback_2_(this, newItem, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5796,11 +5157,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegMovetoAbs internalCreatePathSegMovetoAbs() {
-    return new PathSegMovetoAbs._internalWrap();
-  }
-
-  external factory PathSegMovetoAbs._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegMovetoAbs.internal_() : super.internal_();
@@ -5808,19 +5165,19 @@
 
   @DomName('SVGPathSegMovetoAbs.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegMovetoAbs.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegMovetoAbs.instance.x_Getter_(this);
   
   @DomName('SVGPathSegMovetoAbs.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegMovetoAbs.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegMovetoAbs.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegMovetoAbs.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegMovetoAbs.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegMovetoAbs.instance.y_Getter_(this);
   
   @DomName('SVGPathSegMovetoAbs.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegMovetoAbs.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegMovetoAbs.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5839,11 +5196,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PathSegMovetoRel internalCreatePathSegMovetoRel() {
-    return new PathSegMovetoRel._internalWrap();
-  }
-
-  external factory PathSegMovetoRel._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PathSegMovetoRel.internal_() : super.internal_();
@@ -5851,19 +5204,19 @@
 
   @DomName('SVGPathSegMovetoRel.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPathSegMovetoRel.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPathSegMovetoRel.instance.x_Getter_(this);
   
   @DomName('SVGPathSegMovetoRel.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPathSegMovetoRel.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPathSegMovetoRel.instance.x_Setter_(this, value);
   
   @DomName('SVGPathSegMovetoRel.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPathSegMovetoRel.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPathSegMovetoRel.instance.y_Getter_(this);
   
   @DomName('SVGPathSegMovetoRel.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPathSegMovetoRel.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPathSegMovetoRel.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5886,11 +5239,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PatternElement internalCreatePatternElement() {
-    return new PatternElement._internalWrap();
-  }
-
-  external factory PatternElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PatternElement.internal_() : super.internal_();
@@ -5904,59 +5253,59 @@
 
   @DomName('SVGPatternElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGPatternElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGPatternElement.instance.height_Getter_(this);
   
   @DomName('SVGPatternElement.patternContentUnits')
   @DocsEditable()
-  AnimatedEnumeration get patternContentUnits => wrap_jso(_blink.BlinkSVGPatternElement.instance.patternContentUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get patternContentUnits => _blink.BlinkSVGPatternElement.instance.patternContentUnits_Getter_(this);
   
   @DomName('SVGPatternElement.patternTransform')
   @DocsEditable()
-  AnimatedTransformList get patternTransform => wrap_jso(_blink.BlinkSVGPatternElement.instance.patternTransform_Getter_(unwrap_jso(this)));
+  AnimatedTransformList get patternTransform => _blink.BlinkSVGPatternElement.instance.patternTransform_Getter_(this);
   
   @DomName('SVGPatternElement.patternUnits')
   @DocsEditable()
-  AnimatedEnumeration get patternUnits => wrap_jso(_blink.BlinkSVGPatternElement.instance.patternUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get patternUnits => _blink.BlinkSVGPatternElement.instance.patternUnits_Getter_(this);
   
   @DomName('SVGPatternElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGPatternElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGPatternElement.instance.width_Getter_(this);
   
   @DomName('SVGPatternElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGPatternElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGPatternElement.instance.x_Getter_(this);
   
   @DomName('SVGPatternElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGPatternElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGPatternElement.instance.y_Getter_(this);
   
   @DomName('SVGPatternElement.preserveAspectRatio')
   @DocsEditable()
-  AnimatedPreserveAspectRatio get preserveAspectRatio => wrap_jso(_blink.BlinkSVGPatternElement.instance.preserveAspectRatio_Getter_(unwrap_jso(this)));
+  AnimatedPreserveAspectRatio get preserveAspectRatio => _blink.BlinkSVGPatternElement.instance.preserveAspectRatio_Getter_(this);
   
   @DomName('SVGPatternElement.viewBox')
   @DocsEditable()
-  AnimatedRect get viewBox => wrap_jso(_blink.BlinkSVGPatternElement.instance.viewBox_Getter_(unwrap_jso(this)));
+  AnimatedRect get viewBox => _blink.BlinkSVGPatternElement.instance.viewBox_Getter_(this);
   
   @DomName('SVGPatternElement.requiredExtensions')
   @DocsEditable()
-  StringList get requiredExtensions => wrap_jso(_blink.BlinkSVGPatternElement.instance.requiredExtensions_Getter_(unwrap_jso(this)));
+  StringList get requiredExtensions => _blink.BlinkSVGPatternElement.instance.requiredExtensions_Getter_(this);
   
   @DomName('SVGPatternElement.requiredFeatures')
   @DocsEditable()
-  StringList get requiredFeatures => wrap_jso(_blink.BlinkSVGPatternElement.instance.requiredFeatures_Getter_(unwrap_jso(this)));
+  StringList get requiredFeatures => _blink.BlinkSVGPatternElement.instance.requiredFeatures_Getter_(this);
   
   @DomName('SVGPatternElement.systemLanguage')
   @DocsEditable()
-  StringList get systemLanguage => wrap_jso(_blink.BlinkSVGPatternElement.instance.systemLanguage_Getter_(unwrap_jso(this)));
+  StringList get systemLanguage => _blink.BlinkSVGPatternElement.instance.systemLanguage_Getter_(this);
   
   @DomName('SVGPatternElement.hasExtension')
   @DocsEditable()
-  bool hasExtension(String extension) => _blink.BlinkSVGPatternElement.instance.hasExtension_Callback_1_(unwrap_jso(this), extension);
+  bool hasExtension(String extension) => _blink.BlinkSVGPatternElement.instance.hasExtension_Callback_1_(this, extension);
   
   @DomName('SVGPatternElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGPatternElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGPatternElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5973,40 +5322,32 @@
   // To suppress missing implicit constructor warnings.
   factory Point._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Point internalCreatePoint() {
-    return new Point._internalWrap();
-  }
 
-  factory Point._internalWrap() {
-    return new Point.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Point.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGPoint.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGPoint.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGPoint.instance.x_Getter_(this);
   
   @DomName('SVGPoint.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGPoint.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGPoint.instance.x_Setter_(this, value);
   
   @DomName('SVGPoint.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGPoint.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGPoint.instance.y_Getter_(this);
   
   @DomName('SVGPoint.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGPoint.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGPoint.instance.y_Setter_(this, value);
   
   @DomName('SVGPoint.matrixTransform')
   @DocsEditable()
-  Point matrixTransform(Matrix matrix) => wrap_jso(_blink.BlinkSVGPoint.instance.matrixTransform_Callback_1_(unwrap_jso(this), unwrap_jso(matrix)));
+  Point matrixTransform(Matrix matrix) => _blink.BlinkSVGPoint.instance.matrixTransform_Callback_1_(this, matrix);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6023,62 +5364,54 @@
   // To suppress missing implicit constructor warnings.
   factory PointList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PointList internalCreatePointList() {
-    return new PointList._internalWrap();
-  }
 
-  factory PointList._internalWrap() {
-    return new PointList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PointList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGPointList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkSVGPointList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSVGPointList.instance.length_Getter_(this);
   
   @DomName('SVGPointList.numberOfItems')
   @DocsEditable()
-  int get numberOfItems => _blink.BlinkSVGPointList.instance.numberOfItems_Getter_(unwrap_jso(this));
+  int get numberOfItems => _blink.BlinkSVGPointList.instance.numberOfItems_Getter_(this);
   
   @DomName('SVGPointList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, Point value) => _blink.BlinkSVGPointList.instance.$__setter___Callback_2_(unwrap_jso(this), index, unwrap_jso(value));
+  void __setter__(int index, Point newItem) => _blink.BlinkSVGPointList.instance.$__setter___Callback_2_(this, index, newItem);
   
   @DomName('SVGPointList.appendItem')
   @DocsEditable()
-  Point appendItem(Point item) => wrap_jso(_blink.BlinkSVGPointList.instance.appendItem_Callback_1_(unwrap_jso(this), unwrap_jso(item)));
+  Point appendItem(Point newItem) => _blink.BlinkSVGPointList.instance.appendItem_Callback_1_(this, newItem);
   
   @DomName('SVGPointList.clear')
   @DocsEditable()
-  void clear() => _blink.BlinkSVGPointList.instance.clear_Callback_0_(unwrap_jso(this));
+  void clear() => _blink.BlinkSVGPointList.instance.clear_Callback_0_(this);
   
   @DomName('SVGPointList.getItem')
   @DocsEditable()
-  Point getItem(int index) => wrap_jso(_blink.BlinkSVGPointList.instance.getItem_Callback_1_(unwrap_jso(this), index));
+  Point getItem(int index) => _blink.BlinkSVGPointList.instance.getItem_Callback_1_(this, index);
   
   @DomName('SVGPointList.initialize')
   @DocsEditable()
-  Point initialize(Point item) => wrap_jso(_blink.BlinkSVGPointList.instance.initialize_Callback_1_(unwrap_jso(this), unwrap_jso(item)));
+  Point initialize(Point newItem) => _blink.BlinkSVGPointList.instance.initialize_Callback_1_(this, newItem);
   
   @DomName('SVGPointList.insertItemBefore')
   @DocsEditable()
-  Point insertItemBefore(Point item, int index) => wrap_jso(_blink.BlinkSVGPointList.instance.insertItemBefore_Callback_2_(unwrap_jso(this), unwrap_jso(item), index));
+  Point insertItemBefore(Point newItem, int index) => _blink.BlinkSVGPointList.instance.insertItemBefore_Callback_2_(this, newItem, index);
   
   @DomName('SVGPointList.removeItem')
   @DocsEditable()
-  Point removeItem(int index) => wrap_jso(_blink.BlinkSVGPointList.instance.removeItem_Callback_1_(unwrap_jso(this), index));
+  Point removeItem(int index) => _blink.BlinkSVGPointList.instance.removeItem_Callback_1_(this, index);
   
   @DomName('SVGPointList.replaceItem')
   @DocsEditable()
-  Point replaceItem(Point item, int index) => wrap_jso(_blink.BlinkSVGPointList.instance.replaceItem_Callback_2_(unwrap_jso(this), unwrap_jso(item), index));
+  Point replaceItem(Point newItem, int index) => _blink.BlinkSVGPointList.instance.replaceItem_Callback_2_(this, newItem, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6101,11 +5434,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PolygonElement internalCreatePolygonElement() {
-    return new PolygonElement._internalWrap();
-  }
-
-  external factory PolygonElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PolygonElement.internal_() : super.internal_();
@@ -6119,11 +5448,11 @@
 
   @DomName('SVGPolygonElement.animatedPoints')
   @DocsEditable()
-  PointList get animatedPoints => wrap_jso(_blink.BlinkSVGPolygonElement.instance.animatedPoints_Getter_(unwrap_jso(this)));
+  PointList get animatedPoints => _blink.BlinkSVGPolygonElement.instance.animatedPoints_Getter_(this);
   
   @DomName('SVGPolygonElement.points')
   @DocsEditable()
-  PointList get points => wrap_jso(_blink.BlinkSVGPolygonElement.instance.points_Getter_(unwrap_jso(this)));
+  PointList get points => _blink.BlinkSVGPolygonElement.instance.points_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6146,11 +5475,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PolylineElement internalCreatePolylineElement() {
-    return new PolylineElement._internalWrap();
-  }
-
-  external factory PolylineElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PolylineElement.internal_() : super.internal_();
@@ -6164,11 +5489,11 @@
 
   @DomName('SVGPolylineElement.animatedPoints')
   @DocsEditable()
-  PointList get animatedPoints => wrap_jso(_blink.BlinkSVGPolylineElement.instance.animatedPoints_Getter_(unwrap_jso(this)));
+  PointList get animatedPoints => _blink.BlinkSVGPolylineElement.instance.animatedPoints_Getter_(this);
   
   @DomName('SVGPolylineElement.points')
   @DocsEditable()
-  PointList get points => wrap_jso(_blink.BlinkSVGPolylineElement.instance.points_Getter_(unwrap_jso(this)));
+  PointList get points => _blink.BlinkSVGPolylineElement.instance.points_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6185,21 +5510,13 @@
   // To suppress missing implicit constructor warnings.
   factory PreserveAspectRatio._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PreserveAspectRatio internalCreatePreserveAspectRatio() {
-    return new PreserveAspectRatio._internalWrap();
-  }
 
-  factory PreserveAspectRatio._internalWrap() {
-    return new PreserveAspectRatio.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PreserveAspectRatio.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET')
   @DocsEditable()
   static const int SVG_MEETORSLICE_MEET = 1;
@@ -6258,19 +5575,19 @@
 
   @DomName('SVGPreserveAspectRatio.align')
   @DocsEditable()
-  int get align => _blink.BlinkSVGPreserveAspectRatio.instance.align_Getter_(unwrap_jso(this));
+  int get align => _blink.BlinkSVGPreserveAspectRatio.instance.align_Getter_(this);
   
   @DomName('SVGPreserveAspectRatio.align')
   @DocsEditable()
-  set align(int value) => _blink.BlinkSVGPreserveAspectRatio.instance.align_Setter_(unwrap_jso(this), value);
+  set align(int value) => _blink.BlinkSVGPreserveAspectRatio.instance.align_Setter_(this, value);
   
   @DomName('SVGPreserveAspectRatio.meetOrSlice')
   @DocsEditable()
-  int get meetOrSlice => _blink.BlinkSVGPreserveAspectRatio.instance.meetOrSlice_Getter_(unwrap_jso(this));
+  int get meetOrSlice => _blink.BlinkSVGPreserveAspectRatio.instance.meetOrSlice_Getter_(this);
   
   @DomName('SVGPreserveAspectRatio.meetOrSlice')
   @DocsEditable()
-  set meetOrSlice(int value) => _blink.BlinkSVGPreserveAspectRatio.instance.meetOrSlice_Setter_(unwrap_jso(this), value);
+  set meetOrSlice(int value) => _blink.BlinkSVGPreserveAspectRatio.instance.meetOrSlice_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6293,11 +5610,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static RadialGradientElement internalCreateRadialGradientElement() {
-    return new RadialGradientElement._internalWrap();
-  }
-
-  external factory RadialGradientElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RadialGradientElement.internal_() : super.internal_();
@@ -6311,27 +5624,27 @@
 
   @DomName('SVGRadialGradientElement.cx')
   @DocsEditable()
-  AnimatedLength get cx => wrap_jso(_blink.BlinkSVGRadialGradientElement.instance.cx_Getter_(unwrap_jso(this)));
+  AnimatedLength get cx => _blink.BlinkSVGRadialGradientElement.instance.cx_Getter_(this);
   
   @DomName('SVGRadialGradientElement.cy')
   @DocsEditable()
-  AnimatedLength get cy => wrap_jso(_blink.BlinkSVGRadialGradientElement.instance.cy_Getter_(unwrap_jso(this)));
+  AnimatedLength get cy => _blink.BlinkSVGRadialGradientElement.instance.cy_Getter_(this);
   
   @DomName('SVGRadialGradientElement.fr')
   @DocsEditable()
-  AnimatedLength get fr => wrap_jso(_blink.BlinkSVGRadialGradientElement.instance.fr_Getter_(unwrap_jso(this)));
+  AnimatedLength get fr => _blink.BlinkSVGRadialGradientElement.instance.fr_Getter_(this);
   
   @DomName('SVGRadialGradientElement.fx')
   @DocsEditable()
-  AnimatedLength get fx => wrap_jso(_blink.BlinkSVGRadialGradientElement.instance.fx_Getter_(unwrap_jso(this)));
+  AnimatedLength get fx => _blink.BlinkSVGRadialGradientElement.instance.fx_Getter_(this);
   
   @DomName('SVGRadialGradientElement.fy')
   @DocsEditable()
-  AnimatedLength get fy => wrap_jso(_blink.BlinkSVGRadialGradientElement.instance.fy_Getter_(unwrap_jso(this)));
+  AnimatedLength get fy => _blink.BlinkSVGRadialGradientElement.instance.fy_Getter_(this);
   
   @DomName('SVGRadialGradientElement.r')
   @DocsEditable()
-  AnimatedLength get r => wrap_jso(_blink.BlinkSVGRadialGradientElement.instance.r_Getter_(unwrap_jso(this)));
+  AnimatedLength get r => _blink.BlinkSVGRadialGradientElement.instance.r_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6348,52 +5661,44 @@
   // To suppress missing implicit constructor warnings.
   factory Rect._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Rect internalCreateRect() {
-    return new Rect._internalWrap();
-  }
 
-  factory Rect._internalWrap() {
-    return new Rect.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Rect.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGRect.height')
   @DocsEditable()
-  num get height => _blink.BlinkSVGRect.instance.height_Getter_(unwrap_jso(this));
+  num get height => _blink.BlinkSVGRect.instance.height_Getter_(this);
   
   @DomName('SVGRect.height')
   @DocsEditable()
-  set height(num value) => _blink.BlinkSVGRect.instance.height_Setter_(unwrap_jso(this), value);
+  set height(num value) => _blink.BlinkSVGRect.instance.height_Setter_(this, value);
   
   @DomName('SVGRect.width')
   @DocsEditable()
-  num get width => _blink.BlinkSVGRect.instance.width_Getter_(unwrap_jso(this));
+  num get width => _blink.BlinkSVGRect.instance.width_Getter_(this);
   
   @DomName('SVGRect.width')
   @DocsEditable()
-  set width(num value) => _blink.BlinkSVGRect.instance.width_Setter_(unwrap_jso(this), value);
+  set width(num value) => _blink.BlinkSVGRect.instance.width_Setter_(this, value);
   
   @DomName('SVGRect.x')
   @DocsEditable()
-  num get x => _blink.BlinkSVGRect.instance.x_Getter_(unwrap_jso(this));
+  num get x => _blink.BlinkSVGRect.instance.x_Getter_(this);
   
   @DomName('SVGRect.x')
   @DocsEditable()
-  set x(num value) => _blink.BlinkSVGRect.instance.x_Setter_(unwrap_jso(this), value);
+  set x(num value) => _blink.BlinkSVGRect.instance.x_Setter_(this, value);
   
   @DomName('SVGRect.y')
   @DocsEditable()
-  num get y => _blink.BlinkSVGRect.instance.y_Getter_(unwrap_jso(this));
+  num get y => _blink.BlinkSVGRect.instance.y_Getter_(this);
   
   @DomName('SVGRect.y')
   @DocsEditable()
-  set y(num value) => _blink.BlinkSVGRect.instance.y_Setter_(unwrap_jso(this), value);
+  set y(num value) => _blink.BlinkSVGRect.instance.y_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6416,11 +5721,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static RectElement internalCreateRectElement() {
-    return new RectElement._internalWrap();
-  }
-
-  external factory RectElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RectElement.internal_() : super.internal_();
@@ -6434,27 +5735,27 @@
 
   @DomName('SVGRectElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGRectElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGRectElement.instance.height_Getter_(this);
   
   @DomName('SVGRectElement.rx')
   @DocsEditable()
-  AnimatedLength get rx => wrap_jso(_blink.BlinkSVGRectElement.instance.rx_Getter_(unwrap_jso(this)));
+  AnimatedLength get rx => _blink.BlinkSVGRectElement.instance.rx_Getter_(this);
   
   @DomName('SVGRectElement.ry')
   @DocsEditable()
-  AnimatedLength get ry => wrap_jso(_blink.BlinkSVGRectElement.instance.ry_Getter_(unwrap_jso(this)));
+  AnimatedLength get ry => _blink.BlinkSVGRectElement.instance.ry_Getter_(this);
   
   @DomName('SVGRectElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGRectElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGRectElement.instance.width_Getter_(this);
   
   @DomName('SVGRectElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGRectElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGRectElement.instance.x_Getter_(this);
   
   @DomName('SVGRectElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGRectElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGRectElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6465,60 +5766,6 @@
 
 
 @DocsEditable()
-@DomName('SVGRenderingIntent')
-@Unstable()
-class RenderingIntent extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory RenderingIntent._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static RenderingIntent internalCreateRenderingIntent() {
-    return new RenderingIntent._internalWrap();
-  }
-
-  factory RenderingIntent._internalWrap() {
-    return new RenderingIntent.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  RenderingIntent.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_ABSOLUTE_COLORIMETRIC')
-  @DocsEditable()
-  static const int RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_AUTO')
-  @DocsEditable()
-  static const int RENDERING_INTENT_AUTO = 1;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_PERCEPTUAL')
-  @DocsEditable()
-  static const int RENDERING_INTENT_PERCEPTUAL = 2;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_RELATIVE_COLORIMETRIC')
-  @DocsEditable()
-  static const int RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_SATURATION')
-  @DocsEditable()
-  static const int RENDERING_INTENT_SATURATION = 4;
-
-  @DomName('SVGRenderingIntent.RENDERING_INTENT_UNKNOWN')
-  @DocsEditable()
-  static const int RENDERING_INTENT_UNKNOWN = 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
 @DomName('SVGScriptElement')
 @Unstable()
 class ScriptElement extends SvgElement implements UriReference {
@@ -6531,11 +5778,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ScriptElement internalCreateScriptElement() {
-    return new ScriptElement._internalWrap();
-  }
-
-  external factory ScriptElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ScriptElement.internal_() : super.internal_();
@@ -6549,15 +5792,15 @@
 
   @DomName('SVGScriptElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkSVGScriptElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkSVGScriptElement.instance.type_Getter_(this);
   
   @DomName('SVGScriptElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkSVGScriptElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkSVGScriptElement.instance.type_Setter_(this, value);
   
   @DomName('SVGScriptElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGScriptElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGScriptElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6583,11 +5826,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SetElement internalCreateSetElement() {
-    return new SetElement._internalWrap();
-  }
-
-  external factory SetElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SetElement.internal_() : super.internal_();
@@ -6623,11 +5862,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static StopElement internalCreateStopElement() {
-    return new StopElement._internalWrap();
-  }
-
-  external factory StopElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StopElement.internal_() : super.internal_();
@@ -6641,7 +5876,7 @@
 
   @DomName('SVGStopElement.offset')
   @DocsEditable()
-  AnimatedNumber get gradientOffset => wrap_jso(_blink.BlinkSVGStopElement.instance.offset_Getter_(unwrap_jso(this)));
+  AnimatedNumber get gradientOffset => _blink.BlinkSVGStopElement.instance.offset_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6658,29 +5893,21 @@
   // To suppress missing implicit constructor warnings.
   factory StringList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static StringList internalCreateStringList() {
-    return new StringList._internalWrap();
-  }
 
-  factory StringList._internalWrap() {
-    return new StringList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StringList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGStringList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkSVGStringList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSVGStringList.instance.length_Getter_(this);
   
   @DomName('SVGStringList.numberOfItems')
   @DocsEditable()
-  int get numberOfItems => _blink.BlinkSVGStringList.instance.numberOfItems_Getter_(unwrap_jso(this));
+  int get numberOfItems => _blink.BlinkSVGStringList.instance.numberOfItems_Getter_(this);
   
   String operator[](int index) {
     if (index < 0 || index >= length)
@@ -6729,35 +5956,35 @@
   @DomName('SVGStringList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, String value) => _blink.BlinkSVGStringList.instance.$__setter___Callback_2_(unwrap_jso(this), index, value);
+  void __setter__(int index, String newItem) => _blink.BlinkSVGStringList.instance.$__setter___Callback_2_(this, index, newItem);
   
   @DomName('SVGStringList.appendItem')
   @DocsEditable()
-  String appendItem(String item) => _blink.BlinkSVGStringList.instance.appendItem_Callback_1_(unwrap_jso(this), item);
+  String appendItem(String newItem) => _blink.BlinkSVGStringList.instance.appendItem_Callback_1_(this, newItem);
   
   @DomName('SVGStringList.clear')
   @DocsEditable()
-  void clear() => _blink.BlinkSVGStringList.instance.clear_Callback_0_(unwrap_jso(this));
+  void clear() => _blink.BlinkSVGStringList.instance.clear_Callback_0_(this);
   
   @DomName('SVGStringList.getItem')
   @DocsEditable()
-  String getItem(int index) => _blink.BlinkSVGStringList.instance.getItem_Callback_1_(unwrap_jso(this), index);
+  String getItem(int index) => _blink.BlinkSVGStringList.instance.getItem_Callback_1_(this, index);
   
   @DomName('SVGStringList.initialize')
   @DocsEditable()
-  String initialize(String item) => _blink.BlinkSVGStringList.instance.initialize_Callback_1_(unwrap_jso(this), item);
+  String initialize(String newItem) => _blink.BlinkSVGStringList.instance.initialize_Callback_1_(this, newItem);
   
   @DomName('SVGStringList.insertItemBefore')
   @DocsEditable()
-  String insertItemBefore(String item, int index) => _blink.BlinkSVGStringList.instance.insertItemBefore_Callback_2_(unwrap_jso(this), item, index);
+  String insertItemBefore(String item, int index) => _blink.BlinkSVGStringList.instance.insertItemBefore_Callback_2_(this, item, index);
   
   @DomName('SVGStringList.removeItem')
   @DocsEditable()
-  String removeItem(int index) => _blink.BlinkSVGStringList.instance.removeItem_Callback_1_(unwrap_jso(this), index);
+  String removeItem(int index) => _blink.BlinkSVGStringList.instance.removeItem_Callback_1_(this, index);
   
   @DomName('SVGStringList.replaceItem')
   @DocsEditable()
-  String replaceItem(String item, int index) => _blink.BlinkSVGStringList.instance.replaceItem_Callback_2_(unwrap_jso(this), item, index);
+  String replaceItem(String newItem, int index) => _blink.BlinkSVGStringList.instance.replaceItem_Callback_2_(this, newItem, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -6781,11 +6008,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static StyleElement internalCreateStyleElement() {
-    return new StyleElement._internalWrap();
-  }
-
-  external factory StyleElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   StyleElement.internal_() : super.internal_();
@@ -6799,40 +6022,40 @@
 
   @DomName('SVGStyleElement.disabled')
   @DocsEditable()
-  bool get disabled => _blink.BlinkSVGStyleElement.instance.disabled_Getter_(unwrap_jso(this));
+  bool get disabled => _blink.BlinkSVGStyleElement.instance.disabled_Getter_(this);
   
   @DomName('SVGStyleElement.disabled')
   @DocsEditable()
-  set disabled(bool value) => _blink.BlinkSVGStyleElement.instance.disabled_Setter_(unwrap_jso(this), value);
+  set disabled(bool value) => _blink.BlinkSVGStyleElement.instance.disabled_Setter_(this, value);
   
   @DomName('SVGStyleElement.media')
   @DocsEditable()
-  String get media => _blink.BlinkSVGStyleElement.instance.media_Getter_(unwrap_jso(this));
+  String get media => _blink.BlinkSVGStyleElement.instance.media_Getter_(this);
   
   @DomName('SVGStyleElement.media')
   @DocsEditable()
-  set media(String value) => _blink.BlinkSVGStyleElement.instance.media_Setter_(unwrap_jso(this), value);
+  set media(String value) => _blink.BlinkSVGStyleElement.instance.media_Setter_(this, value);
   
   @DomName('SVGStyleElement.sheet')
   @DocsEditable()
   @Experimental() // untriaged
-  StyleSheet get sheet => wrap_jso(_blink.BlinkSVGStyleElement.instance.sheet_Getter_(unwrap_jso(this)));
+  StyleSheet get sheet => _blink.BlinkSVGStyleElement.instance.sheet_Getter_(this);
   
   @DomName('SVGStyleElement.title')
   @DocsEditable()
-  String get title => _blink.BlinkSVGStyleElement.instance.title_Getter_(unwrap_jso(this));
+  String get title => _blink.BlinkSVGStyleElement.instance.title_Getter_(this);
   
   @DomName('SVGStyleElement.title')
   @DocsEditable()
-  set title(String value) => _blink.BlinkSVGStyleElement.instance.title_Setter_(unwrap_jso(this), value);
+  set title(String value) => _blink.BlinkSVGStyleElement.instance.title_Setter_(this, value);
   
   @DomName('SVGStyleElement.type')
   @DocsEditable()
-  String get type => _blink.BlinkSVGStyleElement.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkSVGStyleElement.instance.type_Getter_(this);
   
   @DomName('SVGStyleElement.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkSVGStyleElement.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkSVGStyleElement.instance.type_Setter_(this, value);
   
 }
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
@@ -6983,18 +6206,8 @@
   }
 
   set _svgClassName(AnimatedString value) =>
-      _blink.BlinkSVGElement.instance.className_Setter_(unwrap_jso(this), unwrap_jso(value));
+      _blink.BlinkSVGElement.instance.className_Setter_(this, value);
 
-  String get className => _svgClassName.baseVal;
-
-  // Unbelievable hack. We can't create an SvgAnimatedString, but we can get
-  // the existing one and change its baseVal. Then we call the blink setter directly
-  // TODO(alanknight): Handle suppressing the SVGAnimated<*> better
-  set className(String s) {
-    var oldClass = _svgClassName;
-    oldClass.baseVal = s;
-    _svgClassName = oldClass;
-  }
   // To suppress missing implicit constructor warnings.
   factory SvgElement._() { throw new UnsupportedError("Not supported"); }
 
@@ -7260,11 +6473,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SvgElement internalCreateSvgElement() {
-    return new SvgElement._internalWrap();
-  }
-
-  external factory SvgElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SvgElement.internal_() : super.internal_();
@@ -7279,58 +6488,40 @@
   @DomName('SVGElement.className')
   @DocsEditable()
   @Experimental() // untriaged
-  AnimatedString get _svgClassName => wrap_jso(_blink.BlinkSVGElement.instance.className_Getter_(unwrap_jso(this)));
+  AnimatedString get _svgClassName => _blink.BlinkSVGElement.instance.className_Getter_(this);
   
   @DomName('SVGElement.ownerSVGElement')
   @DocsEditable()
-  SvgSvgElement get ownerSvgElement => wrap_jso(_blink.BlinkSVGElement.instance.ownerSVGElement_Getter_(unwrap_jso(this)));
+  SvgSvgElement get ownerSvgElement => _blink.BlinkSVGElement.instance.ownerSVGElement_Getter_(this);
   
   @DomName('SVGElement.style')
   @DocsEditable()
   @Experimental() // untriaged
-  CssStyleDeclaration get style => wrap_jso(_blink.BlinkSVGElement.instance.style_Getter_(unwrap_jso(this)));
+  CssStyleDeclaration get style => _blink.BlinkSVGElement.instance.style_Getter_(this);
   
   @DomName('SVGElement.tabIndex')
   @DocsEditable()
   @Experimental() // untriaged
-  int get tabIndex => _blink.BlinkSVGElement.instance.tabIndex_Getter_(unwrap_jso(this));
+  int get tabIndex => _blink.BlinkSVGElement.instance.tabIndex_Getter_(this);
   
   @DomName('SVGElement.tabIndex')
   @DocsEditable()
   @Experimental() // untriaged
-  set tabIndex(int value) => _blink.BlinkSVGElement.instance.tabIndex_Setter_(unwrap_jso(this), value);
+  set tabIndex(int value) => _blink.BlinkSVGElement.instance.tabIndex_Setter_(this, value);
   
   @DomName('SVGElement.viewportElement')
   @DocsEditable()
-  SvgElement get viewportElement => wrap_jso(_blink.BlinkSVGElement.instance.viewportElement_Getter_(unwrap_jso(this)));
+  SvgElement get viewportElement => _blink.BlinkSVGElement.instance.viewportElement_Getter_(this);
   
-  @DomName('SVGElement.xmlbase')
-  @DocsEditable()
-  String get xmlbase => _blink.BlinkSVGElement.instance.xmlbase_Getter_(unwrap_jso(this));
-  
-  @DomName('SVGElement.xmlbase')
-  @DocsEditable()
-  set xmlbase(String value) => _blink.BlinkSVGElement.instance.xmlbase_Setter_(unwrap_jso(this), value);
-  
-  @DomName('SVGElement.xmllang')
+  @DomName('SVGElement.blur')
   @DocsEditable()
   @Experimental() // untriaged
-  String get xmllang => _blink.BlinkSVGElement.instance.xmllang_Getter_(unwrap_jso(this));
+  void blur() => _blink.BlinkSVGElement.instance.blur_Callback_0_(this);
   
-  @DomName('SVGElement.xmllang')
+  @DomName('SVGElement.focus')
   @DocsEditable()
   @Experimental() // untriaged
-  set xmllang(String value) => _blink.BlinkSVGElement.instance.xmllang_Setter_(unwrap_jso(this), value);
-  
-  @DomName('SVGElement.xmlspace')
-  @DocsEditable()
-  @Experimental() // untriaged
-  String get xmlspace => _blink.BlinkSVGElement.instance.xmlspace_Getter_(unwrap_jso(this));
-  
-  @DomName('SVGElement.xmlspace')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set xmlspace(String value) => _blink.BlinkSVGElement.instance.xmlspace_Setter_(unwrap_jso(this), value);
+  void focus() => _blink.BlinkSVGElement.instance.focus_Callback_0_(this);
   
   @DomName('SVGElement.onabort')
   @DocsEditable()
@@ -7613,11 +6804,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SvgSvgElement internalCreateSvgSvgElement() {
-    return new SvgSvgElement._internalWrap();
-  }
-
-  external factory SvgSvgElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SvgSvgElement.internal_() : super.internal_();
@@ -7631,167 +6818,167 @@
 
   @DomName('SVGSVGElement.currentScale')
   @DocsEditable()
-  num get currentScale => _blink.BlinkSVGSVGElement.instance.currentScale_Getter_(unwrap_jso(this));
+  num get currentScale => _blink.BlinkSVGSVGElement.instance.currentScale_Getter_(this);
   
   @DomName('SVGSVGElement.currentScale')
   @DocsEditable()
-  set currentScale(num value) => _blink.BlinkSVGSVGElement.instance.currentScale_Setter_(unwrap_jso(this), value);
+  set currentScale(num value) => _blink.BlinkSVGSVGElement.instance.currentScale_Setter_(this, value);
   
   @DomName('SVGSVGElement.currentTranslate')
   @DocsEditable()
-  Point get currentTranslate => wrap_jso(_blink.BlinkSVGSVGElement.instance.currentTranslate_Getter_(unwrap_jso(this)));
+  Point get currentTranslate => _blink.BlinkSVGSVGElement.instance.currentTranslate_Getter_(this);
   
   @DomName('SVGSVGElement.currentView')
   @DocsEditable()
-  ViewSpec get currentView => wrap_jso(_blink.BlinkSVGSVGElement.instance.currentView_Getter_(unwrap_jso(this)));
+  ViewSpec get currentView => _blink.BlinkSVGSVGElement.instance.currentView_Getter_(this);
   
   @DomName('SVGSVGElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGSVGElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGSVGElement.instance.height_Getter_(this);
   
   @DomName('SVGSVGElement.pixelUnitToMillimeterX')
   @DocsEditable()
-  num get pixelUnitToMillimeterX => _blink.BlinkSVGSVGElement.instance.pixelUnitToMillimeterX_Getter_(unwrap_jso(this));
+  num get pixelUnitToMillimeterX => _blink.BlinkSVGSVGElement.instance.pixelUnitToMillimeterX_Getter_(this);
   
   @DomName('SVGSVGElement.pixelUnitToMillimeterY')
   @DocsEditable()
-  num get pixelUnitToMillimeterY => _blink.BlinkSVGSVGElement.instance.pixelUnitToMillimeterY_Getter_(unwrap_jso(this));
+  num get pixelUnitToMillimeterY => _blink.BlinkSVGSVGElement.instance.pixelUnitToMillimeterY_Getter_(this);
   
   @DomName('SVGSVGElement.screenPixelToMillimeterX')
   @DocsEditable()
-  num get screenPixelToMillimeterX => _blink.BlinkSVGSVGElement.instance.screenPixelToMillimeterX_Getter_(unwrap_jso(this));
+  num get screenPixelToMillimeterX => _blink.BlinkSVGSVGElement.instance.screenPixelToMillimeterX_Getter_(this);
   
   @DomName('SVGSVGElement.screenPixelToMillimeterY')
   @DocsEditable()
-  num get screenPixelToMillimeterY => _blink.BlinkSVGSVGElement.instance.screenPixelToMillimeterY_Getter_(unwrap_jso(this));
+  num get screenPixelToMillimeterY => _blink.BlinkSVGSVGElement.instance.screenPixelToMillimeterY_Getter_(this);
   
   @DomName('SVGSVGElement.useCurrentView')
   @DocsEditable()
-  bool get useCurrentView => _blink.BlinkSVGSVGElement.instance.useCurrentView_Getter_(unwrap_jso(this));
+  bool get useCurrentView => _blink.BlinkSVGSVGElement.instance.useCurrentView_Getter_(this);
   
   @DomName('SVGSVGElement.viewport')
   @DocsEditable()
-  Rect get viewport => wrap_jso(_blink.BlinkSVGSVGElement.instance.viewport_Getter_(unwrap_jso(this)));
+  Rect get viewport => _blink.BlinkSVGSVGElement.instance.viewport_Getter_(this);
   
   @DomName('SVGSVGElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGSVGElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGSVGElement.instance.width_Getter_(this);
   
   @DomName('SVGSVGElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGSVGElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGSVGElement.instance.x_Getter_(this);
   
   @DomName('SVGSVGElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGSVGElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGSVGElement.instance.y_Getter_(this);
   
   @DomName('SVGSVGElement.animationsPaused')
   @DocsEditable()
-  bool animationsPaused() => _blink.BlinkSVGSVGElement.instance.animationsPaused_Callback_0_(unwrap_jso(this));
+  bool animationsPaused() => _blink.BlinkSVGSVGElement.instance.animationsPaused_Callback_0_(this);
   
   @DomName('SVGSVGElement.checkEnclosure')
   @DocsEditable()
-  bool checkEnclosure(SvgElement element, Rect rect) => _blink.BlinkSVGSVGElement.instance.checkEnclosure_Callback_2_(unwrap_jso(this), unwrap_jso(element), unwrap_jso(rect));
+  bool checkEnclosure(SvgElement element, Rect rect) => _blink.BlinkSVGSVGElement.instance.checkEnclosure_Callback_2_(this, element, rect);
   
   @DomName('SVGSVGElement.checkIntersection')
   @DocsEditable()
-  bool checkIntersection(SvgElement element, Rect rect) => _blink.BlinkSVGSVGElement.instance.checkIntersection_Callback_2_(unwrap_jso(this), unwrap_jso(element), unwrap_jso(rect));
+  bool checkIntersection(SvgElement element, Rect rect) => _blink.BlinkSVGSVGElement.instance.checkIntersection_Callback_2_(this, element, rect);
   
   @DomName('SVGSVGElement.createSVGAngle')
   @DocsEditable()
-  Angle createSvgAngle() => wrap_jso(_blink.BlinkSVGSVGElement.instance.createSVGAngle_Callback_0_(unwrap_jso(this)));
+  Angle createSvgAngle() => _blink.BlinkSVGSVGElement.instance.createSVGAngle_Callback_0_(this);
   
   @DomName('SVGSVGElement.createSVGLength')
   @DocsEditable()
-  Length createSvgLength() => wrap_jso(_blink.BlinkSVGSVGElement.instance.createSVGLength_Callback_0_(unwrap_jso(this)));
+  Length createSvgLength() => _blink.BlinkSVGSVGElement.instance.createSVGLength_Callback_0_(this);
   
   @DomName('SVGSVGElement.createSVGMatrix')
   @DocsEditable()
-  Matrix createSvgMatrix() => wrap_jso(_blink.BlinkSVGSVGElement.instance.createSVGMatrix_Callback_0_(unwrap_jso(this)));
+  Matrix createSvgMatrix() => _blink.BlinkSVGSVGElement.instance.createSVGMatrix_Callback_0_(this);
   
   @DomName('SVGSVGElement.createSVGNumber')
   @DocsEditable()
-  Number createSvgNumber() => wrap_jso(_blink.BlinkSVGSVGElement.instance.createSVGNumber_Callback_0_(unwrap_jso(this)));
+  Number createSvgNumber() => _blink.BlinkSVGSVGElement.instance.createSVGNumber_Callback_0_(this);
   
   @DomName('SVGSVGElement.createSVGPoint')
   @DocsEditable()
-  Point createSvgPoint() => wrap_jso(_blink.BlinkSVGSVGElement.instance.createSVGPoint_Callback_0_(unwrap_jso(this)));
+  Point createSvgPoint() => _blink.BlinkSVGSVGElement.instance.createSVGPoint_Callback_0_(this);
   
   @DomName('SVGSVGElement.createSVGRect')
   @DocsEditable()
-  Rect createSvgRect() => wrap_jso(_blink.BlinkSVGSVGElement.instance.createSVGRect_Callback_0_(unwrap_jso(this)));
+  Rect createSvgRect() => _blink.BlinkSVGSVGElement.instance.createSVGRect_Callback_0_(this);
   
   @DomName('SVGSVGElement.createSVGTransform')
   @DocsEditable()
-  Transform createSvgTransform() => wrap_jso(_blink.BlinkSVGSVGElement.instance.createSVGTransform_Callback_0_(unwrap_jso(this)));
+  Transform createSvgTransform() => _blink.BlinkSVGSVGElement.instance.createSVGTransform_Callback_0_(this);
   
   @DomName('SVGSVGElement.createSVGTransformFromMatrix')
   @DocsEditable()
-  Transform createSvgTransformFromMatrix(Matrix matrix) => wrap_jso(_blink.BlinkSVGSVGElement.instance.createSVGTransformFromMatrix_Callback_1_(unwrap_jso(this), unwrap_jso(matrix)));
+  Transform createSvgTransformFromMatrix(Matrix matrix) => _blink.BlinkSVGSVGElement.instance.createSVGTransformFromMatrix_Callback_1_(this, matrix);
   
   @DomName('SVGSVGElement.deselectAll')
   @DocsEditable()
-  void deselectAll() => _blink.BlinkSVGSVGElement.instance.deselectAll_Callback_0_(unwrap_jso(this));
+  void deselectAll() => _blink.BlinkSVGSVGElement.instance.deselectAll_Callback_0_(this);
   
   @DomName('SVGSVGElement.forceRedraw')
   @DocsEditable()
-  void forceRedraw() => _blink.BlinkSVGSVGElement.instance.forceRedraw_Callback_0_(unwrap_jso(this));
+  void forceRedraw() => _blink.BlinkSVGSVGElement.instance.forceRedraw_Callback_0_(this);
   
   @DomName('SVGSVGElement.getCurrentTime')
   @DocsEditable()
-  num getCurrentTime() => _blink.BlinkSVGSVGElement.instance.getCurrentTime_Callback_0_(unwrap_jso(this));
+  num getCurrentTime() => _blink.BlinkSVGSVGElement.instance.getCurrentTime_Callback_0_(this);
   
   @DomName('SVGSVGElement.getElementById')
   @DocsEditable()
-  Element getElementById(String elementId) => wrap_jso(_blink.BlinkSVGSVGElement.instance.getElementById_Callback_1_(unwrap_jso(this), elementId));
+  Element getElementById(String elementId) => _blink.BlinkSVGSVGElement.instance.getElementById_Callback_1_(this, elementId);
   
   @DomName('SVGSVGElement.getEnclosureList')
   @DocsEditable()
-  List<Node> getEnclosureList(Rect rect, SvgElement referenceElement) => wrap_jso(_blink.BlinkSVGSVGElement.instance.getEnclosureList_Callback_2_(unwrap_jso(this), unwrap_jso(rect), unwrap_jso(referenceElement)));
+  List<Node> getEnclosureList(Rect rect, SvgElement referenceElement) => (_blink.BlinkSVGSVGElement.instance.getEnclosureList_Callback_2_(this, rect, referenceElement));
   
   @DomName('SVGSVGElement.getIntersectionList')
   @DocsEditable()
-  List<Node> getIntersectionList(Rect rect, SvgElement referenceElement) => wrap_jso(_blink.BlinkSVGSVGElement.instance.getIntersectionList_Callback_2_(unwrap_jso(this), unwrap_jso(rect), unwrap_jso(referenceElement)));
+  List<Node> getIntersectionList(Rect rect, SvgElement referenceElement) => (_blink.BlinkSVGSVGElement.instance.getIntersectionList_Callback_2_(this, rect, referenceElement));
   
   @DomName('SVGSVGElement.pauseAnimations')
   @DocsEditable()
-  void pauseAnimations() => _blink.BlinkSVGSVGElement.instance.pauseAnimations_Callback_0_(unwrap_jso(this));
+  void pauseAnimations() => _blink.BlinkSVGSVGElement.instance.pauseAnimations_Callback_0_(this);
   
   @DomName('SVGSVGElement.setCurrentTime')
   @DocsEditable()
-  void setCurrentTime(num seconds) => _blink.BlinkSVGSVGElement.instance.setCurrentTime_Callback_1_(unwrap_jso(this), seconds);
+  void setCurrentTime(num seconds) => _blink.BlinkSVGSVGElement.instance.setCurrentTime_Callback_1_(this, seconds);
   
   @DomName('SVGSVGElement.suspendRedraw')
   @DocsEditable()
-  int suspendRedraw(int maxWaitMilliseconds) => _blink.BlinkSVGSVGElement.instance.suspendRedraw_Callback_1_(unwrap_jso(this), maxWaitMilliseconds);
+  int suspendRedraw(int maxWaitMilliseconds) => _blink.BlinkSVGSVGElement.instance.suspendRedraw_Callback_1_(this, maxWaitMilliseconds);
   
   @DomName('SVGSVGElement.unpauseAnimations')
   @DocsEditable()
-  void unpauseAnimations() => _blink.BlinkSVGSVGElement.instance.unpauseAnimations_Callback_0_(unwrap_jso(this));
+  void unpauseAnimations() => _blink.BlinkSVGSVGElement.instance.unpauseAnimations_Callback_0_(this);
   
   @DomName('SVGSVGElement.unsuspendRedraw')
   @DocsEditable()
-  void unsuspendRedraw(int suspendHandleId) => _blink.BlinkSVGSVGElement.instance.unsuspendRedraw_Callback_1_(unwrap_jso(this), suspendHandleId);
+  void unsuspendRedraw(int suspendHandleId) => _blink.BlinkSVGSVGElement.instance.unsuspendRedraw_Callback_1_(this, suspendHandleId);
   
   @DomName('SVGSVGElement.unsuspendRedrawAll')
   @DocsEditable()
-  void unsuspendRedrawAll() => _blink.BlinkSVGSVGElement.instance.unsuspendRedrawAll_Callback_0_(unwrap_jso(this));
+  void unsuspendRedrawAll() => _blink.BlinkSVGSVGElement.instance.unsuspendRedrawAll_Callback_0_(this);
   
   @DomName('SVGSVGElement.preserveAspectRatio')
   @DocsEditable()
-  AnimatedPreserveAspectRatio get preserveAspectRatio => wrap_jso(_blink.BlinkSVGSVGElement.instance.preserveAspectRatio_Getter_(unwrap_jso(this)));
+  AnimatedPreserveAspectRatio get preserveAspectRatio => _blink.BlinkSVGSVGElement.instance.preserveAspectRatio_Getter_(this);
   
   @DomName('SVGSVGElement.viewBox')
   @DocsEditable()
-  AnimatedRect get viewBox => wrap_jso(_blink.BlinkSVGSVGElement.instance.viewBox_Getter_(unwrap_jso(this)));
+  AnimatedRect get viewBox => _blink.BlinkSVGSVGElement.instance.viewBox_Getter_(this);
   
   @DomName('SVGSVGElement.zoomAndPan')
   @DocsEditable()
-  int get zoomAndPan => _blink.BlinkSVGSVGElement.instance.zoomAndPan_Getter_(unwrap_jso(this));
+  int get zoomAndPan => _blink.BlinkSVGSVGElement.instance.zoomAndPan_Getter_(this);
   
   @DomName('SVGSVGElement.zoomAndPan')
   @DocsEditable()
-  set zoomAndPan(int value) => _blink.BlinkSVGSVGElement.instance.zoomAndPan_Setter_(unwrap_jso(this), value);
+  set zoomAndPan(int value) => _blink.BlinkSVGSVGElement.instance.zoomAndPan_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -7814,11 +7001,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SwitchElement internalCreateSwitchElement() {
-    return new SwitchElement._internalWrap();
-  }
-
-  external factory SwitchElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SwitchElement.internal_() : super.internal_();
@@ -7851,11 +7034,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static SymbolElement internalCreateSymbolElement() {
-    return new SymbolElement._internalWrap();
-  }
-
-  external factory SymbolElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SymbolElement.internal_() : super.internal_();
@@ -7869,11 +7048,11 @@
 
   @DomName('SVGSymbolElement.preserveAspectRatio')
   @DocsEditable()
-  AnimatedPreserveAspectRatio get preserveAspectRatio => wrap_jso(_blink.BlinkSVGSymbolElement.instance.preserveAspectRatio_Getter_(unwrap_jso(this)));
+  AnimatedPreserveAspectRatio get preserveAspectRatio => _blink.BlinkSVGSymbolElement.instance.preserveAspectRatio_Getter_(this);
   
   @DomName('SVGSymbolElement.viewBox')
   @DocsEditable()
-  AnimatedRect get viewBox => wrap_jso(_blink.BlinkSVGSymbolElement.instance.viewBox_Getter_(unwrap_jso(this)));
+  AnimatedRect get viewBox => _blink.BlinkSVGSymbolElement.instance.viewBox_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -7896,11 +7075,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TSpanElement internalCreateTSpanElement() {
-    return new TSpanElement._internalWrap();
-  }
-
-  external factory TSpanElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TSpanElement.internal_() : super.internal_();
@@ -7960,11 +7135,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextContentElement internalCreateTextContentElement() {
-    return new TextContentElement._internalWrap();
-  }
-
-  external factory TextContentElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextContentElement.internal_() : super.internal_();
@@ -7990,47 +7161,47 @@
 
   @DomName('SVGTextContentElement.lengthAdjust')
   @DocsEditable()
-  AnimatedEnumeration get lengthAdjust => wrap_jso(_blink.BlinkSVGTextContentElement.instance.lengthAdjust_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get lengthAdjust => _blink.BlinkSVGTextContentElement.instance.lengthAdjust_Getter_(this);
   
   @DomName('SVGTextContentElement.textLength')
   @DocsEditable()
-  AnimatedLength get textLength => wrap_jso(_blink.BlinkSVGTextContentElement.instance.textLength_Getter_(unwrap_jso(this)));
+  AnimatedLength get textLength => _blink.BlinkSVGTextContentElement.instance.textLength_Getter_(this);
   
   @DomName('SVGTextContentElement.getCharNumAtPosition')
   @DocsEditable()
-  int getCharNumAtPosition(Point point) => _blink.BlinkSVGTextContentElement.instance.getCharNumAtPosition_Callback_1_(unwrap_jso(this), unwrap_jso(point));
+  int getCharNumAtPosition(Point point) => _blink.BlinkSVGTextContentElement.instance.getCharNumAtPosition_Callback_1_(this, point);
   
   @DomName('SVGTextContentElement.getComputedTextLength')
   @DocsEditable()
-  num getComputedTextLength() => _blink.BlinkSVGTextContentElement.instance.getComputedTextLength_Callback_0_(unwrap_jso(this));
+  num getComputedTextLength() => _blink.BlinkSVGTextContentElement.instance.getComputedTextLength_Callback_0_(this);
   
   @DomName('SVGTextContentElement.getEndPositionOfChar')
   @DocsEditable()
-  Point getEndPositionOfChar(int offset) => wrap_jso(_blink.BlinkSVGTextContentElement.instance.getEndPositionOfChar_Callback_1_(unwrap_jso(this), offset));
+  Point getEndPositionOfChar(int charnum) => _blink.BlinkSVGTextContentElement.instance.getEndPositionOfChar_Callback_1_(this, charnum);
   
   @DomName('SVGTextContentElement.getExtentOfChar')
   @DocsEditable()
-  Rect getExtentOfChar(int offset) => wrap_jso(_blink.BlinkSVGTextContentElement.instance.getExtentOfChar_Callback_1_(unwrap_jso(this), offset));
+  Rect getExtentOfChar(int charnum) => _blink.BlinkSVGTextContentElement.instance.getExtentOfChar_Callback_1_(this, charnum);
   
   @DomName('SVGTextContentElement.getNumberOfChars')
   @DocsEditable()
-  int getNumberOfChars() => _blink.BlinkSVGTextContentElement.instance.getNumberOfChars_Callback_0_(unwrap_jso(this));
+  int getNumberOfChars() => _blink.BlinkSVGTextContentElement.instance.getNumberOfChars_Callback_0_(this);
   
   @DomName('SVGTextContentElement.getRotationOfChar')
   @DocsEditable()
-  num getRotationOfChar(int offset) => _blink.BlinkSVGTextContentElement.instance.getRotationOfChar_Callback_1_(unwrap_jso(this), offset);
+  num getRotationOfChar(int charnum) => _blink.BlinkSVGTextContentElement.instance.getRotationOfChar_Callback_1_(this, charnum);
   
   @DomName('SVGTextContentElement.getStartPositionOfChar')
   @DocsEditable()
-  Point getStartPositionOfChar(int offset) => wrap_jso(_blink.BlinkSVGTextContentElement.instance.getStartPositionOfChar_Callback_1_(unwrap_jso(this), offset));
+  Point getStartPositionOfChar(int charnum) => _blink.BlinkSVGTextContentElement.instance.getStartPositionOfChar_Callback_1_(this, charnum);
   
   @DomName('SVGTextContentElement.getSubStringLength')
   @DocsEditable()
-  num getSubStringLength(int offset, int length) => _blink.BlinkSVGTextContentElement.instance.getSubStringLength_Callback_2_(unwrap_jso(this), offset, length);
+  num getSubStringLength(int charnum, int nchars) => _blink.BlinkSVGTextContentElement.instance.getSubStringLength_Callback_2_(this, charnum, nchars);
   
   @DomName('SVGTextContentElement.selectSubString')
   @DocsEditable()
-  void selectSubString(int offset, int length) => _blink.BlinkSVGTextContentElement.instance.selectSubString_Callback_2_(unwrap_jso(this), offset, length);
+  void selectSubString(int charnum, int nchars) => _blink.BlinkSVGTextContentElement.instance.selectSubString_Callback_2_(this, charnum, nchars);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8053,11 +7224,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextElement internalCreateTextElement() {
-    return new TextElement._internalWrap();
-  }
-
-  external factory TextElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextElement.internal_() : super.internal_();
@@ -8086,11 +7253,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextPathElement internalCreateTextPathElement() {
-    return new TextPathElement._internalWrap();
-  }
-
-  external factory TextPathElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextPathElement.internal_() : super.internal_();
@@ -8128,19 +7291,19 @@
 
   @DomName('SVGTextPathElement.method')
   @DocsEditable()
-  AnimatedEnumeration get method => wrap_jso(_blink.BlinkSVGTextPathElement.instance.method_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get method => _blink.BlinkSVGTextPathElement.instance.method_Getter_(this);
   
   @DomName('SVGTextPathElement.spacing')
   @DocsEditable()
-  AnimatedEnumeration get spacing => wrap_jso(_blink.BlinkSVGTextPathElement.instance.spacing_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get spacing => _blink.BlinkSVGTextPathElement.instance.spacing_Getter_(this);
   
   @DomName('SVGTextPathElement.startOffset')
   @DocsEditable()
-  AnimatedLength get startOffset => wrap_jso(_blink.BlinkSVGTextPathElement.instance.startOffset_Getter_(unwrap_jso(this)));
+  AnimatedLength get startOffset => _blink.BlinkSVGTextPathElement.instance.startOffset_Getter_(this);
   
   @DomName('SVGTextPathElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGTextPathElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGTextPathElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8159,11 +7322,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TextPositioningElement internalCreateTextPositioningElement() {
-    return new TextPositioningElement._internalWrap();
-  }
-
-  external factory TextPositioningElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TextPositioningElement.internal_() : super.internal_();
@@ -8177,23 +7336,23 @@
 
   @DomName('SVGTextPositioningElement.dx')
   @DocsEditable()
-  AnimatedLengthList get dx => wrap_jso(_blink.BlinkSVGTextPositioningElement.instance.dx_Getter_(unwrap_jso(this)));
+  AnimatedLengthList get dx => _blink.BlinkSVGTextPositioningElement.instance.dx_Getter_(this);
   
   @DomName('SVGTextPositioningElement.dy')
   @DocsEditable()
-  AnimatedLengthList get dy => wrap_jso(_blink.BlinkSVGTextPositioningElement.instance.dy_Getter_(unwrap_jso(this)));
+  AnimatedLengthList get dy => _blink.BlinkSVGTextPositioningElement.instance.dy_Getter_(this);
   
   @DomName('SVGTextPositioningElement.rotate')
   @DocsEditable()
-  AnimatedNumberList get rotate => wrap_jso(_blink.BlinkSVGTextPositioningElement.instance.rotate_Getter_(unwrap_jso(this)));
+  AnimatedNumberList get rotate => _blink.BlinkSVGTextPositioningElement.instance.rotate_Getter_(this);
   
   @DomName('SVGTextPositioningElement.x')
   @DocsEditable()
-  AnimatedLengthList get x => wrap_jso(_blink.BlinkSVGTextPositioningElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLengthList get x => _blink.BlinkSVGTextPositioningElement.instance.x_Getter_(this);
   
   @DomName('SVGTextPositioningElement.y')
   @DocsEditable()
-  AnimatedLengthList get y => wrap_jso(_blink.BlinkSVGTextPositioningElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLengthList get y => _blink.BlinkSVGTextPositioningElement.instance.y_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8216,11 +7375,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static TitleElement internalCreateTitleElement() {
-    return new TitleElement._internalWrap();
-  }
-
-  external factory TitleElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TitleElement.internal_() : super.internal_();
@@ -8247,21 +7402,13 @@
   // To suppress missing implicit constructor warnings.
   factory Transform._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Transform internalCreateTransform() {
-    return new Transform._internalWrap();
-  }
 
-  factory Transform._internalWrap() {
-    return new Transform.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Transform.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGTransform.SVG_TRANSFORM_MATRIX')
   @DocsEditable()
   static const int SVG_TRANSFORM_MATRIX = 1;
@@ -8292,39 +7439,39 @@
 
   @DomName('SVGTransform.angle')
   @DocsEditable()
-  num get angle => _blink.BlinkSVGTransform.instance.angle_Getter_(unwrap_jso(this));
+  num get angle => _blink.BlinkSVGTransform.instance.angle_Getter_(this);
   
   @DomName('SVGTransform.matrix')
   @DocsEditable()
-  Matrix get matrix => wrap_jso(_blink.BlinkSVGTransform.instance.matrix_Getter_(unwrap_jso(this)));
+  Matrix get matrix => _blink.BlinkSVGTransform.instance.matrix_Getter_(this);
   
   @DomName('SVGTransform.type')
   @DocsEditable()
-  int get type => _blink.BlinkSVGTransform.instance.type_Getter_(unwrap_jso(this));
+  int get type => _blink.BlinkSVGTransform.instance.type_Getter_(this);
   
   @DomName('SVGTransform.setMatrix')
   @DocsEditable()
-  void setMatrix(Matrix matrix) => _blink.BlinkSVGTransform.instance.setMatrix_Callback_1_(unwrap_jso(this), unwrap_jso(matrix));
+  void setMatrix(Matrix matrix) => _blink.BlinkSVGTransform.instance.setMatrix_Callback_1_(this, matrix);
   
   @DomName('SVGTransform.setRotate')
   @DocsEditable()
-  void setRotate(num angle, num cx, num cy) => _blink.BlinkSVGTransform.instance.setRotate_Callback_3_(unwrap_jso(this), angle, cx, cy);
+  void setRotate(num angle, num cx, num cy) => _blink.BlinkSVGTransform.instance.setRotate_Callback_3_(this, angle, cx, cy);
   
   @DomName('SVGTransform.setScale')
   @DocsEditable()
-  void setScale(num sx, num sy) => _blink.BlinkSVGTransform.instance.setScale_Callback_2_(unwrap_jso(this), sx, sy);
+  void setScale(num sx, num sy) => _blink.BlinkSVGTransform.instance.setScale_Callback_2_(this, sx, sy);
   
   @DomName('SVGTransform.setSkewX')
   @DocsEditable()
-  void setSkewX(num angle) => _blink.BlinkSVGTransform.instance.setSkewX_Callback_1_(unwrap_jso(this), angle);
+  void setSkewX(num angle) => _blink.BlinkSVGTransform.instance.setSkewX_Callback_1_(this, angle);
   
   @DomName('SVGTransform.setSkewY')
   @DocsEditable()
-  void setSkewY(num angle) => _blink.BlinkSVGTransform.instance.setSkewY_Callback_1_(unwrap_jso(this), angle);
+  void setSkewY(num angle) => _blink.BlinkSVGTransform.instance.setSkewY_Callback_1_(this, angle);
   
   @DomName('SVGTransform.setTranslate')
   @DocsEditable()
-  void setTranslate(num tx, num ty) => _blink.BlinkSVGTransform.instance.setTranslate_Callback_2_(unwrap_jso(this), tx, ty);
+  void setTranslate(num tx, num ty) => _blink.BlinkSVGTransform.instance.setTranslate_Callback_2_(this, tx, ty);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8341,29 +7488,21 @@
   // To suppress missing implicit constructor warnings.
   factory TransformList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static TransformList internalCreateTransformList() {
-    return new TransformList._internalWrap();
-  }
 
-  factory TransformList._internalWrap() {
-    return new TransformList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   TransformList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGTransformList.length')
   @DocsEditable()
   @Experimental() // untriaged
-  int get length => _blink.BlinkSVGTransformList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSVGTransformList.instance.length_Getter_(this);
   
   @DomName('SVGTransformList.numberOfItems')
   @DocsEditable()
-  int get numberOfItems => _blink.BlinkSVGTransformList.instance.numberOfItems_Getter_(unwrap_jso(this));
+  int get numberOfItems => _blink.BlinkSVGTransformList.instance.numberOfItems_Getter_(this);
   
   Transform operator[](int index) {
     if (index < 0 || index >= length)
@@ -8412,43 +7551,43 @@
   @DomName('SVGTransformList.__setter__')
   @DocsEditable()
   @Experimental() // untriaged
-  void __setter__(int index, Transform value) => _blink.BlinkSVGTransformList.instance.$__setter___Callback_2_(unwrap_jso(this), index, unwrap_jso(value));
+  void __setter__(int index, Transform newItem) => _blink.BlinkSVGTransformList.instance.$__setter___Callback_2_(this, index, newItem);
   
   @DomName('SVGTransformList.appendItem')
   @DocsEditable()
-  Transform appendItem(Transform item) => wrap_jso(_blink.BlinkSVGTransformList.instance.appendItem_Callback_1_(unwrap_jso(this), unwrap_jso(item)));
+  Transform appendItem(Transform newItem) => _blink.BlinkSVGTransformList.instance.appendItem_Callback_1_(this, newItem);
   
   @DomName('SVGTransformList.clear')
   @DocsEditable()
-  void clear() => _blink.BlinkSVGTransformList.instance.clear_Callback_0_(unwrap_jso(this));
+  void clear() => _blink.BlinkSVGTransformList.instance.clear_Callback_0_(this);
   
   @DomName('SVGTransformList.consolidate')
   @DocsEditable()
-  Transform consolidate() => wrap_jso(_blink.BlinkSVGTransformList.instance.consolidate_Callback_0_(unwrap_jso(this)));
+  Transform consolidate() => _blink.BlinkSVGTransformList.instance.consolidate_Callback_0_(this);
   
   @DomName('SVGTransformList.createSVGTransformFromMatrix')
   @DocsEditable()
-  Transform createSvgTransformFromMatrix(Matrix matrix) => wrap_jso(_blink.BlinkSVGTransformList.instance.createSVGTransformFromMatrix_Callback_1_(unwrap_jso(this), unwrap_jso(matrix)));
+  Transform createSvgTransformFromMatrix(Matrix matrix) => _blink.BlinkSVGTransformList.instance.createSVGTransformFromMatrix_Callback_1_(this, matrix);
   
   @DomName('SVGTransformList.getItem')
   @DocsEditable()
-  Transform getItem(int index) => wrap_jso(_blink.BlinkSVGTransformList.instance.getItem_Callback_1_(unwrap_jso(this), index));
+  Transform getItem(int index) => _blink.BlinkSVGTransformList.instance.getItem_Callback_1_(this, index);
   
   @DomName('SVGTransformList.initialize')
   @DocsEditable()
-  Transform initialize(Transform item) => wrap_jso(_blink.BlinkSVGTransformList.instance.initialize_Callback_1_(unwrap_jso(this), unwrap_jso(item)));
+  Transform initialize(Transform newItem) => _blink.BlinkSVGTransformList.instance.initialize_Callback_1_(this, newItem);
   
   @DomName('SVGTransformList.insertItemBefore')
   @DocsEditable()
-  Transform insertItemBefore(Transform item, int index) => wrap_jso(_blink.BlinkSVGTransformList.instance.insertItemBefore_Callback_2_(unwrap_jso(this), unwrap_jso(item), index));
+  Transform insertItemBefore(Transform newItem, int index) => _blink.BlinkSVGTransformList.instance.insertItemBefore_Callback_2_(this, newItem, index);
   
   @DomName('SVGTransformList.removeItem')
   @DocsEditable()
-  Transform removeItem(int index) => wrap_jso(_blink.BlinkSVGTransformList.instance.removeItem_Callback_1_(unwrap_jso(this), index));
+  Transform removeItem(int index) => _blink.BlinkSVGTransformList.instance.removeItem_Callback_1_(this, index);
   
   @DomName('SVGTransformList.replaceItem')
   @DocsEditable()
-  Transform replaceItem(Transform item, int index) => wrap_jso(_blink.BlinkSVGTransformList.instance.replaceItem_Callback_2_(unwrap_jso(this), unwrap_jso(item), index));
+  Transform replaceItem(Transform newItem, int index) => _blink.BlinkSVGTransformList.instance.replaceItem_Callback_2_(this, newItem, index);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8465,21 +7604,13 @@
   // To suppress missing implicit constructor warnings.
   factory UnitTypes._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static UnitTypes internalCreateUnitTypes() {
-    return new UnitTypes._internalWrap();
-  }
 
-  factory UnitTypes._internalWrap() {
-    return new UnitTypes.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   UnitTypes.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX')
   @DocsEditable()
   static const int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
@@ -8532,11 +7663,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static UseElement internalCreateUseElement() {
-    return new UseElement._internalWrap();
-  }
-
-  external factory UseElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   UseElement.internal_() : super.internal_();
@@ -8550,23 +7677,23 @@
 
   @DomName('SVGUseElement.height')
   @DocsEditable()
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGUseElement.instance.height_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGUseElement.instance.height_Getter_(this);
   
   @DomName('SVGUseElement.width')
   @DocsEditable()
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGUseElement.instance.width_Getter_(unwrap_jso(this)));
+  AnimatedLength get width => _blink.BlinkSVGUseElement.instance.width_Getter_(this);
   
   @DomName('SVGUseElement.x')
   @DocsEditable()
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGUseElement.instance.x_Getter_(unwrap_jso(this)));
+  AnimatedLength get x => _blink.BlinkSVGUseElement.instance.x_Getter_(this);
   
   @DomName('SVGUseElement.y')
   @DocsEditable()
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGUseElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get y => _blink.BlinkSVGUseElement.instance.y_Getter_(this);
   
   @DomName('SVGUseElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGUseElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGUseElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8589,11 +7716,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ViewElement internalCreateViewElement() {
-    return new ViewElement._internalWrap();
-  }
-
-  external factory ViewElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ViewElement.internal_() : super.internal_();
@@ -8607,23 +7730,23 @@
 
   @DomName('SVGViewElement.viewTarget')
   @DocsEditable()
-  StringList get viewTarget => wrap_jso(_blink.BlinkSVGViewElement.instance.viewTarget_Getter_(unwrap_jso(this)));
+  StringList get viewTarget => _blink.BlinkSVGViewElement.instance.viewTarget_Getter_(this);
   
   @DomName('SVGViewElement.preserveAspectRatio')
   @DocsEditable()
-  AnimatedPreserveAspectRatio get preserveAspectRatio => wrap_jso(_blink.BlinkSVGViewElement.instance.preserveAspectRatio_Getter_(unwrap_jso(this)));
+  AnimatedPreserveAspectRatio get preserveAspectRatio => _blink.BlinkSVGViewElement.instance.preserveAspectRatio_Getter_(this);
   
   @DomName('SVGViewElement.viewBox')
   @DocsEditable()
-  AnimatedRect get viewBox => wrap_jso(_blink.BlinkSVGViewElement.instance.viewBox_Getter_(unwrap_jso(this)));
+  AnimatedRect get viewBox => _blink.BlinkSVGViewElement.instance.viewBox_Getter_(this);
   
   @DomName('SVGViewElement.zoomAndPan')
   @DocsEditable()
-  int get zoomAndPan => _blink.BlinkSVGViewElement.instance.zoomAndPan_Getter_(unwrap_jso(this));
+  int get zoomAndPan => _blink.BlinkSVGViewElement.instance.zoomAndPan_Getter_(this);
   
   @DomName('SVGViewElement.zoomAndPan')
   @DocsEditable()
-  set zoomAndPan(int value) => _blink.BlinkSVGViewElement.instance.zoomAndPan_Setter_(unwrap_jso(this), value);
+  set zoomAndPan(int value) => _blink.BlinkSVGViewElement.instance.zoomAndPan_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8640,64 +7763,56 @@
   // To suppress missing implicit constructor warnings.
   factory ViewSpec._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ViewSpec internalCreateViewSpec() {
-    return new ViewSpec._internalWrap();
-  }
 
-  factory ViewSpec._internalWrap() {
-    return new ViewSpec.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ViewSpec.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SVGViewSpec.preserveAspectRatioString')
   @DocsEditable()
-  String get preserveAspectRatioString => _blink.BlinkSVGViewSpec.instance.preserveAspectRatioString_Getter_(unwrap_jso(this));
+  String get preserveAspectRatioString => _blink.BlinkSVGViewSpec.instance.preserveAspectRatioString_Getter_(this);
   
   @DomName('SVGViewSpec.transform')
   @DocsEditable()
-  TransformList get transform => wrap_jso(_blink.BlinkSVGViewSpec.instance.transform_Getter_(unwrap_jso(this)));
+  TransformList get transform => _blink.BlinkSVGViewSpec.instance.transform_Getter_(this);
   
   @DomName('SVGViewSpec.transformString')
   @DocsEditable()
-  String get transformString => _blink.BlinkSVGViewSpec.instance.transformString_Getter_(unwrap_jso(this));
+  String get transformString => _blink.BlinkSVGViewSpec.instance.transformString_Getter_(this);
   
   @DomName('SVGViewSpec.viewBoxString')
   @DocsEditable()
-  String get viewBoxString => _blink.BlinkSVGViewSpec.instance.viewBoxString_Getter_(unwrap_jso(this));
+  String get viewBoxString => _blink.BlinkSVGViewSpec.instance.viewBoxString_Getter_(this);
   
   @DomName('SVGViewSpec.viewTarget')
   @DocsEditable()
-  SvgElement get viewTarget => wrap_jso(_blink.BlinkSVGViewSpec.instance.viewTarget_Getter_(unwrap_jso(this)));
+  SvgElement get viewTarget => _blink.BlinkSVGViewSpec.instance.viewTarget_Getter_(this);
   
   @DomName('SVGViewSpec.viewTargetString')
   @DocsEditable()
-  String get viewTargetString => _blink.BlinkSVGViewSpec.instance.viewTargetString_Getter_(unwrap_jso(this));
+  String get viewTargetString => _blink.BlinkSVGViewSpec.instance.viewTargetString_Getter_(this);
   
   @DomName('SVGViewSpec.preserveAspectRatio')
   @DocsEditable()
   @Experimental() // nonstandard
-  AnimatedPreserveAspectRatio get preserveAspectRatio => wrap_jso(_blink.BlinkSVGViewSpec.instance.preserveAspectRatio_Getter_(unwrap_jso(this)));
+  AnimatedPreserveAspectRatio get preserveAspectRatio => _blink.BlinkSVGViewSpec.instance.preserveAspectRatio_Getter_(this);
   
   @DomName('SVGViewSpec.viewBox')
   @DocsEditable()
   @Experimental() // nonstandard
-  AnimatedRect get viewBox => wrap_jso(_blink.BlinkSVGViewSpec.instance.viewBox_Getter_(unwrap_jso(this)));
+  AnimatedRect get viewBox => _blink.BlinkSVGViewSpec.instance.viewBox_Getter_(this);
   
   @DomName('SVGViewSpec.zoomAndPan')
   @DocsEditable()
   @Experimental() // nonstandard
-  int get zoomAndPan => _blink.BlinkSVGViewSpec.instance.zoomAndPan_Getter_(unwrap_jso(this));
+  int get zoomAndPan => _blink.BlinkSVGViewSpec.instance.zoomAndPan_Getter_(this);
   
   @DomName('SVGViewSpec.zoomAndPan')
   @DocsEditable()
   @Experimental() // nonstandard
-  set zoomAndPan(int value) => _blink.BlinkSVGViewSpec.instance.zoomAndPan_Setter_(unwrap_jso(this), value);
+  set zoomAndPan(int value) => _blink.BlinkSVGViewSpec.instance.zoomAndPan_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8751,11 +7866,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ZoomEvent internalCreateZoomEvent() {
-    return new ZoomEvent._internalWrap();
-  }
-
-  external factory ZoomEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ZoomEvent.internal_() : super.internal_();
@@ -8763,23 +7874,23 @@
 
   @DomName('SVGZoomEvent.newScale')
   @DocsEditable()
-  num get newScale => _blink.BlinkSVGZoomEvent.instance.newScale_Getter_(unwrap_jso(this));
+  num get newScale => _blink.BlinkSVGZoomEvent.instance.newScale_Getter_(this);
   
   @DomName('SVGZoomEvent.newTranslate')
   @DocsEditable()
-  Point get newTranslate => wrap_jso(_blink.BlinkSVGZoomEvent.instance.newTranslate_Getter_(unwrap_jso(this)));
+  Point get newTranslate => _blink.BlinkSVGZoomEvent.instance.newTranslate_Getter_(this);
   
   @DomName('SVGZoomEvent.previousScale')
   @DocsEditable()
-  num get previousScale => _blink.BlinkSVGZoomEvent.instance.previousScale_Getter_(unwrap_jso(this));
+  num get previousScale => _blink.BlinkSVGZoomEvent.instance.previousScale_Getter_(this);
   
   @DomName('SVGZoomEvent.previousTranslate')
   @DocsEditable()
-  Point get previousTranslate => wrap_jso(_blink.BlinkSVGZoomEvent.instance.previousTranslate_Getter_(unwrap_jso(this)));
+  Point get previousTranslate => _blink.BlinkSVGZoomEvent.instance.previousTranslate_Getter_(this);
   
   @DomName('SVGZoomEvent.zoomRectScreen')
   @DocsEditable()
-  Rect get zoomRectScreen => wrap_jso(_blink.BlinkSVGZoomEvent.instance.zoomRectScreen_Getter_(unwrap_jso(this)));
+  Rect get zoomRectScreen => _blink.BlinkSVGZoomEvent.instance.zoomRectScreen_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8798,11 +7909,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _GradientElement internalCreate_GradientElement() {
-    return new _GradientElement._internalWrap();
-  }
-
-  external factory _GradientElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _GradientElement.internal_() : super.internal_();
@@ -8832,19 +7939,19 @@
 
   @DomName('SVGGradientElement.gradientTransform')
   @DocsEditable()
-  AnimatedTransformList get gradientTransform => wrap_jso(_blink.BlinkSVGGradientElement.instance.gradientTransform_Getter_(unwrap_jso(this)));
+  AnimatedTransformList get gradientTransform => _blink.BlinkSVGGradientElement.instance.gradientTransform_Getter_(this);
   
   @DomName('SVGGradientElement.gradientUnits')
   @DocsEditable()
-  AnimatedEnumeration get gradientUnits => wrap_jso(_blink.BlinkSVGGradientElement.instance.gradientUnits_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get gradientUnits => _blink.BlinkSVGGradientElement.instance.gradientUnits_Getter_(this);
   
   @DomName('SVGGradientElement.spreadMethod')
   @DocsEditable()
-  AnimatedEnumeration get spreadMethod => wrap_jso(_blink.BlinkSVGGradientElement.instance.spreadMethod_Getter_(unwrap_jso(this)));
+  AnimatedEnumeration get spreadMethod => _blink.BlinkSVGGradientElement.instance.spreadMethod_Getter_(this);
   
   @DomName('SVGGradientElement.href')
   @DocsEditable()
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGGradientElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGGradientElement.instance.href_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -8855,72 +7962,6 @@
 
 
 @DocsEditable()
-@DomName('SVGAltGlyphDefElement')
-@Unstable()
-class _SVGAltGlyphDefElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGAltGlyphDefElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGAltGlyphDefElement internalCreate_SVGAltGlyphDefElement() {
-    return new _SVGAltGlyphDefElement._internalWrap();
-  }
-
-  external factory _SVGAltGlyphDefElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGAltGlyphDefElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGAltGlyphDefElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGAltGlyphItemElement')
-@Unstable()
-class _SVGAltGlyphItemElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGAltGlyphItemElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGAltGlyphItemElement internalCreate_SVGAltGlyphItemElement() {
-    return new _SVGAltGlyphItemElement._internalWrap();
-  }
-
-  external factory _SVGAltGlyphItemElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGAltGlyphItemElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGAltGlyphItemElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
 @DomName('SVGComponentTransferFunctionElement')
 @Unstable()
 class _SVGComponentTransferFunctionElement extends SvgElement {
@@ -8929,11 +7970,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _SVGComponentTransferFunctionElement internalCreate_SVGComponentTransferFunctionElement() {
-    return new _SVGComponentTransferFunctionElement._internalWrap();
-  }
-
-  external factory _SVGComponentTransferFunctionElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _SVGComponentTransferFunctionElement.internal_() : super.internal_();
@@ -8964,11 +8001,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _SVGCursorElement internalCreate_SVGCursorElement() {
-    return new _SVGCursorElement._internalWrap();
-  }
-
-  external factory _SVGCursorElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _SVGCursorElement.internal_() : super.internal_();
@@ -8984,11 +8017,11 @@
   static bool get supported => true;
 
   // Override these methods for Dartium _SVGCursorElement can't be abstract.
-  StringList get requiredExtensions => wrap_jso(_blink.BlinkSVGCursorElement.instance.requiredExtensions_Getter_(unwrap_jso(this)));
-  StringList get requiredFeatures => wrap_jso(_blink.BlinkSVGCursorElement.instance.requiredFeatures_Getter_(unwrap_jso(this)));
-  StringList get systemLanguage => wrap_jso(_blink.BlinkSVGCursorElement.instance.systemLanguage_Getter_(unwrap_jso(this)));
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGCursorElement.instance.href_Getter_(unwrap_jso(this)));
-  bool hasExtension(String extension) => _blink.BlinkSVGCursorElement.instance.hasExtension_Callback_1_(unwrap_jso(this), extension);
+  StringList get requiredExtensions => _blink.BlinkSVGCursorElement.instance.requiredExtensions_Getter_(this);
+  StringList get requiredFeatures => _blink.BlinkSVGCursorElement.instance.requiredFeatures_Getter_(this);
+  StringList get systemLanguage => _blink.BlinkSVGCursorElement.instance.systemLanguage_Getter_(this);
+  AnimatedString get href => _blink.BlinkSVGCursorElement.instance.href_Getter_(this);
+  bool hasExtension(String extension) => _blink.BlinkSVGCursorElement.instance.hasExtension_Callback_1_(this, extension);
 }
 
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -9005,11 +8038,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _SVGFEDropShadowElement internalCreate_SVGFEDropShadowElement() {
-    return new _SVGFEDropShadowElement._internalWrap();
-  }
-
-  external factory _SVGFEDropShadowElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _SVGFEDropShadowElement.internal_() : super.internal_();
@@ -9022,323 +8051,17 @@
   _SVGFEDropShadowElement.created() : super.created();
 
   // Override these methods for Dartium _SVGFEDropShadowElement can't be abstract.
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.height_Getter_(unwrap_jso(this)));
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.result_Getter_(unwrap_jso(this)));
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.width_Getter_(unwrap_jso(this)));
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.x_Getter_(unwrap_jso(this)));
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEDropShadowElement.instance.height_Getter_(this);
+  AnimatedString get result => _blink.BlinkSVGFEDropShadowElement.instance.result_Getter_(this);
+  AnimatedLength get width => _blink.BlinkSVGFEDropShadowElement.instance.width_Getter_(this);
+  AnimatedLength get x => _blink.BlinkSVGFEDropShadowElement.instance.x_Getter_(this);
+  AnimatedLength get y => _blink.BlinkSVGFEDropShadowElement.instance.y_Getter_(this);
 }
 
 // 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.
 
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGFontElement')
-@Unstable()
-class _SVGFontElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGFontElement internalCreate_SVGFontElement() {
-    return new _SVGFontElement._internalWrap();
-  }
-
-  external factory _SVGFontElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGFontElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceElement')
-@Unstable()
-class _SVGFontFaceElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGFontFaceElement internalCreate_SVGFontFaceElement() {
-    return new _SVGFontFaceElement._internalWrap();
-  }
-
-  external factory _SVGFontFaceElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGFontFaceElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceFormatElement')
-@Unstable()
-class _SVGFontFaceFormatElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceFormatElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGFontFaceFormatElement internalCreate_SVGFontFaceFormatElement() {
-    return new _SVGFontFaceFormatElement._internalWrap();
-  }
-
-  external factory _SVGFontFaceFormatElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGFontFaceFormatElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceFormatElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceNameElement')
-@Unstable()
-class _SVGFontFaceNameElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceNameElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGFontFaceNameElement internalCreate_SVGFontFaceNameElement() {
-    return new _SVGFontFaceNameElement._internalWrap();
-  }
-
-  external factory _SVGFontFaceNameElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGFontFaceNameElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceNameElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceSrcElement')
-@Unstable()
-class _SVGFontFaceSrcElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceSrcElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGFontFaceSrcElement internalCreate_SVGFontFaceSrcElement() {
-    return new _SVGFontFaceSrcElement._internalWrap();
-  }
-
-  external factory _SVGFontFaceSrcElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGFontFaceSrcElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceSrcElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGFontFaceUriElement')
-@Unstable()
-class _SVGFontFaceUriElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGFontFaceUriElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGFontFaceUriElement internalCreate_SVGFontFaceUriElement() {
-    return new _SVGFontFaceUriElement._internalWrap();
-  }
-
-  external factory _SVGFontFaceUriElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGFontFaceUriElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGFontFaceUriElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGGlyphElement')
-@Unstable()
-class _SVGGlyphElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGGlyphElement._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGGlyphElement.SVGGlyphElement')
-  @DocsEditable()
-  factory _SVGGlyphElement() => _SvgElementFactoryProvider.createSvgElement_tag("glyph");
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGGlyphElement internalCreate_SVGGlyphElement() {
-    return new _SVGGlyphElement._internalWrap();
-  }
-
-  external factory _SVGGlyphElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGGlyphElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGGlyphElement.created() : super.created();
-
-}
-// 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.
-
-
-@DocsEditable()
-@DomName('SVGGlyphRefElement')
-@Unstable()
-class _SVGGlyphRefElement extends SvgElement implements UriReference {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGGlyphRefElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGGlyphRefElement internalCreate_SVGGlyphRefElement() {
-    return new _SVGGlyphRefElement._internalWrap();
-  }
-
-  external factory _SVGGlyphRefElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGGlyphRefElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGGlyphRefElement.created() : super.created();
-
-  // Override these methods for Dartium _SVGGlyphRefElement can't be abstract.
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGGlyphRefElement.instance.href_Getter_(unwrap_jso(this)));
-}
-
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGHKernElement')
-@Unstable()
-class _SVGHKernElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGHKernElement._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGHKernElement.SVGHKernElement')
-  @DocsEditable()
-  factory _SVGHKernElement() => _SvgElementFactoryProvider.createSvgElement_tag("hkern");
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGHKernElement internalCreate_SVGHKernElement() {
-    return new _SVGHKernElement._internalWrap();
-  }
-
-  external factory _SVGHKernElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGHKernElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGHKernElement.created() : super.created();
-
-}
-// 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.
-
 
 @DocsEditable()
 @DomName('SVGMPathElement')
@@ -9352,11 +8075,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static _SVGMPathElement internalCreate_SVGMPathElement() {
-    return new _SVGMPathElement._internalWrap();
-  }
-
-  external factory _SVGMPathElement._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   _SVGMPathElement.internal_() : super.internal_();
@@ -9369,76 +8088,6 @@
   _SVGMPathElement.created() : super.created();
 
   // Override these methods for Dartium _SVGMPathElement can't be abstract.
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGMPathElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGMPathElement.instance.href_Getter_(this);
 }
 
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGMissingGlyphElement')
-@Unstable()
-class _SVGMissingGlyphElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGMissingGlyphElement._() { throw new UnsupportedError("Not supported"); }
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGMissingGlyphElement internalCreate_SVGMissingGlyphElement() {
-    return new _SVGMissingGlyphElement._internalWrap();
-  }
-
-  external factory _SVGMissingGlyphElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGMissingGlyphElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGMissingGlyphElement.created() : super.created();
-
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
-@DomName('SVGVKernElement')
-@Unstable()
-class _SVGVKernElement extends SvgElement {
-  // To suppress missing implicit constructor warnings.
-  factory _SVGVKernElement._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('SVGVKernElement.SVGVKernElement')
-  @DocsEditable()
-  factory _SVGVKernElement() => _SvgElementFactoryProvider.createSvgElement_tag("vkern");
-
-
-  @Deprecated("Internal Use Only")
-  static _SVGVKernElement internalCreate_SVGVKernElement() {
-    return new _SVGVKernElement._internalWrap();
-  }
-
-  external factory _SVGVKernElement._internalWrap();
-
-  @Deprecated("Internal Use Only")
-  _SVGVKernElement.internal_() : super.internal_();
-
-  /**
-   * Constructor instantiated by the DOM when a custom element has been created.
-   *
-   * This can only be called by subclasses from their created constructor.
-   */
-  _SVGVKernElement.created() : super.created();
-
-}
diff --git a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
index 6005329..2a7e664 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -101,6 +101,16 @@
   @DocsEditable()
   final double sampleRate;
 
+  @DomName('AudioBuffer.copyFromChannel')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyFromChannel(Float32List destination, int channelNumber, [int startInChannel]) native;
+
+  @DomName('AudioBuffer.copyToChannel')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyToChannel(Float32List source, int channelNumber, [int startInChannel]) native;
+
   @DomName('AudioBuffer.getChannelData')
   @DocsEditable()
   Float32List getChannelData(int channelIndex) native;
@@ -176,6 +186,11 @@
   @DocsEditable()
   AudioBuffer buffer;
 
+  @DomName('AudioBufferSourceNode.detune')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final AudioParam detune;
+
   @DomName('AudioBufferSourceNode.loop')
   @DocsEditable()
   bool loop;
@@ -214,16 +229,6 @@
   // To suppress missing implicit constructor warnings.
   factory AudioContext._() { throw new UnsupportedError("Not supported"); }
 
-  /**
-   * Static factory designed to expose `complete` events to event
-   * handlers that are not necessarily instances of [AudioContext].
-   *
-   * See [EventStreamProvider] for usage information.
-   */
-  @DomName('AudioContext.completeEvent')
-  @DocsEditable()
-  static const EventStreamProvider<Event> completeEvent = const EventStreamProvider<Event>('complete');
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', '!!(window.AudioContext || window.webkitAudioContext)');
 
@@ -243,6 +248,16 @@
   @DocsEditable()
   final double sampleRate;
 
+  @DomName('AudioContext.state')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final String state;
+
+  @DomName('AudioContext.close')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future close() native;
+
   @DomName('AudioContext.createAnalyser')
   @DocsEditable()
   AnalyserNode createAnalyser() native;
@@ -304,6 +319,11 @@
   @Experimental() // untriaged
   PeriodicWave createPeriodicWave(Float32List real, Float32List imag) native;
 
+  @DomName('AudioContext.createStereoPanner')
+  @DocsEditable()
+  @Experimental() // untriaged
+  StereoPannerNode createStereoPanner() native;
+
   @DomName('AudioContext.createWaveShaper')
   @DocsEditable()
   WaveShaperNode createWaveShaper() native;
@@ -313,14 +333,15 @@
   @DocsEditable()
   void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native;
 
-  @DomName('AudioContext.startRendering')
+  @DomName('AudioContext.resume')
   @DocsEditable()
-  void startRendering() native;
+  @Experimental() // untriaged
+  Future resume() native;
 
-  /// Stream of `complete` events handled by this [AudioContext].
-  @DomName('AudioContext.oncomplete')
+  @DomName('AudioContext.suspend')
   @DocsEditable()
-  Stream<Event> get onComplete => completeEvent.forTarget(this);
+  @Experimental() // untriaged
+  Future suspend() native;
 
   factory AudioContext() => JS('AudioContext',
       'new (window.AudioContext || window.webkitAudioContext)()');
@@ -455,11 +476,11 @@
   @JSName('connect')
   @DomName('AudioNode.connect')
   @DocsEditable()
-  void _connect(destination, int output, [int input]) native;
+  void _connect(destination, [int output, int input]) native;
 
   @DomName('AudioNode.disconnect')
   @DocsEditable()
-  void disconnect(int output) native;
+  void disconnect([destination_OR_output, int output, int input]) native;
 
   @DomName('AudioNode.connect')
   void connectNode(AudioNode destination, [int output = 0, int input = 0]) =>
@@ -811,6 +832,11 @@
     return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampleRate);
   }
   static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleRate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChannels, numberOfFrames, sampleRate);
+
+  @DomName('OfflineAudioContext.startRendering')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future startRendering() native;
 }
 // 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
@@ -849,14 +875,6 @@
   @DocsEditable()
   String type;
 
-  @DomName('OscillatorNode.noteOff')
-  @DocsEditable()
-  void noteOff(num when) native;
-
-  @DomName('OscillatorNode.noteOn')
-  @DocsEditable()
-  void noteOn(num when) native;
-
   @DomName('OscillatorNode.setPeriodicWave')
   @DocsEditable()
   @Experimental() // untriaged
@@ -1000,6 +1018,24 @@
 
 
 @DocsEditable()
+@DomName('StereoPannerNode')
+@Experimental() // untriaged
+@Native("StereoPannerNode")
+class StereoPannerNode extends AudioNode {
+  // To suppress missing implicit constructor warnings.
+  factory StereoPannerNode._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('StereoPannerNode.pan')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final AudioParam pan;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('WaveShaperNode')
 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-WaveShaperNode
 @Experimental()
diff --git a/sdk/lib/web_audio/dartium/web_audio_dartium.dart b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
index 7a3a9c4..c73b31b 100644
--- a/sdk/lib/web_audio/dartium/web_audio_dartium.dart
+++ b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
@@ -21,66 +21,34 @@
 // FIXME: Can we make this private?
 @Deprecated("Internal Use Only")
 final web_audioBlinkMap = {
-  'AnalyserNode': () => AnalyserNode,
-  'AudioBuffer': () => AudioBuffer,
-  'AudioBufferSourceNode': () => AudioBufferSourceNode,
-  'AudioContext': () => AudioContext,
-  'AudioDestinationNode': () => AudioDestinationNode,
-  'AudioListener': () => AudioListener,
-  'AudioNode': () => AudioNode,
-  'AudioParam': () => AudioParam,
-  'AudioProcessingEvent': () => AudioProcessingEvent,
-  'AudioSourceNode': () => AudioSourceNode,
-  'BiquadFilterNode': () => BiquadFilterNode,
-  'ChannelMergerNode': () => ChannelMergerNode,
-  'ChannelSplitterNode': () => ChannelSplitterNode,
-  'ConvolverNode': () => ConvolverNode,
-  'DelayNode': () => DelayNode,
-  'DynamicsCompressorNode': () => DynamicsCompressorNode,
-  'GainNode': () => GainNode,
-  'MediaElementAudioSourceNode': () => MediaElementAudioSourceNode,
-  'MediaStreamAudioDestinationNode': () => MediaStreamAudioDestinationNode,
-  'MediaStreamAudioSourceNode': () => MediaStreamAudioSourceNode,
-  'OfflineAudioCompletionEvent': () => OfflineAudioCompletionEvent,
-  'OfflineAudioContext': () => OfflineAudioContext,
-  'OscillatorNode': () => OscillatorNode,
-  'PannerNode': () => PannerNode,
-  'PeriodicWave': () => PeriodicWave,
-  'ScriptProcessorNode': () => ScriptProcessorNode,
-  'WaveShaperNode': () => WaveShaperNode,
-
-};
-
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final web_audioBlinkFunctionMap = {
-  'AnalyserNode': () => AnalyserNode.internalCreateAnalyserNode,
-  'AudioBuffer': () => AudioBuffer.internalCreateAudioBuffer,
-  'AudioBufferSourceNode': () => AudioBufferSourceNode.internalCreateAudioBufferSourceNode,
-  'AudioContext': () => AudioContext.internalCreateAudioContext,
-  'AudioDestinationNode': () => AudioDestinationNode.internalCreateAudioDestinationNode,
-  'AudioListener': () => AudioListener.internalCreateAudioListener,
-  'AudioNode': () => AudioNode.internalCreateAudioNode,
-  'AudioParam': () => AudioParam.internalCreateAudioParam,
-  'AudioProcessingEvent': () => AudioProcessingEvent.internalCreateAudioProcessingEvent,
-  'AudioSourceNode': () => AudioSourceNode.internalCreateAudioSourceNode,
-  'BiquadFilterNode': () => BiquadFilterNode.internalCreateBiquadFilterNode,
-  'ChannelMergerNode': () => ChannelMergerNode.internalCreateChannelMergerNode,
-  'ChannelSplitterNode': () => ChannelSplitterNode.internalCreateChannelSplitterNode,
-  'ConvolverNode': () => ConvolverNode.internalCreateConvolverNode,
-  'DelayNode': () => DelayNode.internalCreateDelayNode,
-  'DynamicsCompressorNode': () => DynamicsCompressorNode.internalCreateDynamicsCompressorNode,
-  'GainNode': () => GainNode.internalCreateGainNode,
-  'MediaElementAudioSourceNode': () => MediaElementAudioSourceNode.internalCreateMediaElementAudioSourceNode,
-  'MediaStreamAudioDestinationNode': () => MediaStreamAudioDestinationNode.internalCreateMediaStreamAudioDestinationNode,
-  'MediaStreamAudioSourceNode': () => MediaStreamAudioSourceNode.internalCreateMediaStreamAudioSourceNode,
-  'OfflineAudioCompletionEvent': () => OfflineAudioCompletionEvent.internalCreateOfflineAudioCompletionEvent,
-  'OfflineAudioContext': () => OfflineAudioContext.internalCreateOfflineAudioContext,
-  'OscillatorNode': () => OscillatorNode.internalCreateOscillatorNode,
-  'PannerNode': () => PannerNode.internalCreatePannerNode,
-  'PeriodicWave': () => PeriodicWave.internalCreatePeriodicWave,
-  'ScriptProcessorNode': () => ScriptProcessorNode.internalCreateScriptProcessorNode,
-  'WaveShaperNode': () => WaveShaperNode.internalCreateWaveShaperNode,
+  'AnalyserNode': () => AnalyserNode.instanceRuntimeType,
+  'AudioBuffer': () => AudioBuffer.instanceRuntimeType,
+  'AudioBufferSourceNode': () => AudioBufferSourceNode.instanceRuntimeType,
+  'AudioContext': () => AudioContext.instanceRuntimeType,
+  'AudioDestinationNode': () => AudioDestinationNode.instanceRuntimeType,
+  'AudioListener': () => AudioListener.instanceRuntimeType,
+  'AudioNode': () => AudioNode.instanceRuntimeType,
+  'AudioParam': () => AudioParam.instanceRuntimeType,
+  'AudioProcessingEvent': () => AudioProcessingEvent.instanceRuntimeType,
+  'AudioSourceNode': () => AudioSourceNode.instanceRuntimeType,
+  'BiquadFilterNode': () => BiquadFilterNode.instanceRuntimeType,
+  'ChannelMergerNode': () => ChannelMergerNode.instanceRuntimeType,
+  'ChannelSplitterNode': () => ChannelSplitterNode.instanceRuntimeType,
+  'ConvolverNode': () => ConvolverNode.instanceRuntimeType,
+  'DelayNode': () => DelayNode.instanceRuntimeType,
+  'DynamicsCompressorNode': () => DynamicsCompressorNode.instanceRuntimeType,
+  'GainNode': () => GainNode.instanceRuntimeType,
+  'MediaElementAudioSourceNode': () => MediaElementAudioSourceNode.instanceRuntimeType,
+  'MediaStreamAudioDestinationNode': () => MediaStreamAudioDestinationNode.instanceRuntimeType,
+  'MediaStreamAudioSourceNode': () => MediaStreamAudioSourceNode.instanceRuntimeType,
+  'OfflineAudioCompletionEvent': () => OfflineAudioCompletionEvent.instanceRuntimeType,
+  'OfflineAudioContext': () => OfflineAudioContext.instanceRuntimeType,
+  'OscillatorNode': () => OscillatorNode.instanceRuntimeType,
+  'PannerNode': () => PannerNode.instanceRuntimeType,
+  'PeriodicWave': () => PeriodicWave.instanceRuntimeType,
+  'ScriptProcessorNode': () => ScriptProcessorNode.instanceRuntimeType,
+  'StereoPannerNode': () => StereoPannerNode.instanceRuntimeType,
+  'WaveShaperNode': () => WaveShaperNode.instanceRuntimeType,
 
 };
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -100,11 +68,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AnalyserNode internalCreateAnalyserNode() {
-    return new AnalyserNode._internalWrap();
-  }
-
-  external factory AnalyserNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AnalyserNode.internal_() : super.internal_();
@@ -112,56 +76,56 @@
 
   @DomName('AnalyserNode.fftSize')
   @DocsEditable()
-  int get fftSize => _blink.BlinkAnalyserNode.instance.fftSize_Getter_(unwrap_jso(this));
+  int get fftSize => _blink.BlinkAnalyserNode.instance.fftSize_Getter_(this);
   
   @DomName('AnalyserNode.fftSize')
   @DocsEditable()
-  set fftSize(int value) => _blink.BlinkAnalyserNode.instance.fftSize_Setter_(unwrap_jso(this), value);
+  set fftSize(int value) => _blink.BlinkAnalyserNode.instance.fftSize_Setter_(this, value);
   
   @DomName('AnalyserNode.frequencyBinCount')
   @DocsEditable()
-  int get frequencyBinCount => _blink.BlinkAnalyserNode.instance.frequencyBinCount_Getter_(unwrap_jso(this));
+  int get frequencyBinCount => _blink.BlinkAnalyserNode.instance.frequencyBinCount_Getter_(this);
   
   @DomName('AnalyserNode.maxDecibels')
   @DocsEditable()
-  num get maxDecibels => _blink.BlinkAnalyserNode.instance.maxDecibels_Getter_(unwrap_jso(this));
+  num get maxDecibels => _blink.BlinkAnalyserNode.instance.maxDecibels_Getter_(this);
   
   @DomName('AnalyserNode.maxDecibels')
   @DocsEditable()
-  set maxDecibels(num value) => _blink.BlinkAnalyserNode.instance.maxDecibels_Setter_(unwrap_jso(this), value);
+  set maxDecibels(num value) => _blink.BlinkAnalyserNode.instance.maxDecibels_Setter_(this, value);
   
   @DomName('AnalyserNode.minDecibels')
   @DocsEditable()
-  num get minDecibels => _blink.BlinkAnalyserNode.instance.minDecibels_Getter_(unwrap_jso(this));
+  num get minDecibels => _blink.BlinkAnalyserNode.instance.minDecibels_Getter_(this);
   
   @DomName('AnalyserNode.minDecibels')
   @DocsEditable()
-  set minDecibels(num value) => _blink.BlinkAnalyserNode.instance.minDecibels_Setter_(unwrap_jso(this), value);
+  set minDecibels(num value) => _blink.BlinkAnalyserNode.instance.minDecibels_Setter_(this, value);
   
   @DomName('AnalyserNode.smoothingTimeConstant')
   @DocsEditable()
-  num get smoothingTimeConstant => _blink.BlinkAnalyserNode.instance.smoothingTimeConstant_Getter_(unwrap_jso(this));
+  num get smoothingTimeConstant => _blink.BlinkAnalyserNode.instance.smoothingTimeConstant_Getter_(this);
   
   @DomName('AnalyserNode.smoothingTimeConstant')
   @DocsEditable()
-  set smoothingTimeConstant(num value) => _blink.BlinkAnalyserNode.instance.smoothingTimeConstant_Setter_(unwrap_jso(this), value);
+  set smoothingTimeConstant(num value) => _blink.BlinkAnalyserNode.instance.smoothingTimeConstant_Setter_(this, value);
   
   @DomName('AnalyserNode.getByteFrequencyData')
   @DocsEditable()
-  void getByteFrequencyData(Uint8List array) => _blink.BlinkAnalyserNode.instance.getByteFrequencyData_Callback_1_(unwrap_jso(this), array);
+  void getByteFrequencyData(Uint8List array) => _blink.BlinkAnalyserNode.instance.getByteFrequencyData_Callback_1_(this, array);
   
   @DomName('AnalyserNode.getByteTimeDomainData')
   @DocsEditable()
-  void getByteTimeDomainData(Uint8List array) => _blink.BlinkAnalyserNode.instance.getByteTimeDomainData_Callback_1_(unwrap_jso(this), array);
+  void getByteTimeDomainData(Uint8List array) => _blink.BlinkAnalyserNode.instance.getByteTimeDomainData_Callback_1_(this, array);
   
   @DomName('AnalyserNode.getFloatFrequencyData')
   @DocsEditable()
-  void getFloatFrequencyData(Float32List array) => _blink.BlinkAnalyserNode.instance.getFloatFrequencyData_Callback_1_(unwrap_jso(this), array);
+  void getFloatFrequencyData(Float32List array) => _blink.BlinkAnalyserNode.instance.getFloatFrequencyData_Callback_1_(this, array);
   
   @DomName('AnalyserNode.getFloatTimeDomainData')
   @DocsEditable()
   @Experimental() // untriaged
-  void getFloatTimeDomainData(Float32List array) => _blink.BlinkAnalyserNode.instance.getFloatTimeDomainData_Callback_1_(unwrap_jso(this), array);
+  void getFloatTimeDomainData(Float32List array) => _blink.BlinkAnalyserNode.instance.getFloatTimeDomainData_Callback_1_(this, array);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -179,40 +143,50 @@
   // To suppress missing implicit constructor warnings.
   factory AudioBuffer._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AudioBuffer internalCreateAudioBuffer() {
-    return new AudioBuffer._internalWrap();
-  }
 
-  factory AudioBuffer._internalWrap() {
-    return new AudioBuffer.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioBuffer.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('AudioBuffer.duration')
   @DocsEditable()
-  num get duration => _blink.BlinkAudioBuffer.instance.duration_Getter_(unwrap_jso(this));
+  num get duration => _blink.BlinkAudioBuffer.instance.duration_Getter_(this);
   
   @DomName('AudioBuffer.length')
   @DocsEditable()
-  int get length => _blink.BlinkAudioBuffer.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkAudioBuffer.instance.length_Getter_(this);
   
   @DomName('AudioBuffer.numberOfChannels')
   @DocsEditable()
-  int get numberOfChannels => _blink.BlinkAudioBuffer.instance.numberOfChannels_Getter_(unwrap_jso(this));
+  int get numberOfChannels => _blink.BlinkAudioBuffer.instance.numberOfChannels_Getter_(this);
   
   @DomName('AudioBuffer.sampleRate')
   @DocsEditable()
-  num get sampleRate => _blink.BlinkAudioBuffer.instance.sampleRate_Getter_(unwrap_jso(this));
+  num get sampleRate => _blink.BlinkAudioBuffer.instance.sampleRate_Getter_(this);
   
+  void copyFromChannel(Float32List destination, int channelNumber, [int startInChannel]) {
+    if (startInChannel != null) {
+      _blink.BlinkAudioBuffer.instance.copyFromChannel_Callback_3_(this, destination, channelNumber, startInChannel);
+      return;
+    }
+    _blink.BlinkAudioBuffer.instance.copyFromChannel_Callback_2_(this, destination, channelNumber);
+    return;
+  }
+
+  void copyToChannel(Float32List source, int channelNumber, [int startInChannel]) {
+    if (startInChannel != null) {
+      _blink.BlinkAudioBuffer.instance.copyToChannel_Callback_3_(this, source, channelNumber, startInChannel);
+      return;
+    }
+    _blink.BlinkAudioBuffer.instance.copyToChannel_Callback_2_(this, source, channelNumber);
+    return;
+  }
+
   @DomName('AudioBuffer.getChannelData')
   @DocsEditable()
-  Float32List getChannelData(int channelIndex) => _blink.BlinkAudioBuffer.instance.getChannelData_Callback_1_(unwrap_jso(this), channelIndex);
+  Float32List getChannelData(int channelIndex) => _blink.BlinkAudioBuffer.instance.getChannelData_Callback_1_(this, channelIndex);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -256,11 +230,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AudioBufferSourceNode internalCreateAudioBufferSourceNode() {
-    return new AudioBufferSourceNode._internalWrap();
-  }
-
-  external factory AudioBufferSourceNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioBufferSourceNode.internal_() : super.internal_();
@@ -268,63 +238,68 @@
 
   @DomName('AudioBufferSourceNode.buffer')
   @DocsEditable()
-  AudioBuffer get buffer => wrap_jso(_blink.BlinkAudioBufferSourceNode.instance.buffer_Getter_(unwrap_jso(this)));
+  AudioBuffer get buffer => _blink.BlinkAudioBufferSourceNode.instance.buffer_Getter_(this);
   
   @DomName('AudioBufferSourceNode.buffer')
   @DocsEditable()
-  set buffer(AudioBuffer value) => _blink.BlinkAudioBufferSourceNode.instance.buffer_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set buffer(AudioBuffer value) => _blink.BlinkAudioBufferSourceNode.instance.buffer_Setter_(this, value);
+  
+  @DomName('AudioBufferSourceNode.detune')
+  @DocsEditable()
+  @Experimental() // untriaged
+  AudioParam get detune => _blink.BlinkAudioBufferSourceNode.instance.detune_Getter_(this);
   
   @DomName('AudioBufferSourceNode.loop')
   @DocsEditable()
-  bool get loop => _blink.BlinkAudioBufferSourceNode.instance.loop_Getter_(unwrap_jso(this));
+  bool get loop => _blink.BlinkAudioBufferSourceNode.instance.loop_Getter_(this);
   
   @DomName('AudioBufferSourceNode.loop')
   @DocsEditable()
-  set loop(bool value) => _blink.BlinkAudioBufferSourceNode.instance.loop_Setter_(unwrap_jso(this), value);
+  set loop(bool value) => _blink.BlinkAudioBufferSourceNode.instance.loop_Setter_(this, value);
   
   @DomName('AudioBufferSourceNode.loopEnd')
   @DocsEditable()
-  num get loopEnd => _blink.BlinkAudioBufferSourceNode.instance.loopEnd_Getter_(unwrap_jso(this));
+  num get loopEnd => _blink.BlinkAudioBufferSourceNode.instance.loopEnd_Getter_(this);
   
   @DomName('AudioBufferSourceNode.loopEnd')
   @DocsEditable()
-  set loopEnd(num value) => _blink.BlinkAudioBufferSourceNode.instance.loopEnd_Setter_(unwrap_jso(this), value);
+  set loopEnd(num value) => _blink.BlinkAudioBufferSourceNode.instance.loopEnd_Setter_(this, value);
   
   @DomName('AudioBufferSourceNode.loopStart')
   @DocsEditable()
-  num get loopStart => _blink.BlinkAudioBufferSourceNode.instance.loopStart_Getter_(unwrap_jso(this));
+  num get loopStart => _blink.BlinkAudioBufferSourceNode.instance.loopStart_Getter_(this);
   
   @DomName('AudioBufferSourceNode.loopStart')
   @DocsEditable()
-  set loopStart(num value) => _blink.BlinkAudioBufferSourceNode.instance.loopStart_Setter_(unwrap_jso(this), value);
+  set loopStart(num value) => _blink.BlinkAudioBufferSourceNode.instance.loopStart_Setter_(this, value);
   
   @DomName('AudioBufferSourceNode.playbackRate')
   @DocsEditable()
-  AudioParam get playbackRate => wrap_jso(_blink.BlinkAudioBufferSourceNode.instance.playbackRate_Getter_(unwrap_jso(this)));
+  AudioParam get playbackRate => _blink.BlinkAudioBufferSourceNode.instance.playbackRate_Getter_(this);
   
   void start([num when, num grainOffset, num grainDuration]) {
     if (grainDuration != null) {
-      _blink.BlinkAudioBufferSourceNode.instance.start_Callback_3_(unwrap_jso(this), when, grainOffset, grainDuration);
+      _blink.BlinkAudioBufferSourceNode.instance.start_Callback_3_(this, when, grainOffset, grainDuration);
       return;
     }
     if (grainOffset != null) {
-      _blink.BlinkAudioBufferSourceNode.instance.start_Callback_2_(unwrap_jso(this), when, grainOffset);
+      _blink.BlinkAudioBufferSourceNode.instance.start_Callback_2_(this, when, grainOffset);
       return;
     }
     if (when != null) {
-      _blink.BlinkAudioBufferSourceNode.instance.start_Callback_1_(unwrap_jso(this), when);
+      _blink.BlinkAudioBufferSourceNode.instance.start_Callback_1_(this, when);
       return;
     }
-    _blink.BlinkAudioBufferSourceNode.instance.start_Callback_0_(unwrap_jso(this));
+    _blink.BlinkAudioBufferSourceNode.instance.start_Callback_0_(this);
     return;
   }
 
   void stop([num when]) {
     if (when != null) {
-      _blink.BlinkAudioBufferSourceNode.instance.stop_Callback_1_(unwrap_jso(this), when);
+      _blink.BlinkAudioBufferSourceNode.instance.stop_Callback_1_(this, when);
       return;
     }
-    _blink.BlinkAudioBufferSourceNode.instance.stop_Callback_0_(unwrap_jso(this));
+    _blink.BlinkAudioBufferSourceNode.instance.stop_Callback_0_(this);
     return;
   }
 
@@ -349,29 +324,15 @@
   // To suppress missing implicit constructor warnings.
   factory AudioContext._() { throw new UnsupportedError("Not supported"); }
 
-  /**
-   * Static factory designed to expose `complete` events to event
-   * handlers that are not necessarily instances of [AudioContext].
-   *
-   * See [EventStreamProvider] for usage information.
-   */
-  @DomName('AudioContext.completeEvent')
-  @DocsEditable()
-  static const EventStreamProvider<Event> completeEvent = const EventStreamProvider<Event>('complete');
-
   @DomName('AudioContext.AudioContext')
   @DocsEditable()
   factory AudioContext() {
-    return wrap_jso(_blink.BlinkAudioContext.instance.constructorCallback_0_());
+    return _blink.BlinkAudioContext.instance.constructorCallback_0_();
   }
 
 
   @Deprecated("Internal Use Only")
-  static AudioContext internalCreateAudioContext() {
-    return new AudioContext._internalWrap();
-  }
-
-  external factory AudioContext._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioContext.internal_() : super.internal_();
@@ -382,124 +343,145 @@
 
   @DomName('AudioContext.currentTime')
   @DocsEditable()
-  num get currentTime => _blink.BlinkAudioContext.instance.currentTime_Getter_(unwrap_jso(this));
+  num get currentTime => _blink.BlinkAudioContext.instance.currentTime_Getter_(this);
   
   @DomName('AudioContext.destination')
   @DocsEditable()
-  AudioDestinationNode get destination => wrap_jso(_blink.BlinkAudioContext.instance.destination_Getter_(unwrap_jso(this)));
+  AudioDestinationNode get destination => _blink.BlinkAudioContext.instance.destination_Getter_(this);
   
   @DomName('AudioContext.listener')
   @DocsEditable()
-  AudioListener get listener => wrap_jso(_blink.BlinkAudioContext.instance.listener_Getter_(unwrap_jso(this)));
+  AudioListener get listener => _blink.BlinkAudioContext.instance.listener_Getter_(this);
   
   @DomName('AudioContext.sampleRate')
   @DocsEditable()
-  num get sampleRate => _blink.BlinkAudioContext.instance.sampleRate_Getter_(unwrap_jso(this));
+  num get sampleRate => _blink.BlinkAudioContext.instance.sampleRate_Getter_(this);
+  
+  @DomName('AudioContext.state')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String get state => _blink.BlinkAudioContext.instance.state_Getter_(this);
+  
+  @DomName('AudioContext.close')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future close() => convertNativePromiseToDartFuture(_blink.BlinkAudioContext.instance.close_Callback_0_(this));
   
   @DomName('AudioContext.createAnalyser')
   @DocsEditable()
-  AnalyserNode createAnalyser() => wrap_jso(_blink.BlinkAudioContext.instance.createAnalyser_Callback_0_(unwrap_jso(this)));
+  AnalyserNode createAnalyser() => _blink.BlinkAudioContext.instance.createAnalyser_Callback_0_(this);
   
   @DomName('AudioContext.createBiquadFilter')
   @DocsEditable()
-  BiquadFilterNode createBiquadFilter() => wrap_jso(_blink.BlinkAudioContext.instance.createBiquadFilter_Callback_0_(unwrap_jso(this)));
+  BiquadFilterNode createBiquadFilter() => _blink.BlinkAudioContext.instance.createBiquadFilter_Callback_0_(this);
   
   @DomName('AudioContext.createBuffer')
   @DocsEditable()
-  AudioBuffer createBuffer(int numberOfChannels, int numberOfFrames, num sampleRate) => wrap_jso(_blink.BlinkAudioContext.instance.createBuffer_Callback_3_(unwrap_jso(this), numberOfChannels, numberOfFrames, sampleRate));
+  AudioBuffer createBuffer(int numberOfChannels, int numberOfFrames, num sampleRate) => _blink.BlinkAudioContext.instance.createBuffer_Callback_3_(this, numberOfChannels, numberOfFrames, sampleRate);
   
   @DomName('AudioContext.createBufferSource')
   @DocsEditable()
-  AudioBufferSourceNode createBufferSource() => wrap_jso(_blink.BlinkAudioContext.instance.createBufferSource_Callback_0_(unwrap_jso(this)));
+  AudioBufferSourceNode createBufferSource() => _blink.BlinkAudioContext.instance.createBufferSource_Callback_0_(this);
   
   ChannelMergerNode createChannelMerger([int numberOfInputs]) {
     if (numberOfInputs != null) {
-      return wrap_jso(_blink.BlinkAudioContext.instance.createChannelMerger_Callback_1_(unwrap_jso(this), numberOfInputs));
+      return _blink.BlinkAudioContext.instance.createChannelMerger_Callback_1_(this, numberOfInputs);
     }
-    return wrap_jso(_blink.BlinkAudioContext.instance.createChannelMerger_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkAudioContext.instance.createChannelMerger_Callback_0_(this);
   }
 
   ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) {
     if (numberOfOutputs != null) {
-      return wrap_jso(_blink.BlinkAudioContext.instance.createChannelSplitter_Callback_1_(unwrap_jso(this), numberOfOutputs));
+      return _blink.BlinkAudioContext.instance.createChannelSplitter_Callback_1_(this, numberOfOutputs);
     }
-    return wrap_jso(_blink.BlinkAudioContext.instance.createChannelSplitter_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkAudioContext.instance.createChannelSplitter_Callback_0_(this);
   }
 
   @DomName('AudioContext.createConvolver')
   @DocsEditable()
-  ConvolverNode createConvolver() => wrap_jso(_blink.BlinkAudioContext.instance.createConvolver_Callback_0_(unwrap_jso(this)));
+  ConvolverNode createConvolver() => _blink.BlinkAudioContext.instance.createConvolver_Callback_0_(this);
   
   DelayNode createDelay([num maxDelayTime]) {
     if (maxDelayTime != null) {
-      return wrap_jso(_blink.BlinkAudioContext.instance.createDelay_Callback_1_(unwrap_jso(this), maxDelayTime));
+      return _blink.BlinkAudioContext.instance.createDelay_Callback_1_(this, maxDelayTime);
     }
-    return wrap_jso(_blink.BlinkAudioContext.instance.createDelay_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkAudioContext.instance.createDelay_Callback_0_(this);
   }
 
   @DomName('AudioContext.createDynamicsCompressor')
   @DocsEditable()
-  DynamicsCompressorNode createDynamicsCompressor() => wrap_jso(_blink.BlinkAudioContext.instance.createDynamicsCompressor_Callback_0_(unwrap_jso(this)));
+  DynamicsCompressorNode createDynamicsCompressor() => _blink.BlinkAudioContext.instance.createDynamicsCompressor_Callback_0_(this);
   
   @DomName('AudioContext.createGain')
   @DocsEditable()
-  GainNode createGain() => wrap_jso(_blink.BlinkAudioContext.instance.createGain_Callback_0_(unwrap_jso(this)));
+  GainNode createGain() => _blink.BlinkAudioContext.instance.createGain_Callback_0_(this);
   
   @DomName('AudioContext.createMediaElementSource')
   @DocsEditable()
-  MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement) => wrap_jso(_blink.BlinkAudioContext.instance.createMediaElementSource_Callback_1_(unwrap_jso(this), unwrap_jso(mediaElement)));
+  MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement) => _blink.BlinkAudioContext.instance.createMediaElementSource_Callback_1_(this, mediaElement);
   
   @DomName('AudioContext.createMediaStreamDestination')
   @DocsEditable()
-  MediaStreamAudioDestinationNode createMediaStreamDestination() => wrap_jso(_blink.BlinkAudioContext.instance.createMediaStreamDestination_Callback_0_(unwrap_jso(this)));
+  MediaStreamAudioDestinationNode createMediaStreamDestination() => _blink.BlinkAudioContext.instance.createMediaStreamDestination_Callback_0_(this);
   
   @DomName('AudioContext.createMediaStreamSource')
   @DocsEditable()
-  MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) => wrap_jso(_blink.BlinkAudioContext.instance.createMediaStreamSource_Callback_1_(unwrap_jso(this), unwrap_jso(mediaStream)));
+  MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) => _blink.BlinkAudioContext.instance.createMediaStreamSource_Callback_1_(this, mediaStream);
   
   @DomName('AudioContext.createOscillator')
   @DocsEditable()
-  OscillatorNode createOscillator() => wrap_jso(_blink.BlinkAudioContext.instance.createOscillator_Callback_0_(unwrap_jso(this)));
+  OscillatorNode createOscillator() => _blink.BlinkAudioContext.instance.createOscillator_Callback_0_(this);
   
   @DomName('AudioContext.createPanner')
   @DocsEditable()
-  PannerNode createPanner() => wrap_jso(_blink.BlinkAudioContext.instance.createPanner_Callback_0_(unwrap_jso(this)));
+  PannerNode createPanner() => _blink.BlinkAudioContext.instance.createPanner_Callback_0_(this);
   
   @DomName('AudioContext.createPeriodicWave')
   @DocsEditable()
   @Experimental() // untriaged
-  PeriodicWave createPeriodicWave(Float32List real, Float32List imag) => wrap_jso(_blink.BlinkAudioContext.instance.createPeriodicWave_Callback_2_(unwrap_jso(this), real, imag));
+  PeriodicWave createPeriodicWave(Float32List real, Float32List imag) => _blink.BlinkAudioContext.instance.createPeriodicWave_Callback_2_(this, real, imag);
   
   ScriptProcessorNode createScriptProcessor([int bufferSize, int numberOfInputChannels, int numberOfOutputChannels]) {
     if (numberOfOutputChannels != null) {
-      return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Callback_3_(unwrap_jso(this), bufferSize, numberOfInputChannels, numberOfOutputChannels));
+      return _blink.BlinkAudioContext.instance.createScriptProcessor_Callback_3_(this, bufferSize, numberOfInputChannels, numberOfOutputChannels);
     }
     if (numberOfInputChannels != null) {
-      return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Callback_2_(unwrap_jso(this), bufferSize, numberOfInputChannels));
+      return _blink.BlinkAudioContext.instance.createScriptProcessor_Callback_2_(this, bufferSize, numberOfInputChannels);
     }
     if (bufferSize != null) {
-      return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Callback_1_(unwrap_jso(this), bufferSize));
+      return _blink.BlinkAudioContext.instance.createScriptProcessor_Callback_1_(this, bufferSize);
     }
-    return wrap_jso(_blink.BlinkAudioContext.instance.createScriptProcessor_Callback_0_(unwrap_jso(this)));
+    return _blink.BlinkAudioContext.instance.createScriptProcessor_Callback_0_(this);
   }
 
+  @DomName('AudioContext.createStereoPanner')
+  @DocsEditable()
+  @Experimental() // untriaged
+  StereoPannerNode createStereoPanner() => _blink.BlinkAudioContext.instance.createStereoPanner_Callback_0_(this);
+  
   @DomName('AudioContext.createWaveShaper')
   @DocsEditable()
-  WaveShaperNode createWaveShaper() => wrap_jso(_blink.BlinkAudioContext.instance.createWaveShaper_Callback_0_(unwrap_jso(this)));
+  WaveShaperNode createWaveShaper() => _blink.BlinkAudioContext.instance.createWaveShaper_Callback_0_(this);
   
-  @DomName('AudioContext.decodeAudioData')
-  @DocsEditable()
-  void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) => _blink.BlinkAudioContext.instance.decodeAudioData_Callback_3_(unwrap_jso(this), audioData, unwrap_jso((audioBuffer) => successCallback(wrap_jso(audioBuffer))), unwrap_jso((audioBuffer) => errorCallback(wrap_jso(audioBuffer))));
-  
-  @DomName('AudioContext.startRendering')
-  @DocsEditable()
-  void startRendering() => _blink.BlinkAudioContext.instance.startRendering_Callback_0_(unwrap_jso(this));
-  
-  /// Stream of `complete` events handled by this [AudioContext].
-  @DomName('AudioContext.oncomplete')
-  @DocsEditable()
-  Stream<Event> get onComplete => completeEvent.forTarget(this);
+  void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) {
+    if (errorCallback != null) {
+      _blink.BlinkAudioContext.instance.decodeAudioData_Callback_3_(this, audioData, successCallback, errorCallback);
+      return;
+    }
+    _blink.BlinkAudioContext.instance.decodeAudioData_Callback_2_(this, audioData, successCallback);
+    return;
+  }
 
+  @DomName('AudioContext.resume')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future resume() => convertNativePromiseToDartFuture(_blink.BlinkAudioContext.instance.resume_Callback_0_(this));
+  
+  @DomName('AudioContext.suspend')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future suspend() => convertNativePromiseToDartFuture(_blink.BlinkAudioContext.instance.suspend_Callback_0_(this));
+  
   @DomName('AudioContext.decodeAudioData')
   Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) {
     var completer = new Completer<AudioBuffer>();
@@ -532,11 +514,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AudioDestinationNode internalCreateAudioDestinationNode() {
-    return new AudioDestinationNode._internalWrap();
-  }
-
-  external factory AudioDestinationNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioDestinationNode.internal_() : super.internal_();
@@ -544,7 +522,7 @@
 
   @DomName('AudioDestinationNode.maxChannelCount')
   @DocsEditable()
-  int get maxChannelCount => _blink.BlinkAudioDestinationNode.instance.maxChannelCount_Getter_(unwrap_jso(this));
+  int get maxChannelCount => _blink.BlinkAudioDestinationNode.instance.maxChannelCount_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -562,48 +540,40 @@
   // To suppress missing implicit constructor warnings.
   factory AudioListener._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AudioListener internalCreateAudioListener() {
-    return new AudioListener._internalWrap();
-  }
 
-  factory AudioListener._internalWrap() {
-    return new AudioListener.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioListener.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('AudioListener.dopplerFactor')
   @DocsEditable()
-  num get dopplerFactor => _blink.BlinkAudioListener.instance.dopplerFactor_Getter_(unwrap_jso(this));
+  num get dopplerFactor => _blink.BlinkAudioListener.instance.dopplerFactor_Getter_(this);
   
   @DomName('AudioListener.dopplerFactor')
   @DocsEditable()
-  set dopplerFactor(num value) => _blink.BlinkAudioListener.instance.dopplerFactor_Setter_(unwrap_jso(this), value);
+  set dopplerFactor(num value) => _blink.BlinkAudioListener.instance.dopplerFactor_Setter_(this, value);
   
   @DomName('AudioListener.speedOfSound')
   @DocsEditable()
-  num get speedOfSound => _blink.BlinkAudioListener.instance.speedOfSound_Getter_(unwrap_jso(this));
+  num get speedOfSound => _blink.BlinkAudioListener.instance.speedOfSound_Getter_(this);
   
   @DomName('AudioListener.speedOfSound')
   @DocsEditable()
-  set speedOfSound(num value) => _blink.BlinkAudioListener.instance.speedOfSound_Setter_(unwrap_jso(this), value);
+  set speedOfSound(num value) => _blink.BlinkAudioListener.instance.speedOfSound_Setter_(this, value);
   
   @DomName('AudioListener.setOrientation')
   @DocsEditable()
-  void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) => _blink.BlinkAudioListener.instance.setOrientation_Callback_6_(unwrap_jso(this), x, y, z, xUp, yUp, zUp);
+  void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) => _blink.BlinkAudioListener.instance.setOrientation_Callback_6_(this, x, y, z, xUp, yUp, zUp);
   
   @DomName('AudioListener.setPosition')
   @DocsEditable()
-  void setPosition(num x, num y, num z) => _blink.BlinkAudioListener.instance.setPosition_Callback_3_(unwrap_jso(this), x, y, z);
+  void setPosition(num x, num y, num z) => _blink.BlinkAudioListener.instance.setPosition_Callback_3_(this, x, y, z);
   
   @DomName('AudioListener.setVelocity')
   @DocsEditable()
-  void setVelocity(num x, num y, num z) => _blink.BlinkAudioListener.instance.setVelocity_Callback_3_(unwrap_jso(this), x, y, z);
+  void setVelocity(num x, num y, num z) => _blink.BlinkAudioListener.instance.setVelocity_Callback_3_(this, x, y, z);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -620,11 +590,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AudioNode internalCreateAudioNode() {
-    return new AudioNode._internalWrap();
-  }
-
-  external factory AudioNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioNode.internal_() : super.internal_();
@@ -632,56 +598,96 @@
 
   @DomName('AudioNode.channelCount')
   @DocsEditable()
-  int get channelCount => _blink.BlinkAudioNode.instance.channelCount_Getter_(unwrap_jso(this));
+  int get channelCount => _blink.BlinkAudioNode.instance.channelCount_Getter_(this);
   
   @DomName('AudioNode.channelCount')
   @DocsEditable()
-  set channelCount(int value) => _blink.BlinkAudioNode.instance.channelCount_Setter_(unwrap_jso(this), value);
+  set channelCount(int value) => _blink.BlinkAudioNode.instance.channelCount_Setter_(this, value);
   
   @DomName('AudioNode.channelCountMode')
   @DocsEditable()
-  String get channelCountMode => _blink.BlinkAudioNode.instance.channelCountMode_Getter_(unwrap_jso(this));
+  String get channelCountMode => _blink.BlinkAudioNode.instance.channelCountMode_Getter_(this);
   
   @DomName('AudioNode.channelCountMode')
   @DocsEditable()
-  set channelCountMode(String value) => _blink.BlinkAudioNode.instance.channelCountMode_Setter_(unwrap_jso(this), value);
+  set channelCountMode(String value) => _blink.BlinkAudioNode.instance.channelCountMode_Setter_(this, value);
   
   @DomName('AudioNode.channelInterpretation')
   @DocsEditable()
-  String get channelInterpretation => _blink.BlinkAudioNode.instance.channelInterpretation_Getter_(unwrap_jso(this));
+  String get channelInterpretation => _blink.BlinkAudioNode.instance.channelInterpretation_Getter_(this);
   
   @DomName('AudioNode.channelInterpretation')
   @DocsEditable()
-  set channelInterpretation(String value) => _blink.BlinkAudioNode.instance.channelInterpretation_Setter_(unwrap_jso(this), value);
+  set channelInterpretation(String value) => _blink.BlinkAudioNode.instance.channelInterpretation_Setter_(this, value);
   
   @DomName('AudioNode.context')
   @DocsEditable()
-  AudioContext get context => wrap_jso(_blink.BlinkAudioNode.instance.context_Getter_(unwrap_jso(this)));
+  AudioContext get context => _blink.BlinkAudioNode.instance.context_Getter_(this);
   
   @DomName('AudioNode.numberOfInputs')
   @DocsEditable()
-  int get numberOfInputs => _blink.BlinkAudioNode.instance.numberOfInputs_Getter_(unwrap_jso(this));
+  int get numberOfInputs => _blink.BlinkAudioNode.instance.numberOfInputs_Getter_(this);
   
   @DomName('AudioNode.numberOfOutputs')
   @DocsEditable()
-  int get numberOfOutputs => _blink.BlinkAudioNode.instance.numberOfOutputs_Getter_(unwrap_jso(this));
+  int get numberOfOutputs => _blink.BlinkAudioNode.instance.numberOfOutputs_Getter_(this);
   
-  void _connect(destination, int output, [int input]) {
-    if ((input is int || input == null) && (output is int || output == null) && (destination is AudioNode || destination == null)) {
-      _blink.BlinkAudioNode.instance.connect_Callback_3_(unwrap_jso(this), unwrap_jso(destination), output, input);
+  void _connect(destination, [int output, int input]) {
+    if ((destination is AudioNode) && output == null && input == null) {
+      _blink.BlinkAudioNode.instance.connect_Callback_1_(this, destination);
       return;
     }
-    if ((output is int || output == null) && (destination is AudioParam || destination == null) && input == null) {
-      _blink.BlinkAudioNode.instance.connect_Callback_2_(unwrap_jso(this), unwrap_jso(destination), output);
+    if ((output is int || output == null) && (destination is AudioNode) && input == null) {
+      _blink.BlinkAudioNode.instance.connect_Callback_2_(this, destination, output);
+      return;
+    }
+    if ((input is int || input == null) && (output is int || output == null) && (destination is AudioNode)) {
+      _blink.BlinkAudioNode.instance.connect_Callback_3_(this, destination, output, input);
+      return;
+    }
+    if ((destination is AudioParam) && output == null && input == null) {
+      _blink.BlinkAudioNode.instance.connect_Callback_1_(this, destination);
+      return;
+    }
+    if ((output is int || output == null) && (destination is AudioParam) && input == null) {
+      _blink.BlinkAudioNode.instance.connect_Callback_2_(this, destination, output);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @DomName('AudioNode.disconnect')
-  @DocsEditable()
-  void disconnect(int output) => _blink.BlinkAudioNode.instance.disconnect_Callback_1_(unwrap_jso(this), output);
-  
+  void disconnect([destination_OR_output, int output, int input]) {
+    if (destination_OR_output == null && output == null && input == null) {
+      _blink.BlinkAudioNode.instance.disconnect_Callback_0_(this);
+      return;
+    }
+    if ((destination_OR_output is int) && output == null && input == null) {
+      _blink.BlinkAudioNode.instance.disconnect_Callback_1_(this, destination_OR_output);
+      return;
+    }
+    if ((destination_OR_output is AudioNode) && output == null && input == null) {
+      _blink.BlinkAudioNode.instance.disconnect_Callback_1_(this, destination_OR_output);
+      return;
+    }
+    if ((output is int) && (destination_OR_output is AudioNode) && input == null) {
+      _blink.BlinkAudioNode.instance.disconnect_Callback_2_(this, destination_OR_output, output);
+      return;
+    }
+    if ((input is int) && (output is int) && (destination_OR_output is AudioNode)) {
+      _blink.BlinkAudioNode.instance.disconnect_Callback_3_(this, destination_OR_output, output, input);
+      return;
+    }
+    if ((destination_OR_output is AudioParam) && output == null && input == null) {
+      _blink.BlinkAudioNode.instance.disconnect_Callback_1_(this, destination_OR_output);
+      return;
+    }
+    if ((output is int) && (destination_OR_output is AudioParam) && input == null) {
+      _blink.BlinkAudioNode.instance.disconnect_Callback_2_(this, destination_OR_output, output);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('AudioNode.connect')
   void connectNode(AudioNode destination, [int output = 0, int input = 0]) =>
       _connect(destination, output, input);
@@ -705,56 +711,48 @@
   // To suppress missing implicit constructor warnings.
   factory AudioParam._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AudioParam internalCreateAudioParam() {
-    return new AudioParam._internalWrap();
-  }
 
-  factory AudioParam._internalWrap() {
-    return new AudioParam.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioParam.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('AudioParam.defaultValue')
   @DocsEditable()
-  num get defaultValue => _blink.BlinkAudioParam.instance.defaultValue_Getter_(unwrap_jso(this));
+  num get defaultValue => _blink.BlinkAudioParam.instance.defaultValue_Getter_(this);
   
   @DomName('AudioParam.value')
   @DocsEditable()
-  num get value => _blink.BlinkAudioParam.instance.value_Getter_(unwrap_jso(this));
+  num get value => _blink.BlinkAudioParam.instance.value_Getter_(this);
   
   @DomName('AudioParam.value')
   @DocsEditable()
-  set value(num value) => _blink.BlinkAudioParam.instance.value_Setter_(unwrap_jso(this), value);
+  set value(num value) => _blink.BlinkAudioParam.instance.value_Setter_(this, value);
   
   @DomName('AudioParam.cancelScheduledValues')
   @DocsEditable()
-  void cancelScheduledValues(num startTime) => _blink.BlinkAudioParam.instance.cancelScheduledValues_Callback_1_(unwrap_jso(this), startTime);
+  void cancelScheduledValues(num startTime) => _blink.BlinkAudioParam.instance.cancelScheduledValues_Callback_1_(this, startTime);
   
   @DomName('AudioParam.exponentialRampToValueAtTime')
   @DocsEditable()
-  void exponentialRampToValueAtTime(num value, num time) => _blink.BlinkAudioParam.instance.exponentialRampToValueAtTime_Callback_2_(unwrap_jso(this), value, time);
+  void exponentialRampToValueAtTime(num value, num time) => _blink.BlinkAudioParam.instance.exponentialRampToValueAtTime_Callback_2_(this, value, time);
   
   @DomName('AudioParam.linearRampToValueAtTime')
   @DocsEditable()
-  void linearRampToValueAtTime(num value, num time) => _blink.BlinkAudioParam.instance.linearRampToValueAtTime_Callback_2_(unwrap_jso(this), value, time);
+  void linearRampToValueAtTime(num value, num time) => _blink.BlinkAudioParam.instance.linearRampToValueAtTime_Callback_2_(this, value, time);
   
   @DomName('AudioParam.setTargetAtTime')
   @DocsEditable()
-  void setTargetAtTime(num target, num time, num timeConstant) => _blink.BlinkAudioParam.instance.setTargetAtTime_Callback_3_(unwrap_jso(this), target, time, timeConstant);
+  void setTargetAtTime(num target, num time, num timeConstant) => _blink.BlinkAudioParam.instance.setTargetAtTime_Callback_3_(this, target, time, timeConstant);
   
   @DomName('AudioParam.setValueAtTime')
   @DocsEditable()
-  void setValueAtTime(num value, num time) => _blink.BlinkAudioParam.instance.setValueAtTime_Callback_2_(unwrap_jso(this), value, time);
+  void setValueAtTime(num value, num time) => _blink.BlinkAudioParam.instance.setValueAtTime_Callback_2_(this, value, time);
   
   @DomName('AudioParam.setValueCurveAtTime')
   @DocsEditable()
-  void setValueCurveAtTime(Float32List values, num time, num duration) => _blink.BlinkAudioParam.instance.setValueCurveAtTime_Callback_3_(unwrap_jso(this), values, time, duration);
+  void setValueCurveAtTime(Float32List values, num time, num duration) => _blink.BlinkAudioParam.instance.setValueCurveAtTime_Callback_3_(this, values, time, duration);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -774,11 +772,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AudioProcessingEvent internalCreateAudioProcessingEvent() {
-    return new AudioProcessingEvent._internalWrap();
-  }
-
-  external factory AudioProcessingEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioProcessingEvent.internal_() : super.internal_();
@@ -786,16 +780,16 @@
 
   @DomName('AudioProcessingEvent.inputBuffer')
   @DocsEditable()
-  AudioBuffer get inputBuffer => wrap_jso(_blink.BlinkAudioProcessingEvent.instance.inputBuffer_Getter_(unwrap_jso(this)));
+  AudioBuffer get inputBuffer => _blink.BlinkAudioProcessingEvent.instance.inputBuffer_Getter_(this);
   
   @DomName('AudioProcessingEvent.outputBuffer')
   @DocsEditable()
-  AudioBuffer get outputBuffer => wrap_jso(_blink.BlinkAudioProcessingEvent.instance.outputBuffer_Getter_(unwrap_jso(this)));
+  AudioBuffer get outputBuffer => _blink.BlinkAudioProcessingEvent.instance.outputBuffer_Getter_(this);
   
   @DomName('AudioProcessingEvent.playbackTime')
   @DocsEditable()
   @Experimental() // untriaged
-  num get playbackTime => _blink.BlinkAudioProcessingEvent.instance.playbackTime_Getter_(unwrap_jso(this));
+  num get playbackTime => _blink.BlinkAudioProcessingEvent.instance.playbackTime_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -815,11 +809,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static AudioSourceNode internalCreateAudioSourceNode() {
-    return new AudioSourceNode._internalWrap();
-  }
-
-  external factory AudioSourceNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AudioSourceNode.internal_() : super.internal_();
@@ -843,11 +833,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static BiquadFilterNode internalCreateBiquadFilterNode() {
-    return new BiquadFilterNode._internalWrap();
-  }
-
-  external factory BiquadFilterNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   BiquadFilterNode.internal_() : super.internal_();
@@ -855,31 +841,31 @@
 
   @DomName('BiquadFilterNode.Q')
   @DocsEditable()
-  AudioParam get Q => wrap_jso(_blink.BlinkBiquadFilterNode.instance.Q_Getter_(unwrap_jso(this)));
+  AudioParam get Q => _blink.BlinkBiquadFilterNode.instance.Q_Getter_(this);
   
   @DomName('BiquadFilterNode.detune')
   @DocsEditable()
-  AudioParam get detune => wrap_jso(_blink.BlinkBiquadFilterNode.instance.detune_Getter_(unwrap_jso(this)));
+  AudioParam get detune => _blink.BlinkBiquadFilterNode.instance.detune_Getter_(this);
   
   @DomName('BiquadFilterNode.frequency')
   @DocsEditable()
-  AudioParam get frequency => wrap_jso(_blink.BlinkBiquadFilterNode.instance.frequency_Getter_(unwrap_jso(this)));
+  AudioParam get frequency => _blink.BlinkBiquadFilterNode.instance.frequency_Getter_(this);
   
   @DomName('BiquadFilterNode.gain')
   @DocsEditable()
-  AudioParam get gain => wrap_jso(_blink.BlinkBiquadFilterNode.instance.gain_Getter_(unwrap_jso(this)));
+  AudioParam get gain => _blink.BlinkBiquadFilterNode.instance.gain_Getter_(this);
   
   @DomName('BiquadFilterNode.type')
   @DocsEditable()
-  String get type => _blink.BlinkBiquadFilterNode.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkBiquadFilterNode.instance.type_Getter_(this);
   
   @DomName('BiquadFilterNode.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkBiquadFilterNode.instance.type_Setter_(unwrap_jso(this), value);
+  set type(String value) => _blink.BlinkBiquadFilterNode.instance.type_Setter_(this, value);
   
   @DomName('BiquadFilterNode.getFrequencyResponse')
   @DocsEditable()
-  void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse, Float32List phaseResponse) => _blink.BlinkBiquadFilterNode.instance.getFrequencyResponse_Callback_3_(unwrap_jso(this), frequencyHz, magResponse, phaseResponse);
+  void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse, Float32List phaseResponse) => _blink.BlinkBiquadFilterNode.instance.getFrequencyResponse_Callback_3_(this, frequencyHz, magResponse, phaseResponse);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -899,11 +885,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ChannelMergerNode internalCreateChannelMergerNode() {
-    return new ChannelMergerNode._internalWrap();
-  }
-
-  external factory ChannelMergerNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ChannelMergerNode.internal_() : super.internal_();
@@ -927,11 +909,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ChannelSplitterNode internalCreateChannelSplitterNode() {
-    return new ChannelSplitterNode._internalWrap();
-  }
-
-  external factory ChannelSplitterNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ChannelSplitterNode.internal_() : super.internal_();
@@ -955,11 +933,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ConvolverNode internalCreateConvolverNode() {
-    return new ConvolverNode._internalWrap();
-  }
-
-  external factory ConvolverNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ConvolverNode.internal_() : super.internal_();
@@ -967,19 +941,19 @@
 
   @DomName('ConvolverNode.buffer')
   @DocsEditable()
-  AudioBuffer get buffer => wrap_jso(_blink.BlinkConvolverNode.instance.buffer_Getter_(unwrap_jso(this)));
+  AudioBuffer get buffer => _blink.BlinkConvolverNode.instance.buffer_Getter_(this);
   
   @DomName('ConvolverNode.buffer')
   @DocsEditable()
-  set buffer(AudioBuffer value) => _blink.BlinkConvolverNode.instance.buffer_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set buffer(AudioBuffer value) => _blink.BlinkConvolverNode.instance.buffer_Setter_(this, value);
   
   @DomName('ConvolverNode.normalize')
   @DocsEditable()
-  bool get normalize => _blink.BlinkConvolverNode.instance.normalize_Getter_(unwrap_jso(this));
+  bool get normalize => _blink.BlinkConvolverNode.instance.normalize_Getter_(this);
   
   @DomName('ConvolverNode.normalize')
   @DocsEditable()
-  set normalize(bool value) => _blink.BlinkConvolverNode.instance.normalize_Setter_(unwrap_jso(this), value);
+  set normalize(bool value) => _blink.BlinkConvolverNode.instance.normalize_Setter_(this, value);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -999,11 +973,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DelayNode internalCreateDelayNode() {
-    return new DelayNode._internalWrap();
-  }
-
-  external factory DelayNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DelayNode.internal_() : super.internal_();
@@ -1011,7 +981,7 @@
 
   @DomName('DelayNode.delayTime')
   @DocsEditable()
-  AudioParam get delayTime => wrap_jso(_blink.BlinkDelayNode.instance.delayTime_Getter_(unwrap_jso(this)));
+  AudioParam get delayTime => _blink.BlinkDelayNode.instance.delayTime_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1031,11 +1001,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static DynamicsCompressorNode internalCreateDynamicsCompressorNode() {
-    return new DynamicsCompressorNode._internalWrap();
-  }
-
-  external factory DynamicsCompressorNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DynamicsCompressorNode.internal_() : super.internal_();
@@ -1043,27 +1009,27 @@
 
   @DomName('DynamicsCompressorNode.attack')
   @DocsEditable()
-  AudioParam get attack => wrap_jso(_blink.BlinkDynamicsCompressorNode.instance.attack_Getter_(unwrap_jso(this)));
+  AudioParam get attack => _blink.BlinkDynamicsCompressorNode.instance.attack_Getter_(this);
   
   @DomName('DynamicsCompressorNode.knee')
   @DocsEditable()
-  AudioParam get knee => wrap_jso(_blink.BlinkDynamicsCompressorNode.instance.knee_Getter_(unwrap_jso(this)));
+  AudioParam get knee => _blink.BlinkDynamicsCompressorNode.instance.knee_Getter_(this);
   
   @DomName('DynamicsCompressorNode.ratio')
   @DocsEditable()
-  AudioParam get ratio => wrap_jso(_blink.BlinkDynamicsCompressorNode.instance.ratio_Getter_(unwrap_jso(this)));
+  AudioParam get ratio => _blink.BlinkDynamicsCompressorNode.instance.ratio_Getter_(this);
   
   @DomName('DynamicsCompressorNode.reduction')
   @DocsEditable()
-  AudioParam get reduction => wrap_jso(_blink.BlinkDynamicsCompressorNode.instance.reduction_Getter_(unwrap_jso(this)));
+  AudioParam get reduction => _blink.BlinkDynamicsCompressorNode.instance.reduction_Getter_(this);
   
   @DomName('DynamicsCompressorNode.release')
   @DocsEditable()
-  AudioParam get release => wrap_jso(_blink.BlinkDynamicsCompressorNode.instance.release_Getter_(unwrap_jso(this)));
+  AudioParam get release => _blink.BlinkDynamicsCompressorNode.instance.release_Getter_(this);
   
   @DomName('DynamicsCompressorNode.threshold')
   @DocsEditable()
-  AudioParam get threshold => wrap_jso(_blink.BlinkDynamicsCompressorNode.instance.threshold_Getter_(unwrap_jso(this)));
+  AudioParam get threshold => _blink.BlinkDynamicsCompressorNode.instance.threshold_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1083,11 +1049,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static GainNode internalCreateGainNode() {
-    return new GainNode._internalWrap();
-  }
-
-  external factory GainNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   GainNode.internal_() : super.internal_();
@@ -1095,7 +1057,7 @@
 
   @DomName('GainNode.gain')
   @DocsEditable()
-  AudioParam get gain => wrap_jso(_blink.BlinkGainNode.instance.gain_Getter_(unwrap_jso(this)));
+  AudioParam get gain => _blink.BlinkGainNode.instance.gain_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1115,11 +1077,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MediaElementAudioSourceNode internalCreateMediaElementAudioSourceNode() {
-    return new MediaElementAudioSourceNode._internalWrap();
-  }
-
-  external factory MediaElementAudioSourceNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaElementAudioSourceNode.internal_() : super.internal_();
@@ -1128,7 +1086,7 @@
   @DomName('MediaElementAudioSourceNode.mediaElement')
   @DocsEditable()
   @Experimental() // non-standard
-  MediaElement get mediaElement => wrap_jso(_blink.BlinkMediaElementAudioSourceNode.instance.mediaElement_Getter_(unwrap_jso(this)));
+  MediaElement get mediaElement => _blink.BlinkMediaElementAudioSourceNode.instance.mediaElement_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1148,11 +1106,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MediaStreamAudioDestinationNode internalCreateMediaStreamAudioDestinationNode() {
-    return new MediaStreamAudioDestinationNode._internalWrap();
-  }
-
-  external factory MediaStreamAudioDestinationNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaStreamAudioDestinationNode.internal_() : super.internal_();
@@ -1160,7 +1114,7 @@
 
   @DomName('MediaStreamAudioDestinationNode.stream')
   @DocsEditable()
-  MediaStream get stream => wrap_jso(_blink.BlinkMediaStreamAudioDestinationNode.instance.stream_Getter_(unwrap_jso(this)));
+  MediaStream get stream => _blink.BlinkMediaStreamAudioDestinationNode.instance.stream_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1180,11 +1134,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static MediaStreamAudioSourceNode internalCreateMediaStreamAudioSourceNode() {
-    return new MediaStreamAudioSourceNode._internalWrap();
-  }
-
-  external factory MediaStreamAudioSourceNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   MediaStreamAudioSourceNode.internal_() : super.internal_();
@@ -1192,7 +1142,7 @@
 
   @DomName('MediaStreamAudioSourceNode.mediaStream')
   @DocsEditable()
-  MediaStream get mediaStream => wrap_jso(_blink.BlinkMediaStreamAudioSourceNode.instance.mediaStream_Getter_(unwrap_jso(this)));
+  MediaStream get mediaStream => _blink.BlinkMediaStreamAudioSourceNode.instance.mediaStream_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1212,11 +1162,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static OfflineAudioCompletionEvent internalCreateOfflineAudioCompletionEvent() {
-    return new OfflineAudioCompletionEvent._internalWrap();
-  }
-
-  external factory OfflineAudioCompletionEvent._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OfflineAudioCompletionEvent.internal_() : super.internal_();
@@ -1224,7 +1170,7 @@
 
   @DomName('OfflineAudioCompletionEvent.renderedBuffer')
   @DocsEditable()
-  AudioBuffer get renderedBuffer => wrap_jso(_blink.BlinkOfflineAudioCompletionEvent.instance.renderedBuffer_Getter_(unwrap_jso(this)));
+  AudioBuffer get renderedBuffer => _blink.BlinkOfflineAudioCompletionEvent.instance.renderedBuffer_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1245,21 +1191,22 @@
   @DomName('OfflineAudioContext.OfflineAudioContext')
   @DocsEditable()
   factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num sampleRate) {
-    return wrap_jso(_blink.BlinkOfflineAudioContext.instance.constructorCallback_3_(numberOfChannels, numberOfFrames, sampleRate));
+    return _blink.BlinkOfflineAudioContext.instance.constructorCallback_3_(numberOfChannels, numberOfFrames, sampleRate);
   }
 
 
   @Deprecated("Internal Use Only")
-  static OfflineAudioContext internalCreateOfflineAudioContext() {
-    return new OfflineAudioContext._internalWrap();
-  }
-
-  external factory OfflineAudioContext._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OfflineAudioContext.internal_() : super.internal_();
 
 
+  @DomName('OfflineAudioContext.startRendering')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Future startRendering() => convertNativePromiseToDartFuture(_blink.BlinkOfflineAudioContext.instance.startRendering_Callback_0_(this));
+  
 }
 // 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
@@ -1289,11 +1236,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static OscillatorNode internalCreateOscillatorNode() {
-    return new OscillatorNode._internalWrap();
-  }
-
-  external factory OscillatorNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OscillatorNode.internal_() : super.internal_();
@@ -1301,48 +1244,40 @@
 
   @DomName('OscillatorNode.detune')
   @DocsEditable()
-  AudioParam get detune => wrap_jso(_blink.BlinkOscillatorNode.instance.detune_Getter_(unwrap_jso(this)));
+  AudioParam get detune => _blink.BlinkOscillatorNode.instance.detune_Getter_(this);
   
   @DomName('OscillatorNode.frequency')
   @DocsEditable()
-  AudioParam get frequency => wrap_jso(_blink.BlinkOscillatorNode.instance.frequency_Getter_(unwrap_jso(this)));
+  AudioParam get frequency => _blink.BlinkOscillatorNode.instance.frequency_Getter_(this);
   
   @DomName('OscillatorNode.type')
   @DocsEditable()
-  String get type => _blink.BlinkOscillatorNode.instance.type_Getter_(unwrap_jso(this));
+  String get type => _blink.BlinkOscillatorNode.instance.type_Getter_(this);
   
   @DomName('OscillatorNode.type')
   @DocsEditable()
-  set type(String value) => _blink.BlinkOscillatorNode.instance.type_Setter_(unwrap_jso(this), value);
-  
-  @DomName('OscillatorNode.noteOff')
-  @DocsEditable()
-  void noteOff(num when) => _blink.BlinkOscillatorNode.instance.noteOff_Callback_1_(unwrap_jso(this), when);
-  
-  @DomName('OscillatorNode.noteOn')
-  @DocsEditable()
-  void noteOn(num when) => _blink.BlinkOscillatorNode.instance.noteOn_Callback_1_(unwrap_jso(this), when);
+  set type(String value) => _blink.BlinkOscillatorNode.instance.type_Setter_(this, value);
   
   @DomName('OscillatorNode.setPeriodicWave')
   @DocsEditable()
   @Experimental() // untriaged
-  void setPeriodicWave(PeriodicWave periodicWave) => _blink.BlinkOscillatorNode.instance.setPeriodicWave_Callback_1_(unwrap_jso(this), unwrap_jso(periodicWave));
+  void setPeriodicWave(PeriodicWave periodicWave) => _blink.BlinkOscillatorNode.instance.setPeriodicWave_Callback_1_(this, periodicWave);
   
   void start([num when]) {
     if (when != null) {
-      _blink.BlinkOscillatorNode.instance.start_Callback_1_(unwrap_jso(this), when);
+      _blink.BlinkOscillatorNode.instance.start_Callback_1_(this, when);
       return;
     }
-    _blink.BlinkOscillatorNode.instance.start_Callback_0_(unwrap_jso(this));
+    _blink.BlinkOscillatorNode.instance.start_Callback_0_(this);
     return;
   }
 
   void stop([num when]) {
     if (when != null) {
-      _blink.BlinkOscillatorNode.instance.stop_Callback_1_(unwrap_jso(this), when);
+      _blink.BlinkOscillatorNode.instance.stop_Callback_1_(this, when);
       return;
     }
-    _blink.BlinkOscillatorNode.instance.stop_Callback_0_(unwrap_jso(this));
+    _blink.BlinkOscillatorNode.instance.stop_Callback_0_(this);
     return;
   }
 
@@ -1370,11 +1305,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static PannerNode internalCreatePannerNode() {
-    return new PannerNode._internalWrap();
-  }
-
-  external factory PannerNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PannerNode.internal_() : super.internal_();
@@ -1382,79 +1313,79 @@
 
   @DomName('PannerNode.coneInnerAngle')
   @DocsEditable()
-  num get coneInnerAngle => _blink.BlinkPannerNode.instance.coneInnerAngle_Getter_(unwrap_jso(this));
+  num get coneInnerAngle => _blink.BlinkPannerNode.instance.coneInnerAngle_Getter_(this);
   
   @DomName('PannerNode.coneInnerAngle')
   @DocsEditable()
-  set coneInnerAngle(num value) => _blink.BlinkPannerNode.instance.coneInnerAngle_Setter_(unwrap_jso(this), value);
+  set coneInnerAngle(num value) => _blink.BlinkPannerNode.instance.coneInnerAngle_Setter_(this, value);
   
   @DomName('PannerNode.coneOuterAngle')
   @DocsEditable()
-  num get coneOuterAngle => _blink.BlinkPannerNode.instance.coneOuterAngle_Getter_(unwrap_jso(this));
+  num get coneOuterAngle => _blink.BlinkPannerNode.instance.coneOuterAngle_Getter_(this);
   
   @DomName('PannerNode.coneOuterAngle')
   @DocsEditable()
-  set coneOuterAngle(num value) => _blink.BlinkPannerNode.instance.coneOuterAngle_Setter_(unwrap_jso(this), value);
+  set coneOuterAngle(num value) => _blink.BlinkPannerNode.instance.coneOuterAngle_Setter_(this, value);
   
   @DomName('PannerNode.coneOuterGain')
   @DocsEditable()
-  num get coneOuterGain => _blink.BlinkPannerNode.instance.coneOuterGain_Getter_(unwrap_jso(this));
+  num get coneOuterGain => _blink.BlinkPannerNode.instance.coneOuterGain_Getter_(this);
   
   @DomName('PannerNode.coneOuterGain')
   @DocsEditable()
-  set coneOuterGain(num value) => _blink.BlinkPannerNode.instance.coneOuterGain_Setter_(unwrap_jso(this), value);
+  set coneOuterGain(num value) => _blink.BlinkPannerNode.instance.coneOuterGain_Setter_(this, value);
   
   @DomName('PannerNode.distanceModel')
   @DocsEditable()
-  String get distanceModel => _blink.BlinkPannerNode.instance.distanceModel_Getter_(unwrap_jso(this));
+  String get distanceModel => _blink.BlinkPannerNode.instance.distanceModel_Getter_(this);
   
   @DomName('PannerNode.distanceModel')
   @DocsEditable()
-  set distanceModel(String value) => _blink.BlinkPannerNode.instance.distanceModel_Setter_(unwrap_jso(this), value);
+  set distanceModel(String value) => _blink.BlinkPannerNode.instance.distanceModel_Setter_(this, value);
   
   @DomName('PannerNode.maxDistance')
   @DocsEditable()
-  num get maxDistance => _blink.BlinkPannerNode.instance.maxDistance_Getter_(unwrap_jso(this));
+  num get maxDistance => _blink.BlinkPannerNode.instance.maxDistance_Getter_(this);
   
   @DomName('PannerNode.maxDistance')
   @DocsEditable()
-  set maxDistance(num value) => _blink.BlinkPannerNode.instance.maxDistance_Setter_(unwrap_jso(this), value);
+  set maxDistance(num value) => _blink.BlinkPannerNode.instance.maxDistance_Setter_(this, value);
   
   @DomName('PannerNode.panningModel')
   @DocsEditable()
-  String get panningModel => _blink.BlinkPannerNode.instance.panningModel_Getter_(unwrap_jso(this));
+  String get panningModel => _blink.BlinkPannerNode.instance.panningModel_Getter_(this);
   
   @DomName('PannerNode.panningModel')
   @DocsEditable()
-  set panningModel(String value) => _blink.BlinkPannerNode.instance.panningModel_Setter_(unwrap_jso(this), value);
+  set panningModel(String value) => _blink.BlinkPannerNode.instance.panningModel_Setter_(this, value);
   
   @DomName('PannerNode.refDistance')
   @DocsEditable()
-  num get refDistance => _blink.BlinkPannerNode.instance.refDistance_Getter_(unwrap_jso(this));
+  num get refDistance => _blink.BlinkPannerNode.instance.refDistance_Getter_(this);
   
   @DomName('PannerNode.refDistance')
   @DocsEditable()
-  set refDistance(num value) => _blink.BlinkPannerNode.instance.refDistance_Setter_(unwrap_jso(this), value);
+  set refDistance(num value) => _blink.BlinkPannerNode.instance.refDistance_Setter_(this, value);
   
   @DomName('PannerNode.rolloffFactor')
   @DocsEditable()
-  num get rolloffFactor => _blink.BlinkPannerNode.instance.rolloffFactor_Getter_(unwrap_jso(this));
+  num get rolloffFactor => _blink.BlinkPannerNode.instance.rolloffFactor_Getter_(this);
   
   @DomName('PannerNode.rolloffFactor')
   @DocsEditable()
-  set rolloffFactor(num value) => _blink.BlinkPannerNode.instance.rolloffFactor_Setter_(unwrap_jso(this), value);
+  set rolloffFactor(num value) => _blink.BlinkPannerNode.instance.rolloffFactor_Setter_(this, value);
   
   @DomName('PannerNode.setOrientation')
   @DocsEditable()
-  void setOrientation(num x, num y, num z) => _blink.BlinkPannerNode.instance.setOrientation_Callback_3_(unwrap_jso(this), x, y, z);
+  void setOrientation(num x, num y, num z) => _blink.BlinkPannerNode.instance.setOrientation_Callback_3_(this, x, y, z);
   
   @DomName('PannerNode.setPosition')
   @DocsEditable()
-  void setPosition(num x, num y, num z) => _blink.BlinkPannerNode.instance.setPosition_Callback_3_(unwrap_jso(this), x, y, z);
+  void setPosition(num x, num y, num z) => _blink.BlinkPannerNode.instance.setPosition_Callback_3_(this, x, y, z);
   
   @DomName('PannerNode.setVelocity')
   @DocsEditable()
-  void setVelocity(num x, num y, num z) => _blink.BlinkPannerNode.instance.setVelocity_Callback_3_(unwrap_jso(this), x, y, z);
+  void setVelocity(num x, num y, num z) => _blink.BlinkPannerNode.instance.setVelocity_Callback_3_(this, x, y, z);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1471,21 +1402,13 @@
   // To suppress missing implicit constructor warnings.
   factory PeriodicWave._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static PeriodicWave internalCreatePeriodicWave() {
-    return new PeriodicWave._internalWrap();
-  }
 
-  factory PeriodicWave._internalWrap() {
-    return new PeriodicWave.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   PeriodicWave.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1515,11 +1438,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static ScriptProcessorNode internalCreateScriptProcessorNode() {
-    return new ScriptProcessorNode._internalWrap();
-  }
-
-  external factory ScriptProcessorNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ScriptProcessorNode.internal_() : super.internal_();
@@ -1527,12 +1446,12 @@
 
   @DomName('ScriptProcessorNode.bufferSize')
   @DocsEditable()
-  int get bufferSize => _blink.BlinkScriptProcessorNode.instance.bufferSize_Getter_(unwrap_jso(this));
+  int get bufferSize => _blink.BlinkScriptProcessorNode.instance.bufferSize_Getter_(this);
   
   @DomName('ScriptProcessorNode.setEventListener')
   @DocsEditable()
   @Experimental() // untriaged
-  void setEventListener(EventListener eventListener) => _blink.BlinkScriptProcessorNode.instance.setEventListener_Callback_1_(unwrap_jso(this), unwrap_jso((event) => eventListener(wrap_jso(event))));
+  void setEventListener(EventListener eventListener) => _blink.BlinkScriptProcessorNode.instance.setEventListener_Callback_1_(this, eventListener);
   
   /// Stream of `audioprocess` events handled by this [ScriptProcessorNode].
 /**
@@ -1556,6 +1475,34 @@
 
 
 @DocsEditable()
+@DomName('StereoPannerNode')
+@Experimental() // untriaged
+class StereoPannerNode extends AudioNode {
+  // To suppress missing implicit constructor warnings.
+  factory StereoPannerNode._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  StereoPannerNode.internal_() : super.internal_();
+
+
+  @DomName('StereoPannerNode.pan')
+  @DocsEditable()
+  @Experimental() // untriaged
+  AudioParam get pan => _blink.BlinkStereoPannerNode.instance.pan_Getter_(this);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('WaveShaperNode')
 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-WaveShaperNode
 @Experimental()
@@ -1565,11 +1512,7 @@
 
 
   @Deprecated("Internal Use Only")
-  static WaveShaperNode internalCreateWaveShaperNode() {
-    return new WaveShaperNode._internalWrap();
-  }
-
-  external factory WaveShaperNode._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   WaveShaperNode.internal_() : super.internal_();
@@ -1577,18 +1520,18 @@
 
   @DomName('WaveShaperNode.curve')
   @DocsEditable()
-  Float32List get curve => _blink.BlinkWaveShaperNode.instance.curve_Getter_(unwrap_jso(this));
+  Float32List get curve => _blink.BlinkWaveShaperNode.instance.curve_Getter_(this);
   
   @DomName('WaveShaperNode.curve')
   @DocsEditable()
-  set curve(Float32List value) => _blink.BlinkWaveShaperNode.instance.curve_Setter_(unwrap_jso(this), unwrap_jso(value));
+  set curve(Float32List value) => _blink.BlinkWaveShaperNode.instance.curve_Setter_(this, value);
   
   @DomName('WaveShaperNode.oversample')
   @DocsEditable()
-  String get oversample => _blink.BlinkWaveShaperNode.instance.oversample_Getter_(unwrap_jso(this));
+  String get oversample => _blink.BlinkWaveShaperNode.instance.oversample_Getter_(this);
   
   @DomName('WaveShaperNode.oversample')
   @DocsEditable()
-  set oversample(String value) => _blink.BlinkWaveShaperNode.instance.oversample_Setter_(unwrap_jso(this), value);
+  set oversample(String value) => _blink.BlinkWaveShaperNode.instance.oversample_Setter_(this, value);
   
 }
diff --git a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
index 2ce52d4..ac38baa 100644
--- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
+++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
@@ -401,6 +401,71 @@
 
 
 @DocsEditable()
+@DomName('CHROMIUMSubscribeUniform')
+@Experimental() // untriaged
+@Native("CHROMIUMSubscribeUniform")
+class ChromiumSubscribeUniform extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory ChromiumSubscribeUniform._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('CHROMIUMSubscribeUniform.MOUSE_POSITION_CHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MOUSE_POSITION_CHROMIUM = 0x924C;
+
+  @DomName('CHROMIUMSubscribeUniform.SUBSCRIBED_VALUES_BUFFER_CHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SUBSCRIBED_VALUES_BUFFER_CHROMIUM = 0x924B;
+
+  @JSName('bindValuebufferCHROMIUM')
+  @DomName('CHROMIUMSubscribeUniform.bindValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindValuebufferChromium(int target, ChromiumValuebuffer buffer) native;
+
+  @JSName('createValuebufferCHROMIUM')
+  @DomName('CHROMIUMSubscribeUniform.createValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ChromiumValuebuffer createValuebufferChromium() native;
+
+  @JSName('deleteValuebufferCHROMIUM')
+  @DomName('CHROMIUMSubscribeUniform.deleteValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteValuebufferChromium(ChromiumValuebuffer buffer) native;
+
+  @JSName('isValuebufferCHROMIUM')
+  @DomName('CHROMIUMSubscribeUniform.isValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isValuebufferChromium(ChromiumValuebuffer buffer) native;
+
+  @JSName('populateSubscribedValuesCHROMIUM')
+  @DomName('CHROMIUMSubscribeUniform.populateSubscribedValuesCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void populateSubscribedValuesChromium(int target) native;
+
+  @JSName('subscribeValueCHROMIUM')
+  @DomName('CHROMIUMSubscribeUniform.subscribeValueCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void subscribeValueChromium(int target, int subscriptions) native;
+
+  @JSName('uniformValuebufferCHROMIUM')
+  @DomName('CHROMIUMSubscribeUniform.uniformValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformValuebufferChromium(UniformLocation location, int target, int subscription) native;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('WebGLCompressedTextureATC')
 // http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_atc/
 @Experimental()
@@ -505,70 +570,6 @@
 
 
 @DocsEditable()
-/**
- * The properties of a WebGL rendering context.
- *
- * If [alpha] is `true`, then the context has an alpha channel.
- *
- * If [antialias] is `true`, then antialiasing is performed by the browser, but
- * only if the browser's implementation of WebGL supports antialiasing.
- *
- * If [depth] is `true`, then the context has a depth buffer of at least 16
- * bits.
- *
- * If [premultipliedAlpha] is `true`, then the context's colors are assumed to
- * be premultiplied. This means that color values are assumed to have  been
- * multiplied by their alpha values. If [alpha] is `false`, then this flag is
- * ignored.
- *
- * If [preserveDrawingBuffer] is `false`, then all contents of the context are
- * cleared. If `true`, then all values will remain until changed or cleared.
- *
- * If [stencil] is `true`, then the context has a stencil buffer of at least 8
- * bits.
- */
-@DomName('WebGLContextAttributes')
-@Unstable()
-@Native("WebGLContextAttributes")
-class ContextAttributes extends Interceptor {
-  // To suppress missing implicit constructor warnings.
-  factory ContextAttributes._() { throw new UnsupportedError("Not supported"); }
-
-  @DomName('WebGLContextAttributes.alpha')
-  @DocsEditable()
-  bool alpha;
-
-  @DomName('WebGLContextAttributes.antialias')
-  @DocsEditable()
-  bool antialias;
-
-  @DomName('WebGLContextAttributes.depth')
-  @DocsEditable()
-  bool depth;
-
-  @DomName('WebGLContextAttributes.failIfMajorPerformanceCaveat')
-  @DocsEditable()
-  @Experimental() // untriaged
-  bool failIfMajorPerformanceCaveat;
-
-  @DomName('WebGLContextAttributes.premultipliedAlpha')
-  @DocsEditable()
-  bool premultipliedAlpha;
-
-  @DomName('WebGLContextAttributes.preserveDrawingBuffer')
-  @DocsEditable()
-  bool preserveDrawingBuffer;
-
-  @DomName('WebGLContextAttributes.stencil')
-  @DocsEditable()
-  bool stencil;
-}
-// 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.
-
-
-@DocsEditable()
 @DomName('WebGLContextEvent')
 @Unstable()
 @Native("WebGLContextEvent")
@@ -576,6 +577,18 @@
   // To suppress missing implicit constructor warnings.
   factory ContextEvent._() { throw new UnsupportedError("Not supported"); }
 
+  @DomName('WebGLContextEvent.WebGLContextEvent')
+  @DocsEditable()
+  factory ContextEvent(String type, [Map eventInit]) {
+    if (eventInit != null) {
+      var eventInit_1 = convertDartToNative_Dictionary(eventInit);
+      return ContextEvent._create_1(type, eventInit_1);
+    }
+    return ContextEvent._create_2(type);
+  }
+  static ContextEvent _create_1(type, eventInit) => JS('ContextEvent', 'new WebGLContextEvent(#,#)', type, eventInit);
+  static ContextEvent _create_2(type) => JS('ContextEvent', 'new WebGLContextEvent(#)', type);
+
   @DomName('WebGLContextEvent.statusMessage')
   @DocsEditable()
   final String statusMessage;
@@ -799,6 +812,39 @@
 
 
 @DocsEditable()
+@DomName('EXTsRGB')
+@Experimental() // untriaged
+@Native("EXTsRGB")
+class EXTsRgb extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory EXTsRgb._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('EXTsRGB.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210;
+
+  @DomName('EXTsRGB.SRGB8_ALPHA8_EXT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRGB8_ALPHA8_EXT = 0x8C43;
+
+  @DomName('EXTsRGB.SRGB_ALPHA_EXT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRGB_ALPHA_EXT = 0x8C42;
+
+  @DomName('EXTsRGB.SRGB_EXT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRGB_EXT = 0x8C40;
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('EXTBlendMinMax')
 @Experimental() // untriaged
 @Native("EXTBlendMinMax")
@@ -1013,22 +1059,22 @@
   @JSName('bindVertexArrayOES')
   @DomName('OESVertexArrayObject.bindVertexArrayOES')
   @DocsEditable()
-  void bindVertexArray(VertexArrayObject arrayObject) native;
+  void bindVertexArray(VertexArrayObjectOes arrayObject) native;
 
   @JSName('createVertexArrayOES')
   @DomName('OESVertexArrayObject.createVertexArrayOES')
   @DocsEditable()
-  VertexArrayObject createVertexArray() native;
+  VertexArrayObjectOes createVertexArray() native;
 
   @JSName('deleteVertexArrayOES')
   @DomName('OESVertexArrayObject.deleteVertexArrayOES')
   @DocsEditable()
-  void deleteVertexArray(VertexArrayObject arrayObject) native;
+  void deleteVertexArray(VertexArrayObjectOes arrayObject) native;
 
   @JSName('isVertexArrayOES')
   @DomName('OESVertexArrayObject.isVertexArrayOES')
   @DocsEditable()
-  bool isVertexArray(VertexArrayObject arrayObject) native;
+  bool isVertexArray(VertexArrayObjectOes arrayObject) native;
 }
 // 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
@@ -1049,6 +1095,19 @@
 
 
 @DocsEditable()
+@DomName('WebGLQuery')
+@Experimental() // untriaged
+@Native("WebGLQuery")
+class Query extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory Query._() { throw new UnsupportedError("Not supported"); }
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('WebGLRenderbuffer')
 @Unstable()
 @Native("WebGLRenderbuffer")
@@ -2327,76 +2386,14 @@
   @DocsEditable()
   void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) native;
 
-  @JSName('bufferData')
-  /**
-   * Buffers the specified data.
-   *
-   * The [bufferData] method is provided for WebGL API compatibility reasons, but
-   * it is highly recommended that you use [bufferDataTyped] or [bufferByteData]
-   * depending on your purposes.
-   */
-  @DomName('WebGLRenderingContext.bufferData')
-  @DocsEditable()
-  void bufferByteData(int target, ByteBuffer data, int usage) native;
-
-  /**
-   * Buffers the specified data.
-   *
-   * The [bufferData] method is provided for WebGL API compatibility reasons, but
-   * it is highly recommended that you use [bufferDataTyped] or [bufferByteData]
-   * depending on your purposes.
-   */
   @DomName('WebGLRenderingContext.bufferData')
   @DocsEditable()
   void bufferData(int target, data_OR_size, int usage) native;
 
-  @JSName('bufferData')
-  /**
-   * Buffers the specified data.
-   *
-   * The [bufferData] method is provided for WebGL API compatibility reasons, but
-   * it is highly recommended that you use [bufferDataTyped] or [bufferByteData]
-   * depending on your purposes.
-   */
-  @DomName('WebGLRenderingContext.bufferData')
-  @DocsEditable()
-  void bufferDataTyped(int target, TypedData data, int usage) native;
-
-  @JSName('bufferSubData')
-  /**
-   * Buffers the specified subset of data.
-   *
-   * The [bufferSubData] method is provided for WebGL API compatibility reasons, but
-   * it is highly recommended that you use [bufferSubDataTyped] or [bufferSubByteData]
-   * depending on your purposes.
-   */
-  @DomName('WebGLRenderingContext.bufferSubData')
-  @DocsEditable()
-  void bufferSubByteData(int target, int offset, ByteBuffer data) native;
-
-  /**
-   * Buffers the specified subset of data.
-   *
-   * The [bufferSubData] method is provided for WebGL API compatibility reasons, but
-   * it is highly recommended that you use [bufferSubDataTyped] or [bufferSubByteData]
-   * depending on your purposes.
-   */
   @DomName('WebGLRenderingContext.bufferSubData')
   @DocsEditable()
   void bufferSubData(int target, int offset, data) native;
 
-  @JSName('bufferSubData')
-  /**
-   * Buffers the specified subset of data.
-   *
-   * The [bufferSubData] method is provided for WebGL API compatibility reasons, but
-   * it is highly recommended that you use [bufferSubDataTyped] or [bufferSubByteData]
-   * depending on your purposes.
-   */
-  @DomName('WebGLRenderingContext.bufferSubData')
-  @DocsEditable()
-  void bufferSubDataTyped(int target, int offset, TypedData data) native;
-
   @DomName('WebGLRenderingContext.checkFramebufferStatus')
   @DocsEditable()
   int checkFramebufferStatus(int target) native;
@@ -2581,14 +2578,14 @@
 
   @DomName('WebGLRenderingContext.getContextAttributes')
   @DocsEditable()
-  @Creates('ContextAttributes|=Object')
-  ContextAttributes getContextAttributes() {
-    return convertNativeToDart_ContextAttributes(_getContextAttributes_1());
+  @Creates('ContextAttributes|Null')
+  Map getContextAttributes() {
+    return convertNativeToDart_Dictionary(_getContextAttributes_1());
   }
   @JSName('getContextAttributes')
   @DomName('WebGLRenderingContext.getContextAttributes')
   @DocsEditable()
-  @Creates('ContextAttributes|=Object')
+  @Creates('ContextAttributes|Null')
   _getContextAttributes_1() native;
 
   @DomName('WebGLRenderingContext.getError')
@@ -2771,18 +2768,10 @@
   @DocsEditable()
   void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
 
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texImage2D')
   @DocsEditable()
   void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) {
-    if (pixels != null && type != null && format != null && (border_OR_canvas_OR_image_OR_pixels_OR_video is int)) {
+    if (type != null && format != null && (border_OR_canvas_OR_image_OR_pixels_OR_video is int)) {
       _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
       return;
     }
@@ -2806,133 +2795,26 @@
     throw new ArgumentError("Incorrect number or type of arguments");
   }
   @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texImage2D')
   @DocsEditable()
   void _texImage2D_1(target, level, internalformat, width, height, int border, format, type, TypedData pixels) native;
   @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texImage2D')
   @DocsEditable()
   void _texImage2D_2(target, level, internalformat, format, type, pixels) native;
   @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texImage2D')
   @DocsEditable()
   void _texImage2D_3(target, level, internalformat, format, type, ImageElement image) native;
   @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texImage2D')
   @DocsEditable()
   void _texImage2D_4(target, level, internalformat, format, type, CanvasElement canvas) native;
   @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texImage2D')
   @DocsEditable()
   void _texImage2D_5(target, level, internalformat, format, type, VideoElement video) native;
 
-  @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texImage2D')
-  @DocsEditable()
-  void texImage2DCanvas(int target, int level, int internalformat, int format, int type, CanvasElement canvas) native;
-
-  @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texImage2D')
-  @DocsEditable()
-  void texImage2DImage(int target, int level, int internalformat, int format, int type, ImageElement image) native;
-
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texImage2D')
-  @DocsEditable()
-  void texImage2DImageData(int target, int level, int internalformat, int format, int type, ImageData pixels) {
-    var pixels_1 = convertDartToNative_ImageData(pixels);
-    _texImage2DImageData_1(target, level, internalformat, format, type, pixels_1);
-    return;
-  }
-  @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texImage2D')
-  @DocsEditable()
-  void _texImage2DImageData_1(target, level, internalformat, format, type, pixels) native;
-
-  @JSName('texImage2D')
-  /**
-   * Updates the currently bound texture to [data].
-   *
-   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
-   * (or for more specificity, the more specialized [texImage2DImageData],
-   * [texImage2DCanvas], [texImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texImage2D')
-  @DocsEditable()
-  void texImage2DVideo(int target, int level, int internalformat, int format, int type, VideoElement video) native;
-
   @DomName('WebGLRenderingContext.texParameterf')
   @DocsEditable()
   void texParameterf(int target, int pname, num param) native;
@@ -2941,18 +2823,10 @@
   @DocsEditable()
   void texParameteri(int target, int pname, int param) native;
 
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texSubImage2D')
   @DocsEditable()
   void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, TypedData pixels]) {
-    if (pixels != null && type != null && (canvas_OR_format_OR_image_OR_pixels_OR_video is int)) {
+    if (type != null && (canvas_OR_format_OR_image_OR_pixels_OR_video is int)) {
       _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
       return;
     }
@@ -2976,140 +2850,33 @@
     throw new ArgumentError("Incorrect number or type of arguments");
   }
   @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texSubImage2D')
   @DocsEditable()
   void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int format, type, TypedData pixels) native;
   @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texSubImage2D')
   @DocsEditable()
   void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) native;
   @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texSubImage2D')
   @DocsEditable()
   void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElement image) native;
   @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texSubImage2D')
   @DocsEditable()
   void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasElement canvas) native;
   @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
   @DomName('WebGLRenderingContext.texSubImage2D')
   @DocsEditable()
   void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElement video) native;
 
-  @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texSubImage2D')
-  @DocsEditable()
-  void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int format, int type, CanvasElement canvas) native;
-
-  @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texSubImage2D')
-  @DocsEditable()
-  void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int format, int type, ImageElement image) native;
-
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texSubImage2D')
-  @DocsEditable()
-  void texSubImage2DImageData(int target, int level, int xoffset, int yoffset, int format, int type, ImageData pixels) {
-    var pixels_1 = convertDartToNative_ImageData(pixels);
-    _texSubImage2DImageData_1(target, level, xoffset, yoffset, format, type, pixels_1);
-    return;
-  }
-  @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texSubImage2D')
-  @DocsEditable()
-  void _texSubImage2DImageData_1(target, level, xoffset, yoffset, format, type, pixels) native;
-
-  @JSName('texSubImage2D')
-  /**
-   * Updates a sub-rectangle of the currently bound texture to [data].
-   *
-   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it
-   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]
-   * (or for more specificity, the more specialized [texSubImage2DImageData],
-   * [texSubImage2DCanvas], [texSubImage2DVideo]).
-   */
-  @DomName('WebGLRenderingContext.texSubImage2D')
-  @DocsEditable()
-  void texSubImage2DVideo(int target, int level, int xoffset, int yoffset, int format, int type, VideoElement video) native;
-
   @DomName('WebGLRenderingContext.uniform1f')
   @DocsEditable()
   void uniform1f(UniformLocation location, num x) native;
 
   @DomName('WebGLRenderingContext.uniform1fv')
   @DocsEditable()
-  void uniform1fv(UniformLocation location, Float32List v) native;
+  void uniform1fv(UniformLocation location, v) native;
 
   @DomName('WebGLRenderingContext.uniform1i')
   @DocsEditable()
@@ -3117,7 +2884,7 @@
 
   @DomName('WebGLRenderingContext.uniform1iv')
   @DocsEditable()
-  void uniform1iv(UniformLocation location, Int32List v) native;
+  void uniform1iv(UniformLocation location, v) native;
 
   @DomName('WebGLRenderingContext.uniform2f')
   @DocsEditable()
@@ -3125,7 +2892,7 @@
 
   @DomName('WebGLRenderingContext.uniform2fv')
   @DocsEditable()
-  void uniform2fv(UniformLocation location, Float32List v) native;
+  void uniform2fv(UniformLocation location, v) native;
 
   @DomName('WebGLRenderingContext.uniform2i')
   @DocsEditable()
@@ -3133,7 +2900,7 @@
 
   @DomName('WebGLRenderingContext.uniform2iv')
   @DocsEditable()
-  void uniform2iv(UniformLocation location, Int32List v) native;
+  void uniform2iv(UniformLocation location, v) native;
 
   @DomName('WebGLRenderingContext.uniform3f')
   @DocsEditable()
@@ -3141,7 +2908,7 @@
 
   @DomName('WebGLRenderingContext.uniform3fv')
   @DocsEditable()
-  void uniform3fv(UniformLocation location, Float32List v) native;
+  void uniform3fv(UniformLocation location, v) native;
 
   @DomName('WebGLRenderingContext.uniform3i')
   @DocsEditable()
@@ -3149,7 +2916,7 @@
 
   @DomName('WebGLRenderingContext.uniform3iv')
   @DocsEditable()
-  void uniform3iv(UniformLocation location, Int32List v) native;
+  void uniform3iv(UniformLocation location, v) native;
 
   @DomName('WebGLRenderingContext.uniform4f')
   @DocsEditable()
@@ -3157,7 +2924,7 @@
 
   @DomName('WebGLRenderingContext.uniform4fv')
   @DocsEditable()
-  void uniform4fv(UniformLocation location, Float32List v) native;
+  void uniform4fv(UniformLocation location, v) native;
 
   @DomName('WebGLRenderingContext.uniform4i')
   @DocsEditable()
@@ -3165,19 +2932,19 @@
 
   @DomName('WebGLRenderingContext.uniform4iv')
   @DocsEditable()
-  void uniform4iv(UniformLocation location, Int32List v) native;
+  void uniform4iv(UniformLocation location, v) native;
 
   @DomName('WebGLRenderingContext.uniformMatrix2fv')
   @DocsEditable()
-  void uniformMatrix2fv(UniformLocation location, bool transpose, Float32List array) native;
+  void uniformMatrix2fv(UniformLocation location, bool transpose, array) native;
 
   @DomName('WebGLRenderingContext.uniformMatrix3fv')
   @DocsEditable()
-  void uniformMatrix3fv(UniformLocation location, bool transpose, Float32List array) native;
+  void uniformMatrix3fv(UniformLocation location, bool transpose, array) native;
 
   @DomName('WebGLRenderingContext.uniformMatrix4fv')
   @DocsEditable()
-  void uniformMatrix4fv(UniformLocation location, bool transpose, Float32List array) native;
+  void uniformMatrix4fv(UniformLocation location, bool transpose, array) native;
 
   @DomName('WebGLRenderingContext.useProgram')
   @DocsEditable()
@@ -3193,7 +2960,7 @@
 
   @DomName('WebGLRenderingContext.vertexAttrib1fv')
   @DocsEditable()
-  void vertexAttrib1fv(int indx, Float32List values) native;
+  void vertexAttrib1fv(int indx, values) native;
 
   @DomName('WebGLRenderingContext.vertexAttrib2f')
   @DocsEditable()
@@ -3201,7 +2968,7 @@
 
   @DomName('WebGLRenderingContext.vertexAttrib2fv')
   @DocsEditable()
-  void vertexAttrib2fv(int indx, Float32List values) native;
+  void vertexAttrib2fv(int indx, values) native;
 
   @DomName('WebGLRenderingContext.vertexAttrib3f')
   @DocsEditable()
@@ -3209,7 +2976,7 @@
 
   @DomName('WebGLRenderingContext.vertexAttrib3fv')
   @DocsEditable()
-  void vertexAttrib3fv(int indx, Float32List values) native;
+  void vertexAttrib3fv(int indx, values) native;
 
   @DomName('WebGLRenderingContext.vertexAttrib4f')
   @DocsEditable()
@@ -3217,7 +2984,7 @@
 
   @DomName('WebGLRenderingContext.vertexAttrib4fv')
   @DocsEditable()
-  void vertexAttrib4fv(int indx, Float32List values) native;
+  void vertexAttrib4fv(int indx, values) native;
 
   @DomName('WebGLRenderingContext.vertexAttribPointer')
   @DocsEditable()
@@ -3232,43 +2999,2886 @@
    * Sets the currently bound texture to [data].
    *
    * [data] can be either an [ImageElement], a
-   * [CanvasElement], a [VideoElement], or an [ImageData] object.
+   * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
    *
-   * To use [texImage2d] with a TypedData object, use [texImage2dTyped].
-   *
+   * This is deprecated in favor of [texImage2D].
    */
-  @JSName('texImage2D')
-  void texImage2DUntyped(int targetTexture, int levelOfDetail, 
-      int internalFormat, int format, int type, data) native;
+  @Deprecated("Use texImage2D")
+  void texImage2DUntyped(int targetTexture, int levelOfDetail,
+      int internalFormat, int format, int type, data) {
+    texImage2D(targetTexture, levelOfDetail, internalFormat, format, type, data);
+  }
 
   /**
    * Sets the currently bound texture to [data].
+   *
+   * This is deprecated in favour of [texImage2D].
    */
-  @JSName('texImage2D')
-  void texImage2DTyped(int targetTexture, int levelOfDetail,
-      int internalFormat, int width, int height, int border, int format,
-      int type, TypedData data) native;
+  @Deprecated("Use texImage2D")
+  void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat,
+      int width, int height, int border, int format, int type, TypedData data) {
+    texImage2D(targetTexture, levelOfDetail, internalFormat,
+        width, height, border, format, type, data);
+  }
 
   /**
    * Updates a sub-rectangle of the currently bound texture to [data].
    *
    * [data] can be either an [ImageElement], a
-   * [CanvasElement], a [VideoElement], or an [ImageData] object.
-   *
-   * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped].
+   * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
    *
    */
-  @JSName('texSubImage2D')
+  @Deprecated("Use texSubImage2D")
   void texSubImage2DUntyped(int targetTexture, int levelOfDetail,
-      int xOffset, int yOffset, int format, int type, data) native;
+      int xOffset, int yOffset, int format, int type, data) {
+    texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
+        format, type, data);
+  }
 
   /**
    * Updates a sub-rectangle of the currently bound texture to [data].
    */
-  @JSName('texSubImage2D')
+  @Deprecated("Use texSubImage2D")
   void texSubImage2DTyped(int targetTexture, int levelOfDetail,
       int xOffset, int yOffset, int width, int height, int border, int format,
-      int type, TypedData data) native;
+      int type, TypedData data) {
+    texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
+        width, height, format, type, data);
+  }
+
+  /**
+   * Set the bufferData to [data].
+   */
+  @Deprecated("Use bufferData")
+  void bufferDataTyped(int target, TypedData data, int usage) {
+    bufferData(target, data, usage);
+  }
+
+  /**
+   * Set the bufferSubData to [data].
+   */
+  @Deprecated("Use bufferSubData")
+  void bufferSubDataTyped(int target, int offset, TypedData data) {
+    bufferSubData(target, offset, data);
+  }
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('WebGL2RenderingContext')
+@Experimental() // untriaged
+@Native("WebGL2RenderingContext")
+class RenderingContext2 extends Interceptor implements _WebGL2RenderingContextBase, _WebGLRenderingContextBase {
+  // To suppress missing implicit constructor warnings.
+  factory RenderingContext2._() { throw new UnsupportedError("Not supported"); }
+
+  @DomName('WebGL2RenderingContext.ACTIVE_ATTRIBUTES')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ACTIVE_ATTRIBUTES = 0x8B89;
+
+  @DomName('WebGL2RenderingContext.ACTIVE_TEXTURE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ACTIVE_TEXTURE = 0x84E0;
+
+  @DomName('WebGL2RenderingContext.ACTIVE_UNIFORMS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ACTIVE_UNIFORMS = 0x8B86;
+
+  @DomName('WebGL2RenderingContext.ALIASED_LINE_WIDTH_RANGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALIASED_LINE_WIDTH_RANGE = 0x846E;
+
+  @DomName('WebGL2RenderingContext.ALIASED_POINT_SIZE_RANGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALIASED_POINT_SIZE_RANGE = 0x846D;
+
+  @DomName('WebGL2RenderingContext.ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALPHA = 0x1906;
+
+  @DomName('WebGL2RenderingContext.ALPHA_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALPHA_BITS = 0x0D55;
+
+  @DomName('WebGL2RenderingContext.ALWAYS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALWAYS = 0x0207;
+
+  @DomName('WebGL2RenderingContext.ARRAY_BUFFER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ARRAY_BUFFER = 0x8892;
+
+  @DomName('WebGL2RenderingContext.ARRAY_BUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ARRAY_BUFFER_BINDING = 0x8894;
+
+  @DomName('WebGL2RenderingContext.ATTACHED_SHADERS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ATTACHED_SHADERS = 0x8B85;
+
+  @DomName('WebGL2RenderingContext.BACK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BACK = 0x0405;
+
+  @DomName('WebGL2RenderingContext.BLEND')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND = 0x0BE2;
+
+  @DomName('WebGL2RenderingContext.BLEND_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_COLOR = 0x8005;
+
+  @DomName('WebGL2RenderingContext.BLEND_DST_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_DST_ALPHA = 0x80CA;
+
+  @DomName('WebGL2RenderingContext.BLEND_DST_RGB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_DST_RGB = 0x80C8;
+
+  @DomName('WebGL2RenderingContext.BLEND_EQUATION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_EQUATION = 0x8009;
+
+  @DomName('WebGL2RenderingContext.BLEND_EQUATION_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_EQUATION_ALPHA = 0x883D;
+
+  @DomName('WebGL2RenderingContext.BLEND_EQUATION_RGB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_EQUATION_RGB = 0x8009;
+
+  @DomName('WebGL2RenderingContext.BLEND_SRC_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_SRC_ALPHA = 0x80CB;
+
+  @DomName('WebGL2RenderingContext.BLEND_SRC_RGB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_SRC_RGB = 0x80C9;
+
+  @DomName('WebGL2RenderingContext.BLUE_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLUE_BITS = 0x0D54;
+
+  @DomName('WebGL2RenderingContext.BOOL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BOOL = 0x8B56;
+
+  @DomName('WebGL2RenderingContext.BOOL_VEC2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BOOL_VEC2 = 0x8B57;
+
+  @DomName('WebGL2RenderingContext.BOOL_VEC3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BOOL_VEC3 = 0x8B58;
+
+  @DomName('WebGL2RenderingContext.BOOL_VEC4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BOOL_VEC4 = 0x8B59;
+
+  @DomName('WebGL2RenderingContext.BROWSER_DEFAULT_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BROWSER_DEFAULT_WEBGL = 0x9244;
+
+  @DomName('WebGL2RenderingContext.BUFFER_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BUFFER_SIZE = 0x8764;
+
+  @DomName('WebGL2RenderingContext.BUFFER_USAGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BUFFER_USAGE = 0x8765;
+
+  @DomName('WebGL2RenderingContext.BYTE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BYTE = 0x1400;
+
+  @DomName('WebGL2RenderingContext.CCW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CCW = 0x0901;
+
+  @DomName('WebGL2RenderingContext.CLAMP_TO_EDGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CLAMP_TO_EDGE = 0x812F;
+
+  @DomName('WebGL2RenderingContext.COLOR_ATTACHMENT0')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COLOR_ATTACHMENT0 = 0x8CE0;
+
+  @DomName('WebGL2RenderingContext.COLOR_BUFFER_BIT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COLOR_BUFFER_BIT = 0x00004000;
+
+  @DomName('WebGL2RenderingContext.COLOR_CLEAR_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COLOR_CLEAR_VALUE = 0x0C22;
+
+  @DomName('WebGL2RenderingContext.COLOR_WRITEMASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COLOR_WRITEMASK = 0x0C23;
+
+  @DomName('WebGL2RenderingContext.COMPILE_STATUS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COMPILE_STATUS = 0x8B81;
+
+  @DomName('WebGL2RenderingContext.COMPRESSED_TEXTURE_FORMATS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COMPRESSED_TEXTURE_FORMATS = 0x86A3;
+
+  @DomName('WebGL2RenderingContext.CONSTANT_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CONSTANT_ALPHA = 0x8003;
+
+  @DomName('WebGL2RenderingContext.CONSTANT_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CONSTANT_COLOR = 0x8001;
+
+  @DomName('WebGL2RenderingContext.CONTEXT_LOST_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CONTEXT_LOST_WEBGL = 0x9242;
+
+  @DomName('WebGL2RenderingContext.CULL_FACE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CULL_FACE = 0x0B44;
+
+  @DomName('WebGL2RenderingContext.CULL_FACE_MODE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CULL_FACE_MODE = 0x0B45;
+
+  @DomName('WebGL2RenderingContext.CURRENT_PROGRAM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CURRENT_PROGRAM = 0x8B8D;
+
+  @DomName('WebGL2RenderingContext.CURRENT_VERTEX_ATTRIB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CURRENT_VERTEX_ATTRIB = 0x8626;
+
+  @DomName('WebGL2RenderingContext.CW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CW = 0x0900;
+
+  @DomName('WebGL2RenderingContext.DECR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DECR = 0x1E03;
+
+  @DomName('WebGL2RenderingContext.DECR_WRAP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DECR_WRAP = 0x8508;
+
+  @DomName('WebGL2RenderingContext.DELETE_STATUS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DELETE_STATUS = 0x8B80;
+
+  @DomName('WebGL2RenderingContext.DEPTH_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_ATTACHMENT = 0x8D00;
+
+  @DomName('WebGL2RenderingContext.DEPTH_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_BITS = 0x0D56;
+
+  @DomName('WebGL2RenderingContext.DEPTH_BUFFER_BIT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_BUFFER_BIT = 0x00000100;
+
+  @DomName('WebGL2RenderingContext.DEPTH_CLEAR_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_CLEAR_VALUE = 0x0B73;
+
+  @DomName('WebGL2RenderingContext.DEPTH_COMPONENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_COMPONENT = 0x1902;
+
+  @DomName('WebGL2RenderingContext.DEPTH_COMPONENT16')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_COMPONENT16 = 0x81A5;
+
+  @DomName('WebGL2RenderingContext.DEPTH_FUNC')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_FUNC = 0x0B74;
+
+  @DomName('WebGL2RenderingContext.DEPTH_RANGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_RANGE = 0x0B70;
+
+  @DomName('WebGL2RenderingContext.DEPTH_STENCIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_STENCIL = 0x84F9;
+
+  @DomName('WebGL2RenderingContext.DEPTH_STENCIL_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_STENCIL_ATTACHMENT = 0x821A;
+
+  @DomName('WebGL2RenderingContext.DEPTH_TEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_TEST = 0x0B71;
+
+  @DomName('WebGL2RenderingContext.DEPTH_WRITEMASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_WRITEMASK = 0x0B72;
+
+  @DomName('WebGL2RenderingContext.DITHER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DITHER = 0x0BD0;
+
+  @DomName('WebGL2RenderingContext.DONT_CARE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DONT_CARE = 0x1100;
+
+  @DomName('WebGL2RenderingContext.DST_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DST_ALPHA = 0x0304;
+
+  @DomName('WebGL2RenderingContext.DST_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DST_COLOR = 0x0306;
+
+  @DomName('WebGL2RenderingContext.DYNAMIC_DRAW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DYNAMIC_DRAW = 0x88E8;
+
+  @DomName('WebGL2RenderingContext.ELEMENT_ARRAY_BUFFER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ELEMENT_ARRAY_BUFFER = 0x8893;
+
+  @DomName('WebGL2RenderingContext.ELEMENT_ARRAY_BUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
+
+  @DomName('WebGL2RenderingContext.EQUAL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int EQUAL = 0x0202;
+
+  @DomName('WebGL2RenderingContext.FASTEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FASTEST = 0x1101;
+
+  @DomName('WebGL2RenderingContext.FLOAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT = 0x1406;
+
+  @DomName('WebGL2RenderingContext.FLOAT_MAT2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_MAT2 = 0x8B5A;
+
+  @DomName('WebGL2RenderingContext.FLOAT_MAT3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_MAT3 = 0x8B5B;
+
+  @DomName('WebGL2RenderingContext.FLOAT_MAT4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_MAT4 = 0x8B5C;
+
+  @DomName('WebGL2RenderingContext.FLOAT_VEC2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_VEC2 = 0x8B50;
+
+  @DomName('WebGL2RenderingContext.FLOAT_VEC3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_VEC3 = 0x8B51;
+
+  @DomName('WebGL2RenderingContext.FLOAT_VEC4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_VEC4 = 0x8B52;
+
+  @DomName('WebGL2RenderingContext.FRAGMENT_SHADER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAGMENT_SHADER = 0x8B30;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER = 0x8D40;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_BINDING = 0x8CA6;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_COMPLETE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_COMPLETE = 0x8CD5;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_DIMENSIONS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_UNSUPPORTED')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
+
+  @DomName('WebGL2RenderingContext.FRONT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRONT = 0x0404;
+
+  @DomName('WebGL2RenderingContext.FRONT_AND_BACK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRONT_AND_BACK = 0x0408;
+
+  @DomName('WebGL2RenderingContext.FRONT_FACE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRONT_FACE = 0x0B46;
+
+  @DomName('WebGL2RenderingContext.FUNC_ADD')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FUNC_ADD = 0x8006;
+
+  @DomName('WebGL2RenderingContext.FUNC_REVERSE_SUBTRACT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FUNC_REVERSE_SUBTRACT = 0x800B;
+
+  @DomName('WebGL2RenderingContext.FUNC_SUBTRACT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FUNC_SUBTRACT = 0x800A;
+
+  @DomName('WebGL2RenderingContext.GENERATE_MIPMAP_HINT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int GENERATE_MIPMAP_HINT = 0x8192;
+
+  @DomName('WebGL2RenderingContext.GEQUAL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int GEQUAL = 0x0206;
+
+  @DomName('WebGL2RenderingContext.GREATER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int GREATER = 0x0204;
+
+  @DomName('WebGL2RenderingContext.GREEN_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int GREEN_BITS = 0x0D53;
+
+  @DomName('WebGL2RenderingContext.HIGH_FLOAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int HIGH_FLOAT = 0x8DF2;
+
+  @DomName('WebGL2RenderingContext.HIGH_INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int HIGH_INT = 0x8DF5;
+
+  @DomName('WebGL2RenderingContext.IMPLEMENTATION_COLOR_READ_FORMAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
+
+  @DomName('WebGL2RenderingContext.IMPLEMENTATION_COLOR_READ_TYPE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
+
+  @DomName('WebGL2RenderingContext.INCR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INCR = 0x1E02;
+
+  @DomName('WebGL2RenderingContext.INCR_WRAP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INCR_WRAP = 0x8507;
+
+  @DomName('WebGL2RenderingContext.INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INT = 0x1404;
+
+  @DomName('WebGL2RenderingContext.INT_VEC2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INT_VEC2 = 0x8B53;
+
+  @DomName('WebGL2RenderingContext.INT_VEC3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INT_VEC3 = 0x8B54;
+
+  @DomName('WebGL2RenderingContext.INT_VEC4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INT_VEC4 = 0x8B55;
+
+  @DomName('WebGL2RenderingContext.INVALID_ENUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVALID_ENUM = 0x0500;
+
+  @DomName('WebGL2RenderingContext.INVALID_FRAMEBUFFER_OPERATION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVALID_FRAMEBUFFER_OPERATION = 0x0506;
+
+  @DomName('WebGL2RenderingContext.INVALID_OPERATION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVALID_OPERATION = 0x0502;
+
+  @DomName('WebGL2RenderingContext.INVALID_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVALID_VALUE = 0x0501;
+
+  @DomName('WebGL2RenderingContext.INVERT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVERT = 0x150A;
+
+  @DomName('WebGL2RenderingContext.KEEP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int KEEP = 0x1E00;
+
+  @DomName('WebGL2RenderingContext.LEQUAL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LEQUAL = 0x0203;
+
+  @DomName('WebGL2RenderingContext.LESS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LESS = 0x0201;
+
+  @DomName('WebGL2RenderingContext.LINEAR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINEAR = 0x2601;
+
+  @DomName('WebGL2RenderingContext.LINEAR_MIPMAP_LINEAR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINEAR_MIPMAP_LINEAR = 0x2703;
+
+  @DomName('WebGL2RenderingContext.LINEAR_MIPMAP_NEAREST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINEAR_MIPMAP_NEAREST = 0x2701;
+
+  @DomName('WebGL2RenderingContext.LINES')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINES = 0x0001;
+
+  @DomName('WebGL2RenderingContext.LINE_LOOP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINE_LOOP = 0x0002;
+
+  @DomName('WebGL2RenderingContext.LINE_STRIP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINE_STRIP = 0x0003;
+
+  @DomName('WebGL2RenderingContext.LINE_WIDTH')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINE_WIDTH = 0x0B21;
+
+  @DomName('WebGL2RenderingContext.LINK_STATUS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINK_STATUS = 0x8B82;
+
+  @DomName('WebGL2RenderingContext.LOW_FLOAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LOW_FLOAT = 0x8DF0;
+
+  @DomName('WebGL2RenderingContext.LOW_INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LOW_INT = 0x8DF3;
+
+  @DomName('WebGL2RenderingContext.LUMINANCE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LUMINANCE = 0x1909;
+
+  @DomName('WebGL2RenderingContext.LUMINANCE_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LUMINANCE_ALPHA = 0x190A;
+
+  @DomName('WebGL2RenderingContext.MAX_COMBINED_TEXTURE_IMAGE_UNITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
+
+  @DomName('WebGL2RenderingContext.MAX_CUBE_MAP_TEXTURE_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
+
+  @DomName('WebGL2RenderingContext.MAX_FRAGMENT_UNIFORM_VECTORS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
+
+  @DomName('WebGL2RenderingContext.MAX_RENDERBUFFER_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_RENDERBUFFER_SIZE = 0x84E8;
+
+  @DomName('WebGL2RenderingContext.MAX_TEXTURE_IMAGE_UNITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_TEXTURE_IMAGE_UNITS = 0x8872;
+
+  @DomName('WebGL2RenderingContext.MAX_TEXTURE_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_TEXTURE_SIZE = 0x0D33;
+
+  @DomName('WebGL2RenderingContext.MAX_VARYING_VECTORS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VARYING_VECTORS = 0x8DFC;
+
+  @DomName('WebGL2RenderingContext.MAX_VERTEX_ATTRIBS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VERTEX_ATTRIBS = 0x8869;
+
+  @DomName('WebGL2RenderingContext.MAX_VERTEX_TEXTURE_IMAGE_UNITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
+
+  @DomName('WebGL2RenderingContext.MAX_VERTEX_UNIFORM_VECTORS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
+
+  @DomName('WebGL2RenderingContext.MAX_VIEWPORT_DIMS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VIEWPORT_DIMS = 0x0D3A;
+
+  @DomName('WebGL2RenderingContext.MEDIUM_FLOAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MEDIUM_FLOAT = 0x8DF1;
+
+  @DomName('WebGL2RenderingContext.MEDIUM_INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MEDIUM_INT = 0x8DF4;
+
+  @DomName('WebGL2RenderingContext.MIRRORED_REPEAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MIRRORED_REPEAT = 0x8370;
+
+  @DomName('WebGL2RenderingContext.NEAREST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NEAREST = 0x2600;
+
+  @DomName('WebGL2RenderingContext.NEAREST_MIPMAP_LINEAR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NEAREST_MIPMAP_LINEAR = 0x2702;
+
+  @DomName('WebGL2RenderingContext.NEAREST_MIPMAP_NEAREST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NEAREST_MIPMAP_NEAREST = 0x2700;
+
+  @DomName('WebGL2RenderingContext.NEVER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NEVER = 0x0200;
+
+  @DomName('WebGL2RenderingContext.NICEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NICEST = 0x1102;
+
+  @DomName('WebGL2RenderingContext.NONE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NONE = 0;
+
+  @DomName('WebGL2RenderingContext.NOTEQUAL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NOTEQUAL = 0x0205;
+
+  @DomName('WebGL2RenderingContext.NO_ERROR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NO_ERROR = 0;
+
+  @DomName('WebGL2RenderingContext.ONE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE = 1;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_CONSTANT_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_CONSTANT_ALPHA = 0x8004;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_CONSTANT_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_CONSTANT_COLOR = 0x8002;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_DST_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_DST_ALPHA = 0x0305;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_DST_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_DST_COLOR = 0x0307;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_SRC_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_SRC_ALPHA = 0x0303;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_SRC_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_SRC_COLOR = 0x0301;
+
+  @DomName('WebGL2RenderingContext.OUT_OF_MEMORY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int OUT_OF_MEMORY = 0x0505;
+
+  @DomName('WebGL2RenderingContext.PACK_ALIGNMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int PACK_ALIGNMENT = 0x0D05;
+
+  @DomName('WebGL2RenderingContext.POINTS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int POINTS = 0x0000;
+
+  @DomName('WebGL2RenderingContext.POLYGON_OFFSET_FACTOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int POLYGON_OFFSET_FACTOR = 0x8038;
+
+  @DomName('WebGL2RenderingContext.POLYGON_OFFSET_FILL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int POLYGON_OFFSET_FILL = 0x8037;
+
+  @DomName('WebGL2RenderingContext.POLYGON_OFFSET_UNITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int POLYGON_OFFSET_UNITS = 0x2A00;
+
+  @DomName('WebGL2RenderingContext.RED_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RED_BITS = 0x0D52;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER = 0x8D41;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_ALPHA_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_ALPHA_SIZE = 0x8D53;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_BINDING = 0x8CA7;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_BLUE_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_BLUE_SIZE = 0x8D52;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_DEPTH_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_DEPTH_SIZE = 0x8D54;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_GREEN_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_GREEN_SIZE = 0x8D51;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_HEIGHT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_HEIGHT = 0x8D43;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_INTERNAL_FORMAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_RED_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_RED_SIZE = 0x8D50;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_STENCIL_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_STENCIL_SIZE = 0x8D55;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_WIDTH')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_WIDTH = 0x8D42;
+
+  @DomName('WebGL2RenderingContext.RENDERER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERER = 0x1F01;
+
+  @DomName('WebGL2RenderingContext.REPEAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int REPEAT = 0x2901;
+
+  @DomName('WebGL2RenderingContext.REPLACE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int REPLACE = 0x1E01;
+
+  @DomName('WebGL2RenderingContext.RGB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGB = 0x1907;
+
+  @DomName('WebGL2RenderingContext.RGB565')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGB565 = 0x8D62;
+
+  @DomName('WebGL2RenderingContext.RGB5_A1')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGB5_A1 = 0x8057;
+
+  @DomName('WebGL2RenderingContext.RGBA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGBA = 0x1908;
+
+  @DomName('WebGL2RenderingContext.RGBA4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGBA4 = 0x8056;
+
+  @DomName('WebGL2RenderingContext.SAMPLER_2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLER_2D = 0x8B5E;
+
+  @DomName('WebGL2RenderingContext.SAMPLER_CUBE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLER_CUBE = 0x8B60;
+
+  @DomName('WebGL2RenderingContext.SAMPLES')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLES = 0x80A9;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_ALPHA_TO_COVERAGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_BUFFERS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_BUFFERS = 0x80A8;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_COVERAGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_COVERAGE = 0x80A0;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_COVERAGE_INVERT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_COVERAGE_INVERT = 0x80AB;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_COVERAGE_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_COVERAGE_VALUE = 0x80AA;
+
+  @DomName('WebGL2RenderingContext.SCISSOR_BOX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SCISSOR_BOX = 0x0C10;
+
+  @DomName('WebGL2RenderingContext.SCISSOR_TEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SCISSOR_TEST = 0x0C11;
+
+  @DomName('WebGL2RenderingContext.SHADER_TYPE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SHADER_TYPE = 0x8B4F;
+
+  @DomName('WebGL2RenderingContext.SHADING_LANGUAGE_VERSION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SHADING_LANGUAGE_VERSION = 0x8B8C;
+
+  @DomName('WebGL2RenderingContext.SHORT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SHORT = 0x1402;
+
+  @DomName('WebGL2RenderingContext.SRC_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRC_ALPHA = 0x0302;
+
+  @DomName('WebGL2RenderingContext.SRC_ALPHA_SATURATE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRC_ALPHA_SATURATE = 0x0308;
+
+  @DomName('WebGL2RenderingContext.SRC_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRC_COLOR = 0x0300;
+
+  @DomName('WebGL2RenderingContext.STATIC_DRAW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STATIC_DRAW = 0x88E4;
+
+  @DomName('WebGL2RenderingContext.STENCIL_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_ATTACHMENT = 0x8D20;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_FAIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_FAIL = 0x8801;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_FUNC')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_FUNC = 0x8800;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_PASS_DEPTH_FAIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_PASS_DEPTH_PASS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_REF')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_REF = 0x8CA3;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_VALUE_MASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_VALUE_MASK = 0x8CA4;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_WRITEMASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_WRITEMASK = 0x8CA5;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BITS = 0x0D57;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BUFFER_BIT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BUFFER_BIT = 0x00000400;
+
+  @DomName('WebGL2RenderingContext.STENCIL_CLEAR_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_CLEAR_VALUE = 0x0B91;
+
+  @DomName('WebGL2RenderingContext.STENCIL_FAIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_FAIL = 0x0B94;
+
+  @DomName('WebGL2RenderingContext.STENCIL_FUNC')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_FUNC = 0x0B92;
+
+  @DomName('WebGL2RenderingContext.STENCIL_INDEX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_INDEX = 0x1901;
+
+  @DomName('WebGL2RenderingContext.STENCIL_INDEX8')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_INDEX8 = 0x8D48;
+
+  @DomName('WebGL2RenderingContext.STENCIL_PASS_DEPTH_FAIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_PASS_DEPTH_FAIL = 0x0B95;
+
+  @DomName('WebGL2RenderingContext.STENCIL_PASS_DEPTH_PASS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_PASS_DEPTH_PASS = 0x0B96;
+
+  @DomName('WebGL2RenderingContext.STENCIL_REF')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_REF = 0x0B97;
+
+  @DomName('WebGL2RenderingContext.STENCIL_TEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_TEST = 0x0B90;
+
+  @DomName('WebGL2RenderingContext.STENCIL_VALUE_MASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_VALUE_MASK = 0x0B93;
+
+  @DomName('WebGL2RenderingContext.STENCIL_WRITEMASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_WRITEMASK = 0x0B98;
+
+  @DomName('WebGL2RenderingContext.STREAM_DRAW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STREAM_DRAW = 0x88E0;
+
+  @DomName('WebGL2RenderingContext.SUBPIXEL_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SUBPIXEL_BITS = 0x0D50;
+
+  @DomName('WebGL2RenderingContext.TEXTURE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE = 0x1702;
+
+  @DomName('WebGL2RenderingContext.TEXTURE0')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE0 = 0x84C0;
+
+  @DomName('WebGL2RenderingContext.TEXTURE1')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE1 = 0x84C1;
+
+  @DomName('WebGL2RenderingContext.TEXTURE10')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE10 = 0x84CA;
+
+  @DomName('WebGL2RenderingContext.TEXTURE11')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE11 = 0x84CB;
+
+  @DomName('WebGL2RenderingContext.TEXTURE12')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE12 = 0x84CC;
+
+  @DomName('WebGL2RenderingContext.TEXTURE13')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE13 = 0x84CD;
+
+  @DomName('WebGL2RenderingContext.TEXTURE14')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE14 = 0x84CE;
+
+  @DomName('WebGL2RenderingContext.TEXTURE15')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE15 = 0x84CF;
+
+  @DomName('WebGL2RenderingContext.TEXTURE16')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE16 = 0x84D0;
+
+  @DomName('WebGL2RenderingContext.TEXTURE17')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE17 = 0x84D1;
+
+  @DomName('WebGL2RenderingContext.TEXTURE18')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE18 = 0x84D2;
+
+  @DomName('WebGL2RenderingContext.TEXTURE19')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE19 = 0x84D3;
+
+  @DomName('WebGL2RenderingContext.TEXTURE2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE2 = 0x84C2;
+
+  @DomName('WebGL2RenderingContext.TEXTURE20')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE20 = 0x84D4;
+
+  @DomName('WebGL2RenderingContext.TEXTURE21')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE21 = 0x84D5;
+
+  @DomName('WebGL2RenderingContext.TEXTURE22')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE22 = 0x84D6;
+
+  @DomName('WebGL2RenderingContext.TEXTURE23')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE23 = 0x84D7;
+
+  @DomName('WebGL2RenderingContext.TEXTURE24')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE24 = 0x84D8;
+
+  @DomName('WebGL2RenderingContext.TEXTURE25')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE25 = 0x84D9;
+
+  @DomName('WebGL2RenderingContext.TEXTURE26')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE26 = 0x84DA;
+
+  @DomName('WebGL2RenderingContext.TEXTURE27')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE27 = 0x84DB;
+
+  @DomName('WebGL2RenderingContext.TEXTURE28')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE28 = 0x84DC;
+
+  @DomName('WebGL2RenderingContext.TEXTURE29')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE29 = 0x84DD;
+
+  @DomName('WebGL2RenderingContext.TEXTURE3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE3 = 0x84C3;
+
+  @DomName('WebGL2RenderingContext.TEXTURE30')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE30 = 0x84DE;
+
+  @DomName('WebGL2RenderingContext.TEXTURE31')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE31 = 0x84DF;
+
+  @DomName('WebGL2RenderingContext.TEXTURE4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE4 = 0x84C4;
+
+  @DomName('WebGL2RenderingContext.TEXTURE5')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE5 = 0x84C5;
+
+  @DomName('WebGL2RenderingContext.TEXTURE6')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE6 = 0x84C6;
+
+  @DomName('WebGL2RenderingContext.TEXTURE7')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE7 = 0x84C7;
+
+  @DomName('WebGL2RenderingContext.TEXTURE8')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE8 = 0x84C8;
+
+  @DomName('WebGL2RenderingContext.TEXTURE9')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE9 = 0x84C9;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_2D = 0x0DE1;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_BINDING_2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_BINDING_2D = 0x8069;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_BINDING_CUBE_MAP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_BINDING_CUBE_MAP = 0x8514;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP = 0x8513;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_MAG_FILTER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_MAG_FILTER = 0x2800;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_MIN_FILTER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_MIN_FILTER = 0x2801;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_WRAP_S')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_WRAP_S = 0x2802;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_WRAP_T')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_WRAP_T = 0x2803;
+
+  @DomName('WebGL2RenderingContext.TRIANGLES')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TRIANGLES = 0x0004;
+
+  @DomName('WebGL2RenderingContext.TRIANGLE_FAN')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TRIANGLE_FAN = 0x0006;
+
+  @DomName('WebGL2RenderingContext.TRIANGLE_STRIP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TRIANGLE_STRIP = 0x0005;
+
+  @DomName('WebGL2RenderingContext.UNPACK_ALIGNMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNPACK_ALIGNMENT = 0x0CF5;
+
+  @DomName('WebGL2RenderingContext.UNPACK_COLORSPACE_CONVERSION_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
+
+  @DomName('WebGL2RenderingContext.UNPACK_FLIP_Y_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNPACK_FLIP_Y_WEBGL = 0x9240;
+
+  @DomName('WebGL2RenderingContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_BYTE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_BYTE = 0x1401;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_INT = 0x1405;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_SHORT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_SHORT = 0x1403;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_SHORT_4_4_4_4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_SHORT_4_4_4_4 = 0x8033;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_SHORT_5_5_5_1')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_SHORT_5_5_5_1 = 0x8034;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_SHORT_5_6_5')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_SHORT_5_6_5 = 0x8363;
+
+  @DomName('WebGL2RenderingContext.VALIDATE_STATUS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VALIDATE_STATUS = 0x8B83;
+
+  @DomName('WebGL2RenderingContext.VENDOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VENDOR = 0x1F00;
+
+  @DomName('WebGL2RenderingContext.VERSION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERSION = 0x1F02;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_ENABLED')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_NORMALIZED')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_POINTER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_STRIDE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_TYPE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
+
+  @DomName('WebGL2RenderingContext.VERTEX_SHADER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_SHADER = 0x8B31;
+
+  @DomName('WebGL2RenderingContext.VIEWPORT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VIEWPORT = 0x0BA2;
+
+  @DomName('WebGL2RenderingContext.ZERO')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ZERO = 0;
+
+  // From WebGL2RenderingContextBase
+
+  @DomName('WebGL2RenderingContext.beginQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void beginQuery(int target, Query query) native;
+
+  @DomName('WebGL2RenderingContext.beginTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void beginTransformFeedback(int primitiveMode) native;
+
+  @DomName('WebGL2RenderingContext.bindBufferBase')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindBufferBase(int target, int index, Buffer buffer) native;
+
+  @DomName('WebGL2RenderingContext.bindBufferRange')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindBufferRange(int target, int index, Buffer buffer, int offset, int size) native;
+
+  @DomName('WebGL2RenderingContext.bindSampler')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindSampler(int unit, Sampler sampler) native;
+
+  @DomName('WebGL2RenderingContext.bindTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindTransformFeedback(int target, TransformFeedback feedback) native;
+
+  @DomName('WebGL2RenderingContext.bindVertexArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindVertexArray(VertexArrayObject vertexArray) native;
+
+  @DomName('WebGL2RenderingContext.blitFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) native;
+
+  @DomName('WebGL2RenderingContext.clearBufferfi')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearBufferfi(int buffer, int drawbuffer, num depth, int stencil) native;
+
+  @DomName('WebGL2RenderingContext.clearBufferfv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearBufferfv(int buffer, int drawbuffer, value) native;
+
+  @DomName('WebGL2RenderingContext.clearBufferiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearBufferiv(int buffer, int drawbuffer, value) native;
+
+  @DomName('WebGL2RenderingContext.clearBufferuiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearBufferuiv(int buffer, int drawbuffer, value) native;
+
+  @DomName('WebGL2RenderingContext.clientWaitSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int clientWaitSync(Sync sync, int flags, int timeout) native;
+
+  @DomName('WebGL2RenderingContext.compressedTexImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, TypedData data) native;
+
+  @DomName('WebGL2RenderingContext.compressedTexSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, TypedData data) native;
+
+  @DomName('WebGL2RenderingContext.copyBufferSubData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyBufferSubData(int readTarget, int writeTarget, int readOffset, int writeOffset, int size) native;
+
+  @DomName('WebGL2RenderingContext.copyTexSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) native;
+
+  @DomName('WebGL2RenderingContext.createQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Query createQuery() native;
+
+  @DomName('WebGL2RenderingContext.createSampler')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Sampler createSampler() native;
+
+  @DomName('WebGL2RenderingContext.createTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  TransformFeedback createTransformFeedback() native;
+
+  @DomName('WebGL2RenderingContext.createVertexArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VertexArrayObject createVertexArray() native;
+
+  @DomName('WebGL2RenderingContext.deleteQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteQuery(Query query) native;
+
+  @DomName('WebGL2RenderingContext.deleteSampler')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteSampler(Sampler sampler) native;
+
+  @DomName('WebGL2RenderingContext.deleteSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteSync(Sync sync) native;
+
+  @DomName('WebGL2RenderingContext.deleteTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteTransformFeedback(TransformFeedback feedback) native;
+
+  @DomName('WebGL2RenderingContext.deleteVertexArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteVertexArray(VertexArrayObject vertexArray) native;
+
+  @DomName('WebGL2RenderingContext.drawArraysInstanced')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawArraysInstanced(int mode, int first, int count, int instanceCount) native;
+
+  @DomName('WebGL2RenderingContext.drawBuffers')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawBuffers(List<int> buffers) native;
+
+  @DomName('WebGL2RenderingContext.drawElementsInstanced')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawElementsInstanced(int mode, int count, int type, int offset, int instanceCount) native;
+
+  @DomName('WebGL2RenderingContext.drawRangeElements')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawRangeElements(int mode, int start, int end, int count, int type, int offset) native;
+
+  @DomName('WebGL2RenderingContext.endQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void endQuery(int target) native;
+
+  @DomName('WebGL2RenderingContext.endTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void endTransformFeedback() native;
+
+  @DomName('WebGL2RenderingContext.fenceSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Sync fenceSync(int condition, int flags) native;
+
+  @DomName('WebGL2RenderingContext.framebufferTextureLayer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void framebufferTextureLayer(int target, int attachment, Texture texture, int level, int layer) native;
+
+  @DomName('WebGL2RenderingContext.getActiveUniformBlockName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String getActiveUniformBlockName(Program program, int uniformBlockIndex) native;
+
+  @DomName('WebGL2RenderingContext.getActiveUniformBlockParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getActiveUniformBlockParameter(Program program, int uniformBlockIndex, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getActiveUniforms')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<int> getActiveUniforms(Program program, List<int> uniformIndices, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getBufferSubData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void getBufferSubData(int target, int offset, ByteBuffer returnedData) native;
+
+  @DomName('WebGL2RenderingContext.getFragDataLocation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getFragDataLocation(Program program, String name) native;
+
+  @DomName('WebGL2RenderingContext.getIndexedParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getIndexedParameter(int target, int index) native;
+
+  @DomName('WebGL2RenderingContext.getInternalformatParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getInternalformatParameter(int target, int internalformat, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Query getQuery(int target, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getQueryParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getQueryParameter(Query query, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getSamplerParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getSamplerParameter(Sampler sampler, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getSyncParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getSyncParameter(Sync sync, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getTransformFeedbackVarying')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ActiveInfo getTransformFeedbackVarying(Program program, int index) native;
+
+  @DomName('WebGL2RenderingContext.getUniformBlockIndex')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getUniformBlockIndex(Program program, String uniformBlockName) native;
+
+  @DomName('WebGL2RenderingContext.getUniformIndices')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<int> getUniformIndices(Program program, List<String> uniformNames) {
+    List uniformNames_1 = convertDartToNative_StringArray(uniformNames);
+    return _getUniformIndices_1(program, uniformNames_1);
+  }
+  @JSName('getUniformIndices')
+  @DomName('WebGL2RenderingContext.getUniformIndices')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<int> _getUniformIndices_1(Program program, List uniformNames) native;
+
+  @DomName('WebGL2RenderingContext.invalidateFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void invalidateFramebuffer(int target, List<int> attachments) native;
+
+  @DomName('WebGL2RenderingContext.invalidateSubFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void invalidateSubFramebuffer(int target, List<int> attachments, int x, int y, int width, int height) native;
+
+  @DomName('WebGL2RenderingContext.isQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isQuery(Query query) native;
+
+  @DomName('WebGL2RenderingContext.isSampler')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isSampler(Sampler sampler) native;
+
+  @DomName('WebGL2RenderingContext.isSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isSync(Sync sync) native;
+
+  @DomName('WebGL2RenderingContext.isTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isTransformFeedback(TransformFeedback feedback) native;
+
+  @DomName('WebGL2RenderingContext.isVertexArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isVertexArray(VertexArrayObject vertexArray) native;
+
+  @DomName('WebGL2RenderingContext.pauseTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void pauseTransformFeedback() native;
+
+  @DomName('WebGL2RenderingContext.readBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void readBuffer(int mode) native;
+
+  @DomName('WebGL2RenderingContext.renderbufferStorageMultisample')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void renderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height) native;
+
+  @DomName('WebGL2RenderingContext.resumeTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void resumeTransformFeedback() native;
+
+  @DomName('WebGL2RenderingContext.samplerParameterf')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void samplerParameterf(Sampler sampler, int pname, num param) native;
+
+  @DomName('WebGL2RenderingContext.samplerParameteri')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void samplerParameteri(Sampler sampler, int pname, int param) native;
+
+  @DomName('WebGL2RenderingContext.texImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, TypedData pixels) native;
+
+  @DomName('WebGL2RenderingContext.texStorage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texStorage2D(int target, int levels, int internalformat, int width, int height) native;
+
+  @DomName('WebGL2RenderingContext.texStorage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texStorage3D(int target, int levels, int internalformat, int width, int height, int depth) native;
+
+  @DomName('WebGL2RenderingContext.texSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int format_OR_width, int height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video, [int format, int type, TypedData pixels]) {
+    if (type != null && format != null && (canvas_OR_data_OR_depth_OR_image_OR_video is int)) {
+      _texSubImage3D_1(target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video, format, type, pixels);
+      return;
+    }
+    if ((canvas_OR_data_OR_depth_OR_image_OR_video is ImageData || canvas_OR_data_OR_depth_OR_image_OR_video == null) && format == null && type == null && pixels == null) {
+      var data_1 = convertDartToNative_ImageData(canvas_OR_data_OR_depth_OR_image_OR_video);
+      _texSubImage3D_2(target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, data_1);
+      return;
+    }
+    if ((canvas_OR_data_OR_depth_OR_image_OR_video is ImageElement || canvas_OR_data_OR_depth_OR_image_OR_video == null) && format == null && type == null && pixels == null) {
+      _texSubImage3D_3(target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video);
+      return;
+    }
+    if ((canvas_OR_data_OR_depth_OR_image_OR_video is CanvasElement || canvas_OR_data_OR_depth_OR_image_OR_video == null) && format == null && type == null && pixels == null) {
+      _texSubImage3D_4(target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video);
+      return;
+    }
+    if ((canvas_OR_data_OR_depth_OR_image_OR_video is VideoElement || canvas_OR_data_OR_depth_OR_image_OR_video == null) && format == null && type == null && pixels == null) {
+      _texSubImage3D_5(target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+  @JSName('texSubImage3D')
+  @DomName('WebGL2RenderingContext.texSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage3D_1(target, level, xoffset, yoffset, zoffset, width, height, int depth, format, type, TypedData pixels) native;
+  @JSName('texSubImage3D')
+  @DomName('WebGL2RenderingContext.texSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage3D_2(target, level, xoffset, yoffset, zoffset, format, type, data) native;
+  @JSName('texSubImage3D')
+  @DomName('WebGL2RenderingContext.texSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage3D_3(target, level, xoffset, yoffset, zoffset, format, type, ImageElement image) native;
+  @JSName('texSubImage3D')
+  @DomName('WebGL2RenderingContext.texSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage3D_4(target, level, xoffset, yoffset, zoffset, format, type, CanvasElement canvas) native;
+  @JSName('texSubImage3D')
+  @DomName('WebGL2RenderingContext.texSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage3D_5(target, level, xoffset, yoffset, zoffset, format, type, VideoElement video) native;
+
+  @DomName('WebGL2RenderingContext.transformFeedbackVaryings')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void transformFeedbackVaryings(Program program, List<String> varyings, int bufferMode) {
+    List varyings_1 = convertDartToNative_StringArray(varyings);
+    _transformFeedbackVaryings_1(program, varyings_1, bufferMode);
+    return;
+  }
+  @JSName('transformFeedbackVaryings')
+  @DomName('WebGL2RenderingContext.transformFeedbackVaryings')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _transformFeedbackVaryings_1(Program program, List varyings, bufferMode) native;
+
+  @DomName('WebGL2RenderingContext.uniform1ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1ui(UniformLocation location, int v0) native;
+
+  @DomName('WebGL2RenderingContext.uniform1uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1uiv(UniformLocation location, List<int> value) native;
+
+  @DomName('WebGL2RenderingContext.uniform2ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2ui(UniformLocation location, int v0, int v1) native;
+
+  @DomName('WebGL2RenderingContext.uniform2uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2uiv(UniformLocation location, List<int> value) native;
+
+  @DomName('WebGL2RenderingContext.uniform3ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3ui(UniformLocation location, int v0, int v1, int v2) native;
+
+  @DomName('WebGL2RenderingContext.uniform3uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3uiv(UniformLocation location, List<int> value) native;
+
+  @DomName('WebGL2RenderingContext.uniform4ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4ui(UniformLocation location, int v0, int v1, int v2, int v3) native;
+
+  @DomName('WebGL2RenderingContext.uniform4uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4uiv(UniformLocation location, List<int> value) native;
+
+  @DomName('WebGL2RenderingContext.uniformBlockBinding')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformBlockBinding(Program program, int uniformBlockIndex, int uniformBlockBinding) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix2x3fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix2x3fv(UniformLocation location, bool transpose, value) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix2x4fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix2x4fv(UniformLocation location, bool transpose, value) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix3x2fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix3x2fv(UniformLocation location, bool transpose, value) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix3x4fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix3x4fv(UniformLocation location, bool transpose, value) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix4x2fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix4x2fv(UniformLocation location, bool transpose, value) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix4x3fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix4x3fv(UniformLocation location, bool transpose, value) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttribDivisor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribDivisor(int index, int divisor) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttribI4i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribI4i(int index, int x, int y, int z, int w) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttribI4iv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribI4iv(int index, List<int> v) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttribI4ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribI4ui(int index, int x, int y, int z, int w) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttribI4uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribI4uiv(int index, List<int> v) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttribIPointer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribIPointer(int index, int size, int type, int stride, int offset) native;
+
+  @DomName('WebGL2RenderingContext.waitSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void waitSync(Sync sync, int flags, int timeout) native;
+
+  // From WebGLRenderingContextBase
+
+  @DomName('WebGL2RenderingContext.canvas')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final CanvasElement canvas;
+
+  @DomName('WebGL2RenderingContext.drawingBufferHeight')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int drawingBufferHeight;
+
+  @DomName('WebGL2RenderingContext.drawingBufferWidth')
+  @DocsEditable()
+  @Experimental() // untriaged
+  final int drawingBufferWidth;
+
+  @DomName('WebGL2RenderingContext.activeTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void activeTexture(int texture) native;
+
+  @DomName('WebGL2RenderingContext.attachShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void attachShader(Program program, Shader shader) native;
+
+  @DomName('WebGL2RenderingContext.bindAttribLocation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindAttribLocation(Program program, int index, String name) native;
+
+  @DomName('WebGL2RenderingContext.bindBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindBuffer(int target, Buffer buffer) native;
+
+  @DomName('WebGL2RenderingContext.bindFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindFramebuffer(int target, Framebuffer framebuffer) native;
+
+  @DomName('WebGL2RenderingContext.bindRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindRenderbuffer(int target, Renderbuffer renderbuffer) native;
+
+  @DomName('WebGL2RenderingContext.bindTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindTexture(int target, Texture texture) native;
+
+  @DomName('WebGL2RenderingContext.blendColor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendColor(num red, num green, num blue, num alpha) native;
+
+  @DomName('WebGL2RenderingContext.blendEquation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendEquation(int mode) native;
+
+  @DomName('WebGL2RenderingContext.blendEquationSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendEquationSeparate(int modeRGB, int modeAlpha) native;
+
+  @DomName('WebGL2RenderingContext.blendFunc')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendFunc(int sfactor, int dfactor) native;
+
+  @DomName('WebGL2RenderingContext.blendFuncSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) native;
+
+  @DomName('WebGL2RenderingContext.bufferData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bufferData(int target, data_OR_size, int usage) native;
+
+  @DomName('WebGL2RenderingContext.bufferSubData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bufferSubData(int target, int offset, data) native;
+
+  @DomName('WebGL2RenderingContext.checkFramebufferStatus')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int checkFramebufferStatus(int target) native;
+
+  @DomName('WebGL2RenderingContext.clear')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clear(int mask) native;
+
+  @DomName('WebGL2RenderingContext.clearColor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearColor(num red, num green, num blue, num alpha) native;
+
+  @DomName('WebGL2RenderingContext.clearDepth')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearDepth(num depth) native;
+
+  @DomName('WebGL2RenderingContext.clearStencil')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearStencil(int s) native;
+
+  @DomName('WebGL2RenderingContext.colorMask')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void colorMask(bool red, bool green, bool blue, bool alpha) native;
+
+  @DomName('WebGL2RenderingContext.compileShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compileShader(Shader shader) native;
+
+  @DomName('WebGL2RenderingContext.compressedTexImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, TypedData data) native;
+
+  @DomName('WebGL2RenderingContext.compressedTexSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, TypedData data) native;
+
+  @DomName('WebGL2RenderingContext.copyTexImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) native;
+
+  @DomName('WebGL2RenderingContext.copyTexSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) native;
+
+  @DomName('WebGL2RenderingContext.createBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Buffer createBuffer() native;
+
+  @DomName('WebGL2RenderingContext.createFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Framebuffer createFramebuffer() native;
+
+  @DomName('WebGL2RenderingContext.createProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Program createProgram() native;
+
+  @DomName('WebGL2RenderingContext.createRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Renderbuffer createRenderbuffer() native;
+
+  @DomName('WebGL2RenderingContext.createShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Shader createShader(int type) native;
+
+  @DomName('WebGL2RenderingContext.createTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Texture createTexture() native;
+
+  @DomName('WebGL2RenderingContext.cullFace')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void cullFace(int mode) native;
+
+  @DomName('WebGL2RenderingContext.deleteBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteBuffer(Buffer buffer) native;
+
+  @DomName('WebGL2RenderingContext.deleteFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteFramebuffer(Framebuffer framebuffer) native;
+
+  @DomName('WebGL2RenderingContext.deleteProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteProgram(Program program) native;
+
+  @DomName('WebGL2RenderingContext.deleteRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteRenderbuffer(Renderbuffer renderbuffer) native;
+
+  @DomName('WebGL2RenderingContext.deleteShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteShader(Shader shader) native;
+
+  @DomName('WebGL2RenderingContext.deleteTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteTexture(Texture texture) native;
+
+  @DomName('WebGL2RenderingContext.depthFunc')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void depthFunc(int func) native;
+
+  @DomName('WebGL2RenderingContext.depthMask')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void depthMask(bool flag) native;
+
+  @DomName('WebGL2RenderingContext.depthRange')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void depthRange(num zNear, num zFar) native;
+
+  @DomName('WebGL2RenderingContext.detachShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void detachShader(Program program, Shader shader) native;
+
+  @DomName('WebGL2RenderingContext.disable')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void disable(int cap) native;
+
+  @DomName('WebGL2RenderingContext.disableVertexAttribArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void disableVertexAttribArray(int index) native;
+
+  @DomName('WebGL2RenderingContext.drawArrays')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawArrays(int mode, int first, int count) native;
+
+  @DomName('WebGL2RenderingContext.drawElements')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawElements(int mode, int count, int type, int offset) native;
+
+  @DomName('WebGL2RenderingContext.enable')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void enable(int cap) native;
+
+  @DomName('WebGL2RenderingContext.enableVertexAttribArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void enableVertexAttribArray(int index) native;
+
+  @DomName('WebGL2RenderingContext.finish')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void finish() native;
+
+  @DomName('WebGL2RenderingContext.flush')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void flush() native;
+
+  @DomName('WebGL2RenderingContext.framebufferRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, Renderbuffer renderbuffer) native;
+
+  @DomName('WebGL2RenderingContext.framebufferTexture2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void framebufferTexture2D(int target, int attachment, int textarget, Texture texture, int level) native;
+
+  @DomName('WebGL2RenderingContext.frontFace')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void frontFace(int mode) native;
+
+  @DomName('WebGL2RenderingContext.generateMipmap')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void generateMipmap(int target) native;
+
+  @DomName('WebGL2RenderingContext.getActiveAttrib')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ActiveInfo getActiveAttrib(Program program, int index) native;
+
+  @DomName('WebGL2RenderingContext.getActiveUniform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ActiveInfo getActiveUniform(Program program, int index) native;
+
+  @DomName('WebGL2RenderingContext.getAttachedShaders')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<Shader> getAttachedShaders(Program program) native;
+
+  @DomName('WebGL2RenderingContext.getAttribLocation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getAttribLocation(Program program, String name) native;
+
+  @DomName('WebGL2RenderingContext.getBufferParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getBufferParameter(int target, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getContextAttributes')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Map getContextAttributes() {
+    return convertNativeToDart_Dictionary(_getContextAttributes_1());
+  }
+  @JSName('getContextAttributes')
+  @DomName('WebGL2RenderingContext.getContextAttributes')
+  @DocsEditable()
+  @Experimental() // untriaged
+  _getContextAttributes_1() native;
+
+  @DomName('WebGL2RenderingContext.getError')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getError() native;
+
+  @DomName('WebGL2RenderingContext.getExtension')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getExtension(String name) native;
+
+  @DomName('WebGL2RenderingContext.getFramebufferAttachmentParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getFramebufferAttachmentParameter(int target, int attachment, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getParameter(int pname) native;
+
+  @DomName('WebGL2RenderingContext.getProgramInfoLog')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String getProgramInfoLog(Program program) native;
+
+  @DomName('WebGL2RenderingContext.getProgramParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getProgramParameter(Program program, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getRenderbufferParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getRenderbufferParameter(int target, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getShaderInfoLog')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String getShaderInfoLog(Shader shader) native;
+
+  @DomName('WebGL2RenderingContext.getShaderParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getShaderParameter(Shader shader, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getShaderPrecisionFormat')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ShaderPrecisionFormat getShaderPrecisionFormat(int shadertype, int precisiontype) native;
+
+  @DomName('WebGL2RenderingContext.getShaderSource')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String getShaderSource(Shader shader) native;
+
+  @DomName('WebGL2RenderingContext.getSupportedExtensions')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<String> getSupportedExtensions() native;
+
+  @DomName('WebGL2RenderingContext.getTexParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getTexParameter(int target, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getUniform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getUniform(Program program, UniformLocation location) native;
+
+  @DomName('WebGL2RenderingContext.getUniformLocation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  UniformLocation getUniformLocation(Program program, String name) native;
+
+  @DomName('WebGL2RenderingContext.getVertexAttrib')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getVertexAttrib(int index, int pname) native;
+
+  @DomName('WebGL2RenderingContext.getVertexAttribOffset')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getVertexAttribOffset(int index, int pname) native;
+
+  @DomName('WebGL2RenderingContext.hint')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void hint(int target, int mode) native;
+
+  @DomName('WebGL2RenderingContext.isBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isBuffer(Buffer buffer) native;
+
+  @DomName('WebGL2RenderingContext.isContextLost')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isContextLost() native;
+
+  @DomName('WebGL2RenderingContext.isEnabled')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isEnabled(int cap) native;
+
+  @DomName('WebGL2RenderingContext.isFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isFramebuffer(Framebuffer framebuffer) native;
+
+  @DomName('WebGL2RenderingContext.isProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isProgram(Program program) native;
+
+  @DomName('WebGL2RenderingContext.isRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isRenderbuffer(Renderbuffer renderbuffer) native;
+
+  @DomName('WebGL2RenderingContext.isShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isShader(Shader shader) native;
+
+  @DomName('WebGL2RenderingContext.isTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isTexture(Texture texture) native;
+
+  @DomName('WebGL2RenderingContext.lineWidth')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void lineWidth(num width) native;
+
+  @DomName('WebGL2RenderingContext.linkProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void linkProgram(Program program) native;
+
+  @DomName('WebGL2RenderingContext.pixelStorei')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void pixelStorei(int pname, int param) native;
+
+  @DomName('WebGL2RenderingContext.polygonOffset')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void polygonOffset(num factor, num units) native;
+
+  @DomName('WebGL2RenderingContext.readPixels')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void readPixels(int x, int y, int width, int height, int format, int type, TypedData pixels) native;
+
+  @DomName('WebGL2RenderingContext.renderbufferStorage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void renderbufferStorage(int target, int internalformat, int width, int height) native;
+
+  @DomName('WebGL2RenderingContext.sampleCoverage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void sampleCoverage(num value, bool invert) native;
+
+  @DomName('WebGL2RenderingContext.scissor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void scissor(int x, int y, int width, int height) native;
+
+  @DomName('WebGL2RenderingContext.shaderSource')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void shaderSource(Shader shader, String string) native;
+
+  @DomName('WebGL2RenderingContext.stencilFunc')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilFunc(int func, int ref, int mask) native;
+
+  @DomName('WebGL2RenderingContext.stencilFuncSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilFuncSeparate(int face, int func, int ref, int mask) native;
+
+  @DomName('WebGL2RenderingContext.stencilMask')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilMask(int mask) native;
+
+  @DomName('WebGL2RenderingContext.stencilMaskSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilMaskSeparate(int face, int mask) native;
+
+  @DomName('WebGL2RenderingContext.stencilOp')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilOp(int fail, int zfail, int zpass) native;
+
+  @DomName('WebGL2RenderingContext.stencilOpSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
+
+  @DomName('WebGL2RenderingContext.texImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) {
+    if (type != null && format != null && (border_OR_canvas_OR_image_OR_pixels_OR_video is int)) {
+      _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
+      return;
+    }
+    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == null && pixels == null) {
+      var pixels_1 = convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_pixels_OR_video);
+      _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_type, pixels_1);
+      return;
+    }
+    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement) && format == null && type == null && pixels == null) {
+      _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement) && format == null && type == null && pixels == null) {
+      _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement) && format == null && type == null && pixels == null) {
+      _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+  @JSName('texImage2D')
+  @DomName('WebGL2RenderingContext.texImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texImage2D_1(target, level, internalformat, width, height, int border, format, type, TypedData pixels) native;
+  @JSName('texImage2D')
+  @DomName('WebGL2RenderingContext.texImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texImage2D_2(target, level, internalformat, format, type, pixels) native;
+  @JSName('texImage2D')
+  @DomName('WebGL2RenderingContext.texImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texImage2D_3(target, level, internalformat, format, type, ImageElement image) native;
+  @JSName('texImage2D')
+  @DomName('WebGL2RenderingContext.texImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texImage2D_4(target, level, internalformat, format, type, CanvasElement canvas) native;
+  @JSName('texImage2D')
+  @DomName('WebGL2RenderingContext.texImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texImage2D_5(target, level, internalformat, format, type, VideoElement video) native;
+
+  @DomName('WebGL2RenderingContext.texParameterf')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texParameterf(int target, int pname, num param) native;
+
+  @DomName('WebGL2RenderingContext.texParameteri')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texParameteri(int target, int pname, int param) native;
+
+  @DomName('WebGL2RenderingContext.texSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, TypedData pixels]) {
+    if (type != null && (canvas_OR_format_OR_image_OR_pixels_OR_video is int)) {
+      _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
+      return;
+    }
+    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == null) {
+      var pixels_1 = convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_pixels_OR_video);
+      _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_OR_type, pixels_1);
+      return;
+    }
+    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement) && type == null && pixels == null) {
+      _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement) && type == null && pixels == null) {
+      _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement) && type == null && pixels == null) {
+      _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+  @JSName('texSubImage2D')
+  @DomName('WebGL2RenderingContext.texSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int format, type, TypedData pixels) native;
+  @JSName('texSubImage2D')
+  @DomName('WebGL2RenderingContext.texSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) native;
+  @JSName('texSubImage2D')
+  @DomName('WebGL2RenderingContext.texSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElement image) native;
+  @JSName('texSubImage2D')
+  @DomName('WebGL2RenderingContext.texSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasElement canvas) native;
+  @JSName('texSubImage2D')
+  @DomName('WebGL2RenderingContext.texSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElement video) native;
+
+  @DomName('WebGL2RenderingContext.uniform1f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1f(UniformLocation location, num x) native;
+
+  @DomName('WebGL2RenderingContext.uniform1fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1fv(UniformLocation location, v) native;
+
+  @DomName('WebGL2RenderingContext.uniform1i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1i(UniformLocation location, int x) native;
+
+  @DomName('WebGL2RenderingContext.uniform1iv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1iv(UniformLocation location, v) native;
+
+  @DomName('WebGL2RenderingContext.uniform2f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2f(UniformLocation location, num x, num y) native;
+
+  @DomName('WebGL2RenderingContext.uniform2fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2fv(UniformLocation location, v) native;
+
+  @DomName('WebGL2RenderingContext.uniform2i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2i(UniformLocation location, int x, int y) native;
+
+  @DomName('WebGL2RenderingContext.uniform2iv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2iv(UniformLocation location, v) native;
+
+  @DomName('WebGL2RenderingContext.uniform3f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3f(UniformLocation location, num x, num y, num z) native;
+
+  @DomName('WebGL2RenderingContext.uniform3fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3fv(UniformLocation location, v) native;
+
+  @DomName('WebGL2RenderingContext.uniform3i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3i(UniformLocation location, int x, int y, int z) native;
+
+  @DomName('WebGL2RenderingContext.uniform3iv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3iv(UniformLocation location, v) native;
+
+  @DomName('WebGL2RenderingContext.uniform4f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4f(UniformLocation location, num x, num y, num z, num w) native;
+
+  @DomName('WebGL2RenderingContext.uniform4fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4fv(UniformLocation location, v) native;
+
+  @DomName('WebGL2RenderingContext.uniform4i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4i(UniformLocation location, int x, int y, int z, int w) native;
+
+  @DomName('WebGL2RenderingContext.uniform4iv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4iv(UniformLocation location, v) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix2fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix2fv(UniformLocation location, bool transpose, array) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix3fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix3fv(UniformLocation location, bool transpose, array) native;
+
+  @DomName('WebGL2RenderingContext.uniformMatrix4fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformMatrix4fv(UniformLocation location, bool transpose, array) native;
+
+  @DomName('WebGL2RenderingContext.useProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void useProgram(Program program) native;
+
+  @DomName('WebGL2RenderingContext.validateProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void validateProgram(Program program) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttrib1f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib1f(int indx, num x) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttrib1fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib1fv(int indx, values) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttrib2f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib2f(int indx, num x, num y) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttrib2fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib2fv(int indx, values) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttrib3f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib3f(int indx, num x, num y, num z) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttrib3fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib3fv(int indx, values) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttrib4f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib4f(int indx, num x, num y, num z, num w) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttrib4fv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib4fv(int indx, values) native;
+
+  @DomName('WebGL2RenderingContext.vertexAttribPointer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) native;
+
+  @DomName('WebGL2RenderingContext.viewport')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void viewport(int x, int y, int width, int height) native;
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('WebGLSampler')
+@Experimental() // untriaged
+@Native("WebGLSampler")
+class Sampler extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory Sampler._() { throw new UnsupportedError("Not supported"); }
 }
 // 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
@@ -3312,6 +5922,19 @@
 
 
 @DocsEditable()
+@DomName('WebGLSync')
+@Experimental() // untriaged
+@Native("WebGLSync")
+class Sync extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory Sync._() { throw new UnsupportedError("Not supported"); }
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('WebGLTexture')
 @Native("WebGLTexture")
 class Texture extends Interceptor {
@@ -3324,6 +5947,19 @@
 
 
 @DocsEditable()
+@DomName('WebGLTransformFeedback')
+@Experimental() // untriaged
+@Native("WebGLTransformFeedback")
+class TransformFeedback extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory TransformFeedback._() { throw new UnsupportedError("Not supported"); }
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('WebGLUniformLocation')
 @Native("WebGLUniformLocation")
 class UniformLocation extends Interceptor {
@@ -3336,13 +5972,41 @@
 
 
 @DocsEditable()
+@DomName('WebGLVertexArrayObject')
+@Experimental() // untriaged
+@Native("WebGLVertexArrayObject")
+class VertexArrayObject extends Interceptor {
+  // To suppress missing implicit constructor warnings.
+  factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); }
+}
+// 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.
+
+
+@DocsEditable()
 @DomName('WebGLVertexArrayObjectOES')
 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
 @Experimental() // experimental
 @Native("WebGLVertexArrayObjectOES")
-class VertexArrayObject extends Interceptor {
+class VertexArrayObjectOes extends Interceptor {
   // To suppress missing implicit constructor warnings.
-  factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); }
+  factory VertexArrayObjectOes._() { throw new UnsupportedError("Not supported"); }
+}
+// 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.
+
+
+@DocsEditable()
+@DomName('WebGL2RenderingContextBase')
+@Experimental() // untriaged
+@Native("WebGL2RenderingContextBase")
+abstract class _WebGL2RenderingContextBase extends Interceptor implements _WebGLRenderingContextBase {
+  // To suppress missing implicit constructor warnings.
+  factory _WebGL2RenderingContextBase._() { throw new UnsupportedError("Not supported"); }
+
+  // From WebGLRenderingContextBase
 }
 // 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
diff --git a/sdk/lib/web_gl/dartium/web_gl_dartium.dart b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
index 707af2d..a82b5f6 100644
--- a/sdk/lib/web_gl/dartium/web_gl_dartium.dart
+++ b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
@@ -22,81 +22,49 @@
 // FIXME: Can we make this private?
 @Deprecated("Internal Use Only")
 final web_glBlinkMap = {
-  'ANGLEInstancedArrays': () => AngleInstancedArrays,
-  'EXTBlendMinMax': () => ExtBlendMinMax,
-  'EXTFragDepth': () => ExtFragDepth,
-  'EXTShaderTextureLOD': () => ExtShaderTextureLod,
-  'EXTTextureFilterAnisotropic': () => ExtTextureFilterAnisotropic,
-  'OESElementIndexUint': () => OesElementIndexUint,
-  'OESStandardDerivatives': () => OesStandardDerivatives,
-  'OESTextureFloat': () => OesTextureFloat,
-  'OESTextureFloatLinear': () => OesTextureFloatLinear,
-  'OESTextureHalfFloat': () => OesTextureHalfFloat,
-  'OESTextureHalfFloatLinear': () => OesTextureHalfFloatLinear,
-  'OESVertexArrayObject': () => OesVertexArrayObject,
-  'WebGLActiveInfo': () => ActiveInfo,
-  'WebGLBuffer': () => Buffer,
-  'WebGLCompressedTextureATC': () => CompressedTextureAtc,
-  'WebGLCompressedTextureETC1': () => CompressedTextureETC1,
-  'WebGLCompressedTexturePVRTC': () => CompressedTexturePvrtc,
-  'WebGLCompressedTextureS3TC': () => CompressedTextureS3TC,
-  'WebGLContextAttributes': () => ContextAttributes,
-  'WebGLContextEvent': () => ContextEvent,
-  'WebGLDebugRendererInfo': () => DebugRendererInfo,
-  'WebGLDebugShaders': () => DebugShaders,
-  'WebGLDepthTexture': () => DepthTexture,
-  'WebGLDrawBuffers': () => DrawBuffers,
-  'WebGLFramebuffer': () => Framebuffer,
-  'WebGLLoseContext': () => LoseContext,
-  'WebGLProgram': () => Program,
-  'WebGLRenderbuffer': () => Renderbuffer,
-  'WebGLRenderingContext': () => RenderingContext,
-  'WebGLRenderingContextBase': () => _WebGLRenderingContextBase,
-  'WebGLShader': () => Shader,
-  'WebGLShaderPrecisionFormat': () => ShaderPrecisionFormat,
-  'WebGLTexture': () => Texture,
-  'WebGLUniformLocation': () => UniformLocation,
-  'WebGLVertexArrayObjectOES': () => VertexArrayObject,
-
-};
-
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final web_glBlinkFunctionMap = {
-  'ANGLEInstancedArrays': () => AngleInstancedArrays.internalCreateAngleInstancedArrays,
-  'EXTBlendMinMax': () => ExtBlendMinMax.internalCreateExtBlendMinMax,
-  'EXTFragDepth': () => ExtFragDepth.internalCreateExtFragDepth,
-  'EXTShaderTextureLOD': () => ExtShaderTextureLod.internalCreateExtShaderTextureLod,
-  'EXTTextureFilterAnisotropic': () => ExtTextureFilterAnisotropic.internalCreateExtTextureFilterAnisotropic,
-  'OESElementIndexUint': () => OesElementIndexUint.internalCreateOesElementIndexUint,
-  'OESStandardDerivatives': () => OesStandardDerivatives.internalCreateOesStandardDerivatives,
-  'OESTextureFloat': () => OesTextureFloat.internalCreateOesTextureFloat,
-  'OESTextureFloatLinear': () => OesTextureFloatLinear.internalCreateOesTextureFloatLinear,
-  'OESTextureHalfFloat': () => OesTextureHalfFloat.internalCreateOesTextureHalfFloat,
-  'OESTextureHalfFloatLinear': () => OesTextureHalfFloatLinear.internalCreateOesTextureHalfFloatLinear,
-  'OESVertexArrayObject': () => OesVertexArrayObject.internalCreateOesVertexArrayObject,
-  'WebGLActiveInfo': () => ActiveInfo.internalCreateActiveInfo,
-  'WebGLBuffer': () => Buffer.internalCreateBuffer,
-  'WebGLCompressedTextureATC': () => CompressedTextureAtc.internalCreateCompressedTextureAtc,
-  'WebGLCompressedTextureETC1': () => CompressedTextureETC1.internalCreateCompressedTextureETC1,
-  'WebGLCompressedTexturePVRTC': () => CompressedTexturePvrtc.internalCreateCompressedTexturePvrtc,
-  'WebGLCompressedTextureS3TC': () => CompressedTextureS3TC.internalCreateCompressedTextureS3TC,
-  'WebGLContextAttributes': () => ContextAttributes.internalCreateContextAttributes,
-  'WebGLContextEvent': () => ContextEvent.internalCreateContextEvent,
-  'WebGLDebugRendererInfo': () => DebugRendererInfo.internalCreateDebugRendererInfo,
-  'WebGLDebugShaders': () => DebugShaders.internalCreateDebugShaders,
-  'WebGLDepthTexture': () => DepthTexture.internalCreateDepthTexture,
-  'WebGLDrawBuffers': () => DrawBuffers.internalCreateDrawBuffers,
-  'WebGLFramebuffer': () => Framebuffer.internalCreateFramebuffer,
-  'WebGLLoseContext': () => LoseContext.internalCreateLoseContext,
-  'WebGLProgram': () => Program.internalCreateProgram,
-  'WebGLRenderbuffer': () => Renderbuffer.internalCreateRenderbuffer,
-  'WebGLRenderingContext': () => RenderingContext.internalCreateRenderingContext,
-  'WebGLShader': () => Shader.internalCreateShader,
-  'WebGLShaderPrecisionFormat': () => ShaderPrecisionFormat.internalCreateShaderPrecisionFormat,
-  'WebGLTexture': () => Texture.internalCreateTexture,
-  'WebGLUniformLocation': () => UniformLocation.internalCreateUniformLocation,
-  'WebGLVertexArrayObjectOES': () => VertexArrayObject.internalCreateVertexArrayObject,
+  'ANGLEInstancedArrays': () => AngleInstancedArrays.instanceRuntimeType,
+  'CHROMIUMSubscribeUniform': () => ChromiumSubscribeUniform.instanceRuntimeType,
+  'EXTBlendMinMax': () => ExtBlendMinMax.instanceRuntimeType,
+  'EXTFragDepth': () => ExtFragDepth.instanceRuntimeType,
+  'EXTShaderTextureLOD': () => ExtShaderTextureLod.instanceRuntimeType,
+  'EXTTextureFilterAnisotropic': () => ExtTextureFilterAnisotropic.instanceRuntimeType,
+  'EXTsRGB': () => EXTsRgb.instanceRuntimeType,
+  'OESElementIndexUint': () => OesElementIndexUint.instanceRuntimeType,
+  'OESStandardDerivatives': () => OesStandardDerivatives.instanceRuntimeType,
+  'OESTextureFloat': () => OesTextureFloat.instanceRuntimeType,
+  'OESTextureFloatLinear': () => OesTextureFloatLinear.instanceRuntimeType,
+  'OESTextureHalfFloat': () => OesTextureHalfFloat.instanceRuntimeType,
+  'OESTextureHalfFloatLinear': () => OesTextureHalfFloatLinear.instanceRuntimeType,
+  'OESVertexArrayObject': () => OesVertexArrayObject.instanceRuntimeType,
+  'WebGL2RenderingContext': () => RenderingContext2.instanceRuntimeType,
+  'WebGL2RenderingContextBase': () => _WebGL2RenderingContextBase.instanceRuntimeType,
+  'WebGLActiveInfo': () => ActiveInfo.instanceRuntimeType,
+  'WebGLBuffer': () => Buffer.instanceRuntimeType,
+  'WebGLCompressedTextureATC': () => CompressedTextureAtc.instanceRuntimeType,
+  'WebGLCompressedTextureETC1': () => CompressedTextureETC1.instanceRuntimeType,
+  'WebGLCompressedTexturePVRTC': () => CompressedTexturePvrtc.instanceRuntimeType,
+  'WebGLCompressedTextureS3TC': () => CompressedTextureS3TC.instanceRuntimeType,
+  'WebGLContextEvent': () => ContextEvent.instanceRuntimeType,
+  'WebGLDebugRendererInfo': () => DebugRendererInfo.instanceRuntimeType,
+  'WebGLDebugShaders': () => DebugShaders.instanceRuntimeType,
+  'WebGLDepthTexture': () => DepthTexture.instanceRuntimeType,
+  'WebGLDrawBuffers': () => DrawBuffers.instanceRuntimeType,
+  'WebGLFramebuffer': () => Framebuffer.instanceRuntimeType,
+  'WebGLLoseContext': () => LoseContext.instanceRuntimeType,
+  'WebGLProgram': () => Program.instanceRuntimeType,
+  'WebGLQuery': () => Query.instanceRuntimeType,
+  'WebGLRenderbuffer': () => Renderbuffer.instanceRuntimeType,
+  'WebGLRenderingContext': () => RenderingContext.instanceRuntimeType,
+  'WebGLRenderingContextBase': () => _WebGLRenderingContextBase.instanceRuntimeType,
+  'WebGLSampler': () => Sampler.instanceRuntimeType,
+  'WebGLShader': () => Shader.instanceRuntimeType,
+  'WebGLShaderPrecisionFormat': () => ShaderPrecisionFormat.instanceRuntimeType,
+  'WebGLSync': () => Sync.instanceRuntimeType,
+  'WebGLTexture': () => Texture.instanceRuntimeType,
+  'WebGLTransformFeedback': () => TransformFeedback.instanceRuntimeType,
+  'WebGLUniformLocation': () => UniformLocation.instanceRuntimeType,
+  'WebGLVertexArrayObject': () => VertexArrayObject.instanceRuntimeType,
+  'WebGLVertexArrayObjectOES': () => VertexArrayObjectOes.instanceRuntimeType,
 
 };
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
@@ -414,32 +382,24 @@
   // To suppress missing implicit constructor warnings.
   factory ActiveInfo._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ActiveInfo internalCreateActiveInfo() {
-    return new ActiveInfo._internalWrap();
-  }
 
-  factory ActiveInfo._internalWrap() {
-    return new ActiveInfo.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ActiveInfo.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLActiveInfo.name')
   @DocsEditable()
-  String get name => _blink.BlinkWebGLActiveInfo.instance.name_Getter_(unwrap_jso(this));
+  String get name => _blink.BlinkWebGLActiveInfo.instance.name_Getter_(this);
   
   @DomName('WebGLActiveInfo.size')
   @DocsEditable()
-  int get size => _blink.BlinkWebGLActiveInfo.instance.size_Getter_(unwrap_jso(this));
+  int get size => _blink.BlinkWebGLActiveInfo.instance.size_Getter_(this);
   
   @DomName('WebGLActiveInfo.type')
   @DocsEditable()
-  int get type => _blink.BlinkWebGLActiveInfo.instance.type_Getter_(unwrap_jso(this));
+  int get type => _blink.BlinkWebGLActiveInfo.instance.type_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -456,21 +416,13 @@
   // To suppress missing implicit constructor warnings.
   factory AngleInstancedArrays._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static AngleInstancedArrays internalCreateAngleInstancedArrays() {
-    return new AngleInstancedArrays._internalWrap();
-  }
 
-  factory AngleInstancedArrays._internalWrap() {
-    return new AngleInstancedArrays.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   AngleInstancedArrays.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('ANGLEInstancedArrays.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE')
   @DocsEditable()
   @Experimental() // untriaged
@@ -479,17 +431,17 @@
   @DomName('ANGLEInstancedArrays.drawArraysInstancedANGLE')
   @DocsEditable()
   @Experimental() // untriaged
-  void drawArraysInstancedAngle(int mode, int first, int count, int primcount) => _blink.BlinkANGLEInstancedArrays.instance.drawArraysInstancedANGLE_Callback_4_(unwrap_jso(this), mode, first, count, primcount);
+  void drawArraysInstancedAngle(int mode, int first, int count, int primcount) => _blink.BlinkANGLEInstancedArrays.instance.drawArraysInstancedANGLE_Callback_4_(this, mode, first, count, primcount);
   
   @DomName('ANGLEInstancedArrays.drawElementsInstancedANGLE')
   @DocsEditable()
   @Experimental() // untriaged
-  void drawElementsInstancedAngle(int mode, int count, int type, int offset, int primcount) => _blink.BlinkANGLEInstancedArrays.instance.drawElementsInstancedANGLE_Callback_5_(unwrap_jso(this), mode, count, type, offset, primcount);
+  void drawElementsInstancedAngle(int mode, int count, int type, int offset, int primcount) => _blink.BlinkANGLEInstancedArrays.instance.drawElementsInstancedANGLE_Callback_5_(this, mode, count, type, offset, primcount);
   
   @DomName('ANGLEInstancedArrays.vertexAttribDivisorANGLE')
   @DocsEditable()
   @Experimental() // untriaged
-  void vertexAttribDivisorAngle(int index, int divisor) => _blink.BlinkANGLEInstancedArrays.instance.vertexAttribDivisorANGLE_Callback_2_(unwrap_jso(this), index, divisor);
+  void vertexAttribDivisorAngle(int index, int divisor) => _blink.BlinkANGLEInstancedArrays.instance.vertexAttribDivisorANGLE_Callback_2_(this, index, divisor);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -506,21 +458,80 @@
   // To suppress missing implicit constructor warnings.
   factory Buffer._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Buffer internalCreateBuffer() {
-    return new Buffer._internalWrap();
-  }
 
-  factory Buffer._internalWrap() {
-    return new Buffer.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Buffer.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+}
+// 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.
 
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('CHROMIUMSubscribeUniform')
+@Experimental() // untriaged
+class ChromiumSubscribeUniform extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory ChromiumSubscribeUniform._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  ChromiumSubscribeUniform.internal_() { }
+
+  @DomName('CHROMIUMSubscribeUniform.MOUSE_POSITION_CHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MOUSE_POSITION_CHROMIUM = 0x924C;
+
+  @DomName('CHROMIUMSubscribeUniform.SUBSCRIBED_VALUES_BUFFER_CHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SUBSCRIBED_VALUES_BUFFER_CHROMIUM = 0x924B;
+
+  @DomName('CHROMIUMSubscribeUniform.bindValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindValuebufferChromium(int target, ChromiumValuebuffer buffer) => _blink.BlinkCHROMIUMSubscribeUniform.instance.bindValuebufferCHROMIUM_Callback_2_(this, target, buffer);
+  
+  @DomName('CHROMIUMSubscribeUniform.createValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ChromiumValuebuffer createValuebufferChromium() => _blink.BlinkCHROMIUMSubscribeUniform.instance.createValuebufferCHROMIUM_Callback_0_(this);
+  
+  @DomName('CHROMIUMSubscribeUniform.deleteValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteValuebufferChromium(ChromiumValuebuffer buffer) => _blink.BlinkCHROMIUMSubscribeUniform.instance.deleteValuebufferCHROMIUM_Callback_1_(this, buffer);
+  
+  @DomName('CHROMIUMSubscribeUniform.isValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isValuebufferChromium(ChromiumValuebuffer buffer) => _blink.BlinkCHROMIUMSubscribeUniform.instance.isValuebufferCHROMIUM_Callback_1_(this, buffer);
+  
+  @DomName('CHROMIUMSubscribeUniform.populateSubscribedValuesCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void populateSubscribedValuesChromium(int target) => _blink.BlinkCHROMIUMSubscribeUniform.instance.populateSubscribedValuesCHROMIUM_Callback_1_(this, target);
+  
+  @DomName('CHROMIUMSubscribeUniform.subscribeValueCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void subscribeValueChromium(int target, int subscriptions) => _blink.BlinkCHROMIUMSubscribeUniform.instance.subscribeValueCHROMIUM_Callback_2_(this, target, subscriptions);
+  
+  @DomName('CHROMIUMSubscribeUniform.uniformValuebufferCHROMIUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformValuebufferChromium(UniformLocation location, int target, int subscription) => _blink.BlinkCHROMIUMSubscribeUniform.instance.uniformValuebufferCHROMIUM_Callback_3_(this, location, target, subscription);
+  
 }
 // 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
@@ -537,21 +548,13 @@
   // To suppress missing implicit constructor warnings.
   factory CompressedTextureAtc._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CompressedTextureAtc internalCreateCompressedTextureAtc() {
-    return new CompressedTextureAtc._internalWrap();
-  }
 
-  factory CompressedTextureAtc._internalWrap() {
-    return new CompressedTextureAtc.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CompressedTextureAtc.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLCompressedTextureATC.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL')
   @DocsEditable()
   static const int COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C93;
@@ -579,21 +582,13 @@
   // To suppress missing implicit constructor warnings.
   factory CompressedTextureETC1._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CompressedTextureETC1 internalCreateCompressedTextureETC1() {
-    return new CompressedTextureETC1._internalWrap();
-  }
 
-  factory CompressedTextureETC1._internalWrap() {
-    return new CompressedTextureETC1.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CompressedTextureETC1.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLCompressedTextureETC1.COMPRESSED_RGB_ETC1_WEBGL')
   @DocsEditable()
   @Experimental() // untriaged
@@ -615,21 +610,13 @@
   // To suppress missing implicit constructor warnings.
   factory CompressedTexturePvrtc._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CompressedTexturePvrtc internalCreateCompressedTexturePvrtc() {
-    return new CompressedTexturePvrtc._internalWrap();
-  }
 
-  factory CompressedTexturePvrtc._internalWrap() {
-    return new CompressedTexturePvrtc.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CompressedTexturePvrtc.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLCompressedTexturePVRTC.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG')
   @DocsEditable()
   static const int COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03;
@@ -662,21 +649,13 @@
   // To suppress missing implicit constructor warnings.
   factory CompressedTextureS3TC._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static CompressedTextureS3TC internalCreateCompressedTextureS3TC() {
-    return new CompressedTextureS3TC._internalWrap();
-  }
 
-  factory CompressedTextureS3TC._internalWrap() {
-    return new CompressedTextureS3TC.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   CompressedTextureS3TC.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT1_EXT')
   @DocsEditable()
   static const int COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
@@ -702,129 +681,25 @@
 
 
 @DocsEditable()
-/**
- * The properties of a WebGL rendering context.
- *
- * If [alpha] is `true`, then the context has an alpha channel.
- *
- * If [antialias] is `true`, then antialiasing is performed by the browser, but
- * only if the browser's implementation of WebGL supports antialiasing.
- *
- * If [depth] is `true`, then the context has a depth buffer of at least 16
- * bits.
- *
- * If [premultipliedAlpha] is `true`, then the context's colors are assumed to
- * be premultiplied. This means that color values are assumed to have  been
- * multiplied by their alpha values. If [alpha] is `false`, then this flag is
- * ignored.
- *
- * If [preserveDrawingBuffer] is `false`, then all contents of the context are
- * cleared. If `true`, then all values will remain until changed or cleared.
- *
- * If [stencil] is `true`, then the context has a stencil buffer of at least 8
- * bits.
- */
-@DomName('WebGLContextAttributes')
-@Unstable()
-class ContextAttributes extends DartHtmlDomObject {
-  // To suppress missing implicit constructor warnings.
-  factory ContextAttributes._() { throw new UnsupportedError("Not supported"); }
-
-  @Deprecated("Internal Use Only")
-  static ContextAttributes internalCreateContextAttributes() {
-    return new ContextAttributes._internalWrap();
-  }
-
-  factory ContextAttributes._internalWrap() {
-    return new ContextAttributes.internal_();
-  }
-
-  @Deprecated("Internal Use Only")
-  ContextAttributes.internal_() { }
-
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
-  @DomName('WebGLContextAttributes.alpha')
-  @DocsEditable()
-  bool get alpha => _blink.BlinkWebGLContextAttributes.instance.alpha_Getter_(unwrap_jso(this));
-  
-  @DomName('WebGLContextAttributes.alpha')
-  @DocsEditable()
-  set alpha(bool value) => _blink.BlinkWebGLContextAttributes.instance.alpha_Setter_(unwrap_jso(this), value);
-  
-  @DomName('WebGLContextAttributes.antialias')
-  @DocsEditable()
-  bool get antialias => _blink.BlinkWebGLContextAttributes.instance.antialias_Getter_(unwrap_jso(this));
-  
-  @DomName('WebGLContextAttributes.antialias')
-  @DocsEditable()
-  set antialias(bool value) => _blink.BlinkWebGLContextAttributes.instance.antialias_Setter_(unwrap_jso(this), value);
-  
-  @DomName('WebGLContextAttributes.depth')
-  @DocsEditable()
-  bool get depth => _blink.BlinkWebGLContextAttributes.instance.depth_Getter_(unwrap_jso(this));
-  
-  @DomName('WebGLContextAttributes.depth')
-  @DocsEditable()
-  set depth(bool value) => _blink.BlinkWebGLContextAttributes.instance.depth_Setter_(unwrap_jso(this), value);
-  
-  @DomName('WebGLContextAttributes.failIfMajorPerformanceCaveat')
-  @DocsEditable()
-  @Experimental() // untriaged
-  bool get failIfMajorPerformanceCaveat => _blink.BlinkWebGLContextAttributes.instance.failIfMajorPerformanceCaveat_Getter_(unwrap_jso(this));
-  
-  @DomName('WebGLContextAttributes.failIfMajorPerformanceCaveat')
-  @DocsEditable()
-  @Experimental() // untriaged
-  set failIfMajorPerformanceCaveat(bool value) => _blink.BlinkWebGLContextAttributes.instance.failIfMajorPerformanceCaveat_Setter_(unwrap_jso(this), value);
-  
-  @DomName('WebGLContextAttributes.premultipliedAlpha')
-  @DocsEditable()
-  bool get premultipliedAlpha => _blink.BlinkWebGLContextAttributes.instance.premultipliedAlpha_Getter_(unwrap_jso(this));
-  
-  @DomName('WebGLContextAttributes.premultipliedAlpha')
-  @DocsEditable()
-  set premultipliedAlpha(bool value) => _blink.BlinkWebGLContextAttributes.instance.premultipliedAlpha_Setter_(unwrap_jso(this), value);
-  
-  @DomName('WebGLContextAttributes.preserveDrawingBuffer')
-  @DocsEditable()
-  bool get preserveDrawingBuffer => _blink.BlinkWebGLContextAttributes.instance.preserveDrawingBuffer_Getter_(unwrap_jso(this));
-  
-  @DomName('WebGLContextAttributes.preserveDrawingBuffer')
-  @DocsEditable()
-  set preserveDrawingBuffer(bool value) => _blink.BlinkWebGLContextAttributes.instance.preserveDrawingBuffer_Setter_(unwrap_jso(this), value);
-  
-  @DomName('WebGLContextAttributes.stencil')
-  @DocsEditable()
-  bool get stencil => _blink.BlinkWebGLContextAttributes.instance.stencil_Getter_(unwrap_jso(this));
-  
-  @DomName('WebGLContextAttributes.stencil')
-  @DocsEditable()
-  set stencil(bool value) => _blink.BlinkWebGLContextAttributes.instance.stencil_Setter_(unwrap_jso(this), value);
-  
-}
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
 @DomName('WebGLContextEvent')
 @Unstable()
 class ContextEvent extends Event {
   // To suppress missing implicit constructor warnings.
   factory ContextEvent._() { throw new UnsupportedError("Not supported"); }
 
-
-  @Deprecated("Internal Use Only")
-  static ContextEvent internalCreateContextEvent() {
-    return new ContextEvent._internalWrap();
+  @DomName('WebGLContextEvent.WebGLContextEvent')
+  @DocsEditable()
+  factory ContextEvent(String type, [Map eventInit]) {
+    if (eventInit != null) {
+      var eventInit_1 = convertDartToNative_Dictionary(eventInit);
+      return _blink.BlinkWebGLContextEvent.instance.constructorCallback_2_(type, eventInit_1);
+    }
+    return _blink.BlinkWebGLContextEvent.instance.constructorCallback_1_(type);
   }
 
-  external factory ContextEvent._internalWrap();
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ContextEvent.internal_() : super.internal_();
@@ -832,7 +707,7 @@
 
   @DomName('WebGLContextEvent.statusMessage')
   @DocsEditable()
-  String get statusMessage => _blink.BlinkWebGLContextEvent.instance.statusMessage_Getter_(unwrap_jso(this));
+  String get statusMessage => _blink.BlinkWebGLContextEvent.instance.statusMessage_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -850,21 +725,13 @@
   // To suppress missing implicit constructor warnings.
   factory DebugRendererInfo._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DebugRendererInfo internalCreateDebugRendererInfo() {
-    return new DebugRendererInfo._internalWrap();
-  }
 
-  factory DebugRendererInfo._internalWrap() {
-    return new DebugRendererInfo.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DebugRendererInfo.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLDebugRendererInfo.UNMASKED_RENDERER_WEBGL')
   @DocsEditable()
   static const int UNMASKED_RENDERER_WEBGL = 0x9246;
@@ -889,24 +756,16 @@
   // To suppress missing implicit constructor warnings.
   factory DebugShaders._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DebugShaders internalCreateDebugShaders() {
-    return new DebugShaders._internalWrap();
-  }
 
-  factory DebugShaders._internalWrap() {
-    return new DebugShaders.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DebugShaders.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLDebugShaders.getTranslatedShaderSource')
   @DocsEditable()
-  String getTranslatedShaderSource(Shader shader) => _blink.BlinkWebGLDebugShaders.instance.getTranslatedShaderSource_Callback_1_(unwrap_jso(this), unwrap_jso(shader));
+  String getTranslatedShaderSource(Shader shader) => _blink.BlinkWebGLDebugShaders.instance.getTranslatedShaderSource_Callback_1_(this, shader);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -924,21 +783,13 @@
   // To suppress missing implicit constructor warnings.
   factory DepthTexture._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DepthTexture internalCreateDepthTexture() {
-    return new DepthTexture._internalWrap();
-  }
 
-  factory DepthTexture._internalWrap() {
-    return new DepthTexture.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DepthTexture.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLDepthTexture.UNSIGNED_INT_24_8_WEBGL')
   @DocsEditable()
   static const int UNSIGNED_INT_24_8_WEBGL = 0x84FA;
@@ -959,21 +810,13 @@
   // To suppress missing implicit constructor warnings.
   factory DrawBuffers._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static DrawBuffers internalCreateDrawBuffers() {
-    return new DrawBuffers._internalWrap();
-  }
 
-  factory DrawBuffers._internalWrap() {
-    return new DrawBuffers.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   DrawBuffers.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLDrawBuffers.COLOR_ATTACHMENT0_WEBGL')
   @DocsEditable()
   static const int COLOR_ATTACHMENT0_WEBGL = 0x8CE0;
@@ -1112,7 +955,7 @@
 
   @DomName('WebGLDrawBuffers.drawBuffersWEBGL')
   @DocsEditable()
-  void drawBuffersWebgl(List<int> buffers) => _blink.BlinkWebGLDrawBuffers.instance.drawBuffersWEBGL_Callback_1_(unwrap_jso(this), buffers);
+  void drawBuffersWebgl(List<int> buffers) => _blink.BlinkWebGLDrawBuffers.instance.drawBuffersWEBGL_Callback_1_(this, buffers);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1123,27 +966,61 @@
 
 
 @DocsEditable()
+@DomName('EXTsRGB')
+@Experimental() // untriaged
+class EXTsRgb extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory EXTsRgb._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  EXTsRgb.internal_() { }
+
+  @DomName('EXTsRGB.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210;
+
+  @DomName('EXTsRGB.SRGB8_ALPHA8_EXT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRGB8_ALPHA8_EXT = 0x8C43;
+
+  @DomName('EXTsRGB.SRGB_ALPHA_EXT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRGB_ALPHA_EXT = 0x8C42;
+
+  @DomName('EXTsRGB.SRGB_EXT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRGB_EXT = 0x8C40;
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('EXTBlendMinMax')
 @Experimental() // untriaged
 class ExtBlendMinMax extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ExtBlendMinMax._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ExtBlendMinMax internalCreateExtBlendMinMax() {
-    return new ExtBlendMinMax._internalWrap();
-  }
 
-  factory ExtBlendMinMax._internalWrap() {
-    return new ExtBlendMinMax.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ExtBlendMinMax.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('EXTBlendMinMax.MAX_EXT')
   @DocsEditable()
   @Experimental() // untriaged
@@ -1170,21 +1047,13 @@
   // To suppress missing implicit constructor warnings.
   factory ExtFragDepth._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ExtFragDepth internalCreateExtFragDepth() {
-    return new ExtFragDepth._internalWrap();
-  }
 
-  factory ExtFragDepth._internalWrap() {
-    return new ExtFragDepth.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ExtFragDepth.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1200,21 +1069,13 @@
   // To suppress missing implicit constructor warnings.
   factory ExtShaderTextureLod._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ExtShaderTextureLod internalCreateExtShaderTextureLod() {
-    return new ExtShaderTextureLod._internalWrap();
-  }
 
-  factory ExtShaderTextureLod._internalWrap() {
-    return new ExtShaderTextureLod.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ExtShaderTextureLod.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1231,21 +1092,13 @@
   // To suppress missing implicit constructor warnings.
   factory ExtTextureFilterAnisotropic._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ExtTextureFilterAnisotropic internalCreateExtTextureFilterAnisotropic() {
-    return new ExtTextureFilterAnisotropic._internalWrap();
-  }
 
-  factory ExtTextureFilterAnisotropic._internalWrap() {
-    return new ExtTextureFilterAnisotropic.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ExtTextureFilterAnisotropic.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('EXTTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT')
   @DocsEditable()
   static const int MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
@@ -1269,21 +1122,13 @@
   // To suppress missing implicit constructor warnings.
   factory Framebuffer._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Framebuffer internalCreateFramebuffer() {
-    return new Framebuffer._internalWrap();
-  }
 
-  factory Framebuffer._internalWrap() {
-    return new Framebuffer.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Framebuffer.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1300,28 +1145,20 @@
   // To suppress missing implicit constructor warnings.
   factory LoseContext._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static LoseContext internalCreateLoseContext() {
-    return new LoseContext._internalWrap();
-  }
 
-  factory LoseContext._internalWrap() {
-    return new LoseContext.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   LoseContext.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLLoseContext.loseContext')
   @DocsEditable()
-  void loseContext() => _blink.BlinkWebGLLoseContext.instance.loseContext_Callback_0_(unwrap_jso(this));
+  void loseContext() => _blink.BlinkWebGLLoseContext.instance.loseContext_Callback_0_(this);
   
   @DomName('WebGLLoseContext.restoreContext')
   @DocsEditable()
-  void restoreContext() => _blink.BlinkWebGLLoseContext.instance.restoreContext_Callback_0_(unwrap_jso(this));
+  void restoreContext() => _blink.BlinkWebGLLoseContext.instance.restoreContext_Callback_0_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1339,21 +1176,13 @@
   // To suppress missing implicit constructor warnings.
   factory OesElementIndexUint._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static OesElementIndexUint internalCreateOesElementIndexUint() {
-    return new OesElementIndexUint._internalWrap();
-  }
 
-  factory OesElementIndexUint._internalWrap() {
-    return new OesElementIndexUint.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OesElementIndexUint.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1370,21 +1199,13 @@
   // To suppress missing implicit constructor warnings.
   factory OesStandardDerivatives._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static OesStandardDerivatives internalCreateOesStandardDerivatives() {
-    return new OesStandardDerivatives._internalWrap();
-  }
 
-  factory OesStandardDerivatives._internalWrap() {
-    return new OesStandardDerivatives.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OesStandardDerivatives.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('OESStandardDerivatives.FRAGMENT_SHADER_DERIVATIVE_HINT_OES')
   @DocsEditable()
   static const int FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
@@ -1405,21 +1226,13 @@
   // To suppress missing implicit constructor warnings.
   factory OesTextureFloat._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static OesTextureFloat internalCreateOesTextureFloat() {
-    return new OesTextureFloat._internalWrap();
-  }
 
-  factory OesTextureFloat._internalWrap() {
-    return new OesTextureFloat.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OesTextureFloat.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1436,21 +1249,13 @@
   // To suppress missing implicit constructor warnings.
   factory OesTextureFloatLinear._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static OesTextureFloatLinear internalCreateOesTextureFloatLinear() {
-    return new OesTextureFloatLinear._internalWrap();
-  }
 
-  factory OesTextureFloatLinear._internalWrap() {
-    return new OesTextureFloatLinear.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OesTextureFloatLinear.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1467,21 +1272,13 @@
   // To suppress missing implicit constructor warnings.
   factory OesTextureHalfFloat._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static OesTextureHalfFloat internalCreateOesTextureHalfFloat() {
-    return new OesTextureHalfFloat._internalWrap();
-  }
 
-  factory OesTextureHalfFloat._internalWrap() {
-    return new OesTextureHalfFloat.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OesTextureHalfFloat.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('OESTextureHalfFloat.HALF_FLOAT_OES')
   @DocsEditable()
   static const int HALF_FLOAT_OES = 0x8D61;
@@ -1502,21 +1299,13 @@
   // To suppress missing implicit constructor warnings.
   factory OesTextureHalfFloatLinear._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static OesTextureHalfFloatLinear internalCreateOesTextureHalfFloatLinear() {
-    return new OesTextureHalfFloatLinear._internalWrap();
-  }
 
-  factory OesTextureHalfFloatLinear._internalWrap() {
-    return new OesTextureHalfFloatLinear.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OesTextureHalfFloatLinear.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1533,40 +1322,32 @@
   // To suppress missing implicit constructor warnings.
   factory OesVertexArrayObject._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static OesVertexArrayObject internalCreateOesVertexArrayObject() {
-    return new OesVertexArrayObject._internalWrap();
-  }
 
-  factory OesVertexArrayObject._internalWrap() {
-    return new OesVertexArrayObject.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   OesVertexArrayObject.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('OESVertexArrayObject.VERTEX_ARRAY_BINDING_OES')
   @DocsEditable()
   static const int VERTEX_ARRAY_BINDING_OES = 0x85B5;
 
   @DomName('OESVertexArrayObject.bindVertexArrayOES')
   @DocsEditable()
-  void bindVertexArray(VertexArrayObject arrayObject) => _blink.BlinkOESVertexArrayObject.instance.bindVertexArrayOES_Callback_1_(unwrap_jso(this), unwrap_jso(arrayObject));
+  void bindVertexArray(VertexArrayObjectOes arrayObject) => _blink.BlinkOESVertexArrayObject.instance.bindVertexArrayOES_Callback_1_(this, arrayObject);
   
   @DomName('OESVertexArrayObject.createVertexArrayOES')
   @DocsEditable()
-  VertexArrayObject createVertexArray() => wrap_jso(_blink.BlinkOESVertexArrayObject.instance.createVertexArrayOES_Callback_0_(unwrap_jso(this)));
+  VertexArrayObjectOes createVertexArray() => _blink.BlinkOESVertexArrayObject.instance.createVertexArrayOES_Callback_0_(this);
   
   @DomName('OESVertexArrayObject.deleteVertexArrayOES')
   @DocsEditable()
-  void deleteVertexArray(VertexArrayObject arrayObject) => _blink.BlinkOESVertexArrayObject.instance.deleteVertexArrayOES_Callback_1_(unwrap_jso(this), unwrap_jso(arrayObject));
+  void deleteVertexArray(VertexArrayObjectOes arrayObject) => _blink.BlinkOESVertexArrayObject.instance.deleteVertexArrayOES_Callback_1_(this, arrayObject);
   
   @DomName('OESVertexArrayObject.isVertexArrayOES')
   @DocsEditable()
-  bool isVertexArray(VertexArrayObject arrayObject) => _blink.BlinkOESVertexArrayObject.instance.isVertexArrayOES_Callback_1_(unwrap_jso(this), unwrap_jso(arrayObject));
+  bool isVertexArray(VertexArrayObjectOes arrayObject) => _blink.BlinkOESVertexArrayObject.instance.isVertexArrayOES_Callback_1_(this, arrayObject);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1583,20 +1364,34 @@
   // To suppress missing implicit constructor warnings.
   factory Program._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Program internalCreateProgram() {
-    return new Program._internalWrap();
-  }
 
-  factory Program._internalWrap() {
-    return new Program.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Program.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('WebGLQuery')
+@Experimental() // untriaged
+class Query extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory Query._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  Query.internal_() { }
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -1613,21 +1408,13 @@
   // To suppress missing implicit constructor warnings.
   factory Renderbuffer._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Renderbuffer internalCreateRenderbuffer() {
-    return new Renderbuffer._internalWrap();
-  }
 
-  factory Renderbuffer._internalWrap() {
-    return new Renderbuffer.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Renderbuffer.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -1643,21 +1430,13 @@
   // To suppress missing implicit constructor warnings.
   factory RenderingContext._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static RenderingContext internalCreateRenderingContext() {
-    return new RenderingContext._internalWrap();
-  }
 
-  factory RenderingContext._internalWrap() {
-    return new RenderingContext.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   RenderingContext.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
@@ -2854,698 +2633,761 @@
   @DomName('WebGLRenderingContext.canvas')
   @DocsEditable()
   @Experimental() // untriaged
-  CanvasElement get canvas => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.canvas_Getter_(unwrap_jso(this)));
+  CanvasElement get canvas => _blink.BlinkWebGLRenderingContext.instance.canvas_Getter_(this);
   
   @DomName('WebGLRenderingContext.drawingBufferHeight')
   @DocsEditable()
-  int get drawingBufferHeight => _blink.BlinkWebGLRenderingContext.instance.drawingBufferHeight_Getter_(unwrap_jso(this));
+  int get drawingBufferHeight => _blink.BlinkWebGLRenderingContext.instance.drawingBufferHeight_Getter_(this);
   
   @DomName('WebGLRenderingContext.drawingBufferWidth')
   @DocsEditable()
-  int get drawingBufferWidth => _blink.BlinkWebGLRenderingContext.instance.drawingBufferWidth_Getter_(unwrap_jso(this));
+  int get drawingBufferWidth => _blink.BlinkWebGLRenderingContext.instance.drawingBufferWidth_Getter_(this);
   
   @DomName('WebGLRenderingContext.activeTexture')
   @DocsEditable()
-  void activeTexture(int texture) => _blink.BlinkWebGLRenderingContext.instance.activeTexture_Callback_1_(unwrap_jso(this), texture);
+  void activeTexture(int texture) => _blink.BlinkWebGLRenderingContext.instance.activeTexture_Callback_1_(this, texture);
   
   @DomName('WebGLRenderingContext.attachShader')
   @DocsEditable()
-  void attachShader(Program program, Shader shader) => _blink.BlinkWebGLRenderingContext.instance.attachShader_Callback_2_(unwrap_jso(this), unwrap_jso(program), unwrap_jso(shader));
+  void attachShader(Program program, Shader shader) => _blink.BlinkWebGLRenderingContext.instance.attachShader_Callback_2_(this, program, shader);
   
   @DomName('WebGLRenderingContext.bindAttribLocation')
   @DocsEditable()
-  void bindAttribLocation(Program program, int index, String name) => _blink.BlinkWebGLRenderingContext.instance.bindAttribLocation_Callback_3_(unwrap_jso(this), unwrap_jso(program), index, name);
+  void bindAttribLocation(Program program, int index, String name) => _blink.BlinkWebGLRenderingContext.instance.bindAttribLocation_Callback_3_(this, program, index, name);
   
   @DomName('WebGLRenderingContext.bindBuffer')
   @DocsEditable()
-  void bindBuffer(int target, Buffer buffer) => _blink.BlinkWebGLRenderingContext.instance.bindBuffer_Callback_2_(unwrap_jso(this), target, unwrap_jso(buffer));
+  void bindBuffer(int target, Buffer buffer) => _blink.BlinkWebGLRenderingContext.instance.bindBuffer_Callback_2_(this, target, buffer);
   
   @DomName('WebGLRenderingContext.bindFramebuffer')
   @DocsEditable()
-  void bindFramebuffer(int target, Framebuffer framebuffer) => _blink.BlinkWebGLRenderingContext.instance.bindFramebuffer_Callback_2_(unwrap_jso(this), target, unwrap_jso(framebuffer));
+  void bindFramebuffer(int target, Framebuffer framebuffer) => _blink.BlinkWebGLRenderingContext.instance.bindFramebuffer_Callback_2_(this, target, framebuffer);
   
   @DomName('WebGLRenderingContext.bindRenderbuffer')
   @DocsEditable()
-  void bindRenderbuffer(int target, Renderbuffer renderbuffer) => _blink.BlinkWebGLRenderingContext.instance.bindRenderbuffer_Callback_2_(unwrap_jso(this), target, unwrap_jso(renderbuffer));
+  void bindRenderbuffer(int target, Renderbuffer renderbuffer) => _blink.BlinkWebGLRenderingContext.instance.bindRenderbuffer_Callback_2_(this, target, renderbuffer);
   
   @DomName('WebGLRenderingContext.bindTexture')
   @DocsEditable()
-  void bindTexture(int target, Texture texture) => _blink.BlinkWebGLRenderingContext.instance.bindTexture_Callback_2_(unwrap_jso(this), target, unwrap_jso(texture));
+  void bindTexture(int target, Texture texture) => _blink.BlinkWebGLRenderingContext.instance.bindTexture_Callback_2_(this, target, texture);
   
   @DomName('WebGLRenderingContext.blendColor')
   @DocsEditable()
-  void blendColor(num red, num green, num blue, num alpha) => _blink.BlinkWebGLRenderingContext.instance.blendColor_Callback_4_(unwrap_jso(this), red, green, blue, alpha);
+  void blendColor(num red, num green, num blue, num alpha) => _blink.BlinkWebGLRenderingContext.instance.blendColor_Callback_4_(this, red, green, blue, alpha);
   
   @DomName('WebGLRenderingContext.blendEquation')
   @DocsEditable()
-  void blendEquation(int mode) => _blink.BlinkWebGLRenderingContext.instance.blendEquation_Callback_1_(unwrap_jso(this), mode);
+  void blendEquation(int mode) => _blink.BlinkWebGLRenderingContext.instance.blendEquation_Callback_1_(this, mode);
   
   @DomName('WebGLRenderingContext.blendEquationSeparate')
   @DocsEditable()
-  void blendEquationSeparate(int modeRGB, int modeAlpha) => _blink.BlinkWebGLRenderingContext.instance.blendEquationSeparate_Callback_2_(unwrap_jso(this), modeRGB, modeAlpha);
+  void blendEquationSeparate(int modeRGB, int modeAlpha) => _blink.BlinkWebGLRenderingContext.instance.blendEquationSeparate_Callback_2_(this, modeRGB, modeAlpha);
   
   @DomName('WebGLRenderingContext.blendFunc')
   @DocsEditable()
-  void blendFunc(int sfactor, int dfactor) => _blink.BlinkWebGLRenderingContext.instance.blendFunc_Callback_2_(unwrap_jso(this), sfactor, dfactor);
+  void blendFunc(int sfactor, int dfactor) => _blink.BlinkWebGLRenderingContext.instance.blendFunc_Callback_2_(this, sfactor, dfactor);
   
   @DomName('WebGLRenderingContext.blendFuncSeparate')
   @DocsEditable()
-  void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) => _blink.BlinkWebGLRenderingContext.instance.blendFuncSeparate_Callback_4_(unwrap_jso(this), srcRGB, dstRGB, srcAlpha, dstAlpha);
-  
-  @DomName('WebGLRenderingContext.bufferByteData')
-  @DocsEditable()
-  void bufferByteData(int target, ByteBuffer data, int usage) => _blink.BlinkWebGLRenderingContext.instance.bufferData_Callback_3_(unwrap_jso(this), target, data, usage);
+  void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) => _blink.BlinkWebGLRenderingContext.instance.blendFuncSeparate_Callback_4_(this, srcRGB, dstRGB, srcAlpha, dstAlpha);
   
   void bufferData(int target, data_OR_size, int usage) {
     if ((usage is int) && (data_OR_size is int) && (target is int)) {
-      _blink.BlinkWebGLRenderingContext.instance.bufferData_Callback_3_(unwrap_jso(this), target, unwrap_jso(data_OR_size), usage);
+      _blink.BlinkWebGLRenderingContext.instance.bufferData_Callback_3_(this, target, data_OR_size, usage);
       return;
     }
     if ((usage is int) && (data_OR_size is TypedData) && (target is int)) {
-      _blink.BlinkWebGLRenderingContext.instance.bufferData_Callback_3_(unwrap_jso(this), target, unwrap_jso(data_OR_size), usage);
+      _blink.BlinkWebGLRenderingContext.instance.bufferData_Callback_3_(this, target, data_OR_size, usage);
       return;
     }
     if ((usage is int) && (data_OR_size is ByteBuffer || data_OR_size == null) && (target is int)) {
-      _blink.BlinkWebGLRenderingContext.instance.bufferData_Callback_3_(unwrap_jso(this), target, unwrap_jso(data_OR_size), usage);
+      _blink.BlinkWebGLRenderingContext.instance.bufferData_Callback_3_(this, target, data_OR_size, usage);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @DomName('WebGLRenderingContext.bufferDataTyped')
-  @DocsEditable()
-  void bufferDataTyped(int target, TypedData data, int usage) => _blink.BlinkWebGLRenderingContext.instance.bufferData_Callback_3_(unwrap_jso(this), target, unwrap_jso(data), usage);
-  
-  @DomName('WebGLRenderingContext.bufferSubByteData')
-  @DocsEditable()
-  void bufferSubByteData(int target, int offset, ByteBuffer data) => _blink.BlinkWebGLRenderingContext.instance.bufferSubData_Callback_3_(unwrap_jso(this), target, offset, data);
-  
   void bufferSubData(int target, int offset, data) {
     if ((data is TypedData) && (offset is int) && (target is int)) {
-      _blink.BlinkWebGLRenderingContext.instance.bufferSubData_Callback_3_(unwrap_jso(this), target, offset, unwrap_jso(data));
+      _blink.BlinkWebGLRenderingContext.instance.bufferSubData_Callback_3_(this, target, offset, data);
       return;
     }
     if ((data is ByteBuffer || data == null) && (offset is int) && (target is int)) {
-      _blink.BlinkWebGLRenderingContext.instance.bufferSubData_Callback_3_(unwrap_jso(this), target, offset, unwrap_jso(data));
+      _blink.BlinkWebGLRenderingContext.instance.bufferSubData_Callback_3_(this, target, offset, data);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @DomName('WebGLRenderingContext.bufferSubDataTyped')
-  @DocsEditable()
-  void bufferSubDataTyped(int target, int offset, TypedData data) => _blink.BlinkWebGLRenderingContext.instance.bufferSubData_Callback_3_(unwrap_jso(this), target, offset, unwrap_jso(data));
-  
   @DomName('WebGLRenderingContext.checkFramebufferStatus')
   @DocsEditable()
-  int checkFramebufferStatus(int target) => _blink.BlinkWebGLRenderingContext.instance.checkFramebufferStatus_Callback_1_(unwrap_jso(this), target);
+  int checkFramebufferStatus(int target) => _blink.BlinkWebGLRenderingContext.instance.checkFramebufferStatus_Callback_1_(this, target);
   
   @DomName('WebGLRenderingContext.clear')
   @DocsEditable()
-  void clear(int mask) => _blink.BlinkWebGLRenderingContext.instance.clear_Callback_1_(unwrap_jso(this), mask);
+  void clear(int mask) => _blink.BlinkWebGLRenderingContext.instance.clear_Callback_1_(this, mask);
   
   @DomName('WebGLRenderingContext.clearColor')
   @DocsEditable()
-  void clearColor(num red, num green, num blue, num alpha) => _blink.BlinkWebGLRenderingContext.instance.clearColor_Callback_4_(unwrap_jso(this), red, green, blue, alpha);
+  void clearColor(num red, num green, num blue, num alpha) => _blink.BlinkWebGLRenderingContext.instance.clearColor_Callback_4_(this, red, green, blue, alpha);
   
   @DomName('WebGLRenderingContext.clearDepth')
   @DocsEditable()
-  void clearDepth(num depth) => _blink.BlinkWebGLRenderingContext.instance.clearDepth_Callback_1_(unwrap_jso(this), depth);
+  void clearDepth(num depth) => _blink.BlinkWebGLRenderingContext.instance.clearDepth_Callback_1_(this, depth);
   
   @DomName('WebGLRenderingContext.clearStencil')
   @DocsEditable()
-  void clearStencil(int s) => _blink.BlinkWebGLRenderingContext.instance.clearStencil_Callback_1_(unwrap_jso(this), s);
+  void clearStencil(int s) => _blink.BlinkWebGLRenderingContext.instance.clearStencil_Callback_1_(this, s);
   
   @DomName('WebGLRenderingContext.colorMask')
   @DocsEditable()
-  void colorMask(bool red, bool green, bool blue, bool alpha) => _blink.BlinkWebGLRenderingContext.instance.colorMask_Callback_4_(unwrap_jso(this), red, green, blue, alpha);
+  void colorMask(bool red, bool green, bool blue, bool alpha) => _blink.BlinkWebGLRenderingContext.instance.colorMask_Callback_4_(this, red, green, blue, alpha);
   
   @DomName('WebGLRenderingContext.compileShader')
   @DocsEditable()
-  void compileShader(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.compileShader_Callback_1_(unwrap_jso(this), unwrap_jso(shader));
+  void compileShader(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.compileShader_Callback_1_(this, shader);
   
   @DomName('WebGLRenderingContext.compressedTexImage2D')
   @DocsEditable()
-  void compressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, TypedData data) => _blink.BlinkWebGLRenderingContext.instance.compressedTexImage2D_Callback_7_(unwrap_jso(this), target, level, internalformat, width, height, border, unwrap_jso(data));
+  void compressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, TypedData data) => _blink.BlinkWebGLRenderingContext.instance.compressedTexImage2D_Callback_7_(this, target, level, internalformat, width, height, border, data);
   
   @DomName('WebGLRenderingContext.compressedTexSubImage2D')
   @DocsEditable()
-  void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, TypedData data) => _blink.BlinkWebGLRenderingContext.instance.compressedTexSubImage2D_Callback_8_(unwrap_jso(this), target, level, xoffset, yoffset, width, height, format, unwrap_jso(data));
+  void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, TypedData data) => _blink.BlinkWebGLRenderingContext.instance.compressedTexSubImage2D_Callback_8_(this, target, level, xoffset, yoffset, width, height, format, data);
   
   @DomName('WebGLRenderingContext.copyTexImage2D')
   @DocsEditable()
-  void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) => _blink.BlinkWebGLRenderingContext.instance.copyTexImage2D_Callback_8_(unwrap_jso(this), target, level, internalformat, x, y, width, height, border);
+  void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) => _blink.BlinkWebGLRenderingContext.instance.copyTexImage2D_Callback_8_(this, target, level, internalformat, x, y, width, height, border);
   
   @DomName('WebGLRenderingContext.copyTexSubImage2D')
   @DocsEditable()
-  void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) => _blink.BlinkWebGLRenderingContext.instance.copyTexSubImage2D_Callback_8_(unwrap_jso(this), target, level, xoffset, yoffset, x, y, width, height);
+  void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) => _blink.BlinkWebGLRenderingContext.instance.copyTexSubImage2D_Callback_8_(this, target, level, xoffset, yoffset, x, y, width, height);
   
   @DomName('WebGLRenderingContext.createBuffer')
   @DocsEditable()
-  Buffer createBuffer() => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.createBuffer_Callback_0_(unwrap_jso(this)));
+  Buffer createBuffer() => _blink.BlinkWebGLRenderingContext.instance.createBuffer_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.createFramebuffer')
   @DocsEditable()
-  Framebuffer createFramebuffer() => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.createFramebuffer_Callback_0_(unwrap_jso(this)));
+  Framebuffer createFramebuffer() => _blink.BlinkWebGLRenderingContext.instance.createFramebuffer_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.createProgram')
   @DocsEditable()
-  Program createProgram() => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.createProgram_Callback_0_(unwrap_jso(this)));
+  Program createProgram() => _blink.BlinkWebGLRenderingContext.instance.createProgram_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.createRenderbuffer')
   @DocsEditable()
-  Renderbuffer createRenderbuffer() => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.createRenderbuffer_Callback_0_(unwrap_jso(this)));
+  Renderbuffer createRenderbuffer() => _blink.BlinkWebGLRenderingContext.instance.createRenderbuffer_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.createShader')
   @DocsEditable()
-  Shader createShader(int type) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.createShader_Callback_1_(unwrap_jso(this), type));
+  Shader createShader(int type) => _blink.BlinkWebGLRenderingContext.instance.createShader_Callback_1_(this, type);
   
   @DomName('WebGLRenderingContext.createTexture')
   @DocsEditable()
-  Texture createTexture() => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.createTexture_Callback_0_(unwrap_jso(this)));
+  Texture createTexture() => _blink.BlinkWebGLRenderingContext.instance.createTexture_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.cullFace')
   @DocsEditable()
-  void cullFace(int mode) => _blink.BlinkWebGLRenderingContext.instance.cullFace_Callback_1_(unwrap_jso(this), mode);
+  void cullFace(int mode) => _blink.BlinkWebGLRenderingContext.instance.cullFace_Callback_1_(this, mode);
   
   @DomName('WebGLRenderingContext.deleteBuffer')
   @DocsEditable()
-  void deleteBuffer(Buffer buffer) => _blink.BlinkWebGLRenderingContext.instance.deleteBuffer_Callback_1_(unwrap_jso(this), unwrap_jso(buffer));
+  void deleteBuffer(Buffer buffer) => _blink.BlinkWebGLRenderingContext.instance.deleteBuffer_Callback_1_(this, buffer);
   
   @DomName('WebGLRenderingContext.deleteFramebuffer')
   @DocsEditable()
-  void deleteFramebuffer(Framebuffer framebuffer) => _blink.BlinkWebGLRenderingContext.instance.deleteFramebuffer_Callback_1_(unwrap_jso(this), unwrap_jso(framebuffer));
+  void deleteFramebuffer(Framebuffer framebuffer) => _blink.BlinkWebGLRenderingContext.instance.deleteFramebuffer_Callback_1_(this, framebuffer);
   
   @DomName('WebGLRenderingContext.deleteProgram')
   @DocsEditable()
-  void deleteProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.deleteProgram_Callback_1_(unwrap_jso(this), unwrap_jso(program));
+  void deleteProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.deleteProgram_Callback_1_(this, program);
   
   @DomName('WebGLRenderingContext.deleteRenderbuffer')
   @DocsEditable()
-  void deleteRenderbuffer(Renderbuffer renderbuffer) => _blink.BlinkWebGLRenderingContext.instance.deleteRenderbuffer_Callback_1_(unwrap_jso(this), unwrap_jso(renderbuffer));
+  void deleteRenderbuffer(Renderbuffer renderbuffer) => _blink.BlinkWebGLRenderingContext.instance.deleteRenderbuffer_Callback_1_(this, renderbuffer);
   
   @DomName('WebGLRenderingContext.deleteShader')
   @DocsEditable()
-  void deleteShader(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.deleteShader_Callback_1_(unwrap_jso(this), unwrap_jso(shader));
+  void deleteShader(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.deleteShader_Callback_1_(this, shader);
   
   @DomName('WebGLRenderingContext.deleteTexture')
   @DocsEditable()
-  void deleteTexture(Texture texture) => _blink.BlinkWebGLRenderingContext.instance.deleteTexture_Callback_1_(unwrap_jso(this), unwrap_jso(texture));
+  void deleteTexture(Texture texture) => _blink.BlinkWebGLRenderingContext.instance.deleteTexture_Callback_1_(this, texture);
   
   @DomName('WebGLRenderingContext.depthFunc')
   @DocsEditable()
-  void depthFunc(int func) => _blink.BlinkWebGLRenderingContext.instance.depthFunc_Callback_1_(unwrap_jso(this), func);
+  void depthFunc(int func) => _blink.BlinkWebGLRenderingContext.instance.depthFunc_Callback_1_(this, func);
   
   @DomName('WebGLRenderingContext.depthMask')
   @DocsEditable()
-  void depthMask(bool flag) => _blink.BlinkWebGLRenderingContext.instance.depthMask_Callback_1_(unwrap_jso(this), flag);
+  void depthMask(bool flag) => _blink.BlinkWebGLRenderingContext.instance.depthMask_Callback_1_(this, flag);
   
   @DomName('WebGLRenderingContext.depthRange')
   @DocsEditable()
-  void depthRange(num zNear, num zFar) => _blink.BlinkWebGLRenderingContext.instance.depthRange_Callback_2_(unwrap_jso(this), zNear, zFar);
+  void depthRange(num zNear, num zFar) => _blink.BlinkWebGLRenderingContext.instance.depthRange_Callback_2_(this, zNear, zFar);
   
   @DomName('WebGLRenderingContext.detachShader')
   @DocsEditable()
-  void detachShader(Program program, Shader shader) => _blink.BlinkWebGLRenderingContext.instance.detachShader_Callback_2_(unwrap_jso(this), unwrap_jso(program), unwrap_jso(shader));
+  void detachShader(Program program, Shader shader) => _blink.BlinkWebGLRenderingContext.instance.detachShader_Callback_2_(this, program, shader);
   
   @DomName('WebGLRenderingContext.disable')
   @DocsEditable()
-  void disable(int cap) => _blink.BlinkWebGLRenderingContext.instance.disable_Callback_1_(unwrap_jso(this), cap);
+  void disable(int cap) => _blink.BlinkWebGLRenderingContext.instance.disable_Callback_1_(this, cap);
   
   @DomName('WebGLRenderingContext.disableVertexAttribArray')
   @DocsEditable()
-  void disableVertexAttribArray(int index) => _blink.BlinkWebGLRenderingContext.instance.disableVertexAttribArray_Callback_1_(unwrap_jso(this), index);
+  void disableVertexAttribArray(int index) => _blink.BlinkWebGLRenderingContext.instance.disableVertexAttribArray_Callback_1_(this, index);
   
   @DomName('WebGLRenderingContext.drawArrays')
   @DocsEditable()
-  void drawArrays(int mode, int first, int count) => _blink.BlinkWebGLRenderingContext.instance.drawArrays_Callback_3_(unwrap_jso(this), mode, first, count);
+  void drawArrays(int mode, int first, int count) => _blink.BlinkWebGLRenderingContext.instance.drawArrays_Callback_3_(this, mode, first, count);
   
   @DomName('WebGLRenderingContext.drawElements')
   @DocsEditable()
-  void drawElements(int mode, int count, int type, int offset) => _blink.BlinkWebGLRenderingContext.instance.drawElements_Callback_4_(unwrap_jso(this), mode, count, type, offset);
+  void drawElements(int mode, int count, int type, int offset) => _blink.BlinkWebGLRenderingContext.instance.drawElements_Callback_4_(this, mode, count, type, offset);
   
   @DomName('WebGLRenderingContext.enable')
   @DocsEditable()
-  void enable(int cap) => _blink.BlinkWebGLRenderingContext.instance.enable_Callback_1_(unwrap_jso(this), cap);
+  void enable(int cap) => _blink.BlinkWebGLRenderingContext.instance.enable_Callback_1_(this, cap);
   
   @DomName('WebGLRenderingContext.enableVertexAttribArray')
   @DocsEditable()
-  void enableVertexAttribArray(int index) => _blink.BlinkWebGLRenderingContext.instance.enableVertexAttribArray_Callback_1_(unwrap_jso(this), index);
+  void enableVertexAttribArray(int index) => _blink.BlinkWebGLRenderingContext.instance.enableVertexAttribArray_Callback_1_(this, index);
   
   @DomName('WebGLRenderingContext.finish')
   @DocsEditable()
-  void finish() => _blink.BlinkWebGLRenderingContext.instance.finish_Callback_0_(unwrap_jso(this));
+  void finish() => _blink.BlinkWebGLRenderingContext.instance.finish_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.flush')
   @DocsEditable()
-  void flush() => _blink.BlinkWebGLRenderingContext.instance.flush_Callback_0_(unwrap_jso(this));
+  void flush() => _blink.BlinkWebGLRenderingContext.instance.flush_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.framebufferRenderbuffer')
   @DocsEditable()
-  void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, Renderbuffer renderbuffer) => _blink.BlinkWebGLRenderingContext.instance.framebufferRenderbuffer_Callback_4_(unwrap_jso(this), target, attachment, renderbuffertarget, unwrap_jso(renderbuffer));
+  void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, Renderbuffer renderbuffer) => _blink.BlinkWebGLRenderingContext.instance.framebufferRenderbuffer_Callback_4_(this, target, attachment, renderbuffertarget, renderbuffer);
   
   @DomName('WebGLRenderingContext.framebufferTexture2D')
   @DocsEditable()
-  void framebufferTexture2D(int target, int attachment, int textarget, Texture texture, int level) => _blink.BlinkWebGLRenderingContext.instance.framebufferTexture2D_Callback_5_(unwrap_jso(this), target, attachment, textarget, unwrap_jso(texture), level);
+  void framebufferTexture2D(int target, int attachment, int textarget, Texture texture, int level) => _blink.BlinkWebGLRenderingContext.instance.framebufferTexture2D_Callback_5_(this, target, attachment, textarget, texture, level);
   
   @DomName('WebGLRenderingContext.frontFace')
   @DocsEditable()
-  void frontFace(int mode) => _blink.BlinkWebGLRenderingContext.instance.frontFace_Callback_1_(unwrap_jso(this), mode);
+  void frontFace(int mode) => _blink.BlinkWebGLRenderingContext.instance.frontFace_Callback_1_(this, mode);
   
   @DomName('WebGLRenderingContext.generateMipmap')
   @DocsEditable()
-  void generateMipmap(int target) => _blink.BlinkWebGLRenderingContext.instance.generateMipmap_Callback_1_(unwrap_jso(this), target);
+  void generateMipmap(int target) => _blink.BlinkWebGLRenderingContext.instance.generateMipmap_Callback_1_(this, target);
   
   @DomName('WebGLRenderingContext.getActiveAttrib')
   @DocsEditable()
-  ActiveInfo getActiveAttrib(Program program, int index) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getActiveAttrib_Callback_2_(unwrap_jso(this), unwrap_jso(program), index));
+  ActiveInfo getActiveAttrib(Program program, int index) => _blink.BlinkWebGLRenderingContext.instance.getActiveAttrib_Callback_2_(this, program, index);
   
   @DomName('WebGLRenderingContext.getActiveUniform')
   @DocsEditable()
-  ActiveInfo getActiveUniform(Program program, int index) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getActiveUniform_Callback_2_(unwrap_jso(this), unwrap_jso(program), index));
+  ActiveInfo getActiveUniform(Program program, int index) => _blink.BlinkWebGLRenderingContext.instance.getActiveUniform_Callback_2_(this, program, index);
   
   @DomName('WebGLRenderingContext.getAttachedShaders')
   @DocsEditable()
-  List<Shader> getAttachedShaders(Program program) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getAttachedShaders_Callback_1_(unwrap_jso(this), unwrap_jso(program)));
+  List<Shader> getAttachedShaders(Program program) => _blink.BlinkWebGLRenderingContext.instance.getAttachedShaders_Callback_1_(this, program);
   
   @DomName('WebGLRenderingContext.getAttribLocation')
   @DocsEditable()
-  int getAttribLocation(Program program, String name) => _blink.BlinkWebGLRenderingContext.instance.getAttribLocation_Callback_2_(unwrap_jso(this), unwrap_jso(program), name);
+  int getAttribLocation(Program program, String name) => _blink.BlinkWebGLRenderingContext.instance.getAttribLocation_Callback_2_(this, program, name);
   
   @DomName('WebGLRenderingContext.getBufferParameter')
   @DocsEditable()
-  Object getBufferParameter(int target, int pname) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getBufferParameter_Callback_2_(unwrap_jso(this), target, pname));
+  Object getBufferParameter(int target, int pname) => (_blink.BlinkWebGLRenderingContext.instance.getBufferParameter_Callback_2_(this, target, pname));
   
   @DomName('WebGLRenderingContext.getContextAttributes')
   @DocsEditable()
-  ContextAttributes getContextAttributes() => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getContextAttributes_Callback_0_(unwrap_jso(this)));
+   getContextAttributes() => convertNativeDictionaryToDartDictionary((_blink.BlinkWebGLRenderingContext.instance.getContextAttributes_Callback_0_(this)));
   
   @DomName('WebGLRenderingContext.getError')
   @DocsEditable()
-  int getError() => _blink.BlinkWebGLRenderingContext.instance.getError_Callback_0_(unwrap_jso(this));
+  int getError() => _blink.BlinkWebGLRenderingContext.instance.getError_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.getExtension')
   @DocsEditable()
-  Object getExtension(String name) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getExtension_Callback_1_(unwrap_jso(this), name));
+  Object getExtension(String name) => (_blink.BlinkWebGLRenderingContext.instance.getExtension_Callback_1_(this, name));
   
   @DomName('WebGLRenderingContext.getFramebufferAttachmentParameter')
   @DocsEditable()
-  Object getFramebufferAttachmentParameter(int target, int attachment, int pname) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getFramebufferAttachmentParameter_Callback_3_(unwrap_jso(this), target, attachment, pname));
+  Object getFramebufferAttachmentParameter(int target, int attachment, int pname) => (_blink.BlinkWebGLRenderingContext.instance.getFramebufferAttachmentParameter_Callback_3_(this, target, attachment, pname));
   
   @DomName('WebGLRenderingContext.getParameter')
   @DocsEditable()
-  Object getParameter(int pname) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getParameter_Callback_1_(unwrap_jso(this), pname));
+  Object getParameter(int pname) => (_blink.BlinkWebGLRenderingContext.instance.getParameter_Callback_1_(this, pname));
   
   @DomName('WebGLRenderingContext.getProgramInfoLog')
   @DocsEditable()
-  String getProgramInfoLog(Program program) => _blink.BlinkWebGLRenderingContext.instance.getProgramInfoLog_Callback_1_(unwrap_jso(this), unwrap_jso(program));
+  String getProgramInfoLog(Program program) => _blink.BlinkWebGLRenderingContext.instance.getProgramInfoLog_Callback_1_(this, program);
   
   @DomName('WebGLRenderingContext.getProgramParameter')
   @DocsEditable()
-  Object getProgramParameter(Program program, int pname) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getProgramParameter_Callback_2_(unwrap_jso(this), unwrap_jso(program), pname));
+  Object getProgramParameter(Program program, int pname) => (_blink.BlinkWebGLRenderingContext.instance.getProgramParameter_Callback_2_(this, program, pname));
   
   @DomName('WebGLRenderingContext.getRenderbufferParameter')
   @DocsEditable()
-  Object getRenderbufferParameter(int target, int pname) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getRenderbufferParameter_Callback_2_(unwrap_jso(this), target, pname));
+  Object getRenderbufferParameter(int target, int pname) => (_blink.BlinkWebGLRenderingContext.instance.getRenderbufferParameter_Callback_2_(this, target, pname));
   
   @DomName('WebGLRenderingContext.getShaderInfoLog')
   @DocsEditable()
-  String getShaderInfoLog(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.getShaderInfoLog_Callback_1_(unwrap_jso(this), unwrap_jso(shader));
+  String getShaderInfoLog(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.getShaderInfoLog_Callback_1_(this, shader);
   
   @DomName('WebGLRenderingContext.getShaderParameter')
   @DocsEditable()
-  Object getShaderParameter(Shader shader, int pname) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getShaderParameter_Callback_2_(unwrap_jso(this), unwrap_jso(shader), pname));
+  Object getShaderParameter(Shader shader, int pname) => (_blink.BlinkWebGLRenderingContext.instance.getShaderParameter_Callback_2_(this, shader, pname));
   
   @DomName('WebGLRenderingContext.getShaderPrecisionFormat')
   @DocsEditable()
-  ShaderPrecisionFormat getShaderPrecisionFormat(int shadertype, int precisiontype) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getShaderPrecisionFormat_Callback_2_(unwrap_jso(this), shadertype, precisiontype));
+  ShaderPrecisionFormat getShaderPrecisionFormat(int shadertype, int precisiontype) => _blink.BlinkWebGLRenderingContext.instance.getShaderPrecisionFormat_Callback_2_(this, shadertype, precisiontype);
   
   @DomName('WebGLRenderingContext.getShaderSource')
   @DocsEditable()
-  String getShaderSource(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.getShaderSource_Callback_1_(unwrap_jso(this), unwrap_jso(shader));
+  String getShaderSource(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.getShaderSource_Callback_1_(this, shader);
   
   @DomName('WebGLRenderingContext.getSupportedExtensions')
   @DocsEditable()
-  List<String> getSupportedExtensions() => _blink.BlinkWebGLRenderingContext.instance.getSupportedExtensions_Callback_0_(unwrap_jso(this));
+  List<String> getSupportedExtensions() => _blink.BlinkWebGLRenderingContext.instance.getSupportedExtensions_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.getTexParameter')
   @DocsEditable()
-  Object getTexParameter(int target, int pname) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getTexParameter_Callback_2_(unwrap_jso(this), target, pname));
+  Object getTexParameter(int target, int pname) => (_blink.BlinkWebGLRenderingContext.instance.getTexParameter_Callback_2_(this, target, pname));
   
   @DomName('WebGLRenderingContext.getUniform')
   @DocsEditable()
-  Object getUniform(Program program, UniformLocation location) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getUniform_Callback_2_(unwrap_jso(this), unwrap_jso(program), unwrap_jso(location)));
+  Object getUniform(Program program, UniformLocation location) => (_blink.BlinkWebGLRenderingContext.instance.getUniform_Callback_2_(this, program, location));
   
   @DomName('WebGLRenderingContext.getUniformLocation')
   @DocsEditable()
-  UniformLocation getUniformLocation(Program program, String name) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getUniformLocation_Callback_2_(unwrap_jso(this), unwrap_jso(program), name));
+  UniformLocation getUniformLocation(Program program, String name) => _blink.BlinkWebGLRenderingContext.instance.getUniformLocation_Callback_2_(this, program, name);
   
   @DomName('WebGLRenderingContext.getVertexAttrib')
   @DocsEditable()
-  Object getVertexAttrib(int index, int pname) => wrap_jso(_blink.BlinkWebGLRenderingContext.instance.getVertexAttrib_Callback_2_(unwrap_jso(this), index, pname));
+  Object getVertexAttrib(int index, int pname) => (_blink.BlinkWebGLRenderingContext.instance.getVertexAttrib_Callback_2_(this, index, pname));
   
   @DomName('WebGLRenderingContext.getVertexAttribOffset')
   @DocsEditable()
-  int getVertexAttribOffset(int index, int pname) => _blink.BlinkWebGLRenderingContext.instance.getVertexAttribOffset_Callback_2_(unwrap_jso(this), index, pname);
+  int getVertexAttribOffset(int index, int pname) => _blink.BlinkWebGLRenderingContext.instance.getVertexAttribOffset_Callback_2_(this, index, pname);
   
   @DomName('WebGLRenderingContext.hint')
   @DocsEditable()
-  void hint(int target, int mode) => _blink.BlinkWebGLRenderingContext.instance.hint_Callback_2_(unwrap_jso(this), target, mode);
+  void hint(int target, int mode) => _blink.BlinkWebGLRenderingContext.instance.hint_Callback_2_(this, target, mode);
   
   @DomName('WebGLRenderingContext.isBuffer')
   @DocsEditable()
-  bool isBuffer(Buffer buffer) => _blink.BlinkWebGLRenderingContext.instance.isBuffer_Callback_1_(unwrap_jso(this), unwrap_jso(buffer));
+  bool isBuffer(Buffer buffer) => _blink.BlinkWebGLRenderingContext.instance.isBuffer_Callback_1_(this, buffer);
   
   @DomName('WebGLRenderingContext.isContextLost')
   @DocsEditable()
-  bool isContextLost() => _blink.BlinkWebGLRenderingContext.instance.isContextLost_Callback_0_(unwrap_jso(this));
+  bool isContextLost() => _blink.BlinkWebGLRenderingContext.instance.isContextLost_Callback_0_(this);
   
   @DomName('WebGLRenderingContext.isEnabled')
   @DocsEditable()
-  bool isEnabled(int cap) => _blink.BlinkWebGLRenderingContext.instance.isEnabled_Callback_1_(unwrap_jso(this), cap);
+  bool isEnabled(int cap) => _blink.BlinkWebGLRenderingContext.instance.isEnabled_Callback_1_(this, cap);
   
   @DomName('WebGLRenderingContext.isFramebuffer')
   @DocsEditable()
-  bool isFramebuffer(Framebuffer framebuffer) => _blink.BlinkWebGLRenderingContext.instance.isFramebuffer_Callback_1_(unwrap_jso(this), unwrap_jso(framebuffer));
+  bool isFramebuffer(Framebuffer framebuffer) => _blink.BlinkWebGLRenderingContext.instance.isFramebuffer_Callback_1_(this, framebuffer);
   
   @DomName('WebGLRenderingContext.isProgram')
   @DocsEditable()
-  bool isProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.isProgram_Callback_1_(unwrap_jso(this), unwrap_jso(program));
+  bool isProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.isProgram_Callback_1_(this, program);
   
   @DomName('WebGLRenderingContext.isRenderbuffer')
   @DocsEditable()
-  bool isRenderbuffer(Renderbuffer renderbuffer) => _blink.BlinkWebGLRenderingContext.instance.isRenderbuffer_Callback_1_(unwrap_jso(this), unwrap_jso(renderbuffer));
+  bool isRenderbuffer(Renderbuffer renderbuffer) => _blink.BlinkWebGLRenderingContext.instance.isRenderbuffer_Callback_1_(this, renderbuffer);
   
   @DomName('WebGLRenderingContext.isShader')
   @DocsEditable()
-  bool isShader(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.isShader_Callback_1_(unwrap_jso(this), unwrap_jso(shader));
+  bool isShader(Shader shader) => _blink.BlinkWebGLRenderingContext.instance.isShader_Callback_1_(this, shader);
   
   @DomName('WebGLRenderingContext.isTexture')
   @DocsEditable()
-  bool isTexture(Texture texture) => _blink.BlinkWebGLRenderingContext.instance.isTexture_Callback_1_(unwrap_jso(this), unwrap_jso(texture));
+  bool isTexture(Texture texture) => _blink.BlinkWebGLRenderingContext.instance.isTexture_Callback_1_(this, texture);
   
   @DomName('WebGLRenderingContext.lineWidth')
   @DocsEditable()
-  void lineWidth(num width) => _blink.BlinkWebGLRenderingContext.instance.lineWidth_Callback_1_(unwrap_jso(this), width);
+  void lineWidth(num width) => _blink.BlinkWebGLRenderingContext.instance.lineWidth_Callback_1_(this, width);
   
   @DomName('WebGLRenderingContext.linkProgram')
   @DocsEditable()
-  void linkProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.linkProgram_Callback_1_(unwrap_jso(this), unwrap_jso(program));
+  void linkProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.linkProgram_Callback_1_(this, program);
   
   @DomName('WebGLRenderingContext.pixelStorei')
   @DocsEditable()
-  void pixelStorei(int pname, int param) => _blink.BlinkWebGLRenderingContext.instance.pixelStorei_Callback_2_(unwrap_jso(this), pname, param);
+  void pixelStorei(int pname, int param) => _blink.BlinkWebGLRenderingContext.instance.pixelStorei_Callback_2_(this, pname, param);
   
   @DomName('WebGLRenderingContext.polygonOffset')
   @DocsEditable()
-  void polygonOffset(num factor, num units) => _blink.BlinkWebGLRenderingContext.instance.polygonOffset_Callback_2_(unwrap_jso(this), factor, units);
+  void polygonOffset(num factor, num units) => _blink.BlinkWebGLRenderingContext.instance.polygonOffset_Callback_2_(this, factor, units);
   
   @DomName('WebGLRenderingContext.readPixels')
   @DocsEditable()
-  void readPixels(int x, int y, int width, int height, int format, int type, TypedData pixels) => _blink.BlinkWebGLRenderingContext.instance.readPixels_Callback_7_(unwrap_jso(this), x, y, width, height, format, type, unwrap_jso(pixels));
+  void readPixels(int x, int y, int width, int height, int format, int type, TypedData pixels) => _blink.BlinkWebGLRenderingContext.instance.readPixels_Callback_7_(this, x, y, width, height, format, type, pixels);
   
   @DomName('WebGLRenderingContext.renderbufferStorage')
   @DocsEditable()
-  void renderbufferStorage(int target, int internalformat, int width, int height) => _blink.BlinkWebGLRenderingContext.instance.renderbufferStorage_Callback_4_(unwrap_jso(this), target, internalformat, width, height);
+  void renderbufferStorage(int target, int internalformat, int width, int height) => _blink.BlinkWebGLRenderingContext.instance.renderbufferStorage_Callback_4_(this, target, internalformat, width, height);
   
   @DomName('WebGLRenderingContext.sampleCoverage')
   @DocsEditable()
-  void sampleCoverage(num value, bool invert) => _blink.BlinkWebGLRenderingContext.instance.sampleCoverage_Callback_2_(unwrap_jso(this), value, invert);
+  void sampleCoverage(num value, bool invert) => _blink.BlinkWebGLRenderingContext.instance.sampleCoverage_Callback_2_(this, value, invert);
   
   @DomName('WebGLRenderingContext.scissor')
   @DocsEditable()
-  void scissor(int x, int y, int width, int height) => _blink.BlinkWebGLRenderingContext.instance.scissor_Callback_4_(unwrap_jso(this), x, y, width, height);
+  void scissor(int x, int y, int width, int height) => _blink.BlinkWebGLRenderingContext.instance.scissor_Callback_4_(this, x, y, width, height);
   
   @DomName('WebGLRenderingContext.shaderSource')
   @DocsEditable()
-  void shaderSource(Shader shader, String string) => _blink.BlinkWebGLRenderingContext.instance.shaderSource_Callback_2_(unwrap_jso(this), unwrap_jso(shader), string);
+  void shaderSource(Shader shader, String string) => _blink.BlinkWebGLRenderingContext.instance.shaderSource_Callback_2_(this, shader, string);
   
   @DomName('WebGLRenderingContext.stencilFunc')
   @DocsEditable()
-  void stencilFunc(int func, int ref, int mask) => _blink.BlinkWebGLRenderingContext.instance.stencilFunc_Callback_3_(unwrap_jso(this), func, ref, mask);
+  void stencilFunc(int func, int ref, int mask) => _blink.BlinkWebGLRenderingContext.instance.stencilFunc_Callback_3_(this, func, ref, mask);
   
   @DomName('WebGLRenderingContext.stencilFuncSeparate')
   @DocsEditable()
-  void stencilFuncSeparate(int face, int func, int ref, int mask) => _blink.BlinkWebGLRenderingContext.instance.stencilFuncSeparate_Callback_4_(unwrap_jso(this), face, func, ref, mask);
+  void stencilFuncSeparate(int face, int func, int ref, int mask) => _blink.BlinkWebGLRenderingContext.instance.stencilFuncSeparate_Callback_4_(this, face, func, ref, mask);
   
   @DomName('WebGLRenderingContext.stencilMask')
   @DocsEditable()
-  void stencilMask(int mask) => _blink.BlinkWebGLRenderingContext.instance.stencilMask_Callback_1_(unwrap_jso(this), mask);
+  void stencilMask(int mask) => _blink.BlinkWebGLRenderingContext.instance.stencilMask_Callback_1_(this, mask);
   
   @DomName('WebGLRenderingContext.stencilMaskSeparate')
   @DocsEditable()
-  void stencilMaskSeparate(int face, int mask) => _blink.BlinkWebGLRenderingContext.instance.stencilMaskSeparate_Callback_2_(unwrap_jso(this), face, mask);
+  void stencilMaskSeparate(int face, int mask) => _blink.BlinkWebGLRenderingContext.instance.stencilMaskSeparate_Callback_2_(this, face, mask);
   
   @DomName('WebGLRenderingContext.stencilOp')
   @DocsEditable()
-  void stencilOp(int fail, int zfail, int zpass) => _blink.BlinkWebGLRenderingContext.instance.stencilOp_Callback_3_(unwrap_jso(this), fail, zfail, zpass);
+  void stencilOp(int fail, int zfail, int zpass) => _blink.BlinkWebGLRenderingContext.instance.stencilOp_Callback_3_(this, fail, zfail, zpass);
   
   @DomName('WebGLRenderingContext.stencilOpSeparate')
   @DocsEditable()
-  void stencilOpSeparate(int face, int fail, int zfail, int zpass) => _blink.BlinkWebGLRenderingContext.instance.stencilOpSeparate_Callback_4_(unwrap_jso(this), face, fail, zfail, zpass);
+  void stencilOpSeparate(int face, int fail, int zfail, int zpass) => _blink.BlinkWebGLRenderingContext.instance.stencilOpSeparate_Callback_4_(this, face, fail, zfail, zpass);
   
   void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) {
     if ((pixels is TypedData || pixels == null) && (type is int) && (format is int) && (border_OR_canvas_OR_image_OR_pixels_OR_video is int) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int)) {
-      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_9_(unwrap_jso(this), target, level, internalformat, format_OR_width, height_OR_type, unwrap_jso(border_OR_canvas_OR_image_OR_pixels_OR_video), format, type, unwrap_jso(pixels));
+      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_9_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
       return;
     }
     if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
-      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(unwrap_jso(this), target, level, internalformat, format_OR_width, height_OR_type, unwrap_jso(border_OR_canvas_OR_image_OR_pixels_OR_video));
+      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
       return;
     }
     if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
-      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(unwrap_jso(this), target, level, internalformat, format_OR_width, height_OR_type, unwrap_jso(border_OR_canvas_OR_image_OR_pixels_OR_video));
+      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
       return;
     }
     if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
-      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(unwrap_jso(this), target, level, internalformat, format_OR_width, height_OR_type, unwrap_jso(border_OR_canvas_OR_image_OR_pixels_OR_video));
+      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
       return;
     }
     if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
-      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(unwrap_jso(this), target, level, internalformat, format_OR_width, height_OR_type, unwrap_jso(border_OR_canvas_OR_image_OR_pixels_OR_video));
+      _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @DomName('WebGLRenderingContext.texImage2DCanvas')
-  @DocsEditable()
-  void texImage2DCanvas(int target, int level, int internalformat, int format, int type, CanvasElement canvas) => _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(unwrap_jso(this), target, level, internalformat, format, type, unwrap_jso(canvas));
-  
-  @DomName('WebGLRenderingContext.texImage2DImage')
-  @DocsEditable()
-  void texImage2DImage(int target, int level, int internalformat, int format, int type, ImageElement image) => _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(unwrap_jso(this), target, level, internalformat, format, type, unwrap_jso(image));
-  
-  @DomName('WebGLRenderingContext.texImage2DImageData')
-  @DocsEditable()
-  void texImage2DImageData(int target, int level, int internalformat, int format, int type, ImageData pixels) => _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(unwrap_jso(this), target, level, internalformat, format, type, unwrap_jso(pixels));
-  
-  @DomName('WebGLRenderingContext.texImage2DVideo')
-  @DocsEditable()
-  void texImage2DVideo(int target, int level, int internalformat, int format, int type, VideoElement video) => _blink.BlinkWebGLRenderingContext.instance.texImage2D_Callback_6_(unwrap_jso(this), target, level, internalformat, format, type, unwrap_jso(video));
-  
   @DomName('WebGLRenderingContext.texParameterf')
   @DocsEditable()
-  void texParameterf(int target, int pname, num param) => _blink.BlinkWebGLRenderingContext.instance.texParameterf_Callback_3_(unwrap_jso(this), target, pname, param);
+  void texParameterf(int target, int pname, num param) => _blink.BlinkWebGLRenderingContext.instance.texParameterf_Callback_3_(this, target, pname, param);
   
   @DomName('WebGLRenderingContext.texParameteri')
   @DocsEditable()
-  void texParameteri(int target, int pname, int param) => _blink.BlinkWebGLRenderingContext.instance.texParameteri_Callback_3_(unwrap_jso(this), target, pname, param);
+  void texParameteri(int target, int pname, int param) => _blink.BlinkWebGLRenderingContext.instance.texParameteri_Callback_3_(this, target, pname, param);
   
   void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, TypedData pixels]) {
     if ((pixels is TypedData || pixels == null) && (type is int) && (canvas_OR_format_OR_image_OR_pixels_OR_video is int) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int)) {
-      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_9_(unwrap_jso(this), target, level, xoffset, yoffset, format_OR_width, height_OR_type, unwrap_jso(canvas_OR_format_OR_image_OR_pixels_OR_video), type, unwrap_jso(pixels));
+      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_9_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
       return;
     }
     if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && type == null && pixels == null) {
-      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(unwrap_jso(this), target, level, xoffset, yoffset, format_OR_width, height_OR_type, unwrap_jso(canvas_OR_format_OR_image_OR_pixels_OR_video));
+      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
       return;
     }
     if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && type == null && pixels == null) {
-      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(unwrap_jso(this), target, level, xoffset, yoffset, format_OR_width, height_OR_type, unwrap_jso(canvas_OR_format_OR_image_OR_pixels_OR_video));
+      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
       return;
     }
     if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && type == null && pixels == null) {
-      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(unwrap_jso(this), target, level, xoffset, yoffset, format_OR_width, height_OR_type, unwrap_jso(canvas_OR_format_OR_image_OR_pixels_OR_video));
+      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
       return;
     }
     if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && type == null && pixels == null) {
-      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(unwrap_jso(this), target, level, xoffset, yoffset, format_OR_width, height_OR_type, unwrap_jso(canvas_OR_format_OR_image_OR_pixels_OR_video));
+      _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
       return;
     }
     throw new ArgumentError("Incorrect number or type of arguments");
   }
 
-  @DomName('WebGLRenderingContext.texSubImage2DCanvas')
-  @DocsEditable()
-  void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int format, int type, CanvasElement canvas) => _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(unwrap_jso(this), target, level, xoffset, yoffset, format, type, unwrap_jso(canvas));
-  
-  @DomName('WebGLRenderingContext.texSubImage2DImage')
-  @DocsEditable()
-  void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int format, int type, ImageElement image) => _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(unwrap_jso(this), target, level, xoffset, yoffset, format, type, unwrap_jso(image));
-  
-  @DomName('WebGLRenderingContext.texSubImage2DImageData')
-  @DocsEditable()
-  void texSubImage2DImageData(int target, int level, int xoffset, int yoffset, int format, int type, ImageData pixels) => _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(unwrap_jso(this), target, level, xoffset, yoffset, format, type, unwrap_jso(pixels));
-  
-  @DomName('WebGLRenderingContext.texSubImage2DVideo')
-  @DocsEditable()
-  void texSubImage2DVideo(int target, int level, int xoffset, int yoffset, int format, int type, VideoElement video) => _blink.BlinkWebGLRenderingContext.instance.texSubImage2D_Callback_7_(unwrap_jso(this), target, level, xoffset, yoffset, format, type, unwrap_jso(video));
-  
   @DomName('WebGLRenderingContext.uniform1f')
   @DocsEditable()
-  void uniform1f(UniformLocation location, num x) => _blink.BlinkWebGLRenderingContext.instance.uniform1f_Callback_2_(unwrap_jso(this), unwrap_jso(location), x);
+  void uniform1f(UniformLocation location, num x) => _blink.BlinkWebGLRenderingContext.instance.uniform1f_Callback_2_(this, location, x);
   
-  @DomName('WebGLRenderingContext.uniform1fv')
-  @DocsEditable()
-  void uniform1fv(UniformLocation location, Float32List v) => _blink.BlinkWebGLRenderingContext.instance.uniform1fv_Callback_2_(unwrap_jso(this), unwrap_jso(location), v);
-  
+  void uniform1fv(UniformLocation location, v) {
+    if ((v is Float32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform1fv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<num>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform1fv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.uniform1i')
   @DocsEditable()
-  void uniform1i(UniformLocation location, int x) => _blink.BlinkWebGLRenderingContext.instance.uniform1i_Callback_2_(unwrap_jso(this), unwrap_jso(location), x);
+  void uniform1i(UniformLocation location, int x) => _blink.BlinkWebGLRenderingContext.instance.uniform1i_Callback_2_(this, location, x);
   
-  @DomName('WebGLRenderingContext.uniform1iv')
-  @DocsEditable()
-  void uniform1iv(UniformLocation location, Int32List v) => _blink.BlinkWebGLRenderingContext.instance.uniform1iv_Callback_2_(unwrap_jso(this), unwrap_jso(location), v);
-  
+  void uniform1iv(UniformLocation location, v) {
+    if ((v is Int32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform1iv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<int>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform1iv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.uniform2f')
   @DocsEditable()
-  void uniform2f(UniformLocation location, num x, num y) => _blink.BlinkWebGLRenderingContext.instance.uniform2f_Callback_3_(unwrap_jso(this), unwrap_jso(location), x, y);
+  void uniform2f(UniformLocation location, num x, num y) => _blink.BlinkWebGLRenderingContext.instance.uniform2f_Callback_3_(this, location, x, y);
   
-  @DomName('WebGLRenderingContext.uniform2fv')
-  @DocsEditable()
-  void uniform2fv(UniformLocation location, Float32List v) => _blink.BlinkWebGLRenderingContext.instance.uniform2fv_Callback_2_(unwrap_jso(this), unwrap_jso(location), v);
-  
+  void uniform2fv(UniformLocation location, v) {
+    if ((v is Float32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform2fv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<num>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform2fv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.uniform2i')
   @DocsEditable()
-  void uniform2i(UniformLocation location, int x, int y) => _blink.BlinkWebGLRenderingContext.instance.uniform2i_Callback_3_(unwrap_jso(this), unwrap_jso(location), x, y);
+  void uniform2i(UniformLocation location, int x, int y) => _blink.BlinkWebGLRenderingContext.instance.uniform2i_Callback_3_(this, location, x, y);
   
-  @DomName('WebGLRenderingContext.uniform2iv')
-  @DocsEditable()
-  void uniform2iv(UniformLocation location, Int32List v) => _blink.BlinkWebGLRenderingContext.instance.uniform2iv_Callback_2_(unwrap_jso(this), unwrap_jso(location), v);
-  
+  void uniform2iv(UniformLocation location, v) {
+    if ((v is Int32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform2iv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<int>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform2iv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.uniform3f')
   @DocsEditable()
-  void uniform3f(UniformLocation location, num x, num y, num z) => _blink.BlinkWebGLRenderingContext.instance.uniform3f_Callback_4_(unwrap_jso(this), unwrap_jso(location), x, y, z);
+  void uniform3f(UniformLocation location, num x, num y, num z) => _blink.BlinkWebGLRenderingContext.instance.uniform3f_Callback_4_(this, location, x, y, z);
   
-  @DomName('WebGLRenderingContext.uniform3fv')
-  @DocsEditable()
-  void uniform3fv(UniformLocation location, Float32List v) => _blink.BlinkWebGLRenderingContext.instance.uniform3fv_Callback_2_(unwrap_jso(this), unwrap_jso(location), v);
-  
+  void uniform3fv(UniformLocation location, v) {
+    if ((v is Float32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform3fv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<num>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform3fv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.uniform3i')
   @DocsEditable()
-  void uniform3i(UniformLocation location, int x, int y, int z) => _blink.BlinkWebGLRenderingContext.instance.uniform3i_Callback_4_(unwrap_jso(this), unwrap_jso(location), x, y, z);
+  void uniform3i(UniformLocation location, int x, int y, int z) => _blink.BlinkWebGLRenderingContext.instance.uniform3i_Callback_4_(this, location, x, y, z);
   
-  @DomName('WebGLRenderingContext.uniform3iv')
-  @DocsEditable()
-  void uniform3iv(UniformLocation location, Int32List v) => _blink.BlinkWebGLRenderingContext.instance.uniform3iv_Callback_2_(unwrap_jso(this), unwrap_jso(location), v);
-  
+  void uniform3iv(UniformLocation location, v) {
+    if ((v is Int32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform3iv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<int>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform3iv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.uniform4f')
   @DocsEditable()
-  void uniform4f(UniformLocation location, num x, num y, num z, num w) => _blink.BlinkWebGLRenderingContext.instance.uniform4f_Callback_5_(unwrap_jso(this), unwrap_jso(location), x, y, z, w);
+  void uniform4f(UniformLocation location, num x, num y, num z, num w) => _blink.BlinkWebGLRenderingContext.instance.uniform4f_Callback_5_(this, location, x, y, z, w);
   
-  @DomName('WebGLRenderingContext.uniform4fv')
-  @DocsEditable()
-  void uniform4fv(UniformLocation location, Float32List v) => _blink.BlinkWebGLRenderingContext.instance.uniform4fv_Callback_2_(unwrap_jso(this), unwrap_jso(location), v);
-  
+  void uniform4fv(UniformLocation location, v) {
+    if ((v is Float32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform4fv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<num>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform4fv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.uniform4i')
   @DocsEditable()
-  void uniform4i(UniformLocation location, int x, int y, int z, int w) => _blink.BlinkWebGLRenderingContext.instance.uniform4i_Callback_5_(unwrap_jso(this), unwrap_jso(location), x, y, z, w);
+  void uniform4i(UniformLocation location, int x, int y, int z, int w) => _blink.BlinkWebGLRenderingContext.instance.uniform4i_Callback_5_(this, location, x, y, z, w);
   
-  @DomName('WebGLRenderingContext.uniform4iv')
-  @DocsEditable()
-  void uniform4iv(UniformLocation location, Int32List v) => _blink.BlinkWebGLRenderingContext.instance.uniform4iv_Callback_2_(unwrap_jso(this), unwrap_jso(location), v);
-  
-  @DomName('WebGLRenderingContext.uniformMatrix2fv')
-  @DocsEditable()
-  void uniformMatrix2fv(UniformLocation location, bool transpose, Float32List array) => _blink.BlinkWebGLRenderingContext.instance.uniformMatrix2fv_Callback_3_(unwrap_jso(this), unwrap_jso(location), transpose, array);
-  
-  @DomName('WebGLRenderingContext.uniformMatrix3fv')
-  @DocsEditable()
-  void uniformMatrix3fv(UniformLocation location, bool transpose, Float32List array) => _blink.BlinkWebGLRenderingContext.instance.uniformMatrix3fv_Callback_3_(unwrap_jso(this), unwrap_jso(location), transpose, array);
-  
-  @DomName('WebGLRenderingContext.uniformMatrix4fv')
-  @DocsEditable()
-  void uniformMatrix4fv(UniformLocation location, bool transpose, Float32List array) => _blink.BlinkWebGLRenderingContext.instance.uniformMatrix4fv_Callback_3_(unwrap_jso(this), unwrap_jso(location), transpose, array);
-  
+  void uniform4iv(UniformLocation location, v) {
+    if ((v is Int32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform4iv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<int>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniform4iv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix2fv(UniformLocation location, bool transpose, array) {
+    if ((array is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniformMatrix2fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    if ((array is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniformMatrix2fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix3fv(UniformLocation location, bool transpose, array) {
+    if ((array is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniformMatrix3fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    if ((array is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniformMatrix3fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix4fv(UniformLocation location, bool transpose, array) {
+    if ((array is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniformMatrix4fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    if ((array is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGLRenderingContext.instance.uniformMatrix4fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.useProgram')
   @DocsEditable()
-  void useProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.useProgram_Callback_1_(unwrap_jso(this), unwrap_jso(program));
+  void useProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.useProgram_Callback_1_(this, program);
   
   @DomName('WebGLRenderingContext.validateProgram')
   @DocsEditable()
-  void validateProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.validateProgram_Callback_1_(unwrap_jso(this), unwrap_jso(program));
+  void validateProgram(Program program) => _blink.BlinkWebGLRenderingContext.instance.validateProgram_Callback_1_(this, program);
   
   @DomName('WebGLRenderingContext.vertexAttrib1f')
   @DocsEditable()
-  void vertexAttrib1f(int indx, num x) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib1f_Callback_2_(unwrap_jso(this), indx, x);
+  void vertexAttrib1f(int indx, num x) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib1f_Callback_2_(this, indx, x);
   
-  @DomName('WebGLRenderingContext.vertexAttrib1fv')
-  @DocsEditable()
-  void vertexAttrib1fv(int indx, Float32List values) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib1fv_Callback_2_(unwrap_jso(this), indx, values);
-  
+  void vertexAttrib1fv(int indx, values) {
+    if ((values is Float32List) && (indx is int)) {
+      _blink.BlinkWebGLRenderingContext.instance.vertexAttrib1fv_Callback_2_(this, indx, values);
+      return;
+    }
+    if ((values is List<num>) && (indx is int)) {
+      _blink.BlinkWebGLRenderingContext.instance.vertexAttrib1fv_Callback_2_(this, indx, values);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.vertexAttrib2f')
   @DocsEditable()
-  void vertexAttrib2f(int indx, num x, num y) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib2f_Callback_3_(unwrap_jso(this), indx, x, y);
+  void vertexAttrib2f(int indx, num x, num y) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib2f_Callback_3_(this, indx, x, y);
   
-  @DomName('WebGLRenderingContext.vertexAttrib2fv')
-  @DocsEditable()
-  void vertexAttrib2fv(int indx, Float32List values) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib2fv_Callback_2_(unwrap_jso(this), indx, values);
-  
+  void vertexAttrib2fv(int indx, values) {
+    if ((values is Float32List) && (indx is int)) {
+      _blink.BlinkWebGLRenderingContext.instance.vertexAttrib2fv_Callback_2_(this, indx, values);
+      return;
+    }
+    if ((values is List<num>) && (indx is int)) {
+      _blink.BlinkWebGLRenderingContext.instance.vertexAttrib2fv_Callback_2_(this, indx, values);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.vertexAttrib3f')
   @DocsEditable()
-  void vertexAttrib3f(int indx, num x, num y, num z) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib3f_Callback_4_(unwrap_jso(this), indx, x, y, z);
+  void vertexAttrib3f(int indx, num x, num y, num z) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib3f_Callback_4_(this, indx, x, y, z);
   
-  @DomName('WebGLRenderingContext.vertexAttrib3fv')
-  @DocsEditable()
-  void vertexAttrib3fv(int indx, Float32List values) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib3fv_Callback_2_(unwrap_jso(this), indx, values);
-  
+  void vertexAttrib3fv(int indx, values) {
+    if ((values is Float32List) && (indx is int)) {
+      _blink.BlinkWebGLRenderingContext.instance.vertexAttrib3fv_Callback_2_(this, indx, values);
+      return;
+    }
+    if ((values is List<num>) && (indx is int)) {
+      _blink.BlinkWebGLRenderingContext.instance.vertexAttrib3fv_Callback_2_(this, indx, values);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.vertexAttrib4f')
   @DocsEditable()
-  void vertexAttrib4f(int indx, num x, num y, num z, num w) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib4f_Callback_5_(unwrap_jso(this), indx, x, y, z, w);
+  void vertexAttrib4f(int indx, num x, num y, num z, num w) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib4f_Callback_5_(this, indx, x, y, z, w);
   
-  @DomName('WebGLRenderingContext.vertexAttrib4fv')
-  @DocsEditable()
-  void vertexAttrib4fv(int indx, Float32List values) => _blink.BlinkWebGLRenderingContext.instance.vertexAttrib4fv_Callback_2_(unwrap_jso(this), indx, values);
-  
+  void vertexAttrib4fv(int indx, values) {
+    if ((values is Float32List) && (indx is int)) {
+      _blink.BlinkWebGLRenderingContext.instance.vertexAttrib4fv_Callback_2_(this, indx, values);
+      return;
+    }
+    if ((values is List<num>) && (indx is int)) {
+      _blink.BlinkWebGLRenderingContext.instance.vertexAttrib4fv_Callback_2_(this, indx, values);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
   @DomName('WebGLRenderingContext.vertexAttribPointer')
   @DocsEditable()
-  void vertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) => _blink.BlinkWebGLRenderingContext.instance.vertexAttribPointer_Callback_6_(unwrap_jso(this), indx, size, type, normalized, stride, offset);
+  void vertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) => _blink.BlinkWebGLRenderingContext.instance.vertexAttribPointer_Callback_6_(this, indx, size, type, normalized, stride, offset);
   
   @DomName('WebGLRenderingContext.viewport')
   @DocsEditable()
-  void viewport(int x, int y, int width, int height) => _blink.BlinkWebGLRenderingContext.instance.viewport_Callback_4_(unwrap_jso(this), x, y, width, height);
+  void viewport(int x, int y, int width, int height) => _blink.BlinkWebGLRenderingContext.instance.viewport_Callback_4_(this, x, y, width, height);
   
 
   /**
    * Sets the currently bound texture to [data].
    *
    * [data] can be either an [ImageElement], a
-   * [CanvasElement], a [VideoElement], or an [ImageData] object.
+   * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
    *
-   * To use [texImage2d] with a TypedData object, use [texImage2dTyped].
-   *
+   * This is deprecated in favor of [texImage2D].
    */
-  void texImage2DUntyped(int targetTexture, int levelOfDetail, 
+  @Deprecated("Use texImage2D")
+  void texImage2DUntyped(int targetTexture, int levelOfDetail,
       int internalFormat, int format, int type, data) {
-    if (data is ImageElement) {
-      texImage2DImage(targetTexture, levelOfDetail, internalFormat, format,
-          type, data);
-    } else if (data is ImageData) {
-      texImage2DImageData(targetTexture, levelOfDetail, internalFormat, format,
-          type, data);
-    } else if (data is CanvasElement) {
-      texImage2DCanvas(targetTexture, levelOfDetail, internalFormat, format,
-          type, data);
-    } else {
-      texImage2DVideo(targetTexture, levelOfDetail, internalFormat, format,
-          type, data);
-    }
+    texImage2D(targetTexture, levelOfDetail, internalFormat, format, type, data);
   }
 
   /**
    * Sets the currently bound texture to [data].
+   *
+   * This is deprecated in favour of [texImage2D].
    */
+  @Deprecated("Use texImage2D")
   void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat,
       int width, int height, int border, int format, int type, TypedData data) {
     texImage2D(targetTexture, levelOfDetail, internalFormat,
@@ -3556,12 +3398,11 @@
    * Updates a sub-rectangle of the currently bound texture to [data].
    *
    * [data] can be either an [ImageElement], a
-   * [CanvasElement], a [VideoElement], or an [ImageData] object.
-   *
-   * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped].
+   * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
    *
    */
-  void texSubImage2DUntyped(int targetTexture, int levelOfDetail, 
+  @Deprecated("Use texSubImage2D")
+  void texSubImage2DUntyped(int targetTexture, int levelOfDetail,
       int xOffset, int yOffset, int format, int type, data) {
     texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
         format, type, data);
@@ -3570,12 +3411,2936 @@
   /**
    * Updates a sub-rectangle of the currently bound texture to [data].
    */
+  @Deprecated("Use texSubImage2D")
   void texSubImage2DTyped(int targetTexture, int levelOfDetail,
-      int xOffset, int yOffset, int width, int height, int format,
+      int xOffset, int yOffset, int width, int height, int border, int format,
       int type, TypedData data) {
     texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
         width, height, format, type, data);
   }
+
+  /**
+   * Set the bufferData to [data].
+   */
+  @Deprecated("Use bufferData")
+  void bufferDataTyped(int target, TypedData data, int usage) {
+    bufferData(target, data, usage);
+  }
+
+  /**
+   * Set the bufferSubData to [data].
+   */
+  @Deprecated("Use bufferSubData")
+  void bufferSubDataTyped(int target, int offset, TypedData data) {
+    bufferSubData(target, offset, data);
+  }
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('WebGL2RenderingContext')
+@Experimental() // untriaged
+class RenderingContext2 extends DartHtmlDomObject implements _WebGL2RenderingContextBase, _WebGLRenderingContextBase {
+  // To suppress missing implicit constructor warnings.
+  factory RenderingContext2._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  RenderingContext2.internal_() { }
+
+  @DomName('WebGL2RenderingContext.ACTIVE_ATTRIBUTES')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ACTIVE_ATTRIBUTES = 0x8B89;
+
+  @DomName('WebGL2RenderingContext.ACTIVE_TEXTURE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ACTIVE_TEXTURE = 0x84E0;
+
+  @DomName('WebGL2RenderingContext.ACTIVE_UNIFORMS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ACTIVE_UNIFORMS = 0x8B86;
+
+  @DomName('WebGL2RenderingContext.ALIASED_LINE_WIDTH_RANGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALIASED_LINE_WIDTH_RANGE = 0x846E;
+
+  @DomName('WebGL2RenderingContext.ALIASED_POINT_SIZE_RANGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALIASED_POINT_SIZE_RANGE = 0x846D;
+
+  @DomName('WebGL2RenderingContext.ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALPHA = 0x1906;
+
+  @DomName('WebGL2RenderingContext.ALPHA_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALPHA_BITS = 0x0D55;
+
+  @DomName('WebGL2RenderingContext.ALWAYS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ALWAYS = 0x0207;
+
+  @DomName('WebGL2RenderingContext.ARRAY_BUFFER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ARRAY_BUFFER = 0x8892;
+
+  @DomName('WebGL2RenderingContext.ARRAY_BUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ARRAY_BUFFER_BINDING = 0x8894;
+
+  @DomName('WebGL2RenderingContext.ATTACHED_SHADERS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ATTACHED_SHADERS = 0x8B85;
+
+  @DomName('WebGL2RenderingContext.BACK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BACK = 0x0405;
+
+  @DomName('WebGL2RenderingContext.BLEND')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND = 0x0BE2;
+
+  @DomName('WebGL2RenderingContext.BLEND_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_COLOR = 0x8005;
+
+  @DomName('WebGL2RenderingContext.BLEND_DST_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_DST_ALPHA = 0x80CA;
+
+  @DomName('WebGL2RenderingContext.BLEND_DST_RGB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_DST_RGB = 0x80C8;
+
+  @DomName('WebGL2RenderingContext.BLEND_EQUATION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_EQUATION = 0x8009;
+
+  @DomName('WebGL2RenderingContext.BLEND_EQUATION_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_EQUATION_ALPHA = 0x883D;
+
+  @DomName('WebGL2RenderingContext.BLEND_EQUATION_RGB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_EQUATION_RGB = 0x8009;
+
+  @DomName('WebGL2RenderingContext.BLEND_SRC_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_SRC_ALPHA = 0x80CB;
+
+  @DomName('WebGL2RenderingContext.BLEND_SRC_RGB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLEND_SRC_RGB = 0x80C9;
+
+  @DomName('WebGL2RenderingContext.BLUE_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BLUE_BITS = 0x0D54;
+
+  @DomName('WebGL2RenderingContext.BOOL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BOOL = 0x8B56;
+
+  @DomName('WebGL2RenderingContext.BOOL_VEC2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BOOL_VEC2 = 0x8B57;
+
+  @DomName('WebGL2RenderingContext.BOOL_VEC3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BOOL_VEC3 = 0x8B58;
+
+  @DomName('WebGL2RenderingContext.BOOL_VEC4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BOOL_VEC4 = 0x8B59;
+
+  @DomName('WebGL2RenderingContext.BROWSER_DEFAULT_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BROWSER_DEFAULT_WEBGL = 0x9244;
+
+  @DomName('WebGL2RenderingContext.BUFFER_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BUFFER_SIZE = 0x8764;
+
+  @DomName('WebGL2RenderingContext.BUFFER_USAGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BUFFER_USAGE = 0x8765;
+
+  @DomName('WebGL2RenderingContext.BYTE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int BYTE = 0x1400;
+
+  @DomName('WebGL2RenderingContext.CCW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CCW = 0x0901;
+
+  @DomName('WebGL2RenderingContext.CLAMP_TO_EDGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CLAMP_TO_EDGE = 0x812F;
+
+  @DomName('WebGL2RenderingContext.COLOR_ATTACHMENT0')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COLOR_ATTACHMENT0 = 0x8CE0;
+
+  @DomName('WebGL2RenderingContext.COLOR_BUFFER_BIT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COLOR_BUFFER_BIT = 0x00004000;
+
+  @DomName('WebGL2RenderingContext.COLOR_CLEAR_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COLOR_CLEAR_VALUE = 0x0C22;
+
+  @DomName('WebGL2RenderingContext.COLOR_WRITEMASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COLOR_WRITEMASK = 0x0C23;
+
+  @DomName('WebGL2RenderingContext.COMPILE_STATUS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COMPILE_STATUS = 0x8B81;
+
+  @DomName('WebGL2RenderingContext.COMPRESSED_TEXTURE_FORMATS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int COMPRESSED_TEXTURE_FORMATS = 0x86A3;
+
+  @DomName('WebGL2RenderingContext.CONSTANT_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CONSTANT_ALPHA = 0x8003;
+
+  @DomName('WebGL2RenderingContext.CONSTANT_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CONSTANT_COLOR = 0x8001;
+
+  @DomName('WebGL2RenderingContext.CONTEXT_LOST_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CONTEXT_LOST_WEBGL = 0x9242;
+
+  @DomName('WebGL2RenderingContext.CULL_FACE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CULL_FACE = 0x0B44;
+
+  @DomName('WebGL2RenderingContext.CULL_FACE_MODE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CULL_FACE_MODE = 0x0B45;
+
+  @DomName('WebGL2RenderingContext.CURRENT_PROGRAM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CURRENT_PROGRAM = 0x8B8D;
+
+  @DomName('WebGL2RenderingContext.CURRENT_VERTEX_ATTRIB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CURRENT_VERTEX_ATTRIB = 0x8626;
+
+  @DomName('WebGL2RenderingContext.CW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int CW = 0x0900;
+
+  @DomName('WebGL2RenderingContext.DECR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DECR = 0x1E03;
+
+  @DomName('WebGL2RenderingContext.DECR_WRAP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DECR_WRAP = 0x8508;
+
+  @DomName('WebGL2RenderingContext.DELETE_STATUS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DELETE_STATUS = 0x8B80;
+
+  @DomName('WebGL2RenderingContext.DEPTH_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_ATTACHMENT = 0x8D00;
+
+  @DomName('WebGL2RenderingContext.DEPTH_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_BITS = 0x0D56;
+
+  @DomName('WebGL2RenderingContext.DEPTH_BUFFER_BIT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_BUFFER_BIT = 0x00000100;
+
+  @DomName('WebGL2RenderingContext.DEPTH_CLEAR_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_CLEAR_VALUE = 0x0B73;
+
+  @DomName('WebGL2RenderingContext.DEPTH_COMPONENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_COMPONENT = 0x1902;
+
+  @DomName('WebGL2RenderingContext.DEPTH_COMPONENT16')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_COMPONENT16 = 0x81A5;
+
+  @DomName('WebGL2RenderingContext.DEPTH_FUNC')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_FUNC = 0x0B74;
+
+  @DomName('WebGL2RenderingContext.DEPTH_RANGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_RANGE = 0x0B70;
+
+  @DomName('WebGL2RenderingContext.DEPTH_STENCIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_STENCIL = 0x84F9;
+
+  @DomName('WebGL2RenderingContext.DEPTH_STENCIL_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_STENCIL_ATTACHMENT = 0x821A;
+
+  @DomName('WebGL2RenderingContext.DEPTH_TEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_TEST = 0x0B71;
+
+  @DomName('WebGL2RenderingContext.DEPTH_WRITEMASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DEPTH_WRITEMASK = 0x0B72;
+
+  @DomName('WebGL2RenderingContext.DITHER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DITHER = 0x0BD0;
+
+  @DomName('WebGL2RenderingContext.DONT_CARE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DONT_CARE = 0x1100;
+
+  @DomName('WebGL2RenderingContext.DST_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DST_ALPHA = 0x0304;
+
+  @DomName('WebGL2RenderingContext.DST_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DST_COLOR = 0x0306;
+
+  @DomName('WebGL2RenderingContext.DYNAMIC_DRAW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int DYNAMIC_DRAW = 0x88E8;
+
+  @DomName('WebGL2RenderingContext.ELEMENT_ARRAY_BUFFER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ELEMENT_ARRAY_BUFFER = 0x8893;
+
+  @DomName('WebGL2RenderingContext.ELEMENT_ARRAY_BUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
+
+  @DomName('WebGL2RenderingContext.EQUAL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int EQUAL = 0x0202;
+
+  @DomName('WebGL2RenderingContext.FASTEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FASTEST = 0x1101;
+
+  @DomName('WebGL2RenderingContext.FLOAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT = 0x1406;
+
+  @DomName('WebGL2RenderingContext.FLOAT_MAT2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_MAT2 = 0x8B5A;
+
+  @DomName('WebGL2RenderingContext.FLOAT_MAT3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_MAT3 = 0x8B5B;
+
+  @DomName('WebGL2RenderingContext.FLOAT_MAT4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_MAT4 = 0x8B5C;
+
+  @DomName('WebGL2RenderingContext.FLOAT_VEC2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_VEC2 = 0x8B50;
+
+  @DomName('WebGL2RenderingContext.FLOAT_VEC3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_VEC3 = 0x8B51;
+
+  @DomName('WebGL2RenderingContext.FLOAT_VEC4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FLOAT_VEC4 = 0x8B52;
+
+  @DomName('WebGL2RenderingContext.FRAGMENT_SHADER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAGMENT_SHADER = 0x8B30;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER = 0x8D40;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_BINDING = 0x8CA6;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_COMPLETE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_COMPLETE = 0x8CD5;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_DIMENSIONS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
+
+  @DomName('WebGL2RenderingContext.FRAMEBUFFER_UNSUPPORTED')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
+
+  @DomName('WebGL2RenderingContext.FRONT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRONT = 0x0404;
+
+  @DomName('WebGL2RenderingContext.FRONT_AND_BACK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRONT_AND_BACK = 0x0408;
+
+  @DomName('WebGL2RenderingContext.FRONT_FACE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FRONT_FACE = 0x0B46;
+
+  @DomName('WebGL2RenderingContext.FUNC_ADD')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FUNC_ADD = 0x8006;
+
+  @DomName('WebGL2RenderingContext.FUNC_REVERSE_SUBTRACT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FUNC_REVERSE_SUBTRACT = 0x800B;
+
+  @DomName('WebGL2RenderingContext.FUNC_SUBTRACT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int FUNC_SUBTRACT = 0x800A;
+
+  @DomName('WebGL2RenderingContext.GENERATE_MIPMAP_HINT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int GENERATE_MIPMAP_HINT = 0x8192;
+
+  @DomName('WebGL2RenderingContext.GEQUAL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int GEQUAL = 0x0206;
+
+  @DomName('WebGL2RenderingContext.GREATER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int GREATER = 0x0204;
+
+  @DomName('WebGL2RenderingContext.GREEN_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int GREEN_BITS = 0x0D53;
+
+  @DomName('WebGL2RenderingContext.HIGH_FLOAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int HIGH_FLOAT = 0x8DF2;
+
+  @DomName('WebGL2RenderingContext.HIGH_INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int HIGH_INT = 0x8DF5;
+
+  @DomName('WebGL2RenderingContext.IMPLEMENTATION_COLOR_READ_FORMAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
+
+  @DomName('WebGL2RenderingContext.IMPLEMENTATION_COLOR_READ_TYPE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
+
+  @DomName('WebGL2RenderingContext.INCR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INCR = 0x1E02;
+
+  @DomName('WebGL2RenderingContext.INCR_WRAP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INCR_WRAP = 0x8507;
+
+  @DomName('WebGL2RenderingContext.INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INT = 0x1404;
+
+  @DomName('WebGL2RenderingContext.INT_VEC2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INT_VEC2 = 0x8B53;
+
+  @DomName('WebGL2RenderingContext.INT_VEC3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INT_VEC3 = 0x8B54;
+
+  @DomName('WebGL2RenderingContext.INT_VEC4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INT_VEC4 = 0x8B55;
+
+  @DomName('WebGL2RenderingContext.INVALID_ENUM')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVALID_ENUM = 0x0500;
+
+  @DomName('WebGL2RenderingContext.INVALID_FRAMEBUFFER_OPERATION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVALID_FRAMEBUFFER_OPERATION = 0x0506;
+
+  @DomName('WebGL2RenderingContext.INVALID_OPERATION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVALID_OPERATION = 0x0502;
+
+  @DomName('WebGL2RenderingContext.INVALID_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVALID_VALUE = 0x0501;
+
+  @DomName('WebGL2RenderingContext.INVERT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int INVERT = 0x150A;
+
+  @DomName('WebGL2RenderingContext.KEEP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int KEEP = 0x1E00;
+
+  @DomName('WebGL2RenderingContext.LEQUAL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LEQUAL = 0x0203;
+
+  @DomName('WebGL2RenderingContext.LESS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LESS = 0x0201;
+
+  @DomName('WebGL2RenderingContext.LINEAR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINEAR = 0x2601;
+
+  @DomName('WebGL2RenderingContext.LINEAR_MIPMAP_LINEAR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINEAR_MIPMAP_LINEAR = 0x2703;
+
+  @DomName('WebGL2RenderingContext.LINEAR_MIPMAP_NEAREST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINEAR_MIPMAP_NEAREST = 0x2701;
+
+  @DomName('WebGL2RenderingContext.LINES')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINES = 0x0001;
+
+  @DomName('WebGL2RenderingContext.LINE_LOOP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINE_LOOP = 0x0002;
+
+  @DomName('WebGL2RenderingContext.LINE_STRIP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINE_STRIP = 0x0003;
+
+  @DomName('WebGL2RenderingContext.LINE_WIDTH')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINE_WIDTH = 0x0B21;
+
+  @DomName('WebGL2RenderingContext.LINK_STATUS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LINK_STATUS = 0x8B82;
+
+  @DomName('WebGL2RenderingContext.LOW_FLOAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LOW_FLOAT = 0x8DF0;
+
+  @DomName('WebGL2RenderingContext.LOW_INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LOW_INT = 0x8DF3;
+
+  @DomName('WebGL2RenderingContext.LUMINANCE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LUMINANCE = 0x1909;
+
+  @DomName('WebGL2RenderingContext.LUMINANCE_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int LUMINANCE_ALPHA = 0x190A;
+
+  @DomName('WebGL2RenderingContext.MAX_COMBINED_TEXTURE_IMAGE_UNITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
+
+  @DomName('WebGL2RenderingContext.MAX_CUBE_MAP_TEXTURE_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
+
+  @DomName('WebGL2RenderingContext.MAX_FRAGMENT_UNIFORM_VECTORS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
+
+  @DomName('WebGL2RenderingContext.MAX_RENDERBUFFER_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_RENDERBUFFER_SIZE = 0x84E8;
+
+  @DomName('WebGL2RenderingContext.MAX_TEXTURE_IMAGE_UNITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_TEXTURE_IMAGE_UNITS = 0x8872;
+
+  @DomName('WebGL2RenderingContext.MAX_TEXTURE_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_TEXTURE_SIZE = 0x0D33;
+
+  @DomName('WebGL2RenderingContext.MAX_VARYING_VECTORS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VARYING_VECTORS = 0x8DFC;
+
+  @DomName('WebGL2RenderingContext.MAX_VERTEX_ATTRIBS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VERTEX_ATTRIBS = 0x8869;
+
+  @DomName('WebGL2RenderingContext.MAX_VERTEX_TEXTURE_IMAGE_UNITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
+
+  @DomName('WebGL2RenderingContext.MAX_VERTEX_UNIFORM_VECTORS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
+
+  @DomName('WebGL2RenderingContext.MAX_VIEWPORT_DIMS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MAX_VIEWPORT_DIMS = 0x0D3A;
+
+  @DomName('WebGL2RenderingContext.MEDIUM_FLOAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MEDIUM_FLOAT = 0x8DF1;
+
+  @DomName('WebGL2RenderingContext.MEDIUM_INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MEDIUM_INT = 0x8DF4;
+
+  @DomName('WebGL2RenderingContext.MIRRORED_REPEAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int MIRRORED_REPEAT = 0x8370;
+
+  @DomName('WebGL2RenderingContext.NEAREST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NEAREST = 0x2600;
+
+  @DomName('WebGL2RenderingContext.NEAREST_MIPMAP_LINEAR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NEAREST_MIPMAP_LINEAR = 0x2702;
+
+  @DomName('WebGL2RenderingContext.NEAREST_MIPMAP_NEAREST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NEAREST_MIPMAP_NEAREST = 0x2700;
+
+  @DomName('WebGL2RenderingContext.NEVER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NEVER = 0x0200;
+
+  @DomName('WebGL2RenderingContext.NICEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NICEST = 0x1102;
+
+  @DomName('WebGL2RenderingContext.NONE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NONE = 0;
+
+  @DomName('WebGL2RenderingContext.NOTEQUAL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NOTEQUAL = 0x0205;
+
+  @DomName('WebGL2RenderingContext.NO_ERROR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int NO_ERROR = 0;
+
+  @DomName('WebGL2RenderingContext.ONE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE = 1;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_CONSTANT_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_CONSTANT_ALPHA = 0x8004;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_CONSTANT_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_CONSTANT_COLOR = 0x8002;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_DST_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_DST_ALPHA = 0x0305;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_DST_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_DST_COLOR = 0x0307;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_SRC_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_SRC_ALPHA = 0x0303;
+
+  @DomName('WebGL2RenderingContext.ONE_MINUS_SRC_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ONE_MINUS_SRC_COLOR = 0x0301;
+
+  @DomName('WebGL2RenderingContext.OUT_OF_MEMORY')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int OUT_OF_MEMORY = 0x0505;
+
+  @DomName('WebGL2RenderingContext.PACK_ALIGNMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int PACK_ALIGNMENT = 0x0D05;
+
+  @DomName('WebGL2RenderingContext.POINTS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int POINTS = 0x0000;
+
+  @DomName('WebGL2RenderingContext.POLYGON_OFFSET_FACTOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int POLYGON_OFFSET_FACTOR = 0x8038;
+
+  @DomName('WebGL2RenderingContext.POLYGON_OFFSET_FILL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int POLYGON_OFFSET_FILL = 0x8037;
+
+  @DomName('WebGL2RenderingContext.POLYGON_OFFSET_UNITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int POLYGON_OFFSET_UNITS = 0x2A00;
+
+  @DomName('WebGL2RenderingContext.RED_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RED_BITS = 0x0D52;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER = 0x8D41;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_ALPHA_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_ALPHA_SIZE = 0x8D53;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_BINDING = 0x8CA7;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_BLUE_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_BLUE_SIZE = 0x8D52;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_DEPTH_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_DEPTH_SIZE = 0x8D54;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_GREEN_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_GREEN_SIZE = 0x8D51;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_HEIGHT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_HEIGHT = 0x8D43;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_INTERNAL_FORMAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_RED_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_RED_SIZE = 0x8D50;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_STENCIL_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_STENCIL_SIZE = 0x8D55;
+
+  @DomName('WebGL2RenderingContext.RENDERBUFFER_WIDTH')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERBUFFER_WIDTH = 0x8D42;
+
+  @DomName('WebGL2RenderingContext.RENDERER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RENDERER = 0x1F01;
+
+  @DomName('WebGL2RenderingContext.REPEAT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int REPEAT = 0x2901;
+
+  @DomName('WebGL2RenderingContext.REPLACE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int REPLACE = 0x1E01;
+
+  @DomName('WebGL2RenderingContext.RGB')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGB = 0x1907;
+
+  @DomName('WebGL2RenderingContext.RGB565')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGB565 = 0x8D62;
+
+  @DomName('WebGL2RenderingContext.RGB5_A1')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGB5_A1 = 0x8057;
+
+  @DomName('WebGL2RenderingContext.RGBA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGBA = 0x1908;
+
+  @DomName('WebGL2RenderingContext.RGBA4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int RGBA4 = 0x8056;
+
+  @DomName('WebGL2RenderingContext.SAMPLER_2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLER_2D = 0x8B5E;
+
+  @DomName('WebGL2RenderingContext.SAMPLER_CUBE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLER_CUBE = 0x8B60;
+
+  @DomName('WebGL2RenderingContext.SAMPLES')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLES = 0x80A9;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_ALPHA_TO_COVERAGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_BUFFERS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_BUFFERS = 0x80A8;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_COVERAGE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_COVERAGE = 0x80A0;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_COVERAGE_INVERT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_COVERAGE_INVERT = 0x80AB;
+
+  @DomName('WebGL2RenderingContext.SAMPLE_COVERAGE_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SAMPLE_COVERAGE_VALUE = 0x80AA;
+
+  @DomName('WebGL2RenderingContext.SCISSOR_BOX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SCISSOR_BOX = 0x0C10;
+
+  @DomName('WebGL2RenderingContext.SCISSOR_TEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SCISSOR_TEST = 0x0C11;
+
+  @DomName('WebGL2RenderingContext.SHADER_TYPE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SHADER_TYPE = 0x8B4F;
+
+  @DomName('WebGL2RenderingContext.SHADING_LANGUAGE_VERSION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SHADING_LANGUAGE_VERSION = 0x8B8C;
+
+  @DomName('WebGL2RenderingContext.SHORT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SHORT = 0x1402;
+
+  @DomName('WebGL2RenderingContext.SRC_ALPHA')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRC_ALPHA = 0x0302;
+
+  @DomName('WebGL2RenderingContext.SRC_ALPHA_SATURATE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRC_ALPHA_SATURATE = 0x0308;
+
+  @DomName('WebGL2RenderingContext.SRC_COLOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SRC_COLOR = 0x0300;
+
+  @DomName('WebGL2RenderingContext.STATIC_DRAW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STATIC_DRAW = 0x88E4;
+
+  @DomName('WebGL2RenderingContext.STENCIL_ATTACHMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_ATTACHMENT = 0x8D20;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_FAIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_FAIL = 0x8801;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_FUNC')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_FUNC = 0x8800;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_PASS_DEPTH_FAIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_PASS_DEPTH_PASS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_REF')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_REF = 0x8CA3;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_VALUE_MASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_VALUE_MASK = 0x8CA4;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BACK_WRITEMASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BACK_WRITEMASK = 0x8CA5;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BITS = 0x0D57;
+
+  @DomName('WebGL2RenderingContext.STENCIL_BUFFER_BIT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_BUFFER_BIT = 0x00000400;
+
+  @DomName('WebGL2RenderingContext.STENCIL_CLEAR_VALUE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_CLEAR_VALUE = 0x0B91;
+
+  @DomName('WebGL2RenderingContext.STENCIL_FAIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_FAIL = 0x0B94;
+
+  @DomName('WebGL2RenderingContext.STENCIL_FUNC')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_FUNC = 0x0B92;
+
+  @DomName('WebGL2RenderingContext.STENCIL_INDEX')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_INDEX = 0x1901;
+
+  @DomName('WebGL2RenderingContext.STENCIL_INDEX8')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_INDEX8 = 0x8D48;
+
+  @DomName('WebGL2RenderingContext.STENCIL_PASS_DEPTH_FAIL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_PASS_DEPTH_FAIL = 0x0B95;
+
+  @DomName('WebGL2RenderingContext.STENCIL_PASS_DEPTH_PASS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_PASS_DEPTH_PASS = 0x0B96;
+
+  @DomName('WebGL2RenderingContext.STENCIL_REF')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_REF = 0x0B97;
+
+  @DomName('WebGL2RenderingContext.STENCIL_TEST')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_TEST = 0x0B90;
+
+  @DomName('WebGL2RenderingContext.STENCIL_VALUE_MASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_VALUE_MASK = 0x0B93;
+
+  @DomName('WebGL2RenderingContext.STENCIL_WRITEMASK')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STENCIL_WRITEMASK = 0x0B98;
+
+  @DomName('WebGL2RenderingContext.STREAM_DRAW')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int STREAM_DRAW = 0x88E0;
+
+  @DomName('WebGL2RenderingContext.SUBPIXEL_BITS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int SUBPIXEL_BITS = 0x0D50;
+
+  @DomName('WebGL2RenderingContext.TEXTURE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE = 0x1702;
+
+  @DomName('WebGL2RenderingContext.TEXTURE0')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE0 = 0x84C0;
+
+  @DomName('WebGL2RenderingContext.TEXTURE1')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE1 = 0x84C1;
+
+  @DomName('WebGL2RenderingContext.TEXTURE10')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE10 = 0x84CA;
+
+  @DomName('WebGL2RenderingContext.TEXTURE11')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE11 = 0x84CB;
+
+  @DomName('WebGL2RenderingContext.TEXTURE12')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE12 = 0x84CC;
+
+  @DomName('WebGL2RenderingContext.TEXTURE13')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE13 = 0x84CD;
+
+  @DomName('WebGL2RenderingContext.TEXTURE14')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE14 = 0x84CE;
+
+  @DomName('WebGL2RenderingContext.TEXTURE15')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE15 = 0x84CF;
+
+  @DomName('WebGL2RenderingContext.TEXTURE16')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE16 = 0x84D0;
+
+  @DomName('WebGL2RenderingContext.TEXTURE17')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE17 = 0x84D1;
+
+  @DomName('WebGL2RenderingContext.TEXTURE18')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE18 = 0x84D2;
+
+  @DomName('WebGL2RenderingContext.TEXTURE19')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE19 = 0x84D3;
+
+  @DomName('WebGL2RenderingContext.TEXTURE2')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE2 = 0x84C2;
+
+  @DomName('WebGL2RenderingContext.TEXTURE20')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE20 = 0x84D4;
+
+  @DomName('WebGL2RenderingContext.TEXTURE21')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE21 = 0x84D5;
+
+  @DomName('WebGL2RenderingContext.TEXTURE22')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE22 = 0x84D6;
+
+  @DomName('WebGL2RenderingContext.TEXTURE23')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE23 = 0x84D7;
+
+  @DomName('WebGL2RenderingContext.TEXTURE24')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE24 = 0x84D8;
+
+  @DomName('WebGL2RenderingContext.TEXTURE25')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE25 = 0x84D9;
+
+  @DomName('WebGL2RenderingContext.TEXTURE26')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE26 = 0x84DA;
+
+  @DomName('WebGL2RenderingContext.TEXTURE27')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE27 = 0x84DB;
+
+  @DomName('WebGL2RenderingContext.TEXTURE28')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE28 = 0x84DC;
+
+  @DomName('WebGL2RenderingContext.TEXTURE29')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE29 = 0x84DD;
+
+  @DomName('WebGL2RenderingContext.TEXTURE3')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE3 = 0x84C3;
+
+  @DomName('WebGL2RenderingContext.TEXTURE30')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE30 = 0x84DE;
+
+  @DomName('WebGL2RenderingContext.TEXTURE31')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE31 = 0x84DF;
+
+  @DomName('WebGL2RenderingContext.TEXTURE4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE4 = 0x84C4;
+
+  @DomName('WebGL2RenderingContext.TEXTURE5')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE5 = 0x84C5;
+
+  @DomName('WebGL2RenderingContext.TEXTURE6')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE6 = 0x84C6;
+
+  @DomName('WebGL2RenderingContext.TEXTURE7')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE7 = 0x84C7;
+
+  @DomName('WebGL2RenderingContext.TEXTURE8')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE8 = 0x84C8;
+
+  @DomName('WebGL2RenderingContext.TEXTURE9')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE9 = 0x84C9;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_2D = 0x0DE1;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_BINDING_2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_BINDING_2D = 0x8069;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_BINDING_CUBE_MAP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_BINDING_CUBE_MAP = 0x8514;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP = 0x8513;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_MAG_FILTER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_MAG_FILTER = 0x2800;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_MIN_FILTER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_MIN_FILTER = 0x2801;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_WRAP_S')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_WRAP_S = 0x2802;
+
+  @DomName('WebGL2RenderingContext.TEXTURE_WRAP_T')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TEXTURE_WRAP_T = 0x2803;
+
+  @DomName('WebGL2RenderingContext.TRIANGLES')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TRIANGLES = 0x0004;
+
+  @DomName('WebGL2RenderingContext.TRIANGLE_FAN')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TRIANGLE_FAN = 0x0006;
+
+  @DomName('WebGL2RenderingContext.TRIANGLE_STRIP')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int TRIANGLE_STRIP = 0x0005;
+
+  @DomName('WebGL2RenderingContext.UNPACK_ALIGNMENT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNPACK_ALIGNMENT = 0x0CF5;
+
+  @DomName('WebGL2RenderingContext.UNPACK_COLORSPACE_CONVERSION_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
+
+  @DomName('WebGL2RenderingContext.UNPACK_FLIP_Y_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNPACK_FLIP_Y_WEBGL = 0x9240;
+
+  @DomName('WebGL2RenderingContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_BYTE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_BYTE = 0x1401;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_INT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_INT = 0x1405;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_SHORT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_SHORT = 0x1403;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_SHORT_4_4_4_4')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_SHORT_4_4_4_4 = 0x8033;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_SHORT_5_5_5_1')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_SHORT_5_5_5_1 = 0x8034;
+
+  @DomName('WebGL2RenderingContext.UNSIGNED_SHORT_5_6_5')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int UNSIGNED_SHORT_5_6_5 = 0x8363;
+
+  @DomName('WebGL2RenderingContext.VALIDATE_STATUS')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VALIDATE_STATUS = 0x8B83;
+
+  @DomName('WebGL2RenderingContext.VENDOR')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VENDOR = 0x1F00;
+
+  @DomName('WebGL2RenderingContext.VERSION')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERSION = 0x1F02;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_ENABLED')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_NORMALIZED')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_POINTER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_SIZE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_STRIDE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
+
+  @DomName('WebGL2RenderingContext.VERTEX_ATTRIB_ARRAY_TYPE')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
+
+  @DomName('WebGL2RenderingContext.VERTEX_SHADER')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VERTEX_SHADER = 0x8B31;
+
+  @DomName('WebGL2RenderingContext.VIEWPORT')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int VIEWPORT = 0x0BA2;
+
+  @DomName('WebGL2RenderingContext.ZERO')
+  @DocsEditable()
+  @Experimental() // untriaged
+  static const int ZERO = 0;
+
+  @DomName('WebGL2RenderingContext.beginQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void beginQuery(int target, Query query) => _blink.BlinkWebGL2RenderingContext.instance.beginQuery_Callback_2_(this, target, query);
+  
+  @DomName('WebGL2RenderingContext.beginTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void beginTransformFeedback(int primitiveMode) => _blink.BlinkWebGL2RenderingContext.instance.beginTransformFeedback_Callback_1_(this, primitiveMode);
+  
+  @DomName('WebGL2RenderingContext.bindBufferBase')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindBufferBase(int target, int index, Buffer buffer) => _blink.BlinkWebGL2RenderingContext.instance.bindBufferBase_Callback_3_(this, target, index, buffer);
+  
+  @DomName('WebGL2RenderingContext.bindBufferRange')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindBufferRange(int target, int index, Buffer buffer, int offset, int size) => _blink.BlinkWebGL2RenderingContext.instance.bindBufferRange_Callback_5_(this, target, index, buffer, offset, size);
+  
+  @DomName('WebGL2RenderingContext.bindSampler')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindSampler(int unit, Sampler sampler) => _blink.BlinkWebGL2RenderingContext.instance.bindSampler_Callback_2_(this, unit, sampler);
+  
+  @DomName('WebGL2RenderingContext.bindTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindTransformFeedback(int target, TransformFeedback feedback) => _blink.BlinkWebGL2RenderingContext.instance.bindTransformFeedback_Callback_2_(this, target, feedback);
+  
+  @DomName('WebGL2RenderingContext.bindVertexArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindVertexArray(VertexArrayObject vertexArray) => _blink.BlinkWebGL2RenderingContext.instance.bindVertexArray_Callback_1_(this, vertexArray);
+  
+  @DomName('WebGL2RenderingContext.blitFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) => _blink.BlinkWebGL2RenderingContext.instance.blitFramebuffer_Callback_10_(this, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+  
+  @DomName('WebGL2RenderingContext.clearBufferfi')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearBufferfi(int buffer, int drawbuffer, num depth, int stencil) => _blink.BlinkWebGL2RenderingContext.instance.clearBufferfi_Callback_4_(this, buffer, drawbuffer, depth, stencil);
+  
+  void clearBufferfv(int buffer, int drawbuffer, value) {
+    if ((value is Float32List) && (drawbuffer is int) && (buffer is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.clearBufferfv_Callback_3_(this, buffer, drawbuffer, value);
+      return;
+    }
+    if ((value is List<num>) && (drawbuffer is int) && (buffer is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.clearBufferfv_Callback_3_(this, buffer, drawbuffer, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void clearBufferiv(int buffer, int drawbuffer, value) {
+    if ((value is Int32List) && (drawbuffer is int) && (buffer is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.clearBufferiv_Callback_3_(this, buffer, drawbuffer, value);
+      return;
+    }
+    if ((value is List<int>) && (drawbuffer is int) && (buffer is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.clearBufferiv_Callback_3_(this, buffer, drawbuffer, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void clearBufferuiv(int buffer, int drawbuffer, value) {
+    if ((value is Uint32List) && (drawbuffer is int) && (buffer is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.clearBufferuiv_Callback_3_(this, buffer, drawbuffer, value);
+      return;
+    }
+    if ((value is List<int>) && (drawbuffer is int) && (buffer is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.clearBufferuiv_Callback_3_(this, buffer, drawbuffer, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.clientWaitSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int clientWaitSync(Sync sync, int flags, int timeout) => _blink.BlinkWebGL2RenderingContext.instance.clientWaitSync_Callback_3_(this, sync, flags, timeout);
+  
+  @DomName('WebGL2RenderingContext.compressedTexImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, TypedData data) => _blink.BlinkWebGL2RenderingContext.instance.compressedTexImage3D_Callback_8_(this, target, level, internalformat, width, height, depth, border, data);
+  
+  @DomName('WebGL2RenderingContext.compressedTexSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, TypedData data) => _blink.BlinkWebGL2RenderingContext.instance.compressedTexSubImage3D_Callback_10_(this, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data);
+  
+  @DomName('WebGL2RenderingContext.copyBufferSubData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyBufferSubData(int readTarget, int writeTarget, int readOffset, int writeOffset, int size) => _blink.BlinkWebGL2RenderingContext.instance.copyBufferSubData_Callback_5_(this, readTarget, writeTarget, readOffset, writeOffset, size);
+  
+  @DomName('WebGL2RenderingContext.copyTexSubImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) => _blink.BlinkWebGL2RenderingContext.instance.copyTexSubImage3D_Callback_9_(this, target, level, xoffset, yoffset, zoffset, x, y, width, height);
+  
+  @DomName('WebGL2RenderingContext.createQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Query createQuery() => _blink.BlinkWebGL2RenderingContext.instance.createQuery_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.createSampler')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Sampler createSampler() => _blink.BlinkWebGL2RenderingContext.instance.createSampler_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.createTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  TransformFeedback createTransformFeedback() => _blink.BlinkWebGL2RenderingContext.instance.createTransformFeedback_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.createVertexArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  VertexArrayObject createVertexArray() => _blink.BlinkWebGL2RenderingContext.instance.createVertexArray_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.deleteQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteQuery(Query query) => _blink.BlinkWebGL2RenderingContext.instance.deleteQuery_Callback_1_(this, query);
+  
+  @DomName('WebGL2RenderingContext.deleteSampler')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteSampler(Sampler sampler) => _blink.BlinkWebGL2RenderingContext.instance.deleteSampler_Callback_1_(this, sampler);
+  
+  @DomName('WebGL2RenderingContext.deleteSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteSync(Sync sync) => _blink.BlinkWebGL2RenderingContext.instance.deleteSync_Callback_1_(this, sync);
+  
+  @DomName('WebGL2RenderingContext.deleteTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteTransformFeedback(TransformFeedback feedback) => _blink.BlinkWebGL2RenderingContext.instance.deleteTransformFeedback_Callback_1_(this, feedback);
+  
+  @DomName('WebGL2RenderingContext.deleteVertexArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteVertexArray(VertexArrayObject vertexArray) => _blink.BlinkWebGL2RenderingContext.instance.deleteVertexArray_Callback_1_(this, vertexArray);
+  
+  @DomName('WebGL2RenderingContext.drawArraysInstanced')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawArraysInstanced(int mode, int first, int count, int instanceCount) => _blink.BlinkWebGL2RenderingContext.instance.drawArraysInstanced_Callback_4_(this, mode, first, count, instanceCount);
+  
+  @DomName('WebGL2RenderingContext.drawBuffers')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawBuffers(List<int> buffers) => _blink.BlinkWebGL2RenderingContext.instance.drawBuffers_Callback_1_(this, buffers);
+  
+  @DomName('WebGL2RenderingContext.drawElementsInstanced')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawElementsInstanced(int mode, int count, int type, int offset, int instanceCount) => _blink.BlinkWebGL2RenderingContext.instance.drawElementsInstanced_Callback_5_(this, mode, count, type, offset, instanceCount);
+  
+  @DomName('WebGL2RenderingContext.drawRangeElements')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawRangeElements(int mode, int start, int end, int count, int type, int offset) => _blink.BlinkWebGL2RenderingContext.instance.drawRangeElements_Callback_6_(this, mode, start, end, count, type, offset);
+  
+  @DomName('WebGL2RenderingContext.endQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void endQuery(int target) => _blink.BlinkWebGL2RenderingContext.instance.endQuery_Callback_1_(this, target);
+  
+  @DomName('WebGL2RenderingContext.endTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void endTransformFeedback() => _blink.BlinkWebGL2RenderingContext.instance.endTransformFeedback_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.fenceSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Sync fenceSync(int condition, int flags) => _blink.BlinkWebGL2RenderingContext.instance.fenceSync_Callback_2_(this, condition, flags);
+  
+  @DomName('WebGL2RenderingContext.framebufferTextureLayer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void framebufferTextureLayer(int target, int attachment, Texture texture, int level, int layer) => _blink.BlinkWebGL2RenderingContext.instance.framebufferTextureLayer_Callback_5_(this, target, attachment, texture, level, layer);
+  
+  @DomName('WebGL2RenderingContext.getActiveUniformBlockName')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String getActiveUniformBlockName(Program program, int uniformBlockIndex) => _blink.BlinkWebGL2RenderingContext.instance.getActiveUniformBlockName_Callback_2_(this, program, uniformBlockIndex);
+  
+  @DomName('WebGL2RenderingContext.getActiveUniformBlockParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getActiveUniformBlockParameter(Program program, int uniformBlockIndex, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getActiveUniformBlockParameter_Callback_3_(this, program, uniformBlockIndex, pname));
+  
+  @DomName('WebGL2RenderingContext.getActiveUniforms')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<int> getActiveUniforms(Program program, List<int> uniformIndices, int pname) => _blink.BlinkWebGL2RenderingContext.instance.getActiveUniforms_Callback_3_(this, program, uniformIndices, pname);
+  
+  @DomName('WebGL2RenderingContext.getBufferSubData')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void getBufferSubData(int target, int offset, ByteBuffer returnedData) => _blink.BlinkWebGL2RenderingContext.instance.getBufferSubData_Callback_3_(this, target, offset, returnedData);
+  
+  @DomName('WebGL2RenderingContext.getFragDataLocation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getFragDataLocation(Program program, String name) => _blink.BlinkWebGL2RenderingContext.instance.getFragDataLocation_Callback_2_(this, program, name);
+  
+  @DomName('WebGL2RenderingContext.getIndexedParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getIndexedParameter(int target, int index) => (_blink.BlinkWebGL2RenderingContext.instance.getIndexedParameter_Callback_2_(this, target, index));
+  
+  @DomName('WebGL2RenderingContext.getInternalformatParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getInternalformatParameter(int target, int internalformat, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getInternalformatParameter_Callback_3_(this, target, internalformat, pname));
+  
+  @DomName('WebGL2RenderingContext.getQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Query getQuery(int target, int pname) => _blink.BlinkWebGL2RenderingContext.instance.getQuery_Callback_2_(this, target, pname);
+  
+  @DomName('WebGL2RenderingContext.getQueryParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getQueryParameter(Query query, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getQueryParameter_Callback_2_(this, query, pname));
+  
+  @DomName('WebGL2RenderingContext.getSamplerParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getSamplerParameter(Sampler sampler, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getSamplerParameter_Callback_2_(this, sampler, pname));
+  
+  @DomName('WebGL2RenderingContext.getSyncParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getSyncParameter(Sync sync, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getSyncParameter_Callback_2_(this, sync, pname));
+  
+  @DomName('WebGL2RenderingContext.getTransformFeedbackVarying')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ActiveInfo getTransformFeedbackVarying(Program program, int index) => _blink.BlinkWebGL2RenderingContext.instance.getTransformFeedbackVarying_Callback_2_(this, program, index);
+  
+  @DomName('WebGL2RenderingContext.getUniformBlockIndex')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getUniformBlockIndex(Program program, String uniformBlockName) => _blink.BlinkWebGL2RenderingContext.instance.getUniformBlockIndex_Callback_2_(this, program, uniformBlockName);
+  
+  @DomName('WebGL2RenderingContext.getUniformIndices')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<int> getUniformIndices(Program program, List<String> uniformNames) => _blink.BlinkWebGL2RenderingContext.instance.getUniformIndices_Callback_2_(this, program, uniformNames);
+  
+  @DomName('WebGL2RenderingContext.invalidateFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void invalidateFramebuffer(int target, List<int> attachments) => _blink.BlinkWebGL2RenderingContext.instance.invalidateFramebuffer_Callback_2_(this, target, attachments);
+  
+  @DomName('WebGL2RenderingContext.invalidateSubFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void invalidateSubFramebuffer(int target, List<int> attachments, int x, int y, int width, int height) => _blink.BlinkWebGL2RenderingContext.instance.invalidateSubFramebuffer_Callback_6_(this, target, attachments, x, y, width, height);
+  
+  @DomName('WebGL2RenderingContext.isQuery')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isQuery(Query query) => _blink.BlinkWebGL2RenderingContext.instance.isQuery_Callback_1_(this, query);
+  
+  @DomName('WebGL2RenderingContext.isSampler')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isSampler(Sampler sampler) => _blink.BlinkWebGL2RenderingContext.instance.isSampler_Callback_1_(this, sampler);
+  
+  @DomName('WebGL2RenderingContext.isSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isSync(Sync sync) => _blink.BlinkWebGL2RenderingContext.instance.isSync_Callback_1_(this, sync);
+  
+  @DomName('WebGL2RenderingContext.isTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isTransformFeedback(TransformFeedback feedback) => _blink.BlinkWebGL2RenderingContext.instance.isTransformFeedback_Callback_1_(this, feedback);
+  
+  @DomName('WebGL2RenderingContext.isVertexArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isVertexArray(VertexArrayObject vertexArray) => _blink.BlinkWebGL2RenderingContext.instance.isVertexArray_Callback_1_(this, vertexArray);
+  
+  @DomName('WebGL2RenderingContext.pauseTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void pauseTransformFeedback() => _blink.BlinkWebGL2RenderingContext.instance.pauseTransformFeedback_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.readBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void readBuffer(int mode) => _blink.BlinkWebGL2RenderingContext.instance.readBuffer_Callback_1_(this, mode);
+  
+  @DomName('WebGL2RenderingContext.renderbufferStorageMultisample')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void renderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height) => _blink.BlinkWebGL2RenderingContext.instance.renderbufferStorageMultisample_Callback_5_(this, target, samples, internalformat, width, height);
+  
+  @DomName('WebGL2RenderingContext.resumeTransformFeedback')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void resumeTransformFeedback() => _blink.BlinkWebGL2RenderingContext.instance.resumeTransformFeedback_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.samplerParameterf')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void samplerParameterf(Sampler sampler, int pname, num param) => _blink.BlinkWebGL2RenderingContext.instance.samplerParameterf_Callback_3_(this, sampler, pname, param);
+  
+  @DomName('WebGL2RenderingContext.samplerParameteri')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void samplerParameteri(Sampler sampler, int pname, int param) => _blink.BlinkWebGL2RenderingContext.instance.samplerParameteri_Callback_3_(this, sampler, pname, param);
+  
+  @DomName('WebGL2RenderingContext.texImage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, TypedData pixels) => _blink.BlinkWebGL2RenderingContext.instance.texImage3D_Callback_10_(this, target, level, internalformat, width, height, depth, border, format, type, pixels);
+  
+  @DomName('WebGL2RenderingContext.texStorage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texStorage2D(int target, int levels, int internalformat, int width, int height) => _blink.BlinkWebGL2RenderingContext.instance.texStorage2D_Callback_5_(this, target, levels, internalformat, width, height);
+  
+  @DomName('WebGL2RenderingContext.texStorage3D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texStorage3D(int target, int levels, int internalformat, int width, int height, int depth) => _blink.BlinkWebGL2RenderingContext.instance.texStorage3D_Callback_6_(this, target, levels, internalformat, width, height, depth);
+  
+  void texSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int format_OR_width, int height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video, [int format, int type, TypedData pixels]) {
+    if ((pixels is TypedData || pixels == null) && (type is int) && (format is int) && (canvas_OR_data_OR_depth_OR_image_OR_video is int) && (height_OR_type is int) && (format_OR_width is int) && (zoffset is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage3D_Callback_11_(this, target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video, format, type, pixels);
+      return;
+    }
+    if ((canvas_OR_data_OR_depth_OR_image_OR_video is ImageData || canvas_OR_data_OR_depth_OR_image_OR_video == null) && (height_OR_type is int) && (format_OR_width is int) && (zoffset is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage3D_Callback_8_(this, target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video);
+      return;
+    }
+    if ((canvas_OR_data_OR_depth_OR_image_OR_video is ImageElement || canvas_OR_data_OR_depth_OR_image_OR_video == null) && (height_OR_type is int) && (format_OR_width is int) && (zoffset is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage3D_Callback_8_(this, target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video);
+      return;
+    }
+    if ((canvas_OR_data_OR_depth_OR_image_OR_video is CanvasElement || canvas_OR_data_OR_depth_OR_image_OR_video == null) && (height_OR_type is int) && (format_OR_width is int) && (zoffset is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage3D_Callback_8_(this, target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video);
+      return;
+    }
+    if ((canvas_OR_data_OR_depth_OR_image_OR_video is VideoElement || canvas_OR_data_OR_depth_OR_image_OR_video == null) && (height_OR_type is int) && (format_OR_width is int) && (zoffset is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage3D_Callback_8_(this, target, level, xoffset, yoffset, zoffset, format_OR_width, height_OR_type, canvas_OR_data_OR_depth_OR_image_OR_video);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.transformFeedbackVaryings')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void transformFeedbackVaryings(Program program, List<String> varyings, int bufferMode) => _blink.BlinkWebGL2RenderingContext.instance.transformFeedbackVaryings_Callback_3_(this, program, varyings, bufferMode);
+  
+  @DomName('WebGL2RenderingContext.uniform1ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1ui(UniformLocation location, int v0) => _blink.BlinkWebGL2RenderingContext.instance.uniform1ui_Callback_2_(this, location, v0);
+  
+  @DomName('WebGL2RenderingContext.uniform1uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1uiv(UniformLocation location, List<int> value) => _blink.BlinkWebGL2RenderingContext.instance.uniform1uiv_Callback_2_(this, location, value);
+  
+  @DomName('WebGL2RenderingContext.uniform2ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2ui(UniformLocation location, int v0, int v1) => _blink.BlinkWebGL2RenderingContext.instance.uniform2ui_Callback_3_(this, location, v0, v1);
+  
+  @DomName('WebGL2RenderingContext.uniform2uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2uiv(UniformLocation location, List<int> value) => _blink.BlinkWebGL2RenderingContext.instance.uniform2uiv_Callback_2_(this, location, value);
+  
+  @DomName('WebGL2RenderingContext.uniform3ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3ui(UniformLocation location, int v0, int v1, int v2) => _blink.BlinkWebGL2RenderingContext.instance.uniform3ui_Callback_4_(this, location, v0, v1, v2);
+  
+  @DomName('WebGL2RenderingContext.uniform3uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3uiv(UniformLocation location, List<int> value) => _blink.BlinkWebGL2RenderingContext.instance.uniform3uiv_Callback_2_(this, location, value);
+  
+  @DomName('WebGL2RenderingContext.uniform4ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4ui(UniformLocation location, int v0, int v1, int v2, int v3) => _blink.BlinkWebGL2RenderingContext.instance.uniform4ui_Callback_5_(this, location, v0, v1, v2, v3);
+  
+  @DomName('WebGL2RenderingContext.uniform4uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4uiv(UniformLocation location, List<int> value) => _blink.BlinkWebGL2RenderingContext.instance.uniform4uiv_Callback_2_(this, location, value);
+  
+  @DomName('WebGL2RenderingContext.uniformBlockBinding')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniformBlockBinding(Program program, int uniformBlockIndex, int uniformBlockBinding) => _blink.BlinkWebGL2RenderingContext.instance.uniformBlockBinding_Callback_3_(this, program, uniformBlockIndex, uniformBlockBinding);
+  
+  void uniformMatrix2x3fv(UniformLocation location, bool transpose, value) {
+    if ((value is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix2x3fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    if ((value is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix2x3fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix2x4fv(UniformLocation location, bool transpose, value) {
+    if ((value is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix2x4fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    if ((value is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix2x4fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix3x2fv(UniformLocation location, bool transpose, value) {
+    if ((value is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix3x2fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    if ((value is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix3x2fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix3x4fv(UniformLocation location, bool transpose, value) {
+    if ((value is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix3x4fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    if ((value is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix3x4fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix4x2fv(UniformLocation location, bool transpose, value) {
+    if ((value is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix4x2fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    if ((value is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix4x2fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix4x3fv(UniformLocation location, bool transpose, value) {
+    if ((value is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix4x3fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    if ((value is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix4x3fv_Callback_3_(this, location, transpose, value);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.vertexAttribDivisor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribDivisor(int index, int divisor) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttribDivisor_Callback_2_(this, index, divisor);
+  
+  @DomName('WebGL2RenderingContext.vertexAttribI4i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribI4i(int index, int x, int y, int z, int w) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttribI4i_Callback_5_(this, index, x, y, z, w);
+  
+  @DomName('WebGL2RenderingContext.vertexAttribI4iv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribI4iv(int index, List<int> v) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttribI4iv_Callback_2_(this, index, v);
+  
+  @DomName('WebGL2RenderingContext.vertexAttribI4ui')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribI4ui(int index, int x, int y, int z, int w) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttribI4ui_Callback_5_(this, index, x, y, z, w);
+  
+  @DomName('WebGL2RenderingContext.vertexAttribI4uiv')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribI4uiv(int index, List<int> v) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttribI4uiv_Callback_2_(this, index, v);
+  
+  @DomName('WebGL2RenderingContext.vertexAttribIPointer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribIPointer(int index, int size, int type, int stride, int offset) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttribIPointer_Callback_5_(this, index, size, type, stride, offset);
+  
+  @DomName('WebGL2RenderingContext.waitSync')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void waitSync(Sync sync, int flags, int timeout) => _blink.BlinkWebGL2RenderingContext.instance.waitSync_Callback_3_(this, sync, flags, timeout);
+  
+  @DomName('WebGL2RenderingContext.canvas')
+  @DocsEditable()
+  @Experimental() // untriaged
+  CanvasElement get canvas => _blink.BlinkWebGL2RenderingContext.instance.canvas_Getter_(this);
+  
+  @DomName('WebGL2RenderingContext.drawingBufferHeight')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get drawingBufferHeight => _blink.BlinkWebGL2RenderingContext.instance.drawingBufferHeight_Getter_(this);
+  
+  @DomName('WebGL2RenderingContext.drawingBufferWidth')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int get drawingBufferWidth => _blink.BlinkWebGL2RenderingContext.instance.drawingBufferWidth_Getter_(this);
+  
+  @DomName('WebGL2RenderingContext.activeTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void activeTexture(int texture) => _blink.BlinkWebGL2RenderingContext.instance.activeTexture_Callback_1_(this, texture);
+  
+  @DomName('WebGL2RenderingContext.attachShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void attachShader(Program program, Shader shader) => _blink.BlinkWebGL2RenderingContext.instance.attachShader_Callback_2_(this, program, shader);
+  
+  @DomName('WebGL2RenderingContext.bindAttribLocation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindAttribLocation(Program program, int index, String name) => _blink.BlinkWebGL2RenderingContext.instance.bindAttribLocation_Callback_3_(this, program, index, name);
+  
+  @DomName('WebGL2RenderingContext.bindBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindBuffer(int target, Buffer buffer) => _blink.BlinkWebGL2RenderingContext.instance.bindBuffer_Callback_2_(this, target, buffer);
+  
+  @DomName('WebGL2RenderingContext.bindFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindFramebuffer(int target, Framebuffer framebuffer) => _blink.BlinkWebGL2RenderingContext.instance.bindFramebuffer_Callback_2_(this, target, framebuffer);
+  
+  @DomName('WebGL2RenderingContext.bindRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindRenderbuffer(int target, Renderbuffer renderbuffer) => _blink.BlinkWebGL2RenderingContext.instance.bindRenderbuffer_Callback_2_(this, target, renderbuffer);
+  
+  @DomName('WebGL2RenderingContext.bindTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void bindTexture(int target, Texture texture) => _blink.BlinkWebGL2RenderingContext.instance.bindTexture_Callback_2_(this, target, texture);
+  
+  @DomName('WebGL2RenderingContext.blendColor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendColor(num red, num green, num blue, num alpha) => _blink.BlinkWebGL2RenderingContext.instance.blendColor_Callback_4_(this, red, green, blue, alpha);
+  
+  @DomName('WebGL2RenderingContext.blendEquation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendEquation(int mode) => _blink.BlinkWebGL2RenderingContext.instance.blendEquation_Callback_1_(this, mode);
+  
+  @DomName('WebGL2RenderingContext.blendEquationSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendEquationSeparate(int modeRGB, int modeAlpha) => _blink.BlinkWebGL2RenderingContext.instance.blendEquationSeparate_Callback_2_(this, modeRGB, modeAlpha);
+  
+  @DomName('WebGL2RenderingContext.blendFunc')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendFunc(int sfactor, int dfactor) => _blink.BlinkWebGL2RenderingContext.instance.blendFunc_Callback_2_(this, sfactor, dfactor);
+  
+  @DomName('WebGL2RenderingContext.blendFuncSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) => _blink.BlinkWebGL2RenderingContext.instance.blendFuncSeparate_Callback_4_(this, srcRGB, dstRGB, srcAlpha, dstAlpha);
+  
+  void bufferData(int target, data_OR_size, int usage) {
+    if ((usage is int) && (data_OR_size is int) && (target is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.bufferData_Callback_3_(this, target, data_OR_size, usage);
+      return;
+    }
+    if ((usage is int) && (data_OR_size is TypedData) && (target is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.bufferData_Callback_3_(this, target, data_OR_size, usage);
+      return;
+    }
+    if ((usage is int) && (data_OR_size is ByteBuffer || data_OR_size == null) && (target is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.bufferData_Callback_3_(this, target, data_OR_size, usage);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void bufferSubData(int target, int offset, data) {
+    if ((data is TypedData) && (offset is int) && (target is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.bufferSubData_Callback_3_(this, target, offset, data);
+      return;
+    }
+    if ((data is ByteBuffer || data == null) && (offset is int) && (target is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.bufferSubData_Callback_3_(this, target, offset, data);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.checkFramebufferStatus')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int checkFramebufferStatus(int target) => _blink.BlinkWebGL2RenderingContext.instance.checkFramebufferStatus_Callback_1_(this, target);
+  
+  @DomName('WebGL2RenderingContext.clear')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clear(int mask) => _blink.BlinkWebGL2RenderingContext.instance.clear_Callback_1_(this, mask);
+  
+  @DomName('WebGL2RenderingContext.clearColor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearColor(num red, num green, num blue, num alpha) => _blink.BlinkWebGL2RenderingContext.instance.clearColor_Callback_4_(this, red, green, blue, alpha);
+  
+  @DomName('WebGL2RenderingContext.clearDepth')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearDepth(num depth) => _blink.BlinkWebGL2RenderingContext.instance.clearDepth_Callback_1_(this, depth);
+  
+  @DomName('WebGL2RenderingContext.clearStencil')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void clearStencil(int s) => _blink.BlinkWebGL2RenderingContext.instance.clearStencil_Callback_1_(this, s);
+  
+  @DomName('WebGL2RenderingContext.colorMask')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void colorMask(bool red, bool green, bool blue, bool alpha) => _blink.BlinkWebGL2RenderingContext.instance.colorMask_Callback_4_(this, red, green, blue, alpha);
+  
+  @DomName('WebGL2RenderingContext.compileShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compileShader(Shader shader) => _blink.BlinkWebGL2RenderingContext.instance.compileShader_Callback_1_(this, shader);
+  
+  @DomName('WebGL2RenderingContext.compressedTexImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, TypedData data) => _blink.BlinkWebGL2RenderingContext.instance.compressedTexImage2D_Callback_7_(this, target, level, internalformat, width, height, border, data);
+  
+  @DomName('WebGL2RenderingContext.compressedTexSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, TypedData data) => _blink.BlinkWebGL2RenderingContext.instance.compressedTexSubImage2D_Callback_8_(this, target, level, xoffset, yoffset, width, height, format, data);
+  
+  @DomName('WebGL2RenderingContext.copyTexImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) => _blink.BlinkWebGL2RenderingContext.instance.copyTexImage2D_Callback_8_(this, target, level, internalformat, x, y, width, height, border);
+  
+  @DomName('WebGL2RenderingContext.copyTexSubImage2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) => _blink.BlinkWebGL2RenderingContext.instance.copyTexSubImage2D_Callback_8_(this, target, level, xoffset, yoffset, x, y, width, height);
+  
+  @DomName('WebGL2RenderingContext.createBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Buffer createBuffer() => _blink.BlinkWebGL2RenderingContext.instance.createBuffer_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.createFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Framebuffer createFramebuffer() => _blink.BlinkWebGL2RenderingContext.instance.createFramebuffer_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.createProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Program createProgram() => _blink.BlinkWebGL2RenderingContext.instance.createProgram_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.createRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Renderbuffer createRenderbuffer() => _blink.BlinkWebGL2RenderingContext.instance.createRenderbuffer_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.createShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Shader createShader(int type) => _blink.BlinkWebGL2RenderingContext.instance.createShader_Callback_1_(this, type);
+  
+  @DomName('WebGL2RenderingContext.createTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Texture createTexture() => _blink.BlinkWebGL2RenderingContext.instance.createTexture_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.cullFace')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void cullFace(int mode) => _blink.BlinkWebGL2RenderingContext.instance.cullFace_Callback_1_(this, mode);
+  
+  @DomName('WebGL2RenderingContext.deleteBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteBuffer(Buffer buffer) => _blink.BlinkWebGL2RenderingContext.instance.deleteBuffer_Callback_1_(this, buffer);
+  
+  @DomName('WebGL2RenderingContext.deleteFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteFramebuffer(Framebuffer framebuffer) => _blink.BlinkWebGL2RenderingContext.instance.deleteFramebuffer_Callback_1_(this, framebuffer);
+  
+  @DomName('WebGL2RenderingContext.deleteProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteProgram(Program program) => _blink.BlinkWebGL2RenderingContext.instance.deleteProgram_Callback_1_(this, program);
+  
+  @DomName('WebGL2RenderingContext.deleteRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteRenderbuffer(Renderbuffer renderbuffer) => _blink.BlinkWebGL2RenderingContext.instance.deleteRenderbuffer_Callback_1_(this, renderbuffer);
+  
+  @DomName('WebGL2RenderingContext.deleteShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteShader(Shader shader) => _blink.BlinkWebGL2RenderingContext.instance.deleteShader_Callback_1_(this, shader);
+  
+  @DomName('WebGL2RenderingContext.deleteTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void deleteTexture(Texture texture) => _blink.BlinkWebGL2RenderingContext.instance.deleteTexture_Callback_1_(this, texture);
+  
+  @DomName('WebGL2RenderingContext.depthFunc')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void depthFunc(int func) => _blink.BlinkWebGL2RenderingContext.instance.depthFunc_Callback_1_(this, func);
+  
+  @DomName('WebGL2RenderingContext.depthMask')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void depthMask(bool flag) => _blink.BlinkWebGL2RenderingContext.instance.depthMask_Callback_1_(this, flag);
+  
+  @DomName('WebGL2RenderingContext.depthRange')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void depthRange(num zNear, num zFar) => _blink.BlinkWebGL2RenderingContext.instance.depthRange_Callback_2_(this, zNear, zFar);
+  
+  @DomName('WebGL2RenderingContext.detachShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void detachShader(Program program, Shader shader) => _blink.BlinkWebGL2RenderingContext.instance.detachShader_Callback_2_(this, program, shader);
+  
+  @DomName('WebGL2RenderingContext.disable')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void disable(int cap) => _blink.BlinkWebGL2RenderingContext.instance.disable_Callback_1_(this, cap);
+  
+  @DomName('WebGL2RenderingContext.disableVertexAttribArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void disableVertexAttribArray(int index) => _blink.BlinkWebGL2RenderingContext.instance.disableVertexAttribArray_Callback_1_(this, index);
+  
+  @DomName('WebGL2RenderingContext.drawArrays')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawArrays(int mode, int first, int count) => _blink.BlinkWebGL2RenderingContext.instance.drawArrays_Callback_3_(this, mode, first, count);
+  
+  @DomName('WebGL2RenderingContext.drawElements')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void drawElements(int mode, int count, int type, int offset) => _blink.BlinkWebGL2RenderingContext.instance.drawElements_Callback_4_(this, mode, count, type, offset);
+  
+  @DomName('WebGL2RenderingContext.enable')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void enable(int cap) => _blink.BlinkWebGL2RenderingContext.instance.enable_Callback_1_(this, cap);
+  
+  @DomName('WebGL2RenderingContext.enableVertexAttribArray')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void enableVertexAttribArray(int index) => _blink.BlinkWebGL2RenderingContext.instance.enableVertexAttribArray_Callback_1_(this, index);
+  
+  @DomName('WebGL2RenderingContext.finish')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void finish() => _blink.BlinkWebGL2RenderingContext.instance.finish_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.flush')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void flush() => _blink.BlinkWebGL2RenderingContext.instance.flush_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.framebufferRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, Renderbuffer renderbuffer) => _blink.BlinkWebGL2RenderingContext.instance.framebufferRenderbuffer_Callback_4_(this, target, attachment, renderbuffertarget, renderbuffer);
+  
+  @DomName('WebGL2RenderingContext.framebufferTexture2D')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void framebufferTexture2D(int target, int attachment, int textarget, Texture texture, int level) => _blink.BlinkWebGL2RenderingContext.instance.framebufferTexture2D_Callback_5_(this, target, attachment, textarget, texture, level);
+  
+  @DomName('WebGL2RenderingContext.frontFace')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void frontFace(int mode) => _blink.BlinkWebGL2RenderingContext.instance.frontFace_Callback_1_(this, mode);
+  
+  @DomName('WebGL2RenderingContext.generateMipmap')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void generateMipmap(int target) => _blink.BlinkWebGL2RenderingContext.instance.generateMipmap_Callback_1_(this, target);
+  
+  @DomName('WebGL2RenderingContext.getActiveAttrib')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ActiveInfo getActiveAttrib(Program program, int index) => _blink.BlinkWebGL2RenderingContext.instance.getActiveAttrib_Callback_2_(this, program, index);
+  
+  @DomName('WebGL2RenderingContext.getActiveUniform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ActiveInfo getActiveUniform(Program program, int index) => _blink.BlinkWebGL2RenderingContext.instance.getActiveUniform_Callback_2_(this, program, index);
+  
+  @DomName('WebGL2RenderingContext.getAttachedShaders')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<Shader> getAttachedShaders(Program program) => _blink.BlinkWebGL2RenderingContext.instance.getAttachedShaders_Callback_1_(this, program);
+  
+  @DomName('WebGL2RenderingContext.getAttribLocation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getAttribLocation(Program program, String name) => _blink.BlinkWebGL2RenderingContext.instance.getAttribLocation_Callback_2_(this, program, name);
+  
+  @DomName('WebGL2RenderingContext.getBufferParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getBufferParameter(int target, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getBufferParameter_Callback_2_(this, target, pname));
+  
+  @DomName('WebGL2RenderingContext.getContextAttributes')
+  @DocsEditable()
+  @Experimental() // untriaged
+   getContextAttributes() => convertNativeDictionaryToDartDictionary((_blink.BlinkWebGL2RenderingContext.instance.getContextAttributes_Callback_0_(this)));
+  
+  @DomName('WebGL2RenderingContext.getError')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getError() => _blink.BlinkWebGL2RenderingContext.instance.getError_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.getExtension')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getExtension(String name) => (_blink.BlinkWebGL2RenderingContext.instance.getExtension_Callback_1_(this, name));
+  
+  @DomName('WebGL2RenderingContext.getFramebufferAttachmentParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getFramebufferAttachmentParameter(int target, int attachment, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getFramebufferAttachmentParameter_Callback_3_(this, target, attachment, pname));
+  
+  @DomName('WebGL2RenderingContext.getParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getParameter(int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getParameter_Callback_1_(this, pname));
+  
+  @DomName('WebGL2RenderingContext.getProgramInfoLog')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String getProgramInfoLog(Program program) => _blink.BlinkWebGL2RenderingContext.instance.getProgramInfoLog_Callback_1_(this, program);
+  
+  @DomName('WebGL2RenderingContext.getProgramParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getProgramParameter(Program program, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getProgramParameter_Callback_2_(this, program, pname));
+  
+  @DomName('WebGL2RenderingContext.getRenderbufferParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getRenderbufferParameter(int target, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getRenderbufferParameter_Callback_2_(this, target, pname));
+  
+  @DomName('WebGL2RenderingContext.getShaderInfoLog')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String getShaderInfoLog(Shader shader) => _blink.BlinkWebGL2RenderingContext.instance.getShaderInfoLog_Callback_1_(this, shader);
+  
+  @DomName('WebGL2RenderingContext.getShaderParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getShaderParameter(Shader shader, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getShaderParameter_Callback_2_(this, shader, pname));
+  
+  @DomName('WebGL2RenderingContext.getShaderPrecisionFormat')
+  @DocsEditable()
+  @Experimental() // untriaged
+  ShaderPrecisionFormat getShaderPrecisionFormat(int shadertype, int precisiontype) => _blink.BlinkWebGL2RenderingContext.instance.getShaderPrecisionFormat_Callback_2_(this, shadertype, precisiontype);
+  
+  @DomName('WebGL2RenderingContext.getShaderSource')
+  @DocsEditable()
+  @Experimental() // untriaged
+  String getShaderSource(Shader shader) => _blink.BlinkWebGL2RenderingContext.instance.getShaderSource_Callback_1_(this, shader);
+  
+  @DomName('WebGL2RenderingContext.getSupportedExtensions')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<String> getSupportedExtensions() => _blink.BlinkWebGL2RenderingContext.instance.getSupportedExtensions_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.getTexParameter')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getTexParameter(int target, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getTexParameter_Callback_2_(this, target, pname));
+  
+  @DomName('WebGL2RenderingContext.getUniform')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getUniform(Program program, UniformLocation location) => (_blink.BlinkWebGL2RenderingContext.instance.getUniform_Callback_2_(this, program, location));
+  
+  @DomName('WebGL2RenderingContext.getUniformLocation')
+  @DocsEditable()
+  @Experimental() // untriaged
+  UniformLocation getUniformLocation(Program program, String name) => _blink.BlinkWebGL2RenderingContext.instance.getUniformLocation_Callback_2_(this, program, name);
+  
+  @DomName('WebGL2RenderingContext.getVertexAttrib')
+  @DocsEditable()
+  @Experimental() // untriaged
+  Object getVertexAttrib(int index, int pname) => (_blink.BlinkWebGL2RenderingContext.instance.getVertexAttrib_Callback_2_(this, index, pname));
+  
+  @DomName('WebGL2RenderingContext.getVertexAttribOffset')
+  @DocsEditable()
+  @Experimental() // untriaged
+  int getVertexAttribOffset(int index, int pname) => _blink.BlinkWebGL2RenderingContext.instance.getVertexAttribOffset_Callback_2_(this, index, pname);
+  
+  @DomName('WebGL2RenderingContext.hint')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void hint(int target, int mode) => _blink.BlinkWebGL2RenderingContext.instance.hint_Callback_2_(this, target, mode);
+  
+  @DomName('WebGL2RenderingContext.isBuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isBuffer(Buffer buffer) => _blink.BlinkWebGL2RenderingContext.instance.isBuffer_Callback_1_(this, buffer);
+  
+  @DomName('WebGL2RenderingContext.isContextLost')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isContextLost() => _blink.BlinkWebGL2RenderingContext.instance.isContextLost_Callback_0_(this);
+  
+  @DomName('WebGL2RenderingContext.isEnabled')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isEnabled(int cap) => _blink.BlinkWebGL2RenderingContext.instance.isEnabled_Callback_1_(this, cap);
+  
+  @DomName('WebGL2RenderingContext.isFramebuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isFramebuffer(Framebuffer framebuffer) => _blink.BlinkWebGL2RenderingContext.instance.isFramebuffer_Callback_1_(this, framebuffer);
+  
+  @DomName('WebGL2RenderingContext.isProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isProgram(Program program) => _blink.BlinkWebGL2RenderingContext.instance.isProgram_Callback_1_(this, program);
+  
+  @DomName('WebGL2RenderingContext.isRenderbuffer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isRenderbuffer(Renderbuffer renderbuffer) => _blink.BlinkWebGL2RenderingContext.instance.isRenderbuffer_Callback_1_(this, renderbuffer);
+  
+  @DomName('WebGL2RenderingContext.isShader')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isShader(Shader shader) => _blink.BlinkWebGL2RenderingContext.instance.isShader_Callback_1_(this, shader);
+  
+  @DomName('WebGL2RenderingContext.isTexture')
+  @DocsEditable()
+  @Experimental() // untriaged
+  bool isTexture(Texture texture) => _blink.BlinkWebGL2RenderingContext.instance.isTexture_Callback_1_(this, texture);
+  
+  @DomName('WebGL2RenderingContext.lineWidth')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void lineWidth(num width) => _blink.BlinkWebGL2RenderingContext.instance.lineWidth_Callback_1_(this, width);
+  
+  @DomName('WebGL2RenderingContext.linkProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void linkProgram(Program program) => _blink.BlinkWebGL2RenderingContext.instance.linkProgram_Callback_1_(this, program);
+  
+  @DomName('WebGL2RenderingContext.pixelStorei')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void pixelStorei(int pname, int param) => _blink.BlinkWebGL2RenderingContext.instance.pixelStorei_Callback_2_(this, pname, param);
+  
+  @DomName('WebGL2RenderingContext.polygonOffset')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void polygonOffset(num factor, num units) => _blink.BlinkWebGL2RenderingContext.instance.polygonOffset_Callback_2_(this, factor, units);
+  
+  @DomName('WebGL2RenderingContext.readPixels')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void readPixels(int x, int y, int width, int height, int format, int type, TypedData pixels) => _blink.BlinkWebGL2RenderingContext.instance.readPixels_Callback_7_(this, x, y, width, height, format, type, pixels);
+  
+  @DomName('WebGL2RenderingContext.renderbufferStorage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void renderbufferStorage(int target, int internalformat, int width, int height) => _blink.BlinkWebGL2RenderingContext.instance.renderbufferStorage_Callback_4_(this, target, internalformat, width, height);
+  
+  @DomName('WebGL2RenderingContext.sampleCoverage')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void sampleCoverage(num value, bool invert) => _blink.BlinkWebGL2RenderingContext.instance.sampleCoverage_Callback_2_(this, value, invert);
+  
+  @DomName('WebGL2RenderingContext.scissor')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void scissor(int x, int y, int width, int height) => _blink.BlinkWebGL2RenderingContext.instance.scissor_Callback_4_(this, x, y, width, height);
+  
+  @DomName('WebGL2RenderingContext.shaderSource')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void shaderSource(Shader shader, String string) => _blink.BlinkWebGL2RenderingContext.instance.shaderSource_Callback_2_(this, shader, string);
+  
+  @DomName('WebGL2RenderingContext.stencilFunc')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilFunc(int func, int ref, int mask) => _blink.BlinkWebGL2RenderingContext.instance.stencilFunc_Callback_3_(this, func, ref, mask);
+  
+  @DomName('WebGL2RenderingContext.stencilFuncSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilFuncSeparate(int face, int func, int ref, int mask) => _blink.BlinkWebGL2RenderingContext.instance.stencilFuncSeparate_Callback_4_(this, face, func, ref, mask);
+  
+  @DomName('WebGL2RenderingContext.stencilMask')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilMask(int mask) => _blink.BlinkWebGL2RenderingContext.instance.stencilMask_Callback_1_(this, mask);
+  
+  @DomName('WebGL2RenderingContext.stencilMaskSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilMaskSeparate(int face, int mask) => _blink.BlinkWebGL2RenderingContext.instance.stencilMaskSeparate_Callback_2_(this, face, mask);
+  
+  @DomName('WebGL2RenderingContext.stencilOp')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilOp(int fail, int zfail, int zpass) => _blink.BlinkWebGL2RenderingContext.instance.stencilOp_Callback_3_(this, fail, zfail, zpass);
+  
+  @DomName('WebGL2RenderingContext.stencilOpSeparate')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void stencilOpSeparate(int face, int fail, int zfail, int zpass) => _blink.BlinkWebGL2RenderingContext.instance.stencilOpSeparate_Callback_4_(this, face, fail, zfail, zpass);
+  
+  void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) {
+    if ((pixels is TypedData || pixels == null) && (type is int) && (format is int) && (border_OR_canvas_OR_image_OR_pixels_OR_video is int) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.texImage2D_Callback_9_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
+      return;
+    }
+    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texImage2D_Callback_6_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texImage2D_Callback_6_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texImage2D_Callback_6_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement) && (height_OR_type is int) && (format_OR_width is int) && (internalformat is int) && (level is int) && (target is int) && format == null && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texImage2D_Callback_6_(this, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.texParameterf')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texParameterf(int target, int pname, num param) => _blink.BlinkWebGL2RenderingContext.instance.texParameterf_Callback_3_(this, target, pname, param);
+  
+  @DomName('WebGL2RenderingContext.texParameteri')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void texParameteri(int target, int pname, int param) => _blink.BlinkWebGL2RenderingContext.instance.texParameteri_Callback_3_(this, target, pname, param);
+  
+  void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, TypedData pixels]) {
+    if ((pixels is TypedData || pixels == null) && (type is int) && (canvas_OR_format_OR_image_OR_pixels_OR_video is int) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage2D_Callback_9_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
+      return;
+    }
+    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage2D_Callback_7_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage2D_Callback_7_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage2D_Callback_7_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement) && (height_OR_type is int) && (format_OR_width is int) && (yoffset is int) && (xoffset is int) && (level is int) && (target is int) && type == null && pixels == null) {
+      _blink.BlinkWebGL2RenderingContext.instance.texSubImage2D_Callback_7_(this, target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.uniform1f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1f(UniformLocation location, num x) => _blink.BlinkWebGL2RenderingContext.instance.uniform1f_Callback_2_(this, location, x);
+  
+  void uniform1fv(UniformLocation location, v) {
+    if ((v is Float32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform1fv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<num>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform1fv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.uniform1i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform1i(UniformLocation location, int x) => _blink.BlinkWebGL2RenderingContext.instance.uniform1i_Callback_2_(this, location, x);
+  
+  void uniform1iv(UniformLocation location, v) {
+    if ((v is Int32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform1iv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<int>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform1iv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.uniform2f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2f(UniformLocation location, num x, num y) => _blink.BlinkWebGL2RenderingContext.instance.uniform2f_Callback_3_(this, location, x, y);
+  
+  void uniform2fv(UniformLocation location, v) {
+    if ((v is Float32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform2fv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<num>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform2fv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.uniform2i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform2i(UniformLocation location, int x, int y) => _blink.BlinkWebGL2RenderingContext.instance.uniform2i_Callback_3_(this, location, x, y);
+  
+  void uniform2iv(UniformLocation location, v) {
+    if ((v is Int32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform2iv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<int>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform2iv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.uniform3f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3f(UniformLocation location, num x, num y, num z) => _blink.BlinkWebGL2RenderingContext.instance.uniform3f_Callback_4_(this, location, x, y, z);
+  
+  void uniform3fv(UniformLocation location, v) {
+    if ((v is Float32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform3fv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<num>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform3fv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.uniform3i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform3i(UniformLocation location, int x, int y, int z) => _blink.BlinkWebGL2RenderingContext.instance.uniform3i_Callback_4_(this, location, x, y, z);
+  
+  void uniform3iv(UniformLocation location, v) {
+    if ((v is Int32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform3iv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<int>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform3iv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.uniform4f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4f(UniformLocation location, num x, num y, num z, num w) => _blink.BlinkWebGL2RenderingContext.instance.uniform4f_Callback_5_(this, location, x, y, z, w);
+  
+  void uniform4fv(UniformLocation location, v) {
+    if ((v is Float32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform4fv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<num>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform4fv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.uniform4i')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void uniform4i(UniformLocation location, int x, int y, int z, int w) => _blink.BlinkWebGL2RenderingContext.instance.uniform4i_Callback_5_(this, location, x, y, z, w);
+  
+  void uniform4iv(UniformLocation location, v) {
+    if ((v is Int32List) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform4iv_Callback_2_(this, location, v);
+      return;
+    }
+    if ((v is List<int>) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniform4iv_Callback_2_(this, location, v);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix2fv(UniformLocation location, bool transpose, array) {
+    if ((array is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix2fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    if ((array is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix2fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix3fv(UniformLocation location, bool transpose, array) {
+    if ((array is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix3fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    if ((array is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix3fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  void uniformMatrix4fv(UniformLocation location, bool transpose, array) {
+    if ((array is Float32List) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix4fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    if ((array is List<num>) && (transpose is bool) && (location is UniformLocation || location == null)) {
+      _blink.BlinkWebGL2RenderingContext.instance.uniformMatrix4fv_Callback_3_(this, location, transpose, array);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.useProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void useProgram(Program program) => _blink.BlinkWebGL2RenderingContext.instance.useProgram_Callback_1_(this, program);
+  
+  @DomName('WebGL2RenderingContext.validateProgram')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void validateProgram(Program program) => _blink.BlinkWebGL2RenderingContext.instance.validateProgram_Callback_1_(this, program);
+  
+  @DomName('WebGL2RenderingContext.vertexAttrib1f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib1f(int indx, num x) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib1f_Callback_2_(this, indx, x);
+  
+  void vertexAttrib1fv(int indx, values) {
+    if ((values is Float32List) && (indx is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib1fv_Callback_2_(this, indx, values);
+      return;
+    }
+    if ((values is List<num>) && (indx is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib1fv_Callback_2_(this, indx, values);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.vertexAttrib2f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib2f(int indx, num x, num y) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib2f_Callback_3_(this, indx, x, y);
+  
+  void vertexAttrib2fv(int indx, values) {
+    if ((values is Float32List) && (indx is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib2fv_Callback_2_(this, indx, values);
+      return;
+    }
+    if ((values is List<num>) && (indx is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib2fv_Callback_2_(this, indx, values);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.vertexAttrib3f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib3f(int indx, num x, num y, num z) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib3f_Callback_4_(this, indx, x, y, z);
+  
+  void vertexAttrib3fv(int indx, values) {
+    if ((values is Float32List) && (indx is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib3fv_Callback_2_(this, indx, values);
+      return;
+    }
+    if ((values is List<num>) && (indx is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib3fv_Callback_2_(this, indx, values);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.vertexAttrib4f')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttrib4f(int indx, num x, num y, num z, num w) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib4f_Callback_5_(this, indx, x, y, z, w);
+  
+  void vertexAttrib4fv(int indx, values) {
+    if ((values is Float32List) && (indx is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib4fv_Callback_2_(this, indx, values);
+      return;
+    }
+    if ((values is List<num>) && (indx is int)) {
+      _blink.BlinkWebGL2RenderingContext.instance.vertexAttrib4fv_Callback_2_(this, indx, values);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
+  }
+
+  @DomName('WebGL2RenderingContext.vertexAttribPointer')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void vertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) => _blink.BlinkWebGL2RenderingContext.instance.vertexAttribPointer_Callback_6_(this, indx, size, type, normalized, stride, offset);
+  
+  @DomName('WebGL2RenderingContext.viewport')
+  @DocsEditable()
+  @Experimental() // untriaged
+  void viewport(int x, int y, int width, int height) => _blink.BlinkWebGL2RenderingContext.instance.viewport_Callback_4_(this, x, y, width, height);
+  
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('WebGLSampler')
+@Experimental() // untriaged
+class Sampler extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory Sampler._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  Sampler.internal_() { }
+
 }
 // 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
@@ -3590,21 +6355,13 @@
   // To suppress missing implicit constructor warnings.
   factory Shader._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Shader internalCreateShader() {
-    return new Shader._internalWrap();
-  }
 
-  factory Shader._internalWrap() {
-    return new Shader.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Shader.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
 }
 // 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
@@ -3619,32 +6376,24 @@
   // To suppress missing implicit constructor warnings.
   factory ShaderPrecisionFormat._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static ShaderPrecisionFormat internalCreateShaderPrecisionFormat() {
-    return new ShaderPrecisionFormat._internalWrap();
-  }
 
-  factory ShaderPrecisionFormat._internalWrap() {
-    return new ShaderPrecisionFormat.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   ShaderPrecisionFormat.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('WebGLShaderPrecisionFormat.precision')
   @DocsEditable()
-  int get precision => _blink.BlinkWebGLShaderPrecisionFormat.instance.precision_Getter_(unwrap_jso(this));
+  int get precision => _blink.BlinkWebGLShaderPrecisionFormat.instance.precision_Getter_(this);
   
   @DomName('WebGLShaderPrecisionFormat.rangeMax')
   @DocsEditable()
-  int get rangeMax => _blink.BlinkWebGLShaderPrecisionFormat.instance.rangeMax_Getter_(unwrap_jso(this));
+  int get rangeMax => _blink.BlinkWebGLShaderPrecisionFormat.instance.rangeMax_Getter_(this);
   
   @DomName('WebGLShaderPrecisionFormat.rangeMin')
   @DocsEditable()
-  int get rangeMin => _blink.BlinkWebGLShaderPrecisionFormat.instance.rangeMin_Getter_(unwrap_jso(this));
+  int get rangeMin => _blink.BlinkWebGLShaderPrecisionFormat.instance.rangeMin_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3655,25 +6404,61 @@
 
 
 @DocsEditable()
+@DomName('WebGLSync')
+@Experimental() // untriaged
+class Sync extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory Sync._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  Sync.internal_() { }
+
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
 @DomName('WebGLTexture')
 class Texture extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Texture._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static Texture internalCreateTexture() {
-    return new Texture._internalWrap();
-  }
 
-  factory Texture._internalWrap() {
-    return new Texture.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   Texture.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('WebGLTransformFeedback')
+@Experimental() // untriaged
+class TransformFeedback extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory TransformFeedback._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  TransformFeedback.internal_() { }
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3689,20 +6474,34 @@
   // To suppress missing implicit constructor warnings.
   factory UniformLocation._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static UniformLocation internalCreateUniformLocation() {
-    return new UniformLocation._internalWrap();
-  }
 
-  factory UniformLocation._internalWrap() {
-    return new UniformLocation.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   UniformLocation.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('WebGLVertexArrayObject')
+@Experimental() // untriaged
+class VertexArrayObject extends DartHtmlDomObject {
+  // To suppress missing implicit constructor warnings.
+  factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  VertexArrayObject.internal_() { }
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -3716,24 +6515,38 @@
 @DomName('WebGLVertexArrayObjectOES')
 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
 @Experimental() // experimental
-class VertexArrayObject extends DartHtmlDomObject {
+class VertexArrayObjectOes extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
-  factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); }
+  factory VertexArrayObjectOes._() { throw new UnsupportedError("Not supported"); }
+
 
   @Deprecated("Internal Use Only")
-  static VertexArrayObject internalCreateVertexArrayObject() {
-    return new VertexArrayObject._internalWrap();
-  }
-
-  factory VertexArrayObject._internalWrap() {
-    return new VertexArrayObject.internal_();
-  }
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
-  VertexArrayObject.internal_() { }
+  VertexArrayObjectOes.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+}
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
+@DomName('WebGL2RenderingContextBase')
+@Experimental() // untriaged
+class _WebGL2RenderingContextBase extends DartHtmlDomObject implements _WebGLRenderingContextBase {
+  // To suppress missing implicit constructor warnings.
+  factory _WebGL2RenderingContextBase._() { throw new UnsupportedError("Not supported"); }
+
+
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
+
+  @Deprecated("Internal Use Only")
+  _WebGL2RenderingContextBase.internal_() { }
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
diff --git a/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart b/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
index 433459d..6592ea8 100644
--- a/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
+++ b/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
@@ -15,7 +15,6 @@
 import 'dart:_internal';
 import 'dart:html';
 import 'dart:html_common';
-import 'dart:_js_helper' show convertDartClosureToJS, Creates, JSName, Native;
 import 'dart:_foreign_helper' show JS;
 import 'dart:_interceptors' show Interceptor;
 // DO NOT EDIT - unless you are editing documentation as per:
@@ -23,6 +22,8 @@
 // Auto-generated dart:audio library.
 
 
+import 'dart:_js_helper' show convertDartClosureToJS, Creates, JSName, Native,
+    JavaScriptIndexingBehavior;
 
 
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -263,14 +264,12 @@
 
   @DomName('SQLResultSetRowList.item')
   @DocsEditable()
-  @Creates('=Object')
   Map item(int index) {
     return convertNativeToDart_Dictionary(_item_1(index));
   }
   @JSName('item')
   @DomName('SQLResultSetRowList.item')
   @DocsEditable()
-  @Creates('=Object')
   _item_1(index) native;
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -292,5 +291,5 @@
 
   @DomName('SQLTransaction.executeSql')
   @DocsEditable()
-  void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) native;
+  void executeSql(String sqlStatement, [List arguments, SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) native;
 }
diff --git a/sdk/lib/web_sql/dartium/web_sql_dartium.dart b/sdk/lib/web_sql/dartium/web_sql_dartium.dart
index c7e6c93..2e26f43 100644
--- a/sdk/lib/web_sql/dartium/web_sql_dartium.dart
+++ b/sdk/lib/web_sql/dartium/web_sql_dartium.dart
@@ -29,22 +29,11 @@
 // FIXME: Can we make this private?
 @Deprecated("Internal Use Only")
 final web_sqlBlinkMap = {
-  'Database': () => SqlDatabase,
-  'SQLError': () => SqlError,
-  'SQLResultSet': () => SqlResultSet,
-  'SQLResultSetRowList': () => SqlResultSetRowList,
-  'SQLTransaction': () => SqlTransaction,
-
-};
-
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final web_sqlBlinkFunctionMap = {
-  'Database': () => SqlDatabase.internalCreateSqlDatabase,
-  'SQLError': () => SqlError.internalCreateSqlError,
-  'SQLResultSet': () => SqlResultSet.internalCreateSqlResultSet,
-  'SQLResultSetRowList': () => SqlResultSetRowList.internalCreateSqlResultSetRowList,
-  'SQLTransaction': () => SqlTransaction.internalCreateSqlTransaction,
+  'Database': () => SqlDatabase.instanceRuntimeType,
+  'SQLError': () => SqlError.instanceRuntimeType,
+  'SQLResultSet': () => SqlResultSet.instanceRuntimeType,
+  'SQLResultSetRowList': () => SqlResultSetRowList.instanceRuntimeType,
+  'SQLTransaction': () => SqlTransaction.instanceRuntimeType,
 
 };
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -109,68 +98,60 @@
   // To suppress missing implicit constructor warnings.
   factory SqlDatabase._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SqlDatabase internalCreateSqlDatabase() {
-    return new SqlDatabase._internalWrap();
-  }
 
-  factory SqlDatabase._internalWrap() {
-    return new SqlDatabase.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SqlDatabase.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   /// Checks if this type is supported on the current platform.
   static bool get supported => true;
 
   @DomName('Database.version')
   @DocsEditable()
-  String get version => _blink.BlinkDatabase.instance.version_Getter_(unwrap_jso(this));
+  String get version => _blink.BlinkDatabase.instance.version_Getter_(this);
   
   void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallback callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) {
     if (successCallback != null) {
-      _blink.BlinkDatabase.instance.changeVersion_Callback_5_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))), unwrap_jso(() => successCallback()));
+      _blink.BlinkDatabase.instance.changeVersion_Callback_5_(this, oldVersion, newVersion, callback, errorCallback, successCallback);
       return;
     }
     if (errorCallback != null) {
-      _blink.BlinkDatabase.instance.changeVersion_Callback_4_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDatabase.instance.changeVersion_Callback_4_(this, oldVersion, newVersion, callback, errorCallback);
       return;
     }
     if (callback != null) {
-      _blink.BlinkDatabase.instance.changeVersion_Callback_3_(unwrap_jso(this), oldVersion, newVersion, unwrap_jso((transaction) => callback(wrap_jso(transaction))));
+      _blink.BlinkDatabase.instance.changeVersion_Callback_3_(this, oldVersion, newVersion, callback);
       return;
     }
-    _blink.BlinkDatabase.instance.changeVersion_Callback_2_(unwrap_jso(this), oldVersion, newVersion);
+    _blink.BlinkDatabase.instance.changeVersion_Callback_2_(this, oldVersion, newVersion);
     return;
   }
 
   void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) {
     if (successCallback != null) {
-      _blink.BlinkDatabase.instance.readTransaction_Callback_3_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))), unwrap_jso(() => successCallback()));
+      _blink.BlinkDatabase.instance.readTransaction_Callback_3_(this, callback, errorCallback, successCallback);
       return;
     }
     if (errorCallback != null) {
-      _blink.BlinkDatabase.instance.readTransaction_Callback_2_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDatabase.instance.readTransaction_Callback_2_(this, callback, errorCallback);
       return;
     }
-    _blink.BlinkDatabase.instance.readTransaction_Callback_1_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))));
+    _blink.BlinkDatabase.instance.readTransaction_Callback_1_(this, callback);
     return;
   }
 
   void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) {
     if (successCallback != null) {
-      _blink.BlinkDatabase.instance.transaction_Callback_3_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))), unwrap_jso(() => successCallback()));
+      _blink.BlinkDatabase.instance.transaction_Callback_3_(this, callback, errorCallback, successCallback);
       return;
     }
     if (errorCallback != null) {
-      _blink.BlinkDatabase.instance.transaction_Callback_2_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))), unwrap_jso((error) => errorCallback(wrap_jso(error))));
+      _blink.BlinkDatabase.instance.transaction_Callback_2_(this, callback, errorCallback);
       return;
     }
-    _blink.BlinkDatabase.instance.transaction_Callback_1_(unwrap_jso(this), unwrap_jso((transaction) => callback(wrap_jso(transaction))));
+    _blink.BlinkDatabase.instance.transaction_Callback_1_(this, callback);
     return;
   }
 
@@ -190,21 +171,13 @@
   // To suppress missing implicit constructor warnings.
   factory SqlError._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SqlError internalCreateSqlError() {
-    return new SqlError._internalWrap();
-  }
 
-  factory SqlError._internalWrap() {
-    return new SqlError.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SqlError.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SQLError.CONSTRAINT_ERR')
   @DocsEditable()
   static const int CONSTRAINT_ERR = 6;
@@ -239,11 +212,11 @@
 
   @DomName('SQLError.code')
   @DocsEditable()
-  int get code => _blink.BlinkSQLError.instance.code_Getter_(unwrap_jso(this));
+  int get code => _blink.BlinkSQLError.instance.code_Getter_(this);
   
   @DomName('SQLError.message')
   @DocsEditable()
-  String get message => _blink.BlinkSQLError.instance.message_Getter_(unwrap_jso(this));
+  String get message => _blink.BlinkSQLError.instance.message_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -261,32 +234,24 @@
   // To suppress missing implicit constructor warnings.
   factory SqlResultSet._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SqlResultSet internalCreateSqlResultSet() {
-    return new SqlResultSet._internalWrap();
-  }
 
-  factory SqlResultSet._internalWrap() {
-    return new SqlResultSet.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SqlResultSet.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SQLResultSet.insertId')
   @DocsEditable()
-  int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(unwrap_jso(this));
+  int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(this);
   
   @DomName('SQLResultSet.rows')
   @DocsEditable()
-  SqlResultSetRowList get rows => wrap_jso(_blink.BlinkSQLResultSet.instance.rows_Getter_(unwrap_jso(this)));
+  SqlResultSetRowList get rows => _blink.BlinkSQLResultSet.instance.rows_Getter_(this);
   
   @DomName('SQLResultSet.rowsAffected')
   @DocsEditable()
-  int get rowsAffected => _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_(unwrap_jso(this));
+  int get rowsAffected => _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_(this);
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -304,32 +269,24 @@
   // To suppress missing implicit constructor warnings.
   factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SqlResultSetRowList internalCreateSqlResultSetRowList() {
-    return new SqlResultSetRowList._internalWrap();
-  }
 
-  factory SqlResultSetRowList._internalWrap() {
-    return new SqlResultSetRowList.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SqlResultSetRowList.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
-
   @DomName('SQLResultSetRowList.length')
   @DocsEditable()
-  int get length => _blink.BlinkSQLResultSetRowList.instance.length_Getter_(unwrap_jso(this));
+  int get length => _blink.BlinkSQLResultSetRowList.instance.length_Getter_(this);
   
   Map operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return wrap_jso(_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index));
+    return _nativeIndexedGetter(index);
   }
 
-  Map _nativeIndexedGetter(int index) => wrap_jso(_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Map _nativeIndexedGetter(int index) => convertNativeToDart_Dictionary(_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(this, index));
 
   void operator[]=(int index, Map value) {
     throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -371,7 +328,7 @@
 
   @DomName('SQLResultSetRowList.item')
   @DocsEditable()
-  Map item(int index) => wrap_jso(_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(this), index));
+  Object item(int index) => convertNativeToDart_Dictionary(_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(this, index));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -392,23 +349,28 @@
   // To suppress missing implicit constructor warnings.
   factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
 
-  @Deprecated("Internal Use Only")
-  static SqlTransaction internalCreateSqlTransaction() {
-    return new SqlTransaction._internalWrap();
-  }
 
-  factory SqlTransaction._internalWrap() {
-    return new SqlTransaction.internal_();
-  }
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   SqlTransaction.internal_() { }
 
-  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);
-  int get hashCode => unwrap_jso(this).hashCode;
+  void executeSql(String sqlStatement, [List arguments, SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) {
+    if (errorCallback != null) {
+      _blink.BlinkSQLTransaction.instance.executeSql_Callback_4_(this, sqlStatement, arguments, callback, errorCallback);
+      return;
+    }
+    if (callback != null) {
+      _blink.BlinkSQLTransaction.instance.executeSql_Callback_3_(this, sqlStatement, arguments, callback);
+      return;
+    }
+    if (arguments != null) {
+      _blink.BlinkSQLTransaction.instance.executeSql_Callback_2_(this, sqlStatement, arguments);
+      return;
+    }
+    _blink.BlinkSQLTransaction.instance.executeSql_Callback_1_(this, sqlStatement);
+    return;
+  }
 
-  @DomName('SQLTransaction.executeSql')
-  @DocsEditable()
-  void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTransaction.instance.executeSql_Callback_4_(unwrap_jso(this), sqlStatement, unwrap_jso(arguments), unwrap_jso((transaction, resultSet) => callback(wrap_jso(transaction), wrap_jso(resultSet))), unwrap_jso((transaction, error) => errorCallback(wrap_jso(transaction), wrap_jso(error))));
-  
 }
diff --git a/tests/benchmark_smoke/benchmark_smoke.status b/tests/benchmark_smoke/benchmark_smoke.status
index 46f821f..7aa0af0 100644
--- a/tests/benchmark_smoke/benchmark_smoke.status
+++ b/tests/benchmark_smoke/benchmark_smoke.status
@@ -8,3 +8,5 @@
 [ $compiler == dart2js && $runtime == none ]
 *: Fail, Pass # TODO(ahe): Triage these tests.
 
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # Issue 25761
diff --git a/tests/co19/co19-analyzer2.status b/tests/co19/co19-analyzer2.status
index 4ea29a4..fa1267b 100644
--- a/tests/co19/co19-analyzer2.status
+++ b/tests/co19/co19-analyzer2.status
@@ -5,7 +5,9 @@
 [ $compiler == dart2analyzer ]
 
 WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: fail
+LayoutTests/fast/events/event-creation_t01: Skip # Roll 45 OverflowEvent removed
 LayoutTests/fast/forms/checkValidity-001_t01: fail
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-get_t01: Skip # Roll 45 clipboardData changed
 Language/Expressions/Assignable_Expressions/syntax_t08: StaticWarning
 Language/Libraries_and_Scripts/Parts/compilation_t15: fail, pass # Issue 23595
 
@@ -297,19 +299,6 @@
 WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol/t06: StaticWarning # Please triage this failure.
 LayoutTests/fast/dom/navigatorcontentutils/unregister-protocol-handler_t01: StaticWarning # Please triage this failure.
 
-# Missing concrete implementation of setter 'XPathNSResolver.blink_jsObject' and getter 'XPathNSResolver.blink_jsObject'
-# TODO(terry): Dartium only because of implements instead of extends consider fixing by making blink_jsObject private
-#              with private wrap_jso and unwrap_jso in each library that delegates to the public wrap/unwrap_jso.
-LayoutTests/fast/xpath/4XPath/Core/test_core_functions_t02: StaticWarning # Please triage this failure.
-LayoutTests/fast/xpath/4XPath/Core/test_node_test_t01: StaticWarning # Please triage this failure.
-LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: StaticWarning # Please triage this failure.
-LayoutTests/fast/xpath/attr-namespace_t01: StaticWarning # Please triage this failure.
-LayoutTests/fast/xpath/attr-namespace_t02: StaticWarning # Please triage this failure.
-LayoutTests/fast/xpath/node-name-case-sensitivity_t01: StaticWarning # Please triage this failure.
-LayoutTests/fast/xpath/node-name-case-sensitivity_t02: StaticWarning # Please triage this failure.
-LayoutTests/fast/xpath/py-dom-xpath/data_t01: StaticWarning # Please triage this failure.
-LayoutTests/fast/svg/getbbox_t01: StaticWarning # Please triage this failure.
-
 # co19 roll to Sep 29 2015 (3ed795ea02e022ef19c77cf1b6095b7c8f5584d0)
 Language/Classes/Abstract_Instance_Members/invocation_t03: MissingStaticWarning # Please triage this failure.
 Language/Classes/Abstract_Instance_Members/invocation_t04: MissingStaticWarning # Please triage this failure.
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 8ee4e6d..2ca320e 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -609,7 +609,6 @@
 LibTest/typed_data/Uint8ClampedList/map_A02_t01: Pass, Slow # Please triage this failure.
 
 [ $compiler == dart2js && $runtime == chrome ]
-
 LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-justify-self_t01: RuntimeError # Please triage this failure
@@ -656,7 +655,6 @@
 LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/context-lost-restored_t01: Pass, Timeout # Please triage this failure
-LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/css-webkit-canvas_t01: RuntimeError # Please triage this failure
@@ -688,9 +686,11 @@
 LayoutTests/fast/canvas/webgl/tex-sub-image-2d_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-sub-image-cube-maps_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/uniform-location_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/uninitialized-test_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-depth-texture_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/webgl/webgl-large-texture_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/css-generated-content/hit-test-generated-content_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/css-generated-content/malformed-url_t01: Skip # Times out. Please triage this failure
@@ -759,6 +759,8 @@
 LayoutTests/fast/css/content-language-no-content_t01: RuntimeError # Issue 23506
 LayoutTests/fast/css/content/content-none_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/content/content-normal_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/css/content/content-quotes-01_t01: RuntimeError # Issue https://github.com/dart-lang/co19/issues/46
+LayoutTests/fast/css/content/content-quotes-05_t01: RuntimeError # Issue https://github.com/dart-lang/co19/issues/46
 LayoutTests/fast/css/counters/complex-before_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/css-escaped-identifier_t01: RuntimeError # co19 issue 14
@@ -809,6 +811,7 @@
 LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-css-nonascii_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/css/parsing-object-position_t01: RuntimeError # https://github.com/dart-lang/co19/issues/47
 LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-selector-error-recovery_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-text-rendering_t01: RuntimeError # Please triage this failure
@@ -844,6 +847,7 @@
 LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/52776_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/DOMException/dispatch-event-exception_t01: RuntimeError # https://github.com/dart-lang/sdk/issues/25928
 LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Document/CaretRangeFromPoint/basic_t01: RuntimeError # Please triage this failure
@@ -954,6 +958,9 @@
 LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/shadow/content-reprojection-fallback-crash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/shadow/event-path_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/shadow/content-pseudo-element-css-text_t01: RuntimeError # https://github.com/dart-lang/co19/issues/49
+LayoutTests/fast/dom/shadow/host-context-pseudo-class-css-text_t01: RuntimeError # https://github.com/dart-lang/co19/issues/49
+LayoutTests/fast/dom/shadow/host-pseudo-class-css-text_t01: RuntimeError # https://github.com/dart-lang/co19/issues/49
 LayoutTests/fast/dom/shadow/no-renderers-for-light-children_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError # Please triage this failure
@@ -1056,6 +1063,8 @@
 LayoutTests/fast/forms/textfield-focus-out_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/forms/validationMessage_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/validity-property_t01: RuntimeError # Issue 25155
+LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError # https://github.com/dart-lang/co19/issues/48
+LayoutTests/fast/forms/ValidityState-tooLong-input_t01: RuntimeError # https://github.com/dart-lang/co19/issues/48
 LayoutTests/fast/forms/willvalidate_t01: RuntimeError # Issue 25155
 LayoutTests/fast/html/hidden-attr_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/html/imports/import-element-removed-flag_t01: RuntimeError # Please triage this failure
@@ -1208,6 +1217,7 @@
 LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-arraybuffer_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-get_t01: RuntimeError # Issue 25928
 LayoutTests/fast/xpath/4XPath/Borrowed/cz_20030217_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/xpath/4XPath/Borrowed/namespace-nodes_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/xpath/4XPath/Core/test_core_functions_t01: RuntimeError # Please triage this failure
@@ -1578,6 +1588,7 @@
 LayoutTests/fast/canvas/webgl/canvas-zero-size_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/compressed-tex-image_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/context-destroyed-crash_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/context-lost-restored_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError # Please triage this failure
@@ -1627,14 +1638,12 @@
 LayoutTests/fast/canvas/webgl/texture-color-profile_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/texture-npot_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/triangle_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/uniform-location-length-limits_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-composite-modes-repaint_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-composite-modes_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-exceptions_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-large-texture_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-texture-binding-preserved_t01: RuntimeError # Please triage this failure
@@ -1647,6 +1656,10 @@
 LayoutTests/fast/text/regional-indicator-symobls_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text/text-combine-shrink-to-fit_t01: RuntimeError # Please triage this failure
 
+[ $compiler == dart2js && $runtime == chrome && $system == windows ]
+Language/Expressions/Bitwise_Expressions/method_invocation_super_t01: Pass, Slow # Issue 25940
+Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t04: Pass, Slow # Issue 25940
+
 [ $compiler == dart2js && $runtime == chrome && $system != linux ]
 LayoutTests/fast/multicol/hit-test-gap-between-pages-flipped_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/xpath/py-dom-xpath/abbreviations_t01: RuntimeError # Issue 24398
@@ -3159,15 +3172,19 @@
 [ $compiler == dart2js && $runtime == ff && $system == windows ]
 LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: RuntimeError # Please triage this failure
 WebPlatformTest/html/syntax/parsing/math-parse_t03: RuntimeError # Issue 22564
+Language/Classes/Getters/type_object_t02: RuntimeError, Slow # Issue 25940
+Language/Classes/Abstract_Instance_Members/override_no_named_parameters_t06: Pass, Slow # Issue 25940
+Language/Classes/Constructors/Factories/return_type_t03: Pass, Slow # Issue 25940
+Language/Classes/Constructors/Factories/return_wrong_type_t02: Pass, Slow # Issue 25940
+Language/Classes/Constructors/Factories/return_type_t05: Pass, Slow # Issue 25940
 
 [ $compiler == dart2js && $runtime == ff && $system != windows ]
-LayoutTests/fast/canvas/canvas-resetTransform_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-setTransform_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/xpath/py-dom-xpath/abbreviations_t01: RuntimeError # Dartium JSInterop failure
 
 [ $compiler == dart2js && $runtime == ff && $system == linux]
 LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError # co19 issue 16
+LayoutTests/fast/text/whitespace/nowrap-line-break-after-white-space_t01: Pass, RuntimeError # Please triage this failure
 
 [ $compiler == dart2js && $runtime == safari ]
 LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
@@ -3216,18 +3233,13 @@
 LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-currentTransform_t01: RuntimeError # Feature is not implemented
 LayoutTests/fast/canvas/canvas-drawImage-scaled-copy-to-self_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-ellipse-360-winding_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-ellipse-negative-radius_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-ellipse-zero-lineto_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-ellipse_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-empty-image-pattern_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-fillStyle-no-quirks-parsing_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-font-consistency_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-getImageData-large-crash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-getImageData-largeNonintegralDimensions_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-imageSmoothingEnabled_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-large-dimensions_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-large-fills_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-lineDash-input-sequence_t01: RuntimeError # Please triage this failure
@@ -3244,70 +3256,15 @@
 LayoutTests/fast/canvas/drawImage-with-valid-image_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: Skip # Times out. Please triage this failure
-LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/array-bounds-clamping_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/attrib-location-length-limits_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/bad-arguments-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/buffer-bind-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/canvas-resize-crash_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/canvas-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/canvas-zero-size_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/compressed-tex-image_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/context-destroyed-crash_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/context-lost-restored_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/css-webkit-canvas_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/drawingbuffer-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/error-reporting_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/framebuffer-object-attachment_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/framebuffer-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/functions-returning-strings_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-bind-attrib-location-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-enable-enum-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-enum-tests_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-getshadersource_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-getstring_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-pixelstorei_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/gl-teximage_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-uniformmatrix4fv_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-vertex-attrib-zero-issues_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/gl-vertexattribpointer_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/index-validation-crash-with-buffer-sub-data_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/index-validation-verifies-too-many-indices_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/index-validation_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/invalid-UTF-16_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/invalid-passed-params_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/is-object_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/null-object-behaviour_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/null-uniform-location_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/object-deletion-behaviour_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/point-size_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/premultiplyalpha-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/program-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/read-pixels-pack-alignment_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/read-pixels-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/renderbuffer-initialization_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/renderer-and-vendor-strings_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/shader-precision-format_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgb565_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba4444_t01: RuntimeError # Please triage this failure
@@ -3321,39 +3278,20 @@
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: RuntimeError, Timeout # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Skip # Times out. Please triage this failure
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/tex-image-and-uniform-binding-bugs_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/tex-image-webgl_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: RuntimeError, Timeout # Please triage this failure
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video_t01: RuntimeError, Timeout # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-sub-image-2d-bad-args_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-sub-image-2d_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-sub-image-cube-maps_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/texImage2DImageDataTest_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/texture-bindings-uneffected-on-resize_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/texture-color-profile_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/texture-npot_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/triangle_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/uniform-location-length-limits_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/uniform-location_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/uninitialized-test_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-composite-modes-repaint_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-composite-modes_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-depth-texture_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-exceptions_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-large-texture_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-texture-binding-preserved_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-unprefixed-context-id_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/webgl-viewport-parameters-preserved_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css-generated-content/pseudo-animation_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: Pass, RuntimeError # Please triage this failure
@@ -3401,7 +3339,6 @@
 LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css-grid-layout/percent-resolution-grid-item_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css-intrinsic-dimensions/height-property-value_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/add-remove-stylesheets-at-once-minimal-recalc-style_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/aspect-ratio-parsing-tests_t01: RuntimeError # Please triage this failure
@@ -3442,9 +3379,7 @@
 LayoutTests/fast/css/inherit-initial-shorthand-values_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/invalidation/detach-reattach-shadow_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/invalidation/shadow-host-toggle_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/invalidation/targeted-class-any-pseudo_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/invalidation/targeted-class-shadow-combinator_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError # Please triage this failure
@@ -3470,9 +3405,7 @@
 LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/readwrite-contenteditable-recalc_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/shorthand-setProperty-important_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/sibling-selectors-dynamic_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/sticky/parsing-position-sticky_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/style-scoped/style-scoped-in-shadow_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/style-scoped/style-scoped-nested_t01: RuntimeError # Please triage this failure
@@ -3480,7 +3413,6 @@
 LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/style-sharing-type-and-readonly_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/stylesheet-enable-second-alternate-link_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/webkit-keyframes-errors_t01: RuntimeError # Please triage this failure
@@ -3506,7 +3438,6 @@
 LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Document/createElementNS-namespace-err_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Element/setAttributeNS-namespace-err_t01: RuntimeError # Please triage this failure
@@ -3531,22 +3462,19 @@
 LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: Skip # Times out. Please triage this failure
-LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: RuntimeError, Timeout # Please triage this failure
 LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLElement/set-inner-outer-optimization_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLElement/spellcheck_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/HTMLInputElement/input-hidden-value_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Skip # Times out. Please triage this failure
-LayoutTests/fast/dom/HTMLObjectElement/form/test1_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: RuntimeError # Please triage this failure
@@ -3585,11 +3513,8 @@
 LayoutTests/fast/dom/StyleSheet/css-medialist-item_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/Text/next-element-sibling_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/Text/previous-element-sibling_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/TreeWalker/TreeWalker-basic_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Window/atob-btoa_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/Window/getMatchedCSSRules-nested-rules_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Window/getMatchedCSSRules-parent-stylesheets_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Window/window-resize-contents_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Window/window-resize_t01: RuntimeError # Please triage this failure
@@ -3618,7 +3543,6 @@
 LayoutTests/fast/dom/dataset-xhtml_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/dataset_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/document-set-title-mutations_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/document-set-title-no-child-on-empty_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/document-set-title-no-reuse_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/getElementsByClassName/dumpNodeList_t01: RuntimeError # Please triage this failure
@@ -3854,7 +3778,7 @@
 LayoutTests/fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/innerHTML/innerHTML-custom-tag_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/innerHTML/innerHTML-svg-write_t01: RuntimeError # Issue 25941
 LayoutTests/fast/layers/normal-flow-hit-test_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/loader/about-blank-hash-change_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/loader/about-blank-hash-kept_t01: Skip # Times out. Please triage this failure
@@ -3881,9 +3805,7 @@
 LayoutTests/fast/multicol/balance-unbreakable_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/break-properties_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/cssom-view_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/multicol/flipped-blocks-hit-test_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/float-truncation_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/hit-test-above-or-below_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/hit-test-end-of-column-with-line-height_t01: RuntimeError # Please triage this failure
@@ -3895,7 +3817,6 @@
 LayoutTests/fast/multicol/newmulticol/balance-maxheight_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/orphans-relayout_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/multicol/vertical-lr/image-inside-nested-blocks-with-border_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/vertical-rl/break-properties_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/multicol/vertical-rl/image-inside-nested-blocks-with-border_t01: RuntimeError # Please triage this failure
@@ -3999,9 +3920,6 @@
 LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text/text-combine-shrink-to-fit_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/tokenizer/entities_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/tokenizer/entities_t02: RuntimeError # Please triage this failure
-LayoutTests/fast/tokenizer/entities_t03: RuntimeError # Please triage this failure
 LayoutTests/fast/transforms/bounding-rect-zoom_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/transforms/hit-test-large-scale_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/url/anchor_t01: RuntimeError # Please triage this failure
@@ -4084,8 +4002,6 @@
 LibTest/html/Element/getAttributeNS_A02_t01: RuntimeError # Please triage this failure
 LibTest/html/Element/getClientRects_A01_t02: RuntimeError # Please triage this failure
 LibTest/html/Element/getNamespacedAttributes_A01_t01: RuntimeError # Please triage this failure
-LibTest/html/Element/isContentEditable_A01_t01: RuntimeError # Please triage this failure
-LibTest/html/Element/isContentEditable_A02_t01: RuntimeError # Please triage this failure
 LibTest/html/Element/isTagSupported_A01_t01: RuntimeError # Please triage this failure
 LibTest/html/Element/isTagSupported_A01_t02: RuntimeError # Please triage this failure
 LibTest/html/Element/leftView_A01_t01: RuntimeError # Please triage this failure
@@ -4126,7 +4042,6 @@
 LibTest/html/IFrameElement/getClientRects_A01_t02: RuntimeError # Please triage this failure
 LibTest/html/IFrameElement/getNamespacedAttributes_A01_t01: RuntimeError # Please triage this failure
 LibTest/html/IFrameElement/innerHtml_A01_t01: RuntimeError # Please triage this failure
-LibTest/html/IFrameElement/isContentEditable_A01_t01: RuntimeError # Please triage this failure
 LibTest/html/IFrameElement/leftView_A01_t01: RuntimeError # Please triage this failure
 LibTest/html/IFrameElement/marginEdge_A01_t01: RuntimeError # Please triage this failure
 LibTest/html/IFrameElement/offsetTo_A01_t01: RuntimeError # Please triage this failure
@@ -9619,6 +9534,10 @@
 [ $compiler == dart2js && $cps_ir ]
 Language/Types/Interface_Types/subtype_t09: Crash # Pending static: JSArray
 LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Timeout
-LibTest/core/Invocation/isGetter_A01_t01: RuntimeError # Please triage this failure.
-LibTest/core/Invocation/isSetter_A01_t02: RuntimeError # Please triage this failure.
 LibTest/core/Invocation/memberName_A01_t01: RuntimeError # Expect.equals(expected: <Symbol("bar=")>, actual: <Symbol("bar")>) fails.
+
+[ $compiler == dart2js && $cps_ir && $host_checked ]
+LayoutTests/fast/canvas/webgl/gl-uniformmatrix4fv_t01: Crash # CPS integrity violation After 'GVN' on function(main) Referenced out of scope: Instance of 'ReceiverCheck'
+
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # `assert` not implemented, about 75% tests crash
diff --git a/tests/co19/co19-dartium.status b/tests/co19/co19-dartium.status
index eb9b059..b788b84 100644
--- a/tests/co19/co19-dartium.status
+++ b/tests/co19/co19-dartium.status
@@ -7,41 +7,51 @@
 
 [ $compiler == none && $runtime == dartium && $system == macos ]
 LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: Skip # Depends on animation timing, commented as known to be flaky in test.  Will not fix.
+LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError # 45 roll
 LayoutTests/fast/writing-mode/broken-ideographic-font_t01: Skip # Timing out on the bots. Please triage this failure.
 LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: Pass, RuntimeError # Issue 21605
 LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: Pass, RuntimeError # Issue 21605
 
+[ $compiler == none && $runtime == dartium && $checked  && $system == macos ]
+LayoutTests/fast/xpath/invalid-resolver_t01: RuntimeError # 45 roll
+
 [ $compiler == none && $runtime == dartium && $system == windows ]
 LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: Pass, RuntimeError # Issue 21605
 WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01: RuntimeError # Please triage this failure.
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t01: Skip # Timesout Issue 26134
 
 [ $compiler == none && $runtime == dartium && $system != windows ]
 LayoutTests/fast/css/font-face-unicode-range-monospace_t01: RuntimeError # co19-roll r761: Please triage this failure.
 
+[ $compiler == none && $runtime == dartium && $system == linux ]
+language/mixin_illegal_constructor_test/01: Skip # Issue 43
+
 [ $compiler == none && $runtime == dartium && ($system == windows || $system == linux) ]
-LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/canvas-zero-size_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/compressed-tex-image_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/gl-enum-tests_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/gl-uniformmatrix4fv_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/gl-vertex-attrib-zero-issues_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/index-validation-crash-with-buffer-sub-data_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/index-validation-verifies-too-many-indices_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/index-validation_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/invalid-passed-params_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/null-uniform-location_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/program-test_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/tex-image-and-uniform-binding-bugs_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
-LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: RuntimeError # 45 roll ArrayBuffer failure only on windows/linux.
+LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError # 45 roll webgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/canvas-zero-size_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/compressed-tex-image_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/gl-enum-tests_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/gl-uniformmatrix4fv_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/gl-vertex-attrib-zero-issues_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/index-validation-crash-with-buffer-sub-data_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/index-validation-verifies-too-many-indices_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/index-validation_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/invalid-passed-params_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/null-uniform-location_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/program-test_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/tex-image-and-uniform-binding-bugs_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/webgl-exceptions_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+LayoutTests/fast/canvas/webgl/webgl-unprefixed-context-id_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux bots.
+
 
 [ $compiler == none && $runtime == dartium && $mode == debug ]
 WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/mode_t01: Skip # Issue 19495.
@@ -62,14 +72,13 @@
 LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError # co19-roll r786: Please triage this failure.
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError # co19-roll r786: Please triage this failure.
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: Skip # Timedout roll 45.
 LayoutTests/fast/css-intrinsic-dimensions/multicol_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css-intrinsic-dimensions/tables_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/display-inline-block-scrollbar_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError # Please triage this failure.
 LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError # Please triage this failure.
 LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError # co19-roll r722: Please triage this failure.
@@ -123,7 +132,7 @@
 LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/url/trivial-segments_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/url/trivial_t01: RuntimeError # co19-roll r786: Please triage this failure.
-LayoutTests/fast/xpath/invalid-resolver_t01: RuntimeError # https://github.com/dart-lang/co19/issues/21
+LayoutTests/fast/xpath/invalid-resolver_t01: RuntimeError # Dartium 45 roll
 LayoutTests/fast/xpath/xpath-result-eventlistener-crash_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LibTest/html/Node/ownerDocument_A01_t01: RuntimeError # co19-roll r722: Issue 18251
 WebPlatformTest/DOMEvents/approved/Propagation.path.target.removed_t01: RuntimeError # co19-roll r738: Please triage this failure.
@@ -194,7 +203,11 @@
 Language/Libraries_and_Scripts/URIs/syntax_t10: RuntimeError # Please triage this failure.
 Language/Libraries_and_Scripts/URIs/syntax_t14: RuntimeError # Please triage this failure.
 Language/Libraries_and_Scripts/URIs/syntax_t15: RuntimeError # Please triage this failure.
+Language/Metadata/before_param_t09: RuntimeError # Issue 26187
 Language/Metadata/before_variable_t01: RuntimeError # Please triage this failure.
+Language/Mixins/Mixin_Application/error_t01: Fail # co19 issue 43
+Language/Mixins/Mixin_Application/error_t02: Fail # co19 issue 43
+Language/Mixins/declaring_constructor_t01: Fail # co19 issue 43
 Language/Mixins/not_object_superclass_t01: Fail # Please triage this failure.
 Language/Mixins/reference_to_super_t01: Fail # Please triage this failure.
 Language/Statements/Assert/execution_t02: skip # co19 issue 734
@@ -214,7 +227,6 @@
 LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.veryLarge_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.verySmall_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/canvas/alpha_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/canvas/canvas-arc-negative-radius_t01: Skip # Times out. co19-roll r761: Please triage this failure.
 LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/canvas/canvas-currentTransform_t01: RuntimeError # Feature is behind a flag in Chrome
@@ -338,12 +350,10 @@
 LayoutTests/fast/canvas/webgl/webgl-composite-modes_t01: Pass, RuntimeError # Issue 22026
 LayoutTests/fast/canvas/webgl/webgl-depth-texture_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/webgl-depth-texture_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/canvas/webgl/webgl-exceptions_t01: Pass, RuntimeError # Issue 22026
 LayoutTests/fast/canvas/webgl/webgl-large-texture_t01: RuntimeError # Issue 25653
 LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: Pass, RuntimeError # Issue 22026
 LayoutTests/fast/canvas/webgl/webgl-specific_t01: Pass, RuntimeError # Issue 22026
 LayoutTests/fast/canvas/webgl/webgl-texture-binding-preserved_t01: RuntimeError # Issue 25653
-LayoutTests/fast/canvas/webgl/webgl-unprefixed-context-id_t01: Pass, RuntimeError # Issue 22026
 LayoutTests/fast/canvas/webgl/webgl-viewport-parameters-preserved_t01: Pass, RuntimeError # Issue 22026
 LayoutTests/fast/css-generated-content/bug91547_t01: Skip # Test reloads itself. Issue 18558.
 LayoutTests/fast/css-generated-content/hit-test-generated-content_t01: Skip # co19 issue 732.
@@ -394,35 +404,18 @@
 LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css-grid-layout/percent-resolution-grid-item_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError # co19-roll r786: Please triage this failure.
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: Timeout # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/add-remove-stylesheets-at-once-minimal-recalc-style_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/aspect-ratio-parsing-tests_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/auto-min-size_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/background-position-serialize_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/checked-pseudo-selector_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc_t01: Skip # co19 issue 732.
 LayoutTests/fast/css/computed-offset-with-zoom_t01: Skip # co19 issue 732.
-LayoutTests/fast/css/content-language-case-insensitivity_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/content-language-dynamically-added_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/content-language-dynamically-removed_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/content-language-mapped-to-webkit-locale_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/content-language-multiple_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/content-language-no-content_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/content/content-none_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/content/content-normal_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/counters/complex-before_t01: RuntimeError, Pass # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/css-properties-case-insensitive_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/css3-nth-tokens-style_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/cssText-shorthand_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/csstext-of-content-string_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/cursor-parsing-quirks_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/deprecated-flexbox-auto-min-size_t01: Pass, RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/ex-unit-with-no-x-height_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/first-child-display-change-inverse_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError, Pass # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError # co19-roll r761: Please triage this failure.
@@ -430,17 +423,10 @@
 LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: Pass, RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError, Pass # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError, Pass # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/font-shorthand-from-longhands_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/fontfaceset-events_t01: Pass, RuntimeError # Issue 23433
 LayoutTests/fast/css/fontfaceset-loadingdone_t01: RuntimeError, Pass # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/getComputedStyle/computed-style-font_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/getComputedStyle/computed-style-properties_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/getComputedStyle/counterIncrement-without-counter_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/getPropertyValue-columns_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/id-or-class-before-stylesheet_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/image-set-setting_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/important-js-override_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/inherit-initial-shorthand-values_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError # co19-roll r761: Please triage this failure.
@@ -449,32 +435,24 @@
 LayoutTests/fast/css/link-alternate-stylesheet-4_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/link-alternate-stylesheet-5_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/media-query-recovery_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/nested-at-rules_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/parse-color-int-or-percent-crash_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/parsing-at-rule-recovery_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/parsing-selector-error-recovery_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/parsing-text-rendering_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/pseudo-any_t01: RuntimeError, Pass # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Skip # Times out. co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Skip # Times out. co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/pseudo-valid-unapplied_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/readonly-pseudoclass-opera-001_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/readonly-pseudoclass-opera-002_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/sticky/parsing-position-sticky_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/string-quote-binary_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/style-element-process-crash_t01: Skip # Times out. co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/style-scoped/style-scoped-nested_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css/stylesheet-enable-second-alternate-link_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/css/transform-origin-parsing_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/css/webkit-keyframes-errors_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited_t01: Pass, RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last_t01: RuntimeError # co19-roll r786: Please triage this failure.
@@ -553,23 +531,19 @@
 LayoutTests/fast/dom/Window/window-scroll-arguments_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/anchor-without-content_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/attribute-namespaces-get-set_t01: RuntimeError # co19-roll r738: Please triage this failure.
-LayoutTests/fast/dom/background-shorthand-csstext_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/dom/blur-contenteditable_t01: RuntimeError, Pass # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/client-width-height-quirks_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/css-cached-import-rule_t01: Skip # Test reloads itself. Issue 18558.
 LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError # Test is incorrect.
-LayoutTests/fast/dom/css-selectorText_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/dom/cssTarget-crash_t01: Skip # Test reloads itself. Issue 18558.
 LayoutTests/fast/dom/custom/document-register-basic_t01: RuntimeError # Bad test can't register HtmlElement.
 LayoutTests/fast/dom/custom/document-register-svg-extends_t01: RuntimeError # co19-roll r738: Please triage this failure.
-LayoutTests/fast/dom/custom/element-names_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/dom/dataset-xhtml_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/dataset_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/document-importNode-arguments_t01: RuntimeError # Please triage this failure.
 LayoutTests/fast/dom/empty-hash-and-search_t01: Skip # Test reloads itself. Issue 18558.
 LayoutTests/fast/dom/focus-contenteditable_t01: RuntimeError, Pass # co19-roll r738: Please triage this failure.
-LayoutTests/fast/dom/fragment-activation-focuses-target_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError # Chrome 39 roll. Please triage this failure
 LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError # co19-roll r738: Please triage this failure.
@@ -579,8 +553,6 @@
 LayoutTests/fast/dom/option-properties_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError # co19-roll r738: Please triage this failure.
-LayoutTests/fast/dom/shadow/content-reprojection-fallback-crash_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/dom/shadow/event-path_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/dom/shadow/form-in-shadow_t01: Skip # Test reloads itself. Issue 18558.
 LayoutTests/fast/dom/shadow/no-renderers-for-light-children_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError # co19-roll r738: Please triage this failure.
@@ -589,9 +561,7 @@
 LayoutTests/fast/dom/shadow/pseudoclass-update-enabled-optgroup_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/shadow/pseudoclass-update-enabled-option_t01: RuntimeError # co19-roll r738: Please triage this failure.
 LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError # co19-roll r738: Please triage this failure.
-LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError, Pass # co19-roll r738: Please triage this failure.
-LayoutTests/fast/dom/shadow/shadow-root-js-api_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/dynamic/crash-generated-quote_t01: RuntimeError # co19-roll r786: Please triage this failure.
@@ -599,12 +569,8 @@
 LayoutTests/fast/dynamic/insertAdjacentElement_t01: Skip # Timeout. co19-roll r786: Please triage this failure.
 LayoutTests/fast/dynamic/insertAdjacentHTML_t01: Pass, RuntimeError # co19 issue 11.
 LayoutTests/fast/dynamic/recursive-layout_t01: RuntimeError # co19-roll r786: Please triage this failure.
-LayoutTests/fast/encoding/css-charset-dom_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/events/add-event-without-document_t01: RuntimeError # co19-roll r786: Please triage this failure.
-LayoutTests/fast/events/change-overflow-on-overflow-change_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/events/change-overflow-on-overflow-change_t01: Timeout # Dartium 45 roll. Issue 25754
 LayoutTests/fast/events/clipboard-clearData_t01: Skip # Timeout. co19-roll r786: Please triage this failure.
-LayoutTests/fast/events/clipboard-dataTransferItemList-remove_t01: RuntimeError # Issue 22532
 LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Skip # Timeout. co19-roll r786: Please triage this failure.
 LayoutTests/fast/events/div-focus_t01: Pass, RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/events/document-elementFromPoint_t01: RuntimeError # co19-roll r786: Please triage this failure.
@@ -619,7 +585,6 @@
 LayoutTests/fast/events/mutation-during-replace-child-2_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/events/nested-event-remove-node-crash_t01: Skip # Flaky timeout. co19-roll r786: Please triage this failure.
-LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/events/scoped/editing-commands_t01: Pass, RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/events/scroll-event-does-not-bubble_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: Pass, RuntimeError # co19-roll r786: Please triage this failure.
@@ -642,7 +607,6 @@
 LayoutTests/fast/filesystem/read-directory-many_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/filesystem/simple-readonly_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/forms/HTMLOptionElement_selected2_t01: Skip # Times out. co19-roll r801: Please triage this failure.
-LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/forms/autofocus-focus-only-once_t01: Skip # Times out. co19-roll r801: Please triage this failure.
 LayoutTests/fast/forms/autofocus-input-css-style-change_t01: Skip # Times out. co19-roll r801: Please triage this failure.
 LayoutTests/fast/forms/autofocus-opera-007_t01: Skip # Times out. co19-roll r801: Please triage this failure.
@@ -666,7 +630,6 @@
 LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/forms/input-hit-test-border_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/forms/input-inputmode_t01: RuntimeError # Experimental feature not exposed in Chrome yet
-LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/forms/input-width-height-attributes-without-renderer-loaded-image_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/forms/listbox-select-all_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError # co19-roll r801: Please triage this failure.
@@ -692,7 +655,6 @@
 LayoutTests/fast/forms/textarea-scrollbar-height_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/forms/textarea-submit-crash_t01: Skip # Test reloads itself. Issue 18558.
 LayoutTests/fast/forms/textfield-focus-out_t01: Skip # Times out. co19-roll r801: Please triage this failure.
-LayoutTests/fast/forms/validationMessage_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/html/adjacent-html-context-element_t01:RuntimeError # co19 issue 11.
 LayoutTests/fast/html/hidden-attr_t01: RuntimeError # co19-roll r706.  Please triage this failure.
 LayoutTests/fast/html/imports/import-element-removed-flag_t01: RuntimeError # co19-roll r706.  Please triage this failure.
@@ -713,7 +675,6 @@
 LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/inline/reattach-inlines-in-anonymous-blocks-with-out-of-flow-siblings_t01: RuntimeError # co19 issue 11.
 LayoutTests/fast/innerHTML/innerHTML-special-elements_t01: RuntimeError # co19 issue 11.
-LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/layers/normal-flow-hit-test_t01: RuntimeError # co19 issue 11.
 LayoutTests/fast/layers/normal-flow-hit-test_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/layers/zindex-hit-test_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
@@ -726,7 +687,7 @@
 LayoutTests/fast/loader/hashchange-event-properties_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/loader/loadInProgress_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Skip # Times out. co19-roll r801: Please triage this failure.
-LayoutTests/fast/loader/onload-policy-ignore-for-frame_t01: Timeout # Dartium 45 roll. Issue 25754
+LayoutTests/fast/loader/onload-policy-ignore-for-frame_t01: Timeout # Dartium 45 roll
 LayoutTests/fast/loader/scroll-position-restored-on-back_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event_t01: Skip # Times out. co19-roll r801: Please triage this failure.
 LayoutTests/fast/loader/stateobjects/replacestate-in-onunload_t01: RuntimeError # co19-roll r801: Please triage this failure.
@@ -743,7 +704,6 @@
 LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/multicol/break-properties_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/multicol/column-width-zero_t01: Pass, RuntimeError # co19 issue 11.
-LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError # Dartium 45 roll. Issue 25754
 LayoutTests/fast/multicol/cssom-view_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode_t01: RuntimeError # co19 issue 11.
 LayoutTests/fast/multicol/flipped-blocks-hit-test_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
@@ -803,13 +763,8 @@
 LayoutTests/fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor-vertical-lr_t01: RuntimeError, Pass # Spurious intermittent pass # co19 issue 11.
 LayoutTests/fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor_t01: RuntimeError, Pass # Spurious intermittent pass # co19 issue 11.
 LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError # co19-roll r801: Please triage this failure.
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError # Dartium 45 roll. Issue 25754
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError, Pass # Spurious intermittent pass. # co19 issue 11.
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: Timeout # Dartium 45 roll. Issue 25754
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError # co19-roll r801: Please triage this failure.
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError, Pass # Spurious intermittent pass # co19 issue 11.
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: Timeout # Dartium 45 roll. Issue 25754
+LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError, Pass, Timeout # Spurious intermittent pass. # co19 issue 11.
+LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError, Pass, Timeout # co19-roll r801: Please triage this failure.
 LayoutTests/fast/replaced/preferred-widths_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/replaced/table-percent-height-text-controls_t01: RuntimeError # co19 issue 11.
 LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError # co19-roll r801: Please triage this failure.
@@ -977,7 +932,6 @@
 LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError # co19-roll r761: Please triage this failure.
-LayoutTests/fast/xpath/attr-namespace_t01: RuntimeError # Dartium JsInterop failure
 LayoutTests/fast/xpath/attr-namespace_t02: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError # co19-roll r761: Please triage this failure.
@@ -1045,6 +999,7 @@
 LibTest/html/IFrameElement/blur_A01_t01: Skip # co19-roll r706.  Please triage this failure.
 LibTest/html/IFrameElement/borderEdge_A01_t01: RuntimeError # co19-roll r706.  Issue 16574
 LibTest/html/IFrameElement/clone_A01_t02: RuntimeError # co19-roll r706.  Please triage this failure.
+LibTest/html/IFrameElement/contentWindow_A01_t01: RuntimeError # Also fails in dart2js as this test should not pass given current Dart semantics for cross frame windows.
 LibTest/html/IFrameElement/createFragment_A01_t01: RuntimeError # co19-roll r706.  Please triage this failure.
 LibTest/html/IFrameElement/createFragment_A01_t02: RuntimeError # co19-roll r706.  Please triage this failure.
 LibTest/html/IFrameElement/createFragment_A01_t03: RuntimeError # co19-roll r706.  Please triage this failure.
@@ -1071,9 +1026,11 @@
 LibTest/html/Window/find_A01_t01: RuntimeError # co19-roll r706.  Please triage this failure.
 LibTest/html/Window/find_A03_t01: RuntimeError # co19-roll r706.  Please triage this failure.
 LibTest/html/Window/find_A06_t01: RuntimeError # co19-roll r706.  Please triage this failure.
+LibTest/html/Window/moveBy_A01_t01: RuntimeError # Also fails in dart2js as this test should not pass given current Dart semantics for cross frame windows.
 LibTest/html/Window/moveTo_A01_t01: RuntimeError, Pass # co19-roll r706.  Please triage this failure.
 LibTest/html/Window/moveTo_A02_t01: RuntimeError # co19-roll r706.  Please triage this failure.
 LibTest/html/Window/postMessage_A01_t01: RuntimeError # co19-roll r706.  Please triage this failure.
+LibTest/html/Window/postMessage_A01_t02: RuntimeError # Also fails in dart2js.
 LibTest/html/Window/requestFileSystem_A01_t02: RuntimeError,Pass # co19-roll r722: Please triage this failure.
 LibTest/html/Window/requestFileSystem_A02_t01: Skip # Issue 24585.
 LibTest/html/Window/resizeBy_A01_t01: RuntimeError # co19-roll r706.  Please triage this failure.
@@ -1244,7 +1201,7 @@
 WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/mode_t01: RuntimeError # co19-roll r738: Please triage this failure.
 WebPlatformTest/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address_t01: RuntimeError # co19-roll r738: Please triage this failure.
 WebPlatformTest/html/semantics/forms/attributes-common-to-form-controls/formaction_t01: RuntimeError # co19-roll r738: Please triage this failure.
-WebPlatformTest/html/semantics/forms/textfieldselection/selection_t01: RuntimeError # Dartium 45 roll. Issue 25754
+WebPlatformTest/html/semantics/forms/textfieldselection/selection_t01: RuntimeError # Dartium 45 roll
 WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError # co19-roll r738: Please triage this failure.
 WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError, Pass # co19-roll r738: Please triage this failure.  Pass on macos.
 WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError # co19-roll r738: Please triage this failure.
@@ -1313,11 +1270,8 @@
 WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-004_t01: RuntimeError # co19-roll r722: Please triage this failure.
 WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-004_t02: RuntimeError # co19-roll r722: Please triage this failure.
 WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/elements-001_t01: RuntimeError # co19-roll r722: Please triage this failure.
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError # Dartium 45 roll. Issue 25754
 WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-005_t01: RuntimeError # Please triage this failure.
 WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-006_t01: RuntimeError # Please triage this failure.
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-002_t01: RuntimeError # Dartium 45 roll. Issue 25754
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-005_t01: RuntimeError # Dartium 45 roll. Issue 25754
 WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t01: RuntimeError # Please triage this failure.
 WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError # Please triage this failure.
 WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-006_t01: RuntimeError # co19-roll r722: Please triage this failure.
@@ -1344,10 +1298,89 @@
 WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-001_t01: RuntimeError # co19-roll r722: Please triage this failure.
 WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError # co19-roll r722: Please triage this failure.
 WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-004_t01: RuntimeError # co19-roll r722: Please triage this failure.
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/dom-tree-accessors-002_t01: RuntimeError # Dartium 45 roll. Issue 25754
 WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError # co19-roll r722: Please triage this failure.
 WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-009_t01: RuntimeError # Please triage this failure.
 WebPlatformTest/webstorage/event_constructor_t01: RuntimeError # co19-roll r761: Please triage this failure.
 WebPlatformTest/webstorage/event_constructor_t02: RuntimeError # co19-roll r761: Please triage this failure.
 WebPlatformTest/webstorage/storage_local_setitem_quotaexceedederr_t01: Skip # Times out flakily. co19-roll r761: Please triage this failure.
 WebPlatformTest/webstorage/storage_session_setitem_quotaexceedederr_t01: Skip # Times out flakily. co19-roll r761: Please triage this failure.
+LayoutTests/fast/css/aspect-ratio-inheritance_t01: Skip # 45 Roll No longer supported.
+LayoutTests/fast/css/aspect-ratio-parsing-tests_t01: Skip # 45 Roll No longer supported.
+LayoutTests/fast/css/auto-min-size_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/background-position-serialize_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/content-language-case-insensitivity_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/content-language-dynamically-added_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/content-language-dynamically-removed_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/content-language-mapped-to-webkit-locale_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/content-language-multiple_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/content-language-no-content_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: Skip # 45 Roll failure.
+LayoutTests/fast/css/cssText-shorthand_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/csstext-of-content-string_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/ex-unit-with-no-x-height_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/font-shorthand-from-longhands_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/getComputedStyle/computed-style-font_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/getComputedStyle/computed-style-properties_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/getComputedStyle/counterIncrement-without-counter_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/getPropertyValue-columns_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/image-set-setting_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/important-js-override_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/nested-at-rules_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/parse-color-int-or-percent-crash_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/parsing-text-rendering_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/pseudo-valid-unapplied_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/string-quote-binary_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/css/transform-origin-parsing_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/dom/custom/element-names_t01: RuntimeError # 45 Roll issue dart-lang/co19/issues/25
+LayoutTests/fast/dom/background-shorthand-csstext_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/dom/css-selectorText_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/dom/fragment-activation-focuses-target_t01: RuntimeError #  45 Roll co19 issue https://github.com/dart-lang/co19/issues/36
+LayoutTests/fast/dom/shadow/content-reprojection-fallback-crash_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/dom/shadow/event-path_t01: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/26
+LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/27
+LayoutTests/fast/dom/shadow/shadow-root-js-api_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+LayoutTests/fast/encoding/css-charset-dom_t01: Skip #  45 Roll No longer supported see issue https://github.com/dart-lang/co19/issues/35
+LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: Skip #  45 Roll No longer supported.
+LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError # 45 roll issue
+LayoutTests/fast/forms/validationMessage_t01: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/28
+LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/29
+LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/34
+LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/30
+LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: RuntimeError # 45 rollwebgl doesn't run on on windows/linux but failed on mac bots.
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-get_t01: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/31
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-005_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/dom-tree-accessors-002_t01: RuntimeError #  45 Roll co19 test rewrite issue 25807
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/32
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-002_t01: RuntimeError # 45 roll issue https://github.com/dart-lang/co19/issues/33
+# Must fix failures below after JsInterop checkin.
+WebPlatformTest/dom/nodes/Node-appendChild_t01: RuntimeError # Issue 26134
+WebPlatformTest/dom/nodes/attributes/setAttribute_A01_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/Document/createElement-invalid-names_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/createDocumentType2_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/createElementNS_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/HTMLTemplateElement/cycles_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/computed-style-set-property_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/custom/document-register-type-extensions_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/custom/document-register-namespace_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/DOMException/prototype-object_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/Node/contains-method_t01: RuntimeError # Issue 26134
+LayoutTests/fast/dom/MutationObserver/observe-attributes_t01: RuntimeError # Issue 26134
+LayoutTests/fast/events/mutation-during-append-child_t01: RuntimeError # Issue 26134
+LayoutTests/fast/events/mutation-during-insert-before_t01: RuntimeError # Issue 26134
+LayoutTests/fast/events/clipboard-dataTransferItemList-remove_t01: Skip # Issue 26134, timesout
+LibTest/html/Document/text_A01_t01: RuntimeError # Issue 26134
+LibTest/html/Document/insertBefore_A01_t01: RuntimeError # Issue 26134
+LibTest/html/Document/insertAllBefore_A01_t01: RuntimeError # Issue 26134
+LibTest/html/IFrameElement/insertBefore_A01_t01: RuntimeError # Issue 26134
+LibTest/html/IFrameElement/insertAllBefore_A01_t01: RuntimeError # Issue 26134
+LibTest/html/Element/text_A01_t01: RuntimeError # Issue 26134
+LibTest/html/Element/insertBefore_A01_t01: RuntimeError # Issue 26134
+LibTest/html/Element/insertAllBefore_A01_t01: RuntimeError # Issue 26134
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t06: Skip # Issue 26134, timeout
+html/cross_domain_iframe_test: RuntimeError # Issue 26134
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index 0fc268d..57ac699 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -52,7 +52,6 @@
 Language/Libraries_and_Scripts/Imports/invalid_uri_t02: Fail
 Language/Libraries_and_Scripts/Exports/invalid_uri_t02: Fail
 Language/Libraries_and_Scripts/Parts/syntax_t06: Fail
-LibTest/math/MutableRectangle/MutableRectangle.fromPoints_A01_t01: Pass, RuntimeError # co19-roll r607: Please triage this failure
 
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $mode == debug ]
 LibTest/core/List/List_class_A01_t02: Pass, Slow
@@ -60,9 +59,6 @@
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && ($arch != x64 && $arch != simarm64 && $arch != arm64) ]
 LibTest/core/int/operator_left_shift_A01_t02: Fail # co19 issue 129
 
-[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == mips ]
-LibTest/core/double/toInt_A01_t01: Fail
-
 [ ($compiler == none || $compiler == precompiler) && ($runtime == vm || $runtime == dart_precompiled) && ($arch == mips || $arch == arm64) ]
 # These tests take too much memory (300 MB) for our 1 GB test machine.
 # co19 issue 673. http://code.google.com/p/co19/issues/detail?id=673
@@ -70,10 +66,6 @@
 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Skip # co19 issue 673
 LibTest/collection/ListBase/ListBase_class_A01_t02: Skip # co19 issue 673
 
-[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == mips && $mode == debug ]
-LibTest/isolate/Isolate/spawnUri_A01_t04: Crash, Pass # Issue 17440
-LibTest/isolate/Isolate/spawn_A01_t04: Crash, Pass # Issue 17440
-
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && ($arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simmips || $arch == simarm64) ]
 LibTest/core/Uri/Uri_A06_t03: Skip  # Timeout
 LibTest/collection/ListMixin/ListMixin_class_A01_t01: Skip  # Timeout
@@ -99,52 +91,57 @@
 
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ]
 # co19 update Sep 29, 2015 (3ed795ea02e022ef19c77cf1b6095b7c8f5584d0)
-Language/Classes/Getters/type_object_t01: RuntimeError # Please triage this failure
-Language/Classes/Getters/type_object_t02: RuntimeError # Please triage this failure
-Language/Classes/Setters/syntax_t04: RuntimeError # Please triage this failure
-Language/Classes/Setters/type_object_t01: RuntimeError # Please triage this failure
-Language/Classes/Setters/type_object_t02: RuntimeError # Please triage this failure
-Language/Classes/Static_Methods/type_object_t01: RuntimeError # Please triage this failure
-Language/Classes/Static_Methods/type_object_t02: RuntimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t01: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t02: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t03: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t04: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t05: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t06: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t01: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t02: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t03: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t04: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t05: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t06: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t01: CompileTimeError # Please triage this failure
-Language/Libraries_and_Scripts/Imports/namespace_changes_t10: RuntimeError # Please triage this failure
-Language/Libraries_and_Scripts/Parts/compilation_t09: MissingCompileTimeError # Please triage this failure
-Language/Libraries_and_Scripts/URIs/syntax_t04: RuntimeError # Please triage this failure
-Language/Libraries_and_Scripts/URIs/syntax_t05: RuntimeError # Please triage this failure
-Language/Libraries_and_Scripts/URIs/syntax_t09: RuntimeError # Please triage this failure
-Language/Libraries_and_Scripts/URIs/syntax_t10: RuntimeError # Please triage this failure
-Language/Libraries_and_Scripts/URIs/syntax_t14: RuntimeError # Please triage this failure
-Language/Libraries_and_Scripts/URIs/syntax_t15: RuntimeError # Please triage this failure
-Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError # Please triage this failure
-Language/Mixins/declaring_constructor_t01: MissingCompileTimeError # Please triage this failure
-Language/Mixins/not_object_superclass_t01: MissingCompileTimeError # Please triage this failure
-Language/Mixins/reference_to_super_t01: MissingCompileTimeError # Please triage this failure
+Language/Classes/Getters/type_object_t01: RuntimeError # Issue 23721
+Language/Classes/Getters/type_object_t02: RuntimeError # Issue 23721
+Language/Classes/Setters/syntax_t04: RuntimeError # co19 issue 38
+Language/Classes/Setters/type_object_t01: RuntimeError # Issue 23721
+Language/Classes/Setters/type_object_t02: RuntimeError # Issue 23721
+Language/Classes/Static_Methods/type_object_t01: RuntimeError # Issue 23721
+Language/Classes/Static_Methods/type_object_t02: RuntimeError # Issue 23721
+Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t01: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t02: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t03: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t04: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t05: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t06: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t01: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t02: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t03: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t04: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t05: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t06: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Issue 24472
+Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t01: CompileTimeError # co19 issue 41
+Language/Libraries_and_Scripts/Imports/namespace_changes_t10: RuntimeError # co19 issue 39
+Language/Libraries_and_Scripts/Parts/compilation_t09: MissingCompileTimeError # co19 issue 40
+Language/Libraries_and_Scripts/URIs/syntax_t04: RuntimeError # co19 issue 42
+Language/Libraries_and_Scripts/URIs/syntax_t05: RuntimeError # co19 issue 42
+Language/Libraries_and_Scripts/URIs/syntax_t09: RuntimeError # co19 issue 42
+Language/Libraries_and_Scripts/URIs/syntax_t10: RuntimeError # co19 issue 42
+Language/Libraries_and_Scripts/URIs/syntax_t14: RuntimeError # co19 issue 42
+Language/Libraries_and_Scripts/URIs/syntax_t15: RuntimeError # co19 issue 42
+Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError # co19 issue 43
+Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError # co19 issue 43
+Language/Mixins/declaring_constructor_t01: MissingCompileTimeError # co19 issue 43
+Language/Mixins/not_object_superclass_t01: MissingCompileTimeError # co19 issue 43 and 44
+Language/Mixins/reference_to_super_t01: MissingCompileTimeError # co19 issue 43 and 44
 
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $checked ]
-Language/Errors_and_Warnings/static_warning_t01: RuntimeError # Please triage this failure
-Language/Errors_and_Warnings/static_warning_t02: RuntimeError # Please triage this failure
-Language/Errors_and_Warnings/static_warning_t03: RuntimeError # Please triage this failure
-Language/Errors_and_Warnings/static_warning_t04: RuntimeError # Please triage this failure
-Language/Errors_and_Warnings/static_warning_t05: RuntimeError # Please triage this failure
-Language/Errors_and_Warnings/static_warning_t06: RuntimeError # Please triage this failure
+Language/Errors_and_Warnings/static_warning_t01: RuntimeError # co19 issue 45
+Language/Errors_and_Warnings/static_warning_t02: RuntimeError # co19 issue 45
+Language/Errors_and_Warnings/static_warning_t03: RuntimeError # co19 issue 45
+Language/Errors_and_Warnings/static_warning_t04: RuntimeError # co19 issue 45
+Language/Errors_and_Warnings/static_warning_t05: RuntimeError # co19 issue 45
+Language/Errors_and_Warnings/static_warning_t06: RuntimeError # co19 issue 45
+
+[ $noopt || $compiler == precompiler || $mode == product ]
+Language/Metadata/*: SkipByDesign # Uses dart:mirrors
+
+[ $runtime == dart_precompiled || $runtime == dart_product ]
+LibTest/isolate/Isolate/spawnUri*: Skip # Isolate.spawnUri
 
 [ $noopt || $compiler == precompiler ]
-Language/Metadata/*: SkipByDesign # Uses dart:mirrors
 LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Timeout
 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Pass, Timeout
 LibTest/core/Map/Map_class_A01_t04: Pass, Timeout
@@ -152,16 +149,6 @@
 Language/Mixins/Mixin_Application/error_t01: Pass
 Language/Mixins/Mixin_Application/error_t02: Pass
 Language/Mixins/declaring_constructor_t01: Pass
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/deferred_type_t01: Pass
-
-[ $runtime == dart_precompiled ]
-LibTest/isolate/Isolate/spawnUri*: RuntimeError # Isolate.spawnUri
-Language/Expressions/Constants/identifier_denotes_a_constant_t05: Crash # Issue 25892
-Language/Expressions/Constants/static_method_t01: Crash # Issue 25892
-
-[ $runtime == dart_product ]
-LibTest/isolate/Isolate/spawnUri*: Skip # Isolate.spawnUri
-Language/Metadata/*: SkipByDesign # Uses dart:mirrors
 
 [ $runtime == vm && $mode == product ]
 LibTest/typed_data/Float32List/runtimeType_A01_t01: Fail,OK  # Expects exact type name.
diff --git a/tests/compiler/dart2js/analyze_api_test.dart b/tests/compiler/dart2js/analyze_api_test.dart
index d4f2f9f..908ae11 100644
--- a/tests/compiler/dart2js/analyze_api_test.dart
+++ b/tests/compiler/dart2js/analyze_api_test.dart
@@ -6,8 +6,8 @@
 
 import 'package:sdk_library_metadata/libraries.dart';
 import 'analyze_helper.dart';
-import "package:async_helper/async_helper.dart";
-
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/diagnostics/messages.dart' show MessageKind;
 /**
  * Map of white-listed warnings and errors.
  *
@@ -17,8 +17,7 @@
  * Use an identifiable suffix of the file uri as key. Use a fixed substring of
  * the error/warning message in the list of white-listings for each file.
  */
-// TODO(johnniwinther): Support canonical URIs as keys and message kinds as
-// values.
+// TODO(johnniwinther): Support canonical URIs as keys.
 const Map<String, List<String>> WHITE_LIST = const {
 };
 
diff --git a/tests/compiler/dart2js/analyze_dart2js_helpers_test.dart b/tests/compiler/dart2js/analyze_dart2js_helpers_test.dart
index e4b9326..e774726 100644
--- a/tests/compiler/dart2js/analyze_dart2js_helpers_test.dart
+++ b/tests/compiler/dart2js/analyze_dart2js_helpers_test.dart
@@ -105,7 +105,7 @@
 
   bool isHelper(Element element) {
     Uri uri = element.library.canonicalUri;
-    return uri.path.endsWith('src/helpers/helpers.dart');
+    return '$uri'.startsWith('package:compiler/src/helpers/');
   }
 
   void checkAccess(Node node, MemberElement element) {
@@ -233,4 +233,4 @@
       _) {
     checkAccess(node, constant.target);
   }
-}
\ No newline at end of file
+}
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index 41dc321..fb06d78 100644
--- a/tests/compiler/dart2js/analyze_helper.dart
+++ b/tests/compiler/dart2js/analyze_helper.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, 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.
 
@@ -13,8 +13,14 @@
     Message,
     MessageKind;
 import 'package:compiler/src/filenames.dart';
+import 'package:compiler/src/options.dart' show
+    CompilerOptions;
 import 'package:compiler/src/source_file_provider.dart';
 import 'package:compiler/src/util/uri_extras.dart';
+import 'diagnostic_helper.dart';
+
+/// Option for hiding whitelisted messages.
+const String HIDE_WHITELISTED = '--hide-whitelisted';
 
 /**
  * Map of whitelisted warnings and errors.
@@ -33,12 +39,16 @@
   bool hasHint = false;
   bool hasErrors = false;
   bool lastWasWhitelisted = false;
+  bool showWhitelisted = true;
 
   Map<String, Map<dynamic/*String|MessageKind*/, int>> whiteListMap
       = new Map<String, Map<dynamic/*String|MessageKind*/, int>>();
+  List<MessageKind> skipList;
+  List<CollectedMessage> collectedMessages = <CollectedMessage>[];
 
   CollectingDiagnosticHandler(
       Map<String, List/*<String|MessageKind>*/> whiteList,
+      this.skipList,
       SourceFileProvider provider)
       : super(provider) {
     whiteList.forEach((String file, List/*<String|MessageKind>*/ messageParts) {
@@ -53,6 +63,7 @@
   bool checkResults() {
     bool validWhiteListUse = checkWhiteListUse();
     reportWhiteListUse();
+    reportCollectedMessages();
     return !hasWarnings && !hasHint && !hasErrors && validWhiteListUse;
   }
 
@@ -70,6 +81,19 @@
     return allUsed;
   }
 
+  void reportCollectedMessages() {
+    if (collectedMessages.isNotEmpty) {
+      print('----------------------------------------------------------------');
+      print('Unexpected messages:');
+      print('----------------------------------------------------------------');
+      for (CollectedMessage message in collectedMessages) {
+        super.report(message.message, message.uri, message.begin,
+            message.end, message.text, message.kind);
+      }
+      print('----------------------------------------------------------------');
+    }
+  }
+
   void reportWhiteListUse() {
     for (String file in whiteListMap.keys) {
       for (var messagePart in whiteListMap[file].keys) {
@@ -84,6 +108,9 @@
     if (uri == null) {
       return false;
     }
+    if (skipList.contains(message.kind)) {
+      return true;
+    }
     String path = uri.path;
     for (String file in whiteListMap.keys) {
       if (path.contains(file)) {
@@ -112,6 +139,9 @@
       if (checkWhiteList(uri, message, text)) {
         // Suppress whitelisted warnings.
         lastWasWhitelisted = true;
+        if (showWhitelisted || verbose) {
+          super.report(message, uri, begin, end, text, kind);
+        }
         return;
       }
       hasWarnings = true;
@@ -120,6 +150,9 @@
       if (checkWhiteList(uri, message, text)) {
         // Suppress whitelisted hints.
         lastWasWhitelisted = true;
+        if (showWhitelisted || verbose) {
+          super.report(message, uri, begin, end, text, kind);
+        }
         return;
       }
       hasHint = true;
@@ -128,6 +161,9 @@
       if (checkWhiteList(uri, message, text)) {
         // Suppress whitelisted errors.
         lastWasWhitelisted = true;
+        if (showWhitelisted || verbose) {
+          super.report(message, uri, begin, end, text, kind);
+        }
         return;
       }
       hasErrors = true;
@@ -136,6 +172,10 @@
       return;
     }
     lastWasWhitelisted = false;
+    if (kind != api.Diagnostic.VERBOSE_INFO) {
+      collectedMessages.add(new CollectedMessage(
+          message, uri, begin, end, text, kind));
+    }
     super.report(message, uri, begin, end, text, kind);
   }
 }
@@ -155,10 +195,17 @@
   TREE_SHAKING,
 }
 
+/// Analyzes the file(s) in [uriList] using the provided [mode] and checks that
+/// no messages (errors, warnings or hints) are emitted.
+///
+/// Messages can be generally allowed using [skipList] or on a per-file basis
+/// using [whiteList].
 Future analyze(List<Uri> uriList,
                Map<String, List/*<String|MessageKind>*/> whiteList,
                {AnalysisMode mode: AnalysisMode.ALL,
-                CheckResults checkResults}) async {
+                CheckResults checkResults,
+                List<String> options: const <String>[],
+                List<MessageKind> skipList: const <MessageKind>[]}) async {
   String testFileName =
       relativize(Uri.base, Platform.script, Platform.isWindows);
 
@@ -176,9 +223,9 @@
   var packageRoot =
       currentDirectory.resolve(Platform.packageRoot);
   var provider = new CompilerSourceFileProvider();
-  var handler = new CollectingDiagnosticHandler(whiteList, provider);
-  var options = <String>[Flags.analyzeOnly, '--categories=Client,Server',
-      Flags.showPackageWarnings];
+  var handler = new CollectingDiagnosticHandler(whiteList, skipList, provider);
+  options = <String>[Flags.analyzeOnly, '--categories=Client,Server',
+      Flags.showPackageWarnings]..addAll(options);
   switch (mode) {
     case AnalysisMode.URI:
     case AnalysisMode.MAIN:
@@ -190,14 +237,21 @@
     case AnalysisMode.TREE_SHAKING:
       break;
   }
+  if (options.contains(Flags.verbose)) {
+    handler.verbose = true;
+  }
+  if (options.contains(HIDE_WHITELISTED)) {
+    handler.showWhitelisted = false;
+  }
   var compiler = new CompilerImpl(
       provider,
       null,
       handler,
-      libraryRoot,
-      packageRoot,
-      options,
-      {});
+      new CompilerOptions.parse(
+          libraryRoot: libraryRoot,
+          packageRoot: packageRoot,
+          options: options,
+          environment: {}));
   String MESSAGE = """
 
 
@@ -210,12 +264,15 @@
 
   if (mode == AnalysisMode.URI) {
     for (Uri uri in uriList) {
+      print('Analyzing uri: $uri');
       await compiler.analyzeUri(uri);
     }
   } else if (mode != AnalysisMode.TREE_SHAKING) {
+    print('Analyzing libraries: $uriList');
     compiler.librariesToAnalyzeWhenRun = uriList;
     await compiler.run(null);
   } else {
+    print('Analyzing entry point: ${uriList.single}');
     await compiler.run(uriList.single);
   }
 
diff --git a/tests/compiler/dart2js/analyze_test_test.dart b/tests/compiler/dart2js/analyze_test_test.dart
index f2565ac..5da181c 100644
--- a/tests/compiler/dart2js/analyze_test_test.dart
+++ b/tests/compiler/dart2js/analyze_test_test.dart
@@ -24,13 +24,8 @@
  * Use an identifiable suffix of the file uri as key. Use a fixed substring of
  * the error/warning message in the list of white-listings for each file.
  */
-// TODO(johnniwinther): Support canonical URIs as keys and message kinds as
-// values.
+// TODO(johnniwinther): Support canonical URIs as keys.
 const Map<String, List/*<String|MessageKind>*/> WHITE_LIST = const {
-  // Several tests import mirrors; any of these might trigger the warning.
-  ".dart": const [
-      MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
-  ],
   "/test/src/util/": const [
       "Library 'package:async/async.dart' doesn't export a "
       "'ForkableStream' declaration.",
@@ -56,28 +51,54 @@
   "http_test.dart",
 ];
 
-main(List<String> arguments) {
-  bool verbose = arguments.contains('-v');
+const List<MessageKind> MESSAGE_SKIP_LIST = const <MessageKind>[
+  // TODO(johnniwinther): Support checking of this warning. (Issue 26132)
+  MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
+];
 
-  List<String> options = <String>[
-    Flags.analyzeOnly,
-    Flags.analyzeMain,
-    '--categories=Client,Server'];
-  if (verbose) {
-    options.add(Flags.verbose);
+main(List<String> arguments) {
+  List<String> options = <String>[];
+  for (String argument in arguments) {
+    if (argument == '-v') {
+      options.add(Flags.verbose);
+    } else if (argument.startsWith('-')) {
+      options.add(argument);
+    }
   }
-  asyncTest(() async {
-    List<Uri> uriList = <Uri>[];
-    Directory dir =
-        new Directory.fromUri(Uri.base.resolve('tests/compiler/dart2js/'));
-    for (FileSystemEntity entity in dir.listSync(recursive: true)) {
-      if (entity is File && entity.path.endsWith('.dart')) {
-        Uri file = Uri.base.resolve(nativeToUriPath(entity.path));
-        if (!SKIP_LIST.any((skip) => file.path.contains(skip))) {
-          uriList.add(file);
+  List<Uri> uriList = <Uri>[];
+  for (String arg in arguments) {
+    if (!arg.startsWith('-')) {
+      for (String line in new File(arg).readAsLinesSync()) {
+        line = line.trim();
+        if (line.startsWith('Analyzing uri: ')) {
+          int filenameOffset = line.indexOf('tests/compiler/dart2js/');
+          if (filenameOffset != -1) {
+            uriList.add(Uri.base.resolve(
+                nativeToUriPath(line.substring(filenameOffset))));
+          }
         }
       }
     }
-    await analyze(uriList, WHITE_LIST, mode: AnalysisMode.URI);
+  }
+
+  asyncTest(() async {
+    if (uriList.isEmpty) {
+      Directory dir =
+          new Directory.fromUri(Uri.base.resolve('tests/compiler/dart2js/'));
+      for (FileSystemEntity entity in dir.listSync(recursive: true)) {
+        if (entity is File && entity.path.endsWith('.dart')) {
+          Uri file = Uri.base.resolve(nativeToUriPath(entity.path));
+          if (!SKIP_LIST.any((skip) => file.path.contains(skip))) {
+            uriList.add(file);
+          }
+        }
+      }
+    }
+    await analyze(
+        uriList,
+        WHITE_LIST,
+        mode: AnalysisMode.URI,
+        options: options,
+        skipList: MESSAGE_SKIP_LIST);
   });
 }
diff --git a/tests/compiler/dart2js/backend_dart/dart_printer_test.dart b/tests/compiler/dart2js/backend_dart/dart_printer_test.dart
index 88eabca..4d331b3 100644
--- a/tests/compiler/dart2js/backend_dart/dart_printer_test.dart
+++ b/tests/compiler/dart2js/backend_dart/dart_printer_test.dart
@@ -22,6 +22,7 @@
 import 'package:compiler/src/string_validator.dart';
 import 'package:compiler/src/tree/tree.dart' show DartString;
 import 'package:compiler/src/tree/tree.dart' as tree;
+import '../options_helper.dart';
 
 /// For debugging the [AstBuilder] stack. Prints information about [x].
 void show(x) {
@@ -232,6 +233,7 @@
   }
   endSend(t) {
     List<Argument> arguments = pop();
+    pop(); // typeArguments
     if (arguments == null)
       return; // not a function call
     Expression selector = pop();
@@ -673,7 +675,7 @@
   Scanner scan = new Scanner(file);
   Token tok = scan.tokenize();
   AstBuilder builder = new AstBuilder();
-  Parser parser = new Parser(builder);
+  Parser parser = new Parser(builder, new MockParserOptions());
   tok = parser.parseExpression(tok);
   if (builder.stack.length != 1 || tok.kind != EOF_TOKEN) {
     throw "Parse error in $code";
@@ -685,7 +687,7 @@
   Scanner scan = new Scanner(file);
   Token tok = scan.tokenize();
   AstBuilder builder = new AstBuilder();
-  Parser parser = new Parser(builder);
+  Parser parser = new Parser(builder, new MockParserOptions());
   tok = parser.parseStatement(tok);
   if (builder.stack.length != 1 || tok.kind != EOF_TOKEN) {
     throw "Parse error in $code";
diff --git a/tests/compiler/dart2js/bad_loop_test.dart b/tests/compiler/dart2js/bad_loop_test.dart
index c1b2a6d..bc6d43d 100644
--- a/tests/compiler/dart2js/bad_loop_test.dart
+++ b/tests/compiler/dart2js/bad_loop_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -8,7 +8,7 @@
 
 import 'package:compiler/compiler.dart'
        show Diagnostic;
-import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/options.dart' show CompilerOptions;
 import 'package:compiler/src/old_to_new_api.dart';
 
 main() {
@@ -37,10 +37,9 @@
       new LegacyCompilerInput(provider.readStringFromUri),
       new LegacyCompilerOutput(),
       new LegacyCompilerDiagnostics(diagnosticHandler),
-      libraryRoot,
-      packageRoot,
-      [Flags.analyzeOnly],
-      {});
+      new CompilerOptions(
+        libraryRoot: libraryRoot,
+        packageRoot: packageRoot));
   asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) {
     Expect.isTrue(compiler.compilationFailed);
     Expect.equals(5, errorCount);
diff --git a/tests/compiler/dart2js/call_site_simple_type_inferer_test.dart b/tests/compiler/dart2js/call_site_simple_type_inferer_test.dart
index 517a347..123ae7e 100644
--- a/tests/compiler/dart2js/call_site_simple_type_inferer_test.dart
+++ b/tests/compiler/dart2js/call_site_simple_type_inferer_test.dart
@@ -14,8 +14,7 @@
                     bool disableInlining,
                     check(compiler, element)) {
   Uri uri = new Uri(scheme: 'source');
-  var compiler = compilerFor(code, uri);
-  compiler.disableInlining = disableInlining;
+  var compiler = compilerFor(code, uri, disableInlining: disableInlining);
   asyncTest(() => compiler.run(uri).then((_) {
     var cls = findElement(compiler, className);
     var member = cls.lookupLocalMember(memberName);
diff --git a/tests/compiler/dart2js/class_set_test.dart b/tests/compiler/dart2js/class_set_test.dart
index 71fbd97..1d3b04f 100644
--- a/tests/compiler/dart2js/class_set_test.dart
+++ b/tests/compiler/dart2js/class_set_test.dart
@@ -411,7 +411,7 @@
     visited = <ClassElement>[];
     classSet.forEachSubclass((ClassElement cls) {
       visited.add(cls);
-      return ForEach.CONTINUE;
+      return IterationStep.CONTINUE;
     }, ClassHierarchyNode.ALL);
 
     Expect.listEquals(expected, visited,
@@ -444,7 +444,7 @@
     visited = <ClassElement>[];
     classSet.forEachSubtype((ClassElement cls) {
       visited.add(cls);
-      return ForEach.CONTINUE;
+      return IterationStep.CONTINUE;
     }, ClassHierarchyNode.ALL);
 
     Expect.listEquals(expected, visited,
@@ -478,14 +478,14 @@
     ClassSet classSet = world.getClassSet(cls);
     List<ClassElement> visited = <ClassElement>[];
 
-    ForEach visit(ClassElement cls) {
+    IterationStep visit(ClassElement cls) {
       visited.add(cls);
       if (cls == stop) {
-        return ForEach.STOP;
+        return IterationStep.STOP;
       } else if (skipSubclasses.contains(cls)) {
-        return ForEach.SKIP_SUBCLASSES;
+        return IterationStep.SKIP_SUBCLASSES;
       }
-      return ForEach.CONTINUE;
+      return IterationStep.CONTINUE;
     }
 
     if (forEachSubtype) {
diff --git a/tests/compiler/dart2js/codegen_helper.dart b/tests/compiler/dart2js/codegen_helper.dart
index c99fc49..cd45136 100644
--- a/tests/compiler/dart2js/codegen_helper.dart
+++ b/tests/compiler/dart2js/codegen_helper.dart
@@ -1,9 +1,10 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 import 'package:expect/expect.dart';
+import 'package:compiler/src/options.dart' show CompilerOptions;
 import 'package:compiler/src/null_compiler_output.dart';
 import 'memory_source_file_helper.dart';
 
@@ -16,14 +17,15 @@
   var provider = new MemorySourceFileProvider({ 'main.dart': code });
   var handler = new FormattingDiagnosticHandler(provider);
 
+  Uri uri = Uri.parse('memory:main.dart');
   CompilerImpl compiler = new CompilerImpl(provider,
                                    const NullCompilerOutput(),
                                    handler,
-                                   libraryRoot,
-                                   packageRoot,
-                                   options,
-                                   {});
-  Uri uri = Uri.parse('memory:main.dart');
+                                   new CompilerOptions.parse(
+                                       entryPoint: uri,
+                                       libraryRoot: libraryRoot,
+                                       packageRoot: packageRoot,
+                                       options: options));
   return compiler.run(uri).then((success) {
     Expect.isTrue(success);
     Map<String, String> result = new Map<String, String>();
diff --git a/tests/compiler/dart2js/compiler_helper.dart b/tests/compiler/dart2js/compiler_helper.dart
index bef0984..e365f3b 100644
--- a/tests/compiler/dart2js/compiler_helper.dart
+++ b/tests/compiler/dart2js/compiler_helper.dart
@@ -112,6 +112,10 @@
       options.add(Flags.trustJSInteropTypeAnnotations);
     }
 
+    if (disableInlining) {
+      options.add(Flags.disableInlining);
+    }
+
     Map<String, String> source;
     if (entry != 'main') {
       source = {'main.dart': "$code\n\nmain() => $entry;" };
@@ -122,12 +126,7 @@
     CompilationResult result = await runCompiler(
         memorySourceFiles: source,
         options: options,
-        outputProvider: outputCollector,
-        beforeRun: (compiler) {
-          if (disableInlining) {
-            compiler.disableInlining = true;
-          }
-        });
+        outputProvider: outputCollector);
     Expect.isTrue(result.isSuccess);
     Compiler compiler =  result.compiler;
     lego.Element element = compiler.mainApp.find(entry);
diff --git a/tests/compiler/dart2js/cps_ir/expected/constructor_9.js b/tests/compiler/dart2js/cps_ir/expected/constructor_9.js
index 05928b3..6240573 100644
--- a/tests/compiler/dart2js/cps_ir/expected/constructor_9.js
+++ b/tests/compiler/dart2js/cps_ir/expected/constructor_9.js
@@ -9,7 +9,15 @@
 // }
 
 function($T) {
-  var v0 = H.setRuntimeTypeInfo(new V.C(), [$T]);
-  v0.C$0();
-  return v0;
+  var line = H.S(H.createRuntimeType(H.runtimeTypeToString($T)));
+  if (typeof dartPrint == "function")
+    dartPrint(line);
+  else if (typeof console == "object" && typeof console.log != "undefined")
+    console.log(line);
+  else if (!(typeof window == "object")) {
+    if (!(typeof print == "function"))
+      throw "Unable to print message: " + String(line);
+    print(line);
+  }
+  return H.setRuntimeTypeInfo(new V.C(), [$T]);
 }
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index 888e95f..6c26bdb 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -49,8 +49,8 @@
 
 # Source information is not correct due to inlining.
 js_backend_cps_ir_source_information_test: Fail
-sourcemaps/source_mapping_operators_test: Fail, Slow # Issue 25304 for checked mode, was: Pass, Slow
-sourcemaps/source_mapping_invokes_test: Fail, Slow # Issue 25304 for checked mode, was: Pass, Slow
+sourcemaps/source_mapping_operators_test: Pass, Slow
+sourcemaps/source_mapping_invokes_test: Pass, Slow
 
 check_elements_invariants_test: Slow, Pass, Timeout # Slow due to inlining in the CPS backend
 
@@ -68,6 +68,7 @@
 interop_anonymous_unreachable_test: Pass, Slow
 mirror_final_field_inferrer2_test: Pass, Slow
 source_map_pub_build_validity_test: Pass, Slow
+serialization*: Slow, Pass
 uri_retention_test: Pass, Slow
 value_range_test: Pass, Slow
 
diff --git a/tests/compiler/dart2js/diagnostic_reporter_helper.dart b/tests/compiler/dart2js/diagnostic_reporter_helper.dart
index 0bff795..afc199d 100644
--- a/tests/compiler/dart2js/diagnostic_reporter_helper.dart
+++ b/tests/compiler/dart2js/diagnostic_reporter_helper.dart
@@ -9,6 +9,7 @@
 import 'package:compiler/src/diagnostics/spannable.dart';
 import 'package:compiler/src/diagnostics/source_span.dart';
 import 'package:compiler/src/elements/elements.dart';
+import 'options_helper.dart';
 
 abstract class DiagnosticReporterWrapper extends DiagnosticReporter {
   DiagnosticReporter get reporter;
diff --git a/tests/compiler/dart2js/exit_code_test.dart b/tests/compiler/dart2js/exit_code_test.dart
index e5263e4..715d4d6 100644
--- a/tests/compiler/dart2js/exit_code_test.dart
+++ b/tests/compiler/dart2js/exit_code_test.dart
@@ -27,6 +27,7 @@
 import 'package:compiler/src/library_loader.dart';
 import 'package:compiler/src/null_compiler_output.dart';
 import 'package:compiler/src/old_to_new_api.dart';
+import 'package:compiler/src/options.dart' show CompilerOptions;
 import 'package:compiler/src/resolution/resolution.dart';
 import 'package:compiler/src/scanner/scanner_task.dart';
 import 'package:compiler/src/universe/world_impact.dart';
@@ -50,14 +51,26 @@
                String this.testMarker,
                String this.testType,
                Function this.onTest)
-      : super(inputProvider, outputProvider, handler, libraryRoot,
-              packageRoot, options, environment, packageConfig, findPackages) {
-    scanner = new TestScanner(this);
-    resolver = new TestResolver(this, backend.constantCompilerTask);
+      : super(inputProvider, outputProvider, handler,
+            new CompilerOptions.parse(
+                libraryRoot: libraryRoot,
+                packageRoot: packageRoot,
+                options: options,
+                environment: environment,
+                packageConfig: packageConfig,
+                packagesDiscoveryProvider: findPackages)) {
     reporter = new TestDiagnosticReporter(this, super.reporter);
     test('Compiler');
   }
 
+  @override
+  ScannerTask createScannerTask() => new TestScanner(this);
+
+  @override
+  ResolverTask createResolverTask() {
+    return new TestResolver(this, backend.constantCompilerTask);
+  }
+
   Future<bool> run(Uri uri) {
     test('Compiler.run');
     return super.run(uri);
@@ -138,7 +151,8 @@
 }
 
 class TestScanner extends ScannerTask {
-  TestScanner(TestCompiler compiler) : super(compiler);
+  TestScanner(TestCompiler compiler)
+      : super(compiler, compiler.dietParser);
 
   TestCompiler get compiler => super.compiler;
 
diff --git a/tests/compiler/dart2js/field_type_simple_inferer_test.dart b/tests/compiler/dart2js/field_type_simple_inferer_test.dart
index 7eeb5f9..534a7ed 100644
--- a/tests/compiler/dart2js/field_type_simple_inferer_test.dart
+++ b/tests/compiler/dart2js/field_type_simple_inferer_test.dart
@@ -16,9 +16,9 @@
                     bool disableInlining,
                     check(compiler, element)) {
   Uri uri = new Uri(scheme: 'source');
-  var compiler = compilerFor(code, uri);
+  var compiler = compilerFor(code, uri,
+      disableInlining: disableInlining);
   asyncTest(() => compiler.run(uri).then((_) {
-    compiler.disableInlining = disableInlining;
     var cls = findElement(compiler, className);
     var member = cls.lookupMember(memberName);
     check(compiler, member);
diff --git a/tests/compiler/dart2js/incremental/compile_all.dart b/tests/compiler/dart2js/incremental/compile_all.dart
index 9d62061..fb22d15 100644
--- a/tests/compiler/dart2js/incremental/compile_all.dart
+++ b/tests/compiler/dart2js/incremental/compile_all.dart
@@ -53,7 +53,7 @@
       inputProvider: memoryCompiler.provider,
       outputProvider: memoryCompiler.userOutputProvider,
       diagnosticHandler: memoryCompiler.handler,
-      packageRoot: memoryCompiler.packageRoot,
+      packageRoot: memoryCompiler.options.packageRoot,
       options: options);
   Future.forEach(sources.keys, (String path) {
     UserTag.defaultTag.makeCurrent();
diff --git a/tests/compiler/dart2js/library_env_test.dart b/tests/compiler/dart2js/library_env_test.dart
index 0f0ff6d..d162b72 100644
--- a/tests/compiler/dart2js/library_env_test.dart
+++ b/tests/compiler/dart2js/library_env_test.dart
@@ -1,14 +1,10 @@
-// Copyright (c) 2015, 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.
 
 /// Check that 'dart:' libraries have their corresponding dart.library.X
 /// environment variable set.
 
-import "dart:io";
-
-import "dart:async";
-
 import "memory_source_file_helper.dart";
 
 import "package:async_helper/async_helper.dart";
@@ -16,19 +12,16 @@
 import 'package:expect/expect.dart' show
     Expect;
 
-import 'package:compiler/src/elements/elements.dart' show
-    LibraryElement;
-
 import 'package:compiler/src/null_compiler_output.dart' show
     NullCompilerOutput;
 
+import 'package:compiler/src/options.dart' show
+    CompilerOptions;
+
 import 'package:compiler/compiler_new.dart' show
     CompilerInput,
     CompilerDiagnostics;
 
-import 'package:sdk_library_metadata/libraries.dart' show
-    LibraryInfo;
-
 const clientPlatform = r'''
 [dart-spec]
 spec: 3rd edition.
@@ -80,23 +73,19 @@
 }
 
 class CustomCompiler extends CompilerImpl {
-  CustomCompiler(
-      options,
-      environment)
+  CustomCompiler(options, environment)
       : super(
           const DummyCompilerInput(),
           const NullCompilerOutput(),
           const DummyCompilerDiagnostics(),
-          Uri.base.resolve("sdk/"),
-          null,
-          options,
-          environment);
+          new CompilerOptions.parse(
+              libraryRoot: Uri.base.resolve("sdk/"),
+              options: options,
+              environment: environment));
 }
 
 runTest() async {
-  var compiler = new CustomCompiler(
-      [],
-      {});
+  var compiler = new CustomCompiler([], {});
 
   await compiler.setupSdk();
 
@@ -113,9 +102,7 @@
   Expect.equals(null, compiler.fromEnvironment("dart.library.mock.server"));
   Expect.equals(null, compiler.fromEnvironment("dart.library.io"));
 
-  compiler = new CustomCompiler(
-      ['--categories=Server'],
-      {});
+  compiler = new CustomCompiler(['--categories=Server'], {});
 
   await compiler.setupSdk();
 
@@ -133,8 +120,7 @@
   Expect.equals("true", compiler.fromEnvironment("dart.library.io"));
 
   // Check that user-defined env-variables win.
-  compiler = new CustomCompiler(
-      [],
+  compiler = new CustomCompiler([],
       {'dart.library.collection': "false",
        'dart.library.mock.client': "foo"});
 
@@ -149,4 +135,4 @@
   runTest().then((_) {
     asyncEnd();
   });
-}
\ No newline at end of file
+}
diff --git a/tests/compiler/dart2js/library_resolution_test.dart b/tests/compiler/dart2js/library_resolution_test.dart
index 28ad567..c5a5fa7 100644
--- a/tests/compiler/dart2js/library_resolution_test.dart
+++ b/tests/compiler/dart2js/library_resolution_test.dart
@@ -25,16 +25,18 @@
 
 import 'package:compiler/src/old_to_new_api.dart'
     show LegacyCompilerDiagnostics, LegacyCompilerInput;
+import 'package:compiler/src/options.dart' show CompilerOptions;
 
 Uri sdkRoot = Uri.base.resolve("sdk/");
 Uri mock1LibraryUri = sdkRoot.resolve("lib/mock1.dart");
 Uri mock2LibraryUri = sdkRoot.resolve("lib/mock2.dart");
 
 class CustomCompiler extends CompilerImpl {
-  CustomCompiler(provider, handler, libraryRoot,
-      packageRoot, options, environment)
-      : super(provider, const NullCompilerOutput(), handler, libraryRoot,
-            packageRoot, options, environment);
+  CustomCompiler(provider, handler, libraryRoot, packageRoot)
+      : super(provider, const NullCompilerOutput(), handler,
+            new CompilerOptions(
+                libraryRoot: libraryRoot,
+                packageRoot: packageRoot));
 
   Uri lookupLibraryUri(String libraryName) {
     if (libraryName == "m_o_c_k_1") return mock1LibraryUri;
@@ -81,9 +83,7 @@
       new LegacyCompilerInput(wrappedProvider),
       new LegacyCompilerDiagnostics(wrappedHandler),
       sdkRoot,
-      packageRoot,
-      [],
-      {});
+      packageRoot);
 
   asyncStart();
   await compiler.setupSdk();
diff --git a/tests/compiler/dart2js/memory_compiler.dart b/tests/compiler/dart2js/memory_compiler.dart
index fa69df7..7c88613 100644
--- a/tests/compiler/dart2js/memory_compiler.dart
+++ b/tests/compiler/dart2js/memory_compiler.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, 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,8 @@
     NullCompilerOutput;
 import 'package:compiler/src/library_loader.dart' show
     LoadedLibraries;
+import 'package:compiler/src/options.dart' show
+    CompilerOptions;
 
 import 'memory_source_file_helper.dart';
 
@@ -84,6 +86,7 @@
     entryPoint = Uri.parse('memory:main.dart');
   }
   CompilerImpl compiler = compilerFor(
+      entryPoint: entryPoint,
       memorySourceFiles: memorySourceFiles,
       diagnosticHandler: diagnosticHandler,
       outputProvider: outputProvider,
@@ -102,7 +105,8 @@
 }
 
 CompilerImpl compilerFor(
-    {Map<String, String> memorySourceFiles: const <String, String>{},
+    {Uri entryPoint,
+     Map<String, String> memorySourceFiles: const <String, String>{},
      CompilerDiagnostics diagnosticHandler,
      CompilerOutput outputProvider,
      List<String> options: const <String>[],
@@ -143,12 +147,14 @@
       provider,
       outputProvider,
       diagnosticHandler,
-      libraryRoot,
-      packageRoot,
-      options,
-      {},
-      packageConfig,
-      packagesDiscoveryProvider);
+      new CompilerOptions.parse(
+          entryPoint: entryPoint,
+          libraryRoot: libraryRoot,
+          packageRoot: packageRoot,
+          options: options,
+          environment: {},
+          packageConfig: packageConfig,
+          packagesDiscoveryProvider: packagesDiscoveryProvider));
 
   if (cachedCompiler != null) {
     compiler.coreLibrary =
@@ -213,7 +219,6 @@
     cachedCompiler.deferredLoadTask = null;
     cachedCompiler.mirrorUsageAnalyzerTask = null;
     cachedCompiler.dumpInfoTask = null;
-    cachedCompiler.buildId = null;
   }
   return compiler;
 }
diff --git a/tests/compiler/dart2js/message_kind_helper.dart b/tests/compiler/dart2js/message_kind_helper.dart
index ad46907..c413241 100644
--- a/tests/compiler/dart2js/message_kind_helper.dart
+++ b/tests/compiler/dart2js/message_kind_helper.dart
@@ -57,7 +57,6 @@
 ]);
 
 Future<Compiler> check(MessageTemplate template, Compiler cachedCompiler) {
-  Expect.isNotNull(template.howToFix);
   Expect.isFalse(template.examples.isEmpty);
 
   return Future.forEach(template.examples, (example) {
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 11b450d..e2628b8 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -1,10 +1,9 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 library mock_compiler;
 
-import "package:expect/expect.dart";
 import 'dart:async';
 import 'dart:collection';
 
@@ -16,11 +15,14 @@
 import 'package:compiler/src/diagnostics/source_span.dart';
 import 'package:compiler/src/diagnostics/spannable.dart';
 import 'package:compiler/src/elements/elements.dart';
-import 'package:compiler/src/js_backend/backend_helpers.dart'
-    show BackendHelpers;
-import 'package:compiler/src/js_backend/lookup_map_analysis.dart'
-    show LookupMapAnalysis;
+import 'package:compiler/src/elements/visitor.dart';
+import 'package:compiler/src/js_backend/backend_helpers.dart' show
+    BackendHelpers;
+import 'package:compiler/src/js_backend/lookup_map_analysis.dart' show
+    LookupMapAnalysis;
 import 'package:compiler/src/io/source_file.dart';
+import 'package:compiler/src/options.dart' show
+    CompilerOptions;
 import 'package:compiler/src/resolution/members.dart';
 import 'package:compiler/src/resolution/registry.dart';
 import 'package:compiler/src/resolution/scope.dart';
@@ -30,17 +32,17 @@
 import 'package:compiler/src/old_to_new_api.dart';
 import 'parser_helper.dart';
 
-import 'package:compiler/src/elements/modelx.dart'
-    show ElementX,
-         LibraryElementX,
-         ErroneousElementX,
-         FunctionElementX;
+import 'package:compiler/src/elements/modelx.dart' show
+    ElementX,
+    LibraryElementX,
+    ErroneousElementX,
+    FunctionElementX;
 
 import 'package:compiler/src/compiler.dart';
 
-import 'package:compiler/src/deferred_load.dart'
-    show DeferredLoadTask,
-         OutputUnit;
+import 'package:compiler/src/deferred_load.dart' show
+    DeferredLoadTask,
+    OutputUnit;
 
 import 'mock_libraries.dart';
 import 'diagnostic_helper.dart';
@@ -69,7 +71,6 @@
        bool enableTypeAssertions: false,
        bool enableUserAssertions: false,
        bool enableMinification: false,
-       int maxConcreteTypeSize: 5,
        bool disableTypeInference: false,
        bool analyzeAll: false,
        bool analyzeOnly: false,
@@ -88,22 +89,23 @@
        LibrarySourceProvider this.librariesOverride})
       : sourceFiles = new Map<String, SourceFile>(),
         testedPatchVersion = patchVersion,
-        super(enableTypeAssertions: enableTypeAssertions,
+        super(options: new CompilerOptions(
+              entryPoint: new Uri(scheme: 'mock'),
+              libraryRoot: Uri.parse('placeholder_library_root_for_mock/'),
+              enableTypeAssertions: enableTypeAssertions,
               enableUserAssertions: enableUserAssertions,
+              disableInlining: disableInlining,
               enableAssertMessage: true,
               enableMinification: enableMinification,
-              maxConcreteTypeSize: maxConcreteTypeSize,
-              disableTypeInferenceFlag: disableTypeInference,
-              analyzeAllFlag: analyzeAll,
+              disableTypeInference: disableTypeInference,
+              analyzeAll: analyzeAll,
               analyzeOnly: analyzeOnly,
               emitJavaScript: emitJavaScript,
               preserveComments: preserveComments,
               trustTypeAnnotations: trustTypeAnnotations,
               trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations,
-              diagnosticOptions:
-                  new DiagnosticOptions(shownPackageWarnings: const []),
+              shownPackageWarnings: const []),
               outputProvider: new LegacyCompilerOutput(outputProvider)) {
-    this.disableInlining = disableInlining;
 
     deferredLoadTask = new MockDeferredLoadTask(this);
 
@@ -266,7 +268,7 @@
     return null;
   }
 
-  Future<Script> readScript(Spannable node, Uri uri) {
+  Future<Script> readScript(Uri uri, [Spannable spannable]) {
     SourceFile sourceFile = sourceFiles[uri.toString()];
     if (sourceFile == null) throw new ArgumentError(uri);
     return new Future.value(new Script(uri, uri, sourceFile));
@@ -345,6 +347,10 @@
   parseNode(_) => null;
 
   bool get hasNode => false;
+
+  accept(ElementVisitor visitor, arg) {
+    return visitor.visitMethodElement(this, arg);
+  }
 }
 
 // TODO(herhut): Disallow warnings and errors during compilation by default.
diff --git a/tests/compiler/dart2js/options_helper.dart b/tests/compiler/dart2js/options_helper.dart
new file mode 100644
index 0000000..5df9c08
--- /dev/null
+++ b/tests/compiler/dart2js/options_helper.dart
@@ -0,0 +1,24 @@
+// 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 options_helper;
+
+import 'package:compiler/src/options.dart';
+export 'package:compiler/src/options.dart';
+
+class MockDiagnosticOptions implements DiagnosticOptions {
+  const MockDiagnosticOptions();
+
+  bool get fatalWarnings => false;
+  bool get terseDiagnostics => false;
+  bool get suppressWarnings => false;
+  bool get suppressHints => false;
+  bool get showAllPackageWarnings => false;
+  bool get hidePackageWarnings => true;
+  bool showPackageWarningsFor(Uri uri) => false;
+}
+
+class MockParserOptions implements ParserOptions {
+  bool get enableGenericMethodSyntax => true;
+}
diff --git a/tests/compiler/dart2js/parser_helper.dart b/tests/compiler/dart2js/parser_helper.dart
index 202e6f2..028fa06 100644
--- a/tests/compiler/dart2js/parser_helper.dart
+++ b/tests/compiler/dart2js/parser_helper.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, 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:expect/expect.dart";
 
 import "package:compiler/src/elements/elements.dart";
+import 'package:compiler/src/id_generator.dart';
 import "package:compiler/src/tree/tree.dart";
 import "package:compiler/src/parser/element_listener.dart";
 import "package:compiler/src/parser/node_listener.dart";
@@ -22,12 +23,15 @@
     show CompilationUnitElementX, ElementX, LibraryElementX;
 
 import "package:compiler/src/compiler.dart";
+import 'package:compiler/src/options.dart';
 import "package:compiler/src/diagnostics/source_span.dart";
 import "package:compiler/src/diagnostics/spannable.dart";
 import "package:compiler/src/diagnostics/diagnostic_listener.dart";
 import "package:compiler/src/diagnostics/messages.dart";
 import "package:compiler/src/script.dart";
 
+import "options_helper.dart";
+
 export "package:compiler/src/diagnostics/diagnostic_listener.dart";
 export 'package:compiler/src/parser/listener.dart';
 export 'package:compiler/src/parser/node_listener.dart';
@@ -38,6 +42,8 @@
 export "package:compiler/src/tokens/token_constants.dart";
 
 class LoggerCanceler extends DiagnosticReporter {
+  DiagnosticOptions get options => const MockDiagnosticOptions();
+
   void log(message) {
     print(message);
   }
@@ -102,7 +108,7 @@
   NodeListener listener = new NodeListener(
       new ScannerOptions(canUseNative: true),
       reporter, library.entryCompilationUnit);
-  Parser parser = new Parser(listener, enableConditionalDirectives: true);
+  Parser parser = new Parser(listener, new MockParserOptions());
   Token endToken = parseMethod(parser, tokens);
   assert(endToken.kind == EOF_TOKEN);
   Node node = listener.popNode();
@@ -145,12 +151,11 @@
   }
   var script = new Script(uri, uri, new MockFile(text));
   var unit = new CompilationUnitElementX(script, library);
-  int id = 0;
   DiagnosticReporter reporter = compiler.reporter;
   ElementListener listener = new ElementListener(
       compiler.parsing.getScannerOptionsFor(library),
-      reporter, unit, () => id++);
-  PartialParser parser = new PartialParser(listener);
+      reporter, unit, new IdGenerator());
+  PartialParser parser = new PartialParser(listener, new MockParserOptions());
   reporter.withCurrentElement(unit, () => parser.parseUnit(tokens));
   return unit.localMembers;
 }
diff --git a/tests/compiler/dart2js/partial_parser_test.dart b/tests/compiler/dart2js/partial_parser_test.dart
index e0099f1..b1c4d3b 100644
--- a/tests/compiler/dart2js/partial_parser_test.dart
+++ b/tests/compiler/dart2js/partial_parser_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
+import 'options_helper.dart';
 import 'parser_helper.dart';
 
 void main() {
@@ -10,7 +11,8 @@
 }
 
 void testSkipExpression() {
-  PartialParser parser = new PartialParser(new Listener());
+  PartialParser parser =
+      new PartialParser(new Listener(), new MockParserOptions());
   Token token = scan('a < b;');
   token = parser.skipExpression(token);
   Expect.equals(';', token.value);
diff --git a/tests/compiler/dart2js/patch_test.dart b/tests/compiler/dart2js/patch_test.dart
index 9f20998..3581b17 100644
--- a/tests/compiler/dart2js/patch_test.dart
+++ b/tests/compiler/dart2js/patch_test.dart
@@ -57,7 +57,7 @@
 void expectHasNoBody(compiler, ElementX element) {
     var node = element.parseNode(compiler.parsing);
     Expect.isNotNull(node, "Element isn't parseable, when a body was expected");
-    Expect.isFalse(node.hasBody());
+    Expect.isFalse(node.hasBody);
 }
 
 Element ensure(compiler,
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index 3396e53..a69ce72 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -858,7 +858,7 @@
       DiagnosticCollector collector = compiler.diagnosticCollector;
       Expect.equals(1, collector.warnings.length,
                     'Unexpected warnings: ${collector.warnings}');
-      Expect.equals(MessageKind.MEMBER_NOT_FOUND,
+      Expect.equals(MessageKind.UNDEFINED_GETTER,
                     collector.warnings.first.message.kind);
       Expect.equals(0, collector.errors.length,
                     'Unexpected errors: ${collector.errors}');
@@ -1265,7 +1265,7 @@
           mname = () => null;
         }
       }
-      ''', [MessageKind.SETTER_NOT_FOUND]);
+      ''', [MessageKind.UNDEFINED_SETTER]);
   checkWarningOn('''
       main() { new B().bar(); }
       class B {
@@ -1274,7 +1274,7 @@
           this.mname = () => null;
         }
       }
-      ''', [MessageKind.SETTER_NOT_FOUND]);
+      ''', [MessageKind.UNDEFINED_SETTER]);
 
   // Can't override super methods
   checkWarningOn('''
@@ -1289,7 +1289,7 @@
       }
       ''', [MessageKind.ASSIGNING_METHOD_IN_SUPER,
             // TODO(johnniwinther): Avoid duplicate warnings.
-            MessageKind.SETTER_NOT_FOUND]);
+            MessageKind.UNDEFINED_SETTER]);
 
   // But index operators should be OK
   checkWarningOn('''
@@ -1321,22 +1321,22 @@
         final x = 1;
         x = 2;
       }
-      ''', [MessageKind.CANNOT_RESOLVE_SETTER]);
+      ''', [MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER]);
   checkWarningOn('''
       main() {
         const x = 1;
         x = 2;
       }
-      ''', [MessageKind.CANNOT_RESOLVE_SETTER]);
+      ''', [MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER]);
   checkWarningOn('''
       final x = 1;
       main() { x = 3; }
-      ''', [MessageKind.CANNOT_RESOLVE_SETTER]);
+      ''', [MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER]);
 
   checkWarningOn('''
       const x = 1;
       main() { x = 3; }
-      ''', [MessageKind.CANNOT_RESOLVE_SETTER]);
+      ''', [MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER]);
 
   // Detect assignments to final fields:
   checkWarningOn('''
@@ -1345,7 +1345,7 @@
         final x = 1;
         m() { x = 2; }
       }
-      ''', [MessageKind.SETTER_NOT_FOUND]);
+      ''', [MessageKind.UNDEFINED_SETTER]);
 
   // ... even if 'this' is explicit:
   checkWarningOn('''
@@ -1354,7 +1354,7 @@
         final x = 1;
         m() { this.x = 2; }
       }
-      ''', [MessageKind.SETTER_NOT_FOUND]);
+      ''', [MessageKind.UNDEFINED_SETTER]);
 
   // ... and in super class:
   checkWarningOn('''
@@ -1367,7 +1367,7 @@
       }
       ''', [MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
             // TODO(johnniwinther): Avoid duplicate warnings.
-            MessageKind.SETTER_NOT_FOUND]);
+            MessageKind.UNDEFINED_SETTER]);
 
   // But non-final fields are OK:
   checkWarningOn('''
@@ -1389,9 +1389,9 @@
       class B extends A {
         m() { super.x = 2; }
       }
-      ''', [MessageKind.SETTER_NOT_FOUND_IN_SUPER,
+      ''', [MessageKind.UNDEFINED_SUPER_SETTER,
             // TODO(johnniwinther): Avoid duplicate warnings.
-            MessageKind.SETTER_NOT_FOUND]);
+            MessageKind.UNDEFINED_SETTER]);
 }
 
 /// Helper to test that [script] produces all the given [warnings].
diff --git a/tests/compiler/dart2js/semantic_visitor_test.dart b/tests/compiler/dart2js/semantic_visitor_test.dart
index 5a0e9dd..f8eca14 100644
--- a/tests/compiler/dart2js/semantic_visitor_test.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test.dart
@@ -674,6 +674,12 @@
   VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND_INDEX_SET,
   VISIT_UNRESOLVED_SUPER_SETTER_COMPOUND_INDEX_SET,
 
+  VISIT_INDEX_SET_IF_NULL,
+  VISIT_SUPER_INDEX_SET_IF_NULL,
+  VISIT_UNRESOLVED_SUPER_INDEX_SET_IF_NULL,
+  VISIT_UNRESOLVED_SUPER_GETTER_INDEX_SET_IF_NULL,
+  VISIT_UNRESOLVED_SUPER_SETTER_INDEX_SET_IF_NULL,
+
   VISIT_LOGICAL_AND,
   VISIT_LOGICAL_OR,
   VISIT_IS,
diff --git a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
index 51eae03..b72e479 100644
--- a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
@@ -2142,6 +2142,66 @@
                     error: MessageKind.NO_SUPER_IN_STATIC,
                     index: '42',
                     operator: '--')),
+    const Test(
+        '''
+        m() => [][42] ??= 0;
+        ''',
+        const Visit(VisitKind.VISIT_INDEX_SET_IF_NULL,
+                    receiver: '[] ',
+                    index: '42',
+                    rhs: '0')),
+    const Test.clazz(
+        '''
+        class B {
+          operator [](_) => null;
+          operator []=(a, b) {}
+        }
+        class C extends B {
+          m() => super[42] ??= 0;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_INDEX_SET_IF_NULL,
+                    getter: 'function(B#[])',
+                    setter: 'function(B#[]=)',
+                    index: '42',
+                    rhs: '0')),
+    const Test.clazz(
+        '''
+        class B {
+          operator []=(a, b) {}
+        }
+        class C extends B {
+          m() => super[42] ??= 0;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_SET_IF_NULL,
+                    setter: 'function(B#[]=)',
+                    index: '42',
+                    rhs: '0')),
+    const Test.clazz(
+        '''
+        class B {
+          operator [](_) => null;
+        }
+        class C extends B {
+          m() => super[42] ??= 0;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_INDEX_SET_IF_NULL,
+                    getter: 'function(B#[])',
+                    index: '42',
+                    rhs: '0')),
+    const Test.clazz(
+        '''
+        class B {
+        }
+        class C extends B {
+          m() => super[42] ??= 0;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_SET_IF_NULL,
+                    index: '42',
+                    rhs: '0')),
   ],
   'Equals': const [
     // Equals
diff --git a/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart b/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
index cdbbe41..2187ba8 100644
--- a/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
@@ -3551,4 +3551,87 @@
     super.visitUnresolvedTopLevelSetterSetIfNull(
         node, getter, element, rhs, arg);
   }
+
+  @override
+  visitIndexSetIfNull(
+      SendSet node,
+      Node receiver,
+      Node index,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.VISIT_INDEX_SET_IF_NULL,
+        receiver: receiver, index: index, rhs: rhs));
+    super.visitIndexSetIfNull(node, receiver, index, rhs, arg);
+  }
+
+  @override
+  visitSuperIndexSetIfNull(
+      SendSet node,
+      MethodElement getter,
+      MethodElement setter,
+      Node index,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.VISIT_SUPER_INDEX_SET_IF_NULL,
+        getter: getter, setter: setter, index: index, rhs: rhs));
+    super.visitSuperIndexSetIfNull(node, getter, setter, index, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedSuperGetterIndexSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node index,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_SET_IF_NULL,
+        setter: setter, index: index, rhs: rhs));
+    super.visitUnresolvedSuperGetterIndexSetIfNull(
+        node, element, setter, index, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedSuperSetterIndexSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node index,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_INDEX_SET_IF_NULL,
+        getter: getter, index: index, rhs: rhs));
+    super.visitUnresolvedSuperSetterIndexSetIfNull(
+        node, getter, element, index, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedSuperIndexSetIfNull(
+      Send node,
+      Element element,
+      Node index,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_SET_IF_NULL,
+        index: index, rhs: rhs));
+    super.visitUnresolvedSuperIndexSetIfNull(node, element, index, rhs, arg);
+  }
+
+  @override
+  errorInvalidIndexSetIfNull(
+      SendSet node,
+      ErroneousElement error,
+      Node index,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.ERROR_INVALID_SET_IF_NULL,
+        index: index, rhs: rhs));
+    super.visitUnresolvedSuperIndexSetIfNull(node, error, index, rhs, arg);
+  }
 }
diff --git a/tests/compiler/dart2js/serialization_analysis_test.dart b/tests/compiler/dart2js/serialization_analysis_test.dart
index ffef134..39c46de 100644
--- a/tests/compiler/dart2js/serialization_analysis_test.dart
+++ b/tests/compiler/dart2js/serialization_analysis_test.dart
@@ -8,141 +8,13 @@
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
 import 'package:compiler/src/commandline_options.dart';
-import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/common/backend_api.dart';
+import 'package:compiler/src/common/names.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/filenames.dart';
-import 'package:compiler/src/serialization/serialization.dart';
-import 'package:compiler/src/serialization/json_serializer.dart';
-import 'package:compiler/src/serialization/task.dart';
-import 'package:compiler/src/universe/world_impact.dart';
 import 'memory_compiler.dart';
-
-const List<Test> TESTS = const <Test>[
-  const Test(const {
-    'main.dart': 'main() => print("Hello World");'
-  }),
-
-  const Test(const {
-    'main.dart': 'main() => print("Hello World", 0);'
-  },
-  expectedWarningCount: 1,
-  expectedInfoCount: 1),
-
-  const Test(const {
-    'main.dart': r'''
-main() {
-  String text = "Hello World";
-  print('$text');
-}'''
-  }),
-
-  const Test(const {
-    'main.dart': r'''
-main() {
-  String text = "Hello World";
-  print('$text', text);
-}'''
-  },
-  expectedWarningCount: 1,
-  expectedInfoCount: 1),
-
-  const Test(const {
-    'main.dart': r'''
-main(List<String> arguments) {
-  print(arguments);
-}'''
-  }),
-
-  const Test(const {
-      'main.dart': r'''
-main(List<String> arguments) {
-  for (int i = 0; i < arguments.length; i++) {
-    print(arguments[i]);
-  }
-}'''
-    }),
-
-  const Test(const {
-    'main.dart': r'''
-main(List<String> arguments) {
-  for (String argument in arguments) {
-    print(argument);
-  }
-}'''
-  }),
-
-  const Test(const {
-    'main.dart': r'''
-class Class {}
-main() {
-  print(new Class());
-}'''
-  }),
-
-  const Test(const {
-    'main.dart': r'''
-class Class implements Function {}
-main() {
-  print(new Class());
-}'''
-  },
-  expectedWarningCount: 1),
-
-  const Test(const {
-    'main.dart': r'''
-class Class implements Function {
-  call() {}
-}
-main() {
-  print(new Class()());
-}'''
-  }),
-
-  const Test(const {
-    'main.dart': r'''
-class Class implements Comparable<Class> {
-  int compareTo(Class other) => 0;
-}
-main() {
-  print(new Class());
-}'''
-  }),
-
-  const Test(const {
-    'main.dart': r'''
-class Class implements Comparable<Class, Class> {
-  int compareTo(other) => 0;
-}
-main() {
-  print(new Class());
-}'''
-  },
-  expectedWarningCount: 1),
-
-  const Test(const {
-    'main.dart': r'''
-class Class implements Comparable<Class> {
-  int compareTo(String other) => 0;
-}
-main() {
-  print(new Class().compareTo(null));
-}'''
-  },
-  expectedWarningCount: 1,
-  expectedInfoCount: 1),
-
-  const Test(const {
-    'main.dart': r'''
-class Class implements Comparable {
-  bool compareTo(a, b) => true;
-}
-main() {
-  print(new Class().compareTo(null, null));
-}'''
-  },
-  expectedWarningCount: 1,
-  expectedInfoCount: 1),
-];
+import 'serialization_helper.dart';
+import 'serialization_test_data.dart';
 
 main(List<String> arguments) {
   asyncTest(() async {
@@ -160,32 +32,15 @@
   });
 }
 
-class Test {
-  final Map sourceFiles;
-  final int expectedErrorCount;
-  final int expectedWarningCount;
-  final int expectedHintCount;
-  final int expectedInfoCount;
-
-  const Test(this.sourceFiles, {
-    this.expectedErrorCount: 0,
-    this.expectedWarningCount: 0,
-    this.expectedHintCount: 0,
-    this.expectedInfoCount: 0});
-}
-
 Future analyze(String serializedData, Uri entryPoint, Test test) async {
-  Deserializer deserializer = new Deserializer.fromText(
-      serializedData, const JsonSerializationDecoder());
   DiagnosticCollector diagnosticCollector = new DiagnosticCollector();
   await runCompiler(
       entryPoint: entryPoint,
       memorySourceFiles: test != null ? test.sourceFiles : const {},
-      options: [Flags.analyzeOnly, '--output-type=dart'],
+      options: [Flags.analyzeOnly],
       diagnosticHandler: diagnosticCollector,
       beforeRun: (Compiler compiler) {
-        compiler.serialization.deserializer =
-            new _DeserializerSystem(deserializer);
+        deserialize(compiler, serializedData);
       });
   if (test != null) {
     Expect.equals(test.expectedErrorCount, diagnosticCollector.errors.length,
@@ -201,42 +56,3 @@
   }
 }
 
-Future<String> serializeDartCore() async {
-  Compiler compiler = compilerFor(
-      options: ['--analyze-all', '--output-type=dart']);
-  await compiler.run(Uri.parse('dart:core'));
-  return serialize(compiler.libraryLoader.libraries);
-}
-
-String serialize(Iterable<LibraryElement> libraries) {
-  Serializer serializer = new Serializer(const JsonSerializationEncoder());
-  for (LibraryElement library in libraries) {
-    serializer.serialize(library);
-  }
-  return serializer.toText();
-}
-
-class _DeserializerSystem extends DeserializerSystem {
-  final Deserializer _deserializer;
-  final List<LibraryElement> deserializedLibraries = <LibraryElement>[];
-
-  _DeserializerSystem(this._deserializer);
-
-  LibraryElement readLibrary(Uri resolvedUri) {
-    LibraryElement library = _deserializer.lookupLibrary(resolvedUri);
-    if (library != null) {
-      deserializedLibraries.add(library);
-    }
-    return library;
-  }
-
-  @override
-  WorldImpact computeWorldImpact(Element element) {
-    return const WorldImpact();
-  }
-
-  @override
-  bool isDeserialized(Element element) {
-    return deserializedLibraries.contains(element.library);
-  }
-}
\ No newline at end of file
diff --git a/tests/compiler/dart2js/serialization_helper.dart b/tests/compiler/dart2js/serialization_helper.dart
new file mode 100644
index 0000000..c863265
--- /dev/null
+++ b/tests/compiler/dart2js/serialization_helper.dart
@@ -0,0 +1,247 @@
+// 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 dart2js.serialization_helper;
+
+import 'dart:async';
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+import 'package:compiler/compiler_new.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/common/backend_api.dart';
+import 'package:compiler/src/common/names.dart';
+import 'package:compiler/src/common/resolution.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/filenames.dart';
+import 'package:compiler/src/io/source_file.dart';
+import 'package:compiler/src/scanner/scanner.dart';
+import 'package:compiler/src/serialization/element_serialization.dart';
+import 'package:compiler/src/serialization/impact_serialization.dart';
+import 'package:compiler/src/serialization/json_serializer.dart';
+import 'package:compiler/src/serialization/resolved_ast_serialization.dart';
+import 'package:compiler/src/serialization/serialization.dart';
+import 'package:compiler/src/serialization/modelz.dart';
+import 'package:compiler/src/serialization/task.dart';
+import 'package:compiler/src/tokens/token.dart';
+import 'package:compiler/src/script.dart';
+import 'package:compiler/src/universe/world_impact.dart';
+import 'memory_compiler.dart';
+
+
+Future<String> serializeDartCore({bool serializeResolvedAst: false}) async {
+  Compiler compiler = compilerFor(
+      options: [Flags.analyzeAll]);
+  compiler.serialization.supportSerialization = true;
+  await compiler.run(Uris.dart_core);
+  return serialize(
+      compiler,
+      compiler.libraryLoader.libraries,
+      serializeResolvedAst: serializeResolvedAst)
+        .toText(const JsonSerializationEncoder());
+}
+
+Serializer serialize(
+    Compiler compiler,
+    Iterable<LibraryElement> libraries,
+    {bool serializeResolvedAst: false}) {
+  assert(compiler.serialization.supportSerialization);
+
+  Serializer serializer = new Serializer();
+  serializer.plugins.add(compiler.backend.serialization.serializer);
+  serializer.plugins.add(new ResolutionImpactSerializer(compiler.resolution));
+  if (serializeResolvedAst) {
+    serializer.plugins.add(
+        new ResolvedAstSerializerPlugin(compiler.resolution));
+  }
+
+  for (LibraryElement library in libraries) {
+    serializer.serialize(library);
+  }
+  return serializer;
+}
+
+void deserialize(Compiler compiler,
+                 String serializedData,
+                 {bool deserializeResolvedAst: false}) {
+  Deserializer deserializer = new Deserializer.fromText(
+      new DeserializationContext(),
+      serializedData,
+      const JsonSerializationDecoder());
+  deserializer.plugins.add(compiler.backend.serialization.deserializer);
+  compiler.serialization.deserializer =
+      new _DeserializerSystem(
+          compiler,
+          deserializer,
+          compiler.backend.impactTransformer,
+          deserializeResolvedAst: deserializeResolvedAst);
+}
+
+
+const String WORLD_IMPACT_TAG = 'worldImpact';
+
+class ResolutionImpactSerializer extends SerializerPlugin {
+  final Resolution resolution;
+
+  ResolutionImpactSerializer(this.resolution);
+
+  @override
+  void onElement(Element element, ObjectEncoder createEncoder(String tag)) {
+    if (resolution.hasBeenResolved(element)) {
+      ResolutionImpact impact = resolution.getResolutionImpact(element);
+      ObjectEncoder encoder = createEncoder(WORLD_IMPACT_TAG);
+      new ImpactSerializer(encoder).serialize(impact);
+    }
+  }
+}
+
+class ResolutionImpactDeserializer extends DeserializerPlugin {
+  Map<Element, ResolutionImpact> impactMap = <Element, ResolutionImpact>{};
+
+  @override
+  void onElement(Element element, ObjectDecoder getDecoder(String tag)) {
+    ObjectDecoder decoder = getDecoder(WORLD_IMPACT_TAG);
+    if (decoder != null) {
+      impactMap[element] = ImpactDeserializer.deserializeImpact(decoder);
+    }
+  }
+}
+
+class _DeserializerSystem extends DeserializerSystem {
+  final Compiler _compiler;
+  final Deserializer _deserializer;
+  final List<LibraryElement> deserializedLibraries = <LibraryElement>[];
+  final ResolutionImpactDeserializer _resolutionImpactDeserializer =
+      new ResolutionImpactDeserializer();
+  final ResolvedAstDeserializerPlugin _resolvedAstDeserializer;
+  final ImpactTransformer _impactTransformer;
+  final bool _deserializeResolvedAst;
+
+  _DeserializerSystem(
+      Compiler compiler,
+      this._deserializer,
+      this._impactTransformer,
+      {bool deserializeResolvedAst: false})
+      : this._compiler = compiler,
+        this._deserializeResolvedAst = deserializeResolvedAst,
+        this._resolvedAstDeserializer = deserializeResolvedAst
+           ? new ResolvedAstDeserializerPlugin(compiler.parsing) : null {
+    _deserializer.plugins.add(_resolutionImpactDeserializer);
+    if (_deserializeResolvedAst) {
+      _deserializer.plugins.add(_resolvedAstDeserializer);
+    }
+  }
+
+  @override
+  Future<LibraryElement> readLibrary(Uri resolvedUri) {
+    LibraryElement library = _deserializer.lookupLibrary(resolvedUri);
+    if (library != null) {
+      deserializedLibraries.add(library);
+      if (_deserializeResolvedAst) {
+        return Future.forEach(library.compilationUnits,
+            (CompilationUnitElement compilationUnit) {
+          Script script = compilationUnit.script;
+          return _compiler.readScript(script.readableUri)
+              .then((Script newScript) {
+            _resolvedAstDeserializer.sourceFiles[script.resourceUri] =
+                newScript.file;
+          });
+        }).then((_) => library);
+      }
+    }
+    return new Future<LibraryElement>.value(library);
+  }
+
+  @override
+  ResolvedAst getResolvedAst(Element element) {
+    if (_resolvedAstDeserializer != null) {
+      return _resolvedAstDeserializer.getResolvedAst(element);
+    }
+    return null;
+  }
+
+  @override
+  ResolutionImpact getResolutionImpact(Element element) {
+    return _resolutionImpactDeserializer.impactMap[element];
+  }
+
+  @override
+  WorldImpact computeWorldImpact(Element element) {
+    ResolutionImpact resolutionImpact = getResolutionImpact(element);
+    if (resolutionImpact == null) {
+      print('No impact found for $element (${element.library})');
+      return const WorldImpact();
+    } else {
+      return _impactTransformer.transformResolutionImpact(resolutionImpact);
+    }
+  }
+
+  @override
+  bool isDeserialized(Element element) {
+    return deserializedLibraries.contains(element.library);
+  }
+}
+
+const String RESOLVED_AST_TAG = 'resolvedAst';
+
+class ResolvedAstSerializerPlugin extends SerializerPlugin {
+  final Resolution resolution;
+
+  ResolvedAstSerializerPlugin(this.resolution);
+
+  @override
+  void onElement(Element element, ObjectEncoder createEncoder(String tag)) {
+    if (element is MemberElement && resolution.hasResolvedAst(element)) {
+      ResolvedAst resolvedAst = resolution.getResolvedAst(element);
+      ObjectEncoder objectEncoder = createEncoder(RESOLVED_AST_TAG);
+      new ResolvedAstSerializer(objectEncoder, resolvedAst).serialize();
+    }
+  }
+}
+
+class ResolvedAstDeserializerPlugin extends DeserializerPlugin {
+  final Parsing parsing;
+  final Map<Uri, SourceFile> sourceFiles = <Uri, SourceFile>{};
+
+  Map<Element, ResolvedAst> _resolvedAstMap = <Element, ResolvedAst>{};
+  Map<Element, ObjectDecoder> _decoderMap = <Element, ObjectDecoder>{};
+  Map<Uri, Token> beginTokenMap = <Uri, Token>{};
+
+  ResolvedAstDeserializerPlugin(this.parsing);
+
+  ResolvedAst getResolvedAst(Element element) {
+    ResolvedAst resolvedAst = _resolvedAstMap[element];
+    if (resolvedAst == null) {
+      ObjectDecoder decoder = _decoderMap[element];
+      if (decoder != null) {
+        resolvedAst = _resolvedAstMap[element] =
+            ResolvedAstDeserializer.deserialize(
+                element, decoder, parsing, findToken);
+        _decoderMap.remove(element);
+      }
+    }
+    return resolvedAst;
+  }
+
+  Token findToken(Uri uri, int offset) {
+    Token beginToken = beginTokenMap.putIfAbsent(uri, () {
+      SourceFile sourceFile = sourceFiles[uri];
+      if (sourceFile == null) {
+        throw 'No source file found for $uri in:\n '
+              '${sourceFiles.keys.join('\n ')}';
+      }
+      return new Scanner(sourceFile).tokenize();
+    });
+    return ResolvedAstDeserializer.findTokenInStream(beginToken, offset);
+  }
+
+  @override
+  void onElement(Element element, ObjectDecoder getDecoder(String tag)) {
+    ObjectDecoder decoder = getDecoder(RESOLVED_AST_TAG);
+    if (decoder != null) {
+      _decoderMap[element] = decoder;
+    }
+  }
+}
+
diff --git a/tests/compiler/dart2js/serialization_impact_test.dart b/tests/compiler/dart2js/serialization_impact_test.dart
new file mode 100644
index 0000000..05d91d6
--- /dev/null
+++ b/tests/compiler/dart2js/serialization_impact_test.dart
@@ -0,0 +1,51 @@
+// 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 dart2js.serialization_impact_test;
+
+import 'dart:async';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/common/resolution.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/filenames.dart';
+import 'package:compiler/src/serialization/equivalence.dart';
+import 'memory_compiler.dart';
+import 'serialization_helper.dart';
+import 'serialization_test_helper.dart';
+
+main(List<String> arguments) {
+  asyncTest(() async {
+    String serializedData = await serializeDartCore();
+    if (arguments.isNotEmpty) {
+      Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.last));
+      await check(serializedData, entryPoint);
+    } else {
+      Uri entryPoint = Uri.parse('memory:main.dart');
+      await check(serializedData, entryPoint, {'main.dart': 'main() {}'});
+    }
+  });
+}
+
+Future check(
+  String serializedData,
+  Uri entryPoint,
+  [Map<String, String> sourceFiles = const <String, String>{}]) async {
+
+  Compiler compilerNormal = compilerFor(
+      memorySourceFiles: sourceFiles,
+      options: [Flags.analyzeOnly]);
+  compilerNormal.resolution.retainCachesForTesting = true;
+  await compilerNormal.run(entryPoint);
+
+  Compiler compilerDeserialized = compilerFor(
+      memorySourceFiles: sourceFiles,
+      options: [Flags.analyzeOnly]);
+  compilerDeserialized.resolution.retainCachesForTesting = true;
+  deserialize(compilerDeserialized, serializedData);
+  await compilerDeserialized.run(entryPoint);
+
+  checkAllImpacts(compilerNormal, compilerDeserialized, verbose: true);
+}
diff --git a/tests/compiler/dart2js/serialization_library_test.dart b/tests/compiler/dart2js/serialization_library_test.dart
new file mode 100644
index 0000000..df59fbc
--- /dev/null
+++ b/tests/compiler/dart2js/serialization_library_test.dart
@@ -0,0 +1,130 @@
+// 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 dart2js.serialization_library_test;
+
+import 'dart:io';
+import 'memory_compiler.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/common/names.dart';
+import 'package:compiler/src/constants/constructors.dart';
+import 'package:compiler/src/constants/expressions.dart';
+import 'package:compiler/src/dart_types.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/diagnostics/invariant.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/elements/visitor.dart';
+import 'package:compiler/src/ordered_typeset.dart';
+import 'package:compiler/src/serialization/element_serialization.dart';
+import 'package:compiler/src/serialization/json_serializer.dart';
+import 'package:compiler/src/serialization/serialization.dart';
+
+import 'serialization_test.dart';
+
+main(List<String> arguments) {
+  // Ensure that we can print out constant expressions.
+  DEBUG_MODE = true;
+
+  Uri entryPoint;
+  String outPath;
+  int shardCount = 3;
+  bool prettyPrint = false;
+  for (String arg in arguments) {
+    if (arg.startsWith('--')) {
+      if (arg.startsWith('--out=')) {
+        outPath = arg.substring('--out='.length);
+      } else if (arg == '--pretty-print') {
+        prettyPrint = true;
+      } else if (arg.startsWith('--shards=')) {
+        shardCount = int.parse(arg.substring('--shards='.length));
+      } else {
+        print("Unknown option $arg");
+      }
+    } else {
+      if (entryPoint != null) {
+        print("Multiple entrypoints are not supported.");
+      }
+      entryPoint = Uri.parse(arg);
+    }
+  }
+  if (entryPoint == null) {
+    entryPoint = Uris.dart_core;
+  }
+  asyncTest(() async {
+    CompilationResult result = await runCompiler(
+        entryPoint: entryPoint, options: [Flags.analyzeAll]);
+    Compiler compiler = result.compiler;
+    testSerialization(compiler.libraryLoader.libraries,
+                      outPath: outPath,
+                      prettyPrint: prettyPrint,
+                      shardCount: shardCount);
+  });
+}
+
+void testSerialization(Iterable<LibraryElement> libraries1,
+                       {String outPath,
+                        bool prettyPrint,
+                        int shardCount: 3}) {
+  if (shardCount < 1 || shardCount > libraries1.length) {
+    shardCount = libraries1.length;
+  }
+  List<List<LibraryElement>> librarySplits = <List<LibraryElement>>[];
+  int offset = 0;
+  int shardSize = (libraries1.length / shardCount).ceil();
+  for (int shard = 0; shard < shardCount; shard++) {
+    List<LibraryElement> libraries = <LibraryElement>[];
+    for (int index = 0; index < shardSize; index++) {
+      if (offset + index < libraries1.length) {
+        libraries.add(libraries1.elementAt(offset + index));
+      }
+    }
+    librarySplits.add(libraries);
+    offset += shardSize;
+  }
+  print(librarySplits.join('\n'));
+  List<String> texts = <String>[];
+  for (int shard = 0; shard < shardCount; shard++) {
+    List<LibraryElement> libraries = librarySplits[shard];
+    Serializer serializer = new Serializer(
+        shouldInclude: (e) => libraries.contains(e.library));
+    for (LibraryElement library in libraries) {
+      serializer.serialize(library);
+    }
+    String text = serializer.toText(const JsonSerializationEncoder());
+    String outText = text;
+    if (prettyPrint) {
+      outText = serializer.prettyPrint();
+    }
+    if (outPath != null) {
+      String name = outPath;
+      String ext = '';
+      int dotPos = outPath.lastIndexOf('.');
+      if (dotPos != -1) {
+        name = outPath.substring(0, dotPos);
+        ext = outPath.substring(dotPos);
+      }
+      new File('$name$shard$ext').writeAsStringSync(outText);
+    } else if (prettyPrint) {
+      print(outText);
+    }
+    texts.add(text);
+  }
+  DeserializationContext deserializationContext =
+      new DeserializationContext();
+  for (int shard = 0; shard < shardCount; shard++) {
+    new Deserializer.fromText(
+        deserializationContext, texts[shard], const JsonSerializationDecoder());
+  }
+  List<LibraryElement> libraries2 = <LibraryElement>[];
+  for (LibraryElement library1 in libraries1) {
+    LibraryElement library2 =
+        deserializationContext.lookupLibrary(library1.canonicalUri);
+    if (library2 == null) {
+      throw new ArgumentError('No library ${library1.canonicalUri} found.');
+    }
+    checkLibraryContent('library1', 'library2', 'library', library1, library2);
+    libraries2.add(library2);
+  }
+}
\ No newline at end of file
diff --git a/tests/compiler/dart2js/serialization_model_test.dart b/tests/compiler/dart2js/serialization_model_test.dart
new file mode 100644
index 0000000..0e5363f
--- /dev/null
+++ b/tests/compiler/dart2js/serialization_model_test.dart
@@ -0,0 +1,223 @@
+// 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.serialization_model_test;
+
+import 'dart:async';
+import 'dart:io';
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/common/backend_api.dart';
+import 'package:compiler/src/common/names.dart';
+import 'package:compiler/src/common/resolution.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/dart_types.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/filenames.dart';
+import 'package:compiler/src/serialization/element_serialization.dart';
+import 'package:compiler/src/serialization/impact_serialization.dart';
+import 'package:compiler/src/serialization/json_serializer.dart';
+import 'package:compiler/src/serialization/serialization.dart';
+import 'package:compiler/src/serialization/equivalence.dart';
+import 'package:compiler/src/serialization/task.dart';
+import 'package:compiler/src/universe/world_impact.dart';
+import 'package:compiler/src/universe/class_set.dart';
+import 'package:compiler/src/universe/use.dart';
+import 'memory_compiler.dart';
+import 'serialization_helper.dart';
+import 'serialization_test_data.dart';
+import 'serialization_test_helper.dart';
+
+main(List<String> arguments) {
+  String filename;
+  for (String arg in arguments) {
+    if (!arg.startsWith('-')) {
+      filename = arg;
+    }
+  }
+  bool verbose = arguments.contains('-v');
+
+  asyncTest(() async {
+    print('------------------------------------------------------------------');
+    print('serialize dart:core');
+    print('------------------------------------------------------------------');
+    String serializedData;
+    File file = new File('out.data');
+    if (arguments.contains('-l')) {
+      if (file.existsSync()) {
+        print('Loading data from $file');
+        serializedData = file.readAsStringSync();
+      }
+    }
+    if (serializedData == null) {
+      serializedData = await serializeDartCore();
+      if (arguments.contains('-s')) {
+        print('Saving data to $file');
+        file.writeAsStringSync(serializedData);
+      }
+    }
+    if (filename != null) {
+      Uri entryPoint = Uri.base.resolve(nativeToUriPath(filename));
+      await check(serializedData, entryPoint);
+    } else {
+      Uri entryPoint = Uri.parse('memory:main.dart');
+      for (Test test in TESTS) {
+        if (test.sourceFiles['main.dart']
+                .contains('main(List<String> arguments)')) {
+          // TODO(johnniwinther): Check this test.
+          continue;
+        }
+        print('==============================================================');
+        print(test.sourceFiles);
+        await check(
+          serializedData,
+          entryPoint,
+          sourceFiles: test.sourceFiles,
+          verbose: verbose);
+      }
+    }
+  });
+}
+
+Future check(
+  String serializedData,
+  Uri entryPoint,
+  {Map<String, String> sourceFiles: const <String, String>{},
+   bool verbose: false}) async {
+
+  print('------------------------------------------------------------------');
+  print('compile normal');
+  print('------------------------------------------------------------------');
+  Compiler compilerNormal = compilerFor(
+      memorySourceFiles: sourceFiles,
+      options: [Flags.analyzeOnly]);
+  compilerNormal.resolution.retainCachesForTesting = true;
+  await compilerNormal.run(entryPoint);
+  compilerNormal.world.populate();
+
+  print('------------------------------------------------------------------');
+  print('compile deserialized');
+  print('------------------------------------------------------------------');
+  Compiler compilerDeserialized = compilerFor(
+      memorySourceFiles: sourceFiles,
+      options: [Flags.analyzeOnly]);
+  compilerDeserialized.resolution.retainCachesForTesting = true;
+  deserialize(compilerDeserialized, serializedData);
+  await compilerDeserialized.run(entryPoint);
+  compilerDeserialized.world.populate();
+
+  checkAllImpacts(
+      compilerNormal, compilerDeserialized,
+      verbose: verbose);
+
+  checkSets(
+      compilerNormal.resolverWorld.directlyInstantiatedClasses,
+      compilerDeserialized.resolverWorld.directlyInstantiatedClasses,
+      "Directly instantiated classes mismatch",
+      areElementsEquivalent,
+      verbose: verbose);
+
+  checkSets(
+      compilerNormal.resolverWorld.instantiatedTypes,
+      compilerDeserialized.resolverWorld.instantiatedTypes,
+      "Instantiated types mismatch",
+      areTypesEquivalent,
+      // TODO(johnniwinther): Ensure that all instantiated types are tracked.
+      failOnUnfound: false,
+      verbose: verbose);
+
+  checkSets(
+      compilerNormal.resolverWorld.isChecks,
+      compilerDeserialized.resolverWorld.isChecks,
+      "Is-check mismatch",
+      areTypesEquivalent,
+      verbose: verbose);
+
+  checkSets(
+      compilerNormal.enqueuer.resolution.processedElements,
+      compilerDeserialized.enqueuer.resolution.processedElements,
+      "Processed element mismatch",
+      areElementsEquivalent,
+      verbose: verbose);
+
+  checkClassHierarchyNodes(
+    compilerNormal.world.getClassHierarchyNode(
+        compilerNormal.coreClasses.objectClass),
+    compilerDeserialized.world.getClassHierarchyNode(
+        compilerDeserialized.coreClasses.objectClass),
+    verbose: verbose);
+}
+
+void checkClassHierarchyNodes(
+    ClassHierarchyNode a, ClassHierarchyNode b,
+    {bool verbose: false}) {
+  if (verbose) {
+    print('Checking $a vs $b');
+  }
+  Expect.isTrue(
+      areElementsEquivalent(a.cls, b.cls),
+      "Element identity mismatch for ${a.cls} vs ${b.cls}.");
+  Expect.equals(
+      a.isDirectlyInstantiated,
+      b.isDirectlyInstantiated,
+      "Value mismatch for 'isDirectlyInstantiated' for ${a.cls} vs ${b.cls}.");
+  Expect.equals(
+      a.isIndirectlyInstantiated,
+      b.isIndirectlyInstantiated,
+      "Value mismatch for 'isIndirectlyInstantiated' "
+      "for ${a.cls} vs ${b.cls}.");
+  // TODO(johnniwinther): Enforce a canonical and stable order on direct
+  // subclasses.
+  for (ClassHierarchyNode child in a.directSubclasses) {
+    bool found = false;
+    for (ClassHierarchyNode other in b.directSubclasses) {
+      if (areElementsEquivalent(child.cls, other.cls)) {
+        checkClassHierarchyNodes(child, other,
+            verbose: verbose);
+        found = true;
+        break;
+      }
+    }
+    if (!found) {
+      Expect.isFalse(
+          child.isInstantiated, 'Missing subclass ${child.cls} of ${a.cls}');
+    }
+  }
+}
+
+void checkSets(
+    Iterable set1,
+    Iterable set2,
+    String messagePrefix,
+    bool areEquivalent(a, b),
+    {bool failOnUnfound: true,
+     bool verbose: false}) {
+  List common = [];
+  List unfound = [];
+  Set remaining = computeSetDifference(
+      set1, set2, common, unfound, areEquivalent);
+  StringBuffer sb = new StringBuffer();
+  sb.write("$messagePrefix:");
+  if (verbose) {
+    sb.write("\n Common:\n  ${common.join('\n  ')}");
+  }
+  if (unfound.isNotEmpty || verbose) {
+    sb.write("\n Unfound:\n  ${unfound.join('\n  ')}");
+  }
+  if (remaining.isNotEmpty || verbose) {
+    sb.write("\n Extra: \n  ${remaining.join('\n  ')}");
+  }
+  String message = sb.toString();
+  if (unfound.isNotEmpty || remaining.isNotEmpty) {
+
+    if (failOnUnfound || remaining.isNotEmpty) {
+      Expect.fail(message);
+    } else {
+      print(message);
+    }
+  } else if (verbose) {
+    print(message);
+  }
+}
diff --git a/tests/compiler/dart2js/serialization_resolved_ast_test.dart b/tests/compiler/dart2js/serialization_resolved_ast_test.dart
new file mode 100644
index 0000000..af5d8a3
--- /dev/null
+++ b/tests/compiler/dart2js/serialization_resolved_ast_test.dart
@@ -0,0 +1,92 @@
+// 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 dart2js.serialization_resolved_ast_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/backend_api.dart';
+import 'package:compiler/src/common/names.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/filenames.dart';
+import 'package:compiler/src/serialization/equivalence.dart';
+import 'memory_compiler.dart';
+import 'serialization_helper.dart';
+import 'serialization_test_data.dart';
+import 'serialization_test_helper.dart';
+
+
+main(List<String> arguments) {
+  asyncTest(() async {
+    String serializedData = await serializeDartCore(serializeResolvedAst: true);
+    if (arguments.isNotEmpty) {
+      Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.last));
+      await check(serializedData, entryPoint);
+    } else {
+      Uri entryPoint = Uri.parse('memory:main.dart');
+      // TODO(johnniwinther): Change to test all serialized resolved ast instead
+      // only those used in the test.
+      Test test = TESTS.last;
+      await check(serializedData, entryPoint, test.sourceFiles);
+    }
+  });
+}
+
+Future check(
+  String serializedData,
+  Uri entryPoint,
+  [Map<String, String> sourceFiles = const <String, String>{}]) async {
+
+  Compiler compilerNormal = compilerFor(
+      memorySourceFiles: sourceFiles,
+      options: [Flags.analyzeOnly]);
+  compilerNormal.resolution.retainCachesForTesting = true;
+  await compilerNormal.run(entryPoint);
+
+  Compiler compilerDeserialized = compilerFor(
+      memorySourceFiles: sourceFiles,
+      options: [Flags.analyzeOnly]);
+  compilerDeserialized.resolution.retainCachesForTesting = true;
+  deserialize(
+      compilerDeserialized, serializedData, deserializeResolvedAst: true);
+  await compilerDeserialized.run(entryPoint);
+
+  checkAllResolvedAsts(compilerNormal, compilerDeserialized, verbose: true);
+}
+
+void checkAllResolvedAsts(
+    Compiler compiler1,
+    Compiler compiler2,
+    {bool verbose: false}) {
+  checkLoadedLibraryMembers(
+      compiler1,
+      compiler2,
+      (Element member1) {
+        return compiler1.resolution.hasResolvedAst(member1);
+      },
+      checkResolvedAsts,
+      verbose: true);
+}
+
+
+/// Check equivalence of [impact1] and [impact2].
+void checkResolvedAsts(Compiler compiler1, Element member1,
+                       Compiler compiler2, Element member2,
+                       {bool verbose: false}) {
+  ResolvedAst resolvedAst1 = compiler1.resolution.getResolvedAst(member1);
+  ResolvedAst resolvedAst2 =
+      compiler2.serialization.deserializer.getResolvedAst(member2);
+
+  if (resolvedAst1 == null || resolvedAst2 == null) return;
+
+  if (verbose) {
+    print('Checking resolved asts for $member1 vs $member2');
+  }
+
+  testResolvedAstEquivalence(
+      resolvedAst1, resolvedAst2, const CheckStrategy());
+}
diff --git a/tests/compiler/dart2js/serialization_test.dart b/tests/compiler/dart2js/serialization_test.dart
index c913a3c..fd6ae58 100644
--- a/tests/compiler/dart2js/serialization_test.dart
+++ b/tests/compiler/dart2js/serialization_test.dart
@@ -7,6 +7,7 @@
 import 'dart:io';
 import 'memory_compiler.dart';
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/constants/constructors.dart';
 import 'package:compiler/src/constants/expressions.dart';
 import 'package:compiler/src/dart_types.dart';
@@ -15,9 +16,11 @@
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/elements/visitor.dart';
 import 'package:compiler/src/ordered_typeset.dart';
-import 'package:compiler/src/serialization/serialization.dart';
+import 'package:compiler/src/serialization/element_serialization.dart';
+import 'package:compiler/src/serialization/equivalence.dart';
 import 'package:compiler/src/serialization/json_serializer.dart';
-import 'package:compiler/src/tree/tree.dart';
+import 'package:compiler/src/serialization/serialization.dart';
+import 'serialization_test_helper.dart';
 
 main(List<String> arguments) {
   // Ensure that we can print out constant expressions.
@@ -47,7 +50,7 @@
   }
   asyncTest(() async {
     CompilationResult result = await runCompiler(
-        entryPoint: entryPoint, options: ['--analyze-all']);
+        entryPoint: entryPoint, options: [Flags.analyzeAll]);
     Compiler compiler = result.compiler;
     testSerialization(compiler.libraryLoader.libraries,
                       outPath: outPath,
@@ -58,11 +61,11 @@
 void testSerialization(Iterable<LibraryElement> libraries1,
                        {String outPath,
                         bool prettyPrint}) {
-  Serializer serializer = new Serializer(const JsonSerializationEncoder());
+  Serializer serializer = new Serializer();
   for (LibraryElement library1 in libraries1) {
     serializer.serialize(library1);
   }
-  String text = serializer.toText();
+  String text = serializer.toText(const JsonSerializationEncoder());
   String outText = text;
   if (prettyPrint) {
     outText = serializer.prettyPrint();
@@ -74,6 +77,7 @@
   }
 
   Deserializer deserializer = new Deserializer.fromText(
+      new DeserializationContext(),
       text, const JsonSerializationDecoder());
   List<LibraryElement> libraries2 = <LibraryElement>[];
   for (LibraryElement library1 in libraries1) {
@@ -86,13 +90,14 @@
     libraries2.add(library2);
   }
 
-  Serializer serializer2 = new Serializer(const JsonSerializationEncoder());
+  Serializer serializer2 = new Serializer();
   for (LibraryElement library2 in libraries2) {
     serializer2.serialize(library2);
   }
-  String text2 = serializer2.toText();
+  String text2 = serializer2.toText(const JsonSerializationEncoder());
 
   Deserializer deserializer3 = new Deserializer.fromText(
+      new DeserializationContext(),
       text2, const JsonSerializationDecoder());
   for (LibraryElement library1 in libraries1) {
     LibraryElement library2 =
@@ -128,117 +133,6 @@
   const ElementPropertyEquivalence().visit(element1, element2);
 }
 
-/// Check the equivalence of the two lists of elements, [list1] and [list2].
-///
-/// Uses [object1], [object2] and [property] to provide context for failures.
-checkElementLists(Object object1, Object object2, String property,
-                  Iterable<Element> list1, Iterable<Element> list2) {
-  checkListEquivalence(object1, object2, property,
-                  list1, list2, checkElementProperties);
-}
-
-/// Check equivalence of the two lists, [list1] and [list2], using
-/// [checkEquivalence] to check the pair-wise equivalence.
-///
-/// Uses [object1], [object2] and [property] to provide context for failures.
-void checkListEquivalence(
-    Object object1, Object object2, String property,
-    Iterable list1, Iterable list2,
-    void checkEquivalence(o1, o2, property, a, b)) {
-  for (int i = 0; i < list1.length && i < list2.length; i++) {
-    checkEquivalence(
-        object1, object2, property,
-        list1.elementAt(i), list2.elementAt(i));
-  }
-  for (int i = list1.length; i < list2.length; i++) {
-    throw
-        'Missing equivalent for element '
-        '#$i ${list2.elementAt(i)} in `${property}` on $object2.\n'
-        '`${property}` on $object1:\n ${list1.join('\n ')}\n'
-        '`${property}` on $object2:\n ${list2.join('\n ')}';
-  }
-  for (int i = list2.length; i < list1.length; i++) {
-    throw
-        'Missing equivalent for element '
-        '#$i ${list1.elementAt(i)} in `${property}` on $object1.\n'
-        '`${property}` on $object1:\n ${list1.join('\n ')}\n'
-        '`${property}` on $object2:\n ${list2.join('\n ')}';
-  }
-}
-
-/// Checks the equivalence of the identity (but not properties) of [element1]
-/// and [element2].
-///
-/// Uses [object1], [object2] and [property] to provide context for failures.
-void checkElementIdentities(
-    Object object1, Object object2, String property,
-    Element element1, Element element2) {
-  if (identical(element1, element2)) return;
-  if (element1 == null || element2 == null) {
-    check(object1, object2, property, element1, element2);
-  }
-  const ElementIdentityEquivalence().visit(element1, element2);
-}
-
-/// Checks the pair-wise equivalence of the identity (but not properties) of the
-/// elements in [list] and [list2].
-///
-/// Uses [object1], [object2] and [property] to provide context for failures.
-void checkElementListIdentities(
-    Object object1, Object object2, String property,
-    Iterable<Element> list1, Iterable<Element> list2) {
-  checkListEquivalence(
-      object1, object2, property,
-      list1, list2, checkElementIdentities);
-}
-
-/// Checks the equivalence of [type1] and [type2].
-///
-/// Uses [object1], [object2] and [property] to provide context for failures.
-void checkTypes(
-    Object object1, Object object2, String property,
-    DartType type1, DartType type2) {
-  if (identical(type1, type2)) return;
-  if (type1 == null || type2 == null) {
-    check(object1, object2, property, type1, type2);
-  }
-  const TypeEquivalence().visit(type1, type2);
-}
-
-/// Checks the pair-wise equivalence of the types in [list1] and [list2].
-///
-/// Uses [object1], [object2] and [property] to provide context for failures.
-void checkTypeLists(
-    Object object1, Object object2, String property,
-    List<DartType> list1, List<DartType> list2) {
-  checkListEquivalence(object1, object2, property, list1, list2, checkTypes);
-}
-
-/// Checks the equivalence of [exp1] and [exp2].
-///
-/// Uses [object1], [object2] and [property] to provide context for failures.
-void checkConstants(
-    Object object1, Object object2, String property,
-    ConstantExpression exp1, ConstantExpression exp2) {
-  if (identical(exp1, exp2)) return;
-  if (exp1 == null || exp2 == null) {
-    check(object1, object2, property, exp1, exp2);
-  }
-  const ConstantEquivalence().visit(exp1, exp2);
-}
-
-/// Checks the pair-wise equivalence of the contants in [list1] and [list2].
-///
-/// Uses [object1], [object2] and [property] to provide context for failures.
-void checkConstantLists(
-    Object object1, Object object2, String property,
-    List<ConstantExpression> list1,
-    List<ConstantExpression> list2) {
-  checkListEquivalence(
-      object1, object2, property,
-      list1, list2, checkConstants);
-}
-
 /// Checks the equivalence of [constructor1] and [constructor2].
 void constantConstructorEquivalence(ConstantConstructor constructor1,
                                     ConstantConstructor constructor2) {
@@ -328,125 +222,13 @@
   }
 }
 
-/// Check that the values [property] of [object1] and [object2], [value1] and
-/// [value2] respectively, are equal and throw otherwise.
-void check(var object1, var object2, String property, var value1, value2) {
-  if (value1 != value2) {
-    throw "$object1.$property = '${value1}' <> "
-          "$object2.$property = '${value2}'";
-  }
-}
-
-/// Visitor that checks for equivalence of [Element] identities.
-class ElementIdentityEquivalence extends BaseElementVisitor<dynamic, Element> {
-  const ElementIdentityEquivalence();
-
-  void visit(Element element1, Element element2) {
-    check(element1, element2, 'kind', element1.kind, element2.kind);
-    element1.accept(this, element2);
-  }
-
-  @override
-  void visitElement(Element e, Element arg) {
-    throw new UnsupportedError("Unsupported element $e");
-  }
-
-  @override
-  void visitLibraryElement(LibraryElement element1, LibraryElement element2) {
-    check(element1, element2,
-          'canonicalUri',
-          element1.canonicalUri, element2.canonicalUri);
-  }
-
-  @override
-  void visitCompilationUnitElement(CompilationUnitElement element1,
-                                   CompilationUnitElement element2) {
-    check(element1, element2,
-          'name',
-          element1.name, element2.name);
-    visit(element1.library, element2.library);
-  }
-
-  @override
-  void visitClassElement(ClassElement element1, ClassElement element2) {
-    check(element1, element2,
-          'name',
-          element1.name, element2.name);
-    visit(element1.library, element2.library);
-  }
-
-  void checkMembers(Element element1, Element element2) {
-    check(element1, element2,
-          'name',
-          element1.name, element2.name);
-    if (element1.enclosingClass != null || element2.enclosingClass != null) {
-      visit(element1.enclosingClass, element2.enclosingClass);
-    } else {
-      visit(element1.library, element2.library);
-    }
-  }
-
-  @override
-  void visitFieldElement(FieldElement element1, FieldElement element2) {
-    checkMembers(element1, element2);
-  }
-
-  @override
-  void visitFunctionElement(FunctionElement element1,
-                            FunctionElement element2) {
-    checkMembers(element1, element2);
-  }
-
-  void visitAbstractFieldElement(AbstractFieldElement element1,
-                                 AbstractFieldElement element2) {
-    checkMembers(element1, element2);
-  }
-
-  @override
-  void visitTypeVariableElement(TypeVariableElement element1,
-                                TypeVariableElement element2) {
-    check(element1, element2,
-          'name',
-          element1.name, element2.name);
-    visit(element1.typeDeclaration, element2.typeDeclaration);
-  }
-
-  @override
-  void visitTypedefElement(TypedefElement element1, TypedefElement element2) {
-    check(element1, element2,
-          'name',
-          element1.name, element2.name);
-    visit(element1.library, element2.library);
-  }
-
-  @override
-  void visitParameterElement(ParameterElement element1,
-                             ParameterElement element2) {
-    check(element1, element2,
-          'name',
-          element1.name, element2.name);
-    visit(element1.functionDeclaration, element2.functionDeclaration);
-  }
-
-  @override
-  void visitImportElement(ImportElement element1, ImportElement element2) {
-    visit(element1.importedLibrary, element2.importedLibrary);
-    visit(element1.library, element2.library);
-  }
-
-  @override
-  void visitExportElement(ExportElement element1, ExportElement element2) {
-    visit(element1.exportedLibrary, element2.exportedLibrary);
-    visit(element1.library, element2.library);
-  }
-
-  @override
-  void visitPrefixElement(PrefixElement element1, PrefixElement element2) {
-    check(element1, element2,
-          'name',
-          element1.name, element2.name);
-    visit(element1.library, element2.library);
-  }
+/// Check the equivalence of the two lists of elements, [list1] and [list2].
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+checkElementLists(Object object1, Object object2, String property,
+                  Iterable<Element> list1, Iterable<Element> list2) {
+  checkListEquivalence(object1, object2, property,
+                  list1, list2, checkElementProperties);
 }
 
 /// Visitor that checks for equivalence of [Element] properties.
@@ -454,6 +236,9 @@
   const ElementPropertyEquivalence();
 
   void visit(Element element1, Element element2) {
+    if (element1 == null && element2 == null) return;
+    element1 = element1.declaration;
+    element2 = element2.declaration;
     if (element1 == element2) return;
     check(element1, element2, 'kind', element1.kind, element2.kind);
     element1.accept(this, element2);
@@ -472,41 +257,28 @@
           element1.libraryName, element2.libraryName);
     visitMembers(element1, element2);
     visit(element1.entryCompilationUnit, element2.entryCompilationUnit);
+
     checkElementLists(
         element1, element2, 'compilationUnits',
-        element1.compilationUnits.toList(),
-        element2.compilationUnits.toList());
+        LibrarySerializer.getCompilationUnits(element1),
+        LibrarySerializer.getCompilationUnits(element2));
 
     checkElementListIdentities(
-        element1, element2, 'imports', element1.imports, element2.imports);
+        element1, element2, 'imports',
+        LibrarySerializer.getImports(element1),
+        LibrarySerializer.getImports(element2));
     checkElementListIdentities(
         element1, element2, 'exports', element1.exports, element2.exports);
 
-    List<Element> imports1 = <Element>[];
-    List<Element> imports2 = <Element>[];
-    element1.forEachImport((Element import) {
-      if (import.isAmbiguous) return;
-      imports1.add(import);
-    });
-    element2.forEachImport((Element import) {
-      if (import.isAmbiguous) return;
-      imports2.add(import);
-    });
     checkElementListIdentities(
-        element1, element2, 'importScope', imports1, imports2);
+        element1, element2, 'importScope',
+        LibrarySerializer.getImportedElements(element1),
+        LibrarySerializer.getImportedElements(element2));
 
-    List<Element> exports1 = <Element>[];
-    List<Element> exports2 = <Element>[];
-    element1.forEachExport((Element export) {
-      if (export.isAmbiguous) return;
-      exports1.add(export);
-    });
-    element2.forEachExport((Element export) {
-      if (export.isAmbiguous) return;
-      exports2.add(export);
-    });
     checkElementListIdentities(
-        element1, element2, 'exportScope', exports1, exports2);
+        element1, element2, 'exportScope',
+        LibrarySerializer.getExportedElements(element1),
+        LibrarySerializer.getExportedElements(element2));
   }
 
   @override
@@ -536,23 +308,46 @@
   void visitMembers(ScopeContainerElement element1,
                     ScopeContainerElement element2) {
     Set<String> names = new Set<String>();
-    element1.forEachLocalMember((Element member) {
+    Iterable<Element> members1 = element1.isLibrary
+        ? LibrarySerializer.getMembers(element1)
+        : ClassSerializer.getMembers(element1);
+    Iterable<Element> members2 = element2.isLibrary
+        ? LibrarySerializer.getMembers(element2)
+        : ClassSerializer.getMembers(element2);
+    for (Element member in members1) {
       names.add(member.name);
-    });
-    element2.forEachLocalMember((Element member) {
+    }
+    for (Element member in members2) {
       names.add(member.name);
-    });
+    }
+    element1 = element1.implementation;
+    element2 = element2.implementation;
     for (String name in names) {
       Element member1 = element1.localLookup(name);
       Element member2 = element2.localLookup(name);
       if (member1 == null) {
-        print('Missing member for $member2');
-        continue;
+        String message =
+            'Missing member for $member2 in\n ${members1.join('\n ')}';
+        if (member2.isAbstractField) {
+          // TODO(johnniwinther): Ensure abstract fields are handled correctly.
+          //print(message);
+          continue;
+        } else {
+          throw message;
+        }
       }
       if (member2 == null) {
-        print('Missing member for $member1');
-        continue;
+        String message =
+            'Missing member for $member1 in\n ${members2.join('\n ')}';
+        if (member1.isAbstractField) {
+          // TODO(johnniwinther): Ensure abstract fields are handled correctly.
+          //print(message);
+          continue;
+        } else {
+          throw message;
+        }
       }
+      //print('Checking member ${member1} against ${member2}');
       visit(member1, member2);
     }
   }
@@ -576,6 +371,16 @@
         element1.typeVariables, element2.typeVariables);
     check(element1, element2, 'isAbstract',
         element1.isAbstract, element2.isAbstract);
+    check(element1, element2, 'isUnnamedMixinApplication',
+        element1.isUnnamedMixinApplication, element2.isUnnamedMixinApplication);
+    check(element1, element2, 'isEnumClass',
+        element1.isEnumClass, element2.isEnumClass);
+    if (element1.isEnumClass) {
+      EnumClassElement enum1 = element1;
+      EnumClassElement enum2 = element2;
+      checkElementLists(enum1, enum2, 'enumValues',
+                        enum1.enumValues, enum2.enumValues);
+    }
     if (!element1.isObject) {
       checkTypes(element1, element2, 'supertype',
           element1.supertype, element2.supertype);
@@ -609,6 +414,15 @@
         element1.interfaces.toList(),
         element2.interfaces.toList());
 
+    List<ConstructorElement> getConstructors(ClassElement cls) {
+      return cls.implementation.constructors.map((c) => c.declaration).toList();
+    }
+
+    checkElementLists(
+        element1, element2, 'constructors',
+        getConstructors(element1),
+        getConstructors(element2));
+
     visitMembers(element1, element2);
   }
 
@@ -825,273 +639,3 @@
     // TODO(johnniwinther): Check members.
   }
 }
-
-/// Visitor that checks for equivalence of [DartType]s.
-class TypeEquivalence implements DartTypeVisitor<dynamic, DartType> {
-  const TypeEquivalence();
-
-  void visit(DartType type1, DartType type2) {
-    check(type1, type2, 'kind', type1.kind, type2.kind);
-    type1.accept(this, type2);
-  }
-
-  @override
-  void visitDynamicType(DynamicType type, DynamicType other) {
-  }
-
-  @override
-  void visitFunctionType(FunctionType type, FunctionType other) {
-    checkTypeLists(
-        type, other, 'parameterTypes',
-        type.parameterTypes, other.parameterTypes);
-    checkTypeLists(
-        type, other, 'optionalParameterTypes',
-        type.optionalParameterTypes, other.optionalParameterTypes);
-    checkTypeLists(
-        type, other, 'namedParameterTypes',
-        type.namedParameterTypes, other.namedParameterTypes);
-    for (int i = 0; i < type.namedParameters.length; i++) {
-      if (type.namedParameters[i] != other.namedParameters[i]) {
-        throw "Named parameter '$type.namedParameters[i]' <> "
-              "'${other.namedParameters[i]}'";
-      }
-    }
-  }
-
-  void visitGenericType(GenericType type, GenericType other) {
-    checkElementIdentities(
-        type, other, 'element',
-        type.element, other.element);
-    checkTypeLists(
-        type, other, 'typeArguments',
-        type.typeArguments, other.typeArguments);
-  }
-
-  @override
-  void visitMalformedType(MalformedType type, MalformedType other) {
-  }
-
-  @override
-  void  visitStatementType(StatementType type, StatementType other) {
-    throw new UnsupportedError("Unsupported type: $type");
-  }
-
-  @override
-  void visitTypeVariableType(TypeVariableType type, TypeVariableType other) {
-    checkElementIdentities(
-        type, other, 'element',
-        type.element, other.element);
-  }
-
-  @override
-  void visitVoidType(VoidType type, VoidType argument) {
-  }
-
-  @override
-  void visitInterfaceType(InterfaceType type, InterfaceType other) {
-    visitGenericType(type, other);
-  }
-
-  @override
-  void visitTypedefType(TypedefType type, TypedefType other) {
-    visitGenericType(type, other);
-  }
-}
-
-/// Visitor that checks for structural equivalence of [ConstantExpression]s.
-class ConstantEquivalence
-    implements ConstantExpressionVisitor<dynamic, ConstantExpression> {
-  const ConstantEquivalence();
-
-  @override
-  visit(ConstantExpression exp1, ConstantExpression exp2) {
-    if (identical(exp1, exp2)) return;
-    check(exp1, exp2, 'kind', exp1.kind, exp2.kind);
-    exp1.accept(this, exp2);
-  }
-
-  @override
-  visitBinary(BinaryConstantExpression exp1, BinaryConstantExpression exp2) {
-    check(exp1, exp2, 'operator', exp1.operator, exp2.operator);
-    checkConstants(exp1, exp2, 'left', exp1.left, exp2.left);
-    checkConstants(exp1, exp2, 'right', exp1.right, exp2.right);
-  }
-
-  @override
-  visitConcatenate(ConcatenateConstantExpression exp1,
-                   ConcatenateConstantExpression exp2) {
-    checkConstantLists(
-        exp1, exp2, 'expressions',
-        exp1.expressions, exp2.expressions);
-  }
-
-  @override
-  visitConditional(ConditionalConstantExpression exp1,
-                   ConditionalConstantExpression exp2) {
-    checkConstants(
-        exp1, exp2, 'condition', exp1.condition, exp2.condition);
-    checkConstants(exp1, exp2, 'trueExp', exp1.trueExp, exp2.trueExp);
-    checkConstants(exp1, exp2, 'falseExp', exp1.falseExp, exp2.falseExp);
-  }
-
-  @override
-  visitConstructed(ConstructedConstantExpression exp1,
-                   ConstructedConstantExpression exp2) {
-    checkTypes(
-        exp1, exp2, 'type',
-        exp1.type, exp2.type);
-    checkElementIdentities(
-        exp1, exp2, 'target',
-        exp1.target, exp2.target);
-    checkConstantLists(
-        exp1, exp2, 'arguments',
-        exp1.arguments, exp2.arguments);
-    check(exp1, exp2, 'callStructure', exp1.callStructure, exp2.callStructure);
-  }
-
-  @override
-  visitFunction(FunctionConstantExpression exp1,
-                FunctionConstantExpression exp2) {
-    checkElementIdentities(
-        exp1, exp2, 'element',
-        exp1.element, exp2.element);
-  }
-
-  @override
-  visitIdentical(IdenticalConstantExpression exp1,
-                 IdenticalConstantExpression exp2) {
-    checkConstants(exp1, exp2, 'left', exp1.left, exp2.left);
-    checkConstants(exp1, exp2, 'right', exp1.right, exp2.right);
-  }
-
-  @override
-  visitList(ListConstantExpression exp1, ListConstantExpression exp2) {
-    checkTypes(
-        exp1, exp2, 'type',
-        exp1.type, exp2.type);
-    checkConstantLists(
-        exp1, exp2, 'values',
-        exp1.values, exp2.values);
-  }
-
-  @override
-  visitMap(MapConstantExpression exp1, MapConstantExpression exp2) {
-    checkTypes(
-        exp1, exp2, 'type',
-        exp1.type, exp2.type);
-    checkConstantLists(
-        exp1, exp2, 'keys',
-        exp1.keys, exp2.keys);
-    checkConstantLists(
-        exp1, exp2, 'values',
-        exp1.values, exp2.values);
-  }
-
-  @override
-  visitNamed(NamedArgumentReference exp1, NamedArgumentReference exp2) {
-    check(exp1, exp2, 'name', exp1.name, exp2.name);
-  }
-
-  @override
-  visitPositional(PositionalArgumentReference exp1,
-                  PositionalArgumentReference exp2) {
-    check(exp1, exp2, 'index', exp1.index, exp2.index);
-  }
-
-  @override
-  visitSymbol(SymbolConstantExpression exp1, SymbolConstantExpression exp2) {
-    // TODO: implement visitSymbol
-  }
-
-  @override
-  visitType(TypeConstantExpression exp1, TypeConstantExpression exp2) {
-    checkTypes(
-        exp1, exp2, 'type',
-        exp1.type, exp2.type);
-  }
-
-  @override
-  visitUnary(UnaryConstantExpression exp1, UnaryConstantExpression exp2) {
-    check(exp1, exp2, 'operator', exp1.operator, exp2.operator);
-    checkConstants(
-        exp1, exp2, 'expression', exp1.expression, exp2.expression);
-  }
-
-  @override
-  visitVariable(VariableConstantExpression exp1,
-                VariableConstantExpression exp2) {
-    checkElementIdentities(
-        exp1, exp2, 'element',
-        exp1.element, exp2.element);
-  }
-
-  @override
-  visitBool(BoolConstantExpression exp1, BoolConstantExpression exp2) {
-    check(exp1, exp2, 'primitiveValue',
-          exp1.primitiveValue, exp2.primitiveValue);
-  }
-
-  @override
-  visitDouble(DoubleConstantExpression exp1, DoubleConstantExpression exp2) {
-    check(exp1, exp2, 'primitiveValue',
-          exp1.primitiveValue, exp2.primitiveValue);
-  }
-
-  @override
-  visitInt(IntConstantExpression exp1, IntConstantExpression exp2) {
-    check(exp1, exp2, 'primitiveValue',
-          exp1.primitiveValue, exp2.primitiveValue);
-  }
-
-  @override
-  visitNull(NullConstantExpression exp1, NullConstantExpression exp2) {
-    // Do nothing.
-  }
-
-  @override
-  visitString(StringConstantExpression exp1, StringConstantExpression exp2) {
-    check(exp1, exp2, 'primitiveValue',
-          exp1.primitiveValue, exp2.primitiveValue);
-  }
-
-  @override
-  visitBoolFromEnvironment(BoolFromEnvironmentConstantExpression exp1,
-                           BoolFromEnvironmentConstantExpression exp2) {
-    checkConstants(exp1, exp2, 'name', exp1.name, exp2.name);
-    checkConstants(
-        exp1, exp2, 'defaultValue',
-        exp1.defaultValue, exp2.defaultValue);
-  }
-
-  @override
-  visitIntFromEnvironment(IntFromEnvironmentConstantExpression exp1,
-                          IntFromEnvironmentConstantExpression exp2) {
-    checkConstants(exp1, exp2, 'name', exp1.name, exp2.name);
-    checkConstants(
-        exp1, exp2, 'defaultValue',
-        exp1.defaultValue, exp2.defaultValue);
-  }
-
-  @override
-  visitStringFromEnvironment(StringFromEnvironmentConstantExpression exp1,
-                             StringFromEnvironmentConstantExpression exp2) {
-    checkConstants(exp1, exp2, 'name', exp1.name, exp2.name);
-    checkConstants(
-        exp1, exp2, 'defaultValue',
-        exp1.defaultValue, exp2.defaultValue);
-  }
-
-  @override
-  visitStringLength(StringLengthConstantExpression exp1,
-                    StringLengthConstantExpression exp2) {
-    checkConstants(
-        exp1, exp2, 'expression',
-        exp1.expression, exp2.expression);
-  }
-
-  @override
-  visitDeferred(DeferredConstantExpression exp1,
-                DeferredConstantExpression exp2) {
-    // TODO: implement visitDeferred
-  }
-}
diff --git a/tests/compiler/dart2js/serialization_test_data.dart b/tests/compiler/dart2js/serialization_test_data.dart
new file mode 100644
index 0000000..67d400c
--- /dev/null
+++ b/tests/compiler/dart2js/serialization_test_data.dart
@@ -0,0 +1,205 @@
+// 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 dart2js.serialization_test_data;
+
+const List<Test> TESTS = const <Test>[
+  const Test(const {
+    'main.dart': 'main() {}'
+  }),
+
+  const Test(const {
+    'main.dart': 'main() => print("Hello World");'
+  }),
+
+  const Test(const {
+    'main.dart': 'main() => print("Hello World", 0);'
+  },
+  expectedWarningCount: 1,
+  expectedInfoCount: 1),
+
+  const Test(const {
+    'main.dart': r'''
+main() {
+  String text = "Hello World";
+  print('$text');
+}'''
+  }),
+
+  const Test(const {
+    'main.dart': r'''
+main() {
+  String text = "Hello World";
+  print('$text', text);
+}'''
+  },
+  expectedWarningCount: 1,
+  expectedInfoCount: 1),
+
+  const Test(const {
+    'main.dart': r'''
+main(List<String> arguments) {
+  print(arguments);
+}'''
+  }),
+
+  const Test(const {
+      'main.dart': r'''
+main(List<String> arguments) {
+  for (int i = 0; i < arguments.length; i++) {
+    print(arguments[i]);
+  }
+}'''
+    }),
+
+  const Test(const {
+    'main.dart': r'''
+main(List<String> arguments) {
+  for (String argument in arguments) {
+    print(argument);
+  }
+}'''
+  }),
+
+  const Test(const {
+    'main.dart': r'''
+class Class {}
+main() {
+  print(new Class());
+}'''
+  }),
+
+  const Test(const {
+    'main.dart': r'''
+class Class implements Function {}
+main() {
+  print(new Class());
+}'''
+  },
+  expectedWarningCount: 1),
+
+  const Test(const {
+    'main.dart': r'''
+class Class implements Function {
+  call() {}
+}
+main() {
+  print(new Class()());
+}'''
+  }),
+
+  const Test(const {
+    'main.dart': r'''
+class Class implements Comparable<Class> {
+  int compareTo(Class other) => 0;
+}
+main() {
+  print(new Class());
+}'''
+  }),
+
+  const Test(const {
+    'main.dart': r'''
+class Class implements Comparable<Class, Class> {
+  int compareTo(other) => 0;
+}
+main() {
+  print(new Class());
+}'''
+  },
+  expectedWarningCount: 1),
+
+  const Test(const {
+    'main.dart': r'''
+class Class implements Comparable<Class> {
+  int compareTo(String other) => 0;
+}
+main() {
+  print(new Class().compareTo(null));
+}'''
+  },
+  expectedWarningCount: 1,
+  expectedInfoCount: 1),
+
+  const Test(const {
+    'main.dart': r'''
+class Class implements Comparable {
+  bool compareTo(a, b) => true;
+}
+main() {
+  print(new Class().compareTo(null, null));
+}'''
+  },
+  expectedWarningCount: 1,
+  expectedInfoCount: 1),
+
+  const Test(const {
+    'main.dart': r'''
+import 'dart:math';
+
+class MyRandom implements Random {
+  int nextInt(int max) {
+    return max.length;
+  }
+  bool nextBool() => true;
+  double nextDouble() => 0.0;
+}
+main() {
+  new MyRandom().nextInt(0);
+}'''
+  },
+  expectedWarningCount: 1,
+  expectedInfoCount: 0),
+
+  const Test(const {
+    'main.dart': r'''
+import 'dart:math';
+
+class MyRandom implements Random {
+  int nextInt(int max) {
+    return max.length;
+  }
+  bool nextBool() => true;
+  double nextDouble() => 0.0;
+}
+main() {
+  new MyRandom();
+}'''
+  }),
+
+  const Test(const {
+    'main.dart': r'''
+import 'dart:math';
+
+class MyRandom implements Random {
+  int nextInt(int max) {
+    return max.length;
+  }
+  bool nextBool() => true;
+  double nextDouble() => 0.0;
+}
+main() {
+  // Invocation of `MyRandom.nextInt` is only detected knowing the actual 
+  // implementation class for `List` and the world impact of its `shuffle` 
+  // method.  
+  [].shuffle(new MyRandom());
+}'''
+  },
+  expectedWarningCount: 1,
+  expectedInfoCount: 0),
+];
+
+class Test {
+  final Map sourceFiles;
+  final int expectedErrorCount;
+  final int expectedWarningCount;
+  final int expectedHintCount;
+  final int expectedInfoCount;
+
+  const Test(this.sourceFiles, {
+    this.expectedErrorCount: 0,
+    this.expectedWarningCount: 0,
+    this.expectedHintCount: 0,
+    this.expectedInfoCount: 0});
+}
diff --git a/tests/compiler/dart2js/serialization_test_helper.dart b/tests/compiler/dart2js/serialization_test_helper.dart
new file mode 100644
index 0000000..97d5134
--- /dev/null
+++ b/tests/compiler/dart2js/serialization_test_helper.dart
@@ -0,0 +1,365 @@
+// 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 dart2js.serialization_test_helper;
+
+import 'dart:io';
+import 'memory_compiler.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/common/resolution.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/constants/constructors.dart';
+import 'package:compiler/src/constants/expressions.dart';
+import 'package:compiler/src/dart_types.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/diagnostics/invariant.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/elements/visitor.dart';
+import 'package:compiler/src/ordered_typeset.dart';
+import 'package:compiler/src/serialization/element_serialization.dart';
+import 'package:compiler/src/serialization/equivalence.dart';
+import 'package:compiler/src/serialization/json_serializer.dart';
+import 'package:compiler/src/serialization/serialization.dart';
+
+
+/// Strategy for checking equivalence.
+///
+/// Use this strategy to fail early with contextual information in the event of
+/// inequivalence.
+class CheckStrategy implements TestStrategy {
+  const CheckStrategy();
+
+  @override
+  bool test(var object1, var object2, String property, var value1, var value2,
+            [bool equivalence(a, b) = equality]) {
+    return check(object1, object2, property, value1, value2, equivalence);
+  }
+
+  @override
+  bool testLists(
+      Object object1, Object object2, String property,
+      List list1, List list2,
+      [bool elementEquivalence(a, b) = equality]) {
+    return checkListEquivalence(
+        object1, object2, property, list1, list2,
+        (o1, o2, p, v1, v2) {
+          if (!elementEquivalence(v1, v2)) {
+            throw "$o1.$p = '${v1}' <> "
+                  "$o2.$p = '${v2}'";
+          }
+          return true;
+        });
+  }
+
+  @override
+  bool testSets(
+      var object1, var object2, String property,
+      Iterable set1, Iterable set2,
+      [bool elementEquivalence(a, b) = equality]) {
+    return checkSetEquivalence(
+        object1, object2,property, set1, set2, elementEquivalence);
+  }
+
+  @override
+  bool testElements(
+      Object object1, Object object2, String property,
+      Element element1, Element element2) {
+    return checkElementIdentities(
+        object1, object2, property, element1, element2);
+  }
+
+  @override
+  bool testTypes(
+      Object object1, Object object2, String property,
+      DartType type1, DartType type2) {
+    return checkTypes(object1, object2, property, type1, type2);
+  }
+
+  @override
+  bool testConstants(
+      Object object1, Object object2, String property,
+      ConstantExpression exp1, ConstantExpression exp2) {
+    return checkConstants(object1, object2, property, exp1, exp2);
+  }
+
+  @override
+  bool testTypeLists(
+      Object object1, Object object2, String property,
+      List<DartType> list1, List<DartType> list2) {
+    return checkTypeLists(object1, object2, property, list1, list2);
+  }
+
+  @override
+  bool testConstantLists(
+      Object object1, Object object2, String property,
+      List<ConstantExpression> list1,
+      List<ConstantExpression> list2) {
+    return checkConstantLists(object1, object2, property, list1, list2);
+  }
+}
+
+/// Check that the values [property] of [object1] and [object2], [value1] and
+/// [value2] respectively, are equal and throw otherwise.
+bool check(var object1, var object2, String property, var value1, var value2,
+           [bool equivalence(a, b) = equality]) {
+  if (!equivalence(value1, value2)) {
+    throw "property='$property' "
+          "object1=$object1 (${object1.runtimeType}), value='${value1}' <> "
+          "object2=$object2 (${object2.runtimeType}), value='${value2}'";
+  }
+  return true;
+}
+
+/// Check equivalence of the two lists, [list1] and [list2], using
+/// [checkEquivalence] to check the pair-wise equivalence.
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+bool checkListEquivalence(
+    Object object1, Object object2, String property,
+    Iterable list1, Iterable list2,
+    void checkEquivalence(o1, o2, property, a, b)) {
+  for (int i = 0; i < list1.length && i < list2.length; i++) {
+    checkEquivalence(
+        object1, object2, property,
+        list1.elementAt(i), list2.elementAt(i));
+  }
+  for (int i = list1.length; i < list2.length; i++) {
+    throw
+        'Missing equivalent for element '
+        '#$i ${list2.elementAt(i)} in `${property}` on $object2.\n'
+        '`${property}` on $object1:\n ${list1.join('\n ')}\n'
+        '`${property}` on $object2:\n ${list2.join('\n ')}';
+  }
+  for (int i = list2.length; i < list1.length; i++) {
+    throw
+        'Missing equivalent for element '
+        '#$i ${list1.elementAt(i)} in `${property}` on $object1.\n'
+        '`${property}` on $object1:\n ${list1.join('\n ')}\n'
+        '`${property}` on $object2:\n ${list2.join('\n ')}';
+  }
+  return true;
+}
+
+/// Computes the set difference between [set1] and [set2] using
+/// [elementEquivalence] to determine element equivalence.
+///
+/// Elements both in [set1] and [set2] are added to [common], elements in [set1]
+/// but not in [set2] are added to [unfound], and the set of elements in [set2]
+/// but not in [set1] are returned.
+Set computeSetDifference(
+    Iterable set1,
+    Iterable set2,
+    List common,
+    List unfound,
+    [bool sameElement(a, b) = equality]) {
+  // TODO(johnniwinther): Avoid the quadratic cost here. Some ideas:
+  // - convert each set to a list and sort it first, then compare by walking
+  // both lists in parallel
+  // - map each element to a canonical object, create a map containing those
+  // mappings, use the mapped sets to compare (then operations like
+  // set.difference would work)
+  Set remaining = set2.toSet();
+  for (var element1 in set1) {
+    bool found = false;
+    for (var element2 in remaining) {
+      if (sameElement(element1, element2)) {
+        found = true;
+        remaining.remove(element2);
+        break;
+      }
+    }
+    if (found) {
+      common.add(element1);
+    } else {
+      unfound.add(element1);
+    }
+  }
+  return remaining;
+}
+
+/// Check equivalence of the two iterables, [set1] and [set1], as sets using
+/// [elementEquivalence] to compute the pair-wise equivalence.
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+bool checkSetEquivalence(
+    var object1,
+    var object2,
+    String property,
+    Iterable set1,
+    Iterable set2,
+    bool sameElement(a, b)) {
+  List common = [];
+  List unfound = [];
+  Set remaining =
+      computeSetDifference(set1, set2, common, unfound, sameElement);
+  if (unfound.isNotEmpty || remaining.isNotEmpty) {
+    String message =
+        "Set mismatch for `$property` on $object1 vs $object2: \n"
+        "Common:\n ${common.join('\n ')}\n"
+        "Unfound:\n ${unfound.join('\n ')}\n"
+        "Extra: \n ${remaining.join('\n ')}";
+    throw message;
+  }
+  return true;
+}
+
+/// Checks the equivalence of the identity (but not properties) of [element1]
+/// and [element2].
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+bool checkElementIdentities(
+    Object object1, Object object2, String property,
+    Element element1, Element element2) {
+  if (identical(element1, element2)) return true;
+  if (element1 == null || element2 == null) {
+    return check(object1, object2, property, element1, element2);
+  } else {
+    return const ElementIdentityEquivalence(const CheckStrategy())
+        .visit(element1, element2);
+  }
+}
+
+/// Checks the pair-wise equivalence of the identity (but not properties) of the
+/// elements in [list] and [list2].
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+bool checkElementListIdentities(
+    Object object1, Object object2, String property,
+    Iterable<Element> list1, Iterable<Element> list2) {
+  return checkListEquivalence(
+      object1, object2, property,
+      list1, list2, checkElementIdentities);
+}
+
+/// Checks the equivalence of [type1] and [type2].
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+bool checkTypes(
+    Object object1, Object object2, String property,
+    DartType type1, DartType type2) {
+  if (identical(type1, type2)) return true;
+  if (type1 == null || type2 == null) {
+    return check(object1, object2, property, type1, type2);
+  } else {
+    return const TypeEquivalence(const CheckStrategy()).visit(type1, type2);
+  }
+}
+
+/// Checks the pair-wise equivalence of the types in [list1] and [list2].
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+bool checkTypeLists(
+    Object object1, Object object2, String property,
+    List<DartType> list1, List<DartType> list2) {
+  return checkListEquivalence(
+      object1, object2, property, list1, list2, checkTypes);
+}
+
+/// Checks the equivalence of [exp1] and [exp2].
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+bool checkConstants(
+    Object object1, Object object2, String property,
+    ConstantExpression exp1, ConstantExpression exp2) {
+  if (identical(exp1, exp2)) return true;
+  if (exp1 == null || exp2 == null) {
+    return check(object1, object2, property, exp1, exp2);
+  } else {
+    return const ConstantEquivalence(const CheckStrategy()).visit(exp1, exp2);
+  }
+}
+
+/// Checks the pair-wise equivalence of the contants in [list1] and [list2].
+///
+/// Uses [object1], [object2] and [property] to provide context for failures.
+bool checkConstantLists(
+    Object object1, Object object2, String property,
+    List<ConstantExpression> list1,
+    List<ConstantExpression> list2) {
+  return checkListEquivalence(
+      object1, object2, property,
+      list1, list2, checkConstants);
+}
+
+
+/// Check member property equivalence between all members common to [compiler1]
+/// and [compiler2].
+void checkLoadedLibraryMembers(
+    Compiler compiler1,
+    Compiler compiler2,
+    bool hasProperty(Element member1),
+    void checkMemberProperties(Compiler compiler1, Element member1,
+                               Compiler compiler2, Element member2,
+                               {bool verbose}),
+    {bool verbose: false}) {
+
+  void checkMembers(Element member1, Element member2) {
+    if (member1.isClass && member2.isClass) {
+      ClassElement class1 = member1;
+      ClassElement class2 = member2;
+      class1.forEachLocalMember((m1) {
+        checkMembers(m1, class2.lookupLocalMember(m1.name));
+      });
+      return;
+    }
+
+    if (!hasProperty(member1)) {
+      return;
+    }
+
+    if (member2 == null) {
+      return;
+    }
+
+    if (areElementsEquivalent(member1, member2)) {
+      checkMemberProperties(
+          compiler1, member1,
+          compiler2, member2,
+          verbose: verbose);
+    }
+  }
+
+  for (LibraryElement library1 in compiler1.libraryLoader.libraries) {
+    LibraryElement library2 =
+        compiler2.libraryLoader.lookupLibrary(library1.canonicalUri);
+    if (library2 != null) {
+      library1.forEachLocalMember((Element member1) {
+        checkMembers(member1, library2.localLookup(member1.name));
+      });
+
+    }
+  }
+}
+
+/// Check equivalence of all resolution impacts.
+void checkAllImpacts(
+    Compiler compiler1,
+    Compiler compiler2,
+    {bool verbose: false}) {
+  checkLoadedLibraryMembers(
+      compiler1,
+      compiler2,
+      (Element member1) {
+        return compiler1.resolution.hasResolutionImpact(member1);
+      },
+      checkImpacts,
+      verbose: true);
+}
+
+/// Check equivalence of resolution impact for [member1] and [member2].
+void checkImpacts(Compiler compiler1, Element member1,
+                  Compiler compiler2, Element member2,
+                  {bool verbose: false}) {
+  ResolutionImpact impact1 = compiler1.resolution.getResolutionImpact(member1);
+  ResolutionImpact impact2 =
+      compiler2.serialization.deserializer.getResolutionImpact(member2);
+
+  if (impact1 == null || impact2 == null) return;
+
+  if (verbose) {
+    print('Checking impacts for $member1 vs $member2');
+  }
+
+  testResolutionImpactEquivalence(impact1, impact2, const CheckStrategy());
+}
diff --git a/tests/compiler/dart2js/sourcemaps/diff.dart b/tests/compiler/dart2js/sourcemaps/diff.dart
index 6fb4468..4fd31c1 100644
--- a/tests/compiler/dart2js/sourcemaps/diff.dart
+++ b/tests/compiler/dart2js/sourcemaps/diff.dart
@@ -9,6 +9,7 @@
 import 'html_parts.dart';
 import 'output_structure.dart';
 import 'sourcemap_helper.dart';
+import 'sourcemap_html_helper.dart';
 
 enum DiffKind {
   UNMATCHED,
@@ -16,26 +17,97 @@
   IDENTICAL,
 }
 
+/// Id for an output column.
+class DiffColumn {
+  final String type;
+  final int index;
+
+  const DiffColumn(this.type, [this.index]);
+
+  int get hashCode => type.hashCode * 19 + index.hashCode * 23;
+
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! DiffColumn) return false;
+    return type == other.type && index == other.index;
+  }
+
+  String toString() => '$type${index != null ? index : ''}';
+}
+
+/// A block of code in an output column.
+abstract class DiffColumnBlock {
+  void printHtmlOn(StringBuffer htmlBuffer, HtmlPrintContext context);
+}
+
+/// A block consisting of pure HTML parts.
+class PartsColumnBlock extends DiffColumnBlock {
+  final List<HtmlPart> parts;
+
+  PartsColumnBlock(this.parts);
+
+  void printHtmlOn(StringBuffer htmlBuffer, HtmlPrintContext context) {
+    if (parts.isNotEmpty) {
+      for (HtmlPart part in parts) {
+        part.printHtmlOn(htmlBuffer, context);
+      }
+    }
+  }
+}
+
+/// A block consisting of line-per-line JavaScript and source mapped Dart code.
+class CodeLinesColumnBlock extends DiffColumnBlock {
+  final List<CodeLine> jsCodeLines;
+  final Map<CodeLine, List<CodeLine>> jsToDartMap;
+
+  CodeLinesColumnBlock(this.jsCodeLines, this.jsToDartMap);
+
+  void printHtmlOn(StringBuffer htmlBuffer, HtmlPrintContext context) {
+    if (jsCodeLines.isNotEmpty) {
+      htmlBuffer.write('<table style="width:100%">');
+      for (CodeLine codeLine in jsCodeLines) {
+        htmlBuffer.write('<tr><td class="${ClassNames.innerCell}">');
+        codeLine.printHtmlOn(htmlBuffer, context);
+        htmlBuffer.write(
+            '</td><td '
+            'class="${ClassNames.innerCell} ${ClassNames.sourceMapped}">');
+        List<CodeLine> lines = jsToDartMap[codeLine];
+        if (lines != null) {
+          for (CodeLine line in lines) {
+            line.printHtmlOn(htmlBuffer,
+                context.from(includeAnnotation: (a) {
+                  CodeLineAnnotation annotation = a.data;
+                  return annotation.annotationType.isSourceMapped;
+                }));
+          }
+        }
+        htmlBuffer.write('</td></tr>');
+      }
+      htmlBuffer.write('</table>');
+    }
+  }
+}
+
 /// A list of columns that should align in output.
 class DiffBlock {
   final DiffKind kind;
-  List<List<HtmlPart>> columns = <List<HtmlPart>>[];
+  Map<DiffColumn, DiffColumnBlock> _columns = <DiffColumn, DiffColumnBlock>{};
 
   DiffBlock(this.kind);
 
-  void addColumn(int index, List<HtmlPart> lines) {
-    if (index >= columns.length) {
-      columns.length = index + 1;
-    }
-    columns[index] = lines;
+  void addColumnBlock(DiffColumn column, DiffColumnBlock block) {
+    _columns[column] = block;
   }
 
-  List<HtmlPart> getColumn(int index) {
-    List<HtmlPart> lines;
-    if (index < columns.length) {
-      lines = columns[index];
+  Iterable<DiffColumn> get columns => _columns.keys;
+
+  void printHtmlOn(DiffColumn column,
+                   StringBuffer htmlBuffer,
+                   HtmlPrintContext context) {
+    DiffColumnBlock block = _columns[column];
+    if (block != null) {
+      block.printHtmlOn(htmlBuffer, context);
     }
-    return lines != null ? lines : const <HtmlPart>[];
   }
 }
 
@@ -176,13 +248,47 @@
       : this.structures = structures,
         this.inputLines = structures.map((s) => s.lines).toList();
 
-  CodeSource codeSourceFromEntities(Iterable<OutputEntity> entities) {
+  /// Compute [CodeSource]s defined by [entities].
+  Iterable<CodeSource> codeSourceFromEntities(Iterable<OutputEntity> entities) {
+    Set<CodeSource> sources = new Set<CodeSource>();
     for (OutputEntity entity in entities) {
       if (entity.codeSource != null) {
-        return entity.codeSource;
+        sources.add(entity.codeSource);
       }
     }
-    return null;
+    return sources;
+  }
+
+  /// Create a block with the code from [codeSources]. The [CodeSource]s in
+  /// [mainSources] are tagged as original code sources, the rest as inlined
+  /// code sources.
+  DiffColumnBlock codeLinesFromCodeSources(
+      Iterable<CodeSource> mainSources,
+      Iterable<CodeSource> codeSources) {
+    List<HtmlPart> parts = <HtmlPart>[];
+    for (CodeSource codeSource in codeSources) {
+      //parts.addAll(codeLinesFromCodeSource(codeSource));
+      String className =
+          mainSources.contains(codeSource)
+              ? ClassNames.originalDart : ClassNames.inlinedDart;
+      parts.add(
+          new TagPart('div',
+              properties: {'class': className},
+              content: codeLinesFromCodeSource(codeSource)));
+    }
+    return new PartsColumnBlock(parts);
+  }
+
+  /// Adds all [CodeSource]s used in [dartCodeLines] to [codeSourceSet].
+  void collectCodeSources(Set<CodeSource> codeSourceSet,
+                          Map<CodeLine, List<CodeLine>> dartCodeLines) {
+    for (List<CodeLine> codeLines in dartCodeLines.values) {
+      for (CodeLine dartCodeLine in codeLines) {
+        if (dartCodeLine.lineAnnotation != null) {
+          codeSourceSet.add(dartCodeLine.lineAnnotation);
+        }
+      }
+    }
   }
 
   /// Checks that lines are added in sequence without gaps or duplicates.
@@ -210,13 +316,30 @@
   /// Creates a block containing the code lines in [range] from input number
   /// [index]. If [codeSource] is provided, the block will contain a
   /// corresponding Dart code column.
-  void handleSkew(int index, Interval range, [CodeSource codeSource]) {
+  void handleSkew(
+      int index,
+      Interval range,
+      [Iterable<CodeSource> mainCodeSources = const <CodeSource>[]]) {
+    if (range.isEmpty) return;
+
+    Set<CodeSource> codeSources = new Set<CodeSource>();
+    codeSources.addAll(mainCodeSources);
+
     DiffBlock block = new DiffBlock(DiffKind.UNMATCHED);
     checkLineInvariant(index, range);
-    block.addColumn(index, inputLines[index].sublist(range.from, range.to));
-    if (codeSource != null) {
-      block.addColumn(2,
-          codeLinesFromCodeSource(sourceFileManager, codeSource));
+    List<CodeLine> jsCodeLines =
+        inputLines[index].sublist(range.from, range.to);
+    Map<CodeLine, List<CodeLine>> dartCodeLines =
+        dartCodeLinesFromJsCodeLines(jsCodeLines);
+    block.addColumnBlock(
+        new DiffColumn('js', index),
+        new CodeLinesColumnBlock(jsCodeLines, dartCodeLines));
+    collectCodeSources(codeSources, dartCodeLines);
+
+    if (codeSources.isNotEmpty) {
+      block.addColumnBlock(
+          const DiffColumn('dart'),
+          codeLinesFromCodeSources(mainCodeSources, codeSources));
     }
     blocks.add(block);
   }
@@ -224,21 +347,38 @@
   /// Create a block containing the code lines in [ranges] from the
   /// corresponding JavaScript inputs. If [codeSource] is provided, the block
   /// will contain a corresponding Dart code column.
-  void addLines(DiffKind kind, List<Interval> ranges, [CodeSource codeSource]) {
+  void addLines(
+      DiffKind kind,
+      List<Interval> ranges,
+      [Iterable<CodeSource> mainCodeSources = const <CodeSource>[]]) {
+    if (ranges.every((range) => range.isEmpty)) return;
+
+    Set<CodeSource> codeSources = new Set<CodeSource>();
+    codeSources.addAll(mainCodeSources);
+
     DiffBlock block = new DiffBlock(kind);
     for (int i = 0; i < ranges.length; i++) {
       checkLineInvariant(i, ranges[i]);
-      block.addColumn(i, inputLines[i].sublist(ranges[i].from, ranges[i].to));
+      List<CodeLine> jsCodeLines =
+          inputLines[i].sublist(ranges[i].from, ranges[i].to);
+      Map<CodeLine, List<CodeLine>> dartCodeLines =
+              dartCodeLinesFromJsCodeLines(jsCodeLines);
+      block.addColumnBlock(
+          new DiffColumn('js', i),
+          new CodeLinesColumnBlock(jsCodeLines, dartCodeLines));
+      collectCodeSources(codeSources, dartCodeLines);
     }
-    if (codeSource != null) {
-      block.addColumn(2,
-          codeLinesFromCodeSource(sourceFileManager, codeSource));
+    if (codeSources.isNotEmpty) {
+      block.addColumnBlock(const DiffColumn('dart'),
+          codeLinesFromCodeSources(mainCodeSources, codeSources));
     }
     blocks.add(block);
   }
 
   /// Merge the code lines in [range1] and [range2] of the corresponding input.
   void addRaw(Interval range1, Interval range2) {
+    if (range1.isEmpty && range2.isEmpty) return;
+
     match(a, b) => a.code == b.code;
 
     List<Interval> currentMatchedIntervals;
@@ -413,32 +553,250 @@
 
     return blocks;
   }
+
+  /// Creates html lines for code lines in [codeSource]. The [sourceFileManager]
+  /// is used to read that text from the source URIs.
+  List<HtmlPart> codeLinesFromCodeSource(CodeSource codeSource) {
+    List<HtmlPart> lines = <HtmlPart>[];
+    SourceFile sourceFile = sourceFileManager.getSourceFile(codeSource.uri);
+    String elementName = codeSource.name;
+    HtmlLine line = new HtmlLine();
+    line.htmlParts.add(new ConstHtmlPart('<span class="comment">'));
+    line.htmlParts.add(new HtmlText(
+        '${elementName}: ${sourceFile.filename}'));
+    line.htmlParts.add(new ConstHtmlPart('</span>'));
+    lines.add(line);
+    if (codeSource.begin != null) {
+      int startLine = sourceFile.getLine(codeSource.begin);
+      int endLine = sourceFile.getLine(codeSource.end) + 1;
+      for (CodeLine codeLine in convertAnnotatedCodeToCodeLines(
+          sourceFile.slowText(),
+          const <Annotation>[],
+          startLine: startLine,
+          endLine: endLine)) {
+        codeLine.lineAnnotation = codeSource;
+        lines.add(codeLine);
+      }
+    }
+    return lines;
+  }
+
+  /// Creates a map from JavaScript [CodeLine]s in [jsCodeLines] to the Dart
+  /// [CodeLine]s references in the source information.
+  Map<CodeLine, List<CodeLine>> dartCodeLinesFromJsCodeLines(
+      List<CodeLine> jsCodeLines) {
+    Map<CodeLine, Interval> codeLineInterval = <CodeLine, Interval>{};
+    Map<CodeLine, List<CodeLine>> jsToDartMap = <CodeLine, List<CodeLine>>{};
+    List<Annotation> annotations = <Annotation>[];
+    Uri currentUri;
+    Interval interval;
+
+    Map<Uri, Set<CodeSource>> codeSourceMap = <Uri, Set<CodeSource>>{};
+
+    for (CodeLine jsCodeLine in jsCodeLines) {
+      for (Annotation annotation in jsCodeLine.annotations) {
+        CodeLineAnnotation codeLineAnnotation = annotation.data;
+        for (CodeSource codeSource in codeLineAnnotation.codeSources) {
+          codeSourceMap.putIfAbsent(codeSource.uri,
+              () => new Set<CodeSource>()).add(codeSource);
+        }
+      }
+    }
+
+    void flush() {
+      if (currentUri == null) return;
+
+      Set<CodeSource> codeSources = codeSourceMap[currentUri];
+      SourceFile sourceFile = sourceFileManager.getSourceFile(currentUri);
+      List<CodeLine> annotatedDartCodeLines =
+          convertAnnotatedCodeToCodeLines(
+              sourceFile.slowText(),
+              annotations,
+              startLine: interval.from,
+              endLine: interval.to,
+              uri: currentUri);
+      if (codeSources != null) {
+        CodeSource currentCodeSource;
+        Interval currentLineInterval;
+        for (CodeLine dartCodeLine in annotatedDartCodeLines) {
+          if (currentCodeSource == null ||
+              !currentLineInterval.contains(dartCodeLine.lineNo)) {
+            currentCodeSource = null;
+            for (CodeSource codeSource in codeSources) {
+              Interval interval = new Interval(
+                  sourceFile.getLine(codeSource.begin),
+                  sourceFile.getLine(codeSource.end) + 1);
+              if (interval.contains(dartCodeLine.lineNo)) {
+                currentCodeSource = codeSource;
+                currentLineInterval = interval;
+                break;
+              }
+            }
+          }
+          if (currentCodeSource != null) {
+            dartCodeLine.lineAnnotation = currentCodeSource;
+          }
+        }
+      }
+
+      int index = 0;
+      for (CodeLine jsCodeLine in codeLineInterval.keys) {
+        List<CodeLine> dartCodeLines =
+            jsToDartMap.putIfAbsent(jsCodeLine, () => <CodeLine>[]);
+        if (dartCodeLines.isEmpty && index < annotatedDartCodeLines.length) {
+          dartCodeLines.add(annotatedDartCodeLines[index++]);
+        }
+      }
+      while (index < annotatedDartCodeLines.length) {
+        jsToDartMap[codeLineInterval.keys.last].add(
+            annotatedDartCodeLines[index++]);
+      }
+
+      currentUri = null;
+    }
+
+    void restart(CodeLine codeLine, CodeLocation codeLocation, int line) {
+      flush();
+
+      currentUri = codeLocation.uri;
+      interval = new Interval(line, line + 1);
+      annotations = <Annotation>[];
+      codeLineInterval.clear();
+      codeLineInterval[codeLine] = interval;
+    }
+
+    for (CodeLine jsCodeLine in jsCodeLines) {
+      for (Annotation annotation in jsCodeLine.annotations) {
+        CodeLineAnnotation codeLineAnnotation = annotation.data;
+
+        for (CodeLocation location in codeLineAnnotation.codeLocations) {
+          SourceFile sourceFile = sourceFileManager.getSourceFile(location.uri);
+          int line = sourceFile.getLine(location.offset);
+          if (currentUri != location.uri) {
+            restart(jsCodeLine, location, line);
+          } else if (interval.inWindow(line, windowSize: 2)) {
+            interval = interval.include(line);
+            codeLineInterval[jsCodeLine] = interval;
+          } else {
+            restart(jsCodeLine, location, line);
+          }
+
+          annotations.add(new Annotation(
+              codeLineAnnotation.annotationType,
+              location.offset,
+              'id=${codeLineAnnotation.annotationId}',
+              data: codeLineAnnotation));
+        }
+      }
+    }
+    flush();
+    return jsToDartMap;
+  }
 }
 
-/// Creates html lines for code lines in [codeSource]. [sourceFileManager] is
-/// used to read that text from the source URIs.
-List<HtmlPart> codeLinesFromCodeSource(
-    SourceFileManager sourceFileManager,
-    CodeSource codeSource) {
-  List<HtmlPart> lines = <HtmlPart>[];
-  SourceFile sourceFile = sourceFileManager.getSourceFile(codeSource.uri);
-  String elementName = codeSource.name;
-  HtmlLine line = new HtmlLine();
-  line.htmlParts.add(new ConstHtmlPart('<span class="comment">'));
-  line.htmlParts.add(new HtmlText(
-      '${elementName}: ${sourceFile.filename}'));
-  line.htmlParts.add(new ConstHtmlPart('</span>'));
-  lines.add(line);
-  if (codeSource.begin != null) {
-    int startLine = sourceFile.getLine(codeSource.begin);
-    int endLine = sourceFile.getLine(codeSource.end);
-    for (int lineNo = startLine; lineNo <= endLine; lineNo++) {
-      String text = sourceFile.getLineText(lineNo);
-      CodeLine codeLine = new CodeLine(lineNo, sourceFile.getOffset(lineNo, 0));
-      codeLine.codeBuffer.write(text);
-      codeLine.htmlParts.add(new HtmlText(text));
-      lines.add(codeLine);
-    }
+const DiffColumn column_js0 = const DiffColumn('js', 0);
+const DiffColumn column_js1 = const DiffColumn('js', 1);
+const DiffColumn column_dart = const DiffColumn('dart');
+
+class ClassNames {
+  static String column(DiffColumn column) => 'column_${column}';
+  static String identical(bool alternate) =>
+      'identical${alternate ? '1' : '2'}';
+  static String corresponding(bool alternate) =>
+      'corresponding${alternate ? '1' : '2'}';
+
+  static const String buttons = 'buttons';
+  static const String comment = 'comment';
+  static const String header = 'header';
+  static const String headerTable = 'header_table';
+  static const String headerColumn = 'header_column';
+  static const String legend = 'legend';
+  static const String table = 'table';
+
+  static const String cell = 'cell';
+  static const String innerCell = 'inner_cell';
+
+  static const String originalDart = 'main_dart';
+  static const String inlinedDart = 'inlined_dart';
+
+  static const String line = 'line';
+  static const String lineNumber = 'line_number';
+  static String colored(int index) => 'colored${index}';
+
+  static const String withSourceInfo = 'with_source_info';
+  static const String withoutSourceInfo = 'without_source_info';
+  static const String additionalSourceInfo = 'additional_source_info';
+  static const String unusedSourceInfo = 'unused_source_info';
+
+  static const String sourceMapped = 'source_mapped';
+  static const String sourceMapping = 'source_mapping';
+  static String sourceMappingIndex(int index) => 'source_mapping${index}';
+
+  static const String markers = 'markers';
+  static const String marker = 'marker';
+}
+
+class AnnotationType {
+  static const WITH_SOURCE_INFO =
+      const AnnotationType(0, ClassNames.withSourceInfo, true);
+  static const WITHOUT_SOURCE_INFO =
+      const AnnotationType(1, ClassNames.withoutSourceInfo, false);
+  static const ADDITIONAL_SOURCE_INFO =
+      const AnnotationType(2, ClassNames.additionalSourceInfo, true);
+  static const UNUSED_SOURCE_INFO =
+      const AnnotationType(3, ClassNames.unusedSourceInfo, false);
+
+  final int index;
+  final String className;
+  final bool isSourceMapped;
+
+  const AnnotationType(this.index, this.className, this.isSourceMapped);
+
+  static const List<AnnotationType> values = const <AnnotationType>[
+    WITH_SOURCE_INFO,
+    WITHOUT_SOURCE_INFO,
+    ADDITIONAL_SOURCE_INFO,
+    UNUSED_SOURCE_INFO];
+}
+
+class CodeLineAnnotation {
+  final int annotationId;
+  final AnnotationType annotationType;
+  final List<CodeLocation> codeLocations;
+  final List<CodeSource> codeSources;
+  final String stepInfo;
+  int sourceMappingIndex;
+
+  CodeLineAnnotation(
+      {this.annotationId,
+       this.annotationType,
+       this.codeLocations,
+       this.codeSources,
+       this.stepInfo,
+       this.sourceMappingIndex});
+
+  Map toJson(JsonStrategy strategy) {
+    return {
+      'annotationId': annotationId,
+      'annotationType': annotationType.index,
+      'codeLocations': codeLocations.map((l) => l.toJson(strategy)).toList(),
+      'codeSources': codeSources.map((c) => c.toJson()).toList(),
+      'stepInfo': stepInfo,
+      'sourceMappingIndex': sourceMappingIndex,
+    };
   }
-  return lines;
+
+  static fromJson(Map json, JsonStrategy strategy) {
+    return new CodeLineAnnotation(
+        annotationId: json['id'],
+        annotationType: AnnotationType.values[json['annotationType']],
+        codeLocations: json['codeLocations']
+            .map((j) => CodeLocation.fromJson(j, strategy))
+            .toList(),
+        codeSources: json['codeSources']
+            .map((j) => CodeSource.fromJson(j))
+            .toList(),
+        stepInfo: json['stepInfo'],
+        sourceMappingIndex: json['sourceMappingIndex']);
+  }
 }
diff --git a/tests/compiler/dart2js/sourcemaps/diff_view.dart b/tests/compiler/dart2js/sourcemaps/diff_view.dart
index c58a21e..1c1090a 100644
--- a/tests/compiler/dart2js/sourcemaps/diff_view.dart
+++ b/tests/compiler/dart2js/sourcemaps/diff_view.dart
@@ -8,6 +8,7 @@
 import 'dart:convert';
 import 'dart:io';
 
+import 'package:compiler/src/common.dart';
 import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/diagnostics/invariant.dart';
 import 'package:compiler/src/elements/elements.dart';
@@ -25,11 +26,6 @@
 import 'sourcemap_html_helper.dart';
 import 'trace_graph.dart';
 
-const String WITH_SOURCE_INFO_STYLE = 'border: solid 1px #FF8080;';
-const String WITHOUT_SOURCE_INFO_STYLE = 'background-color: #8080FF;';
-const String ADDITIONAL_SOURCE_INFO_STYLE = 'border: solid 1px #80FF80;';
-const String UNUSED_SOURCE_INFO_STYLE = 'border: solid 1px #8080FF;';
-
 main(List<String> args) async {
   DEBUG_MODE = true;
   String out = 'out.js.diff_view.html';
@@ -39,14 +35,14 @@
   Map<int, String> loadFrom = {};
   Map<int, String> saveTo = {};
   int argGroup = 0;
-  bool addAnnotations = true;
+  bool showAnnotations = true;
   for (String arg in args) {
     if (arg == '--') {
       currentOptions = [];
       optionSegments.add(currentOptions);
       argGroup++;
     } else if (arg == '-h') {
-      addAnnotations = false;
+      showAnnotations = false;
       print('Hiding annotations');
     } else if (arg == '-l') {
       loadFrom[argGroup] = 'out.js.diff$argGroup.json';
@@ -71,8 +67,9 @@
   if (optionSegments.length == 1) {
     // Use default options; comparing SSA and CPS output using the new
     // source information strategy.
-    options.add([USE_NEW_SOURCE_INFO]..addAll(commonArguments));
-    options.add([USE_NEW_SOURCE_INFO, Flags.useCpsIr]..addAll(commonArguments));
+    options.add([Flags.useNewSourceInfo]..addAll(commonArguments));
+    options.add(
+        [Flags.useNewSourceInfo, Flags.useCpsIr]..addAll(commonArguments));
   } else if (optionSegments.length == 2) {
     // Use alternative options for the second output column.
     options.add(commonArguments);
@@ -92,7 +89,7 @@
     } else {
       print('Compiling ${options[i].join(' ')} $filename');
       CodeLinesResult result = await computeCodeLines(
-          options[i], filename, addAnnotations: addAnnotations);
+          options[i], filename);
       OutputStructure structure = OutputStructure.parse(result.codeLines);
       computeEntityCodeSources(result, structure);
       output = new AnnotatedOutput(
@@ -112,7 +109,9 @@
       sourceFileManager);
 
   outputDiffView(
-      out, outputs, blocks, addAnnotations: addAnnotations);
+      out, outputs, blocks,
+      showMarkers: showAnnotations,
+      showSourceMapped: showAnnotations);
 }
 
 /// Attaches [CodeSource]s to the entities in [structure] using the
@@ -127,6 +126,44 @@
   });
 }
 
+class CodeLineAnnotationJsonStrategy implements JsonStrategy {
+  const CodeLineAnnotationJsonStrategy();
+
+  Map encodeAnnotation(Annotation annotation) {
+    CodeLineAnnotation data = annotation.data;
+    return {
+      'id': annotation.id,
+      'codeOffset': annotation.codeOffset,
+      'title': annotation.title,
+      'data': data.toJson(this),
+    };
+  }
+
+  Annotation decodeAnnotation(Map json) {
+    return new Annotation(
+        json['id'],
+        json['codeOffset'],
+        json['title'],
+        data: CodeLineAnnotation.fromJson(json['data'], this));
+  }
+
+  @override
+  decodeLineAnnotation(json) {
+    if (json != null) {
+      return CodeSource.fromJson(json);
+    }
+    return null;
+  }
+
+  @override
+  encodeLineAnnotation(CodeSource lineAnnotation) {
+    if (lineAnnotation != null) {
+      return lineAnnotation.toJson();
+    }
+    return null;
+  }
+}
+
 /// The structured output of a compilation.
 class AnnotatedOutput {
   final String filename;
@@ -142,7 +179,7 @@
     return {
       'filename': filename,
       'options': options,
-      'structure': structure.toJson(),
+      'structure': structure.toJson(const CodeLineAnnotationJsonStrategy()),
       'coverage': coverage,
     };
   }
@@ -150,7 +187,8 @@
   static AnnotatedOutput fromJson(Map json) {
     String filename = json['filename'];
     List<String> options = json['options'];
-    OutputStructure structure = OutputStructure.fromJson(json['structure']);
+    OutputStructure structure = OutputStructure.fromJson(
+        json['structure'], const CodeLineAnnotationJsonStrategy());
     String coverage = json['coverage'];
     return new AnnotatedOutput(filename, options, structure, coverage);
   }
@@ -175,7 +213,8 @@
     String out,
     List<AnnotatedOutput> outputs,
     List<DiffBlock> blocks,
-    {bool addAnnotations: true}) {
+    {bool showMarkers: true,
+     bool showSourceMapped: true}) {
   assert(outputs[0].filename == outputs[1].filename);
   bool usePre = true;
 
@@ -185,16 +224,16 @@
 <head>
 <title>Diff for ${outputs[0].filename}</title>
 <style>
-.lineNumber {
+.${ClassNames.lineNumber} {
   font-size: smaller;
   color: #888;
 }
-.comment {
+.${ClassNames.comment} {
   font-size: smaller;
   color: #888;
   font-family: initial;
 }
-.header {
+.${ClassNames.header} {
   position: fixed;
   width: 100%;
   background-color: #FFFFFF;
@@ -203,31 +242,39 @@
   height: 42px;
   z-index: 1000;
 }
-.header-table {
+.${ClassNames.headerTable} {
   width: 100%;
   background-color: #400000;
   color: #FFFFFF;
   border-spacing: 0px;
 }
-.header-column {
-  width: 34%;
+.${ClassNames.headerColumn} {
 }
-.legend {
+.${ClassNames.legend} {
   padding: 2px;
 }
-.table {
+.${ClassNames.buttons} {
+  position: fixed;
+  right: 0px;
+  top: 0px;
+  width: 220px;
+  background-color: #FFFFFF;
+  border: 1px solid #C0C0C0;
+  z-index: 2000;
+}
+.${ClassNames.table} {
   position: absolute;
   left: 0px;
   top: 42px;
   width: 100%;
   border-spacing: 0px;
 }
-.cell {
-  max-width: 500px;
+.${ClassNames.cell}, 
+.${ClassNames.innerCell}, 
+.${ClassNames.originalDart}, 
+.${ClassNames.inlinedDart} {
   overflow-y: hidden;
   vertical-align: top;
-  border-top: 1px solid #F0F0F0;
-  border-left: 1px solid #F0F0F0;
 ''');
   if (usePre) {
     sb.write('''
@@ -245,89 +292,191 @@
   font-family: monospace;
   padding: 0px;
 }
-.corresponding1 {
+.${ClassNames.cell} {
+  border-top: 1px solid #F0F0F0;
+  border-left: 1px solid #C0C0C0;
+}
+.${ClassNames.innerCell} {
+  /*border-top: 1px solid #F8F8F8;*/
+  width: 50%;
+  max-width: 250px;
+}
+.${ClassNames.corresponding(false)} {
   background-color: #FFFFE0;
 }
-.corresponding2 {
+.${ClassNames.corresponding(true)} {
   background-color: #EFEFD0;
 }
-.identical1 {
+.${ClassNames.identical(false)} {
   background-color: #E0F0E0;
 }
-.identical2 {
+.${ClassNames.identical(true)} {
   background-color: #C0E0C0;
 }
-.line {
+.${ClassNames.line} {
   padding-left: 7em;
   text-indent: -7em;
   margin: 0px;
 }
-.column0 {
+.${ClassNames.column(column_js0)} {
+  max-width: 500px;
+  width: 500px;
 }
-.column1 {
+.${ClassNames.column(column_js1)} {
+  max-width: 500px;
+  width: 500px;
 }
-.column2 {
+.${ClassNames.column(column_dart)} {
+  max-width: 300px;
+  width: 300px;
+}
+.${ClassNames.colored(0)} {
+  color: #FF0000;
+}
+.${ClassNames.colored(1)} {
+  color: #C0C000;
+}
+.${ClassNames.colored(2)} {
+  color: #008000;
+}
+.${ClassNames.colored(3)} {
+  color: #00C0C0;
+}
+.${ClassNames.withSourceInfo} {
+  border: solid 1px #FF8080;
+}
+.${ClassNames.withoutSourceInfo} {
+  background-color: #8080FF;
+}
+.${ClassNames.additionalSourceInfo} {
+  border: solid 1px #80FF80;
+}
+.${ClassNames.unusedSourceInfo} {
+  border: solid 1px #8080FF;
+}
+.${ClassNames.originalDart} {
+}
+.${ClassNames.inlinedDart} {
+}
+''');
+  for (int i = 0; i < HUE_COUNT; i++) {
+    sb.write('''
+.${ClassNames.sourceMappingIndex(i)} {
+  background-color: ${toColorCss(i)};
+}
+''');
+  }
+  sb.write('''
+.${ClassNames.sourceMapped} {
+  ${showSourceMapped ? '' : 'display: none;'}
+}
+.${ClassNames.sourceMapping} {
+  ${showSourceMapped ? '' : 'border: 0px;'}
+  ${showSourceMapped ? '' : 'background-color: transparent;'}
+}
+.${ClassNames.markers} {
+  ${showMarkers ? '' : 'display: none;'}
+}
+.${ClassNames.marker} {
+  ${showMarkers ? '' : 'border: 0px;'}
+  ${showMarkers ? '' : 'background-color: transparent;'}
 }
 </style>
+<script>
+function isChecked(name) {
+  var box = document.getElementById('box-' + name);
+  return box.checked;
+}
+function toggleDisplay(name) {
+  var checked = isChecked(name);
+  var styleSheet = document.styleSheets[0];
+  for (var index = 0; index < styleSheet.cssRules.length; index++) {
+    var cssRule = styleSheet.cssRules[index];
+    if (cssRule.selectorText == '.' + name) {
+      if (checked) {
+        cssRule.style.removeProperty('display');
+      } else {
+        cssRule.style.display = 'none';
+      }
+    }
+  }
+  return checked;
+}
+function toggle${ClassNames.sourceMapped}() {
+  var checked = toggleDisplay('${ClassNames.sourceMapped}');
+  toggleAnnotations(checked, '${ClassNames.sourceMapping}');
+}
+function toggle${ClassNames.markers}() {
+  var checked = toggleDisplay('${ClassNames.markers}');
+  toggleAnnotations(checked, '${ClassNames.marker}');
+}
+function toggleAnnotations(show, name) {
+  var styleSheet = document.styleSheets[0];
+  for (var index = 0; index < styleSheet.cssRules.length; index++) {
+    var cssRule = styleSheet.cssRules[index];
+    if (cssRule.selectorText == '.' + name) {
+      if (show) {
+        cssRule.style.removeProperty('border');
+        cssRule.style.removeProperty('background-color');
+      } else {
+        cssRule.style.border = '0px';
+        cssRule.style.backgroundColor = 'transparent';
+      }
+    }
+  }
+} 
+</script>
 </head>
 <body>''');
 
   sb.write('''
-<div class="header">
-<table class="header-table"><tr>
-<td class="header-column">[${outputs[0].options.join(',')}]</td>
-<td class="header-column">[${outputs[1].options.join(',')}]</td>
-<td class="header-column">Dart code</td>
-</tr></table>
-<div class="legend">
-  <span class="identical1">&nbsp;&nbsp;&nbsp;</span> 
-  <span class="identical2">&nbsp;&nbsp;&nbsp;</span>
+<div class="${ClassNames.header}">
+<div class="${ClassNames.legend}">
+  <span class="${ClassNames.identical(false)}">&nbsp;&nbsp;&nbsp;</span> 
+  <span class="${ClassNames.identical(true)}">&nbsp;&nbsp;&nbsp;</span>
   identical blocks
-  <span class="corresponding1">&nbsp;&nbsp;&nbsp;</span>
-  <span class="corresponding2">&nbsp;&nbsp;&nbsp;</span> 
+  <span class="${ClassNames.corresponding(false)}">&nbsp;&nbsp;&nbsp;</span>
+  <span class="${ClassNames.corresponding(true)}">&nbsp;&nbsp;&nbsp;</span> 
   corresponding blocks
 ''');
 
-  if (addAnnotations) {
-    sb.write('''
-  <span style="$WITH_SOURCE_INFO_STYLE">&nbsp;&nbsp;&nbsp;</span>
+  sb.write('''
+  <span class="${ClassNames.markers}">
+  <span class="${ClassNames.withSourceInfo}">&nbsp;&nbsp;&nbsp;</span>
   <span title="'offset with source information' means that source information 
 is available for an offset which is expected to have a source location 
 attached. This offset has source information as intended.">
   offset with source information</span>
-  <span style="$WITHOUT_SOURCE_INFO_STYLE">&nbsp;&nbsp;&nbsp;</span>
+  <span class="${ClassNames.withoutSourceInfo}">&nbsp;&nbsp;&nbsp;</span>
   <span title="'offset without source information' means that _no_ source 
 information is available for an offset which was expected to have a source 
 location attached. Source information must be found for this offset.">
   offset without source information</span>
-  <span style="$ADDITIONAL_SOURCE_INFO_STYLE">&nbsp;&nbsp;&nbsp;</span>
+  <span class="${ClassNames.additionalSourceInfo}">&nbsp;&nbsp;&nbsp;</span>
   <span title="'offset with unneeded source information' means that a source 
 location was attached to an offset which was _not_ expected to have a source
 location attached. The source location should be removed from this offset.">
   offset with unneeded source information</span>
-  <span style="$UNUSED_SOURCE_INFO_STYLE">&nbsp;&nbsp;&nbsp;</span>
+  <span class="${ClassNames.unusedSourceInfo}">&nbsp;&nbsp;&nbsp;</span>
   <span title="'offset with unused source information' means that source 
 information is available for an offset which is _not_ expected to have a source
 location attached. This source information _could_ be used by a parent AST node
 offset that is an 'offset without source information'."> 
   offset with unused source information</span>
+  </span>
+  <span class="${ClassNames.sourceMapped}">
 ''');
+  for (int i = 0; i < HUE_COUNT; i++) {
+    sb.write('''
+<span class="${ClassNames.sourceMappingIndex(i)}">&nbsp;&nbsp;</span>''');
   }
-
   sb.write('''
-</div></div>
-<table class="table">
+  <span title="JavaScript offsets and their corresponding Dart Code offset 
+as mapped through source-maps.">
+  mapped source locations</span>
+  </span>
 ''');
 
-  void addCell(String content) {
-    sb.write('''
-<td class="cell"><pre>
-''');
-    sb.write(content);
-    sb.write('''
-</pre></td>
-''');
-  }
 
   /// Marker to alternate output colors.
   bool alternating = false;
@@ -338,39 +487,73 @@
     if (outputs[i].codeLines.isNotEmpty) {
       lineNoWidth = '${outputs[i].codeLines.last.lineNo + 1}'.length;
     }
-    printContexts.add(new HtmlPrintContext(lineNoWidth: lineNoWidth));
+    printContexts.add(new HtmlPrintContext(
+        lineNoWidth: lineNoWidth,
+        getAnnotationData: getAnnotationData,
+        getLineData: getLineData));
   }
 
+  Set<DiffColumn> allColumns = new Set<DiffColumn>();
+  for (DiffBlock block in blocks) {
+    allColumns.addAll(block.columns);
+  }
+
+  List<DiffColumn> columns = [column_js0, column_js1, column_dart]
+      .where((c) => allColumns.contains(c)).toList();
+
+  sb.write('''
+</div>
+<table class="${ClassNames.headerTable}"><tr>''');
+  for (DiffColumn column in columns) {
+    sb.write('''
+<td class="${ClassNames.headerColumn} ${ClassNames.column(column)}">''');
+    if (column.type == 'js') {
+      sb.write('''[${outputs[column.index].options.join(',')}]''');
+    } else {
+      sb.write('''Dart code''');
+    }
+    sb.write('''</td>''');
+  }
+
+  sb.write('''
+</tr></table>
+</div>
+<table class="${ClassNames.table}">
+''');
+
   for (DiffBlock block in blocks) {
     String className;
     switch (block.kind) {
       case DiffKind.UNMATCHED:
-        className = 'cell';
+        className = '${ClassNames.cell}';
         break;
       case DiffKind.MATCHING:
-        className = 'cell corresponding${alternating ? '1' : '2'}';
+        className =
+            '${ClassNames.cell} ${ClassNames.corresponding(alternating)}';
         alternating = !alternating;
         break;
       case DiffKind.IDENTICAL:
-        className = 'cell identical${alternating ? '1' : '2'}';
+        className =
+            '${ClassNames.cell} ${ClassNames.identical(alternating)}';
         alternating = !alternating;
         break;
     }
     sb.write('<tr>');
-    for (int index = 0; index < 3; index++) {
-      sb.write('''<td class="$className column$index">''');
-      List<HtmlPart> lines = block.getColumn(index);
-      if (lines.isNotEmpty) {
-        for (HtmlPart line in lines) {
-          sb.write('<p class="line">');
-          if (index < printContexts.length) {
-            line.printHtmlOn(sb, printContexts[index]);
-          } else {
-            line.printHtmlOn(sb, new HtmlPrintContext());
-          }
-          sb.write('</p>');
-        }
+    for (DiffColumn column in columns) {
+      sb.write('''<td class="$className ${ClassNames.column(column)}">''');
+      HtmlPrintContext context = new HtmlPrintContext(
+          lineNoWidth: 4,
+          includeAnnotation: (Annotation annotation) {
+            CodeLineAnnotation data = annotation.data;
+            return data.annotationType == AnnotationType.WITH_SOURCE_INFO ||
+                   data.annotationType == AnnotationType.ADDITIONAL_SOURCE_INFO;
+          },
+          getAnnotationData: getAnnotationData,
+          getLineData: getLineData);
+      if (column.type == 'js') {
+        context = printContexts[column.index];
       }
+      block.printHtmlOn(column, sb, context);
       sb.write('''</td>''');
     }
     sb.write('</tr>');
@@ -378,11 +561,51 @@
 
   sb.write('''</tr><tr>''');
 
-  addCell(outputs[0].coverage);
-  addCell(outputs[1].coverage);
+  for (DiffColumn column in columns) {
+    sb.write('''
+<td class="${ClassNames.cell} ${ClassNames.column(column)}"><pre>''');
+    if (column.type == 'js') {
+      sb.write(outputs[column.index].coverage);
+    }
+    sb.write('''</td>''');
+  }
 
   sb.write('''
 </table>
+<div class="${ClassNames.buttons}">
+<input type="checkbox" id="box-${ClassNames.column(column_js0)}" 
+  onclick="javascript:toggleDisplay('${ClassNames.column(column_js0)}')" 
+  checked>
+Left JavaScript code<br/>
+
+<input type="checkbox" id="box-${ClassNames.column(column_js1)}" 
+  onclick="javascript:toggleDisplay('${ClassNames.column(column_js1)}')" 
+  checked>
+Right JavaScript code<br/>
+
+<input type="checkbox" id="box-${ClassNames.column(column_dart)}" 
+  onclick="javascript:toggleDisplay('${ClassNames.column(column_dart)}')" 
+  checked>
+<span title="Show column with Dart code corresponding to the block.">
+Dart code</span><br/>
+
+<input type="checkbox" id="box-${ClassNames.inlinedDart}" 
+  onclick="javascript:toggleDisplay('${ClassNames.inlinedDart}')" checked>
+<span title="Show Dart code inlined into the block.">
+Inlined Dart code</span><br/>
+
+<input type="checkbox" id="box-${ClassNames.markers}" 
+  onclick="javascript:toggle${ClassNames.markers}()" 
+  ${showMarkers ? 'checked' : ''}>
+<span title="Show markers for JavaScript offsets with source information.">
+Source information markers</span><br/>
+
+<input type="checkbox" id="box-${ClassNames.sourceMapped}" 
+  onclick="javascript:toggle${ClassNames.sourceMapped}()" 
+  ${showSourceMapped ? 'checked' : ''}>
+<span title="Show line-per-line mappings of JavaScript to Dart code.">
+Source mapped Dart code</span><br/>
+</div>
 </body>
 </html>
 ''');
@@ -396,95 +619,259 @@
   final Coverage coverage;
   final Map<int, Element> elementMap;
   final SourceFileManager sourceFileManager;
+  final CodeSources codeSources;
 
-  CodeLinesResult(this.codeLines, this.coverage,
-      this.elementMap, this.sourceFileManager);
+  CodeLinesResult(
+      this.codeLines,
+      this.coverage,
+      this.elementMap,
+      this.sourceFileManager,
+      this.codeSources);
+}
+
+class CodeSources {
+  Map<Element, CodeSource> codeSourceMap = <Element, CodeSource>{};
+  Map<Uri, Map<Interval, CodeSource>> uriCodeSourceMap =
+      <Uri, Map<Interval, CodeSource>>{};
+
+  CodeSources(
+    SourceMapProcessor processor,
+    SourceMaps sourceMaps) {
+
+    CodeSource computeCodeSource(Element element) {
+      return codeSourceMap.putIfAbsent(element, () {
+        CodeSource codeSource = codeSourceFromElement(element);
+        if (codeSource.begin != null) {
+          Interval interval = new Interval(codeSource.begin, codeSource.end);
+          Map<Interval, CodeSource> intervals =
+              uriCodeSourceMap[codeSource.uri];
+          if (intervals == null) {
+            intervals = <Interval, CodeSource>{};
+            uriCodeSourceMap[codeSource.uri] = intervals;
+          } else {
+            for (Interval existingInterval in intervals.keys.toList()) {
+              if (existingInterval.contains(interval.from)) {
+                CodeSource existingCodeSource = intervals[existingInterval];
+                intervals.remove(existingInterval);
+                if (existingInterval.from < interval.from) {
+                  Interval preInterval = new Interval(
+                      existingInterval.from, interval.from);
+                  intervals[preInterval] = existingCodeSource;
+                }
+                if (interval.to < existingInterval.to) {
+                  Interval postInterval = new Interval(
+                      interval.to, existingInterval.to);
+                  intervals[postInterval] = existingCodeSource;
+                }
+              }
+            }
+          }
+          intervals[interval] = codeSource;
+        }
+        if (element is ClassElement) {
+          element.forEachLocalMember((Element member) {
+            codeSource.members.add(computeCodeSource(member));
+          });
+          element.implementation.forEachLocalMember((Element member) {
+            codeSource.members.add(computeCodeSource(member));
+          });
+        } else if (element is MemberElement) {
+          element.nestedClosures.forEach((Element closure) {
+            codeSource.members.add(computeCodeSource(closure));
+          });
+        }
+        return codeSource;
+      });
+    }
+
+    for (LibraryElement library in
+             sourceMaps.compiler.libraryLoader.libraries) {
+      library.forEachLocalMember(computeCodeSource);
+      library.implementation.forEachLocalMember(computeCodeSource);
+    }
+
+    uriCodeSourceMap.forEach((Uri uri, Map<Interval, CodeSource> intervals) {
+      List<Interval> sortedKeys = intervals.keys.toList()..sort(
+          (i1, i2) => i1.from.compareTo(i2.from));
+      Map<Interval, CodeSource> sortedintervals = <Interval, CodeSource>{};
+      sortedKeys.forEach((Interval interval) {
+        sortedintervals[interval] = intervals[interval];
+      });
+      uriCodeSourceMap[uri] = sortedintervals;
+    });
+  }
+
+  CodeSource sourceLocationToCodeSource(SourceLocation sourceLocation) {
+    Map<Interval, CodeSource> intervals =
+        uriCodeSourceMap[sourceLocation.sourceUri];
+    if (intervals == null) {
+      print('No code source for $sourceLocation(${sourceLocation.offset})');
+      print(' -- no intervals for ${sourceLocation.sourceUri}');
+      return null;
+    }
+    for (Interval interval in intervals.keys) {
+      if (interval.contains(sourceLocation.offset)) {
+        return intervals[interval];
+      }
+    }
+    print('No code source for $sourceLocation(${sourceLocation.offset})');
+    intervals.forEach((k, v) => print(' $k: ${v.name}'));
+    return null;
+  }
 }
 
 /// Compute [CodeLine]s and [Coverage] for [filename] using the given [options].
 Future<CodeLinesResult> computeCodeLines(
     List<String> options,
-    String filename,
-    {bool addAnnotations: true}) async {
+    String filename) async {
   SourceMapProcessor processor = new SourceMapProcessor(filename);
   SourceMaps sourceMaps =
       await processor.process(options, perElement: true, forMain: true);
 
-  const int WITH_SOURCE_INFO = 0;
-  const int WITHOUT_SOURCE_INFO = 1;
-  const int ADDITIONAL_SOURCE_INFO = 2;
-  const int UNUSED_SOURCE_INFO = 3;
+  CodeSources codeSources = new CodeSources(processor, sourceMaps);
 
   SourceMapInfo info = sourceMaps.mainSourceMapInfo;
 
+  int nextAnnotationId = 0;
   List<CodeLine> codeLines;
   Coverage coverage = new Coverage();
-  List<Annotation> annotations = <Annotation>[];
+  Map<int, List<CodeLineAnnotation>> codeLineAnnotationMap =
+      <int, List<CodeLineAnnotation>>{};
 
-  void addAnnotation(int id, int offset, String title) {
-    annotations.add(new Annotation(id, offset, title));
+  /// Create a [CodeLineAnnotation] for [codeOffset].
+  void addCodeLineAnnotation(
+      {AnnotationType annotationType,
+       int codeOffset,
+       List<SourceLocation> locations: const <SourceLocation>[],
+       String stepInfo}) {
+    if (annotationType == AnnotationType.WITHOUT_SOURCE_INFO ||
+        annotationType == AnnotationType.UNUSED_SOURCE_INFO) {
+      locations = [];
+    }
+    List<CodeLocation> codeLocations = locations
+        .map((l) => new CodeLocation(l.sourceUri, l.sourceName, l.offset))
+        .toList();
+    List<CodeSource> codeSourceList = locations
+        .map(codeSources.sourceLocationToCodeSource)
+        .where((c) => c != null)
+        .toList();
+    CodeLineAnnotation data = new CodeLineAnnotation(
+        annotationId: nextAnnotationId++,
+        annotationType: annotationType,
+        codeLocations: codeLocations,
+        codeSources: codeSourceList,
+        stepInfo: stepInfo);
+    codeLineAnnotationMap.putIfAbsent(
+        codeOffset, () => <CodeLineAnnotation>[]).add(data);
   }
 
   String code = info.code;
   TraceGraph graph = createTraceGraph(info, coverage);
-  if (addAnnotations) {
-    Set<js.Node> mappedNodes = new Set<js.Node>();
 
-    void addSourceLocations(
-        int kind, int offset, List<SourceLocation> locations, String prefix) {
+  Set<js.Node> mappedNodes = new Set<js.Node>();
 
-      addAnnotation(kind, offset,
-          '${prefix}${locations
-              .where((l) => l != null)
-              .map((l) => l.shortText)
-              .join('\n')}');
-    }
-
-    bool addSourceLocationsForNode(int kind, js.Node node, String prefix) {
-      Map<int, List<SourceLocation>> locations = info.nodeMap[node];
-      if (locations == null || locations.isEmpty) {
-        return false;
-      }
-      locations.forEach(
-          (int offset, List<SourceLocation> locations) {
-        addSourceLocations(kind, offset, locations,
-            '${prefix}\n${truncate(nodeToString(node), 80)}\n');
-      });
-      mappedNodes.add(node);
-      return true;
-    }
-
-
-    for (TraceStep step in graph.steps) {
-      String title = '${step.id}:${step.kind}:${step.offset}';
-      if (!addSourceLocationsForNode(WITH_SOURCE_INFO, step.node, title)) {
-        int offset;
-        if (options.contains(USE_NEW_SOURCE_INFO)) {
-          offset = step.offset.subexpressionOffset;
-        } else {
-          offset = info.jsCodePositions[step.node].startPosition;
-        }
-        if (offset != null) {
-          addAnnotation(WITHOUT_SOURCE_INFO, offset, title);
-        }
-      }
-    }
-    for (js.Node node in info.nodeMap.nodes) {
-      if (!mappedNodes.contains(node)) {
-        addSourceLocationsForNode(ADDITIONAL_SOURCE_INFO, node, '');
-      }
-    }
-    SourceLocationCollector collector = new SourceLocationCollector();
-    info.node.accept(collector);
-    collector.sourceLocations.forEach(
-        (js.Node node, List<SourceLocation> locations) {
-      if (!mappedNodes.contains(node)) {
-        int offset = info.jsCodePositions[node].startPosition;
-        addSourceLocations(UNUSED_SOURCE_INFO, offset, locations, '');
-      }
-    });
+  /// Add an annotation for [codeOffset] pointing to [locations].
+  void addSourceLocations(
+      {AnnotationType annotationType,
+       int codeOffset,
+       List<SourceLocation> locations,
+       String stepInfo}) {
+    locations = locations.where((l) => l != null).toList();
+    addCodeLineAnnotation(
+        annotationType: annotationType,
+        codeOffset: codeOffset,
+        stepInfo: stepInfo,
+        locations: locations);
   }
 
+  /// Add annotations for all mappings created for [node].
+  bool addSourceLocationsForNode(
+      {AnnotationType annotationType,
+       js.Node node,
+       String stepInfo}) {
+    Map<int, List<SourceLocation>> locations = info.nodeMap[node];
+    if (locations == null || locations.isEmpty) {
+      return false;
+    }
+    locations.forEach((int offset, List<SourceLocation> locations) {
+      addSourceLocations(
+          annotationType: annotationType,
+          codeOffset: offset,
+          locations: locations,
+          stepInfo: stepInfo);
+    });
+    mappedNodes.add(node);
+    return true;
+  }
+
+  // Add annotations based on trace steps.
+  for (TraceStep step in graph.steps) {
+    String stepInfo = '${step.id}:${step.kind}:${step.offset}';
+    bool added = addSourceLocationsForNode(
+        annotationType: AnnotationType.WITH_SOURCE_INFO,
+        node: step.node,
+        stepInfo: stepInfo);
+    if (!added) {
+      int offset;
+      if (options.contains(Flags.useNewSourceInfo)) {
+        offset = step.offset.subexpressionOffset;
+      } else {
+        offset = info.jsCodePositions[step.node].startPosition;
+      }
+      if (offset != null) {
+        addCodeLineAnnotation(
+            annotationType: AnnotationType.WITHOUT_SOURCE_INFO,
+            codeOffset: offset,
+            stepInfo: stepInfo);
+      }
+    }
+  }
+
+  // Add additional annotations for mappings created for particular nodes.
+  for (js.Node node in info.nodeMap.nodes) {
+    if (!mappedNodes.contains(node)) {
+      addSourceLocationsForNode(
+          annotationType: AnnotationType.ADDITIONAL_SOURCE_INFO,
+          node: node);
+    }
+  }
+
+  // Add annotations for unused source information associated with nodes.
+  SourceLocationCollector collector = new SourceLocationCollector();
+  info.node.accept(collector);
+  collector.sourceLocations.forEach(
+      (js.Node node, List<SourceLocation> locations) {
+    if (!mappedNodes.contains(node)) {
+      int offset = info.jsCodePositions[node].startPosition;
+      addSourceLocations(
+        annotationType: AnnotationType.UNUSED_SOURCE_INFO,
+        codeOffset: offset,
+        locations: locations);
+    }
+  });
+
+  // Assign consecutive ids to source mappings.
+  int nextSourceMappedLocationIndex = 0;
+  List<Annotation> annotations = <Annotation>[];
+  for (int codeOffset in codeLineAnnotationMap.keys.toList()..sort()) {
+    bool hasSourceMappedLocation = false;
+    for (CodeLineAnnotation data in codeLineAnnotationMap[codeOffset]) {
+      if (data.annotationType.isSourceMapped) {
+        data.sourceMappingIndex = nextSourceMappedLocationIndex;
+        hasSourceMappedLocation = true;
+      }
+      annotations.add(new Annotation(
+          data.annotationType.index,
+          codeOffset,
+          'id=${data.annotationId}',
+          data: data));
+    }
+    if (hasSourceMappedLocation) {
+      nextSourceMappedLocationIndex++;
+    }
+  }
+
+  // Associate JavaScript offsets with [Element]s.
   StringSourceFile sourceFile = new StringSourceFile.fromName(filename, code);
   Map<int, Element> elementMap = <int, Element>{};
   sourceMaps.elementSourceMapInfos.forEach(
@@ -493,33 +880,11 @@
     elementMap[sourceFile.getLine(position.startPosition)] = element;
   });
 
-  codeLines = convertAnnotatedCodeToCodeLines(
-      code,
-      annotations,
-      colorScheme: new CustomColorScheme(
-        single: (int id) {
-          if (id == WITH_SOURCE_INFO) {
-            return WITH_SOURCE_INFO_STYLE;
-          } else if (id == ADDITIONAL_SOURCE_INFO) {
-            return ADDITIONAL_SOURCE_INFO_STYLE;
-          } else if (id == UNUSED_SOURCE_INFO) {
-            return UNUSED_SOURCE_INFO_STYLE;
-          }
-          return WITHOUT_SOURCE_INFO_STYLE;
-        },
-        multi: (List ids) {
-          if (ids.contains(WITH_SOURCE_INFO)) {
-            return WITH_SOURCE_INFO_STYLE;
-          } else if (ids.contains(ADDITIONAL_SOURCE_INFO)) {
-            return ADDITIONAL_SOURCE_INFO_STYLE;
-          } else if (ids.contains(UNUSED_SOURCE_INFO)) {
-            return UNUSED_SOURCE_INFO_STYLE;
-          }
-          return WITHOUT_SOURCE_INFO_STYLE;
-        }
-      ));
-  return new CodeLinesResult(codeLines, coverage, elementMap,
-      sourceMaps.sourceFileManager);
+  codeLines = convertAnnotatedCodeToCodeLines(code, annotations);
+  return new CodeLinesResult(
+      codeLines, coverage, elementMap,
+      sourceMaps.sourceFileManager,
+      codeSources);
 }
 
 /// Visitor that computes a map from [js.Node]s to all attached source
@@ -565,4 +930,70 @@
     }
   }
   return new CodeSource(kind, uri, name, begin, end);
-}
\ No newline at end of file
+}
+
+/// Create [LineData] that colors line numbers according to the [CodeSource]s
+/// origin if available.
+LineData getLineData(CodeSource lineAnnotation) {
+  if (lineAnnotation != null) {
+    return new LineData(
+        lineClass: ClassNames.line,
+        lineNumberClass:
+          '${ClassNames.lineNumber} '
+          '${ClassNames.colored(lineAnnotation.hashCode % 4)}');
+  }
+  return new LineData(
+      lineClass: ClassNames.line,
+      lineNumberClass: ClassNames.lineNumber);
+}
+
+AnnotationData getAnnotationData(Iterable<Annotation> annotations,
+                                 {bool forSpan}) {
+  for (Annotation annotation in annotations) {
+    CodeLineAnnotation data = annotation.data;
+    if (data.annotationType.isSourceMapped) {
+      if (forSpan) {
+        int index = data.sourceMappingIndex;
+        return new AnnotationData(
+            tag: 'span',
+            properties: {
+              'class':
+                '${ClassNames.sourceMapping} '
+                '${ClassNames.sourceMappingIndex(index % HUE_COUNT)}',
+              'title': 'index=$index',
+            });
+      } else {
+        return new AnnotationData(
+            tag: 'span',
+            properties: {
+              'title': annotation.title,
+              'class': '${ClassNames.marker} '
+                       '${data.annotationType.className}'});
+      }
+    }
+  }
+  if (forSpan) return null;
+  for (Annotation annotation in annotations) {
+    CodeLineAnnotation data = annotation.data;
+    if (data.annotationType == AnnotationType.UNUSED_SOURCE_INFO) {
+      return new AnnotationData(
+          tag: 'span',
+          properties: {
+            'title': annotation.title,
+            'class': '${ClassNames.marker} '
+                     '${data.annotationType.className}'});
+    }
+  }
+  for (Annotation annotation in annotations) {
+    CodeLineAnnotation data = annotation.data;
+    if (data.annotationType == AnnotationType.WITHOUT_SOURCE_INFO) {
+      return new AnnotationData(
+          tag: 'span',
+          properties: {
+            'title': annotation.title,
+            'class': '${ClassNames.marker} '
+                     '${data.annotationType.className}'});
+    }
+  }
+  return null;
+}
diff --git a/tests/compiler/dart2js/sourcemaps/html_parts.dart b/tests/compiler/dart2js/sourcemaps/html_parts.dart
index 6ddf95e..4d06f98 100644
--- a/tests/compiler/dart2js/sourcemaps/html_parts.dart
+++ b/tests/compiler/dart2js/sourcemaps/html_parts.dart
@@ -6,13 +6,130 @@
 
 import 'sourcemap_html_helper.dart';
 
+class Annotation {
+  final id;
+  final int codeOffset;
+  final String title;
+  final data;
+
+  Annotation(this.id, this.codeOffset, this.title, {this.data});
+}
+
+typedef bool AnnotationFilter(Annotation annotation);
+typedef AnnotationData AnnotationDataFunction(
+    Iterable<Annotation> annotations,
+    {bool forSpan});
+typedef LineData LineDataFunction(lineAnnotation);
+
+bool includeAllAnnotation(Annotation annotation) => true;
+
+class LineData {
+  final String lineClass;
+  final String lineNumberClass;
+
+  const LineData({
+    this.lineClass: 'line',
+    this.lineNumberClass: 'lineNumber'});
+}
+
+class AnnotationData {
+  final String tag;
+  final Map<String, String> properties;
+
+  const AnnotationData({
+    this.tag: 'a',
+    this.properties: const <String, String>{}});
+
+  int get hashCode => tag.hashCode * 13 + properties.hashCode * 19;
+
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! AnnotationData) return false;
+    return tag == other.tag &&
+           properties.length == other.properties.length &&
+           properties.keys.every((k) => properties[k] == other.properties[k]);
+  }
+}
+
+AnnotationDataFunction createAnnotationDataFunction(
+    {CssColorScheme colorScheme: const SingleColorScheme(),
+     ElementScheme elementScheme: const ElementScheme()}) {
+  return (Iterable<Annotation> annotations, {bool forSpan}) {
+    return getAnnotationDataFromSchemes(
+        annotations,
+        forSpan: forSpan,
+        colorScheme: colorScheme,
+        elementScheme: elementScheme);
+  };
+}
+
+LineData getDefaultLineData(data) => const LineData();
+
+AnnotationData getAnnotationDataFromSchemes(
+    Iterable<Annotation> annotations,
+    {bool forSpan,
+     CssColorScheme colorScheme: const SingleColorScheme(),
+     ElementScheme elementScheme: const ElementScheme()}) {
+  if (colorScheme.showLocationAsSpan != forSpan) return null;
+  Map<String, String> data = <String, String>{};
+  var id;
+  if (annotations.length == 1) {
+    Annotation annotation = annotations.single;
+    if (annotation != null) {
+      id = annotation.id;
+      data['style'] = colorScheme.singleLocationToCssColor(id);
+      data['title'] = annotation.title;
+    }
+  } else {
+    id = annotations.first.id;
+    List ids = [];
+    for (Annotation annotation in annotations) {
+      ids.add(annotation.id);
+    }
+    data['style'] = colorScheme.multiLocationToCssColor(ids);
+    data['title'] = annotations.map((l) => l.title).join(',');
+  }
+  if (id != null) {
+    Set ids = annotations.map((l) => l.id).toSet();
+    data['tag'] = 'a';
+    data['name'] = elementScheme.getName(id, ids);
+    data['href'] = elementScheme.getHref(id, ids);
+    data['onclick'] = elementScheme.onClick(id, ids);
+    data['onmouseover'] = elementScheme.onMouseOver(id, ids);
+    data['onmouseout'] = elementScheme.onMouseOut(id, ids);
+    return new AnnotationData(
+        properties: data);
+  }
+  return null;
+}
+
 class HtmlPrintContext {
   final int lineNoWidth;
   final bool usePre;
+  final AnnotationFilter includeAnnotation;
+  final AnnotationDataFunction getAnnotationData;
+  final LineDataFunction getLineData;
 
   HtmlPrintContext({
     this.lineNoWidth,
-    this.usePre: true});
+    this.usePre: true,
+    this.includeAnnotation: includeAllAnnotation,
+    this.getAnnotationData: getAnnotationDataFromSchemes,
+    this.getLineData: getDefaultLineData});
+
+  HtmlPrintContext from({
+      int lineNoWidth,
+      bool usePre,
+      AnnotationFilter includeAnnotation,
+      AnnotationDataFunction getAnnotationData,
+      LineDataFunction getLineData}) {
+    return new HtmlPrintContext(
+        lineNoWidth: lineNoWidth ?? this.lineNoWidth,
+        usePre: usePre ?? this.usePre,
+        includeAnnotation: includeAnnotation ?? this.includeAnnotation,
+        getAnnotationData: getAnnotationData ?? this.getAnnotationData,
+        getLineData: getLineData ?? this.getLineData);
+  }
 }
 
 enum HtmlPartKind {
@@ -21,31 +138,36 @@
   CONST,
   NEWLINE,
   TEXT,
-  ANCHOR,
+  TAG,
+  LINE_NUMBER,
 }
 
 abstract class HtmlPart {
-  void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {}
+  void printHtmlOn(StringBuffer buffer, HtmlPrintContext context);
 
-  toJson();
+  HtmlPartKind get kind;
 
-  static HtmlPart fromJson(json) {
+  toJson(JsonStrategy strategy);
+
+  static HtmlPart fromJson(json, JsonStrategy strategy) {
     if (json is String) {
       return new ConstHtmlPart(json);
     } else {
       switch (HtmlPartKind.values[json['kind']]) {
         case HtmlPartKind.LINE:
-          return HtmlLine.fromJson(json);
+          return HtmlLine.fromJson(json, strategy);
         case HtmlPartKind.CODE:
-          return CodeLine.fromJson(json);
+          return CodeLine.fromJson(json, strategy);
         case HtmlPartKind.CONST:
-          return ConstHtmlPart.fromJson(json);
+          return ConstHtmlPart.fromJson(json, strategy);
         case HtmlPartKind.NEWLINE:
           return const NewLine();
         case HtmlPartKind.TEXT:
-          return HtmlText.fromJson(json);
-        case HtmlPartKind.ANCHOR:
-          return AnchorHtmlPart.fromJson(json);
+          return HtmlText.fromJson(json, strategy);
+        case HtmlPartKind.TAG:
+          return TagPart.fromJson(json, strategy);
+        case HtmlPartKind.LINE_NUMBER:
+          return LineNumber.fromJson(json, strategy);
       }
     }
   }
@@ -56,16 +178,18 @@
 
   const ConstHtmlPart(this.html);
 
+  HtmlPartKind get kind => HtmlPartKind.CONST;
+
   @override
   void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {
     buffer.write(html);
   }
 
-  toJson() {
-    return {'kind': HtmlPartKind.CONST.index, 'html': html};
+  toJson(JsonStrategy strategy) {
+    return {'kind': kind.index, 'html': html};
   }
 
-  static ConstHtmlPart fromJson(Map json) {
+  static ConstHtmlPart fromJson(Map json, JsonStrategy strategy) {
     return new ConstHtmlPart(json['html']);
   }
 }
@@ -73,6 +197,8 @@
 class NewLine implements HtmlPart {
   const NewLine();
 
+  HtmlPartKind get kind => HtmlPartKind.NEWLINE;
+
   void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {
     if (context.usePre) {
       buffer.write('\n');
@@ -81,8 +207,8 @@
     }
   }
 
-  toJson() {
-    return {'kind': HtmlPartKind.NEWLINE.index};
+  toJson(JsonStrategy strategy) {
+    return {'kind': kind.index};
   }
 }
 
@@ -91,90 +217,70 @@
 
   const HtmlText(this.text);
 
+  HtmlPartKind get kind => HtmlPartKind.TEXT;
+
   void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {
     String escaped = escape(text);
     buffer.write(escaped);
   }
 
-  toJson() {
-    return {'kind': HtmlPartKind.TEXT.index, 'text': text};
+  toJson(JsonStrategy strategy) {
+    return {'kind': kind.index, 'text': text};
   }
 
-  static HtmlText fromJson(Map json) {
+  static HtmlText fromJson(Map json, JsonStrategy strategy) {
     return new HtmlText(json['text']);
   }
 }
 
-class AnchorHtmlPart implements HtmlPart {
-  final String color;
-  final String name;
-  final String href;
-  final String title;
-  final String onclick;
-  final String onmouseover;
-  final String onmouseout;
+class TagPart implements HtmlPart {
+  final String tag;
+  final Map<String, String> properties;
+  final List<HtmlPart> content;
 
-  AnchorHtmlPart({
-    this.color,
-    this.name,
-    this.href,
-    this.title,
-    this.onclick,
-    this.onmouseover,
-    this.onmouseout});
+  TagPart(
+    this.tag,
+    {this.properties: const <String, String>{},
+     this.content: const <HtmlPart>[]});
+
+  HtmlPartKind get kind => HtmlPartKind.TAG;
 
   @override
   void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {
-    buffer.write('<a');
-    if (href != null) {
-      buffer.write(' href="${href}"');
-    }
-    if (name != null) {
-      buffer.write(' name="${name}"');
-    }
-    if (title != null) {
-      buffer.write(' title="${escape(title)}"');
-    }
-    buffer.write(' style="${color}"');
-    if (onclick != null) {
-      buffer.write(' onclick="${onclick}"');
-    }
-    if (onmouseover != null) {
-      buffer.write(' onmouseover="${onmouseover}"');
-    }
-    if (onmouseout != null) {
-      buffer.write(' onmouseout="${onmouseout}"');
-    }
+    buffer.write('<$tag');
+    properties.forEach((String key, String value) {
+      if (value != null) {
+        buffer.write(' $key="${value}"');
+      }
+    });
     buffer.write('>');
+    for (HtmlPart child in content) {
+      child.printHtmlOn(buffer, context);
+    }
+    buffer.write('</$tag>');
   }
 
-  toJson() {
+  toJson(JsonStrategy strategy) {
     return {
-      'kind': HtmlPartKind.ANCHOR.index,
-      'color': color,
-      'name': name,
-      'href': href,
-      'title': title,
-      'onclick': onclick,
-      'onmouseover': onmouseover,
-      'onmouseout': onmouseout};
+      'kind': kind.index,
+      'tag': tag,
+      'properties': properties,
+      'content': content.map((p) => p.toJson(strategy)).toList()};
   }
 
-  static AnchorHtmlPart fromJson(Map json) {
-    return new AnchorHtmlPart(
-        color: json['color'],
-        name: json['name'],
-        href: json['href'],
-        title: json['title'],
-        onclick: json['onclick'],
-        onmouseover: json['onmouseover'],
-        onmouseout: json['onmouseout']);
+  static TagPart fromJson(Map json, JsonStrategy strategy) {
+    return new TagPart(
+        json['tag'],
+        properties: json['properties'],
+        content: json['content'].map(HtmlPart.fromJson).toList());
   }
 }
 
 class HtmlLine implements HtmlPart {
   final List<HtmlPart> htmlParts = <HtmlPart>[];
 
+  HtmlPartKind get kind => HtmlPartKind.LINE;
+
   @override
   void printHtmlOn(StringBuffer htmlBuffer, HtmlPrintContext context) {
     for (HtmlPart part in htmlParts) {
@@ -182,30 +288,148 @@
     }
   }
 
-  Map toJson() {
+  Map toJson(JsonStrategy strategy) {
     return {
-      'kind': HtmlPartKind.LINE.index,
-      'html': htmlParts.map((p) => p.toJson()).toList(),
+      'kind': kind.index,
+      'html': htmlParts.map((p) => p.toJson(strategy)).toList(),
     };
   }
 
-  static CodeLine fromJson(Map json) {
+  static HtmlLine fromJson(Map json, JsonStrategy strategy) {
     HtmlLine line = new HtmlLine();
-    json['html'].forEach((part) => line.htmlParts.add(HtmlPart.fromJson(part)));
+    json['html']
+        .forEach((part) => line.htmlParts
+        .add(HtmlPart.fromJson(part, strategy)));
     return line;
   }
 }
 
-class CodeLine extends HtmlLine {
+class CodePart {
+  final List<Annotation> annotations;
+  final String subsequentCode;
+
+  CodePart(this.annotations, this.subsequentCode);
+
+  void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {
+    Iterable<Annotation> included =
+        annotations.where(context.includeAnnotation);
+
+    List<HtmlPart> htmlParts = <HtmlPart>[];
+    if (included.isNotEmpty) {
+      AnnotationData annotationData =
+          context.getAnnotationData(included, forSpan: false);
+      AnnotationData annotationDataForSpan =
+          context.getAnnotationData(included, forSpan: true);
+
+      String head = subsequentCode;
+      String tail = '';
+      if (subsequentCode.length > 1) {
+        head = subsequentCode.substring(0, 1);
+        tail = subsequentCode.substring(1);
+      }
+
+      void addForSpan(AnnotationData data) {
+        htmlParts.add(new TagPart(
+            data.tag,
+            properties: data.properties,
+            content: [new HtmlText(subsequentCode)]));
+      }
+
+      if (annotationData != null &&
+          annotationDataForSpan != null) {
+        htmlParts.add(new TagPart(
+            annotationDataForSpan.tag,
+            properties: annotationDataForSpan.properties,
+            content: [
+              new TagPart(
+                  annotationData.tag,
+                  properties: annotationData.properties,
+                  content: [new HtmlText(head)]),
+              new HtmlText(tail)]));
+      } else if (annotationDataForSpan != null) {
+        htmlParts.add(new TagPart(
+            annotationDataForSpan.tag,
+            properties: annotationDataForSpan.properties,
+            content: [new HtmlText(subsequentCode)]));
+      } else if (annotationData != null) {
+        htmlParts.add(new TagPart(
+            annotationData.tag,
+            properties: annotationData.properties,
+            content: [new HtmlText(head)]));
+        htmlParts.add(new HtmlText(tail));
+      } else {
+        htmlParts.add(new HtmlText(subsequentCode));
+      }
+    } else {
+      htmlParts.add(new HtmlText(subsequentCode));
+    }
+
+    for (HtmlPart part in htmlParts) {
+      part.printHtmlOn(buffer, context);
+    }
+  }
+
+  Map toJson(JsonStrategy strategy) {
+    return {
+      'annotations':
+        annotations.map((a) => strategy.encodeAnnotation(a)).toList(),
+      'subsequentCode': subsequentCode,
+    };
+  }
+
+  static CodePart fromJson(Map json, JsonStrategy strategy) {
+    return new CodePart(
+        json['annotations'].map((j) => strategy.decodeAnnotation(j)).toList(),
+        json['subsequentCode']);
+  }
+}
+
+class LineNumber extends HtmlPart {
+  final int lineNo;
+  final lineAnnotation;
+
+  LineNumber(this.lineNo, this.lineAnnotation);
+
+  HtmlPartKind get kind => HtmlPartKind.LINE_NUMBER;
+
+  @override
+  toJson(JsonStrategy strategy) {
+    return {
+      'kind': kind.index,
+      'lineNo': lineNo,
+      'lineAnnotation': strategy.encodeLineAnnotation(lineAnnotation),
+    };
+  }
+
+  static LineNumber fromJson(Map json, JsonStrategy strategy) {
+    return new LineNumber(
+        json['lineNo'],
+        strategy.decodeLineAnnotation(json['lineAnnotation']));
+  }
+
+  @override
+  void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {
+    buffer.write(lineNumber(
+        lineNo,
+        width: context.lineNoWidth,
+        useNbsp: !context.usePre,
+        className: context.getLineData(lineAnnotation).lineNumberClass));
+  }
+}
+
+class CodeLine extends HtmlPart {
+  final Uri uri;
   final int lineNo;
   final int offset;
   final StringBuffer codeBuffer = new StringBuffer();
-  final List<HtmlPart> htmlParts = <HtmlPart>[];
-  // TODO(johnniwinther): Make annotations serializable.
+  final List<CodePart> codeParts = <CodePart>[];
   final List<Annotation> annotations = <Annotation>[];
+  var lineAnnotation;
   String _code;
 
-  CodeLine(this.lineNo, this.offset);
+  CodeLine(this.lineNo, this.offset, {this.uri});
+
+  HtmlPartKind get kind => HtmlPartKind.CODE;
 
   String get code {
     if (_code == null) {
@@ -216,28 +440,74 @@
 
   @override
   void printHtmlOn(StringBuffer htmlBuffer, HtmlPrintContext context) {
-    htmlBuffer.write(lineNumber(
-        lineNo, width: context.lineNoWidth, useNbsp: !context.usePre));
-    for (HtmlPart part in htmlParts) {
+    if (context.usePre) {
+      LineData lineData = context.getLineData(lineAnnotation);
+      htmlBuffer.write('<p class="${lineData.lineClass}">');
+    }
+    new LineNumber(lineNo, lineAnnotation).printHtmlOn(htmlBuffer, context);
+    for (CodePart part in codeParts) {
       part.printHtmlOn(htmlBuffer, context);
     }
+    const NewLine().printHtmlOn(htmlBuffer, context);
+    if (context.usePre) {
+      htmlBuffer.write('</p>');
+    }
   }
 
-  Map toJson() {
+  Map toJson(JsonStrategy strategy) {
     return {
-      'kind': HtmlPartKind.CODE.index,
+      'kind': kind.index,
       'lineNo': lineNo,
       'offset': offset,
       'code': code,
-      'html': htmlParts.map((p) => p.toJson()).toList(),
+      'parts': codeParts.map((p) => p.toJson(strategy)).toList(),
+      'annotations':
+        annotations.map((a) => strategy.encodeAnnotation(a)).toList(),
+      'lineAnnotation': lineAnnotation != null
+          ? strategy.encodeLineAnnotation(lineAnnotation) : null,
     };
   }
 
-  static CodeLine fromJson(Map json) {
-    CodeLine line = new CodeLine(json['lineNo'], json['offset']);
+  static CodeLine fromJson(Map json, JsonStrategy strategy) {
+    CodeLine line = new CodeLine(
+        json['lineNo'],
+        json['offset'],
+        uri: json['uri'] != null ? Uri.parse(json['uri']) : null);
     line.codeBuffer.write(json['code']);
-    json['html'].forEach((part) => line.htmlParts.add(HtmlPart.fromJson(part)));
+    json['parts']
+        .forEach((part) => line.codeParts
+        .add(CodePart.fromJson(part, strategy)));
+    json['annotations']
+        .forEach((a) => line.annotations
+        .add(strategy.decodeAnnotation(a)));
+    line.lineAnnotation = json['lineAnnotation'] != null
+        ? strategy.decodeLineAnnotation(json['lineAnnotation']) : null;
     return line;
   }
 }
 
+class JsonStrategy {
+  const JsonStrategy();
+
+  Map encodeAnnotation(Annotation annotation) {
+    return {
+      'id': annotation.id,
+      'codeOffset': annotation.codeOffset,
+      'title': annotation.title,
+      'data': annotation.data,
+    };
+  }
+
+  Annotation decodeAnnotation(Map json) {
+    return new Annotation(
+        json['id'],
+        json['codeOffset'],
+        json['title'],
+        data: json['data']);
+  }
+
+
+  encodeLineAnnotation(lineAnnotation) => lineAnnotation;
+
+  decodeLineAnnotation(json) => json;
+}
diff --git a/tests/compiler/dart2js/sourcemaps/js_tracer.dart b/tests/compiler/dart2js/sourcemaps/js_tracer.dart
index 4ea4e91..56d6f12 100644
--- a/tests/compiler/dart2js/sourcemaps/js_tracer.dart
+++ b/tests/compiler/dart2js/sourcemaps/js_tracer.dart
@@ -35,7 +35,10 @@
     SourcePositionKind sourcePositionKind = SourcePositionKind.START;
     List text = [node];
     switch (kind) {
-      case StepKind.FUN:
+      case StepKind.FUN_ENTRY:
+        text = ['<entry>'];
+        break;
+      case StepKind.FUN_EXIT:
         sourcePositionKind = SourcePositionKind.INNER;
         text = ['<exit>'];
         break;
diff --git a/tests/compiler/dart2js/sourcemaps/output_structure.dart b/tests/compiler/dart2js/sourcemaps/output_structure.dart
index 4962ba9..b9bb841 100644
--- a/tests/compiler/dart2js/sourcemaps/output_structure.dart
+++ b/tests/compiler/dart2js/sourcemaps/output_structure.dart
@@ -4,8 +4,11 @@
 
 library sourcemap.output_structure;
 
+import 'dart:math' as Math;
 import 'html_parts.dart' show
-    CodeLine;
+    Annotation,
+    CodeLine,
+    JsonStrategy;
 
 // Constants used to identify the subsection of the JavaScript output. These
 // are specifically for the unminified full_emitter output.
@@ -54,7 +57,7 @@
 
   EntityKind get kind;
 
-  Map toJson();
+  Map toJson(JsonStrategy strategy);
 
   OutputEntity getEntityForLine(int line);
 }
@@ -233,21 +236,24 @@
   accept(OutputVisitor visitor, arg) => visitor.visitStructure(this, arg);
 
   @override
-  Map toJson() {
+  Map toJson(JsonStrategy strategy) {
     return {
-      'lines': lines.map((line) => line.toJson()).toList(),
+      'lines': lines.map((line) => line.toJson(strategy)).toList(),
       'headerEnd': headerEnd,
       'footerStart': footerStart,
-      'children': children.map((child) => child.toJson()).toList(),
+      'children': children.map((child) => child.toJson(strategy)).toList(),
     };
   }
 
-  static OutputStructure fromJson(Map json) {
-    List<CodeLine> lines = json['lines'].map(CodeLine.fromJson).toList();
+  static OutputStructure fromJson(Map json, JsonStrategy strategy) {
+    List<CodeLine> lines =
+        json['lines'].map((l) => CodeLine.fromJson(l, strategy)).toList();
     int headerEnd = json['headerEnd'];
     int footerStart = json['footerStart'];
     List<LibraryBlock> children =
-        json['children'].map(AbstractEntity.fromJson).toList();
+        json['children']
+            .map((j) => AbstractEntity.fromJson(j, strategy))
+            .toList();
     return new OutputStructure(lines, headerEnd, footerStart, children);
   }
 }
@@ -262,18 +268,18 @@
   Interval get interval => new Interval(from, to);
 
   @override
-  Map toJson() {
+  Map toJson(JsonStrategy strategy) {
     return {
       'kind': kind.index,
       'name': name,
       'from': from,
       'to': to,
-      'children': children.map((child) => child.toJson()).toList(),
+      'children': children.map((child) => child.toJson(strategy)).toList(),
       'codeSource': codeSource != null ? codeSource.toJson() : null,
     };
   }
 
-  static AbstractEntity fromJson(Map json) {
+  static AbstractEntity fromJson(Map json, JsonStrategy strategy) {
     EntityKind kind = EntityKind.values[json['kind']];
     String name = json['name'];
     int from = json['from'];
@@ -287,13 +293,15 @@
         LibraryBlock lib = new LibraryBlock(name, from)
           ..to = to
           ..codeSource = codeSource;
-        json['children'].forEach((child) => lib.children.add(fromJson(child)));
+        json['children']
+            .forEach((child) => lib.children.add(fromJson(child, strategy)));
         return lib;
       case EntityKind.CLASS:
         LibraryClass cls = new LibraryClass(name, from)
             ..to = to
             ..codeSource = codeSource;
-        json['children'].forEach((child) => cls.children.add(fromJson(child)));
+        json['children']
+            .forEach((child) => cls.children.add(fromJson(child, strategy)));
         return cls;
       case EntityKind.TOP_LEVEL_FUNCTION:
         return new TopLevelFunction(name, from)
@@ -320,7 +328,7 @@
             ..to = to
             ..codeSource = codeSource;
         json['children'].forEach(
-            (child) => statics.children.add(fromJson(child)));
+            (child) => statics.children.add(fromJson(child, strategy)));
         return statics;
       case EntityKind.STATIC_FUNCTION:
         return new StaticFunction(name, from)
@@ -334,7 +342,7 @@
 class LibraryBlock extends AbstractEntity {
   List<BasicEntity> children = <BasicEntity>[];
   int get headerEnd => from + 2;
-  int get footerStart => to - 1;
+  int get footerStart => to/* - 1*/;
 
   LibraryBlock(String name, int from) : super(name, from);
 
@@ -624,9 +632,21 @@
 
   int get length => to - from;
 
+  bool get isEmpty => from == to;
+
   bool contains(int value) {
     return from <= value && value < to;
   }
+
+  Interval include(int index) {
+    return new Interval(Math.min(from, index), Math.max(to, index + 1));
+  }
+
+  bool inWindow(int index, {int windowSize: 0}) {
+    return from - windowSize <= index && index < to + windowSize;
+  }
+
+  String toString() => '[$from,$to[';
 }
 
 enum CodeKind {
@@ -635,15 +655,63 @@
   MEMBER,
 }
 
+class CodeLocation {
+  final Uri uri;
+  final String name;
+  final int offset;
+
+  CodeLocation(this.uri, this.name, this.offset);
+
+  String toString() => '$uri:$name:$offset';
+
+  Map toJson(JsonStrategy strategy) {
+    return {
+      'uri': uri.toString(),
+      'name': name,
+      'offset': offset,
+    };
+  }
+
+  static CodeLocation fromJson(Map json, JsonStrategy strategy) {
+    if (json == null) return null;
+    return new CodeLocation(
+        Uri.parse(json['uri']),
+        json['name'],
+        json['offset']);
+  }
+}
+
+/// A named entity in source code. This is used to serialize [Element]
+/// references without serializing the [Element] itself.
 class CodeSource {
   final CodeKind kind;
   final Uri uri;
   final String name;
   final int begin;
   final int end;
+  final List<CodeSource> members = <CodeSource>[];
 
   CodeSource(this.kind, this.uri, this.name, this.begin, this.end);
 
+  int get hashCode {
+    return
+        kind.hashCode * 13 +
+        uri.hashCode * 17 +
+        name.hashCode * 19 +
+        begin.hashCode * 23;
+  }
+
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! CodeSource) return false;
+    return
+        kind == other.kind &&
+        uri == other.uri &&
+        name == other.name &&
+        begin == other.begin;
+
+  }
+
   String toString() => '${toJson()}';
 
   Map toJson() {
@@ -653,16 +721,19 @@
       'name': name,
       'begin': begin,
       'end': end,
+      'members': members.map((c) => c.toJson()).toList(),
     };
   }
 
   static CodeSource fromJson(Map json) {
     if (json == null) return null;
-    return new CodeSource(
+    CodeSource codeSource = new CodeSource(
         CodeKind.values[json['kind']],
         Uri.parse(json['uri']),
         json['name'],
         json['begin'],
         json['end']);
+    json['members'].forEach((m) => codeSource.members.add(fromJson(m)));
+    return codeSource;
   }
 }
\ No newline at end of file
diff --git a/tests/compiler/dart2js/sourcemaps/source_mapping_invokes_test.dart b/tests/compiler/dart2js/sourcemaps/source_mapping_invokes_test.dart
index 20359e4..6ca3c0f 100644
--- a/tests/compiler/dart2js/sourcemaps/source_mapping_invokes_test.dart
+++ b/tests/compiler/dart2js/sourcemaps/source_mapping_invokes_test.dart
@@ -2,8 +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 'source_mapping_tester.dart' as tester;
+import 'source_mapping_tester.dart';
 
 void main() {
-  tester.main(['invokes']);
+  test(['invokes']);
 }
\ No newline at end of file
diff --git a/tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart b/tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart
index 908ef87..34a826c 100644
--- a/tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart
+++ b/tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart
@@ -2,8 +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 'source_mapping_tester.dart' as tester;
+import 'source_mapping_tester.dart';
+import 'sourcemap_helper.dart';
 
 void main() {
-  tester.main(['operators']);
+  test(['operators'], whiteListFunction: (String config, String file) {
+    bool allowGtOptimization(CodePoint codePoint) {
+      // Allow missing code points for bailout optimization.
+      return codePoint.jsCode.contains(r'.$gt()'); // # Issue 25304
+    }
+
+    return allowGtOptimization;
+  });
 }
\ No newline at end of file
diff --git a/tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart b/tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart
index d935150..6134d20 100644
--- a/tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart
+++ b/tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart
@@ -10,7 +10,23 @@
 import 'package:js_ast/js_ast.dart';
 import 'sourcemap_helper.dart';
 
+typedef CodePointWhiteListFunction WhiteListFunction(
+    String configuration, String file);
+
+typedef bool CodePointWhiteListFunction(CodePoint codePoint);
+
+CodePointWhiteListFunction emptyWhiteListFunction(String config, String file) {
+  return emptyWhiteList;
+}
+
+bool emptyWhiteList(CodePoint codePoint) => false;
+
 main(List<String> arguments) {
+  test(arguments);
+}
+
+void test(List<String> arguments,
+          {WhiteListFunction whiteListFunction: emptyWhiteListFunction}) {
   Set<String> configurations = new Set<String>();
   Set<String> files = new Set<String>();
   for (String argument in arguments) {
@@ -33,10 +49,12 @@
       List<String> options = TEST_CONFIGURATIONS[config];
       for (String file in files) {
         String filename = TEST_FILES[file];
-        TestResult result = await runTests(config, filename, options);
+        TestResult result = await runTests(
+            config, filename, options);
         if (result.missingCodePointsMap.isNotEmpty) {
-          result.printMissingCodePoints();
-          errorsFound = true;
+          errorsFound = result.printMissingCodePoints(
+              whiteListFunction(config, file));
+          true;
         }
         if (result.multipleNodesMap.isNotEmpty) {
           result.printMultipleNodes();
@@ -158,14 +176,22 @@
 
   TestResult(this.config, this.file, this.processor);
 
-  void printMissingCodePoints() {
+  bool printMissingCodePoints(
+      [CodePointWhiteListFunction codePointWhiteList = emptyWhiteList]) {
+    bool allWhiteListed = true;
     missingCodePointsMap.forEach((info, missingCodePoints) {
       print("Missing code points for ${info.element} in '$file' "
             "in config '$config':");
       for (CodePoint codePoint in missingCodePoints) {
-        print("  $codePoint");
+        if (codePointWhiteList(codePoint)) {
+          print("  $codePoint (white-listed)");
+        } else {
+          print("  $codePoint");
+          allWhiteListed = false;
+        }
       }
     });
+    return !allWhiteListed;
   }
 
   void printMultipleNodes() {
diff --git a/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart b/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
index 019e8be..9bc1ac8 100644
--- a/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
+++ b/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
@@ -8,6 +8,7 @@
 import 'dart:io';
 import 'package:compiler/compiler_new.dart';
 import 'package:compiler/src/apiimpl.dart' as api;
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/null_compiler_output.dart' show NullSink;
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/helpers/helpers.dart';
@@ -271,9 +272,6 @@
   }
 }
 
-const String USE_NEW_SOURCE_INFO =  '--use-new-source-info';
-const String DISABLE_INLINING = '--disable-inlining';
-
 /// Processor that computes [SourceMapInfo] for the JavaScript compiled for a
 /// given Dart file.
 class SourceMapProcessor {
@@ -312,19 +310,17 @@
     OutputProvider outputProvider = outputToFile
         ? new CloningOutputProvider(targetUri, sourceMapFileUri)
         : new OutputProvider();
-    if (options.contains(USE_NEW_SOURCE_INFO)) {
+    if (options.contains(Flags.useNewSourceInfo)) {
       if (verbose) print('Using the new source information system.');
-      useNewSourceInfo = true;
+    }
+    if (options.contains(Flags.disableInlining)) {
+      if (verbose) print('Inlining disabled');
     }
     api.CompilerImpl compiler = await compilerFor(
         outputProvider: outputProvider,
         // TODO(johnniwinther): Use [verbose] to avoid showing diagnostics.
         options: ['--out=$targetUri', '--source-map=$sourceMapFileUri']
             ..addAll(options));
-    if (options.contains(DISABLE_INLINING)) {
-      if (verbose) print('Inlining disabled');
-      compiler.disableInlining = true;
-    }
 
     JavaScriptBackend backend = compiler.backend;
     var handler = compiler.handler;
@@ -388,17 +384,22 @@
     }
 
     return new SourceMaps(
-        sourceFileManager, mainSourceMapInfo, elementSourceMapInfos);
+        compiler,
+        sourceFileManager,
+        mainSourceMapInfo,
+        elementSourceMapInfos);
   }
 }
 
 class SourceMaps {
+  final api.CompilerImpl compiler;
   final SourceFileManager sourceFileManager;
   // TODO(johnniwinther): Supported multiple output units.
   final SourceMapInfo mainSourceMapInfo;
   final Map<Element, SourceMapInfo> elementSourceMapInfos;
 
   SourceMaps(
+      this.compiler,
       this.sourceFileManager,
       this.mainSourceMapInfo,
           this.elementSourceMapInfos);
@@ -506,10 +507,10 @@
   /// Called when [node] defines a step of the given [kind] at the given
   /// [offset] when the generated JavaScript code.
   void onStep(js.Node node, Offset offset, StepKind kind) {
-    register('$kind', node);
+    register(kind, node);
   }
 
-  void register(String kind, js.Node node, {bool expectInfo: true}) {
+  void register(StepKind kind, js.Node node, {bool expectInfo: true}) {
 
     String dartCodeFromSourceLocation(SourceLocation sourceLocation) {
       SourceFile sourceFile =
@@ -556,7 +557,7 @@
 
 /// A JavaScript code point and its mapped dart source location.
 class CodePoint {
-  final String kind;
+  final StepKind kind;
   final String jsCode;
   final SourceLocation sourceLocation;
   final String dartCode;
diff --git a/tests/compiler/dart2js/sourcemaps/sourcemap_html_helper.dart b/tests/compiler/dart2js/sourcemaps/sourcemap_html_helper.dart
index 3ca926b..a3b10a8 100644
--- a/tests/compiler/dart2js/sourcemaps/sourcemap_html_helper.dart
+++ b/tests/compiler/dart2js/sourcemaps/sourcemap_html_helper.dart
@@ -27,10 +27,11 @@
   return input;
 }
 
+const int HUE_COUNT = 24;
+
 /// Returns the [index]th color for visualization.
 HSV toColor(int index) {
-  int hueCount = 24;
-  double h = 360.0 * (index % hueCount) / hueCount;
+  double h = 360.0 * (index % HUE_COUNT) / HUE_COUNT;
   double v = 1.0;
   double s = 0.5;
   return new HSV(h, s, v);
@@ -52,13 +53,19 @@
 
 /// Return the html for the [index] line number. If [width] is provided, shorter
 /// line numbers will be prefixed with spaces to match the width.
-String lineNumber(int index, {int width, bool useNbsp: false}) {
+String lineNumber(int index,
+                  {int width,
+                   bool useNbsp: false,
+                   String className}) {
+  if (className == null) {
+    className = 'lineNumber';
+  }
   String text = '${index + 1}';
   String padding = useNbsp ? '&nbsp;' : ' ';
   if (width != null && text.length < width) {
     text = (padding * (width - text.length)) + text;
   }
-  return '<span class="lineNumber">$text$padding</span>';
+  return '<span class="$className">$text$padding</span>';
 }
 
 /// Return the html escaped [text].
@@ -221,14 +228,6 @@
   }
 }
 
-class Annotation {
-  final id;
-  final int codeOffset;
-  final String title;
-
-  Annotation(this.id, this.codeOffset, this.title);
-}
-
 class ElementScheme {
   const ElementScheme();
 
@@ -280,14 +279,16 @@
   StringBuffer htmlBuffer = new StringBuffer();
   List<CodeLine> lines = convertAnnotatedCodeToCodeLines(
       code, annotations,
-      colorScheme: colorScheme,
-      elementScheme: elementScheme,
       windowSize: windowSize);
   int lineNoWidth;
   if (lines.isNotEmpty) {
     lineNoWidth = '${lines.last.lineNo + 1}'.length;
   }
-  HtmlPrintContext context = new HtmlPrintContext(lineNoWidth: lineNoWidth);
+  HtmlPrintContext context = new HtmlPrintContext(
+      lineNoWidth: lineNoWidth,
+      getAnnotationData: createAnnotationDataFunction(
+          colorScheme: colorScheme,
+          elementScheme: elementScheme));
   for (CodeLine line in lines) {
     line.printHtmlOn(htmlBuffer, context);
   }
@@ -297,34 +298,42 @@
 List<CodeLine> convertAnnotatedCodeToCodeLines(
     String code,
     Iterable<Annotation> annotations,
-    {CssColorScheme colorScheme: const SingleColorScheme(),
-     ElementScheme elementScheme: const ElementScheme(),
-     int windowSize}) {
+    {int startLine,
+     int endLine,
+     int windowSize,
+     Uri uri}) {
 
   List<CodeLine> lines = <CodeLine>[];
   CodeLine currentLine;
+  final List<Annotation> currentAnnotations = <Annotation>[];
   int offset = 0;
   int lineIndex = 0;
   int firstLine;
   int lastLine;
-  bool pendingSourceLocationsEnd = false;
 
-  void write(String code, HtmlPart html) {
+  void addCode(String code) {
     if (currentLine != null) {
       currentLine.codeBuffer.write(code);
-      currentLine.htmlParts.add(html);
+      currentLine.codeParts.add(
+          new CodePart(currentAnnotations.toList(), code));
+      currentAnnotations.clear();
     }
   }
 
-  void startLine(int currentOffset) {
-    lines.add(currentLine = new CodeLine(lines.length, currentOffset));
+  void addAnnotations(List<Annotation> annotations) {
+    currentAnnotations.addAll(annotations);
+    currentLine.annotations.addAll(annotations);
+  }
+
+  void beginLine(int currentOffset) {
+    lines.add(currentLine =
+        new CodeLine(lines.length, currentOffset, uri: uri));
   }
 
   void endCurrentLocation() {
-    if (pendingSourceLocationsEnd) {
-      write('', const ConstHtmlPart('</a>'));
+    if (currentAnnotations.isNotEmpty) {
+      addCode('');
     }
-    pendingSourceLocationsEnd = false;
   }
 
   void addSubstring(int until, {bool isFirst: false, bool isLast: false}) {
@@ -339,26 +348,15 @@
     }
     int localOffset = 0;
     if (isFirst) {
-      startLine(offset + localOffset);
+      beginLine(offset + localOffset);
     }
     for (String line in substring.split('\n')) {
       if (!first) {
         endCurrentLocation();
-        write('', const NewLine());
         lineIndex++;
-        startLine(offset + localOffset);
+        beginLine(offset + localOffset);
       }
-      if (pendingSourceLocationsEnd && !colorScheme.showLocationAsSpan) {
-        if (line.isNotEmpty) {
-          String before = line.substring(0, 1);
-          write(before, new HtmlText(before));
-          endCurrentLocation();
-          String after = line.substring(1);
-          write(after, new HtmlText(after));
-        }
-      } else {
-        write(line, new HtmlText(line));
-      }
+      addCode(line);
       first = false;
       localOffset += line.length + 1;
     }
@@ -370,44 +368,7 @@
 
   void insertAnnotations(List<Annotation> annotations) {
     endCurrentLocation();
-
-    String color;
-    var id;
-    String title;
-    if (annotations.length == 1) {
-      Annotation annotation = annotations.single;
-      if (annotation != null) {
-        id = annotation.id;
-        color = colorScheme.singleLocationToCssColor(id);
-        title = annotation.title;
-      }
-    } else {
-      id = annotations.first.id;
-      List ids = [];
-      for (Annotation annotation in annotations) {
-        ids.add(annotation.id);
-      }
-      color = colorScheme.multiLocationToCssColor(ids);
-      title = annotations.map((l) => l.title).join(',');
-    }
-    if (id != null) {
-      Set ids = annotations.map((l) => l.id).toSet();
-      String name = elementScheme.getName(id, ids);
-      String href = elementScheme.getHref(id, ids);
-      String onclick = elementScheme.onClick(id, ids);
-      String onmouseover = elementScheme.onMouseOver(id, ids);
-      String onmouseout = elementScheme.onMouseOut(id, ids);
-      write('', new AnchorHtmlPart(
-          color: color,
-          name: name,
-          href: href,
-          title: title,
-          onclick: onclick,
-          onmouseover: onmouseover,
-          onmouseout: onmouseout));
-      pendingSourceLocationsEnd = true;
-    }
-    currentLine.annotations.addAll(annotations);
+    addAnnotations(annotations);
     if (annotations.last == null) {
       endCurrentLocation();
     }
@@ -430,8 +391,8 @@
   addSubstring(code.length, isFirst: first, isLast: true);
   endCurrentLocation();
 
-  int start = 0;
-  int end = lines.length - 1;
+  int start = startLine ?? 0;
+  int end = endLine ?? lines.length - 1;
   if (windowSize != null) {
     start = Math.max(firstLine - windowSize, start);
     end = Math.min(lastLine + windowSize, end);
diff --git a/tests/compiler/dart2js/sourcemaps/sourcemap_html_templates.dart b/tests/compiler/dart2js/sourcemaps/sourcemap_html_templates.dart
index 29adff1..6d0bcb2 100644
--- a/tests/compiler/dart2js/sourcemaps/sourcemap_html_templates.dart
+++ b/tests/compiler/dart2js/sourcemaps/sourcemap_html_templates.dart
@@ -165,6 +165,9 @@
 h3 {
   cursor: pointer;
 }
+.line {
+  margin: 0px;
+}
 .lineNumber {
   font-size: smaller;
   color: #888;
diff --git a/tests/compiler/dart2js/type_checker_test.dart b/tests/compiler/dart2js/type_checker_test.dart
index 9406ea9..446062f 100644
--- a/tests/compiler/dart2js/type_checker_test.dart
+++ b/tests/compiler/dart2js/type_checker_test.dart
@@ -26,10 +26,11 @@
 import 'package:compiler/src/util/util.dart';
 
 import 'mock_compiler.dart';
+import 'options_helper.dart';
 import 'parser_helper.dart';
 
 final MessageKind NOT_ASSIGNABLE = MessageKind.NOT_ASSIGNABLE;
-final MessageKind MEMBER_NOT_FOUND = MessageKind.MEMBER_NOT_FOUND;
+final MessageKind UNDEFINED_GETTER = MessageKind.UNDEFINED_GETTER;
 
 main() {
   List tests = [testSimpleTypes,
@@ -126,7 +127,7 @@
 //        "for (String s in strings) {} }");
 //  check("{ List<int> ints = [1,2,3]; for (String s in ints) {} }",
 //        NOT_ASSIGNABLE);
-//  check("for (String s in true) {}", MessageKind.METHOD_NOT_FOUND);
+//  check("for (String s in true) {}", MessageKind.UNDEFINED_METHOD);
 }
 
 
@@ -214,13 +215,13 @@
 
   analyzeIn(compiler, method, """{ 
       for (var e in new HasNoIterator()) {} 
-  }""", warnings: MessageKind.MEMBER_NOT_FOUND);
+  }""", warnings: MessageKind.UNDEFINED_GETTER);
   analyzeIn(compiler, method, """{ 
       for (String e in new HasNoIterator()) {} 
-  }""", warnings: MessageKind.MEMBER_NOT_FOUND);
+  }""", warnings: MessageKind.UNDEFINED_GETTER);
   analyzeIn(compiler, method, """{ 
       for (int e in new HasNoIterator()) {} 
-  }""", warnings: MessageKind.MEMBER_NOT_FOUND);
+  }""", warnings: MessageKind.UNDEFINED_GETTER);
 
   analyzeIn(compiler, method, """{ 
       for (var e in new HasCustomIntIterator()) {} 
@@ -234,13 +235,13 @@
 
   analyzeIn(compiler, method, """{ 
       for (var e in new HasCustomNoCurrentIterator()) {} 
-  }""", hints: MessageKind.MEMBER_NOT_FOUND);
+  }""", hints: MessageKind.UNDEFINED_GETTER);
   analyzeIn(compiler, method, """{ 
       for (String e in new HasCustomNoCurrentIterator()) {} 
-  }""", hints: MessageKind.MEMBER_NOT_FOUND);
+  }""", hints: MessageKind.UNDEFINED_GETTER);
   analyzeIn(compiler, method, """{ 
       for (int e in new HasCustomNoCurrentIterator()) {} 
-  }""", hints: MessageKind.MEMBER_NOT_FOUND);
+  }""", hints: MessageKind.UNDEFINED_GETTER);
 
   analyzeIn(compiler, method, """{ 
       var localDyn; 
@@ -573,22 +574,22 @@
     check("{ var i = 1 ${op} 2; }");
     check("{ var i = 1; i ${op}= 2; }");
     check("{ int i; var j = (i = true) ${op} 2; }",
-          warnings: [NOT_ASSIGNABLE, MessageKind.OPERATOR_NOT_FOUND]);
+          warnings: [NOT_ASSIGNABLE, MessageKind.UNDEFINED_OPERATOR]);
     check("{ int i; var j = 1 ${op} (i = true); }",
           warnings: [NOT_ASSIGNABLE, NOT_ASSIGNABLE]);
   }
   for (final op in ['-', '~']) {
     check("{ var i = ${op}1; }");
     check("{ int i; var j = ${op}(i = true); }",
-          warnings: [NOT_ASSIGNABLE, MessageKind.OPERATOR_NOT_FOUND]);
+          warnings: [NOT_ASSIGNABLE, MessageKind.UNDEFINED_OPERATOR]);
   }
   for (final op in ['++', '--']) {
     check("{ int i = 1; int j = i${op}; }");
     check("{ int i = 1; bool j = i${op}; }", warnings: NOT_ASSIGNABLE);
     check("{ bool b = true; bool j = b${op}; }",
-          warnings: MessageKind.OPERATOR_NOT_FOUND);
+          warnings: MessageKind.UNDEFINED_OPERATOR);
     check("{ bool b = true; int j = ${op}b; }",
-          warnings: MessageKind.OPERATOR_NOT_FOUND);
+          warnings: MessageKind.UNDEFINED_OPERATOR);
   }
   for (final op in ['||', '&&']) {
     check("{ bool b = (true ${op} false); }");
@@ -600,7 +601,7 @@
     check("{ bool b = 1 ${op} 2; }");
     check("{ int i = 1 ${op} 2; }", warnings: NOT_ASSIGNABLE);
     check("{ int i; bool b = (i = true) ${op} 2; }",
-          warnings: [NOT_ASSIGNABLE, MessageKind.OPERATOR_NOT_FOUND]);
+          warnings: [NOT_ASSIGNABLE, MessageKind.UNDEFINED_OPERATOR]);
     check("{ int i; bool b = 1 ${op} (i = true); }",
           warnings: [NOT_ASSIGNABLE, NOT_ASSIGNABLE]);
   }
@@ -1005,9 +1006,9 @@
     check(c, "(e)();");
     check(c, "(e)(1);");
     check(c, "(e)('string');");
-    check(c, "(foo)();", MEMBER_NOT_FOUND);
-    check(c, "(foo)(1);", MEMBER_NOT_FOUND);
-    check(c, "(foo)('string');", MEMBER_NOT_FOUND);
+    check(c, "(foo)();", UNDEFINED_GETTER);
+    check(c, "(foo)(1);", UNDEFINED_GETTER);
+    check(c, "(foo)('string');", UNDEFINED_GETTER);
 
     // Invocations on function expressions.
     check(c, "(foo){}();", MessageKind.MISSING_ARGUMENT);
@@ -1028,11 +1029,11 @@
     check(c, "int k = staticMethod('string');");
     check(c, "String k = staticMethod('string');",
           NOT_ASSIGNABLE);
-    check(d, "staticMethod();", MessageKind.METHOD_NOT_FOUND);
-    check(d, "staticMethod(1);", MessageKind.METHOD_NOT_FOUND);
-    check(d, "staticMethod('string');", MessageKind.METHOD_NOT_FOUND);
-    check(d, "int k = staticMethod('string');", MessageKind.METHOD_NOT_FOUND);
-    check(d, "String k = staticMethod('string');", MessageKind.METHOD_NOT_FOUND);
+    check(d, "staticMethod();", MessageKind.UNDEFINED_METHOD);
+    check(d, "staticMethod(1);", MessageKind.UNDEFINED_METHOD);
+    check(d, "staticMethod('string');", MessageKind.UNDEFINED_METHOD);
+    check(d, "int k = staticMethod('string');", MessageKind.UNDEFINED_METHOD);
+    check(d, "String k = staticMethod('string');", MessageKind.UNDEFINED_METHOD);
 
     // Invocation on dynamic variable.
     check(c, "e.foo();");
@@ -1040,12 +1041,12 @@
     check(c, "e.foo('string');");
 
     // Invocation on unresolved variable.
-    check(c, "foo();", MessageKind.METHOD_NOT_FOUND);
-    check(c, "foo(1);", MessageKind.METHOD_NOT_FOUND);
-    check(c, "foo('string');", MessageKind.METHOD_NOT_FOUND);
-    check(c, "foo(a: 'string');", MessageKind.METHOD_NOT_FOUND);
+    check(c, "foo();", MessageKind.UNDEFINED_METHOD);
+    check(c, "foo(1);", MessageKind.UNDEFINED_METHOD);
+    check(c, "foo('string');", MessageKind.UNDEFINED_METHOD);
+    check(c, "foo(a: 'string');", MessageKind.UNDEFINED_METHOD);
     check(c, "foo(a: localMethod(1));",
-          [MessageKind.METHOD_NOT_FOUND, NOT_ASSIGNABLE]);
+          [MessageKind.UNDEFINED_METHOD, NOT_ASSIGNABLE]);
   });
 }
 
@@ -1526,13 +1527,13 @@
   analyzeIn(compiler, method, "{ int type = T; }", warnings: NOT_ASSIGNABLE);
 
   analyzeIn(compiler, method, "{ String typeName = T.toString(); }");
-  analyzeIn(compiler, method, "{ T.foo; }", warnings: MEMBER_NOT_FOUND);
+  analyzeIn(compiler, method, "{ T.foo; }", warnings: UNDEFINED_GETTER);
   analyzeIn(compiler, method, "{ T.foo = 0; }",
-      warnings: MessageKind.SETTER_NOT_FOUND);
+      warnings: MessageKind.UNDEFINED_SETTER);
   analyzeIn(compiler, method, "{ T.foo(); }",
-      warnings: MessageKind.METHOD_NOT_FOUND);
+      warnings: MessageKind.UNDEFINED_METHOD);
   analyzeIn(compiler, method, "{ T + 1; }",
-      warnings: MessageKind.OPERATOR_NOT_FOUND);
+      warnings: MessageKind.UNDEFINED_OPERATOR);
 }
 
 void testTypeVariableLookup1(MockCompiler compiler) {
@@ -1566,10 +1567,10 @@
   test('s.getter');
 
   test('t.toString');
-  test('t.field', MEMBER_NOT_FOUND);
-  test('t.method(1)', MessageKind.METHOD_NOT_FOUND);
-  test('t + t', MessageKind.OPERATOR_NOT_FOUND);
-  test('t.getter', MEMBER_NOT_FOUND);
+  test('t.field', UNDEFINED_GETTER);
+  test('t.method(1)', MessageKind.UNDEFINED_METHOD);
+  test('t + t', MessageKind.UNDEFINED_OPERATOR);
+  test('t.getter', UNDEFINED_GETTER);
 
   test('s.field = "hest"', NOT_ASSIGNABLE);
   test('s.method("hest")', NOT_ASSIGNABLE);
@@ -1623,10 +1624,10 @@
   }
 
   test('s.toString');
-  test('s.field', MEMBER_NOT_FOUND);
-  test('s.method(1)', MessageKind.METHOD_NOT_FOUND);
-  test('s + s', MessageKind.OPERATOR_NOT_FOUND);
-  test('s.getter', MEMBER_NOT_FOUND);
+  test('s.field', UNDEFINED_GETTER);
+  test('s.method(1)', MessageKind.UNDEFINED_METHOD);
+  test('s + s', MessageKind.UNDEFINED_OPERATOR);
+  test('s.getter', UNDEFINED_GETTER);
 }
 
 void testFunctionTypeLookup(MockCompiler compiler) {
@@ -1636,8 +1637,8 @@
 
   check('(int f(int)) => f.toString;');
   check('(int f(int)) => f.toString();');
-  check('(int f(int)) => f.foo;', warnings: MEMBER_NOT_FOUND);
-  check('(int f(int)) => f.foo();', warnings: MessageKind.METHOD_NOT_FOUND);
+  check('(int f(int)) => f.foo;', warnings: UNDEFINED_GETTER);
+  check('(int f(int)) => f.foo();', warnings: MessageKind.UNDEFINED_METHOD);
 }
 
 void testTypedefLookup(MockCompiler compiler) {
@@ -1648,8 +1649,8 @@
   compiler.parseScript("typedef int F(int);");
   check('(F f) => f.toString;');
   check('(F f) => f.toString();');
-  check('(F f) => f.foo;', warnings: MEMBER_NOT_FOUND);
-  check('(F f) => f.foo();', warnings: MessageKind.METHOD_NOT_FOUND);
+  check('(F f) => f.foo;', warnings: UNDEFINED_GETTER);
+  check('(F f) => f.foo();', warnings: MessageKind.UNDEFINED_METHOD);
 }
 
 void testTypeLiteral(MockCompiler compiler) {
@@ -1683,11 +1684,11 @@
 
   // Check static property access.
   check('m() => Class.field;');
-  check('m() => (Class).field;', warnings: MEMBER_NOT_FOUND);
+  check('m() => (Class).field;', warnings: UNDEFINED_GETTER);
 
   // Check static method access.
   check('m() => Class.method();');
-  check('m() => (Class).method();', warnings: MessageKind.METHOD_NOT_FOUND);
+  check('m() => (Class).method();', warnings: MessageKind.UNDEFINED_METHOD);
 
   // Check access in invocation.
   check('m() => Class();', warnings: MessageKind.NOT_CALLABLE);
@@ -1956,8 +1957,9 @@
   check("int v = c.overriddenField;");
   check("c.overriddenField = 0;");
   check("int v = c.getterField;");
-  check("c.getterField = 0;", MessageKind.SETTER_NOT_FOUND);
-  check("int v = c.setterField;", MessageKind.GETTER_NOT_FOUND);
+  check("c.getterField = 0;", MessageKind.UNDEFINED_SETTER);
+  check("int v = c.setterField;",
+      MessageKind.UNDEFINED_INSTANCE_GETTER_BUT_SETTER);
   check("c.setterField = 0;");
 
   check("int v = gc.overriddenField;");
@@ -1965,13 +1967,14 @@
   check("int v = gc.setterField;");
   check("gc.setterField = 0;");
   check("int v = gc.getterField;");
-  check("gc.getterField = 0;", MessageKind.SETTER_NOT_FOUND);
+  check("gc.getterField = 0;", MessageKind.UNDEFINED_SETTER);
 
   check("int v = sc.overriddenField;");
   check("sc.overriddenField = 0;");
   check("int v = sc.getterField;");
   check("sc.getterField = 0;");
-  check("int v = sc.setterField;", MessageKind.GETTER_NOT_FOUND);
+  check("int v = sc.setterField;",
+      MessageKind.UNDEFINED_INSTANCE_GETTER_BUT_SETTER);
   check("sc.setterField = 0;");
 }
 
@@ -2012,7 +2015,7 @@
             if (a is C) {
               var x = a.c;
             }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [MessageKind.NOT_MORE_SPECIFIC_SUBTYPE],
         infos: []);
 
@@ -2021,8 +2024,8 @@
             if (a is C) {
               var x = '${a.c}${a.c}';
             }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND,
-                   MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER,
+                   MessageKind.UNDEFINED_GETTER],
         hints: [MessageKind.NOT_MORE_SPECIFIC_SUBTYPE],
         infos: []);
 
@@ -2031,8 +2034,8 @@
             if (a is C) {
               var x = '${a.d}${a.d}'; // Type promotion wouldn't help.
             }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND,
-                   MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER,
+                   MessageKind.UNDEFINED_GETTER],
         hints: [],
         infos: []);
 
@@ -2041,7 +2044,7 @@
            if (d is E) { // Suggest E<int>.
              var x = d.e;
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [checkMessage(MessageKind.NOT_MORE_SPECIFIC_SUGGESTION,
                              {'shownTypeSuggestion': 'E<int>'})],
         infos: []);
@@ -2051,7 +2054,7 @@
            if (d is F) { // Suggest F<int, dynamic>.
              var x = d.f;
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [checkMessage(MessageKind.NOT_MORE_SPECIFIC_SUGGESTION,
                              {'shownTypeSuggestion': 'F<int, dynamic>'})],
         infos: []);
@@ -2061,7 +2064,7 @@
            if (d is G) { // Suggest G<int>.
              var x = d.f;
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [checkMessage(MessageKind.NOT_MORE_SPECIFIC_SUGGESTION,
                              {'shownTypeSuggestion': 'G<int>'})],
         infos: []);
@@ -2071,7 +2074,7 @@
            if (f is G) { // Cannot suggest a more specific type.
              var x = f.g;
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [MessageKind.NOT_MORE_SPECIFIC],
         infos: []);
 
@@ -2080,7 +2083,7 @@
            if (d is E) {
              var x = d.f; // Type promotion wouldn't help.
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [],
         infos: []);
 
@@ -2090,7 +2093,7 @@
              a = null;
              var x = a.b;
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [MessageKind.POTENTIAL_MUTATION],
         infos: [MessageKind.POTENTIAL_MUTATION_HERE]);
 
@@ -2100,7 +2103,7 @@
              a = null;
              var x = a.c; // Type promotion wouldn't help.
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [],
         infos: []);
 
@@ -2110,7 +2113,7 @@
            if (a is B) {
              var x = a.b;
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [MessageKind.POTENTIAL_MUTATION_IN_CLOSURE],
         infos: [MessageKind.POTENTIAL_MUTATION_IN_CLOSURE_HERE]);
 
@@ -2120,7 +2123,7 @@
            if (a is B) {
              var x = a.c; // Type promotion wouldn't help.
            }''',
-        warnings: [MessageKind.MEMBER_NOT_FOUND],
+        warnings: [MessageKind.UNDEFINED_GETTER],
         hints: [],
         infos: []);
 
@@ -2131,7 +2134,7 @@
              var y = a.b;
            }
            a = new A();''',
-      warnings: [MessageKind.MEMBER_NOT_FOUND],
+      warnings: [MessageKind.UNDEFINED_GETTER],
       hints: [MessageKind.ACCESSED_IN_CLOSURE],
       infos: [MessageKind.ACCESSED_IN_CLOSURE_HERE,
               MessageKind.POTENTIAL_MUTATION_HERE]);
@@ -2143,7 +2146,7 @@
              var y = a.c; // Type promotion wouldn't help.
            }
            a = new A();''',
-      warnings: [MessageKind.MEMBER_NOT_FOUND],
+      warnings: [MessageKind.UNDEFINED_GETTER],
       hints: [],
       infos: []);
 }
@@ -2197,7 +2200,7 @@
   check('new A().b..b;');
 
   check('new A().b..a;',
-        warnings: MEMBER_NOT_FOUND);
+        warnings: UNDEFINED_GETTER);
 
   check('B b = new A().b..c;');
 
@@ -2553,7 +2556,7 @@
   Token tokens = scan(text);
   NodeListener listener = new NodeListener(
       const ScannerOptions(), compiler.reporter, null);
-  Parser parser = new Parser(listener);
+  Parser parser = new Parser(listener, new MockParserOptions());
   parser.parseStatement(tokens);
   Node node = listener.popNode();
   Element compilationUnit =
@@ -2599,7 +2602,7 @@
   Token tokens = scan(text);
   NodeListener listener = new NodeListener(
       const ScannerOptions(), compiler.reporter, null);
-  Parser parser = new Parser(listener,
+  Parser parser = new Parser(listener, new MockParserOptions(),
       asyncAwaitKeywordsEnabled: element.asyncMarker != AsyncMarker.SYNC);
   parser.parseStatement(tokens);
   Node node = listener.popNode();
diff --git a/tests/compiler/dart2js/type_test_helper.dart b/tests/compiler/dart2js/type_test_helper.dart
index fc04a58..1e20ba7 100644
--- a/tests/compiler/dart2js/type_test_helper.dart
+++ b/tests/compiler/dart2js/type_test_helper.dart
@@ -62,6 +62,7 @@
       collector = new memory.DiagnosticCollector();
       uri = Uri.parse('memory:main.dart');
       compiler = memory.compilerFor(
+          entryPoint: uri,
           memorySourceFiles: {'main.dart': source},
           diagnosticHandler: collector,
           options: stopAfterTypeInference
diff --git a/tests/compiler/dart2js/unparser2_test.dart b/tests/compiler/dart2js/unparser2_test.dart
index 8ede8c9..7053e6a 100644
--- a/tests/compiler/dart2js/unparser2_test.dart
+++ b/tests/compiler/dart2js/unparser2_test.dart
@@ -19,6 +19,8 @@
          LibraryElementX;
 import "package:compiler/src/script.dart";
 
+import "options_helper.dart";
+
 main() {
   testClassDef();
   testClass1Field();
@@ -84,7 +86,6 @@
   Expect.equals(expectedResult, doUnparse(code));
 }
 
-
 String doUnparse(String source) {
   MessageCollector diagnosticListener = new MessageCollector();
   Script script = new Script(null, null, null);
@@ -94,7 +95,7 @@
   Token beginToken = scanner.tokenize();
   NodeListener listener = new NodeListener(
       const ScannerOptions(), diagnosticListener, element);
-  Parser parser = new Parser(listener);
+  Parser parser = new Parser(listener, new MockParserOptions());
   parser.parseUnit(beginToken);
   Node node = listener.popNode();
   Expect.isTrue(listener.nodes.isEmpty);
diff --git a/tests/compiler/dart2js/value_range2_test.dart b/tests/compiler/dart2js/value_range2_test.dart
index 803ab05..d14311b 100644
--- a/tests/compiler/dart2js/value_range2_test.dart
+++ b/tests/compiler/dart2js/value_range2_test.dart
@@ -3,7 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import "package:compiler/src/ssa/ssa.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(const JavaScriptConstantSystem());
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index 1399e79..bde5681 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -69,3 +69,18 @@
 
 [ $compiler == dart2js && $cps_ir ]
 async_stacktrace_test/asyncStar: Crash # (foo()async*{try {tr...  cannot handle sync*/async* functions
+
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # `assert` not implemented, 75% of the tests fail.
+
+[ $compiler == dart2js && $runtime == chrome && $system == windows ]
+class_test: Pass, Slow # Issue 25940
+consistent_codeUnitAt_error_test: Pass, Slow # Issue 25940
+closure_capture3_test: Pass, Slow # Issue 25940
+deferred_split_test: Pass, Slow # Issue 25940
+closure_capture5_test: Pass, Slow # Issue 25940
+conditional_test: Pass, Slow # Issue 25940
+constant_javascript_semantics2_test: Pass, Slow # Issue 25940
+
+[ $compiler == dart2js && $runtime == ff && $system == windows ]
+consistent_index_error_string_test: Pass, Slow # Issue 25940
diff --git a/tests/compiler/dart2js_native/dart2js_native.status b/tests/compiler/dart2js_native/dart2js_native.status
index 3a172de..28abf25 100644
--- a/tests/compiler/dart2js_native/dart2js_native.status
+++ b/tests/compiler/dart2js_native/dart2js_native.status
@@ -24,4 +24,6 @@
 foreign_test: RuntimeError # Expect.equals(expected: <1234567891011>, actual: <1234567891011>) fails.
 native_exception_test: RuntimeError # Issue 24421
 optimization_hints_test: RuntimeError # Please triage this failure.
-subclassing_constructor_2_test: RuntimeError # Please triage this failure.
+
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # `assert` not implemented, 75% of the tests fail.
diff --git a/tests/corelib/big_integer_arith_vm_test.dart b/tests/corelib/big_integer_arith_vm_test.dart
index 49e6e0d..b9696b4 100644
--- a/tests/corelib/big_integer_arith_vm_test.dart
+++ b/tests/corelib/big_integer_arith_vm_test.dart
@@ -5,7 +5,7 @@
 // Testing Bigints with and without intrinsics.
 // VMOptions=
 // VMOptions=--no_intrinsify
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 library big_integer_test;
 import "package:expect/expect.dart";
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index 52a0522..fe92613 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -107,9 +107,7 @@
 [ $compiler == dart2js && $runtime == chromeOnAndroid ]
 list_as_map_test: Pass, Slow # TODO(kasperl): Please triage.
 
-[ $compiler == dart2js && ($runtime == firefox || $runtime == safari || $runtime == chrome || $runtime == drt) ]
-
-[ $compiler == dart2js && ($runtime == safari || $runtime == safarimobilesim) ]
+[ $compiler == dart2js && $runtime == safarimobilesim ]
 string_split_test: RuntimeError # Issue 21431
 
 [ $compiler == dart2js && $runtime == safarimobilesim ]
@@ -161,7 +159,7 @@
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ]
 regexp/global_test: Skip # Timeout. Issue 21709 and 21708
 
-[ $runtime != vm && $runtime != dart_precompiled && $compiler != dart2analyzer]
+[ $runtime != vm && $runtime != dart_precompiled && $runtime != dart_product && $compiler != dart2analyzer]
 data_resource_test: RuntimeError # Issue 23825 (not implemented yet).
 file_resource_test: Skip, OK # VM specific test, uses dart:io.
 http_resource_test: Skip, OK # VM specific test, uses dart:io.
@@ -181,22 +179,32 @@
 regexp/pcre_test: Crash # Stack Overflow in LoopHierarchy.
 core_runtime_types_test: Pass, RuntimeError # Issue 25795.
 
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # Issue 25761
+
 [ $compiler == dart2js && $cps_ir && $host_checked ]
 regexp/pcre_test: Crash # Stack Overflow
+collection_removes_test: Crash # Issue 25911
+
+[ $compiler == dart2js && $host_checked ]
+package_resource_test: Crash # Issue 25911
 
 [ $noopt || $compiler == precompiler ]
 # Stacktraces in precompilation omit inlined frames.
 stacktrace_current_test: Pass, RuntimeError
 error_stack_trace1_test: Pass, RuntimeError
 
+[ $noopt || $compiler == precompiler || $mode == product ]
+apply3_test: SkipByDesign # Imports dart:mirrors
+
 [ $noopt || $compiler == precompiler ]
-apply3_test: CompileTimeError # Imports dart:mirrors
 regexp/stack-overflow_test: RuntimeError, OK # Smaller limit with irregex interpreter
 big_integer_huge_mul_vm_test: Pass, Timeout # --no_intrinsify
 big_integer_parsed_mul_div_vm_test: Pass, Timeout # --no_intrinsify
 int_parse_radix_test: Pass, Timeout # --no_intrinsify
 
-[ $runtime == dart_product ]
+[ $compiler == precompiler || $runtime == dart_product ]
 data_resource_test: Skip # Resolve URI not supported yet in product mode.
 package_resource_test: Skip # Resolve URI not supported yet in product mode.
-apply3_test: SkipByDesign # Imports dart:mirrors
+file_resource_test: Skip # Resolve URI not supported yet in product mode.
+http_resource_test: Skip # Resolve URI not supported yet in product mode.
\ No newline at end of file
diff --git a/tests/corelib/double_parse_test.dart b/tests/corelib/double_parse_test.dart
index 6f7e8fb..9ea4569 100644
--- a/tests/corelib/double_parse_test.dart
+++ b/tests/corelib/double_parse_test.dart
@@ -1,6 +1,8 @@
 // Copyright (c) 2014 the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--no-use-field-guards
+// VMOptions=
 
 import "dart:math" show pow;
 import "package:expect/expect.dart";
diff --git a/tests/corelib/num_sign_test.dart b/tests/corelib/num_sign_test.dart
index d2ee968..3976f76 100644
--- a/tests/corelib/num_sign_test.dart
+++ b/tests/corelib/num_sign_test.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.
 // Test num.clamp.
+// VMOptions=--no-use-field-guards
+// VMOptions=
 
 import "package:expect/expect.dart";
 
diff --git a/tests/corelib/regress_r21715_test.dart b/tests/corelib/regress_r21715_test.dart
index cfbcef1..5a0ef73 100644
--- a/tests/corelib/regress_r21715_test.dart
+++ b/tests/corelib/regress_r21715_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.
 
-// VMOptions=--optimization_counter_threshold=5
+// VMOptions=--optimization_counter_threshold=5 --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/html/canvasrenderingcontext2d_test.dart b/tests/html/canvasrenderingcontext2d_test.dart
index ffd8b8d..6d87a64 100644
--- a/tests/html/canvasrenderingcontext2d_test.dart
+++ b/tests/html/canvasrenderingcontext2d_test.dart
@@ -688,7 +688,9 @@
       expectPixelFilled(x + 10, y);
 
       // The box does not draw after `width` pixels.
-      expectPixelFilled(x + width - 1, y);
+      // Check -2 rather than -1 because this seems
+      // to run into a rounding error on Mac bots.
+      expectPixelFilled(x + width - 2, y);
       expectPixelUnfilled(x + width + 1, y);
     });
 
@@ -709,7 +711,9 @@
       expectPixelFilled(x + 10, y);
 
       // The box does not draw after `width` pixels.
-      expectPixelFilled(x + width - 1, y);
+      // Check -2 rather than -1 because this seems
+      // to run into a rounding error on Mac bots.
+      expectPixelFilled(x + width - 2, y);
       expectPixelUnfilled(x + width + 1, y);
     });
 
diff --git a/tests/html/element_animate_test.dart b/tests/html/element_animate_test.dart
index 31becda..10477c9 100644
--- a/tests/html/element_animate_test.dart
+++ b/tests/html/element_animate_test.dart
@@ -14,7 +14,7 @@
 
   group('animate_supported', () {
     test('supported', () {
-      expect(AnimationPlayer.supported, true);
+      expect(Animation.supported, isTrue);
     });
   });
 
@@ -24,7 +24,7 @@
       var opacity = num.parse(body.getComputedStyle().opacity);
       body.animate([{"opacity": 100}, {"opacity": 0}], 100);
       var newOpacity = num.parse(body.getComputedStyle().opacity);
-      expect(newOpacity < opacity, isTrue);
+      expect(newOpacity == opacity, isTrue);
     });
   });
 
diff --git a/tests/html/html.status b/tests/html/html.status
index 1facc17..4beb9f4 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -7,21 +7,16 @@
 
 [ $compiler == none && ($runtime == dartium || $runtime == drt) ]
 
-js_array_test: Skip # Dartium JSInterop failure
 mirrors_js_typed_interop_test: Fail # Missing expected failure (Issue 25044)
 js_typed_interop_side_cast_exp_test: Fail, OK # tests dart2js-specific behavior.
 
-cross_domain_iframe_test: RuntimeError # Dartium JSInterop failure
-indexeddb_2_test: Fail # Dartium JSInterop failure. Identity preservation on array deferred copy.
-js_test/transferrables: RuntimeError # Dartium JSInterop failure
-js_test/JsArray: RuntimeError # Dartium JSInterop failure
 native_gc_test: Skip # Dartium JSInterop failure
-transferables_test: RuntimeError # Dartium JSInterop failure
 
 [ $compiler == none && ($runtime == drt || $runtime == dartium ) ]
 worker_api_test: Fail # Issue 10223
 resource_http_test: Fail # Issue 24203
 js_function_getter_trust_types_test: Skip # dartium doesn't support trust types.
+websocket_test/supported: Skip # Dartium 45 roll timesout
 
 [ $compiler == none && $mode == debug && ($runtime == drt || $runtime == dartium ) ]
 datalistelement_test: Skip # Issue 20540
@@ -30,6 +25,8 @@
 input_element_test/attributes: Fail # Issue 21555
 wrapping_collections_test: SkipByDesign # Testing an issue that is only relevant to Dartium
 js_typed_interop_default_arg_test/default_value: MissingCompileTimeError # Issue #25759
+mirrors_js_typed_interop_test: Pass, Slow
+
 
 [ $compiler == dart2js && $checked ]
 js_function_getter_trust_types_test: Skip # --trust-type-annotations incompatible with --checked
@@ -44,6 +41,7 @@
 [ $compiler == dart2js && $browser ]
 custom/created_callback_test: Fail # Support for created constructor. Issue 14835
 fontface_loaded_test: Fail # Support for promises.
+js_test/JsArray: RuntimeError # Issue 26197
 
 [ $compiler == dart2js && ($runtime == safari || $runtime == safarimobilesim || $runtime == ff  || $ie) ]
 custom/entered_left_view_test/viewless_document: Fail # Polyfill does not handle this
@@ -63,6 +61,9 @@
 async_test: RuntimeError, OK  # Uses Isolate.spawn.
 isolates_test: RuntimeError, OK  # Uses Isolate.spawn.
 
+[ $compiler == none && ($runtime == drt || $runtime == dartium ) && $checked]
+cross_domain_iframe_test: RuntimeError # Issue 26134
+
 [ $compiler == none && ($runtime == drt || $runtime == dartium ) && $mode == debug ]
 websocket_test/websocket: Skip # Issue 17666
 canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Skip # Issue 17666
@@ -103,28 +104,18 @@
 
 [ $runtime == chrome ]
 touchevent_test/supported: Fail # Touch events are only supported on touch devices
-element_animate_test/simple_timing: RuntimeError # Please triage this failure
 element_types_test/supported_object: RuntimeError # Issue 25155
 element_types_test/supported_embed: RuntimeError # Issue 25155
 svgelement_test/PathElement: RuntimeError # Issue 25665
 
-[ $runtime == chrome && $cps_ir == false ]
-element_animate_test/omit_timing: RuntimeError # Also timing out on MacOS. Issue 23507
-element_animate_test/timing_dict: RuntimeError # Also timing out on MacOS. Issue 23507
-
 [ $runtime == chrome && $system == macos ]
 canvasrenderingcontext2d_test/drawImage_video_element: Skip # Times out. Please triage this failure.
 canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Skip # Times out. Please triage this failure.
-element_animate_test/omit_timing: Skip # Timing out on MacOS. Issue 23507
-element_animate_test/timing_dict: Skip # Timing out on MacOS. Issue 23507
 transition_event_test/functional: Skip # Times out. Issue 22167
 request_animation_frame_test: Skip # Times out. Issue 22167
 
 [$runtime == drt || $runtime == dartium || $runtime == chrome || $runtime == chromeOnAndroid ]
 webgl_1_test: Pass, Fail # Issue 8219
-element_animate_test/omit_timing: RuntimeError # Dartium 45 roll. Issue 25786
-element_animate_test/simple_timing: RuntimeError # Dartium 45 roll. Issue 25786
-element_animate_test/timing_dict: RuntimeError # Dartium 45 roll. Issue 25786
 
 [ $compiler == none && ($runtime == drt || $runtime == dartium) && $system == windows ]
 websql_test: Skip # Issue 4941: stderr contains a backtrace.
@@ -281,12 +272,12 @@
 media_stream_test/supported_MediaStreamEvent: Fail
 media_stream_test/supported_MediaStreamTrackEvent: Fail
 media_stream_test/supported_media: Fail
-performance_api_test/supported: Fail
 rtc_test/supported: Fail
 shadow_dom_test/supported: Fail
 speechrecognition_test/supported: Fail
 
 [ $runtime == safarimobilesim ]
+performance_api_test/supported: Fail
 indexeddb_1_test/supported: Fail
 element_types_test/supported_template: Fail
 xhr_test/json: Fail # Safari doesn't support JSON response type
@@ -428,20 +419,17 @@
 js_typed_interop_default_arg_test/default_value: MissingCompileTimeError # Issue #25759
 
 [ $compiler == dart2js && $cps_ir && $browser ]
-# Custom element support:
-custom/constructor_calls_created_synchronously_test: RuntimeError # Need custom element support #25484
-custom/element_upgrade_test: RuntimeError # Need custom element support #25484
-custom/mirrors_test: RuntimeError # Need custom element support #25484
-custom_elements_23127_test/baseline: RuntimeError # Need custom element support #25484
-custom_elements_23127_test/c2: RuntimeError # Need custom element support #25484
-custom_elements_23127_test/c1t: RuntimeError # Need custom element support #25484
-custom_elements_23127_test/c2t: RuntimeError # Need custom element support #25484
-custom_elements_test/innerHtml: RuntimeError # Need custom element support #25484
-custom_elements_test/register: RuntimeError # Need custom element support #25484
-
 js_typed_interop_side_cast_exp_test: RuntimeError # Corner case in package:js that we might want to remove (See comment in #24978).
 js_typed_interop_test/static_method_tearoff_1: RuntimeError # Tree-shaking a used tear-off (#24978, #25720).
 js_typed_interop_default_arg_test/explicit_argument: RuntimeError # Tree-shaking a used tear-off (#24978, #25720).
 
 # These are raw dart:js tests that fail due to bugs in the CPS IR:
 js_test/Dart_functions: RuntimeError # Tree-shaking an escaping closure #25720
+
+[ $compiler == dart2js && $cps_ir && $host_checked ]
+js_typed_interop_default_arg_test/none: Crash # Issue 25911
+js_typed_interop_default_arg_test/default_value: Crash # Issue 25911
+js_typed_interop_default_arg_test/explicit_argument: Crash # Issue 25911
+
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # `assert` not implemented
diff --git a/tests/html/js_array_test.dart b/tests/html/js_array_test.dart
index 598cadf..753ced3 100644
--- a/tests/html/js_array_test.dart
+++ b/tests/html/js_array_test.dart
@@ -511,8 +511,10 @@
 
       expect(descriptor.value, equals("a"));
       expect(descriptor.writable, isTrue);
-      expect(descriptor.enumerable, isTrue);
-      expect(descriptor.configurable, isTrue);
+      // TODO(jacobr): commented out until https://github.com/dart-lang/sdk/issues/26128
+      // is fixed.
+      // expect(descriptor.enumerable, isTrue);
+      // expect(descriptor.configurable, isTrue);
 
       descriptor = getOwnPropertyDescriptor(list, "length");
       expect(descriptor.value, equals(2));
diff --git a/tests/html/js_test.dart b/tests/html/js_test.dart
index a902d59..ae9d9b3 100644
--- a/tests/html/js_test.dart
+++ b/tests/html/js_test.dart
@@ -240,34 +240,31 @@
       expect(identical(c1, c2), isTrue);
     });
 
-  /*
-    TODO(jacobr): enable this test when dartium supports maintaining proxy
-    equality.
-
     test('identical JS objects should have identical proxies', () {
       var o1 = new JsObject(context['Foo'], [1]);
       context['f1'] = o1;
       var o2 = context['f1'];
-      expect(equals(o1, o2), isTrue);
+      expect(identical(o1, o2), isTrue);
     });
 
+/*
+ TODO(jacobr): enable this test when dartium supports maintaining proxy
+    equality.
     test('identical Dart objects should have identical proxies', () {
       var o1 = new TestDartObject();
       expect(context.callMethod('identical', [o1, o1]), isTrue);
     });
-
-    test('identical Dart functions should have identical proxies', () {
-      var f1 = () => print("I'm a Function!");
-      expect(context.callMethod('identical', [f1, f1]), isTrue);
-    });
     */
 
-    // TODO(jacobr): switch from equals to indentical when dartium supports
-    // maintaining proxy equality.
-    test('identical JS functions should have equal proxies', () {
+    test('identical Dart functions should have identical proxies', () {
+      var f1 = allowInterop(() => print("I'm a Function!"));
+      expect(context.callMethod('identical', [f1, f1]), isTrue);
+    });
+
+    test('identical JS functions should have identical proxies', () {
       var f1 = context['Object'];
       var f2 = context['Object'];
-      expect(f1, equals(f2));
+      expect(identical(f1, f2), isTrue);
     });
 
     // TODO(justinfagnani): old tests duplicate checks above, remove
@@ -454,7 +451,7 @@
       expect(context['razzle'].apply([]), equals(42));
     });
 
-    test('JsFunction.apply on a function that uses "this"', () {
+    test('JsFunction.apply on a function that uses this', () {
       var object = new Object();
       expect(context['returnThis'].apply([], thisArg: object), same(object));
     });
@@ -517,7 +514,7 @@
     test('pass Array to JS', () {
       context['a'] = [1, 2, 3];
       expect(context.callMethod('isPropertyInstanceOf',
-          ['a', context['Array']]), isFalse);
+          ['a', context['Array']]), isTrue);
       var a = context['a'];
       expect(a, new isInstanceOf<List>());
       expect(a, isNot(new isInstanceOf<JsArray>()));
diff --git a/tests/html/js_typed_interop_anonymous2_exp_test.dart b/tests/html/js_typed_interop_anonymous2_exp_test.dart
index baebd03..d1db741 100644
--- a/tests/html/js_typed_interop_anonymous2_exp_test.dart
+++ b/tests/html/js_typed_interop_anonymous2_exp_test.dart
@@ -6,6 +6,7 @@
 
 // Same test as js_typed_interop_anonymous2, but using the
 // --experimental-trust-js-interop-type-annotations flag.
+@JS()
 library js_typed_interop_anonymous2_exp_test;
 
 import 'dart:html';
diff --git a/tests/html/js_typed_interop_anonymous2_test.dart b/tests/html/js_typed_interop_anonymous2_test.dart
index ed0e732..449269e 100644
--- a/tests/html/js_typed_interop_anonymous2_test.dart
+++ b/tests/html/js_typed_interop_anonymous2_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@JS()
 library js_typed_interop_anonymous2_test;
 
 import 'dart:html';
diff --git a/tests/html/js_typed_interop_anonymous_exp_test.dart b/tests/html/js_typed_interop_anonymous_exp_test.dart
index 40a04aa..8fdd50f 100644
--- a/tests/html/js_typed_interop_anonymous_exp_test.dart
+++ b/tests/html/js_typed_interop_anonymous_exp_test.dart
@@ -6,6 +6,7 @@
 
 // Same test as js_typed_interop_anonymous, but using the
 // --experimental-trust-js-interop-type-annotations flag.
+@JS()
 library js_typed_interop_anonymous_exp_test;
 
 import 'dart:html';
diff --git a/tests/html/js_typed_interop_anonymous_test.dart b/tests/html/js_typed_interop_anonymous_test.dart
index b2d1593..c4836c8 100644
--- a/tests/html/js_typed_interop_anonymous_test.dart
+++ b/tests/html/js_typed_interop_anonymous_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@JS()
 library js_typed_interop_anonymous_test;
 
 import 'dart:html';
diff --git a/tests/html/js_typed_interop_anonymous_unreachable_exp_test.dart b/tests/html/js_typed_interop_anonymous_unreachable_exp_test.dart
index a4e2c96..7754012 100644
--- a/tests/html/js_typed_interop_anonymous_unreachable_exp_test.dart
+++ b/tests/html/js_typed_interop_anonymous_unreachable_exp_test.dart
@@ -6,6 +6,7 @@
 
 // Same test as js_typed_interop_anonymous_unreachable, but using the
 // --experimental-trust-js-interop-type-annotations flag.
+@JS()
 library js_typed_interop_anonymous_unreachable_exp_test;
 
 import 'dart:html';
diff --git a/tests/html/js_typed_interop_anonymous_unreachable_test.dart b/tests/html/js_typed_interop_anonymous_unreachable_test.dart
index ba8758e..bbd97f0 100644
--- a/tests/html/js_typed_interop_anonymous_unreachable_test.dart
+++ b/tests/html/js_typed_interop_anonymous_unreachable_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@JS()
 library js_typed_interop_anonymous_unreachable_test;
 
 import 'dart:html';
diff --git a/tests/html/js_typed_interop_side_cast_exp_test.dart b/tests/html/js_typed_interop_side_cast_exp_test.dart
index 6fd929a..8b67c7b 100644
--- a/tests/html/js_typed_interop_side_cast_exp_test.dart
+++ b/tests/html/js_typed_interop_side_cast_exp_test.dart
@@ -7,6 +7,7 @@
 // Similar test to js_typed_interop_side_cast, but because we are using the
 // --experimental-trust-js-interop-type-annotations flag, we test a slighly
 // different behavior.
+@JS()
 library js_typed_interop_side_cast_exp_test;
 
 import 'dart:html';
diff --git a/tests/html/js_typed_interop_side_cast_test.dart b/tests/html/js_typed_interop_side_cast_test.dart
index d50e1ac..cf5ee5a 100644
--- a/tests/html/js_typed_interop_side_cast_test.dart
+++ b/tests/html/js_typed_interop_side_cast_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@JS()
 library js_typed_interop_anonymous2_test;
 
 import 'dart:html';
diff --git a/tests/html/mirrors_js_typed_interop_test.dart b/tests/html/mirrors_js_typed_interop_test.dart
index a34bf1b..f4b30a6 100644
--- a/tests/html/mirrors_js_typed_interop_test.dart
+++ b/tests/html/mirrors_js_typed_interop_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@JS()
 library tests.html.mirrors_js_typed_interop_test;
 
 import 'dart:mirrors';
diff --git a/tests/html/wrapping_collections_test.dart b/tests/html/wrapping_collections_test.dart
index 176bcad..218d255 100644
--- a/tests/html/wrapping_collections_test.dart
+++ b/tests/html/wrapping_collections_test.dart
@@ -18,7 +18,7 @@
   });
 
   test("Access through dart:html", () {
-    var dartPerformance = wrap_jso(js.context['performance']);
+    var dartPerformance = js.JsNative.toTypedObject(js.context['performance']);
     var dartEntries = dartPerformance.getEntries();
     dartEntries.forEach((x) {
         expect(x is PerformanceEntry, isTrue);
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status
index 953be4d..3508c2c 100644
--- a/tests/isolate/isolate.status
+++ b/tests/isolate/isolate.status
@@ -139,7 +139,7 @@
 spawn_uri_fail_test: SkipByDesign  # Uses dart:io.
 scenarios/*: SkipByDesign  # Use automatic package resolution, spawnFunction and .dart URIs.
 
-[ $noopt || $compiler == precompiler || $runtime == dart_product ]
+[ $noopt || $compiler == precompiler || $mode == product ]
 # Imports dart:mirrors
 count_test: SkipByDesign
 cross_isolate_message_test: SkipByDesign
@@ -161,10 +161,6 @@
 static_function_test: SkipByDesign
 unresolved_ports_test: SkipByDesign
 
-[ $compiler == precompiler ]
-function_send_test: RuntimeError # Issue 25892
-message3_test/fun: RuntimeError # Issue 25892
-
 [ $runtime == dart_precompiled || $runtime == dart_product ]
 deferred_in_isolate_test: Skip # Isolate.spawnUri
 deferred_in_isolate2_test: Skip # Isolate.spawnUri
@@ -184,3 +180,6 @@
 [ $runtime == dart_product ]
 spawn_uri_missing_from_isolate_test: Skip # SpawnUri in product mode
 spawn_uri_missing_test: Skip # SpawnUri in product mode
+
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # `assert` not implemented
diff --git a/tests/isolate/scenarios/bad_resolve_package/.packages b/tests/isolate/scenarios/bad_resolve_package/.packages
new file mode 100644
index 0000000..5acc702
--- /dev/null
+++ b/tests/isolate/scenarios/bad_resolve_package/.packages
@@ -0,0 +1 @@
+# Intentionally left blank to ensure no packages are resolved.
diff --git a/tests/isolate/scenarios/bad_resolve_package/bad_resolve_package_test.dart b/tests/isolate/scenarios/bad_resolve_package/bad_resolve_package_test.dart
new file mode 100644
index 0000000..c8017e1
--- /dev/null
+++ b/tests/isolate/scenarios/bad_resolve_package/bad_resolve_package_test.dart
@@ -0,0 +1,47 @@
+// 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.
+
+// PackageRoot=none
+
+import 'dart:io';
+import 'dart:isolate';
+
+main([args, port]) async {
+  if (port != null) {
+    testBadResolvePackage(port);
+    return;
+  }
+  var p = new RawReceivePort();
+  Isolate.spawnUri(Platform.script, [], p.sendPort);
+  p.handler = (msg) {
+    p.close();
+    if (msg is! List) {
+      print(msg.runtimeType);
+      throw "Failure return from spawned isolate:\n\n$msg";
+    }
+    // Expecting a null resolution for inexistent package mapping.
+    if (msg[0] != null) {
+      throw "Bad package config in child isolate: ${msg[0]}\n"
+            "Expected: 'Foo'";
+    }
+    print("SUCCESS");
+  };
+}
+
+testBadResolvePackage(port) async {
+  try {
+    var packageRootStr = Platform.packageRoot;
+    var packageConfigStr = Platform.packageConfig;
+    var packageConfig = await Isolate.packageConfig;
+    var badPackageUri = Uri.parse("package:asdf/qwerty.dart");
+    var resolvedPkg = await Isolate.resolvePackageUri(badPackageUri);
+    print("Spawned isolate's package root flag: $packageRootStr");
+    print("Spawned isolate's package config flag: $packageConfigStr");
+    print("Spawned isolate's loaded package config: $packageConfig");
+    print("Spawned isolate's resolved package path: $resolvedPkg");
+    port.send([resolvedPkg]);
+  } catch (e, s) {
+    port.send("$e\n$s\n");
+  }
+}
diff --git a/tests/isolate/scenarios/short_package/.packages b/tests/isolate/scenarios/short_package/.packages
new file mode 100644
index 0000000..324934c
--- /dev/null
+++ b/tests/isolate/scenarios/short_package/.packages
@@ -0,0 +1 @@
+flu:flu_package/
diff --git a/tests/isolate/scenarios/short_package/flu_package/flu.dart b/tests/isolate/scenarios/short_package/flu_package/flu.dart
new file mode 100644
index 0000000..5e33f7c
--- /dev/null
+++ b/tests/isolate/scenarios/short_package/flu_package/flu.dart
@@ -0,0 +1,3 @@
+class Flu {
+  static var value = "Flu";
+}
diff --git a/tests/isolate/scenarios/short_package/flu_package/flu.text b/tests/isolate/scenarios/short_package/flu_package/flu.text
new file mode 100644
index 0000000..d9d3a9a
--- /dev/null
+++ b/tests/isolate/scenarios/short_package/flu_package/flu.text
@@ -0,0 +1 @@
+Bar
\ No newline at end of file
diff --git a/tests/isolate/scenarios/short_package/short_package_test.dart b/tests/isolate/scenarios/short_package/short_package_test.dart
new file mode 100644
index 0000000..bfbe61c
--- /dev/null
+++ b/tests/isolate/scenarios/short_package/short_package_test.dart
@@ -0,0 +1,37 @@
+// 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.
+
+// PackageRoot=none
+
+import 'dart:io';
+import 'dart:isolate';
+
+import "package:flu";
+
+var PACKAGE_FLU = "package:flu";
+var FLU_TEXT = "flu.text";
+
+testShortResolution(package_uri) async {
+  var fluPackage = await Isolate.resolvePackageUri(Uri.parse(package_uri));
+  print("Resolved $package_uri to $fluPackage");
+  var fluText = fluPackage.resolve(FLU_TEXT);
+  print("Resolved $FLU_TEXT from $package_uri to $fluText");
+  var fluFile = new File.fromUri(fluText);
+  var fluString = await fluFile.readAsString();
+  if (fluString != "Bar") {
+    throw "Contents of $FLU_TEXT not matching.\n"
+          "Got: $fluString\n"
+          "Expected: Bar";
+  }
+}
+
+main([args, port]) async {
+  if (Flu.value != "Flu") {
+    throw "Import of wrong Flu package.";
+  }
+  await testShortResolution(PACKAGE_FLU);
+  await testShortResolution(PACKAGE_FLU + "/");
+  await testShortResolution(PACKAGE_FLU + "/abc.def");
+  print("SUCCESS");
+}
diff --git a/tests/language/allocation_sinking_inlining_test.dart b/tests/language/allocation_sinking_inlining_test.dart
index 9ed27b6..e2ac626 100644
--- a/tests/language/allocation_sinking_inlining_test.dart
+++ b/tests/language/allocation_sinking_inlining_test.dart
@@ -2,7 +2,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 // Test allocation sinking with polymorphic inlining.
 
diff --git a/tests/language/arithmetic_canonicalization_test.dart b/tests/language/arithmetic_canonicalization_test.dart
index 04a9a12..23567ca 100644
--- a/tests/language/arithmetic_canonicalization_test.dart
+++ b/tests/language/arithmetic_canonicalization_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 canonicalization of simple arithmetic equivalences.
-// VMOptions=--optimization-counter-threshold=20 --no-use-osr
+// VMOptions=--optimization-counter-threshold=20 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/arithmetic_smi_overflow_test.dart b/tests/language/arithmetic_smi_overflow_test.dart
index a0abb27..1a4eec1 100644
--- a/tests/language/arithmetic_smi_overflow_test.dart
+++ b/tests/language/arithmetic_smi_overflow_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program to test arithmetic operations.
 
-// VMOptions=--optimization_counter_threshold=5
+// VMOptions=--optimization_counter_threshold=5 --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/arithmetic_test.dart b/tests/language/arithmetic_test.dart
index b660960..ec4ece9 100644
--- a/tests/language/arithmetic_test.dart
+++ b/tests/language/arithmetic_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.
 // Dart test program to test arithmetic operations.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 library arithmetic_test;
 import "package:expect/expect.dart";
@@ -423,24 +423,24 @@
     var b = -1;
     for (var i = 0; i < 10; i++) Expect.equals(0x40000000, div(a, b));
   }
-  
-  
+
+
   static int divMod(a, b) => a ~/ b + a % b;
-  
+
   static void testSmiDivModDeopt() {
     var a = -0x40000000;
     var b = -1;
     for (var i = 0; i < 10; i++) Expect.equals(0x40000000, divMod(a, b));
   }
-  
+
   static double sinCosSub(double a) => sin(a) - cos(a);
-  
+
   static double sinCosAddCos(double a)  => sin(a) * cos(a) + cos(a);
 
   static void testSinCos() {
     var e = sin(1.234) - cos(1.234);
     var f = sin(1.234) * cos(1.234) + cos(1.234);
-    
+
     for (var i = 0; i < 20; i++) {
       Expect.approxEquals(e, sinCosSub(1.234));
       Expect.approxEquals(f, sinCosAddCos(1.234));
@@ -456,7 +456,7 @@
       cos(i);
     }
   }
-    
+
   static mySqrt(var x) => sqrt(x);
 
   static testSqrtDeopt() {
diff --git a/tests/language/assert_assignable_type_test.dart b/tests/language/assert_assignable_type_test.dart
index 246f13e..1bde62b 100644
--- a/tests/language/assert_assignable_type_test.dart
+++ b/tests/language/assert_assignable_type_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.
 // Dart test program to test arithmetic operations.
-// VMOptions=--optimization-counter-threshold=10 --checked
+// VMOptions=--optimization-counter-threshold=10 --checked --no-background-compilation
 
 // This test crashes if we recompute type of AssertAssignableInstr based on its
 // output types. By doing that we would eliminate not only the unnecessary
diff --git a/tests/language/assign_op_test.dart b/tests/language/assign_op_test.dart
index 9a9ebe7..a531f31 100644
--- a/tests/language/assign_op_test.dart
+++ b/tests/language/assign_op_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.
 // Dart test program for testing assign operators.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/async_await_test.dart b/tests/language/async_await_test.dart
index 8844777..62ebe28 100644
--- a/tests/language/async_await_test.dart
+++ b/tests/language/async_await_test.dart
@@ -4,6 +4,8 @@
 
 library async_await_test;
 
+// Use of package:unittest and package:test is deprecated in sdk/tests.
+// Do not add any more uses of this package.
 import "package:unittest/unittest.dart";
 import "dart:async";
 
@@ -1728,37 +1730,37 @@
 
     if (!checkedMode) return;
 
-    test("inside assert, true", () {                       /// 03: ok
-      f() async {                                          /// 03: continued
-        assert(await new Future.microtask(() => true));    /// 03: continued
-        return 42;                                         /// 03: continued
-      }                                                    /// 03: continued
-      return expect42(f());                                /// 03: continued
-    });                                                    /// 03: continued
+    test("inside assert, true", () {
+      f() async {
+        assert(await new Future.microtask(() => true));
+        return 42;
+      }
+      return expect42(f());
+    });
 
-    test("inside assert, false", () {                      /// 03: continued
-      f() async {                                          /// 03: continued
-        assert(await new Future.microtask(() => false));   /// 03: continued
-        return 42;                                         /// 03: continued
-      }                                                    /// 03: continued
-      return f().then((_) {                                /// 03: continued
-        fail("assert didn't throw");                       /// 03: continued
-      }, onError: (e, s) {                                 /// 03: continued
-        expect(e is AssertionError, isTrue);               /// 03: continued
-      });                                                  /// 03: continued
-    });                                                    /// 03: continued
+    test("inside assert, false", () {
+      f() async {
+        assert(await new Future.microtask(() => false));
+        return 42;
+      }
+      return f().then((_) {
+        fail("assert didn't throw");
+      }, onError: (e, s) {
+        expect(e is AssertionError, isTrue);
+      });
+    });
 
-    test("inside assert, function -> false", () {          /// 03: continued
-      f() async {                                          /// 03: continued
-        assert(await new Future.microtask(() => false));   /// 03: continued
-        return 42;                                         /// 03: continued
-      }                                                    /// 03: continued
-      return f().then((_) {                                /// 03: continued
-        fail("assert didn't throw");                       /// 03: continued
-      }, onError: (e, s) {                                 /// 03: continued
-        expect(e is AssertionError, isTrue);               /// 03: continued
-      });                                                  /// 03: continued
-    });                                                    /// 03: continued
+    test("inside assert, function -> false", () {
+      f() async {
+        assert(await new Future.microtask(() => false));
+        return 42;
+      }
+      return f().then((_) {
+        fail("assert didn't throw");
+      }, onError: (e, s) {
+        expect(e is AssertionError, isTrue);
+      });
+    });
 
   });
 
@@ -1769,11 +1771,11 @@
       expect(async, equals(42));
     });
 
-    test("await as variable", () {                         /// 02: ok
-      // Valid identifiers outside of async function.      /// 02: continued
-      var await = 42;                                      /// 02: continued
-      expect(await, equals(42));                           /// 02: continued
-    });                                                    /// 02: continued
+    test("await as variable", () {
+      // Valid identifiers outside of async function.
+      var await = 42;
+      expect(await, equals(42));
+    });
 
     test("yield as variable", () {
       // Valid identifiers outside of async function.
diff --git a/tests/language/async_control_structures_test.dart b/tests/language/async_control_structures_test.dart
index 23365f4..cd09a86 100644
--- a/tests/language/async_control_structures_test.dart
+++ b/tests/language/async_control_structures_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.
 
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/async_star_await_pauses_test.dart b/tests/language/async_star_await_pauses_test.dart
deleted file mode 100644
index c16fbdd..0000000
--- a/tests/language/async_star_await_pauses_test.dart
+++ /dev/null
@@ -1,34 +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:async";
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
-
-main() {
-  var sc;
-  var i = 0;
-  void send() {
-    if (i == 5) {
-      sc.close();
-    } else {
-      sc.add(i++);
-    }
-  }
-  sc = new StreamController(onListen: send, onResume: send);
-
-  f(s) async {
-    var r = 0;
-    await for (var i in s) {
-      r += await new Future.delayed(new Duration(milliseconds: 10), () => i);
-    }
-    return r;
-  }
-
-  asyncStart();
-  f(sc.stream).then((v) {
-    Expect.equals(10, v);
-    asyncEnd();
-  });
-}
diff --git a/tests/language/await_exceptions_test.dart b/tests/language/await_exceptions_test.dart
index f1d39a1..c739024 100644
--- a/tests/language/await_exceptions_test.dart
+++ b/tests/language/await_exceptions_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.
 
-// VMOptions=--optimization-counter-threshold=5
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 
 import 'package:expect/expect.dart';
 import "package:async_helper/async_helper.dart";
diff --git a/tests/language/await_future_test.dart b/tests/language/await_future_test.dart
index b0151c5..2ec30fe8 100644
--- a/tests/language/await_future_test.dart
+++ b/tests/language/await_future_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.
 
-// VMOptions=--optimization-counter-threshold=5
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 
 import 'package:expect/expect.dart';
 import "package:async_helper/async_helper.dart";
diff --git a/tests/language/await_nonfuture_test.dart b/tests/language/await_nonfuture_test.dart
index 71f46f5..fbdc18c 100644
--- a/tests/language/await_nonfuture_test.dart
+++ b/tests/language/await_nonfuture_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.
 
-// VMOptions=--optimization-counter-threshold=5
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/await_test.dart b/tests/language/await_test.dart
index cb779d9..257d840 100644
--- a/tests/language/await_test.dart
+++ b/tests/language/await_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.
 
-// VMOptions=---optimization-counter-threshold=10
+// VMOptions=---optimization-counter-threshold=10 --no-background-compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/bit_operations_test.dart b/tests/language/bit_operations_test.dart
index 2d46ba7..bbc17bd 100644
--- a/tests/language/bit_operations_test.dart
+++ b/tests/language/bit_operations_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.
 // Dart test for testing bitwise operations.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/bit_shift_test.dart b/tests/language/bit_shift_test.dart
index 8493936..e797ea3 100644
--- a/tests/language/bit_shift_test.dart
+++ b/tests/language/bit_shift_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/branch_canonicalization_test.dart b/tests/language/branch_canonicalization_test.dart
index bb49d6e..10ba232 100644
--- a/tests/language/branch_canonicalization_test.dart
+++ b/tests/language/branch_canonicalization_test.dart
@@ -4,7 +4,7 @@
 
 // Test that branch fusion correctly sets branch environment for comparisons
 // that require unboxing and does not fuse branches that can deoptimize.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/call_closurization_test.dart b/tests/language/call_closurization_test.dart
index 6c8dc71..0d17331 100644
--- a/tests/language/call_closurization_test.dart
+++ b/tests/language/call_closurization_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/call_test.dart b/tests/language/call_test.dart
index 59d2407..7c076af 100644
--- a/tests/language/call_test.dart
+++ b/tests/language/call_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/cha_deopt1_test.dart b/tests/language/cha_deopt1_test.dart
index fd860bf..a2c99f4 100644
--- a/tests/language/cha_deopt1_test.dart
+++ b/tests/language/cha_deopt1_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=100
+// VMOptions=--optimization-counter-threshold=100 --no-background-compilation
 
 // Test lazy deoptimization at field guards with deferred loading.
 
diff --git a/tests/language/cha_deopt2_test.dart b/tests/language/cha_deopt2_test.dart
index 5a4ed04..d6b75ea 100644
--- a/tests/language/cha_deopt2_test.dart
+++ b/tests/language/cha_deopt2_test.dart
@@ -1,7 +1,8 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=100
+// VMOptions=--optimization-counter-threshold=100 --no-background-compilation
+// VMOptions=--optimization-counter-threshold=100 --no-background-compilation --no-use-field-guards
 
 // Test lazy deoptimization at type checks with deferred loading.
 
diff --git a/tests/language/cha_deopt3_test.dart b/tests/language/cha_deopt3_test.dart
index 3dc61b9..4c7db2b 100644
--- a/tests/language/cha_deopt3_test.dart
+++ b/tests/language/cha_deopt3_test.dart
@@ -1,7 +1,8 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=100
+// VMOptions=--optimization-counter-threshold=100 --no-background-compilation
+// VMOptions=--optimization-counter-threshold=100 --no-background-compilation --no-use-field-guards
 
 // Test lazy deoptimization at type checks with interface implementation.
 
diff --git a/tests/language/compound_assignment_operator_test.dart b/tests/language/compound_assignment_operator_test.dart
index e04da40..65bf4c391 100644
--- a/tests/language/compound_assignment_operator_test.dart
+++ b/tests/language/compound_assignment_operator_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.
 // Tests that lhs of a compound assignement is executed only once.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/config_import_test.dart b/tests/language/config_import_test.dart
index 96cf3e3..6573aa3 100644
--- a/tests/language/config_import_test.dart
+++ b/tests/language/config_import_test.dart
@@ -2,8 +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.
 //
-// DartOptions=-Did=true -Ddotted.id=some_string -Dlots.of.dots.In.id=false --conditional-directives
-// VMOptions=-Did=true -Ddotted.id=some_string -Dlots.of.dots.In.id=false --conditional-directives
+// DartOptions=-Did=true -Ddotted.id=some_string -Dlots.of.dots.In.id=false
+// VMOptions=-Did=true -Ddotted.id=some_string -Dlots.of.dots.In.id=false
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/const_redirect_skips_supertype_test.dart b/tests/language/const_redirect_skips_supertype_test.dart
new file mode 100644
index 0000000..c84aa62
--- /dev/null
+++ b/tests/language/const_redirect_skips_supertype_test.dart
@@ -0,0 +1,21 @@
+// 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.
+
+// Since C redirects to C.named, it doesn't implicitly refer to B's
+// unnamed constructor.  Therefore there is no cycle.
+
+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();
+
+main() {
+  print(y);
+}
diff --git a/tests/language/const_test.dart b/tests/language/const_test.dart
index 65dc19d..9cdb07d 100644
--- a/tests/language/const_test.dart
+++ b/tests/language/const_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.
 // Check const classes.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/constant_propagation_phis_test.dart b/tests/language/constant_propagation_phis_test.dart
index e7e2d80..0ba7d72 100644
--- a/tests/language/constant_propagation_phis_test.dart
+++ b/tests/language/constant_propagation_phis_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/constant_string_interpolation_test.dart b/tests/language/constant_string_interpolation_test.dart
index 0a8a81c..bc30125 100644
--- a/tests/language/constant_string_interpolation_test.dart
+++ b/tests/language/constant_string_interpolation_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/deferred_inlined_test.dart b/tests/language/deferred_inlined_test.dart
index 4808a3f..bede596 100644
--- a/tests/language/deferred_inlined_test.dart
+++ b/tests/language/deferred_inlined_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Declares foo that returns 42.
 import "deferred_constraints_lib2.dart" deferred as lib;
diff --git a/tests/language/deferred_load_inval_code_test.dart b/tests/language/deferred_load_inval_code_test.dart
index 88a3159..41eacbb 100644
--- a/tests/language/deferred_load_inval_code_test.dart
+++ b/tests/language/deferred_load_inval_code_test.dart
@@ -3,7 +3,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 //
-// VMOptions=--optimization-counter-threshold=100
+// VMOptions=--optimization-counter-threshold=100 --no-background-compilation
 
 import "deferred_load_inval_code_lib.dart" deferred as d;
 
diff --git a/tests/language/deferred_optimized_test.dart b/tests/language/deferred_optimized_test.dart
index ef3c2a0..bb62884 100644
--- a/tests/language/deferred_optimized_test.dart
+++ b/tests/language/deferred_optimized_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10 --no-use-inlining
+// VMOptions=--optimization-counter-threshold=10 --no-use-inlining --no-background-compilation
 
 // Declares foo that returns 42.
 import "deferred_constraints_lib2.dart" deferred as lib;
diff --git a/tests/language/deopt_inlined_function_lazy_test.dart b/tests/language/deopt_inlined_function_lazy_test.dart
index 8de6b8e..dcb48d2 100644
--- a/tests/language/deopt_inlined_function_lazy_test.dart
+++ b/tests/language/deopt_inlined_function_lazy_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 lazy deoptimization from within an inlined function.
-// VMOptions=--deoptimize_alot --optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--deoptimize_alot --optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/deopt_lazy_finalization_test.dart b/tests/language/deopt_lazy_finalization_test.dart
index a069634..1176eca 100644
--- a/tests/language/deopt_lazy_finalization_test.dart
+++ b/tests/language/deopt_lazy_finalization_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 deoptimziation caused by lazy finalization.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
@@ -29,7 +29,7 @@
 
 class A {
   foo() => 2;
-  
+
   loop() {
     var sum = 0;
     for (int i = 0; i < 10000; i++) {
diff --git a/tests/language/deopt_no_feedback_test.dart b/tests/language/deopt_no_feedback_test.dart
index 4ee16d0..8d42628 100644
--- a/tests/language/deopt_no_feedback_test.dart
+++ b/tests/language/deopt_no_feedback_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test deoptimization caused by running code that did not collect type
 // feedback before.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/deopt_smi_op_test.dart b/tests/language/deopt_smi_op_test.dart
index b990b49..150699d 100644
--- a/tests/language/deopt_smi_op_test.dart
+++ b/tests/language/deopt_smi_op_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/deoptimized_function_on_stack_test.dart b/tests/language/deoptimized_function_on_stack_test.dart
index 3ef5cb4..f64fedc 100644
--- a/tests/language/deoptimized_function_on_stack_test.dart
+++ b/tests/language/deoptimized_function_on_stack_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/div_with_power_of_two2_test.dart b/tests/language/div_with_power_of_two2_test.dart
index 03a83ca..f242fed 100644
--- a/tests/language/div_with_power_of_two2_test.dart
+++ b/tests/language/div_with_power_of_two2_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test division by power of two.
 // Test that results before and after optimization are the same.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/div_with_power_of_two_test.dart b/tests/language/div_with_power_of_two_test.dart
index a628563..fd88c4c 100644
--- a/tests/language/div_with_power_of_two_test.dart
+++ b/tests/language/div_with_power_of_two_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test division by power of two.
 // Test that results before and after optimization are the same.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/double_int_addition_test.dart b/tests/language/double_int_addition_test.dart
index d2f22e6..be190fa 100644
--- a/tests/language/double_int_addition_test.dart
+++ b/tests/language/double_int_addition_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/double_modulo_test.dart b/tests/language/double_modulo_test.dart
index d17bcc5..54e9fef 100644
--- a/tests/language/double_modulo_test.dart
+++ b/tests/language/double_modulo_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.
 // Dart test optimization of modulo operator on Double.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/double_nan_comparison_test.dart b/tests/language/double_nan_comparison_test.dart
index 007e83d..c6e34701 100644
--- a/tests/language/double_nan_comparison_test.dart
+++ b/tests/language/double_nan_comparison_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.
 // Tests double comparisons with NaN in different contexts.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/equality_test.dart b/tests/language/equality_test.dart
index 208ed0c..ed6d227 100644
--- a/tests/language/equality_test.dart
+++ b/tests/language/equality_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/exception_in_increment_test.dart b/tests/language/exception_in_increment_test.dart
index a053708..0aa3b1e 100644
--- a/tests/language/exception_in_increment_test.dart
+++ b/tests/language/exception_in_increment_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test throws exception in the middle of the increment operation, the setter
 // part of the instance field increment never completes.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 main() {
   var a = new A();
diff --git a/tests/language/fast_method_extraction_test.dart b/tests/language/fast_method_extraction_test.dart
index b4dd4c9..3e3d8d9 100644
--- a/tests/language/fast_method_extraction_test.dart
+++ b/tests/language/fast_method_extraction_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 fast method extraction returns correct closure.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/generic_functions_test.dart b/tests/language/generic_functions_test.dart
new file mode 100644
index 0000000..54ab173
--- /dev/null
+++ b/tests/language/generic_functions_test.dart
@@ -0,0 +1,106 @@
+// 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:expect/expect.dart";
+
+// Dart test verifying that the parser can handle type parameterization of
+// function declarations and function invocations. Variant of code from
+// DEP #22, adjusted to use generic top level functions.
+
+class BinaryTreeNode<K extends Comparable<K>, V> {
+  final K _key;
+  final V _value;
+  final BinaryTreeNode<K, V> _left;
+  final BinaryTreeNode<K, V> _right;
+
+  BinaryTreeNode(this._key, this._value,
+      {BinaryTreeNode<K, V> left: null, BinaryTreeNode<K, V> right: null}) :
+        _left = left, _right = right;
+
+  BinaryTreeNode<K, V> insert(K key, V value) {
+    int c = key.compareTo(_key);
+    if (c == 0) return this;
+    var _insert = (BinaryTreeNode<K, V> t, K key, V value) =>
+        insertOpt<K, V>(t, key, value);
+    BinaryTreeNode<K, V> left = _left;
+    BinaryTreeNode<K, V> right = _right;
+    if (c < 0) {
+      left = _insert(_left, key, value);
+    } else {
+      right = _insert(_right, key, value);
+    }
+    return new BinaryTreeNode<K, V>(_key, _value, left: left, right: right);
+  }
+
+  BinaryTreeNode<K, U> map<U>(U f(V x)){
+    var _map = (BinaryTreeNode<K, V> t, U f(V x)) => mapOpt<K, V, U>(t, f);
+    return new BinaryTreeNode<K, U>(
+        _key,
+        f(_value),
+        left: _map(_left, f),
+        right: _map(_right, f));
+  }
+
+  S foldPre<S>(S init, S f(V t, S s)) {
+    var _fold = (BinaryTreeNode<K, V> t, S s, S f(V t, S s)) =>
+        foldPreOpt<K, V, S>(t, s, f);
+    S s = init;
+    s = f(_value, s);
+    s = _fold(_left, s, f);
+    s = _fold(_right, s, f);
+    return s;
+  }
+}
+
+// Use fresh type variables.
+BinaryTreeNode<K2, V2> insertOpt<K2 extends Comparable<K2>, V2>(
+    BinaryTreeNode<K2, V2> t, K2 key, V2 value) {
+  return (t == null) ? new BinaryTreeNode(key, value) : t.insert(key, value);
+}
+
+// Reuse type variables [K], [V] to test shadowing.
+BinaryTreeNode<K, U> mapOpt<K extends Comparable<K>, V, U>(
+    BinaryTreeNode<K, V> t, U f(V x)) {
+  return (t == null) ? null : t.map<U>(f);
+}
+
+// Use fresh [K2], shadowing [V].
+S foldPreOpt<K2 extends Comparable<K2>, V, S>(
+    BinaryTreeNode<K2, V> t, S init, S f(V t, S s)) {
+  return (t == null) ? init : t.foldPre<S>(init, f);
+}
+
+class BinaryTree<K extends Comparable<K>, V> {
+  final BinaryTreeNode<K, V> _root;
+
+  BinaryTree._internal(this._root);
+  BinaryTree.empty() : this._internal(null);
+
+  BinaryTree<K, V> insert(K key, V value) {
+    BinaryTreeNode<K, V> root = insertOpt<K, V>(_root, key, value);
+    return new BinaryTree<K, V>._internal(root);
+  }
+
+  BinaryTree<K, U> map<U>(U f(V x)) {
+    BinaryTreeNode<K, U> root = mapOpt<K, V, U>(_root, f);
+    return new BinaryTree<K, U>._internal(root);
+  }
+
+  S foldPre<S>(S init, S f(V t, S s)) {
+    return foldPreOpt<K, V, S>(_root, init, f);
+  }
+}
+
+main() {
+  BinaryTree<num, String> sT = new BinaryTree<num, String>.empty();
+
+  sT = sT.insert(0, "");
+  sT = sT.insert(1, " ");
+  sT = sT.insert(2, "  ");
+  sT = sT.insert(3, "   ");
+
+  BinaryTree<num, num> iT = sT.map<num>((String s) => s.length);
+
+  Expect.equals(iT.foldPre<num>(0, (int i, num s) => i + s), 6);
+}
diff --git a/tests/language/generic_functions_test.options b/tests/language/generic_functions_test.options
new file mode 100644
index 0000000..86e2aac
--- /dev/null
+++ b/tests/language/generic_functions_test.options
@@ -0,0 +1,3 @@
+analyzer:
+  language:
+    enableGenericMethods: true
diff --git a/tests/language/generic_methods_test.dart b/tests/language/generic_methods_test.dart
new file mode 100644
index 0000000..3fd6d24
--- /dev/null
+++ b/tests/language/generic_methods_test.dart
@@ -0,0 +1,107 @@
+// 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:expect/expect.dart";
+
+// Dart test verifying that the parser can handle type parameterization of
+// method declarations and method invocations. Slightly adjusted version of
+// code from DEP #22.
+
+class BinaryTreeNode<K extends Comparable<K>, V> {
+  final K _key;
+  final V _value;
+  final BinaryTreeNode<K, V> _left;
+  final BinaryTreeNode<K, V> _right;
+
+  BinaryTreeNode(this._key, this._value,
+      {BinaryTreeNode<K, V> left: null, BinaryTreeNode<K, V> right: null}) :
+          _left = left, _right = right;
+
+  // Use fresh type variables.
+  static BinaryTreeNode<K2, V2> insertOpt<K2 extends Comparable<K2>, V2>(
+      BinaryTreeNode<K2, V2> t, K2 key, V2 value) {
+    return (t == null) ? new BinaryTreeNode(key, value) : t.insert(key, value);
+  }
+
+  BinaryTreeNode<K, V> insert(K key, V value) {
+    int c = key.compareTo(_key);
+    if (c == 0) return this;
+    var _insert = (BinaryTreeNode<K, V> node, K key, V value) =>
+        insertOpt<K, V>(node, key, value);
+    BinaryTreeNode<K, V> left = _left;
+    BinaryTreeNode<K, V> right = _right;
+    if (c < 0) {
+      left = _insert(_left, key, value);
+    } else {
+      right = _insert(_right, key, value);
+    }
+    return new BinaryTreeNode<K, V>(_key, _value, left: left, right: right);
+  }
+
+  // Reuse type variables [K], [V] to test shadowing.
+  static BinaryTreeNode<K, U> mapOpt<K extends Comparable<K>, V, U>
+      (BinaryTreeNode<K, V> t, U f(V x)) {
+    return (t == null) ? null : t.map<U>(f);
+  }
+
+  BinaryTreeNode<K, U> map<U>(U f(V x)){
+    var _map = (BinaryTreeNode<K, V> t, U f(V x)) => mapOpt<K, V, U>(t, f);
+    return new BinaryTreeNode<K, U>(
+        _key,
+        f(_value),
+        left: _map(_left, f),
+        right: _map(_right, f));
+  }
+
+  // Use fresh [K2], shadowing [V].
+  static S foldPreOpt<K2 extends Comparable<K2>, V, S>(
+      BinaryTreeNode<K2, V> t, S init, S f(V t, S s)) {
+    return (t == null) ? init : t.foldPre<S>(init, f);
+  }
+
+  S foldPre<S>(S init, S f(V t, S s)) {
+    var _fold = (BinaryTreeNode<K, V> t, S s, S f(V t, S s)) =>
+        foldPreOpt<K, V, S>(t, s, f);
+    S s = init;
+    s = f(_value, s);
+    s = _fold(_left, s, f);
+    s = _fold(_right, s, f);
+    return s;
+  }
+}
+
+class BinaryTree<K extends Comparable<K>, V> {
+  final BinaryTreeNode<K, V> _root;
+
+  BinaryTree._internal(this._root);
+  BinaryTree.empty() : this._internal(null);
+
+  BinaryTree<K, V> insert(K key, V value) {
+    BinaryTreeNode<K, V> root =
+        BinaryTreeNode.insertOpt<K, V>(_root, key, value);
+    return new BinaryTree<K, V>._internal(root);
+  }
+
+  BinaryTree<K, U> map<U>(U f(V x)) {
+    BinaryTreeNode<K, U> root = BinaryTreeNode.mapOpt<K, V, U>(_root, f);
+    return new BinaryTree<K, U>._internal(root);
+  }
+
+  S foldPre<S>(S init, S f(V t, S s)) {
+    return BinaryTreeNode.foldPreOpt<K, V, S>(_root, init, f);
+  }
+}
+
+main() {
+  BinaryTree<num, String> sT = new BinaryTree<num, String>.empty();
+
+  sT = sT.insert(0, "");
+  sT = sT.insert(1, " ");
+  sT = sT.insert(2, "  ");
+  sT = sT.insert(3, "   ");
+
+  BinaryTree<num, num> iT = sT.map<num>((String s) => s.length);
+
+  Expect.equals(iT.foldPre<num>(0, (int i, num s) => i + s), 6);
+}
diff --git a/tests/language/generic_methods_test.options b/tests/language/generic_methods_test.options
new file mode 100644
index 0000000..86e2aac
--- /dev/null
+++ b/tests/language/generic_methods_test.options
@@ -0,0 +1,3 @@
+analyzer:
+  language:
+    enableGenericMethods: true
diff --git a/tests/language/generic_sends_test.dart b/tests/language/generic_sends_test.dart
new file mode 100644
index 0000000..2e98215d
--- /dev/null
+++ b/tests/language/generic_sends_test.dart
@@ -0,0 +1,24 @@
+// 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.
+
+// Dart test verifying that the parser can handle certain cases where
+// grammar ambiguity is resolved in favor of generic sends, not
+// relational expressions.
+
+f(arg1, [arg2]) => null;
+g<X, Y>(arg) => null;
+
+main() {
+  // Generic invocations.
+  f(g<int, String>(3));
+  f(g<int, List<String>>(3));
+  f(g<int, String>(3), 4);
+  f(g<int, List<String>>(3), 4);
+
+  // Relational expressions.
+  int a = 0, b = 1, c = 2, d = 3;
+  f(a < b, c > 3);
+  f(a < b, c >> 3);
+  f(a < b, c < d >> 3);
+}
diff --git a/tests/language/generic_sends_test.options b/tests/language/generic_sends_test.options
new file mode 100644
index 0000000..86e2aac
--- /dev/null
+++ b/tests/language/generic_sends_test.options
@@ -0,0 +1,3 @@
+analyzer:
+  language:
+    enableGenericMethods: true
diff --git a/tests/language/guess_cid_test.dart b/tests/language/guess_cid_test.dart
index 3759cb9..ea5629ad 100644
--- a/tests/language/guess_cid_test.dart
+++ b/tests/language/guess_cid_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.
 // Dart test program to test cid guessing optimizations.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
@@ -17,17 +17,17 @@
   Expect.equals(3, compareInt(3));
   Expect.equals(-2, compareInt(-2));
   Expect.equals(0, compareInt(-1));
-  
+
   Expect.equals(3, binOpInt(3, 3));
   Expect.equals(0, binOpInt(-2, -2));
-  
+
   Expect.equals(3.0, binOpDouble(3.0, 3.0));
   Expect.equals(0.0, binOpDouble(-2.0, -2.0));
-  
+
   Expect.equals(3.0, compareDouble(3.0));
   Expect.equals(-2.0, compareDouble(-2.0));
   Expect.equals(0.0, compareDouble(-1.0));
-  
+
   testOSR();
 }
 
diff --git a/tests/language/identical_test.dart b/tests/language/identical_test.dart
index 23be3ad..244f814 100644
--- a/tests/language/identical_test.dart
+++ b/tests/language/identical_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 efficient and correct implementation of !identical(a, b).
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/inline_add_constants_to_initial_env_test.dart b/tests/language/inline_add_constants_to_initial_env_test.dart
index 4417834..cd64f44 100644
--- a/tests/language/inline_add_constants_to_initial_env_test.dart
+++ b/tests/language/inline_add_constants_to_initial_env_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that SSA values are correctly numbered after inlining that adds
 // constants to original environment.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 h(x, y) => x == y;
 
diff --git a/tests/language/inline_closure_with_constant_arguments_test.dart b/tests/language/inline_closure_with_constant_arguments_test.dart
index 94bf524..87bf4eb 100644
--- a/tests/language/inline_closure_with_constant_arguments_test.dart
+++ b/tests/language/inline_closure_with_constant_arguments_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/inline_effect_context_test.dart b/tests/language/inline_effect_context_test.dart
index e10e493..0fc2afe 100644
--- a/tests/language/inline_effect_context_test.dart
+++ b/tests/language/inline_effect_context_test.dart
@@ -4,7 +4,7 @@
 // Test inlining of simple function with control flow in an effect context.
 // Optimize function foo with instance of A and inlined function bar. Call later
 // with instance of B and cause deoptimization.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/inline_getter_test.dart b/tests/language/inline_getter_test.dart
index ba83a23..41430d3 100644
--- a/tests/language/inline_getter_test.dart
+++ b/tests/language/inline_getter_test.dart
@@ -4,7 +4,7 @@
 // Test inlining of instance getters.
 // Three classes access always the same field. Optimize method foo and inline
 // getter for classes 'A' and 'B'. Call later via 'C' and cause deoptimization.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/inline_test_context_test.dart b/tests/language/inline_test_context_test.dart
index 89a3e74..2c8fe29 100644
--- a/tests/language/inline_test_context_test.dart
+++ b/tests/language/inline_test_context_test.dart
@@ -4,7 +4,7 @@
 // Test inlining of simple function with control flow in a test context.
 // Optimize function foo with instance of A and inlined function bar. Call later
 // with instance of B and cause deoptimization.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/inline_value_context_test.dart b/tests/language/inline_value_context_test.dart
index 5ffb694..5e8aee9 100644
--- a/tests/language/inline_value_context_test.dart
+++ b/tests/language/inline_value_context_test.dart
@@ -4,7 +4,7 @@
 // Test inlining of simple function with control flow in a value context.
 // Optimize function foo with instance of A and inlined function bar. Call later
 // with instance of B and cause deoptimization.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/instance_incr_deopt_test.dart b/tests/language/instance_incr_deopt_test.dart
index 04a02a1..eb864a5 100644
--- a/tests/language/instance_incr_deopt_test.dart
+++ b/tests/language/instance_incr_deopt_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/instanceof4_test.dart b/tests/language/instanceof4_test.dart
index 86282da..be5a068c 100644
--- a/tests/language/instanceof4_test.dart
+++ b/tests/language/instanceof4_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing the instanceof operation.
 // Regression test for issue 5216.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/instanceof_optimized_test.dart b/tests/language/instanceof_optimized_test.dart
index e3f5965..820504f 100644
--- a/tests/language/instanceof_optimized_test.dart
+++ b/tests/language/instanceof_optimized_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.
 // Testing optimized 'is' tests.
-// VMOptions=--optimization-counter-threshold=5 --no-use-osr
+// VMOptions=--optimization-counter-threshold=5 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/integer_division_by_zero_test.dart b/tests/language/integer_division_by_zero_test.dart
index 98aab8c..defb6cb 100644
--- a/tests/language/integer_division_by_zero_test.dart
+++ b/tests/language/integer_division_by_zero_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test integer division by zero.
 // Test that results before and after optimization are the same.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/issue7513_test.dart b/tests/language/issue7513_test.dart
index b7c0b31..3c1fe9f 100644
--- a/tests/language/issue7513_test.dart
+++ b/tests/language/issue7513_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/issue7525_test.dart b/tests/language/issue7525_test.dart
index eab03a2..c7fe377 100644
--- a/tests/language/issue7525_test.dart
+++ b/tests/language/issue7525_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/language.status b/tests/language/language.status
index 42bb58b..044e7a5 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -43,12 +43,11 @@
 
 async_star_regression_2238_test: CompileTimeError, RuntimeError # drt only runtime-errs.
 async_star_cancel_while_paused_test: RuntimeError
-async_star_await_pauses_test: Skip # Times out. Issue 23996
 
-accessor_conflict_export2_test: RuntimeError # Issue 25625
-accessor_conflict_import2_test: RuntimeError # Issue 25625
-accessor_conflict_import_prefixed2_test: RuntimeError # Issue 25625
-accessor_conflict_import_prefixed_test: RuntimeError # Issue 25625
+# Experimental feature: Syntactic support for generic methods.
+generic_methods_test: CompiletimeError # Issue 25869
+generic_functions_test: CompiletimeError # Issue 25869
+generic_sends_test: CompiletimeError # Issue 25869
 
 [ ($compiler == none || $compiler == precompiler || $compiler == dart2app) && ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) ]
 
@@ -89,19 +88,21 @@
 main_test/42: Fail # Issue 20028
 mirror_in_static_init_test: Fail # Issue 22071
 vm/debug_break_enabled_vm_test/*: Skip # Issue 14651.
+# Experimental feature: Syntactic support for generic methods.
+generic_methods_test: RuntimeError # Issue 25869
+generic_functions_test: RuntimeError # Issue 25869
+generic_sends_test: RuntimeError # Issue 25869
 
 [ $compiler == none && $runtime == dartium && $system == linux && $arch != x64 ]
-issue_22780_test/01 : Pass, Timeout # Issue 24473
+issue_22780_test/01: Pass, Timeout # Issue 24473
+
+[ $compiler == none && $runtime == dartium && $system == linux && $arch == x64 ]
+async_await_test: Skip # Issue 26198
 
 [ $compiler == none && $runtime == drt ]
 disassemble_test: Pass, Fail # Issue 18122
 
-[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == mips && $checked ]
-generic_instanceof3_test: Pass, Crash # Issue 17440.
-
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == mips && $mode == debug ]
-stack_overflow_test: Skip # Crashes. Issue 17440.
-stack_overflow_stacktrace_test: Skip # Crashes. Issue 17440.
 large_class_declaration_test: SkipSlow # Times out. Issue 20352
 
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $arch == arm64 ]
@@ -129,7 +130,7 @@
 stacktrace_rethrow_nonerror_test: Pass, RuntimeError
 stacktrace_test: Pass, RuntimeError
 
-[ $noopt || $compiler == precompiler || $runtime == dart_product ]
+[ $noopt || $compiler == precompiler || $mode == product ]
 # Imports dart:mirrors
 const_evaluation_test: SkipByDesign
 deferred_constraints_constants_test: SkipByDesign
@@ -154,23 +155,32 @@
 
 [ ($noopt || $compiler == precompiler || $compiler == dart2app) ]
 # Deferred loading happens eagerly
-regress_23408_test: RuntimeError
+regress_23408_test: Skip
 deferred_inheritance_constraints_test: Skip
-deferred_load_constants_test: Skip # multitest gets confused
-tearoff_basic_test: RuntimeError, Crash # Conflicting flag.
-deferred_global_test: RuntimeError # Issue 25845
+deferred_global_test: Skip
+deferred_load_constants_test: Skip
+tearoff_basic_test: Skip
 
 vm/type_vm_test: RuntimeError # Expects line and column numbers
 vm/type_cast_vm_test: RuntimeError # Line number mismatch.
 
+issue13474_test: SkipByDesign # Requires checked mode.
+assertion_test: SkipByDesign # Requires checked mode.
+named_parameters_type_test/01: SkipByDesign # Requires checked mode.
+named_parameters_type_test/02: SkipByDesign # Requires checked mode.
+named_parameters_type_test/03: SkipByDesign # Requires checked mode.
+type_checks_in_factory_method_test: SkipByDesign # Requires checked mode.
+positional_parameters_type_test/01: SkipByDesign # Requires checked mode.
+positional_parameters_type_test/02: SkipByDesign # Requires checked mode.
+list_literal4_test: SkipByDesign # Requires checked mode.
+generic_test: SkipByDesign # Requires checked mode.
+map_literal4_test: SkipByDesign # Requires checked mode.
+
 [ $runtime == dart_precompiled ]
-deferred_global_test: RuntimeError # Tries to produce a stack trace.
-ct_const2_test: Pass, Crash # Incompatible flag --compile_all
-hello_dart_test: Pass, Crash # Incompatible flag --compile_all
-
-implicit_closure_test: Pass, Crash # --use_slow_path
-
-deopt_inlined_function_lazy_test: Pass, Crash # Incompatible flag: --deoptimize-alot
+ct_const2_test: Skip # Incompatible flag: --compile_all
+hello_dart_test: Skip # Incompatible flag: --compile_all
+implicit_closure_test: Skip # Incompatible flag: --use_slow_path
+deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot
 
 [ $runtime == dart_product ]
 # Deferred loading happens eagerly (not sure why this works on precompiled code).
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index 5e0c4af..c8c95f3 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -42,9 +42,6 @@
 
 const_for_in_variable_test/01: MissingCompileTimeError # Issue 25161
 
-# Unsupported configuration specific imports.
-config_import_test: CompileTimeError # Issue 24579
-
 # Please add new failing tests before this line.
 # Section below is for invalid tests.
 #
@@ -517,3 +514,11 @@
 accessor_conflict_import_prefixed2_test: StaticWarning # Issue 25624
 accessor_conflict_import_prefixed_test: StaticWarning # Issue 25624
 accessor_conflict_import_test: StaticWarning # Issue 25624
+
+for_in3_test: StaticWarning, OK # Test should have warning by design.
+for_in_side_effects_test: StaticWarning, OK # Test uses custom class that does not implement Iterable in for-in.
+
+# Experimental feature: Syntactic support for generic methods.
+generic_functions_test: CompileTimeError # Issue 25868
+generic_methods_test: CompileTimeError # Issue 25868
+generic_sends_test: CompileTimeError # Issue 25868
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index a3327e4..f10bd63 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -7,7 +7,6 @@
 method_name_test: Fail # issue 25574
 
 async_star_cancel_while_paused_test: RuntimeError # Issue 22853
-async_star_await_pauses_test: Fail, Timeout # Issue 22853
 tearoff_basic_test: Skip # Tear-off not supported
 tearoff_constructor_basic_test: Skip # Tear-off not supported
 
@@ -36,9 +35,15 @@
 accessor_conflict_import_prefixed_test: RuntimeError # Issue 25626
 accessor_conflict_import_test: RuntimeError # Issue 25626
 
+# Experimental feature: Syntactic support for generic methods.
+generic_functions_test: CompileTimeError # Issue 25835
+generic_methods_test: CompileTimeError # Issue 25835
+generic_sends_test: CompileTimeError # Issue 25835
+
 [ $compiler == dart2js && $runtime == jsshell ]
 await_for_test: Skip # Jsshell does not provide periodic timers, Issue 7728
 async_star_test: RuntimeError # Jsshell does not provide non-zero timers, Issue 7728
+regress_23996_test: RuntimeError # Jsshell does not provide non-zero timers, Issue 7728
 async_star_no_cancel_test: RuntimeError # Need triage
 async_star_no_cancel2_test: RuntimeError # Need triage
 
@@ -203,12 +208,6 @@
 [ $compiler == dart2js && $runtime == none ]
 *: Fail, Pass # TODO(ahe): Triage these tests.
 
-[ $compiler == dart2js && $runtime == chrome && $system == macos ]
-await_future_test: Pass, Timeout # Issue 22695.
-async_await_test/none: Pass, Timeout # Issue 22695.
-async_await_test/02: Pass, Timeout # Issue 22695.
-async_await_test/03: Pass, Timeout # Issue 22695.
-
 [ $compiler == dart2js && ($runtime == safari || $runtime == safarimobilesim)]
 round_test: Fail, OK # Common JavaScript engine Math.round bug.
 
@@ -309,8 +308,14 @@
 regress_21795_test: Pass, RuntimeError # Due to inlining?
 
 [ $compiler == dart2js && $cps_ir && $host_checked ]
+accessor_conflict_export2_test: Crash # Duplicate export of 'x'
+accessor_conflict_export_test: Crash # Duplicate export of 'x'
 async_throw_in_catch_test/forceAwait: Crash # Issue 24485
 async_throw_in_catch_test/none: Crash # Issue 24485
 execute_finally9_test: Crash # Issue 24485
 regress_21795_test: Crash # Issue 24485
 regress_23537_test: Crash # Issue 24485
+try_finally_regress_25333_test: Crash # Issue 24485
+
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # `assert` not implemented
diff --git a/tests/language/large_implicit_getter_test.dart b/tests/language/large_implicit_getter_test.dart
index 8dac849..cd76da4 100644
--- a/tests/language/large_implicit_getter_test.dart
+++ b/tests/language/large_implicit_getter_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.
 // Dart test program for testing compilation of large implicit getters.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 List<List> panels = [
 [6853.940039224797,6050.837897021371]
diff --git a/tests/language/load_indexed_constant_test.dart b/tests/language/load_indexed_constant_test.dart
index cf45b18..57e4802 100644
--- a/tests/language/load_indexed_constant_test.dart
+++ b/tests/language/load_indexed_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 constant propgation of load-indexed operations
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/many_generic_instanceof_test.dart b/tests/language/many_generic_instanceof_test.dart
index a37e84e..ffaccd7 100644
--- a/tests/language/many_generic_instanceof_test.dart
+++ b/tests/language/many_generic_instanceof_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 library GenericInstanceofTest.dart;
 import "package:expect/expect.dart";
diff --git a/tests/language/many_overridden_no_such_method_test.dart b/tests/language/many_overridden_no_such_method_test.dart
index a9eb62e..e5c32ce 100644
--- a/tests/language/many_overridden_no_such_method_test.dart
+++ b/tests/language/many_overridden_no_such_method_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 library OverriddenNoSuchMethodTest.dart;
 
diff --git a/tests/language/mega_load_test.dart b/tests/language/mega_load_test.dart
index e7fc237..19be6ab 100644
--- a/tests/language/mega_load_test.dart
+++ b/tests/language/mega_load_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 megamorphic, but single target field load.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/megamorphic_no_such_method_test.dart b/tests/language/megamorphic_no_such_method_test.dart
index 92e0826..603fba4 100644
--- a/tests/language/megamorphic_no_such_method_test.dart
+++ b/tests/language/megamorphic_no_such_method_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 program for correct optimizations related to types fo allocated lists.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/mint_arithmetic_test.dart b/tests/language/mint_arithmetic_test.dart
index f8bf705..c9575f4 100644
--- a/tests/language/mint_arithmetic_test.dart
+++ b/tests/language/mint_arithmetic_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/mint_compares_test.dart b/tests/language/mint_compares_test.dart
index c2afbaf..7f51ce2d 100644
--- a/tests/language/mint_compares_test.dart
+++ b/tests/language/mint_compares_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/modulo_test.dart b/tests/language/modulo_test.dart
index f14d3c5..f94d756 100644
--- a/tests/language/modulo_test.dart
+++ b/tests/language/modulo_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.
 // Dart test optimization of modulo operator on Smi.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
@@ -15,7 +15,7 @@
     Expect.equals(i % 256, foo(i));
     Expect.equals(i % -256, boo(i));
     Expect.throws(() => hoo(i), (e) => e is IntegerDivisionByZeroException);
-    
+
     Expect.equals(i ~/ 254 + i % 254, fooTwo(i));
     Expect.equals(i ~/ -254 + i % -254, booTwo(i));
     Expect.throws(() => hooTwo(i), (e) => e is IntegerDivisionByZeroException);
@@ -26,7 +26,7 @@
     }
     Expect.equals((i ~/ 10) + (i % 10) + (i % 10), threeOp(i));
     Expect.equals((i ~/ 10) + (i ~/ 12) + (i % 10) + (i % 12), fourOp(i));
-    
+
     // Zero test is done outside the loop.
     if (i < 0) {
       Expect.equals(i % -i, foo2(i));
@@ -69,13 +69,13 @@
 fourOp(a) {
   var x0 = a ~/ 10;
   var x1 = a ~/ 12;
-  var y0 = a % 10; 
+  var y0 = a % 10;
   var y1 = a % 12;
   return x0 + x1 + y0 + y1;
 }
 
 foo2(i) {
-  // Make sure x has a range computed. 
+  // Make sure x has a range computed.
   var x = 0;
   if (i < 0) {
     x = -i;
@@ -87,7 +87,7 @@
 
 
 fooTwo2(i) {
-  // Make sure x has a range computed. 
+  // Make sure x has a range computed.
   var x = 0;
   if (i < 0) {
     x = -i;
diff --git a/tests/language/mul_recipr_test.dart b/tests/language/mul_recipr_test.dart
index da4d7a1..3c3534c 100644
--- a/tests/language/mul_recipr_test.dart
+++ b/tests/language/mul_recipr_test.dart
@@ -5,7 +5,7 @@
 // incorrect:
 // - (a * (1.0 / b))
 //
-// VMOptions=--optimization-counter-threshold=8 --no-use-osr
+// VMOptions=--optimization-counter-threshold=8 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/named_parameters_with_conversions_test.dart b/tests/language/named_parameters_with_conversions_test.dart
index a20b60d..213b8da 100644
--- a/tests/language/named_parameters_with_conversions_test.dart
+++ b/tests/language/named_parameters_with_conversions_test.dart
@@ -4,7 +4,7 @@
 //
 // Test named arguments work as expected regardless of whether the function or
 // method is called via function call syntax or method call syntax.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/nan_identical_test.dart b/tests/language/nan_identical_test.dart
index a567f80..07b66f3 100644
--- a/tests/language/nan_identical_test.dart
+++ b/tests/language/nan_identical_test.dart
@@ -2,21 +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.
 // Test a new statement by itself.
-// VMOptions=--optimization-counter-threshold=4
+// VMOptions=--optimization-counter-threshold=4 --no-background-compilation
 
 import 'dart:typed_data';
 
 import "package:expect/expect.dart";
 
-double uint64toDouble(int i) {
+double createOtherNAN() {
   var buffer = new Uint8List(8).buffer;
   var bdata = new ByteData.view(buffer);
-  bdata.setUint64(0, i);
-  return bdata.getFloat64(0);
-}
-
-double createOtherNAN() {
-  return uint64toDouble((1 << 64) - 2);
+  bdata.setFloat64(0, double.NAN);
+  bdata.setInt8(7, bdata.getInt8(7) ^ 1);  // Flip bit 0, big endian.
+  double result = bdata.getFloat64(0);
+  Expect.isTrue(result.isNaN);
+  return result;
 }
 
 main() {
diff --git a/tests/language/no_such_method3_test.dart b/tests/language/no_such_method3_test.dart
index 1a69e42..ba0d0ca 100644
--- a/tests/language/no_such_method3_test.dart
+++ b/tests/language/no_such_method3_test.dart
@@ -4,7 +4,7 @@
 
 // Test that a static type inferrer takes [noSuchMethod] into account.
 
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/no_such_method_dispatcher_test.dart b/tests/language/no_such_method_dispatcher_test.dart
index ca115913..3aad16f 100644
--- a/tests/language/no_such_method_dispatcher_test.dart
+++ b/tests/language/no_such_method_dispatcher_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/null_test.dart b/tests/language/null_test.dart
index ecb2e00..4439bd5 100644
--- a/tests/language/null_test.dart
+++ b/tests/language/null_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Second dart test program.
 
-// VMOptions=--optimization-counter-threshold=5
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 
 import "dart:mirrors";
 import "package:expect/expect.dart";
diff --git a/tests/language/nullaware_opt_test.dart b/tests/language/nullaware_opt_test.dart
index e83757a..853284a 100644
--- a/tests/language/nullaware_opt_test.dart
+++ b/tests/language/nullaware_opt_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.
 //
-// VMOptions=--optimization_counter_threshold=5
+// VMOptions=--optimization_counter_threshold=5 --no-background_compilation
 //
 // Basic null-aware operator test that invokes the optimizing compiler.
 
diff --git a/tests/language/number_identity2_test.dart b/tests/language/number_identity2_test.dart
index 655ac51..c4737f5 100644
--- a/tests/language/number_identity2_test.dart
+++ b/tests/language/number_identity2_test.dart
@@ -5,7 +5,7 @@
 //
 // Contains test that is failing on dart2js. Merge this test with
 // 'number_identity_test.dart' once fixed.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 import 'dart:typed_data';
diff --git a/tests/language/number_identity_test.dart b/tests/language/number_identity_test.dart
index fa072ea..6d41b4c 100644
--- a/tests/language/number_identity_test.dart
+++ b/tests/language/number_identity_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.
 // Dart test program for testing params.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/optimize_redundant_array_load_test.dart b/tests/language/optimize_redundant_array_load_test.dart
index 14549d2..856b225 100644
--- a/tests/language/optimize_redundant_array_load_test.dart
+++ b/tests/language/optimize_redundant_array_load_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/optimized_constant_array_string_access_test.dart b/tests/language/optimized_constant_array_string_access_test.dart
index 22f3771..632e6bb 100644
--- a/tests/language/optimized_constant_array_string_access_test.dart
+++ b/tests/language/optimized_constant_array_string_access_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/optimized_hoisting_checked_mode_assert_test.dart b/tests/language/optimized_hoisting_checked_mode_assert_test.dart
index 81ff2e2..3399678 100644
--- a/tests/language/optimized_hoisting_checked_mode_assert_test.dart
+++ b/tests/language/optimized_hoisting_checked_mode_assert_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/optimized_isempty_test.dart b/tests/language/optimized_isempty_test.dart
index d223c8b..d32f932 100644
--- a/tests/language/optimized_isempty_test.dart
+++ b/tests/language/optimized_isempty_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 // Test optimization and polymorphic inlining of String.isEmpty.
 
diff --git a/tests/language/optimized_lists_test.dart b/tests/language/optimized_lists_test.dart
index d92fe3d..e55fa83 100644
--- a/tests/language/optimized_lists_test.dart
+++ b/tests/language/optimized_lists_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 program for correct optimizations related to types fo allocated lists.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/optimized_setter_test.dart b/tests/language/optimized_setter_test.dart
index e1c4f3d..2c81877 100644
--- a/tests/language/optimized_setter_test.dart
+++ b/tests/language/optimized_setter_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 various setter situations, testing special cases in optimizing compiler.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/optimized_string_charat_test.dart b/tests/language/optimized_string_charat_test.dart
index b7ca22f..176ecd4 100644
--- a/tests/language/optimized_string_charat_test.dart
+++ b/tests/language/optimized_string_charat_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/optimized_string_charcodeat_test.dart b/tests/language/optimized_string_charcodeat_test.dart
index 98f4397..1493db6 100644
--- a/tests/language/optimized_string_charcodeat_test.dart
+++ b/tests/language/optimized_string_charcodeat_test.dart
@@ -1,7 +1,7 @@
 // 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=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 // Test optimized CodeUnitAt and array access.
 
diff --git a/tests/language/osr_test.dart b/tests/language/osr_test.dart
index 6d31b85..e4afb7b 100644
--- a/tests/language/osr_test.dart
+++ b/tests/language/osr_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=5
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 // Test correct OSR (issue 16151).
 
 import "dart:collection";
@@ -9,18 +9,18 @@
 
 List create([int length]) {
   return new MyList(length);
-}  
+}
 
 main() {
-  test(create);  
+  test(create);
 }
 
 
 class MyList<E> extends ListBase<E> {
   List<E> _list;
-  
+
   MyList([int length]): _list = (length==null ? new List() : new List(length));
-  
+
   E operator [](int index) => _list[index];
 
   void operator []=(int index, E value) {
@@ -36,7 +36,7 @@
 
 
 test(List create([int length])) {
-  sort_A01_t02_test(create);  
+  sort_A01_t02_test(create);
 }
 
 //  From library co19 sort_A01_t02.
diff --git a/tests/language/range_analysis_test.dart b/tests/language/range_analysis_test.dart
index 8226a68..240073e 100644
--- a/tests/language/range_analysis_test.dart
+++ b/tests/language/range_analysis_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.
 // Dart test program for constructors and initializers.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/regress_11800_test.dart b/tests/language/regress_11800_test.dart
index 14c8a6f..8b7217b 100644
--- a/tests/language/regress_11800_test.dart
+++ b/tests/language/regress_11800_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/regress_23996_test.dart b/tests/language/regress_23996_test.dart
new file mode 100644
index 0000000..4401a46
--- /dev/null
+++ b/tests/language/regress_23996_test.dart
@@ -0,0 +1,77 @@
+// 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:async_helper/async_helper.dart";
+
+/// This test verifies that an await for loop sends the correct
+/// signals to the stream it iterates over:
+/// 1) A listen event.
+/// 2) A pause event when the loop body is awaiting something,
+///    and more elements arrive on the stream.  See issue
+///    https://github.com/dart-lang/sdk/issues/23996 .
+/// 3) A resume event, when the loop is again ready to iterate.
+main() {
+  Completer listenEventReceived = new Completer();
+  Completer pauseEventReceived = new Completer();
+  Completer resumeEventReceived = new Completer();
+  StreamController controller = new StreamController(
+      onListen: () => listenEventReceived.complete(),
+      onPause: () => pauseEventReceived.complete(),
+      onResume: () => resumeEventReceived.complete());
+
+  Completer forLoopEntered = new Completer();
+
+  /// The send function puts items on the stream. It waits for a
+  /// listener, puts "first" on the stream, waits for the for loop
+  /// to start (and eventually block), puts "second" on the stream
+  /// multiple times, letting the event loop run, until the for loop
+  /// pauses the stream because it it blocked.
+  /// The for loop unblocks after the pause message is received, and
+  /// reads the stream items, sending a stream resume message when it
+  /// is ready for more.
+  /// Then the send function puts a final "third" on the stream, and
+  /// closes the stream.
+  send() async {
+    await listenEventReceived.future;
+    controller.add('first');
+    await forLoopEntered.future;
+    var timer = new Timer.periodic(new Duration(milliseconds: 10), (timer) {
+      controller.add('second');
+    });
+    await pauseEventReceived.future;
+    // pauseEventReceived.future completes when controller.stream is
+    // paused by the await-for loop below. What's specified is that
+    // await-for must pause immediately on an "await", but instead
+    // the implementations agree on not pausing until receiving the
+    // next event. For this reason, [timer] will call its callback at
+    // least once before we cancel it again.
+    timer.cancel();
+    await resumeEventReceived.future;
+    controller.add('third');
+    controller.close();
+  }
+
+  receive() async {
+    bool thirdReceived = false;
+    await for (var entry in controller.stream) {
+      if (entry == 'first') {
+        forLoopEntered.complete();
+        await pauseEventReceived.future;
+      } else if (entry == 'third') {
+        thirdReceived = true;
+      }
+    }
+    if (!thirdReceived) {
+      throw "Error in await-for loop: 'third' not received";
+    }
+  }
+
+  asyncTest(() async {
+    // We need to start both functions in parallel, and wait on them both.
+    var f = send();
+    await receive();
+    await f;
+  });
+}
diff --git a/tests/language/regress_25935_test.dart b/tests/language/regress_25935_test.dart
new file mode 100644
index 0000000..1e653ad
--- /dev/null
+++ b/tests/language/regress_25935_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  AddIssueSourceMember2 m = new AddIssueSourceMember2();
+}
+
+abstract class RepoListEditorState2<M extends RepoListMember2<M>,
+        S extends RepoListEditorState2<M, S>>
+    extends AbstractListEditorState2<M, S> {}
+
+abstract class AbstractListEditorState2<
+    M extends AbstractListMember2<Object, M>,
+    S extends AbstractListEditorState2<M, S>> extends ComponentState2<S> {}
+
+class AddIssueSourceMember2 extends RepoListMember2<AddIssueSourceMember2> {}
+
+class RepoListMember2<M extends RepoListMember2<M>>
+    extends AbstractListMember2<Object, M> {}
+
+abstract class AbstractListMember2<E, M extends AbstractListMember2<E, M>>
+    extends ComponentState2<M> {}
+
+abstract class ComponentState2<S extends ComponentState2<S>> {}
+
diff --git a/tests/language/regress_26175_test.dart b/tests/language/regress_26175_test.dart
new file mode 100644
index 0000000..e4af4bb
--- /dev/null
+++ b/tests/language/regress_26175_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+// Test that local variable reads and writes are sequenced correctly with
+// respect to reads and writes in an awaited Future.  See issue 26175.
+
+// Reads are sequenced correctly with respect to writes in a Future.
+Future test1() async {
+  var x = 'a';
+  f() async => x = 'b';
+  Expect.equals('abb', '${x}${await f()}${x}');
+}
+
+// Writes are sequenced correctly with respect to writes in a Future.
+Future test2(ignore) async {
+  var x;
+  f() async => x = 'b';
+  Expect.equals('abb', '${x = 'a'}${await f()}${x}');
+}
+
+// Writes are sequenced correctly with respect to reads in a Future.
+Future test3(ignore) async {
+  var x = 'a';
+  f() async => x;
+  Expect.equals('bbb', '${x = 'b'}${await f()}${x}');
+}
+
+// Repeat the same tests for static variables.
+var cell = 'a';
+
+asyncReadCell() async => cell;
+asyncWriteCell(value) async => cell = value;
+
+Future test4(ignore) async {
+  // This test assumes that it can read the initial value of cell.
+  Expect.equals('abb', '${cell}${await asyncWriteCell('b')}${cell}');
+}
+
+Future test5(ignore) async {
+  Expect.equals('abb', '${cell = 'a'}${await asyncWriteCell('b')}${cell}');
+}
+
+Future test6(ignore) async {
+  Expect.equals('bbb', '${cell = 'b'}${await asyncReadCell()}${cell}');
+}
+
+// Test that throwing is sequenced correctly with respect to other effects.
+Future test7(ignore) async {
+  cell = 'a';
+  try {
+    Expect.equals('unreachable',
+        '${throw 0}${await asyncWriteCell('b')}${cell}');
+  } catch (_) {
+    Expect.equals('a', cell);
+  }
+}
+
+main() {
+  asyncStart();
+  test1()
+      .then(test2)
+      .then(test3)
+      .then(test4)
+      .then(test5)
+      .then(test6)
+      .then(test7)
+      .then((_) => asyncEnd());
+}
diff --git a/tests/language/smi_type_test.dart b/tests/language/smi_type_test.dart
index dddfdbe..2b5af74 100644
--- a/tests/language/smi_type_test.dart
+++ b/tests/language/smi_type_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=8
+// VMOptions=--optimization-counter-threshold=8 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/strict_equal_test.dart b/tests/language/strict_equal_test.dart
index be7ab0f..0fddafb 100644
--- a/tests/language/strict_equal_test.dart
+++ b/tests/language/strict_equal_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/string_charcode_test.dart b/tests/language/string_charcode_test.dart
index 8e3f883..d81f1ac 100644
--- a/tests/language/string_charcode_test.dart
+++ b/tests/language/string_charcode_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/string_intrinsics_test.dart b/tests/language/string_intrinsics_test.dart
index 8daf75c..c3e8cc7 100644
--- a/tests/language/string_intrinsics_test.dart
+++ b/tests/language/string_intrinsics_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Replace with shared test once interface issues clarified.
 // Test various String intrinsics
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/sync_generator1_test.dart b/tests/language/sync_generator1_test.dart
index 6c2b7d7..88e1fd4 100644
--- a/tests/language/sync_generator1_test.dart
+++ b/tests/language/sync_generator1_test.dart
@@ -4,7 +4,7 @@
 
 // Simple test program for sync* generator functions.
 
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/truncdiv_test.dart b/tests/language/truncdiv_test.dart
index 8a00c73..5bbcf10 100644
--- a/tests/language/truncdiv_test.dart
+++ b/tests/language/truncdiv_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.
 // Dart test optimization of modulo operator on Smi.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
@@ -24,7 +24,7 @@
 foo(i, x) => i % x;
 
 foo2(i) {
-  // Make sure x has a range computed. 
+  // Make sure x has a range computed.
   var x = 0;
   if (i < 0) {
     x = -i;
diff --git a/tests/language/try_catch2_test.dart b/tests/language/try_catch2_test.dart
index 003255d..9ccc5c7 100644
--- a/tests/language/try_catch2_test.dart
+++ b/tests/language/try_catch2_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing try/catch statement without any exceptions
 // being thrown. (Nested try/catch blocks).
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/try_catch3_test.dart b/tests/language/try_catch3_test.dart
index 09cf98b..a022965 100644
--- a/tests/language/try_catch3_test.dart
+++ b/tests/language/try_catch3_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing try/catch statement without any exceptions
 // being thrown.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/try_catch4_test.dart b/tests/language/try_catch4_test.dart
index 9d39f11..14bba33 100644
--- a/tests/language/try_catch4_test.dart
+++ b/tests/language/try_catch4_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Check that our SSA graph does have the try body a predecessor of a
 // try/finally.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/try_catch5_test.dart b/tests/language/try_catch5_test.dart
index 5aa16e9..97dc857 100644
--- a/tests/language/try_catch5_test.dart
+++ b/tests/language/try_catch5_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Check that our SSA graph does have the try body a predecessor of a
 // try/finally.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/try_catch_optimized1_test.dart b/tests/language/try_catch_optimized1_test.dart
index d1be3da..850506b 100644
--- a/tests/language/try_catch_optimized1_test.dart
+++ b/tests/language/try_catch_optimized1_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/try_catch_optimized2_test.dart b/tests/language/try_catch_optimized2_test.dart
index aa7a9f3..a88ca8f 100644
--- a/tests/language/try_catch_optimized2_test.dart
+++ b/tests/language/try_catch_optimized2_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/try_catch_optimized3_test.dart b/tests/language/try_catch_optimized3_test.dart
index e0e8437..d8bb851 100644
--- a/tests/language/try_catch_optimized3_test.dart
+++ b/tests/language/try_catch_optimized3_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/try_catch_optimized4_test.dart b/tests/language/try_catch_optimized4_test.dart
index 7cad947..b3dd0dd 100644
--- a/tests/language/try_catch_optimized4_test.dart
+++ b/tests/language/try_catch_optimized4_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/try_catch_osr_test.dart b/tests/language/try_catch_osr_test.dart
index 7533ba0..5348560 100644
--- a/tests/language/try_catch_osr_test.dart
+++ b/tests/language/try_catch_osr_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Test OSR in different places of a try-catch.
 
diff --git a/tests/language/try_catch_test.dart b/tests/language/try_catch_test.dart
index fb36300..dcf4cba 100644
--- a/tests/language/try_catch_test.dart
+++ b/tests/language/try_catch_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
@@ -172,7 +172,7 @@
       Expect.fail("unreachable");
     }
   }
-      
+
 
   static void testMain() {
     test1();
diff --git a/tests/language/type_propagation_assert_assignable_test.dart b/tests/language/type_propagation_assert_assignable_test.dart
index 352a5842..3a694c3 100644
--- a/tests/language/type_propagation_assert_assignable_test.dart
+++ b/tests/language/type_propagation_assert_assignable_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.
 // Check that type of the AssertAssignable is recomputed correctly.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/allocation_sinking_vm_test.dart b/tests/language/vm/allocation_sinking_vm_test.dart
index 55b5f35..bda372f 100644
--- a/tests/language/vm/allocation_sinking_vm_test.dart
+++ b/tests/language/vm/allocation_sinking_vm_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 allocation sinking optimization.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import 'dart:typed_data';
 import 'package:expect/expect.dart';
diff --git a/tests/language/vm/canonicalization_preserves_deopt_test.dart b/tests/language/vm/canonicalization_preserves_deopt_test.dart
index 76c97a6..d030bf1 100644
--- a/tests/language/vm/canonicalization_preserves_deopt_test.dart
+++ b/tests/language/vm/canonicalization_preserves_deopt_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization_counter_threshold=10 --no-use-osr
+// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/debug_break_enabled_vm_test.dart b/tests/language/vm/debug_break_enabled_vm_test.dart
index e9b3f05..4003e77 100644
--- a/tests/language/vm/debug_break_enabled_vm_test.dart
+++ b/tests/language/vm/debug_break_enabled_vm_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=5 --enable-debug-break
+// VMOptions=--optimization-counter-threshold=5 --enable-debug-break --no-background-compilation
 
 // Verify that the optimizer does not trip over the debug break (StopInstr).
 
diff --git a/tests/language/vm/deopt_hoisted_smi_check_vm_test.dart b/tests/language/vm/deopt_hoisted_smi_check_vm_test.dart
index 6f6381d..091eed0 100644
--- a/tests/language/vm/deopt_hoisted_smi_check_vm_test.dart
+++ b/tests/language/vm/deopt_hoisted_smi_check_vm_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 deoptimization on an optimistically hoisted smi check.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10  --no-background-compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/vm/if_conversion_vm_test.dart b/tests/language/vm/if_conversion_vm_test.dart
index 2d97d4d..8fbcc3b 100644
--- a/tests/language/vm/if_conversion_vm_test.dart
+++ b/tests/language/vm/if_conversion_vm_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Test if-convertion pass in the optimizing compiler.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/issue11087_vm_test.dart b/tests/language/vm/issue11087_vm_test.dart
index f2a8fba..fbfab0e 100644
--- a/tests/language/vm/issue11087_vm_test.dart
+++ b/tests/language/vm/issue11087_vm_test.dart
@@ -5,7 +5,7 @@
 // Regression test for VM's IfConverted pass not keeping graph structure and
 // use lists in sync.
 
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 class A {
   int x;
diff --git a/tests/language/vm/licm_constant_redefinition_vm_test.dart b/tests/language/vm/licm_constant_redefinition_vm_test.dart
index 24f481e..662cb4b 100644
--- a/tests/language/vm/licm_constant_redefinition_vm_test.dart
+++ b/tests/language/vm/licm_constant_redefinition_vm_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization_counter_threshold=100 --no-use-osr
+// VMOptions=--optimization_counter_threshold=100 --no-use-osr --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/load_to_load_forwarding_vm_test.dart b/tests/language/vm/load_to_load_forwarding_vm_test.dart
index f97e662..9fca276 100644
--- a/tests/language/vm/load_to_load_forwarding_vm_test.dart
+++ b/tests/language/vm/load_to_load_forwarding_vm_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test correctness of side effects tracking used by load to load forwarding.
 
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 import "dart:typed_data";
diff --git a/tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart b/tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart
index 0d9790f..fbfd10b 100644
--- a/tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart
+++ b/tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart
@@ -4,7 +4,7 @@
 // Test correctness of side effects tracking used by load to load forwarding.
 // Should be merged into load_to_load_forwarding once Issue 22151 is fixed.
 
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 import "dart:typed_data";
diff --git a/tests/language/vm/math_vm_test.dart b/tests/language/vm/math_vm_test.dart
index e672e9c..c38b3a0 100644
--- a/tests/language/vm/math_vm_test.dart
+++ b/tests/language/vm/math_vm_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.
 // Tests that the VM does not crash on weird corner cases of class Math.
-// VMOptions=--optimization_counter_threshold=100
+// VMOptions=--optimization_counter_threshold=100 --no-background_compilation
 
 library math_vm_test;
 
diff --git a/tests/language/vm/no_such_method_error_message_vm_test.dart b/tests/language/vm/no_such_method_error_message_vm_test.dart
index 481e3fe0..6be2738 100644
--- a/tests/language/vm/no_such_method_error_message_vm_test.dart
+++ b/tests/language/vm/no_such_method_error_message_vm_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/null_hashcode_optimized_vm_test.dart b/tests/language/vm/null_hashcode_optimized_vm_test.dart
index a214c29..d7263a7 100644
--- a/tests/language/vm/null_hashcode_optimized_vm_test.dart
+++ b/tests/language/vm/null_hashcode_optimized_vm_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 optimized Object.hashCode works for the null receiver.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 main() {
   for (int i = 0; i < 20; i++) {
diff --git a/tests/language/vm/optimization_test.dart b/tests/language/vm/optimization_test.dart
index 0b54b5e..1dea3bd 100644
--- a/tests/language/vm/optimization_test.dart
+++ b/tests/language/vm/optimization_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 various optimizations and deoptimizations of optimizing compiler..
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/optimized_await_regress_test.dart b/tests/language/vm/optimized_await_regress_test.dart
index 86337bf..b7bedb9 100644
--- a/tests/language/vm/optimized_await_regress_test.dart
+++ b/tests/language/vm/optimized_await_regress_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.
 
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // This tests that captured parameters (by the async-closure) are
 // correctly treated in try-catch generated in the async function.
diff --git a/tests/language/vm/optimized_check_class_test.dart b/tests/language/vm/optimized_check_class_test.dart
index c1e32bf..07757b2 100644
--- a/tests/language/vm/optimized_check_class_test.dart
+++ b/tests/language/vm/optimized_check_class_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/optimized_guarded_field_isolates_test.dart b/tests/language/vm/optimized_guarded_field_isolates_test.dart
index a150656..3c6a9c2 100644
--- a/tests/language/vm/optimized_guarded_field_isolates_test.dart
+++ b/tests/language/vm/optimized_guarded_field_isolates_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization_counter_threshold=100
+// VMOptions=--optimization_counter_threshold=100 --no-background_compilation
 
 // Test field type tracking and field list-length tracking in the presence of
 // multiple isolates.
diff --git a/tests/language/vm/optimized_guarded_field_test.dart b/tests/language/vm/optimized_guarded_field_test.dart
index aefdace..1a0748e 100644
--- a/tests/language/vm/optimized_guarded_field_test.dart
+++ b/tests/language/vm/optimized_guarded_field_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test correct handling of phis with only environment uses that were inserted
 // by store to load forwarding.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import "package:expect/expect.dart";
 import "dart:typed_data";
diff --git a/tests/language/vm/optimized_identical_test.dart b/tests/language/vm/optimized_identical_test.dart
index 84a69ca..c7a0202 100644
--- a/tests/language/vm/optimized_identical_test.dart
+++ b/tests/language/vm/optimized_identical_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 various optimizations and deoptimizations of optimizing compiler..
-// VMOptions=--optimization-counter-threshold=10 --no-constant-propagation
+// VMOptions=--optimization-counter-threshold=10 --no-constant-propagation --no-background-compilation
 
 import "package:expect/expect.dart";
 
@@ -13,7 +13,7 @@
 test(a) {
   var dbl = a + 1.0;
   if (!identical(dbl, true)) {
-    return "ok"; 
+    return "ok";
   }
   throw "fail";
 }
diff --git a/tests/language/vm/optimized_polymorphic_list_access_test.dart b/tests/language/vm/optimized_polymorphic_list_access_test.dart
index 6ab48f9..77e5c12 100644
--- a/tests/language/vm/optimized_polymorphic_list_access_test.dart
+++ b/tests/language/vm/optimized_polymorphic_list_access_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/optimized_shl_test.dart b/tests/language/vm/optimized_shl_test.dart
index 559506c..0134248 100644
--- a/tests/language/vm/optimized_shl_test.dart
+++ b/tests/language/vm/optimized_shl_test.dart
@@ -2,7 +2,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/optimized_testsmi_test.dart b/tests/language/vm/optimized_testsmi_test.dart
index c5ac9e2..f5ef8c7 100644
--- a/tests/language/vm/optimized_testsmi_test.dart
+++ b/tests/language/vm/optimized_testsmi_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 // Test branch optimization for TestSmiInstr
 
diff --git a/tests/language/vm/optimized_try_catch_cha_test.dart b/tests/language/vm/optimized_try_catch_cha_test.dart
new file mode 100644
index 0000000..a75b0d2
--- /dev/null
+++ b/tests/language/vm/optimized_try_catch_cha_test.dart
@@ -0,0 +1,41 @@
+// 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=--optimization_counter_threshold=100 --no-use-osr --no-background_compilation
+
+// Test CHA-based optimizations in presence of try-catch.
+
+import "package:expect/expect.dart";
+
+bar(i) {
+  if (i == 11) throw 123;
+}
+
+class A {
+  var f = 42;
+  
+  foo(i) {
+    do {
+      try {
+        bar(i);
+      } catch (e, s) {
+        Expect.equals(123, e);
+      }
+    } while (i < 0);
+    return f;
+  }
+}
+
+class B extends A {
+
+}
+
+main() {
+  var result;
+  for (var i = 0; i < 200; i++) {
+    try {
+      result = new B().foo(i);
+    } catch (e) { }
+  }
+  Expect.equals(42, result);
+}
diff --git a/tests/language/vm/regress_14903_test.dart b/tests/language/vm/regress_14903_test.dart
index b7eaaaa..68616d4 100644
--- a/tests/language/vm/regress_14903_test.dart
+++ b/tests/language/vm/regress_14903_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10 
+// VMOptions=--optimization-counter-threshold=10  --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/regress_21245_test.dart b/tests/language/vm/regress_21245_test.dart
index 8fa7bb0..2e588fb 100644
--- a/tests/language/vm/regress_21245_test.dart
+++ b/tests/language/vm/regress_21245_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization_counter_threshold=10 --no-use-osr
+// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background_compilation
 
 test(a) {
   var e;
diff --git a/tests/language/vm/regress_22480_test.dart b/tests/language/vm/regress_22480_test.dart
index 3cbe98a..f0425a1 100644
--- a/tests/language/vm/regress_22480_test.dart
+++ b/tests/language/vm/regress_22480_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/vm/regress_22541_vm_test.dart b/tests/language/vm/regress_22541_vm_test.dart
index 36b4618..0d121ac 100644
--- a/tests/language/vm/regress_22541_vm_test.dart
+++ b/tests/language/vm/regress_22541_vm_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 range inference for multiplication of two negative values.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/vm/regress_22693_vm_test.dart b/tests/language/vm/regress_22693_vm_test.dart
index 1cd07f9..6df2a46 100644
--- a/tests/language/vm/regress_22693_vm_test.dart
+++ b/tests/language/vm/regress_22693_vm_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 location summary for Uint32 multiplication.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 const MASK = 0xFFFFFFFF;
 
diff --git a/tests/language/vm/regress_23117_vm_test.dart b/tests/language/vm/regress_23117_vm_test.dart
index 550d550..9b781ef 100644
--- a/tests/language/vm/regress_23117_vm_test.dart
+++ b/tests/language/vm/regress_23117_vm_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 location summary for Uint32 multiplication.
-// VMOptions=--optimization-counter-threshold=5
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/vm/reusable_boxes_test.dart b/tests/language/vm/reusable_boxes_test.dart
index a70cade..4e88e4a 100644
--- a/tests/language/vm/reusable_boxes_test.dart
+++ b/tests/language/vm/reusable_boxes_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 correct handling reusable boxes.
-// VMOptions=--optimization_counter_threshold=100
+// VMOptions=--optimization_counter_threshold=100 --no-background_compilation
 
 library reusable_boxes_test;
 
diff --git a/tests/language/vm/store_elimination_vm_test.dart b/tests/language/vm/store_elimination_vm_test.dart
index 8a3dcd7..21e2102 100644
--- a/tests/language/vm/store_elimination_vm_test.dart
+++ b/tests/language/vm/store_elimination_vm_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test correctness of side effects tracking used by load to load forwarding.
 
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/language/vm/store_to_load_forwarding_phis_vm_test.dart b/tests/language/vm/store_to_load_forwarding_phis_vm_test.dart
index 72ee9b3..9157795 100644
--- a/tests/language/vm/store_to_load_forwarding_phis_vm_test.dart
+++ b/tests/language/vm/store_to_load_forwarding_phis_vm_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test correct handling of phis with only environment uses that were inserted
 // by store to load forwarding.
-// VMOptions=--optimization_counter_threshold=100
+// VMOptions=--optimization_counter_threshold=100 --no-background_compilation
 
 library store_to_load_forwarding_phis_vm_test;
 
diff --git a/tests/language/vm/string_polymorphic_test.dart b/tests/language/vm/string_polymorphic_test.dart
index e7c6410..72eac28 100644
--- a/tests/language/vm/string_polymorphic_test.dart
+++ b/tests/language/vm/string_polymorphic_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.
 // Tests that the VM does not crash on weird corner cases of class Math.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/vm/type_propagation_test.dart b/tests/language/vm/type_propagation_test.dart
index 2783654..e42aca24 100644
--- a/tests/language/vm/type_propagation_test.dart
+++ b/tests/language/vm/type_propagation_test.dart
@@ -1,10 +1,10 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=1000 --max-polymorphic-checks=1
+// VMOptions=--optimization-counter-threshold=1000 --max-polymorphic-checks=1 --no-background-compilation
 
 // Test correct loop invariant code motion and type propagation from is-checks
-// and null-comparisons. 
+// and null-comparisons.
 
 class B {
   var b;
diff --git a/tests/language/vm/typed_data_polymorphic_view_test.dart b/tests/language/vm/typed_data_polymorphic_view_test.dart
index 94952e2..694c899 100644
--- a/tests/language/vm/typed_data_polymorphic_view_test.dart
+++ b/tests/language/vm/typed_data_polymorphic_view_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.
 // Tests that the VM does not crash on weird corner cases of class Math.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import 'dart:typed_data';
 import 'package:expect/expect.dart';
diff --git a/tests/language/vm/uint32_add_test.dart b/tests/language/vm/uint32_add_test.dart
index 46723be..4b66d0e 100644
--- a/tests/language/vm/uint32_add_test.dart
+++ b/tests/language/vm/uint32_add_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/vm/uint32_right_shift_test.dart b/tests/language/vm/uint32_right_shift_test.dart
index 6c7ae5f..d44b84e 100644
--- a/tests/language/vm/uint32_right_shift_test.dart
+++ b/tests/language/vm/uint32_right_shift_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/vm/uint32_shift_test.dart b/tests/language/vm/uint32_shift_test.dart
index fa8cb38..3f9f7e2 100644
--- a/tests/language/vm/uint32_shift_test.dart
+++ b/tests/language/vm/uint32_shift_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/lib/convert/base64_test.dart b/tests/lib/convert/base64_test.dart
index 457e330..4a2c1ab 100644
--- a/tests/lib/convert/base64_test.dart
+++ b/tests/lib/convert/base64_test.dart
@@ -31,16 +31,23 @@
   // Direct.
   String encodedNormal = BASE64.encode(list);
   String encodedPercent = encodedNormal.replaceAll("=", "%3D");
-  String uriEncoded = encodedNormal.replaceAll("+", "-").replaceAll("/", "_");
+  String uriEncoded = BASE64URL.encode(list);
+  String expectedUriEncoded =
+      encodedNormal.replaceAll("+", "-").replaceAll("/", "_");
+  Expect.equals(expectedUriEncoded, uriEncoded);
+
   List result = BASE64.decode(encodedNormal);
   Expect.listEquals(list, result, name);
   result = BASE64.decode(encodedPercent);
   Expect.listEquals(list, result, name);
+  result = BASE64.decode(uriEncoded);
+  Expect.listEquals(list, result, name);
 
   int increment = list.length ~/ 7 + 1;
   // Chunked.
   for (int i = 0; i < list.length; i += increment) {
     for (int j = i; j < list.length; j += increment) {
+      // Normal
       {
         // Using add/close
         var results;
@@ -64,6 +71,30 @@
         var name = "0-$i-$j-${list.length}: $list";
         Expect.equals(encodedNormal, results.join(""), name);
       }
+      // URI
+      {
+        // Using add/close
+        var results;
+        var sink = new ChunkedConversionSink.withCallback((v) { results = v; });
+        var encoder = BASE64URL.encoder.startChunkedConversion(sink);
+        encoder.add(list.sublist(0, i));
+        encoder.add(list.sublist(i, j));
+        encoder.add(list.sublist(j, list.length));
+        encoder.close();
+        var name = "0-$i-$j-${list.length}: list";
+        Expect.equals(uriEncoded, results.join(""), name);
+      }
+      {
+        // Using addSlice
+        var results;
+        var sink = new ChunkedConversionSink.withCallback((v) { results = v; });
+        var encoder = BASE64URL.encoder.startChunkedConversion(sink);
+        encoder.addSlice(list, 0, i, false);
+        encoder.addSlice(list, i, j, false);
+        encoder.addSlice(list, j, list.length, true);
+        var name = "0-$i-$j-${list.length}: $list";
+        Expect.equals(uriEncoded, results.join(""), name);
+      }
     }
   }
 
@@ -119,6 +150,7 @@
   }
   void badDecode(String string) {
     Expect.throws(() => BASE64.decode(string), isFormatException, string);
+    Expect.throws(() => BASE64URL.decode(string), isFormatException, string);
     badChunkDecode([string]);
     badChunkDecode(["", string]);
     badChunkDecode([string, ""]);
diff --git a/tests/lib/convert/chunked_conversion1_test.dart b/tests/lib/convert/chunked_conversion1_test.dart
index 0bbe44b..3c84b3e 100644
--- a/tests/lib/convert/chunked_conversion1_test.dart
+++ b/tests/lib/convert/chunked_conversion1_test.dart
@@ -54,7 +54,8 @@
   specialB(o) => add(o);
 }
 
-class IntBoolConverter1 extends Converter<List<int>, List<bool>> {
+class IntBoolConverter1 extends
+    ChunkedConverter<List<int>, List<bool>, int, bool> {
   List<bool> convert(List<int> input) => input.map((x) => x > 0).toList();
 
   startChunkedConversion(sink) {
@@ -63,7 +64,8 @@
   }
 }
 
-class BoolIntConverter1 extends Converter<List<bool>, List<int>> {
+class BoolIntConverter1 extends
+    ChunkedConverter<List<bool>, List<int>, bool, int> {
   List<int> convert(List<bool> input) => input.map((x) => x ? 1 : 0).toList();
 
   startChunkedConversion(sink) {
@@ -104,7 +106,7 @@
   close() => outSink.close();
 }
 
-class IdentityConverter extends Converter {
+class IdentityConverter extends ChunkedConverter {
   convert(x) => x;
 
   startChunkedConversion(sink) {
diff --git a/tests/lib/convert/json_test.dart b/tests/lib/convert/json_test.dart
index cfed8d9..ef7b077 100644
--- a/tests/lib/convert/json_test.dart
+++ b/tests/lib/convert/json_test.dart
@@ -1,6 +1,8 @@
 // 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.
+// Disable background compilation so that the Issue 24908 can be reproduced.
+// VMOptions=--no-background-compilation
 
 library json_test;
 
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index a8623b4..8b9fb54 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -78,6 +78,7 @@
 mirrors/other_declarations_location_test: CompileTimeError # Issue 10905
 mirrors/parameter_test/none: RuntimeError # Issue 6490
 mirrors/parameter_of_mixin_app_constructor_test: RuntimeError # Issue 6490
+mirrors/private_class_field_test: CompileTimeError
 mirrors/private_symbol_test: CompileTimeError # Issue 13597
 mirrors/private_types_test: RuntimeError # Issue 6490
 mirrors/redirecting_factory_test/none: RuntimeError # Issue 6490
@@ -105,7 +106,6 @@
 [ $runtime == safari || $runtime == safarimobilesim ]
 typed_data/int32x4_test: Fail, Pass # Safari has an optimization bug (nightlies are already fine).
 typed_data/float32x4_test: Fail, Pass # Safari has an optimization bug (nightlies are already fine).
-mirrors/null_test: Fail # Issue 16831
 convert/json_test: Fail # https://bugs.webkit.org/show_bug.cgi?id=134920
 
 [ ($runtime == safari && $builder_tag == mac10_7)|| $runtime == safarimobilesim ]
@@ -262,6 +262,7 @@
 
 [ $compiler == dart2js && $runtime == safarimobilesim ]
 mirrors/mirrors_reader_test: SkipSlow # Times out. Issue 20806.
+mirrors/null_test: Fail # Issue 16831
 
 [ $compiler == dart2js && $runtime == jsshell ]
 async/schedule_microtask_test: Fail  # Preamble file does not correctly implement scheduleImmediate.
@@ -321,9 +322,6 @@
 [ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $mode == debug && $arch == x64 && $system == windows ]
 convert/streamed_conversion_json_utf8_decode_test: Pass, Slow
 
-[ ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_product) && $mode == release && $arch == ia32 && $system == windows ]
-convert/json_test: RuntimeError # Issue 24908
-
 [ $mode == debug && $arch != ia32 && $arch != x64 && $arch != simarm && $arch != simarmv6 && $arch != simarmv5te ]
 convert/streamed_conversion_json_utf8_decode_test: Skip  # Verification not yet implemented.
 
@@ -336,11 +334,20 @@
 async/stream_iterator_test: Crash # (Stream createCancel...  cannot handle sync*/async* functions
 mirrors/parameter_annotation_mirror_test: Pass, Fail # Issue 25501.  Depends on inlining.
 
-[ $compiler == dart2js && $cps_ir && $host_checked ]
-mirrors/circular_factory_redirection_test/02: Crash # Assertion failure: Constant constructor already computed for generative_constructor(A#circular2)
-mirrors/mirrors_used_typedef_declaration_test/01: Crash # Assertion failure: typedef(Foo) has not been checked for cycles.
-mirrors/mirrors_used_typedef_declaration_test/none: Crash # Assertion failure: typedef(Foo) has not been checked for cycles.
-mirrors/typedef_library_test: Crash # Assertion failure: typedef(G) has not been checked for cycles.
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # Issue 25761
+
+[ $compiler == dart2js && $host_checked ]
+mirrors/circular_factory_redirection_test/02: Crash # Assertion failure: Constant constructor already computed for generative_constructor(A#circular2).  Issue 25911
+mirrors/metadata_allowed_values_test/28: Crash # Issue 25911
+mirrors/metadata_allowed_values_test/29: Crash # Issue 25911
+mirrors/metadata_allowed_values_test/30: Crash # Issue 25911
+mirrors/metadata_allowed_values_test/31: Crash # Issue 25911
+
+[ $compiler == dart2js && $host_checked && $unchecked ]
+mirrors/mirrors_used_typedef_declaration_test/01: Crash # Assertion failure: typedef(Foo) has not been checked for cycles. Issue 25911
+mirrors/mirrors_used_typedef_declaration_test/none: Crash # Assertion failure: typedef(Foo) has not been checked for cycles. Issue 25911
+mirrors/typedef_library_test: Crash # Assertion failure: typedef(G) has not been checked for cycles. Issue 25911
 
 [ $compiler != dart2js ]
 async/dart2js_uncaught_error_test: Skip  # JS-integration only test
@@ -348,11 +355,9 @@
 [ $noopt && $arch == simarm64 ]
 async/slow_consumer2_test: Pass, RuntimeError # Issue 25726
 
-[ $noopt || $compiler == precompiler ]
+[ $noopt || $compiler == precompiler || $mode == product ]
 mirrors/*: SkipByDesign
+
+[ $noopt || $compiler == precompiler ]
 convert/chunked_conversion_utf88_test: Pass, Timeout
 convert/utf85_test: Pass, Timeout
-
-[ $runtime == vm && $mode == product ]
-mirrors/mirrors_reader_test: Fail,OK  # Expects exact type name.
-
diff --git a/tests/lib/math/double_pow_test.dart b/tests/lib/math/double_pow_test.dart
index 4736b5c..83a8ece 100644
--- a/tests/lib/math/double_pow_test.dart
+++ b/tests/lib/math/double_pow_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=5
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 
 library math_test;
 import "package:expect/expect.dart";
diff --git a/tests/lib/math/min_max_test.dart b/tests/lib/math/min_max_test.dart
index 1f89185..cf58169 100644
--- a/tests/lib/math/min_max_test.dart
+++ b/tests/lib/math/min_max_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.
 // Dart test for testing Math.min and Math.max.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 library min_max_test;
 import "package:expect/expect.dart";
diff --git a/tests/lib/mirrors/mirror_in_static_init_test.dart b/tests/lib/mirrors/mirror_in_static_init_test.dart
index ae52922..471675e 100644
--- a/tests/lib/mirrors/mirror_in_static_init_test.dart
+++ b/tests/lib/mirrors/mirror_in_static_init_test.dart
@@ -19,7 +19,7 @@
 
 final int staticField = () {
   var lib = currentMirrorSystem().findLibrary(#mirror_in_static_init_test);
-  var lst = new List.from(lib.declarations.values);
+  var lst = new List.from(lib.declarations[#C].declarations.values);
   return 42;
 }();
 
diff --git a/tests/lib/mirrors/private_class_field_other.dart b/tests/lib/mirrors/private_class_field_other.dart
new file mode 100644
index 0000000..85238b6
--- /dev/null
+++ b/tests/lib/mirrors/private_class_field_other.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C {
+  static var _privateField = 42;
+}
+
+get privateFieldSymbolInOther => #_privateField;
\ No newline at end of file
diff --git a/tests/lib/mirrors/private_class_field_test.dart b/tests/lib/mirrors/private_class_field_test.dart
new file mode 100644
index 0000000..cedf903
--- /dev/null
+++ b/tests/lib/mirrors/private_class_field_test.dart
@@ -0,0 +1,20 @@
+// 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.
+
+// Test a private field name doesn't match the equivalent private name from
+// another library.
+
+import 'dart:mirrors';
+import 'package:expect/expect.dart';
+
+import 'private_class_field_other.dart';
+
+void main() {
+  var classMirror = reflectClass(C);
+  // The symbol is private w/r/t the wrong library.
+  Expect.throws(() => classMirror.getField(#_privateField),
+                (e) => e is NoSuchMethodError);
+
+  Expect.equals(42, classMirror.getField(privateFieldSymbolInOther).reflectee);
+}
diff --git a/tests/lib/typed_data/float32x4_clamp_test.dart b/tests/lib/typed_data/float32x4_clamp_test.dart
index 816fe0d..0109478 100644
--- a/tests/lib/typed_data/float32x4_clamp_test.dart
+++ b/tests/lib/typed_data/float32x4_clamp_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_clamp_test;
diff --git a/tests/lib/typed_data/float32x4_cross_test.dart b/tests/lib/typed_data/float32x4_cross_test.dart
index 3268488..1bfeb5d 100644
--- a/tests/lib/typed_data/float32x4_cross_test.dart
+++ b/tests/lib/typed_data/float32x4_cross_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_cross_test;
diff --git a/tests/lib/typed_data/float32x4_list_test.dart b/tests/lib/typed_data/float32x4_list_test.dart
index d0e509b..901f712 100644
--- a/tests/lib/typed_data/float32x4_list_test.dart
+++ b/tests/lib/typed_data/float32x4_list_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background_compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_list_test;
diff --git a/tests/lib/typed_data/float32x4_shuffle_test.dart b/tests/lib/typed_data/float32x4_shuffle_test.dart
index 751ad2d..651d2e0 100644
--- a/tests/lib/typed_data/float32x4_shuffle_test.dart
+++ b/tests/lib/typed_data/float32x4_shuffle_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_shuffle_test;
diff --git a/tests/lib/typed_data/float32x4_sign_mask_test.dart b/tests/lib/typed_data/float32x4_sign_mask_test.dart
index 95825d4..06a0bb0 100644
--- a/tests/lib/typed_data/float32x4_sign_mask_test.dart
+++ b/tests/lib/typed_data/float32x4_sign_mask_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_sign_mask;
diff --git a/tests/lib/typed_data/float32x4_test.dart b/tests/lib/typed_data/float32x4_test.dart
index 782aca4..0e5eeb2 100644
--- a/tests/lib/typed_data/float32x4_test.dart
+++ b/tests/lib/typed_data/float32x4_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_test;
diff --git a/tests/lib/typed_data/float32x4_transpose_test.dart b/tests/lib/typed_data/float32x4_transpose_test.dart
index ecb39fb..c75b8ef 100644
--- a/tests/lib/typed_data/float32x4_transpose_test.dart
+++ b/tests/lib/typed_data/float32x4_transpose_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_transpose_test;
diff --git a/tests/lib/typed_data/float32x4_two_arg_shuffle_test.dart b/tests/lib/typed_data/float32x4_two_arg_shuffle_test.dart
index d0df59d..ebd1ac6 100644
--- a/tests/lib/typed_data/float32x4_two_arg_shuffle_test.dart
+++ b/tests/lib/typed_data/float32x4_two_arg_shuffle_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_two_arg_shuffle_test;
diff --git a/tests/lib/typed_data/float32x4_unbox_phi_test.dart b/tests/lib/typed_data/float32x4_unbox_phi_test.dart
index 9309642..c44ae5e 100644
--- a/tests/lib/typed_data/float32x4_unbox_phi_test.dart
+++ b/tests/lib/typed_data/float32x4_unbox_phi_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_unbox_regress_test;
diff --git a/tests/lib/typed_data/float32x4_unbox_regress_test.dart b/tests/lib/typed_data/float32x4_unbox_regress_test.dart
index 155804f..abb00d6 100644
--- a/tests/lib/typed_data/float32x4_unbox_regress_test.dart
+++ b/tests/lib/typed_data/float32x4_unbox_regress_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library float32x4_unbox_regress_test;
diff --git a/tests/lib/typed_data/float64x2_functional_test.dart b/tests/lib/typed_data/float64x2_functional_test.dart
index 7ae6cee..67359e1 100644
--- a/tests/lib/typed_data/float64x2_functional_test.dart
+++ b/tests/lib/typed_data/float64x2_functional_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 library float64x2_functional_test;
 
diff --git a/tests/lib/typed_data/float64x2_typed_list_test.dart b/tests/lib/typed_data/float64x2_typed_list_test.dart
index b00cfd4..95db6c6 100644
--- a/tests/lib/typed_data/float64x2_typed_list_test.dart
+++ b/tests/lib/typed_data/float64x2_typed_list_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 library float64x2_typed_list_test;
 
diff --git a/tests/lib/typed_data/int32x4_arithmetic_test.dart b/tests/lib/typed_data/int32x4_arithmetic_test.dart
index 0cf81b7..f558840 100644
--- a/tests/lib/typed_data/int32x4_arithmetic_test.dart
+++ b/tests/lib/typed_data/int32x4_arithmetic_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library uint32x4_arithmetic_test;
diff --git a/tests/lib/typed_data/int32x4_bigint_test.dart b/tests/lib/typed_data/int32x4_bigint_test.dart
index c4b8ab1..282a7fb 100644
--- a/tests/lib/typed_data/int32x4_bigint_test.dart
+++ b/tests/lib/typed_data/int32x4_bigint_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library int32x4_bigint_test;
diff --git a/tests/lib/typed_data/int32x4_list_test.dart b/tests/lib/typed_data/int32x4_list_test.dart
index 4fa1976..70480bd 100644
--- a/tests/lib/typed_data/int32x4_list_test.dart
+++ b/tests/lib/typed_data/int32x4_list_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library int32x4_list_test;
diff --git a/tests/lib/typed_data/int32x4_shuffle_test.dart b/tests/lib/typed_data/int32x4_shuffle_test.dart
index d2b4bc6..79d81c7 100644
--- a/tests/lib/typed_data/int32x4_shuffle_test.dart
+++ b/tests/lib/typed_data/int32x4_shuffle_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library uint32x4_shuffle_test;
diff --git a/tests/lib/typed_data/int32x4_sign_mask_test.dart b/tests/lib/typed_data/int32x4_sign_mask_test.dart
index b4e620e..522054d 100644
--- a/tests/lib/typed_data/int32x4_sign_mask_test.dart
+++ b/tests/lib/typed_data/int32x4_sign_mask_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library int32x4_sign_mask;
diff --git a/tests/lib/typed_data/int32x4_test.dart b/tests/lib/typed_data/int32x4_test.dart
index 7e7d258..06fd62b 100644
--- a/tests/lib/typed_data/int32x4_test.dart
+++ b/tests/lib/typed_data/int32x4_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 library int32x4_test;
 
diff --git a/tests/lib/typed_data/int64_list_load_store_test.dart b/tests/lib/typed_data/int64_list_load_store_test.dart
index 6dd09c6..de8cd4e 100644
--- a/tests/lib/typed_data/int64_list_load_store_test.dart
+++ b/tests/lib/typed_data/int64_list_load_store_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Test that the compiler's load elimination phase sees interfering writes to
 // the array's buffer.
diff --git a/tests/lib/typed_data/simd_store_to_load_forward_test.dart b/tests/lib/typed_data/simd_store_to_load_forward_test.dart
index 4fae48f..d7757b7 100644
--- a/tests/lib/typed_data/simd_store_to_load_forward_test.dart
+++ b/tests/lib/typed_data/simd_store_to_load_forward_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library simd_store_to_load_forward_test;
diff --git a/tests/lib/typed_data/simd_type_check_removal.dart b/tests/lib/typed_data/simd_type_check_removal.dart
index 8aaef06..bffb456 100644
--- a/tests/lib/typed_data/simd_type_check_removal.dart
+++ b/tests/lib/typed_data/simd_type_check_removal.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10
+// VMOptions=--deoptimization_counter_threshold=1000 --optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library simd_store_to_load_forward_test;
diff --git a/tests/lib/typed_data/typed_data_hierarchy_int64_test.dart b/tests/lib/typed_data/typed_data_hierarchy_int64_test.dart
index 3b38bb6..a96c86a 100644
--- a/tests/lib/typed_data/typed_data_hierarchy_int64_test.dart
+++ b/tests/lib/typed_data/typed_data_hierarchy_int64_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library typed_data_hierarchy_int64_test;
diff --git a/tests/lib/typed_data/typed_data_hierarchy_test.dart b/tests/lib/typed_data/typed_data_hierarchy_test.dart
index eba0e7b..242c2c2 100644
--- a/tests/lib/typed_data/typed_data_hierarchy_test.dart
+++ b/tests/lib/typed_data/typed_data_hierarchy_test.dart
@@ -1,7 +1,7 @@
 // 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.
-// VMOptions=--optimization-counter-threshold=10
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
 
 // Library tag to be able to run in html test framework.
 library typed_data_hierarchy_test;
diff --git a/tests/standalone/array_bounds_check_generalization_test.dart b/tests/standalone/array_bounds_check_generalization_test.dart
index 2b6099d..c9326e6 100644
--- a/tests/standalone/array_bounds_check_generalization_test.dart
+++ b/tests/standalone/array_bounds_check_generalization_test.dart
@@ -4,7 +4,7 @@
 //
 // We are using --complete-timeline below to ensure that we get timeline events
 // generated during all phases of compilation and deoptimization.
-// VMOptions=--optimization_counter_threshold=10 --no-use-osr --complete-timeline
+// VMOptions=--optimization_counter_threshold=10 --no-use-osr --complete-timeline --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/standalone/double_smi_comparison_test.dart b/tests/standalone/double_smi_comparison_test.dart
index 1e18c46..fff6015 100644
--- a/tests/standalone/double_smi_comparison_test.dart
+++ b/tests/standalone/double_smi_comparison_test.dart
@@ -5,7 +5,7 @@
 // Smi arguments. We convert Smi to doubles and to the operation. This is
 // not correct in 64-bit mode where not every Smi can be converted to a
 // double without loss of precision.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/standalone/float_array_test.dart b/tests/standalone/float_array_test.dart
index 2be1711..bf4588a 100644
--- a/tests/standalone/float_array_test.dart
+++ b/tests/standalone/float_array_test.dart
@@ -4,7 +4,7 @@
 //
 // Dart test program for testing native float arrays.
 
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 // Library tag to be able to run in html test framework.
 library FloatArrayTest;
diff --git a/tests/standalone/full_coverage_test.dart b/tests/standalone/full_coverage_test.dart
deleted file mode 100644
index e719d42..0000000
--- a/tests/standalone/full_coverage_test.dart
+++ /dev/null
@@ -1,247 +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.
-
-// These tests fork a second VM process that runs the script
-// ``tools/full-coverage.dart'' and verifies that the tool
-// produces the expeced output.
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-
-import 'package:path/path.dart' as path;
-import 'package:unittest/unittest.dart';
-
-final String coverageScript =
-    Platform.script.resolve('../../tools/full-coverage.dart').toFilePath();
-final String packageRoot = Platform.packageRoot;
-final List dartBaseArgs = ['--package-root=${packageRoot}', '--checked',];
-final Stopwatch sw = new Stopwatch();
-
-int elapsed() => sw.elapsedMilliseconds;
-
-// With line numbers starting at 0, the list of hits can be understood as
-// follows:
-// * -1: No coverage data on this line.
-// *  0: No hits on this line.
-// *  1: ``Some'' hits on this line.
-final coverageTests = [
-  {
-    'name': 'faculty',
-    'program': '''
-dummy () {
-  for (int i = 0; i < 100; i++) {
-    print(i);
-  }
-}
-
-int fac(int n) {
-  int f = 1;
-  for (int i = 1; i <= n; i++) {
-    f *= i;
-  }
-  return f;
-}
-
-main() {
-  if (false) {
-    dummy(11);
-  } else {
-    fac(10);
-  }
-}
-''',
-    'expectedHits': [-1, 0, 0, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1,
-                     -1, 0, -1, 1, -1, -1]
-  },{
-    'name': 'closures',
-    'program': '''
-main() {
-  foo(bar) {
-    bar();
-  }
-
-  foo(() {
-    print("in closure");
-  });
-}
-''',
-    'expectedHits': [-1, -1, 1, -1, -1, 1, 1, -1, -1]
-  }
-];
-
-
-String prepareEnv() {
-  Directory testDir = Directory.systemTemp.createTempSync("coverage-");
-  for (var coverageProg in coverageTests) {
-    var coverageProgDir = new Directory(
-        path.join(testDir.path, coverageProg["name"]))
-      ..createSync();
-    var f = new File(path.join(coverageProgDir.path,
-        "${coverageProg['name']}.dart"));
-    f.writeAsStringSync(coverageProg["program"], mode: FileMode.WRITE);
-  }
-  return testDir.path;
-}
-
-
-destroyEnv(base) => new Directory(base).deleteSync(recursive: true);
-
-
-generateCoverage(String workingDirectory) {
-  for (var coverageProg in coverageTests) {
-    print('[+${elapsed()}ms] Generating data for ${coverageProg["name"]}');
-    var progPath = path.join(workingDirectory, coverageProg['name']);
-    var script = path.join(progPath, "${coverageProg['name']}.dart");
-    var dartArgs = new List.from(dartBaseArgs)
-      ..addAll(['--coverage-dir=${progPath}', '${script}']);
-    var result = Process.runSync(Platform.executable, dartArgs);
-    if (result.exitCode != 0) {
-      print("[+${elapsed()}ms] Got exitCode: ${result.exitCode}.");
-      print("stderr:\n${result.stderr}\n");
-      expect(result.exitCode, 0);
-    }
-  }
-}
-
-
-Future<Process> convertCoverage(String programDir, String format) {
-  var dartArgs = new List.from(dartBaseArgs)
-      ..addAll([
-        coverageScript,
-        '--package-root=${packageRoot}',
-        '--in=${programDir}',
-        format
-      ]);
-  return Process.start(Platform.executable, dartArgs);
-}
-
-
-class PrettyPrintDescriptor {
-  var _programPath;
-  var _validFormat = new RegExp(r"^\s*\d*\|.*$", multiLine: true);
-  var _pattern = new RegExp(r"^\s*(\d+)\|", multiLine: true);
-
-  PrettyPrintDescriptor(this._programPath);
-
-  get sectionStart => _programPath;
-  get sectionEnd => '/';
-  get coverageParameter => '--pretty-print';
-
-  hitData(line) {
-    expect(_validFormat.hasMatch(line), isTrue);
-    var match = _pattern.firstMatch(line);
-    var result = -1;
-    if (match != null) {
-      result = (int.parse(match.group(1)) != 0) ? 1 : 0;
-    }
-    return [result];
-  }
-}
-
-
-class LcovDescriptor {
-  var _pattern = new RegExp(r"^DA:(\d+),(\d+)$", multiLine: true);
-  var _programPath;
-  var _line_nr = 0;
-
-  LcovDescriptor(this._programPath);
-
-  get sectionStart => 'SF:${_programPath}';
-  get sectionEnd => 'end_of_record';
-  get coverageParameter => '--lcov';
-
-  hitData(line) {
-    expect(_pattern.hasMatch(line), isTrue);
-    var match = _pattern.firstMatch(line);
-    // Lcov data starts at line 1, we start at 0.
-    var out_line = int.parse(match[1]) - 1;
-    var hitCount = int.parse(match[2]);
-    var result = [];
-    for ( ; _line_nr < out_line; _line_nr++) {
-      result.add(-1);
-    }
-    result.add((hitCount != 0) ? 1 : 0);
-    _line_nr++;
-    return result;
-  }
-}
-
-
-Stream filterHitData(input, descriptor) {
-  bool in_program_section = false;
-  return input.where((line) {
-    if (in_program_section) {
-      if (line.startsWith(descriptor.sectionEnd)) {
-        in_program_section = false;
-        return false;
-      }
-      return true;
-    }
-    if (line.startsWith(descriptor.sectionStart)) {
-      in_program_section = true;
-    }
-    return false;
-  }).map((line) {
-    return descriptor.hitData(line);
-  });
-}
-
-
-testCoverage(String programDir, String programPath, descriptor,
-             List expectedHitMap) {
-  var p = convertCoverage(programDir, descriptor.coverageParameter);
-  expect(p.then((process) {
-    var hitStream = filterHitData(
-        process.stdout.transform(UTF8.decoder)
-                      .transform(const LineSplitter()),
-        descriptor);
-    var hitMap = [];
-    var subscription = hitStream.listen((data) {
-      // Flatten results.
-      data.forEach((e) => hitMap.add(e));
-    });
-    expect(subscription.asFuture().then((_) {
-      hitMap.forEach((e) {
-        expect(e, expectedHitMap.removeAt(0));
-      });
-      // Make sure that there are only lines left that do not contain coverage
-      // data.
-      expectedHitMap.forEach((e) => expect(e, -1));
-    }), completes);
-  }), completes);
-}
-
-
-main() {
-  String testingDirectory;
-  sw.start();
-
-  setUp(() {
-    testingDirectory = prepareEnv();
-  });
-
-  tearDown(() => destroyEnv(testingDirectory));
-
-  test('CoverageTests', () {
-    print('[+${elapsed()}ms] Generating coverage data...');
-    generateCoverage(testingDirectory);
-    print('[+${elapsed()}ms] Done Generating coverage data.');
-
-    print('[+${elapsed()}ms] Running tests...');
-    coverageTests.forEach((cTest) {
-      String programDir = path.join(testingDirectory, cTest['name']);
-      String programPath = path.join(programDir, "${cTest['name']}.dart");
-      print('[+${elapsed()}ms] Testing lcov for ${cTest["name"]}');
-      testCoverage(programDir, programPath,
-                   new LcovDescriptor(programPath),
-                   new List.from(cTest['expectedHits']));
-      print('[+${elapsed()}ms] Testing pretty print for ${cTest["name"]}');
-      testCoverage(programDir, programPath,
-                   new PrettyPrintDescriptor(programPath),
-                   new List.from(cTest['expectedHits']));
-    });
-    print('[+${elapsed()}ms] Done.');
-  });
-}
diff --git a/tests/standalone/int_list_test.dart b/tests/standalone/int_list_test.dart
index c3510ff..2f13b01 100644
--- a/tests/standalone/int_list_test.dart
+++ b/tests/standalone/int_list_test.dart
@@ -5,7 +5,7 @@
 // Dart Mint representations and type propagation issue.
 // Testing Int32List and Uint32List loads.
 //
-// VMOptions=--optimization-counter-threshold=5 --no-use-osr
+// VMOptions=--optimization-counter-threshold=5 --no-use-osr --no-background-compilation
 
 import 'dart:typed_data';
 import "package:expect/expect.dart";
diff --git a/tests/standalone/io/certificates/client1_key.p12 b/tests/standalone/io/certificates/client1_key.p12
index d9cf05b..5d11e73 100644
--- a/tests/standalone/io/certificates/client1_key.p12
+++ b/tests/standalone/io/certificates/client1_key.p12
Binary files differ
diff --git a/tests/standalone/io/certificates/client1_key_malformed.pem b/tests/standalone/io/certificates/client1_key_malformed.pem
index 33a79bf..8c1f7d8 100644
--- a/tests/standalone/io/certificates/client1_key_malformed.pem
+++ b/tests/standalone/io/certificates/client1_key_malformed.pem
@@ -1,4 +1,3 @@
------BEGIN ENCRYPTED PRIVATE KEY-----
 MIIE4jAcBgoqhkiG9w0BDAEBMA4ECF4ZB27y60SWAgIIAASCBMCEL3ZCzfC0q+m+
 B8gM9jQe1JFRD5reAuwK6+3speBS4KE+wjbcyQq09/5UoQu3Dci1WG1nKLB1u0Bk
 w9NuRahWCpvVLzz/GQ6Psesixq3V69zD3N6iMl/XQKymQBwGK51xIkeJO+6Skh2d
diff --git a/tests/standalone/io/certificates/client_authority_malformed.pem b/tests/standalone/io/certificates/client_authority_malformed.pem
index d206dce3..d0aeff4 100644
--- a/tests/standalone/io/certificates/client_authority_malformed.pem
+++ b/tests/standalone/io/certificates/client_authority_malformed.pem
@@ -1,4 +1,3 @@
------BEGIN CERTIFICATE-----
 MIIDKjCCAhKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDEw9jbGll
 bnRhdXRob3JpdHkwHhcNMTUxMDI3MTAyNjM1WhcNMjUxMDI0MTAyNjM1WjAaMRgw
 FgYDVQQDEw9jbGllbnRhdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
diff --git a/tests/standalone/io/certificates/server_chain.p12 b/tests/standalone/io/certificates/server_chain.p12
index 1e8c66d..79e412d 100644
--- a/tests/standalone/io/certificates/server_chain.p12
+++ b/tests/standalone/io/certificates/server_chain.p12
Binary files differ
diff --git a/tests/standalone/io/certificates/server_chain_malformed1.pem b/tests/standalone/io/certificates/server_chain_malformed1.pem
index cbbeb55..cb623fd 100644
--- a/tests/standalone/io/certificates/server_chain_malformed1.pem
+++ b/tests/standalone/io/certificates/server_chain_malformed1.pem
@@ -1,4 +1,3 @@
------BEGIN CERTIFICATE-----
 MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVpbnRl
 cm1lZGlhdGVhdXRob3JpdHkwHhcNMTUxMDI3MTAyNjM1WhcNMjUxMDI0MTAyNjM1
 WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
diff --git a/tests/standalone/io/certificates/server_chain_malformed2.pem b/tests/standalone/io/certificates/server_chain_malformed2.pem
index 2c99e78..978c523 100644
--- a/tests/standalone/io/certificates/server_chain_malformed2.pem
+++ b/tests/standalone/io/certificates/server_chain_malformed2.pem
@@ -1,4 +1,3 @@
------BEGIN CERTIFICATE-----
 MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVpbnRl
 cm1lZGlhdGVhdXRob3JpdHkwHhcNMTUxMDI3MTAyNjM1WhcNMjUxMDI0MTAyNjM1
 WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
diff --git a/tests/standalone/io/certificates/server_key.p12 b/tests/standalone/io/certificates/server_key.p12
index 2434fb7..204d42d 100644
--- a/tests/standalone/io/certificates/server_key.p12
+++ b/tests/standalone/io/certificates/server_key.p12
Binary files differ
diff --git a/tests/standalone/io/certificates/trusted_certs.p12 b/tests/standalone/io/certificates/trusted_certs.p12
index 167f2e8..76c76ec 100644
--- a/tests/standalone/io/certificates/trusted_certs.p12
+++ b/tests/standalone/io/certificates/trusted_certs.p12
Binary files differ
diff --git a/tests/standalone/io/certificates/trusted_certs_malformed.pem b/tests/standalone/io/certificates/trusted_certs_malformed.pem
index ea26cc7..f96698e 100644
--- a/tests/standalone/io/certificates/trusted_certs_malformed.pem
+++ b/tests/standalone/io/certificates/trusted_certs_malformed.pem
@@ -1,4 +1,3 @@
------BEGIN CERTIFICATE-----
 MIIC+zCCAeOgAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1yb290
 YXV0aG9yaXR5MB4XDTE1MTAyNzEwMjYzNFoXDTI1MTAyNDEwMjYzNFowGDEWMBQG
 A1UEAwwNcm9vdGF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
@@ -6,3 +5,4 @@
 FfaHczXQTwnTCaYA4u4uSDvSOsFFEfxEwYORsdKmQEM8nGpVX2NVvKsMcGIhh8kh
 ZwJfkMIOcAxmGIHGdMhF8VghonJ8uGiuqktxdfpARq0g3fqIjDHsF9/LpfshUfk9
 wsRyTF0yr90U/dsfnE+u8l7GvVl8j2Zegp0sagAGtLaNv7tP17AibqEGg2yDBrBN
+a
diff --git a/tests/standalone/io/https_bad_certificate_test.dart b/tests/standalone/io/https_bad_certificate_test.dart
index 90c630f..7dc5aa2 100644
--- a/tests/standalone/io/https_bad_certificate_test.dart
+++ b/tests/standalone/io/https_bad_certificate_test.dart
@@ -57,8 +57,8 @@
                  result) async {
   HttpClient client = new HttpClient(context: context);
   client.badCertificateCallback = (X509Certificate certificate, host, port) {
-    Expect.equals('/CN=rootauthority', certificate.subject);
-    Expect.equals('/CN=rootauthority', certificate.issuer);
+    Expect.isTrue(certificate.subject.contains('rootauthority'));
+    Expect.isTrue(certificate.issuer.contains('rootauthority'));
     // Throw exception if one is requested.
     if (callbackReturns == 'exception') throw new CustomException();
     return callbackReturns;
diff --git a/tests/standalone/io/secure_bad_certificate_test.dart b/tests/standalone/io/secure_bad_certificate_test.dart
index 610bcdb..7b28284 100644
--- a/tests/standalone/io/secure_bad_certificate_test.dart
+++ b/tests/standalone/io/secure_bad_certificate_test.dart
@@ -55,8 +55,8 @@
                  callbackReturns,
                  result) async {
   badCertificateCallback(X509Certificate certificate) {
-    Expect.equals('/CN=rootauthority', certificate.subject);
-    Expect.equals('/CN=rootauthority', certificate.issuer);
+    Expect.isTrue(certificate.subject.contains('rootauthority'));
+    Expect.isTrue(certificate.issuer.contains('rootauthority'));
     // Throw exception if one is requested.
     if (callbackReturns == 'exception') throw new CustomException();
     return callbackReturns;
diff --git a/tests/standalone/io/secure_builtin_roots_test.dart b/tests/standalone/io/secure_builtin_roots_test.dart
index 6cb85d6..ce89d11 100644
--- a/tests/standalone/io/secure_builtin_roots_test.dart
+++ b/tests/standalone/io/secure_builtin_roots_test.dart
@@ -13,7 +13,7 @@
   // We need to use an external server that is backed by a
   // built-in root certificate authority.
   try {
-  // First, check if the lookup works.
+    // First, check if the lookup works.
     await InternetAddress.lookup('www.google.com');
     var request = await client.getUrl(Uri.parse('https://www.google.com'));
     request.followRedirects = false;
diff --git a/tests/standalone/io/secure_server_client_certificate_test.dart b/tests/standalone/io/secure_server_client_certificate_test.dart
index 6891037..4c16ab0 100644
--- a/tests/standalone/io/secure_server_client_certificate_test.dart
+++ b/tests/standalone/io/secure_server_client_certificate_test.dart
@@ -66,15 +66,15 @@
   X509Certificate clientCertificate = serverEnd.peerCertificate;
   if (sendCert) {
     Expect.isNotNull(clientCertificate);
-    Expect.equals("/CN=user1", clientCertificate.subject);
-    Expect.equals("/CN=clientauthority", clientCertificate.issuer);
+    Expect.isTrue(clientCertificate.subject.contains("user1"));
+    Expect.isTrue(clientCertificate.issuer.contains("clientauthority"));
   } else {
     Expect.isNull(clientCertificate);
   }
   X509Certificate serverCertificate = clientEnd.peerCertificate;
   Expect.isNotNull(serverCertificate);
-  Expect.equals("/CN=localhost", serverCertificate.subject);
-  Expect.equals("/CN=intermediateauthority", serverCertificate.issuer);
+  Expect.isTrue(serverCertificate.subject.contains("localhost"));
+  Expect.isTrue(serverCertificate.issuer.contains("intermediateauthority"));
   clientEnd.close();
   serverEnd.close();
 }
diff --git a/tests/standalone/io/secure_socket_alpn_test.dart b/tests/standalone/io/secure_socket_alpn_test.dart
index 8599991..8bd4e27 100644
--- a/tests/standalone/io/secure_socket_alpn_test.dart
+++ b/tests/standalone/io/secure_socket_alpn_test.dart
@@ -113,6 +113,9 @@
 }
 
 main() {
+  if (!SecurityContext.alpnSupported) {
+    return 0;
+  }
   final longname256 = 'p' * 256;
   final String longname255 = 'p' * 255;
   final String strangelongname255 = 'ø' + 'p' * 253;
diff --git a/tests/standalone/io/secure_socket_test.dart b/tests/standalone/io/secure_socket_test.dart
index 1566b5a..bf128df 100644
--- a/tests/standalone/io/secure_socket_test.dart
+++ b/tests/standalone/io/secure_socket_test.dart
@@ -50,6 +50,7 @@
 
 Future test(String certType, String password) {
   List<int> body = <int>[];
+  Completer completer = new Completer();
   startServer(certType, password).then((server) {
     SecureSocket.connect(
         "localhost", server.port, context: clientContext(certType, password))
@@ -65,14 +66,17 @@
           Expect.equals(72, body[0]);
           Expect.equals(9, body[body.length - 1]);
           server.close();
+          completer.complete(null);
         },
         onError: (e, trace) {
           String msg = "Unexpected error $e";
           if (trace != null) msg += "\nStackTrace: $trace";
           Expect.fail(msg);
+          completer.complete(null);
         });
     });
   });
+  return completer.future;
 }
 
 main() async {
diff --git a/tests/standalone/io/security_context_argument_test.dart b/tests/standalone/io/security_context_argument_test.dart
index e5332ac..fc6ff1c 100644
--- a/tests/standalone/io/security_context_argument_test.dart
+++ b/tests/standalone/io/security_context_argument_test.dart
@@ -44,10 +44,10 @@
         tlsException);
     Expect.throws(() => c.setClientAuthorities(
         localFile('certificates/server_key.p12')),
-        argumentError);
+        tlsException);
     Expect.throws(() => c.setClientAuthorities(
         localFile('certificates/server_key.p12'), password: "iHackSites"),
-        argumentError);
+        tlsException);
 
     // File does not exist
     Expect.throws(() => c.usePrivateKey(
@@ -97,7 +97,7 @@
         tlsException);
     Expect.throws(() => c.setTrustedCertificatesBytes([]), tlsException);
     Expect.throws(() => c.useCertificateChainBytes([]), tlsException);
-    Expect.throws(() => c.setClientAuthoritiesBytes([]), argumentError);
+    Expect.throws(() => c.setClientAuthoritiesBytes([]), tlsException);
 
     // Malformed PEM certs.
     Expect.throws(() => c.usePrivateKey(
@@ -115,10 +115,7 @@
         tlsException);
     Expect.throws(() => c.setClientAuthorities(
         localFile('certificates/client_authority_malformed.pem')),
-        argumentError);
-
-    c.usePrivateKey(
-        localFile('certificates/server_key.pem'), password: "dartdart");
+        tlsException);
 }
 
 void main() {
diff --git a/tests/standalone/map_literal_oom_test.dart b/tests/standalone/map_insert_remove_oom_test.dart
similarity index 100%
rename from tests/standalone/map_literal_oom_test.dart
rename to tests/standalone/map_insert_remove_oom_test.dart
diff --git a/tests/standalone/pair_location_remapping_test.dart b/tests/standalone/pair_location_remapping_test.dart
index 277ccc5..98abdf1 100644
--- a/tests/standalone/pair_location_remapping_test.dart
+++ b/tests/standalone/pair_location_remapping_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 pair locations are remaped in slow path environments.
-// VMOptions=--optimization_counter_threshold=10 --no-use-osr
+// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background_compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/standalone/precompilation_dart2js_test.dart b/tests/standalone/precompilation_dart2js_test.dart
deleted file mode 100644
index 0deafcb..0000000
--- a/tests/standalone/precompilation_dart2js_test.dart
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test generating and running a simple precompiled snapshot of this script.
-
-import 'dart:io';
-
-main(List args) {
-  if (args.length > 0 && args[0] == "--hello") {
-    print("Hello");
-    return;
-  }
-
-  var cc, cc_flags, shared, libname;
-  if (Platform.isLinux) {
-    cc = 'gcc';
-    shared = '-shared';
-    libname = 'libprecompiled.so';
-  } else if (Platform.isMacOS) {
-    cc = 'clang';
-    shared = '-dynamiclib';
-    libname = 'libprecompiled.dylib';
-  } else {
-    print("Test only supports Linux and Mac");
-    return;
-  }
-
-  if (Platform.version.contains("x64")) {
-    cc_flags = "-m64";
-  } else if (Platform.version.contains("simarm64")) {
-    cc_flags = "-m64";
-  } else if (Platform.version.contains("simarm")) {
-    cc_flags = "-m32";
-  } else if (Platform.version.contains("simmips")) {
-    cc_flags = "-m32";
-  } else if (Platform.version.contains("arm")) {
-    cc_flags = "";
-  } else if (Platform.version.contains("mips")) {
-    cc_flags = "-EL";
-  } else {
-    print("Architecture not supported: ${Platform.version}");
-    return;
-  }
-
-  var abs_package_root = Uri.parse(Platform.packageRoot).toFilePath();
-  var dart_executable =
-      Directory.current.path + Platform.pathSeparator + Platform.executable;
-  Directory tmp;
-  try {
-    tmp = Directory.current.createTempSync("temp_precompilation_test");
-    var exec = "${dart_executable}_no_snapshot";
-    var args = ["--package-root=$abs_package_root",
-                "--gen-precompiled-snapshot",
-                "${abs_package_root}compiler/src/dart2js.dart"];
-    print("$exec ${args.join(' ')}");
-    var result = Process.runSync(exec, args, workingDirectory: tmp.path);
-    if (result.exitCode != 0) {
-      print(result.stdout);
-      print(result.stderr);
-      throw "Snapshot generation failed.";
-    }
-
-    // Check if gcc is present, and skip test if it is not.
-    try {
-      result = Process.runSync(
-          cc,
-          ["--version"],
-          workingDirectory: tmp.path);
-      if (result.exitCode != 0) {
-        throw "$cc --version failed.";
-      }
-    } catch(e) {
-      print("Skipping test because $cc is not present: $e");
-      return;
-    }
-
-    result = Process.runSync(
-        cc,
-        [shared, cc_flags, "-nostartfiles", "-o", libname, "precompiled.S"],
-        workingDirectory: tmp.path);
-    if (result.exitCode != 0) {
-      print(result.stdout);
-      print(result.stderr);
-      throw "Shared library creation failed!";
-    }
-
-    var ld_library_path = new String.fromEnvironment("LD_LIBRARY_PATH");
-    ld_library_path = "${ld_library_path}:${tmp.path}";
-    exec = "${dart_executable}_precompiled_runtime";
-    args = ["--run-precompiled-snapshot", "ignored_script", "--version"];
-    print("LD_LIBRARY_PATH=$ld_library_path $exec ${args.join(' ')}");
-    result = Process.runSync(exec, args,
-       workingDirectory: tmp.path,
-       environment: {"LD_LIBRARY_PATH": ld_library_path});
-    if (result.exitCode != 0) {
-      print(result.stdout);
-      print(result.stderr);
-      throw "Precompiled binary failed.";
-    }
-    print(result.stdout);
-    if (!result.stdout.contains("Dart-to-JavaScript compiler")) {
-      throw "Precompiled binary output mismatch.";
-    }
-  } finally {
-    tmp?.deleteSync(recursive: true);
-  }
-}
diff --git a/tests/standalone/precompilation_test.dart b/tests/standalone/precompilation_test.dart
deleted file mode 100644
index e65bf17..0000000
--- a/tests/standalone/precompilation_test.dart
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test generating and running a simple precompiled snapshot of this script.
-
-import 'dart:io';
-
-main(List args) {
-  if (args.length > 0 && args[0] == "--hello") {
-    print("Hello");
-    return;
-  }
-
-  var cc, cc_flags, shared, libname;
-  if (Platform.isLinux) {
-    cc = 'gcc';
-    shared = '-shared';
-    libname = 'libprecompiled.so';
-  } else if (Platform.isMacOS) {
-    cc = 'clang';
-    shared = '-dynamiclib';
-    libname = 'libprecompiled.dylib';
-  } else {
-    print("Test only supports Linux and Mac");
-    return;
-  }
-
-  if (Platform.version.contains("x64")) {
-    cc_flags = "-m64";
-  } else if (Platform.version.contains("simarm64")) {
-    cc_flags = "-m64";
-  } else if (Platform.version.contains("simarm")) {
-    cc_flags = "-m32";
-  } else if (Platform.version.contains("simmips")) {
-    cc_flags = "-m32";
-  } else if (Platform.version.contains("arm")) {
-    cc_flags = "";
-  } else if (Platform.version.contains("mips")) {
-    cc_flags = "-EL";
-  } else {
-    print("Architecture not supported: ${Platform.version}");
-    return;
-  }
-
-  var dart_executable =
-      Directory.current.path + Platform.pathSeparator + Platform.executable;
-  Directory tmp;
-  try {
-    tmp = Directory.current.createTempSync("temp_precompilation_test");
-    var result = Process.runSync(
-       "${dart_executable}_no_snapshot",
-       ["--gen-precompiled-snapshot", Platform.script.path],
-       workingDirectory: tmp.path);
-    if (result.exitCode != 0) {
-      print(result.stdout);
-      print(result.stderr);
-      throw "Snapshot generation failed.";
-    }
-
-    // Check if gcc is present, and skip test if it is not.
-    try {
-      result = Process.runSync(
-          cc,
-          ["--version"],
-          workingDirectory: tmp.path);
-      if (result.exitCode != 0) {
-        throw "$cc --version failed.";
-      }
-    } catch(e) {
-      print("Skipping test because $cc is not present: $e");
-      return;
-    }
-
-    result = Process.runSync(
-        cc,
-        [shared, cc_flags, "-nostartfiles", "-o", libname, "precompiled.S"],
-        workingDirectory: tmp.path);
-    if (result.exitCode != 0) {
-      print(result.stdout);
-      print(result.stderr);
-      throw "Shared library creation failed!";
-    }
-
-    var ld_library_path = new String.fromEnvironment("LD_LIBRARY_PATH");
-    ld_library_path = "${ld_library_path}:${tmp.path}";
-
-    result = Process.runSync(
-       "${dart_executable}_precompiled_runtime",
-       ["--run-precompiled-snapshot", "ignored_script", "--hello"],
-       workingDirectory: tmp.path,
-       environment: {"LD_LIBRARY_PATH": ld_library_path});
-    if (result.exitCode != 0) {
-      print(result.stdout);
-      print(result.stderr);
-      throw "Precompiled binary failed.";
-    }
-    print(result.stdout);
-    if (result.stdout != "Hello\n") {
-      throw "Precompiled binary output mismatch.";
-    }
-  } finally {
-    tmp?.deleteSync(recursive: true);
-  }
-}
diff --git a/tests/standalone/regress_25335_test.dart b/tests/standalone/regress_25335_test.dart
index e4551a2..c20ed6d 100644
--- a/tests/standalone/regress_25335_test.dart
+++ b/tests/standalone/regress_25335_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 //
 // Test that canonicalization inserts constants with correct representation.
-// VMOptions=--optimization-counter-threshold=10 --optimization-filter=bar
+// VMOptions=--optimization-counter-threshold=10 --optimization-filter=bar --no-background-compilation
 
 import 'dart:typed_data';
 
diff --git a/tests/standalone/regress_26031_test.dart b/tests/standalone/regress_26031_test.dart
new file mode 100644
index 0000000..44765c2b
--- /dev/null
+++ b/tests/standalone/regress_26031_test.dart
@@ -0,0 +1,20 @@
+// 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';
+import 'dart:isolate';
+
+import "package:expect/expect.dart";
+
+void checkResolvedExecutable(String re) {
+  Expect.equals(Platform.resolvedExecutable, re);
+}
+
+main() {
+  var exitPort = new ReceivePort();
+  Isolate.spawn(checkResolvedExecutable,
+                Platform.resolvedExecutable,
+                onExit: exitPort.sendPort);
+  exitPort.listen((_) => exitPort.close());
+}
diff --git a/tests/standalone/slowpath_safepoints_test.dart b/tests/standalone/slowpath_safepoints_test.dart
index 254ad76..e15723c 100644
--- a/tests/standalone/slowpath_safepoints_test.dart
+++ b/tests/standalone/slowpath_safepoints_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that safepoints associated with slowpaths don't mark non-existing values
 // alive.
-// VMOptions=--optimization-counter-threshold=5 --no-inline_alloc --gc_at_instance_allocation=_Double
+// VMOptions=--optimization-counter-threshold=5 --no-inline_alloc --gc_at_instance_allocation=_Double --no-background-compilation
 
 class C {
   final next;
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index 41f4d09..4103c33 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -13,7 +13,7 @@
 package/scenarios/empty_packages_file/empty_packages_file_option_test: Fail, OK # CompileTimeErrors intentionally
 package/scenarios/invalid/invalid_package_name_test: RuntimeError, CompileTimeError # Errors intentionally
 package/scenarios/invalid/same_package_twice_test.dart: RuntimeError, CompileTimeError # Errors intentionally
-full_coverage_test: Pass, Slow
+full_coverage_test: Pass, Slow, Timeout
 
 
 issue14236_test: Pass # Do not remove this line. It serves as a marker for Issue 14516 comment #4.
@@ -44,6 +44,8 @@
 # This is expected as MacOS by default runs with a very low number
 # of allowed open files ('ulimit -n' says something like 256).
 io/socket_many_connections_test: Skip
+# Re-enable once the bots have been updated. Issue #26057
+io/secure_server_client_certificate_test: Skip
 
 [ $runtime == vm && $system == linux ]
 # These tests have started timing out and issue 25649 has been filed to
@@ -65,9 +67,9 @@
 issue14236_test: Skip # Issue 14236 Script snapshots do not work in the browser.
 oom_error_stacktrace_test: Skip
 out_of_memory_test: Skip
+map_insert_remove_oom_test: Skip  # Issue 24571
 verbose_gc_to_bmu_test: Skip
-precompilation_test: Skip # Standalone only test.
-precompilation_dart2js_test: Skip # Standalone only test.
+regress_26031_test: SkipByDesign # Standalone only test
 
 [ $compiler == dartanalyzer || $compiler == dart2analyzer ]
 issue14236_test: Skip # Analyzer can't handle Script snapshots.
@@ -105,20 +107,13 @@
 issue14236_test: Skip # dart2js does not deal with Script snapshots.
 unboxed_int_converter_test: Skip
 pair_location_remapping_test: Skip
-precompilation_test: Skip # Standalone only test.
-precompilation_dart2js_test: Skip # Standalone only test.
 regress_25335_test: Skip # Int64List not supported.
 
-[ ($runtime == vm || $runtime == dart_product) && $mode == debug ]
-precompilation_dart2js_test: Pass, Slow
+[ $compiler == dart2js && $cps_ir && $checked ]
+*: Skip # `assert` not implemented
 
-[ ($runtime == vm || $runtime == dart_product) && $arch == ia32 ]
-precompilation_test: SkipByDesign # Not expected to pass on ia32.
-precompilation_dart2js_test: SkipByDesign # Not expected to pass on ia32.
-
-[ ($runtime == vm || $runtime == dart_product) && ($arch == mips || $arch == arm || $arch == arm64) ]
-precompilation_test: SkipSlow
-precompilation_dart2js_test: SkipSlow
+[ ($runtime == vm || $runtime == dart_product) && ($arch == arm || $arch == arm64) ]
+io/file_stream_test: Skip # Issue 26109
 
 [ $compiler == dart2js && $jscl ]
 assert_test: RuntimeError, OK # Assumes unspecified fields on the AssertionError.
@@ -139,11 +134,9 @@
 oom_error_stacktrace_test: Skip # Fails on Linux
 
 [ $arch == mips ]
-io/signals_test: Fail # Issue 17440
 io/file_stat_test: Fail # Issue 17440
 io/process_sync_test: Skip # Starts 10 dart subprocesses, uses too much memory.
 io/signals_test: Skip # Starts 10 dart subprocesses, uses too much memory
-io/file_read_special_device_test: Fail # Issue 17440
 io/socket_source_address_test: Fail # Issue 22597
 
 [ $arch == mips && $mode == debug ]
@@ -155,9 +148,6 @@
 [ $compiler == none && $runtime == dartium && $unchecked ]
 assert_test: Fail # Issue 14651.
 
-[ $compiler == none && $runtime == drt ]
-map_literal_oom_test: RuntimeError # Issue 24571
-
 [ $compiler == dartanalyzer || $compiler == dart2analyzer ]
 io/directory_invalid_arguments_test: StaticWarning
 io/process_invalid_arguments_test: StaticWarning
@@ -216,15 +206,14 @@
 assert_test: Pass, RuntimeError
 
 [ $noopt || $compiler == precompiler ]
-map_literal_oom_test: Pass, Crash # Issue 24678
+map_insert_remove_oom_test: Skip # Heap limit too low. Increasing iteration count to make a higher limit a meaningful test makes it too slow for simarm[64] bots.
 io/web_socket_test: Pass, RuntimeError # Issue 24674
-precompilation_test: Skip # Platform.executable
-precompilation_dart2js_test: Skip  # Platform.executable
 io/test_extension_test: Skip # Platform.executable
 io/test_extension_fail_test: Skip # Platform.executable
 io/platform_test: Skip # Platform.executable
 io/code_collection_test: Skip # Platform.executable
 full_coverage_test: Skip # Platform.executable
+regress_26031_test: Skip # Platform.resolvedExecutable
 
 [ $runtime == dart_precompiled ]
 io/compile_all_test: Crash # Incompatible flag --compile_all
@@ -234,8 +223,6 @@
 
 [ $runtime == dart_precompiled || $runtime == dart_product ]
 debugger/*: Skip
-precompilation_test: Skip # Platform.executable
-precompilation_dart2js_test: Skip # Platform.executable
 full_coverage_test: Skip # Platform.executable
 http_launch_test: Skip # Platform.executable
 io/addlatexhash_test: Skip # Platform.executable
@@ -249,7 +236,6 @@
 io/snapshot_fail_test: Skip # Platform.executable
 io/stdin_sync_test: Skip # Platform.executable
 io/test_extension_fail_test: Skip # Platform.executable
-precompilation_test: Skip # Platform.executable
 io/file_read_special_device_test: Skip # Platform.executable
 verbose_gc_to_bmu_test: Skip # Platform.executable
 io/http_server_close_response_after_error_test: Skip # Platform.executable
@@ -271,6 +257,8 @@
 io/test_extension_test: Skip # Platform.executable
 io/regress_7679_test: Skip # Platform.executable
 io/process_*: Skip # Most use Platform.executable
+assert_test: SkipByDesign # Requires checked mode.
+no_assert_test: SkipByDesign # Requires checked mode.
 
 # Code coverage is not supported in product mode.
 [ $mode == product ]
@@ -287,7 +275,7 @@
 no_support_timeline_test: SkipByDesign
 
 # Following tests are skipped on dart_product as package mapping is not supported.
-[ $runtime == dart_product ]
+[ $runtime == dart_precompiled || $runtime == dart_product ]
 package/scenarios/packages_file_strange_formatting/mixed_line_ends_test: Skip
 package/scenarios/packages_file_strange_formatting/empty_lines_test: Skip
 package/scenarios/invalid/invalid_utf8_test: Skip
diff --git a/tests/standalone/typed_data_test.dart b/tests/standalone/typed_data_test.dart
index 1b44624..a7e4c11 100644
--- a/tests/standalone/typed_data_test.dart
+++ b/tests/standalone/typed_data_test.dart
@@ -4,7 +4,7 @@
 //
 // Dart test program for testing typed data.
 
-// VMOptions=--optimization_counter_threshold=10
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
 // Library tag to be able to run in html test framework.
 library TypedDataTest;
diff --git a/tests/standalone/unboxed_int_converter_test.dart b/tests/standalone/unboxed_int_converter_test.dart
index 2b75a01..297861d 100644
--- a/tests/standalone/unboxed_int_converter_test.dart
+++ b/tests/standalone/unboxed_int_converter_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 UnboxedIntConverter for int32.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
 
 import "package:expect/expect.dart";
 import "dart:typed_data";
diff --git a/tests/try/try.status b/tests/try/try.status
index d6d7ca7..f84f339 100644
--- a/tests/try/try.status
+++ b/tests/try/try.status
@@ -18,9 +18,11 @@
 web/incremental_compilation_update_test: SkipByDesign # Test uses eval, not supported in CSP mode.
 
 [ $runtime == safari || $runtime == safarimobilesim ]
-web/cursor_position_test: Fail # Issue 19836
 web/incremental_compilation_update_test: Skip # Safari may crash on this test.
 
+[ $runtime == safarimobilesim ]
+web/cursor_position_test: Fail # Issue 19836
+
 [ $runtime == safari && $checked ]
 # The following tests flake with this error:
 #   type '*Theme' is not a subtype of type 'Theme'
diff --git a/tests/utils/utils.status b/tests/utils/utils.status
index 4ca122e..bec008c 100644
--- a/tests/utils/utils.status
+++ b/tests/utils/utils.status
@@ -2,10 +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.
 
-[ $compiler == dart2js && $host_checked ]
-dummy_compiler_test: Crash # Issue 22809
-
-[ $compiler == dart2js && $host_checked == false ]
+[ $compiler == dart2js ]
 dummy_compiler_test: Slow, Pass
 
 [ $compiler == dart2js ]
@@ -18,9 +15,13 @@
 [ ($compiler == none || $compiler == precompiler) && $runtime != vm ]
 dart2js_test: SkipByDesign # Uses dart:io.
 
-
 [ $compiler == dart2js && $mode == debug ]
 dummy_compiler_test: Slow, Pass
 
-[ $noopt || $compiler == precompiler || $compiler == dart2app ]
+[ $noopt || $compiler == precompiler || $mode == product ]
 source_mirrors_test: SkipByDesign # Imports dart:mirrors
+
+[ $compiler == dart2js && $cps_ir && $host_checked ]
+dummy_compiler_test: Crash # Issue 24485
+recursive_import_test: Crash # Issue 24485
+source_mirrors_test: Crash # Issue 24485
diff --git a/tools/.gitignore b/tools/.gitignore
new file mode 100644
index 0000000..2814b7b
--- /dev/null
+++ b/tools/.gitignore
@@ -0,0 +1,3 @@
+# tools/idl_parser is populated by gclient sync
+idl_parser
+
diff --git a/tools/VERSION b/tools/VERSION
index b3d3a07..5f18786 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -25,7 +25,7 @@
 #
 CHANNEL stable
 MAJOR 1
-MINOR 15
+MINOR 16
 PATCH 0
 PRERELEASE 0
 PRERELEASE_PATCH 0
diff --git a/tools/android_link.py b/tools/android_link.py
index 28edce5..6efea04 100755
--- a/tools/android_link.py
+++ b/tools/android_link.py
@@ -48,9 +48,9 @@
   link_args = sys.argv[4:]
 
   # Check arguments.
-  if target_arch not in ['arm', 'arm64', 'ia32']:
+  if target_arch not in ['arm', 'arm64', 'ia32', 'x64']:
     raise Exception(sys.argv[0] +
-        " first argument must be 'arm', 'arm64', or 'ia32'")
+        " first argument must be 'arm', 'arm64', 'ia32', or 'x64'")
   if link_type not in ['executable', 'library', 'shared_library']:
     raise Exception(sys.argv[0] +
                     " second argument must be 'executable' or 'library'")
@@ -81,6 +81,8 @@
     toolchain_arch = 'aarch64-linux-android-4.9'
   if target_arch == 'ia32':
     toolchain_arch = 'x86-4.9'
+  if target_arch == 'x64':
+    toolchain_arch = 'x86_64-4.9'
   toolchain_dir = 'linux-x86_64'
   android_toolchain = os.path.join(android_ndk_root,
       'toolchains', toolchain_arch,
@@ -94,6 +96,8 @@
         android_toolchain, 'aarch64-linux-android-c++')
   if target_arch == 'ia32':
     android_linker = os.path.join(android_toolchain, 'i686-linux-android-g++')
+  if target_arch == 'x64':
+    android_linker = os.path.join(android_toolchain, 'x86_64-linux-android-g++')
 
   # Grab the path to libgcc.a, which we must explicitly add to the link,
   # by invoking the cross-compiler with the -print-libgcc-file-name flag.
@@ -102,6 +106,8 @@
     android_gcc = os.path.join(android_toolchain, 'aarch64-linux-android-gcc')
   if target_arch == 'ia32':
     android_gcc = os.path.join(android_toolchain, 'i686-linux-android-gcc')
+  if target_arch == 'x64':
+    android_gcc = os.path.join(android_toolchain, 'x86_64-linux-android-gcc')
   android_libgcc = subprocess.check_output(
       [android_gcc, '-print-libgcc-file-name']).strip()
 
@@ -109,14 +115,19 @@
   # Android specific system includes and libraries.
   android_ndk_sysroot = os.path.join(android_ndk_root,
       'platforms', 'android-14', 'arch-arm')
+  libdir = 'lib'
   if target_arch == 'arm64':
     android_ndk_sysroot = os.path.join(android_ndk_root,
       'platforms', 'android-21', 'arch-arm64')
   if target_arch == 'ia32':
     android_ndk_sysroot = os.path.join(android_ndk_root,
         'platforms', 'android-14', 'arch-x86')
+  if target_arch == 'x64':
+    android_ndk_sysroot = os.path.join(android_ndk_root,
+        'platforms', 'android-21', 'arch-x86_64')
+    libdir = 'lib64'
   CheckDirExists(android_ndk_sysroot, 'Android sysroot')
-  android_ndk_lib = os.path.join(android_ndk_sysroot,'usr','lib')
+  android_ndk_lib = os.path.join(android_ndk_sysroot, 'usr', libdir)
   crtend_android = os.path.join(android_ndk_lib, 'crtend_android.o')
 
   if link_target == 'target':
diff --git a/tools/build.py b/tools/build.py
index 62717d7..3ec70d2 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -119,7 +119,7 @@
         print ("Cross-compilation to %s is not supported on host os %s."
                % (os_name, HOST_OS))
         return False
-      if not arch in ['ia32', 'arm', 'armv6', 'armv5te', 'arm64', 'mips']:
+      if not arch in ['ia32', 'x64', 'arm', 'armv6', 'armv5te', 'arm64', 'mips']:
         print ("Cross-compilation to %s is not supported for architecture %s."
                % (os_name, arch))
         return False
@@ -143,6 +143,8 @@
       return os.path.join(android_toolchain, 'aarch64-linux-android')
     if arch == 'ia32':
       return os.path.join(android_toolchain, 'i686-linux-android')
+    if arch == 'x64':
+      return os.path.join(android_toolchain, 'x86_64-linux-android')
 
   # If no cross compiler is specified, only try to figure one out on Linux.
   if not HOST_OS in ['linux']:
@@ -195,7 +197,7 @@
   global THIRD_PARTY_ROOT
   if host_os not in ['linux']:
     raise Exception('Unsupported host os %s' % host_os)
-  if target_arch not in ['ia32', 'arm', 'arm64']:
+  if target_arch not in ['ia32', 'x64', 'arm', 'arm64']:
     raise Exception('Unsupported target architecture %s' % target_arch)
 
   # Set up path to the Android NDK.
@@ -211,6 +213,8 @@
     toolchain_arch = 'aarch64-linux-android-4.9'
   if target_arch == 'ia32':
     toolchain_arch = 'x86-4.9'
+  if target_arch == 'x64':
+    toolchain_arch = 'x86_64-4.9'
   toolchain_dir = 'linux-x86_64'
   android_toolchain = os.path.join(android_ndk_root,
       'toolchains', toolchain_arch,
diff --git a/tools/create_sdk.py b/tools/create_sdk.py
index 0d72c9d..65f585e 100755
--- a/tools/create_sdk.py
+++ b/tools/create_sdk.py
@@ -19,6 +19,7 @@
 # ......dartfmt
 # ......dart2js
 # ......dartanalyzer
+# ......dartdevc
 # ......pub
 # ......snapshots/
 # ........analysis_server.dart.snapshot
@@ -26,6 +27,7 @@
 # ........dartanalyzer.dart.snapshot
 # ........dartdoc.dart.snapshot
 # ........dartfmt.dart.snapshot
+# ........dartdevc.dart.snapshot
 # ........pub.dart.snapshot
 # ........utils_wrapper.dart.snapshot
 #.........resources/
@@ -129,14 +131,14 @@
 
 def CopyDartScripts(home, sdk_root):
   for executable in ['dart2js_sdk', 'dartanalyzer_sdk', 'dartfmt_sdk',
-                     'pub_sdk', 'dartdoc']:
+                     'pub_sdk', 'dartdoc', 'dartdevc_sdk']:
     CopyShellScript(os.path.join(home, 'sdk', 'bin', executable),
                     os.path.join(sdk_root, 'bin'))
 
 
 def CopySnapshots(snapshots, sdk_root):
   for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt',
-                   'utils_wrapper', 'pub', 'dartdoc']:
+                   'utils_wrapper', 'pub', 'dartdoc', 'dartdevc']:
     snapshot += '.dart.snapshot'
     copyfile(join(snapshots, snapshot),
              join(sdk_root, 'bin', 'snapshots', snapshot))
diff --git a/tools/dartium/generate_app/generate_cached_patches.dart b/tools/dartium/generate_app/generate_cached_patches.dart
new file mode 100644
index 0000000..af34b27
--- /dev/null
+++ b/tools/dartium/generate_app/generate_cached_patches.dart
@@ -0,0 +1,15 @@
+// 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.
+
+void main() {
+  try {
+    print("Generated Patches");
+  } catch (e) {
+    var workedElem = document.querySelector("#worked");
+    var failedElem = document.querySelector("#failed");
+    workedElem.style.dispay = 'none';
+    failedElem.style.visibility = 'inline';
+  }
+}
+
diff --git a/tools/dartium/generate_app/generate_cached_patches.html b/tools/dartium/generate_app/generate_cached_patches.html
new file mode 100644
index 0000000..cee01ac
--- /dev/null
+++ b/tools/dartium/generate_app/generate_cached_patches.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    <style>
+    div {
+      background: #ffffff;
+      text-align: center;
+      width: 50%;
+      margin: 10% 10% 25% 25%;
+    }
+
+    div#worked {
+      border: 5px solid green;
+      color: green;
+    }
+
+    div#failed {
+      border: 5px solid red;
+      color: red;
+    }
+
+    .cached_file_done {
+      font-family: arial;
+      font-size: 24pt;
+     }
+
+    .cached_file_name {
+      color: gray;
+      font-size: 16pt;
+      vertical-align: text-bottom;
+    }
+    </style>
+
+    <script async type="application/dart" src="generate_cached_patches.dart"></script>
+    <script async src="packages/browser/dart.js"></script>
+  </head> 
+    <body>
+      <div id=worked>
+        <span class=cached_file_done>Close Dartium</span><br/><br/>
+        <span class=cached_file_done>File: </span>
+        <span class=cached_file_name>sdk/lib/js/dartium/cached_patches.dart</span><br/><br/>
+        <span class=cached_file_done>GENERATED</span>
+      </div>
+      <div id=failed style="display: none;">
+        <span class=cached_file_done>FAILED</span><br/><br/>
+        <span class=cached_file_done>File: </span>
+        <span class=cached_file_name>sdk/lib/js/dartium/cached_patches.dart</span><br/><br/>
+        <span class=cached_file_done>NOT GENERATED</span>
+      </div>
+    </body>
+</html>
+
diff --git a/tools/dartium/generate_patches.sh b/tools/dartium/generate_patches.sh
new file mode 100755
index 0000000..40dc895
--- /dev/null
+++ b/tools/dartium/generate_patches.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+#
+
+set -x
+
+#   generate_patches.sh [systems]
+#
+# Convenience script to generate patches for JsInterop under Dartium.  Do not call from build steps or tests
+# - call fremontcutbuilder and dartdomgenerator instead. Do not add 'real'
+# functionality here - change the python code instead.
+#
+# I find it essential to generate all the systems so I know if I am breaking
+# other systems.  My habit is to run:
+#
+#   ./go.sh
+#
+# 1. After running go.sh libraries in sdk/lib may change.
+# 2. Build Dartium.
+# 3. Run this script and sdk/lib/js/dartium/cached_patches will be created.
+# 4. Rebuild Dartium.
+# 5. Commit files in sdk/lib
+#
+# NOTE: If the Dart files generated from the IDLs may cause major changes which
+#       could cause the patch files to fail (missing classes, etc).  If this
+#       happens delete the contents of the sdk/lib/js/dartium/cached_patches.dart
+#       build Dartium, run this script and build Dartium again with the newly
+#       generated patches. 
+
+LOCATION_DARTIUM="../../../out/Release"
+DARTIUM="$LOCATION_DARTIUM"
+
+DART_APP_LOCATION="file://"$PWD"/generate_app/generate_cached_patches.html"
+DARTIUM_ARGS=" --user-data-dir=out --disable-web-security --no-sandbox --enable-blink-features=dartGenCachedPatches"
+CACHED_PATCHES_FILE=""$PWD"/../../sdk/lib/js/dartium/cached_patches.dart"
+
+if [[ "$1" != "" ]] ; then
+  DARTIM="$1"
+fi
+
+cmd=""$DARTIUM"/chrome "$DARTIUM_ARGS" "$DART_APP_LOCATION" |
+  (sed -n '/START_OF_CACHED_PATCHES/,/END_OF_CACHED_PATCHES/p') > "$CACHED_PATCHES_FILE""
+
+reset && eval "${cmd}"
+
+
diff --git a/tools/deps/dartium.deps/DEPS b/tools/deps/dartium.deps/DEPS
index 0105c11..2eb609e 100644
--- a/tools/deps/dartium.deps/DEPS
+++ b/tools/deps/dartium.deps/DEPS
@@ -8,8 +8,8 @@
 # Now we need to override some settings and add some new ones.
 
 vars.update({
-  "dartium_chromium_commit": "8df9de5a8f073d9c0feadf8d652408807e4a254e",
-  "dartium_webkit_commit": "28b9a6c03797eaecf6c92677cba747eb9df0787c",
+  "dartium_chromium_commit": "c2d1ddba7a86ce11a8dcb77a4ac101872d6110bd",
+  "dartium_webkit_commit": "1ebe477439d73297f0e6090b474fd9b761407434",
   "chromium_base_revision": "338390",
 
   # We use mirrors of all github repos to guarantee reproducibility and
@@ -53,6 +53,7 @@
   "pub_rev": "@9d707158fedc86fc2b02f62cdfe804902b098d9d",
   "pub_semver_tag": "@1.2.0",
   "quiver_tag": "@0.21.4",
+  "root_certificates_rev": "@aed07942ce98507d2be28cbd29e879525410c7fc",
   "shelf_rev": "@1e87b79b21ac5e6fa2f93576d6c06eaa65285ef4",
   "shelf_web_socket_rev": "@ff170cec2c0e4e5722cdf47c557be63b5035a602",
   "source_span_rev": "@42501132e43599a151ba6727d340e44442f86c05",
@@ -64,7 +65,7 @@
   "watcher_tag": "@0.9.5",
   "yaml_rev": "@563a5ffd4a800a2897b8f4dd6b19f2a370df2f2b",
   "zlib_rev": "@c3d0a6190f2f8c924a05ab6cc97b8f975bddd33f",
-  "web_components_rev": "@0e636b534d9b12c9e96f841e6679398e91a986ec",
+  "web_components_rev": "@6349e09f9118dce7ae1b309af5763745e25a9d61",
   "WebCore_rev": "@a86fe28efadcfc781f836037a80f27e22a5dad17",
 
   "co19_rev": "@3ed795ea02e022ef19c77cf1b6095b7c8f5584d0",
@@ -137,6 +138,9 @@
       Var("chromium_git")
       + "/external/github.com/google/quiver-dart.git"
       + Var("quiver_tag"),
+  "src/dart/third_party/root_certificates":
+      (Var("github_mirror") % "root_certificates")
+      + Var("root_certificates_rev"),
   "src/dart/third_party/pkg/shelf":
       (Var("github_mirror") % "shelf") + Var("shelf_rev"),
   "src/dart/third_party/pkg/shelf_web_socket":
diff --git a/tools/deps/dartium.deps/DEPS.chromium b/tools/deps/dartium.deps/DEPS.chromium
index 4abb484..d15aff5 100644
--- a/tools/deps/dartium.deps/DEPS.chromium
+++ b/tools/deps/dartium.deps/DEPS.chromium
@@ -1,490 +1,694 @@
-# This file is used to manage the dependencies of the Chromium src repo. It is
-# used by gclient to determine what version of each dependency to check out, and
-# where.
-#
-# For more information, please refer to the official documentation:
-#   https://sites.google.com/a/chromium.org/dev/developers/how-tos/get-the-code
-#
-# When adding a new dependency, please update the top-level .gitignore file
-# to list the dependency's destination directory.
-#
-# -----------------------------------------------------------------------------
-# Rolling deps
-# -----------------------------------------------------------------------------
-# All repositories in this file are git-based, using Chromium git mirrors where
-# necessary (e.g., a git mirror is used when the source project is SVN-based).
-# To update the revision that Chromium pulls for a given dependency:
-#
-#  # Create and switch to a new branch
-#  git new-branch depsroll
-#  # Run roll-dep (provided by depot_tools) giving the dep's path and the
-#  # desired SVN revision number (e.g., third_party/foo/bar and a revision such
-#  # number from Subversion)
-#  roll-dep third_party/foo/bar REVISION_NUMBER
-#  # You should now have a modified DEPS file; commit and upload as normal
-#  git commit -a
-#  git cl upload
-
-
 vars = {
-  # Use this googlecode_url variable only if there is an internal mirror for it.
-  # If you do not know, use the full path while defining your new deps entry.
-  'googlecode_url': 'http://%s.googlecode.com/svn',
   'webkit_revision': 'abaaf1d0b6b6483140b5dca34e80fc259833ddf7', # from svn revision 198714
-  'chromium_git': 'https://chromium.googlesource.com',
-  'libvpx_revision': '96484d320036bbc1e30f1dea232799a3e0517b1d',
-  'sfntly_revision': '1bdaae8fc788a5ac8936d68bf24f37d977a13dac',
-  'skia_revision': 'ea561bf055bb803f4c10ca323ea60a9d94da7956',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling V8
-  # and whatever else without interference from each other.
-  'v8_revision': '7f211533faba9dd85708b1394186c7fe99b88392',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling swarming_client
-  # and whatever else without interference from each other.
-  'swarming_revision': 'b39a448d8522392389b28f6997126a6ab04bfe87',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling ANGLE
-  # and whatever else without interference from each other.
-  'angle_revision': '44897140a2ae07dc5ba88190100179baa6fe7914',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling build tools
-  # and whatever else without interference from each other.
-  'buildtools_revision': 'ecc8e253abac3b6186a97573871a084f4c0ca3ae',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling PDFium
-  # and whatever else without interference from each other.
-  'pdfium_revision': 'cc2323f0d0d626edac4a426097eb38b53ba54848',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling openmax_dl
-  # and whatever else without interference from each other.
-  'openmax_dl_revision': '22bb1085a6a0f6f3589a8c3d60ed0a9b82248275',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling BoringSSL
-  # and whatever else without interference from each other.
-  'boringssl_revision': 'de24aadc5bc01130b6a9d25582203bb5308fabe1',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling nss
-  # and whatever else without interference from each other.
-  'nss_revision': 'aab0d08a298b29407397fbb1c4219f99e99431ed', # from svn revision 295435
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling google-toolbox-for-mac
-  # and whatever else without interference from each other.
-  'google_toolbox_for_mac_revision': 'ce47a231ea0b238fbe95538e86cc61d74c234be6', # from svn revision 705
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling lighttpd
-  # and whatever else without interference from each other.
-  'lighttpd_revision': '9dfa55d15937a688a92cbf2b7a8621b0927d06eb',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling lss
-  # and whatever else without interference from each other.
-  'lss_revision': '6f97298fe3794e92c8c896a6bc06e0b36e4c3de3',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling NaCl
-  # and whatever else without interference from each other.
-  'nacl_revision': 'b3d4cc125348924f727d3b87cee3674a839b54a0',
+  'angle_revision':
+    '44897140a2ae07dc5ba88190100179baa6fe7914',
+  'boringssl_revision':
+    'de24aadc5bc01130b6a9d25582203bb5308fabe1',
+  'buildspec_platforms':
+    'ios,',
+  'buildtools_revision':
+    'ecc8e253abac3b6186a97573871a084f4c0ca3ae',
+  'chromium_git':
+    'https://chromium.googlesource.com',
+  'google_toolbox_for_mac_revision':
+    'ce47a231ea0b238fbe95538e86cc61d74c234be6',
+  'googlecode_url':
+    'http://%s.googlecode.com/svn',
+  'libvpx_revision':
+    '96484d320036bbc1e30f1dea232799a3e0517b1d',
+  'lighttpd_revision':
+    '9dfa55d15937a688a92cbf2b7a8621b0927d06eb',
+  'lss_revision':
+    '6f97298fe3794e92c8c896a6bc06e0b36e4c3de3',
+  'nacl_revision':
+    'b3d4cc125348924f727d3b87cee3674a839b54a0',
+  'nss_revision':
+    'aab0d08a298b29407397fbb1c4219f99e99431ed',
+  'openmax_dl_revision':
+    '22bb1085a6a0f6f3589a8c3d60ed0a9b82248275',
+  'pdfium_revision':
+    'cc2323f0d0d626edac4a426097eb38b53ba54848',
+  'sfntly_revision':
+    '1bdaae8fc788a5ac8936d68bf24f37d977a13dac',
+  'skia_revision':
+    'ea561bf055bb803f4c10ca323ea60a9d94da7956',
+  'swarming_revision':
+    'b39a448d8522392389b28f6997126a6ab04bfe87',
+  'v8_revision':
+    '7f211533faba9dd85708b1394186c7fe99b88392'
 }
-
-# Only these hosts are allowed for dependencies in this DEPS file.
-# If you need to add a new host, contact chrome infrastracture team.
 allowed_hosts = [
-  'chromium.googlesource.com',
-  'boringssl.googlesource.com',
-  'pdfium.googlesource.com',
   'android.googlesource.com',
+  'boringssl.googlesource.com',
+  'chromium.googlesource.com',
+  'pdfium.googlesource.com'
 ]
-
 deps = {
   'src/breakpad/src':
-   Var('chromium_git') + '/external/google-breakpad/src.git' + '@' + '242fb9a38db6ba534b1f7daa341dd4d79171658b', # from svn revision 1471
-
+    (Var("chromium_git")) + '/external/google-breakpad/src.git@242fb9a38db6ba534b1f7daa341dd4d79171658b',
   'src/buildtools':
-   Var('chromium_git') + '/chromium/buildtools.git' + '@' +  Var('buildtools_revision'),
-
-  'src/sdch/open-vcdiff':
-   Var('chromium_git') + '/external/open-vcdiff.git' + '@' + '438f2a5be6d809bc21611a94cd37bfc8c28ceb33', # from svn revision 41
-
-  'src/testing/gtest':
-   Var('chromium_git') + '/external/googletest.git' + '@' + '23574bf2333f834ff665f894c97bef8a5b33a0a9', # from svn revision 711
-
-  'src/testing/gmock':
-   Var('chromium_git') + '/external/googlemock.git' + '@' + '29763965ab52f24565299976b936d1265cb6a271', # from svn revision 501
-
-  'src/third_party/angle':
-   Var('chromium_git') + '/angle/angle.git' + '@' +  Var('angle_revision'),
-
-  'src/third_party/colorama/src':
-   Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
-
-  'src/third_party/crashpad/crashpad':
-   Var('chromium_git') + '/crashpad/crashpad.git' + '@' + '797adb320680a4a8ad39428075cca287e04b111f',
-
-  'src/third_party/trace-viewer':
-   Var('chromium_git') + '/external/trace-viewer.git' + '@' + '4f30209abd53c699c937519f39ce41888f93507b',
-
-  'src/third_party/WebKit':
-   Var('chromium_git') + '/chromium/blink.git' + '@' +  Var('webkit_revision'),
-
-  'src/third_party/icu':
-   Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'c81a1a3989c3b66fa323e9a6ee7418d7c08297af',
-
-  'src/third_party/libexif/sources':
-   Var('chromium_git') + '/chromium/deps/libexif/sources.git' + '@' + 'ed98343daabd7b4497f97fda972e132e6877c48a',
-
-  'src/third_party/hunspell_dictionaries':
-   Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + 'c106afdcec5d3de2622e19f1b3294c47bbd8bd72',
-
-  'src/third_party/safe_browsing/testing':
-    Var('chromium_git') + '/external/google-safe-browsing/testing.git' + '@' + '9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6',
-
-  'src/third_party/leveldatabase/src':
-    Var('chromium_git') + '/external/leveldb.git' + '@' + '40c17c0b84ac0b791fb434096fd5c05f3819ad55',
-
-  'src/third_party/snappy/src':
-    Var('chromium_git') + '/external/snappy.git' + '@' + '762bb32f0c9d2f31ba4958c7c0933d22e80c20bf',
-
-  'src/tools/grit':
-    Var('chromium_git') + '/external/grit-i18n.git' + '@' + '1dac9ae64b0224beb1547810933a6f9998d0d55e', # from svn revision 191
-
-  'src/tools/gyp':
-    Var('chromium_git') + '/external/gyp.git' + '@' + '5122240c5e5c4d8da12c543d82b03d6089eb77c5',
-
-  'src/tools/swarming_client':
-   Var('chromium_git') + '/external/swarming.client.git' + '@' +  Var('swarming_revision'),
-
-  'src/v8':
-    Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
-
-  'src/native_client':
-   Var('chromium_git') + '/native_client/src/native_client.git' + '@' + Var('nacl_revision'),
-
-  'src/third_party/sfntly/cpp/src':
-    Var('chromium_git') + '/external/sfntly/cpp/src.git' + '@' +  Var('sfntly_revision'),
-
-  'src/third_party/skia':
-   Var('chromium_git') + '/skia.git' + '@' +  Var('skia_revision'),
-
-  'src/tools/page_cycler/acid3':
-   Var('chromium_git') + '/chromium/deps/acid3.git' + '@' + '6be0a66a1ebd7ebc5abc1b2f405a945f6d871521',
-
+    (Var("chromium_git")) + '/chromium/buildtools.git@ecc8e253abac3b6186a97573871a084f4c0ca3ae',
   'src/chrome/test/data/perf/canvas_bench':
-   Var('chromium_git') + '/chromium/canvas_bench.git' + '@' + 'a7b40ea5ae0239517d78845a5fc9b12976bfc732',
-
+    (Var("chromium_git")) + '/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732',
   'src/chrome/test/data/perf/frame_rate/content':
-   Var('chromium_git') + '/chromium/frame_rate/content.git' + '@' + 'c10272c88463efeef6bb19c9ec07c42bc8fe22b9',
-
-  'src/third_party/bidichecker':
-    Var('chromium_git') + '/external/bidichecker/lib.git' + '@' + '97f2aa645b74c28c57eca56992235c79850fa9e0',
-
-  'src/third_party/webgl/src':
-   Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '8986f8bfa84547b1a30a9256ebdd665024d68d71',
-
-  'src/third_party/webdriver/pylib':
-    Var('chromium_git') + '/external/selenium/py.git' + '@' + '5fd78261a75fe08d27ca4835fb6c5ce4b42275bd',
-
-  'src/third_party/libvpx':
-   Var('chromium_git') + '/chromium/deps/libvpx.git' + '@' +  Var('libvpx_revision'),
-
-  'src/third_party/ffmpeg':
-   Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + 'f76066ad9f4aea07a53890b54d24cc22830b9efd',
-
-  'src/third_party/libjingle/source/talk':
-    Var('chromium_git') + '/external/webrtc/trunk/talk.git' + '@' + 'f7c923ddc729dc7f002b0e194ab72b661f932c00', # commit position 9564
-
-  'src/third_party/usrsctp/usrsctplib':
-    Var('chromium_git') + '/external/usrsctplib.git' + '@' + '36444a999739e9e408f8f587cb4c3ffeef2e50ac', # from svn revision 9215
-
-  'src/third_party/libsrtp':
-   Var('chromium_git') + '/chromium/deps/libsrtp.git' + '@' + '9c53f858cddd4d890e405e91ff3af0b48dfd90e6', # from svn revision 295151
-
-  'src/third_party/yasm/source/patched-yasm':
-   Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + '4671120cd8558ce62ee8672ebf3eb6f5216f909b',
-
-  'src/third_party/libjpeg_turbo':
-   Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'f4631b6ee8b1dbb05e51ae335a7886f9ac598ab6',
-
-  'src/third_party/flac':
-   Var('chromium_git') + '/chromium/deps/flac.git' + '@' + 'c291ce676d2c855f7b2739f00f5c7f7e813813dc',
-
-  'src/third_party/pyftpdlib/src':
-    Var('chromium_git') + '/external/pyftpdlib.git' + '@' + '2be6d65e31c7ee6320d059f581f05ae8d89d7e45',
-
-  'src/third_party/scons-2.0.1':
-   Var('chromium_git') + '/native_client/src/third_party/scons-2.0.1.git' + '@' + '1c1550e17fc26355d08627fbdec13d8291227067',
-
-  'src/third_party/webrtc':
-    Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + '847b12a225694e10425c8a9b31e0eec028baf841', # commit position 9565
-
-  'src/third_party/openmax_dl':
-    Var('chromium_git') + '/external/webrtc/deps/third_party/openmax.git' + '@' +  Var('openmax_dl_revision'),
-
-  'src/third_party/jsoncpp/source':
-    Var('chromium_git') + '/external/github.com/open-source-parsers/jsoncpp.git' + '@' + 'f572e8e42e22cfcf5ab0aea26574f408943edfa4', # from svn 248
-
-  'src/third_party/libyuv':
-    Var('chromium_git') + '/libyuv/libyuv.git' + '@' + '0e83b64e8879e9469919dc96b5d970c7c5bd05af', # from version 1444
-
-  'src/third_party/smhasher/src':
-    Var('chromium_git') + '/external/smhasher.git' + '@' + 'e87738e57558e0ec472b2fc3a643b838e5b6e88f',
-
-  'src/third_party/libaddressinput/src':
-    Var('chromium_git') + '/external/libaddressinput.git' + '@' + '5eeeb797e79fa01503fcdcbebdc50036fac023ef',
-
-  # These are all at libphonenumber r728.
-  'src/third_party/libphonenumber/src/phonenumbers':
-    Var('chromium_git') + '/external/libphonenumber/cpp/src/phonenumbers.git' + '@' + '0d6e3e50e17c94262ad1ca3b7d52b11223084bca',
-  'src/third_party/libphonenumber/src/test':
-    Var('chromium_git') + '/external/libphonenumber/cpp/test.git' + '@' + 'f351a7e007f9c9995494499120bbc361ca808a16',
-  'src/third_party/libphonenumber/src/resources':
-    Var('chromium_git') + '/external/libphonenumber/resources.git' + '@' + 'b6dfdc7952571ff7ee72643cd88c988cbe966396',
-
-  'src/tools/deps2git':
-   Var('chromium_git') + '/chromium/tools/deps2git.git' + '@' + 'f04828eb0b5acd3e7ad983c024870f17f17b06d9',
-
-  'src/third_party/webpagereplay':
-   Var('chromium_git') + '/external/github.com/chromium/web-page-replay.git' + '@' + '5da5975950daa7b30a6938da73fd0b3200901b0c',
-
-  'src/third_party/pywebsocket/src':
-    Var('chromium_git') + '/external/pywebsocket/src.git' + '@' + 'cb349e87ddb30ff8d1fa1a89be39cec901f4a29c',
-
-  'src/third_party/opus/src':
-   Var('chromium_git') + '/chromium/deps/opus.git' + '@' + 'cae696156f1e60006e39821e79a1811ae1933c69',
-
+    (Var("chromium_git")) + '/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9',
   'src/media/cdm/ppapi/api':
-   Var('chromium_git') + '/chromium/cdm.git' + '@' + '7377023e384f296cbb27644eb2c485275f1f92e8', # from svn revision 294518
-
-  'src/third_party/mesa/src':
-   Var('chromium_git') + '/chromium/deps/mesa.git' + '@' + '071d25db04c23821a12a8b260ab9d96a097402f0',
-
-  'src/third_party/cld_2/src':
-    Var('chromium_git') + '/external/cld2.git' + '@' + '14d9ef8d4766326f8aa7de54402d1b9c782d4481', # from svn revision 193
-
-  'src/third_party/pdfium':
-   'https://pdfium.googlesource.com/pdfium.git' + '@' +  Var('pdfium_revision'),
-
+    (Var("chromium_git")) + '/chromium/cdm.git@7377023e384f296cbb27644eb2c485275f1f92e8',
+  'src/native_client':
+    (Var("chromium_git")) + '/native_client/src/native_client.git@b3d4cc125348924f727d3b87cee3674a839b54a0',
+  'src/sdch/open-vcdiff':
+    (Var("chromium_git")) + '/external/open-vcdiff.git@438f2a5be6d809bc21611a94cd37bfc8c28ceb33',
+  'src/testing/gmock':
+    (Var("chromium_git")) + '/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271',
+  'src/testing/gtest':
+    (Var("chromium_git")) + '/external/googletest.git@23574bf2333f834ff665f894c97bef8a5b33a0a9',
+  'src/third_party/angle':
+    (Var("chromium_git")) + '/angle/angle.git@6f0fd8c5457f9dcffc9fa9fab3852417311be0a9',
+  'src/third_party/bidichecker':
+    (Var("chromium_git")) + '/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0',
   'src/third_party/boringssl/src':
-   'https://boringssl.googlesource.com/boringssl.git' + '@' +  Var('boringssl_revision'),
-
-  'src/third_party/py_trace_event/src':
-    Var('chromium_git') + '/external/py_trace_event.git' + '@' + 'dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30',
-
+    'https://boringssl.googlesource.com/boringssl.git@de24aadc5bc01130b6a9d25582203bb5308fabe1',
+  'src/third_party/cld_2/src':
+    (Var("chromium_git")) + '/external/cld2.git@14d9ef8d4766326f8aa7de54402d1b9c782d4481',
+  'src/third_party/colorama/src':
+    (Var("chromium_git")) + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
+  'src/third_party/crashpad/crashpad':
+    (Var("chromium_git")) + '/crashpad/crashpad.git@797adb320680a4a8ad39428075cca287e04b111f',
   'src/third_party/dom_distiller_js/dist':
-    Var('chromium_git') + '/external/github.com/chromium/dom-distiller-dist.git' + '@' + '81e5b59da2a7a0a518b90b5ded58670322c98128',
+    (Var("chromium_git")) + '/external/github.com/chromium/dom-distiller-dist.git@81e5b59da2a7a0a518b90b5ded58670322c98128',
+  'src/third_party/ffmpeg':
+    (Var("chromium_git")) + '/chromium/third_party/ffmpeg.git@833732528c1873f37b490b289eeaded2ae86349c',
+  'src/third_party/flac':
+    (Var("chromium_git")) + '/chromium/deps/flac.git@c291ce676d2c855f7b2739f00f5c7f7e813813dc',
+  'src/third_party/hunspell_dictionaries':
+    (Var("chromium_git")) + '/chromium/deps/hunspell_dictionaries.git@c106afdcec5d3de2622e19f1b3294c47bbd8bd72',
+  'src/third_party/icu':
+    (Var("chromium_git")) + '/chromium/deps/icu.git@257f502ab8b2a6371efcd6d4606202e7f5be17d8',
+  'src/third_party/jsoncpp/source':
+    (Var("chromium_git")) + '/external/github.com/open-source-parsers/jsoncpp.git@f572e8e42e22cfcf5ab0aea26574f408943edfa4',
+  'src/third_party/leveldatabase/src':
+    (Var("chromium_git")) + '/external/leveldb.git@40c17c0b84ac0b791fb434096fd5c05f3819ad55',
+  'src/third_party/libaddressinput/src':
+    (Var("chromium_git")) + '/external/libaddressinput.git@5eeeb797e79fa01503fcdcbebdc50036fac023ef',
+  'src/third_party/libexif/sources':
+    (Var("chromium_git")) + '/chromium/deps/libexif/sources.git@ed98343daabd7b4497f97fda972e132e6877c48a',
+# TODO(terry): Commented out 45 roll and reverted to use old SHA1 for this from roll 39
+#  'src/third_party/libjingle/source/talk':
+#    (Var("chromium_git")) + '/external/webrtc/trunk/talk.git@e0fa7aec7298a0c82081b14e17191f80f9f0e044',
+  'src/third_party/libjingle/source/talk':
+    (Var('chromium_git')) + '/external/webrtc/trunk/talk.git' + '@' + 'f7c923ddc729dc7f002b0e194ab72b661f932c00', # commit position 9564
+  'src/third_party/libjpeg_turbo':
+    (Var("chromium_git")) + '/chromium/deps/libjpeg_turbo.git@f4631b6ee8b1dbb05e51ae335a7886f9ac598ab6',
+  'src/third_party/libphonenumber/src/phonenumbers':
+    (Var("chromium_git")) + '/external/libphonenumber/cpp/src/phonenumbers.git@0d6e3e50e17c94262ad1ca3b7d52b11223084bca',
+  'src/third_party/libphonenumber/src/resources':
+    (Var("chromium_git")) + '/external/libphonenumber/resources.git@b6dfdc7952571ff7ee72643cd88c988cbe966396',
+  'src/third_party/libphonenumber/src/test':
+    (Var("chromium_git")) + '/external/libphonenumber/cpp/test.git@f351a7e007f9c9995494499120bbc361ca808a16',
+  'src/third_party/libsrtp':
+    (Var("chromium_git")) + '/chromium/deps/libsrtp.git@9c53f858cddd4d890e405e91ff3af0b48dfd90e6',
+  'src/third_party/libvpx':
+    (Var("chromium_git")) + '/chromium/deps/libvpx.git@96484d320036bbc1e30f1dea232799a3e0517b1d',
+  'src/third_party/libyuv':
+    (Var("chromium_git")) + '/libyuv/libyuv.git@0e83b64e8879e9469919dc96b5d970c7c5bd05af',
+  'src/third_party/mesa/src':
+    (Var("chromium_git")) + '/chromium/deps/mesa.git@071d25db04c23821a12a8b260ab9d96a097402f0',
+  'src/third_party/openmax_dl':
+    (Var("chromium_git")) + '/external/webrtc/deps/third_party/openmax.git@22bb1085a6a0f6f3589a8c3d60ed0a9b82248275',
+  'src/third_party/opus/src':
+    (Var("chromium_git")) + '/chromium/deps/opus.git@cae696156f1e60006e39821e79a1811ae1933c69',
+  'src/third_party/pdfium':
+    'https://pdfium.googlesource.com/pdfium.git@860a3eb0f3c18853f95df5a70dc50a95a29aafb1',
+  'src/third_party/py_trace_event/src':
+    (Var("chromium_git")) + '/external/py_trace_event.git@dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30',
+  'src/third_party/pyftpdlib/src':
+    (Var("chromium_git")) + '/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45',
+  'src/third_party/pywebsocket/src':
+    (Var("chromium_git")) + '/external/pywebsocket/src.git@cb349e87ddb30ff8d1fa1a89be39cec901f4a29c',
+  'src/third_party/safe_browsing/testing':
+    (Var("chromium_git")) + '/external/google-safe-browsing/testing.git@9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6',
+  'src/third_party/scons-2.0.1':
+    (Var("chromium_git")) + '/native_client/src/third_party/scons-2.0.1.git@1c1550e17fc26355d08627fbdec13d8291227067',
+  'src/third_party/sfntly/cpp/src':
+    (Var("chromium_git")) + '/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac',
+  'src/third_party/skia':
+    (Var("chromium_git")) + '/skia.git@56032c4f7bab7b0dd31b4d1eb139561d73fcd12d',
+  'src/third_party/smhasher/src':
+    (Var("chromium_git")) + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f',
+  'src/third_party/snappy/src':
+    (Var("chromium_git")) + '/external/snappy.git@762bb32f0c9d2f31ba4958c7c0933d22e80c20bf',
+  'src/third_party/trace-viewer':
+    (Var("chromium_git")) + '/external/trace-viewer.git@4f30209abd53c699c937519f39ce41888f93507b',
+  'src/third_party/usrsctp/usrsctplib':
+    (Var("chromium_git")) + '/external/usrsctplib.git@36444a999739e9e408f8f587cb4c3ffeef2e50ac',
+  'src/third_party/webdriver/pylib':
+    (Var("chromium_git")) + '/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd',
+  'src/third_party/webgl/src':
+    (Var("chromium_git")) + '/external/khronosgroup/webgl.git@8986f8bfa84547b1a30a9256ebdd665024d68d71',
+  'src/third_party/webpagereplay':
+    (Var("chromium_git")) + '/external/github.com/chromium/web-page-replay.git@5da5975950daa7b30a6938da73fd0b3200901b0c',
+# TODO(terry): Commented out 45 roll and reverted to use old SHA1 for this from roll 39
+#  'src/third_party/webrtc':
+#    (Var("chromium_git")) + '/external/webrtc/trunk/webrtc.git@7c166694b3c8f614eeb47148f4ab68545c78786e',
+  'src/third_party/webrtc':
+    (Var('chromium_git')) + '/external/webrtc/trunk/webrtc.git' + '@' + '847b12a225694e10425c8a9b31e0eec028baf841', # commit position 9565
+  'src/third_party/yasm/source/patched-yasm':
+    (Var("chromium_git")) + '/chromium/deps/yasm/patched-yasm.git@4671120cd8558ce62ee8672ebf3eb6f5216f909b',
+  'src/tools/deps2git':
+    (Var("chromium_git")) + '/chromium/tools/deps2git.git@f04828eb0b5acd3e7ad983c024870f17f17b06d9',
+  'src/tools/grit':
+    (Var("chromium_git")) + '/external/grit-i18n.git@1dac9ae64b0224beb1547810933a6f9998d0d55e',
+  'src/tools/gyp':
+    (Var("chromium_git")) + '/external/gyp.git@5122240c5e5c4d8da12c543d82b03d6089eb77c5',
+  'src/tools/page_cycler/acid3':
+    (Var("chromium_git")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521',
+  'src/tools/swarming_client':
+    (Var("chromium_git")) + '/external/swarming.client.git@b39a448d8522392389b28f6997126a6ab04bfe87',
+  'src/v8':
+    (Var("chromium_git")) + '/v8/v8.git@96dddb455daff3d8626bc4e5d7b2898fbab55991'
 }
-
-
 deps_os = {
-  'win': {
-    'src/chrome/tools/test/reference_build/chrome_win':
-     Var('chromium_git') + '/chromium/reference_builds/chrome_win.git' + '@' + 'f8a3a845dfc845df6b14280f04f86a61959357ef',
-
-    'src/third_party/cygwin':
-     Var('chromium_git') + '/chromium/deps/cygwin.git' + '@' + 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
-
-    'src/third_party/psyco_win32':
-     Var('chromium_git') + '/chromium/deps/psyco_win32.git' + '@' + 'f5af9f6910ee5a8075bbaeed0591469f1661d868',
-
-    'src/third_party/bison':
-     Var('chromium_git') + '/chromium/deps/bison.git' + '@' + '083c9a45e4affdd5464ee2b224c2df649c6e26c3',
-
-    'src/third_party/gperf':
-     Var('chromium_git') + '/chromium/deps/gperf.git' + '@' + 'd892d79f64f9449770443fb06da49b5a1e5d33c1',
-
-    'src/third_party/perl':
-     Var('chromium_git') + '/chromium/deps/perl.git' + '@' + 'ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78',
-
-    'src/third_party/lighttpd':
-     Var('chromium_git') + '/chromium/deps/lighttpd.git' + '@' + Var('lighttpd_revision'),
-
-    # Parses Windows PE/COFF executable format.
-    'src/third_party/pefile':
-     Var('chromium_git') + '/external/pefile.git' + '@' + '72c6ae42396cb913bcab63c15585dc3b5c3f92f1',
-
-    # NSS, for SSLClientSocketNSS.
-    'src/third_party/nss':
-     Var('chromium_git') + '/chromium/deps/nss.git' + '@' + Var('nss_revision'),
-
-    # GNU binutils assembler for x86-32.
-    'src/third_party/gnu_binutils':
-      Var('chromium_git') + '/native_client/deps/third_party/gnu_binutils.git' + '@' + 'f4003433b61b25666565690caf3d7a7a1a4ec436',
-    # GNU binutils assembler for x86-64.
-    'src/third_party/mingw-w64/mingw/bin':
-      Var('chromium_git') + '/native_client/deps/third_party/mingw-w64/mingw/bin.git' + '@' + '3cc8b140b883a9fe4986d12cfd46c16a093d3527',
-
-    # Dependencies used by libjpeg-turbo
-    'src/third_party/yasm/binaries':
-     Var('chromium_git') + '/chromium/deps/yasm/binaries.git' + '@' + '52f9b3f4b0aa06da24ef8b123058bb61ee468881',
-
-    # Binaries for nacl sdk.
-    'src/third_party/nacl_sdk_binaries':
-     Var('chromium_git') + '/chromium/deps/nacl_sdk_binaries.git' + '@' + '759dfca03bdc774da7ecbf974f6e2b84f43699a5',
-
-    # ANGLE uses dEQP for GPU testing
-    'src/third_party/deqp/src':
-     'https://android.googlesource.com/platform/external/deqp@194294e69d44eac48bc1fb063bd607189650aa5e',
-  },
-  'ios': {
-    'src/ios/third_party/gcdwebserver/src':
-     Var('chromium_git') + '/external/github.com/swisspol/GCDWebServer.git' + '@' + '3d5fd0b8281a7224c057deb2d17709b5bea64836',
-
-    'src/third_party/google_toolbox_for_mac/src':
-      Var('chromium_git') + '/external/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'),
-
-    'src/third_party/nss':
-     Var('chromium_git') + '/chromium/deps/nss.git' + '@' + Var('nss_revision'),
-
-    # class-dump utility to generate header files for undocumented SDKs
-    'src/third_party/class-dump/src':
-     Var('chromium_git') + '/external/github.com/nygard/class-dump.git' + '@' + '93e7c6a5419380d89656dcc511dc60d475199b67',
-
-    # Code that's not needed due to not building everything
-    'src/chrome/test/data/perf/canvas_bench': None,
-    'src/chrome/test/data/perf/frame_rate/content': None,
-    'src/native_client': None,
-    'src/third_party/ffmpeg': None,
-    'src/third_party/hunspell_dictionaries': None,
-    'src/third_party/webgl': None,
-  },
-  'mac': {
-    'src/chrome/tools/test/reference_build/chrome_mac':
-     Var('chromium_git') + '/chromium/reference_builds/chrome_mac.git' + '@' + '8dc181329e7c5255f83b4b85dc2f71498a237955',
-
-    'src/third_party/google_toolbox_for_mac/src':
-      Var('chromium_git') + '/external/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'),
-
-
-    'src/third_party/pdfsqueeze':
-      Var('chromium_git') + '/external/pdfsqueeze.git' + '@' + '5936b871e6a087b7e50d4cbcb122378d8a07499f',
-
-    'src/third_party/lighttpd':
-     Var('chromium_git') + '/chromium/deps/lighttpd.git' + '@' + Var('lighttpd_revision'),
-
-    # NSS, for SSLClientSocketNSS.
-    'src/third_party/nss':
-     Var('chromium_git') + '/chromium/deps/nss.git' + '@' + Var('nss_revision'),
-
-    'src/chrome/installer/mac/third_party/xz/xz':
-     Var('chromium_git') + '/chromium/deps/xz.git' + '@' + 'eecaf55632ca72e90eb2641376bce7cdbc7284f7',
-  },
-  'unix': {
-    # Linux, really.
-    'src/chrome/tools/test/reference_build/chrome_linux':
-     Var('chromium_git') + '/chromium/reference_builds/chrome_linux64.git' + '@' + '033d053a528e820e1de3e2db766678d862a86b36',
-
-    'src/third_party/xdg-utils':
-     Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
-
-    'src/third_party/lss':
-      Var('chromium_git') + '/external/linux-syscall-support/lss.git' + '@' + Var('lss_revision'),
-
-    # For Linux and Chromium OS.
-    'src/third_party/cros_system_api':
-     Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '513f58ccbcecfd4a3d21545f67136090838eaf52',
-
-    # Note that this is different from Android's freetype repo.
-    'src/third_party/freetype2/src':
-     Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '1dd5f5f4a909866f15c92a45c9702bce290a0151',
-
-    # Build tools for Chrome OS.
-    'src/third_party/chromite':
-     Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'e19f83ba227bf1ec0077f5d3a816a415f1dd88d0',
-
-    # Dependency of chromite.git.
-    'src/third_party/pyelftools':
-     Var('chromium_git') + '/chromiumos/third_party/pyelftools.git' + '@' + 'bdc1d380acd88d4bfaf47265008091483b0d614e',
-
-    'src/third_party/liblouis/src':
-     Var('chromium_git') + '/external/liblouis-github.git' + '@' + '5f9c03f2a3478561deb6ae4798175094be8a26c2',
-
-    # Used for embedded builds. CrOS & Linux use the system version.
-    'src/third_party/fontconfig/src':
-     Var('chromium_git') + '/external/fontconfig.git' + '@' + 'f16c3118e25546c1b749f9823c51827a60aeb5c1',
-
-    'src/third_party/stp/src':
-     Var('chromium_git') + '/external/github.com/stp/stp.git' + '@' + 'fc94a599207752ab4d64048204f0c88494811b62',
-  },
   'android': {
     'src/third_party/android_protobuf/src':
-     Var('chromium_git') + '/external/android_protobuf.git' + '@' + '999188d0dc72e97f7fe08bb756958a2cf090f4e7',
-
+      (Var("chromium_git")) + '/external/android_protobuf.git@999188d0dc72e97f7fe08bb756958a2cf090f4e7',
     'src/third_party/android_tools':
-     Var('chromium_git') + '/android_tools.git' + '@' + '21f4bcbd6cd927e4b4227cfde7d5f13486be1236',
-
+      (Var("chromium_git")) + '/android_tools.git@4238a28593b7e6178c95431f91ca8c24e45fa7eb',
     'src/third_party/apache-mime4j':
-     Var('chromium_git') + '/chromium/deps/apache-mime4j.git' + '@' + '28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a',
-
+      (Var("chromium_git")) + '/chromium/deps/apache-mime4j.git@28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a',
     'src/third_party/appurify-python/src':
-     Var('chromium_git') + '/external/github.com/appurify/appurify-python.git' + '@' + 'ee7abd5c5ae3106f72b2a0b9d2cb55094688e867',
-
+      (Var("chromium_git")) + '/external/github.com/appurify/appurify-python.git@ee7abd5c5ae3106f72b2a0b9d2cb55094688e867',
     'src/third_party/cardboard-java/src':
-     Var('chromium_git') + '/external/github.com/googlesamples/cardboard-java.git' + '@' + '08ad25a04f2801bd822c3f2cd28301b68d74aef6',
-
-    'src/third_party/errorprone/lib':
-      Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + '6c66e56c0f9d750aef83190466df834f9d6af8ab',
-
-    'src/third_party/findbugs':
-     Var('chromium_git') + '/chromium/deps/findbugs.git' + '@' + '7f69fa78a6db6dc31866d09572a0e356e921bf12',
-
-    'src/third_party/freetype-android/src':
-     Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + 'e186230678ee8e4ea4ac4797ece8125761e3225a',
-
-   'src/third_party/elfutils/src':
-     Var('chromium_git') + '/external/elfutils.git' + '@' + '249673729a7e5dbd5de4f3760bdcaa3d23d154d7',
-
-    'src/third_party/httpcomponents-client':
-     Var('chromium_git') + '/chromium/deps/httpcomponents-client.git' + '@' + '285c4dafc5de0e853fa845dce5773e223219601c',
-
-    'src/third_party/httpcomponents-core':
-     Var('chromium_git') + '/chromium/deps/httpcomponents-core.git' + '@' + '9f7180a96f8fa5cab23f793c14b413356d419e62',
-
-    'src/third_party/jarjar':
-     Var('chromium_git') + '/chromium/deps/jarjar.git' + '@' + '2e1ead4c68c450e0b77fe49e3f9137842b8b6920',
-
-    'src/third_party/jsr-305/src':
-      Var('chromium_git') + '/external/jsr-305.git' + '@' + '642c508235471f7220af6d5df2d3210e3bfc0919',
-
-    'src/third_party/junit/src':
-      Var('chromium_git') + '/external/junit.git' + '@' + '45a44647e7306262162e1346b750c3209019f2e1',
-
-    'src/third_party/mockito/src':
-      Var('chromium_git') + '/external/mockito/mockito.git' + '@' + 'ed99a52e94a84bd7c467f2443b475a22fcc6ba8e',
-
-    'src/third_party/robolectric/lib':
-      Var('chromium_git') + '/chromium/third_party/robolectric.git' + '@' + '6b63c99a8b6967acdb42cbed0adb067c80efc810',
-
-    'src/third_party/ub-uiautomator/lib':
-      Var('chromium_git') + '/chromium/third_party/ub-uiautomator.git' + '@' + 'e6f02481bada8bdbdfdd7987dd6e648c44a3adcb',
-
-    'src/third_party/lss':
-      Var('chromium_git') + '/external/linux-syscall-support/lss.git' + '@' + Var('lss_revision'),
-
-    'src/third_party/requests/src':
-      Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'f172b30356d821d180fa4ecfa3e71c7274a32de4',
-
+      (Var("chromium_git")) + '/external/github.com/googlesamples/cardboard-java.git@08ad25a04f2801bd822c3f2cd28301b68d74aef6',
     'src/third_party/custom_tabs_client/src':
-      Var('chromium_git') + '/external/github.com/GoogleChrome/custom-tabs-client.git' + '@' + 'ef3ea193af9f4e45dd5094e8b6a952fb213bf11e',
+      (Var("chromium_git")) + '/external/github.com/GoogleChrome/custom-tabs-client.git@a562624975518bd6c6c5976eb883fcc5f69d16b6',
+    'src/third_party/elfutils/src':
+      (Var("chromium_git")) + '/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7',
+    'src/third_party/errorprone/lib':
+      (Var("chromium_git")) + '/chromium/third_party/errorprone.git@6c66e56c0f9d750aef83190466df834f9d6af8ab',
+    'src/third_party/findbugs':
+      (Var("chromium_git")) + '/chromium/deps/findbugs.git@7f69fa78a6db6dc31866d09572a0e356e921bf12',
+    'src/third_party/freetype-android/src':
+      (Var("chromium_git")) + '/chromium/src/third_party/freetype2.git@e186230678ee8e4ea4ac4797ece8125761e3225a',
+    'src/third_party/httpcomponents-client':
+      (Var("chromium_git")) + '/chromium/deps/httpcomponents-client.git@285c4dafc5de0e853fa845dce5773e223219601c',
+    'src/third_party/httpcomponents-core':
+      (Var("chromium_git")) + '/chromium/deps/httpcomponents-core.git@9f7180a96f8fa5cab23f793c14b413356d419e62',
+    'src/third_party/jarjar':
+      (Var("chromium_git")) + '/chromium/deps/jarjar.git@2e1ead4c68c450e0b77fe49e3f9137842b8b6920',
+    'src/third_party/jsr-305/src':
+      (Var("chromium_git")) + '/external/jsr-305.git@642c508235471f7220af6d5df2d3210e3bfc0919',
+    'src/third_party/junit/src':
+      (Var("chromium_git")) + '/external/junit.git@45a44647e7306262162e1346b750c3209019f2e1',
+    'src/third_party/lss':
+      (Var("chromium_git")) + '/external/linux-syscall-support/lss.git@6f97298fe3794e92c8c896a6bc06e0b36e4c3de3',
+    'src/third_party/mockito/src':
+      (Var("chromium_git")) + '/external/mockito/mockito.git@ed99a52e94a84bd7c467f2443b475a22fcc6ba8e',
+    'src/third_party/requests/src':
+      (Var("chromium_git")) + '/external/github.com/kennethreitz/requests.git@f172b30356d821d180fa4ecfa3e71c7274a32de4',
+    'src/third_party/robolectric/lib':
+      (Var("chromium_git")) + '/chromium/third_party/robolectric.git@6b63c99a8b6967acdb42cbed0adb067c80efc810',
+    'src/third_party/ub-uiautomator/lib':
+      (Var("chromium_git")) + '/chromium/third_party/ub-uiautomator.git@e6f02481bada8bdbdfdd7987dd6e648c44a3adcb'
   },
+  'ios': {
+    'src/chrome/test/data/perf/canvas_bench': None,
+    'src/chrome/test/data/perf/frame_rate/content': None,
+    'src/ios/third_party/gcdwebserver/src':
+      (Var("chromium_git")) + '/external/github.com/swisspol/GCDWebServer.git@3d5fd0b8281a7224c057deb2d17709b5bea64836',
+    'src/native_client': None,
+    'src/third_party/class-dump/src':
+      (Var("chromium_git")) + '/external/github.com/nygard/class-dump.git@978d177ca6f0d2e5e34acf3e8dadc63e3140ebbc',
+    'src/third_party/ffmpeg': None,
+    'src/third_party/google_toolbox_for_mac/src':
+      (Var("chromium_git")) + '/external/google-toolbox-for-mac.git@ce47a231ea0b238fbe95538e86cc61d74c234be6',
+    'src/third_party/hunspell_dictionaries': None,
+    'src/third_party/nss':
+      (Var("chromium_git")) + '/chromium/deps/nss.git@aab0d08a298b29407397fbb1c4219f99e99431ed',
+    'src/third_party/webgl': None
+  },
+  'mac': {
+    'src/chrome/installer/mac/third_party/xz/xz':
+      (Var("chromium_git")) + '/chromium/deps/xz.git@eecaf55632ca72e90eb2641376bce7cdbc7284f7',
+    'src/chrome/tools/test/reference_build/chrome_mac':
+      (Var("chromium_git")) + '/chromium/reference_builds/chrome_mac.git@8dc181329e7c5255f83b4b85dc2f71498a237955',
+    'src/third_party/google_toolbox_for_mac/src':
+      (Var("chromium_git")) + '/external/google-toolbox-for-mac.git@ce47a231ea0b238fbe95538e86cc61d74c234be6',
+    'src/third_party/lighttpd':
+      (Var("chromium_git")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb',
+    'src/third_party/nss':
+      (Var("chromium_git")) + '/chromium/deps/nss.git@aab0d08a298b29407397fbb1c4219f99e99431ed',
+    'src/third_party/pdfsqueeze':
+      (Var("chromium_git")) + '/external/pdfsqueeze.git@5936b871e6a087b7e50d4cbcb122378d8a07499f'
+  },
+  'unix': {
+    'src/chrome/tools/test/reference_build/chrome_linux':
+      (Var("chromium_git")) + '/chromium/reference_builds/chrome_linux64.git@033d053a528e820e1de3e2db766678d862a86b36',
+    'src/third_party/chromite':
+      (Var("chromium_git")) + '/chromiumos/chromite.git@e19f83ba227bf1ec0077f5d3a816a415f1dd88d0',
+    'src/third_party/cros_system_api':
+      (Var("chromium_git")) + '/chromiumos/platform/system_api.git@513f58ccbcecfd4a3d21545f67136090838eaf52',
+    'src/third_party/fontconfig/src':
+      (Var("chromium_git")) + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1',
+    'src/third_party/freetype2/src':
+      (Var("chromium_git")) + '/chromium/src/third_party/freetype2.git@1dd5f5f4a909866f15c92a45c9702bce290a0151',
+    'src/third_party/liblouis/src':
+      (Var("chromium_git")) + '/external/liblouis-github.git@5f9c03f2a3478561deb6ae4798175094be8a26c2',
+    'src/third_party/lss':
+      (Var("chromium_git")) + '/external/linux-syscall-support/lss.git@6f97298fe3794e92c8c896a6bc06e0b36e4c3de3',
+    'src/third_party/pyelftools':
+      (Var("chromium_git")) + '/chromiumos/third_party/pyelftools.git@bdc1d380acd88d4bfaf47265008091483b0d614e',
+    'src/third_party/stp/src':
+      (Var("chromium_git")) + '/external/github.com/stp/stp.git@fc94a599207752ab4d64048204f0c88494811b62',
+    'src/third_party/xdg-utils':
+      (Var("chromium_git")) + '/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d'
+  },
+  'win': {
+    'src/chrome/tools/test/reference_build/chrome_win':
+      (Var("chromium_git")) + '/chromium/reference_builds/chrome_win.git@f8a3a845dfc845df6b14280f04f86a61959357ef',
+    'src/third_party/bison':
+      (Var("chromium_git")) + '/chromium/deps/bison.git@083c9a45e4affdd5464ee2b224c2df649c6e26c3',
+    'src/third_party/cygwin':
+      (Var("chromium_git")) + '/chromium/deps/cygwin.git@c89e446b273697fadf3a10ff1007a97c0b7de6df',
+    'src/third_party/deqp/src':
+      'https://android.googlesource.com/platform/external/deqp@194294e69d44eac48bc1fb063bd607189650aa5e',
+    'src/third_party/gnu_binutils':
+      (Var("chromium_git")) + '/native_client/deps/third_party/gnu_binutils.git@f4003433b61b25666565690caf3d7a7a1a4ec436',
+    'src/third_party/gperf':
+      (Var("chromium_git")) + '/chromium/deps/gperf.git@d892d79f64f9449770443fb06da49b5a1e5d33c1',
+    'src/third_party/lighttpd':
+      (Var("chromium_git")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb',
+    'src/third_party/mingw-w64/mingw/bin':
+      (Var("chromium_git")) + '/native_client/deps/third_party/mingw-w64/mingw/bin.git@3cc8b140b883a9fe4986d12cfd46c16a093d3527',
+    'src/third_party/nacl_sdk_binaries':
+      (Var("chromium_git")) + '/chromium/deps/nacl_sdk_binaries.git@759dfca03bdc774da7ecbf974f6e2b84f43699a5',
+    'src/third_party/nss':
+      (Var("chromium_git")) + '/chromium/deps/nss.git@aab0d08a298b29407397fbb1c4219f99e99431ed',
+    'src/third_party/pefile':
+      (Var("chromium_git")) + '/external/pefile.git@72c6ae42396cb913bcab63c15585dc3b5c3f92f1',
+    'src/third_party/perl':
+      (Var("chromium_git")) + '/chromium/deps/perl.git@ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78',
+    'src/third_party/psyco_win32':
+      (Var("chromium_git")) + '/chromium/deps/psyco_win32.git@f5af9f6910ee5a8075bbaeed0591469f1661d868',
+    'src/third_party/yasm/binaries':
+      (Var("chromium_git")) + '/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881'
+  }
 }
-
-
+hooks = [
+  {
+    'action': [
+      'python',
+      'src/build/landmines.py'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'landmines'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/download_nacl_toolchains.py',
+      '--mode',
+      'nacl_core_sdk',
+      'sync',
+      '--extract'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'nacltools'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/download_sdk_extras.py'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'sdkextras'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/linux/sysroot_scripts/install-sysroot.py',
+      '--running-as-hook'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'sysroot'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/vs_toolchain.py',
+      'update'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'win_toolchain'
+  },
+  {
+    'action': [
+      'python',
+      'src/third_party/binutils/download.py'
+    ],
+    'pattern':
+      'src/third_party/binutils',
+    'name':
+      'binutils'
+  },
+  {
+    'action': [
+      'python',
+      'src/tools/clang/scripts/update.py',
+      '--if-needed'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'clang'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/util/lastchange.py',
+      '-o',
+      'src/build/util/LASTCHANGE'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'lastchange'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/util/lastchange.py',
+      '--git-hash-only',
+      '-s',
+      'src/third_party/WebKit',
+      '-o',
+      'src/build/util/LASTCHANGE.blink'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'lastchange'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=win32',
+      '--no_auth',
+      '--bucket',
+      'chromium-gn',
+      '-s',
+      'src/buildtools/win/gn.exe.sha1'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'gn_win'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=darwin',
+      '--no_auth',
+      '--bucket',
+      'chromium-gn',
+      '-s',
+      'src/buildtools/mac/gn.sha1'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'gn_mac'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=linux*',
+      '--no_auth',
+      '--bucket',
+      'chromium-gn',
+      '-s',
+      'src/buildtools/linux64/gn.sha1'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'gn_linux64'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=win32',
+      '--no_auth',
+      '--bucket',
+      'chromium-clang-format',
+      '-s',
+      'src/buildtools/win/clang-format.exe.sha1'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'clang_format_win'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=darwin',
+      '--no_auth',
+      '--bucket',
+      'chromium-clang-format',
+      '-s',
+      'src/buildtools/mac/clang-format.sha1'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'clang_format_mac'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=linux*',
+      '--no_auth',
+      '--bucket',
+      'chromium-clang-format',
+      '-s',
+      'src/buildtools/linux64/clang-format.sha1'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'clang_format_linux'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=win32',
+      '--no_auth',
+      '--bucket',
+      'chromium-luci',
+      '-d',
+      'src/tools/luci-go/win64'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'luci-go_win'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=darwin',
+      '--no_auth',
+      '--bucket',
+      'chromium-luci',
+      '-d',
+      'src/tools/luci-go/mac64'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'luci-go_mac'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=linux*',
+      '--no_auth',
+      '--bucket',
+      'chromium-luci',
+      '-d',
+      'src/tools/luci-go/linux64'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'luci-go_linux'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=linux*',
+      '--no_auth',
+      '--bucket',
+      'chromium-eu-strip',
+      '-s',
+      'src/build/linux/bin/eu-strip.sha1'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'eu-strip'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=win32',
+      '--no_auth',
+      '--bucket',
+      'chromium-drmemory',
+      '-s',
+      'src/third_party/drmemory/drmemory-windows-sfx.exe.sha1'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'drmemory'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/get_syzygy_binaries.py',
+      '--output-dir=src/third_party/syzygy/binaries',
+      '--revision=e50a9822fc8aeb5e7902da5e2940ea135d732e57',
+      '--overwrite'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'syzygy-binaries'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/get_syzygy_binaries.py',
+      '--output-dir=src/third_party/kasko',
+      '--revision=283aeaceeb22e2ba40a1753e3cb32454b59cc017',
+      '--resource=kasko.zip',
+      '--resource=kasko_symbols.zip',
+      '--overwrite'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'kasko'
+  },
+  {
+    'action': [
+      'download_from_google_storage',
+      '--no_resume',
+      '--platform=win32',
+      '--directory',
+      '--recursive',
+      '--no_auth',
+      '--num_threads=16',
+      '--bucket',
+      'chromium-apache-win32',
+      'src/third_party/apache-win32'
+    ],
+    'pattern':
+      '\\.sha1',
+    'name':
+      'apache_win32'
+  },
+  {
+    'action': [
+      'python',
+      'src/third_party/mojo/src/mojo/public/tools/download_shell_binary.py',
+      '--tools-directory=../../../../../../tools'
+    ],
+    'pattern':
+      '',
+    'name':
+      'download_mojo_shell'
+  },
+  {
+    'action': [
+      'python',
+      'src/third_party/instrumented_libraries/scripts/download_binaries.py'
+    ],
+    'pattern':
+      '\\.sha1',
+    'name':
+      'instrumented_libraries'
+  },
+  {
+    'action': [
+      'python',
+      'src/tools/remove_stale_pyc_files.py',
+      'src/android_webview/tools',
+      'src/gpu/gles2_conform_support',
+      'src/ppapi',
+      'src/printing',
+      'src/third_party/closure_compiler/build',
+      'src/tools'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'remove_stale_pyc_files'
+  },
+  {
+    'action': [
+      'python',
+      'src/build/gyp_chromium'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'gyp'
+  },
+  {
+    'action': [
+      'python',
+      'src/tools/check_git_config.py',
+      '--running-as-hook'
+    ],
+    'pattern':
+      '.',
+    'name':
+      'check_git_config'
+  }
+]
 include_rules = [
-  # Everybody can use some things.
-  # NOTE: THIS HAS TO STAY IN SYNC WITH third_party/DEPS which disallows these.
   '+base',
   '+build',
   '+ipc',
-
-  # Everybody can use headers generated by tools/generate_library_loader.
   '+library_loaders',
-
   '+testing',
   '+third_party/icu/source/common/unicode',
   '+third_party/icu/source/i18n/unicode',
-  '+url',
+  '+url'
 ]
-
-
-# checkdeps.py shouldn't check include paths for files in these dirs:
 skip_child_includes = [
   'breakpad',
   'native_client_sdk',
@@ -493,306 +697,5 @@
   'skia',
   'testing',
   'v8',
-  'win8',
-]
-
-
-hooks = [
-  {
-    # This clobbers when necessary (based on get_landmines.py). It must be the
-    # first hook so that other things that get/generate into the output
-    # directory will not subsequently be clobbered.
-    'name': 'landmines',
-    'pattern': '.',
-    'action': [
-        'python',
-        'src/build/landmines.py',
-    ],
-  },
-  {
-    # This downloads binaries for Native Client's newlib toolchain.
-    # Done in lieu of building the toolchain from scratch as it can take
-    # anywhere from 30 minutes to 4 hours depending on platform to build.
-    'name': 'nacltools',
-    'pattern': '.',
-    'action': [
-        'python',
-        'src/build/download_nacl_toolchains.py',
-        '--mode', 'nacl_core_sdk',
-        'sync', '--extract',
-    ],
-  },
-  {
-    # This downloads SDK extras and puts them in the
-    # third_party/android_tools/sdk/extras directory on the bots. Developers
-    # need to manually install these packages and accept the ToS.
-    'name': 'sdkextras',
-    'pattern': '.',
-    # When adding a new sdk extras package to download, add the package
-    # directory and zip file to .gitignore in third_party/android_tools.
-    'action': ['python', 'src/build/download_sdk_extras.py'],
-  },
-  {
-    # Downloads the current stable linux sysroot to build/linux/ if needed.
-    # This sysroot updates at about the same rate that the chrome build deps
-    # change. This script is a no-op except for linux users who are doing
-    # official chrome builds or cross compiling.
-    'name': 'sysroot',
-    'pattern': '.',
-    'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py',
-               '--running-as-hook'],
-  },
-  {
-    # Update the Windows toolchain if necessary.
-    'name': 'win_toolchain',
-    'pattern': '.',
-    'action': ['python', 'src/build/vs_toolchain.py', 'update'],
-  },
-  # Pull binutils for linux, enabled debug fission for faster linking /
-  # debugging when used with clang on Ubuntu Precise.
-  # https://code.google.com/p/chromium/issues/detail?id=352046
-  {
-    'name': 'binutils',
-    'pattern': 'src/third_party/binutils',
-    'action': [
-        'python',
-        'src/third_party/binutils/download.py',
-    ],
-  },
-  {
-    # Pull clang if needed or requested via GYP_DEFINES.
-    # Note: On Win, this should run after win_toolchain, as it may use it.
-    'name': 'clang',
-    'pattern': '.',
-    'action': ['python', 'src/tools/clang/scripts/update.py', '--if-needed'],
-  },
-  {
-    # Update LASTCHANGE.
-    'name': 'lastchange',
-    'pattern': '.',
-    'action': ['python', 'src/build/util/lastchange.py',
-               '-o', 'src/build/util/LASTCHANGE'],
-  },
-  {
-    # Update LASTCHANGE.blink.
-    'name': 'lastchange',
-    'pattern': '.',
-    'action': ['python', 'src/build/util/lastchange.py',
-               '-s', 'src/third_party/WebKit',
-               '-o', 'src/build/util/LASTCHANGE.blink'],
-  },
-  # Pull GN binaries. This needs to be before running GYP below.
-  {
-    'name': 'gn_win',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=win32',
-                '--no_auth',
-                '--bucket', 'chromium-gn',
-                '-s', 'src/buildtools/win/gn.exe.sha1',
-    ],
-  },
-  {
-    'name': 'gn_mac',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=darwin',
-                '--no_auth',
-                '--bucket', 'chromium-gn',
-                '-s', 'src/buildtools/mac/gn.sha1',
-    ],
-  },
-  {
-    'name': 'gn_linux64',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=linux*',
-                '--no_auth',
-                '--bucket', 'chromium-gn',
-                '-s', 'src/buildtools/linux64/gn.sha1',
-    ],
-  },
-  # Pull clang-format binaries using checked-in hashes.
-  {
-    'name': 'clang_format_win',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=win32',
-                '--no_auth',
-                '--bucket', 'chromium-clang-format',
-                '-s', 'src/buildtools/win/clang-format.exe.sha1',
-    ],
-  },
-  {
-    'name': 'clang_format_mac',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=darwin',
-                '--no_auth',
-                '--bucket', 'chromium-clang-format',
-                '-s', 'src/buildtools/mac/clang-format.sha1',
-    ],
-  },
-  {
-    'name': 'clang_format_linux',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=linux*',
-                '--no_auth',
-                '--bucket', 'chromium-clang-format',
-                '-s', 'src/buildtools/linux64/clang-format.sha1',
-    ],
-  },
-  # Pull luci-go binaries (isolate, swarming) using checked-in hashes.
-  {
-    'name': 'luci-go_win',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=win32',
-                '--no_auth',
-                '--bucket', 'chromium-luci',
-                '-d', 'src/tools/luci-go/win64',
-    ],
-  },
-  {
-    'name': 'luci-go_mac',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=darwin',
-                '--no_auth',
-                '--bucket', 'chromium-luci',
-                '-d', 'src/tools/luci-go/mac64',
-    ],
-  },
-  {
-    'name': 'luci-go_linux',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=linux*',
-                '--no_auth',
-                '--bucket', 'chromium-luci',
-                '-d', 'src/tools/luci-go/linux64',
-    ],
-  },
-  # Pull eu-strip binaries using checked-in hashes.
-  {
-    'name': 'eu-strip',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=linux*',
-                '--no_auth',
-                '--bucket', 'chromium-eu-strip',
-                '-s', 'src/build/linux/bin/eu-strip.sha1',
-    ],
-  },
-  {
-    'name': 'drmemory',
-    'pattern': '.',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=win32',
-                '--no_auth',
-                '--bucket', 'chromium-drmemory',
-                '-s', 'src/third_party/drmemory/drmemory-windows-sfx.exe.sha1',
-              ],
-  },
-  # Pull the Syzygy binaries, used for optimization and instrumentation.
-  {
-    'name': 'syzygy-binaries',
-    'pattern': '.',
-    'action': ['python',
-               'src/build/get_syzygy_binaries.py',
-               '--output-dir=src/third_party/syzygy/binaries',
-               '--revision=e50a9822fc8aeb5e7902da5e2940ea135d732e57',
-               '--overwrite',
-    ],
-  },
-  {
-    'name': 'kasko',
-    'pattern': '.',
-    'action': ['python',
-               'src/build/get_syzygy_binaries.py',
-               '--output-dir=src/third_party/kasko',
-               '--revision=283aeaceeb22e2ba40a1753e3cb32454b59cc017',
-               '--resource=kasko.zip',
-               '--resource=kasko_symbols.zip',
-               '--overwrite',
-    ],
-  },
-  {
-    'name': 'apache_win32',
-    'pattern': '\\.sha1',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=win32',
-                '--directory',
-                '--recursive',
-                '--no_auth',
-                '--num_threads=16',
-                '--bucket', 'chromium-apache-win32',
-                'src/third_party/apache-win32',
-    ],
-  },
-  # Pull the mojo_shell binary, used for mojo development
-  {
-    'name': 'download_mojo_shell',
-    'pattern': '',
-    'action': [ 'python',
-                'src/third_party/mojo/src/mojo/public/tools/download_shell_binary.py',
-                '--tools-directory=../../../../../../tools',
-              ],
-  },
-  {
-    # Pull sanitizer-instrumented third-party libraries if requested via
-    # GYP_DEFINES.
-    'name': 'instrumented_libraries',
-    'pattern': '\\.sha1',
-    'action': ['python', 'src/third_party/instrumented_libraries/scripts/download_binaries.py'],
-  },
-  {
-    # Ensure that while generating dependencies lists in .gyp files we don't
-    # accidentally reference any .pyc files whose corresponding .py files have
-    # already been deleted.
-    # We should actually try to avoid generating .pyc files, crbug.com/500078.
-    'name': 'remove_stale_pyc_files',
-    'pattern': '.',
-    'action': [
-        'python',
-        'src/tools/remove_stale_pyc_files.py',
-        'src/android_webview/tools',
-        'src/gpu/gles2_conform_support',
-        'src/ppapi',
-        'src/printing',
-        'src/third_party/closure_compiler/build',
-        'src/tools',
-    ],
-  },
-  {
-    # A change to a .gyp, .gypi, or to GYP itself should run the generator.
-    'name': 'gyp',
-    'pattern': '.',
-    'action': ['python', 'src/build/gyp_chromium'],
-  },
-  {
-    # Verify committers' ~/.netc, gclient and git are properly configured for
-    # write access to the git repo. To be removed sometime after Chrome to git
-    # migration completes (let's say Sep 1 2014).
-    'name': 'check_git_config',
-    'pattern': '.',
-    'action': [
-        'python',
-        'src/tools/check_git_config.py',
-        '--running-as-hook',
-    ],
-  },
-]
+  'win8'
+]
\ No newline at end of file
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs/docs.json
index 5b936a6..123447d 100644
--- a/tools/dom/docs/docs.json
+++ b/tools/dom/docs/docs.json
@@ -5181,44 +5181,6 @@
     },
     "WebGLRenderingContext": {
       "members": {
-        "bufferData": [
-          "/**",
-          "   * Buffers the specified data.",
-          "   *",
-          "   * The [bufferData] method is provided for WebGL API compatibility reasons, but",
-          "   * it is highly recommended that you use [bufferDataTyped] or [bufferByteData]",
-          "   * depending on your purposes.",
-          "   */"
-        ],
-        "bufferSubData": [
-          "/**",
-          "   * Buffers the specified subset of data.",
-          "   *",
-          "   * The [bufferSubData] method is provided for WebGL API compatibility reasons, but",
-          "   * it is highly recommended that you use [bufferSubDataTyped] or [bufferSubByteData]",
-          "   * depending on your purposes.",
-          "   */"
-        ],
-        "texImage2D": [
-          "/**",
-          "   * Updates the currently bound texture to [data].",
-          "   *",
-          "   * The [texImage2D] method is provided for WebGL API compatibility reasons, but it",
-          "   * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]",
-          "   * (or for more specificity, the more specialized [texImage2DImageData],",
-          "   * [texImage2DCanvas], [texImage2DVideo]).",
-          "   */"
-        ],
-        "texSubImage2D": [
-          "/**",
-          "   * Updates a sub-rectangle of the currently bound texture to [data].",
-          "   *",
-          "   * The [texSubImage2D] method is provided for WebGL API compatibility reasons, but it",
-          "   * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2DTyped]",
-          "   * (or for more specificity, the more specialized [texSubImage2DImageData],",
-          "   * [texSubImage2DCanvas], [texSubImage2DVideo]).",
-          "   */"
-        ]
       }
     }
   },
diff --git a/tools/dom/dom.json b/tools/dom/dom.json
index c35f98cd..3437c02 100644
--- a/tools/dom/dom.json
+++ b/tools/dom/dom.json
@@ -88,7 +88,49 @@
   },
   "Animation": {
     "members": {
-      "Animation": {}
+      "Animation": {},
+      "cancel": {
+        "support_level": "untriaged"
+      },
+      "currentTime": {
+        "support_level": "untriaged"
+      },
+      "effect": {
+        "support_level": "untriaged"
+      },
+      "endClip": {
+        "support_level": "untriaged"
+      },
+      "finish": {
+        "support_level": "untriaged"
+      },
+      "finished": {
+        "support_level": "untriaged"
+      },
+      "pause": {
+        "support_level": "untriaged"
+      },
+      "play": {
+        "support_level": "untriaged"
+      },
+      "playState": {
+        "support_level": "untriaged"
+      },
+      "playbackRate": {
+        "support_level": "untriaged"
+      },
+      "ready": {
+        "support_level": "untriaged"
+      },
+      "reverse": {
+        "support_level": "untriaged"
+      },
+      "startClip": {
+        "support_level": "untriaged"
+      },
+      "startTime": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "untriaged"
   },
@@ -96,6 +138,61 @@
     "members": {},
     "support_level": "untriaged"
   },
+  "AnimationEffectReadOnly": {
+    "members": {
+      "computedTiming": {
+        "support_level": "untriaged"
+      },
+      "timing": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "AnimationEffectTiming": {
+    "members": {
+      "delay": {
+        "support_level": "untriaged"
+      },
+      "direction": {
+        "support_level": "untriaged"
+      },
+      "duration": {
+        "support_level": "untriaged"
+      },
+      "easing": {
+        "support_level": "untriaged"
+      },
+      "endDelay": {
+        "support_level": "untriaged"
+      },
+      "fill": {
+        "support_level": "untriaged"
+      },
+      "iterationStart": {
+        "support_level": "untriaged"
+      },
+      "iterations": {
+        "support_level": "untriaged"
+      },
+      "playbackRate": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "AnimationEvent": {
+    "members": {
+      "AnimationEvent": {},
+      "animationName": {
+        "support_level": "untriaged"
+      },
+      "elapsedTime": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "AnimationNode": {
     "members": {
       "activeDuration": {
@@ -171,6 +268,7 @@
   },
   "AnimationPlayerEvent": {
     "members": {
+      "AnimationPlayerEvent": {},
       "currentTime": {
         "support_level": "untriaged"
       },
@@ -188,8 +286,25 @@
       "getAnimationPlayers": {
         "support_level": "untriaged"
       },
+      "getAnimations": {
+        "support_level": "untriaged"
+      },
       "play": {
         "support_level": "untriaged"
+      },
+      "playbackRate": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "AppBannerPromptResult": {
+    "members": {
+      "outcome": {
+        "support_level": "untriaged"
+      },
+      "platform": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -224,6 +339,7 @@
   },
   "ApplicationCacheErrorEvent": {
     "members": {
+      "ApplicationCacheErrorEvent": {},
       "message": {
         "support_level": "untriaged"
       },
@@ -288,6 +404,12 @@
   "AudioBuffer": {
     "comment": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer-section",
     "members": {
+      "copyFromChannel": {
+        "support_level": "untriaged"
+      },
+      "copyToChannel": {
+        "support_level": "untriaged"
+      },
       "duration": {},
       "gain": {},
       "getChannelData": {},
@@ -312,6 +434,9 @@
       "SCHEDULED_STATE": {},
       "UNSCHEDULED_STATE": {},
       "buffer": {},
+      "detune": {
+        "support_level": "untriaged"
+      },
       "gain": {},
       "loop": {},
       "loopEnd": {},
@@ -337,6 +462,9 @@
       "addEventListener": {
         "support_level": "untriaged"
       },
+      "close": {
+        "support_level": "untriaged"
+      },
       "createAnalyser": {},
       "createBiquadFilter": {},
       "createBuffer": {},
@@ -361,6 +489,9 @@
         "support_level": "untriaged"
       },
       "createScriptProcessor": {},
+      "createStereoPanner": {
+        "support_level": "untriaged"
+      },
       "createWaveShaper": {},
       "createWaveTable": {},
       "currentTime": {},
@@ -374,8 +505,17 @@
       "removeEventListener": {
         "support_level": "untriaged"
       },
+      "resume": {
+        "support_level": "untriaged"
+      },
       "sampleRate": {},
-      "startRendering": {}
+      "startRendering": {},
+      "state": {
+        "support_level": "untriaged"
+      },
+      "suspend": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "experimental"
   },
@@ -490,6 +630,7 @@
   "AutocompleteErrorEvent": {
     "comment": "http://wiki.whatwg.org/wiki/RequestAutocomplete",
     "members": {
+      "AutocompleteErrorEvent": {},
       "reason": {}
     },
     "support_level": "experimental"
@@ -520,6 +661,21 @@
     },
     "support_level": "stable"
   },
+  "BeforeInstallPromptEvent": {
+    "members": {
+      "BeforeInstallPromptEvent": {},
+      "platforms": {
+        "support_level": "untriaged"
+      },
+      "prompt": {
+        "support_level": "untriaged"
+      },
+      "userChoice": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "BeforeLoadEvent": {
     "members": {
       "url": {}
@@ -566,6 +722,102 @@
     },
     "support_level": "stable"
   },
+  "Bluetooth": {
+    "members": {
+      "requestDevice": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "BluetoothDevice": {
+    "members": {
+      "connectGATT": {
+        "support_level": "untriaged"
+      },
+      "deviceClass": {
+        "support_level": "untriaged"
+      },
+      "instanceID": {
+        "support_level": "untriaged"
+      },
+      "name": {
+        "support_level": "untriaged"
+      },
+      "paired": {
+        "support_level": "untriaged"
+      },
+      "productID": {
+        "support_level": "untriaged"
+      },
+      "productVersion": {
+        "support_level": "untriaged"
+      },
+      "vendorID": {
+        "support_level": "untriaged"
+      },
+      "vendorIDSource": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "BluetoothGATTCharacteristic": {
+    "members": {
+      "readValue": {
+        "support_level": "untriaged"
+      },
+      "uuid": {
+        "support_level": "untriaged"
+      },
+      "writeValue": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "BluetoothGATTRemoteServer": {
+    "members": {
+      "connected": {
+        "support_level": "untriaged"
+      },
+      "getPrimaryService": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "BluetoothGATTService": {
+    "members": {
+      "getCharacteristic": {
+        "support_level": "untriaged"
+      },
+      "isPrimary": {
+        "support_level": "untriaged"
+      },
+      "uuid": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "BluetoothUUID": {
+    "members": {
+      "canonicalUUID": {
+        "support_level": "untriaged"
+      },
+      "getCharacteristic": {
+        "support_level": "untriaged"
+      },
+      "getDescriptor": {
+        "support_level": "untriaged"
+      },
+      "getService": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Body": {
     "members": {
       "arrayBuffer": {
@@ -592,6 +844,42 @@
     "members": {},
     "support_level": "deprecated"
   },
+  "CHROMIUMSubscribeUniform": {
+    "members": {
+      "MOUSE_POSITION_CHROMIUM": {
+        "support_level": "untriaged"
+      },
+      "SUBSCRIBED_VALUES_BUFFER_CHROMIUM": {
+        "support_level": "untriaged"
+      },
+      "bindValuebufferCHROMIUM": {
+        "support_level": "untriaged"
+      },
+      "createValuebufferCHROMIUM": {
+        "support_level": "untriaged"
+      },
+      "deleteValuebufferCHROMIUM": {
+        "support_level": "untriaged"
+      },
+      "isValuebufferCHROMIUM": {
+        "support_level": "untriaged"
+      },
+      "populateSubscribedValuesCHROMIUM": {
+        "support_level": "untriaged"
+      },
+      "subscribeValueCHROMIUM": {
+        "support_level": "untriaged"
+      },
+      "uniformValuebufferCHROMIUM": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "CHROMIUMValuebuffer": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "CSS": {
     "comment": "http://www.w3.org/TR/css3-conditional/#the-css-interface",
     "dart_action": "experimental",
@@ -626,6 +914,20 @@
     },
     "support_level": "stable"
   },
+  "CSSGroupingRule": {
+    "members": {
+      "cssRules": {
+        "support_level": "untriaged"
+      },
+      "deleteRule": {
+        "support_level": "untriaged"
+      },
+      "insertRule": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "CSSHostRule": {
     "comment": "https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#css-host-rule-interface",
     "members": {
@@ -661,6 +963,9 @@
       "__getter__": {
         "support_level": "untriaged"
       },
+      "appendRule": {
+        "support_level": "untriaged"
+      },
       "cssRules": {
         "support_level": "untriaged"
       },
@@ -969,6 +1274,12 @@
       },
       "keys": {
         "support_level": "untriaged"
+      },
+      "match": {
+        "support_level": "untriaged"
+      },
+      "open": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -1099,6 +1410,9 @@
       "fillRect": {},
       "fillStyle": {},
       "fillText": {},
+      "filter": {
+        "support_level": "untriaged"
+      },
       "font": {},
       "getContextAttributes": {
         "comment": "http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL",
@@ -1221,7 +1535,13 @@
   "CharacterData": {
     "comment": "http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-FF21A306",
     "members": {
+      "after": {
+        "support_level": "untriaged"
+      },
       "appendData": {},
+      "before": {
+        "support_level": "untriaged"
+      },
       "data": {},
       "deleteData": {},
       "insertData": {},
@@ -1242,6 +1562,12 @@
   },
   "ChildNode": {
     "members": {
+      "after": {
+        "support_level": "untriaged"
+      },
+      "before": {
+        "support_level": "untriaged"
+      },
       "nextElementSibling": {
         "support_level": "untriaged"
       },
@@ -1298,11 +1624,17 @@
   },
   "Client": {
     "members": {
+      "frameType": {
+        "support_level": "untriaged"
+      },
       "id": {
         "support_level": "untriaged"
       },
       "postMessage": {
         "support_level": "untriaged"
+      },
+      "url": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -1322,11 +1654,28 @@
   "ClientRectList": {
     "comment": "http://www.w3.org/TR/cssom-view/#the-clientrectlist-interface",
     "members": {
+      "__getter__": {
+        "support_level": "untriaged"
+      },
       "item": {},
       "length": {}
     },
     "support_level": "stable"
   },
+  "Clients": {
+    "members": {
+      "claim": {
+        "support_level": "untriaged"
+      },
+      "matchAll": {
+        "support_level": "untriaged"
+      },
+      "openWindow": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Clipboard": {
     "comment": "http://www.w3.org/html/wg/drafts/html/master/editing.html#the-datatransfer-interface (Should be DataTransfer)",
     "members": {
@@ -1342,9 +1691,18 @@
     },
     "support_level": "stable"
   },
+  "ClipboardEvent": {
+    "members": {
+      "clipboardData": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "CloseEvent": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent",
     "members": {
+      "CloseEvent": {},
       "code": {},
       "reason": {},
       "wasClean": {}
@@ -1375,6 +1733,7 @@
   "CompositionEvent": {
     "comment": "http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-CompositionEvent",
     "members": {
+      "CompositionEvent": {},
       "activeSegmentEnd": {
         "support_level": "untriaged"
       },
@@ -1389,6 +1748,65 @@
     },
     "support_level": "stable"
   },
+  "CompositorProxy": {
+    "members": {
+      "CompositorProxy": {},
+      "disconnect": {
+        "support_level": "untriaged"
+      },
+      "opacity": {
+        "support_level": "untriaged"
+      },
+      "scrollLeft": {
+        "support_level": "untriaged"
+      },
+      "scrollTop": {
+        "support_level": "untriaged"
+      },
+      "supports": {
+        "support_level": "untriaged"
+      },
+      "transform": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "CompositorWorker": {
+    "members": {
+      "CompositorWorker": {},
+      "onerror": {
+        "support_level": "untriaged"
+      },
+      "onmessage": {
+        "support_level": "untriaged"
+      },
+      "postMessage": {
+        "support_level": "untriaged"
+      },
+      "terminate": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "CompositorWorkerGlobalScope": {
+    "members": {
+      "cancelAnimationFrame": {
+        "support_level": "untriaged"
+      },
+      "onmessage": {
+        "support_level": "untriaged"
+      },
+      "postMessage": {
+        "support_level": "untriaged"
+      },
+      "requestAnimationFrame": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Console": {
     "members": {
       "assert": {
@@ -1558,11 +1976,17 @@
       "avatarURL": {
         "support_level": "untriaged"
       },
+      "iconURL": {
+        "support_level": "untriaged"
+      },
       "id": {
         "support_level": "untriaged"
       },
       "name": {
         "support_level": "untriaged"
+      },
+      "type": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -1580,6 +2004,34 @@
       },
       "request": {
         "support_level": "untriaged"
+      },
+      "requireUserMediation": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "CrossOriginConnectEvent": {
+    "members": {
+      "acceptConnection": {
+        "support_level": "untriaged"
+      },
+      "client": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "CrossOriginServiceWorkerClient": {
+    "members": {
+      "origin": {
+        "support_level": "untriaged"
+      },
+      "postMessage": {
+        "support_level": "untriaged"
+      },
+      "targetUrl": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -1643,6 +2095,7 @@
   "CustomEvent": {
     "comment": "http://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent",
     "members": {
+      "CustomEvent": {},
       "_detail": {
         "support_level": "untriaged"
       },
@@ -2137,6 +2590,9 @@
     "members": {
       "DOMSettableTokenList": {},
       "__getter__": {},
+      "item": {
+        "support_level": "untriaged"
+      },
       "value": {}
     },
     "support_level": "stable"
@@ -2144,6 +2600,9 @@
   "DOMStringList": {
     "comment": "http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList",
     "members": {
+      "__getter__": {
+        "support_level": "untriaged"
+      },
       "contains": {},
       "item": {},
       "length": {}
@@ -2156,7 +2615,10 @@
       "DOMStringMap": {},
       "__delete__": {},
       "__getter__": {},
-      "__setter__": {}
+      "__setter__": {},
+      "item": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "stable"
   },
@@ -2313,6 +2775,15 @@
     },
     "support_level": "untriaged"
   },
+  "DefaultSessionStartEvent": {
+    "members": {
+      "DefaultSessionStartEvent": {},
+      "session": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "DelayNode": {
     "comment": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DelayNode",
     "members": {
@@ -2359,6 +2830,7 @@
   },
   "DeviceLightEvent": {
     "members": {
+      "DeviceLightEvent": {},
       "value": {
         "support_level": "untriaged"
       }
@@ -2535,6 +3007,9 @@
       "documentURI": {},
       "domain": {},
       "elementFromPoint": {},
+      "elementsFromPoint": {
+        "support_level": "untriaged"
+      },
       "evaluate": {
         "dart_action": "suppress"
       },
@@ -2765,6 +3240,9 @@
       "onwheel": {
         "support_level": "untriaged"
       },
+      "origin": {
+        "support_level": "untriaged"
+      },
       "pointerLockElement": {
         "support_level": "untriaged"
       },
@@ -2783,6 +3261,9 @@
       "rootElement": {
         "support_level": "untriaged"
       },
+      "scrollingElement": {
+        "support_level": "untriaged"
+      },
       "securityPolicy": {
         "comment": "https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#idl-def-SecurityPolicy",
         "support_level": "experimental"
@@ -2972,6 +3453,27 @@
     },
     "support_level": "experimental"
   },
+  "EXTsRGB": {
+    "members": {
+      "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT": {
+        "support_level": "untriaged"
+      },
+      "SRGB8_ALPHA8_EXT": {
+        "support_level": "untriaged"
+      },
+      "SRGB_ALPHA_EXT": {
+        "support_level": "untriaged"
+      },
+      "SRGB_EXT": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "EffectModel": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "Element": {
     "comment": "http://dom.spec.whatwg.org/#interface-element",
     "members": {
@@ -2980,10 +3482,16 @@
         "dart_action": "suppress",
         "support_level": "deprecated"
       },
+      "after": {
+        "support_level": "untriaged"
+      },
       "animate": {
         "support_level": "untriaged"
       },
       "attributes": {},
+      "before": {
+        "support_level": "untriaged"
+      },
       "blur": {},
       "childElementCount": {},
       "children": {
@@ -3004,6 +3512,15 @@
       "clientLeft": {},
       "clientTop": {},
       "clientWidth": {},
+      "closest": {
+        "support_level": "untriaged"
+      },
+      "computedName": {
+        "support_level": "untriaged"
+      },
+      "computedRole": {
+        "support_level": "untriaged"
+      },
       "contentEditable": {
         "comment": "http://www.whatwg.org/specs/web-apps/2007-10-26/multipage/section-elements.html#htmlelement",
         "dart_action": "stable",
@@ -3034,6 +3551,9 @@
       "getAnimationPlayers": {
         "support_level": "untriaged"
       },
+      "getAnimations": {
+        "support_level": "untriaged"
+      },
       "getAttribute": {
         "support_level": "untriaged"
       },
@@ -3311,6 +3831,12 @@
       "requestPointerLock": {
         "support_level": "untriaged"
       },
+      "scroll": {
+        "support_level": "untriaged"
+      },
+      "scrollBy": {
+        "support_level": "untriaged"
+      },
       "scrollByLines": {},
       "scrollByPages": {},
       "scrollHeight": {},
@@ -3322,6 +3848,9 @@
         "support_level": "nonstandard"
       },
       "scrollLeft": {},
+      "scrollTo": {
+        "support_level": "untriaged"
+      },
       "scrollTop": {},
       "scrollWidth": {},
       "setAttribute": {},
@@ -3508,6 +4037,7 @@
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#errorevent",
     "dart_action": "unstable",
     "members": {
+      "ErrorEvent": {},
       "colno": {
         "support_level": "untriaged"
       },
@@ -3550,6 +4080,7 @@
         "dart_action": "suppress",
         "support_level": "deprecated"
       },
+      "Event": {},
       "FOCUS": {
         "comment": "https://developer.mozilla.org/en-US/docs/DOM/window.captureEvents",
         "dart_action": "suppress",
@@ -3701,6 +4232,7 @@
   },
   "ExtendableEvent": {
     "members": {
+      "ExtendableEvent": {},
       "waitUntil": {
         "support_level": "untriaged"
       }
@@ -3712,6 +4244,12 @@
       "FederatedCredential": {},
       "federation": {
         "support_level": "untriaged"
+      },
+      "protocol": {
+        "support_level": "untriaged"
+      },
+      "provider": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -3735,6 +4273,7 @@
   },
   "FetchEvent": {
     "members": {
+      "FetchEvent": {},
       "isReload": {
         "support_level": "untriaged"
       },
@@ -3750,6 +4289,7 @@
   "File": {
     "comment": "http://www.w3.org/TR/FileAPI/#dfn-file",
     "members": {
+      "File": {},
       "lastModified": {
         "support_level": "untriaged"
       },
@@ -3949,6 +4489,7 @@
   },
   "FocusEvent": {
     "members": {
+      "FocusEvent": {},
       "relatedTarget": {}
     },
     "support_level": "stable"
@@ -4066,10 +4607,29 @@
       "FormData": {},
       "append": {},
       "appendBlob": {},
-      "appendString": {}
+      "appendString": {},
+      "delete": {
+        "support_level": "untriaged"
+      },
+      "get": {
+        "support_level": "untriaged"
+      },
+      "getAll": {
+        "support_level": "untriaged"
+      },
+      "has": {
+        "support_level": "untriaged"
+      },
+      "set": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "stable"
   },
+  "FrameRequestCallback": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "GainNode": {
     "comment": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNode",
     "members": {
@@ -4107,6 +4667,7 @@
   },
   "GamepadEvent": {
     "members": {
+      "GamepadEvent": {},
       "gamepad": {
         "support_level": "untriaged"
       }
@@ -4135,6 +4696,17 @@
     },
     "support_level": "untriaged"
   },
+  "GeofencingEvent": {
+    "members": {
+      "id": {
+        "support_level": "untriaged"
+      },
+      "region": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "GeofencingRegion": {
     "members": {
       "id": {
@@ -4326,6 +4898,17 @@
     },
     "support_level": "untriaged"
   },
+  "HMDVRDevice": {
+    "members": {
+      "getEyeParameters": {
+        "support_level": "untriaged"
+      },
+      "setFieldOfView": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "HTMLAllCollection": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#dom-document-all",
     "dart_action": "suppress",
@@ -4573,6 +5156,9 @@
         "dart_action": "unstable"
       },
       "name": {},
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "setCustomValidity": {},
       "type": {},
       "validationMessage": {},
@@ -4762,6 +5348,9 @@
     "comment": "http://www.whatwg.org/specs/web-apps/2007-10-26/multipage/section-elements.html#htmlelement",
     "members": {
       "accessKey": {},
+      "blur": {
+        "support_level": "untriaged"
+      },
       "children": {},
       "click": {},
       "contentEditable": {},
@@ -4770,6 +5359,9 @@
       },
       "dir": {},
       "draggable": {},
+      "focus": {
+        "support_level": "untriaged"
+      },
       "getInputContext": {
         "comment": "http://www.w3.org/TR/ime-api/#the-getinputcontext-method",
         "support_level": "experimental"
@@ -4964,6 +5556,9 @@
         "dart_action": "experimental",
         "support_level": "nonstandard"
       },
+      "style": {
+        "support_level": "untriaged"
+      },
       "tabIndex": {},
       "title": {},
       "translate": {},
@@ -5012,6 +5607,9 @@
       "elements": {},
       "form": {},
       "name": {},
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "setCustomValidity": {},
       "type": {},
       "validationMessage": {},
@@ -5035,6 +5633,9 @@
     "members": {
       "HTMLFormControlsCollection": {},
       "__getter__": {},
+      "item": {
+        "support_level": "untriaged"
+      },
       "namedItem": {}
     },
     "support_level": "stable"
@@ -5054,6 +5655,9 @@
       "elements": {},
       "encoding": {},
       "enctype": {},
+      "item": {
+        "support_level": "untriaged"
+      },
       "length": {},
       "method": {},
       "name": {},
@@ -5066,6 +5670,9 @@
         "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofilling-form-controls:-the-autocomplete-attribute",
         "support_level": "experimental"
       },
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "requestAutocomplete": {
         "comment": "http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-October/037711.html",
         "support_level": "experimental"
@@ -5322,6 +5929,9 @@
         "support_level": "deprecated"
       },
       "alt": {},
+      "autocapitalize": {
+        "support_level": "untriaged"
+      },
       "autocomplete": {},
       "autofocus": {},
       "capture": {
@@ -5356,6 +5966,9 @@
       "max": {},
       "maxLength": {},
       "min": {},
+      "minLength": {
+        "support_level": "untriaged"
+      },
       "multiple": {},
       "name": {},
       "onspeechchange": {
@@ -5372,6 +5985,9 @@
       "pattern": {},
       "placeholder": {},
       "readOnly": {},
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "required": {},
       "select": {},
       "selectionDirection": {},
@@ -5436,6 +6052,9 @@
         "dart_action": "unstable"
       },
       "name": {},
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "setCustomValidity": {},
       "type": {},
       "validationMessage": {},
@@ -5690,9 +6309,18 @@
       "readyState": {},
       "seekable": {},
       "seeking": {},
+      "session": {
+        "support_level": "untriaged"
+      },
       "setMediaKeys": {
         "support_level": "untriaged"
       },
+      "setSinkId": {
+        "support_level": "untriaged"
+      },
+      "sinkId": {
+        "support_level": "untriaged"
+      },
       "src": {},
       "startTime": {
         "support_level": "nonstandard"
@@ -5772,9 +6400,15 @@
       "disabled": {
         "support_level": "untriaged"
       },
+      "icon": {
+        "support_level": "untriaged"
+      },
       "label": {
         "support_level": "untriaged"
       },
+      "radiogroup": {
+        "support_level": "untriaged"
+      },
       "type": {
         "support_level": "untriaged"
       }
@@ -5898,6 +6532,9 @@
         "support_level": "untriaged"
       },
       "name": {},
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "setCustomValidity": {},
       "standby": {
         "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#HTMLObjectElement-partial",
@@ -5945,6 +6582,9 @@
   "HTMLOptionsCollection": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmloptionscollection-0",
     "members": {
+      "item": {
+        "support_level": "untriaged"
+      },
       "length": {},
       "namedItem": {},
       "numericIndexGetter": {},
@@ -5967,6 +6607,9 @@
         "dart_action": "unstable"
       },
       "name": {},
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "setCustomValidity": {},
       "type": {},
       "validationMessage": {},
@@ -6109,6 +6752,9 @@
       "remove": {
         "support_level": "untriaged"
       },
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "required": {},
       "selectedIndex": {},
       "selectedOptions": {},
@@ -6427,6 +7073,9 @@
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-textarea-element",
     "members": {
       "HTMLTextAreaElement": {},
+      "autocapitalize": {
+        "support_level": "untriaged"
+      },
       "autofocus": {},
       "checkValidity": {},
       "cols": {},
@@ -6445,9 +7094,15 @@
         "dart_action": "unstable"
       },
       "maxLength": {},
+      "minLength": {
+        "support_level": "untriaged"
+      },
       "name": {},
       "placeholder": {},
       "readOnly": {},
+      "reportValidity": {
+        "support_level": "untriaged"
+      },
       "required": {},
       "rows": {},
       "select": {},
@@ -6576,6 +7231,7 @@
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#hashchangeevent",
     "dart_action": "unstable",
     "members": {
+      "HashChangeEvent": {},
       "initHashChangeEvent": {},
       "newURL": {},
       "oldURL": {}
@@ -6636,6 +7292,9 @@
       "forward": {},
       "go": {},
       "length": {},
+      "options": {
+        "support_level": "untriaged"
+      },
       "pushState": {},
       "replaceState": {},
       "state": {}
@@ -6752,6 +7411,12 @@
     "members": {
       "count": {},
       "get": {},
+      "getAll": {
+        "support_level": "untriaged"
+      },
+      "getAllKeys": {
+        "support_level": "untriaged"
+      },
       "getKey": {},
       "keyPath": {},
       "multiEntry": {},
@@ -6802,6 +7467,12 @@
       "delete": {},
       "deleteIndex": {},
       "get": {},
+      "getAll": {
+        "support_level": "untriaged"
+      },
+      "getAllKeys": {
+        "support_level": "untriaged"
+      },
       "index": {},
       "indexNames": {},
       "keyPath": {},
@@ -6855,6 +7526,9 @@
       "error": {},
       "mode": {},
       "objectStore": {},
+      "objectStoreNames": {
+        "support_level": "untriaged"
+      },
       "onabort": {},
       "oncomplete": {},
       "onerror": {},
@@ -6869,6 +7543,7 @@
     "comment": "http://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEvent",
     "dart_action": "unstable",
     "members": {
+      "IDBVersionChangeEvent": {},
       "dataLoss": {
         "support_level": "untriaged"
       },
@@ -6921,6 +7596,15 @@
     },
     "support_level": "untriaged"
   },
+  "InputDevice": {
+    "members": {
+      "InputDevice": {},
+      "firesTouchEvents": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "InputMethodContext": {
     "comment": "http://www.w3.org/TR/ime-api/#idl-def-InputMethodContext",
     "members": {
@@ -7060,16 +7744,29 @@
       "DOM_KEY_LOCATION_STANDARD": {
         "support_level": "untriaged"
       },
+      "KeyboardEvent": {},
       "altGraphKey": {
         "dart_action": "experimental",
         "support_level": "nonstandard"
       },
       "altKey": {},
+      "charCode": {
+        "support_level": "untriaged"
+      },
+      "code": {
+        "support_level": "untriaged"
+      },
       "ctrlKey": {},
       "getModifierState": {
         "support_level": "untriaged"
       },
       "initKeyboardEvent": {},
+      "key": {
+        "support_level": "untriaged"
+      },
+      "keyCode": {
+        "support_level": "untriaged"
+      },
       "keyIdentifier": {
         "dart_action": "experimental",
         "support_level": "nonstandard"
@@ -7085,10 +7782,19 @@
       "repeat": {
         "support_level": "untriaged"
       },
-      "shiftKey": {}
+      "shiftKey": {},
+      "which": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "stable"
   },
+  "KeyframeEffect": {
+    "members": {
+      "KeyframeEffect": {}
+    },
+    "support_level": "untriaged"
+  },
   "LocalCredential": {
     "members": {
       "LocalCredential": {},
@@ -7179,6 +7885,7 @@
   "MIDIConnectionEvent": {
     "comment": "http://webaudio.github.io/web-midi-api/#midiconnectionevent-interface",
     "members": {
+      "MIDIConnectionEvent": {},
       "port": {}
     },
     "support_level": "experimental"
@@ -7221,6 +7928,7 @@
   "MIDIMessageEvent": {
     "comment": "http://webaudio.github.io/web-midi-api/#midimessageevent-interface",
     "members": {
+      "MIDIMessageEvent": {},
       "data": {},
       "receivedTime": {}
     },
@@ -7260,12 +7968,24 @@
     "comment": "http://webaudio.github.io/web-midi-api/#idl-def-MIDIPort",
     "members": {
       "addEventListener": {},
+      "close": {
+        "support_level": "untriaged"
+      },
+      "connection": {
+        "support_level": "untriaged"
+      },
       "dispatchEvent": {},
       "id": {},
       "manufacturer": {},
       "name": {},
       "ondisconnect": {},
+      "open": {
+        "support_level": "untriaged"
+      },
       "removeEventListener": {},
+      "state": {
+        "support_level": "untriaged"
+      },
       "type": {},
       "version": {}
     },
@@ -7320,6 +8040,17 @@
     "members": {},
     "support_level": "untriaged"
   },
+  "MediaDevices": {
+    "members": {
+      "enumerateDevices": {
+        "support_level": "untriaged"
+      },
+      "getUserMedia": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "MediaElementAudioSourceNode": {
     "comment": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#MediaElementAudioSourceNode",
     "members": {
@@ -7329,6 +8060,18 @@
     },
     "support_level": "experimental"
   },
+  "MediaEncryptedEvent": {
+    "members": {
+      "MediaEncryptedEvent": {},
+      "initData": {
+        "support_level": "untriaged"
+      },
+      "initDataType": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "MediaError": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#mediaerror",
     "dart_action": "unstable",
@@ -7364,6 +8107,7 @@
   "MediaKeyEvent": {
     "comment": "https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html#event-definitions",
     "members": {
+      "MediaKeyEvent": {},
       "defaultURL": {},
       "errorCode": {},
       "initData": {},
@@ -7377,8 +8121,12 @@
   "MediaKeyMessageEvent": {
     "comment": "https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html#dom-mediakeymessageevent",
     "members": {
+      "MediaKeyMessageEvent": {},
       "destinationURL": {},
-      "message": {}
+      "message": {},
+      "messageType": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "experimental"
   },
@@ -7402,10 +8150,19 @@
       },
       "dispatchEvent": {},
       "error": {},
+      "expiration": {
+        "support_level": "untriaged"
+      },
       "generateRequest": {
         "support_level": "untriaged"
       },
+      "keyStatuses": {
+        "support_level": "untriaged"
+      },
       "keySystem": {},
+      "load": {
+        "support_level": "untriaged"
+      },
       "onkeyadded": {
         "support_level": "untriaged"
       },
@@ -7421,12 +8178,37 @@
       "release": {
         "support_level": "untriaged"
       },
+      "remove": {
+        "support_level": "untriaged"
+      },
       "removeEventListener": {},
       "sessionId": {},
       "update": {}
     },
     "support_level": "experimental"
   },
+  "MediaKeyStatusMap": {
+    "members": {
+      "size": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "MediaKeySystemAccess": {
+    "members": {
+      "createMediaKeys": {
+        "support_level": "untriaged"
+      },
+      "getConfiguration": {
+        "support_level": "untriaged"
+      },
+      "keySystem": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "MediaKeys": {
     "comment": "https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html",
     "members": {
@@ -7438,7 +8220,10 @@
       "isTypeSupported": {
         "support_level": "untriaged"
       },
-      "keySystem": {}
+      "keySystem": {},
+      "setServerCertificate": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "experimental"
   },
@@ -7470,6 +8255,7 @@
   },
   "MediaQueryListEvent": {
     "members": {
+      "MediaQueryListEvent": {},
       "matches": {
         "support_level": "untriaged"
       },
@@ -7487,6 +8273,18 @@
     },
     "support_level": "stable"
   },
+  "MediaSession": {
+    "members": {
+      "MediaSession": {},
+      "activate": {
+        "support_level": "untriaged"
+      },
+      "deactivate": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "MediaSource": {
     "comment": "https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#mediasource",
     "members": {
@@ -7509,6 +8307,9 @@
     "comment": "http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediastream",
     "members": {
       "MediaStream": {},
+      "active": {
+        "support_level": "untriaged"
+      },
       "addEventListener": {},
       "addTrack": {},
       "clone": {
@@ -7552,6 +8353,7 @@
   "MediaStreamEvent": {
     "comment": "http://dev.w3.org/2011/webrtc/editor/getusermedia.html",
     "members": {
+      "MediaStreamEvent": {},
       "stream": {}
     },
     "support_level": "experimental"
@@ -7618,6 +8420,7 @@
   "MessageEvent": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#messageevent",
     "members": {
+      "MessageEvent": {},
       "data": {},
       "initMessageEvent": {},
       "lastEventId": {
@@ -7686,8 +8489,12 @@
   "MouseEvent": {
     "comment": "http://www.w3.org/TR/DOM-Level-3-Events/#events-mouseevents",
     "members": {
+      "MouseEvent": {},
       "altKey": {},
       "button": {},
+      "buttons": {
+        "support_level": "untriaged"
+      },
       "clientX": {},
       "clientY": {},
       "ctrlKey": {},
@@ -7699,6 +8506,12 @@
         "support_level": "deprecated"
       },
       "initMouseEvent": {},
+      "layerX": {
+        "support_level": "untriaged"
+      },
+      "layerY": {
+        "support_level": "untriaged"
+      },
       "metaKey": {},
       "movementX": {
         "support_level": "untriaged"
@@ -7714,6 +8527,12 @@
         "dart_action": "unstable",
         "support_level": "nonstandard"
       },
+      "pageX": {
+        "support_level": "untriaged"
+      },
+      "pageY": {
+        "support_level": "untriaged"
+      },
       "region": {
         "support_level": "untriaged"
       },
@@ -7730,6 +8549,9 @@
       "webkitMovementY": {
         "support_level": "experimental"
       },
+      "which": {
+        "support_level": "untriaged"
+      },
       "x": {
         "dart_action": "suppress",
         "support_level": "nonstandard"
@@ -7818,6 +8640,9 @@
       "appVersion": {
         "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#navigatorid"
       },
+      "bluetooth": {
+        "support_level": "untriaged"
+      },
       "connection": {
         "support_level": "untriaged"
       },
@@ -7858,6 +8683,9 @@
         "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#navigatorstorageutils",
         "support_level": "experimental"
       },
+      "getVRDevices": {
+        "support_level": "untriaged"
+      },
       "hardwareConcurrency": {
         "support_level": "untriaged"
       },
@@ -7877,6 +8705,9 @@
       "maxTouchPoints": {
         "support_level": "untriaged"
       },
+      "mediaDevices": {
+        "support_level": "untriaged"
+      },
       "mimeTypes": {
         "dart_action": "experimental",
         "support_level": "nonstandard"
@@ -7885,6 +8716,9 @@
         "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#navigatoronline",
         "dart_action": "unstable"
       },
+      "permissions": {
+        "support_level": "untriaged"
+      },
       "platform": {
         "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#navigatorid"
       },
@@ -7914,12 +8748,18 @@
       "requestMIDIAccess": {
         "support_level": "untriaged"
       },
+      "requestMediaKeySystemAccess": {
+        "support_level": "untriaged"
+      },
       "sendBeacon": {
         "support_level": "untriaged"
       },
       "serviceWorker": {
         "support_level": "untriaged"
       },
+      "services": {
+        "support_level": "untriaged"
+      },
       "storageQuota": {
         "support_level": "untriaged"
       },
@@ -8013,6 +8853,17 @@
     },
     "support_level": "untriaged"
   },
+  "NavigatorStorageUtils": {
+    "members": {
+      "cookieEnabled": {
+        "support_level": "untriaged"
+      },
+      "getStorageUpdates": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "NavigatorUserMediaError": {
     "comment": "http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-NavigatorUserMediaError",
     "members": {
@@ -8196,6 +9047,25 @@
     },
     "support_level": "stable"
   },
+  "NonDocumentTypeChildNode": {
+    "members": {
+      "nextElementSibling": {
+        "support_level": "untriaged"
+      },
+      "previousElementSibling": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "NonElementParentNode": {
+    "members": {
+      "getElementById": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Notation": {
     "comment": "http://dom.spec.whatwg.org/#notation",
     "dart_action": "suppress",
@@ -8219,6 +9089,9 @@
         "support_level": "nonstandard"
       },
       "close": {},
+      "data": {
+        "support_level": "untriaged"
+      },
       "dir": {
         "dart_action": "experimental",
         "support_level": "nonstandard"
@@ -8249,16 +9122,31 @@
         "dart_action": "experimental",
         "support_level": "nonstandard"
       },
+      "silent": {
+        "support_level": "untriaged"
+      },
       "tag": {
         "dart_action": "experimental",
         "support_level": "nonstandard"
       },
       "title": {
         "support_level": "untriaged"
+      },
+      "vibrate": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "experimental"
   },
+  "NotificationEvent": {
+    "members": {
+      "NotificationEvent": {},
+      "notification": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "NotificationPermissionCallback": {
     "comment": "http://www.w3.org/TR/notifications/#notificationpermissioncallback",
     "members": {
@@ -8326,7 +9214,10 @@
   "OfflineAudioContext": {
     "comment": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#OfflineAudioContext-section",
     "members": {
-      "OfflineAudioContext": {}
+      "OfflineAudioContext": {},
+      "startRendering": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "experimental"
   },
@@ -8408,6 +9299,7 @@
   "PageTransitionEvent": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#pagetransitionevent",
     "members": {
+      "PageTransitionEvent": {},
       "persisted": {}
     },
     "support_level": "experimental"
@@ -8482,6 +9374,18 @@
     },
     "support_level": "untriaged"
   },
+  "PasswordCredential": {
+    "members": {
+      "PasswordCredential": {},
+      "formData": {
+        "support_level": "untriaged"
+      },
+      "password": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Path": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#path-objects",
     "members": {
@@ -8539,6 +9443,9 @@
       "addEventListener": {
         "support_level": "untriaged"
       },
+      "clearFrameTimings": {
+        "support_level": "untriaged"
+      },
       "clearMarks": {
         "comment": "https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/UserTiming/Overview.html#extensions-performance-interface",
         "support_level": "experimental"
@@ -8588,6 +9495,9 @@
       "removeEventListener": {
         "support_level": "untriaged"
       },
+      "setFrameTimingBufferSize": {
+        "support_level": "untriaged"
+      },
       "timing": {},
       "webkitClearResourceTimings": {
         "comment": "http://www.w3c-test.org/webperf/specs/ResourceTiming/#extensions-performance-interface",
@@ -8600,6 +9510,14 @@
     },
     "support_level": "stable"
   },
+  "PerformanceCompositeTiming": {
+    "members": {
+      "sourceFrame": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "PerformanceEntry": {
     "comment": "http://www.w3.org/TR/performance-timeline/#sec-PerformanceEntry-interface",
     "members": {
@@ -8641,6 +9559,14 @@
     },
     "support_level": "stable"
   },
+  "PerformanceRenderTiming": {
+    "members": {
+      "sourceFrame": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "PerformanceResourceTiming": {
     "comment": "http://www.w3c-test.org/webperf/specs/ResourceTiming/#performanceresourcetiming",
     "members": {
@@ -8664,7 +9590,10 @@
         "dart_action": "experimental",
         "support_level": "nonstandard"
       },
-      "secureConnectionStart": {}
+      "secureConnectionStart": {},
+      "workerStart": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "experimental"
   },
@@ -8696,10 +9625,81 @@
     },
     "support_level": "stable"
   },
+  "PeriodicSyncEvent": {
+    "members": {
+      "PeriodicSyncEvent": {},
+      "registration": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "PeriodicSyncManager": {
+    "members": {
+      "getRegistration": {
+        "support_level": "untriaged"
+      },
+      "getRegistrations": {
+        "support_level": "untriaged"
+      },
+      "minPossiblePeriod": {
+        "support_level": "untriaged"
+      },
+      "permissionState": {
+        "support_level": "untriaged"
+      },
+      "register": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "PeriodicSyncRegistration": {
+    "members": {
+      "minPeriod": {
+        "support_level": "untriaged"
+      },
+      "networkState": {
+        "support_level": "untriaged"
+      },
+      "powerState": {
+        "support_level": "untriaged"
+      },
+      "tag": {
+        "support_level": "untriaged"
+      },
+      "unregister": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "PeriodicWave": {
     "members": {},
     "support_level": "untriaged"
   },
+  "PermissionStatus": {
+    "members": {
+      "onchange": {
+        "support_level": "untriaged"
+      },
+      "state": {
+        "support_level": "untriaged"
+      },
+      "status": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "Permissions": {
+    "members": {
+      "query": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Player": {
     "members": {
       "cancel": {
@@ -8767,6 +9767,9 @@
   },
   "PluginPlaceholderElement": {
     "members": {
+      "closeable": {
+        "support_level": "untriaged"
+      },
       "createdCallback": {
         "support_level": "untriaged"
       },
@@ -8776,9 +9779,40 @@
     },
     "support_level": "untriaged"
   },
+  "PointerEvent": {
+    "members": {
+      "PointerEvent": {},
+      "height": {
+        "support_level": "untriaged"
+      },
+      "isPrimary": {
+        "support_level": "untriaged"
+      },
+      "pointerId": {
+        "support_level": "untriaged"
+      },
+      "pointerType": {
+        "support_level": "untriaged"
+      },
+      "pressure": {
+        "support_level": "untriaged"
+      },
+      "tiltX": {
+        "support_level": "untriaged"
+      },
+      "tiltY": {
+        "support_level": "untriaged"
+      },
+      "width": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "PopStateEvent": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#popstateevent",
     "members": {
+      "PopStateEvent": {},
       "state": {}
     },
     "support_level": "stable"
@@ -8811,8 +9845,69 @@
     },
     "support_level": "stable"
   },
+  "PositionSensorVRDevice": {
+    "members": {
+      "getImmediateState": {
+        "support_level": "untriaged"
+      },
+      "getState": {
+        "support_level": "untriaged"
+      },
+      "resetSensor": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Presentation": {
-    "members": {},
+    "members": {
+      "getAvailability": {
+        "support_level": "untriaged"
+      },
+      "joinSession": {
+        "support_level": "untriaged"
+      },
+      "session": {
+        "support_level": "untriaged"
+      },
+      "startSession": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "PresentationAvailability": {
+    "members": {
+      "onchange": {
+        "support_level": "untriaged"
+      },
+      "value": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "PresentationSession": {
+    "members": {
+      "binaryType": {
+        "support_level": "untriaged"
+      },
+      "close": {
+        "support_level": "untriaged"
+      },
+      "id": {
+        "support_level": "untriaged"
+      },
+      "onmessage": {
+        "support_level": "untriaged"
+      },
+      "send": {
+        "support_level": "untriaged"
+      },
+      "state": {
+        "support_level": "untriaged"
+      }
+    },
     "support_level": "untriaged"
   },
   "ProcessingInstruction": {
@@ -8832,6 +9927,7 @@
   "ProgressEvent": {
     "comment": "http://xhr.spec.whatwg.org/#interface-progressevent",
     "members": {
+      "ProgressEvent": {},
       "lengthComputable": {},
       "loaded": {},
       "total": {}
@@ -8870,6 +9966,18 @@
     },
     "support_level": "untriaged"
   },
+  "PromiseRejectionEvent": {
+    "members": {
+      "PromiseRejectionEvent": {},
+      "promise": {
+        "support_level": "untriaged"
+      },
+      "reason": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "PromiseResolver": {
     "members": {
       "fulfill": {
@@ -8886,6 +9994,7 @@
   },
   "PushEvent": {
     "members": {
+      "PushEvent": {},
       "data": {
         "support_level": "untriaged"
       }
@@ -8894,8 +10003,35 @@
   },
   "PushManager": {
     "members": {
+      "getSubscription": {
+        "support_level": "untriaged"
+      },
+      "permissionState": {
+        "support_level": "untriaged"
+      },
       "register": {
         "support_level": "untriaged"
+      },
+      "subscribe": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "PushMessageData": {
+    "members": {
+      "PushMessageData": {},
+      "arrayBuffer": {
+        "support_level": "untriaged"
+      },
+      "blob": {
+        "support_level": "untriaged"
+      },
+      "json": {
+        "support_level": "untriaged"
+      },
+      "text": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -8911,6 +10047,17 @@
     },
     "support_level": "untriaged"
   },
+  "PushSubscription": {
+    "members": {
+      "endpoint": {
+        "support_level": "untriaged"
+      },
+      "unsubscribe": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "RGBColor": {
     "comment": "http://dev.w3.org/csswg/cssom/",
     "dart_action": "suppress",
@@ -8940,6 +10087,7 @@
   "RTCDTMFToneChangeEvent": {
     "comment": "http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDTMFToneChangeEvent",
     "members": {
+      "RTCDTMFToneChangeEvent": {},
       "tone": {}
     },
     "support_level": "experimental"
@@ -9103,6 +10251,9 @@
   "RadioNodeList": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/#radionodelist",
     "members": {
+      "item": {
+        "support_level": "untriaged"
+      },
       "value": {}
     },
     "support_level": "stable"
@@ -9196,7 +10347,18 @@
     },
     "support_level": "deprecated"
   },
-  "ReadableStream": {
+  "ReadableByteStream": {
+    "members": {
+      "cancel": {
+        "support_level": "untriaged"
+      },
+      "getReader": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "ReadableByteStreamReader": {
     "members": {
       "cancel": {
         "support_level": "untriaged"
@@ -9207,6 +10369,26 @@
       "read": {
         "support_level": "untriaged"
       },
+      "releaseLock": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "ReadableStream": {
+    "members": {
+      "cancel": {
+        "support_level": "untriaged"
+      },
+      "closed": {
+        "support_level": "untriaged"
+      },
+      "getReader": {
+        "support_level": "untriaged"
+      },
+      "read": {
+        "support_level": "untriaged"
+      },
       "state": {
         "support_level": "untriaged"
       },
@@ -9216,6 +10398,23 @@
     },
     "support_level": "untriaged"
   },
+  "ReadableStreamReader": {
+    "members": {
+      "cancel": {
+        "support_level": "untriaged"
+      },
+      "closed": {
+        "support_level": "untriaged"
+      },
+      "read": {
+        "support_level": "untriaged"
+      },
+      "releaseLock": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Rect": {
     "comment": "http://dev.w3.org/csswg/cssom/",
     "dart_action": "suppress",
@@ -9229,6 +10428,7 @@
   },
   "RelatedEvent": {
     "members": {
+      "RelatedEvent": {},
       "relatedTarget": {
         "support_level": "untriaged"
       }
@@ -9241,6 +10441,9 @@
       "clone": {
         "support_level": "untriaged"
       },
+      "context": {
+        "support_level": "untriaged"
+      },
       "credentials": {
         "support_level": "untriaged"
       },
@@ -9941,9 +11144,15 @@
     "comment": "http://www.w3.org/TR/SVG/types.html#InterfaceSVGElement",
     "dart_action": "unstable",
     "members": {
+      "blur": {
+        "support_level": "untriaged"
+      },
       "className": {
         "support_level": "untriaged"
       },
+      "focus": {
+        "support_level": "untriaged"
+      },
       "getPresentationAttribute": {
         "support_level": "untriaged"
       },
@@ -10838,6 +12047,12 @@
         "comment": "http://www.w3.org/TR/SVG/filters.html#InterfaceSVGFilterPrimitiveStandardAttributes"
       },
       "in1": {},
+      "kernelUnitLengthX": {
+        "support_level": "untriaged"
+      },
+      "kernelUnitLengthY": {
+        "support_level": "untriaged"
+      },
       "result": {
         "comment": "http://www.w3.org/TR/SVG/filters.html#InterfaceSVGFilterPrimitiveStandardAttributes"
       },
@@ -12922,6 +14137,45 @@
     },
     "support_level": "experimental"
   },
+  "ScrollState": {
+    "members": {
+      "ScrollState": {},
+      "consumeDelta": {
+        "support_level": "untriaged"
+      },
+      "deltaGranularity": {
+        "support_level": "untriaged"
+      },
+      "deltaX": {
+        "support_level": "untriaged"
+      },
+      "deltaY": {
+        "support_level": "untriaged"
+      },
+      "fromUserInput": {
+        "support_level": "untriaged"
+      },
+      "inInertialPhase": {
+        "support_level": "untriaged"
+      },
+      "isBeginning": {
+        "support_level": "untriaged"
+      },
+      "isEnding": {
+        "support_level": "untriaged"
+      },
+      "shouldPropagate": {
+        "support_level": "untriaged"
+      },
+      "velocityX": {
+        "support_level": "untriaged"
+      },
+      "velocityY": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "SecurityPolicy": {
     "comment": "https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#securitypolicy",
     "members": {
@@ -12946,6 +14200,7 @@
   "SecurityPolicyViolationEvent": {
     "comment": "https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#securitypolicyviolationevent-events",
     "members": {
+      "SecurityPolicyViolationEvent": {},
       "blockedURI": {},
       "columnNumber": {},
       "documentURI": {},
@@ -13013,6 +14268,58 @@
     },
     "support_level": "stable"
   },
+  "ServicePort": {
+    "members": {
+      "close": {
+        "support_level": "untriaged"
+      },
+      "data": {
+        "support_level": "untriaged"
+      },
+      "name": {
+        "support_level": "untriaged"
+      },
+      "postMessage": {
+        "support_level": "untriaged"
+      },
+      "targetURL": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "ServicePortCollection": {
+    "members": {
+      "connect": {
+        "support_level": "untriaged"
+      },
+      "match": {
+        "support_level": "untriaged"
+      },
+      "matchAll": {
+        "support_level": "untriaged"
+      },
+      "onmessage": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "ServicePortConnectEvent": {
+    "members": {
+      "ServicePortConnectEvent": {},
+      "origin": {
+        "support_level": "untriaged"
+      },
+      "respondWith": {
+        "support_level": "untriaged"
+      },
+      "targetURL": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "ServiceWorker": {
     "members": {},
     "support_level": "untriaged"
@@ -13050,9 +14357,15 @@
       "getRegistration": {
         "support_level": "untriaged"
       },
+      "getRegistrations": {
+        "support_level": "untriaged"
+      },
       "installing": {
         "support_level": "untriaged"
       },
+      "onmessage": {
+        "support_level": "untriaged"
+      },
       "ready": {
         "support_level": "untriaged"
       },
@@ -13088,8 +14401,38 @@
       "onmessage": {
         "support_level": "untriaged"
       },
+      "ports": {
+        "support_level": "untriaged"
+      },
+      "registration": {
+        "support_level": "untriaged"
+      },
       "scope": {
         "support_level": "untriaged"
+      },
+      "skipWaiting": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "ServiceWorkerMessageEvent": {
+    "members": {
+      "ServiceWorkerMessageEvent": {},
+      "data": {
+        "support_level": "untriaged"
+      },
+      "lastEventId": {
+        "support_level": "untriaged"
+      },
+      "origin": {
+        "support_level": "untriaged"
+      },
+      "ports": {
+        "support_level": "untriaged"
+      },
+      "source": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -13099,15 +14442,36 @@
       "active": {
         "support_level": "untriaged"
       },
+      "geofencing": {
+        "support_level": "untriaged"
+      },
+      "getNotifications": {
+        "support_level": "untriaged"
+      },
       "installing": {
         "support_level": "untriaged"
       },
+      "periodicSync": {
+        "support_level": "untriaged"
+      },
+      "pushManager": {
+        "support_level": "untriaged"
+      },
       "scope": {
         "support_level": "untriaged"
       },
+      "showNotification": {
+        "support_level": "untriaged"
+      },
+      "sync": {
+        "support_level": "untriaged"
+      },
       "unregister": {
         "support_level": "untriaged"
       },
+      "update": {
+        "support_level": "untriaged"
+      },
       "waiting": {
         "support_level": "untriaged"
       }
@@ -13120,7 +14484,13 @@
       "activeElement": {},
       "applyAuthorStyles": {},
       "cloneNode": {},
+      "delegatesFocus": {
+        "support_level": "untriaged"
+      },
       "elementFromPoint": {},
+      "elementsFromPoint": {
+        "support_level": "untriaged"
+      },
       "getElementById": {},
       "getElementsByClassName": {},
       "getElementsByTagName": {},
@@ -13140,6 +14510,14 @@
     },
     "support_level": "experimental"
   },
+  "SharedArrayBuffer": {
+    "members": {
+      "byteLength": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "SharedWorker": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#shared-workers-and-the-sharedworker-interface",
     "members": {
@@ -13228,6 +14606,9 @@
         "support_level": "untriaged"
       },
       "timestampOffset": {},
+      "trackDefaults": {
+        "support_level": "untriaged"
+      },
       "updating": {
         "support_level": "untriaged"
       }
@@ -13311,6 +14692,9 @@
       "SpeechRecognition": {},
       "abort": {},
       "addEventListener": {},
+      "audioTrack": {
+        "support_level": "untriaged"
+      },
       "continuous": {},
       "dispatchEvent": {},
       "grammars": {},
@@ -13329,6 +14713,9 @@
       "onspeechstart": {},
       "onstart": {},
       "removeEventListener": {},
+      "serviceURI": {
+        "support_level": "untriaged"
+      },
       "start": {},
       "stop": {}
     },
@@ -13345,6 +14732,7 @@
   "SpeechRecognitionError": {
     "comment": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-error",
     "members": {
+      "SpeechRecognitionError": {},
       "error": {},
       "message": {}
     },
@@ -13353,6 +14741,7 @@
   "SpeechRecognitionEvent": {
     "comment": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-event",
     "members": {
+      "SpeechRecognitionEvent": {},
       "emma": {},
       "interpretation": {},
       "resultIndex": {},
@@ -13405,7 +14794,10 @@
     "members": {
       "charIndex": {},
       "elapsedTime": {},
-      "name": {}
+      "name": {},
+      "utterance": {
+        "support_level": "untriaged"
+      }
     },
     "support_level": "experimental"
   },
@@ -13452,6 +14844,33 @@
     },
     "support_level": "experimental"
   },
+  "StashedMessagePort": {
+    "members": {
+      "name": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "StashedPortCollection": {
+    "members": {
+      "add": {
+        "support_level": "untriaged"
+      },
+      "onmessage": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "StereoPannerNode": {
+    "members": {
+      "pan": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Storage": {
     "comment": "http://www.w3.org/TR/webstorage/#the-storage-interface",
     "dart_action": "unstable",
@@ -13480,6 +14899,7 @@
     "comment": "http://www.w3.org/TR/webstorage/#the-storage-event",
     "dart_action": "unstable",
     "members": {
+      "StorageEvent": {},
       "initStorageEvent": {},
       "key": {},
       "newValue": {},
@@ -13609,6 +15029,43 @@
     },
     "support_level": "untriaged"
   },
+  "SyncEvent": {
+    "members": {
+      "SyncEvent": {},
+      "registration": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "SyncManager": {
+    "members": {
+      "getRegistration": {
+        "support_level": "untriaged"
+      },
+      "getRegistrations": {
+        "support_level": "untriaged"
+      },
+      "permissionState": {
+        "support_level": "untriaged"
+      },
+      "register": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "SyncRegistration": {
+    "members": {
+      "tag": {
+        "support_level": "untriaged"
+      },
+      "unregister": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "Text": {
     "comment": "http://dom.spec.whatwg.org/#interface-text",
     "members": {
@@ -13638,6 +15095,12 @@
       },
       "encoding": {
         "support_level": "untriaged"
+      },
+      "fatal": {
+        "support_level": "untriaged"
+      },
+      "ignoreBOM": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
@@ -13919,6 +15382,9 @@
       "radiusY": {
         "support_level": "untriaged"
       },
+      "rotationAngle": {
+        "support_level": "untriaged"
+      },
       "screenX": {},
       "screenY": {},
       "target": {},
@@ -13959,10 +15425,44 @@
     },
     "support_level": "experimental"
   },
+  "TrackDefault": {
+    "members": {
+      "TrackDefault": {},
+      "byteStreamTrackID": {
+        "support_level": "untriaged"
+      },
+      "kinds": {
+        "support_level": "untriaged"
+      },
+      "label": {
+        "support_level": "untriaged"
+      },
+      "language": {
+        "support_level": "untriaged"
+      },
+      "type": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "TrackDefaultList": {
+    "members": {
+      "TrackDefaultList": {},
+      "item": {
+        "support_level": "untriaged"
+      },
+      "length": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "TrackEvent": {
     "comment": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#trackevent",
     "dart_action": "unstable",
     "members": {
+      "TrackEvent": {},
       "track": {}
     },
     "support_level": "experimental"
@@ -13970,6 +15470,7 @@
   "TransitionEvent": {
     "comment": "http://dev.w3.org/csswg/css-transitions/#Events-TransitionEvent",
     "members": {
+      "TransitionEvent": {},
       "elapsedTime": {},
       "propertyName": {},
       "pseudoElement": {}
@@ -14002,6 +15503,7 @@
   "UIEvent": {
     "comment": "http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-UIEvent",
     "members": {
+      "UIEvent": {},
       "charCode": {
         "comment": "http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#legacy-key-attributes",
         "dart_action": "unstable",
@@ -14034,6 +15536,9 @@
         "dart_action": "experimental",
         "support_level": "nonstandard"
       },
+      "sourceDevice": {
+        "support_level": "untriaged"
+      },
       "view": {},
       "which": {
         "comment": "http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#legacy-key-attributes",
@@ -14211,6 +15716,87 @@
     },
     "support_level": "stable"
   },
+  "VRDevice": {
+    "members": {
+      "deviceId": {
+        "support_level": "untriaged"
+      },
+      "deviceName": {
+        "support_level": "untriaged"
+      },
+      "hardwareUnitId": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "VREyeParameters": {
+    "members": {
+      "currentFieldOfView": {
+        "support_level": "untriaged"
+      },
+      "eyeTranslation": {
+        "support_level": "untriaged"
+      },
+      "maximumFieldOfView": {
+        "support_level": "untriaged"
+      },
+      "minimumFieldOfView": {
+        "support_level": "untriaged"
+      },
+      "recommendedFieldOfView": {
+        "support_level": "untriaged"
+      },
+      "renderRect": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "VRFieldOfView": {
+    "members": {
+      "VRFieldOfView": {},
+      "downDegrees": {
+        "support_level": "untriaged"
+      },
+      "leftDegrees": {
+        "support_level": "untriaged"
+      },
+      "rightDegrees": {
+        "support_level": "untriaged"
+      },
+      "upDegrees": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "VRPositionState": {
+    "members": {
+      "angularAcceleration": {
+        "support_level": "untriaged"
+      },
+      "angularVelocity": {
+        "support_level": "untriaged"
+      },
+      "linearAcceleration": {
+        "support_level": "untriaged"
+      },
+      "linearVelocity": {
+        "support_level": "untriaged"
+      },
+      "orientation": {
+        "support_level": "untriaged"
+      },
+      "position": {
+        "support_level": "untriaged"
+      },
+      "timeStamp": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "VTTCue": {
     "members": {
       "VTTCue": {},
@@ -14301,6 +15887,9 @@
       "rangeUnderflow": {},
       "stepMismatch": {},
       "tooLong": {},
+      "tooShort": {
+        "support_level": "untriaged"
+      },
       "typeMismatch": {},
       "valid": {},
       "valueMissing": {}
@@ -14385,6 +15974,1623 @@
     "members": {},
     "support_level": "experimental"
   },
+  "WebGL2RenderingContext": {
+    "members": {
+      "ACTIVE_ATTRIBUTES": {
+        "support_level": "untriaged"
+      },
+      "ACTIVE_TEXTURE": {
+        "support_level": "untriaged"
+      },
+      "ACTIVE_UNIFORMS": {
+        "support_level": "untriaged"
+      },
+      "ALIASED_LINE_WIDTH_RANGE": {
+        "support_level": "untriaged"
+      },
+      "ALIASED_POINT_SIZE_RANGE": {
+        "support_level": "untriaged"
+      },
+      "ALPHA": {
+        "support_level": "untriaged"
+      },
+      "ALPHA_BITS": {
+        "support_level": "untriaged"
+      },
+      "ALWAYS": {
+        "support_level": "untriaged"
+      },
+      "ARRAY_BUFFER": {
+        "support_level": "untriaged"
+      },
+      "ARRAY_BUFFER_BINDING": {
+        "support_level": "untriaged"
+      },
+      "ATTACHED_SHADERS": {
+        "support_level": "untriaged"
+      },
+      "BACK": {
+        "support_level": "untriaged"
+      },
+      "BLEND": {
+        "support_level": "untriaged"
+      },
+      "BLEND_COLOR": {
+        "support_level": "untriaged"
+      },
+      "BLEND_DST_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "BLEND_DST_RGB": {
+        "support_level": "untriaged"
+      },
+      "BLEND_EQUATION": {
+        "support_level": "untriaged"
+      },
+      "BLEND_EQUATION_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "BLEND_EQUATION_RGB": {
+        "support_level": "untriaged"
+      },
+      "BLEND_SRC_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "BLEND_SRC_RGB": {
+        "support_level": "untriaged"
+      },
+      "BLUE_BITS": {
+        "support_level": "untriaged"
+      },
+      "BOOL": {
+        "support_level": "untriaged"
+      },
+      "BOOL_VEC2": {
+        "support_level": "untriaged"
+      },
+      "BOOL_VEC3": {
+        "support_level": "untriaged"
+      },
+      "BOOL_VEC4": {
+        "support_level": "untriaged"
+      },
+      "BROWSER_DEFAULT_WEBGL": {
+        "support_level": "untriaged"
+      },
+      "BUFFER_SIZE": {
+        "support_level": "untriaged"
+      },
+      "BUFFER_USAGE": {
+        "support_level": "untriaged"
+      },
+      "BYTE": {
+        "support_level": "untriaged"
+      },
+      "CCW": {
+        "support_level": "untriaged"
+      },
+      "CLAMP_TO_EDGE": {
+        "support_level": "untriaged"
+      },
+      "COLOR_ATTACHMENT0": {
+        "support_level": "untriaged"
+      },
+      "COLOR_BUFFER_BIT": {
+        "support_level": "untriaged"
+      },
+      "COLOR_CLEAR_VALUE": {
+        "support_level": "untriaged"
+      },
+      "COLOR_WRITEMASK": {
+        "support_level": "untriaged"
+      },
+      "COMPILE_STATUS": {
+        "support_level": "untriaged"
+      },
+      "COMPRESSED_TEXTURE_FORMATS": {
+        "support_level": "untriaged"
+      },
+      "CONSTANT_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "CONSTANT_COLOR": {
+        "support_level": "untriaged"
+      },
+      "CONTEXT_LOST_WEBGL": {
+        "support_level": "untriaged"
+      },
+      "CULL_FACE": {
+        "support_level": "untriaged"
+      },
+      "CULL_FACE_MODE": {
+        "support_level": "untriaged"
+      },
+      "CURRENT_PROGRAM": {
+        "support_level": "untriaged"
+      },
+      "CURRENT_VERTEX_ATTRIB": {
+        "support_level": "untriaged"
+      },
+      "CW": {
+        "support_level": "untriaged"
+      },
+      "DECR": {
+        "support_level": "untriaged"
+      },
+      "DECR_WRAP": {
+        "support_level": "untriaged"
+      },
+      "DELETE_STATUS": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_ATTACHMENT": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_BITS": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_BUFFER_BIT": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_CLEAR_VALUE": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_COMPONENT": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_COMPONENT16": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_FUNC": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_RANGE": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_STENCIL": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_STENCIL_ATTACHMENT": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_TEST": {
+        "support_level": "untriaged"
+      },
+      "DEPTH_WRITEMASK": {
+        "support_level": "untriaged"
+      },
+      "DITHER": {
+        "support_level": "untriaged"
+      },
+      "DONT_CARE": {
+        "support_level": "untriaged"
+      },
+      "DST_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "DST_COLOR": {
+        "support_level": "untriaged"
+      },
+      "DYNAMIC_DRAW": {
+        "support_level": "untriaged"
+      },
+      "ELEMENT_ARRAY_BUFFER": {
+        "support_level": "untriaged"
+      },
+      "ELEMENT_ARRAY_BUFFER_BINDING": {
+        "support_level": "untriaged"
+      },
+      "EQUAL": {
+        "support_level": "untriaged"
+      },
+      "FASTEST": {
+        "support_level": "untriaged"
+      },
+      "FLOAT": {
+        "support_level": "untriaged"
+      },
+      "FLOAT_MAT2": {
+        "support_level": "untriaged"
+      },
+      "FLOAT_MAT3": {
+        "support_level": "untriaged"
+      },
+      "FLOAT_MAT4": {
+        "support_level": "untriaged"
+      },
+      "FLOAT_VEC2": {
+        "support_level": "untriaged"
+      },
+      "FLOAT_VEC3": {
+        "support_level": "untriaged"
+      },
+      "FLOAT_VEC4": {
+        "support_level": "untriaged"
+      },
+      "FRAGMENT_SHADER": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_BINDING": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_COMPLETE": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_INCOMPLETE_ATTACHMENT": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_INCOMPLETE_DIMENSIONS": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT": {
+        "support_level": "untriaged"
+      },
+      "FRAMEBUFFER_UNSUPPORTED": {
+        "support_level": "untriaged"
+      },
+      "FRONT": {
+        "support_level": "untriaged"
+      },
+      "FRONT_AND_BACK": {
+        "support_level": "untriaged"
+      },
+      "FRONT_FACE": {
+        "support_level": "untriaged"
+      },
+      "FUNC_ADD": {
+        "support_level": "untriaged"
+      },
+      "FUNC_REVERSE_SUBTRACT": {
+        "support_level": "untriaged"
+      },
+      "FUNC_SUBTRACT": {
+        "support_level": "untriaged"
+      },
+      "GENERATE_MIPMAP_HINT": {
+        "support_level": "untriaged"
+      },
+      "GEQUAL": {
+        "support_level": "untriaged"
+      },
+      "GREATER": {
+        "support_level": "untriaged"
+      },
+      "GREEN_BITS": {
+        "support_level": "untriaged"
+      },
+      "HIGH_FLOAT": {
+        "support_level": "untriaged"
+      },
+      "HIGH_INT": {
+        "support_level": "untriaged"
+      },
+      "IMPLEMENTATION_COLOR_READ_FORMAT": {
+        "support_level": "untriaged"
+      },
+      "IMPLEMENTATION_COLOR_READ_TYPE": {
+        "support_level": "untriaged"
+      },
+      "INCR": {
+        "support_level": "untriaged"
+      },
+      "INCR_WRAP": {
+        "support_level": "untriaged"
+      },
+      "INT": {
+        "support_level": "untriaged"
+      },
+      "INT_VEC2": {
+        "support_level": "untriaged"
+      },
+      "INT_VEC3": {
+        "support_level": "untriaged"
+      },
+      "INT_VEC4": {
+        "support_level": "untriaged"
+      },
+      "INVALID_ENUM": {
+        "support_level": "untriaged"
+      },
+      "INVALID_FRAMEBUFFER_OPERATION": {
+        "support_level": "untriaged"
+      },
+      "INVALID_OPERATION": {
+        "support_level": "untriaged"
+      },
+      "INVALID_VALUE": {
+        "support_level": "untriaged"
+      },
+      "INVERT": {
+        "support_level": "untriaged"
+      },
+      "KEEP": {
+        "support_level": "untriaged"
+      },
+      "LEQUAL": {
+        "support_level": "untriaged"
+      },
+      "LESS": {
+        "support_level": "untriaged"
+      },
+      "LINEAR": {
+        "support_level": "untriaged"
+      },
+      "LINEAR_MIPMAP_LINEAR": {
+        "support_level": "untriaged"
+      },
+      "LINEAR_MIPMAP_NEAREST": {
+        "support_level": "untriaged"
+      },
+      "LINES": {
+        "support_level": "untriaged"
+      },
+      "LINE_LOOP": {
+        "support_level": "untriaged"
+      },
+      "LINE_STRIP": {
+        "support_level": "untriaged"
+      },
+      "LINE_WIDTH": {
+        "support_level": "untriaged"
+      },
+      "LINK_STATUS": {
+        "support_level": "untriaged"
+      },
+      "LOW_FLOAT": {
+        "support_level": "untriaged"
+      },
+      "LOW_INT": {
+        "support_level": "untriaged"
+      },
+      "LUMINANCE": {
+        "support_level": "untriaged"
+      },
+      "LUMINANCE_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "MAX_COMBINED_TEXTURE_IMAGE_UNITS": {
+        "support_level": "untriaged"
+      },
+      "MAX_CUBE_MAP_TEXTURE_SIZE": {
+        "support_level": "untriaged"
+      },
+      "MAX_FRAGMENT_UNIFORM_VECTORS": {
+        "support_level": "untriaged"
+      },
+      "MAX_RENDERBUFFER_SIZE": {
+        "support_level": "untriaged"
+      },
+      "MAX_TEXTURE_IMAGE_UNITS": {
+        "support_level": "untriaged"
+      },
+      "MAX_TEXTURE_SIZE": {
+        "support_level": "untriaged"
+      },
+      "MAX_VARYING_VECTORS": {
+        "support_level": "untriaged"
+      },
+      "MAX_VERTEX_ATTRIBS": {
+        "support_level": "untriaged"
+      },
+      "MAX_VERTEX_TEXTURE_IMAGE_UNITS": {
+        "support_level": "untriaged"
+      },
+      "MAX_VERTEX_UNIFORM_VECTORS": {
+        "support_level": "untriaged"
+      },
+      "MAX_VIEWPORT_DIMS": {
+        "support_level": "untriaged"
+      },
+      "MEDIUM_FLOAT": {
+        "support_level": "untriaged"
+      },
+      "MEDIUM_INT": {
+        "support_level": "untriaged"
+      },
+      "MIRRORED_REPEAT": {
+        "support_level": "untriaged"
+      },
+      "NEAREST": {
+        "support_level": "untriaged"
+      },
+      "NEAREST_MIPMAP_LINEAR": {
+        "support_level": "untriaged"
+      },
+      "NEAREST_MIPMAP_NEAREST": {
+        "support_level": "untriaged"
+      },
+      "NEVER": {
+        "support_level": "untriaged"
+      },
+      "NICEST": {
+        "support_level": "untriaged"
+      },
+      "NONE": {
+        "support_level": "untriaged"
+      },
+      "NOTEQUAL": {
+        "support_level": "untriaged"
+      },
+      "NO_ERROR": {
+        "support_level": "untriaged"
+      },
+      "ONE": {
+        "support_level": "untriaged"
+      },
+      "ONE_MINUS_CONSTANT_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "ONE_MINUS_CONSTANT_COLOR": {
+        "support_level": "untriaged"
+      },
+      "ONE_MINUS_DST_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "ONE_MINUS_DST_COLOR": {
+        "support_level": "untriaged"
+      },
+      "ONE_MINUS_SRC_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "ONE_MINUS_SRC_COLOR": {
+        "support_level": "untriaged"
+      },
+      "OUT_OF_MEMORY": {
+        "support_level": "untriaged"
+      },
+      "PACK_ALIGNMENT": {
+        "support_level": "untriaged"
+      },
+      "POINTS": {
+        "support_level": "untriaged"
+      },
+      "POLYGON_OFFSET_FACTOR": {
+        "support_level": "untriaged"
+      },
+      "POLYGON_OFFSET_FILL": {
+        "support_level": "untriaged"
+      },
+      "POLYGON_OFFSET_UNITS": {
+        "support_level": "untriaged"
+      },
+      "RED_BITS": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_ALPHA_SIZE": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_BINDING": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_BLUE_SIZE": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_DEPTH_SIZE": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_GREEN_SIZE": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_HEIGHT": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_INTERNAL_FORMAT": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_RED_SIZE": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_STENCIL_SIZE": {
+        "support_level": "untriaged"
+      },
+      "RENDERBUFFER_WIDTH": {
+        "support_level": "untriaged"
+      },
+      "RENDERER": {
+        "support_level": "untriaged"
+      },
+      "REPEAT": {
+        "support_level": "untriaged"
+      },
+      "REPLACE": {
+        "support_level": "untriaged"
+      },
+      "RGB": {
+        "support_level": "untriaged"
+      },
+      "RGB565": {
+        "support_level": "untriaged"
+      },
+      "RGB5_A1": {
+        "support_level": "untriaged"
+      },
+      "RGBA": {
+        "support_level": "untriaged"
+      },
+      "RGBA4": {
+        "support_level": "untriaged"
+      },
+      "SAMPLER_2D": {
+        "support_level": "untriaged"
+      },
+      "SAMPLER_CUBE": {
+        "support_level": "untriaged"
+      },
+      "SAMPLES": {
+        "support_level": "untriaged"
+      },
+      "SAMPLE_ALPHA_TO_COVERAGE": {
+        "support_level": "untriaged"
+      },
+      "SAMPLE_BUFFERS": {
+        "support_level": "untriaged"
+      },
+      "SAMPLE_COVERAGE": {
+        "support_level": "untriaged"
+      },
+      "SAMPLE_COVERAGE_INVERT": {
+        "support_level": "untriaged"
+      },
+      "SAMPLE_COVERAGE_VALUE": {
+        "support_level": "untriaged"
+      },
+      "SCISSOR_BOX": {
+        "support_level": "untriaged"
+      },
+      "SCISSOR_TEST": {
+        "support_level": "untriaged"
+      },
+      "SHADER_TYPE": {
+        "support_level": "untriaged"
+      },
+      "SHADING_LANGUAGE_VERSION": {
+        "support_level": "untriaged"
+      },
+      "SHORT": {
+        "support_level": "untriaged"
+      },
+      "SRC_ALPHA": {
+        "support_level": "untriaged"
+      },
+      "SRC_ALPHA_SATURATE": {
+        "support_level": "untriaged"
+      },
+      "SRC_COLOR": {
+        "support_level": "untriaged"
+      },
+      "STATIC_DRAW": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_ATTACHMENT": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BACK_FAIL": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BACK_FUNC": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BACK_PASS_DEPTH_FAIL": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BACK_PASS_DEPTH_PASS": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BACK_REF": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BACK_VALUE_MASK": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BACK_WRITEMASK": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BITS": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_BUFFER_BIT": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_CLEAR_VALUE": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_FAIL": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_FUNC": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_INDEX": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_INDEX8": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_PASS_DEPTH_FAIL": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_PASS_DEPTH_PASS": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_REF": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_TEST": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_VALUE_MASK": {
+        "support_level": "untriaged"
+      },
+      "STENCIL_WRITEMASK": {
+        "support_level": "untriaged"
+      },
+      "STREAM_DRAW": {
+        "support_level": "untriaged"
+      },
+      "SUBPIXEL_BITS": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE0": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE1": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE10": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE11": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE12": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE13": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE14": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE15": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE16": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE17": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE18": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE19": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE2": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE20": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE21": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE22": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE23": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE24": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE25": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE26": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE27": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE28": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE29": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE3": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE30": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE31": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE4": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE5": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE6": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE7": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE8": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE9": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_2D": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_BINDING_2D": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_BINDING_CUBE_MAP": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_CUBE_MAP": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_CUBE_MAP_NEGATIVE_X": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_CUBE_MAP_NEGATIVE_Y": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_CUBE_MAP_NEGATIVE_Z": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_CUBE_MAP_POSITIVE_X": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_CUBE_MAP_POSITIVE_Y": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_CUBE_MAP_POSITIVE_Z": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_MAG_FILTER": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_MIN_FILTER": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_WRAP_S": {
+        "support_level": "untriaged"
+      },
+      "TEXTURE_WRAP_T": {
+        "support_level": "untriaged"
+      },
+      "TRIANGLES": {
+        "support_level": "untriaged"
+      },
+      "TRIANGLE_FAN": {
+        "support_level": "untriaged"
+      },
+      "TRIANGLE_STRIP": {
+        "support_level": "untriaged"
+      },
+      "UNPACK_ALIGNMENT": {
+        "support_level": "untriaged"
+      },
+      "UNPACK_COLORSPACE_CONVERSION_WEBGL": {
+        "support_level": "untriaged"
+      },
+      "UNPACK_FLIP_Y_WEBGL": {
+        "support_level": "untriaged"
+      },
+      "UNPACK_PREMULTIPLY_ALPHA_WEBGL": {
+        "support_level": "untriaged"
+      },
+      "UNSIGNED_BYTE": {
+        "support_level": "untriaged"
+      },
+      "UNSIGNED_INT": {
+        "support_level": "untriaged"
+      },
+      "UNSIGNED_SHORT": {
+        "support_level": "untriaged"
+      },
+      "UNSIGNED_SHORT_4_4_4_4": {
+        "support_level": "untriaged"
+      },
+      "UNSIGNED_SHORT_5_5_5_1": {
+        "support_level": "untriaged"
+      },
+      "UNSIGNED_SHORT_5_6_5": {
+        "support_level": "untriaged"
+      },
+      "VALIDATE_STATUS": {
+        "support_level": "untriaged"
+      },
+      "VENDOR": {
+        "support_level": "untriaged"
+      },
+      "VERSION": {
+        "support_level": "untriaged"
+      },
+      "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": {
+        "support_level": "untriaged"
+      },
+      "VERTEX_ATTRIB_ARRAY_ENABLED": {
+        "support_level": "untriaged"
+      },
+      "VERTEX_ATTRIB_ARRAY_NORMALIZED": {
+        "support_level": "untriaged"
+      },
+      "VERTEX_ATTRIB_ARRAY_POINTER": {
+        "support_level": "untriaged"
+      },
+      "VERTEX_ATTRIB_ARRAY_SIZE": {
+        "support_level": "untriaged"
+      },
+      "VERTEX_ATTRIB_ARRAY_STRIDE": {
+        "support_level": "untriaged"
+      },
+      "VERTEX_ATTRIB_ARRAY_TYPE": {
+        "support_level": "untriaged"
+      },
+      "VERTEX_SHADER": {
+        "support_level": "untriaged"
+      },
+      "VIEWPORT": {
+        "support_level": "untriaged"
+      },
+      "ZERO": {
+        "support_level": "untriaged"
+      },
+      "activeTexture": {
+        "support_level": "untriaged"
+      },
+      "attachShader": {
+        "support_level": "untriaged"
+      },
+      "beginQuery": {
+        "support_level": "untriaged"
+      },
+      "beginTransformFeedback": {
+        "support_level": "untriaged"
+      },
+      "bindAttribLocation": {
+        "support_level": "untriaged"
+      },
+      "bindBuffer": {
+        "support_level": "untriaged"
+      },
+      "bindBufferBase": {
+        "support_level": "untriaged"
+      },
+      "bindBufferRange": {
+        "support_level": "untriaged"
+      },
+      "bindFramebuffer": {
+        "support_level": "untriaged"
+      },
+      "bindRenderbuffer": {
+        "support_level": "untriaged"
+      },
+      "bindSampler": {
+        "support_level": "untriaged"
+      },
+      "bindTexture": {
+        "support_level": "untriaged"
+      },
+      "bindTransformFeedback": {
+        "support_level": "untriaged"
+      },
+      "bindVertexArray": {
+        "support_level": "untriaged"
+      },
+      "blendColor": {
+        "support_level": "untriaged"
+      },
+      "blendEquation": {
+        "support_level": "untriaged"
+      },
+      "blendEquationSeparate": {
+        "support_level": "untriaged"
+      },
+      "blendFunc": {
+        "support_level": "untriaged"
+      },
+      "blendFuncSeparate": {
+        "support_level": "untriaged"
+      },
+      "blitFramebuffer": {
+        "support_level": "untriaged"
+      },
+      "bufferByteData": {
+        "support_level": "untriaged"
+      },
+      "bufferData": {
+        "support_level": "untriaged"
+      },
+      "bufferDataTyped": {
+        "support_level": "untriaged"
+      },
+      "bufferSubByteData": {
+        "support_level": "untriaged"
+      },
+      "bufferSubData": {
+        "support_level": "untriaged"
+      },
+      "bufferSubDataTyped": {
+        "support_level": "untriaged"
+      },
+      "canvas": {
+        "support_level": "untriaged"
+      },
+      "checkFramebufferStatus": {
+        "support_level": "untriaged"
+      },
+      "clear": {
+        "support_level": "untriaged"
+      },
+      "clearBufferfi": {
+        "support_level": "untriaged"
+      },
+      "clearBufferfv": {
+        "support_level": "untriaged"
+      },
+      "clearBufferiv": {
+        "support_level": "untriaged"
+      },
+      "clearBufferuiv": {
+        "support_level": "untriaged"
+      },
+      "clearColor": {
+        "support_level": "untriaged"
+      },
+      "clearDepth": {
+        "support_level": "untriaged"
+      },
+      "clearStencil": {
+        "support_level": "untriaged"
+      },
+      "clientWaitSync": {
+        "support_level": "untriaged"
+      },
+      "colorMask": {
+        "support_level": "untriaged"
+      },
+      "compileShader": {
+        "support_level": "untriaged"
+      },
+      "compressedTexImage2D": {
+        "support_level": "untriaged"
+      },
+      "compressedTexImage3D": {
+        "support_level": "untriaged"
+      },
+      "compressedTexSubImage2D": {
+        "support_level": "untriaged"
+      },
+      "compressedTexSubImage3D": {
+        "support_level": "untriaged"
+      },
+      "copyBufferSubData": {
+        "support_level": "untriaged"
+      },
+      "copyTexImage2D": {
+        "support_level": "untriaged"
+      },
+      "copyTexSubImage2D": {
+        "support_level": "untriaged"
+      },
+      "copyTexSubImage3D": {
+        "support_level": "untriaged"
+      },
+      "createBuffer": {
+        "support_level": "untriaged"
+      },
+      "createFramebuffer": {
+        "support_level": "untriaged"
+      },
+      "createProgram": {
+        "support_level": "untriaged"
+      },
+      "createQuery": {
+        "support_level": "untriaged"
+      },
+      "createRenderbuffer": {
+        "support_level": "untriaged"
+      },
+      "createSampler": {
+        "support_level": "untriaged"
+      },
+      "createShader": {
+        "support_level": "untriaged"
+      },
+      "createTexture": {
+        "support_level": "untriaged"
+      },
+      "createTransformFeedback": {
+        "support_level": "untriaged"
+      },
+      "createVertexArray": {
+        "support_level": "untriaged"
+      },
+      "cullFace": {
+        "support_level": "untriaged"
+      },
+      "deleteBuffer": {
+        "support_level": "untriaged"
+      },
+      "deleteFramebuffer": {
+        "support_level": "untriaged"
+      },
+      "deleteProgram": {
+        "support_level": "untriaged"
+      },
+      "deleteQuery": {
+        "support_level": "untriaged"
+      },
+      "deleteRenderbuffer": {
+        "support_level": "untriaged"
+      },
+      "deleteSampler": {
+        "support_level": "untriaged"
+      },
+      "deleteShader": {
+        "support_level": "untriaged"
+      },
+      "deleteSync": {
+        "support_level": "untriaged"
+      },
+      "deleteTexture": {
+        "support_level": "untriaged"
+      },
+      "deleteTransformFeedback": {
+        "support_level": "untriaged"
+      },
+      "deleteVertexArray": {
+        "support_level": "untriaged"
+      },
+      "depthFunc": {
+        "support_level": "untriaged"
+      },
+      "depthMask": {
+        "support_level": "untriaged"
+      },
+      "depthRange": {
+        "support_level": "untriaged"
+      },
+      "detachShader": {
+        "support_level": "untriaged"
+      },
+      "disable": {
+        "support_level": "untriaged"
+      },
+      "disableVertexAttribArray": {
+        "support_level": "untriaged"
+      },
+      "drawArrays": {
+        "support_level": "untriaged"
+      },
+      "drawArraysInstanced": {
+        "support_level": "untriaged"
+      },
+      "drawBuffers": {
+        "support_level": "untriaged"
+      },
+      "drawElements": {
+        "support_level": "untriaged"
+      },
+      "drawElementsInstanced": {
+        "support_level": "untriaged"
+      },
+      "drawRangeElements": {
+        "support_level": "untriaged"
+      },
+      "drawingBufferHeight": {
+        "support_level": "untriaged"
+      },
+      "drawingBufferWidth": {
+        "support_level": "untriaged"
+      },
+      "enable": {
+        "support_level": "untriaged"
+      },
+      "enableVertexAttribArray": {
+        "support_level": "untriaged"
+      },
+      "endQuery": {
+        "support_level": "untriaged"
+      },
+      "endTransformFeedback": {
+        "support_level": "untriaged"
+      },
+      "fenceSync": {
+        "support_level": "untriaged"
+      },
+      "finish": {
+        "support_level": "untriaged"
+      },
+      "flush": {
+        "support_level": "untriaged"
+      },
+      "framebufferRenderbuffer": {
+        "support_level": "untriaged"
+      },
+      "framebufferTexture2D": {
+        "support_level": "untriaged"
+      },
+      "framebufferTextureLayer": {
+        "support_level": "untriaged"
+      },
+      "frontFace": {
+        "support_level": "untriaged"
+      },
+      "generateMipmap": {
+        "support_level": "untriaged"
+      },
+      "getActiveAttrib": {
+        "support_level": "untriaged"
+      },
+      "getActiveUniform": {
+        "support_level": "untriaged"
+      },
+      "getActiveUniformBlockName": {
+        "support_level": "untriaged"
+      },
+      "getActiveUniformBlockParameter": {
+        "support_level": "untriaged"
+      },
+      "getActiveUniforms": {
+        "support_level": "untriaged"
+      },
+      "getAttachedShaders": {
+        "support_level": "untriaged"
+      },
+      "getAttribLocation": {
+        "support_level": "untriaged"
+      },
+      "getBufferParameter": {
+        "support_level": "untriaged"
+      },
+      "getBufferSubData": {
+        "support_level": "untriaged"
+      },
+      "getContextAttributes": {
+        "support_level": "untriaged"
+      },
+      "getError": {
+        "support_level": "untriaged"
+      },
+      "getExtension": {
+        "support_level": "untriaged"
+      },
+      "getFragDataLocation": {
+        "support_level": "untriaged"
+      },
+      "getFramebufferAttachmentParameter": {
+        "support_level": "untriaged"
+      },
+      "getIndexedParameter": {
+        "support_level": "untriaged"
+      },
+      "getInternalformatParameter": {
+        "support_level": "untriaged"
+      },
+      "getParameter": {
+        "support_level": "untriaged"
+      },
+      "getProgramInfoLog": {
+        "support_level": "untriaged"
+      },
+      "getProgramParameter": {
+        "support_level": "untriaged"
+      },
+      "getQuery": {
+        "support_level": "untriaged"
+      },
+      "getQueryParameter": {
+        "support_level": "untriaged"
+      },
+      "getRenderbufferParameter": {
+        "support_level": "untriaged"
+      },
+      "getSamplerParameter": {
+        "support_level": "untriaged"
+      },
+      "getShaderInfoLog": {
+        "support_level": "untriaged"
+      },
+      "getShaderParameter": {
+        "support_level": "untriaged"
+      },
+      "getShaderPrecisionFormat": {
+        "support_level": "untriaged"
+      },
+      "getShaderSource": {
+        "support_level": "untriaged"
+      },
+      "getSupportedExtensions": {
+        "support_level": "untriaged"
+      },
+      "getSyncParameter": {
+        "support_level": "untriaged"
+      },
+      "getTexParameter": {
+        "support_level": "untriaged"
+      },
+      "getTransformFeedbackVarying": {
+        "support_level": "untriaged"
+      },
+      "getUniform": {
+        "support_level": "untriaged"
+      },
+      "getUniformBlockIndex": {
+        "support_level": "untriaged"
+      },
+      "getUniformIndices": {
+        "support_level": "untriaged"
+      },
+      "getUniformLocation": {
+        "support_level": "untriaged"
+      },
+      "getVertexAttrib": {
+        "support_level": "untriaged"
+      },
+      "getVertexAttribOffset": {
+        "support_level": "untriaged"
+      },
+      "hint": {
+        "support_level": "untriaged"
+      },
+      "invalidateFramebuffer": {
+        "support_level": "untriaged"
+      },
+      "invalidateSubFramebuffer": {
+        "support_level": "untriaged"
+      },
+      "isBuffer": {
+        "support_level": "untriaged"
+      },
+      "isContextLost": {
+        "support_level": "untriaged"
+      },
+      "isEnabled": {
+        "support_level": "untriaged"
+      },
+      "isFramebuffer": {
+        "support_level": "untriaged"
+      },
+      "isProgram": {
+        "support_level": "untriaged"
+      },
+      "isQuery": {
+        "support_level": "untriaged"
+      },
+      "isRenderbuffer": {
+        "support_level": "untriaged"
+      },
+      "isSampler": {
+        "support_level": "untriaged"
+      },
+      "isShader": {
+        "support_level": "untriaged"
+      },
+      "isSync": {
+        "support_level": "untriaged"
+      },
+      "isTexture": {
+        "support_level": "untriaged"
+      },
+      "isTransformFeedback": {
+        "support_level": "untriaged"
+      },
+      "isVertexArray": {
+        "support_level": "untriaged"
+      },
+      "lineWidth": {
+        "support_level": "untriaged"
+      },
+      "linkProgram": {
+        "support_level": "untriaged"
+      },
+      "pauseTransformFeedback": {
+        "support_level": "untriaged"
+      },
+      "pixelStorei": {
+        "support_level": "untriaged"
+      },
+      "polygonOffset": {
+        "support_level": "untriaged"
+      },
+      "readBuffer": {
+        "support_level": "untriaged"
+      },
+      "readPixels": {
+        "support_level": "untriaged"
+      },
+      "renderbufferStorage": {
+        "support_level": "untriaged"
+      },
+      "renderbufferStorageMultisample": {
+        "support_level": "untriaged"
+      },
+      "resumeTransformFeedback": {
+        "support_level": "untriaged"
+      },
+      "sampleCoverage": {
+        "support_level": "untriaged"
+      },
+      "samplerParameterf": {
+        "support_level": "untriaged"
+      },
+      "samplerParameteri": {
+        "support_level": "untriaged"
+      },
+      "scissor": {
+        "support_level": "untriaged"
+      },
+      "shaderSource": {
+        "support_level": "untriaged"
+      },
+      "stencilFunc": {
+        "support_level": "untriaged"
+      },
+      "stencilFuncSeparate": {
+        "support_level": "untriaged"
+      },
+      "stencilMask": {
+        "support_level": "untriaged"
+      },
+      "stencilMaskSeparate": {
+        "support_level": "untriaged"
+      },
+      "stencilOp": {
+        "support_level": "untriaged"
+      },
+      "stencilOpSeparate": {
+        "support_level": "untriaged"
+      },
+      "texImage2D": {
+        "support_level": "untriaged"
+      },
+      "texImage2DCanvas": {
+        "support_level": "untriaged"
+      },
+      "texImage2DImage": {
+        "support_level": "untriaged"
+      },
+      "texImage2DImageData": {
+        "support_level": "untriaged"
+      },
+      "texImage2DVideo": {
+        "support_level": "untriaged"
+      },
+      "texImage3D": {
+        "support_level": "untriaged"
+      },
+      "texParameterf": {
+        "support_level": "untriaged"
+      },
+      "texParameteri": {
+        "support_level": "untriaged"
+      },
+      "texStorage2D": {
+        "support_level": "untriaged"
+      },
+      "texStorage3D": {
+        "support_level": "untriaged"
+      },
+      "texSubImage2D": {
+        "support_level": "untriaged"
+      },
+      "texSubImage2DCanvas": {
+        "support_level": "untriaged"
+      },
+      "texSubImage2DImage": {
+        "support_level": "untriaged"
+      },
+      "texSubImage2DImageData": {
+        "support_level": "untriaged"
+      },
+      "texSubImage2DVideo": {
+        "support_level": "untriaged"
+      },
+      "texSubImage3D": {
+        "support_level": "untriaged"
+      },
+      "transformFeedbackVaryings": {
+        "support_level": "untriaged"
+      },
+      "uniform1f": {
+        "support_level": "untriaged"
+      },
+      "uniform1fv": {
+        "support_level": "untriaged"
+      },
+      "uniform1i": {
+        "support_level": "untriaged"
+      },
+      "uniform1iv": {
+        "support_level": "untriaged"
+      },
+      "uniform1ui": {
+        "support_level": "untriaged"
+      },
+      "uniform1uiv": {
+        "support_level": "untriaged"
+      },
+      "uniform2f": {
+        "support_level": "untriaged"
+      },
+      "uniform2fv": {
+        "support_level": "untriaged"
+      },
+      "uniform2i": {
+        "support_level": "untriaged"
+      },
+      "uniform2iv": {
+        "support_level": "untriaged"
+      },
+      "uniform2ui": {
+        "support_level": "untriaged"
+      },
+      "uniform2uiv": {
+        "support_level": "untriaged"
+      },
+      "uniform3f": {
+        "support_level": "untriaged"
+      },
+      "uniform3fv": {
+        "support_level": "untriaged"
+      },
+      "uniform3i": {
+        "support_level": "untriaged"
+      },
+      "uniform3iv": {
+        "support_level": "untriaged"
+      },
+      "uniform3ui": {
+        "support_level": "untriaged"
+      },
+      "uniform3uiv": {
+        "support_level": "untriaged"
+      },
+      "uniform4f": {
+        "support_level": "untriaged"
+      },
+      "uniform4fv": {
+        "support_level": "untriaged"
+      },
+      "uniform4i": {
+        "support_level": "untriaged"
+      },
+      "uniform4iv": {
+        "support_level": "untriaged"
+      },
+      "uniform4ui": {
+        "support_level": "untriaged"
+      },
+      "uniform4uiv": {
+        "support_level": "untriaged"
+      },
+      "uniformBlockBinding": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix2fv": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix2x3fv": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix2x4fv": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix3fv": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix3x2fv": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix3x4fv": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix4fv": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix4x2fv": {
+        "support_level": "untriaged"
+      },
+      "uniformMatrix4x3fv": {
+        "support_level": "untriaged"
+      },
+      "useProgram": {
+        "support_level": "untriaged"
+      },
+      "validateProgram": {
+        "support_level": "untriaged"
+      },
+      "vertexAttrib1f": {
+        "support_level": "untriaged"
+      },
+      "vertexAttrib1fv": {
+        "support_level": "untriaged"
+      },
+      "vertexAttrib2f": {
+        "support_level": "untriaged"
+      },
+      "vertexAttrib2fv": {
+        "support_level": "untriaged"
+      },
+      "vertexAttrib3f": {
+        "support_level": "untriaged"
+      },
+      "vertexAttrib3fv": {
+        "support_level": "untriaged"
+      },
+      "vertexAttrib4f": {
+        "support_level": "untriaged"
+      },
+      "vertexAttrib4fv": {
+        "support_level": "untriaged"
+      },
+      "vertexAttribDivisor": {
+        "support_level": "untriaged"
+      },
+      "vertexAttribI4i": {
+        "support_level": "untriaged"
+      },
+      "vertexAttribI4iv": {
+        "support_level": "untriaged"
+      },
+      "vertexAttribI4ui": {
+        "support_level": "untriaged"
+      },
+      "vertexAttribI4uiv": {
+        "support_level": "untriaged"
+      },
+      "vertexAttribIPointer": {
+        "support_level": "untriaged"
+      },
+      "vertexAttribPointer": {
+        "support_level": "untriaged"
+      },
+      "viewport": {
+        "support_level": "untriaged"
+      },
+      "waitSync": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
+  "WebGL2RenderingContextBase": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "WebGLActiveInfo": {
     "comment": "http://www.khronos.org/registry/webgl/specs/latest/#5.11",
     "dart_action": "unstable",
@@ -14460,6 +17666,7 @@
     "comment": "http://www.khronos.org/registry/webgl/specs/latest/#WEBGLCONTEXTEVENT",
     "dart_action": "unstable",
     "members": {
+      "WebGLContextEvent": {},
       "statusMessage": {}
     },
     "support_level": "stable"
@@ -14551,6 +17758,10 @@
     "members": {},
     "support_level": "stable"
   },
+  "WebGLQuery": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "WebGLRenderbuffer": {
     "comment": "http://www.khronos.org/registry/webgl/specs/latest/#5.7",
     "dart_action": "unstable",
@@ -16380,6 +19591,10 @@
     },
     "support_level": "untriaged"
   },
+  "WebGLSampler": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "WebGLShader": {
     "comment": "http://www.khronos.org/registry/webgl/specs/latest/#5.8",
     "members": {},
@@ -16394,16 +19609,28 @@
     },
     "support_level": "stable"
   },
+  "WebGLSync": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "WebGLTexture": {
     "comment": "http://www.khronos.org/registry/webgl/specs/latest/#5.9",
     "members": {},
     "support_level": "stable"
   },
+  "WebGLTransformFeedback": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "WebGLUniformLocation": {
     "comment": "http://www.khronos.org/registry/webgl/specs/latest/#5.10",
     "members": {},
     "support_level": "stable"
   },
+  "WebGLVertexArrayObject": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "WebGLVertexArrayObjectOES": {
     "comment": "http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/",
     "dart_action": "experimental",
@@ -16647,6 +19874,7 @@
       "DOM_DELTA_LINE": {},
       "DOM_DELTA_PAGE": {},
       "DOM_DELTA_PIXEL": {},
+      "WheelEvent": {},
       "deltaMode": {},
       "deltaX": {},
       "deltaY": {},
@@ -16675,6 +19903,12 @@
       },
       "Window": {},
       "__getter__": {},
+      "_setInterval_String": {
+        "support_level": "untriaged"
+      },
+      "_setTimeout_String": {
+        "support_level": "untriaged"
+      },
       "addEventListener": {},
       "alert": {},
       "applicationCache": {},
@@ -16684,6 +19918,9 @@
         "support_level": "deprecated"
       },
       "btoa": {},
+      "caches": {
+        "support_level": "untriaged"
+      },
       "cancelAnimationFrame": {},
       "captureEvents": {
         "comment": "http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-capture",
@@ -16722,6 +19959,9 @@
         "dart_action": "suppress",
         "support_level": "deprecated"
       },
+      "fetch": {
+        "support_level": "untriaged"
+      },
       "find": {
         "support_level": "nonstandard"
       },
@@ -17023,6 +20263,20 @@
     },
     "support_level": "untriaged"
   },
+  "WindowClient": {
+    "members": {
+      "focus": {
+        "support_level": "untriaged"
+      },
+      "focused": {
+        "support_level": "untriaged"
+      },
+      "visibilityState": {
+        "support_level": "untriaged"
+      }
+    },
+    "support_level": "untriaged"
+  },
   "WindowEventHandlers": {
     "members": {
       "onbeforeunload": {
@@ -17057,6 +20311,12 @@
   },
   "WindowTimers": {
     "members": {
+      "_setInterval_String": {
+        "support_level": "untriaged"
+      },
+      "_setTimeout_String": {
+        "support_level": "untriaged"
+      },
       "clearInterval": {
         "support_level": "untriaged"
       },
@@ -17194,6 +20454,12 @@
       "TEMPORARY": {
         "support_level": "untriaged"
       },
+      "_setInterval_String": {
+        "support_level": "untriaged"
+      },
+      "_setTimeout_String": {
+        "support_level": "untriaged"
+      },
       "addEventListener": {
         "support_level": "untriaged"
       },
@@ -17203,6 +20469,9 @@
       "btoa": {
         "support_level": "untriaged"
       },
+      "caches": {
+        "support_level": "untriaged"
+      },
       "clearInterval": {
         "support_level": "untriaged"
       },
@@ -17224,6 +20493,9 @@
       "dispatchEvent": {
         "support_level": "untriaged"
       },
+      "fetch": {
+        "support_level": "untriaged"
+      },
       "importScripts": {
         "support_level": "untriaged"
       },
@@ -17344,11 +20616,38 @@
   },
   "WorkerPerformance": {
     "members": {
+      "clearMarks": {
+        "support_level": "untriaged"
+      },
+      "clearMeasures": {
+        "support_level": "untriaged"
+      },
+      "getEntries": {
+        "support_level": "untriaged"
+      },
+      "getEntriesByName": {
+        "support_level": "untriaged"
+      },
+      "getEntriesByType": {
+        "support_level": "untriaged"
+      },
+      "mark": {
+        "support_level": "untriaged"
+      },
+      "measure": {
+        "support_level": "untriaged"
+      },
       "memory": {
         "support_level": "untriaged"
       },
       "now": {
         "support_level": "untriaged"
+      },
+      "webkitClearResourceTimings": {
+        "support_level": "untriaged"
+      },
+      "webkitSetResourceTimingBufferSize": {
+        "support_level": "untriaged"
       }
     },
     "support_level": "untriaged"
diff --git a/tools/dom/idl/dart/dart.idl b/tools/dom/idl/dart/dart.idl
index bf857a8..533a448 100644
--- a/tools/dom/idl/dart/dart.idl
+++ b/tools/dom/idl/dart/dart.idl
@@ -60,6 +60,11 @@
   void handleEvent();
 };
 
+[Callback]
+interface RequestAnimationFrameCallback{
+    void handleEvent(double highResTime);
+};
+
 // FIXME(leafp): This is a temporary hack to get things running while
 // we are still generating _blink from the dart side idl files.
 // Once we are up and running generating dart:_blink in dartium
@@ -418,3 +423,10 @@
 };
 
 Element implements GlobalEventHandlers;
+
+
+// This only exists in Safari, and is deprecated there. But include it anyway
+// because otherwise iterating CSSRules in Safari can yield unknown JS objects.
+interface CSSCharsetRule : CSSRule {
+    [MeasureAs=CSSCharsetRuleEncoding] attribute DOMString encoding;
+};
diff --git a/tools/dom/scripts/css_code_generator.py b/tools/dom/scripts/css_code_generator.py
index 74de8e4..ef7555a 100644
--- a/tools/dom/scripts/css_code_generator.py
+++ b/tools/dom/scripts/css_code_generator.py
@@ -154,7 +154,7 @@
 $if DARTIUM
   bool _hasProperty(String propertyName) =>
   $if JSINTEROP
-      _blink.BlinkCSSStyleDeclaration.instance.$__propertyQuery___Callback_1_(unwrap_jso(this), propertyName) != null;
+      _blink.BlinkCSSStyleDeclaration.instance.$__propertyQuery___Callback_1_(this, propertyName);
   $else
       _blink.BlinkCSSStyleDeclaration.$__propertyQuery___Callback_1(this, propertyName);
   $endif
diff --git a/tools/dom/scripts/dartdomgenerator.py b/tools/dom/scripts/dartdomgenerator.py
index 8194dfc..c0315df2 100755
--- a/tools/dom/scripts/dartdomgenerator.py
+++ b/tools/dom/scripts/dartdomgenerator.py
@@ -29,6 +29,14 @@
   # location is dartium-git/src/third_party 
   third_party_dir = os.path.join(dart_dir, '..', 'third_party')
   assert(os.path.exists(third_party_dir))
+else:
+  # It's Dart we need to make sure that tools in injected in our search path
+  # because this is where idl_parser is located for a Dart enlistment.  Dartium
+  # can figure out the tools directory because of the location of where the
+  # scripts blink scripts are located.
+  tools_dir = os.path.join(dart_dir, 'tools')
+  sys.path.insert(1, tools_dir)
+
 sys.path.insert(1, third_party_dir)
 
 sys.path.insert(1, os.path.join(dart_dir, 'tools/dom/scripts'))
@@ -177,7 +185,7 @@
     cpp_library_emitter = CPPLibraryEmitter(emitters, cpp_output_dir)
     dart_output_dir = os.path.join(dartium_output_dir, 'dart')
     backend_factory = lambda interface:\
-        DartiumBackend(interface, cpp_library_emitter, backend_options)
+        DartiumBackend(interface, cpp_library_emitter, backend_options, _logger)
     dart_libraries = DartLibraries(
         HTML_LIBRARY_NAMES, template_loader, 'dartium', dartium_output_dir, dart_js_interop)
 
@@ -226,6 +234,25 @@
   _logger.info('Updating Css Properties.')
   css_code_generator.GenerateCssTemplateFile()
 
+CACHED_PATCHES = """
+// START_OF_CACHED_PATCHES
+// 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.
+
+// DO NOT EDIT GENERATED FILE.
+
+library cached_patches;
+
+var cached_patches = {
+    /********************************************************
+     *****                                              *****
+     *****  MUST RUN tools/dartium/generate_patches.sh  *****
+     *****                                              *****
+     ********************************************************/
+};
+"""
+
 def main():
   parser = optparse.OptionParser()
   parser.add_option('--parallel', dest='parallel',
@@ -319,6 +346,14 @@
           os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name),
           os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium'))
 
+    # Blow away the cached_patches.dart needs to be re-generated for Dartium
+    # see tools/dartium/generate_patches.sh
+    cached_patches_filename = os.path.join('..', '..', '..', 'sdk', 'lib', 'js', 'dartium',
+                                           'cached_patches.dart')
+    cached_patches = open(cached_patches_filename, 'w')
+    cached_patches.write(CACHED_PATCHES);
+    cached_patches.close()
+
   if '_blink' in systems:
     _logger.info('Generating dartium _blink file.')
     file_generation_start_time = time.time()
diff --git a/tools/dom/scripts/dartgenerator.py b/tools/dom/scripts/dartgenerator.py
index e3e9625..e03a0fa 100755
--- a/tools/dom/scripts/dartgenerator.py
+++ b/tools/dom/scripts/dartgenerator.py
@@ -12,7 +12,7 @@
 import re
 import shutil
 from generator import *
-from idlnode import IDLType
+from idlnode import IDLType, resolveTypedef
 
 _logger = logging.getLogger('dartgenerator')
 
@@ -98,6 +98,15 @@
               type_name.endswith('Constructor')):
             _logger.warn('removing %s in %s which has unidentified type %s' %
                        (node_name, interface.id, type_name))
+
+          # One last check is the type a typedef in an IDL file (the typedefs
+          # are treated as global).
+          resolvedType = resolveTypedef(idl_type)
+          if (resolvedType != idl_type):
+            idl_type.id = resolvedType.id
+            idl_type.nullable = resolvedType.nullable
+            continue
+
           return False
         return True
 
diff --git a/tools/dom/scripts/dartmetadata.py b/tools/dom/scripts/dartmetadata.py
index b90a2b3..37877f1 100644
--- a/tools/dom/scripts/dartmetadata.py
+++ b/tools/dom/scripts/dartmetadata.py
@@ -29,6 +29,11 @@
 
 _dart2js_annotations = monitored.Dict('dartmetadata._dart2js_annotations', {
 
+    'AnimationEffectTiming.duration': [
+      "@Creates('Null')",
+      "@Returns('num|String')",
+     ],
+
     'ArrayBufferView': [
       "@Creates('TypedData')",
       "@Returns('TypedData|Null')",
@@ -56,6 +61,10 @@
       "@Returns('String|CanvasGradient|CanvasPattern')",
     ],
 
+    'CryptoKey.algorithm': [
+      "@Creates('Null')",
+    ],
+
     'CustomEvent._detail': [
       "@Creates('Null')",
     ],
@@ -276,6 +285,11 @@
       "@Returns('EventTarget|=Object')",
     ],
 
+    'Notification.data': [
+      "@annotation_Creates_SerializedScriptValue",
+      "@annotation_Returns_SerializedScriptValue",
+    ],
+
     'PopStateEvent.state': [
       "@annotation_Creates_SerializedScriptValue",
       "@annotation_Returns_SerializedScriptValue",
@@ -290,6 +304,16 @@
       "@annotation_Returns_SerializedScriptValue",
     ],
 
+    'ServiceWorkerMessageEvent.data': [
+      "@annotation_Creates_SerializedScriptValue",
+      "@annotation_Returns_SerializedScriptValue",
+    ],
+
+    'ServiceWorkerMessageEvent.source': [
+      "@Creates('Null')",
+      "@Returns('_ServiceWorker|MessagePort')",
+     ],
+
     'ShadowRoot.getElementsByClassName': [
       "@Creates('NodeList|HtmlCollection')",
       "@Returns('NodeList|HtmlCollection')",
@@ -305,8 +329,6 @@
       "@Returns('NodeList|HtmlCollection')",
     ],
 
-    'SQLResultSetRowList.item': ["@Creates('=Object')"],
-
     # Touch targets are Elements in a Document, or the Document.
     'Touch.target': [
       "@Creates('Element|Document')",
@@ -317,6 +339,16 @@
       "@Creates('Null')",
     ],
 
+    'VTTCue.line': [
+       "@Creates('Null')",
+       "@Returns('num|String')",
+    ],
+
+    'VTTCue.position': [
+       "@Creates('Null')",
+       "@Returns('num|String')",
+    ],
+
     'WebGLRenderingContext.getBufferParameter': [
       "@Creates('int|Null')",
       "@Returns('int|Null')",
diff --git a/tools/dom/scripts/databasebuilder.py b/tools/dom/scripts/databasebuilder.py
index ceb6eb1..b0977ad 100755
--- a/tools/dom/scripts/databasebuilder.py
+++ b/tools/dom/scripts/databasebuilder.py
@@ -617,6 +617,9 @@
 
     end_time = time.time()
 
+    for warning in report_unions_to_any():
+      _logger.warning(warning)
+
     print 'Total %s files %sprocessed in databasebuilder in %s seconds' % \
     (len(file_paths), '', round((end_time - start_time), 2))
 
diff --git a/tools/dom/scripts/generate_blink_file.py b/tools/dom/scripts/generate_blink_file.py
index 6f274da..dee266c 100644
--- a/tools/dom/scripts/generate_blink_file.py
+++ b/tools/dom/scripts/generate_blink_file.py
@@ -7,9 +7,86 @@
 """Generates sdk/lib/_blink/dartium/_blink_dartium.dart file."""
 
 import os
-
+from sets import Set
 from generator import AnalyzeOperation, AnalyzeConstructor
 
+# This is list of all methods with native c++ implementations
+# If performing a dartium merge, the best practice is to comment out this list,
+# ensure everything runs, and then uncomment this list which might possibly
+# introduce breaking changes due to changes to these method signatures.
+_js_custom_members = Set([
+    'Document.createElement',
+    'Element.id',
+    'Element.tagName',
+    'Element.className',
+    'Element.setAttribute',
+    'Element.getAttribute',
+    # Consider adding this method so there is a fast path to access only
+    # element children.
+    # 'NonDocumentTypeChildNode.nextElementSibling',
+    'Node.appendChild', # actually not removed, just native implementation.
+    'Node.cloneNode',
+    'Node.insertBefore',    
+    'Node.lastChild',
+    'Node.firstChild',
+    'Node.parentElement',
+    'Node.parentNode',
+    'Node.childNodes',
+    'Node.removeChild',
+    'Node.contains',
+    'Node.nextSibling',
+    'Node.previousSibling',
+    'ChildNode.remove',
+    'Document.createTextNode',
+    'Window.location',
+    'Location.href',
+    'Location.hash',
+    'Node.querySelector',
+
+    'HTMLElement.hidden',
+    'HTMLElement.style',
+    'Element.attributes',
+    'Window.innerWidth',
+
+    'NodeList.length',
+    'NodeList.item',
+    'ParentNode.children',
+    'ParentNode.firstElementChild',
+    'ParentNode.lastElementChild',
+    'Event.target',
+    'MouseEvent.clientY',
+    'MouseEvent.clientX',
+
+    'Node.nodeType',
+    'Node.textContent',
+    
+    'HTMLCollection.length',
+    'HTMLCollection.item',
+    'Node.lastElementChild',
+    'Node.firstElementChild',
+    'HTMLElement_tabIndex',
+
+    'Element.clientWidth',
+    'Element.clientHeight',
+    'Document.body',
+    'Element.removeAttribute',
+    'Element.getBoundingClientRect',
+    'CSSStyleDeclaration.getPropertyValue',
+    'CSSStyleDeclaration.setProperty',
+    'CSSStyleDeclaration.__propertyQuery__',
+
+    # TODO(jacobr): consider implementing these methods as well as they show
+    # up in benchmarks for some sample applications.
+    #'Document.createEvent',
+    #'Document.initEvent',
+    #'EventTarget.dispatchEvent',
+     ])
+
+# Uncomment out this line  to short circuited native methods and run all of
+# dart:html through JS interop except for createElement which is slightly more
+# tightly natively wired.
+# _js_custom_members = Set([])
+
 HEADER = """/* 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.
@@ -50,46 +127,16 @@
 
   static register(document, tag, customType, extendsTagName) native "Utils_register";
 
-  static createElement(document, tagName) native "Utils_createElement";
+  // Defines an interceptor if there is an appropriate JavaScript prototype to define it on.
+  // In any case, returns a typed JS wrapper compatibile with dart:html and the new
+  // typed JS Interop.
+  static defineInterceptorCustomElement(jsObject, Type type) native "Utils_defineInterceptorCustomElement";
+  static defineInterceptor(jsObject, Type type) native "Utils_defineInterceptor";
+  static setInstanceInterceptor(o, Type type, {bool customElement: false}) native "Utils_setInstanceInterceptor";
+  static setInstanceInterceptorCustomUpgrade(o) native "Utils_setInstanceInterceptorCustomUpgrade";
 
-  static constructElement(element_type, jsObject) native "Utils_constructor_create";
-
+  // This method will throw if the element isn't actually a real Element.
   static initializeCustomElement(element) native "Utils_initializeCustomElement";
-
-  static changeElementWrapper(element, type) native "Utils_changeElementWrapper";
-}
-
-class Blink_DOMWindowCrossFrame {
-  // FIXME: Return to using explicit cross frame entry points after roll to M35
-  static get_history(_DOMWindowCrossFrame) native "Window_history_cross_frame_Getter";
-
-  static get_location(_DOMWindowCrossFrame) native "Window_location_cross_frame_Getter";
-
-  static get_closed(_DOMWindowCrossFrame) native "Window_closed_Getter";
-
-  static get_opener(_DOMWindowCrossFrame) native "Window_opener_Getter";
-
-  static get_parent(_DOMWindowCrossFrame) native "Window_parent_Getter";
-
-  static get_top(_DOMWindowCrossFrame) native "Window_top_Getter";
-
-  static close(_DOMWindowCrossFrame) native "Window_close_Callback";
-
-  static postMessage(_DOMWindowCrossFrame, message, targetOrigin, [messagePorts]) native "Window_postMessage_Callback";
-}
-
-class Blink_HistoryCrossFrame {
-  // _HistoryCrossFrame native entry points
-  static back(_HistoryCrossFrame) native "History_back_Callback";
-
-  static forward(_HistoryCrossFrame) native "History_forward_Callback";
-
-  static go(_HistoryCrossFrame, distance) native "History_go_Callback";
-}
-
-class Blink_LocationCrossFrame {
-  // _LocationCrossFrame native entry points
-  static set_href(_LocationCrossFrame, h) native "Location_href_Setter";
 }
 
 class Blink_DOMStringMap {
@@ -106,9 +153,63 @@
 }
 
 // Calls through JsNative but returns DomException instead of error strings.
+class Stats {
+  Stats(this.name) {
+    counts = new Map<String, int>();
+  }
+
+  String name;
+  Map<String, int> counts;
+  clear() {
+    counts.clear();
+  }
+
+  track(String v) {
+    counts[v] = counts.putIfAbsent(v, ()=> 0) + 1;
+  }
+  toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('================');
+    sb.write('$name ${counts.length}');
+    var keys = counts.keys.toList();
+    keys.sort((a,b) => counts[b].compareTo(counts[a]));
+    for (var key in keys) {
+      print("$key => ${counts[key]}");
+    }
+    sb.write('---------------');
+    sb.write('================');
+    return sb;
+  }
+}
+
+bool TRACK_STATS = true;
+dumpStats() {
+  print("------------ STATS ----------------");
+  print(Blink_JsNative_DomException.getPropertyStats.toString()); 
+  print(Blink_JsNative_DomException.setPropertyStats.toString());
+  print(Blink_JsNative_DomException.callMethodStats.toString());
+  print(Blink_JsNative_DomException.constructorStats.toString());
+  print("-----------------------------------");
+}
+
+clearStats() {
+  Blink_JsNative_DomException.getPropertyStats.clear();
+  Blink_JsNative_DomException.setPropertyStats.clear();
+  Blink_JsNative_DomException.callMethodStats.clear();  
+  Blink_JsNative_DomException.constructorStats.clear();  
+}
+
 class Blink_JsNative_DomException {
-  static getProperty(js.JsObject o, name) {
+  static var getPropertyStats = new Stats('get property');
+  static var setPropertyStats = new Stats('set property');
+  static var callMethodStats = new Stats('call method');
+  static var constructorStats = new Stats('constructor');
+
+  static var constructors = new Map<String, dynamic>();
+
+  static getProperty(o, String name) {
     try {
+      if (TRACK_STATS) getPropertyStats.track(name);
       return js.JsNative.getProperty(o, name);
     } catch (e) {
       // Re-throw any errors (returned as a string) as a DomException.
@@ -116,8 +217,51 @@
     }
   }
 
-  static callMethod(js.JsObject o, String method, List args) {
+  static propertyQuery(o, String name) {
     try {
+      if (TRACK_STATS) getPropertyStats.track('__propertyQuery__');
+      return js.JsNative.getProperty(o, name);
+    } catch (e) {
+      // Re-throw any errors (returned as a string) as a DomException.
+      throw new DomException.jsInterop(e);
+    }
+  }
+
+  static callConstructor0(String name) {
+    try {
+      if (TRACK_STATS) constructorStats.track(name);
+      var constructor = constructors.putIfAbsent(name, () => js.context[name]);
+      return js.JsNative.callConstructor0(constructor);
+    } catch (e) {
+      // Re-throw any errors (returned as a string) as a DomException.
+      throw new DomException.jsInterop(e);
+    }
+  }
+
+  static callConstructor(String name, List args) {
+    try {
+      if (TRACK_STATS) constructorStats.track(name);
+      var constructor = constructors.putIfAbsent(name, () => js.context[name]);
+      return js.JsNative.callConstructor(constructor, args);
+    } catch (e) {
+      // Re-throw any errors (returned as a string) as a DomException.
+      throw new DomException.jsInterop(e);
+    }
+  }
+
+  static setProperty(o, String name, value) {
+    try {
+      if (TRACK_STATS) setPropertyStats.track(name);
+      return js.JsNative.setProperty(o, name, value);
+    } catch (e) {
+      // Re-throw any errors (returned as a string) as a DomException.
+      throw new DomException.jsInterop(e);
+    }
+  }
+
+  static callMethod(o, String method, List args) {
+    try {
+      if (TRACK_STATS) callMethodStats.track(method);
       return js.JsNative.callMethod(o, method, args);
     } catch (e) {
       // Re-throw any errors (returned as a string) as a DomException.
@@ -137,38 +281,73 @@
 """
 
 #(interface_name)
-CONSTRUCTOR_0 = '  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "%s"), []);\n\n'
+
+#
+CONSTRUCTOR_0 = ['  constructorCallback_0_()',
+                 ' => Blink_JsNative_DomException.callConstructor0("%s");\n\n',
+                 ' native "Blink_Constructor_%s";\n\n']
 
 #(argument_count, arguments, interface_name, arguments)
-CONSTRUCTOR_ARGS = '  constructorCallback_%s_(%s) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "%s"), [%s]);\n\n'
+CONSTRUCTOR_ARGS = ['  constructorCallback_%s_(%s)',
+   ' => Blink_JsNative_DomException.callConstructor("%s", [%s]);\n\n',
+   ' native "Blink_Constructor_Args_%s" /* %s */;\n\n']
 
 #(attribute_name, attribute_name)
-ATTRIBUTE_GETTER = '  %s_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "%s");\n\n'
-ATTRIBUTE_SETTER = '  %s_Setter_(mthis, __arg_0) => mthis["%s"] = __arg_0;\n\n'
+ATTRIBUTE_GETTER = ['  %s_Getter_(mthis)',
+                    ' => Blink_JsNative_DomException.getProperty(mthis /* %s */, "%s");\n\n',
+                    ' native "Blink_Getter_%s_%s";\n\n'
+                    ]
+
+ATTRIBUTE_SETTER = ['  %s_Setter_(mthis, __arg_0)',
+                    ' => Blink_JsNative_DomException.setProperty(mthis /* %s */, "%s", __arg_0);\n\n',
+                    ' native "Blink_Setter_%s_%s";\n\n'
+                    ]
 
 #(operation_name, operationName)
-OPERATION_0 = '  %s_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "%s", []);\n\n'
+OPERATION_0 = ['  %s_Callback_0_(mthis)',
+               ' => Blink_JsNative_DomException.callMethod(mthis /* %s */, "%s", []);\n\n',
+               ' native "Blink_Operation_0_%s_%s";\n\n'
+               ]
 
 # getter, setter, deleter and propertyQuery code
-OPERATION_1 = '  $%s_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "%s", [__arg_0]);\n\n'
-OPERATION_2 = '  $%s_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "%s", [__arg_0, __arg_1]);\n\n'
-OPERATION_PQ = '  $%s_Callback_1_(mthis, __arg_0) => mthis[__arg_0];\n\n'
+OPERATION_1 = ['  $%s_Callback_1_(mthis, __arg_0)',
+               ' => Blink_JsNative_DomException.callMethod(mthis /* %s */, "%s", [__arg_0]);\n\n',
+               ' native "Blink_Operation_1_%s_%s";\n\n'
+               ]
+
+OPERATION_2 = ['  $%s_Callback_2_(mthis, __arg_0, __arg_1)',
+               ' => Blink_JsNative_DomException.callMethod(mthis /* %s */, "%s", [__arg_0, __arg_1]);\n\n',
+               ' native "Blink_Operation_2_%s_%s";\n\n']
+
+OPERATION_PQ = ['  $%s_Callback_1_(mthis, __arg_0)',
+                ' => Blink_JsNative_DomException.propertyQuery(mthis, __arg_0); /* %s */ \n\n',
+                ' native "Blink_Operation_PQ_%s";\n\n']
 
 #(operation_name, argument_count, arguments, operation_name, arguments)
 ARGUMENT_NUM = "__arg_%s"
-OPERATION_ARGS = '  %s_Callback_%s_(mthis, %s) => Blink_JsNative_DomException.callMethod(mthis, "%s", [%s]);\n\n'
+OPERATION_ARGS = ['  %s_Callback_%s_(mthis, %s)',
+                  ' => Blink_JsNative_DomException.callMethod(mthis /* %s */, "%s", [%s]);\n\n',
+                  ' native "Blink_Operation_%s_%s"; /* %s */\n\n']
+
+
 
 # get class property to make static call.
 CLASS_STATIC = 'Blink_JsNative_DomException.getProperty(js.context, "%s")'
 
 # name, classname_getproperty, name
-STATIC_ATTRIBUTE_GETTER = '  %s_Getter_() => Blink_JsNative_DomException.getProperty(%s, "%s");\n\n'
+STATIC_ATTRIBUTE_GETTER = ['  %s_Getter_()',
+                           ' => Blink_JsNative_DomException.getProperty(%s /* %s */, "%s");\n\n',
+                           ' /* %s */ native "Blink_Static_getter_%s_%s"']
 
 # name, classname_getproperty, name
-STATIC_OPERATION_0 = '  %s_Callback_0_() => Blink_JsNative_DomException.callMethod(%s, "%s", []);\n\n'
+STATIC_OPERATION_0 = ['  %s_Callback_0_()',
+                      ' => Blink_JsNative_DomException.callMethod(%s /* %s */, "%s", []);\n\n',
+                      ' /* %s */ native "Blink_Static_Operation_0_%s_%s']
 
 # name, argsCount, args, classname_getproperty, name, args
-STATIC_OPERATION_ARGS = '  %s_Callback_%s_(%s) => Blink_JsNative_DomException.callMethod(%s, "%s", [%s]);\n\n'
+STATIC_OPERATION_ARGS = ['  %s_Callback_%s_(%s)',
+                         ' => Blink_JsNative_DomException.callMethod(%s /* %s */, "%s", [%s]);\n\n',
+                         ' /* %s */ native "Blink_Static_Operations_%s_%s" /* %s */ \n\n']
 
 CLASS_DEFINITION_END = """}
 
@@ -197,6 +376,27 @@
 def rename_constructor(name):
   return constructor_renames[name] if name in constructor_renames else name
 
+
+def _Find_Match(interface_id, member, member_prefix, candidates):
+  member_name = interface_id + '.' + member
+  if member_name in candidates:
+    return member_name
+  member_name = interface_id + '.' + member_prefix + member
+  if member_name in candidates:
+    return member_name
+  member_name = interface_id + '.*'
+  if member_name in candidates:
+    return member_name
+
+def _Is_Native(interface, member):
+  return _Find_Match(interface, member, '', _js_custom_members)
+
+def Select_Stub(template, is_native):
+  if is_native:
+    return template[0] + template[2]
+  else:
+    return template[0] + template[1]
+
 def Generate_Blink(output_dir, database, type_registry):
   blink_filename = os.path.join(output_dir, '_blink_dartium.dart')
   blink_file = open(blink_filename, 'w')
@@ -226,7 +426,7 @@
       _Emit_Blink_Constructors(blink_file, analyzed_constructors)
     elif 'Constructor' in interface.ext_attrs:
       # Zero parameter constructor.
-      blink_file.write(CONSTRUCTOR_0 % rename_constructor(name))
+      blink_file.write(Select_Stub(CONSTRUCTOR_0, _Is_Native(name, 'constructor')) % rename_constructor(name))
 
     _Process_Attributes(blink_file, interface, interface.attributes)
     _Process_Operations(blink_file, interface, interface.operations)
@@ -250,27 +450,29 @@
 
   for callback_index in range(arg_min_count, arg_max_count):
     if callback_index == 0:
-      blink_file.write(CONSTRUCTOR_0 % (rename_constructor(name)))
+      blink_file.write(Select_Stub(CONSTRUCTOR_0, _Is_Native(name, 'constructor')) % (rename_constructor(name)))
     else:
       arguments = []
       for i in range(0, callback_index):
         arguments.append(ARGUMENT_NUM % i)
       argument_list = ', '.join(arguments)
-      blink_file.write(CONSTRUCTOR_ARGS % (callback_index, argument_list, rename_constructor(name), argument_list))
+      blink_file.write(
+        Select_Stub(CONSTRUCTOR_ARGS, _Is_Native(name, 'constructor')) % (callback_index, argument_list, rename_constructor(name), argument_list))
 
 def _Process_Attributes(blink_file, interface, attributes):
   # Emit an interface's attributes and operations.
   for attribute in sorted(attributes, ConstantOutputOrder):
     name = attribute.id
+    is_native = _Is_Native(interface.id, name)
     if attribute.is_read_only:
       if attribute.is_static:
         class_property = CLASS_STATIC % interface.id
-        blink_file.write(STATIC_ATTRIBUTE_GETTER % (name, class_property, name))
+        blink_file.write(Select_Stub(STATIC_ATTRIBUTE_GETTER, is_native) % (name, class_property, interface.id, name))
       else:
-        blink_file.write(ATTRIBUTE_GETTER % (name, name))
+        blink_file.write(Select_Stub(ATTRIBUTE_GETTER, is_native) % (name, interface.id, name))
     else:
-      blink_file.write(ATTRIBUTE_GETTER % (name, name))
-      blink_file.write(ATTRIBUTE_SETTER % (name, name))
+      blink_file.write(Select_Stub(ATTRIBUTE_GETTER, is_native) % (name, interface.id, name))
+      blink_file.write(Select_Stub(ATTRIBUTE_SETTER, is_native) % (name, interface.id, name))
 
 def _Process_Operations(blink_file, interface, operations):
   analyzeOperations = []
@@ -292,6 +494,7 @@
   analyzed = AnalyzeOperation(interface, analyzeOperations)
   (arg_min_count, arg_max_count) = generate_parameter_entries(analyzed.param_infos)
   name = analyzed.js_name
+  is_native = _Is_Native(interface.id, name)
 
   operation = analyzeOperations[0]
   if (name.startswith('__') and \
@@ -299,13 +502,13 @@
        'setter' in operation.specials or \
        'deleter' in operation.specials)):
     if name == '__propertyQuery__':
-      blink_file.write(OPERATION_PQ % (name))
+      blink_file.write(Select_Stub(OPERATION_PQ, is_native) % (name, interface.id))
     else:
       arg_min_count = arg_max_count
       if arg_max_count == 2:
-        blink_file.write(OPERATION_1 % (name, name))
+        blink_file.write(Select_Stub(OPERATION_1, is_native) % (name, interface.id, name))
       elif arg_max_count == 3:
-        blink_file.write(OPERATION_2 % (name, name))
+        blink_file.write(Select_Stub(OPERATION_2, is_native) % (name, interface.id, name))
       else:
         print "FATAL ERROR: _blink emitter operator %s.%s" % (interface.id, name)
         exit
@@ -316,9 +519,9 @@
     if callback_index == 0:
       if operation.is_static:
         class_property = CLASS_STATIC % interface.id
-        blink_file.write(STATIC_OPERATION_0 % (name, class_property, name))
+        blink_file.write(Select_Stub(STATIC_OPERATION_0, is_native) % (name, class_property, interface.id, name))
       else:
-        blink_file.write(OPERATION_0 % (name, name))
+        blink_file.write(Select_Stub(OPERATION_0, is_native) % (name, interface.id, name))
     else:
       arguments = []
       for i in range(0, callback_index):
@@ -326,6 +529,6 @@
       argument_list = ', '.join(arguments)
       if operation.is_static:
         class_property = CLASS_STATIC % interface.id
-        blink_file.write(STATIC_OPERATION_ARGS % (name, callback_index, argument_list, class_property, name, argument_list))
+        blink_file.write(Select_Stub(STATIC_OPERATION_ARGS, is_native) % (name, callback_index, argument_list, class_property, interface.id, name, argument_list))
       else:
-        blink_file.write(OPERATION_ARGS % (name, callback_index, argument_list, name, argument_list))
+        blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callback_index, argument_list, interface.id, name, argument_list))
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index a5488b2..90f8b34 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -543,29 +543,28 @@
         type_id = p.type_id
         # Unwrap the type to get the JsObject if Type is:
         #
-        #    - known IDL type
         #    - type_id is None then it's probably a union type or overloaded
         #      it's a dynamic/any type
         #    - type is Object
         #
-        # JsObject maybe stored in the Dart class.
         if (wrap_unwrap_type_blink(type_id, type_registry)):
           type_is_callback = self.isCallback(type_registry, type_id)
           if (dart_js_interop and type_id == 'EventListener' and
               self.name in ['addEventListener', 'removeEventListener']):
-              # Events fired need use a JsFunction not a anonymous closure to
+              # Events fired need use a JSFunction not a anonymous closure to
               # insure the event can really be removed.
-              parameters.append('unwrap_jso(js.allowInterop(%s))' % p.name)
-          elif dart_js_interop and type_id == 'FontFaceSetForEachCallback':
+              parameters.append('js.allowInterop(%s)' % p.name)
+# These commented out cases don't actually generate any code.              
+#          elif dart_js_interop and type_id == 'FontFaceSetForEachCallback':
               # forEach is supported in the DOM for FontFaceSet as it iterates
               # over the Javascript Object the callback parameters are also
               # Javascript objects and must be wrapped.
-              parameters.append('unwrap_jso((fontFace, fontFaceAgain, set) => %s(wrap_jso(fontFace), wrap_jso(fontFaceAgain), wrap_jso(set)))' % p.name)
-          elif dart_js_interop and type_id == 'HeadersForEachCallback':
+ #             parameters.append('(fontFace, fontFaceAgain, set) => %s(fontFace, fontFaceAgain, wrap_jso(set))' % p.name)
+#          elif dart_js_interop and type_id == 'HeadersForEachCallback':
               # forEach is supported in the DOM for Headers as it iterates
               # over the Javascript Object the callback parameters are also
               # Javascript objects and must be wrapped.
-              parameters.append('unwrap_jso((String value, String key, map) => %s(value, key, wrap_jso(map)))' % p.name)
+#              parameters.append('(String value, String key, map) => %s(value, key, wrap_jso(map))' % p.name)
           elif dart_js_interop and type_is_callback and not(isRemoveOperation):
             # Any remove operation that has a a callback doesn't need wrapping.
             # TODO(terry): Kind of hacky but handles all the cases we care about
@@ -579,15 +578,15 @@
                 dart_type = type_registry.DartType(callback_arg.type.id) + ' '
               callback_args_decl.append('%s%s' % (dart_type, callback_arg.id))
               if wrap_unwrap_type_blink(callback_arg.type.id, type_registry):
-                callback_args_call.append('wrap_jso(%s)' % callback_arg.id)
+                callback_args_call.append(callback_arg.id)
               else:
                 callback_args_call.append(callback_arg.id)
-            parameters.append('unwrap_jso((%s) => %s(%s))' %
+            parameters.append('(%s) => %s(%s)' %
                               (", ".join(callback_args_decl),
-                               p.name,
-                               ", ".join(callback_args_call)))
+                              p.name,
+                              ", ".join(callback_args_call)))
           else:
-            parameters.append('unwrap_jso(%s)' % p.name)
+            parameters.append(p.name)
         else:
           if dart_js_interop:
             conversion = backend._InputConversion(p.type_id, self.declared_name)
@@ -721,6 +720,9 @@
     'any set IDBObjectStore.put': _serialize_SSV,
     'any set IDBCursor.update': _serialize_SSV,
 
+    'any get SQLResultSetRowList.item' :
+      Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'),
+
     # postMessage
     'SerializedScriptValue set': _serialize_SSV,
     'any set CompositorWorkerGlobalScope.postMessage': _serialize_SSV,
@@ -1492,6 +1494,8 @@
   # Get the list type NNNN inside of List<NNNN>
   return return_type[5:-1] if isList(return_type) else return_type
 
+# TODO(jacobr): remove these obsolete methods as we don't actually
+# perform any wrapping.
 def wrap_unwrap_list_blink(return_type, type_registry):
   """Return True if the type is the list type is a blink know
      type e.g., List<Node>, List<FontFace>, etc."""
@@ -1505,14 +1509,9 @@
     unwrap_jso"""
     if return_type and return_type.startswith('Html'):
         return_type = return_type.replace('Html', 'HTML', 1)
-    return (type_registry.HasInterface(return_type) or not(return_type) or
+    return (not(return_type) or
             return_type == 'Object' or
-            return_type == 'dynamic' or
-            return_type == 'Future' or
-            return_type == 'SqlDatabase' or # renamed to Database
-            return_type == 'HTMLElement' or
-            return_type == 'MutationObserver' or
-            (return_type.endswith('[]') and return_type != 'DOMString[]'))
+            return_type == 'dynamic')
 
 def wrap_type_blink(return_type, type_registry):
     """Returns True if the type is a blink type that requires wrap_jso but
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index c944fc3..007f3f5 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -37,7 +37,7 @@
 ]
 
 class HtmlDartGenerator(object):
-  def __init__(self, interface, options, dart_use_blink):
+  def __init__(self, interface, options, dart_use_blink, logger):
     self._dart_use_blink = dart_use_blink
     self._database = options.database
     self._interface = interface
@@ -46,6 +46,7 @@
     self._renamer = options.renamer
     self._metadata = options.metadata
     self._library_name = self._renamer.GetLibraryName(self._interface)
+    _logger.setLevel(logger.level)
 
   def EmitSupportCheck(self):
     if self.HasSupportCheck():
@@ -252,7 +253,7 @@
         operation.id != '__getter__' and
         operation.id != '__setter__' and
         operation.id != '__delete__'):
-      _logger.error('Multiple type signatures for %s.%s. Please file a bug with'
+      _logger.warn('Multiple type signatures for %s.%s. Please file a bug with'
           ' the dart:html team to determine if one of these functions should be'
           ' renamed.' % (
           interface.id, operation.id))
@@ -419,7 +420,7 @@
           else:
             checks.append('(%s is %s)' % (
                 parameter_name, test_type))
-        elif i >= number_of_required_in_dart:
+        elif i >= number_of_required_in_dart and not argument.type.nullable:
           checks.append('%s != null' % parameter_name)
 
       # There can be multiple presence checks.  We need them all since a later
@@ -625,7 +626,7 @@
             (factory_params, converted_arguments) = self._ConvertArgumentTypes(
                 stmts_emitter, arguments, argument_count, constructor_info)
             args = ', '.join(converted_arguments)
-            call_template = 'wrap_jso($FACTORY_NAME($FACTORY_PARAMS))'
+            call_template = '$FACTORY_NAME($FACTORY_PARAMS)'
         else:
             qualified_name = emitter.Format(
                 '$FACTORY.$NAME',
diff --git a/tools/dom/scripts/htmleventgenerator.py b/tools/dom/scripts/htmleventgenerator.py
index 372ecca..6e83fd3 100644
--- a/tools/dom/scripts/htmleventgenerator.py
+++ b/tools/dom/scripts/htmleventgenerator.py
@@ -43,8 +43,8 @@
   '*.change': ('change', 'Event'),
   '*.click': ('click', 'MouseEvent'),
   '*.contextmenu': ('contextMenu', 'MouseEvent'),
-  '*.copy': ('copy', 'Event'),
-  '*.cut': ('cut', 'Event'),
+  '*.copy': ('copy', 'ClipboardEvent'),
+  '*.cut': ('cut', 'ClipboardEvent'),
   '*.dblclick': ('doubleClick', 'Event'),
   '*.drag': ('drag', 'MouseEvent'),
   '*.dragend': ('dragEnd', 'MouseEvent'),
@@ -79,7 +79,7 @@
   '*.mousewheel': ('mouseWheel', 'WheelEvent'),
   '*.offline': ('offline', 'Event'),
   '*.online': ('online', 'Event'),
-  '*.paste': ('paste', 'Event'),
+  '*.paste': ('paste', 'ClipboardEvent'),
   '*.pause': ('pause', 'Event'),
   '*.play': ('play', 'Event'),
   '*.playing': ('playing', 'Event'),
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index addddd9..2712916 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -380,6 +380,7 @@
   'UIEvent.layerY',
   'UIEvent.pageX',
   'UIEvent.pageY',
+  'UIEvent.which',
   'WheelEvent.initWebKitWheelEvent',
   'WheelEvent.deltaX',
   'WheelEvent.deltaY',
@@ -453,38 +454,6 @@
       '_createObjectUrlFromWebKitSource',
   'URL.createObjectURL(MediaStream stream)': 'createObjectUrlFromStream',
   'URL.createObjectURL(Blob blob)': 'createObjectUrlFromBlob',
-  'WebGLRenderingContextBase.texImage2D(unsigned long target, long level, '
-      'unsigned long internalformat, unsigned long format, unsigned long '
-      'type, ImageData pixels)': 'texImage2DImageData',
-  'WebGLRenderingContextBase.texImage2D(unsigned long target, long level, '
-      'unsigned long internalformat, unsigned long format, unsigned long '
-      'type, HTMLImageElement image)': 'texImage2DImage',
-  'WebGLRenderingContextBase.texImage2D(unsigned long target, long level, '
-      'unsigned long internalformat, unsigned long format, unsigned long '
-      'type, HTMLCanvasElement canvas)': 'texImage2DCanvas',
-  'WebGLRenderingContextBase.texImage2D(unsigned long target, long level, '
-      'unsigned long internalformat, unsigned long format, unsigned long '
-      'type, HTMLVideoElement video)': 'texImage2DVideo',
-  'WebGLRenderingContextBase.texSubImage2D(unsigned long target, long level, '
-      'long xoffset, long yoffset, unsigned long format, unsigned long type, '
-      'ImageData pixels)': 'texSubImage2DImageData',
-  'WebGLRenderingContextBase.texSubImage2D(unsigned long target, long level, '
-      'long xoffset, long yoffset, unsigned long format, unsigned long type, '
-      'HTMLImageElement image)': 'texSubImage2DImage',
-  'WebGLRenderingContextBase.texSubImage2D(unsigned long target, long level, '
-      'long xoffset, long yoffset, unsigned long format, unsigned long type, '
-      'HTMLCanvasElement canvas)': 'texSubImage2DCanvas',
-  'WebGLRenderingContextBase.texSubImage2D(unsigned long target, long level, '
-      'long xoffset, long yoffset, unsigned long format, unsigned long type, '
-      'HTMLVideoElement video)': 'texSubImage2DVideo',
-  'WebGLRenderingContextBase.bufferData(unsigned long target, '
-      'ArrayBuffer data, unsigned long usage)': 'bufferByteData',
-  'WebGLRenderingContextBase.bufferData(unsigned long target, '
-      'ArrayBufferView data, unsigned long usage)': 'bufferDataTyped',
-  'WebGLRenderingContextBase.bufferSubData(unsigned long target, '
-      'long long offset, ArrayBuffer data)': 'bufferSubByteData',
-  'WebGLRenderingContextBase.bufferSubData(unsigned long target, '
-      'long long offset, ArrayBufferView data)': 'bufferSubDataTyped',
   'WebSocket.send(ArrayBuffer data)': 'sendByteBuffer',
   'WebSocket.send(ArrayBufferView data)': 'sendTypedData',
   'WebSocket.send(DOMString data)': 'sendString',
@@ -524,10 +493,6 @@
   'CanvasRenderingContext2D.isPointInStroke',
   'CanvasRenderingContext2D.stroke',
   'Navigator.sendBeacon',
-  'WebGLRenderingContextBase.bufferData',
-  'WebGLRenderingContextBase.bufferSubData',
-  'WebGLRenderingContextBase.texImage2D',
-  'WebGLRenderingContextBase.texSubImage2D',
 ])
 
 for member in convert_to_future_members:
@@ -563,6 +528,8 @@
     'CanvasRenderingContext2D.webkitImageSmoothingEnabled',
     'CharacterData.remove',
     'ChildNode.replaceWith',
+    'CSSStyleDeclaration.__getter__',
+    'CSSStyleDeclaration.__setter__',
     'Window.call:blur',
     'Window.call:focus',
     'Window.clientInformation',
@@ -794,6 +761,9 @@
     'HTMLUListElement.compact',
     'HTMLUListElement.type',
     'IDBDatabase.transaction', # We do this in a template without the generated implementation at all.
+    'KeyboardEvent.charCode',
+    'KeyboardEvent.keyCode',
+    'KeyboardEvent.which',
     'Location.valueOf',
     'MessageEvent.data',
     'MessageEvent.ports',
@@ -828,6 +798,7 @@
     'NodeList.item',
     'ParentNode.append',
     'ParentNode.prepend',
+    'ServiceWorkerMessageEvent.data',
     'ShadowRoot.getElementsByTagNameNS',
     'SVGElement.getPresentationAttribute',
     'SVGElementInstance.on:wheel',
@@ -850,6 +821,7 @@
 # Manual dart: library name lookup.
 _library_names = monitored.Dict('htmlrenamer._library_names', {
   'ANGLEInstancedArrays': 'web_gl',
+  'CHROMIUMSubscribeUniform': 'web_gl',
   'Database': 'web_sql',
   'Navigator': 'html',
   'Window': 'html',
@@ -857,6 +829,7 @@
 
 _library_ids = monitored.Dict('htmlrenamer._library_names', {
   'ANGLEInstancedArrays': 'WebGl',
+  'CHROMIUMSubscribeUniform': 'WebGl',
   'Database': 'WebSql',
   'Navigator': 'Html',
   'Window': 'Html',
diff --git a/tools/dom/scripts/idlnode.py b/tools/dom/scripts/idlnode.py
index 2d81988..5e4d156 100755
--- a/tools/dom/scripts/idlnode.py
+++ b/tools/dom/scripts/idlnode.py
@@ -12,18 +12,33 @@
 
 new_asts = {}
 
+# Report of union types mapped to any.
+_unions_to_any = []
+
+def report_unions_to_any():
+  global _unions_to_any
+
+  warnings = []
+  for union_id in sorted(_unions_to_any):
+    warnings.append('Union type %s is mapped to \'any\'' % union_id)
+
+  return warnings
+
 # Ugly but Chrome IDLs can reference typedefs in any IDL w/o an include.  So we
 # need to remember any typedef seen then alias any reference to a typedef.
-typeDefsFixup = []
+_typeDefsFixup = []
 
-def _resolveTypedef(type):
+def _addTypedef(typedef):
+  _typeDefsFixup.append(typedef)
+
+def resolveTypedef(type):
   """ Given a type if it's a known typedef (only typedef's that aren't union)
       are remembered for fixup.  typedefs that are union type are mapped to
       any so those we don't need to alias.  typedefs referenced in the file
       where the typedef was defined are automatically aliased to the real type.
       This resolves typedef where the declaration is in another IDL file.
   """
-  for typedef in typeDefsFixup:
+  for typedef in _typeDefsFixup:
     if typedef.id == type.id:
       return typedef.type
 
@@ -364,6 +379,8 @@
 
     filename_basename = os.path.basename(filename)
 
+    # Report of union types mapped to any.
+
     self.interfaces = self._convert_all(ast, 'Interface', IDLInterface)
     self.dictionaries = self._convert_all(ast, 'Dictionary', IDLDictionary)
 
@@ -425,7 +442,7 @@
         self.dictionaries.append(dictionary)
       else:
         # All other typedefs we record
-        typeDefsFixup.append(IDLTypeDef(typedef_type))
+        _addTypedef(IDLTypeDef(typedef_type))
 
     self.enums = self._convert_all(ast, 'Enum', IDLEnum)
 
@@ -556,6 +573,8 @@
   StringType, VoidType, IntegerType, etc."""
 
   def __init__(self, ast):
+    global _unions_to_any
+
     IDLNode.__init__(self, ast)
 
     if ast:
@@ -595,7 +614,9 @@
         if isinstance(ast, IdlType) or isinstance(ast, IdlArrayOrSequenceType) or \
            isinstance(ast, IdlNullableType):
           if isinstance(ast, IdlNullableType) and ast.inner_type.is_union_type:
-            print 'WARNING type %s is union mapped to \'any\'' % self.id
+            # Report of union types mapped to any.
+            if not(self.id in _unions_to_any):
+              _unions_to_any.append(self.id)
             # TODO(terry): For union types use any otherwise type is unionType is
             #              not found and is removed during merging.
             self.id = 'any'
@@ -616,19 +637,20 @@
         else:
           # IdlUnionType
           if ast.is_union_type:
-            print 'WARNING type %s is union mapped to \'any\'' % self.id
-          # TODO(terry): For union types use any otherwise type is unionType is
-          #              not found and is removed during merging.
+            if not(self.id in _unions_to_any):
+              _unions_to_any.append(self.id)
+            # TODO(terry): For union types use any otherwise type is unionType is
+            #              not found and is removed during merging.
             self.id = 'any'
-          # TODO(terry): Any union type e.g. 'type1 or type2 or type2',
-          #                            'typedef (Type1 or Type2) UnionType'
-          # Is a problem we need to extend IDLType and IDLTypeDef to handle more
-          # than one type.
-          #
-          # Also for typedef's e.g.,
-          #                 typedef (Type1 or Type2) UnionType
-          # should consider synthesizing a new interface (e.g., UnionType) that's
-          # both Type1 and Type2.
+            # TODO(terry): Any union type e.g. 'type1 or type2 or type2',
+            #                            'typedef (Type1 or Type2) UnionType'
+            # Is a problem we need to extend IDLType and IDLTypeDef to handle more
+            # than one type.
+            #
+            # Also for typedef's e.g.,
+            #                 typedef (Type1 or Type2) UnionType
+            # should consider synthesizing a new interface (e.g., UnionType) that's
+            # both Type1 and Type2.
       if not self.id:
         print '>>>> __module__ %s' % ast.__module__
         raise SyntaxError('Could not parse type %s' % (ast))
@@ -768,7 +790,7 @@
     IDLNode.__init__(self, ast)
 
     self.type = self._convert_first(ast, 'Type', IDLType)
-    self.type = _resolveTypedef(self.type)
+    self.type = resolveTypedef(self.type)
 
     self._convert_ext_attrs(ast)
     self._convert_annotations(ast)
@@ -784,7 +806,8 @@
     IDLMember.__init__(self, ast, doc_js_interface_name)
 
     self.type = self._convert_first(ast, 'ReturnType', IDLType)
-    self.type = _resolveTypedef(self.type)
+    self.type = resolveTypedef(self.type)
+
     self.arguments = self._convert_all(ast, 'Argument', IDLArgument)
     self.specials = self._find_all(ast, 'Special')
     # Special case: there are getters of the form
@@ -862,7 +885,7 @@
         self.default_value_is_null = False
 
     self.type = self._convert_first(ast, 'Type', IDLType)
-    self.type = _resolveTypedef(self.type)
+    self.type = resolveTypedef(self.type)
 
     self.optional = self._has(ast, 'Optional')
     self._convert_ext_attrs(ast)
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 7656695..efceff6 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -586,7 +586,7 @@
         class_modifiers = ''
       else:
         # For Dartium w/ JsInterop these suppressed interfaces are needed to
-        # instanciate the internal classes when wrap_jso is called for a JS object.
+        # instanciate the internal classes.
         if (self._renamer.ShouldSuppressInterface(self._interface) and
             not(isinstance(self._backend, Dart2JSBackend)) and
             self._options.dart_js_interop):
@@ -600,21 +600,10 @@
 
     class_name = self._interface_type_info.implementation_name()
 
-    js_interop_equivalence_op = \
-      '  bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(this, other);\n' \
-      + '  int get hashCode => unwrap_jso(this).hashCode;\n'
-    # ClientRect overrides the equivalence operator.
-    if interface_name == 'ClientRect' or interface_name == 'DomRectReadOnly':
-        js_interop_equivalence_op = ''
-
     js_interop_wrapper = '''
 
   @Deprecated("Internal Use Only")
-  static {0} internalCreate{0}() {{
-    return new {0}._internalWrap();
-  }}
-
-  external factory {0}._internalWrap();
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   {0}.internal_() : super.internal_();
@@ -622,19 +611,13 @@
 '''.format(class_name)
     if base_class == 'NativeFieldWrapperClass2' or base_class == 'DartHtmlDomObject':
         js_interop_wrapper = '''
-  @Deprecated("Internal Use Only")
-  static {0} internalCreate{0}() {{
-    return new {0}._internalWrap();
-  }}
 
-  factory {0}._internalWrap() {{
-    return new {0}.internal_();
-  }}
+  @Deprecated("Internal Use Only")
+  external static Type get instanceRuntimeType;
 
   @Deprecated("Internal Use Only")
   {0}.internal_() {{ }}
-
-{1}'''.format(class_name, js_interop_equivalence_op)
+'''.format(class_name)
         # Change to use the synthesized class so we can construct with a mixin
         # classes prefixed with name of NativeFieldWrapperClass2 don't have a
         # default constructor so classes with mixins can't be new'd.
@@ -737,7 +720,7 @@
   """
 
   def __init__(self, interface, options, logging_level=logging.WARNING):
-    super(Dart2JSBackend, self).__init__(interface, options, False)
+    super(Dart2JSBackend, self).__init__(interface, options, False, _logger)
 
     self._database = options.database
     self._template_loader = options.templates
@@ -747,7 +730,6 @@
     self._interface_type_info = self._type_registry.TypeInfo(self._interface.id)
     self._current_secondary_parent = None
     self._library_name = self._renamer.GetLibraryName(self._interface)
-
     _logger.setLevel(logging_level)
 
   def ImplementsMergedMembers(self):
@@ -829,7 +811,8 @@
     ext_attrs = self._interface.ext_attrs
     has_indexed_getter = 'CustomIndexedGetter' in ext_attrs
     for operation in self._interface.operations:
-      if operation.id == 'item' and 'getter' in operation.specials:
+      if operation.id == 'item' and 'getter' in operation.specials \
+          and not self._OperationRequiresConversions(operation):
         has_indexed_getter = True
         break
     return has_indexed_getter
@@ -1285,13 +1268,9 @@
     emitters = library_emitter.Emit(
         self._template, AUXILIARY_DIR=massage_path(auxiliary_dir))
     if isinstance(emitters, tuple):
-      if self._dart_js_interop:
-        imports_emitter, map_emitter, function_emitter = emitters
-      else:
-        imports_emitter, map_emitter = emitters
-        function_emitter = None
+      imports_emitter, map_emitter = emitters
     else:
-      imports_emitter, map_emitter, function_emitter = emitters, None, None
+      imports_emitter, map_emitter = emitters, None
 
     for path in sorted(self._paths):
       relpath = os.path.relpath(path, library_file_dir)
@@ -1304,26 +1283,10 @@
       items.sort()
       for (idl_name, dart_name) in items:
         map_emitter.Emit(
-          "  '$IDL_NAME': () => $DART_NAME,\n",
+          "  '$IDL_NAME': () => $DART_NAME.instanceRuntimeType,\n",
           IDL_NAME=idl_name,
           DART_NAME=dart_name)
 
-    # Emit the $!TYPE_FUNCTION_MAP
-    if function_emitter:
-      items = self._typeMap.items()
-      items.sort()
-      for (idl_name, dart_name) in items:
-        # DOMStringMap is in the abstract list but is used as a concrete class
-        # in Dartium.
-        if not IsPureInterface(idl_name):
-          # Handle classes that are concrete (abstract can't be instantiated).
-          function_emitter.Emit(
-            "  '$IDL_NAME': () => $DART_NAME.internalCreate$DART_NAME,\n",
-            IDL_NAME=idl_name,
-            DART_NAME=dart_name)
-      if self._dart_path.endswith('html_dartium.dart'):
-        function_emitter.Emit("  'polymer-element': () => HtmlElement.internalCreateHtmlElement,\n")
-
 
 # ------------------------------------------------------------------------------
 
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index 5470993..1f5a030 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -7,12 +7,14 @@
 native binding from the IDL database."""
 
 import emitter
+import logging
 import os
 from generator import *
 from htmldartgenerator import *
 from idlnode import IDLArgument, IDLAttribute, IDLEnum, IDLMember
 from systemhtml import js_support_checks, GetCallbackInfo, HTML_LIBRARY_NAMES
 
+_logger = logging.getLogger('systemnative')
 
 # TODO(vsm): This should be recoverable from IDL, but we appear to not
 # track the necessary info.
@@ -20,6 +22,8 @@
               'password', 'pathname', 'port', 'protocol',
               'search', 'username']
 
+_promise_to_future = Conversion('convertNativePromiseToDartFuture', 'dynamic', 'Future')
+
 def array_type(data_type):
     matched = re.match(r'([\w\d_\s]+)\[\]', data_type)
     if not matched:
@@ -76,9 +80,8 @@
 class DartiumBackend(HtmlDartGenerator):
   """Generates Dart implementation for one DOM IDL interface."""
 
-  def __init__(self, interface,
-               cpp_library_emitter, options):
-    super(DartiumBackend, self).__init__(interface, options, True)
+  def __init__(self, interface, cpp_library_emitter, options, loggerParent):
+    super(DartiumBackend, self).__init__(interface, options, True, loggerParent)
 
     self._interface = interface
     self._cpp_library_emitter = cpp_library_emitter
@@ -96,6 +99,7 @@
     self._cpp_definitions_emitter = None
     self._cpp_resolver_emitter = None
     self._dart_js_interop = options.dart_js_interop
+    _logger.setLevel(loggerParent.level)
 
   def ImplementsMergedMembers(self):
     # We could not add merged functions to implementation class because
@@ -106,6 +110,16 @@
   def CustomJSMembers(self):
     return {}
 
+  def _OutputConversion(self, idl_type, member):
+    conversion = FindConversion(idl_type, 'get', self._interface.id, member)
+    # TODO(jacobr) handle promise consistently in dart2js and dartium.
+    if idl_type == 'Promise':
+      return _promise_to_future
+    if conversion:
+      if conversion.function_name in ('convertNativeToDart_DateTime', 'convertNativeToDart_ImageData'):
+        return None
+    return conversion
+
   def _InputConversion(self, idl_type, member):
     return FindConversion(idl_type, 'set', self._interface.id, member)
 
@@ -248,7 +262,7 @@
         self._members_emitter.Emit(
             '\n  @DocsEditable()\n'
             '  static $INTERFACE_NAME $FACTORY_METHOD_NAME($PARAMETERS) => '
-            'wrap_jso($TOPLEVEL_NAME($OUTPARAMETERS));\n',
+            '$TOPLEVEL_NAME($OUTPARAMETERS);\n',
             INTERFACE_NAME=self._interface_type_info.interface_name(),
             FACTORY_METHOD_NAME=factory_method_name,
             PARAMETERS=typed_formals,
@@ -270,7 +284,7 @@
         self._interface, self._interface.id, '  ')
 
     self._members_emitter.Emit(
-        '\n  $(ANNOTATIONS)factory $CTOR($PARAMS) => wrap_jso(_create($FACTORY_PARAMS));\n',
+        '\n  $(ANNOTATIONS)factory $CTOR($PARAMS) => _create($FACTORY_PARAMS);\n',
         ANNOTATIONS=annotations,
         CTOR=constructor_info._ConstructorFullName(self._DartType),
         PARAMS=constructor_info.ParametersAsDeclaration(self._DartType),
@@ -534,7 +548,7 @@
         # JsObject maybe stored in the Dart class.
         return_wrap_jso = wrap_return_type_blink(return_type, attr.type.id, self._type_registry)
     wrap_unwrap_list.append(return_wrap_jso)       # wrap_jso the returned object
-    wrap_unwrap_list.append(self._dart_use_blink)  # this must be unwrap_jso
+    wrap_unwrap_list.append(self._dart_use_blink) 
 
     # This seems to have been replaced with Custom=Getter (see above), but
     # check to be sure we don't see the old syntax
@@ -543,10 +557,13 @@
     auto_scope_setup = self._GenerateAutoSetupScope(attr.id, native_suffix)
     native_entry = \
         self.DeriveNativeEntry(attr.id, 'Getter', None)
+    output_conversion = self._OutputConversion(attr.type.id, attr.id)
+
     cpp_callback_name = self._GenerateNativeBinding(attr.id, 1,
         dart_declaration, attr.is_static, return_type, parameters,
         native_suffix, is_custom, auto_scope_setup, native_entry=native_entry,
-        wrap_unwrap_list=wrap_unwrap_list, dictionary_return=dictionary_returned)
+        wrap_unwrap_list=wrap_unwrap_list, dictionary_return=dictionary_returned,
+        output_conversion=output_conversion)
     if is_custom:
       return
 
@@ -581,9 +598,7 @@
 
     # Is the setter value a DartClass (that has a JsObject) or the type is
     # None (it's a dynamic/any type) then unwrap_jso before passing to blink.
-    parameters = ['unwrap_jso(value)' if (isinstance(type_info, InterfaceIDLTypeInfo) or
-                                          not(attr.type.id) or ptype == 'Object')
-                  else 'value']
+    parameters = ['value']
 
     dart_declaration = 'set %s(%s value)' % (html_name, ptype)
     is_custom = _IsCustom(attr) and (_IsCustomValue(attr, None) or
@@ -649,6 +664,12 @@
       self._EmitExplicitIndexedGetter(dart_element_type)
     else:
       is_custom = any((op.id == 'item' and _IsCustom(op)) for op in self._interface.operations)
+
+      output_conversion = self._OutputConversion(element_type, 'item')
+      conversion_name = ''
+      if output_conversion:
+        conversion_name = output_conversion.function_name
+
       # First emit a toplevel function to do the native call
       # Calls to this are emitted elsewhere,
       dart_native_name, resolver_string = \
@@ -661,40 +682,22 @@
                                         dart_native_name)
 
       type_info = self._TypeInfo(element_type)
-      # Does nativeIndexGetter return a DartClass (JsObject) if so wrap_jso.
-      wrap_jso_start = ''
-      wrap_jso_end = ''
-      if (isinstance(type_info, InterfaceIDLTypeInfo) or
-          wrap_type_blink(type_info.narrow_dart_type(), self._type_registry)):
-          wrap_jso_start = 'wrap_jso('
-          wrap_jso_end = ')'
       blinkNativeIndexed = """
   $TYPE operator[](int index) {
     if (index < 0 || index >= length)
       throw new RangeError.index(index, this);
-    return %s$(DART_NATIVE_NAME)(unwrap_jso(this), index)%s;
+    return _nativeIndexedGetter(index);
   }
 
-  $TYPE _nativeIndexedGetter(int index) => %s$(DART_NATIVE_NAME)(unwrap_jso(this), index)%s;
-""" % (wrap_jso_start, wrap_jso_end, wrap_jso_start, wrap_jso_end)
-      # Wrap the type to store the JsObject if Type is:
-      #
-      #    - known IDL type
-      #    - type_id is None then it's probably a union type or overloaded
-      #      it's a dynamic/any type
-      #    - type is Object
-      #
-      # JsObject maybe stored in the Dart class.
-      if isinstance(type_info, InterfaceIDLTypeInfo) or not(type_info) or dart_element_type == 'Object':
-          blinkNativeIndexedGetter = \
-              ' {0}$(DART_NATIVE_NAME)(unwrap_jso(this), index){1};\n'.format('wrap_jso(', ')')
-      else:
-          blinkNativeIndexedGetter = \
-              ' $(DART_NATIVE_NAME)(unwrap_jso(this), index);\n'
+  $TYPE _nativeIndexedGetter(int index) => $(CONVERSION_NAME)($(DART_NATIVE_NAME)(this, index));
+"""
+      blinkNativeIndexedGetter = \
+          ' $(DART_NATIVE_NAME)(this, index);\n'
       self._members_emitter.Emit(blinkNativeIndexed,
                                  DART_NATIVE_NAME=dart_qualified_name,
                                  TYPE=self.SecureOutputType(element_type),
-                                 INTERFACE=self._interface.id)
+                                 INTERFACE=self._interface.id,
+                                 CONVERSION_NAME=conversion_name)
 
     if self._HasNativeIndexSetter():
       self._EmitNativeIndexSetter(dart_element_type)
@@ -796,6 +799,8 @@
 
     operation = info.operations[0]
 
+    output_conversion = self._OutputConversion(operation.type.id, operation.id)
+
     dictionary_returned = False
     # Return type for dictionary is any (untyped).
     if operation.type.id == 'Dictionary':
@@ -819,20 +824,14 @@
     if self._dart_use_blink:
         # Wrap the type to store the JsObject if Type is:
         #
-        #    - known IDL type
-        #    - type_id is None then it's probably a union type or overloaded
         #      it's a dynamic/any type
         #    - type is Object
         #
         # JsObject maybe stored in the Dart class.
         return_wrap_jso = wrap_return_type_blink(return_type, info.type_name, self._type_registry)
         return_type_info = self._type_registry.TypeInfo(info.type_name)
-        if (isinstance(return_type_info, SequenceIDLTypeInfo) and
-            not isinstance(return_type_info._item_info, PrimitiveIDLTypeInfo)):
-                return_wrap_jso = True
     # wrap_jso the returned object
     wrap_unwrap_list.append(return_wrap_jso)
-    # The 'this' parameter must be unwrap_jso
     wrap_unwrap_list.append(self._dart_use_blink)
 
     if info.callback_args:
@@ -850,7 +849,8 @@
         native_suffix, is_custom, auto_scope_setup,
         native_entry=native_entry,
         wrap_unwrap_list=wrap_unwrap_list,
-        dictionary_return=dictionary_returned)
+        dictionary_return=dictionary_returned,
+        output_conversion=output_conversion)
       if not is_custom:
         self._GenerateOperationNativeCallback(operation, operation.arguments, cpp_callback_name, auto_scope_setup)
     else:
@@ -878,7 +878,7 @@
       base_name = '_%s_%s' % (operation.id, version)
       static = True
       if not operation.is_static:
-        actuals = ['unwrap_jso(this)' if self._dart_use_blink else 'this'] + actuals
+        actuals = ['this'] + actuals
         formals = ['mthis'] + formals
       actuals_s = ", ".join(actuals)
       formals_s = ", ".join(formals)
@@ -890,10 +890,7 @@
       overload_name = \
           self.DeriveQualifiedBlinkName(self._interface.id,
                                         overload_base_name)
-      if return_wrap_jso:
-          call_emitter.Emit('wrap_jso($NAME($ARGS))', NAME=overload_name, ARGS=actuals_s)
-      else:
-          call_emitter.Emit('$NAME($ARGS)', NAME=overload_name, ARGS=actuals_s)
+      call_emitter.Emit('$NAME($ARGS)', NAME=overload_name, ARGS=actuals_s)
       auto_scope_setup = \
         self._GenerateAutoSetupScope(base_name, native_suffix)
       cpp_callback_name = self._GenerateNativeBinding(
@@ -925,7 +922,7 @@
   def _GenerateNativeBinding(self, idl_name, argument_count, dart_declaration,
       static, return_type, parameters, native_suffix, is_custom,
       auto_scope_setup=True, emit_metadata=True, emit_to_native=False,
-      native_entry=None, wrap_unwrap_list=[], dictionary_return=False):
+      native_entry=None, wrap_unwrap_list=[], dictionary_return=False, output_conversion=None):
     metadata = []
     if emit_metadata:
       metadata = self._metadata.GetFormattedMetadata(
@@ -944,10 +941,7 @@
 
     if not static:
         formals = ", ".join(['mthis'] + parameters)
-        if wrap_unwrap_list and wrap_unwrap_list[1]:
-            actuals = ", ".join(['unwrap_jso(this)'] + parameters)
-        else:
-            actuals = ", ".join(['this'] + parameters)
+        actuals = ", ".join(['this'] + parameters)
     else:
         formals = ", ".join(parameters)
         actuals = ", ".join(parameters)
@@ -967,11 +961,17 @@
             emit_template = '''
   $METADATA$DART_DECLARATION => $DART_NAME($ACTUALS);
   '''
-            if wrap_unwrap_list and wrap_unwrap_list[0]:
+            if output_conversion and not dictionary_return:
+              conversion_template = '''
+  $METADATA$DART_DECLARATION => %s($DART_NAME($ACTUALS));
+  '''
+              emit_template = conversion_template % output_conversion.function_name
+
+            elif wrap_unwrap_list and wrap_unwrap_list[0]:
                 if return_type == 'Rectangle':
                     jso_util_method = 'make_dart_rectangle'
                 elif wrap_unwrap_list[0]:
-                    jso_util_method = 'wrap_jso'
+                    jso_util_method = ''
 
                 if dictionary_return:
                   emit_jso_template = '''
diff --git a/tools/dom/src/dart2js_KeyEvent.dart b/tools/dom/src/dart2js_KeyEvent.dart
index 5dd0c06..0324f07 100644
--- a/tools/dom/src/dart2js_KeyEvent.dart
+++ b/tools/dom/src/dart2js_KeyEvent.dart
@@ -33,22 +33,22 @@
   /** The "fixed" value of whether the alt key is being pressed. */
   bool _shadowAltKey;
 
-  /** Caculated value of what the estimated charCode is for this event. */
+  /** Calculated value of what the estimated charCode is for this event. */
   int _shadowCharCode;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int _shadowKeyCode;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int get keyCode => _shadowKeyCode;
 
-  /** Caculated value of what the estimated charCode is for this event. */
+  /** Calculated value of what the estimated charCode is for this event. */
   int get charCode => this.type == 'keypress' ? _shadowCharCode : 0;
 
-  /** Caculated value of whether the alt key is pressed is for this event. */
+  /** Calculated value of whether the alt key is pressed is for this event. */
   bool get altKey => _shadowAltKey;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int get which => keyCode;
 
   /** Accessor to the underlying keyCode value is the parent event. */
@@ -185,23 +185,22 @@
   static EventStreamProvider<KeyEvent> keyPressEvent =
       new _KeyboardEventHandler('keypress');
 
-  /** Accessor to the clipboardData available for this event. */
-  DataTransfer get clipboardData => _parent.clipboardData;
+  String get code => _parent.code;
   /** True if the ctrl key is pressed during this event. */
   bool get ctrlKey => _parent.ctrlKey;
   int get detail => _parent.detail;
+  String get key => _parent.key;
   /**
    * Accessor to the part of the keyboard that the key was pressed from (one of
    * KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT,
    * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK).
    */
   int get keyLocation => _parent.keyLocation;
-  Point get layer => _parent.layer;
   /** True if the Meta (or Mac command) key is pressed during this event. */
   bool get metaKey => _parent.metaKey;
-  Point get page => _parent.page;
   /** True if the shift key was pressed during this event. */
   bool get shiftKey => _parent.shiftKey;
+  InputDevice get sourceDevice => _parent.sourceDevice;
   Window get view => _parent.view;
   void _initUIEvent(String type, bool canBubble, bool cancelable,
       Window view, int detail) {
@@ -211,6 +210,8 @@
 
   int get _charCode => charCode;
   int get _keyCode => keyCode;
+  int get _which => which;
+
   String get _keyIdentifier {
     throw new UnsupportedError("keyIdentifier is unsupported.");
   }
@@ -220,10 +221,6 @@
     throw new UnsupportedError(
         "Cannot initialize a KeyboardEvent from a KeyEvent.");
   }
-  int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
   @Experimental() // untriaged
   bool getModifierState(String keyArgument) => throw new UnimplementedError();
   @Experimental() // untriaged
diff --git a/tools/dom/src/dart2js_WrappedEvent.dart b/tools/dom/src/dart2js_WrappedEvent.dart
index e7e21a0..3f8789f 100644
--- a/tools/dom/src/dart2js_WrappedEvent.dart
+++ b/tools/dom/src/dart2js_WrappedEvent.dart
@@ -19,8 +19,6 @@
 
   bool get cancelable => wrapped.cancelable;
 
-  DataTransfer get clipboardData => wrapped.clipboardData;
-
   EventTarget get currentTarget => wrapped.currentTarget;
 
   bool get defaultPrevented => wrapped.defaultPrevented;
diff --git a/tools/dom/src/dartium_CustomElementSupport.dart b/tools/dom/src/dartium_CustomElementSupport.dart
index e769e88..c957145 100644
--- a/tools/dom/src/dartium_CustomElementSupport.dart
+++ b/tools/dom/src/dartium_CustomElementSupport.dart
@@ -29,40 +29,11 @@
   }
 
   Element upgrade(element) {
-    var jsObject;
-    var tag;
-    var isNativeElementExtension = false;
-
-    try {
-      tag = _getCustomElementName(element);
-    } catch (e) {
-      isNativeElementExtension = element.localName == _extendsTag;
+    // Only exact type matches are supported- cannot be a subclass.
+    if (element.runtimeType != _nativeType) {
+      throw new ArgumentError('element is not subclass of $_nativeType');
     }
-
-    if (element.runtimeType == HtmlElement || element.runtimeType == TemplateElement) {
-      if (tag != _extendsTag) {
-        throw new UnsupportedError('$tag is not registered.');
-      }
-      jsObject = unwrap_jso(element);
-    } else if (element.runtimeType == js.JsObject) {
-      // It's a Polymer core element (written in JS).
-      jsObject = element;
-    } else if (isNativeElementExtension) {
-      // Extending a native element.
-      jsObject = element.blink_jsObject;
-
-      // Element to extend is the real tag.
-      tag = element.localName;
-    } else if (tag != null && element.localName != tag) {
-      throw new UnsupportedError('Element is incorrect type. Got ${element.runtimeType}, expected native Html or Svg element to extend.');
-    } else if (tag == null) {
-      throw new UnsupportedError('Element is incorrect type. Got ${element.runtimeType}, expected HtmlElement/JsObject.');
-    }
-
-    // Remember Dart class to tagName for any upgrading done in wrap_jso.
-    addCustomElementType(tag, _type, _extendsTag);
-
-    return _createCustomUpgrader(_type, jsObject);
+    return _createCustomUpgrader(_type, element);
   }
 }
 
diff --git a/tools/dom/src/dartium_KeyEvent.dart b/tools/dom/src/dartium_KeyEvent.dart
index 327ddf0..b0a494a 100644
--- a/tools/dom/src/dartium_KeyEvent.dart
+++ b/tools/dom/src/dartium_KeyEvent.dart
@@ -30,35 +30,29 @@
 @Experimental()
 class KeyEvent extends _WrappedEvent implements KeyboardEvent {
   /** Needed because KeyboardEvent is implements.
-   *  TODO(terry): Consider making blink_jsObject private (add underscore) for
-   *               all blink_jsObject.  Then needed private wrap/unwrap_jso
-   *               functions that delegate to a public wrap/unwrap_jso.
    */
-  @Deprecated("Internal Use Only")
-  js.JsObject blink_jsObject;
-
   /** The parent KeyboardEvent that this KeyEvent is wrapping and "fixing". */
   KeyboardEvent _parent;
 
   /** The "fixed" value of whether the alt key is being pressed. */
   bool _shadowAltKey;
 
-  /** Caculated value of what the estimated charCode is for this event. */
+  /** Calculated value of what the estimated charCode is for this event. */
   int _shadowCharCode;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int _shadowKeyCode;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int get keyCode => _shadowKeyCode;
 
-  /** Caculated value of what the estimated charCode is for this event. */
+  /** Calculated value of what the estimated charCode is for this event. */
   int get charCode => this.type == 'keypress' ? _shadowCharCode : 0;
 
-  /** Caculated value of whether the alt key is pressed is for this event. */
+  /** Calculated value of whether the alt key is pressed is for this event. */
   bool get altKey => _shadowAltKey;
 
-  /** Caculated value of what the estimated keyCode is for this event. */
+  /** Calculated value of what the estimated keyCode is for this event. */
   int get which => keyCode;
 
   /** Accessor to the underlying keyCode value is the parent event. */
@@ -113,8 +107,6 @@
   /** The currently registered target for this event. */
   EventTarget get currentTarget => _currentTarget;
 
-  /** Accessor to the clipboardData available for this event. */
-  DataTransfer get clipboardData => _parent.clipboardData;
   /** True if the ctrl key is pressed during this event. */
   bool get ctrlKey => _parent.ctrlKey;
   int get detail => _parent.detail;
@@ -124,10 +116,8 @@
    * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK).
    */
   int get keyLocation => _parent.keyLocation;
-  Point get layer => _parent.layer;
   /** True if the Meta (or Mac command) key is pressed during this event. */
   bool get metaKey => _parent.metaKey;
-  Point get page => _parent.page;
   /** True if the shift key was pressed during this event. */
   bool get shiftKey => _parent.shiftKey;
   Window get view => _parent.view;
@@ -139,6 +129,7 @@
 
   int get _charCode => charCode;
   int get _keyCode => keyCode;
+  int get _which => which;
   String get _keyIdentifier {
     throw new UnsupportedError("keyIdentifier is unsupported.");
   }
@@ -148,10 +139,6 @@
     throw new UnsupportedError(
         "Cannot initialize a KeyboardEvent from a KeyEvent.");
   }
-  int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
-  int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
   @Experimental() // untriaged
   bool getModifierState(String keyArgument) => throw new UnimplementedError();
   @Experimental() // untriaged
diff --git a/tools/dom/src/dartium_WrappedEvent.dart b/tools/dom/src/dartium_WrappedEvent.dart
index 18c43f0..a4e0ace 100644
--- a/tools/dom/src/dartium_WrappedEvent.dart
+++ b/tools/dom/src/dartium_WrappedEvent.dart
@@ -6,15 +6,14 @@
 
 /**
  * Helper class to implement custom events which wrap DOM events.
+ * TODO(jacobr): consider using dart JsNative.$setInstanceInterceptor
+ * instead of using wrappers as that would allow passing these wrappers
+ * back through dispatchEvent unlike the current implementation.
+ * See https://github.com/dart-lang/sdk/issues/16869
  */
 class _WrappedEvent implements Event {
   /** Needed because KeyboardEvent is implements.
-   *  TODO(terry): Consider making blink_jsObject private (add underscore) for
-   *               all blink_jsObject.  Then needed private wrap/unwrap_jso
-   *               functions that delegate to a public wrap/unwrap_jso.
    */
-  js.JsObject blink_jsObject;
-
   final Event wrapped;
 
   /** The CSS selector involved with event delegation. */
@@ -26,8 +25,6 @@
 
   bool get cancelable => wrapped.cancelable;
 
-  DataTransfer get clipboardData => wrapped.clipboardData;
-
   EventTarget get currentTarget => wrapped.currentTarget;
 
   bool get defaultPrevented => wrapped.defaultPrevented;
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
index 2aad83f..faa1ec0 100644
--- a/tools/dom/src/native_DOMImplementation.dart
+++ b/tools/dom/src/native_DOMImplementation.dart
@@ -5,12 +5,12 @@
 part of html;
 
 class _Property {
-  _Property(this.name) :
-      _hasValue = false,
-      writable = false,
-      isMethod = false,
-      isOwn = true,
-      wasThrown = false;
+  _Property(this.name)
+      : _hasValue = false,
+        writable = false,
+        isMethod = false,
+        isOwn = true,
+        wasThrown = false;
 
   bool get hasValue => _hasValue;
   get value => _value;
@@ -30,6 +30,203 @@
   bool wasThrown;
 }
 
+/**
+ * Manager for navigating between libraries from the devtools console.
+ */
+class _LibraryManager {
+  /**
+   * Current active library
+   */
+  static var _currentLibrary;
+  static var _validCache = false;
+
+  static List<Uri> _libraryUris;
+
+  // List of all maps to check to determine if there is an exact match.
+  static Map<String, List<Uri>> _fastPaths;
+
+  static void _addFastPath(String key, Uri uri) {
+    _fastPaths.putIfAbsent(key, () => <Uri>[]).add(uri);
+  }
+
+  static cache() {
+    if (_validCache) return;
+    _validCache = true;
+    _libraryUris = <Uri>[];
+    _fastPaths = new Map<String, List<Uri>>();
+    var system = currentMirrorSystem();
+    system.libraries.forEach((uri, library) {
+      _libraryUris.add(uri);
+      _addFastPath(uri.toString(), uri);
+      _addFastPath(MirrorSystem.getName(library.simpleName), uri);
+    });
+  }
+
+  static String get currentLibrary {
+    if (_currentLibrary == null) {
+      _currentLibrary =
+          currentMirrorSystem().isolate.rootLibrary.uri.toString();
+    }
+    return _currentLibrary;
+  }
+
+  /**
+   * Find libraries matching a given name.
+   *
+   * Uses heuristics to only return a single match when the user intent is
+   * generally unambiguous.
+   */
+  static List<Uri> findMatches(String name) {
+    cache();
+    var nameAsFile = name.endsWith('.dart') ? name : '${name}.dart';
+    // Perfect match first.
+    var fastPatchMatches = _fastPaths[name];
+    if (fastPatchMatches != null) {
+      return fastPatchMatches.toList();
+    }
+
+    // Exact match for file path.
+    var matches = new LinkedHashSet<Uri>();
+    for (var uri in _libraryUris) {
+      if (uri.path == name || uri.path == nameAsFile) matches.add(uri);
+    }
+    if (matches.isNotEmpty) return matches.toList();
+
+    // Exact match for file name.
+    if (name != nameAsFile) {
+      for (var uri in _libraryUris) {
+        if (uri.pathSegments.isNotEmpty &&
+            (uri.pathSegments.last == nameAsFile)) {
+          matches.add(uri);
+        }
+      }
+      if (matches.isNotEmpty) return matches.toList();
+    }
+
+    for (var uri in _libraryUris) {
+      if (uri.pathSegments.isNotEmpty && (uri.pathSegments.last == name)) {
+        matches.add(uri);
+      }
+    }
+    if (matches.isNotEmpty) return matches.toList();
+
+    // Partial match on path.
+    for (var uri in _libraryUris) {
+      if (uri.path.contains(name)) {
+        matches.add(uri);
+      }
+    }
+    if (matches.isNotEmpty) return matches.toList();
+
+    // Partial match on entire uri.
+    for (var uri in _libraryUris) {
+      if (uri.toString().contains(name)) {
+        matches.add(uri);
+      }
+    }
+
+    if (matches.isNotEmpty) return matches.toList();
+
+    // Partial match on entire uri ignoring case.
+    name = name.toLowerCase();
+    for (var uri in _libraryUris) {
+      if (uri.toString().toLowerCase().contains(name)) {
+        matches.add(uri);
+      }
+    }
+    return matches.toList();
+  }
+
+  static setLibrary([String name]) {
+    // Bust cache in case library list has changed. Ideally we would listen for
+    // when libraries are loaded and invalidate based on that.
+    _validCache = false;
+    cache();
+    if (name == null) {
+      window.console
+        ..group("Current library: $_currentLibrary")
+        ..groupCollapsed("All libraries:");
+      _listLibraries();
+      window.console..groupEnd()..groupEnd();
+      return;
+    }
+    var matches = findMatches(name);
+    if (matches.length != 1) {
+      if (matches.length > 1) {
+        window.console.warn("Ambiguous library name: $name");
+      }
+      showMatches(name, matches);
+      return;
+    }
+    _currentLibrary = matches.first.toString();
+    window.console.log("Set library to $_currentLibrary");
+  }
+
+  static getLibrary() {
+    return currentLibrary;
+  }
+
+  static List<Uri> _sortUris(Iterable<Uri> uris) {
+    return (uris.toList())
+      ..sort((Uri a, Uri b) {
+        if (a.scheme != b.scheme) {
+          if (a.scheme == 'dart') return -1;
+          if (b.scheme == 'dart') return 1;
+          return a.scheme.compareTo(b.scheme);
+        }
+        return a.toString().compareTo(b.toString());
+      });
+  }
+
+  static void listLibraries() {
+    _validCache = false;
+    cache();
+    _listLibraries();
+  }
+
+  static void _listLibraries() {
+    window.console.log(_sortUris(_libraryUris).join("\n"));
+  }
+
+  // Workaround to allow calling console.log with an arbitrary number of
+  // arguments.
+  static void _log(List<String> args) {
+    js.JsNative.callMethod(window.console, 'log', args);
+  }
+
+  static showMatches(String key, Iterable<Uri> uris) {
+    var boldPairs = [];
+    var sb = new StringBuffer();
+    if (uris.isEmpty) {
+      window.console.group("All libraries:");
+      _listLibraries();
+      window.console
+        ..groupEnd()
+        ..error("No library names or URIs match '$key'");
+      return;
+    }
+    sb.write("${uris.length} matches\n");
+    var lowerCaseKey = key.toLowerCase();
+    for (var uri in uris) {
+      var txt = uri.toString();
+      int index = txt.toLowerCase().indexOf(lowerCaseKey);
+      if (index != -1) {
+        // %c enables styling console log messages with css
+        // specified at the end of the console.
+        sb..write(txt.substring(0, index))..write('%c');
+        var matchEnd = index + key.length;
+        sb
+          ..write(txt.substring(index, matchEnd))
+          ..write('%c')
+          ..write(txt.substring(matchEnd))
+          ..write('\n');
+        boldPairs..add('font-weight: bold')..add('font-weight: normal');
+      }
+    }
+    _log([sb.toString()]..addAll(boldPairs));
+  }
+}
+
 class _ConsoleVariables {
   Map<String, Object> _data = new Map<String, Object>();
 
@@ -75,15 +272,15 @@
 }
 
 class _MethodTrampoline extends _Trampoline {
-  _MethodTrampoline(ObjectMirror receiver, MethodMirror methodMirror,
-      Symbol selector) :
-      super(receiver, methodMirror, selector);
+  _MethodTrampoline(
+      ObjectMirror receiver, MethodMirror methodMirror, Symbol selector)
+      : super(receiver, methodMirror, selector);
 
   noSuchMethod(Invocation msg) {
     if (msg.memberName != #call) return super.noSuchMethod(msg);
-    return _receiver.invoke(_selector,
-                            msg.positionalArguments,
-                            msg.namedArguments).reflectee;
+    return _receiver
+        .invoke(_selector, msg.positionalArguments, msg.namedArguments)
+        .reflectee;
   }
 }
 
@@ -91,9 +288,9 @@
  * Invocation trampoline class used to closurize getters.
  */
 class _GetterTrampoline extends _Trampoline {
-  _GetterTrampoline(ObjectMirror receiver, MethodMirror methodMirror,
-      Symbol selector) :
-      super(receiver, methodMirror, selector);
+  _GetterTrampoline(
+      ObjectMirror receiver, MethodMirror methodMirror, Symbol selector)
+      : super(receiver, methodMirror, selector);
 
   call() => _receiver.getField(_selector).reflectee;
 }
@@ -102,9 +299,9 @@
  * Invocation trampoline class used to closurize setters.
  */
 class _SetterTrampoline extends _Trampoline {
-  _SetterTrampoline(ObjectMirror receiver, MethodMirror methodMirror,
-      Symbol selector) :
-      super(receiver, methodMirror, selector);
+  _SetterTrampoline(
+      ObjectMirror receiver, MethodMirror methodMirror, Symbol selector)
+      : super(receiver, methodMirror, selector);
 
   call(value) {
     _receiver.setField(_selector, value);
@@ -117,15 +314,13 @@
   static DateTime doubleToDateTime(double dateTime) {
     try {
       return new DateTime.fromMillisecondsSinceEpoch(dateTime.toInt());
-    } catch(_) {
+    } catch (_) {
       // TODO(antonnm): treat exceptions properly in bindings and
       // find out how to treat NaNs.
       return null;
     }
   }
 
-  static maybeUnwrapJso(obj) => unwrap_jso(obj);
-
   static List convertToList(List list) {
     // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it.
     final length = list.length;
@@ -164,7 +359,10 @@
 
   static Map createMap() => {};
 
-  static parseJson(String jsonSource) => const JsonDecoder().convert(jsonSource);
+  static parseJson(String jsonSource) =>
+      const JsonDecoder().convert(jsonSource);
+
+  static String getLibraryUrl() => _LibraryManager.currentLibrary;
 
   static makeUnimplementedError(String fileName, int lineNo) {
     return new UnsupportedError('[info: $fileName:$lineNo]');
@@ -189,15 +387,15 @@
     return element;
   }
 
-  static window() => wrap_jso(js.context['window']);
-
-  static forwardingPrint(String message) => _blink.Blink_Utils.forwardingPrint(message);
+  static forwardingPrint(String message) =>
+      _blink.Blink_Utils.forwardingPrint(message);
   static void spawnDomHelper(Function f, int replyTo) =>
       _blink.Blink_Utils.spawnDomHelper(f, replyTo);
 
   // TODO(vsm): Make this API compatible with spawnUri.  It should also
   // return a Future<Isolate>.
-  static spawnDomUri(String uri) => wrap_jso(_blink.Blink_Utils.spawnDomUri(uri));
+  // TODO(jacobr): IS THIS RIGHT? I worry we have broken conversion from Promise to Future.
+  static spawnDomUri(String uri) => _blink.Blink_Utils.spawnDomUri(uri);
 
   // The following methods were added for debugger integration to make working
   // with the Dart C mirrors API simpler.
@@ -223,8 +421,8 @@
    */
   static Map<String, dynamic> createLocalVariablesMap(List localVariables) {
     var map = {};
-    for (int i = 0; i < localVariables.length; i+=2) {
-      map[stripMemberName(localVariables[i])] = localVariables[i+1];
+    for (int i = 0; i < localVariables.length; i += 2) {
+      map[stripMemberName(localVariables[i])] = localVariables[i + 1];
     }
     return map;
   }
@@ -253,8 +451,8 @@
    * [_consoleTempVariables, 40, 2, someValue, someOtherValue]]
    * </code>
    */
-  static List wrapExpressionAsClosure(String expression, List locals,
-      bool includeCommandLineAPI) {
+  static List wrapExpressionAsClosure(
+      String expression, List locals, bool includeCommandLineAPI) {
     var args = {};
     var sb = new StringBuffer("(");
     addArg(arg, value) {
@@ -289,26 +487,24 @@
       final _SET_VARIABLE = new RegExp("^(\\s*)(\\w+)(\\s*=)");
       // Match trailing semicolons.
       final _ENDING_SEMICOLONS = new RegExp("(;\\s*)*\$");
-      expression = expression.replaceAllMapped(_VARIABLE_DECLARATION,
-          (match) {
-            var variableName = match[2];
-            // Set the console variable if it isn't already set.
-            if (!_consoleTempVariables._data.containsKey(variableName)) {
-              _consoleTempVariables._data[variableName] = null;
-            }
-            return "${match[1]}\$consoleVariables.${variableName}";
-          });
+      expression = expression.replaceAllMapped(_VARIABLE_DECLARATION, (match) {
+        var variableName = match[2];
+        // Set the console variable if it isn't already set.
+        if (!_consoleTempVariables._data.containsKey(variableName)) {
+          _consoleTempVariables._data[variableName] = null;
+        }
+        return "${match[1]}\$consoleVariables.${variableName}";
+      });
 
-      expression = expression.replaceAllMapped(_SET_VARIABLE,
-          (match) {
-            var variableName = match[2];
-            // Only rewrite if the name matches an existing console variable.
-            if (_consoleTempVariables._data.containsKey(variableName)) {
-              return "${match[1]}\$consoleVariables.${variableName}${match[3]}";
-            } else {
-              return match[0];
-            }
-          });
+      expression = expression.replaceAllMapped(_SET_VARIABLE, (match) {
+        var variableName = match[2];
+        // Only rewrite if the name matches an existing console variable.
+        if (_consoleTempVariables._data.containsKey(variableName)) {
+          return "${match[1]}\$consoleVariables.${variableName}${match[3]}";
+        } else {
+          return match[0];
+        }
+      });
 
       // We only allow dart expressions not Dart statements. Silently remove
       // trailing semicolons the user might have added by accident to reduce the
@@ -317,8 +513,8 @@
     }
 
     if (locals != null) {
-      for (int i = 0; i < locals.length; i+= 2) {
-        addArg(locals[i], locals[i+1]);
+      for (int i = 0; i < locals.length; i += 2) {
+        addArg(locals[i], locals[i + 1]);
       }
     }
     // Inject all the already defined console variables.
@@ -333,12 +529,12 @@
     return [sb.toString(), args.values.toList(growable: false)];
   }
 
-  static String _getShortSymbolName(Symbol symbol,
-                                    DeclarationMirror declaration) {
+  static String _getShortSymbolName(
+      Symbol symbol, DeclarationMirror declaration) {
     var name = MirrorSystem.getName(symbol);
     if (declaration is MethodMirror) {
-      if (declaration.isSetter && name[name.length-1] == "=") {
-        return name.substring(0, name.length-1);
+      if (declaration.isSetter && name[name.length - 1] == "=") {
+        return name.substring(0, name.length - 1);
       }
       if (declaration.isConstructor) {
         return name.substring(name.indexOf('.') + 1);
@@ -348,6 +544,38 @@
   }
 
   /**
+   * Handle special console commands such as $lib and $libs that should not be
+   * evaluated as Dart expressions and instead should be interpreted directly.
+   * Commands supported:
+   * library <-- shows the current library and lists all libraries.
+   * library "library_uri" <-- select a specific library
+   * library "library_uri_fragment"
+   */
+  static bool maybeHandleSpecialConsoleCommand(String expression) {
+    expression = expression.trim();
+    var setLibraryCommand = r'library ';
+    if (expression == r'library') {
+      _LibraryManager.setLibrary();
+      return true;
+    }
+    if (expression.startsWith(setLibraryCommand)) {
+      expression = expression.substring(setLibraryCommand.length);
+      if (expression.length >= 2) {
+        String start = expression[0];
+        String end = expression[expression.length - 1];
+        // TODO(jacobr): maybe we should require quotes.
+        if ((start == "'" && end == "'") || (start == '"' && end == '"')) {
+          expression = expression.substring(1, expression.length - 1);
+        }
+      }
+
+      _LibraryManager.setLibrary(expression);
+      return true;
+    }
+    return false;
+  }
+
+  /**
    * Returns a list of completions to use if the receiver is o.
    */
   static List<String> getCompletions(o) {
@@ -357,19 +585,17 @@
       map.forEach((symbol, mirror) {
         if (mirror.isStatic == isStatic && !mirror.isPrivate) {
           var name = MirrorSystem.getName(symbol);
-          if (mirror is MethodMirror && mirror.isSetter)
-            name = name.substring(0, name.length - 1);
+          if (mirror is MethodMirror && mirror.isSetter) name =
+              name.substring(0, name.length - 1);
           completions.add(name);
         }
       });
     }
 
     addForClass(ClassMirror mirror, bool isStatic) {
-      if (mirror == null)
-        return;
+      if (mirror == null) return;
       addAll(mirror.declarations, isStatic);
-      if (mirror.superclass != null)
-        addForClass(mirror.superclass, isStatic);
+      if (mirror.superclass != null) addForClass(mirror.superclass, isStatic);
       for (var interface in mirror.superinterfaces) {
         addForClass(interface, isStatic);
       }
@@ -387,8 +613,8 @@
    * Adds all candidate String completitions from [declarations] to [output]
    * filtering based on [staticContext] and [includePrivate].
    */
-  static void _getCompletionsHelper(ClassMirror classMirror,
-      bool staticContext, LibraryMirror libraryMirror, Set<String> output) {
+  static void _getCompletionsHelper(ClassMirror classMirror, bool staticContext,
+      LibraryMirror libraryMirror, Set<String> output) {
     bool includePrivate = libraryMirror == classMirror.owner;
     classMirror.declarations.forEach((symbol, declaration) {
       if (!includePrivate && declaration.isPrivate) return;
@@ -411,12 +637,11 @@
 
     if (!staticContext) {
       for (var interface in classMirror.superinterfaces) {
-        _getCompletionsHelper(interface, staticContext,
-            libraryMirror, output);
+        _getCompletionsHelper(interface, staticContext, libraryMirror, output);
       }
       if (classMirror.superclass != null) {
-        _getCompletionsHelper(classMirror.superclass, staticContext,
-            libraryMirror, output);
+        _getCompletionsHelper(
+            classMirror.superclass, staticContext, libraryMirror, output);
       }
     }
   }
@@ -483,13 +708,13 @@
   }
 
   static final SIDE_EFFECT_FREE_LIBRARIES = new Set<String>()
-      ..add('dart:html')
-      ..add('dart:indexed_db')
-      ..add('dart:svg')
-      ..add('dart:typed_data')
-      ..add('dart:web_audio')
-      ..add('dart:web_gl')
-      ..add('dart:web_sql');
+    ..add('dart:html')
+    ..add('dart:indexed_db')
+    ..add('dart:svg')
+    ..add('dart:typed_data')
+    ..add('dart:web_audio')
+    ..add('dart:web_gl')
+    ..add('dart:web_sql');
 
   static LibraryMirror _getLibrary(MethodMirror methodMirror) {
     var owner = methodMirror.owner;
@@ -508,8 +733,8 @@
    * In the future we should consider adding an annotation to tag getters
    * in user libraries as side effect free.
    */
-  static bool _isSideEffectFreeGetter(MethodMirror methodMirror,
-      LibraryMirror libraryMirror) {
+  static bool _isSideEffectFreeGetter(
+      MethodMirror methodMirror, LibraryMirror libraryMirror) {
     // This matches JavaScript behavior. We should consider displaying
     // getters for all dart platform libraries rather than just the DOM
     // libraries.
@@ -521,11 +746,11 @@
    * Whether we should treat a property as a field for the purposes of the
    * debugger.
    */
-  static bool treatPropertyAsField(MethodMirror methodMirror,
-      LibraryMirror libraryMirror) {
+  static bool treatPropertyAsField(
+      MethodMirror methodMirror, LibraryMirror libraryMirror) {
     return (methodMirror.isGetter || methodMirror.isSetter) &&
-          (methodMirror.isSynthetic ||
-              _isSideEffectFreeGetter(methodMirror,libraryMirror));
+        (methodMirror.isSynthetic ||
+            _isSideEffectFreeGetter(methodMirror, libraryMirror));
   }
 
   // TODO(jacobr): generate more concise function descriptions instead of
@@ -542,27 +767,36 @@
 
   static List getInvocationTrampolineDetails(_Trampoline method) {
     var loc = method._methodMirror.location;
-    return [loc.line, loc.column, loc.sourceUri.toString(),
-        MirrorSystem.getName(method._selector)];
+    return [
+      loc.line,
+      loc.column,
+      loc.sourceUri.toString(),
+      MirrorSystem.getName(method._selector)
+    ];
   }
 
-  static List getLibraryProperties(String libraryUrl, bool ownProperties,
-      bool accessorPropertiesOnly) {
+  static List getLibraryProperties(
+      String libraryUrl, bool ownProperties, bool accessorPropertiesOnly) {
     var properties = new Map<String, _Property>();
     var libraryMirror = getLibraryMirror(libraryUrl);
-    _addInstanceMirrors(libraryMirror, libraryMirror,
+    _addInstanceMirrors(
+        libraryMirror,
+        libraryMirror,
         libraryMirror.declarations,
-        ownProperties, accessorPropertiesOnly, false, false,
+        ownProperties,
+        accessorPropertiesOnly,
+        false,
+        false,
         properties);
     if (!accessorPropertiesOnly) {
       // We need to add class properties for all classes in the library.
       libraryMirror.declarations.forEach((symbol, declarationMirror) {
         if (declarationMirror is ClassMirror) {
           var name = MirrorSystem.getName(symbol);
-          if (declarationMirror.hasReflectedType
-              && !properties.containsKey(name)) {
+          if (declarationMirror.hasReflectedType &&
+              !properties.containsKey(name)) {
             properties[name] = new _Property(name)
-                ..value = declarationMirror.reflectedType;
+              ..value = declarationMirror.reflectedType;
           }
         }
       });
@@ -570,34 +804,44 @@
     return packageProperties(properties);
   }
 
-  static List getObjectProperties(o, bool ownProperties,
-      bool accessorPropertiesOnly) {
+  static List getObjectProperties(
+      o, bool ownProperties, bool accessorPropertiesOnly) {
     var properties = new Map<String, _Property>();
     var names = new Set<String>();
     var objectMirror = reflect(o);
     var classMirror = objectMirror.type;
-    _addInstanceMirrors(objectMirror, classMirror.owner,
+    _addInstanceMirrors(
+        objectMirror,
+        classMirror.owner,
         classMirror.instanceMembers,
-        ownProperties, accessorPropertiesOnly, false, true,
+        ownProperties,
+        accessorPropertiesOnly,
+        false,
+        true,
         properties);
     return packageProperties(properties);
   }
 
-  static List getObjectClassProperties(o, bool ownProperties,
-      bool accessorPropertiesOnly) {
+  static List getObjectClassProperties(
+      o, bool ownProperties, bool accessorPropertiesOnly) {
     var properties = new Map<String, _Property>();
     var objectMirror = reflect(o);
     var classMirror = objectMirror.type;
-    _addInstanceMirrors(objectMirror, classMirror.owner,
+    _addInstanceMirrors(
+        objectMirror,
+        classMirror.owner,
         classMirror.instanceMembers,
-        ownProperties, accessorPropertiesOnly, true, false,
+        ownProperties,
+        accessorPropertiesOnly,
+        true,
+        false,
         properties);
     _addStatics(classMirror, properties, accessorPropertiesOnly);
     return packageProperties(properties);
   }
 
-  static List getClassProperties(Type t, bool ownProperties,
-      bool accessorPropertiesOnly) {
+  static List getClassProperties(
+      Type t, bool ownProperties, bool accessorPropertiesOnly) {
     var properties = new Map<String, _Property>();
     var classMirror = reflectClass(t);
     _addStatics(classMirror, properties, accessorPropertiesOnly);
@@ -605,8 +849,7 @@
   }
 
   static void _addStatics(ClassMirror classMirror,
-                          Map<String, _Property> properties,
-                          bool accessorPropertiesOnly) {
+      Map<String, _Property> properties, bool accessorPropertiesOnly) {
     var libraryMirror = classMirror.owner;
     classMirror.declarations.forEach((symbol, declaration) {
       var name = _getShortSymbolName(symbol, declaration);
@@ -615,8 +858,8 @@
         if (accessorPropertiesOnly) return;
         if (!declaration.isStatic) return;
         properties.putIfAbsent(name, () => new _Property(name))
-            ..value = classMirror.getField(symbol).reflectee
-            ..writable = !declaration.isFinal && !declaration.isConst;
+          ..value = classMirror.getField(symbol).reflectee
+          ..writable = !declaration.isFinal && !declaration.isConst;
       } else if (declaration is MethodMirror) {
         MethodMirror methodMirror = declaration;
         // FIXMEDART: should we display constructors?
@@ -638,31 +881,35 @@
     });
   }
 
-  static void _fillMethodMirrorProperty(LibraryMirror libraryMirror,
-        methodOwner, MethodMirror methodMirror, Symbol symbol,
-        bool accessorPropertiesOnly, _Property property) {
+  static void _fillMethodMirrorProperty(
+      LibraryMirror libraryMirror,
+      methodOwner,
+      MethodMirror methodMirror,
+      Symbol symbol,
+      bool accessorPropertiesOnly,
+      _Property property) {
     if (methodMirror.isRegularMethod) {
       property
-          ..value = new _MethodTrampoline(methodOwner, methodMirror, symbol)
-          ..isMethod = true;
+        ..value = new _MethodTrampoline(methodOwner, methodMirror, symbol)
+        ..isMethod = true;
     } else if (methodMirror.isGetter) {
       if (treatPropertyAsField(methodMirror, libraryMirror)) {
         try {
           property.value = methodOwner.getField(symbol).reflectee;
         } catch (e) {
           property
-              ..wasThrown = true
-              ..value = e;
+            ..wasThrown = true
+            ..value = e;
         }
       } else if (accessorPropertiesOnly) {
-        property.getter = new _GetterTrampoline(methodOwner,
-            methodMirror, symbol);
+        property.getter =
+            new _GetterTrampoline(methodOwner, methodMirror, symbol);
       }
     } else if (methodMirror.isSetter) {
       if (accessorPropertiesOnly &&
           !treatPropertyAsField(methodMirror, libraryMirror)) {
-        property.setter = new _SetterTrampoline(methodOwner,
-            methodMirror, MirrorSystem.getSymbol(property.name, libraryMirror));
+        property.setter = new _SetterTrampoline(methodOwner, methodMirror,
+            MirrorSystem.getSymbol(property.name, libraryMirror));
       }
       property.writable = true;
     }
@@ -682,8 +929,10 @@
       ObjectMirror objectMirror,
       LibraryMirror libraryMirror,
       Map<Symbol, Mirror> declarations,
-      bool ownProperties, bool accessorPropertiesOnly,
-      bool hideFields, bool hideMethods,
+      bool ownProperties,
+      bool accessorPropertiesOnly,
+      bool hideFields,
+      bool hideMethods,
       Map<String, _Property> properties) {
     declarations.forEach((symbol, declaration) {
       if (declaration is TypedefMirror || declaration is ClassMirror) return;
@@ -694,7 +943,8 @@
               treatPropertyAsField(declaration, libraryMirror));
       if ((isField && hideFields) || (hideMethods && !isField)) return;
       if (accessorPropertiesOnly) {
-        if (declaration is VariableMirror || declaration.isRegularMethod ||
+        if (declaration is VariableMirror ||
+            declaration.isRegularMethod ||
             isField) {
           return;
         }
@@ -706,8 +956,8 @@
       var property = properties.putIfAbsent(name, () => new _Property(name));
       if (declaration is VariableMirror) {
         property
-            ..value = objectMirror.getField(symbol).reflectee
-            ..writable = !declaration.isFinal && !declaration.isConst;
+          ..value = objectMirror.getField(symbol).reflectee
+          ..writable = !declaration.isFinal && !declaration.isConst;
         return;
       }
       _fillMethodMirrorProperty(libraryMirror, objectMirror, declaration,
@@ -722,15 +972,17 @@
   static List packageProperties(Map<String, _Property> properties) {
     var ret = [];
     for (var property in properties.values) {
-      ret.addAll([property.name,
-                  property.setter,
-                  property.getter,
-                  property.value,
-                  property.hasValue,
-                  property.writable,
-                  property.isMethod,
-                  property.isOwn,
-                  property.wasThrown]);
+      ret.addAll([
+        property.name,
+        property.setter,
+        property.getter,
+        property.value,
+        property.hasValue,
+        property.writable,
+        property.isMethod,
+        property.isOwn,
+        property.wasThrown
+      ]);
     }
     return ret;
   }
@@ -749,9 +1001,10 @@
         LibraryMirror library = classMirror.owner;
         if (!attemptedLibraries.contains(library)) {
           try {
-            return objectMirror.getField(
-                MirrorSystem.getSymbol(propertyName, library)).reflectee;
-          } catch (e) { }
+            return objectMirror
+                .getField(MirrorSystem.getSymbol(propertyName, library))
+                .reflectee;
+          } catch (e) {}
           attemptedLibraries.add(library);
         }
         classMirror = classMirror.superclass;
@@ -759,8 +1012,9 @@
       return null;
     }
     try {
-      return objectMirror.getField(
-          MirrorSystem.getSymbol(propertyName)).reflectee;
+      return objectMirror
+          .getField(MirrorSystem.getSymbol(propertyName))
+          .reflectee;
     } catch (e) {
       return null;
     }
@@ -772,25 +1026,25 @@
    */
   static List consoleApi(host) {
     return [
-        "inspect",
-        (o) {
-          host.callMethod("_inspect", [unwrap_jso(o)]);
-          return o;
-        },
-        "dir",
-        window().console.dir,
-        "dirxml",
-        window().console.dirxml
-        // FIXME: add copy method.
-        ];
+      "inspect",
+      (o) {
+        js.JsNative.callMethod(host, "_inspect", [o]);
+        return o;
+      },
+      "dir",
+      window.console.dir,
+      "dirxml",
+      window.console.dirxml
+      // FIXME: add copy method.
+    ];
   }
 
   static List getMapKeyList(Map map) => map.keys.toList();
 
   static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError;
 
-  static void register(Document document, String tag, Type type,
-      String extendsTagName) {
+  static void register(
+      Document document, String tag, Type type, String extendsTagName) {
     var nativeClass = _validateCustomType(type);
 
     if (extendsTagName == null) {
@@ -804,74 +1058,90 @@
   }
 
   static void _register(Document document, String tag, Type customType,
-    String extendsTagName) => _blink.Blink_Utils.register(unwrap_jso(document), tag, customType, extendsTagName);
+          String extendsTagName) =>
+      _blink.Blink_Utils.register(document, tag, customType, extendsTagName);
 
   static Element createElement(Document document, String tagName) =>
-      wrap_jso(_blink.Blink_Utils.createElement(unwrap_jso(document), tagName));
-
-  static Element changeElementWrapper(HtmlElement element, Type type) =>
-      wrap_jso(_blink.Blink_Utils.changeElementWrapper(unwrap_jso(element), type));
+      _blink.Blink_Utils.createElement(document, tagName);
 }
 
-class _DOMWindowCrossFrame extends DartHtmlDomObject implements
-    WindowBase {
-  /** Needed because KeyboardEvent is implements.
-   *  TODO(terry): Consider making blink_jsObject private (add underscore) for
-   *               all blink_jsObject.  Then needed private wrap/unwrap_jso
-   *               functions that delegate to a public wrap/unwrap_jso.
-   */
-  js.JsObject blink_jsObject;
-
+class _DOMWindowCrossFrame extends DartHtmlDomObject implements WindowBase {
   _DOMWindowCrossFrame.internal();
 
+  static _createSafe(win) {
+    if (identical(win, window)) {
+      // The current Window object is the only window object that should not
+      // use _DOMWindowCrossFrame.
+      return window;
+    }
+    return win is _DOMWindowCrossFrame ? win : _blink.Blink_Utils.setInstanceInterceptor(win, _DOMWindowCrossFrame);
+  }
+
   // Fields.
-  HistoryBase get history => wrap_jso(_blink.Blink_DOMWindowCrossFrame.get_history(unwrap_jso(this)));
-  LocationBase get location => wrap_jso(_blink.Blink_DOMWindowCrossFrame.get_location(unwrap_jso(this)));
-  bool get closed => wrap_jso(_blink.Blink_DOMWindowCrossFrame.get_closed(unwrap_jso(this)));
-  WindowBase get opener => wrap_jso(_blink.Blink_DOMWindowCrossFrame.get_opener(unwrap_jso(this)));
-  WindowBase get parent => wrap_jso(_blink.Blink_DOMWindowCrossFrame.get_parent(unwrap_jso(this)));
-  WindowBase get top => wrap_jso(_blink.Blink_DOMWindowCrossFrame.get_top(unwrap_jso(this)));
+  HistoryBase get history {
+    var history =  _blink.BlinkWindow.instance.history_Getter_(this);
+    return history is _HistoryCrossFrame ? history : _blink.Blink_Utils.setInstanceInterceptor(history, _HistoryCrossFrame);
+  }
+
+  LocationBase get location {
+    var location = _blink.BlinkWindow.instance.location_Getter_(this);
+    return location is _LocationCrossFrame ? location : _blink.Blink_Utils.setInstanceInterceptor(location, _LocationCrossFrame);
+  }
+
+  bool get closed => _blink.BlinkWindow.instance.closed_Getter_(this);
+  WindowBase get opener => _convertNativeToDart_Window(_blink.BlinkWindow.instance.opener_Getter_(this));
+  WindowBase get parent => _convertNativeToDart_Window(_blink.BlinkWindow.instance.parent_Getter_(this));
+  WindowBase get top => _convertNativeToDart_Window(_blink.BlinkWindow.instance.top_Getter_(this));
 
   // Methods.
-  void close() => _blink.Blink_DOMWindowCrossFrame.close(unwrap_jso(this));
-  void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) =>
-      _blink.Blink_DOMWindowCrossFrame.postMessage(unwrap_jso(this),
-         convertDartToNative_SerializedScriptValue(message), targetOrigin, messagePorts);
+  void close() => _blink.BlinkWindow.instance.close_Callback_0_(this);
+  void postMessage(Object message, String targetOrigin, [List<MessagePort> transfer]) => _blink.BlinkWindow.instance.postMessage_Callback_3_(this, convertDartToNative_SerializedScriptValue(message), targetOrigin, transfer);
 
   // Implementation support.
   String get typeName => "Window";
 
   // TODO(efortuna): Remove this method. dartbug.com/16814
   Events get on => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+      'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
-  void _addEventListener([String type, EventListener listener, bool useCapture])
-      => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+  void _addEventListener(
+          [String type, EventListener listener, bool useCapture]) =>
+      throw new UnsupportedError(
+          'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
-  void addEventListener(String type, EventListener listener, [bool useCapture])
-      => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+  void addEventListener(String type, EventListener listener,
+          [bool useCapture]) =>
+      throw new UnsupportedError(
+          'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
   bool dispatchEvent(Event event) => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+      'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
-  void _removeEventListener([String type, EventListener listener,
-      bool useCapture]) => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+  void _removeEventListener(
+          [String type, EventListener listener, bool useCapture]) =>
+      throw new UnsupportedError(
+          'You can only attach EventListeners to your own window.');
   // TODO(efortuna): Remove this method. dartbug.com/16814
   void removeEventListener(String type, EventListener listener,
-      [bool useCapture]) => throw new UnsupportedError(
-    'You can only attach EventListeners to your own window.');
+          [bool useCapture]) =>
+      throw new UnsupportedError(
+          'You can only attach EventListeners to your own window.');
 }
 
 class _HistoryCrossFrame extends DartHtmlDomObject implements HistoryBase {
   _HistoryCrossFrame.internal();
 
   // Methods.
-  void back() => _blink.Blink_HistoryCrossFrame.back(unwrap_jso(this));
-  void forward() => _blink.Blink_HistoryCrossFrame.forward(unwrap_jso(this));
-  void go(int distance) => _blink.Blink_HistoryCrossFrame.go(unwrap_jso(this), distance);
+  void back() => _blink.BlinkHistory.instance.back_Callback_0_(this);
+  void forward() => _blink.BlinkHistory.instance.forward_Callback_0_(this);
+  void go([int delta]) {
+    if (delta != null) {
+      _blink.BlinkHistory.instance.go_Callback_1_(this, delta);
+      return;
+    }
+    _blink.BlinkHistory.instance.go_Callback_0_(this);
+    return;
+  }
 
   // Implementation support.
   String get typeName => "History";
@@ -881,7 +1151,7 @@
   _LocationCrossFrame.internal();
 
   // Fields.
-  set href(String h) => _blink.Blink_LocationCrossFrame.set_href(unwrap_jso(this), h);
+  set href(String value) => _blink.BlinkLocation.instance.href_Setter_(this, value);
 
   // Implementation support.
   String get typeName => "Location";
@@ -904,8 +1174,9 @@
   return completer.future;
 }
 
-Future<SendPort> _spawnDomHelper(Function f) =>
-    _makeSendPortFuture((portId) { _Utils.spawnDomHelper(f, portId); });
+Future<SendPort> _spawnDomHelper(Function f) => _makeSendPortFuture((portId) {
+      _Utils.spawnDomHelper(f, portId);
+    });
 
 final Future<SendPort> __HELPER_ISOLATE_PORT =
     _spawnDomHelper(_helperIsolateMain);
@@ -947,10 +1218,15 @@
     if (cmd == _NEW_TIMER) {
       final duration = new Duration(milliseconds: msg[1]);
       bool periodic = msg[2];
-      ping() { replyTo.send(_TIMER_PING); };
-      _TIMER_REGISTRY[replyTo] = periodic ?
-          new Timer.periodic(duration, (_) { ping(); }) :
-          new Timer(duration, ping);
+      ping() {
+        replyTo.send(_TIMER_PING);
+      }
+      ;
+      _TIMER_REGISTRY[replyTo] = periodic
+          ? new Timer.periodic(duration, (_) {
+              ping();
+            })
+          : new Timer(duration, ping);
     } else if (cmd == _CANCEL_TIMER) {
       _TIMER_REGISTRY.remove(replyTo).cancel();
     } else if (cmd == _PRINT) {
@@ -963,7 +1239,7 @@
 
 final _printClosure = (s) => window.console.log(s);
 final _pureIsolatePrintClosure = (s) {
-    _sendToHelperIsolate([_PRINT, s], null);
+  _sendToHelperIsolate([_PRINT, s], null);
 };
 
 final _forwardingPrintClosure = _Utils.forwardingPrint;
@@ -972,7 +1248,7 @@
 
 final _pureIsolateUriBaseClosure = () {
   throw new UnimplementedError("Uri.base on a background isolate "
-                               "is not supported in the browser");
+      "is not supported in the browser");
 };
 
 class _Timer implements Timer {
@@ -983,13 +1259,17 @@
   _Timer(int milliSeconds, void callback(Timer timer), bool repeating) {
     if (repeating) {
       _state = (window._setInterval(() {
-        callback(this);
-      }, milliSeconds) << 1) | _STATE_INTERVAL;
+                callback(this);
+              }, milliSeconds) <<
+              1) |
+          _STATE_INTERVAL;
     } else {
       _state = (window._setTimeout(() {
-        _state = null;
-        callback(this);
-      }, milliSeconds) << 1) | _STATE_TIMEOUT;
+                _state = null;
+                callback(this);
+              }, milliSeconds) <<
+              1) |
+          _STATE_TIMEOUT;
     }
   }
 
@@ -1009,8 +1289,8 @@
 
 get _timerFactoryClosure =>
     (int milliSeconds, void callback(Timer timer), bool repeating) {
-  return new _Timer(milliSeconds, callback, repeating);
-};
+      return new _Timer(milliSeconds, callback, repeating);
+    };
 
 class _PureIsolateTimer implements Timer {
   bool _isActive = true;
@@ -1050,7 +1330,7 @@
 
 get _pureIsolateTimerFactoryClosure =>
     ((int milliSeconds, void callback(Timer time), bool repeating) =>
-  new _PureIsolateTimer(milliSeconds, callback, repeating));
+        new _PureIsolateTimer(milliSeconds, callback, repeating));
 
 class _ScheduleImmediateHelper {
   MutationObserver _observer;
@@ -1089,13 +1369,12 @@
     new _ScheduleImmediateHelper();
 
 get _scheduleImmediateClosure => (void callback()) {
-  _scheduleImmediateHelper._schedule(callback);
-};
+      _scheduleImmediateHelper._schedule(callback);
+    };
 
 get _pureIsolateScheduleImmediateClosure => ((void callback()) =>
-  throw new UnimplementedError("scheduleMicrotask in background isolates "
-                               "are not supported in the browser"));
+    throw new UnimplementedError("scheduleMicrotask in background isolates "
+        "are not supported in the browser"));
 
 // Class for unsupported native browser 'DOM' objects.
-class _UnsupportedBrowserObject extends DartHtmlDomObject {
-}
+class _UnsupportedBrowserObject extends DartHtmlDomObject {}
diff --git a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
index 30400a1..ead9d63 100644
--- a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
@@ -150,7 +150,4 @@
   throw new UnimplementedError();
 }
 
-/// Dartium functions that are a NOOP in dart2js.
-unwrap_jso(dartClass_instance) => dartClass_instance;
-wrap_jso(jsObject) => jsObject;
 createCustomUpgrader(Type customElementClass, $this) => $this;
diff --git a/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate b/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
index 23e22bf..bbd6aeb 100644
--- a/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
@@ -62,5 +62,8 @@
 
   @DomName('KeyboardEvent.charCode')
   int get charCode => _charCode;
+
+  @DomName('KeyboardEvent.which')
+  int get which => _which;
 $!MEMBERS
 }
diff --git a/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate b/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
index 80ecea1..5d5d23a 100644
--- a/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
@@ -60,4 +60,12 @@
   @DomName('MouseEvent.screenX')
   @DomName('MouseEvent.screenY')
   Point get screen => new Point(_screenX, _screenY);
+
+  @DomName('MouseEvent.layerX')
+  @DomName('MouseEvent.layerY')
+  Point get layer => new Point(_layerX, _layerY);
+
+  @DomName('MouseEvent.pageX')
+  @DomName('MouseEvent.pageY')
+  Point get page => new Point(_pageX, _pageY);
 }
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index 66a18e0..e8a6a31 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -37,7 +37,6 @@
 import 'dart:html_common';
 import 'dart:indexed_db';
 import 'dart:indexed_db' show indexed_dbBlinkMap;
-import 'dart:indexed_db' show indexed_dbBlinkFunctionMap;
 import 'dart:isolate';
 import 'dart:js' as js;
 import "dart:convert";
@@ -49,17 +48,14 @@
 import 'dart:typed_data';
 import 'dart:web_gl' as gl;
 import 'dart:web_gl' show web_glBlinkMap;
-import 'dart:web_gl' show web_glBlinkFunctionMap;
 import 'dart:web_sql';
 // Not actually used, but imported since dart:html can generate these objects.
 import 'dart:svg' as svg;
 import 'dart:svg' show svgBlinkMap;
-import 'dart:svg' show svgBlinkFunctionMap;
 import 'dart:svg' show Matrix;
 import 'dart:svg' show SvgSvgElement;
 import 'dart:web_audio' as web_audio;
 import 'dart:web_audio' show web_audioBlinkMap;
-import 'dart:web_audio' show web_audioBlinkFunctionMap;
 import 'dart:_blink' as _blink;
 import 'dart:developer';
 
@@ -118,7 +114,7 @@
   }
 $if DARTIUM
 $if JSINTEROP
-  _window = wrap_jso(js.JsNative.getProperty(js.context, 'window'));
+  _window = js.JsNative.toTypedObject(js.context);
 $else
   _window = _Utils.window();
 $endif
@@ -161,11 +157,19 @@
   'JsObject': () => js.JsObject,
   'JsFunction': () => js.JsFunction,
   'JsArray': () => js.JsArray,
+  // We have to call .instanceRuntimeType as these classes have a private
+  // implementation class defined dynamically at runtime via a patch file.
+  'JSObject': () => js.JSObject.instanceRuntimeType,
+  'JSFunction': () => js.JSFunction.instanceRuntimeType,
+  'JSArray': () => js.JSArray.instanceRuntimeType,
 $!TYPE_MAP
 };
 
 // TODO(leafp): We may want to move this elsewhere if html becomes
 // a package to avoid dartium depending on pkg:html.
+@Deprecated("Internal Use Only")
+getHtmlCreateType(String key) => _getType(key);
+
 Type _getType(String key) {
   var result;
 
@@ -252,102 +256,48 @@
   return null;
 }
 
+// TODO(jacobr): it would be nice to place these conversion methods in a consistent place for dart2js and dartium.
+
+WindowBase _convertNativeToDart_Window(win) {
+  if (win == null) return null;
+  return _DOMWindowCrossFrame._createSafe(win);
+}
+
+EventTarget _convertNativeToDart_EventTarget(e) {
+  if (e == null) {
+    return null;
+  }
+  // Assume it's a Window if it contains the postMessage property.  It may be
+  // from a different frame - without a patched prototype - so we cannot
+  // rely on Dart type checking.
+  try {
+    if (js.JsNative.hasProperty(e, "postMessage")) {
+      var window = _DOMWindowCrossFrame._createSafe(e);
+      // If it's a native window.
+      if (window is EventTarget) {
+        return window;
+      }
+      return null;
+    }
+  } catch (err) {
+    print("Error calling _convertNativeToDart_EventTarget... $err");
+  }
+  return e;
+}
+
+EventTarget _convertDartToNative_EventTarget(e) {
+  // _DOMWindowCrossFrame uses an interceptor so we don't need to do anything unlike Dart2Js.
+  return e;
+}
+
+_convertNativeToDart_XHR_Response(o) {
+  if (o is Document) {
+    return o;
+  }
+  return convertNativeToDart_SerializedScriptValue(o);
+}
+
 $if JSINTEROP
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final htmlBlinkFunctionMap = {
-$!TYPE_FUNCTION_MAP
-};
-
-// TODO(terry): We may want to move this elsewhere if html becomes
-// a package to avoid dartium depending on pkg:html.
-@Deprecated("Internal Use Only")
-getHtmlCreateFunction(String key) {
-  var result;
-
-  // TODO(vsm): Add Cross Frame and JS types here as well.
-
-  // Check the html library.
-  result = _getHtmlFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the web gl library.
-  result = _getWebGlFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the indexed db library.
-  result = _getIndexDbFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the web audio library.
-  result = _getWebAudioFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the web sql library.
-  result = _getWebSqlFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  // Check the svg library.
-  result = _getSvgFunction(key);
-  if (result != null) {
-    return result;
-  }
-
-  return null;
-}
-
-Function _getHtmlFunction(String key) {
-  if (htmlBlinkFunctionMap.containsKey(key)) {
-    return htmlBlinkFunctionMap[key]();
-  }
-  return null;
-}
-
-Function _getWebGlFunction(String key) {
-  if (web_glBlinkFunctionMap.containsKey(key)) {
-    return web_glBlinkFunctionMap[key]();
-  }
-  return null;
-}
-
-Function _getIndexDbFunction(String key) {
-  if (indexed_dbBlinkFunctionMap.containsKey(key)) {
-    return indexed_dbBlinkFunctionMap[key]();
-  }
-  return null;
-}
-
-Function _getWebAudioFunction(String key) {
-  if (web_audioBlinkFunctionMap.containsKey(key)) {
-    return web_audioBlinkFunctionMap[key]();
-  }
-  return null;
-}
-
-Function _getWebSqlFunction(String key) {
-  if (web_sqlBlinkFunctionMap.containsKey(key)) {
-    return web_sqlBlinkFunctionMap[key]();
-  }
-  return null;
-}
-
-Function _getSvgFunction(String key) {
-  if (svgBlinkFunctionMap.containsKey(key)) {
-    return svgBlinkFunctionMap[key]();
-  }
-  return null;
-}
-
 
 /******************************************************************************
  **********                                                          **********
@@ -368,22 +318,14 @@
   var jsObject;
   var tag = "";
   var runtimeType = element.runtimeType;
-  if (runtimeType == HtmlElement) {
-    tag = element.localName;
-  } else if (runtimeType == TemplateElement) {
+  if (runtimeType == TemplateElement) {
     // Data binding with a Dart class.
     tag = element.attributes['is'];
-  } else if (runtimeType == js.JsObject) {
-    // It's a Polymer core element (written in JS).
-    // Make sure it's an element anything else we can ignore.
-    if (element.hasProperty('nodeType') && element['nodeType'] == 1) {
-      if (js.JsNative.callMethod(element, 'hasAttribute', ['is'])) {
-        // It's data binding use the is attribute.
-        tag = js.JsNative.callMethod(element, 'getAttribute', ['is']);
-      } else {
-        // It's a custom element we want the local name.
-        tag = element['localName'];
-      }
+  } else if (element is HtmlElement) {
+    tag = element.attributes['is'];
+    if (tag == null) {
+      // It's a custom element we want the local name.
+      tag = element.localName;
     }
   } else {
     throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, expected HtmlElement/HtmlTemplate/JsObject.');
@@ -417,7 +359,7 @@
   var result = new Map();
   var keys = js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'Object'), 'keys', [jsObject]);
   for (var key in keys) {
-    result[key] = wrap_jso(js.JsNative.getProperty(jsObject, key));
+    result[key] = js.JsNative.getProperty(jsObject, key);
   }
   return result;
 }
@@ -426,25 +368,7 @@
  * Upgrade the JS HTMLElement to the Dart class.  Used by Dart's Polymer.
  */
 _createCustomUpgrader(Type customElementClass, $this) {
-  var dartClass;
-  try {
-    dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
-  } catch (e) {
-    // Did the dartClass get allocated but the created failed?  Otherwise, other
-    // components inside of this failed somewhere (could be JS custom element).
-    if (dartClass != null) {
-      // Yes, mark as didn't upgrade.
-      dartClass._badUpgrade();
-    }
-    throw e;
-  } finally {
-    // Need to remember the Dart class that was created for this custom so
-    // return it and setup the blink_jsObject to the $this that we'll be working
-    // with as we talk to blink.
-    js.setDartHtmlWrapperFor($this, dartClass);
-  }
-
-  return dartClass;
+  return _blink.Blink_Utils.setInstanceInterceptor($this, customElementClass, customElement: true);
 }
 
 $else
diff --git a/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate b/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
index 2cdb92b..7e4d026 100644
--- a/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
+++ b/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
@@ -24,5 +24,8 @@
 
   @DomName('KeyboardEvent.charCode')
   int get charCode => _charCode;
+
+  @DomName('KeyboardEvent.which')
+  int get which => _which;
 $!MEMBERS
 }
diff --git a/tools/dom/templates/html/dartium/impl_MouseEvent.darttemplate b/tools/dom/templates/html/dartium/impl_MouseEvent.darttemplate
index 02bc4fb..c4dc511 100644
--- a/tools/dom/templates/html/dartium/impl_MouseEvent.darttemplate
+++ b/tools/dom/templates/html/dartium/impl_MouseEvent.darttemplate
@@ -64,4 +64,12 @@
   @DomName('MouseEvent.screenX')
   @DomName('MouseEvent.screenY')
   Point get screen => new Point(_screenX, _screenY);
+
+  @DomName('MouseEvent.layerX')
+  @DomName('MouseEvent.layerY')
+  Point get layer => new Point(_layerX, _layerY);
+
+  @DomName('MouseEvent.pageX')
+  @DomName('MouseEvent.pageY')
+  Point get page => new Point(_pageX, _pageY);
 }
diff --git a/tools/dom/templates/html/dartium/indexed_db_dartium.darttemplate b/tools/dom/templates/html/dartium/indexed_db_dartium.darttemplate
index ef3928c..dee0cac 100644
--- a/tools/dom/templates/html/dartium/indexed_db_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/indexed_db_dartium.darttemplate
@@ -112,10 +112,66 @@
 $!TYPE_MAP
 };
 
-$if JSINTEROP
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final indexed_dbBlinkFunctionMap = {
-$!TYPE_FUNCTION_MAP
-};
-$endif
+
+//
+// Per http://www.w3.org/TR/IndexedDB/#key-construct
+//
+// "A value is said to be a valid key if it is one of the following types: Array
+// JavaScript objects [ECMA-262], DOMString [WEBIDL], Date [ECMA-262] or float
+// [WEBIDL]. However Arrays are only valid keys if every item in the array is
+// defined and is a valid key (i.e. sparse arrays can not be valid keys) and if
+// the Array doesn't directly or indirectly contain itself. Any non-numeric
+// properties are ignored, and thus does not affect whether the Array is a valid
+// key. Additionally, if the value is of type float, it is only a valid key if
+// it is not NaN, and if the value is of type Date it is only a valid key if its
+// [[PrimitiveValue]] internal property, as defined by [ECMA-262], is not NaN."
+
+// What is required is to ensure that an Lists in the key are actually
+// JavaScript arrays, and any Dates are JavaScript Dates.
+
+
+/**
+ * Converts a native IDBKey into a Dart object.
+ *
+ * May return the original input.  May mutate the original input (but will be
+ * idempotent if mutation occurs).  It is assumed that this conversion happens
+ * on native IDBKeys on all paths that return IDBKeys from native DOM calls.
+ *
+ * If necessary, JavaScript Dates are converted into Dart Dates.
+ */
+_convertNativeToDart_IDBKey(nativeKey) {
+  containsDate(object) {
+    if (object is DateTime) return true;
+    if (object is List) {
+      for (int i = 0; i < object.length; i++) {
+        if (containsDate(object[i])) return true;
+      }
+    }
+    return false;  // number, string.
+  }
+  if (nativeKey is DateTime) {
+    throw new UnimplementedError('Key containing DateTime');
+  }
+  // TODO: Cache conversion somewhere?
+  return nativeKey;
+}
+
+/**
+ * Converts a Dart object into a valid IDBKey.
+ *
+ * May return the original input.  Does not mutate input.
+ *
+ * If necessary, [dartKey] may be copied to ensure all lists are converted into
+ * JavaScript Arrays and Dart Dates into JavaScript Dates.
+ */
+_convertDartToNative_IDBKey(dartKey) {
+  // TODO: Implement.
+  return dartKey;
+}
+
+
+
+/// May modify original.  If so, action is idempotent.
+_convertNativeToDart_IDBAny(object) {
+  return convertNativeToDart_AcceptStructuredClone(object, mustCopy: false);
+}
\ No newline at end of file
diff --git a/tools/dom/templates/html/dartium/svg_dartium.darttemplate b/tools/dom/templates/html/dartium/svg_dartium.darttemplate
index ab2a99d..17f119b 100644
--- a/tools/dom/templates/html/dartium/svg_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/svg_dartium.darttemplate
@@ -28,11 +28,3 @@
 final svgBlinkMap = {
 $!TYPE_MAP
 };
-
-$if JSINTEROP
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final svgBlinkFunctionMap = {
-$!TYPE_FUNCTION_MAP
-};
-$endif
diff --git a/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate b/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
index 43b42c9..b9c02a7 100644
--- a/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
@@ -22,11 +22,3 @@
 final web_audioBlinkMap = {
 $!TYPE_MAP
 };
-
-$if JSINTEROP
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final web_audioBlinkFunctionMap = {
-$!TYPE_FUNCTION_MAP
-};
-$endif
diff --git a/tools/dom/templates/html/dartium/web_gl_dartium.darttemplate b/tools/dom/templates/html/dartium/web_gl_dartium.darttemplate
index 7cc4289..2258b2e 100644
--- a/tools/dom/templates/html/dartium/web_gl_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/web_gl_dartium.darttemplate
@@ -24,11 +24,3 @@
 final web_glBlinkMap = {
 $!TYPE_MAP
 };
-
-$if JSINTEROP
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final web_glBlinkFunctionMap = {
-$!TYPE_FUNCTION_MAP
-};
-$endif
diff --git a/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate b/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
index 21ef127..03135a3 100644
--- a/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
@@ -30,11 +30,3 @@
 final web_sqlBlinkMap = {
 $!TYPE_MAP
 };
-
-$if JSINTEROP
-// FIXME: Can we make this private?
-@Deprecated("Internal Use Only")
-final web_sqlBlinkFunctionMap = {
-$!TYPE_FUNCTION_MAP
-};
-$endif
\ No newline at end of file
diff --git a/tools/dom/templates/html/impl/impl_Blob.darttemplate b/tools/dom/templates/html/impl/impl_Blob.darttemplate
index 0b12452..e2617c2 100644
--- a/tools/dom/templates/html/impl/impl_Blob.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Blob.darttemplate
@@ -31,15 +31,15 @@
     // TODO: any coercions on the elements of blobParts, e.g. coerce a typed
     // array to ArrayBuffer if it is a total view.
 
-    var parts = convertDartToNative_List(blobParts.map(unwrap_jso).toList());
+    var parts = convertDartToNative_List(blobParts);
     if (type == null && endings == null) {
-      return wrap_jso(_blink.BlinkBlob.instance.constructorCallback_1_(parts));
+      return _blink.BlinkBlob.instance.constructorCallback_1_(parts);
     }
     var bag = {};
     if (type != null) bag['type'] = type;
     if (endings != null) bag['endings'] = endings;
-    return wrap_jso(_blink.BlinkBlob.instance.constructorCallback_2_(parts,
-        convertDartToNative_Dictionary(bag)));
+    return _blink.BlinkBlob.instance.constructorCallback_2_(parts,
+        convertDartToNative_Dictionary(bag));
   }
   $endif
 $endif
diff --git a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
index 7cb4628..495011e2 100644
--- a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
@@ -63,7 +63,7 @@
 $if DARTIUM
   bool _hasProperty(String propertyName) =>
   $if JSINTEROP
-      _blink.BlinkCSSStyleDeclaration.instance.$__propertyQuery___Callback_1_(unwrap_jso(this), propertyName) != null;
+      _blink.BlinkCSSStyleDeclaration.instance.$__propertyQuery___Callback_1_(this, propertyName);
   $else
       _blink.BlinkCSSStyleDeclaration.$__propertyQuery___Callback_1(this, propertyName);
   $endif
diff --git a/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate b/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
index cd5fa3c..74c7d33 100644
--- a/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
@@ -15,7 +15,7 @@
   @DocsEditable()
   ImageData createImageDataFromImageData(ImageData imagedata) =>
 $if DART2JS
-    JS('ImageData', '#.createImageData(#, #)', this, imagedata);
+    JS('ImageData', '#.createImageData(#)', this, imagedata);
 $else
     this.createImageData(imagedata);
 $endif
diff --git a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
index e16b74a..b2a787e 100644
--- a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
@@ -23,9 +23,7 @@
     // first-chance exceptions. Can expand this list in the future as needed.
     if (detail is List || detail is Map || detail is String || detail is num) {
       try {
-$if DART2JS
         detail = convertDartToNative_SerializedScriptValue(detail);
-$endif
         e._initCustomEvent(type, canBubble, cancelable, detail);
       } catch(_) {
         e._initCustomEvent(type, canBubble, cancelable, null);
@@ -34,11 +32,6 @@
       e._initCustomEvent(type, canBubble, cancelable, null);
     }
 
-$if DARTIUM
-    // Need for identity.
-    js.setDartHtmlWrapperFor(e.blink_jsObject, e);
-
-$endif
     return e;
   }
 
diff --git a/tools/dom/templates/html/impl/impl_DataTransferItemList.darttemplate b/tools/dom/templates/html/impl/impl_DataTransferItemList.darttemplate
index 31455d6..ab0442a 100644
--- a/tools/dom/templates/html/impl/impl_DataTransferItemList.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DataTransferItemList.darttemplate
@@ -15,7 +15,7 @@
     // TODO(alanknight): I think that all the __getter__ generators should just
     // do property access, but that's major surgery. This one is a problem, so
     // just hard-code it for now.
-    return _blink.Blink_JsNative_DomException.getProperty(unwrap_jso(this), index);
+    return _blink.Blink_JsNative_DomException.getProperty(this, index);
 $endif
   }
 
diff --git a/tools/dom/templates/html/impl/impl_Document.darttemplate b/tools/dom/templates/html/impl/impl_Document.darttemplate
index ca0705a..9dae6c7 100644
--- a/tools/dom/templates/html/impl/impl_Document.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Document.darttemplate
@@ -68,23 +68,9 @@
         ? _createElement_2(tagName)
         : _createElement(tagName, typeExtension);
 $else
-    var newElement = (typeExtension == null) ?
-      _blink.BlinkDocument.instance.createElement_Callback_1_(unwrap_jso(this), tagName) :
-      _blink.BlinkDocument.instance.createElement_Callback_2_(unwrap_jso(this), tagName, typeExtension);
-
-    var wrapped = js.getDartHtmlWrapperFor(newElement);  // Here's our Dart class.
-    if (wrapped != null) {
-      wrapped.blink_jsObject = newElement;
-    } else {
-      wrapped = wrap_jso(newElement);
-      if (wrapped == null) {
-        wrapped = wrap_jso_custom_element(newElement);
-      } else {
-        js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);
-      }
-    }
-
-    return wrapped;
+    return (typeExtension == null) ?
+      _blink.BlinkDocument.instance.createElement_Callback_1_(this, tagName) :
+      _blink.BlinkDocument.instance.createElement_Callback_2_(this, tagName, typeExtension);
 $endif
   }
 
@@ -110,25 +96,9 @@
         ? _createElementNS_2(namespaceURI, qualifiedName)
         : _createElementNS(namespaceURI, qualifiedName, typeExtension);
 $else
-    var newElement = (typeExtension == null) ?
-      _blink.BlinkDocument.instance.createElementNS_Callback_2_(unwrap_jso(this), namespaceURI, qualifiedName) :
-      _blink.BlinkDocument.instance.createElementNS_Callback_3_(unwrap_jso(this), namespaceURI, qualifiedName, typeExtension);
-
-    var wrapped;
-
-    wrapped = js.getDartHtmlWrapperFor(newElement);  // Here's our Dart class.
-    if (wrapped != null) {
-      wrapped.blink_jsObject = newElement;
-    } else {
-      wrapped = wrap_jso(newElement);
-      if (wrapped == null) {
-        wrapped = wrap_jso_custom_element(newElement);
-      } else {
-        js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);  // Here's our Dart class.
-      }
-    }
-
-    return wrapped;
+    return (typeExtension == null) ?
+      _blink.BlinkDocument.instance.createElementNS_Callback_2_(this, namespaceURI, qualifiedName) :
+      _blink.BlinkDocument.instance.createElementNS_Callback_3_(this, namespaceURI, qualifiedName, typeExtension);    
 $endif
   }
 
diff --git a/tools/dom/templates/html/impl/impl_DocumentType.darttemplate b/tools/dom/templates/html/impl/impl_DocumentType.darttemplate
index 88e7e6e..aad4158 100644
--- a/tools/dom/templates/html/impl/impl_DocumentType.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DocumentType.darttemplate
@@ -9,8 +9,8 @@
 $!MEMBERS
 $if DARTIUM
   // Override this methods for Dartium _DocumentType can't be abstract.
-  Element get nextElementSibling => wrap_jso(_blink.BlinkDocumentType.instance.nextElementSibling_Getter_(unwrap_jso(this)));
-  Element get previousElementSibling => wrap_jso(_blink.BlinkDocumentType.instance.previousElementSibling_Getter_(unwrap_jso(this)));
+  Element get nextElementSibling => _blink.BlinkDocumentType.instance.nextElementSibling_Getter_(this);
+  Element get previousElementSibling => _blink.BlinkDocumentType.instance.previousElementSibling_Getter_(this);
 $endif
 }
 
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 4b8173b..399e90d 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -380,7 +380,15 @@
    *     }
    *     document.registerElement('x-custom', CustomElement);
    */
+$if DART2JS
   Element.created() : super._created();
+$else
+  Element.created() : super._created() {
+    // Validate that this is a custom element & possibly perform additional
+    // initialization.
+    _blink.Blink_Utils.initializeCustomElement(this);
+  }
+$endif
 
   /**
    * Creates the HTML element specified by the tag name.
@@ -1483,24 +1491,20 @@
   static var _htmlCollection = js.context["HTMLCollection"];
   static var _nodeList = js.context["NodeList"];
 
+  static const _evilAttributeNames =
+      const ['attributes', 'lastChild', 'children', 'childNodes'];
+
   static bool _hasCorruptedAttributes(Element element) {
-    var attributes = unwrap_jso(element)["attributes"];
-    if (!attributes.instanceof(_namedNodeMap)) {
-      return true;
-    }
-    var childNodes = unwrap_jso(element.childNodes);
-    var length = childNodes["length"];
-    var lastChild = unwrap_jso(element.lastChild);
-    if (null != lastChild &&
-        lastChild != childNodes[length - 1]) {
-      return true;
-    }
-    var children = unwrap_jso(element._children);
-    if (null != children) { // On Safari, children can apparently be null.
-      if (!children.instanceof(_htmlCollection) ||
-          children.instanceof(_nodeList)) {
-	return true;
-      }
+    // We have trusted access to children and to attributes of objects,
+    // so we can inspect directly for attempts at DOM clobbering.
+    var child = element.firstChild;
+    while( child != null)  {
+      if (child is Element) {
+      for (var attributeName in ["id", "name"]) {
+        var childAttribute = child.getAttribute(attributeName);
+        if (_evilAttributeNames.contains(childAttribute)) return true;
+      }}
+      child = child.nextNode;
     }
     return false;
   }
@@ -1509,6 +1513,7 @@
   static bool _hasCorruptedAttributesAdditionalCheck(Element element) => false;
 $endif
 
+$if DART2JS
   static String _safeTagName(element) {
     String result = 'element tag unavailable';
     try {
@@ -1518,6 +1523,15 @@
     } catch (e) {}
     return result;
   }
+$else
+  static String _safeTagName(element) {
+    try {
+      // Safe as we plumb directly to a C++ native method.
+      return element.tagName;
+    } catch (e) {}
+    return 'element tag unavailable';
+  }
+$endif  
 
 $if DART2JS
   @DomName('Element.offsetParent')
@@ -1570,52 +1584,52 @@
 
 $else
   // Need to explicitly delegate because Element is no longer abstract for Dartium.
-  bool get isContentEditable => _blink.BlinkHTMLElement.instance.isContentEditable_Getter_(unwrap_jso(this));
-  void click() => _blink.BlinkHTMLElement.instance.click_Callback_0_(unwrap_jso(this));
+  bool get isContentEditable => _blink.BlinkHTMLElement.instance.isContentEditable_Getter_(this);
+  void click() => _blink.BlinkHTMLElement.instance.click_Callback_0_(this);
 
   @DomName('Element.offsetParent')
   @DocsEditable()
-  Element get offsetParent => wrap_jso(_blink.BlinkElement.instance.offsetParent_Getter_(unwrap_jso(this)));
+  Element get offsetParent => _blink.BlinkElement.instance.offsetParent_Getter_(this);
 
   @DomName('Element.offsetHeight')
   @DocsEditable()
-  int get offsetHeight => _blink.BlinkElement.instance.offsetHeight_Getter_(unwrap_jso(this));
+  int get offsetHeight => _blink.BlinkElement.instance.offsetHeight_Getter_(this);
 
   @DomName('Element.offsetLeft')
   @DocsEditable()
-  int get offsetLeft => _blink.BlinkElement.instance.offsetLeft_Getter_(unwrap_jso(this));
+  int get offsetLeft => _blink.BlinkElement.instance.offsetLeft_Getter_(this);
 
   @DomName('Element.offsetTop')
   @DocsEditable()
-  int get offsetTop => _blink.BlinkElement.instance.offsetTop_Getter_(unwrap_jso(this));
+  int get offsetTop => _blink.BlinkElement.instance.offsetTop_Getter_(this);
 
   @DomName('Element.offsetWidth')
   @DocsEditable()
-  int get offsetWidth => _blink.BlinkElement.instance.offsetWidth_Getter_(unwrap_jso(this));
+  int get offsetWidth => _blink.BlinkElement.instance.offsetWidth_Getter_(this);
 
   @DomName('Element.scrollHeight')
   @DocsEditable()
-  int get scrollHeight => _blink.BlinkElement.instance.scrollHeight_Getter_(unwrap_jso(this)).round();
+  int get scrollHeight => _blink.BlinkElement.instance.scrollHeight_Getter_(this).round();
 
   @DomName('Element.scrollLeft')
   @DocsEditable()
-  int get scrollLeft => _blink.BlinkElement.instance.scrollLeft_Getter_(unwrap_jso(this)).round();
+  int get scrollLeft => _blink.BlinkElement.instance.scrollLeft_Getter_(this).round();
 
   @DomName('Element.scrollLeft')
   @DocsEditable()
-  set scrollLeft(int value) => _blink.BlinkElement.instance.scrollLeft_Setter_(unwrap_jso(this), value.round());
+  set scrollLeft(int value) => _blink.BlinkElement.instance.scrollLeft_Setter_(this, value.round());
 
   @DomName('Element.scrollTop')
   @DocsEditable()
-  int get scrollTop => _blink.BlinkElement.instance.scrollTop_Getter_(unwrap_jso(this)).round();
+  int get scrollTop => _blink.BlinkElement.instance.scrollTop_Getter_(this).round();
 
   @DomName('Element.scrollTop')
   @DocsEditable()
-  set scrollTop(int value) => _blink.BlinkElement.instance.scrollTop_Setter_(unwrap_jso(this), value.round());
+  set scrollTop(int value) => _blink.BlinkElement.instance.scrollTop_Setter_(this, value.round());
 
   @DomName('Element.scrollWidth')
   @DocsEditable()
-  int get scrollWidth => _blink.BlinkElement.instance.scrollWidth_Getter_(unwrap_jso(this)).round();
+  int get scrollWidth => _blink.BlinkElement.instance.scrollWidth_Getter_(this).round();
 $endif
 
 $!MEMBERS
diff --git a/tools/dom/templates/html/impl/impl_FileReader.darttemplate b/tools/dom/templates/html/impl/impl_FileReader.darttemplate
index ba5278f..d698e37 100644
--- a/tools/dom/templates/html/impl/impl_FileReader.darttemplate
+++ b/tools/dom/templates/html/impl/impl_FileReader.darttemplate
@@ -13,7 +13,7 @@
 $if DART2JS
     var res = JS('Null|String|NativeByteBuffer', '#.result', this);
 $else
-    var res = _blink.BlinkFileReader.instance.result_Getter_(unwrap_jso(this));
+    var res = _blink.BlinkFileReader.instance.result_Getter_(this);
 $endif
     if (res is ByteBuffer) {
       return new Uint8List.view(res);
diff --git a/tools/dom/templates/html/impl/impl_HTMLAudioElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLAudioElement.darttemplate
index 838a8be..e8da200 100644
--- a/tools/dom/templates/html/impl/impl_HTMLAudioElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLAudioElement.darttemplate
@@ -10,9 +10,9 @@
 $if JSINTEROP
   factory AudioElement([String src]) {
     if (src == null)
-      return wrap_jso(_blink.BlinkHTMLAudioElement.instance.constructorCallback_0_());
+      return _blink.BlinkHTMLAudioElement.instance.constructorCallback_0_();
     else
-      return wrap_jso(_blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src));
+      return _blink.BlinkHTMLAudioElement.instance.constructorCallback_1_(src);
   }
 $else
   factory AudioElement([String src]) => new AudioElement._(src);
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
index 61fc715..1264edc 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -362,6 +362,10 @@
     _registerCustomElement(JS('', 'window'), this, tag, customElementClass,
         extendsTag);
 $else
+    // Hack to setup an interceptor for HTMLElement so it isn't changed when a custom element is created.
+    var jsHTMLElementPrototype = js.JsNative.getProperty(js.JsNative.getProperty(js.context, 'HTMLElement'),'prototype');
+    _blink.Blink_Utils.defineInterceptor(jsHTMLElementPrototype, HtmlElement.instanceRuntimeType);
+
     // Figure out which DOM class is being extended from the user's Dart class.
     var classMirror = reflectClass(customElementClass);
 
@@ -413,9 +417,6 @@
       }
       var elemProto = js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'Object'), "create", [js.JsNative.getProperty(baseElement, 'prototype')]);
 
-      // Remember for any upgrading done in wrap_jso.
-      addCustomElementType(tag, customElementClass, extendsTag);
-
       // TODO(terry): Hack to stop recursion re-creating custom element when the
       //              created() constructor of the custom element does e.g.,
       //
@@ -427,77 +428,46 @@
       //              until stack overflow.
       //
       //              See https://github.com/dart-lang/sdk/issues/23666
-      int creating = 0;
+      int creating = 0; // TODO(jacobr): I think I broke thise case. Will fix monday.
 
       // If any JS code is hooked we want to call it too.
-      var oldCreatedCallback = elemProto['createdCallback'];
-      var oldAttributeChangedCallback = elemProto['attributeChangedCallback'];
-      var oldAttachedCallback = elemProto['attachedCallback'];
-      var oldDetachedCallback = elemProto['detachedCallback'];
+      var oldCreatedCallback = js.JsNative.getProperty(elemProto, 'createdCallback');
+      var oldAttributeChangedCallback = js.JsNative.getProperty(elemProto, 'attributeChangedCallback');
+      var oldAttachedCallback = js.JsNative.getProperty(elemProto, 'attachedCallback');
+      var oldDetachedCallback = js.JsNative.getProperty(elemProto, 'detachedCallback');
 
-      // TODO(jacobr): warning:
-      elemProto['createdCallback'] = js.JsNative.withThis(($this) {
-        if (_getJSClassName(reflectClass(customElementClass).superclass) != null && creating < 2) {
-          creating++;
+      js.JsNative.setProperty(elemProto, 'createdCallback', js.allowInteropCaptureThis(($this) {
+        // The created callback has already been called by the very act of passing a JS
+        // custom element from JS to Dart.
 
-          var dartClass;
-          try {
-            if (extendsTag != null) {
-              // If we're extending a native element then create that element.
-              // Then upgrade that element to the customElementClass through
-              // normal flow.
-              dartClass = document.createElement(extendsTag);
-              js.setDartHtmlWrapperFor($this, dartClass);
-              dartClass.blink_jsObject = $this;
-            }
-
-            // Upgrade to the CustomElement Dart class.
-            dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
-          } catch (e) {
-            // Got a problem make it an HtmlElement and rethrow the error.
-            dartClass = HtmlElement.internalCreateHtmlElement();
-            // We need to remember the JS object (because constructElement failed
-            // it normally sets up the blink_jsObject.
-            dartClass.blink_jsObject = $this;
-
-            // Mark to only try this once don't try upgrading from HtmlElement
-            // to the user's Dart class - we had a problem.
-            dartClass._badUpgrade();
-            throw e;
-          } finally {
-            // Need to remember the Dart class that was created for this custom so
-            // return it and setup the blink_jsObject to the $this that we'll be working
-            // with as we talk to blink.
-            js.setDartHtmlWrapperFor($this, dartClass);
-
-            creating--;
-          }
-        }
+        //  Make element's interceptor a CustomElementClass.
+        _blink.Blink_Utils.setInstanceInterceptorCustomUpgrade($this);
 
         if (oldCreatedCallback != null)
-          oldCreatedCallback.apply([], thisArg: unwrap_jso($this));
-      });
-      elemProto['attributeChangedCallback'] = new js.JsFunction.withThis(($this, attrName, oldVal, newVal) {
+          oldCreatedCallback.apply([], thisArg: $this);
+      }));
+      js.JsNative.setProperty(elemProto, 'attributeChangedCallback', js.allowInteropCaptureThis(($this, attrName, oldVal, newVal) {
         $this.attributeChanged(attrName, oldVal, newVal);
 
         if (oldAttributeChangedCallback != null)
-          oldAttributeChangedCallback.apply([], thisArg: unwrap_jso($this));
-      });
-      elemProto['attachedCallback'] = new js.JsFunction.withThis(($this) {
+          oldAttributeChangedCallback.apply([], thisArg: $this);
+      }));
+      js.JsNative.setProperty(elemProto, 'attachedCallback', js.allowInteropCaptureThis(($this) {
         $this.attached();
 
         if (oldAttachedCallback != null)
-          oldAttachedCallback.apply([], thisArg: unwrap_jso($this));
-      });
-      elemProto['detachedCallback'] = new js.JsFunction.withThis(($this) {
+          oldAttachedCallback.apply([], thisArg: $this);
+      }));
+      js.JsNative.setProperty(elemProto, 'detachedCallback', js.allowInteropCaptureThis(($this) {
         $this.detached();
 
         if (oldDetachedCallback != null)
-          oldDetachedCallback.apply([], thisArg: unwrap_jso($this));
-      });
+          oldDetachedCallback.apply([], thisArg: $this);
+      }));
       // document.registerElement('x-foo', {prototype: elemProto, extends: extendsTag});
       var jsMap = new js.JsObject.jsify({'prototype': elemProto, 'extends': extendsTag});
-      js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'document'), 'registerElement', [tag, jsMap]);
+      _blink.Blink_Utils.defineInterceptorCustomElement(elemProto, customElementClass);
+      js.JsNative.callMethod(document, 'registerElement', [tag, jsMap]);
     }
 $endif
   }
diff --git a/tools/dom/templates/html/impl/impl_HTMLElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLElement.darttemplate
index 1d12631..2f16d16 100644
--- a/tools/dom/templates/html/impl/impl_HTMLElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLElement.darttemplate
@@ -7,18 +7,4 @@
 @DocsEditable()
 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
 $!MEMBERS
-$if DARTIUM
-  // Flags to only try upgrading once. If there's a failure don't try upgrading
-  // anymore.
-  bool _badUpgradeOccurred = false;
-
-  /// Required for SDK Infrastructure. Internal use only.
-  ///
-  /// Did this encounter a failure attempting to upgrade to
-  /// a custom element.
-  @Deprecated("Required for SDK Infrastructure. Internal use only.")
-  bool get isBadUpgrade => _badUpgradeOccurred;
-
-  void _badUpgrade() { _badUpgradeOccurred = true; }
-$endif
 }
diff --git a/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate b/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
index 8a74ad3..3d396ef 100644
--- a/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBDatabase.darttemplate
@@ -72,14 +72,14 @@
     if (storeName_OR_storeNames == null) {
       throw new ArgumentError("stores may not be null in transaction");
     } else if (storeName_OR_storeNames is String || storeName_OR_storeNames is DomStringList) {
-      names = unwrap_jso(storeName_OR_storeNames);
+      names = storeName_OR_storeNames;
     } else if (storeName_OR_storeNames is List<String>) {
       names = convertDartToNative_List(storeName_OR_storeNames);
     } else {
       throw new ArgumentError("Invalid store(s) $store_Name_OR_storeNames");
     }
 
-    return wrap_jso(_blink.BlinkIDBDatabase.instance.transaction_Callback_2_(unwrap_jso(this), names, mode));
+    return _blink.BlinkIDBDatabase.instance.transaction_Callback_2_(this, names, mode);
   }
 
   Transaction transactionList(List<String> storeNames, String mode) => transaction(storeNames, mode);
diff --git a/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate b/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate
index fec4341..1b13a76 100644
--- a/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate
@@ -35,7 +35,7 @@
   @DomName('MessageEvent.data')
   @DocsEditable()
   dynamic get data => convertNativeToDart_SerializedScriptValue(
-      _blink.BlinkMessageEvent.instance.data_Getter_(unwrap_jso(this)));
+      _blink.BlinkMessageEvent.instance.data_Getter_(this));
 
 $else
   // TODO(alanknight): This really should be generated by the
@@ -48,8 +48,8 @@
   @JSName('data')
   @DomName('MessageEvent.data')
   @DocsEditable()
-  @Creates('Null')
-  @Returns('Object|Null')
+  @annotation_Creates_SerializedScriptValue
+  @annotation_Returns_SerializedScriptValue
   final dynamic _get_data;
 
 $endif
diff --git a/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate b/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
index de07dcb..8a3e409 100644
--- a/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
+++ b/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
@@ -20,13 +20,7 @@
   }
 $if DARTIUM
   @DocsEditable()
-  $if JSINTEROP
-  static MutationObserver _create(callback) => wrap_jso(_blink.BlinkMutationObserver.instance.constructorCallback_1_((mutations, observer) {
-    callback(wrap_jso(mutations), wrap_jso(observer));
-  }));
-  $else
   static MutationObserver _create(callback) => _blink.BlinkMutationObserver.instance.constructorCallback_1_(callback);
-  $endif
 $endif
 
   /**
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index 17bc601..4362733 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -200,14 +200,7 @@
 $if DART2JS
   Node._created() : super._created();
 $else
-  Node._created() : super._created() {
-    // By this point blink_jsObject should be setup if it's not then we weren't
-    // called by the registerElement createdCallback - probably created() was
-    // called directly which is verboten.
-    if (this.blink_jsObject == null) {
-      throw new DomException.jsInterop("the created constructor cannot be called directly");
-    }
-  }
+  Node._created() : super._created();
 $endif
 
   /**
@@ -304,7 +297,7 @@
    */
   @DomName('Node.childNodes')
   @DocsEditable()
-  List<Node> get childNodes => wrap_jso(_blink.BlinkNode.instance.childNodes_Getter_(unwrap_jso(this)));
+  List<Node> get childNodes => _blink.BlinkNode.instance.childNodes_Getter_(this);
 $else
   /**
    * A list of this node's children.
diff --git a/tools/dom/templates/html/impl/impl_SVGCursorElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGCursorElement.darttemplate
index 1aa46f4..9983a3e 100644
--- a/tools/dom/templates/html/impl/impl_SVGCursorElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGCursorElement.darttemplate
@@ -9,11 +9,11 @@
 $!MEMBERS
 $if DARTIUM
   // Override these methods for Dartium _SVGCursorElement can't be abstract.
-  StringList get requiredExtensions => wrap_jso(_blink.BlinkSVGCursorElement.instance.requiredExtensions_Getter_(unwrap_jso(this)));
-  StringList get requiredFeatures => wrap_jso(_blink.BlinkSVGCursorElement.instance.requiredFeatures_Getter_(unwrap_jso(this)));
-  StringList get systemLanguage => wrap_jso(_blink.BlinkSVGCursorElement.instance.systemLanguage_Getter_(unwrap_jso(this)));
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGCursorElement.instance.href_Getter_(unwrap_jso(this)));
-  bool hasExtension(String extension) => _blink.BlinkSVGCursorElement.instance.hasExtension_Callback_1_(unwrap_jso(this), extension);
+  StringList get requiredExtensions => _blink.BlinkSVGCursorElement.instance.requiredExtensions_Getter_(this);
+  StringList get requiredFeatures => _blink.BlinkSVGCursorElement.instance.requiredFeatures_Getter_(this);
+  StringList get systemLanguage => _blink.BlinkSVGCursorElement.instance.systemLanguage_Getter_(this);
+  AnimatedString get href => _blink.BlinkSVGCursorElement.instance.href_Getter_(this);
+  bool hasExtension(String extension) => _blink.BlinkSVGCursorElement.instance.hasExtension_Callback_1_(this, extension);
 $endif
 }
 
diff --git a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
index b41f7ec..fec3eb6 100644
--- a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
@@ -146,18 +146,8 @@
 
 $if JSINTEROP
   set _svgClassName(AnimatedString value) =>
-      _blink.BlinkSVGElement.instance.className_Setter_(unwrap_jso(this), unwrap_jso(value));
+      _blink.BlinkSVGElement.instance.className_Setter_(this, value);
 
-  String get className => _svgClassName.baseVal;
-
-  // Unbelievable hack. We can't create an SvgAnimatedString, but we can get
-  // the existing one and change its baseVal. Then we call the blink setter directly
-  // TODO(alanknight): Handle suppressing the SVGAnimated<*> better
-  set className(String s) {
-    var oldClass = _svgClassName;
-    oldClass.baseVal = s;
-    _svgClassName = oldClass;
-  }
 $endif
 $!MEMBERS
 }
diff --git a/tools/dom/templates/html/impl/impl_SVGFEDropShadowElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGFEDropShadowElement.darttemplate
index 96363a8..6f51e04 100644
--- a/tools/dom/templates/html/impl/impl_SVGFEDropShadowElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGFEDropShadowElement.darttemplate
@@ -9,11 +9,11 @@
 $!MEMBERS
 $if DARTIUM
   // Override these methods for Dartium _SVGFEDropShadowElement can't be abstract.
-  AnimatedLength get height => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.height_Getter_(unwrap_jso(this)));
-  AnimatedString get result => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.result_Getter_(unwrap_jso(this)));
-  AnimatedLength get width => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.width_Getter_(unwrap_jso(this)));
-  AnimatedLength get x => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.x_Getter_(unwrap_jso(this)));
-  AnimatedLength get y => wrap_jso(_blink.BlinkSVGFEDropShadowElement.instance.y_Getter_(unwrap_jso(this)));
+  AnimatedLength get height => _blink.BlinkSVGFEDropShadowElement.instance.height_Getter_(this);
+  AnimatedString get result => _blink.BlinkSVGFEDropShadowElement.instance.result_Getter_(this);
+  AnimatedLength get width => _blink.BlinkSVGFEDropShadowElement.instance.width_Getter_(this);
+  AnimatedLength get x => _blink.BlinkSVGFEDropShadowElement.instance.x_Getter_(this);
+  AnimatedLength get y => _blink.BlinkSVGFEDropShadowElement.instance.y_Getter_(this);
 $endif
 }
 
diff --git a/tools/dom/templates/html/impl/impl_SVGGlyphRefElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGGlyphRefElement.darttemplate
index 4c88084..fd1178e 100644
--- a/tools/dom/templates/html/impl/impl_SVGGlyphRefElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGGlyphRefElement.darttemplate
@@ -9,7 +9,7 @@
 $!MEMBERS
 $if DARTIUM
   // Override these methods for Dartium _SVGGlyphRefElement can't be abstract.
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGGlyphRefElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGGlyphRefElement.instance.href_Getter_(this);
 $endif
 }
 
diff --git a/tools/dom/templates/html/impl/impl_SVGMPathElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGMPathElement.darttemplate
index 59e012e..649cbcf 100644
--- a/tools/dom/templates/html/impl/impl_SVGMPathElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGMPathElement.darttemplate
@@ -9,7 +9,7 @@
 $!MEMBERS
 $if DARTIUM
   // Override these methods for Dartium _SVGMPathElement can't be abstract.
-  AnimatedString get href => wrap_jso(_blink.BlinkSVGMPathElement.instance.href_Getter_(unwrap_jso(this)));
+  AnimatedString get href => _blink.BlinkSVGMPathElement.instance.href_Getter_(this);
 $endif
 }
 
diff --git a/tools/dom/templates/html/impl/impl_ServiceWorkerMessageEvent.darttemplate b/tools/dom/templates/html/impl/impl_ServiceWorkerMessageEvent.darttemplate
new file mode 100644
index 0000000..4cfa667
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_ServiceWorkerMessageEvent.darttemplate
@@ -0,0 +1,38 @@
+// 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.
+
+// WARNING: Do not edit - generated code.
+
+part of $LIBRARYNAME;
+
+// TODO(alanknight): Provide a nicer constructor that uses named parameters
+// rather than an initialization map.
+$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
+
+$if DARTIUM
+  // TODO(alanknight): This really should be generated by the
+  // _OutputConversion in the systemnative.py script, but that doesn't
+  // use those conversions right now, so do this as a one-off.
+  @DomName('ServiceWorkerMessageEvent.data')
+  @DocsEditable()
+  dynamic get data => convertNativeToDart_SerializedScriptValue(
+      _blink.BlinkMessageEvent.instance.data_Getter_(this));
+$else
+  // TODO(alanknight): This really should be generated by the
+  // _OutputConversion in the systemnative.py script, but that doesn't
+  // use those conversions right now, so do this as a one-off.
+  @DomName('ServiceWorkerMessageEvent.data')
+  @DocsEditable()
+  dynamic get data => convertNativeToDart_SerializedScriptValue(this._get_data);
+
+  @JSName('data')
+  @DomName('ServiceWorkerMessageEvent.data')
+  @DocsEditable()
+  @annotation_Creates_SerializedScriptValue
+  @annotation_Returns_SerializedScriptValue
+  final dynamic _get_data;
+$endif
+
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_Touch.darttemplate b/tools/dom/templates/html/impl/impl_Touch.darttemplate
index bab04a5..889485d 100644
--- a/tools/dom/templates/html/impl/impl_Touch.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Touch.darttemplate
@@ -20,14 +20,14 @@
   int get __radiusX => JS('num', '#.radiusX', this).round();
   int get __radiusY => JS('num', '#.radiusY', this).round();
 $else
-  int get __clientX => _blink.BlinkTouch.instance.clientX_Getter_(unwrap_jso(this)).round();
-  int get __clientY => _blink.BlinkTouch.instance.clientY_Getter_(unwrap_jso(this)).round();
-  int get __screenX => _blink.BlinkTouch.instance.screenX_Getter_(unwrap_jso(this)).round();
-  int get __screenY => _blink.BlinkTouch.instance.screenY_Getter_(unwrap_jso(this)).round();
-  int get __pageX => _blink.BlinkTouch.instance.pageX_Getter_(unwrap_jso(this)).round();
-  int get __pageY => _blink.BlinkTouch.instance.pageY_Getter_(unwrap_jso(this)).round();
-  int get __radiusX => _blink.BlinkTouch.instance.radiusX_Getter_(unwrap_jso(this)).round();
-  int get __radiusY => _blink.BlinkTouch.instance.radiusY_Getter_(unwrap_jso(this)).round();
+  int get __clientX => _blink.BlinkTouch.instance.clientX_Getter_(this).round();
+  int get __clientY => _blink.BlinkTouch.instance.clientY_Getter_(this).round();
+  int get __screenX => _blink.BlinkTouch.instance.screenX_Getter_(this).round();
+  int get __screenY => _blink.BlinkTouch.instance.screenY_Getter_(this).round();
+  int get __pageX => _blink.BlinkTouch.instance.pageX_Getter_(this).round();
+  int get __pageY => _blink.BlinkTouch.instance.pageY_Getter_(this).round();
+  int get __radiusX => _blink.BlinkTouch.instance.radiusX_Getter_(this).round();
+  int get __radiusY => _blink.BlinkTouch.instance.radiusY_Getter_(this).round();
 $endif
 
   @DomName('Touch.clientX')
diff --git a/tools/dom/templates/html/impl/impl_UIEvent.darttemplate b/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
index 223dc0a..5894720 100644
--- a/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
@@ -24,12 +24,4 @@
     return e;
   }
 $!MEMBERS
-
-  @DomName('UIEvent.layerX')
-  @DomName('UIEvent.layerY')
-  Point get layer => new Point(_layerX, _layerY);
-
-  @DomName('UIEvent.pageX')
-  @DomName('UIEvent.pageY')
-  Point get page => new Point(_pageX, _pageY);
 }
diff --git a/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate b/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
index a78940e..cb6f865 100644
--- a/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
@@ -11,85 +11,66 @@
    * Sets the currently bound texture to [data].
    *
    * [data] can be either an [ImageElement], a
-   * [CanvasElement], a [VideoElement], or an [ImageData] object.
+   * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
    *
-   * To use [texImage2d] with a TypedData object, use [texImage2dTyped].
-   *
+   * This is deprecated in favor of [texImage2D].
    */
-$if DART2JS
-  @JSName('texImage2D')
-  void texImage2DUntyped(int targetTexture, int levelOfDetail, 
-      int internalFormat, int format, int type, data) native;
-$else
-  void texImage2DUntyped(int targetTexture, int levelOfDetail, 
+  @Deprecated("Use texImage2D")
+  void texImage2DUntyped(int targetTexture, int levelOfDetail,
       int internalFormat, int format, int type, data) {
-    if (data is ImageElement) {
-      texImage2DImage(targetTexture, levelOfDetail, internalFormat, format,
-          type, data);
-    } else if (data is ImageData) {
-      texImage2DImageData(targetTexture, levelOfDetail, internalFormat, format,
-          type, data);
-    } else if (data is CanvasElement) {
-      texImage2DCanvas(targetTexture, levelOfDetail, internalFormat, format,
-          type, data);
-    } else {
-      texImage2DVideo(targetTexture, levelOfDetail, internalFormat, format,
-          type, data);
-    }
+    texImage2D(targetTexture, levelOfDetail, internalFormat, format, type, data);
   }
-$endif
 
   /**
    * Sets the currently bound texture to [data].
+   *
+   * This is deprecated in favour of [texImage2D].
    */
-$if DART2JS
-  @JSName('texImage2D')
-  void texImage2DTyped(int targetTexture, int levelOfDetail,
-      int internalFormat, int width, int height, int border, int format,
-      int type, TypedData data) native;
-$else
+  @Deprecated("Use texImage2D")
   void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat,
       int width, int height, int border, int format, int type, TypedData data) {
     texImage2D(targetTexture, levelOfDetail, internalFormat,
         width, height, border, format, type, data);
   }
-$endif
 
   /**
    * Updates a sub-rectangle of the currently bound texture to [data].
    *
    * [data] can be either an [ImageElement], a
-   * [CanvasElement], a [VideoElement], or an [ImageData] object.
-   *
-   * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped].
+   * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
    *
    */
-$if DART2JS
-  @JSName('texSubImage2D')
+  @Deprecated("Use texSubImage2D")
   void texSubImage2DUntyped(int targetTexture, int levelOfDetail,
-      int xOffset, int yOffset, int format, int type, data) native;
-$else
-  void texSubImage2DUntyped(int targetTexture, int levelOfDetail, 
       int xOffset, int yOffset, int format, int type, data) {
     texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
         format, type, data);
   }
-$endif
 
   /**
    * Updates a sub-rectangle of the currently bound texture to [data].
    */
-$if DART2JS
-  @JSName('texSubImage2D')
+  @Deprecated("Use texSubImage2D")
   void texSubImage2DTyped(int targetTexture, int levelOfDetail,
       int xOffset, int yOffset, int width, int height, int border, int format,
-      int type, TypedData data) native;
-$else
-  void texSubImage2DTyped(int targetTexture, int levelOfDetail,
-      int xOffset, int yOffset, int width, int height, int format,
       int type, TypedData data) {
     texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
         width, height, format, type, data);
   }
-$endif
+
+  /**
+   * Set the bufferData to [data].
+   */
+  @Deprecated("Use bufferData")
+  void bufferDataTyped(int target, TypedData data, int usage) {
+    bufferData(target, data, usage);
+  }
+
+  /**
+   * Set the bufferSubData to [data].
+   */
+  @Deprecated("Use bufferSubData")
+  void bufferSubDataTyped(int target, int offset, TypedData data) {
+    bufferSubData(target, offset, data);
+  }
 }
diff --git a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
index d4f5d3f..f141680 100644
--- a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
@@ -44,7 +44,7 @@
         type, convertDartToNative_Dictionary(options));
 
 $else
-    return wrap_jso(_blink.BlinkWheelEvent.instance.constructorCallback_2_(type, convertDartToNative_Dictionary(options)));
+    return _blink.BlinkWheelEvent.instance.constructorCallback_2_(type, convertDartToNative_Dictionary(options));
 $endif
   }
 
diff --git a/tools/dom/templates/html/impl/impl_Window.darttemplate b/tools/dom/templates/html/impl/impl_Window.darttemplate
index 0b64409..521fd00 100644
--- a/tools/dom/templates/html/impl/impl_Window.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Window.darttemplate
@@ -297,19 +297,19 @@
 $else
   @DomName('Window.pageXOffset')
   @DocsEditable()
-  int get pageXOffset => _blink.BlinkWindow.instance.pageXOffset_Getter_(unwrap_jso(this)).round();
+  int get pageXOffset => _blink.BlinkWindow.instance.pageXOffset_Getter_(this).round();
 
   @DomName('Window.pageYOffset')
   @DocsEditable()
-  int get pageYOffset => _blink.BlinkWindow.instance.pageYOffset_Getter_(unwrap_jso(this)).round();
+  int get pageYOffset => _blink.BlinkWindow.instance.pageYOffset_Getter_(this).round();
 
   @DomName('Window.scrollX')
   @DocsEditable()
-  int get scrollX => _blink.BlinkWindow.instance.scrollX_Getter_(unwrap_jso(this)).round();
+  int get scrollX => _blink.BlinkWindow.instance.scrollX_Getter_(this).round();
 
   @DomName('Window.scrollY')
   @DocsEditable()
-  int get scrollY => _blink.BlinkWindow.instance.scrollY_Getter_(unwrap_jso(this)).round();
+  int get scrollY => _blink.BlinkWindow.instance.scrollY_Getter_(this).round();
 $endif
 }
 
diff --git a/tools/dom/templates/html/impl/impl_WorkerLocation.darttemplate b/tools/dom/templates/html/impl/impl_WorkerLocation.darttemplate
index 73623a9..97ace81 100644
--- a/tools/dom/templates/html/impl/impl_WorkerLocation.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WorkerLocation.darttemplate
@@ -9,15 +9,15 @@
 $!MEMBERS
 $if DARTIUM
   // Override these methods for Dartium _WorkerLocation can't be abstract.
-  String get hash => _blink.BlinkWorkerLocation.instance.hash_Getter_(unwrap_jso(this));
-  String get host => _blink.BlinkWorkerLocation.instance.host_Getter_(unwrap_jso(this));
-  String get hostname => _blink.BlinkWorkerLocation.instance.hostname_Getter_(unwrap_jso(this));
-  String get href => _blink.BlinkWorkerLocation.instance.href_Getter_(unwrap_jso(this));
-  String get origin => _blink.BlinkWorkerLocation.instance.origin_Getter_(unwrap_jso(this));
-  String get pathname => _blink.BlinkWorkerLocation.instance.pathname_Getter_(unwrap_jso(this));
-  String get port => _blink.BlinkWorkerLocation.instance.port_Getter_(unwrap_jso(this));
-  String get protocol => _blink.BlinkWorkerLocation.instance.protocol_Getter_(unwrap_jso(this));
-  String get search => _blink.BlinkWorkerLocation.instance.search_Getter_(unwrap_jso(this));
+  String get hash => _blink.BlinkWorkerLocation.instance.hash_Getter_(this);
+  String get host => _blink.BlinkWorkerLocation.instance.host_Getter_(this);
+  String get hostname => _blink.BlinkWorkerLocation.instance.hostname_Getter_(this);
+  String get href => _blink.BlinkWorkerLocation.instance.href_Getter_(this);
+  String get origin => _blink.BlinkWorkerLocation.instance.origin_Getter_(this);
+  String get pathname => _blink.BlinkWorkerLocation.instance.pathname_Getter_(this);
+  String get port => _blink.BlinkWorkerLocation.instance.port_Getter_(this);
+  String get protocol => _blink.BlinkWorkerLocation.instance.protocol_Getter_(this);
+  String get search => _blink.BlinkWorkerLocation.instance.search_Getter_(this);
 $endif
 }
 
diff --git a/tools/dom/templates/html/impl/impl_WorkerNavigator.darttemplate b/tools/dom/templates/html/impl/impl_WorkerNavigator.darttemplate
index 137390c..18707fb 100644
--- a/tools/dom/templates/html/impl/impl_WorkerNavigator.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WorkerNavigator.darttemplate
@@ -9,15 +9,15 @@
 $!MEMBERS
 $if DARTIUM
   // Override these methods for Dartium _WorkerNavigator can't be abstract.
-  String get appCodeName => _blink.BlinkWorkerNavigator.instance.appCodeName_Getter_(unwrap_jso(this));
-  String get appName => _blink.BlinkWorkerNavigator.instance.appCodeName_Getter_(unwrap_jso(this));
-  String get appVersion => _blink.BlinkWorkerNavigator.instance.appVersion_Getter_(unwrap_jso(this));
-  bool get dartEnabled => _blink.BlinkWorkerNavigator.instance.dartEnabled_Getter_(unwrap_jso(this));
-  String get platform => _blink.BlinkWorkerNavigator.instance.platform_Getter_(unwrap_jso(this));
-  String get product => _blink.BlinkWorkerNavigator.instance.product_Getter_(unwrap_jso(this));
-  String get userAgent => _blink.BlinkWorkerNavigator.instance.userAgent_Getter_(unwrap_jso(this));
-  int get hardwareConcurrency => _blink.BlinkWorkerNavigator.instance.hardwareConcurrency_Getter_(unwrap_jso(this));
-  bool get onLine => _blink.BlinkWorkerNavigator.instance.onLine_Getter_(unwrap_jso(this));
+  String get appCodeName => _blink.BlinkWorkerNavigator.instance.appCodeName_Getter_(this);
+  String get appName => _blink.BlinkWorkerNavigator.instance.appCodeName_Getter_(this);
+  String get appVersion => _blink.BlinkWorkerNavigator.instance.appVersion_Getter_(this);
+  bool get dartEnabled => _blink.BlinkWorkerNavigator.instance.dartEnabled_Getter_(this);
+  String get platform => _blink.BlinkWorkerNavigator.instance.platform_Getter_(this);
+  String get product => _blink.BlinkWorkerNavigator.instance.product_Getter_(this);
+  String get userAgent => _blink.BlinkWorkerNavigator.instance.userAgent_Getter_(this);
+  int get hardwareConcurrency => _blink.BlinkWorkerNavigator.instance.hardwareConcurrency_Getter_(this);
+  bool get onLine => _blink.BlinkWorkerNavigator.instance.onLine_Getter_(this);
 $endif
 }
 
diff --git a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
index 7ee15d1..9ad00f6 100644
--- a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
+++ b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
@@ -404,9 +404,9 @@
 $if JSINTEROP
   void open(String method, String url, {bool async, String user, String password}) {
     if (async == null && user == null && password == null) {
-      _blink.BlinkXMLHttpRequest.instance.open_Callback_2_(unwrap_jso(this), method, url);
+      _blink.BlinkXMLHttpRequest.instance.open_Callback_2_(this, method, url);
     } else {
-      _blink.BlinkXMLHttpRequest.instance.open_Callback_5_(unwrap_jso(this), method, url, async, user, password);
+      _blink.BlinkXMLHttpRequest.instance.open_Callback_5_(this, method, url, async, user, password);
     }
   }
 $else
diff --git a/tools/full-coverage.dart b/tools/full-coverage.dart
deleted file mode 100644
index d7ff76f..0000000
--- a/tools/full-coverage.dart
+++ /dev/null
@@ -1,507 +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.
-
-import "dart:async";
-import "dart:convert";
-import "dart:io";
-import "dart:isolate";
-
-import "package:args/args.dart";
-import "package:path/path.dart";
-
-/// [Environment] stores gathered arguments information.
-class Environment {
-  String sdkRoot;
-  String pkgRoot;
-  var input;
-  var output;
-  int workers;
-  bool prettyPrint = false;
-  bool lcov = false;
-  bool expectMarkers;
-  bool verbose;
-}
-
-/// [Resolver] resolves imports with respect to a given environment.
-class Resolver {
-  static const DART_PREFIX = "dart:";
-  static const PACKAGE_PREFIX = "package:";
-  static const FILE_PREFIX = "file://";
-  static const HTTP_PREFIX = "http://";
-
-  Map _env;
-  List failed = [];
-
-  Resolver(this._env);
-
-  /// Returns the absolute path wrt. to the given environment or null, if the
-  /// import could not be resolved.
-  resolve(String import) {
-    if (import.startsWith(DART_PREFIX)) {
-      if (_env["sdkRoot"] == null) {
-        // No sdk-root given, do not resolve dart: URIs.
-        return null;
-      }
-      var slashPos = import.indexOf("/");
-      var filePath;
-      if (slashPos != -1) {
-        var path = import.substring(DART_PREFIX.length, slashPos);
-        // Drop patch files, since we don't have their source in the compiled
-        // SDK.
-        if (path.endsWith("-patch")) {
-          failed.add(import);
-          return null;
-        }
-        // Canonicalize path. For instance: _collection-dev => _collection_dev.
-        path = path.replaceAll("-", "_");
-        filePath = "${_env["sdkRoot"]}"
-                   "/${path}${import.substring(slashPos, import.length)}";
-      } else {
-        // Resolve 'dart:something' to be something/something.dart in the SDK.
-        var lib = import.substring(DART_PREFIX.length, import.length);
-        filePath = "${_env["sdkRoot"]}/${lib}/${lib}.dart";
-      }
-      return filePath;
-    }
-    if (import.startsWith(PACKAGE_PREFIX)) {
-      if (_env["pkgRoot"] == null) {
-        // No package-root given, do not resolve package: URIs.
-        return null;
-      }
-      var filePath =
-          "${_env["pkgRoot"]}"
-          "/${import.substring(PACKAGE_PREFIX.length, import.length)}";
-      return filePath;
-    }
-    if (import.startsWith(FILE_PREFIX)) {
-      var filePath = fromUri(Uri.parse(import));
-      return filePath;
-    }
-    if (import.startsWith(HTTP_PREFIX)) {
-      return import;
-    }
-    // We cannot deal with anything else.
-    failed.add(import);
-    return null;
-  }
-}
-
-/// Converts the given hitmap to lcov format and appends the result to
-/// env.output.
-///
-/// Returns a [Future] that completes as soon as all map entries have been
-/// emitted.
-Future lcov(Map hitmap) {
-  var emitOne = (key) {
-    var v = hitmap[key];
-    StringBuffer entry = new StringBuffer();
-    entry.write("SF:${key}\n");
-    v.keys.toList()
-          ..sort()
-          ..forEach((k) {
-      entry.write("DA:${k},${v[k]}\n");
-    });
-    entry.write("end_of_record\n");
-    env.output.write(entry.toString());
-    return new Future.value(null);
-  };
-
-  return Future.forEach(hitmap.keys, emitOne);
-}
-
-/// Converts the given hitmap to a pretty-print format and appends the result
-/// to env.output.
-///
-/// Returns a [Future] that completes as soon as all map entries have been
-/// emitted.
-Future prettyPrint(Map hitMap, List failedLoads) {
-  var emitOne = (key) {
-    var v = hitMap[key];
-    var c = new Completer();
-    loadResource(key).then((lines) {
-      if (lines == null) {
-        failedLoads.add(key);
-        c.complete();
-        return;
-      }
-      env.output.write("${key}\n");
-      for (var line = 1; line <= lines.length; line++) {
-        String prefix = "       ";
-        if (v.containsKey(line)) {
-          prefix = v[line].toString();
-          StringBuffer b = new StringBuffer();
-          for (int i = prefix.length; i < 7; i++) {
-            b.write(" ");
-          }
-          b.write(prefix);
-          prefix = b.toString();
-        }
-        env.output.write("${prefix}|${lines[line-1]}\n");
-      }
-      c.complete();
-    });
-    return c.future;
-  };
-
-  return Future.forEach(hitMap.keys, emitOne);
-}
-
-/// Load an import resource and return a [Future] with a [List] of its lines.
-/// Returns [null] instead of a list if the resource could not be loaded.
-Future<List> loadResource(String import) {
-  if (import.startsWith("http")) {
-    Completer c = new Completer();
-    HttpClient client = new HttpClient();
-    client.getUrl(Uri.parse(import))
-        .then((HttpClientRequest request) {
-          return request.close();
-        })
-        .then((HttpClientResponse response) {
-          response.transform(new StringDecoder()).toList().then((data) {
-            c.complete(data);
-            httpClient.close();
-          });
-        })
-        .catchError((e) {
-          c.complete(null);
-        });
-    return c.future;
-  } else {
-    File f = new File(import);
-    return f.readAsLines()
-        .catchError((e) {
-          return new Future.value(null);
-        });
-  }
-}
-
-/// Creates a single hitmap from a raw json object. Throws away all entries that
-/// are not resolvable.
-Map createHitmap(String rawJson, Resolver resolver) {
-  Map<String, Map<int,int>> hitMap = {};
-
-  addToMap(source, line, count) {
-    if (!hitMap[source].containsKey(line)) {
-      hitMap[source][line] = 0;
-    }
-    hitMap[source][line] += count;
-  }
-
-  JSON.decode(rawJson)['coverage'].forEach((Map e) {
-    String source = resolver.resolve(e["source"]);
-    if (source == null) {
-      // Couldnt resolve import, so skip this entry.
-      return;
-    }
-    if (!hitMap.containsKey(source)) {
-      hitMap[source] = {};
-    }
-    var hits = e["hits"];
-    // hits is a flat array of the following format:
-    // [ <line|linerange>, <hitcount>,...]
-    // line: number.
-    // linerange: "<line>-<line>".
-    for (var i = 0; i < hits.length; i += 2) {
-      var k = hits[i];
-      if (k is num) {
-        // Single line.
-        addToMap(source, k, hits[i+1]);
-      }
-      if (k is String) {
-        // Linerange. We expand line ranges to actual lines at this point.
-        var splitPos = k.indexOf("-");
-        int start = int.parse(k.substring(0, splitPos));
-        int end = int.parse(k.substring(splitPos + 1, k.length));
-        for (var j = start; j <= end; j++) {
-          addToMap(source, j, hits[i+1]);
-        }
-      }
-    }
-  });
-  return hitMap;
-}
-
-/// Merges [newMap] into [result].
-mergeHitmaps(Map newMap, Map result) {
-  newMap.forEach((String file, Map v) {
-    if (result.containsKey(file)) {
-      v.forEach((int line, int cnt) {
-        if (result[file][line] == null) {
-          result[file][line] = cnt;
-        } else {
-          result[file][line] += cnt;
-        }
-      });
-    } else {
-      result[file] = v;
-    }
-  });
-}
-
-/// Given an absolute path absPath, this function returns a [List] of files
-/// are contained by it if it is a directory, or a [List] containing the file if
-/// it is a file.
-List filesToProcess(String absPath) {
-  var filePattern = new RegExp(r"^dart-cov-\d+-\d+.json$");
-  if (FileSystemEntity.isDirectorySync(absPath)) {
-    return new Directory(absPath).listSync(recursive: true)
-        .where((entity) => entity is File &&
-            filePattern.hasMatch(basename(entity.path)))
-        .toList();
-  }
-
-  return [new File(absPath)];
-}
-
-worker(WorkMessage msg) {
-  final start = new DateTime.now().millisecondsSinceEpoch;
-
-  var env = msg.environment;
-  List files = msg.files;
-  Resolver resolver = new Resolver(env);
-  var workerHitmap = {};
-  files.forEach((File fileEntry) {
-    // Read file sync, as it only contains 1 object.
-    String contents = fileEntry.readAsStringSync();
-    if (contents.length > 0) {
-      mergeHitmaps(createHitmap(contents, resolver), workerHitmap);
-    }
-  });
-
-  if (env["verbose"]) {
-    final end = new DateTime.now().millisecondsSinceEpoch;
-    print("${msg.workerName}: Finished processing ${files.length} files. "
-          "Took ${end - start} ms.");
-  }
-
-  msg.replyPort.send(new ResultMessage(workerHitmap, resolver.failed));
-}
-
-class WorkMessage {
-  final String workerName;
-  final Map environment;
-  final List files;
-  final SendPort replyPort;
-  WorkMessage(this.workerName, this.environment, this.files, this.replyPort);
-}
-
-class ResultMessage {
-  final hitmap;
-  final failedResolves;
-  ResultMessage(this.hitmap, this.failedResolves);
-}
-
-final env = new Environment();
-
-List<List> split(List list, int nBuckets) {
-  var buckets = new List(nBuckets);
-  var bucketSize = list.length ~/ nBuckets;
-  var leftover = list.length % nBuckets;
-  var taken = 0;
-  var start = 0;
-  for (int i = 0; i < nBuckets; i++) {
-    var end = (i < leftover) ? (start + bucketSize + 1) : (start + bucketSize);
-    buckets[i] = list.sublist(start, end);
-    taken += buckets[i].length;
-    start = end;
-  }
-  if (taken != list.length) throw "Error splitting";
-  return buckets;
-}
-
-Future<ResultMessage> spawnWorker(name, environment, files) {
-  RawReceivePort port = new RawReceivePort();
-  var completer = new Completer();
-  port.handler = ((ResultMessage msg) {
-    completer.complete(msg);
-    port.close();
-  });
-  var msg = new WorkMessage(name, environment, files, port.sendPort);
-  Isolate.spawn(worker, msg);
-  return completer.future;
-}
-
-main(List<String> arguments) {
-  parseArgs(arguments);
-
-  List files = filesToProcess(env.input);
-
-  List failedResolves = [];
-  List failedLoads = [];
-  Map globalHitmap = {};
-  int start = new DateTime.now().millisecondsSinceEpoch;
-
-  if (env.verbose) {
-    print("Environment:");
-    print("  # files: ${files.length}");
-    print("  # workers: ${env.workers}");
-    print("  sdk-root: ${env.sdkRoot}");
-    print("  package-root: ${env.pkgRoot}");
-  }
-
-  Map sharedEnv = {
-    "sdkRoot": env.sdkRoot,
-    "pkgRoot": env.pkgRoot,
-    "verbose": env.verbose,
-  };
-
-  // Create workers.
-  int workerId = 0;
-  var results = split(files, env.workers).map((workerFiles) {
-    var result = spawnWorker("Worker ${workerId++}", sharedEnv, workerFiles);
-    return result.then((ResultMessage message) {
-      mergeHitmaps(message.hitmap, globalHitmap);
-      failedResolves.addAll(message.failedResolves);
-    });
-  });
-
-  Future.wait(results).then((ignore) {
-    // All workers are done. Process the data.
-    if (env.verbose) {
-      final end = new DateTime.now().millisecondsSinceEpoch;
-      print("Done creating a global hitmap. Took ${end - start} ms.");
-    }
-
-    Future out;
-    if (env.prettyPrint) {
-      out = prettyPrint(globalHitmap, failedLoads);
-    }
-    if (env.lcov) {
-      out = lcov(globalHitmap);
-    }
-
-    out.then((_) {
-      env.output.close().then((_) {
-        if (env.verbose) {
-          final end = new DateTime.now().millisecondsSinceEpoch;
-          print("Done flushing output. Took ${end - start} ms.");
-        }
-      });
-
-      if (env.verbose) {
-        if (failedResolves.length > 0) {
-          print("Failed to resolve:");
-          failedResolves.toSet().forEach((e) {
-            print("  ${e}");
-          });
-        }
-        if (failedLoads.length > 0) {
-          print("Failed to load:");
-          failedLoads.toSet().forEach((e) {
-            print("  ${e}");
-          });
-        }
-      }
-    });
-  });
-}
-
-/// Checks the validity of the provided arguments. Does not initialize actual
-/// processing.
-parseArgs(List<String> arguments) {
-  var parser = new ArgParser();
-
-  parser.addOption("sdk-root", abbr: "s",
-                   help: "path to the SDK root");
-  parser.addOption("package-root", abbr: "p",
-                   help: "override path to the package root "
-                         "(default: inherited from dart)");
-  parser.addOption("in", abbr: "i",
-                   help: "input(s): may be file or directory");
-  parser.addOption("out", abbr: "o",
-                   help: "output: may be file or stdout",
-                   defaultsTo: "stdout");
-  parser.addOption("workers", abbr: "j",
-                   help: "number of workers",
-                   defaultsTo: "1");
-  parser.addFlag("pretty-print", abbr: "r",
-                 help: "convert coverage data to pretty print format",
-                 negatable: false);
-  parser.addFlag("lcov", abbr :"l",
-                 help: "convert coverage data to lcov format",
-                 negatable: false);
-  parser.addFlag("verbose", abbr :"v",
-                 help: "verbose output",
-                 negatable: false);
-  parser.addFlag("help", abbr: "h",
-                 help: "show this help",
-                 negatable: false);
-
-  var args = parser.parse(arguments);
-
-  printUsage() {
-    print("Usage: dart full-coverage.dart [OPTION...]\n");
-    print(parser.getUsage());
-  }
-
-  fail(String msg) {
-    print("\n$msg\n");
-    printUsage();
-    exit(1);
-  }
-
-  if (args["help"]) {
-    printUsage();
-    exit(0);
-  }
-
-  env.sdkRoot = args["sdk-root"];
-  if (env.sdkRoot == null) {
-    if (Platform.environment.containsKey("SDK_ROOT")) {
-      env.sdkRoot =
-        join(absolute(normalize(Platform.environment["SDK_ROOT"])), "lib");
-    }
-  } else {
-    env.sdkRoot = join(absolute(normalize(env.sdkRoot)), "lib");
-  }
-  if ((env.sdkRoot != null) && !FileSystemEntity.isDirectorySync(env.sdkRoot)) {
-    fail("Provided SDK root '${args["sdk-root"]}' is not a valid SDK "
-         "top-level directory");
-  }
-
-  env.pkgRoot = args["package-root"];
-  if (env.pkgRoot != null) {
-    var pkgRootUri = Uri.parse(env.pkgRoot);
-    if (pkgRootUri.scheme == "file") {
-      if (!FileSystemEntity.isDirectorySync(pkgRootUri.toFilePath())) {
-        fail("Provided package root '${args["package-root"]}' is not directory.");
-      }
-    }
-  } else {
-    env.pkgRoot = Platform.packageRoot;
-  }
-
-  if (args["in"] == null) {
-    fail("No input files given.");
-  } else {
-    env.input = absolute(normalize(args["in"]));
-    if (!FileSystemEntity.isDirectorySync(env.input) &&
-        !FileSystemEntity.isFileSync(env.input)) {
-      fail("Provided input '${args["in"]}' is neither a directory, nor a file.");
-    }
-  }
-
-  if (args["out"] == "stdout") {
-    env.output = stdout;
-  } else {
-    env.output = absolute(normalize(args["out"]));
-    env.output = new File(env.output).openWrite();
-  }
-
-  env.lcov = args["lcov"];
-  if (args["pretty-print"] && env.lcov) {
-    fail("Choose one of pretty-print or lcov output");
-  } else if (!env.lcov) {
-    // Use pretty-print either explicitly or by default.
-    env.prettyPrint = true;
-  }
-
-  try {
-    env.workers = int.parse("${args["workers"]}");
-  } catch (e) {
-    fail("Invalid worker count: $e");
-  }
-
-  env.verbose = args["verbose"];
-}
diff --git a/tools/gyp/configurations.gypi b/tools/gyp/configurations.gypi
index 84237ca..6a4b796 100644
--- a/tools/gyp/configurations.gypi
+++ b/tools/gyp/configurations.gypi
@@ -660,6 +660,33 @@
         ],
       },
 
+      'DebugAndroidX64': {
+        'inherit_from': [
+          'Dart_Base', 'Dart_x64_Base', 'Dart_Debug',
+          'Dart_Android_Base',
+          'Dart_Android_x64_Base',
+          'Dart_Android_Debug',
+        ],
+      },
+
+      'ReleaseAndroidX64': {
+        'inherit_from': [
+          'Dart_Base', 'Dart_x64_Base', 'Dart_Release',
+          'Dart_Android_Base',
+          'Dart_Android_x64_Base',
+          'Dart_Android_Release',
+        ],
+      },
+
+      'ProductAndroidX64': {
+        'inherit_from': [
+          'Dart_Base', 'Dart_x64_Base', 'Dart_Product',
+          'Dart_Android_Base',
+          'Dart_Android_x64_Base',
+          'Dart_Android_Product',
+        ],
+      },
+
       'DebugAndroidARM': {
         'inherit_from': [
           'Dart_Base', 'Dart_arm_Base', 'Dart_Debug',
diff --git a/tools/gyp/configurations_android.gypi b/tools/gyp/configurations_android.gypi
index 0d6133d..8708d6d 100644
--- a/tools/gyp/configurations_android.gypi
+++ b/tools/gyp/configurations_android.gypi
@@ -148,6 +148,58 @@
           }],
         ],
       },
+      'Dart_Android_x64_Base': {
+        'abstract': 1,
+        'variables': {
+          'android_sysroot': '<(android_ndk_root)/platforms/android-21/arch-x86_64',
+          'android_ndk_include': '<(android_sysroot)/usr/include',
+          'android_ndk_lib': '<(android_sysroot)/usr/lib64',
+        },
+        'target_conditions': [
+          ['_toolset=="target"', {
+            'cflags': [
+              '-fPIE',
+              '--sysroot=<(android_sysroot)',
+              '-I<(android_ndk_include)',
+              '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
+            ],
+            'target_conditions': [
+              ['_type=="executable"', {
+                'ldflags!': ['-Wl,--exclude-libs=ALL,-shared',],
+              }],
+              ['_type=="shared_library"', {
+                'ldflags': ['-Wl,-shared,-Bsymbolic',],
+              }],
+            ],
+            'ldflags': [
+              'x64', '>(_type)', 'target',
+              '-nostdlib',
+              '-Wl,--no-undefined',
+              # Don't export symbols from statically linked libraries.
+              '-Wl,--exclude-libs=ALL',
+              '-Wl,-rpath-link=<(android_ndk_lib)',
+              '-L<(android_ndk_lib)',
+              '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86_64',
+              '-z',
+              'muldefs',
+              '-Bdynamic',
+              '-pie',
+              '-Wl,-dynamic-linker,/system/bin/linker',
+              '-Wl,--gc-sections',
+              '-Wl,-z,nocopyreloc',
+              # crtbegin_dynamic.o should be the last item in ldflags.
+              '<(android_ndk_lib)/crtbegin_dynamic.o',
+            ],
+            'ldflags!': [
+              '-pthread',  # Not supported by Android toolchain.
+            ],
+          }],
+          ['_toolset=="host"', {
+            'cflags': [ '-pthread' ],
+            'ldflags': [ '-pthread' ],
+          }],
+        ],
+      },
       'Dart_Android_arm_Base': {
         'abstract': 1,
         'variables': {
diff --git a/tools/gyp/xcode.gypi b/tools/gyp/xcode.gypi
index 1c0faff..1799baf 100644
--- a/tools/gyp/xcode.gypi
+++ b/tools/gyp/xcode.gypi
@@ -18,8 +18,8 @@
     # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
     # deployment target to 10.5.  Other projects, such as O3D, may override
     # these defaults.
-    'mac_sdk%': '<!(python <(DEPTH)/tools/gyp/find_mac_sdk.py 10.6)',
-    'mac_deployment_target%': '10.6',
+    'mac_sdk%': '<!(python <(DEPTH)/tools/gyp/find_mac_sdk.py 10.8)',
+    'mac_deployment_target%': '10.8',
   },
   'xcode_settings': {
     # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
diff --git a/tools/precompilation/test_linux.sh b/tools/precompilation/test_linux.sh
index 514ac04..056fde0 100755
--- a/tools/precompilation/test_linux.sh
+++ b/tools/precompilation/test_linux.sh
@@ -8,8 +8,8 @@
 
 ./tools/build.py -mdebug -ax64 runtime
 
-./out/DebugX64/dart_no_snapshot --gen-precompiled-snapshot --package-root=out/DebugX64/packages/ "$1"
+./out/DebugX64/dart_bootstrap --gen-precompiled-snapshot --package-root=out/DebugX64/packages/ "$1"
 
 gcc -nostartfiles -m64 -shared -Wl,-soname,libprecompiled.so -o libprecompiled.so precompiled.S
 
-LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD" gdb -ex run --args ./out/DebugX64/dart_precompiled_runtime --run-precompiled-snapshot not_used.dart
+gdb -ex run --args ./out/DebugX64/dart_precompiled_runtime --run-precompiled-snapshot=$PWD not_used.dart
diff --git a/tools/precompilation/test_linux_simarm.sh b/tools/precompilation/test_linux_simarm.sh
index bd0f1f0..13d09eb 100755
--- a/tools/precompilation/test_linux_simarm.sh
+++ b/tools/precompilation/test_linux_simarm.sh
@@ -8,8 +8,8 @@
 
 ./tools/build.py -mdebug -asimarm runtime
 
-./out/DebugSIMARM/dart_no_snapshot --gen-precompiled-snapshot --package-root=out/DebugX64/packages/ "$1"
+./out/DebugSIMARM/dart_bootstrap --gen-precompiled-snapshot --package-root=out/DebugX64/packages/ "$1"
 
 gcc -nostartfiles -m32 -shared -Wl,-soname,libprecompiled.so -o libprecompiled.so precompiled.S
 
-LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD" gdb -ex run --args ./out/DebugSIMARM/dart_precompiled_runtime --run-precompiled-snapshot not_used.dart
+gdb -ex run --args ./out/DebugSIMARM/dart_precompiled_runtime --run-precompiled-snapshot=$PWD not_used.dart
diff --git a/tools/precompilation/test_macos.sh b/tools/precompilation/test_macos.sh
index ed90d12..1b97e36 100755
--- a/tools/precompilation/test_macos.sh
+++ b/tools/precompilation/test_macos.sh
@@ -8,8 +8,8 @@
 
 ./tools/build.py -mdebug -ax64 runtime
 
-./xcodebuild/DebugX64/dart_no_snapshot --gen-precompiled-snapshot --package-root=xcodebuild/DebugX64/packages/ "$1"
+./xcodebuild/DebugX64/dart_bootstrap --gen-precompiled-snapshot --package-root=xcodebuild/DebugX64/packages/ "$1"
 
 clang -nostartfiles -m64 -dynamiclib -o libprecompiled.dylib precompiled.S
 
-LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD" lldb -- ./xcodebuild/DebugX64/dart_precompiled_runtime --run-precompiled-snapshot not_used.dart
+lldb -- ./xcodebuild/DebugX64/dart_precompiled_runtime --run-precompiled-snapshot=$PWD not_used.dart
diff --git a/tools/testing/dart/android.dart b/tools/testing/dart/android.dart
index d514bd6..1d39071 100644
--- a/tools/testing/dart/android.dart
+++ b/tools/testing/dart/android.dart
@@ -12,17 +12,14 @@
 import "path.dart";
 import "utils.dart";
 
-Future _executeCommand(String executable,
-                       List<String> args,
-                       [String stdin = ""]) {
+Future _executeCommand(String executable, List<String> args,
+    [String stdin = ""]) {
   return _executeCommandRaw(executable, args, stdin).then((results) => null);
 }
 
-Future _executeCommandGetOutput(String executable,
-                                List<String> args,
-                                [String stdin = ""]) {
-  return _executeCommandRaw(executable, args, stdin)
-      .then((output) => output);
+Future _executeCommandGetOutput(String executable, List<String> args,
+    [String stdin = ""]) {
+  return _executeCommandRaw(executable, args, stdin).then((output) => output);
 }
 
 /**
@@ -32,11 +29,12 @@
  * If the exit code of the process was nonzero it will complete with an error.
  * If starting the process failed, it will complete with an error as well.
  */
-Future _executeCommandRaw(String executable,
-                          List<String> args,
-                          [String stdin = ""]) {
+Future _executeCommandRaw(String executable, List<String> args,
+    [String stdin = ""]) {
   Future<String> getOutput(Stream<List<int>> stream) {
-    return stream.transform(UTF8.decoder).toList()
+    return stream
+        .transform(UTF8.decoder)
+        .toList()
         .then((data) => data.join(""));
   }
 
@@ -47,16 +45,18 @@
     }
     process.stdin.close();
 
-    var futures = [getOutput(process.stdout),
-                   getOutput(process.stderr),
-                   process.exitCode];
+    var futures = [
+      getOutput(process.stdout),
+      getOutput(process.stderr),
+      process.exitCode
+    ];
     return Future.wait(futures).then((results) {
       bool success = results[2] == 0;
       if (!success) {
         var error = "Running: '\$ $executable ${args.join(' ')}' failed:"
-                    "stdout: \n ${results[0]}"
-                    "stderr: \n ${results[1]}"
-                    "exitCode: \n ${results[2]}";
+            "stdout: \n ${results[0]}"
+            "stderr: \n ${results[1]}"
+            "exitCode: \n ${results[2]}";
         throw new Exception(error);
       } else {
         DebugLogger.info("Success: $executable finished");
@@ -153,8 +153,18 @@
  */
 class AndroidHelper {
   static Future createAvd(String name, String target) {
-    var args = ['--silent', 'create', 'avd', '--name', '$name',
-                '--target', '$target', '--force', '--abi', 'armeabi-v7a'];
+    var args = [
+      '--silent',
+      'create',
+      'avd',
+      '--name',
+      '$name',
+      '--target',
+      '$target',
+      '--force',
+      '--abi',
+      'armeabi-v7a'
+    ];
     // We're adding newlines to stdin to simulate <enter>.
     return _executeCommand("android", args, "\n\n\n\n");
   }
@@ -189,15 +199,15 @@
     checkUntilBooted() {
       _adbCommandGetOutput(['shell', 'getprop', 'sys.boot_completed'])
           .then((String stdout) {
-            stdout = stdout.trim();
-            if (stdout == '1') {
-              completer.complete();
-            } else {
-              new Timer(timeout, checkUntilBooted);
-            }
-          }).catchError((error) {
-            new Timer(timeout, checkUntilBooted);
-          });
+        stdout = stdout.trim();
+        if (stdout == '1') {
+          completer.complete();
+        } else {
+          new Timer(timeout, checkUntilBooted);
+        }
+      }).catchError((error) {
+        new Timer(timeout, checkUntilBooted);
+      });
     }
     checkUntilBooted();
     return completer.future;
@@ -250,9 +260,16 @@
    * Start the given intent on the device.
    */
   Future startActivity(Intent intent) {
-    var arguments = ['shell', 'am', 'start', '-W',
-                     '-a', intent.action,
-                     '-n', "${intent.package}/${intent.activity}"];
+    var arguments = [
+      'shell',
+      'am',
+      'start',
+      '-W',
+      '-a',
+      intent.action,
+      '-n',
+      "${intent.package}/${intent.activity}"
+    ];
     if (intent.dataUri != null) {
       arguments.addAll(['-d', intent.dataUri]);
     }
@@ -312,10 +329,12 @@
     return Process.run('adb', ['devices']).then((ProcessResult result) {
       if (result.exitCode != 0) {
         throw new Exception("Could not list devices [stdout: ${result.stdout},"
-                            "stderr: ${result.stderr}]");
+            "stderr: ${result.stderr}]");
       }
-      return _deviceLineRegexp.allMatches(result.stdout)
-          .map((Match m) => m.group(1)).toList();
+      return _deviceLineRegexp
+          .allMatches(result.stdout)
+          .map((Match m) => m.group(1))
+          .toList();
     });
   }
 }
@@ -331,4 +350,3 @@
 
   Intent(this.action, this.package, this.activity, [this.dataUri]);
 }
-
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index a6d061c..2776569 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -7,6 +7,7 @@
 import "dart:convert" show LineSplitter, UTF8, JSON;
 import "dart:core";
 import "dart:io";
+import "dart:math" show max, min;
 
 import 'android.dart';
 import 'http_server.dart';
@@ -66,9 +67,8 @@
 
   Browser();
 
-  factory Browser.byName(String name,
-                         String executablePath,
-                         [bool checkedMode = false]) {
+  factory Browser.byName(String name, String executablePath,
+      [bool checkedMode = false]) {
     var browser;
     if (name == 'firefox') {
       browser = new Firefox();
@@ -89,12 +89,21 @@
     return browser;
   }
 
-  static const List<String> SUPPORTED_BROWSERS =
-    const ['safari', 'ff', 'firefox', 'chrome', 'ie9', 'ie10',
-           'ie11', 'dartium'];
+  static const List<String> SUPPORTED_BROWSERS = const [
+    'safari',
+    'ff',
+    'firefox',
+    'chrome',
+    'ie9',
+    'ie10',
+    'ie11',
+    'dartium'
+  ];
 
-  static const List<String> BROWSERS_WITH_WINDOW_SUPPORT =
-      const ['ie11', 'ie10'];
+  static const List<String> BROWSERS_WITH_WINDOW_SUPPORT = const [
+    'ie11',
+    'ie10'
+  ];
 
   // TODO(kustermann): add standard support for chrome on android
   static bool supportedBrowser(String name) {
@@ -143,10 +152,10 @@
    * Start the browser using the supplied argument.
    * This sets up the error handling and usage logging.
    */
-  Future<bool> startBrowser(String command,
-                            List<String> arguments,
-                            {Map<String,String> environment}) {
-    return Process.start(command, arguments, environment: environment)
+  Future<bool> startBrowserProcess(String command, List<String> arguments,
+      {Map<String, String> environment}) {
+    return Process
+        .start(command, arguments, environment: environment)
         .then((startedProcess) {
       _logEvent("Started browser using $command ${arguments.join(' ')}");
       process = startedProcess;
@@ -168,7 +177,7 @@
       // handles alive even though the direct subprocess is dead.
       Timer watchdogTimer;
 
-      void closeStdout([_]){
+      void closeStdout([_]) {
         if (!stdoutIsDone) {
           stdoutDone.complete();
           stdoutIsDone = true;
@@ -191,7 +200,7 @@
       }
 
       stdoutSubscription =
-        process.stdout.transform(UTF8.decoder).listen((data) {
+          process.stdout.transform(UTF8.decoder).listen((data) {
         _addStdout(data);
       }, onError: (error) {
         // This should _never_ happen, but we really want this in the log
@@ -200,21 +209,21 @@
       }, onDone: closeStdout);
 
       stderrSubscription =
-        process.stderr.transform(UTF8.decoder).listen((data) {
+          process.stderr.transform(UTF8.decoder).listen((data) {
         _addStderr(data);
       }, onError: (error) {
         // This should _never_ happen, but we really want this in the log
         // if it actually does due to dart:io or vm bug.
         _logEvent("An error occured in the process stderr handling: $error");
-      },  onDone: closeStderr);
+      }, onDone: closeStderr);
 
       process.exitCode.then((exitCode) {
         _logEvent("Browser closed with exitcode $exitCode");
 
         if (!stdoutIsDone || !stderrIsDone) {
           watchdogTimer = new Timer(MAX_STDIO_DELAY, () {
-            DebugLogger.warning(
-                "$MAX_STDIO_DELAY_PASSED_MESSAGE (browser: $this)");
+            DebugLogger
+                .warning("$MAX_STDIO_DELAY_PASSED_MESSAGE (browser: $this)");
             watchdogTimer = null;
             stdoutSubscription.cancel();
             stderrSubscription.cancel();
@@ -254,7 +263,7 @@
    * where it will be reported for failing tests.  Used to report which
    * android device a failing test is running on.
    */
-  void logBrowserInfoToTestBrowserOutput() { }
+  void logBrowserInfoToTestBrowserOutput() {}
 
   String toString();
 
@@ -273,19 +282,22 @@
    * Directories where safari stores state. We delete these if the deleteCache
    * is set
    */
-  static const List<String> CACHE_DIRECTORIES =
-      const ["Library/Caches/com.apple.Safari",
-             "Library/Safari",
-             "Library/Saved Application State/com.apple.Safari.savedState",
-             "Library/Caches/Metadata/Safari"];
-
+  static const List<String> CACHE_DIRECTORIES = const [
+    "Library/Caches/com.apple.Safari",
+    "Library/Safari",
+    "Library/Saved Application State/com.apple.Safari.savedState",
+    "Library/Caches/Metadata/Safari"
+  ];
 
   Future<bool> allowPopUps() {
     var command = "defaults";
-    var args = ["write", "com.apple.safari",
-                "com.apple.Safari.ContentPageGroupIdentifier."
-                "WebKit2JavaScriptCanOpenWindowsAutomatically",
-                "1"];
+    var args = [
+      "write",
+      "com.apple.safari",
+      "com.apple.Safari.ContentPageGroupIdentifier."
+          "WebKit2JavaScriptCanOpenWindowsAutomatically",
+      "1"
+    ];
     return Process.run(command, args).then((result) {
       if (result.exitCode != 0) {
         _logEvent("Could not disable pop-up blocking for safari");
@@ -301,12 +313,13 @@
     return directory.exists().then((exists) {
       if (exists) {
         _logEvent("Deleting ${paths.current}");
-        return directory.delete(recursive: true)
-	    .then((_) => deleteIfExists(paths))
-	    .catchError((error) {
-	      _logEvent("Failure trying to delete ${paths.current}: $error");
-	      return false;
-	    });
+        return directory
+            .delete(recursive: true)
+            .then((_) => deleteIfExists(paths))
+            .catchError((error) {
+          _logEvent("Failure trying to delete ${paths.current}: $error");
+          return false;
+        });
       } else {
         _logEvent("${paths.current} is not present");
         return deleteIfExists(paths);
@@ -379,10 +392,12 @@
         return getVersion().then((version) {
           _logEvent("Got version: $version");
           return Directory.systemTemp.createTemp().then((userDir) {
-            _cleanup = () { userDir.deleteSync(recursive: true); };
+            _cleanup = () {
+              userDir.deleteSync(recursive: true);
+            };
             _createLaunchHTML(userDir.path, url);
             var args = ["${userDir.path}/launch.html"];
-            return startBrowser(_binary, args);
+            return startBrowserProcess(_binary, args);
           });
         }).catchError((error) {
           _logEvent("Running $_binary --version failed with $error");
@@ -395,7 +410,6 @@
   String toString() => "Safari";
 }
 
-
 class Chrome extends Browser {
   String _version = "Version not found yet";
 
@@ -429,7 +443,6 @@
     });
   }
 
-
   Future<bool> start(String url) {
     _logEvent("Starting chrome browser on: $url");
     // Get the version and log that.
@@ -438,11 +451,19 @@
       _logEvent("Got version: $_version");
 
       return Directory.systemTemp.createTemp().then((userDir) {
-        _cleanup = () { userDir.deleteSync(recursive: true); };
-        var args = ["--user-data-dir=${userDir.path}", url,
-                    "--disable-extensions", "--disable-popup-blocking",
-                    "--bwsi", "--no-first-run"];
-        return startBrowser(_binary, args, environment: _getEnvironment());
+        _cleanup = () {
+          userDir.deleteSync(recursive: true);
+        };
+        var args = [
+          "--user-data-dir=${userDir.path}",
+          url,
+          "--disable-extensions",
+          "--disable-popup-blocking",
+          "--bwsi",
+          "--no-first-run"
+        ];
+        return startBrowserProcess(_binary, args,
+            environment: _getEnvironment());
       });
     }).catchError((e) {
       _logEvent("Running $_binary --version failed with $e");
@@ -453,14 +474,14 @@
   String toString() => "Chrome";
 }
 
-
 class SafariMobileSimulator extends Safari {
   /**
    * Directories where safari simulator stores state. We delete these if the
    * deleteCache is set
    */
-  static const List<String> CACHE_DIRECTORIES =
-      const ["Library/Application Support/iPhone Simulator/7.1/Applications"];
+  static const List<String> CACHE_DIRECTORIES = const [
+    "Library/Application Support/iPhone Simulator/7.1/Applications"
+  ];
 
   // Clears the cache if the static deleteCache flag is set.
   // Returns false if the command to actually clear the cache did not complete.
@@ -476,33 +497,34 @@
     return clearCache().then((success) {
       if (!success) {
         _logEvent("Could not clear cache, exiting");
-	return false;
+        return false;
       }
-      var args = ["-SimulateApplication",
-                  "/Applications/Xcode.app/Contents/Developer/Platforms/"
-                  "iPhoneSimulator.platform/Developer/SDKs/"
-                  "iPhoneSimulator7.1.sdk/Applications/MobileSafari.app/"
-                  "MobileSafari",
-                  "-u", url];
-      return startBrowser(_binary, args)
-        .catchError((e) {
-          _logEvent("Running $_binary --version failed with $e");
-          return false;
-        });
+      var args = [
+        "-SimulateApplication",
+        "/Applications/Xcode.app/Contents/Developer/Platforms/"
+            "iPhoneSimulator.platform/Developer/SDKs/"
+            "iPhoneSimulator7.1.sdk/Applications/MobileSafari.app/"
+            "MobileSafari",
+        "-u",
+        url
+      ];
+      return startBrowserProcess(_binary, args).catchError((e) {
+        _logEvent("Running $_binary --version failed with $e");
+        return false;
+      });
     });
   }
 
   String toString() => "SafariMobileSimulator";
 }
 
-
 class Dartium extends Chrome {
   final bool checkedMode;
 
   Dartium(this.checkedMode);
 
   Map<String, String> _getEnvironment() {
-    var environment = new Map<String,String>.from(Platform.environment);
+    var environment = new Map<String, String>.from(Platform.environment);
     // By setting this environment variable, dartium will forward "print()"
     // calls in dart to the top-level javascript function "dartPrint()" if
     // available.
@@ -518,10 +540,12 @@
 
 class IE extends Browser {
   Future<String> getVersion() {
-    var args = ["query",
-                "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Internet Explorer",
-                "/v",
-                "svcVersion"];
+    var args = [
+      "query",
+      "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Internet Explorer",
+      "/v",
+      "svcVersion"
+    ];
     return Process.run("reg", args).then((result) {
       if (result.exitCode == 0) {
         // The string we get back looks like this:
@@ -543,27 +567,26 @@
     var localAppData = Platform.environment['LOCALAPPDATA'];
 
     Directory dir = new Directory("$localAppData\\Microsoft\\"
-                                  "Internet Explorer\\Recovery");
-    return dir.delete(recursive: true)
-      .then((_) { return true; })
-      .catchError((error) {
-        _logEvent("Deleting recovery dir failed with $error");
-        return false;
-      });
+        "Internet Explorer\\Recovery");
+    return dir.delete(recursive: true).then((_) {
+      return true;
+    }).catchError((error) {
+      _logEvent("Deleting recovery dir failed with $error");
+      return false;
+    });
   }
 
   Future<bool> start(String url) {
     _logEvent("Starting ie browser on: $url");
     return clearCache().then((_) => getVersion()).then((version) {
       _logEvent("Got version: $version");
-      return startBrowser(_binary, [url]);
+      return startBrowserProcess(_binary, [url]);
     });
   }
+
   String toString() => "IE";
-
 }
 
-
 class AndroidBrowserConfig {
   final String name;
   final String package;
@@ -572,20 +595,14 @@
   AndroidBrowserConfig(this.name, this.package, this.activity, this.action);
 }
 
-
 final contentShellOnAndroidConfig = new AndroidBrowserConfig(
     'ContentShellOnAndroid',
     'org.chromium.content_shell_apk',
     '.ContentShellActivity',
     'android.intent.action.VIEW');
 
-
-final dartiumOnAndroidConfig = new AndroidBrowserConfig(
-    'DartiumOnAndroid',
-    'com.google.android.apps.chrome',
-    '.Main',
-    'android.intent.action.VIEW');
-
+final dartiumOnAndroidConfig = new AndroidBrowserConfig('DartiumOnAndroid',
+    'com.google.android.apps.chrome', '.Main', 'android.intent.action.VIEW');
 
 class AndroidBrowser extends Browser {
   final bool checkedMode;
@@ -597,8 +614,8 @@
   }
 
   Future<bool> start(String url) {
-    var intent = new Intent(
-        _config.action, _config.package, _config.activity, url);
+    var intent =
+        new Intent(_config.action, _config.package, _config.activity, url);
     return _adbDevice.waitForBootCompleted().then((_) {
       return _adbDevice.forceStop(_config.package);
     }).then((_) {
@@ -630,14 +647,13 @@
   }
 
   void logBrowserInfoToTestBrowserOutput() {
-    _testBrowserOutput.stdout.write(
-        'Android device id: ${_adbDevice.deviceId}\n');
+    _testBrowserOutput.stdout
+        .write('Android device id: ${_adbDevice.deviceId}\n');
   }
 
   String toString() => _config.name;
 }
 
-
 class AndroidChrome extends Browser {
   static const String viewAction = 'android.intent.action.VIEW';
   static const String mainAction = 'android.intent.action.MAIN';
@@ -646,14 +662,13 @@
   static const String firefoxPackage = 'org.mozilla.firefox';
   static const String turnScreenOnPackage = 'com.google.dart.turnscreenon';
 
-  AndroidEmulator _emulator;
   AdbDevice _adbDevice;
 
   AndroidChrome(this._adbDevice);
 
   Future<bool> start(String url) {
-    var browserIntent = new Intent(
-        viewAction, browserPackage, '.BrowserActivity', url);
+    var browserIntent =
+        new Intent(viewAction, browserPackage, '.BrowserActivity', url);
     var chromeIntent = new Intent(viewAction, chromePackage, '.Main', url);
     var firefoxIntent = new Intent(viewAction, firefoxPackage, '.App', url);
     var turnScreenOnIntent =
@@ -702,14 +717,13 @@
   }
 
   void logBrowserInfoToTestBrowserOutput() {
-    _testBrowserOutput.stdout.write(
-        'Android device id: ${_adbDevice.deviceId}\n');
+    _testBrowserOutput.stdout
+        .write('Android device id: ${_adbDevice.deviceId}\n');
   }
 
   String toString() => "chromeOnAndroid";
 }
 
-
 class Firefox extends Browser {
   static const String enablePopUp =
       'user_pref("dom.disable_open_during_load", false);';
@@ -741,13 +755,19 @@
 
       return Directory.systemTemp.createTemp().then((userDir) {
         _createPreferenceFile(userDir.path);
-        _cleanup = () { userDir.deleteSync(recursive: true); };
-        var args = ["-profile", "${userDir.path}",
-                    "-no-remote", "-new-instance", url];
-        var environment = new Map<String,String>.from(Platform.environment);
+        _cleanup = () {
+          userDir.deleteSync(recursive: true);
+        };
+        var args = [
+          "-profile",
+          "${userDir.path}",
+          "-no-remote",
+          "-new-instance",
+          url
+        ];
+        var environment = new Map<String, String>.from(Platform.environment);
         environment["MOZ_CRASHREPORTER_DISABLE"] = "1";
-        return startBrowser(_binary, args, environment: environment);
-
+        return startBrowserProcess(_binary, args, environment: environment);
       });
     }).catchError((e) {
       _logEvent("Running $_binary --version failed with $e");
@@ -758,11 +778,10 @@
   String toString() => "Firefox";
 }
 
-
 /**
  * Describes the current state of a browser used for testing.
  */
-class BrowserTestingStatus {
+class BrowserStatus {
   Browser browser;
   BrowserTest currentTest;
 
@@ -772,12 +791,11 @@
   BrowserTest lastTest;
   bool timeout = false;
   Timer nextTestTimeout;
-  Stopwatch timeSinceRestart = new Stopwatch();
+  Stopwatch timeSinceRestart = new Stopwatch()..start();
 
-  BrowserTestingStatus(Browser this.browser);
+  BrowserStatus(Browser this.browser);
 }
 
-
 /**
  * Describes a single test to be run in the browser.
  */
@@ -805,12 +823,9 @@
     id = _idCounter++;
   }
 
-  String toJSON() => JSON.encode({'url': url,
-                                  'id': id,
-                                  'isHtmlTest': false});
+  String toJSON() => JSON.encode({'url': url, 'id': id, 'isHtmlTest': false});
 }
 
-
 /**
  * Describes a test with a custom HTML page to be run in the browser.
  */
@@ -818,15 +833,16 @@
   List<String> expectedMessages;
 
   HtmlTest(url, doneCallback, timeout, this.expectedMessages)
-      : super(url, doneCallback, timeout) { }
+      : super(url, doneCallback, timeout) {}
 
-  String toJSON() => JSON.encode({'url': url,
-                                  'id': id,
-                                  'isHtmlTest': true,
-                                  'expectedMessages': expectedMessages});
+  String toJSON() => JSON.encode({
+        'url': url,
+        'id': id,
+        'isHtmlTest': true,
+        'expectedMessages': expectedMessages
+      });
 }
 
-
 /* Describes the output of running the test in a browser */
 class BrowserTestOutput {
   final Duration delayUntilTestStarted;
@@ -837,149 +853,157 @@
   final BrowserOutput browserOutput;
   final bool didTimeout;
 
-  BrowserTestOutput(
-      this.delayUntilTestStarted, this.duration, this.lastKnownMessage,
-      this.browserOutput, {this.didTimeout: false});
+  BrowserTestOutput(this.delayUntilTestStarted, this.duration,
+      this.lastKnownMessage, this.browserOutput,
+      {this.didTimeout: false});
 }
 
-/**
- * Encapsulates all the functionality for running tests in browsers.
- * The interface is rather simple. After starting, the runner tests
- * are simply added to the queue and a the supplied callbacks are called
- * whenever a test completes.
- */
+/// Encapsulates all the functionality for running tests in browsers.
+/// Tests are added to the queue and the supplied callbacks are called
+/// when a test completes.
+/// BrowserTestRunner starts up to maxNumBrowser instances of the browser,
+/// to run the tests, starting them sequentially, as needed, so only
+/// one is starting up at a time.
+/// BrowserTestRunner starts a BrowserTestingServer, which serves a
+/// driver page to the browsers, serves tests, and receives results and
+/// requests back from the browsers.
 class BrowserTestRunner {
   static const int MAX_NEXT_TEST_TIMEOUTS = 10;
   static const Duration NEXT_TEST_TIMEOUT = const Duration(seconds: 60);
   static const Duration RESTART_BROWSER_INTERVAL = const Duration(seconds: 60);
 
+  /// If the queue was recently empty, don't start another browser.
+  static const Duration MIN_NONEMPTY_QUEUE_TIME = const Duration(seconds: 1);
+
   final Map configuration;
+  BrowserTestingServer testingServer;
 
   final String localIp;
   String browserName;
-  final int maxNumBrowsers;
+  int maxNumBrowsers;
   bool checkedMode;
+  int numBrowsers = 0;
   // Used to send back logs from the browser (start, stop etc)
   Function logger;
-  int browserIdCount = 0;
 
+  int browserIdCounter = 1;
+
+  bool testingServerStarted = false;
   bool underTermination = false;
   int numBrowserGetTestTimeouts = 0;
-
+  DateTime lastEmptyTestQueueTime = new DateTime.now();
+  String _currentStartingBrowserId;
   List<BrowserTest> testQueue = new List<BrowserTest>();
-  Map<String, BrowserTestingStatus> browserStatus =
-      new Map<String, BrowserTestingStatus>();
+  Map<String, BrowserStatus> browserStatus = new Map<String, BrowserStatus>();
 
   var adbDeviceMapping = new Map<String, AdbDevice>();
+  List<AdbDevice> idleAdbDevices;
+
   // This cache is used to guarantee that we never see double reporting.
   // If we do we need to provide developers with this information.
   // We don't add urls to the cache until we have run it.
   Map<int, String> testCache = new Map<int, String>();
+
   Map<int, String> doubleReportingOutputs = new Map<int, String>();
+  List<String> timedOut = [];
 
-  BrowserTestingServer testingServer;
+  // We will start a new browser when the test queue hasn't been empty
+  // recently, we have fewer than maxNumBrowsers browsers, and there is
+  // no other browser instance currently starting up.
+  bool get queueWasEmptyRecently {
+    return testQueue.isEmpty ||
+        new DateTime.now().difference(lastEmptyTestQueueTime) <
+            MIN_NONEMPTY_QUEUE_TIME;
+  }
 
-  /**
-   * The TestRunner takes the testingServer in as a constructor parameter in
-   * case we wish to have a testing server with different behavior (such as the
-   * case for performance testing.
-   */
-  BrowserTestRunner(this.configuration,
-                    this.localIp,
-                    this.browserName,
-                    this.maxNumBrowsers,
-                    {BrowserTestingServer this.testingServer}) {
+  // While a browser is starting, but has not requested its first test, its
+  // browserId is stored in _currentStartingBrowserId.
+  // When no browser is currently starting, _currentStartingBrowserId is null.
+  bool get aBrowserIsCurrentlyStarting => _currentStartingBrowserId != null;
+  void markCurrentlyStarting(String id) {
+    _currentStartingBrowserId = id;
+  }
+
+  void markNotCurrentlyStarting(String id) {
+    if (_currentStartingBrowserId == id) _currentStartingBrowserId = null;
+  }
+
+  // If [browserName] doesn't support opening new windows, we use new iframes
+  // instead.
+  bool get useIframe =>
+      !Browser.BROWSERS_WITH_WINDOW_SUPPORT.contains(browserName);
+
+  /// The optional testingServer parameter allows callers to pass in
+  /// a testing server with different behavior than the  default
+  /// BrowserTestServer. The url handlers of the testingServer are
+  /// overwritten, so an existing handler can't be shared between instances.
+  BrowserTestRunner(
+      this.configuration, this.localIp, this.browserName, this.maxNumBrowsers,
+      {BrowserTestingServer this.testingServer}) {
     checkedMode = configuration['checked'];
+    if (browserName == 'ff') browserName = 'firefox';
   }
 
-  Future<bool> start() {
-    // If [browserName] doesn't support opening new windows, we use new iframes
-    // instead.
-    bool useIframe =
-        !Browser.BROWSERS_WITH_WINDOW_SUPPORT.contains(browserName);
+  Future start() async {
     if (testingServer == null) {
-      testingServer = new BrowserTestingServer(
-          configuration, localIp, useIframe);
+      testingServer =
+          new BrowserTestingServer(configuration, localIp, useIframe);
     }
-    return testingServer.start().then((_) {
-      testingServer.testDoneCallBack = handleResults;
-      testingServer.testStatusUpdateCallBack = handleStatusUpdate;
-      testingServer.testStartedCallBack = handleStarted;
-      testingServer.nextTestCallBack = getNextTest;
-      return getBrowsers().then((browsers) {
-        var futures = [];
-        for (var browser in browsers) {
-          var url = testingServer.getDriverUrl(browser.id);
-          var future = browser.start(url).then((success) {
-            if (success) {
-              var status = new BrowserTestingStatus(browser);
-              browserStatus[browser.id] = status;
-              status.nextTestTimeout = createNextTestTimer(status);
-              status.timeSinceRestart.start();
-            }
-            return success;
-          });
-          futures.add(future);
-        }
-        return Future.wait(futures).then((values) {
-          return !values.contains(false);
-        });
-      });
-    });
+    await testingServer.start();
+    testingServer
+      ..testDoneCallBack = handleResults
+      ..testStatusUpdateCallBack = handleStatusUpdate
+      ..testStartedCallBack = handleStarted
+      ..nextTestCallBack = getNextTest;
+    if (browserName == 'chromeOnAndroid') {
+      var idbNames = await AdbHelper.listDevices();
+      idleAdbDevices = new List.from(idbNames.map((id) => new AdbDevice(id)));
+      maxNumBrowsers = min(maxNumBrowsers, idleAdbDevices.length);
+    }
+    testingServerStarted = true;
+    requestBrowser();
   }
 
-  Future<List<Browser>> getBrowsers() {
-    // TODO(kustermann): This is a hackisch way to accomplish it and should
-    // be encapsulated
-    var browsersCompleter = new Completer();
-    var androidBrowserCreationMapping = {
-      'chromeOnAndroid' : (AdbDevice device) => new AndroidChrome(device),
-      'ContentShellOnAndroid' : (AdbDevice device) => new AndroidBrowser(
-          device,
-          contentShellOnAndroidConfig,
-          checkedMode,
-          configuration['drt']),
-      'DartiumOnAndroid' : (AdbDevice device) => new AndroidBrowser(
-          device,
-          dartiumOnAndroidConfig,
-          checkedMode,
-          configuration['dartium']),
-    };
-    if (androidBrowserCreationMapping.containsKey(browserName)) {
-      AdbHelper.listDevices().then((deviceIds) {
-        if (deviceIds.length > 0) {
-          var browsers = [];
-          for (int i = 0; i < deviceIds.length; i++) {
-            var id = "BROWSER$i";
-            var device = new AdbDevice(deviceIds[i]);
-            adbDeviceMapping[id] = device;
-            var browser = androidBrowserCreationMapping[browserName](device);
-            browsers.add(browser);
-            // We store this in case we need to kill the browser.
-            browser.id = id;
-          }
-          browsersCompleter.complete(browsers);
-        } else {
-          throw new StateError("No android devices found.");
-        }
-      });
+  /// requestBrowser() is called whenever we might want to start an additional
+  /// browser instance.
+  /// It is called when starting the BrowserTestRunner, and whenever a browser
+  /// is killed, whenever a new test is enqueued, or whenever a browser
+  /// finishes a test.
+  /// So we are guaranteed that this will always eventually be called, as long
+  /// as the test queue isn't empty.
+  void requestBrowser() {
+    if (!testingServerStarted) return;
+    if (underTermination) return;
+    if (numBrowsers == maxNumBrowsers) return;
+    if (aBrowserIsCurrentlyStarting) return;
+    if (numBrowsers > 0 && queueWasEmptyRecently) return;
+    createBrowser();
+  }
+
+  String getNextBrowserId() => "BROWSER${browserIdCounter++}";
+
+  void createBrowser() {
+    final String id = getNextBrowserId();
+    final String url = testingServer.getDriverUrl(id);
+    Browser browser;
+    if (browserName == 'chromeOnAndroid') {
+      AdbDevice device = idleAdbDevices.removeLast();
+      adbDeviceMapping[id] = device;
+      browser = new AndroidChrome(device);
     } else {
-      var browsers = [];
-      for (int i = 0; i < maxNumBrowsers; i++) {
-        var id = "BROWSER$browserIdCount";
-        browserIdCount++;
-        var browser = getInstance();
-        browsers.add(browser);
-        // We store this in case we need to kill the browser.
-        browser.id = id;
-      }
-      browsersCompleter.complete(browsers);
+      String path = Locations.getBrowserLocation(browserName, configuration);
+      browser = new Browser.byName(browserName, path, checkedMode);
+      browser.logger = logger;
     }
-    return browsersCompleter.future;
+    browser.id = id;
+    markCurrentlyStarting(id);
+    final status = new BrowserStatus(browser);
+    browserStatus[id] = status;
+    numBrowsers++;
+    status.nextTestTimeout = createNextTestTimer(status);
+    browser.start(url);
   }
 
-  var timedOut = [];
-
   void handleResults(String browserId, String output, int testId) {
     var status = browserStatus[browserId];
     if (testCache.containsKey(testId)) {
@@ -997,11 +1021,11 @@
 
       if (status.currentTest.id != testId) {
         print("Expected test id ${status.currentTest.id} for"
-              "${status.currentTest.url}");
+            "${status.currentTest.url}");
         print("Got test id ${testId}");
         print("Last test id was ${status.lastTest.id} for "
-              "${status.currentTest.url}");
-        throw("This should never happen, wrong test id");
+            "${status.currentTest.url}");
+        throw ("This should never happen, wrong test id");
       }
       testCache[testId] = status.currentTest.url;
 
@@ -1050,12 +1074,11 @@
     }
   }
 
-  void handleTimeout(BrowserTestingStatus status) {
+  void handleTimeout(BrowserStatus status) {
     // We simply kill the browser and starts up a new one!
     // We could be smarter here, but it does not seems like it is worth it.
     if (status.timeout) {
-      DebugLogger.error(
-          "Got test timeout for an already restarting browser");
+      DebugLogger.error("Got test timeout for an already restarting browser");
       return;
     }
     status.timeout = true;
@@ -1069,6 +1092,9 @@
       if (status.currentTest.lastKnownMessage.length > 0) {
         lastKnownMessage = status.currentTest.lastKnownMessage;
       }
+      if (status.lastTest != null) {
+        lastKnownMessage += '\nPrevious test was ${status.lastTest.url}';
+      }
       // Wait until the browser is closed before reporting the test as timeout.
       // This will enable us to capture stdout/stderr from the browser
       // (which might provide us with information about what went wrong).
@@ -1084,63 +1110,24 @@
 
       // We don't want to start a new browser if we are terminating.
       if (underTermination) return;
-      restartBrowser(id);
+      removeBrowser(id);
+      requestBrowser();
     });
   }
 
-  void restartBrowser(String id) {
-    if (browserName.contains('OnAndroid')) {
-      DebugLogger.info("Restarting browser $id");
-    }
-    var browser;
-    var new_id = id;
+  /// Remove a browser that has closed from our data structures that track
+  /// open browsers. Check if we want to replace it with a new browser.
+  void removeBrowser(String id) {
     if (browserName == 'chromeOnAndroid') {
-      browser = new AndroidChrome(adbDeviceMapping[id]);
-    } else if (browserName == 'ContentShellOnAndroid') {
-      browser = new AndroidBrowser(adbDeviceMapping[id],
-                                   contentShellOnAndroidConfig,
-                                   checkedMode,
-                                   configuration['drt']);
-    } else if (browserName == 'DartiumOnAndroid') {
-      browser = new AndroidBrowser(adbDeviceMapping[id],
-                                   dartiumOnAndroidConfig,
-                                   checkedMode,
-                                   configuration['dartium']);
-    } else {
-      browserStatus.remove(id);
-      browser = getInstance();
-      new_id = "BROWSER$browserIdCount";
-      browserIdCount++;
+      idleAdbDevices.add(adbDeviceMapping.remove(id));
     }
-    browser.id = new_id;
-    var status = new BrowserTestingStatus(browser);
-    browserStatus[new_id] = status;
-    status.nextTestTimeout = createNextTestTimer(status);
-    status.timeSinceRestart.start();
-    browser.start(testingServer.getDriverUrl(new_id)).then((success) {
-      // We may have started terminating in the mean time.
-      if (underTermination) {
-        if (status.nextTestTimeout != null) {
-          status.nextTestTimeout.cancel();
-          status.nextTestTimeout = null;
-        }
-        browser.close().then((success) {
-         // We should never hit this, print it out.
-          if (!success) {
-            print("Could not kill browser ($id) started due to timeout");
-          }
-        });
-        return;
-      }
-      if (!success) {
-        // TODO(ricow): Handle this better.
-        print("This is bad, should never happen, could not start browser");
-        exit(1);
-      }
-    });
+    markNotCurrentlyStarting(id);
+    browserStatus.remove(id);
+    --numBrowsers;
   }
 
   BrowserTest getNextTest(String browserId) {
+    markNotCurrentlyStarting(browserId);
     var status = browserStatus[browserId];
     if (status == null) return null;
     if (status.nextTestTimeout != null) {
@@ -1152,13 +1139,10 @@
     // We are currently terminating this browser, don't start a new test.
     if (status.timeout) return null;
 
-    // Restart content_shell and dartium on Android if they have been
+    // Restart Internet Explorer if it has been
     // running for longer than RESTART_BROWSER_INTERVAL. The tests have
     // had flaky timeouts, and this may help.
-    if ((browserName == 'ContentShellOnAndroid' ||
-         browserName == 'DartiumOnAndroid' ||
-         browserName == 'ie10' ||
-         browserName == 'ie11') &&
+    if ((browserName == 'ie10' || browserName == 'ie11') &&
         status.timeSinceRestart.elapsed > RESTART_BROWSER_INTERVAL) {
       var id = status.browser.id;
       // Reset stopwatch so we don't trigger again before restarting.
@@ -1166,13 +1150,20 @@
       status.browser.close().then((_) {
         // We don't want to start a new browser if we are terminating.
         if (underTermination) return;
-        restartBrowser(id);
+        removeBrowser(id);
+        requestBrowser();
       });
       // Don't send a test to the browser we are restarting.
       return null;
     }
 
     BrowserTest test = testQueue.removeLast();
+    // If our queue isn't empty, try starting more browsers
+    if (testQueue.isEmpty) {
+      lastEmptyTestQueueTime = new DateTime.now();
+    } else {
+      requestBrowser();
+    }
     if (status.currentTest == null) {
       status.currentTest = test;
       status.currentTest.lastKnownMessage = '';
@@ -1196,26 +1187,27 @@
     // browser, since a new test is being started.
     status.browser.resetTestBrowserOutput();
     status.browser.logBrowserInfoToTestBrowserOutput();
-    if (browserName.contains('OnAndroid')) {
-      DebugLogger.info("Browser $browserId getting test ${test.url}");
-    }
-
     return test;
   }
 
-  Timer createTimeoutTimer(BrowserTest test, BrowserTestingStatus status) {
-    return new Timer(new Duration(seconds: test.timeout),
-                     () { handleTimeout(status); });
+  /// Creates a timer that is active while a test is running on a browser.
+  Timer createTimeoutTimer(BrowserTest test, BrowserStatus status) {
+    return new Timer(new Duration(seconds: test.timeout), () {
+      handleTimeout(status);
+    });
   }
 
-  Timer createNextTestTimer(BrowserTestingStatus status) {
-    return new Timer(BrowserTestRunner.NEXT_TEST_TIMEOUT,
-                     () { handleNextTestTimeout(status); });
+  /// Creates a timer that is active while no test is running on the
+  /// browser. It has finished one test, and it has not requested a new test.
+  Timer createNextTestTimer(BrowserStatus status) {
+    return new Timer(BrowserTestRunner.NEXT_TEST_TIMEOUT, () {
+      handleNextTestTimeout(status);
+    });
   }
 
   void handleNextTestTimeout(status) {
-    DebugLogger.warning(
-        "Browser timed out before getting next test. Restarting");
+    DebugLogger
+        .warning("Browser timed out before getting next test. Restarting");
     if (status.timeout) return;
     numBrowserGetTestTimeouts++;
     if (numBrowserGetTestTimeouts >= MAX_NEXT_TEST_TIMEOUTS) {
@@ -1224,12 +1216,16 @@
       terminate().then((_) => exit(1));
     } else {
       status.timeout = true;
-      status.browser.close().then((_) => restartBrowser(status.browser.id));
+      status.browser.close().then((_) {
+        removeBrowser(status.browser.id);
+        requestBrowser();
+      });
     }
   }
 
-  void queueTest(BrowserTest test) {
+  void enqueueTest(BrowserTest test) {
     testQueue.add(test);
+    requestBrowser();
   }
 
   void printDoubleReportingTests() {
@@ -1252,44 +1248,30 @@
     }
   }
 
-  Future<bool> terminate() {
+  // TODO(26191): Call a unified fatalError(), that shuts down all subprocesses.
+  // This just kills the browsers in this BrowserTestRunner instance.
+  Future terminate() async {
     var browsers = [];
     underTermination = true;
     testingServer.underTermination = true;
-    for (BrowserTestingStatus status in browserStatus.values) {
+    for (BrowserStatus status in browserStatus.values) {
       browsers.add(status.browser);
       if (status.nextTestTimeout != null) {
         status.nextTestTimeout.cancel();
         status.nextTestTimeout = null;
       }
     }
-    // Success if all the browsers closed successfully.
-    bool success = true;
-    Future closeBrowser(Browser b) {
-      return b.close().then((bool closeSucceeded) {
-        if (!closeSucceeded) {
-          success = false;
-        }
-      });
+    for (Browser b in browsers) {
+      await b.close();
     }
-    return Future.forEach(browsers, closeBrowser).then((_) {
-      testingServer.errorReportingServer.close();
-      printDoubleReportingTests();
-      return success;
-    });
-  }
-
-  Browser getInstance() {
-    if (browserName == 'ff') browserName = 'firefox';
-    var path = Locations.getBrowserLocation(browserName, configuration);
-    var browser = new Browser.byName(browserName, path, checkedMode);
-    browser.logger = logger;
-    return browser;
+    testingServer.errorReportingServer.close();
+    printDoubleReportingTests();
   }
 }
 
 class BrowserTestingServer {
   final Map configuration;
+
   /// Interface of the testing server:
   ///
   /// GET /driver/BROWSER_ID -- This will get the driver page to fetch
@@ -1326,9 +1308,10 @@
 
   Future start() {
     var test_driver_error_port = configuration['test_driver_error_port'];
-    return HttpServer.bind(localIp, test_driver_error_port)
-      .then(setupErrorServer)
-      .then(setupDispatchingServer);
+    return HttpServer
+        .bind(localIp, test_driver_error_port)
+        .then(setupErrorServer)
+        .then(setupDispatchingServer);
   }
 
   void setupErrorServer(HttpServer server) {
@@ -1336,18 +1319,20 @@
     void errorReportingHandler(HttpRequest request) {
       StringBuffer buffer = new StringBuffer();
       request.transform(UTF8.decoder).listen((data) {
-          buffer.write(data);
-        }, onDone: () {
-          String back = buffer.toString();
-          request.response.headers.set("Access-Control-Allow-Origin", "*");
-          request.response.done.catchError((error) {
-              DebugLogger.error("Error getting error from browser"
-                                "on uri ${request.uri.path}: $error");
-            });
-          request.response.close();
-          DebugLogger.error("Error from browser on : "
-                            "${request.uri.path}, data:  $back");
-        }, onError: (error) { print(error); });
+        buffer.write(data);
+      }, onDone: () {
+        String back = buffer.toString();
+        request.response.headers.set("Access-Control-Allow-Origin", "*");
+        request.response.done.catchError((error) {
+          DebugLogger.error("Error getting error from browser"
+              "on uri ${request.uri.path}: $error");
+        });
+        request.response.close();
+        DebugLogger.error("Error from browser on : "
+            "${request.uri.path}, data:  $back");
+      }, onError: (error) {
+        print(error);
+      });
     }
     void errorHandler(e) {
       if (!underTermination) print("Error occured in httpserver: $e");
@@ -1358,58 +1343,56 @@
   void setupDispatchingServer(_) {
     DispatchingServer server = configuration['_servers_'].server;
     void noCache(request) {
-        request.response.headers.set("Cache-Control",
-                                     "no-cache, no-store, must-revalidate");
+      request.response.headers
+          .set("Cache-Control", "no-cache, no-store, must-revalidate");
     }
-    int testId(request) =>
-        int.parse(request.uri.queryParameters["id"]);
+    int testId(request) => int.parse(request.uri.queryParameters["id"]);
     String browserId(request, prefix) =>
         request.uri.path.substring(prefix.length + 1);
 
-
     server.addHandler(reportPath, (HttpRequest request) {
       noCache(request);
-      handleReport(request, browserId(request, reportPath),
-                   testId(request), isStatusUpdate: false);
+      handleReport(request, browserId(request, reportPath), testId(request),
+          isStatusUpdate: false);
     });
     server.addHandler(statusUpdatePath, (HttpRequest request) {
       noCache(request);
-      handleReport(request, browserId(request, statusUpdatePath),
-                   testId(request), isStatusUpdate: true);
+      handleReport(
+          request, browserId(request, statusUpdatePath), testId(request),
+          isStatusUpdate: true);
     });
     server.addHandler(startedPath, (HttpRequest request) {
       noCache(request);
-      handleStarted(request, browserId(request, startedPath),
-                   testId(request));
+      handleStarted(request, browserId(request, startedPath), testId(request));
     });
 
     makeSendPageHandler(String prefix) => (HttpRequest request) {
-      noCache(request);
-      var textResponse = "";
-      if (prefix == driverPath) {
-        textResponse = getDriverPage(browserId(request, prefix));
-        request.response.headers.set('Content-Type', 'text/html');
-      }
-      if (prefix == nextTestPath) {
-        textResponse = getNextTest(browserId(request, prefix));
-        request.response.headers.set('Content-Type', 'text/plain');
-      }
-      request.response.write(textResponse);
-      request.listen((_) {}, onDone: request.response.close);
-      request.response.done.catchError((error) {
-        if (!underTermination) {
-          print("URI ${request.uri}");
-          print("Textresponse $textResponse");
-          throw "Error returning content to browser: $error";
-        }
-      });
-    };
+          noCache(request);
+          var textResponse = "";
+          if (prefix == driverPath) {
+            textResponse = getDriverPage(browserId(request, prefix));
+            request.response.headers.set('Content-Type', 'text/html');
+          }
+          if (prefix == nextTestPath) {
+            textResponse = getNextTest(browserId(request, prefix));
+            request.response.headers.set('Content-Type', 'text/plain');
+          }
+          request.response.write(textResponse);
+          request.listen((_) {}, onDone: request.response.close);
+          request.response.done.catchError((error) {
+            if (!underTermination) {
+              print("URI ${request.uri}");
+              print("Textresponse $textResponse");
+              throw "Error returning content to browser: $error";
+            }
+          });
+        };
     server.addHandler(driverPath, makeSendPageHandler(driverPath));
     server.addHandler(nextTestPath, makeSendPageHandler(nextTestPath));
   }
 
   void handleReport(HttpRequest request, String browserId, var testId,
-                    {bool isStatusUpdate}) {
+      {bool isStatusUpdate}) {
     StringBuffer buffer = new StringBuffer();
     request.transform(UTF8.decoder).listen((data) {
       buffer.write(data);
@@ -1422,7 +1405,9 @@
         testDoneCallBack(browserId, back, testId);
       }
       // TODO(ricow): We should do something smart if we get an error here.
-    }, onError: (error) { DebugLogger.error("$error"); });
+    }, onError: (error) {
+      DebugLogger.error("$error");
+    });
   }
 
   void handleStarted(HttpRequest request, String browserId, var testId) {
@@ -1436,7 +1421,9 @@
       String back = buffer.toString();
       request.response.close();
       testStartedCallBack(browserId, back, testId);
-    }, onError: (error) { DebugLogger.error("$error"); });
+    }, onError: (error) {
+      DebugLogger.error("$error");
+    });
   }
 
   String getNextTest(String browserId) {
@@ -1452,7 +1439,7 @@
   String getDriverUrl(String browserId) {
     if (errorReportingServer == null) {
       print("Bad browser testing server, you are not started yet. Can't "
-            "produce driver url");
+          "produce driver url");
       exit(1);
       // This should never happen - exit immediately;
     }
@@ -1460,7 +1447,6 @@
     return "http://$localIp:$port/driver/$browserId";
   }
 
-
   String getDriverPage(String browserId) {
     var errorReportingUrl =
         "http://$localIp:${errorReportingServer.port}/$browserId";
diff --git a/tools/testing/dart/browser_perf_testing/pubspec.yaml b/tools/testing/dart/browser_perf_testing/pubspec.yaml
deleted file mode 100644
index b033e13..0000000
--- a/tools/testing/dart/browser_perf_testing/pubspec.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-name: browser_perf_testing
-version: 0.0.1
-author: Dart Team <misc@dartlang.org>
-description: Framework for running performance benchmarks in the browser with our testing framework. 
-homepage: http://www.dartlang.org
-dependencies:
-  path: any
-  args: any
-dev_dependencies:
-environment:
diff --git a/tools/testing/dart/browser_test.dart b/tools/testing/dart/browser_test.dart
index 63d8de0..1236b55 100644
--- a/tools/testing/dart/browser_test.dart
+++ b/tools/testing/dart/browser_test.dart
@@ -6,9 +6,7 @@
 
 import 'path.dart';
 
-String getHtmlContents(String title,
-                       String scriptType,
-                       Path sourceScript) {
+String getHtmlContents(String title, String scriptType, Path sourceScript) {
   return """
 <!DOCTYPE html>
 <html>
diff --git a/tools/testing/dart/co19_test.dart b/tools/testing/dart/co19_test.dart
index d826263..9118fc8 100644
--- a/tools/testing/dart/co19_test.dart
+++ b/tools/testing/dart/co19_test.dart
@@ -22,21 +22,33 @@
 import "test_suite.dart";
 import "test_configurations.dart";
 
-const List<String> COMMON_ARGUMENTS =
-    const <String>['--report', '--progress=diff', 'co19'];
+const List<String> COMMON_ARGUMENTS = const <String>[
+  '--report',
+  '--progress=diff',
+  'co19'
+];
 
 const List<List<String>> COMMAND_LINES = const <List<String>>[
-    const <String>['-mrelease,debug', '-rvm', '-cnone'],
-    const <String>['-mrelease,debug', '-rvm', '-cnone', '--checked'],
-    const <String>['-mrelease', '-rnone', '-cdart2analyzer'],
-    const <String>['-mrelease', '-rd8', '-cdart2js', '--use-sdk'],
-    const <String>['-mrelease', '-rd8,jsshell', '-cdart2js', '--use-sdk',
-                   '--minified'],
-    const <String>['-mrelease', '-rd8,jsshell', '-cdart2js', '--use-sdk',
-                   '--checked'],
-    const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk',
-                   '--checked'],
-    const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk'],
+  const <String>['-mrelease,debug', '-rvm', '-cnone'],
+  const <String>['-mrelease,debug', '-rvm', '-cnone', '--checked'],
+  const <String>['-mrelease', '-rnone', '-cdart2analyzer'],
+  const <String>['-mrelease', '-rd8', '-cdart2js', '--use-sdk'],
+  const <String>[
+    '-mrelease',
+    '-rd8,jsshell',
+    '-cdart2js',
+    '--use-sdk',
+    '--minified'
+  ],
+  const <String>[
+    '-mrelease',
+    '-rd8,jsshell',
+    '-cdart2js',
+    '--use-sdk',
+    '--checked'
+  ],
+  const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk', '--checked'],
+  const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk'],
 ];
 
 void main(List<String> args) {
@@ -55,4 +67,3 @@
     testConfigurations(configurations);
   }
 }
-
diff --git a/tools/testing/dart/co19_test_config.dart b/tools/testing/dart/co19_test_config.dart
index 813038d..c331f93 100644
--- a/tools/testing/dart/co19_test_config.dart
+++ b/tools/testing/dart/co19_test_config.dart
@@ -11,15 +11,14 @@
   RegExp _testRegExp = new RegExp(r"t[0-9]{2}.dart$");
 
   Co19TestSuite(Map configuration)
-      : super(configuration,
-              "co19",
-              new Path("tests/co19/src"),
-              ["tests/co19/co19-co19.status",
-               "tests/co19/co19-analyzer.status",
-               "tests/co19/co19-analyzer2.status",
-               "tests/co19/co19-runtime.status",
-               "tests/co19/co19-dart2js.status",
-               "tests/co19/co19-dartium.status"]);
+      : super(configuration, "co19", new Path("tests/co19/src"), [
+          "tests/co19/co19-co19.status",
+          "tests/co19/co19-analyzer.status",
+          "tests/co19/co19-analyzer2.status",
+          "tests/co19/co19-runtime.status",
+          "tests/co19/co19-dart2js.status",
+          "tests/co19/co19-dartium.status"
+        ]);
 
   bool isTestFile(String filename) => _testRegExp.hasMatch(filename);
   bool get listRecursively => true;
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index 4794992..147cd99 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -4,20 +4,13 @@
 
 library compiler_configuration;
 
-import 'dart:io' show
-    Platform;
+import 'dart:io' show Platform;
 
-import 'runtime_configuration.dart' show
-    RuntimeConfiguration;
+import 'runtime_configuration.dart' show RuntimeConfiguration;
 
-import 'test_runner.dart' show
-    Command,
-    CommandBuilder,
-    CompilationCommand;
+import 'test_runner.dart' show Command, CommandBuilder, CompilationCommand;
 
-import 'test_suite.dart' show
-    TestInformation,
-    TestUtils;
+import 'test_suite.dart' show TestInformation, TestUtils;
 
 /// Grouping of a command with its expected result.
 class CommandArtifact {
@@ -35,9 +28,7 @@
 Uri nativeDirectoryToUri(String nativePath) {
   Uri uri = new Uri.file(nativePath);
   String path = uri.path;
-  return (path == '' || path.endsWith('/'))
-      ? uri
-      : Uri.parse('$uri/');
+  return (path == '' || path.endsWith('/')) ? uri : Uri.parse('$uri/');
 }
 
 abstract class CompilerConfiguration {
@@ -65,32 +56,41 @@
     switch (compiler) {
       case 'dart2analyzer':
         return new AnalyzerCompilerConfiguration(
-            isDebug: isDebug, isChecked: isChecked,
-            isHostChecked: isHostChecked, useSdk: useSdk);
+            isDebug: isDebug,
+            isChecked: isChecked,
+            isHostChecked: isHostChecked,
+            useSdk: useSdk);
       case 'dart2js':
         return new Dart2jsCompilerConfiguration(
-            isDebug: isDebug, isChecked: isChecked,
-            isHostChecked: isHostChecked, useCps: useCps, useSdk: useSdk,
-            isCsp: isCsp, extraDart2jsOptions:
+            isDebug: isDebug,
+            isChecked: isChecked,
+            isHostChecked: isHostChecked,
+            useCps: useCps,
+            useSdk: useSdk,
+            isCsp: isCsp,
+            extraDart2jsOptions:
                 TestUtils.getExtraOptions(configuration, 'dart2js_options'));
       case 'dart2app':
         return new Dart2AppSnapshotCompilerConfiguration(
             isDebug: isDebug, isChecked: isChecked);
       case 'precompiler':
         return new PrecompilerCompilerConfiguration(
-            isDebug: isDebug, isChecked: isChecked,
+            isDebug: isDebug,
+            isChecked: isChecked,
             arch: configuration['arch']);
       case 'none':
         return new NoneCompilerConfiguration(
-            isDebug: isDebug, isChecked: isChecked,
-            isHostChecked: isHostChecked, useSdk: useSdk);
+            isDebug: isDebug,
+            isChecked: isChecked,
+            isHostChecked: isHostChecked,
+            useSdk: useSdk);
       default:
         throw "Unknown compiler '$compiler'";
     }
   }
 
-  CompilerConfiguration._subclass({
-      this.isDebug: false,
+  CompilerConfiguration._subclass(
+      {this.isDebug: false,
       this.isChecked: false,
       this.isHostChecked: false,
       this.useSdk: false});
@@ -126,9 +126,7 @@
   }
 
   List<String> computeCompilerArguments(vmOptions, sharedOptions, args) {
-    return new List<String>()
-        ..addAll(sharedOptions)
-        ..addAll(args);
+    return new List<String>()..addAll(sharedOptions)..addAll(args);
   }
 
   List<String> computeRuntimeArguments(
@@ -145,15 +143,13 @@
 
 /// The "none" compiler.
 class NoneCompilerConfiguration extends CompilerConfiguration {
-
-  NoneCompilerConfiguration({
-      bool isDebug,
-      bool isChecked,
-      bool isHostChecked,
-      bool useSdk})
+  NoneCompilerConfiguration(
+      {bool isDebug, bool isChecked, bool isHostChecked, bool useSdk})
       : super._subclass(
-          isDebug: isDebug, isChecked: isChecked,
-          isHostChecked: isHostChecked, useSdk: useSdk);
+            isDebug: isDebug,
+            isChecked: isChecked,
+            isHostChecked: isHostChecked,
+            useSdk: useSdk);
 
   bool get hasCompiler => false;
 
@@ -171,9 +167,9 @@
       args.add('--enable_type_checks');
     }
     return args
-        ..addAll(vmOptions)
-        ..addAll(sharedOptions)
-        ..addAll(originalArguments);
+      ..addAll(vmOptions)
+      ..addAll(sharedOptions)
+      ..addAll(originalArguments);
   }
 }
 
@@ -183,15 +179,13 @@
   static Map<String, List<Uri>> _bootstrapDependenciesCache =
       new Map<String, List<Uri>>();
 
-  Dart2xCompilerConfiguration(
-      this.moniker,
-      {bool isDebug,
-      bool isChecked,
-      bool isHostChecked,
-      bool useSdk})
+  Dart2xCompilerConfiguration(this.moniker,
+      {bool isDebug, bool isChecked, bool isHostChecked, bool useSdk})
       : super._subclass(
-          isDebug: isDebug, isChecked: isChecked,
-          isHostChecked: isHostChecked, useSdk: useSdk);
+            isDebug: isDebug,
+            isChecked: isChecked,
+            isHostChecked: isHostChecked,
+            useSdk: useSdk);
 
   String computeCompilerPath(String buildDir) {
     var prefix = 'sdk/bin';
@@ -219,17 +213,24 @@
     arguments.add('--out=$outputFileName');
 
     return commandBuilder.getCompilationCommand(
-        moniker, outputFileName, !useSdk,
+        moniker,
+        outputFileName,
+        !useSdk,
         bootstrapDependencies(buildDir),
         computeCompilerPath(buildDir),
-        arguments, environmentOverrides);
+        arguments,
+        environmentOverrides);
   }
 
   List<Uri> bootstrapDependencies(String buildDir) {
     if (!useSdk) return const <Uri>[];
-    return _bootstrapDependenciesCache.putIfAbsent(buildDir, () =>
-      [Uri.base.resolveUri(nativeDirectoryToUri(buildDir))
-               .resolve('dart-sdk/bin/snapshots/dart2js.dart.snapshot')]);
+    return _bootstrapDependenciesCache.putIfAbsent(
+        buildDir,
+        () => [
+              Uri.base
+                  .resolveUri(nativeDirectoryToUri(buildDir))
+                  .resolve('dart-sdk/bin/snapshots/dart2js.dart.snapshot')
+            ]);
   }
 }
 
@@ -242,18 +243,19 @@
   static Map<String, String> cpsFlagCache;
   static Map<String, String> environmentOverridesCacheObject;
 
-  Dart2jsCompilerConfiguration({
-      bool isDebug,
+  Dart2jsCompilerConfiguration(
+      {bool isDebug,
       bool isChecked,
       bool isHostChecked,
       bool useSdk,
       bool this.useCps,
       bool this.isCsp,
       this.extraDart2jsOptions})
-      : super(
-          'dart2js',
-          isDebug: isDebug, isChecked: isChecked,
-          isHostChecked: isHostChecked, useSdk: useSdk);
+      : super('dart2js',
+            isDebug: isDebug,
+            isChecked: isChecked,
+            isHostChecked: isHostChecked,
+            useSdk: useSdk);
 
   int computeTimeoutMultiplier() {
     int multiplier = 1;
@@ -271,16 +273,10 @@
       Map<String, String> environmentOverrides) {
     List compilerArguments = new List.from(arguments)
       ..addAll(extraDart2jsOptions);
-    return new CommandArtifact(
-        <Command>[
-            this.computeCompilationCommand(
-                '$tempDir/out.js',
-                buildDir,
-                CommandBuilder.instance,
-                compilerArguments,
-                environmentOverrides)],
-        '$tempDir/out.js',
-        'application/javascript');
+    return new CommandArtifact(<Command>[
+      this.computeCompilationCommand('$tempDir/out.js', buildDir,
+          CommandBuilder.instance, compilerArguments, environmentOverrides)
+    ], '$tempDir/out.js', 'application/javascript');
   }
 
   List<String> computeRuntimeArguments(
@@ -291,25 +287,22 @@
       List<String> sharedOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
-    Uri sdk = useSdk ?
-        nativeDirectoryToUri(buildDir).resolve('dart-sdk/') :
-        nativeDirectoryToUri(TestUtils.dartDir.toNativePath()).resolve('sdk/');
-    Uri preambleDir = sdk.resolve(
-        'lib/_internal/js_runtime/lib/preambles/');
+    Uri sdk = useSdk
+        ? nativeDirectoryToUri(buildDir).resolve('dart-sdk/')
+        : nativeDirectoryToUri(TestUtils.dartDir.toNativePath())
+            .resolve('sdk/');
+    Uri preambleDir = sdk.resolve('lib/_internal/js_runtime/lib/preambles/');
     return runtimeConfiguration.dart2jsPreambles(preambleDir)
-        ..add(artifact.filename);
+      ..add(artifact.filename);
   }
 }
 
-
 class PrecompilerCompilerConfiguration extends CompilerConfiguration {
   final String arch;
 
-  PrecompilerCompilerConfiguration({
-      bool isDebug,
-      bool isChecked,
-      String arch})
-    : super._subclass(isDebug: isDebug, isChecked: isChecked), arch = arch;
+  PrecompilerCompilerConfiguration({bool isDebug, bool isChecked, String arch})
+      : super._subclass(isDebug: isDebug, isChecked: isChecked),
+        arch = arch;
 
   int computeTimeoutMultiplier() {
     int multiplier = 2;
@@ -324,28 +317,14 @@
       CommandBuilder commandBuilder,
       List arguments,
       Map<String, String> environmentOverrides) {
-    return new CommandArtifact(
-        <Command>[
-            this.computeCompilationCommand(
-                tempDir,
-                buildDir,
-                CommandBuilder.instance,
-                arguments,
-                environmentOverrides),
-            this.computeAssembleCommand(
-                tempDir,
-                buildDir,
-                CommandBuilder.instance,
-                arguments,
-                environmentOverrides),
-            this.computeRemoveAssemblyCommand(
-                tempDir,
-                buildDir,
-                CommandBuilder.instance,
-                arguments,
-                environmentOverrides)],
-        '$tempDir',
-        'application/dart-precompiled');
+    return new CommandArtifact(<Command>[
+      this.computeCompilationCommand(tempDir, buildDir, CommandBuilder.instance,
+          arguments, environmentOverrides),
+      this.computeAssembleCommand(tempDir, buildDir, CommandBuilder.instance,
+          arguments, environmentOverrides),
+      this.computeRemoveAssemblyCommand(tempDir, buildDir,
+          CommandBuilder.instance, arguments, environmentOverrides)
+    ], '$tempDir', 'application/dart-precompiled');
   }
 
   CompilationCommand computeCompilationCommand(
@@ -354,15 +333,13 @@
       CommandBuilder commandBuilder,
       List arguments,
       Map<String, String> environmentOverrides) {
-    var exec = "$buildDir/dart_no_snapshot";
+    var exec = "$buildDir/dart_bootstrap";
     var args = new List();
     args.add("--gen-precompiled-snapshot=$tempDir");
     args.addAll(arguments);
 
-    return commandBuilder.getCompilationCommand(
-        'precompiler', tempDir, !useSdk,
-        bootstrapDependencies(buildDir),
-        exec, args, environmentOverrides);
+    return commandBuilder.getCompilationCommand('precompiler', tempDir, !useSdk,
+        bootstrapDependencies(buildDir), exec, args, environmentOverrides);
   }
 
   CompilationCommand computeAssembleCommand(
@@ -401,16 +378,16 @@
     }
 
     var exec = cc;
-    var args = [shared,
-                cc_flags,
-                '-o',
-                '$tempDir/$libname',
-                '$tempDir/precompiled.S'];
+    var args = [
+      shared,
+      cc_flags,
+      '-o',
+      '$tempDir/$libname',
+      '$tempDir/precompiled.S'
+    ];
 
-    return commandBuilder.getCompilationCommand(
-        'assemble', tempDir, !useSdk,
-        bootstrapDependencies(buildDir),
-        exec, args, environmentOverrides);
+    return commandBuilder.getCompilationCommand('assemble', tempDir, !useSdk,
+        bootstrapDependencies(buildDir), exec, args, environmentOverrides);
   }
 
   // This step reduces the amount of space needed to run the precompilation
@@ -425,32 +402,35 @@
     var args = ['$tempDir/precompiled.S'];
 
     return commandBuilder.getCompilationCommand(
-        'remove_assembly', tempDir, !useSdk,
+        'remove_assembly',
+        tempDir,
+        !useSdk,
         bootstrapDependencies(buildDir),
-        exec, args, environmentOverrides);
+        exec,
+        args,
+        environmentOverrides);
   }
 
   List<String> filterVmOptions(List<String> vmOptions) {
     var filtered = new List.from(vmOptions);
     filtered.removeWhere(
-      (option) => option.startsWith("--optimization-counter-threshold"));
+        (option) => option.startsWith("--optimization-counter-threshold"));
     filtered.removeWhere(
-      (option) => option.startsWith("--optimization_counter_threshold"));
+        (option) => option.startsWith("--optimization_counter_threshold"));
     return filtered;
   }
 
-  List<String> computeCompilerArguments(vmOptions,
-                                        sharedOptions,
-                                        originalArguments) {
+  List<String> computeCompilerArguments(
+      vmOptions, sharedOptions, originalArguments) {
     List<String> args = [];
     if (isChecked) {
       args.add('--enable_asserts');
       args.add('--enable_type_checks');
     }
     return args
-        ..addAll(filterVmOptions(vmOptions))
-        ..addAll(sharedOptions)
-        ..addAll(originalArguments);
+      ..addAll(filterVmOptions(vmOptions))
+      ..addAll(sharedOptions)
+      ..addAll(originalArguments);
   }
 
   List<String> computeRuntimeArguments(
@@ -467,17 +447,14 @@
       args.add('--enable_type_checks');
     }
     return args
-        ..addAll(vmOptions)
-        ..addAll(sharedOptions)
-        ..addAll(originalArguments);
+      ..addAll(vmOptions)
+      ..addAll(sharedOptions)
+      ..addAll(originalArguments);
   }
 }
 
-
 class Dart2AppSnapshotCompilerConfiguration extends CompilerConfiguration {
-  Dart2AppSnapshotCompilerConfiguration({
-      bool isDebug,
-      bool isChecked})
+  Dart2AppSnapshotCompilerConfiguration({bool isDebug, bool isChecked})
       : super._subclass(isDebug: isDebug, isChecked: isChecked);
 
   int computeTimeoutMultiplier() {
@@ -494,16 +471,10 @@
       List arguments,
       Map<String, String> environmentOverrides) {
     String outputName = computeOutputName(tempDir);
-    return new CommandArtifact(
-        <Command>[
-            this.computeCompilationCommand(
-                outputName,
-                buildDir,
-                CommandBuilder.instance,
-                arguments,
-                environmentOverrides)],
-        outputName,
-        'application/dart-snapshot');
+    return new CommandArtifact(<Command>[
+      this.computeCompilationCommand(outputName, buildDir,
+          CommandBuilder.instance, arguments, environmentOverrides)
+    ], outputName, 'application/dart-snapshot');
   }
 
   String computeOutputName(String tempDir) {
@@ -517,29 +488,32 @@
       CommandBuilder commandBuilder,
       List arguments,
       Map<String, String> environmentOverrides) {
-    var exec = "$buildDir/dart_no_snapshot";
+    var exec = "$buildDir/dart_bootstrap";
     var args = new List();
     args.add("--full-snapshot-after-run=$outputName");
     args.addAll(arguments);
 
     return commandBuilder.getCompilationCommand(
-        'dart2snapshot', outputName, !useSdk,
+        'dart2snapshot',
+        outputName,
+        !useSdk,
         bootstrapDependencies(buildDir),
-        exec, args, environmentOverrides);
+        exec,
+        args,
+        environmentOverrides);
   }
 
-  List<String> computeCompilerArguments(vmOptions,
-                                        sharedOptions,
-                                        originalArguments) {
+  List<String> computeCompilerArguments(
+      vmOptions, sharedOptions, originalArguments) {
     List<String> args = [];
     if (isChecked) {
       args.add('--enable_asserts');
       args.add('--enable_type_checks');
     }
     return args
-        ..addAll(vmOptions)
-        ..addAll(sharedOptions)
-        ..addAll(originalArguments);
+      ..addAll(vmOptions)
+      ..addAll(sharedOptions)
+      ..addAll(originalArguments);
   }
 
   List<String> computeRuntimeArguments(
@@ -556,22 +530,20 @@
       args.add('--enable_type_checks');
     }
     return args
-        ..addAll(vmOptions)
-        ..addAll(sharedOptions)
-        ..addAll(originalArguments);
+      ..addAll(vmOptions)
+      ..addAll(sharedOptions)
+      ..addAll(originalArguments);
   }
 }
 
-
 class AnalyzerCompilerConfiguration extends CompilerConfiguration {
   AnalyzerCompilerConfiguration(
-      {bool isDebug,
-      bool isChecked,
-      bool isHostChecked,
-      bool useSdk})
+      {bool isDebug, bool isChecked, bool isHostChecked, bool useSdk})
       : super._subclass(
-          isDebug: isDebug, isChecked: isChecked,
-          isHostChecked: isHostChecked, useSdk: useSdk);
+            isDebug: isDebug,
+            isChecked: isChecked,
+            isHostChecked: isHostChecked,
+            useSdk: useSdk);
 
   int computeTimeoutMultiplier() {
     return 4;
@@ -605,14 +577,12 @@
     if (isChecked) {
       arguments.add('--enable_type_checks');
     }
-    return new CommandArtifact(
-        <Command>[
-            commandBuilder.getAnalysisCommand(
-                'dart2analyzer', computeCompilerPath(buildDir), arguments,
-                environmentOverrides,
-                flavor: 'dart2analyzer')],
-        null, null); // Since this is not a real compilation, no artifacts are
-                     // produced.
+    return new CommandArtifact(<Command>[
+      commandBuilder.getAnalysisCommand('dart2analyzer',
+          computeCompilerPath(buildDir), arguments, environmentOverrides,
+          flavor: 'dart2analyzer')
+    ], null, null); // Since this is not a real compilation, no artifacts are
+    // produced.
   }
 
   List<String> computeRuntimeArguments(
diff --git a/tools/testing/dart/dependency_graph.dart b/tools/testing/dart/dependency_graph.dart
index 1de7b9e..abdcf50 100644
--- a/tools/testing/dart/dependency_graph.dart
+++ b/tools/testing/dart/dependency_graph.dart
@@ -7,7 +7,6 @@
 import 'dart:async';
 import 'utils.dart';
 
-
 /*
  * [Graph] represents a datastructure for representing an DAG (directed acyclic
  * graph). Each node in the graph is in a given [NodeState] and can have data
@@ -114,12 +113,12 @@
 
 class NodeState extends UniqueObject {
   static NodeState Initialized = new NodeState._("Initialized");
-  static NodeState Waiting  = new NodeState._("Waiting");
-  static NodeState Enqueuing  = new NodeState._("Enqueuing");
-  static NodeState Processing  = new NodeState._("Running");
-  static NodeState Successful  = new NodeState._("Successful");
-  static NodeState Failed  = new NodeState._("Failed");
-  static NodeState UnableToRun  = new NodeState._("UnableToRun");
+  static NodeState Waiting = new NodeState._("Waiting");
+  static NodeState Enqueuing = new NodeState._("Enqueuing");
+  static NodeState Processing = new NodeState._("Running");
+  static NodeState Successful = new NodeState._("Successful");
+  static NodeState Failed = new NodeState._("Failed");
+  static NodeState UnableToRun = new NodeState._("UnableToRun");
 
   final String name;
 
diff --git a/tools/testing/dart/drt_updater.dart b/tools/testing/dart/drt_updater.dart
index 3f34885..ee5a628 100644
--- a/tools/testing/dart/drt_updater.dart
+++ b/tools/testing/dart/drt_updater.dart
@@ -28,7 +28,11 @@
     if (!isActive) {
       isActive = true;
       print('Updating $name.');
-      onUpdated = [() {updated = true;} ];
+      onUpdated = [
+        () {
+          updated = true;
+        }
+      ];
       _updatingProcess = Process.run('python', _getUpdateCommand);
       _updatingProcess.then(_onUpdatedHandler).catchError((e) {
         print("Error starting $script process: $e");
@@ -57,7 +61,7 @@
       print(result.stderr);
       exit(1);
     }
-    for (var callback in onUpdated ) callback();
+    for (var callback in onUpdated) callback();
   }
 }
 
@@ -69,17 +73,15 @@
   if (runtime == 'drt' && configuration['drt'] == '') {
     // Download the default content shell from Google Storage.
     if (_contentShellUpdater == null) {
-      _contentShellUpdater = new _DartiumUpdater('Content Shell',
-                                                 'tools/get_archive.py',
-                                                 'drt');
+      _contentShellUpdater =
+          new _DartiumUpdater('Content Shell', 'tools/get_archive.py', 'drt');
     }
     return _contentShellUpdater;
   } else if (runtime == 'dartium' && configuration['dartium'] == '') {
     // Download the default Dartium from Google Storage.
     if (_dartiumUpdater == null) {
-      _dartiumUpdater = new _DartiumUpdater('Dartium Chrome',
-                                            'tools/get_archive.py',
-                                            'dartium');
+      _dartiumUpdater = new _DartiumUpdater(
+          'Dartium Chrome', 'tools/get_archive.py', 'dartium');
     }
     return _dartiumUpdater;
   } else {
diff --git a/tools/testing/dart/html_test.dart b/tools/testing/dart/html_test.dart
index 0f69eed..dfa555f 100644
--- a/tools/testing/dart/html_test.dart
+++ b/tools/testing/dart/html_test.dart
@@ -31,15 +31,15 @@
   var match = htmlAnnotation.firstMatch(contents);
   if (match == null) return null;
   var annotation = JSON.decode(match[1]);
-  if (annotation is! Map || annotation['expectedMessages'] is! List ||
+  if (annotation is! Map ||
+      annotation['expectedMessages'] is! List ||
       annotation['scripts'] is! List) {
     DebugLogger.warning("File $filename does not have expected annotation."
         " Should have {'scripts':[...], 'expectedMessages':[...]}");
     return null;
   }
   return new HtmlTestInformation(new Path(filename),
-                                 annotation['expectedMessages'],
-                                 annotation['scripts']);
+      annotation['expectedMessages'], annotation['scripts']);
 }
 
 String getContents(HtmlTestInformation info, bool compileToJS) {
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index 1cfdb65..429ddeac 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -7,11 +7,10 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'dart:convert' show
-    HtmlEscape;
+import 'dart:convert' show HtmlEscape;
 
 import 'path.dart';
-import 'test_suite.dart';  // For TestUtils.
+import 'test_suite.dart'; // For TestUtils.
 // TODO(efortuna): Rewrite to not use the args library and simply take an
 // expected number of arguments, so test.dart doesn't rely on the args library?
 // See discussion on https://codereview.chromium.org/11931025/.
@@ -23,9 +22,8 @@
   Map<String, Function> _handlers = new Map<String, Function>();
   Function _notFound;
 
-  DispatchingServer(this.server,
-                    void onError(e),
-                    void this._notFound(HttpRequest request)) {
+  DispatchingServer(
+      this.server, void onError(e), void this._notFound(HttpRequest request)) {
     server.listen(_dispatchRequest, onError: onError);
   }
 
@@ -46,8 +44,6 @@
   }
 }
 
-
-
 /// Interface of the HTTP server:
 ///
 /// /echo: This will stream the data received in the request stream back
@@ -77,37 +73,37 @@
   TestUtils.setDartDirUri(Platform.script.resolve('../../..'));
   /** Convenience method for local testing. */
   var parser = new ArgParser();
-  parser.addOption('port', abbr: 'p',
+  parser.addOption('port',
+      abbr: 'p',
       help: 'The main server port we wish to respond to requests.',
       defaultsTo: '0');
-  parser.addOption('crossOriginPort', abbr: 'c',
+  parser.addOption('crossOriginPort',
+      abbr: 'c',
       help: 'A different port that accepts request from the main server port.',
       defaultsTo: '0');
-  parser.addFlag('help', abbr: 'h', negatable: false,
-      help: 'Print this usage information.');
+  parser.addFlag('help',
+      abbr: 'h', negatable: false, help: 'Print this usage information.');
   parser.addOption('build-directory', help: 'The build directory to use.');
   parser.addOption('package-root', help: 'The package root to use.');
-  parser.addOption('network', help: 'The network interface to use.',
-      defaultsTo: '0.0.0.0');
-  parser.addFlag('csp', help: 'Use Content Security Policy restrictions.',
-      defaultsTo: false);
-  parser.addOption('runtime', help: 'The runtime we are using (for csp flags).',
-      defaultsTo: 'none');
+  parser.addOption('network',
+      help: 'The network interface to use.', defaultsTo: '0.0.0.0');
+  parser.addFlag('csp',
+      help: 'Use Content Security Policy restrictions.', defaultsTo: false);
+  parser.addOption('runtime',
+      help: 'The runtime we are using (for csp flags).', defaultsTo: 'none');
 
   var args = parser.parse(arguments);
   if (args['help']) {
     print(parser.getUsage());
   } else {
     var servers = new TestingServers(new Path(args['build-directory']),
-                                     args['csp'],
-                                     args['runtime'],
-                                     null,
-                                     args['package-root']);
+        args['csp'], args['runtime'], null, args['package-root']);
     var port = int.parse(args['port']);
     var crossOriginPort = int.parse(args['crossOriginPort']);
-    servers.startServers(args['network'],
-                         port: port,
-                         crossOriginPort: crossOriginPort).then((_) {
+    servers
+        .startServers(args['network'],
+            port: port, crossOriginPort: crossOriginPort)
+        .then((_) {
       DebugLogger.info('Server listening on port ${servers.port}');
       DebugLogger.info('Server listening on port ${servers.crossOriginPort}');
     });
@@ -138,16 +134,16 @@
   final String runtime;
   DispatchingServer _server;
 
-  TestingServers(Path buildDirectory,
-                 this.useContentSecurityPolicy,
-                 [String this.runtime = 'none', String dartDirectory,
-                  String packageRoot]) {
+  TestingServers(Path buildDirectory, this.useContentSecurityPolicy,
+      [String this.runtime = 'none',
+      String dartDirectory,
+      String packageRoot]) {
     _buildDirectory = TestUtils.absolutePath(buildDirectory);
-    _dartDirectory = dartDirectory == null ? TestUtils.dartDir
-        : new Path(dartDirectory);
-    _packageRoot = packageRoot == null ?
-      _buildDirectory.append('packages') :
-      new Path(packageRoot);
+    _dartDirectory =
+        dartDirectory == null ? TestUtils.dartDir : new Path(dartDirectory);
+    _packageRoot = packageRoot == null
+        ? _buildDirectory.append('packages')
+        : new Path(packageRoot);
   }
 
   int get port => _serverList[0].port;
@@ -166,8 +162,7 @@
     return _startHttpServer(host, port: port).then((server) {
       _server = server;
       return _startHttpServer(host,
-                              port: crossOriginPort,
-                              allowedPort:_serverList[0].port);
+          port: crossOriginPort, allowedPort: _serverList[0].port);
     });
   }
 
@@ -178,8 +173,8 @@
     var buildDirectory = _buildDirectory.toNativePath();
     var csp = useContentSecurityPolicy ? '--csp ' : '';
     return '$dart $script -p $port -c $crossOriginPort $csp'
-           '--build-directory=$buildDirectory --runtime=$runtime '
-           '--package-root=$_packageRoot';
+        '--build-directory=$buildDirectory --runtime=$runtime '
+        '--package-root=$_packageRoot';
   }
 
   void stopServers() {
@@ -208,12 +203,11 @@
     });
   }
 
-  void _handleFileOrDirectoryRequest(HttpRequest request,
-                                     int allowedPort) {
+  void _handleFileOrDirectoryRequest(HttpRequest request, int allowedPort) {
     // Enable browsers to cache file/directory responses.
     var response = request.response;
-    response.headers.set("Cache-Control",
-                         "max-age=$_CACHE_EXPIRATION_IN_SECONDS");
+    response.headers
+        .set("Cache-Control", "max-age=$_CACHE_EXPIRATION_IN_SECONDS");
     var path = _getFilePathFromRequestPath(request.uri.path);
     if (path != null) {
       var file = new File(path.toNativePath());
@@ -235,9 +229,11 @@
       });
     } else {
       if (request.uri.path == '/') {
-        var entries = [new _Entry('root_dart', 'root_dart/'),
-                       new _Entry('root_build', 'root_build/'),
-                       new _Entry('echo', 'echo')];
+        var entries = [
+          new _Entry('root_dart', 'root_dart/'),
+          new _Entry('root_build', 'root_build/'),
+          new _Entry('echo', 'echo')
+        ];
         _sendDirectoryListing(entries, request, response);
       } else {
         _sendNotFound(request);
@@ -285,12 +281,10 @@
       var relativePath;
       if (pathSegments[0] == PREFIX_BUILDDIR) {
         basePath = _buildDirectory;
-        relativePath = new Path(
-            pathSegments.skip(1).join('/'));
+        relativePath = new Path(pathSegments.skip(1).join('/'));
       } else if (pathSegments[0] == PREFIX_DARTDIR) {
         basePath = _dartDirectory;
-        relativePath = new Path(
-            pathSegments.skip(1).join('/'));
+        relativePath = new Path(pathSegments.skip(1).join('/'));
       }
       var packagesIndex = pathSegments.indexOf('packages');
       if (packagesIndex != -1) {
@@ -309,24 +303,21 @@
     var completer = new Completer();
     var entries = [];
 
-    directory.list().listen(
-      (FileSystemEntity fse) {
-        var filename = new Path(fse.path).filename;
-        if (fse is File) {
-          entries.add(new _Entry(filename, filename));
-        } else if (fse is Directory) {
-          entries.add(new _Entry(filename, '$filename/'));
-        }
-      },
-      onDone: () {
-        completer.complete(entries);
-      });
+    directory.list().listen((FileSystemEntity fse) {
+      var filename = new Path(fse.path).filename;
+      if (fse is File) {
+        entries.add(new _Entry(filename, filename));
+      } else if (fse is Directory) {
+        entries.add(new _Entry(filename, '$filename/'));
+      }
+    }, onDone: () {
+      completer.complete(entries);
+    });
     return completer.future;
   }
 
-  void _sendDirectoryListing(List<_Entry> entries,
-                             HttpRequest request,
-                             HttpResponse response) {
+  void _sendDirectoryListing(
+      List<_Entry> entries, HttpRequest request, HttpResponse response) {
     response.headers.set('Content-Type', 'text/html');
     var header = '''<!DOCTYPE html>
     <html>
@@ -344,7 +335,6 @@
     </body>
     </html>''';
 
-
     entries.sort();
     response.write(header);
     for (var entry in entries) {
@@ -360,26 +350,21 @@
     });
   }
 
-  void _sendFileContent(HttpRequest request,
-                        HttpResponse response,
-                        int allowedPort,
-                        Path path,
-                        File file) {
+  void _sendFileContent(HttpRequest request, HttpResponse response,
+      int allowedPort, Path path, File file) {
     if (allowedPort != -1) {
       var headerOrigin = request.headers.value('Origin');
       var allowedOrigin;
       if (headerOrigin != null) {
         var origin = Uri.parse(headerOrigin);
         // Allow loading from http://*:$allowedPort in browsers.
-        allowedOrigin =
-          '${origin.scheme}://${origin.host}:${allowedPort}';
+        allowedOrigin = '${origin.scheme}://${origin.host}:${allowedPort}';
       } else {
         // IE10 appears to be bugged and is not sending the Origin header
         // when making CORS requests to the same domain but different port.
         allowedOrigin = '*';
       }
 
-
       response.headers.set("Access-Control-Allow-Origin", allowedOrigin);
       response.headers.set('Access-Control-Allow-Credentials', 'true');
     } else {
@@ -392,8 +377,10 @@
       // whereas Firefox and IE10 use X-Content-Security-Policy. Safari
       // still uses the WebKit- prefixed version.
       var content_header_value = "script-src 'self'; object-src 'self'";
-      for (var header in ["Content-Security-Policy",
-                          "X-Content-Security-Policy"]) {
+      for (var header in [
+        "Content-Security-Policy",
+        "X-Content-Security-Policy"
+      ]) {
         response.headers.set(header, content_header_value);
       }
       if (const ["safari"].contains(runtime)) {
@@ -426,7 +413,7 @@
     }
     if (!isHarmlessPath(request.uri.path)) {
       DebugLogger.warning('HttpServer: could not find file for request path: '
-                          '"${request.uri.path}"');
+          '"${request.uri.path}"');
     }
     var response = request.response;
     response.statusCode = HttpStatus.NOT_FOUND;
diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart
index 005cdc0..d39bc9a 100644
--- a/tools/testing/dart/multitest.dart
+++ b/tools/testing/dart/multitest.dart
@@ -61,27 +61,28 @@
 //   ddd /// 07: static type warning, dynamic type error
 //   fff
 
-void ExtractTestsFromMultitest(Path filePath,
-                               Map<String, String> tests,
-                               Map<String, Set<String>> outcomes) {
+void ExtractTestsFromMultitest(Path filePath, Map<String, String> tests,
+    Map<String, Set<String>> outcomes) {
   // Read the entire file into a byte buffer and transform it to a
   // String. This will treat the file as ascii but the only parts
   // we are interested in will be ascii in any case.
   List bytes = new File(filePath.toNativePath()).readAsBytesSync();
   String contents = decodeUtf8(bytes);
   int first_newline = contents.indexOf('\n');
-  final String line_separator =
-      (first_newline == 0 || contents[first_newline - 1] != '\r')
-      ? '\n'
-      : '\r\n';
+  final String line_separator = (first_newline == 0 ||
+      contents[first_newline - 1] != '\r') ? '\n' : '\r\n';
   List<String> lines = contents.split(line_separator);
   if (lines.last == '') lines.removeLast();
   bytes = null;
   contents = null;
-  Set<String> validMultitestOutcomes = new Set<String>.from(
-      ['ok', 'compile-time error', 'runtime error',
-       'static type warning', 'dynamic type error',
-       'checked mode compile-time error']);
+  Set<String> validMultitestOutcomes = new Set<String>.from([
+    'ok',
+    'compile-time error',
+    'runtime error',
+    'static type warning',
+    'dynamic type error',
+    'checked mode compile-time error'
+  ]);
 
   // Create the set of multitests, which will have a new test added each
   // time we see a multitest line with a new key.
@@ -96,8 +97,8 @@
     lineCount++;
     var annotation = new _Annotation.from(line);
     if (annotation != null) {
-      testsAsLines.putIfAbsent(annotation.key,
-          () => new List<String>.from(testsAsLines["none"]));
+      testsAsLines.putIfAbsent(
+          annotation.key, () => new List<String>.from(testsAsLines["none"]));
       // Add line to test with annotation.key as key, empty line to the rest.
       for (var key in testsAsLines.keys) {
         testsAsLines[key].add(annotation.key == key ? line : "");
@@ -172,8 +173,8 @@
     var annotation = new _Annotation();
     annotation.key = parts[0];
     annotation.rest = parts[1];
-    annotation.outcomesList = annotation.rest.split(',')
-        .map((s) => s.trim()).toList();
+    annotation.outcomesList =
+        annotation.rest.split(',').map((s) => s.trim()).toList();
     return annotation;
   }
 }
@@ -219,8 +220,8 @@
   return foundImports;
 }
 
-Future doMultitest(Path filePath, String outputDir, Path suiteDir,
-                   CreateTest doTest) {
+Future doMultitest(
+    Path filePath, String outputDir, Path suiteDir, CreateTest doTest) {
   void writeFile(String filepath, String content) {
     final File file = new File(filepath);
 
@@ -254,8 +255,8 @@
       TestUtils.mkdirRecursive(targetDir, importDir);
     }
     // Copy file.
-    futureCopies.add(TestUtils.copyFile(sourceDir.join(importPath),
-                                        targetDir.join(importPath)));
+    futureCopies.add(TestUtils.copyFile(
+        sourceDir.join(importPath), targetDir.join(importPath)));
   }
 
   // Wait until all imports are copied before scheduling test cases.
@@ -272,21 +273,17 @@
       bool isNegativeIfChecked = outcome.contains('dynamic type error');
       bool hasCompileErrorIfChecked =
           outcome.contains('checked mode compile-time error');
-      doTest(multitestFilename,
-             filePath,
-             hasCompileError,
-             hasRuntimeErrors,
-             isNegativeIfChecked: isNegativeIfChecked,
-             hasCompileErrorIfChecked: hasCompileErrorIfChecked,
-             hasStaticWarning: hasStaticWarning,
-             multitestKey: key);
+      doTest(multitestFilename, filePath, hasCompileError, hasRuntimeErrors,
+          isNegativeIfChecked: isNegativeIfChecked,
+          hasCompileErrorIfChecked: hasCompileErrorIfChecked,
+          hasStaticWarning: hasStaticWarning,
+          multitestKey: key);
     }
 
     return null;
   });
 }
 
-
 Path CreateMultitestDirectory(String outputDir, Path suiteDir) {
   Directory generatedTestDir = new Directory('$outputDir/generated_tests');
   if (!new Directory(outputDir).existsSync()) {
diff --git a/tools/testing/dart/path.dart b/tools/testing/dart/path.dart
index 1e1bf7d..a3d35aa 100644
--- a/tools/testing/dart/path.dart
+++ b/tools/testing/dart/path.dart
@@ -13,9 +13,12 @@
   final bool isWindowsShare;
 
   Path(String source)
-      : _path = _clean(source), isWindowsShare = _isWindowsShare(source);
+      : _path = _clean(source),
+        isWindowsShare = _isWindowsShare(source);
 
-  Path.raw(String source) : _path = source, isWindowsShare = false;
+  Path.raw(String source)
+      : _path = source,
+        isWindowsShare = false;
 
   Path._internal(String this._path, bool this.isWindowsShare);
 
@@ -58,8 +61,7 @@
     // Throws exception if an impossible case is reached.
     if (base.isAbsolute != isAbsolute ||
         base.isWindowsShare != isWindowsShare) {
-      throw new ArgumentError(
-          "Invalid case of Path.relativeTo(base):\n"
+      throw new ArgumentError("Invalid case of Path.relativeTo(base):\n"
           "  Path and base must both be relative, or both absolute.\n"
           "  Arguments: $_path.relativeTo($base)");
     }
@@ -72,29 +74,26 @@
       bool pathHasDrive =
           _path.length >= 4 && _path[2] == ':' && _path[3] == '/';
       if (baseHasDrive && pathHasDrive) {
-        int baseDrive = basePath.codeUnitAt(1) | 32;  // Convert to uppercase.
+        int baseDrive = basePath.codeUnitAt(1) | 32; // Convert to uppercase.
         if (baseDrive >= 'a'.codeUnitAt(0) &&
             baseDrive <= 'z'.codeUnitAt(0) &&
             baseDrive == (_path.codeUnitAt(1) | 32)) {
-          if(basePath[1] != _path[1]) {
+          if (basePath[1] != _path[1]) {
             // Replace the drive letter in basePath with that from _path.
             basePath = '/${_path[1]}:/${basePath.substring(4)}';
             base = new Path(basePath);
           }
         } else {
-          throw new ArgumentError(
-              "Invalid case of Path.relativeTo(base):\n"
+          throw new ArgumentError("Invalid case of Path.relativeTo(base):\n"
               "  Base path and target path are on different Windows drives.\n"
               "  Arguments: $_path.relativeTo($base)");
         }
       } else if (baseHasDrive != pathHasDrive) {
-        throw new ArgumentError(
-            "Invalid case of Path.relativeTo(base):\n"
+        throw new ArgumentError("Invalid case of Path.relativeTo(base):\n"
             "  Base path must start with a drive letter if and "
             "only if target path does.\n"
             "  Arguments: $_path.relativeTo($base)");
       }
-
     }
     if (_path.startsWith(basePath)) {
       if (_path == basePath) return new Path('.');
@@ -125,8 +124,7 @@
     final segments = new List<String>();
 
     if (common < baseSegments.length && baseSegments[common] == '..') {
-      throw new ArgumentError(
-          "Invalid case of Path.relativeTo(base):\n"
+      throw new ArgumentError("Invalid case of Path.relativeTo(base):\n"
           "  Base path has more '..'s than path does.\n"
           "  Arguments: $_path.relativeTo($base)");
     }
@@ -140,12 +138,11 @@
       segments.add('.');
     }
     if (hasTrailingSeparator) {
-        segments.add('');
+      segments.add('');
     }
     return new Path(segments.join('/'));
   }
 
-
   Path join(Path further) {
     if (further.isAbsolute) {
       throw new ArgumentError(
@@ -175,19 +172,19 @@
     // Contains no segments that are '.'.
     // Absolute paths have no segments that are '..'.
     // All '..' segments of a relative path are at the beginning.
-    if (isEmpty) return false;  // The canonical form of '' is '.'.
+    if (isEmpty) return false; // The canonical form of '' is '.'.
     if (_path == '.') return true;
-    List segs = _path.split('/');  // Don't mask the getter 'segments'.
-    if (segs[0] == '') {  // Absolute path
-      segs[0] = null;  // Faster than removeRange().
-    } else {  // A canonical relative path may start with .. segments.
-      for (int pos = 0;
-           pos < segs.length && segs[pos] == '..';
-           ++pos) {
+    List segs = _path.split('/'); // Don't mask the getter 'segments'.
+    if (segs[0] == '') {
+      // Absolute path
+      segs[0] = null; // Faster than removeRange().
+    } else {
+      // A canonical relative path may start with .. segments.
+      for (int pos = 0; pos < segs.length && segs[pos] == '..'; ++pos) {
         segs[pos] = null;
       }
     }
-    if (segs.last == '') segs.removeLast();  // Path ends with /.
+    if (segs.last == '') segs.removeLast(); // Path ends with /.
     // No remaining segments can be ., .., or empty.
     return !segs.any((s) => s == '' || s == '.' || s == '..');
   }
@@ -196,10 +193,7 @@
     bool isAbs = isAbsolute;
     List segs = segments();
     String drive;
-    if (isAbs &&
-        !segs.isEmpty &&
-        segs[0].length == 2 &&
-        segs[0][1] == ':') {
+    if (isAbs && !segs.isEmpty && segs[0].length == 2 && segs[0][1] == ':') {
       drive = segs[0];
       segs.removeRange(0, 1);
     }
diff --git a/tools/testing/dart/record_and_replay.dart b/tools/testing/dart/record_and_replay.dart
index 68e67ce..022c35d 100644
--- a/tools/testing/dart/record_and_replay.dart
+++ b/tools/testing/dart/record_and_replay.dart
@@ -52,7 +52,7 @@
   var _cwd;
 
   TestCaseRecorder(this._outputPath) {
-    _cwd  = Directory.current.path;
+    _cwd = Directory.current.path;
   }
 
   void nextCommand(ProcessCommand command, int timeout) {
@@ -63,11 +63,11 @@
     var arguments = makePathsRelativeToDart(_cwd, command.arguments);
 
     var commandExecution = {
-      'name' : command.displayName,
-      'command' : {
-        'timeout_limit' : timeout,
-        'executable' : command.executable,
-        'arguments' : arguments,
+      'name': command.displayName,
+      'command': {
+        'timeout_limit': timeout,
+        'executable': command.executable,
+        'arguments': arguments,
       },
     };
     _recordedCommandInvocations.add(commandExecution);
@@ -86,7 +86,7 @@
   var _cwd;
 
   TestCaseOutputArchive() {
-    _cwd  = Directory.current.path;
+    _cwd = Directory.current.path;
   }
 
   void loadFromPath(Path recordingPath) {
@@ -95,7 +95,7 @@
     _commandOutputRecordings = {};
     for (var commandRecording in commandRecordings) {
       var key = _indexKey(commandRecording['command']['executable'],
-                          commandRecording['command']['arguments'].join(' '));
+          commandRecording['command']['arguments'].join(' '));
       _commandOutputRecordings[key] = commandRecording['command_output'];
     }
   }
@@ -111,13 +111,13 @@
     var command_output = _commandOutputRecordings[key];
     if (command_output == null) {
       print("Sorry, but there is no command output for ${command.displayName}"
-            " ($command)");
+          " ($command)");
       exit(42);
     }
 
     double seconds = command_output['duration'];
-    var duration = new Duration(seconds: seconds.round(),
-                                milliseconds: (seconds/1000).round());
+    var duration = new Duration(
+        seconds: seconds.round(), milliseconds: (seconds / 1000).round());
     var commandOutput = createCommandOutput(
         command,
         command_output['exit_code'],
@@ -133,4 +133,3 @@
     return "${executable}__$arguments";
   }
 }
-
diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
index c2b2aed..8766322 100644
--- a/tools/testing/dart/runtime_configuration.dart
+++ b/tools/testing/dart/runtime_configuration.dart
@@ -4,17 +4,13 @@
 
 library runtime_configuration;
 
-import 'compiler_configuration.dart' show
-    CommandArtifact;
+import 'compiler_configuration.dart' show CommandArtifact;
 
 // TODO(ahe): Remove this import, we can precompute all the values required
 // from TestSuite once the refactoring is complete.
-import 'test_suite.dart' show
-    TestSuite;
+import 'test_suite.dart' show TestSuite;
 
-import 'test_runner.dart' show
-    Command,
-    CommandBuilder;
+import 'test_runner.dart' show Command, CommandBuilder;
 
 // TODO(ahe): I expect this class will become abstract very soon.
 class RuntimeConfiguration {
@@ -68,10 +64,8 @@
 
   RuntimeConfiguration._subclass();
 
-  int computeTimeoutMultiplier({
-      String mode,
-      bool isChecked: false,
-      String arch}) {
+  int computeTimeoutMultiplier(
+      {String mode, bool isChecked: false, String arch}) {
     return 1;
   }
 
@@ -90,8 +84,7 @@
 
 /// The 'none' runtime configuration.
 class NoneRuntimeConfiguration extends RuntimeConfiguration {
-  NoneRuntimeConfiguration()
-      : super._subclass();
+  NoneRuntimeConfiguration() : super._subclass();
 
   List<Command> computeRuntimeCommands(
       TestSuite suite,
@@ -106,8 +99,7 @@
 class CommandLineJavaScriptRuntime extends RuntimeConfiguration {
   final String moniker;
 
-  CommandLineJavaScriptRuntime(this.moniker)
-      : super._subclass();
+  CommandLineJavaScriptRuntime(this.moniker) : super._subclass();
 
   void checkArtifact(CommandArtifact artifact) {
     String type = artifact.mimeType;
@@ -119,8 +111,7 @@
 
 /// Chrome/V8-based development shell (d8).
 class D8RuntimeConfiguration extends CommandLineJavaScriptRuntime {
-  D8RuntimeConfiguration()
-      : super('d8');
+  D8RuntimeConfiguration() : super('d8');
 
   List<Command> computeRuntimeCommands(
       TestSuite suite,
@@ -131,8 +122,9 @@
     // TODO(ahe): Avoid duplication of this method between d8 and jsshell.
     checkArtifact(artifact);
     return <Command>[
-        commandBuilder.getJSCommandlineCommand(
-            moniker, suite.d8FileName, arguments, environmentOverrides)];
+      commandBuilder.getJSCommandlineCommand(
+          moniker, suite.d8FileName, arguments, environmentOverrides)
+    ];
   }
 
   List<String> dart2jsPreambles(Uri preambleDir) {
@@ -142,8 +134,7 @@
 
 /// Firefox/SpiderMonkey-based development shell (jsshell).
 class JsshellRuntimeConfiguration extends CommandLineJavaScriptRuntime {
-  JsshellRuntimeConfiguration()
-      : super('jsshell');
+  JsshellRuntimeConfiguration() : super('jsshell');
 
   List<Command> computeRuntimeCommands(
       TestSuite suite,
@@ -153,8 +144,9 @@
       Map<String, String> environmentOverrides) {
     checkArtifact(artifact);
     return <Command>[
-        commandBuilder.getJSCommandlineCommand(
-            moniker, suite.jsShellFileName, arguments, environmentOverrides)];
+      commandBuilder.getJSCommandlineCommand(
+          moniker, suite.jsShellFileName, arguments, environmentOverrides)
+    ];
   }
 
   List<String> dart2jsPreambles(Uri preambleDir) {
@@ -164,20 +156,17 @@
 
 /// Common runtime configuration for runtimes based on the Dart VM.
 class DartVmRuntimeConfiguration extends RuntimeConfiguration {
-  DartVmRuntimeConfiguration()
-      : super._subclass();
+  DartVmRuntimeConfiguration() : super._subclass();
 
-  int computeTimeoutMultiplier({
-      String mode,
-      bool isChecked: false,
-      String arch}) {
+  int computeTimeoutMultiplier(
+      {String mode, bool isChecked: false, String arch}) {
     int multiplier = 1;
     switch (arch) {
       case 'simarm':
       case 'arm':
       case 'simarmv6':
       case 'armv6':
-      case' simarmv5te':
+      case ' simarmv5te':
       case 'armv5te':
       case 'simmips':
       case 'mips':
@@ -195,16 +184,14 @@
 /// Runtime configuration for Content Shell.  We previously used a similar
 /// program named Dump Render Tree, hence the name.
 class DrtRuntimeConfiguration extends DartVmRuntimeConfiguration {
-  int computeTimeoutMultiplier({
-      String mode,
-      bool isChecked: false,
-      String arch}) {
+  int computeTimeoutMultiplier(
+      {String mode, bool isChecked: false, String arch}) {
     return 4 // Allow additional time for browser testing to run.
         // TODO(ahe): We might need to distinquish between DRT for running
         // JavaScript and Dart code.  I'm not convinced the inherited timeout
         // multiplier is relevant for JavaScript.
-        * super.computeTimeoutMultiplier(
-            mode: mode, isChecked: isChecked);
+        *
+        super.computeTimeoutMultiplier(mode: mode, isChecked: isChecked);
   }
 }
 
@@ -224,8 +211,9 @@
     String executable = suite.configuration['noopt']
         ? suite.dartVmNooptBinaryFileName
         : suite.dartVmBinaryFileName;
-    return <Command>[commandBuilder.getVmCommand(
-          executable, arguments, environmentOverrides)];
+    return <Command>[
+      commandBuilder.getVmCommand(executable, arguments, environmentOverrides)
+    ];
   }
 }
 
@@ -246,10 +234,10 @@
     augmentedArgs.add("--run-full-snapshot=${artifact.filename}");
     augmentedArgs.addAll(arguments);
 
-    return <Command>[commandBuilder.getVmCommand(
-          suite.dartVmProductBinaryFileName,
-          augmentedArgs,
-          environmentOverrides)];
+    return <Command>[
+      commandBuilder.getVmCommand(suite.dartVmProductBinaryFileName,
+          augmentedArgs, environmentOverrides)
+    ];
   }
 }
 
@@ -270,11 +258,10 @@
     augmentedArgs.add("--run-precompiled-snapshot=${artifact.filename}");
     augmentedArgs.addAll(arguments);
 
-    var augmentedEnv = new Map.from(environmentOverrides);
-    augmentedEnv['LD_LIBRARY_PATH'] = artifact.filename;
-
-    return <Command>[commandBuilder.getVmCommand(
-          suite.dartPrecompiledBinaryFileName, augmentedArgs, augmentedEnv)];
+    return <Command>[
+      commandBuilder.getVmCommand(suite.dartPrecompiledBinaryFileName,
+          augmentedArgs, environmentOverrides)
+    ];
   }
 }
 
diff --git a/tools/testing/dart/status_expression.dart b/tools/testing/dart/status_expression.dart
index 5cd0a34..c5b0b80 100644
--- a/tools/testing/dart/status_expression.dart
+++ b/tools/testing/dart/status_expression.dart
@@ -49,13 +49,11 @@
   static const String OR = "||";
 }
 
-
 class Tokenizer {
   String expression;
   List<String> tokens;
 
-  Tokenizer(String this.expression)
-    : tokens = new List<String>();
+  Tokenizer(String this.expression) : tokens = new List<String>();
 
   // Tokens are : "(", ")", "$", ",", "&&", "||", "==", "!=", and (maximal) \w+.
   static final testRegexp =
@@ -71,17 +69,14 @@
   }
 }
 
-
 abstract class BooleanExpression {
   bool evaluate(Map<String, String> environment);
 }
 
-
 abstract class SetExpression {
   Set<String> evaluate(Map<String, String> environment);
 }
 
-
 class Comparison implements BooleanExpression {
   TermVariable left;
   TermConstant right;
@@ -90,15 +85,14 @@
   Comparison(this.left, this.right, this.negate);
 
   bool evaluate(environment) {
-    return
-        negate != (left.termValue(environment) == right.termValue(environment));
+    return negate !=
+        (left.termValue(environment) == right.termValue(environment));
   }
 
   String toString() =>
       "(\$${left.name} ${negate ? '!=' : '=='} ${right.value})";
 }
 
-
 class TermVariable {
   String name;
 
@@ -107,15 +101,13 @@
   String termValue(environment) {
     var value = environment[name];
     if (value == null) {
-      throw new ExprEvaluationException(
-          "Could not find '$name' in environment "
+      throw new ExprEvaluationException("Could not find '$name' in environment "
           "while evaluating status file expression.");
     }
     return value.toString();
   }
 }
 
-
 class TermConstant {
   String value;
 
@@ -124,7 +116,6 @@
   String termValue(environment) => value;
 }
 
-
 class BooleanVariable implements BooleanExpression {
   TermVariable variable;
 
@@ -134,7 +125,6 @@
   String toString() => "(bool \$${variable.name})";
 }
 
-
 class BooleanOperation implements BooleanExpression {
   String op;
   BooleanExpression left;
@@ -142,13 +132,12 @@
 
   BooleanOperation(this.op, this.left, this.right);
 
-  bool evaluate(environment) => (op == Token.AND) ?
-      left.evaluate(environment) && right.evaluate(environment) :
-      left.evaluate(environment) || right.evaluate(environment);
+  bool evaluate(environment) => (op == Token.AND)
+      ? left.evaluate(environment) && right.evaluate(environment)
+      : left.evaluate(environment) || right.evaluate(environment);
   String toString() => "($left $op $right)";
 }
 
-
 class SetUnion implements SetExpression {
   SetExpression left;
   SetExpression right;
@@ -166,19 +155,18 @@
   String toString() => "($left || $right)";
 }
 
-
 class SetIf implements SetExpression {
   SetExpression left;
   BooleanExpression right;
 
   SetIf(this.left, this.right);
 
-  Set<String> evaluate(environment) => right.evaluate(environment) ?
-    left.evaluate(environment) : new Set<String>();
+  Set<String> evaluate(environment) => right.evaluate(environment)
+      ? left.evaluate(environment)
+      : new Set<String>();
   String toString() => "($left if $right)";
 }
 
-
 class SetConstant implements SetExpression {
   String value;
 
@@ -188,7 +176,6 @@
   String toString() => value;
 }
 
-
 // An iterator that allows peeking at the current token.
 class Scanner {
   List<String> tokens;
@@ -207,7 +194,6 @@
   }
 }
 
-
 class ExpressionParser {
   Scanner scanner;
 
@@ -217,7 +203,7 @@
 
   SetExpression parseSetUnion() {
     SetExpression left = parseSetIf();
-    while (scanner.hasMore() && scanner.current == Token.UNION){
+    while (scanner.hasMore() && scanner.current == Token.UNION) {
       scanner.advance();
       SetExpression right = parseSetIf();
       left = new SetUnion(left, right);
@@ -237,7 +223,7 @@
 
   SetExpression parseSetOr() {
     SetExpression left = parseSetAtomic();
-    while (scanner.hasMore() && scanner.current == Token.OR){
+    while (scanner.hasMore() && scanner.current == Token.OR) {
       scanner.advance();
       SetExpression right = parseSetAtomic();
       left = new SetUnion(left, right);
@@ -245,7 +231,6 @@
     return left;
   }
 
-
   SetExpression parseSetAtomic() {
     if (scanner.current == Token.LEFT_PAREN) {
       scanner.advance();
@@ -327,4 +312,3 @@
     }
   }
 }
-
diff --git a/tools/testing/dart/status_file_parser.dart b/tools/testing/dart/status_file_parser.dart
index 8c32e6e..8fa9bb7 100644
--- a/tools/testing/dart/status_file_parser.dart
+++ b/tools/testing/dart/status_file_parser.dart
@@ -25,8 +25,7 @@
   static Expectation MISSING_COMPILETIME_ERROR =
       byName('MissingCompileTimeError');
   static Expectation STATIC_WARNING = byName('StaticWarning');
-  static Expectation MISSING_STATIC_WARNING =
-      byName('MissingStaticWarning');
+  static Expectation MISSING_STATIC_WARNING = byName('MissingStaticWarning');
   static Expectation PUB_GET_ERROR = byName('PubGetError');
 
   // "meta expectations"
@@ -46,7 +45,7 @@
   }
 
   // Keep a map of all possible Expectation objects, initialized lazily.
-  static Map<String, Expectation>  _AllExpectations;
+  static Map<String, Expectation> _AllExpectations;
   static void _initialize() {
     if (_AllExpectations == null) {
       _AllExpectations = new Map<String, Expectation>();
@@ -89,9 +88,9 @@
   final bool isMetaExpectation;
 
   Expectation._(prettyName,
-                {Expectation this.group: null,
-                 bool this.isMetaExpectation: false})
-      : prettyName = prettyName, name = prettyName.toLowerCase();
+      {Expectation this.group: null, bool this.isMetaExpectation: false})
+      : prettyName = prettyName,
+        name = prettyName.toLowerCase();
 
   bool canBeOutcomeOf(Expectation expectation) {
     Expectation outcome = this;
@@ -107,7 +106,6 @@
   String toString() => prettyName;
 }
 
-
 final RegExp SplitComment = new RegExp("^([^#]*)(#.*)?\$");
 final RegExp HeaderPattern = new RegExp(r"^\[([^\]]+)\]");
 final RegExp RulePattern = new RegExp(r"\s*([^: ]*)\s*:(.*)");
@@ -129,7 +127,8 @@
   final int lineNumber;
 
   Section.always(this.statusFile, this.lineNumber)
-      : condition = null, testRules = new List<TestRule>();
+      : condition = null,
+        testRules = new List<TestRule>();
   Section(this.statusFile, this.condition, this.lineNumber)
       : testRules = new List<TestRule>();
 
@@ -141,18 +140,16 @@
   }
 }
 
-Future<TestExpectations> ReadTestExpectations(List<String> statusFilePaths,
-                                              Map environment) {
+Future<TestExpectations> ReadTestExpectations(
+    List<String> statusFilePaths, Map environment) {
   var testExpectations = new TestExpectations();
   return Future.wait(statusFilePaths.map((String statusFile) {
-    return ReadTestExpectationsInto(
-        testExpectations, statusFile, environment);
+    return ReadTestExpectationsInto(testExpectations, statusFile, environment);
   })).then((_) => testExpectations);
 }
 
-Future ReadTestExpectationsInto(TestExpectations expectations,
-                                String statusFilePath,
-                                environment) {
+Future ReadTestExpectationsInto(
+    TestExpectations expectations, String statusFilePath, environment) {
   var completer = new Completer();
   List<Section> sections = new List<Section>();
 
@@ -179,14 +176,11 @@
   }
   int lineNumber = 0;
   Stream<String> lines =
-      file.openRead()
-          .transform(UTF8.decoder)
-          .transform(new LineSplitter());
+      file.openRead().transform(UTF8.decoder).transform(new LineSplitter());
 
   Section currentSection = new Section.always(statusFile, -1);
   sections.add(currentSection);
 
-
   lines.listen((String line) {
     lineNumber++;
     Match match = SplitComment.firstMatch(line);
@@ -225,34 +219,28 @@
         if (issueString == null) issueString = match[2];
       }
       int issue = issueString != null ? int.parse(issueString) : null;
-      currentSection.testRules.add(
-          new TestRule(name, expression, issue, lineNumber));
+      currentSection.testRules
+          .add(new TestRule(name, expression, issue, lineNumber));
       return;
     }
 
     print("unmatched line: $line");
-  },
-  onDone: onDone);
+  }, onDone: onDone);
 }
 
-
 class TestRule {
   String name;
   SetExpression expression;
   int issue;
   int lineNumber;
 
-  TestRule(this.name,
-           this.expression,
-           this.issue,
-           this.lineNumber);
+  TestRule(this.name, this.expression, this.issue, this.lineNumber);
 
   bool get hasIssue => issue != null;
 
   String toString() => 'TestRule($name, $expression, $issue)';
 }
 
-
 class TestExpectations {
   // Only create one copy of each Set<Expectation>.
   // We just use .toString as a key, so we may make a few
diff --git a/tools/testing/dart/status_reporter.dart b/tools/testing/dart/status_reporter.dart
index 5841052..0f5e37b 100644
--- a/tools/testing/dart/status_reporter.dart
+++ b/tools/testing/dart/status_reporter.dart
@@ -6,78 +6,78 @@
 import 'dart:convert';
 
 List<Map> LINUX_COMBINATIONS = [
-    {
-      'runtimes' : ['none'],
-      'modes' : ['release'],
-      'archs' : ['x64'],
-      'compiler' : 'dart2analyzer'
-    },
-    {
-      'runtimes' : ['vm'],
-      'modes' : ['debug', 'release'],
-      'archs' : ['ia32', 'x64', 'simarm', 'simmips'],
-      'compiler' : 'none'
-    },
-    {
-      'runtimes' : ['d8', 'jsshell', 'chrome', 'ff'],
-      'modes' : ['release'],
-      'archs' : ['ia32'],
-      'compiler' : 'dart2js'
-    },
-    {
-      'runtimes' : ['dartium'],
-      'modes' : ['release', 'debug'],
-      'archs' : ['ia32'],
-      'compiler' : 'none'
-    },
+  {
+    'runtimes': ['none'],
+    'modes': ['release'],
+    'archs': ['x64'],
+    'compiler': 'dart2analyzer'
+  },
+  {
+    'runtimes': ['vm'],
+    'modes': ['debug', 'release'],
+    'archs': ['ia32', 'x64', 'simarm', 'simmips'],
+    'compiler': 'none'
+  },
+  {
+    'runtimes': ['d8', 'jsshell', 'chrome', 'ff'],
+    'modes': ['release'],
+    'archs': ['ia32'],
+    'compiler': 'dart2js'
+  },
+  {
+    'runtimes': ['dartium'],
+    'modes': ['release', 'debug'],
+    'archs': ['ia32'],
+    'compiler': 'none'
+  },
 ];
 
 List<Map> MACOS_COMBINATIONS = [
-    {
-      'runtimes' : ['vm'],
-      'modes' : ['debug', 'release'],
-      'archs' : ['ia32', 'x64'],
-      'compiler' : 'none'
-    },
-    {
-      'runtimes' : ['safari', 'safarimobilesim'],
-      'modes' : ['release'],
-      'archs' : ['ia32'],
-      'compiler' : 'dart2js'
-    },
-    {
-      'runtimes' : ['dartium'],
-      'modes' : ['release', 'debug'],
-      'archs' : ['ia32'],
-      'compiler' : 'none'
-    },
+  {
+    'runtimes': ['vm'],
+    'modes': ['debug', 'release'],
+    'archs': ['ia32', 'x64'],
+    'compiler': 'none'
+  },
+  {
+    'runtimes': ['safari', 'safarimobilesim'],
+    'modes': ['release'],
+    'archs': ['ia32'],
+    'compiler': 'dart2js'
+  },
+  {
+    'runtimes': ['dartium'],
+    'modes': ['release', 'debug'],
+    'archs': ['ia32'],
+    'compiler': 'none'
+  },
 ];
 
 List<Map> WINDOWS_COMBINATIONS = [
-    {
-      'runtimes' : ['vm'],
-      'modes' : ['debug', 'release'],
-      'archs' : ['ia32', 'x64'],
-      'compiler' : 'none'
-    },
-    {
-      'runtimes' : ['chrome', 'ff', 'ie11', 'ie10'],
-      'modes' : ['release'],
-      'archs' : ['ia32'],
-      'compiler' : 'dart2js'
-    },
-    {
-      'runtimes' : ['dartium'],
-      'modes' : ['release', 'debug'],
-      'archs' : ['ia32'],
-      'compiler' : 'none'
-    },
+  {
+    'runtimes': ['vm'],
+    'modes': ['debug', 'release'],
+    'archs': ['ia32', 'x64'],
+    'compiler': 'none'
+  },
+  {
+    'runtimes': ['chrome', 'ff', 'ie11', 'ie10'],
+    'modes': ['release'],
+    'archs': ['ia32'],
+    'compiler': 'dart2js'
+  },
+  {
+    'runtimes': ['dartium'],
+    'modes': ['release', 'debug'],
+    'archs': ['ia32'],
+    'compiler': 'none'
+  },
 ];
 
 Map<String, List<Map>> COMBINATIONS = {
-  'linux' : LINUX_COMBINATIONS,
-  'windows' : WINDOWS_COMBINATIONS,
-  'macos' : MACOS_COMBINATIONS
+  'linux': LINUX_COMBINATIONS,
+  'windows': WINDOWS_COMBINATIONS,
+  'macos': MACOS_COMBINATIONS
 };
 
 List<Map> getCombinations() {
@@ -165,8 +165,15 @@
         for (var runtime in combination['runtimes']) {
           var compiler = combination['compiler'];
 
-          var args = ['tools/test.py', '-m$mode', '-c$compiler', '-r$runtime',
-                      '-a$arch', '--report-in-json', '--use-sdk'];
+          var args = [
+            'tools/test.py',
+            '-m$mode',
+            '-c$compiler',
+            '-r$runtime',
+            '-a$arch',
+            '--report-in-json',
+            '--use-sdk'
+          ];
           var result = Process.runSync('python', args);
           if (result.exitCode != 0) {
             print(result.stdout);
@@ -202,7 +209,7 @@
           for (var key in keys) {
             var value = map[key];
             values.add(value);
-            var pct = 100*(value/total);
+            var pct = 100 * (value / total);
             values.add('${pct.toStringAsFixed(3)}%');
           }
 
diff --git a/tools/testing/dart/summary_report.dart b/tools/testing/dart/summary_report.dart
index 2f740b5..e62f772 100644
--- a/tools/testing/dart/summary_report.dart
+++ b/tools/testing/dart/summary_report.dart
@@ -37,7 +37,7 @@
         .any((expectation) => expectation.canBeOutcomeOf(Expectation.FAIL));
     bool containsPass = expectations.contains(Expectation.PASS);
     bool containsSkip = expectations
-      .any((expectation) => expectation.canBeOutcomeOf(Expectation.SKIP));
+        .any((expectation) => expectation.canBeOutcomeOf(Expectation.SKIP));
     bool containsSkipByDesign =
         expectations.contains(Expectation.SKIP_BY_DESIGN);
     bool containsCrash = expectations.contains(Expectation.CRASH);
@@ -100,19 +100,19 @@
   }
 
   Map<String, int> get values => {
-    'total': _total,
-    'skippedOther': skippedOther,
-    'skippedByDesign': _skippedByDesign,
-    'pass': _pass,
-    'noCrash': _noCrash,
-    'flakyCrash': _flakyCrash,
-    'failOk': _failOk,
-    'fail': _fail,
-    'crash': _crash,
-    'timeout': _timeout,
-    'compileErrorSkip': _compileErrorSkip,
-    'bogus': bogus
-  };
+        'total': _total,
+        'skippedOther': skippedOther,
+        'skippedByDesign': _skippedByDesign,
+        'pass': _pass,
+        'noCrash': _noCrash,
+        'flakyCrash': _flakyCrash,
+        'failOk': _failOk,
+        'fail': _fail,
+        'crash': _crash,
+        'timeout': _timeout,
+        'compileErrorSkip': _compileErrorSkip,
+        'bogus': bogus
+      };
 
   String get report => """Total: $_total tests
  * $_skipped tests will be skipped ($_skippedByDesign skipped by design)
diff --git a/tools/testing/dart/test_configurations.dart b/tools/testing/dart/test_configurations.dart
index c7d4a09..ff48273 100644
--- a/tools/testing/dart/test_configurations.dart
+++ b/tools/testing/dart/test_configurations.dart
@@ -26,27 +26,27 @@
  * moved to here, if possible.
 */
 final TEST_SUITE_DIRECTORIES = [
-    new Path('pkg'),
-    new Path('third_party/pkg_tested'),
-    new Path('runtime/tests/vm'),
-    new Path('runtime/observatory/tests/service'),
-    new Path('samples'),
-    new Path('samples-dev'),
-    new Path('tests/benchmark_smoke'),
-    new Path('tests/chrome'),
-    new Path('tests/compiler/dart2js'),
-    new Path('tests/compiler/dart2js_extra'),
-    new Path('tests/compiler/dart2js_native'),
-    new Path('tests/corelib'),
-    new Path('tests/html'),
-    new Path('tests/isolate'),
-    new Path('tests/language'),
-    new Path('tests/lib'),
-    new Path('tests/standalone'),
-    new Path('tests/try'),
-    new Path('tests/utils'),
-    new Path('utils/tests/css'),
-    new Path('utils/tests/peg'),
+  new Path('pkg'),
+  new Path('third_party/pkg_tested'),
+  new Path('runtime/tests/vm'),
+  new Path('runtime/observatory/tests/service'),
+  new Path('samples'),
+  new Path('samples-dev'),
+  new Path('tests/benchmark_smoke'),
+  new Path('tests/chrome'),
+  new Path('tests/compiler/dart2js'),
+  new Path('tests/compiler/dart2js_extra'),
+  new Path('tests/compiler/dart2js_native'),
+  new Path('tests/corelib'),
+  new Path('tests/html'),
+  new Path('tests/isolate'),
+  new Path('tests/language'),
+  new Path('tests/lib'),
+  new Path('tests/standalone'),
+  new Path('tests/try'),
+  new Path('tests/utils'),
+  new Path('utils/tests/css'),
+  new Path('utils/tests/peg'),
 ];
 
 void testConfigurations(List<Map> configurations) {
@@ -72,13 +72,15 @@
 
   if (recordingPath != null && recordingOutputPath != null) {
     print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'"
-          "at the same time. Exiting ...");
+        "at the same time. Exiting ...");
     exit(1);
   }
 
-  if (!firstConf['append_logs'])  {
-    var files = [new File(TestUtils.flakyFileName()),
-                 new File(TestUtils.testOutcomeFileName())];
+  if (!firstConf['append_logs']) {
+    var files = [
+      new File(TestUtils.flakyFileName()),
+      new File(TestUtils.testOutcomeFileName())
+    ];
     for (var file in files) {
       if (file.existsSync()) {
         file.deleteSync();
@@ -86,18 +88,21 @@
     }
   }
 
-  DebugLogger.init(firstConf['write_debug_log'] ?
-      TestUtils.debugLogfile() : null, append: firstConf['append_logs']);
+  DebugLogger.init(
+      firstConf['write_debug_log'] ? TestUtils.debugLogfile() : null,
+      append: firstConf['append_logs']);
 
   // Print the configurations being run by this execution of
   // test.dart. However, don't do it if the silent progress indicator
   // is used. This is only needed because of the junit tests.
   if (progressIndicator != 'silent') {
-    List output_words = configurations.length > 1 ?
-        ['Test configurations:'] : ['Test configuration:'];
+    List output_words = configurations.length > 1
+        ? ['Test configurations:']
+        : ['Test configuration:'];
     for (Map conf in configurations) {
       List settings = ['compiler', 'runtime', 'mode', 'arch']
-          .map((name) => conf[name]).toList();
+          .map((name) => conf[name])
+          .toList();
       if (conf['checked']) settings.add('checked');
       if (conf['noopt']) settings.add('noopt');
       output_words.add(settings.join('_'));
@@ -114,9 +119,9 @@
   var maxBrowserProcesses = maxProcesses;
   if (configurations.length > 1 &&
       (configurations[0]['test_server_port'] != 0 ||
-       configurations[0]['test_server_cross_origin_port'] != 0)) {
+          configurations[0]['test_server_cross_origin_port'] != 0)) {
     print("If the http server ports are specified, only one configuration"
-          " may be run at a time");
+        " may be run at a time");
     exit(1);
   }
   for (var conf in configurations) {
@@ -127,11 +132,12 @@
       // The http server is available on window.location.port, and a second
       // server for cross-domain tests can be found by calling
       // getCrossOriginPortNumber().
-      var servers = new TestingServers(new Path(TestUtils.buildDir(conf)),
-                                       useContentSecurityPolicy,
-                                       conf['runtime'],
-                                       null,
-                                       conf['package_root']);
+      var servers = new TestingServers(
+          new Path(TestUtils.buildDir(conf)),
+          useContentSecurityPolicy,
+          conf['runtime'],
+          null,
+          conf['package_root']);
       serverFutures.add(servers.startServers(conf['local_ip'],
           port: conf['test_server_port'],
           crossOriginPort: conf['test_server_cross_origin_port']));
@@ -158,7 +164,7 @@
       // for mobile safari simultainiously.
       maxBrowserProcesses = 1;
     } else if (conf['runtime'] == 'chrome' &&
-               Platform.operatingSystem == 'macos') {
+        Platform.operatingSystem == 'macos') {
       // Chrome on mac results in random timeouts.
       // Issue: https://github.com/dart-lang/sdk/issues/23891
       // This change does not fix the problem.
@@ -180,8 +186,8 @@
         if (key == 'co19') {
           testSuites.add(new Co19TestSuite(conf));
         } else if (conf['compiler'] == 'none' &&
-                   conf['runtime'] == 'vm' &&
-                   key == 'vm') {
+            conf['runtime'] == 'vm' &&
+            key == 'vm') {
           // vm tests contain both cc tests (added here) and dart tests (added
           // in [TEST_SUITE_DIRECTORIES]).
           testSuites.add(new VMTestSuite(conf));
@@ -190,17 +196,17 @@
             testSuites.add(new AnalyzeLibraryTestSuite(conf));
           }
         } else if (conf['compiler'] == 'none' &&
-                   conf['runtime'] == 'vm' &&
-                   key == 'pkgbuild') {
+            conf['runtime'] == 'vm' &&
+            key == 'pkgbuild') {
           if (!conf['use_repository_packages'] &&
               !conf['use_public_packages']) {
             print("You need to use either --use-repository-packages or "
-                  "--use-public-packages with the pkgbuild test suite!");
+                "--use-public-packages with the pkgbuild test suite!");
             exit(1);
           }
           if (!conf['use_sdk']) {
             print("Running the 'pkgbuild' test suite requires "
-                  "passing the '--use-sdk' to test.py");
+                "passing the '--use-sdk' to test.py");
             exit(1);
           }
           testSuites.add(
@@ -211,8 +217,8 @@
       for (final testSuiteDir in TEST_SUITE_DIRECTORIES) {
         final name = testSuiteDir.filename;
         if (selectors.containsKey(name)) {
-          testSuites.add(
-              new StandardTestSuite.forDirectory(conf, testSuiteDir));
+          testSuites
+              .add(new StandardTestSuite.forDirectory(conf, testSuiteDir));
         }
       }
     }
@@ -252,9 +258,8 @@
       var printFailureSummary = progressIndicator != 'buildbot';
       eventListener.add(new TestFailurePrinter(printFailureSummary, formatter));
     }
-    eventListener.add(progressIndicatorFromName(progressIndicator,
-                                                startTime,
-                                                formatter));
+    eventListener.add(
+        progressIndicatorFromName(progressIndicator, startTime, formatter));
     if (printTiming) {
       eventListener.add(new TimingPrinter(startTime));
     }
@@ -279,16 +284,17 @@
   void startProcessQueue() {
     // [firstConf] is needed here, since the ProcessQueue needs to know the
     // settings of 'noBatch' and 'local_ip'
-    new ProcessQueue(firstConf,
-                     maxProcesses,
-                     maxBrowserProcesses,
-                     startTime,
-                     testSuites,
-                     eventListener,
-                     allTestsFinished,
-                     verbose,
-                     recordingPath,
-                     recordingOutputPath);
+    new ProcessQueue(
+        firstConf,
+        maxProcesses,
+        maxBrowserProcesses,
+        startTime,
+        testSuites,
+        eventListener,
+        allTestsFinished,
+        verbose,
+        recordingPath,
+        recordingOutputPath);
   }
 
   // Start all the HTTP servers required before starting the process queue.
diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart
index 26d5249..9cbd3c2 100644
--- a/tools/testing/dart/test_options.dart
+++ b/tools/testing/dart/test_options.dart
@@ -11,10 +11,22 @@
 import "compiler_configuration.dart" show CompilerConfiguration;
 import "runtime_configuration.dart" show RuntimeConfiguration;
 
-const List<String> defaultTestSelectors =
-    const ['samples', 'standalone', 'corelib', 'co19', 'language',
-           'isolate', 'vm', 'html', 'benchmark_smoke',
-           'utils', 'lib', 'pkg', 'analyze_library', 'service'];
+const List<String> defaultTestSelectors = const [
+  'samples',
+  'standalone',
+  'corelib',
+  'co19',
+  'language',
+  'isolate',
+  'vm',
+  'html',
+  'benchmark_smoke',
+  'utils',
+  'lib',
+  'pkg',
+  'analyze_library',
+  'service'
+];
 
 /**
  * Specification of a single test option.
@@ -23,12 +35,9 @@
  * the Map returned from the [TestOptionParser] parse method.
  */
 class _TestOptionSpecification {
-  _TestOptionSpecification(this.name,
-                           this.description,
-                           this.keys,
-                           this.values,
-                           this.defaultValue,
-                           {this.type : 'string'});
+  _TestOptionSpecification(
+      this.name, this.description, this.keys, this.values, this.defaultValue,
+      {this.type: 'string'});
   String name;
   String description;
   List<String> keys;
@@ -45,16 +54,12 @@
    * Creates a test options parser initialized with the known options.
    */
   TestOptionsParser() {
-    _options =
-        [ new _TestOptionSpecification(
-              'mode',
-              'Mode in which to run the tests',
-              ['-m', '--mode'],
-              ['all', 'debug', 'release', 'product'],
-              'debug'),
-          new _TestOptionSpecification(
-              'compiler',
-              '''Specify any compilation step (if needed).
+    _options = [
+      new _TestOptionSpecification('mode', 'Mode in which to run the tests',
+          ['-m', '--mode'], ['all', 'debug', 'release', 'product'], 'debug'),
+      new _TestOptionSpecification(
+          'compiler',
+          '''Specify any compilation step (if needed).
 
    none: Do not compile the Dart code (run native Dart code on the VM).
          (only valid with the following runtimes: vm, drt)
@@ -69,14 +74,13 @@
 
    dart2app: Compile the Dart code into an app snapshot before running the test
           (only valid with the following runtimes: dart_product)''',
-              ['-c', '--compiler'],
-              ['none', 'precompiler', 'dart2js', 'dart2analyzer',
-               'dart2app'],
-              'none'),
-          // TODO(antonm): fix the option drt.
-          new _TestOptionSpecification(
-              'runtime',
-              '''Where the tests should be run.
+          ['-c', '--compiler'],
+          ['none', 'precompiler', 'dart2js', 'dart2analyzer', 'dart2app'],
+          'none'),
+      // TODO(antonm): fix the option drt.
+      new _TestOptionSpecification(
+          'runtime',
+          '''Where the tests should be run.
     vm: Run Dart code on the standalone dart vm.
 
     dart_precompiled: Run a precompiled snapshot on a variant of the standalone
@@ -103,372 +107,325 @@
 
     none: No runtime, compile only (for example, used for dart2analyzer static
           analysis tests).''',
-              ['-r', '--runtime'],
-              ['vm', 'dart_precompiled', 'dart_product',
-               'd8', 'jsshell', 'drt', 'dartium',
-               'ff', 'firefox',
-               'chrome', 'safari', 'ie9', 'ie10', 'ie11', 'opera',
-               'chromeOnAndroid', 'safarimobilesim',
-               'ContentShellOnAndroid', 'DartiumOnAndroid', 'none'],
-              'vm'),
-          new _TestOptionSpecification(
-              'arch',
-              'The architecture to run tests for',
-              ['-a', '--arch'],
-              ['all', 'ia32', 'x64', 'arm', 'armv6', 'armv5te', 'arm64', 'mips',
-               'simarm', 'simarmv6', 'simarmv5te', 'simarm64', 'simmips'],
-              'x64'),
-          new _TestOptionSpecification(
-              'system',
-              'The operating system to run tests on',
-              ['-s', '--system'],
-              ['linux', 'macos', 'windows'],
-              Platform.operatingSystem),
-          new _TestOptionSpecification(
-              'checked',
-              'Run tests in checked mode',
-              ['--checked'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'host_checked',
-              'Run compiler in checked mode',
-              ['--host-checked'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'minified',
-              'Enable minification in the compiler',
-              ['--minified'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'csp',
-              'Run tests under Content Security Policy restrictions',
-              ['--csp'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'cps_ir',
-              'Run the compiler with the cps based backend',
-              ['--cps-ir'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'noopt',
-              'Run an in-place precompilation',
-              ['--noopt'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'timeout',
-              'Timeout in seconds',
-              ['-t', '--timeout'],
-              [],
-              -1,
-              type: 'int'),
-          new _TestOptionSpecification(
-              'progress',
-              'Progress indication mode',
-              ['-p', '--progress'],
-              ['compact', 'color', 'line', 'verbose',
-               'silent', 'status', 'buildbot', 'diff'],
-              'compact'),
-          new _TestOptionSpecification(
-              'failure-summary',
-              'Print failure summary at the end',
-              ['--failure-summary'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'step_name',
-              'Step name for use by -pbuildbot',
-              ['--step_name'],
-              [],
-              null),
-          new _TestOptionSpecification(
-              'report',
-              'Print a summary report of the number of tests, by expectation',
-              ['--report'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'tasks',
-              'The number of parallel tasks to run',
-              ['-j', '--tasks'],
-              [],
-              Platform.numberOfProcessors,
-              type: 'int'),
-          new _TestOptionSpecification(
-              'shards',
-              'The number of instances that the tests will be sharded over',
-              ['--shards'],
-              [],
-              1,
-              type: 'int'),
-          new _TestOptionSpecification(
-              'shard',
-              'The index of this instance when running in sharded mode',
-              ['--shard'],
-              [],
-              1,
-              type: 'int'),
-          new _TestOptionSpecification(
-              'help',
-              'Print list of options',
-              ['-h', '--help'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'verbose',
-              'Verbose output',
-              ['-v', '--verbose'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'list',
-              'List tests only, do not run them',
-              ['--list'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'report_in_json',
-              'When doing list, output result summary in json only.',
-              ['--report-in-json'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'time',
-              'Print timing information after running tests',
-              ['--time'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'dart',
-              'Path to dart executable',
-              ['--dart'],
-              [],
-              ''),
-          new _TestOptionSpecification(
-              'drt', // TODO(antonm): fix the option name.
-              'Path to content shell executable',
-              ['--drt'],
-              [],
-              ''),
-          new _TestOptionSpecification(
-              'dartium',
-              'Path to Dartium Chrome executable',
-              ['--dartium'],
-              [],
-              ''),
-          new _TestOptionSpecification(
-              'firefox',
-              'Path to firefox browser executable',
-              ['--firefox'],
-              [],
-              ''),
-          new _TestOptionSpecification(
-              'chrome',
-              'Path to chrome browser executable',
-              ['--chrome'],
-              [],
-              ''),
-          new _TestOptionSpecification(
-              'safari',
-              'Path to safari browser executable',
-              ['--safari'],
-              [],
-              ''),
-          new _TestOptionSpecification(
-              'use_sdk',
-              '''Use compiler or runtime from the SDK.
+          ['-r', '--runtime'],
+          [
+            'vm',
+            'dart_precompiled',
+            'dart_product',
+            'd8',
+            'jsshell',
+            'drt',
+            'dartium',
+            'ff',
+            'firefox',
+            'chrome',
+            'safari',
+            'ie9',
+            'ie10',
+            'ie11',
+            'opera',
+            'chromeOnAndroid',
+            'safarimobilesim',
+            'ContentShellOnAndroid',
+            'DartiumOnAndroid',
+            'none'
+          ],
+          'vm'),
+      new _TestOptionSpecification(
+          'arch',
+          'The architecture to run tests for',
+          ['-a', '--arch'],
+          [
+            'all',
+            'ia32',
+            'x64',
+            'arm',
+            'armv6',
+            'armv5te',
+            'arm64',
+            'mips',
+            'simarm',
+            'simarmv6',
+            'simarmv5te',
+            'simarm64',
+            'simmips'
+          ],
+          'x64'),
+      new _TestOptionSpecification(
+          'system',
+          'The operating system to run tests on',
+          ['-s', '--system'],
+          ['linux', 'macos', 'windows'],
+          Platform.operatingSystem),
+      new _TestOptionSpecification(
+          'checked', 'Run tests in checked mode', ['--checked'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification('host_checked',
+          'Run compiler in checked mode', ['--host-checked'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification('minified',
+          'Enable minification in the compiler', ['--minified'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'csp',
+          'Run tests under Content Security Policy restrictions',
+          ['--csp'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'cps_ir',
+          'Run the compiler with the cps based backend',
+          ['--cps-ir'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'noopt', 'Run an in-place precompilation', ['--noopt'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'timeout', 'Timeout in seconds', ['-t', '--timeout'], [], -1,
+          type: 'int'),
+      new _TestOptionSpecification(
+          'progress',
+          'Progress indication mode',
+          ['-p', '--progress'],
+          [
+            'compact',
+            'color',
+            'line',
+            'verbose',
+            'silent',
+            'status',
+            'buildbot',
+            'diff'
+          ],
+          'compact'),
+      new _TestOptionSpecification('failure-summary',
+          'Print failure summary at the end', ['--failure-summary'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification('step_name',
+          'Step name for use by -pbuildbot', ['--step_name'], [], null),
+      new _TestOptionSpecification(
+          'report',
+          'Print a summary report of the number of tests, by expectation',
+          ['--report'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'tasks',
+          'The number of parallel tasks to run',
+          ['-j', '--tasks'],
+          [],
+          Platform.numberOfProcessors,
+          type: 'int'),
+      new _TestOptionSpecification(
+          'shards',
+          'The number of instances that the tests will be sharded over',
+          ['--shards'],
+          [],
+          1,
+          type: 'int'),
+      new _TestOptionSpecification(
+          'shard',
+          'The index of this instance when running in sharded mode',
+          ['--shard'],
+          [],
+          1,
+          type: 'int'),
+      new _TestOptionSpecification(
+          'help', 'Print list of options', ['-h', '--help'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'verbose', 'Verbose output', ['-v', '--verbose'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'list', 'List tests only, do not run them', ['--list'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'report_in_json',
+          'When doing list, output result summary in json only.',
+          ['--report-in-json'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification('time',
+          'Print timing information after running tests', ['--time'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'dart', 'Path to dart executable', ['--dart'], [], ''),
+      new _TestOptionSpecification(
+          'drt', // TODO(antonm): fix the option name.
+          'Path to content shell executable',
+          ['--drt'],
+          [],
+          ''),
+      new _TestOptionSpecification('dartium',
+          'Path to Dartium Chrome executable', ['--dartium'], [], ''),
+      new _TestOptionSpecification('firefox',
+          'Path to firefox browser executable', ['--firefox'], [], ''),
+      new _TestOptionSpecification(
+          'chrome', 'Path to chrome browser executable', ['--chrome'], [], ''),
+      new _TestOptionSpecification(
+          'safari', 'Path to safari browser executable', ['--safari'], [], ''),
+      new _TestOptionSpecification(
+          'use_sdk',
+          '''Use compiler or runtime from the SDK.
 
 Normally, the compiler or runtimes in PRODUCT_DIR is tested, with this
 option, the compiler or runtime in PRODUCT_DIR/dart-sdk/bin is tested.
 
 Note: currently only implemented for dart2js.''',
-              ['--use-sdk'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'use_public_packages',
-              'For tests using packages: Use pub.dartlang.org packages '
-              'instead the ones in the repository.',
-              ['--use-public-packages'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'use_repository_packages',
-              'For tests using packages: Use pub.dartlang.org packages '
-              'but use overrides for the packages available in the '
-              'repository.',
-              ['--use-repository-packages'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'build_directory',
-              'The name of the build directory, where products are placed.',
-              ['--build-directory'],
-              [],
-              ''),
-          new _TestOptionSpecification(
-              'noBatch',
-              'Do not run tests in batch mode',
-              ['-n', '--nobatch'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'dart2js_batch',
-              'Run dart2js tests in batch mode',
-              ['--dart2js-batch'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'append_logs',
-              'Do not delete old logs but rather append to them.',
-              ['--append_logs'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'write_debug_log',
-              'Don\'t write debug messages to stdout but rather to a logfile.',
-              ['--write-debug-log'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'write_test_outcome_log',
-              'Write the outcome of all tests executed to a '
-              '"${TestUtils.flakyFileName()}" file.',
-              ['--write-test-outcome-log'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'clear_browser_cache',
-              'Browser specific clearing of caches(i.e., delete it).',
-              ['--clear_browser_cache'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'copy_coredumps',
-              'If we see a crash that we did not expect, copy the core dumps. '
-              'to /tmp',
-              ['--copy-coredumps'],
-              [],
-              false,
-              type: 'bool'),
-          new _TestOptionSpecification(
-              'local_ip',
-              'IP address the http servers should listen on.'
-              'This address is also used for browsers to connect.',
-              ['--local_ip'],
-              [],
-              '127.0.0.1'),
-          new _TestOptionSpecification(
-              'test_server_port',
-              'Port for test http server.',
-              ['--test_server_port'],
-              [],
-              0,
-              type: 'int'),
-          new _TestOptionSpecification(
-              'test_server_cross_origin_port',
-              'Port for test http server cross origin.',
-              ['--test_server_cross_origin_port'],
-              [],
-              0,
-              type: 'int'),
-          new _TestOptionSpecification(
-              'test_driver_port',
-              'Port for http test driver server.',
-              ['--test_driver_port'],
-              [],
-              0,
-              type: 'int'),
-          new _TestOptionSpecification(
-              'test_driver_error_port',
-              'Port for http test driver server errors.',
-              ['--test_driver_error_port'],
-              [],
-              0,
-              type: 'int'),
-          new _TestOptionSpecification(
-              'record_to_file',
-              'Records all the commands that need to be executed and writes it '
-              'out to a file.',
-              ['--record_to_file'],
-              [],
-              null),
-          new _TestOptionSpecification(
-              'replay_from_file',
-              'Records all the commands that need to be executed and writes it '
-              'out to a file.',
-              ['--replay_from_file'],
-              [],
-              null),
-          new _TestOptionSpecification(
-              'builder_tag',
-              'Machine specific options that is not captured by the regular '
-              'test options. Used to be able to make sane updates to the '
-              'status files.',
-              ['--builder-tag'],
-              [],
-              ''),
-          new _TestOptionSpecification(
-              'vm_options',
-              'Extra options to send to the vm when running',
-              ['--vm-options'],
-              [],
-              null),
-          new _TestOptionSpecification(
-              'dart2js_options',
-              'Extra options for dart2js compilation step',
-              ['--dart2js-options'],
-              [],
-              null),
-          new _TestOptionSpecification(
-              'suite_dir',
-              'Additional directory to add to the testing matrix',
-              ['--suite-dir'],
-              [],
-              null),
-          new _TestOptionSpecification(
-              'package_root',
-              'The package root to use for testing.',
-              ['--package-root'],
-              [],
-              null),
-          new _TestOptionSpecification(
-              'exclude_suite',
-              'Exclude suites from default selector, only works when no'
-              ' selector has been specified on the command line',
-              ['--exclude-suite'],
-              defaultTestSelectors,
-              null),];
+          ['--use-sdk'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'use_public_packages',
+          'For tests using packages: Use pub.dartlang.org packages '
+          'instead the ones in the repository.',
+          ['--use-public-packages'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'use_repository_packages',
+          'For tests using packages: Use pub.dartlang.org packages '
+          'but use overrides for the packages available in the '
+          'repository.',
+          ['--use-repository-packages'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'build_directory',
+          'The name of the build directory, where products are placed.',
+          ['--build-directory'],
+          [],
+          ''),
+      new _TestOptionSpecification('noBatch', 'Do not run tests in batch mode',
+          ['-n', '--nobatch'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification('dart2js_batch',
+          'Run dart2js tests in batch mode', ['--dart2js-batch'], [], false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'append_logs',
+          'Do not delete old logs but rather append to them.',
+          ['--append_logs'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'write_debug_log',
+          'Don\'t write debug messages to stdout but rather to a logfile.',
+          ['--write-debug-log'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'write_test_outcome_log',
+          'Write the outcome of all tests executed to a '
+          '"${TestUtils.flakyFileName()}" file.',
+          ['--write-test-outcome-log'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'clear_browser_cache',
+          'Browser specific clearing of caches(i.e., delete it).',
+          ['--clear_browser_cache'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'copy_coredumps',
+          'If we see a crash that we did not expect, copy the core dumps. '
+          'to /tmp',
+          ['--copy-coredumps'],
+          [],
+          false,
+          type: 'bool'),
+      new _TestOptionSpecification(
+          'local_ip',
+          'IP address the http servers should listen on.'
+          'This address is also used for browsers to connect.',
+          ['--local_ip'],
+          [],
+          '127.0.0.1'),
+      new _TestOptionSpecification('test_server_port',
+          'Port for test http server.', ['--test_server_port'], [], 0,
+          type: 'int'),
+      new _TestOptionSpecification(
+          'test_server_cross_origin_port',
+          'Port for test http server cross origin.',
+          ['--test_server_cross_origin_port'],
+          [],
+          0,
+          type: 'int'),
+      new _TestOptionSpecification('test_driver_port',
+          'Port for http test driver server.', ['--test_driver_port'], [], 0,
+          type: 'int'),
+      new _TestOptionSpecification(
+          'test_driver_error_port',
+          'Port for http test driver server errors.',
+          ['--test_driver_error_port'],
+          [],
+          0,
+          type: 'int'),
+      new _TestOptionSpecification(
+          'record_to_file',
+          'Records all the commands that need to be executed and writes it '
+          'out to a file.',
+          ['--record_to_file'],
+          [],
+          null),
+      new _TestOptionSpecification(
+          'replay_from_file',
+          'Records all the commands that need to be executed and writes it '
+          'out to a file.',
+          ['--replay_from_file'],
+          [],
+          null),
+      new _TestOptionSpecification(
+          'builder_tag',
+          'Machine specific options that is not captured by the regular '
+          'test options. Used to be able to make sane updates to the '
+          'status files.',
+          ['--builder-tag'],
+          [],
+          ''),
+      new _TestOptionSpecification(
+          'vm_options',
+          'Extra options to send to the vm when running',
+          ['--vm-options'],
+          [],
+          null),
+      new _TestOptionSpecification(
+          'dart2js_options',
+          'Extra options for dart2js compilation step',
+          ['--dart2js-options'],
+          [],
+          null),
+      new _TestOptionSpecification(
+          'suite_dir',
+          'Additional directory to add to the testing matrix',
+          ['--suite-dir'],
+          [],
+          null),
+      new _TestOptionSpecification('package_root',
+          'The package root to use for testing.', ['--package-root'], [], null),
+      new _TestOptionSpecification(
+          'exclude_suite',
+          'Exclude suites from default selector, only works when no'
+          ' selector has been specified on the command line',
+          ['--exclude-suite'],
+          defaultTestSelectors,
+          null),
+    ];
   }
 
-
   /**
    * Parse a list of strings as test options.
    *
@@ -541,7 +498,6 @@
         continue;
       }
 
-
       // Multiple uses of a flag are an error, because there is no
       // naturally correct way to handle conflicting options.
       if (configuration.containsKey(spec.name)) {
@@ -586,18 +542,33 @@
     List<Map> expandedConfigs = _expandConfigurations(configuration);
     List<Map> result = expandedConfigs.where(_isValidConfig).toList();
     for (var config in result) {
-     config['_reproducing_arguments_'] =
-         _constructReproducingCommandArguments(config);
+      config['_reproducing_arguments_'] =
+          _constructReproducingCommandArguments(config);
     }
     return result.isEmpty ? null : result;
   }
 
   // For printing out reproducing command lines, we don't want to add these
   // options.
-  Set<String>  _blacklistedOptions = new Set<String>.from([
-    'progress', 'failure-summary', 'step_name', 'report', 'tasks', 'verbose',
-    'time', 'dart', 'drt', 'dartium', 'firefox', 'chrome', 'safari',
-    'build_directory', 'append_logs', 'local_ip', 'shard', 'shards',
+  Set<String> _blacklistedOptions = new Set<String>.from([
+    'progress',
+    'failure-summary',
+    'step_name',
+    'report',
+    'tasks',
+    'verbose',
+    'time',
+    'dart',
+    'drt',
+    'dartium',
+    'firefox',
+    'chrome',
+    'safari',
+    'build_directory',
+    'append_logs',
+    'local_ip',
+    'shard',
+    'shards',
   ]);
 
   List<String> _constructReproducingCommandArguments(Map config) {
@@ -648,9 +619,22 @@
         // runs test.py -c dart2js -r drt,none the dart2js_none and
         // dart2js_drt will be duplicating work. If later we don't need 'none'
         // with dart2js, we should remove it from here.
-        validRuntimes = const ['d8', 'jsshell', 'drt', 'none', 'dartium',
-                               'ff', 'chrome', 'safari', 'ie9', 'ie10', 'ie11',
-                               'opera', 'chromeOnAndroid', 'safarimobilesim'];
+        validRuntimes = const [
+          'd8',
+          'jsshell',
+          'drt',
+          'none',
+          'dartium',
+          'ff',
+          'chrome',
+          'safari',
+          'ie9',
+          'ie10',
+          'ie11',
+          'opera',
+          'chromeOnAndroid',
+          'safarimobilesim'
+        ];
         break;
       case 'dart2analyzer':
         validRuntimes = const ['none'];
@@ -662,8 +646,13 @@
         validRuntimes = const ['dart_precompiled'];
         break;
       case 'none':
-        validRuntimes = const ['vm', 'drt', 'dartium',
-                               'ContentShellOnAndroid', 'DartiumOnAndroid'];
+        validRuntimes = const [
+          'vm',
+          'drt',
+          'dartium',
+          'ContentShellOnAndroid',
+          'DartiumOnAndroid'
+        ];
         break;
     }
     if (!validRuntimes.contains(config['runtime'])) {
@@ -680,13 +669,13 @@
     if (config['shard'] < 1 || config['shard'] > config['shards']) {
       isValid = false;
       print("Error: shard index is ${config['shard']} out of "
-            "${config['shards']} shards");
+          "${config['shards']} shards");
     }
 
     if (config['use_repository_packages'] && config['use_public_packages']) {
       isValid = false;
       print("Cannot have both --use-repository-packages and "
-            "--use-public-packages");
+          "--use-public-packages");
     }
 
     return isValid;
@@ -743,7 +732,7 @@
     // in that test suite. If no selectors are explicitly given use
     // the default suite patterns.
     var selectors = configuration['selectors'];
-    if (selectors is !Map) {
+    if (selectors is! Map) {
       if (selectors == null) {
         if (configuration['suite_dir'] != null) {
           var suite_path = new Path(configuration['suite_dir']);
@@ -752,8 +741,9 @@
           selectors = new List.from(defaultTestSelectors);
         }
 
-        var exclude_suites = configuration['exclude_suite'] != null ?
-              configuration['exclude_suite'].split(',') : [];
+        var exclude_suites = configuration['exclude_suite'] != null
+            ? configuration['exclude_suite'].split(',')
+            : [];
         for (var exclude in exclude_suites) {
           if (selectors.contains(exclude)) {
             selectors.remove(exclude);
@@ -777,7 +767,7 @@
         }
         if (selectorMap.containsKey(suite)) {
           print("Error: '$suite/$pattern'.  Only one test selection"
-                " pattern is allowed to start with '$suite/'");
+              " pattern is allowed to start with '$suite/'");
           exit(1);
         }
         selectorMap[suite] = new RegExp(pattern);
@@ -816,8 +806,8 @@
     if (configuration['timeout'] == -1) {
       int compilerMulitiplier =
           new CompilerConfiguration(configuration).computeTimeoutMultiplier();
-      int runtimeMultiplier =
-          new RuntimeConfiguration(configuration).computeTimeoutMultiplier(
+      int runtimeMultiplier = new RuntimeConfiguration(configuration)
+          .computeTimeoutMultiplier(
               mode: configuration['mode'],
               isChecked: configuration['checked'],
               arch: configuration['arch']);
@@ -847,7 +837,6 @@
     return result;
   }
 
-
   /**
    * Print out usage information.
    */
@@ -864,7 +853,8 @@
       print('${option.name}: ${option.description}.');
       for (var name in option.keys) {
         assert(name.startsWith('-'));
-        var buffer = new StringBuffer();;
+        var buffer = new StringBuffer();
+        ;
         buffer.write(name);
         if (option.type == 'bool') {
           assert(option.values.isEmpty);
@@ -891,7 +881,6 @@
     }
   }
 
-
   /**
    * Find the test option specification for a given option key.
    */
@@ -905,6 +894,5 @@
     exit(1);
   }
 
-
   List<_TestOptionSpecification> _options;
 }
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 0fbb767..3fdfbf3 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -61,19 +61,19 @@
   }
 }
 
-
 List<String> _buildFailureOutput(TestCase test,
-                                 [Formatter formatter = const Formatter()]) {
-
+    [Formatter formatter = const Formatter()]) {
   List<String> getLinesWithoutCarriageReturn(List<int> output) {
-    return decodeUtf8(output).replaceAll('\r\n', '\n')
-        .replaceAll('\r', '\n').split('\n');
+    return decodeUtf8(output)
+        .replaceAll('\r\n', '\n')
+        .replaceAll('\r', '\n')
+        .split('\n');
   }
 
   List<String> output = new List<String>();
   output.add('');
   output.add(formatter.failed('FAILED: ${test.configurationString}'
-                              ' ${test.displayName}'));
+      ' ${test.displayName}'));
   StringBuffer expected = new StringBuffer();
   expected.write('Expected: ');
   for (var expectation in test.expectedOutcomes) {
@@ -82,8 +82,8 @@
   output.add(expected.toString());
   output.add('Actual: ${test.result}');
   if (!test.lastCommandOutput.hasTimedOut) {
-    if (test.commandOutputs.length != test.commands.length
-        && !test.expectCompileError) {
+    if (test.commandOutputs.length != test.commands.length &&
+        !test.expectCompileError) {
       output.add('Unexpected compile-time error.');
     } else {
       if (test.expectCompileError) {
@@ -123,8 +123,7 @@
   }
   if (test is BrowserTestCase) {
     // Additional command for rerunning the steps locally after the fact.
-    var command =
-      test.configuration["_servers_"].httpServerCommandline();
+    var command = test.configuration["_servers_"].httpServerCommandline();
     output.add('');
     output.add('To retest, run:  $command');
   }
@@ -152,20 +151,19 @@
 }
 
 String _buildSummaryEnd(int failedTests) {
-    if (failedTests == 0) {
-      return '\n===\n=== All tests succeeded\n===\n';
-    } else {
-      var pluralSuffix = failedTests != 1 ? 's' : '';
-      return '\n===\n=== ${failedTests} test$pluralSuffix failed\n===\n';
-    }
+  if (failedTests == 0) {
+    return '\n===\n=== All tests succeeded\n===\n';
+  } else {
+    var pluralSuffix = failedTests != 1 ? 's' : '';
+    return '\n===\n=== ${failedTests} test$pluralSuffix failed\n===\n';
+  }
 }
 
-
 class EventListener {
-  void testAdded() { }
-  void done(TestCase test) { }
-  void allTestsKnown() { }
-  void allDone() { }
+  void testAdded() {}
+  void done(TestCase test) {}
+  void allTestsKnown() {}
+  void allDone() {}
 }
 
 class ExitCodeSetter extends EventListener {
@@ -226,10 +224,22 @@
    *  },
    */
 
-  static final INTERESTED_CONFIGURATION_PARAMETERS =
-      ['mode', 'arch', 'compiler', 'runtime', 'checked', 'host_checked',
-       'minified', 'csp', 'system', 'vm_options', 'use_sdk',
-       'use_repository_packages', 'use_public_packages', 'builder_tag'];
+  static final INTERESTED_CONFIGURATION_PARAMETERS = [
+    'mode',
+    'arch',
+    'compiler',
+    'runtime',
+    'checked',
+    'host_checked',
+    'minified',
+    'csp',
+    'system',
+    'vm_options',
+    'use_sdk',
+    'use_repository_packages',
+    'use_public_packages',
+    'builder_tag'
+  ];
 
   IOSink _sink;
 
@@ -248,22 +258,20 @@
     for (var command in test.commands) {
       var output = test.commandOutputs[command];
       if (output != null) {
-        double duration = output.time.inMicroseconds/1000.0;
+        double duration = output.time.inMicroseconds / 1000.0;
         totalDuration += duration;
-        commandResults.add({
-          'name': command.displayName,
-          'duration': duration,
-        });
+        commandResults
+            .add({'name': command.displayName, 'duration': duration,});
       }
     }
     _writeTestOutcomeRecord({
-      'name' : name,
-      'configuration' : configuration,
-      'test_result' : {
-        'outcome' : outcome,
-        'expected_outcomes' : expectations,
-        'duration' : totalDuration,
-        'command_results' : commandResults,
+      'name': name,
+      'configuration': configuration,
+      'test_result': {
+        'outcome': outcome,
+        'expected_outcomes': expectations,
+        'duration': totalDuration,
+        'command_results': commandResults,
       },
     });
   }
@@ -281,7 +289,6 @@
   }
 }
 
-
 class UnexpectedCrashDumpArchiver extends EventListener {
   void done(TestCase test) {
     if (test.unexpectedOutput && test.result == Expectation.CRASH) {
@@ -294,19 +301,20 @@
         var binBaseName = new Path(binName).filename;
         if (binFile.existsSync()) {
           var tmpPath = new Path(Directory.systemTemp.path);
-          var dir = new Path(TestUtils.mkdirRecursive(tmpPath,
-              new Path('coredump_${test.lastCommandOutput.pid}')).path);
+          var dir = new Path(TestUtils
+              .mkdirRecursive(
+                  tmpPath, new Path('coredump_${test.lastCommandOutput.pid}'))
+              .path);
           TestUtils.copyFile(new Path(name), dir.append(name));
           TestUtils.copyFile(new Path(binName), dir.append(binBaseName));
           print("\nCopied core dump and binary for unexpected crash to: "
-                "$dir");
+              "$dir");
         }
       }
     }
   }
 }
 
-
 class SummaryPrinter extends EventListener {
   final bool jsonOnly;
 
@@ -323,7 +331,6 @@
   }
 }
 
-
 class TimingPrinter extends EventListener {
   final _command2testCases = new Map<Command, List<TestCase>>();
   final _commandOutputs = new Set<CommandOutput>();
@@ -357,8 +364,8 @@
       }).join(', ');
 
       print('${commandOutput.time} - '
-            '${command.displayName} - '
-            '$testCasesDescription');
+          '${command.displayName} - '
+          '$testCasesDescription');
     }
   }
 }
@@ -377,7 +384,6 @@
     _printFailureSummary();
   }
 
-
   void _printFailureOutput(TestCase test) {
     String status = '${test.displayName}: ${test.result}';
     List<String> configs =
@@ -405,12 +411,11 @@
             runtimeToConfiguration.putIfAbsent(runtime, () => <String>[]);
         runtimeConfigs.add(config);
       }
-      runtimeToConfiguration.forEach((String runtime,
-                                      List<String> runtimeConfigs) {
+      runtimeToConfiguration
+          .forEach((String runtime, List<String> runtimeConfigs) {
         runtimeConfigs.sort((a, b) => a.compareTo(b));
-        List<String> statuses =
-            groupedStatuses.putIfAbsent('$runtime: $runtimeConfigs',
-                                        () => <String>[]);
+        List<String> statuses = groupedStatuses.putIfAbsent(
+            '$runtime: $runtimeConfigs', () => <String>[]);
         statuses.add(status);
       });
     });
@@ -432,15 +437,14 @@
 
   void done(TestCase test) {
     for (var commandOutput in test.commandOutputs.values) {
-      if (commandOutput.compilationSkipped)
-        _skippedCompilations++;
+      if (commandOutput.compilationSkipped) _skippedCompilations++;
     }
   }
 
   void allDone() {
     if (_skippedCompilations > 0) {
       print('\n$_skippedCompilations compilations were skipped because '
-            'the previous output was already up to date\n');
+          'the previous output was already up to date\n');
     }
   }
 }
@@ -460,24 +464,23 @@
 
   static Stream<Directory> getLeftOverTemporaryDirectories() {
     var regExp = _getTemporaryDirectoryRegexp();
-    return Directory.systemTemp.list().where(
-        (FileSystemEntity fse) {
-          if (fse is Directory) {
-            if (regExp.hasMatch(new Path(fse.path).filename)) {
-              return true;
-            }
-          }
-          return false;
-        });
+    return Directory.systemTemp.list().where((FileSystemEntity fse) {
+      if (fse is Directory) {
+        if (regExp.hasMatch(new Path(fse.path).filename)) {
+          return true;
+        }
+      }
+      return false;
+    });
   }
 
   void allDone() {
     getLeftOverTemporaryDirectories().length.then((int count) {
       if (count > MIN_NUMBER_OF_TEMP_DIRS) {
         DebugLogger.warning("There are ${count} directories "
-                            "in the system tempdir "
-                            "('${Directory.systemTemp.path}')! "
-                            "Maybe left over directories?\n");
+            "in the system tempdir "
+            "('${Directory.systemTemp.path}')! "
+            "Maybe left over directories?\n");
       }
     }).catchError((error) {
       DebugLogger.warning("Could not list temp directories, got: $error");
@@ -495,15 +498,13 @@
   }
 }
 
-
 class TestFailurePrinter extends EventListener {
   bool _printSummary;
   var _formatter;
   var _failureSummary = <String>[];
-  var _failedTests= 0;
+  var _failedTests = 0;
 
-  TestFailurePrinter(this._printSummary,
-                     [this._formatter = const Formatter()]);
+  TestFailurePrinter(this._printSummary, [this._formatter = const Formatter()]);
 
   void done(TestCase test) {
     if (test.unexpectedOutput) {
@@ -538,8 +539,9 @@
 class ProgressIndicator extends EventListener {
   ProgressIndicator(this._startTime);
 
-
-  void testAdded() { _foundTests++; }
+  void testAdded() {
+    _foundTests++;
+  }
 
   void done(TestCase test) {
     if (test.unexpectedOutput) {
@@ -566,8 +568,7 @@
 }
 
 abstract class CompactIndicator extends ProgressIndicator {
-  CompactIndicator(DateTime startTime)
-      : super(startTime);
+  CompactIndicator(DateTime startTime) : super(startTime);
 
   void allDone() {
     if (_failedTests > 0) {
@@ -582,7 +583,6 @@
   void _printProgress();
 }
 
-
 class CompactProgressIndicator extends CompactIndicator {
   Formatter _formatter;
 
@@ -595,18 +595,15 @@
     var passedPadded = _pad(_passedTests.toString(), 5);
     var failedPadded = _pad(_failedTests.toString(), 5);
     Duration d = (new DateTime.now()).difference(_startTime);
-    var progressLine =
-        '\r[${_timeString(d)} | $progressPadded% | '
+    var progressLine = '\r[${_timeString(d)} | $progressPadded% | '
         '+${_formatter.passed(passedPadded)} | '
         '-${_formatter.failed(failedPadded)}]';
     stdout.write(progressLine);
   }
 }
 
-
 class VerboseProgressIndicator extends ProgressIndicator {
-  VerboseProgressIndicator(DateTime startTime)
-      : super(startTime);
+  VerboseProgressIndicator(DateTime startTime) : super(startTime);
 
   void _printDoneProgress(TestCase test) {
     var status = 'pass';
@@ -617,7 +614,6 @@
   }
 }
 
-
 class BuildbotProgressIndicator extends ProgressIndicator {
   static String stepName;
   var _failureSummary = <String>[];
@@ -657,10 +653,8 @@
   }
 }
 
-
-EventListener progressIndicatorFromName(String name,
-                                        DateTime startTime,
-                                        Formatter formatter) {
+EventListener progressIndicatorFromName(
+    String name, DateTime startTime, Formatter formatter) {
   switch (name) {
     case 'compact':
       return new CompactProgressIndicator(startTime, formatter);
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index a4abf47..0d64136 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -39,10 +39,14 @@
 
 // Some IO tests use these variables and get confused if the host environment
 // variables are inherited so they are excluded.
-const List<String> EXCLUDED_ENVIRONMENT_VARIABLES =
-    const ['http_proxy', 'https_proxy', 'no_proxy',
-           'HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY'];
-
+const List<String> EXCLUDED_ENVIRONMENT_VARIABLES = const [
+  'http_proxy',
+  'https_proxy',
+  'no_proxy',
+  'HTTP_PROXY',
+  'HTTPS_PROXY',
+  'NO_PROXY'
+];
 
 /** A command executed as a step in a test case. */
 class Command {
@@ -70,7 +74,8 @@
     return _cachedHashCode;
   }
 
-  operator ==(other) => identical(this, other) ||
+  operator ==(other) =>
+      identical(this, other) ||
       (runtimeType == other.runtimeType && _equal(other));
 
   void _buildHashCode(HashCodeBuilder builder) {
@@ -78,8 +83,7 @@
   }
 
   bool _equal(Command other) =>
-      hashCode == other.hashCode &&
-      displayName == other.displayName;
+      hashCode == other.hashCode && displayName == other.displayName;
 
   String toString() => reproductionCommand;
 
@@ -99,10 +103,8 @@
   /** Working directory for the command */
   final String workingDirectory;
 
-  ProcessCommand._(String displayName, this.executable,
-                   this.arguments,
-                   [this.environmentOverrides = null,
-                    this.workingDirectory = null])
+  ProcessCommand._(String displayName, this.executable, this.arguments,
+      [this.environmentOverrides = null, this.workingDirectory = null])
       : super._(displayName) {
     if (io.Platform.operatingSystem == 'windows') {
       // Windows can't handle the first command if it is a .bat file or the like
@@ -130,11 +132,12 @@
   String get reproductionCommand {
     var env = new StringBuffer();
     environmentOverrides.forEach((key, value) =>
-        (io.Platform.operatingSystem == 'windows') ?
-            env.write('set $key=${escapeCommandLineArgument(value)} & ') :
-            env.write('$key=${escapeCommandLineArgument(value)} '));
+        (io.Platform.operatingSystem == 'windows')
+            ? env.write('set $key=${escapeCommandLineArgument(value)} & ')
+            : env.write('$key=${escapeCommandLineArgument(value)} '));
     var command = ([executable]..addAll(arguments))
-        .map(escapeCommandLineArgument).join(' ');
+        .map(escapeCommandLineArgument)
+        .join(' ');
     if (workingDirectory != null) {
       command = "$command (working directory: $workingDirectory)";
     }
@@ -149,13 +152,14 @@
   final bool _neverSkipCompilation;
   final List<Uri> _bootstrapDependencies;
 
-  CompilationCommand._(String displayName,
-                       this._outputFile,
-                       this._neverSkipCompilation,
-                       this._bootstrapDependencies,
-                       String executable,
-                       List<String> arguments,
-                       Map<String, String> environmentOverrides)
+  CompilationCommand._(
+      String displayName,
+      this._outputFile,
+      this._neverSkipCompilation,
+      this._bootstrapDependencies,
+      String executable,
+      List<String> arguments,
+      Map<String, String> environmentOverrides)
       : super._(displayName, executable, arguments, environmentOverrides);
 
   Future<bool> get outputIsUpToDate {
@@ -181,8 +185,8 @@
     return readDepsFile("$_outputFile.deps").then((dependencies) {
       if (dependencies != null) {
         dependencies.addAll(_bootstrapDependencies);
-        var jsOutputLastModified = TestUtils.lastModifiedCache.getLastModified(
-            new Uri(scheme: 'file', path: _outputFile));
+        var jsOutputLastModified = TestUtils.lastModifiedCache
+            .getLastModified(new Uri(scheme: 'file', path: _outputFile));
         if (jsOutputLastModified != null) {
           for (var dependency in dependencies) {
             var dependencyLastModified =
@@ -220,37 +224,36 @@
   AddFlagsKey(this.flags, this.env);
   // Just use object identity for environment map
   bool operator ==(other) =>
-    other is AddFlagsKey && flags == other.flags && env == other.env;
+      other is AddFlagsKey && flags == other.flags && env == other.env;
   int get hashCode => flags.hashCode ^ env.hashCode;
 }
 
 class ContentShellCommand extends ProcessCommand {
-  ContentShellCommand._(String executable,
-                        String htmlFile,
-                        List<String> options,
-                        List<String> dartFlags,
-                        Map<String, String> environmentOverrides)
-      : super._("content_shell",
-               executable,
-               _getArguments(options, htmlFile),
-               _getEnvironment(environmentOverrides, dartFlags));
+  ContentShellCommand._(
+      String executable,
+      String htmlFile,
+      List<String> options,
+      List<String> dartFlags,
+      Map<String, String> environmentOverrides)
+      : super._("content_shell", executable, _getArguments(options, htmlFile),
+            _getEnvironment(environmentOverrides, dartFlags));
 
   // Cache the modified environments in a map from the old environment and
   // the string of Dart flags to the new environment.  Avoid creating new
   // environment object for each command object.
-  static Map<AddFlagsKey, Map> environments =
-      new Map<AddFlagsKey, Map>();
+  static Map<AddFlagsKey, Map> environments = new Map<AddFlagsKey, Map>();
 
   static Map _getEnvironment(Map env, List<String> dartFlags) {
     var needDartFlags = dartFlags != null && dartFlags.length > 0;
     if (needDartFlags) {
       if (env == null) {
-        env = const { };
+        env = const {};
       }
       var flags = dartFlags.join(' ');
-      return environments.putIfAbsent(new AddFlagsKey(flags, env),
+      return environments.putIfAbsent(
+          new AddFlagsKey(flags, env),
           () => new Map.from(env)
-              ..addAll({'DART_FLAGS': flags, 'DART_FORWARDING_PRINT': '1'}));
+            ..addAll({'DART_FLAGS': flags, 'DART_FORWARDING_PRINT': '1'}));
     }
     return env;
   }
@@ -270,11 +273,10 @@
   final Map configuration;
   final bool retry;
 
-  BrowserTestCommand._(String _browser,
-                       this.url,
-                       this.configuration,
-                       this.retry)
-      : super._(_browser), browser = _browser;
+  BrowserTestCommand._(
+      String _browser, this.url, this.configuration, this.retry)
+      : super._(_browser),
+        browser = _browser;
 
   void _buildHashCode(HashCodeBuilder builder) {
     super._buildHashCode(builder);
@@ -292,10 +294,12 @@
       retry == other.retry;
 
   String get reproductionCommand {
-    var parts = [io.Platform.resolvedExecutable,
-                'tools/testing/dart/launch_browser.dart',
-                browser,
-                url];
+    var parts = [
+      io.Platform.resolvedExecutable,
+      'tools/testing/dart/launch_browser.dart',
+      browser,
+      url
+    ];
     return parts.map(escapeCommandLineArgument).join(' ');
   }
 
@@ -304,11 +308,8 @@
 
 class BrowserHtmlTestCommand extends BrowserTestCommand {
   List<String> expectedMessages;
-  BrowserHtmlTestCommand._(String browser,
-                           String url,
-                           Map configuration,
-                           this.expectedMessages,
-                           bool retry)
+  BrowserHtmlTestCommand._(String browser, String url, Map configuration,
+      this.expectedMessages, bool retry)
       : super._(browser, url, configuration, retry);
 
   void _buildHashCode(HashCodeBuilder builder) {
@@ -324,11 +325,8 @@
 class AnalysisCommand extends ProcessCommand {
   final String flavor;
 
-  AnalysisCommand._(this.flavor,
-                    String displayName,
-                    String executable,
-                    List<String> arguments,
-                    Map<String, String> environmentOverrides)
+  AnalysisCommand._(this.flavor, String displayName, String executable,
+      List<String> arguments, Map<String, String> environmentOverrides)
       : super._(displayName, executable, arguments, environmentOverrides);
 
   void _buildHashCode(HashCodeBuilder builder) {
@@ -337,40 +335,34 @@
   }
 
   bool _equal(AnalysisCommand other) =>
-      super._equal(other) &&
-      flavor == other.flavor;
+      super._equal(other) && flavor == other.flavor;
 }
 
 class VmCommand extends ProcessCommand {
-  VmCommand._(String executable,
-              List<String> arguments,
-              Map<String,String> environmentOverrides)
+  VmCommand._(String executable, List<String> arguments,
+      Map<String, String> environmentOverrides)
       : super._("vm", executable, arguments, environmentOverrides);
 }
 
 class JSCommandlineCommand extends ProcessCommand {
-  JSCommandlineCommand._(String displayName,
-                         String executable,
-                         List<String> arguments,
-                         [Map<String, String> environmentOverrides = null])
-      : super._(displayName,
-                executable,
-                arguments,
-                environmentOverrides);
+  JSCommandlineCommand._(
+      String displayName, String executable, List<String> arguments,
+      [Map<String, String> environmentOverrides = null])
+      : super._(displayName, executable, arguments, environmentOverrides);
 }
 
 class PubCommand extends ProcessCommand {
   final String command;
 
-  PubCommand._(String pubCommand,
-               String pubExecutable,
-               String pubspecYamlDirectory,
-               String pubCacheDirectory)
-      : super._('pub_$pubCommand',
-                new io.File(pubExecutable).absolute.path,
-                [pubCommand],
-                {'PUB_CACHE' : pubCacheDirectory},
-                pubspecYamlDirectory), command = pubCommand;
+  PubCommand._(String pubCommand, String pubExecutable,
+      String pubspecYamlDirectory, String pubCacheDirectory)
+      : super._(
+            'pub_$pubCommand',
+            new io.File(pubExecutable).absolute.path,
+            [pubCommand],
+            {'PUB_CACHE': pubCacheDirectory},
+            pubspecYamlDirectory),
+        command = pubCommand;
 
   void _buildHashCode(HashCodeBuilder builder) {
     super._buildHashCode(builder);
@@ -378,8 +370,7 @@
   }
 
   bool _equal(PubCommand other) =>
-      super._equal(other) &&
-      command == other.command;
+      super._equal(other) && command == other.command;
 }
 
 /* [ScriptCommand]s are executed by dart code. */
@@ -394,7 +385,7 @@
   final String _destinationDirectory;
 
   CleanDirectoryCopyCommand._(this._sourceDirectory, this._destinationDirectory)
-    : super._('dir_copy');
+      : super._('dir_copy');
 
   String get reproductionCommand =>
       "Copying '$_sourceDirectory' to '$_destinationDirectory'.";
@@ -440,10 +431,9 @@
   String _destinationFile;
   Map<String, Map> _dependencyOverrides;
 
-  ModifyPubspecYamlCommand._(this._pubspecYamlFile,
-                             this._destinationFile,
-                             this._dependencyOverrides)
-    : super._("modify_pubspec") {
+  ModifyPubspecYamlCommand._(
+      this._pubspecYamlFile, this._destinationFile, this._dependencyOverrides)
+      : super._("modify_pubspec") {
     assert(_pubspecYamlFile.endsWith("pubspec.yaml"));
     assert(_destinationFile.endsWith("pubspec.yaml"));
   }
@@ -455,9 +445,9 @@
   Future<ScriptCommandOutputImpl> run() {
     var watch = new Stopwatch()..start();
 
-    var pubspecLockFile =
-        _destinationFile.substring(0, _destinationFile.length - ".yaml".length)
-        + ".lock";
+    var pubspecLockFile = _destinationFile.substring(
+            0, _destinationFile.length - ".yaml".length) +
+        ".lock";
 
     var file = new io.File(_pubspecYamlFile);
     var destinationFile = new io.File(_destinationFile);
@@ -465,15 +455,14 @@
     return file.readAsString().then((String yamlString) {
       var dependencyOverrideSection = new StringBuffer();
       if (_dependencyOverrides.isNotEmpty) {
-        dependencyOverrideSection.write(
-            "\n"
+        dependencyOverrideSection.write("\n"
             "# This section was autogenerated by test.py!\n"
             "dependency_overrides:\n");
         _dependencyOverrides.forEach((String packageName, Map override) {
           dependencyOverrideSection.write("  $packageName:\n");
           override.forEach((overrideKey, overrideValue) {
-            dependencyOverrideSection.write(
-                "    $overrideKey: $overrideValue\n");
+            dependencyOverrideSection
+                .write("    $overrideKey: $overrideValue\n");
           });
         });
       }
@@ -529,9 +518,9 @@
       }
       var link = new io.Link(_link);
 
-      return link.exists()
-          .then((bool exists) { if (exists) return link.delete(); })
-          .then((_) => link.create(_target));
+      return link.exists().then((bool exists) {
+        if (exists) return link.delete();
+      }).then((_) => link.create(_target));
     }).then((_) {
       return new ScriptCommandOutputImpl(
           this, Expectation.PASS, "", watch.elapsed);
@@ -548,9 +537,7 @@
   }
 
   bool _equal(MakeSymlinkCommand other) =>
-      super._equal(other) &&
-      _link == other._link &&
-      _target == other._target;
+      super._equal(other) && _link == other._link && _target == other._target;
 }
 
 class CommandBuilder {
@@ -566,45 +553,46 @@
     _cleared = true;
   }
 
-  ContentShellCommand getContentShellCommand(String executable,
-                                             String htmlFile,
-                                             List<String> options,
-                                             List<String> dartFlags,
-                                             Map<String, String> environment) {
+  ContentShellCommand getContentShellCommand(
+      String executable,
+      String htmlFile,
+      List<String> options,
+      List<String> dartFlags,
+      Map<String, String> environment) {
     ContentShellCommand command = new ContentShellCommand._(
         executable, htmlFile, options, dartFlags, environment);
     return _getUniqueCommand(command);
   }
 
-  BrowserTestCommand getBrowserTestCommand(String browser,
-                                           String url,
-                                           Map configuration,
-                                           bool retry) {
+  BrowserTestCommand getBrowserTestCommand(
+      String browser, String url, Map configuration, bool retry) {
     var command = new BrowserTestCommand._(browser, url, configuration, retry);
     return _getUniqueCommand(command);
   }
 
-  BrowserHtmlTestCommand getBrowserHtmlTestCommand(String browser,
-                                               String url,
-                                               Map configuration,
-                                               List<String> expectedMessages,
-                                               bool retry) {
+  BrowserHtmlTestCommand getBrowserHtmlTestCommand(String browser, String url,
+      Map configuration, List<String> expectedMessages, bool retry) {
     var command = new BrowserHtmlTestCommand._(
         browser, url, configuration, expectedMessages, retry);
     return _getUniqueCommand(command);
   }
 
-  CompilationCommand getCompilationCommand(String displayName,
-                                           outputFile,
-                                           neverSkipCompilation,
-                                           List<Uri> bootstrapDependencies,
-                                           String executable,
-                                           List<String> arguments,
-                                           Map<String, String> environment) {
-    var command =
-        new CompilationCommand._(
-            displayName, outputFile, neverSkipCompilation,
-            bootstrapDependencies, executable, arguments, environment);
+  CompilationCommand getCompilationCommand(
+      String displayName,
+      outputFile,
+      neverSkipCompilation,
+      List<Uri> bootstrapDependencies,
+      String executable,
+      List<String> arguments,
+      Map<String, String> environment) {
+    var command = new CompilationCommand._(
+        displayName,
+        outputFile,
+        neverSkipCompilation,
+        bootstrapDependencies,
+        executable,
+        arguments,
+        environment);
     return _getUniqueCommand(command);
   }
 
@@ -616,41 +604,36 @@
     return _getUniqueCommand(command);
   }
 
-  VmCommand getVmCommand(String executable,
-                         List<String> arguments,
-                         Map<String, String> environmentOverrides) {
+  VmCommand getVmCommand(String executable, List<String> arguments,
+      Map<String, String> environmentOverrides) {
     var command = new VmCommand._(executable, arguments, environmentOverrides);
     return _getUniqueCommand(command);
   }
 
   Command getJSCommandlineCommand(String displayName, executable, arguments,
-                                  [environment = null]) {
-    var command = new JSCommandlineCommand._(displayName, executable, arguments,
-                                             environment);
+      [environment = null]) {
+    var command = new JSCommandlineCommand._(
+        displayName, executable, arguments, environment);
     return _getUniqueCommand(command);
   }
 
   Command getProcessCommand(String displayName, executable, arguments,
-                     [environment = null, workingDirectory = null]) {
-    var command = new ProcessCommand._(displayName, executable, arguments,
-                                       environment, workingDirectory);
+      [environment = null, workingDirectory = null]) {
+    var command = new ProcessCommand._(
+        displayName, executable, arguments, environment, workingDirectory);
     return _getUniqueCommand(command);
   }
 
   Command getCopyCommand(String sourceDirectory, String destinationDirectory) {
-    var command = new CleanDirectoryCopyCommand._(sourceDirectory,
-                                                  destinationDirectory);
+    var command =
+        new CleanDirectoryCopyCommand._(sourceDirectory, destinationDirectory);
     return _getUniqueCommand(command);
   }
 
-  Command getPubCommand(String pubCommand,
-                        String pubExecutable,
-                        String pubspecYamlDirectory,
-                        String pubCacheDirectory) {
-    var command = new PubCommand._(pubCommand,
-                                   pubExecutable,
-                                   pubspecYamlDirectory,
-                                   pubCacheDirectory);
+  Command getPubCommand(String pubCommand, String pubExecutable,
+      String pubspecYamlDirectory, String pubCacheDirectory) {
+    var command = new PubCommand._(
+        pubCommand, pubExecutable, pubspecYamlDirectory, pubCacheDirectory);
     return _getUniqueCommand(command);
   }
 
@@ -659,7 +642,7 @@
   }
 
   Command getModifyPubspecCommand(String pubspecYamlFile, Map depsOverrides,
-                                  {String destinationFile: null}) {
+      {String destinationFile: null}) {
     if (destinationFile == null) destinationFile = pubspecYamlFile;
     return _getUniqueCommand(new ModifyPubspecYamlCommand._(
         pubspecYamlFile, destinationFile, depsOverrides));
@@ -716,7 +699,8 @@
    * compiling multiple sources that are run in isolation.
    */
   List<Command> commands;
-  Map<Command, CommandOutput> commandOutputs = new Map<Command,CommandOutput>();
+  Map<Command, CommandOutput> commandOutputs =
+      new Map<Command, CommandOutput>();
 
   Map configuration;
   String displayName;
@@ -724,19 +708,16 @@
   int hash = 0;
   Set<Expectation> expectedOutcomes;
 
-  TestCase(this.displayName,
-           this.commands,
-           this.configuration,
-           this.expectedOutcomes,
-           {isNegative: false,
-            TestInformation info: null}) {
+  TestCase(this.displayName, this.commands, this.configuration,
+      this.expectedOutcomes,
+      {isNegative: false, TestInformation info: null}) {
     if (isNegative || displayName.contains("negative_test")) {
       _expectations |= IS_NEGATIVE;
     }
     if (info != null) {
       _setExpectations(info);
-      hash = info.originTestPath.relativeTo(TestUtils.dartDir)
-          .toString().hashCode;
+      hash =
+          info.originTestPath.relativeTo(TestUtils.dartDir).toString().hashCode;
     }
   }
 
@@ -777,8 +758,8 @@
   CommandOutput get lastCommandOutput {
     if (commandOutputs.length == 0) {
       throw new Exception("CommandOutputs is empty, maybe no command was run? ("
-                          "displayName: '$displayName', "
-                          "configurationString: '$configurationString')");
+          "displayName: '$displayName', "
+          "configurationString: '$configurationString')");
     }
     return commandOutputs[commands[commandOutputs.length - 1]];
   }
@@ -786,8 +767,8 @@
   Command get lastCommandExecuted {
     if (commandOutputs.length == 0) {
       throw new Exception("CommandOutputs is empty, maybe no command was run? ("
-                          "displayName: '$displayName', "
-                          "configurationString: '$configurationString')");
+          "displayName: '$displayName', "
+          "configurationString: '$configurationString')");
     }
     return commands[commandOutputs.length - 1];
   }
@@ -815,34 +796,34 @@
   }
 
   bool get isFlaky {
-      if (expectedOutcomes.contains(Expectation.SKIP) ||
-          expectedOutcomes.contains(Expectation.SKIP_BY_DESIGN)) {
-        return false;
-      }
+    if (expectedOutcomes.contains(Expectation.SKIP) ||
+        expectedOutcomes.contains(Expectation.SKIP_BY_DESIGN)) {
+      return false;
+    }
 
-      return expectedOutcomes
-        .where((expectation) => !expectation.isMetaExpectation).length > 1;
+    return expectedOutcomes
+            .where((expectation) => !expectation.isMetaExpectation)
+            .length >
+        1;
   }
 
   bool get isFinished {
     return commandOutputs.length > 0 &&
         (!lastCommandOutput.successful ||
-         commands.length == commandOutputs.length);
+            commands.length == commandOutputs.length);
   }
 }
 
-
 /**
  * BrowserTestCase has an extra compilation command that is run in a separate
  * process, before the regular test is run as in the base class [TestCase].
  * If the compilation command fails, then the rest of the test is not run.
  */
 class BrowserTestCase extends TestCase {
-
-  BrowserTestCase(displayName, commands, configuration,
-                  expectedOutcomes, info, isNegative, this._testingUrl)
-    : super(displayName, commands, configuration,
-            expectedOutcomes, isNegative: isNegative, info: info);
+  BrowserTestCase(displayName, commands, configuration, expectedOutcomes, info,
+      isNegative, this._testingUrl)
+      : super(displayName, commands, configuration, expectedOutcomes,
+            isNegative: isNegative, info: info);
 
   String _testingUrl;
 
@@ -858,14 +839,13 @@
     return testOutput.contains("unittest-suite-success");
   }
 
-  Expectation _negateOutcomeIfIncompleteAsyncTest(Expectation outcome,
-                                                  String testOutput) {
+  Expectation _negateOutcomeIfIncompleteAsyncTest(
+      Expectation outcome, String testOutput) {
     // If this is an asynchronous test and the asynchronous operation didn't
     // complete successfully, it's outcome is Expectation.FAIL.
     // TODO: maybe we should introduce a AsyncIncomplete marker or so
     if (outcome == Expectation.PASS) {
-      if (_isAsyncTest(testOutput) &&
-          !_isAsyncTestSuccessful(testOutput)) {
+      if (_isAsyncTest(testOutput) && !_isAsyncTestSuccessful(testOutput)) {
         return Expectation.FAIL;
       }
     }
@@ -930,14 +910,15 @@
   bool alreadyPrintedWarning = false;
 
   // TODO(kustermann): Remove testCase from this class.
-  CommandOutputImpl(Command this.command,
-                    int this.exitCode,
-                    bool this.timedOut,
-                    List<int> this.stdout,
-                    List<int> this.stderr,
-                    Duration this.time,
-                    bool this.compilationSkipped,
-                    int this.pid) {
+  CommandOutputImpl(
+      Command this.command,
+      int this.exitCode,
+      bool this.timedOut,
+      List<int> this.stdout,
+      List<int> this.stderr,
+      Duration this.time,
+      bool this.compilationSkipped,
+      int this.pid) {
     diagnostics = [];
   }
 
@@ -991,8 +972,8 @@
     return testCase.isNegative ? !didFail(testCase) : didFail(testCase);
   }
 
-  Expectation _negateOutcomeIfNegativeTest(Expectation outcome,
-                                           bool isNegative) {
+  Expectation _negateOutcomeIfNegativeTest(
+      Expectation outcome, bool isNegative) {
     if (!isNegative) return outcome;
 
     if (outcome.canBeOutcomeOf(Expectation.FAIL)) {
@@ -1012,21 +993,9 @@
   bool _failedBecauseOfMissingXDisplay;
 
   BrowserCommandOutputImpl(
-      command,
-      exitCode,
-      timedOut,
-      stdout,
-      stderr,
-      time,
-      compilationSkipped) :
-    super(command,
-          exitCode,
-          timedOut,
-          stdout,
-          stderr,
-          time,
-          compilationSkipped,
-          0) {
+      command, exitCode, timedOut, stdout, stderr, time, compilationSkipped)
+      : super(command, exitCode, timedOut, stdout, stderr, time,
+            compilationSkipped, 0) {
     _failedBecauseOfMissingXDisplay = _didFailBecauseOfMissingXDisplay();
     if (_failedBecauseOfMissingXDisplay) {
       DebugLogger.warning("Warning: Test failure because of missing XDisplay");
@@ -1128,7 +1097,7 @@
       }
       if (!containsFail && !containsPass) {
         DebugLogger.warning("Test had neither 'FAIL' nor 'PASS' in stdout. "
-                            "($command)");
+            "($command)");
         return true;
       }
       if (containsFail) {
@@ -1137,43 +1106,31 @@
       assert(containsPass);
       if (exitCode != 0) {
         var message = "All tests passed, but exitCode != 0. "
-                      "Actual exitcode: $exitCode. "
-                      "($command)";
+            "Actual exitcode: $exitCode. "
+            "($command)";
         DebugLogger.warning(message);
         diagnostics.add(message);
       }
       return (!hasCrashed &&
-              exitCode != 0 &&
-              (!isWindows || exitCode != WHITELISTED_CONTENTSHELL_EXITCODE));
+          exitCode != 0 &&
+          (!isWindows || exitCode != WHITELISTED_CONTENTSHELL_EXITCODE));
     }
     DebugLogger.warning("Couldn't find 'Content-Type: text/plain' in output. "
-                        "($command).");
+        "($command).");
     return true;
   }
 }
 
 class HTMLBrowserCommandOutputImpl extends BrowserCommandOutputImpl {
- HTMLBrowserCommandOutputImpl(
-      command,
-      exitCode,
-      timedOut,
-      stdout,
-      stderr,
-      time,
-      compilationSkipped) :
-    super(command,
-          exitCode,
-          timedOut,
-          stdout,
-          stderr,
-          time,
-          compilationSkipped);
+  HTMLBrowserCommandOutputImpl(
+      command, exitCode, timedOut, stdout, stderr, time, compilationSkipped)
+      : super(command, exitCode, timedOut, stdout, stderr, time,
+            compilationSkipped);
 
   bool didFail(TestCase testCase) {
     return _getOutcome() != Expectation.PASS;
   }
 
-
   bool get _browserTestFailure {
     // We should not need to convert back and forward.
     var output = decodeUtf8(super.stdout);
@@ -1183,10 +1140,16 @@
 }
 
 class BrowserTestJsonResult {
-  static const ALLOWED_TYPES =
-      const ['sync_exception', 'window_onerror', 'script_onerror',
-             'window_compilationerror', 'print', 'message_received', 'dom',
-             'debug'];
+  static const ALLOWED_TYPES = const [
+    'sync_exception',
+    'window_onerror',
+    'script_onerror',
+    'window_compilationerror',
+    'print',
+    'message_received',
+    'dom',
+    'debug'
+  ];
 
   final Expectation outcome;
   final String htmlDom;
@@ -1198,7 +1161,7 @@
     void validate(String assertion, bool value) {
       if (!value) {
         throw "InvalidFormat sent from browser driving page: $assertion:\n\n"
-               "$content";
+            "$content";
       }
     }
 
@@ -1218,12 +1181,11 @@
           var value = entry['value'];
           var timestamp = entry['timestamp'];
 
-          validate("'type' of an entry must be a String",
-                   type is String);
+          validate("'type' of an entry must be a String", type is String);
           validate("'type' has to be in $ALLOWED_TYPES.",
-                   ALLOWED_TYPES.contains(type));
-          validate("'timestamp' of an entry must be a number",
-                   timestamp is num);
+              ALLOWED_TYPES.contains(type));
+          validate(
+              "'timestamp' of an entry must be a number", timestamp is num);
 
           messagesByType[type].add(value);
         }
@@ -1238,7 +1200,7 @@
         return new BrowserTestJsonResult(
             _getOutcome(messagesByType), dom, events);
       }
-    } catch(error) {
+    } catch (error) {
       // If something goes wrong, we know the content was not in the correct
       // JSON format. So we can't parse it.
       // The caller is responsible for falling back to the old way of
@@ -1275,11 +1237,11 @@
     // the unittest implementation posts these messages using
     // "window.postMessage()" instead of the normal "print()" them.
 
-    var isAsyncTest = searchForMsg(['print', 'message_received'],
-                                   'unittest-suite-wait-for-done');
+    var isAsyncTest = searchForMsg(
+        ['print', 'message_received'], 'unittest-suite-wait-for-done');
     var isAsyncSuccess =
         searchForMsg(['print', 'message_received'], 'unittest-suite-success') ||
-        searchForMsg(['print', 'message_received'], 'unittest-suite-done');
+            searchForMsg(['print', 'message_received'], 'unittest-suite-done');
 
     if (isAsyncTest) {
       if (isAsyncSuccess) {
@@ -1301,22 +1263,23 @@
 }
 
 class BrowserControllerTestOutcome extends CommandOutputImpl
-                                   with UnittestSuiteMessagesMixin {
+    with UnittestSuiteMessagesMixin {
   BrowserTestOutput _result;
   Expectation _rawOutcome;
 
-  factory BrowserControllerTestOutcome(Command command,
-                                       BrowserTestOutput result) {
+  factory BrowserControllerTestOutcome(
+      Command command, BrowserTestOutput result) {
     void validate(String assertion, bool value) {
       if (!value) {
         throw "InvalidFormat sent from browser driving page: $assertion:\n\n"
-              "${result.lastKnownMessage}";
+            "${result.lastKnownMessage}";
       }
     }
 
     String indent(String string, int numSpaces) {
       var spaces = new List.filled(numSpaces, ' ').join('');
-      return string.replaceAll('\r\n', '\n')
+      return string
+          .replaceAll('\r\n', '\n')
           .split('\n')
           .map((line) => "$spaces$line")
           .join('\n');
@@ -1344,13 +1307,13 @@
     if (result.didTimeout) {
       if (result.delayUntilTestStarted != null) {
         stderr = "This test timed out. The delay until the test actually "
-                 "started was: ${result.delayUntilTestStarted}.";
+            "started was: ${result.delayUntilTestStarted}.";
       } else {
         // TODO(ricow/kustermann) as soon as we record the state periodically,
         // we will have more information and can remove this warning.
         stderr = "This test has not notified test.py that it started running. "
-                 "This could be a bug in test.py! "
-                 "Please contact ricow/whesse";
+            "This could be a bug in test.py! "
+            "Please contact ricow/whesse";
       }
     }
 
@@ -1360,8 +1323,7 @@
       stdout = "message:\n${indent(result.lastKnownMessage, 2)}\n\n";
     }
 
-    stderr =
-        '$stderr\n\n'
+    stderr = '$stderr\n\n'
         'BrowserOutput while running the test (* EXPERIMENTAL *):\n'
         'BrowserOutput.stdout:\n'
         '${indent(result.browserOutput.stdout.toString(), 2)}\n'
@@ -1369,20 +1331,23 @@
         '${indent(result.browserOutput.stderr.toString(), 2)}\n'
         '\n';
     return new BrowserControllerTestOutcome._internal(
-      command, result, outcome, encodeUtf8(stdout), encodeUtf8(stderr));
+        command, result, outcome, encodeUtf8(stdout), encodeUtf8(stderr));
   }
 
   BrowserControllerTestOutcome._internal(
-      Command command, BrowserTestOutput result, this._rawOutcome,
-      List<int> stdout, List<int> stderr)
+      Command command,
+      BrowserTestOutput result,
+      this._rawOutcome,
+      List<int> stdout,
+      List<int> stderr)
       : super(command, 0, result.didTimeout, stdout, stderr, result.duration,
-              false, 0) {
+            false, 0) {
     _result = result;
   }
 
   Expectation result(TestCase testCase) {
     // Handle timeouts first
-    if (_result.didTimeout)  return Expectation.TIMEOUT;
+    if (_result.didTimeout) return Expectation.TIMEOUT;
 
     // Multitests are handled specially
     if (testCase.hasRuntimeError) {
@@ -1394,7 +1359,6 @@
   }
 }
 
-
 class AnalysisCommandOutputImpl extends CommandOutputImpl {
   // An error line has 8 fields that look like:
   // ERROR|COMPILER|MISSING_SOURCE|file:/tmp/t.dart|15|1|24|Missing source.
@@ -1403,21 +1367,10 @@
   final int FILENAME = 3;
   final int FORMATTED_ERROR = 7;
 
-  AnalysisCommandOutputImpl(command,
-                            exitCode,
-                            timedOut,
-                            stdout,
-                            stderr,
-                            time,
-                            compilationSkipped) :
-    super(command,
-          exitCode,
-          timedOut,
-          stdout,
-          stderr,
-          time,
-          compilationSkipped,
-          0);
+  AnalysisCommandOutputImpl(
+      command, exitCode, timedOut, stdout, stderr, time, compilationSkipped)
+      : super(command, exitCode, timedOut, stdout, stderr, time,
+            compilationSkipped, 0);
 
   Expectation result(TestCase testCase) {
     // TODO(kustermann): If we run the analyzer not in batch mode, make sure
@@ -1455,9 +1408,8 @@
       return Expectation.STATIC_WARNING;
     }
 
-    assert (errors.length == 0 && warnings.length == 0);
-    assert (!testCase.hasCompileError &&
-            !testCase.hasStaticWarning);
+    assert(errors.length == 0 && warnings.length == 0);
+    assert(!testCase.hasCompileError && !testCase.hasStaticWarning);
     return Expectation.PASS;
   }
 
@@ -1468,7 +1420,7 @@
       StringBuffer field = new StringBuffer();
       List<String> result = [];
       bool escaped = false;
-      for (var i = 0 ; i < line.length; i++) {
+      for (var i = 0; i < line.length; i++) {
         var c = line[i];
         if (!escaped && c == '\\') {
           escaped = true;
@@ -1503,13 +1455,12 @@
 }
 
 class VmCommandOutputImpl extends CommandOutputImpl
-                          with UnittestSuiteMessagesMixin {
+    with UnittestSuiteMessagesMixin {
   static const DART_VM_EXITCODE_COMPILE_TIME_ERROR = 254;
   static const DART_VM_EXITCODE_UNCAUGHT_EXCEPTION = 255;
 
   VmCommandOutputImpl(Command command, int exitCode, bool timedOut,
-                      List<int> stdout, List<int> stderr, Duration time,
-                      int pid)
+      List<int> stdout, List<int> stderr, Duration time, int pid)
       : super(command, exitCode, timedOut, stdout, stderr, time, false, pid);
 
   Expectation result(TestCase testCase) {
@@ -1553,11 +1504,16 @@
 class CompilationCommandOutputImpl extends CommandOutputImpl {
   static const DART2JS_EXITCODE_CRASH = 253;
 
-  CompilationCommandOutputImpl(Command command, int exitCode, bool timedOut,
-      List<int> stdout, List<int> stderr, Duration time,
+  CompilationCommandOutputImpl(
+      Command command,
+      int exitCode,
+      bool timedOut,
+      List<int> stdout,
+      List<int> stderr,
+      Duration time,
       bool compilationSkipped)
       : super(command, exitCode, timedOut, stdout, stderr, time,
-              compilationSkipped, 0);
+            compilationSkipped, 0);
 
   Expectation result(TestCase testCase) {
     // Handle general crash/timeout detection.
@@ -1596,7 +1552,7 @@
 }
 
 class JsCommandlineOutputImpl extends CommandOutputImpl
-                              with UnittestSuiteMessagesMixin {
+    with UnittestSuiteMessagesMixin {
   JsCommandlineOutputImpl(Command command, int exitCode, bool timedOut,
       List<int> stdout, List<int> stderr, Duration time)
       : super(command, exitCode, timedOut, stdout, stderr, time, false, 0);
@@ -1620,7 +1576,7 @@
 class PubCommandOutputImpl extends CommandOutputImpl {
   PubCommandOutputImpl(PubCommand command, int exitCode, bool timedOut,
       List<int> stdout, List<int> stderr, Duration time)
-  : super(command, exitCode, timedOut, stdout, stderr, time, false, 0);
+      : super(command, exitCode, timedOut, stdout, stderr, time, false, 0);
 
   Expectation result(TestCase testCase) {
     // Handle crashes and timeouts first
@@ -1641,8 +1597,8 @@
   final Expectation _result;
 
   ScriptCommandOutputImpl(ScriptCommand command, this._result,
-                          String scriptExecutionInformation, Duration time)
-  : super(command, 0, false, [], [], time, false, 0) {
+      String scriptExecutionInformation, Duration time)
+      : super(command, 0, false, [], [], time, false, 0) {
     var lines = scriptExecutionInformation.split("\n");
     diagnostics.addAll(lines);
   }
@@ -1652,29 +1608,20 @@
   bool get canRunDependendCommands => _result == Expectation.PASS;
 
   bool get successful => _result == Expectation.PASS;
-
 }
 
-CommandOutput createCommandOutput(Command command,
-                                  int exitCode,
-                                  bool timedOut,
-                                  List<int> stdout,
-                                  List<int> stderr,
-                                  Duration time,
-                                  bool compilationSkipped,
-                                  [int pid = 0]) {
+CommandOutput createCommandOutput(Command command, int exitCode, bool timedOut,
+    List<int> stdout, List<int> stderr, Duration time, bool compilationSkipped,
+    [int pid = 0]) {
   if (command is ContentShellCommand) {
     return new BrowserCommandOutputImpl(
-        command, exitCode, timedOut, stdout, stderr,
-        time, compilationSkipped);
+        command, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
   } else if (command is BrowserTestCommand) {
     return new HTMLBrowserCommandOutputImpl(
-        command, exitCode, timedOut, stdout, stderr,
-        time, compilationSkipped);
+        command, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
   } else if (command is AnalysisCommand) {
     return new AnalysisCommandOutputImpl(
-        command, exitCode, timedOut, stdout, stderr,
-        time, compilationSkipped);
+        command, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
   } else if (command is VmCommand) {
     return new VmCommandOutputImpl(
         command, exitCode, timedOut, stdout, stderr, time, pid);
@@ -1694,12 +1641,10 @@
         command, exitCode, timedOut, stdout, stderr, time);
   }
 
-  return new CommandOutputImpl(
-      command, exitCode, timedOut, stdout, stderr,
+  return new CommandOutputImpl(command, exitCode, timedOut, stdout, stderr,
       time, compilationSkipped, pid);
 }
 
-
 /**
  * An OutputLog records the output from a test, but truncates it if
  * it is longer than MAX_HEAD characters, and just keeps the head and
@@ -1734,10 +1679,9 @@
     }
   }
 
-  List<int> _truncatedTail() =>
-    tail.length > TAIL_LENGTH ?
-        tail.sublist(tail.length - TAIL_LENGTH) :
-        tail;
+  List<int> _truncatedTail() => tail.length > TAIL_LENGTH
+      ? tail.sublist(tail.length - TAIL_LENGTH)
+      : tail;
 
   List<int> toList() {
     if (complete == null) {
@@ -1751,7 +1695,8 @@
 
 *****************************************************************************
 
-""".codeUnits);
+"""
+            .codeUnits);
         complete.addAll(_truncatedTail());
       } else if (tail != null) {
         complete.addAll(tail);
@@ -1801,11 +1746,10 @@
         _commandComplete(0);
       } else {
         var processEnvironment = _createProcessEnvironment();
-        Future processFuture =
-            io.Process.start(command.executable,
-                             command.arguments,
-                             environment: processEnvironment,
-                             workingDirectory: command.workingDirectory);
+        Future processFuture = io.Process.start(
+            command.executable, command.arguments,
+            environment: processEnvironment,
+            workingDirectory: command.workingDirectory);
         processFuture.then((io.Process process) {
           StreamSubscription stdoutSubscription =
               _drainStream(process.stdout, stdout);
@@ -1871,14 +1815,14 @@
               });
             }
 
-            Future.wait([stdoutCompleter.future,
-                         stderrCompleter.future]).then((_) {
+            Future.wait([stdoutCompleter.future, stderrCompleter.future]).then(
+                (_) {
               _commandComplete(exitCode);
             });
           });
 
-          timeoutTimer = new Timer(new Duration(seconds: timeout),
-                                   timeoutHandler);
+          timeoutTimer =
+              new Timer(new Duration(seconds: timeout), timeoutHandler);
         }).catchError((e) {
           // TODO(floitsch): should we try to report the stacktrace?
           print("Process error:");
@@ -1912,8 +1856,8 @@
     return commandOutput;
   }
 
-  StreamSubscription _drainStream(Stream<List<int>> source,
-                                  OutputLog destination) {
+  StreamSubscription _drainStream(
+      Stream<List<int>> source, OutputLog destination) {
     return source.listen(destination.add);
   }
 
@@ -1957,7 +1901,7 @@
   BatchRunnerProcess();
 
   Future<CommandOutput> runCommand(String runnerType, ProcessCommand command,
-                                   int timeout, List<String> arguments) {
+      int timeout, List<String> arguments) {
     assert(_completer == null);
     assert(!_currentlyRunning);
 
@@ -2011,15 +1955,14 @@
     _status = null;
     _stdoutCompleter = new Completer();
     _stderrCompleter = new Completer();
-    _timer = new Timer(new Duration(seconds: timeout),
-                       _timeoutHandler);
+    _timer = new Timer(new Duration(seconds: timeout), _timeoutHandler);
 
     var line = _createArgumentsLine(_arguments, timeout);
     _process.stdin.write(line);
     _stdoutSubscription.resume();
     _stderrSubscription.resume();
-    Future.wait([_stdoutCompleter.future,
-                 _stderrCompleter.future]).then((_) => _reportResult());
+    Future.wait([_stdoutCompleter.future, _stderrCompleter.future]).then(
+        (_) => _reportResult());
   }
 
   String _createArgumentsLine(List<String> arguments, int timeout) {
@@ -2034,13 +1977,14 @@
     var exitCode = 0;
     if (outcome == "CRASH") exitCode = CRASHING_BROWSER_EXITCODE;
     if (outcome == "FAIL" || outcome == "TIMEOUT") exitCode = 1;
-    var output = createCommandOutput(_command,
-                        exitCode,
-                        (outcome == "TIMEOUT"),
-                        _testStdout.toList(),
-                        _testStderr.toList(),
-                        new DateTime.now().difference(_startTime),
-                        false);
+    var output = createCommandOutput(
+        _command,
+        exitCode,
+        (outcome == "TIMEOUT"),
+        _testStdout.toList(),
+        _testStderr.toList(),
+        new DateTime.now().difference(_startTime),
+        false);
     assert(_completer != null);
     _completer.complete(output);
     _completer = null;
@@ -2055,7 +1999,8 @@
         _stdoutSubscription.cancel();
         _stderrSubscription.cancel();
         _startProcess(_reportResult);
-      } else {  // No active test case running.
+      } else {
+        // No active test case running.
         _process = null;
       }
     }
@@ -2077,16 +2022,13 @@
         environment[key] = _processEnvironmentOverrides[key];
       }
     }
-    Future processFuture = io.Process.start(executable,
-                                            arguments,
-                                            environment: environment);
+    Future processFuture =
+        io.Process.start(executable, arguments, environment: environment);
     processFuture.then((io.Process p) {
       _process = p;
 
       var _stdoutStream =
-          _process.stdout
-              .transform(UTF8.decoder)
-              .transform(new LineSplitter());
+          _process.stdout.transform(UTF8.decoder).transform(new LineSplitter());
       _stdoutSubscription = _stdoutStream.listen((String line) {
         if (line.startsWith('>>> TEST')) {
           _status = line;
@@ -2107,9 +2049,7 @@
       _stdoutSubscription.pause();
 
       var _stderrStream =
-          _process.stderr
-              .transform(UTF8.decoder)
-              .transform(new LineSplitter());
+          _process.stderr.transform(UTF8.decoder).transform(new LineSplitter());
       _stderrSubscription = _stderrStream.listen((String line) {
         if (line.startsWith('>>> EOF STDERR')) {
           _stderrSubscription.pause();
@@ -2156,7 +2096,6 @@
   }
 }
 
-
 /**
  * [TestCaseEnqueuer] takes a list of TestSuites, generates TestCases and
  * builds a dependency graph of all commands in every TestSuite.
@@ -2223,7 +2162,6 @@
   }
 }
 
-
 /*
  * [CommandEnqueuer] will
  *  - change node.state to NodeState.Enqueuing as soon as all dependencies have
@@ -2232,11 +2170,15 @@
  *    have a state of NodeState.Failed/NodeState.UnableToRun.
  */
 class CommandEnqueuer {
-  static final INIT_STATES = [dgraph.NodeState.Initialized,
-                              dgraph.NodeState.Waiting];
-  static final FINISHED_STATES = [dgraph.NodeState.Successful,
-                                  dgraph.NodeState.Failed,
-                                  dgraph.NodeState.UnableToRun];
+  static final INIT_STATES = [
+    dgraph.NodeState.Initialized,
+    dgraph.NodeState.Waiting
+  ];
+  static final FINISHED_STATES = [
+    dgraph.NodeState.Successful,
+    dgraph.NodeState.Failed,
+    dgraph.NodeState.UnableToRun
+  ];
   final dgraph.Graph _graph;
 
   CommandEnqueuer(this._graph) {
@@ -2248,9 +2190,9 @@
     });
 
     eventCondition((e) => e is dgraph.StateChangedEvent).listen((event) {
-      if ([dgraph.NodeState.Waiting,
-           dgraph.NodeState.Processing].contains(event.from)) {
-        if (FINISHED_STATES.contains(event.to)){
+      if ([dgraph.NodeState.Waiting, dgraph.NodeState.Processing]
+          .contains(event.from)) {
+        if (FINISHED_STATES.contains(event.to)) {
           for (var dependendNode in event.node.neededFor) {
             _changeNodeStateIfNecessary(dependendNode);
           }
@@ -2263,16 +2205,17 @@
   // changed it's state.
   void _changeNodeStateIfNecessary(dgraph.Node node) {
     if (INIT_STATES.contains(node.state)) {
-      bool anyDependenciesUnsuccessful = node.dependencies.any(
-          (dep) => [dgraph.NodeState.Failed,
-                    dgraph.NodeState.UnableToRun].contains(dep.state));
+      bool anyDependenciesUnsuccessful = node.dependencies.any((dep) => [
+            dgraph.NodeState.Failed,
+            dgraph.NodeState.UnableToRun
+          ].contains(dep.state));
 
       var newState = dgraph.NodeState.Waiting;
       if (anyDependenciesUnsuccessful) {
         newState = dgraph.NodeState.UnableToRun;
       } else {
-        bool allDependenciesSuccessful = node.dependencies.every(
-            (dep) => dep.state == dgraph.NodeState.Successful);
+        bool allDependenciesSuccessful = node.dependencies
+            .every((dep) => dep.state == dgraph.NodeState.Successful);
 
         if (allDependenciesSuccessful) {
           newState = dgraph.NodeState.Enqueuing;
@@ -2304,8 +2247,8 @@
   final TestCaseEnqueuer enqueuer;
 
   final Queue<Command> _runQueue = new Queue<Command>();
-  final _commandOutputStream =  new StreamController<CommandOutput>(sync: true);
-  final _completer =  new Completer();
+  final _commandOutputStream = new StreamController<CommandOutput>(sync: true);
+  final _completer = new Completer();
 
   int _numProcesses = 0;
   int _maxProcesses;
@@ -2314,23 +2257,23 @@
   bool _finishing = false;
   bool _verbose = false;
 
-  CommandQueue(this.graph, this.enqueuer, this.executor,
-               this._maxProcesses, this._maxBrowserProcesses, this._verbose) {
+  CommandQueue(this.graph, this.enqueuer, this.executor, this._maxProcesses,
+      this._maxBrowserProcesses, this._verbose) {
     var eventCondition = graph.events.where;
     eventCondition((event) => event is dgraph.StateChangedEvent)
         .listen((event) {
-          if (event.to == dgraph.NodeState.Enqueuing) {
-            assert(event.from == dgraph.NodeState.Initialized ||
-                   event.from == dgraph.NodeState.Waiting);
-            graph.changeState(event.node, dgraph.NodeState.Processing);
-            var command = event.node.userData;
-            if (event.node.dependencies.length > 0) {
-              _runQueue.addFirst(command);
-            } else {
-              _runQueue.add(command);
-            }
-            Timer.run(() => _tryRunNextCommand());
-          }
+      if (event.to == dgraph.NodeState.Enqueuing) {
+        assert(event.from == dgraph.NodeState.Initialized ||
+            event.from == dgraph.NodeState.Waiting);
+        graph.changeState(event.node, dgraph.NodeState.Processing);
+        var command = event.node.userData;
+        if (event.node.dependencies.length > 0) {
+          _runQueue.addFirst(command);
+        } else {
+          _runQueue.add(command);
+        }
+        Timer.run(() => _tryRunNextCommand());
+      }
     });
     // We're finished if the graph is sealed and all nodes are in a finished
     // state (Successful, Failed or UnableToRun).
@@ -2374,8 +2317,8 @@
       // If a command is part of many TestCases we set the timeout to be
       // the maximum over all [TestCase.timeout]s. At some point, we might
       // eliminate [TestCase.timeout] completely and move it to [Command].
-      int timeout = testCases.map((TestCase test) => test.timeout)
-          .fold(0, math.max);
+      int timeout =
+          testCases.map((TestCase test) => test.timeout).fold(0, math.max);
 
       if (_verbose) {
         print('Running "${command.displayName}" command: $command');
@@ -2422,7 +2365,7 @@
     print("CommandQueue state:");
     print("  Processes: used: $_numProcesses max: $_maxProcesses");
     print("  BrowserProcesses: used: $_numBrowserProcesses "
-          "max: $_maxBrowserProcesses");
+        "max: $_maxBrowserProcesses");
     print("  Finishing: $_finishing");
     print("  Queue (length = ${_runQueue.length}):");
     for (var command in _runQueue) {
@@ -2431,7 +2374,6 @@
   }
 }
 
-
 /*
  * [CommandExecutor] is responsible for executing commands. It will make sure
  * that the the following two constraints are satisfied
@@ -2494,7 +2436,7 @@
       return _runCommand(command, timeout).then((CommandOutput output) {
         if (retriesLeft > 0 && shouldRetryCommand(output)) {
           DebugLogger.warning("Rerunning Command: ($retriesLeft "
-                              "attempt(s) remains) [cmd: $command]");
+              "attempt(s) remains) [cmd: $command]");
           return runCommand(retriesLeft - 1);
         } else {
           return new Future.value(output);
@@ -2545,8 +2487,8 @@
     var completer = new Completer<CommandOutput>();
 
     var callback = (BrowserTestOutput output) {
-      completer.complete(
-          new BrowserControllerTestOutcome(browserCommand, output));
+      completer
+          .complete(new BrowserControllerTestOutcome(browserCommand, output));
     };
 
     BrowserTest browserTest;
@@ -2558,40 +2500,32 @@
     }
     _getBrowserTestRunner(browserCommand.browser, browserCommand.configuration)
         .then((testRunner) {
-      testRunner.queueTest(browserTest);
+      testRunner.enqueueTest(browserTest);
     });
 
     return completer.future;
   }
 
-  Future<BrowserTestRunner> _getBrowserTestRunner(String browser,
-                                                  Map configuration) {
+  Future<BrowserTestRunner> _getBrowserTestRunner(
+      String browser, Map configuration) async {
     var localIp = globalConfiguration['local_ip'];
-    var num_browsers = maxBrowserProcesses;
     if (_browserTestRunners[configuration] == null) {
       var testRunner = new BrowserTestRunner(
-            configuration, localIp, browser, num_browsers);
+          configuration, localIp, browser, maxBrowserProcesses);
       if (globalConfiguration['verbose']) {
         testRunner.logger = DebugLogger.info;
       }
       _browserTestRunners[configuration] = testRunner;
-      return testRunner.start().then((started) {
-        if (started) {
-          return testRunner;
-        }
-        print("Issue starting browser test runner");
-        io.exit(1);
-      });
+      await testRunner.start();
     }
-    return new Future.value(_browserTestRunners[configuration]);
+    return _browserTestRunners[configuration];
   }
 }
 
 class RecordingCommandExecutor implements CommandExecutor {
   TestCaseRecorder _recorder;
 
-  RecordingCommandExecutor(Path path)
-      : _recorder = new TestCaseRecorder(path);
+  RecordingCommandExecutor(Path path) : _recorder = new TestCaseRecorder(path);
 
   Future<CommandOutput> runCommand(node, ProcessCommand command, int timeout) {
     assert(node.dependencies.length == 0);
@@ -2613,8 +2547,7 @@
     if (environment == null) return true;
     return environment.length == 0 ||
         (environment.length == 1 &&
-         environment.containsKey("DART_CONFIGURATION"));
-
+            environment.containsKey("DART_CONFIGURATION"));
   }
 }
 
@@ -2634,16 +2567,6 @@
 }
 
 bool shouldRetryCommand(CommandOutput output) {
-  var command = output.command;
-  // We rerun tests on Safari because 6.2 and 7.1 are flaky. Issue 21434.
-  if (command is BrowserTestCommand &&
-      command.retry &&
-      command.browser == 'safari' &&
-      output is BrowserControllerTestOutcome &&
-      output._rawOutcome != Expectation.PASS) {
-    return true;
-  }
-
   if (!output.successful) {
     List<String> stdout, stderr;
 
@@ -2660,7 +2583,7 @@
       // "xvfb-run" issue 7564, try re-running the test.
       bool containsFailureMsg(String line) {
         return line.contains(MESSAGE_CANNOT_OPEN_DISPLAY) ||
-               line.contains(MESSAGE_FAILED_TO_RUN_COMMAND);
+            line.contains(MESSAGE_FAILED_TO_RUN_COMMAND);
       }
       if (stdout.any(containsFailureMsg) || stderr.any(containsFailureMsg)) {
         return true;
@@ -2668,6 +2591,7 @@
     }
 
     // We currently rerun dartium tests, see issue 14074.
+    final command = output.command;
     if (command is BrowserTestCommand &&
         command.retry &&
         command.browser == 'dartium') {
@@ -2687,8 +2611,10 @@
  * closed.
  */
 class TestCaseCompleter {
-  static final COMPLETED_STATES = [dgraph.NodeState.Failed,
-                                   dgraph.NodeState.Successful];
+  static final COMPLETED_STATES = [
+    dgraph.NodeState.Failed,
+    dgraph.NodeState.Successful
+  ];
   final dgraph.Graph graph;
   final TestCaseEnqueuer enqueuer;
   final CommandQueue commandQueue;
@@ -2716,26 +2642,26 @@
     // changes.
     eventCondition((event) => event is dgraph.StateChangedEvent)
         .listen((dgraph.StateChangedEvent event) {
-          if (event.from == dgraph.NodeState.Processing &&
-              !finishedRemainingTestCases ) {
-            var command = event.node.userData;
+      if (event.from == dgraph.NodeState.Processing &&
+          !finishedRemainingTestCases) {
+        var command = event.node.userData;
 
-            assert(COMPLETED_STATES.contains(event.to));
-            assert(_outputs[command] != null);
+        assert(COMPLETED_STATES.contains(event.to));
+        assert(_outputs[command] != null);
 
-            _completeTestCasesIfPossible(enqueuer.command2testCases[command]);
-            _checkDone();
-          }
+        _completeTestCasesIfPossible(enqueuer.command2testCases[command]);
+        _checkDone();
+      }
     });
 
     // Listen also for GraphSealedEvent's. If there is not a single node in the
     // graph, we still want to finish after the graph was sealed.
     eventCondition((event) => event is dgraph.GraphSealedEvent)
         .listen((dgraph.GraphSealedEvent event) {
-          if (!_closed && enqueuer.remainingTestCases.isEmpty) {
-            _controller.close();
-            _closed = true;
-          }
+      if (!_closed && enqueuer.remainingTestCases.isEmpty) {
+        _controller.close();
+        _closed = true;
+      }
     });
   }
 
@@ -2779,7 +2705,6 @@
   }
 }
 
-
 class ProcessQueue {
   Map _globalConfiguration;
 
@@ -2787,32 +2712,28 @@
   final dgraph.Graph _graph = new dgraph.Graph();
   List<EventListener> _eventListener;
 
-  ProcessQueue(this._globalConfiguration,
-               maxProcesses,
-               maxBrowserProcesses,
-               DateTime startTime,
-               testSuites,
-               this._eventListener,
-               this._allDone,
-               [bool verbose = false,
-                String recordingOutputFile,
-                String recordedInputFile]) {
+  ProcessQueue(this._globalConfiguration, maxProcesses, maxBrowserProcesses,
+      DateTime startTime, testSuites, this._eventListener, this._allDone,
+      [bool verbose = false,
+      String recordingOutputFile,
+      String recordedInputFile]) {
     void setupForListing(TestCaseEnqueuer testCaseEnqueuer) {
-      _graph.events.where((event) => event is dgraph.GraphSealedEvent)
-        .listen((dgraph.GraphSealedEvent event) {
-          var testCases = new List.from(testCaseEnqueuer.remainingTestCases);
-          testCases.sort((a, b) => a.displayName.compareTo(b.displayName));
+      _graph.events
+          .where((event) => event is dgraph.GraphSealedEvent)
+          .listen((dgraph.GraphSealedEvent event) {
+        var testCases = new List.from(testCaseEnqueuer.remainingTestCases);
+        testCases.sort((a, b) => a.displayName.compareTo(b.displayName));
 
-          print("\nGenerating all matching test cases ....\n");
+        print("\nGenerating all matching test cases ....\n");
 
-          for (TestCase testCase in testCases) {
-            eventFinishedTestCase(testCase);
-            print("${testCase.displayName}   "
-                  "Expectations: ${testCase.expectedOutcomes.join(', ')}   "
-                  "Configuration: '${testCase.configurationString}'");
-          }
-          eventAllTestsKnown();
-        });
+        for (TestCase testCase in testCases) {
+          eventFinishedTestCase(testCase);
+          print("${testCase.displayName}   "
+              "Expectations: ${testCase.expectedOutcomes.join(', ')}   "
+              "Configuration: '${testCase.configurationString}'");
+        }
+        eventAllTestsKnown();
+      });
     }
 
     var testCaseEnqueuer;
@@ -2834,17 +2755,18 @@
         cancelDebugTimer();
         _debugTimer = new Timer(debugTimerDuration, () {
           print("The debug timer of test.dart expired. Please report this issue"
-                " to ricow/whesse and provide the following information:");
+              " to ricow/whesse and provide the following information:");
           print("");
           print("Graph is sealed: ${_graph.isSealed}");
           print("");
           _graph.DumpCounts();
           print("");
           var unfinishedNodeStates = [
-              dgraph.NodeState.Initialized,
-              dgraph.NodeState.Waiting,
-              dgraph.NodeState.Enqueuing,
-              dgraph.NodeState.Processing];
+            dgraph.NodeState.Initialized,
+            dgraph.NodeState.Waiting,
+            dgraph.NodeState.Enqueuing,
+            dgraph.NodeState.Processing
+          ];
 
           for (var nodeState in unfinishedNodeStates) {
             if (_graph.stateCount(nodeState) > 0) {
@@ -2858,7 +2780,7 @@
                   print("  Command: $command");
                   for (var testCase in testCases) {
                     print("    Enqueued by: ${testCase.configurationString} "
-                          "-- ${testCase.displayName}");
+                        "-- ${testCase.displayName}");
                   }
                   print("");
                 }
@@ -2879,9 +2801,10 @@
 
       // When the graph building is finished, notify event listeners.
       _graph.events
-        .where((event) => event is dgraph.GraphSealedEvent).listen((event) {
-          eventAllTestsKnown();
-        });
+          .where((event) => event is dgraph.GraphSealedEvent)
+          .listen((event) {
+        eventAllTestsKnown();
+      });
 
       // Queue commands as they become "runnable"
       var commandEnqueuer = new CommandEnqueuer(_graph);
@@ -2899,30 +2822,27 @@
 
       // Run "runnable commands" using [executor] subject to
       // maxProcesses/maxBrowserProcesses constraint
-      commandQueue = new CommandQueue(
-          _graph, testCaseEnqueuer, executor, maxProcesses, maxBrowserProcesses,
-          verbose);
+      commandQueue = new CommandQueue(_graph, testCaseEnqueuer, executor,
+          maxProcesses, maxBrowserProcesses, verbose);
 
       // Finish test cases when all commands were run (or some failed)
       var testCaseCompleter =
           new TestCaseCompleter(_graph, testCaseEnqueuer, commandQueue);
-      testCaseCompleter.finishedTestCases.listen(
-          (TestCase finishedTestCase) {
-            resetDebugTimer();
+      testCaseCompleter.finishedTestCases.listen((TestCase finishedTestCase) {
+        resetDebugTimer();
 
-            // If we're recording, we don't report any TestCases to listeners.
-            if (!recording) {
-              eventFinishedTestCase(finishedTestCase);
-            }
-          },
-          onDone: () {
-            // Wait until the commandQueue/execturo is done (it may need to stop
-            // batch runners, browser controllers, ....)
-            commandQueue.done.then((_) {
-              cancelDebugTimer();
-              eventAllTestsDone();
-            });
-          });
+        // If we're recording, we don't report any TestCases to listeners.
+        if (!recording) {
+          eventFinishedTestCase(finishedTestCase);
+        }
+      }, onDone: () {
+        // Wait until the commandQueue/execturo is done (it may need to stop
+        // batch runners, browser controllers, ....)
+        commandQueue.done.then((_) {
+          cancelDebugTimer();
+          eventAllTestsDone();
+        });
+      });
 
       resetDebugTimer();
     }
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index fd06d20..d288da8 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -27,21 +27,18 @@
 import "utils.dart";
 import "http_server.dart" show PREFIX_BUILDDIR, PREFIX_DARTDIR;
 
-import "compiler_configuration.dart" show
-    CommandArtifact,
-    CompilerConfiguration;
+import "compiler_configuration.dart"
+    show CommandArtifact, CompilerConfiguration;
 
-import "runtime_configuration.dart" show
-    RuntimeConfiguration;
+import "runtime_configuration.dart" show RuntimeConfiguration;
 
 import 'browser_test.dart';
 
-
 RegExp multiHtmlTestGroupRegExp = new RegExp(r"\s*[^/]\s*group\('[^,']*");
 RegExp multiHtmlTestRegExp = new RegExp(r"useHtmlIndividualConfiguration()");
 // Require at least one non-space character before '///'
 RegExp multiTestRegExp = new RegExp(r"\S *"
-                                    r"/// \w+:(.*)");
+    r"/// \w+:(.*)");
 RegExp dartExtension = new RegExp(r'\.dart$');
 
 /**
@@ -49,14 +46,12 @@
  */
 typedef bool Predicate<T>(T arg);
 
-typedef void CreateTest(Path filePath,
-                        Path originTestPath,
-                        bool hasCompileError,
-                        bool hasRuntimeError,
-                        {bool isNegativeIfChecked,
-                         bool hasCompileErrorIfChecked,
-                         bool hasStaticWarning,
-                         String multitestKey});
+typedef void CreateTest(Path filePath, Path originTestPath,
+    bool hasCompileError, bool hasRuntimeError,
+    {bool isNegativeIfChecked,
+    bool hasCompileErrorIfChecked,
+    bool hasStaticWarning,
+    String multitestKey});
 
 typedef void VoidFunction();
 
@@ -74,7 +69,6 @@
   return completer.future;
 }
 
-
 /** A completer that waits until all added [Future]s complete. */
 // TODO(rnystrom): Copied from web_components. Remove from here when it gets
 // added to dart:core. (See #6626.)
@@ -116,7 +110,6 @@
   Future<List> get future => _completer.future;
 }
 
-
 /**
  * A TestSuite represents a collection of tests.  It creates a [TestCase]
  * object for each test to be run, and passes the test cases to a callback.
@@ -132,10 +125,10 @@
   Map<String, String> _environmentOverrides;
 
   TestSuite(this.configuration, this.suiteName) {
-    TestUtils.buildDir(configuration);  // Sets configuration_directory.
+    TestUtils.buildDir(configuration); // Sets configuration_directory.
     if (configuration['configuration_directory'] != null) {
       _environmentOverrides = {
-        'DART_CONFIGURATION' : configuration['configuration_directory']
+        'DART_CONFIGURATION': configuration['configuration_directory']
       };
     }
   }
@@ -359,13 +352,14 @@
         .append(testUniqueName);
 
     TestUtils.mkdirRecursive(new Path('.'), generatedTestPath);
-    return new File(generatedTestPath.toNativePath()).absolute.path
+    return new File(generatedTestPath.toNativePath())
+        .absolute
+        .path
         .replaceAll('\\', '/');
   }
 
-  String buildTestCaseDisplayName(Path suiteDir,
-                                  Path originTestPath,
-                                  {String multitestName: ""}) {
+  String buildTestCaseDisplayName(Path suiteDir, Path originTestPath,
+      {String multitestName: ""}) {
     Path testNamePath = originTestPath.relativeTo(suiteDir);
     var directory = testNamePath.directoryPath;
     var filenameWithoutExt = testNamePath.filenameWithoutExtension;
@@ -391,10 +385,10 @@
     var checked = configuration['checked'] ? '-checked' : '';
     var minified = configuration['minified'] ? '-minified' : '';
     var sdk = configuration['use_sdk'] ? '-sdk' : '';
-    var packages = configuration['use_public_packages']
-        ? '-public_packages' : '';
+    var packages =
+        configuration['use_public_packages'] ? '-public_packages' : '';
     var dirName = "${configuration['compiler']}-${configuration['runtime']}"
-                  "$checked$minified$packages$sdk";
+        "$checked$minified$packages$sdk";
     return createGeneratedTestDirectoryHelper(
         "tests", dirName, testPath, optionsName);
   }
@@ -404,10 +398,10 @@
     var minified = configuration['minified'] ? '-minified' : '';
     var csp = configuration['csp'] ? '-csp' : '';
     var sdk = configuration['use_sdk'] ? '-sdk' : '';
-    var packages = configuration['use_public_packages']
-        ? '-public_packages' : '';
+    var packages =
+        configuration['use_public_packages'] ? '-public_packages' : '';
     var dirName = "${configuration['compiler']}"
-                  "$checked$minified$csp$packages$sdk";
+        "$checked$minified$csp$packages$sdk";
     return createGeneratedTestDirectoryHelper(
         "compilations", dirName, testPath, "");
   }
@@ -415,14 +409,16 @@
   String createPubspecCheckoutDirectory(Path directoryOfPubspecYaml) {
     var sdk = configuration['use_sdk'] ? '-sdk' : '';
     var pkg = configuration['use_public_packages']
-        ? 'public_packages' : 'repo_packages';
+        ? 'public_packages'
+        : 'repo_packages';
     return createGeneratedTestDirectoryHelper(
         "pubspec_checkouts", '$pkg$sdk', directoryOfPubspecYaml, "");
   }
 
   String createPubPackageBuildsDirectory(Path directoryOfPubspecYaml) {
     var pkg = configuration['use_public_packages']
-        ? 'public_packages' : 'repo_packages';
+        ? 'public_packages'
+        : 'repo_packages';
     return createGeneratedTestDirectoryHelper(
         "pub_package_builds", pkg, directoryOfPubspecYaml, "");
   }
@@ -434,19 +430,20 @@
     var dir = new Directory(path.toNativePath());
     return dir.exists().then((var exist) {
       if (!exist) return [];
-      return dir.list(recursive: false)
-      .where((fse) => fse is Directory)
-      .map((Directory directory) {
-        var fullPath = directory.absolute.path;
-        var packageName = new Path(fullPath).filename;
-        if (isValid(packageName)) {
-          return [packageName, path.append(packageName).toNativePath()];
-        }
-        return null;
-      })
-      .where((name) => name != null)
-      .toList();
-      });
+      return dir
+          .list(recursive: false)
+          .where((fse) => fse is Directory)
+          .map((Directory directory) {
+            var fullPath = directory.absolute.path;
+            var packageName = new Path(fullPath).filename;
+            if (isValid(packageName)) {
+              return [packageName, path.append(packageName).toNativePath()];
+            }
+            return null;
+          })
+          .where((name) => name != null)
+          .toList();
+    });
   }
 
   Future<Map> discoverPackagesInRepository() {
@@ -522,28 +519,25 @@
   Map buildPubspecDependencyOverrides(Map packageDirectories) {
     Map overrides = {};
     packageDirectories.forEach((String packageName, String fullPath) {
-      overrides[packageName] = { 'path' : fullPath };
+      overrides[packageName] = {'path': fullPath};
     });
     return overrides;
   }
-
 }
 
-
 Future<Iterable<String>> ccTestLister(String runnerPath) {
   return Process.run(runnerPath, ["--list"]).then((ProcessResult result) {
     if (result.exitCode != 0) {
       throw "Failed to list tests: '$runnerPath --list'. "
-            "Process exited with ${result.exitCode}";
+          "Process exited with ${result.exitCode}";
     }
     return result.stdout
-      .split('\n')
-      .map((line) => line.trim())
-      .where((name) => name.length > 0);
+        .split('\n')
+        .map((line) => line.trim())
+        .where((name) => name.length > 0);
   });
 }
 
-
 /**
  * A specialized [TestSuite] that runs tests written in C to unit test
  * the Dart virtual machine and its API.
@@ -559,11 +553,9 @@
   final String dartDir;
   List<String> statusFilePaths;
 
-  CCTestSuite(Map configuration,
-              String suiteName,
-              String runnerName,
-              this.statusFilePaths,
-              {this.testPrefix: ''})
+  CCTestSuite(Map configuration, String suiteName, String runnerName,
+      this.statusFilePaths,
+      {this.testPrefix: ''})
       : super(configuration, suiteName),
         dartDir = TestUtils.dartDir.toNativePath() {
     // For running the tests we use the given '$runnerName' binary
@@ -585,8 +577,7 @@
     // "suiteName/testName" for cc tests.
     String constructedName = '$suiteName/$testPrefix$testName';
 
-    var expectations = testExpectations.expectations(
-        '$testPrefix$testName');
+    var expectations = testExpectations.expectations('$testPrefix$testName');
 
     var args = TestUtils.standardOptions(configuration);
     args.add(testName);
@@ -616,7 +607,6 @@
   }
 }
 
-
 class TestInformation {
   Path filePath;
   Path originTestPath;
@@ -628,27 +618,36 @@
   bool hasStaticWarning;
   String multitestKey;
 
-  TestInformation(this.filePath, this.originTestPath, this.optionsFromFile,
-                  this.hasCompileError, this.hasRuntimeError,
-                  this.isNegativeIfChecked, this.hasCompileErrorIfChecked,
-                  this.hasStaticWarning,
-                  {this.multitestKey: ''}) {
+  TestInformation(
+      this.filePath,
+      this.originTestPath,
+      this.optionsFromFile,
+      this.hasCompileError,
+      this.hasRuntimeError,
+      this.isNegativeIfChecked,
+      this.hasCompileErrorIfChecked,
+      this.hasStaticWarning,
+      {this.multitestKey: ''}) {
     assert(filePath.isAbsolute);
   }
 }
 
-
 class HtmlTestInformation extends TestInformation {
   List<String> expectedMessages;
   List<String> scripts;
 
   HtmlTestInformation(Path filePath, this.expectedMessages, this.scripts)
-      : super(filePath, filePath,
-              {'isMultitest': false, 'isMultiHtmlTest': false},
-              false, false, false, false, false) {}
+      : super(
+            filePath,
+            filePath,
+            {'isMultitest': false, 'isMultiHtmlTest': false},
+            false,
+            false,
+            false,
+            false,
+            false) {}
 }
 
-
 /**
  * A standard [TestSuite] implementation that searches for tests in a
  * directory, and creates [TestCase]s that compile and/or run them.
@@ -664,12 +663,9 @@
   final extraVmOptions;
   List<Uri> _dart2JsBootstrapDependencies;
 
-  StandardTestSuite(Map configuration,
-                    String suiteName,
-                    Path suiteDirectory,
-                    this.statusFilePaths,
-                    {this.isTestFilePredicate,
-                    bool recursive: false})
+  StandardTestSuite(Map configuration, String suiteName, Path suiteDirectory,
+      this.statusFilePaths,
+      {this.isTestFilePredicate, bool recursive: false})
       : super(configuration, suiteName),
         dartDir = TestUtils.dartDir,
         listRecursively = recursive,
@@ -678,11 +674,14 @@
     if (!useSdk) {
       _dart2JsBootstrapDependencies = [];
     } else {
-      var snapshotPath = TestUtils.absolutePath(new Path(buildDir).join(
-          new Path('dart-sdk/bin/snapshots/'
-                   'utils_wrapper.dart.snapshot'))).toString();
-      _dart2JsBootstrapDependencies =
-          [new Uri(scheme: 'file', path: snapshotPath)];
+      var snapshotPath = TestUtils
+          .absolutePath(
+              new Path(buildDir).join(new Path('dart-sdk/bin/snapshots/'
+                  'utils_wrapper.dart.snapshot')))
+          .toString();
+      _dart2JsBootstrapDependencies = [
+        new Uri(scheme: 'file', path: snapshotPath)
+      ];
     }
   }
 
@@ -715,14 +714,14 @@
    */
   factory StandardTestSuite.forDirectory(Map configuration, Path directory) {
     var name = directory.filename;
-    var status_paths = ['$directory/$name.status',
-                        '$directory/.status',
-                        '$directory/${name}_dart2js.status',
-                        '$directory/${name}_analyzer2.status'];
+    var status_paths = [
+      '$directory/$name.status',
+      '$directory/.status',
+      '$directory/${name}_dart2js.status',
+      '$directory/${name}_analyzer2.status'
+    ];
 
-    return new StandardTestSuite(configuration,
-        name, directory,
-        status_paths,
+    return new StandardTestSuite(configuration, name, directory, status_paths,
         isTestFilePredicate: (filename) => filename.endsWith('_test.dart'),
         recursive: true);
   }
@@ -823,11 +822,12 @@
   }
 
   void enqueueDirectory(Directory dir, FutureGroup group) {
-    var lister = dir.list(recursive: listRecursively)
+    var lister = dir
+        .list(recursive: listRecursively)
         .where((fse) => fse is File)
         .forEach((File f) {
-          enqueueFile(f.path, group);
-        });
+      enqueueFile(f.path, group);
+    });
     group.add(lister);
   }
 
@@ -835,8 +835,8 @@
     if (isHtmlTestFile(filename)) {
       var info = htmlTest.getInformation(filename);
       if (info == null) {
-        DebugLogger.error(
-            "HtmlTest $filename does not contain required annotations");
+        DebugLogger
+            .error("HtmlTest $filename does not contain required annotations");
         return;
       }
       cachedTests.add(info);
@@ -852,11 +852,9 @@
     if (optionsFromFile['isMultitest']) {
       group.add(doMultitest(filePath, buildDir, suiteDir, createTestCase));
     } else {
-      createTestCase(filePath,
-                     filePath,
-                     optionsFromFile['hasCompileError'],
-                     optionsFromFile['hasRuntimeError'],
-                     hasStaticWarning: optionsFromFile['hasStaticWarning']);
+      createTestCase(filePath, filePath, optionsFromFile['hasCompileError'],
+          optionsFromFile['hasRuntimeError'],
+          hasStaticWarning: optionsFromFile['hasStaticWarning']);
     }
   }
 
@@ -864,15 +862,13 @@
     final existsCache = TestUtils.existsCache;
 
     Path root = TestUtils.dartDir;
-    assert ("$filePath".startsWith("$root"));
+    assert("$filePath".startsWith("$root"));
 
     // We start with the parent directory of [filePath] and go up until
     // the root directory (excluding the root).
-    List<String> segments =
-        filePath.directoryPath.relativeTo(root).segments();
+    List<String> segments = filePath.directoryPath.relativeTo(root).segments();
     while (segments.length > 0) {
-      var pubspecYamlPath =
-          new Path(segments.join('/')).append('pubspec.yaml');
+      var pubspecYamlPath = new Path(segments.join('/')).append('pubspec.yaml');
       if (existsCache.doesFileExist(pubspecYamlPath.toNativePath())) {
         return root.join(pubspecYamlPath);
       }
@@ -884,7 +880,7 @@
   void enqueueTestCaseFromTestInformation(TestInformation info) {
     String testName = buildTestCaseDisplayName(suiteDir, info.originTestPath,
         multitestName:
-          info.optionsFromFile['isMultitest'] ? info.multitestKey : "");
+            info.optionsFromFile['isMultitest'] ? info.multitestKey : "");
     Set<Expectation> expectations = testExpectations.expectations(testName);
     if (info is HtmlTestInformation) {
       enqueueHtmlTest(info, testName, expectations);
@@ -898,8 +894,7 @@
       var packageDir = pubspecYamlFile.directoryPath;
       var packageName = packageDir.filename;
 
-      var checkoutDirectory =
-          createPubspecCheckoutDirectory(packageDir);
+      var checkoutDirectory = createPubspecCheckoutDirectory(packageDir);
       var modifiedYamlFile = new Path(checkoutDirectory).append("pubspec.yaml");
       var pubCacheDirectory = new Path(checkoutDirectory).append("pub-cache");
       var newPackageRoot = new Path(checkoutDirectory).append("packages");
@@ -919,8 +914,8 @@
       // NOTE: We make a link in the package-root to pkg/expect, since
       // 'package:expect' is not available on pub.dartlang.org!
       var expectLink = newPackageRoot.append('expect');
-      var expectLinkTarget = TestUtils.dartDir
-          .append('pkg').append('expect').append('lib');
+      var expectLinkTarget =
+          TestUtils.dartDir.append('pkg').append('expect').append('lib');
 
       // Generate dependency overrides if we use repository packages.
       var packageDirectories = {};
@@ -951,10 +946,7 @@
       commands.add(CommandBuilder.instance.getMakeSymlinkCommand(
           expectLink.toNativePath(), expectLinkTarget.toNativePath()));
 
-      return {
-        'commands' : commands,
-        'package-root' : newPackageRoot,
-      };
+      return {'commands': commands, 'package-root': newPackageRoot,};
     }
 
     // If this test is inside a package, we will check if there is a
@@ -1003,24 +995,21 @@
             baseCommands, packageRoot, info, testName, expectations);
       }
     } else {
-      enqueueStandardTest(
-          baseCommands, info, testName, expectations);
+      enqueueStandardTest(baseCommands, info, testName, expectations);
     }
   }
 
-  void enqueueStandardTest(List<Command> baseCommands,
-                           TestInformation info,
-                           String testName,
-                           Set<Expectation> expectations) {
-    var commonArguments = commonArgumentsFromFile(info.filePath,
-                                                  info.optionsFromFile);
+  void enqueueStandardTest(List<Command> baseCommands, TestInformation info,
+      String testName, Set<Expectation> expectations) {
+    var commonArguments =
+        commonArgumentsFromFile(info.filePath, info.optionsFromFile);
 
     List<List<String>> vmOptionsList = getVmOptions(info.optionsFromFile);
     assert(!vmOptionsList.isEmpty);
 
     for (var vmOptionsVarient = 0;
-         vmOptionsVarient < vmOptionsList.length;
-         vmOptionsVarient++) {
+        vmOptionsVarient < vmOptionsList.length;
+        vmOptionsVarient++) {
       var vmOptions = vmOptionsList[vmOptionsVarient];
       var allVmOptions = vmOptions;
       if (!extraVmOptions.isEmpty) {
@@ -1028,15 +1017,11 @@
       }
 
       var commands = []..addAll(baseCommands);
-      commands.addAll(makeCommands(info, vmOptionsVarient,
-                                   allVmOptions, commonArguments));
-      enqueueNewTestCase(
-          new TestCase('$suiteName/$testName',
-                       commands,
-                       configuration,
-                       expectations,
-                       isNegative: isNegative(info),
-                       info: info));
+      commands.addAll(
+          makeCommands(info, vmOptionsVarient, allVmOptions, commonArguments));
+      enqueueNewTestCase(new TestCase(
+          '$suiteName/$testName', commands, configuration, expectations,
+          isNegative: isNegative(info), info: info));
     }
   }
 
@@ -1054,10 +1039,8 @@
     return negative;
   }
 
-  List<Command> makeCommands(TestInformation info,
-                             int vmOptionsVarient,
-                             var vmOptions,
-                             var args) {
+  List<Command> makeCommands(
+      TestInformation info, int vmOptionsVarient, var vmOptions, var args) {
     List<Command> commands = <Command>[];
     CompilerConfiguration compilerConfiguration =
         new CompilerConfiguration(configuration);
@@ -1066,10 +1049,8 @@
     List<String> compileTimeArguments = <String>[];
     String tempDir;
     if (compilerConfiguration.hasCompiler) {
-      compileTimeArguments =
-          compilerConfiguration.computeCompilerArguments(vmOptions,
-                                                         sharedOptions,
-                                                         args);
+      compileTimeArguments = compilerConfiguration.computeCompilerArguments(
+          vmOptions, sharedOptions, args);
       // Avoid doing this for analyzer.
       var path = info.filePath;
       if (vmOptionsVarient != 0) {
@@ -1101,38 +1082,38 @@
             runtimeConfiguration,
             buildDir,
             info,
-            vmOptions, sharedOptions, args,
+            vmOptions,
+            sharedOptions,
+            args,
             compilationArtifact);
 
     return commands
-        ..addAll(
-            runtimeConfiguration.computeRuntimeCommands(
-                this,
-                CommandBuilder.instance,
-                compilationArtifact,
-                runtimeArguments,
-                environmentOverrides));
+      ..addAll(runtimeConfiguration.computeRuntimeCommands(
+          this,
+          CommandBuilder.instance,
+          compilationArtifact,
+          runtimeArguments,
+          environmentOverrides));
   }
 
   CreateTest makeTestCaseCreator(Map optionsFromFile) {
-    return (Path filePath,
-            Path originTestPath,
-            bool hasCompileError,
-            bool hasRuntimeError,
-            {bool isNegativeIfChecked: false,
-             bool hasCompileErrorIfChecked: false,
-             bool hasStaticWarning: false,
-             String multitestKey}) {
+    return (Path filePath, Path originTestPath, bool hasCompileError,
+        bool hasRuntimeError,
+        {bool isNegativeIfChecked: false,
+        bool hasCompileErrorIfChecked: false,
+        bool hasStaticWarning: false,
+        String multitestKey}) {
       // Cache the test information for each test case.
-      var info = new TestInformation(filePath,
-                                     originTestPath,
-                                     optionsFromFile,
-                                     hasCompileError,
-                                     hasRuntimeError,
-                                     isNegativeIfChecked,
-                                     hasCompileErrorIfChecked,
-                                     hasStaticWarning,
-                                     multitestKey: multitestKey);
+      var info = new TestInformation(
+          filePath,
+          originTestPath,
+          optionsFromFile,
+          hasCompileError,
+          hasRuntimeError,
+          isNegativeIfChecked,
+          hasCompileErrorIfChecked,
+          hasStaticWarning,
+          multitestKey: multitestKey);
       cachedTests.add(info);
       enqueueTestCaseFromTestInformation(info);
     };
@@ -1179,15 +1160,16 @@
     if (subtestName != null) {
       parameters['group'] = subtestName;
     }
-    return new Uri(scheme: 'http',
-                   host: configuration['local_ip'],
-                   port: serverPort,
-                   path: pathComponent,
-                   queryParameters: parameters);
+    return new Uri(
+        scheme: 'http',
+        host: configuration['local_ip'],
+        port: serverPort,
+        path: pathComponent,
+        queryParameters: parameters);
   }
 
-  void _createWrapperFile(String dartWrapperFilename,
-                          Path localDartLibraryFilename) {
+  void _createWrapperFile(
+      String dartWrapperFilename, Path localDartLibraryFilename) {
     File file = new File(dartWrapperFilename);
     RandomAccessFile dartWrapper = file.openSync(mode: FileMode.WRITE);
 
@@ -1210,12 +1192,8 @@
    * subTestName, Set<String>> if we are running a browser multi-test (one
    * compilation and many browser runs).
    */
-  void enqueueBrowserTest(
-      List<Command> baseCommands,
-      Path packageRoot,
-      TestInformation info,
-      String testName,
-      expectations) {
+  void enqueueBrowserTest(List<Command> baseCommands, Path packageRoot,
+      TestInformation info, String testName, expectations) {
     RegExp badChars = new RegExp('[-=/]');
     List VmOptionsList = getVmOptions(info.optionsFromFile);
     bool multipleOptions = VmOptionsList.length > 1;
@@ -1223,18 +1201,11 @@
       String optionsName =
           multipleOptions ? vmOptions.join('-').replaceAll(badChars, '') : '';
       String tempDir = createOutputDirectory(info.filePath, optionsName);
-      enqueueBrowserTestWithOptions(
-          baseCommands,
-          packageRoot,
-          info,
-          testName,
-          expectations,
-          vmOptions,
-          tempDir);
+      enqueueBrowserTestWithOptions(baseCommands, packageRoot, info, testName,
+          expectations, vmOptions, tempDir);
     }
   }
 
-
   void enqueueBrowserTestWithOptions(
       List<Command> baseCommands,
       Path packageRoot,
@@ -1337,13 +1308,8 @@
     }
 
     if (compiler != 'none') {
-      commands.add(
-          _compileCommand(
-              dartWrapperFilename,
-              compiledDartWrapperFilename,
-              compiler,
-              tempDir,
-              optionsFromFile));
+      commands.add(_compileCommand(dartWrapperFilename,
+          compiledDartWrapperFilename, compiler, tempDir, optionsFromFile));
     }
 
     // some tests require compiling multiple input scripts.
@@ -1354,13 +1320,8 @@
       Path fromPath = filePath.directoryPath.join(namePath);
       if (compiler != 'none') {
         assert(namePath.extension == 'dart');
-        commands.add(
-            _compileCommand(
-                fromPath.toNativePath(),
-                '$tempDir/$fileName.js',
-                compiler,
-                tempDir,
-                optionsFromFile));
+        commands.add(_compileCommand(fromPath.toNativePath(),
+            '$tempDir/$fileName.js', compiler, tempDir, optionsFromFile));
       }
       if (compiler == 'none') {
         // For the tests that require multiple input scripts but are not
@@ -1371,13 +1332,12 @@
       }
     }
 
-
     // Variables for browser multi-tests.
     bool multitest = info.optionsFromFile['isMultiHtmlTest'];
     List<String> subtestNames =
         multitest ? info.optionsFromFile['subtestNames'] : [null];
     for (String subtestName in subtestNames) {
-    // Construct the command that executes the browser test
+      // Construct the command that executes the browser test
       List<Command> commandSet = new List<Command>.from(commands);
 
       var htmlPath_subtest = _createUrlPathFromFile(new Path(htmlPath));
@@ -1400,42 +1360,29 @@
           dartFlags.addAll(vmOptions);
         }
 
-        commandSet.add(
-            CommandBuilder.instance.getContentShellCommand(
-                contentShellFilename,
-                fullHtmlPath,
-                contentShellOptions,
-                dartFlags,
-                environmentOverrides));
+        commandSet.add(CommandBuilder.instance.getContentShellCommand(
+            contentShellFilename,
+            fullHtmlPath,
+            contentShellOptions,
+            dartFlags,
+            environmentOverrides));
       } else {
-        commandSet.add(
-            CommandBuilder.instance.getBrowserTestCommand(
-                runtime,
-                fullHtmlPath,
-                configuration,
-                !isNegative(info)));
+        commandSet.add(CommandBuilder.instance.getBrowserTestCommand(
+            runtime, fullHtmlPath, configuration, !isNegative(info)));
       }
 
       // Create BrowserTestCase and queue it.
       var fullTestName = multitest ? '$testName/$subtestName' : testName;
       var expectation = multitest ? expectations[fullTestName] : expectations;
-      var testCase = new BrowserTestCase(
-            '$suiteName/$fullTestName',
-            commandSet,
-            configuration,
-            expectation,
-            info,
-            isNegative(info),
-            fullHtmlPath);
+      var testCase = new BrowserTestCase('$suiteName/$fullTestName', commandSet,
+          configuration, expectation, info, isNegative(info), fullHtmlPath);
 
       enqueueNewTestCase(testCase);
     }
   }
 
   void enqueueHtmlTest(
-      HtmlTestInformation info,
-      String testName,
-      expectations) {
+      HtmlTestInformation info, String testName, expectations) {
     final String compiler = configuration['compiler'];
     final String runtime = configuration['runtime'];
     // Html tests work only with the browser controller.
@@ -1475,19 +1422,15 @@
         Uri script = testUri.resolveUri(uri);
         Uri copiedScript = tempUri.resolveUri(uri);
         if (compiler == 'none' || scriptPath.endsWith('.js')) {
-          new File.fromUri(copiedScript).writeAsStringSync(
-              new File.fromUri(script).readAsStringSync());
+          new File.fromUri(copiedScript)
+              .writeAsStringSync(new File.fromUri(script).readAsStringSync());
         } else {
           var destination = copiedScript.toFilePath();
           if (compileToJS) {
             destination = destination.replaceFirst(dartExtension, '.js');
           }
-          commands.add(_compileCommand(
-              script.toFilePath(),
-              destination,
-              compiler,
-              tempDir,
-              info.optionsFromFile));
+          commands.add(_compileCommand(script.toFilePath(), destination,
+              compiler, tempDir, info.optionsFromFile));
         }
       }
     }
@@ -1496,28 +1439,18 @@
 
     var htmlPath = _createUrlPathFromFile(new Path(htmlFile.toFilePath()));
     var fullHtmlPath = _getUriForBrowserTest(htmlPath, null).toString();
-    commands.add(CommandBuilder.instance.getBrowserHtmlTestCommand(
-        runtime,
-        fullHtmlPath,
-        configuration,
-        info.expectedMessages,
-        !isNegative(info)));
+    commands.add(CommandBuilder.instance.getBrowserHtmlTestCommand(runtime,
+        fullHtmlPath, configuration, info.expectedMessages, !isNegative(info)));
     String testDisplayName = '$suiteName/$testName';
-    var testCase = new BrowserTestCase(
-        testDisplayName,
-        commands,
-        configuration,
-        expectations,
-        info,
-        isNegative(info),
-        fullHtmlPath);
+    var testCase = new BrowserTestCase(testDisplayName, commands, configuration,
+        expectations, info, isNegative(info), fullHtmlPath);
     enqueueNewTestCase(testCase);
     return;
   }
 
   /** Helper to create a compilation command for a single input file. */
-  Command _compileCommand(String inputFile, String outputFile,
-      String compiler, String dir, optionsFromFile) {
+  Command _compileCommand(String inputFile, String outputFile, String compiler,
+      String dir, optionsFromFile) {
     assert(compiler == 'dart2js');
     List<String> args;
     if (compilerPath.endsWith('.dart')) {
@@ -1527,8 +1460,7 @@
       args = [];
     }
     args.addAll(TestUtils.standardOptions(configuration));
-    String packageRoot =
-      packageRootArgument(optionsFromFile['packageRoot']);
+    String packageRoot = packageRootArgument(optionsFromFile['packageRoot']);
     if (packageRoot != null) args.add(packageRoot);
     String packages = packagesArgument(optionsFromFile['packages']);
     if (packages != null) args.add(packages);
@@ -1537,22 +1469,31 @@
     List<String> options = optionsFromFile['sharedOptions'];
     if (options != null) args.addAll(options);
     return CommandBuilder.instance.getCompilationCommand(
-        compiler, outputFile, !useSdk,
-        dart2JsBootstrapDependencies, compilerPath, args, environmentOverrides);
+        compiler,
+        outputFile,
+        !useSdk,
+        dart2JsBootstrapDependencies,
+        compilerPath,
+        args,
+        environmentOverrides);
   }
 
   /** Helper to create a Polymer deploy command for a single HTML file. */
-  Command _polymerDeployCommand(String inputFile, String outputDir,
-      optionsFromFile) {
+  Command _polymerDeployCommand(
+      String inputFile, String outputDir, optionsFromFile) {
     List<String> args = [];
     String packageRoot = packageRootArgument(optionsFromFile['packageRoot']);
     if (packageRoot != null) args.add(packageRoot);
     String packages = packagesArgument(optionsFromFile['packages']);
     if (packages != null) args.add(packages);
-    args..add('package:polymer/deploy.dart')
-        ..add('--test')..add(inputFile)
-        ..add('--out')..add(outputDir)
-        ..add('--file-filter')..add('.svn');
+    args
+      ..add('package:polymer/deploy.dart')
+      ..add('--test')
+      ..add(inputFile)
+      ..add('--out')
+      ..add(outputDir)
+      ..add('--file-filter')
+      ..add('.svn');
     if (configuration['csp']) args.add('--csp');
 
     return CommandBuilder.instance.getProcessCommand(
@@ -1568,14 +1509,14 @@
         return 'text/javascript';
       default:
         print('Non-web runtime, so no scriptType for: '
-                    '${configuration["compiler"]}');
+            '${configuration["compiler"]}');
         exit(1);
         return null;
     }
   }
 
   bool get hasRuntime {
-    switch(configuration['runtime']) {
+    switch (configuration['runtime']) {
       case 'none':
         return false;
       default:
@@ -1614,7 +1555,7 @@
 
     if (configuration["compiler"] == "dart2analyzer" &&
         (filePath.filename.contains("dart2js") ||
-        filePath.directoryPath.segments().last.contains('html_common'))) {
+            filePath.directoryPath.segments().last.contains('html_common'))) {
       args.add("--use-dart2js-libraries");
     }
 
@@ -1733,8 +1674,8 @@
     RegExp packagesRegExp = new RegExp(r"// Packages=(.*)");
     RegExp isolateStubsRegExp = new RegExp(r"// IsolateStubs=(.*)");
     // TODO(gram) Clean these up once the old directives are not supported.
-    RegExp domImportRegExp =
-        new RegExp(r"^[#]?import.*dart:(html|web_audio|indexed_db|svg|web_sql)",
+    RegExp domImportRegExp = new RegExp(
+        r"^[#]?import.*dart:(html|web_audio|indexed_db|svg|web_sql)",
         multiLine: true);
 
     var bytes = new File(filePath.toNativePath()).readAsBytesSync();
@@ -1813,34 +1754,43 @@
     List<String> subtestNames = [];
     Iterator matchesIter =
         multiHtmlTestGroupRegExp.allMatches(contents).iterator;
-    while(matchesIter.moveNext() && isMultiHtmlTest) {
+    while (matchesIter.moveNext() && isMultiHtmlTest) {
       String fullMatch = matchesIter.current.group(0);
       subtestNames.add(fullMatch.substring(fullMatch.indexOf("'") + 1));
     }
 
-    return { "vmOptions": result,
-             "sharedOptions": sharedOptions == null ? [] : sharedOptions,
-             "dartOptions": dartOptions,
-             "packageRoot": packageRoot,
-             "packages": packages,
-             "hasCompileError": false,
-             "hasRuntimeError": false,
-             "hasStaticWarning" : false,
-             "otherScripts": otherScripts,
-             "isMultitest": isMultitest,
-             "isMultiHtmlTest": isMultiHtmlTest,
-             "subtestNames": subtestNames,
-             "isolateStubs": isolateStubs,
-             "containsDomImport": containsDomImport };
+    return {
+      "vmOptions": result,
+      "sharedOptions": sharedOptions == null ? [] : sharedOptions,
+      "dartOptions": dartOptions,
+      "packageRoot": packageRoot,
+      "packages": packages,
+      "hasCompileError": false,
+      "hasRuntimeError": false,
+      "hasStaticWarning": false,
+      "otherScripts": otherScripts,
+      "isMultitest": isMultitest,
+      "isMultiHtmlTest": isMultiHtmlTest,
+      "subtestNames": subtestNames,
+      "isolateStubs": isolateStubs,
+      "containsDomImport": containsDomImport
+    };
   }
 
   List<List<String>> getVmOptions(Map optionsFromFile) {
     var COMPILERS = const ['none', 'precompiler', 'dart2app'];
-    var RUNTIMES = const ['none', 'dart_precompiled', 'dart_product', 'vm',
-                          'drt', 'dartium',
-                          'ContentShellOnAndroid', 'DartiumOnAndroid'];
+    var RUNTIMES = const [
+      'none',
+      'dart_precompiled',
+      'dart_product',
+      'vm',
+      'drt',
+      'dartium',
+      'ContentShellOnAndroid',
+      'DartiumOnAndroid'
+    ];
     var needsVmOptions = COMPILERS.contains(configuration['compiler']) &&
-                         RUNTIMES.contains(configuration['runtime']);
+        RUNTIMES.contains(configuration['runtime']);
     if (!needsVmOptions) return [[]];
     final vmOptions = optionsFromFile['vmOptions'];
     return vmOptions;
@@ -1861,8 +1811,8 @@
    * environment variables, configuration files, etc.
    */
   Map readOptionsFromCo19File(Path filePath) {
-    String contents = decodeUtf8(new File(filePath.toNativePath())
-        .readAsBytesSync());
+    String contents =
+        decodeUtf8(new File(filePath.toNativePath()).readAsBytesSync());
 
     bool hasCompileError = contents.contains("@compile-error");
     bool hasRuntimeError = contents.contains("@runtime-error");
@@ -1876,7 +1826,7 @@
       "packageRoot": null,
       "hasCompileError": hasCompileError,
       "hasRuntimeError": hasRuntimeError,
-      "hasStaticWarning" : hasStaticWarning,
+      "hasStaticWarning": hasStaticWarning,
       "otherScripts": <String>[],
       "isMultitest": isMultitest,
       "isMultiHtmlTest": false,
@@ -1887,54 +1837,46 @@
   }
 }
 
-
 /// Used for testing packages in on off settings, i.e., we pass in the actual
 /// directory that we want to test.
 class PKGTestSuite extends StandardTestSuite {
-
   PKGTestSuite(Map configuration, Path directoryPath)
-      : super(configuration,
-              directoryPath.filename,
-              directoryPath,
-              ["$directoryPath/.status"],
-              isTestFilePredicate: (f) => f.endsWith('_test.dart'),
-              recursive: true);
+      : super(configuration, directoryPath.filename, directoryPath,
+            ["$directoryPath/.status"],
+            isTestFilePredicate: (f) => f.endsWith('_test.dart'),
+            recursive: true);
 
-    void enqueueBrowserTest(List<Command> baseCommands,
-                          Path packageRoot,
-                          TestInformation info,
-                          String testName,
-                          expectations) {
-      String runtime = configuration['runtime'];
-      Path filePath = info.filePath;
-      Path dir = filePath.directoryPath;
-      String nameNoExt = filePath.filenameWithoutExtension;
-      Path customHtmlPath = dir.append('$nameNoExt.html');
-      File customHtml = new File(customHtmlPath.toNativePath());
-      if (!customHtml.existsSync()) {
-        super.enqueueBrowserTest(baseCommands, packageRoot,
-                                 info, testName, expectations);
-      } else {
-        Path relativeHtml = customHtmlPath.relativeTo(TestUtils.dartDir);
-        List<Command> commands = []..addAll(baseCommands);
-        var fullPath = _createUrlPathFromFile(customHtmlPath);
+  void enqueueBrowserTest(List<Command> baseCommands, Path packageRoot,
+      TestInformation info, String testName, expectations) {
+    String runtime = configuration['runtime'];
+    Path filePath = info.filePath;
+    Path dir = filePath.directoryPath;
+    String nameNoExt = filePath.filenameWithoutExtension;
+    Path customHtmlPath = dir.append('$nameNoExt.html');
+    File customHtml = new File(customHtmlPath.toNativePath());
+    if (!customHtml.existsSync()) {
+      super.enqueueBrowserTest(
+          baseCommands, packageRoot, info, testName, expectations);
+    } else {
+      Path relativeHtml = customHtmlPath.relativeTo(TestUtils.dartDir);
+      List<Command> commands = []..addAll(baseCommands);
+      var fullPath = _createUrlPathFromFile(customHtmlPath);
 
-        commands.add(CommandBuilder.instance.getBrowserTestCommand(
-            runtime, fullPath, configuration, !isNegative(info)));
-        String testDisplayName = '$suiteName/$testName';
-        enqueueNewTestCase(new BrowserTestCase(testDisplayName,
-                                               commands,
-                                               configuration,
-                                               expectations,
-                                               info,
-                                               isNegative(info),
-                                               relativeHtml.toNativePath()));
-
-      }
+      commands.add(CommandBuilder.instance.getBrowserTestCommand(
+          runtime, fullPath, configuration, !isNegative(info)));
+      String testDisplayName = '$suiteName/$testName';
+      enqueueNewTestCase(new BrowserTestCase(
+          testDisplayName,
+          commands,
+          configuration,
+          expectations,
+          info,
+          isNegative(info),
+          relativeHtml.toNativePath()));
     }
+  }
 }
 
-
 /// A DartcCompilationTestSuite will run dartc on all of the tests.
 ///
 /// Usually, the result of a dartc run is determined by the output of
@@ -1942,15 +1884,13 @@
 class DartcCompilationTestSuite extends StandardTestSuite {
   List<String> _testDirs;
 
-  DartcCompilationTestSuite(Map configuration,
-                            String suiteName,
-                            String directoryPath,
-                            List<String> this._testDirs,
-                            List<String> expectations)
-      : super(configuration,
-              suiteName,
-              new Path(directoryPath),
-              expectations);
+  DartcCompilationTestSuite(
+      Map configuration,
+      String suiteName,
+      String directoryPath,
+      List<String> this._testDirs,
+      List<String> expectations)
+      : super(configuration, suiteName, new Path(directoryPath), expectations);
 
   List<String> additionalOptions(Path filePath) {
     return ['--fatal-warnings', '--fatal-type-errors'];
@@ -1970,14 +1910,10 @@
   }
 }
 
-
 class AnalyzeLibraryTestSuite extends DartcCompilationTestSuite {
   AnalyzeLibraryTestSuite(Map configuration)
-      : super(configuration,
-              'analyze_library',
-              'sdk',
-              ['lib'],
-              ['tests/lib/analyzer/analyze_library.status']);
+      : super(configuration, 'analyze_library', 'sdk', ['lib'],
+            ['tests/lib/analyzer/analyze_library.status']);
 
   List<String> additionalOptions(Path filePath, {bool showSdkWarnings}) {
     var options = super.additionalOptions(filePath);
@@ -1996,24 +1932,25 @@
   bool get listRecursively => true;
 }
 
-
 class PkgBuildTestSuite extends TestSuite {
   final String statusFilePath;
 
   PkgBuildTestSuite(Map configuration, String suiteName, this.statusFilePath)
       : super(configuration, suiteName) {
-    assert(configuration['use_sdk']);;
+    assert(configuration['use_sdk']);
+    ;
   }
 
   void forEachTest(void onTest(TestCase testCase), _, [void onDone()]) {
     bool fileExists(Path path) => new File(path.toNativePath()).existsSync();
 
-    bool dirExists(Path path)
-        => new Directory(path.toNativePath()).existsSync();
+    bool dirExists(Path path) =>
+        new Directory(path.toNativePath()).existsSync();
 
-    enqueueTestCases(Map<String, String> localPackageDirectories,
-                     Map<String, String> localSampleDirectories,
-                     TestExpectations testExpectations) {
+    enqueueTestCases(
+        Map<String, String> localPackageDirectories,
+        Map<String, String> localSampleDirectories,
+        TestExpectations testExpectations) {
       enqueueTestCase(String packageName, String directory) {
         var absoluteDirectoryPath = new Path(directory);
 
@@ -2022,8 +1959,7 @@
           return;
         }
 
-        var directoryPath =
-            absoluteDirectoryPath.relativeTo(TestUtils.dartDir);
+        var directoryPath = absoluteDirectoryPath.relativeTo(TestUtils.dartDir);
         var testName = "$directoryPath";
         var displayName = '$suiteName/$testName';
         var packageName = directoryPath.filename;
@@ -2055,10 +1991,10 @@
         var commands = new List<Command>();
         commands.add(
             CommandBuilder.instance.getCopyCommand(directory, checkoutDir));
-        commands.add(CommandBuilder.instance.getModifyPubspecCommand(
-            pubspecYamlFile, dependencyOverrides));
-        commands.add(CommandBuilder.instance.getPubCommand(
-            "get", pubPath, checkoutDir, cacheDir));
+        commands.add(CommandBuilder.instance
+            .getModifyPubspecCommand(pubspecYamlFile, dependencyOverrides));
+        commands.add(CommandBuilder.instance
+            .getPubCommand("get", pubPath, checkoutDir, cacheDir));
 
         bool containsWebDirectory = dirExists(directoryPath.append('web'));
         bool containsBuildDartFile =
@@ -2067,23 +2003,29 @@
           var dartBinary = new File(dartVmBinaryFileName).absolute.path;
 
           commands.add(CommandBuilder.instance.getProcessCommand(
-              "custom_build", dartBinary, ['build.dart'],
-              {'PUB_CACHE': cacheDir}, checkoutDir));
+              "custom_build",
+              dartBinary,
+              ['build.dart'],
+              {'PUB_CACHE': cacheDir},
+              checkoutDir));
 
           // We only try to deploy the application if it's a webapp.
           if (containsWebDirectory) {
             commands.add(CommandBuilder.instance.getProcessCommand(
-                 "custom_deploy", dartBinary, ['build.dart', '--deploy'],
-                 {'PUB_CACHE': cacheDir}, checkoutDir));
+                "custom_deploy",
+                dartBinary,
+                ['build.dart', '--deploy'],
+                {'PUB_CACHE': cacheDir},
+                checkoutDir));
           }
-        } else if (containsWebDirectory)  {
-          commands.add(CommandBuilder.instance.getPubCommand(
-             "build", pubPath, checkoutDir, cacheDir));
+        } else if (containsWebDirectory) {
+          commands.add(CommandBuilder.instance
+              .getPubCommand("build", pubPath, checkoutDir, cacheDir));
         }
 
         // Enqueue TestCase
-        var testCase = new TestCase(displayName,
-            commands, configuration, testExpectations.expectations(testName));
+        var testCase = new TestCase(displayName, commands, configuration,
+            testExpectations.expectations(testName));
         enqueueNewTestCase(testCase);
       }
 
@@ -2097,10 +2039,13 @@
 
     doTest = onTest;
     List<String> statusFiles = [
-        TestUtils.dartDir.join(new Path(statusFilePath)).toNativePath()];
+      TestUtils.dartDir.join(new Path(statusFilePath)).toNativePath()
+    ];
     ReadTestExpectations(statusFiles, configuration).then((expectations) {
-      Future.wait([discoverPackagesInRepository(),
-                   discoverSamplesInRepository()]).then((List results) {
+      Future.wait([
+        discoverPackagesInRepository(),
+        discoverSamplesInRepository()
+      ]).then((List results) {
         Map packageDirectories = results[0];
         Map sampleDirectories = results[1];
         enqueueTestCases(packageDirectories, sampleDirectories, expectations);
@@ -2109,7 +2054,6 @@
   }
 }
 
-
 class LastModifiedCache {
   Map<String, DateTime> _cache = <String, DateTime>{};
 
@@ -2135,7 +2079,6 @@
   }
 }
 
-
 class ExistsCache {
   Map<String, bool> _cache = <String, bool>{};
 
@@ -2152,7 +2095,6 @@
   }
 }
 
-
 class TestUtils {
   /**
    * Any script using TestUtils must set dartDirUri to a file:// URI
@@ -2162,13 +2104,13 @@
     dartDirUri = uri;
     dartDir = new Path(uri.toFilePath());
   }
+
   static Random rand = new Random.secure();
   static Uri dartDirUri;
   static Path dartDir;
   static LastModifiedCache lastModifiedCache = new LastModifiedCache();
   static ExistsCache existsCache = new ExistsCache();
-  static Path currentWorkingDirectory =
-      new Path(Directory.current.path);
+  static Path currentWorkingDirectory = new Path(Directory.current.path);
 
   /**
    * Generates a random number.
@@ -2210,7 +2152,8 @@
    * Assumes that the directory for [dest] already exists.
    */
   static Future copyFile(Path source, Path dest) {
-    return new File(source.toNativePath()).openRead()
+    return new File(source.toNativePath())
+        .openRead()
         .pipe(new File(dest.toNativePath()).openWrite());
   }
 
@@ -2240,13 +2183,14 @@
       var native_path = new Path(path).toNativePath();
       // Running this in a shell sucks, but rmdir is not part of the standard
       // path.
-      return Process.run('rmdir', ['/s', '/q', native_path], runInShell: true)
-        .then((ProcessResult result) {
-          if (result.exitCode != 0) {
-            throw new Exception('Can\'t delete path $native_path. '
-                                'This path might be too long');
-          }
-        });
+      return Process
+          .run('rmdir', ['/s', '/q', native_path], runInShell: true)
+          .then((ProcessResult result) {
+        if (result.exitCode != 0) {
+          throw new Exception('Can\'t delete path $native_path. '
+              'This path might be too long');
+        }
+      });
     } else {
       var dir = new Directory(path);
       return dir.delete(recursive: true);
@@ -2259,8 +2203,8 @@
       var minified = configuration['minified'] ? '-minified' : '';
       var csp = configuration['csp'] ? '-csp' : '';
       var sdk = configuration['use_sdk'] ? '-sdk' : '';
-      var packages = configuration['use_public_packages']
-          ? '-public_packages' : '';
+      var packages =
+          configuration['use_public_packages'] ? '-public_packages' : '';
       var dirName = "${configuration['compiler']}"
           "$checked$minified$csp$packages$sdk";
       String generatedPath = "${TestUtils.buildDir(configuration)}"
@@ -2328,8 +2272,7 @@
         args.add("--categories=all");
       }
     }
-    if ((compiler == "dart2js") &&
-        configuration["minified"]) {
+    if ((compiler == "dart2js") && configuration["minified"]) {
       args.add("--minify");
     }
     if (compiler == "dart2js" && configuration["csp"]) {
@@ -2415,7 +2358,7 @@
     var crossDir = new Directory(new Path('$outDir$cross').toNativePath());
     if (normalDir.existsSync() && crossDir.existsSync()) {
       throw "You can't have both $normalDir and $crossDir, we don't know which"
-            " binary to use";
+          " binary to use";
     }
     if (crossDir.existsSync()) {
       return cross;
@@ -2468,7 +2411,6 @@
       "tests_co19_src_WebPlatformTest_html_semantics_embedded-content_"
           "media-elements_": "co19_media_elements",
       "tests_co19_src_WebPlatformTest_html_semantics_": "co19_semantics_",
-
       "tests_co19_src_WebPlatformTest_html-templates_additions-to-"
           "the-steps-to-clone-a-node_": "co19_htmltemplates_clone_",
       "tests_co19_src_WebPlatformTest_html-templates_definitions_"
@@ -2486,7 +2428,6 @@
       "tests_co19_src_WebPlatformTest_html-templates_template-element"
           "_template-": "co19_htmltemplates_element-",
       "tests_co19_src_WebPlatformTest_html-templates_": "co19_htmltemplate_",
-
       "tests_co19_src_WebPlatformTest_shadow-dom_shadow-trees_":
           "co19_shadow-trees_",
       "tests_co19_src_WebPlatformTest_shadow-dom_elements-and-dom-objects_":
diff --git a/tools/testing/dart/utils.dart b/tools/testing/dart/utils.dart
index d000994..fd2245e 100644
--- a/tools/testing/dart/utils.dart
+++ b/tools/testing/dart/utils.dart
@@ -14,7 +14,7 @@
 const Duration MAX_STDIO_DELAY = const Duration(seconds: 30);
 
 String MAX_STDIO_DELAY_PASSED_MESSAGE =
-"""Not waiting for stdout/stderr from subprocess anymore 
+    """Not waiting for stdout/stderr from subprocess anymore 
 ($MAX_STDIO_DELAY passed). Please note that this could be an indicator 
 that there is a hanging process which we were unable to kill.""";
 
@@ -46,6 +46,7 @@
     // if (trace != null) msg += "\nStackTrace: $trace";
     return msg;
   }
+
   static void info(String msg, [error]) {
     msg = _formatErrorMessage(msg, error);
     _print("$_datetime Info: $msg");
@@ -88,13 +89,12 @@
     if (newLine) buffer.write("\n");
   }
 
-  prettifyJsonInternal(
-      Object obj, {bool indentation: true, bool newLine: true}) {
+  prettifyJsonInternal(Object obj,
+      {bool indentation: true, bool newLine: true}) {
     if (obj is List) {
       addString("[", indentation: indentation);
       currentIndentation += shiftWidth;
       for (var item in obj) {
-
         prettifyJsonInternal(item, indentation: indentation, newLine: false);
         addString(",", indentation: false);
       }
@@ -119,7 +119,6 @@
   return buffer.toString();
 }
 
-
 /**
  * [areByteArraysEqual] compares a range of bytes from [buffer1] with a
  * range of bytes from [buffer2].
@@ -129,9 +128,8 @@
  * [offset2]).
  * Otherwise [false] is returned.
  */
-bool areByteArraysEqual(List<int> buffer1, int offset1,
-                        List<int> buffer2, int offset2,
-                        int count) {
+bool areByteArraysEqual(
+    List<int> buffer1, int offset1, List<int> buffer2, int offset2, int count) {
   if ((offset1 + count) > buffer1.length ||
       (offset2 + count) > buffer2.length) {
     return false;
@@ -151,7 +149,7 @@
  * Returns [true] if [pattern] was found in [data].
  * Otherwise [false] is returned.
  */
-int findBytes(List<int> data, List<int> pattern, [int startPos=0]) {
+int findBytes(List<int> data, List<int> pattern, [int startPos = 0]) {
   // TODO(kustermann): Use one of the fast string-matching algorithms!
   for (int i = startPos; i < (data.length - pattern.length); i++) {
     bool found = true;
@@ -180,47 +178,47 @@
 }
 
 class Locations {
-  static String getBrowserLocation(String browserName,
-                                   Map globalConfiguration) {
+  static String getBrowserLocation(
+      String browserName, Map globalConfiguration) {
     var location = globalConfiguration[browserName];
     if (location != null && location != '') {
       return location;
     }
     var browserLocations = {
-        'firefox': const {
-          'windows': 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe',
-          'linux': 'firefox',
-          'macos': '/Applications/Firefox.app/Contents/MacOS/firefox'
-        },
-        'chrome': const {
-          'windows':
+      'firefox': const {
+        'windows': 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe',
+        'linux': 'firefox',
+        'macos': '/Applications/Firefox.app/Contents/MacOS/firefox'
+      },
+      'chrome': const {
+        'windows':
             'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe',
-          'macos':
-            '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
-          'linux': 'google-chrome'
-        },
-        'dartium': const {
-          'windows': 'client\\tests\\dartium\\chrome.exe',
-          'macos': 'client/tests/dartium/Chromium.app/Contents/MacOS/Chromium',
-          'linux': 'client/tests/dartium/chrome'
-        },
-        'safari': const {
-          'macos': '/Applications/Safari.app/Contents/MacOS/Safari'
-        },
-        'safarimobilesim': const {
-          'macos': '/Applications/Xcode.app/Contents/Developer/Platforms/'
-                   'iPhoneSimulator.platform/Developer/Applications/'
-                   'iPhone Simulator.app/Contents/MacOS/iPhone Simulator'
-        },
-        'ie9': const {
-          'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe'
-        },
-        'ie10': const {
-          'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe'
-        },
-        'ie11': const {
-          'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe'
-        }};
+        'macos': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
+        'linux': 'google-chrome'
+      },
+      'dartium': const {
+        'windows': 'client\\tests\\dartium\\chrome.exe',
+        'macos': 'client/tests/dartium/Chromium.app/Contents/MacOS/Chromium',
+        'linux': 'client/tests/dartium/chrome'
+      },
+      'safari': const {
+        'macos': '/Applications/Safari.app/Contents/MacOS/Safari'
+      },
+      'safarimobilesim': const {
+        'macos': '/Applications/Xcode.app/Contents/Developer/Platforms/'
+            'iPhoneSimulator.platform/Developer/Applications/'
+            'iPhone Simulator.app/Contents/MacOS/iPhone Simulator'
+      },
+      'ie9': const {
+        'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe'
+      },
+      'ie10': const {
+        'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe'
+      },
+      'ie11': const {
+        'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe'
+      }
+    };
     browserLocations['ff'] = browserLocations['firefox'];
 
     assert(browserLocations[browserName] != null);
@@ -246,12 +244,15 @@
   int _value = 0;
 
   void add(Object object) {
-    _value = ((_value * 31) ^ object.hashCode)  & 0x3FFFFFFF;
+    _value = ((_value * 31) ^ object.hashCode) & 0x3FFFFFFF;
   }
 
   void addJson(Object object) {
-    if (object == null || object is num || object is String ||
-                  object is Uri || object is bool) {
+    if (object == null ||
+        object is num ||
+        object is String ||
+        object is Uri ||
+        object is bool) {
       add(object);
     } else if (object is List) {
       object.forEach(addJson);
@@ -304,7 +305,7 @@
   final int _hashCode;
 
   int get hashCode => _hashCode;
-  operator==(other) => other is UniqueObject && _hashCode == other._hashCode;
+  operator ==(other) => other is UniqueObject && _hashCode == other._hashCode;
 
   UniqueObject() : _hashCode = ++_nextId;
 }
diff --git a/tools/testing/dart/vm_test_config.dart b/tools/testing/dart/vm_test_config.dart
index 9fdf36b..9cadd4fc 100644
--- a/tools/testing/dart/vm_test_config.dart
+++ b/tools/testing/dart/vm_test_config.dart
@@ -8,9 +8,7 @@
 
 class VMTestSuite extends CCTestSuite {
   VMTestSuite(Map configuration)
-      : super(configuration,
-              "vm",
-              "run_vm_tests",
-              ["runtime/tests/vm/vm.status"],
-              testPrefix: 'cc/');
+      : super(
+            configuration, "vm", "run_vm_tests", ["runtime/tests/vm/vm.status"],
+            testPrefix: 'cc/');
 }
diff --git a/utils/dartanalyzer/dartanalyzer.gyp b/utils/dartanalyzer/dartanalyzer.gyp
index 6aec554..f23d464 100644
--- a/utils/dartanalyzer/dartanalyzer.gyp
+++ b/utils/dartanalyzer/dartanalyzer.gyp
@@ -19,6 +19,7 @@
             '../../sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart',
             '<(SHARED_INTERMEDIATE_DIR)/packages.stamp',
             '<!@(["python", "../../tools/list_files.py", "\\.dart$", "../../pkg/analyzer_cli"])',
+            '<!@(["python", "../../tools/list_files.py", "\\.dart$", "../../pkg/analyzer"])',
           ],
           'outputs': [
             '<(SHARED_INTERMEDIATE_DIR)/dartanalyzer.dart.snapshot',
@@ -31,7 +32,7 @@
           ],
         },
         {
-          'action_name': 'generate_summaries',
+          'action_name': 'generate_summary_bundle',
           'inputs': [
             '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
             '<(SHARED_INTERMEDIATE_DIR)/packages.stamp',
@@ -39,14 +40,48 @@
             '<!@(["python", "../../tools/list_files.py", "\\.dart$", "../../pkg/analyzer"])',
           ],
           'outputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/sdk_summary_bundle.bin',
+          ],
+          'action': [
+            '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
+            '--package-root=<(PRODUCT_DIR)/packages/',
+            '../../pkg/analyzer/tool/summary/build_sdk_summaries.dart',
+            'single-output',
+            '<(SHARED_INTERMEDIATE_DIR)/sdk_summary_bundle.bin',
+          ],
+        },
+        {
+          'action_name': 'extract_spec_summary',
+          'inputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/sdk_summary_bundle.bin',
+          ],
+          'outputs': [
             '<(SHARED_INTERMEDIATE_DIR)/spec.sum',
+          ],
+          'action': [
+            '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
+            '--package-root=<(PRODUCT_DIR)/packages/',
+            '../../pkg/analyzer/tool/summary/build_sdk_summaries.dart',
+            'extract-spec-sum',
+            '<(SHARED_INTERMEDIATE_DIR)/sdk_summary_bundle.bin',
+            '<(SHARED_INTERMEDIATE_DIR)/spec.sum',
+          ],
+        },
+        {
+          'action_name': 'extract_strong_summary',
+          'inputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/sdk_summary_bundle.bin',
+          ],
+          'outputs': [
             '<(SHARED_INTERMEDIATE_DIR)/strong.sum',
           ],
           'action': [
             '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
             '--package-root=<(PRODUCT_DIR)/packages/',
             '../../pkg/analyzer/tool/summary/build_sdk_summaries.dart',
-            '<(SHARED_INTERMEDIATE_DIR)',
+            'extract-strong-sum',
+            '<(SHARED_INTERMEDIATE_DIR)/sdk_summary_bundle.bin',
+            '<(SHARED_INTERMEDIATE_DIR)/strong.sum',
           ],
         },
       ],
diff --git a/utils/dartdevc/dartdevc.gyp b/utils/dartdevc/dartdevc.gyp
new file mode 100644
index 0000000..60e3f65
--- /dev/null
+++ b/utils/dartdevc/dartdevc.gyp
@@ -0,0 +1,37 @@
+# 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.
+
+{
+  'targets': [
+    {
+      'target_name': 'dartdevc',
+      'type': 'none',
+      'dependencies': [
+        '../../runtime/dart-runtime.gyp:dart',
+        '../../pkg/pkg.gyp:pkg_packages',
+      ],
+      'actions': [
+        {
+          'action_name': 'generate_dartdevc_snapshot',
+          'inputs': [
+            '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
+            '../../sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart',
+            '<!@(["python", "../../tools/list_files.py", "\\.dart$", "../../third_party/pkg/dev_compiler/bin"])',
+            '<(SHARED_INTERMEDIATE_DIR)/packages.stamp',
+            '<(SHARED_INTERMEDIATE_DIR)/pkg_files.stamp',
+          ],
+          'outputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/dartdevc.dart.snapshot',
+          ],
+          'action': [
+            '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
+            '--snapshot=<(SHARED_INTERMEDIATE_DIR)/dartdevc.dart.snapshot',
+            '--package-root=<(PRODUCT_DIR)/packages/',
+            '../../third_party/pkg/dev_compiler/bin/dartdevc.dart'
+          ],
+        },
+      ],
+    },
+  ],
+}